flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Boot loader signature. Strange.

Author
Thread Post new topic Reply to topic
MarcoAlves



Joined: 09 Jun 2006
Posts: 30
MarcoAlves
Hi.

I'd read that the boot loader MUST have 512bytes long. Ok. That's is.
But, the 2 bytes at end must be AA and 55. When I see the first sector of
my hd with a disk editor, I note that it ends with 55 and AA.

The instruction as I learnt:
Code:
; End matter
times 510-($-$$) db 0 ; Boot loader MUST have 512 bytes long.
dw 0xAA55 ; Boot loader signature
    


But, when assembled, I opened with and hex editor, the ending appears
like the attached picture. Why?


Description: My boot.asm assembled by FASM. Note that it ends with 55 AA.
Filesize: 210.47 KB
Viewed: 709 Time(s)

boot_bin.JPG


Post 20 Jun 2006, 13:10
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
What's wrong with that? I'ts at $1FE as expected and is 55 AA because of the little endian order.
Post 20 Jun 2006, 14:25
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.