>Better-featured assemblers provide symbols with local scope for this purpose.

QUAL in IBMAP


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Assembler List <ASSEMBLER-LIST@listserv.uga.edu> on behalf 
of Paul Gilmartin <00000014e0e4a59b-dmarc-requ...@listserv.uga.edu>
Sent: Wednesday, August 1, 2018 7:05 PM
To: ASSEMBLER-LIST@listserv.uga.edu
Subject: Re: EQU * considered harmful

On 2018-08-01, at 16:23:25, Gord Tomlin wrote:
>
> Here's one to rail about: branching to a hard coded offset from the current 
> location, e.g.,
>         B     *+12
>
> This is a tire fire waiting to happen.
>
Better-featured assemblers provide symbols with local scope for this purpose.

&SYSNDX is a boon here.  How many "B *+12" in SYS1.MACLIB ought to be replaced
with &SYSNDX.  But this clutters the cross-reference listing.

Long ago I worked with a simple Pascal compiler.  It didn't generate assembler
code, but branches to hard-coded offsets were endemic, and caused "tire fire"
when I changed the code generation.  Finally, I took the effort to ferret out
every one to defer calculating the offset and backfill from the target.  Mostly
piggybacked on existing logic for resolving GOTO displacements.

-- gil

Reply via email to