Page 1 of 1

7c00

Posted: Sat Aug 08, 2009 7:40 pm
by axneer
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..

Re: 7c00

Posted: Sun Aug 09, 2009 5:26 am
by Mike
Hello,

Its 0x0:0x7c00, which is also the same as 0x7c0:0

Re: 7c00

Posted: Sun Aug 09, 2009 6:36 am
by axneer
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..

Re: 7c00

Posted: Sun Aug 09, 2009 11:14 am
by Andyhhp
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

Re: 7c00

Posted: Sun Aug 09, 2009 12:43 pm
by axneer
i got it..
thanks for the link..

Re: 7c00

Posted: Fri Aug 14, 2009 8:01 pm
by ehenkes