266
K
A
DAK
AMX 86 Procedures
ajmget ajmgetPurpose Get a Memory Block
Used by n Task o IS P o Timer Procedure n Restart Procedure n Exit Procedure
Setup long size;
char *blockp;
long memsize;
int status;
.
.
status = ajmget(size, &blockp, &memsize);
AX DX:CX ES:BX= DX:CX=
Where size is the number of bytes of memory required.
&blockp is a pointer to storage for the returned pointer to the memory
block.
&memsize is a pointer to storage for the actual usable size in bytes of the
memory block at blockp. memsize may be slightly larger than size.
It is valid to replace &memsize with &size to update your size
variable.
Results Interrupts are disabled and then restored to their state at the time of the
call.
Status is returned.
AEROK = Call successful
blockp is a pointer to a block of memory.
memsize is the actual size of that block.
AERMNA = Memory not available
blockp is undefined.
memsize is the size of the largest currently available block
of memory.
If memory is allocated, the use count for the memory block is set to one.
See Also ajmau, ajmfre