;*****************************************************************************
; FIND.ASM
;
; 90-12-27 Matt Hagen, Novell, Inc.
;*****************************************************************************

DTAStructure	struc
 Reserved	db	21 dup (?)
 Attribute	db	?
 Time		dw	?
 Date		dw	?
 LowSize	dw	?
 HighSize	dw	?
 Name		db	13 dup (?)
DTAStructure	ends

DOSSEG
.MODEL	SMALL
.STACK	100h
.DATA

DTA	DTAStructure <>
File	db	'*.*', 0

.CODE

;*****************************************************************************
; FindFirstFile
;*****************************************************************************

FindFirstFile	proc	far
	push	ds
	xor	ax, ax
	push	ax
	mov	ax, @data
	mov	ds, ax

	mov	ah, 1ah
	lea	dx, DTA
	int	21h

	mov	ah, 4eh
	xor	cx, cx
	lea	dx, File
	int	21h

	mov	ah, 02h
	lea	bx, DTA.Name

DisplayName:
	mov	dl, [bx]
	or	dl, dl
	jz	Exit
	int	21h
	inc	bx
	jmp	DisplayName

Exit:
	ret
FindFirstFile	endp
	end

;*****************************************************************************
;*****************************************************************************
