-
Notifications
You must be signed in to change notification settings - Fork 2
/
3BDISS.L68
2365 lines (2361 loc) · 163 KB
/
3BDISS.L68
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
0000140E Starting Address
Assembler used: EASy68K Editor/Assembler v5.14.00
Created On: 12/5/2013 11:52:56 PM
00000000 1 INCLUDE 'TEST.x68'
00007000 2 ORG $7000
00007000 3
00007000 =000000FA 4 VHEX1 EQU $FA
00007000 =0000DADA 5 VHEX2 EQU $DADA
00007000 =ADADDADA 6 VHEX3 EQU $ADADDADA
00007000 =00000045 7 VHEX4 EQU $45
00007000 =00000000 8 CBITS EQU $00000000
00007000 =FFCFCFCF 9 VBIN1 EQU %11111111110011111100111111001111
00007000 10
00007000 11
00007000 12
00007000 13
00007000 0442 DADA 14 SUBI.W #VHEX2,D2
00007004 1038 00FA 15 MOVE.B VHEX1, D0 <ea>,Dn
00007008 3239 0000DADA 16 MOVE.W VHEX2, D1
0000700E 243C ADADDADA 17 MOVE.L #VHEX3, D2
00007014 18
00007014 10B8 00FA 19 MOVE.B VHEX1, (A0) <ea>,(An)
00007018 32BC DADA 20 MOVE.W #VHEX2, (A1)
0000701C 24B9 ADADDADA 21 MOVE.L VHEX3, (A2)
00007022 22
00007022 16FC 00FA 23 MOVE.B #VHEX1, (A3)+ <ea>,(An)+
00007026 38F9 0000DADA 24 MOVE.W VHEX2, (A4)+
0000702C 2AF9 ADADDADA 25 MOVE.L VHEX3, (A5)+
00007032 26
00007032 1138 00FA 27 MOVE.B VHEX1, -(A0) <ea>,-(An)
00007036 3539 0000DADA 28 MOVE.W VHEX2, -(A2)
0000703C 293C ADADDADA 29 MOVE.L #VHEX3, -(A4)
00007042 30
00007042 13F8 00FA 0000DADA 31 MOVE.B VHEX1, VHEX2 <ea>,(xxx).W
0000704A 33F9 0000DADA ADADDADA 32 MOVE.W VHEX2, VHEX3 <ea>,(xxx).L
00007054 23F8 0000 00F00200 33 MOVE.L CBITS, $00F00200 <ea>,#<data>
0000705C 34
0000705C 13C0 0000DADA 35 MOVE.B D0, VHEX2 Dn,<ea>
00007062 33C1 00F00210 36 MOVE.W D1, $00F00210
00007068 22C2 37 MOVE.L D2, (A1)+
0000706A 38
0000706A 13D1 0000FF00 39 MOVE.B (A1),$FF00 (An),<ea>
00007070 3613 40 MOVE.W (A3),D3
00007072 2315 41 MOVE.L (A5),-(A1)
00007074 42
00007074 2488 43 MOVE.L A0, (A2) An,<ea>
00007076 36C9 44 MOVE.W A1, (A3)+
00007078 23CA ADADDADA 45 MOVE.L A2, VHEX3
0000707E 46
0000707E 13E0 0000DADA 47 MOVE.B -(A0),VHEX2 -(An),<ea>
00007084 3221 48 MOVE.W -(A1),D1
00007086 24E2 49 MOVE.L -(A2),(A2)+
00007088 50
00007088 3239 0000DADA 51 MOVE.W VHEX2, D1 (xxx).W, <ea>
0000708E 23F9 ADADDADA 0000DADA 52 MOVE.L VHEX3, VHEX2 (xxx).L, <ea>
00007098 23FC 000013CF ADADDADA 53 MOVE.L #%0001001111001111, VHEX3 #<data>,<ea>
000070A2 54
000070A2 55
000070A2 1F38 00FA 56 MOVE.B VHEX1, -(SP) <ea>, -(SP)
000070A6 34A9 00FA 57 MOVE.W (VHEX1,A1),(A2) (d16,An),<ea>
000070AA 333A 6A2E 58 MOVE.W (VHEX2,PC),-(A1) (d16,PC),<ea>
000070AE 261F 59 MOVE.L (SP)+, D3 (SP)+, <ea>
000070B0 70FA 60 MOVEQ.L #VHEX1,D0 MOVEQ
000070B2 61
000070B2 62
000070B2 63
000070B2 3040 64 MOVEA.W D0,A0 Dn,An
000070B4 2248 65 MOVEA.L A0,A1 An,An
000070B6 2451 66 MOVEA.L (A1),A2 (An),An
000070B8 67
000070B8 265A 68 MOVEA.L (A2)+,A3 (An)+,An
000070BA 3863 69 MOVEA.W -(A3),A4 -(An),An
000070BC 3A79 0000DADA 70 MOVEA.W VHEX2,A5 (xxx).W,An
000070C2 71
000070C2 2079 ADADDADA 72 MOVEA.L VHEX3,A0 (xxx).L,An
000070C8 227C 0000DADA 73 MOVEA.L #VHEX2,A1 #<data>,An
000070CE 2C79 FFCFCFCF 74 MOVEA.L VBIN1,A6 (xxx).L,An
000070D4 75
000070D4 3C6D 00FA 76 MOVEA.W (VHEX1,A5),A6 (d16,An),An
000070D8 3E7A 6A00 77 MOVEA.W (VHEX2,PC),A7 (d16,PC),An
000070DC 70FA 78 MOVEQ.L #VHEX1, D0 MOVEQ
000070DE 72FA 79 MOVEQ.L #VHEX1, D1 MOVEQ
000070E0 80
000070E0 81
000070E0 82
000070E0 4890 020E 83 MOVEM.W D1-D3/A1, (A0) <list>,(An)
000070E4 48B9 0302 0000DADA 84 MOVEM.W D1/A0-A1, VHEX2 <list>,(xxx).W
000070EC 48E1 F8F8 85 MOVEM.L D0-D4/A0-A4, -(A1) <list>,-(An)
000070F0 48F9 101C ADADDADA 86 MOVEM.L D2-D4/A4, VHEX3 <list>,(xxx).L
000070F8 87
000070F8 4C91 020E 88 MOVEM.W (A1),D1-D3/A1 (An),<list>
000070FC 4CB9 0302 0000DADA 89 MOVEM.W VHEX2, D1/A0-A1 (xxx).W,<list>
00007104 4CDA 1F1F 90 MOVEM.L (A2)+, D0-D4/A0-A4 (An)+,<list>
00007108 4CF9 101C ADADDADA 91 MOVEM.L VHEX3, D2-D4/A4 (xxx).L,<list>
00007110 92
00007110 93
00007110 48A8 0306 00FA 94 MOVEM.W D1-D2/A0-A1, (VHEX1,A0) <list>,(d16,An)
00007116 48E9 0306 00FA 95 MOVEM.L D1-D2/A0-A1, (VHEX1,A1) <list>,(d16,An)
0000711C 4CAA 0306 00FA 96 MOVEM.W (VHEX1,A2),D1-D2/A0-A1 (d16,An),<list>
00007122 4CFA 0306 69B4 97 MOVEM.L (VHEX2,PC),D1-D2/A0-A1 (d16,PC),<list>
00007128 98
00007128 99
00007128 D200 100 ADD.B D0,D1 Dn,Dn
0000712A D441 101 ADD.W D1,D2
0000712C D682 102 ADD.L D2,D3
0000712E 103
0000712E D249 104 ADD.W A1,D1 An,Dn
00007130 D48A 105 ADD.L A2,D2
00007132 DA8B 106 ADD.L A3,D5
00007134 107
00007134 D410 108 ADD.B (A0),D2 (An),Dn
00007136 D651 109 ADD.W (A1),D3
00007138 D892 110 ADD.L (A2),D4
0000713A 111
0000713A D01B 112 ADD.B (A3)+,D0 (An)+,Dn
0000713C D25C 113 ADD.W (A4)+,D1
0000713E D49D 114 ADD.L (A5)+,D2
00007140 115
00007140 D620 116 ADD.B -(A0),D3 -(An),Dn
00007142 D861 117 ADD.W -(A1),D4
00007144 DAA2 118 ADD.L -(A2),D5
00007146 119
00007146 D039 0000DADA 120 ADD.B VHEX2,D0 (xxx).W,Dn
0000714C D279 ADADDADA 121 ADD.W VHEX3,D1 (xxx).L,Dn
00007152 0683 000000FA 122 ADD.L #VHEX1,D3 #<data>,Dn
00007158 123
00007158 124
00007158 D2C0 125 ADD.W D0,A1 Dn,An
0000715A D4C1 126 ADD.W D1,A2
0000715C D7C2 127 ADD.L D2,A3
0000715E 128
0000715E D714 129 ADD.B D3,(A4) Dn,(An)
00007160 D955 130 ADD.W D4,(A5)
00007162 DB96 131 ADD.L D5,(A6)
00007164 132
00007164 D118 133 ADD.B D0,(A0)+ Dn,(An)+
00007166 D359 134 ADD.W D1,(A1)+
00007168 D59A 135 ADD.L D2,(A2)+
0000716A 136
0000716A D723 137 ADD.B D3,-(A3) Dn,-(An)
0000716C D964 138 ADD.W D4,-(A4)
0000716E DBA5 139 ADD.L D5,-(A5)
00007170 140
00007170 D339 0000DADA 141 ADD.B D1,VHEX2 Dn,(xxx).W
00007176 D5B9 ADADDADA 142 ADD.L D2,VHEX3 Dn,(xxx).L
0000717C D779 FFCFCFCF 143 ADD.W D3,VBIN1 Dn,(xxx).L
00007182 144
00007182 145
00007182 D029 00FA 146 ADD.B (VHEX1,A1),D0 (d16,An),Dn
00007186 D27A 6952 147 ADD.W (VHEX2,PC),D1 (d16,PC),Dn
0000718A D7A9 00FA 148 ADD.L D3,(VHEX1,A1) Dn,(d16,An)
0000718E 149
0000718E 150
0000718E D0C0 151 ADDA.W D0,A0 Dn,An
00007190 D3C1 152 ADDA.L D1,A1
00007192 153
00007192 D7CA 154 ADDA.L A2,A3 An,An
00007194 D8CB 155 ADDA.W A3,A4
00007196 156
00007196 D0D0 157 ADDA.W (A0),A0 (An),An
00007198 D5D2 158 ADDA.L (A2),A2
0000719A 159
0000719A D3D9 160 ADDA.L (A1)+,A1 (An)+,An
0000719C D4DA 161 ADDA.W (A2)+,A2
0000719E 162
0000719E D4E3 163 ADDA.W -(A3),A2 -(An),An
000071A0 D7E2 164 ADDA.L -(A2),A3
000071A2 165
000071A2 D1F9 0000DADA 166 ADDA.L VHEX2,A0 (xxx).W,An
000071A8 D4F9 0000DADA 167 ADDA.W VHEX2,A2
000071AE 168
000071AE D6F9 ADADDADA 169 ADDA.W VHEX3,A3 (xxx).L,An
000071B4 D9F9 ADADDADA 170 ADDA.L VHEX3,A4
000071BA 171
000071BA DBFC FFCFCFCF 172 ADDA.L #VBIN1,A5 #<data>,An
000071C0 173
000071C0 174
000071C0 D2EA 00FA 175 ADDA.W (VHEX1,A2),A1 (d16,An),An
000071C4 D7FA 6914 176 ADDA.L (VHEX2,PC),A3 (d16,PC),An
000071C8 D7EB 00FA 177 ADDA.L (VHEX1,A3),A3 (d16,An),An
000071CC 178
000071CC 179
000071CC 5201 180 ADDQ.B #$1,D1 #<data>,Dn
000071CE 5442 181 ADDQ.W #$2,D2
000071D0 5683 182 ADDQ.L #3,D3
000071D2 183
000071D2 5848 184 ADDQ.W #$4,A0 #<data>,An
000071D4 5A89 185 ADDQ.L #$5,A1
000071D6 5C8A 186 ADDQ.L #$6,A2
000071D8 187
000071D8 5E10 188 ADDQ.B #$7,(A0) #<data>,(An)
000071DA 5051 189 ADDQ.W #$8,(A1)
000071DC 5292 190 ADDQ.L #1,(A2)
000071DE 191
000071DE 541A 192 ADDQ.B #$2,(A2)+ #<data>,(An)+
000071E0 565B 193 ADDQ.W #$3,(A3)+
000071E2 589C 194 ADDQ.L #$4,(A4)+
000071E4 195
000071E4 5A25 196 ADDQ.B #$5,-(A5) #<data>,-(An)
000071E6 5C66 197 ADDQ.W #6,-(A6)
000071E8 5EA7 198 ADDQ.L #$7,-(A7)
000071EA 199
000071EA 5239 0000DADA 200 ADDQ.B #1,VHEX2 #<data>,(xxx).W
000071F0 54B9 ADADDADA 201 ADDQ.L #2,VHEX3 #<data>,(xxx).L
000071F6 5879 FFCFCFCF 202 ADDQ.W #$4,VBIN1 #<data>,(xxx).L
000071FC 203
000071FC 506A 00FA 204 ADDQ.W #8,(VHEX1,A2) #<data>,(d16,An)
00007200 0640 00FA 205 ADDI.W #VHEX1,D0 ADDI
00007204 D380 206 ADDX.L D0,D1 ADDX
00007206 207
00007206 208
00007206 209
00007206 9200 210 SUB.B D0,D1 Dn,Dn
00007208 9642 211 SUB.W D2,D3
0000720A 212
0000720A 9089 213 SUB.L A1,D0 An,Dn
0000720C 964C 214 SUB.W A4,D3
0000720E 215
0000720E 9613 216 SUB.B (A3),D3 (An),Dn
00007210 9092 217 SUB.L (A2),D0
00007212 218
00007212 9218 219 SUB.B (A0)+,D1 (An)+,Dn
00007214 945B 220 SUB.W (A3)+,D2
00007216 221
00007216 94A1 222 SUB.L -(A1),D2 -(An),Dn
00007218 9222 223 SUB.B -(A2),D1
0000721A 224
0000721A 9079 0000DADA 225 SUB.W VHEX2,D0 (xxx).W,Dn
00007220 94B9 FFCFCFCF 226 SUB.L VBIN1,D2 (xxx).L,Dn
00007226 0404 00F0 227 SUB.B #$F0,D4 #<data>,Dn
0000722A 228
0000722A 229
0000722A 92C0 230 SUB.W D0,A1 Dn,An
0000722C 99C3 231 SUB.L D3,A4
0000722E 232
0000722E 9713 233 SUB.B D3,(A3) Dn,(An)
00007230 9152 234 SUB.W D0,(A2)
00007232 235
00007232 9398 236 SUB.L D1,(A0)+ Dn,(An)+
00007234 951B 237 SUB.B D2,(A3)+
00007236 238
00007236 9561 239 SUB.W D2,-(A1) Dn,-(An)
00007238 93A2 240 SUB.L D1,-(A2)
0000723A 241
0000723A 9139 0000DADA 242 SUB.B D0,VHEX2 Dn,(xxx).W
00007240 9579 FFCFCFCF 243 SUB.W D2,VBIN1 Dn,(xxx).L
00007246 97B9 ADADDADA 244 SUB.L D3,VHEX3 Dn,(xxx).L
0000724C 245
0000724C 246
0000724C 902A 00FA 247 SUB.B (VHEX1,A2),D0 (d16,An),Dn
00007250 927A 6888 248 SUB.W (VHEX2,PC),D1 (d16,PC),Dn
00007254 93A9 00FA 249 SUB.L D1, (VHEX1,A1) Dn,(d16,An)
00007258 250
00007258 251
00007258 252
00007258 90C0 253 SUBA.W D0,A0 Dn,An
0000725A 93C1 254 SUBA.L D1,A1
0000725C 255
0000725C 94C9 256 SUBA.W A1,A2 An,An
0000725E 97CA 257 SUBA.L A2,A3
00007260 258
00007260 96D3 259 SUBA.W (A3),A3 (An),An
00007262 99D4 260 SUBA.L (A4),A4
00007264 261
00007264 90DD 262 SUBA.W (A5)+,A0 (An)+,An
00007266 93DE 263 SUBA.L (A6)+,A1
00007268 264
00007268 94E0 265 SUBA.W -(A0),A2 -(An),An
0000726A 97E1 266 SUBA.L -(A1),A3
0000726C 267
0000726C 98F9 0000DADA 268 SUBA.W VHEX2,A4 (xxx).W,An
00007272 9BF9 ADADDADA 269 SUBA.L VHEX3,A5 (xxx).L,An
00007278 9DFC FFCFCFCF 270 SUBA.L #VBIN1,A6 #<data>,An
0000727E 271
0000727E 272
0000727E 98E9 0F0F 273 SUBA.W ($F0F,A1),A4 (d16,An),An
00007282 95FA 9E8D 274 SUBA.L ($1111,PC),A2 (d16,PC),An
00007286 275
00007286 276
00007286 0400 00FA 277 SUBI.B #VHEX1,D0 #<data>,Dn
0000728A 0442 DADA 278 SUBI.W #VHEX2,D2
0000728E 279
0000728E 0492 ADADDADA 280 SUBI.L #VHEX3,(A2) #<data>,(An)
00007294 0411 000A 281 SUBI.B #10,(A1)
00007298 282
00007298 0458 0000 283 SUBI.W #CBITS,(A0)+ #<data>,(An)+
0000729C 049A ADADDADA 284 SUBI.L #VHEX3,(A2)+
000072A2 285
000072A2 0424 000A 286 SUBI.B #10,-(A4) #<data>,-(An)
000072A6 0461 000F 287 SUBI.W #$F,-(A1)
000072AA 288
000072AA 04B9 0000DADA 0000DADA 289 SUBI.L #VHEX2,VHEX2 #<data>,(xxx).W
000072B4 0439 0009 ADADDADA 290 SUBI.B #09,VHEX3 #<data>,(xxx).L
000072BC 291
000072BC 292
000072BC 0469 0009 0030 293 SUBI.W #9,($30,A1) #<data>,(d16,An)
000072C2 5380 294 SUBQ.L #1,D0 SUBQ
000072C4 295
000072C4 296
000072C4 297
000072C4 298
000072C4 C2C0 299 MULU.W D0,D1 Dn,Dn
000072C6 C2D0 300 MULU.W (A0),D1 (An),Dn
000072C8 C4DA 301 MULU.W (A2)+,D2 (An)+,Dn
000072CA C6E3 302 MULU.W -(A3),D3 -(An),Dn
000072CC C8F9 0000DADA 303 MULU.W VHEX2,D4 (xxx).W,Dn
000072D2 CAF9 ADADDADA 304 MULU.W VHEX3,D5 (xxx).L,Dn
000072D8 CCFC 2345 305 MULU.W #$2345,D6 #<data>,Dn
000072DC 306
000072DC 307
000072DC C0EA 0032 308 MULU.W ($32,A2),D0 (d16,An),Dn
000072E0 C2FA 9D1E 309 MULU.W ($1000,PC),D1 (d16,PC),Dn
000072E4 310
000072E4 311
000072E4 312
000072E4 85C1 313 DIVS.W D1,D2 Dn,Dn
000072E6 85D1 314 DIVS.W (A1),D2 (An),Dn
000072E8 87DA 315 DIVS.W (A2)+,D3 (An)+,Dn
000072EA 89E3 316 DIVS.W -(A3),D4 -(An),Dn
000072EC 8BF9 0000DADA 317 DIVS.W VHEX2,D5 (xxx).W,Dn
000072F2 8DF9 ADADDADA 318 DIVS.W VHEX3,D6 (xxx).L,Dn
000072F8 8FFC FF00 319 DIVS.W #$FF00,D7 #<data>,Dn
000072FC 320
000072FC 321
000072FC 83EB 0401 322 DIVS.W ($401,A3),D1 (d16,An),Dn
00007300 85FA AF0F 323 DIVS.W ($2211,PC),D2 (d16,PC),Dn
00007304 324
00007304 325
00007304 326
00007304 B101 327 EOR.B D0,D1 Dn,Dn
00007306 B342 328 EOR.W D1,D2
00007308 329
00007308 B592 330 EOR.L D2,(A2) Dn,(An)
0000730A B713 331 EOR.B D3,(A3)
0000730C 332
0000730C B95C 333 EOR.W D4,(A4)+ Dn,(An)+
0000730E BB9D 334 EOR.L D5,(A5)+
00007310 335
00007310 BD26 336 EOR.B D6,-(A6) Dn,-(An)
00007312 BF67 337 EOR.W D7,-(A7)
00007314 338
00007314 B1B9 0000DADA 339 EOR.L D0,VHEX2 Dn,(xxx).W
0000731A B339 ADADDADA 340 EOR.B D1,VHEX3 Dn,(xxx).L
00007320 341
00007320 342
00007320 B56C 0101 343 EOR.W D2,($101,A4) Dn,(d16,An)
00007324 0A3C 0001 344 EORI.B #$1,CCR EORI to CCR
00007328 345
00007328 346
00007328 347
00007328 0A00 00FA 348 EORI.B #VHEX1,D0 #<data>,Dn
0000732C 0A41 000A 349 EORI.W #10,D1
00007330 350
00007330 0A91 ADADDADA 351 EORI.L #VHEX3,(A1) #<data>,An
00007336 0A13 0012 352 EORI.B #$12,(A3)
0000733A 353
0000733A 0A5A DADA 354 EORI.W #VHEX2,(A2)+ #<data>,(An)+
0000733E 0A9C FFCFCFCF 355 EORI.L #VBIN1,(A4)+
00007344 356
00007344 0A20 00FF 357 EORI.B #$FF, -(A0) #<data>,-(An)
00007348 0A65 1222 358 EORI.W #$1222,-(A5)
0000734C 359
0000734C 0AB9 0000DADA 0000DADA 360 EORI.L #VHEX2,VHEX2 #<data>,(xxx).W
00007356 0A39 0011 ADADDADA 361 EORI.B #$11, VHEX3 #<data>,(xxx).L
0000735E 362
0000735E 363
0000735E 0A6A 000A 0011 364 EORI.W #10, ($11,A2) #<data>,(d16,An)
00007364 C342 365 EXG.L D1,D2 EXG
00007366 366
00007366 367
00007366 368
00007366 C200 369 AND.B D0,D1 Dn,Dn
00007368 C451 370 AND.W (A1),D2 (An),Dn
0000736A C69A 371 AND.L (A2)+,D3 (An)+,Dn
0000736C C823 372 AND.B -(A3),D4 -(An),Dn
0000736E CA79 0000DADA 373 AND.W VHEX2,D5 (xxx).W,Dn
00007374 CCB9 ADADDADA 374 AND.L VHEX3,D6 (xxx).L,Dn
0000737A CE3C 00FF 375 AND.B #$FF,D7 #<data>,Dn
0000737E 376
0000737E 377
0000737E C151 378 AND.W D0,(A1) Dn,(An)
00007380 C39A 379 AND.L D1,(A2)+ Dn,(An)+
00007382 C523 380 AND.B D2,-(A3) Dn,-(An)
00007384 C779 0000DADA 381 AND.W D3,VHEX2 Dn,(xxx).W
0000738A C9B9 FFCFCFCF 382 AND.L D4,VBIN1 Dn,(xxx).L
00007390 383
00007390 384
00007390 C42A 0012 385 AND.B ($12,A2),D2 (d16,An),Dn
00007394 C67A 9D8B 386 AND.W ($1121,PC),D3 (d16,PC),Dn
00007398 C9AC 0112 387 AND.L D4, ($112,A4) Dn,(d16,An)
0000739C 388
0000739C 389
0000739C 0000 00F1 390 ORI.B #$F1,D0 #<data>,Dn
000073A0 0052 DADA 391 ORI.W #VHEX2,(A2) #<data>,(An)
000073A4 009B ADADDADA 392 ORI.L #VHEX3,(A3)+ #<data>,(An)+
000073AA 0024 0011 393 ORI.B #$11,-(A4) #<data>,-(An)
000073AE 0079 0062 0000DADA 394 ORI.W #98,VHEX2 #<data>,(xxx).W
000073B6 00B9 00000064 ADADDADA 395 ORI.L #100,VHEX3 #<data>,(xxx).L
000073C0 396
000073C0 397
000073C0 002A 0004 00FF 398 ORI.B #4,($FF,A2) #<data>,(d16,An)
000073C6 8441 399 OR.W D1,D2 OR
000073C8 400
000073C8 401
000073C8 E121 402 ASL.B D0,D1 Dx,Dy
000073CA E562 403 ASL.W D2,D2
000073CC E982 404 ASL.L #4,D2 #<data>,Dy
000073CE E1D2 405 ASL.W (A2) (An)
000073D0 E1DB 406 ASL.W (A3)+ (An)+
000073D2 E1E4 407 ASL.W -(A4) -(An)
000073D4 E1F9 0000DADA 408 ASL.W VHEX2 (xxx).W
000073DA E1F9 ADADDADA 409 ASL.W VHEX3 (xxx).L
000073E0 410
000073E0 411
000073E0 E1EC 0022 412 ASL.W ($22,A4) (d16,An)
000073E4 E0F9 0000DADA 413 ASR.W VHEX2 ASR
000073EA 414
000073EA E029 415 LSR.B D0,D1 Dx,Dy
000073EC E46A 416 LSR.W D2,D2
000073EE E88A 417 LSR.L #4,D2 #<data>,Dy
000073F0 E2D2 418 LSR.W (A2) (An)
000073F2 E2DB 419 LSR.W (A3)+ (An)+
000073F4 E2E4 420 LSR.W -(A4) -(An)
000073F6 E2F9 0000DADA 421 LSR.W VHEX2 (xxx).W
000073FC E2F9 ADADDADA 422 LSR.W VHEX3 (xxx).L
00007402 423
00007402 424
00007402 E2EC 0022 425 LSR.W ($22,A4) (d16,An)
00007406 E3F9 0000DADA 426 LSL.W VHEX2 LSL
0000740C 427
0000740C 428
0000740C 0101 429 BTST.L D0, D1 Dn,Dn
0000740E 0311 430 BTST.B D1,(A1) Dn,(An)
00007410 051A 431 BTST.B D2,(A2)+ Dn,(An)+
00007412 0723 432 BTST.B D3,-(A3) Dn,-(An)
00007414 0939 0000DADA 433 BTST.B D4,VHEX2 Dn,(xxx).W
0000741A 0B38 0045 434 BTST.B D5,VHEX4 Dn,(xxx).L
0000741E 0D3C 0004 435 BTST.B D6,#4 Dn,#<data>
00007422 436
00007422 437
00007422 0800 00DA 438 BTST.L #VHEX2,D0 #<data>,Dn
00007426 0810 00FA 439 BTST.B #VHEX1,(A0) #<data>,(An)
0000742A 0818 00DA 440 BTST.B #VHEX3,(A0)+ #<data>,(An)+
0000742E 0824 00CF 441 BTST.B #VBIN1,-(A4) #<data>,-(An)
00007432 0839 0011 0000DADA 442 BTST.B #$11,VHEX2 #<data>,(xxx).W
0000743A 0839 0099 ADADDADA 443 BTST.B #$99,VHEX3 #<data>,(xxx).L
00007442 444
00007442 445
00007442 0F2B 0011 446 BTST.B D7, ($11,A3) Dn,(d16,An)
00007446 0D3A 8C62 447 BTST.B D6, ($AA,PC) Dn,(d16,PC)
0000744A 082A 0057 00BB 448 BTST.B #1111,($BB,A2) #<data>,(d16,An)
00007450 449
00007450 B001 450 CMP.B D1,D0 Dn,Dn
00007452 6700 0002 451 BEQ B1a
00007456 452 B1a
00007456 B24A 453 CMP.W A2,D1 An,Dn
00007458 6700 0002 454 BEQ B2a
0000745C 455 B2a
0000745C B493 456 CMP.L (A3),D2 (An),Dn
0000745E 6D00 0002 457 BLT B3
00007462 458 B3
00007462 B61C 459 CMP.B (A4)+,D3 (An)+,Dn
00007464 6600 0002 460 BNE B4
00007468 461 B4
00007468 B865 462 CMP.W -(A5),D4 -(An),Dn
0000746A 6200 0002 463 BHI B5
0000746E 464 B5
0000746E BAB9 0000DADA 465 CMP.L VHEX2,D5 (xxx).W,Dn
00007474 BC39 ADADDADA 466 CMP.B VHEX3,D6 (xxx).L,Dn
0000747A BEBC FFCFCFCF 467 CMP.L #VBIN1,D7 #<data>,Dn
00007480 468
00007480 469
00007480 B028 00FF 470 CMP.B ($FF,A0),D0 (d16,An),Dn
00007484 B47A 983B 471 CMP.W ($CC1,PC),D2 (d16,PC),Dn
00007488 472
00007488 473
00007488 B0C0 474 CMPA.W D0,A0 Dn,An
0000748A B3C8 475 CMPA.L A0,A1 An,An
0000748C 6700 0002 476 BEQ Ba1
00007490 477 Ba1
00007490 B4D1 478 CMPA.W (A1),A2 (An),An
00007492 6D00 0002 479 BLT Ba2
00007496 480 Ba2
00007496 B7DA 481 CMPA.L (A2)+,A3 (An)+,An
00007498 6600 0002 482 BNE Ba3
0000749C 483 Ba3
0000749C B8E3 484 CMPA.W -(A3),A4 -(An),An
0000749E 6200 0002 485 BHI Ba4
000074A2 486 Ba4
000074A2 BBF9 0000DADA 487 CMPA.L VHEX2,A5 (xxx).W,An
000074A8 BCF9 ADADDADA 488 CMPA.W VHEX3,A6 (xxx).L,An
000074AE BFFC 000004D2 489 CMPA.L #1234,A7 #<data>,An
000074B4 490
000074B4 491
000074B4 B0E9 0033 492 CMPA.W ($33,A1),A0 (d16,An),An
000074B8 B5FA 8B57 493 CMPA.L ($11,PC),A2 (d16,PC),An
000074BC 494
000074BC 495
000074BC 0C00 00FA 496 CMPI.B #VHEX1,D0 #<data>,Dn
000074C0 6700 0002 497 BEQ Bb1
000074C4 498 Bb1
000074C4 0C51 DADA 499 CMPI.W #VHEX2,(A1) #<data>,(An)
000074C8 6600 0002 500 BNE Bb2
000074CC 501 Bb2
000074CC 0C9A ADADDADA 502 CMPI.L #VHEX3,(A2)+ #<data>,(An)+
000074D2 6200 0002 503 BHI Bb3
000074D6 504 Bb3
000074D6 0C23 0012 505 CMPI.B #$12,-(A3) #<data>,-(An)
000074DA 6D00 000A 506 BLT Bb4
000074DE 0C79 1234 0000DADA 507 CMPI.W #$1234,VHEX2 #<data>,(xxx).W
000074E6 508 Bb4
000074E6 0CB9 FFCFCFCF ADADDADA 509 CMPI.L #VBIN1,VHEX3 #<data>,(xxx).L
000074F0 510
000074F0 511
000074F0 0C2A 00FF 0099 512 CMPI.B #$FF,($99,A2) #<data>,(d16,An)
000074F6 B30A 513 CMPM.B (A2)+,(A1)+ CMPM
000074F8 514
000074F8 515
000074F8 41D1 516 LEA (A1),A0 (An),An
000074FA 43F9 0000DADA 517 LEA VHEX2,A1 (xxx).W,An
00007500 45F9 ADADDADA 518 LEA VHEX3,A2 (xxx).L,An
00007506 519
00007506 520
00007506 43E9 0010 521 LEA ($10,A1),A1 (d16,An),An
0000750A 45FA 948D 522 LEA ($999,PC),A2 (d16,PC),An
0000750E 523
0000750E 4EB9 0000752A 524 JSR JUMP
00007514 4E91 525 JSR (A1) (An)
00007516 4EB9 0000DADA 526 JSR VHEX2 (xxx).W
0000751C 4EB9 ADADDADA 527 JSR VHEX3 (xxx).L
00007522 4EAA 0019 528 JSR ($19,A2) (d16,An)
00007526 4EBA 8BD8 529 JSR ($100,PC) (d16,PC)
0000752A 530
0000752A 531 JUMP *For JSR & RTS test
0000752A 1201 532 MOVE.B D1, D1
0000752C 4E75 533 RTS
0000752E 4E71 534 NOP NOP
00007530 535
00007530 536
00007530 537
00007530 538
00007530 539
00007530 540 -------------------- end include --------------------
00007530 541 *----------------------------------------------------------------------------
00007530 542 * Title : 3B Disassembler
00007530 543 * Written by : The Three Bears: Joseph Schooley, Nguyen Tong, Terence Calhoun
00007530 544 * Date : 11/30/2013
00007530 545 * Description: A Motorola MC68000 Microprocessor Disassembler
00007530 546 *----------------------------------------------------------------------------
00001000 547 ORG $1000
00001000 =0000000D 548 CR EQU $0D ASCII: carriage return
00001000 =0000000A 549 LF EQU $0A ASCII: line feed
00001000 =00000009 550 TB EQU $09 ASCII: horizontal tab
00001000 =00007000 551 MNADDR EQU $7000 Min address
00001000 =00FFFFFF 552 MXADDR EQU $00FFFFFF Max address
00001000 553
00001000 554 GBUFF DS.L 1 Pointer to next location in "Good buffer"
00001004 555 SLOC DS.B 4 Starting location storage
00001008 556 ELOC DS.B 4 Ending location storage
0000100C 557
0000100C 558 *-----I/O Memory-----
0000100C 559 IOOPCD DS.B 1 IO offset value for OPNAME, or FF if none
0000100D 560 IOBDCD DS.B 1 IO offset value for BAD OPNAME, or FF if none
0000100E 561 IOSIZE DS.B 1 IO size for OP code, or FF if none
00001010 562 IOADDR DS.L 1 IO address value for instruction memory location
00001014 563 IOLC DS.B 1 IO line counter for screen
00001015 564 QDATA DS.B 1 OP immediate data for xxxxQ instructions
00001016 565
00001016 566
00001016 567 * OP code name memory
00001016 568 * Example to display MULU:
00001016 569 * LEA OPNAME,A1
00001016 570 * ADD.L #$2D,A1
00001016 571 * MOVE.B #14,D0
00001016 572 * TRAP #15
00001016 573 * NAME DEC HEX
00001016= 4D 4F 56 45 00 574 OPNAME DC.B 'MOVE',0 00 00
0000101B= 4D 4F 56 45 41 00 575 DC.B 'MOVEA',0 05 05
00001021= 4D 4F 56 45 4D 00 576 DC.B 'MOVEM',0 11 0B
00001027= 41 44 44 00 577 DC.B 'ADD',0 17 11
0000102B= 41 44 44 41 00 578 DC.B 'ADDA',0 21 15
00001030= 41 44 44 51 00 579 DC.B 'ADDQ',0 26 1A
00001035= 53 55 42 00 580 DC.B 'SUB',0 31 1F
00001039= 53 55 42 41 00 581 DC.B 'SUBA',0 35 23
0000103E= 53 55 42 49 00 582 DC.B 'SUBI',0 40 28
00001043= 4D 55 4C 55 00 583 DC.B 'MULU',0 45 2D
00001048= 44 49 56 53 00 584 DC.B 'DIVS',0 50 32
0000104D= 4C 45 41 00 585 DC.B 'LEA',0 55 37
00001051= 41 4E 44 00 586 DC.B 'AND',0 59 3B
00001055= 4F 52 49 00 587 DC.B 'ORI',0 63 3F
00001059= 45 4F 52 00 588 DC.B 'EOR',0 67 43
0000105D= 45 4F 52 49 00 589 DC.B 'EORI',0 71 47
00001062= 4E 4F 54 00 590 DC.B 'NOT',0 76 4C
00001066= 41 53 4C 00 591 DC.B 'ASL',0 80 50
0000106A= 4C 53 52 00 592 DC.B 'LSR',0 84 54
0000106E= 42 54 53 54 00 593 DC.B 'BTST',0 88 58
00001073= 43 4D 50 00 594 DC.B 'CMP',0 93 5D
00001077= 43 4D 50 41 00 595 DC.B 'CMPA',0 97 61
0000107C= 43 4D 50 49 00 596 DC.B 'CMPI',0 102 66
00001081= 42 43 43 00 597 DC.B 'BCC',0 107 6B
00001085= 42 45 51 00 598 DC.B 'BEQ',0 111 6F
00001089= 42 4C 54 00 599 DC.B 'BLT',0 115 73
0000108D= 42 4E 45 00 600 DC.B 'BNE',0 119 77
00001091= 42 48 49 00 601 DC.B 'BHI',0 123 7B
00001095= 4A 53 52 00 602 DC.B 'JSR',0 127 7F
00001099= 52 54 53 00 603 DC.B 'RTS',0 131 83
0000109D= 42 41 44 00 604 DC.B 'BAD',0 135 87
000010A1= 4D 4F 56 45 51 00 605 DC.B 'MOVEQ',0 139 8B
000010A7= 4C 53 4C 00 606 DC.B 'LSL',0 145 91
000010AB= 41 53 52 00 607 DC.B 'ASR',0 149 95
000010AF= 41 44 44 49 00 608 DC.B 'ADDI',0 153 99
000010B4 609
000010B4= 2E 42 00 610 IOOPSZ DC.B '.B',0 0 00
000010B7= 2E 57 00 611 DC.B '.W',0 3 03
000010BA= 2E 4C 00 612 DC.B '.L',0 6, 06
000010BD= 20 20 00 613 DC.B ' ',0 9, 09
000010C0 614
000010C0 615 *-----EA Memory------
000010C0 616 DMD DS.B 1 Destination mode
000010C1 617 DRG DS.B 1 Destination register
000010C2 618 SMD DS.B 1 Source mode
000010C3 619 SRG DS.B 1 Source register
000010C4 620 RGMD DS.B 1 Last register + mod (00REGMOD)
000010C5 621 DIS DS.B 1 Last displacement
000010C6 622
000010C6 623 *--------------------
000010C6 624
000010C6= 20 20 5F 20 20 20 ... 625 MSSG0 DC.B ' _ _ _ _ _ _ ',CR,LF
000010EA= 20 28 6F 5C 2D 2D ... 626 DC.B ' (o\---/o) (o\---/o) (o\---/o)',CR,LF
0000110E= 20 20 7C 20 2D 20 ... 627 DC.B ' | - - | | ^ ^ | | . . |',CR,LF
00001131= 20 5F 28 20 28 59 ... 628 DC.B ' _( (Y)_)_,--.(_(Y)_),--._(_(Y) )_',CR,LF
00001155= 2F 20 2F 5F 5F 5F ... 629 DC.B '/ /___|_ ".." ".." _|___\ \',CR,LF
0000117A= 5C 5F 5F 5F 5F 5F ... 630 DC.B '\_______): THREE :(_______/',CR,LF
0000119F= 7C 20 7C 20 20 20 ... 631 DC.B '| | | BEARS | | |',CR,LF
000011C4= 7C 20 7C 20 20 20 ... 632 DC.B '| | | DISASSEMBLER | | |',CR,LF
000011E9= 7C 20 20 5C 5F 5F ... 633 DC.B '| \__|__Joey__Terence__Win_|__/ |',CR,LF
0000120E= 20 5C 20 20 20 20 ... 634 DC.B ' \ I /_ ) | ( _\ I /',CR,LF
00001232= 20 20 5C 5F 5F 5F ... 635 DC.B ' \____)___)(___/ \___)(___(____/',CR,LF
00001255= 57 65 6C 63 6F 6D ... 636 DC.B 'Welcome to 3B Disassembler. Enter 0 at any time to quit.',CR,LF,0
00001290= 45 6E 74 65 72 20 ... 637 MSSG1 DC.B 'Enter the starting location of the code to be disassembled, or leave it blank',CR,LF,'for the starting address:',0
000012F9= 45 6E 74 65 72 20 ... 638 MSSG2 DC.B 'Enter the ending location of the code to be disassembled, or leave it blank',CR,LF,'for the ending address:',0
0000135E= 50 72 65 73 73 20 ... 639 MSSG4 DC.B 'Press any key for the next page.',0
0000137F= 59 6F 75 20 68 61 ... 640 MSSG5 DC.B 'You have reached the end of the program.',0
000013A8= 41 64 64 72 65 73 ... 641 HEADR DC.B 'Address OP-Code Operand',CR,LF,0
000013CA= 54 68 65 20 69 6E ... 642 ERR0 DC.B 'The input address was too small.',CR,LF,0
000013ED= 54 68 65 20 69 6E ... 643 ERR1 DC.B 'The input address was too big.',CR,LF,0
0000140E 644
0000140E 11FC 0000 1014 645 START MOVE.B #0,IOLC
00001414 646 *JMP $7000
00001414 43F8 10C6 647 LEA MSSG0,A1 Welcome message
00001418 103C 000E 648 MOVE.B #14,D0
0000141C 4E4F 649 TRAP #15
0000141E 6000 0216 650 BRA PRMPT1
00001422 651
00001422 652 *-----------------------------------
00001422 653 * Conversion & Comparison Methods
00001422 654 *-----------------------------------
00001422 655
00001422 656 *
00001422 657 * Flag set / clear: Sets or clears the flag
00001422 658 *
00001422 659
00001422 44FC 0004 660 FLAGST MOVE.W #%100,CCR Set the z-flag
00001426 4E75 661 RTS Return to caller
00001428 44FC 0000 662 FLAGCL MOVE.W #%000,CCR Clear the z-flg
0000142C 4E75 663 RTS Return to caller
0000142E 664
0000142E 665 *
0000142E 666 * ASCII2HEX: Convert ASCII into HEX.
0000142E 667 * Input ASCII from D0 output HEX to D1
0000142E 668 *
0000142E 669
0000142E 670 ASCII2HEX
0000142E 2200 671 MOVE.L D0,D1 Move the input to D1
00001430 0441 3030 672 SUB #$3030,D1 Convert last word
00001434 4841 673 SWAP D1 Swap bytes
00001436 0441 3030 674 SUB #$3030,D1 Convert first word
0000143A 4841 675 SWAP D1 Restore order
0000143C 676
0000143C 2F02 677 MOVE.L D2,-(SP) Push D2 on stack
0000143E 4282 678 CLR.L D2
00001440 143C 0003 679 MOVE.B #3,D2 Set rotation count
00001444 680
00001444 6100 001A 681 BSR A2H Start loop
00001448 682
00001448 241F 683 MOVE.L (SP)+,D2 Restore D2
0000144A 684
0000144A 685 * XAXBXCXD
0000144A E919 686 ROL.B #4,D1 XAXBXCDX
0000144C E949 687 LSL.W #4,D1 XAXBCDX0
0000144E E159 688 ROL.W #8,D1 XAXBX0CD
00001450 4841 689 SWAP D1 X0CDXAXB
00001452 E919 690 ROL.B #4,D1 X0CDXABX
00001454 E949 691 LSL.W #4,D1 X0CDABX0
00001456 E189 692 LSL.L #8,D1 CDABX000
00001458 4241 693 CLR.W D1 CDAB0000
0000145A 4841 694 SWAP D1 0000CDAB
0000145C E159 695 ROL.W #8,D1 0000ABCD
0000145E 4E75 696 RTS Return to caller
00001460 697
00001460 698
00001460 699 A2H * ASCII2HEX helper: Convert bytes that were > 30 to appropriate HEX value
00001460 B23C 0011 700 CMP.B #$11,D1 11 = A
00001464 6700 0032 701 BEQ A2H11
00001468 B23C 0012 702 CMP.B #$12,D1 12 = B
0000146C 6700 0030 703 BEQ A2H12
00001470 B23C 0013 704 CMP.B #$13,D1 13 = C
00001474 6700 002E 705 BEQ A2H13
00001478 B23C 0014 706 CMP.B #$14,D1 14 = D
0000147C 6700 002C 707 BEQ A2H14
00001480 B23C 0015 708 CMP.B #$15,D1 15 = E
00001484 6700 002A 709 BEQ A2H15
00001488 B23C 0016 710 CMP.B #$16,D1 16 = F
0000148C 6700 0028 711 BEQ A2H16
00001490 712
00001490 713 A2HADV * A2H conversion branch helper: Rotate to the next byte, and loop back to A2H until all bytes have been analyzed/converted
00001490 E199 714 ROL.L #8,D1 Rotate 1st byte to the end
00001492 51CA FFCC 715 DBRA D2,A2H If count is > 0, decrement and loop back to A2H
00001496 4E75 716 RTS If count == 0, return to sub-routine
00001498 717
00001498 718 * A2H conversion branches
00001498 123C 000A 719 A2H11 MOVE.B #$A,D1
0000149C 60F2 720 BRA A2HADV
0000149E 123C 000B 721 A2H12 MOVE.B #$B,D1
000014A2 60EC 722 BRA A2HADV
000014A4 123C 000C 723 A2H13 MOVE.B #$C,D1
000014A8 60E6 724 BRA A2HADV
000014AA 123C 000D 725 A2H14 MOVE.B #$D,D1
000014AE 60E0 726 BRA A2HADV
000014B0 123C 000E 727 A2H15 MOVE.B #$E,D1
000014B4 60DA 728 BRA A2HADV
000014B6 123C 000F 729 A2H16 MOVE.B #$F,D1
000014BA 60D4 730 BRA A2HADV
000014BC 731
000014BC 732 *
000014BC 733 * HEX2ASCII: Convert ASCII into HEX.
000014BC 734 * Input HEX from D0.W output ASCII to D1.L
000014BC 735 *
000014BC 736
000014BC 737 HEX2ASCII
000014BC 2200 738 MOVE.L D0,D1 Move the input to D1
000014BE 739
000014BE 740 * XXXXABCD
000014BE 4841 741 SWAP D1 ABCDXXXX
000014C0 4241 742 CLR.W D1 ABCD0000
000014C2 E999 743 ROL.L #4,D1 BCD0000A
000014C4 E909 744 LSL.B #4,D1 BCD000A0
000014C6 E159 745 ROL.W #8,D1 BCD0A000
000014C8 E999 746 ROL.L #4,D1 CD0A000B
000014CA E159 747 ROL.W #8,D1 CD0A0B00
000014CC E999 748 ROL.L #4,D1 D0A0B00C
000014CE E909 749 LSL.B #4,D1 D0A0B0C0
000014D0 E999 750 ROL.L #4,D1 0A0B0C0D
000014D2 751
000014D2 2F02 752 MOVE.L D2,-(SP) Push D2 on stack
000014D4 4282 753 CLR.L D2
000014D6 143C 0003 754 MOVE.B #3,D2 Set rotation count
000014DA 6100 0012 755 BSR H2A Start loop
000014DE 241F 756 MOVE.L (SP)+,D2 Restore D2
000014E0 757
000014E0 0641 3030 758 ADD #$3030,D1 Convert last word
000014E4 4841 759 SWAP D1 Swap bytes
000014E6 0641 3030 760 ADD #$3030,D1 Convert first word
000014EA 4841 761 SWAP D1 Restore order
000014EC 4E75 762 RTS Return to caller
000014EE 763
000014EE 764
000014EE 765 H2A * ASCII2HEX helper: Convert bytes that were > 30 to appropriate HEX value
000014EE B23C 000A 766 CMP.B #$A,D1 A = 11
000014F2 6700 0032 767 BEQ H2AA
000014F6 B23C 000B 768 CMP.B #$B,D1 B = 12
000014FA 6700 0030 769 BEQ H2AB
000014FE B23C 000C 770 CMP.B #$C,D1 C = 13
00001502 6700 002E 771 BEQ H2AC
00001506 B23C 000D 772 CMP.B #$D,D1 D = 14
0000150A 6700 002C 773 BEQ H2AD
0000150E B23C 000E 774 CMP.B #$E,D1 E = 15
00001512 6700 002A 775 BEQ H2AE
00001516 B23C 000F 776 CMP.B #$F,D1 F = 16
0000151A 6700 0028 777 BEQ H2AF
0000151E 778
0000151E 779 H2AADV * H2A conversion branch helper: Rotate to the next byte, and loop back to H2A until all bytes have been analyzed/converted
0000151E E199 780 ROL.L #8,D1 Rotate 1st byte to the end
00001520 51CA FFCC 781 DBRA D2,H2A If count is > 0, decrement and loop back to A2H
00001524 4E75 782 RTS If count == 0, return to sub-routine
00001526 783
00001526 784 * H2A conversion branches
00001526 123C 0011 785 H2AA MOVE.B #$11,D1
0000152A 60F2 786 BRA H2AADV
0000152C 123C 0012 787 H2AB MOVE.B #$12,D1
00001530 60EC 788 BRA H2AADV
00001532 123C 0013 789 H2AC MOVE.B #$13,D1
00001536 60E6 790 BRA H2AADV
00001538 123C 0014 791 H2AD MOVE.B #$14,D1
0000153C 60E0 792 BRA H2AADV
0000153E 123C 0015 793 H2AE MOVE.B #$15,D1
00001542 60DA 794 BRA H2AADV
00001544 123C 0016 795 H2AF MOVE.B #$16,D1
00001548 60D4 796 BRA H2AADV
0000154A 797
0000154A 798
0000154A 799 *
0000154A 800 * Mask: Mask an input
0000154A 801 * Input value from D0, input mask from D2, output masked value to D1
0000154A 802 *
0000154A 803
0000154A 2200 804 MASK MOVE.L D0,D1 Move the input to D1
0000154C C282 805 AND.L D2,D1 Perform AND on input with the mask
0000154E 4E75 806 RTS Return to caller
00001550 807
00001550 808 *
00001550 809 * Test Mask: Test an input to a mask.
00001550 810 * Input value from D0, input mask from D2, and modify z-flag
00001550 811 *
00001550 812
00001550 2F01 813 TSTMSK MOVE.L D1,-(SP) Push D1 on stack
00001552 61F6 814 BSR MASK Mask the input
00001554 B481 815 CMP.L D1,D2 Test if the input matched the mask
00001556 6606 816 BNE *+8 If it didn't match, skip two lines
00001558 221F 817 MOVE.L (SP)+,D1 Restore D1
0000155A 6000 FEC6 818 BRA FLAGST Set flag & return to caller
0000155E 221F 819 MOVE.L (SP)+,D1 Restore D1
00001560 6000 FEC6 820 BRA FLAGCL Clear flag & return to caller
00001564 821
00001564 822 *
00001564 823 * Compare Mask: Strictly test an input to two masks allowing don't cares.
00001564 824 * Input value from D0, input 1 mask from D2, input 0 mask from D3, and modify z-flag
00001564 825 *
00001564 826
00001564 48E7 F800 827 CMPMSK MOVEM.L D0-D4,-(SP) Push D1-D4 on stack
00001568 2800 828 MOVE.L D0,D4 Copy input to D4
0000156A C082 829 AND.L D2,D0 AND 1 mask to input
0000156C B480 830 CMP.L D0,D2 Compare masked input to 1 mask
0000156E 6708 831 BEQ *+10 If it matched, skip two lines
00001570 4CDF 001F 832 MOVEM.L (SP)+,D0-D4 If it didn't match, restore D1-D4
00001574 6000 FEB2 833 BRA FLAGCL Clear flag & return to caller
00001578 2004 834 MOVE.L D4,D0 Restore input
0000157A 4680 835 NOT.L D0 !input
0000157C C083 836 AND.L D3,D0 AND 0 mask on input; effectively, NOR 0 mask to the input
0000157E B680 837 CMP.L D0,D3 Compare masked input to 0 mask
00001580 6608 838 BNE *+10 If it didn't match, skip to clear flag
00001582 4CDF 001F 839 MOVEM.L (SP)+,D0-D4 If it matched, restore D1-D4
00001586 6000 FE9A 840 BRA FLAGST Set flag & return to caller
0000158A 4CDF 001F 841 MOVEM.L (SP)+,D0-D4 Restore D1-D4
0000158E 6000 FE98 842 BRA FLAGCL Clear flag & return to caller
00001592 843
00001592 844 *
00001592 845 * Extract Mask: Test an input to a subsequent mask, and return the masked value in LSB format
00001592 846 * Input value from D0, input mask from D2, output value in D1
00001592 847 *
00001592 848
00001592 2F02 849 EXTMSK MOVE.L D2,-(SP) Push D2 on stack
00001594 2200 850 MOVE.L D0,D1 Move the input to D1
00001596 C282 851 AND.L D2,D1 Perform AND on input with the mask
00001598 0802 0000 852 EXTLP BTST.L #0,D2 Test the LSB of the mask for 0
0000159C 6700 0006 853 BEQ EXTADV If it is 0, rotate the mask until it is 1
000015A0 241F 854 MOVE.L (SP)+,D2 Restore the mask
000015A2 4E75 855 RTS Return to caller
000015A4 856
000015A4 E28A 857 EXTADV LSR.L #1,D2 Rotate mask right by 1 bit
000015A6 E299 858 ROR.L #1,D1 Rotate output in sync with mask
000015A8 60EE 859 BRA EXTLP Return to loop
000015AA 860
000015AA 861 *
000015AA 862 * Display ASCII: Display the ASCII from D0.L to screen
000015AA 863 *
000015AA 48E7 E000 864 DSPAX MOVEM.L D0-D2,-(SP) Push D0-D2
000015AE 2200 865 MOVE.L D0,D1
000015B0 6000 0044 866 BRA DSPHST Branch to DISPHX Start
000015B4 867
000015B4 868 *
000015B4 869 * Display HEX Address: Display the hex from A1 according to the byte length in D2.L
000015B4 870 *
000015B4 871
000015B4 48E7 E040 872 DSPHXA MOVEM.L D0-D2/A1,-(SP) Push D0-D2, and A1 to stack
000015B8 51CA 0006 873 DSPHXLP DBRA D2,*+8 Decrement count; if count is > 0, do not branch to return
000015BC 6000 0016 874 BRA DSPHXRT If count is <= 0, branch to return
000015C0 1019 875 MOVE.B (A1)+,D0 Get HEX byte in D0, post-increment A1
000015C2 6100 FEF8 876 BSR HEX2ASCII Get ASCII in D1
000015C6 E159 877 ROL.W #8,D1 Read first byte
000015C8 103C 0006 878 MOVE.B #6,D0 Display char from D1.B
000015CC 4E4F 879 TRAP #15
000015CE E159 880 ROL.W #8,D1 Read second byte
000015D0 4E4F 881 TRAP #15
000015D2 60E4 882 BRA DSPHXLP Loop back
000015D4 4CDF 0207 883 DSPHXRT MOVEM.L (SP)+,D0-D2/A1 Else, restore values
000015D8 4E75 884 RTS Return to caller
000015DA 885
000015DA 886
000015DA 887
000015DA 888 *
000015DA 889 * Display HEX Nibble: Display the hex from D0.B to screen
000015DA 890 *
000015DA 891
000015DA 48E7 C000 892 DSPHXN MOVEM.L D0/D1,-(SP) Push D0 and D1 to stack
000015DE 6100 FEDC 893 BSR HEX2ASCII Get ASCII in D1
000015E2 103C 0006 894 MOVE.B #6,D0 Set trap #6 to read single char from D1.B
000015E6 4E4F 895 TRAP #15
000015E8 4CDF 0003 896 MOVEM.L (SP)+,D0/D1 Restore D0 and D1
000015EC 4E75 897 RTS Return to caller
000015EE 898
000015EE 899 *
000015EE 900 * Display HEX Word: Display the hex from D0.W to screen
000015EE 901 *
000015EE 902
000015EE 48E7 E000 903 DSPHXW MOVEM.L D0-D2,-(SP) Push D0-D2 to stack
000015F2 6100 FEC8 904 BSR HEX2ASCII Get ASCII in D1
000015F6 905
000015F6 4282 906 DSPHST CLR.L D2
000015F8 143C 0003 907 MOVE.B #3,D2 Set rotation count
000015FC 103C 0006 908 MOVE.B #6,D0 Set trap #6 to read single char from D1.B
00001600 6100 0008 909 BSR DSPHADV Start loop
00001604 910
00001604 4CDF 0007 911 MOVEM.L (SP)+,D0-D2 Restore D0-D2
00001608 4E75 912 RTS Return to caller
0000160A 913
0000160A E199 914 DSPHADV ROL.L #8,D1 Rotate bytes left
0000160C 4E4F 915 TRAP #15 Display char in D1.B
0000160E 51CA FFFA 916 DBRA D2,DSPHADV If count is > 0, decrement and loop back to DSPHADV
00001612 4E75 917 RTS If count == 0, return to sub-routine
00001614 918
00001614 919 *
00001614 920 * Display HEX Long: Display the hex from D0.L to screen
00001614 921 *
00001614 922
00001614 4840 923 DSPHXL SWAP D0 Swap first half to D0.W
00001616 61D6 924 BSR DSPHXW Display first half
00001618 4840 925 SWAP D0 Swap lower half to D0.W
0000161A 61D2 926 BSR DSPHXW Display lower half
0000161C 4E75 927 RTS Return to caller
0000161E 928
0000161E 929
0000161E 930
0000161E 931 *--------------------
0000161E 932 * I/O
0000161E 933 *--------------------
0000161E 43F8 13CA 934 ILL0 LEA ERR0,A1 Starting location was too small
00001622 103C 000E 935 MOVE.B #14,D0
00001626 4E4F 936 TRAP #15
00001628 6000 000C 937 BRA PRMPT1
0000162C 938
0000162C 43F8 13ED 939 ILL1 LEA ERR1,A1 Starting location was too big
00001630 103C 000E 940 MOVE.B #14,D0
00001634 4E4F 941 TRAP #15
00001636 942
00001636 43F8 1290 943 PRMPT1 LEA MSSG1,A1 Starting location request message
0000163A 103C 000E 944 MOVE.B #14,D0
0000163E 4E4F 945 TRAP #15
00001640 946
00001640 43F8 1004 947 LEA SLOC,A1 Input will be stored in SLOC
00001644 103C 0002 948 MOVE.B #2,D0 Input starting location (as string / hex)
00001648 4E4F 949 TRAP #15
0000164A 950
0000164A 2038 1004 951 MOVE.L (SLOC),D0 Move input to D0
0000164E 952
0000164E B0BC 00FFFFFF 953 CMP.L #$00FFFFFF,D0 Check if input was NULL
00001654 660C 954 BNE *+14 If the input was not null, branch to convert input
00001656 21FC 00007000 1004 955 MOVE.L #MNADDR,(SLOC) If the input was null, move the min address to SLOC
0000165E 6000 003E 956 BRA PRMPT2 Branch to the next prompt
00001662 957
00001662 6100 FDCA 958 BSR ASCII2HEX Convert D0 to HEX in D1
00001666 959
00001666 2281 960 MOVE.L D1,(A1) Set SLOC to HEX value
00001668 961
00001668 B2BC 00000000 962 CMP.L #0,D1 Compare starting location to 0
0000166E 6700 047A 963 BEQ DONE End program if 0
00001672 964
00001672 B2BC 00007000 965 CMP.L #MNADDR,D1 Compare starting location to min
00001678 65A4 966 BLO ILL0 Branch to ILL0 if < min
0000167A 967
0000167A B2BC 00FFFFFF 968 CMP.L #MXADDR,D1 Compare ending location to max
00001680 64AA 969 BHS ILL1 Branch to ILL1 if >= max
00001682 970
00001682 6000 001A 971 BRA PRMPT2 Branch to the next prompt
00001686 972
00001686 43F8 13CA 973 ILL2 LEA ERR0,A1 Ending location was too small
0000168A 103C 000E 974 MOVE.B #14,D0
0000168E 4E4F 975 TRAP #15
00001690 6000 000C 976 BRA PRMPT2
00001694 977
00001694 43F8 13ED 978 ILL3 LEA ERR1,A1 Ending location was too big
00001698 103C 000E 979 MOVE.B #14,D0
0000169C 4E4F 980 TRAP #15
0000169E 981
0000169E 43F8 12F9 982 PRMPT2 LEA MSSG2,A1 Ending location request message
000016A2 103C 000E 983 MOVE.B #14,D0
000016A6 4E4F 984 TRAP #15
000016A8 985
000016A8 43F8 1008 986 LEA ELOC,A1 Input will be stored in SLOC
000016AC 103C 0002 987 MOVE.B #2,D0 Input starting location (as string / hex)
000016B0 4E4F 988 TRAP #15
000016B2 989
000016B2 2038 1008 990 MOVE.L (ELOC),D0 Move input to D0
000016B6 991
000016B6 B0BC 00FFFFFF 992 CMP.L #$00FFFFFF,D0 Check if input was NULL
000016BC 660C 993 BNE *+14 If the input was not null, branch to convert input
000016BE 21FC 00FFFFFF 1008 994 MOVE.L #MXADDR,(ELOC) If the input was null, move the max address to ELOC
000016C6 6000 002A 995 BRA PRMPTDN Branch to prompt done
000016CA 996