![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268739.webp)
700
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
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...