1: / random fixed point number generator
2:
3: .globl rand, srand
4: .globl _rand, _srand
5:
6: _srand:
7: mov 2(sp),ranx
8: rts pc
9:
10: srand:
11: mov r0,ranx
12: rts pc
13:
14: _rand:
15: rand:
16: mov r1,-(sp)
17: mov ranx,r1
18: mpy $13077.,r1
19: add $6925.,r1
20: mov r1,r0
21: mov r0,ranx
22: bic $100000,r0
23: mov (sp)+,r1
24: rts pc
25:
26: .data
27: ranx: 1
Defined functions
_rand
declared in line
4; defined in line
14; used 1 times
_srand
declared in line
4; defined in line
6; used 1 times
rand
declared in line
3; defined in line
15; used 3 times
srand
declared in line
3; defined in line
10; used 4 times
Defined variables
ranx
defined in line
27; used 4 times