yes, that's exactly what LE does. The PL/1 logic was copied for C and
later became LE.
At the beginning of every function (or procedure), the function prologue
checks if the remaining space in the current
stack segment is sufficient for the needs of the new function. If so,
the next available byte pointer (NAB) is simply incremented.
Register 13 (= new base of the DSA) is loaded with the old value of NAB.
(NAB is at register 13 + 72 or 76, IIRC; there are
some bytes AFTER the 72 byte savearea which are used for LE).
If not, an LE function is called which requires a new segment from the
system (subpool 2 in MVS, IIRC) and chains it to
the current segment. NAB is set to the beginning of the new segment. The
new function and its subfunction then start
using the new segment.
HTH, kind regards
Bernd
Am 28.03.2025 um 20:10 schrieb Seymour J Metz:
Starting with PL/I "Optimizing Compiler" IBM has had an architecture where the
main program allocated a Dynamic Storage Area (DSA) for allocating stack frames without
GETMAIN, with provision for chaining additional segment when the initial allocation is
exhausted. Didn't LE inherit that mechanism?
--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
עַם יִשְׂרָאֵל חַי
נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN