SML is a minimal instruction set for the hypothetical Simpletron computer, used to teach the basics of von Neumann architecture: memory, accumulator, and sequential control flow.
| Opcode | Mnemonic | Description |
|---|---|---|
| 10 | READ | Input → memory location |
| 11 | WRITE | Memory location → output |
| 20 | LOAD | Memory → accumulator |
| 21 | STORE | Accumulator → memory |
| 30 | ADD | Accumulator + memory → accumulator |
| 31 | SUB | Accumulator – memory → accumulator |
| 32 | MUL | Accumulator × memory → accumulator |
| 33 | DIV | Accumulator ÷ memory → accumulator |
| 40 | BRANCH | Unconditional jump to address |
| 41 | BRANCHNEG | Branch if accumulator < 0 |
| 42 | BRANCHZERO | Branch if accumulator = 0 |
| 43 | HALT | Stop execution |
SML strips computing to its essence. Ideal for a first course in computer organization.