	opt	l-
	
	incdir	:include/
	include	exec/exec_lib.i
	include	misc/macrolib.i
	include	misc/misc_lib.i
	include	libraries/dos_lib.i
	
	movem.l	d0/a0,-(sp)
	OPENMUSIC
	movem.l	(sp)+,d0/a0
	tst.l	_MusicBase
	beq	fine
	subq.l	#1,d0
	tst.l	d0
	beq	noparameter
	clr.b	0(a0,d0)
	CALLPLAY	LoadMusic
	cmpi.l	#-1,d0		; file not found
	beq	FileNotFound
	move.b	#$FE,$BFE001
	CALLPLAY	PlayMusic
	CLOSEMUSIC
	rts
FileNotFound
	OPENDOS
	CALLDOS	Output
	move.l	d0,d1
	move.l	#frase,d2	
	move.l	#len,d3
	CALLDOS	Write
	CLOSEDOS
	CLOSEMUSIC
	rts
	
noparameter
	CALLPLAY	StopMusic
	CALLPLAY	UnLoadMusic
	move.b	#$FC,$BFE001
	CLOSEMUSIC
fine	rts

frase	dc.b	'Non trovo il file richiesto !',10,0
len	equ	*-frase
	
	
	
