repo.or.cz
/
pwnd.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add stdio.asm
[pwnd.git]
/
stage2
/
include
/
stdio.asm
blob
a7681515a4c030c70835571a8d541029942d7b24
1
puts:
2
push
si
3
mov
si
,
ax
4
.
loop:
5
mov
al
,[
si
]
6
test
al
,
al
7
jz
.
end
8
call
putc
9
inc
si
10
jmp
.
loop
11
.
end:
12
pop
si
13
xor
ax
,
ax
14
ret
15
16
gets:
17
push
di
18
mov
di
,
ax
19
.
loop:
20
call
getc
21
cmp
al
,
13
22
je
.
end
23
call
putc
24
mov
[
di
],
al
25
inc
di
26
jmp
.
loop
27
.
end:
28
mov
byte
[
di
],
0
29
mov
ax
,
di
30
pop
di
31
ret
32
33
putc:
34
mov
ah
,
0x0e
35
int
0x10
36
xor
ax
,
ax
37
ret
38
39
getc:
40
xor
ax
,
ax
41
int
0x16
42
ret