PUBLIC F7314_FindFirst
F7314_FindFirst PROC
                enter   0, 0
                push    esi
                push    edi
                push    ebx
                push    es
                mov     edx, [ebp+8]
                mov     ah, 4Eh
                int     21h             ; DOS - 2+ - FIND FIRST ASCIZ (FINDFIRST)
                                        ; CX = search attributes
                                        ; DS:DX -> ASCIZ filespec
                                        ; (drive, path, and wildcards allowed)
                pushfw
                mov     esi, [ebp+12]
                mov     al, 0
                mov     [esi], al
                mov     eax, 1
                popfw
                jb      loc_25140
                mov     ah, 2Fh
                int     21h             ; DOS - GET DISK TRANSFER AREA ADDRESS
                                        ; Return: ES:BX -> DTA
                add     ebx, 1Eh
        loc_25130:
                mov     al, es:[ebx]
                mov     [esi], al
                inc     esi
                inc     ebx
                or      al, al
                jnz     short loc_25130
                mov     eax, 0
        loc_25140:
                pop     es
                assume ss:nothing
                pop     ebx
                pop     edi
                pop     esi
                leave
                ret
F7314_FindFirst ENDP

PUBLIC F7315_FindNext
F7315_FindNext PROC
                enter   0, 0
                push    esi
                push    edi
                push    ebx
                push    es
                mov     ah, 4Fh
                int     21h             ; DOS - 2+ - FIND NEXT ASCIZ (FINDNEXT)
                                        ; [DTA] = data block from
                                        ; last AH = 4Eh/4Fh call
                pushfw
                mov     esi, [ebp+8]
                mov     al, 0
                mov     [esi], al
                mov     eax, 1
                popfw
                jb      loc_2517F
                mov     ah, 2Fh
                int     21h             ; DOS - GET DISK TRANSFER AREA ADDRESS
                                        ; Return: ES:BX -> DTA
                add     ebx, 1Eh
        loc_2516F:
                mov     al, es:[ebx]
                mov     [esi], al
                inc     esi
                inc     ebx
                or      al, al
                jnz     short loc_2516F
                mov     eax, 0
        loc_2517F:
                pop     es
                pop     ebx
                pop     edi
                pop     esi
                leave
                ret
F7315_FindNext ENDP
