Skip to content

Commit 32cd5d4

Browse files
committed
Filled the list of Zeus Z80 assembler tokens
1 parent 57c3305 commit 32cd5d4

File tree

2 files changed

+72
-4
lines changed

2 files changed

+72
-4
lines changed

test/test_zeus2txt.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
# vim: set fileencoding=utf-8 :
33
""" zeus2txt.py tests """
44

5-
import os
65
import io
7-
import unittest
6+
import os
87
import tempfile
8+
import unittest
99
from collections import namedtuple
10+
1011
from zxtools import zeus2txt
1112

1213

@@ -23,7 +24,7 @@ def test_convert(self):
2324
# temp_output_file = open(temp_output_path, "rb")
2425
temp_output_file.seek(0, os.SEEK_END)
2526
try:
26-
self.assertEqual(temp_output_file.tell(), 3301)
27+
self.assertEqual(temp_output_file.tell(), 3302)
2728
finally:
2829
temp_output_file.close()
2930
os.remove(temp_output_path)

zxtools/zeus2txt.py

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,104 @@ def read_file(src_file):
2626

2727
ASM_META = {
2828
128: "A",
29+
129: "ADC ",
2930
130: "ADD ",
31+
131: "AF'",
32+
132: "AF",
33+
133: "AND ",
3034
134: "B",
3135
135: "BC",
36+
136: "BIT ",
37+
137: "C",
3238
138: "CALL ",
39+
139: "CCF",
3340
140: "CP ",
41+
141: "CPD",
42+
142: "CPDR",
43+
143: "CPI",
44+
144: "CPIR",
45+
145: "CPL",
3446
146: "D",
47+
147: "DAA",
3548
148: "DE",
3649
149: "DEC ",
3750
150: "DEFB ",
3851
151: "DEFM ",
52+
152: "DEFS ",
3953
153: "DEFW ",
54+
154: "DI",
55+
155: "DISP ",
4056
156: "DJNZ ",
4157
157: "E",
58+
158: "EI",
59+
159: "ENT",
4260
160: "EQU ",
4361
161: "EX ",
62+
162: "EXX",
4463
163: "H",
64+
164: "HALT",
4565
165: "HL",
66+
166: "I",
67+
167: "IM ",
68+
168: "IN ",
4669
169: "INC ",
70+
170: "IND",
71+
171: "INDR",
72+
172: "INI",
73+
173: "INIR",
74+
174: "IX",
75+
175: "IY",
4776
176: "JP ",
4877
177: "JR ",
78+
178: "L",
4979
179: "LD ",
80+
180: "LDD",
81+
181: "LDDR",
82+
182: "LDI",
5083
183: "LDIR",
84+
184: "M",
85+
185: "NC",
86+
186: "NEG",
5187
187: "NOP",
88+
188: "NV",
5289
189: "NZ",
5390
190: "OR ",
5491
191: "ORG ",
55-
194: "OUT",
92+
192: "OTDR",
93+
193: "OTIR",
94+
194: "OUT ",
95+
195: "OUTD",
96+
196: "OUTI",
97+
197: "P",
98+
198: "PE",
99+
199: "PO",
56100
200: "POP ",
57101
201: "PUSH ",
102+
202: "R",
103+
203: "RES ",
58104
204: "RET",
105+
205: "RETI",
106+
206: "RETN",
107+
207: "RL ",
108+
208: "RLA",
109+
209: "RLC ",
59110
210: "RLCA",
111+
211: "RLD",
112+
212: "RR ",
113+
213: "RRA",
114+
214: "RRC ",
115+
215: "RRCA",
116+
216: "RRD",
117+
217: "RST ",
118+
218: "SBC ",
119+
219: "SCF",
120+
220: "SET ",
121+
221: "SLA ",
122+
222: "SP",
123+
223: "SRA ",
124+
224: "SRL ",
125+
225: "SUB ",
126+
226: "V",
60127
227: "XOR ",
61128
228: "Z"
62129
}

0 commit comments

Comments
 (0)