#AllocMem quest.
Yes, AllocMem is what you want. Its in the Exec Library. Size and Mode are
both long. If you have the Amiga include files (they come with Devpac) you
can use the names as follows :
MEMF_PUBLIC 1 Public Memory
MEMF_CHIP 2 Chip Memory
MEMF_FAST 4 Fast Memory
MEMF_CLEAR $0100 Clear the Memory
If you don't specify chip or fast it will give you either, fast if
possible. You can add MEMF_PUBLIC and/or MEMF_CLEAR to your selection.
Memory which is passed to system calls or accessed by other tasks should
be made public.
To free the memory, use FreeMem giving the adress of the block in A1 and
the size in bytes in D0, both long.
There is another way of doing this using AllocRemember/FreeRemember in the
Intuition Library. This lets you do more than one block in one go but its
more complicated.