annotate lib/kreiderclib/xtoa.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
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 xtoa.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 section code
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 utoa: clra
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
6 clrb
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
7 pshs d,u
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
8 ldu 8,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
9 bra L0018
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
10 itoa: clra
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
11 clrb
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
12 pshs d,u
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
13 ldu 8,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
14 tst 6,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
15 bpl L0018
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
16 inc ,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
17 subd 6,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
18 std 6,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
19 L0018 ldd 6,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
20 pshs d
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
21 ldd #$000a
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
22 lbsr ccumod
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
23 addb #$30
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
24 stb ,u+
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
25 ldd 6,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
26 pshs d
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
27 ldd #$000a
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
28 lbsr ccudiv
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
29 std 6,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
30 bgt L0018
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
31 tst ,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
32 beq L003c
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
33 ldb #$2d
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
34 stb ,u+
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
35 L003c clr ,u
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
36 ldd 8,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
37 pshs d
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
38 lbsr reverse
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
39 leas 4,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
40 puls u,pc
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
41
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
42 endsect
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
43