"IBM Mainframe Assembler List" <[email protected]> wrote on
08/16/2023 10:05:25 AM:
> I can see that point.
So, now my three macros follow this pattern -- pending further
recommendations. Thanks.
MACRO
&LABEL TF &FLAG,&BAD TEST FLAG BIT(S)
AIF (T'&BAD EQ 'O').GOOD
MNOTE 12,'TOO MANY OPERANDS SPECIFIED'
MEXIT
.GOOD AIF (T'&FLAG NE 'O').BEGIN
MNOTE 12,'AN OPERAND IS REQUIRED'
MEXIT
.* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
.* This is a simple macro to make it easier to accurately manipulate *
.* a bit flag definition just by the equated bit mask name -- i.e., *
.* the macro does not need to know the name of the actual flag byte *
.* nor the flag byte even have to have a name at all. *
.* *
.* As presented by the late Dr. John Ehrman of IBM at SHARE. *
.* *
.* The idea is, you can have a definition similar to either of the *
.* following. The actual flag byte does not need a name but you can *
.* specify one if you want it to show up in the cross-reference or *
.* if you want the equated bit masks to follow the flag byte def- *
.* inition. The equated bit masks then take on the location of the *
.* flag byte and the length of the equated bit mask is set to the *
.* bit mask, itself. *
.* *
.* FLAG1 EQU *,B'00000001' *
.* FLAG2 EQU *,B'00000010' *
.* FLAG3 EQU *,B'00000100' *
.* FLAG4 EQU *,B'00001000' *
.* FLAG5 EQU *,B'00010000' *
.* FLAG6 EQU *,B'00100000' *
.* FLAG7 EQU *,B'01000000' *
.* FLAG8 EQU *,B'10000000' *
.* DS BL1 MY FLAG BYTE *
.* *
.* MYFLAG DS BL1 MY FLAG BYTE *
.* FLAG1 EQU MYFLAG,B'00000001' *
.* FLAG2 EQU MYFLAG,B'00000010' *
.* FLAG3 EQU MYFLAG,B'00000100' *
.* FLAG4 EQU MYFLAG,B'00001000' *
.* FLAG5 EQU MYFLAG,B'00010000' *
.* FLAG6 EQU MYFLAG,B'00100000' *
.* FLAG7 EQU MYFLAG,B'01000000' *
.* FLAG8 EQU MYFLAG,B'10000000' *
.* *
.* NOTE: See also the SF macro and the CF macro. *
.* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
.BEGIN ANOP
&LABEL TM &FLAG,L'&FLAG TEST FLAG BIT(s)
MEND
Sincerely,
Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300
Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio 45439 USA
(937) 294-5331
*********************************************************************************************
This email message and any attachments is for use only by the named
addressee(s) and may contain confidential, privileged and/or proprietary
information. If you have received this message in error, please
immediately notify the sender and delete and destroy the message and all
copies. All unauthorized direct or indirect use or disclosure of this
message is strictly prohibited. No right to confidentiality or privilege
is waived or lost by any error in transmission.
*********************************************************************************************