7c00

If you are new to OS Development, plan on spending some time here first before going into the other forums.

Moderator:Moderators

Post Reply
axneer
Posts:5
Joined:Sat Aug 08, 2009 2:14 pm
7c00

Post by axneer » Sat Aug 08, 2009 7:40 pm

hi...
i have a query about the address at which bootloader gets loaded in memory..
if it is 0000:7c00 or 7c00:0000.....please guide..

User avatar
Mike
Site Admin
Posts:465
Joined:Sat Oct 20, 2007 7:58 pm
Contact:

Re: 7c00

Post by Mike » Sun Aug 09, 2009 5:26 am

Hello,

Its 0x0:0x7c00, which is also the same as 0x7c0:0
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com

axneer
Posts:5
Joined:Sat Aug 08, 2009 2:14 pm

Re: 7c00

Post by axneer » Sun Aug 09, 2009 6:36 am

hi mike...thanks for the reply...
but i am still cofused ...as...
if [cs:ip]-->0000:7c00 is converted to linear address then it will be-->
07c00-->0000 0111 1100 0000 0000 (20 bits to be sent on add bus )
if [cs:ip]-->7c00:0000 is converted to linear address then it will be-->
7c000-->0111 1100 0000 0000 0000 (20 bits to be sent on add bus)

how these could be indicating same location ? if address bus neglects 0 before 7c00 and append it to last? what are the contents of higher order and lower order add bus?....please reply..

Andyhhp
Moderator
Posts:387
Joined:Tue Oct 23, 2007 10:05 am
Location:127.0.0.1
Contact:

Re: 7c00

Post by Andyhhp » Sun Aug 09, 2009 11:14 am

axneer: you slightly misread Mikes post
Its 0x0:0x7c00, which is also the same as 0x7c0:0
so from this, the two valid addresses are 0x0000:0x7C00 and 0x07C0:0x0000, not 0x7C00:0x0000 which would point to the address 16 bytes after the start of the bootloader.

Now, unfortunatly, you have no idea wether the bootloader will load you at 0x0000:0x7C00 or 0x07C0:0x0000.

While this does lead to the same linear address, it can mess about with your code because, if you assume that the descriptors are all set to 0, and run code that assumes they are all set to 0x7C00 then any references will be wrong.

http://wiki.osdev.org/Babystep2
This describes the problem and how to be careful about it

~Andrew
Image

axneer
Posts:5
Joined:Sat Aug 08, 2009 2:14 pm

Re: 7c00

Post by axneer » Sun Aug 09, 2009 12:43 pm

i got it..
thanks for the link..

ehenkes
Posts:34
Joined:Fri Jul 24, 2009 5:35 pm

Re: 7c00

Post by ehenkes » Fri Aug 14, 2009 8:01 pm


Post Reply