Mitsubishi Electronics QnUCPU Home Theater Server User Manual


 
CHAPTER9 DEVICES
9
2
3
4
5
6
7
8
9.6 Index Register (Z)/Standard Device Resister (Z)
9.6.3 Switching from the scan execution type program to the interrupt/fixed scan execution type
program
9 - 51
(b) When "High-speed execution" is selected
1) When switching from the scan execution type program to the interrupt/fixed scan
execution type program
The CPU module does not save/restore any index register values.
2) When switching from the interrupt/fixed scan execution type program to the scan
execution type program
If data are written to the index register by the interrupt/fixed scan execution type program, the values of the
index register used in the scan execution type program will be corrupted.
*1: The Z0 value is changed to 3 in the interrupt program.
When writing data to the index register by the interrupt/fixed scan execution type program, use the ZPUSH or
ZPOP instruction to save and restore the data.
Figure 9.64 Saving and restoring index register data (when "High speed execution" is selected)
Figure 9.65 Writing data to the index register in the interrupt/fixed scan execution type program
Execution program
Z0=1
Z0=0
Switching
Restored
Passed Passed
Z0=0 Z0=0 Z0=0 Z0=0
Z0=3
Index register value
Save area of index register
for scan execution
type program
Scan execution
type program
Interrupt/fixed scan
execution type
program
Scan execution
type program
Z0=1 Z0=3
*1
ZPUSH D0
SM400
ZPOP D0
SM400
IRET
I0
Data in Z0 to Z15 are
stored in the area
addressed from D0.
Data in the area
addressed from D0 are
stored in Z0 to Z15.