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:
“A common and natural result of an undue respect for law is, that you may see a file of soldiers, colonel, captain, corporal, privates, powder-monkeys, and all, marching in admirable order over hill and dale to the wars, against their wills, ay, against their common sense and consciences, which makes it very steep marching indeed, and produces a palpitation of the heart.”
—Henry David Thoreau (18171862)
“The glance is natural magic. The mysterious communication established across a house between two entire strangers, moves all the springs of wonder. The communication by the glance is in the greatest part not subject to the control of the will. It is the bodily symbol of identity with nature. We look into the eyes to know if this other form is another self, and the eyes will not lie, but make a faithful confession what inhabitant is there.”
—Ralph Waldo Emerson (18031882)
“The chess pieces are the block alphabet which shapes thoughts; and these thoughts, although making a visual design on the chess-board, express their beauty abstractly, like a poem.... I have come to the personal conclusion that while all artists are not chess players, all chess players are artists.”
—Marcel Duchamp (18871968)