The Language Environment storage manager provides a service that returns the next available byte address for the user stack to the caller. CEEVGTUN is a S/370-specific CWI (compiler writer interface) that performs this service. CEEVGTUN isolates the user from Language Environment internals. This prevents the problem of having generated code use any of the Language Environment storage management internal control blocks and structures. Only a low-level interface is provided with the following conventions.
Register type | Register number | Register description |
---|---|---|
Input Registers | R0–R11 | Not used. |
R12 | Address of CAA. | |
R13 | Save area address of the CEEVGTUN caller's caller. Note that this save area is not modified by CEEVGTUN. | |
R14 | Return address to the caller. | |
R15 | Address of CEEVGTUN. | |
Output Registers | R0–R14 | Unchanged. |
R15 | Next available byte in the user stack. |
L R15,CEECAACELV-CEECAA(,R12)
L R15,148(,R15)
BALR R14,R15
Use the code sequence shown in Figure 1 only in a library routine, not in compiler-generated code.
CL..0 STM 14,12,12(13) SAVE CALLER'S REGISTERS
L 15,CEECAACELV GET ADDRESS OF LIBVEC
L 15,CEECELVVGTUN-CEECELV(15) LOAD ADDR OF GET USER NAB
SERVICE
BALR 14,15 CALL THE SERVICE
LR Ra,15 LOAD NEW DSA ADDRESS
L 15,16(,13) RESTORE ADDRESSABILITY
L 0,length LOAD DSA LENGTH
ALR 0,Ra GENERATE NEW NAB ADDRESS
...