AMX 86 Frozen Dessert Maker User Manual


 
AMX Circular List Manager
K
A
DAK
137
11.3 Circular List Structure
Circular lists are application data structures which are only accessible by calls to the
AMX Circular List Manager. The internal structure of the list is private to the Circular
List Manager.
Lists can be created dynamically or statically by any application program.
The following examples illustrate 8-bit, 16-bit and 32-bit lists created in C. NSLOT is
defined to be the number of slots in each list.
typedef char SLOT1; /* 1 byte slot */
typedef short int SLOT2; /* 2 byte slot */
typedef long SLOT4; /* 4 byte slot */
#define NSLOT 64 /* 64 slots in the list */
struct { /* List of 1 byte slots */
short int header[4];
SLOT1 slots[NSLOT];
} bytelist;
struct { /* List of 2 byte slots */
short int header[4];
SLOT2 slots[NSLOT];
} shortlist;
struct { /* List of 4 byte slots */
short int header[4];
SLOT4 slots[NSLOT];
} pntrlist;
Bytelist
is a circular list of NSLOT 8-bit elements.
Shortlist is a circular list of NSLOT 16-bit elements.
Pntrlist is a circular list of NSLOT 32-bit elements.