Installation manual
Publication 1747-RM001G-EN-P - November 2008
Data File Organization and Addressing E-11
In this example, the processor uses the following addresses:
SLC 5/03 (OS301 and higher), SLC 5/04, and SLC 5/05 processors: If the
indexed address is a floating point (F8:) data file, then the index offset value in
S:24 is the offset in elements. If the indexed address is a string (ST) data file,
then the index offset value in S:24 is the offset in sub-elements. This limits
string element boundaries from being crossed.
Note that file instructions (SQO, COP, LFL for example) overwrite S:24 when
they execute. For this reason, you must insure that the index register is loaded
with the intended value prior to the execution of an indexed instruction that
follows a file instruction.
Creating Data for Indexed Addresses
Data tables are not expanded automatically to accommodate indexed
addresses. You must create this data with the memory map function. In the
example on the previous page, data words N7:3 through N7:12 and N11:6
through N11:15 must be allocated. Failure to do so will result in an unintended
overwrite condition or a major fault.
Crossing File Boundaries
An offset value may extend operation to an address outside the data file
boundary. You can either allow or disallow crossing file boundaries. If you
choose to disallow crossing file boundaries, a runtime error occurs if you use
an offset value which would result in crossing a file boundary.
SLC 5/02 processors: You are allowed to select crossing file boundaries only if
no indexed addresses exist in the O: (output), I: (input), or S: (status) files. This
selection is made at the time you save your program. The file order from start
to finish is:
• O0:, I1:, S2:, B3:, T4:, C5:, R6:, N7:, x9:, x10: . . .
• x9: and x10: . . . are application-specific files where x can be of types B,
T, C, R, N.
Table E.5 Addresses used for Indexing
Value: Base Address: Offset Value in
S:24
Offset Address:
Source N7:10 10 N7:20
Destination N7:50 10 N7:60