<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>


FBUF: Search:

In File I/O Words in TurboForth Kernal

Word Name: FBUF:
Type: Immediate word
Data Stack Signature: --
Return Stack Signature: --
Availability: V1.0  V1.1  V1.2
Description:

Declares a file buffer, used by FILE to build the PAB (Peripheral Access Block) required for file access.

Example:

none

Comment:

Internally, FBUF: ALLOTs 42 bytes starting at HERE. Later, FILE, as it parses the file-name and file descriptor, will build the PAB in the buffer previously declared with FBUF:

E.g.

FBUF: DISK-FILE
S” DSK1.README DV80SI” DISK-FILE FILE

Here, a buffer called DISK-FILE is declared. FILE is used to build the PAB for a file on DSK1 called README, declared as a DV80 file, in sequential input mode. Of the 42 bytes allotted, 12 are used for the PAB and internal pointers, leaving 30 characters for the file-name, which allows enough space for hard disk systems with subdirectories etc.

FBUF: should not be used inside a colon definition.

See Also: FILE 

<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>