


*   Memory List Structures

; STRUCTURE ML	LN_SIZE	EQU	14
ML_NUMENTRIES	EQU	14           * The number of ME structures that follow
ML_NUMENTRIESshort
ML_ME 	SET	16                  * where the ME structures begin
ML_SIZE	SET	16


; STRUCTURE ME,0
ME_REQS		SET	0                 * the AllocMem requirements
ME_ADDR      	EQU	0           * the address of this block (an alias
ME_ADDRint
;*                                   *   for the same location as ME_REQS)
ME_LENGTH	EQU	4               * the length of this region
ME_LENGTHint
ME_SIZE		SET	8


;*------ memory options:

PUBLIC	SET	1
CHIP	SET	2
FAST	SET	4
CLEAR	SET	$10000
LARGEST	SET	$20000


;*------ alignment rules for a memory block:

MEM_BLOCKSIZE   EQU 8
MEM_BLOCKMASK   EQU (MEM_BLOCKSIZE-1)


;*   Memory Region Header


; STRUCTURE  MH,LN_SIZE		EQU	14
MH_ATTRIBUTES		EQU	14           * characteristics of this region
MH_ATTRIBUTESshort
MH_FIRST		EQU	16                * first free region
MH_FIRSTint
MH_LOWER 		EQU	20               * lower memory bound
MH_LOWERint
MH_UPPER		EQU	24                * upper memory bound+1
MH_UPPERint
MH_FREE			EQU	28                 * number of free bytes
MH_FREEint
MH_SIZE			SET	32


;*   Memory Chunk


; STRUCTURE  MC,0
MC_NEXT		EQU	0                 * ptr to next chunk
MC_NEXTint
MC_BYTES	EQU	4                * chunk byte size
MC_BYTESint
MC_SIZE		SET	8


