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

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.