And you need to be careful to code 

AH    12,AFLENG-DFHAFCB(,12)  Note comma

And not

AH    12,AFLENG-DFHAFCB(12)  Note missing comma

The first uses R12 as a base register; the second uses R12 as an index
register off of a base of 0. They will execute and produce the same results
in *most* cases with two caveats:

1. In the old days using an index register slowed things down by a cycle or
so. I don't know in the brave new world of pipelines. 
2. If you are in Access Register mode -- and you probably are not -- they
will likely produce different results, because the former uses AR12 and the
latter does not.

The comma is critical in storage-storage instructions:

CLC 0(12),=C'FOO' Does not do what it appears to do at all. It compares 12
bytes starting at absolute address 0 to 'FOO' plus 9 unspecified bytes.
(Note the thread here about inadvertent references to low "core.")

CLC MYDSECTFIELD,=C'FOO' does not have that pitfall.

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]]
On Behalf Of Swarbrick, Frank
Sent: Thursday, March 30, 2023 12:37 AM
To: [email protected]
Subject: Re: [EXTERNAL] Re: alternative to USAGE statement?

Well, the version without USING (not USAGE, of course), was not obvious at
all to me until a few days ago, after 20 years of seeing it and not
understanding it...  Now that I understand it, though, I do find it quite
readable.  And I think I agree with your personal rule.

Reply via email to