APPENDICES
APP
−
41
4.2
Word Data 1 Word Shift to Right
(1) A program for shifting to the right a range of devices that comprises n points
and starts with a designated word device is shown here.
0 is entered here
Before
execution
After
execution
D+(n-1) D+(n-2) D+(n-3)
D+2
D+1
D
0
Shift range (n)
(2) Word data can be shifted one word to the right by using the BMOV (P)
instruction and RST instruction.
The format for a program for shifting data one word to the right by using the
BMOV (P) instruction and RST instruction is shown in Figure 4.2.
BMOV(P)
S
D1
n
RST D2
Execution command
(Note)
(1) S, D1, D2, and n are explained below.
S
: Head number of the devices to be shifted to the right
D1 : Number of (word device designated by S+1) device
D2 : Final device number of word devices to be shifted to be shifted to right
n
: Number of shifted devices
(2) (Note): BMOV(P) indicates the BMOV instruction and the BMOVP
instruction.
Fig.4.2. Format for Right Shift Using BMOV(P) Instruction and RST Instruction
Downloaded from