| Op | Mnemonic | Effect |
|---|---|---|
| A | ADD n | A = A + n |
| S | SUB n | A = A − n |
| N | AND n | A = A & n |
| O | ORA n | A = A | n |
| X | EOR n | A = A ^ n |
| C | CMP n | flag set if A ≥ n |
| Op | Mnemonic | Effect |
|---|---|---|
| L | LDA addr | A = RAM[addr] |
| T | STA addr | RAM[addr] = A |
| U | TAX | X = A |
| V | TXA | A = X |
| E | STX | RAM[X] = A |
| D | LDX | A = RAM[X] |
| Op | Mnemonic | Effect |
|---|---|---|
| J | BCS d | skip d ahead if flag set |
| M | SKP d | skip d ahead, always |
| P | JMP n | go to instruction n |
| K | JSR n | call instruction n |
| R | RTS | return |
| W | JMPX | go to instruction X |
| ! | HLT | halt — the accepting state |
A program is ^flag#seed# then instructions, ending !.
flag is f or g; seed is
the 5-bit starting accumulator. Every operand carries a
trailing #.
Directives: .acc n, .flag f|g.
; starts a comment, label: marks an instruction.
BCS and SKP only jump forward, at most 9
instructions. Every loop is a short forward branch to the exit plus a backward
JMP to the top.CMP is ≥, not == — it is the carry
after a compare, as on a 6502. A loop waiting for equality overshoots when the step
does not divide the target.ADD 5 on 30 gives 3.RTS with an empty stack halts, and a jump past the last instruction
halts. Neither faults.