; The New shorties

; By Niels Keurentjes, a direct family member of Marco Keurentjes,
; who wrote CliPicture for NF23!!!

; Source exclusive for UGA use.

; Call or write to:
; Niels 'Nitro' Keurentjes
; Hartelstein 50
; 5655 AL Eindhoven  The Netherlands

; We're in dire need of a second musician in Eindhoven or Veldhoven,
; so if you're interested, send us a disk or drop in (call first!).

; This program mainly shows you how to make a DOS-compatible file-
; name out of the userinput

; Prompt:   S_DELETE <FileName>

subq	#1,d0		; Remove that return

D_A:
cmp.b	#32,(a0)+
bne.s	TheFileNameIsFound
dbra	d0,D_A
bra.s	GetOffMyBack	; Well, I really need a file!!!

TheFileNameIsFound:
subq	#1,a0
move.l	a0,a5		; The FileNameWhichIsFound

D_Loop1:
cmp.b	#$20,(a0,d0)	; Is it a space?
bne.s	OhNo
dbra	d0,D_Loop1

; This particular line of the program is never reached!

OhNo:
clr.b	(a0,d0)		; Enter a zero to use this filename
move.l	$4.w,a6
lea	dn(pc),a1
jsr	-408(a6)	; Open dos.library
move.l	d0,a6
move.l	a5,d1		; Recycle the FileNameWhichIsStillFound
move.l	(a5),$f0.w
move.l	4(a5),$f4.w
move.l	8(a5),$f8.w
jsr	-72(a6)
jsr	-132(a6)	; Check for Errors
moveq	#0,d1
move.w	d0,d1		; Move returncode to D1
jsr	-144(a6)	; Exit this proggie

GetOffMyBack:
rts			; Why this? For fun!

dn:	dc.b 'dos.library',0
