True in a Nutshell Appendix: IEFBR14: Yet Further Clarification

8th March 2011

Date: Mon, 7 Mar 2011 21:34:08 -0500
From: "John H Lister" <jhlister@ruscuba.org>
To: <mike@miketaylor.org.uk>
Subject: Yet more on IEFBR14

As a former assembler programmer (with several tens of thousands of lines of code under my belt) I feel compelled to add some comments to Norman Diamond's e-mail about IEFBR14:

"Everyone wrote SR 15,15. No one wrote XOR 15,15."

Yes, we did, but no we didn't: the mnemonic is XR 15,15. And, although the Assembler equivalent of IOCCC hadn't been invented, there were definitely several arcane coding conventions which saved a few cycles and a few bytes, which were critical resources in the days of 2-3MB real memory and limited virtual memory (I joined the OS/360 game a little later: around the time of MVS)

To give you an example: to exchange the values of two registers without using external storage:

	XR  RA,RB
	XR RB,RA
	XR RA,RB

Try it. Just remember that in IBM register instructions, the first-named register is both the first operand and the result destination.

John Lister

Former Systems Programmer for National Westminster Bank Ltd, Manufacturers Hanover Trust Corporation, Shearson Lehman Brothers, Lehman Brothers, Citibank and Morgan Stanley!

Feedback to <mike@miketaylor.org.uk> is welcome!