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 0FH (decimal 15) opens a file using a file control block (FCB).
  An FCB is a data structure used by DOS to track input and output for a
  particular file. Among other things, an FCB contains a file's name and
  disk drive number. (See page 341 in this chapter for details on the
  contents of FCBs.)

  --------------------------------------------------------------------------
  NOTE:
    Function 0FH is one of 15 DOS functions that use an FCB to track file
    input and output. You should avoid the DOS functions that use FCBs.
    These functions were made obsolete by the more powerful handle-based
    file functions introduced in DOS version 2.0. Furthermore, unlike
    handle-based functions, FCB-based functions are not supported in OS/2
    protected mode. Use the FCB-based functions only if compatibility with
    DOS version 1 is important.
  --------------------------------------------------------------------------

  To use an FCB to open a file, you must reserve memory for the FCB and
  place the file's name and disk drive number in the proper fields in the
  data structure. Then call function 0FH with the segmented address of
  the FCB in the register pair DS:DX. DOS attempts to open the file, using
  the drive and filename you specified in the FCB. If the file is opened, AL
  = 00H; if the file cannot be opened, AL = FFH.

  If the file is opened successfully, DOS initializes several fields in the
  FCB, including the drive number field (with a value of 1 for drive A, 2
  for drive B, and so on), the date and time fields, and the logical
  record-size field (which is set to 128). You can either use this record
  size or change it, depending on your application.

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