From e089e82e26a43e630db3cfa36e3cf5f5202eb919 Mon Sep 17 00:00:00 2001 From: luminousOwl Date: Sat, 30 Jan 2021 12:16:48 -0500 Subject: [PATCH] Fix pull instruction parsing --- adafruit_pioasm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_pioasm.py b/adafruit_pioasm.py index dc7591f..4545567 100644 --- a/adafruit_pioasm.py +++ b/adafruit_pioasm.py @@ -126,7 +126,7 @@ def assemble(text_program): assembled[-1] |= 0x80 if instruction[-1] == "block" or not instruction[-1].endswith("block"): assembled[-1] |= 0x20 - if instruction[1] in ("ifempty", "iffull"): + if len(instruction) > 1 and instruction[1] in ("ifempty", "iffull"): assembled[-1] |= 0x40 elif instruction[0] == "mov": # instr delay dst op src