<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>
In File I/O Words in TurboForth Kernal
Declares a file buffer, used by FILE to build the PAB (Peripheral Access Block) required for file access.
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:
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.