-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommando.s
9227 lines (8687 loc) · 128 KB
/
commando.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;=============================================
; Filename human302/commando.x
;
;
; Base address 000000
; Exec address 000010
; Text size 0058b2 byte(s)
; Data size 000c2e byte(s)
; Bss size 000fa2 byte(s)
; 1390 Labels
;
; Commandline dis -h -k -m68000 -q1 -B -M -w16 -o120 -ghuman302/commando.lab --overwrite human302/commando.x human302/commando.s
; DIS version 3.16
;=============================================
.include inc/doscall.mac
.include inc/iocscall.mac
.include inc/fefunc.mac
.cpu 68000
.text
L000000:
.dc.l L00649a
.dc.b $00,$00,$74,$81
.dc.l L007482+$001000
L00000c:
.dc.l $00000a1c
Start:
bra Start2
L000012:
.dc.b 'Command2.03Hu',$00
Start2:
DOS _VERNUM
cmp.w #$0332,d0
bcs L000038
lea.l (L0062f3),a0
bsr L002044
move.w #$0700,-(a7)
DOS _EXIT2
L000038:
DOS _GETPDB
movea.l d0,a0
movea.l ($00f8,a0),a7
bsr L00052a
move.b #-$01,(L006ea2)
bsr L0005b2
bsr L000216
tst.b (L006eb1)
bne L000064
tst.b (L006eae)
bne L000068
L000064:
bsr L001a9a
L000068:
tst.b (L006eb1)
beq L0000aa
tst.b (L006eae)
bne L000088
tst.b (L006eaf)
bne L0000ea
move.b #-$01,(L006e9f)
L000088:
lea.l (L0065ce),a1
tst.b (a1)+
bne L000098
lea.l (L005b3b),a1
L000098:
lea.l (L006ec8),a0
bsr L001c94
bsr L001c86
move.b d0,-(a0)
bra L0000da
L0000aa:
lea.l (L0065ce),a1
tst.b (a1)+
bne L000098
bra L0000ea
L0000b6:
move.b #-$01,(L006ea2)
clr.b (L006e9f)
tst.b (L006ea4)
beq L0000d4
clr.b (L006ea4)
bra L0000da
L0000d4:
bsr L000cec
beq L0000b6
L0000da:
bsr L0013a8
beq L0000ea
bsr L001628
beq L0000ea
bsr L0018a0
L0000ea:
bsr L00280c
bra L0000b6
L0000f0:
lea.l (L005bcf),a0
bsr L002044
tst.b (L006ea2)
L000100:
.dc.b $66,$28,$20,$3c,$00,$00
L000106:
.dc.b $03,$fc,$b2,$7c,$01,$00,$65,$18,$52,$80,$b2,$7c,$02,$00,$65,$10
.dc.b $54,$80,$b2,$7c,$ff,$00,$64,$08,$b2,$7c,$f0,$00,$64,$02,$10,$01
L000126:
move.w d0,-(a7)
DOS _EXIT2
move.l #$000003fc,d0
cmp.w #$0100,d1
bcs L00014e
addq.l #1,d0
cmp.w #$0200,d1
bcs L00014e
addq.l #2,d0
cmp.w #$ff00,d1
bcc L00014e
cmp.w #$f000,d1
bcc L00014e
move.b d1,d0
L00014e:
move.l d0,(L0064b6)
DOS _GETPDB
movea.l d0,a0
movea.l ($00f8,a0),a7
moveq.l #$26,d0 ;'&'
bsr L002db8
bra L000194
L000164:
lea.l (L005bcf),a0
bsr L002044
tst.b (L006ea2)
bne L00017c
move.w #$0200,-(a7)
DOS _EXIT2
L00017c:
move.l #$00000200,(L0064b6)
DOS _GETPDB
movea.l d0,a0
movea.l ($00f8,a0),a7
moveq.l #$22,d0 ;'"'
bsr L002db8
L000194:
clr.b (L006ea5)
clr.b (L006ea7)
clr.b (L006ea8)
tst.b (L006ea3)
beq L0001b0
bsr L0001cc
L0001b0:
tst.b (L006eb5)
bmi L00045e
bne L000454
bsr L0004ec
bsr L0027e6
DOS _FFLUSH
bra L0000b6
L0001cc:
lea.l (L006340),a0
bsr L002044
move.w #$0001,-(a7)
DOS _KFLUSH
addq.l #2,a7
or.b #$20,d0
cmp.b #$6e,d0 ;'n'
beq L00020a
cmp.b #$79,d0 ;'y'
bne L0001cc
move.l #$00000200,(L0064b6)
move.b #-$01,(L006ead)
clr.b (L006ea3)
bsr L000430
L00020a:
lea.l (L005bcf),a0
bsr L002044
rts
L000216:
move.w #$ffff,(L0064c4)
move.w #$ffff,(L0064c6)
move.w #$ffff,(L0064c8)
move.w #$ffff,(L0064ca)
clr.b (L006eab)
clr.b (L006eac)
move.b #-$01,(L006ea2)
move.b #-$01,(L006ead)
move.b #$ff,(L006ec6)
move.b #$ff,(L0064cc)
clr.l (L0064b6)
clr.l (L0064ba)
clr.l (L00649a)
clr.b (L006e9f)
clr.b (L006ea3)
clr.b (L006ea4)
clr.b (L006ea5)
clr.b (L006ea6)
clr.b (L006ea7)
clr.b (L006ea8)
clr.b (L006ec7)
clr.b (L006ec8)
clr.b (L0064cd)
clr.b (L0064ce)
clr.b (L006ea9)
clr.b (L006eaa)
clr.b (L006ea1)
clr.b (L006eb4)
clr.b (L006eb5)
DOS _VERNUM
cmp.w #$014a,d0
bcs L0002e4
move.b #-$01,(L006eb4)
L0002e4:
move.b (L007480),(L006ea0)
DOS _GETPDB
movea.l d0,a0
movea.l (a0),a0
move.l #$00000200,d1
cmpa.l #$ffffffff,a0
beq L000328
tst.b (L006eb1)
bne L00030c
move.l (a0),d1
L00030c:
tst.b (L006eb0)
beq L00033e
clr.l d0
move.b (L006eb2),d0
addq.l #2,d0
lsl.l #8,d0
cmp.l d1,d0
bcs L00033e
move.l d0,d1
bra L00033e
L000328:
tst.b (L006eb0)
beq L00033e
clr.l d0
move.b (L006eb2),d0
addq.l #2,d0
lsl.l #8,d0
move.l d0,d1
L00033e:
move.l d1,-(a7)
bsr L002e1c
addq.l #4,a7
move.l d0,(L0064a2)
movea.l d0,a0
move.l d1,(a0)+
lea.l (L005b89),a1
tst.b (L006eb1)
bne L000370
DOS _GETPDB
movea.l d0,a2
movea.l (a2),a2
cmpa.l #$ffffffff,a2
beq L000370
addq.l #4,a2
movea.l a2,a1
L000370:
bsr L00207e
DOS _GETPDB
movea.l d0,a0
move.l (L0064a2),(a0)
clr.l d0
move.b (L006eb3),d0
addq.l #2,d0
lsl.l #8,d0
move.l d0,d1
move.l d1,-(a7)
bsr L002e1c
addq.l #4,a7
move.l d0,(L0064a6)
movea.l d0,a0
move.l d1,(a0)+
move.l a0,(L0064aa)
move.l a0,(L0064ae)
move.l a0,(L0064b2)
clr.b (a0)+
clr.b (a0)
bsr L002d8c
move.b #-$01,(L006ea1)
move.b #-$01,(L007480)
bsr L0004ee
pea.l (L000164)
move.w #$fff1,-(a7)
DOS _INTVCS
addq.l #6,a7
pea.l (L0000f0)
move.w #$fff2,-(a7)
DOS _INTVCS
addq.l #6,a7
rts
L0003ea:
move.l d0,-(a7)
bsr L0004a2
tst.l (L00649a)
beq L000408
move.l (L00649a),-(a7)
DOS _MFREE
addq.l #4,a7
clr.l (L00649a)
L000408:
move.l (a7)+,d0
move.l d0,d1
move.l d1,-(a7)
DOS _MALLOC
addq.l #4,a7
tst.l d0
bmi L000422
movea.l d0,a0
move.l d0,(L00649a)
move.l d1,(a0)+
clr.b (a0)
L000422:
movem.l d0,-(a7)
bsr L0004ee
movem.l (a7)+,d0
rts
L000430:
move.w #$0001,d0
tst.l (L00649a)
beq L000452
bsr L0004a2
move.l (L00649a),-(a7)
DOS _MFREE
addq.l #4,a7
clr.l (L00649a)
bsr L0004ee
L000452:
rts
L000454:
lea.l (L005ccb),a0
bsr L002044
L00045e:
lea.l (L0062e2),a0
bsr L002044
bsr L00280c
bsr L002d9e
bsr L000572
move.w #$0700,-(a7)
DOS _EXIT2
L00047a:
move.l d0,-(a7)
and.l #$000000ff,d0
lea.l (L0061db),a0
cmp.b #$19,d0
bhi L00049a
lsl.l #2,d0
lea.l (Table2),a0
movea.l (a0,d0.l),a0
L00049a:
bsr L002044
move.l (a7)+,d0
rts
L0004a2:
move.l (L006eb6),d0
bmi L0004ba
move.l d0,-(a7)
DOS _MFREE
addq.l #4,a7
move.l #$ffffffff,(L006eb6)
L0004ba:
move.l (L006ebe),d0
bmi L0004d2
move.l d0,-(a7)
DOS _MFREE
addq.l #4,a7
move.l #$ffffffff,(L006ebe)
L0004d2:
move.l (L006eba),d0
bmi L0004ea
move.l d0,-(a7)
DOS _MFREE
addq.l #4,a7
move.l #$ffffffff,(L006eba)
L0004ea:
rts
L0004ec:
bsr L0004a2
L0004ee:
move.l #$0000af20,-(a7)
bsr L002e1c
addq.l #4,a7
move.l d0,(L006eb6)
move.l #$000015e4,-(a7)
bsr L002e1c
addq.l #4,a7
move.l d0,(L006ebe)
move.l #$00000400,-(a7)
bsr L002e1c
addq.l #4,a7
move.l d0,(L006eba)
move.w #$0001,d0
rts
L00052a:
bsr L002d7a
beq L00055a
move.l (L00000c),d0
bsr L002d62
lea.l (L000000-$000004),a2
L000540:
movea.l (a2),a2
tst.l (a2)
beq L000558
move.l ($0004,a2),d0
beq L000540
movea.l d0,a0
move.l ($0010,a2),d0
bsr L002d62
bra L000540
L000558:
rts
L00055a:
lea.l (L000000-$0000f0),a0
lea.l (L007482+$001000),a1
suba.l a0,a1
move.l a1,-(a7)
move.l a0,-(a7)
DOS _SETBLOCK
addq.l #8,a7
rts
L000572:
bsr L002d7a
beq L0005a2
exg.l a0,a1
move.l (L00000c),d0
bsr L002d62
lea.l (L000000-$000004),a2
L00058a:
movea.l (a2),a2
tst.l (a2)
beq L0005a2
move.l ($0004,a2),d0
beq L00058a
movea.l d0,a1
move.l ($0010,a2),d0
bsr L002d62
bra L00058a
L0005a2:
rts
L0005a4:
tst.b (L006ead)
beq L0005b0
bsr L00264c
L0005b0:
rts
L0005b2:
clr.b (L006eae)
clr.b (L006eaf)
clr.b (L006eb1)
clr.b (L006eb0)
clr.b (L006eb2)
clr.b (L006eb3)
clr.b (L0065ce)
DOS _GETPDB
movea.l d0,a0
move.l ($0050,a0),d0
movea.l ($0010,a0),a0
addq.l #1,a0
tst.l d0
bpl L0005f6
move.b #-$01,(L006eb1)
L0005f6:
bsr L002060
beq L000732
cmp.b #$63,d0 ;'c'
bne L000636
move.b #-$01,(L006eae)
bsr L001d0e
adda.l d0,a0
bsr L001c86
cmp.l #$000000ff,d0
bcs L000624
move.l #$000000fe,d0
L000624:
movea.l a0,a1
lea.l (L0065ce),a0
move.b d0,(a0)+
bra L001ca2
L000632:
bra L000732
L000636:
cmp.b #$64,d0 ;'d'
bne L000646
move.b #-$01,(L006eaf)
bra L0005f6
L000646:
cmp.b #$65,d0 ;'e'
bne L0006a0
cmpi.b #$3a,(a0)+ ;':'
bne L000732
bsr L001bea
move.l d0,d2
L00065a:
move.b (a0),d0
beq L000672
cmp.b #$2f,d0 ;'/'
beq L000672
addq.l #1,a0
cmp.b #$09,d0
beq L000672
cmp.b #$20,d0 ;' '
bne L00065a
L000672:
tst.l d1
bpl L000678
not.b d1
L000678:
beq L0005f6
cmp.b #$0a,d1
bhi L0005f6
cmp.l #$000000ff,d2
bhi L0005f6
move.b #-$01,(L006eb0)
move.b d2,(L006eb2)
bra L0005f6
L0006a0:
cmp.b #$68,d0 ;'h'
bne L0006f2
cmpi.b #$3a,(a0)+ ;':'
bne L000732
bsr L001bea
move.l d0,d2
L0006b4:
move.b (a0),d0
beq L0006cc
cmp.b #$2f,d0 ;'/'
beq L0006cc
addq.l #1,a0
cmp.b #$09,d0
beq L0006cc
cmp.b #$20,d0 ;' '
bne L0006b4
L0006cc:
tst.l d1
bpl L0006d2
not.b d1
L0006d2:
beq L0005f6
cmp.b #$0a,d1
bhi L0005f6
cmp.l #$000000ff,d2
bhi L0005f6
move.b d2,(L006eb3)
bra L0005f6
L0006f2:
cmp.b #$62,d0 ;'b'
bne L000720
cmpi.b #$3a,(a0)+ ;':'
bne L000732
L0006fe:
move.b (a0),d0
beq L0005f6
cmp.b #$2f,d0 ;'/'
beq L0005f6
addq.l #1,a0
cmp.b #$09,d0
beq L0005f6
cmp.b #$20,d0 ;' '
bne L0006fe
bra L0005f6
L000720:
cmp.b #$70,d0 ;'p'
bne L000732
move.b #-$01,(L006eb1)
bra L0005f6
L000732:
move.b (L006eb1),d0
and.b d0,(L006eaf)
rts
L000740:
movea.l #$ffffffff,a1
movea.l a1,a2
movea.l a1,a3
movea.l a1,a4
clr.b d1
lea.l (L006ec8),a0
bsr L001d0e
adda.l d0,a0
moveq.l #$ff,d0
tst.b (a0)
beq L000b26
lea.l (L006ec8),a0
L000768:
bsr L000b9e
beq L000bca
L000770:
move.b (a0)+,d0
beq L000818
tst.b d1
beq L00077e
clr.b d1
bra L000770
L00077e:
cmp.b #$80,d0
bcs L000796
cmp.b #$a0,d0
bcs L000790
cmp.b #$e0,d0
bcs L000796
L000790:
move.b #$01,d1
bra L000770
L000796:
cmp.b #$22,d0 ;'"'
beq L000b2a
cmp.b #$27,d0 ;'''
beq L000b38
cmp.b #$3c,d0 ;'<'
beq L0007ea
cmp.b #$7c,d0 ;'|'
beq L0007da
cmp.b #$3e,d0 ;'>'
bne L000770
cmpa.l #$ffffffff,a2
bne L000bea
movea.l a0,a2
cmpa.l #$ffffffff,a3
bne L0007d0
movea.l a0,a3
subq.l #1,a3
L0007d0:
cmpi.b #$3e,(a0) ;'>'
bne L000768
addq.l #1,a0
bra L000768
L0007da:
movea.l a0,a4
cmpa.l #$ffffffff,a3
bne L000808
movea.l a0,a3
subq.l #1,a3
bra L000808
L0007ea:
cmpa.l #$ffffffff,a1
bne L000be2
movea.l a0,a1
cmpa.l #$ffffffff,a3
bne L000768
movea.l a0,a3
subq.l #1,a3
bra L000768
L000808:
cmpi.b #$7c,(a0) ;'|'
bne L000810
addq.l #1,a0
L000810:
bsr L000b9e
beq L000bca
L000818:
cmpa.l #$ffffffff,a1
beq L000854
tst.b (L006ea9)
bne L000be2
movea.l a1,a0
bsr L000b46
tst.b (a0)
beq L000bca
clr.l (L0064ba)
lea.l (L006eab),a5
tst.b (L006eaa)
bne L000850
lea.l (L006eac),a5
L000850:
clr.b (a5)
bra L000884
L000854:
tst.b (L006ea9)
beq L0008e0
clr.b (L006ea9)
lea.l (L006c32),a0
lea.l (L006eab),a5
tst.b (L006eaa)
bne L000884
lea.l (L006d4a),a0
lea.l (L006eac),a5
L000884:
tst.b (a5)
beq L00088c
move.b #$02,(a5)
L00088c:
clr.w -(a7)
DOS _DUP
addq.l #2,a7
move.w d0,(L0064c4)
clr.w -(a7)
move.l a0,-(a7)
DOS _OPEN
addq.l #6,a7
move.w d0,(L0064c6)
bmi L000bda
clr.w -(a7)
move.w d0,-(a7)
DOS _DUP2
addq.l #4,a7
clr.w -(a7)
clr.w -(a7)
DOS _IOCTRL
addq.l #4,a7
btst.l #$07,d0
beq L0008d2
clr.w -(a7)
move.w #$0006,-(a7)
DOS _IOCTRL
addq.l #4,a7
tst.l d0
beq L000bba
bra L0008e0
L0008d2:
clr.w -(a7)
move.l (L0064ba),-(a7)
clr.w -(a7)
DOS _SEEK
addq.l #8,a7
L0008e0:
cmpa.l #$ffffffff,a2
beq L0009f8
cmpi.b #$3e,(a2) ;'>'
bne L0009ae
addq.l #1,a2
movea.l a2,a0
bsr L000b46
tst.b (a0)
beq L000bca
movea.l a0,a2
move.w #$0001,-(a7)
DOS _DUP
addq.l #2,a7
move.w d0,(L0064c8)
move.w #$0002,-(a7)
move.l a0,-(a7)
DOS _OPEN
addq.l #6,a7
move.w d0,(L0064ca)
bmi L0009ca
move.w #$0001,-(a7)
move.w d0,-(a7)
DOS _DUP2
addq.l #4,a7
move.w #$0001,-(a7)
clr.w -(a7)
DOS _IOCTRL
addq.l #4,a7
btst.l #$07,d0
beq L000954
move.w #$0001,-(a7)
move.w #$0007,-(a7)
DOS _IOCTRL
addq.l #4,a7
tst.l d0
beq L000bc2
bra L0009f8
L000954:
move.w #$0002,-(a7)
clr.l -(a7)
move.w #$0001,-(a7)
DOS _SEEK
addq.l #8,a7
L000962:
move.l d0,d2
beq L0009f8
move.w #$0001,-(a7)
move.l #$ffffffff,-(a7)
move.w #$0001,-(a7)
DOS _SEEK
addq.l #8,a7
move.l #$00000001,-(a7)
pea.l (L006fc8)
move.w #$0001,-(a7)
DOS _READ
lea.l ($000a,a7),a7
cmpi.b #$1a,(L006fc8)
bne L0009f8
move.w #$0001,-(a7)
move.l #$ffffffff,-(a7)
move.w #$0001,-(a7)
DOS _SEEK
addq.l #8,a7
bra L000962
L0009ae:
movea.l a2,a0
bsr L000b46
tst.b (a0)
beq L000bca
movea.l a0,a2
move.w #$0001,-(a7)
DOS _DUP
addq.l #2,a7
move.w d0,(L0064c8)
L0009ca:
move.w #$0020,-(a7) ;' '
move.l a0,-(a7)
DOS _CREATE
addq.l #6,a7
tst.w d0
bpl L0009e2
move.w #$0001,-(a7)
move.l a0,-(a7)
DOS _OPEN
addq.l #6,a7
L0009e2:
move.w d0,(L0064ca)
bmi L000bf2
move.w #$0001,-(a7)
move.w d0,-(a7)
DOS _DUP2
addq.l #4,a7
clr.l d2
L0009f8:
cmpa.l #$ffffffff,a4
beq L000b0a
cmpi.b #$7c,(a4)+ ;'|'
beq L000aca
subq.l #1,a4
move.b #-$01,(L006ea9)
cmpa.l #$ffffffff,a2
bne L000a80
lea.l (L006c32),a0
lea.l (L006eab),a5
tst.b (L006eaa)
beq L000a3c
lea.l (L006d4a),a0
lea.l (L006eac),a5
L000a3c:
clr.b (a5)
bsr L000c48
tst.l d0
beq L000bf2
clr.l (L0064ba)
move.w #$0001,-(a7)
DOS _DUP
addq.l #2,a7
move.w d0,(L0064c8)
move.w #$0020,-(a7) ;' '
move.l a0,-(a7)
DOS _CREATE
addq.l #6,a7
move.w d0,(L0064ca)
bmi L000bf2
move.b #$01,(a5)
move.w #$0001,-(a7)
move.w d0,-(a7)
DOS _DUP2
addq.l #4,a7
bra L000ac2
L000a80:
lea.l (L006c32),a0
lea.l (L006eab),a5
tst.b (L006eaa)
beq L000aa0
lea.l (L006d4a),a0
lea.l (L006eac),a5
L000aa0:
clr.b (a5)
move.l d2,(L0064ba)
move.l a0,-(a7)
movea.l a2,a0
bsr L001c86
movea.l (a7)+,a0
cmp.l #$00000057,d0
bhi L000bd2
movea.l a2,a1
bsr L001c94
L000ac2:
eori.b #-$01,(L006eaa)
L000aca:
movea.l a4,a0
bsr L000b9e
beq L000bca
movea.l a0,a1
bsr L001c86
tst.b (L006ea3)
beq L000af2
lea.l (L0066d0),a0
move.b #-$01,(L006ea8)
bra L000b00
L000af2:
lea.l (L0065ce),a0
move.b #-$01,(L006ea7)
L000b00:
move.b #$ff,(a0)+
move.b d0,(a0)+
bsr L001c94
L000b0a:
cmpa.l #$ffffffff,a3
beq L000b14
clr.b (a3)
L000b14:
lea.l (L006ec8),a0
bsr L001c86
move.b d0,-(a0)
beq L000bca
clr.l d0
L000b26:
tst.l d0
rts
L000b2a:
move.b (a0)+,d0
beq L000b26
cmp.b #$22,d0 ;'"'
bne L000b2a
bra L000770
L000b38:
move.b (a0)+,d0
beq L000b26
cmp.b #$27,d0 ;'''
bne L000b38
bra L000770
L000b46:
bsr L001d0e
adda.l d0,a0
tst.b (a0)
beq L000b9c
move.l a0,-(a7)
clr.b d1
L000b54:
bsr L001d0e
tst.l d0
bne L000b98
L000b5c:
move.b (a0),d0
beq L000b98
tst.b d1
beq L000b68
clr.b d1
bra L000b7e
L000b68:
cmp.b #$80,d0
bcs L000b82
cmp.b #$a0,d0
bcs L000b7a
cmp.b #$e0,d0
bcs L000b82
L000b7a:
move.b #$01,d1
L000b7e:
addq.l #1,a0
bra L000b5c
L000b82:
cmp.b #$3c,d0 ;'<'
beq L000b98
cmp.b #$7c,d0 ;'|'
beq L000b98
cmp.b #$3e,d0 ;'>'
beq L000b98
addq.l #1,a0
bra L000b54
L000b98:
clr.b (a0)