11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

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

AIF instructionsequence_symbolis a sequence symbollogical_expressionis a logical expression (see “Logical (SETB) expressions” on page 361) theassembler evaluates during conditional assembly time to determine if it is trueor false. If the expression is true (logical value=1), the statement named by thesequence symbol in the operand field is the next statement processed by theassembler. If the expression is false (logical value=0), the next sequentialstatement is processed by the assembler.In the following example, the assembler branches to the label .OUT if &C = YES:.ERROR.OUTAIF (’&C’ EQ ’YES’).OUTANOP...ANOPThe sequence symbol in the operand field is a conditional assembly label thatrepresents a statement number during conditional assembly processing. It is thenumber of the statement that is branched to if the logical expression preceding thesequence symbol is true.The statement identified by the sequence symbol referred to in the AIF instructioncan appear before or after the AIF instruction. However, the statement must appearwithin the local scope of the sequence symbol. Thus, the statement identified bythe sequence symbol must appear:v In open code, if the corresponding AIF instruction appears in open codev In the same macro definition in which the corresponding AIF instructionappears.You cannot branch from open code into a macro definition or between macrodefinitions, regardless of nested calls to other macro definitions.The following macro definition generates the statements needed to move afullword fixed-point number from one storage area to another. The statements aregenerated only if the type attribute of both storage areas is the letter F.MACRO&N MOVE &T,&FAIF (T’&T NE T’&F).END Statement 1AIF (T’&T NE ’F’).END Statement 2&N ST 2,SAVEAREA Statement 3L2,&FST2,&TL2,SAVEAREA.END MEND Statement 4The logical expression in the operand field of Statement 1 has the value true if thetype attributes of the two macro instruction operands are not equal. If the typeattributes are equal, the expression has the logical value false.Therefore, if the type attributes are not equal, Statement 4 (the statement named bythe sequence symbol .END) is the next statement processed by the assembler. If thetype attributes are equal, Statement 2 (the next sequential statement) is processed.384 <strong>HLASM</strong>: <strong>V1R6</strong> <strong>Language</strong> <strong>Ref</strong>

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

Saved successfully!

Ooh no, something went wrong!