561
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Table Data Processing Instructions
3
LIFO/FIFO
Example Programming
z LIFO
When CIO 0.00 is ON in the following example, LIFO(634) reads the content of the word indicated by
the stack pointer (D6) and writes that data to D300.
After the data is written to D300, the stack pointer is decremented by one. The content of D6 is left
unchanged.
–1
TB:
Last word
in stack
Stack
pointer
Stack pointer
PC memory address
of last word in stack
D: D300
Stack pointer
PC memory address
of last word in stack
Read by LIFO(634).
Last word
in stack
Stack
pointer
D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
D0
D300
0.00