source: buchla-68k/alcyon/dec2fr.s@ 73dd55f

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 3.4 KB
Line 
1.data
2L1:.dc.l $0
3.dc.l $19A0
4.dc.l $3336
5.dc.l $4CD0
6.dc.l $6668
7.dc.l $8000
8.dc.l $99A0
9.dc.l $B336
10.dc.l $CCCE
11.dc.l $E668
12.dc.l $0
13.dc.l $290
14.dc.l $520
15.dc.l $7B0
16.dc.l $A40
17.dc.l $CD0
18.dc.l $F60
19.dc.l $11F0
20.dc.l $1480
21.dc.l $1710
22.text
23.data
24L2:.dc.l $C350
25.dc.l $61A8
26.dc.l $30D4
27.dc.l $186A
28.dc.l $C35
29.dc.l $61A
30.dc.l $30D
31.dc.l $186
32.dc.l $C3
33.dc.l $61
34.dc.l $30
35.dc.l $18
36.dc.l $C
37.dc.l $6
38.dc.l $3
39.dc.l $1
40.text
41.globl _dec2fr
42.text
43_dec2fr:
44~~dec2fr:
45~s=R13
46link R14,#0
47movem.l R6-R7/R13-R13,-(sp)
48~i=R7
49*line 49
50move.l 8(R14),R13
51*line 49
52*line 49
53cmp.b #49,(R13)
54bne L4
55*line 50
56*line 51
57*line 51
58cmp.b #48,1(R13)
59bne L5
60*line 52
61*line 53
62*line 53
63cmp.b #48,2(R13)
64bne L6
65*line 54
66*line 55
67*line 56
68cmp.b #45,3(R13)
69bne L7
70*line 56
71move #-32768,R0
72bra L3
73*line 57
74bra L8
75L7:
76*line 58
77move #32767,R0
78bra L3
79L8:
80*line 59
81bra L9
82L6:
83*line 60
84*line 61
85*line 62
86move #-1,R0
87bra L3
88L9:
89*line 63
90*line 64
91bra L10
92L5:
93*line 65
94*line 66
95*line 67
96move #-1,R0
97bra L3
98*line 68
99L10:
100*line 69
101*line 70
102*line 71
103*line 72
104*line 73
105bra L11
106L4:
107*line 74
108*line 74
109cmp.b #48,(R13)
110bne L12
111*line 75
112*line 76
113move.b 1(R13),R0
114ext.w R0
115add #-48,R0
116move R0,R8
117add.l R8,R8
118add.l R8,R8
119move.l #L1,R9
120move.l 0(R8,R9.l),R0
121move.b 2(R13),R1
122ext.w R1
123add #-48,R1
124move R1,R9
125add.l R9,R9
126add.l R9,R9
127add.l #L1,R9
128move.l 40(R9),R1
129add.l R1,R0
130asr.l #$1,R0
131move R0,R7
132*line 77
133*line 78
134*line 78
135cmp.b #45,3(R13)
136bne L13
137*line 79
138*line 80
139*line 81
140tst R7
141beq L14
142*line 81
143move R7,R0
144not R0
145bra L3
146*line 82
147bra L15
148L14:
149*line 83
150clr R0
151bra L3
152L15:
153*line 84
154bra L16
155L13:
156*line 85
157*line 86
158*line 87
159move R7,R0
160bra L3
161L16:
162*line 88
163*line 89
164*line 90
165L12:L11:
166*line 91
167move #-1,R0
168bra L3
169L3:tst.l (sp)+
170movem.l (sp)+,R7-R7/R13-R13
171unlk R14
172rts
173.globl _fr2dec
174.text
175_fr2dec:
176~~fr2dec:
177~v=R7
178~s=R13
179link R14,#0
180movem.l R2-R7/R13-R13,-(sp)
181~acc=R6
182~sc=R5
183~i=R4
184~p=R3
185*line 114
186move 8(R14),R7
187*line 114
188move.l 10(R14),R13
189*line 114
190*line 114
191cmp #32767,R7
192bne L18
193*line 115
194*line 116
195move.l #L19,(sp)
196move.l R13,-(sp)
197jsr _sprintf
198addq.l #4,sp
199*line 117
200move.l R13,R0
201bra L17
202*line 118
203*line 119
204L18:
205*line 120
206*line 120
207cmp #-32768,R7
208bne L20
209*line 121
210*line 122
211move.l #L21,(sp)
212move.l R13,-(sp)
213jsr _sprintf
214addq.l #4,sp
215*line 123
216move.l R13,R0
217bra L17
218*line 124
219*line 125
220L20:
221*line 126
222*line 126
223move R7,R0
224and #-32768,R0
225beq L22
226*line 127
227*line 128
228move R7,R0
229not R0
230move R0,R7
231*line 129
232move #45,R3
233*line 130
234bra L23
235L22:
236*line 131
237*line 132
238*line 133
239move #43,R3
240L23:
241*line 136
242clr.l R6
243*line 138
244clr R4
245bra L26
246L27:
247*line 139
248*line 140
249move R7,R0
250move #1,R1
251move #14,R2
252sub R4,R2
253asl R2,R1
254and R1,R0
255beq L28
256*line 140
257move R4,R8
258add.l R8,R8
259add.l R8,R8
260add.l #L2,R8
261move.l (R8),R0
262add.l R0,R6
263*line 141
264L28:L25:
265*line 138
266add #1,R4
267L26:
268*line 138
269cmp #15,R4
270blt L27
271L24:
272*line 142
273move.l #$3e8,R5
274*line 143
275move.l R5,-(sp)
276move.l R6,-(sp)
277jsr ldiv
278addq.l #8,sp
279move.l R0,R6
280*line 144
281move R3,(sp)
282move.l R6,R0
283move R0,-(sp)
284move.l #L29,-(sp)
285move.l R13,-(sp)
286jsr _sprintf
287adda.l #10,sp
288*line 145
289move.l R13,R0
290bra L17
291L17:tst.l (sp)+
292movem.l (sp)+,R3-R7/R13-R13
293unlk R14
294rts
295.data
296L19:.dc.b $31,$30,$30,$2B,$0
297L21:.dc.b $31,$30,$30,$2D,$0
298L29:.dc.b $25,$30,$33,$64,$25,$63,$0
Note: See TracBrowser for help on using the repository browser.