From c4fbe187ab0b125f955d179af02ea616726cb352 Mon Sep 17 00:00:00 2001 From: luminousOwl Date: Mon, 1 Feb 2021 19:12:36 -0500 Subject: [PATCH] Shift mov operator --- adafruit_pioasm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_pioasm.py b/adafruit_pioasm.py index 4545567..96891f9 100644 --- a/adafruit_pioasm.py +++ b/adafruit_pioasm.py @@ -134,7 +134,7 @@ def assemble(text_program): assembled[-1] |= MOV_DESTINATIONS.index(instruction[1]) << 5 assembled[-1] |= MOV_SOURCES.index(instruction[-1]) if len(instruction) > 3: - assembled[-1] |= MOV_OPS.index(instruction[-2]) + assembled[-1] |= MOV_OPS.index(instruction[-2]) << 3 elif instruction[0] == "irq": # instr delay z c w index assembled.append(0b110_00000_0_0_0_00000)