[comp.sources.amiga] v89i147: flush - force a global expunge v2

page%swap@Sun.COM (Bob Page) (05/19/89)

Submitted-by: recondo!sirius@uunet.UU.NET (Michael Stilson)
Posting-number: Volume 89, Issue 147
Archive-name: kernel/flush2.1

A nice & tiny "Flush" program to make Exec Expunge all that's Expungable.

[uuencoded executable included.  ..bob]

# This is a shell archive.
# Remove anything above and including the cut line.
# Then run the rest of the file through 'sh'.
# Unpacked files will be owned by you and have default permissions.
#----cut here-----cut here-----cut here-----cut here----#
#!/bin/sh
# shar: SHell ARchive
# Run the following text through 'sh' to create:
#	flush.a
#	flush.uu
# This is archive 1 of a 1-part kit.
# This archive created: Thu May 18 11:30:01 1989
echo "extracting flush.a"
sed 's/^X//' << \SHAR_EOF > flush.a
X;DateStamp: Sunday 07-May-89 18:43:20
X; Flush.a   Flush out ram.  Mike 'Sirius' Stilson  (c) 1989 Sirius Software
X;
X;  A nice & tiny "Flush" program to make Exec EXPUNGE all that's EXPUNGABLE
X;
X;  (Assembled with CAPE this should come out to 52 bytes.. 14 bytes of program
X;   and a bunch of bytes of hunk information)
X;
X	EXEOBJ
X	OPTIMON
X	SMALLOBJ
X	OBJFILE		"Flush"
X	LISFILE		"Flush.Lis"
X
X
XAllocMem	equ	-$0c6
X
XFlush:
X	moveq	#-1,D0		; Allocate 4 Gig.
X	move.l	#10001,D1	; MEMF_PUBLIC + MEMF_CLEAR
X	movea.l	$4,A6		; ExecBase
X	jsr	AllocMem(a6)	; AllocMem(ByteSize, Requirements) (D0/D1)
X				; I hope none of you have 4 Gig... we don't
X				; even test it let alone free it up.
X	moveq	#0,d0		; So we don't return an error.
X	rts			; Return
X	END
X
X
SHAR_EOF
echo "extracting flush.uu"
sed 's/^X//' << \SHAR_EOF > flush.uu
X
Xbegin 644 Flush
XM```#\P`````````!```````````````%```#Z0````5P_R(\```G$2QX``1.H
X+KO\Z<`!.=0```_(!0
X``
Xend
Xsize 56
SHAR_EOF
echo "End of archive 1 (of 1)"
# if you want to concatenate archives, remove anything after this line
exit