source: buchla-68k/alcyon/sqdkey.s@ abd4109

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

Added Alcyon C reference output.

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