SECTION VIII

LOADING THE TSB SYSTEM


The software package for HP Time Shared Basic System includes two TSB System
tapes (TSB BINARY (PART I) and TSB BINARY (PART II)), and a shorter program,
the TSB Loader.  TSB Loader loads the TSB System tapes and relocates them on
the disc.  In addition, the Basic Binary Disc Loader (BBDL), a protected 64-
word program is always resident in high core.  BBDL is used to load absolute
punched tape programs (such as the TSB Loader) and disc-resident software
systems (such as the TSB System or the Disc Operating System) into core
memory.

TSB Loader is used to generate an initial TSB System on the computer, to
update the TSB System software, to reload a dumped TSB System from magnetic
tape and to attempt emergency recovery when a TSB System fails.

When updating or reloading from magnetic tape, track lengths and select
codes of discs may be modified without first LOCKing all the trackes on
the disc, as would be necessay while the system is running.  Disc-9 can
also be changed in length, but it must remain select code 14.  (See below
and Section IV for Disc Command.)


GENERATING AN INITIAL TSB SYSTEM

The first step in system generation is to check that all equipment is turned
on and that the I/O devices reside in the proper I/O channels.  Then place
the TSB Loader punched tape in the photoreader.  Initiate the punched tape
section of the BBDL (see the end of this Section for full details on the
BBDL) by setting the Switch Register to 077700 and pressing LOAD ADDRESS.
When you set the LOADER switch to ENABLED and press RUN, the TSB Loader tape
will be read in through the photoreader and stored in core memory.  When the
computer halts, set the LOADER Switch to PROTECTED.

Now place the first (of two) TSB System tape in the photoreader.  Start the
TSB Loader by setting the Switch Register to 2000, pressing LOAD ADDRESS
and RUN.  The computer will print

                                 LIBRARY?



on the operator's console. Respond with NO followed by carriage return. The computer prints SECTORS/TRACK on DISC-0? Respond with the decimal num- ber of logical sectors per track on the first disc. (See Table I-1.) Following the message DISC MODIFICATIONS? enter any number of DISC Commands. (See Section IV.) Be sure to specify correct track length. These commands may move a disc to anew channel or replace a disc. Each DISC Command is terminated by a carriage return. The entire sequence of DISC Commands is terminated by a single carriage return. Respond to the GIVE LOCK, UNLOCK OR LOAD COMMAND message with a sequence of LOCK and/or UNLOCK Commands (see Section IV) as desired, terminating the sequence with a LOAD Command. If a Disc Operating System is present on the disc, respond to the DISC MONITOR PRESENT? message with a YES. If not, a NO. The first TSB System tape will be read in through the teleprinter. When the computer halts with 102077 in the T- Register and prints END OF TAPE place the second (of two) TSB System tape in the photoreader and press RUN. Respond to DATE with two decimal integers separated by a slash, where the first integer is the day of the year, and the second is the year of the century (e.g. 36/69). The operator is responsible for changing the day and year at the beginning of a new year, otherwise the system will continue to increment the data to 367, 368, etc.
Respond to TIME with a four-digit representation of the current hour and minute on a twenty- four hour clock (e.g., 1:15 P.M. would be 1315). The completion of the loading process is signified by the message READY If the TSB System includes a magnetic tape unit, refer to MAGTAPE COMMAND, Section IV. At this point, the TSB System is active and will accept any operator commands or user requests. UPDATING A PRE-EXISTENT SYSTEM Sometimes it may be necessary to update the TSB System while preserving the pre-existent library. The procedure for this is the same as for generating an initial system, except for the following: Respond to the LIBRARY? question with a YES instead of a NO. Following te YES answer above, respond to MAG TAPE SELECT CODE? with a carriage return, indicating that the current library on the disc is to be used. At this point the above sequence will continue as after DISC MODIFICATIONS. RELOADING FROM MAGNETIC TAPE If the TSB System disc should ever be modified so that the TSB System software is destroyed, the TSB System can be restored from a previous magnetic tape dump. The procedure is the same as for system feneration, with the following changes.
Before you start, mount the magnetic tape containing the dump of the TSB System and library on the magnetic tape unit and set the unit to AUTO or ON LINE. Do not put the TSB System tape in the photoreader. Respond to the LIBRARY question with YES, then respond to MAG TAPE SELECT CODE? with the octal select code of the lower channel containing the magnetic tape unit interface cards, followed by an asterisk if the 7970 controller card is used (18131). EMERGENCY RECOVERY If the TSB System halts during operation for any reason other than a normal SLEEP Command (equipment failure, software error, or other malfunction), it may still be possible to salvage the user library if certain portions of core memory and disc storage are intact. Faulty tracks should be LOCKED. The emergency recovery procedure is the same as system generation except for the following: a. The TSB Loader is initiated at 3000 instead of 2000. The TSB Loader will attempt to use the current core resident status. b. The steps preceding the one asking for LOCK, UNLOCK and LOAD Commands are omitted. This procedure cannot be guaranteed to work, nor if it seems to work, can it be guaranteed to have successfully recreated the TSB system without loss. However, it will revive the TSB System in cases where the system tables and user files were not disturbed. If the computer halts during operation with a 102005 in the T-Register, the computer has had a memory parity error. This indicates hardware problems. A halt with 103004 in the T-Register indicates disc failure. This may be
recoverable. The A-Register will contain the disc logical address where the error occurred; B-Register will contain the memory address related to the transfer. The formats are: A-Bits 15,14 = Disc No; 13-8 = Track no; 6-0 = Sector No. B-Bit 15 = Read(1) or Write(0); Bits 14-0 = memory address. If the disc failure occurred on a user library track, system track, or user swap track (see output of the STATUS Command, Section V for the location of these tracks), carry out the emergency recovery procedure and for user li- brary tracks, lock the offending track once the TSB System is active again. For a system track of user swap track, SLEEP immediately, then reload the TSB System from paper tape, locking faulty tracks during reload. If the disc failure occurred on an IDT, ADT or DIREC Track (see STATUS, Sec- tion V), the only recovery is a magnetic tape reload, being sure to LOCK the offending track while loading. If no magnetic tape exists, all information will be lost, and the TSB System must be regenerated from the beginning. TSB LOADER OPTION If the Switch Register bit 15 is up (on) while loading the TSB System from either punched tape or magnetic tape (this can be done by putting it up just before pressing RUN after setting the TSB Loader address in the P-Register), the TSB Loader will execute a halt with 102015 in the T-Register just prior to transferring each module of TSB System to the disc. The first halt is for the core-resident part of the TSB System. Each subsequent halt is for a disc-resident module of the system. This is convenient when it is necessary to patch or alter one or more of these modules. If the system module is as desired, pressing RUN will load it onto the disc. The computer will halt again when the next module is ready in core. Putting Switch Register bit 15 down will eliminate the halts for all subsequent modules. If patches are performed, the restart address to resume loading should be noted before patching and placed in the P-Regis- ter before pressing RUN.
TSB Loader Diagnostic and Halts Common errors, such as an illegal response to a TSB Loader question, will be diagnosed on the teleprinter and the questions repeated. Other errors, such as a disc failure, require the re-initiation of the entire loading sequence. Serious errors, which require some operator action, cause a halt. The T- Register will contain a 1020xx where xx is a two-place octal number identify- ing the error condition. A number of error halts may be corrected. Errors which cause halts are listed below, with the corresponding teleprinter diagnostics and recovery procedure, if any. HALT # MESSAGES & INTERPRETATION HLT 1 Loading cannot be continued. There may be various causes: UNEXPECTED END-OF-FILE/END-OF-TAPE The format and/or number of records on magnetic tape is not as expected. There is no obvious correction if the tape is the correct one. TAPE CANNOT BE READ Tape unit may be malfunctioning, or there may be faulty inter- face cards or a bad tape. The remedy will correspond to the cause. OUT OF DISC SPACE This error can be corrected only by unlocking some disc tracks on a subsequent load attempt. DISC FAILURE The offending track will be designated on the teleprinter. The track must be locked on a subsequent load attempts. HLT 4 There has been a power failure during loading. Restart the loading procedure from the beginning.
HALT # MESSAGES & INTERPRETATION HLT 11 The following error message is printed: TAPE BAD OR TOO SHORT Loading of the dump tape may be retried by pressing RUN. The tape unit may require repair or cleaning, or the tape may need replaceing (SLEEP error message). HLT 15 Put Switch Register bit 15 down and press RUN. HLT 22 Load TSB Loader Tape using BBDL. HLT 33 The following message is printed: WRITE NOT ENABLED Put the write ring into the tape reel. Restart the tape unit and press RUN. (SLEEP error message) HLT 44 The following message is printed: CHANGE MAG TAPE TO AUTO (or ON-LINE) Then press RUN. HLT 55 The following message is printed: ILLEGAL ADDRESS The address read from the paper tape (displayed in the A- Register) cannot belong to the TSB System. The cause may be a dirty tape or photoreader. Reposition the offending tape record under the photoreader and press RUN. Alternatively, restart the loading procedure form the beginning.
HALT # MESSAGES & INTERPRETATION HLT 66 The following message is printed: CHECKSUM ERROR The checksum read from the tape (which is displayed in the A- Register) does not match that calculated from the tape record as it was read in (this sum is displayed in the A-Register). The correction action is the same as for HLT 55. HLT 77 The following message is printed: END OF TAPE If the TSB System tape is actually on several different binary tapes, place the next one in the photoreader and press RUN. Otherwise restart the loader procedure from the beginning. BBDL-LOADING TSB SYSTEM FROM THE DISC The Basic Binary Disc Loader (BBDL), a modified version of the standard Basic Binary Loader, can be used either for loading absolute punched tape or for loading from the disc. The TSB System can only be loaded from the disc if it has previously been shut down by a SLEEP Command. Clearly, between the SLEEP operation and the reloading the disc must not be disturbed. To load from the disc, set the LOADER switch to ENABLED, LOAD ADDRESS 077760, and press RUN. The contents of track 0, sector 0 (this will be a Bootstrap Loader) will be placed into locations 2-77. At this point the computer should halt with 102077 in the T-Register. The LOADER switch should be set to PROTECTED. If a halt with 102000 occurs, start over from 077760. If a halt with 102002 or 102001 occurs, press RUN again. If halt-2 or 1 occurs repeated- ly, or the teleprinter prints,
DISC FAILURE try the sequence again from 077760. If this fails again, either the disc is mechanically unreadable or some information on it has been destroyed and loading is impossible. In this case, the system is possibly salvageable by reloading from paper tape. The Bootstrap Loader is written to allow the user to have two distinct soft- ware systems on his disc. Switch register bit 0 should be set to select the desired system. If only Time Shared Basic is stored on the disc then bit 0 can be in either position. If two software systems reside on the disc, set Switch Register bit 0 down to select Time Shared Basic. The loading squence should proceed to the DATE/TIME entries. Respond as you did to the TSB Loader. BBDL-PUNCHED TAPE LOADING Punched tape usage is identical to the standard BBL loader, except that the special options for pseudo-loading are not provided: a. Set Switch Register to 077700 and press LOAD ADDRESS. b. Set LOADER switch to ENABLED and press RUN. c. Loader will read absolute paper tape from photoreader. d. When the computer halts with 102077 in the T-Register. set the LOADER switch to PROTECTED. A halt with 102011 in the T-Register signifies a checksum error. 102055 signifies an illegal address.
BBDL-OCTAL LISTING If the BBDL is destroyed, it can be replaced through the Switch Register. An octal listing of the instructions of the BBDL follows. See Figure 8-1. 16K Version
           0       1       2       3       4       5       6       7

037700:  107700  002401  063726  006700  017742  007306  027713  002006
037710:  027703  102077  027700  077754  017742  017742  074000  077757
037720:  067757  047755  002040  027740  017742  040001  177757  037757
037730:  000040  037754  027720  017742  054000  027702  102011  027700
037740:  102055  027700  000000  006600  103713  102313  027745  107413
037750:  002041  127742  005767  027744  000000  140100  020014  000000
037760:  107700  063756  102606  002700  102615  001500  102602  063777
037770:  102702  102602  103706  102714  067776  074077  024077  177700
32K Version
           0       1       2       3       4       5       6       7

077700:  107700  002401  063726  006700  017742  007306  027713  002006
077710:  027703  102077  027700  077754  017742  017742  074000  077757
077720:  067757  047755  002040  027740  017742  040001  177757  037757
077730:  000040  037754  027720  017742  054000  027702  102011  027700
077740:  102055  027700  000000  006600  103713  102313  027745  107413
077750:  002041  127742  005767  027744  000000  100100  020014  000000
077760:  107700  063756  102606  002700  102615  001500  102602  063777
077770:  102702  102602  103706  102714  067776  074077  024077  177700
Figure 8-1. Basic Binary Disc Loader