View previous topic :: View next topic |
Author |
Message |
dtf Beginner
Joined: 10 Dec 2004 Posts: 110 Topics: 8 Location: Colorado USA
|
Posted: Wed Nov 30, 2005 12:53 pm Post subject: LE Assembler - Call not returning |
|
|
I am trying to debug a situation where I have an LE compliant Assembler program which issues a LOAD and a BASSM to a second Assembler program (Also LE compliant). The second program is the mainline of a large composite load module consisting of hundreds of assembler and COBOL routines.
Everything seems to go along fine, but for some reason when the called assembler routine terminates, it does not return to the caller.
I have seen this situation occur when in the calling chain, a STOP RUN is issued by a called COBOL program, but I am quite certain this is not occuring.
I am wondering though if this is being caused by the fact that the called routine is also set as being a "MAIN" program in its CEEENTRY macro call. I could change this if need be, but would prefer not to, since this layer that I am adding is not how the CALLED routine is normally invoked.
________
buy iolite vaporizer
Last edited by dtf on Tue Feb 01, 2011 2:03 pm; edited 1 time in total |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Nov 30, 2005 3:16 pm Post subject: |
|
|
dtf,
The following is an C&P from the internet. see if this helps.
On IBM mainframes there was/is a standard linkage convention to be followed that uses a standard 18 fullword save area and certain standard register usage conventions. Register 15 contains the "branch to" address and Register 14 contains the "Return address". So to "call" another program you would do
Code: |
L R15,=V(MYSUBRTN)
BALR R14,R15
|
Another part of this linkage convention is that the calling program provide within its storage an 18 fullword save area that the subroutine can use to save the callers registers. The standard is that Register 13 will point to this save area at entry to the subroutine. The save areas themselves contain standard offsets where the register contents are saved plus there are forward/backward pointers that chain the save areas together into a linked list stack. Usually the first thing a subroutine does is save the caller's registers and set register 13 to point to it's save area. When an abend occurs a save area trace is produced in the dump and shows the call chain. In assembly language there are SAVE and RETURN macros and the RETURN macros has an option that can be used to set a bit in the save area to indicate to the dump program that a save area is no longer active. When a subroutine ends it restores the callers registers and branches to the return address.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
MikeBaker Beginner
Joined: 04 May 2004 Posts: 96 Topics: 9
|
|
Back to top |
|
 |
dtf Beginner
Joined: 10 Dec 2004 Posts: 110 Topics: 8 Location: Colorado USA
|
Posted: Thu Dec 01, 2005 1:27 pm Post subject: |
|
|
Well, as it turns out, this routine actually terminated not by a return to the operating system, but by calling a CEE routine to shutdown LE. I modified this to instead return via R14 and it now works fine.
________
Ford L-Series Trucks history |
|
Back to top |
|
 |
|
|