29 lines
325 B
NASM
29 lines
325 B
NASM
; 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
|