IF macro option A
Option A tests the previously set condition code. It uses the Extended
Branch Mnemonics for the branch instruction or the numeric condition
code masks to indicate the condition. Table 1 following
the examples shows the mnemonics and their complements.
IF (H) THEN
Code for F1
ELSE
Code for F2
ENDIF
produces this result: IF (H) THEN
BC 15-2,#@LB1
Code for F1
ELSE
BC 15,#@LB3
#@LB1 DC 0H
Code for F2
ENDIF
#@LB3 DC 0H
The same example, using a numeric condition code mask, is:
IF (2) THEN
Code for F1
ELSE
Code for F2
ENDIF
This produces the same code.
Case | Condition Mnemonics | Meaning | Complement |
---|---|---|---|
After compare instructions | H, GT L, LT E, EQ | high, greater than low, less than equal | NH, LE, NL, GE, NE |
After arithmetic instructions | P, M, Z, O, C, B | plus, minus, zero, overflow, carry, borrow | NP, NM, NZ, NO, NC, NB |
After test under mask instructions | O, M, Z | ones, mixed, zeros | NO, NM, NZ |
Notes:
|