[BITS 16]
[ORG 0x7C00]
jmp far start
start:
cli
mov ax,0x9000 ; Put stack segment at 0x9000
mov ss,ax
mov sp,0xffff
sti
xor ax,ax
mov ds,ax
mov es,ax
mov si,loadingmsg
call printmsg
loop: jmp loop
printmsg:
lodsb ; load byte at DS:SI into AL
or al,al ; See if its the last character in the string (0)
jz printmsg_done ; If so, we're done printing
mov ah,0eh ; Use function 0E (put character)
mov bx,0009 ; Attribute
int 0x10 ; Call BIOS
jmp printmsg
printmsg_done:
ret
loadingmsg db 'Hello World!',13,10,13,10
db 'kraz! v0.00.1',0