On 12/20/2010 1:46 PM, Duffy Nightingale wrote:
I like this idea. But regs are rarely a problem for me. I always use a
couple for code and a couple for storage. Try to keep prog size small. Use
small routines which store work regs at begin of routine, then restore at
routine exit. Same way with using if an area is used almost everywhere
using goes at top. Other than that I put my using at begin of routine, then
drop at end. So have never needed baseless. But the idea below sounds very
good.
[Note: you left your own email address in as the reply-to; I
do that all the time, since it's the default in Thunderbird;
I changed it back to the Assembler list.]
You might find some insights on this page:
http://www.trainersfriend.com/General_content/Book_site.htm
in the paper titled "Applications Assembler Programming for z";
it doesn't refer to the instructions added with the z10 or z196
machines, since it was written before they came out, but you
can get some general ideas about 'baseless' coding.
On Mon, Dec 20, 2010 at 8:03 AM, David Bond<[email protected]> wrote:
My advice is to do what most assembler programmers and most compilers do.
Use base registers for data and relative addressing for instructions.
Since most data access instructions require a base register, most data
areas
will have a base register and USING established before a macro is invoked.
Yes, it is possible to use LARL to set up a temporary base register before
every data access instruction. e.g.
LARL R14,TARGET
LARL R15,SOURCE
MVC 0(L'TARGET,R14),0(R15)
But it is impractical and pipeline hostile to do so.
A good use for LARL is to set up the base register for the constants - and
maybe the modifiable data area if the program is not reentrant. LARL can
even be used to get the address of other control sections. But I think you
are trying to use LARL for everything.
David Bond
On Mon, 20 Dec 2010 10:46:43 -0500, Bodoh John Robert wrote:
David,
I cannot assume anything, except that the CPU on which the program is
running supports baseless instructions. So, the phrase "in general"
doesn't apply.
The fact is, a program could specify a symbol on a macro and the symbol
could reference storage anywhere. It could be a based symbol or a
baseless symbol addressable by relative addressing instructions.
Relative addressing is NOT restricted to branching. LARL is not a
branch.
John
--
Kind regards,
-Steve Comstock
The Trainer's Friend, Inc.
303-393-8716
http://www.trainersfriend.com
* To get a good Return on your Investment, first make an investment!
+ Training your people is an excellent investment
* Try our new tool for calculating your Return On Investment
for training dollars at
http://www.trainersfriend.com/ROI/roi.html