Fix wait source encoding
Change the wait instruction encoding to shift the source by 5 bits instead of 4.
This commit is contained in:
parent
25618d8385
commit
e4f2740f40
1 changed files with 1 additions and 1 deletions
|
|
@ -96,7 +96,7 @@ def assemble(text_program):
|
|||
if not 0 <= polarity <= 1:
|
||||
raise RuntimeError("Invalid polarity")
|
||||
assembled[-1] |= polarity << 7
|
||||
assembled[-1] |= WAIT_SOURCES.index(instruction[2]) << 4
|
||||
assembled[-1] |= WAIT_SOURCES.index(instruction[2]) << 5
|
||||
num = int(instruction[3])
|
||||
if not 0 <= num <= 31:
|
||||
raise RuntimeError("Wait num out of range")
|
||||
|
|
|
|||
Loading…
Reference in a new issue