bios_hello_world.asm 329 B

12345678910111213141516171819202122
  1. ; Adapted from: http://blog.ackx.net/asm-hello-world-bootloader.html
  2. org 0x7c00
  3. bits 16
  4. xor ax, ax
  5. mov ds, ax
  6. start:
  7. cli
  8. mov si, msg
  9. mov ah, 0x0e
  10. .loop:
  11. lodsb
  12. or al, al
  13. jz halt
  14. int 0x10
  15. jmp .loop
  16. halt:
  17. hlt
  18. msg:
  19. db "hello world", 0
  20. times 510 - ($-$$) db 0
  21. dw 0xaa55