-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrom.mem
316 lines (316 loc) · 10.6 KB
/
rom.mem
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
// memory data file (do not edit the following line - required for mem load use)
// instance=/rom/rom
// format=mti addressradix=d dataradix=b version=1.0 wordsperline=1
// Fetch & decode micro-instructions:
0: 0000010001000000010000010010000000
1: 0000111000000000000000000001000000
2: 0000010000000000010110000000000000
3: 0000000000000000000000000000000001
// source fetch micro-instructions:
// - direct mode
512: 0000010000001001010000000000000000
513: 0000000000000000000000000000000001
// - Auto-increment
520: 0000010001001000010000010000000000
521: 0000111000000100000000000000000000
522: 0000010000000001010010000000000000
523: 0000000000000000000000000000000001
// - Auto-decrement
528: 0011010001001000010000010000000000
529: 0011011000000100000000000000000000
530: 0000010000000001010010000000000000
531: 0000000000000000000000000000000001
// - Indexed
536: 0000010001000000010000010010000000
537: 0000111000001000010000000001000000
538: 0001010001000000000010010000000000
539: 0000001000000000000000000000000000
540: 0000010000000001010010000000000000
541: 0000000000000000000000000000000001
// - Register mode Indirect
544: 0000010001001000010000010000000000
545: 0000001000000000000000000000000000
546: 0000010000000001010010000000000000
547: 0000000000000000000000000000000001
// - Auto-increment Indirect
552: 0000010001001000010000010000000000
553: 0000111000000100000000000000000000
554: 0000010001000000010010010000000000
555: 0000001000000000000000000000000000
556: 0000010000000001010010000000000000
557: 0000000000000000000000000000000001
// - Auto-decrement Indirect
560: 0011010001001000010000010000000000
561: 0011011000000100000000000000000000
562: 0000010001000000010010010000000000
563: 0000001000000000000000000000000000
564: 0000010000000001010010000000000000
565: 0000000000000000000000000000000001
// - Indexed Indirect
568: 0000010001000000010000010010000000
569: 0000111000001000010000000001000000
570: 0001010001000000000010010000000000
571: 0000001000000000000000000000000000
572: 0000011000000000010010010000000000
573: 0000010000000001010010000000000000
574: 0000000000000000000000000000000001
// destination fetch micro-instructions:
// - direct mode
1024: 0000010000100000010000000000000000
1025: 0000000000000000000000000000000001
// - Auto-increment
1032: 0000010001100000010000010000000000
1033: 0000111000010000000000000000000000
1034: 0000000000000000010010000000000000
1035: 0000000000000000000000000000000001
// - Auto-decrement
1040: 0011010001100000010000010000000000
1041: 0011011000010000000000000000000000
1042: 0000000000000000010010000000000000
1043: 0000000000000000000000000000000001
// - Indexed
1048: 0000010001000000010000010010000000
1049: 0000111000100000010000000001000000
1050: 0001010001000000000010010000000000
1051: 0000001000000000000000000000000000
1052: 0000000000000000010010000000000000
1053: 0000000000000000000000000000000001
// - Register mode Indirect
1056: 0000010001100000010000010000000000
1057: 0000001000000000000000000000000000
1058: 0000000000000000010010000000000000
1059: 0000000000000000000000000000000001
// - Auto-increment Indirect
1064: 0000010001100000010000010000000000
1065: 0000111000010000000000000000000000
1066: 0000010001000000010010010000000000
1067: 0000001000000000000000000000000000
1068: 0000000000000000010010000000000000
1069: 0000000000000000000000000000000001
// - Auto-decrement Indirect
1072: 0011010001100000010000010000000000
1073: 0011011000010000000000000000000000
1074: 0000010001000000010010010000000000
1075: 0000001000000000000000000000000000
1076: 0000000000000000010010000000000000
1077: 0000000000000000000000000000000001
// - Indexed Indirect
1080: 0000010001000000010000010010000000
1081: 0000111000100000010000000001000000
1082: 0001010001000000000010010000000000
1083: 0000001000000000000000000000000000
1084: 0000011000000000010010010000000000
1085: 0000000000000000010010000000000000
1086: 0000000000000000000000000000000001
// Two operands operations and save micro-instructions:
// - MOV
// - memory
1664: 0000010010000010010001000000100000
1665: 0000001100000000000000000000000000
1666: 0000000000000000000000000000000001
// - register
1668: 0000010100010010010000000000100000
1669: 0000000000000000000000000000000001
// - ADD
// - memory
1672: 0001010010000010000001000000100000
1673: 0000001100000000000000000000000000
1674: 0000000000000000000000000000000001
// - register
1676: 0001010100010010000000000000100000
1677: 0000000000000000000000000000000001
// - ADC
// - memory
1680: 0001000010000010000001000000100000
1681: 0000001100000000000000000000000000
1682: 0000000000000000000000000000000001
// - register
1684: 0001000100010010000000000000100000
1685: 0000000000000000000000000000000001
// - SUB
// - memory
1688: 0010110010000010000001000000100000
1689: 0000001100000000000000000000000000
1690: 0000000000000000000000000000000001
// - register
1692: 0010110100010010000000000000100000
1693: 0000000000000000000000000000000001
// - SBC
// - memory
1696: 0010000010000010000001000000100000
1697: 0000001100000000000000000000000000
1698: 0000000000000000000000000000000001
// - register
1700: 0010000100010010000000000000100000
1701: 0000000000000000000000000000000001
// - AND
// - memory
1704: 0100000010000010000001000000100000
1705: 0000001100000000000000000000000000
1706: 0000000000000000000000000000000001
// - register
1708: 0100000100010010000000000000100000
1709: 0000000000000000000000000000000001
// - OR
// - memory
1712: 0101000010000010000001000000100000
1713: 0000001100000000000000000000000000
1714: 0000000000000000000000000000000001
// - register
1716: 0101000100010010000000000000100000
1717: 0000000000000000000000000000000001
// - XNOR
// - memory
1720: 0110000010000010000001000000100000
1721: 0000001100000000000000000000000000
1722: 0000000000000000000000000000000001
// - register
1724: 0110000100010010000000000000100000
1725: 0000000000000000000000000000000001
// - CMP
// -memory
1728: 0010110100000010000000000000100000
1729: 0000000000000000000000000000000001
// -register
1732: 0010110100000010000000000000100000
1733: 0000000000000000000000000000000001
// One operand operations and save micro-instructions:
// INC
// -memory
1792: 0000110010000000000001000000100000
1793: 0000001100000000000000000000000000
1794: 0000000000000000000000000000000001
// -register
1796: 0000110100010000000000000000100000
1797: 0000000000000000000000000000000001
// DEC
// -memory
1800: 0011010010000000000001000000100000
1801: 0000001100000000000000000000000000
1802: 0000000000000000000000000000000001
// -register
1804: 0011010100010000000000000000100000
1805: 0000000000000000000000000000000001
// CLR
// - memory
1808: 1111000010000000000001000000100000
1809: 0000001100000000000000000000000000
1810: 0000000000000000000000000000000001
// - register
1812: 1111000100010000000000000000100000
1813: 0000000000000000000000000000000001
// INV
// - memory
1816: 0111000010000000000001000000100000
1817: 0000001100000000000000000000000000
1818: 0000000000000000000000000000000001
// - register
1820: 0111000100010000000000000000100000
1821: 0000000000000000000000000000000001
// LSR
// - memory
1824: 1000000010000000000001000000100000
1825: 0000001100000000000000000000000000
1826: 0000000000000000000000000000000001
// - register
1828: 1000000100010000000000000000100000
1829: 0000000000000000000000000000000001
// ROR
// - memory
1832: 1001000010000000000001000000100000
1833: 0000001100000000000000000000000000
1834: 0000000000000000000000000000000001
// - register
1836: 1001000100010000000000000000100000
1837: 0000000000000000000000000000000001
// RRC
// - memory
1840: 1010000010000000000001000000100000
1841: 0000001100000000000000000000000000
1842: 0000000000000000000000000000000001
// - register
1844: 1010000100010000000000000000100000
1845: 0000000000000000000000000000000001
// ASR
// - memory
1848: 1011000010000000000001000000100000
1849: 0000001100000000000000000000000000
1850: 0000000000000000000000000000000001
// - register
1852: 1011000100010000000000000000100000
1853: 0000000000000000000000000000000001
// LSL
// - memory
1856: 1100000010000000000001000000100000
1857: 0000001100000000000000000000000000
1858: 0000000000000000000000000000000001
// - register
1860: 1100000100010000000000000000100000
1861: 0000000000000000000000000000000001
// ROL
// - memory
1864: 1101000010000000000001000000100000
1865: 0000001100000000000000000000000000
1866: 0000000000000000000000000000000001
// - register
1868: 1101000100010000000000000000100000
1869: 0000000000000000000000000000000001
// RLC
// - memory
1872: 1110000010000000000001000000100000
1873: 0000001100000000000000000000000000
1874: 0000000000000000000000000000000001
// - register
1876: 1110000100010000000000000000100000
1877: 0000000000000000000000000000000001
// Branch instructions:
// BR
1920: 0000000000000000010000000010000000
1921: 0001010100000000001000000001000000
1922: 0000000000000000000000000000000001
1924: 0000000100000000000000000000000000
1925: 0000000000000000000000000000000001
// BEQ
1928: 0000000000000000010000000010000010
1929: 0001010100000000001000000001000000
1930: 0000000000000000000000000000000001
1932: 0000000100000000000000000000000000
1933: 0000000000000000000000000000000001
// BNE
1936: 0000000000000000010000000010000110
1937: 0001010100000000001000000001000000
1938: 0000000000000000000000000000000001
1940: 0000000100000000000000000000000000
1941: 0000000000000000000000000000000001
// BLO
1944: 0000000000000000010000000010011000
1945: 0001010100000000001000000001000000
1946: 0000000000000000000000000000000001
1948: 0000000100000000000000000000000000
1949: 0000000000000000000000000000000001
// BLS
1952: 0000000000000000010000000010011010
1953: 0001010100000000001000000001000000
1954: 0000000000000000000000000000000001
1956: 0000000100000000000000000000000000
1957: 0000000000000000000000000000000001
// BHI
1960: 0000000000000000010000000010001000
1961: 0001010100000000001000000001000000
1962: 0000000000000000000000000000000001
1964: 0000000100000000000000000000000000
1965: 0000000000000000000000000000000001
// BHS
1968: 0000000000000000010000000010001010
1969: 0001010100000000001000000001000000
1970: 0000000000000000000000000000000001
1972: 0000000100000000000000000000000000
1973: 0000000000000000000000000000000001
// No operand instructions:
//HLT
1536: 0000000000000000010000000010000000
1537: 0011010100000000000000000001000000
1538: 0000000000000000000000000000000001
// NOP
1544: 0000000100000000000000000000000000
1545: 0000000000000000000000000000000001