I meant to repost this last year but it slipped through the cracks. If anyone
can help Bill with his registration issue I'd appreciate it. Also, if anybody
has a machine-readable copy of the TR I'd love to see it.
The trick in question relies on the use of the same odd register as the R1 and
R3 in BXH, BXHG, BXLE, BXLEG, JXH, JXHG, JXLE and JXLEG. You can only test 30
consecutive bits with the 32-bit version and 62 with the 64-bit version; the
high and low bits should be zero. The code, arbitrarily picking GR 1 as the odd
register, looks something like:
L R1,STATUS
IF (BXH,R15,r15)
action 1
ENDIF
...
IF (BXH,R15,r15)
action 30
ENDIF
...
STATUS DC A.1(0,flag1,...,flag31,0)
Where the test is a BXH or BXLE depending on which way you want to test.
If you have to work it out with pencil and paper in order to understand what's
going on, welcome to the club. I thought that it was slick the first time I saw
it, and I still think so. I think it would be a good example in PoOps.
--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
עַם יִשְׂרָאֵל חַי
נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר
________________________________________
From: William Collier <[email protected]>
Sent: Wednesday, November 2, 2022 11:27 AM
To: Seymour J Metz
Subject: BXLE instruction
To: Seymour J Metz <[email protected]<mailto:[email protected]>>
Hi,
Last night I enjoyed reading your comment on the IBM-MAIN
listserv:
The slickest thing that I saw in OS/360 was code testing
successive bits using BXH and BXLE.
I would like to respond with the note below. I have followed
(I believe) all the directions for creating a password in order
to be allowed to post a note responding to your note. It hasn't
worked (yet). Would you, in the interest of timeliness, be
willing to post the note below on my behalf? If not, that's OK.
I will figure it out.
Bill Collier
==============================
Re: End of several eras
Back in 1965 IBM Poughkeepsie our job was to write an operating
system for System/360 which would fit into 1K bytes (sic) of an
8k byte machine. I figured out how to use a BXLE instruction to
both test and advance a bit string in a register. It saved us
maybe 30-some bytes. I described this in IBM TR 00.1412-1, June
22, 1966. Thank you, Seymour Metz, for your note reminding us of
the fun we had in those days.
Bill Collier
[email protected]<mailto:[email protected]>