136
K
A
DAK
AMX Circular List Manager
11.2 Circular List Use
A circular list is created by an application with a call to procedure ajrstl. The caller
must provide three parameters: the number of slots in the list, the size of each slot (1, 2 or
4 bytes) and a pointer to RAM storage for the circular list. The number of slots in a
circular list is limited only by available memory and by the fact that the list must reside
within one 64K byte segment in memory.
The RAM storage area must be 16-bit aligned and provide (n*s)+8 bytes where n is the
number of slots and s is the slot size (1, 2 or 4).
The Circular List Manager creates the list in the storage provided and sets the list empty.
The Circular List Manager procedures can then be used to add and remove elements of
the defined size at the top and/or bottom of the list.
The Circular List Manager procedures provide the caller with the status of the list
following each call. When adding an element to the list, the caller will receive notice if
the list is already full. If the element is added to the list, the caller will be notified if the
list has just become full.
When removing an element from the list, the caller will receive notice if no element was
on the list. If an element is retrieved from the list, the caller will be notified if the list has
just gone empty.