Instruction format
Instructions can be 1 byte (8 bits) or 2 bytes (16 bits) depending on the instruction type. Arguments can be:- Register (
r) - 4-bit register index (0R-15R) - Register pair (
p) - 3-bit register pair index (0P-7P) - Number (
n) - 4-bit immediate value - Address (
a) - 12-bit address for jumps - Condition (
c) - 4-bit condition code
Accumulator operations
Load and exchange
LDM - Load immediate to accumulator
LDM - Load immediate to accumulator
LDM nLoads a 4-bit immediate value into the accumulator.LD - Load register to accumulator
LD - Load register to accumulator
LD rLoads the value from a register into the accumulator.XCH - Exchange accumulator and register
XCH - Exchange accumulator and register
XCH rSwaps the values of the accumulator and a register.Arithmetic
ADD - Add register to accumulator
ADD - Add register to accumulator
ADD rAdds a register to the accumulator with carry. Sets carry flag on overflow.SUB - Subtract register from accumulator
SUB - Subtract register from accumulator
SUB rSubtracts a register from the accumulator with borrow. Sets carry flag.INC - Increment register
INC - Increment register
INC rIncrements a register by 1 (wraps on overflow).IAC - Increment accumulator
IAC - Increment accumulator
IACIncrements the accumulator by 1 (wraps on overflow).DAC - Decrement accumulator
DAC - Decrement accumulator
DACDecrements the accumulator by 1 (wraps on underflow).DAA - Decimal adjust accumulator
DAA - Decimal adjust accumulator
DAAAdjusts accumulator for BCD arithmetic. Adds 6 if accumulator > 9 or carry is set.Logical
CMA - Complement accumulator
CMA - Complement accumulator
CMAInverts all bits in the accumulator (ones’ complement).CLB - Clear both
CLB - Clear both
CLBClears both the accumulator and carry flag to 0.Rotate
RAL - Rotate accumulator left
RAL - Rotate accumulator left
RALRotates accumulator left through carry. Carry becomes bit 0, bit 3 becomes carry.RAR - Rotate accumulator right
RAR - Rotate accumulator right
RARRotates accumulator right through carry. Carry becomes bit 3, bit 0 becomes carry.Register pair operations
FIM - Fetch immediate to register pair
FIM - Fetch immediate to register pair
FIM p nLoads an 8-bit immediate value into a register pair (2 bytes).FIN - Fetch indirect
FIN - Fetch indirect
FIN pFetches value from program memory using register pair 0 as index.SRC - Send register control
SRC - Send register control
SRC pSends a register pair as the address for subsequent memory operations.Jump and call instructions
JUN - Jump unconditional
JUN - Jump unconditional
JUN aUnconditional jump to a 12-bit address (2 bytes).JCN - Jump conditional
JCN - Jump conditional
JCN c aConditional jump to an 8-bit address within the current page (2 bytes).JIN - Jump indirect
JIN - Jump indirect
JIN pJump to address formed by current page and register pair value.JMS - Jump to subroutine
JMS - Jump to subroutine
JMS aPushes return address to stack and jumps to a 12-bit address (2 bytes).BBL - Branch back and load
BBL - Branch back and load
BBL nReturns from subroutine and loads immediate value into accumulator.ISZ - Increment and skip if zero
ISZ - Increment and skip if zero
ISZ r aIncrements a register and jumps if result is NOT zero (2 bytes).Memory operations
Data RAM
WRM - Write data RAM
WRM - Write data RAM
WRMWrites accumulator to data RAM at address set by SRC.RDM - Read data RAM
RDM - Read data RAM
RDMReads data RAM at address set by SRC into accumulator.ADM - Add from memory
ADM - Add from memory
ADMAdds data RAM value at SRC address to accumulator with carry.SBM - Subtract from memory
SBM - Subtract from memory
SBMSubtracts data RAM value at SRC address from accumulator with borrow.Status RAM
WR0, WR1, WR2, WR3 - Write status character
WR0, WR1, WR2, WR3 - Write status character
WR0 | WR1 | WR2 | WR3Writes accumulator to status character 0-3 at address set by SRC.RD0, RD1, RD2, RD3 - Read status character
RD0, RD1, RD2, RD3 - Read status character
RD0 | RD1 | RD2 | RD3Reads status character 0-3 at address set by SRC into accumulator.I/O operations
WRR - Write ROM port
WRR - Write ROM port
WRRWrites accumulator to ROM port specified by SRC address.RDR - Read ROM port
RDR - Read ROM port
RDRReads from ROM port specified by SRC address into accumulator.WMP - Write RAM port
WMP - Write RAM port
WMPWrites accumulator to RAM port.WPM - Write program RAM
WPM - Write program RAM
WPMWrites to program RAM (for self-modifying code).Carry operations
CLC - Clear carry
CLC - Clear carry
CLCClears the carry flag to 0.STC - Set carry
STC - Set carry
STCSets the carry flag to 1.CMC - Complement carry
CMC - Complement carry
CMCInverts the carry flag.TCC - Transmit carry and clear
TCC - Transmit carry and clear
TCCCopies carry flag to accumulator and clears carry.TCS - Transmit carry subtract
TCS - Transmit carry subtract
TCSSets accumulator to 9 if carry=0, or 10 if carry=1, then clears carry.Special operations
NOP - No operation
NOP - No operation
NOPDoes nothing. Used for timing or padding.KBP - Keyboard process
KBP - Keyboard process
KBPConverts accumulator to bit position (0001→1, 0010→2, 0100→3, 1000→4, else→15).DCL - Designate command line
DCL - Designate command line
DCLSelects RAM bank based on lower 3 bits of accumulator.