Detecting amount of RAM?
-
St8ic
Detecting amount of RAM?
I would like to have my OS display how much RAM the system has at startup, but I have no idea how to begin. Any tips or code? Thanks.
-
PrzemekG_
RE:Detecting amount of RAM?
There is a link to OS developement FAQ where you can find 2 examples.
-
St8ic
RE:Detecting amount of RAM?
Thanks alot. It was helpful in understanding more about what I'm doing, and I've decided to use the BIOS to detect the RAM. It has alot on doing that, but I can't quite get it to work right. int15 deals with getting the system memory map, where ECX is the "actual length returned in bytes". Can anyone help me call this properly? Thanks again!
(P.S. I've already enabled the A20 line)
(P.S. I've already enabled the A20 line)
-
~
RE:Detecting amount of RAM?
invert every byte, check the result and invert it back.
if the result is wrong, there is no more ram.
start at 1MB because of the bios data. this sample only works in pmode.
if the result is wrong, there is no more ram.
start at 1MB because of the bios data. this sample only works in pmode.
-
Dangermoose
RE:Detecting amount of RAM?
Start at 1mb to avoid the bios. What about other holes in memory, you'd be writing data to them.
I had memory probing for my os to begin with, until it screwed my motherboard over.
Moose.
I had memory probing for my os to begin with, until it screwed my motherboard over.
Moose.
RE:Detecting amount of RAM?
but.... if you have enabled the A20 line, doesn´t that mean that u r
in p mode? and if thats correct, u can´t use the bios, or?
in p mode? and if thats correct, u can´t use the bios, or?
-
graphics in pm
Detecting amount of RAM?
inverting ram works in pmode with a20 enabled.
i dont't use the bios functions
i dont't use the bios functions
-
Karig
RE:Detecting amount of RAM?
You can enable the A20 line from within real mode. This does not put you in protected mode.
-
Gnome
RE:Detecting amount of RAM?
If you use GRUB, it supplies this information in the Multiboot information structure.
Gnome
Gnome
