
buttonpressed
	bsr	AllocASL
	bsr	OpenASLrequester
	tst.l	d0
	beq	np1

; --------> Use Dos Library command delete
; --------> With fun routines

	
; --------> Has it got a file choosen?

	move.l	d0,a1				;For later
	move.l	d0,a0
	tst.b	(a0)
	beq	np1
	
; --------> Find end of Volume or drive

	add.l	#256,a1
	move.l	a1,d1
lp1	cmp.b	#':',(a1)+	
	beq	out
	bra.s	lp1

; --------> Is there a Directory?
	
out
	tst.b	(a1)
	beq.s	lp2
	
; --------> Find End of Directory And Put '/' there

	bsr	charmove			;Run character cal
	move.b	#'/',-1(a1)			;Put a slash there

; --------> Bring File, Volume and Directory together
	
lp2	move.b	(a0)+,(a1)+
	tst.b	-(a1)
	beq	go_on
	tst.b	(a1)+
	beq	go_on
	move.b	(a0)+,(a1)+
	bra.s	lp2

; --------> Do Delete
	
go_on
	move.l	_DosBase,a6
	jsr	DeleteFile(a6)	
	tst.l	d0	
	beq	file_error
	
np1	bsr	FreeASL
	bra	test
