Or you can just put CODE LOCTR before your entry point instruction.
Here is the slightly edited beginning of one of my modules. This gets the
copyright constant first in the object code, and avoids any extra branches.
(ABEND EDCPRLG is an entry point.)
CZ4MIA$L CSECT
SYSSTATE ARCHLVL=2,OSREL=ZOSV1R6 V1R9 makes no difference?
DATA LOCTR ,
DC C'Copyright 2010, 2015, 2016 CorreLog Inc.'
CODE LOCTR ,
ABEND EDCPRLG DSALEN=CDSALEN,BASEREG=NONE
LARL R12,CZ4MIA$L
USING CZ4MIA$L,R12
Etc.
Charles
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf
Of Tom Marchant
Sent: Thursday, November 15, 2018 8:28 AM
To: [email protected]
Subject: Re: ASMA034E
On Fri, 16 Nov 2018 02:17:47 +1100, Greg Price wrote:
>On 2018-11-16 1:47 AM, Ward Able, Grant wrote:
>> Can someone point me to a reasonably simple example?
>
>If you can do branch instructions then you can do branch-relative
>instructions. Apart from RR instructions (BR, BASR, BALR, BASSM, BSM,
>BAKR and any others I've missed) replace the B that starts the branch
>instruction mnemonic with BR, or as I prefer to do, with J (for jump).
>
>eg. BNH -> JNH and BCT -> JCT and BAS -> JAS etc.
The only thing that you can't do is an indexed branch, where you use a
base register and an index register.
>Put all the stuff which needs to be cover by a base register after all
>the instructions, and start the area with a label, and "use" that.
That's one way to do it. Another is to consolidate all the constants at the
beginning of the program using LOCTR. For example, like this:
PROGNAME J START
DATA LOCTR
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN