General
Application area: | Working with virtual memory; see "Working with virtual memory" |
Macro type: | Type S, MF format 1: standard/L/E form; see "S-type macros" |
Macro description
REQM requests that a contiguous memory area be assigned to the user program. This area can be released again with RELM. Memory is requested in multiples of one page (4 Kb). The memory allocated is always virtual. Each byte of the allocated page(s) is overwritten with X'00' (except if the page had already been requested).
Macro format and description of operands
REQM |
[{number / (r)}][,{page / (r) / LOC={RES / ANY / BELOW / ABOVE}] ,ALIGN=4KB / HW_PAGE [,PARMOD=24 / 31] ,MF=S / (E,..) / L |
number
Number of pages (4 Kb) to be requested.
Default value: number = 1.
(r)
Register containing “number”.
page
Page number (4 Kb) at which allocation is to begin.
Default setting: Smallest page number of the first area in the caller's class 6 memory which is sufficiently large and has not yet been allocated. The area may be aligned during function execution (e.g. on a multiple of 16 pages) if the number of pages requested exceeds a specific threshold.
Note
This operand should be specified only after an inquiry as to the size and location of the caller's class 6 memory has been made by means of the MINF macro.
(r)
Register containing “page”.
LOC=
Identifies that part of class 6 memory where the memory pages are to be reserved (below or above the 16-Mb boundary).
The operand is ignored if the 24-bit interface is used.
RES
Default setting: memory pages are reserved in that part of class 6 memory where the macro call is issued.
ANY
Memory pages are reserved as follows, depending on the addressing mode in use:
below the 16-Mb boundary if 24-bit addressing mode is activated,
above or below the 16-Mb boundary if 31-bit addressing mode is activated.
BELOW
Memory pages are reserved below the 16-Mb boundary.
ABOVE
Memory pages are reserved above the 16-Mb boundary.
ALIGN=
Specifies the alignment of the requested area.
4KB
The requested area is aligned on 4-Kb boundary.
HW_PAGE
The requested memory area begins on a page boundary determined by the hardware. In this case, the operands “number” and “page” must be used in such a way that a multiple (in 4 Kbyte units) of hardware page sizes is achieved.
Note
The hardware page size can be obtained by the NSIINF INFO=PAGESIZE macro.
MF=
For a general description of the MF operand, its operand values and any subsequent operands (e.g. for a prefix), see section “S-type macros”. The valid MF values are given at the start of the macro description under “Macro type” and are included in the macro format.
PARMOD=
Controls macro expansion. Either the 24-bit or the 31-bit interface is generated.
If PARMOD is not specified here, macro expansion is performed according to the specification for the GPARMOD macro or according to the default setting for the assembler (= 24-bit interface).
24
The 24-bit interface is generated. Data lists and instructions use 24-bit addresses (address space <= 16 Mb).
31
The 31-bit interface is generated. Data lists and instructions use 31-bit addresses (address space <= 2 Gb). Data lists start with the standard header.
Return information and error flags
During macro processing, register R1 contains the operand list address.
After successful execution of the macro, the start address of the allocated area is stored in register R1.
R15:
+---------------+ | | | | | |0|0|0|0|0|0|a|a| +---------------+
A return code relating to the execution of the REQM macro is transferred in register R15.
X'aa' | Meaning |
X'00' | The request has been processed successfully. Register R1 contains the address of the first |
X'04' | Function not executed.
|
X'0C' | Function not executed
|
For the 31-bit interface:
In the event of errors in the initialization of the standard header, the return codes X'0001FFFF' / X'0003FFFF' / X'0004FFFF' are additionally transferred; see table“Standard return codes” (Standard header).
No return codes are transferred in the standard header.