Change of strategy ... BLOCK first then FILES

2 views
Skip to first unread message

BruceMcF

unread,
Jan 1, 2010, 3:35:06 PM1/1/10
to Niclos-for-Forth-94
CP/M 2.2 is built on 128 byte sectors, with 16-bit Random Access
Record numbers, so CP/M 2.2 random access accessible files will have 8
sectors, and only 13-bits of BLOCK #'s possible. That means that the
top three bits of block#'s are available for distinct block files.

So the strategy is to ALLOT an array of eight File Control Blocks and
have OPEN-BLOCK-FILE and CLOSE-BLOCK-FILE ( ca u fcb-index -- block#
ior ) with fcb-index from 0 to 7, which is the fcb to be used. The
index is used for two arrays - the File Control Block array itself,
and the side-array of information used by the Forth, LAST-BLOCK# (set
to 0 if closed).

Reply all
Reply to author
Forward
0 new messages