Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FASM syntax (replace use16 with BITS 16 if using NASM)
- Simple bootloader made by AshlandGaming! <3
- Using INT 16 (for pause), INT 10 (string printing) and 0xffff:0000 (reboot)
- To boot on physical hardware (e.g "Acer computers")
- use16
- org 0x7C00
- jmp Start
- Start:
- mov si, msg
- call Print
- xor ah, ah
- int 16h
- jmp word 0xffff:0000 ; Change word to dword if problems happen
- Print:
- lodsb
- cmp al, 0
- je Done
- mov ah, 0eh
- int 10h
- jmp Print
- Done:
- ret
- cli
- hlt
- msg db 'Hello World! Press any key to reboot...', 13, 10, 0
- times 510-($-$$) db 0
- dw 0xAA55
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement