source: buchla-68k/alcyon/sctrak.s@ 7bf3856

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 10.6 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 _ac_code
38.globl _scname
39.globl _se_chg
40.globl _curscor
41.globl _cursect
42.globl _se1_cnt
43.globl _se2_cnt
44.globl _se3_cnt
45.globl _spool
46.globl _pspool
47.globl _spcount
48.globl _frags
49.globl _t_bak
50.globl _t_cur
51.globl _t_ctr
52.globl _t_fwd
53.globl _size1
54.globl _size2
55.globl _size3
56.globl _scores
57.globl _scp
58.globl _seclist
59.globl _hplist
60.globl _p_bak
61.globl _p_cur
62.globl _p_ctr
63.globl _p_fwd
64.globl _ancmsw
65.globl _dubsw
66.globl _ndisp
67.globl _recsw
68.globl _sbase
69.globl _sd
70.globl _se
71.globl _soffset
72.globl _grpmode
73.globl _grpstat
74.globl _varmode
75.globl _gdfsep
76.globl _gdstbc
77.globl _gdstbn
78.globl _gdstbp
79.globl _sc_trak
80.text
81_sc_trak:
82~~sc_trak:
83~tval=R7
84link R14,#-4
85movem.l R2-R7/R11-R13,-(sp)
86~rpb=R13
87~rpc=R12
88~rpf=R11
89~rtb=R6
90~rtc=R5
91~rtf=R4
92~mod48=R3
93*line 63
94move #48,R3
95~gdsp=-4
96*line 66
97move.l 8(R14),R7
98*line 68
99*line 68
100cmp #2,_ndisp
101beq L2
102*line 69
103*line 70
104*line 71
105move #-1,R0
106bra L1
107*line 72
108*line 73
109*line 78
110*line 79
111L2:
112*line 80
113*line 80
114tst.l _p_fwd
115beq L10000
116tst.l _p_ctr
117beq L10000
118tst.l _p_bak
119bne L3
120L10000:*line 81
121*line 82
122*line 83
123move #-1,R0
124bra L1
125*line 84
126*line 85
127*line 86
128L3:
129*line 87
130*line 88
131clr R0
132move 10+_v_regs,R0
133and #384,R0
134beq L4
135*line 88
136clr (sp)
137jsr _vbank
138*line 89
139L4:
140*line 90
141move.l _p_fwd,R11
142*line 91
143move.l _t_fwd,R4
144*line 93
145move.l _p_ctr,R12
146*line 94
147move.l _t_ctr,R5
148*line 96
149move.l _p_bak,R13
150*line 97
151move.l _t_bak,R6
152*line 120
153*line 120
154tst _sd
155bne L5
156*line 121
157*line 122
158*line 123
159*line 124
160bra L8
161L7:
162*line 125
163*line 126
164jsr _sreset
165*line 127
166*line 128
167add.l #$1,R6
168*line 129
169add.l #$1,R4
170*line 130
171*line 131
172*line 131
173cmp.b #21,5(R13)
174beq L9
175*line 132
176*line 133
177bra L12
178L11:
179*line 134
180*line 135
181clr (sp)
182move.l #_gdstbp,-(sp)
183clr -(sp)
184move.l R13,-(sp)
185jsr _se_disp
186adda.l #10,sp
187*line 136
188move.l 12(R13),R13
189*line 137
190*line 138
191*line 139
192cmp.b #21,5(R13)
193beq L10
194L12:
195*line 140
196cmp.l (R13),R6
197beq L11
198L10:
199*line 141
200*line 142
201L9:
202*line 143
203*line 143
204move.l R6,R0
205divs R3,R0
206swap R0
207ext.l R0
208tst.l R0
209bne L13
210*line 144
211*line 145
212*line 145
213move.l _gdfsep,-4(R14)
214beq L14
215*line 146
216*line 147
217move.l -4(R14),R8
218move.l (R8),_gdfsep
219*line 148
220*line 149
221move.l -4(R14),R8
222move.l 48+_gdstbp,(R8)
223*line 150
224move.l -4(R14),R8
225move #4369,4(R8)
226*line 151
227move.l -4(R14),R8
228move #1,6(R8)
229*line 152
230*line 153
231move.l -4(R14),48+_gdstbp
232*line 154
233L14:
234*line 155
235*line 156
236*line 157
237L13:
238*line 158
239*line 158
240cmp.b #21,5(R12)
241beq L15
242*line 159
243*line 160
244bra L18
245L17:
246*line 161
247*line 162
248move #1,(sp)
249move.l #_gdstbc,-(sp)
250clr -(sp)
251move.l R12,-(sp)
252jsr _se_disp
253adda.l #10,sp
254*line 163
255move.l 12(R12),R12
256*line 164
257*line 165
258*line 166
259cmp.b #21,5(R12)
260beq L16
261L18:
262*line 167
263cmp.l (R12),R5
264beq L17
265L16:
266*line 168
267*line 169
268L15:
269*line 170
270*line 170
271cmp.b #21,5(R11)
272beq L19
273*line 171
274*line 172
275bra L22
276L21:
277*line 173
278*line 174
279clr (sp)
280move.l #_gdstbn,-(sp)
281clr -(sp)
282move.l R11,-(sp)
283jsr _se_disp
284adda.l #10,sp
285*line 175
286move.l 12(R11),R11
287*line 176
288*line 177
289*line 178
290cmp.b #21,5(R11)
291beq L20
292L22:
293*line 179
294cmp.l (R11),R4
295beq L21
296L20:
297*line 180
298*line 181
299L19:
300*line 182
301*line 182
302move.l R4,R0
303divs R3,R0
304swap R0
305ext.l R0
306tst.l R0
307bne L23
308*line 183
309*line 184
310*line 184
311move.l _gdfsep,-4(R14)
312beq L24
313*line 185
314*line 186
315move.l -4(R14),R8
316move.l (R8),_gdfsep
317*line 187
318*line 188
319move.l -4(R14),R8
320move.l 48+_gdstbn,(R8)
321*line 189
322move.l -4(R14),R8
323move #4369,4(R8)
324*line 190
325move.l -4(R14),R8
326move #1,6(R8)
327*line 191
328*line 192
329move.l -4(R14),48+_gdstbn
330*line 193
331L24:
332*line 194
333*line 195
334L23:
335*line 196
336jsr _sc_adv
337L8:
338*line 197
339cmp.l R5,R7
340move sr,R0
341add.l #$1,R5
342move R0,ccr
343bgt L7
344L6:
345*line 198
346*line 199
347*line 200
348bra L25
349L5:
350*line 201
351*line 202
352*line 203
353*line 204
354*line 205
355bra L28
356L27:
357*line 206
358*line 207
359jsr _sreset
360*line 208
361*line 209
362sub.l #$1,R6
363*line 210
364sub.l #$1,R4
365*line 211
366*line 212
367*line 212
368cmp.b #1,5(R13)
369beq L29
370*line 213
371*line 214
372bra L32
373L31:
374*line 215
375*line 216
376clr (sp)
377move.l #_gdstbp,-(sp)
378move #1,-(sp)
379move.l R13,-(sp)
380jsr _se_disp
381adda.l #10,sp
382*line 217
383move.l 8(R13),R13
384*line 218
385*line 219
386*line 220
387cmp.b #1,5(R13)
388beq L30
389L32:
390*line 221
391cmp.l (R13),R6
392beq L31
393L30:
394*line 222
395*line 223
396L29:
397*line 224
398*line 224
399move.l R6,R0
400divs R3,R0
401swap R0
402ext.l R0
403tst.l R0
404bne L33
405*line 225
406*line 226
407*line 226
408move.l _gdfsep,-4(R14)
409beq L34
410*line 227
411*line 228
412move.l -4(R14),R8
413move.l (R8),_gdfsep
414*line 229
415*line 230
416move.l -4(R14),R8
417move.l 48+_gdstbp,(R8)
418*line 231
419move.l -4(R14),R8
420move #4369,4(R8)
421*line 232
422move.l -4(R14),R8
423move #1,6(R8)
424*line 233
425*line 234
426move.l -4(R14),48+_gdstbp
427*line 235
428L34:
429*line 236
430*line 237
431*line 238
432L33:
433*line 239
434*line 239
435cmp.b #1,5(R12)
436beq L35
437*line 240
438*line 241
439bra L38
440L37:
441*line 242
442*line 243
443move #1,(sp)
444move.l #_gdstbc,-(sp)
445move #1,-(sp)
446move.l R12,-(sp)
447jsr _se_disp
448adda.l #10,sp
449*line 244
450move.l 8(R12),R12
451*line 245
452*line 246
453*line 247
454cmp.b #1,5(R12)
455beq L36
456L38:
457*line 248
458cmp.l (R12),R5
459beq L37
460L36:
461*line 249
462*line 250
463L35:
464*line 251
465*line 251
466cmp.b #1,5(R11)
467beq L39
468*line 252
469*line 253
470bra L42
471L41:
472*line 254
473*line 255
474clr (sp)
475move.l #_gdstbn,-(sp)
476move #1,-(sp)
477move.l R11,-(sp)
478jsr _se_disp
479adda.l #10,sp
480*line 256
481move.l 8(R11),R11
482*line 257
483*line 258
484*line 259
485cmp.b #1,5(R11)
486beq L40
487L42:
488*line 260
489cmp.l (R11),R4
490beq L41
491L40:
492*line 261
493*line 262
494L39:
495*line 263
496*line 263
497move.l R4,R0
498divs R3,R0
499swap R0
500ext.l R0
501tst.l R0
502bne L43
503*line 264
504*line 265
505*line 265
506move.l _gdfsep,-4(R14)
507beq L44
508*line 266
509*line 267
510move.l -4(R14),R8
511move.l (R8),_gdfsep
512*line 268
513*line 269
514move.l -4(R14),R8
515move.l 48+_gdstbn,(R8)
516*line 270
517move.l -4(R14),R8
518move #4369,4(R8)
519*line 271
520move.l -4(R14),R8
521move #1,6(R8)
522*line 272
523*line 273
524move.l -4(R14),48+_gdstbn
525*line 274
526L44:
527*line 275
528*line 276
529L43:
530*line 277
531jsr _sc_adv
532L28:
533*line 278
534cmp.l R5,R7
535move sr,R0
536sub.l #$1,R5
537move R0,ccr
538blt L27
539L26:L25:
540*line 282
541move.l R11,_p_fwd
542*line 283
543move.l R7,R0
544add.l #$102,R0
545move.l R0,_t_fwd
546*line 285
547move.l R12,_p_ctr
548*line 286
549move.l R7,_t_ctr
550*line 288
551move.l R13,_p_bak
552*line 289
553move.l R7,R0
554add.l #$ffffff10,R0
555move.l R0,_t_bak
556*line 292
557jsr _dslocn
558*line 312
559clr R0
560bra L1
561L1:tst.l (sp)+
562movem.l (sp)+,R3-R7/R11-R13
563unlk R14
564rts
565.globl _sc_trek
566.text
567_sc_trek:
568~~sc_trek:
569~tval=R7
570link R14,#0
571movem.l R2-R7/R12-R13,-(sp)
572~rp=R13
573~ep=R12
574~tc=R6
575~rt=R5
576~et=R4
577~grp=R3
578*line 332
579move.l 8(R14),R7
580*line 338
581*line 338
582tst.l _p_cur
583bne L46
584*line 339
585*line 340
586*line 341
587move #-1,R0
588bra L45
589*line 342
590*line 343
591L46:
592*line 344
593move.l _p_cur,R13
594*line 345
595move.l _t_cur,R5
596*line 358
597bra L49
598L48:
599*line 359
600*line 360
601*line 361
602tst _se
603bne L50
604*line 361
605add.l #$1,R5
606*line 362
607bra L51
608L50:
609*line 363
610sub.l #$1,R5
611L51:
612*line 364
613*line 365
614*line 365
615cmp.b #21,5(R13)
616beq L52
617*line 366
618*line 367
619bra L55
620L54:
621*line 368
622*line 369
623*line 370
624*line 371
625*line 371
626tst _recsw
627beq L56
628tst _se
629bne L56
630*line 372
631*line 373
632move.b 5(R13),R4
633ext.w R4
634and #127,R4
635*line 374
636*line 375
637*line 376
638tst _dubsw
639bne L57
640cmp #5,R4
641beq L10001
642cmp #6,R4
643bne L57
644L10001:*line 377
645*line 378
646move.b 7(R13),R3
647ext.w R3
648*line 379
649*line 380
650*line 380
651move R3,R8
652add.l R8,R8
653move.l #_grpstat,R9
654tst 0(R8,R9.l)
655beq L58
656move R3,R8
657add.l R8,R8
658add.l #_grpmode,R8
659cmp #2,(R8)
660bne L58
661*line 381
662*line 382
663*line 383
664*line 384
665*line 385
666*line 386
667move.l 12(R13),R12
668*line 387
669*line 388
670*line 389
671cmp.l _p_bak,R13
672bne L59
673*line 389
674move.l R12,_p_bak
675*line 390
676L59:
677*line 391
678*line 392
679cmp.l _p_cur,R13
680bne L60
681*line 392
682move.l R12,_p_cur
683*line 393
684L60:
685*line 394
686*line 395
687cmp.l _p_ctr,R13
688bne L61
689*line 395
690move.l R12,_p_ctr
691*line 396
692L61:
693*line 397
694*line 398
695cmp.l _p_fwd,R13
696bne L62
697*line 398
698move.l R12,_p_fwd
699*line 399
700L62:
701*line 400
702move.l R13,(sp)
703jsr _e_rmv
704move.l R0,(sp)
705jsr _e_del
706*line 401
707move.l R12,R13
708bra L63
709*line 402
710*line 403
711*line 404
712*line 405
713L58:bra L64
714L57:
715*line 406
716*line 406
717cmp #14,R4
718bne L65
719*line 407
720*line 408
721move.b 6(R13),R3
722ext.w R3
723and #15,R3
724*line 409
725*line 410
726*line 411
727*line 412
728move R3,R8
729add.l R8,R8
730move.l #_grpstat,R9
731tst 0(R8,R9.l)
732beq L66
733tst _ancmsw
734beq L10002
735move.b 6(R13),R0
736ext.w R0
737asr #4,R0
738and #15,R0
739asl #5,R0
740ext.l R0
741move R3,R1
742asl #1,R1
743ext.l R1
744add.l R1,R0
745move.l R0,R8
746move.l #_varmode,R9
747move 0(R8,R9.l),R0
748bra L10004
749L10002:move R3,R8
750add.l R8,R8
751move.l #_grpmode,R9
752move 0(R8,R9.l),R0
753L10004:cmp #2,R0
754bne L66
755*line 413
756*line 414
757*line 415
758*line 416
759*line 417
760*line 418
761move.l 12(R13),R12
762*line 419
763*line 420
764*line 421
765cmp.l _p_bak,R13
766bne L67
767*line 421
768move.l R12,_p_bak
769*line 422
770L67:
771*line 423
772*line 424
773cmp.l _p_cur,R13
774bne L68
775*line 424
776move.l R12,_p_cur
777*line 425
778L68:
779*line 426
780*line 427
781cmp.l _p_ctr,R13
782bne L69
783*line 427
784move.l R12,_p_ctr
785*line 428
786L69:
787*line 429
788*line 430
789cmp.l _p_fwd,R13
790bne L70
791*line 430
792move.l R12,_p_fwd
793*line 431
794L70:
795*line 432
796move.l R13,(sp)
797jsr _e_rmv
798move.l R0,(sp)
799jsr _e_del
800*line 433
801move.l R12,R13
802bra L63
803*line 434
804*line 435
805L66:
806*line 436
807L65:L64:
808*line 437
809*line 438
810L56:
811*line 439
812*line 439
813cmp.l (R13),R5
814bne L71
815*line 440
816*line 441
817move _se,(sp)
818move.l R13,-(sp)
819jsr _se_exec
820addq.l #4,sp
821*line 442
822*line 443
823*line 444
824tst _se
825bne L72
826*line 444
827move.l 12(R13),R13
828*line 445
829bra L73
830L72:
831*line 446
832move.l 8(R13),R13
833L73:
834*line 447
835*line 448
836L71:L63:
837*line 449
838*line 450
839*line 451
840*line 452
841tst _se
842bne L10005
843cmp.b #21,5(R13)
844beq L53
845L10005:cmp #1,_se
846bne L10006
847cmp.b #1,5(R13)
848beq L53
849L10006:L55:
850*line 453
851cmp.l (R13),R5
852beq L54
853L53:
854*line 454
855L52:L49:
856*line 455
857cmp.l R7,R5
858bne L48
859L47:
860*line 458
861move.l R13,_p_cur
862*line 459
863move.l R7,_t_cur
864*line 462
865clr R0
866bra L45
867L45:tst.l (sp)+
868movem.l (sp)+,R3-R7/R12-R13
869unlk R14
870rts
871.data
Note: See TracBrowser for help on using the repository browser.