quantity of physical memory without real mode interrupts

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
hendric
Member
Member
Posts: 38
Joined: Sat Oct 21, 2006 10:56 am
Location: China

quantity of physical memory without real mode interrupts

Post 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....
Just Lazy Writing Anything...
User avatar
mathematician
Member
Member
Posts: 437
Joined: Fri Dec 15, 2006 5:26 pm
Location: Church Stretton Uk

Re: quantity of physical memory without real mode interrupts

Post 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.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post 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
xsix
Member
Member
Posts: 59
Joined: Tue Oct 24, 2006 10:52 am

Post by xsix »

from CMOS you can get only 16bits value, that causes detection of 64mb of ram as maximum
hendric
Member
Member
Posts: 38
Joined: Sat Oct 21, 2006 10:56 am
Location: China

Post by hendric »

Thank you all :roll:
Just Lazy Writing Anything...
Post Reply