From 65e93275c17c14eea06d495958ed77fe569ce8f1 Mon Sep 17 00:00:00 2001 From: alekseiplusplus Date: Mon, 1 May 2023 14:16:00 +1000 Subject: changed directory structure, and other minor stuff --- docs/interpreter.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'docs/interpreter.md') diff --git a/docs/interpreter.md b/docs/interpreter.md index 54a6c2a..85ab792 100644 --- a/docs/interpreter.md +++ b/docs/interpreter.md @@ -37,7 +37,6 @@ The only case in which this should be avoided is after an M/m command. The interpreter comes with multiple statements for the purpose of debugging the emulator. `Q/q` Quits the program. -Will cause segfault at end of file if not used. `R/r` Resets the virtual computer. @@ -47,11 +46,19 @@ Will cause segfault at end of file if not used. There are two forms which memory can be printed. The first is `sXX` where `XX` is a memory page. The whole page of memory is printed onto the screen. The second is `sXXXX` where `XXXX` is a specific address. This prints out the value of the 1 byte requested. -Be aware that unallocated memory will be dumped if it happens to be accessed with this command. Also be aware that there should be a newline directly after this command. +Be aware that unallocated memory will be dumped if it happens to be accessed with this command. `S/s` Directly set a piece of memory. Syntax is strictly of form `sXXXX.xx` where `XXXX` is the address and `xx` is the value. `/` Prints until newline. -`#` Ignores until newline. \ No newline at end of file +`#` Ignores until newline. + +## Anomalies + +I don't care a whole lot about making this interpreter foolproof since its mostly for my personal debugging use. There are a couple anomalies to look out for if you intend to write programs with it. + +1. After M/m command, a newline is *necessary* or it will have unexpected behavior. +2. Two newlines are necessary after single byte-length instructions or it will segfault. +3. If Q/q is not used at the end of a program, it will segfault. It's inconsequential if it does, but it's important to know. \ No newline at end of file -- cgit v1.2.3