source: buchla-68k/alcyon/tdselbx.s@ 4810254

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

Added Alcyon C reference output.

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