Memory Dump
Assembly code

Virtual machine/emulator based on architecture of CARDboard Illustrative Aid to Computation

Instruction format

label: operation argument

Instruction set

Instruction Description
Standart instruction set
Data access
CLA xx Read memory at address xx into accumulator
STO xx Write accumulator contents to memory at address xx
LDI xx Read memory at address stored in xx into accumulator
STI xx Write accumulator contents to memory at address stored in xx
Arithmetic
ADD xx Add contents of memory at address xx to accumulator
SUB xx Subtract contents of memory at address xx from accumulator
SFT xy Shift accumulator contents x times left and y times right
Control flow
JMP xx Saves program counter to memory cell 99 and jumps to address xx
TAS xx Jumps to address xx if accumulator sign is -1
TAZ xx Jumps to address xx if accumulator is 0
JI Jumps to address stored in xx
HRS xx Stops evaluation and sets program counter to xx
I/O
INP xx Read user input to memory at address xx
OUT xx Writes content of memory at address xx
Additional assembler macros
ORG xx Following code will be put to memory starting from location xx
SET xxx Puts constant to accumulator (expands to 3 instructions)
RET Jump to saved return address (cleans accumulator)

Implementation details

For compatibility purposes memory cell 0 contains value 001, but instead of bootstrapping, assembled program is directly written to "memory" starting from address 1.