8 # | B | I | IS | C | SC | note
9 -------+-------+-------+-------+-------+-------+-------------------------------
10 00 | | | | | | senseless
12 02 | | | | x | | senseless ?
14 04 | | | x | | | missing base ?
15 05 | | | x | | x | missing base ?
16 06 | | | x | x | | missing base ?
17 07 | | | x | x | x | missing base ?
18 08 | | x | | | | missing base
19 09 | | x | | | x | missing base
20 10 | | x | | x | | missing base
21 11 | | x | | x | x | missing base
22 12 | | x | x | | | impossible
23 13 | | x | x | | x | impossible
24 14 | | x | x | x | | impossible
25 15 | | x | x | x | x | impossible
33 23 | x | | x | x | x |
37 27 | x | x | | x | x |
38 28 | x | x | x | | | impossible
39 29 | x | x | x | | x | impossible
40 30 | x | x | x | x | | impossible
41 31 | x | x | x | x | x | impossible
45 char* sc_pointers[100];
48 int main(int argc, char **argv)
53 /* Source address modes */
65 void load_16(char* base)
70 void load_17(int base)
75 void load_18(char* base)
80 void load_19(int base)
85 void load_20_add(char* base, int index)
90 void load_20_shift(char* base, int index)
95 void load_21_add(int base, int index)
97 c = sc[base + 2 * index];
100 void load_21_shift(int base, int index)
102 c = sc[base + 4 * index];
105 void load_22_add(char* base, int index)
107 c = base[2 * index + 1];
110 void load_22_shift(char* base, int index)
112 c = base[4 * index + 1];
115 void load_23_add(int base, int index)
117 c = sc[base + 2 * index + 1];
120 void load_23_shift(int base, int index)
122 c = sc[base + 4 * index + 1];
125 void load_24(char* base, int index)
130 void load_25(int base, int index)
132 c = sc[base + index];
135 void load_26(char* base, int index)
140 void load_27(int base, int index)
142 c = sc[base + index + 1];
145 /* Destination address modes */
147 void store_immediate_01(void)
149 sc_pointers[0] = sc + 42;
152 void store_immediate_03(void)
154 sc_pointers[1] = sc + 42;
157 void store_immediate_16(char** base)
162 void store_immediate_17(int base)
164 sc_pointers[base] = sc + 42;
167 void store_immediate_18(char** base)
172 void store_immediate_19(int base)
174 sc_pointers[base + 1] = sc + 42;
177 void store_immediate_20_add(char** base, int index)
179 base[2 * index] = sc + 42;
182 void store_immediate_20_shift(char** base, int index)
184 base[4 * index] = sc + 42;
187 void store_immediate_21_add(int base, int index)
189 sc_pointers[base + 2 * index] = sc + 42;
192 void store_immediate_21_shift(int base, int index)
194 sc_pointers[base + 4 * index] = sc + 42;
197 void store_immediate_22_add(char** base, int index)
199 base[2 * index + 1] = sc + 42;
202 void store_immediate_22_shift(char** base, int index)
204 base[4 * index + 1] = sc + 42;
207 void store_immediate_23_add(int base, int index)
209 sc_pointers[base + 2 * index + 1] = sc + 42;
212 void store_immediate_23_shift(int base, int index)
214 sc_pointers[base + 4 * index + 1] = sc + 42;
217 void store_immediate_24(char** base, int index)
219 base[index] = sc + 42;
222 void store_immediate_25(int base, int index)
224 sc_pointers[base + index] = sc + 42;
227 void store_immediate_26(char** base, int index)
229 base[index + 1] = sc + 42;
232 void store_immediate_27(int base, int index)
234 sc_pointers[base + index + 1] = sc + 42;