	include	gemdos.i
	include	xbios.i

start	mshrink	$2000
	pea	title
	move.w	#C_conws,-(sp)
	trap	#1
	addq.l	#$06,sp
	move.w	#$01,-(sp)
	move.l	#-1,-(sp)
	move.w	#M_xalloc,-(sp)
	trap	#1
	addq.l	#$08,sp
	tst.l	d0
	bne.s	ok
	pea	checkrst
	move.w	#Supexec,-(sp)
	trap	#14
	addq.l	#$06,sp
	pea	nott
	bra.s	exit

ok	pea	istt
exit	move.w	#C_conws,-(sp)
	trap	#1
	addq.l	#$06,sp
	clr.w	-(sp)
	trap	#1

checkrst
	clr.l	$5a4
	clr.l	$5a8
	rts

title	dc.b	$0d,$0a
	dc.b	"TT RAM check for TOS 4.04 & FreeMiNT project, 1997 by Draco"
	dc.b	$0d,$0a,$00

nott	dc.b	"No TT RAM, ramtop invalidated"
	dc.b	$0d,$0a,$00

istt	dc.b	"TT RAM present, no change"
	dc.b	$0d,$0a,$00