Operation | Mnemonic | OPR | OPA | Description | Carry | Bytes | Cycles | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
D3 | D2 | D1 | D0 | D3 | D2 | D1 | D0 | ||||||
No operation | NOP | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | PC « PC + 1 | - | 1 | 1 |
No operation. | |||||||||||||
Jump conditionally | JCN | 0 A2 |
0 A2 |
0 A2 |
1 A2 |
C1 A1 |
C2 A1 |
C3 A1 |
C4 A1 |
If Cx, PC « Short Address | - | 2 | 2 |
If the condition exists, load lower 8 bits of program
counter with address. Jump is within same page of ROM. Conditions are: C1 = Invert condition of C2, C3, and C4 C2 = Accumulator is zero C3 = carry/link is true C4 = Test signal is true |
|||||||||||||
Fetch immediate | FIM | 0 D2 |
0 D2 |
1 D2 |
0 D2 |
R D1 |
R D1 |
R D1 |
0 D1 |
Register Pair R « D | - | 2 | 2 |
Load the register pair RRR with D2, D1. | |||||||||||||
Send register control | SRC | 0 | 0 | 1 | 0 | R | R | R | 1 | - | 1 | 1 | |
Send the contents of register pair RRR to the ROMs and RAMs at cycle X2 and X3. | |||||||||||||
Fetch indirect | FIN | 0 | 0 | 1 | 1 | R | R | R | 0 | - | 1 | 2 | |
Load register RRR with the contents of ROM in the currennt page at address pointed to by scratch-pad register pair 0. | |||||||||||||
Jump indirectly | JIN | 0 | 0 | 1 | 1 | R | R | R | 1 | PC « Scratch-Pad Register Pair R | - | 1 | 1 |
Load the program counter with the contents of scratch-pad register designated by RRR in OPA. | |||||||||||||
Jump unconditionally | JUN | 0 A2 |
1 A2 |
0 A2 |
0 A2 |
A3 A1 |
A3 A1 |
A3 A1 |
A3 A1 |
PC « Long Address | - | 2 | 2 |
The 12-bit ROM address A3A2A1 is loaded into the program counter. | |||||||||||||
Jump to subroutine | JMS | 0 A2 |
1 A2 |
0 A2 |
1 A2 |
A3 A1 |
A3 A1 |
A3 A1 |
A3 A1 |
Stack « PC, PC « A3, A2, A1 | - | 2 | 2 |
Store program counter on stack, moving subsequent values down the stack. Load the program counter with long address. | |||||||||||||
Increment | INC | 0 | 1 | 1 | 0 | R | R | R | R | R « R + 1 | ± | 1 | 1 |
Increment register R and set carry if overflow. | |||||||||||||
Increment register, skip jump if zero | ISZ | 0 A2 |
1 A2 |
1 A2 |
1 A2 |
R A1 |
R A1 |
R A1 |
R A1 |
R « R + 1, if R <> 0 then PC « Short Address | - | 2 | 2 |
Increment register RRRR. If the result is not zero then jump to the address A2,1A1. Otherwise, execute next instruction. | |||||||||||||
Add | ADD | 1 | 0 | 0 | 0 | R | R | R | R | R « A + R + C | ± | 1 | 1 |
Add accumulator plus register R plus carry flag. If overflow, set carry flag. | |||||||||||||
Subtract | SUB | 1 | 0 | 0 | 1 | R | R | R | R | R « A - R - C | ± | 1 | 1 |
Subtract from accumulato, register R and carry. If borrow, set carry. | |||||||||||||
Load | LD | 1 | 0 | 1 | 0 | R | R | R | R | A « R | - | 1 | 1 |
Load accumulator with contents of register R. | |||||||||||||
Exchange | XCH | 1 | 0 | 1 | 1 | R | R | R | R | R « A, A « R | - | 1 | 1 |
Exchange the contents of accumulator with register R. | |||||||||||||
Branch back one level | BBL | 1 | 1 | 0 | 0 | D | D | D | D | PC « Stack, A « DDDD | - | 1 | 1 |
Load program counter with address on top of stack, move subsequent values up the stack. | |||||||||||||
Load immidiate | LDM | 1 | 1 | 0 | 1 | D | D | D | D | A « D | - | 1 | 1 |
Load accumulator with immediate data D. |
Operation | Mnemonic | OPR | OPA | Description | Carry | Bytes | Cycles | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
D3 | D2 | D1 | D0 | D3 | D2 | D1 | D0 | ||||||
Write RAM memory | WRM | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | M « A | - | 1 | 1 |
Write accumulator to previously selected RAM character. | |||||||||||||
Write RAM port | WMP | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | ramP « A | - | 1 | 1 |
Write accumulator to preveously selected RAM I/O port. | |||||||||||||
Write ROM port | WRR | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | romP « A | - | 1 | 1 |
Write accumulator to preveously selected ROM I/O port. | |||||||||||||
Write program memory | WPM | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | P « A | - | 1 | 1 |
Write accumulator to previously selected read-write program memory. For use with 4008 and 4009 only. | |||||||||||||
Write status character | WRx | 1 | 1 | 1 | 0 | 0 | 1 | S | S | S « A | - | 1 | 1 |
Write accumulator to status character S of previously selected RAM chip. S = 0 to 3. | |||||||||||||
Subtract with borrow memory | SBM | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | A « A - M - C | ± | 1 | 1 |
Subtract prevoiusly selected RAM character from accumlator with borrow. | |||||||||||||
Read RAM character | RDM | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | A « M | - | 1 | 1 |
Read the previously selected RAM character to accumulator. | |||||||||||||
Read ROM | RDR | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | A « romIO | - | 1 | 1 |
Read the IO port of the previously selected ROM. | |||||||||||||
Add memory with carry | ADM | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | A « A + M | ± | 1 | 1 |
Add the previously selected RAM character to the accumulator wiith carry. | |||||||||||||
Read status character | RDx | 1 | 1 | 1 | 0 | 1 | 1 | S | S | A « S | - | 1 | 1 |
Read the status character from the previously selected RAM chip. S = 0 to 3. |
Operation | Mnemonic | OPR | OPA | Description | Carry | Bytes | Cycles | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
D3 | D2 | D1 | D0 | D3 | D2 | D1 | D0 | ||||||
Clear both | CLB | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | A « 0; C « 0 | 0 | 1 | 1 |
Clear accumlator and carry | |||||||||||||
Clear carry | CLC | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | C « 0 | 0 | 1 | 1 |
Clear carry | |||||||||||||
Increment accumulator | IAC | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | A « A + 1 | ± | 1 | 1 |
Increment accumulator. If overflow, set carry. | |||||||||||||
Complement carry | CMC | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | C « #C | ± | 1 | 1 |
Invert carry. | |||||||||||||
Complement accumulator | CMA | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | A « #A | - | 1 | 1 |
Invert the contents of the accumulator. | |||||||||||||
Roll accumulator left | RAL | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | ± | 1 | 1 | |
Roll bits in accumulator left through carry and carry to LSB of accumulator. | |||||||||||||
Roll accumulator right | RAR | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | ± | 1 | 1 | |
Roll bits in accumulator right through carry and carry to MSB of accumulator. | |||||||||||||
Transmit carry and clear | TCC | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | A « 000C; C « 0 | 0 | 1 | 1 |
Transmit carry to accumulator and clear carry. | |||||||||||||
Decrement accumulator | DAC | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | A « A - 1 | ± | 1 | 1 |
Decrement accumulator. If borrow, set carry. | |||||||||||||
Transfer carry and subtract | TCS | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | A « 10C#C | 0 | 1 | 1 |
Transfer carry to accumulator. Subtract carry from accumulator. Clear carry. | |||||||||||||
Set carry | STC | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | C « 1 | 1 | 1 | 1 |
Set carry. | |||||||||||||
Decimal adjust accumulator | DAA | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | ± | 1 | 1 | |
Decimal adjust accumulator after addition. | |||||||||||||
Keyboard process | KBP | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | - | 1 | 1 | |
Load accumulator with value from following table based on
existing value: A = 0000 then 0000, A = 0001 then 0001, A = 0010 then 0010, A = 0100 then 0011, A = 1000 then 0100, A = Anything else then 1111 |
|||||||||||||
Designate command line | DCL | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | pointer.H « A | - | 1 | 1 |
Designate command line |