Re: Eliminating Base Registers (was: Inlining routines)

2022-04-03 Thread Seymour J Metz
in Trübner [mar...@pi-sysprog.de] Sent: Saturday, April 2, 2022 12:55 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Eliminating Base Registers (was: Inlining routines) Charles (et al), I like the entry being at the CSECT and the base pointing to the entry of the CSECT (and I am lazy) so

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-02 Thread Bernd Oppolzer
Thanks. When I started programming in ASSEMBLER (and teaching) in the mid 1980s, I didn't think much about base registers in the beginning. I also used one base register when starting the mainline, and I used BAL R5,SUBR and BR R5 to manage my internal subroutines. This worked OK for me.

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-02 Thread Charles Mills
mbler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Martin Trübner Sent: Saturday, April 2, 2022 9:56 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Eliminating Base Registers (was: Inlining routines) Charles (et al), I like the entry being at the CSECT and the base pointing to

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-02 Thread Martin Trübner
Charles (et al), I like the entry being at the CSECT and the base pointing to the entry of the CSECT (and I am lazy) so I borrowed  a neat technique from Ed Jaffe I marked it with "<--- this is new " in your sample It costs only 4bytes and helps me. TEST CSECT MAIN1LOCTR

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-02 Thread Charles Mills
Subject: Re: Eliminating Base Registers (was: Inlining routines) A couple of things. One, yes, my assertion that it is easy was based on my own experience primarily with modest-sized programs that I had written myself -- in some cases years earlier. If you are talking about 10,000 lines of spaghetti

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-02 Thread Charles Mills
[mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Bernd Oppolzer Sent: Friday, April 1, 2022 2:51 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Eliminating Base Registers (was: Inlining routines) See some answers below. In general the elimination of base registers for the code section with

Re: Inlining routines

2022-04-02 Thread Peter Relson
Three approaches that would normally be used are macro, a copy file, and LOCTR. Many would avoid a copy file if the source has to be placed in a separate part because it can be harder to maintain. But if multiple modules want to be able to include this same code, macro and copy file are the way

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-01 Thread Bernd Oppolzer
I would like to add: I saw old large programs with mixed code and data areas where some people without much knowlegde simply used 3, 4 or 5 base registers to covers the whole program, no matter if it consisted of code sections, data areas or subroutines. Of course, they ran out of registers.

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-01 Thread Bernd Oppolzer
See some answers below. In general the elimination of base registers for the code section with existing large programs is a major task and needs careful testing. I did this sometimes, and I had many issues and headaches, until the programs worked (again). More hints below ... Kind regards

RES: Eliminating Base Registers (was: Inlining routines)

2022-04-01 Thread João Reginato
- De: IBM Mainframe Assembler List Em nome de Martin Trübner Enviada em: sexta-feira, 1 de abril de 2022 16:54 Para: ASSEMBLER-LIST@LISTSERV.UGA.EDU Assunto: Re: Eliminating Base Registers (was: Inlining routines) VSE does not have IEABRX(X) but it has MAKEREL you can find

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-01 Thread Martin Trübner
VSE does not have IEABRX(X) but it has MAKEREL you can find it on the vmworkshop page http://workshop.velocitysoftware.com/martin/index.shtml Martin

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-01 Thread Charles Mills
y" if you are at a sufficient level. Charles -Original Message- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Dave Clark Sent: Friday, April 1, 2022 12:32 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Eliminating Base Registers

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-01 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 04/01/2022 03:32:42 PM: > Just go for it! Relative branches are 100% goodness, the best thing in > assembler since ICM. Easy as pi. > > Find a B opcode and replace it with a J. Find a BE opcode and replace it > with a JE. Convince yourself of how easy

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-01 Thread Charles Mills
: Eliminating Base Registers (was: Inlining routines) "IBM Mainframe Assembler List" wrote on 04/01/2022 02:14:38 PM: > Where I disagree is on the base register issue. Base registers and > code addressability issues should have gone away. It is pretty > trivial to r

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-01 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 04/01/2022 02:51:13 PM: > some brief comments: > plus IBM macros have to be converted, there should be a macro to do that Thanks. I did some reading at the link subsequently sent to this and I checked my system. Apparently that macro (IEABRCX)

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-01 Thread Charles Mills
11:59 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Eliminating Base Registers (was: Inlining routines) On Apr 1, 2022, at 12:51:13, Gary Weinhold wrote: > > some brief comments: > plus IBM macros have to be converted, there should be a macro to do that > <https://www.ibm.

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-01 Thread Paul Gilmartin
On Apr 1, 2022, at 12:51:13, Gary Weinhold wrote: > > some brief comments: > plus IBM macros have to be converted, there should be a macro to do that > > On 2022-04-01 2:41 p.m., Dave Clark wrote: >> "IBM

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-01 Thread Charles Mills
-write data with read-write data. Charles -Original Message- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Dave Clark Sent: Friday, April 1, 2022 11:42 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Eliminating Base Registers (was: Inlining routines

Re: Eliminating Base Registers (was: Inlining routines)

2022-04-01 Thread Gary Weinhold
some brief comments: plus IBM macros have to be converted, there should be a macro to do that On 2022-04-01 2:41 p.m., Dave Clark wrote: "IBM Mainframe Assembler List" wrote on 04/01/2022 02:14:38 PM: Where I disagree is on the base register issue. Base registers and code addressability

Eliminating Base Registers (was: Inlining routines)

2022-04-01 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 04/01/2022 02:14:38 PM: > Where I disagree is on the base register issue. Base registers and > code addressability issues should have gone away. It is pretty > trivial to replace old branches with their newer relative > counterparts. Should be faster

Re: Inlining routines

2022-04-01 Thread Schmitt, Michael
Of Charles Mills Sent: Friday, April 1, 2022 1:15 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Inlining routines I half agree with Bernd. I would say that unless the code is executed a million times a day (literally) then the inline macro approach is too clever. Compilers have

Re: Inlining routines

2022-04-01 Thread Charles Mills
MBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Inlining routines While in theory something like that could be possible, I would recommend not to do it. The objective of inlining comes from higher level languages, where the cost of subroutine linkage is high, because of local variables, possibly recursive cal

Re: Inlining routines

2022-04-01 Thread Bernd Oppolzer
While in theory something like that could be possible, I would recommend not to do it. The objective of inlining comes from higher level languages, where the cost of subroutine linkage is high, because of local variables, possibly recursive calls (stack management) etc. And maybe there are

Re: Inlining routines

2022-04-01 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 04/01/2022 12:40:09 PM: > You could put the inline code in a macro rather than in a copy member and > put the macro in the source code itself. Yep, that is exactly what I said in the second paragraph of my post. Sincerely, Dave Clark --

Re: Inlining routines

2022-04-01 Thread Charles Mills
] On Behalf Of Dave Clark Sent: Friday, April 1, 2022 9:26 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Inlining routines "IBM Mainframe Assembler List" wrote on 04/01/2022 11:52:54 AM: > What I'm wondering is, is there a reasonable way to have HLASM > inline the code? > >

Re: Inlining routines

2022-04-01 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 04/01/2022 11:52:54 AM: > What I'm wondering is, is there a reasonable way to have HLASM > inline the code? > > I mean, the code would be written as: > > Instruction > Instruction > * here's where I want to insert ROUTINE_A > Instruction > > : > : >

Inlining routines

2022-04-01 Thread Schmitt, Michael
I like to code in assembler as well-structured, even though that's not the maximum possible efficiency. For example, I'll break up the program into subroutines even when the subroutine is only executed from one place. In COBOL this actually is optimal, since the optimizer will inline the