This is actually a technique I've seen used quite a lot, so I assumed most 
coders would be familiar with it.  It's not *my* preferred approach, but when I 
started working it seemed to be popular with a lot of developers.  The 
advantage is that when testing a flag, you don't have to remember the name of 
the flag byte -- just code TM FLAGNAME,L'FLAGNAME and you're done.  It also 
minimizes code changes if the bit moves to another byte:  only the bit 
definition has to change, not the instructions that reference it.  [Yes, I know 
it has its own problems, such as the fact that it can't be easily used when 
simultaneously testing multiple named bits, because you can't be sure that both 
bits are in the same byte (at least not without adding more code to check the 
locations of the bits), but as I said, it's not my preferred technique.]  It 
might not be part of the standard coding practices that you use, but it's very 
possibly still a coding practice elsewhere.

- mb

> -----Original Message-----
> From: IBM Mainframe Assembler List <[email protected]> On
> Behalf Of Jon Perryman
> Sent: Monday, February 16, 2026 4:46 PM
> To: [email protected]
> Subject: [EXTERNAL] Re: Apparent Test Under Mask Failure
> 
> On Mon, 16 Feb 2026 14:45:43 -0500, David Clark <[email protected]>
> wrote:
> 
> >000872 91C4 8000      00000        1842+         TM
> > REQU_DELETE,L'REQU_DELETE
> >                      00000 000C4   308+REQU_DELETE  EQU *-1,C'D'
> 
> Following standard coding practices exist to help others.
> 
> 1. EQU such as REQU_DELETE should never be a flag, a value and a field
> at the same time. It should only be one of these.
> 
> 2. TM is a bit instruction (e.g. bit 0 & 3 x'10010000') but C'D' tells
> us you think you are dealing with a byte.  Either use a byte instruction
> (e.g. CLI) or specify bits (e.g. x'10010000').
> 
> 3. Using L'xxx is not acceptable for this use of EQU. The EQU can be a
> field, flags or a byte value but should never be all of them. In this
> case, the meaning of L' is not a length. Instead, it's a flag or a byte
> value. In addition, L'xxx is not a length in this use case.
> 
> 4. *-1 while technically correct is not helpful. If you insist on using
> this EQU, then change this reference the actual name instead of *-1.

Reply via email to