Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;
- ; A boot sector that prints a string using our fuctions.
- ;
- org 07c00h ; Tell the assembler where this code will be loaded
- mov ah, 00eh
- mov bp, 08000h
- mov sp, bp
- mov bx, HELLO_MSG
- call print_string
- jmp $
- print_string:
- mov al, [bx]
- or al, al
- je end
- int 0x10
- inc bx
- jmp print_string
- HELLO_MSG:
- db "Hello, World!"
- ; Padding and magic BIOS number
- end:
- cli
- hlt
- times 510-($-$$) db 0
- dw 0aa55h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement