File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -53,13 +53,14 @@ def assemble(text_program):
53
53
sideset_count = int (line .split ()[1 ])
54
54
elif line .endswith (":" ):
55
55
labels [line [:- 1 ]] = len (instructions )
56
- else :
56
+ elif line :
57
+ # Only add as an instruction if the line isn't empty
57
58
instructions .append (line )
58
59
59
60
max_delay = 2 ** (5 - sideset_count ) - 1
60
61
assembled = []
61
62
for instruction in instructions :
62
- print (instruction )
63
+ # print(instruction)
63
64
instruction = instruction .split ()
64
65
delay = 0
65
66
if instruction [- 1 ].endswith ("]" ): # Delay
@@ -162,6 +163,6 @@ def assemble(text_program):
162
163
else :
163
164
raise RuntimeError ("Unknown instruction:" + instruction )
164
165
assembled [- 1 ] |= delay << 8
165
- print (hex (assembled [- 1 ]))
166
+ # print(hex(assembled[-1]))
166
167
167
168
return array .array ("H" , assembled )
You can’t perform that action at this time.
0 commit comments