release version 0.4
[thunix.git] / test / boot.s
blob46e6ce11830da8066f5196f7e47c75c05affed47
1 movw $0x0, %ax
2 movw %ax, %ds
4 movw $str, %si
5 call print_str
6 jmp hang
9 # Print the string in SI register
11 # INPUT: SI = The string to print
13 print_str:
14 movb $0x0e, %ah
15 movb $0x0f, %bh
16 movb $0x00, %bl
17 .next_char:
18 lodsb
19 or %al, %al
20 jz .ret
21 int $0x10
22 jmp .next_char
23 .ret:
24 ret
26 hang:
27 jmp hang
29 str:
30 .string "Hello World\n"
32 .org 0x1fe, 0x90
33 .word 0xaa55 # bootsector flag