diff options
| author | 2023-02-07 17:30:29 +0000 | |
|---|---|---|
| committer | 2023-02-07 17:30:29 +0000 | |
| commit | 972a8ac8f107d8529ed2cccf62e672ef965bb5ed (patch) | |
| tree | 89ebf597f969ea458d843127733049403322278f /creole_asm.py | |
| parent | assembler: refactor and start tests (diff) | |
more asm test
Diffstat (limited to 'creole_asm.py')
| -rw-r--r-- | creole_asm.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/creole_asm.py b/creole_asm.py index 8f7ab22..8e87b58 100644 --- a/creole_asm.py +++ b/creole_asm.py @@ -130,10 +130,11 @@ class Line: def __call__(self): b = bytes([self.opcode]) for a in self.args: + l = 2 if a[1] < 0x80 else None if a[0] == ArgType.REG: - b = b + encode_pseudo_utf8(a[1],1,None) + b = b + encode_pseudo_utf8(a[1],1,l) else: - b = b + encode_pseudo_utf8(a[1],0,None) + b = b + encode_pseudo_utf8(a[1],0,l) return b + bytes([0]) class InstructionNotFoundException(Exception): |
