1: / C library -- long output conversion
2:
3: .globl _locv
4:
5: _locv:
6: mov r5,-(sp)
7: mov sp,r5
8: mov r4,-(sp)
9: mov r3,-(sp)
10: mov r2,-(sp)
11: mov $buf,r4
12: mov 6(r5),r3
13: mov 4(r5),r2
14: bpl 1f
15: neg r2
16: neg r3
17: sbc r2
18: movb $'-,(r4)+
19: 1:
20: jsr pc,1f
21: clrb (r4)+
22: mov $buf,r0
23: mov (sp)+,r2
24: mov (sp)+,r3
25: mov (sp)+,r4
26: mov (sp)+,r5
27: rts pc
28:
29: 1:
30: jsr pc,divid
31: add $'0,r1
32: mov r1,-(sp)
33: ashc $0,r2
34: beq 1f
35: jsr pc,1b
36: 1:
37: movb (sp)+,(r4)+
38: rts pc
39:
40: divid:
41: clr r1
42: mov $32.,r0
43: 1:
44: ashc $1,r2
45: rol r1
46: cmp r1,$10.
47: blo 2f
48: sub $10.,r1
49: inc r3
50: 2:
51: sob r0,1b
52: rts pc
53:
54:
55: .bss
56: buf: .=.+12.
Defined functions
_locv
declared in line
3; defined in line
5; used 12 times
divid
defined in line
40; used 1 times
Defined variables
buf
defined in line
56; used 2 times