annotate lib/kreiderclib/atoi.as @ 3295:6b7a7b233925 default tip

makefile: Allow PORTS with level1/2 mix https://sourceforge.net/p/nitros9/feature-requests/10/
author Tormod Volden <debian.tormod@gmail.com>
date Tue, 19 Apr 2022 18:12:17 +0200
parents 1647f1874cdf
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 atoi.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 atoi: pshs u
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
6 ldu 4,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
7 clra
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
8 clrb
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
9 pshs d
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
10 pshs b
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
11 L000a ldb ,u+
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
12 cmpb #$20
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
13 beq L000a
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
14 cmpb #9
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
15 beq L000a
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
16 cmpb #$2d
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
17 bne L001c
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
18 stb ,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
19 bra L0037
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
20 L001c cmpb #$2b
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
21 bne L0039
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
22 bra L0037
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
23 L0022 ldd 1,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
24 lslb
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
25 rola
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
26 lslb
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
27 rola
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
28 addd 1,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
29 lslb
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
30 rola
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
31 pshs d
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
32 ldb -1,u
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
33 clra
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
34 subb #$30
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
35 addd ,s++
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
36 std 1,s
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
37 L0037 ldb ,u+
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
38 L0039 cmpb #$30
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
39 bcs L0041
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
40 cmpb #$39
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
41 bls L0022
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
42 L0041 tst ,s+
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
43 puls d
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
44 beq L004b
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
45 nega
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
46 negb
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
47 sbca #0
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
48 L004b puls u,pc
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
49
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
50 endsect
1647f1874cdf Added Kreidier C library
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
51