Three Star Assembler

There's an idiom (gimmick, really) used sometimes in 370 Assembler whereby a subroutine returns to either the actual return address or to 4 bytes past the return address depending on success or failure of the routine. Immediately following the BAL (Branch And Link) instruction that calls the subroutine, you have a Branch instruction which takes up 4 bytes. Depending on success or failure, that Branch is either taken or bypassed. In a variation, you might have a different 4 byte instruction, generally one setting a switch.

While assisting another programmer, I once came across a subroutine that did a test for certain bit settings on the instruction at the return address and returned to 6 bytes past the return address. I suspected what was going on, but I grabbed another guy to verify. Seems that for (most) instructions, the bit settings in question indicated a 6 byte instruction. I responded "Cool!", then turned to the first programmer and said "Take it out!". --KielHodges


See also the StoryOfMel.


EditText of this page (last edited May 31, 2014) or FindPage with title or text search