476
FX3G/FX3U/FX3GC/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
17 Data Transfer 2 – FNC100 to FNC109
17.1 FNC102 – ZPUSH/Batch Store of Index Register
Program example
In the program shown below, the contents of the index registers Z0 to Z7 and V0 to V7 before execution of subroutine
program are batch-stored in D0 and later when index registers are used in the subroutine after the pointer P0.
X005
M8002
Label
P 0
M8000
RUN monitor
M8000
K 5
D 0RST
FNC102
ZPUSH
D 0
END
FNC103
ZPOP
FNC 02
SRET
FNC 12
MOVP
X005
K10
FNC 12
MOVP
X000 V0
Y000
FNC 06
FEND
X000
FNC 01
CALL
P 0
Program using index
registers
X006
K 5
FNC 12
MOVP
X006
K10
FNC 12
MOVP
X030
T0
D100V0
V 0
V 0
V 0
V 0
V 0