Problem with FindFirst and wildcard...


there is a snippet:


ime dw 0,'$'

FileName DB 'a:*.asm',0

String1 DB 'A drive','$'

String3 DB 'C drive','$'



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


mov dx,OFFSET String1 ;write it isa:drive

int 21h


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 :

??.* and so on...

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

Sign In or Register to comment.

Howdy, Stranger!

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