source: buchla-68k/alcyon/etwhrv.s@ 7fcfade

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