Yes, of course. I detected the error when I looked at
my piece of software from last year which examined the different LE heaps.
and: thank you, Allan Kielstra, for the clarification regarding Reg 12;
so my call to the ASSEMBLER function to get the address of the CEECAA
will work?
Here is the ASSEMBLER program which returns the registers (especially
reg 12)
to the C program:
MDV9970 CSECT
MDV9970 AMODE 31
MDV9970 RMODE ANY
*
***************************************************************
* UNTERPROGRAMM ZUR ERMITTLUNG DER
* AKTUELLEN REGISTERSTAENDE UND ABLAGE
* IN EINEN C-BUFFER (DER ALS PARAMETER
* UEBERGEBEN WIRD). ZWECK DER UEBUNG:
* ZUGRIFF AUF CEECAA (COMMON ANCHOR AREA VOM LE)
* UND DAMIT AUF ANYHEAP UND BELOWHEAP
* BERND OPPOLZER / AUGUST 2016
***************************************************************
*
R0 EQU 0
R1 EQU 1
R2 EQU 2
R3 EQU 3
R4 EQU 4
R5 EQU 5
R6 EQU 6
R7 EQU 7
R8 EQU 8
R9 EQU 9
RA EQU 10
RB EQU 11
RC EQU 12
RD EQU 13
RE EQU 14
RF EQU 15
*
STM RE,RC,12(RD) REGISTER SICHERN
USING MDV9970,RF ADRESSIERUNG HERSTELLEN
L R3,0(R1) ADRESSE VOM BUFFER = 1. PARAMETER
MVC 0(52,R3),20(RD) REGISTER 0 BIS 12 AUS SA UEBERTR.
ST RD,52(R3) REGISTER 13 ABSPEICHERN
MVC 56(8,R3),12(RD) REGISTER 14 UND 15 AUS SA UEBERTR.
LM RE,RC,12(RD) REGISTER ZURUECKLADEN
BR RE UND RUECKSPRUNG
*
END MDV9970
Kind regards
Bernd
Am 11.05.2017 um 23:07 schrieb Tom Marchant:
On Thu, 11 May 2017 15:27:38 -0500, Allan Kielstra wrote:
This statement:
CEECSA is always address by reg 12, while inside a LE module.
is not strictly true. GPR12 is only required to point to CEECSA on entry to
and exit from a procedure. Compilers are free to use GPR12 for whatever other
purpose they chose at other program points.
That means that if you get a crash in the middle of a procedure (COBOL PROGRAM)
you should not look at the current value of GPR12. You should go back to the
register save area and find what GPR12 was on entry to the procedure.
(I mention this because with COBOL V5/6, GPR12 actually is often reused inside
COBOL programs.)
I think you both mean CEECAA, the Common Anchor Area.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN