Re: SHI instruction

2021-12-21 Thread Paul Gilmartin
> On Dec 20, 2021, at 12:57:41, Alan Atkinson  wrote:
> 
> Which is just what we did - but turned it onto a macro.
> 
> MACRO
> SHI   ,   SUBTRACT HALFWORD IMMEDIATE
> AHI   ,-()
> 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:
AEQU   -X'8000'

* I can do:
 SH1,=Y(A)

* but not:
 AHI   1,-A

-- gil


Re: SHI instruction

2021-12-20 Thread Keven Hall
Simpler still: Just code the AHI  instruction with a negated argument.

Keven 

> On Dec 20, 2021, at 13:57, Alan Atkinson  wrote:
> 
> Which is just what we did - but turned it onto a macro.
> 
> MACRO
> SHI   ,   SUBTRACT HALFWORD IMMEDIATE
> AHI   ,-()
> MEXIT
> MEND
> 
> On 12/20/21, 1:06 PM, "IBM Mainframe Assembler List on behalf of Ed Jaffe" 
>  
> wrote:
> 
> 
> EXTERNAL 
> 
> 
>==
>>On 12/20/2021 10:03 AM, industryn...@winwholesale.com wrote:
>>AHI   ,()*-1
> 
>Or you could simply use:
> 
>   AHI ,-()
> 
>-- 
>Phoenix Software International
>Edward E. Jaffe
>831 Parkview Drive North
>El Segundo, CA 90245
>https://www.phoenixsoftware.com/
> 
> 
>
> 
>This e-mail message, including any attachments, appended messages and the
>information contained therein, is for the sole use of the intended
>recipient(s). If you are not an intended recipient or have otherwise
>received this email message in error, any use, dissemination, distribution,
>review, storage or copying of this e-mail message and the information
>contained therein is strictly prohibited. If you are not an intended
>recipient, please contact the sender by reply e-mail and destroy all copies
>of this email message and do not otherwise utilize or retain this email
>message or any or all of the information contained therein. Although this
>email message and any attachments or appended messages are believed to be
>free of any virus or other defect that might affect any computer system 
> into
>which it is received and opened, it is the responsibility of the recipient
>to ensure that it is virus free and no responsibility is accepted by the
>sender for any loss or damage arising in any way from its opening or use.
> 


Re: SHI instruction

2021-12-20 Thread Alan Atkinson
Which is just what we did - but turned it onto a macro.

 MACRO
SHI   ,   SUBTRACT HALFWORD IMMEDIATE
AHI   ,-()
 MEXIT
 MEND

On 12/20/21, 1:06 PM, "IBM Mainframe Assembler List on behalf of Ed Jaffe" 
 
wrote:


 EXTERNAL 


==
On 12/20/2021 10:03 AM, industryn...@winwholesale.com wrote:
>AHI   ,()*-1

Or you could simply use:

   AHI ,-()

-- 
Phoenix Software International
Edward E. Jaffe
831 Parkview Drive North
El Segundo, CA 90245
https://www.phoenixsoftware.com/




This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.



Re: SHI instruction

2021-12-20 Thread Ed Jaffe

On 12/20/2021 10:03 AM, industryn...@winwholesale.com wrote:

   AHI   ,()*-1


Or you could simply use:

   AHI ,-()

--
Phoenix Software International
Edward E. Jaffe
831 Parkview Drive North
El Segundo, CA 90245
https://www.phoenixsoftware.com/



This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.