repo.or.cz
/
thunix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
release version 0.4
[thunix.git]
/
test
/
boot.s
blob
46e6ce11830da8066f5196f7e47c75c05affed47
1
movw $
0x0
, %
ax
2
movw
%
ax
, %
ds
3
4
movw $str
, %
si
5
call print_str
6
jmp hang
7
8
#
9
# Print the string in SI register
10
#
11
# INPUT: SI = The string to print
12
#
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
25
26
hang
:
27
jmp hang
28
29
str
:
30
.string
"Hello World
\n
"
31
32
.org 0x1fe, 0x90
33
.word 0xaa55
# bootsector flag