Coding instructions in AR mode

As you write your AR mode programs, use the advice and warnings in this information.

Because ARs that are associated with index registers are ignored, when you code assembler instructions in AR mode, place the commas very carefully. In those instructions that use both a base register and an index register, the comma that separates the two values is very important. Table 1 shows four examples of how a misplaced comma can change how the processor resolves addresses on the load instruction.

Table 1. Base and Index Register Addressing in AR Mode
Instruction Address Resolution
L 5,4(,3) or L 5,4(0,3) There is no index register. GPR 3 is the base register. AR 3 indicates the address/data space.
L 5,4(3) or L 5,4(3,0) GPR 3 is the index register. Because there is no base register, data is fetched from the primary address space.
L 5,4(6,8) GPR 6 is the index register. GPR 8 is the base register. AR 8 indicates the address/data space.
L 5,4(8,6) GPR 8 is the index register. GPR 6 is the base register. AR 6 indicates the address/data space.
For the first two entries in Table 1:
For the last two entries in Table 1: