diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-11-27 22:44:23 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-11-27 22:44:23 -0800 |
commit | bbcf033aff4dd3aad3aa0307e1c3843d5a81c184 (patch) | |
tree | 5861f95f95c555d260f780edadac1eacb84bd165 /mu.md | |
parent | bcd2adfbf333987e03846b99204d3fd5031ddd93 (diff) | |
download | mu-bbcf033aff4dd3aad3aa0307e1c3843d5a81c184.tar.gz |
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.)
Diffstat (limited to 'mu.md')
-rw-r--r-- | mu.md | 6 |
1 files changed, 3 insertions, 3 deletions
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) |