Většina instrukcí má následující formát
Obrázek 85.3. Formát instrukcí počítače CDC-160
11 10 09 08 07 06 05 04 03 02 01 00 ___________________________________ | | | | | | | | | | | | | |__|__|__|__|__|__|__|__|__|__|__|__| | | | | | Opcode | Mode| Address | | | | | 6-bit F | 6-bit E |
Tabulka 85.5. Tabulka instrukcí CDC-160
opcode | význam | |
---|---|---|
0000 | Immediate Instructions | |
0001 | Immediate Instructions | |
0010 | And | |
0011 | Or | |
0100 | Load | |
0101 | Load Complement | |
0110 | Add | |
0111 | Subtract | |
1000 | Store | |
1001 | Shift and Replace | |
1010 | Add and Replace | |
1011 | Add One and Replace | |
1100 | ||
1101 | ||
1110 | ||
1111 |
Tabulka 85.6. Adresní módy CDC-160
00 | Direct | Přímé adresování nulté stránky paměti. Tedy pamětových buněk na adresách 0 až 63. |
01 | Indirect | |
10 | Forward Relative | |
11 | Backward Relative |
Tabulka 85.7.
Opcode | Mnemonic | Description | |
---|---|---|---|
000 000 000 000 | ERR | Halt | halt the cpu |
000 000 000 ??? | NOP | ||
000 000 000 111 | NOP | ||
000 000 bbb vvv | bank set | b≠0 | |
000 001 000 000 | BLS | ||
000 001 000 001 | PTA | Transmit Program Counter to Accumulator | A ← P |
000 001 000 010 | LS1 | Shift Left | |
000 001 000 011 | LS2 | Shift Left 2 | |
000 001 000 100 | CBC | ||
000 001 000 101 | ATE | ||
000 001 000 110 | ATX | ||
000 001 000 111 | ETA | ||
000 001 001 000 | LS3 | Shift Left 3 | |
000 001 001 001 | LS6 | Shift Left 6 | |
000 001 001 010 | MUT | Multiply by 10 | |
000 001 001 011 | MUH | Multiply by 100 | |
000 001 001 100 | RS1 | ROR A | |
000 001 001 101 | RS2 | ROR A,2 | |
000 001 010 000 | CIL | ||
000 001 011 000 | CTA | ||
000 001 100 xxx | SBU | ||
000 001 101 xxx | STP | ||
000 001 110 xxx | STE | ||
0000 10 | And immediate | A ← A & E | |
0000 11 | Or immediate | A ← A | E | |
0001 00 | Load | A ← E | |
0001 01 | Load Complement | A ← | |
0001 10 | Add immediate | A ← A + E | |
0001 11 | Subtract immediate | A ← A - E | |
110x 00 | Zero Jump | if x=0 then dst=P+E else dst=P-E | |
110x 01 | Non-Zero Jump | if x=0 then dst=P+E else dst=P-E | |
110x 10 | Positive Jump | jump if A is positive | |
110x 11 | Negative Jump | jump if A is negative | |
1110 00 | Jump Indirect | P ← M[E] | |
1110 01 | Jump Forward Indirect | ||
1111 1111 1111 | Error | halt the cpu, same as Halt |
Addressing modes
Tabulka 85.8. Instruction table for CDC 160
mnemonic | opcode | name | addr mode | exec time | comments |
---|---|---|---|---|---|
ERR | 00 | Error | 6.4 | Stop operation | |
HLT | 77 | Halt | 6.4 | ||
SHA | 01 | Shift A | (n) | 6.4 | Shift A depends on value E for its action. Three possibilities are:
|
LPN | 02 | Logical Product | (n) | 6.4 | Form in A the logical product of original contents of A and operand. A ← A && operand |
LPD | 10 | (d) | 12.8 | ||
LPI | 11 | (i) | 19.2 | ||
LPF | 12 | (f) | 12.8 | ||
LPB | 13 | (b) | 12.8 | ||
LSN | 03 | ||||
LSD | 14 | ||||
LSI | 15 | ||||
LSF | 16 | ||||
LSB | 17 | ||||
OUT | 73 | Output | (fi) | 12.8 + n*12.8 | Transmit to selected output device words of information from storage beginning at starting address and continuing up to but not including the termination address. |
OTN | 74 | Output Direct | (n) | 6.4 | Transmit lover 6 bits (E) of this instruction to selected output device. If more than 6 bits are used by output equipment other bits will be zero. |
EXF | 75 | External Function | (f) | 12.8 | Transmit external function code to external equipment. The code is specified by contents of storage location E positions following external function instruction. |
INA | 76 | Input to A | (n) | 6.4 | Read into A one frame of data from selected input device, clearing previous contents of A. |