gtps1m0kSystem Macros

$GETBC-Obtain Storage Block

Use this system macro to obtain a storage block from the control lists and connect that block to the entry control block (ECB) virtual memory (EVM).

Format




label
A symbolic name can be assigned to the macro statement.

SVA=Rx
The register in which the SVM block address is returned. The register specified is loaded with the SVM storage block address on return from the service routine. All registers, except register R13, are valid. The SVA parameter is always valid. It is optional, except when the EVA parameter is invalid or omitted.

FORMAT=Ry
This parameter specifies the format of the block. The register specified contains the block format flag in the rightmost (low-order) byte. All registers, except register R13, are valid. No checking is done to ensure the validity of the format flag supplied.

TYPE=Rz
This parameter specifies the storage block type requested in the low-order (rightmost) byte. The register specified contains the logical storage block type equate (L0, L1, L2, or L4). All registers, except register R13, are valid.

ECB
This parameter specifies whether the storage acquired is connected to the ECB virtual memory (EVM) immediately.

YES
When ECB=YES, the frame containing the block is connected, thereby becoming part of the ECB's virtual memory.

NO
When ECB=NO, the frame containing the block is not connected to an ECB's virtual memory (EVM) at this time. It can later be connected via the $CONBC macro. ADSPACE=EVM may not be coded and ADSPACE=SVM is the default. The EVA parameter may not be coded.

ADSPACE
This parameter gives the address space where the calling code is operating.

EVM
The ECB virtual memory (EVM) is the address space used by ECB-controlled programs. There is one for each ECB in the TPF system. Control program (CP) code can also be executing in the EVM on behalf of the ECB.

SVM
The system virtual memory (SVM) is used mainly by control program (CP) post interrupt routines and interrupt handlers. It is never used by ECB-controlled programs.

EVA=Rw
The register in which the EVM block address is returned. The register specified is loaded with the EVM storage block address on return from the service routine. All registers, except register R13, are valid. The EVA parameter is valid only when ECB=YES is coded. When the SVA parameter is omitted, the EVA parameter is mandatory.

SAVREG
The specified volatile registers will be saved by the macro in the stack area or in the registers specified by the WKREG parameter. Up to 3 registers can be specified. Those registers are R0, R1, R2. If this keyword is omitted, none of the 3 registers will be saved. You should not save a volatile register if you expect it to contain an output parameter. The register will be overwritten with its original contents, since the reload is the last thing performed by the macro.

WKREG
The specified symbolic register names are free to be used by the macro to save the volatile registers coded on the SAVREG parameter. Up to 3 registers can be specified, but the standard linkage registers R13 through R2 cannot be used here. This parameter is used in conjunction with the SAVREG parameter to generate efficient code and enhance the performance of the macro. The number of registers specified by WKREG should be less than or equal to the number of registers specified by SAVREG. If this parameter is omitted or not used to its maximum capacity, code optimization is sacrificed.

Entry Requirements

Return Conditions

Programming Considerations

This macro is for use in the control program (CP) only.

Examples

None.