I am writing a program for DOS to return the extended memory size but it is not working properly. The code I have is below
Code:
_asm
{
xor ax,ax /* Clear accumulator*/
mov ah,0x88 /* move hex 88 into AH*/
nop
nop
nop
int 15h
mov memory, ax
}
printf("\nThe extended memory size is %d (0x%X).\n", memory, memory);
This is returning a value of 0, but my ram is 512MB.
What am I doing wrong? Does it have to do with the registers being 16 bit?
Also I will need to get the base memory size as well, but that is next on the list after I can figure this part out.