AMX Linked List Manager
K
A
DAK
145
The following example coded in assembler illustrates the use of the Linked List Manager.The example mimics the operation of the previous C implementation. It illustrates theoptimization effects which can be achieved by coding in assembler.
INCLUDE AMX831SD.DEF ;AMX Structure Definitions
;
UOBJECT STRUC
ID DW ? ;Object id
DATA DD ? ;Other application data
KEYNODE DB (SIZE AMXLKS) DUP(?) ;Key node
MOREDATA DB 10 DUP(?) ;More application data
LISTNODE DB (SIZE AMXLNS) DUP(?) ;List node
LASTDATA DD ? ;Last application data
UOBJECT ENDS
;
OBJSIZ EQU SIZE UOBJECT ;Size of an object
NUMOBJ EQU 10 ;Ten objects
;
USER_DATA SEGMENT WORD 'DATA' ;Data segment
;
KEYLIST DB (SIZE AMXLHS) DUP(?) ;Keyed list header
EXTLIST DB (SIZE AMXLHS) DUP(?) ;Extraction list header
;
OBJARRAY DB (OBJSIZ*NUMOBJ) DUP(?) ;Array of objects
;
USER_DATA ENDS ;End of data segment
;PAGE