559
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Table Data Processing Instructions
3
LIFO/FIFO
LIFO/FIFO
Applicable Program Areas
Operands
TB: First stack address
TB through TB+3: Stack control words TB+4 through TB+(N-1): Data storage region
z Operand Specifications
Instruction Mnemonic Variations
Function
code
Function
LAST IN FIRST OUT LIFO @LIFO 634
Reads the last word of data written to the specified
stack (the newest data in the stack).
FIRST IN FIRST OUT FIFO @FIFO 633
Reads the first word of data written to the speci-
fied stack (the oldest data in the stack).
Symbol
LIFO FIFO
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or
transition programs
Usage OK OK OK OK OK OK
Operand Description Data type Size
TB First stack address UINT Variable
D Destination word UINT 1
Area
Word addresses
Indirect DM/EM
addresses
Con-
stants
Registers Flags
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
TK CF
TB
OK OK OK OK OK OK OK OK OK OK ---
---
--- OK --- --- --- ---
D OK
TB: First stack address
D: Destination word
LIFO(634)
TB
D
TB: First stack address
D: Destination word
FIFO(633)
TB
D
15 0
TB
15 0
TB+1
15 0
TB+2
15 0
TB+3
PC memory address of the last
word in the stack (rightmost 4 digits)
PC memory address of the last
word in the stack (leftmost 4 digits)
Stack pointer (rightmost 4 digits)
Stack pointer (leftmost 4 digits)
15 0
---
TB+4
TB+(N–1)
Data storage region