Re: Based vs. Relative (was: Internal Exit Routine Handling)

2023-11-09 Thread Steve Smith
You forgot the 4th, 20-bit based signed displacement (Y & G-suffixed instructions). Just to have a chance at misremembering, I think that's about +/- half a MB. sas On Thu, Nov 9, 2023 at 1:33 PM Seymour J Metz wrote: > There are only three sizes: > > legacy, 12 bits, unsigned, 4 Ki byts >

Re: Based vs. Relative

2023-11-09 Thread Farley, Peter
Yes he did – he called it MAKEREL and you can get it here: http://vmworkshop.org/martin/makerel.zip The page that file is hosted on can be found here: http://vmworkshop.org/martin/index.shtml HTH Peter From: IBM Mainframe Assembler List On Behalf Of Ed Jaffe Sent: Thursday, November 9,

Re: Internal Exit Routine Handling

2023-11-09 Thread Seymour J Metz
The relative instructions are invaluable for large csects, but in this case I believe that they are overkill. All he needs is the judicious placement of DROP. OTOH, they are definitely instructions worth his time to learn. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל

Re: Based vs. Relative (was: Internal Exit Routine Handling)

2023-11-09 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 11/09/2023 12:54:36 PM: > > But in addition to up to 4K, you can actually > > do up to +/- 65K. > OK, so the "normal" relative jump is the signed, 16-bit variety > mentioned (15-bit relative target with left-most bit as the direction). > How is

Re: Based vs. Relative (was: Internal Exit Routine Handling)

2023-11-09 Thread Seymour J Metz
There are only three sizes: legacy, 12 bits, unsigned, 4 Ki byts relative, 16 bits, signed, +/- 32 Ki HW = +/- 64 Ki bytes relative long, 32 bits, signed, +/- 2 Gi HW = +/- 4 Gi bytes -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל חַי

Re: Based vs. Relative (was: Internal Exit Routine Handling)

2023-11-09 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 11/09/2023 12:53:26 PM: > I would personally find > If condition > Then > 200 lines of code > Else > 150 lines of code > End-if > hard to navigate. I don't disagree with you. But if you allow someone to do a

Re: Based vs. Relative

2023-11-09 Thread Tony Harminc
On Thu, 9 Nov 2023 at 12:54, Steve Thompson wrote: > To get to relative operations, there is an IBM supplied macro > that one can include right at the top of your source and it can > be turned on/off as needed. > > As I recall, it does OPSYN to get rid of based branch (jump) and > uses the

Re: Based vs. Relative (was: Internal Exit Routine Handling)

2023-11-09 Thread Tom Marchant
On Thu, 9 Nov 2023 12:54:36 -0500, Dave Clark wrote: >"IBM Mainframe Assembler List" wrote on >11/09/2023 12:33:58 PM: >> Principles is your friend! > >Yes, I will be doing some reading. But a few quick answers are >helpful. > Please do. It isn't that hard to look up one instruction

Re: Based vs. Relative

2023-11-09 Thread Ed Jaffe
On 11/9/2023 10:26 AM, Dave Clark wrote: Thanks, but the IEABRCX macro doesn't exist in the z/VSE world. ISTR Martin Trübner wrote an equivalent macro for z/VSE. -- Phoenix Software International Edward E. Jaffe 831 Parkview Drive North El Segundo, CA 90245

Re: Based vs. Relative (was: Internal Exit Routine Handling)

2023-11-09 Thread Gary Weinhold
For the question about use in structuring macros, the first question would be is how many concurrent base registers are usually in play; that would help determine whether to choose regular or long displacement instructions. The other consideration is structured code style. Within an

Re: Based vs. Relative

2023-11-09 Thread Steve Thompson
To get to relative operations, there is an IBM supplied macro that one can include right at the top of your source and it can be turned on/off as needed. As I recall, it does OPSYN to get rid of based branch (jump) and uses the relative version. I'm sorry, I'm not doing ALC right at this

Re: Based vs. Relative (was: Internal Exit Routine Handling)

2023-11-09 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 11/09/2023 12:33:58 PM: > Principles is your friend! Yes, I will be doing some reading. But a few quick answers are helpful. > But in addition to up to 4K, you can actually > do up to +/- 65K. OK, so the "normal" relative jump is the

Re: Based vs. Relative

2023-11-09 Thread Paul Gilmartin
On 11/9/23 10:54:39, Steve Thompson wrote: To get to relative operations, there is an IBM supplied macro that one can include right at the top of your source and it can be turned on/off as needed. As I recall, it does OPSYN to get rid of based branch (jump) and uses the relative version.

Re: Based vs. Relative

2023-11-09 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 11/09/2023 01:18:37 PM: > On 11/9/23 10:54:39, Steve Thompson wrote: > > As I recall, it does OPSYN to get rid of based branch (jump) and > uses the relative version. > > >

Re: Internal Exit Routine Handling

2023-11-09 Thread Ed Jaffe
On 11/9/2023 4:06 AM, Seymour J Metz wrote: The relative instructions are invaluable for large csects, but in this case I believe that they are overkill. All he needs is the judicious placement of DROP. OTOH, they are definitely instructions worth his time to learn. In addition to extending

Based vs. Relative (was: Internal Exit Routine Handling)

2023-11-09 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 11/09/2023 11:27:20 AM: > IMHO, relative branch use is a "best practice" in all situations. I > *never* use a based branch if an equivalent relative branch will suffice... I've been coding based-branches since 1980 and never moved on to the

Re: Internal Exit Routine Handling

2023-11-09 Thread Seymour J Metz
Given that jumps are no longer than the equivalent branches, that's hard to argue with. LAY and LHI are other ones that I would expect to see used a lot, possibly more than LARL. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל חַי

Re: Based vs. Relative (was: Internal Exit Routine Handling)

2023-11-09 Thread Seymour J Metz
Jumps (branch relative) have a 16-bit signed offset; that's a lot of addressability. I see no reason to use relative long (32-bit signed) in the normal course of events. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל חַי

Re: Based vs. Relative (was: Internal Exit Routine Handling)

2023-11-09 Thread Charles Mills
Principles is your friend! I found the transition from based to relative to be relatively (ha ha) painless. You don't have to do it all at once. Just start coding relative jumps now. The existence of base register does not preclude using relative jumps. Then when you get comfortable, comment out