
699
Table Data Processing Instructions
Section 3-17
The following diagram shows the basic structure of a stack.
The following instructions define or act on stack regions. Basically,
PUSH(632) stores data in the next available data word in the stack. FIFO(633)
and LIFO(634) read data from the stack. FIFO(633) reads the first word that
was stored, while LIFO(634) reads the last word that was stored.
The last five instructions are supported by CS1-H, CJ1-H, CJ1M, and CS1D
CPU Units only. SNUM(638) counts the number of data elements (words) in
the specified stack; for example, this instruction could be used to indicate the
number of items on a conveyor. Use the SREAD(639), SWRIT(640),
SINS(641), and SDEL(642) instructions to read, overwrite, insert, and delete
data elements in a stack. For example, when items are being handled on a
conveyor, these instructions can add, remove, or change a data element in
the stack that corresponds to an item on the conveyor.
PUSH(632)
Stores data in the address indicated by the stack pointer and increments the
pointer by one.
FIFO(633)
Reads first (oldest) word of data that was stored in the stack, shifts the
remaining data down one word, and decrements the pointer by one.
Data region
Example
Stack region
Pointer
End of
stack
Words in
stack region
PC memory address of the
last word in the stack
PC memory address of the
next data word (stack pointer)
Stack region
PC memory
address
16 words
Pointer
A
Pointer
Pointer
Stack
Stack
to
to
Data region
Data region
Stack
Stack
Pointer to last
word in stack
Pointer
Reads the content of A, decrements the pointer
by 1, deletes A, and shifts remaining data down.
Pointer
Pointer
Summary of Contents for SYSMAC CS Series
Page 2: ......
Page 4: ...iv ...
Page 30: ...xxx ...
Page 186: ...146 List of Instructions by Function Code Section 2 4 ...
Page 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Page 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Page 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Page 1392: ...1352 ASCII Code Table Appendix A ...
Page 1404: ...1364 Revision History ...