My apologies. I did not realize the context and rqmnts. were so well defined. Mike -----Original Message----- From: IBM Mainframe Assembler List [mailto:[email protected]] On Behalf Of Paul Gilmartin Sent: Tuesday, June 2, 2020 10:55 PM To: [email protected] Subject: Re: Returning bool and similar values from subroutines (was z/OS HLASM: EQU for statement labels)
Caution! This message was sent from outside your organization. On 2020-06-02, at 19:37:25, Gary Weinhold wrote: > > I recall that VM/370 CP routines set CC before returning to the > caller; I don't have access to the source anymore (for the last 30 > years or so) to verify this and what technique was used. I just > remember thinking it was different and clever (coming from a VS1/MVS > background). > I'd guess stuffing it in the Old PSW before LPSW returns to caller. > On 2020-06-02, at 18:45:20, Mike Hochee wrote: > > Hmmm... > > "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." > > Perhaps technically 'correct', in that it worked, but why run the risk of > having a customer stumble over the eventual bad fruit borne of the seemingly > enlightened developer decades earlier, but since maintained by lesser souls. > 'Danger Will Robinson! Danger!!!' > No. This is not a case where "It happens to work despite lack of documentation, so I'll rely on it." I've inveighed against such practice elsewhere. Rather, I relied only on the instructions' working as specified in the PoOps. Our requirements were: o Status returned in CC. o Correct operation on 370 where IPM/SPM were unavailable. o Correct operatioh in AMODE 31. It's always possible that an ignorant maintainer break things. "Mit der Dummheit kämpfen Götter selbst vergebens." LH; LA would probably break in AMODE 64. This was not a concerm those decades ago. SH would be no better. -- gil
