source: buchla-68k/alcyon/enterit.s@ 0170798

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 12.7 KB
Line 
1.globl _v_obtab
2.globl _v_curob
3.globl _v_nobj
4.globl _v_obpri
5.globl _io_time
6.globl _io_lcd
7.globl _io_ser
8.globl _io_midi
9.globl _io_disk
10.globl _io_tone
11.globl _io_leds
12.globl _io_kbrd
13.globl _lcd_a0
14.globl _lcd_a1
15.globl _io_vreg
16.globl _io_vraw
17.globl _io_vram
18.globl _io_fpu
19.globl _v_regs
20.globl _v_odtab
21.globl _v_actab
22.globl _v_ct0
23.globl _v_gt1
24.globl _v_score
25.globl _v_cgtab
26.globl _v_curs0
27.globl _v_curs1
28.globl _v_curs2
29.globl _v_curs3
30.globl _v_curs4
31.globl _v_curs5
32.globl _v_curs6
33.globl _v_curs7
34.globl _v_tcur
35.globl _v_kbobj
36.globl _v_lnobj
37.globl _v_win0
38.globl _v_cur
39.globl _fc_sw
40.globl _fc_val
41.globl _ebflag
42.globl _ebuf
43.globl _curfet
44.globl _cfetp
45.globl _infetp
46.globl _ac_code
47.globl _scname
48.globl _se_chg
49.globl _curscor
50.globl _cursect
51.globl _se1_cnt
52.globl _se2_cnt
53.globl _se3_cnt
54.globl _spool
55.globl _pspool
56.globl _spcount
57.globl _frags
58.globl _t_bak
59.globl _t_cur
60.globl _t_ctr
61.globl _t_fwd
62.globl _size1
63.globl _size2
64.globl _size3
65.globl _scores
66.globl _scp
67.globl _seclist
68.globl _hplist
69.globl _p_bak
70.globl _p_cur
71.globl _p_ctr
72.globl _p_fwd
73.globl _cx_key
74.globl _cy_key
75.globl _cx_upd
76.globl _cy_upd
77.globl _xy_up
78.globl _xy_dn
79.globl _not_fld
80.globl _x_key
81.globl _e_key
82.globl _m_key
83.globl _d_key
84.globl _premove
85.globl _pstmove
86.globl _curtype
87.globl _cratex
88.globl _cratey
89.globl _asig
90.globl _aval
91.globl _astat
92.globl _aflag
93.globl _xkstat
94.globl _ykstat
95.globl _xkcount
96.globl _ykcount
97.globl _cmtype
98.globl _cmfirst
99.globl _xycntr
100.globl _curpos
101.globl _cxrate
102.globl _cyrate
103.globl _cxval
104.globl _cyval
105.globl _ncvwait
106.globl _nchwait
107.globl _chwait
108.globl _cvwait
109.globl _cvtime
110.globl _chtime
111.globl _stcrow
112.globl _stccol
113.globl _runit
114.globl _submenu
115.globl _vtcrow
116.globl _vtccol
117.globl _trkball
118.globl _tkctrl
119.globl _txflag
120.globl _tyflag
121.globl _curhold
122.globl _hcwval
123.globl _thcwval
124.globl _tvcwval
125.globl _vcwval
126.globl _sigtab
127.globl _crate0
128.globl _syrate
129.data
130_syrate:
131.dc.w $4
132.globl _LastRow
133.data
134_LastRow:
135.dc.w $FFFF
136.globl _LastCol
137.data
138_LastCol:
139.dc.w $FFFF
140.globl _enterit
141.text
142_enterit:
143~~enterit:
144link R14,#-4
145*line 74
146*line 75
147tst _astat
148beq L1
149*line 76
150*line 81
151*line 82
152*line 83
153*line 83
154move.l _curfet,(sp)
155move _stccol,-(sp)
156move _stcrow,-(sp)
157jsr _infield
158addq.l #4,sp
159tst R0
160beq L2
161*line 84
162*line 85
163move.l _infetp,_cfetp
164*line 86
165*line 87
166*line 88
167tst.l _cfetp
168beq L3
169tst _ebflag
170bne L3
171*line 88
172move.l _cfetp,R8
173move 6(R8),-(sp)
174move.l _cfetp,R8
175move.l 8(R8),R8
176jsr (R8)
177addq.l #2,sp
178*line 89
179L3:
180*line 90
181*line 91
182tst.l _cfetp
183beq L4
184*line 91
185move.l _cfetp,R8
186move 6(R8),-(sp)
187move.l _cfetp,R8
188move.l 12(R8),R8
189jsr (R8)
190addq.l #2,sp
191*line 92
192L4:
193*line 93
194*line 94
195tst.l _cfetp
196beq L5
197*line 94
198move.l _cfetp,R8
199move 6(R8),-(sp)
200move.l _cfetp,R8
201move.l 16(R8),R8
202jsr (R8)
203addq.l #2,sp
204*line 95
205L5:
206*line 96
207clr _ebflag
208*line 97
209L2:L1:unlk R14
210rts
211.globl _nokey
212.text
213_nokey:
214~~nokey:
215link R14,#-4
216*line 112
217clr R0
218bra L6
219L6:unlk R14
220rts
221.globl _cmvgen
222.text
223_cmvgen:
224~~cmvgen:
225link R14,#0
226movem.l R3-R7,-(sp)
227~nc=R7
228~newrow=R6
229~newcol=R5
230~newpos=R4
231*line 128
232move.l _premove,R8
233jsr (R8)
234*line 130
235move.l _curtype,R8
236jsr (R8)
237move R0,R7
238*line 132
239move _cyval,R6
240ext.l R6
241divs #14,R6
242*line 133
243move _cxval,R5
244asr #3,R5
245*line 135
246*line 135
247cmp _cmtype,R7
248beq L8
249*line 136
250*line 137
251move _curhold,_nchwait
252*line 138
253move _curhold,_ncvwait
254*line 139
255*line 140
256move #-1,_LastRow
257*line 141
258move #-1,_LastCol
259*line 142
260*line 143
261*line 144
262*line 145
263L8:
264*line 146
265*line 147
266cmp _LastRow,R6
267bne L10000
268cmp _LastCol,R5
269beq L9
270L10000:*line 147
271move #1,R4
272*line 148
273bra L10
274L9:
275*line 149
276clr R4
277L10:
278*line 153
279tst R7
280bne L10001
281move _hcwval,R0
282bra L10003
283L10001:move _thcwval,R0
284L10003:move R0,_chtime
285*line 154
286tst R7
287bne L10004
288move _vcwval,R0
289bra L10006
290L10004:cmp #4,R7
291bne L10007
292move _syrate,R0
293bra L10009
294L10007:move _tvcwval,R0
295L10009:L10006:move R0,_cvtime
296*line 156
297move R7,R0
298bra L12
299*line 157
300L13:
301*line 158
302*line 159
303*line 160
304*line 160
305cmp #3,_cmtype
306bne L14
307*line 161
308*line 162
309jsr _stcoff
310*line 163
311jsr _sgcon
312*line 164
313*line 165
314L14:
315*line 166
316move R7,_cmtype
317*line 167
318move _cyval,(sp)
319move _cxval,-(sp)
320jsr _gcurpos
321addq.l #2,sp
322bra L11
323*line 168
324*line 169
325*line 170
326*line 171
327L15:
328*line 172
329*line 173
330*line 174
331move R7,_cmtype
332*line 175
333*line 176
334*line 177
335tst R4
336beq L16
337*line 177
338move R5,(sp)
339move R6,-(sp)
340jsr _itcpos
341addq.l #2,sp
342*line 178
343L16:bra L11
344*line 179
345*line 180
346L17:
347*line 181
348*line 182
349*line 183
350move R7,_cmtype
351*line 184
352move _vtccol,(sp)
353move _vtcrow,-(sp)
354jsr _ttcpos
355addq.l #2,sp
356bra L11
357*line 185
358*line 186
359L18:
360*line 187
361*line 188
362*line 189
363*line 190
364tst _cmtype
365bne L19
366*line 190
367jsr _sgcoff
368*line 191
369L19:
370*line 192
371move R7,_cmtype
372*line 193
373*line 194
374*line 195
375tst R4
376beq L20
377*line 195
378move R5,(sp)
379move R6,-(sp)
380jsr _stcpos
381addq.l #2,sp
382*line 196
383L20:bra L11
384*line 197
385*line 198
386L21:
387*line 199
388*line 200
389*line 201
390move R7,_cmtype
391*line 202
392*line 203
393*line 204
394tst R4
395beq L22
396*line 204
397move R5,(sp)
398move R6,-(sp)
399jsr _ctcpos
400addq.l #2,sp
401*line 205
402L22:bra L11
403*line 206
404*line 207
405L23:
406*line 208
407*line 209
408*line 210
409move R7,_cmtype
410*line 211
411move _vtccol,(sp)
412move _vtcrow,-(sp)
413jsr _mtcpos
414addq.l #2,sp
415bra L11
416*line 212
417bra L11
418L12:cmp #5,R0
419bhi L11
420asl #2,R0
421move R0,R8
422add.l #L24,R8
423move.l (R8),R8
424jmp (R8)
425.data
426L24:.dc.l L13
427.dc.l L15
428.dc.l L17
429.dc.l L18
430.dc.l L21
431.dc.l L23
432.text
433L11:
434*line 215
435move R6,_LastRow
436*line 216
437move R5,_LastCol
438*line 218
439move.l _pstmove,R8
440jsr (R8)
441L7:tst.l (sp)+
442movem.l (sp)+,R4-R7
443unlk R14
444rts
445.globl _crxrate
446.text
447_crxrate:
448~~crxrate:
449~cv=R7
450link R14,#0
451movem.l R5-R7,-(sp)
452~cs=R6
453*line 236
454move 8(R14),R7
455*line 236
456*line 236
457cmp _xycntr,R7
458blt L26
459*line 237
460*line 238
461sub _xycntr,R7
462*line 239
463move #1,R6
464*line 240
465move R7,R0
466neg R0
467move R0,_curpos
468*line 241
469bra L27
470L26:
471*line 242
472*line 243
473*line 244
474move _xycntr,R0
475sub R7,R0
476move R0,R7
477*line 245
478clr R6
479*line 246
480move R7,_curpos
481L27:
482*line 249
483*line 250
484cmp #127,R7
485ble L28
486*line 250
487move #127,R7
488*line 251
489L28:
490*line 252
491tst R6
492beq L10010
493move.l _cratex,R8
494move R7,R9
495add.l R9,R9
496move 0(R8,R9.l),R0
497neg R0
498bra L10012
499L10010:move.l _cratex,R8
500move R7,R9
501add.l R9,R9
502move 0(R8,R9.l),R0
503L10012:bra L25
504L25:tst.l (sp)+
505movem.l (sp)+,R6-R7
506unlk R14
507rts
508.globl _cryrate
509.text
510_cryrate:
511~~cryrate:
512~cv=R7
513link R14,#0
514movem.l R5-R7,-(sp)
515~cs=R6
516*line 270
517move 8(R14),R7
518*line 270
519*line 270
520cmp _xycntr,R7
521blt L30
522*line 271
523*line 272
524sub _xycntr,R7
525*line 273
526move #1,R6
527*line 274
528move R7,R0
529neg R0
530move R0,_curpos
531*line 275
532bra L31
533L30:
534*line 276
535*line 277
536*line 278
537move _xycntr,R0
538sub R7,R0
539move R0,R7
540*line 279
541clr R6
542*line 280
543move R7,_curpos
544L31:
545*line 283
546*line 284
547cmp #127,R7
548ble L32
549*line 284
550move #127,R7
551*line 285
552L32:
553*line 286
554tst R6
555beq L10013
556move.l _cratey,R8
557move R7,R9
558add.l R9,R9
559move 0(R8,R9.l),R0
560neg R0
561bra L10015
562L10013:move.l _cratey,R8
563move R7,R9
564add.l R9,R9
565move 0(R8,R9.l),R0
566L10015:bra L29
567L29:tst.l (sp)+
568movem.l (sp)+,R6-R7
569unlk R14
570rts
571.globl _cmfix
572.text
573_cmfix:
574~~cmfix:
575link R14,#0
576movem.l R3-R7,-(sp)
577~acx=R7
578~acy=R6
579~scx=R5
580~scy=R4
581*line 302
582move 220+_sigtab,(sp)
583jsr _crxrate
584*line 303
585tst _curpos
586bge L10016
587move _curpos,R0
588neg R0
589bra L10018
590L10016:move _curpos,R0
591L10018:move R0,R7
592*line 305
593move 224+_sigtab,(sp)
594jsr _cryrate
595*line 306
596tst _curpos
597bge L10019
598move _curpos,R0
599neg R0
600bra L10021
601L10019:move _curpos,R0
602L10021:move R0,R6
603*line 308
604tst _cxrate
605bge L10022
606move #-1,R0
607bra L10024
608L10022:move #1,R0
609L10024:move R0,R5
610*line 309
611tst _cyrate
612bge L10025
613move #-1,R0
614bra L10027
615L10025:move #1,R0
616L10027:move R0,R4
617*line 311
618*line 311
619tst _cmfirst
620beq L34
621*line 312
622*line 313
623*line 313
624cmp R6,R7
625blt L35
626*line 314
627*line 315
628clr _cyrate
629*line 316
630move R5,_cxrate
631*line 317
632move _curhold,_nchwait
633*line 318
634move _cvtime,_ncvwait
635*line 319
636bra L36
637L35:
638*line 320
639*line 321
640*line 322
641clr _cxrate
642*line 323
643move R4,_cyrate
644*line 324
645move _curhold,_ncvwait
646*line 325
647move _chtime,_nchwait
648L36:
649*line 326
650*line 327
651*line 328
652clr _cmfirst
653*line 329
654bra L37
655L34:
656*line 330
657*line 331
658*line 332
659*line 333
660*line 334
661*line 335
662tst _cmtype
663beq L38
664*line 335
665*line 336
666cmp R6,R7
667blt L39
668*line 336
669clr _cyrate
670*line 337
671bra L40
672L39:
673*line 338
674clr _cxrate
675L40:L38:L37:L33:tst.l (sp)+
676movem.l (sp)+,R4-R7
677unlk R14
678rts
679.globl _cxkstd
680.text
681_cxkstd:
682~~cxkstd:
683link R14,#-4
684*line 353
685clr _trkball
686*line 354
687clr _tkctrl
688*line 355
689clr _txflag
690*line 356
691clr _tyflag
692*line 358
693*line 358
694tst _astat
695beq L42
696*line 359
697*line 360
698*line 360
699tst _xkstat
700bne L43
701*line 361
702*line 362
703*line 362
704tst _xkcount
705beq L44
706*line 363
707*line 364
708sub #1,_xkcount
709bra L41
710*line 365
711*line 366
712*line 367
713L44:
714*line 368
715move #1,_xkstat
716*line 369
717move #1,_chwait
718*line 370
719move _curhold,_nchwait
720*line 371
721*line 372
722*line 373
723tst _ykstat
724beq L45
725*line 373
726move.l _xy_dn,R8
727jsr (R8)
728L45:
729*line 374
730*line 375
731L43:
732*line 376
733move _aval,(sp)
734jsr _crxrate
735neg R0
736move R0,_cxrate
737*line 377
738*line 378
739bra L46
740L42:
741*line 379
742*line 380
743*line 381
744*line 382
745tst _xkstat
746beq L47
747tst _ykstat
748beq L47
749*line 382
750move.l _xy_up,R8
751jsr (R8)
752*line 383
753L47:
754*line 384
755clr _xkstat
756*line 385
757move #1,_xkcount
758*line 386
759clr _cxrate
760*line 387
761*line 388
762*line 388
763tst _ykstat
764bne L48
765*line 389
766*line 390
767clr _cyrate
768*line 391
769move #1,_ykcount
770*line 392
771move _chtime,_nchwait
772*line 393
773move _cvtime,_ncvwait
774*line 394
775move #1,_chwait
776*line 395
777move #1,_cvwait
778*line 396
779move #1,_cmfirst
780*line 397
781L48:L46:bra L41
782L41:unlk R14
783rts
784.globl _cykstd
785.text
786_cykstd:
787~~cykstd:
788link R14,#-4
789*line 414
790clr _trkball
791*line 415
792clr _tkctrl
793*line 416
794clr _txflag
795*line 417
796clr _tyflag
797*line 419
798*line 419
799tst _astat
800beq L50
801*line 420
802*line 421
803*line 421
804tst _ykstat
805bne L51
806*line 422
807*line 423
808*line 423
809tst _ykcount
810beq L52
811*line 424
812*line 425
813sub #1,_ykcount
814bra L49
815*line 426
816*line 427
817*line 428
818L52:
819*line 429
820move #1,_ykstat
821*line 430
822move #1,_cvwait
823*line 431
824move _curhold,_ncvwait
825*line 432
826*line 433
827*line 434
828tst _xkstat
829beq L53
830*line 434
831move.l _xy_dn,R8
832jsr (R8)
833L53:
834*line 435
835*line 436
836L51:
837*line 437
838move _aval,(sp)
839jsr _cryrate
840move R0,_cyrate
841*line 438
842*line 439
843bra L54
844L50:
845*line 440
846*line 441
847*line 442
848*line 443
849tst _xkstat
850beq L55
851tst _ykstat
852beq L55
853*line 443
854move.l _xy_up,R8
855jsr (R8)
856*line 444
857L55:
858*line 445
859clr _ykstat
860*line 446
861move #1,_ykcount
862*line 447
863clr _cyrate
864*line 448
865*line 449
866*line 449
867tst _xkstat
868bne L56
869*line 450
870*line 451
871clr _cxrate
872*line 452
873move #1,_xkcount
874*line 453
875move _chtime,_nchwait
876*line 454
877move _cvtime,_ncvwait
878*line 455
879move #1,_chwait
880*line 456
881move #1,_cvwait
882*line 457
883move #1,_cmfirst
884*line 458
885L56:L54:bra L49
886L49:unlk R14
887rts
888.globl _stdmkey
889.text
890_stdmkey:
891~~stdmkey:
892link R14,#-4
893*line 475
894*line 475
895tst _astat
896beq L58
897*line 476
898*line 477
899clr _runit
900*line 478
901clr _submenu
902*line 479
903L58:L57:unlk R14
904rts
905.globl _stddkey
906.text
907_stddkey:
908~~stddkey:
909link R14,#-4
910*line 490
911*line 490
912move.l _curfet,(sp)
913move _stccol,-(sp)
914move _stcrow,-(sp)
915jsr _infield
916addq.l #4,sp
917tst R0
918beq L60
919*line 491
920*line 492
921move.l _infetp,_cfetp
922*line 493
923*line 494
924*line 494
925tst _astat
926beq L61
927*line 495
928*line 496
929*line 497
930tst _ebflag
931bne L62
932*line 497
933move.l _cfetp,R8
934move 6(R8),-(sp)
935move.l _cfetp,R8
936move.l 8(R8),R8
937jsr (R8)
938addq.l #2,sp
939*line 498
940L62:
941*line 499
942move _asig,-(sp)
943add #-60,(sp)
944move.l _cfetp,R8
945move 6(R8),-(sp)
946move.l _cfetp,R8
947move.l 20(R8),R8
948jsr (R8)
949addq.l #4,sp
950*line 500
951*line 501
952L61:bra L63
953L60:
954*line 502
955*line 503
956*line 504
957*line 505
958tst _astat
959beq L64
960*line 505
961move _asig,-(sp)
962add #-60,(sp)
963move.l _not_fld,R8
964jsr (R8)
965addq.l #2,sp
966L64:L63:L59:unlk R14
967rts
968.globl _cxgen
969.text
970_cxgen:
971~~cxgen:
972link R14,#-4
973*line 520
974move _cxrate,R0
975add R0,_cxval
976*line 522
977*line 523
978cmp #511,_cxval
979ble L66
980*line 523
981move #511,_cxval
982bra L67
983L66:
984*line 524
985*line 525
986tst _cxval
987bge L68
988*line 525
989clr _cxval
990*line 526
991L68:L67:bra L65
992L65:unlk R14
993rts
994.globl _cygen
995.text
996_cygen:
997~~cygen:
998link R14,#-4
999*line 538
1000move _cyrate,R0
1001add R0,_cyval
1002*line 540
1003*line 541
1004cmp #349,_cyval
1005ble L70
1006*line 541
1007move #349,_cyval
1008bra L71
1009L70:
1010*line 542
1011*line 543
1012tst _cyval
1013bge L72
1014*line 543
1015clr _cyval
1016*line 544
1017L72:L71:bra L69
1018L69:unlk R14
1019rts
1020.data
Note: See TracBrowser for help on using the repository browser.