summaryrefslogtreecommitdiff
path: root/02/README.md
diff options
context:
space:
mode:
Diffstat (limited to '02/README.md')
-rw-r--r--02/README.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/02/README.md b/02/README.md
index 1a77e50..d09c7ca 100644
--- a/02/README.md
+++ b/02/README.md
@@ -71,6 +71,7 @@ plus six new ones:
- `--` outputs a label's (absolute) address
- `:-` outputs a label's relative address
- `##` outputs a number
+- `~~` outputs 255 zeros
- `//` is for comments
- `\n\n` does nothing (used for spacing)
@@ -172,6 +173,13 @@ since `0x90` gets inserted between the "load immediate" instruction code and the
`\n\n` works identically, and lets us space out code a bit. But be careful:
the number of blank lines must be a multiple of 3!
+In the middle of the label table, you'll find a mysterious `ff` byte. This is at the position for
+the command `~~` (the end of the command table overlaps with the start of the label table).
+This command is just 255 bytes of zeros. If you defined a label whose position in the label
+table overlaps with these zeros, you'd screw up the command. But fortunately, this will only happen
+if you include `\r` or a non-printing character in your label names.
+This is so that you can have big buffers to put data in (like our label table from this compiler).
+
## limitations
Many of the limitations of our previous compilers apply to this one. Also,