A-1-15 Table Data Processing Instructions - Omron CJ2 CPU - REV 10-2010 User Manual

Cj2 cpu unit software
Table of Contents

Advertisement

A-1-15
Table Data Processing Instructions
Instruction
Mnemonic
Code
SET STACK
SSET
630
@SSET
PUSH ONTO
PUSH
632
STACK
@PUSH
LAST IN
LIFO
634
FIRST OUT
@LIFO
FIRST IN
FIFO
633
FIRST OUT
@FIFO
DIMENSION
DIM
631
RECORD
@DIM
TABLE
CJ2 CPU Unit Software User's Manual
Symbol/Operand
Defines a stack of the specified length beginning at the
SSET(630)
specified word and initializes the words in the data region
to all zeroes.
TB
N
TB: 1st stack
address
Last
N: Number of words
word in
stack
Stack
pointer
Writes one word of data to the specified stack.
PUSH(632)
TB
S
TB
TB+1
TB+2
TB+3
TB: 1st stack
address
S: Source word
Reads the last word of data written to the specified stack
LIFO(634)
(the newest data in the stack).
TB
Stack
pointer
D
TB
TB+1
TB: 1st stack
TB+2
address
TB+3
D: Destination
word
Reads the first word of data written to the specified stack
FIFO(633)
(the oldest data in the stack).
TB
D
TB
Stack
TB+1
TB: 1st stack
pointer
address
TB+2
D: Destination
TB+3
word
Defines a record table by declaring the length of each
DIM(631)
record and the number of records. Up to 16 record tables
N
can be defined.
LR
NR
TB
Number
N: Table number
of records
LR: Length of
each record
NR: Number of
records
TB: 1st table word
Function
Internal I/O
memory address
TB
m+(N−1)
TB+1
TB+2
TB+3
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
1
The pointer is
Last-in first-out
decremented.
Internal I/O
Internal I/O
memory address
memory address
TB
Oldest
TB+1
data
TB+2
m−1
TB+3
Stack
pointer
First-in first-out
Table number (N)
Record 1
LR
×
NR words
Record NR
Appendices
Execution
Location
condition
Output
Required
N words
in stack
Output
Required
Internal I/O
memory
address
Output
Required
A is left
un-changed.
Output
Required
m−1
Output
Required
A-45

Advertisement

Table of Contents
loading

Table of Contents