diff --git a/adafruit_pioasm.py b/adafruit_pioasm.py index dc7591f..f91134b 100644 --- a/adafruit_pioasm.py +++ b/adafruit_pioasm.py @@ -53,13 +53,14 @@ def assemble(text_program): sideset_count = int(line.split()[1]) elif line.endswith(":"): labels[line[:-1]] = len(instructions) - else: + elif line: + # Only add as an instruction if the line isn't empty instructions.append(line) max_delay = 2 ** (5 - sideset_count) - 1 assembled = [] for instruction in instructions: - print(instruction) + # print(instruction) instruction = instruction.split() delay = 0 if instruction[-1].endswith("]"): # Delay @@ -162,6 +163,6 @@ def assemble(text_program): else: raise RuntimeError("Unknown instruction:" + instruction) assembled[-1] |= delay << 8 - print(hex(assembled[-1])) + # print(hex(assembled[-1])) return array.array("H", assembled)