A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
22
Task/Memory-allocation/360-Assembly/memory-allocation.360
Normal file
22
Task/Memory-allocation/360-Assembly/memory-allocation.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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue