22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

AGO Instruction<br />

The extended AIF instruction is exactly equivalent to n successive AIF statements.<br />

The branch is taken to the first sequence symbol (scanning left to right) whose<br />

corresponding logical expression is true. If none of the logical expressions is true,<br />

no branch is taken.<br />

Example:<br />

Cont.<br />

AIF ('&L'(&C,1) EQ '$').DOLR, X<br />

('&L'(&C,1) EQ '#').POUND,<br />

X<br />

('&L'(&C,1) EQ '@').AT,<br />

X<br />

('&L'(&C,1) EQ '=').EQUAL,<br />

X<br />

('&L'(&C,1) EQ '(').LEFTPAR,<br />

X<br />

('&L'(&C,1) EQ '+').PLUS,<br />

X<br />

('&L'(&C,1) EQ '-').MINUS<br />

This statement looks for the occurrence of a $, #, @, =, (, +, and -, in that order;<br />

and causes control to branch to .DOLR, .POUND, .AT, .EQUAL, .LEFTPAR, .PLUS, and<br />

.MINUS, respectively, if the string being examined contains any of these characters<br />

at the position designated by &C.<br />

Alternative Format for AIF Instruction<br />

The alternative statement format is allowed for extended AIF instructions. This<br />

format is illustrated in the above example.<br />

AIFB—Synonym of the AIF Instruction<br />

For compatibility with some earlier assemblers, High Level Assembler supports the<br />

AIFB symbolic operation code as a synonym of the AIF instruction. However, you<br />

should not use the AIFB instruction in new applications as support for it might be<br />

removed in the future.<br />

AGO Instruction<br />

The AGO instruction branches unconditionally. You can thus alter the sequence in<br />

which your assembler language statements are processed. This provides you with<br />

final exits from conditional assembly loops.<br />

►►──┬─────────────────┬──AGO──sequence_symbol──────────────────────►◄<br />

└─sequence_symbol─┘<br />

sequence_symbol<br />

is a sequence symbol.<br />

The statement named by the sequence symbol in the operand field is the next<br />

statement processed by the assembler.<br />

The statement identified by a sequence symbol referred to in the AGO instruction<br />

can appear before or after the AGO instruction. However, the statement must<br />

appear within the local scope of the sequence symbol. Thus, the statement<br />

identified by the sequence symbol must appear:<br />

In open code, if the corresponding AGO instruction appears in open code<br />

In the same macro definition in which the corresponding AGO instruction<br />

appears.<br />

392 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!