Instruction set
Tomato ISA
Nine opcode bits index a 512-row control ROM. 91 instructions plus NOP occupy 92 burned rows. The rest stay open as the map grows.
01 / ROM
The whole opcode space.
Every cell is one ROM address. Filled cells jump to the burned opcode below. Empty cells are honest spare—ready for the path to 512.
92 burned · 420 open · 512 ROM rows
BurnedOpen · grows toward 512
02 / BURNED
The 91 instructions plus NOP.
Every burn below is a real ROM row from tomato.v1.csv. Spacing stays even so new burns can land without redesigning the sheet.
System
50x00NOPreg_regno operation
idle / padding
0xE0FENCEreg_regordering nop
0xE1ECALLreg_regtrap 0x100
0xE2EBREAKreg_reghalt (debug)
0xFFHALTreg_reghalt
ALU · register
480x01ADDreg_regADD
arith
0x02SUBreg_regSUB
arith
0x03ANDreg_regAND
logic
0x04ORreg_regOR
logic
0x05XORreg_regXOR
logic
0x06MOVreg_regMOV
copy
0x07CMPreg_regflags = rA - rB
branches
0x08MASKADDreg_regrd = rA + (rB & rC)
compound three-input ALU
0x09XORANDreg_regrd = (rA ^ rB ^ rC) + (rA & rB & rC)
compound three-input ALU
0x0AANDNreg_regrd = rA & ~rB
masked two-input ALU
0x0BORNreg_regrd = rA | ~rB
masked two-input ALU
0x0CCSELreg_regrd = rC ? rA : rB
compound three-input ALU
0x0DANDADDreg_regrd = (rA & rB) + rC
compound three-input ALU
0x0EORADDreg_regrd = (rA | rB) + rC
compound three-input ALU
0x0FXORADDreg_regrd = (rA ^ rB) + rC
compound three-input ALU
0x17ADCreg_regrd = rA + rB + C
carry / reverse subtract
0x18SBCreg_regrd = rA - rB + C_in
carry / reverse subtract
0x19RSBreg_regrd = rB - rA
carry / reverse subtract
0x1AXORBCreg_regrd = rA ^ (rB & rC)
nested Boolean Dual-LUT
0x1BXORBOreg_regrd = rA ^ (rB | rC)
nested Boolean Dual-LUT
0x1CXORBXreg_regrd = rA ^ (rB ^ rC)
nested Boolean Dual-LUT
0x1DANDBOreg_regrd = rA & (rB | rC)
nested Boolean Dual-LUT
0x1EANDBXreg_regrd = rA & (rB ^ rC)
nested Boolean Dual-LUT
0x1FANDBCreg_regrd = rA & (rB & rC)
nested Boolean Dual-LUT
0x25ORBCreg_regrd = rA | (rB & rC)
nested Boolean Dual-LUT
0x26ORBOreg_regrd = rA | (rB | rC)
nested Boolean Dual-LUT
0x27ORBXreg_regrd = rA | (rB ^ rC)
nested Boolean Dual-LUT
0x28NANDANDreg_regrd = ~(rA & (rB & rC))
nested Boolean Dual-LUT
0x2ANANDORreg_regrd = ~(rA & (rB | rC))
nested Boolean Dual-LUT
0x2BNANDXORreg_regrd = ~(rA & (rB ^ rC))
nested Boolean Dual-LUT
0x2CNANDNANDreg_regrd = ~(rA & ~(rB & rC))
nested Boolean Dual-LUT
0x2DNANDNORreg_regrd = ~(rA & ~(rB | rC))
nested Boolean Dual-LUT
0x2ENANDXNORreg_regrd = ~(rA & ~(rB ^ rC))
nested Boolean Dual-LUT
0x2FNORANDreg_regrd = ~(rA | (rB & rC))
nested Boolean Dual-LUT
0x32NORORreg_regrd = ~(rA | (rB | rC))
nested Boolean Dual-LUT
0x33NORXORreg_regrd = ~(rA | (rB ^ rC))
nested Boolean Dual-LUT
0x34NORNANDreg_regrd = ~(rA | ~(rB & rC))
nested Boolean Dual-LUT
0x35NORNORreg_regrd = ~(rA | ~(rB | rC))
nested Boolean Dual-LUT
0x36NORXNORreg_regrd = ~(rA | ~(rB ^ rC))
nested Boolean Dual-LUT
0x37ANDNANDreg_regrd = rA & ~(rB & rC)
nested Boolean Dual-LUT
0x38ANDNORreg_regrd = rA & ~(rB | rC)
nested Boolean Dual-LUT
0x39ANDXNORreg_regrd = rA & ~(rB ^ rC)
nested Boolean Dual-LUT
0x3AORNANDreg_regrd = rA | ~(rB & rC)
nested Boolean Dual-LUT
0x3BORNORreg_regrd = rA | ~(rB | rC)
nested Boolean Dual-LUT
0x3CORXNORreg_regrd = rA | ~(rB ^ rC)
nested Boolean Dual-LUT
0x3DXORNANDreg_regrd = rA ^ ~(rB & rC)
nested Boolean Dual-LUT
0x3EXORNORreg_regrd = rA ^ ~(rB | rC)
nested Boolean Dual-LUT
0x3FXORXNORreg_regrd = rA ^ ~(rB ^ rC)
nested Boolean Dual-LUT
Multiply / divide
70x10MULreg_regrd = low(rA*rB)
0x11MULHreg_regrd = high(rA*rB)
0x12DIVreg_regrd = rA / rB
0x13REMreg_regrd = rA % rB
0x14MULHUreg_regrd = high unsigned
0x15DIVUreg_regrd = rA / rB unsigned
0x16REMUreg_regrd = rA % rB unsigned
ALU · immediate
80x20ADDIoff13srd = rA + imm13
constants
0x21ANDIimm16zrd = rA & imm
0x22ORIimm16zrd = rA | imm
0x23XORIimm16zrd = rA ^ imm
0x24LUIimm20rd = imm20 << 12
VGA/MMIO base
0x29RORIreg_regrd = rA ror imm
0x30ZEROreg_regrd = 0
0x31ONEreg_regrd = 1
Shift / rotate
40x40LSLreg_regLSL
0x41LSRreg_regLSR
0x42ASRreg_regASR
0x43RORreg_regROR
Memory
70x60LWreg_regLW
0x61LBreg_regLB
0x62LHreg_regLH
0x63LBUreg_regLBU
0x64LHUreg_regLHU
0x68SWreg_regSW
0x69SBreg_regSB
Branch
40x80BEQreg_regBEQ
0x81BNEreg_regBNE
0x82BLTreg_regBLT
0x83BGEreg_regBGE
Jump
50xA0JMPreg_regPC = abs
0xA1JALreg_reglink; PC=abs
0xA2RETreg_regPC = link
0xA3JRreg_regPC = rB
0xA4JALRreg_regrd=PC+1; PC=alu
Stack / I/O
40xC0PUSHreg_regSP-=; mem[SP]=rA
0xC1POPreg_regrd=mem[SP]; SP+=
0xC8INreg_regrd = kb_data
0xC9OUTreg_regio_out = rA[7:0]
03 / WORKFLOW
How you use it
- Burn an opcode in tomato.v1.csv. Empty rows stay nop—not fake mnemonics.
- Assemble with software/assembler.py. Mnemonics come from the CSV.
- Add sugar in tomato.v1.pseudo.csv when you want CALL, BEQZ, or LI without growing the ROM.
- Map another ISA as rows in profiles/—overlay bits, immediate encoding, LUT pair—not new microcode.
Native form is opcode rd, rA, rB, rC where the ALU computes rd = f(a,b,c) + g(a,b,c) + cin. Rebuild this page after CSV changes: npm run build-isa.
04 / AUTHORITY
Source files
| File | When you touch it |
|---|---|
| tomato.v1.csv | Add or rename a burned opcode |
| tomato.v1.pseudo.csv | Assembler macros over existing burns |
| lut.csv | ALU primitives · hardware reference |
| profiles/ | Foreign ISA maps onto these burns |
A profile map is not proof of binary compatibility. Decode, exceptions, and memory behavior still matter. Full argument
From the build
The work behind the words.

The modular control design documented in the build journal.

Tetris in Tomato OS, written for the custom instruction set.