Forward indexing
To index forward through an array (from low to high storage addresses), you need a BXLE test, to end the loop when the highest address is reached. If no explicit terminator is specified, and if none of the preceding combinations of keywords and values exist, then forward indexing is assumed, and a BXLE terminator is generated.
For example:
DO FROM=(Rx,1),TO=(Ry+1,10),BY=(Ry,2)
Code for F
ENDDO
produces:
DO FROM=(R1,1),TO=(R3,10),BY=(R2,2)
LA R1,1
LA R3,10
LA R2,2
#@LB2 DC 0H
Code for F
ENDDO
#@LB3 DC 0H
BXLE R1,R2,#@LB2