Chapter 4
Data File Organization and Addressing
4–15
Monitoring Indexed Addresses
The offset address value is not displayed when you monitor an indexed
address. For example, the value at N7:2 appears when you monitor indexed
address #N7:2.
Example
If your application requires you to monitor indexed data, we recommend that
you use a MOV instruction to store the value.
B3
1
MOV
MOVE
Source
#N7:2
Dest
N10:2
ADD
ADD
Source A
#N7:2
Source B
T4:0.ACC
Dest
T4:1.PRE
] [
N10:2 will contain the data value that was added to T4:0.ACC.
Effects of File Instructions on Indexed Addressing
The # symbol is also required for addresses in file instructions. The indexed
addresses used in these file instructions also make use of word S:24 to store
an offset value upon file instruction completion. Refer to the next page for a
list of file instructions that use the # symbol for addressing.
!
ATTENTION: File instructions manipulate the offset value
stored in word S:24. Make sure that you load the correct offset
value in S:24 prior to using an indexed address that follows a file
instruction. Otherwise, unpredictable operation could occur,
resulting in possible personal injury and/or damage to equipment.
Effects of Program Interrupts on Index Register S:24
When normal program operation is interrupted by the user error handler, an
STI (selectable timed interrupt), or an I/O interrupt, the content of index
register S:24 is saved; then, when normal program operation is resumed, the
content of index register S:24 is restored. This means that if you alter the
value in S:24 in these interrupt subroutines, the system will overwrite your
alteration with the original value contained on subroutine entry.