Reputation: 615
I'm writing a small bootloader in GNU as
and I need to make the binary output "BIOS-compatible". Here is how I do it in nasm
:
...
times 510 - ($-$$) db 0
dw 0xAA55
But how can I do it in GNU as
?
Upvotes: 5
Views: 2028
Reputation: 615
After some Google-searching, I figured out how to do it:
_start:
...
/* .fill repeat, size, value */
.fill 510 - (. - _start), 1, 0
.word 0xAA55
Upvotes: 6