HelpPC 2.10 Quick Reference Utility Copyright 1991 David Jurgens

                    FCB - Standard DOS File Control Block

    Offset Size                Description

       -7   byte       if FF this is an extended FCB  ╪
       -6  5bytes      reserved  ╪
       -1   byte       file attribute if extended FCB  ╪
       00   byte       drive number (0 for default drive, 1=A:, 2=B:, ...)
       01  8bytes      filename, left justified with trailing blanks
       09  3bytes      filename extension, left justified w/blanks
       0C   word       current block number relative to beginning of the
                       file, starting with zero
       0E   word       logical record size in bytes
       10   dword      file size in bytes
       14   word       date the file was created or last updated

               │F│E│D│C│B│A│9│8│7│6│5│4│3│2│1│0│ 15,14 (Intel reverse order)
                │ │ │ │ │ │ │ │ │ │ │ └─┴─┴─┴─┴─ day 1-31
                │ │ │ │ │ │ │ └─┴─┴─┴────────── month 1-12
                └─┴─┴─┴─┴─┴─┴───────────────── year + 1980

       16   word       time of last write

               │F│E│D│C│B│A│9│8│7│6│5│4│3│2│1│0│ 17,16 (Intel reverse order)
                │ │ │ │ │ │ │ │ │ │ │ └─┴─┴─┴─┴── secs in 2 second increments
                │ │ │ │ │ └─┴─┴─┴─┴─┴─────────── minutes (0-59)
                └─┴─┴─┴─┴────────────────────── hours (0-23)

       18  8bytes      see below for version specific information  ╪
       1A   dword      address of device header if character device  ╪
       20   byte       current relative record number within current BLOCK
       21   dword      relative record number relative to the beginning of
                       the file, starting with zero; high bit omitted if
                       record length is 64 bytes


           DOS 2.x Values for reserved fields at offsets 18h-1Ah       ╪

    Offset Size                Description
       18   byte       │7│6│5│4│3│2│1│0│
                        │ │ └─┴─┴─┴─┴─┴─── unknown
                        │ └────────────── 1 = open
                        └─────────────── 1 = logical device

       19   word       starting cluster number  ╪
       

           DOS 3.x Values for reserved fields at offsets 18h-19h       ╪

    Offset Size                Description
       18   byte       System File Table (SFT) entry for file  ╪
       19   byte       attributes  ╪

                       │7│6│5│4│3│2│1│0│  attributes
                        │ │ └─┴─┴─┴─┴─┴──── unknown
                        └─┴─ share status  
                       
                       00 = SHARE not loaded block device
                       01 = SHARE not loaded characted device
                       10 = SHARE loaded, remote file
                       11 = SHARE loaded local file


          DOS 3.x with SHARE, local file reserved offsets 1Ah-1Eh  ╪

    Offset Size                Description
       1A   word       starting cluster number
       1C   word       offset within SHARE of sharing record
       1E   byte       file attribute


         DOS 3.x with SHARE, remote file reserved offsets 1Ah-1Eh  ╪

    Offset Size                Description
       1A   word       sector number containing directory entry
       1C   word       last cluster accessed relative to beginning of file
       1E   byte       absolute cluster number of last cluster accessed


              DOS 3.x without SHARE reserved offsets 1Ah-1Fh  ╪

    Offset Size                Description
       1A   byte       ((device attribute word low byte) & 0Ch) || (open mode)
       1B   word       starting cluster number
       1D   word       sector number containing directory entry
       1F   byte       number of directory entry within sector


       The following are FCB related DOS functions:

       INT 21,F   Open file using FCB
       INT 21,10  Close file using FCB
       INT 21,11  Search for first entry using FCB
       INT 21,12  Search for next entry using FCB
       INT 21,13  Delete file using FCB
       INT 21,14  Sequential read using FCB
       INT 21,15  Sequential write using FCB
       INT 21,16  Create a file using FCB
       INT 21,17  Rename file using FCB
       INT 21,21  Random read using FCB
       INT 21,22  Random write using FCB
       INT 21,23  Get file size using FCB
       INT 21,24  Set relative record field for FCB
       INT 21,27  Random block read using FCB
       INT 21,28  Random block write using FCB
       INT 21,29  Parse filename for FCB


       ╪  see Bibliography reference to "Undocumented DOS"

       - see   XFCB   INT 21,52

Esc or Alt-X to exit FCB Home/PgUp/PgDn/End ←↑↓→
Converted to HTML in 2006 by Timo Bingmann