Omron C200HG Computer Hardware User Manual


 
186
Example In the following example, the content of C (HR 00) is 9010, and COLL(81) is used
to copy the oldest entries from a10-word stack (IR 001 to IR 010) to LR 20.
Stack pointer
decremented
After one
execution
After two
executions
DIST(80)
001
HR 00
LR 20
00001
Address Instruction Operands
00000 LD 00001
00001 COLL(81)
001
HR 00
LR 20
IR 001
Before
execution
1234
000 2
ABCD
ABCD
000 1 000 0
IR 002
IR 003
IR 010
IR 001
IR 002
IR 003
IR 010
IR 001
IR 002
IR 003
IR 010
Stack pointer
decremented
Stack pointer
Stack area
Output
1234
LR 20
Output
ABCD
LR 20
When the execution condition is OFF, COLL(81) is not executed. When the
execution condition is ON, COLL(81) copies the data most recently recorded in
the stack to D. The stack pointer, SBs, is then decremented by 1.
Specifies the stack length (000 to 999).
A value of 8 indicates LIFO stack operation.
Digits of C: 3210
Data can be added to the stack until it is full. DIST(80)s stack operation can be
used together with COLL(81)s read stack operation. COLL(81) can be set to
read on a FIFO or LIFO basis. Refer to 5-16-6 SINGLE WORD DISTRIBUTE
(80) for details.
Note LIFO stands for Last-In-First-Out.
LIFO Stack Operation
(C=8000 to 8999)
Data Movement Section 5-16