source: buchla-68k/alcyon/asgvce.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: 11.7 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 _clksrc
65.globl _curasg
66.globl _legato
67.globl _lstbgnc
68.globl _lstendc
69.globl _lstflag
70.globl _ndisp
71.globl _newflag
72.globl _nkdown
73.globl _recsw
74.globl _sd
75.globl _se
76.globl _stepenb
77.globl _stepint
78.globl _stepwgt
79.globl _velflag
80.globl _grpmode
81.globl _grpstat
82.globl _ins2grp
83.globl _vce2grp
84.globl _lastvce
85.globl _lastvel
86.globl _tuntab
87.globl _vce2trg
88.globl _stepfrm
89.globl _obj8
90.globl _gdstbc
91.globl _lstbgns
92.globl _lstends
93.globl _nefree
94.globl _nelist
95.globl _nevents
96.globl _clrnl
97.text
98_clrnl:
99~~clrnl:
100link R14,#0
101movem.l R6-R7,-(sp)
102~i=R7
103*line 90
104clr R7
105bra L4
106L5:
107*line 91
108*line 92
109move R7,R0
110add #1,R0
111asl #3,R0
112ext.l R0
113add.l #_nevents,R0
114move R7,R1
115asl #3,R1
116ext.l R1
117add.l #_nevents,R1
118move.l R1,R9
119move.l R0,(R9)
120*line 93
121move R7,R0
122asl #3,R0
123ext.l R0
124add.l #_nevents,R0
125move.l R0,R8
126clr 4(R8)
127*line 94
128move R7,R0
129asl #3,R0
130ext.l R0
131add.l #_nevents,R0
132move.l R0,R8
133clr 4(R8)
134L3:
135*line 90
136add #1,R7
137L4:
138*line 90
139cmp #31,R7
140blt L5
141L2:
142*line 97
143clr.l 248+_nevents
144*line 99
145clr.l _nelist
146*line 100
147move.l #_nevents,_nefree
148*line 101
149clr _nkdown
150L1:tst.l (sp)+
151movem.l (sp)+,R7-R7
152unlk R14
153rts
154.globl _ne_end
155.text
156_ne_end:
157~~ne_end:
158~grp=R7
159~trg=8
160link R14,#0
161movem.l R4-R7/R12-R13,-(sp)
162~nn=R6
163~fcend=R5
164~nx=R13
165~ep=R12
166*line 124
167move 10(R14),R7
168*line 128
169*line 128
170tst _recsw
171beq L10000
172move R7,R8
173add.l R8,R8
174add.l #_grpmode,R8
175cmp #2,(R8)
176beq L7
177L10000:*line 129
178*line 130
179bra L6
180*line 131
181*line 132
182*line 133
183L7:
184*line 138
185*line 139
186cmp #1,_sd
187bne L8
188*line 139
189jsr _chgsdf
190*line 140
191L8:
192*line 141
193*line 142
194cmp #1,_se
195bne L9
196*line 142
197jsr _chgsef
198*line 143
199*line 144
200L9:
201*line 145
202move 8(R14),R6
203and #127,R6
204*line 147
205*line 147
206cmp #6,_clksrc
207beq L10
208*line 148
209*line 149
210*line 150
211*line 151
212*line 151
213move #5,(sp)
214jsr _e_alc
215move.l R0,R12
216move.l R12,R0
217beq L11
218*line 152
219*line 153
220*line 154
221move.l _t_cur,(R12)
222*line 155
223move.b #134,5(R12)
224*line 156
225move.b R6,6(R12)
226*line 157
227move.b R7,7(R12)
228*line 158
229move #16128,16(R12)
230*line 159
231*line 160
232*line 161
233move.l _t_cur,(sp)
234clr -(sp)
235move.l _p_cur,-(sp)
236jsr _ep_adj
237addq.l #6,sp
238move.l R0,(sp)
239move.l R12,-(sp)
240jsr _e_ins
241addq.l #4,sp
242move.l R0,R8
243move.l 12(R8),_p_cur
244*line 162
245*line 163
246*line 164
247move.l _t_cur,R0
248cmp.l _t_ctr,R0
249bne L12
250*line 164
251move #1,_newflag
252*line 165
253L12:
254*line 166
255move #1,(sp)
256move.l #_gdstbc,-(sp)
257clr -(sp)
258move.l R12,-(sp)
259jsr _se_disp
260adda.l #10,sp
261*line 167
262bra L13
263L11:
264*line 168
265*line 169
266*line 170
267L13:
268*line 171
269*line 172
270*line 173
271bra L6
272*line 174
273*line 175
274*line 176
275bra L14
276L10:
277*line 177
278*line 177
279cmp #1,_nkdown
280blt L15
281*line 178
282*line 179
283*line 180
284*line 181
285*line 181
286sub #1,_nkdown
287bne L16
288*line 182
289*line 183
290*line 183
291tst _stepenb
292beq L17
293*line 184
294*line 185
295*line 186
296*line 187
297*line 188
298move _stepint,R8
299add.l R8,R8
300move.l #_stepfrm,R9
301move 102(R8,R9.l),R0
302ext.l R0
303move.l R0,R5
304add.l _fc_val,R5
305*line 189
306move _stepwgt,R0
307muls #34,R0
308move _stepint,R1
309asl #1,R1
310ext.l R1
311add.l R1,R0
312move.l R0,R8
313move.l #_stepfrm,R9
314move 0(R8,R9.l),R0
315ext.l R0
316add.l R0,_fc_val
317*line 190
318move.l _fc_val,(sp)
319jsr _sc_trek
320*line 191
321move.l _fc_val,(sp)
322jsr _sc_trak
323*line 192
324*line 193
325*line 194
326L17:
327*line 195
328bra L20
329L19:
330*line 196
331*line 197
332move.l _nelist,R8
333move 6(R8),R6
334*line 198
335move.l _nelist,R8
336move 4(R8),R7
337*line 199
338*line 200
339*line 200
340move #5,(sp)
341jsr _e_alc
342move.l R0,R12
343move.l R12,R0
344beq L21
345*line 201
346*line 202
347*line 203
348move.l _t_cur,(R12)
349*line 204
350move.b #134,5(R12)
351*line 205
352move.b R6,6(R12)
353*line 206
354move.b R7,7(R12)
355*line 207
356move #16128,16(R12)
357*line 208
358*line 209
359*line 210
360move.l _t_cur,(sp)
361clr -(sp)
362move.l _p_cur,-(sp)
363jsr _ep_adj
364addq.l #6,sp
365move.l R0,(sp)
366move.l R12,-(sp)
367jsr _e_ins
368addq.l #4,sp
369move.l R0,R8
370move.l 12(R8),_p_cur
371*line 211
372*line 212
373move #1,(sp)
374move.l #_gdstbc,-(sp)
375clr -(sp)
376move.l R12,-(sp)
377jsr _se_disp
378adda.l #10,sp
379*line 213
380*line 214
381*line 215
382cmp #48,_lstendc
383bge L22
384*line 215
385move _lstendc,R8
386add.l R8,R8
387add.l R8,R8
388add.l #_lstends,R8
389move.l R12,(R8)
390add #1,_lstendc
391*line 216
392L22:bra L23
393L21:
394*line 217
395*line 218
396*line 219
397L23:
398*line 220
399*line 221
400*line 222
401*line 223
402*line 224
403move.l _nelist,R8
404move.l (R8),R13
405*line 225
406move.l _nelist,R8
407move.l _nefree,(R8)
408*line 226
409move.l _nelist,_nefree
410*line 227
411move.l R13,_nelist
412L20:
413*line 228
414tst.l _nelist
415bne L19
416L18:
417*line 229
418*line 230
419move #1,_lstflag
420*line 231
421*line 232
422*line 233
423*line 234
424*line 234
425tst _stepenb
426beq L24
427*line 235
428*line 236
429*line 236
430cmp.l _fc_val,R5
431ble L25
432*line 237
433*line 238
434*line 239
435move.l R5,_fc_val
436*line 240
437move.l _fc_val,(sp)
438jsr _sc_trek
439*line 241
440move.l _fc_val,(sp)
441jsr _sc_trak
442*line 242
443L25:
444*line 243
445L24:
446*line 244
447*line 245
448L16:bra L26
449L15:
450*line 246
451*line 247
452*line 248
453clr _nkdown
454*line 249
455*line 250
456clr _lstendc
457*line 251
458clr _lstbgnc
459*line 252
460clr _lstflag
461L26:L14:L6:tst.l (sp)+
462movem.l (sp)+,R5-R7/R12-R13
463unlk R14
464rts
465.globl _ne_bgn
466.text
467_ne_bgn:
468~~ne_bgn:
469~grp=R7
470~key=R6
471~vel=R5
472link R14,#0
473movem.l R4-R7/R12-R13,-(sp)
474~ep=R13
475~np=R12
476*line 273
477move 8(R14),R7
478*line 273
479move 10(R14),R6
480*line 273
481move 12(R14),R5
482*line 277
483*line 277
484tst _recsw
485beq L28
486move R7,R8
487add.l R8,R8
488add.l #_grpmode,R8
489cmp #2,(R8)
490bne L28
491*line 278
492*line 279
493*line 280
494*line 281
495*line 282
496*line 283
497*line 284
498cmp #1,_sd
499bne L29
500*line 284
501jsr _chgsdf
502*line 285
503L29:
504*line 286
505*line 287
506cmp #1,_se
507bne L30
508*line 287
509jsr _chgsef
510*line 288
511L30:
512*line 289
513*line 289
514tst _lstflag
515beq L31
516*line 290
517*line 291
518clr _lstbgnc
519*line 292
520clr _lstendc
521*line 293
522clr _lstflag
523*line 294
524*line 295
525L31:
526*line 296
527*line 296
528cmp #6,_clksrc
529bne L32
530*line 297
531*line 298
532*line 299
533add #1,_nkdown
534*line 300
535*line 301
536*line 301
537tst.l _nefree
538beq L33
539*line 302
540*line 303
541move.l _nefree,R12
542*line 304
543move.l (R12),_nefree
544*line 305
545move R6,6(R12)
546*line 306
547move R7,4(R12)
548*line 307
549move.l _nelist,(R12)
550*line 308
551move.l R12,_nelist
552*line 309
553*line 310
554bra L34
555L33:
556*line 311
557*line 312
558*line 313
559L34:
560*line 314
561*line 315
562*line 316
563*line 317
564L32:
565*line 318
566*line 318
567move #5,(sp)
568jsr _e_alc
569move.l R0,R13
570move.l R13,R0
571beq L35
572*line 319
573*line 320
574*line 321
575move.l _t_cur,(R13)
576*line 322
577move.b #133,5(R13)
578*line 323
579move.b R6,6(R13)
580*line 324
581move.b R7,7(R13)
582*line 325
583cmp #6,_clksrc
584bne L10001
585move #16128,R0
586bra L10003
587L10001:move R5,R0
588L10003:move R0,16(R13)
589*line 326
590*line 327
591*line 328
592move.l _t_cur,(sp)
593clr -(sp)
594move.l _p_cur,-(sp)
595jsr _ep_adj
596addq.l #6,sp
597move.l R0,(sp)
598move.l R13,-(sp)
599jsr _e_ins
600addq.l #4,sp
601move.l R0,R8
602move.l 12(R8),_p_cur
603*line 329
604*line 330
605move #1,(sp)
606move.l #_gdstbc,-(sp)
607clr -(sp)
608move.l R13,-(sp)
609jsr _se_disp
610adda.l #10,sp
611*line 331
612*line 332
613*line 333
614move.l _t_cur,R0
615cmp.l _t_ctr,R0
616bne L36
617*line 333
618move #1,_newflag
619*line 334
620L36:
621*line 335
622*line 336
623cmp #6,_clksrc
624bne L37
625cmp #48,_lstbgnc
626bge L37
627*line 336
628move _lstbgnc,R8
629add.l R8,R8
630add.l R8,R8
631add.l #_lstbgns,R8
632move.l R13,(R8)
633add #1,_lstbgnc
634*line 337
635L37:bra L38
636L35:
637*line 338
638*line 339
639*line 340
640L38:
641*line 341
642*line 342
643*line 343
644L28:L27:tst.l (sp)+
645movem.l (sp)+,R5-R7/R12-R13
646unlk R14
647rts
648.globl _showvel
649.text
650_showvel:
651~~showvel:
652~g=8
653~v=10
654link R14,#-10
655~buf=-6
656*line 361
657*line 362
658clr R0
659move 10+_v_regs,R0
660and #384,R0
661beq L40
662*line 362
663clr (sp)
664jsr _vbank
665*line 363
666L40:
667*line 364
668move 8(R14),R8
669add.l R8,R8
670add.l #_lastvel,R8
671move 10(R14),(R8)
672*line 366
673move 10(R14),R0
674ext.l R0
675divs #252,R0
676move R0,(sp)
677move.l #L41,-(sp)
678move.l R14,-(sp)
679sub.l #6,(sp)
680jsr _sprintf
681addq.l #8,sp
682*line 368
683move #18,(sp)
684move.l R14,-(sp)
685sub.l #6,(sp)
686move 8(R14),R0
687muls #5,R0
688move R0,-(sp)
689add #6,(sp)
690move #5,-(sp)
691move.l _obj8,-(sp)
692jsr _vputs
693adda.l #12,sp
694L39:unlk R14
695rts
696.globl _asgvce
697.text
698_asgvce:
699~~asgvce:
700~grp=8
701~port=10
702~chan=12
703~key=14
704~vel=16
705link R14,#0
706movem.l R2-R7/R12-R13,-(sp)
707~i=R7
708~tv=R6
709~vp=R5
710~trg=R4
711~aflag=R3
712~np=R13
713~ep=R12
714*line 393
715move 10(R14),R4
716move #11,R0
717asl R0,R4
718move 12(R14),R0
719asl #7,R0
720add R0,R4
721add 14(R14),R4
722*line 394
723move 8(R14),R8
724add.l R8,R8
725add.l #_lastvce,R8
726move (R8),R5
727add #1,R5
728*line 395
729cmp #11,R5
730ble L10004
731clr R0
732bra L10006
733L10004:move R5,R0
734L10006:move R0,R5
735*line 402
736move #12,R7
737bra L45
738L46:
739*line 403
740*line 404
741*line 404
742move R5,R8
743add.l R8,R8
744add.l #_vce2trg,R8
745cmp #-1,(R8)
746bne L47
747move R5,R8
748add.l R8,R8
749move.l #_vce2grp,R9
750move 0(R8,R9.l),R0
751move 8(R14),R1
752add #1,R1
753cmp R1,R0
754bne L47
755*line 405
756*line 406
757*line 407
758cmp #2,_ndisp
759bne L48
760tst _velflag
761beq L48
762tst _recsw
763bne L48
764*line 407
765move 16(R14),(sp)
766move 8(R14),-(sp)
767jsr _showvel
768addq.l #2,sp
769*line 408
770L48:
771*line 409
772move 8(R14),R8
773add.l R8,R8
774add.l #_lastvce,R8
775move R5,(R8)
776*line 410
777clr (sp)
778move R5,-(sp)
779move 14(R14),R8
780add.l R8,R8
781move.l #_tuntab,R9
782move 0(R8,R9.l),-(sp)
783move R4,-(sp)
784jsr _execkey
785addq.l #6,sp
786*line 411
787bra L42
788*line 412
789*line 413
790*line 414
791L47:
792*line 415
793*line 416
794add #1,R5
795move R5,R0
796cmp #11,R0
797ble L49
798*line 416
799clr R5
800L49:L44:L45:
801*line 402
802move R7,R0
803sub #1,R7
804tst R0
805bne L46
806L43:
807*line 421
808move #12,R7
809bra L52
810L53:
811*line 422
812*line 423
813move R5,R8
814add.l R8,R8
815add.l #_vce2trg,R8
816move (R8),R6
817*line 424
818*line 425
819*line 426
820cmp #-1,R6
821bne L54
822*line 426
823move #1,R3
824bra L55
825L54:
826*line 427
827*line 428
828move R6,R0
829and #-16384,R0
830bne L56
831*line 428
832move #1,R3
833*line 429
834bra L57
835L56:
836*line 430
837clr R3
838L57:L55:
839*line 431
840*line 432
841*line 432
842tst R3
843beq L58
844move R5,R8
845add.l R8,R8
846move.l #_vce2grp,R9
847move 0(R8,R9.l),R0
848move 8(R14),R1
849add #1,R1
850cmp R1,R0
851bne L58
852*line 433
853*line 434
854*line 435
855*line 436
856move 8(R14),R8
857add.l R8,R8
858add.l #_ins2grp,R8
859btst #0,(R8)
860beq L59
861cmp R4,R6
862beq L59
863cmp #-1,R6
864beq L59
865*line 436
866move #1,_legato
867*line 437
868L59:
869*line 438
870*line 439
871cmp #2,_ndisp
872bne L60
873tst _velflag
874beq L60
875tst _recsw
876bne L60
877*line 439
878move 16(R14),(sp)
879move 8(R14),-(sp)
880jsr _showvel
881addq.l #2,sp
882*line 440
883L60:
884*line 441
885move 8(R14),R8
886add.l R8,R8
887add.l #_lastvce,R8
888move R5,(R8)
889*line 442
890clr (sp)
891move R5,-(sp)
892move 14(R14),R8
893add.l R8,R8
894move.l #_tuntab,R9
895move 0(R8,R9.l),-(sp)
896move R4,-(sp)
897jsr _execkey
898addq.l #6,sp
899*line 443
900bra L42
901*line 444
902*line 445
903*line 446
904L58:
905*line 447
906*line 448
907add #1,R5
908move R5,R0
909cmp #11,R0
910ble L61
911*line 448
912clr R5
913L61:L51:L52:
914*line 421
915move R7,R0
916sub #1,R7
917tst R0
918bne L53
919L50:L42:tst.l (sp)+
920movem.l (sp)+,R3-R7/R12-R13
921unlk R14
922rts
923.data
924L41:.dc.b $25,$30,$33,$64,$0
Note: See TracBrowser for help on using the repository browser.