summaryrefslogtreecommitdiff
path: root/boot.asm
diff options
context:
space:
mode:
Diffstat (limited to 'boot.asm')
-rw-r--r--boot.asm21
1 files changed, 21 insertions, 0 deletions
diff --git a/boot.asm b/boot.asm
index ddef7eb..b5c50cb 100644
--- a/boot.asm
+++ b/boot.asm
@@ -1,7 +1,28 @@
; yoinked from osdev.org
+mov ax, 0x07C0
+mov ds, ax
+
+mov si, msg
+cld
+
+ch_loop:
+ lodsb
+ ; hang if at null terminator
+ or al, al
+ jz hang
+
+ ; BIOS interrupt prints al
+ mov ah, 0x0E
+ mov bh, 0
+ int 0x10
+
+ jmp ch_loop
+
hang:
jmp hang
+msg db 'Hello World', 0
+
times 510-($-$$) db 0 ; 2 bytes less now
db 0x55
db 0xAA