Problem with FindFirst and wildcard... - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Problem with FindFirst and wildcard...

Please,help

there is a snippet:

.DATA

ime dw 0,'$'

FileName DB 'a:*.asm',0

String1 DB 'A drive','$'

String3 DB 'C drive','$'


.CODE

ProgramStart:

mov ax,@DATA

mov ds,ax

push ds

mov ah,19h ;get current drive

int 21h


mov ah,9

cmp al,0 ;is it a drive?

je adrive ;yes



mov dx,OFFSET String3 ;no,it is c:drive

jmp cont



adrive:

mov dx,OFFSET String1 ;write it isa:drive

int 21h

petlja:

mov dx,OFFSET FileName

mov ah,4eh ;FindFirst

mov cx,20h ;archive files

int 21h

.

.

Explanation:Program searches for any file with asm extension on a: drive.

After that line carry is set indicating error.

Problem:FindFirst WON't work when FileName is a:*.asm (see above the definition!Everything else works,including :

a:????.asm,a:
ame.*,a:
??.* and so on...

Carry is always set,which means error!Why doesn't it work?


Sign In or Register to comment.