HLASM Toolkit Feature User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


IF macro option C

HLASM Toolkit Feature User's Guide
GC26-8710-10

Read syntax diagramSkip visual syntax diagram
>>-IF--(compare instruction,parm1,condition,parm2)-------------><

Option C needs all four parameters.

Any compare instruction is valid. However, with a compare instruction, the condition mnemonic appears between parm1 and parm2, instead of after both of them as in option B.

In all cases, parm1 and parm2 must agree, as if you were writing the instruction in assembler language.

The condition parameter is either condition mnemonic from Table 1, or a numeric condition code mask.

This example of option C:
        IF  (CLI,0(2),EQ,X'40')  THEN
          Code for F1
        ELSE
          Code for F2
        ENDIF
produces:
        IF  (CLI,0(2),EQ,X'40')  THEN
                CLI             0(2),X'40'
          BC    15-8,#@LB1
          Code for F1
        ELSE
          BC    15,#@LB3
#@LB1     DC    0H
          Code for F2
        ENDIF
#@LB3     DC    0H
Option C also provides for three-operand compare instructions. An example is:
        IF  (CLM,R1,M3,NE,B2(D2))

In all option C formats, the instruction is coded first, followed by the appropriate operands in the same order as used in open code, with the condition code mask operand in the next to last position.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014