Digital PDFs
Documents
Guest
Register
Log In
XX-AA979-BC
December 2000
153 pages
Original
6.8MB
view
download
Document:
TSS8 8.24 ManagersGuide
Order Number:
XX-AA979-BC
Revision:
Pages:
153
Original Filename:
http://bitsavers.org/pdf/dec/pdp8/tss8/TSS8_8.24_ManagersGuide.pdf
OCR Text
5'd stem MIJP\ a 3 e..r'\.s GLJ~ de" For P Dp- g E Oec.. 5".ste.~ T.s S 8.).. Ii Molt ito" CHAP~rER i-8 1 INTRODUCTION TO 'I'IMESHARING AND EDUSYSTEM 50 1.1 INTRODUCTION TO TIMESHARING CONCEPTS -8 -8 .. 9 ·10 12 In a typical programming environment, a user may desire to have a computer edit, test, debug and execute a program. However, there are frequently long periods of time when the computer waits for input from the programmer.' At these times, it is dE:sirable to find something else for the computer,to d(). One solution is called "timesharing". Typically, a number oj: users each has a terminal connected to a computer, and as,eaqh user requires computer time, the processor assigns computer time to each user. Thus, by proper allocation of processor tim,e, ea'ch user, in effect, has all the computer time necess~ry for a particula~(program. Users do not have to feel rushed or be, concerned about others who may desire to use the computer. \' 12 ,'''' \ " EduSystem 50 is such a timesharing systen. From the user's viewpoint, each user on an EduSystem system has a terminal and 4K of 'core for his exclusive use. In addition, disk storage may be used on a first-come/first-serve basis. Any of the several peri, pherals connected to EduSystem 50 may be reserved by a user exclusively until completion of the program. The EduSystem 50 Monitor· is thIS! set of programs which allows a:-l of this to happen. . ,~~ The EduSystem 50 Monitor reserves fields 0 and 1 for its exclusive use; the rest of core is given to users as they need it. Since there may not be enough COl~e for every user to siroul taneously oCC~py 4K, each user has a 4K section of disk reserved for his 'program. When. there is not enou9h room in core, the entire 4K is written to disk.. Later, when enough core is available, the 4K is read from the disk back into corE~ again. This process is called swapping, and the area on disk reserved for it is called the swap area. , '( I I <. /'..- ., '"'.' \ 1-1 r To p;~vent "':,~~~~.. from interfering with t1".e operat10n · ~.~\,'''f~ of others, several step~ are taken: a) An OSH. is not allowed~ this prevents' disputes over the s\,ili tch register setting. b) The user cannot perform an HLT. c) The program must be executed with the data field set ~qua~ to the instruction field~ no change is allowed l.n el.ther. In fact, the user may not do any kind of lOT. In rea:-ity, any of the above instructions ma.y be contained in a user's prolgram. They are trapped by the hardware, which does not allow them to function. Instead, the time-share hard- ware option raises a flag and causes an interrupt. must then determine the cause of the interrupt. the user does a KRB, the AC will not be altered. The Monitor I~, for e~arnple, lnstead,the KRB causes an interrupt into Monitor code, which looks back to see what causes the interrupt. When is sees the KRB, it takes the necessary steps to simulate the KRB., user s program. I . execute~ It :then returns 'to the ~rhus, there are 512 different IO'l's the user 'can the Monitor could be modified to perform almost ,any . desired function for them. These, i::r:~1?ped:;'I.oTs, '.ant:! the ,t,rappecl" ","1'1 .' and OSRs are sometimes,referredt:o an Unimplelllented User' H:LTs Operations (UUOs). .'\ The time-share hardware option makes this .possible. ~ orocessor can be in one of two modes: ~e executive mode arid, user , 1, "lode. In executive mode, the processor operates.like a stan~ ·.ard PDP-8. .: However, when the process()r is in user mode, the instructions discussed above cause an i.nterrupt, processor to executive mode. 1-2 anc'. return the NOTE ". , Instruci:ions m'icrocoded ~Nith HLT or O:3R will cornplete their func,t:ions normally before 1:he interrupt occurs • " . ,; To begin, u.sing the system' the user must be identified at 'the' terminal. Each user has an account number, under which disk .' files are stored. The Monitor also keeps trac:~ of system usage by a'7.count number. To protect agi3.inst misuse of the .system, the , ' user, must give an account number and a password to the system: this process is, called ,a LOGIN. ,Once logg-ed in, the user may ·t:ype various commands to th e Monitor, execute a program (either original or from the library), or type characters to be input to the program. When finished, the user logs out enabling other.s to use the terminal. 1.2 EoUSYSTEM~ 50 HARDWARE CONFIGURATIONS A minimum cc'nfiguration for EduSystem 50 includes: a) PDP-8, 8I, or8E, with at least 12K memory (16K memory is be~tt:er) and the time-share option. 'to in. t:he following text as PDP-8.) (All are referred b) RF08 with at least one RS08 (a DF32 with at least two platt,ers is acceptable, however, this is not recommended becausn of the limited s'torage area and slow speed of the device). c) Multi.-1:erminal capability - one or more KL8Es or PT08s or a ne08A. All configurations, except PDP-Bls with a ne08A, require a real·-time clock. Optional hardware supported: a) Up to 32K memory. ·b) DC08A - may be ,used only on a PDP .... 81 and may be used addition to PT08s. lrl c) 689AG modem controller - for use with DC08A only. d) EAE- all instructions of any standard EA,E are support,ed with the exception of the traditional PDP-8 step coun.ter: which is not saved or restored. e) High-Speed Reader - a paper tape reader is required to build EduSystem. A low-speed reader may be used, however, the build procedure vlill be very time consuming. ' ',\1 f) High-Speed Punch. g) Line Printer - LP08/LE8 or LS08/LS8E. h) DEctape - TeOI or TC08 and up to eight drives DEctape is not allowed.} i) Up to four disks j) Card Reader. k) RK8E ( TD8E. (three additional RS08s). (up to four drives). SOFTWARE The following sections present an introduction to thecompt nrograms of EduSystem 50. 1 INIT INIT is thE: initializer program. a) It is the job of "'INI;r tc: Build a new system on the system disk. from paper' tape:s. ,- j b) Initialize a file structure on the disk for program storage. c) Allow the user to make patches to the system. This can be useful if a particular system feature: must be' alte:red •. d) Allow the user to transfer the entire.contents ()f the: disk to DEctape. This is called a "dumpJl. e) Allow the user to load the entire disk from DECta,pe. This allows all saved programs I account numbers,' etc., to be restored to their condition when' a: dump was las:t taken. f) Allow the user to start the system so that it is in its operating state. A start must set up fields 0 and 1 to the proper initial conditions, start thEt real, time clock,: and transfer control to the monitor. '. 1--4 1.3.2 SI 9I is the System I~terprete!r. Whenever a user types a command at the console, SI analyzes the! command. SJ: is stored on the disk and is read into field 2 when it is needed. FIP is thE! File Phantom. ar~ V;rhenever certain lOTs executed, FIP is called in to handle them. (see Appendix C; PIP handles disk . 'file storagE~ cLnd assigns devices to users when they request them • . rIP is also st:ored on the disk and, when it is needed, it is read into field :2. 1.3.4 TS8 and TSaII TS8 and T~;8I1 are the two sections of the resident Moni tor which are resident (always present) in fields 0 and I, respectively. The resident code is rE~sponsible for: a) Scheduling - The scheduler decides "i,,,ho uses the computer and vlhen. If the user types a command, the scheduler brinqs in SI. If more than one USE~r \vants a program to run, the scheduler distributes tim(~ to the users.. If th,erE~ is insufficient core for everyone to use at once, the scheduler swaps users to and fJ:'om the disk. ·b) UUO Handling - When the processor is in user mode, remembe that if a user executes any type of rOT, an HLT, or an OSR, The hardware does not execute the instruction, but causes an interrupt. The IO~r, HLT, or os:~ is called a UUO in thi· case.. The Monitor has the job of ::;irnulating the function of the UUO, and !?ossibly returning control to the user. By definition, resident UUOs are those which are handl~~d b' the code residing in fields 0 and 1. Non-resident TJljOs must be handled by calling in FIP. c) Inte:~rupt Handling - }\ll Ilo Interrupts must be isolated and handled by the Monitor. d) Keeping Time - Clock interrupts are counted and at certair. inte::va1s certain tasks must be performed. 1-5 5 System Programs Th )t'e are several programs run by a user to perform certain 'enJ.ent operations. For example: a) PUTR - Used to transfer information from any device to another device. This is the new program which replaces the programs PIP and COpy which were operated under the previous version of t:he Monitor. . b) BASIC - A major interactive compiler language. rrhe list of programs is e~densive and is covered in more detail' ~r • NUMBERS AND TE&~INOLOGY EduSystom 50 associates a number with each terminal. The :linal with device codes 03/04 is called, variously KOO, lir.Le 0, ,~ rtinal 0, or console O. In order to accomplish anything', a user To do this requires a 1 to 4- di9it terminal must 1I10g in". 1 ;0 nu.~er", ~lmpts to log in, the account number and password are given.. and a 0 to 4 character "passwOl~d". Wherl thE~ user If r are valid and if the system pennits logging in, the ~;ystem l.gns a "job number". When the user is through, ,a LOGOUT OJ: ) command is required. At this time his account is .c::harged the amount of time used. In this way system us'age can be : "'. ,.' Ltcred. Sometimes account numbers are split into two, separated by a corruna. .'i 2~digi~ numbers The first two digits are called the ect nt:nilier, and the last two digits are called the programmer Jer. "l"b~re Acr.c'..1~t 1, 2 is the same as 3.ccount 0102. are three per:nanent:ly defined account numbers.. Account 1. '.t :)ngs to the system manager. 1-6 Anyone logged in under· aCCOlln.t 1 ha~ certain priveleges no other person has, such as defining account numbers and their passwords. under account 1 could be detrim(~ntal belongs to the system librarian. ot111~~r However, doing ce:r-tain things to the system. Account:2 The common programs are stored under account 2, and any user can access the::n there. Account 3 belongs to the 'system operator 'Nho has certain privileges which are not as detrimental as those granted to account 1. 1.5 SYSTEM CONVENTIONS The disk is divided into tracks. (4096 words) of disk storage. One track is defined as 4K (Two revolutions of an RF08, revolutions of a DF32D, eight r,evolutions of a DF32.) four Thus, track refers to the first 4096 words of storage on the RF08 or DF32. One Segment is defined as two pages, 400 (octal) or 256 (decimal) words of disk storage. All disk files are measured in segments. Unless otherwise noted, all commands and responses typed by the user should be terminated with a carriage return. 1-7 (I BUILDING EDUSYSTEM 50 FROM PAPER TAPE 2.1 BUILDING EDUSYSTEM 50 Building an EduSystem 50 softwarle system is a,:!complshed in four phases. I)' Loading and initializing the Monitor . II) Building the system program library. III) IV) DE~fining account numbers, passwords and quotas. Dumping the newly built system to DECtape. Phase I requires the four custom-made Monitor paper tapes (SII FIP,INIT, and TS8) plus the binary paper tape for PUTR. These paper tapes will be loaded onto the system disk after which a number of questions will be asked. Phase II is accomplished with the Edusystem 50 software running. The system library is built in one of three ways, depending upon which medium E;ystem library programs are distributed on. If the library is distributed on DECtape, this step requires the library DEctape. If 1:he library is distributed on an RKO 5 cartridge, this step requires the library cartridge. If the library is distributed on paper tapes,·this step requires the library paper tapes. Phase III is also done' while t:he EduSystem--50 Monitor is in operation and uses the program LOGID to define user account~-:::. Phase IV applies only to systerns which include DECtape.. accomplished. by running EduSys~tem 50 INIT" . If.:. LS ff 2 "2 BUILD PROCEDURE I. LOADING AND INITIALIZATION 1. Turn computer.power key to POWER (ON} 2. Turn the conole terminal ON (LINE or REMOTE). 3. Turn high speed reader ON 4. Lower, then raise the HALT switch. NOTE: On PDP-H/I, to 'LOWEH' a switch means press the top of the switcn in, 'RAISE' means push t:..tll_' bottom of the switch in~ . Raise the SING STEP switch. Lower the DATA FIELD and INSTRUCTION FIELD switc~es if included on yo~r computer (PDP-8 and PDP-8/l) .. -r:: 6. Press the CLEAR switch, PDP-8/I) . ?_l (not present on POP-8 or For each step in the table, place each of the console switches numbered 0 to 11 eit:her in the up position if the corresponding table entr~r is I, or in the down position if the correspondin9 table entry is O. When all 12 switches have been set~ to corrE!spoIld to a line in the table I follow the inst:ructions in t:he right hand column and proceed to the next line. The tables also include octal values of the binary switch settings for the benefit of users familiar with oct.al numbers. Tobie 2-1 RIM Looder Program (High-speed version) , t(~p • I Or. t .) 1 5101i tr:-h WAil VJIu{';. Setting - - find Iht'n 012 345 67R 91011 0000 000 000 000 000 pre!':s eXTn i\OO H LOAD 2 7756 111 111 101 110 prCS5 J\DDH ) 6032 110 000 all 010 lift o~r DE? key LOAi key 4 60JI 110 000 all Oat 1if t 5 5Y.i7 101 all 101 III lift OET' key 6 6016 110 000 011 110 lift ocr key 7 71% 111 001 000' 110 Ii ft DEP Poe)' lift Dr.P key H 700& III 000 000 110 9 7510 111 101 001 000 l i ft OCI' y.er 10 5J57 101 all 101 III 1 if t 11 7006 111 000 000 ltD bet Drp 12 603l 110 000 all 001 1 if t 13 5367 101 Olt 110 111 lift nET' key 14 6034 110 000 011 IOO lift IS 74 20 111 100 010 000 l i ft DEI' key 1& 17 )776 011 110 lift DEP key 011 III all 111 3J76 111 110 I i ft '(Jr.r key IB 5JSG 101 all 101 HO l i ( t DCP Icc-y ocr kCf k~y DEI' key Dcr kcy TUM LOADeR FOR IIlGII-Srr.[:o READER Step Or.l.JI I V.llul"s S.... i tch - Setling : I I . 1 I ! SUf - lind Then 012 3 .. 5 678 91011 1 0000 000 000 000 000 pre:;!> EXTO II.OOH 2 7756 III 111 101 110 pre~;5 AODR LOAI.) lift -Dr:P key 3 6tJ14 liO 000 {JOl 100 4 6011 110 000 001 001 lift; orr key S 5J')7 101 011 101 111 Ii f t. DEP key 6 6C H, 110 000 001 110 li r l 7 710G III 001 000 110 1 it t DEJ'I 110 1j rt or-.r kr.y or.r key I 111 I 000 "7510 III 101 5] 74 101 all 11 7006 III 000 12 6011 110 000 8 I 71)0 {, 9 10 I I 000 I DE? key Ic~y 001 000 lift 111 100 . l i tt ot:P k<'y 000 110 II ft 001 001 l i f t DF.P key DI;;P key 13 J J (, 7 101 all 110 111 lift OEP key 14 6016 110 000 001 110 lift DEP key 15 7 ·120 111 100 010 000 lift DF.P key 16 3776 011 111 III 110 lift OEP kc-y 17 3 )7 Ii 011 all 111 110 Ii [ t OEP key 19 5)7 lot 011 101 111 lilt OEP key LO.\O After RIM has been loaded, it is good programmi:"!g practice to verify that all instructions were stored properly. This can be done by performing the steps illustrated in Figure 2-3 ( PRESS CLEAR , r SET ROTARY SELECTOR : ] I 1 I DOWN I U'T ALL PRESS EXTD SET SWITCHES TO 7756 PRESS ADDR t LOAD Si~ITCHES 1 ADDR LOAD , i~l- DC'WN l l '-I ! , ----"',-----+ l )D~ ~;RRECT _ J NEXT INSTRUCTION LIFT, DEP ADDR ~;SS EX",,! SET SWITCHES=: L ----~ LOAD 1,_".;;;L;;;..IF_T-.,..-O_E_P_ _ _ I 7756 I~::SS -I j j SET SWITCHES- SET SWITCHES= FIRST INSTRUCT IO~ ,: I SET ROTARY INDICATOR SWITCH TO MD SWITCH TO MD. SET ALL SWITCHES :~ I PRESS CLEAR ] ~~T~UCTIO ISET~ IPRES~ LO~~~ I , I. SET SR=CORRECTl INSTRUCTION I ,--,-1___ tPRESS__O_E_P____~------~ Figure 2-3 Checking the RIM Loa~e~ (~ 12. After the RIM loader has been deposited and checked, raise S\V itches 0, l, 2,3,4, 5,6,8,9, and 10: lower swi tcI:.es 7 and 11; then press ADDR LOAD. '1'1'1- l' t l' 1i't1' 1'1' J.; \ (3.. 7 "7 ,jb 13. Press the CLEAR switch: then press the CONT swit:ch. If your PDP-8 has no CLEAR switch press the START swit:ch. (figure E-5 on next page) 2-5 SET ALL ---1 S\HTCI1ES pOWN. ---1I ,-----, t P:'E~C. l\DDR !/)i.D_ _ TUR17 [HGII SPEED LOW S['EEl) r;:~ADER READeR .---------- Il~ READEn~ ~' [PLAce IIITI IN H~.~._J _~r'----~r~ ____________________~ -2~ ~;~~ .~ ) yes <$~~ "",,/' 1 YES (~.~ ~~~V ~ 14. If the paper tape fails to reac. in at this point go back to step 1. 15. When the ,paper tape stops the message: 16. wili be printed on the console. occur, go back to step 1. If this does not Type BUILD followed by a RETURN. The system prints: BUILD? Eespond YES, followed by a RETURN, some terminals). 17. (labeled CR on The system prints: SI t Place the paper tape lSI' in the reader and type a FETURN. The tape will read in. If an error occurs \\'hile reading a tape, the wrong tape was loaded the system will print: TAPE READ ERROH PLEASE TRY AGAIN 51 t OR PL.EASE TRY AGAIN 5I , In either case, reload the requested tape ('SI' in t.his example) and type a RETURN . 18. ]~fter successfully reading '81' the system wi -~ :i. request the paper tape 'FIP' be placed in the reader and the RETURN key typed, exactly as whO:1 loading the 'SI' tape. 19. Next the - tape 'INIT·' will be requested. ~;ame tape which was previously loaded. -20. Next the tape 'TS8' will be requested. 21. Lastly the tape 'PUTR' will be requested. This is the If all Monitor subprograms have been loaded without difficulty, the printout on the console will appear as shown below. LOAD .. DUMP .. BUILD? YES 51 FIP t t INIT T58 PUTR t t • STj~RT 6 ETC? BUILD 22. Next the syatem will print: ~EW , LOGIN MESSAGE? The reply should be &ES or NO ,"depending on wheth! yo)t 'want to have a me~p.ge printed on each console: w~hever it is logged in'~'\'1~\The message may be a ' greeting, caution, special instruction~ or any thin else you desire as long as the message has no more than 127 ch~acters. Each RETURN counts as two characters. ' qm;~, If the reply is NO the system will prirl1: its next qu,ry, (go to step 23). However, if the reply is: YE~ the system will print: END WITH AL TMODlt: and position the console paper so that your messag can be typed on the next line.' After t:yping the. ,:. message, you should end by typing the l~T MODE ke~ (ALT MODE is labeled ESC on some terminals.) Thei printout and an example message would appear as'" shown below. NEW LOGIN MESSAGE? YES END WITH ALTMODE CONGRATULATIONS. YOU ARE NOW ON-LINE WITH EDUSY~ REPORT ANY PROBLEMS BY RUNN.tNG· "GRIPE".S When typing the ALT MODE key .at the end of the me~, a dollar sign ($) will be printed as shown above; 23. The system asks: LOAD EXEC DDT AT START-UP? Respond NO, followed by RETURN. 24. The next query asks you to :,specify ,the nurnbE~r of' core fields avail'able for user programf::. T~t'pe a number which is two less than the numbE!r of 4K fie]. on the system, then type a RETURN. If the system] 4 fields (16K of core) for:'f~x~mple I the response ,~ be 2 as below_I.# 25. USER FIELDS- 2 The system asks whether the CTRL/S feature is des~ This feature, which allows terminal output to be stopped by typing CTRL/S and restarted by typing '. CTR~I Q, l.5 part".icu:'arly ~seful en -J'i'':'ec te=:nil1als such as the VT05 and VTSO. Respond YES or NO? fo~ by a RETURN. ENABLE tS FEATURE? YES 2-7 26. Next, the power frequency may be requE~sted. I f the power is 60 Hertz (normal in North America) respond YES; if not, respond NO, then type a HETURN. 60 HERTZ POWER? YES 27. The syst:em asks whether 1:he system disk should be zeroed. Respond YES, followed by a RETURN. ijAfTE-ZERO SYSTEM DIRECTORY? YES , 28. Three passwords are requE~sted, for accounts l, 2, and 3. Enter these passwords, which may each be up to four characters long, followE~d by a RETURN. ( SYSTEM PASSWORD? SYST ~ d 29. LIBRARY ,PASSWORD? LIBR OPERATOR· PASSWORD? OPER The que!3tion "LOAD, DUMP " START, ETC?'? is again printed. This time respond START followed by a II RETURN. LOAD. DUMP. START. ETC? START 30. When reg:uested enter the current month, day, and year separated by hyphens followed by RETURN. MONTH-DAY-YEARs 1-23-75 31. Next type the time of day expressed in military time using a 24-hour clock. Separate the hour and minutE~s with a colon. For example, 9:45 a.m. is entered 9 : 4 5, 1: 3 0 p. m . is 13: 3 0, 9: 4 5 p. m . i :3 2 1 : 4 5 . HRIMIN - 13118 No additional questions will be asked after the time has been entered. This completes Phase I of the building process. Your printout to this point might appear as follows: LOAD. DUMP. BUILD? YES 51 START~ ETC? BUILD" t YIP t I NI T TS8 t t PUTR t NEW LOGIN MgSSAGE? YES END WITH ALTMODE CONGRATULATIONS. YOU ARE NOW ON·-LINE WITH EDUSYSTEM-S0. R~ORT ANY PROBLEMS BY RUNNING nGHIPE".S LOAD EXEC DDT AT START-UP? NO # USER FIELDS ... 2 ENABLE IS FEATURE? YES 60 HERTZ POWER? YES WRITE ZERO SYSTEM DIRECTORY? YES SYSTEM PASSWORD? SYST LIBRARY PASSWORD? LIBR OPERATOR PASSWORD? OPER LOAD~ DUMP, START# ETC? STARr MONTH-DAY-YEARI 1-23-75 HRIMIN - 13s18 After entering the time of day and terminating the line wi th the RETURN key, control,'is trannfered ' to the Edusystem-50 monitor. ' The system is now on-line and ready to operate. HO'f/ever, there j:lre no' programs in the system library. II. BUILDING THE SYSTEM LIBRARY Building up the system library is done while the system is on-line, i.e., operatiorlal and running. 1. LOGIN with the system library account number and password. Type LOGIN 2 LIBR re9lacinq LIBR with the password for the library account. 'I'erminate thJ.s iLOGIN conunand wi th th~ RETURN key. The command LOGIN and account number and paBsword will not echo (print) on the console paper. , 2-9 , \1 , Wrhen the LOGIN is accomplished, Moni tor prints t.he version number of the Edusystl2m-50 Moni tor being used, the job number assign l 2d by the Moni tor, the account number of the job, the number of the console being used, and the current time of day. The login message is printed next, followed by Monitor's dot indicating that the building session has been successful to this point. For Example: 13: 18110 CONGRATULATIONS. YOU ARE NOW ON·LJNE WITH EDUSYSTEM-50. REPORT ANY PROBLEMS I~Y RUNNI NG "GEl PE". Type "START 0" follo\Oled by a RETUHN. This starts the program PUTR which was loaded during the build process. PUTR prints as asterisk, indicating that it is ready to accept a ccmrnand. • START E• • At 'this time, one of three procedures must be followed depending upon whether tt~e library programs .. are suppl ied on paper tapes, Decta.pes, or RKO 5 disk. If the library is on paper tapes, follow the step; in section A) below. If the library is on DECt~pe, follow the steps in section B), and if the library is on RK05 disk, follow the steps in sec~_-_:icn C) • A) The following steps are used to build the system library from paper tapes. First the system programs will be loaded, (those labelled "name.SAV", eg BASIC.SAV) 1) Load the paper tape labeled LOGOUT.SAV in the high speed reader. In response to the * which PUTR has printed, type: COPY LOUOUT.SAV-PTRllSAV and terminate the line with a RETU~~. PUTR will print "t". Respond by typing a RETURN. PUtrR will print "NONA.."1E. ", reac! the tape, and then print another * ~' , "', 2) Step 1 should now be repeated for any other tI.SAV" tapes to be loaded, substituting the name of the tape for "LOGOUT" in the COPY' command. Fer example, if the tapes LOGID.SAV, BASIC.SAV, SYSTAT.SAV and PUTR2.SAV are loaded, the printout would appear as follows: *COpy LOGID.SAV-PTRI/SAV , NONAME. , *COPY BASIC.SAV-PTRI/SAV NONAME. *COpy SYSTAT.SAV=PTR"SAV t NONAME. *COpy PUTR2.SAV=PTRI/SAV t NONAME. As a minimum include at least LOGID.SAV, :LOGOUT. SAV and PUTR2. SAV. 3) When all the desired ". SAV tI tape!:; have been loaded type EXIT in responsE~ to the asterisk, followed by a RETURN. 4) Next type It R PUTR2" in response 1:0 the period the Monitor has printed at: the left margin. PUTR2 will print an asterisk. The printout should appear as follows: *EXIT 'BS .R PUTR2 ( ) • 5) If BASIC is loaded and it is desired to load some of the BASIC demonstra1:ion programs, ("name.BAS") load the desired tape into the reader and type, for example: COpy FTBALL.BAS/BAS=PTR1 replacing FTBALL wi1:h the name on the tape. PUTR will respond as it did in S·tep 1. 2-11 6) If it is desired to load any ASCII paper tapes, (Ifname.ASC") load the desired tape into the reader and type, for example: COpy WDGAME.ASC/TSB=PTRI replacing' WDGAME with the name on the tape. PUTR will respcnd as it did in Step 1. Focal tapes ("name.peL") must be loaded from the -terminal us in3' FOCAL. 7) When all tapes have been loaded type EXIT in response to the asterisk printed by - 'PUTR followed by a RETURN. 8) Next type LOGOUT in response to the period the Monitor has printed at the left margin. This completes phase two of the building process. Now go to Phase III. B) The following steps are used to build the system library from the li.brary DEC.tape~. 1) Mount the library DECtape on unit 1, (see chapter 4 Introduction to Prog'ramming for complete instruction> and writelock the unit. In response to the * printed by PU~rR, type the following comman.d line: COpy .·D1. This command requests that all files on DECtape unit 1 be transferred to the system disk. As each file is transferred, PUTR will type its name. When finished, PUTR will type another *. 2) In response to the *, type EXIT. 3) Next type "R PUTR2 It in response to ,the period the Monitor has printed at the left margin. PUTR2 will print an asterisk. The printout for this step should appear as follows: *EXIT 'BS .R PUTR2 • 4} In response to the asterisk, type EXIT, followed by a RETURN. 5) Next type LOGOUT in response to the period that the Monitor has printed at the left margin. This completes phase t~IO 'of the building process. Now go to Phase III. 2-13 C) rr'he following steps are used to build the system library from the library 1) RK~5 cartridge. Mount the library cartridge in unit~, and writelock the unit. In response to the * printed by PU'rR, type the following command line: COpy .-RKA81 This instructs PUTR to copy all programs from the first half of the cartridge to the system library. As each file is transferred, PUTR will type its name. When finished, PUTR will type another *. (The second half of the cartridge ,is a duplicate of the first half. To use this 'second half, substitute RKB}3 for RKM.) 2) In response to the *, type E or EXIT. 3) Next type "R PUTR2" in response to the period the Monitor has printed at the left margin. PUTR2 will print an asterisk. The printout for this step should appear as follows: *EXIT '85 .R PUTR2 • 4) In response to the asterisk type EXIT, followed by a RETURN 5) Next type LOGOUT in response to the period that the Monitor has printed at the left margin. This completes phase two of the building process. Now go to Phase III. III. Defining Account Numbers, Passwords and Quotas. Users should never operate under accounts 1,2, or :!, ·~herefora it is necessary to define additional account..:s. J\ccG..tnts can only be created by the sys"t;€m manager~ someone loSrqed in under" account number one. Each account is actually ':\-JO lll.!l.mbers, a ~ project number and a programmer number. ACCOWlt numbor 5440 is actually projec·t number 54, programmer numb(=r 40., p.ccount,,; number 102 is project number 1, programmer number 2., Users. may specify that all other users may share their filt"~G, only .'.~ users whose proj ect number is the' samE=, or no otheJ:" users' at all. See the Protect command in Appendix n fo:~ de i:a.ils. . In. . defining new account numbers it' is us(~ful to g::-oup U.sers into "~I, proj ects, giving them account numbers which ha'le a (:cmmon project number. " i "t' ,1 As each account is defined the system manager .3.lso C!etermines . : the maximmn number of disk segments that the a,~count: may own~' rrhis is the quota for the account and is defin =d in n~ultiples' of tVlenty-five (25) segments; a minimum of ~. s.=gment.A to a'. .\ maximum of 1575.For nonnal use 50 - 100 segmen:s will suffice,,') rrhe system manager also defines anothE~r parame ter knO\Vl'l. as the '; Grace Quota I I . This parameter applies equally to all accounts.; Tlle "Grace Quota defines the number of segments ea(~h account m:ly exceed its quota by for purposes of comple ting q program " run. When an account s quota ,has been exceed the mC)llit.or will ;. not allow any new files to be Created for that accot: it, howeVer: any files already belonging to the ac(~ount may be (~}~f'ended ·in ~' lenth until the "Grace Quota" has been reached. At: t:he time t}· system passwords for accounts 1,2 and 3 '\vcre defineq tho tfGrac(!"-,' Quota" was automatically set to l~ seqments an:1 the quotas for; accounts2 and 3 were set to maximum. 1/ ll I Passwords at:ld quotas, including the "Grace Quota", nay be changed. at any time by the system manag(~r· and Nill take effect' immediately. Account numbers cann~t be chanq85 .. hovrever accoUl1i may be deleted, provided the account. is not being ij~ed.. f LOGID is the program used to creat.e the, user account!:; and modi~'. passwords and quotas. Since ,it, ,can ol11y' be used by the system~: manager the next step requires that a console be logged in', '~ under accoun t 1. The following responces shou l.d bl:; terminated \'~i, wi th the RETlJRL"J key. ,1. ) , Type: :' LOGIN 1 SYST .! replacing SYST wi th the system password given <luring phasel I step 28. The LOGIN command will not print OIl the terminal. 2~)Next LOGID must be called by typing: .R LOGID LOGID prints opening instructions, 2-15 and then asks: • ~LEAS~EUTER , "t' 'I' DISH: QUOTA: ,L &'lter a numberwhid'h;i.s. a multiple of 25 Ut-1575). 'Inis . uw.ther will te used. as ~he disk quota for the account-.s defined or en anged 'from this paint on. ,t-OGID now prints ana~ter~sk and waits for an account ,nUll'ber, pass\\'Ord comb~nat~on separated by one space.. EQch '41CcQunt number can be ,from 1 to 4 octal disrits (no 8's or '~'s). Each r:a~;sworcl is ',made up of a maxim'um of 4 charac~tJ'rn (a;tl printable characters are legal).. A maximum 0 f 111 'different accounts may be defined, (1.0'8 usc~r account:r; pln~':; . the 3 system accounts,>. : 'Ivping CTRL/C causes' LOGID to ask for the disk quota again .. ''Ih~refore a numbe~ of, accounts can be entered using onc~ qnot-:a 'end 'then typinqCTRIJI,C allows· a new quota to be entl-:red fo!:: 'tbe next group ~f accounts \'lhich are defin2d. cialogue might appear· as, follows: .;' TSS8. 24, JOB: ¢l (Ji¢ I f1l) K04 . An example 13: 3.0 :0'8 \ 1 " .R I.sOGID , TSS8 i\CCOUNT MAIN'TENANCE -*ACC' T # <SPACE~ PASSWORD (RETURN TO CRFATE/CITl\NCE, AIJTMODE TO DELETE> PLEASE ENTER DISK QUOTA: 1,0'0' 1.0' DEMO 'I: * 732 TOUR ,*'1215 JOHN * 1066 HARD * . l¢yj~ O'rTO * PLEASE ENTER DISK QUOTA: 75 1105 DEeM '1: * the, password or di~jk quota for an account, type tr:c~ number and .old password as above, followed by a R~':1'UH~1. TJ)GID vlill ask for a new password. Enter the new passvrord '~rHi . t.vpe RETURN .. ' I f , only the quota is being changed simply t.Yr~c tl1e RETURN key, no new password need be e::1tcred. In ei ttk~l~ .case the quota last entered into LOGID \ViII bA appli8d t:o i~:;(· "account. For example: <, 1'~ change ~ccount .. ,. 1066 HARO CHANGE PASSWORD TO: D%8N PLEASE ENTER DISK QUOTA: :$ 732 TCUR CHANGE PASSWORD TOI • 10 DEMO 150 CHANGE PASSt:al0RD TO: PLAY ' 2·-1h .~ The disk quota does not apply to account 1;.. However, whenever the system manager' spassvlord is changed LOGID vlill request that the 1YGrace Quota" ,b19 entered. F,)r example: • 1 SYST CHANGE PASSWORD TO, MNGR GRACE: 29 • To change both password and If Grace Quota" or simply: • 1 MNGR CHANGE PASSWORD TOI GRACEI • 18 to retain the current password but change the If Grace Quota"", To delete an account type the account number and passvJord a~:; above but instead of typing the RETURN key, type t::1e Al tmodc!, (ESC) dey_ If the account is not being used all files , belonging to the a.ccount will be dele'ted, ther, the aCCOlli"1t v,T~; be deleted. When the account has been completely deleted thQ message: $ DELETED will be printed to the right of the password clS below: * 1215 JOHN S DELETED • tmen all desired a.ccounts have been defined, 'type CTRL/B followed by S and RETURN. • tBS • In order to create a listing of the -accounts ':hat have been entered the program CAT should be run as belo~li: .R GAT 10 z 18: 0'~ 26:"FEE-75 SYSTEM ACCOUNT, DISK QUOTA PASSWORD CPU DEV 00200100 1 2 3 10 PLAY 732 TOUR 00111:05 00100100 00:00:00 00:~1'10 01:36125 00:00:00. 00:00300 1 0 6 6 D 5! 8 N 00:00:0~"00:00:00 00 z 013 : 0 (21 .:,' ,00: 0 eJ i 00 ' 1000 00:00:00 OT~O 00:00:00 1 105 DEC!"___ 00_:_0.0_=_0.0__ 00}~0.0J1~09''-I L ' RESET: YES 12 373 41 o o 18 (GRAC~ 1575 15"5 150 l~O o o '/5 100 " ,r"",5 '55 The RESET function causes the CPU and DEVICE time accumulato~J for all accounts to be set to zero. ;Running CAT by typing CAT: R will cause CAT to skip its listing phase and immediat,::l' ask RESET? 2-17 ........ ",. , • LOGOt),1 To complete phase III of th.9 Build process type LOGOUT in responsE~ to ,the dot monitor has printed at the left margin .. JOB I. tJ5l!:'R C 0., 1] LOGGE:n OFF K00 AT 101 181 57 ON 26 F'ES 75 RUNTIME e0:00:01 ( 0. CPU UNITS) ELAPSED lIME 0010~a24 This completes phase III. If the system configuration includes DEctape ccntinue with phase IV, otherwise this concludes the BUILDING process~ EDUsystem-SO is ready to use. Dumping the System To DECtape To dump the newly completed system onto DECtape, restart INIT. as follows: Lower, then Raise the HALT (STOP) switch. 1.) Raise switches ¢ and 4~ lower switches 1,2,3,5,6,7,8 9,10, and 11. (The s¥litches a're now set equivalent to 4200 octal, the nonnal re-:-start address for Edusystem-50.) 2. ) J.) pressADDR LOAD, then EXTD ADDR LOhD, then CLEAR, then CONT. (PDP-8 and PDP--8/1 press ADDR LOAD, then START .. ) 4. ) INIT will print the m(~ssage: LOAD. DUMP, START. ETC? HOTE: For simplicity, these instructions assume a system two DECtapes. For other the general instructions in Section B. wi1~ one disk and at least sy~;tem configurations, see N'ext mount DECtapes on units 1 and 2. Then set units 1 ,and·2 to WRITE ENABLE (see chapter 4 Introduction to programming for complete instructions).. Then type DUMP. INIT will copy an image of the entire system onto ele DECtapes. When IN IT again prints: LOAD. DUMP" !;TART. ETC? the entire system has been copied. Remove the DECtapes and write some identification on the DECtape spools before filing them. ~ro make the system available for use again, respond by typing START and complete the system startup procedure. (As in phase I steps 29 throught 31) 9. G~=neral Instructions for Dumping Disks to DECtape rhe contents of an RS08 disi< (256L< words) wi':;"':" noc (Ii..4it:l.~ fit (,n a single DECtape (190K words). Part of a second tape is required. In general: Disks 1 2 3 DEctapes 2 3 5 Thus, for a one-disk system, the LOAD ancl DUMP process requires two tapes. Loading and dumping always proceeds as follows: The DECtape selected as unit one (1) is us ed firs t , then DECtape 2, then., if neCES sary , unit s 3,4,5, and 6. If the system includes as many DECtape drives as are indicated in the tuble above, sE~tting up for a LOAD or DUMP is very simple. Select consecutive units, starting with unit 1 and mount the appropriate DECtapes. Thee LOAD or DUMP routine will access them in order. If there are not as many tape units as there are DECtapes to be loaded or dumped, it is necessary t:> USE~ them more than once. The LOAD and DUMP routines work a~: follows: they use DECtape 1, then look for DECtape 2. If they find it available (i.e., a DECtape unit h3.s been selected as unit 2) the transfer continues on this unit. Then, if a third DECtape is needed, the routine,:; lock for unit 3. If at any point a unit is sought but not found, the routines wait for it to be selected. The::-efore, it is possible to load the first tape of the sY:3tem on unit one, dismount the tape, place the second ~:ape on the same DECtape unit, switch it to unit two, and have the load continue automatically at that point.. The following procedure will dump the contents of two d:_sks on a system with two DECtape drives. (Assume that the system has just typed out LOAD, DUMP, START, ETC?) Firs~: set the DECtapes to un.its 1 and 2 and write enablE~. Mount two scratch tapes on these units labeled TAPE ONE and TAPE TWO. Now tYPE! DUMP. The system vliI1 completely write DECtape 1, the:n automatically go on to DECtape 2. ' After the tape on unit 1 has re-wound, diEmoun't it and mount a third DECtape on this unit, labele:d TAPE THREE set the unit select to three, and then as the last step, switch the unit to REMOTE. There is no need to; hurry. If unit 3 is not ready wh!::n it is: needed, the, system will wait for it. The same procedure i:3 followed for a LOAD. This same general procedure is followed for any system where there are not enough DECtapes to select 1:hem all simultaneously. When INIT again prints: LOAD~ DUMP, START. ETC? the entire system has been copied .., Remove the DECtapes from the spindles and write some identification on the DECtape spools before filing them. To mak(3 the system 2,'7ailable for use 3.gain, respond by typing STAHT and complete the system startup procedure. (As in phclse I steps 29 through 31.) 2-19 CH1~PTER 3 PATCHING EDUSYSTEM 50 ':1V3 information in this chapter is not necessary to operate ::Jusystem 50. .Most ~ys~em manaCJers will USE~ the Edusystem 50 · t:ottwar e exactly as l. t 1.S suppl1.ed. Other users, however, will · ~.l:1t to make. minor modificat~ons or, in som(~ instances, major syster \;:~~nges. Th1.s chapter descrl.bE~s the tools available for making suc} (..:.,:,~nges • ).1. .r·10DIFYING SYSTEM LIBRARY PROGRAMS ~~J.1ifying. syst~m library programs is an on-liz;e process. Users who fami1l.ar Wl. th Edusystem 50' s advanced Monl. tor commands \01i11 fin( simple procedure. Log in with the library password, load the ~',:cgram into core, deposit the patches, then save the program again. ' 1 .... 0 it'""a ~ , · ;:'ar example, a user may wish to modify EDIT so that it considers ev( ,;!xth character p,?sition to be a tab stop. 'l'he process is as follo\ the 1970 verSl.on of Edusystem 50 EDIT: :0.' .LOAD EDIT • DEP OS IT 2 -6 .SAVE EDIT e. . rr is now changed on the disk. If the system includes DECtape, i:"':'.p the whol~ system so that t:he changed version is stored on the :jac~~UP tape. ~""ced punch, If the system dOE~s not include DECtape, but has a hig1 a new SAVE fonnat paper tape should be punched wi th ~~L'T~. otherwise, the change must be made every time the syst:em is ·~uilt. oth,er system library programs may be modified in a similar ~anner. ?2 HODIFYING EDUSYSTEM 50 ';... Formal procedure exists for making patches to the Moni tor.. In · c"'der to understand this procedure, it is necessary to understand Edusyst(~m 50 is stored on t:he disk. ThE~ five pieces of · .''"'nitor (SI,FIP, INIT, TS8, TSBII) are kept on the first 20K of ~;~ disk. 'rheir respective disk addresses are: t;'A SI FIP IN IT TS8 TS8II "'1~""ough th'e third r\ .. ~1 ''''':I~e UD of several 00000-07777 10000-17777 20000-27777 30000-37777 40000-47777 section is referred to as INIT, it isactual1v / programs, including the ~['ss 8 initialize~~, a ~;bugging routine ~XDJ?T)' and a disk patch :::-outine (DISKLOOK). To ::atch the system, l.t l.S necessary to bring 1:hese routines into ~ore. To do so, stop the SyStE:ml and then S1:art it at 4200. INIT is brought in and prints LOAD, DUMP, START, the layout of core and disk is as follows: Highest Core Field 1 INIT E~C?? At this poini SWAP and FILE AREA .1 ,"'-'" TS8II Field 1 Field 0 TS8 Core Storage IN1T FIP S1 DISI< STOHAGE Starting at 4200 always brings INIT (plus XDLT and DISKLOOK) into the highest core field in the system. Thus, it comes into differer fields for different systems. There are now two options for patching the system: either patch t}, disk using an overlay tape created with an assembler such as PALD, or manually inspect and change individual words using DISKLOOK. 3.2.1 Patching Edusystem 50 Monitor with an Overlay Tape. Tl"te overlay tape is created by writing and assem1:1ing a PALO program. The first item on. the tape should be a field setting for the track number where the patch is to be made. The second item is an origin for the desired address within the field. Then include the data for the words to be altered. For example, to change wo:rrds 6 and 7 of SI and FIP to 6213 and 5407, use the following program: TO .51 FIELD 0 /PATC~ *6 6213J540-' /STARl AT lL.OCATION 6 /DATA FOR 'L.OCATIONS 6 AND 7 IPATel:- TO FIP FIELD 1 *6 6213J5407 S Assemble using PALD, and punch out .the binary tape. may find this patch helpful.} (XDDT users Load the overlay tape into the paper tape reader. In response to INIT' s "LOAD, DUMP, START, ETC??" message answ~~r OVERLAY or simply cl.. When the tape has been read, the patching is finishe(: If there was a checkstUn error, a message "TAPE RE2\D ERROR". will orinted. The data previous to the most recent field setting w'i~ have been written on the disk and thus maybe inc()rrect.~ \. 3-2 3_2.2 Patching Edusystem 50 Using DISKLOOK - When IN IT comes in, it. prints ]WAD" DUMP, ~TART, ETC?? To sta.rt the patching proce~~;J,re, type PATCH, or sllUp1y P. orSKLOOK.i!3 now,running, allow'i~g the us 7r to examit;e, and modify reg..~sters. To exam~ne a re~~s ter , type ~ t s addres s (in .;,:;,ctal) foll~rl ny a co~on. DISKLOOK pr~nts the present content of ~\".,:l.t regis1:er on the d~sk and waits for a new value to be typed. !~t9r the new value by typing 1 to 4 octal digits. Type the RETURN k"',,~r to close the line. If a register has been opened' but does not r:~'~d changing, type the RETURN key. To automatically open the next r;i~:~i.!ential regi~ter, typ~ the LINE FEED key instead of RE:I'URN. ;e:::~',ernber that d~sk locat~ons are actually 7-digit addresses. For (':;c:.."Uple, l()c~tion 2~04 in TS8 is stored in disk location 32104. r,,ccation 10 ~n FIP ~s 10010, etc. ,f$it~gle d~sk l;1;,e:l all dE~sired patche's are made, r",,"l type CRTL/C to return to INIT. e!(aIDple of the usage of DISKLOOK: LOAD.. DUMP.. STJ!~RT.. ETC? P 5317 7604 1 ~~20 6637 6051 6441 4"2121 6061 6451 4"220: 4~~3061 ~-'( 6ll00t (CTRL/C typed by LOAD .. DUMP .. STJffiT .. ETC? to,catio n 2306 in TS8II is changed from a JMP to a LAS. Thi s ""hange allows the system manager to examine selected Moni tor regist ! enteri n 9 a'l address in the switches. If this patch is made, 1'.eer'pro-grams may not use EAE Instructions. The pointer in locatic of SI iE) '~hanged to poin~ to an error. return. This pa tch : "fuables--the- 'rALK Command. F~nally, 1ocat~ons 0212 and 0220 of I by \. 6100 :::,58II are changed. This patch changes the device code of a termina ;"10:1\ 44, 4~) to 05, 06. (Note the exact locations may di f fer in ~~ture Monito:~s. These examples are for illustrations only.) ""1 changes to Monitor are made on the disk. Starting the system t;ing s TS8 and TS8II into core from the disk, 5I and FIP arc. , f"!'~{apoed in by the system as needed, and INIT reads itself from the : eisk"before i-: doe~ any important operation. Ther 7fore,. any patche will become effect~ve at the next startup and rema~n unt~l the syst is rebui1 t c. 1 (J';'lce patchE~d, the system should, of course, be dumped to DECtape ... ~ preserve the patches. Systems without r::ECtape must be repa tchec: ~ve'i:-y time thl=Y are bui 1 t. j.3 CONTROLLING MONITOR EXECUTION ~e }{DDT prog::am, which is always in core ~'i th INIT, is -, '~~eful for te:;ting any modifications to Mor..i tor. ver~/, , rhere are 1:wo ways to keep XDr:tT in core while the Monitor is in ~oeration. On systems with at, least 16K, initialize the system specifying onf~ fewer user field that normal. Then, insuring that INIT (with XDDT) is in the highest field, start the system.. The highest field will not be used by the Monitor, and XDDT will remain there. Another alternative for getting XDDT into core is tO'initialize the system, and answer "YES" to the ques·t:ion about loadir.g EXEC DDT. The result will be that when the sys1:em is started, XDDT will be placed into field 1 in an area nonnally used for free core. If EXEC DDT is loaded, the Monitor capacity will be restricted considerably, but otherwise will not be affected. Once Edusystem 50 is up with XDDT in core, the system must be ha1tt to start XDDT. Press the HALT key. If the E~=O and the MA=5200, fine. If not, press CaNT and try aga.in. Never attempt to halt the system if any I/O is in progress. Once t",ie system has: been halted at 5200 (this is the null job), restart the system at 7000: in the field of XDDT. XDDT may now be used tl) examine registers, :1 set a breakpoint, etc. Infonnation on the op(~ration of XDDT is available from DECUS, order number 8-127. To restart the Monitor ~after being halted at 5200, start at 4201. (XDDT, type 0#4201 '). I Type CTRL/C to return to INIT from XDDT. 3-4 LOAD, DUMP, START, ~~.1 ETC. USING IN IT HOW TO OBT1\.IN INIT l:iIT is the proqram which allows the user to load, dump or start the ~·'::3tem. WhenevE~r "LOAD, DUMP, START, ETC?" appears, INIT is avail-~":le. CTRL/C ma.y be typed at any time to return to the entry point: {,f INIT. ~''"I start INIT if it is already i.n core, start at 4200 of the field ;';'t)ce INIT is located. INIT can. be found at various times in t'i~ld 0, field 2, and the top field of the system. 1: the Monitor is' running, start. at 4200 of field o. TS8 includes ,":I ;JOotstrap sta:cting at 4200 to read in IN IT from track 2 of the ::sk to the highest field on the: system, and trans fer control to it. r;the Monitor .is on the disk, and the system has an EDU bootstrap, ;~t the SR to 5350 and press and raise the SW switch . • 1 ''''' ~~ the Monitor is on the disk and there is no EDU bootstrap, load ;~e following i::1to field 0, then start the computer at 7750. ~\ddress Contents 7750 7751 7752 7600 6603 7753 7754 5352 5752 6622 If the above me:tsures fail, use the rim or binary loader to load t1~e paper tape t') f INIT. INIT OPTIONS C?TL/C RESTART INIT Build TSS/8 from paper tapes. c Transfer 4K sections between the system disk and core. Dump the system disk to DECtape. Bootstrap to a DECtape on unit ! ¢. Initialize TSS/8 parameters. Bo()tstrap to RK8E unit !5. L Load the system disk from DECtape. Compare the contents of two core fields. I) _I 4-3 ~~ at any time, a drive is not ready, INIT waits for it. Just ~ >:,~~!t the drive when ready, and the tape will start. At the end "~: ~>1.ch tape, the tape will automa"tically rewind and unload. ;:;~::;;'i:e the tape, label it with the unit numbers, and save. I'!' ."!' ~ f LOADING THE SYSTEM FROM DECTAl'E ?\~ any time, the system may be restored to the state when the dump r,~ DEctape occu.rred. To do this, mount the dump tapes on the same ~;;:ltG they were 0::1, for the dump, g,et INIT, . and specify L for Load . .;,,? INITIALIZING THE SYSTEM . . ,!\)C~1ange an:f of ~he parameters' (except for passwords), defined tlme, get INIT, and specify I for INITIALIZE. One new ~GIN message, change the number of user fields, " t'<: Upon the quest~on "WRITE ZERO SYSTEM DIRECTORY?" answer no, .~ ~~'''~ll the files on the disk will be destroyed. If the LOGIN ~;~s:;age is the only parameter to be ~han~ed, a CTRL/C may be t:Tf.;d after the ALTMODE. The follo1;..,~ng 1S an example. ~t system bu~ld . X':~.v no\" enter a of LOAD. DUMP. START. ETC? I NEW LOGIN MESSAGE? Y ~ END WITH ALTMODE THIS IS THE LOGIN MESSAGE!! LOAD EXEC DDT AT START-U?? N 6 -,~, .I..' f~ (J c-' • USER FIELDS - 2 ENABLE tS FEATURE? S y Y 60 HERTZ POWER? Y Y c,...' ,( ]7,k;:'-v h-l'kL-'~:: .{. 5~..e f~' ~';''l WRITE ZERO SYSTEM DIRECTORY? N ••« 6 . USING TAPE READ OR WRITE f,J selected number of disk ::~:c,:ape. To do this, get tracks may be loaded from or dumped to INIT, and ~pecify T for TAPE. Specify LiJ~':~;::her to read the tape (l<:>ad th:~ d~sk) or write the tape (dump), 11:;~! how many tracks are des1red (J.n octal). The following is an ~};?..::; pIe. LOAD. DUMP~ START~ TAPE READ OR "~ ~. 1 ~iRITE ETC? T .. R ... 5 USING THE 4K DISK-CORE TRANSFER :\ .s~lected core field. may be read fr<?m or wri tten to the ?isk, "'0 or from any core fl.eld. To do th~s, get INIT and spec1. fy ;.c y "t.7'1.1e+-h·e1""..L.o ..... ~ad ()"- to ~~r~';""~ ';""1.... r1."c::'K .l-1.....=. :~-)1 ..~ '~"" SpPC-/Vi .. __ ..... IV ____ • e ;;~~;~: .. and -track number ~in c:'ctal). Type CRTL/C to terminate ,.~;s routine. The follow~ng ~s an example. ~on ~l 7 _ ~ ~ '-00 .l. ... LOAD. DUMP~ S'rART ~ READ OR WRITE - R FIELD NUMBER - 3 TRACK NUMBER - 5 ETC? C -" ~ , --,,~ - _ ' : . - ..... 4.8 READING A BINARY TAPE INIT contains a modified binary loader beginning at 7777 of th' field whe.!E INIT is. INIT' s binary loader automatically choose' low-speed or high-speed paper tape reader. If the device reac), responding, the loader times out in a few seconds, giving an error message. This is not a problem unless the tape is loadil. into the same field as INIT. If there is an error condition, l, results will be unpredictable. A binary tape may also be read by getting INIT, and specifying (Where n is the number of the field to ~hich the tape is to be read). If a field setting for field n is encountered it will; ignored. If any other field setting is encountered, the procC" willhalt with that field in tht~ AC. Press CONTinue to ignore :. For those using a PDP-8/E, set the data. field as desired and I?' CONTinue. . 4.9 ZEROING A FIELD To write a zero in every location in a field, get INIT, and tyy Zn, where n is the field number to be zeroed. 4.10 COMPARING FIELDS To compare the con ten ts of any ,-two field~3, get INIT and specit~ for Match. Then enter the two fields denired and the address t start at. Any differences betwE~en tre tvl0 fields will be print along with ~he address. The printing may be interrupted· by typin9 CTRL/C. The printin~ occur on the line printer if present and ready, or else on the terminal. If SRO is on, any mismatch with a zero on the first field specified will be ignored. Type C'IRL/C to halt printing. The following is an example •. DUMP~ START. ETC? M FIELD NUM8ER - eJ LOAD~ FIELD NUMBER • 2 START AT .. 0 4.11 DL~PING 0000 5401 0~)72 0001 0005 0442 4200 0477 0473 0~',44 5~l02 2477 CORE To dump the contents of core in octal, gE~t INIT I specify WI and then give the desired field and starting address. Each line print, wii.l. contain a core address and eight data words~ A g~p may be interrupted by typing CTRL Ie. ~~e dump goes to a line ?rin~er l. i presen t: and ready, or else to t:he terminal. The follo"W'ing is a: example. 4-4 1. . 0'5U)" r~lF':',~h r,!"n~r II F'~ HL1V CUL:'~,;~n 5 Tt~ nor f\·r . . I2J ETC? H B 5401 4200 0033 9007 0033 0124 0477 0010 0£121 0(311 0033 0012 13923 0013 002J& 3553 0215 ee 1 t. 0025 0026 802~r B0ae l .. l:l - 002e 012 11 BOOTSTRAPING TO OTHER DEVICES '~~"r<l INIT is running, a bootstrap to DECtape or RK05 may be- performed. "-'" l:·,''''otstrap to an operating system on an RK05 cartridge, load the : t.~~:'~::idge on drive !2!ero and type K. ~."" ...,. .... ; ""') ':Jootstrap to a DECtape, mount the tape with unit 0 or 8 selected, ;::;: type E. ",pboot INIT, or ;another operating system which may be on the , ;:':.~ ~ ~m disk, type R. f'f.., ,,13 USING XDDT UNDER TSS/8 INIT is running, type X to jump to location 7000 which is the ~/,·;'inning of XDDT. XDDT is an octal - symbolic debugging program ··.r"r'..... ,;'>~L::, preserves the status of the ~t.~~~~~;points. (XDDT is DECUS order program interrupt system at No. 8-527) ;f ..... l~ occupies locations 4434 through 7577 of any field. In ',''';~;~~ion, symbols may be defined by the user. These symbols will :"~:;;:P1 locations 4433 down towards: 000, destroying INIT or free ~I;:~~'~::,} )(DDT sets a. breakpoint, it uses l<?cations 6 and 7 of every field. Th~s may cause problems ~f an attempt is made to ,i'(~''':reakpoint while user programs are running. :,.,~ ........ ,""'~I :':;"'~'''~ as described here, has been changed s lightly from the See the listing of IN IT for these ~~':~::arn available from DECUS. ~ J ,oj, ,\1 .1,. ." . . . . . .... .:,,~.I, ~.~:1.::es. 4-5 CHAPTER 5 USING EDUSYSTEM 50 L~A.~ING , It IN : :;!'otect the system from unauthorized use, each user must be ~:~ified by an account number and a password. For example, LOGIN ;i·~o?:c is typed if the user' 5 number is 456 and the password is DEC • .,ZJOGI!1 command is not echoed on the terminal in order to protect ~ pl!3~.;ord • .% S1ATES OF THE SYSTEM ~:::;'borad can be in one of three states: not logged in, S1 (or ~itQr) mode, or user mode (not to be confused with the hardware ~;.: ~ode. TM light on PDP-8E). When the keyboard is not logged in, 'i'",. certain commands (such as lIOGIN) are effective. wl1en in 5I ,. ,,~:, the system 1.5 wal.tl.ng for a command to be typed. Anything ~,<~<! is considered to be. a . comrnand. . A user program mayor may not . i~ tlle process of runnl.ng at the t1me. If a program is not runnir ;f ;~'D!litor prints a dot. to sign.ify it is ready. When in user modE~, f~~?1.;.ng the user types place:d in a buffer , waiting for his ~.; :~~,74 to ask for ~ t (WI. tho a KEB, maybe). In summary, each charactt .~: ,,\:- than CTRL/B and CTRL/C) ~yp~d at the keyboard must go to one .t"$"'1 olaces. In user mode, l.t: ~s saved for the user s program. '~!\,~,;itor mode, it is saved and passed to 8I as a command to the :rff '..~ " . • • • :-5 I ;;?EC!AL CHi\RACTERS: RUBOU'r, LINE FEED, CTRL/B I CI'RL/C C!RL/S AND CTRL/Q .~~ characters hav special immediate acti<?n and 'lG~cd with a carrlage return to be effect~ve. 7 need not be a ~:e1bo3rd is not logged in or is in Monitor #1.g the last character typed to 1;e de~eted. (8I) mode, a RUBOUT I f the terminal is ,:;~.j in the rubbed-out charac·t:er 1S prlnted to help the user make t,,!!~tions. In user mode, RUBOUT is just another character, which :{~.::,ra.~ may interpret in any \.;ay. Most programs delete characters ~ p,0cOUT is type~, usually typing a backslash or backarrow to l:.~tQ this functlon. terminal is in SI mode, a LINE FEED can be typed to cause orint out the current command line. The procedure is ;i=~larly useful if the user is in the midst of a complex ~:l:-.':: and has used a number of RUBOUTS. , It "0 (printed t B on terminals) places the keyboard in Monitor c:"ears the user s keyboard buffer to Make room !:or a ~:'t~1. The rest of the ~ine ~s giver: to 8 I as a command. If ~~e~'s program is runn1n~, l.t contlnues ~o r~n. (However, if ::;roqra:n tries to do terrnl.nal I/O, executlon lS temporari 1y ~~dcd until the user finishes the command .. ) u'"3 H ~n~ I CU~PTER 6 RESTARrrIl'TG EDUSYSTEM-SO :, . , .. ",,~ .... 2 details the building procedure for the Monitor. Once this ~'~;:';;';:l done~ it i~ not normally necessary to repeat these procedurE~s , '-""'l.r.;e it 1.S des~red to start up EduSystem-SO. Rather, a procedure :~'~~~~'l "bootstraping" or IIbooting" is followed. """0 are several methods of booting EduSystem-50. The one •. ,ji ...-:~t appropriate at anyone time depends upon several , 'i. \ ' which ~~~;:::3_ such as tl.leconfiguration o~ the compu~er involved, . and ,'" ~"3te of the, d~sk and core memorl.es. The f~rst method ll.sted ; : .. ~~ .. is the easiest and is appropriate most of the time. The " :~ ~\iro apply if. the system disk is intact, while the following , !~ :r.f!iil ,a,pply only l.f the system ha:s been durnP7d to DECtape, and tJ:is .~'~'. ~ is to be load~~d back on to t.hE~ system dl.sk. If all else fal.ls, ,;;~~ . ~}'st.em must be rebuilt from paper tapes, as detailed in Chapter :;'! rF..E:LIMINARY ·PROCEDURES , i ,. • l~i" ,'i>,' ' to using 1': :';:41i2e thl9 any of the methods listed below, it is necessary to computer system. If one of the methods is attempted '::~'i~ fails, this i~i~i,:li~ation should be repeated before trying ~'<.:'II"'et method. To ~nJ.tJ.al~ze the system: Ensure that the power I~'~.'·I:,;~:~ como uter is on, and that t,he switch is not in the PANEL LOCK ';'~,l:'~;"'n •• AlsO make sure that the console terminal is turned on t~ i"'~';~ on-line aJ;d ready. Now press and rai~e the HALT swi teh raise f'\. ~~J(; STEP sWltch, and press t~he CLEAR sw~tch. This completes 'it I 1~;: ~itializati()n. METHOD 1 ), , (\Ito 'i'.J,~ 5t.fi tches 0' and 4, while thE~ others (1, 2, 3, 5 I 6, Now press the ADDR LOAD, ;\~' '*'~"'d 11) should be lowered. ~': ,:~ ,~'. a.T'ld CONT Swi tehes. The console terminal ~,.;;., START, ETC?" at which time t.he system may i ~" -t1'-!; /J~)J'..t..j;.t 7, 8 I 9, EA~D LOAD, should print" LOAD, be STARTED. t..( AbO .. " METHOD 2 ~ I -""'~hod .f1 applies if the systejn disk is intact and if the computer Method 3 J.S a substitute for systems without the Users who are not familiar with the MI8-EG may try this ~ ;; ::~ ... Z!i • ~, ... 't,.cd anyway. If method 3 works where this one will not, the :~':,;'~~~ does not have a MIS-EG. IrI 1. ...... • ~ t}. a ~~I8-EG. h~H! s-Ilitches C, 2, 4, '.,:~ 11 should be do\vn. 5, 6, and 8, while s~tlitches 1, 3, 7, 9, .J..U Press and raise the Sv.l switch. The tCr:Dinal LeAD, '!)'U'1-1P, START I ETC? a t ·N~h:':::: t: :"~e ::'h e .3:1".3 -C .:::::: ~•.. :" .,J ,.. =:'n~ II t '" .. ' _ .. ;;: "., ~"e STARTED • .i. ,\. ~,' II .... METHOD 3 rt~4 eethod applies whenever thE~ contents of the system disk are ...... t.;~ :; ..1- ... • .'.' 6-1 - '" - ,-" -- - -.... ".. '-..... --.:- -,--~:::~ .ons s.':1own :'~n the table below. For (; step in tbe ':,;1>1,=, I~Jacl;; e,:_.ch of the cc)mputer sW'itch register swi, numbered 0 to J.1 t=:it:]lE::r in 1:1le up posit:ion if the corresponding t: entry is a 1 or in t:b(: d()~rn position if the corresponding table c: is a o. \~hell clll 12 sw:i.i:ches have been set to correspond to a I i in the table, follo\v i:he instructions in the right hand column an( proceed to the next line .. the completion of the last step, the CD nsole terminal should print "LOAD, DUMP, START, Ere?" at which time tht: system may be l\t, started. Table 6-1 RF08/DF32 Disk Bootstrap Step # Octal Values 1 0000 7750 7600 6603 6622 5352 5752 7750 2 3 4 5 6 7 8 switch Register Setting 012 345 678 000 000 III III III 000 101 000 000 010 101 101 101 110 110 101 10l III 110 110 110 011 111 111 91011 000 000 000 all 010 010 010 000 And Then press EXTD ADDR LOAD press ADDR LOAD lift DEP key lift DEP key lift DEP key lift DEP'key lift,DEP key press ADDR LOAD and '" press CLEAR and press CONT METHOD 4 This method applies when there exists a ::;et of dU~llP tapes which w,:, dw11ped previously I which it is desired to load onto the disk~ In addition, this method makes use of the MI8-EG, and assumes that t: d1.unp tapes have been specially prepared using DTBOOT (see below). Metbod 5 is a substitute for systems without a Mla-EG, and Method' is used when the du..-np tapes have not been specially prepared usin~' DTBOOT. Pl~1ce dtunp tape number one on a DECtape drive, write locked.' HOWL instead of selecting unit 1, place the unit selec1: switch at 0 or ') 8. Raise switches 3 and 4, while the others (0, 1, 2. 5, 6, 7, 8, 9; 10, and 11) should be down. Press and raise the sw switch. 'The~ should move for a few seconds, at which time the (!onsole should,F~' LO.A..D, DUMP, START, E'I'C?" '4 1/ Turn the DECtape unit select switch back to its nonnal position 'a: ' 1, and LOAD the system as described in selction 4.4. After the ,!,:Ol:, has been accomplished, the system may be STARTED. ' .: .;. METHOD 5 This method applies whenever it is desired to load a set of dump : tapes to the system disk which have been prepared with the progra.:;:" DTBOOT. I f the tapes have not been so prE~pared, use method 6. ' 6-2 {"::';"l1~ tape numbc~r -,.:t ,u one on a DECtape drive, write locked. However, 11 ~,.~ selE!cting unit I, place the unit select switch at a or 8. r~·t·r:ann t~e switch manipulations shovm in the table 1;>elow. '''i", . ,,.,',\:~ ntep J.n the table, place each of the computer sw~ tch reg1.ster .:,',,~:: 1':~ nttwered a to 11 either in the up position if the correspondin( l'-' r:i,~~~~t::Y ~s a 1, or in the down 1?osition if the corresponding ; >t c':\t.ry 15 a C ~ When all 12 sW'~ tches h~ve b:en set to correspond .; ti.na in the table, follow t~e ~nstruct~ons ~n the right hand .<:~:; and proceec to the next ll.ne. , ':pable 6-2 TC01/TC08 DECtape Bootstrap J......... r;r~..... ~ .,~> ~,~~ -. , Switch Register Setting octal Values ..trIw.................... • 012 . :" '~' .~!.\ \~' III 110 001 110 110 101 001 101 000 000 111 111 111 111 6766 6771 , 1,:, 'it, , II 000 0000 7613 6774 1222 5216 1223 5215 0600 0220 7754 7577 7577 7613 ~~; ,'" '. f"" L1 'r. ' ,I rt '(,.! :r,/ 345 000 110 111 010, 111 111 010' 010 010 110 010 III 101 101 110 678 000 001 111 010 110 111 001 010 001 000 010 101 111 111 001 91011 000 all 100 010 110 001 110 all 101 000 000 100 III 111 all And Then press EXTD ADDR LOAD press ADDR LOAD lift DEP key lift DEP key lift DEP key lift DEP key lift DEP key lift DEP key lift DEP key lift DEP key lift DEP key pres s ADDR LOAD lift DEP key lift DEP key press ADDRLOAD and press CLEAR and press CONT I, .~~:: the last step above has been performed," the tape should move :~ .!\ !c!'~ seconds and?~hen the console termlnal should print out ,I :;t.\J~D~~1P STA,RT " ETC. t"'~ ~~e unit select s\vi tch on the. DECt~pe bac~ to its normal pas i tion ~. ~ a:-:d LOAD the sy~tem as descr:tbed l.n sectl.on 4.4. A fter the :,l ~ . ~.,!S been accomp11.shed, the sy:stem may be STARTED. METHOD 6 ,~ -". .. "tad Ii ........ is us~d whenever it is necessary to load DUMPed tapes ":::.re not been specially prepared using DTBOOT. t.,., ........ ,1..,"" t\~",. ~c chapter two, following the steps for building a new s~st~m ;" ~ ~~e message "LOAD,. DUMP, START, ETC?" appears on ::he consC':e ,- · ;~...~~ ~, .tt ~ . . . . As soo~ as th2S message apg ear s, =etur~ to t~~ fO~~=~~~0 .~ '~. ~r.~ '.: ~ • to the question "LOAD, DUMP, START, ETC?" the syste:r:-: may as described in section 4.4. After the load has bef?r1 , "1"'vruJ , "'".."."."l. "" " . shed , the system may be STARTed. ,.,,..-"'e : ::"",.r,. "'::~~ ned ,~ ~ . , ".<~ .. 6-3 METHOD 7 Vmen all else fai.ls, the system must be rebuilt from scratch, as detailed in chapt,er 2. PREPARING TAPES USING DTBOOT To specially prepare a set of dump ta.pes using DTBOOT, take tape number 1 of the set of dump tapes, and mount it on a DECtape dri\: However, instead of selecting the no:aual unit 1, place the unit f: switch at 0 or 8. Place the DECtape unit in the WRITE ENABLED position. Now, v.J'ith the EDUsystem-50 monito.r in operation, type IJR DTBOOT" at any logged-in terminal (the program DTBOOT must, of course, be stored in the system library p:::-ior to this step)., all is well, the tape will move (possi.bly only a fraction of a rt. and tBS will be printed. The comple1t:es the preparation of the ta. This preparation is permanent for this tape, and will nonnally DE: need to be repeated no matter how many tim(~s the system, is LOAD from or DUMPed to that set of tapes. ' A NOTE FOR OS/8 USERS: INIT may be used to advantage when using the system disk for running OS/8. Load the paper tape of INIT u~;ing standard procedu for binary paper tapes, and start it at 24200. Even better, crea a SAVE format file of INIT, and simply run it:. ·When INIT asks LOAD, DUMP, START, ErC?" dump OS/8 to DECt2.pe exactly as if it, were EDU-50. At the completion of the dump, INIT will boot the system which is on th~ system disk, ~l1hich happens to be OS/8 ~ hen another OS/8 monitor dot will be printed. Now, EDU-50 may be loa; At any future time, when it is desired to run. OS/8, get back INIT and LOAD the OS/8 tapes as if they were TSS/8 tapes. At'the completion of the load, INIT will boot in the system disk,. which! contains OS/8 again, and an OS/8 monotor dot will be printed. ' Caution: do not attempt to use DTBOO~~ on these OS/8 dump tapes, ,al do not try to boot in these tapes directly. Use INIT. . NOTE TO VERSION 3 USERS The program BOOT may be used to boot EDU-50. When not running of of the system disk, typing BO/RF will bring in INIT from the system disk. When not running from DECtape, typing BO/DT will br in INIT from DECtape unit 0, provided that it has been specially, prepared using DTBOOT. 6-4 DETAILED MONITOR OPERATION: i< , I SHARING TIME -- " ,i'tle most fundamental' job of a timesharing Moni tor is the sequent I .It':.~,,ution (generally for short bursts, or quanta of time) of a number ~~, ,il!er prograll1s. t" .. I" ~ .. *,J:~~t!e a user 'i{' program can be, brouqht to execute, and a place to put i\~lttr programs ,~""a ~ This implies 1that the Monitor has a place availabl EduSystem 50 reserves one or morE~ when not being run. fields within the PDP-8 as areas in which to execute user pro- ~~ .' A user program, and hence a user area, is 4K words long. ,r: !,::tS. . ; ~ ",~"~'stem 50 may have from 1 to 6 user areas, depending on the amount .,~,.,......" .!~ :':ire available. Similarly, EduSystem 50 reserves a portion of its ThesE~ as a place in which to keep programs not being executed. .,tJ:Ii'I?, areas" are also 4K each. ~rhe number of user cores is not ~~"t't 1,),I:n,5sari1 y :~... ~tt,': •• Ht:' 6 - dependent on the number of simul taneous users; the simply uses as many as i·t has available. on the other hand, C~,':.(e.~:..ts users is for which the dirj~ctly systt~m The number of swap related to the number of simul- is configured. There is ont.~ ,.,,,.J:i"'ated 4K swap area on the disk for each simul taneous user. '!So' r·~.;" ".", User programs are executed by EduSystem 50 by bringing them into " >~~r core from their swap area, executing them, then returni:1g the:-r. ...... -f,eir swap area on the disk, ;' .. :,.,.;,:,~,j:;.r: \l,.~j:~J/ but bl~ User' programs may in. that the next user progral(l may be :50 brought into any available use:. when they are swapped out, they always return to their :'~'~1ned swap area on the disk. ;:dusyst€~m 'l~1-;.;...~ing 50' s swapping algorithm may be best illustrated by a very simplified situation. EduSystern has a number of , .. ~ .. orcg rams running wi thin it; each is compute bound, none is \,\,~,.,.,.. ~ J!!'\~!1ed in any input/output. ",~:-:, !':ext. Monitor first decides which user to chooses the user who has wa i ted to run the longe st. It ""'4',~,,,'ns this user to be brought into the user core. Howev€!", i ~ It I·~",\"'''·· ........ """ ~i" o~ly bring 7-1 tn.l3 U3er into a user core which is unoccupied. Therefore, it must empty or.e by swapping its present inhabi talnt (another user program) out. ';l"ctm Before doing this, Monitor saves thE! running state of the proto L'e swapped. '~LS, This information, the' AC, is stored in Monitor core; rc, LF., and EAE regis- The Monitor then writes the user program (whose state is saved) out onto its respective swap area. the user program selected to run next may be brought into core. Now Once it is in, its run state is restored (the Jl~C,PC, LK, and EAE registers af each user are stored in the Monitor when they stop running) the program is started. and This procedure is continued as long as the user program needs to run. Obviously, the Honitor has to maintain status ir.formation about. each user progra.rn, whether or not it is in core. Indeed, it must maintain more information than just a user program 1 3 run state. It must maintain all the information it needs in order to decide whether or nct a user program needs to be run. t~is 5 In actual operation, most of 3lus information deals with the state of a USEr program's input 3nd output. In our simplified case, where no user is doing I/O; the "only information that needs to be maintained is ~heth~r or not the user has finished. If a user program completes its run, the Monitor remembers this fact. out. I f The program is swapped out and remains a program does not complete i ts l~un at the time when it must· bE: s·.... apped out to allow another user to run, it is remembered to be still runnable. When its turn comes again, this user is swapped in to run some more. It FILE AREA ..L 1T ~-------JOan SWAP AREA : ' USER AREA lit' Z kI---:""""----i~ J03 2 SW\P AREA JOB I SWAP ARE A USER AREA 41" MONITOR RESIO(NT MONITOR IMAGE: (20K) DISK STORAGe CORE 01-01118 16K =d~Sys~em 50 Configured !cr n Cser Programs 7-2 'i • "', ' The process of deciding which user program to run next (schaduling) is an important function of the Monitor. The Monitor "'tfclica11 v scans a table which contains the status information for .~ch us~r prcgram. If the user program being checked by the Monitor coes not have to be run (is not runnable), it is skipped and the f'lOnitor goes on'to look at the next user program. When it finds a user program which needs to be run, it goes through the process of ~wapping out a user program which has just been run but which is still in core, in order to free a core field. It then brings in the user program job which was selected to be run, starts it and allows it to run for a fix(~d time quantum. At tr..e end of this time quantum (as indicated by a clock interrupt) Moni.tor goes to the next user program to see if it is runnable~ When it has looked at all the user programs, the Monitor s:heduler returns to look again ae the first job. It then ~..,ntint:e5 to cycle through the tablf~ of user programs. In a system with a single user field, the scheduling algorithm is such that some previous user program job must always be swapped out to make room for the next. Once a user program-is brought in and started, there can be no further scheduling activity until it has completed its quantum. s~apped Similarly, once the user program in core has started to be out, the system must wait u.ntil the next user program is completely s,,:apped in before it can do anything. only be run "'hen it is completely in core.) (A user program may The only special schedul- lng case for a I-core system comes when only one user program is dctive in thf~ system. User programs are not automatically swapped out when the? complete a time slic(~. They are only swapped out when another user program must be brought into core to be run. On the other hand, when tje scheduler decides that a given user job should be run, i~ does not blindly swap it in. already in core. ping occurs. It first checks to see if it is Thus, if only one user program is running, no swap- When the program has been run for a quantum, its run state is saved but it is not swapped out. The scheduler scans through the table of user programs looking for one to run. Since no other program needs to be run, it gets right back to the program just run as the proper one to run next.. the schedul€~r Finding this program still in core, simply restores its state and restarts it. Thus, except for these periodic checks, the lone user job runs continuously. The SC:leduling gets more compl ica ted, a!1c' !7'.ore e: f ic:'e!1 t ·..,he:"', there is mo~e than one user core available. 7-3 . The scheduler mai!1tains, in addit10n to its table of all user jobs, a table of all user jobs which are in user core. (A job may be in core, on t:he disk, or halfway between when it is being swapped.) It actually scans the former t_a.ble ts decide which to swap next and -the latter table to determine' what to do in the meantime (while it is waiting for the swap to be completed). The swapping, once set up, happens asynchronously with respect to the scheduling. Once it has set up the s~ap, Monitor always goes to its table of in-core programs looking for onf~ on which to work. When a user program is scheduled to be swapped out, it disappears from the list of in-core programs. Eventually, the next program scheduled to be swapped in will be read into core. It then appears l.n the table of in-core programs and is £tubsequently run. In the case of a system with two user fields (l6~ system) the table of in-core programs has two entries. Entry one indicates which," if any, user program is in field 2; entry two indicatE~s which is in field 3. In actual operation, there will seldom be u~;er programs in both core fields at once. In a 2-user-field system (again assuming our case of several running, compute-bound lIser programs) one field will always be swapping while a program is running in the other. This is because the quantum of time in which a user program is allowed to run is (roughly) equal to the time it takes to do a swap (a write followed by a read). This is explained in the following paragraphs. A user program which has just been run is scheduled to be swapp,d out. In the table of in-core programs, it is marked ~s no longer in core. The scheduler then determines if there isanythLng in core to be run. The only candidate is the other user core. If the timing is right, a user program will just have finished being swapped in. Scheduler then sets up and runs it. (Note that if this swap is not completed until after the second swap was started, the Monitor must wait for it to be made. This situation would occur if a transient error delayed the swap. On the other hand, if latencies on the disk were minimal, the swap might be completed b(~f?re the ot::'ler program completed its run quanta. In general, however I these tl~O events will be almost simultaneous.) At this point, a user program has been started at about the same time another is to be swapped out. At the .. end of its run quanta, the swap should.be complete andil new program in and ready to run. 7-4 Thus, at any given time, one of the user cores is being swapped while a user program is being run in the other. capability of the neously. The data-break pop-a allows these two operations to occur simulta- Cycles are stolen from the running program to allow trans- fArs to occur, in the other field. There is (in theory) no time lapse between the running of user programs. The next one is always ready at the time the user program being run finishes its time slice. Using the standard time slice of 200 milliseconds, this allows five users a second to be run. This situation is in strong contrast to the situation with a .ingle-user core~ Again~ assuming a 200-millisecond time slice, only half as many users may 1:;>e run in the same time. system cannot run one usel;' while s'~apping This is because the another. During the 200 millisecond swap time, the system must simply wait for the swap to be completed. In the I-user core system, swaps and runs alternate; in a 2-user co:~e system, they are simultaneous. I t is a foreground- background operation. sc~eduler The process. depends on various interrupts to continue this S?ecifically, the scheduling is driven by the clock and disk completion interrupts. 19~ After every successful swap and after every milliseconds the scheduler is run. If the scheduler is run because of a clock interrupt, it checks to see if this is the second such clock interrupt it has encountered since it presently-running user program. ~ot star~ed to run the If not, then this user program has had its full quantum of runtime. It is therefore restarted. When the second scheduler clock ca,ll occurs, indicatir.g that the user progr~\ has run for a full 200 milliseconds, it is marked as having been run. use~ The scheduler then looks through its table of in-core programs until it finds one to run. it sees if a swap is in progress. If no other programs are in core, If a swap is being made, the scheduler knows that eventually a new user program will be in core. It returns and runs the same pro9ram. s~apped will be in core and run. Eventually, the program being Even if there is another ~rogram in core, the scheduler checks to see if a swap is in progress. If it is, the scheduler simply starts and runs the next resident user program. vlhene~.'er the scheduler fine.s there is no swap?ing, see if. a s,Jap is necessary. ~ .. =!:ecks ~o A Eiwap is necessary if a user progr2.m is 7-5 on disk which needs to be run. Thus, when the s:heduler finds no swapping taking place, it checks its t:able of user programs to find a runnable, swapped-out user program. program to be swapped in. user's program.) required) (Note: If it does, it schedules this (Generally, this mean~i swapping out another Once the scheduler has set up the swap (if one is it finds the next resident user program and starts it. the check for swapping activity actually occurs every 19~ milliseconds to assure that the swapping rate is maintained.) A swap is scheduled by putting a swap request in the disk queue. If the disk is active at the time the swap is scheduled, the transfer 15 not initiated immediately. However, if the disk is inactive, the transfer is initiated (by setting up and executing a DMAR or DMAW) immediately. Either way, the user program to be swapped is removed t rom the t:ah 1,:; of in-core users. a~ core net It is considered no longer to be in the time it is scheduled to be swapped, ~ctually ev~n though it may be written out until sometime later. Every time the disk completion interrupt occu~s, a check is made tc see if there are any requests pending in the disk queue. ~re, the next is started immediately. If there If the disk transfer just completed w~s a swap-in, which means that a new user program is now ir. core, the table of in-core programs is updated, t<) reflect the new arrival. Thus, scheduling consists of two asynchronous processes. ha~dlers, Disk running off the interrupt, are continually swapping users in. and out of core areas. As they do this, they update a table which indicates which user programs are in use%:' cores. o~ a queue of disk requests. As soon as These routines wor~, a transfer is complete, as indica.ted by a disk completion flag, the disk routines inunediately ~tdrt the next transfer on the queue. While the disk handlers are precessing the requests on the disk queue, other scheduler routines are deciding what swaps, if any, to do next. Once they have made that "decision and queued the appropriate disk request, they scan the table of in-core user programs in order to sel~ct the next user program to be run. of t:he scheduler. This table is updated by the disk-swap handling part Thus, a user program which the schl~duler selects to be swapped in will eventually be swapped into a core and hence appear in the table of in-core user programs. table f~r The scheduler, scanning this a resident job to run, will find and run it. 7-6 It is important to system efficiency that, at the time the scheduler goes to the table of in-core user programs to find one to run, it finds onE~. If it does not, it schedules a non-job, the "null job," be 1'1.". 'rhis null job is run until a valid user program is in _J core. {The null job is a tight loop in Monitor core which increments the accumulator. It does not occupy a user core. It is not swapped.) Clearly, in a I-user core configuration, the system spends a great timE~ deal of in the null job. From the time a swap is initiated until it is completed, the Monitor can do nothing but run null job. In a 2-user core system, the effeciency is much greater. The back- ground s'wapping assures that a new user program will be in core at about th~ time the currently active program completes its time slice. More than biQ user core~ virtually assure that time will not be wasted running the null job. The- pr,:!vious discussion of scheduling is based on some radically simplified assumptions. jobs. ~li th We assumed a steady number of compute-only a more normal mix of programs, scheduling becomes much mere complex; user programs are being continually started and programs are being cJntinually started and halted. Those that are running may need to be interrupted for input/output. All this increases the complexity of the scheduling. How these additional complexities are handled is discussed later in this manual. 7.2 SOME DEFINITIONS In the preceding discussion, we have referred to the programs running in EduSystem 50 as ~user programs". :n fa=t, documentation, they dre referred to as "jobs". i~ the 5ys~em Jcb, in this sense, means scmething slightly different than user program. It alse reea~s something different than "job" as it is used in batch processing syste75. A job in EduSystem 50 is the capacity, or capability, to run a program. A user, when he logs in, is assigned a job. He keeps this job, which has an associated nunU)er, until he logs out. system is thus a 16-job system. able jobs which it assigns to individual it has assigned all its availabll~ A 16-user At startup, it has a pool of 16 availu~ers as they log in. Once jobs, the Monitor cannot accept more users until one logs out and releases his job. The distinction between a job and a user rignt after 10gg1ng in. progr~~ ~s cle3rest The Just-logged 1n user nas a JOo. 7-7 rie ~a~ been assigned a terminal with which to intercommunicate, and a 4K swap track in which to store his program. However, as yet he has no user prog'ram. In short, the job ifI not the program, it is the capability u) run a program. Once logged in, users are known to the system only by their job numbers. a~d The Monitor simply schedules for a 16-user system are 1 through 16. number zero. runs jobs. The job numbers 'rhe null job is assigned job Users who are trying to loc; in are assigned job numbers (since a job number is required internally even to get through the LOGIN procedure). If the LOGIN is succe~sful, the user retains the Job number; if it is not, it is forgotten. The Monitor maintains a table, JOBTEL, which indicates the status o~ job each job. :LS It has a l-word entry for each possible unassigned, this word il3 zeroed. j~b. If the While the job is defined, its word in JOBTBL contains a pointer to the complete status information for this Job. The Monitor also maintains a table of in-core jobs. This table is called CORTBL. each available user core. Jet is made up of a I-word entry for Each entry con;:ains the job number (and some other status bits) of the job which occupies that particular core. Finally, there is a single register, JOB, which indicates which job is being run at a given moment. ,]rOB is updated at the end of a job time slice, CORTBL is updated with E~ach swap, JOBTBL is updated on log-in and log-out. 7.3 TALKING TO THE USER PROGRAM The preceding discussion is limited t,:> compute-bound jobs, those that do neither input nor output. This situation is rare. jobs do a great deal of console I/O. Most user For 1~e Monitor to process this console I/O, it must solve a number of immediate problems_, First, it must be able to handle multiple conso1eE. All EduSystem ~O con- figurations have multi-terminal hardware, a.l1owing the system to input characters from any given console and outp~t them to any console. However, it must also determine which conscle is which, and which characters ar~ received from which console. User programs on EduSystem 50 are regular PDP-8 programs; '!is such they input characters from the console and output them to the console. Th~re stand-alone system that has only one consoie. is no ambiguity in a In EduSysiem 50, where many jobs are outputting to the console, the potential for confusion 7-8 is considerable. The EduSystem 50 Monitor must maintain a table listing which console is used by what jobs. Thus, when a job does console I/O, Monitor knows the individual console involved. These are the immediate problems the Monitor must solve. to be usef~l, it must also be efficient. However, Normally, a PDP-8 program doing I/O 3pends virtually all its time waiting for the device; it is the monitor's responsibility to recover this time and use it to run another joj. Finally, the Monitor should smooth the I/O. EduSystem SO 15 a swapping system: user programs are in core only for short periods, then they are swapped out to the disk. If a user program could only output when it is in core, its typeout would be sporadic. ~e worse. Input would If. a user 'program could only input when the job happened to be in CJre,no inp~t would be done. This 'Jroblem of 'smoothing I/O is solved by maintaining buffers within the Monitor. There is'~ terminal input buffer and an output buffer for each job in the Monitor. On input, as characters are received from the console, they are put into the console input buffer for the jo~ associated with that console. Thus, the program to receive these characters need not be in core. output. The same is true of C1aracters taken from a job's console output buffer are sent to the user's terminal ~hether or not the associated job is in core. This console character handler may be thought of as the asynchro- noUS part (asynchronous in the sense that it happens independently of the running of individual user programs). Each user's input and output buffers are being filled and emptied (by Monitor) whether or not the user's program is in core. function. It is essentially an overhead A little processor time is taken from whatever program is currently running and used to keep up the I/O for all active users. This interrupt driven terminal handler solves the problem of shuttling characters between console and buffers. There remains the problem of passing characters between these buffers and actual user programs. This character passing occurs via the EduSystem 50 hardware trapping capability. On input, the key instruction is KRB, the keyboard-read rOT. A user progrrun, when it inputs a character, ~xecutes The hardware lnodification causes a trap to Monitar, this KRB. preventing hardware execution of the instructian. trapped On identifying the reT as a KRB, the Monitor gets a character from the input 7-9 buff(~r which corresponds to this job, puts it in the accumulator, and returns to the user program at 1:he instruction following the KRB. The user proqram never knows that the KRBwas simulated. ~·"act. I ' · ' s tu i 1 does on a stand-alone PDP-8. output.. It acts The same procedure applies Execution of a TLS 1s prevente:i by the hardware; a trap to Monitor occurs instead. Once it: has id:ntified the trapped lOT as a TLS, M.onitor takes whatever is in the accumulator at the time of the trap and places it in the appropriate output buffer. lOT has been precisely simulated. Once again, the· (The asynchronous terminal routine assures that the characters placed in the output buffer are typed eventually. ) However, the abi 1i ty to sim.ulate KRB c.nd TLS is only half the job. There remain all the timing and synchronization problems which are normally solved by the skip lOTs: KSF and TSF. In a stand-alone PDP-8, KSF means "Is there a character in the input buffer?" In TSS/8, the I-character hardware keyboard bu~fer is effectively replaced by a mult~character software input buffer. Thus, in EduSystem 50, KSF means "Are there any characters in the input buffl~r?1t traps from a user program. },SF, being an lOT, The Monitor, upon identifying the trapped reT as a KSF, checks that user's input buffer. If there are any charac- ters in it, the Monitor 3imulate:9 a skip by returning to the instruct _'In '. t he user program which i:s two locat~.ons beyond the I<SF. This· arrangement allows for efficient user program I/O. It a llows many characters to be pas!sed quickly, between a user program and the Monitor. In a stand-alone system, it is impossible to input characters at more than 10 cps, 1:.he terminal speed. Onder TSS/8, many KHBs or TLSs may be executed in a hundred milliseconds. examph! , consider the following LOOP .. TAD I AX !~equence For of code: IAUTOINDEX SNA HLT TLS CLA JMP LOOP Each TLS puts a character in t:he output buffer (assuming it is not full). In this manner, a whole series of characters may be output in a few milliseconds. (By. outPUlt~ we mean moved to the output buffer. 7-10 It may be many seconds before the asynchronous terminal handlers type rhem all. Thi.s is, however I of no concern to the user program.) Similarly, if there are many characters waiting in the input buffer, 7 I~Y ('C'Ll..l.d all be picked up at the Sa~mE! time by a KRB loop in a user program. If the timing of th~se ~unctions can be manipulated favorably, t~e system ca~ handle input and output efficiently. The object is to neparate the character I/O from the waiting I/O. Rather than wait 1/10 o! a second between each character, output 80 or 90 characters at once, then wait 8 or 9 seconds •. By bundling the I/O wait times into Ils~ble amoulnts, like 80r 9 seconds, the Monitor can use them to run ot~er jobs. This timing is handled by the scheduler and device ttapdlers. It is important that the tlser never hang in a KSF; JMP .-1 JocP as on a stand-alone system. This is the code normally used to w.ut until more I/O can' be done. On EduSystem 50, the user job cannot te left to waste processor time in this loop. Therefore, when the Monitor detects a KSF which is false followed by a JMP.-l (i.e., the program must wait for the device), it stops the program just as if the time slice had been completely used. The state of the program is saved. HOw'ever, the program is stopped in a special way. It is ~arked as not rurinable and the reason why it is not runnable (waiting tor inp~t) is remembered. .Since it is not runnable, it is dropped !~~ the run q~eue and, when the scheduler finds it the next time, it wlll not be run. However, the Monitor continues to keep track of the state of the 1/0. At the time when the device is again available, the Monitor chlnges the state of the job back to runnable. Now the next time the scheduler looks at this job it will run. The job will be started where it had stopped (at the skip instr~ction) but this time the s~:ip LS true, allowing the program to continue. Thus, by trapping the s:<ip rOT, the Moni tor has salvaged the wait time from a ~ob and used i~ to run other jobs. In order ':0 make running user pl~ograms even more efficient, the Monitor exercises control over the keyboard and teleprinter flags. T!1ese flags are part of the status information for each user. The object is to turn on the flag, thus l;tarting the user program only when it is pos!,ible to process many characters. This is done on input by SE!tti!1g up a "break mask." This break mask t.ells the ~oni tor '.4hat characters are important: delimi ters. For example, BASIC considers carr:~age return and rubout to be delimiters. When BASIC is 7-11 ready for keyboard input, it executes a KSF to see if there is any. Typically, there is none. (The 1lser has n(lt yet begun to type in the next line in his program.) Therefore, this user program is put in the o Wrl~C state and is marked as not runnable. 'Intil a delimiter appears. It stays in this state The keyboard flag is then set, the program is returned to the runnable state, scheduled, and run. As soon as the program starts, it executes KRBs to read in?ut characters. BASIC can thus process a whole line of input in a single, 200-millisecond time slice. Since this line probably took !;everal seconds to input, this user is actually using very little system time. applies to output. The same situation As the program outputs characters, these charac- ters are placed in the output buffer. As lcng as the buffer is not filled, the program is allowed to run. However, when the buffer fills, the program's teleprinter flag is cleared, thus suspending execution of t~e program (it moves into I/O wait). As characters from this buffer are subsequently typed, ending the buffer-full condition, ,the teleprinter flag is held down and the user program is kept in the nonrunnable state until the buffer is almost emptied. At this point, the program is restarted so that it cem put more characters into the output buffer, keeping a continuous output. Programs like BASIC can fill a character output buffer in one time slice. Therefore, input, like output, is accomplished withclut substantial processor time. It is the combination of the two parts of the I/O handlers: those driven by lOT traps and operated synchronously with respect to the user program, and those driven by device interrupts and operated asynchronously with respect to user programs, which accomplish I/O. The commor. cormnunication areas for these two routinE!s are the console input-output buffers, and their associated flags. The problem of efficient scheduling is solved by ~rudent manipulation of these flags. This is done on input by means of the deli~iter, or break mask.' output, :~ t On is done by detecting buffl;!r-full and buffer-almost-empty conditions. The above discussion is somewhat simplified. Actually, programs need not use the skip-on-flag instructions at all and may use string I/O instructions to transfer many characters at once. 7-12 CHAPTER 8 MONITOR: A MORE DETAILED LOOK Thus far~ we have reviewed some of the operations of the EduSystem This chapter discusses these operations in greater detail: the various !UbsysteIllls ~'ithin the Monitor, the full scheduling algorittun, and the 5D Monitor and how it responds to various simplified situations. ~ata basE~. e.l ,..I')YIT'JE AS INTERRUPT HANDLER The fundamental task of the time-sharing system is to run user programs. ~lime spent running the J~oni tor is nonproductive overhead. Therefore, 1:he Monitor must restrict its acti vi ties to the minimum time necessary to keep user jobs flowing smoothly. In order to meet this goal of minimal overhead, the EduSystem Monitor is used as an lnterrupt processor only. The Monitor is never run except in response to an interrupt. The interrupt trap address in field J, location S. is its only en~ry point. It always exits by dismissing the interrupt. When it completes the handling of an interrupt, the Monitor dismisses back to the user job. The job is allowed to run until the next interrupt: this being the only way in which the Monitor can regain control once a user job has been started. Since it is better for the system to be always running a job, the interrupt handling technlque assurss that the system will be doing that as much as possible. In'terrupts to the Monitor arl= divided into three levels: level 0, level i, and level 2. The OC~8A clock is the only level 0 interrupt. The workings of the clock routines are dependent on the TSS/8 configuration. In a PT~a or KL8E system, there is a line frequency clock. In a oc~a, there is just the DC~8 baud clock. This clock then serves both as the system clock and the signal to enter the oCOS service routines. The Monitor does not take actlon on every clock interrupt. It waits for lOO-millisecond intervals (12 ticks of a line frequency clock - 55 ticks, of a DC}J8 clock). Thus, when the 8-1 clock interrupt occurs, the clock interrup1: handler simply increments a counter to see if 100 milliseconds have E!lapsed. rupt is dismissed. (On a DC~8 system, the ~C~8 If not, the inter- service routines are rem to scan the lines for J.ncoming characters and to continue output.) Or,ly at lOO-millisecond intervals does it involve more Monitor In this case, it is treated as a level 2 interrupt. processin9. DC.08A level 0 has its own regist,er save area and hence may interrupt any other process. The level 1 interrupts are 1:.he device :Lnterrupts: disk, DECtape, etc. If the reader, punch, systE~m has PT.e8~; levE~l 1. In the case of the paper tape terminal interrupts are also or KL8Es, the console redder and punch, the interrupt processing generally consists of transferring a character between the device and a Monitor character buffer. DECtilpe and disk error flags are also disposed of immediately: the t~ansfer r~tried. is In all these cases, the interrupt is dismissed immediately. Since they are all brief, none of the interrupt processors above reenabll~ the interrupt system before dismiss:~ng. Therefore, they have no problems in protecting themselves against being re-interrupted. This is not the case with any of the other interrupt processors. These "reenable interrupts" which are consid~red to be level 2 inter- rupts, reenable interrupts before they start processing. The level 2 interrupts may be best characteri:::ed as those which take a. long time to process. The level 2 interrupts consist of the l60-millisecond clock, service for keyboards, teleprinters, r~ader, punch, or line printer, operation complete for the card read~r, disks, or OECtape, or a trapped user rOT interrupt. Level Jif and level 1 interrupt handlers take up a miniscule amount of code. Therefor(~1 the Monitor may be thought of as a large level 2 interrupt procef:sor. Since level 2 interrupts are serviced with the interrupt reenabled, there is the possibility that they themselves may be re-interrupted. Level ~ and level 1 interrupts present no problem. The level 2 interrupt code does its own regist!~r saves CAe, PC, LI<. and location 0) to assure that interrupts from the other levels do not interfere. A second level 2 interrupt, on th~ other hand, ~auses problems. It makes no sense to suspend the hru\dling of on~ level 2 interrupt to go off and start on another. Therefore, the Monitor ~~ec~s Whenever a level 2 inter- ~sr ~nd ?revents, this situation. rupt is detected, the Monitor chec~:s to see whether it is a user mode program whic1 is interrupted. (The state of the user mode bit is Automatically saved when an interrupt occurs.) If the processor was inten:'upted out of the user modla, indicating that. a user program IdS 1":I1,; .• ng .::t 1:he time' of tt:.e intel:'rupt, then it is permissible to F(oces5 elle lev(ll 2 interrupt.; Monitor proceed~ to do so. If, on the othel:' hand, the processor interrupted out of exec mode, this means the Monitor was in the proceS$ of handling level 8 or a previous level 2 interrupt (the only conditions under which an interrupt out of exec ;'!1~,de could OCCU1=-). In this case, processing the new level 2 interrupt is deferred. It is placed on the level 2 queue. Entries in the level 2 queue are addresses of the routines to handle the specific interrupt. Once this is done, the interrupt is dismissed, back to a location wi t.:lin the Monitor. At the completion of each level 2 interrupt, tie Monitor checks this level 2 queue. If it is empty, it rl:sr:lisscs ba.:::k to the usel;" program. If it is not empty, the Moni tor lS ree.l\:-=red to process the next rE!quest on the queue. Only when the backlog on. l.~ve I 2 queue is exhausted does an exit occur from the Monitor. In the case of IOO-millisecond clock interrupts. the level 2 handlers sav,; t.he who).e state of the user job in his job status regist.ers. loJhen this interrupt is finally dismissed, the saved state of the :iob, '...rith its job number in core register JOB, is restored. If, in the meantime, the scheduler has changed the contents of JOB, it is in fact Cl ne·...r job which is started. Thus, even the system scheduling is accomplis~ed by means of the interrupt handlers. It is ~nportant to keep this concept of the Monitor as interrupt handler in mind since the system is incomprehensible when viewed in any other liJht. All actions by the Monitor may e~entually be traced to some intel:'rllpt. Swapping occurs in response to a disk completion flag. Nhen the disk completion is detected, the Monitor, via a 2-1evel interrupt, IJoks to see what the next swap should be. When the swap is found, th~ Monitor initiates it. Scheduling occurs as a response to the IOO-millisecond clock level 2 interrupt. If it is the second such interru?t since a user job has been started, the Monitor looks for a new job to run. Even in the interim level 2 clock interrupts, the Monitor tries to do some advance scheduling. If there is no swapping, the Monitor sees if it should begin swapping. Thus, while a job is running, the scheduler tries to get the next jab read~, so that it 8-3 may be star-ted immediately after the slice. currf~nt job cOlTlpletes its time When a job does complete its time slice, the scheduler's task is to set up and start the next job. Ter~inal, paper tape, and line printer I/O are handled by special level 2 routines. These routines are run every one of the devices occurs. In the case timE~ an interrupt from of terminal input and the paper tape reader, characters are stored in a ring buffer at level 1, and removed and placed into the appropriate user buffer in free core at level 2. In the case of terminal output, the paper tape punch, and the line printer, there is a one-word buffer for each device. When'a " device interrupts, a character is removed from this one-word buffer' (if there is one there) and immediately transmitted. Later, at level 2, a character is removed from the appropriate free-core buffer and placed into the one-word buffer. Special code allows the :ine printer to fill its hardware buffer at level 2 with the interrupt system enabled and without going through the one-word buffer. ~ll interaction between the jobs and the systml takes place thro·.lgt1 the mE~diurn of the rOT traps. ThE! scheduler is heavily dependent on the state of each job t s inpl1t and output. For now, we will just look at the lOT trap handling in general, indicating how various classes of lOTs are h3ndled. Once the Monitor has identified an rOT trap in 1:errupt, it tries to identify the rOT that caused the interrupt. At the time of the interrupt, the PC, which is stored in location 0, iB set at the address following the rOT. This pointer is backed up and the lOT is fetched' from the user's core. This lOT is then tested against a dispatch table of all valid rOTs. If the trapped lOT is found, thf3 Monitor dispatches to the appropriate routine. is undefined. It it is no': found, the lOT control is returned to the user prog::-am. 'rhe lOT is treated as a Nap. Some valid trapped instructions do not return at Cill. HLT i.s the obvious example. do not return control to the program. the system. ~o the user program HI.T means, quite speci fically, Control of tlll.S job passes ~o (How all this operates is duscussed in the next section.) Some rOTs always cause control to be re1:urned to thl3 user program immediately. , Among these are all the lOTs such as 8-4 'roo, USE, etc., which have nothing io do with the actual input/output. lOTs, as they are used by programs running under TSS/8 do not necessarily mean instructions used to drive I/O devices. They are actually instructions ~~~-~ allow a job to talk to the outside world, whether it be a peripheral or ju~t EduSystem 50 Monitor. Those rOTs which communicate . just wi th the Mcnitor return to the u!:aer program immediately. The lOTs which correspond to the actual devices, such as the terminal lOT~;, mayor may not return to the user program immediately. A true.KSF' (t.he keyboard buffer has one or more delimiters in it), allOWS control t.o be· returned immed:Lately to the user's program (with the skip simt.lated). Similarly, a 1{RJ3 which successfully gets a character and a TLS which does not j:i.ll the output buffer allow control 1: C) bE! returned to the user program. In these cases, the user program is able to do more useful r 1.m.ning. After a true !<SF, the proqram can do a KRB to pick up the character. After the KRB, it can plocess the character, then look for more input. 8.2 I/O ~~AI'.l· CONDITION The \lser· program is only allowl~d to run again after one of these lOTs if the program is free to do s()me useful work. In the opposite cases, where the output buffer is full or the input buffer empty, there is no expectcltion that the user pro~ram can continue processing. It is an r/o wait state if the user program is looking for input which is not there (false KSF or unsuccessful KRB) or trying to output where there is no room. On a stand-alone PDP-S, the program goes into a wait loOP until i1: can do more I/O. Under EdySystem-50, user programs whi,~.'1 must wait for I/O are not allowed to loop. They are stopped until the wait condition has ended. (Note that this prohibits programs from overlapping I/O and processing within themselves. Time spent in 1/0 wait is used to run other jobs rather than the job which is in the I/O wait.• Note also that the wait condition does not occur on a All I/O is done on a buffer-by-buffer ~haracter-bY'-character basis. basis to all.:)w programs to keep up full I/O rates, even though they spend much of their time in I/O wait states.) All other user job I/O is hcmdled in a manner analogous to that of the ter.ninal. In all cases, b~ffers of characters are passed between Monitor and user programs. The programs enter an I/O wait until Monitor has successfully completed the transfer of that buffer. 8,-5 Scheduling is highly dependent on 1:he state of the I/O. Therefore, the rOT trap handlers keep a status register (the "wait mask") to indicate for what I/O device the user progr;;ut\ is waiting. The mask, which cnr:-:~:J~ ends m(actly to the user' s statu:~ register (STRl) has a dummy bit, the "Job is not waiting" bit that is set when the user program is not in an I/O wait. Wheneve:r an lOT trap occurs and the user program is to be stopped, the bit 'corresponding to i:he device for which the program is waiting is set. Thus, if the user program executes a KR13 when its input buffer is empty, the bit in the wait mask which cor'responds to the keyboard flag is set. The user program is not restarted and control returns to scheduler so that another user program can be run. Thus, whenever a user progrrun is in an I/O wait, a single bit in the wait mask indicates the devic~ for which it is waiting. (Some transfers, such as file reads and writes, always place the user program into a wait state. Others, like the terminal do so only when a buffer fills.) j' 'l'1-2 scheduler uses the wait mask t~o decide w:lich jobs to run. First, the scheduler keeps a run bit in the job s:atus register for each user. A. user I 5 run bit is on if t:here is a program in progress. The run bit is set when the user starts his program. It remains set until the program is halted. Those USE~rs whose, run bits are not set are never scheduled to be run. Among 1:hc:>se jobs having run bits set, only those not in an I/O wait state arE! actually !lcheduled to run. In deciding what user to schedule next, the !;cheduler scans the list of active jobs looking for one with its run 1)it set. Finding such a job, it sees if the wait mask ANDed with the job status flags,' is nonzero, if it is, the job is runna~ble and is scheduled to be run. NOTE If the job is not in I/O 1,/,I'ait, the c.ummy hit, the "job is not waiting" bit, is set to assure that the job will be runneble. If the job is in an I/O wait, the wait mask'NDed with th€ statu~ bits is zero. Only one bit in the wait mask is set - the bit cor~ responding to the flag for which ~he job is waiting. This flag is 8-6 zero at the l:ime the walt. Plask bit is set (otherwise, the job would not be in an I/O wait). In this way, jobs which are in an I/O wait are prevented fr~m being scheduled. A job breaks out of an I/O wait when the flag corresponding For example, assume that a job is waiting far the keyboard. Eventually;" the user types a delimiter on the keybodrd.. This causes the delimiter bit to b(;! set. The next time the :scheduler checks this user's status, the wait mask ANDed with the status b~ts will be nonzero. The job is then runnab1e again. In general, flaqs are .cleared by rOT tra.p-handling routines. Clearing a flag means a wait condition: at the same time a f1.3.g is cleared, the corresponding bit in the wait mask is set. Flags are generally set as a resu! t of level 1 interrupts; i. e., those that do the data transfers. They are detected by the level 2 scheduler when it looks for th~ nexc runn~ble job. to the bit in the wait mask comes on. This mode of operation characterizes the whole Monitor. The Monitor is mdde up of a number of cLsynchronous elements which communicate via status registers and request queues. The Scheduler, which is the heart of the Monitor, is guaranteed to be run every 100 milliseconds. ThE~refore, it is not necE~ssary for another routine, such as the disk handlers, to jump directly to the scheduler in order to indicate that: a :iwap is complete. To indicate the new system status, the disk routine3 need only set the appropriate status bits. The next time the sch(~dt1ler is run, it find:s this updated status and acts accordingly. Similarly, if the scheduler decides that a swap is needed, it may simpl? queue this request if the disk is act:.ve. When the completion f Laq for the present transfer is processed, the disk que'~e is check.2d and the queued transfer ini tiated. However I if there is no disk transfe~ in progress when the scheduler decides to do a swap, it cannot just qu(~ue the request. In this case, the scheduler itself must ini tiab~ the transfer. 9.3 OTHER P.~RTS OF MONITOR The Monitor code which perfoI~s the functions discussed so far is permanently :esident in field zero while EduSystem 50 is operating. Field zero contains almost all thE! resident code. The Monitor al,:)o occupies fie Ld one. About lK of fif~ld one is used for code I most of it for devic.~ handlers. The remainder is for tables and buffers, nearly all oE the resident Monitor data base 1S 1n field one. 8-7 In addition, there are two nonresident sections of Monitor code. They are the System Interpreter (51) and the file hand13r (FIP). These routines are not frequently used and do not need to be core res id2nt. FIP is a 4K block of code which resides in t.1e second 4K b Luck of the disk (disk locations 10000-17777). 51 makl~6 up a 4K block of code which resides at the bottom of the disk (disk locations 0-7777). When needed, these .routines 'are brought into ::ield tuo for execution. They do not overlay the resident :Moni tor; they go into the first user field. a user program. them. (FIP In fact, the scheduler sets them up just like They run in the place of the user program whic:h called For this reason, they ,are referred to as "Phantons," = File Phantom). They are not, however, identical to user pro- grams because they are run in exec mode. This means thE y may l:ead and write physical disk segments (in the case of FIP) ar.d get at field o and 1 nata and subroutines. 8.4 THE MONITOR DATA BASE Some mention has been made of the tables and buffers used by the Monitor. Diagrams of the tables and buffers used by the Monitor may be found in Appendix D. tables are mentioned. These should be referred to as specif~.c A brief discussion of the tables followfi. The Monitor does a great deal of dynamic storage aS3ignrnent. It uses a pool of a-word blocks known as the free list. startup, the unused area in field 1 is divided into thes~~ At sYBtem 8-wOJ~d blocks and linked together by a list structure. A location in field 0, called FREE, contains a "pointer" j:o the first unused block of free core. the first word in the block. A pointer is simply th~ address of The firs.t word of this block con1:.ains a pointer to the next block, etc. " to the end. \'i'hen a rout.ine n~~eds some place to store data, it can remove a block from fre€core, adjust the list accordingly, use the blOCK, and later return 8-8 i1~. FQJ"f C--:J---t------. . --. . .-----. . - t-------i ORGANIZATION OF FREE CORE As blocks are removed fro~ and replaced back into free core, a count is ret.ained of free core size. FRECNT This is in location FRECNT. always contains the number of unused 8-word free core blocks. Ncte ~tiat all free core block::; begin at an addI'ess divisible by 8; that is the last octal digit is a ~. If a free-core block ever seemS to st,lrt at an address which does not have th(! last digit 0, the syst'~m :.S in trouhle. This free core is used by the Moni tor for a vaj: iety of purposes. Terminal bu~:fers are made up of linked blocks of fr(~e core; device and job status information are also stored in the feee core. Free core is also used in a number of instances for temp:Jrary scratch storage. The de'1ice handlers for terminals and the assignable devices make extensive use of free core. Both are based on a single, flxed- length tabl!~ of devices I DEVTBL. DEVTBL contains a l-word entry for each sy:3tem dE~vice (a console counts as two de\) ices: and telepri1ter). keyboard If the device is unused, the ent,ry is zero. If the device is active, the entry contains a pointer to a block of free core known 3.S the Device -Data B10·:::k (DDB). status infocmat.ion for th.at device. for each del/ice. This block contains the In addi tion, there is a buffer For most devices, the buffers arH dynamically allocated f rom free core. As characters are enter,~d from the keyboard and put in the buffers they are put into a-word blocks of free core. As one block fills, another is fetched from free core and linked to it. As characters are fetched from the ~uffer and passed to the user program (via trapped RIms), blocks at the other end of 8-9 the buffer are emptied and returned to free core. Withi:l the DDB are pointers to the head of the buffer (the -fill pointer" which indicates where the next character is to be put into the buffer) and tle tail of the buffer (the "empty pointer", which indicates the next ("haract~r to be pulled out of the buffer).. Input ;)llffer~; and output buffers work in the sarne way_ Thus, console input and output opel::'ate independently from the rest of the system. As characters are Emtered, thE!Y are put into input buffers (up to about 9~ characters). If the character is one designated as a delimiter, the user's keyboard status bit is set. As characters appear in the output buffer, they are typed. Buffers expand and shrink to meet the needs of the moment. This is the limit of the responsibility of the terminal ha:ndler. The terminal handler merely passes characters and adjusts the appropriate flags. Just as each active console is marked in DEVTS::", each active job is marked with a job status table, JOBTBL, which is a fixed table with a I-word entry for each possible system job. Non-e:cistent jobs are marked by zero entries. Existing jobs have an entry which is a pointer to an assigned free-core block which is its first job status block. Each job actually has several bl4:>cks of stat.us information linked together i these status blocks con1tain all information about this job's running state. If there are open files, blocks exist which contain their status. Finally, t.here are tables the Monitor keeps whi::h.indicate the status of the s.ystem. CORTBL, which indicates where jobs are in user cores, is the most important of these. 8-10 CHAPTER 9 SYSTEM STORAGE AND COMMUNICATION ~,,,l TALKING 'I'O THE USER until now" we have assumed that jobs running in the system ,dther did no :C/O or simply' did console I/O. In doing this consolE:! 'r::.:); characters were passed in a manner analogous to a stand-alone ""-8. J .( .: No men1:ion \lIas made of how the program was started in the ;',:st place, mllch less hOvl it was loaded and otherwise controlled. '~-:;5'~ are func"cions which, on a stand-alone machine, are not per- ::::-:ned through the terminal at all -- they are done through the :" . L~tches on th,3 con'sole. I",.~re "'.' is only one physical device, the user's terminal, thrnugh ,~ '>eII ~,,;c.jch '~iith , ft When talking to EduSystem 50, however, to perform these two kinds of communication: communicat"ing EduSysi:em 50 and communiccLting wi th a user program running as job wi thin that system. EduSystem 50 makes a careful distinction between these two c.c~es. A user is always uniqu(~ly in one mode or the other I c1ependil C~ the state of his job. ~is console is put in program communication mode. ,~Jde Whenever a user starts executing a progra! It stays i.n that until the program is interrupted or terminated. If thE-~ progra' is terminated, the console automatically returns to system c0mmuni- :ation mode. 5j'stem wi thout It is also possible to make one-shot inputs to the hal ting the us€:r program. In order to minimize confusion, EduSystem 50 has some conven,,:ions to distingui.sh between syst.em and user mode. "''J~es a period at the margin to indicate that a terminal is in syst ~. t' ~~de The system alw.:", and that the system is r(~ady to accep't a new command. The C:'RL/B charact:er tells the system that regardless of the mode of t! ~rminal, ~hcugh the characters following the CTRL/B are to be treated as the terminal were in system mode. Thus, even if the termin, ;<; in user program mode, all characters following a CTRL/B up to t. ..... ~ext carriage return, are input to the system. 9-1 When the user walks up to an EduSystem SO console, he fir~s it in system mode. If the user types a carriage rl:!turn, thereby .• entering a null command, EduSystem 50 responds with a 'I,)~~ ~,'inol '"',""l'l p'~riod tht·n typ0 a command to the system. at the margjn. The At this pC1int, H,e tcr- .. } actually in a special system mode _ .• it is logged out. This means a) Input is not echoed to the terminal, and b) Only selected commands, such as LOGIN, TIME, and VEFSION, are considered valid. To the system all other commands are illegal. Thus;, the first thing a user does is type a I,OGIN command, which consis ts of the command LOGIN followed by an account number and a password. If the account number and a password are valid, the user is loqged in. The terminal remains in the system mode, but input is now duplexed and all system conunands are now valid. (If the login is invalid, the user must try again.) The user remains in the system mode then types a cc'mmand ''''hieh causes a program to be started. This is done! by means of the START conunand which takes an octal address as an aI·gument. can also be started: wi th an R or RUN command.) (~. progr 3.m The STAFT comm:md starts the program and puts the terminal in Ulser prograIl' mode. Cnce a program has been started, there a.re two ways to st"p it, thereby returning the console to system commu.nication modp.. O:le way is for the program to execute a HLT. The other way is to 'type an S (for STOP) command to the system. However, since t!1e terminal is in user program mode, it is necessary to preface this S by in order to get the attention of the system. CTRL/B Notice tha t by t:{ping CTRL/B whi Ie a program is running, many conunands may be system. ,3 f~ntered to the Only S, .however, will send the terminal back to system mode. With the other commands, the program continues to run and hence the terminal returns to user program mode. So far only three Monitor commands have been discusfied: STOP, and LOGIN. There are, however, many more. :;TART, (They t:lre de::;cribed in Appendix B.) The set of commands enumerated in Appendix B is designed the user convenient and comprehensive control over prograrr.s. can do debugging tasks with commands such as 9-2 ~XAMINE, and ':'0 ~rhe DEPOSIT; give user store and retrieve programs with commands such as SAVE, LOAD, and RUN; and control additional peripherals with command!; such as ASSIGN and HELEliSE, etc. i'he handling of all these syst.em commands is accomplished by means of a nonresident system phantom called the System Interpreter. SI's task i!3 to scan and interpret system input strings and either execute t:hem direct:ly or reduce th(~m to a concise ceded form to be e;ecuted by anotheJr part of the Ed'IlSystem 50 Moni tOl'. 51 is called by the terminal handlers (part of resident Monitor) whenever a system command (of ::en ref,erred to in the documentation as an 51 string) is input. Characters being input to the~ System Interpreter are handled by the te~'It'linal input. routines exactly the same way as characters being input to a user program. In eithE!r case they are placed in the MultichClr.~cter terminal input buffer until a delimiter is detected. (Delimiters for 51 strings are CR, LF, vertical tab, form feed, and rubout if the buffer is empty.) It is only when tte delimiter is seen that th(~ two types of input strin9s are treated differently. In the one cass, the characters are passed to the user program; in the other they are passed to SI. A bit in the input Device Data Block, the "ro~te characters to SI" bit., is used to remember that an input string is actually an 5I string. This bit is ~lways set when the terminal is in 51 mode. It is also set whenever a CTRL/B is input. A comrrand to start running a user program clears the bit. If the "route characters to 51" bit is set, input characters are checked ag.;.inst the System Interpreter delimiter mask (carriage return, If the input char~cter is a delimiter, a second ODB bit, the "51 command delimited" bit, is set. Also, a VT, FF line feed, and rubout). scheduler register, COMeNT, is incremented. COMCN'J', at any given instant t reflects the number of users who have 1:yped in a whole command tel the system and are waiting for a response. The scheduler checks COMCNT every tim€~ it runs. As long as COMCN'r is ;:ero, everything is up to date. However, if ceMCNT >f,J this means that someone has an SI string waiting. In this case, the System Interprete!~ is scheduled to be swapped in and run. It is brought into field. two ilnd started up just a.s any other user?rogram. The princ~pal I 9-3 Lllfference is that 51, being a system phantom, is run in E!XeC mode. This means it can execute rOTs without trapping back to fj.eld ze:ro. Specifically, it may do a COP into the Monitor core in order to inspect DDB!=.. W; . . ~;1 it finds an "SI command delimited" bit set, SJ: knows what called ic. Once it has found what called it, SI reads the command string to find the basic command. commands. SI has a dispatch table for all valid For conunands which take arguments, the string is scanned to pick them up. If an error is detected anywhere along the line, 51 exi ts back to the Monitor after typing an error message back to 1:.he user. I f the command is valid, 51 must decidelNhat to do lNi th i 1:. SI is capable of executing many commands on its own. it calls for help. another nonresident subsystem, the File Phantom. :3 I r~ducc:-. For the re:;t, For all file operations, it must call still For thes~ commands, the input string to a concise command code whic:1 is then passed on to the appropriate portion of the Monitor. SI itself is essentially reentrant. command string, from the Monitor core. It gets its inpu~, the SI operates on it, and puts any output, either a response string to the teleprinter or a con(:ise :::ommand to be executed by some other part of the system, back in1:0 Moni tor core. S1 may be thought of as the English lan"guage interface between the user and the system. commands in a s~mple format. It allows the user to ent:er These input strin-gs are tran~;lated SI into a form that the rest of the system can understand. by It resides on the disk and is called in to perform this interpretation and translation function '4henever a user requires it. 9.2 DISK STORAGE AND FILES Up to now, the EduSystem 50 disk has been mentioned orly as a swapping device. For each job, there is a dedicated 4K area on 1:he dlSk in which the job is stored when it is swapped out. however, the only way in which the disk is used. This is not, The low-order 1:racks of the first disk are used to hold an image of the system. tains the System Interpreter Phantom. lSSSS-17777 contains the E'ile ?hantcm, part of which is tables and part of which is code. 4K S-77~'7"con of FIP is brought in whenever it is called. The entire If FIP updates alLY of its tables, these are written back out to their place within the disk imaae. 51, which contains no internal tables, is never written t)ack after it is called. The next 4K of the .disk contains an image of the 9-4 system initializer. It i:3 brought in only at syst'~m startup time, it is not use1 while the system is up. for easy system restarts. thE: id.:::rit Monitor. .t. .:! It is kept on the disk to allow The next 8K is used to hold an image of It is brought into fields zero and one by the initializer at system startup time. running system. It is not accessed by the Like thQ image of INIT, it is kept on the disk to allow rapid recovery from crashes. The area of the disk ~mmediittely above the s~'stem image is used for thE~ swap are';lS. There is 4K for each possiblE! system job. (A 16 user system thus uses 64K of the disk for swap tracks. This, plus the 2,K cf system image, totals B4K of disk which is taken for system usage~) All I'emaining space on the disk is devoted to on-line file If the system has more than one disk, t:1e additional storag'e. surfaces eIre completely devoted to file storage. The file area is allocated in 256-word segments. EduSystem 50 provides usera and user prograrrs with the capabilit~ of setting up files in this area of the disk and of reading and writing them. These files may be of arbitrary size; they are, however, made up o,E an integral number o!: disk. segments. reserves d Creating a file segment of file space on the disk and associates with it the symbolic name specified in -the create command. The user may open this file, thereby allowing it to be manipulated. He may extend tht! file a gi'Jen number of segments, thereby reserving more segments of the disk for the file. Extending a file puts the new segments on t:1::: "end" of the already allocated segments. Reduci:1g a file returns on(~ or more segments from those reserved for this file to the pool of available segments. The user may also rename a file. These four basic functions of creating, extending, renaming and reducing (deleti~g is accomplished by reducing a file until there is nothing left) have nothing to do with the contents of the file. They merely define and resel've a certain amount of spa.ce on the disk. As far as the user is concerned, these He addre~ses, and therefore manipulates, the one big long disk area. se~~nts fi~e are contiguous. as though it were The actual size of the file, as determined ,by creatE!S, extends, and reduces, is important only in that a user cannot write off the end of the file. 9-5 The file itself is considered to be madt~ up of 12-bit data words. There are no control words in the file; all the space ~ithin a file which a user has defined is available for program storsge. T~e user adJr€.~.;-:-:.!s a file by internal file number and an addresf, withir. that file. The first word of the file has addres:s zero. U::ing this file address, the user may transfer data between ,:1 selected part of the 4K' core and the addressed point in the file. Although only 4K mily be transferred between core and a file in one transfer, the size of files ;;. E by no means limited to 4K; ~B .bits are al!;oca~ f,:,!' fuslt ':J..le ;:;et'tI.leen tlpes vi files. AII':i les arc: rr.ada up of 12-bi t data words. Whether these 12-bit words contain single ASCII characters (or, indeed, characters of any other code), pairs of trimmed characters, numhers, or whatever, is immaterial to the system. How the data of a gi~ren file is interpreted by a program iS of course, what matters. I That segments of a file appear to the user to be contiguous is an illusion. Disk segments are, in fact, allocated at random. EduSystem 50 maintains directories in order to remember the segments allocated to certain files. As mentioned above, the actual segments which make up a disk file are pure data area. Segments of a file are not chained together; there are no header words attached to a s~gment. For each user, EduSystem 50 maintains a User File Directory (UFO) that holds the names of all files a given us~r is ~aintaining and the disk segments of which it is comprised. NOTE The diagrams at the end of this manual will help in understanding the EduSystem 50 file structure. The UFO is divided into 8-word entries. For each file thE're is a single filename entry. The first three words contain the filename (6 characters packed in EduSystem 50 internal format). Words 4-6 contain information about this file. Word 3 contains a pointer to the neKt name block in this user's UFO. This poirlter is '..lsed to chain through the UFO name blocks. The final word of the name block (Word 7) contains a pointer to a File Retrieval Information 9-6 Block. Each name block has associated with it one or more of these retrieval blocks. They are also a-word blocks and are interspersed wi th the ncL1tle blocks in the UFO file nanle Ii .. o( k~" • nef~d (hence the to chain the The first word of the retrieval block is a pointer to the next rE!trleval block for this file (or zero if this is the final block) • Ttle next seven words contain a list of seqrnent numbers of t.he segments which comprise the file. The file is con:3idered to run from the fir'3t :;egme'1t in the file to the last. terminates the list.) a file (tht~ addresses zero segment number (A The algoritl".rn for assoc:ati:1g addresses within means by.which a user addresses hi~ file) and physical disk (the system's ways of addressing) is str:1ightforward. file addre;s is divided by the segment size. logical fi Le segm.ent number. The '!'he =iuotient is the Counting down thf! fi Ie retr ieval block.' s list of seJ1Tl.ent numbers to this number yields "he physical segment number. (If t.he list runs out tela soon, the u:,er has run off the end ofh:-r file.) In the actual implementation, the UFOs ar~ files. up of disk segments just like any other file. into which the UFOs are divided are merely a (The a-word blocks s)ft~are order to keep track of these UPO files, there directory, the Master File Directory. In mad~ They are ~9 division.) In still another form~t, it is virtually retriev~l identical to a UFO. It is broken down into 8-wort name and informaticn blocks. The 3-word names in the n,lme block are, however I login :rDs rather than filenames. The first word contains the account-. number as a 12-bi t binary number I the next two wOl'ds contain the 4-character password, packed in internal code. Taken these thre e \t./ords constitute the "name" of the UP). alcogeth~r, ( The ~.w Dis I 0 :' course, aJ so used at login to see if the accm.::1t num!)er and password are valid.) The file retrieval information bl'Jck linked to the block (in the case of the MFO, only one retri~val block p~r u~n n3IT'e lS allowed) contains the numbers of the segments ..... hich make up t::e CFD for the m;er. To complete the symmetry, the MFO is in t.urn a disk file made t.:? of segmen':s. It, however, always starts with seg nent 1. The 11FD and UFOs take care of the segments. proble~ of allocated disk There is one further table, the St,rage Allocat.ion Table {SAT), whi.ch keeps track of unallocated segme:,ts. which is 3et up when the system is for each 3egment • . . initialize~:. SAT is a bit table It contalns a bit the bit is cleared if the corr2spor;ding sE'g!':"e:,·· 9-7 is available, it is set if that segment is allocated. for disk segments get the segments from the SJl~T All requests table rou':ines. larly, no longer needed segments are returned to the SAT. If ~ ~·le Fo~ Simiexample, is to be extended a segment, the SAT routines are called. They l..:.turn with the number of an available segment, whicl is added to the list of segments: in the retrieval blocks for that fila. Files are reduced by deleting the last segment nu.mber or nwnbers fr,m the list and clearing the corresponding bit(s} in the SAT table. 9.3 TALKING TO THE DISK: THE FILE PHANTOM Most of the tasks described in Section 9.2 are accomplished by a second nonresident section of Monitor, the Pile Phantom (FIP), FIP handles all disk manipulations except actual reads and writes. the System Interpreter, it resides on the disk. Like It is called ty the Monitor to perform functions which cannot be handled by resident routines. All tables relating to the disk files are kept within the 4K which FIP occupies. called. They are swapped in with PIP whenever i.t is Whenever they are updated, the table!3 are immediately written back to the disk by FIP. In this way, the disk always contains all information about itself. The disk is thus protected against loss in most system crashes. FIP's primary task is to do the file handling. UFOs I It maintaj.ns the the MFD, and the SA'f, performs all the needed searches of these tables, and executes the basic file commands of CRl:ATE, REDUCE, and RENAME as discussed above. ]~TEND, These all happen independently of the resident Moni tor; they result in changing the sta1:us of the disk only. PROTECT is similar; it allows the protection code on a file to be altered, but nothing more. OPEN and CLOSE, h(~ever, are somewhat different in nature. OPEN and CLOSE do not alter the disk in any way, thl~y sim;>iy establish a link between the resident Monitor and a disk file. is important that OPEN and CLOSE do not affect the disk. (It Newly- created files exist even if they have not yet: been closed out.) Job may have up to four files open simultaneously. Ther~ Each are four registers in the la.st job status block which record the;tatus of these four internal files. If there is no file open on an internal file number, its corresponding job status block word is zero. of job status blocks, Figure 0-8.) ~Try sets ~p 3 ~~w (See diagrams When a file OPEN comnand is given, !ile centrol block in free core. 9-8 This block is used to hold pertinE~nt information iibout the open fi 1e. A pointer to this file cor.trol block which remail:1S set up as long as the file is open, is placed in the job status block register for this internal file. thE~ At this file.. same 1:ime, FIP sets up a second block in free core for ']'hi.!:J block, the file wi::1dow, contains onn of the file retrieval information blocks from the UFD. At the t:.rne of the OPEN, the first fiJ.e retrieval information block is put in the window. At the same 'timn, the fact that this is the first windo\J is recorded in a register o~the file control block. OPEN is complete. Once all this is done, the CLOSE mer.ely dismantles all this dnd zeroes the register in 1:he last job status block which correspo:lds to this open file. Opening a file automatically closes any file 'rlhich was open on that intel:nal file at the time. CREATE i.s the only file command that does not have to be preceded by an OPEN. All other file commands operate on intecnal file numbers rather than filenames. In the case: of EXTEND, REDUCE:, and PROTECT, this is to a llow for file protectictn. is part of t~e OPEN routines. The file protection apparatus Files which are read-protected against a user ca.nno·t: be opened by him. If a user is allowed to read but not write, he is allowed to open a file but a write-protected bit is set in his file ·:::ontrol block in free core. dered to be the same as writing. is indicated. ~~hey EXTEND and REDUCE are consiare prohibited if write-protect The PROTECT command" which sets these various modes of protection, is illegal except for the file owner. Finally, there is an implied protect on files open to more than one u~er. If a file to be opened is already open to another user, it is write-protected to prevent confusion. RFll:'E and WFlr~E, the file read and write commands, require the file to be open, because they need the information information blocks. FIP to b.~ called. itself. ~n the c?en file RFILES and WFILES do not, in gEmeral, require The Resident Monitor attempts to execute them It takes' the file address given as a paraml~ter to the command and compares it against the state of that file's window. It sees if the segments in the window correspond to the part of the file involved. If so, it executes the transfer. (Note, that if it is a write, the .... rite-protect bit in the file control bl<)ck block is checked first.) If the window is not properly set, the resident Monitor calls FIP to move the window so that it is looking at the specified part of the file. PIP then returns to the Monitor so that it can do tt.e transfer. 9··9 FIP is called whenever the !olonitor discovers a request that it cannot handle. Before calling, it must set up the appropriate conunand and parameters so that PIP will 1< no",' what to do. This command is alwclYS in the form of an lOT; one of the EduSystem SO lOTs. If parameters are involved, they are passed in precisely the format that they are specified for the lOT itself. ThuE" C~EATE takes three words of parclmeters, OPEN 5, etc. Whatever th(~ lOT, the lOT and all ii:s parameters are placed in block of free'~core A pointer to this block is placed in the job status block register referred to as JOBLNK. FIP j,s then called. If FIP is to return parameters, it does so in this san~ block. As soon as the block is no longer needed, it is returned to free core. Some lOTs do not take parameters. The AC is 1:.he only paI'ameter. In this case, no rOT Parameter Block is needed. ~rhe lOT goe~: into JOBLNK. (The AC is, of course, stored in another job status block.) If JOBLNK is less th~n 400, it: contains an lOT with the first 4 bi t:s stripped off. If .Jr;P.UIY ! 3 4fJO or qreater, it con1:ains the acdress of a free-core block which c0nta~ns the lOT. FIP maintains the Storage Address Table (SAT) which is located in the high end of FIPs 4K. Whenever the SAT is changed (a segment is allocated or deallocated), it is written back to the disk so that the next time FIP is brought in, an updated version of the SAT will come in with it. The SAT is the only permanent t.able that FIP maintains. It is never changed by a system restart. (I~itializing, of course, clears the SAT.) All other tables and data areas maintained within FIP are kept only as long as individual users are logged in. They are cleared on a system restart. FIP handles all the open-fi Le information lirlked into job status' blocks. These are set up on an OPEN, cleared out on a CLOSE, and suitably updated whenever a file is changed. FIP also maintains some intern,al tables which make its, operation more efficient. For example, when a user logs in, FIP opens that user~s UFO. It gets the retrieval information block from the MED and storesi1: in a table. By doing this, F IP does not have to scan the HFD e,very time it wants -to find a UFD. FIP also remembers how many users are logged in under this account number or are using a file belonginq to the account. Finally, FIP does all updating of the directc)ries, the t-tFO and UFDs. It has a 256-word buffer into which it can read directory segments. F::P scan:3 directories by roading them in one segment at a time until tllC desired entry i!l found. If it is changed, this segment is then written hac],. out to t.he disk. If the directory is extended or reduced, FIP updates the appropriate retrieval inforlnation block in the MFD. See Appendix D for a more deta,iled discussion of the FIP tables. All dis:, transfers, whether they are swaps, user program I/O requests" or FIP table or directory transfers, are handled by a common disk rout:ine. Most disk transfers go between user fields; resident Monitor never does transfers into field requests tra1sfers in field 1. ~, and only the OECtape handler Th4:! common disk routine takes a standard set of parameters which a:r:e stored in a block of free core. They are: di l:"ec::tion of the transfer, the field involved, the disk address (physical), the core address, the number of words to be transferred, and the address of the routine to go to when the transfer has been completed. The disk routine sets up the t::ansfer, does it and then dispatches. If it tries three times and fails, it dispatches to an error handler instead. Since requests to do disk transfers ~an pile up, there needs to be some place to queue them .. In the case of swaps, there is a single register SNFEQ. If it is zero, nc) swap is pending. If it is nonzero, it points tc a parameter block for the next swap, in or out. get first priority. Swaps When the current transfer is done, this swap will be done next. All otter transfer requests are held in OSUTBL (often referred to as the disk queue). DSUTBL has a 4-word entry j~or each core field. A nonzero ertry indicates that a transfer is pending for that core field. (ThE entry points to the parameter block.) entry, each word corresponds to an open file. Thu~i, Within the 4-word if the job in fie'ld 3 wishes to read open file 2, it executes an RFILE. The resident Marti tor uses the retrieval window for that file (calling FIP to move! it, if necessary) to figure out the physical disk address. then builds a pax'ameter block in free core, and puts a pointer to it in the third word of the DSUTBL entry for field 3. then put int:o however, thE~ prt~ventE~d The program is wait state until the transfer is complete. It is, from being swapped while this transfer is taking 9-11 It place, This is done by setting the LOCK bit in CaRTEL to lOGk the user into core. This bit is cleared when the transfer is completed. (Disk trans f ers on the system disk' and the RlWS, and card reader t::-ansfers I ~Jhich are not buffered in Monitor core, require that the proqram remain in core.) Even FIP, when doing directory transfers in and out thE~ of its own area, or writing out its internal tables, "lSeS DSUTBL for queueing requests. 9.5 ASSIGNABLE DEVICES All EduSystem 50 systems include a high-speed paFer tapa reader. Some may include optional devices, such as a high-speed punch and DECtape. tem. These devices comprise the assignable devices for t.he sys- They may be used exclusively by individual on-li:1e useIS. Assignable dE!vice handling breaks down into three sections: dssigning and releasing the devices, a device handler, and code to pass cata beh/een the Monitor buffers and the user program. Assignable de"Jices have their slots in DEVTBL just as the terminals do. If the device is not assigned, the corresponding register in DEVTBL contains zero. When a user requests a device (and it. is available) a Device Data Block is set up and linked into DEVTBL. th,~ Within stored the number of the job which now owns the device. DDB is When~ver a reference is made to this device, the referencing job in chec.<ed against the job number to assure that it is the right one. checking is done at assignment time. No error Thus, all eight DECtape:3 could be assigned even though only two transports exist. When a US4~r releases the device again, the DOB is freed and a zero is returned to t!1e DEVTBL entry_ Also, the amount of time that the device was assigned is added to the user's device time. In this wa'{, USH of assignab:e devices is reflected in the accounting infortn.ltion .. Different assignable devices use differ,emt methods of buffering trlcir I/O. For example, the paper tape care buffer, is ac1:'.ivat.ed by a RRB lOT. read'~r, which USE'S a free- Finding the buffer empty, the Monitor puts the UBer job into an I/O wait s't.ate. This clearfl its reader flag and sets the corresponding bit ill the wait mask. sets up the reader service routine to read characters int:;, buffer. thE~ It then reader -" When the buffer has been nearly filled, the user's re:ader flag is reset, making the program runnable 'aqain. 9-12 The program then executes SUccE!ssive RRB lOTs to pick up individual characters. the buffe~ emptit~s again, the process rf!peats. the buffer by eXE~cuting an RCB inBtruct~~on. When The user may clear cperation of the high-speed ~unch is very similar. The ranning program passes characters to the Monitor, via trapped PLS instructions. These go into the punch buffer. If the buffer fills, the job goes into the wait ,state until it is emptied again. One diffp.:~ence is t;,ha .... punching is be9un whenever a{j•.'/ ch"r"f:VI~tJ tAl. 1r. t,r.I.tt '/1,I,V" ,,~ttft.~ ~~ Manit.Dr dOf~S net "'~.i,4: for ~..J.'." ,;.-""~,J . ·.~1#!, ',.",' /, ~;. / ; .',' ,.1,0, ",11.1 Ie. " -4 '.,,~ ~, ;:/' / _ .. ' 7 r '"'t r speed punch. DEC tape handl:.ng is different. assi<]ned and returned ·..,he..W} released. 0 D Bs are set up when they are Since there are -=!ig~.t :::rcsslbole L:E:::+...apes .. the MI:mi:.c.r res.i~C"'Je5 ei1ht ~ord!) lrl '!jy.V'n"1.. 'f"'~ V."If~C'# :if,"<t z:re used for re.:ids and writes. Since the OeCtap~l 'contro, j q ( P}J j'/W/II ac.:ess to only I::>ne transport at a time, tr.~rn i,. no ~J'"". I I, t""11 rl'~ , a I".ooi tor buffer f ~r tJAch on.". 1" tl"'t'l t h-.H,. j ~ '"d I 'I"", , .. ''1 ~ ,I U"'r. of the number of unite.. At t.he t~bl. " f,Jf'J'.fI 1'11'1 I ~"""'P~... transfer, the Moni tor starts the desired tranlfl.Jol't t.owf'lnl U,H lJ.", requested block, and the job is put into a wait state. is almost at hand, the Monitor Assignn t~he When the block DECtap(! bu ftcr t.o thllt job, stopping the tape to wait for the buffer if necessary. On ft read, the selected block is now read into the huffer, and transferred to .~he user, either ty transferring to his core field or by ~riting it to his swap track on the disk. Conversely, on a write, the tlock is moved from the USE r I S core or from his s\Jap t.rack to the DECtape buffer, and thEm writ.ten to the tape. The RKOS and card reader are simila;r in that they both lock the user into core and transfer directly to/:Erom his buffer. Although 1:.hefle are the only peripheral devices supported by the EduSystem 50 Moni t:or I they provide a good model for users who may wish to incorporate thl:!ir own special devices. In all cases, thrne software modules are involved: on-e to handle device assignment, onE~ to handle data transfers be1:ween the user program and the Monitor, clOd one to do the actual device handling. Space in the Monitor is available but not in large qLlan;:i ties. 9-13 9.6 ERROR HANDLING The EduSystem 50 Monitor allows the user program a great deal of ,reedof(, l.T1 the way it utilizes system resources. error checking is kept to a minimum. Therefore, I,ystem A user may have a job do anything that does not affect another job, or the system as a whole. For exam- pIe, a program may wipe itself out without interference from ':.he system. The first level of error handling comes when a usel prog:ram requests the Monit.or to do something it cannot do, for example, opening a file that does not exist, or reading from an internal file number for which no file is open. For all such logical errors, the Moni,tor returns an error code to the user program. (For more informa'tion, see Appendix B.) Not all of these errors are simple logic problems. For example, trying to create or extend a file when the disk is full returns an error. other ,:ime would grive no error. Running the same pre'gram some Another non-logic error is t'1e parity error or directory error on a file read or \II'rite. This is th~ result of physical malfunction of the disk, a transifer error occurred either within the file it:self or within one of the Monitor's directories. The second level of error handling also comes when a user program requests somethinq which the Monitor cannot do. For exc.mple, the user program requests service from the high-speed reader when owns it, or when it is assigned properly, but th~re some~ne else is no tape in it. Another example is a physical disk error when trying to swap this job in or out. In these cases, it is impossible for these jobs to continue. Therefore, the Monitor terminates them, and types out ar. error message and the state of 1:he active registers. User programs may, however, request that they be allowed to handle such problems. 1bey do this by executing an SEA lOT, which gives the Monitor an address to JMS to when such an errOl: occurs. This routine is responsible for finding out what the error was (the error code is in job status word 1 where it may be fetched by a CKS lOT), and responding to it. The user must clear the error s1:atus via a CLS lOT. The Monitor also does internal error checking which is apparent to the Ul3er. All disk transfers a~re ~ot tried three times. after the third t:ry is a disk transfer erro:r actually re:porte:d. I/O devices except the system disk have a t:lmer. Only All Each time a.n I/O operation is star'ted, the timer is set for .a number of e,econCls, iepeGd~~~ ~pon c~e jevice. :£ dn interrupt does not occur bE~iore tne 9-14 ", timer times out, the Monitor will signal a hung device. In the case of a terminal printer, the output buffer is simply cle~red. All other devices report: a system error when hung. When the punch or line printer hangs, the Monitor reports the error and a.ttempts to re-report it every five seconds until either the device is put on line, or the device is released. In the first case, output continues, and in the second, the buffer is cleared. If 51 is called to report a hung device, it will report it only once. If 51 continu,~s to be called eyery 5 seconds, it wi 11 simply ring the terminal bE!ll, tryinq to get the use:, to do something. APPENDIX A UTILITY PPOGRAMS The following programs are used commonly in EduSystem 50. The information sriven here is meant to be only a quick summar" of their For more information, refer te) Users Guide. . use. A.l !!~.!£ 'Iype R BASIC to execute BASIC. BASIC asks "NEW OR OLD?" ~rswer eLl) t(l execute a program sto:r:ed on disk. BASJ:C asks for the name of the program. Respond with the name if the pl:ogram is stored under your a,:::count number ~ If the program is stored under account 2, respond with the name immediately followed by an astf!risk. Optionally, follow the name with a space and an account number. BASIC n.::)w responds with "READY." You may now add or change any lines simply by typing t.hem, list the program by typi.ng LIST, or run it by typing RUN. To interrupt a running program, t:lpe a CTRL/C. To return to the Monitor from BASIC, type BYE. A.2 CAT A user may type R CAT to run CAT, and obtain a listing of disk files. The system manager, logged in under account 1 may type R CAT to run CAT and obtain a listing of all users, their paEIBwords, amount of time used, f~tC. The accumulated time may be reset by answering "YES" to the q'llest~ion "RESET?". The syntem manager may type a R CAT:L to get a disk directory of any user. CAT asks the account number of the direc':ory requested to list. A-·l i~ is Any user may type R CAT:S to obtain a short SYSTAT. The system manager may type R CAT:R to reset all users' CPU ~ime. A.3 LOADER The LOADER loads BIN format files into core from disk. For input, type the name(s) of the input file(s), separated by commas. For option, specify 0 if debugging using COT is desired. Normally, just give a carriage return. The LOADER will not correctly load locations. 7767 - ~777. If ODT is used, locations 4 a~i 7000 to 7777 must be reserved for it. A.4 LOGID The system manager (account 1) may define, change, and delete ~ccounts and passwords at will. See Section 6.1, defining accounts and passwords. A.5 LOGOUT LOGOUT is nm in response to the LOGQt;IT or KJOB Melni tor commands. See LOGOUT under Monitor commands for additional details. A.6 PIP: PERIPHERAL INTERCHANGE PROGRAM PIP moves files betwee!n paper tape and disk, deletes disk files, or prints them on the line printer. PIP hilS been replaced by PUTR. However, in case some systems desire to USE! PIP, here eire instructions. When PIP requests INPUT or OUTPUT, reupond with a carriage return only, to specify a paper tape reader, papeJ~ tape punch, or terminal. Respond with a filename for a file under your account. Respond with a filename, spaCE~, then account number for a file storIed under someone else's account. When PIP requests OPTION, choose from the following lis,t: B - Transfer a BASIC program file! between the disk and the hiqh-speed reader or punch. The response to l.NPUT: and ou~rpUT: indicates the direction of the transfE~r. A-2 o - Delete the file specified for input. F - I.ist a BASIC program on the line printer. K - I.oad a save format pi'lper tape from thE! terminal. The Monitor must be patched to enable thifl option to operate propE!rly, as it nOrmillly forces the pClrity bit on for terminal input. L - Transfer an ASCII file from the disk t~o P - Punch the contents olE a disk file on t~he R - the line printer. high-speed punch. Read' a tape from the high-speed readez' and store it as a diEJk file. S - Transfer a SAVE format file between tt.e disk and the high-speed reader or punch. The response to INPUT: and . OUTPUT: indicates tho direction of thE: transfer. T - Tran!:lfer a file betwt!en the disk and t.he terminal reader or punch. The response to INPUT and OUTPUT indicates the direction of the transfer. A.7 ~~ SYS'rAT may be run to obtain the status of the :3ystem by typing SY or SY~T~T. The SYSTAT may be output to the line printer by typing S-:':-:TAl'-L. A.8 PUTR PUTR i.; a program designed to transfer information from any EduSystem 50 device to any other E:duSystem 50 device, with numerous options for di fferent formats. FOlr further details see Users Guide PTt,OAD is TSS/8' s version of the Binary Loader. To use PTLOAD, load a binary tape in the appropriate tape reader, and type "R PTLOP..D". To "OPTION-", respond \I1i th "T" for the terminal (10"1speed) r'eader, or "n" or any other letter for the high-speed reader. When using the low-speed reader, 1:urn it off when the tape reaches trailer code. Binary tapes may n<)t be read from a terminal without patching the monitor. A-3 A.10 GRIPE GRIPE is a program which allows any user to leave a message for the system operator. type ItR GRIPE". Monitor. To initialize GRIPE, log in under account ) and GRIPE should print "THAT'S A]~L", and return to the The initialization is complete. To use GRIPE, any user types "R GRIPE". GRIPE prints "END WITH ALTMODE", and then clilows the user to type hif:J message, after ~'hich he should type an AJ~T MODE (sometimes labelled ESCAPE) • When the operator desires to read the collected messages, he should log in under account 3 and type "R GRI:t>E". have all been print,~d, After the mE!Ssages they will be deleted and GRIPE wi 11 be ready to collect more messages. r.~IPE II GRIPE" stores gripes in an unprotected file under account ~I named Any user who discovers this can read or destroy thifi file if he wishes. A.ll OTHER PROGRAMS INCLUDED IN THE LIBRARY: CATALOG may be LISTed under BASIC for a list of some BASIC games and demonstration programs. PLOT is °a FOCAL program to plot a damped sine wave. HAMURS is a FOCAL game, as is ROCRES HAMURA and ROCKET are saved images of HAMURS and ROCKES which are run by simply typing "R HAMURA" or tOR ROCKET". WDGAME is a FORTRAN demonstration. It may be used as follows: • R FOR1r 1 NPUT .• WDGAME OUTPUT INPUT - DATA OUTPUT MATRIX is a FORTRAN demonstration which multiplies 2 square matrices. TYPE is a PALO demonstration program. ~rhen assemble:i, lo!ded, and started at 499 it prints "~l23456789". A-4 The follo~>1ing p)::o~J;:'~r\vJ fU:O "ncl tJ~(~n nrjcr.lficnlly t,o run under EduSystem 50 and to test variouG cnpabilitien of the Monitor. These progrc~9 can be used aa system confidence teats, or they may be used by service personnel to exercise peripherals without brillging down EduSyst,em 50. A.12.1 TSTlwtEM This is an :EduSystem 50 memory diagnostic '. If an error is detected, the diagnostic prints a message or halts. 1 Execution: . To execut:e TSTMEM, type "R TSTMEM". The program prints "11 occasionally to indicate tha,t it is running. tf Otherwise, the program runs until an error occurs, or ur.til it is stopped. A.12 • 2 TS~~DT This is an EduSystem 50 DEC1t:ape diagnostic which writes 2nd reads random data on random blocks in a :random directicn \'li th a random current address. Data and status errors are rc?orted, and a status report is available. Execution: If a line printer is available and on line, type '"R 'I~':.~/': ::,,'" II, where n is the number of a DECtape drive which has a scratch tape mounted on it. A-S The drive should be placed In remote, write enabled. If a lirle printel: is not available, type "R TSTDT" , and the diagnostic will ask for the desired unit number. T~e diagnostic initially confines itself to the first 200 blocks on thE~ tape. After a short while, it prints a status report, and then begins exercising the entire tape. STATUS REPOR'I'S: Typing any character other than CTRL/C causes a status report If the character is an E, the diagnostic will to be printed. stop '.fter the status report (thE~ operato:r may type "START" The status printed includes the total number to continue). of blocks read and written, the number of words of data erro::, the number of status errors, and the status bits returned by the Monitor. InclusivE~ These OR of all st~atus bits correspond to TeOl/TeOS status re!gister B. ERROR REPORTS: If a status on data error occurs, the printed information will include t~he DEctape unit number, status A and B for thf'~ transfer, the block number of the transfer, and the buffer address. In addition, if there w1ere data erro:t:'s, a tally will be printed, followed by the locations in l:rror.first address in the block should be the block number. The· This will be at the high end of the core buffer, if the block wa~ read in reverse. The data is printed as it would appear in A-6 ':n if tl1e block had been :r.'f~ad in the l'I',~;never ":"'1 f():~t'](u:-('1 c1ir:occt.:lon . . a recLd error occurs there is no "lay of kn()~'linq long ago, or in "lhich direction the block "-,,as \rri tt.en. :: the user dE~sires to stop a long error report I 1 CTRL/C. '. 12.3 he types This halts printing and resumes te!:lting. TSTRK , /'.f '~:;is is an EduSystem 50 RKOS dia9nostic which writes and ~ea.ds a random number of pages oj: random data beginning ~ a zandom cora address and a random sector. Data and ;tatus errors a:ce reported. , ;~xecution: rf a line print1ar is available and is on line, type "R TSTRK: Ln" , "where n is the number of a disk drive which has a scratch pack ~unted on it. The drive should be in the ready position, not ~ite-protected. If a line printer is not available, type "R TSTRK" and the diagnostic will ask for the desired drive rn:mber. rhe diagnostic exercises the diElk until i t i!:l stopped. After 4096 tJcall.sfers, it prints a "PASS COMPIJETE" message. ~ exit from the test, type E, 'followed by a carriage return. If thE~re if~ a long data error, prin1:ing can be stopped and testing can be resurned by typing CTRL/C. A-7 ERROR REPORTS: If an error occurs, the transfer parametE!rS are printed. This includes whether the transfer was a read or a write, the uni t number, the number of p,ages in the transfer, the RK05 stat.us, the contents of the AC after the DLAG, the initial sector, and the beqillUlillq' current address. The status returned corresponds 1:'0 the RKOS s1:atus register , but will be 0 if no error has oc<:urred. 'rhe value returned in the AC, after the DLAG, should be the number of blocks successfully transferred. If thE~ transfer is completed normally, this will be (P+l) /2, ~rhere P ia number of pages transferred. In addition, if data errors were detected, the information printed will include the disk sector numbe·r· where the error occurred, the address within this sector (O-377) and the good and bad data. A.12.4 TSTPT This is a test. of the high-speed paper tape reader and pUllG;' The test punches the special bina:ty count l?attl~rn and reads either the special binary count piattern, art A ONES AND ZEHOf TEST TAPE. A-a Type "R T::;'TP',e~J r. and l'lai ts fo::, a J~lh~:; C()ITLliU811do Aft.:~~r Cl punching. teD->. pr.in.t:,n a quick opt.ion nummary If i\ P is t:yped, the punch begins sufficient amount of tape has been punched, type P again to stop the punch. If an R is typed, 'the reader :starts when t.h.e test reads the first non--zero frame'; it decides which type of tape is in the reader, and then it continues. If the user wants to stop the z~ea.der, he has to type another R. Typing CTRL/C : causes thE~ t~est to halt after releasing the devices. ERRORS: If the fiJ's't: non-~ero frame, on a tape being read, is not 001 OJ, 377, the test prints a message requesting paper tap4~. the If an error is E~ncountered within the tape, the expected and'read values are printed. Because of the buffer- ing by the Honitor, the physical position of the tape will not be cl,osE~ t_o the frame in error. If a "HUNG DEVICE" message is printE~d, the papeJ~ tape punch :Ls probably not turned on 01: is not responding for some reason. also occur if the reader was turned off. This could If the reader hangs (re:ad:3 to the end of the tape), the message "READER lihen a device is hung it is not ASSUMED", m;;ty be printed. altvays pc.ssiblefor the test to know whether it was the reader or punch which hung. will han~r But if it wag wrong, the punch a·-;ain in a few seconds. A-9 An "ILLEGAL lOT" mE~ssage probably means that another job owns the punch or reader, and it cannot be assigned. l10t The PC does necessarily point to the invalid lOT in question. A.12,5 TSTLPT This is a test of the ability of EduSystem 50 t.o output to ,the terminal and the line printer. The test will t:.andle 72, 80, or 132 column print.ers or terminals, 64 or 96 characters, and four different patterns. Execution: f11ype ttR TSTLPT". ~?he test prints a quick opticn surmnary and then waits for a ccmunand. begins printing. If a "T" is typed, t.he terminal If a "T" is typed again, the printing stops. The same is true of "L", and other commands may take some time to take effect. Typing a 0, 1, 2, or 3 causes the pattern on th.e line printer or terminal to change. If "T" was typed more recently than "L", the terminal pattern will be affected, and conversely, if" "L" was typed more recE~ntly than "T" I the line prir..ter pattern", ' will be affected. Typing a 9 causes the line printer or the terminal to use 96 characters. Typin~f a 6 restores the normal case of 64 character. This affects ttL" or "Tn as above. A-IO '~:r?ing a 7 c(3.uses the line pr.inter or terminal to use 72 columns; 8 c.3.uses the line printer or terminal to use 80 \~olumnsi Wr (fol: Wide) causes the line printer or terminal to use 132 cl:>lumns. Again, this affects either "L" or "T" as ~xp~ained above. Typing CTRL/C causes the diagnostic to halt and the line printer to be relE~ased. Errors: The diagnostic itself detects no errors. bevisuall~r inspected. does Printed output should If thE~ line printel~ is not on line or not JC'es,pond, the monitol~ prints a "HUNG DEVICE" message. A.12.6 TSTBAS This is a tE!st of the abilit~r of EduSystem 50 BASIC to interact Execution: Type the underlined parts Jf the following dia::'ogue: .n BASl~ N:!:tJ OR OLD--~ O~ .. D PROGRAM NAME--:TSTBAS* READY 1illN- At this t:im1e, there is a pause for compilation. tions fOI~ use of the program are printed. test, do the following: :~ C HEADY BYE t BS A-II Then instruc- To terminate t~e A.12.7 TSTFOC This is an EduSysteITl 50 FOCAL program which plot.s a damped sine wave on the teI'lllinal, testing termlnal output. Execution: To execute TSTFOC, t.ype ltR 'rSTFOC". asterisk (*). Thc9 program prints an Type G, followed by a ca:C'riage return,. and the plotting should start. TSTFOC 4::ontinues until it is stopped. A-12 APPENDn: B MONITOR CmtMANDS An alpha:)etical list of all Mon:ltor commands is included here to make it easy to find any particular I:)ne. Some are re~ltricted, and may be used only by someone logqed in under account 1 or 3. When typing a c,ommand, it is not always necessary to type the entire word. In fact, each command may be shortened 'is long as that command does not become ambiguous. For example, EXAMINE may be typed instead as EXAMI, EXAM, or even EXA. However, EX or E cannot be used, because therE~ is a cornmand named EX'l~ENO, and System Interpreter (SI) would not knc~ which one was wanted. All raumhers in Sl commands are octal, with two exceptions. The word Gount in the EXAMINE command and disk segmert~counts in all cases are in decimal. Command:; may be concatenated by putting a semicolon between them; for example, OEPOS1T,O 5000; EXA 0 1; START 0 causes three commands to be exeGut,~d in sequence. Some commands may be entered while a program is r'o,mning. To do this I preface them with a CTRL/B. CTRL/B fallowed by flHERE will allow a user to find out what his program is doing without stopping it. All commands, terminated by a carriage return, =ause Sl to be read from track 0 i.nto field 2 to interpret the command. Many commands require Fi.le Phantom (PIP) for processing. SI then causes FIP to bE~ read from track 1 into fleld 2 over SI and executed. When FIP is finished, it: must cause Sl i:O be read in ovel PIP to finish up. Not(~ that the functions of ma,ny of these commands may also be accomplished by having a program e'l(ecute a UUO, which often resul ts in calling rIP. 8-1 B.l ASSIGN Purpose To allow a user to reserve a device. Devices are: R - High-speed paper tape reader P - High-speed paper tape punch L - Line printer D - DEC tape C - Card reader K - RK8E Example: .A H R ASSIGNED .A D D 0 ASSIGNED .A 0 1.1 o 4 ASSIGNED Note that one may either request a specific DEC tape unit or one can request any DECtape unit. The Bam.~ is true for the RK8E. If a specific unit is not requested, How? arl available unit is assi~~:: SI calls FIP to complete this corflmand. FIP checks whether the user ,~ill get the device and, if so, sets up a DDB and puts its address in OEVT13L. B-2 I3.2 BREAK Purpose To find or t,:> change the valuf~ of the user t s break mask. ~-lhen in user mode and typing i:it the keyboard, the ·user' s break mask determines which characters are significant enough to cause the user prog:rarn to restart execution (if it is waitin; for input). See lOT 6400-KSB Appendix C for details. Example: -BREAK 4000 • B.~EAK 40!30 First, the break mask is set to 4000. Then its value is determined. How? The break mask is kept in the th.ird word of the keyboard DDB. It is retrieved from there or stored there by S1. B-3 B.3 BROADCAST Purpose To allow a message to be sent simultanf~ously to all users. May be used only by a user under accow~t 1 or 3. Example: • BROAD THE SYSTEf-i IS GOI NG D()WN FOR p;~ ••• THE SYSTEM IS GOING DOWN FOR PM I'~ IN 5 HI NUTES 5 f1lNUTES OK The message is sen1: to everyone, including the sender. [-lew? The mes:3age is simply jammed into all ou.tput buffers. 5I checks to m.ake! sure the acc:oun t number c:>f the sender is 1 c.r 3. If free! core runs out before the messagE~ has been given to all terminals, SI returns t:.he error mesfsage "BUSY". Otherwise, the message OK is printed. B-4 n 1\ e CI.iOSE Pu':-pose To inform the Monitor that the user is finished with a file. See OPEN. Example:: .Cl.OSE 0 Hore than on.e unit can be E;pecified at t:he same time. Example: .CLOSE 0 1 2 How? PIP is called to process the r:ommand. FIP ·simply undoes everything done by an OPEN connnand. B-S B.S CREATE Purpose To allow the user to create a new file with the length of one segment. The file must have a name consisting of 1 to 6 cha!"' acters, the first c)ne being a letter. If a file already 8xists by that namE~, it is first deleted. Under account 1, the create conunand will not delete files (UFD's) nor will it aIle: duplicated account numbers to be created. Example: .CREATE FILE23 !low? FIP checks for validity of 1t.he command I deletes any file named li'ILE23, make~3 a directory entry for FILE23, and reserves on(~ disk se 1jIllen1: for the file. A protection COdE~ of 12 i;3 aSHigned to the new file (see PROTEC~~). B-6 B.6 DEPOSIT purpose 1'0 allow the user to change any words in the 4K of core at will. The U13er glves any addJ::"ess,' and up t.O ten (decimal) values in octal to deposit. Example: .DEP 10 7001 6046 5010 This deposit:3 a simple progrcun starting at location 0010. How? As needed,' SI either stores the values directly i:n the user's core area or writes the information to::> the swap area on the disk. B-7 B.7 DUPLEX Purpose To put the user's terminal into duple>, mode. when a user program is being execu1t.ed, ~nd Normally I the 1:erminal is in user mode, characters typed at 1t.he keyboard are not printed unless the program causes :Lt. Putting t.he terminal in duplex mode causes the Monitor ;:0 per:E-or.n this function automatically. Example: • DUPLEX How? SI sets the duplex bit in the te:tminal keyboard DDB. This is bit 4 of 1:he first word of the DDB. B-O D.S EXAMINl~ ?urpose :10 allow the uaer to examine hjLs 4K of core at will. 'Type the init:~a1 ac1dress first" and then th~~ number of words wantHd (in decimal, up to 10) I if qreater than one. Example: It EXAMINE 10 2 '70e 1 6046 .~A 12 !5010 HoW? SI either takes the information directly from the user's core or, if necessary, reads the information from the user's swap area. B-9 B .. 9 EXTEND Purpose To increase the size of a file. (see OPEN). The fil.e must bf~ ope~ned first Give th.~ internal file number, and then the numbe:: of segments (in decimal). E;~ample .EXTEN 1 10 'I'll i!:.l extends the file I which is presently open under internal· file number 1, by ten segments. The se~JInents are added to .... he end of the file; any previous contents are unalt'~red. Any files belonging to account 1 How? (MFD and UFD's) may not be extenc': FIP processes the EXTEND. F':[P reserves the require:, disk segments by setting bi t!:J in SAT, and makes the necessary changes {n the user's directory. B-10 B.10 F Purpose To get inf,orJ~ation about a file. opened (se~ The file must first be OPEN). Example: f r~ t~C),3.1 t..CJ d..f)..- e FI LE23 0~ 12 11!,:.. . 1\\ F;< f:,.e I/l Sl 6>",5: l?;re I L d'(.Ll-, F/ l.t~ flCtM.e This indicates the file currently open under internal file number 1 belongs to user (or account number) 3, is named FILE23, has an extension of 0, has a protection. code of 12 (see PROTECT), and has a SiZE! of 11 segments (decimal). How? PIP is called to obtain the needed informa- tion, which is then printed by SI. B-11 B.ll FORCE Purpose tl'he FORCE command helps the system manager control the other users. If desired, the manage~ may interrupt or even log out a user. The FORCE command allows the system manager or operato; (anyone logged in under account 1 or 3) to connec:t to any othel' . terminal long enough to issue a conunand. ~"or examplE~, if the' user at keyboard 10 has the reader and will not release it, the system manager may type: .FORCE 10 RELEASE R .nELEASE R will be printed on the user's console ':just: as though the user had typed it), and the reader will be rE~leas:ed. The FORCE command works exactly like typing on the affected console. Commands entered by FORCE are treated etS Mo,nitor com" mands only if that ceJnsole is in Monitor mode. 'J~he u.ser at a " console uses the CTRl:'/B (echoed tB) to put· the c()nsole in Monit· mode. Within a FORCE command, t is used to indicate that the next letter typed is a control character. For e):ample, the above command should really be typed: .FORCE 10 tBSJ RELEASE R The upar:cow followed. by B5 (not CTRL/B followed by S) acts jus·: like CTRL/B followed by S and assures that whatever the user 'at console 10 is doing is terminated, allowing the I'elease cormnanc tf..) be executed. In general, when forcing a Monit.or conunand, B-12 precede it by an uparrow followed by BS and semicolon, as shown above. Terminating the force coftlnand with a form-:Eeed (CTRL/L) will prevent a carriage return from being sent to the forc:ed terminal. For example, if the user at KlO complairts that his terminal is completely dead, the operator may die:cover with SYSTAT that he typed a CTRL/S accidentally. Tel restart this user, the operator may type: • FORCE 10 tQ and terminate the command with CTRL/L (E'orm Feed) instead of a carriage return. Terminating with CTRL/L is also use- ful when forcing a CTRL/C to a user. When bring'ing down the system, the follc)wing command wi '. 1 stop most obstinate users: Care should be exercised. If there is an error in typing the FORCE command, the error message may shc:>w up on the forced console, clnd the user will not know what happened. How? The forced command is placed i~to t~e p=~pe= If the command includes an keyboard buffer. uparrow, the next character is changed to a control character. B-13 B.12 KJOB Purpose is identical to LOGOUT in function. A KJOB B .. 13 See LOGOu~r. LOAD Purpose The LOAD conunand allows the user to load the core area. with data from a disk file. Often, this file is creatl;d b~{ a SAVE CC"TJnand, and has an extension of • SAV. 'ro use lO.ld, 1cype (separated by spaces): a) LOAD b) The account number the file is unde.r:. l~ay be omi tted if it is the user' s own aCCIJunt. c) The name of the file. d) The address within the file at which to start. If omitted, 0 is asswned. e) The address in core at ~hich to start. omitted, 0 is assumed. f) The address in core at which to stop. Hay be omitted. The transfer will continue until one of three things happens: If 1) The end of core is reached 2) The end of the disk file is reached, or 3) The core stopping address (if qiven) is reac: B-14 Example£;: .1.0AD PIP .LOAD 2 SYSTAT .LOAD PIP 200 300 400 .LOAD PIP 200 The first example reads' the file nanlf~d PIP into the \lser t s core, s,tarting at location zero •. Th4e second example does the same task for the program SYSTAT which is stored under account 2. The third example reads 201 words from the file named PIP into core, starting at file address 200 and continuin'3' through core address 400. Th.e fourth example reads the file PIP' starting at file addre~ls 200 and core a.ddress 0 How? SI calls FIP to open the file under internal nl.lmbel 3, and then passes a RFILl~ parameter block to the file handler in the residelLlt monitor. B-lS B.14 LOGIN Purpose 'ro r:.otify the Monitor that a person wishes to USE! a terminal, and to give an account number and password. Type: LO(;IN, then a space, the account number, a space, the passwc)rd, and then a carriage retUl:ll. If the LOGIN command is terminated with a line feed, the login mesaa.ge will l'l.Ot be printed. Note that the command itself is not printed, to protect the How? First, SI checks the command for validity. Then FIP is called to set up a number of tables to indicate terminal assignment.s, what time thle user obtained it, and the user's job number, etc. B-16 :', 15 LOGOUT ;,:rpose ':J indicate to the Monitor that the user is :Einished and ready to ;':ove the term: . nal. Also, LOGOUT gives the user a number of ,:::mvenient options. Type LOGOUT:? for an explanation of options, ;c: 5ubsti tute ()nf~ of the following for the ?: K - to cause the LOGOUT to delete all non-protected files. L - to list the user's disk directories. s - to save all non-temporary files, or I - to individually determine whether t.O save .or delete each of the user's files. Each filename will be printe·i. Type a P if it is desired to protect this file, an S to save it as is, or a carriage return only to delete the file. Q - ~ping to lc,gout quickly and quietly. no opt~on causes a logout with the default option, wtli~h s. ~xample : .tOGOUT I I .Ase ,'UN}{ ~OR1 ~OSL 'S~P00 .SAV .SAV ;!LE23 QB <12> <12> <12> <12> <12> 1 .. USER ( :~ETED ~~1JED 0, 3 FI LES ( ~APSED s t : 5 5 1 • ELOCl{S 11 • BLOCKS I DELETED : P 3] LOGGED OFF Ke0 AT 21: 16139 ON 20 JUL 2 FILES ( ;JNTIME 00100110 ( 1 • BLOCKS 6. BLOCKS 6. BLOC1{S 2. DISK BLOCKS> 23. DISK BLOCKS) 1. CPU UNITS) TIME e0.06149 '0",:,., 7/1 is B.16 OFF When the manager desires to bring down the system for variot:· . reasons, the OFF command is given. under account 1 or 3). - (The manager must be logged i: Then, anyone who does a LOGOUT cannot LO~· ,. , unless the account number is 1, 2, or 3. See ON. The manager c~: then broadcast warnings and/or force a LOGOUT. Example: .OFF 8I sets· /w? 1, 2, B.17 o~ PlOFl"J in field 1 to 7774, allowing only accot.::, 3 to log in. ON Purpose \ The opposite of the OFF command. only. See OFF. ; Used by account: The system is restored to its normal state so tha't any use: ' may LOGIN. Example: .ON How? , 5I sets FIOFFJ in field 1 to ZERO, B-18 its nontlal "alue. 1.18 OPEN purpose Whenever files are manipulated by thE! user, they are identified by "internal file numbers." At anyone time, a user may have aCCt:=ss to up to four files, with internal numbers 0 through 3.. 'rhe open command associates the internal file numbers with the actual file on the disk. Example: .OPEN 1 FILE23 Assuming that file FILE23 already exists (see CREATE) , this statement now allows the file named FILE23 to be referenced with the internal file number 1. Account 1 may open any user file and not be protected regardless of the setting of the file's protection word I provided the fi1e,is not open to another user. Account 1 files are always write protected even against account 1. Account 1 has the privilege of deleting any file which is not in USE! merely by opening and reducing the file. For example: .OPEN 0 GAMES 14~3;REDUCE 0 3000 will delete the file GAMES which belongs to account 1403. also REDUCE command . 8.19 See PROTECT Purpose Each file has a protection code assigned. This ccd~ determines who may read or wri te the file. The protecti(:JIl '~;orr1 is stored in the disk directory, and includes the protec:i0n code and the filename extension, as follows: o 1 2 3 4 Filename Extension 5 6 Unused 7 8 9 10 11 Protection Code Bit 11, if 1, means that the file cannot be read by users whose project number differs from the owner's. Bit 10, if 1, means that the file cannot be altered whose project number differs from the cwner's. b'~.r users 9, if 1, means that the :ile C3~~O~ ce project number is the same as the owner's. Bi~ Bi t 8, if 1, means that the file cannot be al tered by whose project number is the same as the owner's. i-1SerS Bit 7, if 1, means that the user cannot alter his own without first changing the protection. B-19 r . , ~l .... e, NOTE A userts projGct n~r io tho first 2 diqit. of the 4-diqit account nW3ber. The system normally seta bits 8 and 10 for the uuer protection code 12. The filename extenaion gives additional infonultion abc'ut tht. file, which io printed in soma dir.ct~.• li.tlnga.· ~h. filen ... extenaion code. arc: o blank 1 .ASe 2 .SAV 3 .BIN ASCII filea, .uch aa PORTRAN aourc •• Save format filea. Binary file83 mU8t be loaded with program LOADER • .. • BAS 5 • SAC 6 • FeL 7 10 .TMP blank. 11 • OAT 12 .LST 13 • PAL BASIC sourco flle. BASIC compiled program file. FOCAL file • Temporary file BASIC data file • Listing file PAL source 14-17 blank. The protection word may be •• t by uoin~ PROTECTz .PROT 0 0217 This cru.n98a the protection of the file opon under internal file number 0 80 that the file haB an extenaion of .ASC, and that it cannot be read or written by any person other than ita owner. Thi. command change. the protection word of the file, currently opened under internal file number zero, to ,217. Since bits ,-4 a:re equal to 131, the f,ilea have a.n extenaton code of .ASe. Sinc.~ bits 8,9,10 and 11 are sot, the file will not be acce •• ible to .n)'o~" other thaI" the uat1r. 'TI:.e protect cor:unand cannot be uSed for M!'D' s and UFD's. See the REN IOT for details. How? FIP io called to do the actual protect word changir..g. The protect word i . in word four of the name block for the f:lle 1n the u •• r'. uro. B-20 B.20 R Purpose The R command searches the directory of account 2 (Library) for J:.f found, loads it and starts execution eLt location o. If the program nauu! is fallowed by a_ ru.unher, execution ~rill start at. that address inatead of at O. a program and, Example: .R CAT CAT will bf! executed, and will list the directory. equivalent to RUN 2 CAT. How? B.21 R CAT is SI calls FIP to open the file for the program, then passes a RFlLE parameter block to the file handler in the Monitor to read it in. It then causes execution to start at location 0, or the address specified. The R and RUN commands operate slightly differently than the LOAD cOlT'ilMnd. If the program to be run is shorter than 4K, the unused portion of core may end up containing part of 51 rather than what was there before the R or RIDI. REDUCE Purpose To make a file smaller. REDUCE removes segments from the end of the file, leaving the others (if any) intact. If a file is reduced until there is nothing left, the file is deleted completely, including the entry in the user's directory. Example: .RE:D 1 5 • RED ,~ 1000 The first command causes the file open under internal file numbe:1 to be shortened by five segments. The second command deletes the file open under internal file number 0, provided i ts It~ngth is 1000 segments or le~ls. Account 1 files (UFD's) cannot be reduced if there are any users logqed in on or usi.ng the UFD, or i f t..... ~; UF'D owns any f i It~s. B-21 Ho"",? B.22 SI calls Ftp to do the REDUCE. FIP finds thE~ first segment of the file to be deleted, removes it from tr.e directory, calculates its bit in SAT, clears that bit, and repeats the whole operation the desired number of times. RELEASE Purpose To release dEwices so that other people may use them. opposite of ASSIGN. 'I'he Example: .REL R .REL D 1 The first command releases the high-!Speed reader. command releases DECtape unit 1. How? B.23 ~('he se'cond Provided the user owns the device, 51 calls FIP which zeroes the proper word in DEVTBL, releases the DDB t.) free core, and charges the user's account for the elapsed time. RENAME Purpose To allow the user to rename a disk file. Example: .REN 2 HELPME The file current:ly open under internal file number 2 is given the name HELPME. The keyboard RENAME cammand will not rename a j~D or UFD (which would change passw'ords) • How? SI calls FIP, which changes the name in the user's UFO. B-22 B. 24 REST)\R'I' Purpose~ To set or determine the restart address. Example: .RESTART 200 -RES 0200 When the program is running and CTRL/C (tC) i.s typed, the Monitor causes the program to restart execution at the reE,tart address. Thus, after t:he first command above has been given, if the user types CTRL/C (tC) during program execution, the effect will be a CLA CLL and a .:rMP to location 200. Monitor also clears the terminal buffers when it: recognizes the +C. The second command determines the curren t restar1: address. How? B.2S SI sets the restart address in the user's job status block 0, the 7th word. HUN PurpOSE:' The HUN command searches under an account nur,1ber for a file. If it is found, it is loaded into core and executE~d. If the prograon name is followed by a number, execution will begin at that address; otherwise it will begin at O. Example: .RUN MYPROG .RUN 1234 PROGB The first command requests the program named MYROG to be loaded and executed. Since no account number is given, 'the user I s account number is used to search for the program. The second command requests execution of ?R~~B, stored under user number 1234. It is equivalent to LOAD 1234 PROGB; START O. B-23 How? B.26 S I calls FIP to open the desired file, then passl!s a RFlLE parameter block to the file handler in the Monit()r to read it into core. It causes the user to start executing at location 0, or the address specified. S Purpose Stop the user's program. The terminal is in Monitor tnode at this time. Example: &·()*+~-./0123456789:;<=>?'ABCDEFGHIJKLMNOPQRStBS • It is necessary to type eTRL/B, to put the keyboard in Monitor mode, before the 5 can be t:yped. If unwanted output is occ:uring, the user can type CTHL/B twice to stop the output, followed by 5 and carriage return to stop the pro9r~. How? B.27 5I clears the run bit in the user's STRO. SAVE • t\. " Purpose To write out portions.of the user's core area to a dink file. The SAVE command has the same format as the LOAD command (!lee LOAD) • Example: .SAVE NEWPRO .SAVE PHOG2 200 200 Be sure that the named disk file exists and is the proper size. How? 5I calls FIP to Clpen the desired file, and then passes a WFILE parameter block to the file handler in the Monitor to do the requested disk transfer. 8-24 8.28 START Purpos~ Tc:> begin or continue the proqram which is al]~eady in core. Example: .,START t. START 10 The first command is similar to the PDP-8 continue key. A program is continued from the place where a HLT instruction was executc:!d or a. CTRL/B followed by 5 was typed. ThE! second command clears the AC and LINK and begins execution at address 10. How? 8.29 The START command, if an address is give!n, causes 51 to alter the user's saved registers to the proper value. The run bit is then set, allowing the job to execute. SWITCH --- PurposE~ To find the value of or set the user's switch register. The swi tch reg ister is implemented by sottware to prev'ent users from having to set the computer's switches. There is no way that the user can determine the hardware SR setting, short of looking. Example: .SWITCH 3210 .SW 3210 The first corrmand sets the nwitch reqister to 3210. The second command determines the value from this point. Whenever the user does an OSR, the constant 3210 will be ORed into 'the AC. How? Each user's switch register is stored in the job status block 1. SI simply stores the SR there. 8-25 B.30 SYSTAT To obtain information about the status of the SYSTEM. Example: .SYSTAT STATUS OF'TSS/8.24 DEC PDP-8 .1 AT 19:42129 ON 20 JUL 74 UPTIME 00t27:55 JOB WHO WHERE WHJ\T 1 2 0, 3 0, 3 K00 K04 SYSTAT PIP AVAILABLE CORE 0K FREE CORE=311 BUSY DEVICES DEVICE Kl JOB 2 219 FREE DISK SEGMENTS r'or installations with a line printer, type SYSTAT:L How;' 8.31 SYSTAT effectively causes a R SYSTAT. TALK Purpose To enable messages to be sent between terminals. 8-26 STATUS RUN 'BS tQ fQ RUNTlt-1E 00:00:09 00:00:08. Example: .TALK 1 DID 10U- HEAR ABOUT JOHN? If terminal 1 is not busy, the above messac;e is printed on the console. If it is busy, 51 will return the err(Jr message "BUSY." Account:~ 1 and J are usually allowed to, interrupt even when a termina.l is b 1Jsy. B.32 TIME To get information. EXMlples: .TIME 00:00:05 .TIME 0 22112:38 .TIME 2 00:00:25 The first example gives the elapsed processor time used by the user issuing the TIME command since he logged into the system. The second example gives the time of day. The third example gives the amount of processor time used by job 2 since the user logged in. How? SI takes the information from the proper location, conver-~_ 'j and prints it. B.33 UNDUPLEX ---- To take the user's terminal out of DUPLEX mode. (See DUPLEX) • Example: .UNDUP How? 51 clears the DUPLEX bit in the user" s keyboard DDB. B-27 B.34 USER Purpose To find information about a selected job. Example: .USER JOB 01 (00,03l .USER 2 JOB 02 (01.23] K00 K04 The first command informs the user that he is job 1, account 3, and is a t console o. The second comnand asks about job 2 t \I'hich :ls being used by account 123 at terminal 4. SI takes the information from various tables in cere. How? B.35 VERSION Purpose To determine the version number of the Monitor currently running. Example: .VERSION TSS/8.24 How? B.36 SI prints the answer. WHERE Purpose To determine the status of the user's program. Example: .WHERE SW=3210 PC=0000 L=0 AC=0000 MQ=5602 B-28 All registers relevartt to the user are printed. register (see SWITCH). SW is the switch This command is useful when used in con- junction wit.h a CTRL/B, it enables the statu:s of an executinq '1 L ':";'.~i..:'~.J.J . . L· ,. . program to be determined without stopping. I How? S1 takes the information from the user's job status block 1. APPENDIX C UNIMPLEMENTED USER OPERATrONS (UUOs or user lOTs) This Appendix includes a numerical list of all the valid UUOs. ~fuenever an lOT is executed by a user, it causes a trap into the ",:tor. The Moni,tor looks for the lOT in a table, and one of several :9'5 happens. If, the rOT is not found in the table, the Monitor simply ret'.1rns 'r~l:; user I s program: the rOT functions as a NOP. If the lOT is resident - i.e., if code to handle the rOT is ) - the Monitor executes the proper routine. ~n If the rOT is non-resident, PIP must be called. If the rOT is ;;;t- i.e., if all information transfer is through the user i s '::,sters - the Io~r is ANDed wi th 0377 and stored in JOBLNK in the <':3 job status block 1. If .the rOT is a long non-res ident lor:" ,:AC will contain the address of some parameters. These paramoters, '~;g ",ith the lOT are transferred to a free block, the address of the o block is placed in JOBLNK, and PIP is called. Note that frc:c :1 always starts above address 377 so that PIP can tell whethc~" ~:,N1< contains a ~:ree core pointer or an lOT. If PIP cannot fi..;llre , ~/Ihy it was cal:.ed, i t executes a HLT. I \, 6004 - GTF - Get Flag (PDP-8/E only) The link is placed into ACO, and the EAE GT flag (if presen~ is placed into ACI. The rest of the AC is cleared. 6005 - RTF - Restore Flags (PDP-8/E only) ACO is placed into the link, and ACl is used to set O~:· clear the El\E GT flag. (if present) The AC is not changE!~J. 6006 - SGT Thi.s 'JUO causes a skip if the GT fl;::lg is set. only to 8E systems with EAE. C-l Appl iC'2b~_e 6010 - RRS - Read Reader String Before executinq the RRS, load the Load he with the of a 2-word block, where: Word 1: Word 2: a~ddress is minus the number of characters to bl~ transferred. is the address of user core, minus one, This starts the transfer. These characters will be read from the high-speed reader and placed in the user's buffer. The AC is cleared by RRS. The two worda are increm~nl::ed according to the number of frames read. A system error is generated if the tape runs off the end. See 6431-SEA. 6011 - RSF - Skip on Reader Flag The next instruction is always skipped. 6012 - RRB - Read Reader Buffer The next character from the high-speed reader buffer is ORed into the he. If the buffer was empty, the reader is started ar.d this corrunand is not executed until the buffe:r is nearly full. NOTE Successive RRBs will not retrieve the same character. 6014 - RFC - Reader Fetch Character This instruction performs no operation. 6016 - RRB RFC Functions as a RRB. RCB - Reader Clear Buffer Thi:; rOT causes the high-speed reader buffer to be cleared 6017 - of any frames read from the tape but not yet transferred to the user's core. This is useful between tapes wh?n reading mor~ than one tape. 6020 - PST - Punch String Before executing PST, load the Ae with the addres:, of a 2-word block where word 1 contains the negative of the number of characters to punch (word count), and word 2 contains beginning address minus 1 of the string to be punched C-2 (current address). The block of data will be punched and control returned to the IOT+2 with clear AC. If the PST does not punch all the characters, control is returned to the IOT!-!. NOTE On most string lOTs, the following programming sequence may be used: ADDR TAD PST • -2 JMP • • ADDR# T WOlI/D" • TWOWD "10 BUF-l As characters are placed into the punch buffer, the word count c.nd current address are updated. zero, the str~ng ing the JMP. return~; If word count reaches lOT skips, going to the instruction follow- However, if the buffer fills up, the Monitor control to the JMP.-2. causing the rOT to be retri~~d. r f des: .. red, the JMP. -2 may be replaced with a :iump to other proces::;ing, which can later return to ret.ry the string rOT. This allows a program to overlap I/O to d greater extent. 6021 - PSF - Skip on Punch Flag The neKt instruction is always skipped. 6024 - or 6026 - PLS - Punch Load Sequence The AC is placed into the punch buffer, but not cleared. Note that bit 10 of a PLS is ignored (6022 is a NOP) . 6030 - KSR - Read Keyboard String Execution of this instruction initiates a transfer of one or more characters from the user 1 s keyboard to a designated core area. Before executing KSR, load the AC with the address of a 2-word block, where: Word 1: negative of the number of characters to be transferred. Word:: address of the core area into whi:h to be placed, minus one. C-3 char3c~9rs 3re 'l'tl<.' transfer is terminated when either: a) the indicated number of characters have been input, or, b) a delimiter is seen. At the end of the transfer, the word count and core address are updated and the AC is cleared. 6031 - KSF - Skip on Keyboard Flag Operation - the next instruction is skipped flag is set. ~.f the keyboard The flag is set whenever a delimiter character If the KSF does not skip, and is followed by a is typed. JMP.-l, the user will be put into a wait stat.e until a delimiter is typed. 6032 - KCC - Clear Accumulator. 6034 - KRS A character from the keyboard buffer is ORed into the user's AC. If none are available, the job is put tc sleep until a delimiter is typed. User will be put into a wait state until a delimiter is typed. 6036 See 6400 - KSB. KRB - Read Keyboard Buffer A combination of the 6032 and 6034 instructions. 6040 - SAS - Send a String Causes a block of data to be output to the user's terminal. Before executing ap SAS, load the AC with the address of a 2-word block, where: Word 1: contains the negative of the number jf characters to be sent. Word 2: contains the address -1 of the first word of the string. The characters are stored one per word right justified starting at the address specified by word 2. Upon execution of SAS, the system takes only as many characters as will fit into the output buffer. It then makes the appropriate adjustmE!nt to word 2 to indicate a ne"" starting address and to word 1 to indicate the reduced character count. returns to the instruction following the SASe It then If the chardcter count is reduced to zero, the instrllction following SAS is skipped. The instruction following the SAS should contain a JMP.-2 to continue the block transfnr of terminal" characters. See 6020 - The AC is cleared by SAS. (PST) for sample string programmin9. C-4 6041 - TSf' - Skip on Teleprinter Flag The next instruction is always skipped. 6042 - TCF - no operation is performed. 6044 - 60(6 - TLS - Load Teleprinter Sequence The contents of the AC are placed into the u:ser's teleprinte:;:buffE!r. 6200 - CKS - Check Status Load the AC with the address of a 3-word block and execute the CKS. the Upon return, t.he AC will be ~evice block. o. status register will be placed STHO, STRl, and in~o the 3-word The formats of t.hese registers are: STRO Bits Run Bit User program is in the run state Error Enable Program handles its own errors Program was compute bound :3 JCOMBD JSPEEK User has R privilege ,I JSACC User is privileqed account 0 :~ ~.i JSlOT System use only ti JSIOTC System use only B ...,.SINER S:lstem use only Syst2m detected error condition: Not llsee 9--11 Error Code 1 2 3 5 6 Illegal rOT Swap read error Swap write error Disk. file error Hung device STRI Bits 0 Time is up Timer 1 F~le 0 Internal file 0 is not busy :Z File 1 lnt.ernal file 1 is not busy 3 File 2 Internal file 2 is not busy ,! File 3 Internal file 3 is not busy 'j Keyboard There is a delimiter in the input buffer !) Line Printer Output buffer i£; not full Teleprinter Output buffer is net full 3 Reader :) Punch Character in re2,der buffer Punch buffer is not full C-5 10 Error System error detected, code in bits 9 through 11 of STRO 11 Hait Job is not'waiting. Device status register: See rOT 6772-RDS- for details. 6400 - KSB - Set Keyboard Break This performs the same function as the Monito! BREAK command. Operation: Rather than activate a user's program to receive each character as it is typed, EduSystem 50 accumulates input characters until a certain character{s), is seen. To tell the Monitor which characters to look for (these characters are referred to as delimiters), loaj the AC with a l2-bit mask before executing a KSB. For eac~ bit set in the mask, the Monitor considers the correspondlng character or churact~rs to be delimiters. Bit Specifies o = check rest of mask o 1 = any character is break 1 301-332 (all letters) 2 260-271 (all numbers) 3 211 4 212-215 (line feed, vertical tab, form feed; (horizontal tab) RETURN) 5 241-273 (!"'$%&' ()*+,-./:;) 6 240 7 274-300 «=>?@) 8 9 333-337 (~t~) 377 (RUBOUT) . 10 375 11 any characters not mentioned above. (space) (ALT MODE) Alternatively, clear the AC and execute the KSB. The Monitor will return the current value of the user's break mask in the AC. sac - Set Buffer Control sac permits the user program to clear its terminal input 6401 - and/or output buffer. Before executing SBC, set bits 0 and 1 of the AC as indicated below: Bit 0 1 Clear output buffer. Bit I I Clear input buffer. C-6 6402 - DUP - Duplex Performs the function of the DUPLEX Monitor command. No user rE!gisters are affected. 6403 - UNO -. Unduplex Per:forms the function of the UNDUPLEX Monitor command. No user registers are affected. , 6405 - CLS .- Clear Status Load the AC with the address of a 3-word block. Any bits set in this 3-word block will be cleared in the user's STRO, STRl, and device status register. Use this reT with caution. 6406 - SEGE - Segment Count The m rnbE~r of avai lable disk segments is returned in the AC. 6411 - URT - User Run Time Lo,ld t:he AC with the address of a 3-word block; where word 1 conta:.ns the number of the job for which the :run time is sough~. of th,~ The run time is returned in the last two locations block. If job 0 is specified, the run time of the current job is returned. The AC is cleared. 6412 - TOO - Time of Day Load the AC wi th t.he address of a 2-word block. The value of the system clock will be placed in the two locations, and the AC will be cleared. 6413 - ReR - Return Clock Rate The number of clock-ticks per second (ten decimal) is returned in the AC. 6414 - DA1~ - Date Rf?turns the date in the AC. The format of the date is ( (YEl.R-197 4) * 12+ (MONTH-I) ) * 31+Dl\Y-1. This numbe;:- wi 11 over;:}.ow in 11 years, 4 days: Jan. 4,1985 i:3 the last ddy which will work without changing the base year. 6415 - SY~ - Quantum Synchronization This instruction causes the scheduler to allow any other program to run. When this program is restarted after the SYN, it will have a full quantum (200 rna) of execute time without being swapped out. C-7 6416 - STM - Set Time Load the AC with a number. The job will be the number of seconds in the AC. Th(~ ~:uspended for user's job is put into a wait state, and the two's complement of thE AC is placed into CLKTBL, where it is incremented once a Eecond. When it reaches zero, the job is allowed to run a~ain. 6417 - SRA - Set Restart Address This command allows the user to specify an address to which control is transferred when C'I'RL/C is typed en the user's console. SRA. Load the AC with the restart address and execute If CTRL/C is detected, the program's input and output buffers are cleared, the AC and Link are cleared and control goes to the restart address. This function is also performed by the HESTAFT Monitor conunand. 6420 - TSS - Skip on EduSystem 50 The next instruction is skipped and the current version number of EduSystem 50 is placed into the AC. Thi~; instruction is useful in programs which may run under EdLSystem 50 and also under other operating systems, where it will function as a NOP. 6421 - USE - User Returns in the AC the number of the current job. 6422 - CON - Console Returns in the AC the console number assigned to the job whose nL~ber was in the AC. If that job does not exist, -1 is returned. 6423 - PEEK - Peek Allows the user to inspect the Monitor core; fields 0 and 1. Load the AC with the address of a 4-word block where Word 1 Monitor field in bits 6-8 Word 2 Starting Monitor address Word 3 Starting user address Word 4 Two's complement of number of words to transfer The specified Monitor information will be transferrE:'!d to the user's core, and the AC cleared. C-8 PEE1< is a privileged lOT. Privileged lOTs may be executed only jn 2 cases: If the account number of the user is 1 throu<.:h 3, or if the lOT is executed by a library program. The privilege for the second case is enabled by the R, SYSTA'1', LOGOUT, and KJOB conunands, and is cleared every time Eil is entered. The privileged rOTS are allowed if ei1:hel" privilege bit in STRO 1's set; if not, the rOT generate~j an error condition. 6430 - SSW - Set Switch Register The content of the AC is stored in the user's switch reqis1:er ,r and the AC is cleared. The Moni tor command SWITCH performs the same function. 6431 - SEA - Set Error Address This ins'truction allmis the user to speci fy an address to which control is transferred in the event of a system error. Load ':he AC with an address before executing SEA. If a system error is detected, the Monitor simulatHs a JMS to the error address. The program counter is stored in the error address and control transferred to the error address +1. AC, Link, and input/output buffers are not affected. The error code of the system error is in STRO bit3 9-11. The error routine must read these bits (by a CKS) to determine the cause of the error, then clear them by means of a CLS. The only error code that occurs in normal system usage is due to a hung device. The error occurs, for exampl~, when 1) the user attempts to use a punch not already 2) allows the paper-tape reader to run off the end of a tape. t~rned on or, The illegal lOT error probably means that ar. assiqnable dC\T1CC lOT was executed without the device first being assigned. Swap and tile errors occur if a hardware error is detected while the Monitor is swapping user programs, or directories. readin~ or wrlting file These are system malfunctions from which there is nc recovery. AS[I - As:g~~ Pe'.l.t'"If the device specified by the content of the AC is avail- 6440 - able, it is assigned to the user program and the AC cleared. ~5 Otherwise, the job number of the device is placed in the AC. If the device does not exist, 7777 is returned C-9 4000 4001 4003 4004 4005+N 40l5+N Paper-tape reader Paper-tape punch Line Printer Card Reader DECtape unit N, N=0-7 RK8E drive N, N=0-3 The assignment is in effect until a corresponding REt. instructiort or LOGOUT. The same function is performed by the ASSIGN MO:li tor command. NOTE The device number for the line printer has been changed to 4003 from 4002. 6442-REL-Release Device The device specified by the contents of the AC is released (providing it was o~med by the user executing the REI). The AC is cleared. Releasing a device makes it available to other users. The same function is performed by the RELEASE Monitor command. a File REN is used to change the name of a file. address of a 4-word block where: 6600-REN-Ren~me Load the "AC with the Word 1: contains the internal file number associated wi th the file whose namE~ is to be changed. Words 2-4: con tains the new name. This n,3,me is in 6-bi t characters and packed t~/O in a word. The same function is performed by the RENAME Monitor command. C-10 t\~.wn c-xecutC(:1 ., vlitll the under l'"tcc<)unt 1, the REN rOT has a special function. of a fou.1::' \'lork block, where: Load add:n:::~3!3 Hard 1: Cont.ains the account number of an existing user t'lords 2-3: Contains the desired password for that account, and ~'1ord Contains the desired disk quota for the user. 4: The UFD to bE~ renamed need not be open. The quot:a is placed in the word .. <erved for the protection code in files. For UFD' s, bi ts ~ through 5 of the :,ta. aie reserved for future use. Bits 6-11 contain the disk quota for that OMt divided by :!5. The quota word for the MFD contains the grace quota. This .,~ . i (j a 12-bit nwnber :not divided by 25) crnota a user may extend his files. which determines how many segments over Upon return ::rom all file rOTs, the AC is either cleared or contains .. '" of the follow'inq e:cror codes: 4000 'rhere was no file open on the specified internal file number. On an open command, t.his error indicates the open failed because of a 1 ck of table space o~ free core. 4400 Attempting to alter a file which is open to another user (or to one user?) C-ll -- .. -- ... - - '- - • __ •• .1..:' :.0::' a user whose directory is full, or who hQ!~ :c eached o:C" exceeded his disk quota. 5400 Bad directory 6000 File protection violation 6400 Invalid file name 7000 Attempting to open a nonexistent file 7~OO The disk is full. )01 - OPEN - Open a file Open is used to associate a file with an internal file number. This is necessary because all file operations are in i:erms of i:-lternal file numbers. Before executing the OPEN rOT load the AC with the beginning address of a 5-word block, where: 4' \-\ford l : contains the internal file number. contains the account number of the file owner-. If 0, the account number of the current user is specified. Word 3 -5: contain the name of the file to be openE~d. This name is in 6-bit characters packed two to a word. If there was another file associated with the intErnal file number, beford the execu tion of the OPEN rOT l i t is closed automatically. 'l'hi::; is done before the new file is associated wi th the internal! DllfL:ber. Account 1 may open any used file and not be protected, re(~;;':lrd1ess of the setting of the file I s protection word Howeve:, ac:count I files (MFD, UFD IS), are always wri-te-protected even clC)Jaccount 1. I 02 - CLOS - Close a file CLOS terminates the association between files and -:heir internal' file numbers. Before executing CLOS, load the AC with a selectic:; pattern for the internal file numbers whose associated files are !:be closed. The file is closed if bit I is I, where I = bit 0,1,2 The same function is performed by the CLOSE Honitor command. /3 - RFILE - Read file and - 6605 - WFILE - write file Once the association of a file wi th an internal file number bas ;~, been ~ade, these rOTs allow the actual file reference to be made. 're illegal on a file t.hat has not been opened (associated wi th 2:~1 ternal fi le number). C-12 :,:J.r1 or \'}ri te a fi] E" load ';~h('~ 1'1C Hi th the addrE!ss of a 6-word ,:1,: . t.hGn execute thE: lOT.. 'J?h\,:~ format for the 6-·word block is: ,1 .1:: contains the high-order file word address contains t,hE~ internal file number. ,1 3: contains t~he negative of the number of \vords for the operation. This number is either the number of words "to be read or the number of words to be vlritten. ,~! 4: contains a pointer to the beginning address -1 of a buffer located in the user program. On a read operation this buffer receives the information from th(~ file 7 on a wri to operation this buffer holds the information that is to be sent to ~le file. ,rd 5: contains 'the least significant 12 bits of the initial filo word addr,=ss to begin the operation. ~,:d contains an error code: 6: If no error If parity error If file shorter than word count If file not open If protection violated 0 1 2 3 4 ::~ read or wri te bE'gins at the word speci fied by words 1 and 5. For examplE~: TAO x ... X WFILE • • • .+1 0 1 -200 6477 200 2 oC)' (octal) words starting at word 200 of the file ~SSOC~2t internal file number one from a core area starting at locati,:H-: U~lj,~. ;::lDS: ~th Wrl.·~e '- C-13 After completion of the transfer, the word count (word 3) and core address (word 4) are updated. If an error was detected the appropriate error code is placed in word 6. ;G04 - PROT - Protect a file To use, load the AC with the desired protection word in bits 0-4 and 7-11, and the internal file number of the file to be 9rotected in bits 5-6. The meaning of i:he bit.s i~; explained i:"! the PROTECT Moni tor conun~l'1d _ (See 6600-REN for error condi tions. ) For directories, the REM lOT mU~it be used. ~605 - WFILE - write a Pile \VPILE uses the same calling fonn as RFlLE~ se€~ 6603 - RFILE. This corrunand performs the same function as thE SAVE Monitor corrunand. 6610 - CRF - Create a File The user can request the system to create a new file of one segment. The user provides the new name for the file. Load t.Le AC with the beginning address of a 3-word block, where: Herd 1 through 3: contains the 6-character name. If there is some reason why the request cannot be granted, the system will return a non-zero error code in the AC. (see 6600-REN for error conditions.) The prot2ction code of a newly created file is 12. When account 1 crea.tes a file, the two accounting words are zeroed by file; as is the file itself. This command performs the same function as the CRE1\TE Moni tor corrunand. 6611 - EXT - Extend a file that file must be currently open. Load the AC with the be9inninq address of a 2-word block, where: To extend the length of an existing file, vlord 1: contains the internal file number of the file to be extended. Word 2: contains the number of segments the system shoulL append to the file. C-14 'tlhen a £:1 is to be extended, a check is made to see if the entire extend w~l succeed. If not, the extend will not be started. If an extc~'l(: auses a USE~rs total file size to exceed his quota th2 ~'loni tor 1....l i 1 allovl i:hat file to be extended only until the quota ha.::; be'en eXCE:C' ed by ,the 9race quota. The first time that any file if:.:, extended s· that its owning account is over quota/. the Monitor will Print an i: formational message such as: I MY F::J..JE EXCEEDING DISK QUOTA >lhere HYFr: E is the name of the file being extended. a use. has reached his quota, he may no longer create any file. attempt do ext1end an account one file (MFD or UFD's) will always fail. ~hen \:~n ;!f, for s~ 2 reason f the request to extend a file cannot be granted, :he AC wil contain 4000, 4400, 6000, or the number of segments it \ ~a.i..led to ppend. See 6600-REN for error conditions . . ':his comma j perforrls the same function 1~(12 as the EXTEND Monitor command. - RED - Reduce a file To r(~ ..lce the l~ngth of an existing file, that file must be currentl open. Load the AC \vith the beginning address of a 2-~;Jord block where: Ii word contains the internal file numbE~r of the file to be reduced. con1:ains the number of segments to be removed. If negative, the file will be df?leted. : Word : ,~ \ :. i :his requE; t is granted unless the file to be reduced is currently openecl \ ':':) another.; lser or if the file is write protected against the user. Sec }'.600--RE~ i~ r error condi tions. A UPD can only be reduced if the account Reducing a UFD always causes it to be ": ~3 inacti\j and owns no files. :; ·;'Jleted if; Nord 2 i~; non-zero. ~613 - FIl\ - File In~ormation FINF ~ 1ables a user program to determine wha·t file, if any, is asso<i 3.ted w'i th an internal file number Load the AC wi th the beg inning: jdress of a 7-\vord block, where: \-lord l: contaj.ns the internal file number for which the use::::program wishes information. Wore! 2-7: contain the information that the system returns ;::fter execut:ing FINF. Word~ : co.ntaj.ns the account number of the Ovlner or zero file nwnber, that is the file is not open. I I Word 3-5: contain the name of the file in 6-bi t code. C-15 I contains the protection code. (Disk quota if directory) See the Monitor command PR01T contains the number of segments which compose the file. lis cOltUll<J.nd performs the same function as the F Monitor command. ~14 - SIZE - Return segment size rrh,~.3 uuo sets the user IS AC to 0400, the size of a disk segment. )14· - LIN - Log In VH:cn SI calls FIP with a 6614, FIP will perform a LOGIN. A prog:::' ca.:nnot execute this lOT (see SIZE). LO~OUT )15 - - Log out rr1:1i.,~; is a triple purpose ICYr. If the AC is zero, it will return th,,' :~umber of users logged in with the same account number as the' U:::;C'2-~' executing the lOT. If the AC contains the job number of thrC U~>'~' I s job, the user will be logged out. All assi9ned devices ar.~ rcll:'Cised, and user I s terminal becomes inactive. LOGOU'J~ is a privilcd0ed lOT. See 6423 - PEEK for details. If acc~unt 1 execute; tll(' lOT wi th AC equal to nega ti ve job number, PIP <....Jill reset all '":PU ;::.. nd device time accumulators in the MFD: this is used by the R(~::;et conunand in CAT. )16 - WHO - Who The account number and password of the current job are returned, to t_he 3-word block whose address is in the ,,"\C and the AC is cl\..:;ared. j17 - ACT - Account Load the AC with a job number. The account number of t:hat job, i:3 returned. If the AC is 0, the account number of the current job is returned. returned. If the requested job does not exist, 0 is Read card Alphanumeric )32 - I<.CRi\ - jJ~ - ~CRB - Read Card Binary ~~b - ~c~c - ~ead Card Compressed the AC wi th the address munus 1 of an SO-word buffer. A Cc~' read and the data is put~ into the buffer in the same form as :' c)~responding hardward rOT. The UUO returns in the AC the numb~: C',1Llracters successfully transferred to the user I s buffer. (see;; - Olld .L.:; 6772 - RDS.) C-16 LST - Line printer Send-a String Performs the ~3arne function as a 6020 - PST, except that the output goes to the line printer. - LSF - Line printer Skip on Flag The next instruction is always skipped. ~ - 6~64 - LPC - Line Printer print The contents of the AC are loaded into the line printer buffer. The AC is not cleared. Note that bit 10 of the TOT is ignored; 6662 is J'- DLAG - Disk Load Address and go Allows the user to read or write on the RK8E.. To use, load t:hc AC ~ with the address of a three word block, where: Word 1: Word 2:J Word 3: Bit 0 == 0 for a read, == 1 for a write Bi-ts 3-8 contain the number of pages to read/write, 1 to 40. 13i-l:s 9-10 contain the drive number 0 to3. 13i i: 11 contains the hi9h order sector addres,s. contains the core buffer address minus one, contains the low order sector address. return, the AC contains the number of blocks transferred. rro det:crmi 'Jr' conditions, see 6772-RDS. The disk transfer is made in 40(; (octal.) ';~kS. Each RKOS drive contains 14540 (octal) blocks. To speci F:'Lhc :,:ial block number, the high order bit goes into word 1 of the p!1rameto:" :,:k, and the remaining 12 bits into word 3. If -the transfer reql:c:sts (11' ,'number of pages on a write, the last page of the last block on the di ::. 1 contain zeros. Upon return, the AC contains (p+l)/2, where P is the ~er of pages successfully transferred. .r,l ,~ - DTXA - DECtape 90 Load the AC with the address of a 3-word block, where: ,iard l: ~'lord 2: Word 3: :3 0-2 contains the unit, direction, and function Contains the block number Contains the core buffer address minus one. of word 1 c'Jnt,ain the unit nerr.ber. Bi ~ 3 of ~"lor:1 :. :3};'c·,,:~.~ ,:;,~<: 3i ts 6-8 of v}ord 1 should be 2 to read, 4 to \",-r i_ te . p/w in reverse. return, none of the parameters are altered, and the ~~C is clc:J.rcd. T} ; should execute a 6772-DTRB instruction to find out whether the transt· . successful. 'J C-17 Note that this allows the user to read or write a block in the reverse direction. The user must be aware that if a block is written in one direction and read back in the opposite direction, the order and contents of the data words will be changed. ,771 - DTSF - Skip on DECtape flag. skipped. The next instruction is always 772 - DTRB - Read DECtape status B, or RDS - Read Device status The information obtained pertains to the RK8E, DECtape, or Card ReZlder, depending on which was most recently used. The contents of the device status register are: ,772 - RK8E: RK8E status Register Bit 0: control done 1: Heads in motion 3: Seek fail 4: File not ready 5: Busy error 6: Time out error 7: write lock out error 8: eRC error 9: Data request late 10: Drive status error 11: Cylinder address error DECtape: TCOS/TCOI status register B Bit 0: Error flag 1: Mark track error 2: End of t:ape 3: Select error 4: Parity error 5: Timing error 11: DECtape flag he status register for DEctape may also include 4e~¢ or 4S~1. oftware generated errors such as block number out of rang. c-18 Theset~ Card reader: r.I~he device status register cont.ains the (l(~(~:;:C~:';;: (,--. . .;.! last word of data transferred to the user'~) buffer In adf~iJ.~i()n, ~ device status register may contain 7777.. ']~his indicates t.l~,::1t. CTIU.I. follo'Vled by S was typed vlhile a DECtape or RK05 transfe!:' \v(J.~3 in progress, and the transfer was not finished. D '73 - DTSF DTRB - The status is placed into the AC and the next instruction is ski.ppr: C-19 APPENDIX D DETAILS OF MONITOR'S DATA BASE INPUT/OUTPUT DATA BASE All I/O, excep1: for the disk, is controlled from a single, fixed:'gth table, DEVTBL. Actual data about the stat.us of each device is td in a ,Device Data Block (DDB). DDBs are dynamically assigned i'leks of free core. The actual data t.o be transferred is contained in 'j:fe.rs. In the caGe of terminal I/O, the high-sPeed reader and punch :: the line printer, these buffers are dynamically assigned blocks of (e core. One or more (linked) blocks of free core make up a buffer. r :nil1.als are considered to be two devices: a keyboard and a telc;: ..(lter. Each as a DDb, and each has its own buffer. Some of the assign : ices , which have higher data rates, do not use dynamic core b'J f fors. ~ DECtape uses a fixed 201 word buffer, the disks and card reader >xlsfer directly to and from the user's core area. The tables, DDBs, and buffers are linked together by pointer.s. 'i~lTBL is, in fact, a table of pointers. If a device is inactive (a ~minal not logged in or other devices not assigned) the corresponding ~~le entry is zero. If the device is in use, the table entry is tl ,Lnter to its DDB. The DDB for each device also contains point,0r:-:-~, ::9 fill, and the empty pointer. The fill pointer points to where the ;xt character to be put into the buffer should g07 it points to '~h(~ ~;9adll of the buffe:~. The empty pointer points to the next charact.c"\r : be taken from th(~ buffer. Each buffer block contains in its f; .c,st: :::-d a pointer to the next block. The last block in the buffer con't:ains .':illcount indica":ing to which position in that block the nex t ':ILlr~ter should go. Figure D-l shows the relationship of tables, DD?:.;, ul buffers. D-l -- CHA~ BUFF!:" OEVIC[ DATA BLOCK C>EVT8L ---, rOWTY f'(;I'JTER r-FILL PO:NTl~ r- -- CHlIr. ~'JFFEq [)£VICE OATA BlOCK ~~ FILL CO~~ :0-- ..... ~ FILL rOINTER E _TV POI "TER D.- ~ L . . - - - ._ _ _ _ 'f', Fiqure D-l. Relationship of DEVTBL, DDBs, and Buffers D!:~\'DL is set up ;"vi th the terminal entries first, the en tries for the ~ea.dcr punch an unused entry, the line printer, the card reader second eight entries for DECt~ape, four entries for RK05 t~hird, and finally a 7777 terminator. rfhe number of entries for terminals, and hence the size of the table, is dependent on the configuration parameters specifying the number of terminals. DEVBE marks the beQinning of ihe assignable device section of DEVEL, which always con~ t IS 17 entries even though all these devices may no·t be included in t.he !3ystem. All slots in DEvrrBL which correspond to non-existent devices are filled with dummy pointers to prevent assignment. See Figure D-2. I I I Device Data Blocks are always 8-word blocks assi,]ned from free core. The DDBs for the assignable devices exist for :is long as the device is assigned. For all DDBs, bits 7 through 11 of word zero bon-: tain t~he uni t number . Bits 7 through 11 of word _1 cO·:1.tain the job' number which owns the device. Word 3 contains the time a1: which the device becomes active. This 12-bi t time is taken fro:n bi 1:s 3 through 11 of CLK2 and bi ts a through 2 of CLKl. The use of the remainder of the DDB depends on the particular device. I There are a number of status bi ts in word zero of thE~ keyboard DDB. The XON bit is set when a buffer is almost full and XOFF is s~t to the terminal. When the buffer is emptied, XON must be sent. S! i~: ~e t to indic ate that the terminal is in Moni tor mode. DUP is set to i~···· Cd to tha t the terminal is in dupl ex mode. SICOH, when se·t, indicates t~~-:. ":.;:e '..i.3e::- ~as j~3t ::i.nished typing a command to SI. D-2 -_._ _-_...... ........ _.._.. ,.-..-_ - -_ .. ~_ ....... .. _ _ . . . . _ _ _ . . . . . _ _ ~. _ _ _ _ _ _ _ . 1 . . . . _ . _ _ ,t==-""'~~~~:~::;NT -:=-=: 2 : BRElII( "All( : ~ "u. ~ , au,,, '",'.TER CHA~AcnR COUNY E"'PT'!' ALC-~I{ COUN-r to , r "7 L . -_ EMPTY 8t..OOC POI;\jTE5t _ _, Figure D-3. I Keyboard Device Data Block ~.~, T' I~ <;P(CIAL I lJ'IIT RI JOB - , TI"E AT ASSIG'I"OH F'lL 8LOCK PQINTEIl ''''.'lAC IE" COU"" '--, t "PH BLOCI( COUNT I ~. - Figure D-4. Device Data Block-Teleprinter, Reader, Punch and Line Printer. Free core buffers are packed 10 charachters to a block. Characters. 1 throught 7 go in bits 4 through 11 of words 1 through 7. Characters' 8,9, and 10 are split and packed into the high-order bits of words 1:, through 6. Bits 0 through 3 of word 7 are unused. See Figure D-5 . • CHAR 7 O'''lQ B QiAR 6 :1 CHAR ~ CHAR 9 CHAP 4 CH.AF' 3 CHAR 10 1----- 6 Figure n-s. I 2 i CHAIIII I CHAI~ Character Buffer D-4 (~' \J, ~- ~'j.) - \ ,..t I \ ~ ~: (""'\ \'\. \\ \ e I Ml..; I. f'-.) I \ rl'-"'\ .n~:,,~ i-\ I \C ~, --- '--- ...., i ,. ~ i \.1 J ,t...C'A) (, J J \ i<- I I f /F ! l- I I I i ---------- I h G \ ...! _---- I ,~ . ", ---.---J~~, o , 0. 'ta 2 CL'FlRPIT~, r;r"( ~ TlMf h~ .\~'·'~ .. MENT --------- . "I 4 t~.~ I , - -_ _ _ .-J._ I J~fq rot ~,",. T[ ,r, WOPO! ~~"'~~:;--~;":"-~-i C'ESI"lC" BLOCf( MJ -. D-6. Device Data Block DECtape I I ~ "'E. """""', """'" -{ - -----.J 2 i lll~·. _~~"~"'[';T --- ~ure ../ .. ~ til --' . - - - - - - J ~ e,. NCT C"'i,!, CIPfCilO~ 4 ~ Device Data Block RKOS Figure D-7. USER PROGRAM STATUS All job statU:3 information is based on a si,ngle, fixed-length ?ble in Moni tor COJ:-e, JOBTBL.. JOBTBL has a I-word entry for each ossible job. If the job doe~ not exist, that is, no one is logged in r that job, the carre sponding en try in JOBTBL is zero. If tha t: job ~s exist, the ent~y contain§ a pointer to the first of three (linked) :p' status Blocks. These contain complete information about the running ~ate of that job. For each file open to that job, there are two udi tional blocks.; one addi tional block contains information abeu t the ~le, and the other additional: block indicates where i t is on the' disk. nile a file tranSfE?r is in pJ;qgress, still another block exists \·;hich ;,ntains parameters for the transfers. Finally, 'when execu ting an lOT 1ich requires a FIP call~ a block may be set up to pass the parClll~cters ee Figure D-8. ----'--Joe 1 409 Z JOB 3 ~~ I I iI Joe !TATUS BLOCK Joe r-- 0 Joe STATUS !!LOCK , t-r--' STATUS al.OCI< 2 I ,JOBn Joe ret. CON TAOl r Bee," L J I :r .- _. . D-5 , "'0·, BLaCK rl~f I J IO~ Q~,lI:/ 11..0<:1( "'~' ~ PAIII ..... : ~t:I\ ellOCI( ~ Job status Information Pigure D-S. ! I 1 :~~ll I ~-; .... PARA~~~-:-f~ L -JJ . VII.! Rnnlf. vAL l i -.J T "llE ~ The three job status blocks exist for all jobs They contain tb: saved state for the job, AC, PC, LK, and the EAE registers They als~ contain the status of the job's I/O. See Figure D-9,. J~:; 0 (SlR CJ\ C:T~ ~' Z OE\lIr( '3 WAIT ... 1\ --_ .. ,TuS -_._-_.. l ~ :?or. ,\cr"'tSS () 10 I SWITCH Rf<.i':,lEI'l \\ PC \2 LINK .. ,} \IT 4 JOBlNI< , \~ toe 14 ... 0 23 ,~ sr;,GT .... OOE '--'--- --_ _,--------.... t:" _Ow·O~Q 'l'." j H··()jItOofR .. u~. I .. Figure D-9. Job status Blocks STRO contains status bi ts which are not directly associated with STRl contains bits which may be considered flags. They are set and cleared according to whether the associated device is ready or no!: :'eady. The IIwait mask masks STRI. When a job is waiting for a c~evice, a single bi t: in the wai t mask, corresponding to the device bit: in STHl, is set. When tha t device finishes, i t~; bi t in STRI is set. STRI and the wai t mask are !lANDed" together, aad if the resul t is nonzero, the scheduler knows that the job should be run. When a job is not waiting, bi:t 11 (the dummy wait bit) is set in both STRI and the wait mask, allowing the job to run. See F'igure D-IO. I/o. ll .. Ace r PR"V'LEGE: ~ NOf>j·RESICE .. r rOT ., [XECUTE OI'IlY coP" rOT Rf SULTS : }~.[-~ 8 !:~R ar.::.~ INHIBIT Figure D-lOa Figure D-IOb STRO D-6 STRI The DECtapc, card reader, C:lnd rU<DE are excepti ons. When C1 j oh is ,;ai tinq for one of these device ~.:hc 'tla.i t: ma::-;k is :Jet to zoro niLs '].:.8 of vlai t 2 are set t.O the ad(h~Gss of t~he DDB for the d(~V~L ce, C111Ci ~)i ts 9-11 are set to 1 or 2 for DECt.ape, 3 for RKOI) or 4 for the c~·lrc1 reader. 8 If a user program rOT or an 51 command requirl2s FIP to be caJ.lcd, ,an lOT parameter block is set up to hold the lOT and its parameter;3 ,/1 pointer to this block goes into JOBLNK. If a FlP lOT is to be :8xecuted which requires no parameters, the lOT itself goes into JOBLNI<:, ~lnd no rOT parameter block is set up. within Job stat.us Block 2 are four registers which correspond to the four possible internal files. If a register is zero, no file i~:; {open on that interne.l file. When the file is opened, a file cont.:rcl iblock is set up and a pointer to i t is put in Job status Block 2. At \the same time, the first 8-word File Retrieval Information Block far tthat block is fetched from the UFD and is set up in another block e,f ~free core. Referred to as the file window, this retrieval block i E~ ~sed to calculate addresses for file reads and writes. If part of the file being accessed does not correspond to this window, FIP is cal'od to move the windo~tJ to the appropriate area. ~vord 1 of the contro~ block remembers which retrieval information block is in the retr.i ~::'~;:'! 1 window. When a user program executes an RFILE or \'JFILE, the transf~:r . parameters' (word count and file address) are stored in the file (.r'r~t.rol : block _ The file address is an address wi thin the logical fi Ie. r~>.~: 'address of the transfer parameters in the user program is also s:~~· (:1 Then, using the file window, the logical file address is reduced t a ~physical disk address. A pointer indicating where to go in the ~Monitor, when the transfer is complete, is also stored. This bloc 1( IS : also linked into the disk queue (DSUTBL). See Fiqures D-ll and D-·'~2. CLKTBL is used to execute the STM instruction. It has a l-wor-cl entry for each job. If that job is not waiting out an STM, its entry ,is zero. If i t is wai ting, the entry contains the number of seCOLC:~S left to wait (in 2 t s complement). When the counter goes to zero, ti-:e . timer flag for that job is set. See Fig~re D-l3. D-7 o ADOP~SS OF FILE fJOINT[ft TO NUT IN .,NCO. U'O o WIUOOW SEGUENT INt)[X IN SEI. Wf'iOQW 2 3 4 file s~tatu 5 SEll j j A~ESS Of' R/. FILE P4~. DU(. FILE EXTENO£D SEa til 4 ADDRESS sm - FILE AOD~SS 6 ~.- S!G# • -WORD COUNT AOOqESS OF USER PAnAUETERS SEGifJ sza_ 7 01·0111 0.-01"" Figure D-lla. File Cont:rol Block ~'igure SEC:OI~~S ----_.II t D-llb. Fignre D-12. Rend/Write File Paramater Illock File Window, or File Retrieval Information Block .loa 1 _._. CON~(".. ~ .:• .loa 1 CO~OLE ., ,. SI::COIWS ...oa 2 -JOO It - CONSOLI!. # JOB N t ------------_.,_.TTYT8L Cl.KTBL Figure D-13. .- CLKTBL and TTYTBL . The TTYTBL table has a I-word entry for each possible system job .... Each entry contains the number of the terminal asso::iatE~d wi th that job. See figure D-13. D. ::3 (-'10NITOR SCHEDULING DATA BASE DEVTBL, JOBTBL, and related status blocks maintain some Edusyste~~ status information relat~ing to individual jobs. The monitor also main:" tains some of its own tables. These are used primarily to schedule. CORTEL contains the status of the user fields. It is a 7-word . table in monitor core, each wbrd corresponding to a core field. wit6i~ each e~try, bi ts 7 through 11 contain the job number of 1:hat field. If the field is empty, a zero is stored ~ Ei01J is not completely there, bit ?ro~rrc ss . A job is considered to be scheduled to be swapped in until the D-8 there. If the job i:hat occupies, 0 is set to indicate a swap is in in a field from the time it is time it is completely swapped out. ni t. ] f:; fiet-:. i f ~~hc job in that core field cannot be swapF Bit 2 is f:(~.I~. if thc: job in that field has not been run. It can sVlapped out. unt.il it has been run_ F1J? and 51 are called phant the sense ~llat: they run in place of a user job. There fore, w'h€ is running, the calling job number is stored in CORTEL. Bit 3 set to remember that it is actually a phantom. Phantoms can rl in field 2. CORTBL has an entry for every core field but fiel( whether it is available or not. At startup time, the Monitor'r and nonexistent fields have their lock bits set to prevent use. Figure n--14_ 1 CO"Tal ;, fl'I(LD 1 I fl'lfLD Z , t I t FIELD 3 r I I FIELD 4 I I FJELD 5 t t FiElD. . : ~·os'" Figure D-l4. CORTBL PRGTBL maintains information on what program each user is It has a 3-word entry for each possible job. When a user type: or RUN command, the filename (one to six characters P'~)(",~C'd In format) is stored in PRGTBL. This information is u::"'3cd solely ~ EduSystem 50 SYS5TAT. nSUTBL is the disk request queue. It contains a 4- Nord el each core field in the system. A 7777 word terminates DSUTBL. each 4-word entry there is a register for each of the four pas: files open to the user currently in that core field. If the c: zero, there is no file transfer pending for the intern2l file lser in that core field. If the entry is nonzero, i t ~~.S d poi· 3. parameter block (the RFILE/WFILE parameter block) \\,;hich ct':-sc :he transfer to take place. A pointe:c, DSKPTR, cycles thrcuql1 :0 do transfers. See Figure D-15. t D-9 DSlJT Ill. + 7 fJImn' POt FIELD , ~CTAF£ FILE. ------FILE I } ENTR'" "'" '''LO 2 FILE 2 FILE 3 1 FILE" FILE 1 ENTRIES FOR FlELD N FILE 2 FILE 3 .... ENO OF LIST ~---~- 7777 -_.-._-----_._--Figure D-lS. DSUT] DISK FILE DATA BASE For each EduSystem 50 account: number ther is a separate disk library that contains named files. The User File Directory, ::11 )ntains the filename (and some associated information) and 2 1.0cation info!:1nation for each file, controls this library. name is in an 8-word name block; the retrieval information is .)ne or more 8-word file retrieval information blocks. The UFD ~lf is stored in disk segments, up to a maximum of seven. ·l 'rhe first 8-word block of the UFD is a dummy block. 18 It C'on- all zeros except for a pointer to the next block. The MFD is identical in form to a UFD. The only difference Where the UFD has six file? characters packed into three words, the m"D has the account Jer in the first word, then two words of password. Altogether, l~e t.hree words are the name of the associated UFD. See Figure in the contents of the name block. D--10 l 10 DUMMY BLOCK I r !--------------_. 10 I ~ l .... FILE tJAMt: - Ptr. to r~\.t nom!! b:oc: ~ E ~!. File t Pro!ec'I,,, -- ~. ~ Dey Ice Dole d C rnotlon Plr. I') n~lrie'/o; ElIo("~ I ~--.- .. FILE RETRIEVAL J 'v 'Iv I J UFD D-16. Fi<Jurc uS! ~ r~----o_--Se~r-nerl INFORMATION BLOCK)l SefJment ~ 11":18 J I SaQmenl ,~ 1 ~~..---~ CPU time uUd , 5, z e Plr. to nl'lil Pelrl'lY"i P.IO"~ D.5 P:r '0 r~:d rc""'o b:;):k Quot.'~ 1;; (:I:;~~_ NAME BL.OCK I Sc~men! 1'" ,.,. -- .. ~---------- 1 12 I3i:: -----~ G r c.: roC ',; () ;"'. 1.: r ,\("' " 'i,~ U F lIe Direct0ri~As .:- ~. :' ~ 8 = ------------- FILE PIl:"NTOr·l DATh PJ\SE The primary data !-1FD and UFDs. D:,\SC of the File; pr.anto:i1 is the cL ~~, ,-~tor~c:::; I AlthOl.ll]ll they may be accessed as files !:::' ,:t \l;CC 1 ,'" j ~ by ?IP. Stor-age Alloc,ltion Table spaCL:. The SAT is a bit map The 12 bits in e.:lch SNE ....'ord correspond to 12 dis;·: 1 if the ~J2t.3 (S71.T) . se~ment is use~, 0 if it is available. all ti ls \,.-hi eh correspond to nonex i s ten t disk to L:;. 10 C ,:! ted a t the to? If the SAT is mE:n :.5. 0 f F I P 's 4 K . up~~tcd, See Figure D--17. S(~C:-,(':lt.?, I t i s t 11 ere:: 0 ::::- C S -II Ci r; pc cJ it is written b3Ck to the ':.'1;(. ~:.Yl' i ~1 toe : '. : d~~j. SAT 7777 ~------------~ 06-056'5 Figure 0-17. FIP also m~lint(lins SAT tClbl~:s some convenient withjn its own 4K area. The:";E' t2':.bles allow FIP to get at. frequently used infonna":ion quickly. use)':~ FDr exolTlple, Hhfc=;n a his u::'D is located, is \vLerc retriev~l logs in, the fetchl~u th~; from bJ.OC/~, X"lFf) and \d""!ich indiciltes stored in a table. FIP necJ li:)t then scan lhe MFJ) for this user every time he opens a file. JOR'l'hjl 110 one cCIl-:'iJ.in~, is log9'2d in for that job, the cnt.':y i_s zero. u,)cr logsed in, JOI31'AS sy~3ter,1 a l-word entry for. eC1ch possibJe \-J i tht~ _._------..., I~cown See Figure 0-18 . . _- (. 1---------ADDrl[SS R[TTf~L I~HO IN UFO rJUMAEJI ~'---------4 JOB 2. If thc.-r-e is a RELATIve P(Jt:'>!H R o J 08 I If (Do llut confuse .fIP I s .:1ccount nUmbel" is stored. th the t-joni tor I s JOB7.8L.) job. POINTER M:COUtH IWMfJl:R I-,.--------i f-- ... - -----ADDRfSS -- POHH Ef~ f- - - - - -'- - - - ADORESS POINTER --- - -- - - -- ADDRESS FILE 0 i} riLE 1 FILE t:: } FILE :3 EN T TtlL ENTRY oa'O!>81 Figure 0-18. E~~TTDL Wltllln con ta ins ~lIl [3 -word PIP TaLles bJock for each P'Js s ib le sys tem job. t.hese eight v:ords Qre four 2-word entries I open file [or th~t j~G. onC! fer each possible If the entry is zero, .the file is not open. D-12 If the file is open, the firs··t word points to the entry in ~TTBL for this file. Th~ second word points to the location .vlithin the user t s UFD where the File Retrieval Information Blocks for this file begin. See Figure D-18. UFDTBL and RETTBL work together to maintain retrieval informration for all Ul?Ds in u.se wi thin the system. A UFD is in use if one or more users are logged in wit~h that account or if the user has opened a file from the library of another UEer. There is only one entry in UF'DTBIJ and RETTBL for each UFD, even if more than one user is using i t . .. UFDTBL is a table of 4-word entries. The first is the account. number of the UE'D ,.,hich is open, the second is the number of users \-Jho have access to it. (this number is decremented each time a user stops using that UFD. If 1:he count goes to zero, the entry is removed from rrFDTBIJ and RETTBL.) The access count~ is in 2' s complement form. RETTBL contains the File RetriE~val Information Block for the UFD corresponds t~o t:he account number in UFDTBL. There are no ~ointers between the t.wo tables. Entries correspond posi tionally. ~he number of en·tries in these tablE~s is at leas1: the nurnber of on-line isers. The numl:)(~r of additional ent:ries depends on the amount of £i le ;haring. For instance, the library UFD is invariably open to several ioers. See Figure D-19. ~hich r .- ------~: ~-; ---- --l _ . ~-------~ I ~= :- :,-,------ '---'1 1"'---1 __~, ;i;::'::--=~_mj g~8~~~:-:':;~~2} ':~~~j ~------ --- -- UFDTBL Figure D-19. D-13 UFD Retrieval Data UFDTBL and RETTBL are initialized to have the system account (#1) open ~s the first entry with an access count of 1 (actually -1). This allows FIP to get at the, MFD while processing a LOGIN request. ~AT All FIP tables except the SAT are cleared at system startup time. is cleared at initialize time. MONITOR TABLES ~rABLE ENTRY SIZE SIZE N/\'HE WHERE COHrrBL TS8 6 1 L2QTB TS8 16 1 SKPTBL TS8II 2xT+4 1 ULTODTB TS8 56 1 trU('TBL rrS8 56 1 t" j~, ~<T BL TS8 33 3 DI~'7'rBL TS8II 2xT+18 1 JOBTDL TS8II J+l 1 CLKTBL TS8II J+l 1 'rTYTBL TS8II J+l 1 PRGTBL TS8LL 3xJ 3 DSUTBL TsaII 4xUF+l JfADLE FIP J+l 1 EN'TABL FIP 8xJ 2 UT:"\BLE FIP 8xJ 4 RT1\DLE FIP 16xJ 8 SL\TTBL FIP 344 , 4 I r " \1\; - '! C;\ , r " r-"', , _ <-1, 1/12 r,--..l, , \.~ T=NULINE+l UF~ J=JOBMAX . n-14 USER FIELDS APPENDIX E ASSEMBLING AND LOADING EDUSYST'EM 50 FROM SOURCES 'E. 1 ASSF..MBLINC,!- EDQ.§YSTEM 50 MONITOR Use the following command line~ under OS/8 version 3 to assemble ',Monitor, where CONFIG.PA has been modified to reflect the desired ;configuration: .PAL SI<CONFIG~PARA~SI/K .PAL FIP<CONFIG~PARA~FIP .PAL INIT<CONFIG~PARA,lNIT .PAL TS8<CONFIU,PARA,TS8,TSBII/K When using CREF, the M option \alill be necessary. 'The binaries ,may be punched on paper tape, or on 20K or larger systems, a shorteu t may be taken. ~rype, under OS/8, e Use the C option in INIT to write fields through 4 to tracks ¢ through 4 on 1:he disk, initialize the syst.em, load PUTR using trio D option, start: the system, log in under account 2, type "START f;~", and the system is up. E.2 ASSEMBLING ~~D LOADING BASIC To assemble BASIC under OS/8 version 3. type: .PAL BASED .PAL BASCOM .PAL BASLDH .PAL EIASEXC .PAL BASIeN ~., E-l ) create a SAVE format file, the binaries must be tra.nsferred to lSystem 50 library. Then, perform the following under EduSystem 50: .eRE BASICiOPE 3 BASIC;EXT 3 37 • R LOADER I NPfJT -BASED OPTIONt as .SAVE BASIC1R LOADER I NPUT -Bl~SCOM OPTIONt BS .SAVE BASIC 6144 400JR LOADER INPUT -BASLDR OPTIO~- t BS .SAVE BASIC 13150 400iR LOADER INPUT -BASEXC OPTIONt BS .SAVE BASIC 13714 400;R LOADER I NPUT -BAS ICN OPTION- , as .SAVE BASIC 14157 400 SSEMBLING AND LOADING THE FORTRAN SYSTEII1 o assemble the FORTRAN system under OS/:3 version 3, ·type: .PAL FORT~DECODE .PAL FOSL,DECODE • PAL FDCOt-1P .PAL FOSSIL o create the new SAVE files under EduSystem 50, .CRE FORT;OPE 3 • CRE FOSL; OPE 3 .CRE FDCOMP;OPE .CRE FOSSILJOPE FORT;EXT 3 5 }'OSL; EXT 3 5 :3 FDCOMP;EXT 3 14 3 FOSSIL;EXT 3 9 E-2 first type:
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies