source: buchla-68k/alcyon/etvel.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.1 KB
Line 
1.globl _ebflag
2.globl _ebuf
3.globl _curfet
4.globl _cfetp
5.globl _infetp
6.globl _io_time
7.globl _io_lcd
8.globl _io_ser
9.globl _io_midi
10.globl _io_disk
11.globl _io_tone
12.globl _io_leds
13.globl _io_kbrd
14.globl _lcd_a0
15.globl _lcd_a1
16.globl _io_vreg
17.globl _io_vraw
18.globl _io_vram
19.globl _io_fpu
20.globl _v_regs
21.globl _v_odtab
22.globl _v_actab
23.globl _v_ct0
24.globl _v_gt1
25.globl _v_score
26.globl _v_cgtab
27.globl _v_curs0
28.globl _v_curs1
29.globl _v_curs2
30.globl _v_curs3
31.globl _v_curs4
32.globl _v_curs5
33.globl _v_curs6
34.globl _v_curs7
35.globl _v_tcur
36.globl _v_kbobj
37.globl _v_lnobj
38.globl _v_win0
39.globl _v_cur
40.globl _fc_sw
41.globl _fc_val
42.globl _ac_code
43.globl _scname
44.globl _se_chg
45.globl _curscor
46.globl _cursect
47.globl _se1_cnt
48.globl _se2_cnt
49.globl _se3_cnt
50.globl _spool
51.globl _pspool
52.globl _spcount
53.globl _frags
54.globl _t_bak
55.globl _t_cur
56.globl _t_ctr
57.globl _t_fwd
58.globl _size1
59.globl _size2
60.globl _size3
61.globl _scores
62.globl _scp
63.globl _seclist
64.globl _hplist
65.globl _p_bak
66.globl _p_cur
67.globl _p_ctr
68.globl _p_fwd
69.globl _obj8
70.globl _recsw
71.globl _stccol
72.globl _grpmode
73.globl _grpstat
74.globl _lastvel
75.globl _et_vel
76.text
77_et_vel:
78~~et_vel:
79~n=8
80link R14,#-4
81*line 43
82move 8(R14),R8
83add.l R8,R8
84move.l #_lastvel,R9
85move 0(R8,R9.l),R0
86ext.l R0
87divs #252,R0
88move R0,(sp)
89move.l #L2,-(sp)
90move.l #_ebuf,-(sp)
91jsr _sprintf
92addq.l #8,sp
93*line 45
94move #1,_ebflag
95*line 46
96clr R0
97bra L1
98L1:unlk R14
99rts
100.globl _ef_vel
101.text
102_ef_vel:
103~~ef_vel:
104~n=8
105link R14,#0
106movem.l R5-R7/R13-R13,-(sp)
107~ival=R7
108~i=R6
109~ep=R13
110*line 65
111clr R7
112*line 67
113clr R6
114bra L6
115L7:
116*line 68
117muls #10,R7
118move.l #_ebuf,R8
119move.b 0(R8,R6),R0
120ext.w R0
121add R0,R7
122add #-48,R7
123L5:
124*line 67
125add #1,R6
126L6:
127*line 67
128cmp #3,R6
129blt L7
130L4:
131*line 70
132clr _ebflag
133*line 72
134*line 73
135cmp #127,R7
136ble L8
137*line 73
138move #-1,R0
139bra L3
140*line 74
141L8:
142*line 75
143muls #252,R7
144and #32736,R7
145*line 77
146*line 77
147tst _recsw
148beq L9
149move 8(R14),R8
150add.l R8,R8
151move.l #_grpstat,R9
152tst 0(R8,R9.l)
153beq L9
154move 8(R14),R8
155add.l R8,R8
156add.l #_grpmode,R8
157cmp #2,(R8)
158bne L9
159*line 78
160*line 79
161move 8(R14),R8
162add.l R8,R8
163add.l #_lastvel,R8
164move R7,(R8)
165*line 80
166move.l _t_cur,(sp)
167move #1,-(sp)
168move.l _p_cur,-(sp)
169jsr _ep_adj
170addq.l #6,sp
171move.l R0,R13
172*line 81
173*line 82
174bra L12
175L11:
176*line 83
177*line 84
178*line 85
179move.b 5(R13),R0
180ext.w R0
181and #127,R0
182cmp #5,R0
183bne L13
184move.b 7(R13),R0
185ext.w R0
186cmp 8(R14),R0
187bne L13
188*line 86
189*line 87
190move R7,16(R13)
191*line 88
192*line 89
193L13:
194*line 90
195move.l 12(R13),R13
196L12:
197*line 91
198move.l (R13),R0
199cmp.l _t_cur,R0
200beq L11
201L10:
202*line 92
203*line 93
204L9:
205*line 94
206clr R0
207bra L3
208L3:tst.l (sp)+
209movem.l (sp)+,R6-R7/R13-R13
210unlk R14
211rts
212.globl _rd_vel
213.text
214_rd_vel:
215~~rd_vel:
216~n=8
217link R14,#-10
218~buf=-6
219*line 112
220move 8(R14),R8
221add.l R8,R8
222move.l #_lastvel,R9
223move 0(R8,R9.l),R0
224ext.l R0
225divs #252,R0
226move R0,(sp)
227move.l #L15,-(sp)
228move.l R14,-(sp)
229sub.l #6,(sp)
230jsr _sprintf
231addq.l #8,sp
232*line 114
233*line 115
234clr R0
235move 10+_v_regs,R0
236and #384,R0
237beq L16
238*line 115
239clr (sp)
240jsr _vbank
241*line 116
242L16:
243*line 117
244move #18,(sp)
245move.l R14,-(sp)
246sub.l #6,(sp)
247move 8(R14),R0
248muls #5,R0
249move R0,-(sp)
250add #6,(sp)
251move #5,-(sp)
252move.l _obj8,-(sp)
253jsr _vputs
254adda.l #12,sp
255*line 119
256clr R0
257bra L14
258L14:unlk R14
259rts
260.globl _nd_vel
261.text
262_nd_vel:
263~~nd_vel:
264~n=R7
265~k=R6
266link R14,#0
267movem.l R4-R7,-(sp)
268~ec=R5
269*line 137
270move 8(R14),R7
271*line 137
272move 10(R14),R6
273*line 137
274move _stccol,R5
275move.l _cfetp,R8
276move 2(R8),R0
277sub R0,R5
278*line 138
279move R6,R0
280add #48,R0
281move R5,R9
282add.l #_ebuf,R9
283move.b R0,(R9)
284*line 140
285*line 141
286clr R0
287move 10+_v_regs,R0
288and #384,R0
289beq L18
290*line 141
291clr (sp)
292jsr _vbank
293*line 142
294L18:
295*line 143
296move #98,(sp)
297move R6,-(sp)
298add #48,(sp)
299move _stccol,-(sp)
300move #5,-(sp)
301move.l _obj8,-(sp)
302jsr _vputc
303adda.l #10,sp
304*line 144
305jsr _advscur
306*line 146
307clr R0
308bra L17
309L17:tst.l (sp)+
310movem.l (sp)+,R5-R7
311unlk R14
312rts
313.data
314L2:.dc.b $25,$30,$33,$64,$0
315L15:.dc.b $25,$30,$33,$64,$0
Note: See TracBrowser for help on using the repository browser.