source: buchla-68k/alcyon/ettval.s@ 4810254

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 4.8 KB
Line 
1.globl _ebflag
2.globl _ebuf
3.globl _curfet
4.globl _cfetp
5.globl _infetp
6.globl _tunob
7.globl _stcrow
8.globl _stccol
9.globl _tunval
10.globl _tunmod
11.globl _tdbox
12.globl _dspbuf
13.globl _modtun
14.text
15_modtun:
16~~modtun:
17link R14,#-4
18*line 37
19*line 37
20tst _tunmod
21bne L2
22*line 38
23*line 39
24move #1,_tunmod
25*line 40
26move #6,(sp)
27jsr _tdswin
28*line 41
29L2:L1:unlk R14
30rts
31.globl _et_tval
32.text
33_et_tval:
34~~et_tval:
35~n=8
36link R14,#0
37movem.l R5-R7,-(sp)
38~tv=R7
39~ts=R6
40*line 60
41tst _tunval
42bge L10000
43move _tunval,R0
44neg R0
45bra L10002
46L10000:move _tunval,R0
47L10002:move R0,R7
48asr R7
49*line 61
50tst _tunval
51bge L10003
52move #45,R0
53bra L10005
54L10003:move #43,R0
55L10005:move.b R0,R6
56*line 63
57move R7,(sp)
58move.b R6,R0
59ext.w R0
60move R0,-(sp)
61move.l #L4,-(sp)
62move.l #_ebuf,-(sp)
63jsr _sprintf
64adda.l #10,sp
65*line 64
66move #1,_ebflag
67*line 66
68clr R0
69bra L3
70L3:tst.l (sp)+
71movem.l (sp)+,R6-R7
72unlk R14
73rts
74.globl _ef_tval
75.text
76_ef_tval:
77~~ef_tval:
78~n=8
79link R14,#0
80movem.l R3-R7/R13-R13,-(sp)
81~ov=R13
82~i=R7
83~tmpval=R6
84~tv=R5
85~ts=R4
86*line 86
87clr.b 5+_ebuf
88*line 87
89clr _ebflag
90*line 89
91clr R6
92*line 91
93move #1,R7
94bra L8
95L9:
96*line 92
97muls #10,R6
98move.l #_ebuf,R8
99move.b 0(R8,R7),R0
100ext.w R0
101add R0,R6
102add #-48,R6
103L7:
104*line 91
105add #1,R7
106L8:
107*line 91
108cmp #5,R7
109blt L9
110L6:
111*line 94
112*line 95
113cmp.b #45,_ebuf
114bne L10
115*line 95
116move R6,R0
117neg R0
118asl #1,R0
119move R0,_tunval
120*line 96
121bra L11
122L10:
123*line 97
124move R6,R0
125asl #1,R0
126move R0,_tunval
127L11:
128*line 99
129tst _tunval
130bge L10006
131move _tunval,R0
132neg R0
133bra L10008
134L10006:move _tunval,R0
135L10008:move R0,R5
136asr R5
137*line 100
138tst _tunval
139bge L10009
140move #45,R0
141bra L10011
142L10009:move #43,R0
143L10011:move.b R0,R4
144*line 101
145move R5,(sp)
146move.b R4,R0
147ext.w R0
148move R0,-(sp)
149move.l #L12,-(sp)
150move.l #_dspbuf,-(sp)
151jsr _sprintf
152adda.l #10,sp
153*line 103
154clr (sp)
155jsr _vbank
156*line 104
157move #14,(sp)
158move.l #_dspbuf,-(sp)
159move #54,-(sp)
160move #18,-(sp)
161move 8(R14),R0
162asl #4,R0
163ext.l R0
164move.l R0,R8
165move.l #_tdbox,R9
166move 10(R8,R9.l),-(sp)
167move 8(R14),R0
168asl #4,R0
169ext.l R0
170move.l R0,R8
171move.l #_tdbox,R9
172move 8(R8,R9.l),-(sp)
173move #64,-(sp)
174move.l _tunob,-(sp)
175jsr _vcputsv
176adda.l #18,sp
177*line 106
178jsr _modtun
179*line 107
180clr R0
181bra L5
182L5:tst.l (sp)+
183movem.l (sp)+,R4-R7/R13-R13
184unlk R14
185rts
186.globl _rd_tval
187.text
188_rd_tval:
189~~rd_tval:
190~nn=8
191link R14,#0
192movem.l R4-R7,-(sp)
193~tv=R7
194~n=R6
195~ts=R5
196*line 126
197move 8(R14),R6
198and #255,R6
199*line 128
200tst _tunval
201bge L10012
202move _tunval,R0
203neg R0
204bra L10014
205L10012:move _tunval,R0
206L10014:move R0,R7
207asr R7
208*line 129
209tst _tunval
210bge L10015
211move #45,R0
212bra L10017
213L10015:move #43,R0
214L10017:move.b R0,R5
215*line 131
216move R7,(sp)
217move.b R5,R0
218ext.w R0
219move R0,-(sp)
220move.l #L14,-(sp)
221move.l #_dspbuf,-(sp)
222jsr _sprintf
223adda.l #10,sp
224*line 133
225clr (sp)
226jsr _vbank
227*line 134
228move #14,(sp)
229move.l #_dspbuf,-(sp)
230move #54,-(sp)
231move #18,-(sp)
232move R6,R0
233asl #4,R0
234ext.l R0
235move.l R0,R8
236move.l #_tdbox,R9
237move 10(R8,R9.l),-(sp)
238move R6,R0
239asl #4,R0
240ext.l R0
241move.l R0,R8
242move.l #_tdbox,R9
243move 8(R8,R9.l),-(sp)
244move #64,-(sp)
245move.l _tunob,-(sp)
246jsr _vcputsv
247adda.l #18,sp
248*line 135
249clr R0
250bra L13
251L13:tst.l (sp)+
252movem.l (sp)+,R5-R7
253unlk R14
254rts
255.globl _nd_tval
256.text
257_nd_tval:
258~~nd_tval:
259~k=R7
260~nn=8
261link R14,#0
262movem.l R4-R7,-(sp)
263~ec=R6
264~n=R5
265*line 154
266move 10(R14),R7
267*line 154
268move 8(R14),R5
269and #255,R5
270*line 155
271move _stccol,R6
272move.l _cfetp,R8
273move 2(R8),R0
274sub R0,R6
275*line 157
276*line 157
277tst R6
278bne L16
279*line 158
280*line 159
281*line 159
282cmp #8,R7
283bne L17
284*line 160
285*line 161
286move.b #45,_ebuf
287*line 162
288clr.b 5+_ebuf
289*line 163
290*line 164
291move.b #45,_dspbuf
292*line 165
293clr.b 1+_dspbuf
294*line 166
295bra L18
296L17:
297*line 167
298*line 167
299cmp #9,R7
300bne L19
301*line 168
302*line 169
303move.b #43,_ebuf
304*line 170
305clr.b 5+_ebuf
306*line 171
307*line 172
308move.b #43,_dspbuf
309*line 173
310clr.b 1+_dspbuf
311*line 174
312bra L20
313L19:
314*line 175
315*line 176
316*line 177
317move #-1,R0
318bra L15
319L20:L18:
320*line 178
321*line 179
322*line 180
323bra L21
324L16:
325*line 181
326*line 182
327*line 183
328move R7,R0
329add #48,R0
330move R6,R9
331add.l #_ebuf,R9
332move.b R0,(R9)
333*line 184
334clr.b 5+_ebuf
335*line 185
336*line 186
337move R7,R0
338add #48,R0
339move.b R0,_dspbuf
340*line 187
341clr.b 1+_dspbuf
342L21:
343*line 190
344clr (sp)
345jsr _vbank
346*line 191
347move #14,(sp)
348move.l #_dspbuf,-(sp)
349move _stccol,-(sp)
350move _stcrow,-(sp)
351move R5,R0
352asl #4,R0
353ext.l R0
354move.l R0,R8
355move.l #_tdbox,R9
356move 10(R8,R9.l),-(sp)
357move #12,-(sp)
358move #64,-(sp)
359move.l _tunob,-(sp)
360jsr _vcputsv
361adda.l #18,sp
362*line 193
363jsr _advtcur
364*line 194
365clr R0
366bra L15
367L15:tst.l (sp)+
368movem.l (sp)+,R5-R7
369unlk R14
370rts
371.data
372L4:.dc.b $25,$63,$25,$30,$34,$64,$0
373L12:.dc.b $56,$61,$6C,$20,$25,$63,$25,$30,$34,$64,$0
374L14:.dc.b $56,$61,$6C,$20,$25,$63,$25,$30,$34,$64,$0
Note: See TracBrowser for help on using the repository browser.