Download Manual, FST 200

Transcript
FST 200-STL
4. Programming in the statement list
4.3.6 Indexed programming
The word operands IW, OW, R, FW, TP, TW, CP and
CW can be addressed by index. This means that the
content of one of the index registers X or Y is interpreted as an operand number. The address for the
word operand is determined at runtime and is restricted
to the valid address range for this operand. This means
that if values are given of, for instance, x = 1 and
y = 33, the flag word FW1 is addressed both times by
the expression FW[x] or FW[y].
Example:
STEP
THEN
Init
(1)
LOAD
V4
TO
X
LOAD
V10
TO
Y
===================================
STEP
IF
(2)
X
<
V16
THEN
LOAD
Y
TO
R [X]
ZV
X
ZV
Y
JMP TO
SetRegs (2)
OTHRW
NOP
=========================================
STEP
(3)
4-42
SetRegs
9610a