Skip to content

Commit 61c8964

Browse files
authored
Update adafruit_pioasm.py
1 parent f70126c commit 61c8964

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

adafruit_pioasm.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,13 @@ 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: # Only add as an instruction if the line isn't empty
5757
instructions.append(line)
5858

5959
max_delay = 2 ** (5 - sideset_count) - 1
6060
assembled = []
6161
for instruction in instructions:
6262
print(instruction)
63-
if len(instruction) == 0:
64-
continue
6563
instruction = instruction.split()
6664
delay = 0
6765
if instruction[-1].endswith("]"): # Delay

0 commit comments

Comments
 (0)