Digital PDFs
Documents
Guest
Register
Log In
DEC-15-ODFFA-A
January 1972
173 pages
Original
5.5MB
view
download
Document:
DOS-15
System Manual
Order Number:
DEC-15-ODFFA-A
Revision:
Pages:
173
Original Filename:
http://bitsavers.org/pdf/dec/pdp15/DEC-15-ODFFA-A_DOS15_SysMan.pdf
OCR Text
DEC-lS-ODFFA-A-D DOS-IS SYSTE~1 MAN UAL FOR ADDITIONAL COPIES OF THIS MANUAL J ORDER THE NUMBER ABOVE FROM THE PROGRAM LIBRARY J DIGITAL EQUIPMENT CORPORATION J MAYNARD J MASSACHUSETTS 01754 PRICE $10.00 First Printing, January 1972 Second Printing, July 1972 Copyright (S) 1972 by Digital Equipment Corporation The material in this document is for information purposes and is subject to change without notice. The following are trademarks of Digital Equipment Corporation, Maynard, Massachusetts: COP Computer Lab Comtex DEC OECtape Dibol Digital DNC Flip Chip IOAC Indac KAlO LAB-8/e OMNIBUS OS/8 PDP PHA PS/8 Quickpoint RAO-8 RSTS RSX RTM SABR Typeset 8 Unibus CON~ENTS PREFACE CHAPTER 1 DOS OPERATION CHAPTER 2 THE RESIDENT MONITO~ 2.1 INTRODUCTION 2-1 2.2 THE CAL HANDLER 2-2 2.3 2.3.1 2.3.2 lOPS ERROR HANDLER, AND THE EXPANDED ERROR PROCESSOR 2-2 .MED I 2-2 The Expanded Error ~rocessor 2-6 2-4 THE SYSTEM BOOTST~ 2-7 2-5 SYSTEM I/O INITIALIZATION 2-8 2.6 2.6.1 2.6.2 RESIDENT MONITOR TIMING FEATURES Clock Operation .TIMER 2-8 2-12 2-12 2.7 THE RESIDENT MONITOR PATCH AREA 2-14 2.8 CONTROL CHARACTERS 2-14 CHAPTER 3 I THE NONRESIDENT MONITOR 3.1 INTRODUCTION 3-1 3.2 COMMANDS TO THE NONRESIDENT MONITOR 3-7 3.3 CONSIDERATIONS FOR ADDITIONS TO THE NONRESIDENT MONITOR 3-7 3.4 QFILE 3- 8 CHAPTER 4 THE SYSTEM LOADER AND THE LINKING LOADER 4-13 4.1 MANUAL BOOTSTRAP 4.2 LOADING SYSTEM PROG~S 4.4 TABLES AND INFORMATION BLOCKS USED AND BUILT I BY LOADERS 4.5 .DAT SLOT MANIPULATION BY THE SYSTEM LOADER 4-15 4.6 BUFFER ALLOCATION BY THE SYSTEM LOADER 4-20 LO~DS I AND RESTARTS 4-13 I I v 4-15 CHAPTER 5 SYSTEM INFORMATION BLOCKS AND TABLES II I 5.1 CORE-RESIDENT NON-REFRESHED REGISTERS 5-1 I 5.2 5.2.1 5.2.2 5.2.3 DISK-RESIDENT UNCHANGING BLOCKS SYSBLK COMBLK SGNBLK 5.3 DISK-RESIDENT CHANGING BLOCKS 5-1 5-1 5-1 5-8 I 5-9 I 5.4.1 5.4.2 5.4.3 5.4.4 5.4.5 5.4.6 TEMPORARY TABLES BUILT FROM DISK-RESIDENT TABLES The Overlay Table The Device Table The Input/Output Communication (IOC) Table The Device Assignment Table (.DAT) The User File Directory Table (.UFDT) The Skip Chain 5-9 5-11 5-11 5-12 5-12 5-12 5.5 5.5.1 5.5.2 5.5.3 TEMPORARY TABLES BUILT FROM SCRATCH File Buffer Transfer Vector Table The RCOM Table The Mass Storage Busy Table 5-12 5-12 5-13 5-13 5.6 RESERVED WORD LOCATIONS 5.4 5-9 I 5-13 II 5.7 BOOTSTRAP NON-BOSS BATCH BITS 5-15 I CHAPTER 6 FILE STRUCTURES 6.1 6.1.1 6.1.2 DECTAPE FILE ORGANIZATION Non-Directoried DECtape Directoried DECtape 6-1 6-1 6-1 6.2 6.2.1 6.2.2 6.2.2.1 6.2.2.2 6.2.2.3 6.2.3 6.2.4 MAGNETIC TAPE Non-directoried Data Recording (MTF) Directoried Data Recording (MTA., MTC.) Magnetic Tape File Directory User-File Labels File-Names in Labels Continuous Operation Storage Retrieval on File-Structured Magnetic Tape 6-4 6-5 6-5 6-7 6-9 6-10 6-10 6.3 6.3.1 6.3.2 6.3.3 6.3.4 6.3.4.1 6.3.4.2 6.3.5 6.3.6 6.3.7 DISK FILE STRUCTURE . Introduction User Identification Codes (UIC) Organization of Specific Files on Disk Buffers Commands that Obtain and/or Return BuffE~rs The Current Set Pre-allocation Storage Allocation Tables (SAT's) Bad Allocation Tables (BAT's) 6-12 6-12 6 ... 12 6-14 6-14 6-14 6-16 6-16 6-17 6-18 I vi 6-11 CHAPTER 7 7.1 WRITING NEW I/O DEVICE HANDLERS I/O DEVICE HANDLERS, AN INTRODUCTION Setting Up the Skip Chain and API (Hardware) Channel Registers Handling the Interrupt 7-1 7.2 7.2.1 7.2.2 API SOFTWARE HANDLERS, An Introduction Setting Up API Software Channel Registers Queueing 7-6 7-6 7-7 7.3 7.3.1 7.3.2 7.3.3 WRITING SPECIAL I/O DEVICE HANDLERS Discussion of Example A by Parts Example A, Skeleton I/O Device Handler Example B. Special Device Handler for AFOIB A/D Converter 7.1.1 CHAPTER 8 7-4 7-5 7-9 7-11 7-12 7-14 BOSS-IS B.l.l B.l.2 B.l.3 PROCEDURE FILES Procedure File Format Direct Substitution Example of Procedure File 8-16 8-16 8-19 8-19 B.2 BOSS-15 ACCOUNTING B-20 8.3 B.PRE 8-21 8.1 APPENDIX A DECtape 'A' Handler (DTA.) APPENDIX B Disk "A" Handlers APPENDIX C PROCEDURE FILES vii This manual was written for customer ~ystems programmers, DEC Software I Specialists, and internal maintenance programmers. Readers must be I familiar with the DOS User's Manual, DEC-15-MRDA-D. In addition, chap- I ter 8 requires familiarity with the BOSS Reference Manual, DEC-15-GUDA-D. CHAPTER 1 DOS OPERATION The System Manager must use DOSSAV in order to load DOS-IS for the first time. The DOS System Generator manual, DEC-15-YWZB-DN12, des- cribes DOSSAV operation in its appendix. After successful DOSSAV op- eration, the System Manager should load the Bootstrap into the highest bank. (This tells DOS how many banks it can use.) The Bootstrap loads the System Loader, which in turn loads the Nonresident Monitor. In order to ensure a working system, the System Manager should place the DOS-IS Checkout Package tape (RF.CHK, DEC-lS-CIDA-PA, for RF DECdisk systems, or RP.CHK, DEC-lS-CTAA-PA, for the Paper Tape Reader, and type BATCH RP~2 PR~. Disk Pack systems) into Operating instructions for the Checkout Package, and the tape itself, are distributed as part of the DOS-IS system. Once the system has been checked out, the System Manager should use DOSGEN, the DOS System Generator orogram, to tailor the system to his needs. As mentioned in the System Generator manual, a complete tailoring of the system may also involve use of PATCH, PIP, and UPDATE. Commands to the Nonresident Monitor allow temporary modification of the system, in order to suit the needs of a particular program. The Nonresident Monitor modifies the system by changing information in the .SCOM Table. The System Loader examines the .SCOM Table, along with three disk-resident information blocks, SYSBLK, COMBLK and SGNBLK, and carries out all operations necessary to fulfill the operator's commands. The System Loader "builds" the Resident Monitor by relocat- ing and linking those routines by the next core load. indicated by the .SCOM table as needed The Resident Monitor then retains general con- trol over the system. 1-1 CHAPTER 2 THE RESIDENT '10NITOR . 2.1 INTRODUCTION The Resident Monitor gets its name because it seems resident to the user. Strictly speaking, however, the only part of the system that is always resident is the Bootstrap. There are two parts of the system that are refreshed only after manual Bootstrap lo&ds and restarts: Resident :-1onitor Patch Area. .SCOM and the Every time an operator or program changes certain key system parameters, the system will build a new Resident Monitor from blocks stored on the system device. The Resident Monitor is the interface between the operator, and the active devices on one hand, and the program which is running (the Nonresident Monitor), on the other. The Resident Monitor always contains the following routines and tables: .DAT .UFDT ( S .SCOM The CAL Handler, which routes all System and I/O Macro calls The Startup routine after usinq the Bootstrap .MED, the Monitor's standard error routine The Expanded Error Processor, for more flexibility with error messages Handlers for the following error conditions: Nonexistent Memory Memory Protect Interrupt-Memory Parity This Power-Fail Chapter Software API not set up The Monitor's TRAN routine (different from I/O .TRAN's) A clock handler The .GTBUF and GVBUF processor The CTRL Q processor The .USER processor The .OVRLA processor TTA. The Resident Monitor's Patch A1ea Chapter In addition, the user can request the system to retain certain other routines in a resident Monitor status: The CTRL X Feature, including a driver for the VT-IS The paper Tape or Card Reader Handler for Batch The Resident Batch code BOSS-IS also has resident routines, wnich are covered in Chanter 8. 2-1 2.2 THE CAL HANDLER The CAL instruction transfers control to re~ister 21, bank ~, and loads register 251 with the address of the next instruction after t:he CAL. I All DOS I/O and system macros take the form of a CAL instruction (posI sibly with some code in the low-order bits), and the next sequential register contains a dispatch code. Some mabros require more informaI tion in succeeding registers. Figure 2-1, Resident Monitor CAL Handler, I illustrates the operation of that portion of the Resident Monitor. -- for legal function r code, and for legal .DAT slot. Aside from that, and ensuring the CAL Handler does only minimal error checkin The I I clock is turned on, the CAL Handler is only a dispatcher to other routines. 2.3 I lOPS ERROR HANDLER, AND THE EXPANDED ERROR PROCESSOR I 2.3.1 .MED There are two error processors in the Resident Monitor: .MED and the ! Expanded Error Processor. Figure 2-2 illustrates those routines. ! Figure 2-3 shows two subroutines used by th7 error routines. .MED I (location 3, bank ~) processes lOPS errors from all device handlers I except the disk handlers, and COB., MTF., TTA., and LPA. Calls to I .MED should take the following form, if not lOPS 4: I LAC DAC* INFO (. MED LAW JMP* N (. MED+I /ARGUMENT OF ERROR /ADDRESS OF CAL IS ALREADY IN . MED, /IF DESIRED IN IS ERROR CODE ~~N~777. AC MUST BE NEGATIVE. lOPS 4 messages may take the following form: LAC (4 JMS* (.MED lAC MUST BE POSITIVE .MED+I contains a JMP to the Monitor Error Diagnostic Routine. I above calls to .MED will cause the follOwin? printouts: IOPSN (contents of .MED) IOPS4 2-2 The 2. 3. Loa ress Turn clock on, if on Deposit minus 1 in register 7, if = or less than minus two N y lOPS ~ ~_N________________~The following CAL's take this path: .EXIT, .OVRLA, .TlMER • SETUP, • GTBUF , .GVBUF, .GET, & IOPS2 • PUT Give control to proper portion of the Resident Monitor. y Resident Monitor CAL Handler Figure 2-1 2-3 Enter from .MED Enter from .SCOM+37 y Put recovery PC 1n .MED Initialization NOTE: The Nonresident Monitor HALT and QDUMP commands will change this loop to the appropriate action. BOS and Batching Mode abort the $JOB. (Wait f r a Contro Char) N y y 1. 2. 3. Echo Command Restore API, if required Restore PI Return via .MED Expanded Error Processor and Monitor Error Diagnostic Routine .MED Figure 2-2 2-4 SETTLE 1. 2. 3. 4. 5. Store error number Set up to turn nulls into spaces, if LINK is set Turn off PI wait 110 ms for the teleprinter to die down Type Carriage RBTURN, Line Feed Print "IOPS" and error number, zero suppressed Print a space, fol~owed by the octal contents of .MED, followed by another space N Print contents of .SCOM+32 (disk block number) Resident Monitor Subroutines Figure 2-3 2-5 2.3.2 The Expanded Error Processor The disk handlers (except the Bootstrap), CDB., MTF., TTA., and LPA. use the Expanded Error Processor. Each error message is "potentially" I recoverable by typing CTRL R. That is, the Resident Monitor always returns control to the caller upon a CTRL R. to respond accordingly. It is up to the caller All handlers supplied with the system simply repeat the error message if the error is unrecoverable. I The Expanded Error Processor gives the capability of printing additional information after the standard lOPS message. AC must contain the error number must be passed, however, via JMS* As with .MED, the (~<number<777) in bits 9-17. . (.SCOM+37, not JMP* (.MED+l. - - The following information pertains to the message: Control LOC+2 must contain the two's complement of the number of message words to be typed after the standard "IOPSNN nnnnnn" message. tive, no message will be printed. printed as spaces. If the number is zero or posi- If the LINK is set, nulls will be If the LINK is zero, nulls will be ignored. If the AC is positive on calling the expanded error facility, only the special message will be printed. The "lOPS" part will be omitted. The message itself must be packed in .SIXBT. The following are examples of use of the Expanded Error Processor: Example a: UNREC DAC* STATUS (.MED STL LAW JMS* JMP /STATUS /CAL ADDRESS IS NOW OVERWRITTEN /BY CONTENTS OF STATUS REGISTER /TURN NULLS INTO SPACES ERRNUM (. SCOM+37 UNREC ~ERRNUM <l~~ ~ LAC /THIS IS AN UNRECOVERABLE ERROR. /JMP .-1 WILL NOT DO -- EXPANDED /ERROR PROCESSOR CHANGES THE /CONTENTS OF .MED. LAW -1 .SIXBT IDKAI UNITNO fI .SIXBT IFILl .SIXBT IE' .SIXBT 'SRC I The printout from that code will be as follows: IOPS777 nnnnnn DKA FILE SRC where nnnnnn is the contents of .MED, and equals the Status Register B, and ERRNUM was 777. 2-6 PARITY LAW STL JMS* JMP LAW 61 /TURNS NULLS INTO SPACES (.SCOM+37 RETRY /THIS IS A RECOVERABLE ERROR -1 .SIXBT 'DTA' The printout from that code will be as follows: IOPS61 nnnnnn DTA where nnnnnn is the contents of .MED, the address of the last CAL, deposited by the CAL Handler. 2.4 THE SYSTEM BOOTSTRAP The System Bootstrap is nothing more than a disk driver. It may load the System Loader and Resident Monitor from Hardware Readin, restart. or manual All other Bootstrap operations result from the use of the Monitor TRAN routine. The Monitor TRAN routine sets up the Bootstrap to read or write any block or set of contiguous blocks from the disk to or from any location in core. Before calling the Bootstrap, the Monitor TRAN does a .WAIT to all .DAT slots in the Mass Storage Busy Table, clears all flags, turns off the VT if it was on, and allows the clock to tick positive, so that it will keep time but not interrupt. After the Bootstrap has finished, it calls the Monitor Initialization Routine, which updates the clock and turns on the VT, if necessary. The Monitor TRAN Routine requires the followinq parameter table: P ARADU LOC+ fJ LOC+l LOC+.2 LOC+3 BLKNUM FIRSTA-I -SIZE START /FIRST BLOCK NUMBER /FIRST ADDRESS OF BUFFER, MINUS ONE /# OF WORDS TO BE TRANSFERRED IN 2'S COM /STARTING ADDRESS AFTER DISK I/O /COMPLETION The following code illustrates the use of the Monitor TRAN: UNIT=lfJ~fJfJfJ /MONITOR TRAN WILL USE UNIT ONEl .SCOM=l~fJ LAC XOR STL JMP* (PARADD UNIT (. SCOM+55 /MONITOR TRAN REQUIRES ADDRESS OF /PARAMETER TABLE IN BITS 3-17 AND /UNIT NUMBER IN BITS ~-2 OF AC /NONZERO LINK GIVES TRAN OUT /.SCOM+55 IS USER ENTRY POINT FOR /MONITOR TRAN See also paragraph 5.7. IDECdisk TRANs ignore unit number, use block number. 2-7 I .OVRLA, .EXIT, and manual Q dumps all use the Monitor TRAN routine. I Figure 2-4, .OVRLA, .EXIT and CTRL Q, illustrates their operation, i and also the Monitor TRAN. For the RF DECdisk, the user can reference, a specific platter just by identifying the block number he wants. That is, the block numbers to not automatically go to zero at the beginning of every platter. The block numbers and platter relationships are shown below: I I I TABLE 2-1 I RF Platter-Block Number Correspondence I Platter Number Block Number ~ ~-1777 2~{i1j1-3777 1 2 3 4 4{i1j1{i1-S777 6j1{i1j1-7777 l{i1j1{i1.0-1l777 5 l2~.0{i1-l3777 6 7 l4j1~.0-1S777 l6{i1j1{i1-l7777 (All numbers are in octal) I 2.5 SYSTEM I/O INITIALIZATION i I I There are two routines that do DOS I/O initialization: the startup routine after Bootstrap manual loads and restarts, and the startup routine performed after Monitor TRAN's and after a CTRL C, P, T or S for an error. The startup routine after Bootstrap loads is described in Figure 4-1, The System Loader Interface Routine. Figure 2-5, Resident Monitor Initialization, describes the other routine. 1 I I .- _. - --- I 1 I 2.6 RESIDENT MONITOR TIMING FEATURES I Figure 2-6, The Resident Monitor Clock Routine, describes the Resident Monitor'S time functions. There are three places in DOS which start or try to update the clock -- (1) the first-time initialization after manual Bootstrap loads and restarts, (2) the Resident Monitor Initialization, and (3) the CAL Handler. The following .SCOM registers contain timing information: i i 'I I 2-8 .OVP..LA CAL Entry .EXIT CAL Entry Put System program name into .SCOM+43,44 (pro name pointed to by CAL+2) Scan Overlay Table (address in .SCOM+31) for a match with the Put name of the Nonresident Mon itor into .SCOM 43 & 44 Entry Set LINK (.TRAN out) and set up pointer to .TRAN parameters for CTRL QAREA N Y Put contents of .SCOM+72 into .SCOM+7l, and set AC with unit number Set up pointer to parameters TRAN Set up unit number ~ and pointer to TRAN parameters for loading .SYSLD Clear LINK for .TRAN in Update .SCOM+31 clear AC and the LINK (Unit ~, & ~--~ .TRAN in) (MONITOR TRAN ROUTINE -- Independent from device handler .TRAN's) Store Unit number and other TRAN parameters in the Bootstrap * CLEAR does a .WAIT or a .INIT to each entry in the Mass Storage Busy Table. This precludes conflicts between disk I/O performed by the system disk handler, and disk lOT's issued by the Bootstrap, an independent program. CLEAR also turns off the clock and PI, and enables BANK mode. Return to user Put starting address into location ~, bank ~, and set the Bootstrap to go to Monitor Recovery Routine on exit Bootstrap I .OVRLA, .EXIT and CTRL Q I Figure 2-4 I 2-9 .. Entry from Bootstrap Entry from RESMON Arrive with exit address in AC set exit to address in ~ 1. 2. 3. 4. 5. 1. 2. 3. 4. Set up clock so that it keeps running, but does not interrupt (ticks positive) Clear all flags Turn off PI and API Restore cell 4 to transfer to Error Diagnostic Routine Set up proper addressing (Bank or Page), according to .SCOM+4, bit 7 Update the clock, and allow it to interrupt Clear TTY Busy Switch (Clear all flags ensures no I/O to TTY) Turn API on or off, depending on contents of register 6 (The System Loader loads register 6 according to .SCOM+4, bit ~) Turn on PI proper location Resident Monitor Initialization Figure 2-5 2-10 Ent.rY frolll PI or API Allow clock to tick positive, so it will not interrupt for an hour set up the exit from this routine to go to the .TIMER address in .SCOM+61, is if it were a JMS instruction. Set high-order bits of return address with interrupt information .SCOM+50 hhmmss Increment .SCOM+34 Subtract one from N Restore pre-interrupt conditions I Note: The Clock Routine will use PI if API i~ busy, or down. I The Resident Monitor Clock Routine • I Fl..gure 2-6 2-11 .SCOM+5~ .SCOM+51 .SCOM+56 .SCOM+6~ .SCOM+6l .SCOM+73 .SCOM+74 2.6.1 Time of day, in hhmmss (six bits each) Elapsed time, in ticks Time limit, in seconds (zero, if no limit) Time left for .TIMER interrupt (zero, if .TIMER not in effect) Address of .TIMER user interrupt routine Number of ticks left in the next second Line frequency, in ticks per second Clock Operation The Nonresident Monitor's TIME command changes or senses . SCOM+51 is not used by any system program. increments it upon each clock tick. .SCOM+5~ • The clock handler simply User programs may deposit a known I quantity into .SCOM+51, in order to time events. The Nonresident I Monitor deposits the argument for a TIMEST command into .SCOM+56. If i .SCOM+56 is nonzero, the Resident Monitor will issue an ISZ .SCOM+56 I command each second, until it reaches zero. At such a time, the Resi- I dent Monitor will perform a .EXIT. MICLOG, LOGIN, and LOGOUT clear I .SCOM+56. I 2•6•2 . TIME R .TIMER allows users to schedule routines for a specified time from "now". These routines may return to the interrupted code, if the I programmer desires. .TIMER users should take care that the timeI dependent code follows certain rules: a. When a programmer does not wish to reset the .TIMER mechanism, but wishes to return to the interrupted program, his code should look like this: XIT ~ DAC SAVEAC LAC RAL LAC JMP* C /C+l REACHED VIA JMS /MUST NOT USE NON-REENTRANT CODE /POSSIBLY USED BY THE INTERRUPTED /PROGRAM. (INCLUDES THE CAL IN/STRUCTION) /RESTORE THE LINK SAVEAC /RESTORE THE AC C C 2-12 h. When the programmer does wish to reset the .TIMER mechanism, and return to the interrupted code, his routine should look like this: .SCOM=I,0~ CLON=7,0~~44 CLOF=7~fJ~fJ4 INTRVL=-lfJ~ C DAC LAC DAC* CLOF LAC DAC* LAC RAL LAC CLON JMP* c. /THIS ROUTINE WILL RUN EVERY /TICKS 1,0~8+ fJ SAVEAC ADDRES /RETURN TO THE NEXT ROUTINE ( .SCOM+61 /TURN THE CLOCK OFF TO ENSURE NO /REENTRANCE BEFORE .TlMER RESET AND /RETURN /DESIRED INTERVAL IN TWO'S COMPLEMENT INTRVL (. SCOM+6fJ /RESTORE THE LINK C SAVEAC /RESTORE THE AC /TURN THE CLOCK BACK ON (AFTER NEXT /INSTRUCTION) C When a programmer does not wish to return to the interrupted program, he need not save the AC, and he may use the CAL instruction. He should beware of using I/O buffers that may still be modified by a handler's interrupt section. In many cases, a .INIT to an active .DAT slot will terminate I/O. Teleprinter I/O should be terminated by the following: XCT* (.SCOM+35 The user should program a delay of at least llfJ milliseconds after such an instruction, before he attempts teleprinter I/O. Note: The interrupt routine will run at the level of the interrupted code, with the same addressing mode and memory protect status. Thus, no debreak and restore is required. 2-13 2.7 THE RESIDENT MONITOR PATCH AREA There are two types of patch area taken from the space allocated at assembly time: 1. That allocated by using PATCH 2. That allocated when answering the Patch Area question in system generation Patch area one is the place for permanent changes to the Resident Monitor. core. It is always refreshed when the System Loader comes into Patch area two is only refreshed on manual Bootstrap loads and restarts. The second area would be appropriate for communication between successive programs loaded by the System Loader. This area should be used because the System Loader refreshes all of core, except the Bootstrap, .SCOM, the CTRL X buffer, and the patch area two. The combined size is limited by the current assembly at areas can be initialized, using PATCH. 47~~8. Both The important dividing line between area one and area two is register l~l (.SCOM+l) of RESMON. The way to allocate more space in part one is to increase the value of register DOSGEN. l~l. The way to change the area in part two is to use The second part will start at the address in register The upper bound of the second area will be of register 2.8 l~l, l~l. the sum of the contents and the number specified to DOSGEN. CONTROL CHARACTERS CTRL C, P, R, S, and T are all special characters that interrupt the current program and transfer control. The Resident Monitor ignores CTRL R except after lOPS 4 and any call to the Expanded Error Processor. CTRL S always transfers control to the address in .SCO~+6. In the case of core-image system programs and EXECUTE, a CTRL Swill transfer to register zero, and result in an lOPS 3. The Linking Loader places the starting address of the first load module into .SCOM+6. A .INlT macro to the teleprinter handler will change the address of either CTRL C, P or T. The Resident Monitor is always initialized to 2-14 perform a .EXIT after CTRL C, and ignore CTRL P and T. DDT uses CTRL T, and CTRL P is ordinarily used by programs for restarts. MACRO-IS expands .INIT to change the CTRL P address. If the programmer expands .INIT without the aid of the assembler, a l~ in bits zero and A ~l in those bits one of LOC+2 will change the address of CTRL T. will change the address of CTRL C. It should be obvious that special care should be taken with CTRL C. In addition, modifications to the CTRL T address should not be made when debugging with DDT. cases, however, when such modifications are desirable. There are In particular, all zeroes in LOC+2 (2-17) will cause the teleprinter handler to ignore CTRL C, P, or T. This address might be used when sensitive code is being executed, as in DOSGEN. The following .INIT expansion will cause the Resident Monitor to ignore CTRL C: CAL-2&777 1 2~~~~~ 2-15 CHAPTER 3 THE NONRESIDENT MONITOR 3.1 INTRODUCTION The System Loader brings the Nonresident Monitor into core after a hardware readin, a manual restart, a CTRL C, or a .EXIT. The RCOM Table, SGNBLK, SYSBLK and COMBLK are always coresident with the Nonresident Monitor. This gives the Nonresident Monitor access to all important system parameters. The Nonresident Monitor announces its presence by typing DOS-15 VN.A on the teleprinter. It remains in core until the operator requests another system program, or until the operator's command implies a refreshed configuration of the Resident Monitor is necessary. The Nonresident Monitor's actions are limited to (1) decoding commands, (2) manipulating or examining bits and registers in .SCOM, .DAT, .UFDT, SYSBLK, COMBLK, and SGNBLK, and (3) calling the System Loader, when necessary. The Nonresident Monitor has only one entry, which starts an initialization section. Figure 3-1, Nonresident Monitor Initial- ization, describes that logic. Every time the System Loader brings in the Nonresident Monitor, it passes control to the initialization section. After initialization, and after all commands that do not require the System Loader, the Nonresident Monitor types a $, and awaits an input line, terminated by a Carriage RETURN or an ALT MODE. It then examines the first six characters (or those up to the first blank) and tries to find an entry in the Nonresident Monitor's Command Table. If a match is found, control passes to the appropriate routine, and thence to the next command, or the System Loader. If the typed command does not correspond to an entry in the command table, the Nonresident Monitor temporarily assumes the operator wishes a new core-image system program, and checks COMBLK for a corresponding entry. If there is no corresponding entry in COMBLK, the Nonresident Monitor will type an error message, and await the next command. If COMBLK contains a matching entry, the Nonresident Monitor composes a .OVRLA, and passes control to the System Loader via that .OVRLA. 3-1 ST~RT 1. 2. 3. 4. 5. 6. 7. Bank bit initialize pointers to SYSBLK, COMBLK and SGNBLK Determine the number of positive .OAT slots Save the contents of .OAT-12, in case the user desires LP ON (restore before leaving Nonresident Monitor) Save contents of .SCOM+7 -- Nonresident Monitor will use .SCOM+7 for address of LPA. or TTA. Change all .UFDT entries that equal BNK or PAG to SYS Compute addresses of .OAT-2,+I,+5 and +6 Compute address of beginning of I/O Device Table in SGNBLK y Y Initialize .DAT-2 and .DAT-3 Y Y y (next page) Nonresident Monitor Initialization Figure 3-1 3-2 (from preceding page) Clear bit 1 of .SCOM+42 (Nonresident Monitor .EXIT flag) (Continue to Command Decoder) Nonresident Monitor Initialization (continued) Figure 3-1 (Cant.) 3-3 3.2 COMMANDS TO THE NONRESIDENT MONITOR This paragraph discusses legal commands listed in the Nonresident Monitor's Command Table. Table 3-1, Effects and Exits for Nonresident Monitor Commands, describes all commands that do not request a new program. There are five entries in the Command Table that load relocatable system programs. They are DDT, EXECUTE, GLOAD and LOAD. The Non- resident Monitor treats these commands separately, because SYSBLK does not list them. All information necessary for loading these pro- grams resides in the Nonresident Monitor itself. 3.3 CONSIDERATIONS FOR ADDITIONS TO THE NONRESIDENT MONITOR Programmers should not attempt to add commands to the Nonresident Monitor unless they have access to a copy of the source code. The source code may be purchased from Digital Equipment Corporation, 146 Main Street, Maynard, Massachusetts, under one of the order numbers listed in the footnote. They should then use the EDITO~ program to put in the indicated changes, and reassemble. New additions to the Nonresident Monitor require the following actions: 1. Update the Nonresident Monitor's Command Table. The Command Table is in two parts: a) The .SIXBT names of the commands b) The corresponding transfer vector 2. Write the code for the command. 3. Consider the kind of exit the command will take: a) Commands that end with a request for a new command should end with JMP KLCOM b} Commands that re-configure the Nonresident Monitor should end with JMP NRMEX1. DECtape DEC-15-SRDA-Ul Magtape Unavail1.ble 3-4 Table 3-1 Effects and Exits for Nonresident Monitor Commands* COMMAND MODIFIER ACTION TAKEN EXIT API ON OFF Set bit ~ of .SCOM+4. Clear bit ~ of .SCOM+4. .EXIT .EXIT ASSIGN handler Check whether handler is available. If yes, load .DAT slot with proper handler code. (The proper loader will load the handler, and insert its starting address into the .DAT slot. Next Command DIC Load proper slot via a .USER Next Command BANK ON OFF Set bit 11 of .SCOM+4. Clear bit 11 of .SCOM+4. Next Command BATCH PR Set bit ~ and clear bit 2 in location 1777 of the Bootstrap's bank. If bit 2 of .SCOM+33 is set (i.e., if VT is ON) and bit 17 of .SCOM+33 is set (i.e., CTRL X is set for VT), set bit 1 of .SCOM+33 in order to tell the Resident Monitor Initialization to start up CTRL X. .EXIT CD Set bits ~ and 2 of location 1777 of the Bootstrap's bank, and set bit 1 of .SCOM+33 as with BATCH PRo .EXIT BUFFS number Put number indicated into .SCOM+26, and set Nonresident Monitor Initialization to leave .SCOM+26 alone. Next Command CHANNEL 7 9 Clear bit 13 of .SCOM+4. Set bit 13 of .SCOM+4 Next Command DATE date no date Enter date into .SCOM+47. Print date from .SCOM+47. Next Command (and/or) * This table assumes error-free input. 3-5 Table 3-1 (cont.) Effects and Exits for Nonresident Monitor Commands COMMAND GET GETP GETS GETT HALF ACTION TAKEN EXIT Set bit ~ of .SCOM+33. Clear bits f1 and 1 of .SCOM+33. .EXIT .EXIT MODIFIER Set Section 3.4. ON OFF HALT If not in BOSS-IS mode, put a HLT instruction (instead of a JMP) into the exit from non-IOPS 4 errors to .MED. If in BOSS mode, do nothing. Next Command INSTRUCT none ERRORS Print INSALL Table. Print INSERR Table. Next Command KEEP ON OFF Set bit 16 of .SCOM+42. Clear bit 16 of .SCOM+42. Initialize to SGEN default values all entries in .DAT and .UFDT, except change SCR default values to current UIC. Next Command Output five spaces after Carriage RETURNs. After ALT MODE, go to next command. Next Command (after ALT MODE) Redefine current UIC (. SCOM+4l) . Clear bit ~ of .SCOM+42, reset variable system parameters to SGEN default values zero .SCOM+S6. .EXIT LOGOUT Set current UIC to SCR. Set .UFDT entries to SGEN default parameters. Deposit zero into .SCOM+42 and S 6. .EXIT LOGW For BOSS-IS, print message. In all cases, after a Carriage RETURN, output five spaces. After ALT MODE, type four bells tp, and await CTRL P. After CTRL P, go to next command. Next Command (after ALT MODE) LOG LOGIN uic 3-6 Table 3-1 (cant.) Effects and Exits for Nonresident Monitor Commands ACTION TAKEN EXIT COMMAND MODIFIER LP ON OFF Set bit 3 of .SCOM+42. Clear bit 3 of .SCOM+42. .EXIT .EXIT MICLOG mic Check key with SGNBLK. If correct, set bit % of . SC0"1+42 , make "SYS" the current UIC, and zero . SCO"1+5 6. If incorrect, ignore command. Next Command PAGE ON OFF Clear bit 11 of .SCOM+4. Set bit 11 of . SCOM+4. Next Command PROTECT n If n is between fJ and 7, inclusive, enter it into . SCOM+54. Next Corrun and PUT See Section 3.4. QDUMP Enter MANSAV, the address of the manual CTRL Q, into the exit from non-lOPS 4 errors to .MED. Next Print the current assignments for .DAT and .UFDT. Print the current assignments for all positive .DAT and .UFDT slots. Print required .DAT and .UFDT slots, and the assignments and use for each. Next Command REQUEST none USER prog .SCOM Print the information for the current system. Next Command Next Command TIME time none Enter time into .SCOM+5,0. Print time from .SCOM+5.0. VT ON OFF .EXIT Set bit 2 of .SCOM+33. Clear bits 1, 2, and 17 of .SCOM+33. Execute 7%3.044. X4K ON OFF Enter 4.f5~~~fJ into .SCOM+2~. Deposit zero into .SCOM+2.0. Next Command 33TTY ON OFF Clear bit 2 of .SCOM+4. Set bit 2 of . SCOM+4. .EXIT 3-7 4. After assembly, the programmer must call PATCH, in order to make his relocatable binary program absolute. Commands to PATCH should be as follows: >DOS15) >READR 16~77 DOSNRM BIN) 16~77 indicates the highest location the new monitor can occupy. (SYSBLK begins at 161~~.) DOSNRM BIN happens to be the file name used by program development. The progranuner may, of course, substitute his own file name. More information may be found in the PATCH manual -- DEC-15-YWZB-DN5. 3.4 QFILE QFILE is a system program that allows users to (1) store core images in named files, and (2) retrieve such core images for examination via DUMP (or possibly for a slow, core-swapping capability). QFILE imple- ments the following Resident Monitor system macros and Nonresident Monitor commands: .GET, GET, GETP, GETS, GETT, .PUT and PUT Users can not obtain QFILE by typing its name to the Nonresident Monitor. The Resident Monitor will load QFILE as part of its response to the commands and macros listed above. PUT creates a file that contains the data in the CTRL QAREA; creates a file from the current core image. .PUT GET, GETP, GETS, GETT and .GET all overlay core with the contents of the QAREA or file. different commands specify different startup locations.) (The In addition to the above capabilities, the Resident Monitor provides the capability of overlaying core with the contents of the CTRL Q area. The follow- ing instructions show how to use that routine: UNITNO=4~~~f1~ .SCOM=l~~ LAC START XOR JMP* UNITNO (. SCOM+6 4 /UNIT FOUR /STARTING ADDRESS AFTER THE CTRL Q /GET /UNIT NUMBER IN HIGH-ORDER THREE BITS /ADDRESS OF CTRL Q GET ROUTINE 3-8 Figure 3-2, QFILE, and Implementation of GET and PUT Logic, shows the information flow associated with QFILE. QFILE uses the follow- ing registers: . SCOM+7 , l~ .SCOM+65 & 11 .SIXBT Filename and Extension Command parameters, packed as follows: Bits ~-2 Bit 8 Bit 9 Bits 15-17 Device unit number NRM PUT, when set PUT logic, when set Function Code .SCOM+66-71 CTRL Q Area parameters .DAT-14 File must be on the device assigned to this .DAT slot. NOTE All GET and .GET operations change all of core, except registers ~ through 4 of bank zero. 3-9 .PUT CAL 1. store unit number and function code into 2. Set bit 9 of .SCOM+65 to indicate .PUT Store unit number and code into 1. Store unit number an function code into 2. Set bits 8 and 9 of .SCOM+65 to indicate NRM PUT • 5COM+ 65 .SCOM+65 .SCOM+65 N Dump core into CTRL Q area Bring in QFILE via a .OVRLA GET 1. 2. PUT Transfer core image from CTRL Q area to named file via Monitor TRAN's and dump mode .WRITE's Save .SCOM+65 from the file Transfer core image file to crRL Q area via dump mode .READ's and Monitor TRAN's. N Use function code from file's .SCOM+65 1. 2. Store correct startup address Do Monitor TRAM from CTRL Q Note: This chart assumes error free input. QFILE, and Implementation of GET and PUT Logic Figure 3-2 3-10 CHAPTER 4 THE SYSTEM LOADER AND THE LINKING LOADER The System Loader is the third major part of the 00S-15 Monitor. other two are the Resident and Nonresident parts. The The Resident and Nonresident Monitors communicate with the System Loader by manipulating certain .SCOM registers. When comm&nds to either part imply a new configuration is needed, that part sets up the appropriate .SCOM registers, and passes control to the System Bootstrap via the Monitor TRAN routine. The Bootstrap then loads the System Loader into high core, and gives it control. The System Loader examines the .SCOM registers, and loads a fresh copy of the Resident Monitor, including any features that the user wishes to be resident, such as the CTRL X feature. desired system program and tion. a~l It will also load the handlers required by the new configura- In addition, it will allocate all required buffers. The Non- resident Monitor is treated like any other core-image system program. The System Loader never loads user programs. It only loads core-image system programs, the Linking Loader and Execute. user The latter two load programs~ The System Loader uses two device handlers to interface with the disk: the System Bootstrap, and the System Loader Disk Handler (DKL.). OKL. arrives in core along with SYSBLK, COMBLK and SGNBLK, as well as the loader itself. The Bootstrap loads core image programs only. The OKL. takes care of relocatable programs and any handlers loaded by the System Loader. Those include all handlers for core-image system programs, the Linking Loader's own handlers, and any needed by the Execute file. The Linking Loader loads some handlers needed by user programs it links. There are two parts to the System Loader: and the System Loader proper (.SYSLD). Loader Interface. the System Loader Interface, Figure 4-1 describes the System Figure 4-2 describes the System Loader Proper, and Figure 4-3 describes the Linking Loader. 4-1 Turn on the clock Initialize First free reg.SCOM+~ ister below the Bootstrap SGEN default .SCOM+4 Bit zero set, i .SCOM+2~ extra 4K: rest zero .SCOM+33 VT & HALF, as per SGEN .SCOM+74 Line frequency -Mov to hi hest bank 2. 3. 4. 5. 6. 7. 8. 9. l~. 11. Zero .SCOM+36, to indicate no entries in Busy Table Move Resident Monitor into lower core Set up: Jump to Skip Chain CAL* error Legal CAL jump Turn API on or off, depending on bit ~ of .SCOM+4 (set=on) Bank bit initialize Resident Monitor to talk to the Bootstrap, and load .SYSLD into the proper bank upon a subsequent .EXIT or .OVRLA. Initialize the Bootstrap with the proper lOPS 4 address for disk not ready Calculate the Skip Chain from SGNBLK Set all API channel registers to point to lOPS 3 (with the exception of the clock interrupt) and all software levels to point to lOPS 3~ Put transfer vector to .DAT slots into .SCOM+23 Put number of positive ~DAT slots into .SCOM+24 Put pointer to .UFDT+~ .into .SCOM+25 N .TRAN image _of .OAT and • UFDT out to block 37 of the system device unit .TRAN image of .OAT and • UFDT in from block 37 of the system device unit ~ 1. 2. 3. Zero .OAT-7 (i.e., not yet set up) set up .DAT-2 and .DAT-3 for TTA. Update .SCOM+l and +2 to point just-above the Skip Chain, .DAT and .UFDT Next Page System Loader Initialization Figure 4-1 4-2 From Preceding Page 1. 2. 3. 4. 5. Put number of system device's "A" handler (DKA. or DPA.) into .SCOM+57 Set up tabbing for current teleprinter Set .SCOM+2~ to initial state (as in first t~e initialization) Set up for CTRL Q -- ignore Q-dumps if RF system and QAREA too small, or nonexistent Setup for lOPS errors upon the followinG interrupts: Nonexistent Memory (lOPS 31) Memory Protect Violation (lOPS32) Memory Parity Error (lOPS33) Power Fail Not Set Up (lOPS34) N Y -- Non-BOSS Batch Set up for the proper input device (CD or PR) N Y 19- nore input until $JOB N~tP~e System Loader Initialization Figure 4-1 (Cont.) 4-3 From Preceding Page 1. Set up CTRL C to clear the Batch Switch (bit 1 of 17777 of the Bootstrap) 2. set up CTRL T to abort current job, and start the Batch Monitor looking for the next $JOB line 3. Relocate proper batch handler (PR or CD) to low core 4. Put handler entry point into .DAT-2 5. Set lOPS errors to abort job -- effectively a CTRL T 6. Set up all batch device .DAT slots to refer to the handler currently in core. That is, only one batch input device is allowed at anyone time 7. Clear $JOB read switch (bit 1 of Bootstrap 17777) 8. Perform .INIT to .DAT-2 N 1. 2. 3. Relocate Resident BOSS and link it to the DOS Resident Monitor Patch DOS Resident Monitor to accomodate BOSS Set bits 14, 15 and 17 of .SCOM+42, to tell .SYSLD to set up .DAT-7 and +6 N Relocate and link CTRL X code, and give proper buffer N Set up linkages between CTRL X code and the Resident Monitor Next Page System Loader Initialization Figure 4-1 (Cont.) 4-4 From Preceding Page N 1. Allocate the number of buffers indicated by .SCOM+26 2. Set up File Buffers Transfer Vector Table pointer, in .sCOM+3~ 3. Store one of the following codes into .SCOM+6: LOAD l~~~~~ GLOAD 3~~~~~ DDT 4~~~~~ DDTNS 5~~~~~ 4. Zero .SCOM+5 ~ __________________ ~ Tell .SYSLD by setting .SCOM+ll to XCS (avoids two handlers in core for same device) 1. __ ~ __ ~ ____________ ~2. 3. Allocate number of buffers indicated by .SCOM+26 Set up File Buffers Transfer Vecter Table in .SCOM+3~ Set .SCOM+6 = m (Loading a Core-Image Program) 1. Find entry in SYSBLK and COMBLK 2. Build Overlay Table from information in COMBLK, and set .SCOM+31 to first word in the table 3. Store the number of overlays in the overlay processor of the Resident Monitor 1. Store the list of active .DAT slots derived from COMBLK in the System Loader command area, just below the ~ootstrap, and delimit the list with a zero 2. If the Nonresident Monitor was not the last program, restore .SCOM+26 ~default 3. Allocate space for, and set up .SCOM+3~ to point to the File Buffers Transfer Vector Table Next age System Loader Initialization Figure 4-1 4-5 (Cont.) From Preceding Page 1. 2. 1. 2. Zero .SCOM+6 Put 1 into .SCOM+5 Move the RCOM Table to position below the Bootstrap Build the IOC Table System Loader Initialization Figure 4-1 4-6 (Cont.) 1. 2. 3. 4. set up for Page or Bank Mode Set up .DAT-7 for the System Loader disk handler COXA. or OPA.) Clear free core, and initialize bank bits in pointers to the Bootstrap Make a Mass Storage Busy Table consisting of one entry 1. 2. Change XCS to XCT Allow reading of EXECUTE file by the System Loader Handler Clear memory bank pointers of banks that do not exist N Load handlers into extra 4k, N Put System Device's code into .DAT+~, to allow subsequent insertion into .DAT-7 Next Page The System Loader Figure 4-2 4-7 From Preceding Page EXECUTE coreimage N 1. Translate the handler code from radix N to .SIXBT 2. Do .USER to .UFOT-7, using "lOS" 3. Do .INIT and .SEEK to .OAT-7, in order to get the handler file 4. Load handler via .OAT-7, and close .OAT-7 5~ N -- Note: Subroutine IOPROS accepts .OAT slots as input. If the indicated .OAT slot contains zero, the slot is unassigned, and IOPROS returns. If not zero, IOPROS checks----------~ whether the desired handler has already been loaded. If the handler is in core, IOPROS loads the .OAT slot with the handler's starting address and returns. If the handler has not been loaded, the handler code is made an unresolved .GLOBL, to be satisfied by the loop that follows immediately. The System Loader Figure 4-2 (Cant.) 4-8 not 1. Set up Mass storage Rusy Table Entries for all active .OAT slots 2. Set .SCOM+l to first free location in core--often becomes first location of EXECUTE next page From Preceding Page Load and relocate EXECUTE or the Linking Loader, and place starting address into .SCOM+5 N 1. 2. set up Mass Storage Busy table with one entry per active .DAT slot Move the IOC table from the System Loader's area (just beneath the Bootstrap) to the Linking Loader's area set .SCOM+2 and +3 to delimit free core dress in SCOM+5 1. 2. 3. Allocate all necessary buffers If the system has an extra 4K, put the first free address beneath the handlers into .SCOM+2~ Update first free location in core shown in .SCOM+2 -- .OVRLA updates the first free address beneath the Bootstrap, .SCOM+3 Exit via .OVRLA Note: Subroutine BaseKl does the following, if loading a program under BOSS-15: (1) .USER to .UFDT-7, (2) .SEEK to .DAT-7 for PRCFIL PRC. The System Loader Figure 4-2 4-9 (Cont.) STARr 1. 2. 3. 4. 5. Clear all of core above the loader, including the extra 4K, if present, and excluding the Bootstrap , Initialize the Load Table with the first free address in every bank or page Indicate all core below the address in .SCOM+2 as not free Compute transfer vectors to .OAT-l, -3, -4, -5, and -7, and a pointer to .UFDT-l Save the contents of .UFDT-l N Load DDT and set the symbol flag, if not ODTNS Type appropriate name, and await command string 1. 2. 3. Check for P, G and C switc es Translate all file names after left arrow into .SIXBT, pad with blanks, and store in symbol table After ALT MODE, load to end-of-file each file on .DAT-4, and put starting address of the first file (i.e., not DDT) into .SCOM+6 N After every end of tape, type tp and await CTRL P -- continue until number of tapes equals the number of commas, plus one Next Page The Linking Loader Figure 4-3 4-10 From Preceding Page Check Symbol Table for handlers needed, and load them from .DAT -1, using lOS as a UIC; exit if ille al .DAT desired y NOTE: During the library searches diagrammed on this page, the Linking Loader tests for more unresolved .GLOBL's after each resolution. Whenever there are no more unresolved .GLOBL's, the Linking Loader halts its library searches, and goes directly to the COMMON area allocation code (next to the last box on this page). Thus, the libraries are never searched more than is necessary. Check Symbol Table for any unresolved .GLOBL's y 1. 2. 3. Do .SEEK to LIBRS BIN on .DAT-S Read through user's library and load any program units that satisfy any .GLOBL's Read to end of library file, if still unresolved .GLOBL's If any unresolved .GLOBL's, try to program units in the system library (.LIBR BIN) on .DAT-l ~----------~~------------~find Scan Symbol Table for Common Blocks, and allocate space and set pointers, as needed. If any unresolved .GLOBL's seek matches in the Common Blocks Exit to the~______-1 Print LOAD3 error Nonresident message Monitor ~------------------ y Next Page The Linking Loader Figure 4-3 (Cont.) 4-11 From Preceding Page y Set .SCOM+2 below all of the Loader's handlers, and the Loader itself set .SCOM+2 above the Loader's highest handler -- no handler is overlayed Allocate the Mass Storage Busy Table, with the number of entries equal the sum of the active .DAT slots, minus one -- i.e., the two .DAT slots for the teleprinter are omitted, and one for .DAT-7 is added GLOAD LOAD Put lowest address of the Symbol Table into .SCOM+II, and the highest into .SCOM+2 -DDT will recalculate .SCOM+2 The Linking Loader Figure 4-3 4-12 (Cont.) 4.1 MANUAL BOOTSTRAP LOADS AND RESTARTS Manual Bootstrap loads and restarts bring blocks device into the lowest bank. ~-36 of the system These blocks contains the Resident Moni- tor, the System Loader Interface Routine, and SYSBLK, COMBLK and SGNBLK. Figure 4-4 illustrates the core load after manual Bootstrap loads and restarts. The Interface sets up .SCOM+~, 4, 2~, 27, 33, 54 and 74 from SGNBLK values determined at system generation time, and then transfers the whole core image of the Interface to the Bootstrap's bank. bank (DOS requires 16K, because this bank must be different from ~.) At all other times, the Bootstrap loads the System Loader into its own bank. This preserves the image of .SCOM, part two of the Resident Monitor patch 4.2 ~ea, and the CTRL X buffer. LOADING SYSTEM PROGRAMS The System Loader Interface Routine gets control in the highest bank, either by a transfer from the lowest bank, or by load from the Bootstrap. After setting up for the System Loader Proper (.SYSLD), accord- ing to the program to be loaded and the settings of certain SCOM registers, the Interface Routine brings it in as a complete overlay. Figure 4-5 illustrates the core configuration of the Interface when it is in the highest bank. (The addresses provided are for a 16K system.) The System Loader loads handlers from the lowest part of free core up, with the exception that the extra 4K is filled first, if it exists. Core image system programs are usually loaded just beneath the Bootstrap (always in the highest bank). Such core images must be wholely within the top bank of core, and above register 17 of that bank. Figure 4-6 illustrates the core maps for system programs. Whenever the Linking Loader is loaded (LOAD, GLOAD, DDT, and DDTNS) , the System Loader loads all handlers for .DAT slots -1, -4, and -5, and then loads the Linking Loader itself. Linking Loader.) (DDT is loaded by the Figure 4-7 illustrates the core maps for the Linking Loader. For EXECUTE, the System Loader loads EXECUTE's handler, and reads the EXECUTE file, in order to determine the active .DAT slots. The System Loader then loads all the handlers required, and sets up the .DAT slots. Figure 4-8 illustrates core maps for EXECUTE. 4-13 16K. 24K. 32K 16K, 24K. 32K BOOTSTRAP BOOTSTRAP .SCOM .sCOM .ReOM TABLE 37500 (16K) SGNBLK UNUSED 37100 (16K) SYS3LK and COMBLK 36100 (16K) 17500 SYSTEM LOADER INTERFACE (overlayed by .SYSLD) 3 SYSTEM BLOCKS 16100 SYSTEM LOADER INTERFACE RESIDENT MONITOR IMAGE 20100 (16K) 16K, 24K. 32K RESIDENT MONITOR BOOTSTRAP .SCOM 100 .SCOM+3· .SCOM+l.2 • DDT, IF PR ESENT RESIDENT MONITOR 15-0663 1 • A s the In1erhce moves code down, It Inere ments .SCOM+l and +2. 15-0664 LOADED PROGRAMS Figure 4-4 ON DDT LOADS. SYMBOLS ARE MOVED INTO THE LOWEST PART OF FREE CORE. Bootstrap Load Figure 4-5 SYMBOL TABL E SYMBOLS AND PROGRAMS BUILD TOWARD EACH OTHER. i Standard Interface Load .SCOM+2· LINKING LOADER" LOADER HANDLERS 16K, 24K, 32K .SCOM+l BOOTSTRAP BUFFER POOL .SCOM 16K. 24K, 32K BOOTSTRAP SYSTEM PROGRAM .SCOM BUFFER POOL TRANSFER VECTORS (THIS AREA IS USED BY CORE IMAGES. SOME ROOM UNDERNEATH THE BOOTSTRAI' MAY BE LEFT FREE FOR COMMUNICATION BETWEEN CORE IMAGES IN AN OVERLAY STRUCTURE. CORE IMAGES MUST BE BK OR LESS.) OVERLAY SYSTEM BLANK COMMON RESIDENT MONITOR .SCOM+3 ·Placement of .SCOM+2 depends on relative positions of the Linking Loader and its handlers . .SCOM+3 FREE CORE When control is nansfertad to loaded program, SCOM.2 and +3 bracket 1ree core FREE CORE 15-0660 .SCOM+2 .SCOM+2 Figure 4-7 EXECUTE HANDLERS, BUFFERS .SCOM+l Linking Loader All HANDLERS REQUIRED BUFFER POOL TRANSFER VECTORS BUFFER POOL OVERLAY TABLE BUFFER POOL TRA'IISFE R VECTORS DEVICE TABLE .SCOM+l RESIDENT MONITOR RESIDENT MONITOR 15- 0662 Figure 4-6 15-0661 Figure 4-8 System Program Load Execute 4-14 BOSS-IS Mode operation requires the system "A" handler be assigned to .DAT-7. This requires a sleight of hand on the part of the System Loader, which needs the "L" handler on .DAT-7. It therefore loads the "A" handler as if it were assigned to .DAT+P', and transfers the set up .DAT slot ~ contents to .DAT-7 before transferring control to the program being loaded. .DAT+~ is then restored to its original status. 4.4 TABLES AND INFORMATION BLOCKS USED AND BUILT BY LOADERS The System Loader uses SYSBLK, COMBLK, SGNBLK, block 37 of the system device, .SCOM, the RCOM Table, the IOC Table, the Device Table, the Mass Storage Busy Table, the File Buffers Transfer Vector Table, the Overlay Table, .DAT, .UFDT and three bits in the Bootstrap. Tables 4-I, 4-I1 and 4-II1 describe how the Loaders use these blocks and tables. 4.5 .DAT SLOT MANIPULATION BY THE SYSTEM LOADER The System Loader maintains the .DAT slot device handler assignments as they were the last time the Nonresident Monitor was in core. The Loader saves the .DAT and .UFDT on the system device whenever the Nonresident Monitor was the last program. in core. Thereafter, the Loader refreshes .DAT and .UFDT from the image on the disk. If KEEP is off, the Nonresident Monitor's initialization routine restores the .DAT and .UFDT to default values. When loading core-image system programs, the System Loader determines the active .DAT slots by examining COMBLK. When loading EXECUT, the System Loader sets up .DAT-4, and any active slots indicated by the Execute file itself. wnen loading the Linking Loader, the System Loader sets up .DAT-l, -4, and -5. The Linking Loader will set up other other active .DAT slots according to the .IODEV commands in the assembly of the program units being loaded. Both the System Loader and the Linking Loader set up .DAT slots in this manner: (In the following procedure, "loader" refers to either one. ) 4-15 Table 4-1 I Tables and Block? Used by the Loaders I USE LOCATION SYSBLK The System Loader obtains Monitor TRAN parameters from SYSBLK when it builds 16S99 of .SYSLD's bank COMBLK Indicates number of buffers required, the active .DAT slots, and the names 171~f1 SGNBLK Default settings for .SCOM registers, number of words per buffer, size of Resident Monitor's patch area (part two), Skip Chain, .DAT and .UFDT default contents, and handler information. 16199 of .SYSLD's bank Block 37 of the System Device Image of .DAT and .UFDT, when last program was loaded (excluding the Nonresident Monitor). . SCOM Table See Table 4-11 . RCOM Table Moved for use by the Nonresident Monitor. 175f1f1 of the highest bank laC Table Built by Interface Routine for .SYSLD itself. Just beneath the System Loader Device Table Built by Interface Routine if loading PIP, or if PIP is among the overlays listed in COMBLK Just above .SCOM+l Mass Storage Busy Table Built by the System Loader itself. Pointed to by .SCOM+62 File Buffers Transfer Vector Table Allocated by the Interface Routine, and initialized by it for non-core Image programs. System Loader proper initializes for core-image programs. Pointed to by .SCOM+39 Overlay Table Built by the Interface Routine Pointed to by .SCOM+31 .DAT and .UFDT Image stored and restored from block 37 of the System Device. The System Loader loads all handlers for core-image programs and EXECUTE Files, and sets up the appropriate .DAT slots. The System Loader also loads handlers assigned to .DAT-l, -4, and -5 when loading the Linking Loader, and .DAT-7 and +6 for BOSS-IS. Pointed to by .SCOM+23 and .SCOM+2S BOOTSTRAP Bits fI, I, and 2 of location 17777 in the Bootstrap's bank used for Batch (nonBOSS) information. NAME down, in .SYSLD's bank l.0f1 of 1st bank 4-16 Table 4-11 .SCOM REGISTERS USED BY THE SYSTEM LOADER .SCOM+ Description of Use by the System Loader f! Set in first-time initialization routine. Used to locate the System Loader Conunand Area, which is just below the Bootstrap. I System Loader Interface routine updates this indication of the first free register above the Resident Monitor each time it moves a piece down to low core. 2 The Interface and .SYSLD itself continually update this indication of the first free location as they move code and build tables. 3 Updated as with .SCOM+2. Last free location in core. 4 First Time Initialization routine sets this register according to a SGNBLK parameter. Refer to Table 4-III. 5 Interface Routine stores code of program to be loaded .SYSLD uses .SCOM+S for starting address into .SCOM+S. when loading EXECUT or LOAD. The .OVRLA routine loads .SCOM+S with starting address of the Monitor Recovery The Bootstrap transfers to the address in Routine. .SCOM+S after all its operations. 6 Interface Routine stores codes for DDT, DDTNS, LOAD and GLOAD into . SCOM+6. For other programs, the Interface Routine zeroes . SCOM+6. 7 .SYSLD saves contents of .DAT-I in .SCOM+7, when loading the Linking Loader. When loading EXECUT, .SCOM+7 contains the first three characters of the Execute file's name. Contains .DAT-12 when loading Nonresident Monitor. If! .SYSLD saves contents of .DAT-4 in SCOM+l,0, when loading the Linking Loader. When loading EXECUT, .SCOM+l,0 contains the second three characters of the Execute file's name. 11 .SYSLD saves contents of .DAT-5 in .SCOM+ll, when loading the Linking Loader. When loading EXECUT, .SCOM+ll contains the extension of the Execute file's name. (The Interface routine sets .SCOM+ll to XCS, telling .SYSLD that EXECUT will be using the system device. .SYSLD then restores .SCOM+ll to XCT.) 1215 The Interface routine initializes these transfer vectors for API software levels to point to SERR, an error routine that will produce an IOPS3,0. 16, 17 Unaffected. 4-17 Table 4-II (Cont'd) .SCOM+ Description of Use by the System Loader 2)1 Bit zero set in first time initialization, if system contains an extra 4K. If the system does contain an extra 4K, the System Loader will load handlers in that page -from the bottom up -- when loading a core-image program. Whenever there is an extra 4K, the System Loader will update bits 3-17 with the address of the first free cell in the extra 4K. 21 Unaffected. 22 Unaffected. 23 The Interface Routine refreshes this pointer to .DAT. 24 The Interface Routine refreshes this indication of the number of positive .DAT slots. 25 The Interface Routine refreshes this pointer to .UFOT+.0'. 26 When the Nonresident Monitor was the last program, the System Loader allocates the number of buffers indicated by the contents of .SCOM+26. If the Nonresident Monitor was not the last program, the System Loader restores .SCOM+26 to the default value if program to be loaded is core image. Otherwise, untouched. 27 The first time initialization routine sets this indication of the number of words per file buffer. 3~ The Initialization Routine loads this pointer to the File Buffer Transfer Vector Table. 31 When loading a core-image program, the Interface Routine loads .SCOM+31 with the pointer to the Overlay Table, or with zero, if there is none. 32 Unaffected. 33 See Interface Routine table, to determine how that routine reacts to the bits in . SCOM+33. 34, 35 Unaffected. 36 System Loader loads wi th the number of active . OAT slots assigned to the system device. 37-42 Unaffected. 43, 44 Contains name of the program to be loaded. 45-56 Unaffected. 57 System Loader loads with the number of entries in the Mass Storage Busy Table. 6)1, 61 Unaffected. 62 System Loader loads with the address of the first entry in the r.~ass Storage Busy Table. 63- Unaffected. 4-18 Table 4-II1 Use of .SCOM+4 by the System Loader Bit 0 If set, place "API ON n constant into ~~~~~6. If clear, place "API OFF n constant in same register. 1 Ignored. 2 If set, change the Resident Monitor so it will tab with the KSR 35/37 tabbing mechanism. 3 Loader will set this bit, if loading the Nonresident Monitor; clear it otherwise. 4-6 Ignored. 7 Loader sets this bit if bit 11 is cleared, and loadOtherwise clear. ing the Linking Loader or Execute. 8 Sets or clears, after comparing current core size (known by location of Bootstrap, and status of bit ~, .SCOM+2,0) with SGNBLK parameter. Also, modifies Resident Monitor to give IOPS77 after attempts to use CTRL Q. 9, 10 Ignored 11 Indicates whether to clear or set bit 7 , when loading Linking Loader or Execute. 12-17 Ignored 4-19 1. Each .OAT slot will contain a handler number -- either the system default, or one inserted via an ASSIGN command to the Nonresident Monitor. This handler number is the relative location of the handler name in the IOC Table, which the Interface Routine builds. (The IOC Table contains handler names in Radix 5~.) . 2. For each active .OAT slot, the loader uses the handler number in that slot to find the name in the IOC table, and converts the name to .SIXBT. 3. If the handler is already in core, the loader simply inserts the starting address of the handler into the .OAT slot. 4. If the handler is not yet in core, the loader does a .SEEK to lOS for the handler, reads it into core, relocates it, and places the starting address of the handler into the .DAT slot. The System Loader always sets up .OAT-2 and -3. (It reserves .OAT-7 i for its own use.) When not in non-BOSS Batch Mode, -2 is assiqned I to TTA. - In non-BOSS Batch Mode, the batch input device goes to -2. If loading the Nonresident Monitor and bit three of .SCOM+42 is set, I the System Loader will set up .DAT-12 for the LPA, if it is in the I system, or else for TTA. If in BOSS mode ,I the Nonresident Moni tor assigns LPA. to .OAT+6, and the System Loader assigns .DAT-7 to the system device "A" handler. handlers are in core. The System Lo~der then ensures that both The Resident BOSS set up routine subsequently routes all .DAT slots connected to TTA. to Resident BOSS. I 4.6 BUFFER ALLOCATION BY THE SYSTEM LOAD~R The System Loader allocates space for buffers equal to the contents of .SCOM+26 times the contents of .SCOM+27. The first time initial- ization routine sets .SCOM+27 to the standard number of locations per buffer. Before the Nonresident Monitor does an .OVRLA to a software system program, it checks whether a BUFFS command has been issued. If so, it leaves .SCOM+26 as is. If not, it uses the default number of buffers for that program, as shown in SYSBLK. 4-20 CHAPTER 5 SYSTEM INFORMATION BLOCKS AND TABLES 5.1 CORE-RESIDENT NON-REFRESHED REGISTERS The .SCOM table, the Bootstrap and the resident Patch Area are the only registers not refreshed by the System Loader. Table 5-I de- scribes the .SCOM Table. 5.2 DISK-RESIDENT UNCHANGING BLOCKS: SYSBLK, COMBLK AND SGNBLK I I SYSBLK, COMBLK and SGNBLK occupy blocks 34, 35, and 36 (octal) on the I system device (unit zero). SYSBLK and COMBLK (blocks 34 and 35) contain the parameters for loading all core image system programs. I tains all the other information needed to run DOS. I SGNBLK con- All three arrive in core along with the Resident Monitor and the System Loader Interface, and start at location l61~~ I of the highest bank. The Nonresident I Monitor and System Loader use them, and DOSGEN and PATCH modify them, when necessary. 5.2.1 SYSBLK SYSBLK contains the parameters required for implementation of .OVRLA to any system program, or any of the system program overlays. The order of entries in SYSBLK is unimportant, except for the first three permanent entries: RESMON, .SYSLD, and fQAREA. of SYSBLK contains the block address first free word after itself. 5.2.2 The first word (the unrelocated address) of the Figure 5-1 describes SYSBLK. COMBLK COMBLK contains information the System Loader and the Nonresident Monitor need to remember about the current core-image system programs. The last location in COMBLK (that is, location 377 of block 35) contains the block address of the first entry in COMBLK. The remainder of COMBLK consists of variable-length entries associated with the system programs. The Nonresident Monitor searches COMBLK when it finds no match for a typed command in its own Command Table. 5-1 illustrates the organization of COMBLK. 5-1 Figure The System Generator adds TABLE 5-1 .SCOM Registers I REGISTER BIT MEANING ~ First register below the Bootstrap (set by the System Loader Interface) 1 First register above the Resident Monitor (set by the System Loader Interface) 2 Lowest free register available for storage (set by the System Loader or the Linking Loader) 3 Highest free register available for storage (set by the System Loader, the Linking Loader or DDT) 4 Initialized from SGNBLK values by the IIfirst time section of the System Loader Interface Routine, and by the LOGIN, LOGOUT and MICLOG logic of the Nonresident Monitor; modified by the Nonresident Monitor, unless otherwise indicated. ~ = 1 API is available. 1 = 1 EAE is available (always set) 2 = 1 Teleprinter is Model 35 or 37 3 = 1 Nonresident Monitor is in core 4,5 6 Reserved = 1 9-Channel Magnetic Tape System 7 = 1 Page Mode Operation 8 = 1 QAREA inadequate for current core size (set by the System Loader Interface Routine) 9 = 1 DOS disk file structure (always set) 1.0 = 1 RB~9 11 = 1 Bank Mode System 12,13 Line Printer Line Size: ~9 )11 1.0 11 14 = 1 15- 17 disk is system device. No Line Printer 8~ Characters 12.0 Characters 132 Characters Background/Foreground System (always clear) Drum size (ignored -- DOS does not support drum) 5-2 ll TABLE 5-1 (Cont'd) I REGIS~ER 5 6 MEANING BIT Core Image System Program starting address. fJ = 1 DDT in core. 1 = 1 GLOAD 2 = 1 DDTNS User program starting address. 3-17 When using the Linking Loader, . SCOM+7 , 10 and 11 contain the handler numbers for handlers needed by the Linking Loader in . DAT -1, -4, and -5 respectively. 7-11 When using EXECUTE, 7-11 contain the .SIXBT representation of the name and extension of the Execute File. When using QFILE (for implementation of .GET, .PUT and the Nonresident Monitor GET and PUT commands), 7-11 contain the .SIXBT representation of the name and extension of the core image file. 12 API Level 4 service routine entry point 13 API Level 5 " 14 API Level 6 " 15 API Level 7 " 16 Program Counter on Keyboard Interrupts. 17 AC on Keyboard Interrupts. 2fJ fJ 3-17 = 1 2fJK or 28K system. First free address in top page. 21 Magtape Status Register. 22 Reserved for Magtape Handler. 23 Pointer to .DAT+,0. 24 Number of positive .DAT slots. 25 Pointer to .UFDT+fJ. 26 Number of buffers. 27 Number of words per buffer. 3fJ Pointer to Buffer Transfer Vector Table. 5-3 TABLE 5-1 (Cont'd) I REGISTERS BIT MEANING 31 Pointer to first entry in the Overlay Table (zero, if none). 32 Bad block number on lOPS 33 CTRL X status register. Y1 = 1 2~ and 72. HALF ON 1 = 1 Display Buffer already set up. 2 = 1 VT ON 17 = 1 If VT ON, display mode is on. 34 If in BOSS mode, elapsed time in seconds. 35 Instruction to clear TT Busy Switch. 36 Number of Entries in the Mass Storage Busy Table. 37 Entry point for Expanded Error Processor. 4~ JMP to Expanded Error Processor. 41 The logged-in UIC. 42 Bit Register. ~ =1 MICLOG successful. 1 = 1 .EXIT from Nonresident Monitor. = 1 3 _. 1 .OVRLA from Nonresident Monitor. 2 4 = 1 5 = 1 6-13 14 Dump core on calls to .MED (except lOPS 4) . Halt on calls to .MED (except lOPS 4) . Unused. = 1 15 = 1 16 LP ON -- LPA to .DAT-12 when loading Nonresident Monitor. = 1 17 = 1 Set up .DAT+6 (used by BOSS Mode). Load System Device Handler into .DAT-7. KEEP-ON. BOSS Mode. 43,44 .SIXBT Representation of the name of the core image system program to be loaded (if any). 45,46 .SIXBT Representation of the name of the Nonresident Monitor 5-4 TABLE 5-1 (Cont'd) I REGISTERS BIT MEANING 47 Date (MMDDYY) 5f1 Time (HHMMSS) 51 Elasped time, in ticks. 52 BOSS Bit Register fl = 1 BOSSl5 Mode. 1 = I Control Card Read by user, 5/7 ASCII image saved in first block of NRBOSS. 2 =1 Resident BOSS reached "EOF" on run time file 3 = I User exceeded time estimate. 4 = I I/O CAL to go to TTY. 5 = I Terminal lOPS error by user. 6 =1 QDUMP to be given to user on lOPS errors. 7 = 1 8 =1 Operator abort (Control T) . Job active. 9 = 1 Exit from BOSSl5 Mode. 1.0' = 1 User tried to do a .PUT. a listing given on LP. 11 = 1 User tried to do a .GET. 12 Not defined. 13 Not defined. 14-16 17 = 1 (RTF) . Core will be dumped and . SYSLD error number . Job abort. 53 Reserved for CTRL X code. 54 Default Protection Code. 55 Entry to Monitor TRAN routine. 56 Two's complement of time limit, in seconds (zero, if no limit) . 57 System Device Code, for use by the Linking Loader. 6fl Number of ticks until clock interrupt specified in last . TIMER (zero, if .TlMER not in use). 5-5 TABLE 5-1 REGISTER (Cont'd) BIT MEANING 61 . TIMER address. 62 Address of the first word in the Mass Storage Busy Table. 63 Numl;>er of words per Mass Storage Busy Table Entry. 64 JMP to CTRL Q GET routine. 65 QFILE Communication Register. 66 First Block of the CTRL Q Area. 67 Starting Address minus one of the CTRL Q Area. 7" Two's complement of number of word in Qdump 71 Starting Address after DUMP or GET. 72 Starting Address after CTRL Q. 73 TWo's cOIrlplement of the number of ticks left in the next second. 74 TWo's complement of the line frequency .. 75 Number of RTF Lines 76-1~5 (for BOSS Mode). Unused. 5-6 Word # Value Description ~ flfJf1nnn Pointer to first free word after SYSBLK (There is one set of seven words/core image program.) S 7N+l 7N+2 7N+3 .SIXBT .SIXBT nnnnnn Y 7N+4 flfIf1fJnn 7N+5 addres 7N+6 7N+7 ~nnnnn · · · · · · S B L •• K addres Name of System Program or overlay Number of first block on system device occupied by this program or overlay. Number of blocks occupied by this program or overlay Thirteen-bit first address for this program or overlay Program size Thirteen-bit starting address for this program or overlay · · · ~---------------. -----------------------------------------------------· (free area) ~---------~;;---l-;:;;;;~;-----~::::-:~-:::~:-::-~~::-::::~-~~:-:~::--5fJl 592 5fJ3 p 5f14 r .SIXBT .SIXBT .SIXBT .SIXBT 595 o~ ~f1fJfJ~2 .. C g o 1 M B L .OAT&777 '-..OAT&777 596 5fJ7 r 51fl f1f1~fl95 p K 511 512 513 514 .SIXBT .SIXBT 0-< 9f19fJfJl r Name of this system program g Number of buffers required by this program (Note that his program has no overlays. ) .OAT slot for this program .OAT&777 2 '- 777 case, Ifl) Name of this system program (leftjustified and zero-filled) Name of an overlay (left-justified and zero-filled) -- overlays are optional Number of buffers required by this system program (Bits fJ-6 = f1 means the end of any overlay names. This is why program and overlay names must be leftjustified.) Active .OAT slot Active .OAT slot (Note: 777777 for a .DAT slot means all positive .OAT slots.) Number of words for this entry (in this case, 5) . Pointer to first word in COMBLK (equals count from first word in SYSBLK). The two contiguous blocks on the system device that hold SYSBLK and COMBLK are treated by the system as one large block. In this case, COMBLK happens to start at location 5f1f1 of the two blocks combined. Figure 5-1 SYSBLK and COMBLK 5-7 names of core-image system programs by making them the new first entry. In this way, SYSBLK and COMBLK build toward the center. 5.2.3 SGNBLK SGNBLK (block 36 on the system device) contains all the system parameters not directly associated with core-image system programs. The bulk of SGNBLK is concerned with r/o (.OAT slots, .UFDT slots, Skip Chain Order, Handlers, and skip rOT codes and mnemonics). The first few registers hold such important system information as the system device, .SCOM+4 contents, and so on. The very first word in SGNBLK points to the block address of the first free word after SGNBLK. The next entry is an offset word indicating the total length (including itself) of the miscellaneous system parameter table to follow. This table includes the size of the .DAT and the size of the skip chain. The end of the handler and skip rOT table is the first free entry of the block. The .DAT slot table corresponds to the legal range of .DAT slots, with the maximum negative set to -15 and the maximum positive set to a number not to exceed 77 • The .DAT slots are in the form in which 8 they appear when the Nonresident Monitor is in core. That is, the unit number is in bits justified in bits 3-17. ~-2, and the number of the handler right- The handler number for the first handler in the Device Handler-Skip rOT Table is zero, for the pseudo-handler NON. TTA. is one, and so on. The constant l~~~~~ indicates a fixed or il- legal .DAT slot (such as -2, -3, and ~). DOSGEN will not modify such slots. The .UFD Table is m one-to-one correspondence with the .DAT slot Table. An entry of .SIXBT 'UIC' indicates that the logged in UIC is to be substituted for the name urc in the table. An entry of .srXBT 'SYS' in- dicates BNK or PAG is to be substituted, in accordance with the current addressing mode. Otherwise, the contents of each location will be the .srXBT representation of the corresponding .UFD slot. The Skip Chain Table lists the system skip lOT's in order. A negative skip (one that skips on "off", not "on") is represented in one's complement. Not all skips in the handler Skip lOT Table low) need to be included in the Skip Chain Table. 5-8 (described be- The Device Handler/Skip lOT Table contains all the handler nameS and skip lOT numbers and mnemonics for each I/O device identified to the system. Every such device has an entry in the table. A handler name must be exactly three characters in length, with the last character not an octal digit. characters. The The device code for a device is exactly two first two characters of each handler name for a de- vice must be the device code. This fact is essential for understand- ing the format of a device entry, since the device code is never stored as such in an entry, but is inferred from the device handler name. The typical entry for a device is the following: 1. The first words of an entry contain the handler names for a device in .SIXBT. Each handler name is different, and the end of the list of handlers is determined by a word with zeros in bits ~-5 (the first character position). 2. The word that terminated the list of handler names contains the number of skip lOT's for the device. For each skip lOT, there are three words in the table: two for the skip mnemonic and one for the actual code. The next device entry follows the last skip for the previous device. Handlers may be entered without any skips, but no devices may be entered without at least one handler name. the organization of SGNBLK. Figure 5-2 illustrates Appendix D of SGEN-DOS Utility Programs, DEC-lS-YWZB-DNI2, lists SGNBLK, SYSBLK and COMBLK, as they are supplied by Digital Equipment Corporation. 5.3 DISK-RESIDENT CHANGING BLOCKS The System Loader uses block 37 of the system device to store an image of .DAT and .UFDT. Other disk-resident changing blocks are the storage Allocation Table and the Bad Allocation Table. These tables are de- scribed in Chapter 6. 5.4 5.4.1 TEMPORARY TABLES BUILT FROM DISK-RESIDENT TABLES The Overlay Table The System Loader builds the Overlay Table from the entries in SYSBLK referenced by a core-image system program's entry in COMBLK. That is, the Overlay Table contains an entry for the system program itself, and one for each of its overlays. entry in the Overlay Table. Figure 5-3 illustrates the format of an The first entry in the Overlay Table is 5-9 Location Value yr 1 2 flIlflnnn 3 IlIlJ1nnn f14l3f1f1 f142Ilflfl 4 flflflf1l5 flIlflnnn 5 6 7 lfl 11 12 13 14 15 flJ1nnnn 7777nn 16 flIlflnnn nnnnnn nnnnnn nnnnnn nnnnnn .SIXBT nnnnnn flIlJ1Ilfln · 53 54 flJ1f1nnn .SIXBT III .SIXBT nnnnnn 112 · · 137 l4f1 · · · · · · · · · · · · · · · · · 312 nnnnnn .SIXBT · · · .SIXBT .SIXBT ·· .SIXBT J1Jlflflfl3 nnnnnn nnnnnn nnnnnn . SIXBT Description Pointer to first free entry in SGNBLK Number of miscellaneous parameters Size of .DAT plus size of .UFDT = (number of positive .DAT slots+l6) *2. (Initial value is 2~ positive .DAT slots.) Number of skips in Skip Chain System device code in .SIXBT Original contents of .SCOM+4 Original contents of .SCOM+29 Number of words per buffer (.SCOM+27) Default number of buffers (.SCOM+26) Monitor Identification Code Information on VT and CTRL X (.SCOM+33) Default files protection code (.SCOM+54) Size of the Resident Monitor Patch Area Minus the number of clock ticks in a second (-74 for 69 hz, -62 for 59 hz.) Device assignments for the .DAT (made by handler numbers). (Termination at 53 assumes 29 positive slots. ) UIC assignments for the .UFDT. I I I assumes 2J1 positive slots.) (Termination at Skip Chain Table (Negative skips in one's complement.) (Termination at 137 assumes 22 skips in chain. ) The last part of the SGNBLK is the Device HandlerSkip lOT Table. Each entry starts with the .SIXBT representations of all handlers for a particular device. (First two characters equal device code, for all handlers.) Zeros in the first six bits of a word indicate the end of the handler names, and says that the rest of the word contains the number of skips for this entry's device. The skip lOT's follow immediately. As above, one's complement skips indicate negative skips. Note, however, the confusing fact that a one's complement of a skip rOT is a positive number. Thus, 7yrnnn complemented is 97nnnn . flfIfIJlfll nnnnnn · · · SGNBLK ends at 312, in the DOS-15 system distributed by Digital Equipment Corporation. Figure 5-2 SGNBLK 5-10 pointed to by .SCOM+31. .SCOM+31 will contain zero, if there are no entries in the Overlay Table. This will occur during Linking Loader or EXECUTE loads • . OVRLA is the only Monitor function that looks at the Overlay Table. If the .OVRLA processor finds a match to the .OVRLA argument in the Overlay Table, it uses the parameters listed in the table to bring it in via a Monitor TRAN. Note that this bypasses the System Loader, and does not change the handler load. Thus, the overlay must use only those .DAT slots required by the original program, the one listed in COMBLK. If the .OVRLA processor does not find a match in the Overlay Table, it calls in the System Loader, which searches COMBLK for the requested program. This type of overlay request does not require that .DAT slot assignments be the same. all of On the other hand, the System Loader refreshes core except .SCOM, etc. is more difficult. Thus, communication between overlays The resident patch area, however, can be used for this purpose. 5.4.2 The Device Table The Device Table is built by the System Loader interface whenever PIP is being loaded, or when PIP is listed in COMBLK among the overlays for a program. It is located just above the register pointed to by • SCOM+I , and has an entry for each positive .DAT slot. If a slot has an assigned device, the low-order twelve bits of the corresponding entry in the Device Table will contain the device's code, in .SIXBT. Bit 3 is set when the slot is busy. If no device is assigned to a slot, the corresponding entry in the Device Table will contain zero. 5.4.3 The Input/Output Communication (IOC) Table The System Loader Interface builds the IOC Table and locates i t just below the first register of the System Loader. It contains an entry for each handler in the system, in the order that they appear in SGNBLK. The entries themselves contain the handler name in Radix 5~. The System Loader and the Linking Loader use the handler number supplied by the Nonresident Monitor to index down the IOC Table. use the contents of the entry for a .SEEK to the lOS UIC. 5-11 They 5.4.4 The Oevice Assignment Table (.DAT) The Device Assignment Table makes the association between logical and physical devices. The Monitor knows its location by the contents of .SCOM+23, which points to the zeroth entry in the Table. are found by indexing on the contents of .SCOM+23. Specific slots The number of nega- tive slots is fixed at 15 ' The number of positive slots is specified S by .SCOM+24, and may be any positive number less than 1~~8. It is specified at system generation time. The Nonresident Monitor places the handler number in the low order bits and the unit number in the high order bits. ler number from SGNBLK. It derives the hand- As mentioned above, the System Loader and the Linking Loader subsequently use the IOC Table to determine the handler name. After either loader has loaded and relocated a handler, it places the handler's starting address in all .OAT slots that reference that handler. bits. The unit number remains in the high-order three Slots with no handler (NON) contain zero~ Active .OAT slots are designated by COMBLK, for core-image system programs, and by .IODEV pseudo-ops for the Linking Loader and EXECUTE. The User File Directory Table (.UFDT) 5.4.5 .UFDT+~ is offset from .DAT+~ (pointed to by .SCOM+23) by the sum of the positive and negative .OAT slots. Each .DAT slot has a corresponding .UFOT slot. UIC's in the .UFDT are packed in .SIXBT. The address of .UFDT+~ 5.4.6 is stored in .SCOM+25. The Skip Chain Register 1 of Bank Chain. ~ contains a jump to the beginning of the Skip The Skip Chain is defined during System Generation, is located in SGNBLK, and is rebuilt every time the System Loader is called in. The System Generator Manual (DEC-15-YWZB-DN12) describes considerations for constructing the Skip Chain. 5.5 TEMPORARY TABLES BUILT FROM SCRATCH 5.5.1 File Buffer Transfe+ Vector Table The System Loader allocates space for the buffer pool, and creates the File Buffer Transfer Vector Table. .SCOM+30 points to the first entry 5-l2 in the table, and the number of entries is specified by .SCOM+26. Each entry in the table contains the address of a buffer, or its one's complement. Negative addresses indicate a busy buffer. Since refer- ences to buffers must be indirect anyway, buffers are allocated without regard to bank boundaries. 5.5.2 The RCOM Table The Nonresident Monitor requires certain information about the Resident Monitor that does not warrant reserving additional .SCOM registers. The System Loader therefore puts this information into the RCOM table, whenever it is loading the Nonresident Monitor. at register 5.5.3 175~~ The RCOM Table starts of the highest bank. The Mass Storage Busy Table Entries in this table are allocated by the System Loader or the Linking Loader. The Mass Storage Busy Table is pointed to by .SCOM+62 . • SCOM+63 contains the number of words per entry in the table, and .SCOM+36 contains the current number of entries. Generally speaking, there are as many entries in the Busy Table as there are active .OAT slots, although the disk handlers are the only ones that currently refer to the Busy Table. The .INIT command to a disk handler establishes a Busy Table entry. The .CLOSE command ponding entry. (or the Rewind .~TAPE command) deletes the corres- Figure 5-4 illustrates a typical Busy Table Entry_ The first word of an active entry in the Busy Table contains the .OAT slot in bits 9-17. The disk handlers save information about the UFO current for this .OAT slot in the Mass Storage Busy Table. They save information about the file current to the .OAT slot (if any) in the buffer pointed to by word 1 of the Busy Table Entry. More information on the disk handlers and file structure is contained in Chapter 6. 5.6 RESERVED WORD LOCATIONS Word locations ~ through 77 are dedicated systems locations and can- not be employed by the user. The contents of these locations are described in Table 5-5. 5-13 Word i N,N+l .SIXBT name of Overlay N+2 First block number N+3 First address, minus 1 N+4 Size, in two's complement N+5 Fifteen-bit starting address Contents Table 5-3 Word # N N+l N+2 N+3 N+4 Overlay Table Contents Device Type~_2' Unit Number _ , Write Check ,.DAT _ 3 5 6 9 l7 Buffer Address, or {O, if none allocated Three-character UIC First UFD block for this UIC UFD Entry size for files in this UFD Table 5-4 Mass Storage Busy Table Entry ADDRESS USE Stores the contents of the extended PC, link, extend mode status, and memory protect status during a program interrupt 1 EEM (for PDP-9 compatibility) 2 JMP to Skip Chain 3 .MED, entry to Monitor Error Diagnostic routine 4 JMP to error handler 5 Stores system type (Bank or Page) indicator during Teletype interrupts 6 Used for API ON/OFF indicator 7 Stores real time clock count 10-17 Autoindex registers 20 Stores the contents of the extended PC, link, mode status, and memory protect status on a CAL instruction. 21 JMP to CAL handler 22-37 Seven pairs of word counter-current address registers for use with 3-cycle I/O device data channels. 40-77 Store unique entry instructions for each of 32 10 automatic priority interrupt channels Table 5-5 Reserved Address Locations 5-14 5.7 BOOTSTRAP NON-BOSS BATCH BITS The high-order three bits of word 17777 in the Bootstrap are reserved for the Moniter, and have the following meanings: Bit ~ Bit 1 Bit 2 1 In non-BOSS Batch Mode ~ Not in non-BOSS Batch 1 $JOB ASCII line or card just read by batch device ~ Last line or card not $JOB 1 Batch device is card reader 2 Batch device is paper tape reader 5-15 CHAPTER 6 FILE STRUCTURES 6.1 DECTAPE FILE ORGANIZATION DECtape can be treated either as a directoried or non-directoried device. 6.1.1 Non-Directoried DECtape A DECtape is said to be non-directoried when it is treated as magnetic tape by issuing the .MTAPE commands: REWIND, BACKSPACE, followed by .READ or .WRITE. No directory of identifying information of any kind is recorded on the tape. A block of data (255 word maximum), exactly 10 as presented by the user program, is transferred into the handler buffer and recorded at each .WRITE command. A .CLOSE terminates record- ing with a software end-of-file record consisting of two words: 001005, 776773 Because braking on DECtape allows for tape roll, staggered recording of blocks is employed in DOS to avoid constant turnaround or timeconsuming back and forth motion of physically sequential block recording. When recorded as a non-directoried DECtape, block ~ is the first block recorded in the forward direction. Thereafter, every fifth block is recorded until the end of the tape is reached, at which time recording, also staggered, begins in the reverse direction. passes over the tape are required to record all 1100 6.1.2 8 Five blocks. Directoried DECtape Just as a REWIND or BACKSPACE command declares a DECtape to be nondirectoried, a .SEEK or .ENTER implies that a DEC tape is to be considered directoried. A directory listing of any such DECtape is available via the (L)ist command in PIP. A fresh directory may be recorded via the N or S switch in PIP. The directory of all DECtapes except system tapes occupies all words of block 1~~8. It is divided into two sections: Directory Bit Map and (2) a 340 8 (1) a 40 8 word word Directory Entry Section. 6-1 4~~8 The Directory Bit Map defines block availability. cated for each DECtape block (llOOS bits One bit is allo- = 408 words). When set to 1, the bit indicates that the DECtape block is occupied and may not be used to record new information. The Directory Entry Section provides for a maximum of 5610 files on a DECtape. Each file on the DECtape has a four-word entry. Each entry includes the three-word file name and extension, a pointer to the first DECtape block of the file, and a file active or present bit. Figure 6-1 illustrates the DECtape directory. Word ° U-'" Block l ~ Block 1~77 37 40 Entry r; 1----------- ~ - - -- Directory Bit Map Directory Entry Section f--------------- --Entry 55l~ 377 r; Wd. 5 6 a I I 1 Name 17 I I File Name Extension 2 3 11 12 File 11 Note: Nulls (0) fill in short file names. A file name extension is not absolutely necessary. Data Link (First File Block) Sign Bit: 1 = File Active A DIRECTORY ENTRY Figure 6-1 DECtape Directory Additional file information is stored in blocks 71 through 77 of every directoried DECtape. These are the File Bit Map Blocks. For each file in the directory, a 40S-word File Bit Map is reserved in block 71 through 77. The bit maps are contiguous, and the Nth file uses the 6-2 th . N bit map. Each block is divided into eight File Bit Map Blocks. A File Bit Map specifies the blocks occupied by that particular file and provides a rapid, convenient method to perform DECtape storage retrieval for deleted or replaced files. Note that a file is never de- leted until the new one of the same name is completely recorded on the .CLOSE of the new file. When a fresh directory is written on DECtape, blocks 71 through 100 are always indicated in the Directory Bit Map as occupied. Figure 6-2 illustrates DEC tape file bit maps. Block 718 Bit Map for File ~ Block 728 Bit Map for File 7 B1t Map for File 8 Bit Map for File 15l~ Bit Map for File 48l~ Block 778 Bit Map for File 56l~ Figure 6-2 DECtape File Bit Map Blocks Staggered recording (at least every fifth block) is used on directoried DECtapes, where the first block to be recorded is determined by examination of the Directory Bit Map for a free block. The first block is always recorded in the forward direction; thereafter, free blocks are chosen which are at least five beyond the last one recorded. The last word of each data block recorded contains a data link or pointer to the next block in the file. When turnaround is necessary, recording proceeds in the same manner in the opposite direction. turnaround is determined by examining the data link. When reading, If reading has been in the forward airection, and the data link is smaller than the last block read, turnaround is required. If reverse, a block number greater than the last block read implies turnaround. A software end-of-file record (001005, 776773) terminates every file. The data link of the final block is 777777. 6-3 Data organization for each I/O medium is a function of the data modes. On directoried DECtape there are two forms in which data is recorded: (1) packed lines - lOPS ASCII, lOPS Binary, Image Alphanumeric, and Image Binary, and (2) dump mode data - Dump Mode. In rops or Image Modes, each line (including header) is packed into the DECtape buffer. In lOPS Binary, a 2's complement checksum is com- puted and stored in the second word of the header. When a .WRITE which will exceed the remaining buffer capacity is encountered, the buffer is output, after which the new record is placed in the empty buffer. words, including header, because 10 of the data link and even word requirement of the header word pair count. No record may exceed 254 An end-of-file is recorded on a .CLOSE. It is packed in the same manner as any other line. In Dump Mode, the word count is always taken from the I/O macro. a word count is specified which is greater than 255 10 If (note that space for the data link must be allowed for again), the DECtape handler will transfer 255 word increments into the DECtape buffer and from there 10 to DECtape. If some number of words less than 255 remain as the 10 final element of the Dump Mode .WRITE, they will be stored in the DECtape buffer, which will then be filled on the next .WRITE, or with an EOF if the next command is .CLOSE. DECtape storage is thus optimized in Dump Mode since data is stored back-to-back. 6.2 See Appendix A. MAGNETIC TAPE DOS provides for industry-compatible magnetic tape as either a directoried or non-directoried medium. The magnetic tape handlers com- municate with a single TC-59D Tape Control unit (TCU). Up to eight magnetic tape transports may be associated with one TCU; these may include any combination of transports TU-IOA or Band TU-30A or B. There are a number of major differences between magnetic tape and DECtape or Disk; these differences affect the operation of the device handlers. Magnetic tape is well suited for handling data records of variable length. fashion. Such records, however, must be treated in serial The physical position of any record may be defined only in relation to the preceding record. Three techniques available in I/O operations to block-addressable devices are not honored by the magnetic tape handlers: 6-4 a. The user cannot specify physical block numbers for transfer. In processing I/O requests that have block numbers in their argument lists (i.e., .TRAN) the handler ignores the block-number specification. b. The only area open for output transfers in the directoried environment is that following the logical end of tape. c. Only a single file may be open for transfers (either input or output) at any time on a single physical unit. 6.2.1 Non-directoried Data Recording (MTF) MTF is intended to satisfy the requirements of the FORTRAN programmer while still providing the assembly language programmer maximum freedom on the design of his tape format. MTF writes out a record to the tape each time the main program issues a .WRITE. The length of the record is always two times the word pair count in the header word pair. FlOPS records are always as long as the buffer size returned on a .INIT (up to 256 10 .INIT. MTF returns a standard buffer size of 377 , after a 8 The FORTRAN user may dynamically change this size, however, words). via the following instructions. (FORTRAN STATEMENTS) (MACRO STATEMENTS) SETMTB CALL SETMTB (ISIZE) BUFSIZ START 6.2. 2 .TITLE SETMTB .GLOBL .DA, MTBSIZ, SETMTB $I .DA JMS* START JMP $I BUFSIZ LAC* (any buffer size) MTBSIZ DAC* SETMTB JMP* .END Directoried Data Recording (MTA., MTC.) The programmer can make the fullest possible use of those features peculiar to magnetic tape by using MTF. On the other hand, MTF does not offer the powerful file-manipulation facilities available in the system. Directoried I/O allows device independence, and extensive use of the storage medium with a minimum of effort. 6-5 Every block recorded by MTA. (with the exception of end-of-file markers, which are hardware-recorded) includes a two-word Block Control Pair and not more than 255 words of data. 10 records from one or more .WRITE's. The data will contain the The Block Control Pair serves three functions: acter of the it specifies the char- block (label, data, etc.), provides a word count for the block, and gives an IS-bit block checksum. The Block Control Pair has the following format: Word 1: Bits 0 through 5: Block Identifier (BI). This 6-bit byte specifies the block type. Values of BI may range from 0 to 77 R• Current legal values of BI, for all user files, are as follows: BI Value Block Type SEecified 00 User-File Header Label 10 User-File Trailer Label 20 User-File Data Block Bits 6 through 17: Block Word Count (BWC). This 12-bit byte holds the 2's complement of the total number of words in the block (including the Block Control pair). Legal values of BWC range from -3 to -401 . S Word 2: Bits 0 through 16: Block Checksum. The Block Checksum is the full-word, unsigned, 2's complement sum of all the data words in the block and word 1 of the Block Control Pair. o 5 6 17 BCP WORD I N TOTAL WORDS IN BLOCK N- 2 DATA WORDS Figure 6-3 Block Format, File-Structured Mode 6-6 One of the main file functions of MTA. and MTC. is that of identifying and locating referenced files. This is carried out by two means: first, names of files recorded are stored in a file directory at the beginning of the tape; and second, file names are contained in the file's header and trailer labels. 6.2.2.1 Magnetic Tape File Directory The directory, a single-block file (and the only unlabeled file on any file-structured tape), consists of the first recorded data block on the tape. It is a 257 a. 10 word block with the following characteristics: Block Control Pair (words I and 2) Word 1 Block Identifier 74 8 = File Directory Data Block Block Word Count -401 8 = 7377 • 8 Word 2: Block Checksum: As described above. b. Active File Count (Word 3, Bits 9 through 17) 9-bit one's complement count of the active file names present in the File Name Entry Section {described below} • c. Total File Count (Word 3, Bits 0 through 8) 9-bit one's complement count of all files recorded on the tape, including both active and inactive files, but not the file directory block. d. File Accessibility Map (Words 4 through 17): The File Accessibility Map is an array of 252~0 contiguous bits beginning at bit 0 of word 4 and end~ng as bit 17 of word 17. Each of the bits in the Accessibility Map refers to a single file recorded on tape. The bits are assigned relative to the zeroth file recorded; that is, bit 0 of word 4 refers to the first file recorded; bit 1, word 4, to the second file recorded; bit 0, word 6, to the 37 10 th file recorded; and so on, for a possible total of 252 10 files physically present. A file is only accessible for reading if its bit in the Accessibility Map is set to one. A file is made inaccessible for reading (corresponding bit = 0) by a .DLETE of the file, by a .CLOSE (output) of another file of the same name, or by a . CLEAR. A file is made accessible for reading (corresponding bit = 1) by a .CLOSE (output) of that file. Operations other than those specified above have no effect on the File Accessibility Map. 6-7 BIT POSITION a ·3 6 9 12 15 17 BEGINNING OF' TAPE Bep { FILE COUNTS T :::: : WORD 3 FILE DIRECTORY WORD 4 FILE ACCESSIBILITY MAP FILE # 1 (INACTIVE) WORD 16 WORD 17 WORD FI LE #2 (ACTIVE) 18 WORD 21 FIL E NAME ENTRY, SECTION FILE #3 (INACTIVE) WORD 24 FILE #4 (ACTIVE) FI LE #5 (ACTIVE) WORD 257 END OF TAPE 09-0232 Figure 6-4a. Format of the File Directory Data Block, showing relationship of active and inactive files to file name entries and to Accessibility Map Figure 6-4b. Format of filestructured tape, showing directory block and data files. 6-8 e. File Name Entry Section (Words 18 through 257): The File Name Entry Section, beginning at word 18 of the directory block, includes successive 3-word file name entries for a possible maximum of 80 entries. Each accessible file on the tape has an entry in this section. Entries consist of the current name and extension of the referenced file in .SIXBT (left-adjusted and, if necessary, zero-filled) . The position of a file name entry relative to the beginning of the section reflects the position of its accessibility bit in the map. That bit, in turn, defines the position of the referenced file on tape with respect to other (active or inactive) files physically present. Only active file names appear in the entry section, and accessibility bits for all inactive files on the tape are always set to zero; accessibility bits for all active files are set to one. To locate a file on the tape having a name that occupies the second entry group in the File Name Entry Section, the handler must (a) scan the Accessibility Map for the second appearance of a I-bit, then (b) determine that bit's location relative to the start of the map. That location specifies the position of the referenced file relative to the beginning of the tape. The interaction of the File Name Entry Section and the Accessibility Map are shown in Figure 6-4. 6.2.2.2 User-File Labels Associated with each file on tape is one label, the header label. precedes the first data block of the file. in length. Each label is 27 Label format is shown in Figure 6-5. o 5 6 WORD I 00 I "'7"'745 BCP WORD 2 CHECKSUM WORD 3 777 XXX WORD 4 000000 FILE NAME WORD 5 - - t= - :J] WORD 2 6 , a C = t - - - -_ _ _ WORD 27 , 0 Figure 6-5 User-File Header Label 6-9 For~at RESERVED 10 It words 6.2.2.3 File-Names in Labels The handler will supply the contents of the file-name fields in labels. (Word 3) These are used only for control purposes during the execu- tion of .SEEK's. The name consists simply of the two's complement of the position of the recorded file's bit in the Accessibility Map; the "name" of the first file on tape is 777777, that of the third file is 777775, and so on. A unique name is thus provided for each file physi- cally present on the tape. Since there may be a maximum of 252 10 present, legal file-name values lie in the range 777777 to 777404. 6.2.3 files Continuous Operation Under certain circumstances, it is possible to perform successive I/O transfers without incurring the shut-down delay that normally takes place bet. . 'een blocks. The handler stacks transfer requests, and thus ensures continued tape motion, under the following conditions: a. The I/O request must be received by the CAL handler before a previously-initiated I/O transfer has been completed. b. The unit number must be identical to that of the previously initiated I/O transfer. c. The I/O request must be one of those listed below to ensure successful comoletion. The handler in processing requests in conti~uous mode depends on receiving control at the CAL level in order to respond to I/O errors. The functions for which continuous operation lS attempted include only the following: 1. 2. . Jv1TAPE . READ 3• . WRITE 4. .TRAN d. With ~TA, more than one logical record may be in a physical block, so tape motion may stop if fewer successive .READ's or .WRITE's are issued than there are records in a block. e. The previously-requested transfer must be completed without error. In general, successive error-free READ's (WRITE's) to the same transport will achieve non-stop operation. The following examples illustrate this principle. Example 1: SLOT = 1 INPUT = 0 BLOKNO = 0 READl READ2 RETURN Successful Continued Operation .TRAN SLOT, INPUT, BLOCKNO, BUFF1, 257 .TRAN SLOT, INPUT, BLOCKNO, BUFF2, 257 JMP READl 6-10 The program segment in Example 1 will most probably keep the referenced transport (.DAT slot 1) up to speed. The probability decreases as more time elapses between READl and READ2, and between READ2 and RETURN. Each .TRAN request causes an implicit .WAIT until its opera- tion is completed. Example 2: Unsuccessful Continued Operation SLOT = 1 INPUT = 0 BLOKNO = 0 READ STOP RETURN The program .TRAN SLOT, INPUT, BLOKNO, BUFF, 257 .WAIT SLOT JMP READ segment in Example 2 will not keep the tape moving because the .WAIT at location STOP prevents control from returnina to location READ until the transfer first initiated at READ has bee~ completed. Example 3: SLOTl SLOT2 INPUT BLOKNO READI READ2 RETURN Unsuccessful Continued Operation I 2 o = 0 .TRAN SLOTI, INPUT, BLOKNO, BUFFI, 257 .TRAN SLOT2, INPUT, BLOKNO, BUFF2, 257 JMP READI This program segment will not provide non-stop operation because of the differing unit 6.2.4 specificatio~ at READl and READ2. Storage Retrieval on File-Structured Magnetic Tape The use of a file accessibility ~ap as well as block identifiers in Magtape file directories makes it almost impossible to retrieve the area of a deleted file from a magnetic tape. deletion command (i.e., .DLETE) removes the name of the object file from the file directory, and clears Accessibility The execution of the tli'2 corresponding bi t in tl"'.e File ~ap. The only circumstance under which a file area may be easily retrieved is when the deleted file is also the last file physically on the tape. Under these conditions, the handler can retrieve the area occupied by the deleted file when the next .ENTER executed. .WRI~E - .CLOSE sequence is Users may also copy the active files to another device, re- new the directory, and recopy the files. 6-11 6.3 DISK FILE STRUCTURE 6.3.1 Introduction The DOS-IS disk file structure is in some ways analogous to DECtape file structure. Ordinarily, each disk user has a directory which points to named files, just as each DECtape has a directory. The DEC- tape has only one directory, but the disk has as many directories as users have cared to establish. A single user's disk directory might correspond to a single DECtape directory. A single disk file's size is also limited only by the available space, as is true with DECtape. Whereas DECtape directories may only reference a maximum of 56 files, 10 however, the number of files associated with anyone directory on the disk is limited only by the available disk space. The DECtape directory is in a known location -- at block 100. Since the disk may have a variable number ,of directories, the Monitor must know how to find each user's directory. It therefore maintains a Haster File Directory (MFD) at a known location l , and the Master File Directory points to each User File Directory (UFD). DOS-IS allows only those users who know the Master Identification Code to have access to any protected UFD's within the MFD. the I-'fFD. 6.3.2 Figure 6-6 illustrates Appendix B is a flowchart of the Disk "A" Handlers. User Identification Codes (UIC) The Monitor finds User File Directories by seeking associated User Identification Codes Directory. (UIC's), which are all listed in the Master File The UIC is a three-character code that is necessary for all non-.TRAN I/O to the disk. ences. .TRAN macros use no directory refer- A programmer may operate under as many UIC's as he wishes, vided all are unique and none is reserved 2 . pro- He may establish a new User File Directory by (1) logging in his new UIC to the Monitor via the LOGIN command, calling PIP, and (3) issuing an N DK command. This establishes a new User File Directory, or refreshes (wipes clean) (2) an old directory under that UIC. (.ENTER will also create a new MFD entry and/or a UFD, if none exists.) Figure 6-7, User File Directory, illustrates the organization of a UFD. 10n the RF disk, the first block of the MFD is located at block 1777. On the RP disk, the first block of the MFD is located at block 47~4~. 2The following are reserved UIC's: CTP. @@@, ???, PAG, BNK, SYS, lOS, 6-12 Description Contents Word # % 777777 Dummy UIC used by system. I nnnnnn Bad Allocation Table's first block number, or 777777, if there is none. \ 2 nnnnnn SYSBLK's first block number, or -1, if there is none. 3 4 - 2 + b I kn lL'1l · ·· 4N ·· MFD entry size in bits ~-2, plus the block number of the first submap ··.SIXBT 4N+I nnnnnn 4N+2 P.0+ M 4N+3 spare 376 nnnnnn 377 nnnnnn 0 ·· UIC for this UED Block number for the first block of this UFD or 777777, if no UFD exists (as after PIP's NL...IDK)} Protection code in bit .0, plus the UFD entry size for each file Unused at this writing I Pointer to previous MFD block, or 777777 if none. Pointer to next MFD block, or 777777 if none. Figure 6-6 Master File Directory Word # Contents Description · ·· 8N · ··.SIXBT 8N+l 8N+2 8N+3 · SIXBT .SIXBT T.04-blknum 8N+4 8N+5 nnnnnn ribptr 8N+6 P~_l+ribwrd 8N+7 crdate Name of this file and its extension Truncation code in bit .0, plus the number of tre first. block of the file Number of blocks in this file Pointer to the first block of the Retrieval Information Block Protection code in bits .0-1, plus the first word in ribptr used by the RIB-- if the last block of the file has room for the RIB, the handlers will put it there, and load word 8N+6 accordingly. ~ate of file's creation -mmddyy (yy modulo 7.0) 376 377 nnnnnn nnnnnn Pointer to previous block, or 777777 if none Pointer to next UFD block, or 777777 if none .. Figure 6-7 User File Directory 6-13 6.3.3 Organization of Specific Files on Disk The Disk Handlers write out files in almost the same way that a DECtape handler does. backward link. Disk file blocks, however, have a forward and (Non-dump records are therefore limited to lengths of 254 words.) Further, upon receipt of a .CLOSE I/O macro, the disk 10 handlers fill out a Retrieval Information Block (RIB). The RIB performs the same functions as the file bitmap on DECtape, and also associates the logical sequence of blocks in the file with the physical locations of the blocks on the disk. The disk handler uses the RIB to implement .RTRAN commands and to delete files. Figure 6-8, The Retrieval Information Block, illustrates a RIB. After a user has created a disk file he can access logical records sequentially via .READ commands, just as with DECtape files. He can also access physical blocks of that file by referencing relative block numbers in the .RTRAN command. (The .RTRAN commands require the file be opened with the .RAND command.) 6.3.4 Buffers The handlers break buffers from the pool into three parts: Information (about 4~8 words)~ pre-allocated blocks (3) data buffer (1) File (2) the Block List -- addresses of (between 4 and 253l~ addresses, inclusive), and (2561~ words) . Figure 6-9, Disk Buffer, illustrates the breakdown of disk buffers. 6.3.4.1 Commands That Obtain And/or Return Buffers The following commands obtain buffers from the pool, and return them immediately after execution: .DLETE .RENAM . CLEAR The following commands obtain a buffer from the pool and do not return it until a subsequent .CLOSE is performed: • FSTAT .ENTER .SEEK • RAND *This number is determined by assembly parameters. 6-14 Contents Description ~* nnnnnn Total number of blocks described by this physical block. 1 2 nnnnnn nnnnnn nnnnnn First data block pointer. Second data block pointer. Third data block pointer. Word # 3 376 · · ·nnnnnn 377 nnnnnn . Pointer to previous RIB block or -1 if no previous RIB block. Pointer to next RIB block or -1 if no next RIB block. th t h . * Zero word of the RIB may not be zero word of physlcal block. This occurs whenever the entire RIB will fit in the last data block of the file. Figure 6-8 Retrieval Information Block ~ 4° 8 Words* } File Information becomes 'Current Set' when file active (see 6.3.4.2). ~ More than 3 and less than 377 8 words Addresses of Preallocated Blocks (Block List or Temp List or TLIST) • Data Buffer 4008 Words *This is not a fixed number. different for RP and RF. It is Figure 6-9 Disk Buffer 6-15 The following commands return a buffer to the pool, if any was allocated. .INIT .CLOSE .MTAPE (rewind) 6.3.4.2 The Current Set The handlers retain information about the last file and .OAT slot processed in an internal storage area. This area is called the "Current Set", and is swapped back to the file's buffer whenever a command to a different file is used. Thus, .WRITE to .OAT slot A .WRITE to .OAT slot B will swap the Current Set, but ••• • WRITE to .OAT slot A .TRAN to .OAT slot A .WRITE to .OAT slot A will not swap the Current Set. 6.3.5 Pre-allocation The handlers pre-allocate blocks on the disk upon all .ENTER commands, I and whenever sufficient .WRITE commands have been issued to use up the pre-allocated blocks. The number of pre-allocated blocks will be the minimum of the number of free blocks on the device and the number of address slots available in the Temp List (block list). When the handlers pre-allocate blocks, they fill out the bit maps, and immediately fill out the RIB and write i t out in one of the pre-allocated blocks. Upon a .CLOSE command, the handlers give back unused blocks, and reI write the RIB. 6-16 The number of blocks in the Block List depends on the size of the buffer, which is determined at system generation by setting the buffer size. The larger the Block List, the faster will be output. Smaller Block Lists may give more efficient allocation of core and disk space. Smaller buffers save core. Further, the number of pre-allocated blocks may affect concurrently opened files on a disk that is tight for space. Thus, if the Block List is sixty entries long, and there are forty blocks left on the disk, a .ENTER to .OAT slot will pre-allocate all forty, leaving none for any subsequent .ENTER's to different .OAT slots. lOPS 70 will occur when there are less than four free blocks on the disk when a handler tries to pre-allocate blocks. 6.3.6 Storage Allocation Tables (SAT's) The disk handlers use a Storage Allocation Table, in order to distinguish between allocated and free blocks. If more than one physical block is required, the individual blocks are called Submaps. Unlike OECtape, the Storage Allocation Table is never held in core. When the handlers wish to preallocate some blocks, they read in the required Submap, and write out the updated one. Storage Allocation blocks use the following format: WORD ~ WORD I WORD 2 WORD 3 WORD 376 WORD 377 Total blocks on the disk Number of blocks described by this Submap Number of blocks occupied in this Submap First word of the bit map (eighteen blocks per word) Pointer to previous Submap (or 777777) Pointer to next Submap (or 777777) The bit maps refer to blocks in numerical order. Thus, bit ~ of word three of a Submap will refer to block N, bit I will refer to block N+I, and so on. The block is free if the corresponding bit equals~. Start- ing and ending block numbers for all Submaps are retained in the handlers. The first Submap, however, starts with block zero. 6-17 6.3.7 Bad Allocation Tables (BAT's) Occasionally, a particular block on the disk will not record data correctly. In such instances, the handlers should be prevented from using the bad blocks. Accordingly, PIP maintains a Bad Allocation Table. Whenever a user updates that table, PIP will set the appropriate bit in the Storage Allocation Table. The block is thus made unavailable. Refer to PIP manual (DEC-lS-VWZB-DN13) for more information. 6-18 CHAPTER 7 WRITING NEW I/O DEVICE HANDLERS This chapter contains information essential for writing new I/O device handlers to work in DOS. 7.1 I/O DEVICE HANDLERS, AN INTRODUCTION All communications between user programs and I/O device handlers are made via CAL instructions followed by an argument list. Handler in the Monitor The CAL (Figure 2-1) performs preliminary setups, checks the CAL calling sequence, and transfers control via a JMP* instruction to the entry point of the device handler. When the con- trol transfer occurs (see Figures 7-1 and 7-2), the AC contains the address of the CAL in bits 3 through 17 and bits 0, 1, and 2 indicate the status of the Link, Bank/Page mode, and Memory Protect, respectively, at the time of the CAL. Note that the content of the AC at the time of the CAL is not preserved when control is returned to the user. On machines that have an API, the execution of a CAL instruction automatically raises the priority to the highest software level (level 4). Control passes to the handler while it is still at level 4, allowing the handler to complete its non-reentrant procedures before debreaking (DBK) from level 4. This permits the handler to receive reentrant calls from software levels higher than the priority of the program that contained this call. Device handlers which do not contain re- entrant procedures (including all handlers supplied with DOS) may avoid system failure caused by inadvertent reentries by remaining at level 4 until control is returned to the user. If the non-reentrant method is used, the debreak and restore (DBR) instruction should be executed just prior to the JMP* which returns control to the user, allowing debreak from level 4 and restoring the conditions of the Link, Bank/Page mode, and Memory Protect. Any lOT's issued at the CAL level ·(level 4 if API present, mainstream if no API) should be executed immediately before the DBR JMP* 7-1 USER PROGRAM { LOC+.0 LOC+I CAL ARG. CODE LOC+N NXT INST . . MONITOR DEVICE HANDLER IOPS6 Initialize Handler and return buffer size Ignored N Issue .SETUP for each PI skip or API entry vector RETURN to user at LOC+N CAL Entry to Device Handler Figure 7-1 7-2 PI ENTRY 1. 2. 3. API ENTRY via JMS f6 Skip Chain JMP* {INT 1. 2. Save AC Save location f6 (including P.C. LINK and Memory Protect) Turn I/O ON 3. via JMS* API Device Address (Le., JMS* (INT) Save AC Retain at INT the P. C., LINK and Memory Protect If first time through, Nap all PI commands y Test for other errors~ indicate error in header pair Reset {e.q., clear I/O Busy Switch Restore PI if PI interrupt and Debreak and Restore Return via stored P. C. PI and API Entries to Device Handlers Figure 7-2 7-3 exit sequence in oreer to ensure tEat the exit takes place-before the interrupt from the issued lOT occurs. The CAL instruction must not be used at any level (API or PIC) that might interrupt a CAL. A CAL at such a level will destroy the content of location 00020 for the previous CAL. Care must also be taken when executing CALs at level 4. For example, a routine that is CALed from level 4 must know that if a debreak (DBR or DBK) is issued, control will return to the calling program (which had been at level 4) at a level lower than level 4. 7.1.1 Setting Up the Skip Chain and API (Hardware) Channel Registers When the Monitor is loaded, the Program Interrupt (PI) Skip chain and the Automatic Priority Interrupt (API) channels are set up to handle the TTY keyboard and printer and clock interrupts only. The Skip Chain contains the other skip lOT instructions, but indirect jumps to an error routine result if a skip occurs, as follows: SKPDrA SKP JMP* INTI SKP LPT SKP JMP* INT2 SKPTTI SKP JMP TELINT /Skip if DECtape flag. /INTI contains error address. /Skip if line printer flag. /INT2 contains error address. /Skip if teleprinter flag. /TO teleprinter interrupt handler All unused API channels, memory protect, memory parity, and powerfail, also contain JMPrs to the error address. When a device handler is called for the first time in a core load, it must call a Monitor routine (.SETUP) to set up its skip(s) in the Skip Chain, or its API channel, prior to performing any I/O functions. 7-4 The calling sequence is as follows: CAL N /N 16 SKP lOT DEVINT (normal return) 7.1.2 API channel register 40 through 77 (see User's Handbook Vol. 1, for standard channel assignments) , /0 if device not connected to API. /.SETUP function code. /Skip lOT for this device. /Address of interrupt handler. Handling the Interrupt DE'TINT exists in the device handler in the following format to allow for either API or PI interrupts. ONLYI LAC DAC DAC DAC JMP DAC LAC* DAC (NOP DEVION DEVIOF IGNRPI COMMON DEVAC IGNRPI JMP JMP DAC LAC DAC JMP COMMON DEVPIC DEVAC DEVINT DEVOUT ONLYI COMMON DEVION DEVCF ION DEVIOF IOF DEVPIC DEVINT /LEAVE PI ALONE, WHEN API IS RUNNING /THESE REGISTERS /ARE AVAILABLE /THIS IS ONCE ONLY CODE /SAVE AC (fJ DEVOUT /SAVE PC, LINK, ADDRESSING MODE AND /MEMORY PROTECT /PI ENTRY /API ENTRY; SAVE AC /SAVE PC, LINK, ADDRESSING MODE AND /API IS OPERATING, SO LEAVE PI ALONE. /PI INTERRUPTS ARE NOT POSSIBLE, BE/CAUSE .SETUP EFFECTIVELY NOP'S PI /SKIPS. /CLEAR DEVICE DONE FLAG. IPI ALLOWS INTERRUPTS; API DOES A NOP. /API DOES NOP; PI TURNS 10 OFF TO ENSURE /NON-REENTRANCE AFTER ISSUING lOT'S. DEVIOT /DISMISS ROUTINE DVSWCH LAC ION DBR JMP* DEVAC DEVOUT /RESTORE AC. /ION OR NOP. /DEBREAK AND RESTORE CONDITIONS /OP LINK, ADDRESSING MODE AND MEMORY /PROTECT. If the Index, Autoincrement, or EAE registers are used by the I/O device handler, it is necessary to save and restore them. 7-5 .SETUP allows either API or PI, but not both for a single device. The System Generator Manual gives the method for incorporating nE~W handlers and associated Skip Chain entries into the Monitor. 7.2 API SOFTWARE LEVEL HANDLERS, An Introduction The information presented in the following paragraphs assumes that the reader is familiar with the system input/output considerations described in the PDP-IS User's Handbook Vol. 1. 7.2.1 Setting Up API Software Level Channel Registers When th.3 Monitor is loaded, the API software-level channel registers (40 through 43) are initialized to JMS* JMS* JMS* JMS* .SCOM+12 .SCOM+13 .SCOM+14 .SCOM+1S /LEVEL 4 /LEVEL 5 /LEVEL 6 /LEVEL 7 where .SCOM is equal to absolute location 000100 and .SCOM+12 through .SCOM+15 (000112 through 000115) each contains the address of an error routine. Therefore, prior to requesting any interrupt at these software priority levels, the user must modify the contents of the .SCOM registers so that they point to the entry point of the user's software level handlers. Example: .SCOM=lOO LAC DAC* (LV5INT (. SCOM+ 13 / set level 5 entry. LVSINT exists in the user's area in the following format: LV5INT 0 /PC,LINK,BANK/PAGE MODE,MEM.PROT. DAC SAV4AC /SAVE AC /SAVE INDEX, AUTO INCREMENT AND EAE REGISTERS, IF LEVEL 5 /ROUTINES USE THEM AND LOWER LEVEL ROUTINES ALSO USE THEM. /SAVE MQ AND STEP COUNTER, IF SYSTEM HAS EAE AND IT IS USED /AT DIFFERENT LEVELS. /RESTORE SAVED REGISTERS. DBR /DEBREAK FROM LEVEL 5 AND RESTORE JMP* LVSINT /L, BANK/PAGE MODE, MEM. PROT. 7-6 7.2.2 Queueing High priority/high data rate/short access routines cannot perform complex calculations based on unusual conditions without holding off further data input. To perform the calculations, the high priority program segment must initiate a lower priority (interruptable) segment to perform the calculations. Since many data handl~ng routines would generally be requesting calculations, there will exist a queue of calculation jobs waiting to run at the software level. Each data handling routine must add its job request to the appropriate queue (taking care to raise the API priority level as high as the highest level that manipulates the queue before adding the request) and issue an interrupt request (ISA) at the corresponding software priority level. The general flow chart, Figure 7-4, depicts the structure of a software handler involved with queued requests. Care must be taken about which routines are called when a software level request is honored; that is, if a called routine is "open" (started but not completed) at a lower level, it must be reentrant, or errors will results. NOTE The DOS hardware I/O device handlers do not reentrant procedures and must not be reentered from higher levels. ~ontain Resident handlers for Power Fail, Memory Parity, nonexistent memory violation, and Memory Protect violation have been incorporated into the system and effect an lOPS error message if the condition is detected. The user can, via a .SETUP, tie his own handler to these skip lOT or API channel registers. 7-7 LV5INT SAVE PC, LINK, AC, AUTO-INDEX REGS, MQ, STEP COUNTER AND CONDITIONS OF EXTENDED MODE AND MEMORY PROTECT >-'1--~---1 RESTORE SAVED REGISTERS RAISE TO HIGHEST LEVEL THAT MANIPULATES LEVEL 5 QUEUE 15-0094 Figure 7-4 Structure of API Software Level Handler 7-8 7.3 WRITING SPECIAL I/O DEVICE HANDLERS This section contains information prepared specifically to aid those users who plan to write their own special I/O device handlers for DOS. DOS is designed to enable users to incorporate their own device handlers. Precautions should be taken when writing the handler however, to ensure compatibility with the Monitor. Here is a summary of handler operation. The handler is entered via a JMP* from the Monitor as a result of a CAL instruction. The contents of the AC contain the address of the CAL in bits 3 through 17. Bit 0 contains the Link, bit 1 contains the Bank/Page Mode status, and bit 2 contains the Memory Protect status. The previous contents of the AC and Link are lost. In order to show the steps required in writing an I/O device handler, a complete handler (Example B) was developed with the aid of a skeleton handler (Example A). In addition, Appendices A and B are complete flowcharts of the DTA and DKA handlers. The skeleton handler is a non-reentrant type (discussed briefly at the beginning of this chapter) and uses the Debreak and Restore Instruction (DBR) to leave the handler at software priority level 4 or at a hardware level for interrupt servicing (if API), and restore the status of the Link, Example A is referenced by part Bank/page Mode, and Memory Protect. numbers to illustrate the development of Example B, a finished Analogto-Digital Converter (ADC) I/O Handler. Example B was written for the Type AF~lB The ADC handler shown in Analog to Digital Converter. This handler is used to read data from the ADC and store it in the user's I/O buffer. The reader, while looking at the skeleton of a specialized handler as shown in Example A, should make the following decisions about his own handler. (The decisions made in this case are in reference to developing the ADC handler): a. Services that are required of the handler (flags, rece~v~ng or s~nd~ng of data, etc.) - By looking at the ADC lOT's shown in the Reference Manual, it can be seen that there are three lOT instructions to be implemented. These instructions are: Skip if Converter Flag Set, Select and Convert, and Read Converter Buffer. 7-9 The only service the ADC handler performs is that of receiving data and storing it in user specified areas. This handler will have a standard 256-word buffer. b. Data Modes used (for example, lOPS ASCII, etc.) Since there is only one format of input from the Type AFOIB ADC, mode specification is unnecessary in Example C. c. Which I/O macros are needed for the handler's specific use; that is, .INIT, .CLOSE, .READ, etc. For an ADC, the user would be concerned with four of the macros. d. (1) .INIT would be used to set up the associated API channel register or the interrupt skip lOT sequence in the Program Interrupt Skip Chain. This is done by a CAL (N) as shown in Part III of Example A, where (N) is the channel address. (2) .READ is used to transfer data from the ADC. When the .READ macro is issued, the ADC handler will initiate reading of the specified number of data words and then return control to the user. The analog input data received is in its raw form. It is up to the programmer to convert the data to a usable format. (3) .WAIT detects the availability of the user's buffer area and ensures that the I/O transfer is completed. It would be used to ensure a complete transfer before processing the requested data. (4) .WAITR detects the availability of the user's buffer area as in (3) above. If the buffer is not available, control is returned to a user specified address, which allows other processing to continue. Implementation of the API or PIC interrupt serViCE! routine Example A shows an API or PIC interrupt service routine that handles interrupts, processes the data and initiates new data requests to fully satisfy the .READ macro request. Note that the routin~s in Example A will operate with or without API. Example B uses the routi.nes exactly as they are shown in Example A. During the actual writing of Example B, considerat:ion was given to the implementation of the I/O macros in t:he new handler in one of the following ways: (1) Execute the function in a manner appropriate to the given device as discussed in(c). .INIT, • READ, .WAIT, and .WAITR were implemented into the ADC handler (Example B) under the subroutine names ADINIT, ADREAD,· ADWAIT (.WAIT and .WAITR). Wait for completion of previous I/O. (Example B shows the setting of the ADUND switch in the ADREAD subroutine to indicate I/O underway.) 7-10 (2) Ignore the function if meaningless to the device. See Example B (.FSTAT results in JMP ADIGN2) in the dispatch table DSPCH. For ignored macros, the return address must be incremented in some cases, depending upon the number of arguments following the CAL (see Chapter 3). (3) Issue an error message in the case wher~ it is not possible to perform the I/O function - (An example would be trying to execute a .ENTER on the paper tape reader.) In Example B, the handler jumps to DVERR6 which returns to the Monitor with a standard error code in the AC. After the handler has been written and assembled, the Monitor must then be modified to recognize the new handler. This is accomplished by the use of the System Generator Program (DOSGEN)described in the DECl5-YWZB-DN12 manual. W~en the system generation is complete, the PIP program (refer to DEC-15-YWZA-DN13) must be used to add the new handler to the lOS UFD. At this time, the user is ready to use his specialized device handler in the DOS-IS system. 7.3.1 Discussion of Example A by Parts Part 1 Stores CAL pointer and argument pointer, and picks up function code from argument string. Part 2 By getting proper function code in Part 1 and adding a JMP DSPCH, the CAL function is dispatched to the proper routine. Part 3 This is the .SETUP CAL used to set up the PI skip chain or the API channel register. Part 4 Shows the API and PI handlers. these be used as shown. Part 5 This area reserved for processing interrupt and performing any additional I/O. Part 6 Interrupt dismiss routine. Part 7 Increments argument pointer in bypassing arguments of ignored macro CAL's. 7-11 It is suggested 7.3.2 Example A, Skeleton I/O Device Handler ICAL ENTRY RnUTINE .'CLOBL DEV. .MfO-3 DEV. OAC OVCALP DV4RGP OAe iS~ OVARGP OV1RGP L.Ae* (1'1711 AND DVARGP is! ,.AO (JMP 05PCH IjSI'C~ IMUST BE or rORM A.A, I,MEO (MONITOR ERROR OIAGNOSTIC) ISAVE eAL POINTER IANO ARGUMENT POfNTER IPOINTS TO rUNCTtON CODE IGET CODE IRE MOVE U~IT NO APPLICABLE IPOINTS TO C'~.2 t' Ole OSIDCH IOISPATCH WIT'"' IMODIF'IEO JUMP JM'JMP JMP JMP JMP OVINIT OVF'SAT DV5EEK DV[NTR OVCLER DVCLOS DVM TAP DVREAO 11 •• !NIT xX JMFI JMII JMIt JMIt JMP JM~ 12 • IF'STAT, .OL.[T[, fRENAM 13 • • SEEK I' = ,ENTER ,CLEAR II. :I 16 • ,CL.OSE 17 :; .MTAP[ 11~ • • REAO 111 = ,wRITE 112 :I ,WAIT 113 • ,TRAN DVI.IRTE OVWAIT OV'RAN IILLEGAL 'UNCTIONS IN ABovE ,.APLE COOED AS. I JMP IrUNCT!ON ~V£RR6 ~onE LA~ JMFJ* OV£RR6 ERROR IERROR CODE 6 6 ITO MON!TO~ (,MEO.1 IOATA MoaE ERROR nVERR1 LAW , Jf!H'* (,MED.! IERROR eOOE. 7 ITO ~ON!TOR IOEVICE NOT REAOY DVERR4 LAC (RETURN ( I IRETURN (AODRESS IN ~ANO~ER) ITO RETURN To ~~£N NOT READY ICONDITION HAS B[EN REMOVED MED IERROR CODE • ITO MONITOR (4 (.MEO"1 11/0 UNO£RWAY LOOP nVBUSV IBREAK ~ROM LEVEL 4 IJB~ JMp'. II-OOP o~ CAL. DVCAL.F" INORMAL RETURN rROM CA~ DVCI< IBREAK FROM LEVLr 4 IRE TURN APT;R CAL AND IARGUMENT STRING DBR JM"* DVARGF' IT~E OVINST ROUT)~[ MUST INCLUDE IA .SETUP CALLINr, SEQUENCE roR 7-12 IE'C~ rLAG I'NO/O~ PI CnNNECTEO TO API ACAT SGEN TIME). ITHE SETUP CALLING SEQUENCE IS. CAL DVINIT IN N = API C~ANNE~ REGISTER 1(4~ ~77), N m 0lr ~OT CONNECTE~ ITO API IIOPS rUNCTION CODE ISKIP lOT TO TEST THE FLAG IADD~ESS 0' INTERRUPT I~AND~rR (PI O~ A~I) 16 SI<PloT 08 V I r-I T IT~lS SPACE MAY BE USED roR 1/0 SUBROUTINES IINTERRUpT HANOLER rOR API OR "'1 LAC (NOP DAC DEvION OAC DEVIor DAC OVSWCH nN~Y1 DAe DVPIC ~vrNT I GNRP I JMP DAC COMMON DEVAC LAC. (3 nAC JMP DVOUT COMMON JMP nAe LAC OAe IGNRPI JMP COMMON IjEvION DEvcr ISAVE AC ISAVE'PC. ~lNK, ~ANK/PAGE MODE lAND MEMORY PROT[eT DEVPIC OEVAC DEVINT DEVOUT ONlYl IPl ENTRY IAPI ENTRY. SAVE AC ISAVEI PC, ~INK. BANK/PAGE HOOE l"1EMORY PROTECT IL,EAVE PI ,CONE IENABlE PI OR NOP IENAR~E PI OR NOP yON ITHIS AI THE AREA DEVOTED TO PROCESSING INTERRUpT AND IPERFORMtNG ANV ADDITIONAL 1/0 DES!RED, fJEVIOf IDISABLE DR NnP BErORE INTF-RRUPT IrROM T~IS lOT OCCURS rOF" DEVIoT ~l IOIMISS~L IINTERRUpT ~ANOLrR DISMISS RoUTE LAC OEVAC IRESTORE AC DVSWCIoI t O~I ItON OP NOP InE8REAK AND RESTORE DBR I~!~K. BANK/PAGE MODE, MEMORY JMI'. OEVOUT IPROTECT ~VOJSM IIr TH[ HANDLER USES THE AUTaINCREMENT • INDEX lOR EAE THEIR CONTENTS BE SAVED AND RESTORED, FUNCTIONS IPOSSIBLV IGNORED SHOULD CONTAIN IPROPER tNOEXING TO BYPASS ICAl ARGu~ENT STRING REGl~T[RS. ISIolOU~O I ICODE '0 BYPASS IG~ORED FUNCTIONS I !)VIGN2 rS2 JMP OVARGP DVCK 7-13 7.3.3 Example B. Special Device Handler for AFOIB AID Converter PACE 1 ~"'1 R 1 IAOC 2 I 701301 A 701304 A :3 4 HANO~E~ ADSF'-?013f2l1 AOSC:a7013f2l4 5 701.312 A 6 7 ~DRB-101312 I 8 4400210 A ~HHH!'03 A 9 121 '1 ....J I t-' ~ 12 13 14 15 16 17 18 - 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 ISKIP IF CONVERSJO~ FLAG IS SET ISELECT AND CONvrHT CAOC ~L4G IS CLEARED ,. ND A CON VER S I 0 ~1 I 5 Hoil TI • LIS ED) IREAD CONV£RTE~ RUfF"ER INTO AC ANO CLEAR F'LAC IOX-tSl .MED=J ,GL.OBI. ADC, IHEO (MONITOR ERROR DIAGNOSTIC) I 01{1~0~ R 0401521 R 0421151 R (1 '" ~ 0 2 R 4 4 0151 R ~'0003 R 220151 R D0~el4 R 440151 R (:; e 0 0 5 .R .3 4 2115 4 R vi 0t"06 q 040001 R ~HH"el?-R 740040 A :110010 R 600021 R ~1~011 R 600074 R ;~L?l012 R 600074 R e,e~13 R 6('121023 R 1-'10014 R 6210023 R ~0015 ~ 600075 R 0e1C'116 ~ 600075 R r'~017 R 600051 R ~~002~ ~ 600023 R 0e10"1 '70021 AOC. ~ R 600rlJ44 OSPCH OAe DAe lOX LAC- AOCALP AOARGP ADARGP tOlC TAD OAC AOARGP XX JMP JMP JMP JMP JMP JMP JMP JMP JMP JMP JMP R 00"'22 R 600023 R AOARC;P IsAvr CAL POINTER lAND ARGUMENT POINTER IPOINTS TO 'UNCTION COOE lelT CODE IPOINTS TO CAL. 2 fJMP DSPCM OSPCIo! AOINIT AOIGN2 AOIGN2 ADERR6 AOERR6 AOlGN1 AOICN1 ADREAD AOER~6 AOWAIT AD£RR6 IOlsPATC~ IIIIITH IMOOIF"JED JU~p 11-,tNIT 12-.rSTAT,.DLETE"RE~AM 13-.SEEI( 14:,ENTER IS-,CLEAR 16-,Cl.OSF: 11-,MTAPE 11 lch .READ 111=.WRITE 11 2 =,W AIT 11 J :, TRAto.J I IILLEGAL I rUNCTIO~S JMP .EJECT IN ABOVE TAaLE COOED AS .OERR6 PAGE 37 I 47 48 49 5V" ~ U1 ?Ie'1 I 44 45 46 I R 35 36 38 39 40 41 42 43 -...J 2 51 52 53 54 55 IFUNCTtON COoE ERROR ;'~023 .~0~24 ~ 76kj0~6 A k 62k?1':>S R '0~2~ :~ ~ 2 6 R 76V"e:Z7 A "0027 ~ e R 620 1 ? 5 R IEr<QOR Ct'JDE 6 ~ t,MED.l ITO MONYTOR J"1P* IDATA HODE ERROR ADERR7 IERRnR cnDE 7 LAW 7 (,MEw.l ITO MONITOR J""P* ITHE ADINT RtUTl~E HUST INCLUDE A .SETUP If OR EACH fL~G ASSOCtAT[O ~IT~ T~E orVlcr AOINIl' i,'ete.30 R 2\?112l1?6 R ; l~ ~ 3 1 ~ 0 6 ell 5 1 R ("r?!C'!32 ~ 44~151 R ~~03J R 0~0057 A AOCMOO ~~20J4 '~0035 ~0?l36 R R ~ 00"'016 A 7~1301 A el210111 R ADCKS'~ ,~ 0 0 3 7 R 2 " ~ 0 41 0~04~ L.AC (256 1ST AND ARr, HU~· F ~ ~ 5 I t f-~ OA.C* ADARGP ADARGP IRLTlJRN t T TO USER R ~ 040033 R ~. 21 0 4 1 R 6 ~ ~ 12! 4 2 R CAL 16 AOUND ADWC AOWI'CT LAC DAC JMP I 5 1 : A P J cIi A 1\i ~.~ l L, I • SET uP I 0 P S r II 'H; T I ') \. (: 0 nF: .+2 lADe SKIP lOT IAPOR. i') F I ~JT [ R ~ U p T ISlT~UP ONCE O~LV IsKIP SET.UP CODE IF I.I~ITS AH[ DO~.E AOC~CD AOSTUP .1~H'!42 (~0"'4~ R 1400.S] R R 600015 R AOC ROUTINE CLEARS 1'0 ADS TOP OiM JMP UNorR~AV SwtTC~ AOUNfJ ADIG'.l IR[TURN I IT~E PRE v ,OUS TAc;5 Pl THE CAL ARE A Aq( USED J:OR ISTORAGE DURING THE' ACTUAL ,REAo F'UNCTID~' I IADCKSM 13 IS FrR STORI'~GT~E CHECKSUM IAOCBP IS THr CURRENT BurFER POI~TER I.OLRHP IS THE LINE RUFfER HfAD[Q POINTER IAOUND IS POR PEvlCE UNDERwAV SwrTCH IAOWC Is USEO AS T~E COUNTlR IAOWPC' IS USEO TO STORE CU~RENT WORD COUNT 74 I 70 '5 ~0R~ I I '1 72 (LJrCI~'AL) 57 ADsf 40 C l~! i ISTO~ 66 67 68 69 IIUX TO ptTURN Rurr SI7[ IDX AOCBP 61 65 A[)ARGP .nL,B~p 60 63 64 lOX .DEC ,OCT 57 62 lAltJ I 440151 R 56 58 59 ADERR6 .EJECT PAGE 16 '7 78 3 'H~1 R R 2~0el37 R ~ 7412~0 A :'-0046 R 60kl!075 R ~0044 00et45 19 80 61 rele47 R 703344 A [.,,/21050 R 620150 R 82 8J 84 8!5 86 87 --.J J AOREAO .OUND AOIGN1 ~OaP ADeAlP 0012155 R 220150 R LAC AOLJNf') SlAfCMA JMP ADBUSV DAC ADUND LAC* ADCAU' t70e0 AND SlA JMP AOERf17 ADARGP LAC· OAe AOCAP OAC ADI.BIo4P lOX ADARGP ;.DARr';P LAC· l~0e152 [-10056 R 500157 001'157 R 7402"0 ~e~60 R 6021025 ,)0"'61 R 220151 v.HH'l62 R "40035 ~'0C'163 R 040036 (7:0~64 R 440151 ~;'0065 R 220151 92 I-" 0"1 ~ 2~003' R R 740201 A ~0Q!53 R 600047 R 00054 R k'l40el37 R 00051 89 90 93 94 95 96 97 98 99 LAC SNA Jt.1P 11/0 UNOERWAY A081JSY OBR JfIo1P· I I !8 91 ADWAIT R A R R R R R R \?0et66 R 0~0040 R ~1006' R 140~41 R DAC DiM lOX O~M AOWC AowPCT IcHECK TO SEE lr 1/0 IS UNDERWAY Ilf NOT SET IT wITH .. 1 lIT WAS ~ET,GO BACK TO CAL IsE TIT ILOOK AT MODE IslTS 6~8 Or\lY 11 0 P S Bp.I ARy? INO. ERROR IGEr ~lNE BurrER HEADER POINTER ISTORE IT IA~SO 5TnRE IT rOR LATER 4EAOER IINcREMr\T ARG. POINTER IGET ~L.R.W.C(2'S CO~P) ISTORE IT IN WORD COUNTER IlERn WOPO COUNT REG. IlERO C~rCK5u~ REG. IGET PAST HEADER PAIR INOW POI~TING AT 8EGINNING or IBUrPER ISTA~T UP ~EVICE ~/0~70 R 14",e~~4 R 100 r~((I~71 R 440035 R 1~1 (~0"'72 R 1~3 1~4 o~073 ~~ 0 0 7 4 R 70131'4 105 ',HH"75 R703344 A 1~6 r10(~76 R 620151 R 18~EAK F~OM LEVEL 4 ADARr,P IR£TURN AFT[~ CAL JMP* IINTERRUPT HANDL[R FOR API OR PIr 1f(!9 (~0~77 R 20e160 R O\ll..Y1 110 111 .~0100 R 040117 R 1"'2 1"'7 108 112 113 114 115 116 117 118 ~ 440035 R lOX ADSC ;. 4 4 01 5 1 R ADCKSM ADC8p AOCBP AOIGN2 ADIGN1 IDx ADARGP lINeR. rnR ExIT D8R I c'0101 R [~ ~ 1 0 2 \.~ 01 0 :3 :~ ~a 2' 4 d~)105 R ~40142 R e4 et 1 4 5 R DAC DAe R 0 4 011 5 R ~ 6 C'J 011 6 R ':'0106 R 04~153 R 22~161 C"(('107 R ~40152 R R R LAC DAC QAC ADCPIC JMP DAC LAC· DAC .EJECT (NOP ADCION AOCO~.!T ADSWCH TG~~ RPI cOMMON A['lCAC r el ) ADCOIIT ISAVE .AC ISAVE PC,~INK,fx. ManE IMEM.PROT, PAGE 119 1221 1:57 1:58 :' 0 1 33 R 500 1 6 2 139 ,"~134 ~01.35 ~ 122 123 124 125 126 127 '128 129 130 I r--' ---l 0~1. R R R R R R R 1~0116 R 101312 A 00117 R 7et0042 A ~012~ R 060035 R 00121 R 44~035 R iJe122 R 440041 R V'~123 R 340034 R ~~ 012 4 R 0 4 ~ 0 3 4 R /0125 R 44eet40 R 00126 R 60el142 P \/1 ~H 2 7 '1 2 0 0 0 4 1 R (\~'1~h~ R 7402'30 A ?~131 R 1420,3121 A 00132 R 740020 A 1~1 ---l 4 131 132 133 134 1:55 136 140 141 142 143 144 145 146 147 148 3,49 150 0~110 ~ 600116 00111 ~ 6C'1eJ105 021112 ~ 04~153 021113 ~ 2~0111 02'114 R 040152 10115 R 6210077 R 0600.36 R R 440036 R :HH 36 R 3 4 ~ " 3 4 R ~~0137 R 060036 R ~014e R 140(('37 R R 6 e: 0 14 4 R ;1014:? R 7"HH'H~2 A ~. 01 4 1 /10143 R 7013e4 A JMP 4DCINT cor-HH1N JM~ ADCPIC DAC LAC ADCAC DAC IGNRPI COMMON JMP AORt3 ADCION ION ADCII\T ADcnUT rNLY1 IplC ENTPY IAPI ENTRY.SAVl he ISAVE Pc,~t~K.lx.~ODE IMl~l. pROT I REl\ D Co'.: VERTER PUf F'" ER lOX An~PCT IENARLE ~Ic rOR OT~E~ OEVICES 1ST ORE QATA t~ USER ~UfrER IIt'vC. BUfF'[R POPHfR lINe. !,.JapO PAIR COLJJTER TAD AOI:KSM I AUD CH ECKSU~1 r)AC 1S2 ADCKSM AOWC II~ !jAClOX JMI' LAC AOCBP ADCBP ADCO',j T ISTORE IT 110 COMPLETE INO KEEp Go P,lG AD\.roIPCT lyES, COMPUTE WORO C'JUNT PA! R ADeAC IRISTORE AC IMAy BE rDD S~~A ITO TOP ~ALF' ~AR IMAKE Wr'J. PRS. (377e00 18 8ITS ONLY ANO .DI.,8HP ISTORE I~ ~EAOER #1 OAC· 10)( ADLBHP lINe, To STORE CKSUt.1 TAO ADCKSM IADO WORn PAIR COUNT ISTORE I~ ~EAOER #2 DAC· AOL.8~P DiM ICLEAR OEVICF UNnERwAV ADUNO JMP ADOIC:;M l£xIT An Co 'J T lOP' IOlSA81..E PIC O~ ~~OP AOSC 18lrORE rNTERRupr fR~M THIS lOT OCCURS IINTERRUPT HANDLr R DISMISS RTE lAC I r0144 R 200153 R AODISM LA.C ,EJECT PAGE I I--' 00 p 01211 15j 0e'145 R 7~0~42 A 152 r"146 R 1213344 f~0141 R 620152 ;10150 R 000t'H?0 'lC'l151 R 0~00012' 00152 R "00000 00153 R 0~02100 1~3 -...,J 5 154 155 156 157 A R A A A A 158 ADSWCH ION lION OR D8R IOlBREAK A~O RESTORE ILINK,EX.MOO[,MEM,PROT lAUD CAL P~II\jTE~ lAUD ARGUMr~T PJINTER IPC,l.,rM,MP lAC SAVEr ~E~E JMP* AOCALP 0 AOARGP 0 AOCOUT ADCAC ~ 0 I 159 00e1'HH~ ~0154 A R 600007 R *L -~~-0-155 R0-0Ql-0~4 ~H3156 R 0004fllel .ENU J. *l A *L 00151 R e010e0 A *L 10160 R 140000 A *L ~0161 R 00000~ A *L 00162 R J77000 A *L SIlE:t001b3 NO tRROR LINES ADCOUT ~,OP PAGf ADARGP I I-' \.0 CROSS REF"ERENCE (;( :10151 13 96 14 104 15 16 106 155* fl?l* 149 157. 88 1eeJ 122 LH~ 46 ~0 101 127 128 131 141 AD8LJSY rH'l47 AOeAC ADCALP ~015:~ 115 86 121 G1015'1 12 81 A.Or.:SP \1?73~ AOCtNT ADCION AD Ct< S~I 93 :10 t 11 t;4* 55 ?l0e34 l1r 53 .. ADe~l(1[1 ~0Vl3~ S20 ADC(HH 0014;:> 123 12i1 153 156. ADCPIC 111 117 11S- 145. ,A2!15;" 0017.1'; :1 el ~ 0 (' 133 ADCOIIT r?1 4 4 8 ADl"JISM 144 AOER~6 00~23 2-3 12 G 14924 A[)rRr~7 41 II- A(11GNl AOIGN2 AOtNJT 0J"'2~ "1[i1(7,7~ ~~~~74 r"2'k~2? 20 46. ADLB~P 00i13A 55- 94f 7C"131? 6- ADe, .....J 6 AOR8 "!~117 120* 126* 99 57 28 30 38* 25 63 78 t05* 21 22 1~4 .. 140 142 16 84 87 143 97 98 132 129 134 119 125. 19. 16 46 51 95 27 ADSC 101,Hl4 4_ AD!'f 7~1 ..~01 3· 58 103 54 62- 112 151- AOREAD ADSTOP ADSWC~ 00~51 ,~004? r!~145 ~~031 ADUNrl AOWAJT 0,0044 ADWC AOItIPr.r COMMON ?l0116 DSPCI.4 TO)( 44000''1 114 17 9- IGNRPI 00115 128 113 C'lNl.Yl r,H"9I71 109 ... [l!000~3 19.1· ,MEO 5~* 62 ~004i~ 29 57. 76- 0iZ1041 58- 00007 18 14 129 12A .. 124 39 139 9-;. 95 100 lk'l 1~4 154. 91 26 125 84. ?1 146 140 42 CHAPTER 8 BOSS-IS BOSS enables DOS users with a card reader and a line printer to run jobs sequentially, with a minimum of operator intervention. BOSS sup- ports a subset of the DOS system programs, and adds a line editor, its own resident and nonresident routines (called Resident BOSS and Nonresident BOSS), and the Procedure Files. cedure Files. Paragraph 8.1 describes Pro- Figure 8-1 shows which monitor supports each system program. The DOS programs run by BOSS are identical to those run by DOS. Ex- ceptions are the Resident and Nonresident Monitors, which are explained later. BOSS expands the information on Control Cards into a series of commar.ds in the format expected by the DOS system programs. Nonresident BOSS does this command expansion, and stores the expanded commands in a disk file, the Run Time File (RTF). programs expect to communicate with a~ Since DOS operator at a teleprinter, BOSS feeds the expanded commands to the programs via .DAT slots assigned to TTA. i • In BOSS mode, therefore, BOSS attaches .DAT-2 to the Run Tlme File, and directs most teleprinter output to the Line Printer. Pro- grams can force I/O to the teleprinter by setting bit 4 in .SCOM+S2, and proceding with macros directed to TTA. Wher.ever bit ~ of .SCOM+S2 is set, the System Loader Interface attaches the Resident BOSS code to the Resident Monitor. The main purposes of Resident BOSS are to (1) ensure that BOSS will retain control of the teleprinter, (2) feed commands to programs via the Run Time File, (3) properly route internal Monitor commands, such as .EXIT, .GET and .PUT, and (4) direct teleprinter output to the Line Printer~ Figure 8-2 illustrates the connections between the DOS Resident Monitor and the BOSS Resident Monitor that accomplish these changes. Figure 8-3, the flowchart for Resident BOSS, further describes Resident BOSS. Resident BOSS communicates with Nonresident BOSS by TRANing informa- tion to and from the first block of Nonresident BOSS. Nonresident BOSS gains control on all error conditions, such as IOPS, operator abort, Time Estimate exceeded, and after a BOSS15 is a flowchart of Nonresident BOSS. 8-1 command. Figure 8-4 BOSS DOS DOSGEN FOCAL RESIDENT MONITOR NONRESIDENT MONITOR DDT EDIT SYSTEM LOADER NONRESIDENT BOSS RESIDENT BOSS LINKING LOADER co I BOOTSTRAP PIP CHAIN & EXECUTE FORTRAN TKB N PATCH B.PRE PROCEDURE FILES 8TRAN 89TRAN 15-0658 Figure 8-1, BOSS/DOS Intersection RESIDENT BOSS15 INTERFACE TO RESIDENT MONITOR AND USER PROGRAM OR SYSTEM PROGRAM - - - - PROGRAM CONTROL - --- - ""IF aDUMP WAS SPECIFIED THEN THE Dl!MP WILL TAKE PLACE BEFORE GOING TO RESIDENT BOSS15 INFORMATION FU7W NOTE: SEE RESIDENT BOSS FLOW CHARTS FOR DET AI LS. &-- lOPS ERROR FROM 1/0 HANDLER OR USER ~ lOPS 4 RETURN r---- I --1 RESIDENT BOSS15 I I EXPANDED ERROR PROCESSOR NORMAL lOPS ERROR PROCESSOR I I I lOPS 4 IF USER "CAL" WAS NOT A.READ I 1 INFO TO & FROM DISK I I I INPUT FROM TTY --1-1 TELETYPE HANDLER I : ~~~-~-~------~------~-+-------------~lTTYPED I I : I ~--t~-----~--l L.. _ _ _ _ _ --.J .-------~ I~~~~1:0L I~~ I DATA L II I -, _________ ......J : I I :~ I BACK FROM o I I DATX CARD READER HANDLER A 1"cAL" ENTRY TOTTY HANDLER NORMAL CARD DATA .READ .WRITE 3 OR ANY OAT ASSIGN TO TTY .READ ·2 "USER OR SYSTEM PROGRAM 'NOT NON·RES BOSS15 15-0659 Figure 8-3 8-2 lOPS Error Routine: EXITLT Expanded lOPS Error Routine Control Q Processing, via .SCOM+72 BOSS~ (JMS Entry) Store error data in Resident BOSS .ERR, .MED, and in the address pointed to by .SCOM+37 Go to CTRL Q Routine: MANSAV Monitor TRAN in the first block of onresident BOSS, starting at C (.SCOM+2) Startinq at C(.SCOM+2) + 44 8 , transfer lOPS error data to core image of block Monitor TRAN"block out to first block of Nonresident BOSS Points within the Resident Monitor which transfer control to Resident RESIDENT BOSS - 15 Figure 8-3 8-4 BOSS - 15 DAT3.B (.DAT-3 or any .DAT slot assigned to TTA.) DAT2.B Using caller's buffer address and word count, compose a .READ to .DAT-7, the run time file (RTF) on the system 4evice 1. Compose a .WRITE to .DAT+6, using caller's data 2. Clear bit 4 or .SCOM+52 Make sure teleprinter is not busy Issue .READ to .DAT-7, and await completion m~e N Move user's buffer (minus the header word pair) to Resident BOSS (always 428 words) Issue .WRITE to .DAT+6 (the Line printer) and wait for completion Processing for I/O Macros addressed to .DAT slots -2 or -3, or any slot assigned to TTA. Points within the Resident Monitor which transfer control to Resident BOSS - 15 RESIDENT BOSS - 15 Figure 8-3 8-5 (cont.~. .EXIT processing EXITA TIME OUT processing TIMGON Operator Abort tT .PUT and .GET Processing BOSS2 TTDDTR .SCOM+52 Set bit 11 in .SCOM+52 Set bit 17 in .SCOM+52 Set up .SCOM+43 & 44 to bring in the Nonresident Monitor B.EXT¢ N Monitor TRAN first block of Nonresident BOSS starting at C(.SCOM+2), in the Mass Busy Table entries cessor at EXITA + 1 Points within the Resident Monitor which transfer control to Resident BOSS - 15 RESIDENT BOSS - 15 8-3 (cont.) ~igure 8-6 start Address 42~ Execute bank bit initializat10n code Save value of TIME OUT clock, and disable it Disable CTRL C and set up CTRL T address; save contents of .SCOM+42, set MICLOG bit and clear user bit and delete all files in Set .UFDT -15 and -14 to the CTP UFD named PRCFIL PRC Perform .ENTER on .DAT-IS for PRCFIL PRC; set line count ~ Save current logged-in UIC in~: force "CTP" to be logged-in UIC Save system device code 1n 0.11 Y Set bit zero of .SCOM+S2 word AC.STA Set bit 17 in N Set bit 2 in Job status word Print, "END OF RUN TIME FILE REACHED BY USER" on the LP Next Page Nonresident BOSS I Figure 8-4 8-7 From Preceding Page • PUT Neither Print on Line Printer, "USER DID A .PUT" Set bit 11 in Status word Print on Line Printer, "ILLEGAL .GET BY USER" set bit 6 Status Word Print on "LOAD ERROR •••••••••• " y Set bit 3 in Job Status Word Print on ESTIMATE Set bit 7 in Job status Word Print on LP, "OPERATOR ABORT" "TIME Nonresident BOSS Figure 8-4 8-8 (cont.) y y y Read next Control Card Not a CONTROL CARD RETU;RN CONTROL N Close out PIP command processing y f:J Nonresident BOSS e I Figure 8-4 (cont.) I 8-9 N rite "PIP" line into "RTF" set PIP sW1tc Set up to get character from card: Skip over "$" and pack character in CARDP ~ ______________________________ ~~. pJpC,' y y N RETURN I Nonresident BOS$ I Figure 8-4 (cont.) I 8-10 Make sure the T1me Out Clock will be disabled upon exit from NR BOSS Set bit 8 in .SCOM+S2 (Job Active Flag) store JOB I.D. into account information buffer Pad with nulls until nine characters have been packed Enter date and start time into account information buffer start elapsed time clock, by depositing zero into .SCOM+34 Print Nonresident BOSS Figure 8-4 8-11 (cant.) (Create an ADD File) set up to pack ~nto CARDP ack file name and extension, if any Use default file name "TMP' y Use default extension "ADD" CR.ERR Write card into ADD File Nonresident BOSS Figure 8-4 (cont.) 8-12 set bit zero of ADDSTA Set bit one of .SCOM+56 Zero directory entry bloc Set up to pack into ADDFIL y N Pack file name and extension, if any Use default file name "TMP" ~-----,======~~~========~ Zero bits .SCOM+52 elapsed time into Account Information buffer, and .CLOSE .DAT-14 Next Page Nonresident BOSS Figure 8-4 8-13 (cont.) Set End Job Flag (bit zero of Job Status word) From Preceding Page Increment alternate file extension (~~2,~~3, •• 777) Perform .ENTER to .DAT-14 (ACCNTG ~~l); Set up the buffer with l76~~2, X, -1 write out a ten-block file, and close .DAT-14 Reset File Entry Count to zero Rename account file to new alternate name and extension Print End Job Message and second line, containing ID, Date, S. time, F. Time and run time write and count "LOGOUT" line to "RTF" Nonresident BOSS Figure 8-4 (cont.) 8-14 Restore .SCOM+42 with user mode bit (bit 17) set; restore user's UIC write out BOSS line in "RTF" (BOSS-15) and count it Store line count in bits ~-8 of .SCOM+75 y Close "RTF" and ADD files Print on LP, "RUN FILE TOO TRAN out first 4008 of Nonresident BOSS Close ADD file, .INIT "RTF" and .ENTER a new "RTF" Indicate "RTF" is empty write out "DUMP" line to "RTF" Disable the Time Out Clock, so the user gets a complete dump; count two lines write out "ALL" to "RTF" and ent with an ALT MODE Nonresident BOSS Figure 8-4 8-15 (cont.) 8.1 PROCEDURE FILES To each BOSS command there corresponds a disk-resident ASCII file, called a Procedure File. The Procedure File contains DOS commands. When DOS executes the commands in the Procedure File , it carries out the function specified by the BOSS control card. in the Procedure Files contain fields that Nonresident card. The DOS commands (for instance, a file name) BOSS fills in with text strings from the control These fields are called, "Variable Fields". Before executing the DOS commands contained in the Procedure File, therefore, all the variable fields have to be resolved. This process is very similar to a macro expansion, where (1) DOS is the assembly language, BOSS command name is the macro name, (2) the (3) the contents of the BOSS control card are the macro arguments, and (4) the Procedure File is the macro definition. The expanded DOS commands are put in a Disk File, called the "Run Time File (RTF)". The RTF can contain the ex- pansion of one or more Procedure Files, up to 7778 lOPS ASCII records. BOSS expands Procedure Files strictly on a text string, character basis. It has no knowledge of the intrinsic function of each BOSS control card, except for $JOB, $END, $CRT, and $ADD ($END, $CRT, $ADD have no Procedure Files) Appendix C contains a listing of all standard Procedure Files. 8.1.1 Procedure File Format In order to ensure successful expansion, all Procedure Files must folIowa strict format. The first record of the Procedure File must be a control record, with parameter information. The first record may also contain comments, because BOSS interprets only pertinent information, and ignores the rest. different options. The numbers ~, 1, 2, 3, and 4 specify All other characters are ignored. The option digits can appear in any order, and anywhere on the record. The op- tion specified by each number is given below: ~ - Expanded Substitution (default, if "3" not given explicitly) This option specifies that the Procedure File is to be expanded according to the normal rules of substitution, which are given below. 8-16 1 - Open Ended File (default, if "2" not given explicitly) This option instructs the Nonresident BOSS Moni tor to leave the RTF open after expanding the current Procedure File. BOSS then searches for the next control card. 2 - Closed End File This option instructs Non-resident BOSS to close the RTF after expanding the current Procedure File, and to execute the DOS commands in the RTF. Procedure Files corresponding to commands that may possibly be followed by "Data Cards" should be of Type 2. 3 - Direct Substitution This option indicates the BOSS should not expand the Procedure File according to normal rules. Refer to paragraph 8.1.2 for information on Direct Substitution. 4 - Test Mode This option indicates that BOSS should echo the Procedure File expansion on the Line Printer. This allows a check on the Procedure File. The following combinations are illegal: ~ and 3 1 and 2 If BOSS finds an illegal option combination, it will print, ILLEGAL PROC FILE and search for the next control card. BOSS uses all other records in the Procedure File as macro definition records. Records after the first one are all Macro Definition Records. For each such record, a record will be written in the RTF. Definition Record has the same format. K-fields and V-fields. Each Macro Two types of fields are used: K-fields specify constant character strings that will be written into the RTF exactly as they appear in the Procedure File. V-fields specify variable character strings to be sub- stituted from specified strings on the Control Cards. Each Macro Definition Line of a Procedure File can contain any number of K- and V-fields, in any combination. V-fields are delimited by @-signs. K-fields are delimited by adjacent V-fields, or the end or beginning 8-17 of the record. Since there are only two types of fields, only one need have delimiters. Two adjacent V-fields, however, require two adjacent @-signs. K-fields K-fields may be any string of legal lOPS ASCII characters, except the @-sigp. V-fields A V-field has the following format*: v ~ ~D U~n ([(V-f~eld\]) @ Dnn K-f~eld.l a The two @-signs delimit the field. The first part of the field (A, D, U or 0) is a card-position identifier, and must be present. It identifies the position on the current Control Card of the character string to be substituted in the RTF. The legal combinations are: AfiJfiJ,AfiJl, .... A~9 UfiJ~,UfiJl, .... UfiJ9 D~~,D~1, .... DfiJ9,DlfiJ, ... D17 a With the exception of DlfiJ through D17, each of the above position identifiers corresponds to a unique character string of the Control Card, according to the following scheme: $CMD;O AfijfiJ:D~fiJ(UfiJfiJ) ;AfiJl:Dfijl(Ufijl); .... ;Afij9:Dfij9(U,0'9) The Dl~ ... D17 position identifiers do not correspond to character strings found on the Control Card, but rather to character strings defined by BOSS. Thus, Dl~ - Unused Dll - .SIXBT representation of the System Device Code ( I DK I or I DP , ) D12 - Current Logged in UIC D13 - .SIXBT representation of Carriage RETURN D14 - .SIXBT representation of ALT MODE DIS - Unused. D16 - Unused D17 - Unused * Standards for this format description are identical to those specified in Chapter 5 of the DOS-IS User's Manual, DEC-15-MRDA-D. 8-18 The parentheses in a V-field must be present. fy a default string. They are used to speci- The default string is used in case the string on the Control Card specified by the position identifier is null. A set of parentheses must be included, even if the default string is null. The default string itself can be a variable, resulting in nested variables. 8.1.2 Nesting has a theoretical limit of 217 variable fields. Direct Substitution When processing a Direct Substitution Procedure File, BOSS places the fields on the Control Card into the RTF just as they stand with only leading spaces ignored. That is, BOSS does not necessarily expect to find file names, and so on, as with normal substitution. the Control Cards are separated by semi-colons in a serial manner. Fields on (;), and are processedl The ampersand (&) is used for a special purpose. It causes the current record being composed for the RTF to be terminated with a Carriage RETURN, and written out, and a new record started. This is so that the limit of seventy-five characters per line will not be exceeded. There are only two legal field types within the Procedure File. They are as follows: 1. 2. A~~ Dl~ through A99 through D17 (System Defined) In making up Direct Substitution Procedure Files, the following rules must be followed: 8.1.3 1. The first line must contain a three (3). the file to be direct substitution. This declares 2. The IIAII fields must appear in sequential order, starting at AfJ~. Each "A" field can be used only once within the Procedure File. 3. The liD" fields can only be "DIY''' through IID17". can be used any number of times, in any order. 4. Variable expressions must follow the standard V-field format, as in expanded substitution. They Example of Procedure File The following example shows a typical Direct Substitution Procedure File, the Control Cards used to call it, and the resulting lines produced in the Run Time File. 8-19 l Procedure File - Map PRC I 3 PROCEDURE FILE TO RUN CHAIN WITH NO OVERLAYS CHAIN @A~~(TMPXCT)@@D14()@ @A.01 (SZ) @@DI4 () @ @A~2(FILTMP)@@D14()@ @D14 () @ Control Cards as They Appear $MAP TESTliSZ,VTC/ABC,DEF,NAMl,&NAM2,; $*~l NAM3,NAM4,NAMS/;TESTl,SUB1,SUB2,&; $*.02 SUB3,SUB4,SUBS Run Time File Li~es CHAIN) TESTI (ALT MODE) SZ,VTC/ABC,DEF,NAMl,) NAM2,NAM3,NAM4,NAMS/ (ALT MODE) TESTI, SUBI, SUB2,) SUB3,SUB4,SUBS (ALT MODE) (ALT MODE) Note: 8.2 D14=Altmode, <ALTMODE> is an Altmode, and <CR> is a Carriage Return. BOSS-1S ACCOUNTING I BOSS has a very simple accounting mechanism. It keeps an account record for each job in a random access.file in the CTP UFD. Hence, the file is protected, and can only be accessed after successful execution of a $MIC command. I The name of the accounting file is ACCNTG ,nnn. tension of ~~l.) (The first has an ex- Each file is ten physical blocks long, and contains enough information for 31~ jobs, thirty-o~e per physical block. When BOSS fills up one file, it increments the extension, and starts a new I one. Every time a job ends, BOSS checks whether ACCNTG .0.01 exists. If it does not, BOSS creates one. it is full. I If it qoes, BOSS checks whether If not full, BOSS makes a ne~ entry; if full, BOSS lDirect Substitution File 8-20 searches for the first unused extension number. If all extension num- bers have been used (up to 999) BOSS prints this message to the operator on the teleprinter: MAX NUMBER OF ACCOUNTING FILES REACHED PLEASE PROCESS AND DELETE THEM Every time the system manager processes an accounting file, therefore, he should delete the file. For each completed job, BOSS writes out an eight-word record to the accounting file. The records have the following format: Word # Content ~Ob { .SIXBT I.D., ln 4 5 6 7 8 Date, packed mmddyy Start Time, in hhmrnss End Time, in hhmmss Run Time, in hhmmss Terminal Job Status Word A word whose contents equal 7777778 immediately follows the last job accounting record in each physical block of the accounting file. 8.3 B.PRE Figure 8-5 is a flowchart of B.PRE, the BOSS Line Editor. 8-21 Initialize .OAT slots -14 and -15 Read updated file name and extension from .OAT-2 y Assume updated file name equals the original file name Read file name and extension from .OAT-2 COREAD Read a card from .DAT+s r -____________________~E~O~F_< 1. 2. ~E-D-I-T--------------~ Set FLAG to 1 Issue .ENTER to .DAT-14 Write card image to .DAT-14 Read a card image from .DAT+s B.PRE Figure 8-5 8-22 Perform .SEEK to .DAT-14, and .ENTER to .DAT-IS Delete Subst. Read a record from .OAT-14 and write it into .OAT-IS .EXIT Read a record from .OAT-14 and write it into .DAT-IS Read a record from .OAT-14 .EXIT B. Pro;: Figure 8-5 8-23 (cont.) 1. 2. Save pointer to CAL Save sub function or data mode y y ERROR lOPS 17 Swap descriptor blocks for .DAT slots A and C Swap descriptor blocks for .DAT slots A and B lOPS 22 ERROR there more than orie output file on ~----------------~ the same unit y Get function code, and make up dispatch instruction Next: Page DECtape 'A' Handler:: (DTA.) A-l From Preceding Page ERROR lOPS 55 N Set up word pointers within the new buffer -- e.g., buffer+377 = link • INIT .OPER • SEEK • ENTER • CLEAR • CLOSE • MTAPE • READ • WRITE • WAIT • TRAN 6d)6666 @~0Cb O()G .INIT (Function Code #1) 1. 2. 3. Give user standard buffer size (377) Set input or output file indicator wait for previous I/O to finish for DEC tape N 1. 2. Do .SETUP to API and Skip Chain Test buffer size. If not 4408 or greater, terminate with an lOPS 7f' Return to user after CAL DECtape "A" Handler A-2 (DTA.) (.OPER, Function Code #2) ERROR IOPS 6 N Dispatch to requested subfunction and process (.SEEK, Function Code #3) y ERROR IOPS Ul ERROR IOPS 7 (Loop back to user CAL) Bring directory ready in core, if not al- N 1. 2. Obtain starting block number Read the first file block into core user after CAL i DECtape "A" Handler (DTA.) A-3 ERROR IOPS 13 (Dispatch Code 4) ERROR lOPS 7 Y (Loop back to user CAL.)E----------< Bring Directory into core, if not already in N so that file is deleted to this .DAT slot Search directory bit map (in core) for first free bloc N ERROR lOPS 15 Set up to write out this block, when the time comes • CLEAR (Dispatch Code 5) (Loop back to user CAL.) ERROR lOPS 10 1. 2. Clear out file bit maps Clear directory block with the SYS block bits set in the directory map DECtape "A" Handler (DTA.) A-4 • CLOSE (Dispatch Code 6) (Loop back to user CAL)~______________~< 1. 2. Clear bit in bit maps Clear switches 2. indicator in buffer Write out last block in file N The following is done on the in-core bit maps: 1. Zero its bits in the directory bit map 2. Overwrite its file bit map with the Write out updated directory and file bit map Return the buffer to the system Return to user after CAL DECtape "A" Ha~dler (DTA.) A-5 • READ (Dispatch Code 10) (Loop back to user's CAL) y Pass 001005,776773 sequence to user's buffer 1. Transfer line to user's buffer 2. Set data validity bits y Read DECtape "A" Handler (DTA.) A-6 • WRITE (Function code 11) Loop back to user's CAL ...------.....:::y-<."Tt y 1. write out block; search for next block 2. ERROR lOPS 15 N 1. 2. Transfer user buffer to handler buffer Compute Checksum N .WAIT & .WAITR (Function Code 12) Set ~AL pointer to specified address N via pointer Exit to user after CAL I DECtape "A" Handler (DTA.) A-7 .TRAN (Function Code 13) Loop y back to use-r CAL 1. 2. 3. 4. Set up block to transfer in or out Set up core address-l Set up word count Start transfer INTERRUPT SEctION Read status "B" Clear I/O underway switch y N Set directory in core switch Set up Current Address & word count for read or write Set up current and word count for ~~------~DECtape "An Handler (DTA.) A-8 (ERROR Logic) y N N 1. 2. 3. 4. 5. 1. y 2. 1. 2. Read ~tatus Register "A" and save it Clear status Register "A" Disable interrupts Set return in .MED (register 3, bank ~) Clear I/O underway switch and enable CTRL P Set I/O underway switch Set up Current Address and Word Count for search ERROR lOPS 12 Accept data as is Get rest of data 1. 2. 3 Restore PIC interrupt entry and AC Turn interrupt on, if this was a PIC Debreak and Restore Exit to interrupted code DECtape "A" Handler (DTA.) A-9 Entry from CAL Handler 1. 2. Save the pointer to the CAL Save the .DAT slot number and subfunction code (bits 5-8 of LOC+~) N Do • SETUP for PI and API interrupts Determine number of platters N IOPS2l Calculate the maximum block number, for-use at .CLEAR time Calculate size of the TEMP list for pre-allocated blocks, and set the BUF.OK switch (SGEN size ok) y Branch to~_________________________Y--< user.'s CAL Fall through to "IO.OFF" Next Page Disk itA" Handlers B-1 i From Preceding Page 1. 2. Calculate pointers to the arguments of the CAL Save step counter and MQ for EAE (DISPCH) Save the current set in its appropriate buffer Make new .DAT slot the "current" one Save status of write Check y Next pagET Disk "A" Han11ers B-2 I From Preceding Page y y ." Buffer, large enouqh~ for file ~------------~ lOPS 70 Request a buffer (.GTBUF) N lOPS 55 1. 2. Save pointer to buffer, and zero entire buffer Complete the Busy Table entry 1. 2. 3. Get Ule from the Busy Table entry Bring in the Current Set from buffer Set up pointers to: User's Directory Entry, temporary block list, Data Block Words 0,1,2,3,376 & 377 Note: I Disk "A" Handlers I I B-3 I .TRAN, .WAIT and .WAITR have already been intercepted. 1. 2. Wipe out entry in UFD, and Give back pre-allocated blocks 1. 2. Return any allocated buffer Zero any old busy table entry Make a new entry in the busy table Save Write Check bit in busy table Indicate "current" .DAT slot is zero 3. 4. 5. Exit to LOC+4 y lOPS 10 lOPS 6 Page Disk "A" Handl+rs B-4 I From Preceding Page .DLETE • RAND N 1. 2. Delete the file Give back all blocks 1. 2. 3. 1. 2. Rename the file Insert current date Load AC with the first block number Return aquired buffer Make "current" .DAT slot zero lOPS 51, 71 or 13 1. (.FSTAT) LOC+3 2. 3. Place device type in LOC+2 of CAL Search for file Place file size in Read in first RIB Move RIB to top of buffer, if necessary ~------~----~------~ y Exit to EXITAD Disk "A,lI Handlers B";'5 I (.RTRAN) lOPS 11 N lOPS 66 Calculate RIB block number, and the desired pointer's position within that RIB block y Depending on the location of the desired block, relative to the RIB block in core, read in the next or preceding RIB block Save pointer to desired data block RP RF Assume transfer starting at word zero, through word 375, and set parameters accordingly Store starting word number and the number of data words desired Use word count pack input I Disk "A" Handters B-6 Set up user's buffer to receive the link words for block - no backw Set links in data from adjacent pointers in the RIB block y 1. djacent pointer in RIB, and forward link to -1 2. 3. Set backward link to adjacent pointer in RIB block Read in next RIB- bloc and adjust RIB number indicator in the current set Set forward link to first pointer in the new RIB block 1. adjacent pointer in RIB 2. Read in previous RIB block and adjust RIB number indicator in the current set 3. Set backward link to last pointer in the new RIB block RP Set up driver with the correct block number Bring in or send out required block or data Disk "A" Handlers B-7 I to adjacent pointer in RIB, and backward link to -1 y lOPS 10 lOPS 13, Sl or 71 lOPS 10 lOPS 64 Read in first block of file I Disk "A" Hand1lers B-8 IOPSlO (No entry in MFD for this UIC) (Entry in MFD, but (UFD exists, but does not contain a file by the give WDiS~ 1. 2. e I (UFD exists, and contains a file by the given name) e Save number of the last MFD block read Save file name Read in last MFD block y N Set pointer to free slot found by FINDER 1. 2. 1. 2. Make forward link of last MFD block point to the next block Write out the block Set up entry pointers Insert new UIC, entry size and zero protection code (unprotected) into new MFD entry *That is, has a • RAND, .SEEK or .ENTER been issued without a .CLOSE? Disk B-9, y IOPS63 N Read in the MFD block which contains proper entry Set up entries in the Busy Table, the MFD block and the Current S.~ write out the MFD block and clear the buffer 1. Set up a new UFD block in the buffer, with a back link of -1 2. Set pointer to indicate location to receive the new entry Disk "Atl Handlirs B-IO 1. 2. set "Old file in" switch set pointers to UFD block nuwber and the first word of the olii file's entry (to be used at .CLOSE) Protection Violation IOPS63 y N 1. 2. y 1. Change forward link of last UFD block (still in core) Write out last UFD block Clear user's buffer Disk "A" Handlers B- 1 Read in UFD block with free entry Load "UFOl" pointer in Current Set with this block number 1. 2. 3. Save pointer to new UFD entry in "UFD2" of the Current Set Set up pointers to UFD entry slots Store file name and extension in the UFD entry 1. Store RIB pointer in UFO entry 2. Store protection code & date 3. Insert data block number 4. Write out UFD block with entry 5. Clear buffer Set "WREXSW" (Write-executed switch) Clear the buffer to zero ENTSET I". 2. 3. Read in the first Submap Make it the "Current Map" Zero indicator of the number of preallocated blocks (Number of blocks pre-allocated is the minimum of number available and the size of the "Temp List") eturn any preallocated blocks Disk "A" Handlers B-12 IOPS63 1. 2. 3. 4. 5. 6. Clear a buffer Set words ~, 1, 2, 376, and 377 to -1 Set bits 0-2 of word 3 to MFD size Set bits 3-17 of word 3 to point to first submap write out buffer to block 1777, if RF or 47~4~ if RP Clear the buffer maps) RF RP 1. 2. 3. 4. Set up forward and backward links in buffer Set up words ~, 1 and 2 Turn on bit in this submap corresponding to itself Write out the block 1. Set backward and forward links to -1 2. Turn on bits that correspond to MFD block and first suhmap block N y Set bit in appropriate bit map for MFD 1. 2. 3. 4. Set bit in the first bit map that corresponds to second bit map Set forward link to next block Write out the buffer and clear it Set back link to first submap, and forward link to -1 Disk "A" Handlers B-13 From preceding Page N Reset RIB pointer in UFO to last data block Set "word RIB" ~n UFO WRTUFD Write out current UFO block y 1. 2. Write out UFO block currently in core Reset UFOI to UFO block with old file Read in the UFO block with the old file's entry 3. SAMUFO 1. 2. Reset UFO entry pointer (UF02) Wipe out the old file's entry (Give back any unused blocks) Read in first RIB block used Save the forward data link Next Page Disk "A" Handlers B-14 N set for internal looping (implicit WAIT) until done y 1. write out current block 2. Obtain another and 3. Clear the buffer (Subroutine SETWRD) 1. 2. 3. write 2-word EOF line in buffer Set forward data link to -1 Increment file size N TRAN RIB words 1nto write out last data block 1. Read in UFO block for this file 2. Fill in file size and turn off Truncated file hit 3. Save pointer to first RIB block Next Page Disk "A" Handlers B-lS N to last Oata Bloc Reset RIB Block pointer in Set 'word-in-RIB' in UFO (UFO entry is now complete. still in core.) UFO N WRTUFO y 1. 2. 3. Write out current UFO block write out UFO currently in core Reset UFOl to UFO block with the old file's reference Read it in SAMUFO 1." 2. Set UFD2 to old file's entry slot Wipe out the old entry 1. 2. 3. Get first RIB block used Read it in Save the forward data link for loop (Give back unused blocks.) N Disk "A" Handlers B-16 THISRB 1. 2. 3. 4. Find area in this block where blocks should be given back Adjust word ~ of this block to reflect only those used write out the block Fudge subroutine LSTFIL so it appears UNBUSY called -- - ------- -- - - --I I I I I I l N Turn off RIB block's bit in SAT and write out the Submap block LOC+2 I-oi!'~----------I 1. 2. 3. Perform .GVBUF Zero current set Make "current" DAT slot zero Return to LOC+2 Disk "A" Handlers B-17 - -- - - - y IOPS6 Save pointer to "next" record N Use this record's word pair count to point to the next record Disk "A" Handlers B-18 y Check Header word pair Set up the word pair counters for moving data non-Dump Mode LINFIT 1. Hake Word Pair Count negative 2. Zero checksum word in record to be read 3. Clear line error flag N 1. Set pointers for a skip over the next record 2. Set "Short Line " Flag 3. Set return in PWORDS to go to ENDINl Disk "A" Handlers B-19 set up "words left in data buffer" for Set appropriate error bits, if any PWORDS Read in next data block and set up pointers, anticipa~~ in the next read user DISK "A" Handlers B-20 READ-WRITE Common setup Routine 1. 2. 3. 4. Save pointer to argument data block Set up return address Set pointer to checksum word in data buffer Save checksum word N IOPSll 1. 2. 3. Set up pointers to "receiver" data buffer Index SETUP return pointer past arguments to Dump Mode exit Save Word Count from CAL Indp.x return pointer to Non-Dump Mode GETWPC Extract Word Count from line buffer header word pair RETURN Disk "A" Handlers B-21 1. 2. 3. Set up return address Clear "Current Slot" number Get Word Count y 1. 2. 3 Set up for input or output Get argument block number Read it or write it Disk "A" Handlers B-22 lOPSll all Move that fit and adjust arqument size count NOFlTI Set "receiver pointers to the top of the compute and insert Checksum Move record into buffer Disk itA" Handlers B-23 I I N . (Loop on CAL) I RETURN to LOC+N DISK "A" HANDLERS B-24 1. store number as forward data link 2. Save current block number IOPS15 1. 2. write out Increment IOPS15 y N DSKFUL Set next block number in TLIST to -1 set backward data from SETWRD RETURN Disk "A" Handlers B-25 1. 2. 1. 2. Initialize the map count number, block count, TLIST pointers and TLIST count Read in the current submap Start filling the Temp List When find a free block, skip the next block+DELTA (assembly parameter) and continue EXIT Disk "Aft Handlers B-26 COMMON ROUTINE FOR READING AND WRITING TO AND FROM THE DISK 1. 2. 3. 4. Save the calling address Get the arguments Compute disk hardware address from argument block number Set I/O Unde Start disk Exit to loc. in EX I TAD INTERRUPT PROCESSOR 1. 2. 3. Save PC at EXITAD Save AC Turn off I/O underway flag 1. 2. 3. Clear disk flag Process error If necessary, retry 10 times Attempt recovery on CTRL R Disk "An Handlers APPENDIX C ASG 1 ASSIGN DEVTCE lJIe TO .DAT A (ilOr.0(~"'11( )@)@ <~ue~(@D12( )G~)@) @Api~()t,;I ASM ~ ACR 0 ANr} L I ~I E ED1 TOR A ~D0~(~~11()~)~ <~UC~(~D12()~)~> ~14/@o~3(@r11()@)@ <(ilU~3(~012()(iI)~> ·15 g.PRE ? f.ilA~eI()@l ~A~3('Ae~(rIl T~P)~'~ A @D0e(@~11()~)@ <~U~~(~012()~)~> A (il002(@~11()@)@ <~U~2(@D12()~)@) A (ilD04(LP)~ <~U04(~D12()~)@) -12 -11/@D01(@Cl1()@)@ -14/~D03(~Q11()@)~ <@U~lC@012C)@)~) <@u~3(~012C)@)~> -10 ·13 MACRn ~O(8L)~~·Al0(rrLT~p)~@D14(). BNK 2 BANK ~nJE 8 A~!K o~ ~prRAT[O~-O~ BUF 2 NUMBER O~ FurFE~S PUrrs ~A~~()~ CHN 1 SPEC!~y r, ~A~0()~ 7 0R 9 T~ACK MAGTAPE CMP 1 SOUr.<t:E C'~1PA~E A (iloe2(~Dll()@)~ <~uO~(@012()@)@) -15/~001«(il011()@)~ <@u01(@D12()@)~> SRCCOM ~O( )1l~t'lAc"0( '",\I@AJ1( )~(iD14()@ DIR 1 LIST DIRECTORY rtP L LP~tiDAQJ(i' (~011 ( ) '"') ~ (@uee, (@D12( ) ~) ti)(olD14 ( ) (lil C-l -14 DLG ? l.OGOUT ute LOGOUT DMP 13 DUt-1P uTILTTv .., DIRECT SUB rILE A ~D~0(~~11()~)~ ('U20(9012()@)-> ·14/~D~1(~P)' (~U01(~D12()~)@> ~12 ~A3~(ALL)·-D14()~ DOS 1.3, GENERAL PRe FILE ~CR GIvING COMMANO ST~lNGS "A0~('D14( )_)(la FIL 2 CREATE A ~TLE ~ROM CARDS/EDITOR A ~O~~(~Dl1()~)~ A ~D01(~Dl1()~)~ <~U~~(.012()a)@> <@.uel(~012()@)@) -14 ·15 R.PRE ~A"'0(rILTMP)~ (t)A~l(lIA""C~II P"'P)~)@ F<R 2 rORTRA~ IV AND LINE EDITOR A @D0eC~~11()@)@ \ <~U0~(@D12()~)@) -14/~D~1(~nl1()')@ <@U~1(~D12()@)~> -15 ~A~l(~AeC(rIlTMP)@)' A ~D0~C~nl1()~)~ (~U0~(@D12()~)@) ~11/@D~1(@Dl1()~)@ (~U01(~D12()@)~> -13 a,PRE aA00()' A .n02(LP)~ <~U~2(~D12()~'~> -12 F"4 'O(8L)@~.A00(~ILTMP)@@014()~ JOB ? STAR T "l E \.: J 0 8 LOG JOB ,. .A?0()~ BEGIN ~D14()~ LOCIN IIAJ!2(SCR)@ A NON 2,3,4,7,10.11,12,13.14,15,16.17,20/@Dll()@ 1 PIP ~ ~D11()~ <SCR>~D14() (lA03()' KEEP 6IA04(OF'F)~ TIMEST 'A~1(1)~:00 C-2 KEP 1 RETAIN DEVICE ASSIGNMENTS KEEP flA~0()fI LCM 13 SUPPLEMENT TO LIB PRC~UPOATE ,LIAR ~A~0(CLOSE@D13()~)~ @A01(~D13C)~)~ ~A~2()~ LIB 1 A ~000(~Dl1()@)~ <@U00(@D12()~)_> -14 A ~D~1(@O~~(~Dl1()~)@)@ <~U01(~U0e,(@D12()@)@)@> ~15 A ~D~2(~dl1()~)~ <~U02(~D12()~)@> ~1~ A ~D03(LP)~ -12 <@U~3(~D12()~)@> UPDATE ~Q(LUs)@~@-e~(.LI8R)~@D14()@ LNK 13 DIRfCT !;;Uq rILE - BUILDS LI~KS fOR tXEcuTE F'ILE"U~E WITH OVL ~A?0(~014( )~)@~D14()(2 LOG :2 LOGIN ule LOGI1\1 ttACl0(SrR)@ LST 2 LIST CONTE~TS of rILE ON LINE PR!NTER PIP T LP·~Oeo(~011()~)~ <@U00('012()~)~> ~A0~(fILTMP'@ (A)~D14()~ MAP 1,3 DIREcT SUB FILF fOR CMAIN C~AI~ OPTION ~A~0(TMPXCT)~@014()~ IiIA01 (Sit) Ci~014 ( )' ~A~2(rILT~p)~@D14()~ .... 014()t!t MIC 2 LOGI' MIC ,,tIC ~lCLOG ~A00()@ C-3 A~U RES ceDE ONLY ~RC MNT 1 HOU~T TAPEH LOG~ MCU~T 8RIVE O~ ~ ~rcn)~-TAP(# @A00()~ O~ DRIV[# @AZ1C)~ • ~RITE MSG 13 MESSAGE Tn ~PE~ATOR-DIRECT SUB FILE LOG (IlA00():I MSW 13 MESSAGE Tn lOr,w ~A~r()~ OPE~ATOR w/WAIT-OIR£CT SUB NDR 1 CREATE NEW nrR(CTQRV Pill ~ ~A00(~'11()@)~ <~ue~(~D12()~)~>~014()~ OVL 13 DIRECT SU~ FILE - USE rOR 8UILOI~G OVERLAYS(C~AIN) CHAP~ ~A~0CT~PXCT)~~D14('@ CiA"'l CS~) ~lID14 ( ) GU ~A~2(rJLTMP)~@D14()~ PAG 2 PAGE MoDE OPERAT!ON-ON PAGE ON peD 2 SPECJ~Y p PR~T~CTI0~ CODE ~A~0(3)(t) QDP 1 nUMP C~RE 1N TE~~I~AL ER~ORS;~O ARGUMENTS QDU~P XCT 2 EXECUT~ A ~D~~t~~11()@)@ <~U00(~012()~)~> ~4 E @AOQ'JeTMPXCr)fll C-4 @A~?(L~CK)~ INDEX Accessibility map, 6-9 Additions to Non-resident Monitor, 3-4 Automatic Priority Interrupt (API), 7-1 hardware, 7-4 implementation, 7-10 ON/OFF, 4-19 software, 7-6 Bad Allocation Table (BAT), 6-18 Bank/Page mode, 7-1 Batch mode .DAT slot assignments, 4-20 Block checksum, 6-7 Block control pair, 6-6, 6-7 Block list, 6-14 Block word count (BWC) , 6-6 BOSS-IS, 8-1 accounting, 8-20 .DAT slot assignments, 4-20 line editor (B.PRE), 8-21 Bootstrap, system, 2-1, 2-7, 4-13 Buffer allocation, 4-20, 5-12, 6-14 CAL handler, 2-2, 7-1 Characters, control, 2-14 Clock operation, 2-12 Clock routine, 2-8 COMBLK, 4-13, 5-1 Commands to Non-resident Monitor, Control characters, 2-14 Current set, 6-14 3-4 Data modes Dump, 6-4 Image, 6-4 IOPS, 6-4 DDT loading, 4-13 DECtape file organization, 6-1 Device assignment table (.DAT), 5-12 Device table, 5-11 Disk file structure, 6-11 Disk handler, 2-6 Disk resident tables, 5-1, 5-9 Directoried data recording, 6-5 Directoried DECtape, 6-1 Dump mode, 6-4 Error handler, lOPS, 2-2 Error processor, 2-2, 2-6 EXECUTE, 4-13 File File File File File File accessibility map, 6-7 Bit Map, DECtape, 6-2 buffer transfer vector table, 5-12 identification and location, 6-7 information, see Current set locating, 6-7 X-I File storage, FlOPS, 6-5 Handlers, 3-8 I/O device, 7-1 Image mode, 6-4 Input/Output (I/O) communication table, 5-11 initialization, 2-8 I/O device handlers, 7-1 writing special, 7-9 lOPS mode, 6-4 error handler, 2-2 Linking Loader, 4-13 Link status, 7-1 Loader buffer allocation, 4-20 Loader, system, 4-1, 4-13 Magnetic tape, 6-4 file directory, 6-7 handlers, 6-5 storage retrieval, 6-11 Mass Storage Busy Table, 5-13 Master File Directory (MFD), 6-12 .MED error processor, 2-2 Memory protect, 7-1 Monitor, resident, 4-13 Non-directoried DECtape, 6-1 Nonresident Monitor, 2-12, 3-1 additions, 3-4 commands, 3-4 Operation of DOS, 1-1 Overlay Table, 5-9, 5-14 Patch area, Resident Monitor, 2-14 PATCH, commands to, 3-8 PIC interrupt service routine implementation, 7-10 PIP, 6-18 Pre-allocation of blocks, 6-16 Priority, software level, 7-1 Procedure files, BOSS, 8-16 Program control characters, 2-14 Qfile, 3-8 Queueing, 7-7 RCOM table, 5-13 Reserved word locations, 5-13 Resident Monitor, 2-1, 4-13 PATCH area, 2-14 timing features, 2-8 Retrieval Information Block (RIB), 6-14 Run time file (RTF), 8-1, 8-16 Tables used by Loaders, 4-16 Temp List (TLIST), see Block list .TIMER routine, 2-12 Timing featu~es, 2-8 TRAN routine, 2-7 User File Directory Table (.UFDT) .SCOM registers, 5-1 to 5-6 5-12 User file labelS, 6-9, 6-10 used by Loaders, 4-17 to 4-19 SGNBLK, . 4-13, 5-1, 5-8, 5-10 User identification code (UIC),6-12 Skip chain, 5-12 Software level priority, 7-1 Special I/O device handlers, 7-9 Startup routines, 2-8 Storage, 4-26, 6-11, 6-16 Storage allocation tables (SAT's) 6-17 Submaps, 6-17 SYSBLK, 4-13, 5-1 System bootstrap, 2-7 initiali~ation, 2-8 Loader, 4-1, 4-13 X-2 HOW TO OBTAIN SOFTWARE INFORMATION Announcements for new and revised software, as well as programming notes, software problems, and documentation corrections are published by Software Information Servi ce in the follow ing newsletters. Digital Software News for the PDP-8 & PDP-12 Digital Software News for the PDP-II Digital Software News for the PDP-9/15 Family These newsletters contain information applicable to software available from Digital's Program Library, Articles in Digital Software News update the cumulative Software Performance Summary which is contained in each basic kit of system software for new computers. To assure that the monthly Digital . Software News is sent to the appropriate software contact at your installation, please check with the Software Specialist or Sales Engineer at your nearest Digital office. Questions or problems concerning Digital's Software should be reported to the Software Specialist. In cases where no Software Specialist is available, please send a Software Performance Report form with details of the problem to: Software Information Service Digital Equipment Corporation 146 Main Street, Bldg. 3-5 Maynard, Massachusetts 01754 These forms which are provided in the software kit should be fully filled out and accompanied by teletype output as well as listings or tapes of the user program to faci Iitate a complete investigation. An answer wi II be sent to the individual and appropriate topics of general. interest will be printed in the newsletter. Orders for new and revised software and manuals, additional Software Performance Report forms, and software price lists should be directed to the nearest Digital Field office or representative. U.S.A. customers may order directly from the Prc2rnm Library in Maynard. When ordering, include the code number and a brief description of the software requested. Digita I Equipment Computer Users Society (DECUS) maintains a user library and publishes a catalog of programs as well as the DECUSCOPE magazine for its members and non-members who request it. For further information please write to: DECUS Digital Equipment Corporation 146 Main Street, Bldg. 3-5 Maynard, Massachusetts 01754 DEC-15-0DFFA-A-D READER'S COMMENTS Digita I Equipment Corporation ma inta ins a continuous effort to improve the qual ity and usefu Iness of its publication!;. To do this effectively we need user feedback -- your critical evaluation of th is manua I . Please comment on this manual's completeness, accuracy. organization, usability and readability .. Did you find errors in this manual? If so, specify by page. How can th is manua I be improved? Other comments? Please state your position. -------------~------------------------- Name: Date: ------------- Organization: -------------------------------------------------------------Street: Department: ---------------------------------------------------------------. City: State: ---------------------~~ --------------------- Zip or Country------------ - - - - - - - - - - - - - - - - - - - - - - - - - - Fold Here - - - - - - - - - - - - - - - - - - - - - - Do Not Tear - Fold Here and Staple - - - - - - - - -" - - - FIRST CLASS PERMIT NO. 33 MAYNARD. MASS. BUSINESS REPLY MAIL NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STATI-S Postage will be paid by: mumuama Digital Equipment Corporation Software Information Services 146 Main Street, Bldg. 3-5 Maynard, Massachusetts 01754
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies