Chapter 6 Applied Instructions
6-107
API
Instruction code
Operand Function
0218 D LINE P
S, n, D
Converting a column of data into a
line of data
Device
X Y M S T C HC D L SM SR E PR K 16#
“$” DF
16-bit instruction (7 steps)
32-bit instruction (7 steps)
Symbol:
S
:
Data source Word/Double word
n
:
Number of bits Word/Double word
D
:
Data destination Word/Double word
Explanation:
1. The operand S used in the 16-bit instruction occupies sixteen 16-bit registers, i.e. S~S+15.
2. The operand S used in the 32-bit instruction occupies thirty-two 32-bit registers, i.e. S~S+31.
3. The operand n indicates that the value of the n
th
bit in every piece of data in the operand S is
retrieved. Besides, the operand n used in the 16-bit instruction should be within the range
between 0 and 15, and the operand n used in the 32-bit instruction should be within the range
between 0 and 31.
4. The operand n used in the 16-bit instruction indicates that the values of the n
th
bits in S~S+15
are retrieved, and the values of the n
th
bits are stored in the operand D in order.
5. The operand n used in the 32-bit instruction indicates that the values of the n
th
bits in S~S+31
are retrieved, and the values of the n
th
bits are stored in the operand D in order.
6. Only the 32-bit instructions can use the 32-bit counter.
7. Take the 16-bit instruction for example.
.
.
.
...... ..
1
0
1
1
0
0
0
1 0 1
1
0
.
.
.
.
.
.
.
.
.
b15 b0
S
S+1
S+2
S+13
S+14
S+15
b15 b0
D
N