Page 1 of 1

quantity of physical memory without real mode interrupts

Posted: Tue Jan 23, 2007 9:47 am
by hendric
Hi all . Is there any way to determine the quantity of memory without a int call witin real mode ? Could I read the very informations from CMOS?
If yes, many problems can be solved pretty well....

Re: quantity of physical memory without real mode interrupts

Posted: Tue Jan 23, 2007 10:43 am
by mathematician
hendric wrote:Hi all . Is there any way to determine the quantity of memory without a int call witin real mode ? Could I read the very informations from CMOS?
If yes, many problems can be solved pretty well....
There isn't really any way to do it. The contents of CMOS memory are mostly of archaeological interest nowadays. The easiest thing would be to determine the amount of memory available before switching into protected mode, and then store the information until you need it.

Posted: Tue Jan 23, 2007 10:47 am
by AJ
Hi,

For a start I would certainly suggest you read this wiki page.

AFAIK you need to use a BIOS int to determine the amount of RAM but if you are not rolling your own bootloader, you can easily get around this by getting GRUB to do the call for you. If you are using your own boot loader, using the BIOS calls is worth persuing - it's easier than it looks to start with :)

Cheers,
Adam

Posted: Thu Jan 25, 2007 10:12 am
by xsix
from CMOS you can get only 16bits value, that causes detection of 64mb of ram as maximum

Posted: Thu Jan 25, 2007 3:15 pm
by hendric
Thank you all :roll: