GDSX (Extended General Device Support) Manual
Service Routines
Extended General Device Support (GDSX) Manual—529931-001
8-36
GETLOCALPOOL
Example
In this example a task will send ITC messages to TERM1, which was configured with
an SU name of $GDSX.#SU00l.TERM0001. The task calls GET^ITC^FCB to obtain
the FCB address of TERM1. After it has the FCB address, the task can use
SEND^ITC^MSG[X] as many times as necessary to send messages to TERM1. The
example shows one instance of sending a message with SEND^ITC^MSGX:
@buffer^pointer := GETEXTPOOL(10, 8);
buffer^pointer ':=' ["$GDSX.#SU001.TERM0001"];
error := GET^ITC^FCB (buffer^pointer:21, fcbaddr, dcbaddr);
.
.
.
IF NOT error THEN
BEGIN
@itc^fcb^struct^pointer := fcbaddr;
CALL SEND^ITC^MSGX (itc^fcb^struct^pointer,
buffer^with^data,
length^sent,
length^returned,
tag,
writeread^operation);
.
.
GETLOCALPOOL
This procedure allocates local pool space for the calling task from one of two local
memory pools. The local buffer pool, pool 0, is in the lower 32K of the user data stack,
and contains approximately 28,000 words. The local message pool, pool 1, is in the
upper 32K of the user data stack and contains approximately 32,000 words.
For more information, see Memory Pools on page 2-24.
address returned value
INT:value
is the word address of the allocated memory, unless a timeout occurred or space
was not available. In the latter two cases a zero is returned.
pool input
INT:value
address := GETLOCALPOOL ( pool !
i
,size !
i
,[ timeout ] ); !
i