* Sweep.a:	a program to flush libraries and coalesce hunks
*		(in other words, recover free ram)
*
* Author:
*		James E. Cooper Jr.
*		113-1B Collier Pl.
*		Cary, NC  27513
*
* Notes:
*		First working version. 11/87  jec
*

	ifd	CAPE
	exeobj
	objfile 'Sweep'
	endc

* Equates
* ------------------------------------------------------------------------
_AbsExecBase	equ	4		; the ONLY fixed address in RAM!
_LVOAllocMem	equ	-198		; $c6

MEMF_PUBLIC	equ	1

* The code segment
* -------------------------------------------------------------------------

*	; REGISTER USAGE:
*	;	A6	= dos library base pointer
*	;	D0-1	= AmigaDOS scratch argument registers
*
Sweep:
	movea.l _AbsExecBase.W,a6
	moveq.l	#0,d0			; clear d0 and set the high
	bset	#31,d0			; ...bit.  This means a 2G hunk!
	moveq.l #MEMF_PUBLIC,d1 	; any kind will do
	jsr	_LVOAllocMem(a6)	; we can ask, can't we?
	moveq.l #0,d0			; clear return code
	rts				; go home

	END

