Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- rm temp.s
- touch temp.s
- cpp boot.s >> temp.s
- as -o boot.o temp.s
- ld -o boot.bin --oformat binary boot.o
- qemu-system-x86_64 boot.bin
- */
- #define vidcall int $0x10
- #define kb int $0x16
- .code16
- .section .data
- .ascii "Hello world"
- .section .text
- .globl _start
- _start:
- movb $0x9,%ah
- movb $0x9,%bl
- movb $1,%cx
- vidcall
- movb $0x0,%ah
- kb
- jmp _start
- cli
- hlt
- .fill 510-(.-_start), 1, 0
- .word 0xAA55
Advertisement
Add Comment
Please, Sign In to add comment