source: buchla-68k/alcyon/etwavs.s@ d21fc6f

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 3.2 KB
Line 
1.globl _ebflag
2.globl _ebuf
3.globl _curfet
4.globl _cfetp
5.globl _infetp
6.globl _waveob
7.globl _stccol
8.globl _curwave
9.globl _curvce
10.globl _curwslt
11.globl _wsnmod
12.globl _wdbox
13.globl _dspbuf
14.globl _et_wavs
15.text
16_et_wavs:
17~~et_wavs:
18~n=8
19link R14,#-4
20*line 42
21move _curwave,(sp)
22add #1,(sp)
23move.l #L2,-(sp)
24move.l #_ebuf,-(sp)
25jsr _sprintf
26addq.l #8,sp
27*line 43
28move #1,_ebflag
29*line 45
30clr R0
31bra L1
32L1:unlk R14
33rts
34.globl _ef_wavs
35.text
36_ef_wavs:
37~~ef_wavs:
38~n=8
39link R14,#0
40movem.l R5-R7,-(sp)
41~i=R7
42~tmpval=R6
43*line 60
44clr.b 2+_ebuf
45*line 61
46clr _ebflag
47*line 63
48clr R6
49*line 65
50clr R7
51bra L6
52L7:
53*line 66
54muls #10,R6
55move.l #_ebuf,R8
56move.b 0(R8,R7),R0
57ext.w R0
58add R0,R6
59add #-48,R6
60L5:
61*line 65
62add #1,R7
63L6:
64*line 65
65cmp #2,R7
66blt L7
67L4:
68*line 68
69*line 69
70cmp #20,R6
71bgt L10000
72tst R6
73bne L8
74L10000:*line 69
75move #-1,R0
76bra L3
77*line 70
78L8:
79*line 71
80move _curvce,R8
81add.l R8,R8
82add.l R8,R8
83move _curwslt,R9
84add.l R9,R9
85add.l R9,R8
86add.l #_wsnmod,R8
87move #1,(R8)
88*line 72
89move R6,R0
90sub #1,R0
91move R0,_curwave
92*line 73
93clr R0
94bra L3
95L3:tst.l (sp)+
96movem.l (sp)+,R6-R7
97unlk R14
98rts
99.globl _rd_wavs
100.text
101_rd_wavs:
102~~rd_wavs:
103~nn=8
104link R14,#0
105movem.l R5-R7,-(sp)
106~n=R7
107~cx=R6
108*line 92
109move _curvce,R8
110add.l R8,R8
111add.l R8,R8
112move _curwslt,R9
113add.l R9,R9
114add.l R9,R8
115move.l #_wsnmod,R9
116tst 0(R8,R9.l)
117beq L10001
118move #13,(sp)
119bra L10003
120L10001:move R7,R0
121asl #4,R0
122ext.l R0
123move.l R0,R8
124move.l #_wdbox,R9
125move 8(R8,R9.l),(sp)
126L10003:jsr _exp_c
127move R0,R6
128*line 93
129move 8(R14),R7
130and #255,R7
131*line 95
132move _curwave,(sp)
133add #1,(sp)
134move.l #L10,-(sp)
135move.l #_dspbuf,-(sp)
136jsr _sprintf
137addq.l #8,sp
138*line 97
139clr (sp)
140jsr _vbank
141*line 98
142*line 99
143move #14,(sp)
144move.l #_dspbuf,-(sp)
145move R7,R0
146asl #4,R0
147ext.l R0
148move.l R0,R8
149move.l #_wdbox,R9
150move 14(R8,R9.l),-(sp)
151add #9,(sp)
152move R7,R0
153asl #4,R0
154ext.l R0
155move.l R0,R8
156move.l #_wdbox,R9
157move 12(R8,R9.l),-(sp)
158move R7,R0
159asl #4,R0
160ext.l R0
161move.l R0,R8
162move.l #_wdbox,R9
163move 10(R8,R9.l),-(sp)
164move R6,-(sp)
165move #64,-(sp)
166move.l _waveob,-(sp)
167jsr _vcputsv
168adda.l #18,sp
169*line 101
170clr R0
171bra L9
172L9:tst.l (sp)+
173movem.l (sp)+,R6-R7
174unlk R14
175rts
176.globl _nd_wavs
177.text
178_nd_wavs:
179~~nd_wavs:
180~k=R7
181~nn=8
182link R14,#0
183movem.l R4-R7,-(sp)
184~ec=R6
185~n=R5
186*line 117
187move 10(R14),R7
188*line 117
189move 8(R14),R5
190and #255,R5
191*line 118
192move _stccol,R6
193move.l _cfetp,R8
194move 2(R8),R0
195sub R0,R6
196*line 119
197move R7,R0
198add #48,R0
199move R6,R9
200add.l #_ebuf,R9
201move.b R0,(R9)
202*line 120
203clr.b 2+_ebuf
204*line 122
205move R7,R0
206add #48,R0
207move.b R0,_dspbuf
208*line 123
209clr.b 1+_dspbuf
210*line 125
211clr (sp)
212jsr _vbank
213*line 126
214*line 127
215move #14,(sp)
216move.l #_dspbuf,-(sp)
217move _stccol,-(sp)
218move R5,R0
219asl #4,R0
220ext.l R0
221move.l R0,R8
222move.l #_wdbox,R9
223move 12(R8,R9.l),-(sp)
224move R5,R0
225asl #4,R0
226ext.l R0
227move.l R0,R8
228move.l #_wdbox,R9
229move 10(R8,R9.l),-(sp)
230move #12,-(sp)
231move #64,-(sp)
232move.l _waveob,-(sp)
233jsr _vcputsv
234adda.l #18,sp
235*line 129
236jsr _advwcur
237*line 130
238clr R0
239bra L11
240L11:tst.l (sp)+
241movem.l (sp)+,R5-R7
242unlk R14
243rts
244.data
245L2:.dc.b $25,$30,$32,$64,$0
246L10:.dc.b $25,$30,$32,$64,$0
Note: See TracBrowser for help on using the repository browser.