In order to make a simple trick like this easy to maintain by someone else in the future, or even myself (since my intricately detailed memory is rather short-lived), I would want to write so much documentation into the code that I would rather spend much less time and write three copies of the macro to make the code triple-pathed.
Bill Fairchild Programmer Rocket Software 408 Chamberlain Park Lane * Franklin, TN 37069-2526 * USA t: +1.617.614.4503 * e: bfairch...@rocketsoftware.com * w: www.rocketsoftware.com -----Original Message----- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Robert A. Rosenberg Sent: Sunday, February 10, 2013 2:43 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: DSPSERV with SCOPE=? At 12:34 +0000 on 02/10/2013, esst...@juno.com wrote about Re: DSPSERV with SCOPE=?: >Robert Rosenberg wrote >>Why not just multi-path logic? You pass a flag for the scope in >>pass_scope as 0=SINGLE, 4=ALL, 8=COMMON and go: > >I actually use a similiar logic now, I was trying to get a single >routine and once instance of the macro. > OK. Try this trick. Assemble the macro 3 times and see what the setting in the parms is for the scope values. The current code does a MF=E to a MF=L template. Use the Macro as usual but follow it with an ORG *-4 to back up over the BALR (or whatever the call is) and then add your own modification to the MF=L using the correct value from the 3 test assemblies followed by the overlaid instruction. IOW: Instead of having three copies of the macro call, just have one but simulate the MF=E instruction that you can not make dynamic. >---------- Original Message ---------- >From: "Robert A. Rosenberg" <a...@rarpsl.com> >To: ASSEMBLER-LIST@LISTSERV.UGA.EDU >Subject: Re: DSPSERV with SCOPE=? >Date: Sat, 9 Feb 2013 15:32:25 -0500 > >At 15:53 +0000 on 02/09/2013, esst...@juno.com wrote about DSPSERV with >SCOPE=?: > >>I would like to develope a single routine which is passed parameters, >>but the SCOPE= parameter does not seem to allow a parameter to be >>passed. >>For Example: >> DSPSERV CREATE, >> NAME=DSP_NAME, >> SCOPE=SINGLE, >> STOKEN=DSP_STOKEN, >> BLOCKS=DSP_BLOCKS, >> ORIGIN=DSP_ORIGIN, >> NUMBLKS=DSP_#BLK, >> MF=(E,WRKDSPLI) >>* >> >>Are there any recommended techniques that can be used to supply a >>Variable for SCOPE ? >>I was hoping I could use a register for it. > >Why not just multi-path logic? You pass a flag for the scope in >pass_scope as 0=SINGLE, 4=ALL, 8=COMMON and go: > > L R1,pass_scope > B *+4(R1) > B SINGLE > B ALL > B COMMON >* >SINGLE DSPSERV CREATE, > NAME=DSP_NAME, > SCOPE=SINGLE, > STOKEN=DSP_STOKEN, > BLOCKS=DSP_BLOCKS, > ORIGIN=DSP_ORIGIN, > NUMBLKS=DSP_#BLK, > MF=(E,WRKDSPLI) > B DONE >ALL DSPSERV CREATE, > NAME=DSP_NAME, > SCOPE=ALL, > STOKEN=DSP_STOKEN, > BLOCKS=DSP_BLOCKS, > ORIGIN=DSP_ORIGIN, > NUMBLKS=DSP_#BLK, > MF=(E,WRKDSPLI)ALL > > B DONE >COMMON DSPSERV CREATE, > NAME=DSP_NAME, > SCOPE=COMMON, > STOKEN=DSP_STOKEN, > BLOCKS=DSP_BLOCKS, > ORIGIN=DSP_ORIGIN, > NUMBLKS=DSP_#BLK, > MF=(E,WRKDSPLI) >DONE DS 0H