INT 15 to return memory size
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
This is returning a value of 0, but my ram is 512MB.
xor ax,ax /* Clear accumulator*/
mov ah,0x88 /* move hex 88 into AH*/
mov memory, ax
printf("\nThe extended memory size is %d (0x%X).\n", memory, memory);
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.