1
0

boot_sect_main.asm 550 B

12345678910111213141516171819202122232425262728293031323334
  1. [org 0x7c00] ; tell the assembler that our offset is bootsector code
  2. ; The main routine makes sure the parameters are ready and then calls the function
  3. mov bx, HELLO
  4. call print
  5. call print_nl
  6. mov bx, GOODBYE
  7. call print
  8. call print_nl
  9. mov dx, 0x12fe
  10. call print_hex
  11. ; that's it! we can hang now
  12. jmp $
  13. ; remember to include subroutines below the hang
  14. %include "boot_sect_print.asm"
  15. %include "boot_sect_print_hex.asm"
  16. ; data
  17. HELLO:
  18. db 'Hello, World', 0
  19. GOODBYE:
  20. db 'Goodbye', 0
  21. ; padding and magic number
  22. times 510-($-$$) db 0
  23. dw 0xaa55