source: buchla-68k/alcyon/etitim.s@ dade7a0

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