Page 1 of 1

Some info

Posted: Tue Apr 17, 2001 11:00 pm
by kp
I'm writing a bootloader in Nasm. How do I get
information like: Conventional memory, Extended memory
and print this on the screen. And how do I check
if my CPU is a 32-bit?

I'm very glad if you can give me some sample code.

RE:SomeĀ info

Posted: Tue Apr 17, 2001 11:00 pm
by Ben Hsu
Hello,

>On 2001-04-18 12:04:40, kp wrote:
>I'm writing a bootloader in Nasm. How do I get
>information like: Conventional memory, Extended memory
You can get the BIOS's interrupts list from Mr.
Ralf Brown at http://www.ctyme.com/rbrown.htm,
which will have a section on memory.

>and print this on the screen. And how do I check
>if my CPU is a 32-bit?

This you will have to make sure you perserved the EDX
register from the very beginning after booting. It was
quoted from this place, http://webster.cs.ucr.edu/Page_asm/Doc386/S10_01.HTM,
where it suggested the idea that DH will hold 3 if
the target CPU is a 80386, and if not than it's not. Do
not assume though that it will be 4 when on 80486, but possible.

>I'm very glad if you can give me some sample code.

Sorry I don't have any codes to say ...

RE:SomeĀ info

Posted: Wed Apr 18, 2001 11:00 pm
by Chris Giese
>On 2001-04-18 12:04:40, kp wrote:
>I'm writing a bootloader in Nasm. How do I get
>information like: Conventional memory, Extended memory
>and print this on the screen. And how do I check
>if my CPU is a 32-bit?
>
>I'm very glad if you can give me some sample code.

http://www.execpc.com/~geezer/osd/boot/ ... m#snippets

RE:Some info

Posted: Sat Apr 21, 2001 11:00 pm
by Guest
>On 2001-04-18 12:04:40, kp wrote:
>I'm writing a bootloader in Nasm. How do I get
>information like: Conventional memory, Extended memory
>and print this on the screen. And how do I check
>if my CPU is a 32-bit?
>
>I'm very glad if you can give me some sample code.
Well, my knowledge isn't too big, but you can as far it goes for the memory stuff you can try to get it from CMOS via i/o ports, or from BIOS via interrupts. And about the cpu - I don't know how it is with other processors, but you can check the type of a cpu if it's a x86 compatible one (using the eflags register or the cpuid instruction etc.) There are some papers about this topic on the net.