Introduction


Indirect addressing gives you an alternative way to specify a field.


What is Indirect Addressing?

Up to now, you have supplied a specific field whenever you used a calculator function that required a field. For example, to store 10 in data register A, you used the key sequence 10 [ STO ] A. This form of specifying a field is called direct addressing, because you directly specify the field.

Indirect addressing is an alternate method of specifying a field. In indirect addressing, you do not specify the actual field, but a data register where the field is stored. For example, the key sequence 10 [ STO ] [ 2nd ] [ IND ] A instructs the calculator to store 10 in the data register specified by the contents of register A. The difference between direct and indirect addressing is illustrated below.

dirvsindir

In the indirect example, the contents of register A determine where the value 10 is stored. In this case, register A contains 4, so 10 is stored in register 004.

Using Indirect Addressing

To specify indirect addressing, substitute the key sequence
[ 2nd ] [ IND ] nnn or X
for the field of the instruction you want to address indirectly. The data register following the [ 2nd ] [ IND ] sequence is called the pointer register.

To avoid causing errors when using indirect addressing, apply the following rules.
  • If the instruction you are addressing indirectly uses a numeric field, be sure that the pointer register contains a numeric value that is a valid numeric field. The integer value of the contents of the pointer register is used as the numeric field. (Negative values are interpreted as zero.)

  • If the instruction you are addressing indirectly uses an alpha field, be sure that the pointer register contains alpha characters that are valid as an alpha field. The calculator uses the leftmost characters stored in the pointer register as the alpha field. Any extra characters stored in the pointer register are ignored.

Restrictions

You can use indirect addressing with any instruction that has a field, except the three instructions listed below. A complete list of instructions that require a field is given in Appendix C.
  • LBL (Label segment)
  • DFN (Define function key)
  • DFA (Define function key absolute)


Back