forked from peterstanton/TeamAwesome-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.L68
1790 lines (1786 loc) · 114 KB
/
Main.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
00001000 Starting Address
Assembler used: EASy68K Editor/Assembler v5.15.04
Created On: 5/13/2017 1:27:19 PM
00000000 1 *-----------------------------------------------------------
00000000 2 * Title : Disassembler Final Project
00000000 3 * Written by : Team Awesome (Olga Rocheeva, Dwina Solihin, Peter Stanton)
00000000 4 * Date : April 2, 2017
00000000 5 * Description: CSS 422 Final Project
00000000 6 *-----------------------------------------------------------
00000000 7 *Below is the class that connects to all of the subroutines
00000000 8 *used in the disassembler.
00001000 9 START ORG $1000 * first instruction of program
00001000 10
00001000 11 INCLUDE 'IO_subroutine.x68'
00001000 43F9 00001306 12 LEA welcome_msg, A1 *loads welcome message to A1
00001006 103C 000D 13 MOVE.B #13,D0
0000100A 4E4F 14 TRAP #15
0000100C 15
0000100C 13FC 0007 000014AC 16 MOVE.B #7,linecount *initializes counter
00001014 43F9 0000136A 17 IO_StartLoop LEA location_start_msg,A1 *Store the console message for output.
0000101A 103C 000E 18 MOVE.B #14,D0
0000101E 4E4F 19 TRAP #15 *Display to console.
00001020 20
00001020 43F9 000014AD 21 LEA input_buffer,A1 *Raw input stored
00001026 103C 0002 22 MOVE.B #2,D0 *Read string from keyboard to A1
0000102A 4E4F 23 TRAP #15 *Get the user input from console
0000102C 24
0000102C 4280 25 CLR.L D0
0000102E 4281 26 CLR.L D1
00001030 27
00001030 4EB9 000011F6 28 JSR sub_AstoHeLoop *conversion method for raw input characters
00001036 2447 29 MOVE.L D7, A2 *store hex value
00001038 30
00001038 43F9 0000145D 31 LEA linebreak,A1 *appends a linefeed to the end of the user input
0000103E 103C 000E 32 MOVE.B #14,D0 *no next line when displaying
00001042 4E4F 33 TRAP #15
00001044 34
00001044 4EB9 00001232 35 JSR sub_startReadingData *reads the location_StartData and returns D7
0000104A BE3C 0001 36 CMP.B #1,D7 *checks of D7 == 1. If it is, then input is invalid
0000104E 67C4 37 BEQ IO_StartLoop *starts all over
00001050 43F9 00001389 38 IO_EndLoop LEA location_end_msg,A1 *Store the console message for output.
00001056 103C 000E 39 MOVE.B #14,D0
0000105A 4E4F 40 TRAP #15 *Display to console.
0000105C 41
0000105C 43F9 000014AD 42 LEA input_buffer,A1 *Raw input stored
00001062 103C 0002 43 MOVE.B #2,D0 *Read string from keyboard to A1
00001066 4E4F 44 TRAP #15 *Get the user input from console
00001068 45
00001068 4280 46 CLR.L D0
0000106A 4281 47 CLR.L D1
0000106C 48
0000106C 4EB9 000011F6 49 JSR sub_AstoHeLoop *conversion method for raw input characters
00001072 23C7 000014B2 50 MOVE.L D7, location_endData *store hex value
00001078 51
00001078 43F9 0000145D 52 LEA linebreak,A1 *appends a linefeed to the end of the user input
0000107E 103C 000E 53 MOVE.B #14,D0 *no next line when displaying
00001082 4E4F 54 TRAP #15
00001084 55
00001084 4EB9 00001254 56 JSR sub_endReadingData *reads the location_StartData and returns D7
0000108A BE3C 0001 57 CMP.B #1,D7 *checks of D7 == 1. If it is, then input is invalid
0000108E 67C0 58 BEQ IO_EndLoop *starts all over
00001090 59
00001090 6000 0002 60 BRA IO_commandPars
00001094 61 IO_commandPars
00001094 62 ** MOVE.L location_startData, A2
00001094 63 *** MOVE.L location_endData, A3
00001094 64
00001094 0C39 001D 000014AC 65 cmParsLoop CMPI.B #29, linecount *will pause output if the screen lines equal 30
0000109C 6700 002A 66 BEQ IO_pause
000010A0 67
000010A0 4EB9 000012EE 68 cmParsReturn JSR sub_PrintAddress *goes to helper subroutine
000010A6 5239 000014AC 69 ADDQ.B #1,linecount increments screen line counter
000010AC 70
000010AC 4287 71 CLR.L D7 *clears D7 which holds the hex value
000010AE 72
000010AE 3E12 73 MOVE.W (A2),D7 *puts the next opcode in D7
000010B0 103C 000C 74 MOVE.B #12,D0 *set to shift 12 bits
000010B4 E06F 75 LSR.W D0,D7 *uses the shift call to isolate bits from root
000010B6 76
000010B6 CEFC 0006 77 MULU #6,D7
000010BA 4EB0 7000 78 JSR 0(A0,D7)
000010BE 79 *ASL.W #2,D7 *4 byte table entries
000010BE 80 *MOVEA.L (0,A0,D7.W),A1
000010BE 81 *JSR (A1) *jumps to specific subroutine in jumptable
000010BE 82
000010BE 83 *MOVEA.L location_endData,A6
000010BE 84
000010BE B5CE 85 CMPA.L A6,A2 *checks if the end of input is reached
000010C0 6C00 0022 86 BGE IO_endProg *if it is reached, then exits the loop
000010C4 87
000010C4 544A 88 ADDA.W #2,A2 *if not, it will go to the next opcode in test
000010C6 60CC 89 BRA cmParsLoop *continues the loop
000010C8 43F9 00001407 90 IO_pause LEA pause_msg, A1 *displays pause_msg
000010CE 103C 000E 91 MOVE.B #14,D0 *without next line
000010D2 4E4F 92 TRAP #15
000010D4 93
000010D4 103C 0005 94 MOVE.B #5,D0 *Press enter key
000010D8 4E4F 95 TRAP #15
000010DA 96
000010DA 13FC 0000 000014AC 97 MOVE.B #0,linecount
000010E2 60BC 98 BRA cmParsReturn *start program again
000010E4 43F9 00001421 99 IO_endProg LEA endTest_msg,A1
000010EA 103C 000E 100 MOVE.B #14,D0
000010EE 4E4F 101 TRAP #15
000010F0 102
000010F0 43F9 000014AD 103 LEA input_buffer,A1 *the input is put in buffer
000010F6 103C 0002 104 MOVE.B #2,D0
000010FA 4E4F 105 TRAP #15
000010FC 106
000010FC 43F9 0000145D 107 LEA linebreak,A1 *puts a linebreak between the input and question
00001102 103C 000E 108 MOVE.B #14,D0
00001106 4E4F 109 TRAP #15
00001108 110
00001108 13FC 0005 0000145D 111 MOVE.B #5,linebreak *this is used for the question and prompts user input
00001110 112
00001110 2E39 000014AD 113 MOVE.L input_buffer,D7
00001116 114
00001116 0C87 79657300 115 CMPI.L #$79657300,D7 *if they type in yes, go to program again
0000111C 6700 FEF6 116 BEQ IO_StartLoop
00001120 6000 00D0 117 BRA END_PROGRAM *else end program
00001124 118
00001124 119
00001124 120
00001124 121
00001124 122
00001124 123
00001124 124
00001124 125
00001124 126
00001124 127
00001124 128
00001124 129
00001124 130
00001124 131
00001124 132
00001124 133
00001124 134
00001124 135
00001124 136
00001124 137
00001124 138
00001124 139
00001124 140
00001124 141
00001124 142
00001124 143
00001124 144
00001124 145 -------------------- end include --------------------
00001124 146 INCLUDE 'OPCODES_subroutine.x68'
00001124 147
00001124 148
00001124 4FF9 0000A000 149 LEA $A000,SP *Load the SP
0000112A 41F9 00001148 150 LEA jmp_table,A0 *Index into the table
00001130 4280 151 CLR.L D0 *Zero it
00001132 303C 4E79 152 MOVE.W #$4E79,D0 *We'll play with it here
00001136 123C 000C 153 MOVE.B #12,D1 *Shift 12 bits to the right
0000113A 154
0000113A E268 155 LSR.W D1,D0 *Move the bits
0000113C C0FC 0006 156 MULU #6,D0 *Form offset
00001140 4EB0 0000 157 JSR 0(A0,D0) *Jump indirect with index
00001144 158
00001144 159
00001144 FFFF FFFF 160 SIMHALT
00001148 4EF9 000011B4 161 jmp_table JMP code0000
0000114E 162
0000114E 4EF9 000011B8 163 JMP code0001
00001154 164
00001154 4EF9 000011BC 165 JMP code0010
0000115A 166
0000115A 4EF9 000011C0 167 JMP code0011
00001160 168
00001160 4EF9 000011C4 169 JMP code0100
00001166 170
00001166 43F9 0000146D 171 OP_Invalid LEA NOP_disp,A1
0000116C 103C 000D 172 MOVE.B #13,D0
00001170 4E4F 173 TRAP #15
00001172 174
00001172 175
00001172 176
00001172 4EF9 000011C8 177 JMP code0101
00001178 178
00001178 4EF9 000011CC 179 JMP code0110
0000117E 180
0000117E 4EF9 000011D0 181 JMP code0111
00001184 182
00001184 4EF9 000011D4 183 JMP code1000
0000118A 184
0000118A 4EF9 000011D8 185 JMP code1001
00001190 186
00001190 4EF9 000011DC 187 JMP code1010
00001196 188
00001196 4EF9 000011E0 189 JMP code1011
0000119C 190
0000119C 4EF9 000011E2 191 JMP code1100
000011A2 192
000011A2 4EF9 000011E6 193 JMP code1101
000011A8 194
000011A8 4EF9 000011EA 195 JMP code1110
000011AE 196
000011AE 4EF9 000011EE 197 JMP code1111
000011B4 198
000011B4 199
000011B4 4E72 2700 200 code0000 STOP #$2700
000011B8 201
000011B8 4E72 2700 202 code0001 STOP #$2700
000011BC 203
000011BC 4E72 2700 204 code0010 STOP #$2700
000011C0 205
000011C0 4E72 2700 206 code0011 STOP #$2700
000011C4 207
000011C4 4E72 2700 208 code0100 STOP #$2700
000011C8 209
000011C8 4E72 2700 210 code0101 STOP #$2700
000011CC 211
000011CC 4E72 2700 212 code0110 STOP #$2700
000011D0 213
000011D0 4E72 2700 214 code0111 STOP #$2700
000011D4 215
000011D4 4E72 2700 216 code1000 STOP #$2700
000011D8 217
000011D8 4E72 2700 218 code1001 STOP #$2700
000011DC 219
000011DC 4E72 2700 220 code1010 STOP #$2700
000011E0 221
000011E0 60FE 222 code1011 BRA code1011
000011E2 223
000011E2 224
000011E2 225
000011E2 4E72 2700 226 code1100 STOP #$2700
000011E6 227
000011E6 4E72 2700 228 code1101 STOP #$2700
000011EA 229
000011EA 4E72 2700 230 code1110 STOP #$2700
000011EE 231
000011EE 4E72 2700 232 code1111 STOP #$2700
000011F2 233
000011F2 234
000011F2 235
000011F2 236
000011F2 237
000011F2 238
000011F2 239
000011F2 240
000011F2 241
000011F2 242 -------------------- end include --------------------
000011F2 243
000011F2 FFFF FFFF 244 END_PROGRAM SIMHALT *Stop the simulator
000011F6 245
000011F6 246 *-----------------------------------------------------------
000011F6 247 INCLUDE 'helpers.x68'
000011F6 1019 248 sub_AsToHeLoop MOVE.B (A1)+,D0 *gets first byte
000011F8 4EB9 00001210 249 JSR sub_breakDownAs *breaks down ASCII code
000011FE D280 250 ADD.L D0,D1 *load that char into D1
00001200 0C11 0000 251 CMPI.B #$0,(A1) *checks if more needs to be broken down
00001204 6700 0006 252 BEQ athEndLoop *if no more is needed to be worked on, exits
00001208 E989 253 LSL.L #$4,D1 *else, shift remaining char in D1 for next char
0000120A 60EA 254 BRA sub_AsToHeLoop *loops through again
0000120C 255
0000120C 2E01 256 athEndLoop MOVE.L D1,D7 *hex number in D7
0000120E 4E75 257 RTS
00001210 B03C 0039 258 sub_breakDownAs CMP.B #$39,D0 *$30-$39 is a digit (0-9)
00001214 6E00 0010 259 BGT as_smallLetter
00001218 B03C 0046 260 CMP.B #$46,D0
0000121C 261
0000121C 6E00 000E 262 BGT as_bigLetter
00001220 0400 0030 263 SUB.B #$30,D0
00001224 4E75 264 RTS
00001226 265
00001226 0400 0030 266 as_smallLetter SUB.B #$30,D0
0000122A 4E75 267 RTS
0000122C 268
0000122C 0400 0037 269 as_bigLetter SUB.B #$37,D0
00001230 4E75 270 RTS
00001232 2239 000014AE 271 sub_StartReadingData MOVE.L location_startData,D1
00001238 272
00001238 0800 0000 273 BTST #0,D0 *checks if LSB is 1,
0000123C 6600 0006 274 BNE srdFailAddrOddB *if 1, then address is odd and invalid
00001240 275
00001240 7E00 276 MOVE.L #0,D7 *if D7 equals 0, then address is valid
00001242 4E75 277 srdFinish RTS
00001244 278
00001244 43F9 000013A6 279 srdFailAddrOddB LEA addr_oddBit_msg,A1
0000124A 103C 000E 280 MOVE.B #14,D0
0000124E 4E4F 281 TRAP #15
00001250 282
00001250 7E01 283 MOVE.L #1,D7 *if D7 equals 1, then address is invalid
00001252 60EE 284 BRA srdFinish
00001254 2441 285 sub_EndReadingData MOVE.L D1,A2
00001256 2679 000014B2 286 MOVE.L location_endData,A3
0000125C 287
0000125C 0800 0000 288 BTST #0,D0 *checks if LSB is 1,
00001260 6600 0016 289 BNE erdFailAddrOddB *if 1, then address is odd and invalid
00001264 290
00001264 B280 291 CMP.L D0,D1 *end address must be greater than start address
00001266 4E75 292 erdFinish RTS
00001268 293
00001268 43F9 000013CD 294 erdFailAddrOrder LEA addr_order_check,A1
0000126E 103C 000E 295 MOVE.B #14,D0
00001272 4E4F 296 TRAP #15
00001274 297
00001274 7E01 298 MOVE.L #1,D7
00001276 60EE 299 BRA erdFinish
00001278 300
00001278 43F9 000013A6 301 erdFailAddrOddB LEA addr_oddBit_msg,A1
0000127E 103C 000E 302 MOVE.B #14,D0
00001282 4E4F 303 TRAP #15
00001284 304
00001284 7E01 305 MOVE.L #1,D7 *if D7 equals 1, then address is invalid
00001286 60DE 306 BRA erdFinish
00001288 4287 307 sub_PrintTable CLR.L D7
0000128A 1E39 000014B6 308 MOVE.B table_length,D7 *moves data to D7 as decreasing counter
00001290 309
00001290 BE3C 0000 310 PrintTableLoopS CMP.B #0,D7 *checks of counter is 0
00001294 6700 0012 311 BEQ PrintTableLoopE *will end loop
00001298 312
00001298 43F9 000014A1 313 LEA space,A1 *if not, print single space in consold
0000129E 103C 000E 314 MOVE.B #14,D0
000012A2 4E4F 315 TRAP #15
000012A4 316
000012A4 5307 317 SUBQ.B #1,D7 *decrease loop counter by 1
000012A6 60E8 318 BRA PrintTableLoopS
000012A8 319
000012A8 4E75 320 PrintTableLoopE RTS
000012AA 43F9 0000145D 321 sub_PrintCRLF LEA linebreak,A1
000012B0 103C 000E 322 MOVE.B #14,D0
000012B4 4E4F 323 TRAP #15
000012B6 4E75 324 RTS
000012B8 48E7 1E00 325 sub_PrintHexa MOVEM.L D3-D6,-(SP) ;Store registers in stack
000012BC 326
000012BC 47F9 00001471 327 LEA hexatable,A3
000012C2 CCFC 0004 328 MULU.W #4,D6 ;Convert number of digits to total bits (4 bits per char)
000012C6 329
000012C6 7620 330 MOVE.L #32,D3 ;Set the total number of bits
000012C8 9686 331 SUB.L D6,D3 ;Set the bit displacement for nibbles left to right
000012CA 781C 332 MOVE.L #28,D4 ;Bit displacement to truncate all but one nibble
000012CC 333
000012CC 2A07 334 PrintHexaLoop MOVE.L D7,D5 ;Load/reload hex output into D5 for work.
000012CE 335
000012CE E7AD 336 LSL.L D3,D5 ;For each loop, isolate the next nibble using displacement
000012D0 E8AD 337 LSR.L D4,D5 ;Truncate everything else except the nibble
000012D2 338
000012D2 CAFC 0002 339 MULU #2,D5 ;Multiply nibble by two, find character in char_table
000012D6 43F3 5000 340 LEA 0(A3,D5),A1 ;Store the character for output
000012DA 103C 000E 341 MOVE.B #14,D0 ;Will display from A1 without CR,LF.
000012DE 4E4F 342 TRAP #15 ;Display to console.
000012E0 343
000012E0 5803 344 ADD.B #4,D3 ;Add another 4 bits to displacement to get next nibble
000012E2 B63C 0020 345 CMP.B #32,D3 ;If displacement = 32, we're done.
000012E6 66E4 346 BNE PrintHexaLoop
000012E8 347
000012E8 4CDF 0078 348 MOVEM.L (SP)+,D3-D6 ;Replace registers from stack
000012EC 4E75 349 RTS
000012EE 4287 350 sub_PrintAddress CLR.L D7
000012F0 2E0A 351 MOVE.L A2,D7
000012F2 7C08 352 MOVE.L #8,D6
000012F4 4EB8 12B8 353 JSR sub_PrintHexa
000012F8 354
000012F8 13FC 0003 000014B6 355 MOVE.B #3,table_length
00001300 4EB8 1288 356 JSR sub_PrintTable
00001304 4E75 357 RTS
00001306 358
00001306 359
00001306 360
00001306 361
00001306 362
00001306 363
00001306 364
00001306 365
00001306 366
00001306 367
00001306 368
00001306 369
00001306 370
00001306 371
00001306 372 -------------------- end include --------------------
00001306 373 INCLUDE 'definitions.x68'
00001306 374
00001306 =0000000D 375 CR EQU $0D carriage return
00001306 =0000000A 376 LF EQU $0A line feed
00001306= 43 53 53 20 34 32 ... 377 welcome_msg DC.B 'CSS 422 Disassembler Final Project',CR,LF
0000132A= 42 79 20 54 65 61 ... 378 DC.B 'By Team Awesome (Olga Rocheeva, Dwina Solihin, Peter Stanton)',CR,LF,0
0000136A= 45 6E 74 65 72 20 ... 379 location_start_msg DC.B 'Enter Start location address',CR,LF,0
00001389= 45 6E 74 65 72 20 ... 380 location_end_msg DC.B 'Enter End location address',CR,LF,0
000013A6= 41 64 64 72 65 73 ... 381 addr_oddBit_msg DC.B 'Address cannot end on an odd byte.',CR,LF,CR,LF,0
000013CD= 45 6E 64 69 6E 67 ... 382 addr_order_check DC.B 'Ending Address cannot go before the starting address.',CR,LF,CR,LF,0
00001407= 50 72 65 73 73 20 ... 383 pause_msg DC.B 'Press enter to continue!',CR,LF
00001421= 52 65 61 63 68 65 ... 384 endTest_msg DC.B 'Reached end of test data.', CR,LF
0000143C= 54 72 79 20 61 6E ... 385 DC.B 'Try another location? (yes/no): ',0
0000145D= 0D 0A 00 386 linebreak DC.B CR,LF,0
00001460 387
00001460= 44 41 54 41 00 388 Invalid_disp DC.B 'DATA',0
00001465= 57 52 4F 4E 47 45 ... 389 InvalidEA_disp DC.B 'WRONGEA',0
0000146D= 4E 4F 50 00 390 NOP_disp DC.B 'NOP',0
00001471 391
00001471 392
00001471= 30 00 393 hexaTable DC.B '0',0
00001473= 31 00 394 DC.B '1',0
00001475= 32 00 395 DC.B '2',0
00001477= 33 00 396 DC.B '3',0
00001479= 34 00 397 DC.B '4',0
0000147B= 35 00 398 DC.B '5',0
0000147D= 36 00 399 DC.B '6',0
0000147F= 37 00 400 DC.B '7',0
00001481= 38 00 401 DC.B '8',0
00001483= 39 00 402 DC.B '9',0
00001485= 41 00 403 DC.B 'A',0
00001487= 42 00 404 DC.B 'B',0
00001489= 43 00 405 DC.B 'C',0
0000148B= 44 00 406 DC.B 'D',0
0000148D= 45 00 407 DC.B 'E',0
0000148F= 46 00 408 DC.B 'F',0
00001491= 23 00 409 poundsign DC.B '#',0
00001493= 24 00 410 dollarsign DC.B '$',0
00001495= 2B 00 411 plussign DC.B '+',0
00001497= 2D 00 412 minussign DC.B '-',0
00001499= 2C 00 413 commasign DC.B ',',0
0000149B= 2F 00 414 backslashsigh DC.B '/',0
0000149D= 28 00 415 openparen DC.B '(',0
0000149F= 29 00 416 closeparen DC.B ')',0
000014A1= 20 00 417 space DC.B ' ',0
000014A3= 2E 62 00 418 size_b DC.B '.b',0
000014A6= 2E 77 00 419 size_w DC.B '.w',0
000014A9= 2E 6C 00 420 size_l DC.B '.l',0
000014AC 421
000014AC 422 linecount DS.B 1 *storeage for lines on a screen
000014AD= 01 423 input_buffer DC.B 1 *creates input buffer for ASCII string
000014AE 424 location_startData DS.L 1 *location on where to start reading data
000014B2 425 location_endData DS.L 1 *location on where to end reading data
000014B6 426 table_length DS.B 1 *Number of spaces in the table to print to console
000014B7 427
000014B7 428
000014B7 429
000014B7 430
000014B7 431
000014B7 432
000014B7 433
000014B7 434
000014B7 435
000014B7 436
000014B7 437
000014B7 438
000014B7 439
000014B7 440
000014B7 441 -------------------- end include --------------------
000014B7 442 INCLUDE 'jumptable.x68'
000014B8 7200 443 MOVEQ.L #0,D1 *Clear D1
000014BA 2200 444 MOVE.L D0,D1 *Move the opcode to D1
000014BC 445
000014BC 41F9 000014CE 446 LEA jumptable,A0 *loads the jumptable into A0
000014C2 447
000014C2 E999 448 ROL.L #4,D1 *Moves the index to the right nibble
000014C4 0201 000F 449 ANDI.B #$0F,D1 *Gets the first nibble
000014C8 2072 1000 450 MOVEA.L (0,A2,D1.W),A0 *It has 4 byte table entries
000014CC 4ED0 451 JMP (A0) *Jumps to specified routine
000014CE 452
000014CE 453
000014CE= 0000150E 454 jumptable: DC.L routine_0 *Bit manipulation/MOVEP/Immediate (D)
000014D2= 00001166 455 DC.L OP_Invalid *Move Byte(D)
000014D6= 00001166 456 DC.L OP_Invalid *Move Long (D)
000014DA= 00001166 457 DC.L OP_Invalid *Move Word (D)
000014DE= 00001518 458 DC.L routine_4 *Misc
000014E2= 00001526 459 DC.L routine_5 *ADDQ/SUBQ/Scc/DBcc
000014E6= 0000152A 460 DC.L routine_6 *BSR,BRA,Bcc
000014EA= 00001166 461 DC.L OP_Invalid *MOVEQ
000014EE= 0000152E 462 DC.L routine_8 *OR/DIV/SBCD
000014F2= 00001532 463 DC.L routine_9 *SUB/SUBX
000014F6= 00001166 464 DC.L Op_Invalid *Unassigned (D)
000014FA= 00001536 465 DC.L routine_B *CMP/EOR
000014FE= 0000153A 466 DC.L routine_C *AND/MUL/ABCD/EXG
00001502= 0000153E 467 DC.L routine_D *ADD/ADDA/ADDX
00001506= 00001542 468 DC.L routine_E *Shift/Rotate
0000150A= 00001546 469 DC.L routine_F *Special/Reserved
0000150E 470
0000150E 471 routine_0:
0000150E 472 *Bit manipulation/MOVEP/Immediate
0000150E 4EB9 000015C2 473 JSR sub_Bits11to8 *reads A2, returns D7
00001514 6000 FC50 474 BRA Op_Invalid *if unable to convert, goes to invalid
00001518 475
00001518 476 routine_4:
00001518 477 *Miscellaneous
00001518 4EB9 000015C2 478 JSR sub_Bits11to8
0000151E BE3C 0002 479 CMP.B #$2,D7 *compares immediate data, 2 in D7
00001522 6000 FF49 480 BRA NOP_disp
00001526 481
00001526 482 routine_5:
00001526 483 *ADDQ/SUBQ/Scc/DBcc
00001526 484 *MOVE.W (A2),D7
00001526 485 *BTST #8,D7
00001526 486 *BEQ OP_AddQ
00001526 6000 FC3E 487 BRA Op_Invalid
0000152A 488
0000152A 489 routine_6:
0000152A 490 *BSR,BRA,Bcc
0000152A 6000 FC3A 491 BRA Op_Invalid
0000152E 492
0000152E 493 routine_8:
0000152E 494 *OR/DIV/SBCD
0000152E 6000 FC36 495 bra Op_Invalid
00001532 496
00001532 497 routine_9:
00001532 498 *SUB/SUBX
00001532 6000 FC32 499 BRA Op_Invalid
00001536 500
00001536 501 routine_B:
00001536 502 *CMP/EOR
00001536 6000 FC2E 503 BRA Op_Invalid
0000153A 504
0000153A 505 routine_C:
0000153A 506 *AND/MUL/ABCD/EXG
0000153A 6000 FC2A 507 BRA Op_Invalid
0000153E 508
0000153E 509 routine_D:
0000153E 510 *ADD/ADDA/ADDX
0000153E 6000 FC26 511 BRA Op_Invalid
00001542 512
00001542 513 routine_E:
00001542 514 *Shift/Rotate
00001542 6000 FC22 515 BRA Op_Invalid
00001546 516
00001546 517 routine_F:
00001546 518 *Special/Reserved
00001546 6000 FC1E 519 BRA Op_Invalid
0000154A 520
0000154A 521
0000154A 522 returnFromJumptable:
0000154A 523 *stack restore
0000154A 524 *RTS
0000154A 525
0000154A 3E12 526 sub_Bits2to0 MOVE.W (A2),D7 *gets opcode for evauluation
0000154C 103C 000C 527 MOVE.B #12,D0 *gets ready to shift 12 bits
00001550 E16F 528 LSL.W D0,D7 *truncates up to 4th nibble
00001552 E06F 529 LSR.W D0,D7 *isolates nibble
00001554 4E75 530 RTS
00001556 3E12 531 sub_Bits3to0 MOVE.W (A2),D7 *gets opcode for evauluation
00001558 103C 000D 532 MOVE.B #13,D0 *gets ready to shift 13 bits
0000155C E16F 533 LSL.W D0,D7 *truncates up to 4th nibble
0000155E E06F 534 LSR.W D0,D7 *isolates nibble
00001560 4E75 535 RTS
00001562 3E12 536 sub_Bits5to3 MOVE.W (A2),D7 *gets opcode for evauluation
00001564 103C 000A 537 MOVE.B #10,D0 *gets ready to shift 10 bits
00001568 E16F 538 LSL.W D0,D7 *truncates up to bit 5
0000156A 103C 000D 539 MOVE.B #13,D0 *gets ready to shift 13 bits
0000156E E06F 540 LSR.W D0,D7 *gets remainder
00001570 4E75 541 RTS
00001572 3E12 542 sub_Bits7to0 MOVE.W (A2),D7 *gets opcode for evauluation
00001574 E14F 543 LSL.W #8,D7 *truncates up to 7th bit
00001576 E04F 544 LSR.W #8,D7 *isolates nibble
00001578 4E75 545 RTS
0000157A 3E12 546 sub_Bits7to4 MOVE.W (A2),D7 *gets opcode for evauluation
0000157C E14F 547 LSL.W #8,D7 *truncates up to 7th bit
0000157E 103C 000C 548 MOVE.B #12,D0 *gets ready to shift 12 bits
00001582 E06F 549 LSR.W D0,D7 *isolates nibble
00001584 4E75 550 RTS
00001586 3E12 551 sub_Bits7to6 MOVE.W (A2),D7 *gets opcode for evauluation
00001588 E14F 552 LSL.W #8,D7 *truncates up to 7th bit
0000158A 103C 000E 553 MOVE.B #14,D0 *gets ready to shift 14 bits
0000158E E06F 554 LSR.W D0,D7 *isolates nibble
00001590 4E75 555 RTS
00001592 3E12 556 sub_Bits8to3 MOVE.W (A2),D7 *gets opcode for evauluation
00001594 EF4F 557 LSL.W #7,D7 *truncates up to 8th bit
00001596 103C 000A 558 MOVE.B #10,D0 *gets ready to shift 10 bits
0000159A E06F 559 LSR.W D0,D7 *isolates nibble
0000159C 4E75 560 RTS
0000159E 3E12 561 sub_Bits8to4 MOVE.W (A2),D7 *gets opcode for evauluation
000015A0 EF4F 562 LSL.W #7,D7 *truncates up to 8th bit
000015A2 103C 000B 563 MOVE.B #11,D0 *gets ready to shift 11 bits
000015A6 E06F 564 LSR.W D0,D7 *isolates nibble
000015A8 4E75 565 RTS
000015AA 3E12 566 sub_Bits8to6 MOVE.W (A2),D7 *gets opcode for evauluation
000015AC EF4F 567 LSL.W #7,D7 *truncates up to 8th bit
000015AE 103C 000D 568 MOVE.B #13,D0 *gets ready to shift 13 bits
000015B2 E06F 569 LSR.W D0,D7 *isolates nibble
000015B4 4E75 570 RTS
000015B6 3E12 571 sub_Bits11to6 MOVE.W (A2),D7 *gets opcode for evauluation
000015B8 E94F 572 LSL.W #4,D7 *truncates up to 11th bit
000015BA 103C 000A 573 MOVE.B #10,D0 *gets ready to shift 10 bits
000015BE E06F 574 LSR.W D0,D7 *isolates nibble
000015C0 4E75 575 RTS
000015C2 3E12 576 sub_Bits11to8 MOVE.W (A2),D7 *gets opcode for evauluation
000015C4 E94F 577 LSL.W #4,D7 *truncates up to 11th bit
000015C6 103C 000C 578 MOVE.B #12,D0 *gets ready to shift 13 bits
000015CA E06F 579 LSR.W D0,D7 *isolates nibble
000015CC 4E75 580 RTS
000015CE 3E12 581 sub_Bits11to9 MOVE.W (A2),D7 *gets opcode for evauluation
000015D0 E94F 582 LSL.W #4,D7 *truncates up to 11th bit
000015D2 103C 000D 583 MOVE.B #13,D0 *gets ready to shift 13 bits
000015D6 E06F 584 LSR.W D0,D7 *isolates nibble
000015D8 4E75 585 RTS
000015DA 586
000015DA 587
000015DA 588
000015DA 589 -------------------- end include --------------------
000015DA 590 INCLUDE 'TEST_CODE.x68'
000015DA 591 * ORG $6000
000015DA 592
000015DA 593 * BRA INPUT
000015DA 594
000015DA 2A3C 00000123 595 MOVE.L #$123,D5
000015E0 2401 596 MOVE.L D1,D2
000015E2 280D 597 MOVE.L A5,D4
000015E4 2614 598 MOVE.L (A4),D3
000015E6 261F 599 MOVE.L (A7)+,D3
000015E8 2E20 600 MOVE.L -(A0),D7
000015EA 2638 0000 601 MOVE.L $0,D3
000015EE 2238 0FFF 602 MOVE.L $FFF,D1
000015F2 2439 00008000 603 MOVE.L $8000,D2
000015F8 2639 00020000 604 MOVE.L $20000,D3
000015FE 605
000015FE 28BC 00000123 606 MOVE.L #$123,(A4)
00001604 2881 607 MOVE.L D1,(A4)
00001606 288D 608 MOVE.L A5,(A4)
00001608 2894 609 MOVE.L (A4),(A4)
0000160A 289F 610 MOVE.L (A7)+,(A4)
0000160C 28A0 611 MOVE.L -(A0),(A4)
0000160E 28B8 0000 612 MOVE.L $0,(A4)
00001612 28B8 0FFF 613 MOVE.L $FFF,(A4)
00001616 28B9 00008000 614 MOVE.L $8000,(A4)
0000161C 28B9 00020000 615 MOVE.L $20000,(A4)
00001622 616
00001622 28FC 00000123 617 MOVE.L #$123,(A4)+
00001628 28C1 618 MOVE.L D1,(A4)+
0000162A 28CD 619 MOVE.L A5,(A4)+
0000162C 28D4 620 MOVE.L (A4),(A4)+
0000162E 28DF 621 MOVE.L (A7)+,(A4)+
00001630 28E0 622 MOVE.L -(A0),(A4)+
00001632 28F8 0000 623 MOVE.L $0,(A4)+
00001636 28F8 0FFF 624 MOVE.L $FFF,(A4)+
0000163A 28F9 00008000 625 MOVE.L $8000,(A4)+
00001640 28F9 00020000 626 MOVE.L $20000,(A4)+
00001646 627
00001646 293C 00000123 628 MOVE.L #$123,-(A4)
0000164C 2901 629 MOVE.L D1,-(A4)
0000164E 290D 630 MOVE.L A5,-(A4)
00001650 2914 631 MOVE.L (A4),-(A4)
00001652 291F 632 MOVE.L (A7)+,-(A4)
00001654 2920 633 MOVE.L -(A0),-(A4)
00001656 2938 0000 634 MOVE.L $0,-(A4)
0000165A 2938 0FFF 635 MOVE.L $FFF,-(A4)
0000165E 2939 00008000 636 MOVE.L $8000,-(A4)
00001664 2939 00020000 637 MOVE.L $20000,-(A4)
0000166A 638
0000166A 21FC 00000123 0000 639 MOVE.L #$123,$0
00001672 21C1 0000 640 MOVE.L D1,$0
00001676 21CD 0000 641 MOVE.L A5,$0
0000167A 21D4 0000 642 MOVE.L (A4),$0
0000167E 21DF 0000 643 MOVE.L (A7)+,$0
00001682 21E0 0000 644 MOVE.L -(A0),$0
00001686 21F8 0000 0000 645 MOVE.L $0,$0
0000168C 21F8 0FFF 0000 646 MOVE.L $FFF,$0
00001692 21F9 00008000 0000 647 MOVE.L $8000,$0
0000169A 21F9 00020000 0000 648 MOVE.L $20000,$0
000016A2 649
000016A2 23FC 00000123 00008000 650 MOVE.L #$123,$8000
000016AC 23C1 00008000 651 MOVE.L D1,$8000
000016B2 23CD 00008000 652 MOVE.L A5,$8000
000016B8 23D4 00008000 653 MOVE.L (A4),$8000
000016BE 23DF 00008000 654 MOVE.L (A7)+,$8000
000016C4 23E0 00008000 655 MOVE.L -(A0),$8000
000016CA 23F8 0000 00008000 656 MOVE.L $0,$8000
000016D2 23F8 0FFF 00008000 657 MOVE.L $FFF,$8000
000016DA 23F9 00008000 00008000 658 MOVE.L $8000,$8000
000016E4 23F9 00020000 00008000 659 MOVE.L $20000,$8000
000016EE 660
000016EE 23FC 00000123 00021000 661 MOVE.L #$123,$21000
000016F8 23C1 00021000 662 MOVE.L D1,$21000
000016FE 23CD 00021000 663 MOVE.L A5,$21000
00001704 23D4 00021000 664 MOVE.L (A4),$21000
0000170A 23DF 00021000 665 MOVE.L (A7)+,$21000
00001710 23E0 00021000 666 MOVE.L -(A0),$21000
00001716 23F8 0000 00021000 667 MOVE.L $0,$21000
0000171E 23F8 0FFF 00021000 668 MOVE.L $FFF,$21000
00001726 23F9 00008000 00021000 669 MOVE.L $8000,$21000
00001730 23F9 00020000 00021000 670 MOVE.L $20000,$21000
0000173A 671
0000173A 3A3C 0123 672 MOVE.W #$123,D5
0000173E 3401 673 MOVE.W D1,D2
00001740 380D 674 MOVE.W A5,D4
00001742 3614 675 MOVE.W (A4),D3
00001744 361F 676 MOVE.W (A7)+,D3
00001746 3E20 677 MOVE.W -(A0),D7
00001748 3638 0000 678 MOVE.W $0,D3
0000174C 3238 0FFF 679 MOVE.W $FFF,D1
00001750 3439 00008000 680 MOVE.W $8000,D2
00001756 3639 00020000 681 MOVE.W $20000,D3
0000175C 682
0000175C 38BC 0123 683 MOVE.W #$123,(A4)
00001760 3881 684 MOVE.W D1,(A4)
00001762 388D 685 MOVE.W A5,(A4)
00001764 3894 686 MOVE.W (A4),(A4)
00001766 389F 687 MOVE.W (A7)+,(A4)
00001768 38A0 688 MOVE.W -(A0),(A4)
0000176A 38B8 0000 689 MOVE.W $0,(A4)
0000176E 38B8 0FFF 690 MOVE.W $FFF,(A4)
00001772 38B9 00008000 691 MOVE.W $8000,(A4)
00001778 38B9 00020000 692 MOVE.W $20000,(A4)
0000177E 693
0000177E 38FC 0123 694 MOVE.W #$123,(A4)+
00001782 38C1 695 MOVE.W D1,(A4)+
00001784 38CD 696 MOVE.W A5,(A4)+
00001786 38D4 697 MOVE.W (A4),(A4)+
00001788 38DF 698 MOVE.W (A7)+,(A4)+
0000178A 38E0 699 MOVE.W -(A0),(A4)+
0000178C 38F8 0000 700 MOVE.W $0,(A4)+
00001790 38F8 0FFF 701 MOVE.W $FFF,(A4)+
00001794 38F9 00008000 702 MOVE.W $8000,(A4)+
0000179A 38F9 00020000 703 MOVE.W $20000,(A4)+
000017A0 704
000017A0 393C 0123 705 MOVE.W #$123,-(A4)
000017A4 3901 706 MOVE.W D1,-(A4)
000017A6 390D 707 MOVE.W A5,-(A4)
000017A8 3914 708 MOVE.W (A4),-(A4)
000017AA 391F 709 MOVE.W (A7)+,-(A4)
000017AC 3920 710 MOVE.W -(A0),-(A4)
000017AE 3938 0000 711 MOVE.W $0,-(A4)
000017B2 3938 0FFF 712 MOVE.W $FFF,-(A4)
000017B6 3939 00008000 713 MOVE.W $8000,-(A4)
000017BC 3939 00020000 714 MOVE.W $20000,-(A4)
000017C2 715
000017C2 31FC 0123 0000 716 MOVE.W #$123,$0
000017C8 31C1 0000 717 MOVE.W D1,$0
000017CC 31CD 0000 718 MOVE.W A5,$0
000017D0 31D4 0000 719 MOVE.W (A4),$0
000017D4 31DF 0000 720 MOVE.W (A7)+,$0
000017D8 31E0 0000 721 MOVE.W -(A0),$0
000017DC 31F8 0000 0000 722 MOVE.W $0,$0
000017E2 31F8 0FFF 0000 723 MOVE.W $FFF,$0
000017E8 31F9 00008000 0000 724 MOVE.W $8000,$0
000017F0 31F9 00020000 0000 725 MOVE.W $20000,$0
000017F8 726
000017F8 33FC 0123 00008000 727 MOVE.W #$123,$8000
00001800 33C1 00008000 728 MOVE.W D1,$8000
00001806 33CD 00008000 729 MOVE.W A5,$8000
0000180C 33D4 00008000 730 MOVE.W (A4),$8000
00001812 33DF 00008000 731 MOVE.W (A7)+,$8000
00001818 33E0 00008000 732 MOVE.W -(A0),$8000
0000181E 33F8 0000 00008000 733 MOVE.W $0,$8000
00001826 33F8 0FFF 00008000 734 MOVE.W $FFF,$8000
0000182E 33F9 00008000 00008000 735 MOVE.W $8000,$8000
00001838 33F9 00020000 00008000 736 MOVE.W $20000,$8000
00001842 737
00001842 33FC 0123 00021000 738 MOVE.W #$123,$21000
0000184A 33C1 00021000 739 MOVE.W D1,$21000
00001850 33CD 00021000 740 MOVE.W A5,$21000
00001856 33D4 00021000 741 MOVE.W (A4),$21000
0000185C 33DF 00021000 742 MOVE.W (A7)+,$21000
00001862 33E0 00021000 743 MOVE.W -(A0),$21000
00001868 33F8 0000 00021000 744 MOVE.W $0,$21000
00001870 33F8 0FFF 00021000 745 MOVE.W $FFF,$21000
00001878 33F9 00008000 00021000 746 MOVE.W $8000,$21000
00001882 33F9 00020000 00021000 747 MOVE.W $20000,$21000
0000188C 748
0000188C 1A3C 0013 749 MOVE.B #$13,D5
00001890 1401 750 MOVE.B D1,D2
00001892 751
00001892 1614 752 MOVE.B (A4),D3
00001894 161F 753 MOVE.B (A7)+,D3
00001896 1E20 754 MOVE.B -(A0),D7
00001898 1638 0000 755 MOVE.B $0,D3
0000189C 1238 0FFF 756 MOVE.B $FFF,D1
000018A0 1439 00008000 757 MOVE.B $8000,D2
000018A6 1639 00020000 758 MOVE.B $20000,D3
000018AC 759
000018AC 18BC 0013 760 MOVE.B #$13,(A4)
000018B0 1881 761 MOVE.B D1,(A4)
000018B2 762
000018B2 1894 763 MOVE.B (A4),(A4)
000018B4 189F 764 MOVE.B (A7)+,(A4)
000018B6 18A0 765 MOVE.B -(A0),(A4)
000018B8 18B8 0000 766 MOVE.B $0,(A4)
000018BC 18B8 0FFF 767 MOVE.B $FFF,(A4)
000018C0 18B9 00008000 768 MOVE.B $8000,(A4)
000018C6 18B9 00020000 769 MOVE.B $20000,(A4)
000018CC 770
000018CC 18FC 0013 771 MOVE.B #$13,(A4)+
000018D0 18C1 772 MOVE.B D1,(A4)+
000018D2 773
000018D2 18D4 774 MOVE.B (A4),(A4)+
000018D4 18DF 775 MOVE.B (A7)+,(A4)+
000018D6 18E0 776 MOVE.B -(A0),(A4)+
000018D8 18F8 0000 777 MOVE.B $0,(A4)+
000018DC 18F8 0FFF 778 MOVE.B $FFF,(A4)+
000018E0 18F9 00008000 779 MOVE.B $8000,(A4)+
000018E6 18F9 00020000 780 MOVE.B $20000,(A4)+
000018EC 781
000018EC 193C 0013 782 MOVE.B #$13,-(A4)
000018F0 1901 783 MOVE.B D1,-(A4)
000018F2 784
000018F2 1914 785 MOVE.B (A4),-(A4)
000018F4 191F 786 MOVE.B (A7)+,-(A4)
000018F6 1920 787 MOVE.B -(A0),-(A4)
000018F8 1938 0000 788 MOVE.B $0,-(A4)
000018FC 1938 0FFF 789 MOVE.B $FFF,-(A4)
00001900 1939 00008000 790 MOVE.B $8000,-(A4)
00001906 1939 00020000 791 MOVE.B $20000,-(A4)
0000190C 792
0000190C 11FC 0013 0000 793 MOVE.B #$13,$0
00001912 11C1 0000 794 MOVE.B D1,$0
00001916 795
00001916 11D4 0000 796 MOVE.B (A4),$0
0000191A 11DF 0000 797 MOVE.B (A7)+,$0
0000191E 11E0 0000 798 MOVE.B -(A0),$0
00001922 11F8 0000 0000 799 MOVE.B $0,$0
00001928 11F8 0FFF 0000 800 MOVE.B $FFF,$0
0000192E 11F9 00008000 0000 801 MOVE.B $8000,$0
00001936 11F9 00020000 0000 802 MOVE.B $20000,$0
0000193E 803
0000193E 13FC 0000 00008000 804 MOVE.B #$0,$8000
00001946 13C1 00008000 805 MOVE.B D1,$8000
0000194C 806
0000194C 13D4 00008000 807 MOVE.B (A4),$8000
00001952 13DF 00008000 808 MOVE.B (A7)+,$8000
00001958 13E0 00008000 809 MOVE.B -(A0),$8000
0000195E 13F8 0000 00008000 810 MOVE.B $0,$8000
00001966 13F8 0FFF 00008000 811 MOVE.B $FFF,$8000
0000196E 13F9 00008000 00008000 812 MOVE.B $8000,$8000
00001978 13F9 00020000 00008000 813 MOVE.B $20000,$8000
00001982 814
00001982 13FC 00FF 00021000 815 MOVE.B #$FF,$21000
0000198A 13C1 00021000 816 MOVE.B D1,$21000
00001990 817
00001990 13D4 00021000 818 MOVE.B (A4),$21000
00001996 13DF 00021000 819 MOVE.B (A7)+,$21000
0000199C 13E0 00021000 820 MOVE.B -(A0),$21000
000019A2 13F8 0000 00021000 821 MOVE.B $0,$21000
000019AA 13F8 0FFF 00021000 822 MOVE.B $FFF,$21000
000019B2 13F9 00008000 00021000 823 MOVE.B $8000,$21000
000019BC 13F9 00020000 00021000 824 MOVE.B $20000,$21000
000019C6 825
000019C6 826
000019C6 3442 827 MOVEA.W D2,A2
000019C8 364D 828 MOVEA.W A5,A3
000019CA 365C 829 MOVEA.W (A4)+,A3
000019CC 3A62 830 MOVEA.W -(A2),A5
000019CE 3678 0000 831 MOVEA.W $0,A3
000019D2 3678 1234 832 MOVEA.W $1234,A3
000019D6 3679 00008000 833 MOVEA.W $8000,A3
000019DC 3E79 00FFFFFF 834 MOVEA.W $FFFFFF,A7
000019E2 367C 0000 835 MOVEA.W #$0,A3
000019E6 367C 1000 836 MOVEA.W #$1000,A3
000019EA 3C7C 8000 837 MOVEA.W #$8000,A6
000019EE 838
000019EE 2442 839 MOVEA.L D2,A2
000019F0 264D 840 MOVEA.L A5,A3
000019F2 265C 841 MOVEA.L (A4)+,A3
000019F4 2A62 842 MOVEA.L -(A2),A5
000019F6 2678 0000 843 MOVEA.L $0,A3
000019FA 2678 1234 844 MOVEA.L $1234,A3
000019FE 2679 00008000 845 MOVEA.L $8000,A3
00001A04 2E79 00FFFFFF 846 MOVEA.L $FFFFFF,A7
00001A0A 267C 00000000 847 MOVEA.L #$0,A3
00001A10 267C 00001000 848 MOVEA.L #$1000,A3
00001A16 2C7C 00008000 849 MOVEA.L #$8000,A6
00001A1C 2C7C FFFF8000 850 MOVEA.L #$FFFF8000,A6
00001A22 851
00001A22 5881 852 ADDI.L #4,D1 *Assembler changes this to ADDQ unless the number being added is greater than #8.
00001A24 0681 00000009 853 ADDI.L #9,D1
00001A2A 0681 00000000 854 ADDI.L #0,D1
00001A30 0687 FFFFFFFF 855 ADDI.L #$FFFFFFFF,D7
00001A36 0645 FFFF 856 ADDI.W #$FFFF,D5
00001A3A 0645 0000 857 ADDI.W #$0,D5
00001A3E 0644 0009 858 ADDI.W #$9,D4
00001A42 0603 00FF 859 ADDI.B #$FF,D3
00001A46 0603 0009 860 ADDI.B #$9,D3
00001A4A 0603 0000 861 ADDI.B #$0,D3
00001A4E 862
00001A4E 5891 863 ADDI.L #4,(A1)
00001A50 0691 00000009 864 ADDI.L #9,(A1)
00001A56 0691 00000000 865 ADDI.L #0,(A1)
00001A5C 0691 FFFFFFFF 866 ADDI.L #$FFFFFFFF,(A1)
00001A62 0651 FFFF 867 ADDI.W #$FFFF,(A1)
00001A66 0651 0000 868 ADDI.W #$0,(A1)
00001A6A 0651 0009 869 ADDI.W #$9,(A1)
00001A6E 0611 00FF 870 ADDI.B #$FF,(A1)
00001A72 0611 0009 871 ADDI.B #$9,(A1)
00001A76 0611 0000 872 ADDI.B #$0,(A1)
00001A7A 873
00001A7A 5899 874 ADDI.L #4,(A1)+
00001A7C 0699 00000009 875 ADDI.L #9,(A1)+
00001A82 0699 00000000 876 ADDI.L #0,(A1)+
00001A88 0699 FFFFFFFF 877 ADDI.L #$FFFFFFFF,(A1)+
00001A8E 0659 FFFF 878 ADDI.W #$FFFF,(A1)+
00001A92 0659 0000 879 ADDI.W #$0,(A1)+
00001A96 0659 0009 880 ADDI.W #$9,(A1)+
00001A9A 0619 00FF 881 ADDI.B #$FF,(A1)+
00001A9E 0619 0009 882 ADDI.B #$9,(A1)+
00001AA2 0619 0000 883 ADDI.B #$0,(A1)+
00001AA6 884
00001AA6 58A1 885 ADDI.L #4,-(A1)
00001AA8 06A1 00000009 886 ADDI.L #9,-(A1)
00001AAE 06A1 00000000 887 ADDI.L #0,-(A1)
00001AB4 06A1 FFFFFFFF 888 ADDI.L #$FFFFFFFF,-(A1)
00001ABA 0661 FFFF 889 ADDI.W #$FFFF,-(A1)
00001ABE 0661 0000 890 ADDI.W #$0,-(A1)
00001AC2 0661 0009 891 ADDI.W #$9,-(A1)
00001AC6 0621 00FF 892 ADDI.B #$FF,-(A1)
00001ACA 0621 0009 893 ADDI.B #$9,-(A1)
00001ACE 0621 0000 894 ADDI.B #$0,-(A1)
00001AD2 895
00001AD2 58B8 0020 896 ADDI.L #4,$20
00001AD6 06B9 00000009 00020000 897 ADDI.L #9,$20000
00001AE0 06B9 00000000 00008000 898 ADDI.L #0,$8000
00001AEA 06B8 FFFFFFFF 0020 899 ADDI.L #$FFFFFFFF,$20
00001AF2 0678 FFFF 0020 900 ADDI.W #$FFFF,$20
00001AF8 0679 0000 00020000 901 ADDI.W #$0,$20000
00001B00 0679 0009 00008000 902 ADDI.W #$9,$8000
00001B08 0639 00FF 00008000 903 ADDI.B #$FF,$8000
00001B10 0639 0009 00020000 904 ADDI.B #$9,$20000
00001B18 0638 0000 0020 905 ADDI.B #$0,$20
00001B1E 906
00001B1E 0801 0000 907 BTST #0,D1
00001B22 0816 0001 908 BTST #1,(A6)
00001B26 081E 0002 909 BTST #2,(A6)+
00001B2A 0826 0003 910 BTST #3,-(A6)
00001B2E 0838 001E 0000 911 BTST #30,$0
00001B34 0838 001D 1000 912 BTST #29,$1000
00001B3A 0839 001E 00008000 913 BTST #30,$8000
00001B42 0839 001F FFFF0000 914 BTST #31,$FFFF0000
00001B4A 915
00001B4A 0101 916 BTST D0,D1
00001B4C 0316 917 BTST D1,(A6)
00001B4E 051E 918 BTST D2,(A6)+
00001B50 0726 919 BTST D3,-(A6)
00001B52 0B38 0000 920 BTST D5,$0
00001B56 0D38 1000 921 BTST D6,$1000
00001B5A 0F39 00008000 922 BTST D7,$8000
00001B60 0139 FFFF0000 923 BTST D0,$FFFF0000
00001B66 924
00001B66 4E71 925 NOP
00001B68 926
00001B68 4E75 927 RTS
00001B6A 928
00001B6A 41F8 0000 929 LEA $0,A0
00001B6E 43F8 1000 930 LEA $1000,A1
00001B72 45F9 00008000 931 LEA $8000,A2
00001B78 47F9 FFFF0000 932 LEA $FFFF0000,A3
00001B7E 4BD4 933 LEA (A4),A5
00001B80 934
00001B80 4200 935 CLR.B D0
00001B82 4212 936 CLR.B (A2)
00001B84 421B 937 CLR.B (A3)+
00001B86 4224 938 CLR.B -(A4)
00001B88 4238 0000 939 CLR.B $0
00001B8C 4238 1000 940 CLR.B $1000
00001B90 4239 00008000 941 CLR.B $8000
00001B96 4239 FFEF0000 942 CLR.B $FFEF0000
00001B9C 943
00001B9C 4240 944 CLR.W D0
00001B9E 4252 945 CLR.W (A2)
00001BA0 425B 946 CLR.W (A3)+
00001BA2 4264 947 CLR.W -(A4)
00001BA4 4278 0000 948 CLR.W $0
00001BA8 4278 1000 949 CLR.W $1000
00001BAC 4279 00008000 950 CLR.W $8000
00001BB2 4279 FFEF0000 951 CLR.W $FFEF0000
00001BB8 952
00001BB8 4280 953 CLR.L D0
00001BBA 4292 954 CLR.L (A2)
00001BBC 429B 955 CLR.L (A3)+
00001BBE 42A4 956 CLR.L -(A4)
00001BC0 42B8 0000 957 CLR.L $0
00001BC4 42B8 1000 958 CLR.L $1000
00001BC8 42B9 00008000 959 CLR.L $8000
00001BCE 42B9 FFEF0000 960 CLR.L $FFEF0000
00001BD4 961
00001BD4 962
00001BD4 4E96 963 JSR (A6)
00001BD6 4EB8 0000 964 JSR $0
00001BDA 4EB8 1000 965 JSR $1000
00001BDE 4EB9 00008000 966 JSR $8000
00001BE4 4EB9 FFEE0000 967 JSR $FFEE0000
00001BEA 968
00001BEA 4C97 00FE 969 MOVEM.W (A7),D1-D7
00001BEE 4CD6 00FC 970 MOVEM.L (A6),D2-D7
00001BF2 4C97 FE00 971 MOVEM.W (A7),A1-A7
00001BF6 4CD6 FC00 972 MOVEM.L (A6),A2-A7
00001BFA 4C9D 00F8 973 MOVEM.W (A5)+,D3-D7
00001BFE 4CDC 0080 974 MOVEM.L (A4)+,D7-D7
00001C02 4C9D F800 975 MOVEM.W (A5)+,A3-A7
00001C06 4CDC 8000 976 MOVEM.L (A4)+,A7-A7
00001C0A 4CB9 00FE 00020000 977 MOVEM.W $20000,D1-D7
00001C12 4CF9 00FC 00020000 978 MOVEM.L $20000,D2-D7
00001C1A 4CB8 FE00 0100 979 MOVEM.W $100,A1-A7
00001C20 4CF8 FC00 0100 980 MOVEM.L $100,A2-A7
00001C26 981
00001C26 48E3 7F00 982 MOVEM.L D1-D7,-(A3)
00001C2A 48E2 007F 983 MOVEM.L A1-A7,-(A2)
00001C2E 48A1 1800 984 MOVEM.W D3-D4,-(A1)
00001C32 48A0 007F 985 MOVEM.W A1-A7,-(A0)
00001C36 48D3 00FE 986 MOVEM.L D1-D7,(A3)
00001C3A 48D2 FE00 987 MOVEM.L A1-A7,(A2)
00001C3E 4891 0018 988 MOVEM.W D3-D4,(A1)
00001C42 4890 FE00 989 MOVEM.W A1-A7,(A0)
00001C46 48F9 00FE 00020000 990 MOVEM.L D1-D7,$20000
00001C4E 48F8 FE00 0100 991 MOVEM.L A1-A7,$100
00001C54 48B9 0018 00020000 992 MOVEM.W D3-D4,$20000
00001C5C 48B8 FE00 0100 993 MOVEM.W A1-A7,$100
00001C62 994
00001C62 5200 995 ADDQ.B #1,D0
00001C64 996