AGO instruction
The AGO instruction branches unconditionally. You can thus alter
the sequence in which your assembler language statements are processed. This provides you with final exits
from conditional assembly loops.
- sequence_symbol
- Is a sequence symbol.
The statement named by the sequence symbol in the operand field is the next statement processed by the assembler.
The statement identified by a sequence symbol referred to in the
AGO instruction can appear before or after the AGO instruction. However,
the statement must appear within the local scope of the sequence symbol.
Thus, the statement identified by the sequence symbol must appear:
- In open code, if the corresponding AGO instruction appears in open code
- In the same macro definition in which the corresponding AGO instruction appears.
Example:
MACRO
&NAME MOVE &T,&F
AIF (T'&T EQ 'F').FIRST Statement 1
AGO .END Statement 2
.FIRST AIF (T'&T NE T'&F).END Statement 3
&NAME ST 2,SAVEAREA
L 2,&F
ST 2,&T
L 2,SAVEAREA
.END MEND Statement 4
Statement 1 determines if the type attribute of the first macro
instruction operand is the letter F
. If the type attribute
is the letter F
, Statement 3 is the next statement processed
by the assembler. If the type attribute is not the letter F
,
Statement 2 is the next statement processed by the assembler.
Statement 2 indicates to the assembler that the next statement
to be processed is Statement 4 (the statement named by sequence symbol .END
).