> On Dec 20, 2021, at 12:57:41, Alan Atkinson <[email protected]> wrote:
> 
> Which is just what we did - but turned it onto a macro.
> 
>         MACRO
> &NAME    SHI   &R,&I               SUBTRACT HALFWORD IMMEDIATE
> &NAME    AHI   &R,-(&I)
>         MEXIT
>         MEND
>  
(Are the parentheses needed around a SETA symbol?  I see a SETC symbol
might require them.  I'd prefer that they appear at the point of
definition:
$C.      SETC  '(100-58)'
... if tradition hadn't overloaded them to mean register reference.)

There's a slight gap due to the asymmetric 2's complement range.  Consider:

* if:
A        EQU   -X'8000'

* I can do:
         SH    1,=Y(A)

* but not:
         AHI   1,-A

-- gil

Reply via email to