A-15
Appendices
CP1E CPU Unit Software User’s Manual(W480)
A-1 Instruction Functions
App
A-1-7 Data Shift Instructions
A-1-7 Data Shift Instructions
Instruction Mnemonic Variations Symbol/Operand Function
SHIFT REGIS-
TER
SFT --- Operates a shift register.
REVERSIBLE
SHIFT REGIS-
TER
SFTR @ Creates a shift register that shifts data to either the right or the left.
C: Control Word
WORD SHIFT WSFT @ Shifts data between St and E in word units.
ARITHMETIC
SHIFT LEFT
ASL @ Shifts the contents of Wd one bit to the left.
ARITHMETIC
SHIFT RIGHT
ASR @ Shifts the contents of Wd one bit to the right.
ROTATE LEFT ROL @ Shifts all Wd bits one bit to the left including the Carry Flag (CY).
ROTATE
RIGHT
ROR @ Shifts all Wd bits one bit to the right including the Carry Flag (CY).
SFT(010)
St
E
Data
input
Shift
input
Reset
input
St: Starting word
E: End word
E
St+1, St+2
St
Status of data
input for each
shift input
Lost
SFTR(084)
C
St
E
C: Control word
St: Starting word
E: End word
StE
St
E
Data input
Shift
direc-
tion
Data
input
Data input
Reset
Shift input
Shift direction
1 (ON): Left
0 (OFF): Right
15 14 13 12
WSFT(016)
S
St
E
S: Source word
St: Starting word
E: End word
St
E
Lost
ASL(025)
Wd
Wd: Word
0 15
1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
0
CY
0 0 11 0 0 0 1 0 0 0 1 0 0 0 01
Wd: 100CH
ASR(026)
Wd
Wd: Word
015
1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
0
CY
01
Wd: 100CH
1 0 0 1 0 0 0 1 0 0 0 1 0 0 0
Wd
ROL(027)
Wd: Word
ROR(028)
Wd
Wd: Word
Wd
Wd+1