;
; wSpace.sh
;
; Dynamite workspace layout
;
;  1994 Straylight
;

		^	0,R12
dyn__wStart	#	0

		; --- Information about the Dynamite area ---

dyn_machine	#	4			;Machine version number
dyn_areaHandle	#	0			;Handle of dynamic area or...
dyn_oldChnArea	#	4			;Old ChangeDynArea address
dyn_areaBase	#	0			;Base addr of area or...
dyn_oldReadArea	#	4			;Old ReadDynArea address
dyn_oldValidate	#	4			;Old ValidateAddress vector

		; --- Variables for ReadDynamicArea hackery ---

dyn_switchBase	#	4			;Base of TaskManager module
dyn_switchSize	#	4			;Size of TaskManager module
dyn_wimpBase	#	4			;Base of WindowManager module
dyn_wimpSize	#	4			;Size of WindowManager module

		; --- Low-level heap details ---

dyn_areaSize	#	4			;Current size of area
dyn_sprSize	#	4			;Address of size of spr area
dyn_pageSize	#	4			;The page size of the machine
dyn_log2PageSize #	4			;Make a good guess
dyn_pageCount	#	4			;Number of pages

		; --- Heap variables ---

dyn_heapSize	#	4			;Space actually used in heap
dyn_lockCount	#	4			;How often we've been locked
dyn_hpFlags	#	4			;Some interesting heap flags

hpFlag_tidy	EQU	(1<<0)			;The heap is nice and tidy
hpFlag_mSent	EQU	(1<<1)			;A message has been sent

		; --- Anchor allocation ---

dyn_ancTable	#	4			;Pointer to the free handles
dyn_ancList	#	4			;List of big anchor blocks

		; --- Background compactor variables ---

dyn_taskHandle	#	4			;The compactor's task handle
dyn_launch	#	4			;Whether we're launching

		; --- Relocation stack ---

dyn_stackPtr	#	4			;The stack pointer

		; --- Big buffers and stuff ---

dyn_pollBlk	#	256			;The poll block thing
dyn_stack	#	4*256			;The stack area

dyn_wSize	EQU	{VAR}-dyn__wStart

		END
