Help
Memory Map
Main memory: 0x0 -> 0x8000
Terminal (default): 0xe000 (write), 0xe001 (read)
System Handlers
0x01: Write arg to console.log
0xf0: Halt the system
Assembler Syntax
- Comments start with ";", these lines are ignored
- Labels start with ":" and must go on their own line. They become variables equal to the
value of the offset of the next instruction.
- Variable references are prefixed with "!", eg "!n" to substitute the variable "n".
This includes labels, jumping to label
foo
is done with
Imm PC !foo
- Macro invocations start with "."
- All other lines must be a valid instruction of the form "Name [X] [Y] [Z]", where X, Y and Z
may be numbers, register names. In a Stack instruction Z must be a Stack Op. In a Test instruction,
Z must be a Test Op. See the repo for more
details.
Virtual Devices
Terminal I/O
- A simple byte-stream I/O device for reading and writing text
- Writing to 0xe000 (default) will print an ascii character in the output area
- Reading from 0xe001 (default) will give the next character from the input, or 0
Monitor
Virtual pixel monitor coming soon
Back