Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. FASM syntax (replace use16 with BITS 16 if using NASM)
  2. Simple bootloader made by AshlandGaming! <3
  3.  
  4. Using INT 16 (for pause), INT 10 (string printing) and 0xffff:0000 (reboot)
  5.  
  6. To boot on physical hardware (e.g "Acer computers")
  7.  
  8. use16
  9. org 0x7C00
  10.  
  11. jmp Start
  12.  
  13. Start:
  14. mov si, msg
  15. call Print
  16.  
  17. xor ah, ah
  18. int 16h
  19.  
  20. jmp word 0xffff:0000 ; Change word to dword if problems happen
  21.  
  22. Print:
  23. lodsb
  24. cmp al, 0
  25. je Done
  26. mov ah, 0eh
  27. int 10h
  28. jmp Print
  29.  
  30. Done:
  31. ret
  32.  
  33. cli
  34. hlt
  35.  
  36. msg db 'Hello World! Press any key to reboot...', 13, 10, 0
  37.  
  38. times 510-($-$$) db 0
  39. dw 0xAA55
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement