Hardware manual
the error routine which was passed to InitializeDiskCBZ; the way this is done is explained in the
description of ActOnDiskPages above. (If the error routine returns, GetDiskCb will proceed as if an error
hadn’t occurred.) Otherwise, after doing a restore on the disk if errorCount ge disk>>DSK.retryCount/2, it
reinitializes the CBZ with firstPage equal to the page with the error, and returns to cbz>>CBZ.retry (which
was initialized by InitializeDiskCBZ) instead of returning normally. The idea is that the code following the
retry label will retry all the incomplete commands, starting with the one whose page number is
cbz>>CBZ.currentPage and whose disk address is cbz>>CBZ.errorDA.
DoDiskCommand(disk, cb, CA, DA, filePtr, pageNumber, action, nextCb) Constructs a disk command in
cb with data address CA, virtual disk address DA, serial and version number taken from the virtual file id
in filePtr, page number taken from pageNumber, and disk command specified by action. The nextCb
argument is optional; if supplied and nonzero, DoDiskCommand will "chain" the current CB’s label
address to nextCb, in such a way that the DL.next word will fall into nextCb>>CB.diskAddress.
DoDiskCommand expects the cb to be zeroed, except that the following fields may be preset; if they are
zero the indicated default is supplied:
labelAddress lv cb>>CB.label
numChars 0
If DA eq fillInDA, the real disk address in the command is not set (the caller should have either set it
explicitly or passed the CB as the nextCb argument for a previous command). Actions are checked for
legality.
The public cells in the CBZ most likely to be of interest are the following:
client: information of the caller’s choosing (e.g., a pointer to a related higher-level data structure such
as a stream.)
cleanupRoutine: the cleanup routine called by GetDiskCb (defaulted to Noop by InitializeDiskCBZ).
currentPage: set to the firstPage argument of InitializeDiskCBZ and not touched by the other routines.
(Note, however, that GetDiskCb calls InitializeDiskCBZ when a retry is about to occur, so when
control arrives at the retry label, currentPage will be set to the page number of the command that
suffered the error.)
errorDA: set by GetDiskCb to the virtual disk address of the command that suffered an error.
nextDA: set by GetDiskCb to the virtual disk address of the page following the one whose CB is being
returned. (This information is obtained from the next pointer in the current page’s label. Note that
errorDA and nextDA are actually the same cell, but they are used in non-conflicting circumstances.)
currentNumChars: set by GetDiskCb to the numChars of the page whose CB is being returned.
head: points to the first CB on GetDiskCb’s queue; contains zero if the queue is empty.
8. Error Codes
The following errors are generated by the BFS. Similar errors are generated by other instances of a disk
object.
1101 unrecoverable disk error
1102 disk full
1103 bad disk action
1104 control block queues fouled up
1105 attempt to create a file without creation ability
Disks & Bfs August 10, 1980 60
For Xerox Internal Use Only -- December 15, 1980










