source: buchla-68k/alcyon/vobjfns.s@ 1d174fb

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 6.0 KB
Line 
1.globl _io_time
2.globl _io_lcd
3.globl _io_ser
4.globl _io_midi
5.globl _io_disk
6.globl _io_tone
7.globl _io_leds
8.globl _io_kbrd
9.globl _lcd_a0
10.globl _lcd_a1
11.globl _io_vreg
12.globl _io_vraw
13.globl _io_vram
14.globl _io_fpu
15.globl _v_regs
16.globl _v_odtab
17.globl _v_actab
18.globl _v_ct0
19.globl _v_gt1
20.globl _v_score
21.globl _v_cgtab
22.globl _v_curs0
23.globl _v_curs1
24.globl _v_curs2
25.globl _v_curs3
26.globl _v_curs4
27.globl _v_curs5
28.globl _v_curs6
29.globl _v_curs7
30.globl _v_tcur
31.globl _v_kbobj
32.globl _v_lnobj
33.globl _v_win0
34.globl _v_cur
35.globl _fc_sw
36.globl _fc_val
37.globl _v_obtab
38.globl _v_curob
39.globl _v_nobj
40.globl _v_obpri
41.globl _wsize
42.comm _wsize,2
43.globl _vi_dis
44.comm _vi_dis,2
45.globl _vi_ctl
46.comm _vi_ctl,2
47.globl _SelObj
48.text
49_SelObj:
50~~SelObj:
51~obj=8
52link R14,#0
53movem.l R6-R7/R13-R13,-(sp)
54~op=R13
55~newbank=R7
56*line 83
57move 8(R14),R0
58muls #18,R0
59move.l R0,R13
60add.l #_v_obtab,R13
61*line 85
62move.b 13(R13),R7
63ext.w R7
64and #1,R7
65lsl #8,R7
66move.b 13(R13),R0
67ext.w R0
68and #2,R0
69asl #6,R0
70or R0,R7
71*line 87
72move 8(R14),_v_nobj
73*line 88
74move.l R13,_v_curob
75*line 89
76move.b 12(R13),R0
77ext.w R0
78move R0,_v_obpri
79*line 91
80*line 92
81clr R0
82move 10+_v_regs,R0
83and #384,R0
84cmp R0,R7
85beq L2
86*line 92
87move.b 13(R13),R0
88ext.w R0
89move R0,(sp)
90and #3,(sp)
91jsr _vbank
92L2:L1:tst.l (sp)+
93movem.l (sp)+,R7-R7/R13-R13
94unlk R14
95rts
96.globl _SetPri
97.text
98_SetPri:
99~~SetPri:
100~obj=R7
101~pri=R6
102link R14,#0
103movem.l R5-R7/R13-R13,-(sp)
104~op=R13
105*line 113
106move 8(R14),R7
107*line 113
108move 10(R14),R6
109*line 113
110*line 114
111clr R0
112move 10+_v_regs,R0
113and #384,R0
114beq L4
115*line 114
116clr (sp)
117jsr _vbank
118*line 115
119L4:
120*line 116
121move R7,R0
122muls #18,R0
123move.l R0,R13
124add.l #_v_obtab,R13
125*line 117
126move.b R6,12(R13)
127*line 119
128clr R0
129move 14(R13),R0
130or #16,R0
131move R6,R1
132asl #3,R1
133ext.l R1
134add.l #_v_odtab,R1
135move.l R1,R9
136move R0,(R9)
137*line 120
138move R6,R0
139asl #3,R0
140ext.l R0
141add.l #_v_odtab,R0
142move.l R0,R8
143move 16(R13),2(R8)
144*line 121
145move.l 8(R13),R0
146asr.l #1,R0
147move R6,R1
148asl #3,R1
149ext.l R1
150add.l #_v_odtab,R1
151move.l R1,R9
152move R0,4(R9)
153*line 123
154move (R13),(sp)
155move 6(R13),-(sp)
156move R6,-(sp)
157jsr _objon
158addq.l #4,sp
159*line 125
160*line 126
161tst _vi_dis
162bne L3
163*line 127
164*line 128
165move #7,(sp)
166jsr _setipl
167*line 130
168move #1,R0
169move R6,R1
170asl R1,R0
171or R0,_vi_ctl
172*line 132
173*line 133
174move.l $64,R0
175cmp.l #_VIint,R0
176beq L5
177*line 133
178move.l #_VIint,(sp)
179move #25,-(sp)
180move #5,-(sp)
181jsr _trap13
182addq.l #4,sp
183*line 134
184L5:
185*line 135
186clr (sp)
187jsr _setipl
188L3:tst.l (sp)+
189movem.l (sp)+,R6-R7/R13-R13
190unlk R14
191rts
192.globl _SetObj
193.text
194_SetObj:
195~~SetObj:
196~obj=8
197~type=10
198~bank=12
199~base=14
200~xpix=18
201~ypix=20
202~x0=22
203~y0=24
204~flags=26
205~pri=28
206link R14,#0
207movem.l R7-R7/R13-R13,-(sp)
208~op=R13
209*line 154
210*line 155
211clr R0
212move 10+_v_regs,R0
213and #384,R0
214beq L7
215*line 155
216clr (sp)
217jsr _vbank
218*line 156
219L7:
220*line 157
221move 8(R14),R0
222muls #18,R0
223move.l R0,R13
224add.l #_v_obtab,R13
225*line 159
226move.l R13,_v_curob
227*line 160
228move 8(R14),_v_nobj
229*line 161
230move 28(R14),_v_obpri
231*line 163
232move 20(R14),(R13)
233*line 164
234move 18(R14),2(R13)
235*line 165
236move 22(R14),4(R13)
237*line 166
238move 24(R14),6(R13)
239*line 167
240move.l 14(R14),8(R13)
241*line 168
242move 28(R14),R0
243move.b R0,12(R13)
244*line 169
245move 12(R14),R0
246and #3,R0
247move.b R0,13(R13)
248*line 173
249*line 173
250tst 10(R14)
251beq L8
252*line 174
253*line 175
254move 26(R14),R0
255and #-1537,R0
256or #-17408,R0
257move R0,14(R13)
258*line 176
259*line 177
260clr R0
261move 14(R13),R0
262and #1536,R0
263bra L10
264*line 178
265L11:
266*line 179
267*line 180
268*line 181
269move 18(R14),R0
270ext.l R0
271divs #128,R0
272move R0,_wsize
273bra L9
274*line 182
275*line 183
276L12:
277*line 184
278*line 185
279*line 186
280move 18(R14),R0
281ext.l R0
282divs #48,R0
283move R0,_wsize
284bra L9
285*line 187
286*line 188
287L13:
288*line 189
289*line 190
290*line 191
291move 18(R14),R0
292ext.l R0
293divs #64,R0
294move R0,_wsize
295bra L9
296*line 192
297*line 193
298L14:
299*line 194
300*line 195
301*line 196
302move 18(R14),R0
303ext.l R0
304divs #96,R0
305move R0,_wsize
306bra L9
307*line 197
308bra L9
309L10:tst R0
310beq L11
311cmp #512,R0
312beq L12
313cmp #1024,R0
314beq L13
315cmp #1536,R0
316beq L14
317bra L9
318L9:
319*line 198
320*line 199
321*line 200
322*line 201
323btst #6,15(R13)
324beq L15
325*line 201
326move _wsize,R0
327asl #1,R0
328add _wsize,R0
329move R0,_wsize
330*line 202
331*line 203
332*line 204
333L15:bra L16
334L8:
335*line 205
336*line 206
337*line 207
338move 26(R14),R0
339and #3639,R0
340move 12(R14),R1
341and #3,R1
342asl #6,R1
343or R1,R0
344move R0,14(R13)
345*line 208
346*line 209
347clr R0
348move 14(R13),R0
349and #1536,R0
350bra L18
351*line 210
352L19:
353*line 211
354L20:
355*line 212
356*line 213
357*line 214
358clr _wsize
359bra L17
360*line 215
361*line 216
362L21:
363*line 217
364*line 218
365*line 219
366move 18(R14),R0
367ext.l R0
368divs #32,R0
369move R0,_wsize
370bra L17
371*line 220
372*line 221
373L22:
374*line 222
375*line 223
376*line 224
377move 18(R14),R0
378ext.l R0
379divs #16,R0
380move R0,_wsize
381bra L17
382*line 225
383bra L17
384L18:tst R0
385beq L19
386cmp #512,R0
387beq L20
388cmp #1024,R0
389beq L21
390cmp #1536,R0
391beq L22
392bra L17
393L17:
394*line 226
395L16:
396*line 229
397move 22(R14),R0
398asr #1,R0
399and #1023,R0
400move _wsize,R1
401move #10,R2
402asl R2,R1
403and #-1024,R1
404or R1,R0
405move R0,16(R13)
406*line 231
407*line 232
408tst 28(R14)
409blt L6
410*line 233
411*line 234
412move 28(R14),(sp)
413move 8(R14),-(sp)
414jsr _SetPri
415addq.l #2,sp
416L6:tst.l (sp)+
417movem.l (sp)+,R13-R13
418unlk R14
419rts
420.globl _CpyObj
421.text
422_CpyObj:
423~~CpyObj:
424~from=R13
425~to=R12
426~w=R7
427~h=R6
428~sw=R5
429link R14,#0
430movem.l R2-R7/R11-R13,-(sp)
431~tp=R11
432~i=R4
433~j=R3
434*line 257
435move.l 8(R14),R13
436*line 257
437move.l 12(R14),R12
438*line 257
439move 16(R14),R7
440*line 257
441move 18(R14),R6
442*line 257
443move 20(R14),R5
444*line 257
445move R6,R4
446bra L26
447L27:
448*line 258
449*line 259
450move.l R12,R11
451*line 260
452*line 261
453move R7,R3
454bra L30
455L31:
456*line 262
457move (R13)+,(R11)+
458L29:L30:
459*line 261
460clr R0
461move R3,R0
462sub #1,R3
463tst R0
464bne L31
465L28:
466*line 262
467*line 263
468*line 264
469clr R0
470move R5,R0
471lsl #1,R0
472swap R0
473clr R0
474swap R0
475add.l R0,R12
476L25:L26:
477*line 257
478clr R0
479move R4,R0
480sub #1,R4
481tst R0
482bne L27
483L24:L23:tst.l (sp)+
484movem.l (sp)+,R3-R7/R11-R13
485unlk R14
486rts
487.data
Note: See TracBrowser for help on using the repository browser.