Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  Function 4EH (decimal 78) searches a directory for a specified name and
  attribute. Call function 4EH with DS:DX pointing to an ASCIIZ string
  containing the path and name to be matched. (You can use both * and ?
  wildcard characters in the search name you specify.) In addition, you must
  place a directory attribute for the search in CX. You can search for
  hidden, system, subdirectory, and volume-label directory entries by
  setting the appropriate bits in CX. (See page 113 for a table of
  attribute bits.)

  --------------------------------------------------------------------------
  NOTE:
    Before you call function 4EH, be sure that the current disk transfer
    area (DTA) is at least 43 bytes in size.
  --------------------------------------------------------------------------

  If this function successfully matches the name you specify to a directory
  entry, it clears the carry flag and fills the DTA with the data shown in
  Figure 17-15. If the function fails, it sets the carry flag and returns
  an error code in AX: 02H (file not found), 03H (path not found), or 12H
  (no more files; no match found).

  This function is similar to function 11H. The file attributes in this
  search function are the same as they are with an extended FCB in function
  11H. (See page 332.)

  The attribute search follows a particular logic. If you specify any
  combination of the hidden, system, or directory attribute bits, the search
  matches normal files and also any files with the specified attributes. If
  you specify the volume-label attribute, the search matches only a
  directory entry with that attribute. The archive and read-only bits do not
  apply to the search operations.

       Offset              Size
  Hex         Dec          (bytes)     Description
  --------------------------------------------------------------------------
  00H          0           21          Area used by DOS for find-next
                                       function 4FH
  15H         21            1          Attribute of file found
  16H         22            2          Time stamp of file (see page 116)
  18H         24            2          Date stamp of file (see page 116)
  1AH         26            4          File size in bytes
  1EH         30           13          Filename and extension (ASCIIZ
                                       string)
  --------------------------------------------------------------------------

  Figure 17-15.  The information returned in the DTA by function 4EH.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson