APPENDICES  APPENDIX
Appendix 1  Read/Write by Device Extension Specification
447
A
Access to index the device number
When accessing a device, indirect specification of the device number can be performed using index register.
The access target can be switched with one message, by changing the value of the index register in CPU module programs.
When accessing D4 by specifying D0 and Z0
When accessing M16 to M31 by specifying M0 and Z0 (Word units)
Z
Device 
code
Device number
Device modification
+
4
04
Specify  by the request data.
Device number
(Offset value)
Z0
Device number to access
=
+
Specify  by the program of the CPU module.
Z0
Similar to the way of access to D4 by the following program.
(Stored value)
4
D0
++
0
MOVP  K4   Z0
(Device number)
D4
(Access destination)
MOVP  K      D0Z0
D5
16
0
16
Z0
Z0
MOVPK16Z0
MOVPKK4M0Z0
16
0
Specify this in request data.
Device number to access
=
+
Specify this on the program of the CPU module.
Similar to the way of access to M16 to M31 by
the following program.
(Stored value)
+
(Device number)
M0 to M15
(Access destination)
M16 to M31
M32 to M47
Device number
(Offset value)