Restructure code
In anticipation of upcoming change.
This commit is contained in:
parent
4fab60ca5b
commit
4ff7712131
@ -350,10 +350,8 @@ class Program:
|
||||
try:
|
||||
mnemonic, argBits, argoffset = opcodeDict[op]
|
||||
except KeyError:
|
||||
try:
|
||||
if op in streamOpcodeDict:
|
||||
mnemonic, argBits, argoffset = streamOpcodeDict[op]
|
||||
except KeyError:
|
||||
raise tt_instructions_error, "illegal opcode: 0x%.2x" % op
|
||||
pushBytes = pushWords = 0
|
||||
if argBits:
|
||||
if mnemonic == "PUSHB":
|
||||
@ -384,6 +382,8 @@ class Program:
|
||||
value = value - 0x10000
|
||||
assembly.append(`value`)
|
||||
i = i + 2
|
||||
else:
|
||||
raise tt_instructions_error, "illegal opcode: 0x%.2x" % op
|
||||
else:
|
||||
if argBits:
|
||||
assembly.append(mnemonic + "[%s]" % num2binary(op - argoffset, argBits))
|
||||
|
Loading…
x
Reference in New Issue
Block a user