Digital PDFs
Documents
Guest
Register
Log In
DEC-08-ODSMA-A-D
December 2000
146 pages
Original
4.7MB
view
download
Document:
dec-08-odsma-a-d
Order Number:
DEC-08-ODSMA-A-D
Revision:
Pages:
146
Original Filename:
https://svn.so-much-stuff.com/svn/trunk/pdp8/src/dec/dec-08-odsma/dec-08-odsma-a-d.pdf
OCR Text
. 4 www 4 m S $9 digital equupment corporation wwmfiwfiwOOOOOOOO_ mm 4 4 4 4 4 4 4 4 4 4 4 4 4 4 .4. O. O. O. .0 O. O. O. O. O. O. O. O. I. O. DEC-OS-ODSMA-A-D 4K DISK MONITOR SYSTEM‘ Order additional copies as directed on the Software at the back of this document. Information page digital equipment corporation - mognard.~mos$ochusetts 2nd The and Printing February 1974 (Rev) information in this document is subject to change without notice should not be construed as a commitment by Digital Equipment Corporation. for any Digital Equipment Corporation errors assumes no that may appear in this manual. responsibility The software described in this document is furnished to under a license for use on a single computer system and the can purchaser copied be in (with inclusion of DIGITAL's copyright notice) only for use such system, except as may otherwise be provided in writing by DIGITAL. Digital Equipment Corporation or reliability of its DIGITAL. Copyright <:) 1973, 1974 no responsibility for the use equipment that is not supplied by assumes software on by Digital Equipment Corporation The HOW TO OBTAIN SOFTWARE INFORMATION page, this document, explains the various services software users. The postage prepaid READER'S COMMENTS document requests the user's critical preparing future documentation. The following CDP COMPUTER LAB COMSYST COMTEX DDT DEC DECCOMM DECTAPE DIBOL located at the back of available to DIGITAL are trademarks of form on the last page of this evaluation to assist us in Digital Equipment Corporation: DIGITAL INDAC PS/8 DNC KAlO LAB-8 RAD-8 LAB-B/e RSTS LAB-K RSX EDGRIN EDUSYSTEM FLIP CHIP QUICKPOINT FOCAL GLC-8 IDAC OMNIBUS RTM OS/8 RT-ll PDP SABR IDACS PHA TYPESET UNIBUS 8 PREFACE Manual of the 4K Disk Monitor System Reference updates and and Manual (DEC—D8-SDAB—D) Disk Monitor Reference System 8 of to and Introduction 1970, Change Programming incorporates Chapter This printing the Notice (DEC-DB—SDAB-DN). iii CONTENTS Page CHAPTER INTRODUCTION 1 I-‘ CHAPTER H EQUIPMENT REQUIREMENTS N MONITOR OPERATION MN Heap NH O l GENERAL DESCRIPTION Monitor Residence 2 1 2-1 System Modes 2 N m BOOTSTRAPPING N I» STARTING THE MONITOR THE MONITOR 2 2-2 N W COMMAND o a o o o NNNN hi>hn§lsfifl> o n o o a o o I 1 1.1 1.2 1.3 1.4 2 STRINGS Command String Format Device Names Filenames Punctuation Special Characters Examples of Command Strings LOADING PROGRAMS-DISK . N N 01mln NH N N . axmtn Mia SYSTEM BINARY LOADER Binary Loader Operating Procedures Binary Loader Error Messages c 0 SAVING SAVE PROGRAMS (SAVE COMMAND) Command Format SAVE Command . CHAPTER 1-1 Processing N u CALLING A PROGRAM N m MONITOR N \p SYSTEM ERROR MESSAGES u (CALL COMMAND) START CONDITION NNNN \lmO‘U'IU'Ib-h I I I NIFDN I—Ioo NIT,” FJF‘H hJF'o O 2-14 2-14 2-15 SYSTEM PROGRAM LIBRARY PIP wwww not-0|. HHHH caucus wNMNH a W W N N NH n 0 t o .0. UNF“ Loading and Saving Operating Procedures L and D Options M and P Options A, B, F, U and S Options Using PIP in an RF08 System .EDITOR Loading and Saving Operating Procedures Wuwww HO‘MUNN I I I O wtrw I-‘I—‘Hmac .3 .3.1 3.2 ww 4K PAL-DISK ASSEMBLER Loading and Saving Operating Procedures FORTRAN-D . o wwwwuww Abnhubuh-li-b-h-bnb-h MNNl-‘I—‘HI-‘H n . o . 1 2 3 4 Operating System . c o o . ww ww APPENDIX 1 2 1 2 3 Loading the FORTRAN DDT-D Loading and Saving Operating Procedures DISK MONITOR SYSTEM RESTORE Assemble and Save RESTORE Operating Procedures A SYSTEM GENERATION Bootstrap Sequence TOGGLING IN THE RIM LOADER LOADING THE BIN LOADER LOADING AND EXECUTING DISK SYSTEM BUILDER LOADING AND SAVING SYSTEM PROGRAMS 3 4 B SYSTEM FORMATS. SYSTEM DEVICE APPENDIX Operating System Operating Procedures Operating System Diagnostics Examples 6 6.1 .6.2 6.3 l 2 APPENDIX Compiler Loading the FORTRAN Compiler Operating Procedures Compiler Diagnostics Debugging Aid (Symbolprint) wwmwwm htuhoh)k)N}4F‘H 0 ()0 NH NH Blocks Storage Allocation Map DATA wNI—I LAYOUTS Directory Name (DN) (SAM) Blocks STRUCTURE File (ASCII) Data Structure File (BINARY, FTC BIN) Data Structure Saved File (SYS, USER) Data Structure Source Binary PIP DIRECTORY LISTING MONITOR CORE USAGE DIAGRAMS COMMAND DECODER LOCATIONS INPUT AND wwwmwmw HW‘DOKDQU‘IH USED BY COMMAND DECODER OUTPUT REQUIREMENTS FOR COMMAND DECODER APPENDIX APPENDIX U SYSTEM PROGRAMS UU mid LOADING PARAMETERS SAVE STATISTICS I321 I/O ramp: uimld FOR SYSTEM PROGRAMS PROGRAMMING GENERAL CALLING FOR BASIC GENERALIZED I/O ROUTINE DISK/DECTAPE I/O ROUTINE vi wrara (JON Page I/O DEVICES APPENDIX F VALID APPENDIX G PERMANENT SYMBOL TABLES INSTRUCTION CODES PSEUDO-OPERATORS G. G. TABLES Number System Error Messages Special Key Functions Ilil Summary of Editor Commands PAL—D W”:W(lwtnu)?I»uiwtnu2wluWIOFJHFJK)m~dO\UIALJL)H}A Pseudo-Operators PAL-D Error Messages Summary of FORTRAN Statements Compiler Systems Diagnostics Compiler Compilation Diagnostics Operating System Diagnostics DDT-D Commands System Device and Core Capacities Page 0 Locations Used by Command Decoder Valid In/Out Devices For PAL-D, Valid FORTRAN-D Input/Output Valid I/O Devices for PIP EDIT ILLUSTRATIONS Number Disk Loader/Paper Tape Flowchart Disk Storage Layout A-l 3-1 DECtape Storage Layout Directory Name (DN) Block Format Storage Allocation Map (SAM) Block Format II II Contiguous-Page Save File Format Noncontiguous-Page Save File Format Sample PIP Directory Listing I m()0(30(30(1()?tflwtflwlflwtflmtfiwwawwNHHmqmaw II I vs User—Time Core Usage Usage During SAVE Command Execution Core Usage During CALL Command Execution Monitor Flow Chart (Part 1) Monitor Flow Chart (Part 2) Output List Produced by Command Decoder Command Decoder Core Usage Command Decoder Flow Chart (Part 1) Command Decoder Flow Chart (Part 2) Command Decoder Flow Chart (Part 3) Command Decoder Flow Chart (Part 4) Command Decoder Flow Chart (Part 5) Command Decoder Flow Chart (Part 6) Calling Sequence of System Routine Monitor—Time Core I Ho vii I N U‘l wv¢9090°NI—‘I—‘W‘DQO‘ I I-‘O CHAPTER 1 INTRODUCTION Disk/DECtape Monitor System is designed for any PDP-8 This system having at least one DECdisk or one DECtape. flow of the consists of a keyboard-oriented Monitor, which controls a comprehensive software package, and PDP-8, programs through the which includes a FORTRAN Compiler, Program Assembly Language (PAL-D), Edit (PIP), and (Editor), Interchange Program Peripheral program a Also (DDT—D) provided is program. Dynamic Debugging Technique program (Builder) for generating a customized monitor according to the number of of user's particular machine configuration (amount core, The PDP-8 computer ' disks DECtapes, etc.). or system is modular and open ended, permitting the user to construct the software required in his environment, and allowing full access to for storage the disk (or DECtape) referred to as the SYSTEM DEVICE and retrieval of By typing appropriate commands to the programs. Monitor, the user can LOAD a program (construct it from one or more units of binary coding previously punched out on paper tape or written it and assign it core), SAVE it on the disk by the Assembler, (write with an out, assigned starting address, on the system device), and for from the later CALL it (read it back into core device) system The - - execution. 1. 1 EQUIPMENT REQUIREMENTS The minimum System A basic equipment requirements as are PDP-8, PDP-8/S, PDP-B/I, 4K of of the Disk/DECtape PDP-8 Monitor follows. 8L, also runs on 8/E, 8/F, 8/M. core Teletype (Teletype is Corporation) 3-Cycle Data Break a registered trademark of Teletype (Option required with PDP-8/S) one least one DF32 Random Access DECdisk File or at least Random Access DECdisk File or a TCOl Automatic Control The DECtape must have with a T055 or T056 DECtape transport. timing and mark tracks written on it prior to use. At RF08 NOTE to core, up system recognizes up to 32K of disks (one Type DF32 and three Type D832 or one Type RFO8 and three Type to R808) up eight (TCOl's only) and a high-speed papertape DECtapes The four reader. 1-1 CHAPTER 2 MONITOR OPERATION This chapter contains a discussion of the operation of the Monitor. chapters contain descriptions and operating procedures for Succeeding the system programs. 2.1 GENERAL DESCRIPTION The 4K Disk Monitor System permits the user to control the of flow programs through his computer and takes full advantage of the extended In addition to the memory capabilities of disk or DECtape. Monitor, the system also contains a library of system programs. Together, they provide the user with the capabilities of compiling, assembling, editing, loading, saving, calling, and debugging his own programs. 2.1.1 Monitor Residence Monitor, well as and user is and stored on system programs, from the SYSTEM DEVICE. To obtain a working Monitor, the. user must first build his own customized version, via the easy-to-use dialogue technique of the System Builder program and store this version on the system device. the Following this, System Program Both of these procedures are Library is created on the system device. described in Appendix A. as retrieved In core, the resident part of Monitor (called HEAD OF MONITOR) resides in the top page (locations 7600 through 7777) of field 0. The starting address of Monitor is 7600; 7642 is entry address to the I/o system which routine, performs all reading and writing on the system device such as (see Appendix F). Nonresident those portions of Monitor, routines which perform SAVEs and CALLS, are automatically called in as location 7000 needed, and in core, they share the area from through 7577. (These portions disappear after use, leaving this area for the user.) Specific diagrams showing system device and in core, the are allocation of the given in Appendix system, B. both on the 2.1.2 System Modes At any point in time, the system is MONITOR MODE or USER MODE. Monitor mode is entered (1) running whenever the in of one Monitor is modes: two started (see point, any Paragraph 2.2) or (2) when a CTRL/C is typed (this is accomplished by holding down the CTRL key while typing C) while running any system Monitor mode is signalled by the Monitor program. typeout of a dot (.). At both Monitor and system program time, Monitor is able to sense a CTRL/C causing the system to enter Monitor mode, return to Monitor at location 7600, and respond with a dot At (.). this Monitor command can be issued via the Teletype keyboard. User mode is program. System (*). asterisk 2.2 The present whenever the system is executing programs user mode a system or user‘ by responding with an BOOTSTRAPPING THE MONITOR following discussion assumes built and stored on the described in Appendix A. The signal bootstrapping that a customized system device, of Monitor into is core Monitor according to has the been procedure only when the been cleared or its contents otherwise leaves destroyed. the System Builder resident portion of Monitor in core after building. the Turning computer off and subsequently turning it on again does not normally destroy the contents of core. resident The and Monitor (locations area bootstrap procedure is as RF08. 1. Toggle in upon the of the one 7600 follows, necessary through 7777) and is the same Contents Symbolic *200 0200 0201 0202 0203 0204 7750 7751 ' V for following bootstrap routines, type of system device. Disk Location has 6603 6622 5201 5604 7600 DMAR DFSC JMP .-l JMPI .+1 7600 7576 7576 *7750 7576 7576 both DF32 depending DECtape Location Contents 0200 7600 0201 0202 0203 0204 0205 0206 0207 0210 0211 0212 0213 0214 0215 0216 1216 4210 1217 ’ 0217 7577 0220 0221 7755 7754 0220 *200 7600 BEG, TAD MVB JMS STARTING THE TAD RF JMS DO JMP I BEG 0000 DO, DTXA DTCA DCA I DTSF WC JMP .-1 JMP I 0600 Do MVB, M201, -201 7755 CA, 7754 WC, 0220 RF, After toggling in one of the above switches the to 200 and press Monitor should respond with a dot brought into core. 2. DO TAD M201 DCA I CA 3620 1222 4210 5600 0000 6766 3621 6771 5213 5610 0600 0222 2.3 Symbolic bootstrap routines, LOAD ADDress (.) after set and START. has been it MONITOR Monitor START is at location 7600. A jump to this location can be made by either (1) stopping the machine, setting the switches to 7600, and pressing LOAD ADDress and START, or (2) typing CTRL/C when in Monitor mode has when or coding to been also errors system a program (or any user program which includes after CTRL/C) is running. Jumping to 7600 loading performed generates a START instruction (ST=7600). Certain sense a cause a jump Monitor START performs this to the location. following actions. 1. Saves the coding from location 7200 through two scratch blocks on the system device. 2. Reads blocks 1 and 2 (containing the rest the system device into these locations. 3. Transfers control to Monitor, return, line feed, and a dot. The Monitor can be restart performs restarted the by typing which the 7577 of Monitor) responds with RUBOUT in the first key. from carriage a A Monitor actions as described above except for step 1. A common use for RUBOUT is to terminate a command string when a mistake is made. The command string is ignored, and Monitor responds as described in step 3. The user core image on the device is system not changed by RUBOUT (it is changed, however, by tC). same 2.4 COMMAND STRINGS Commands are typed in the form of command to direct the strings Monitor, or a system program, to perform some action. Command strings are simple in format and afford an of easy means communicating with the system. Monitor indicates its readiness to accept a command string dot, and at this point, some Monitor command, such as CALL be by typing or SAVE a can typed. System programs indicate their readiness either typing an asterisk or a query. follows. *OUT- *IN- by as In the case Requests one output device name. of disk or the filename to be assigned to the output data must DECtape also be specified (see Paragraph 2.4.1). Requests disk or more device (up to five) input filenames of files DECtape, input (see Paragraph 2.4.1). one and specified *OPT- to receive information The most common queries are Request one alphanumeric option or character; in each system program. For names. must also be entered as a switch, single Chapter 3 for options available see This communication between the system and the user is handled a by of Monitor known as the Command Decoder. The Command Decoder is a system program (.CD.) which is saved on the system at build time. Command Decoder is called into core by the system when needed and occupies any four contiguous pages of core. A description of its core portion allocation and a flow chart, is given in calling procedure, plus Appendix C. Error messages produced by Command Decoder are listed in Paragraph 2.8. Messages unique to individual system programs are given in Chapter 3. 2.4.1 Command Command strings String are Format composed certain rules of punctuation. Each a. Device b. Filenames c. Punctuation d. Special characters of these of a few basic elements Their basic elements are as and names elements is described in the follow follows. following paragraphs. Device Names follows. 2.4.1.1 as Device - in command permitted names DECtape unit, if both disk and DECtape unit number, 0 through 7) (n Dn: system strings are in the present are = DECtape unit 0) S: System device SO: System Device in RF08 System (lower half of Disk 0) Sn: Additional through 7. R: High-speed paper tape equipment (reader or punch) T: Low—speed paper tape equipment of punch) 2.4.1.2 Filenames (disk or 128K segments of RFOB disk number 1 (n = unit Unit 1 is the upper half of disk 0,; unit 2 is the lower half of disk 1; etc.) - Filenames the limited are (reader or characters in Teletype four to composed of any combination of alphanumeric characters or with the characters special following exceptions. both and Although printed nonprinted keyboard characters. are allowable, printed characters are recommended. and length be can Imbedded cannot in a are filename spaces appear (they It should be noted here that the Monitor is given the filename EX C. One reason for this unconventional use of an blank is to protect the Monitor from accidental imbedded destruction (e.g., deletion via PIP). 1. ignored). 2. A file name is the the by described in (n) SYS USER filenames ! (n) Appendix B under user Saved system program Saved user I'DATA Structure". in file program file in BINARY Binary program file FTC Interpretive binary file Source core core language program file Compiler). BIN the specified by or symbols. : 7 , FORTRAN ASCII following words are automatically system. They are used internally by the system and be referred to or modified. The data structure of these files appended cannot to of the one SAVE CALL Extensions be cannot bank bank are: n. n. (input (output from The extensions to PAL-D (output from PAL-D Assembler or Assembler). FORTRAN Compiler). Filenames (and extensions) are meaningful for file structured only devices and DECtape). If they are specified for other devices, (disk Both the filename extension on and name they are ignored. appear (AF below directory listings produced by the list feature in PIP. means version AF.) Example: NAME TYPE BLK AF PIP .SYS(0) 0015 SRC1.ASCII [0007 BIN 2.4.1.3 follows. .BINARY 0001 SRC1.USER(0) 0001 Punctuation - Punctuation within command is strings as Used to separate device names, when more than one is given in a command The comma is also used to separate core string. references in a SAVE command when more than one string, continguous area of core is specified. Precedes - the Terminates entry point specification in each following device filename in file saved the to be is as a name. SAVE a user a SAVE The colon is also used command to indicate that the program. ‘Separates the beginning and ending addresses of core specification in area Follows the saved 2.4.1.4 below. as filename in If SAVE SAVE contiguous a command. command when a file is to be system program. a Special Characters CTRL/C a a command. Special characters used as described given while the system is in Monitor mode or a is ~ are running, system control is returned to Monitor start (location 7600). Monitor with a dot. responds Type down the CTRL key and striking C. 1C CTRL/C by holding does not echo (does not print). program CTRL/P Typed in response to a 1 typeout. Instructs the with the next down the CTRL key and to proceed system operation. Type CTRL/P by holding fP does not striking P. echo not (does also be print). used to CTRL/P can prematurely terminate certain while in operations progress (e.g., the typing out of a file directory by the list RETURN key option in PIP). Carriage terminates current command string input. in to a system response query, it indicates that the user does not desire to specify the item device (e.g., name) RETURN does not requested. echo. When RUBOUT key . Causes return typed alone, the current command string to be ignored, and the returns to the beginning of the command string and ready to receive a new command. RUBOUT does not echo. system is 2-6 2.4.2 Examples of Command Strings rules and explained above. examples illustrate the elements commands are and commands Monitor both of program system Samples is For all the examples below, the system response (typeout) given. underlined for clarity. These Monitor Commands: .CALL — .SAVE Call the user program file, PRGl, device into core the from system for execution. PRGl) PALD!O~7577; — a program, previously by Loader into locations 0 7577 of core, on the system 6200) Save loaded through device system program (I). Assign and 6200 of starting address filename, PALD. a as a a - System Program Commands: *IN-S:PRO2 or PROZ on the the file system The "8:" device as the input file. DF32 or for a used is DECtape RF08 for is used "Sn:" system, system, see Table B1, Appendix B. *IN-SO:PR02‘) Use *IN-S:TST1,Rg)or *IN—SB:TST1,R:) Use the TSTl file on the one *OUT-DS:SPEC) on file Write the output and unit No. 5 assign filename SPEC. *OUT-T:) Punch Select option carriage Spaces in command strings and are perform :SAVE PALD same an An occurs the automatic after 10-7577; 6200) :SAVEPALD10-7577; 6200) user Opt-request. Thus, both examples below function. ignored. the M. return response to correct DECtape it on the the output Teletype (low-speed) paper tape punch. *OPT-M equally system the from file the as reader high-speed paper tape input files. or for DF32 "8:" is used (Note: RF08 for "Sn:" DECtape system, system, see Table Bl, Appendix B.) and device are 2.5 The LOADING PROGRAMS Disk produced System by - DISK SYSTEM BINARY LOADER Binary the Loader takes as PAL-D Assembler and loads input the binary coding it into core in executable form. This loader is a system program saved on disk at build time. It is called by the user in the same manner as It any system program. occupies locations 6200-7577 and has a starting address of 6200. When Loader loading is completed, "disappears" after first entering the loaded program at the starting address typed by the user just prior to (see loading Paragraph 2.5.1). Loader accepts input from the system device or paper tape. In 8K and Loader sets larger systems up locations 7574 through 7577 to perform a start in fields other than 0. It is the user's responsibility to protect these locations if he wants to start in a field other than 0. 2.5.1 Binary Loader .LOAD,) " *IN- Operating Procedures Direct Monitor to bring system device into core Binary Loader from the for execution. Loader requests source of input(s). one or Type device names, If an separated by commas. input device is a file-structured device, include more filename(s). five files can be An specified. message (see Table 2-1) may appear the entry of an IN command. Up to error E or I following Examples *IN-R:) Input one from tape the high-speed paper tape tapes from the high-speed paper tape reader. *IN-R:,R:,R:) Input three reader. *IN-S:INPT) Input the file *IN—S:BIN2,R:) Input the file BIN2 from the system device and tape from the high-speed paper tape reader. *IN-S:BIN1,S:BIN2) Input the files BINl device. 1 If device(s) INPT are actually found responds with one *ST= from the and system device. BIN2 from system valid and filenames (if any) are on the Loader system device, asterisk for each correct input. Loader requests the starting address control is to be transferred when The address is typed in the completed. fnnnn the one to which is loading form where start this forces Loader to f=field number; the into specified‘ field until a loading "field is setting” found in the input file or (omitted if field 0), tape and nnnn=location within field Examples *s'r= ) Load into *ST=7600) *sr=0) Return *ST=30225) Load into *sr=1oooo) field 3. location 225, Jump to Load into Loader loading. field field 1. Monitor after to Return time, field 0. Monitor after to loading into field 1. prints a series explained below. now as each Following required First up—arrow: paper one Loader input, tape put of up—arrows, typeout, up-arrow perform to 3, after loading. or more the one at user a is actions. is ready the tape If load. in the reader. to Type CTRL/P. Second up-arrow: CTRL/P Type Loading Computer. to bring in data temporarily stored on the the disk by the Loader and transfer to specified again address. is used, the reader. starting equipment if Teletype paper tape (Note: turning on type CTRL/P before Multiple Input Files An up-arrow input file insert the is typed out as the processing of each If paper tape input, is completed. and the file in next reader type CTRL/P. Repeat the response to files all above step until given in the *IN— request have been processed. to After all files have been entered, type CTRL/P jump to the previously specified starting address. NOTE After each input paper tape is read, the paper tape version of Loader the user to types CTRL/P continue. However, the low-speed paper tape version HALTS. when Thus, using the Teletype paper for high-speed loops until input, PRESS CONT on need not type CTRL/P but the console and START the this point, Binary Loader disappears and previously specified starting address. the 2.5.2 An user tape reader. paper At tape equipment the Binary illegal control is tranferred to Loader Error Messages checksum error condition causes Loader to type 3 and return to Monitor illegal filenames 2.6 The SAVING or PROGRAMS after a CTRL/P or CTRL/C. devices are as specified in Error messages for Paragraph 2.9. (SAVE COMMAND) SAVE command enables the user to write core images of or system programs from core onto his system device for call-in subsequent (CALL) and execution. For example, a program which has been loaded by the Binary Loader can be stored on the system device by the SAVE or a command; previously saved program which has been called in and modified by DDT can be stored in its updated version on the system device, overlaying the old version if desired. user Core images can be saved in units of one or occupying one block on the system device. (see below) written out. though it more If pages, a core addresses only were For each page specification a portion of a the entire page, is page example, the core specification 45-150 is treated as 0-177. Core areas to be saved be contiguous or core 32(10) specifications, in monotonically increasing single-page or multiple-page requests, can be entered in a single SAVE command. when the system device is an RF08 all SAVE's disk, are noncontiguous executed on as SO. only by using PIP. desired the by combination of any System and user files N ,10 I user. can be may Up stored to on 51, 52, etc., 2.6.1 .SAVE SAVE Command Format filename SAVE {E} core-specifications,...; entry-point Directs Monitor to call in the nonresident SAVE routine. filename (program name) to be assigned to the This name will be device. the systems used to call the file later when the user wants to Restrictions on read in and execute the program. in found be can filenames of the formation saved 2.4.1.2. program Any previously Paragraph filename The file on and "filename" same with the having the extension will be automatically overwritten. same l of a filename the is typed immediately after user desires to save it as a system the file if in saved this A PIP). program program (e.g., can manner to be by simply typing its in called name (the word CALL is not required). Monitor ;filename) An of name .SYS extension to the filename. is automatically appended a of filename after the to save it as a user desires be can manner A program saved in this program. called in and executed later via the CALL command. : is file typed immediately if the user LCALL filename) An extension appended to name of .USER is automatically filename. the core-specifications Up to 32 core specifications can be entered in a Each core specification is SAVE command. single The separated from the following one by a comma. last core specification in the series is followed Addresses are expressed in octal. by a semicolon. SINGLE-PAGE CORE SPECIFICATION fnnnn where f=fie1d number (can be omitted if field 0). nnnn=any user location within the page which the desires to save. Examples 0 Saves 177) 3570 locations field 0. Saves of 30100 Saves 177) MULTIPLE-PAGE When a user page 0 (locations of field 0. CORE wishes 3400 0 through through page 0 (locations of field 3. 3577 0 through of several SPECIFICATION to contiguous pages, he specification in the save can a core type a area multiple-page core format fnnnn(l)—nnnn(2) where f=field number (can be omitted if field 0% nnnn(l)=any location within the first page of the series of contiguous pages to be saved. nnnn(2)=any location within the last of page series of contiguous pages to be saved. the The following a. The rules beginning apply. address be request must address (nnnn(l) of smaller must multiple-page ending a than the be smaller than nnnn(2)). b. Both c. The field number (f) must be within the range of no check for the your system; however, validity of this number is performed at SAVE time addresses must be in the same field. 0 Examples 0-7577 10000-7777 Saves Saves this all of field 0. all of field is the same as 1. Note that typing 10000-17777 the following for explanation how the field number (5th significant digit to the left of See of the decimal 2—12 point) is "remembered." 30425-745 400 locations through 3 and 4) of field 3. Saves (pages 777 NOTE Only field ONE can saved, a separate given for each. The entry format entry-point “ point annn An CALL nonzero remembered and (Remember: only Example: The SAVE SAVE SAVE SAVE In 1, of time was saved the program, in the (see explanation above) entry point of 0 program 'The LAST be saved by each SAVE fields are to be be must SAVE command multiple If command. causes regardless a at to Monitor field into which the return of the saved. is number encountered in a SAVE command string to all other addresses in the command string. field can be referred to in each command string.) field prefixed one following entries are identical in meaning. PRGA: PRGA: 10000-10777, 11400, 1600-17777; 10200 30000-777, 51400, 26000-7777; 10200 PRGA: 10000-777,1400,6000-7777; PRGA: each of these because the 0-777, 1400, 6000-7777; 200 10200 examples, all addresses are treated as being in field last S-digit entry seen contained a most significant digit 1. 2.6.2 SAVE Command Processing list of the required pages is constructed from the information typed a block Typing the terminating and requirement count is kept. a initiates start the SAVE to directory name return carriage ()), If a file having the same name as the the on search system device. now filename in the SAVE command is found, it is replaced by the file a new file is created. Next, is no such file If found, saved. being available of finds a sufficient number a storage availability search the on blocks system device to satisfy the block requirement count. corresponding block (See above.) These block numbers are stored in a the blocks are then filled with the contents of the pages to be A list; When the SAVE process is completed, control returns to Monitor saved. (7600). NOTE The Monitor head contains a HLT instruction at location 7606. This can be used as a start address for a SAVEd program when it is desirable not to have the program start automatically; 2.7 CALLING A PROGRAM (CALL COMMAND) file has been loaded and saved, It can be called into core as There are two types of CALL command strings: one for system programs and the other for user programs. Once a desired. The a command string format command string in which for system programs (programs saved by filename was followed by a !) is CALL SAVE the lfilename) where which The filename is it. the same as the one used in the SAVE command string saved command string format for user programs (programs saved by command string in which the filename was followed by a :) if CALL SAVE :CALL When a filename ) program is the called, a directory name search is performed on Associated with the directory entry is the entry point of the program and information concerning file protection and memory If the appropriate directory name entry is found and the extension. file has the proper extension (.SYS or .USER), calling If proceeds. the not, calling process is terminated, ? is printed and control is returned to Monitor. When the system device is an RF08 disk, system and user files can be called into core only if they reside on 50. a system device. 2.8 MONITOR START CONDITION When a CTRL/C or at three of old core follow these steps: core start pages 1. Do not type 7000-7577 a 7600 has just occurred, the Monitor saves the disk scratch blocks. To recover this on second CTRL/C, as the user core (the locations removed from core) memory are still on from the disk. 2. 3. is the Type SAVE SCRATCH: 7000-7577; n) (n to which control system program returns, FOCAL). Type CALL SCRATCH. This restarts with core point e.g., intact. in 200 the for SYSTEM ERROR MESSAGES 2.9 As input command string is an Monitor syntax responds with Error messages a ? When carriage a any recognizes is typed, return invalid input. indicate to Monitor typed, being and remembers it. incorrect output by Command Decoder in Table given are 2-1. Table 2-1 Error System Meaning Message Local miscellaneous ‘0 Illegal syntax D Directory E Too I No 8 System I/O failure errors Messages many such on or the inputs error condition systems device is full or outputs were entered inputs in each system program are given in Chapter 3. Persistence Monitor time read or write errors cause a HALT to occur. hardware failure, as the system I/o a indicates condition of this routine attempts to read or write three times before halting. CHAPTER SYSTEM Monitor The System's library 3 PROGRAM LIBRARY of programs presently consists of the Disk System Editor (Editor), (PIP), Interchange Program Peripheral and Dynamic PAL-D Disk Assembler (PAL-D), 4K Disk FORTRAN (FORTRAN-D), have the All Disk programs for (DDT-D). library Debugging Technique in or unit DECtape than 0; capability of accessing disk units other PIP is the the is device, disk Where unit. system systems any DECtape Builder must be used to record only program which can access DECtape. A it can be accessed by PIP. before the on a system directory DECtape section of this chapter is devoted to each program in the library. makes the Loader program using the Monitor System, the are The be queries typed. queries to which a reply must will however, depending The all programs. vary, replies of the program being loaded. To load a certain same for on the particulars When loading a Monitor see whether program into core, first check to CTRL down the key done (hold is This by typing CTRL/C in is core. echo not (print on the CTRL/C does while typing the C key). The it in responds by printing a dot (.) core, teleprinter). If Monitor is If a dot is not typed in at the left margin of the teleprinter paper. Refer to Chapter 2 for Monitor is not in core. to CTRL/C, response into core. it and Monitor information on building putting library system includes the Disk System Binary Loader automatically saved on the disk at build time. operating procedures see Paragraph 2.5.) The is (LOAD) which (For Loader with SAVE command, the disk may be saved by typing a of the the of name type four-character a program, word the SAVE; and a one or more save, it's whether page or (user system), program the location of its starting address in response to the Monitor's dot, as described in Paragragh 2.6. Any program on called be it may saved on the system device, the disk into core) merely by responding to from transferred of Monitor (to a dot) with the four characters designated as the name that program, as explained in Paragraph 2.7. After each program is (i.e., 3.1 PIP Peripheral Interchange (PIP) Program performs general utility such as operations, listing the contents of specified directories, deleting unwanted files from the system device, files transferring between devices, and copying specified files. is PIP designed for the PDP-S/I, -8/L, and -8 computers only and can Before PIP can copy onto a any RFOB disk unit or DECtape unit. DECtape, the Disk/DECtape System Builder must be used to build Monitor on the DECtape (see Section A.3). access 3.1.1 Loading PIP is and starting To and Saving loaded into core as indicated in Appendix D. Core requirements address of the Loader are also found in Appendix D. load PIP into core, system responses Call LOAD, using Monitor, explained in Chapter 2. as and reply to the When in core, PIP may be saved on the as a system 'device system program by Monitor, as indicated in Appendix D. (See Paragraph 2.6.1 for a detailed description of the SAVE format.) When PIP is . loaded and LOAD saved, the printout resembles: ) TIN—12:) 1'. *Smg) 1? (type CTRL/P) zSAVE 3.1.2 PIP Operating : o-5177;1ooo) Procedures Once PIP has been loaded into disk it can be core and saved on the called in response to the Monitor dot. If a dot is not present as the last system response, type CTRL/C. The printout appears as follows: zPIP) which transfers PIP from the disk into core. *OPT- gand waits for one of the following options. PIP responds with MEANING OPTION List entire directory of L device to be specified Delete D y area of disk 0-176 blocks Protect P specified write-locked to copy of directory of disk, as explained below Move M to be file a 0 A or RETURN Copy B Copy origin(s) be to binary to origin(s) and (destination file ASCII key specified) and (destination PIP copies specified). file be relocatable binary-coded tapes (8K Assembler output) to and from paper SABR tape only. origin(s) and to be (destination specified) structured user file (file and destination to be Copy U origin specified). structured file (file be to destination and origin(s) specified). The U and S commands may not destination as the have tape paper and core because the files are images Copy S have carriage RETURN system no defined paper tape format. Monitor responds automatically with a The *OPT line is not terminated with Type only the option character; the file binary Copy FORTRAN F and line feed. return key because it is a meaningful option. listed of those one It is illegal to type any character other than PIP above. ignores the request, types ? (question mark), and asks For example, for another option character. G is *OPT-G not a legal option ? character . T'r'op'rRefer to Appendix F for table of valid a I/O devices for PIP. option lists the entire directory of or DECtape on which a directory exists, providing the system device For example, and a report on each file. blocks unused of the number 3.1.2.1 L and D Options - The L LPIP ) User calls list *IN-Sz) system device directory PIP types number of free FB=126 option remaining NAME TYPE .SYS 0) EDIT .SYS 0) LOAD .SYS (0) .CD. 0 .SYS 0 .SYS Egg DDT .ASCII FOO .USER (0) BAR (.SYS (0) binary, program, (unused) blocks specified device on B, F, represents the version number of the Monitor system being used, followed by filename and description; e.g., PAL-D is a system program in field 0 and occupies 37(8) blocks of 0037 0016 0011 0007 00g; 0052 0001 0037 specifies user *FILE TYPE where A, the AF PKLD the of 13g AF When with PIP *OPT-L storage the D (delete a file) option, PIP responds (A,B,F,U,S)U, and S are the legal options indicating ASCII, binary (compiler output), user program, and system The option letter be respectively. PIP may typed before FORTRAN completes the file type printout. If the reply replies: S (indicating a system file) follows the D option, PIP REALLY? PIP will delete not Y a system file unless (meaning yes) . is typed in to repeat the FILE TYPE request. answer to the question. Any reply other than Y causes PIP typed, PIP responds with When Y is *INand waits for the device and filename deleted. The printout would appear as: of the system file to be *OPT-D delete option speci(A,B,F,U,S)-S fying system file, :PILE REALLY?N user must reply with Y, *FILE TYPE (A,B,F,U,S)-S PIP repeats request, REALLY?Y user replied correctly, PIP needs device and filename, *IN-S:BAR‘) TYPE *OPT- file is deleted and PIP for the next option. asks When the ask for file has been properly identified and deleted, PIP returns to another If filename BAR, in the example above, had option. not been on the specified device, PIP would have ignored the and printed a ? before asking for another request option. For example, *INr;S:BAR) BAR is the not 3 *OPTv name of a specified file on the device NOTE delete the is other than to should not try or LOAD. files .CD. system the When reply * and waits printout The user to *FILE (A,B,F,U,S)- TYPE S, PIP asks IN— filename of the for the device and would appear as: delete *OPT—D *FILE TYPE (A,B,F,U,S)—B a The file to be deleted. option specifying binary file; device and file names: file is deleted, PIP asks for the next option. *IN-SzBAfi)’ *OPT- response If the wrong option is specified, type the RETURN key in PIP for data. PIP's ignores the request, prints a ?, request Example: requests another option. *OPT-L *IN— typed user L to and by mistake ) ? *OPT- specify another option now and P Options Options M and P, in conjunction with the write-lock switch, are used to protect the lower 16K of the a or Either the system device disk while using the system software. is Since be input 0-7 can only unit numbered specified. DECtape on requested, the action Specified by the option is performed solely M use the to it not is For instance, possible the device 3.1.2.2 M - hardware specified. option The to option M 25(10) the move same system directory the a moves filenames), device. It also allocation block, map) For example, to device. printout is: 177, of moves block move a a the copy 200, of (the block directory copy of the system file directory, the option specifying move *INf53) the system device PIP asks for another option not directory which is moved should be one which does likely to be deleted from the working directory after files first device specified to block 3 of SAM the first (storage of that device to block 4 of that *OPT-M *OPTThe first copy of the block another device. to the contain move. The P option searches the first SAM block for free or block, 200, unused blocks in the lower half of the first disk. All unused blocks are marked as being used by Monitor, thus the lower half of the disk to have no unused The write-lock appears space-~it is protected. switch on the disk control unit can be activated and Monitor will not If all blocks in the lower attempt to write on the protected portion. half of the first disk are already used, the P option does This option the of The nothing. functions independently a copy of protect option specifying the system device *OPTFiles PIP asks for another option .SYM and .DDT should g9; be in the protected area of the disk. scratch files used by DDT-D and PAL-D during their operation are require typical a. M, b. M to the PAL-D disk. (See Section 3.5.1 of this manual.) output DEC-DB—ASAB-D, Some Unless directory has been previously moved, there is no way (short to recover the space used by the P option. rebuilding the disk) printout would look as follows: *IN-S:) and the M option. true *OPT-P They of and uses to for the M and P save and P, to options specific disk a ASSEMBLER, are: (or DECtape) set write-lock DISK switch status. and to operate protected. 3.1.2.3 A, B, F, U, and S Options Options A, B, F, U, used to transfer (copy) files from one device to another. these five options is requested PIP responds with - and S When any are of *OUTand waits for input of the destination (output file or the destination is disk or DECtape, the name of if device), the file. and, For example, *OPT-A copy *OUT-S;ASCI) specifying file an ASCII For file destination and name if more Only one destination is legal; ignores the response, prints the error to Monitor. the than one message E, is PIP specified, and returns control example, *OPT-A copy *OUT-S:ASCI,§ PIP recognizes the comma, which is used to file and device ‘names, separate control returns to Monitor an ASCII file NOTE The L and PIP's to return options D (*OPT-) when an illegal option request other all and is entered, response options return control to Monitor. \ destination *, by \responding with for the waits and and input *IN—, feed, return/line carriage An to is originate. that is, from where the input specification; to specify more than one input to any but the A option causes attempt return and error the E, the response, type message PIP to PIP indicates acceptance of the ignore control to Monitor. example For file FORTRAN *OPT-F copy *0UT-S:FORT) specifying system device 1 PIP *IN-S:,§ input a and filename destination accepts to system device, used to control separate device to returns comma is names Monitor found not specified to any option is input file the * and of in I an PIP place device, prints specified For example: control to Monitor. on If the *IN-S:FIL2) the :1 copying begins _I the *IN-s;FIL3) L file does exist; when the returns CTRL/P is typed, file does not exist control returns to Monitor input is from DECtape there is a noticeable pause between the the input device is specified and the time t is printed-~Monitor time 1 before for the is searching the DECtape directory. Always wait PIP returns to the is If CTRL/P typed prematurely, CTRL/P. typing option mode and ignores the current request. When If the B specified prints an the file option is specified (copy as appears and control directory for file I a binary file), but the ASCII file, it is not acceptable; Use the L option returns to Monitor. an filename and PIP check to type. files Ito allows any combination of up to 11 ASCII input the the order in file input one by into specified output merged do Generalized subroutines can be written as separate files to list. each these with combined and often specialized repeated operations such to rewrite program BEFORE assembly thereby eliminating the need PIP acknowledges each legal input file each program. for The be A option operations by printing an *. file or disk DECtape tape file should not be merged with a is going onto disk or DECtape--an illegal character output tape Instead, copy each paper may be inserted between the two files. and THEN merge the disk or DECtape files or DECtape, disk onto file of end at PIP merges ASCII files only (see examples into one file. this Section). A paper when the The F, U, and S options are all formatted the destination and origin requires The following example copies the system file 3, using filename PIPX. B, each in the of the same fashion, file to be from disk to PIP and copied. DECtape *OPT-S *OUT-D3 :PIPX) 1 PIP acknowledges each legal file by printing an * for each file *IN—S:PIP) :1 User *OPT- types CTRL/P after every 1 copies only one segment (a section of paper tape delimited by leader/trailer code) of a binary paper tape onto disk or DECtape. If a multi-section binary tape is copied onto the disk using PIP, only the first section of the tape is read onto the disk even though the entire tape passes through the reader. all of a Therefore, to copy PIP multi-section be copied as binary tape a separate tape after each section PIP, however, copies punch. ' A the disk or DECtape, each section must for example, by physically cutting the and then copying each section separately. onto file; multi-section a ' summary of the copy binary tape to the paper tape ' features is presented below. Number of High Speed Option Input Files Disk DECtape Reader/Punch Teletype ASCII A Binary B 11 1 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes FORTRAN Binary 1 1 1 F User U System S Yes Yes No No No No Examples: ;PIP) User calls PIP and requests the list option of the system device directory *OPT-L *IN-S:) PIP FB=0121 NAME TYPE LOAD .CD. PIP DDT .SYS .SYS .SYS .SYS .SYS remaining on (unused) specified device fl AF PALD EDIT types number of free blocks 0 0 (0} 0! 02 =ASCII 0037 0010 0011 0007 0025 0052 F00 ,USER‘O! 0091 BAR .SYS 0 0037 followed by filename and description; 'e.g.,vPAL-D IS A in field 0 and of storage occupies 37(8) SYSTEM PROGRAM blocks User *OPT-D requests the delete option REALLY?! and specifies type of file, U(user) file and device and filename; deleted User requests the delete option and specifies type of file, S (system) (PIP double checks); Y is *IN-S:BAR.) only meaningful answer User specifes file and filename; *FILE TYPE (A B,F,U,S)-U *IN-SzFfifi) *OPT-D *FILE TYPE(A,B,F,U,s)-S is the file is deleted request list option *OPT-L User *IN-S:) and system device directory, Note increase of 40(8) free blocks FB=0161 (see above) *OPT-D *FILE TYPE User (A,B,F,U,S)-S EEZLLY?N *FILE TYRE (A,B,F,U,S)-S (A,B,F,U,S)-S request Even if user responds to REALLY? with Y, PIP does not delete the Monitor file *IN-S:EX(:) 3_ *OPT-D *FILE TYPE *IN—S:fi5NES (A,B,F,U,S)-U knows NONE is not an existing filename on the system device and responds with ? User requests ASCII file option PIP also knows when the filename EDIT is and file type don't match; PIP ‘ ? user *OPT-D *FILE TYPE *Ifi-SzEDIT) (A B,F U S)-A " 3 *OPT-D *FILE TYPE ? is only response for deletion of other responses system file; cause PIP repeat the file type Y a fiEKEEY7W *FILE TYPE REALLY?Y requests delete option a system program (A‘BgFIUlS)-B IN-S:EDIT) *OPTfrom Merge into an ASCII paper tape on the high speed punch, one tape the reader, one tape from the Teletype, one file from disk called SRC, and one file from DECtape 7 called SRCl. *OPT-A *OUT—R:) *l* IN-R:,T:,S:SRC,D7:SRC1) Hslflx & 1??? (TYPE CTRL/P after each file) O m '1‘— Copy the system file PIP from disk to DECtape using filename PIPX. *OPT-S OUT-D33PIPX ) * ;IN-S:PIP) :_ (TYPE CTRL/P) *OPT- 3.1.3 With Using PIP RF08 disk an in as an RF08 System system device, inputs and outputs specified are by SO:,Sl:,etc. Examples: *OPT-S *OUT-51:LLDR) * *IN-SO :LLDR) * 3.2 EDITOR Editor (Disk System Editor) enables the user symbolic on-line from the Teletype programs program may be either printed on the Teletype, using the high- or low-speed punch, or stored an ASCII to on the file. Editor operates either in command typed input is interpreted as or a text mode. command In to and generate keyboard. punched on The paper tape system device as command perform mode, each a certain In text mode, all typed input is interpreted operation. as text replace, to be inserted into, or to be appended to the contents of text The the with edit symbolic to the buffer. command language of the Disk System Editor is identical to that of 5 of Introduction to Programming) PDP-8 Symbolic Editor (Chapter the following exceptions. CTRL Commands: Always CTRL/C progress command mode. to returns returns control to control and stops During output, CTRL/P Monitor. Commands: Output entire contents of the buffer followed by a form feed and return to command mode. P followed n, command mode. Output line n? return to Output lines feed, return m,nP m by form a n, followed by command mode. through to feed, a form Illegal command file entire (perform enough NEXT transfer the remaining input to to end—of-file an create output file) and Process commands the only indicator (legal system device). These Certain keys have special operating functions. associated functions are listed to output their and keys the 3-1. in Table Table for 3-1 Special Key Functions Key (RETURN) Text Command RUBOUT Functions Mode Text text buffer. Enter the line in the Execute the command. one to left from Delete right character for each rubout typed (is a READ effect in not during command). FORM FEED CTRL/U (period) command. Delete Text Command return End of input, mode. List the next line. Text Deletes the entire to line command of text and entered being a return/line carriage Line counter is unchanged. feed. commands Cancels typed and just a return/line carriage performs * is displayed. feed. currently performs Command . entire Command Command aras used line counter with combination or in alone gument + or and a number. Current - 3-11 (Continued on next page) Table 3-1 (Cont.) Special Key Mode Key / Functions (slash) Functions Command Value equal to number in buffer and used LINE FEED Text < line argument. return/line Command combination into the searched. List the next line. Command List the next line. a feed line being (left angle bracket) Command > last in SEARCH command to insert Used carriage ESCape of as List the previous line. (right angle bracket) (equal sign) :(colon) Command List the next Command Used in conjunction with and / obtain their value (.=0027). Command Lower as CTRL/TAB Table 3—2 Text is a case line. character, . to same function =. is output, interpreted tab/rubout combination. On summary of as a Editor commands. Table 3—2 Summary of Editor Command Format(s) READ R) Commands Meaning Read incoming text buffer until a and append to form feed is encountered. If the low-speed reader is used, Editor pauses when a form feed is encountered so the reader can be turned off. Type any 'character to return to command mode. APPEND A ) Append incoming text from Teletype to any already in the buffer until a LIST L) nL) m,nL) form feed is encountered. List the entire buffer. List the line n. List lines m through n. (Continued on next page) Table 3-2 (Cont.) Summary of Editor Commands Command Format(s) OUTPUT P) (PUNCH) Meaning Output the entire contents of the and followed by a form feed buffer When input to command mode. and reader the from is low-speed a output is to the low-speed punch, to Editor causes pause, P command to allow time to turn on the punch. return Any character may be typed to begin the When specified punching. amount has been punched, the Editor the punch can be turned so pauses return character to off. any Type a P and mode. Using command to in K a then an E, without typing be to buffer the causes between, written twice. followed by nP) Output line m,nP) Output lines m through by a form feed. TRAILER '1') Punch NEXT N) h, a form feed. four n, followed inches of trailer. form Punch the entire buffer and a read and buffer the kill feed; from When the input is next page. Editor pauses the low-speed reader, that at the end of an N command so Type reader may be turned off. command to return to character any If text in the buffer. with mode N the before out runs the tape the Editor prints mode command ? The buffer. an with empty indicates that Editor tried to read the physical end of the input past the to is When output tape. command N an punch,‘ low-speed the before causes Editor to pause If the first punch operation only. the before N command is completed is entire processed, the tape command is a ? and completed, returns to the specified Editor pauses after of N's have been processed. number and At this point, both the reader Type the punch should be shut off. command to any character to return nN) KILL K) mode. Repeat the above sequence n times. Kill the buffer. 3_13 (Continued on next page) Table Summary Command Format(s) DELETE nD) 3-2 (Cont.) Editor Commands Meaning Delete line n. Editor does not use the core locations made available m,nD) INSERT of I) by line deletion until command is given. Delete lines In through N an K or n. before line 1 all text until form feed is encountered. Insert before line n until a form feed is encountered. Insert a nI) CHANGE rut) Delete line n and replace number of lines a form keyboard until any , m,nC) MOVE m,n$kbl) GET (E) IK;) it with from the feed is encountered. Delete lines m through n, replace from keyboard as above until form feed is encountered. Move and inSert lines before line k. Get and list the through line list the next line with a Start tag. line n. which search a tag. and begins with SEARCH 8‘) nS) m,nS) n next beginning with Get m Search the entire buffer for the character not specified (but echoed) after the carriage return; allow modification when found. Search line n, as above, allow modification. Search lines m through n, allow modification. END FILE El) Process the entire file (perform NEXT commands to pass the enough remaining input to the output file) then two form-feed output characters end-of signifying an file; legal only for output to the If the system device. low-speed reader is the E command used, causes Editor to until the pause reader is turned low-speed on. After the is read and tape the Editor processed closes the file and returns to Monitor control. If there is no additional tape to be read, typing any character causes closed normally. 3-14 the file to be NOTE of reader runs out speed the reader is turned off if the Editor before a form feed is read, a ? and returns to command mode. prints contains material buffer The already Text entries should be terminated read. If the tape, low or text The with the FORM FEED character. buffer has capacity for 50 to 60 lines and the of text or 3,600 characters; should be limited to this number source This ensures characters. of lines or that no buffer overflow will occur. to taken with If a tape is prepared off-line, care must be respect If input is from the low-speed reader, the Editor ignores form feeds. For this reason, AT LEAST one the next character after the form feed. should be punched after a form feed in an off-line tape. blank space (Using Editor prepared tapes eliminates this problem.) whenever Editor prints an error message consisting of a question mark information is requested or an inconsistent or incorrect nonexistent a The question mark is followed by format is used to type a command. carriage return/line feed and the command is ignored. of data when The available. to indicate failsafe technique causes the message FULL to be printed The failsafe operation continues as follows: the buffer is filled. Editor performs of the output 1. The E failsafe a text and either is 2. N to operation the commands to the disabled. A are the preclude disk exceeds loss space ? is printed when attempted. the text by no If there is and a P command is issued the Editor loops, waiting for the high-speed punch flag. At this point the at location restarted 0177, program should be stopped and putting Editor into command mode with the buffer still L command The buffer can be recovered by using the intact. A P command causes punching it on high-speed punch with the Editor to attempt the high-speed low-speed punch to save punch. turned on. NOTE Before the punched is reloaded output into the the first and last buffer, lines of the buffer should be inspected. If the punch was turned on beforehand, the first line is and the L.RETURN; last line is * because Editor returned These lines should be to command mode. deleted. 3. standard functions All editing failsafe technique has occurred. 3—15 are available after the If the computer halts while reading from of cause Editor is Loader. Appendix To and D. A paper the by tape occupies locations Binary shown in into core, core, as call explained LOAD, at the using Monitor, and reply to the beginning of this chapter and in Editor may be saved on the system as indicated in Appendix D. device as a system by Monitor program (See from punched in it core, ‘ load Editor in Saving loaded into core Editor is When responses system Paragraph 2.5. When location 2330, a system error has occurred Run disk maintenance tests to determine disk. error. Loading 3.2.1 at the Paragraph 2.6.1 for detailed description of the SAVE format.) sample printout for loading and saving Editor is: ;LOAD) *IN-R:) * ;ST=7600) .3 1 AVE "ml 3.2.2 EDIT!0-3377;2600)(See Appendix D.) Procedures Operating Editor is transferred from the system device into core by Monitor when EDIT) is typed. Editor is now in core and responds by typing *OUT- devices: for (T:) following output low-speed for high-speed reader/punch; (S:name) for output to the system device on a file called NAME immediately after OUT-. (E be must typed to properly close the output file.) If the specified when not declared device is not valid, that is, building Monitor, with an Editor error 2.9) and returns (see message Paragraph responds a table of valid control to Monitor. Refer to Appendix F for I/O Type one of reader/punch; devices the (R:) for EDIT. it responds recognizes a valid device, carriage return/line feed and *IN-, as shown below. When Editor with asterisk, * * IN— Specify the input device by typing T: , R: as when replying to *OUT-, above. , or S:name or in the same manner The responds with Editor *OPT- Specify B one of the Preserve (spaces) space D on following options. Editor normally blanks. with tabs, resulting the system device. replaces in multiple blanks saving of considerable from the is system input if desired. for (File output allowing space device, the name remains on directory but without any assigned Enter dynamic deletion mode if thus blocks.) functions of B and D C Combine the RETURN None of the above options; blanks to tabs, and not D. Editor responds feed return/line to and options. assume conversion of two or more a of the above carriage options with The entire printout might appear as asterisk. one follows. indicates the above The appearance of the last asterisk in example the user's on and to is that Editor symbolic operate accept ready program. The symbolic typed into program can now be read into core with with the A command (see Table 3-2). the R command or core Examples: 4LOAD ) Call Loader using Monitor Input to be from high-speed reader Input device valid Return to Monitor after loading Editor is loaded and saved on the system device Call Editor using Monitor *IN-R:) t TST= ) 11 :sAVE EDIT!0-3377;2600) ;EDIT ) *OUT- SzSRCl) Output be to system on device, file nmwdsml * :IN-R:) Input to be from high-speed reader Input device valid No blanks, no dynamic deletion mode * 709T*R Read incoming text entire file Call Editor using Monitor Process No sln IN-S:SRC1) 5" wa o Disk deletion lost.) name valid incoming text /STARTING ADDRESS /GET LOEER LIMIT OF PROGRAM 2 l(IOaIEClgls /L example, dynamic use be option desired No Read Cmx The file will List the entire buffer 9| LOCK hlflflt or Input from filename SRCl File I wltln:I*RIoO"\’ (Don't output, mode (G ET (CTRL UPPER LIMIT P was typed (CTRL/C Editor does not always when creating here, was stopped listing of buffer) typed here) require specific input file from the keyboard valid : LEDIT) *OUT-S:FILE ) * int) * :OPT- ) *Au) —TEXT MAY BE KEYED-IN KEYBOARD...... DIRECTLY FROM THE or the output. For following is not counter is are deleted the value of the current line The counter is the number of the line preceding the deletion. of the case in set to the number of the line deleted, or multiple deletion, it is set to the number of the line first deleted. When lines set to Example: m.) TAD(-l :.=0024 *.D 1.=0024 :2,5L) TAD S-Z DCA CNT TAD TEMP JMP .-1 :2,50) *.=0002 4K 3.3 PAL-D DISK ASSEMBLER is the (PAL-D), grogram Assembly Language for the Qisk system symbolic assembly program designed primarily for the 4K PUP-8 family The of of computers with disk or DECtape. (8K PAL-D is an expanded version 4K PAL-D and both binary tape and documentation are available from DECUS (Digital Equipment Corporation User's Society) upon request.) / compatible with PAL III except in the way it recognizes MACRO-8 in respect to the and with Reference Instructions, Boolean operators, linkage generation, literals, following features: It does not have user-defined macros, floating and a text facility. The reader should point constants, or double precision numbers. review the 4K ASSEMBLER MANUAL (DEC-08-LAS4A-A-D) before proceeding. PAL-D is Memory The performs many useful functions, making machine Basically, programmming easier, faster, and more efficient. 4K PAL-D Assembler language the user's the Assembler processes translating mnemonic operation codes statements by program into the binary codes needed in numeric machine instructions, relating symbols to values, assigning and and instructions for absolute core addresses data, program preparing an output listing of the program which includes notification of any errors detected during the assembly process. source (pseudo-ops) may be used to direct PAL-D to perform certain tasks or to interpret subsequent coding in a certain manner. or Instead of generating instructions data, pseudo-ops direct the with the to Assembler on how Pseudo-ops are assembly. proceed maintained in the Assembler's permanent symbol table. Pseudo-operators The following is a summary of PAL-D's pseudo-ops. Table PAL-D 3-3 Pseudo-Operators Pseudo- Explanation Operator PAGE Set current location counter to first location on next location counter to first location on page page. PAGE Set n current n. FIELD Punch all n literals (a FIELD mark is punched followed by at To location code at assemble 200). 400 in field 1 write: origin an location FIELD 1 *400 DECIMAL Interpret subsequent integers as decimal. OCTAL Interpret subsequent integers as octal. XLIST Data TEXT Input $ End of PAUSE End-of-file or paper tape, to next file or paper tape text Erase FIXTAB Append to before the strings in Indirect Z Page van line SYMBl program, code listing. trimmed to six bits. terminate current pass. suspend processing, proceed resume processing. and symbols defined reference. REFERENCE such SYMBZ all Addressing. zero MEMORY of code ASCII third pass on FIXTAB. Disk Assembler uses reference instructions a appear permanent symbol table PAL-D nory to permanent symbol table, except pseudo~ops. I OF is not symbolic EXPUNGE COGNITION 3 enclosed as: INSTRUCTIONS a different criterion than does PAL III. for recognizing will PAL-D neither SYMBl nor SYMBZ is an assembler pseudo-op, is a if SYMBl instruction reference as a line this treat only memory the that Note a permanent symbol. SYMBZ is not and permanent symbol category "permanent symbol" includes user-defined symbols that have FIXTAB via the table PAL-D the to been added symbol permanent where pseudo-op. for and symbols All other combinations of non-permanent permanent a as be treated line to the will cause SYMBZ and SYMBl be The values of SYMBl and SYMBZ will microinstruction. inclusively ORed together and this resultant value will be generated as code for be cautious Because of these considerations, users should the line. in their use of FIXTAB pseudo-op. especially Note that, (FADD, FSUB...... FPUT) and must be followed by floating the must be defined at pseudo-op, a FIXTAB a complete list of the as instructions point beginning of a program follows: FADD=1000 FSUB=2000 FPUT=6000 FIXTAB Refer to Appendix G contained in PAL-D. for all the permanent symbols 4K PAL-D PROGRAM PREPARATION AND ASSEMBLER OUTPUT on PAL III Program Preparation and Assembler PAL-D with the following exceptions: information The applicable to Output is and preceded listing and is symbol table is punched after the The symbol a small amount of leader/trailer followed (200) code. by and table tape will be punched whether or not a listing is requested, or the on the terminal on either will punch high-speed punch appear output, depending upon the device being used. The It is next of the to terminate any pass assembly by typing a the console terminal. CTRL/P causes PAL-D to go on to the of the assembly. by Assembly can be terminated at any time possible CTRL/P on pass typing a CTRL/C. will remain lines During the listing pass note that blank is character feed the form and ASCII) (214 ignored. listing The 8 4K PAL-D pages as in the symbol table has room for 161 symbols in core (about 6 to That number can be expanded as explained in an average). paragraph 3.3.1. pass 2, the binary output Disk Monitor System Binary Loader. Following can be loaded into core by the 3.3.1 Saving loaded into is Loader. in core. PAL-D To and Loading Appendix the -from punched paper tape by Binary illustrates the locations occupied when PAL-D is core D load PAL-D into core, system responses When the in core, system PAL-D may device be as a D. (See Paragraph format.) Appendix SAVE 2 :ample using Monitor beginning of call LOAD explained as the at to and reply this chapter. the disk or DECtape. Saving PAL-D on Monitor is described in by program system detailed 2.6.1 for a description of the saved printout for loading on and saving PAL-D' is: (see Paragraph .LOAD) :IN-R: * sT=7500) 3" .SAVE user's user-defined PALD10-757736200) resident can hold 160(decimal) symbol table This may be under the Disk Monitor symbols System. .SYM which expanded by saving on the system device a user file named can be Each user-defined symbol used by PAL-D to store extra symbols. The symbol table can be expanded by 128(decimal) occupies four words. 'or locations core (one 200(octal) page) by saving a file with the following statement. The core _._SAVE .sm:o—177;o) If a larger symbol table where For symbols. each pages, is saved area page (192 needed, provides simply will save save specify storage for 32 symbols) additional additional example: ;SAVE .SYM:O-377;0) will user two core (224 user symbols) (416 user symbols) pages, and ;SAVE .SYM:0-l777;0) eight core pages for symbol storage. 3.3.2 Operating Procedures used to transfer Monitor is PAL-D from the device ‘system to core. Begin by typing « .PALD) PAL-D responds with a request for the output device *ou'r-) Select the output device by one of the following. ) for the low-speed reader/punch R:) for the high-speed reader/punch T: for output S:name) Refer to specifying Appendix to the system device as a file called NAME F for a table of valid I/O devices. I responds with: PAL-D then * IN— five and waits for specification of the input device(s). Up to T: be devices ), T:, R:, R:, (for R:, example, specified may this example input from the high-speed reader was selected. input but in R:) If the devices in the parenthetical example above had been specified, have typed an asterisk for each input device that it found PAL-D would valid. the valid device ris When PAL-D is satisfied that the input (i.e., is exist or the file device does present on the file-structured device), it requests the third-pass listing option by printing *OPT- Type one of the following. T meaning listing and symbols produced on the terminal are to be R meaning listing and symbols are produced on the high-speed punch to be symbols are RETURN key any other character meaning printed means no no on third pass desired, the terminal third pass desired. 3-23 that blank lines remain in the listing and that form-feed (214) could not be treated because of limited core, is properly, ignored in the present version. Note which The entire printout . might appear as follows. PALD ) *OUT-T: ) * *IN-Rz) * *OPT-T ) the high-speed is selected as a punch listing alphabetic symbol table produced at the end of pass 3 is on the high-speed punch. When the device, produced also is now ready to proceed with the assembly, pausing only when intervention is required (i.e., placing a new paper tape in the reader, turning off the punch, etc.). On these occasions, PAL-D prints an on the terminal and waits for a CTRL/P to continue (f) up-arrow with the assembly. When using the low-speed reader on input i.e., PAL-D user (IN-T:), a terminates does not CTRL/P any pass must be and typed BEFORE turning the reader on. automatically begins the next one. CTRL/P (CTRL/P echo.) When using the disk as an output device, the to be loaded for execution following pass 2. compiled binary is ready The symbol table will be output at the end of pass 2 if the third pass has not been requested. If pass 3 is requested, PAL-D will follow the in assembly listing with the user's symbol table order alphabetical (in addition to the assembled binary output). Type CTRL/C to terminate assembly and return control to Monitor at any The Symbol Table is punched after the listing and is preceded and followed by 38 frames of leader/trailer (200) The code. symbol is tape punched whether or not a listing is requested, and appears either on the terminal or When is high-speed punch. assembly complete, control is automatically returned to Monitor. time. PAL-D makes error checks as it source many processes When statements. an error is detected the Assembler prints The format of the error messages is message. nn where language an error xxxx is a two-letter code which specifies the type of and error, is either the absolute octal address where the error occurred or the address of the error relative to the last symbolic tag (if there was one) on the current page. nn xxxx PAL-D's error messages are listed and 3-24 explained in Table 3-4. Table 3-4 PAL-D Error Explanation Error Code BE Messages Two PAL—D internal situation tables have This overlapped. usually be corrected by decreasing the level of literal nesting or the number of current page literals used prior to this point on the DE can page. System device trying to or three failures, Monitor. DF IC when detected An error was after write the system device; to the is returned control error. read the The capacity of system System device full. device has been exceeded; assembly is terminated and control is returned to the Monitor. Illegal character. illegal An character was encountered other than in a comment or TEXT field; the the and character is ignored assembly continues. ID, Illegal redefinition of made value by means symbol IE give to was not symbol. An attempt was a new the redefined. Illegal equal sign. wrong a previously defined symbol other than an equal sign; a An equal sign was used in the sign is context. Examples: TAD A+=B A+B=C The not II expression to the a single symbol. left of the equal Illegal indirect address. was the An reference off-page link could not be generated because indirect bit was already set. made; a Example: *200 TAD A, I A IPAGE 7240 (Continued on next page) Table 3—4 (Cont.) Messages PAL-D Error Error Code ND Explanation The program terminator, $, is missing (with TSS/8 only). PE Current nonzero exceeded. page An attempt made to: l. Override a 2. Override an can a. be Decreasing PH SE the number of the of literals the on number instructions on page. missing or misplaced. control is returned Symbol table control is table may be is terminated the Monitor. Assembly to exceeded. Undefined symbol. during pass of pass 1. 2 A that to the Monitor; contain up to symbol was zero exceeded. reference to page 0. Page and Assembly is terminated returned expanded to by saving a file named .SYM (Disk Monitor System only.) device. ZE this literal; by Phase error. PAL-D has received input files in an incorrect order; program terminator ($) is either symbols US a or or Decreasing the instruction, an instruction with corrected page, b. literal with was not Same on and the symbol 1184 user the system has been processed defined before the end as PE except with in this Examples: The following example shows the entire section. process .LOAD) Call Loader *IN-R:) Input * Loader found Return to Monitor after *ST= ) to be from covered high-speed input reader device valid loading fl PAL-D is loaded _._SAVE PALD10-757776200) PAL-D is saved _._PALD) Call PAL-D *o_U'r-_S:BIN ) Output to Filename * on filename and (see Appendix D) disk BIN system on system device valid device for output *IN-R:) Input from high-speed reader * Reader is *OPT-R Output listing and symbols valid input device on high-speed punch 11 be typed after for in reader input and output are source tape (If both device, no f's ;LOAD ) inserting CTRL/P should Monitor; user to pass. system typed.) are Assembly is finished; to each called *IN-S :BIN ) Input from filename It Filename and BIN system control returns the Loader. on system device device valid for in the input *s-r=7606) _1_1_ to the Transfer control Monitor after loading the CTRL/P typed each two times in HALT user program response to 1 User program is loaded; halts with user program in the core computer 3.4 FORTRAN-D is FORmula TRANslation for the Disk System (FORTRAN-D), of PDP-8 4K FORTRAN designed for PEP-8 computers DECtape units and 4K words of core memory. version a modified with disk or FORTRAN-D contains a compiler and an operating The FORTRAN system. compiler is used to convert a source program into an object program. The FORTRAN operating system is used to execute the object program. version communication. FORTRAN is facilitate designed to commands can be Appropriate typed at need .to keyboard, eliminating the toggle input using registers. This FORTRAN user/system the the terminal switch specify the computations required to carry out the of the FORTRAN program. There are four types of statements for by the FORTRAN language: statements processes provided of 1. Arithmetic statements 2. Control statements define numerical determine the calculations. sequence of operation in the program. 3. Specification statements define the properties and arrays appearing in the source functions, also enable the 4. Input-output between For more detailed the to control statements are variables, They program. storage allocation. used to transmit information computer and related input-output devices. information document 4K FORTRAN, A user of on FORTRAN-D refer to DEC—OS-AFDO-D. summary of the FORTRAN statements is given in Table 3-5. DEC Library 3-5 Table Summary of FORTRAN Statements Statement Explanation and Form Arithmetic Statements is v v=e a variable (possibly e is an expression. . subscripted): Control Statements n GO TO n GO TO (n(1),n(2),...,n(n)),i is statement a n(l),...,n(n)) numbers; integer IF (e)n(1),n(2),n(3) number. is e n(l) statement are is 1 variable. nonsubscripted a expression; an [11(3) .n(2) statement are numbers. DO n. i=k<1),k(2),k(3) n is variable; integers is i or of number statement the CONTINUE; are k(l),k(2),k(3) nonsubscripted integer omitted if variables. K(3) assumed to be 1. CONTINUE Proceed. PAUSE Temporarily suspend execution. PAUSE a integer an is subroutine is a decimal address; the at commence will execution n n octal equivalent of STOP Terminate execution. END Terminate statement Specification DIMENSION n. last compilation; in program. statements v(1)(n(1)).v(2)(n(2 ))....,v(n)(n(n)) v(1),...,v(n) are variable n(l),...,n(n) are integers. DEFINE device Device is device. FORMAT (s(1),s(2),...,s(n)) s is (I, a DISK data F E, FORTRAN-D.) or TAPE, field A and names; system I/O specification. accepted by are (Continued on next page) Table 3-5 (Cont.) Summary of FORTRAN Statements Statement and Form Explanation COMMENT Designated by on Input-Output ACCEPT TYPE as first character Statements f,list f,list u,f,1ist READ C line. f is a list is a f is a list is a is an u FORMAT FORMAT device read. statement statement number; list of variables. integer, representing from which data f is a FORMAT list is a number; number; list of variables. is to be statement list of variables. WRITE u,f,list is device u integer, an onto written. which f is a list number; representing data FORMAT is will be statement list a of variables. The following functions are allowed: Format Meaning SQTF(x) square root SINF(x) sine of x COSF(x) cosine of ATNF(x) arctangent of EXPF(x) exponential LOGF(X) logarithm ABSF(x) absolute of x of The READ and WRITE output either 2. on (in radians) x of x x value of Certain input-output statements have with disk or DECtape units. 1. x special characteristics statements paper tape x or A DEFINE statement perform on the sequential when used input and system device. statement must first executable precede 'the in any program using the system device to input or output data. 3-30 the or input output Operating system is called, be specified by using the 5 option if data is filename must to be read from or written on the system device. when the with the used When a READ statement terminal, differs from the ACCEPT statement in that the statement being read is not echoed on the printer. the data \ differs WRITE statement used with the teleprinter statement in that terminates by TYPE it always A from a typing a carriage return-line feed. The the READ and WRITE teleprinter, input and output data on either high-speed reader/punch, or the system statements the device. statement When the ACCEPT deletes the preceding input the shown used, as rubout in the character following examples. Read and Corrected Typed Integer Numbers: 128R1028 128R-28 -128R128 'R' indicates a +1028 -28 +128 rubout. Floating-point numbers: +42.0 +42.0 2R42 +2.R42 -2.0R2.0 42R-42.2 20E6R5 When the +2.0 -42.2 +2.0 x 10(6) +2.0 x 10(5) READ statement is the rubout character is completely ignored. device The statements assignments FORTRAN-D are: Device Code 1 2 3 Device Terminal High-speed reader/punch System device READ and WRITE For example: READ reads The used the 2,f,1ist from the high-speed reader. following examples show how the READ and WRITE statements might be in a typical FORTRAN program. (The example programs which use system file Example 4, data file.) be must section C EXAMPLE C FROM THE C THE SYSTEM assembled 3.4.2.2. PROGRAM TO TELETYPE then run Specify with FOSCL input data the as file shown in and output READ AND COORDINATE PAIRS STORE THEM ON DEVICE DEFINE DISK TYPE 100 100 10 FORMAT("ENTER 10,N FORMAT(I) 102 FORMAT("NOW THE NUMBER OF COORDINATE PAIRS"/) ACCEPT TYPE DO 102 ENTER THE COORDINATES"/) 20 I=1,N ACCEPT 30,x,y WRITE 3,3o,x,y 20 CONTINUE 30 FORMAT END STOP Several (E,E) and WRITE statements may occur within a single refer to different The data is written devices. format of the device used. The regardless following demonstrates how information previously stored on the disk and READ may read, processed, and punched using the high-speed punch. C FORTRAN EXAMPLE DEFINE DISK DIMENSION X(100),Y(100) C READ FROM 6 IDEV=3 SUMX=0 DATA PROGRAM THE DISK DEVICE 3 SUMY=0 DO 10 I=l,100 READ WRITE IDEV,20,X(I),Y(I) 2,20,X(I),Y(I) SUMX=SUMX+X(I) SUMY=SUMY+Y(I) 10 CONTINUE TYPE 30,SUMX,SUMY ACCEPT 12 20 30 IF (J) STOP FORMAT 40,J 12,12,6 (3,3) FORMAT("SUM 1//"TYPE FORMAT (I) 0 40 END OF To x VALUES STOP, 1 TO = ",E,”SUM CONTINUE") OF Y VALUES =",E, DO loop in ASCII program be might Compiler 3.4.1 compiler consists of a loader (FORT) and the main portion of the This version of the compiler differs from the PDP-8 (.FT.). compiler 4K FORTRAN compiler in the following ways. The 1. 2. disk the DECtape unit during its operation. It uses It compiles programs which devices or or stored have been programs which have been prepared the system punched paper on on tape. 3. 4. 6. Input and output devices Decoder. It is the READ and determined are to terminate compilation at returning control to Monitor. thus using the Command any time by typing a Within certain restrictions, a program compiled on system be executed device immediately by typing CTRL/P after may A statement unless 9. employed with possible compilation 8. have been the Statements. CTRL/C, 7. on Significant improvements WRITE 5. or on either binary output Vfile punched paper tape. FORTRAN It generates a system devices the of the program. not be delimited number need wishes it to be employed for user Statements without space, a tab, or a preceding numbers must be by a semicolon, appearance. preceded by a semicolon. FORTRAN The compiler loader 3.4.1.1 Loading the FORTRAN Compiler in one pass core from is loaded into through (FORT) punched paper tape - FORT the Binary Loader. described in Appendix D. may be saved on the system device as core into loaded The main portion of the FORTRAN compiler (.FT.) is device be saved on the Loader. .FT. with the by system may Binary is and ‘When the compiler (both FORT .FT.) the same method as FORT. entire the and saved on the loaded procedure generates system device, the following printout: 3ST=7600) LSAVE’FORTlo-l777: 200) (See Appendix D.) .LoAD) ;SAVE.FT.!200-7377; 0) (See Appendix D.) 3-33 The loader occupies core locations 0-1777 with a at starting address The 200. compiler occupies core locations 200-7377, its starting address is not specified since the loader (not the calls user) .FT. when needed. V 3.4.1.2 from the Operating Procedures system device into - core The FORTRAN when is compiler transferred 4FORT) is typed in. In the response, Command Decoder then prints *OUTand waits for of the following to be Output on low-speed Rz) Output on high-speed punch Szname) Output on system device and assign RETURN No one T:) Refer to Command device, Appendix for a and waits punch/printer, . name output desired table Decoder responds with and then prints * of valid an * when I/O devices for FORTRAN-D. it recognizes valid a output IN— for of the one following: T:) Input to be from low-speed R:) Input to be from high-speed S:name‘) Input to be from system device Command Decoder The F specified: compiler now prints an assumes * when it recognizes a reader reader valid file named input device. control, and if the program to be compiled is prints 1 when it is ready to receive the paper tape, the compiler tape for compilation. on Type CTRL/P, to initiate compiler prints any return/line feed, and 1. At the compilation. error diagnostics end of compilation necessary, a the carriage The process described above the produces following printout. JORT) *ou'r-R:) * EN-R: ) _* lehd (CTRL/C typed here; compilation finished) Certain errors can make it impossible Compiler Diagnostics These are referred compiler to proceed in the normal manner. to as system errors. loading the They may be caused by improperly compiler, by not having an END statement on a source file, by a machine malfunction, or various other reasons. 3.4.1.3 the for - occur the those which before core, and those which occur after the the In the first case, compiler compiler has been loaded into core. In prints a four-digit error code and returns control to the Monitor. SYS followed the second case, the compiler prints four-digit by a There are compiler error A types of system two has code. been Type CTRL/C complete list of shown loaded in Table the to errors: into return system control to error messages Table 3-6 the Monitor. and their explanations is 3-6. Compiler Systems Diagnostics Error Explanation Code 0227 Could not 0231 Same 0326 Could not 0330 Same as 1425 READ error as find Command Decoder on system device above find .FT. on system device above during directory or SAM block (Continued search on next page) Table 3-6 (Cont.) Compiler Systems Diagnostics Error Explanation Code 1521 Same as above 1626 Same as above 1726 WRITE 3100 Illegal search SAM block during error operator stack compiler on or machine or machine malfunction. 3417 Pre-precedence (Compiler error. error malfunction.) device invalid input device specified 4737 No 6141 Attempt to execute system device 6145 error the if Could not find FOSL on system device; occurs, it may be necessary to reload FORT and FOSL. 6207 READ 6211 input error or while Error while a program not compiled onto loading FOSL SAM block doing manipulation or a machine malfunction. 6223 Error while 6226 Same as above 6257 Same as above 6407 Illegal overlay request 6416 Same 6467 System device 6724 No 6746 Same 7114 Same as above 7136 READ error 7150 System device full 7173 WRITE as loading as .FT. or a machine malfunction. above READ statement END on error source device above error on on the system device source file system device output file The example below illustrates the appearance of the :FORT) Command 0227 Decoder not on codes. error system device VIN-Szname) SYS Error messages out typed are referred to as CTRL/C typed; 6141 no output file specified which occur during compilation of These completion of the compilation. the form: and take compilation errofis for errors upon a program errors are \ LThe I The For error error code The number of statements since the of last numbered statement (octal) statement number of the example, during compilation of the last numbered appearance statement statements A=I(J+1) B=A*(B+SINF(THTA)) 10 the xx xx XXXX message 11 l 10 that an error exists in a statement which after the appearance of statement 10. The left of code 11 shows that the number to error message corresponding The statement is and right parentheses in the statement is not equal. examined and corrected, then compilation is resumed. printed, indicating would be occurs 1 Table 3-7 statement lists explanations. (octal) the compilations error messages and their 3-7 Table Compiler Compilation Diagnostics Error Explanation Code 00 Mixed mode arithmetic 01 Missing variable 03 Comma 04 Too many operators in this expression 05 Function argument is in fixed-point mode 06 Floating-point 07 Too 10 Program 11 Unbalanced 12 Illegal 13 Compiler 14 More 15 too right one as subscript a this program left parentheses found in this statement identify this could not expression storage exceeded core and character than in names large, arithmetic in arithmetic expression an variable used variable many constant or found in was expression statement with Subscripted variable did statement same not statement number in appear a DIMENSION statement 16 Statement too 17 Floating-point operand 20 Undefined 21 Too many numbered 22 Too parentheses in this 23 Too many many to long statement process been fixed-point number statements statements have should have in this program statement been referenced before they appear in the program 25 DEFINE statement was preceded by some executable statement 26 Statement number does not begin with a space, tab, C, or Symbolprint is a program which Debugging Aid (Symbolprint) It helps create and debug user the FORTRAN compiler. the about certain information FORTRAN by providing programs Symbolprint may be used only compiler-generated interpretive code. the has been a after using by compiled program immediately FORTRAN compiler. Disk/DECtape 3.4.1.4 - used with may be following information: Symbolprint provides the 1. The of the 2. A limits code. interpretive list of variable their and names corresponding locations (the symbol table). 3. and list of statement numbers A their corresponding locations (the statement number table}. Symbolprint saved on the loaded into is core from punched system device approximately as be and may tape paper shown below (see Paragraph 2.5). H I§AVE STBL!600-777;600) occupies locations in core, Symbolprint address at location 600. When When Symbolprint is Monitor. In the 600-777 with to execute a user program following example, a program named SRC Symbolprint is then used as *ou'r- ) * 7IN-s :SRC 1,—- (CTRL/C typed here) OH." \I U1 a‘ U! H U1 .5; \l U! \l O'\ \l U1 \1 U1 ‘1 01 ‘1 [.\l 01 Ch as 0‘ O u: U) O HOO DO HO O O 0‘ O O HON 0" O 0‘ m 0ONO 0‘ H .5 U! 0o w0 m g... A \l Ir<l><IHIz | (Symbol Table) | I». (Statement Number Table) (CTRL/C typed here.} I' 3-39 or CTRL/C is compiled shown above. JORT ) I. starting code into core, it prints the interpretive number table, carriage return/line statement output specified. I->|3w its called limits, symbol table, feed, and 1. Type CTRL/P to (See Appendix D.) to return with no In the example above, location 6154 is statement location 3.4.2 in the appears 5200. highest location the used for lowest location used for between 6145 and 7565 is 600 location if a DEFINE the code starts at otherwise, interpretive code and location 7565 is data, indicating that the part of core at unused. Interpretive code starts program; the Operating System The FORTRAN operating system consists interpreter FOSL differs of a loader and the (FOSL) subroutine package (.08.). This version of FORTRAN tape operating system in the and arithmetic from the paper following ways. 1. 2. It loads and executes programs which have been and compiled saved on the device or which have been system programs compiled on paper tape. been referred 3. FOSL write called directly by the compiler when a compiled and saved on the system device. to as compile-and-go mode. be FOSL may has recognizes data READ and in ASCII reader/punch, the WRITE format on high-speed statements either the which may program This is read and low-speed paper tape tape reader/punch, or the program may be interrupted control returns to Monitor. at any paper system device. 4. The execution time by of a FORTRAN typing CTRL/C; The FORTRAN 3.4.2.1 Loading the FORTRAN Operating System Operating It may be saved System Loader (FOSL) is loaded into core in one pass. on the system device as described under SAVE Command Format. - The is (.05.) operating system interpretive and arithmetic package core in one pass through the Loader. into .05. may be saved When the FORTRAN system device by the same methods as FOSL. and is loaded and saved on the (both FOSL, .OS.) operating system the entire system device, procedure will generate the following printout: 4LOAD .9 loaded on the *IN-R:) * *s'r= ) 11 _._SAVE FOSL10-17777200) (See Appendix D.) LLOAD) *IN-R:) ‘— :ST= ) 11 SAVE.OS.!0-5177;0) (See Appendix D.) occupies Loader The 200. The locations core arithmetic 0-5177; its starting the user) calls .OS. 0-1777 with its starting address at subroutine package occupies core locations and Loader the (not address is not specified since needed. when The FORTRAN operating system may be two ways: of one in core by into device the system from transferred the onto a FORTRAN program after compiling immediately typing CTRL/P a or by typing FOSL immediately after Monitor prints device, Operating Procedures 3.4.2.2 - system dot. _._FOSL ) If the operating system typing from Monitor, called is the specify desired input device by T:) for > FOSL prints * low-speed reader high-speed reader for system device input for R:) Szname) it when recognizes valid a input device and prints *OPTIf input or output is character if the S other However, to be to or indicates that is used, option Any from the system device, type S. the system device is not to be used. FOSL prints *OUT- the desired output filename (if any) of the file). FOSL again prints Specify is the * (name IN— Respond with S:name)(where the RETURN key. FORTRAN program is If the to ready by typing Sgname) name begin loading. When the FORTRAN program name is the filename of the data paper tape, Loader prints ? Type CTRL/P and the tape loads. when on or file is loaded, FOSL file), and it is prints *READY Place data executing CTRL/P to begin tapes in the appropriate reader and type is used, turn the reader the the (If low-speed program. reader ON AFTER When read STOP a on returns or typing CTRL/P.) END statement the system device, to the Monitor. is executed, or when the operating system an is and control end-of—file prints 1 The following examples show how the FORTRAN used. Example operating 1 AFOSL ) *IN-S :FBIN,) * Top'ra ) *READY 1 Example (Program execution occurs here) 2 _’ :FOSL ) *IN-R: ,R: ) * BPT- ) * fl ERROR 01 *READY f (CTRL/P typed here) (Program execution begins here) Example 3 _.FORT ) *ou'r-‘s : SMSQ) * I- Compile IN-S :SMSQ ) and l»|» Go [-9 (Program execution begins here) é UN Example 4 _.FOSL ) *IN-S :BIN ) * (Program execution begins here) system may be a checksum error was detected on the second input tape. will always occur when a PAL routine is assembled with a to to decided In this case the FORTRAN program. attempt operator execute the program in spite of the checksum error. In 2 Example This error following methpd for saving The user his call to program FORTRAN—D object with the FORTRAN-D programs the enables operating system as a Monitor system program. the 1. Compile 2. Load and 3. At 4. When FORTRAN-D source the run as program compiler output'under usual. FOSL. to the return the end of a successful run, control will FOSL to reload the call The user should then Monitor. compiler output as if to run the program again. loaded the program FOSL has (and subroutines, if any) it types READY T Type CTRL/C 5. A disk Note 6. image core on to as a to return the Monitor. of the user's program in FOSL may now be saved system program by typing SAVE NAME!0-7577;5043) that the When the ' starting Monitor has must be address the core control to the user, On time as a system program. returned image may be called at starting, the program types 5043. any READY f 7. When execution is CTRL/P initiates execution. program types ”I" and returns to the Monitor. complete the method FORTRAN-D with binary subroutines will find this Execution times of tested FORTRAN programs time saving. from 4664 to 7000. be increased by changing location 212 of .OS. Users who run especially can 3.4.2.3 program When an occurs error during Operating System Diagnostics the execution, operating system prints ERROR followed by a - the of error. code number which indicates the cause the nature of the error, it may be possible to continue program execution by typing CTRL/P or it may be necessary to return to the Monitor by typing CTRL/C. two-digit error Depending on Table 3-8 indicates lists the .08. a operating system error system device read error. messages. The message Table 3-8 Operating System Diagnostics Error Code Explanation Ol Checksum error on FORTRAN 02 Illegal origin or data address 04 System device input-output 05 High-speed 06 Illegal 11 Zero 12 Floating-point input 13 Illegal op 14 System device input-output 15 Non-FORMAT 16 Illegal 17 Floating-point 20 Square 21 Exponential negative 22 Logarithm of 40 Illegal device code 41 System reader FORTRAN divide binary input FORTRAN on error binary input machine malfunction or error binary input device error data conversion error - code used statement FORMAT root error as a or machine malfunction FORMAT specification number larger than of a device number negative number number a 2048 less used full, than in READ could equal or or not to WRITE zero statement complete a WRITE statement 76 Stack 77 Stack overflow underflow Errors loading 76 and error; error error 77 may be to caused correct by do the source program or following (Continued on next page) Table 3-8 (Cont.) Operating System Diagnostics Error Explanation Code a. Use Diagnose to determine where the error occurred. b. Recompile c. Examine the source program (in particular arithmetic and subscripted variables). When an error occurs, execution for a CTRL/P or CTRL/C. the source program stops and the operating system the waits Debugging Aid (Diagnose) Diagnose is a basic system program is to be used in It intended debug FORTRAN programs. conjunction with the PDP-8 4K FORTRAN Operating System and revised FORTRAN Symbolprint. Diagnose provides the following information. 3.4.2.4 used - to If stack overflow 1. or message indicating the error. of it prints a stacks caused 2. It prints a message indicating the contents location counter (CLC). 3. If the counter stack that stack. 4. of If location zero is nonzero, it prints the contents that location (minus one), indicating the point at which some FORTRAN systems error occurred. Diagnose is loaded into on has underflow occurred, which of the five run-time the system device as core shown is nonempty, it prints the the current contents of saved from punched paper tape and may be in Appendix D. A sample printout is: 4LOAD) *IN-R:) * 3%) 11 LSAVE DIAG!200-ll77;200) When in address locations core, Diagnose occupies at location 200. Diagnose is Monitor's called dot. by typing It may be (See Appendix D.) 200-1177 with its starting to letters DIAG in the response used any time the FORTRAN 4K Operating the (If it is called any other time, system is in core. printed is meaningless.) 3—45 the information of the of Diagnose is demonstrated by the example following program which contains a large amount of arithmetic calculations. (In”programs l and 2, examples of system output are not underlined.) The use test Program 1: *L GO FORTST PDP-8 ADVANCED SOFTWARE FORTRAN TEST 1/2/68 DIMENSION ADIFE(6),AFAC(3),APIPE(6),IMRCD(3),PP(27),ACPRI(3) TYPE 1 FORMAT ("PDP-B 4-K FORTRAN TEST"/) - 1 ASPVA=.60 APIPE(1)=12.09 APIPE(3)=6.66 APIPE(4)=5. APIPE(5)=5.0 IMRCD ( 1) =30 IMRCD(2)=30 ADIFE(1)=47. ADIFE(2)=47. ADIFE(4)=508. ADIFE(5)=3857048. AF=37.96 SC=3.1416 AMEAS=9.02 FSUBB=10.0 ASUVA=100.98 DO 200 READ 1:1,27 2,199,PP(I) 199 FORMAT(E) 200 CONTINUE AGAST=38 INORU=2 25 BSPVA=(1./ASPVA)**.5 DO 550 JCB=1,INORU AVEDE=IMRCD(JCB) BE=APIPE(JCB+3)/APIPE(JCB) IF(BE—.75)471,472,472 , 472 AK=.731 471 AG=.075 GO TO 16 DO 100 IE=1,27 AG=AG+.025 IF(AG-BE)100,100,110 100 110 CONTINUE 991 FORMAT(/"1",E,E,E,E/" ',E,I) 120 AK=TOTA GO TO 16 130 AK=TOTB+(SC*(TOTA—TOTB))/.025 TOTA=FF(IE) TOTB=PP(IE-l) SC=.025-(AG-BE) WRITE 2,991,TOTA,TOTB,SC,AG,BE,IE IF(TOTA-TOTB)120,120,130 16 FRD=830.-5000.*BE+9000.*BE**2-4200.*BE**3+(530./APIPE(JCB)**.5) BMEAS=AMEAS+14.4 FR=1.+((FRD/(12835.*AK))/((BMEAS*AVEDE)**.S)) XSUBZ=AVEDE/(27.7*BMEAS) YTTA=(XSUB2+1.)**.5 YTTB=.35*BE**4.+41. YTTC=XSUB2/(l.3*YTTA) YSUBZ=YTTA-YTTB*YTTC ACPRI(JCB)=YSUBZ*FR*1. 0177*FSUBB AFAC(JCB)=ADIFE(JCB)*BSPVA WRITE 2, 992 ,AK, FRD, AMEAs, BMEAS, FR, XSUBZ, YTTA ,YTTB,‘ 992 550 l,'YTTC, YSUBZ ,ACPRI(JCB), JCB FORMAT(/"2",E,E,E,E) CONTINUE AFTF=(520./(460.+AGAST))**.5 AFPV=(1.+(ASUVA*AMEAS)/((AGAST+460.)**3.825))**.5 FLOW=0 RATE=0 DO 38 I=1,INORU AMWP=(ADIFE(1)*AMEAS)**.5/1000. RATE=RATE+ACPRI(I) FLOW=FLOW+AFTF*(AFAC(I)*AFPV*AMWP) 38 CONTINUE WRITE 2,993,AFTF,AFPV,AMWP,FLOW,RATE TYPE 14,FLOW,RATE 14 FORMAT(E,E/) 993 FORMAT(/E,E,E,E) STOP END .STBL 6360 ADIF AFAC APIP IMRC ACPR ASPV SC AMEA FSUB ASUV AGAS INOR BSPV JCB AVED BE AK AG TOTA 6756 7555 7544 7522 7517 7376 7365 7362 7310 7302 7274 7266 7260 7254 7246 7244 7240 7231 7225 7222 7213 7205 7201 7171 W > J Symbol Table FR 7166 7153 7124 7116 XSUB 7102 YTTA YTTB 7074 7063 YTTC 7047 YSUB 7041 7032 7016 6777 TOTE FRD . BMEA AFTF AFPV FLOW W 6773 6766 RATE AMWP 0001 0199 0200 0025 5203 5411 5414 5426 0472 5507 0471 0100 5515 5547 5550 0110 0991 0120 0130 0016 0992 0550 0038 0014 0993 . > Symbol > Statement Number Table Table (Cont d.) J N 5615 5650 5656 5676 6147 6162 6323 6342 6350 EXAMPLE J 1 A f *READY f 4‘K FORTRAN PUP-8 0.255323E+1 1 .DIAG CURRENT EXAMPLE 1 TEST -0.825572E+l LOCATION COUNTER AT 6247 B .FOSL *IN-S:BIN * *OPT*READY ? ' 4-K FORTRAN TEST ERROR 05 (CTRL/C typed here) .DIAG CURRENT LOCATION COUNTER AT 5407 PDP-B 3-48 EXAMPLE 1(C) .FOSL *IN-S:BIN * *OPT*READY ? PDP-8 4-K FORTRAN TEST (CTRL/C typed here) .DIAG CURRENT LOCATION COUNTER AT 4404 COUNTER STACK... 4733 4716 4673 6024 the In example 1(a), called. Diagnose was which after to run completion indicated that the current location table Refer to the statement number (top of that the CLC was pointing to an address just program was Diagnose contained 6347. note and 3—29), page 993 statement above (address 6350), terminated normally at that point. counter verifying that the program program execution was attempted without paper tape in error diagnostic 05, the After reader. observing statement Refer to the CLC=5407. that was called, indicating Diagnose table number again and note that the address 5407 must refer to a READ the indeed statement just before statement number 199 which is statement at which the error occurred. In example 1(b), the high-speed In was example 1(c), program execution was arbitrarily stopped when CTRL/C It should be noted that in this case the CLC contained a typed. In such is outside the user's interpretive code area. the counter stack in order to to refer to is necessary address The laSt determine where the program interruption occurred. the counter stack points to location 6024. Refer to the statement on some number table and note that the program was interrupted at point between statements 16 and 992. 4404 which it cases on program in which a missing operator appears When program execution is attempted a stack overflow (error 77) occurs. Diagnose indicates that the operand stack has some which noncompiler detected error in the overflowed, suggests is which number the statement shown in As source program. table, CLC the points just before statement 10, which afterwards, Program 2 is the 6th typed happens a FORTRAN line. It the source of the error. should be pointed out, underflow overflow or that when stack however, occurs the CLC will not to be It necessary may always point to the source of the error. examine the entire program for errors of this type. to be Program 2: .EDIT *OUT-S:SRC * * IN- * *OPT-B *1 c FORTRAN TEST B=l c=2 D=3 10 DO I=1,160 A=B(C+D) 10 CONTINUE TYPE 20,A 20 FORMAT(E) STOP END *E .FORT *OUT-S:BIN * *IN-S:SRC * T *READY f ERROR 77 » (CTRL/C typed here) .DIAG OPERAND STACK OVERFLOW CURRENT LOCATION COUNTER AT .FORT 5231 *OUT* *IN-S:SRC * 1 (CTRL/C typed here) ‘ .STBL 5251 7555 7574 7570 7564 B C D 7562 7555 I A 0010 0020 i 5237 5244 C When Diagnose finishes returns to the typing Monitor since the it program execution. 3-50 appropriate is information impossible to resume control FORTRAN Examples 3.4.3 LLOAD ) *IN-R: ) * *sr= 1t ) 3m: FORT!0-l777;200) __._LOAD ) Call Loader Input to be from high-speed reader Input device is valid Return to Monitor after loading Loader-driver is loaded and saved on the system device Call Loader :IN- R: ) Input to be from high-speed reader Input device is valid ff Compiler * Monitor after loading is loaded and saved on the system device Call Loader Input to be from high-speed reader Return 'Tszws .FT.1200-7377;0) :LOAD ) *IN-R:) * to Input device is valid ?ST= ) Monitor after loading loader is loaded and saved on the system device Call Loader Input to be from high-speed reader Input device is valid Return to Monitor after loading Interpretive and arithmetic package Return to Operating system f 1 _._SAVE FOSL!0-l777;200) is loaded and saved on the system device Call Loader Input to be from high-speed reader Input device is valid Return to Monitor after loading Symbolprint is loaded and saved on the system device 4 _,_LOAD *IN-R:) * *s'r= ) n .gSAVE STBL!600-777;600) _._EDIT ) *ou'r-swon'r) * 3110-11: .> 7_ *OPT-B *E _=FORT) *ou'r-smon'r ) Call Editor Output to be on system device Output device is valid Input to be from high-speed reader Input device is valid Leave blanks (spaces) unchanged Write the program on the system device then write an end-of-file Call FORTRAN compiler be on FORTRAN binary output to system device * Output device is valid TIN-s :FORT ) ASCII input to be from system device * Input device is valid :1: Compilation CTRL/C was typed. finished, return to Monitor 4STBL) Call FORTRAN 6177 7565 M 7576 A B 7573 ANS 7565 0001 5200 7570 Core Symbolprint between 6200 Symbol table and 7564 is unused (typed by Symbolprint) is 0002 0003 5257 S413 5570 5717 5754 5760 5763 5766 0004 0005 0006 0009 0100 0200 number Statement table (typed by Symbolprint) 0300 0400 5771 5774 0500 1000 2000 3000 5777 6027 6040 6051 6062 6071 6077 6123 4000 1500 0008 0007 Symbolprint is finished, load operating system and interpretive code code Operating system and interpretive l *READY ) are THIS THIS loaded the program Execute 1 IS A DEMONSTRATION OF PDP FORTRAN, PROGRAM WAS COMPILED IN ONE PASS (CTRL/C _._F0$L ) *IN-S_:FORT ) * 7OPT- ) typed here) Call operating system and loader FORTRAN binary input is on system device Input device is valid input or output to be done on system during program execution Operating system and interpretive code No device *READY ) have THIS been loaded Begin program execution l IS A DEMONSTRATION 4mm ) *OUT-S :FORT ) I' 7IN-s :FORT ) t i *READY ) OF PDP FORT (CTRL/C typed here) Call FORTRAN compiler Output to be on the system device Output device is valid Input to be from the system device Input device is valid is Compilation finished, loading operating system and interpretive code Operating system and interpretive code are‘loaded Begin 1 THIS IS A DEMONSTRATION 0F program execution (CTRL/C typed here) 3.5 DDT-D (DDT-D) the for Disk/DECtape System Dynamic Debugging Technique testing, and altering of object programs provides on-line checking, On-line program debugging allows terminal keyboard. through the and insertion checking at the computer, control of program execution, of corrections or changes while the program is running. is important to have a listing of the program and be updated as corrections and changes are made can which its symbols to be referred by their Variables and to the program. tags may values. symbolic names or by their octal When using DDT-D, it be DDT-D can DDT considered as slightly occupies and the three DDT above two-page version, modified (Low), Resident in Driver on three sections. being in A Proper information for Programming Refer to Chapter 5 of Introduction to the operation of DDT-D. location core locations. breakpoint proper program (above 4577); plus ‘program, once-only breakpoint insertion set origin its with core DDT-8 of 200-4577 it is a one-page a contains it and and removal logic, overlay routines, continuation iteration count and control, and breakpoint list. Core User Image File Occupies and the is user storage same used for DDT proper proper and from the system area swapping program to and as DDT device. DDT-D is an expanded following exceptions. version of DDT-8 with the DDT-8) (as opposed to only one in No punching (program may be output on the system device) 3. No switch 4. No halts 1. Three 2. breakpoints Options (user direction is via keyboard) (continues when Variations in commands user types CTRL/P) from DDT-8 follow. ([ represents the ALT MODE modifications are constants; to their character) [0, [S, (Y, [L, [M Are temporary respective every entrance CTRL/P CTRL/C DDT-D to from a reset at [G [C or Continue (DDT prints 1 to indicate it is waiting for CTRL/P) Restore Monitor user image core * and return that to where n is [B breakpoint; Set n[Bk the break, command, and k is l, 2, of address the is breakpoint the or 3 - NOTE If user address, n[BI [TI anIPI The have been following subroutines same ? is typed and occurs. independent switch Is [R two the to removed been Have [E a action no set at tries breakpoints added. Finds word to be examined and puts it in WORD remembers if last virtual word referenced 2; word virtual was in same buffer as present if and reads only required. ADDCHK virtual ADDMOD Updates real DDTB Updates symbol table pointer, gets or its and breakpoint breakpoint number and breakpoint, and 0. nothing number STOSYM READS = Updates DDT must be on core. and goes value contents, (—) hyphen a TRAP goes to to START if of prints if a prints breakpoint or ‘ symbol proper (DDT area proper unprotected disk). in a failure Input-output routines for disk; of DDT. start to and S goes prints and SYMIO either The following subroutines REDTAB have been Assumes user table; [X modified to wants indicated. as add to existing typed to clear the V must be symbol symbol table. not halt, instead, FINIS Does CHANGE Allows lookup of values and search mask. TODDT ‘ Handles it waits to for a CTRL/P. change limit of breakpoint insertion; search transferred to driver. TRAP Breakpoint handler; transferred to DDT driver. DDT The following subroutines have been removed. PUNWOR FSTPUN FUN PUNCHK PUNLDR WH I CH CHKS UM From the stopped may be terminal keyboard, at up to set before the user can be program automatically three strategic points by setting breakpoints, which the debugging run is started or during another To set a breakpoint, Type the absolute address or breakpoint stop. symbolic tag of the location where the program is to the ALT stop, MODE key, the B key, and then the breakpoint number. For example, 3400[Bl (absolute address, ALTMODE, B,1) HERE[BZ (symbolic tag, ALTMODE, B, 2) Locations 3, 4, and locations. The The certain represent registers available to the user by typing: 5 used as the breakpoint be reset to any three contiguous locations on page zero by reassembly of the furnished DDT Driver source Changing the breakpoint locations is done by setting BRKCEL=n, where n is the lowest of the three locations desired. on breakpoint page zero locations are can following symbols' contents Table 3-9 are [A Accumulator storage [Y Link storage [M Mask used [L Lower [U Upper limit of search lists the (at breakpoints) (at breakpoints) in search limit of search DDT—D commands. in DDT-D whose Table 3-9 DDT-D Commands n Character Action (space) Separation character. + Arithmetic plus. Arithmetic minus. - / Location examination when it character; follows the address of a location, it causes the contents of that location to be printed. RETURN LINE Make key FEED key modifications, if Make modifications, if and any, print contents of the next sequential location. Print last (period) T (left arroW) any. as an octal integer. location. Current Delete quantity the line currently being typed. type out in symbolic mode. [S Set DDT-D to [O Sets DDT-D n[W Word search for all occurrences C([M) of the expression n. k[Bn Insert to out type breakpoint n at in octal mode. [Bn Remove location k n[C Continue breakpoint n(n=1, 2, absent, Go to [R Append [x or with masked 3). k[G the (n=1, 2, or 3). n times automatically; it is assumed to be 1. if n is location k. symbol table table or Clear symbol table. define symbols into on external line. symbol Loading and Saving 3.5.1 The tape is in two loaded into core from punched paper tape. The section contains DDT proper which loads in one first pass, occupies core locations 200-4577 (See Appendix D) and uses three The binary tape of for the breakpoint locations. on page 0 locations .the DDT driver uses locations 3, 4, 5 and 7200-7577. After loading DDT proper, reserve on the system device a user core image file name .SYM, also PAL—D which should also be assigned to core locations 200-4577. uses SYM to store additional symbol table entries. DDT-D is sections. section of DDT (the driver) loads in two passes and occupies pages in core with its origin anywhere above DDT proper, that is, For in resident core. anywhere above location 4577. The driver is one for once-only code plus four for it uses five more pages: setup, Command Decoder. Command Decoder expects two inputs to be assigned as These files are assigned only once be used by the driver. to files which case two these unless the system is changed or destroyed, in The next two files must be The reassigned. sections of DDT are loaded and &LOAD) *IN-R:) saved as described below. using Monitor from high-speed reader found input device valid to Monitor after loading Call Loader to be Input 1 Loader *ST= ) Return 11 DDT proper is loaded Saved a user _;SAVE .DDT:200-4577;0) ;SAVE .SYM:200-4577;0) as (See program Appendix D.) User a core user image file program. ALOAD ) Call Loader *IN-R:) Input 1: Loader *ST=7000) Transfer to to be found also saved (See as Appendix D.) using Monitor from high-speed reader input device valid once-only code after loading 11 Driver is §;<.DDT),S:<.USER> DDT loader Loader expects names of 2 input files saved above for use by driver (See Appendix D.) *IN-S:.DDT,S:.SYM.) Inputs user I:- Is to be core from DDT proper and image files found input files valid (an asterisk is printed for each valid file (device)) Loader :fiAVE DDT!7200-7577;7200) Saved as system a (See program Appendix D.) The is printed whenever an message DDT? error is encountered DDT-D. Errors may be caused by the following. error while loading 1. User 2. System device read 3. No file too Command large error Decoder found Operating Procedures 3.5.2 DDT-D is core the now saved program on the be to The system device. This debugged. must user is done now as load into described in response to Paragraph 2.5. When the Monitor's program to be debugged dot as shown below. is in core in DDT type LDDT DDT-D and can now making be Introduction to A brief used in debugging modifications the directing program, above described as in and Programming. example of using execution Chapter 6 of follows: DDTeD Example: ;LOAD) *IN-Rz) Call Loader Input to be from high-speed reader Loader found input device valid Return to Monitor after loading :_ ST= ) 13_ ;SAVE DDT .DDT:200-4577;0) 4SAVE .SYM:200-4577;0) proper is is DDT proper ' loaded saved disk on (See Appendix D.) User code image file also _._LOAD) Call Loader *IN-Rz) Input 1_ Loader found input ST=7000) Transfer to once-only to be loading 11 Driver is I§i<.DDT>,S:<.SYM> DDT from saved high-speed reader device valid code after loaded Loader expects names of 2 input files saved above for use by driver 3-58 DISK MONITOR SYSTEM RESTORE 3.6 This program restores a protected has been destroyed, or it after programs from the disk. portion removes Monitor of the Disk System all but a protected group of DF32 or RESTORE may be used only in a DISK MONITOR SYSTEM built on a with Disk Monitor version "AF". The program is supplied as RF08 Disk be assembled must and using PAL-D. an ASCII source on paper tape, a version of the program it is as source of the yields Assembly the to suitable for a single 32K disk unit. By making minor changes or 4-disk unit or a for suitable version configuration, 3, 2, source,a for the RF08/R508 with 1 to 4 disk units can be created. repacking of system tables on INDAC system do RESTORE or option M of PIP on INDAC systems. Due to not or use run RESTORE fresh image of the Monitor into 7600-7777. 1. reads 2. first and storage recreates the first Directory Name block Allocation Map block by using the DN and SAM Backup blocks. 3. clears a all other DN and existing core SAM blocks. If RESTORE has been saved on the disk before a crash occurs, it can be into core and executed by a simple bootstrap which can easily called For this purpose RESTORE needs to be saved on the disk be toggled in. in a known block; preferably, it should be saved as the first program on the disk (after the Monitor, Loader, and Command Decoder). Normally RESTORE is used in conjunction with the P (Protect) and M (MOVE DN and SAM to Backup blocks) options of PIP, and with the write—lock switches of the unit. or 4 unit DF32 disk he should edit, using the in order to which is source the RESTORE supplied tape Editor, The configuration. produce a version of the source suitable to his original version is suitable only for the user having a single unit The editing required consists of removing slashes which precede disk. The certain additional lines of code which are already in the source. If the user has 2, 3, PUP-8 lines which should be edited itself. 3.6.1 Assemble and Save are clearly indicated the Disk Monitor Now load the Save RESTORE RESTORE on SAVE System Builder build binary paper tape into the disk the source RESTORE Assemble the proper version of the RESTORE source tape Assembler to produce a binary paper tape of RESTORE. Using in as REST!200;200 follows: a using the PAL-D new system on disk. core in the usual fashion. *IN-S:.DDT,S: .SYM ) from Inputs code image DDT and proper user file In * Loader _._SAVE DDT17200-7577;7200) .LDDT‘) 3400/AND 3401/AND found both is Driver me) 3400) JMP 3400 [6) Start 1-340010000 Location 3400 IC) Continue 1-340020001 Location 700 (c) Pass through times Location 3400 execution 3400 l No. at contains now Symbol Table extends from location 1574. This gives a total of 160 decimal symbols and may be cleared by User 400 to typing IX. 0001 3400 contains NOTE 3400 0000 contains location now location at location CTRL/C was typed here O (See Examine contents of location 3400 and 3401 Set breakpoint 3400 —. disk using Monitor 3400 [31) 1-34OOQO701 on Appendix D.) Call DDT 0007 saved input files valid 0701 700 Procedures Operating 3.6.2 in the usual Load and save PIP Load and save in the other programs to be placed protected system. should not require a total of more than 123 (octal) This keeps all programs to be protected in the lower These manner. programs disk blocks. half of disk unit 0. directory with the Duplicate the M-option of PIP as follows: *OPT-M *IN-S ) This copies existing the state of the first Directory Name and block block into the DN and SAM backup Allocation- MAP At this This backup area is in the lower half of disk unit 0. area. blocks additional 2 3 and blocks and Name existing any Directory point are still clear. the first Protect Storage the monitor with the P-option (see section 3.1.2) of PIP as 0 as follows: This marks all restricted, so cf half unused blocks in the lower this area may be write locked. disk unit in shown the M and P options are generally used together as above example, either may be used separately or they may be used in reverse order. The important facts to remember are: Although the l. 2. 3. lthe RESTORE The P run must always be executed before the disk with the lower 16K of the disk write-locked. monitor can option must be always be run. option That portion of the M P the reserved by option can the RESTORE program and only when executed before the P option. disk only by using option was user DDT Write-lock the lower half of disk unit 0 by ON and the Lower 16K write-lock switch ON. is any future time when the system except the protected programs and data typing be the file .SYM is to be used by the PAL-D assembler or with the lower 16K of the disk write-locked, it must P be created (with the SAVE command) after the option has been executed. If the by At before can The M recovered 4. executed program putting Disk still can be Switch all programs from the disk by running, deleted Unit 0 ;REST When the Monitor responds with a carriage return/line (.), the protected system has been restored. 3.6.3 feed and dot Bootstrap Sequence DN and any time the unlocked portion of the disk including the the blocks is protected system may be restored by destroyed, toggling in the following bootstrap: If at SAM 0171/5427 will the first program saved after the The formula is BLKNO*201(8)+1) (Disk address of disk block 26 where RESTORE if it is system is built. reside 0172/1171 (TAD disk address) 0173/6603 (DMAR disk read) 0174/6622 (DFSC skip 0175/5174 (JMP .-1) 0176/6621 (DFSE skip if 0177/7402 (HLT 7750/7600 (Data Break Word Count) 7751/0177 (Data Break Current Address) on on completion) no error) error) START the bootstrap at 0172. This and automatically executes it. bootstrap reads NOTE RESTORE halts on any disk error. RESTORE into core APPENDIX A SYSTEM GENERATION This appendix describes the creation of and system programs) on an empty disk. The steps involved in system generation A.l 1. Toggling 2. Loading the Binary 3. Loading and executing 4. Loading and saving THE RIM LOADER TOGGLING IN in the Readin Mode (BIN) a Disk are as System (Disk Monitor follows. (RIM) Loader. Loader. Disk System Builder to create Monitor. any system programs. The Readin Mode (RIM) Loader is a short which loads program any in RIM format on program paper tape into core. Although the RIM Loader has various uses, its sole in the purpose System Building process is to load the Binary Loader.’ There are from the the two versions of the RIM high-speed paper tape Teletype paper tape reader. High-Speed Reader Loader, reader and for loading programs the other for loading from one Teletype Reader Lgcatigg Instrustign Lesatign Instrugtignv 7756 7757 7760 7761 7762 7763 7764 7765 7766 77674 7770 7771 6014 6011 5357 6016 7106 7006 7510 5374~ 7006 6011 5367 6016 7756 7757 7760 7761 7762 7763 7764 7765 7766 7767 7770 7771 6032 6031 5357 6036 7106 7006 7510 5357 7006 6031 5367 6034 7772 7773 7774 7775 7776 7420 3776 3376 5357 0000 7772 7773 3776 7774 7775 7776 3376 5356 0000 A detailed RIM to Loader description can Programing. be 7420 of the toggling and checking procedures for the found in Chapter 6 and Appendix E-l of Introduction A.2 LOADING The the (BIN) Binary tape into Disk THE BIN LOADER Loader loads any program in binary format on paper purpose in the System Building process is to load The procedure for loading BIN is as follows. Builder. Its core. System 1. Check that the RIM 2. Place tape containing BIN in the paper tape Teletype, according to version of RIM). the paper (high—speed 3. If 4. Place or Loader is Teletype reader is the address to 7756 be in core. used, into the turn it SWITCH reader on. REGISTER and press LOAD ADD. 5. Press START. it does (if Tape should begin reading not, check that the SING INST and SING STEP switches are off and that the reader is on line). (Note: The Teletype reader is on If the to print, flip line.) always Teletype begins Teletype switch from LOCAL to LINE and back up the tape to the leader/trailer. 6. After paper tape reads in, Loader will be in core. A detailed of BIN its and LOADING AND EXECUTING'DISK the Disk loaded by Next, is of use STOP can on be console and found in the Appendix BIN 3-1 Introduction to Programming. A.3 . description Press System Builder program, in binary format on paper tape, the Binary Loader. System Builder (DEC-D8-SBAF) is compatible only with versions Peripheral Interchange Program. 1. 2. SYSTEM BUILDER Place the address SWITCH REGISTER. DEC-DS-PDAD and DEC-D8-PDZE Loading procedures 7777 (starting Press LOAD ADD. address are of of as follows. BIN) into the the If the high-speed paper tape reader is to be used, down put set to 0) bit 0 of the SWITCH REGISTER, place the System (or Builder tape in the reader. If the SWITCH reader is to be used, leave up bit 0 of the REGISTER, place the System Builder tape in the reader, Teletype put the Teletype 3. Press 4. When START on to the line, and set console. reader to START. Tape should read in. contain all tape has been read, the accumulator should the program has loaded incorrectly; (if not, begin the loading procedure from the beginning). zeroes 5. off WRITE PROTECT on the disk (if present). Otherwise, a reel on one of your DECtape units, set the DECtape unit selector to 8, and set the WRITE switch to WRITE and the REMOTE switch to REMOTE. Turn mount A-2 NOTE To rebuild the monitor without stored programs on make the following destroying previously the system device patch. L99 9L9 HEW 375 0400 7600 0200 address place the begin System Builder execution, into the SWITCH REGISTER, press LOAD ADD, and then START. 6. To 7. As the according BUILDER following questions are typed configuration. answer them K in Explanation Dialogue *SIZE 92 9933 8 size User enters (4,8,12,16,20,24,28, *HIGH SPEED PAEEB IAREZ *RF082 out, to your machine User Y answers Y(yes) of or or core 32). N(no). User answers Y(yes) or N(no). vaY, question is omitted. N *DF332 Y next If N, the Builder a wishes to build this case DECtape system on unit 0. In the next 2 questions are omitted. User answers assumes Y or N. the user types number of physical disk units his machine 1,2,3 or 4 in addition to 256K disk. Multiples of 32K for DF32, for RF08 units. *NUMBER OF DISK UNITS? 2 User on *DECTAPE? if he has (in DECtape, types Y his otherwise addition to N. disk) the Monitor creation is completed, is to the resident moved portion ‘ User Y area (7600 through appropriate core and the nonresident portions are 7777), written on the system device. NOTE If specified automatically device; selected. if as disk is the the system 8 is unit DECtape present, selected not, as Monitor is If the loaded and ready. response WRITE ERROR occurs 3 If 1. disk, A.2; start there at over may be Paragraph hardware a problem. 2. If DECtape, try a new DECtape and at Paragraph A.2. or, rewrite the timing and mark tracks and start start A.4 at Paragraph A.2. LOADING AND SAVING SYSTEM PROGRAMS Binary Loader is one of the nonresident portions of Monitor and is used to load and user into system It is fully core. programs described in Chapter 2. the Figure A-l illustrates Binary Loader with the low procedures An example of the saving speed reader. procedure follows: - zLOAD) Calls *IN-R:) device. device Input Binary (high-speed present from the system is reader paper tape reader if as specified Builder System time; otherwise Teletype reader). Device is valid. Return to Monitor after loading. After each up-arrow typeout, user types 'CTRL/P to continue (also must press CONTinue on console if reader Teletype is being used). 1 *§T=7600) 11 ;SAVE PIP10-5177; at Loader 1000) Save program (in this case, PIP) on Note device. that a ! must name of system program. The SAVE command is explained in Chapter 2. The SAVE command is in program given system follow Appendix D. Repeat the procedure above for each system program to be saved. Binary Loader Procedures (Low Speed, ASR, or With Monitor In @—~.{ Interpret, ¢ correct go to Queries Responses Acceptable ® Up ®_p[ Operation Type _._LOAD Answer Loader error; Reader) is arrow typed Put LSR Switch Put Binary Tape in LSR at FREE Jr With Leader Code Over Read Head J, Type CTRL/P Jr Position LSR Switch at START L Tape Reads in; Computer Halts J Position LSR Switch at STOP/FREE; press Console CONTinue Switch Jr Up Type CTRL/P Return arrow is typed to to Monitor Figure A-l Disk Loader/Paper Tape Flowchart A—5 APPENDIX B SYSTEM FORMATS This appendix 1. contains the following information. System Device Layouts Disk Storage Layout DECtape Storage Layout Directory Block Format (DN) Name Storage Allocation Map of Table 2. B.1 and Source File (ASCII) Binary File (BINARY, FTC 3. PIP of 4. Monitor Core Usage Diagrams 5. Monitor Flow Chart Listing SYSTEM DEVICE 8-1 Core Capacities BIN) (SYS, USER) disk Block Format Structure Saved Files Figures both Data System Device (SAM) System Device Map (for Disk) (Figure B-ll) LAYOUTS and B-2 illustrate the layout of the device for system and Note that, although the layouts differ in DECtape. arrangement, they logically equivalent. are words RF/RSOB disk unit contains 256K 13-bit (12 bits-plus-parity) Each physical unit is divided into two "logical storage capacity. disk Table 3-1 units. units", each equal in size to four DF/DS32 An of lists the capacities of the various devices which may be part of the system. A relatively sophisticated retrieval required: structure is used for all automatic Two special types of blocks are storage by the system. and Blocks, Directory Name (DN) Storage Allocation Map (SAM) Blocks. three Directory blocks. file of Each Name logical (DN) blocks unit has its own directory, utilizing and four Storage Allocation Map (SAM) INTERNAL BLOCK # FILE # FIRST , . h a g 5 a $1 MONITOR Fl MONITOR fll MONITOR Fl DN, BACKUP fll SAM, BACKUP fl a1 MONITOR 5 a1 a1 a1 $1 ¢4 MONITOR 6 7 lfl MONITOR 11 12 g4 F4 as ¢5 LOADER 5 .CD. 16 17 52 :gg: 3? $5 -CD. .CD. 22 LQQQZZZZLLLLLL“ W i}; In a / g ' Bl SAM3 i ¢1 1 g1 SAM4 ////////// 1371 ///////// Figure 3 FIRST 5 7 OF WORDS OF LOCATIONS BLOCK 774 BLOCK 1372 THIRD DISK UNUSED FOURTH V { (OPTIONAL) 375 376 B—l 1767 FIRST DISK BLOCK 14¢1 WORDS FIRST WORD OF / / ////////// 773 373 374 SCRATCH SCRATCH FIRST 1¢¢1 JQZZALLLLL / 2 Fl SCRATCH D 1372 2¢l 2fl2 BI DN3 FOR STORAGE ‘ \SECOND DISK HI DN USER 774 13 14 15 .CD. AVAILABLE = NOT USED 3 4 MONITOR LOADER // LOCATION 1 2 MONITOR LOADER IS DISK Disk Storage Layout in the Disk Monitor System DISK/ NOTE The odd accumulations at the end of each disk are due the fact that to dividing the disk into 129-word blocks leaves a remainder of two words. the On first disk the first location is only, This allows the write unused. lock to boundary fall between two blocks. Blocks 1770-1777 do not exist. use them. In attempt to systems with less than four entries set Do not corresponding 01 to to SAM block disks, nonexistent blocks are (the Monitor file number). All blocks which given an are available but unassigned internal file number of 0. There may be system. 60(decimal) user files in the are total BLOCK MONITOR MONITOR HEAD DN (lST PAGE OF SAVE) MONITOR SAM (START) DN (BACKUP) SAM (BACKUP) SCRATCH Directory SCRATCH BLOCK SCRATCH Block Storage Allocation Map B lock / BLOCK Name % AREA AVAILABLE FOR SAVING BLOCK 1g MONITOR (2ND PAGE OF CALL) 11 MONITOR (3RD PAGE OF SAVE) 12 MONITOR (2ND PAGE OF SAVE) 13 MONITOR (lST PAGE OF CALL) 14 MONITOR (4TH PAGE OF SAVE) BLOCK 7 fl 15 LOADER 16 LOADER 177 DNl (USER) 17 LOADER Zfifl SAMl (USER) (USER) 2fl COMMAND DECODER 2¢1 DN2 21 COMMAND DECODER 2g2 SAM2 (USER) 22 COMMAND DECODER 2¢3 SAM3 (USER) 23 COMMAND DECODER 2¢4 SAM4 (USER) 24 COMMAND DECODER 2¢5 SAM5 (USER) 25 COMMAND DECODER 2¢6 SAM6 (USER) 26 COMMAND DECODER 2¢7 DN3 (USER) ' 27 LOADER 3fi LOADER 7 31 LOADER SCRATCH BLOCK 32 LOADER SCRATCH BLOCK 33 LOADER SCRATCH BLOCK 34 LOADER BLOCK SCRATCH 27¢l8 ’/////////////////////////////// Figure 3—2 CORE IMAGES DECtape Storage Layout B-4 (Revised) Table B-1 System Device and Unit Core Capacities Highest Page (Block) (lst Page 0) Number Words = l DISK(DF32) 32,768 (375(8)) 2 DISKS(DF32) 65,536 (773(8)) 3 DISKS(DF32) 93,303 (1371(8)) 4 DISKS(DF32) 131,072 (1767(8)) l DECTAPE 190,146 (2701(8)) l RF08 DISK 262,144 80:1767(8) S1:1767(8) 2 RF08 DISKS 524,288 SZ:1767(8) S3:1767(8) 3 RFO8 DISKS 786,432 S4:1767(8) 85:1767(8) 4 RF08 DISKS 1,048,432 SG:1767(8) S7:l767(8) NOTE disk is divided into two 128K Each unit is logical structured as if it were four DF32's. Each RF08 units, logical 3.1.1 Directory The format of a Each file has Name Directory an Blocks (DN) Name entry in is of the Block one illustrated in three DN blocks 3-3. the system Figure on device. DNl DN2 - - Contains entries through and file numbers link to DN2. 01 31(octal)(25(decima1)) for Contains internal numbers file and a link to DN3. 32 through entries for 62(octa1)(50(decimal)) DN3 - Contains entries for 77(octa1)(63(decima1)) Thus, the system device contains the filename, internal a internal file numbers 63 through an end-of-chain link of 0. and contain up to Each file entry 63 files. address, entry point address, file type, and an internal file number (1 through 77(octal)). When a file is to be added on the system device, an entry for the file is created in the first open entry slot found in the DN blocks. When a file is deleted, DN entry is cleared and the slot is made available for some other its file. can start BLOCK NUMBER OF (DISK = FIRST SCRATCH 0373; DECTAPE 2-DIGIT VERSION NUMBER BLOCK NUMBER OF DN FIRST ENTRY FOR (INTERNAL FILE DN ENTRY BLOCK FIRST FILE SECOND = DN 1° ENTRY FOR THIRD = BLOCK BLOCKS ONLY; CONTAIN ZEROES IN (files 018+318[25101) (0200) THESE WORDS 01) 02) FILE (INTERNAL FILE NUMBER ENTRIES DN FILE (INTERNAL FILE NUMBER 25 lST OTHER (AF) SAM NUMBER FOR BLOCK 0005) = = 03) PER DN DN ENTRY FOR (INTERNAL TWENTY-FIFTH FILE NUMBER = FILE 318) to DNZ (files 328 +_._{Link through 628) 638 through FIRST DIRECTORY NAME (DN) BLOCK {DN377 8(files [6310]) LINK Link of H (end—of— chain). N N N = 4-CHARACTER FILENAME N N LOW DN ENTRY CORE ADDRESS ENTRY FORMAT O 1 2 4 3 __ 6 8 7 9 INTERNAL J I I EXTENDED 10 ll BITS INSTR. l 00 ASCII 10 FTC BIN 01 BINARY ll SYS OR USER Name (DN) 8-3 Directory ADDRESS NON- TO BE OBEYED ON CALLING = SYSTEM PROGRAM TYPE Figure CORE IF ~‘--\\ADDRESS OF lST FILE NUMBER MEMORY -1 CONTIGUOUS POINT 5 LOWEST OR SAVE FILE Block Format PROGRAM 8.1.2 Storage Allocation Map (SAM) Blocks contain a record of which files are occupying which SAM blocks contains Each SAM block system device. (See Figure 8-4.) 377(octa1)-block area. on the the map for blocks 0 contains the map link to SAM(3). for blocks 400 contains the map link to SAM(4). for blocks 1000 SAM(l) contains a record blocks of a through 377(octal) and a link to SAM(2). SAM(2) a SAM(3) and a through 777(octal) through contains the map for blocks 1400 through either and end-of—chain link of 0 (if disk) SAM(4) and SAM(5) The and 1377(octal) 1777(octal) or a link to (if DECtape). next two SAM blocks are present only if a DECtape is the system device. SAM(S) and a SAM(6) and an contains the map for blocks link to SAM(6). 2000 through 2377(octa1) contains the map for blocks 2400 end-of-chain link of 0. through 2701(octa1) . each is present for disk unit four (up to SAM block resides on the disk which it maps (SAM(1) on the first disk, SAM(2) on the second disk, etc.). When a file is to be a search SAM blocks for an entry is made added, through the containing 0 (block is unoccupied), the internal file number of the file is placed in that entry (and in as many other unoccupied entries as are needed for the and the block is file), storage linking When a file is deleted, all SAM block entries containing adjusted. the file's internal file number are set to 0. The block number of the beginning block of the SAM chain (200) is stored in the third word of On an RF08 disk each pseudo-unit (SO-S7) has the first DN block. its own set of three DN blocks and four SAM blocks. 0n disk, allowed) one SAM block and each SPECIAL INTERNAL FILE NUMBERS: 01 ALL MONITOR, DN, AND SCRATCH BLOCKS SAM, BLOCKS 04 LOADER 05 COMMAND DECODER BLOCKS WORD WORD COxlONmubLDNI—‘O WORD WORD WORD WORD WORD WORD WORD WORD 122 WORD 123 WORD 124 WORD 125 WORD 126 WORD 127 WORD 128 internal file of file = nnn number occupying block LINK TO ALLOCATION MAP (SAM) BLOCKS O, 1, 2 15 01 BLOCKS 5, 6', 11 0 13 01 FILE#4-BLOCK10 13 01 FILE#13-BLOCK8201, 202,206,207 15 00 00 00 15 03 13 03 13 0° 15 04 10 00 03 12 FILE #3 - FILE#15-BLOCKSZOO, 203, 205, 210 UNUSED - BLOCKS 204, 3, 4, 7, 211 Figure 8-4 SAM2 (BLOCKS 400-777) STORAGE - (0 unoccupied) EXAMPLE FILE #1 nnn Storage Allocation Map 2 4 6 (SAM) Block Format = B.2 The DATA data STRUCTURE of each type of program structure file described is in the following paragraphs. 8.2.1 Source File (ASCII) Data Structure All characters are stored in 6-bit ASCII code as two words three per All nonprinting characters (200 paper tape frames as described below. through 237 and 340 through 377) have their two most significant bits (The one exception to this rule is dropped and a 77 prefixed to them. which is A11 are nonexistent.) RUBOUT, 377, printing characters trimmed to six bits, except for ? (277), which is packed as 7777. B.2.2 All Binary File (BINARY, FTC BIN) Data Structure and FORTRAN binary (FTC BIN) files are stored as three paper tape frames. Frame 1 is contained within within the contained eight bits of word 1, frame 2 is binary (BINARY) two the words per rightmost rightmost eight bits of word 2, and frame 3 is contained within the leftmost four bits of words 1 and 2 most (the significant bits of frame 3 are those of word 2). Example: 4 Meaning Disk(0ctal) 200 Leader 102 033 ORG Second half of ORG word 5600 0502 Paper tape This 8.2.3 procedure is repeated until Saved File (SYS,USBR) Data a Disk(Bina£y) 1011 0001 trailer code is 10000000 01000010 found. Structure of number files are stored on the system device as an integral 'and each Storage occupies one disk or DECtape block. page conventions differ between saved files of contiguous pages of core and those of noncontiguous pages. Saved pages Contiguous Pages The Start All system device blocks contain core images (Figure B-S). Address word in the Directory Name (DN) entry for the file is set to the starting page address. SAVE FILC:200-600;433 Contains core image of Iocations Block 1 Filenome 200 through 377 Start Address Entry Point File Type/File Number DIRECTORY NAME ENTRY . Contains core Block 2 image of locations ‘ Block 3 400 through 577 Contains core image of locations 600 through 777 Figure 3-5 Contiguous-Page Save File Format Noncontiguous Pages The first system noncontiguous pages device of block of contains core a saved list of subsequent blocks. a file composed of page assignments The last in entry Start Address word in the core and the core images stored in this list is set to 7777 (Figure 3-6). The Name Directory entry for the file is set to 7777 to indicate that the first block does not contain a core image but a page assignment ' listing. SAVE FILN: 0,400,1000;433 Block 1 End of Filename List of 0000 0400 page 1000 7777 ments assign— Start Address List Entry Point File Type/File Number DIRECTORY NAME ENTRY Contains image Block 2 core of locations 0 through 177 Contains Block 3 image core of locations 400 through 577 Contains Block 4 image core of locations 1000 through 1177 SYSTEM DEVICE BLOCKS Figure B-6 Save Format Noncontiguous-Page 3.3 A PIP DIRECTORY LISTING directory listing of the system device can be obtained (Figure B-7). A sample output is given below. PIP LPIP) *opT-L) *IN-s:) FB=0121 121 PALD.SYS EDIT.SYS LOAD.SYS .CD..SYS PIP .SYS FORT.SYS (0) (0) (0) (0) (0) (0) 0011 0007 0025 0010 .FT..SYS .OS..SYS FOSL.SYS STBL.SYS .DDT.USER .USR.USER DDT .SYS \cJ (0) (0) (0) (0) (0) (0) (0) 0035 “0024 0006 0001 0022 0023 0002 \TJ free blocks remain 0030 0016 \‘v=i———————Number of blocks used -—-——————————Field number Extension name Filename Sample Figure 8-7 Directory Listing PIP by running B.4 MONITOR CORE USAGE DIAGRAMS The following illustrations through 7777 at Monitor show usage a. Monitor Time and User Time b. SAVE Command Processing (Figure 8-9) c. CALL Command Processing of locations (Figure 8-8) (Figure 3-10) 7777 7777 SYSTEMS I/O ROUTINE MONITOR HEAD SYSTEMS I/O MONITOR ROUTINE HEAD 7600 7600 MONITOR SERVICE USER AREA TELETYPE 7400 7400 SAVE COMMAND DECODER USER AREA AND PAGE STACK BUILDER 7200 7200 USER AREA X 7000 7000 (a) (b) Monitor-Time Core Usage Figure B-8 Monitor-Time vs User—Time Core Usage User-Time Core Usage 7000 .SAVE filename:core-specifications,...:entry—point 7777 SYSTEMS I/O SYSTEMS I/O MONITOR HEAD MONITOR HEAD STACK BUILT 7600 PAGE HERE MONITOR AND ‘ ROUTINES TTY NOW DESTROYED; STATUS REGISTERS ARE VARIOUS HELD PAGE DIRECTORYNAMEENTRYBUIDTHERE SERVICE ARE HERE. STACK MOVED HERE 7400 SAVE COMMAND DECODER AND PAGE BUFFER FOR DN SEARCH STACK BUILDER 7200 CODE HERE SYSTEM IS SWAPPED DEVICE OUT SCRATCH DN BLOCK SEARCH AND ROUTINE LOADED HERE TO BLOCK; UPDATE 7000 (a) "SAVE filename:" Processing (b) "Core—specifications,..;entrypoint" Processing 7777 SYSTEMS I/O SYSTEMS MONITOR HEAD MONITOR HEAD I/O 7600 BLOCK STACK BLOCK STACK PAGE STACK PAGE STACK 7500 7400 SAM BLOCK SEARCH AND UPDATE LOADED HERE (CREATE BLOCK STACK) ACTUAL ROUTINES SAVE (RETURNS ROUTINE TO LOADED MONITOR HERE START - 7600-WHEN FINISHED) 7200 SAM BUFFER SWAPPED-OUT CODE BROUGHT 7000 (c) SAM Search Figure 8-9 (d) Core Usage During Actual SAVE Save Time Command Execution BACK .CALL filename) .filename) or 7777 SYSTEMS I /o MONITOR HEAD 7600 BUFFER FOR DN AND SAM BLOCKS 7400 DN AND CALL: SAM SEARCH ROUTINES (LOCATE FILE AND DEFINE RANGE OF CALL) 7200 X 7000 (a) "CALL filename" Processing 7777 SYSTEMS I/O MONITOR HEAD 7600 READ ROUTINE (PERFORMS ACTUAL CALLING IN OF FILE; CAN DISAPPEAR AT USER TIME) 7400 CONTIGUOUS-PAGE PROGRAM: AREA IS NOT TOUCHED. THIS NONCONTIGUOUS-PAGE PROGRAM: SCATTER—GET READS CORE ALLOCATION (BLK 1) INTO HERE 7200 X 7000 (b) Figure B-lo Core Actual CALL Time Usage During CALL Command Execution MONITOR START SWAP OUT CORE (7200-7577) AND READ MONITOR SAVE YES WHOLE ? CORE NO EXPLICIT CALL ? YES ? NO YES SET NONSYSTEMPROGRAM SYSTEM PROG MOOEIND NO YES ? SET MODE SYSTEM INDICATOR NO CONSTRUCT PAGE LIST CONSTRUCT ENTRY POINT ADDRESS YES PROPER moo: ? YES L EXTRACT DN ENTRY READ SAM BLOCK YES F NO Figure 8-” Monitor Flow Chart (Part I) B-16 [READ YES NO IN ON SEARCH V BLOCKI FOR FILENAME 1 RE AD 100‘ (CORE ALLOC. LIST) INTO 7200 . A READ BLOCK 0F SAVE FILE mm PAGE man semen FOR on AN OLD VERSION 0‘ "'5 F'LE EXISTS AND IS EMPTY SLOT BEING OVER— WRITTEN av A NEW VERSION TYPE “Fuui' II ENTRY JUMP TO POINT ADDRESS WRITE our DN READ IN SAM Figure 8-” UPDATED. BLOCK BLOCK Monitor Flow Chart (Part 2) EXTRACT A SAM ENTRY BLOC K REQUIREMENTS TYPE 'FULL' SATIgFIED YES E NTRY CONTAIN O 7 YES DOES ENTRY CONTAIN FILE NO. OF FILE PICK UP PAGE FROM PAGE LIST 7777 YES 7 SET LINK WORD TO 0 BEING OVERWRITTEN ? NO WRITE BLOCK YES PICK UP BLOCK NUMBER FROM BLOCK LIST I PLACE FILE NUMKR OF FILE BEING SAVED INTO SAM ENTRY WRITE PAGE CONTENTS INTO BLOCK IF AN OLD FILE IS BEING OVERWRITTEN CONTINUE SEARCHING SAMS FOR OLD FILE NUMBER AND CHANGE TO 0 YES Figure 8-” Monitor Flow Chart (Part 3) APPENDIX C COMMAND DECODER Command Decoder is to read programs all system entered via the stored on the used program command and strings interpret and Command Decoder is generated Teletype keyboard. system device by System Builder. general-purpose a Command Decoder user four pages of in by a system program as follows. 1. 2. core file number of Command The block of the Command Decoder starting and is (see Figure C-1) internal is obtained. The Decoder called (filename=.CD.) (05) file is obtained. 20-DECtape lS-Disk, 3. by in to This block is then read into the second of the four pages Command Command is used Decoder Decoder. by position-independent and can be read into any four contiguous pages of core between locations 200 and 7577 inclusive. be 4. C.l Command Decoder is then entered by jumping location of page 2 (the first location is an LOCATIONS Locations 167 USED the second return). DECODER through 177, page 0, Page Location BY COMMAND to error are used as shown in Table C-l. Table C-l Locations Used by Command Decoder 0 Purpose - 167 Preloaded with 7777 if input and extension names are different. 170 Scratch location. 171 Scratch location. 172 Points to the first block of Command Decoder. 173 Scratch 174 Points device 175 Contains the its original output filenames and location. the output list. Information concerning each request is placed in this list by Command Decoder. to This location is not left exit from Command Decoder. option bits. state upon in 176 Scratch 177 Contains the address of the return from Command Decoder. location. 1 PAGE * IN * .. ’ PAGE 2 COMMAND ___________ TYPE __________ DECODER INIT TYPE OUT _ IF _ VALID READROUTINE ___________ FOR PAGES CHARACTER 3, FETCH AND 1, AND 4 ERROR ROUTINE __________ TYPE OUT RTE *"""“‘ "READ—BITOCK-E~ _I_N_T9 SEE}... _ 0N CHECK """""""" DISPATCH _________ PAGE 4 AND VALIDITY CK __________ ROUTINE 1 3 DEVICE LOOKUP OUT TYPEOUTS TIME PAGE I/O DEVICE CHECK ROUTINE _________ """"“‘ __ COMMA, CARRIAGE RETURN HANDLER ROTATE _ _R‘E“_D_]3_L.OC_K_E_ DECTAPE 1/0 ERROR DISPATCH BLOCK 2 BLOCK 1 BLOCK 3 BLOCK 4 CHECK FOR TIME 2 DEVICE BUFFER As ABOVE As ABOVE VALIDITY BLOCK 3A BLOCK 3 BLOCK 4 As ABOVE As ABOVE BLOCK 3 BLOCK 4 As ABOVE As ABOVE BLOCK 3 BLOCK 4 DN SEARCH ROUTINE """""""" TIME 3 BUFFER DIRECTORY UPDATE BLOCK 5 SAM BLOCK SEARCH ROUTINE (INPUT ONLY) READ IN BLOCK TIME 4 BUFFER 1 INTO PAGE 2 (OUTPUT ONLY) OPT - READ IN OPTION CHAR EXIT To USER BLOCK 6 Figure C-l Command Decoder Core Usage C-2 (Revised) FOR COMMAND INPUT AND OUTPUT REQUIREMENTS C.2 DECODER Location 174 (CDPTRP), the output list pointer, must point to a block of the code, length of which must be 3*n+l, where n is the total number of device requests expected. For example, a program with one file (Refer to output plus three input files requires 13 locations. Figure C-Z.) The option bit location (175) is Bits 0 and l constructed as follows: Contain output file extension code output is requested). (or if input, no 2 Bits and 3 Contain the input file extension. Bit 4 1 = Output file is expected (Command Decoder type *OUT- query (in addition to *IN-)). Bit 5 1 = Saved output file is a system program of word 4 in DN entry is set to 1). Bit 6 l = Option is available will 5 (bit (Command Decoder will type *0PT-). Bit Bits 0 1 7 Saved input file is a system program (bit 5 word 4 in DN entry is checked for a 1). = (Total number of input files allowed)-l. 8-11 2 l of 4 I 5 6 7 8 11 (Number of input files)—1 System/user inputz ‘— OPT - option -—-—System/user output2 Output option Input extension1 Output extension1 1Extension codes: 00 01 10 11 21 = System, 0 = User = ASCII = BINARY = FIC = BIN Saved file (USER,SYS) This option word must be Command Decoder. set up by the system program before calling first block of the Command Decoder is read into the second of the blocks into which it is to run. In the following examples, assume Command Decoder is to be run in locations 2000-2777; that you have already loaded FBLK with the first block number of the Command Decoder; output list is in 3000; return is at 203 and you are looking for user file file input, no *OPT- is desired, and output, system three input files are allowed. The four (Example 1 *1700 TAD (203 DCA 177 TAD (7622 DCA TAD DCA TAD 175 FBLK, 174 FBLK /POINTER To LIST 172 /BLOCK 1 OF .CD. (7642 /READ /BLOCK 1 OF COMMAND /INTO LOCATION 2200 /LINK /BAD READ 0 HLT I DECODER .+1 2201 Example (DISK) 167 I 0 2200 JMP /RETURN /111 110 010 010=BITS (3000 DCA CMA DCA JMS 3 » /ENTER .CD. 2 *2200 TAD (203 DCA 177 TAD DCA (7622 /RETURN /111 110 010 010=BITs 175 TAD (3000 DCA 174 FBLK 172 TAD DCA /POINTER To LIST /BLOCK .CD. 1 OF CMA DCA JMS FBLK, 1003 0 2200 ‘ 0 2200 167 I (7642 /READ AND RETURN THRU /ADDRESS IN ERROR RETURN /IF ERROR, OR ERROR RETURN /+1 IF CORRECT RETURN /NOTE THIS CODE OVER-WRITTEN IS FOR DISK OR DECTAPE: OUTPUT WORD A (OR INPUT I IF NO OUTPUT) WORD B DEVICE CODE INPUT I WORD A L- (OR INPUT 2 IF NO OUTPUT) WORD B INTERNAL FILE UNIT NUMBER NUMBER 0-7 {4 6 = System Device Not System Device = FOR TELETYPE OR HIGH SPEED READER: O 0 0 DEVICE CODE I = 2 = 0 = Teletype High Speed Reader NuII Device END OF LIST 7777 OPTION ASCII DISK OR DECTAPE (INPUT): CHARACTER START BLOCK NUMBER DISK OR DECTAPE (OUTPUT): 0 PAPER TA PE: 0 Figure C—2 Output List Produced by Command Decoder PAGE 2 (BLOCK 1) PAGE 2 (BLOCK I) (COMMA FOUND IN INPUT STRING) READ BLK 2 INTO PAGEI STORE LAST DEVICE/ NAME VALUE READ BLK 3 INTO PAGE 3 RELOCATE INDIRECT REFERENCES ON PAGES 1. 3, 4 PLACE n E PAGE PAGE I .- IN I AC ERROR (PAGE 4) (BLOCK 2) (BLOCK 2) TYPEX TYPE Mom»u GET CHARACTER TYPE CHARACTER WAIT FOR COMMA OR CARRIAGE RETURN Figure C-3 Command Decoder Flow Chart (Part I) PAGE \ (READ A CHARACTER FROM THE TELETYPE KEYBOARD) (BLOCK 2) SET U P COUNTERS AND POINTERS READ ONE CHARACTER CONTROL CHARACTER PAGE ‘ (BLOCK 2) ? PAGE 2 (BLOCK ‘) CONVERT TO G-BlT FORMAT (CARRIAGE ~° K"? ? 253:3" “WC" 2’ IN INPUT STRING) vzs STORE LAST DEVICE/NAME VALUE Figure C-3 Command Decoder Flow Chart (Part 2) PAGE 3 (BLOCK 3) ' READ BLOCK 5 INTO PAGE 2 CDPHA 2 DEVICE N0 "WE?“L'D pLAcE '7" ERROR m AC (PAGE 4) YES SET UP FILE NAME AND EXTENSION (DNSRCH) l on BLOCK SEARCH (PAGE 2 BLOCK 5) (CDNODN) no ”3"” ATTEMPT To MAKE NEW on ENTRY DIRECTORY FULL YES ' "' (PAGE 2, BLOCK 5) - YES PLACE IID' IN AC TYPE I?" ERROR (PAGE 4) NO YES READ BLOCK 6 INTO PAGE 2 PAGE 2 (BLOCK 6) Figure C-3 Command Decoder Flow Chart (Part 3) (DN BLOCK SEARCH) INITIALIZE AND POINTERS COUNTERS A (COIOX) READ DN BLOCK (PG 4 BLK 4) . SET INTERN NUMBER IN FILE AC Figure C-3 Command Decoder Flow Chart (Part 4) PAGE 2 (BLOCK 6) INITIAL|ZE CLEABRYOUTPUT LOCATION I m 115 ms: 2 “9'4”” " vzs SET UP TO READ BLOCK I (CDIOX) READ SAM BLOCK lNTO PAGE 1 a N0 FILE NUMBER MATCH PUT START BLOCK NUMBER 7 m AC END or LIST ? vas OPTION FLAG SET YES TYPE - ? *OPT¢' no GET OPTION CHARACTER FLIP SAMEuAsx RESET COUNTER EXI T TO USER l Figure C-3 TYPE n?- I Command Decoder Flow Chart (Part 5) PAGE 4 (BLOCK 4) PAGE 2 @ DEPOSIT CHARACTER FROM TYPE ROUTINE (BLOCK 5) CDNODN (MAKE DN ENTRY IF OUTPUT FILE) GET CHARACTER AC \ \ \ NO \ TYPE CARRIAGE LINE RETURN FEED CREATE TYPE CHARACTER NEW (DIRECTORY FULL) ON ENTRY IN SLOT WRITE OUT ON BLOCK PAGE 4 (BLOCK 4) GET INTERN, FILE NUMBER DECTAPE SIMULATE JMS DECTAPE SYSTEM I/O DEVICE SIMULATE JMS SYSIO Figure C-3 Command Decoder Flow Chart (Parf 6) APPENDIX D SYSTEM PROGRAMS D.l LOADING PARAMETERS Core Name FOR SYSTEM PROGRAMS Limits Entgx Point PIP 0-5177 1000 EDIT 0-3377 2600 PALD 0-7577 6200 FORT 0-1777 200 .FT. 200-7377 STBL 600-777 FOSL 0-1777 .OS. -0-5177 DIAG 200-1177 .DDT 200-4577 .SYM 200-4577 DDT 7200-7577 7200 REST 200-377 200 SAVE STATISTICS Name Save Command PIP SAVE PIP10-5177;1000 EDIT SAVE EDIT10—337732600 PALD SAVE PALD!0-7577;6200 FORT SAVE FORT!0-l777;200. .FT. SAVE .FT.!200-7377;0 STBL SAVE STBL!600;600 String Eggg Save Command FOSL SAVE FOSLIO-l777;200 .os. SAVE .OS.!0-5177;0 DIAG SAVE DIAGIZOO-11773200 REST SAVE REST1200-3777200 .DDT SAVE .DDT1200-457770 .SYM SAVE .SYM!200-4577;0 DDT SAVE DDTI7200-7577;0 String (User may assemble anywhere above location 4577) APPENDIX E 1/0 3.1 PROGRAMMING GENERAL The modular concept of input/output (I/O) handling of the disk system The system device 1/0 for easy maintenance and programming. provides be in field is found in the following places (all I/O routines must 0). routine Top page of field 0 (location 7642) which is the I/O used all by system programs for normal 1/0. A copy of this Block 0 of each page is on block 0 of the system device. DECtape is the DECtape I/O routine. 1. Interrupt versions of disk and DECtape routines 2. are in found PIP. E.2 by individual programs. Paper tape 1/0 is handled 3. CALLING SEQUENCE FOR BASIC I/O ROUTINE called as shown in I/O routine (see Paragraph E.1.1.) is two as determined bit 2 It is called in of the E—l. ways, Figure by function word. The basic ' 1. Normal The - (error). 1/0 routine For example, returns the to JMS+6 following (normal) routine or would JMS+5 read the The consecutive blocks from a file on system device. is initialized by putting the first block number of routine the desired file into location LINK. If an attempt is made read past the last block of the file, routine called ENDFIL. to an exit is made to a GETBLK, o TAD LINK SNA JMP (ENDFIL I I /GET LINK FROM LAST READ /IS THIS END OF FILE? /YES DCA BLOK JMS 3 BLOK, (7642 I 2. ROUTINE o /BUFFER ADDRESS BUFFAD LINK, /CALL DISK I/O /FUNCTION=READ o JMP I (ERROR JMP I GETBLK /ERROR RETURN address The 1/0 routine returns to the 12-bit Indirect the error return word+1 (normal) or the 12-bit address in - (ERROR). in the Calling Sequence JMS I Explanation Location SYSIO SYSIO BLOCK Block to be accessed CORE Low-order LINK Filled by READ, ERROR Error return RETURN Normal return *Function word: Bits 0-1 Bit 2 Bits 3-5 Bits 6-8 Bits 9-11 Figure E.3 The GENERALIZED user points or E-l to I/O address core used by WRITE here here unused 0, normal return a indirect return at end of 1, to in error address+l read/write return unit no. if DECtape or RF08 disk = field READ function: memory = 3; WRITE = 5 Calling Sequence of System Routine DISK/DECTAPE I/O system programs may ROUTINE use The calling sequence Appendix C. used by the basic I/O routine, explained below. the to I/O generalized routine is the this except for certain in that restrictions routine same as The Command Decoder must be called as shown in Examples 1 and 2 in Section The C.2. entry point for the generalized I/O routine is the first location of the Command Decoder plus 603(octal) locations, i.e., in the previously mentioned examples the entry point would be at location 2603. The generalized I/O routine uses location 0171 on This zero. page location must contain the address which points to the I/O list created If the JMS instruction which calls the by the Command Decoder. routine is at an even numbered location, location 0171 must point to Word B (refer to Appendix C) of a Command Decoder list entry. If the JMS is at an odd numbered location, location 0171 must point to word A of a Command Decoder list The contents of Word A then entry. determines whether the DECtape or system device will be used. The contents of the function word in the ‘calling sequence determine be read from or written on the selected is to whether information device and DECtape unit (if applicable) as shown in Figure E-l. The following examples illustrate the use of the I/O generalized It is assumed that the Command Decoder was called and placed routine. in locations 2000-2777, and that its list begins at location 3000. 4312 0000 6007 0065 7777 0215 3000 3001 3002 3003 3004 3005 300 301 302 303 304 305 171 377 The 160 - _ (Word A) (Word B) Output device (Word A) Input (Word B) file Option carriage - internal - file - DECtape #3, #12 system device, internal #7, starting return was JMS 2603 ENTRY 4777 0003 0065 7200 0000 7402 3002 2603 block6 typed (2603 4777 0305 0160 7000 0161 7402 3001 I FUNCTION WORD BLOCK NR BUFFER ADDRESS LINK NR ERROR HALT POINT above code writes the contents of locations 7000-7177 of DECtape unit 3 and writes link word of 161. 501 502 503 504 505 506 171 577 at JMS onto block (2603) I FUNCTION BLOCK NR BUFFER ADDRESS NR LINK ERROR HALT EN#RY POINT of the above code reads the contents of block 65 system device into locations 7200-7377 and places the link to the next block of this file in location 505. The NOTE of disk the two versions There are Monitor head (Block 0) for the DF32. One non-S/S (Version A) is used for all 4K, the and other (Version B) for systems The distinguishing everything else. between the two is the fact difference read disk that version A does only one one for block gtransfer (i.e., every disk revolution), compared with two disk reads block with Version B (one to per the fetch link read the block, one to This is word into field 0). memory used necessary because of the technique in Version A word to fetch the link on the (switching DATA-BREAK pointers - fly) which would not be used in Version (the PDP-8/S is too slow and altering the extended memory register on the fly in 8K an machine lead to may transmission errors) B . E-3 APPENDIX F VALID the the valid I/O Device Combinations for RFO8 Disk, and the DECtape Systems). The Table below illustrates three system devices I/O DEVICES (DF32 Disk, Table F-l Valid IN/OUT Devices (Star for indicates valid EDIT PAL-D, device designation) 0 0 I/O ‘1’ 5 E g: a, E s I m E a g ,1; g ,3 a a DEV SYS DEVIC T: R: DF32 * * RF08 * * S:name v 5 c I m m * N/A N/A N/A N/A * * * N/A N/A N/A N/A * * Same as DECTAPE * * Sfl * Same as D” F—2 Table Valid FORTRAN-D INPUT/OUTPUT l: u O b I. .. “f .. 2% 3 ‘3‘ 5' é: a? DF32 * * * N/A N/A N/A N/A RF08 * * * * N/A N/A N/A TAPE * * * N/A N/A * N/A :3 m Table F-3 VALID I/o EV I/O .. .. B m g “sf m a. n SYS FOR PIP DEVICES DEV G E t”: g E: 5 a Q 3 m n DF32 * * * N/A N/A * * RFflS * * *1 * * * * DECTAPE * * * N/A N/A * * 1The designation "3:" may not be used in place of "S¢:" when deleting files and listing directories. This is a‘temporary restriction. APPENDIX PERMANENT The following instruction the are most SYMBOL TABLES commonly that For set. G used they reason elements of PDP-8 the found in the permanent are These instructions are symbol table within the assemblers. already defined within the additional information on these For computer. and for a instructions used when description of the symbols programming HANDBOOK, Times G.l shown below INSTRUCTION Mnemonic I/O optional, other, available devices, from the DEC Software representative are the see SMALL COMPUTER Distribution Center. of the PDP-8/E. CODES Code Time Operation (usec.) Memory Reference Instructions AND TAD 0000 1000 DCA 2000 3000 JMS 4000 JMP 5000 Mnemonic Code 152 Logical AND Two's complement add Increment and skip if Deposit and clear AC Jump to subroutine Jump Operation Group 1 Operate Microinstructions microseconds.) OPR NOP IAC RAL RTL RAR RTR CML CMA CLL CLA zero 7000 Same 7000 7001 7004 7006 7010 7012 7020 7040 7100 7200 No as (1 cycle) Seguence (1 cycle is equal NOP operation Increment Rotate AC Rotate AC Rotate AC AC and link left one and link left two and link right one Rotate AC and link right two Complemented link Complement Clear link Clear AC AC 2.6 2.6 2.6 2.6 2.6 1.2 — — 3 4 4 4 4 2 2 1 1 to 1.2 Mnemonic Code Operation Group 2 Operate Microinstructions 7402 7404 7410 7420 7430 7440 7450 7500 7510 HLT OSR SKP SNL SZL SZA SNA SMA SPA Seguence (1 cycle) Halts the computer Inclusive 0R SR with AC HHHwa Skip unconditionally Skip on nonzero link Skip on zero link Skip on zero AC Skip on nonzero AC Skip on minus AC Skip on positive AC (zero is positive) Combined Operate Microinstructions CIA STL GLK STA ms Internal 7041 7120 7204 Complement 7240 Set AC 7604 Load AC with IOT IOT ION IOF and increment AC link to 1 Get link (put link in AC, bit 11) Set to 1 SR NHI-‘N usu th w Microinstructions 6000 6001 6002 Turn interrupt processor on interrupt processor Disable Keyboard/Reader (1 cycle) KSF 6031 Skip KRB 6036 Clear AC, TSF 6044 TLS 6046 High Speed Reader RSF RFC 6011 6012 6014 High Speed Punch PSF PCP PPC 6021 6022 6024 RRB PLS (l cycle) 6041 6042 TPC 6026 keyboard/reader flag read keyboard buffer (dynamic), clear keyboard flags Teleprinter/Punch TCF on Skip on teleprinter/punch flag teleprinter/punch flag Load teleprinter/punch and print Load teleprinter/punch, print, and clear teleprinter/punch flag Clear -- Type PR8/E (1 cycle) Skip on reader flag Read reader buffer and clear reader flag Clear flag and buffer and fetch character -- Type PPB/E (1 cycle) Skip on punch flag Clear flag and buffer Load punch buffer and punch character Clear flag and buffer, load buffer and punch character G-2 Mnemonic Code Time Operation (usec.) DECtape Transport Type TUS and DECtape Control Type TC08 DTRA 6761 DTCA 6762 DTXA DTSF 6764 6771 DTRB 6772 2.6 2.6 2.6 error flag is l or if DECtape control flag is l Read status register B Load status register B 2.6 2.6 2.6 Skip if , DTLB Read status register A Clear status register A Load status register A 6774 Disk File and Control, DCMA 6601 DMAR 6603 DMAW 6605 DCEA 6611 DSAC‘ DEAL 6612 6615 DEAC 6616 DFSE 6621 DFSC 6622 6626 DMAC Type DF32D Clear disk memory address reg2.6 ister, and interrupt flags Load disk memory address reg3.6 ister and read Load disk memory address reg3.6 ister and write Clear disk extended address reg- 2.6 ister and memory address extension 2.6 Skip on address confirmed flag Load disk extended address and 3.6 memory address extension Read disk extended address reg3.6 ister 2.6 Skip on zero error flag 2.6 Skip on data completion flag Read disk memory address reg3.6 ister Memory Extension Control, Type MC8/E (1 cycle) field N instruction field N Read data field data RDF 62N1 62N2 6214 RIF 6224 Read RIB RMF 6234 6244 Read interrupt buffer Restore memory field 6.2 PSEUDO-OPERATORS CDF CIF Change Change to to ' instruction field The following is a list of the 4K PAL-D assembler pseudo-ops. section consists of those pseudo-ops which have counterparts in first the other assemblers. The DECIMAL OCTAL FIELD PAUSE I Z $ EXPUNGE FIXTAB PAGE * XLIST TEXT G-3 INDEX ACCEPT (FORTRAN), 3-12 (<>), A 3-6 option, PIP, APPEND ASCII Device assignments FORTRAN D, Device layouts, B-l DeVice names, 2+5 3-45, 3—46 Diagnose program, 3-31 statement Angle brackets 3-12 command, B-9 code, Assemble and Assembler, 8K SABR, PAL-D, Asterisk Binary B—6 format, 3-3 3-19 (*) Disk/DECtape I/O routines, Disk Disk Disk Disk 2-2 usage, Binary file data structure, 2-8 Binary Loader, error 3-35 Diagnostics, FORTRAN compiler, B—5 Directory Name (DN) blocks, 3-60 Restore, save B—9 DO multisection, D E-2 monitor head, storage E-3 B-2 layout, 2—8 system binary loader, A-Z System Builder program, 3-20 (dollar sign), $ 2—10 messages, tape copy, 3-31 loops, FORTRAN D, option, PIP, 3-4, 3-32 3-7 3-8 Editor program, 3-10 command summary, 3-12 B-3 Blocks, Bootstrapping Monitor, 2-2 Restore program, 8K SABR assembler, 3-3 Entry point of saved program, 3—12 Equal sign (=), 3-62 3-6 option, PIP, 3-53, 3-55 Breakpoints, B Equipment requirements, 2-13 l-l Error messages, 2-14 CALL command, 2—6 Characters, special control, Colon (z) usage, 2-6, 2-11, 3-12 Command Decoder program (.CD), 2-4, C—1, C—2, E-2 Commands, 3-56 DDT-D, 3-12 Editor, strings, 2—7 examples, 2-4 format, 3-46 Example programs, FORTRAN, through 3—52 Examples, FORTRAN operating FORTRAN 3-34 2—12 D, specifications, 2-11, B-13, B—l4, B-lS 2-6 characters, structure of Debugging usage, files, FORTRAN B-9 3-15 pseudo-op, (DDT—D), 3-20 DECtape storage layout, DEFINE statement Deletion mode, summary, 3-29 (FORTRAN Operating System Loader), 3-40 Functions, 3-19 Assembler, 3-30 FORTRAN, Hardware, l-l B-4 (FORTRAN), Editor, 3-17 3-21 3-28 D, statement FOSL programs A-2 3-20 4K PAL—D Disk DECIMAL 2-6, binary files data structure, B-9 3-38 compilation diagnostics, compiler system diagnostics, 3-35 3-30 functions, 3-42 operating system examples, 3-56 commands, pseudo—op, FORTRAN 2-2 CTRL/C, 3-12 CTRL/TAB, 3-11 CTRL/U, Data (1) File merging, 3-7 Filenames, 2-5, 2-11 FIXTAB pseudo—op, 3-20 Floating point instructions, F option, PIP, 3-6 Form feed, 3-11 usage, DDT-D 3—42 Failsafe operation, FIELD B—lO 2-6 Control characters, Core capacities, B-5 CTRL 2-15 Executing Disk System Builder, EXPUNGE pseudo-op, 3-20 Extensions to filenames, 2-5 Comma (,) 3-33 Compiler, FORTRAN-D, 3-38 compilation diagnostics, 3-35 system diagnostics, Contiguous-page save file format, Core 3-12 3-27 3-26, 2—11 2-6 2-6 usage, Core Escape, system, punctuation, locations, Errors, 3-25, system, Exclamation point Command Core 2-10 Binary Loader, PAL-D, 3-30 Hardware write INDEX-l lock, 3-5 Header of Hyphen (-) 2-1 Monitor, usage, Options, Editor, 2-6 3-17 3-61 program, OUTPUT command, 3-13 Restore Input/Output, Command Decoder requirements, C-3 Command Decoder system routine, E-2 F-l devices, E-2 disk/DECtape routines, FORTRAN statements, 3-30 PAL-D devices, 3-23 E-l programming, I 3-20 (pseudo-op), Key functions, Editor, Line Feed, 3-11 compatability, error 3-12 3-12 directory listing, FORTRAN FORTRAN in RF08 program, 3-2 2-8 programs, system programs, Loading and saving, 3-57 DDT-D, Editor, PAL-D, A-2 3-33 compiler, Operating System, library P 3-40 Pseudo-operators, PAL-D, A-4 3-20 3-7 B-13 Relocatable 3-3 3~60 RF08 system using PIP, loader, A-l RUBOUT key, 2—3, 2-6, 3-10 RIM specification, binary tape copy, 3—11 used in FORTRAN ACCEPT statement, 3-31 3-8 of files, 2-5 3-13 command, Noncontiguous pages, ' » SABR assembler, SAM£(Storage B-lO, B-ll SAVE Save entries, FORTRAN-D object DDT-D, 3-43 Saving system programs, Semicolon usage, compiler, 3-34 Operating system (FORTRAN), 3—43, 3-44 diagnostics, 2-1 Operation of monitor, 3-40 blocks, B-3 Editor, 3-23 PAL-D, 3-61 Restore, Map) command. 2-10, 2-13, files data structure, Saving 3-58 3-16 3-41 FORTRAN, 3-3 Allocation B-7 block 3-20 (pseudo-op). 3-2 Operating PIP, Operating procedures, OCTAL FORTRAN 1-1 equipment, Restore program, RETURN key, 2-6 2-12 NEXT 3-30 binary-coded tapes, Requirements, 2-1 2-4 3-12 2-15 statement (FORTRAN), A-3 Rebuilding monitor, 3-55 Registers in DDT-D, Memory reference instructions, Multi—section strings, READ 3-3, 3-7 3-15 speed reader, core command, Read errors, D-l Monitor core usage, Monitor mode, 2-2 Monitor operation, M option, PIP, 3—5 3—20 Queries from system programs, READ Merging of files, 3-5 3-1 Punched output, 3—15 Punctuation in command 2—6 option, PIP, Multiple—page 3-3 options, option, PIP, 3-1 3—16 3-22 programs, B-12 3-10 system, Program library, Loading parameters for system Names 3-2 PIP, A-2 loader, Disk System Builder, Low 3-26, 3-20 pseudo-operators, PAUSE (pseudo-op), 3-20 PDP-8 instruction set, G-l Period (.), 3-11 BIN L 3-25, messages, 3-27 Loading, PIP, 3-20 3-19 3-19 Peripheral Interchange Program see PIP (PIP), Permanent symbol tables, G-l command, LIST PAGE (pseudo-op), PAL-D Assembler, (7) 3-1 B—9 programs, A-4 2-6 Single-page core specification, Slash (/), 3-12 1—1 Software, S option, PIP, 3-6, 3-7 Source File data INDEX-2 structure, B-9 2-11 Spaces 2-7 in command strings, 2—5 in filename, 2-6 Special characters, 2—14 Start condition, 2—3 Starting Monitor, 2-1 Storage, Storage allocation map blocks, Symbol table, PAL—D, 2-2 System Builder, B-5 2-15 3-35 D, capabilities, device messages, errors, FORTRAN error B-l formats, A—l generation, load and save programs, programs, D—l system restore, 3-60 3-17 Tabs, Tape preparation, 3-15 3-20 TEXT, TRAILER ¢ A-4 2-2 modes, U B-7 3-39 3-24 Symbolprint program, 3-13 command, 3-6 option, PIP, 2-6, usage, (Up-arrow) core User symbol table, usage, 2-2 User mode, Write errors, 3-24 B-l3 User 3-59 2-15 3-6 PIP, 3-30 (FORTRAN), Write-lock switch, WRITE Statement XLIST (pseudo-op), Z (pseudo-op): 3-20 3-20 INDEX-3 HOW TO OBTAIN SOFTWARE NEWSLETTERS, MAILING SOFTWARE INFORMATION LIST Communications Group, located at corporate headquarters in publishes newsletters and Software Performance Summaries (SP8) Newsletters are published monthly, for the various Digital products. and contain announcements of new and reVISed software, programming notes, software problems and solutions, and documentation corrections. Software Performance Summaries are a collection of existing problems and solutions for a given software system, and are published periodi— Software The Maynard, cally. to get information on the distribution of these documents the software newsletter mailing list, write to: For on Software P. O. how Communications Box F Maynard, Massachusetts SOFTWARE and 01754 PROBLEMS or problems relating to Digital's software should be reported A specialist is located in each Software Support Specialist. In Europe, software problem Digital Sales Office in the United States. reporting centers are in the following cities. Questions to a Reading, England Milan, Paris, France The Hague, Holland Solna, Sweden Geneva, Switzerland Tel Aviv, Israel Munich, Italy West Germany Software Problem Report (SPR) forms are available from the from the Software Distribution Centers cited below. specialists or PROGRAMS AND MANUALS Software and manuals should be the United States, send orders ordered by title and order number. to the nearest distribution center. In Digital Equipment Corporation Digital Equipment Corporation Software Distribution Center 146 Main Street 01754 Maynard, Massachusetts Software Distribution Center 1400 Terra Bella 94043 Mountain View, California Outside of the United States, orders should be directed to the nearest Sales Office or representative. Digital Field USERS SOCIETY Digital Equipment Computer Users Society, maintains a user excenter for user-written programs and technical application information. A catalog of existing programs is available. The society DECUS, change publishes a society and and holds technical seminars in the and Australia. For information.on the application forms, write to: periodical, DECUSCOPE, United States, Canada, Europe, membership DECUS DECUS Digital Equipment Corporation Digital Equipment, 146 Main Street Maynard, Massachusetts 81 Route de 1211 Geneva Switzerland 01754 lfAire 26 S.A. 4K Disk Monitor System DEC-08-0DSMA-A—D READER'S COMMENTS NOTE: This form is for document comments only. Problems with software should be reported on a Software Problem Report (SPR) form (see the HOW TO OBTAIN ‘ SOFTWARE Did you find errors INFORMATION page). in this manual? If so, Did you find this manual understandable, Please make suggestions for improvement. specify by usable, and page. well-organized? there sufficient documentation on associated system programs use of the software described in this manual? If not, what material is missing and where should it be placed? Is required for Please indicate the type of user/reader that you most nearly represent. Assembly language programmer Name DDD Higher—level language programmer Occasional programmer (experienced) User with little programming experience Student programmer. Non-programmer interested in computer concepts and capabilities X Date organization Street City State ’ Zip Code or Country If you do not require a written reply, please check here. [3 Fold Here Do Not Tear - Fold Here and Staple FIRST CLASS PERMIT NO. 33 MAYNARD, MASS. BUSINESS REPLY MAIL NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STATES Postage will be paid by: Software P. O. Box Communications 1“ Maynard, Massachusetts 01754
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies