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):
5353 sideset_count = int (line .split ()[1 ])
5454 elif line .endswith (":" ):
5555 labels [line [:- 1 ]] = len (instructions )
56- else :
56+ elif line :
57+ # Only add as an instruction if the line isn't empty
5758 instructions .append (line )
5859
5960 max_delay = 2 ** (5 - sideset_count ) - 1
6061 assembled = []
6162 for instruction in instructions :
62- print (instruction )
63+ # print(instruction)
6364 instruction = instruction .split ()
6465 delay = 0
6566 if instruction [- 1 ].endswith ("]" ): # Delay
@@ -162,6 +163,6 @@ def assemble(text_program):
162163 else :
163164 raise RuntimeError ("Unknown instruction:" + instruction )
164165 assembled [- 1 ] |= delay << 8
165- print (hex (assembled [- 1 ]))
166+ # print(hex(assembled[-1]))
166167
167168 return array .array ("H" , assembled )
You can’t perform that action at this time.
0 commit comments