source: trunk/minix/lib/i386/em/em_print.s@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 532 bytes
Line 
1.sect .text; .sect .rom; .sect .data; .sect .bss
2.sect .text
3.define printc,printd,prints
4
5 ! argument in eax
6 ! uses ebx
7prints:
8 xchg eax,ebx
91:
10 movb al,(ebx)
11 inc ebx
12 testb al,al
13 jz 2f
14 call printc
15 jmp 1b
162:
17 ret
18
19 ! argument in eax
20 ! uses ecx and edx
21printd:
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
301:
31 xchg eax,edx
32 addb al,'0'
33
34 ! argument in eax
35printc:
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
Note: See TracBrowser for help on using the repository browser.