Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 118

Table of Contents

Advertisement

2. Summary of Instructions
2-2-15 Table Data Processing Instructions
Instruction
Symbol/Operand
Mnemonic
Code
SET STACK
SSET(630)
SSET
@SSET
630
TB: 1st stack
address
N: Number of
words
PUSH ONTO
PUSH(632)
STACK
PUSH
@PUSH
632
TB: 1st stack
address
S: Source word
LAST IN FIRST
LIFO(634)
OUT
LIFO
@LIFO
634
TB: 1st stack
address
D: Destination
word
FIRST IN FIRST
OUT
FIFO(633)
FIFO
@FIFO
633
TB: 1st stack
address
D: Destination
word
82
Defines a stack of the specified length beginning at the specified word
and initializes the words in the data region to all zeroes.
TB
N
TB
TB+1
TB+2
TB+3
Last word
in stack
Stack
pointer
Writes one word of data to the specified stack.
Internal I/O
TB
memory address
S
TB
TB+1
TB+2
TB+3
Reads the last word of data written to the specified stack (the newest
data in the stack).
TB
Stack
pointer
D
TB
TB+1
TB+2
TB+3
Reads the first word of data written to the specified stack (the oldest
data in the stack).
TB
D
TB
Stack
TB+1
pointer
TB+2
TB+3
First-in first-out
Function
Internal I/O
memory address
m+(N−1)
m+(N −1)
Internal I/O
memory address
TB
TB+1
TB+2
PUSH(632)
TB+3
Internal I/O
Internal I/O
memory address
memory address
TB
Newest
TB+1
data
TB+2
m −1
TB+3
Stack
pointer
m −1
Last-in first-out
The pointer is
decremented.
Internal I/O
Internal I/O
memory address
memory address
TB
Oldest
TB+1
data
TB+2
m −1
TB+3
Stack
pointer
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Location
Page
Execution
condition
Output
552
Required
N words
in stack
Output
555
Required
Output
557
Required
−1
m
A is left
un-
changed.
Output
557
Required
m−1

Advertisement

Table of Contents
loading

Table of Contents