source: buchla-68k/alcyon/ptread.s@ 3fcb810

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

Added Alcyon C reference output.

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