source: buchla-68k/alcyon/wdselbx.s@ 9519422

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 8.2 KB
Line 
1.globl _ebflag
2.globl _ebuf
3.globl _curfet
4.globl _cfetp
5.globl _infetp
6.globl _io_time
7.globl _io_lcd
8.globl _io_ser
9.globl _io_midi
10.globl _io_disk
11.globl _io_tone
12.globl _io_leds
13.globl _io_kbrd
14.globl _lcd_a0
15.globl _lcd_a1
16.globl _io_vreg
17.globl _io_vraw
18.globl _io_vram
19.globl _io_fpu
20.globl _v_regs
21.globl _v_odtab
22.globl _v_actab
23.globl _v_ct0
24.globl _v_gt1
25.globl _v_score
26.globl _v_cgtab
27.globl _v_curs0
28.globl _v_curs1
29.globl _v_curs2
30.globl _v_curs3
31.globl _v_curs4
32.globl _v_curs5
33.globl _v_curs6
34.globl _v_curs7
35.globl _v_tcur
36.globl _v_kbobj
37.globl _v_lnobj
38.globl _v_win0
39.globl _v_cur
40.globl _fc_sw
41.globl _fc_val
42.globl _curvce
43.globl _curwdth
44.globl _cursbox
45.globl _hitbox
46.globl _cxval
47.globl _cyval
48.globl _hitcx
49.globl _hitcy
50.globl _curwave
51.globl _curwfnl
52.globl _curwpnt
53.globl _curwoff
54.globl _curwhrm
55.globl _curwhrv
56.globl _curwslt
57.globl _wdupdfl
58.globl _wpntsv
59.globl _wplast
60.globl _wvlast
61.globl _lstwoff
62.globl _lstwpnt
63.globl _offsets
64.globl _vmtab
65.globl _wsbuf
66.globl _vknm
67.globl _wdbox
68.globl _wsnmod
69.globl _crate1
70.globl _crate2
71.globl _cratex
72.globl _cratey
73.globl _csbp
74.globl _curboxp
75.globl _vbufs
76.globl _wslib
77.globl _wdboxes
78.data
79_wdboxes:
80.dc.w $1
81.dc.w $1
82.dc.w $1FE
83.dc.w $133
84.dc.w $0
85*line 54
86.dc.l _wdfnbox
87.dc.w $1
88.dc.w $134
89.dc.w $1FE
90.dc.w $140
91.dc.w $1
92*line 55
93.dc.l _wdfnbox
94.dc.w $1
95.dc.w $142
96.dc.w $AE
97.dc.w $15C
98.dc.w $2
99*line 56
100.dc.l _enterit
101.dc.w $B0
102.dc.w $142
103.dc.w $E6
104.dc.w $15C
105.dc.w $3
106*line 57
107.dc.l _wdfnbox
108.dc.w $E8
109.dc.w $142
110.dc.w $18E
111.dc.w $15C
112.dc.w $4
113*line 58
114.dc.l _enterit
115.dc.w $190
116.dc.w $142
117.dc.w $1FE
118.dc.w $15C
119.dc.w $5
120*line 59
121.dc.l _enterit
122.dc.w $0
123.dc.w $0
124.dc.w $0
125.dc.w $0
126.dc.w $0
127.dc.l $0
128.globl _dsnewws
129.text
130_dsnewws:
131~~dsnewws:
132link R14,#-4
133*line 72
134clr (sp)
135jsr _wdswin
136*line 73
137move #2,(sp)
138jsr _wdswin
139*line 74
140move #4,(sp)
141jsr _wdswin
142*line 75
143move #5,(sp)
144jsr _wdswin
145L1:unlk R14
146rts
147.globl _newws
148.text
149_newws:
150~~newws:
151link R14,#0
152movem.l R6-R7/R13-R13,-(sp)
153~i=R7
154~ip=R13
155*line 92
156move _curvce,R0
157muls #3938,R0
158move.l R0,R13
159add.l #_vbufs,R13
160*line 94
161*line 94
162tst _curwslt
163beq L3
164*line 95
165*line 96
166clr R7
167bra L6
168L7:
169*line 97
170*line 98
171move.l R13,R8
172move R7,R9
173add.l R9,R9
174add.l R9,R8
175move 3366(R8),R0
176asr #5,R0
177move R7,R9
178add #1,R9
179add.l R9,R9
180add.l #_offsets,R9
181move R0,(R9)
182*line 99
183move.l R13,R8
184move R7,R9
185add.l R9,R9
186add.l R9,R8
187move 2858(R8),R0
188asr #5,R0
189move R7,R9
190add #1,R9
191add.l R9,R9
192add.l #_wsbuf,R9
193move R0,(R9)
194L5:
195*line 96
196add #1,R7
197L6:
198*line 96
199cmp #254,R7
200blt L7
201L4:
202*line 100
203*line 101
204*line 102
205move #32,(sp)
206move.l R13,-(sp)
207add.l #3874,(sp)
208move.l #_vmtab,-(sp)
209jsr _memcpyw
210addq.l #8,sp
211*line 103
212bra L8
213L3:
214*line 104
215*line 105
216*line 106
217clr R7
218bra L11
219L12:
220*line 107
221*line 108
222move.l R13,R8
223move R7,R9
224add.l R9,R9
225add.l R9,R8
226move 2286(R8),R0
227asr #5,R0
228move R7,R9
229add #1,R9
230add.l R9,R9
231add.l #_offsets,R9
232move R0,(R9)
233*line 109
234move.l R13,R8
235move R7,R9
236add.l R9,R9
237add.l R9,R8
238move 1778(R8),R0
239asr #5,R0
240move R7,R9
241add #1,R9
242add.l R9,R9
243add.l #_wsbuf,R9
244move R0,(R9)
245L10:
246*line 106
247add #1,R7
248L11:
249*line 106
250cmp #254,R7
251blt L12
252L9:
253*line 110
254*line 111
255*line 112
256move #32,(sp)
257move.l R13,-(sp)
258add.l #2794,(sp)
259move.l #_vmtab,-(sp)
260jsr _memcpyw
261addq.l #8,sp
262L8:
263*line 115
264move 2+_offsets,_offsets
265*line 116
266move 2+_wsbuf,_wsbuf
267*line 118
268move _curwhrm,R8
269add.l R8,R8
270add.l #_vmtab,R8
271move (R8),_curwhrv
272*line 119
273move _curwpnt,R8
274add #1,R8
275add.l R8,R8
276move.l #_offsets,R9
277move 0(R8,R9.l),R0
278move R0,_curwoff
279move R0,_wvlast
280move R0,_lstwoff
281*line 120
282move _curwpnt,R8
283add #1,R8
284add.l R8,R8
285add.l #_wsbuf,R8
286move (R8),_curwfnl
287*line 121
288move _curwpnt,R0
289move R0,_wplast
290move R0,_lstwpnt
291*line 123
292move #16384,(sp)
293clr -(sp)
294move.l #_vknm,-(sp)
295jsr _memsetw
296addq.l #6,sp
297*line 124
298jsr _wadj
299L2:tst.l (sp)+
300movem.l (sp)+,R7-R7/R13-R13
301unlk R14
302rts
303.globl _wdfnbox
304.text
305_wdfnbox:
306~~wdfnbox:
307~n=8
308link R14,#0
309movem.l R5-R7/R13-R13,-(sp)
310~wval=R7
311~wsgn=R6
312~fpuws=R13
313*line 144
314move 8(R14),R0
315bra L15
316*line 145
317L16:
318*line 146
319*line 147
320*line 148
321move _wpntsv,R0
322bra L18
323*line 149
324L19:
325*line 150
326*line 151
327*line 152
328move #1,_wpntsv
329*line 153
330move _cxval,R0
331sub #2,R0
332ext.l R0
333divs #2,R0
334move R0,_curwpnt
335*line 154
336*line 155
337*line 156
338cmp #254,_curwpnt
339blt L20
340*line 156
341move #253,_curwpnt
342bra L21
343L20:
344*line 157
345*line 158
346tst _curwpnt
347bge L22
348*line 158
349clr _curwpnt
350*line 159
351L22:L21:
352*line 160
353move.l #_crate2,_cratex
354*line 161
355move.l #_crate2,_cratey
356*line 162
357jsr _newws
358*line 163
359move #133,R0
360move _curwoff,R1
361ext.l R1
362divs #8,R1
363sub R1,R0
364move R0,_cyval
365*line 164
366move _curwpnt,R0
367asl #1,R0
368add #2,R0
369move R0,_cxval
370*line 165
371move #13,(sp)
372jsr _arcurs
373*line 166
374move _cyval,(sp)
375move _cxval,-(sp)
376jsr _gcurpos
377addq.l #2,sp
378*line 167
379move _curwpnt,_wplast
380*line 168
381move _curwoff,_wvlast
382*line 169
383move #4,(sp)
384jsr _wdswin
385bra L17
386*line 170
387*line 171
388*line 172
389L23:
390*line 173
391*line 174
392*line 175
393clr _wpntsv
394*line 176
395move.l #_crate1,_cratex
396*line 177
397move.l #_crate1,_cratey
398*line 178
399*line 179
400move #1,(sp)
401jsr _arcurs
402*line 180
403move _cyval,(sp)
404move _cxval,-(sp)
405jsr _gcurpos
406addq.l #2,sp
407bra L17
408*line 181
409*line 182
410L24:
411*line 183
412*line 184
413*line 185
414clr _wpntsv
415*line 186
416move.l #_crate1,_cratex
417*line 187
418move.l #_crate1,_cratey
419*line 188
420*line 189
421move #1,(sp)
422jsr _arcurs
423*line 190
424move _curwhrm,R0
425asl #1,R0
426move R0,(sp)
427add #1,(sp)
428move #22,-(sp)
429jsr _settc
430addq.l #2,sp
431bra L17
432*line 191
433bra L17
434L18:tst R0
435beq L19
436cmp #1,R0
437beq L23
438cmp #2,R0
439beq L24
440bra L17
441L17:
442*line 192
443*line 193
444*line 194
445move #1,R0
446bra L13
447*line 195
448L25:
449*line 196
450*line 197
451*line 198
452move #2,_wpntsv
453*line 199
454move.l #_crate1,_cratex
455*line 200
456move.l #_crate1,_cratey
457*line 201
458*line 202
459move _cxval,R0
460asr #4,R0
461move R0,_curwhrm
462*line 203
463move _curwhrm,R8
464add.l R8,R8
465add.l #_vmtab,R8
466move (R8),_curwhrv
467*line 204
468*line 205
469move _curwhrm,R0
470asl #4,R0
471add #8,R0
472move R0,_cxval
473*line 206
474*line 207
475*line 207
476tst _curwhrv
477bge L26
478*line 208
479*line 209
480move #306,R0
481move _curwhrv,R1
482neg R1
483asl #7,R1
484ext.l R1
485divs #100,R1
486sub R1,R0
487move R0,_cyval
488*line 210
489bra L27
490L26:
491*line 211
492*line 212
493*line 213
494move #306,R0
495move _curwhrv,R1
496asl #7,R1
497ext.l R1
498divs #100,R1
499sub R1,R0
500move R0,_cyval
501L27:
502*line 214
503*line 215
504*line 216
505move #13,(sp)
506jsr _arcurs
507*line 217
508move _cyval,(sp)
509move _cxval,-(sp)
510jsr _gcurpos
511addq.l #2,sp
512*line 218
513move #5,(sp)
514jsr _wdswin
515*line 219
516move #1,R0
517bra L13
518*line 220
519*line 221
520L28:
521*line 222
522*line 223
523*line 224
524move _curvce,R8
525add.l R8,R8
526add.l R8,R8
527move _curwslt,R9
528add.l R9,R9
529add.l R9,R8
530add.l #_wsnmod,R8
531clr (R8)
532*line 225
533*line 226
534*line 226
535cmp #336,_cyval
536bge L29
537*line 227
538*line 228
539*line 229
540*line 230
541*line 231
542move #540,(sp)
543tst _curwslt
544beq L10000
545move _curvce,R0
546muls #3938,R0
547add.l #_vbufs,R0
548move.l R0,-(sp)
549add.l #2858,(sp)
550bra L10002
551L10000:move _curvce,R0
552muls #3938,R0
553add.l #_vbufs,R0
554move.l R0,-(sp)
555add.l #1778,(sp)
556L10002:move _curwave,R0
557muls #1080,R0
558add.l #_wslib,R0
559move.l R0,-(sp)
560jsr _memcpyw
561addq.l #8,sp
562*line 232
563*line 233
564move #2,(sp)
565jsr _wdswin
566*line 234
567bra L30
568L29:
569*line 235
570*line 236
571*line 237
572*line 238
573*line 239
574*line 240
575move #540,(sp)
576move _curwave,R0
577muls #1080,R0
578add.l #_wslib,R0
579move.l R0,-(sp)
580tst _curwslt
581beq L10003
582move _curvce,R0
583muls #3938,R0
584add.l #_vbufs,R0
585move.l R0,-(sp)
586add.l #2858,(sp)
587bra L10005
588L10003:move _curvce,R0
589muls #3938,R0
590add.l #_vbufs,R0
591move.l R0,-(sp)
592add.l #1778,(sp)
593L10005:jsr _memcpyw
594addq.l #8,sp
595*line 241
596*line 242
597jsr _updfpu
598*line 243
599jsr _newws
600*line 244
601jsr _dsnewws
602L30:
603*line 245
604*line 246
605*line 247
606move.l #_crate1,_cratex
607*line 248
608move.l #_crate1,_cratey
609*line 249
610move #1,R0
611bra L13
612*line 250
613L31:
614*line 251
615*line 252
616*line 253
617move.l #_crate1,_cratex
618*line 254
619move.l #_crate1,_cratey
620*line 255
621clr R0
622bra L13
623bra L14
624L15:tst R0
625beq L16
626cmp #1,R0
627beq L25
628cmp #3,R0
629beq L28
630bra L31
631L14:L13:tst.l (sp)+
632movem.l (sp)+,R6-R7/R13-R13
633unlk R14
634rts
635.data
Note: See TracBrowser for help on using the repository browser.