Created
January 15, 2016 09:34
-
-
Save pinglunliao/28006856afc3c4c58b31 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.text | |
.globl start | |
.code16 | |
start: | |
movb $0xE, %ah # write character in text mode for int 10h | |
movb $'H', %al # write 'H', 'o', 'l', 'a', 'n', ' ', 'w', 'o', 'r', 'l', 'd' | |
int $0x10 | |
movb $'o', %al | |
int $0x10 | |
movb $'l', %al | |
int $0x10 | |
movb $'a', %al | |
int $0x10 | |
movb $'n', %al | |
int $0x10 | |
movb $' ', %al | |
int $0x10 | |
movb $'w', %al | |
int $0x10 | |
movb $'o', %al | |
int $0x10 | |
movb $'r', %al | |
int $0x10 | |
movb $'l', %al | |
int $0x10 | |
movb $'d', %al | |
int $0x10 | |
ret | |
# Fill NOP instruction (opcde = 0x90) till base offset 0x1FE. | |
.org 0x1FE, 0x90 | |
# This indicates boot disk | |
boot_flag: .word 0xAA55 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment