Paul, It sounds like you're agreeing with me: There is a limitation in macros.
John -----Original Message----- From: IBM Mainframe Assembler List [mailto:assembler-l...@listserv.uga.edu] On Behalf Of Paul Gilmartin Sent: Monday, December 20, 2010 11:54 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Baseless vs Based On Dec 20, 2010, at 09:30, David Bond wrote: > Except for some of the most recent additions to the architecture, data > fields (including constants) need to be addressed via base register. > Setting it up via LARL does not change that fact. > > The convention for macros usually is: If a symbol is supplied then it can be > addressed via a pre-established base register and USING. Otherwise the > address can be passed in a register, using the (reg) notation. If the > module has not set up a base register and USING for a symbol prior to > calling the macro then the module is in error. > You're merely restating a restriction arising from outmoded hardware design from which the OP is trying to liberate himself. In days of yore, there was only one way to access data referenced by a symbol. Now there are two (three, at least, if you add immediate.) The macro processor is limited in its ability to exploit this new facility. I suppose that if the OP has a register available, perhaps R15 to be subsequently to return status, he could: PUSH USING BALR R15,0 USING *,R15 ... stuff ... POP USING This supports only a restricted relative displacement range, and invites overlapping USING warnings. > On Mon, 20 Dec 2010 11:16:59 -0500, Bodoh John Robert wrote: >> >> No, I'm not trying to use LARL for everything. I just want to use it >> for the case when a code developer specifies a symbol that references a >> storage area that can only be referenced by using LARL. That is, no >> base register. Some of my macro usage would be for a particular symbol >> to "usually" be a constant, but would not have to be a constant. For >> example, I have a macro that generated the parameter list to IEANTCR. >> The LEVEL that is passed is usually a constant, but it wouldn't have to >> be. If it's a constant within the CSECT and the CSECT does not have a >> base register, LARL would be the only way to obtain the address of the >> LEVEL. In all other cases, a LA would work. >> Even more generally, there are numerous ways to place a value in a storage location or a register, such as "LH; ST", "LHI; ST"; "XC; MVI", ... Compilers regularly make optimized choices among such techniques. But IBM's support for customers' using available compilers for systems programming is meager and IBM's favorite compiler is unavailable to customers. (NDA? Anyone who knows wouldn't be allowed to tell.) -- gil