SVC 5 (0A05)

FREEMAIN macro - is type 1, gets LOCAL lock.

Calls module IGVVSM24, entry point IGC005.

Note: The GETMAIN/FREEMAIN interface provided by SVC 5 can be called in either 24-bit or 31-bit addressing mode. Storage area addresses and lengths are treated as 24-bit addresses and values. If the caller's addressing mode is 31-bit, the parameter list address and the pointers to the length and address lists in the parameter list, if present, are treated as 31-bit addresses. Otherwise, they are treated as 24-bit addresses with the high byte of the address ignored.
GTF data is:
R15 and R0
No applicable data.
R1
Address of the input parameter list.
PLIST
10 bytes, contents are:
Bytes
     
0-3 a. Single area request - length to be freed.
  b. List area request - address of a list of FREEMAIN length requests (1 word per request); last word contains X'80' in byte 0.
  c. Variable Request-zero
4-7 a. Single area request - address of a word containing the address of the area to be freed.
  b. List area request - address of a list of addresses of areas to be freed.
  c. Variable request-address of a doubleword containing the address to be freed in the first word and the length to be freed in the second word.
8 Flag byte, format is:
  00 Unconditional single area request.
  20 Conditional single area request.
  80 Unconditional list area request.
  A0 Conditional list area request.
  C0 Unconditional variable request.
  E0 Conditional variable request.
9 Subpool identification.
Register contents on return:
R15
00 if the storage was freed 04 if the status of the storage is unchanged