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