The DO indexing group
The indexing group permits five types of counting and testing to
be performed.
Each different requirement for counting and testing
has a corresponding set of keywords and values, and results in the
generation of appropriate loop initialization and termination
instructions.
The five variations are described in the following
paragraphs and are summarized in Table 1.
The tests to
determine which variation is to be used are performed in the order
described in Table 1.
In the indexing group, each of the three keywords is permitted to
indicate a register designation and an optional value.
Thus, an indexing DO statement could appear as:
DO FROM=(Rx,i),TO=(Ry+1,j),BY=(Ry,k)
if all keywords in the group were used.The format of the keywords is keyed to the BXH and BXLE indexing instructions, and the restrictions on the use of these instructions are carried over into the macros. Therefore, if the BY register Ry is an even-numbered register, then the TO register must be Ry+1. If the BY register Ry is an odd-numbered register, then the TO register must be the same register, and hence the TO and BY values (j and k) must be identical.