source: buchla-68k/alcyon/ctcpos.s@ 58ff1a9

Last change on this file since 58ff1a9 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 _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 _stmptr
38.globl _defptr
39.globl _patches
40.globl _defents
41.globl _seqtab
42.globl _seqflag
43.globl _seqline
44.globl _seqstim
45.globl _seqtime
46.globl _sregval
47.globl _trstate
48.globl _ctcsw
49.comm _ctcsw,2
50.globl _CurLine
51.globl _cxval
52.globl _cyval
53.globl _stcrow
54.globl _stccol
55.globl _vtcrow
56.globl _vtccol
57.globl _obj9
58.globl _obj11
59.globl _mtcoldc
60.comm _mtcoldc,2
61.globl _mtcoldr
62.comm _mtcoldr,2
63.globl _ctcpos
64.text
65_ctcpos:
66~~ctcpos:
67~row=R7
68~col=R6
69link R14,#0
70movem.l R4-R7,-(sp)
71~nrow=R5
72*line 44
73move 8(R14),R7
74*line 44
75move 10(R14),R6
76*line 44
77*line 44
78tst _ctcsw
79beq L2
80*line 45
81*line 46
82*line 47
83clr R0
84move 10+_v_regs,R0
85and #384,R0
86beq L3
87*line 47
88clr (sp)
89jsr _vbank
90*line 48
91L3:
92*line 49
93move _CurLine,R5
94add #7,R5
95*line 50
96*line 51
97*line 52
98cmp #9,_stcrow
99bne L4
100*line 52
101move #48,(sp)
102move #256,-(sp)
103move _stccol,-(sp)
104move R5,-(sp)
105move.l _obj9,-(sp)
106jsr _vclrav
107adda.l #10,sp
108*line 53
109L4:
110*line 54
111*line 55
112cmp #9,R7
113bne L5
114*line 55
115move #48,(sp)
116move #256,-(sp)
117move R6,-(sp)
118move R5,-(sp)
119move.l _obj9,-(sp)
120jsr _vsetav
121adda.l #10,sp
122L5:
123*line 56
124*line 57
125L2:
126*line 58
127move R7,_stcrow
128*line 59
129move R6,_stccol
130L1:tst.l (sp)+
131movem.l (sp)+,R5-R7
132unlk R14
133rts
134.globl _ctcoff
135.text
136_ctcoff:
137~~ctcoff:
138link R14,#-4
139*line 73
140*line 74
141clr R0
142move 10+_v_regs,R0
143and #384,R0
144beq L7
145*line 74
146clr (sp)
147jsr _vbank
148*line 75
149L7:
150*line 76
151*line 77
152cmp #9,_stcrow
153bne L8
154*line 77
155move #48,(sp)
156move #256,-(sp)
157move _stccol,-(sp)
158move _CurLine,-(sp)
159add #7,(sp)
160move.l _obj9,-(sp)
161jsr _vclrav
162adda.l #10,sp
163*line 78
164L8:
165*line 79
166clr _ctcsw
167L6:unlk R14
168rts
169.globl _ctcon
170.text
171_ctcon:
172~~ctcon:
173link R14,#-4
174*line 90
175*line 91
176clr R0
177move 10+_v_regs,R0
178and #384,R0
179beq L10
180*line 91
181clr (sp)
182jsr _vbank
183*line 92
184L10:
185*line 93
186*line 93
187cmp #9,_stcrow
188bne L11
189*line 94
190*line 95
191move #1,_ctcsw
192*line 96
193move #48,(sp)
194move #256,-(sp)
195move _stccol,-(sp)
196move _CurLine,-(sp)
197add #7,(sp)
198move.l _obj9,-(sp)
199jsr _vsetav
200adda.l #10,sp
201*line 97
202L11:L9:unlk R14
203rts
204.globl _mtcpos
205.text
206_mtcpos:
207~~mtcpos:
208~row=R7
209~col=R6
210link R14,#0
211movem.l R5-R7,-(sp)
212*line 112
213move 8(R14),R7
214*line 112
215move 10(R14),R6
216*line 112
217*line 113
218clr R0
219move 10+_v_regs,R0
220and #384,R0
221beq L13
222*line 113
223clr (sp)
224jsr _vbank
225*line 114
226L13:
227*line 115
228*line 115
229cmp #19,_mtcoldr
230blt L14
231cmp #23,_mtcoldr
232bgt L14
233*line 116
234*line 117
235move #64,(sp)
236move #256,-(sp)
237move _mtcoldc,-(sp)
238move _mtcoldr,-(sp)
239add #-18,(sp)
240move.l _obj11,-(sp)
241jsr _vclrav
242adda.l #10,sp
243*line 118
244*line 119
245clr _mtcoldr
246*line 120
247clr _mtcoldc
248*line 121
249*line 122
250L14:
251*line 123
252*line 123
253cmp #19,R7
254blt L15
255cmp #23,R7
256bgt L15
257*line 124
258*line 125
259move #64,(sp)
260move #256,-(sp)
261move R6,-(sp)
262move R7,-(sp)
263add #-18,(sp)
264move.l _obj11,-(sp)
265jsr _vsetav
266adda.l #10,sp
267*line 126
268*line 127
269move R7,_mtcoldr
270*line 128
271move R6,_mtcoldc
272*line 129
273*line 130
274L15:
275*line 131
276move R7,_vtcrow
277*line 132
278move R6,_vtccol
279L12:tst.l (sp)+
280movem.l (sp)+,R6-R7
281unlk R14
282rts
283.globl _mtcoff
284.text
285_mtcoff:
286~~mtcoff:
287link R14,#-4
288*line 143
289*line 144
290clr R0
291move 10+_v_regs,R0
292and #384,R0
293beq L17
294*line 144
295clr (sp)
296jsr _vbank
297*line 145
298L17:
299*line 146
300*line 147
301cmp #19,_mtcoldr
302blt L18
303cmp #23,_mtcoldr
304bgt L18
305*line 147
306move #64,(sp)
307move #256,-(sp)
308move _mtcoldc,-(sp)
309move _mtcoldr,-(sp)
310add #-18,(sp)
311move.l _obj11,-(sp)
312jsr _vclrav
313adda.l #10,sp
314L18:L16:unlk R14
315rts
316.data
Note: See TracBrowser for help on using the repository browser.