From bbcf033aff4dd3aad3aa0307e1c3843d5a81c184 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 27 Nov 2020 22:44:23 -0800 Subject: 7292 - mu.subx: loosen copy-byte checks a bit Without this there's no way to convert an int to a byte. And that feels too restrictive, and gives up a lot of safe things one might want to do with bytes. (Such as divide a number by 10 and emit the remainder as a byte.) --- mu.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mu.md') diff --git a/mu.md b/mu.md index a990bc0c..0bc63d2b 100644 --- a/mu.md +++ b/mu.md @@ -335,9 +335,9 @@ variables of type 'byte' are only allowed in registers, not on the stack. Here are the possible statements for reading bytes to/from memory: ``` -var/reg <- copy-byte var2/reg2 # var: byte, var2: byte -var/reg <- copy-byte *var2/reg2 # var: byte, var2: (addr byte) -copy-byte-to *var1/reg1, var2/reg2 # var1: (addr byte), var2: byte +var/reg <- copy-byte var2/reg2 # var: byte +var/reg <- copy-byte *var2/reg2 # var: byte +copy-byte-to *var1/reg1, var2/reg2 # var1: (addr byte) ``` In addition, variables of type 'byte' are restricted to (the lowest bytes of) -- cgit 1.4.1-2-gfad0