1

I have this boot sector:

mov ah, 0x0e ; tty mode
mov al, 'H'
int 0x10
mov al, 'e'
int 0x10
mov al, 'l'
int 0x10
int 0x10
mov al, 'o'
int 0x10

jmp $ ; jump to current address = infinite loop

; padding and magic number
times 510 - ($-$$) db 0
dw 0xaa55

I compiled it with: nasm -f bin boot.asm -o boot.bin

And I ran it with qemu-system-x86_64 ./boot.bin

It worked fine, but when I flashed it on USB with etcher boot.bin, it didn't boot on my computer. My architecture is x86_64.

How can I fix it?

Michael Petch
  • 46,082
  • 8
  • 107
  • 198
ondralukes
  • 11
  • 1
  • Chances are you need a BPB. Can't find the duplicate, in the meantime here is a [related post](https://stackoverflow.com/q/36297690/547981). EDIT: Here is a [duplicate](https://stackoverflow.com/a/42144059/547981). See if that helps. If yes, I will close this question. – Jester Feb 21 '19 at 18:56
  • Yes, it worked! Thanks a lot, you saved me a lot of time. – ondralukes Feb 21 '19 at 19:15

0 Answers0