759c759
< procedure LFNFindFirst(path:pchar;attr:longint;var s:searchrec);
---
> procedure LFNFindFirst(path:pchar;attr:word;var s:searchrec);
768,769c768,772
<   if attr=$8 then
<    dosregs.ecx:=8
---
>   if attr<>$8 then
>    attr:=attr and (not 8);
>   dosregs.cl:=lo(attr);
>   if attr<>$37 then
>    dosregs.ch:=lo(attr)
771c774
<    dosregs.ecx:=attr and (not 8);
---
>    dosregs.ch:=0;
871c874
<   dosregs.ecx:=attr;
---
>   dosregs.cx:=attr;
