Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data
Changing the Accumulator Data
1
Instructions that manipulate data also use the accumulator. The result of the manipulated
data resides in the accumulator. The data that was being manipulated is cleared from the
accumulator. The following example loads the constant value 4935 into the accumulator,
2
shifts the data right 4 bits, and outputs the result to V1410.
3
X1
4
5
6
7
8
9
10
Some of the data manipulation instructions use 32 bits. They use two consecutive V-memory
locations or an 8-digit BCD constant to manipulate data in the accumulator.
11
The following example rotates the value 67053101 two bits to the right and outputs the value
to V1410 and V1411.
12
X1
13
14
A
B
C
D
5–56
DL205 User Manual, 4th Edition, Rev. B
LD
K4935
Load the value 4935 into the
accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
SHFR
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
K4
Acc.
Shift the data in the accumulator
4 bits (K4) to the right
OUT
V1410
Output the lower 16 bits of the
accumulator to V1410
LDD
K67053101
Load the value 67053101
into the accumulator
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 1
ROTR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
K2
0 1 0 1 1 0 0 1 1 1 0 0 0 0 0 1
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
Acc.
Rotate the data in the
accumulator 2 bits to the right
OUTD
V1410
Output the value in the
accumulator to V1410 and V1411
The upper 16 bits of the accumulator
will be set to 0
Constant 6
7
0
5
9
C
1
V1411
4
9
3
5
Constant
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 1 0 0 1 0 0 1 1 0 1 0 1
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 1
0
4
9
3
V1410
5
3
1
0
1
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0
8
C
4
0
V1410
Shifted out of
accumulator
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?