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..
7c00
Moderator:Moderators
Re: 7c00
Hello,
Its 0x0:0x7c00, which is also the same as 0x7c0:0
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
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Re: 7c00
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..
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
axneer: you slightly misread Mikes post
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
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.Its 0x0:0x7c00, which is also the same as 0x7c0:0
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
