Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
22
Task/Memory-allocation/360-Assembly/memory-allocation-1.360
Normal file
22
Task/Memory-allocation/360-Assembly/memory-allocation-1.360
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
* Request to Get Storage Managed by "GETMAIN" Supervisor Call (SVC 4)
|
||||
LA 1,PLIST Point Reg 1 to GETMAIN/FREEMAIN Parm List
|
||||
SVC 4 Issue GETMAIN SVC
|
||||
LTR 15,15 Register 15 = 0?
|
||||
BZ GOTSTG Yes: Got Storage
|
||||
* [...] No: Handle GETMAIN Failure
|
||||
GOTSTG L 2,STG@ Load Reg (any Reg) with Addr of Aquired Stg
|
||||
* [...] Continue
|
||||
* Request to Free Storage Managed by "FREEMAIN" Supervisor Call (SVC 5)
|
||||
LA 1,PLIST Point Reg 1 to GETMAIN/FREEMAIN Parm List
|
||||
SVC 5 Issue FREEMAIN SVC
|
||||
LTR 15,15 Register 15 = 0?
|
||||
BZ STGFRE Yes: Storage Freed
|
||||
* [...] No: Handle FREEMAIN Failure
|
||||
STGFRE EQU * Storage Freed
|
||||
* [...] Continue
|
||||
*
|
||||
STG@ DS A Address of Stg Area (Aquired or to be Freed)
|
||||
PLIST EQU * 10-Byte GETMAIN/FREEMAIN Parameter List
|
||||
DC A(256) Number of Bytes; Max=16777208 ((2**24)-8)
|
||||
DC A(STG@) Pointer to Address of Storage Area
|
||||
DC X'0000' (Unconditional Request; Subpool 0)
|
||||
33
Task/Memory-allocation/360-Assembly/memory-allocation-2.360
Normal file
33
Task/Memory-allocation/360-Assembly/memory-allocation-2.360
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
STOREXNO AMODE 31
|
||||
STOREXNO RMODE ANY
|
||||
STOREXNO CSECT ,
|
||||
SYSSTATE AMODE64=NO,ARCHLVL=3 gen z9+, z/OS 2.1+ bin code
|
||||
IEABRCX DEFINE convert based to relative branches
|
||||
BAKR 14,0 callers registers to linkage stack
|
||||
LARL 12,CONSTANTS load address relative long
|
||||
USING CONSTANTS,12 using for constants
|
||||
LA 9,WALEN load memory length in Register 9
|
||||
STORAGE OBTAIN,LENGTH=(9),EXECUTABLE=NO,LOC=ANY
|
||||
LR 10,1 Reg1 holds address of mem area
|
||||
USING DYNAREA,10 using for dynamic memory area
|
||||
LA 13,SAVEA PC routine convention: ...
|
||||
MVC SAVEA+4(4),=C'F1SA' ... format 1 savearea: L-stack
|
||||
*
|
||||
* copy instruction sequence SR Reg15,Reg15; Branch Reg14 to DATA1
|
||||
* in obtained storage location, and branch to it
|
||||
*
|
||||
MVC DATA1(8),=X'1BFF07FE00000000' SR 15,15; BR 14
|
||||
LA 7,DATA1
|
||||
BASR 14,7 This will OC4-4 with EXECUTABLE=NO
|
||||
STORAGE RELEASE,ADDR=(10),LENGTH=(9),EXECUTABLE=NO
|
||||
PR , return to caller
|
||||
CONSTANTS DS 0D constant section, aligned for LARL
|
||||
DC C'SOMEDATA'
|
||||
DC C'SOMEOTHERDATA'
|
||||
LTORG , have assembler build literal pool
|
||||
DYNAREA DSECT
|
||||
SAVEA DS 18F
|
||||
DATA1 DS 2F
|
||||
DATA2 DS CL256 can receive any value
|
||||
WALEN EQU *-DYNAREA length of obtained area
|
||||
END STOREXNO end of module
|
||||
Loading…
Add table
Add a link
Reference in a new issue