OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Apr 24, 2024 6:18 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Some info
PostPosted: Tue Apr 17, 2001 11:00 pm 
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.


Top
  
 
 Post subject: RE:SomeĀ info
PostPosted: Tue Apr 17, 2001 11:00 pm 
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 ...


Top
  
 
 Post subject: RE:SomeĀ info
PostPosted: Wed Apr 18, 2001 11:00 pm 
>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


Top
  
 
 Post subject: RE:Some info
PostPosted: Sat Apr 21, 2001 11:00 pm 
>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.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Majestic-12 [Bot] and 205 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group