Instructions
The below table is copied from Appendix A of
System Software: An Introduction to Systems Programming
. Note that for format 3/4 instructions, the opcode is really 6 bits.
The last two bits are used for bits n and i.
Notes
- P: Privileged instruction
- X: Instruction available only on SIC/XE
- F: Floating-point instruction
- C: Condition code (CC) set to indicate the result of the operation (<, =, or >)
| Mnemonic | Format | Opcode | Effect | Notes |
|---|---|---|---|---|
ADD m | 3/4 | 18 = 0001 1000 | A ← (A) + (m..m+2) | |
ADDF m | 3/4 | 58 = 0101 1000 | F ← (F) + (m..m+5) | X F |
ADDR r1,r2 | 2 | 90 = 1001 0000 | r2 ← (r2) + (r1) | X |
AND m | 3/4 | 40 = 0100 0000 | A ← (A) & (m..m+2) | |
CLEAR r1 | 2 | B4 = 1011 0100 | r1 ← 0 | X |
COMP m | 3/4 | 28 = 0010 1000 | (A) : (m..m+2) | C |
COMPF m | 3/4 | 88 = 1000 1000 | (F) : (m..m+5) | X F C |
COMPR r1,r2 | 2 | A0 = 1010 0000 | (r1) : (r2) | X C |
DIV m | 3/4 | 24 = 0010 0100 | A ← (A) / (m..m+2) | |
DIVF m | 3/4 | 64 = 0110 0100 | F ← (F) / (m..m+5) | X F |
DIVR r1,r2 | 2 | 9C = 1001 1100 | r2 ← (r2) / (r1) | X |
FIX | 1 | C4 = 1100 0100 | A ← (F) [convert to integer] | X F |
FLOAT | 1 | C0 = 1100 0000 | F ← (A) [convert to floating] | X F |
HIO | 1 | F4 = 1111 0100 | Halt I/O channel number (A) | P X |
J m | 3/4 | 3C = 0011 1100 | PC ← m | |
JEQ m | 3/4 | 30 = 0011 0000 | PC ← m if CC set to = | |
JGT m | 3/4 | 34 = 0011 0100 | PC ← m if CC set to > | |
JLT m | 3/4 | 38 = 0011 1000 | PC ← m if CC set to < | |
JSUB m | 3/4 | 48 = 0100 1000 | L ← (PC); PC ← m | |
LDA m | 3/4 | 00 = 0000 0000 | A ← (m..m+2) | |
LDB m | 3/4 | 68 = 0110 1000 | B ← (m..m+2) | X |
LDCH m | 3/4 | 50 = 0101 0000 | A [rightmost byte] ← (m) | |
LDF m | 3/4 | 70 = 0111 0000 | F ← (m..m+5) | X F |
LDL m | 3/4 | 08 = 0000 1000 | L ← (m..m+2) | |
LDS m | 3/4 | 6C = 0110 1100 | S ← (m..m+2) | X |
LDT m | 3/4 | 74 = 0111 0100 | T ← (m..m+2) | X |
LDX m | 3/4 | 04 = 0000 0100 | X ← (m..m+2) | |
LPS m | 3/4 | D0 = 1101 0000 | Load processor status from information beginning at address m | P X |
MUL m | 3/4 | 20 = 0010 0000 | A ← (A) * (m..m+2) | |
MULF m | 3/4 | 60 = 0110 0000 | F ← (F) * (m..m+5) | X F |
MULR r1,r2 | 2 | 98 = 1001 1000 | r2 ← (r2) * (r1) | X |
NORM | 1 | C8 = 1100 1000 | F ← (F) [normalized] | X F |
OR m | 3/4 | 44 = 0100 0100 | A ← (A) | (m..m+2) | |
RD m | 3/4 | D8 = 1101 1000 | A [rightmost byte] ← data from device specified by (m) | P |
RMO r1,r2 | 2 | AC = 1010 1100 | r2 ← (r1) | X |
RSUB | 3/4 | 4C = 0100 1100 | PC ← (L) | |
SHIFTL r1,n | 2 | A4 = 1010 0100 | r1 ← (r1); left circular shift n bits. [In assembled instruction, r2 = n-1] | X |
SHIFTR r1,n | 2 | A8 = 1010 1000 | r1 ← (r1); right shift n bits, with vacated bit positions set equal to leftmost bit of (r1). [In assembled instruction, r2 = n-1] | X |
SIO | 1 | F0 = 1111 0000 | Start I/O channel number (A); address of channel program is given by (S) | P X |
SSK m | 3/4 | EC = 1110 1100 | Protection key for address m ← (A) | P X |
STA m | 3/4 | 0C = 0000 1100 | m..m+2 ← (A) | |
STB m | 3/4 | 78 = 0111 1000 | m..m+2 ← (B) | X |
STCH m | 3/4 | 54 = 0101 0100 | m ← (A) [rightmost byte] | |
STF m | 3/4 | 80 = 1000 0000 | m..m+5 ← (F) | X F |
STI m | 3/4 | D4 = 1101 0100 | Interval timer value ← (m..m+2) | P X |
STL m | 3/4 | 14 = 0001 0100 | m..m+2 ← (L) | |
STS m | 3/4 | 7C = 0111 1100 | m..m+2 ← (S) | X |
STSW m | 3/4 | E8 = 1110 1000 | m..m+2 ← (SW) | P |
STT m | 3/4 | 84 = 1000 0100 | m..m+2 ← (T) | X |
STX m | 3/4 | 10 = 0001 0000 | m..m+2 ← (X) | |
SUB m | 3/4 | 1C = 0001 1100 | A ← (A) - (m..m+2) | |
SUBF m | 3/4 | 5C = 0101 1100 | F ← (F) - (m..m+5) | X F |
SUBR r1,r2 | 2 | 94 = 1001 0100 | r2 ← (r2) - (r1) | X |
SVC n | 2 | B0 = 1011 0000 | Generate SVC interrupt. [In assembled instruction, r1 = n] | X |
TD m | 3/4 | E0 = 1110 0000 | Test device specified by (m) | P C |
TIO | 1 | F8 = 1111 1000 | Test I/O channel number (A) | P X C |
TIX m | 3/4 | 2C = 0010 1100 | X ← (X) + 1; (X) : (m..m+2) | X C |
TIXR r1 | 2 | B8 = 1011 1000 | X ← (X) + 1; (X) : (r1) | X C |
WD m | 3/4 | DC = 1101 1100 | Device specified by (m) ← (A) [rightmost byte] | P |
List of Instructions
ADD m
Adds register A and the word at the address m, storing the result in register A.
ADDF m
Floating-point equivalent of ADD. The floating-point number stored at m (6 bytes or 2 words) is added to the value in register F and the result is stored in register F.
ADDR r1,r2
Adds the values of r1 and r2 together, storing the result in r2.
AND m
Performs bitwise AND on register A and the word at m. The result is stored in register A.
CLEAR r1
Sets register r1 to zero, effectively clearing it.
COMP m
Compares of register A to the word at m, setting the condition code.
COMPF m
Floating-point equivalent of COMP. The floating-point number stored at m (6 bytes or 2 words) is compared to the value in register F and the condition code is set.
COMPR r1,r2
Compares the values of r1 and r2, setting the condition code.
DIV m
Divides the value in A by the word at address m. The result is wrote back to register A.
DIVF m
Divides the value in F by the 2 words at address m. The result is wrote back to register F.
DIVR r1,r2
Divides the value of r2 by r1, storing the result in r2.
FIX
Reads the float in F, converts it to an integer, and stores it in A.
FLOAT
Reads the integer in A, converts it to a floating-point number, and stores it in F.
HIO
TODO
J m
Jumps to address m by updating the PC register.
JEQ m
Jumps to address m by updating the PC register only if the condition code is set to =.
JGT m
Jumps to address m by updating the PC register only if the condition code is set to >.
JLT m
Jumps to address m by updating the PC register only if the condition code is set to <.
JSUB m
Sets the L register to the current value of PC and then jumps to address m by setting PC.
LDA m
Loads the word at address m into the A register.
LDB m
Loads the word at address m into the B register.
LDCH m
Loads the byte at address m into the right-most byte of the A register.
LDF m
Loads two words at address m into the F register.
LDL m
Loads the word at address m into the L register.
LDS m
Loads the word at address m into the S register.
LDT m
Loads the word at address m into the T register.
LDX m
Loads the word at address m into the X register.
LPS m
TODO
MUL m
TODO
MULF m
TODO
MULR r1,r2
TODO
NORM
Normalizes the float in the F register.
OR m
Performs bitwise OR on the word at address m and the word in register A, storing the result in register A.
RD m
TODO
RMO r1,r2
Copies the value in register r1 into register r2.
RSUB
Returns from a subroutine by reading the value of L (set by JSUB) and setting PC to it, jumping back to where JSUB was called.
SHIFTL r1,n
TODO
SHIFTR r1,n
TODO
SIO
TODO
SSK m
TODO
STA m
TODO
STB m
TODO
STCH m
TODO
STF m
TODO
STI m
TODO
STL m
TODO
STS m
TODO
STSW m
TODO
STT m
TODO
STX m
TODO
SUB m
TODO
SUBF m
TODO
SUBR r1,r2
TODO
SVC n
TODO
TD m
TODO
TIO
TODO
TIX m
TODO
TIXR r1
TODO
WD m
TODO
Last updated on