Page 1 of 1

Counting Extended Ram

Posted: Sun May 30, 2004 11:00 pm
by deus_the_programmer
hi i want to show the full amount of extended ram in my computer system.
this is the code i have got so far, but it does not show the correct amout on my system,i have 80mb and it shows it as: -61.


int get_system_memory(void)
{
int base;
int ext;
base = nvread(0x15) | (nvread(0x16) << 8);
ext = nvread(0x17) | (nvread(0x18) << 8);
cprintf("\n\r%d Base Memory, %d Extended Memory", base, ext);
return 0;
}

the base memory count shows 640k (which is fine, it's just the extended amout that is broken.)


PLEASE help me correct this code.

ed.