850
7  APPLICATION INSTRUCTIONS
7.11  Index Register Instructions
 • These instructions save the content of the index register to the device specified by (d) or the array label element and later.
 • When the content of the index register is saved, the number of saves (d) is incremented by 1.
 • Regardless of the number of points assigned to the index register and long index register, 24 words of data are saved. 
Accordingly, when 0 point is assigned to the index register, the long index register is saved by 12 points.
 • The ZPOP(P) instructions can be used to restore data. The ZPUSH(P) and ZPOP(P) instructions are used in pairs and can 
be nested to be used as a stack.
Page 851 ZPOP(P)
 • A nesting structure can be created by specifying the area specified by (d) of the ZPUSH(P) instruction in (d) of the 
ZPUSH(P) instruction again. The number of saves (d) is incremented by 1 every time the ZPUSH(P) instruction is 
executed.
 • When another area is specified in (d) of the ZPUSH(P) instruction in the nesting structure, the content of the index register 
is saved to the specified another area.
 • In the nesting structure, every time the ZPUSH(P) instruction is executed, saved data is added. Therefore, secure in 
advance the areas necessary for the number of times the instruction is executed.
 • The following figure shows the configuration of the areas used after (d).
(1) Number of saves
(2) 1st nesting (24 words)
(3) 2nd nesting
Error code 
(SD0)
Description
3405H The number of saves in (d)+0 is FFFF.
(d)
(d)+1
(d)+2
(d)+24
(d)+25
(d)+26
Z0
Z1
Z0
Z1
Z23
(1)
(2)
(3)