82
CHAPTER 3
CONFIGURATION OF INSTRUCTIONS
3.1
Configuration of Instructions
Most CPU module instructions consist of an instruction part and a device part.
Each part is used for the following purpose:
• Instruction part......indicates the function of the instruction.
• Device part...........indicates the data that is to be used with the instruction.
The device part is classified into source data, destination data, and number of devices.
(1) Source (S)
(a) Source is the data used for operations.
(b) The following source types are available, depending on the designated device:
• Constant .............................................. Designates a numeric value to be used in the operation.
This is set when the program is created, and cannot be changed during
the execution of the program.
Constants should be indexed when used as variable data.
• Bit devices and word devices .............. Designates the device that stores the data to be used in the operation.
Data must be stored in the designated device until the operation is
executed.
By changing the data stored in a designated device during program
execution, the data to be used in the instruction can be changed.
(2) Destination (D)
(a) The destination stores the data after the operation has been conducted. However, some instructions require storing
the data to be used in an operation at the destination prior to the operation execution.
An addition instruction involving BIN 16-bit data
(b) A device for the data storage must always be set to the destination.
(3) Number of devices and number of transfers (n)
(a) The number of devices and number of transfers designate the numbers of devices and transfers used by
instructions involving multiple devices.
Block transfer instruction
(b) The number of devices or number of transfers can be set between 0 and 32767.
However, if the number is 0, the instruction will be a no-operation instruction.
Example
D
S2
S1
+
D
S
+
S
t
o
res
o
n
l
y
the
o
perat
io
n
resu
l
ts
.
S
t
o
res
the
d
ata
nee
d
e
d
f
o
r
o
perat
io
n
bef
o
re
the
actua
l o
perat
io
n
.
Example
n
D
S
BMO
V
D
es
ig
nates
the
number
o
f
transfers
use
d
by
a
BMO
V
i
nstruct
io
n