From a08fef645e4b2504d7c2109946c90e63ca91b731 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sun, 27 Feb 2022 15:31:02 -0500 Subject: cleaned up comments --- 02/README.md | 3 +++ 02/in01 | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to '02') diff --git a/02/README.md b/02/README.md index 9ba5063..1854baa 100644 --- a/02/README.md +++ b/02/README.md @@ -157,6 +157,9 @@ Numbers cannot appear at the end of a line (this made the compiler simpler to write), so I'm adding a `.` at the end of each one to avoid making that mistake. +The code for `cmp rax, rbx` is now included in all conditional jump instructions +(I kept forgetting to put `cm` before conditional jumps when writing this compiler). + Anything after a command is treated as a comment; additionally `//` can be used for comments on their own lines. I decided to implement this as simply as possible: diff --git a/02/in01 b/02/in01 index 58fcc28..0dfacd8 100644 --- a/02/in01 +++ b/02/in01 @@ -42,7 +42,7 @@ the segment we're loading in includes the ELF header at address 0x400000, so we ;im;01;00;00;00;00;00;00;00 write ;sy --- read command (0x400174) -- +-- read a command (0x400174) -- ;im;03;00;00;00;00;00;00;00 input file descriptor ;JA ;im;88;00;40;00;00;00;00;00 where to read to @@ -184,7 +184,7 @@ okay we now have a digit in rbx ;AR ;