Calls the BIOS memory-size service, using INT 0x12.
#include <bios.h>
unsigned _bios_memsize( void );
The _bios_memsize routine uses INT 0x12 to determine the total amount of main memory installed.
The routine returns the total amount of installed memory in 1K blocks. The maximum return value is 640, representing 640K of main memory.
Standards:None
16-Bit:DOS, QWIN, WIN, WIN DLL
32-Bit:None
/* BMEMSIZE.C: This program displays the amount of memory installed. */
#include <bios.h>
#include <stdio.h>
void main( void )
{
unsigned memory;
memory = _bios_memsize();
printf ( "The amount of memory installed is: %dK\n", memory );
}
The amount of memory installed is: 640K