163
When
the execution condition is OFF
,
DIST(80) is not executed. When the exe
-
cution condition is ON, DIST(80) operates a stack from DBs to DBs+C–9000.
DBs
is the stack pointer
, so S is copied to the word indicated by DBs
and DBs is
incremented by 1.
Specifies
the stack length (000 to 999).
A value of 9 indicates stack operation.
Digits of C:
3210
Data
can be added to the stack until it is full. DIST(80) is normally used together
with
COLL(81), which can
be set to read from the stack on a FIFO or LIFO basis.
Refer to 5-16-7 DATA COLLECT – COLL(81) for details.
Example of Stack Operation In
the following example, the content of C (LR 10) is
9010, and DIST(80) is used
to write the numerical data #00FF to the 10-word stack from HR 20 to HR 29.
During
the first cycle when IR 00001 is ON, the data is written to DBs+1 (HR 21)
and
the stack pointer is incremented by 1. In the second
cycle the data is written
to DBs+2 (HR 22) and the stack pointer is incremented, and so on.
1
HR
20
000
F
HR 21
00F
HR 22
HR 29
Stack pointer
incremented
2
HR 20
000
F
HR 21
00F
F
HR 22
00F
HR 29
After one
execution
After two
executions
DIST(80)
# 00FF
HR 20
LR 10
00001
Address Instruction Operands
00000 LD 00001
00001 DIST(80)
# 00FF
HR 20
LR 10
Stack
pointer
Stack area
Flags ER: The content of C is not BCD or 6655<C<9000.
When C≤6655, DBs and DBs+C are not in the same data area.
When C≥9000, DBs and DBs+C–9000 are not in the same data area.
Indirectly
addressed DM word
is non-existent. (Content of
∗
DM word is
not BCD, or the DM area boundary has been exceeded.)
EQ: ON when the content of S is zero; otherwise OFF.
Stack Operation
(C=9000 to 9999)
Data Movement Section 5-16