Search code examples
assemblyx86bootloaderbiosreboot

Why do the bytes "0xea 0000 ffff" in a bootloader cause the computer to reboot?


I was researching boot loaders and I found this interesting piece of assembly:

;Sends us to the end of the memory
;causing reboot
db 0x0ea
dw 0x0000
dw 0xffff

By the comment I know what it does; sends the computer to the end of memory, but what I can't figure out is how those numbers reboot the computer (x86_64 processor on 16-bit mode).


Solution

  • Those bytes correspond to jmp word 0xffff:0000 (you can see this by assembling with NASM and then disassembling the resulting binary), which happens to be a jump to the x86 reset vector in real mode.