source: buchla-68k/alcyon/glcinit.s@ 4aad7a7

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 6.3 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 _lcdbase
38.comm _lcdbase,2
39.globl _lcdbit
40.comm _lcdbit,2
41.globl _lcdcol
42.comm _lcdcol,2
43.globl _lcdctl1
44.comm _lcdctl1,2
45.globl _lcdctl2
46.comm _lcdctl2,2
47.globl _lcdcurs
48.comm _lcdcurs,2
49.globl _lcdrow
50.comm _lcdrow,2
51.globl _lcdx
52.comm _lcdx,2
53.globl _lcdy
54.comm _lcdy,2
55.globl _glc_is1
56.data
57_glc_is1:
58.dc.b $12
59.dc.b $5
60.dc.b $7
61.dc.b $54
62.dc.b $58
63.dc.b $3F
64.dc.b $55
65.dc.b $0
66.globl _glc_is2
67.data
68_glc_is2:
69.dc.b $0
70.dc.b $0
71.dc.b $3F
72.dc.b $0
73.dc.b $20
74.dc.b $3F
75.dc.b $0
76.dc.b $0
77.globl _GLCdisp
78.text
79_GLCdisp:
80~~GLCdisp:
81~dsp=8
82~crs=10
83~blk1=12
84~blk2=14
85~blk3=16
86link R14,#0
87movem.l R6-R7,-(sp)
88~val=R7
89*line 93
90*line 94
91move 16(R14),R7
92and #3,R7
93asl #6,R7
94move 14(R14),R0
95and #3,R0
96asl #4,R0
97or R0,R7
98move 12(R14),R0
99and #3,R0
100asl #2,R0
101or R0,R7
102move 10(R14),R0
103and #3,R0
104or R0,R7
105*line 96
106move #88,R0
107ext.w R0
108move 8(R14),R1
109and #1,R1
110or R1,R0
111move R0,_lcdctl1
112*line 97
113move R7,_lcdctl2
114*line 99
115clr R0
116move _lcdctl1,R0
117move.b R0,_lcd_a1
118*line 100
119clr R0
120move _lcdctl2,R0
121move.b R0,_lcd_a0
122L1:tst.l (sp)+
123movem.l (sp)+,R7-R7
124unlk R14
125rts
126.globl _GLCcurs
127.text
128_GLCcurs:
129~~GLCcurs:
130~crs=8
131link R14,#-4
132*line 113
133move 8(R14),R0
134and #3,R0
135clr R1
136move _lcdctl2,R1
137and #-4,R1
138or R1,R0
139move R0,_lcdctl2
140*line 115
141clr R0
142move _lcdctl1,R0
143move.b R0,_lcd_a1
144*line 116
145clr R0
146move _lcdctl2,R0
147move.b R0,_lcd_a0
148L2:unlk R14
149rts
150.globl _GLCinit
151.text
152_GLCinit:
153~~GLCinit:
154link R14,#0
155movem.l R5-R7/R13-R13,-(sp)
156~i=R7
157~ic=R6
158~gp=R13
159*line 135
160move #8192,_lcdbase
161*line 136
162clr _lcdx
163*line 137
164clr _lcdy
165*line 138
166move #1,_lcdbit
167*line 140
168clr _lcdrow
169*line 141
170clr _lcdcol
171*line 143
172move #88,R0
173ext.w R0
174move R0,_lcdctl1
175*line 144
176clr _lcdctl2
177*line 146
178move #64,R0
179ext.w R0
180move.b R0,_lcd_a1
181*line 147
182move.l #_glc_is1,R13
183*line 149
184clr R7
185bra L6
186L7:
187*line 150
188move.b (R13)+,_lcd_a0
189L5:
190*line 149
191add #1,R7
192L6:
193*line 149
194cmp #8,R7
195blt L7
196L4:
197*line 152
198move #68,R0
199ext.w R0
200move.b R0,_lcd_a1
201*line 153
202move.l #_glc_is2,R13
203*line 155
204clr R7
205bra L10
206L11:
207*line 156
208move.b (R13)+,_lcd_a0
209L9:
210*line 155
211add #1,R7
212L10:
213*line 155
214cmp #8,R7
215blt L11
216L8:
217*line 158
218move #90,R0
219ext.w R0
220move.b R0,_lcd_a1
221*line 159
222clr.b _lcd_a0
223*line 161
224move #91,R0
225ext.w R0
226move.b R0,_lcd_a1
227*line 162
228move.b #8,_lcd_a0
229*line 164
230clr (sp)
231move #1,-(sp)
232move #1,-(sp)
233move #2,-(sp)
234clr -(sp)
235jsr _GLCdisp
236addq.l #8,sp
237*line 168
238move #70,R0
239ext.w R0
240move.b R0,_lcd_a1
241*line 169
242clr.b _lcd_a0
243*line 170
244clr.b _lcd_a0
245*line 172
246move #76,R0
247ext.w R0
248move.b R0,_lcd_a1
249*line 174
250move #66,R0
251ext.w R0
252move.b R0,_lcd_a1
253*line 176
254clr.l R6
255bra L14
256L15:
257*line 177
258clr.b _lcd_a0
259L13:
260*line 176
261add.l #$1,R6
262L14:
263*line 176
264cmp.l #$10000,R6
265blt L15
266L12:
267*line 179
268move #70,R0
269ext.w R0
270move.b R0,_lcd_a1
271*line 180
272clr.b _lcd_a0
273*line 181
274clr.b _lcd_a0
275*line 183
276move #93,R0
277ext.w R0
278move.b R0,_lcd_a1
279*line 184
280move.b #4,_lcd_a0
281*line 185
282move.b #6,_lcd_a0
283*line 189
284clr (sp)
285move #1,-(sp)
286move #1,-(sp)
287move #2,-(sp)
288move #1,-(sp)
289jsr _GLCdisp
290addq.l #8,sp
291L3:tst.l (sp)+
292movem.l (sp)+,R6-R7/R13-R13
293unlk R14
294rts
295.globl _GLCcrc
296.text
297_GLCcrc:
298~~GLCcrc:
299~row=8
300~col=10
301link R14,#-6
302~curad=-2
303*line 209
304clr R0
305move 8(R14),R0
306mulu #85,R0
307add 10(R14),R0
308move R0,-2(R14)
309*line 211
310move #70,R0
311ext.w R0
312move.b R0,_lcd_a1
313*line 212
314clr R0
315move -2(R14),R0
316and #255,R0
317move.b R0,_lcd_a0
318*line 213
319clr R0
320move -2(R14),R0
321lsr #8,R0
322and #255,R0
323move.b R0,_lcd_a0
324*line 215
325move 8(R14),_lcdrow
326*line 216
327move 10(R14),_lcdcol
328*line 218
329clr R0
330move -2(R14),R0
331bra L16
332L16:unlk R14
333rts
334.globl _GLCcxy
335.text
336_GLCcxy:
337~~GLCcxy:
338~x=R7
339~y=R6
340link R14,#0
341movem.l R3-R7,-(sp)
342~curad=R5
343~xby6=R4
344*line 242
345move 8(R14),R7
346*line 242
347move 10(R14),R6
348*line 242
349move R7,R4
350clr.l R0
351move R4,R0
352divu #6,R0
353swap R0
354move R0,R4
355*line 243
356move #63,R5
357sub R6,R5
358mulu #85,R5
359clr.l R0
360move R7,R0
361divu #6,R0
362add R0,R5
363clr R0
364move R4,R0
365lsr #3,R0
366add R0,R5
367add _lcdbase,R5
368*line 244
369move R5,_lcdcurs
370*line 248
371move #70,R0
372ext.w R0
373move.b R0,_lcd_a1
374*line 249
375clr R0
376move R5,R0
377and #255,R0
378move.b R0,_lcd_a0
379*line 250
380clr R0
381move R5,R0
382lsr #8,R0
383and #255,R0
384move.b R0,_lcd_a0
385*line 254
386move R7,_lcdx
387*line 255
388move R6,_lcdy
389*line 259
390move #1,R0
391clr R1
392move R4,R1
393and #7,R1
394asl R1,R0
395move R0,_lcdbit
396*line 261
397clr R0
398move _lcdbit,R0
399bra L17
400L17:tst.l (sp)+
401movem.l (sp)+,R4-R7
402unlk R14
403rts
404.globl _GLCwrts
405.text
406_GLCwrts:
407~~GLCwrts:
408~s=R13
409link R14,#0
410movem.l R7-R7/R13-R13,-(sp)
411*line 280
412move.l 8(R14),R13
413*line 280
414move #76,R0
415ext.w R0
416move.b R0,_lcd_a1
417*line 282
418move #66,R0
419ext.w R0
420move.b R0,_lcd_a1
421*line 284
422bra L21
423L20:
424*line 285
425*line 286
426move.b (R13)+,_lcd_a0
427*line 287
428add #1,_lcdcol
429L21:
430*line 288
431tst.b (R13)
432bne L20
433L19:L18:tst.l (sp)+
434movem.l (sp)+,R13-R13
435unlk R14
436rts
437.globl _GLCtext
438.text
439_GLCtext:
440~~GLCtext:
441~row=R7
442~col=R6
443~s=R13
444link R14,#0
445movem.l R4-R7/R13-R13,-(sp)
446~curad=R5
447*line 310
448move 8(R14),R7
449*line 310
450move 10(R14),R6
451*line 310
452move.l 12(R14),R13
453*line 310
454move R6,R5
455clr R0
456move R7,R0
457mulu #85,R0
458add R0,R5
459*line 312
460move #70,R0
461ext.w R0
462move.b R0,_lcd_a1
463*line 313
464clr R0
465move R5,R0
466and #255,R0
467move.b R0,_lcd_a0
468*line 314
469clr R0
470move R5,R0
471lsr #8,R0
472and #255,R0
473move.b R0,_lcd_a0
474*line 316
475move R7,_lcdrow
476*line 317
477move R6,_lcdcol
478*line 319
479move #76,R0
480ext.w R0
481move.b R0,_lcd_a1
482*line 321
483move #66,R0
484ext.w R0
485move.b R0,_lcd_a1
486*line 323
487bra L25
488L24:
489*line 324
490*line 325
491move.b (R13)+,_lcd_a0
492*line 326
493add #1,_lcdcol
494L25:
495*line 327
496tst.b (R13)
497bne L24
498L23:L22:tst.l (sp)+
499movem.l (sp)+,R5-R7/R13-R13
500unlk R14
501rts
502.data
Note: See TracBrowser for help on using the repository browser.