Digital PDFs
Documents
Guest
Register
Log In
DEC-T8-MRFB-D
September 1970
136 pages
Original
3.4MB
view
download
Document:
UserGde Feb70
Order Number:
DEC-T8-MRFB-D
Revision:
0
Pages:
136
Original Filename:
DEC-T8-MRFB-D_UserGde_Feb70.pdf
OCR Text
TSS/8 TIME-SHARING SYSTEM USER'S GUIDE For additional copies, order No. DEC-TS-MRFB-D from Program Library, Digital Equipment Corporation, Maynard, Massachusetts 01754. DIGITAL EQUIPMENT Price $3.00 CORPORATION • MAYNARD, MASSACHUSETTS 1st Printing September 1968 2nd Printing March 1969 3rd Printing (Rev) February 1970 Your attention is invited to the last two pages of this manual. The Reader's Comments page, when filled in and returned, is beneficial to both you and DEC. All comments received are considered when documenting subsequent manuals, and when assistance is required, a knowledgeable DEC representative will contact you. The Software Information page offers you a means of keeping up to date with DEC's software. Copyright © 1968, 1969, 1970 by Digital Equipment Corporation The 'l"aterial in th,s manual,s for information purposes and is subject to change without notice. The following are trademarks of Digital Equipment Corporation, Maynard, Massachusetts: DEC FLIP CHIP DIGITAL PDP FOCAL COMPUTER LAB CONTENTS Page CHAPTER 1 INTRODUCTION 1.1 General Description 1-1 1.2 User Programs 1-1 1.3 User Files 1-2 1.4 TSS/8 User Console 1-2 1.4. 1 Power Control Knob 1-3 1.4.2 Printer 1-3 1.4.3 Keyboard 1-4 1.4.4 Paper-Tape Reader and Punch 1-4 1.4.5 Positioning Tape in the Tape Reader 1-5 1.5 Use of This Manual 1-5 CHAPTER 2 ELEMENTARY MONITOR COMMANDS 2.1 Calling Monitor 2-1 2.2 Logging In on TSS/8 2-2 2.3 Logging Out of TSS/8 2-4 2.4 System Library Program Control 2-4 2.5 Communication with other Users 2-5 2.6 System Status Reports 2-6 2.7 Resource Sharing 2-6 2.8 Error Messages 2-9 CHAPTER 3 DESCRIPTION OF TSS/8 SYSTEM LIBRARY PROGRAMS AND THE INTERACTIVE LANGUAGES 3.1 Introduction 3-1 3.2 General Characteristics of System Library Programs 3-1 3.2. 1 Controll ing the Execution of System Library Programs 3-3 3.2.2 Returning to Monitor 3-4 3.2.3 Additional Manuals 3-4 3.3 BASIC-8 3-5 3.3.1 Example of a BASIC-8 Program 3-6 3.3. 2 Summary of BASIC -8 Statements 3-7 3.3.3 Functions 3-8 3.3.4 Complex Functions 3-9 3.3.5 Summary of Edit and Control Commands 3-9 iii CONTENTS (Cont) Page 3.3.6 Error Messages 3-10 3.3.7 Implementation Notes 3-12 3.4 FOCAL 3-13 3.4. 1 FOCAL Command and Operation Summary 3-13 3.4.2 FOCAL Operations 3-15 3.4.3 Mathematical Functions 3-16 3.4.4 Control Characters 3-16 3.4.5 Reading FOCAL Paper Tapes 3-17 3.4.6 FOCAL Error Messages 3-17 CHAPTER 4 FORTRAN-D COMPILER 4.1 Introduction to TSS/8 FORTRAN 4-1 4.2 Calling and Using FORTRAN-D 4-1 4.3 FORTRAN I/O 4-2 4.4 Examples of FORTRAN Programs 4-3 4.5 Summary of FORTRAN-D Statements 4-5 4.6 FORTRAN-D Compiler Systems Diagnostics 4-6 4.7 FORTRAN-D Compiler Compilation Diagnostics 4-7 4.8 FORTRAN-D Operating System Diagnostics 4-8 CHAPTER 5 PAL-D ASSEMBLER 5.1 Introduction to PAL-D 5-1 5.2 TSS/8 PAL-D 5-1 5.3 Example of a PAL-D Program 5-2 5.4 Symbol List for TSS/8 5-3 5.5 Error Diagnostics 5-6 CHAPTER 6 UTILITY PROGRAMS 6.1 EDIT 6-1 6.1.1 Summary of Symbolic Editor Operations 6-2 6. 1 .2 EDIT Command Summary 6-3 6.2 LOADER 6-4 6.3 ODT (Octal Debugging Technique) 6-5 6.3.1 Programming Notes 6-6 iv CONTENTS (Cont) Page 6.3.2 ODT Command Summary 6-6 6.4 CAT 6-7 6.4.1 Example of CAT Usage 6-7 6.5 SYSTAT (System Status) 6-8 6.5.1 Example of SYSTAT Usage 6-8 CHAPTER 7 PROGRAMS FOR PAPER TAPE AND DECTAPE CONTROL 7.1 PIP (Peripheral Interchange Program) 7-1 7. 1. 1 PIP Conventions 7-1 7.1.2 Using PIP to Load a Paper Tape to a Disk File 7-1 7.1.3 Using PIP to Punch Out a Disk File 7-2 7.1.4 Using PIP with the High-Speed Reader and Punch 7-2 7.1.5 Using PIP to Transfer BIN Format Files 7-3 7.1.6 Moving Disk Files 7-3 7.1.7 Deleting Disk Files 7-3 7.1.8 Transferring BASIC-8 Files 7-4 7.1.9 Transferring SAVE Format Fi les 7-4 7.1.10 Summary of PIP Options 7-5 7.2 COpy 7-5 7.2.1 Using and Calling COPY 7-5 7.2.2 Loading Files from DECtape 7-6 7.2.3 Saving Disk Files on DECtape 7-7 7.2.4 Listing Directories 7-7 7.2.5 Deleting Files 7-7 7.2.6 Deleting All Files on a Device 7-8 7.2.7 Summary of COPY Options 7-8 7.2.8 Example of COPY Usage 7-9 CHAPTER 8 ADVANCED MONITOR COMMANDS 8. 1 Introduction 8-1 8. 2 Control of User Programs 8-2 8.3 Defining Disk Files 8-3 8.3.1 Creating a Disk File 8-3 8.3.2 Opening and Closing a File 8-3 v CONTENTS (Cont) Page 8.3.3 Extending, Reducing, and Renaming a Disk File 8-4 8.3.4 Protection Codes 8-4 8.3.5 Error Conditions 8-6 8.4 Saving and Restoring User Programs 8-6 8.5 Utility Commands 8-8 CHAPTER 9 WRITING ASSEMBLY LANGUAGE PROGRAMS FOR TSS/8 9.1 Introduction 9-1 9.2 Console I/O 9-2 9.3 Fi les and Disk I/O 9-4 9.4 Assignable Devices 9-9 9.5 Program Control 9-12 9.6 Program and System Status 9-13 9.7 PDP-8 Compatibility 9-16 APPENDIX A TSS/8 CHARACTER SET APPENDIX B SUMMARY OF MONITOR COMMANDS APPENDIX C SUMMARY OF lOT INSTRUCTIONS APPENDIX D OFF-LINE TAPE PREPARATION AND EDITING APPENDIX E SYSTEM CONFIGURATION AND OPTIONAL HARDWARE APPENDIX F STORAGE ALLOCATION APPENDIX G GLOSSARY OF ABBREVIATIONS AND TERMS TABLES 2-1 Monitor Error Messages 2-10 3-1 Summary of BASIC-8 Statements 3-7 3-2 Summary of BASIC Edit and Control Commands 3-10 3-3 FOCAL Command and Operation Summary 3-13 vi TABLES (Cont) Page 4-1 Summary of FORTRAN-D Statements 4-5 4-2 FORTRAN-D Compiler Systems Diagnostics 4-6 4-3 FORTRAN-D Compiler Compilation Diagnostics 4-7 4-4 FORTRAN-D Operati'1g System Diagnostics 4-8 5-1 Symbol List for TSS/8 5-3 5-2 PAL-D Error Diagnostics 5-6 6-1 Summary of Symboli c Editor Operations 6-2 6-2 EDIT Command Summary 6-3 6-3 ODT Command Summary 6-6 ILLUSTRATIONS 1-1 User Console 1-3 1-2 Console Keyboard 1-4 E-1 Reader/punch E-2 E-2 Transport E-3 vii PREFACE The TSS/8 User's Guide is a console-oriented manual, written especially for the student, technician, engineer, or scientist. This manual presents a functional overview of the operation of TSS/8 (sometimes called Time Shared-8) from the user's viewpoint, with precise instructions on how to make efficient use of the TSS/8 system. In particular, the first section is intended to introduce the new user to TSS/8 and provide some insights on how TSS/8 enables a single computer to efficiently service the differing needs of many users simultaneously. In later sections, Monitor commands are explained in detail, and illustrated by actual examples. Full descriptions of a number of System Library Programs are also presented. The user of this Guide can be certain that the system operates exactly as explained because each operation has been verified on TSS/8, with the actual printout included herein. Documents referenced (available from DEC's Program Library): TSS/8 System Manoger's Guide, DEC-T8-MBZA-D Introduction to Programming, C-18 Paper Tape System User's Guide, DEC-08-NGCC-D FOCAL-8 Programming Manual, DEC-08-AJAD-D BASIC-8 Programming Manual, DEC-T8-KJZA-D Symbol i c Editor, Programmer's Reference Manual, DEC-08-ESAB-D PAL-D Assembler, Programmer's Reference Manual, DEC-D8-ASAB-D 4K FORTRAN, Programmer's Reference Manua I, DEC-08-AFCO-D KT08/I Time-Sharing Option, DEC-8I-H-8NA-D ix CHAPTER 1 INTRODUCTION 1.1 GENERAL DESCRIPTION TSS/8 (Time-Sharing System for the PDP-8/1 and -8 Computers) is a general-purpose, time-sharing system offering up to 16 users (24 in certain applications) a comprehensive library of System Programs. These programs provide facilities for editing, assembling, compiling, debugging, loading, saving, calling, and executing user programs on-line. Two conversational, interactive systems, FOCAL-8 and BASIC-8t are also included. By separating the central processing operations from time-consuming interactions with human users, the computer can, in effect, work on a number of programs simultaneously. Cycling between programs and giving only a fraction of a second at a time to each program or task, the computer can deal with many users seemingly at once. The appearance is created that each user has the computer to himself. The execution of various programs is done without their interfering with each other and without lengthy delays in the respanse to individual users. The heart of TSS/8 is a complex of subprograms called the Monitor. Monitor coordinates the operations of the various programs and user consoles, ensuring that the user is in contact at all times with his program. Monitor allocates the time and services of the computer to the various users; it grants a slice of processing (computing) time to each job, and schedules jobs in sequential order to make most efficient use of the system device (disk). Monitor handles user requests for hardware operations (reader, punch, etc.), swaps (moves) programs between memory and disk, and manages the user's private files. 1.2 USER PROGRAMS When the user is working on a program with TSS/8, his work exists in the computer as though he had his own 4K (4096 word) PDP-8. Several users can run programs at virtually the same time, because TSS/8 Monitor controls the scheduling of execution times. Monitor brings a program into core from the disk, allows it to execute for a short time, and takes note of the state at which execution is stopped. Monitor then brings the next user program into core, and repeats the process. The user is allotted a 4K block of storage that contains his particular tFOCAL-8 (FOrmula CALculator) is an on-line conversational program developed by DEC. BASIC-8 is a slightly modified version of the algebraic language originally developed at Dartmouth College. 1-1 program; this 4K block will be swapped from core onto a 4K area of disk storage when it is necessary for Monitor to bring in another program to run. After the user's program has been executed, for a period of time it is placed at the end of the queue (line) of user programs waiting to run. If only one program is ready to run, it is allowed to do so withaut interruption until another program is ready. If a user wishes to maintain a permanent copy of his program, it is necessary to save a copy within the file area of the disk (an area separate from the swapping area). Later sections of this manual describe the procedures to create and update such fi les • 1 .3 USER FILES A TSS/8 user is any person logged in on TSS/8. Each user has an account number and password assigned to him by the installation manager or the person responsible for his particular TSS/8; the account number and password allows the user access to the computer. His account number is also used to identify whatever fi les the user may own within the TSS/8 file system. The disk (a large external memory device used for storage of programs and data) is divided into logical areas called files. A user can create files and store them in the file storage area of disk. The user can also specify which groups of users may access his files and for what purpose (read, write, or both). Parts of the disk are used to store System Files; those programs which are accessible to anyone using the computer. A major portion of this manual deals with haw to use System Files, generally referred to as System Library Programs. With the appropriate Monitor commands, the user can create new files and manipulate old files (extend, reduce or delete them). These commands are explained in Chapter 8. Most individual System Library Programs are able to handle user files as input or output with commands issued at the user's consale. 1.4 TSS/8 USER CONSOLE The user's console is a model 33 ASR Teletype® (Figure 1-1). The consale keyboard (Figure 1-2) allows the user to communicate with his programs and Monitor. The paper-tape reader and punch are for paper-tape input and output, while the teleprinter provides a typed copy of user input as well as program and Monitor output. The Teletype controls are described here as they apply to the operation of the computer. Off-line operations are explained in Appendix D. ® Teletype is a registered trademark of the Teletype Corporation. 1-2 - --- - --- ----- - --, .. "d I OFF REL. B. SP. ON START STOP - - - ! I i... FREE - OFF LINE Figure 1-1 1.4.1 0 LOCAL User Console Power Control Knob The following is a description of settings on the power control knob. Function 1.4.2 LINE The Teletype is energized and connected to the computer as an input/output device, under computer control. OFF The Teletype is deactivated. LOCAL The Teletype is activated for off-I ine operation. Printer The printer provides a typed copy of input and output at a maximum rate of 10 characters per second. 1-3 1 .4.3 Keyboard The console keyboard is similar to a typewriter keyboard. However, certain operational functions are shown on the upper part of some of the key tops. These functions are activated by holding down the CTRL key while depressing the desired key. For example, when using the Symbolic Editor, CTRL/FORM causes Editor to enter command mode. Although the left and right square brackets are not visible on the keyboard key tops, they are shown in Figure 1-2 and are generated by typing SHIFT/K and SHIFT/M, respectively. Also, the ALT MODE key is identified as ESC (ESCape) on some keyboards. C)C)C)C)G)C)OG)G)G)C)O® @G)G)tV~®OG)CV~®@@ 8G)~@G)evQQCD~c)@88 8G)G)G)G)G)CDCDC)Oo8 SPACE Figure 1-2 Console Keyboard 1.4.4 Paper-Tape Reader and Punch The paper-tape reader is used to input (to a user program) data punched on eight-channel perforated paper tape at a rate of 10 choracters per second (maximum). The reader control settings are shown in Figure 1-1 and described below: Control Function START Activates the reader; reader sprocket wheel is engaged and operative. STOP Deactivates the reader; reader sprocket wheel is engaged but not operative. FREE Deactivates the reader; reader sprocket wheel is disengaged. NOTE The high-speed reader and punch are described in Append;x E. 1-4 1.4.5 Positioning Tape in the Tape Reader The following procedure describes how to properly position paper tape in the low-speed reader. a. Raise the tape retainer cover. b. Set reader control to FREE. c. Position tape to fit in the carrier and over sprocket wheels. d. Close the tape retainer cover. e. Tape should be able to be drawn through low-speed reader in either direction while the control is set to FREE. 1.5 USE OF THIS MANUAL At this paint, the user has a general understanding of time-sharing and how it is done. The following chapters describe haw to use the system, and include summaries of the various System Library Programs available and haw to use them. Chapter 2 describes the elementary Monitor commands every user will require. Chapter 3, Section 3.1 describes the System Library. Section 3.1 assists the user in learning to gain access to (in computer jargon "to access") files and control execution, and includes a list of more detailed manuals on each of the TSS/8 System library Programs. A glossary of terms and an Index appears at the end of this manual. 1-5 CHAPTER 2 ELEMENTARY MONITOR COMMANDS TSS/8 offers the user a variety of hardware and software resources. The TSS/8 Monitor controls the allocation and use of these resources. Many of the functions of the Monitor are invisible, and of no concern to the user, for example, the way it allows many users to run prograrras on a single computer. In other instances the user explicitly tells Monitor what he would like to do and the resources he wishes to utilize. He does so by typing one or more of the commands described in this chapter or Chapter 8 (Advanced Monitor Commands). The Monitor commands described in the first half of this chapter are those the user needs to log into the system, to uti lize the TSS/8 System Library Programs, and to logout of the system. All TSSAl users must be fami I iar with these commands. The commands described in sections 2.5, 2.6, and 2.7 are not needed to run TSS/8 System Library Programs such as BASIC and FOCAL, but are frequently useful. The Monitor commands described in Chapter 8 are primarily useful for creating assembly language programs and files. NOTE All Monitor commands must be terminated by typing the RETURN key. All words within a Monitor command line are separated by one or more spaces. 2.1 CALLING MONITOR The user enters commands to System Programs, such as BASIC and FOCAL, in exactly the same way that he enters commands to Monitor (i .e., by typing them in at the keyboard); therefore, the system must have some way of distinguishing between the two cases. It does so by defining two modes of console operation: Monitor mode and program mode. When a user's console is in Monitor mode, all input is interpreted as being commands to Monitor. Otherwise, all input is assumed to be to the user program. A special character, CTRL/B, (obtained by striking B with the CTRL key held down; and echoed on the Teletype as tB) is used to unconditionally place the user's console in Monitor mode. Typing CTRL/B tells the system that the command to follow is to be interpreted as a command to Monitor, regardless of the mode that the Teletype is in. Generally, the command which follows the CTRL/B will be the S command. 2-1 fBS Return to Monitor mode. fBfBS Return to Monitor mode from a program which is typing out. (The two CTRL/B's stop the typeout, allowing the S command to be typed.) It is not necessary to precede each Monitor command with CTRL/B. Once in Monitor mode, a cOl1sole stays in that made unti I a command is typed which starts a user program. To signify that it ;s in Monitor mode, the system types a dot (.) on the left margin of the console printer paper. This dot indicates that the characters typed in next will be treated as a Monitor command. Thus, the CTRL/B capability is important when a user is runni ng a program and wishes to type a Monitor command. He may, for example, be using one language (or System Program) and want to change to another, as shown below • • R FOCAL CCNGRATULATIO~S! ! YOU HAVE SUCCESSFULLY LOADED SEALL I RETAIN LOC~ SHALL I RETAIN SINE~ EX~~ 'FOCAL~1969' O~ A TSS-8/1 COMPUTER. ATN ?:NO COSINE ?:NO PROCEED. * fBS .R BASIC NEv.' OR OLD-- Monitor always responds to tBS by typing a dot at the left-hand margin. 2.2 LOGGING IN ON TSS/8 To prevent unauthorized usage and to allow Monitor to maintain a record of system usage, TSS/8 requires that each user identify himself to the system before using it. Before attempting to log in, the user should ensure that the console LINE/OFF/LOCAL knob is turned to the LINE pasition (see section 1.4.1) before striking the RETURN key. If the console is connected to TSS/8 and is not already in use, Monitor rolls the console paper up two lines and prints a dot at the left margin of the paper. The dot indicates that TSS/8 is in Monitor mode and that Monitor is waiting for the user to issue a command. LCGIN Request access to TSS/8. 2-2 The LOGIN command allows the user to access the TSS/8 system. The user types LOGIN followed by a valid account number and password. Providing the console is free (not already logged in), the command, account number, and password will not be pnnted on the console paper as the keys are typed. If the command name letters are being printed, stop typing the command; instead, strike the RETURN key, log out using the LOGOUT command (see section 2.3), at this point a successful LOGIN can be accorr.plished. The LOGIN command is formatted as shown below: .LOGI"J 1234 ABCD (only the dot is printed) where. is printed by Monitor, LOGIN is the command name, 1234 represents the account number, and ABCD represents the password. NOTE A command name and each parameter (except the last) is always followed by a space, and the command line is always terminated with the RETURN key. When a user types something other than a valid LOGIN command on a console, Monitor respands in one of the following ways. Explanation Response HELLO? LC'GI:'-J PLEASE? (user typed HELLO) (user typed ASSIGN D 3) (user typed LOGIN ABCD ABeD) ILLEGAL RE.QUEST .LOGIN' 4771 DEt'iC ALREADY LeGGED I:'-J (user typed va Iid LOGl N on an already logged in console) (user typed an incorrect account number or password) UNAUTHORIZED ACCOU~T In the first example, HELLO is not a command, so it is repeated with a question mark by Monitor. In the second example, ASSIGN D 3 is a valid command but it is not appropriate until after the user logs in; therefore, Monitor asks the user to log in. In the third example, Monitor finds that the LOGIN command is improperly formatted (the first parameter must be from one to four numbers). The console printout tells the user that he has made an ILLEGAL REQUEST. When the console is already logged in and the user types the LOGIN command, the characters typed echo at the console, and Monitor informs the user that the console is occupied with the message ALREADY LOGGED IN? If the user attempts to use an incorrect account number or password, Monitor 2-3 replies UNAUTHORIZED ACCOUNT. Thus, Monitor can distinguish an invalid command from a valid command; it can also distinguish whether the valid command is appropriate when issued, whether the command is properly formatted, and whether the account number and password are acceptable. In all the examples above, Monitor ignores the command and prints another dot. When Monitor finds the LOGIN command properly formatted and the account number and passwords acceptable, it responds by identifying the version of the system being used, the job number it has assigned to the user, the number of the console being used, and the time-of-day in hours, minutes, and seconds. For example: TSS/8.19 JOB 03 K01 08:45:21 USUALLY THE SYSTEM MA~AGER WILL ENTER HERE A COMME~T OR NOTE TO THE USER CONCER~ING THE SYSTEM A~D Monitor then prints another dot and waits for the user to issue the next command. The job number assigned is an internal number by which the system identifies each on-line user. 2.3 LOGGING OUT OF TSS/8 The LOGIN command tells Monitor that the user is ready to begin an on-line session. The LOGOUT command indicates that the user is finished and ready to leave his Teletype. DiscoMect the user from the system and record the amount of time he has used. LGGOUT Monitor responds to LOGOUT by typing the amount of computer time used in the session and the total real time of the session. For example: .LOGOUT RUN TIME 00:00:34 ELAPSED TIME 00:35:41 PLEASE TUR~ OFF YOUR TTY Computer time used in this example was thirty four seconds, while the elapsed time between LOGIN and LOGOUT was thirty five minutes and forty one seconds. 2.4 SYSTEM LIBRARY PROGRAM CONTROL Once logged in, the user can call any of the TSS/8 Library Programs described in Chapters 3 through 7. To call such a program, the user types the command R {meaning run} followed by one or more spaces and the pro- 2-4 Call in and start a Tss/8 System Library Program. R For example: .R BASIC NE\!: OR OLD Monitor fetches the BASIC language processor from the System Library and starts it. BASIC begins its dialogue by asking if the user wishes to work on a new program or retrieve an old one from disk storage. Notice that once BASIC begins, the console is no longer in Monitor mode. Dots are no longer printed at the margin. All input is considered to be commands to BASIC. If the user types a program name which cannot be found in the System Library, Monitor responds with an error message and returns the console to Monitor mode • • R BASICK FILE NOT FOUND? The exact contents of a Tss/8 System Library may vary from installation to installation. 2.5 COMMUNICATION WITH OTHER USERS Although Tss/8 gives each system user the impression that he is the only user of the system, it is actually supporting many users at a time. Often, it is useful to communicate with another user, or with the system operator; this is done through use of the TALK command. TALK Type out a message on another Tss/8 Teletype. For example, to teIl the systenl operator (Teletype O) to tum on the high-speed punch, a user types the following (where the initial dot was typed by Monitor): .TALK 13 PLEASE TUR:.J ON THE HIGH SPEED PUNCH This command causes the following to be typed on console 0: ** K137** PLEASE TURN ON THE HIGH SPEED Pu~CE where K07 is the number of the physical console which sent the message. Any Teletype can initiate a message to any other Teletype. However, if the destination Teletype is printing at that time, the message will not be sent. The initiating Teletype will, in this case, get the message BUSY as a response. 2-5 2.6 SYSTEM STATUS REPORTS The command SYSTAT initiates a typeout of the full status of TSS/8; how many users are on-line, what they are doing, etc. SYSTAT Report system status. The command SYST AT is equivalent to typing R SYST AT. The format of the status report is described in the section on SYSTAT in Chapter 6. To learn the amount of computer time used since logging in, the user issues the TIME command: TIME The elapsed processor time of the user since he logged in is printed. TIME 0 The time of day is printed. TIME C1 The amount of processor time used by job C 1 since login is printed. For example: .TIME 00:00:09 .TIME 0 09:29:32 .TI~E 02 00:00:10 2.7 RESOURCE SHARING All TSS/8 users, when logged in, have free access to the System Library, the disk storage capobi I ity, and the TSS/8 computer. Monitor automatically handles resource requests on a rotating basis. Monitor also maintains a pool of available devices which must be assigned to be used. These are devices, such as the high-speed paper-tape reader, which by their very nature cannot be assigned to several programs simultaneously. Therefore, Monitor grants individual users exclusive access to these devices when needed. Thus, users still share the device, although not simultaneously. 2-6 All Tss/8 systems include a high-speed, paper-tape reader in the pool of available devices. Many systems also include a high-speed, paper-tape punch, and one or more DECtapes. These assignable devices are normally used with System Library Programs PIP and COpy to store programs or data on paper tape or DECtape. When a device is assignable (present on the system) and available (not being used), the ASSIGN command may be used to assign the desired unit or units to the console issuing the command. The valid ASSIGN commands are formatted as shown below: ASSIGN R Assign the high-speed paper-tape reader. ASSIGN P Assign the high-speed paper-tape punch. ASSIGN D Assign a DECtape unit. where R, P, and D are device designators for reader, punch, and DECtape, respectively. If other devices are assignable, the system manager will inform the user of the appropriate device designators. The following is an example of using an invalid device designator . • ASSIGN X ILLEGAL REQUEST Monitor ignores the request, responds with the appropriate message, and prints another dot. When a valid ASSIGN command is issued, Monitor checks for the availability of the device and respands accordingly. For example: .ASSIGN R R ASSIGNED (reader is assignable, available, and assigned) .ASSIGN P JOB 02 HAS P (punch is unavailable because job number is using it, and thus not assigned) When the system contains multiple units of a device, the user simply specifies the device; Monitor assigns an available unit and responds with the unit number. For example: .ASSIGN D D 2 ASSIGNED If all DECtape units are busy, Monitor prints the message shown below: .ASSIGN D DEVICE NOT AVAILABLE 2-7 A specific unit can be requested, leaving a space between the device designator and the device number . • ASSIGN D 4 D 4 ASSIG;\;ED {assignment was accomplished} NOTE If the user assigns a device with a nonexistent device number, that device will not be assigned; an error message does not result because that device is not busy. An error message only results when the device is already assigned • The ASSIGN cornn'lOnd can assign only one device at a time. Therefore, when multiple devices are to be assigned, each must be assigned separately. The following will not accomplish the desired assignments, either with or without the illegal commas . • ASSIG~ R~ D 2~ D 1 R ASSIGNED Monitor accepted the first device designator {and unit number if any} and ignored the rest of the command. If device R is unavailable, Monitor prints the appropriate message. The following completes the desired assignments {assuming available devices} . • ASSIGX D 2 D 2 ASSIG:\ED • ASS I Gr\ D 1 D 1 ASSIG:.\'ED When the user has finished working with an assigned device, the RELEASE command must be used to terminate the assignment and allow other users access to the device. (When a user logs out of TSS/8 any devices he still has assigned to him are automatically released.) RELEASE Terminate a previous device assignment and make the device available to other users. An assigned device is released when the user types the RELEASE command, a space, the device designator {and unit number if required}, and the RETURN key as shown below • • RELEASE R .RELEASE D 3 2-8 In the previous example, the reader and OECtape unit number 3 are released. Monitor prints a dot on the next line if the release is accomplished; otherwise, it prints a message. If, for example, a request is made to release a device which has not been assigned to the issuing console, the following happens: .RELEASE P ILLEGP.L REQUEST Monitor printed ILLEGAL REQUEST after it checked and found that the specified device was not assigned to the console issuing the command. NOTE All commands must be formatted properly; ILLEGAL REQUEST is printed if the user fails to separate the device designator and unit number with a space. When multiple device units exist on the system, each must be individually released. For example: .RELEASE D 1 .RELEASE D 2 .RELEASE R Monitor does not check when releasing a device as it does when checking to assign an available device. The user could have two device units (for example, two DECtape units) assigned and Monitor would not know which to release; therefore, device numbers are necessary with a RELEASE command. However, where only one unit of a specific device (one reader, one punch, etc.) is on the system, the device designator alone is sufficient. Examples follow. 2.8 .RELEASE D ILLEGAL REQUEST .RE.LEASE R (accompl ished) .RFLEASE D (0 1 is released) (due to multiple OECtope units) ERROR MESSAGES An appropriate error message is printed whenever: a Monitor command cannot be performed at the time it was requested, a typing error was made, or the command is illegal (nonexistent). Following each error message, Monitor ignores the request and prints another dot, after which the user can issue another command. 2-9 Table 2-1 Monitor Error Messages Explanation Command Sl ? The Systell1 Interpreter does not understand the command. Sl = command LOGIN PLEASE? The user attempted to use a console which is not logged in. UNAUTHORIZED ACCOUNT The user attempted to log into the system with an invalid account number or name. ALREADY LOGGED IN? The user tried to log in on a console which is already in use. FULL The TSS/8 system is full. Another user cannot log in until one of the present on-line users logs out. TYPE tBS FIRST The user attempted to use a system command whi ch cannot presently be honored due to the status of the user's prograll1. The message may appear even after the user has typed tBS, since his program may continue until the I/O in progress at the time of the halt is completed. The user should wait a few seconds and then type his command a second time. ILLEGAL REQUEST The user requested an illegal command. This error usually results when some parameter has been given an incorrect value or the request refers to a facil ity nat owned by the user. BUSY The user attempted to talk to a console which is currently typing out or is being typed on. 2-10 CHAPTER 3 DESCRIPTION OF TSS/8 SYSTEM LIBRARY PROGRAMS AND THE INTERACTIVE LANGUAGES 3.1 INTRODUCTION The TSS/8 System Library contains a comprehensive set of user programs for a wide range of applications. Language processors, such as BASIC-8, FOCAL, and FORTRAN, allow the user to code and run programs in interactive languages. A complete assembly language system allows programs to be written in PAL-D. Various utility programs perform special functions. The System Library consists of the following programs: a. BASIC-8 - an easily learned algebraic language originally developed at Dartmouth College. b. FOCAL - DEC's own conversational language for on-line problem solving. c. FORTRAN-D - a modified version of FORTRAN. d. EDIT - a keyboard oriented Symbolic Editor, used to create and modify source programs and data files. e. PAL-D - a two-pass Symbolic Assembler. f. LOADER - a Binary Loader used to load assembled programs for execution. g. ODT - Octal Debugging Technique for testing and modifying assembly language programs. h. PIP - Peripheral Interchange Program for transferring files between the TSS/8 disk and paper tape. i. COpy - a utility program used to transfer files between the TSS/8 disk and DECtape. i. CAT - used to list all the files which a user has stored in his library. k. SYSTAT - (System Status) a util ity program that prints the status of the whole TSS/8 system. A more detailed description of each of the above System Programs is presented in the following chapters. 3.2 GENERAL CHARACTERISTICS OF SYSTEM LIBRARY PROGRAMS A fundamental feature of the TSS/8 Monitor is its ability to save programs or other data for each user in his own private library. These individual user libraries are maintained on the system disk. Individual entries in the library are called files, whether they contain programs or data. Within the library itself, there is no distinction between types of files by their conte"ts. Each file is identified with a file name by which it is known, and called into use. 3-1 The user does not directly create and update the files in his library. He uses the System Library Programs for this purpose. For example, he can use the SAVE command in BASIC. The SAVE command takes the BASIC program named and saves it as a file in the user's library for future use. Similarly, EDIT can be used to modify an existing file, resulting in the creation of a new file. Therefore, although TSS/8 Monitor provides the actual file storage capability, most file manipulation is done while System Library Programs are being run. The System Library Programs which operate on these files, must know which file to use, when to create a new file, and what to call it. Each Library Program has its own method of determining whether a user wishes to use an old file or create a new one; this is explained in the sections on individual programs. Example 1: .R BASIC NEW OR OLD--OLD OLD PROGRAM NAME--PRIME READY Example 2: .R FORT INPUT:TYPE OUTPUT: BTYPE For most of his work, the user requires access to only his own library. However, it is often a useful feature to be able to obtain a program from another user's library; allowing a single file to be shared by several users. To access a program from another user's library, the user must tell the system in which individual Iibrary the fi Ie is stored. The user tells the system by entering the account number of the library's owner. (In the absence of an account number, the user's own Iibrary is the assumed source.) To get a fi Ie from the System Library, type an asterisk immediately after the file name. Example 1: .R BASIC NEI,: OR OLD--OLD OLD PRCGRAM NAME--HOSSR* READY Example 2: .R PALD INPUT:NOTPIP 5440 OUTPUT:BINI 3-2 NOTE Most examples in the discussions of individual System Library Programs use file names within the user's own library. The user is free (file protect permitting) to use files from other users' libraries. Access to another user's files is gained only with his permission. A user may "protect" his files against other users (see Appendix F), i.e., prevent them from gaining access to his files, even though they know his program name and account number. Library Programs never permit a user to write in another user's files. Specifying a file which is protected, or specifying a nonexistent file, is an error that is detected immediately. An error message is typed and the same request made again. The user places his output in a single file; however, it is often useful to input several files together. (For example, the user may wish to assemble two parts of a PAL-D program together.) To specify more than one input file, separate the file names by commas. No Library Program allows more than three input files. FORTRAN is limited to two; BASIC allows only one. BASIC is a self-contained programming system, with an editor, compiler, and run-time system. It also has a distinctive disk file format. Files created by BASIC are not compatible with files created by other Library Programs. All other Library Programs depend on each other; therefore, all Library Programs use the same format for their disk files. Consequently, files created by the Editor can be used as input to PAL-D or FORTRAN-D, and numerical files created with the use of the Editor can be read by FORTRAN programs as data files. Up to this point, only files that exist within the Time-Sharing System, i.e., on the Tss/8 disk, have been described; however, Tss/8 provides two other means of file storage: paper tape and DECtape. The Library Program PIP can be used to transfer files between paper tape and disk. The Library Program COpy allows files to be transferred between disk and DECtape. 3.2.1 Controlling the Execution of System Library Programs Tss/8 provides the user with two options for stopping the system. CTRL/c (C with the CONTROL key held down) allows the user to stop his BASIC program and return to the beginning of that program without returning to the Tss/8 Monitor. For example, if the user begins to run a BASIC program that has an endless loop, he can type CTRVC to stop it. BASIC responds to tC with READY. All other Library Programs respond in a similar manner. CTRL/B is used to stop the Library Program most recently called. CTRL/B followed by S and carriage return (RETURN key) unconditionally returns the user to the Monitor level; the user can now call another Library Program. If the system is typing out, two CTRL/Bs and the S (tBtBS) are required to stop the system. 3-3 RUBOUT is another useful character that deletes the last typed character. Some Library Programs respond bv printing \ or" while others print the rubbed out character. If the RUBOUT key is typed while entering file names for input or output to a library Program, RUBOUT deletes the whole line. The request for input or output is then repeated. 3.2.2 Returning to Monitor The user can stop the execution of a System Library Program at any time by typing CTRL/B followed by S and the RETURN key. The System Library Programs can also initiate a return to the Monitor. When the System Library Programs initate a return, tBS is printed just as though the user had terminated the program. For example, BASIC-8 returns to Monitor when the user types the BYE command: READY BYE tBS FORTRAN returns to Monitor after completing execution of a program. CAT and SYSTAT return after typing their particular data output. PAL-D returns after completion of an assembly, LOADER at the end of a normal load, and EDIT after completion of an EDIT. FOCAL, BASIC, ODT, PIP, and COPY never return to Monitor; these programs must be terminated by the user. NOTE Some System library Programs return to the Monitor when a fatal error condition is detected. 3.2.3 Additional Manuals Many of the System Library Programs are documented in their own individual manuals. Those programs for which manuals exist, are: BASIC-8 DEC-T8-KJZA-D FOCAL DEC -08-AJAD-D EDIT DEC -08-ESAB-D FORTRAN-D DEC-Q8-AFC 0- D PAL-D DEC-D8-ASAB-D ODT DEC-Q8-COCO-D Only a brief description of these programs is given here. Tables of commands are included for reference; however, for detailed instructions on the usage of these programs, the user is referred to the individual manual. 3-4 3.3 BASIC-S BASIC-S is the TSS/S version of the time-sharing language BASIC. It allows even the beginning computer user to write and run meaningful programs. BASIC-S is described at greater length in the BASIC-S Manual (Order No. DEC-TS-KJZA-D). To call BASIC, type: .R BASIC After the user logs into TSS/S, and calls the BASIC program, BASIC then prints NEW OR OLD--. The user then types the appropriate adjective: NEW (if the user is about to type a new program), or OLD (if the user wants to access a program that was previously fi led). BASIC asks NEW PROGRAM NAME-- (or OLD PROGRAM NAME--) and the user types any combination of six letters or less. If the user is recalling an old program file from memory, he must use exactly the same name as when he originally instructed BASIC to save it. BASIC prints READY to signal the start of the editing phase; the user then begins to type the new program. If the user types a line consisting of only a line number followed by the RETURN key, that line is deleted. Make certain that each line begins with a line number greater than 0 and less than 2047 and contains no non-digit characters. To enter the line to the computer be sure to strike the RETURN key at the completion of each line. If, while typing a statement, the user makes a typing error and notices it immediately; he can correct it by striking the RUBOUT key (right-hand side of the keyboard), or the back arrow key (SHIFT/O). Striking either key deletes the character in the preceding space and prints a left arrow (+} for each rubout. The user can then type in the correct character. Striking the RUBOUT key a number of times erases one character from the current line, (spaces are characters) to the left for each RUBOUT typed. NOTE BASIC sometimes takes several seconds to accomplish a rubout. While BASIC is in the editing phase, certain additional commands (which must not have line numbers) are available and are described below: a. If the user types SAVE followed by one or more spaces, followed by a name, and strikes the RETURN key, the current program is saved for future use under that name. b. If the user types UNSAVE, followed by a name, and strikes the RETURN key, the program with the name given is deleted from the user's permanent file. c. If the user types CATALOG, and strikes the RETURN key, a listing of all the program names in his permanent file is typed. 3-5 NOTE Names of temporary files are also shown. These are of the form, BASnn, and can be ignored. d. If the user types LIST followed by two line numbers separated by a comma, a listing of the particular part of his current program that lies between those line numbers is typed. If the comma and second line number are omitted, only the sil1gle line indicated is listed. If no line numbers follow the word LIST (but only the RETURN key), the whole program is listed. e. If the user types DELETE followed by two line numbers separated by a comma, all lines between and including the two indicated are deleted. If the comma and second line number are omitted, only the single line specified is omitted. f. When the user is ready to leave the Teletype, he signs off by typing BYE. BYE concludes operations and TTS/8 Monitor deletes any tempory files assigned to the user. g. After BASIC is called, the user can load a BASIC program from paper tape by placing the tape in the console tape reader and typing TAPE. The tape is read in without printing on the console paper. All RUBOUT characters are ignored. h. After loading a tape, type KEY to return to normal keyboard mode. (Characters typed while in TAPE mode do not echo on the console paper.) If information (other than the RETURN key) is to follow the control word, at least one blank must precede the additional information. 3.3.1 Example of a BASIC-8 Program LIST 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 1 60 1 70 REM - PROGRAM TO COMPUTE I~TEREST OX A PRINT "INTEREST DJ PERCENT"; INPUT J LE.T J=J/100 PBI~T "Ar-:'OCNT OF LOAN"; I~Pl·T A PRI~T "~Ul"BER OF YEARS"; I~PUT N PRINT ":\JUl".BER OF PAYME~TS PER YEAR"; I~PUT M LET ~=N*K LET I=J/M LET B=1+I LET R=A*I/(1-1/BT~) PR DJT ·'l",ONTJiL't PI>YME.:--JT ="Fi. PRDJT "TOTAL I~TEREST ="R*N-A END 3-6 LCA~ READY RUN INTEREST IN PERCENT? 8 AMOUNT OF LOAN? 25000 NUMBER OF YEARS? 20 NUMBER OF PAYMENTS PER YEAR? 12 MONTHLY PAYMENT = 209.1103 TOTAL INTEREST = 25186.46 READY 3.3.2 Summary of BASIC-8 Statements Tabl e 3-1 is a summary of BASIC-8 statements. The following is a list of symbols used in Table 3-1. v = variable f = formula r = relationship a = arguments n = Ii ne number s = integer subscript value d = data, either real or integer Table 3-1 Summary of BASIC-8 Statements Explanation Statement LET v = f Assign the value of the formula to the specified variable. DATA d, ••• , d DATA statements are used to supply one or more numbers to be accessed by READ statements. READ v, ..• , v READ statements, in turn, assign the next available number in the DATA string to the variables listed. PlUNTa, ••. ,a Type the values of the specified arguments, which may be variables, text, or format control characters. GOTOn Transfer control to the line number specified and continue execution from that point. ~F (f rf) THEN n } If the stated relationship is true, then transfer control to the I ine number specified; if not, continue in sequence. FOR v = f1 TO f2 STEP f3 Used for looping repetitively through a series of steps. The FOR statement initializes the variable to the value of formula 1. If the increment is positive and the variable ~formula 2, the instructions following are executed unti I the NEX T statement is encountered. IF (f r f) GO TO n 3-7 Table 3-1 (Cont) Summary of BASIC -8 Statements Statement Explanation NEXT v The NEXT statement increments the variable by the value of formula 3 (if omitted, the increment value is + 1). The variable is again tested as described above, and this process continues until the loop is repeated the specified number of times. When the variable becomes larger than formu la 2, control goes to the statement following the NEXT. If the increment (formula 3) is negative, then the instructions between the FOR and NEXT statements are executed until the variable becomes less than the value of formula 2. DIM v (s) Enables the user to enter a table or array with the specified number of elements. END Last statement to be executed in the program. This statement must be present. RANDOMIZE When placed at the start of a program, causes a different set of random numbers to be generated each time that program, using RND (X), is run. GOSUB n Transfers control to the subroutine beginning at the line number indicated. RETURN RETURN simplifies the execution of a subroutine by providing an automatic return from the subroutine to the next sequential statement following the appropriate GOSUB (the GOSUB which sent control to the subroutine). INPUT v, ••• , v Causes typeout of a ? to the user and waits for user to respond by typing the value of the variable(s). STOP Equivalent to GO TO [line number of END statement] • REM Permits typing of remarks within the program. RESTORE Sets pointer back to beginning of string of DATA values. 3.3.3 Functions BASIC performs several mathematical calculations for the programmer eliminating the need for tables of trigonometric functions, square roots and logarithms. These functions have a three-letter call name, (the argument (X) can be a number, variable or formula) and are written as follows: 3-8 Functions SIN (x) Meaning sine of x in radians COS (x) cosine of x in radians TAN (x) tangent of x in radians ATN (x) arctangent of x in radians x e where e=2.712S1S EXP (x) LOG (x) ABS (x) SQR (x) natural logarithm ofx, log x e absolute value of x, Ixl square root of x, ..rx- 3.3.4 Complex Functions a. SG N (x) - the SG N or sign function returns the value +1 if x is a positive number, 0 if x is 0, and -1 if x is negative. For example: SGN (3.42) =1, SGN (-42) =-1. b. I NT (x) - the I NT or integer functi on returns the va lue of the greatest integer not greater than x. For example: INT (34.67) =34, INT (-34.42) =-35. c. RND (x) - the RND or random number function produces a random number between 0 and 1. The numbers are reproducible in the same order for later checking of a program. The value of x is ignored. If a truly random number generator (causing different random numbers every time the program runs) is desired, place the RANDOMIZE statement at the beginning of the program, before the initial use of RND (x). d. User defined functions - The user may create his own functions by using the DEF statement. The statement defining the function must appear before any reference to that function, its form is: DEF F NA (x) = (some formula) where the function name must be a three-letter sequence beginning with F. 3.3.5 Summary of Edit and Control Commoods Several commands for editing BASIC programs and controlling their execution enable the user to: delete lines, list his program, save programs on a file-structured storoge device (disk), delete or replace old programs on the storage device with new programs, call in programs from the storage device, etc. These commoods are summarized below. 3-9 Table 3-2 Summary of BASIC Edit and Control Commands Action Command BYE Exit to TSS/8 Monitor to conclude operations DELETE n Delete line number n (or simply type the line number and RETURN key). DELETE m, n Delete line numbers m through n. LIST List program. LIST n list line number n. LIST m, n List program from line number m through n. NEW BASIC will ask for a new program name. OLD BASIC wi II ask for the 01 d program name and wi II rep lace current contents of user core with the program of the given name from the storage device. RUN Compile and run program currently in core. SAVE name Save the BASIC program currently being worked on under the name given. t UNSAVE name Delete the named program from the storage device. tC (CTRL/C) To stop a running program, type CTRL/C (C with the CONTROL key held down). BASIC will return to editing mode and type READY. t SAVE commands overwrite an existing file of the Same name. 3.3.6 Error Messages There are four types of BASIC error messages. The messages and their various interpretations are shown below. 3.3.6.1 Editing Phase Diagnostics - Retype the line to correct it. Error Message Explanation SYSTEM 1-0 ERROR BASIC was unable to perform the desired disk I/O. //ERROR ft1 The user did not type in OLD or NEW when the information was requested. //ERROR ft2 The new or old name is not a valid name. //ERROR ft3 The neW name given is currently an active program. //ERROR ft4 The old program name requested cannot be found. //ERROR 11 The SAVE or UNSAVE name given is not a valid name. WHAT? The editor cannot understand the command given. //ERROR 2ft Invalid line number format or outside the range 0< line number < 2047. 3-10 3.3.6.2 Compilation and Execution Diagnostics - Most messages are followed by the notation ON LINE nnnn, where nnnn is the line number on which the error was detected. (BASIC prints READY and the user is back in the editing phase.) Explanation Error Message PROGRAM TOO LARGE The program is too large to be executed. Make it smaller. MISSING END STATEMENT All programs must have an END statement. DATA POOL OVERFLOW The user used too many constants and/or variables in the program. ILLEGAL STATEMENT A statement was used which is not one of the legitimate BASIC statements. ILLEGAL LINE FORMAT The structure of the statement does not agree with the BASIC syntax. NOT CONSTANT IN DATA The user attempted to use something other than a constant in a DATA statement. DEF STATEMENT MISSING A function needing a DEF statement exists in the program. FOR WITHOUT NEXT There is an unmatched FOR statement in the program. NEXT WITHOUT FOR The NEXT statement indicated has no preceding FOR statement. ILLEGAL CHARACTER The user attempted to use an illegal character in the statement being processed. ILLEGAL CONSTANT The format of a constant in the statement being processed is not valid. INVALID NAME A name is being used which does not agree with the BASIC requirements. INVALID LINE NUMBER The format of the line number, being used in a GO TO or IF statement, is not acceptab Ie. ARRAY USED BEFORE DEFINED The user attempted to use an array prior to its appearance ina DI M statement. EXPRESSION SYNTAX The expression being processed does not agree with the BASIC rules (this will probably be due to unmatched parentheses) • STACK OVERFLOW The user programmed a situation in which either DO statements, subroutines, or functions are nested too deeply; or the user has a function which calls itself. OUT OF DATA An attempt was made to READ more data than was supplied by the user. ILLEGAL INPUT FORMAT The form of a constant, which the user is attempting to INPUT, is not valid. DIMENSION TOO LARGE Too large an array to fit in the core available. UNDEFINED LINE NUMBER The line number appearing in a GO TO or an IF-THEN statement does not appear in the program. 3-11 3.3.6.3 Non-Fatal Execution Errors - Non-fatal errors are for notification purposes and indicate that the user performed a computational range error. The errors all cause the message XX IN nnnn to be printed, where nnnn is the line number and XX is as described below: Error Code Explanation /'1 ZERO DIVIDE - An attempt was made to divide a number by zero. The largest possible number is used for the result. OV OVERFLOW - The result of a calculation was too large for the computer to handle. The largest possible number is used for the result. UN UNDERFLOW - The result of a calculation was too small for the computer to handle. Zero is used for the result. LN An attempt was made to compute the logarithm of zero or a negative number. Zero is used for the result. sa An attempt was made to compute the square root of a negative number. The square root of the absolute value is used for the result. PW An attempt was made to raise a negative number to a fractional power. The absolute value of that number raised to the fractional power is used. 3.3.6.4 System Error - If a failure occurs in the disk I/O portion of the BASIC system, the message SYSTEM I/o ERROR is printed and control returns to the editing phase. 3.3.7 Implementation Notes The TSS/8 BASIC language is compotible with Dartmouth BASIC except as noted below: a. There are no matrix operations. b. There are no character string instructions. c. The ON statement has not been implemented. d. The TAB function is not available in PRINT statements. e. BASIC-8 has no features which allow reading or writing data on the disk. (Although programs may be saved on the disk for future use.) f. All array (subscripted) variables must appear in a DIM statement. g. The function INT (X) gives the greatest integer in X. Therefore, INT (-2.3) gives the value -3; INT (2.3) gives the value +2 h. Negative numbers can t.vt be raised to integer powers. The absolute value is used and an error message printed. The reason for this is the unary minus has a lower priority during execution than exponentiation. For example, -23 = +8 with an error message given. 3-12 i. User defined functions are restricted to one line. i. Maximum size of a BASIC-8 program is about 300 lines, depending on the number of variables, number and size of arrays, and number of nested subroutines and FOR-NEXT loops. 3.4 FOCAL FOCAL (Formulating On-line Calculations in Algebraic Language) is an on-line, conversational, service program for the PDP-8 family of computers, designed to help scientists, engineers, and students solve numerical problems. The language consists of short imperative English statements which are relatively easy to learn. It is used for simulating mathematical models, for curve plotting, for handling sets of simultaneous equations, and many other kinds of problems. For a detailed introduction to the FOCAL programming language, consult the FOCAL Programming Manual (Order No. DEC-08-AJAD-D). To call FOCAL, type: .R FOCAL FOCAL enters its initial dialogue, and asks if its extended functions are to be retained. The extended functions are exponential, sine, cosine, arctangent, and logarithm. If the FOCAL program to be run uses any of these functions, the user responds YES. If not, the user responds NO to free more space for the user program. Without the extended functions, there is room for approximately 1800 characters of program. If the extended functions are retained, there is room for approximately 1100 characters. 3.4.1 FOCAL Command and Operation Summary Table 3-3 FOCAL Command and Operation Summary Command Abbreviation Example of Form Explanation ASK A ASK X, Y, Z FOCAL types a colon for each variable; the user types a value to define each variable. COMMENT C COMMENT If a line begins with the letter C, the remainder of the line will be ignored • CONTINUE C C Dummy lines. 3-13 Table 3-3 (Cont) FOCAL Command and Operation Summary Command DO ERASE FOR Abbreviation 0 E F Example of Form Explanation DO 4.1 Execute line 4.1; return to command following DO command. DO 4.0 DO All Execute all group 4 lines; retum to command following DO command, or when a RETURN is encountered • ERASE Erases the symbol table. ERASE 2.0 Erases all group 2 lines. ERASE 2.1 Deletes line 2. 1 . ERASE All Deletes all user input. FOR i=x,y,z;(commands) Where the command following is executed at each new value. x=initial value of i y=value added to i until i is greater than z. GO G GO Starts indirect program at lowest numbered line number. GO? G? GO? Starts at lowest numbered line number and traces entire indirect program unti I another ? is encountered, until an error is encountered, or until completion of program. GOTO G GOT03.4 Starts indirect program (transfers control to line 3.4). Must have argument. IF I IF (X)ln, ln, ln Where X is a defined identifier, a value, or an expression, followed by three line numbers. IF (X)ln, In; (commands) IF (X)ln; (commands) If X is less than zero, control is transferred to the first line number. If X is equal to zero, control is to the second Ii ne number. If X is greater than zero, control is to the thi rd Ii ne number. MODIFY M MODIFY 1.15 Enables editing of any character on line 1.15 (see below). QUIT Q QUIT Returns control to the user. RETURN R RETURN Terminates DO subroutines, returning to the original sequence. 3-14 Table 3-3 (Cont) FOCAL Command and Operation Summary Command Abbreviation Example of Form SET S SET A=5/B*C; TYPE T TYPE A+B-C; Explanation Defines identifiers in the symbol table. Evaluates expression and types out = and result in current output format. WRITE 3.4.2 W TYPE A-B, c/E; Computes and types each expression separated by commas. TYPE "TEXT STRING" Types text. May be foil owed by I to generate a carriage return and line feed, or 11 to generate a carriage return. WRITE WRITE ALL FOCAL types out the entire indirect program. WRITE 1.0 FOCAL types out all group 1 lines. WRITE 1.1 FOCAL types out line 1.1. FOCAL Operations The following is a description of symbols used in FOCAL operation. Explanation To set output format, To type symbol table, TYPE %x.y Where x is the total number of digits, and y is the number of digits to the right of the decimal point. TYPE %6.3, 123.456 FOCAL types: =+123.456 TYPE % Resets output format to floating point. TYPE $ Other statements may not follow on this line. After a MODIFY command, the user types a search character, and FOCAL types out the contents of that line until the search character is typed. The user may then perform any of the following operations. a. Type in new characters. FOCAL will add these to the line at the point of insertion. b. Type a CTRL/L. FOCAL will proceed to the next occurrence of the search character. c. Type a CTRL/BELL. After this, the user may change the search character. d. Type RUBOUT. This deletes characters to the left, one character for each time the user strikes the RUBOUT key. 3-15 e. Type", Deletes the line over to the left margin, but not the line number. f. Type RETURN. Terminates the line, deleting characters over to the right margin. g. Type LINE FEED. Saves the remainder ci the line fran the point at which LINE FEED is typed over to the right margin. 3.4.3 Mathematical Functions A listing of mathematical functions follows: Function Symbol Interpretation Square Root FSQT(x) where X is a positive number or expression greater than zero. Absolute Value FABS(x) FOCAL ignores the sign of x. Sign Part FSGN(x) FOCAL evaluates the sign part only I with 1.0000 as integer. Integer Part FITR(x) FOCAL operates on the integer part of x, ignoring any fractional port. Random Number Generator FRAN(x) FOCAL generates a randan number. The value of x is ignored. tExponential Function (eX) FEXP(x) FOCAL generates e to the power x. (2.7182a><) tS'me tc oslne . FSIN(x) FOCAL generates the sine of X in radians. FCOS(x) FOCAL generates the cosine of x in radians. tAre Tangent FATN(x) FOCAL generates the arc tangent of x in radians. tlogarithm FlOG(x) FOCAL generates log e (x). 3.4.4 Control Characters Control characters and their explanation follows: % ! , $ ( ) [] <> II II ? ? * Output format delimiter Carriage return and line feed Carriage return Type symbol table contents Parentheses } Square brackets Angle brackets Quotation marks Question marks Asterisk (mathematics) (text string) (trace feature) (high-speed reader input) tThese are known as extended functions. 3-16 SPACE key (names) } RETURN key (lines) ALT MODE key (with ASK statement) Comma (expressions) Semicolon (commands and statements) 3.4.5 (nonprinting) Reading FOCAL Paper Tapes To ensure that FOCAL paper tapes are read without error, they should be read silently. To do this, type tB (CTRL/B) followed by UNDUPLEX just prior to reading the tape in. This Monitor command suppresses the printing of the program as it is read. As each line is read, a line feed and FOCAL's asterisk are typed, indicating that the line is properly stored. After the tape has been completely read, type tB DUPLEX to restore FOCAL to its normal mode. An example is shown below: *ERPSE ALL *tBlJ~DUPLEX * * * * * * * *tBDCPLEX *WRITE ALL C-FOCt:.L,1969 01.05 01.06 01.10 01.20 01.30 01 .40 C PROGRAV- TO CALCULATE THE HYPOTENUSE OF A C RIGHT TRIANGLE GIVEN THE TWO SIDES ASK "SIDES OF TRIANGLE ARE" A,B SET C=FSQT(At2+Bt2) TYPE "hYPCTENUSE IS" C.. ! GOTO 1.1 * 3.4.6 FOCAL Error Messages Code ?oo.oo ?OO.OO ?01.4O ?01.78 ?01.96 ?01.:5 ?01.;4 ?02.32 ?02.52 Explanation Manual start given from console. Interrupt from keyboard via CTRL/C. Illegal step or line number used. Group number is too large. Double periods found in a line number. Line number is too large. Group zero is an illegal line number. Nonexistent group referenced by DO. Nonexistent line referenced by DO. 3-17 Code ?02.79 ?03.05 ?03.28 ?04.39 ?04.52 ?04.6O ?04.:3 ?05.48 ?06.06 ?06.54 ?07.22 ?07.38 ?07.:9 ?07.;6 ?08.47 ?09.11 ?10.:5 ?11.35 ?20.34 ?23.36 ?26.99 ?28.73 ?30.05 ?31.<7 Explanation Storage waS fi II ed by push -down list. Nonexistent line used after GOTO or IF. Illegal command used. Left of = in error in F OR or SET. Excess right terminators encountered. Illegal terminator in FOR command. Missing argument in display command. Bad argument to MODIFY. Illegal use of function or number. Storage is filled by variables. Operator missing in expression or double E. No operator used before parenthesis. No argument given after function call. Illegal function name or double operators. Parentheses do not match. Bad argument in ERASE. Storage was fi lied by text. Input buffer has overflowed. Logarithm of zero requested. Literal number is too large. Exponent is too large or negative. Division by zero requested. Imaginary square roots required. Illegal character I unavai lable command I or unavai lable function used. 3-18 CHAPTER 4 FORTRAN-D COMPILER 4.1 INTRODUCTION TO TSS/8 FORTRAN FORTRAN-D compi les and runs programs written in the PDP-8 version of FORTRAN. Programs {usually created and stored with the Symbolic Editor} are compiled in a single pass and executed {automatically} immediately following compilation. The PDP-8 FORTRAN Manual {Order No. DEC-08-AFCO-D} provides exact instructions for writing programs in FORTRAN. 4.2 CALLING AND USING FORTRAN-D To use FORTRAN-D, type: • R FORT FORTRAN requests the name of the input file, i.e., the file containing the FORTRAN program to be compiled and run. The user responds with the fi Ie name, then strikes the RETURN key. FORTRAN then requests the name of an output file in which to store the compiled version of the program. For normal usage, just the RETURN key need by typed. FORTRAN places the compiled code in a fi Ie of its own, then proceeds to run the program. If a file name is entered for output, FORTRAN creates a permanent file in which the compiled binary program is saved. It is then possible to rerun this program without recompiling it. To run an already compiled program, call the FORTRAN operating system directly by typing: .R FOSL FOSL requests the name of an input file. Enter the name of the file containing the compiled binary. Examples: .R FORT INPUT:MTRIX OUTPUT: 4-1 FORTRAN compiles and executes the program MTRIX but does not save the compiled binary • • R FORT I:-.JPUT:MTRIX OUTPl'T:BlYTRIX FORTRAN compiles and executes the program MTRIX and then leaves the compiled binary in the file named BMTRIX. .R FOSL INPUT:Btl:TRIX The FORTRAN binary program BMTRIX is executed without first being compiled. NOTE All FORTRAN programs return to the Monitor when they hove completed execution. 4.3 FORTRAN I/O Differing versions of PDP-8 FORTRAN offer slightly different features. TSS/8 FORTRAN-D differs in the way it is called into use (described above), and in its more powerful I/o capability (described below). FORTRAN-D allows three data formats: Integer format E Exponential format A Alpha format, the ASCII value of a choracter is stored as an integer value. The standard device for READ and WRITE statements is the Teletype, which is assigned device code 1. Because the Teletype is so frequently used, FORTRAN-D includes two special input/output instructions, ACCEPT and TYPE. These instructions imply use of the Teletype; therefore, the device code need not be specified. ACCEPT is especially convenient if data is to be entered at the keyboard because this instruction automatically supplies a line feed when the RETURN key is typed. Also, the user can correct an erroneously typed value by striking the RUBOUT key. A FORTRAN-D program can also utilize the high-speed reader and punch for I/O. These devices are assigned code 2. Because the high-speed reader and punch are shared by all TSS/8 users, it is necessary to assign them if they are to be used. Assign the appropriate devi ces and mount tapes in the reader before runni ng FORTRAN-D. When running several FORTRAN-D programs, reassigl1 the devices before each run. 4-2 TSS/8 FORTRAN also allows programs to read and write data files on the disk. These data files are completely separate from the program files. Data files are read and written by standard READ and WRITE statements withi n the FORTRAN-D program. The device code for the disk is 3. Because programs using the disk are treated differently by FORT (the FORTRAN-D compiler), it is necessary to identify programs which use the disk. These programs are identified by a DEFINE DISK statement as the first statement in any such FORTRAN-D program including a READ or WRITE statement with device code 3. Just as FORT itself must ask for the name of its input and output files, so must a FORTRAN program ask for the names of its disk files. FORTRAN-D programs do this by typing INPUT: and OUTPUT: a second time. The user responds by typing the name of the files to be read or written by the program. FORTRAN-D asks for both input and output for all programs which include a DEFINE DISK statement. If only input (or output) is to be used, the user responds to the other by striking the RETURN key. The following program is an example of a FORTRAN-D program whi ch utilizes the disk for data storage. The program reads an already existing file (DATAl) of 10 values from the disk and writes their square roots into a new file (DATA2). 4.4 EXAMPLES OF FORTRAN PROGRAMS Example 1: C C C FOP.TRA~ PBOGRA~ TO READ 10 VALUES FBOM A DISK FILE. COKPUTE THEIR SQUARES. A~D WRITE THE SQUARES OUT TO A SECCND DISK FILE. C DEFI:-JE DISK DIMENSIO:.\l A(10) C 10 20 DO 20 1=1.10 READ 3.10.A( I) FOR~AT (E) CO:-JTINUE C 30 DO 30 1=1.10 A(l)=A(U**2 CONTI:-JUE C 40 DO 40 1=1 J 10 WRITE 3.10.A(I) CONTINUE C STOP END .R FORT INPCT : SQCARE OUTPCT: 4-3 INPUT: DATAl OUTPUT: DATA2 tBS Example 2: .R ED IT INPeT:MTRIX* OUTPUT: R L C 2 10 15 20 30 40 21 MATRIX MULTIPLIER DIMENSI00.: A(36), B(36), C(36) TYPE 200 TYPE 201 READ 1 , 1 , I FORMAT ( I ) TYPE 202 DO 10 M=l,I DO 10 N=l,I INDX=M+I*(N-1 ) READ 1 , 2 , A ( I :-.JDX ) FORt'AT (E) COJTINUE TYPE 15 FORMAT C/ ) TYPE 202 DO 20 M=l,I DO 20 N=l,I INDX=r-'+I*(N-1 ) REAr; 1 ,2, B ( I NDX) C (INDX )=0 CCNT1NUE DO 30 M=l,1 DO 30 :-.J=l,1 DO 30 K=l,1 1C=N+I*(M-1 ) 1A=M+1HK-1 ) 1B=K+I*OJ-1 ) C ( I C) =C ( I C) +A ( IA HB ( IB) C00.:T1:-.JUE TYPE 15 DO 40 M=l,I TYPE 21 DO 40 :\1=1,1 I:\1DX=:\1+1*(M-1 ) TYPE. 2, C ( INDX) CO:\1TI:\1UE FORMAT C/ ) TYPE 15 4-4 200 201 202 FORlVIAT FORMAT FORMAT END (/,"MATRIX MULTIPLIER",/) ("IJIME:JSIO:J IS:") (I,"ENTER Ml>TRIX",1) rBS .R FORT I:JPUT:MTRIX* OUTPCT: MATRIX MULTIPLIER DIMENSIO:\T IS:3 E:JTER MATRIX 12 23 34 11 21 13 10 20 30 E:\TTER MATRIX 1.21.23.1 .01 121 12. 111 1.2 343 0.378863E+4 0.145641E+4 0.33LJ219E+LJ 0.283820E+4 0.256979E+4 0.2LJ6800E+LJ 0.119751E+5 0.474510E+4 0.105610E+5 rBS 4.5 SUMMARY OF FORTRAN-D STATEMENTS Table 4-1 Summary of FORTRAN-D Statements Explanation Statement and Form Arithmetic Statements v=e v is a variable (possibly subscripted); e is an expression. Control Statements GOTOn n is a statement number. GO TO (n ,n ,··· ,nn),i 1 2 n , .. . ,nn are statement numbers; i is a nonsubscripted 1 integer variable. IF (e) n ,n ,n 1 2 3 DO n i=k ,k ,k 1 2 3 e is an expression; n 1 ,n ,n are statement numbers. CONTINUE Proceed PAUSE Temporarily suspend execution. 2 3 n is the statement number ofa CONTINUE; is is an integer variable; k1 ,k ,k are integers or nonsubscripted 2 3 interger variables. 4-5 Table 4-1 (Cont) Summary of FORTRAN-D Statements Explanation Statement and Form STOP Terminate execution. END Terminate compilation; last statement in program. Specification statements DIME NSION v 1(n ) ,v (n },· .. , vn (nn) 1 2 2 DEFI NE device v 1 ' ... , vn are variab Ie names; n 1 ' ... , nn are integers. FORMAT (5 ,5 , ..• ,sn) 1 2 COMMENT s is a data field specification. Device is DISK or TAPE, system I/O device. Designated by C as first character on line. Input/Output Statements ACCEPT f,list f is a FORMAT statement number; list is a list of variables. TYPE f, list f is a FORMAT statement number; list is a list of variables. READ u , f , list u is an integer, representing device from which data is to be read. f is a FORMAT statement number; list is a list of variables. u is an integer, representing device onto which data will be written. WRITE u,f, list f is a FORMAT statement number; list is a list of variables. 4.6 FORTRAN-D COMPILER SYSTEMS DIAGNOSTICS Table 4-2 FORTRAN-D Compiler Systems Diagnostics Error Code Explanation 0240 System fi Ie error. One of the FORTRAN components cannot be found or the disk is full, preventing FORTRAN from proceeding. Try recalling FORT. 3100 Illegal operator on compiler stack t 3417 Pre-precedence error t 6145 Could not find FOSL on system device; if the error occurs, it may be necessary to reload FORT and FOSL. 6223 Error while loading .FT. t Error may be due to a compiler error or a machine malfunction. 4-6 Table 4-2 (Cont) F ORTRAN-D Compi ler Systems Diagnostics Error Code Exp Ianat ion 6226 Same as above 6257 Same as above 6724 No END statement on source device 6746 Same as above 7114 Same as above tError may be due to a compiler error or a machine malfunction. 4.7 FORTRAN-D COMPILER COMPILATION DIAGNOSTICS Table 4-3 FORTRAN-D Compiler Compilation Diagnostics Error Code Explanation 00 Mixed mode arithmetic expression 01 Missing variable or constant in arithmetic expression 03 Comma was found in an arithmetic expression 04 Too many operators in this expression 05 Function argument is in fixed-point mode 06 Floating-point variable used as a subscript 07 Too many variable names in this program 10 Program too large, core storage exceeded 11 Unba lanced right and left parentheses 12 Illegal character found in this statement 13 Compiler could not identify this statement 14 More than one statement with same statement number 15 Subscripted variable did not appear in a DIMENSION statement 16 Statement too long to process 17 Floating-point operand should hove been fixed-point 20 Undefi ned statement number 21 Too many numbered statements in this program 22 Too many parentheses in this statement 23 Too many statements have been referenced before they appear in the program 25 DEFINE statement was preceded by some executable statement 26 Statement does not begin with a space, tab, C, or number 4-7 4.8 FORTRAN-D OPERATING SYSTEM DIAGNOSTICS Table 4-4 FORTRAN-D Operating System Diagnostics Error Code Explanation 01 Checksum error on FORTRAN binary input 02 Illegal origin or data address on FORTRAN binary input 04 Disk input-output error t 05 High-speed reader error 06 Illegal FORTRAN binary input device 11 Attempt to divide by zero 12 Floating-point input data conversion error 13 Illegal op code 14 Disk input-output error t 15 Non-FORMAT statement used as a fORMAT 16 Illegal FORMAl specification 17 Floating-point number larger than 2047 20 Square root of a negative number 21 Exponential negative number 22 Logarithm of a number less thon or equal to zero 40 Illegal device code used in READ or WRITE statement 41 System device full, could not complete a WRITE statement 76 Stack underflow error tt n Stack overflow error tt tMay be caused by machine malfunction or operating system error. ttMay be caused by source program or loacting error; to correct, do the followi ng in descendi ng order. Q. Use Diagnose to determine where the error occurred. b. Recompile the source program. c. Examine source program {in particular the arithmetic statements and subscripted variables} • 4-8 CHAPTER 5 PAL -0 ASSEMBLER 5.1 INTRODUCTION TO PAL-D The Tss/8 Assembly System is composed of the PAL-D Symbolic Assembler, LOADER, and ODT. The PAL-D Assembler is used to translate the user's source program into an object program {binary or machine code}. LOADER is used to transfer the user's object program from the disk into core for debugging or execution. ODT (Octal Debugging Technique) is used to dynamically debug the object program which has been loaded into core using LOADER. The PAL-D Assembler is fully documented in the PDP-8 PAL-D Assembler, Programmer's Reference Manual (Order No. DEC-D8-ASAB-D), and its operation under Tss/8 is covered in an appendix in that document. PAL-D source programs ore usually written on-line using the EDIT program, which stores them in disk files. The Assembler checks for assembly languoge syntax errors and for undefined user symbols but does not check for logic errors. To call the PAL-D Assembler, type: .R PALD PAL-D responds by requesting INPUT: Type and enter the nome of the source program or programs to be assembled. A maximum of three files con be assembled together. PAL-D then requests OUTPUT; Type in the name of the new file in which PAL-D will store the assembled program in executable binary form. PAl-D then requests OPTION: For a normal assembly, strike the RETURN key.. If on assembly listing is not desired, respond to OPTION: with N. PAL-D then proceeds to ossemble the program: any errors in the program are indicated; the program symbol table is printed; and finally, an assembly listing of the source program is printed. When the listing is completed and the assembly finished, control is returned to Tss/8 Monitor. 5.2 TSS/8 PAL-D Because of the necessary hardware changes made for the Time-Shared System, PAL-D has been revised in the following ways: 5-1 a. PAL-O, under TSS/8, allows 245 (decimal) user symbols in addition to the permanent symbols (listed in section 5.4). All symbols reside in locations 5200 through 7777. The permanent symbol table has been revised to include a \I instructions peculiar to the Time-Sharing System. b. A CTRL/C (tC) from the Teletype terminates the assembly, and halts PAL-O, sending the user bock to the TSS/8 Monitor. 5.3 EXAMPLE OF A PAL-O PROGRAM .R PALL I :--JPUT: TYFE2 OUTPUT: B 10J2 OPTIOK: COL':JT CRLF LCCP OUT REG START 0415 0417 0406 0425 0416 0400 /PROGRAM TO TYPE OUT "0123456789" "'0400 START~ CLA JMS CRLF TAD (-12) DCA COL'0JT /ASCII CODE FOR ZERO (0) TAD (260 ) DCA REG TAD REG LOOP~ JMS OUT ISZ REG ISZ COUNT JMP LOOP JfVS CRLF HLT COU~T~ 0 REG~ 0 0400 0401 0402 0403 0404 0405 0406 0407 0410 0411 0412 0413 0414 0415 0416 7200 4217 1377 3215 1376 3216 1216 4225 2216 2215 5206 4217 7402 0000 0000 0417 0420 0421 0422 0423 0424 0000 1375 4225 1374 4225 5617 CRLF~ 0425 0426 0427 0430 0431 0432 0574 0575 0576 0577 rBS 0000 6046 6041 5227 7200 5625 0212 0215 0260 7766 OUT~ 0 TAD (215) JMS OUT TAD (212) J~S OUT JMP I CRLF 0 TLS TSF JMP • -1 CLA JMP I OUT 5-2 /ASCII FOR CARRIAGE RETUR:--J /LINE FEED 5.4 SYMBOL LIST FOR TSS/a Table 5-1 Symbol List for TSS/a Mnemonic Operation Code Event Time MEMORY REFERENCE INSTRUCTIONS AND TAD ISZ DCA JMS JMP 0000 1000 2000 3000 4000 5000 Logical AND Twos complement add Increment & skip if zero Deposit & clear AC Jump to subroutine Jump I GROUP 1 OPERATE MICROINSTRUCTIONS NOP lAC RAL RTL RAR RTR CML CMA CLL CLA 7000 7001 7004 7006 7010 7012 7020 7040 7100 7200 No operation Increment AC Rotate AC & link left one Rotate AC & link left two Rotate AC & link right one Rotate AC & link right two Complement link Complement AC Clear link Clear AC 1 3 3 3 3 3 2 2 1 1 IGROUP 2 OPERATE MICROINSTRUCTIONS HLT OST SKP SNL SZL SZA SNA SMA SPA 7402 7404 7410 7420 7430 7440 7450 7500 7510 Halts the computer Inclusive OR switch register with AC Skip unconditionally Skip on nonzero link Skip on zero link Skip on zero AC Skip on nonzero AC Skip on minus AC Skip on plus AC (zero is positive) ICOMBINED OPERATE MICROINSTRUCTIONS I CIA STL GLK STA LAS 7041 7120 7204- Complement & increment AC Set link to 1 Get link (put link in AC, bit 11) 7240 SetAC~-l 7604 Load AC with switch register 5-3 4 3 1 1 1 1 Table 5-1 (Cont) Symbol List for TSS/8 PSEUDO-OPERATORS DECIMAL EXPUNGE FIELD FIXTAB I Mnemonic OCTAL PAGE PAUSE TEXT XLIST Z Code Operation I Event Time lOT MICROINSTRUCTIONS Program Interrupt 6000 (See Time-Sharing System User's Guide DEC-T8-MRFB-D) KSF KCC KRS KRB 6031 6032 6034 6036 KSB SBC KSR 6400 Skip if keyboard/reader flag = 1 Clear AC & keyboard/reader flag Read keyboard/reader buffer Clear AC & read keyboard buffer, & clear keyboard flag Set keyboard break Set buffer control flags Read keyboard string lOT Keyboard Reader 6401 6030 1 2 3 2,3 Tel epri nter/punch TPC 6041 6042 6044 TLS 6046 SAS 6040 TSF TCF Skip if teleprinter/punch flag = 1 Clear teleprinter/punch flag Load teleprinter/punch buffer, Select & print Load teleprinter/punch buffer, Select & print, and clear Teleprinter/punch flag Send a stri ng 1 2 3 2,3 High-Speed Reader (Type PC02) RSF RRB RFC RRS 6011 6012 6014 6010 Skip if reader flag = 1 Read reader buffer & clear flag Clear flag & buffer & fetch character Read reader stri ng 1 2 Skip if punch flag ::= 1 Clear flag & buffer Load buffer & punch character Clear flag & buffer, load & punch Punch string 1 2 3 High-Speed Punch (Type PC03) PSF PCF PPC PLS PST 6021 6022 6024 6026 6020 5-4 3 2,3 Table 5-1 (Cont) Symbol List for TSS/a Mnemonic Operation Code Event Time DECtape Transport (Type TU55) and Control (Type TC01) DTXA DTSF DTRB 6764 6771 6772 Load status register A Skip on flags Read status register B 6411 6412 6413 6414 6415 6420 6421 User run time Time of day Return clock rate Date Quantum synchronization Skip on TSS/a User Set switch register Check status Assign device Release device Duplex Console Program Control URT TOO RCR DATE STM TSS USE SSW CKS ASD REL DUP CON 6430 6200 6440 6442 6402 6422 File Control WHO SIZE RFILE WFILE ACT REN OPEN CLOS PROT CRF EXT RED FINF 6616 6614 6603 6605 6617 6600 6601 6602 6604 6610 6611 6612 6613 Who Segment size Read file Write file Account number Rename file Open file Close file Protect file Create file Extend file Reduce file File information 5-5 3 1 2 5.5 ERROR DIAGNOSTICS Table 5-2 PAL-D Error Diagnostics Error Code Explanation BE Two PAL-D internal tables have overlapped - This situation can usually be corrected by decreasing the level of literal nesting or number of current page literals used prior to this point on the page. DE System device error - An error was detected when trying to read or write onto the system device; after three failures, control is returned to the Monitor. OF Systems device full - The capocity of the systems device has been exceeded; assembly is terminated and control is returned to the Monitor. IC Illegal character - An illegal character was encountered other than in a comment or TEXT field; the character is ignored and the assembly continued • 10 Illegal redefinition of a symbol - An attempt was made to give a previously defined symbol a new value by means other than the equal sign; the symbol was not redefined. IE Illegal equals - An equal sign was used in the wrong context. Examples: TAD A +=B A +B=C the expression to the left of the equal sign is not a single symbol or, the expression to the right of the equal sign was not previously defined II Illegal indirect - An off-page reference was made; a link could not be generated because the indirect bit was already set. NO The program terminator, $, is missing. PE Current nonzero page exceeded - An attempt was made to a. override a literal with an instruction, or b. override an instruction with a literal; this can be corrected by (1) decreasing the number of literals on the poge or (2) decreasing the number of instructions on the poge. PH Phase error - PAL-D has received input files in an incorrect order; assembly is terminoted and control is returned to the Monitor. SE Symbol table exceeded - Assembly is terminated and control is returned to the Monitor; the symbol table may be expanded to contain up to 1184user symbols by saving a file named .SYM on the system device. US Undefined symbol - A symbol has been processed during poss 2 that was not defi ned before the end of poss 1. ZE Page 0 exceeded - Same as PE except with reference to poge O. 5-6 CHAPTER 6 UTILITY PROGRAMS 6.1 EDIT TSS/8 Editor provides the user with a powerful tool for creating and modifying source files on-line. Its precise capabilities and commands are detailed in the PDP-8 Symbolic Editor Programming Manual (Order No. DEC-oB-ESAB-D). EDIT allows the user to delete, insert, change, and append lines of text; and then obtain a clean listing cI the updated file. EDIT also contains commands for searching the file for a given character. EDIT considers a file to be divided into logical units, called pages. A page of text is generally 50-60 lines long, and hence corresponds to a physical page of program listing. A FORTRAN-D program is generally 1-3 pages in length; a program prepared for PAL-D may be several pages in length. EDIT operates on one page of text at a time, allowing the user to relate his editing to the physical pages of his listing. EDIT reads a page of text from the input fi Ie into its internal buffer where the page becomes available for editing. When a page has been completely updated, it is written onto the output file and the next page of the input file is made available. EDIT provides several powerful commands for "paging" through the source file quickly and conveniently. NOTE The end of a page of text is marked by a fonn feed (CTRL/L) character. Form feed is ignored by all TSS/8 language processors. To ca II the Edi tor, type: .R EDIT EDIT responds by requesting INPUT: Type and enter the name of the source file to be edited. If a new file is to be created using EDIT, there is no input file. In this case, strike the RETURN key. EDIT then requests OUTPUT: Type in the name of the new, edited, file to be created. The name of the output file must be different from the name of the input file. If EDIT is being called to list the input file, there is no need to create an output file; strike the RETURN key. When EDIT sets up its internal files and is ready for a command, it rings the bell on the Teletype. 6-1 For example: .R EDIT INPUT: vlXZOLD OuTPUT: XYZNEW (Bell rings at this point.) 6. 1. 1 Summary of Symbolic Editor Operations Table 6-1 Summary of Symbol ic Editor Operations Special Characters Carriage Return (RETURN Key) Back Arrow (-) Function Text Mode - Enter the line in the text buffer. Command Mode - Execute the command. Text Mode - Cancel the entire line of text, continue typing on same line. Command Mode - Cancel command. Editor issues a ? and carriage return/line feed. Rubout (\) Text Mode - Delete from right to left one character for each rubout typed. Does not derete past the beginning of the line. Is not in effect during a READ command. Command Mode - Same as back arrow. Form Feed (CTRL/FORM Combination) Text Mode - End of inputs return to command mode. Period (.) Command Mode - Current line counter used as argument alone or in combination with + or - and a number (., .+5L). Slash (/) Command Mode - Value equal to number of last line in buffer. Used as argument (/-5,IL). Line Feed ( l ) Text Mode - Used in SEARCH command to insert a CR/LF combination into the line being searched. Right Angle Bracket (» Command Mode - List the next line (equivalent to .+lL). Left Angle Bracket «) Command Mode - List the previous I ine (equivalent to . -1 L). Equal Sign (+) Command Mode - Used in conjunction with. and / to obtain their value ( .=27). Tabulation (CTRL/TAB Key Combination) Text Mode - Produces a tabulation which, on output, is interpreted as spaces if bit 1 of the switch register is set to 0, or as a tab character/ rubout combination if bit 1 is set to 1. 6-2 6. 1.2 EDIT Command Summary Table 6-2 EDIT Command Summary Command Format(s} READ R Read text from the input file and append to buffer until a form feed is encountered. APPEND A Append incoming text from keyboard to any already in buffer until a form feed is encountered. LIST L list the entire buffer. nL list line n. m,nL list lines m through n inclusive. P Output the contents of the buffer to the output file, followed by a form feed. nP Output line n, followed by a form feed. m,nP Output lines m through n inclusive followed by a form feed. TERMINATE T Close out the output fi Ie and return to TSS/a Mon itor. NEXT N Output the entire buffer and a form feed, kill the buffer and read the next page. nN Repeat the above sequence n times. KILL K Ki II the buffer (i.e., delete all text lines). DELETE nD Delete line n of the text. m,nD Delete lines m through n inclusive. PROCEED INSERT Meaning Insert before line 1 all the text from the keyboard until a form feed is entered. nI Insert before line n until a form feed is entered. nC Delete line n, replace it with any number of lines from the keyboard until a form feed is entered. m,nC Delete lines m through n, replace from keyboard as above until form feed is entered. MOVE m,n$kM Move lines m through n inclusive to before line k. GET G Get and list the next line beginning with a tag. SEARCH S Search the entire buffer for the character specified (but not echoed) after the carriage return. Allow modification when found. TSS/a Editor outputs a slash (/) before beginning a SEARCH. CHANGE 6-3 Table 6-2 (Cont) EDIT Command Summary 6.2 Meaning Command Format(s) SEARCH (Cont) nS Search line n, as above, allow modification. m,nS Search lines m through n inclusive, allow modification. END E Output the contents of the buffer. Read in any pages remaining in the input file, outputting them to the output file. When everything in the input file has been moved to the output file, close it out and return to the TSS/8 Monitor. E is equivalent to a sufficient number of N's followed by a T command. tC CTRL/C Stop listing and return to Command Mode. LOADER TSSi8 LOADER is used to load programs in BIN format from a disk file into the user's core area for execution. These files in BIN format can be created by PAL-D in the course of an assembly or they can be loaded from paper tape using PIP (see the PIP writeup for special instructions on loading BIN format tapes). To call LOADER, type: .R LOADER LOADER responds by asking for INPUT: Respond by entering the name of the file or files to be loaded. Although many System Library Programs allow multiple input files, the LOADER uses this feature to special advantage. Because it loads the files in the order they are typed, LOADER can be used to load patches and overlays. After it has requested INPUT, LOADER requests OPTION: For normal operation strike the RETURN key; LOADER is able to load into any part of core below nso. If the program to be loaded is to be debugged, respond to OPTION: with D. This will cause ODT to be loaded along with the input files and started. ODT indicates that it is ready by printing a second line feed. ODT uses locations 7000 through 7577; and if loaded along with a program which uses any of these locations, the result of the load is unpredictable. Example 1: Normal Operation .R LOADER INPUT: MAIN~ OPTION: PATCHl~ PATCH2 rES 6-4 Example 2: Load ODT with Input File .R LOADER INPUT:PROG1 OPTION: 0 As seen in the first example, LOADER returns control to Monitor when it is finished. The user can then start the program by using the Monitor command START. For example, LOADER can be used to load and run the short program given as an example in the section on PAL-D (see Chapter 5, Section 5.3) . . R LOADER INPUT: BIN2 OPTION: rBS .START 400 0123456789 rBS NOTE The BIN format files loaded by LOADER include a checksum. If LOADER detects a checksum error while loading, it types "LOAD ERROR" and terminates the load. 6.3 ODT (Octal Debugging Technique) ODT is a powerful octal debugging tool for testing and modifying PDP-8 programs in actual machine language. It allows the user to control the execution of his program and, where necessary, make immediate corrections to the program without the need to reassemble. The complete command repertoire of ODT is documented in the ODT Manual (Order No. DEC-OB-COCO-D). OOT (on TSS/B) is the high-core version which resides in locations 7000 through 7577. The paper-tape output commands of regular ODT are not available in TSS/8 OOT. To call ODT, type: .LOAD 2 ODTHI 0 7000 .START 7000 If ODT is to be used to debug a program being loaded with LOADER, ODT can be loaded and started directly by specifying the Debug (D) option to LOADER. 6-5 6.3.1 Programming Notes aOT executes an SRA (Set Restart Address) as part of its initialization process. As a result, typing CTRL/C always returns control to aOT. If the program being debugged sets up its own restart address, typing CTRL/C transfers control to the new restart address. It is necessary to type tBS followed by START 7000 to force control back to aOT. Every time aOT regains control, it puts the Teletype in duplex mode. Users debugging programs which do not operate in duplex mode, should be aware of this fact. aOT saves the state of the delimiter mask, when it regains control via a breakpoint. The state of this mask is restored on a Continue (C) command, but not on a Ga (G) command. 6.3.2 aOT Command Summary Table 6-3 aOT Command Summary Meaning Command nnnn/ Open register designated by the octal number noon. / Reopen latest opened register. RETlRN Close previously opened register. LINE FEED (ll Close register and open the next sequential one for modification. Up Arrow (t) (SHIFT/N) Close register, take contents of that register as a memory reference and open it. Back Arrow (-) (SHIFT/a) Close register open indirectly. Illegal Character Current line typed by user is ignored, aOT types ?CR/LF. nnnnG Transfer program control to location nnnn. nnnnB Establish a breakpoint at location noon. B Remove the breakpoint. A Open for modification, the register in which the contents of AC were stored when the breakpoint wos encountered. C Proceed from a breakpoint. nnnnC Continue from a breakpoint and iterate past the breakpoint nnnn times before interrupting the user's program at the breakpoint location. M Open the search mask register, initially set to 7777. It may be changed by opening the search mask register and typing the desired value after the value typed by aOT, then closing the register. l (line feed) Close search mask register and open next register immediately following, containing the location at which the search begins. It may be changed by typing the lower limit after the one typed by aOT, then closing the register. 6-6 Table 6-3 (Cont) OOT Command Summary Command Meaning l (line feed) Close lower search register, open next register containing the upper search limit initially set to 7000 or 1000 (location of OOT). It may be changed by typing the desired upper limit after the one typed by OOT and closing the register wi th a carriage return. nnnnW Search the portion of core as defined by the upper and lower limits for the octal value nnnn. 6.4 CAT TSS/8 Monitor maintains a library of disk files for each user. The System Library Program CAT is used to obtain a catalog of the contents of this library. For each file, CAT types the size of the file in units of disk segments. The size of a disk segment may vary among installations. Generally, it is 256 (decimal) words of disk storage. The protection code for the file is also given. (See the section on the PROTECT Monitor command (Chapter 9) for a precise explanation of protection codes.) If the program was created by any of the System Library Programs, it has a protection code of 12, meaning that other users can read the file, but only the owner can change it. To call CAT, type: .R CAT 6.4.1 Example of CAT Usage .R CAT DISC FILES FOR USER NAME BAS016 BAS 116 PRIME MATRIX SOLVE PROG TYPE2 BIN2 TEMP27 SIZE 1 8 3 11 2 15 312 PROT DATE 12 12 12 12 12 12 12 12 12 TOTAL DISC SEGMENTS: 14 NOV 69 14 NOV 14 NOV 14 :-JOV 14 NOV 14 NOV 14 NOV 14 NOV 14 :-JOV 14 NOV 43 rBS 6-7 69 69 69 69 69 69 69 69 69 6.5 SY ST AT (System Status) It is frequently useful to know the status of the system as a whole; how many users are on-line, where they are, what they are doing, etc. The SYSTAT program provides this capability. To call SYSTAT, type: .SYSTAT .R SY5TAT SYSTAT responds by printing on the first line: the version of the TSS/8 Monitor being run, the time, and the date. SYSTAT reports the uptime which is the length of time in hours, minutes, and seconds since the system was last put on-line. SYSTAT lists all on-line users. Each user is identified by his account number. The job number assigned to him and the number of the console he is using are indicated, as is the particular System Program he is running. The exact running state of each user, whether he is actually running (RUN), typing in (KEY) or out (TTY), doing input/output on another system device (10 or FIP), or not running (t8), is indicated. The amount of computer time used by each user since he logged in is given. If more users are on-line than the system has core fields to hold them, the fact that the system is swapping is reported. The number of free core blocks used internally by TSS/8 Monitor for Teletype buffering and various other purposes is typed out. Then SYSTAT reports any unavailable devices, i.e., devices which are assigned to individual users. The job to which they are attached and their status (AS if they are assigned but not active, AS+INIT if they are assigned and active) is also indicated. Finally, the number of available segments of disk storage is reported. 6.5.1 Example of SYSTAT Usage .R SYSTAT STATUS OF TSS/8.19 DEC PDP-8 III AT 10:27:33 UPTIME 84:12:33 O~ 13 OCT 69 JOB WHO WHERE WHAT STATE RU~TIME 1 2 3 4 5 7 11 12 14 15 17 5440 10 3141 4771 4772 333 7 1221 2000 222 5440 K00 K14 K15 K16 K17 K04 K21 K06 K03 K12 K11 SYSTAT COpy EDIT FORT PALD BASIC FOCAL BASIC PIP FOCAL FORT RUN KEY KEY RUN TTY 01:00:12 00:00:21 00:00:03 00:09:42 00:00:13 01:37:12 00:00:57 00:03:51 00:16:23 00:22:17 00:22:19 SWAPPING 28K FREE CORE=238 6-8 10 RUN 1B RUN KEY TTY BUSY DEVICES DEVICE JOB v.'HY R 1 p 3 3 AS+I:'-JIT AS AS AS+I:'-JIT D0 D5 2 412 FREE DISC SEGMENTS rBS 6-9 CHAPTER 7 PROGRAMS FOR PAPER TAPE AND DECTAPE CONTROL 7. 1 PIP (Peripheral Interchange Program) All TSS/8 System Library programs discussed in previous sections operate only on files which are on the disk. Disk is a convenient storage medium for many files; however, it may be more useful to keep some programs on paper tape. PIP provides a convenient means of transferring files between disk and paper tape, for those users who wish to preserve copies of their files off-line. 7.1.1 PIP Conventions PIP may be considered a link between disk file storage and paper-tape devices. To punch out a desired file, PIP obtains that file from the disk and punches it on paper tape. Similarly, to load a paper tape, PIP inputs the tape from the reader, then outputs it to a disk file. The way files are named is important to PIP. Files on disk are always narned. Paper tapes, on the other hand, have no names as far as the system is concerned (although the user can label the physical tape in any manner he chooses). Paper tapes never have file names; therefore, PIP uses the absence of a file name to indicate a paper tape (absence of a file name is indicated by striking the RETURN key). The way in which INPUT: and OUTPUT: is indicated provides the means for determining the direction of file transfer. If PIP is to get its input from the disk, the input is a file name; if the input is from a paper tape no fi Ie name is given. Similarly, if PIP is to output to the disk, the file name is indicated; if output is to paper tape, no name is given. To call PIP, type: .R PIP 7. 1. 2 Using PIP to Load a Paper Tape to a Disk Fi Ie To move a paper tape to disk, strike the RETURN key when PIP requests INPUT: Since PIP must output to the disk, respond to OUTPUT: by typing a file name. When PIP requests OPTION: type T to indicate that the 7-1 paper tape is being loaded from the Teletype reader. For example: .R PIP INPUT: OUTPUT: FILEl OPTION:T The paper tape, in the low-speed reader, is read in and stored in the system as ALE1. 7.1.3 Using PIP to Punch Out a Disk File To move a disk fi Ie onto paper tape, the use of file names is reversed since PIP must input a disk file and output it to paper tape. The option remains the same. For example: .R PIP INPUT:FILEl OUTPUT: OPTION:T The contents of FILE1 are then punched out at the Teletype. 7.1.4 Using PIP with the High-Speed Reader and Punch PIP can also be used with high-speed paper-tape devices. The format of the INPUT: and OUTPUT: responses is the same. However, for the high-speed reader, the option is R and for the punch it is P. Since the reader and punch are assignable devices, they are not always available (other users may have one or both assigned). Therefore, whenever PIP is given a command which utilizes one of these devices, it checks to make sure that the device is available. If it is, PIP automatically assigns it (thus, it is not necessary to assign the device before running PIP). If the device is unavailable, PIP so informs the user. For example: INPUT: OUTPUT: ABCD OPTION:R PIP reads the paper tape in the high-speed reader and stores it in the system as ABeD. INPUT:ABCD OUTPUT: OPTION:P 7-2 PIP punches out file ABCD on the high-speed punch. I0JPUT:ABCD OUTPUT: OPTION:P DEVICE NOT AVAILABLE The punch is assigned to another user, or there is no punch on the TSS/8 system, or there is one but it is turned off. 7.1.5 Using PIP to Transfer BIN Format Files The examples above work for all ASCII fi Ie transfers (except BASIC programs, explained below.) They are also valid for punching out BIN format files with either high- or low-speed devices. Loading BIN format tapes, however, is a specia I case. BI N format tapes must end with trai ler codes. The easiest way to ensure that they do is to cut off the tape near the end of the trailer code. Failure to do this (or cutting it off very unevenly) does not prevent PIP from loading tape into the disk file. However, later attempts to load the file with LOADER will result in load errors. NOTE Sorne TSS/8 installations will not allow any BIN format tapes to be loaded from the low-speed reader. 7.1.6 Moving Disk Files PIP can be used to move the contents of one fi Ie into another. This is often useful in copying a fi Ie from another user's library (providing the file is not protected) into your own library. To copy from disk file to disk file, specify a file name for both input and output. Reply to OPTION: by striking the RETURN key. For example: INPUT:FOCAL 2 OUTPUT:FOCALX OPTION: PIP gets FOCAL from account number 2's library and moves it into the file FOCALX. 7.1.7 Deleting Disk Files One of the principal reasons for punching out files on paper tape is to free disk space. Once punched out, the disk file is no longer needed. PIP offers a convenient means of deleting files, the Delete option: 7-3 INPUT:ABCD OUTPUT: OPTION:D PIP deletes file ABCD, provided that the file is not protected against being changed. 7.1.8 Transferring BASIC-8 Files BASIC-8 stores its programs in a unique file format. Therefore, it is not possible to load or punch BASIC-8 files in the usual way. To provide a convenient means of handling BASIC-8 programs, the B option is available in PIP. The B option is used for both reading and punching BASIC-8 programs. The responses to INPUT: and OUTPUT: indicate the direction of the transfer; the high-speed reader or punch is always assumed for the B option. (To read or punch tapes at low-speed, use BASIC-8 itself.) PIP assumes that any BASIC-8 tapes it loads are clean and error-free. Only tapes actually created by BASIC should be loaded with PIP. Tapes created off-line, and thus liable to contain errors, should be loaded lowspeed by BASIC-8 itself with the TAPE command. 7.1.9 Transferring SAVE Format Files Another special TSS/8 file format is that of the SAVE files, those programs directly executed by TSS/8. (The System library Programs are examples of SAVE format files.) PIP provides the S option, to allow these files to be punched on paper tape. SAVE format tapes make sense only to TSS/8 PIP. They cannot be input to any other System Program. The responses to INPUT: and OUTPUT: indicate the direction of the transfer; the high-speed reader or punch is always assumed for the S option. NOTE SAVE format tapes include a checksum. If PIP detects an incorrect read, it prints LOAD ERROR, and terminates the load, repeating the request for input. 7-4 7. 1. 10 Summary of PIP Options Explanation 7.2 T Transfer a file between the disk and the Teletype reader or punch. The response to INPUT: and OUTPUT: indicates the direction of the transfer. R Read a tape from the high-speed reader and store it as a disk file. P Punch out the contents of a disk file on the high-speed punch. D Delete the file specified for input. B Transfer a BASIC-8 program file between the disk and the high-speed reader or punch. The response to input and output indicates the direction of the transfer. S Transfer a SAVE format file between the disk and the high-speed reader or punch. The response to INPUT: and OUTPUT: indicates the direction of the transfer. COPY Many TSS/8 installations include one or more DECtapes. For these installations, DEC tape provides a convenient and inexpensive means of fi Ie storage. The COPY program is used to transfer files between disk and DECtape. 7.2.1 Using and Calling COpy COPY is the intermediary between disk and DECtape. To write a disk file out to DECtape, COPY inputs the file from the disk, then outputs it to the DECtape. To bring a DECtape file onto the disk, COPY inputs from the DECtape, then outputs to the di sk. Files kept on DECtape have file names just as they do on the disk. To avoid confusion, the user must tell COpy where t~e fi Ie is to be found. If it is on DECtape, the DECtape designation and the number of the DECtape unit must preface the file name. The DECtape number is always separated from the file name by a colon. Thus D1 :FILEl means the file name ALEl on the DECtape which is currently mounted on DECtape unit number olle. The number of available tape units varies among installations. The maximum is eight, (numbered 0 - 7). If a file name is not prefaced by a DECtape number, then this file is assumed to be on the system disk. Files stored on DECtape do not have protection codes in the sense that disk files do. They are, however, protected against unauthorized access. When a DECtape is not mounted, it is not available to any user. When it is mounted, it is available only to the user who has assigned the DECtape unit on which it is mounted. Even then it can not be altered unless the DECtape unit is set to WRITE ENABLE. Users should be sure to assign a DECtape unit before mounting their tape, and dismount the tape before releasing the device. Normally, the DECtape unit to be used should be assigned before calling COpy. 7-5 .ASSIG:J D 4 D 4 ASSIG:JED .R COpy To call COPY, type: .R COpy COpy responds by asking which option the user wishes to employ. The COpy options are discussed below. 7.2.2 Loading Files from OECtape To load a file onto the disk from OECtape, use the COPY option. When COPY requests OPTION- respond with COPY, or C, or strike the RETURN key (the COPY option is assumed). When COPY requests INPUT-type the number of the OECtape unit on which the file can be found {OO, 01, 02, 03, 04, 05, D6, or 07}followedby a colon and the name of the file on the OECtape. When COPY requests OUTPUT- type and enter the name to be given to the output file on the disk. COPY then moves the OECtape file onto the disk. {When using COPY, it is not mandatory to insert a space between the device designator and the device number.} For example: OPTIO:J- COPY INPUT - D4:PQR OUTPUT - PQR If for any reason, COPY cannot find the OECtape file specified for input (tl,e specified OECtape is unavailable or nonexistent, or the file name does not exist on that OECtape), COpy prints a ? and repeats the request for input. If the disk file specified for output already exists, COpy prints a ? and repeats the request for output. COpy does not overwrite an existing file. For example: OPTION - C INPUT - D9:PQR ?INPUT - D4:PQRS ?INPUT - D4:PQR OUTPUT - FILEl ?OUTPUT- PQR 7-6 7.2.3 Saving Disk Files on DECtape Saving a disk file on DECtape is very similar to loading one. The option is still COPY. For input, respond with the name of the file on the disk. For output, type the DECtape unit number, colon, and the name to be given to this file. For example: OPTIO)] - C npUT - ABCD OUTPUT - D4:ABCD If COpy cannot find the file on the disk, or if it is protected, COpy prints a ? and repeats the request for in- put. If COpy cannot set up the desired DECtape file (the specified DECtape does not exist or is unavailable, or it is not WRITE ENABLED, or a file by that name already exists on the tape) COP'( types a ? and repeats the request for output. 7.2.4 Listing Directories COpy ca" be used to list the directory of a device. To list a directory, respond to OPTION-by typing LIST, or just L. COpy then asks which device it is to list. To list a DECtape's directory, respond with the device name (DO, .•. ,D7). Do not follow it by a colon. For example: OPTIO)] - LI ST DEVICE - D(l 1298. FREE BLOCKS "JAt><E XCOPY XBASIC FOO SIZE 32 66 66 DATE 6-)]OV-69 6-)]OV-69 6-)]OV-69 The unit of DECtape storage is the block, which is 128 (decimal) words. Because the unit of disk storage, the segment, is generally 256 words, a file occupies twice as many blocks of DECtape storage as it did segments on the disk. COpy can also be used to list the user's disk directory. Use the LIST option, but respond to DEVICE- by simply striking the RETURN key. The directory listing is similar to the listing obtained by running the CAT program. 7.2.5 Deleting Files COpy can be used to delete files, either on the disk or on a selected DECtape. To delete a file, respond to OPTION- by typing DELETE, or just D. Respond to INPUT - by typing the name of the file to be deleted. 7-7 If the file is on a DECtape, preface the file name with the DECtape unit number and a colon. For example: OPTION - DELETE I:-vPUT - D4:ABCD If COpy cannot find the file to be deleted, or having found it, cannot delete it (it is a protected disk file or a DECtape file on a unit which is not WRITE ENABLED), COPY prints a ? and repeats the request for INPUT-. 7.2.6 Deleting All Files on a Device COpy can be used to delete all existing files on a device. To do so, respond to OPTION- by typing ZERO, or just Z. When COpy requests INPUT- respond with the name of the device. To delete all files on the disk, strike the RETURN key. The ZERO option should also be used to format a blank DECtape before attempting to copy any files onto it. For example: OPTION - ZERO INPUT - D4 or OPTION INPUT - Z COpy cannot delete files from a DECtape unless it is WRITE ENABLED. It cannot delete disk files which are write protected. 7.2.7 Summary of COpy Options Option Explanation COpy Transfer a file between disk and DECtape. LIST list a directory. DElETE Delete a file. ZERO Delete all files. 7-8 7.2.8 Example of COpy Usage .ASSIG:'-J D 5 D 5 ASSIGNED .R COPY OPTIO:'-J - ZERO DEVICE - D5 OPTI00J - LIST DEVICE - D5 1462. FREE BLOCKS 0JAME SIZE DATE OPTIO:'-J - LIST DEVICE - DISK FILES FOR USER 5440 ON 13-0CT-69. :'-JAME SOLVE SIZE 1 PROT 12 DATE 13-0CT-69 TOTAL DISK SEGME:'-JTS: OPTIO:'-J - COpy I:-JPUT - SOLVE OUTPUT - D5: SOLVE OPTIO:'-J - DELETE INPUT - SOLVE OPTION - LIST DEVICE - D5 1460. FREE BLOCKS NAME SOLVE SIZE 2 DATE 13-0CT-69 7-9 OPTION - LIST DEVICE DISK FILES FOR USER 5440 O:J 13-0CT-69. :JAME SIZE PROT DATE TOTAL DISK SEGME:JTS: 0 COPY INPUT- D5:S0LVE OUTPUT- ABCD OPTIO~- OPTIO:J- LIST DEVICEDISK FILES FOR USER 5440 :JAME ABCD SIZE TOTAL DISK 1 PROT 12 O~ 13-0CT-69. DATE 13-0CT-69 SEGME~TS: OPTION- tBS .RELEASE D 5 7-10 CHAPTER 8 ADVANCED MONITOR COMMANDS 8.1 INTRODUCTION Chapter 2 described the fundamental Monitor commands, i.e., those needed to utilize existing TSS/8 System Library Programs. The TSS/8 Monitor also provides powerful commands for users who wish to create their own Library Programs. To use the System Library Programs described in Chapters 3 through 7, it was not necessary to be fami! iar with the actual machine that runs them, the PDP-8/I. To create new Library Programs for TSS/8, this is necessary because they are written in the PDP-8 assembly language. The user codes his programs for a 4K PDP-8, subject to the time-sharing conventions discussed in the following chapter. The programs are created with TSS/8 EDIT, then assembled by PAL-D a .... d loaded by LOADER. Only at this point are they able to be run by TSS/8. In the course of this program development, the same program exists in many formats. The source program is a disk file containing ASCII characters in an Editor format. assembled program in BIN format. PAL-D reads the file and translates it into a seco .... d file, the Neither of these files is capable of being executed directly by TSS/8. The BIN format tape must be loaded into core by LOADER before it can actually be executed. At this point it is possible to save the program in a file format that is directly executable by TSS/8. Such a file, referred to as a SAVE format file, contains an image of the user's core area after the program has been loaded by LOADER. These SAVE format files differ from all the files which are created by System Library Programs and cannot be executed directly by TSS/8. Thus, it is not possible to save a BASIC program, (for example FILE1, while run"ing BASIC) then return to Monitor, type R FILE1, and get meaningful results. The program in FILE1 must be executed under control of the BASIC language processor. Only SAVE format files can be called into execution directly by the R command. All TSS/8 System Library Programs are stored in SAVE format. NOTE In the following examples, Sn, Cn, and Dn are used to stand for alphanumeric strings (such as file names), octa I numbers, and dec ima I numbers, respective Iy. 8-1 A number of Monitor command conventions are available to make the commands easier to use. First, more than one command may be typed on a line. Individual commands are separated by a semi-colon (i). Second, only enough characters of a command to uniquely specify it need be typed. Thus, DEPOSIT can be abbreviated DE or DEP. .LOAD FILEl; DEP 20 7000; ST 200 / is exactly equivalent to: .LOAD FILEI .DEPOSIT 20 7000 .START 200 These conventions are avai lable for the elementary Monitor commands as well. They are, however, especially convenient for the advanced commands. 8.2 CONTROL OF USER PROGRAMS Once a PAL-D program has been loaded by LOADER, several Monitor commands are available for controlling its execution. Explanation Command START Cl Start execution of a user program at location C 1. When a program is started, keyboard input is no longer interpreted as commands to Monitor. Input characters are passed to the running program. START Cl clears the user's AC and link. START Restart execution of a user program where it was interrupted (either by execution of an HLT or by tBS typed at the keyboord). When the START command is given, the program's state is restored. DEPOSIT Cl C2 .•. Cn Deposit the octal values C2 to Cn in the locations starting at C 1. DEPOSIT is used to make small octal modifications to a user program. No more than 10 deci'Tlal locations can be modified by a single DEPOSIT instruction. EXAMINE Cl Print the octal contents of location C 1. EXAMINE Cl Dl Print the contents of Dl locations starting at C 1. WHERE Print the present status of the user program. The user's AC, PC, and LINK are printed. If the TSS/8 processor includes the extended arithmetic element, two additional registers, the SC and MQ are printed. It is possible to give these uti lity commands whi Ie a user program is running. The CTRL/B character (tB) gets the attention of the Monitor without stopping program execution. (tB followed by the S command stops the program.) tB can be used together with the WHERE command to follow program execution. After executing these commands, Monitor does not put the Teletype bock into Monitor mode. 8-2 • 8.3 DEFINING DISK FILES TSS/8 Monitor allows the user to save core images of his program on the disk for future use. However, before saving such a core image, the user must define a disk file in which to save it. Disk files, like the user's core, are made up of 12-bit words. Unlike the user's core, which is always 4K in size, a file can be any size. The unit of disk file storage is the segment; in most installations a segment is 256 (decimal) words but can be from 128 to 1024 words long. Files are at least one segment long when created and grow by appending additional segments to the end of the file. In defining a file, the user first creates it, then extends it to whatever length he needs. To save a whole 4K image on a system with a segment size of 256 (decimal) words, a 16 segment file is required. If only part of the contents of the user's core is to be saved, a correspondingly smaller file can be used. A file can be created at any time. However, to modify or redefine it in any way, the file must be open. Up to four files can be open for a user simultaneously. Opening a file connects it to an internal open file number (0, 1,2, or 3). Once a file is open, it is referenced by this internal file number rather than by its file name. 8.3.1 Creating a Disk File CREATE S1 Define a one segment area of disk space and associate with it the name given in the command line. The fi Ie name can be one to six alphanumeric characters of which the first must be a letter. Creating a file deletes any existing file of the same name, unless that file is write protected. When created, files are always one segment in size. A new file is arbitrarily assigned a protection code of 12, meaning that other users may access it but only the owner may change it. Until it has been written in, the contents of a newly defined file are undefined. 8.3.2 Opening and Closing a File To use a file, it must first be opened. A file can be opened on any of four internal file numbers: 0, 1, 2, or 3. OPEN Cl S1 Associate the file S1 with the internal file number C1. A user can have up to four files open at a time. If a file is open on an internal file number for which a file is already open, that file is first closed. For example: .CREATE .OPE)J 1 AB AB AB is now an open file and can be referenced as file 1. 8-3 An open file can be closed at any time by means of the CL05E comrmnd. Close the file presently open on internal file number C1. CL05EC1 Once closed, a file cannot be accessed in any way until it ;s reopened. It is poss;ble to close more than one file with a single command . • CLOSE 0 1 2 3 8.3.3 Extending, Reducing, and Renaming a Disk File When created, a file is one segment long. If a larger file is needed, the original file can be extended. EXTEND C1 D1 Extend the file presently open on internal file C1 by D1 segments. Extending a file adds one or more segments to the end of that file. The contents of the old part of the file are not changed. Until written in, the contents of the newly added segments are unspecified. An existing file may be reduced in size by means of the REDUCE command: REDUCE C1 D1 Reduce the file presently open on internal file C1 by D1 segments. Reducing a file deletes the number of segments indicated from the end of the file. The contents of remaining segments of the fi Ie are unchanged. If a file is reduced to zero segments, or if D1 is greater than the number of segments in the file, it is deleted entirely. An example of the creation and deletion of a 4K file: .CREATE .OPE:-J 3 .EXTEND .REDUCE FOURK FOURK 3 15 3 16 Existing opened files can be renamed. Renaming a file does not change its contents in any way. RENAME C1 51 8.3.4 The fi Ie open on internal file number C 1 is given the new name 51. Protection Codes The user can protect his files against unauthorized access. He can also specify the extent of access certain other users can have to his files. For example, a user's associates can be permitted to look at the data of certain files but not permitted to alter that data. 8-4 When it is created, a file is assigned a protection code of 12. This protection code is defined below and can be changed (see Appendix F), but on Iy by the owner of that fi Ie. PROTECT C1 C2 The fi Ie open on interna I fj Ie number C 1 is given the protection code C2. The protection code is actually a 5-bit mask. Each bit specifies a unique level of protection. (See the PROTECT lOT in Chapter 9 for the meaning of each bit.) File protection masks (C2) are assigned as follows: Read protect against users whose project number differs from owner's. 2 Write protect against users whose project number differs from owner's. 4 Read protect against users whose project number is same as owner's. 10 Write protect against users whose project number is same as owner's. 20 Write protect against owner • To change the program the owner must change the protect code. Protection codes are determined as the unique sum of any of the above codes. Some of the more common protection codes are as follows: • PROTECT 1 12 Allow other users to access the fi Ie but not change it. · PROTECT 1 17 Allow only the file owner to read the file. He can also change it. • PROTECT 1 37 Allow on Iy the fi Ie owner to read the fi Ie • He cannot, however, change it. (T 0 change it, he must first change the protection.) • PROTECT 10 Allow other users to access the fi Ie and change it. Finally, the user can ask what file is open on a given internal fi Ie number by means of the F (Fi Ie information) command. F C1 Type out the following information about the file presently open on internal file C1: a. b. c. d. Account number of file owner. Name of file. Protection code. Size of file in segments (decimal). For example: •F 1 0010 TYPE 0012 2 8-5 8.3.5 Error Conditions There are a number of error conditions which prevent the execution of the file definition commands (as previously described). One of the following error messages is typed by Monitor in the event that an error condition is detected: FILE NOT OPEN An EXTEND, REDUCE, PROTECT, or RENAME command has been issued for an internal file number for which no file is open. FILE IN USE An EXTEND, REDUCE, PROTECT, or RENAME command has been issued for a file which is in use elsewhere by another user. Because changing a file which is being used (i.e., has been opened) could disrupt another user's work, under these conditions such a change is prohibited. NOTE Changing a file which the user himself has opened on another internal file results in this error message. 8.4 DIRECTORY FULL A CREATE command has been issued, but the user's directory is full. He can delete any of his files to make room for the new file. PROTECTION VIOLATION An attempt has been made to change a file which is write protected against the user. FILE NOT FOUND The user has attempted to OPEN a nonexistent file. FAILED BY n SEGMENTS The user has attempted to extend a fi Ie, but the system has run out of disk segments. The number of segments requested, but not ava i lab Ie, is typed out. SAVING AND RESTORING USER PROGRAMS Ol1ce a file !'as been defined, the user can save all or any part of his user core in the file. Files and user core are addressed in the same way, by 12-bit words. The user can transfer his file into any part of core. The SAVE command requires one to five parameters. The name of the file to be written into must always be given. If the file is not in the user's own library, the appropriate account number is entered before the file name. (Writing into a file owned by another user is subject to file protection.) In either case, the parameters are separated by spaces. SAVE Write the indicated section of core out into the indicated file. If no parameters follow the file name, Monitor starts at location zero of the user's core and saves it in location zero of the disk file. It continues to write core locations into the disk file until: (a) it has written out the whole 4K or (b) it has filled the file. Either condition completes the SAVE. 8-6 The user can further define his SAVE command by indicating specific ports of core to be saved in specific parts of the disk file. He does this by typing one to three parameters foUowing the file name. The first parameter following the file name indicates a specific disk file address at which to begin writing. The second parameter following the file name indicates a specific core address at which to terminate the transfer. If only the first two parameters are typed, the transfer terminates when either the end of -:ore or the end of file is reached. SAVE S1 SAVE C1 S1 Assuming that a disk file S1 exists, and that it is not write protected, the contents of core is saved in 51. In the first case, S1 is assumed to be in the library of the user giving the command. In the second case, it is assumed to be in the library of the user whose account number is C 1. SAVE S1 C2 C3 C4 Locations C3 to C4 (inclusive) are saved in file S 1 starting at disk file location C2. S1 is assumed to be in the user's own library. If S1 is preceded by the parameter C 1, it is assumed to be in the Iibrary of the user whose account number is C 1. Once a core image has been saved in a disk fi Ie, it can be restored to core by means of the LOAO command. It should be noted that the Monitor command LOAD is very different from the System library Program LOADER. LOADER loads a BIN format file (created by PAl-O) into the user's core. LOAD loads a SAVE format file (created by a previous SAVE command) into core. The LOAD command requires from one to five parameters. The name of the file to be loaded must always be given. If the file is in the user's ONn library, this file name is typed after the SAVE command itself. If it is in another user's library, his account number is entered before the file name. {Reading another user's file is subject to fi Ie protection.} In either case, the parameters are separated by spaces. LOAD Read the indicated section of a disk file into the indicated section of core. LOAD S1 LOAD C1 S1 Assuming that a disk file S1 exists, and that it is not read protected, the contents of the file S1 is loaded into core. In the first case S1 is assumed to be in the library of the user giving the command. In the second case, it is assumed to be in the library of the user whose account number is 01. The user can further define his LOAD command by using the same optional parameters discussed in the section on the SAVE command. LOA 0 S 1 C2 C3 C4 Locations C3 to C4 {inclusive} are loaded from fi Ie S 1 starting at file location C2. Example: .LOAD NEWF 5 10 17 Words 5 to 14 (inclusive) of the file named NEWF are loaded into locations 10 to 17 of the user's core. 8-7 It is not necessary to open a file before using it in a LOAD or SAVE command. Both commands automatically open the specified file on internal file number 3 before performing the transfer. After completion of the command, the file remains open on file number 3. A special macro-command, RUN, exists to allow a program to be loaded and started all in one command. RUN 51 RUN C1 51 Load file 51 into core from the disk and start execution at location O. In the first example, file 51 is assumed to be in the user's own library. In the second, it is assumed to be in the library of the user whose account number is C 1. RUN 51 is exactly equivalent to LOAD 51; START O. RUN C1 51 is exactly equivalent to LOAD C1 51; START O. The R command (see Chapter 2, Section 2.4) is a special case of the RUN command. R 51 8.5 Load file 51 from the System library (account number 2) and start at location O. R 51 is exactly equivalent to RUN 251. UTILITY COMMANDS TSS/8 Monitor provides a number of special purpose commands to aid in program development and use. Explal1ation Command USER Print the number of the job connected with this user and the console number of the job. USER C1 Pri nt the consol e numbers of job C 1• SWITCH C1 Set the user's switch register to C1. Monitor maintains a switch register for each user. When h is program executes an OSR (OR tl,e switch register into the AC) this value is the one which is loaded. BREAK Type the current value of the user's delimiter mask. BREAK Cl Set the user's delimiter mask to C1. (The use of the delimiter mask is discussed in the chapter on assembly language programming.) DUPLEX Place the user's Teletype in duplex mode. All characters typed at the keyboard are automatically printed as tl,ey are entered. UN DUPLEX Take the user's Teletype out of duplex mode. Input characters are received by the Monitor and by the user program without their being printed at the console. RESTART Cl Set the user program restart address to C 1. If CTRL/C is typed at the keyboard, Monitor forces a jump to location C1 in the user's program. VERSION Type out the version of TSS/8 Monitor being used. 8-8 CHAPTER 9 WRITING ASSEMBLY LANGUAGE PROGRAMS FOR TSS/8 9. 1 INTRODUCTION In addition to the higher-level programming languages available in the TSS/8 library, the user can also code and run programs written in the PDP-8 assembly language, PAL-D (Program Assembly Language). These programs are prepared with EDIT, assembled with PAL-D, then loaded with LOADER. For those users unfamiliar with assembly language programming, the DEC Introduction to Programming is a useful guide. A user can program TSS/8 iust as he would any other 4K PDP-8. (Assembly language programs must fit in 4K of core.) All memory reference instructions (AND, TAD, ISZ, DCA, JMS, and JMP) function as on a stand-alone PDP-8. All operate instructions (instruction code 7) also function as on a regular PDP-8 (Exception: microcoding HLT or OSR with any other operate instruction but CLA gives unpredictable results). The major difference between TSS/8 programming and regular PDP-8 programming is in the lOT (Input/Output Transfer) instructions. Some instructions which are valid on stand-alone PDP-8s, such as CDF, CIF, ION, IOF are considered illegal instructions under time-sharing. There are a great many new lOTs within TSS/8 that are not valid on a regular PDP-8. Finally, there are lOTs which operate on TSS/8 in the same manner as on standalone PDP-8s. The way TSS/8 actually executes an lOT instruction is also different. Non-lOT instructions (except HLT and OSR) are executed by the TSS/8 hardware, while lOTs (and HLT and OSR) are not. As explained in Appendix C lOTs are privileged instructions, executed by the TSS/8 Monitor rather than by hardware. In general, TSS/8 provides the programming capabilities of a 4K PDP-8, and allows programs of considerably greater complexity to be run within the constraints of each user's 4K of core. The TSS/8 Library Programs, all of which were written in assembly language and make use of the TSS/8 lOT's dealt with below, are examples of programs which can be run on TSS/8. 9-1 9.2 CONSOLE I/O User programs handle console (Teletype) I/o in almost the same way as stand-alone POP-8 programs. The KRB instruction is used to input a character, the TLS instruction to output a character. The KSF and TSF (followed by JMP .-1) can be used but are not needed. TSS/8 Monitor handles all timing problems whether these skip lOTs are present or not. TSS/8 differs from the stand-alone POP-8 in that under TSS/8 the user program interacts with multi-character input and output buffers (maintained by TSS/8 Monitor) rather than with single character registers. the state of the system, these buffers may have one, many, or no characters in them. Depending on During normal program execution, this fact is of no ccnsequence. User programs still send and receive characters one at a time. There are times, however, when it is useful to clear out any and all characters in the buffers; a special lOT exists for this purpose (SBC). On a stand-alone system, characters are input as soon as they are typed, whether they are of immediate interest or not. Usually, these characters are stored away by the program until a terminating (or delimiting) character is found. At this time, the whole line of characters is processed. On a swapping, time-sharing system such as TSS/8, this mode of operation is wasteful. It is far more efficient to allow input characters to accumulate in the Monitor input buffer until a delimiter is found. There is an lOT to specify which characters are to be considered delimiters (KSB). TSS/8 also allows programs to input and output strings of characters. The read string (KSR) and send string (SAS) instructions provide a convenient and efficient means of doing lengthy transfers. All keyboard input uses full-duplexed hardware, (there is no wired connection between the keyboard and printer, i.e., characters are not printed on the console as typed). Input characters are echoed to the console under program control rather than by hardware. Because input charac ters are a lIowed to accumul ate in buffers before being passed to the user program, it is important to have Monitor perform the echoing rather than user programs. There is an lOT (OUP) to set up this automatic echoing as well as an lOT (UNO) to inhibit echoing for such operations as reading tapes. Read Keyboard Buffer (KRB) Octal Code: 6036 Operation: Read the next input character into bits 4-11 of the AC. Load Teleprinter Sequence (TLS) Octal Code: 6046 Operation: The ASCII character in AC bits 4-11 is typed out on the user's console. Skie on Kelboard FlaS (KSF) Octal Code: 6031 Operation: The next instruction is skipped if there is a delimiter character in the user's input buffer. 9-2 Octal Code: 6040 Read Keyboard String (KSR) Operation: Execution of this instruction initiates a transfer of one or more characters from the user's keyboard to a designated core area. Before executing KSR, load the AC with the address of a two-word block, where: Word 1: negative of the number of characters to be transferred. Word 2: address of the core area into which characters are to be placed minus one. The transfer is terminated when either: a. the indi cated number of characters have been input or b. a del imiter is seen. At the end of the transfer, the word count and core address are updated and the AC is cleared. Octal Code: 6040 Send A String (SAS) Operation: Before executing an SAS, load the AC with the address of a two-word block, where Word 1: contains the negative of the number of characters to be sent. Word 2: contains the add-ess -1 of the first word of the string. The characters are stared one per word right justified starting at the add-ess specified by word 2. Upon execution of SAS, the system takes only as many characters as will fit in the output buffer. It then makes the appropriate adjustment to word 2 to indicate a new starting address and to word 1 to indicate the reduced character count; it returns to the instruction following the SAS. If the character count is reduced to zero, the instruction following SAS is skipped. The instruction following the SAS should contain a JMP .-2 to continue the block transfer of Teletype characters. The AC is cleared by SAS. Octa I Code: 6400 Set Keyboard Break (KSB) Operation: Rather than activate a user's program to receive each character as it is typed, TSSj8 accumulates input characters until a certain character or characters is seen. To tell TSSj8 Monitor which characters to look for (these characters are referred to as delimiters,) load the AC with a 12-bit mask before executing a KSB. For each bit in the mask which is set, Monitor considers the corresponding character or characters to be delimiters. Specifies Bit o 1 2 3 4 5 6 7 8 9 10 11 o = check rest of mask 1 = any character is break 301-332 (all letters) 260-271 (all numbers) 211 (Horizontal tab) 212-215 (line feed, vertical tab, form feed, RETURN) 241-273 (!" I $ % & ' ( ) * + , - . j : ; ) 240 (space) 274-300 « = > ? @) 333-337 ([ \J t +-) 377 (rubout) (alt mode) 375 anything not in bits 1-10 9-3 Duplex (DUP) Octal Code: 6402 Operation: DUP infonns Monitor that the user wishes each character typed at the console to be echoed on that console's printer as it is received by Monitor. The DUP instruction does not affect the user's registers. Octal Code: 6403 Unduplex (UNO) -~- Operation: UNO informs Monitor that the user wishes to suppress character echoing. This can be done for reasons of privacy or because a program does its own character echoing. The user's registers are unaffected by UNO. Set Buffer Control (SBC) Octal Code: 6401 Operation: SBC permits the user program to clear its Teletype input and/or output buffer. Before executing SBC set bits 0 and 1 of the AC as indicated below: 9.3 Bit 0 Clear output buffer Bit 1 Clear input buffer FILES AND DISK I/o All user programs can gain access to the Tss/8 disk storoge. The time-sharing Monitor maintains a pool of available disk space which is allocated in units referred to as segments. (The size of a disk segment varies among Tss/8 installations. Segments may be 128,256, 512, or 1024 words each). These segments are used to make up user files on the disk. Monitor also maintains, for each user, a directory of all files which he has defined. The lOTs which allow the user to access the disk are of two types: those which define files on the disk and those which transfer data between a defined file and the user's core. NOTE CREATE and OPEN require that a user set up a file name in core. FINF and WHO return file names to core. Each must be specified in TSS;8 internal code (excess 40 code) as shown in Appendix A. Characters are packed two to a word. The first step in defining a file is to create it. Creating a file reserves a single segment cl disk storage and associates it with a name. This file can then be extended to any length desired. Extending a file appends more segments to it. Similarly, a file can be rewced by any number of segments. Reducing a file removes the last segment or segments from the file. Reducing a file to zero segments deletes it entirely. Once created, a file can be protected, thereby restricting access to it. When created, a file can be read by any user, but only the creator can write in it. This protection can be reset if desired. file. 9-4 Finally, it is possible to rename an existing None of these actions affect the contents of the file -- they only reserve space on the disk. Until it has been written in, the actual content of a file is unspecified. Extending a file does not alter the content of the file as it previously existed. Once defined, files can be used to read and write data. ky number of words (1 to 4096) can be moved from any part of the user's core to any part of a file (subject to file protection). The user program specifies a location in core and a word count. This indicates how many words are to be transferred and from (or to) where in core they are to be moved. Also specified is a disk file address indicating what part of the file is involved. This address is the address of a word in the file. Fi les are addressed in the same manner as core: in 12-bit words. Unlike core, however, files can be longer than 4K. To address these files provision is made fora 24-bit disk file address, containing the high-order and low-order file addresses. File addresses are independent of any consideration of segments. The file address is meaningful only in defining files. Files can be read and written across segment boundaries without restriction. (The user cannot read or write beyond the last segment boundary.) When it executes a fi Ie read or write lOT, the system updates the core add-ess and word count and places an error code in the error word (see RFllE) if any error is detected. (The error word must be cleared before executing the lOT.) At the end of a successful transfer, the word count is set to zero and the core add-ess set to the last word transferred. If the transfer cannot be completed for some reason, the word count and core address indicate how much of the transfer was successful; the error word indicates the cause of the failure. All file operations except CREATE (and OPEN) require that the file be open. Up to four files can be open at a time. The process of opening a file associates it with one of four internal file numbers (0, 1, 2, or 3). All file lOTs except CREAT and OPEN, are specified in terms of one of these internal file numbers, rather than a file name. lOTs operate on the file which is indicated by that internal fik! number at the time. It is therefore possible to write file handling programs which are independent of the actual file(s) they operate on. File lOTs, that are successfully completed, return with the AC cleared. If an error was found which prohibited execution of the lOT, one of the following error codes is returned: 4000 There was no file opened on the specified internal file number. 4400 Attempting to redefine a file which is open to another user. 5000 Attempting to create a file for a user whose directory is full . 6000 Fi Ie protection violation. 6400 Invalid file name. 7000 Attempting to open a nonexistent fi Ie. 7400 Disk is full. Create a Fi Ie (CRF) Octal Code: 6610 Operation: the user can request the system to create a new fi Ie of one segment. The user program provides the new name for the file. load the AC with the beginning address of a 3-word block, where 9-5 Words 1 through 3: contain the 6-character name. If there is some reason why the request cannot be granted, the system will return a non-zero error code in the AC. The protection code of a newly created file is 12. Octal Code: 6611 Extend A File (EXT) Operation: To extend the length of an existing file, that file must be currently open. Load the AC with the beginning address of a 2-word block, where: Word 1: contains the internat file number of the file to be extended. Word 2: contains the number of segments the system should append to the fi Ie. If for some reason the request to extend a file cannot be granted, the AC will contain 4000, 4400, 6000, or the number of segments it failed to append. Octal Code: 6612 Rewce A Fi Ie (RE D) Operation: To rewce the length of an existing file, that file must be currently open. Load the AC with the beginning address of a 2-word block, where: Word 1: contains the internal file number of the file to be reduced. Word 2: contains the number of segments to be removed. This request is granted unless the file to be rewced is currently opened to another user or if the file is write protected against the user. Rename A File (REN) Octal Code: 6600 Operation: REN is used to change the name of a file. Load the AC with the address of a 4-word block where: Word 1: contains the internal file number associated with the file whose name is to be changed. Words 2-4: contains the new name. This name is in 6-bit characters packed two in a word. Protect A File (PROT) Octal Code: 6604 Operation: The owner of a file can protect his file from unauthorized attempts to access it by using this instruction. Before executing PROT, load the AC with: Bits 5 and 6 Internal file number of the reserved file to be protected. Bit 7 Write protect against owner. Bit 8 Write protect against users whose project number is same as owner's. Bit 9 Read protect against users whose project number is same as owner's. Bit 10 Write protect against users whose project number differs from owner's. Bit 11 Read protect against users whose project number differs from owner's. 9-6 A file must be opened before it can be protected. PROT is legal only when performed by the file owner, i.e., the user who created the file. All attempts to access the file which violate any of the protection flags are considered illegal. (For further information on project numbers, see Appendix F.) Open A File (OPEN) Octal Code: 6601 Operation: OPEN is used to associate a file with an internal file number, which is necessary because all file operations are in terms of the internal file numbers. Before executing the OPEN lOT, load the AC with the beginning address of a 5-word block, where: Word 1: contains the internal file number. Word 2: contai ns the account number of the owner of the fi Ie. If 0, the account number of the current user is specified. Word 3-5: contain the name of the file to be opened. This name is in 6-bit characters packed two to a word. If there was another file associated with the internal file number before the execution of the OPEN lOT, it is closed automatically before the new file is associated with the internal file number. Close A File (ClOS) Octal Code: 6602 Operation: ClOS terminates the association between files and their internal file numbers. Before executing ClOS, load the AC with a selection pattern for the interna' file numbers whose associated fi les are to be closed. The file is closed if bit I is 1, where I = bit 0, 1,2, or 3. Read Fi Ie (RFIlE) and Writit File (WFIlE) Octal Codes: 6603 & 6605 Operation: Once the association of a file with an internal file number has been made, these lOTs allow the actual file reference to be made. They are illegal on a file that has not been opened (associated with an interna I fi Ie number). To read or write a file, load the AC with the address of a 6-word block, then execute the lOT. The format for the 6-word block is: Word 1: contains the high-order file word address. Word 2: contains the internal file number. Word 3: contains the negative of the number of words for the operation. This number is either the number of words to be read or the number of words to be written. Word 4: contains a pointer to the beginning address -1 of a buffer located in the user program. On a read operation this buffer receives the information from the file: on a write operation this buffer holds the information that is to be sent to the fi Ie. Word 5: contains the least significcnt 12 bit!: of the initial fi Ie word address to begin the operation. 9-7 contains an error code: Word 6: o if no error if parity error if file shorter than word count if fi Ie not open if protection violated 1 2 3 4 The read or write begins at the word specified by words 1 and 5. For example: TAr; X WFILE x~ • +1 0 1 -200 6477 200 means: write 200 (octal) wads starting at word 200 of the file that is associated with internal file number one from a core area starting at location 6500. After completion of the transfer, the word count (word 3) and core address (wad 4) are updated. If an error was detected the appropriate error code is placed in word 6. File Information (FINF) Octal Code: 6613 Operation: FINF enables a user program to determine what file, if any, is associated with an internal file number. Load the AC with the beginning address of a 7-word block, where: Word 1: contains the internal file number for which the user program wishes information. Words 2 through 7 contain the information that the system returns after executing FI NF. Word 2: contains the account number of the owner or zero if no file is associated with the internal fi Ie number, that is, the file is not open. Words 3-5: contains the name of the file in 6-bit code. Word 6: contains: Bit-1 Means 7 write protected against owner 8 write protected against users whose project number is same as owner's 9 read protected ogainst users whose project number is same as owner's 10 write protected against users whose project number differs from owner's 9-8 Word 6 (Cont) 11 Word 7: 9.4 Means Bit-1 read protected against users whose project number differs from owner's contains the number of segments which compose the file. ASSIGNABLE DEVICES Users can access both their own Teletypes and the disk; with the remaining system devices (referred to as the assignable devices) this is not true. One function of the TSS/8 Monitor is to ensure that device usage never confl i cts. On Iy one user at a time can access the high-speed, paper-tape reader or punch, or anyone of the DECtapes. To ensure that only one user can access a device, TSS/8 requires that the device be assigned before it is used. After a device is assigned, it is not available unti I it is released by its owner. Once assigned, the device is programmed exactly as on a stand-alone PDP-8. The RRB instruction is used to read a character from the high-speed reader; the PLS instruction is used to punch one on the high-speed punch. The skip lOTs (RFS and PSF) can be used (followed by JMP . -1) but are not necessary. For block transfers, there are two string transfer commands: RRS and PST. The DECtape instructions have been simplified. A single instruction, DTXA, initiates the transfer of a block of data. The DTRB instruction is then used to determine if the transfer was successful. The skip instruction, DTSF, can be used (followed by JMP . -1) but is not necessary. Executing any of the assignable device lOTs without first assigning the device gives the following results: (a) If the device is assigned to another user, the instruction is considered illegal; program execution is now terminated and an error message typed out; (b) If the device is available it is automatically assigned before execution of the lOT. The device then belongs to this user until he releases it. Because these devices are shared by all users, Monitor must ensure that they are operable at all times. In particular, Monitor must ensure that a user is not waiting (futilely) for a device which is not avai lable. This situation can arise when trying to use the punch when it is turned off, or when the reader has read off the end of a tape. All these conditions, referred to as "hung devices" are considered to be system errors. If the program doing the transfer has been enabled for system errors, (by executing an SEA) control transfers to the error routine indicated which must clear the error flag in the status word before continuing (see Section 9.4). If the user program has not been enabled for system errors, a hung device causes the program to be terminated and an error message is typed out. 9-9 Assign Device (ASD) Octal Code: 6440 Operation: If the device specified by the contents of the AC is available, it is assigned to the user program and the AC is cleared. Otherwise, the number of the job owning the device is placed in the AC. If the device does not exist, 7777 is returned in the AC. 4000 Paper-tape reader 4001 Paper-tape punch 4005 + N DECtape unit N The assignment is in effect until a corresponding REL instruction or LOGOUT. Release Device (REL) Octal Codes: 6442 Operation: The device specified by the contents of the AC is released (praviding it was owned by the user executing the REL). The AC is cleared. Releasing a device makes it available to other users. Skip on Reader Flag (RSF) Octal Code: 6011 Event Time: 1 Operation: The reader flag is sensed, and if it contains a binary 1, the contents of the PC are incremented by one so that the next sequential instruction is skipped. The reader flag is bit 8 of status register 1, and has a value of 1 if the reader buffer is not empty. Octal Codes: 6012 & Read Reader Buffer (RRB) 6016 Event Time: 2 Operation: The contents of the reader buffer are transferred into bits 4 through 11 of the AC and the reader flag is cleared if the reader buffer is empty. This instruction does not clear the AC. If the reader buffer is empty, the user program is dismissed until the reader flag is 1 or an end-of-tape condition is detected. Reader Fetch Character (RFC) Octal Code: 60 14 Event Time: 3 Operation: The reader flag and the Monitor reader buffer are both cleared, the readeris started to fill the Monitor reader buffer and the reader flag is set after the buffer is full or the end of tape is detected. Read Reader String (RRS) Octal Code: 6010 Operation: This instruction initiates a transfer from the high-speed reader to a selected area in the user's core. Before executing RRS, load the AC with the address of a 2-word block, where: Word J: minus the number of characters to be transferred. Word 2: the address of the user core area minus one. The transfer is terminated by either of two conditions: (a) the word count is zero indicating that the required number of characters have been read or (b) the reader has read off the end of the tape (a system error condition). 9-10 In either case, the word count and core address are updated. RRS clears the AC. Octal Code: 6026 load Punch Buffer Sequence (PlS) Operation: The ASCII character is in AC bits 4 through 11 and is transmitted to the high-speed punch. PlS does not clear the accumulator. Octal Code: 6021 Skip on Punch Flag (PSF) Event Time: 1 Operation: The punch flag is sensed, and if it contains a binary 1, the contents of the PC is incremented by one so that the next sequential instruction is skipped. The punch flag is bit 9 of status register 1, and has a value of 1 if the punch buffer is not full. If the punch flag is 0, the program is dismissed until the punch flag is 1. Octal Code: 6020 Punch String (PST) Operation: PST allows a user program to punch a string of characters. Before executing PST, load the AC with the beginning address of a 2-word block, where: Word 1: contains the negative of the number of characters to be punched. Word 2: contains the beginning address -1 of the string to be punched; the characters should be right justified one per word. After execution of PST, the system takes only as many characters as fit in the punch buffer; it then makes the appropriate adjustment to word 2 to indicate a new starting address and to word 1 to indicate the reduced character count. It returns to the instruction following the PST which should be a JMP . -2 to continue the transfer. If the character count is rewced to zero, the instruction following PST is skipped. The AC is cleared by PST. load Status Register A (DTXA) Octal Code: 6764 Operation: DTXA allows a user program to read and write records (129-word blocks) on DECtape. load the AC with the beginning address of a 3-word block, where: Word 1: contains: Bit 1 Means 0-2 contains the transport unit select number, 3-5 0, 6-8 = 2 for read elata function, 4 for write data function, 9-11 o. Word 2: contains the DECtape block number. Word 3: contains the beginning core address -1 of record buffer. After DTXA is given, the DECtape request is placed in the DECtape request queue. After the completion of any DECtape request, the DECtape flag in status register 2 is turned on. DTXA elaes not update word 3. The AC is cleared by DTXA. 9-11 Octal Code: 6771 Skip on Flags (DTSF) Operation: The content of both the error flag and the DECtape flag is sampled, and if either flag contains a binary 1, the content of the PC is incremented by one to skip the next sequential instruction. If both flags are zero, the user program is dismissed until the skip is satisfied. Octal Code: 6772 Read Status Register B (DTRB) Operation: The content of DECtape status register B is loaded into the AC by an OR transfer. The AC bit assignments are: o error flag mark track error end of tape select error parity error timing error unused DECtape flag 1 2 3 4 5 6-10 11 9.5 PROGRAM CONTROL There are a number of ways that the status of a running proqram can be changed. The program can be terminated in one of three ways: by execution of a HLT, by the user typing tBS to force a program halt, or by a program error which forces Monitor to terminate the pragram after typing out an error message. It is also possible for the status of a running pragram to change without it being terminated. First, the user program can request that it handle its own program error conditions. In this case, Monitor does not terminate a job on an error; instead, it transfers control to a user error handler. This error handler then determines what the error was, by a CKS instruction and takes appropriate action. Monitor also provides the pragram with an interrupt key, tC.t If the user types a tC, Monitor unconditionally transfers control to a restart address. Thus, the user program can handle its own restarts. Halt (HLT) Octal Code: 7402 Operation: This instruction is used to stop the user program and return control to Monitor. Executing HLT is equivalent to typing tBS followed by RETURN. t tC is a control character obtained by depressing the CTRL key at the same time as depressing the C key. tBS is obtained by depressing control key and B together followed by S. 9-12 Set Restart Address (SRA) Octal Code: 6417 Operation: This instruction allows the user to specify an address to which control is transferred when an fC is typed on the user's console. Load the AC with the restart address and execute SRA. If fC is detected, the program's input and output buffers are cleared, the AC and Link are cleared and control goes to the restart address. Set Error Address (SEA) Octal Code: 6431 Operation: This instruction allows the user to specify an address to which control is transferred in the event of a system error. Load the AC with an address before executing SEA. If a system error is detected, Monitor simulates a JMS to the error address. The program counter is stored in the error address and control transferred to the error address + 1. AC, Link, and input/output buffers are not affected. The error code of the system error is in STRO bits 9-11. Bit 10 of STR1 is set. The error routine must read these bits (by a CKS) to determine the cause of the error, then clear them by means of a CLS. The only error code that occurs in the course of normal system usage is we to a hung device. This error occurs when the user attempts to use a punch not already turned on, access a DECtape not yet selected, or allows the paper-tape reader to run off the end of a tape. The error routine must release the device to clear the error condition. The illegal lOT error probably means that an assignable device lOT was executed without the device first being being assigned. Swap and file errors occur if a hardware error is detected while Monitor is swapping user programs or while reading or writing file directories. These are system malfunctions from which there is no recovery. 9.6 PROGRAM AND SYSTEM STATUS Because TSS/8 programs run under control of a time-sharing Monitor, it is important for them to determine their status within the system and the status of the system as a whole. Several lOTs, listed below, have been de- fined for this purpose. Check Status (CKS) Octal Code: 6200 TSS/8 Monitor maintains for each user a complete set of status information, his program's running status and the state of his input/output devices. This status information, stored in three words, can be accessed by a running program with the CKS instruction. Before executing a CKS, load the accumulator (AC) with the address of a three-word block. Executing CKS stores the three status words (STRO, STRl, and STR2) in the three-word block and clears the AC. Information about the status of individual devices can also be checked by the skip lOTs. 9-13 The formats of these registers are: STRO Bits o 1 User program is in the run state Program handles its own errors Unused System use on Iy System use only System use on Iy Unused System detected error condition 1 Illegal lOT 2 Swap read error Swap write error 3 5 Disk file error 6 Hung device Run Bit Error Enable 2-4 5 6 7 8 9-11 JSIOT JSIOTC JSEXON Error Code STRI Bits o 10 Teleprinter Reader Punch Error 11 Wait Time is up Internal file 0 is not busy Internal file I is not busy Internal fi Ie 2 is not busy Internal fi Ie 3 is not busy There is a delimiter in the input buffer Unused Output buffer is not full Character in reader buffer Punch buffer is not full System error detected, code in bits 7 through 11 of STRO Job is not waiting DECtape Error DECtape Unused DECtape transfer requested DECtape error DECtape flag 1 2 3 4 5 6 7 8 9 Timer File 0 File 1 File 2 File 3 Delimiter STR2 Bits 0-8 9 10 11 Each user has available to him a 12-bit switch register just as he does on a stand-alone PDP-8. This switch register can be manipulated by means of the Monitor command SWITCH or under program control. OR With Switch Register (OSR) Octal Code: 7404 Operation: The content of the user's switch register is inclusively ORed into the AC. Set Switch Register (SSW) Octal Code: 6430 Operation: The content of the AC is stored in the user's switch register. The AC is cleared. Assembly language programs run under control of TSS/8 Monitor. The following lOTs are defined to allow a program to determine the status of the system as a whole. 9-14 Segment Size (SIZE) Octal Code: 6614 Operation: The segment is the basic unit of on-line file storage. Different TSS"..a systems have differing segment sizes. SIZE allows a program to determine the segment size. The segment size is returned in the AC. Segment Count (SEGS) Octal Code: 6406 Operation: The number of available disk segments is returned in the AC. Account (ACT) Octal Code: 6617 Operation: The account number (of the job number given) is returned in the AC. If AC is 0, the account number for the current job is returned. If the requested job does not exist, zero is returned. Octal Code: 6616 Who (WHO) Operation: The account number and password of the current job are returned to the 3-word block whose address is in the AC and the AC is cleared. User (USE) Octal Code: 6421 Operation: Return in the AC the number of the current job. Console (CON) Octal Code: 6422 Operation: Return in the AC the console unit number assigned to the job whose number is in the AC, if that console number does not exist, -1 is returned. User Run Time (URT) Octal Code: 6411 Operation: load the AC with the address of a 3-word block, where word 1 contains the number of the job for which the run time is sought. The run time is returned in the last two locations of the block. If job 0 is specified, the run time of the current job is returned. The AC is cleared. Time-oF-Day (TOO) Octal Code: 6412 Operation: Returns the value of the System Clock in military time (using a 24-hour cycle) in the two locations starting at the location of the address in the AC. The AC is cleared. Return Clock Rate (RCR) Octal Code: 6413 Operation: The number of clock ticks per second is returned in the AC. Octal Code: 6414 Date (DATE) Operation: Returns the date in the AC. The format of this 12-bit number is: DATE=«YEAR-1964)*12+(MO~TH-l ))*31+DAY-l 9-15 Octal Code: 6420 Skip on T5S/8 (TSS) Operation: This instruction is used by programs which run under both TS5j8 and a standard PDP-8/I. Under TSS/8, the instruction following T55 is skipped and the Monitor version number is returned in the AC. On a standard PDP-8/I, the lOT has the effect of a NOP instructi on. Octal Code: 6415 Quantum Synchronization (SYN) Operation: Upon execution of this instruction, the system dismisses the user program and sets it in the run state so that it will be run again in turn. Ordinarily, this instruction is used to ensure a full time quantum to perform some critical operation. Octal Code: 6416 Set Time (STM) Operation: The system provides a clock time for each user program. By means of this lOT, the time can be set to "fire" after a specified number of clock ticks have elapsed. Load the AC with the time (in seconds) to prime the timer. Upon execution of the STM instruction, the system sets the time to "fire" in the specified number of seconds and turns the time bit (bit 0) in status register 1 to 0, clears the AC, and dismisses the job. After the specified time has elapsed, the system turns bit 0 back to 1, and the job is restarted. 9.7 PDP-8 COMPATIBILITY Programming TS5/8 in assembly language is very similar to programming a stand-alone PDP-8. All instructions except the lOTs operate identically in either case. As discussed in the earlier sections of this chapter, programming such devices as the Teletype and high-speed reader/punch for TS5/8 is somewhat simpler. T55/8 runs programs which include timing loops. It also properly executes the lOTs not mentioned in this manual, e.g., TCF, PCF, RRB, RFC, etc. Thus, programs written for stand-alone PDP-8s with Teletype and high-speed reader or punch will run on TSSj8, although generally not as efficiently as programs which are written specifically for TSS/8. The same is not true for disk and DECtape operations because T55/8 uses a simplified programming structure for these devices. The actual differences in coding are very small. It is a simple task to adapt previously written code for T5S/8 disk and DECtape. There are a few standard changes which users generally make in adapting PDP-8 code to TS5j8. The T55j8 Monitor does the echoing rather than the user program. The TLS which does the echo can be deleted and a DUP instruction added somewhere near the start of the program. Also, for efficiency, the T5Sj8 delimiter capability can be used. A K5B in the program determines what the delimiters are. 9-16 Many PDP-8 programs execute a reader and punch lOT early in the program, to initialize the device, whether they are actually to be used or not. If the devices are free, they can be assigned and thus made unavailable to other users. If they are unavailable, the program terminates on an illegal lOT. Thus, it is important not to execute these lOTs randomly. If disk or DECtape is involved the actual transfer code must be altered to conform to TSS/8. {The fact that core page 37, locations 7600 through 7777, is avai lable to TSS/8 programs is useful in making these changes. New code can be placed in the area normally reserved for the Binary loader.} The most difficult code to convert is that code which operates under interrupt. To be run under TSS/8, these programs must be recoded so as not to use the interrupt. lOTs for nonexistent devices are ignored as are CDFs and CIFs to field zero. {Other CDFs and CIFs are illegar.} It must be remembered, that many lOTs have been redefined for use as special TSS/8 instructions. In all other situations, TSS/8 remains compatible with stand-alone systems whenever possible. 9-17 APPENDIX A TSS/8 CHARACTER SET TSS/8 accepts 8-bit ASCII characters only. ASCII is an abbreviation for USA Standard Code for Information Interchange. The acceptable characters and their 6- and 8-bit octal equivalents are I isted below. Character Space ! " # $ % & ( ) * + . / 0 1 2 3 4 5 6 7 8 9 < > ? 6-Bitt Octal 8-Bit Octal 00 01 02 03 04 05 06 07 10 11 12 13 14 15 16 17 20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37 240 241 242 243 244 245 246 247 250 251 252 253 254 255 256 257 260 261 262 263 264 265 266 267 270 271 272 273 274 275 276 277 Character @ A B C D E F G H I J K L M N a P Q R S T U V W X Y Z [ \ ] t tUsed to store passwords and filenames only. A-1 6-Bitt Octal 8-Bit Octal 40 41 42 43 44 45 46 47 50 51 52 53 54 55 56 57 60 61 62 63 64 65 66 67 70 71 72 73 74 75 76 77 300 301 302 303 304 305 306 307 310 311 312 313 314 315 316 317 320 321 322 323 324 325 326 327 330 331 332 333 334 335 336 337 APPENDIX B SUMMARY OF MONITOR COMMANDS B.1 MONITOR COMMANDS A Monitor command is a string of characters terminated by a semicolon (;), a colon (:), or a carriage return (RETURN key). Parameters of commands can be octal numbers, decimal numbers, character strings, or single letters. In the following summary, parameters are coded as follows: B. 1. 1 B.l.2 C1, C2, represent octal numbers 01, 02, represent decimal numbers S 1, S2, represent character strings 11, L2, represent single letters Logging In and Out LOGIN C1 Sl; Request to login; Cl = user's account number S1 = user's password LOGOUT; Request to logout; processing and console time is typed out TIME Cl; Request typeout of processing time; Cl = job number Without Cl, current job is assumed; before logging in and without Cl, time-of-day is typed out; If C 1 = job 0, time-of-day is typed out. Device Allocation ASSIGN 11; Access device; L1 = R for paper tape reader P for paper tape punch o for any DECtape unit ASSIGN 0 Cl; Access DECtape unit; 0= DECtape Cl = device number B-1 RELEASE Ll; RELEASE 0 Cl; 8.1.3 Release device; L1 = R, P (see ASSIGN ll;) o = OECtape unit Cl = console or OECtape number File Handling OPEN Cl Sl C2; Establish association between internal file number and file; Cl = internal file number Sl = file name C2 = account number CLOSE Sl; Close files; Sl = list of internal file numbers CREATE Sl; Create new fil e; Sl = name of new file RENAME Cl Sl; Rename a file; Cl = internal file number Sl = new name of file REDUCE Cl 01; Reduce length oHile; Cl = internal file number 01 = number of segments to be removed from end of fiI e EXTEND Cl 01; Extend length of file; Cl = internal file number 01 = number of segments to be added to end of file PROTECT Cl C2; Protect a file; Cl = internal file number C2 = new file protection mask 1 read protect against users with different project number 2 write protect against users with different project number 4 read protect against users with same project number 10 write protect against users with same project number 20 write protect against owner or the sum of any cormination F Cl; Print out association between internal file numbers and files C 1 = i nterna I fil e number 8-2 B.l.4 Control of User Programs START Cl; Execute user program; Cl = starting location START; Restart user program; RESTART Cl; Set program restart address DEPOSIT Cl C2 ••• Cn; Store in core memory; C 1 = location C2 = contents to be stored Cn = location Cl +n-l n < 10 decimal EXAMINE Cl 01; B.l.5 List specified contents; Cl = first location 01 = number of location to be listed 01 ~ 10 decimal Utility Commands SAVE Sl; SAVE Cl Sl C2; SAVE Cl Sl C2 C3; SAVE Cl S 1 C2 C3 C4; Save core image; C 1 = owner's account number Sl = name of file C2 = file address of first word to be saved; if not specified, entire 4K is saved C3 = core address of first word to be saved; if not speci fi ed , entire core is saved C4 = core address of last word to be saved; if not speci fi ed , entire core is saved LOAD Cl Sl; LOAD Cl S1 C2; LOAD Cl Sl C2 C3; LOAD Cl S 1 C2 C3 C4; Load core image; C1 = owner's account number Sl = name of file C2 = file address of first word to be loaded; if nof specified, entire 4K is loaded C3 = core address of first word to be loaded, if not speci fi ed, entire core is loaded C4 = core address of last word to be loaded; if not specified, entire core is loaded R S1; Run System file; S1 = name of file B-3 B.l.6 Utility Commands (Cont) RUN Sl; Run user file; Sl = name of file RUN Cl Sl; Run user fit e; C 1 = owner's account number Sl = name of file S·, Stop execution WHERE; Type out contents of location counter, accumulator, link, and switch register USER; Type out number of the job and devices owned USER Cl; Type out device numbers; Cl = user's account number SWITCH Cl; Set switch register; Cl = word to be set BREAK Cl; Set keyboard break mask; Cl = new mask DUPLEX; Echo typed characters on pri nter UNDUPLEX; Ignore previous DUPLEX command TALK Cl Sl; Send a message to canso I e C 1; Cl = destination console Sl = message 8-4 APPENDIX C SUMMARY OF lOT INSTRUCTIONS C.l C.2 PROGRAM CO NTROL Number Instruction Function 6200 6402 6403 6405 6411 6412 6413 6414 6415 6416 6417 6420 6421 6422 6430 6431 6440 6442 7402 7404 CKS DUP UNO CLS URT TOO RCR DATE SYN STM SRA TSS USE CON SSW SEA ASD REL HLT OSR Check Status Duplex Console Unduplex Console Clear Status User Run Time Time of Day Return Clock Rate Date Quartum Synchronization Set Timer Set Restart Address Skip on TSS/8 User Console Set Switch Register Set Error Address Assign Device Release Device Halt OR With Switch Register Number Instruction Function 6600 REN OPEN CLOS RALE PROT WFILE CRF EXT RED FINF SIZE SEGS ACT WHO FILE CONTROL 6601 6602 6603 6604 6605 6610 6611 6612 6613 6614 6406 6617 6616 Rename File Open File Close File Read File Protect Fi Ie Write File Create File Extend File Reduce File File Information Segment Size Segment Count Account Number Who C-l C.3 C.4 INPUT BUFFER CONTROL Number Instruction Function 6030 6031 6032 6034 6036 6400 6401 KSR KSF KCC KRS KRB KSB SBC Read Keyboard String Skip On Keyboard Rag Clear Keyboard Flag Read Keyboard Buffer Static Read Keyboard Buffer Dynamic Set Keyboard Break Set Buffer Control Flags OUTPUT BUFFER CONTROL Number Instruction 6040 6041 6042 6044 SAS 6046 C.5 C.6 C.7 TSF TeF TPC TlS Function Send A String Skip On Teleprinter Rag Clear Teleprinter Rag load Teleprinter and Print load Teleprinter Sequence HIGH-SPEED PAPER-TAPE READER AND CONTROL (TYPE PC02) Number Instruction 6010 6011 6012 6014 RRS RSF RRB RFC Function Read Reader String Skip On Reader Flag Read Reader Buffer Reader Fetch Character HIGH-SPEED PAPER-TAPE PUNCH AND CONTROL (TYPE PC03) Number Instruction Function 6020 6021 6022 6024 6026 PST Punch String Skip On Punch Flag Clear Punch Flag load Punch Buffer and Punch Character load Punch Buffer Sequence PSF PCF PPC PlS DECTAPE CONTROL (TYPE TeOl) Number Instruction 6764 6771 6772 DTXA DTSF DTRB Function load Status Register A Skip On Rags Read Status Register B C-2 APPENDIX D OFF-LINE TAPE PREPARATION AND EDITING D.l INTRODUCTION To run a program 01" the computer, instructions and data must be fed into the computer from the input device. The program and data are usually typed into the computer on-line or prepared with the aid of the Symbolic Editor. It is sometimes convenient to prepare the program and data off-line, that is, to punch the program and data onto paper tape using a separate machine, one not actually connected to the computer. The Model 33 ASR Teletype can be used off-line to prepare source program tapes, to duplicate tapes, and to edit tapes previously punched in the ASCII format. (Tapes punched from the Teletype keyboard are in ASCII format .) When the Teletype power control switch is turned to LOCAL, the unit becomes an off-line tape preparation facility. Procedures for using the Teletype off-line are listed below. The Teletype controls are described in Section 1.4. D.2 DUPLICATING TAPES The following is a description of the procedure used in duplicating tapes. Procedure Tum TIY to LOCAL. 2 Set LSR to FREE. 3 Put original tape into LSR. 4 Depress LSP ON. 5 Depress HERE IS key to generate leader tape. 6 Set LSR to START. (New tape is punched and data is typed on printer.) 7 After the original tape is read in, depress HERE IS key to generate trailer tape. 8 Remove tapes from LSR and LSP. D-1 0.2.1 Preparing New Program Tapes When preparing a program tape off-I ine, the user should observe the salT'e conventions of his programming language as when preparing a program on-line using Editor. The following are the manual operating procedures for off-I ine tape preparation. Procedure Step Turn TTY to LOCAL. 2 Depress LSP ON. 3 Depress HERE IS key to generate leader tape. 4 Type the source program, observing the conventions of the programming language being used. NOTE The RETURN and LINE FEED keys must be depressed at the end of each line. Depressing the CRTVTAB keys perforates the tab character onto the tape, and the typewheel moves only one position to the right. When the computer reads the punched tab character on output, the typewheel tabs (a tab is usually equal to 10 spaces) to the next tabs top • 0.2.2 5 After the source program is punched, depress HERE IS to generate trailer tape. 6 Remove the source program tape from LSP. Correcting Typing Errors Typing errors can be corrected using the B. SP. button on the tape control and the RUBOUT key on the console keyboard. The B. SP. button backspaces the tape one column for each depression of the button, and the RUBOUT key perforates all eight channels of the tape (this perforation is ignored by the computer). 0.2.3 Editing Punched tapes can be edited off-I ine. However, the user must be able to read the perforati ons on the tape, otherwise, off-line editing is virtually impossible. The following is a description of the process used to edit a paper tape off-line. 0-2 Step ProcecLre Tum TTY to LOCAL. 2 SET LSR to FREE. 3 Put tape to be edited into LSR. 4 Depress LSP ON. 5 Depress HERE IS to generate leader tape. 6 Set LSR to START. 7 Observe the printer as the program is being typed, and 8 Set LSR to STOP a few characters ahead of the text to be edited. 9 Advance the tape one character at a time by toggling the LSR control from START to STOP. Minor Edit: Advance tape past the character(s} to be edited and use the B. SP. and RUBOUT keys to erase any incorrect characters, then type and punch corrected text. Major Edit: Following Step 9: a. Set LSR to STOP one character ahead of the text to be edited; b. Type new text; c. Set LSR to FREE; d. Advance tape past edited area (reading the perforated tape); e. Set LSR to START. 10 Repeat from step 6 until editing is completed. 11 Set LSR to START. 12 After new source program tape is punched, depress HERE IS to generate trailer tape. 13 Remove old tape from LSR and discard. t 14 Remove new tape from LSP and save. 0.2.4 listing of a Punched Paper Tape The printer can also be used to obtain a listing of a punched paper tape; this can be done with a minimum of tIt is good programming practice to list the new tape before discarding the old, ensuring that the new tape is correct . 0-3 effort and no use of computer time. To do this, tum the LINE-OFF-LOCAL knob to LOCAL, depress the OFF button, correctly position the paper tape, and fl ick the switch to START. This procedure causes the tape to be printed at the consol e, independent of the computer. 0.3 PAPER TAPE FORMATS r~--~A'--3-2---"'\ Data are recorded (punched) on paper tape by groups of holes arranged in a definite 8 7 6 5 4 format along the length of the tape. The tape is divided into channels which run the length of the tape, and into columns which extend across the width of the tape as shown in the adjacent diagram. The paper-tape readers and punches used with • • • • • • • •• ~ COLUMN • • the POp-a/I computers accept 8-channel paper tape. The various formats are briefly explained and identified below. 1 L 0.3.1 Leader/Trailer Format Leader/trailer tape is used to introduce and conclude the object program when punched on • • paper tape. Leader/trailer tape can be recognized by a consistent channel a punch only as • • shown in the adjacent diogram. 1 0.3.2 sPROCKET HOLE RIM Format r Paper tape punched in RIM format can be identified by the absence of a channel a punch, and by a channel 7 punch in every fourth column. The channel 7 punch indicates the start of a line of coding, and that (the first) column and the second • • • • • • • • CHANNEL 7 • ••••••• 6177 •• • • • • • 32'2 •• • • ••••••• 52 • •• •• • 13 • • • •• " • ••••••• 53 • • • • • '3 • • •• '0 •• • ••••••• 00 • • • • • • • 07 17 column contain the location and the third and fourth columns contain the contents of the location. 77 1 77 LOCATION CONTE"TS LOCATION CONTENTS LOCATION CONTE"TS LOCATION 77 •••• 07 • ••• 00 0-4 CO"TE"TS LOCATION 0.3.3 ., • • • 324 3'0 •• •• • • • • • 311 32!0 •• •• • • • • • • 240 •• •• •• USASCII Format .• -• USASQI (USA Standard Code for Information Interchange) format uses all eight channels to represent a single choracter (letter, number, or symbol) as shown in D.3.4 T S 31\ 3H S 240 30' A • •• • • 323 • • • • • • 303 • • • • • 311 • 240 •• • • • • • 30' •• 317 • • • •••• 322 •• • • • • • • •• • • 30' •• • 1 the adjacent diagram. . S 31 , F 0 R 315 II A 324 T Binary Format • Binary format can be recagnized by the absence of a channel 8 punch, an occasional channel 7 punch, and frequent sections of blank tape. The 00 • •••• 32,7 • •• • 50 • •• 00 channel 7 punch denotes an origin of a program or subprogram or a chonge • in origin, and subsequent columns contain the instructions (two columns per instruction) or data of succeeding locations. 1 00 00 00 02 • • ••• • • • • • • • 0' • • • • • • • 00 •••• ••• •• • 0' • • • • • • • 45 • •• • 56 77 76 77 60 77 77 D-5 ORIGIN INSTRUCTION INS TRue T ION INSTRUCTION INSTRUCTION INSTRUCTION tNSTRlJCTION INSTRUCTION INSTRUCTION INSTRUCTtON APPENDIX E SYSTEM CONFIGURATION AND OPTIONAL HARDWARE E. 1 INTRODUCTION Depending on the hardware configuration of a particular TSS/8, there can be as many as 24 users working on the system simultaneously. The minimum hardware configuration is designed to service from four to eight users; it requires a 12K core memory (three fields). The first 8K (fields 0 and 1) are shared by the various Monitor subprograms. The other 4K (field 2) and any additional fields are shared by users of the system. Each user has the following resources: 4K core memory for execution of programs and a corresponding 4K disk track for temporary storage of his core image when it is swapped out by the Monitor. The disk is divided as follows: a. Monitor Area -- The first 20K of the disk is occupied by Monitor subprograms. These subprograms are swapped into core memory as needed. b. User Swapping hea -- This area consists of a 4K track for each user in the system. When a user is temporarily swapped out of core, his program is stored on his 4K disk track. c. File Storoge Area -- The remaining disk area is used for storing System library Programs and user files. The system can have a maximum of 32K of core memory. Additional fields of core permit overlapping the run time of one user program with the swapping time of another, thus increasing operating speed. A high-speed, paper-tape reader and punch unit is pictured in Figure E-1 and descriptions of the reader and punch units follow. E. 2 READER UNIT The high-speed, paper-tape reader is used to photoelectrically input data into core memory from eight-channel fan-folded (non-oiled) punched paper tape at 300 characters per second. Power is applied to the reader when the computer POWER switch is turned on. The high-speed reader is under program control. However, tape can be advanced past the photoelectric sensors without causing input by pressing the FEED button (the white rectangular button shown in Figure E-l). E-l •...-..I~ Ii, Figure E-l E.3 High-Speed, Paper-Tape Reader and Punch Units LOADING THE READER UNIT The following is a description of the steps necessary to read a paper tape with the high-speed reader. Step Procedure Raise tape retainer cover {located beneath the tape feed button}. 2 Put tape into right-hand bin with channel one (see Section D.2) of the tape toward the rear of the bin. 3 Place several folds of leader tape through the reader and into the left-hand bin. 4 Place the tape over the reader head with feed holes engaged in the teeth of the sprocket wheel. 5 Close the tape retainer cover. 6 Depress the tape feed button (white rectangular button shown in Figure E-1) unti I leader tape is over the reader head. CAUTION Do not use oiled paper tape in the high-speed reader because oil collects dust and dirt which can cause reader errors. E-2 EA PUNCH UNIT The high-speed, paper-tape punch is used to record computer output on eight-channel fan-fold tape at 50 characters per second. All characters are punched under program control from the computer. Blank tape (feed holes only, no data) may be produced by pressing the FEED button (see Figure E-l). Power is appl ied to the punch when the POWER button on the punch unit is depressed (the punch motor can be heard). The two labeled buttons on the punch unit are described below. E.5 POWER This button is depressed to turn the punch ON and OFF. FEED While this button is depressed, the punch produces feed-hole-only punched tape for leader/trailer purposes. DECTAPE CONTROL AND TRANSPORT UNITS DECtape is a fast, convenient, input/output and data storage facility. The standard DECtape Transport unit is shown in Figure E-2. Figure E-2 DECtape Transport Unit E-3 E.6 CONTROL UNIT The DECtape control unit (located internally) interprets and controls the transfer of data between the computer and the transport unit. The DECtape control unit is located inside the rack containing the DECtape transport and can control up to eight separate DECtape transports. E.? TRANSPORT UNIT The DECtape transport unit is a bidirectional magnetic tape transport utilizing a lO-track recording head to read and write five duplexed channels . Tape movement can be controlled by commands from the computer program or by the manual operation of switches located on the front panel of the transport; however, manual operation does not transfer data to the computer. NOTE Only certified DECtapes (pre-recorded with timing and marking tracks) should be used. Otherwise, the blank tape must be certified using the DECTOG Program (DEC-08-EUFA-D). E.? 1 Transport Controls The following is a description of the settings on the OECtape transport and their functions. Settings • Function When depressed (must be in LOCAL mode), tape feeds onto right spool. REMOTE Transport is energized and under program control. OFF Transport is de-energized. LOCAL Transport is energized and under user control from external transport switches. Unit Selector Identifies the transport to the control unit. WRITE ENABLED DECtape is available for search, and write activities. WRITE LOCK DECtape is available for search and read activities only. • When depressed (must be in LOCAL mode), tape feeds onto left spool. E-4 NOTE The REMOTE and WRITE ENABLED lamps light to indicate the status of the transport. E. 7. 2 Operat ing Procedure The following is a description of how to mount a DECtape on a transport unit. Step Procedure Set switch to OFF. 2 Place DECtape on left spindle with DECtape label out. 3 Wind four turns of tape on right spool. 4 Set switch to LOCAL. 5 Wind a few turns on right spindle with'" switch to make sure tape is properly mounted. 6 Dial correct unit number on unit selector (number 8 is equivalent to 0). 7 Set switch to REMOTE. Select either WRITE ENABLE or WRITE LOCK setting. E-5 APPENDIX F STORAGE ALLOCA TIO N F.l STORAGE MAP The system's storage allocation is illustrated below. CORE MEMORY ~ RESIDENT MONITOR RESIDENT MONITOR 4K 4K PHANTOMS INIT l'':ol:.k PR·)·:.r'AM 4K USER PROGRAM 4K - USER PROGRAM ) USER PROGRAM 4K 4K 01 SK STORAGE ) SI 4K FIP 4K INIT 4K TS8 (RES 01 4K TS811 (RES 11 4K JOB #1 4K JOB #2 JOB #N 4K 4K FILES 4K o k:J 1o..I1t - - - - - - - - - - MONITOR ---------,,_*1.._ - - SWAPPING AREA - - -...j....t - - - FILE AREA---I 08-0466 Figure F-l F.2 TSS/8 Storage Map ALE DIRECTORIES There are two directories on the disk: the Moster file Dir.ectory (MFD) referenced mainly by the system, and the User Fi Ie Directory (UFD), referenced by the TSS/8 user. One of the functions of the MFD is to service the UFO. A UFD is a particular user's file directory containing the names of programs he has created on the disk. The UFO is a file like any other file except that its filename is the project-programmer number and password. (See Section F.3 for an explanation.) When a user is logged in under a specific number and references the disk, he is actually referencing his own file area on the disl<: through the UFD which has his project-programmer number as its name. He can specifically code his routine to reference UFOs of other users or the MFD; whether he is successful or not depends on the type of protection that has been specified for the area he is trying to reference. F-l MASTER FILE OIRECTORY WO RD 1 p~ISS (I CHAR) (I CHAR) USER FILE I PROG NO PROJECT NO WO RO (I CHAR) (I CHAR.) 1 PRe.TE. TED RIT:::,_ TIME CONSOLE (ICHAR) (I CHAR) NAME (I CHAR) (I CHAR) WO RD (I CHAR.) IPROTECTED SITS UNUSEO SEGMENT COUNT TIME CPU WO RD S FI LE LINK TO NEXT ENRTY LINK TO NEXT ENTRY UNUSEO OIRECTORY (I CHAR) OATE OF CREATION POINTER TO RETRIEVAL POINTER 0 LINK TO NEXT TO RETRIEVAL RETRIEVAL BLOCK SEGIoIE"IT *1 SEGMENT .. I SEGMENT .2 SEGMENT .. 2 SEGMENT .3 SEGMENT *3 *4 SEGMENT *5 SEGME NT .4 SEGMENT .. 5 .6 SEGMENT "6 SEGMENT .. 7 SEGMENT .. 7 SEGMENT SEGMENT 080352 Figure F-2 F.3 File Directories PROJECT-PROGRAMMER NUMBERS System account numbers are a combination of project number and programmer number. The account number (always written in octal) has a binary equivalent. When expressed as a 12-bit binary number, the project number is formed by the leftmost 7 bits and the programmer number is the rightmost 5 bits. For example, the account number 623 (octal) equals 000 110010 011 (binary). The left 7 bits (leading zeros included if any) are 0001100 (binary) and equal 14 {octal} which is the project number. The programmer number is 10011 (binary) or 23 (octal). Therefore a user with "account number" 623 has: project number 14 programmer number 23 F-2 APPENDIX G GLOSSARY OF ABBREVIATIONS AND TERMS G.1 COMMONLY USED ABBREVIATIONS The abbreviations listed below are used throughout the guide. Abb. Meaning AC ADDR B. SP. BIN CLC Accumulator Address Back Space Binary Current Location Counter Continue Carriage Return Carriage RetumLine Feed Control/Form (which represents holding down the CTRL key while depressing the Form key). Digital Equipment Corporation Deposit Data Field Extended Arithmeti c Element Examine CONT CR CR/LF CTRL/FORM DEC DEP DF EAE EXAM G.2 Abb. HSP HSR IF INST KBRD L LF LOAD ADD LOC LSP LSR MA MB MQ MRI PC PROG REL RIM SING INST SING STEP SR TTY Meaning High-Speed punch High-Speed Reader Instruction Field Instruction Keyboard Link Line Feed Load Address Location Low-Speed Punch Low- Speed Reader Memory Address Memory Buffer Multiplier Quotient Memory Reference Instruction Program Counter Program Release Read- In Mode Single Instruction Single Step Switch Register Teletype GLOSSARY OF TERMS The following list of computer/programming terms is by no means complete. However, it does include many of the terms used in data processing. Absolute Address (1) An address that is permanently assigned by the mochine designer to a storage location. (2) A pattern of characters that identifies a unique storage location without further modi fi cation. G-1 Accumulator A register in which the result of an operation is formed; Abbreviation AC Acronym A word formed from the first letter or letters cJ the successive words of a multiple word term. Accuracy The degree of freedom from error, i.e., the degree of conformity to truth or to a rule. Address A label, name, or number which designates a register or a location where information is stored. That part of an instruction which specifies the location of an operand. Address Register A register in which an address is stored. Algorithm A prescribed set of well-defined rules or processes for the solution of a problem in a finite number of steps. Alphabet An ordered set of unique representations called characters, e.g., the 26 letters of the Roman alphabet. Alphanumeric Pertaining to a character set that contains both letters and numerals, and usually other characters. Arithmetic Unit The component of a computer where arithmetic and logical operations are performed. ASCII An abbreviation for USA Standard Code for Information Interchange. Assemble To translate from a symbolic (source) program to a machine language (object) program by substituting binary operation codes for symbolic operation codes and absolute or relocatable addresses for symbolic addresses. Assembler A program that assembles. Auto-Indexing When an absolute location 0010 through 0017 is addressed indirectly, the content of that location is incremented by one, rewritten in that same location, and then read as the effective address of the next instruction. Auxiliary Operation An operation performed by equipment not under direct control of the computer. Offline operation. Auxiliary Storage Storage that supplements the primary storage. Binary (1) Pertaining to a characteristic or property involving a selection, choice, or condition in which there are two possibilities. (2) Pertaining to the numeration system with a radix of two. Binary Digit One of the symbols 1 or O. A digit in the binary scale of notation; called a bit. Bit A binary digit. Blank Character A character used to produce a space on an output device. Block A set of things, such as words, characters, or digits, handled as a unit. G-2 Bootstrap A technique or device designed to bring itself into a desired state by means of its own action, e.g., a routine whose first few instructions are sufficient to bring the rest of itself into the computer from an input device. Branch A point in a routine where one of two or more choices is made under control of the routine, i.e., a conditional transfer (jump). Buffer Storoge A part of core memory where information is stored temporari Iy during transfer; it may attempt to match the speeds of internal computation and the I/o device, thus permitting simultaneous computation and input/output. Byte A group of binary digits usually operated upon as a unit, e.g. , 8-bit or b-bit byte. Call To transfer control to a specified routine. Colling Sequence A specified set of instructions and data necessary to set up and call a given routine. Carriage Return The Teletype operation that causes the next character to be printed at the left margin. Central Processing Unit The unit of a computing system that includes the circuits controlling the interpretation and execution of instruction; the computer proper, excluding I/o and other peripheral devices. Character A single letter, numeral, or space mark used to represent information. Clear To erase the contents of a storage location by replacing the contents with blanks or zeros. Closed Subroutine A subroutine not stored in the main part of a program. Such a subroutine is entered by a jump operation and provision is made to return control to the main routine at the end of the surbroutine. Coding To write instructions for a computer using symbols meaningful to t"e cOlTlputer. Command A control signal, usually written as a character or group ci characters, to direct action by a system program. Compile To produce a machine language routine from a routine written in source language by selecting appropriate subroutines from a subroutine library, as directed by the instructions or other symbols of the original routine, supplying the linkage which combines the subroutines into a workable routine and translating the subroutines and linkage into machine language. Compiler A program that compiles. Complement To form the negative of a binary word by replacing all 0 bits with 1 bits and vice versa. Computer A device capable of accepting information, processing it, and providing the results in a usable form. Computer Program A plan or routine for solving a problem on a computer. G-3 Computer Word A sequence of 12 bits treated as a unit and capable of being stored in one computer location. Console Usually the external front side of a device where controls and indicators are available fa- manual operation of the device. Control Character A character whose occurrence in a particular context initiates, modifies, or stops a control operation, e.g., a character to control carriage return. Control Panel The part of a device console that contains manual controls. Convert To change the representation of data from one form to another. Copy To reproduce data, leaving the original data unchanged. Core Memory The main storage device in the PDP-8 in which binary data is represented by the direction of magnetization in each unit of an array of magnetic material. Cycle To repeat a set of operations until a stated condition is met. Cycle Time An interval of time in which one set of events is completed. Data A general term used to denote any or all facts, numbers, letters, and symbols. It connotes basic elements of information which can be processed or produced by a computer. Data Break A faci lity which permits I/o transfers to occur simultaneously with program executior'l on a cycle-stealing basis. Debug To detect, locate, and correct mistakes in a program. Decision A determination of future action. Delay The amount of time by which an event is retarded. Delimiter A character that separates and organizes items of data. Diagnostic Pertaining to the detection and isolation of a malfunction or mistake. Digit A character used to represent one of the non-negative integers smaller than the radix, e.g., in binary notation, either 0 or 1. Digital Computer A device that operates on discrete data, performing sequences of arithmetic and logicClI operations on this data. Direct Address An address that specifies the location of an operand. Display A visual presentation of data. Document A medium on which information is recorded for human or machine use. Double Precision Pertain ing to the use of two computer words to represent a number. Downtime The time interval during which a device is inoperative. G-4 Dummy An artificial address, instruction, or record ci information inserted solely to fulfill prescribed conditions. Dump To copy the contents of all or part of core memory, usually onto an external storage medium. Dynamic Dump A dump that is performed during the execution of a program. Edit To rearrange information for machine input or output. Effective Address The address actually used in a particular execution of a computer instruction. End-Around Carry The action of adding the most significant bit of a binary number to the least significant bit. Execute To carry out an instruction or run a progran on the computer. Executive Routine A routine that controls or monitors the execution of other routines. External Storage A facility or device, not an integral part of the computer, on which data usable by the computer is stored, such as paper tape, DECtape, or DECdisk. File A collection of related records treated as a unit, generally data or a program. Fixed Point In a numeration system the position of the radix point is fixed with respect to one end of the numerals, according to some convention. Flip-Flop A basic computer circuit or device capable of assuming either one of two stable states at a given time. Floating Point A numeration system in which the position of the radix point is indicated by one part (the exponent part), the other part represents the significant digits (the fractional partt. Flowchart A graphical representation of the sequence of instructions required to carry out a data processing operation. Format The arrangement of data. Function A specific purpose of an entity or its characteristic action. Hardware Physical equipment, e.g., mechanical, electrical, or electronic devices. Head A device that reads, records, or erases data on a storage device. Heuristic Pertaining to exploratory methods of problem solving. I/O Input or output or both. Identifier A symbol whose purpose is to identify, indicate, or name a body of data. Indirect Address An address in a computer instruction which indicates a location where the address of the referenced operand is to be found. G-5 Initialize To set counters, switches, and addresses to zero or other starting values at the beginning of, or at prescribed points in, a computer routine. Input The transferring of data from auxiliary or external storage into the internal storage of the computer. Instruction A set of bits (in an object program) or characters (in a source program) which as a unit cause the computer to perform an operation. Internal Storage The storage facilities forming an integral physical part of the computer and directly controlled by the computer. Also called main memory and core memory. Interrupt To stop a process in such a way that it can be resumed. Jump A departure from the normal sequence of executing instructions in a computer. label An identifier. language A set of representations, conventions, and rules used to convey information. leader The bl ank section of tape at the beginning of the tape. least Significant The rightmost digit of a binary number. Digit library An organized collection of standard and proven routines and subroutines which can be incorporated in larger routines. library Routine A proven routine that is maintained in a program library. load To place data into internal storage. location A place in storage or memory where a unit of data or an instruction may be stored. loop A sequence of instructions that is executed repeatedly until a terminal condition prevails. Machine Instruction An instruction written in machine language. Machine language A language designed for interpretation and use by the machine without translation. Macro Instruction An instruction in a source language that is equivalent to a specified sequence of machine instructions. Manua I Input The entry of data by hand into a device at the time of processing. Manual Operation The processing of data in a system by direct manual techniques. Memory (1) The erasable storage in the computer. (2) Pertaining to a device in which data can be stored and from which it can be retrieved. G-6 No Op An instruction that specifically instructs the computer to do nothing, except to proceed to the next instruction in sequence. o,ject Program The machine language program which is the output after translation from the source language. The binary program wh ich runs on the computer. Octal (1) Pertaining to a characteristic or property involving a selection, choice, or condition in which there are eight possibilities. (2) Pertaining to the numeration system with a radix of eight. Off Line Pertaining to equipment or devices not under direct control of the computer. On Line Pertaining to equipment or devices under direct control of the computer; also to programs operating directly and immediately to user commands, e.g., FOCAL and DDT. Open Subroutine A subroutine that must be relocated and inserted into a routine at each place it is used. Operand That which is effected, manipulated, or operated upon. Origin The absolute address of the beginning of a program. Output Information transferred from the internal storage of a computer to output devices or extema I storage. Overflow The generation of a quantity beyond the capacity of a register. Poge In the PDP-8/I, a unit of 200 (octal) locations which may be addressed directly. Patch To modify a routine in a rough or expedient way. Predefined Process A named process consisting of one or more operations or program steps that are specified elsewhere in a routine. Procedure The course of action taken for the solution of a problem. Processor A computer program that includes the compiling, assembling, translating, and related functions for a specific programming language. Program The complete sequence of instructions and routines necessary to solve a problem. Program Library A collection of available computer programs and routines. Programming Languoge A language used to prepare computer programs. Protected Location A storage location reserved for special purposes in which data cannot be stored without undergoing a screening procedure to establish suitability for storage therein. Punched Paper Tape A paper tape on wh ich a pattern of holes is used to represent data. Pushdown List A list that is constructed and maintained so that the next item to be retrieved is the most recently stored item in the list, i.e., last in, first out. G-7 Radix The quantity of characters for use in each of the digital positions of a numbering system. Read To transfer information from an input device to internal storage; also refers to the internal acquisition of data from memory. Real Time Pertaining to computation performed while the related physical process is taking place so that results of the computation can be used in guiding the physical process. Record A collection of related items of data, treated as a unit. Register A device capable of storing a specified amount of data, such as one word. Reset To restore a storage device to a prescribed state. Restart To re-establish the execution of a program. Routine A set of instructions arranged in proper sequence to cause the computer to perform a desired task. Run A single, continuous performance of a program. Scan To exam i ne sequentia II y part by part. Search To examine a set of items for those that have a desired property. Set To place a storage device into a specified state. Single Step Operation of the computer in which each instruction is performed in response to a sing Ie ma nua I operati on • Skip To ignore one or more instructions in a sequence of instructions. Software The collection of programs and routines associated with the computer. Source language A symbolic language that is an input to a given translation process. Source Program A program written in a symbolic (source) language. Statement A meaningful expression or generalized instruction in a source language. Step One operation in a routine. Storage Allocation The assignment of blocks of data to specified blocks of storage. Storage Capacity The amount of data that can be contained in a storage device. Storage Device A device into which data can be entered, in which it can be held, and from which it can be retri eved. Store To enter data into a storage device. G-8 String A connected sequence of entities such as characters in a command string. Subroutine A routine that can be part of another routine. Switch A device or programming technique for making selections. Symbol ic Address An address expressed in symbols convenient to the programmer. A label. Symbolic Coding Writing instructions using symbolic notation instead of actual machine instruction notation. System An assembly of software and hardware united to form an organized whole. Tape Drive A device that moves tape past a head. Temporary Storage Storoge locations reserved for intermediate results. Terminal A point in a system at which data can either enter or leave. Time Sharing The interleaving of the time of a device. Toggle Pertaining to the operation of a flip-flop or switch. Translate To convert from one languoge to another. Underflow The condition that arises when a computation yields a result whose magnitude is smaller than the system is capable of representing. Variable A quantity that can assume any of a given set of values. Word A 12-bit unit of data in the PDP-8/I which may be stored in one addressable location. Word Length The number of bits in a word. Write To transfer information from internal storage to an output device or to auxiliary storage. G-9 INDEX Command Summary, B-1, C-1 Abbreviations, G-1 Access to Another User's Library, 3-2 Advanced Monitor Commands, 3-1 ALREADY LOGGED IN?, 2-10 ASOI Character Set, A-1 ASCII Format, D-5 Assembly Language Programs, 9-1 ASSIGN, 2-7 Communication with Other Users, 2-5 Compatibility with PDP-8, 9-16 Console, 1-3 Console lOT's, 9-3 Duplex (DUP), 9-4 Read Keyboard String (KSR), 9-3 Send a String (SAS), 9-3 Set Buffer Control (SBC), 9-4 Set Keyboard Break (KSB), 9-3 Unduplex (UND), 9-4 Assignable Devices, 9-9 Control of System Library Programs, 3-3 Assigning Devices, 2-7 Control of User Programs, 8-2 Available Device Units, 2-7 COPY, 7-5 BASIC-8, 3-5 Command Summary, 3-7 Editing Phase, 3-5 Error Messages, 3-10 Example Program, 3-6 Functions, 3-8 Implementation Notes, 3-12 Binary Format, D-5 BREAK, 8-8 BUSY, 2-5, 2-10 Calling, 7-6 Deleting Files, 7-7, 7-8 Example of Usage, 7-9 Listing Directories, 7-7 Loading Files from DECtape, 7-6 Saving Disk Files on DECtape, 7-7 Summary of Options, 7-8 CREATE, 8-3 Creating a Disk File, 8-2 Creation of System Library Programs, 8-1 CTRL/B, 2-1, 3-3, 8-2 CTRL/BS, 2-2, 3-4 CTRL/C, 3-3 Calling Monitor, 2-1 Calling System Library Programs, 2-4 CAT, 6-7 Calling, 6-7 Example Usage, 6-7 CATALOG, see CAT Debugging Program, 6-5 DECtape, E-3 Control and Transport Units, E-3 Transport Controls, E-4 Transport Operating Procedures, E-5 Usage, 7-5 Characters on Keyboard, 1-4 Defining Disk Fi les, 8-3 Character Set for TSS/8, A-1 Deleting Files, 7-7, 7-8 CLOSE, 8-4 Delimiters, 9-16 Closing a File, 8-4 DEPOSIT, 8-2 INDEX (Cont) Devices, 2-6 Assignment, 2-8 Designators, 2-7 Handling, 2-6 Unit Numbers, 2-7 Device lOT's, 9-9 Assign Device (ASD), 9-10 load Punch Buffer Sequence (PlS), 9-11 load Status Register A (DTXA), 9-11 Punch Stri ng (PST), 9-11 Reader Fetch Character (RFC), 9-10 Read Reader Buffer (RRB), 9-10 Read Reader String (RRS), 9-10 Read Status Register B (DTRB), 9-12 Release Device (REl), 9-10 Skip on Flags (DTSF), 9-10 Skip on Punch Flag (PSF), 9-11 Skip on Reader Flag (RSF), 9-10 DUPLEX, 8-8 Duplicating Paper Tapes, D-1 Echoing, 9-16 EDIT, 6-1 Calling, 6-1 Command Summary, 6-3 Summary of Operations, 6-2 Elementary Monitor Commands, 2-1 Error Handler, 9-12 Error Messages, Monitor, 2-9 EXAMIN E, 8-2 EXTEND, 8-4 F, 8-5 Files, 3-1 Closing, 8-4 Defining Disk, 8-3 Error conditions, 8-6 Internal numbers, 8-3 Opening, Protecting, 3-3, 9-6 File and Disk I/O (PAL-D), 9-4 Close File (ClOS), 9-7 Create File (CRF), 9-5 Extend File (EXT), 9-6 File Information (FINF), 9-8 Open File (OPEN), 9-7 Protect File (PROT), 9-6 Read File (RRlE), 9-7 Reduce File (RED), 9-6 Rename File (REN), 9-6 Write Fi Ie (WFllE), 9-7 File Deletion Error Conditions, 8-6 Fi Ie Directories, F-1 File Information Command, 8-5 File Protection Masks, 8-5 Fi Ie Protect, 3-3 FOCAL, 3-13 Calling, 3-13 Command Summary, 3-13 Control Characters, 3-16 Error Messages, 3-17 Example Program, 3-17 Math Functions, 3-16 MODIFY, 3-15 Output Format, 3- 15 Reading FOCAL Paper Tapes, 3-17 Formats, Paper Tape, D-4 FORTRAN-D, 4-1 Calling, 4-1 Compiler Diagnostics, 4-6 Device Codes, 4-2 Disk Files, 4-3 Editing, 4-2 Example Programs, 4-4 FORT, 4-1 FOSl, 4-1 I/O, 4-2 Operating System Diagnosti cs, 4-8 Statement Summary, 4-5 Freeing Devices, 2-8 FUll, 2-10 Glossary, G-1 INDEX (Cont) High Speed Reader, E-1 Manual, How to Use, 1-5 High Speed Punch, E-3 Master File Directory, F-1 How to Use This Manual, 1-5 Monitor, 1-1 ILLEGAL REQUEST, 2-10 lOT's, see Console Device File and Disk Program and System Status Program Control Calling, 2-1 Commands, 2-1, 8-2 Command Abbreviations, 8-2 Echoing on Keyboard, 9-16 Elementary Commands, 2-1 Error Messages, 2-9, 8-6 Return to, 3-4 Mounting a DECtape, E-5 Multiple Device Assignments, 2-8 Multiple Device Units, 2-7 Initialize Reader/Punch, 9-17 o Internal File Numbers, 8-3 Interrupt Processing, 9-17 Octal Debugging Technique, see ODT ODT,6-5 Keyboard, 1-4 Calling, 6-5 Command Summary, 6-6 Programming Notes, 6-6 Off-Line Tape Preparation and Editing, 0-1 Leader/frailer Format, 0-4 LINE-OFF-LOCAL Knob, 1-3 Listing a Paper Tape, 0-3 OPEN, 8-3 Opening a File, 8-3 Optional Hardware, E-1 Listing Directories, 7-7 LOAD, 8-7 LOADER, 6-4 Calling, 6-4 Usage, 6-4 With ODT, 6-5 Loading Files from DECtape, 7-6 Loading High Speed Reader, E-2 LOGIN PLEASE?, 2-10 LOGIN Procedure, 2-2 Logout Procedure, 2-4 Low Speed Pr inter, 1-3 PAL-D, 5-1 Buffers, 9-2 Calling, 5-1 Console I/O, 9-2 Control of Programs, 8-2 Error Diagnostics, 5-6 Example Program, 5-2 File and Disk I/O, 9-4 Fu II-Dup lex Hardware, 9-2 Strings, 9-2 Symbol List, 5-3 TSS/8 PAL-D, 5-1 9-1 Writing a Program, 5-2, 9-1 Paper Tape Control, 7-1 INDEX (Cont) Paper Tape Formats, 0-4 Paper Tape Preparation, 0-1 Paper Tape Reader/punch, 1-4 PDP-8 Compatibility, 9-16 PIP, 7-1 BIN Format Files, 7-3 Call ing, 7-1 Deleting Disk Files, 7-3 Loading Paper Tape onto Disk, 7-1 Moving Disk Files, 7-3 Punching out a Disk File, 7-2 Summary of Options, 7-5 Transferring BASIC Files, 7-4 Transferring SAVE Format Files, 7-4 With High Speed Reader/punch, 7-2 Power Control Knob, 1-3 Processing Interrupts, 9-17 Program and System Status lOT's, 9-13 Account (ACT), 9-15 Check Status (CK S), 9-13 Console Number (CON), 9-15 Current JOB (WHO), 9-15 Current Job Number (USE), 9-15 Date (DATE), 9-15 OR with Switch Register (OSR), 9-14 Quantum Synchronization (SYN), 9-16 Return Clock Rate (RCR), 9-15 Segment Count (SEGS), 9-15 Segment Size (SIZE), 9-15 Set Switch Register (SSR), 9-14 Set Time (STM), 9-16 Skip on TSS/8 (TSS), 9-16 Time of Day (TOO), 9-15 User Run Time (URT), 9-15 Program Control lOT's, 9-12 Halt (HL T), 9-12 Set Error Address (SEA), 9- 13 Set Restart Address (SRA), 9-13 Reader/punch Initialization, 9-17 REDUCE, 8-4 RELEASE, 2-8 RENAME, 8-4 Resources, 2-6 RESTART, 8-8 Return to Monitor Level, 3-4 RIM Format, 0-4 RUN, 8-8 SAVE, 8-6 SAVE Format Files, 8-6 Saving Disk Files on DECtape, 7-7 START, 8-2 Status Words, 9-13 Storage Allocation, F-l Storage Mop, F-l Summary of Monitor Commands, B-1 Logging In and Out, B-1 Device Allocation, B-1 File Handling, B-2 Control of User Programs, B-3 Uti I i ty Commands, B-3 Summary of TSS/8 lOT's, C-l DECtape Control (TC01), C-2 File Control, C-l High Speed Reader and Control (PC02), C-2 Input Buffer Control, C-2 Output Buffer Control, C-2 Program Control, C-l Project-Programmer Number, F-2 SWITCH, 8-8 PROTECT, 8-5 Switch Register, 9-14 Protection Codes, 8-4 Symbolic Editor, 6-1 Protection of Files, 3-3 SYSTAT, 2-6, 6-8 Calling, 6-8 Description of Output, 6-8 Example, 6-8 INDEX (Cont) System Configurations, E-1 Use of th is Manua I, 1-5 System Library Programs, 3-1 USER, 8-8 BASIC-8, 3-5 Calling, 2-4 CATALOG, 6-7 Controlling, 3-3 COPY, 7-5 Creation of, 8-1 EDIT, 6-1 FOCAL, 3-13 FORTRAN-D, 4-1 LOADER, C-4 ODT, 6-5 PAL-D, 5-1 PIP, 7-1 User File Directory, F-1 User Program Status, 9-13 User Program, Control of, 8-2 User Switch Register, 9-14 Users, Communication with Other, 2-5 Utility Commands in Monitor, 8-8 VERSION, 8-8 System Resources, 2-6 System Status Reports, 2-6 WHERE, 8-2 Writing Assembly language Programs, 9-1 TALK, 2-5 Tape, How to Insert in Reader, 1-5 Tape Editing, 0-1 Tape Preparation, 0-1 Te lepri nter, 1-3 Teletype, 1-2 Keyboard, 1-4 TIME, 2-6 Time-Sharing, 1-1 Transport Controls, E-4 TSS/8 Character Set, A-1 TSS/8 Monitor, 1-1 TSS/8 versus Paper Tape Versions of PAL-O, 9-1 TYPE tBS ARST, 2-10 UASOI Format, 0-5 Unit Number, 2-7 UNAUTHORIZED ACCOUNT, 2-10 UNDUPLEX, 8-8 HOW TO OBTAIN SOFTWARE INFORMATION Announcements of new and revised software, as well as programming notes, software problems, and documentation corrections are published by Software Information Service in the following newsletters: Digital Software News for the PDP-8 Family Digital Software News for the PDP-9/l5 Family These newsletters contain mformation to update the cumulative Software Performance Summary for the PDP-8 Family Software Performance Summary for the PDP-9/l5 Family The appropriate edition of the Software Performance Summary IS included in each basic software kit for new customers. Additional copies may be requested without charge. Any questions or problems on the articles contained in these publications or concerning the use of Digital's software should be reported to the Software Specialist or Sales Engineer at the nearest Digital office. New and revised software and manuals, current issues of the Software Perfornlance Summary, and cumulative Software Manual Updates are available from the Program Library. To place an order, please contact your local Digital office or write to: Program Library Digital Equipment Corporation 146 Main Street, Bldg. 3-5 Maynard, Massachusetts 01754 When ordering, include the code number and a brief description of the program or manual requested. Digital Equipment Computer Users Society (DECUS) maintains a user library and publishes a catalog of available programs as well as the DECUSCOPE magazine for its members and non-members who request it. For further information, please write to: DEC US Digital Equipment Corporation 146 Main Street Maynard, Massachusetts 01754 Please complete the return postcard below if you would like to receive Digital's newsletters Send c:::J Digital Software News for the PDP-8 Family, or c:::J Digital Software News for the PDP-9/l5 Family Name _______________________________________________ To Company Name _______________________________________ Address ______________________________________________ (zip code) My compu ter is a 0 PDP-8I o PDP-8L o PDP-8S o PDP-12 o PDP-9 o LINC-8 5 o Other _ _ _ _o_PDP-I _ _ _ _ _ _ _ __ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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: mllmllllma Digital Equipment Corporation Software Information Services 146 Main Street, Bldg. 3-5 U",vn .. r.l U"'"" .....hll~tt" n17.c::.d. _. READER'S COMMENTS TSS/8 TIME-SHARI NG SYSTEM USER'S GUIDE DEC-T8-MRFB-D Digital Equipment Corporation maintains a continuous effort to improve the quality and usefulness of its publications. To do this effectively we need user feedback - your critical evaluation of this manual. Please comment on this manual's completeness, accuracy, organization, usability, and readability. Did you find errors in this manual? \'".s; How (an this manual be Improved? _____________________________ DI:(' also strives to keep Its customers mformed of current DEC software and publtcattons. Thus, the followmg period· u:ally dl~tflbuted publtcattons are available upon request. Please check the appropnate boxes for a current issue of the publtl:Jtlon(s) destred. o Sollware Manual Update, a quarterly collectIOn of reVIsions to current software manuals. o User's Bookshelf, a blbltography of current software manuals o ProgrJm LIbrary Pnce LIst, a Itst of currently avaIlable software programs and manuals. Name _______________ Organization Street _______________ Department ___________________ City _ _ _ _ _ _ _ _ _ _ _ State _ _ _ _ _ _ _ _ _ _ _ _ _ _ Zip or Country _ _ _ __ - - - - - - - - - - - - - - - - - - Fold Here - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Do Not Tear-Fold Here and Staple - -- - - - - - - - - - -- FIRST CLASS PERMIT NO. 33 MAYNARD. MASS BUSINESS REPLY MAIL NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STATFS Postage will be paId by mamaoma Digital Equipment Corporation Software Information Services 146 Main Street, Bldg. 3-5 u ..,,_ ....AI Uft~ ... ft._.,. •• ro_ .... ro n1'7t:.A ----"
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies