source: buchla-68k/alcyon/atol.s@ 60288f5

Last change on this file since 60288f5 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 862 bytes
Line 
1.globl ___atab
2.globl _atol
3.text
4_atol:
5~~atol:
6~cp=R13
7link R14,#0
8movem.l R5-R7/R13-R13,-(sp)
9~n=R7
10~sign=R6
11*line 18
12move.l 8(R14),R13
13*line 18
14clr R6
15*line 20
16*line 20
17cmp.b #45,(R13)
18bne L2
19*line 21
20*line 22
21add.l #1,R13
22*line 23
23move #1,R6
24*line 24
25bra L3
26L2:
27*line 25
28*line 26
29*line 27
30*line 28
31cmp.b #43,(R13)
32bne L4
33*line 28
34add.l #1,R13
35L4:L3:
36*line 31
37clr.l R7
38bra L7
39L8:
40*line 32
41move.l #$a,-(sp)
42move.l R7,-(sp)
43jsr lmul
44addq.l #8,sp
45move.l R0,R7
46move.b (R13)+,R0
47ext.w R0
48ext.l R0
49add.l R0,R7
50add.l #$ffffffd0,R7
51L6:L7:
52*line 31
53move.b (R13),R0
54ext.w R0
55ext.l R0
56add.l #___atab,R0
57move.l R0,R8
58btst #2,(R8)
59bne L8
60L5:
61*line 34
62tst R6
63beq L10000
64move.l R7,R0
65neg.l R0
66bra L10002
67L10000:move.l R7,R0
68L10002:bra L1
69L1:tst.l (sp)+
70movem.l (sp)+,R6-R7/R13-R13
71unlk R14
72rts
73.data
Note: See TracBrowser for help on using the repository browser.