1: .globl pow, _pow
2: .globl log, exp
3:
4: _pow:
5: mov r5,-(sp)
6: mov sp,r5
7: movf 4(r5),fr0
8: movf 12.(r5),fr1
9: jsr pc,pow
10: mov (sp)+,r5
11: rts pc
12:
13: pow:
14:
15: / 0^0~ is 0
16:
17: tstf fr0
18: cfcc
19: bne 1f
20: tstf fr1
21: cfcc
22: beq bad
23: rts pc
24: 1:
25:
26: / -^i is +^i fixed sign
27:
28: bpl 1f
29: movf fr1,-(sp)
30: modf $one,fr1
31: cfcc
32: bne bad1
33: movf (sp)+,fr1
34: absf fr0
35: jsr pc,1f
36: bes bad
37: movf fr1,-(sp)
38: modf $half,fr1
39: cfcc
40: beq 2f
41: negf fr0
42: 2:
43: movf (sp)+,fr1
44: rts pc
45: 1:
46: jsr pc,log
47: bes 1f
48: mulf fr1,fr0
49: jsr pc,exp
50: 1:
51: rts pc
52:
53: bad1:
54: movf (sp)+,fr1
55: bad:
56: sec
57: rts pc
58:
59: one = 40200
60: half = 40000
Defined functions
_pow
declared in line
1; defined in line
4; used 3 times
bad
defined in line
55; used 2 times
bad1
defined in line
53; used 1 times
half
defined in line
60; used 1 times
one
defined in line
59; used 1 times
pow
declared in line
1; defined in line
13; used 4 times