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 IF-THEN-ELSE
structure (or even a CASE structure) inplemented in assembler, how much code do
you really want between structure elements before you really want to imbed the
code in a out-of-line subroutine using JAS or LARL and BASR to access it? I
would personally find
If condition
Then
200 lines of code
Else
150 lines of code
End-if
hard to navigate.
Gary Weinhold
Senior Application Architect
DATAKINETICS | Data Performance & Optimization
Phone:+1.613.523.5500 x216
Email: [email protected]
Visit us online at www.DKL.com
E-mail Notification: The information contained in this email and any
attachments is confidential and may be subject to copyright or other
intellectual property protection. If you are not the intended recipient, you
are not authorized to use or disclose this information, and we request that you
notify us by reply mail or telephone and delete the original message from your
mail system.
________________________________
From: IBM Mainframe Assembler List <[email protected]> on behalf
of Charles Mills <[email protected]>
Sent: November 9, 2023 12:33
To: [email protected] <[email protected]>
Subject: Re: Based vs. Relative (was: Internal Exit Routine Handling)
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 the USING and see what
happens.
> I know I can do a relative jump up to 4K, correct
The programmer answer is Yes. But in addition to up to 4K, you can actually
do up to +/- 65K. There are also even longer ones that will jump anywhere.
Charles
-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]]
On Behalf Of Dave Clark
Sent: Thursday, November 9, 2023 9:17 AM
To: [email protected]
Subject: Based vs. Relative (was: Internal Exit Routine Handling)
"IBM Mainframe Assembler List" <[email protected]> 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 new stuff. But I recognize that it would be beneficial if I did. So,
let me ask a couple of simple questions...
Is it, relatively speaking (hehe), "a lot" of effort (or even
possible/practical) to do away with a code base register altogether? The
first place that I would like to switch to relative jumps is in my
structured programming macro sets. But do relative jumps come in more
than one flavor? ...like long jumps and "how far"?
I know I can do a relative jump up to 4K, correct? Is there a
long jump beyond that? And since there can be as much code between the
macros in my macro sets as the user determines to put in there, should I
use long jumps as opposed to "short" jumps, just-in-case?
For example... I have these 4 macros in one of my sets.
Internally, I generate labels for THENnnnn, ELSEnnnn, and ENDFnnnn. These
also arbitrarily allow nesting up to 8 levels.
IF condition,AND/OR,condition
AND condition,AND,condition
... as much code as the user desires between here ...
ELSE
... as much code as the user desires between here ...
ENDIF
Sincerely,
Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300
Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio 45439 USA
(937) 294-5331
****************************************************************************
*****************
This email message and any attachments is for use only by the named
addressee(s) and may contain confidential, privileged and/or proprietary
information. If you have received this message in error, please
immediately notify the sender and delete and destroy the message and all
copies. All unauthorized direct or indirect use or disclosure of this
message is strictly prohibited. No right to confidentiality or privilege
is waived or lost by any error in transmission.
****************************************************************************
*****************