Memory allocation: Difference between revisions

Line 38:
* One of the many functions of STORAGE over GETMAIN/FREEMAIN is illustrated: EXECUTABLE=NO. The code below will execute successfully if EXECUTABLE=YES (or defaulted to), or if running on a pre z14 machine. If on a z14 or newer machine and EXECUTABLE=NO then the module will ABEND S0C4-4.
* The code shows the use of the system supplied linkage stack to save caller's registers (BAKR) and restore them on return (PR), as opposed to STM/LM of the caller's register contents.
* Finally, the code is REENTRANT, meaning it could be loaded in a system module directory (LINKLIST, LPA), and exeutedexecuted simultanuouslysimultaneously by multiple callers. Though not a requirement for this type of sample code it is a best practice in assembler coding.
<lang 360 Assembly>
STOREXNO CSECT ,
Anonymous user