annotate lib/kreiderclib/rand.as @ 2824:1647f1874cdf lwtools-port

Added Kreidier C library
author Boisy Pitre <boisy.pitre@nuance.com>
date Thu, 23 May 2013 05:49:13 -0500 (2013-05-23)
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2824
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
1 * Disassembly by Os9disasm of rand.r
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
2
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
3 * class D external label equates
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
4
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
5 D0000 equ $0000
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
6
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
7 section bss
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
8
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
9 * Initialized Data (class G)
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
10 G0000 fcb $00
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
11 fcb $00
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
12 fcb $00
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
13 fcb $01
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
14
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
15 endsect
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
16
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
17 section code
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
18
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
19 rand: pshs u
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
20 leax G0000,y
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
21 ldd ,x
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
22 ldu 2,x
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
23 pshs d,u
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
24 leax >L003d,pcr
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
25 lbsr _lmul
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
26 ldd ,x
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
27 ldu 2,x
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
28 pshs d,u
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
29 leax >L0041,pcr
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
30 lbsr _ladd
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
31 leau G0000,y
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
32 ldd ,x
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
33 ldx 2,x
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
34 std ,u
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
35 stx 2,u
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
36 anda #$7f
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
37 puls u,pc
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
38 srand: leax G0000,y
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
39 ldd 2,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
40 std 2,x
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
41 clra
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
42 clrb
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
43 std ,x
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
44 rts
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
45 L003d fcb $41
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
46 ldb #$4e
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
47 fcb $6d
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
48 L0041 neg D0000
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
49 leax -7,y
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
50
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
51 endsect
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
52