A File Control Block (FCB) is a file system structure in which the state of an open file is maintained. An FCB is managed by the operating sytem, but it resides in the memory of the program that uses the file, not in operating system memory. This allows a program to have as many files open at one time as it wants to, provided it can spare enough memory for an FCB per file.
The FCB originates from CP/M and is also present in most variants of DOS, though only as a backwards compatibility measure in MS-DOS versions 2.0 and later. A full FCB is 36 bytes long; in early versions of CP/M, it was 33 bytes. This fixed size, which could not be increased without breaking application compatibility, lead to the FCB's eventual demise as the standard method of accessing files.
The meanings of several of the fields in the FCB differ between CP/M and MS-DOS, and also depending on what operation is being performed. The following fields have consistent meanings:
| Offset | Byte size |
Contents |
|---|---|---|
| 00 | 1 | Drive number — 0 for default, 1 for A:, 2 for B:,... |
| 01 | 8 | File name and file type — together these form a 8.3 file name |
| 09 | 3 | |
| 0C | 20 | Implementation dependent — should be initialised to zero before the FCB is opened. |
| 20 | 1 | Record number in the current section of the file — used when performing sequential access. |
| 21 | 3 | Record number to use when performing random access. |
Read more about File Control Block: Usage
Famous quotes containing the words file, control and/or block:
“Probably nothing in the experience of the rank and file of workers causes more bitterness and envy than the realization which comes sooner or later to many of them that they are stuck and can go no further.”
—Mary Barnett Gilson (1877?)
“Above and beyond paying attention to feelings before and after a separation, never threaten your child with leaving or loss of love in an effort to control her behavior. Children believe their parents assertions that I will send you away, I wont love you any more, Ill go away, and are terrified with good reason. Fear is a very poor way of disciplining a child, and it can cause severe lifelong anxiety.”
—Alicia F. Lieberman (20th century)
“Being dismantled before our eyes are not just individual programs that politicians cite as too expensive but the whole idea that society has a stake in the well-being of children down the block and the security of families on the other side of town. Whether or not kids eat well, are nurtured and have a roof over their heads is not just a consequence of how their parents behave. It is also a responsibility of societybut now apparently a diminishing one.”
—Richard B. Stolley (20th century)