85.2.2. Instrukční sada

85.2.2.1.
85.2.2.2. Podprogramy

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

opcodevýznam 
0000Immediate Instructions 
0001Immediate Instructions 
0010And 
0011Or 
0100Load 
0101Load Complement 
0110Add 
0111Subtract 
1000Store 
1001Shift and Replace 
1010Add and Replace 
1011Add One and Replace 
1100  
1101  
1110  
1111  

Tabulka 85.6. Adresní módy CDC-160

   
00DirectPřímé adresování nulté stránky paměti. Tedy pamětových buněk na adresách 0 až 63.
01Indirect 
10Forward Relative 
11Backward Relative 

Tabulka 85.7.

OpcodeMnemonicDescription 
000 000 000 000ERRHalthalt the cpu
000 000 000 ???NOP  
000 000 000 111NOP  
000 000 bbb vvv bank setb≠0
000 001 000 000BLS  
000 001 000 001PTATransmit Program Counter to AccumulatorA ← P
000 001 000 010LS1Shift Left 
000 001 000 011LS2Shift Left 2 
000 001 000 100CBC  
000 001 000 101ATE  
000 001 000 110ATX  
000 001 000 111ETA  
000 001 001 000LS3Shift Left 3 
000 001 001 001LS6Shift Left 6 
000 001 001 010MUTMultiply by 10 
000 001 001 011MUHMultiply by 100 
000 001 001 100RS1ROR A 
000 001 001 101RS2ROR A,2 
000 001 010 000CIL  
000 001 011 000CTA  
000 001 100 xxxSBU  
000 001 101 xxxSTP  
000 001 110 xxxSTE  
0000 10 And immediateA ← A & E
0000 11 Or immediateA ← A | E
0001 00 LoadA ← E
0001 01 Load ComplementA ←
0001 10 Add immediateA ← A + E
0001 11 Subtract immediateA ← A - E
110x 00 Zero Jumpif x=0 then dst=P+E else dst=P-E
110x 01 Non-Zero Jumpif x=0 then dst=P+E else dst=P-E
110x 10 Positive Jumpjump if A is positive
110x 11 Negative Jumpjump if A is negative
1110 00 Jump IndirectP ← M[E]
1110 01 Jump Forward Indirect 
1111 1111 1111 Errorhalt the cpu, same as Halt

Addressing modes

No Address (n)
E is used as the lower 6 bits of a 12-bit operand, the upper 6 bits being zeros. No storage reference is made.
Direct Address (d)
E is used to address one of the first 64 storage locations from which a 12-bit operand is obtained.
Indirect Address (i)
E is used to address one of the first 64 storage locations. The 12-bit contents of that location represent another address within storage. This latter address contains the 12-bit operand to be used by the instruction.
Relative Address Forward (f)
E is added to the contents of P. The sum specifies a new address where the operand to be used by the current instruction will be found.
Relative Address Backward (b)
E is subtracted from the contents of P. The resultant difference specifies a new address where the operand to be used by the current instruction will be found; this new address coannot be further than 63 locations from the current instruction. P is unchanged.
Relative Forward Indirect Address (fi)
E is added to the contents of P in order to specify one of the 63 locations immediately following the current instruction address; the 12-bit contents of that location are used to address and operand anywhere on storage. P is unchanged.

Tabulka 85.8. Instruction table for CDC 160

mnemonicopcodenameaddr modeexec timecomments
ERR00Error 6.4Stop operation
HLT77Halt 6.4
SHA01Shift A(n)6.4Shift A depends on value E for its action. Three possibilities are:
  • 0102 Shift the contents of A lef end-arround 1 binary position.
  • 0110 Shift the contents of A left end-arround 3 binary positions.
  • 0112 Multiply the contents of 1 by octal 12 (decimal 10).
LPN02Logical Product(n)6.4Form in A the logical product of original contents of A and operand. A ← A && operand
LPD10(d)12.8
LPI11(i)19.2
LPF12(f)12.8
LPB13(b)12.8
LSN03    
LSD14    
LSI15    
LSF16    
LSB17    
OUT73Output(fi)12.8 + n*12.8Transmit to selected output device words of information from storage beginning at starting address and continuing up to but not including the termination address.
OTN74Output Direct(n)6.4Transmit 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.
EXF75External Function(f)12.8Transmit external function code to external equipment. The code is specified by contents of storage location E positions following external function instruction.
INA76Input to A(n)6.4Read into A one frame of data from selected input device, clearing previous contents of A.
Licence Creative Commons
Elektronika a počítače, jejímž autorem je Radek Hnilica, podléhá licenci Creative Commons Uveďte autora-Nevyužívejte dílo komerčně-Zachovejte licenci 3.0 Česká republika .