SVC 4 (0A04)

GETMAIN macro - is type 1, gets LOCAL lock.

Calls module IGVVSM24, entry point IGC004.

Note: The GETMAIN/FREEMAIN interface provided by SVC 4 can be called in either 24- 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 parameter list passed when the SVC was called.
PLIST
10 bytes in length; bytes are as follows:
Bytes
0-3 a. Single area request - length requested.
  b. Variable request - address of a doubleword containing the minimum maximum length requested. Format is:
Bytes
0
Zero.
1-3
Minimum length.
4
Zero.
5-7
Maximum length.
  c. List request - address of a list of lengths requested (one word per request); last word contains X'80' in byte 0.
4 Zero
5-7 a. Single area request - address of a word GETMAIN initializes with the address of the area acquired.
  b. Variable area request - address of a doubleword GETMAIN initializes with the address of the area acquired and the actual length allocated.
  c. List request - address of a list of areas that GETMAIN initializes with the addresses of the areas allocated for each requested length in the length list.
8 Flag byte, format is:
  10 Request is for storage aligned on a page boundary.
  00 Unconditional single area request.
  20 Conditional single area request.
  80 Unconditional list request.
  A0 Conditional list request.
  C0 Unconditional variable request.
  E0 Conditional variable request.
9 Subpool identification.
Register contents on return:
R1
unchanged.
R15
  • 00, if storage is available.
  • 04, if storage is not available.