aboutsummaryrefslogtreecommitdiffstats
path: root/creole_asm.py
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2023-02-07 17:30:29 +0000
committerGravatar Peter McGoron 2023-02-07 17:30:29 +0000
commit972a8ac8f107d8529ed2cccf62e672ef965bb5ed (patch)
tree89ebf597f969ea458d843127733049403322278f /creole_asm.py
parentassembler: refactor and start tests (diff)
more asm test
Diffstat (limited to 'creole_asm.py')
-rw-r--r--creole_asm.py5
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):
d>-88/+102 2021-07-26errorsGravatar John Cowan 1-1/+4 2021-07-26more MN-W reviewGravatar John Cowan 1-5/+5 2021-07-26update preview linkGravatar John Cowan 1-1/+1 2021-07-26MN-W reviewGravatar John Cowan 1-6/+6 2021-07-26paired mutatorsGravatar John Cowan 1-43/+68 2021-07-25exceptionsGravatar John Cowan 1-1/+15 2021-07-25new exampleGravatar John Cowan 1-1/+4 2021-07-25updatesGravatar John Cowan 1-2/+4 2021-07-24dtd always first argumentGravatar John Cowan 1-9/+9 2021-07-23DTO to DTDGravatar John Cowan 1-55/+52 2021-07-22typoGravatar John Cowan 1-1/+1 2021-07-22switching to explicit dtosGravatar John Cowan 1-88/+102 2021-07-22errorsGravatar John Cowan 1-1/+4 2021-07-22more MN-W reviewGravatar John Cowan 1-5/+5 2021-07-20update preview linkGravatar John Cowan 1-1/+1 2021-07-20MN-W reviewGravatar John Cowan 1-6/+6 2021-07-18Fix typo.Gravatar Arthur A. Gleckler 2-4/+4 2021-07-18Add <p> around abstract.Gravatar Arthur A. Gleckler 1-2/+2 2021-07-18Publish first draft.draft-1Gravatar Arthur A. Gleckler 3-0/+114 2021-07-18Ignore trailing whitespace.Gravatar Arthur A. Gleckler 11-129/+129 2021-07-18Ignore "Dictionaries.log".Gravatar Arthur A. Gleckler 1-1/+2 2021-07-18Fix errors reported by W3C HTML Validator.Gravatar Arthur A. Gleckler 1-27/+27 2021-07-18Eliminate unnecessary redirect by using TLS/SSL.Gravatar Arthur A. Gleckler 1-1/+1