forked from peterstanton/TeamAwesome-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjumptable.L68
222 lines (218 loc) · 15.1 KB
/
jumptable.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
00001000 Starting Address
Assembler used: EASy68K Editor/Assembler v5.15.04
Created On: 5/13/2017 1:27:12 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 15, 2017
00000000 5 * Description: CSS 422 Final Project
00000000 6 *-----------------------------------------------------------
00000000 7200 7 MOVEQ.L #0,D1 *Clear D1
00000002 2200 8 MOVE.L D0,D1 *Move the opcode to D1
00000004 9
00000004 41F9 00000016 10 LEA jumptable,A0 *loads the jumptable into A0
0000000A 11
0000000A E999 12 ROL.L #4,D1 *Moves the index to the right nibble
0000000C 0201 000F 13 ANDI.B #$0F,D1 *Gets the first nibble
00000010 2072 1000 14 MOVEA.L (0,A2,D1.W),A0 *It has 4 byte table entries
00000014 4ED0 15 JMP (A0) *Jumps to specified routine
00000016 16
00000016 17
00000016= 00000056 18 jumptable: DC.L routine_0 *Bit manipulation/MOVEP/Immediate (D)
Line 19 ERROR: Undefined symbol
0000001A= 0019F810 19 DC.L OP_Invalid *Move Byte(D)
Line 20 ERROR: Undefined symbol
0000001E= 0019F810 20 DC.L OP_Invalid *Move Long (D)
Line 21 ERROR: Undefined symbol
00000022= 0019F810 21 DC.L OP_Invalid *Move Word (D)
00000026= 00000060 22 DC.L routine_4 *Misc
0000002A= 0000006E 23 DC.L routine_5 *ADDQ/SUBQ/Scc/DBcc
0000002E= 00000072 24 DC.L routine_6 *BSR,BRA,Bcc
Line 25 ERROR: Undefined symbol
00000032= 0019F810 25 DC.L OP_Invalid *MOVEQ
00000036= 00000076 26 DC.L routine_8 *OR/DIV/SBCD
0000003A= 0000007A 27 DC.L routine_9 *SUB/SUBX
Line 28 ERROR: Undefined symbol
0000003E= 0019F810 28 DC.L Op_Invalid *Unassigned (D)
00000042= 0000007E 29 DC.L routine_B *CMP/EOR
00000046= 00000082 30 DC.L routine_C *AND/MUL/ABCD/EXG
0000004A= 00000086 31 DC.L routine_D *ADD/ADDA/ADDX
0000004E= 0000008A 32 DC.L routine_E *Shift/Rotate
00000052= 0000008E 33 DC.L routine_F *Special/Reserved
00000056 34
00000056 35 routine_0:
00000056 36 *Bit manipulation/MOVEP/Immediate
00000056 4EB9 0000010A 37 JSR sub_Bits11to8 *reads A2, returns D7
Line 38 ERROR: Undefined symbol
0000005C 6000 BB30 38 BRA Op_Invalid *if unable to convert, goes to invalid
00000060 39
00000060 40 routine_4:
00000060 41 *Miscellaneous
00000060 4EB9 0000010A 42 JSR sub_Bits11to8
00000066 BE3C 0002 43 CMP.B #$2,D7 *compares immediate data, 2 in D7
Line 44 ERROR: Undefined symbol
0000006A 6000 BB22 44 BRA NOP_disp
0000006E 45
0000006E 46 routine_5:
0000006E 47 *ADDQ/SUBQ/Scc/DBcc
0000006E 48 *MOVE.W (A2),D7
0000006E 49 *BTST #8,D7
0000006E 50 *BEQ OP_AddQ
Line 51 ERROR: Undefined symbol
0000006E 6000 BB1E 51 BRA Op_Invalid
00000072 52
00000072 53 routine_6:
00000072 54 *BSR,BRA,Bcc
Line 55 ERROR: Undefined symbol
00000072 6000 BB1A 55 BRA Op_Invalid
00000076 56
00000076 57 routine_8:
00000076 58 *OR/DIV/SBCD
Line 59 ERROR: Undefined symbol
00000076 6000 BB16 59 bra Op_Invalid
0000007A 60
0000007A 61 routine_9:
0000007A 62 *SUB/SUBX
Line 63 ERROR: Undefined symbol
0000007A 6000 BB12 63 BRA Op_Invalid
0000007E 64
0000007E 65 routine_B:
0000007E 66 *CMP/EOR
Line 67 ERROR: Undefined symbol
0000007E 6000 BB0E 67 BRA Op_Invalid
00000082 68
00000082 69 routine_C:
00000082 70 *AND/MUL/ABCD/EXG
Line 71 ERROR: Undefined symbol
00000082 6000 BB0A 71 BRA Op_Invalid
00000086 72
00000086 73 routine_D:
00000086 74 *ADD/ADDA/ADDX
Line 75 ERROR: Undefined symbol
00000086 6000 BB06 75 BRA Op_Invalid
0000008A 76
0000008A 77 routine_E:
0000008A 78 *Shift/Rotate
Line 79 ERROR: Undefined symbol
0000008A 6000 BB02 79 BRA Op_Invalid
0000008E 80
0000008E 81 routine_F:
0000008E 82 *Special/Reserved
Line 83 ERROR: Undefined symbol
0000008E 6000 BAFE 83 BRA Op_Invalid
00000092 84
00000092 85
00000092 86 returnFromJumptable:
00000092 87 *stack restore
00000092 88 *RTS
00000092 89
00000092 90 *-----------------------------------------------------------
00000092 91 *Below are helper methods use to convert bits
00000092 92 *-----------------------------------------------------------
00000092 93 *Evaluates bits 2 to 0
00000092 3E12 94 sub_Bits2to0 MOVE.W (A2),D7 *gets opcode for evauluation
00000094 103C 000C 95 MOVE.B #12,D0 *gets ready to shift 12 bits
00000098 E16F 96 LSL.W D0,D7 *truncates up to 4th nibble
0000009A E06F 97 LSR.W D0,D7 *isolates nibble
0000009C 4E75 98 RTS
0000009E 99 *-----------------------------------------------------------
0000009E 3E12 100 sub_Bits3to0 MOVE.W (A2),D7 *gets opcode for evauluation
000000A0 103C 000D 101 MOVE.B #13,D0 *gets ready to shift 13 bits
000000A4 E16F 102 LSL.W D0,D7 *truncates up to 4th nibble
000000A6 E06F 103 LSR.W D0,D7 *isolates nibble
000000A8 4E75 104 RTS
000000AA 105 *-----------------------------------------------------------
000000AA 3E12 106 sub_Bits5to3 MOVE.W (A2),D7 *gets opcode for evauluation
000000AC 103C 000A 107 MOVE.B #10,D0 *gets ready to shift 10 bits
000000B0 E16F 108 LSL.W D0,D7 *truncates up to bit 5
000000B2 103C 000D 109 MOVE.B #13,D0 *gets ready to shift 13 bits
000000B6 E06F 110 LSR.W D0,D7 *gets remainder
000000B8 4E75 111 RTS
000000BA 112 *-----------------------------------------------------------
000000BA 3E12 113 sub_Bits7to0 MOVE.W (A2),D7 *gets opcode for evauluation
000000BC E14F 114 LSL.W #8,D7 *truncates up to 7th bit
000000BE E04F 115 LSR.W #8,D7 *isolates nibble
000000C0 4E75 116 RTS
000000C2 117 *-----------------------------------------------------------
000000C2 3E12 118 sub_Bits7to4 MOVE.W (A2),D7 *gets opcode for evauluation
000000C4 E14F 119 LSL.W #8,D7 *truncates up to 7th bit
000000C6 103C 000C 120 MOVE.B #12,D0 *gets ready to shift 12 bits
000000CA E06F 121 LSR.W D0,D7 *isolates nibble
000000CC 4E75 122 RTS
000000CE 123 *-----------------------------------------------------------
000000CE 3E12 124 sub_Bits7to6 MOVE.W (A2),D7 *gets opcode for evauluation
000000D0 E14F 125 LSL.W #8,D7 *truncates up to 7th bit
000000D2 103C 000E 126 MOVE.B #14,D0 *gets ready to shift 14 bits
000000D6 E06F 127 LSR.W D0,D7 *isolates nibble
000000D8 4E75 128 RTS
000000DA 129 *-----------------------------------------------------------
000000DA 3E12 130 sub_Bits8to3 MOVE.W (A2),D7 *gets opcode for evauluation
000000DC EF4F 131 LSL.W #7,D7 *truncates up to 8th bit
000000DE 103C 000A 132 MOVE.B #10,D0 *gets ready to shift 10 bits
000000E2 E06F 133 LSR.W D0,D7 *isolates nibble
000000E4 4E75 134 RTS
000000E6 135 *-----------------------------------------------------------
000000E6 3E12 136 sub_Bits8to4 MOVE.W (A2),D7 *gets opcode for evauluation
000000E8 EF4F 137 LSL.W #7,D7 *truncates up to 8th bit
000000EA 103C 000B 138 MOVE.B #11,D0 *gets ready to shift 11 bits
000000EE E06F 139 LSR.W D0,D7 *isolates nibble
000000F0 4E75 140 RTS
000000F2 141 *-----------------------------------------------------------
000000F2 3E12 142 sub_Bits8to6 MOVE.W (A2),D7 *gets opcode for evauluation
000000F4 EF4F 143 LSL.W #7,D7 *truncates up to 8th bit
000000F6 103C 000D 144 MOVE.B #13,D0 *gets ready to shift 13 bits
000000FA E06F 145 LSR.W D0,D7 *isolates nibble
000000FC 4E75 146 RTS
000000FE 147 *-----------------------------------------------------------
000000FE 3E12 148 sub_Bits11to6 MOVE.W (A2),D7 *gets opcode for evauluation
00000100 E94F 149 LSL.W #4,D7 *truncates up to 11th bit
00000102 103C 000A 150 MOVE.B #10,D0 *gets ready to shift 10 bits
00000106 E06F 151 LSR.W D0,D7 *isolates nibble
00000108 4E75 152 RTS
0000010A 153 *-----------------------------------------------------------
0000010A 3E12 154 sub_Bits11to8 MOVE.W (A2),D7 *gets opcode for evauluation
0000010C E94F 155 LSL.W #4,D7 *truncates up to 11th bit
0000010E 103C 000C 156 MOVE.B #12,D0 *gets ready to shift 13 bits
00000112 E06F 157 LSR.W D0,D7 *isolates nibble
00000114 4E75 158 RTS
00000116 159 *-----------------------------------------------------------
00000116 3E12 160 sub_Bits11to9 MOVE.W (A2),D7 *gets opcode for evauluation
00000118 E94F 161 LSL.W #4,D7 *truncates up to 11th bit
0000011A 103C 000D 162 MOVE.B #13,D0 *gets ready to shift 13 bits
0000011E E06F 163 LSR.W D0,D7 *isolates nibble
00000120 4E75 164 RTS
00000122 165 *-----------------------------------------------------------
00000122 166
00000122 167
00000122 168
Line 169 WARNING: END directive missing, starting address not set
16 errors detected
1 warning generated
SYMBOL TABLE INFORMATION
Symbol-name Value
-------------------------
JUMPTABLE 16
RETURNFROMJUMPTABLE 92
ROUTINE_0 56
ROUTINE_4 60
ROUTINE_5 6E
ROUTINE_6 72
ROUTINE_8 76
ROUTINE_9 7A
ROUTINE_B 7E
ROUTINE_C 82
ROUTINE_D 86
ROUTINE_E 8A
ROUTINE_F 8E
SUB_BITS11TO6 FE
SUB_BITS11TO8 10A
SUB_BITS11TO9 116
SUB_BITS2TO0 92
SUB_BITS3TO0 9E
SUB_BITS5TO3 AA
SUB_BITS7TO0 BA
SUB_BITS7TO4 C2
SUB_BITS7TO6 CE
SUB_BITS8TO3 DA
SUB_BITS8TO4 E6
SUB_BITS8TO6 F2