If these are the concept-14 macros as Dougie suggested, the macro set also contains ANDIF and ORIF for grouping, e.g. IF CLC,A,NE,Z,ANDIF,CLC,B,NE,Z,OR,CLC,C,NE,Z
The macros are not always consistent, e.g. for a compare, the condition comes between the operands, but for test instructions, the condition is the last parameter. E.g. IF CLC,A,NE,B IF TM,C,X'40',Z I know there are at least 2 other structured programming macros in the field, but I have never used them; used contecpt-14 and the HLASM toolkit all my life. ----- Original Message ----- From: "FancyDancer" <[email protected]> To: "IBM Mainframe Assembler List" <[email protected]> Sent: Saturday, September 5, 2020 10:14:15 PM Subject: Re: Stuctured Macros If any of you are up for trying these structured macros, please let me know? For your entertainment, I have a included snippet of the "IF" macro demonstration program. Let the games begin. Dan Snyder 000120 (1/252)331 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* 000120 (1/253)332 * * 000120 (1/254)333 * SINCE THE EVALUATION OF "AND" IN A LOGICAL EXPRESSION TAKES * 000120 (1/255)334 * PRECEDENCE OVER "OR", YOU MAY NEED TO OVERRIDE THAT PRECEDENCE TO * 000120 (1/256)335 * FORCE AN "OR" CONJUNCTION TO BE EVALUATED BEFORE AN "AND". YOU * 000120 (1/257)336 * WOULD ENCLOSE THE TWO EXPRESSIONS JOINED BY AN "OR" WITH AN * 000120 (1/258)337 * ADDITIONAL PAIR OF PARENTHESES: * 000120 (1/259)338 * * 000120 (1/260)339 * | | * 000120 (1/261)340 * | | * 000120 (1/262)341 * | | * 000120 (1/263)342 * V V * 000120 (1/264)343 * IF (CLC,A,Z,NE),AND,((CLC,B,Z,NE),OR,(CLC,C,Z,NE)) * 000120 (1/265)344 * * 000120 (1/266)345 * ONE OR MORE INSTRUCTIONS * 000120 (1/267)346 * TO BE EXECUTED IF THE ABOVE * 000120 (1/268)347 * LOGIC GROUP EVALUATES TO "TRUE" * 000120 (1/269)348 * * 000120 (1/270)349 * ENDIF * 000120 (1/271)350 * * 000120 (1/272)351 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* 000120 (1/273)352 * 1 2 3 4 5 6 7 000120 (1/274)353 *...V....0....V....0....V....0....V....0....V....0....V....0....V....0. 000120 (1/275)354 * 000120 (1/276)355 * V<<<<<EXTRA PARENTHESES:>>>>>V 000120 (1/277)356 * V V 000120 (1/278)357 IF (CLC,A,Z,NE),AND,((CLC,B,Z,NE),OR,(CLC,C,Z,NE)) 000120 D503C338C368 000338 000368 (4/42)359= CLC A,Z TWO OPERANDS - SET CONDITION CODE CPY 030 000126 A784000F 000144 (4/228)360= JE $MDF19 B IF FALSE TO 'FAIL' TAG CPY 060 00012A D503C33CC368 00033C 000368 (4/42)363= CLC B,Z TWO OPERANDS - SET CONDITION CODE CPY 030 000130 A7740007 00013E (4/210)364= JNE $MDT20 B IF TRUE TO 'PASS' TAG CPY 050 000134 D503C340C368 000340 000368 (4/42)365= CLC C,Z TWO OPERANDS - SET CONDITION CODE CPY 030 00013A A7840005 000144 (2/25)367+ JE $MDF19 IF 090 00013E (2/28)368+$MDT20 DC 0H'0' IF 100 00013E FA30C308C2F8 000308 0002F8 (1/279)370 AP LEVEL1_PASS_COUNTER,=P'1' 000144 (1/280)371 ENDIF 000144 (5/19)372+$MDF19 DC 0H'0' ENDIF 010
