Hi Joe,
You are forgetting that '=H' creates a storage area of a half-byte, which is addressed by the RX Instruction.
Here is what happens:
  Active Usings: None
  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement                                  HLASM R6.0  2021/10/23 20.37
000000                00000 0000A     1 TEST CSECT
                 R:F  00000           2          USING *,15
000000 4820 F008            00008     3          LH 2,=H'-5'
                                      4 END
000008 FFFB                           5                =H'-5'

Regards,
David

On 2021-10-23 20:18, Joe Monk wrote:
OK then explain this:

LH is an RX format instruction. What are the D, X and B values if the
second operand is simply =H'-5'?

Joe

On Sat, Oct 23, 2021 at 6:49 PM Paul Gilmartin <
[email protected]> wrote:

On Sat, 23 Oct 2021 18:36:54 -0500, Joe Monk wrote:

LH is an RX instruction.

So, LH 3,=H'-5' would give an addressing exception, no? Because the second
operand is treated as coming from storage? So that would be a negative
address?

No.

If you said LH 3,0(=H'-5',2), that would give you ITEM+5?

You have a bad use-versus-mention conflation.  The value of an
object is not the address of that object.
<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FUse%25E2%2580%2593mention_distinction&amp;data=04%7C01%7C%7C5e84fc92bdc04108c95108d99683ec8e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637706315699635719%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=vdAJBoVajwyo3xC%2FjxfrXB94px9%2FVKJNgGIexK%2Fc2WA%3D&amp;reserved=0>


On Sat, Oct 23, 2021 at 6:01 PM Bernd Oppolzer wrote:
LA   2,ITEM+10
LH   3,=H'-5'
LA   2,0(2,3)

will put the address ITEM+5 in register 2, at least in AMODE 24/31?

I agree.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to