Question about end of boot loader.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Question about end of boot loader.

Post by crazygray »

If the end of end of the bootloader ends with 0xAA55 in the actual binary does it go 0x55 0xAA because of the intel proccesor?
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Post by inflater »

No. That means the BIOS boot signature, if BIOS will find this sig, it will load from the boot sector. Some BIOSes are ignoring this sig.

Regards
inflater
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
User avatar
XCHG
Member
Member
Posts: 416
Joined: Sat Nov 25, 2006 3:55 am
Location: Wisconsin
Contact:

Post by XCHG »

Intel processors (most of them) are little-endian. This means that the least significant byte of a value is stored in the lowest address of memory. In the boot loader, we will have the 510th (zero based) byte as 0x55 and the next byte as 0xAA so as a little-endian WORD value (16-bits), this can be represented as 0xAA55. Note that the least significant byte is the rightmost byte or the 0x55 which in here, since it is the first byte, is stored in the least significant byte and the most significant byte (0xAA) is stored as the leftmost byte. When you look at your boot loader's contents in a hex editor (perhaps), 0x55 should come first, followed by 0xAA.

I hope that helps. Good luck.
Last edited by XCHG on Sat Nov 10, 2007 2:46 pm, edited 1 time in total.
On the field with sword and shield amidst the din of dying of men's wails. War is waged and the battle will rage until only the righteous prevails.
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Post by crazygray »

:D :D Thats what I did when I asked the question, just making sure :D :D
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
Post Reply