***********************************************************************
* CSECT-NAME: BPXT4KGT
*
* DESCRIPTIVE-NAME: Allocate storage on a page boundary with key.
* Storage is allocated in subpool 229.
*
* Input: R1 - Parm list
* length of storage to obtain
* key for storage
*
* Output: R15 - address of storage obtained
***********************************************************************
BPXT4KGT CSECT
BPXT4KGT AMODE ANY
BPXT4KGT RMODE ANY
ENTRY BPXT4KGT
EDCPRLG
L R2,0(R1) get addr of length
L R0,0(R2) get length
L R2,4(R1) get addr of key
L R2,0(R2) get key
SLL R2,4 put in bits 24-27
STORAGE OBTAIN,LENGTH=(R0),BNDRY=PAGE,COND=YES,SP=229,KEY=(2)
LTR R15,R15 successful?
BZ OUT4KGT yes, return
SR R1,R1 addr=0 for failure
OUT4KGT LR R15,R1 return storage address
EDCEPIL
*