-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbind.s
2104 lines (1969 loc) · 30.2 KB
/
bind.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/bin/bind.x
;
;
; Base address 000000
; Exec address 000000
; Text size 00155c byte(s)
; Data size 000556 byte(s)
; Bss size 00110a byte(s)
; 316 Labels
;
; Commandline dis -h -k -m68000 -q1 -B -M -w16 -o120 -ghuman302/bin/bind.lab --overwrite human302/bin/bind.x human302/bin/bind.s
; DIS version 3.16
;=============================================
.include inc/doscall.mac
.include inc/iocscall.mac
.include inc/fefunc.mac
.cpu 68000
.text
Start:
lea.l (End),a7
lea.l (Start-$0000f0),a0
lea.l (End),a1
suba.l a0,a1
move.l a1,-(a7)
move.l a0,-(a7)
DOS _SETBLOCK
addq.l #8,a7
pea.l (L001588)
DOS _PRINT
addq.l #4,a7
move.l #$00ffffff,-(a7)
DOS _MALLOC
sub.l #$81000000,d0
cmp.l #$00000500,d0
bcs L0008be
cmp.l #$01000000,d0
bcc L0008be
move.l d0,d1
move.l d0,(a7)
DOS _MALLOC
addq.l #4,a7
move.l d0,(L001b3a)
move.l d1,(L001b3e)
clr.b (L001fb1)
clr.b (L001fb2)
clr.b (L001fb3)
clr.b (L001fb4)
clr.b (L001fb5)
clr.b (L001fb6)
clr.b (L001fb7)
clr.b (L001fb8)
clr.b (L001fb9)
clr.b (L001fba)
clr.b (L001fae)
move.w #$ffff,(L001b44)
move.w #$ffff,(L001b46)
movea.l (Start-$0000e0),a0
addq.l #1,a0
lea.l (L001b4a),a1
lea.l (L001c62),a2
lea.l (L001d7a),a3
lea.l (L001e92),a4
bsr L000fe4
move.w d0,(L001b42)
move.b d2,(L001faf)
move.b d3,(L001fb0)
lea.l (L001c62),a0
L0000ea:
tst.b (a0)
beq L000290
bsr L0011ca
L0000f4:
move.b (a0)+,d0
beq L0000ea
cmp.b #$75,d0 ;'u'
beq L0001c6
cmp.b #$78,d0 ;'x'
beq L000198
cmp.b #$64,d0 ;'d'
beq L00016a
cmp.b #$6f,d0 ;'o'
beq L00020a
cmp.b #$74,d0 ;'t'
beq L000236
cmp.b #$61,d0 ;'a'
beq L0001e8
cmp.b #$76,d0 ;'v'
beq L000262
cmp.b #$62,d0 ;'b'
beq L00026e
cmp.b #$6c,d0 ;'l'
bne L0008d6
move.b (L001fb3),d0
or.b (L001fb2),d0
or.b (L001fb1),d0
or.b (L001fb7),d0
or.b (L001fb9),d0
bne L0008d6
move.b #-$01,(L001fb4)
bra L0000f4
L00016a:
move.b (L001fb4),d0
or.b (L001fb2),d0
or.b (L001fb1),d0
or.b (L001fb7),d0
or.b (L001fb9),d0
bne L0008d6
move.b #-$01,(L001fb3)
bra L0000f4
L000198:
move.b (L001fb4),d0
or.b (L001fb3),d0
or.b (L001fb1),d0
or.b (L001fb7),d0
or.b (L001fb9),d0
bne L0008d6
move.b #-$01,(L001fb2)
bra L0000f4
L0001c6:
move.b (L001fb4),d0
or.b (L001fb3),d0
or.b (L001fb2),d0
bne L0008d6
move.b #-$01,(L001fb1)
bra L0000f4
L0001e8:
move.b (L001fb4),d0
or.b (L001fb3),d0
or.b (L001fb2),d0
bne L0008d6
move.b #-$01,(L001fb7)
bra L0000f4
L00020a:
move.b (a3),d0
beq L0008d6
cmp.b #$2d,d0 ;'-'
beq L0008d6
cmp.b #$2f,d0 ;'/'
beq L0008d6
tst.b (L001fb5)
bne L0008d6
move.b #-$01,(L001fb5)
bra L0000f4
L000236:
move.b (a4),d0
beq L0008d6
cmp.b #$2d,d0 ;'-'
beq L0008d6
cmp.b #$2f,d0 ;'/'
beq L0008d6
tst.b (L001fb6)
bne L0008d6
move.b #-$01,(L001fb6)
bra L0000f4
L000262:
move.b #-$01,(L001fb8)
bra L0000f4
L00026e:
move.b (L001fb4),d0
or.b (L001fb3),d0
or.b (L001fb2),d0
bne L0008d6
move.b #-$01,(L001fb9)
bra L0000f4
L000290:
move.b (L001fb4),d0
or.b (L001fb3),d0
or.b (L001fb2),d0
not.b d0
move.b d0,(L001fb1)
not.b (L001fb9)
and.b d0,(L001fb9)
move.w (L001b42),d0
tst.b (L001fb5)
bne L0002dc
tst.w d0
beq L0008d6
lea.l (L001b4a),a1
lea.l (L001d7a),a0
bsr L001184
subq.w #1,d0
L0002dc:
tst.b (L001fb4)
beq L0002ec
tst.w d0
bne L0008d6
bra L0002f4
L0002ec:
cmp.w #$0001,d0
bcs L0008d6
L0002f4:
lea.l (L001e92),a0
tst.b (L001fb6)
bne L00032a
lea.l (L001c62),a0
clr.b (a0)
move.l a0,-(a7)
clr.l -(a7)
pea.l (L001aa7)
DOS _GETENV
lea.l ($000c,a7),a7
bsr L00116a
movea.l a0,a1
lea.l (L001e92),a0
bsr L001184
L00032a:
movea.l a0,a2
bsr L0013b6
movea.l a2,a0
bsr L001222
lea.l (L001aad),a1
tst.b (a0)
beq L000346
lea.l (L001aac),a1
L000346:
bsr L0011a8
movea.l a2,a0
bsr L001266
bsr L001222
clr.b (a0)
lea.l (L001a9e),a1
bsr L001184
movea.l a2,a0
bsr L0011ca
lea.l (L001a9b),a2
lea.l (L001d7a),a1
lea.l (L001c62),a0
bsr L000df0
tst.b (L001fb4)
bne L000868
tst.b (L001fb1)
bne L00063c
tst.b (L001fb3)
bne L00052e
clr.b d2
movea.l (L001b3a),a3
lea.l (L001c62),a0
bsr L000e22
move.l a3,d1
addq.l #2,d1
and.b #$fe,d1
movea.l d1,a4
move.l (L001b3a),d4
add.l (L001b3e),d4
sub.l d1,d4
and.w #$fc00,d4
cmp.l #$00000400,d4
bge L0003dc
lea.l (L001fbb),a4
move.l #$00000400,d4
L0003dc:
movea.l (L001b3a),a3
lea.l (L001ab2),a0
tst.l ($003c,a0)
beq L000934
lea.l (L001c62),a0
bsr L000d70
move.w d0,(L001b46)
clr.b d6
tst.b (L001fb5)
bne L00040c
L00040a:
addq.b #1,d6
L00040c:
lea.l (L001b4a),a0
move.b d6,d0
bsr L001388
beq L000522
movea.l a0,a1
lea.l (L001d7a),a0
bsr L001184
bsr L001222
move.l a0,(L001b36)
tst.b (a0)
beq L0008c6
cmpi.b #$2e,(a0) ;'.'
beq L0008c6
lea.l (L001a9b),a1
bsr L00139c
movea.l (L001b36),a0
lea.l (L001a5b),a1
bsr L000978
lea.l (L001f6e),a1
bsr L000f70
movea.l (L001b3a),a3
clr.b d3
L00046c:
tst.b (a3)
beq L000518
movea.l a3,a0
lea.l (L001f6e),a1
bsr L000b12
bne L000510
lea.l (L001d7a),a0
bsr L001266
bsr L001222
bsr L000ccc
move.b #$01,(L001fae)
lea.l (L001d7a),a0
move.l a0,(L001b36)
lea.l (L001c62),a1
bsr L001366
beq L00092c
clr.w d0
move.b ($000b,a3),d0
bsr L000d94
move.w d0,(L001b44)
move.b #$02,(L001fae)
clr.l d5
move.l ($0020,a3),d3
move.l ($001c,a3),d2
bsr L000b70
subq.l #4,a7
move.b ($0016,a3),($0003,a7)
move.b ($0017,a3),($0002,a7)
move.b ($0018,a3),($0001,a7)
move.b ($0019,a3),(a7)
move.w (L001b44),-(a7)
DOS _FILEDATE
addq.l #6,a7
swap.w d0
cmp.w #$ffff,d0
beq L0008de
bsr L0009f2
move.b #-$01,d3
L000510:
lea.l ($0024,a3),a3
bra L00046c
L000518:
tst.b d3
beq L000924
bra L00040a
L000522:
clr.w d0
move.b d0,(L001fae)
bra L00096e
L00052e:
lea.l (L001e92),a0
bsr L000d94
move.w d0,(L001b44)
move.b #-$01,(L001fae)
movea.l (L001b3a),a3
lea.l (L001b4a),a1
lea.l (L001a9b),a2
lea.l (L001d7a),a0
clr.b d2
bsr L000e1c
lea.l (L001ab2),a0
tst.l ($003c,a0)
beq L000934
L000572:
addq.b #1,d2
lea.l (L001b4a),a0
move.b d2,d0
bsr L001388
beq L000616
bsr L001222
tst.b (a0)
beq L0008c6
cmpi.b #$2e,(a0) ;'.'
beq L0008c6
movea.l a0,a1
lea.l (L001d7a),a0
bsr L001184
lea.l (L001a9b),a1
bsr L00139c
lea.l (L001d7a),a0
move.l a0,(L001b36)
lea.l (L001a4b),a1
bsr L000978
lea.l (L001f6e),a1
bsr L000f70
movea.l (L001b3a),a0
clr.b d3
L0005d4:
tst.b (a0)
beq L00060c
cmpi.b #$e5,(a0)
beq L000606
lea.l (L001f6e),a1
bsr L000b12
bne L000606
btst.b #$00,($001b,a0)
bne L000914
btst.b #$02,($001b,a0)
bne L000914
move.b #$e5,(a0)
move.b #-$01,d3
L000606:
lea.l ($0024,a0),a0
bra L0005d4
L00060c:
tst.b d3
beq L00091c
bra L000572
L000616:
movea.l (L001b3a),a3
clr.b d3
L00061e:
tst.b (a3)
beq L000632
cmpi.b #$e5,(a3)
beq L00062c
move.b #-$01,d3
L00062c:
lea.l ($0024,a3),a3
bra L00061e
L000632:
tst.b d3
beq L0008ce
bra L000738
L00063c:
lea.l (L001e92),a0
bsr L000d94
move.w d0,(L001b44)
move.b #-$01,d2
move.b d2,(L001fae)
movea.l (L001b3a),a3
L00065c:
addq.b #1,d2
lea.l (L001b4a),a0
move.b d2,d0
bsr L001388
beq L000680
movea.l a0,a1
lea.l (L001a9b),a2
lea.l (L001d7a),a0
bsr L000e1c
bra L00065c
L000680:
movea.l (L001b3a),a3
L000686:
tst.b (a3)
beq L000738
cmpi.b #$e5,(a3)
beq L000730
lea.l (L001d7a),a0
bsr L000ccc
lea.l (L001a8b),a1
tst.b (L001fb5)
bne L0006b8
tst.b ($001a,a3)
beq L0006bc
lea.l (L001a7b),a1
L0006b8:
bsr L000978
L0006bc:
lea.l ($0024,a3),a2
L0006c0:
tst.b (a2)
beq L000730
cmpi.b #$e5,(a2)
beq L00072a
movea.l a3,a0
movea.l a2,a1
bsr L000b12
bne L00072a
move.b ($001b,a3),d0
and.b (L001fb0),d0
bsr L000b4e
bcs L000722
movem.l d0/a0-a1,-(a7)
lea.l (L001d7a),a0
bsr L000ccc
lea.l (L001a6b),a1
bsr L000978
movem.l (a7)+,d0/a0-a1
btst.l #$00,d0
bne L0008b6
btst.l #$02,d0
bne L0008b6
move.w #$0023,d1 ;'#'
L000714:
move.b (a1)+,(a0)+
dbra d1,L000714
move.b #-$01,d3
or.b #$20,d0
L000722:
move.b d0,($001b,a3)
move.b #$e5,(a2)
L00072a:
lea.l ($0024,a2),a2
bra L0006c0
L000730:
lea.l ($0024,a3),a3
bra L000686
L000738:
clr.l d5
movea.l (L001b3a),a3
L000740:
tst.b (a3)
beq L000770
cmpi.b #$e5,(a3)
beq L00076a
add.l ($0020,a3),d5
tst.b (L001fb5)
bne L00075c
tst.b ($001a,a3)
beq L00076a
L00075c:
move.b ($001b,a3),d0
or.b (L001faf),d0
move.b d0,($001b,a3)
L00076a:
lea.l ($0024,a3),a3
bra L000740
L000770:
move.l a3,d1
addq.l #2,d1
and.b #$fe,d1
movea.l d1,a4
move.l (L001b3a),d4
add.l (L001b3e),d4
sub.l d1,d4
and.w #$fc00,d4
cmp.l #$00000400,d4
bge L0007a0
lea.l (L001fbb),a4
move.l #$00000400,d4
L0007a0:
movea.l (L001b3a),a3
L0007a6:
tst.b (a3)
beq L00080a
cmpi.b #$e5,(a3)
beq L000804
lea.l (L001b4a),a0
move.b ($001a,a3),d0
bsr L001388
movea.l a0,a1
lea.l (L001a9b),a2
lea.l (L001d7a),a0
bsr L000df0
bsr L0011ca
bsr L000d70
move.w d0,(L001b46)
move.w (L001b44),d0
bsr L000c0a
move.l d0,-(a7)
move.l ($0020,a3),d3
move.l ($001c,a3),d2
bsr L000b70
move.l (a7)+,($001c,a3)
clr.b ($001a,a3)
bsr L000a0e
clr.l d5
L000804:
lea.l ($0024,a3),a3
bra L0007a6
L00080a:
movea.l (L001b3a),a3
movea.l a3,a2
L000812:
tst.b (a3)
beq L000830
cmpi.b #$e5,(a3)
beq L00082a
move.w #$001f,d0
L000820:
move.b (a3)+,(a2)+
dbra d0,L000820
addq.l #4,a3
bra L000812
L00082a:
lea.l ($0024,a3),a3
bra L000812
L000830:
movea.l (L001b3a),a0
suba.l a0,a2
move.l a2,-(a7)
move.l a0,-(a7)
move.w (L001b44),-(a7)
DOS _WRITE
lea.l ($000a,a7),a7
tst.l d0
bmi L0008de
move.w (L001b44),d0
bsr L000c0a
move.l d0,d3
bsr L0009f2
bsr L000a2a
clr.w d0
bra L00096e
L000868:
clr.b d2
movea.l (L001b3a),a3
lea.l (L001c62),a0
bsr L000e22
lea.l (L001ab2),a0
tst.l ($003c,a0)
beq L000934
clr.w (L001b48)
movea.l (L001b3a),a3
L000894:
bsr L000c18
addq.w #1,(L001b48)
lea.l ($0024,a3),a3
tst.b (a3)
bne L000894
tst.w (L001b48)
beq L00093c
clr.w d0
bra L00096e
L0008b6:
lea.l (L001795),a0
bra L0008ec
L0008be:
lea.l (L0018bf),a0
bra L0008ec
L0008c6:
lea.l (L00172f),a0
bra L0008ec
L0008ce:
lea.l (L00176d),a0
bra L0008ec
L0008d6:
lea.l (L0015b8),a0
bra L0008ec
L0008de:
move.b (L001fae),d0
bgt L0008f2
lea.l (L001829),a0
L0008ec:
bsr L00142c
bra L00096c
L0008f2:
cmp.b #$02,d0
bhi L000900
lea.l (L001853),a0
bra L000962
L000900:
lea.l (L001c62),a0
move.l a0,(L001b36)
lea.l (L0018dd),a0
bra L000962
L000914:
lea.l (L001795),a0
bra L000962
L00091c:
lea.l (L001905),a0
bra L000962
L000924:
lea.l (L001933),a0
bra L000962
L00092c:
lea.l (L00187f),a0
bra L000962
L000934:
lea.l (L001801),a0
bra L000962
L00093c:
lea.l (L0017d9),a0
bra L000962
L000944:
lea.l (L001963),a0
bra L000962
L00094c:
lea.l (L00174d),a0
bra L000962
L000954:
lea.l (L00172f),a0
bra L000962
L00095c:
lea.l (L0017b7),a0
L000962:
movea.l a0,a1
movea.l (L001b36),a0
bsr L000980
L00096c:
moveq.l #$01,d0
L00096e:
move.w d0,-(a7)
bsr L000a0e
bsr L0009ac
DOS _EXIT2
L000978:
tst.b (L001fb8)
beq L0009aa
L000980:
movem.l d0/a0-a1,-(a7)
move.l a0,-(a7)
movea.l a1,a0
bsr L00142c
lea.l (L00199b),a0
bsr L00142c
movea.l (a7)+,a0
bsr L00142c
lea.l (L0019a2),a0
bsr L00142c
movem.l (a7)+,d0/a0-a1
L0009aa:
rts
L0009ac:
bsr L0009f2
lea.l (L001e92),a0
move.b (L001fae),d0
bmi L0009de
lea.l (L001d7a),a0
cmp.b #$02,d0
beq L0009de
blt L0009f0
lea.l (L001e92),a0
cmp.b #$03,d0
beq L0009de
bsr L0009de
lea.l (L001c62),a0
L0009de:
move.l a1,-(a7)
lea.l (L001a3d),a1
bsr L000978
movea.l (a7)+,a1
move.l a0,-(a7)
DOS _DELETE
addq.l #4,a7
L0009f0:
rts
L0009f2:
tst.w (L001b44)
bmi L000a0c
move.w (L001b44),-(a7)
DOS _CLOSE
addq.l #2,a7
move.w #$ffff,(L001b44)
L000a0c:
rts
L000a0e:
tst.w (L001b46)
bmi L000a28
move.w (L001b46),-(a7)
DOS _CLOSE
addq.l #2,a7
move.w #$ffff,(L001b46)
L000a28:
rts
L000a2a:
lea.l (L001e92),a0
lea.l (L001c62),a1
move.b (a0),d0
or.b #$20,d0
move.b (a1),d1
or.b #$20,d1
cmp.b d0,d1
beq L000aa8
bsr L000d70
move.w d0,(L001b46)
move.b #$03,(L001fae)
movea.l a1,a0
bsr L000d94
move.w d0,(L001b44)
move.b #$04,(L001fae)
move.l (L001b3a),d1
addq.l #1,d1
and.b #$fe,d1
movea.l d1,a4
add.l (L001b3e),d4
sub.l d1,d4
and.w #$fc00,d4
cmp.l #$00000400,d4
bge L000a9a
lea.l (L001fbb),a4
move.l #$00000400,d4
L000a9a:
bsr L000bcc
move.b #$03,(L001fae)
rts
L000aa8:
move.w #$003f,-(a7) ;'?'
pea.l (L001c62)
pea.l (L001f32)
DOS _FILES
lea.l ($000a,a7),a7
tst.l d0
bmi L000ad2
pea.l (L001c62)
DOS _DELETE
addq.l #4,a7
tst.l d0
bmi L000900
L000ad2:
movem.l a0-a1,-(a7)
lea.l (L001a2f),a1
lea.l (L001e92),a0
bsr L000978
lea.l (L001a21),a1
lea.l (L001c62),a0
bsr L000978
movem.l (a7)+,a0-a1
pea.l (L001c62)
pea.l (L001e92)
DOS _RENAME
addq.l #8,a7
tst.l d0
bmi L000900
rts
L000b12:
link.w a6,#-$0018
movem.l d0/a0-a1,-(a7)
move.l a0,-(a7)
lea.l (-$000c,a6),a0
move.w #$000b,d0
bsr L001192
bsr L0011ca
movea.l (a7)+,a1
lea.l (-$0018,a6),a0
move.w #$000b,d0
bsr L001192
bsr L0011ca
lea.l (-$000c,a6),a1
bsr L001366
movem.l (a7)+,d0/a0-a1
unlk a6
rts
L000b4e:
movem.l d0-d1/a0-a1,-(a7)
lea.l ($001a,a0),a0
lea.l ($001a,a1),a1
move.w #$0003,d0
L000b5e:
subq.l #1,a0
subq.l #1,a1
move.b (a1),d1
cmp.b (a0),d1
dbne d0,L000b5e
movem.l (a7)+,d0-d1/a0-a1
rts
L000b70:
clr.w -(a7)
move.l d2,-(a7)
move.w (L001b46),-(a7)
DOS _SEEK
addq.l #8,a7
tst.l d0
bmi L00095c
move.w (L001b46),d0
bsr L000dc0
move.l d5,(L001aee)
move.l #$00000040,-(a7)
pea.l (L001ab2)
move.w (L001b44),-(a7)
DOS _WRITE
lea.l ($000a,a7),a7
tst.l d0
bmi L0008de
add.l #$00000040,d2
clr.w -(a7)
move.l d2,-(a7)
move.w (L001b46),-(a7)
DOS _SEEK
addq.l #8,a7
sub.l #$00000040,d3
L000bcc:
tst.l d3
beq L000c08
move.l d3,d1
cmp.l d4,d1
bcs L000bd8
move.l d4,d1
L000bd8:
move.l d1,-(a7)
move.l a4,-(a7)
move.w (L001b46),-(a7)
DOS _READ
lea.l ($000a,a7),a7
cmp.l d0,d1
bne L00095c
move.l d1,-(a7)
move.l a4,-(a7)
move.w (L001b44),-(a7)
DOS _WRITE
lea.l ($000a,a7),a7
cmp.l d0,d1
bne L0008de
sub.l d1,d3
bra L000bcc
L000c08:
rts
L000c0a:
move.w #$0001,-(a7)
clr.l -(a7)
move.w d0,-(a7)
DOS _SEEK
addq.l #8,a7
rts
L000c18:
link.w a6,#-$0118
move.w (L001b48),d0
and.w #$001f,d0
bne L000c32
pea.l (L0019a6)
DOS _PRINT
addq.l #4,a7
L000c32:
bsr L001440
clr.l d0
move.w (L001b48),d0
lea.l (-$0118,a6),a0
bsr L0013c4
pea.l ($0007,a0)
DOS _PRINT
addq.l #4,a7
bsr L001440
btst.b #$01,($001b,a3)
bne L000cbe
bsr L000ccc
move.l a0,-(a7)
DOS _PRINT
addq.l #4,a7
bsr L0011bc
sub.l #$00000017,d0
neg.l d0
bsr L00141e
move.l ($0020,a3),d0
bsr L0013c4
pea.l (a0)
DOS _PRINT
addq.l #4,a7
bsr L001440
move.b ($0019,a3),d0
asl.w #8,d0
or.b ($0018,a3),d0
bsr L00144a
bsr L001440
move.b ($0017,a3),d0
asl.w #8,d0
or.b ($0016,a3),d0
bsr L0014b6
bsr L001440
move.b ($000b,a3),d0
bsr L00151e
pea.l (L001a1e)
DOS _PRINT
addq.l #4,a7
unlk a6
rts
L000cbe:
pea.l (L0019e6)
DOS _PRINT
addq.l #4,a7
unlk a6