dos_compilers/Microsoft Pascal v1/FINK
2024-06-30 06:59:54 -07:00

55 lines
3.0 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{MS-Pascal / MS-FORTRAN FCB Declaration Include File}
INTERFACE; UNIT
FILKQQ (FCBFQQ, FILEMODES, SEQUENTIAL, TERMINAL, DIRECT);
TYPE
FILEMODES = (SEQUENTIAL, TERMINAL, DIRECT);
FCBFQQ = RECORD {byte offsets start every field comment}
{fields accessible by Pascal user as <file variable>.<field>}
TRAP: BOOLEAN; {00 Pascal user trapping errors if true}
ERRS: WRD(0)..15; {01 error status, set only by all units}
MODE: FILEMODES; {02 user file mode; not used in unit U}
MISC: BYTE; {03 pad to word bound, special user use}
{fields shared by units F, V, U; ERRC / ESTS are write-only}
ERRC: WORD; {04 error code, error exists if nonzero}
{1000..1099: set for unit U errors}
{1100..1199: set for unit F errors}
{1200..1299: set for unit V errors}
ESTS: WORD; {06 error specific data usually from OS}
CMOD: FILEMODES; {08 system file mode; copied from MODE}
{fields set / used by units F and V, and read-only in unit U}
TXTF: BOOLEAN; {09 true: formatted / ASCII / TEXT file}
{false: not formatted / binary file}
SIZE: WORD; {10 record size set when file is opened}
{DIRECT: always fixed record length}
{others: max length (UPPER (BUFFA))}
MISB: WORD; {12 unused, exists for historic reasons}
OLDF: BOOLEAN; {14 true: must exist before open; RESET}
{false: can create on open; REWRITE}
INPT: BOOLEAN; {15 true: user is now reading from file}
{false: user is now writing to file}
RECL: WORD; {16 DIRECT record number, lo order word}
RECH: WORD; {18 DIRECT record number, hi order word}
USED: WORD; {20 number bytes used in current record}
{field used internally by units F and V not needed by unit U}
LINK: ADR OF FCBFQQ;{22 DS offset address of next open file}
{fields used internally by unit F not needed by units V or U}
BADR: ADRMEM; {24 ADR of buffer variable (end of FCB)}
TMPF: BOOLEAN; {26 true if temp file; delete on CLOSE}
FULL: BOOLEAN; {27 buffer lazy evaluation status, TEXT}
MISA: BYTE; {28 unused, exists for historic reasons}
OPEN: BOOLEAN; {29 file opened; RESET / REWRITE called}
{fields used internally by unit V not needed by units F or U}
FUNT: INTEGER; {30 Fortran unit number, always above 0}
ENDF: BOOLEAN; {32 last operation was the ENDFILE stmt}
{fields set / used by unit U, and read-only in units F and V}
REDY: BOOLEAN; {33 buffer ready if true; set by F / U}
BCNT: WORD; {34 number of data bytes actually moved}
EORF: BOOLEAN; {36 true if end of record read, written}
EOFF: BOOLEAN; {37 end of file flag set after EOF read}
{unit U (operating system) information starts here}
{end of section for unit U specific OS information}
END;
END;