File Control Block

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:

    While waiting to get married, several forms of employment were acceptable. Teaching kindergarten was for those girls who stayed in school four years. The rest were secretaries, typists, file clerks, or receptionists in insurance firms or banks, preferably those owned or run by the family, but respectable enough if the boss was an upstanding Christian member of the community.
    Barbara Howar (b. 1934)

    When a book, any sort of book, reaches a certain intensity of artistic performance it becomes literature. That intensity may be a matter of style, situation, character, emotional tone, or idea, or half a dozen other things. It may also be a perfection of control over the movement of a story similar to the control a great pitcher has over the ball.
    Raymond Chandler (1888–1959)

    The skyscraper establishes the block, the block creates the street, the street offers itself to man.
    Roland Barthes (1915–1980)