- IBM is pretty much committed to even-halfword instructions because Jump only 
jumps even halfwords.

- You want a confession? You know one reason why I got in the habit of not 
using DS 0H in code? Because when I started out with punched card decks, 24MB 
hard drives and Assembler D, every transition from assembled data to DS and 
back forced a new TXT card and wasted cards and/or DASD space. You may laugh 
now. FWIW, DC 0H'0' avoided the problem but is trickier 029-jockeying than EQU 
*, and every typo cost you your daily shot back in those days.

- I have a house rule to use J (not B!) *+n only to jump over a single 
instruction, never more than one. Yeah, it may be a problem waiting to happen, 
especially now with machine instruction length a little less intuitive (change 
A to AG and there goes your J *+8). What I like about it is that labels invite 
the question "who jumps here?"* so if I can avoid a label I do. It's a 
tradeoff. No one ever said assembler coding was for the faint-hearted.

*A better solution probably is the structured assembler macros but by the time 
they came along I was not writing much assembler, so this old dog never learned 
that new trick.

See you in STL?

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Gord Tomlin
Sent: Wednesday, August 1, 2018 3:23 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: EQU * considered harmful

On 2018-08-01 16:41, Charles Mills wrote:
> "Avoid instructions (executable code) and operand data (working storage or 
> stack storage) in the same cache lines; which
> can be costly due to moving cache lines between the separated (split) local 
> caches (instruction/data L1/L2)"
> 
> -- C. Kevin Shum, Distinguished Engineer, IBM z Systems Microprocessor 
> Development (March 2016)
> 
> Charles

Exactly.

"Mixing executable code and operand data considered harmful"

And if you always avoid mixing instructions and operand data, using EQU 
* for labels in code is no longer potentially harmful. We're on pretty 
safe ground if we assume IBM will always only create instructions that 
are an even number of bytes in size. I prefer, and always use, DS 0H for 
labels in code, but if EQU * causes problems in your code you have other 
things to clean up.

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.

Reply via email to