
;
; DUMP
; 
; September 5, 1999
; Anders Eriksson
; ae@atari.org
;
; exit.s


		section	text

exit_real:	move.l	save_dta,-(sp)				;fsetdta() restore dta
		move.w	#$1a,-(sp)				;
		trap	#1					;
		addq.l	#6,sp					;

		move.w	#$69,-(sp)				;Dsp_Unlock()
		trap	#14					;
		addq.l	#2,sp					;

exit:		clr.w	-(sp)					;terminate program
		trap	#1					;

exit_nostram:							;exit if no stram for dma buffer
		move.l	#exit_nostram_text,textadr		;
		bsr.w	print					;
		bsr.w	waitkey					;
		bra.s	exit					;
		bra.s	exit_real

exit_nomodram:
		move.l	#exit_nomodram_text,textadr		;exit if no ram for module
		bsr.w	print					;
		bsr.w	waitkey					;
		bra.s	exit_real				;

exit_filenotfound:						;exit if file not found
		move.l	#exit_filenotfound_text,textadr		;
		bsr.w	print					;
		bsr.w	waitkey					;
		bra.s	exit_real				;

exit_unknown:							;exit if file not found
		move.l	#exit_unknown_text,textadr		;
		bsr.w	print					;
		bsr.w	waitkey					;
		bra.s	exit_real				;


exit_dsplocked:							;exit if file not found
		move.l	#exit_dsplocked_text,textadr		;
		bsr.w	print					;
		bsr.w	waitkey					;
		bra.w	exit_real				;




		section	data


exit_nostram_text:
		dc.b	'Sorry, this program needs 8000 bytes ST-RAM, it',13,10
		dc.b	'looks like you do not have that.',13,10,0
		even

exit_nomodram_text:
		dc.b	'Sorry, but you do not have enough free',13,10
		dc.b	'ST or TT-RAM for the selected module.',13,10,0
		even

exit_filenotfound_text:
		dc.b	'Sorry, the file could not be found.',13,10,0
		even

exit_unknown_text:
		dc.b	'Sorry, this moduleformat could not be recogized.',13,10,0
		even


exit_dsplocked_text:
		dc.b	'The DSP is already in use by another application.',13,10,0
		even

		section	text