Not bad. It's very useful for assembler programmers to understand the math behind 2s-complement (and how it nicely "complements" wrap-around addressing) thoroughly enough to get that; besides understanding you avoided changing the CC.
But for the record, that's a negative value in an index register. sas On Tue, Jun 2, 2020 at 4:24 PM Paul Gilmartin < [email protected]> wrote: > On 2020-06-02, at 14:01:28, MELVYN MALTZ wrote: > > > > Labels... > > Even back in the 60's I was taught never to put a label on an instruction > > I only break that rule now for the subject of an EX (and its variants) > > > It's safer than > label EQU * > > > Returning CC from a subroutine... > > Have to point out that IBM do this in the VSAM TESTCB macro > > > I had one co-worker who insisted on doing that. He augmented > our MVS/XA common return macro to: > > IPM > ... > SH R13,=Y(workarea_length) > ... > SPM , restore CC > > then *I* was tasked with porting to VM/370. No IPM. I did: > LH R1,=Y(-workarea_length) > LA R13,0(R1,R13) > > I had a tough time in code review. Reviewers called me > naive for using a negative value in a base register. No, > the were ignorant; the code worked and was correct. > > -- gil >
