. service tells you which device it couldn't stat
[minix3.git] / lib / i386 / em / em_print.s
blob8b09b5044a7995db2991fde6ebbacdae99a7ef77
1 .sect .text; .sect .rom; .sect .data; .sect .bss
2 .sect .text
3 .define printc,printd,prints
5 ! argument in eax
6 ! uses ebx
7 prints:
8 xchg eax,ebx
9 1:
10 movb al,(ebx)
11 inc ebx
12 testb al,al
13 jz 2f
14 call printc
15 jmp 1b
17 ret
19 ! argument in eax
20 ! uses ecx and edx
21 printd:
22 xor edx,edx
23 mov ecx,10
24 div ecx
25 test eax,eax
26 jz 1f
27 push edx
28 call printd
29 pop edx
31 xchg eax,edx
32 addb al,'0'
34 ! argument in eax
35 printc:
36 push eax
37 mov ebx,esp
38 mov eax,1
39 push eax
40 push ebx
41 push eax
42 call __write
43 pop ebx
44 pop ebx
45 pop ebx
46 pop ebx
47 ret