source: buchla-68k/alcyon/sqexec.s@ 7bb1284

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 13.8 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 _timers
49.globl _trgtab
50.globl _curslin
51.globl _dsp_ok
52.globl _ndisp
53.globl _seqdupd
54.globl _obj10
55.globl _cg3
56.globl _ptefifo
57.globl _seqdspn
58.comm _seqdspn,2
59.globl _rtab
60.data
61_rtab:
62.dc.w $0
63.dc.w $1
64.dc.w $3
65.dc.w $7
66.dc.w $F
67.dc.w $1F
68.dc.w $3F
69.dc.w $3F
70.dc.w $3F
71.dc.w $3F
72.globl _evaltv
73.text
74_evaltv:
75~~evaltv:
76~dat=R7
77link R14,#0
78movem.l R6-R7,-(sp)
79*line 71
80move 8(R14),R7
81*line 71
82clr R0
83move R7,R0
84and #3840,R0
85bra L3
86*line 72
87L4:
88*line 73
89*line 74
90*line 75
91clr R0
92move R7,R0
93and #255,R0
94lsl #1,R0
95swap R0
96clr R0
97swap R0
98move.l R0,R8
99move.l #_sregval,R9
100clr R0
101move 0(R8,R9.l),R0
102bra L1
103*line 76
104L5:
105*line 77
106*line 78
107*line 79
108clr R0
109move R7,R0
110and #255,R0
111bra L1
112*line 80
113L6:
114*line 81
115*line 82
116*line 83
117clr R0
118bra L1
119*line 84
120L7:
121*line 85
122*line 86
123*line 87
124jsr _rand24
125clr R1
126move R7,R1
127and #255,R1
128lsl #1,R1
129swap R1
130clr R1
131swap R1
132add.l #_rtab,R1
133move.l R1,R9
134move (R9),R1
135and R1,R0
136bra L1
137*line 88
138L8:
139*line 89
140*line 90
141*line 91
142clr R0
143bra L1
144bra L2
145L3:tst R0
146beq L4
147cmp #256,R0
148beq L5
149cmp #512,R0
150beq L6
151cmp #768,R0
152beq L7
153bra L8
154L2:L1:tst.l (sp)+
155movem.l (sp)+,R7-R7
156unlk R14
157rts
158.globl _dosqact
159.text
160_dosqact:
161~~dosqact:
162~act=R7
163~dat=R6
164~seq=8
165link R14,#0
166movem.l R2-R7,-(sp)
167~obj=R5
168~val=R4
169~sv=R3
170*line 112
171move 10(R14),R7
172*line 112
173move 12(R14),R6
174*line 112
175move R7,R5
176and #-256,R5
177lsr #8,R5
178*line 113
179move R6,R4
180and #255,R4
181*line 115
182clr R0
183move R7,R0
184and #255,R0
185bra L11
186*line 116
187L12:
188*line 117
189*line 118
190*line 119
191clr R0
192bra L9
193*line 120
194L13:
195*line 121
196*line 122
197*line 123
198move R6,(sp)
199and #8191,(sp)
200move.l #_ptefifo,-(sp)
201jsr _putwq
202addq.l #4,sp
203*line 124
204clr R0
205bra L9
206*line 125
207L14:
208*line 126
209*line 127
210*line 128
211move R6,(sp)
212or #-32768,(sp)
213move.l #_ptefifo,-(sp)
214jsr _putwq
215addq.l #4,sp
216*line 129
217clr R0
218bra L9
219*line 130
220L15:
221*line 131
222*line 132
223*line 133
224move R6,(sp)
225and #8191,(sp)
226move.l #_ptefifo,-(sp)
227jsr _putwq
228addq.l #4,sp
229*line 134
230move R6,(sp)
231or #-32768,(sp)
232move.l #_ptefifo,-(sp)
233jsr _putwq
234addq.l #4,sp
235*line 135
236clr R0
237bra L9
238*line 136
239L16:
240*line 137
241*line 138
242*line 139
243*line 140
244clr R0
245move R6,R0
246and #8191,R0
247move R0,R8
248move.l #_trgtab,R9
249tst.b 0(R8,R9.l)
250beq L17
251*line 140
252clr R0
253bra L9
254*line 141
255bra L18
256L17:
257*line 142
258move #1,R0
259bra L9
260L18:
261*line 143
262*line 144
263L19:
264*line 145
265*line 146
266*line 147
267clr R0
268move R4,R0
269lsl #1,R0
270swap R0
271clr R0
272swap R0
273add.l #_trstate,R0
274move.l R0,R8
275move #1,(R8)
276*line 148
277move R4,(sp)
278or #4352,(sp)
279move.l #_ptefifo,-(sp)
280jsr _putwq
281addq.l #4,sp
282*line 149
283move #1,R0
284clr R1
285move R4,R1
286asl R1,R0
287or R0,_seqdupd
288*line 150
289clr R0
290bra L9
291*line 151
292L20:
293*line 152
294*line 153
295*line 154
296clr R0
297move R4,R0
298lsl #1,R0
299swap R0
300clr R0
301swap R0
302add.l #_trstate,R0
303move.l R0,R8
304clr (R8)
305*line 155
306move #1,R0
307clr R1
308move R4,R1
309asl R1,R0
310or R0,_seqdupd
311*line 156
312clr R0
313bra L9
314*line 157
315L21:
316*line 158
317*line 159
318*line 160
319clr R0
320move R4,R0
321lsl #1,R0
322swap R0
323clr R0
324swap R0
325move.l R0,R8
326move.l #_trstate,R9
327tst 0(R8,R9.l)
328beq L10000
329clr R0
330bra L10002
331L10000:move #1,R0
332L10002:clr R1
333move R4,R1
334lsl #1,R1
335swap R1
336clr R1
337swap R1
338add.l #_trstate,R1
339move.l R1,R9
340move R0,(R9)
341*line 161
342*line 162
343*line 163
344clr R0
345move R4,R0
346lsl #1,R0
347swap R0
348clr R0
349swap R0
350move.l R0,R8
351move.l #_trstate,R9
352tst 0(R8,R9.l)
353beq L22
354*line 163
355move R4,(sp)
356or #4352,(sp)
357move.l #_ptefifo,-(sp)
358jsr _putwq
359addq.l #4,sp
360*line 164
361L22:
362*line 165
363move #1,R0
364clr R1
365move R4,R1
366asl R1,R0
367or R0,_seqdupd
368*line 166
369clr R0
370bra L9
371*line 167
372L23:
373*line 168
374*line 169
375*line 170
376clr R0
377move R4,R0
378lsl #1,R0
379swap R0
380clr R0
381swap R0
382move.l R0,R8
383move.l #_trstate,R9
384tst 0(R8,R9.l)
385beq L10003
386clr R0
387bra L10005
388L10003:move #1,R0
389L10005:bra L9
390*line 171
391*line 172
392L24:
393*line 173
394*line 174
395*line 175
396move R6,(sp)
397jsr _evaltv
398move R0,-(sp)
399clr R0
400move R5,R0
401lsl #1,R0
402swap R0
403clr R0
404swap R0
405add.l #_sregval,R0
406move.l R0,R8
407move (sp)+,(R8)
408*line 176
409move #1,R0
410clr R1
411move R5,R1
412asl R1,R0
413or R0,_seqdupd
414*line 177
415clr R0
416bra L9
417*line 178
418L25:
419*line 179
420*line 180
421*line 181
422*line 181
423clr R0
424move R6,R0
425and #-4096,R0
426beq L26
427*line 182
428*line 183
429clr R0
430move R5,R0
431lsl #1,R0
432swap R0
433clr R0
434swap R0
435add.l #_sregval,R0
436move.l R0,R8
437move (R8),R3
438move R6,(sp)
439jsr _evaltv
440sub R0,R3
441*line 184
442*line 185
443*line 186
444tst R3
445bge L27
446*line 186
447clr R3
448*line 187
449L27:
450*line 188
451clr R0
452move R5,R0
453lsl #1,R0
454swap R0
455clr R0
456swap R0
457add.l #_sregval,R0
458move.l R0,R8
459move R3,(R8)
460*line 189
461bra L28
462L26:
463*line 190
464*line 191
465*line 192
466move R6,(sp)
467jsr _evaltv
468move R0,R3
469clr R0
470move R5,R0
471lsl #1,R0
472swap R0
473clr R0
474swap R0
475add.l #_sregval,R0
476move.l R0,R8
477move (R8),R0
478add R0,R3
479*line 193
480*line 194
481*line 195
482cmp #99,R3
483ble L29
484*line 195
485move #99,R3
486*line 196
487L29:
488*line 197
489clr R0
490move R5,R0
491lsl #1,R0
492swap R0
493clr R0
494swap R0
495add.l #_sregval,R0
496move.l R0,R8
497move R3,(R8)
498*line 198
499L28:
500*line 199
501*line 200
502*line 201
503move #1,R0
504clr R1
505move R5,R1
506asl R1,R0
507or R0,_seqdupd
508*line 202
509clr R0
510bra L9
511*line 203
512L30:
513*line 204
514*line 205
515*line 206
516move R6,(sp)
517jsr _evaltv
518move R0,R4
519*line 207
520*line 208
521*line 209
522clr R0
523move R5,R0
524lsl #1,R0
525swap R0
526clr R0
527swap R0
528add.l #_sregval,R0
529move.l R0,R8
530cmp (R8),R4
531bne L31
532*line 209
533clr R0
534bra L9
535*line 210
536bra L32
537L31:
538*line 211
539move #1,R0
540bra L9
541L32:
542*line 212
543L33:
544*line 213
545*line 214
546*line 215
547move R6,(sp)
548jsr _evaltv
549move R0,R4
550*line 216
551*line 217
552*line 218
553clr R0
554move R5,R0
555lsl #1,R0
556swap R0
557clr R0
558swap R0
559add.l #_sregval,R0
560move.l R0,R8
561cmp (R8),R4
562bls L34
563*line 218
564clr R0
565bra L9
566*line 219
567bra L35
568L34:
569*line 220
570move #1,R0
571bra L9
572L35:
573*line 221
574L36:
575*line 222
576*line 223
577*line 224
578move R6,(sp)
579jsr _evaltv
580move R0,R4
581*line 225
582*line 226
583*line 227
584clr R0
585move R5,R0
586lsl #1,R0
587swap R0
588clr R0
589swap R0
590add.l #_sregval,R0
591move.l R0,R8
592cmp (R8),R4
593bcc L37
594*line 227
595clr R0
596bra L9
597*line 228
598bra L38
599L37:
600*line 229
601move #1,R0
602bra L9
603L38:
604*line 230
605*line 231
606L39:
607*line 232
608*line 233
609*line 234
610*line 235
611clr R0
612move 8(R14),R0
613lsl #1,R0
614swap R0
615clr R0
616swap R0
617move.l R0,R8
618move.l #_seqstim,R9
619clr R0
620move 0(R8,R9.l),R0
621and #8191,R0
622move R0,R8
623move.l #_trgtab,R9
624tst.b 0(R8,R9.l)
625beq L40
626*line 235
627clr R0
628bra L9
629*line 236
630bra L41
631L40:
632*line 237
633move #1,R0
634bra L9
635L41:
636*line 238
637L42:
638*line 239
639*line 240
640*line 241
641clr R0
642move 8(R14),R0
643lsl #1,R0
644swap R0
645clr R0
646swap R0
647add.l #_seqline,R0
648move.l R0,R8
649move R6,(R8)
650*line 242
651clr R0
652move 8(R14),R0
653lsl #1,R0
654swap R0
655clr R0
656swap R0
657add.l #_seqtime,R0
658move.l R0,R8
659clr R1
660move R6,R1
661mulu #14,R1
662add.l #_seqtab,R1
663move.l R1,R9
664move (R9),(R8)
665*line 243
666clr R0
667move 8(R14),R0
668lsl #1,R0
669swap R0
670clr R0
671swap R0
672add.l #_seqflag,R0
673move.l R0,R8
674or #16384,(R8)
675*line 244
676*line 245
677move #1,R0
678clr R1
679move 8(R14),R1
680asl R1,R0
681or R0,_seqdupd
682*line 246
683move #-1,R0
684bra L9
685*line 247
686*line 248
687L43:
688*line 249
689L44:
690*line 250
691*line 251
692*line 252
693clr R0
694move 8(R14),R0
695lsl #1,R0
696swap R0
697clr R0
698swap R0
699add.l #_seqflag,R0
700move.l R0,R8
701clr (R8)
702*line 253
703clr R0
704move 8(R14),R0
705lsl #1,R0
706swap R0
707clr R0
708swap R0
709add.l #_seqtime,R0
710move.l R0,R8
711clr (R8)
712*line 254
713*line 255
714move #1,R0
715clr R1
716move 8(R14),R1
717asl R1,R0
718or R0,_seqdupd
719*line 256
720move #-1,R0
721bra L9
722*line 257
723bra L10
724L11:cmp #16,R0
725bhi L44
726asl #2,R0
727move R0,R8
728add.l #L45,R8
729move.l (R8),R8
730jmp (R8)
731.data
732L45:.dc.l L12
733.dc.l L13
734.dc.l L14
735.dc.l L15
736.dc.l L16
737.dc.l L19
738.dc.l L20
739.dc.l L21
740.dc.l L23
741.dc.l L24
742.dc.l L30
743.dc.l L33
744.dc.l L36
745.dc.l L39
746.dc.l L42
747.dc.l L43
748.dc.l L25
749.text
750L10:L9:tst.l (sp)+
751movem.l (sp)+,R3-R7
752unlk R14
753rts
754.globl _sqexec
755.text
756_sqexec:
757~~sqexec:
758~seq=R7
759link R14,#0
760movem.l R2-R7/R13-R13,-(sp)
761~act=R6
762~dat=R5
763~line=R4
764~sp=R13
765~rc=R3
766*line 277
767move 8(R14),R7
768*line 277
769clr R0
770move R7,R0
771lsl #1,R0
772swap R0
773clr R0
774swap R0
775add.l #_seqline,R0
776move.l R0,R8
777move (R8),R4
778*line 278
779clr R0
780move R4,R0
781mulu #14,R0
782move.l R0,R13
783add.l #_seqtab,R13
784*line 280
785move 2(R13),R6
786*line 281
787move 4(R13),R5
788*line 283
789move R5,(sp)
790move R6,-(sp)
791move R7,-(sp)
792jsr _dosqact
793addq.l #4,sp
794move R0,R3
795*line 291
796*line 292
797cmp #1,R3
798beq L47
799*line 293
800*line 294
801cmp #-1,R3
802beq L46
803*line 295
804*line 296
805move 6(R13),R6
806*line 297
807move 8(R13),R5
808*line 299
809move R5,(sp)
810move R6,-(sp)
811move R7,-(sp)
812jsr _dosqact
813addq.l #4,sp
814move R0,R3
815*line 307
816*line 308
817cmp #1,R3
818beq L48
819*line 309
820*line 310
821cmp #-1,R3
822beq L46
823*line 311
824L47:
825*line 312
826*line 313
827move 10(R13),R6
828*line 314
829move 12(R13),R5
830*line 316
831move R5,(sp)
832move R6,-(sp)
833move R7,-(sp)
834jsr _dosqact
835addq.l #4,sp
836move R0,R3
837*line 324
838*line 325
839cmp #-1,R3
840beq L46
841*line 326
842L48:
843*line 327
844*line 328
845*line 329
846*line 330
847clr R0
848move R7,R0
849lsl #1,R0
850swap R0
851clr R0
852swap R0
853add.l #_seqline,R0
854move.l R0,R8
855add #1,(R8)
856move (R8),R0
857cmp #1000,R0
858blo L49
859*line 330
860clr R0
861move R7,R0
862lsl #1,R0
863swap R0
864clr R0
865swap R0
866add.l #_seqline,R0
867move.l R0,R8
868clr (R8)
869*line 331
870L49:
871*line 332
872clr R0
873move R7,R0
874lsl #1,R0
875swap R0
876clr R0
877swap R0
878add.l #_seqtime,R0
879move.l R0,R8
880clr R1
881move R7,R1
882lsl #1,R1
883swap R1
884clr R1
885swap R1
886add.l #_seqline,R1
887move.l R1,R9
888clr R1
889move (R9),R1
890mulu #14,R1
891add.l #_seqtab,R1
892move.l R1,R9
893move (R9),(R8)
894*line 333
895clr R0
896move R7,R0
897lsl #1,R0
898swap R0
899clr R0
900swap R0
901add.l #_seqflag,R0
902move.l R0,R8
903or #16384,(R8)
904*line 341
905move #1,R0
906clr R1
907move R7,R1
908asl R1,R0
909or R0,_seqdupd
910L46:tst.l (sp)+
911movem.l (sp)+,R3-R7/R13-R13
912unlk R14
913rts
914.globl _seqproc
915.text
916_seqproc:
917~~seqproc:
918link R14,#-66
919movem.l R4-R7/R13-R13,-(sp)
920~oldsr=R7
921~seq=R6
922~dspn=R5
923~fp=R13
924~linbuf=-66
925*line 360
926*line 360
927tst 6+_timers
928bne L51
929*line 361
930*line 362
931clr R6
932bra L54
933L55:
934*line 363
935*line 364
936clr R0
937move R6,R0
938lsl #1,R0
939swap R0
940clr R0
941swap R0
942move.l R0,R13
943add.l #_seqflag,R13
944*line 365
945*line 366
946*line 367
947clr R0
948move (R13),R0
949and #-16384,R0
950cmp #-16384,R0
951bne L56
952*line 368
953*line 369
954*line 369
955clr R0
956move R6,R0
957lsl #1,R0
958swap R0
959clr R0
960swap R0
961move.l R0,R8
962move.l #_seqtime,R9
963tst 0(R8,R9.l)
964beq L57
965*line 370
966*line 371
967*line 372
968clr R0
969move R6,R0
970lsl #1,R0
971swap R0
972clr R0
973swap R0
974add.l #_seqtime,R0
975move.l R0,R8
976sub #1,(R8)
977bne L58
978*line 372
979and #-16385,(R13)
980*line 373
981L58:bra L59
982L57:
983*line 374
984*line 375
985*line 376
986and #-16385,(R13)
987L59:
988*line 377
989*line 378
990L56:L53:
991*line 362
992add #1,R6
993L54:
994*line 362
995cmp #16,R6
996blo L55
997L52:
998*line 379
999*line 380
1000*line 381
1001move #9984,(sp)
1002jsr _setsr
1003move R0,R7
1004*line 382
1005move #10,6+_timers
1006*line 383
1007move R7,(sp)
1008jsr _setsr
1009*line 384
1010*line 385
1011L51:
1012*line 386
1013clr R6
1014bra L62
1015L63:
1016*line 387
1017*line 388
1018clr R0
1019move R6,R0
1020lsl #1,R0
1021swap R0
1022clr R0
1023swap R0
1024move.l R0,R8
1025move.l #_seqflag,R9
1026clr R0
1027move 0(R8,R9.l),R0
1028and #-16384,R0
1029cmp #-32768,R0
1030bne L64
1031*line 388
1032move R6,(sp)
1033jsr _sqexec
1034*line 389
1035*line 390
1036L64:L61:
1037*line 386
1038add #1,R6
1039L62:
1040*line 386
1041cmp #16,R6
1042blo L63
1043L60:
1044*line 391
1045*line 391
1046cmp #1,_ndisp
1047beq L10006
1048cmp #3,_ndisp
1049bne L65
1050L10006:tst _dsp_ok
1051beq L65
1052tst _seqdupd
1053beq L65
1054*line 392
1055*line 397
1056*line 398
1057*line 398
1058move #1,R0
1059move _seqdspn,R1
1060asl R1,R0
1061and _seqdupd,R0
1062beq L66
1063*line 399
1064*line 400
1065move _seqdspn,R5
1066*line 401
1067*line 402
1068*line 403
1069clr R0
1070move 10+_v_regs,R0
1071and #384,R0
1072beq L67
1073*line 403
1074clr (sp)
1075jsr _vbank
1076*line 404
1077L67:
1078*line 405
1079*line 406
1080*line 407
1081*line 408
1082move R5,R8
1083add.l R8,R8
1084move.l #_trstate,R9
1085move 0(R8,R9.l),(sp)
1086add #48,(sp)
1087move R5,R8
1088add.l R8,R8
1089move.l #_sregval,R9
1090move 0(R8,R9.l),-(sp)
1091move R5,R8
1092add.l R8,R8
1093move.l #_seqline,R9
1094move 0(R8,R9.l),-(sp)
1095move.l #L68,-(sp)
1096move.l R14,-(sp)
1097add.l #-66,(sp)
1098jsr _sprintf
1099adda.l #12,sp
1100*line 409
1101*line 410
1102*line 411
1103move.l #_cg3,(sp)
1104move #14,-(sp)
1105move #14,-(sp)
1106move.l R14,-(sp)
1107add.l #-66,(sp)
1108move #1,-(sp)
1109move R5,-(sp)
1110move #2,-(sp)
1111move #1,-(sp)
1112move #16,-(sp)
1113move.l _obj10,-(sp)
1114jsr _vvputsv
1115adda.l #22,sp
1116*line 412
1117*line 413
1118*line 414
1119move R5,(sp)
1120add #1,(sp)
1121move.l #L69,-(sp)
1122move.l R14,-(sp)
1123add.l #-66,(sp)
1124jsr _sprintf
1125addq.l #8,sp
1126*line 415
1127*line 416
1128*line 417
1129*line 418
1130*line 419
1131move.l #_cg3,(sp)
1132move #14,-(sp)
1133move #14,-(sp)
1134move.l R14,-(sp)
1135add.l #-66,(sp)
1136move #2,-(sp)
1137move R5,-(sp)
1138move #2,-(sp)
1139move R5,R8
1140add.l R8,R8
1141move.l #_seqflag,R9
1142clr R0
1143move 0(R8,R9.l),R0
1144and #-32768,R0
1145beq L10007
1146move #6,-(sp)
1147bra L10009
1148L10007:move #1,-(sp)
1149L10009:move #16,-(sp)
1150move.l _obj10,-(sp)
1151jsr _vvputsv
1152adda.l #22,sp
1153*line 424
1154*line 425
1155move #1,R0
1156move R5,R1
1157asl R1,R0
1158not R0
1159and R0,_seqdupd
1160*line 426
1161*line 427
1162L66:
1163*line 428
1164*line 429
1165add #1,_seqdspn
1166move _seqdspn,R0
1167cmp #15,R0
1168ble L70
1169*line 429
1170clr _seqdspn
1171L70:
1172*line 430
1173L65:L50:tst.l (sp)+
1174movem.l (sp)+,R5-R7/R13-R13
1175unlk R14
1176rts
1177.data
1178L68:.dc.b $20,$20,$20,$20,$25,$30,$33,$64,$20,$25,$30,$32,$64,$20,$25,$63,$20,$0
1179L69:.dc.b $25,$30,$32,$64,$0
Note: See TracBrowser for help on using the repository browser.