There is a nifty hack for successively testing each switch in a list, that has 
the same odd register in both fields.

-- 
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
עַם יִשְׂרָאֵל חַי
נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר



________________________________________
From: IBM Mainframe Assembler List <[email protected]> on behalf 
of Dan Greiner <[email protected]>
Sent: Wednesday, December 11, 2024 3:28 PM
To: [email protected]
Subject: BXH & BXLE Register Usage

External Message: Use Caution


Having worked with S/360-based architecture for longer than I care to admit, I 
never fully appreciated two architectural peculiarities of the BXH and BXLE 
instructions:
1. The "normal" usage is to have the 3rd operand designate an even-numbered 
register, such that the increment is in the even-numbered register, and the 
compare value is in the odd-numbered (R3+1) register. However, the instruction 
allows the 3rd operand to designate an odd-numbered register, in which case the 
increment and compare value are the same.
2. The 1st- and 3rd-operand registers can be designated as the same register, 
in which case the comparison is performed before the 1st-operand register is 
updated.

Is there any legitimate case where a program would ever specify the 3rd operand 
as an odd-numbered register? Or, even weirder, is there any legitimate case 
where a program would designate the same register for the 1st and 3rd operans?? 
 I can't think of any, and I'm rather surprised that IBM didn't originally 
recognize a specification exception for this. I guess it's simply a case of 
caveat programmator.

Reply via email to