AMX 86 Frozen Dessert Maker User Manual


 
AMX 86 Procedures
K
A
DAK
265
ajmgeh ajmgeh
Purpose Get a Memory Block Using a Memory Handle
Used by
n Task o ISP o Timer Procedure n Restart Procedure n Exit Procedure
Setup long size;
char *blockp;
long memsize;
char *handle;
int status;
.
.
status = ajmgeh(size, &blockp, &memsize, handle);
AX DX:CX ES:BX= DX:CX= ES:BX
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.
handle is a memory handle assigned by the Memory Manager in a
previous call to ajmhan. Note that the handle is a pointer.
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 block of memory which is
currently available using the given handle.
AERMIB = handle is an invalid memory handle.
blockp and memsize are undefined.
If memory is allocated, the use count for the memory block is set to one.
See Also ajmau, ajmfre, ajmhan