-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhappysummer.X68
1692 lines (1293 loc) · 63.1 KB
/
happysummer.X68
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
*-----------------------------------------------------------
* Title : Final Project
* Written by : Yasmine Subbagh, Slava Arovina, Chin Cheung Lam
* Date :
* Created: 06/27/23
* Last Modified: 08/11/23
* Description: 68k Assembly Dissasembler
*-----------------------------------------------------------
START ORG $1000
*------------input--------------
PRINTINPUTMSG LEA WELCOME, A1
MOVE.B #14, D0
TRAP #15
LEA STARTLOCMSG, A1
TRAP #15
MOVE.B #2, D0
INPUTSTART LEA INPUT_HEXSTR, A1
TRAP #15
JSR VALID_INPUT_SIZE ; IF USER ACCIDENTALLY ENTER INVALID SIZE FOR THE INPUT (NEW)
;BEQ PRINTINPUTMSG ; LOOP BACK TO ASK USER INPUT AGAIN (NEW)
;MOVE.L STARTLOC,INPUT_HEXSTR ; MOVE the Al to INPUT_HEXSTR convertor register (NEW), QUESTION!!!! should this be (A1?)
MOVE.B D1, D2
JSR HEXCONVERTOR ;Converting the hex value from string (NEW)
MOVE.L HEX_RESULT, STARTLOC ; Store HEX_RESULT to STARTLOC (NEW)
LEA ENDLOCMSG, A1
MOVE.B #14, D0
TRAP #15
MOVE.B #2, D0
INPUTEND LEA INPUT_HEXSTR, A1
TRAP #15
;MOVE.L ENDLOC,INPUT_HEXSTR ; MOVE the Al to INPUT_HEXSTR convertor register (NEW)
MOVE.B D1, D2
JSR HEXCONVERTOR ; Converting the hex value from string (NEW)
MOVE.L HEX_RESULT, ENDLOC ; Store HEX_RESULT to ENDLOC (NEW)
JSR CHECK_CONVERTED_HEXRESULT ; CHECK_ENDING_LOCATION_HEX_INPUT_RESULT
; <----------------------; I think we need write some code for user input machine code!!!!
FINALMSGS MOVE.B #14, D0
LEA NOTES, A1
TRAP #15
BRA LOADSTARTADRDRESS
*-------------------------------
*-----------------INPUT_STRING_TO_HEX-------------------------
HEXCONVERTOR LEA INPUT_HEXSTR, A1
CONVLOOPT CMP.B #$00, (A1)
BEQ BITSHIFT
CMP.B #$39, (A1)
BLE NUMBER
LETTER SUB.B #55, (A1)+
NUMBER SUB.B #48, (A1)+
BRA CONVLOOPT
BITSHIFT CLR D0
CLR D1
LEA INPUT_HEXSTR, A1
LOAD MOVE.B (A1)+, D0
AND.B #$0F, D0
LSL.L #4, D1
OR.L D0, D1
SUB.B #1, D2
CMP.B #0, D2 ;address limit
BEQ HEX_DONE
BRA LOAD
HEX_DONE MOVE.L D1, HEX_RESULT
RTS
*-----------------CHECK_ENDING_LOCATION_HEX_INPUT_RESULT-------------------------(NEW)+(NOT USE YET)
CHECK_CONVERTED_HEXRESULT
MOVE.L ENDLOC, D5
MOVE.L STARTLOC, D6
CMP.L D5, D6
BGT GREATER_THAN_ENDINGLOC
RTS
GREATER_THAN_ENDINGLOC LEA INVAILDENDLOCMSG,A1
MOVE.B #14, D0
TRAP #15
CMP.L #$FF00, D1 ; Clear the screen TASK 11
BRA PRINTINPUTMSG
*---------------------------------------------------------------------------------------
;ADRCHECK MOVE.L STARTLOC, D0
; MOVE.L ENDLOC, D1
; CMP.L D0, D1
; BGT VALIDADDRESS ;startloc is less than end loc
*-----------------CHECK_INPUT_IF_VALID-------------------------
VALID_INPUT_SIZE CMP.L #0, D1 ; CHECK IF IT IS AN EMPTY INPUT
BEQ EMPTY_INPUT ; JSR TO EMPTY_INPUT
; I deleted LESS_THAN_FOUR check.
RTS
EMPTY_INPUT LEA EMPTYMSG,A1
MOVE.B #14, D0
TRAP #15
CMP.L #$FF00, D1 ; Clear the screen TASK 11
BRA PRINTINPUTMSG ; Continue
INVALIDADDRESS LEA INVADRMSG, A1
MOVE.B #14, D0
TRAP #15
CMP.L #$FF00, D1 ; Clear the screen TASK 11
BRA PRINTINPUTMSG ;restart the program
*---------load each locaLR
LOADSTARTADRDRESS CLR D0
CLR D1
CLR D3 ;use for printing loop page limitier
MOVE.L ENDLOC, A0
MOVE.L STARTLOC, A1
MOVE.L A1, A5
LOOPMAIN JSR PRINT_CURRENT_ADDR
;LEA ENDLOC, A0
MOVE.L (A0),D0
;LEA STARTLOC, A1 ;Is this for current address?
MOVE.L (A5),D1
;MOVE.W CURR_ADDRESS, A1 ;Is this for current address?(NEW+CHECK!!!!)James
; I think we need write some code for user input machine code!!!!
DIASSEMBLE
;MOVE.L A5,CURR_ADDRESS
;MOVE.W (A5)+, D2
;MOVE.L D1, D2
GETFIRST8 ;LSR.W #4, D2
MOVEALLBITSOUT ;LSR.W #8, D2 ;clear all bits but first 4, moved into last byte
CLR.L D5
BRA OPCODETABLE
*-----------------ADDRESS PRINTINTG-------------------------
PRINT_CURRENT_ADDR MOVE.L A5, D1 ;actual address
MOVE.B #15, D0
MOVE.B #16, D2
TRAP #15
LEA SPACE_STRING, A1
MOVE.B #14, D0
TRAP #15
;MOVE.L A5, HEX_RESULT
;JSR STRINGCONVERTOR
;MOVE.W A5, HEX_RESULT
;JSR STRINGCONVERTOR
RTS
;PRINTADDR MOVE.L A5, HEX_RESULT
;JSR STRINGCONVERTOR
;MOVE.W A5, HEX_RESULT
;JSR STRINGCONVERTOR
;RTS
*-----------------------------------------------------------
*-----------------LOOP STUFF-------------------------
LOOPINC ADD.L #4, A5 ;inc address
MOVE.B #13, D0
LEA SPACE_STRING,A1
TRAP #15
JSR PAGELOAD
BRA LOOPMAIN
*-----------------------------------------------------------
PAGELOAD ADD.W #1, D3
CMP.W #22, D3
BEQ WAITFORUSERENTER
RETURNLOAD
RTS
WAITFORUSERENTER LEA LOADMOREENTER, A1
MOVE.B #18, D0
TRAP #15
CLR D1
CLR D3
BRA RETURNLOAD
*-----------------OP CODE TABLE COMPARE-------------------------
OPCODETABLE
CLR D2
;JSR PRINTADDR
JSR PRINT_SPACE
MOVE.L A5,CURR_ADDRESS
MOVE.W (A5)+, D2
MOVE.W D2, HEX_RESULT
LSR.W #4, D2
LSR.W #4, D2
LSR.W #4, D2
CMP.B #%1001,D2
BEQ OPSUB
CMP.B #%0100, D2
BEQ OPLEA_NOP_NOT_JSR_RTS_MOVEM (I changed)
CMP.B #%1100, D2
BEQ OPAND
CMP.B #%1000, D2
BEQ OPOR
CMP.B #%1110, D2
BEQ OPLSL_LSR_ASL_ASR_ROL_ROR (I changed)
;CMP.B #%1110, D2 (I think we only need one #%1110 for LSL, LSR, ASL, ASR, ROL, ROR) by Lam
;BEQ OPSHIFTROT
*-----------------------------NEW--------------------------------
CMP.B #%1101, D2
BEQ OPADD_ADDA
CMP.B #%0101, D2
BEQ OPADDQ
CMP.B #%0001, D2
BEQ OPMOVEB
CMP.B #%0011, D2
BEQ OPMOVEW_MOVEAW
CMP.B #%0010, D2
BEQ OPMOVEL_MOVEAL
CMP.B #%0111, D2
BEQ OPMOVEQ
CMP.B #%0110, D2
BEQ OPBRA_BCC
CMP.B #%1011, D2
BEQ OPCMP
BRA OPINVALID ;invalid line
*---------------------------------------------------------------
OPSUB
LEA SUB_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR AFTER_OPCODE
JSR SIZE_DETECTOR
JSR PRINT_SPACE
BRA EA_SUB
OPLEA_NOP_NOT_JSR_RTS_MOVEM
JSR AFTER_OPCODE
MOVE.W DESTINATION_MODE, D2
CMP.B #%001, D2
BEQ OPNOP_NOTW_RTS
CMP.B #%100, D2
BEQ OPMOVEM_ADDRESS
CMP.B #%110, D2
BEQ OPMOVEM_REGISTER
CMP.B #%111, D2
BEQ OPLEA
CMP.B #%000, D2
BEQ OPNOTB
CMP.B #%010, D2
BEQ OPNOTL_JSR
BRA OPINVALID
OPMOVEM_ADDRESS
LEA MOVEM_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR AFTER_OPCODE
JSR MOVEM_SIZE_DETECTOR
JSR PRINT_SPACE
BRA EAMOVEM
OPMOVEM_REGISTER
LEA MOVEM_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR AFTER_OPCODE
JSR MOVEM_SIZE_DETECTOR
JSR PRINT_SPACE
BRA EAMOVEM
OPLEA
LEA LEA_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_SPACE
BRA EALEA
OPNOP_NOTW_RTS
MOVE.W DESTINATION_REGISTER, D2
CMP.B #%111, D2
BEQ OPNOP_RTS
CMP.B #%011, D2
BEQ OPNOTW
BRA OPINVALID
OPNOP_RTS
MOVE.W SOURCE_REGISTER, D2
CMP.B #%001, D2
BEQ OPNOP
CMP.B #%101, D2
BEQ OPRTS
BRA OPINVALID
OPNOP
LEA NOP_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_SPACE
BRA EANOP_RST
OPRTS
LEA RTS_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_SPACE
BRA EANOP_RST
OPNOTW
LEA NOTW_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_SPACE
BRA EANOT_JSR
OPNOTB
LEA NOTB_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_SPACE
BRA EANOT_JSR
OPNOTL_JSR
MOVE.W DESTINATION_REGISTER, D2
CMP.B #%011, D2
BEQ OPNOTL
CMP.B #%111, D2
BEQ OPJSR
BRA OPINVALID
OPNOTL
LEA NOTL_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_SPACE
BRA EANOT_JSR
OPJSR
LEA JSR_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_SPACE
BRA EANOT_JSR
OPAND
LEA AND_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR AFTER_OPCODE
JSR SIZE_DETECTOR
JSR PRINT_SPACE
BRA EAAND_OR
OPOR
LEA OR_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR AFTER_OPCODE
JSR SIZE_DETECTOR
JSR PRINT_SPACE
BRA EAAND_OR
OPLSL_LSR_ASL_ASR_ROL_ROR
JSR AFTER_OPCODE
MOVE.W DESTINATION_MODE, D2
MOVE.W #14,D5
LSL D5, D2
LSR D5, D2
CMP.B #%00, D2
BEQ SHIFT_REGISTER
CMP.B #%01, D2
BEQ SHIFT_REGISTER
CMP.B #%10, D2
BEQ SHIFT_REGISTER
CMP.B #%11, D2
BEQ OPSHIFT_ADDRESS
BRA OPINVALID
SHIFT_REGISTER
MOVE.W SOURCE_MODE, D2
LSL D5, D2
LSR D5, D2
CMP.B #%00, D2
BEQ OPREGISTER_ASL_ASR
CMP.B #%01, D2
BEQ OPREGISTER_LSL_LSR
CMP.B #%11, D2
BEQ OPREGISTER_ROL_ROR
BRA OPINVALID
OPREGISTER_ASL_ASR
LEA AS_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR DIRECTION_DETECTOR
JSR SHIFT_SIZE_DETECTOR
JSR PRINT_SPACE
BRA EALSL_LSR_ASL_ASR_ROL_ROR
OPREGISTER_LSL_LSR
LEA LS_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR DIRECTION_DETECTOR
JSR SHIFT_SIZE_DETECTOR
JSR PRINT_SPACE
BRA EALSL_LSR_ASL_ASR_ROL_ROR
OPREGISTER_ROL_ROR
LEA RO_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR DIRECTION_DETECTOR
JSR SHIFT_SIZE_DETECTOR
JSR PRINT_SPACE
BRA EALSL_LSR_ASL_ASR_ROL_ROR
OPSHIFT_ADDRESS
MOVE.W DESTINATION_MODE, D2
CMP.B #%000, D2
BEQ OPADDRESS_ASL_ASR
CMP.B #%001, D2
BEQ OPADDRESS_LSL_LSR
CMP.B #%011, D2
BEQ OPADDRESS_ROL_ROR
BRA OPINVALID
OPADDRESS_ASL_ASR
LEA AS_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR DIRECTION_DETECTOR
JSR PRINT_SPACE
BRA EASHIFT_ADDRESS
OPADDRESS_LSL_LSR
LEA LS_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR DIRECTION_DETECTOR
JSR PRINT_SPACE
BRA EASHIFT_ADDRESS
OPADDRESS_ROL_ROR
LEA RO_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR DIRECTION_DETECTOR
JSR PRINT_SPACE
BRA EASHIFT_ADDRESS
OPADD_ADDA
JSR AFTER_OPCODE
MOVE.W DESTINATION_MODE, D2
CMP.B #%000, D2
BEQ OPADD
CMP.B #%001, D2
BEQ OPADD
CMP.B #%010, D2
BEQ OPADD
CMP.B #%100, D2
BEQ OPADD
CMP.B #%101, D2
BEQ OPADD
CMP.B #%110, D2
BEQ OPADD
CMP.B #%011, D2
BEQ OPADDA
CMP.B #%111, D2
BEQ OPADDA
BRA OPINVALID
OPADD
LEA ADD_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR SIZE_DETECTOR
JSR PRINT_SPACE
BRA EAADD
OPADDA
LEA ADD_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR ADDA_SIZE_DETECTOR
JSR PRINT_SPACE
BRA EAADDA
OPADDQ
LEA ADD_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR AFTER_OPCODE
JSR SIZE_DETECTOR
JSR PRINT_SPACE
MOVE.W HEX_RESULT, D2
BRA EAADDQ
OPMOVEB
LEA MOVEB_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR AFTER_OPCODE
JSR PRINT_SPACE
BRA EAMOVEB
OPMOVEW_MOVEAW
JSR AFTER_OPCODE
MOVE.W DESTINATION_MODE, D2
CMP.B #%001, D2
BEQ OPMOVEAW
LEA MOVEW_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_SPACE
BRA EAMOVEW
OPMOVEAW
LEA MOVEW_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_SPACE
BRA EAMOVEAW
OPMOVEL_MOVEAL
JSR AFTER_OPCODE
MOVE.W DESTINATION_MODE, D2
CMP.B #%001, D2
BEQ OPMOVEAL
LEA MOVEL_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_SPACE
BRA EAMOVEL
OPMOVEAL
LEA MOVEAL_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_SPACE
BRA EAMOVEAL
OPMOVEQ
LEA MOVEQ_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR AFTER_OPCODE
JSR PRINT_SPACE
BRA EAMOVEQ
OPBRA_BCC
ADD.L #$2, CURR_ADDRESS ; This is PC value
MOVE.L HEX_RESULT, D2
LSL #4, D2
MOVE.w #12, D7
LSR D7, D2
CMP.B #%0000, D2
BEQ OPBRA
CMP.B #%0111, D2
BEQ OPBEQ
CMP.B #%1110, D2
BEQ OPBGT
CMP.B #%1111, D2
BEQ OPBLE
BRA OPINVALID
OPBRA
LEA BRA_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_SPACE
BRA EABCC_BRA
OPBEQ
LEA BEQ_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_SPACE
BRA EABCC_BRA
OPBGT
LEA BGT_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_SPACE
BRA EABCC_BRA
OPBLE
LEA BLE_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_SPACE
BRA EABCC_BRA
OPCMP
LEA CMP_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR AFTER_OPCODE
JSR SIZE_DETECTOR
JSR PRINT_SPACE
BRA EACMP
OPINVALID
LEA INVALID_OPCODE_STRING, A1
MOVE.B #14, D0
TRAP #15
JSR DIRECTION_DETECTOR
JSR PRINT_SPACE
BRA EAINVALID
*---------------------------EA-------------------------------
EAINVALID
LEA Dollar_sign, A1
MOVE.B #14, D0
TRAP #15
MOVE.W HEX_RESULT,D2
BRA DISSDONE ; NEED TO CHECK
EAADD
CMP.B #1, D5
BEQ EAADD_FIRSTDn
MOVE.W DESTINATION_MODE, SIZE_OF_Dn
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
JSR PRINT_COMMA
JSR EATABLE_MODE
MOVE.W DESTINATION_REGISTER, D7 ;D7??????
JSR PRINTDn_MODE
BRA DISSDONE
EAADD_FIRSTDn
MOVE.W DESTINATION_REGISTER, D6
JSR PRINTDn_MODE
JSR PRINT_COMMA
MOVE.W DESTINATION_MODE, SIZE_OF_Dn
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
JSR EATABLE_MODE
BRA DISSDONE
EAADDA
MOVE.W DESTINATION_MODE, SIZE_OF_Dn
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
JSR EATABLE_MODE
JSR PRINT_COMMA
MOVE.W DESTINATION_REGISTER, D6
JSR PRINTAn_MODE
BRA DISSDONE
EAADDQ
LEA Hash_sign, A1
MOVE.B #14, D0
TRAP #15
CLR.L D1
MOVE.W DESTINATION_REGISTER, D7
CMP.B #%0000, D7
BEQ OVERFLOW_ADDQ
FIX_OVERFLOW_ADDQ
JSR PRINT_IMMEDIATE_SIGN
JSR PRINT_COMMA
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
JSR EATABLE_MODE
BRA DISSDONE
OVERFLOW_ADDQ
MOVE.W #%1000, D7
BRA FIX_OVERFLOW_ADDQ
EA_SUB
CMP.B #1, D5
BEQ EASUB_FIRSTDn
MOVE.W DESTINATION_MODE, SIZE_OF_Dn
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
JSR EATABLE_MODE
JSR PRINT_COMMA
MOVE.W DESTINATION_REGISTER, D6
JSR PRINTDn_MODE
BRA DISSDONE
EASUB_FIRSTDn
MOVE.W DESTINATION_REGISTER, D6
JSR PRINTDn_MODE
JSR PRINT_COMMA
MOVE.W DESTINATION_MODE, SIZE_OF_Dn
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
JSR EATABLE_MODE
BRA DISSDONE
EALEA
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
JSR EATABLE_MODE
JSR PRINT_COMMA
MOVE.W DESTINATION_REGISTER, D6
JSR PRINTAn_MODE
BRA DISSDONE
EANOP_RST
BRA DISSDONE
EANOT_JSR
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
JSR EATABLE_MODE
BRA DISSDONE
EALSL_LSR_ASL_ASR_ROL_ROR
MOVE.W SOURCE_MODE, D2
LSR #2, D2
CMP.B #0, D2
BEQ SHIFT_IMMEDIATE
MOVE.W DESTINATION_REGISTER, D6
JSR PRINTDn_MODE
JSR PRINT_COMMA
MOVE.W SOURCE_REGISTER, D6
JSR PRINTDn_MODE
BRA DISSDONE
SHIFT_IMMEDIATE
CLR.L D1
MOVE.W DESTINATION_REGISTER, D1
CMP.B #0000, D1
BEQ OVERFLOWSHIFT_COUNT
FIX_OVERFLOW_SHIFT LEA Hash_sign, A1
MOVE.B #14, D0
TRAP #15
JSR PRINT_IMMEDIATE_SIGN
JSR PRINT_COMMA
MOVE.W SOURCE_REGISTER, D6
JSR EATABLE_MODE
BRA DISSDONE
OVERFLOWSHIFT_COUNT
MOVE.W #%1000, D1
BRA FIX_OVERFLOW_SHIFT
EASHIFT_ADDRESS
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D4
JSR EATABLE_MODE
BRA DISSDONE
EACMP
MOVE.W DESTINATION_MODE, SIZE_OF_Dn
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
JSR EATABLE_MODE
JSR PRINT_COMMA
MOVE.W DESTINATION_REGISTER, D6
JSR PRINTDn_MODE
BRA DISSDONE
EAAND_OR
CMP.B #1, D5
BEQ EAAND_OR_FIRSTDn
MOVE.W DESTINATION_MODE, SIZE_OF_Dn
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
JSR EATABLE_MODE
JSR PRINT_COMMA
MOVE.W DESTINATION_REGISTER, D6
JSR PRINTDn_MODE
BRA DISSDONE
EAAND_OR_FIRSTDn
MOVE.W DESTINATION_REGISTER, D6
JSR PRINTDn_MODE
JSR PRINT_COMMA
MOVE.W DESTINATION_MODE, SIZE_OF_Dn
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
JSR EATABLE_MODE
BRA DISSDONE
EAMOVEB
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
MOVE.W #%0001, SIZE_OF_Dn
JSR EATABLE_MODE
JSR PRINT_COMMA
MOVE.W DESTINATION_REGISTER, D6
MOVE.W DESTINATION_MODE, D7
JSR EATABLE_MODE
BRA DISSDONE
EAMOVEW
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
MOVE.W #%0011, SIZE_OF_Dn
JSR EATABLE_MODE
JSR PRINT_COMMA
MOVE.W DESTINATION_REGISTER, D6
MOVE.W DESTINATION_MODE, D7
JSR EATABLE_MODE
BRA DISSDONE
EAMOVEAW
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
MOVE.W #%0011, SIZE_OF_Dn
JSR EATABLE_MODE
JSR PRINT_COMMA
MOVE.W DESTINATION_REGISTER, D6
JSR PRINTAn_MODE
BRA DISSDONE
EAMOVEL
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
MOVE.W #%0010, SIZE_OF_Dn
JSR EATABLE_MODE
JSR PRINT_COMMA
MOVE.W DESTINATION_REGISTER, D6
MOVE.W DESTINATION_MODE, D7
JSR EATABLE_MODE
BRA DISSDONE
EAMOVEAL
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
MOVE.W #%0010, SIZE_OF_Dn
JSR EATABLE_MODE
JSR PRINT_COMMA
MOVE.W DESTINATION_REGISTER, D6
JSR PRINTAn_MODE
BRA DISSDONE
EAMOVEM
MOVE.W SOURCE_MODE, D7
MOVE.W SOURCE_REGISTER, D6
JSR EATABLE_MODE
JSR PRINT_COMMA