Technical Memorandum No. 102-I 03674-23-M CPS PROGRAM LOGIC MANUAL Volume I CPS SYSTEM ARCHITECTURE AND CONVENTIONS G,.- N..,Cederquist K.:, Me't r Approved by:... ~,. for,,... COOLEY ELECTRONICS.LABORATORY Department of Electrica.l Engineering The University'df Michigan Ann Arbor, Michigan Contract No. Nonr-1224(36) NR187-200 Office of Naval Research Department of the Navy Washington, D. C. 20360 February 1970 Reproduction in whole or in part is permitted for any purpose of the U. S. Government

NI~ Ix~j\ Lk ~ R 9-9,9 2, - v lk)

PRE FACE TO THE SERIES This report of four volumes is intended to document the May 21, 1969 version of the Cooley Programming System (CPS) which was developed at the Cooley Electronics Laboratory of The University of Michigan. The four volumes are titled: Volume 1: CPS System Architecture and Conventions Volume 2: CPS Basic Programming Package Volume 3: CPS FORTRAN Package Volume 4: CPS System Utility Programs The four volumes were written in order to take a snapshot of CPS at one point in'its continuing development. This version of CPS is considered to be a first generation system; successive versions are on the drawing boards and internally resemble their parent less and less every day. CPS is a generalized programming and file management system written for use on the PDP-8 processor of Digital Equipment Corporation's LINC-8 computer. A minimum memory size of 8192 words is required. Extensive use is made of the two tape units present on every LINC- 8 for both file storage and system residence. Using CPS, programs can be entered, edited, assembled (or ii

compiled), loaded and executed entirely from the keyboard without the use of paper tape. CPS provides power and flexibility normally only found on larger computers and in fact was modeled after the Michigan Terminal System which operates on an IBM SYSTEM/360 model 67. In addition to a comprehensive file management and control system CPS contains: Symbolic Text Editor 8-K FORTRAN Compiler MACRO- 8 Assembler Two loaders SABR Assembler Various utility programs Each of the above programs contains service routines which permit automatic communication with the central file system and which allow direct access to CPS files. The general policy followed in implementing CPS was to borrow and adapt as much of DEC's software as possible in order to speed system development. The responsibility (or blame) for various segments of CPS is divided as follows: Gerald Cederquist System design and conventions, Control Program, Absolute Assembler, Absolute Loader, MARKP8 (tape marking program), and FILECOPY (file copying program). 11i

Kurt Metzger SABR, FORTRAN, Relocating Loader, PAPERBIN (binary paper tape input program), TAPCOPY (tape copying program), and assorted tape routines. joint effort Text Editor, I/O Control System, and various compromises. Work started on CPS in November of 1968 with the first workable version being completed in February of 1969. The FORTRANSABR package was incorporated in the March-April period of 1969. Since this time CPS has been in use at CEL in the development of digital signal processing programs for project MIMI. It has been found to be a very effective tool and has greatly decreased program development time and programmer frustration. Tasks which formerly took over a month to complete using the DEC 8-LIBRARY System are now routinely completed in one to two weeks. The bulk of CPS and the associated routines were hurriedly written since the authors were effectively stealing time from their thesis research. Consequently portions of the code were done in a quick and dirty manner. Now that several months have passed, the fact that these portions were quick has dimmed in memory but the dirt remains. iv

The authors would like to thank Dr. T. G. Birdsall of CEL for his continued encouragement and support and Mr. C. Conley of DEC for his assistance in providing the FORTRAN- SABR package for use in CPS. G. Cederquist K. Metzger Ann Arbor, Michigan December 1969 Vr

TABLE OF CONTENTS Page PREFACE TO THE SERIES ii PREFACE TO VOLUME I viii CHAPTER 1. AN OVERVIEW OF SYSTEM ARCHITECTURE 1 Contents 1 Design Goals 3 The Resident Supervisor Problem 4 CPS Control Program 6 System Components 6 CHAPTER 2. COLD START PROGRAMS 24 CPS Cold Start Bootstrap Loader 24 CPS Cold Start Error Program 29 CHAPTER 3. BOOT - CPS CONTROL PROGRAM LOADER 32 CHAPTER 4. CILDR - CPS CORE IMAGE PROGRAM LOADER 38 CHAPTER 5. CPS CONTROL SYSTEM 44 Contents 44 Program Residency and Loading 45 System Prologue and Command Language Interpreter 47 System Utility Routines 48 Detailed Memory Allocation 62 Calling Sequences for Utility Routines 64 Program Listing 77 CHAPTER 6. IOCS3 - THE I/O CONTROL SYSTEM FOR CPS 138 Contents 138 Introduction 140 Concepts and Facilities 140 Requirements 142 Use of IOCS3 143 Program Listing 159 vi

TABLE OF CONTENTS (CONT.) Page CHAPTER 7. SUMMARY OF SYSTEM CONVENTIONS 176 CPS Detailed Magnetic Tape Organization 176 File Tape Table of Contents Structure 178 Conventions Regarding Storage of Information in Files 182 Structure of the CPS/User Program Interface 188 System Messages 194 CHAPTER 8. SYSTEM GENERATION 196 Introduction 196 Cold Start Programs 198 Control Program Bootstrap Loader 203 Core Image Loader 203 Prototype Communication Area 203 Establishment of Initial VTOCs 204 Control Program 205 A First Check 206 Absolute Loader 208 PAPERBIN 209 Text Editor 211 Absolute Assembler 212 Final Cleanup 213 Remarks on Mass Storage Device Independence 214 vii

PREFACE TO VOLUME I Volume I of the CPS Program Logic Manual describes the system structure and conventions. It presumes that the reader has a user's knowledge of CPS and is familiarwith the CPS User's Reference Manual. viii

CHAPTER 1 AN OVERVIEW OF CPS SYSTEM ARCHITECTURE CONTENTS PREFACE.............................. 2 1.1 DESIGN GOALS.................... 3 1.2 THE RESIDENT SUPERVISOR PROBLEM....... 4 1.3 CPS CONTROL PROGRAM.................. 6 1.4 SYSTEM COMPONENTS................... 6 1.4.1 File System...................... 8 1. 4.1.1 File Structure...................8 1.4.1.2 Working Areas................ 10 1.4.1.3 File Attributes............... 11 1.4.1.4 Access Methods.... 11 1. 4.1.5 Critique of the Filing Structure..... 11 1.4.1.6 User Creation of Files..... 12 1.4.1.7 Destruction of Files............. 14 1. 4.1.8 Listing of File Names............ 14 1.4.1.9 System Files......... 14 1.4.2 Program Execution System.............. 15 1.4.2.1 The Loaders................ 15 1.4.2.2 The RUN Command............. 17 1.4.2.12. Core-Image File Specification.......... 17 1.4.2.2.2 Logical I/O Unit Spe cification.......... 18 1.4.2.2.3 Parameter String Specification.......... 21 1.4.3 Command Language.................. 21 1.4.3.1 Diagnostics and User Aids.......... 22 1.4.3.2 Command Line Parsing.......... 23 1

2 Preface This chapter gives an overview of both the external and internal structure of CPS, the Cooley Programming System for LINC-8 computer with 8192 words of core memory. (See Cooley Laboratory Technical Memo 101 for documentation of a related system, 4K CPS, to run on a 4096 word machine. ) It is intended as an introduction to CPS architecture for those who will maintain and improve the system. Implementation details and program logic are covered in detail in other chapters and volumes of this report. Familiarity with the CPS SYSTEM REFERENCE MANUAL is presumed. It will be obvious to the knowledgeable programmer that the author has borrowed notation from many sources (in hopes of relating to past work). One of the most used notation sources is OS/360, the operating system for the IBM System/360 computers. This publication describes CPS up through release AY219 (May 21, 1969). The system architecture will not remain as specified herein. CPS is a research project, and is subject to change at any time.

1.1 Design Goals CPS was written to provide a general information processing and programming capability for the PDP-8 processor in the Cooley Electronics Laboratory LINC-8 computer. The original objective in writing the system was to eliminate the need for use of paper tape or the switch register: to allow a user to manipulate symbolic files, assemble these files into machine language, and run the resulting program entirely from the Teletype keyboard. In the early stages of the system design, the original objective was expanded to include building as general a system as possible, consonant with memory limitations. The extent to which the expanded goal has been achieved is indicated by the fact that many new programs and applications not previously envisioned or considered practical have been implemented since CPS became available. CPS is the most complex set of programs ever written at Cooley Lab. It was recognized early in the system design phase that the only way to bring the project to fruition would be to divide the overall system into many subsystems, each of which could be considered a black box by all the other subsystems. In addition, it was desirable to separate along such boundaries as would minimize the number of bits of information transferred between subsystems. The systems-level programmer will recognize that these goals were in conflict with the fact that writing CPS was in a sense a research project, a project wherein we had much general, but little specific idea of what would be good to implement and

4 how to do it. Thus CPS consists of very general, flexible, and somewhat redundant support routines which helped to develop the initial system. The later 4K version of CPS does not contain such general routines; rather it is specifically tailored to implement an extension of the system design evolved previously during the writing of CPS for the 8K LINC-8. An additional design goal was that of delaying as much as possible the binding time of any operation in the system. This has the effect of making the system highly interactive from the user's standpoint. It does however consume memory space, and consequently compromises had to be found to implement some of the features of the system. 1. 2 The Resident Supervisor Problem All of the computer utility systems from which CPS drew inspiration have in some sense a resident supervisor, a subsystem which does input-output operations, storage allocation, and CPU time allocation. From a systems design standpoint, the need for a resident supervisor in these systems comes about because they serve multiple users simultaneously and it is necessary to have a single procedure to do delicate operations, lest users catastrophically interfere with each other. In addition, the code for doing I/O, servicing the clock, and the like may be written and loaded once, and then be shared among *TSS/360 at IBM, MULTICS at Project MAC, and MTS at The University of Michigan;

5 many users. These design considerations were not applicable in CPS since it was decided that, lacking appropriate hardware to enforce I/O protocol and memory protection, CPS would be a one-user system. Hence there was no classical argument for forcing the CPS user to run his programs with a system-supplied supervisory program in core —the single user would perforce take all the CPU time available, and could certainly do his own I/O. Moreover, an execution-time supervisor would undoubtedly take up core space which many users wou would prefer to have available for their programs. The approach taken was to do away with all requirements on the user that he give up control of any part of the hardware to programs not of his own choosing. However, there still remained the problem of user program I/O and interface with CPS. Plainly the casual user who wishes to access files will not want to write his own routines, both for lack of knowledge and the possibility that a bad routine might inadvertantly destroy files or cause some other catastrophe. This problem was solved by providing access to procedures such as a series of standardized I/O controllers, a set of file access routines, and the like which the user may load and use as black boxes with known terminal properties. Thus core memory is conserved while standard interface conventions are observed. *such as IOT command trapping which is available on DEC's TSS/8 system.

6 1.3 CPS Control Program In spite of the fact that no sort of resident supervisor was to be used in CPS, there was still need for a general program to invoke various service modules and hold a dialog with the user. This program is called the CPS Control Program. It is loaded into core (usually after every job step and allows the user to direct the system interactively to perform the next job step. The operation of CPS under the CPS Control Program can be envisioned as the traversing under user control of various branches of a tree rooted at the Control Program. (See Fig. 1. 1. ) Certain service modules are structured as subroutines contained within the Control Program while others are stand-alone modules because of memory space limitations. It is of interest that in keeping with the objective of finding nice boundaries upon which to divide the system, little information is passed between the various service modules in Fig. 1. This design consideration also dictated that systems programs such as assemblers, compilers, and editors be treated exactly the same as user-generated programs. Thus the system programs may be maintained, moved, replaced, and the like without having to convey any information to the Control Program. 1. 4 System Components CPS contains 2 main components, a filing system and a program *A job step is the action caused by issuing a CPS command; e. g., doing an assembly, saving a text file, printing the file index, and so forth.

7 System Coldstart Loader Control Program \SAVE 1 Bootstrap LOAD ______Loader Command CPS )-a Control RUN Program Command /DE /b \ |Executing Command I \ Program SIGNOFF f/COMMENT Command I Command Figs 1.o1 CPS CONTROL STRUCTURE

8 execution system. Provision is made for interfacing these systems with each other, with the user, and with executing programs by means of (among other things) a command language and a system communication area. These are discussed in the following sections. 1. 4. 1 File System. A file is a collection of information in machine-readable form; for example, it may be the output of the assember operating upon a particular text string. Using the CPS filing system, the user may name this collection of information and store it on LINC tape. The file may then be referred to by name for later use. A user may also change the contents of files, destroy files, and copy files from other users' CPS tapes. All routines which are part of the filing system (with the obvious exception of user program file access routines) are currently resident within the Control Program. 1. 4. 1. 1 File Structure. Files consist of a number of PDP-8 pages of information and are stored on LINC tape which has been marked at 128 words per block. (Some thought was given earlier to having the system handle files in partial page form or in line file form such as in MTS, MULTICS, or TSS/360, but this was rejected * as being too slow and too consumptive of high speed memory. ) CPS requires two tapes for filing purposes, and they are organized as shown in Table 1. 1. As can be seen, the tape allocation is complicated by the fact that the tapes are used for system residence as *This was based on tape spooling times. Use of disk memories would permit a much more flexible file organization.

Tape Drive Block Nos. Contents 0 0 System Coldstart Loader 1- 377 Symbolic working area 400- 477 Reserved for system functions 500-2000 User files 1 0 Coldstart Error Program 1- 147 Binary working area 150- 237 Reserved for system functions 240-2000 User files TABLE 1.1 CPS TAPE ORGANIZATION

10 well as for filing purposes. The file space allocation algorithm is quite simple; newly- created files are placed at the end of the tape. This algorithm trades decreased program complexity for increased elapsed time in the form of tape spooling and is only marginally acceptable. The next scheduled change to CPS is modification of this algorithm to decrease tape spooling time. 1. 4.1.2 Working Areas. Many programs produce files of information, and some programs need access to mass storage while they are in execution. To provide for both these requirements, a portion of each file tape has been set aside as a working area. The working areas have names, "-S" for the symbolic working area and "- Bl for the binary working area, by which the user may reference them in CPS commands as if they were files. Operationally, programs which produce files put these files into the working areas. Provision exists within the CPS Control Program to modify the file description of the working areas so that they will reflect the information deposited there by a previously-run program. This modification is transparent to the user. Except for the (possible) modification of the file description of the working areas upon entry to the CPS Control Program, the working areas behave within the file system exactly the same as permanent, user- created files. The symbolic working area, -S, is located on drive 0 along with user-created symbolic files. For this reason, the tape mounted on drive 0 is often called the "symbolic tape" of the 2 tapes necessary to

run CPS. Similarly the drive 1 tape contains -B, and is often called the "binary tape." 1.4.1. 3 File Attributes. As each file is created, it is assigned an attribute according to its contents; e. g., a text file produced by the symbolic editor has the "compressed symbolic" attribute assigned to it. This attribute is inspected when the file is to be assigned to a tape drive. If the attribute falls into the "symbolic" equivalence class, the file is assigned to drive 0 (the left-hand drive); otherwise it is assigned to drive 1. The contents attribute and length of a newly created file (as well as its contents) are derived from the existing file specified by the user in the SAVE command (see Section 1.4.1. 6). An additional feature of the filing system in CPS is the capability to discern if a file may be used as an information source or sink or both. This capability is utilized during user specification of the interface between a program to be run and the file system. 1.4.1. 4 Access Methods. The accessing of information in files is the responsibility of the program needing the information in the file, and though most access is currently sequential, random access is certainly allowable subject to mechanical limitations of the tape drives. 1. 4.1.5 Critique of the Filing Structure. At this point, it should be apparent that the, file structure chosen for CPS was strongly

12 influenced by the requirement that the user need have no system code resident with his program. This point and the inherent sequential structure of the tape storage medium lead to knotty problems when writing into a permanent file. The working areas have worked out well in practice, although they make filing proceed somewhat more slowly than it would if writing into a permanent file were possible. Again, the file structure could be improved if a disk were available. 1. 4.1.6 User Creation of Files. The user creates files by means of the SAVE command. This command simply copies an existing file into a file which is created to hold the copy; the name of the newly-created file is designated by the user. If the user specifies as the name of the file to be created a name already in the file index, he will be prompted to determine if he wishes to have the existing file replaced by the new one. If he indicates replacement, the old file is destroyed and the SAVE operation proceeds as if the old file had never existed. It will be useful to follow through an example of a typical filing operation; suppose the situation is as follows. The user invokes the text editor stored in the file "*ED" and specifies the name of a file, say'QQSV", containing the text to be edited. The editor is brought into core memory and started. The input file support routine within the editor spools down the symbolic tape and reads fromn the tape the contents of QQSV. (See the RUN command, Section 1.4. 2.2, for an

13 explanation of how the editor knew where QQSV was located.) The user is then prompted for editing commands. When the user is done editing, he signifies his desire to return to the CPS Control Program by issuing a command to the editor. The editor then writes the text file onto -S and leaves -S updating information in a communication area for the Control Program. This information consists of a starting tape block number, a length, and a contents attribute for the file of edited text. The Control Program is then bootstrapped into core and started. If certain key words are properly set (the editor will have set them), the Control Program will update the file description of -S to reflect the fact that the edited copy of QQSV is stored there. The user may then issue a SAVE command to save the edited file contained in -S into a permanent file, replacing the old copy of QQSV if he sees fit. Let us suppose the user does desire to replace the old copy of QQSV with the edited version stored in - S. He will issue the command SAVE -S QQSV! causing the SAVE service module within the Control Program to be invoked. The SAVE module will destroy the old copy of QQSV by calling upon the DESTROY service module, and will then create a copy of -S at the end of the sumbolic tape. The copy will have name QQSV, and will possess the length and contents attribute of -S. It will also be flagged as an information source only, since write access to

14 permanent files is not allowed. Note that at no point during the file manipulation does the user have to supply information to the file system other than a name, a large improvement over previous file management systems for the PDP-8. Note also that it is possible to store information of virtually any type in such a filing system, a necessity if the system is to expand to fill applications not yet envisaged. 1. 4.1. 7 Destruction of Files. The user may delete files from his file tapes by issuing the DESTROY command to the Control Program which then invokes the DESTROY service module. The DESTROY module removes the file entry from the volume table of contents (VTOC) for the tape ard puts the tape space occupied by the file back into the free storage pool by simply moving all files further down the tape toward the front of the tape, overwriting the destroyed file on tape in the process. The names of the two working areas may not be deleted from the VTOC. 1.4.1.8 Listing of File Names. The user may request a listing of names of files on his file tapes by issuing the INDEX command. The listing may be qualified as to level of detail, type of file, and file attribute. The information displayed in the listing is derived from the VTOC of each file tape. 1.4.1.9 System Files. By convention, a file whose name begins with an asterisk * is designated a system file. The system

15 file is meant to hold system programs, such as assemblers, compilers, tape utilities, and the like. These files differ from other files in only 2 respects. The syntax for the command to destroy a system file differs from the command to destroy other files. This renders the system file somwhat immune to destruction by the casual user. Also, the names of system files are not printed in a listing of file names unless specifically requested. 1.4.2 Program Execution System. The program execution system includes a set of loaders* and provision for executing a program. In a broader sense, this system also includes the various language translators within CPS since they make program execution possible. The program execution system gives the user the capability to bring together many translator output files and build their contents into a single file, called a core-image file, structured as an executable program. The RUN command can be used to invoke the program in a core-image file and put it in execution. At the same time, much information may be passed to the program to be invoked through the communication area. These aspects are discussed in more detail below. 1.4.2.1 The Loaders. Each language translator in CPS produces a file whose contents attribute falls into the binary equivalence *More nearly, primitive linkage editors. However, the name Loader has stuck.

16 class and which contains the object program produced as a result of the translation process. The contents of these files are in a form close to machine language, the binary numbers which the PDP- 8 interprets as instructions, but need to be further processed before they can be deposited into core memory in the form of a binary number program. This processing is done by the loaders. The loaders have many capabilities and require much memory space, and so are run as independent programs though they are invoked by the Control Program. To conserve core memory during the loading process, loaders use the working areas for mass storage. -S is used while building the core image, and the completed core image appears in -B, from which it may be SAVEd or RUN. The core-image file contains the complete set of binary numbers constituting a program along with a descriptor table indicating where the numbers are to be placed in memory. It should be emphasized that in using the core-image file as an intermediate step in running a program, early binding time of the program linkages was traded for substantial flexibility in the loaders. There are presently 2 loaders available in the system, one to load the output of DEC's absolute assemblers (e.g., MACR08) and the other to load the output of the SABR relocating assembler. Two loaders are needed since the absolute and relocating assemblers have completely different object file formats and philosophies. Since the

17 loaders are in reality run as separate programs, their structure, data formats, user interaction, and the like are covered in a separate chapter in later volumes. 1.4.2.2 The RUN Command. The RUN command service module is invoked by the Control Program to load into core memory and place into execution a program contained in a core- image file. The user may specify the following items in the RUN command: 1) the name of the file containing the core image to be run, 2) a number of interface connections between the program to be executed and the filing and program execution systems in CPS, and 3) a character string to be passed to the program to be executed. This last is referred to as the parameter string. The RUN command service module deposits the user- specified information and linkages in a system communication area before loading into core the core-image file containing the program to be run. In keeping with the CPS design philosophy, responsibility for using this information lies with the program to be executed. 1.4.2.2.1 Core-Image File Specification. The file tape VTOC's are searched for the name of the core-image file to be run. If all is in order, the physical address of the file is left in a communication area for the core image loader. At present, only one file may be specified to be run; i.e., the system contains no explicit provision for overlaying programs. A possible future extension would

18 be to allow concatenated core-image files to be run with the understanding that this construct would in reality leave information for program overlays in the communication area. 1.4.2.2.2 Logical I/O Unit Specifications. The interface between an executing program and the file system is specified by the user-provided logical I/O unit specifications in the RUN command. Logical I/O units provide a mechanism to delay the I/O device binding time when writing a program until the program goes into execution. For example, when running a FORTRAN program under the IBSYS operating system for the IBM 7000 series computers, the convention is made that the logical tape drive (read "I/O unit") which is named "6" is the system output tape. Thus a FORTRAN programmer may write the statement WRITE (6, 100) A and rest assured that at the time of execution of his program the value of the variable A will be written upon the physical tape drive which mounts the system output tape, the correspondence between the name "6" and the physical tape drive address being established by IBSYS. The important points in the above example are 1) by convention, a certain logical I/O unit fulfills a particular purpose in the context of a specific program; it is certainly possible that a SNOBOL program

19 running under IBSYS could consider logical tape drive 6 as the system input device. 2) The actual assignment of a logical device to a physical I/O device is delayed as late as possible. Within early operating systems, it was not possible to change the assignment of logical drives to specify different information sources and sinks than were set at system assembly time, and thus device binding time occurred at the beginning of program execution. With later executive systems the user had complete control over logical/physical device correspondence and so binding time was delayed right up until device use. Consonant with the CPS design philosophy of delaying binding time as late as possible, a variation of this second approach was used. Programs which need to operate with files stored in CPS do their I/O through a set of logical device support subroutines. At RUN time the user must specify which CPS files* or physical I/O devices are to be attached to the available logical I/O units. This information is left in the system communication area. When the executing program does an I/O operation involving a logical I/O unit, the information left in the system communication area is interpreted to gain access to the file or device specified by the user. As long as the linkage information is being interpreted, it is a simple extension to the logical device support routines to handle *A file is an information source or sink, just as an I/o device is.

20 more than one file or device attached to an I/O unit. Thus concatenated files are easily incorporated into the I/O structure, giving the user the capability to effectively create one "superfile" from a number of smaller files insofar as an executing program is concerned. The concatenation capability has proven extremely useful in practice. Currently CPS supports 6 logical I/O units, which have names "1" "2",..., "6". Units 1, 2, and 3 are constrained by the Control Program to specify files or devices which are information sources, while units 4, 5, and 6 are constrained to specify information sinks. The user, when writing a program, must take these constraints into account. The constraints were made originally to prevent writing into permanent files. However, they also prevent specification of read/write access files* within the structure of the CPS RUN command. If the direction of data transfer were bound later+ within the logical device support routines rather than earlier in the Control Program, read/write access files would easily fit into the RUN command semantics. This problem is undergoing study and will probably result in system changes sometime in the future. In order to specify physical devices in an I/O unit specification, the teleprinter has been given the name "PTR" and the reader/ keyboard the name "RDR". A pseudofile named "*DUM.MY*" is also *Or if you speak PL/I, "update files". +As the old philosopher says, "Do what I say, not what I do! "

21 recognized by the Control Program and has the following properties: When reading from *DUMMY*, an END OF FILE indication is always returned. When writing to *DUMMY*, information is accepted but never stored; thus it serves as the circular file, the system wastebasket. Although this I/O linkage mechanism does not contain provision for getting location information for a file dynamically during program execution, it does move the logical I/O unit binding time from program assembly time to user program execution time. The author feels that a large part of the utility of CPS is due to this logical device mechanism. 1. 4. 2. 2.3 Parameter String Specification. The user may specify up to 32 ASCII characters as a parameter string to be passed in the system communication area to the program to be run. The program may then use these characters in any way it desires. (Some past uses have been headings for listings and program behavior modification.) The parameter string is thus a general mechanism available to all programs to delay binding of some aspect of their behavior until execution time. 1.4.3 Command Language. The user communicates interactively with the Control Program through the CPS Command Language. Each command line input to the system causes execution of a job step; hence operation of CPS insofar as the user is concerned consists of

22 inputting a command, waiting until it is carried out, inputting the next command, and so forth. 1.4.3. 1 Diagnostics and User Aids. The Command Language has purposely been kept simple and is quite easily learned, desirable features that certain widely-used third-generation operating systems notoriously lack. The entire command entry structure has been designed to minimize user frustration in entering commands. At times command lines can grow to be quite long (up to 255 characters are allowed) and so it is desirable to be able to fix errors in the middle of lines and not have to retype the whole line. Two facilities are provided for correcting errors, input line editing and dynamic replacement of bad strings. The input line editor allows users to delete lines, delete characters, echo lines for checking, enter an END OF FILE status, enter control characters into command lines, and continue command lines over many physical lines on the Teleprinter. Thus a user may edit a line while he is forming it, eliminating bad characters as he goes. If the user does not fix all the mistakes in a command line before he gives it to the Control Program for execution, the various command service modules will of course find the mistakes and issue a diagnostic. However in many cases, it is possible to fix the mistake on the fly by having the user enter a replacement string for the bad string in the command. This is done in several places, most

23 extensively in the RUN command where it saves copious amounts of retyping. In order that the user know where he is within a job step, the Control Program (and most of the systems programs) issues a prefix character before each line typed to the user and before each input line solicited from the user. This character informs the user which part of CPS is talking to him or wants input from him. 1.4.3.2 Command Line Parsing. The first characters of an input line are assumed to be a command verb. Only the first three characters of this verb are significant and so commands may be abbreviated by their first three characters. When scanning an input command line, the first three characters are compared against an internally stored table of valid command verbs. If a match is found, the command service module which handles that verb is called. If no match is found, the command line is flagged as invalid. Each service module consists of two routines in cascade. The first processes the remainder of the input line according to the syntax and semantics of the particular command. It is this routine which issues diagnostics concerning the user input line and which does dynamic replacement of bad input strings if possible. The second routine actually performs the function called for in the command using the parameters extracted from the input string by the first routine. If the command does not require leaving the Control Program, a return is made to the command input routine after the action is completed.

CHAPTER 2 COLD START PROGRAMS 2.1 CSBL - CPS Cold Start Bootstrap Loader The source code for the Cold Start Bootstrap Loader (CSBL) is stored in the file "CLDSTART". Execution of CSBL is the means by which CPS is started when the LINC-8 has just been turned on. CSBL is resident on tape block 0 of a unit 0 CPS tape. It is loaded into core and started at location zero whenever the "LOAD" switch on the LINC- 8 console is lifted. 2. 1. 1 Program Operation. After chasing through the string of NOP's (which are just space fillers), a -1 is deposited into memory location 17774 in the communication area (see Section 2.3 CSBL Code). This will inform the Control Program that it should type out the identifying heading "CPS(MMDDY)" when it is activated. Currently only CSBL calls for typing of the identifier heading, although any program may do so. The "MMDDY" portion of the heading may be decoded to give the month, day, and year of the genesis of the version of CPS being loaded. Note that the characters "MM" are the second and third characters in the month name. The read-only tape subroutine is next invoked to read one block from tape (128 words) from tape block 451 orn tape unit 0 into memory starting at location 07600. This block contains the regular 24

25 system bootstrap routine, BOOT. (See BOOT writeup, Chapter 3.) CSBL then jumps to the starting location of BOOT, 076J00, to bring the control program into core. The read-only tape routine was lifted from BOOT, and has the same calling sequence as the one in BOOT. The reader should see the BOOT writeup for an explanation of the tape routine. 2.1.2 Listing. The annotated assembly listing for CSBL follows. It was produced by issuing the CPS command RUN *ASM CLDSTART P=L

MACROS ASSEM[BLER (AN229) 26 1. PAGE 01 /CPS /COLD START BOOTSTRAP RCUTINE /GNC 12/13/G5 / *0000 0000 7000 NOP 0001 7000 NO P 0002 7000 NOP 0003 700 0 N, OP 0004 7000 NOP 0005 700C NOP ft /. p,4X. - 7 2 000 7000 NOP /, 000 7 7000 NOP 0 O010 7000 NOP- 0011 7240 STA 0012 5211 CDF O z 777 -/.,i-r,: —-.I 0013 3424 DCA I KEYADI R / 0014 A 201 CDF 0015 4025 JMI S RDTAPF /,- /, 0010 0451 451 /SYSTE;'M BOOT SITS iHERE (/. 0017 0001 Ol /1 "- I 0 020 oIc O ooo C/.:.00, 0les 4 C021 7500 7S-O/Z f Zs~r;.4.fl C002 5423 J:1P I;+1l 0021 7500 7 00 / 0024 7774 KiYADR, 7774:;~ 7 -' /!.EA;D- 0',LY TAPE OLjUTINE /,NC 12/17/S, / 0)025 0OOC 0 iDTAPi, 0 /3.U__ q- -. 002 7 00 CLA CLL 0027 1 425 TAD I RDTAPE OC30 3170 DCA BLN / 7.' 00 1 202 5 ISZ iIDTAPE 0032 1 425 TAD I FDTA P 00CC33 7041 CIA OC34 3171 DCA NU'i:, 0035 2025 IfJZ 12 1-DA-7" E 003S 14255 TA' I F\DTAPL 0037 3173 DCA LOC 0040 1173 TAD LOC 00'41 7112 CI.L.'TR 0042 I 11 5 TAD C2 0043 3172 DCA U'IT 0044 1173 TAD L.OC 0045 0073 ANh D i4 ASl' CC00 7112 CLL i;k7h 0047 7010 liAR 0050 11 30 TAD CDFD 0051 3125 DCA hCDF C0052 2025 ISZ - DTAP2

27 2.1.2 PAGL 02 0053 1425 TAD I RDTAPE 0054 3173 DCA LOC 00G55 2025 I"Z RDTAPE 005s 7120 STL 0057 2170 SERCHA, ISZ LDLN GO0 0 3174 SERC:L[, DCA CSUiT 00 1 1147 TAD C7$00 00.2 3175 DCA CNTi 0053 1172 TAD UNIT 00 G4 141 ICOCN 00S5 7201 CLA IAC 003 3, 7430 2ZL 0067 G141 ICON 0070 1132 TAD CS 0071 S141 B, ICON 0072 414 A, JiS W'IAIT 0073 7500 1iASK, SflA C0074 7120 STL 0075 1170 TAD BDL 007S 7S50 SIVA CLA 0077 5113 Jls THEFR"E 01 0 S14 7 I'.:T 0101 7010 Ah 0102 C1 3S AINiD 4000 0103 74r0 SZA SNL 0104 5072 J1P A' 0105 7020 Ci;L 0 10 7520 SNL SIMA 0 1 07 5072 J7?:9 P A 0110 5141 ICON 0111 7001 IAC C I 12 5071 J" B 01 13 3S147 TitEE, INTS 01 14 7012. T R O 1 5 7-3S20 S' L CLA 011 1 5C72 Ji? A 011 7 1 1 7 TAD RiFUN CT 01 20 1 41 ICON 01 2 1 41 4i Ji,S WIAI T 0 1 2 4143S DTA, J'iS " AIT 0123 1174 TAD CSU i" 0124 3174 DCA CSUNi' 0125 171 IAAC C 1 2. 201 RCDF, CDF 0127 3577 DOA I LOC 0130C 3'201 CDFD, CODF 0 0 11 2 1 73 I LOC C1 1 00 0 C0, S 0123 2175 ISZ CNTR C0134 5122 J!TiP R[)ITA 01355 4143 JS Wi;!AIT 013O 7041 CIA 0137 1174 TAD CSUi 0140 7S50 SNA CLA O0141 5120 JiP WAIT2

28 Z2.1.Z PAG'i 03 0142 1147 TAD C7GGO 0143 1173 TAD LOC 0144 3173 DCA LOC C145 50G0 JMPP SERCH3 014S OOO0 WAIT, 0 0147 7 00 C7S00, 7O00 0150 6147 C7, INTS 0151 7700 StA CLA 0152 5147 JNP C7500 0153 1150 TAD C7 0154 3141 ICON 0155 7300 CLA CLL C156 5171 IAAC 0157 554S JflP I WAIT 0150 7300 WAIT2, CLA CLL 0151 2171 ISZ NUMiB 0152 5057 JNIP SEFRCHA 01S3 6141 ICON 0134 5425 JMP I RDTAPE 01 S5 0002 C2, 2 13S5 4000 M4000, 4000 0137 0003 RFUNCT, 3 0170 0000 BLN, 0 0171 0000 0NU;IB, 0 0172 0000 UNIT, 0 0173 0000 LOC, 0 0174 0000 CSUU, 0 0175 0000 CNTt, 0

29 2.2 UNITBAD - CPS Cold Start Error Program The source code for the CPS Cold Start Error Program (UNITBAD) is stored in the file "UNITBAD". UNITBAD is a program which informs the user if he mounted a unit 1 tape on drive 0 and then tried to load it by lifting the LOAD switch on the LINC console. UNITBAD resides on tape block zero of a unit 1 CPS tape. It is loaded into core and started at location zero only if a unit 1 CPS tape has been mounted on unit 0 and the LOAD switch has been operated. It causes the following message to be typed on the system teleprinter: "You have mounted a unit 1 tape on unit,." after which the CPU is halted. The code should be easily understandable as it stands, even to the novice. The listing which follows was produced by issuing the CPS command RUN *ASM UNITBAD P=L

MfCR.(i;S ASSEM.LER (AN229) 30 2.2 PAGE 01 /UNIT'BAD - A PROGRlAM TO TELL THE /USER THAT HE'S IMOUNTED HIS TAPES /ON THE WRONG UNITS /GNC 2/21/69 *. 00 0 70 7 00 NOP 0 00 1 7 0.0 0 NOP 0002'7000 NOP 0 003 700 NOP 0004 7 000 NOP 00)05 7009 NOP 0 006 7 000 NOP 0007 7000 NOP 0010 73.10 CLA CLL 001 1 2024 LOOP, ISZ MSGPTR/;' /r. 001 2 1/ 4i4 2 TAD I MSGPTR R /,/ 0013 6 046 TLS / 0 01/4 6041i TSF / (d 1 5 5014 M P. - 1 i 0.016 7309,0 CLA CLL 0 017 20,23 ISZ COUNTERY/J:?<'. 00320 5011 JMfP LOOPP/' 0021 7 4 0 HLT,/ --,q- ~ 0 022 5021- ] J.lJ:',P - i 0023 7717 COUNTE R, -END+REG 0024 i0024 iSGPT'R, BEG-1 0025 0215 BEG, 215 0026 0212 212 0 0127 0212 212 0030 0331 l"Y 0033 1 0317 "O 0 032 0325 "U 0 033,2940, 240 0,3 4 0310 "H 0035 0301 "A 0036 0326 "V 0037 0305 "E 0 O 40 02 40 2 4~ 04 41 0315 " 0 042 03 17 "0 ('/i., 43 0325 "U 0 04/4,1316 "N.7, 045 0324 "T 0 0i7 0 3 " 5 "E.0 C' 4'7 03!.' 4 "D 0,. 050 02/ Z5! 924/) C005 1 031 "A 052 02 2I 2/0 0053 0325 "U 0054 0316 "N 0055 0311 "I 0 0 56 0324 "T g057 0224 240 0060 0I261 "1

31 2.2 PAGE 02 0061 024-4 240 0062 0324 "T 0 063,0301 "A 0064 0320 "P 0065 03 5 "E 0066 0240 240, 0067 0317 "0 0070 0316 "N 00.71 0240 240 0072 0325 "U 0073 0331 "N 00,74 0311 "I 0075 032/4 "T 0076 0240 240 0077 0260 "0 10,0 0215 215 0101 0212 212 0 12 0212 212 0 1 03 0212 212 0104 0212 212 0105 0212 212 0106 0212 END, 212

CHAPTER 3 BOOT - CPS CONTROL PROGRAM LOADER 3. 1 Introduction The source code for the CPS Control Program Loader (BOOT) is stored in the file "BOOT". BOOT serves 3 purposes: (1) the code starting at 07600 loads and starts the CPS Control Program; (2) the read-only tape routine within BOOT is used by the core-image loader, CILDR; (see CILDR writeup, Chapter 4); (3) several locations within BOOT, starting at 07774, are used by CILDR to put a core image program into execution. BOOT resides on tape block 451 of tape unit 0 and is read into core under 2 circumstances. (1) When the LOAD switch is lifted, the cold start loader reads BOOT into core. (2) Every time the user issues a RUN command, the copy of BOOT which read in the Control Program is refreshed as a precautionary measure. The BOOT code was origined at 200 to allow the binary loader to load it, but it is page relocatable and resides at 07600 without any fuss. 3.2 Control Program Loading The first part of BOOT (07600 - 07620) consists of 3 calls to the read-only tape routine which load the Control Program into core. The utility subprograms and tape unit 1 file index (or VTOC - volume table of contents) are first loaded into field 1, followed by the tape 32

33 unit 0 file index which also goes into field 1. The third call loads field 0 with the I/O controller and Control Program field 0 module. The Control Program is then entered via a JMP instruction. 3.3 Read-only Tape Routine The read-only tape routine will read from either tape drive (0 or 1) into either memory field (0 or 1). The calling sequence is JMS RDTAPE tape block number # of blocks 100 * field + tape unit starting memory location return call + 5 when done This says, when executed, to read from the specified tape unit starting at the specified block number the specified number of blocks (128 words per block), depositing the blocks in core in the specified memory field starting at the specified memory location within that bank. The tape routine resembles one written by R. J. Clayton of DEC for the LINC-8, and is very close in structure and philosophy to DECUS L- 62 submitted by one of the authors (Metzger). After making copies of the calling parameters, the routine moves the tape toward the desired block via the code starting at SERCHA. When the tape is on block, THERE is entered and if the drive is moving forward, data is transferred via the code starting at RDRA. After all specified

34 blocks have been read, control returns to the caller. 3.4 Core Image Program Startup Locations Locations 07774 - 07777 are used by the core image program loader (CILDR) to set a program into execution after it has been loaded into core memory. CILDR diddles the read-only tape routine return address to cause control to return to location 07774 after the last portion of the core image program has been read in. At 7774, the proper data and instruction memory fields are set up and a jump is made to the starting address previously inserted by CILDR into STADR, locn 7776. A halt instruction is provided in location 7777; if the user wishes the CPU to halt after loading the core image, he may specify 7777 as a starting address. 3.5 Listing An annotated assembly listing for CILDR follows. This listing was obtained by issuing the CPS command RUN *ASM BOOT P=L

MACROS ASSE[IBLEFR (AN229) 3.3 PA SE 01 /SYSTEM BOOTSTRAP AND LOADER hOUTINE /RESIDES AT 7500 *200 /FOR BIN LOADER / 0C200 4221 BOOT, J ilS RDTAPE 0201 0150 050 /[JNIT I UTILITI'ES AND VTOC K,/i /t 0202 0030 030 /o2A.,,0203 0101 101 ol.z,,/ ~ —->-:/ 0204 0000 000 /!..-" z -' 0205 4221 J DS tRDTAPE 0205 0 400 400 /UNIT 0 VTOC /'.:, — 6c 0207 0010 010 / /,.'c-_, xz 0210 0100 1 00 /,.,;/J 0211 2000 2000.1 —-.tz 0212 4221 Ji"IS RDTAPE 0213 0410 410 /CPS.~-/.';/ 0214 0037 037S 7,., 021 5 0000 000 /,? 021 5 I 0000 000/.t,_-<' ~ 0217 5 20 J~i P I +1. (.ij.. 0220 2000 SYSTE __ _ / / /READ-ONLY TAPE ROUTIiE /GNC 12/17/ 53 O 221 G000 RD TAE A O 0222 7300 CLA CLL 0223 1321 TAD I RDTAPE'"~". 0224 335S DCA BLN 0225 2221 ISz. FDTAPE 022o ls21 TAD I RDTAPE -. <,- -' 0227 741 CIA 0 230 33 7 DCA NUiJi 0231 2221 ISZ RDTAP-E 0232 1 21 TAD I RDTAPL ~ " —:Y< 0233 3371 DCA LOC 023 4 2373 ISZ CNThi /LET TAPE DRI VE SEITLE 0235 523?2 J; P.-3 _/,,:..,. %-.,_'a.t,~.~.., _.?,. 02365 1371 TAD LOC C237 7112 CLL RTR -f' 0240 13 3 TAD C02 0241 3370 DCA UNIT 0242 1371 TAD LOC 0243 027 1 A ND riAS]i..' A'. 024zi 7112 C IL ir T g 0245 7010 A AR 0245 132S TAD CDFD 0247 3324 DCA RCDK 0250 2221 ISZ RDTAPE 0251 1521 TAD I RDTAPE fg 0252 3371 DCA LOC o 0253 2221 ISZ HDTAPE 0254 7120 STL

36 3.3 PAGE 02? 0255 2355 SERCHA, ISZ B LN/ -.. -?.A.,,-.,,/,, 02 56 3372 SEhiClli, DCA_ CSUA i,, L CM..-.- __.9 0257 1345 TAD C7500 0260 3373 DCA CTf-i _ 0251 1370 TAD UNIT 0262 141 1COiN 0263 7201 CLA IAC 0254 7430 SZL.... 02G5 5141 ICON 02GS 1330 TAD C06 0257 6141 3 ICON 0270 4A344 A, JtS WA AI T z0G271 7500;iASK, SilA / 0272 7120 S T L 0273 1365 TAD BLN 0274 7650 SNA CLA 0275 5 3 1 1 J P T H ER 0275 6147 INTS / 0277 7010 RA 0300 036)4 A; z4000?, 0301 7450 SZA SNL J 0302 5270 J fi1P A 0303 7020 Ci'iL 0304 7520 S 1'L S 1A 0305 5270 J P A 030GS 5141 ICON 030.7 7001 IAC 0310 5267 JWl D__ 0311 6147 Thl EE, I NTS,/7X,, e:,7 -W.. (7'.Z$i: t t,,? 0312 7012 TR/' / 0313 7620 SIL CLA 03 1/ 5270 JNi P A / 0315 1 3 S5 TAD i — F UNC 0 3 1 (141 ICON 40 17 4344 JNS AJAIT 0320 434 4 i' D T A, J JS,A I T //,,<I: /:,_~,x~,0321 1372 TAD CSUI1 1dG3 7 2 T C A C S U l;.,',.:,/.!!. 0322 3372 DCA CSUhi: 0323 S171 IAAC / 032 44 2 0 1O C DF, CDF / E/-!/ ce 0325 3771 DCA I LOC 032.5 6201 COFD, CDF 0 0327 2371 ISZ LOC 0C330 C0006 C 3, 6./;~r-Mr~ f8-'^/z(M'<Ki J CO 2T'4? p Y. 0331 23753 iL cOTf /". -." 0332 532C0 JI'iP hDIA - A0 333 4 44 J IS W.AIT:. I >.4..-,.._.T 0334 7041 CIA <. 0235 1372 TAD CSU'.... 0336 7650 S\NA CLA 0337 5355 JFMP WAIT2/ 5:)P 0340 1345 TAD C7600 A,,g %0)P 0341 1371 TAD LOC 05342 53371 DCA LOC j 0543 5256 JMP SERCHB

37 3.3 PAGE 03 0 344 0000 WAIT, 0'.!A I T //4 i. O #w'.Is- /4 -t r 0345 7500 C7 00, 7G00, 034 G 1 47 C7, INTS 0 3 47 7700 SNA CLA 0350 5345 Jf-iPI C7600 0351 134s TAD C7 0352 5141 ICON 0353 7 3 0 0 CLA CLL 0354 G171 IAAC 0355 5744 J'iP I.?AIT _T. 035S 7300 WAIT2, CLA CLLt 0357 2357 ISZ IB UM B 0350 5255 JN"iP SElICHA /,~.-x ~r 0351 5141 ICON,: vf — Ia 0352 5521 JN?] I RDTAPE,',- t' 0353 00G2 C2, 2 0354 4000 /4000, 4000 0355 0003 FUNIJNCT, 3 0355 0000 BLN, 0 0357 0000 NUtiB, 0 0370 0000 UNIT, 0 0371 0000 LOG, 0 0372 0000 CSU, 0 0373 0000 CNTTR, C / / /LOADE~R WIIILL USE iTE NEXT'' 4 LOCNS TO /STARTUP A USER PROGRA,'i4; / 0374`203 STAR TUP, CDFP CIF /,>........Z...,::, 0375 5775 J7iP I.+1 037 S 0377 STAD, NO /. 4.. 0377 7 402 NO, liLT SYSTE2- 2000

CHAPTER 4 CILDR - CPS CORE IMAGE PROGRAM LOADER 4. 1 Introduction The source code for the Core Image Program Loader (CILDR) is stored in the file "CILDR". CILDR is invoked by the RUN command module in the CPS Control Program to load into core and put into execution a program stored in a core-image file. It is resident on tape block 450 of a CPS unit 0 tape and is overlayed on top of page 07400 of the Control Program when invoked. It operates as follows. 4.2 Program Operation Before CILDR is put into execution, the RUN command module of the Control Program will deposit 2 words of information describing the core-image file to be run into page zero, bank 0: 4000* tape unit + block # will go into 00134 and file control bits + file length in blocks will go into 00135. These two words are copies directly from words 5 and 6 of the file index entry for the core-image file. The first task done by CILDR after it is invoked is to use the information in 134 and 135 to construct a unit and block number word for the file immediately following on tape the core-image file to be run. The word is deposited for safekeeping into 17773 in the communication area. This information is used in only one case in the 38

39 present version of CPS, and that is to invoke the SABR assembler to do pass 2 of a FORTRAN compilation. Of course we have carefully insured that the SABR assembler always directly follows the FORTRAN compiler on tape. (A much more general scheme for transfer of control, allowing both explicit and implicit specification of overlays, has since been worked out, but has not yet been incorporated into the system. ) CILDR now concerns itself with loading the core-image file. Recall that the first tape block in any core- image file contains a table describing the placement of the remaining blocks in core as well as the program starting address. (See Core Image File Structure, Section 7.3 of this volume. ) CILDR picks up the tape address of this descriptor block from location 134 and separates the unit and block number into parameter words appropriate for calling RDTAPE, the read-only tape routine within BOOT in page 07600. (See BOOT writeup, Chapter 3.) RDTAPE now reads the core-image descriptor block into core page 07200. The code beginning at the symbol LOADER (07425) executes successive calls to RDTAPE to read into core all but the last core subimage. When the descriptor for the last subimage is encountered (the top bit in the first word of a subimage descriptor table entry is set to one), control transfers to LASTMOD, where a call to RDTAPE to read in the last subimage is faked in such a manner as to cause

40 RDTAPE to return to the code in BOOT which will start the loaded program into execution. The starting memory field and address are deposited into BOOT before RDTAPE is called. By convention core-image files are structured so that code destined for field zero will always be loaded last. Moreover, since within a memory field code loads from low address to high address, the scheme used in CILDR will allow code to be loaded all the way up to 7677 in bank zero. 4.3 Listing An annotated assembly listing for CILDR follows. This listing was produced by issuing the CPS command RUN *ASM CILDR P=L

41 4.3 IMACRO03 ASSEi~bLER (AN229) PAGE 01 /CORE ItIAGE FILE LOADER - CPS / 77400 7400 7300 CLA CLL 7401 1135 TAD 135 /GET FILELEN 7402 0377 AND (377 /STRIP OFF CRUD 7403 1134 TAD 134 /ADD FILE START BLKNO 7404 5211 CDF 10 /-NEXT FILE FOR SYSTEM 7405 3775 DCA I (7773 /OVERLAYS 740S 6201 CDF 7407 1134 TAD 134 /GET BLN OF CI FILL 7410 7000 RTL 7411 0375 AND (1 7412 3221 DCA DESUNIT tk/,-. / — 7413 1134 TAD 134 7414 0374 AND (1777 7415 3217 DCA DESBLI( / -— k.~ 7416 4773 JNS RDTAPE 7417 0000 DESBLK, 0 7420 0001 DESLEN, 1 7421 0000 DESUNIT, 0 7422 7200 7200 7423 1372 TAD (7177 7424/ 320 DCA DESBTf / i _-t X/ 7425 2250 LOADEiR, ISZ DESPTR 7425 ISSO TAD I DESPlIR 7427 7510 SPA...... 7430 5201 J NP LASTiIOD /T-'7431 3254 DCA MNODLEN /A.,-,-r A...-T..'... 7432 2260 ISZ DESPTR 7433 106CS TAD I DESPTR /GET FLD 7434 7105 RTL CLL 7435 7C004 RAL /SHIFT FOR RDTAPE CALL 7'43S 1221 TAD DESUNIT /ADD UNIT 7437 3255 DCA i' OD UFW /. 7440 2200 I SZZ D ESTR 7441 1IS50 TAD I DESPTR 7442 3255 DCA IKODADR 7/143 1217 TAD D ES B L K /'/~ /~-?''J, -.ffT. /,-.r/, S/,:U?.'A. 7444 1220 TAD DESLEN 7445 32.17 DCA DESBLK 744 1217 TAD DLES3LK 7447 3253 DCA,iODDBLK 7450 1254 TAD tIODLEN /4. -''J"-'<- D L-'L-' 7451 3220 DCA DESLEN 7452 4773 JMNS RDTAPE!ip- 6 - ZoS 7453 0000 0 MODBL, 0 7454 0000 i OD)LE N, 0 7455 0000 NODUFW, 0 7456 0000 MODADR, O 7457 5225 JNP LOADER 7450 0000 DESPTR, O 7461 0371 LASTIYOD, AND (37 /ei.. / 8_,-.J4., 7462 7141 CIA CLL L,,,,,,-

42 4.3 PAGE 02 7 453 3 7 7 0 D C A N U * B /,' 74 54 2250 ISZ DESPTT 7465 1 G0 TAD I DESPTR 74S5 1357 TAD (CDF 7457 37%S DCA ICDF,C/DFI- o,' i 7470 1221 TAD DESUNIT 7471 7112 F-THI' CLL 7472 1355 TAD (2 7473 3754 DCA UNIT 7474 2250 ISZ DESPTR 7475 1 5C0 TAD I DESPTR 7 475 7 53 DCA LOC 7477 1217 TAD DESBLK 7500 1220 TAD DESLEN 7501 3752 DCA BLN / N l.lto-o/7502 1351 TAD (STARTUP //A'f,-,.,2 7503 3773 DCA RDTAPE 7504 22S0 ISZ DESPTR 7505 1550 TAD I DESPTR 7505 1751 TADT N ( F -S9T-;kR-Y$ZU 2F< 7507 3751 DCA STATIUP 7510 2250 ISZ DESPTR 7511 1 SS TAD I D~SPTYR 7512 3750 DCA STADR /.z >.: 4-._ 7513 2322 TI'iEOUT, ISZ LOCNTR /LET TfPE SETTLE 7514 5313 Jii T- IIiEOUT /. 7515 2321 ISZ hICNRi /'t: 7515 5313 J MP TlPiEOUT' "' J 7517 5720 JMP I.+1 7520 7S54 7554 /I i'7'fE 7 521 7772 HICINT, -6 7522 0000 LOCNT-t, 0 / RDTA;P-=7521 NUBi-E 77S7 fi C D e7 7724 UNIT-7770 LOC-7771 BLN-7755 STAt TUP- 7774 STADR 7775 75G50 7775 $ 7551 7774 755'2 77SS 7553 7771 75S4 7770 75S5 OOC2 7555 7724 7557 5201 7570 7757 7571 0037 7572 7177 7573 7621 7574 1777 7575 0001

43 4.3 PAGE 03 7575 7773 7577 0377

CHAPTER 5 CPS CONTROL SYSTEM CONTENTS 5.1 PROGRAM RESIDENCY AND LOADING........... 45 5.2 SYSTEM PROLOGUE AND COMMAND LANGUAGE INTERPRETER....................... 47 5.3 SYSTEM UTILITY ROUTINES................ 48 5.3. 1 IOCS3 - System I/O Supervisor....... 48 5.3.2 PACK - Pack a File Tape......... 48 5. 3. 3 Message Printing Routine............. 49 5.3.4 TPCOPY - Tape Copying Routine......... 50 5. 3.5 GETLINE - General Line Input Routine...... 50 5.3. 6 QU.IZUSER - A Routine to Ask the User a Question................ 54 5. 3.7 PRTNAM - Print a File Name........ 55 5.3.8 NDXPRT - File Index Printing Routine...... 56 5. 3.9 GETFD - Find a Control Block for a File/Device. 56 5.3.10 MAKFIL - Create a File Entry in a VTOC.... 57 5.3. 11 COMPRESS - Squeeze Characters from One to Two per Word.................... 59 5.3.12 DESTRY - Destroy a File............. 59 5.3.13 SRCHVTOC - Search a VTOC........... 60 5.3.14 OPSCAN - Find Next Operand........... 60 5.3.15 GETTAP - Allocate Tape Space.......... 61 5.3. 16 RELTAP - Deallocate Tape Space......... 61 5.4 DETAILED MEMORY ALLOCATION............ 62 5.5 CALLING SEQUENCES FOR UTILITY ROUTINES..... 64 5.6 PROGRAM LISTING.................... 77 44

45 5.1 Program Residency and Loading The CPS Control Program is the vehicle through which the user controls and directs his programming session. It is loaded into core memory by the system bootstrap loader routine, BOOT (see Chapter 3) and occupies about 70008. words of memory in the version of May 21, 1969. The Control Program is broken into 3 parts insofar as its residency on tape is concerned. All code (instructions) which will be loaded into bank 1 sits on a unit I tape from block 150 to 155 inclusive; BOOT loads this code into core starting at location 10000. It also reads the VTOC (file index) for unit 1 from blocks 170 - 177 into location 14000 upwards. (The blocks 156 - 167 are transferred to core, but this area is overwritten by a later read from unit 0.) This read operation for the bank 1 code and unit I VTOC is performed in a single sweep in order to speed up Control Program loading. BOOT next loads the unit 0 VTOC from blocks 400 - 407 into location 12000 upwards, and finally finishes off by reading the bank 0 portion of the Control Program from unit 0, tape blocks 410 - 446 inclusive, into core starting at location 0. The broad-brush memory map of the Control Program after loading is complete is shown in Fig. 5.1. (A more detailed memory map is given just before the code in Section 5. 4. )

46 BOOT Communi cat ion Area Scratch Area Syst em Messages 6&6o8-~ _ _I Unused LOAD CM nused SI GNOFF CM Concatenated Fil e SupPort Routine RUN CM ~o...... Unit 1 VTOC Unused SAVE CM DEST CM INDEX CM* 2i i o* Unit 0 VTOC System Nucleus /2ooo Unused'Input Line Buffer I/O Control System Utility Routines (IOCS3, see ch. 6) 2z~.................... /o'oo 0 Page Zero Page Zero BANK 0 BANK 1 FIG. 5. 1. MEMORY MAP of the CONTROL PROGRAM * CM means COMMAND MODULE

47 5.2 System Prologue and Command Language Interpreter BOOT passes control to the system prologue which starts at location 2000. The prologue code initializes the I/O system and sets up the base address on page zero for the system message routine. The prologue code then checks the key area in the communication area to see if the program which caused the Control Program to be loaded and started has passed any messages. The possible messages in the current version of CPS are (1) a request to type out the system ID ("CPS(MMDDY)") or (2) information about the disposition of -S or -B as files. (See Section 7.4. 4 for the structure of the key area and file information areas.) After the prologue code has been completely executed, it is never used again until the system is reloaded. Control is then given to the command language interpreter (CLI) on page 3000. The CLI calls the standard line-input routine, GETLINE, to obtain a command line from the user. It then scans the command table, COMTBL, in page 10600 to look for a match between the first 3 characters in the line received from GETLINE and an entry in the command table. If a match is found, the CLI jumps to a command service subroutine (whose address was also designated in the COMTBL) which handles the remainder of the input line. If a match is not found, the CLI flags the command line as invalid. After either of the above actions has been completed, the CLI

48 prompts the user for another input line. 5.3 System Utility Routines Before studying the action of the various command service subroutines which actually implement the available CPS commands, it will be useful to look at the more complex of the various utility routines within the system. These are covered in this section in the order of the core addresses at which they are situated in the CPS version of 21 May 1969. 5.3.1 IOCS3 - System I/O Supervisor. IOCS3, a generalized I/O package for LINCtapes and 33ASR Teletype, is the I/O supervisor for the control program. All I/O done by the control program is via subroutine calls to IOCS3. IOCS3 is of sufficient complexity so that Chapter 6 in this volume has been entirely devoted to it; see that chapter for further information. 5.3.2 PACK - Pack a File Tape. PACK is located at 2115 8 and is called only by RELTAP (release tape). It is used to move the information on a segment of a file tape further down toward the beginning of the tape - it is this routine which actually copies over a file being destroyed on tape. PACK sits in the lower memory field because the whole upper memory field is used as a buffer when packing. Thus RELTAP calls PACK to pack a tape; PACK sets up the proper parameters and calls

49 TPCOPY (tape copy). TPCOPY saves the upper memory field, does a copy operation from the old locations on the tape to the new locations, and then returns to PACK. PACK waits until the upper memory field has been restored, and then returns to RELTAP which is stored in the upper field. If the space occupied by RELTAP were not needed to buffer the tape copying operation, PACK could be eliminated entirely and RELTAP could call TPCOPY directly. PACK is rather a simple-minded routine. It copies parameters supplied by RELTAP from the upper to the lower memory bank and deposits them into the parameter locations for TPCOPY. It then calls TPCOPY, waits for its operation to be completed, and then returns to RELTAP in the upper field. 5.3.3 Message Printing Routine. The message printing utility routine (MPUR) is located at 22008 and is called by PRTNAM (print file name) and SYSMSG (system message routine). The MPUR has two entry points, MESAGI and CELMSG. If called at MESAGI, the routine behaves exactly as DIGITAL-8-18-U. If called at CELMSG, it is assumed that the address of a 2 character-per-word message to be typed is in the accumulator. The internal logic of the routine is very close to that of DIGITAL-8-18-U except for some switching necessary to insure that the routine returns through the proper entry point.

50 5.3.4 TPCOPY - Tape Copying Routine. TPCOPY is located at 22628 and is called by SAVE and PACK. It is a generalpurpose tape copying routine and may be used to copy any number of blocks from any tape location to another. The user specifies the source and sink tape locations (i. e., unit and block number) and the number of blocks to copy by depositing them into locations reserved for the purpose on page zero. (See the listing at the end of the chapter for particulars.) TPCOPY is then entered via a JMS. TPCOPY uses all 408 pages in memory field one for a buffer and so must first save field one in the stack area —tape unit 1, blocks 200- 237 inclusive. The routine then proceeds to copy from the source area to the sink area, transferring up to 408 blocks at a time. The actual tape operations are handled by calls to IOCS3 however. Every block transferred is read after it has been written to see if it checksums properly. After the transfer is complete, TPCOPY initiates the tape operation to read field one back into core and returns to the caller. Note that this last tape operation will not have been completed when TPCOPY returns. 5.3.5 GETLINE - General Line Input Routine. GETLINE occupies page 2400 and part of page 2600. In addition it needs a line buffer of N words where - N+I is specified by the contents of location 001108 and the buffer address is in locations 001018 and 001028. Its only entry point is at 24008. It is called by CLI, the

51 command language interpreter, and QUIZUSER, a routine which solicits replies from the user to questions. GETLINE is the only line input routine in CPS; it does all input line editing, continuation, and the like, and in general is charged with presenting its caller with a cleaned-up input line in the line buffer. In order to use GETLINE, the caller must set the buffer length and buffer address into the page zero locations previously mentioned. He then does a subroutine jump to location 2400. Upon return, the line buffer will contain up to N-1 characters, which were input by the user from the Teletype, in full 8-bit ASCII form, 2008 bit set, one character per word. If the user input fewer than N-. characters, the buffer will be padded to the right with blanks. In any event the very last word in the buffer will contain a zero -- 0008 — in order to mark the end of the buffer and eliminate the need for keeping character counts when scanning the input line. The operation of GETLINE is as follows. The CDF instruction stored in 1028 is put into the 3 locations within the routine where it will be needed. The line buffer is blanked and the line pointer set to zero. The main character handling loop is then entered. In the main loop, a character is obtained from the IOCS3 teleprinter buffer, its 2008 bit is set, and it is deposited into a temporary. The processor then hops down a long skip chain, testing to see if the character is one of a set of special characters. The

52 special characters are leader/trailer code (2008), back arrow, rubout, line feed, carriage return, device control 0 (ctrl P), minus sign, and data separator (ctrl Y). The action of these various characters is described in the following paragraphs. If the input character is leader/trailer (2008) code, then GETLINE echos the character to the teleprinter. (This echoing is in keeping with the design assumption that whenever the user strikes any key, the teleprinter will cycle to let the user know the control program is alive.) After echoing however, control returns immediately to the main loop, thus effectively ignoring the leader/ trailer character. If a back arrow is input, GETLINE echos the back arrow, issues a carriage return, line feed, and prefix character, and then jumps to the GETLINE initialization routine, thus effectively erasing the whole line which has been input up to the back arrow. Rubout is used to erase the last character input. If rubout is encountered, GETLINE tests the line pointer for the current line. If the line pointer indicates that no characters have been input on the current line, the main character handling loop is entered. Thus hitting a rubout to erase characters from an empty line results in no erasure and no echo character to the teleprinter. This is the only case where no character is echoed for a key depression, but it serves to convey the information to the user that the line is empty,

53 and we feel that because it conveys information, it is justified. If, on the other hand, at least one character is currently in the input line, a blank is deposited over the top of the last character typed, thus erasing it, and a reverse slash, \, is echoed to indicate the erasure. The line pointer is then decremented by one so that the next character input will overwrite the blank just deposited in the buffer. The line feed is used to indicate the user's desire to see an echo of the whole line he has input to date. GETLINE starts a new line on the teleprinter with the prefix character "=" and then prints the contents of the line buffer. There is a difficulty in this last section of the code in that the routine does not count the characters in the line buffer as it prints them. Thus if there are more than 71 characters to be echoed, the teleprinter will overprint at the end of the line. The fix for this condition, though obvious, has never been put into the code. The "literal next" character is device control 0 (DC0). Whenever a DCO character is encountered, the literal-next switch - LNSW - is set to -1 and the main loop is re-entered. Since LNSW is set, the next character retrieved from the IOCS3 input buffer will be put into the line being built in the line buffer no matter what it is. After this next character has been inserted, the input stream will again be tested for the special characters listed above.

54 The data separator character serves to indicate an end of file condition. Wherever it is encountered, the message "END OF FILE" is echoed to the teleprinter, and a return is made to where GETLINE was called plus two locations, to indicate the end- of-file condition. If the carriage return character is encountered, a check is made to see if the preceding character was a minus sign. If it was, the line pointer is decremented by one so that the next input character will overwrite the minus sign in the buffer. The teleprinter is then issued a carriage return, a line feed, and a prefix character, and the main loop is re-entered. Thus a minus sign-carriage return combination continues the current line being built in the line buffer, yet allows the user the convenience of typing on a new line on the teleprinter thus avoiding pile up of characters at the physical end of the printer line. If a minus sign did not precede the carriage return, then a 2008 character is echoed to the teletype, the number of characters in the line buffer is loaded into the AC, and a return is made to where GETLINE was called plus one location. If the input character does not fall into the class of special characters, it is simply inserted into the next available position in the line buffer after being echoed to the teleprinter. 5.3.6 QUIZUSER - A Routine to Ask the User a Question. QUIZUSER is called with a system message number in the accumulator.

55 QUIZUSER uses EOL and SYSMSG to output this message on a new teleprinter line and then prompts the user with a question mark at the beginning of another teleprinter line. GETLINE is then called to get an input reply line from the user into the reply buffer of 128 characters located at 17400. If GETLINE returns an end-of-file or zero characters input, control is returned to the command language interpreter. Otherwise control is returned to the caller. In either case, the input line buffer is restored to location 11400 before exiting. 5.3.7 PRTNAM - Print a File Name. PRTNAM is used to print a file name which is stored in stripped ASCII form in locations 10020 - 10023. It uses MESAGI, the message printing routine of Section 5.3.3, to print the file name after first transferring it down to within PRTNAM in field zero. (MESAGI will only print messages contained in field zero.) There is a mistake in this routine, in that if a user inserts the illegal character "@" into a file name, the command support routines will try to print the offending file name using PRTNAM. However, "?" encodes to zeros in stripped ASCII so that MESAGI terminates printing of the name prematurely, and returns to execute portions of the name as instructions. The usual result is that the CPU grinds to a halt on page zero. Of course the system may be reloaded, but such is hardly the proper fix. Again this is one of those small errors which has not yet been fixed.

56 5.3.8 NDXPRT - File Index Printing Routine. NDXPRT is used to print the names of files which are catalogued in each VTOC. Before doing a JMS to NDXPRT, the user must set up a number of switches on page zero. SWO and SWI must be set to minus one or zero according to whether the indexes for tape units zero and one are, or are not, to be printed. If ALLFLG is set to -1, then all file names, including system files and working areas, will be printed. If it is zero, then only user file names will be printed. If DETAIL is zero, then only file names will be printed, and if it is minus one, then file names and words 5, 6, and 7 of the FCB will be printed in octal. 5.3.9 GETFD - Find a Control Block for a File/Device. GETFD is located at 102008 and may be called from either memory field. When invoked it searches the unit zero and unit one VTOCs as well as an internal device table for a match to the stripped ASCII file or device (FD) name stored in locations 10020 - 10023. If a match is found (that is, the FD name is "known" to the system), then a return is made to the GETFD call plus one with the address of the FD control block (stored in the VTOC or device table) in the accumulator. If no match is found, the FD does not exist, and a return is made to the GETFD call plus two. GETFD uses the routine SRCHVTOC to search the unit zero and unit one VTOCS. If no match is found in the VTOC search, a

57 search of the device table within GETFD is done. Note that the device table is structured as a set of device control block entries and hence may be supplemented at any time by inserting additional device control blocks and increasing the number of devices, NDEVS. 5.3.10 MAKFIL - Create a File Entry in a VTOC. MAKFIL is located at 102758 and is used to insert an entry for a file into a VTOC. Before calling MAKFIL, the caller must construct a virtually complete file control block in 10020 - 10027 for the file to be created: Locn Contents 10020 - 10023 Eight character file name in stripped ASCII 10024 Unused when MAKFIL is called. Upon return from MAKFIL, this location contains the unit and tape block number where the file will be situated on tape. 10025 File length and switches word for the file to be created (See vol. 1, Section 7.2, for the structure of this word. ) 10026 File contents attribute word for the file to be created. (See vol. 1, Section 7.2 for the structure of this word. ) 10027 Unused at present; however, this word does get copied into the FCB entry which is created in the VTOC.

58 In addition, the user must specify in location 10000 upon which tape drive the file is to be created (unit 0 or 1). Note: MAKFIL simply creates a file control block entry in the VTOC for the specified tape unit; it does not copy any information into the file on tape. If MAKFIL is able to create the file as specified in the partial FCB in 10020 - 27, it returns to where it was called plus one location. If something has gone wrong (no space left on the tape or in the VTOC), it error returns to where it was called plus two. MAKFIL first sets up pointers to the desired VTOC by calling GABUV. It then checks to see if space is available in the VTOC for at least one more file control block. If no space is available, an error return is made. If space is available in the VTOC, then MAKFIL calls GETTAP to get tape space for the file. If no space is available, an error return is made. Otherwise GETTAP returns the beginning block number of the tape space which was allocated. This block number is used to form the fifth word (unit and block number) of the file control block at 10020 in order to complete it. The completed file control block for the file is then copied into the VTOC, the VTOC is written onto tape to reflect the addition of a file, and control is returned to the caller.

59 5.3.11 COMPRESS - Squeeze Characters from One to Two per Word. COMPRESS is located at 10400 and is used to encode string of 8-bit ASCII characters into N words of stripped, 6-bit ASCII characters with trailing blanks if necessary. N is a calling parameter. COMPRESS works from an array of 8-bit ASCII characters and outputs encoded characters to another array; both arrays must be in the same memory bank. COMPRESS is used to convert file names supplied by the user on an input line into internal form, suitable for use as a comparand, for example, when searching a VTOC. Because the routine is used for this purpose, it stops taking characters from the input string when it encounters a blank. If less than 2N characters have been taken from the input string at this time, then the output string is padded to the right with stripped blanks (408). 5.3.12 DESTRY - Destroy a File. DESTRY is located at 104628 and is used to destroy a file. It must be called with a pointer to the FCB of the file to be destroyed in the AC. The algorithm used is straightforward. First the count of the number of entries in the VTOC is decreased by one. (The stored word is incremented by one since the count is kept as a negative number.) Subroutine RELTAP is then called to release the tape space occupied by the file; the tape unit, beginning file block number, and the length of the file in blocks are supplied as parameters to RELTAP. The VTOC is then packed up by moving all FCB's which

60 had higher core addresses than the FCB for the destroyed file down in core by 8 locations (i. e., the length of the deleted FCB). Note that during this moving process, the "first block" word in every FCB which is moved is decreased by the length of the destroyed file, in order to reflect the fact that RELTAP packed the file tape. After the VTOC is packed, it is written out via the routine WVTOC, and control is then returned to the caller. 5.3.13 SRCHVTOC - Search a VTOC. SRCHVTOC is located at 110008, and is used to search a VTOC for a file control block, given the file name in stripped ASCII in locations 100208 - 100238. The tape unit number whose VTOC is to be searched is deposited in location 10000 before SRCHVTOC is called. The logic of the routine is straightforward. GABUV is called to set up address pointers for the search, and a counter is initialized to the negative of the number of valid file control blocks in the VTOC. The first four words of each FCB are then compared against the usersupplied file name using the routine CLW. If a match is found, control is returned to the caller at the SRCHVTOC call plus one, with a pointer to the found FCB in the AC. If no match is found, a return is made to the SRCHVTOC call plus two. 5.3.14 OPSCAN - Find Next Operand. OPSCAN, located at 110678, is used to advance a line pointer at 1058 to point to the next operand in an input line. In a line, an operand string is a group of

61 non-blank characters with at least one blank at its left and right ends to delimit it from other operand strings. When OPSCAN is invoked, it presumes that location 105 is pointing to some character within an operand string. It advances the line pointer until it encounters a blank; the pointer is then. further advanced until it points to a non-blank character, which is presumed to start an operand string. If, during the line scanning process, an all-zero character (line terminator) is encountered, a return is made to the OPSCAN call plus two. Otherwise the return is made to the call plus one. 5.3.15 GETTAP - Allocate Tape Space. GETTAP is located at 112008, and is used to allocate tape storage for a file. It is the only routine used for this purpose. Since tape storage is organized in a sequential manner (see Chapter 7) allocation of space for a file consists of the following three steps: 1) Save the tape address of the "first free block" on the tape in order to pass it back to the user when finished. 2) Update the "first free block" address by adding to it the number of blocks allocated. 3) Decrease the "number of blocks left" word by the number of blocks allocated. 5.3.16 RELTAP - Deallocate Tape Space. RELTAP, located at 112308, is used to deallocate tape storage space which was previously allocated by GETTAP (see preceding section). As is

62 common in storage allocation systems, one pays the piper here for an easy allocation procedure by being forced to live with a more complex deallocation procedure. RELTAP is responsible for packing the filing tape so that deallocating space in the middle of the filing area does not leave a "hole" in the filing area at that point. It does this by computing information for the PACK subroutine (see Section 5.3. 2) and then calling PACK if in fact the deallocated space was not at the end of the filing area. In the process, it updates the "first free block" address word and the "number of free blocks" word in the VTOC for the tape. 5.4 Detailed Memory Allocation A listing of the significant entry points in the system nucleus (which is comprised solely of utility routines) according to the page upon which they are located is as follows. Page Entry Point Names 2000 SYSTART, PACK 2200 MESAGI, CELMSG, TPCOPY 2400 GETLINE 2600 QUIZUSER, SYSMSG 3000 CLI, OCTOUT, PUSHPFX, EOL, POPPFX, PRTNAM 3200 NDXPRT 3400 TPERR

63 Page Entry Point Names 10200 GETFD, MAKFIL 10400 COMPRESS, DESTRY 11000 SRCHVTOC, GABUV, OPSCAN, CLW 11200 GETTAP, RELTAP, WVTOC An alphabetical listing of these subroutines along with their calling sequences is given in Section 5.5. A listing of the various command modules and the pages they occupy is given below: Command Module Name Location COMMENT COMMENT 3342- 3343 INDEX INDEX 3400- 3457 DESTROY DESTROY 3600- 3777 SAVE SAVE 4000- 4577 RUN RUN 5000- 5377 RUN CONSCAN 5400- 5777 SIGNOFF SIG 6000- 6177 LOAD LOAD 6400- 6577

64 5.5 Calling Sequences for Utility Routines CELMSG Purpose: to print a string of characters on the teleprinter. Note that the message string format is exactly the same as that of the DEC message routine Digital 8-18U, but that the message string is not in line with the subroutine call'. Calling Sequence: JMS CELMSG /with address of message in AC return call + I CLI Purpose: to get and interpret an input command. See Section 5.3.2. Calling Sequence: none to speak of - just jump to CLI. CLW Purpose: to perform the analogous function on the PDP-8 as the Compare Logical Characters command on the IBM /360. CLW will compare two lists of words in the same memory bank for equality. Calling Sequence: JMS CLW /with length of list in AC

65 Address of the first list here /lists are assumed in the Address of the second list here / memfld given by: CDF instruction for list memfld return call + 4 if unequal return call + 5 if equal COMPRESS Purpose: to compress a string of up to N non-blank 8-bit ASCII characters into their 6-bit form, formed by removing the two high order bits of each character and packing the resultant 6 bit characters two per PDP-8 word: If fewer than N non-blank characters can be found in the ASCII string, the remainder of the output string is padded with blanks. Calling Sequence: JMS COMPRESS /with N in AC; N must be even! Address of source list Address of packed sink list CDF instruction for BOTH lists (Both lists in same bank) return call + 4 CONSCAN Purpose: to build a "file or device linkage chain", given the address of a string of filenames. The caller also supplies

66 the address of the destination area in field one where the chain is to be put, as well as a direction of transfer mask. The direction of transfer mask is used to enforce a restriction that all files whose names are in the name string are either information sources or information sinks. See Section 7.4 for the structure of the linkage chain. This subroutine is used to build the linkage chain in the I/O communication area in field one when the user issues a RUN command. Calling Sequence: JMS CONSCAN Address of linkage chain in field one Address of file name string in field one Direction of transfer mask - 2000 for output 4000 for input return call + 4 Note: CONSCAN prompts the user for replacement of bad file names. DESTRY Purpose: to destroy a file and release the tape space occupied by the file back to the system tape space allocator.

67 Calling Sequence: JMS DESTRY /with pointer to FCB of file to be destroyed / in the AC. The pointer should have been /gotten via a call to SRCHVTOC or GETFD. return call + 1 EOL Purpose: to output the CR-LF combination and the current prefix character for the next line. The current prefix character is found in memory location 100. Calling Sequence: JMS EOL return call + 1 with clear AC GABUV Purpose: to Get Address, Buffer and Unit words for a VTOC. The tape unit number must be stored in location 10000 before calling the routine. Calling Sequence: JMS GABUV return call + 1 with clear AC, Address etc. words set on page 10000

68 GETFD Purpose: to get a FCB pointer to the file or DCB pointer to the device whose name is stored in packed form in locations 10020 - 10023. All control blocks are stored in the upper memory bank. Calling Sequence: JMS GETFD /with file/device name in 10020-23 returns call + 1 if FD exists, with FCB ptr in AC returns call + 2 if FD does not exist. GETLINE Purpose: to get an input line from the user via the keyboard and edit it into compact form for the command language interpreter. The input characters are stored at the buffer address specified on page zero - see Section 5.3.5. Calling Sequence: JMS GETLINE returns call + 1 with number of chars in line in AC returns call + 2 with clear AC upon end of file (ctl Y struck on 33ASR). Note: GETLINE allows the user to edit his input lines using much the same conventions as FOCAL. The editing characters and their functions are:

69 (back arrow) - delete the current line and start a new one. RUBOUT - delete the last character in the current line. LINE FEED - echo the contents of the current input line, and then append more text to it. CARRIAGE RETURN - the user is finished with the current line and wishes to have it returned to the caller. GETLINE uses IOCS3 and hence can take paper tape input. It also converts all input characters to have value > 2008 thus allowing paper tapes to be prepared offline on a parity-producing teleprinter. rETTAP Purpose: to get tape space for a file from the system allocator. Note that the number of blocks needed must be in location 10001 and the tape unit upon which they are needed must be in location 10000 before the subroutine is called. Calling Sequence: JMS GETTAP

70 returns call + 1 with tape blk no in AC if space was allocated returns call + 2 if not enough room remains on the tape. MAKFIL Purpose: to get tape space from the system space allocator and make an appropriate entry into the tape unit VTOC for a new file. The caller must have set up a partial VTOC entry in locns 10020-10027, consisting of the name of the file and the file length and file descriptor words (see Chapter 7). Upon exit from the routine, the VTOC entry at 10020 will be complete, and may be used as a FCB for the newly-created file. The unit upon which the file is to be created should be stored in locn 10000. Calling Sequence: JMS MAKFIL returns call + 1 if all OK returns call + 2 if no room for the file MESAGI Purpose: print a message on the teleprinter in the same manner as the DEC routine Digital 8-18U. Note that the routine uses IOCS3. Calling Sequence: same as Digital 8-18U.

71 NDXPRT Purpose: to print information from the file index of a CPS tape. The caller must set several switches on page zero before calling this routine (see Section 5.3.8). Calling Sequence: JMS NDXPRT return call + 1 OCTOUT Purpose: to print a number in octal on the teleprinter. Calling Sequence: JMS OCTOUT /with AC containing the number to be / printed return call + 1 OPSCAN Purpose: to advance a pointer to the next operand in the input line buffer. The operand pointer is by convention stored at location 1058 (see Section 5. 3.14). Calling Sequence: JMS OPSCAN return call + 1 with updated operand pointer in 00105 and clear AC return call + 2 if end of line mark encountered.

72 PACK Purpose: to pack-up a tape used for filing purposes, so that there is no wastage of tape space and so that spooling the tape to the starting block of a file is done as fast as possible. Note that in CPS, all file allocation on a tape is done sequentially and thus the pack routine must be called each time a file is destroyed, but after the file entry has been deleted from the VTOC of the tape unit by the routine DESTRY. Upon calling pack, the unit number of the tape unit to be packed must be in loc 10000. Other parameters must also be set in the upper memory field; see the listing in Section 5. 6. Calling Sequence: JMS PACK return call + 1 POPPFX Purpose: to undo the work of PUSHPFX; i.e., to restore the current prefix character from the stack. Calling Sequence: JMS POPPFX return call + 1 with clear AC

73 PRTNAM Purpose: to print a compressed file name, which is assumed to be in locations 10020 - 10023. Trailing blanks are printed. Calling Sequence: JMS PRTNAM return call + 1 with clear AC PUSHPFX Purpose: to save the current prefix character and substitute the caller-provided character for it. One level of pushdown is provided, and if PUSHPFX is called twice in a row, the first prefix character is lost. Calling Sequence: JMS PUSHPFX /with new 8 bit pfx char in AC return call + 1 with clear AC QUIZUSER Purpose: to ask the user a question, and allow him to answer. Upon return from this routine, the user's answer will be found in memory locations 17600 - 17777. Calling Sequence: JMS QUIZUSER /with SYSMSG number of question / message in AC

74 return call + 1 with number of chars in answer in AC if line not empty return to CLI if line is empty RELTAP Purpose: to release file space previously acquired back to the system allocator. Upon entering this routine, loc 10000 must contain the tape unit upon which the storage to be freed was allocated, loc 10001 must contain the number of blocks to be given back, and location 10002 must contain the starting block number of the area to be returned. Calling Sequence: JMS RELTAP return call + I SRCHVTOC Purpose: to search a VTOC for the occurrence of a file name and to return a FCB (file control block) pointer for the file if it is found. The name to be searched for must be stored in compressed form in locns 10020 - 10023 upon entering the routine. The tape unit number whose VTOC is to be searched must be in loc 10000.

75 Calling Sequence: JMS SRCHVTOC returns call + I with FCB location in AC if found returns call + 2 if entry not found for this file in this VTOC. SYSMSG Purpose: to print a standard system message on the teleprinter. No carriage return or line feed is put out (unless part of the desired message). Calling Sequence: JMS SYSMSG /with number of the message in AC returns call + I with clear AC SYSTART Purpose: initial system entry and startup point (see Section 5.2). Calling Sequence: None - just jump to SYSTART. TPCOPY Purpose: general tape copying utility subroutine (see Section 5.3.4). Calling Sequence: TPCOPY uses various page zero locns for parameters:

76 113 - source tape unit 114 - source blk # 115 - source length in blks 116 - sink tape unit 117 - sink beginning blk # Note that these locns are not preserved across the call. JMS TPCOPY /with above locations set return call + 1 TPERR Purpose: to process permanent checksum errors on magnetic tape. Called by IOCS3 only. WVTOC Purpose: to write out onto the appropriate tape unit an updated VTOC for that tape unit. Upon calling the routine, the tape unit number should be in location 10000. Calling Sequence: JMS WVTOC return call + 1

77 5.6 Program Listing A listing of the May 21, 1969 version of the control program follows this page. The listing for field zero precedes the listing for field one.

MAC O 8S ASSEMBLER (AN229) 78 5. 6 PAGE 01 /PAGE ZERO DEFNS FOR CPS / * 41 0041 3461 TPEk r / TAPE ERi~OR HiANDLER AD)R FOR 10CS3 / *100 0100 0000 PFX, 0 /PREF I X CHAR 0101 1377 ALdUFF, 1377 /ADi OF LINEBUFFER -1 —. —;.A~Z / 0102 6211 tDF, CL)F 10 /LINNE BUFFE.R CL)F 0103 7000 NOP /T.AKES. JP pROOM BE_'USE OF SYSTEM CHANSES 5/20/69 0104 0000 CHAiR, /0.:, " 0105 0000 OP?PTI, 0 /0i.'EtP'ZND PTARh 0106 0000 LASTCHAR, O /?Rp.,'A \~ 0107 0000 ADOR, 0 /0w7c fv _______-__ 0110 7401 LINLENt -377 iAST 5 LOGCS USED BY GETLI.E) 0 11 0000 LNSWi, 0 /USED BY GETLINE 0112 0000 LP'T, 0 /'f 0113 0000 EEUNIJI, 0 0114 0000 EE3LKNO0 0().>. /./.-4~ 0115 0000 ELENi 0 #t.,,.-... Pcop),7 ~' 0116 0000,KUNIT. 0 t 01 7 0000 i< <' 3 LK0 IOv 0 _ Z~t-. 0120 0000 NBLKxSo 0'.'.5 0121 0000 EFCB, 0 /tSED BY SAVE & tELEASE 0122 0000 SAVSI1 0 /" " " " 0123 0000 SAVT EMiP, 0) 0124 0000 S`0. 0 0125 0000 SW 1 I 0-.~,,'', D: - ". —., 0126 0000 PASCNT, 0 0127 0000 OPELAG i ( 01r 0130 000013 ALLFLGo 0 C -' 0131 0000 VTOCAD, 0 0132 0000 V TOCNT, 0J 0133 0000 PFXSTACK., O,/Fei,.',ff rF'S P',P -g",,#:.. 0134 0000 ioK O /,s4,:,<t o 0 1 35 0000 RL2N.S 0 / 0136 0000 OUNI; 0 / 0 0137 000t0'3 L'JT'4 0 w.Y., 0 1 4A 0000 LiAREA (0 01 41 0000 FNAiPTR, 0 0142 0000 P F X TE, 0,AtAp /,,,.., P.tzN 1'.p 0143 0000 ~TE>iP 3 0144 0000 MSG 3ASJ J /JUS'ED i3Y SYSMI5iG. ir S —. G.-.7. 0145 0000 DETAIL, O,0 0146 )0000 SAO)Ri 0 7 elf.- g M -! 0147 0000 KAOI, 0 _ /

79 5.6 PAGE 02 *2000 /SYSTEM S TA TUP O-,tZ Ae..t. A1d/c) T 2000 4442 SYSTART, CALL RESET 2001 1377 TAD O"H 2002 3100 OCA 100 / 7"f t 2003 1 376 TAD (tMSG- 1 2004 3144 0CA MSG ASE / k,''-~..4" — 2005 4447 RDROPN /OPEN READE!-~/K~D 2006 1375 TAD (7773 /CHEC~(K KEY TO SEE 2007 3010 )CA 10 /IF WE CAME IN FROM 2010 6211 COF 10 /A COLD START 2011 1410 TAD I 10 2012 7001 IAC 2013 7450 SNA /SKP IF NOT CLDSTART 2014 5310 JMP IDY /IDENTIFY -f. -P(M1) 2015 1374 TAD ( 7 40 1,-'.c~%...~...~i /'E6 T. Y r/ 2016 7640 SZA CLA 2017 5306 JMP PFXOUT /KEY NOT FOUND 2020 7001 IAC 2021 1410 TAD I 10 2022 7640 SZA CLA 2023 5306 JMP PFXOUT /IKEY NOT FOUdN ) 202.4 7240 STA 2025 1410 TAD I 10'2026 7640 SZA CLA 2027 5306 JiMP PFXOUT /KEY NOT FOUND 2030 1373 TA D (-HLLT 2031 1410 TAD i 10 2032 7640 SZA CLA 2033 5306 JiIP PFXOU'r /KEY NOT FOUND 2034 1372 TAD (7764 /KEY FOUND - UPDATE WORKING 2035 3010 I)CA I'0 /AREA ENTRIES IN VTOCS'i:X).. —'" 776it. )' 2036 1371 TAD (201 3/,./c, -_ 5A 2037 3011 DCA 11 2040 1 41 0 TAD I 10 /.-.X2041 7450 SNA / A IO. 2042 5260 JMP 3PA.R/.;4'AC, -S;<,,t.-.,z z~.:>/ 2043 7104 CLL RAL / (,.,r.,?_, 2044 7110 CLL RAiR /SET TOP BI1T TO 0.-..Fr- f-.,~,fF' 2045 3411 UCA I 11,.-. f l / 2 0 46 1 410 TAD' I o1 2047 0370 AND (377/, 2050 1367 TAD (7000 / N CASE JWE GET GRUNGE F Oi UPDATI NG 20i51 341 1 DC A I 11 /./<-f.-,'/ 2052 1410 TAD I 10 / g: c,2rl7A~-4:41 I; Ot 2053 3411 OLCA I 1II / 20 54 3766 DCA I (O / WRITE VTOC 0 2055 6201 COF 2056 6212 CIF 10 2057 4765 JMS VTOC 2060 1364 i3PAR, TAD (401 3,- -5git' <7~c ti 2061 3011 DCA 11 / 2062 1363 TAD (776, 7, f B 2063 3010 004 6

80 5.6 PAGE 03 2064 6211 CDF 10 2065 1 4103 TAD I 10 2066 74:50 SNA /A6,'. 42067 5306 JMP PiF AOli 20 70 710 4 CLL RA L /r,, p; Z-' 2071 7130 STL RAR /TOP 3IT'r OF AC SET 2072 3411 1 OCA I 1 1,/.'r* Ao:ThQC 2073 1 410 TAD I 10 2074 0370.A4ti (377 /6LE-A"N UP UPDATING PARS 2075 1367 TAD (7000/t:~,~-"f.,. 2076 3411 OCA I 11 /Ion.j=c~. LF/ cC 2077 1410 TAD I 10 2100 341 1 DCA I 11 /,. -T-)X 2101 7001 IAC 2102 3766,CA I (0 /ot 2103 6201 CDF 2 104 6212 F 10 2105 4765 JMS'SVTOC'_ 2106 6201 PFXOiUT, COF - 2107 5762 JUP CL -L-' - 2110 6201 IDY, CDF''. 2111 4761 JMS EOl_,L//,. / -' 2112 1 360 TAD (2 p,.t.;/1 A 2113 4757 JMSl SYSMSG 2, / 211 4 5306 J;JP PFPOUT /. "-'t2P 2 T_ h.'.,. -. /PACK - CALLED BY RELTAP TO PACK UP A /FILE TAPE WITH THE FOLLOWING PARAMETER LOCNS: /10115 - SINK BLK # /10116 - SOURCE LENGTH /10117 - SOURCE 3LK /10000 - TAPE UNIT / 2115 0000 PACK, 0 2116 1756 TAD I (11 -/ 2117 3117 OC. 117 -4 2120 1755 TAD I (I16/ ca. 2121 3115 CA 115/ 2122 1754 TA D I, (1 17:. t._ ~ 2123 3114 OCA 11 / 2154 0117 TAD I (O / 2155 0116 / 2156 0115 2157 2713 2160 0002 2161 3112 2 1 62 3000 2163 7767 2164 4013 2165 1270 2 1 66 0000 21 6 7 7000 2170 0377 2171 2013 2172 7764

81 5.6 PAGE 04 2173 0376 2174 7401 2175 7773 2176 6577 2177. 0243 2124 1 753 2125 3113 DCA 113/ 2126 6201 CDF 0 / 2127 1113 TAD 1 13 /p — Y-j1</~2(' -PJ 2130 3116 DCA 116 /CALLim'NG PARS FOR TPCOPY SET UP 21 31 4752 JMS TPCOPY /,4 god,la /.z _ 2132 4444 TPWAIT 2133 6213 CDF CIF 10 / 2134 5715 EXIT PACK /c- HAZ< TA f; ~ 2152 2262 PAGE 2153 0000

82 5.6 PAGE 0 5 /PAGE 2200 CPS / /MESS(AGE PRINTING ROUTINE. /THIS ROUTINE HAS 2 ENTRY PTS, /MESAGI WHICH SIMULATES DEC'S IESAUGE ()j.-,)A t-iU) /ROUTINE, ANDI CELMSG WHICH ASSUMl>ES THE MESSAGE ADDiRESS /IS IN THE AC UPON ENTRY./ /THIS ROUTINE MUST BE IN THE LOWER MEMFLD.r 2200 ()000 MESAGI, O /4znr-ztL t,; o, to J "i 2201 7240 CLA CMA 2202 1200 TAD MESAGI/ d,-. t/t 2203 3010 DCA 10 2204 3011 O DCA RETSW / /(-e - o h 7TESA6 — 2~.^. 2205 5215 JMP -MSGGET 2206 0000 CELMSG, 0 /,z-,' AC..t2207 3200 DCA MESAGI 2210 7040 CMA 2211 1200 TAD MES A GI/ p;iD;< ffi;, 2212 3010 DCA 10 2213 7240 CLA CMA /.E':t - 1 5.Z; ~E ~ 7w2J 2214 3011 DCA RE'T S W 2215 1410 MSGGETS, TAD I 10 A lYA2 i 2216 3200 OCA G'SGTE? v'1 2217 1200 TAD MSGTEMP 2220 7012 RTR 2221 7012 RTR 2222 7012 RTR 2223 4227 jMS TYPECH 2224 1200 TAD MSGTEMP 2225 4227 JMS TYPECH 2226 5215 JMI MSGGET MSGTEMiP=MESAGI 2227 0000 TYPECH, 0 2230 0377 AND (77 2231 7440 SZ A / — st 2232 5237 JMP GO 2233 101l TAD R ETS 4/;/, _;, 2...-z;. 2234 7640 SZA CLA / 2235 5606 EXIT CELMSG 2236 5410 EXIT 10 2237 1376 GO, TAD (-40 2 240 7 500 SMA 2241 5244 JMP -+3 2242 1375 TAO (340 2243 5257 JMP iNI4T? 2244 1374 TAD (-3 2245 7440 SZA 2246 5251 JMP.+3 2247 1373 TAD (212 /2.' 2 2 50 5257 JMP HTP 1 c 2251 1372 TAD (-2 - J 2252 7440 SZA 2253 5256 JMP.+3 2254 1371 TAD (215/ -/

83 5.6 PAGE 06 2255 52 57.JMP i4 TP 2256 1370 TAD (245 2257 4453 MTP, PTRPUT 2260 7200 CLA 2261' 5627 EXIT TYPECIH RETSW=1 1 /TAPE COPIER - USES VARIOUS PAGE ZERO LOCNS /FOR PARAMETERS: /113 - SOUKCE TAPE UNIT /114 - SOURCE BLK # /115 SOURCE LENGTHi IN aBLKS /116 - SINIK TAPE UNIT /117 - SINKi BEGINNING BLK< # /NOTE THAT THESE LO)CS ARE NOT PRESERVED /ACROSS THE CALL. ROUTINE USES HIGH /MEMFLD FOR A BUFFER, AND MtJST BE CALLED /FROM FIELD ZERO. 2262 0000 TPCOPY, 0 2263 4446 WRSTAP /SAVE HICORE IN STACK 2264 4200 UNl\IT1+2 l00/,O,- 1t:-; / 2265 4040 FLD1+40 / a. *7 Jc I 2266 0000 000 o 2267 1115 TAD. 115 /GET LENGTH 2270 1376 COPY, TAD (-40 /IS IT > 40? 2271 7700 SMA CLA /SKIP IF NO 2272 5275 JMP.+3 2273 1115 TAD 1 1 5 /DO PARTIAL CORE LOAD 2274 7410 SKP 2275 1367 TAD (40 /DO FULL CORtE LOAD 2276 3120 DCA NKS / TO COPY.. -- 2277 1120 TAD LK / NBL<C St3J a> L K 2300 1366 TAD) (FLDI /SET FIELD t3I' FOR READ 2 301 331 7 DCA EBLKS 2302 1317 TAD) EPBLKS 2303 1365 1a tA ( CHECK /S ET CHECK 3 IT F' O'RITE 230 4 3323 DCA K3BLKS 2305 1113 TAD 1 13 /SOURiJl;C JN IT 230 6 7112 CLL aT R /T,.-; P 2307 1114 TAD 114 /SOURCE 3LK# 2310 3316 OCA EUi3LK 2311 1116 TAD 116 /SINIK UNIT 2312 71 1 2 C LL''r R /RTR...t 2313 1117 TA) 117 /SINK' 3LK' # 2314 3322 OCA KUBLK 2315 4445 RiST'AP /INITIATE COPY OF Ni xLKt<S-'-, b'J"/->/ 231 6 00003 EUJ3LK, 0 /SOURCE UNIT & BLK# 2317 0000 Et3LKv, 0 /1F OF tLXS+F-LO1+CHtCK 2320 0000 0000 /LOCOtfi'iN 0N 2321 4446 WJriSf.AP /42-i —/ 1~i, — my2 2322 0000 KUILK, 0 /SINiK UNIT & BLK# 2323 0000 K<LKS, 0 /# OOF BLKS+FLD)1 +C;HEC( 2324 0000 0000) 2325 1 11 4 TAD) 11 4 /PDALTE t3LI #'S

84 5.6 PAGE 07 2326 1120 TAD NBLKS / 2327 3114 DCA 114 2330 1117 TAD 117 2331 1120 TAD N3LKS A~...it,.'S.,' 2332 3117 DCA 117 2333 1120 TAD N3LKS 233/4 7041 CIA /-# OF 3LKS COPIED 2335 1115 TAD 115 /+ # LEFT 2336 3115 DCA 115 /= NJE # LEFST 2337 1115 TAD I 1 5 /1DONE? 2340 7440 SZA / SKP IF YES-.'y../ --- t2341 5270 JMP COPY 2342 4445 ROS TAP /RESTORE HICORE 2343 4200 UNIT1 +200 2344 4040 FLDI +40 2345 0000 0000 2346 5662 EXIT TPCOPY 2365 2000 PAGE 2366 4000 2367 0040 2370 0245 2371 0215 2372 7776 2373 0212 2374 7775 2375 0340 2376 7740 2377 0077

85 5.6 PAGE OS /LINE INPlUT;OUJTINE FOR CPS - SEE /ROUTINE WRITEUP FOR; CALLING S'EUENiCE /AND EX TERNAL OJiRLD PRO T-OCOL / 2400 0000 GETLIN~, 0 2401 7200 CLA 2402 1102 TAD BDF /SErT 3UFFER DATA FLD 2403 3777 DCA GETCDF 2404 1102 T'AD SDUFP Mz- vr'su 2405 3215 OCA SETC)F 2406 1102 TAD i3DF /bP: ok-.. f.. 2407 3327 DCA ECHOCDF/; C.t b.t; /c't'' 2410 7200 START, CLA /At,". -/.e'/- /p.t,. t /.:,_e.-;. 2411 1110 TAD I 10 /GET MAX.dUFF LENGTH->A9fi-a 2412 3011 CA 11 / r;. -sro' 4; 2413 1101 TAD ALBUFF /GET ADR bF BUFF-1 2414 3010 DCA 10 /FOR AUTO INDEX 241 S 7402 SETCDF, HLT /Ri.EP BY CDF 2416 1376 TAD (240 2417 3410 DCA I 10 2420 2011 IS'Z 11 /SET BUFFE, TO tLANKS 2421 5216 JIMP.-3 2422 3410 DCA I 10 /END OF BUFFER IS ZERO; A). r,,O f.~_/.d.., 2423 6201 CDF /RESET P 2424 3104 UOA CHAII /y.,-., —;-',.- A,-...k t4 (4ef, %2425 3112 DCA LP TiR:/-,.e.- / c, 9o ~ =3,"l-t,,.e-.G ~/ 2 426 5230 JMP * +2 2427 5600 GLEXIT, EXIT GETLINE /COMMON EXIT 2430 4450 G E TCH RGET C R G E T /,-S 2431 0375 AND (177 2432 1374 TAD (200/'.L d..,i c., e.n i,-.-,. 2433 3010 OCA 10 /.., 0.,,.2434 lil TAD L;NSW/Z4 -;~./ -..-",:' 2435 7700 StIMA CLA /;J / 2436 5243 JIMlP NORJ1MAL /..- X -.,~..- Ac-., L.?",,-*a2'/ 2437 3111 DCA L N S, //,. w. q..., 2440 1010 TAD I0 2 441 3104 DCA CHAR, 2442 5773 jIP UF Tti.BUI1iT 2443 1010 NORMAL, TAD 1 0 2444 1372 TAD (-200 /.... 2445 7640 SZA CLA 2446 5252 IJMP.+4 //,' 2447 1010 TAD 10 / 2 450 4453 P l;t P UT 2451 5230 JMP GE TCH/.k,.:., ~:H-,,I..~.2 452 1104 TAl) CHAR j re X IC -sZe 2453 3106 DCA LASTCn-AY ~,_/.,.,C i-A r/ 2, 2454 1010 TAD 1 2455 3104 UCA CHAR.. ~. 2456 1371 3 TAD (-337 /3ACK~ARRiW TEST - AI.~/~,.-,. ~..~y " 2457 1104 TAD CHAR 2460 7640 SZA CLA / #< cA A(,rrS 4-' 2461 52 6 S5 JAMP ROTES fI y'tr- t T 2462 47-70 JS ECHO /;d. ", -"

86 5. 6 PAGE 09 - 2463 4767 JtNlS E0L/A- t', f-i7 2 464 51 0 JMP START /T /A Thv$- 2tt r j 2465 1366 ROTEST, TAD (-377 /t<UBOUT TEST- r.Ab A2 k 4#rt 2466 1104 TAD CHAR 2467 7640 SZA CLA /' /tj i'HA -(t4t 2470 5307 JMP LFTEST/._ -:., t'i t.,2471 7240 STA /I3 LI.NEPf'f ~. 0? 2472 1112 TAD LPTN 2473 7710 SPA CLA /SKIP IF NOT 2474 5230 JMP GETCH1 /190, DO NOTHING 2475 1376 TAD (240 /INSERT,3LANK INTO BUFFEK 2476 3104 DCA CHAR 2477 4765 JMS PUTBUF 2500 1364 T AD (334 /ECHO \.,D,'t,,,,4,~ ~,; 2501 3104 DCA CHAR 2 50 2 4770 IJMS ECHO 2 503 7240 STA /NOW'., DECREASE LPTR FOR REAL 2504 1 1 12 TAD LPTR 2505 31 1 2 OCA LPTR TR cts a2506 5230 JMP GETCH 2 507 1363 LFTEST, TAD (-21 2 /LINE FEED TEST- c.A. /4,, cE'-,..,/,,.-., 2510 1104 TAD CiH-AR 2511 7640 SZA CLA /z..-:p _,k-i t.ed & 2,?W/ 2512 5337 JIP,CRT T..- T,/ c t- t 2513 1362 TAD (275 / tr-/-..., "_ 2514 4761 J,S P USRiiPFX; 2515 4767 JNS EOL /.e. -l tt 2516 4760 JMS POP 0 P a/l?: F X /- y 2517 7200 CLA /PREPARE TO EC1fO LINE 2520 1112 TAD LPTR 2521 7450 SNA 2522 5230 JfiIP GETCH /;/-m4z 2523 7041 CIA /NEG.A TE FOR C, TN,: N,,-_T/,./ 4 2524 3011 IDCA ECHOCNIT/,(. ccxCOr " ECHOCNIT=1 1 2525 1101 TAD AlF'9U 2526 3010 DCA 10) /' 2527 7402 EC:ROCOF,.HLT /R Y CD 2530 1 410 TAD I 10/'Z; >,.-< / 2531 6201 COF 2532 4453 PTRPUT /. 2533 7200 / ff;/ r AC c, CAr (t4iA (j pi 2 534 2011- IS SZ'CHO3CI j /-T7 2 53 5 5.327 JNP. 6 /5...t -. - dt 2536 5230 JMv I' GE TC 2537 1357 CRTEST, TA i)(-21 5 /CAi'iR RE'I' "iST' —k,: rf 2540 i 1104 TAD CHAR // v 2541 7650 SNA CLA /t A&'2542 5756 JIP GLiE'T./ 4,-,. - j2- -I6'" 2543 110)4 LNTES'F, TAD CHAR /I ITEI- AL-NTEXT TEST -- AL',,, —,,,-fb _S, 2 544 1 3 5 AD ( - 22 /:,. P, 7 - Y 2545 7640 SZ/ CLA /,~4'f 1' _ 8 tf4~,,.,~,.<A.. c 2546 5754 JiNMP EOFTSFT/ ~Ir-"/t. Ed. F.sL.EZ;E. 2547 7040 COA /L V 2550 3111 OC A LNS.. ",.: t_;'.Z.,,,'.?,?.).7,

87 5.6 PAGE 10 2551 4770 JM S ECH0/.~r>,X~ t r-;- P 2 552 5230 JMP GETCH/go 1#?/fe-e. 2 554 2600' AGE 2555 7560 2556 2625 2557 7563 2560 3123 2561 3103 2562 0275 2563 7566 2564 0334 2565 2643 2 566 7/401 2567 3112 2570 2706 2571 7441 2572 7600 2573 2610 2574 O200 2575 0177 2576 0240 2577 2650 2600 1104 EOFTST. TAD CHAR /E3F TEST —?5w.-<.. 7te IA 2601 1377 TAD (-231 / -f 7'''' 2602 7640 SZA CLA /.,~+ i c-ti-I f'i 2 603 5210 JMP iUFPUT 40 M ~4(? A6 - )4 ^ /<f 2604 1376 TAD (22 2 60 5 4313 JMIS S Y S S G / T EL L U S E R Loe,-2,.-~' -.~-/~. 260 6 2775 ISZ GETLI E /T~+ Y.St I -/Z 2607 5774,JMP GLEI;T /E' ik XtcT 2610 2112 3UFPUT, iSZ LFT, 2611 1112 TA/D LP T-R Z )FALEA)? 2612 1110 TAD 110/ 2613 7710 SPA CL / A/;p g~ 2614 5222 Jv'4P LO</.z. K P,' 2615 Z4773 JM:S EOL /L I T1 iTOO LONG - TELL USER, 2616 7001 IAC /.A:I4A 47, / 2617 4313 JIS SYS AY 3i, 2 620 4773 Ji S EOL//.,,-., a4-o,,.L % 2 621 5772 JMP S TQ-i T /JYPf-.*/-.-" 2622 4243 LOK, JLYS PJTB3UF /I.NSER.iT CHAR INTO BUFFPER 2623 4306 JMS ECHO /,- /-,., 2 624 5771 JYIP GETC / - - 2625 1106 GLRET, TAD ILAS'TCHAiR/A, o.,,~ -....- —.. 2626 1370 TAD (-255 /CONTI;UATION CHECK -C 2.,-t.,/;4.i, ~ 2627 7640 SZA CLA /LA A;-bt Y t7WZ_ d* 2630 5236 JMIP GLRTN / ev t 2631 7040 CA 2632 1 1 112 TAD LP 11'f 2633 3112 DCA LPTT<. 2.634 4773 JdMS EOL; otoc - tt t 2635 5771 JYP.,,,GETC/~.,,/.-~.-2'-~' 2636 1367 GLRTN, TAD (200)/.2 2637 44153 PTRPT d 72640 7200 CLA/Aw,;, ~ -,,,/.r-..p.rT/z~T-:,.. /,.. r., -

88 5.6 PAGE I 11 2641 1112 TAD LPT'R /,2., /'..t,,~:.:, 2 642 5774 Ji'4P GLEXI T /'., I. 9.- / 2643 0000 PUTBiUFV 0 /ROUTINE TO I ElrNSiT "CHGAir" INTO LINEdUF 2644 111 2 TAL) LPiTP /GET LINJE P0 INFErli 2645 I 1101 TAD ALUIJFF /COMPUJTE AD)N OF GtiHA 2646 3107 DCA ADDR 2647 1104 TAU CHAR /GET CHAR 2650 7402 GETCDF, HLT /CDF TO LINEJUF FLD 2651 3507 DCA I ADDR /INSERT CHAR INTO,3UFiFEl 2652 6201 CDF 2653 5643 EXIT PUTBUF /RETURN TO CALLER / /QUIZUSER - SOLICITS A irEPLY /FROM THE USER TO A JUESTION / 2654 0000 QLI ZUSER, //' 0,'=,;,...A r 2655 3143 DCA OTEE.'P; 2656 4773 JMS EOL / j,-; ~,._.,.. 2657 1143 TAD OTEMP 2660 4313 JA S SY SSiG/ d't6 (" 2661 1 366 TAD C"? J. 2662 4765 JIJMS PUSHPF 2663 4773 JP4S EOL- -. 2664 4764 J;iS POPPFX.-_ T*- * x:./.a 2665 1363 TAD (-1 76 2666 3110 DCA 110 /SET REPLY LEN GTH Pb /to /-r.. 2667 1362 TAD (REPB3IJ/' F, "Ic,I'AW-I7'5-f7"77 2670 3101 DCA 101 / 2671 4775 Ji S GETLINE //y-,, % 2672 7650 SNA CLA /.;/. Zt./ 2673 530 I J.YP CLIHE:T/(,pti,.,,e.*:,,7e e,,lzgyi w ps 2674 1361 TAO (-377/ ~7 2675 3110 DCA 110 /,' 2676 1 360 TAD (1377 f 2677 3101 DCA 101 2700 5654 EX IT ( U I Z US EZ R /,/.*..3.;: /.' - r-.,,-'J 2701 1361 CLIRET. TAD (-377/ 2 702 31 10 DCA 1 10 2703 1360 TAO (1377 2704 3101 DCA 101 0 f. 2705 5757 JsIP CL I,/L t.a /ECHO - PRINT THE IINPUT CHA.- FOR G TLINE / 2 706 0000 E C i, 0 2707 7200 CLA / - / (C 4; 9 A p 2710 1104 LTAD CHAR. 2 71 4453 PT RUT /! UT-z.,.r/, 2712 5706 EXIT ECHO / /STANDAiRD SYSTFM MESSAGE i<)UTiNt'2E /,>tk tzM'~ neBIYI * j< Ze-I? ff,A. ih/ A (2713 0000 SYSMi'SGr 0) 2714 1144 TAD iMS GBA S t/e+'> f v t 2715 3010 DCA 10 //-,,_.,f; fj i,,-/.,v",7,-,-,.2 _ -,~,-,

89 5. 6 PAGE 12 2716 1410 TAD I 1O /07 b e a,-,~~: 2717 4756 JMYS CEL7 1S /' - 2720 7200 CLA 2 7'21 571 3 EX I T SYSMSG f/,, Z 5.-./.,2756 2206 PAGE 2757 3000 2760 1377 2761 7401 2762 7377 2763 7602 2764 3123 2765 3103 2766 02-77 2767 0200 2770 7523 2771 2430 2772 2410 2773 3112 2774 242 7 277 5 2400 2776 0022 2777 7547

90 5.6 PAGE 13 *:3000 /COMMAND LANGUAGE INTE}RPR ETEF 3000 4312 CLIP JMS EOL/A1/4i,1 I, 3001 4777 JMS GETLINIE/ i _,?, *,-, p.w-. 3002 7650 SNA CLA / s - 1"t 6?, 3003 5200 JMP * -3 / Pd 4, v > / 3004 1376 TAD (COMTL'., 3005 3223 D)CA COMADR_ I X 3006 1101 TAD ALBJFF/ \ 3007 7001 IAC /'u-7e. -,",K ) L -. /, 3010 3222 DCA LAD 3011 4444 TPWAIT /,JQAIT UNTIL LAST'TAPE OP DiONE —,.-x -.C.zr,. — 3012 6211 INXTCOM, COF 10 /, 3013 1 623 TAD I COMADR. 0I,.,G, 3014 6201 CDF 0 / i~, 3015 7710 SPA CLA r g~// p k301 6 5250 JMP' O TF"' D 3017 6212 CIF 10 3020 1375 TAD (3 3 < - 3021 4774 JiS CLW / 3022 0000 LADR, 0 72' 3rI?Z"'..'....,,,/... 3023 0000 COMIADR, O0/..A t2 *-<,, t_ t t 7f~f 3024 6211 CDF 10 3025 5243 JMP NOTL 4~./,,.,~,"-,, 3026 7200 CLA / fw. yf /.,2, ca 3027 1223 TAD CO>MADR 3030 1375 TAD (3., -/// 3031 322 3 DCA COMiADR/ -.. a -,:. —- (,.-. 3032 6211 CDF 10 3033 1623 TAD I COG fAD? 3034 6201 CDF 0 3035 3223 DCA CO0iADOR f,Je 3036 1101 TAD AL3UFF/ 3037 7001 IAG $Crl,-/cX~4'olff"el d-,/ 30 40 3105 DCA 105. "'3;. -.<' 3041 4623 JMS I COH IADR /), 3042 5200 JMP CLI'/ 4 3043 7200 NOT @L CLA / A ow./ - - A W - J< 3044 1223 TAD C00iADN- / l to 3045 1 373 TAD (4 /4e,>r U 3046 3223 DCA COMAD/ - 3047 5212 J IFP NXTCOM / 3050 4312 NOThEND, JN;lS EOL/ Jl; 3051 1375 TAD (3 / 3052 4772 JMS SYS!SG/ (- -'.-""/ 3053 5200 JP CLI / /;R /OCTAL Nvidf3E;R PHi< JTliNJG ROiJTINP 3054 0000 CTI'OJTC 0 3055 7104 CLL rAL/% 3056 3006 DCA f; 4fi -65.> /g1 30Q~d 3057 7010 RAR /4.,,,.

91 5.6 PAGE 1 43060 3007 DCA 7 / 3 r 3061 1371 TAD (-4/ 3062 3010 DCA o10- t L 3063 1007 NUHMLOO, TAD 7/ j 7.,UrLkT 3064 7104 CLL RAL / r 3065 1006 TAD 6 / 3066 7006 RTL / 3067 7004 RAL 3070 3006 DCA6 6 ^ * 3071 7010 RAR / a C c, /JC')k4'l. VM 3072 3007 DCA 7/ L t CP A, 3073 1006 TAD 6 /.t o, 3074 0370 AND (7 3075 1367 TAD (260/, -w c1 3076 4453 PTRPUi'./ 3077 7200 CLA 3100 2010 ISZ to/ 3101 5263 JMP i NU.4L 0/, 0, 3102 5654 EX I T OCTOUT /?rA -/. |cJ /PUSHPEFX - SAVE CURRENT PFX CHAR AND / SUSSTI TlJTE A N',E;, ONE GNC -NE #Je/ -/,*I', r, / Pf OPTRFx"T l' Y —------ w 3103 0000 PUlSRPFX, 0 / -., / 4,.-.. —'4r-'..4. AC 3104 3142 C A PFXT EL / /,.~... d4._,,,,.. z 3105 1100 TAD 100 /4;( 3106 3133 OCA PF3XSTACK/3107 1142 TAD PFXTEM 3110 3100 DCA 100 / 311 1 5703 EX I T- P USRP FX / Zt,t /EOL - PUT OUT CR, LFi AND PREFIX CHAR 3112 0000 EOL, 0 3113 4766 JilS M ESAGI 3114 4543 TEXT /%# i- 3 1 5 0000 / 3 11 6 7200 CLA 3117 1100 TAD 100/-, er a t3120 4453 PTRPUT / 3121 7200 CLA /-.-.-.X..~ 3122 5712 EXIT EOLg / /,......4,-;,/ /POPPFX - ROUTINE, TO RESTORE PREFIX CHA.R 3123 0000 POPFXs, 0 3124 7200 CLA// 3125 1133 TAD PFXSTAC/ - /~ < 3126 3100 DCA 100 3127 5723 X I T POPPF X/..t —.-. /PrTNAU - tOUT)fINE TO PRINT Tr-E COMPRTESSE D,. Tere i & /FDNAUMi tWJHICH APPEARS IN, LOCUS 10020 - 10023 3130 0000 PRTNAU, 0 i r;o,,,.

92 5.6 PAGE 1 53131 7200 CLA 313'2 1371 TAD (-4 /SET UP Cir F 3133 3010 LDCq. 10 3134 1365 TAD (17 /AND AD REG 3135 3011 DC 11 o 3136 1 364 TAtD (AtEA- 1 /ANu aNo'rED ADOt ~~d/,-lA E A0 cR -,_ 3137 3012 DCA 12 / 3140 6211 CDF 10 /MiOVE THE FDNAME 3141 1411 TAD I 11 5 + t ow 3142 6201 C0OF 0 3143 3412 DCA I 12/pt. *t,C.31 44 2010 IS 10 / 31 4 5 53 40 JiP.- 5 /, 3146 4766 JimS -;EAGI' 3147 0000 PAIRAv, 0 3150 0000 0 31 51 0000 0 3152 0003 0 3153 0000 O -2.j- 6Pt A t. 3154 7200 CLA 31 5 5 $730 EX I r P R TN.A N/F-.Z..' r/.z2 3164 3146 PAGE 3165 0017 3166 2200 3167 0260 3170 0007 3171 7774 3172 2713 3 173 000 4 3174 1124 3175 0003 3176 06~00 3177 2400

93 5.6 PAGE 16 *3200 /INDEX PRINTING UTILITY iROUTIN E /USES SWAITCHES ON PAGE ZERO /TO PRINT VARIOUS FOR!N4S OF INFO /A OUT THE VTOCS / t *+ IJ Xspl 7 4 t 7t, 3200 0000 N DXPRT, 0 3201 7200 CLA 3202 1377 TAD (-2 mj.3203 3126 OCA PASCNT/ 3204 1 376 TAD (SW1.4 +1 / 3205 1126 TO ASCD.,a.J2 3206 3007 DCA 7 3207 1407 TAD I 7 ~ 3210 7650 SNA CLAs 3211 5332 JMP P A T T/,._ 3212 1375 TAD (2 3213 1126 TAD0 PASCNT G rN Ti 3214 30337 oC.A 7 3215 100 7 TAO 7 3216 621 CGOP 10 / t7 24w, e /Z I 3217 3774 U' VA I (0 J 3220) 6201 CGF /] ftC J,, P. 3221 6212 CIF tO / 3222 4773 J i4 GAuV /i 3223 6211 CPF 10 3224 1772 TAD I (AVTOC 3225 6201 CDF 3226 3131 OCA VTOCAD / VTOA i. 3227 1145 TAO 0 ETAIL / /d., -V2E7 3230 7700 SMA CLA /, 3231 5240 JMP NAMPRT I,3232 4771 JMS EOL 3233 1370 TAD (21 // "L't7'a" 3234 4767 JIS SYSmSG/ 3235 1007 TAg 7 3236 1366 TAD (260 3237 4453 PTRUT / 3240 7200 NA -1'P R T. C LA / A.: f 3241 1131 TAD VTOCAD / ) f / flfo - 3242 3010 D C A 10 3243 6:211 CDF 10 3244 1 410 TAO 1 10 3245 6201 CDF 3246 3132 DCA VTOCNT 3247 1010 TAOL) 10 / 3250 1365 TAD C 6 3251 3146 OCA SAVD 3252 1 36 4 I FI1U (240 / - < 3253 47 63 JiS PdSH-IPFX/, -: 3254 7200 NAMLK, CLA j 3256 3127 OCA OPFLAG /USE AS A C NTtR 3257 1361 TAO (1 7 /4.r,.. I/ ""'""]}(~./ci",

94 5.6 1 AG E 7 3260 31 47 OCA KADID /'J' 3261 6211 C F 10 3262 2146 ISL / Av- F-r A 3263 1546 TAD I SARi / 3264. 21 47 ISZ KADOR / / -J,,2/, 3265 3547 DCA I iKADR 3266 2127 ISZ OPFLAG 3267 5262 JMP.-5 3270 6201 CDF 3271 1130 TAD ALLFLG / GA i., * W X?.t t4 J 3272 7710 SPA CLA. 3273 5306 JMP PRTFIL/, 3274 6211 CDF 10 / _ - 3275 1760 TAD I (20 2 A )-)'t',1 3276 6201 CDF /- L s.. 3277 0357 AN4D (7700. 3300 1356 TAD (-5200 /* TEST, 3301 7450 SiNA /,;,,.-' 3302 5327 J4MP VTOTST/ — te j 3303 1355 T'AD (-0300 /- TtST 3304 7650 SNA CLA 3305 5327 JMP VTOTST/ ~. -,f 3306 4771 PRTFIL,. JMS OL 3307 4754 J IS PRT>J!AM 7 3310 1145 TAD DETAIL /... 1t k -4 3311 7700 SMA CLA 3312 5327 JMP VTOTST" 3354 3130 TAD (3355 7500 3356 2600 3357 7700 3360 0020 3361 0017 3362 7770 3363 3103 3364 0240 3365 0006 3366 0260 3367 2713 / -2t, >,fM/ 3370 0021 3371 3112 2 3372 0101 3373 1037 3374 000O 3375 0002 3376 0126 3377 7776 3313 1353 3 331 4 3127 DCA OP FLAG 331 1352 TAD (23 3316 3017 DCA 17' 3317 1351 DOUT, T-'AD (240 /OUTPUT 3320 4453 PTRPiJT /DETAILS ABOUT FILZ "- -X a. 3321 6211 CDF 10 / 3322 1417 TAD I 1 7 / 16t

95 5.6 PAGE 18 - 3323 6201 CDF 3324 4750 JidS OCTOUTx/','*." - -' "3325 2127 ISZ OPKFLA 3326 5317 JMP DOJlT /.U t 3327 2132 VTO'S T, ISZ VTOCNT /A1it" d 3330 5254 JMP NAMLK //-', 3331 4747 JMS POPPFX; / -. --,.. ~ 3332 2126 PAST ST, I SZ P A$sCNT*/ t,. P' TA' o7 3333 5204 JMP NDXPRT+4 /P;~Z4 3334 5600 EXIT i'NOXPFI'T /,_ —.,i., / /NOTYET COMMi;AND;40DULE / c-2v&9 /vG; rfv411tEzi x'-?t.Cdf/~w /,AH A~,X/ 3335 0000.NOTY ET, 0 3336 4746 JM S EL / 3337 1345 TAD ( 4 / n4:'d f, $ s * 3340 4744 Ji1-S SYSMSG / 3341 5735 EXIT NOTYET / /COMMENT COiMMAND MODUiLE 3342 0000 COMMENT, 0 3343 5742 EXIT COMMENT 3344 2713 PAGE 3345 0004 3346 3112 3347 3123 3350 3054 3351 0240 3352 0023 3353?7775

96 5.6 PAGE 1 9 *3400 /INDEX COMMAND MODULE /SCANS OPE.-RAND STRING AND SETS / UP PARAMETERS FOR SU3ROUTINE NDXPRT /WHICH ACTUALLY PRINTS THE INDEX 3400 0000 I NDEX. 0 3401 7200 CLA 3 402 3124 DCgA S 4 tO V 7 3403 3125 DCA SWJ 3404 3130 DCA AIFLLL G L G /,,,,.,:! A. 3405 3145 BOA DETA IL 3 406 6212 GIF 1 1 o 340 7 4777 J.JNs OPSCAN,/, t 3410 5217 JMIP iNDOP /WtE HAVE >0 OPER, ANDS — 3411 7240 STA /NO OPERANDS - PRINT BOTt 3412 3124 DCA SWO 3413 7240 STA 341 4 3125 DCA SW1 /USER INDEXS __ 3 41 5 4776 INDP R T JSi NDXPRT R, 3416 5600 EXIT INDEX/w - 3417 7240 INDOP, STA 3420 1105 TAD 105 3421 3010 DCA 10 3422 6211 OPLOOP, COF 10 3423 1410 TAD I 10 /to lc,.~_-/t.. 4 3 42 4 6201 CDF /, 3425 1375 TAD (-240 3427 5215 Ji INDPRT/ / 3430 1374 TAD (-41 /A TEST 3431 7450 SNA 3432 5253 JMP 0PA4 el o-awe "4 3 433 1373 TAD (-I /3 TEST 3434 7450 SNA 3435 5250 JMiP 0OPONE gP B/. -,-,;'? 3436 1372 TAD (-2 /D tTEST 3437 7450 SNA 3440 5256 JMP OPD /'/.e- i ".')' 3441 1371 TAD (-17 /S CHEOCK 3442 7650 SNA CLA l.., 3443 5245 JP M) r Ei 0 /.',.' i,.. 3444 5222 J'P OPLOOP /IGNORE INVALID OPE.RANDS 3445' 1'40 OPZER0. STA / o e 3446 3124 DCA S30O J,- 6'') 34/47 5222 2 JN OLOOP / 3450 7240 POPiEs STA / -8 i AA4 i-4 3451 3125 DCA S;]l /I,.3452 5222 JIP OP 0 P 3453 7240 OPA, STA /,, /" — 3454 3130'CA.ALLFLG.,., /_ ~ L'3455 5222 J4IP OPLOOP? 3456 724S,0 PD, STA /y b - 3 457 31 45 D CA& D L'E T"LA I 41/7' ~_."" /

97~ 5. 6 PAGE 20 3460 5222 J4MP OPLOOP /TAPE ERROR HANDLING ROUTINE / d>fi >4' L)j?5r4i ~ Ct' /2 _'- /Za 3461. 3307 TPOERR, DCA 1PAC /SAVlEK AC 3462 7010 RAR /AND LINI( 3463 3310 DCA TPL K 3464 4770 JM S EOL /OU'I'PUT CRLF 3465 1367 TAD (31 /AND E-RROR MESSAGE 3466 4766 JMS SYSNSG 3467 1040 TAD NFLDS / Fw.L 7 i 3470 0365 AND (70 /GET INST FLO 3471 1364 TAD (CIF /S8UILD INTO INST 3472 3305 DCA TER C I F 3473 10 40 TAD MtFLOS /NiOW DO DATA FIELD 3474 7106 CLL RTL 3475 7004 R.AL /GET INTO POSITION FOR MASI<ING 3476 0365 AND (70 3477 1363 TAD (CDF /3UILD INST 3500 3304 DCA TER GOF 3501 1310 TAD TPLK /RESTORE LINK 3502 7104 CLL RAL 3503 1307 TAD TPAC /RESTORiE AC 3504 7402 TERCDF, HLT /iEP;dY CDF 3505 7402 TER-CIF, HLT /REP 6Y GIF 3506 5437 JMP I P REG /,E UN TOi T ASK I N PRO GRESS 3507 0000 TPAC, 0 /SAVE LOCN FOR AC 3510 0000 TPL:-<,X 0 /SAVE LOCN FO;i LINK 3563 6201 PAGE 3564 6202 3565 0070 3566 2713 3567 0031 3570 3112 3571 7761 3572 7776 3573 7777 3574 7737 3575 7540 3576 3200 3577 1067

98 5.6 PAGE 21 *3600 /DESTROY COMMAND MODULE - CALLED WHEN /USER ISSUES A DESTROY COMMAND TO CLI / 3600 0000 DESTROY, 0 3601 6212 CIF 10 e. $ 3602 4777 JMS OPscAN 3603 5210 J MP + 5 / cIcw 3604 4776 JMS EOL / o 3605 1375 TAD (11 / F 3 60 6 4774 JMS SYSM S G 3607 5600 DESEXIT, EXIT DESTROY 3610 1105 TAD 105 /GET LPTR 3611 3123 DCA SAVTEM,/P /.-~.,-t 3612 6212 CIF 10 3613 4777 JMS OPSCAN /GET NEXT OPERAND 3614 5217 J. >P. +3 /ffi? i; - 3615 7200 CLA NAcF/ /,1. 3616 5225 JiP NAMCHK 3617 6211 CDF 10 P,,4< t 3620 1505 TAD I 105 f ) 3621 6201 CDF 0 / 3622 1373 TAiD (-241 /. ~''7 t 3623 7650 SNA CLA /,,.,L 4- ~ 3624 1372 TAD (4000 /,/A aw 0 SAs 3625 3122 NAICH C., DCA. ASv /, /.4 AC aa,c,- A_- 5 t -L. J 3626 6211 DF 10 / 3627 1 523 TAD I SAVTEMP / k, 3630 6201 CDF 0 / f/. 3631 1371 TAD (-252 3632 7450 SNA /., 3633 5243 JMP AST ER /. 3634 1370 TAD (-3 3635 7640 SZA CLA / 3636 5253 JMP DC00i /.,O -- r.~ - 3637 4776 NONOP JMS EOL 3640 1367 TAD (16 /, - 3641 4774 JMS SYSMSG / it 3642 5207 JMP DESEXIT/ 3643 7200 ASTER CLA / Aa 3644 1 122 T.A) SAVSW /.i';, 3645 7710 SPA CLA 3646 5253 JMP 3COMP /, -Bv-. Ut.,,,'..Y, 3647 4776 "IS EOL 3650 1366 TAD (13 3651 4774 JMiS SYS.IMSG 3652 3207 Jil X I Tt 3653 1 1 2 3 DCOiMS, TAD SAVTEM,:'/P\.,;r 2..,',,.2 -... 3654 3260 DCA.+4: 3655 6212 CI F t O 3 66 365 TA D ( I0,..-. /. 3657 4764 JMS COMPRESS - 6 —-~_. 36 6;00 000)0 0000 /SOURC ( E - SET A OVE ('/.,,~,, ~ 7 (2dt P~'"' 3661 0020 0020 /SIN!K A-REA (,

99 5. 6 PAGE 223662 6211 CDF 10 /FLD I c - A P1PPus 3663 6212 CIF 10 /SEA CHi M(i F LE NAME 3664 4763 JM S GETFD,'/$.~22 E~ F c,. 3665 5272 JMP FFND /'. / 366.6 4776 JMS EOL 3667 1362 TAD (17 7 /'k'"'-' - + 3670 4774 JMiS SYSMS 3671 5207 JMP DESEX I T I fA h 3672 3123 FFND. DCA SAVTEMP/O>7e2.TF" - 7'/. ~;..J'.,,, AK.c 3673 11 123 TAD SAVT EiMP /FCi3 0aO Cl) BFT R - D. zC.. r, 3674 1361 TAD (4, 3675 3010 DCA 10 /J....,r 3676 6211 CDF 10 3677 1410 TAD I 10/,ti.< 9,,-. 3700 6201 CDF 0 6G 3701 0360 AND (1000 e 3702 7640 SZA CLA /., 4 r;- 4/ 3703 5237 JMP N0NO 3704 1123 TAD SAVTEMPI.4/ o 4, 4) D GTcC& 3705 6212 CIFO 10 3706 4757 JiMS DESTRY/ $ T;' 3707 5207 JMP DESJ:XI T r./ u,~ _Z#3757 0462 PAGE 3760 1000 3761 0004 3762 001 7 3763 0200 3764 0400 3765 0010 3766 0013 3767 0016 3770 7775 3771 7526 3772 4000 3773 7537 3774 2713 3775 0011 3776 3112 3777 1067

100 5. 6 PAGE 23 *4000 /SAVE COiMMAND MODULE - CALLED WHEN i'Hi /USER 4WANTS TO SAVE A FILE. GNC 4000 0000 SAVE, 0 4001 6212 CIF 10 / it 2 - /C 9 4002 4777 JmS OPSCAN 4003 5210 J MP SSA IEA-1'/ t4-f 4004 4776 JMS EOL /INO OPERAiNDS 4005 1375 TAD (11 / 4006 4774 JMS SYSiMSG / 4007 5600 SAVEXIT. EXIT SAVE,/. c -/ —~> 4010 1105 TAD 105 4011 3215 SSAREA, DCA SAA d5A s 4012 6212 CIF 10 /,I z / 4013 1373 TAD (10 /5 CHARS / z t 4014 4772 JMS C0MP~RESS 4015 0000 SAREA, 0000 /SOURCE AREA 4016 0020 0020 /SINK AREA 4017 6211 COF 10 /MEMFLD 4020 6212 CIF 10 4021 4771 JMiS GETFD 4022 5237 JMP FND /FOUND 4023 4776 JXI S EOL /FILVE D3ESN'T EXIST 4024 1370 TAD (6 4025 4774 JM S SYSSMSG/ 4026 4767 JMS PRTNAM'. 4027 1366 TAD (7 4030 4774 JMS SY SiSa ell'.?~,,~c,./L. 4031 7200 REPSOR, CLA 4032 1373 TAD (10 / 4033 4765 Jjms U1ZUISEK /' ~ 4034 7200 CLA 4035 1364 TAD (7400 4036 5211 JMP SSAREA / /:~.~L~_ 4037 3121 FND, OCA EFC3 /SOURtCE FCO -'-C.e>_4040 1121 TAD EFCB, ~, r 7,, t 4041 1363 TAD (4/. 4042 3010 UCA 10 /CHPK IF FILE IS A SOJRCE 4043 6211 CDF 10 4044 1Z410 TAD I 10 /GET SOURCE BIT ~,. f:}';,',.'"/ /v —'/7-'-Y,-. 40 45 6201 COF 0 4046 7710 SPA CLA /TEST IT 4047 5257 JMP SORCE /OK 4050 47'76 JMiS EOL /COMivPLAIN' /. —, 4051 1370 TAD (6 G 4052 4774 JMS SYSMSG 4053 4 76 7 Ji'A1 P R iAiVA /R /.~ A' -z4054 1362 TAD (5 4055 4774 JM S SY S SG'/ -' ~ 4056 5231 JM;P iRE SO0R/.->/i..,:_..z r-,,, Z;.,..../;,y..~ /-, 1 /.......r..'....,.tt: 4057 6212 SORCE, CI F 10 4060 4777 JWS OPSCAN 7' / 4061 7610; Si(P CLA /~,,.,/, f... 4062 5204 JMP SAVE+4//,,..

101 5. 6 PAGE 24 4063 6211 CDF 10 /CHECK FOR SAVEFNA,IE STARTING 40(64 1505 TAD I 105 /WITH A't-"'SIGN - GET INITIAL CHARK 4065 6201 CUF 4066 1361 TAD (-255 /SUBTRACT "-" 4067 7650 SNA CLA /SKP IF NOT Mc4INUS 4070 5323 JMP IC /OTHEROi ISE JUOIP TO [BAD CHAR ROUTI NE 4071 7240 bTA /CHECK ALL CHARS FOR VALIDITY-/,,-O, t-: 40 72 1105 TAD 10 5/. —'4/ 4073 3010 OCA 10 /SOU tJtC; OF CHARiS - 4074 1360 TAD (-1/ 4075 3011 DCA 11 / - 4076 6211 COF 10 4077 1410 ICHK, TADi I 10 /GET A CHAR 4100 0357 AND (77 4101 7450 SNA /IS IT AN"'SIGN? 4102 5323 JMt1 I C /YES - tAD 4103 1356 TAD (-50 4104 7450 SNA /IS IT A'(? 4105 5323 J>IP IC /YES2 ILLEGAL CHAR 4106 1355 TAD (-1 4107 7450 SNA /IS IT A" ) 4110 5323 Ji'qP IC /YES - ILLEGAL 41 i 1 354 TAD (-2 /IS IT A'+"' SIGN? 41 2 7450 SNA 4154 7776 J'AP IC /YES, ILLEGAL 4155 7777 4156 7730 4157 0077 4160 7770 4161 7523 4162 0005 4163 0004 4164 7400 4165 2654 4166 0007 4167 3130 4170 0006 4171 0200 41 72 0400 4173 0010 4174 2713 4175 0011 4176 3112 4177 1067 4113 5323 4114 1353 TAD (-22 /IS IT A =? 411 5 7650 SNA CLA 4116 5323 2 J.iP IC /' 4117 2011 is 11 /DONE CHK iG? 4120 5277 JMvHP I HK <, /-" 4 1 2 1 620 1 C3F 0 /:y,- o-,,, X,.k 4 1 2 2 S 3 3 () 50 i'P C G).1 4123 6201 IC, CDF O/,-. /''-. 4124 4752 J'MS EOL /TtELL'IJSER A3OUTi ILLEGAL NAME 4125 1351 TAD ( 1 2 /SYSTEiM H SG # 10

102 50 6 PAGE 25 4126 4750 JMiS SYSMSG 4127 5207 JMAP SA VtXIT /...- r/ 41 30 1 105 COiA4P,' TAD 10 - Z 4131 3335 DCA ~+4 4132 6212 CIF 10 4133 1347 TIAD ( 1;0// 4134 4746 JimS COMPRESS 4135 0000 0000 /SOUCGE A), 4136 0020 0020 /SINTK,iDR 4137 6211 CDF 10 /iEfAE.FLD 4140 5745 JiP ~ & 7 600 +2 0/- / 4145 4200 PAGE 4146 0 400 4147 0010 4150 2713 4151 0012 4152 3112 4153 7756 4200 6212 CIF 10 /TEST FOr. MiRE OPERANDS 4201 4777 JMS OPSCAN 4202 5206 J;vIP GATHER ye-v r- - m<S 4203 7200 CLA /NO MORFi 4204 3122 DCA SAVSW /f'- / /V)/ Z1. / 4205 5 223 JMiR SAVI T 4206 6211 GATHEIRo CDF 1IO/ 3/?lt. 4207 1505 TAD I 105 /GET NEXT OP 4210 6201 CDF 0 4211 1376 TAD (-241,../.'rJt' / 4212 7640 SZA CLA /j 4213 5220 JMP NXTSVOP /IGNORE ILLEGAL OPS 4214 1122 TAD SA VS W 4215 1375 TAD (400C0 o/ ZM1) V 421 6 3122 DCaA A[ v J/ 421 7 5220 jP i SN X T S V 0 P / ~.';,, t4220 6212 NiXTSVO, CIF 10/, - 4221 4777 JMS OP'SCAN -'f,- /;, 4222 5206 J.I G'AT 4ER 4223 1121 SAVITv TAD EFCg 4224 1374 TAD (5 //,z,..:_).. 4225 3010 OCA 10/ - 4226 6211 CDF 10 4227 1410 TAD I 10 /GET SOURCE DESCRIPTOR 4230 6201 CDF /RESTORE O)F 4231 0373 ANL) 3400/ /l-+ Z A i A. a W Ze, 4232 7640 SZA CLA /SKP IF ON UNIT O - SYM30LIC 4233 7001 IAC 4234 3113 DCA 1 13 /..c"v — //,' < _ ~r..%,....... 4235 6212 CIF 10 /SEE IF FILE AL-EADY EXISTS 4236 4772 JMS GETFi) /BY TRYING TO GET A FGC PTR FOR IT 4237 7410 SIKP /ALhREADY EXI STS 4240 5272 JiiP,MAK(VTOC /DOESN'T EXIST - MAAK A V'fOC ENTRY 4241 3123 DCA SAVTEMP /SAVE FCS3 P)OINTER 4242 1123 TAD SAViJTEiMPi- /CHECK< TO SEE IF A FILE O)R DEVICE 4243 1371 TAD (3 4244 3010 )CA 10 /AIDR OF FILE 8Lk# OR DEVICE TYPE.cz*~(.~~.,. F't.ct ~,. —

103 5.6 PAGE 26 4245 6211 COF 10 4246 1 410 TAD I 10 GET FD UW/T,:-' 4LC-.4 ~ t.,.-,,'. 4247 6201 CDF / 4250 7004 WAL /PtU TI T 1 INTO BI T 0 4251 7710 SPA CLA /SKP IF A FILE 4252 5770 Ji.P IC /OTHE I;,I'SE IS A DEVICE 4253 1122 TAD SAVWVk AI V t''' j S2kt7 4 J7 4254 7710 SA CLA /,.,,,, 4255 5267 J3.iP XILFIL /USER SIAYS,t,, LACE// 4256 1367 TAO (15 / J:'... I? 4257 4766 JMS c-U IZUiE,,',/ S:,.,,_.ol -. 4260 7200 CLA 4261 6211 CDF 10,-. 4262 1765 TAD I (..EP.iU" F F + 1 4263 6201 CDF 4264 1376 TAD (-241 /IS IT ~!'? 4265 7640 SZA CLA 4266 5764 J"MP SAVEKXIT /N0-"-:..:. r. 4267 6212 XILF IL, CIF i 10 /jI.. —K.-. 4270 1123 TAO SA fi.'EMP/DE6frOY OLD gILE 4271 4763 Ji;S OESTiY / 4272 7200 MAKVTOC, CL/A /BulLD PARTIAL VTOC FOR, iKF --- /,.- k:',. -,? - 4273 1121 TAD EFC8 /< 4274 1 371 TfAOi (3' -- ff 4275 3010 DCA 10 /.(Uu) <CE AOtR FOR NE'vW fL i.,-/~~t.,: C 4276 1362 TAD (24 4277 3011 L)CA 11 /SIIK ADR - NEW',,I -'-/.Jn i' 4300 6211 CDF 10 /J / 4301 1410 TAD I 10 /ET SOURCE rl 430'2 311 4 DCA 1 4 /, ", yaZ ~.'T 4,) 4303 1 410 TAD I 10 /GET L~NGTH;,iJWORD'%,..-.....< 430 4 3115 S CA 115 / 4305 1115 TAD 1 5 4306 0361:AND (4377 /CLEAN IT UP 4307 3411 DCA I 1- /, 4310 1410 TAO I 10 /// "" 4311 3411 DCA I 11 MOVE OTrER 4ORDS -d ""2 Z- -',-' 4312 141 0 TAD I 10 I /.:, 431 3 3411 I C.r I I 1 /E OF ViTOC ~-Y,-....,,/..;',i 4314 1113 TAD 113 /GEY UNIT i - cUaNI 1/t Xc *-tL,.. 4%t/ w9 - 4315 3760 )C-A I (O/ />.s / bon 4316 6201 COWF;twa 4317 6212 CIF 10 4320 4757 JM"4S'Al;F I L / RY TO MAKE FILE —/,P. /M.-9'. A..-,,'j FIL.E,../ 4321 5756 JYAlP COPYIT /CA;':iE OUT OK 4322 4755 JMS EOL /IN0 ROOM LEFT 4323 1 354 TAO (1 4 432 4 4 7 53 tJPS SY SY: S G/ 4325 5764 Ji'P S A V X I T _4353 2713 PAGE 4354 001 4 4355 3112 4356 4400 4357 07 S 4360 )000

104 5.6 PAGE 27 4361 4377 4362 0024 4363 0462 4364 4007 4365. 7400 4366 2654 4367 0015 4370 4I123 4371 0003 4372 0200 4373 3400 4374 0005 4375 4000 4376 7537 4377 1067 4400 7200 COPY IT CLA / zA4 A Z-1f.,t/ L 4401 1113 TAD 113 /SET Uf 4 ARA.iIETERS 4402 3116 DCA 116 /FOR TPCOPY 4403 6211 CDF 10 4404 1777 TAD I (24 /GET SINK BLK# AKJL.,o^z. a. 4405 6201 CDF 0 ITC 0 4406 0376 A'ND (1777 4407 3117 DCA I 1 7 / e r+a 4410 1121 TAD EFCG3 4411 1375 TAD (3 C. 3, 4412 3010 DCA 10 4413 6211 CDF' 10/ 4414 1410 TAD I 10 4415 6201 COF 4416 7006 aR''L / 4417 0374 i / 4420 3113 DCA 113 /SOt,,CE UNIT.t /3 4421 1114 TAD 114 / 4422 0376 AIND (1 777/. 4423 3114 OCA 114 / 4424 111'5 TAD 115 4425 0373 AND ( 377 4426 3115 DCA'115 4427 4772 J7 7 S TPC PY/c 4430 4455 SEAR-CH /j, r, 4431 0434 UJNITO +434 /PO I lI O UNI T 0 TAPE 4432 5771 JMP S A VE X I T//,e,'4571 4007 PAGE 4572 2262 4573 0377 4574 0001 4575 0003 4576 1777 4577 0024

105 5.6 PAGE 28 *5000 /RUN COIMMAND 1 MO0DULE / 5000 0003 0 R RUNr, 0 5001. 6212 CIF 10 5002 4777 JMS OPS CAN 5003 5210 JMP OROP / 5004 4776 uJMS EOL 5005 1375 TAD (11 / -'' a 5006 4774 JMS SYSSG 5007 5600 RUNEXIT, JiMP I RUN /Z -o 5010 1105 OKROPp TAD 1 O 5011 3215 0 )CA RSAREA 5012 6212 CIF 10 CPE, r (3t /19t 5013 1373 TAD (10 5014 4772 JMS COMPRESS/ c.-E. 501 5 0000 oRooSAREA. 0O 5016 0020 0020 5017 6211 COF 10_ 5020 6212 C I F 10 / -_0,,,_, 5021 4771 JMS GETFD 5022 5236 JMP FD / 5023 4776 JMS EOL. r_2/-,e.>5024 1370 TAD (6 5025 4774 Ji S SYSMSG 5026 4767 JMS PRTNAM 5027 1366 TAD (7 5030 4774 JMS SYSMSG 5031 1373 RREPSOR, TAD (10/X U1aIE EI,t < COV'-etr;9Zt 5032 4765 JMS dUI ZSER / /t 5033 7200 CLA 5034 1364 TAD (74) 0 5035 5211 JMiP OKRO0P+1 z,. t.t CL,,.,,, 5036 1:363,-F'i, TAD (3/7 4 5037 3010 DCA 10 /- i )//O 1 iR' t/t 7*.zvt 6isi Cg 5040 6211 ODC 10 FU 5041 1 41 0 TAD 1 10 / 3/',1.. 5042 3134 DA;- BL1K 5043 1410 TAD I 10 5044 3135 0DC: RLEN 5045 1 41 0 T AD I 10 5046 6201 CDF 5047 0372 AND (400 /, r 5050 7640( SUA CLA 5051 5261 JtiiP RFO /, 50 52 4'77 6 JMi/ S E.OL 5053 1 370 TAD (6 5054 47 7 4 JS Y.S ii SG 5055 4767 J-.IS PiRTNA1/ 5056 1 362 TA D ('23 5057 4774 JMiS SYSi'SMSG 5060 5207 JN'P R UJNEXIT / fffJ o/$- ~ > 5061 4445 RFOK, ROSTAP /G'T Fi-'ESH CO Y OF 5062 0447 UNI T0+447 /THE I/O COMMdiU NICATIONS 5063 4001 FLI1 +1 /AREA

106 50 6 PAGE 29 5064 7600 7600 5065 7201 CLA JAGC 5066 313 ODCA DUNI T -zicr / 5067 6212 RSCAN, CIF 10 5070' 4777 JMS OPSCAN c 5071 5304 JMP RCHK-1 /THERE IS AN OPElRAND STRING TO SCAN 5072 4445 LOADIN, ROSTAP /GET COR IMAGE 5073 0450 UNI T0+450 /LOADE'o, SYSTiM 130OT, 5074 0002 FLDO+2 /AND READ-ONLY TAPE ROUTINEi 5075 7400 7400 9 5076 4452 RDRCLO /CLOSE iiEADER 5077 4454 PTRCLO /WAIT UNTIL PRINTER' IS DONE 5100 4444 TPWAIT /WAIT UNTIL TAPES ARE DONE 5101 6002 IOF /TURN OF INTT SYSTEM 5102 5703 JMP I.+1 5103 7400 7400 _' 47& 5104 4444 TPWAIT / s4 AIT UNTIL COM1MARiEA IS INCORE Ge. 5105 1105 RCHIK, TAD 105/ 5106 3010 DCA 10 5107 6211 CDF 10? 5 1 1 410 TAD I 10 5111 6201 ODE 5112 136i TAD (-27S 5113 7640 SZA CLA t 5114 5760 J!MP IMPLCT/ T, zt - 22/ Jt 5115 6211 COF 10 // 51i 1 6 1 505 TAD I 105 5117 6201 CDF 5120 3137 DCA LUNJIT 5121 1137 TAD LUIT 5122 1357 TAD (-261 /2 ZG/? 5123 7510 SPA 5124 5330 JMP U N I T N G / --. 5125 1356 TAD (-6/',.7 5126 7710 SPA CLA /Z'Z-'. 5127 5755 J M P O N I T 0 K /./-, Ze r /- -e 5130 7200 UNI TNG* CLA 4/id zF i Zera 5131 1137 TAD LUNi\T 5132 1354 TAD (-320 /.d~e. 5133 7650 SNA CLA 5 134 5753 JM? PARA1/ a at 5135 4776 JMS EOL 4 5153 5200 TAD) (2 / _. 5154 7460 5155 5213 5156 7772 5157 7517 5 1i 60 5222 5161 7503 51 62 0023 5163 0003 5 i 64 7400 5165 2654 S1 66 0007 5167 3130

107' 5.6 PAGE 30 5170 (006 51 71 0200 5172 0400 5173 0010 5174 271i3 5175 0011 5176 311i2 5177 1067 5136 1 352 4 51 37 4751 Ji.IS SYSMSG 51 40 5207 JMP RULJEXIT /al ie 5151 2713 PAGE 51 52 0024 5200 1377 PARA"1, TAD (-40 5201 3012 DCA 12 Ii e-4722 - 7Pt-T P-3 5202 1376 T-AD (7707 / t O 5203 3011 DCA 11 5204 6211 C,F 10 5205 1410 TAD I 10 5206 3411 o CA I 11 | 3-Z O 5207 2012 ISZ 12 5210 5205 J P *-3 5211 6201 CODF 5212 5775 JiP LOADIt /,. c,, - 5213 1137 UNITOK, FTAD LUN IT _ 5214 0374 AND7 7 5215 7041 CIA A 5216 3137 oCA LUNIT I7 TC'2 Ai4 5217 1105'fAD 105 5220 1373 TA) (2 2/ 5221 5236 Jt-P RNERG /. /-;Co.-c 5222 1136 IMPLCTP TAD IT/,c 5223 1372 TAD (-5 5224 7710 SPA CLA /4 5225 5232 JM1P LCO 1PT/D —,T 5226 4771 JiS EOL 5227 1370 TAD (25 ot 5230 4767 IJS SYSMSG 5231 5766 JMP iRUNEX T 5232 1 13 6 LC iMP T TAD DUNITJ 5233 7041 CIA 5234 3137 DCA l.U.\NIT 5235 110i 5 TAD 1 0 5 / 5236 3260 RAMEPG, DC/A f;NAME /pn-m',-,,.~r. /,t 5237 1137'TA LUUJ I * 5240 1365 TAD (3 / 3v >; i3c 5241 7710 SDA CLA 5242 5245 JIP OUTUNIT/.U, N i T 5243 1364 TAL) (4000 /4n-e -tv 5244 7410 SKP 5245 1363 OJTOUNIT, TAD (2000 / -.,,5246 3261 DCA t<MA'SK /,~g f-.,,/.,g,-c.A~vg.d,,._ 5247 1362 TAD (7600-14 1. 5250 3257 DCA LINKAR'A'.-_ -_- EA /. —,,, 5251 1257 TAD LI /KAREA/A,'- o-./'t- J/. L,-/a.74_, 4_

108 5.6 PAGE 31 5252 1361 TAD (14 5253 3257 UCA LINKA AEA /e 5254 2137 ISZ LUNIT 5255 5251 JMP. -4 e-A Ma, 1/-1kRE - e or W my1,41;v 5256 4760 JMiIS CONSCANi" At ", P 5257 0000 LINKAREA, 0 /,r IAAR 5260 0000 FNAME, 0 c'Ar a -e cd XofAo ve A k 5261 0000 RMASK, 0 /A IE 4 5262 1136 TAD DUNIT 5263 1365 TAD (3 / A / o 5264 3136 DCA DUNIT 5265 5757 JMP RSCAN / ~ HOOF ado g.d 5357 5067 PAGE 5360 5401 5361 0014 5362 7564 5363 2000 5364 4000 5365 0003 5366 5007 5367 2713 5370 0025 5371 311 2 5372 7773 5373 0002 5374 0007 5375 5072 5376 7707 5377 7740

109 5.6 PAGE 32 *5400 /CONCATEi'ATED FILE STITING SCANNING RiOUTINE 5400 5601 CONRTNi, JMP I CONSGCAN A / T 5401 0000 CONSCAN, 0 5402 7200 CLA 5403 1 601 TAD I CONSCAN, Ae'_ F 5404 3140 DCA LKAREA / / p. 540 5 2201 ISZ CON CA N 5406 1 601 TAD I CONSCA. 5407 31 41 DCA FNAMNPT / _ P 5410 2201 ISZ CONSCAN 5411 1601 TAD I CONSCAN g / 5412 3777 DCA CHKASK / ~. 5413 2201 ISZ COiNSCAN 5414 1 376 TAD ( -7 / 5415 3775 DCA FILCONT /t -c 5416 3774 OCA'iUI1T /7 9/T, 5417 7240 TA / 5420 1141 TAD FNA.'fl PT -A 5421 3773 OCA FSTPTiR / 5422 1372 CSCANY TADi (- 10 5423 3771 DCA CHONT I/'CAN le'r'p-" — d 5424 6211 CHLK~, CD 10 5425 1541 TAD I FNAMP TR/ <i Lc *t e ie 5426 6201 COF 5427 1370 TAI (-240., 5430 7440 SZA IT 5431 5235 JMP PLU;SCSf / — o 5432 7240 UfJI TSET CLA CM1AI._ 5433 3774 DCA OUIT / t 5434 5257 JMP MOVNAi 5435 11367 PLUSCI{, TAD (- 13 5436 7650 S.'.4 CLA 5437 5257 JiL P i O VJA i f/ p-, "P;I VC, fz 5440 2771 ISZ CRCONT fY-. B er, 5441 7410 13 / FKI 5442 52415 Jj9 SAC W f p o t;.e FS A/7P' -ite — zV) 5443 2141 ISZ Fi4A PiTN /W1 Tt -i 5444 52;24 J4 P-L / 5445 I 21 24 C1 SPACFJD, I SZ FN1AMPTt 5446 6211 CDF 10. 5447 1 541 TAD I Fz N A T / 5450 6201 CDF 5451 1370 TAi (-240 5452 7450 SNA / A-~'- #'uyet~ 4 5453 5232 JMP P'Ui I "ST' 5454 1367 TAD (-13 /. - 5455 7640 SZA CLA / 54S7 136 6 52 I4OVA>'1, TA -D (10 1 / 5460 27 7 1 TAD CCN -.N. / p. 5461 7041 CIA 5462 7450 SiA /j,,,0..',/ 5463 5765 J r CO\1 E5L st-u. FNrf T-2 0 / z;c. e?R 5444 524 d,.P CH'

110 5.6 PAGE 33 5464 3012 DCA 12 / 4 5465 1'773 rTAD FST, R TR- gPE /p-. E.4v") 5466 3010 DCA 10 / / 5467 1364/ G(TFTRs TAD (F]AE& I 5470 3011 DCA 1 1 //- 1X/A., (,,E'E 5471 6211 CDF 10 5472 1410 TAD I 10 5473 3411 DCA I 11 5474 2012 ISZ 12 5475 5272 J M — 3 5476 1363 TAD (240 5477 3411 DCA I 11/.' f CD"eJ 5500 6201 COF 5501 1366 TAD (10 |' 5502 6212 CIF 10 5503 41762 JYS CO 0ipR ESS /s7 (4Q t,A4'F t-,Coc < rZ J 5504 0030t FAR EA 5505 0020 0020 5506 6211 C)F 10 5507 62 12 CIF 1 / 5510 4761 JM S GETFD / 4f F t rrt 5511 5760 JiRP CONFNFD /J-'An 5512 4757 JMS EOL 5513 1356 TAD (6 5514 4755 J;iS SYSI 7SG/ 5515 4754 Ji1S PRiTiNIAM 5554 3130 TAD (7 5555 2713 5556 0006 5557 3112 5560 5610 5561 0200 5562 0400 5563 0240 5564 0027 5565 5651 5566 0010 5567 7765 5570 7540 5571 5663 5572 7770 5573 5664 5574 5662 5575 5661 5576 7771 5577 5660 551 6 1353 5517 4752 J'YlS SYSISG 5520 5751 JMiP,&7600+200 5551 5600 P"AGE 5552 2713 5553 00037 5600 1377 iP1iIL, lAD (10/. 560 1 4776 JMS UI /e / 5602 7200 CLA

111 5. 6 PAGE 34 5603 1375 TAD (-10/ 5 60 4 3012 DCA 12 A t c2 - - d 5605 1374 TAD (737 f 5606 301 DCA 10 Zt, /6 -t T6/1( 4 TaD (737N.~ id " -T L./.feC.,~~r 5607 5773 J1IP G rFN /. 6... - 5610 1372 CONFND, TAD (3/'c, a 5611 3010 DCA 10 7/,. /. /o. / 5612 6211 COF 10 5613 1410 TrA I lU/0 561 4 301i 7 COA 1 7 5615 1410 TAD I 10 5616 301 6 DCA 16 - / Cw~.d. <t &> ~/ 56i7 6201 CF / 5620 1016 TAD 16 5621 0260 AND CHKMAS/.~b.2.i& ( / 9fkjgkA 5622 7640 SZA CLA 5623 5233 J MP CHKI / 2-t S5624 4771 JMS EOL 5625 1370 TAD ( 6 /t'/" - ( 4,t;t5. 7 0; _ 5626 4767 JrlS SYSMSG / 5627 4766 JMS PRTNAM 5630 1365 TAD (26 5631 4767 JMS SYSMSG 5632 5200 JM9 iR EP FIL 5633 2261 CHKOK, ISZ FILCONJT/rktt/ -- 6-t,' t- 5634 5241 diP LKSTUFF / o )st 4 2 5635 4771 JMS EOL 5636 13G4 TAD (27 5637 4767 JMS SYSMSG / 5640 5763 JMP CLI J 5641 6211 LKSTUFF, CDF 10 564'2 101 7 TAD 17 5643 3540 DCA i LKAREA 5644 2140 ISZ LKAREA 5645 1016 TAD 16 5646 3540 DBOA I LKAREA /:/-l, 5647 6201 CDF 0 5650 2140 ISZ LKAREA 5651 1141 CONEND, TAD FNAMPT/.'jP FsT 4 g t t,m i74 5652 3264 DCA FSTPTtr /: 5653 2141 ISZ FNAMiPTRI / 5654 1262 TAD (QUIT < 5655 7700 SMA CLA 5656 5762 JMP CSCAN /.-t,, -.,f-, 5657 5761 J>IP CONR TN/.-rt. cN, 5660 0oo0 oo CH.<MAS.X, o/ 4l /,e9,L-?, ~vt,, 4. /.. 5661 0000 FILCNT, /'f t 5663 O0000 CRC NT. O / CC c.s,: /~, C. -/T ). 5664 0000 F STPT 0/?` A 1,/?A~/X (-eeea+,tt 5761 5400 PAGE 5762 5422 5763 3000 S764 0027

112 5.6 PAGE 35 5765 0026 5766 3130 5767 2713 5770 0006 5771 3112 5772 0003 5773 5467 5774 7377 5775 7770 5776 2654 5777 0010

113 5.6 PAGE 36 *6000 /SIGiN'OFF COMMAND MODULE / 6000 0000 SI G, 0 6001 4446 WRSTAP / JRITE OUT VTOC 1 6002 4160 UNI T1 +SVTOCi 6003 6010 FLD1+CHEC K+10 6004 4000 4000 6005 14446 WtS A'I'P /WRITE OUT VTOCO 600 6 0470 UNI TO+SVTOCO 6007 6010 FLDI +CHECK+10 6010 2000 2000 6011 4455 SEARCH /REWIND UNITI 6012 4002 U1NIT1+2 6013 1060 TAD SRCHSW 6014 7640 SZA CLA 6015 5213 JiP.-2 6016 4455 SEARCH /REWAIND UNITO 6017 0002 UNI T0+2 6020 1060 TAD SRCHSW 6021 7640 SZA CLA 6022 5220 JMir.0-2 6023 4777 JM.S ~oL / 6024 1376 TAD (30 6025 4775 JiS SYS'SG /I s 6026 4452 RDRCLO /SH''r UP SHOP 6027 4454 PTRCLO 6030 6002 IOF 6031 7 402 HLT 6032 57714 JilP SYSTART/t. O 7 6174 2000 PAGE 6175 2713 6176 0030 6177 3112

114 5,6 PAGE 37 *6400 / /LOADER I NVOCATI OiN CMOMAND MODULE 6400 0000 LOAD, 0 6401 6212 CIF 10 6 402 4777 JMS 0PSCAN / 6403 5210 JMP CKLOP / Lfo',e6404 4776 JMIS EOL 6405 1375 TAD (11 6406 4774 JMS SYSMSG 6407 5600 LEX, EXIT LOA-,e 6410 6211 CKLOP, COF 10 6411 1505 TAD I 105 35 — /,,. AC 6412 6201 CFP / 6413 1373 TAD (-301 / 6414 7450 S iN"A 6415 5225 JMP A3SLOD / 6416 1372 TAD (-21 /,' 7 6417 7650 SNA CLA / -> -. 6420 5240 J P RELLOD / 6421 4776 JMS EOL / - CE P_ L 6422 1371 TAO (20 6423 4774 iJtS YsiSSG.. 6 42 4 520 7 JMP LEX / 6425 1370 ASLOD TAD (/ 6426 4767 JNS PUSHPF 6427 4445 RDSTAP /GET THE PIECES OF THE ABS LODM 6430 4240 UNIT1 +240 /FIRST PIECE SITS HERE 6431 0012 FLDO+12 6432 3400 3400 6433 4445 rL)STAP /GET SECOND PIECE 6434 4252 UNIT 1 +252 6435 4001 FLD1 +1 6436 0600 600 /OiVEtWRITE CO.MAND TABLE 6437 5600 EXI T LOARD /RETURN TO:RECONFIGURED SYSTEM 6440 4445 RELLODv RDSTAP /GET CP't -E IMAGE LOADER TO 6441 0450 UNITO+450 /LOAD RELOCATING LOADER 6442 0002 FLDO+2 6 443 7400 RADRP, 7400 6444 4452 RDRCLO 6445 4454 PTRCLO 6446 1366 TAD (4260 6447 3134 DCA 134 6450 1365 TAD (5040 /FA~E A CALL TO THE CI LDR 6451 3135 OCA 135 6452 4444 TiP.iJAIT /WAIT JNTIL ALL PENDING I/0 IS DONE 6453 600i)2 IOF /TiJIN O FF I NTT SYS 6454 5643 JvMP I RAOR /GO TO CORE IMAGE LDR 6 565 50 40 PAGE 6566 4260 6567 3103 6570 0256 6571 0023 6572 7757

115- 5.6 PAGE 38 6573 7477 657/4 2713 6575 0011 6576 3112 6577' 1067

116 5.6 PAGE 39 *6600 / /SYSTEM MESSAGES - LONG FO.rM / 6600 6577 MSG,.*- 6601 6637 Ml 6602 6646 1M2 6603 6654 M3 6604 6664 M4 6605 6702 M5 6606 6714 M6 6607 6715 M7 6610 6726 MA8 6611 6746 M9 6612 6757 MIO 6613 6770 Mil 6614 7007 Mi 2 6615 7022 M13 6616 7027 M.1 4 6617 7044 "11i 5 6620 7056 Mi 6 6621 7066 M17 6622 7071 i 8 6623 7101 M19 662 4 7113 M20 6625 7126 M21 6626 7147 M22 6627 7171 M23 6630 7207 M24 6631 7214?125 6632 7253 E 6633 7253 E 6634 7253 E 6635 7253 E 6636 7253 E /30 I —o'~,z.Y' Z -,. 6637 1411 Ml, TEXT /LI 6640 1 605 N E 6641 4024 T 6642 1717 00 6643 4014 L 6 644 1 71 6 ON 6645 0700 G/ 6646 0320;42,v TEXT;CP 6647 2350 S ( 6650 0131 AY 6651 6261 21 6652 7151 9 ) 6653 0000; 6654 11 6 M3, TEXT /IuN 6655 260 1 VA 6656 1411 LI 6657 0440 D 6660 0317 CO 6661 1 51 5?MM

117 5.6 PAGE 40 6662 0116 AN 6663 0400 0/ 6664 0317 M4, TEXT /CO 666 5 1 51 5 NlM 66666 011 6 AN 6667 0440 0 6670 1 61 7 N 0 6671 2440 T 6672 3105 YE 6 673 2440 T 6674 1115 IM 6675 201 4 PL 6676 051 5 EIM 6677 516 EN 6 700 240 5 TE 6 701 0400 D/ 6702 4240 MS., TEXT /" 6703 1617 INO 6704'2440 T 6705 0140 A 6706 2317 SO 6707 2522 UR 6710 0305 CE 6711 4006 F 6712 1 114 IL 671 3 0500 E/ 6714 4200 M6, TEXT /"/ 6715 4240 M7, TEXT /" 6716 0417 DO 6717 0523 ES 6720 4016 N 6721 1 724 OT 6722 4005 E 6723 3011 XI 6724 2324 -S 6725 0000 / 6726 0516 M8 TEXT /EN 6727 2405 TE 6730 22 40 R 6731 220 5 RE 6732 201 4 PL 6733 0103 AC 6734 0515 EM 6735 0516 EN 6736 2440 T 6737 1601 NA 6 740 1 505 NES E 6741 4017 0 6742 2240 R 6743 7403 <C 6744 2276 R> 6745 0000 / 674t6 2417 M9, TIXT /TO 6747 1 740 0 6750 0605 FE

11.8~ 5. 6 PAGE 416751 2740 W 6752 1720 OP 6753 0522 ER 6754 0116 AN 675.5 0423 DS 6756 0000 / 6757 1116 i10, TEXT /IN 6760 2601 VA 6761 1411 LI 6762 0440 D 6763 0611 Fl 6764 1405 LE 6765 4016 N 6766 0115 AMNI 6767 0500 E/ 6770 0611 M411. TEXT /FI 6771 1 405 LE 6772 4023 S 6773 1017 HO 6774 2514 UL 6775 04410 D 6776 1617 NO 6777 2440 T 7000 0205 BE 7001 4004 D 7002 0 523 ES 7003 2422 TR 7004 1731 OY 7005 0504 ED 7006 0000 / 7007 1617 M12, "TEXT /TNO 7010 4022 R 7011 1717 00 7012 1540 N 7013 1405 LE 70 14 0624 FT 7015 4017 0 7016 1640 N 7017 2401 TA 7020 2005 PE 7021 0000 / 7022 2205 M13, TEXT /RE 7023 2014 PL 7024 0103 AC 7025 0577 E? 7026 0000 / 7027 0611 M 14, TEX T /FI 7030 1 405 LE 7031 4003 C 7032 0116 IAN 7033 161i7'NO 7034 2440 T 7035 0205 B 1E 7036 4004 D 7037 0523 ES

119 5.6 PAGE 42 7040 2422 TR 7041 1731 OY 7042 0504 ED 7043 0000 / 7044 0611 MI5, TEXT /FI 7045 140 5 LE 7046 4004 D 7047 1705 OE 70 50 2340 S 7051 1617 NO 7052 2440 T 7053 0530 EX 7054 1123 IS 7055 2400 T/ 7056 1116 M16., TEXT /IN 7057 2601 VA 7060 1411 LI 7061 0440 D 7062 1720 OP 7063 0522 E.R 7064 0116 AN 7065 0400 D/ 7066 2516 M17, TEXT /UN 7067 1124 IT 7070 4000 / 7071 4543 M18s TEXT /%# 7072 7505 =E 7073 1604 NO 7074 4017 0 7075 0640 F 7076 0611 FI 7077 1405 LE 7100 0000 / 7101 4240 M19.v TEXT /" 7102 1617 NO0 7103 2440 T 7104 0140 A 7105 0317 CO 7106 2205 RE 7107 4011 I 7110 1501 l A 71 l 0705 GE 7112 0000 / 7113 1114 >1 20, TEXT; IL 7114 1405 LE 7115 0701 GA 7116 1440 L 7117 1157 I/ 7120 1740 0 7121 2516 UN 7122 112/4 IT 7123 4016 N4 7124 1756 O. 71 i 25 0000; 7126 1115 M21, TEXT ItM

120 5.6 PAGE 43 7127 201 4 PL 71 30 1103 IC 7131 1124 IT 7132 4011 I 71 33 571 7 /0 7134 5520 -P 7135 0122 AR 7136 0115 AH 7137 0524 ET 7140 0522 ER 71 41 4023 S 7142 3116 YN 71 43 2401 TA 71 44 3040 X 7145 0201 3A 7 1 46 O400D; 7147 4240 M22, TEXT /" 7150 0201 BA 7151 0440 D 7152 5540 - 7153 0411 DI 7154 2205 RE 7155 0324 CT 7156 1117 IO 7 1 57 i 640 N 71 60 1706 OF 7161 4004 D 7162 0124 AT 7163 0140 A 7164 2422 TR 7165 0116 A N 7166 2306 SF 7167 0522 ER 7170 0000 / 7171 2417 M23v TEXT /TO 7172 1740 0 7173 1501 IA 7174 1631 NY 7175 4003 C 7176 1716 OIN 7177 0301 CA 7200 2 405 T' E 7201 1601 iNA 7202 2405'rF 7203 0440 I 7204 0611 FI 7205 1 405 LE 7206 2300 S/ 7207 0231 424, T EXT; BY 7210 0545 E% 7211 4343 4## 7212 4343 ## 7213 0000; 7214 2401 M2s5 TEX;TA 7215 S2005 PE

121 5. 6 PAGE 44 721 6 4005 7217 2222 RR 7220 1 722 0,R 7221 4017 0 7222 0303 CC 7223 2522 UR 7224 2205 RE 7225 0440 D 7226 1116 IN 7227 4001 A 7230 0217 BO 7231 2605 VE 7232 4017 0 7233 2005 PE 7234 2201 RA 7235 2411 TI 7236 1716 ON 7237 5440. 7240 2711 WI 7241 1 41 4 LL 7242 4001 A. 7243 2424 TT 7244 0515 EM 7245 20324 PT 7246 4024 T,7247 1740 0 7250 0717 GO 7251 4017 0 7252 1600 N; 7253 1116 E. TEXT /IN 7254 2601 Vl A 7255 1411 LI 7256 0440 D 7257 2331 SY 7260 2315 St-1 7261 2307 SG 7262 0000 / PAGE

MACRO08 ASISEM3LER (AN229) 122 5, 6 PAGE 01 FI ELD I /PAGE ZERO Ii t3ANK 1 - CPS /NO'[E lTHATr THIS PAGE IS A COMl10ON DATA /SEC I'IO FOR ALL OJri INES IN dANK 1 /LOCNS 1 O- 1 7 USED FOR SCiA rCH &AX /LOCNS 20-37 dSED rO dUILD FILE NAMES, /VTOCS AND THE LIKE /LOCNS 45 & 46 USED FOR TAPE ROUTINE ADCONS —— 23 *45 0045 1000 1000 /riSTAP 0046 1005 1005 /,4RSTAP 8Z *100 0 100 6203 CIFLD, CIF COF /USED TO SAVE RETRiN FLD 010 1 0000 AVTOC, 0 0 102 0000 AFFB, 0 0103 0000 AN3LK<S, 0 0104 0000 BVTOC, 0 0 105 0000 OJVTOCP 0 0 106 0000 DEOvCO 0 0107 2000 AfdLp 2030 /VTOC CORE A0DD s/ i 1 O 4000 40 00 / - _ 011 1 0000 MRF EmP, 0 0112 0400 8TtdL, 400 /VTOC TAPE ADL)RS-/-/.,_ 0113 0170 170 0114 0000 TENMP, 0 O I 1 4 000)O i Tiloli 0115 t0000 9PKDEST 0U 0116 0000 PKSLKSP 0 0117 0000 PKSOUdR 0 0120 1037 AIGADUV, GAdUV / 0121 1230 AREl RTA EL..T A /A, EL T'A 0122 0000 NENT r 0. PAGE

123 5.6 PAGE 02 *200 /MACRO FOR SAVING REFUiRN FIELD DEFINE SAVR[N SAVLDUM <TAD CIFLO ROF OCA SAVDOM> /GETFD - GET FILE Ot< DEVICE. ROUTINE /RETURNS A FCS OR DOC POINTER FOR THE /FD WHOSE NAiME IS IN 10020- 10023 IN $~.-_#/ /STANDARD FO~RM. IF THE FD UOES NOT /EXIST, AN APPROPRIATE RETURN IS MADE...e //SINCE ALL CONiTiOL BLOCKS ARE IN MEMFLO 1 *, /ONLY rHE LOW ORDER 12 tI TS OF THE P'TR /ARE RETRJNED. RETURNED /IN ADDITIO N TO USER FILES, THE FOLLOWING /DEVICES AND PSEtlOFILES ARE SUPPORTED: / RiUR /33ASk /.3r L2 A 4eC / /Pri /3T ri 3:3/ 0200 0000 GETFL, 0 0201 7200 CLA 0202 1100 SAVRTN FDRTrNO 0203 621 4 020 4 3232 0205 6211 CDF 10 0206 3000 DCA 0 /ScrVTOC OF UNI T 0 0207 4777 JMS SRCHVTOG 0210 5232 JMP FDRTNO /FILE FOUND 0211 7231 CLA IAG /SRCHVTOC OF UNIT 1 0212 3000 OCA 0 0213 4777 JMS SRCHVTOC 0214 5232 JMP FORTNO /FILE FOUND 0215 7200 CLA /IF NOT A FILE, THEN SET 0216 1376 TAD (-NDEVS /UP FOR SEARCHING (1217 3106 DCA ODVC[T /DEVICES. 0220 1 375 TAD ( EV 3L 0221 3224 OCA.+3 0222 1374 DEVLK, TAD (4 / 0223 4773 JMS CL /,, 0224 0245 DEVADRI i)t' L /CHANGES 4/ DEVICE 0225 )020 0020 /NAME IS HERE 0226 6211 CUF 10 /ALL IN t3AN K 1 0227 5234 JMP rESTAGN /NOT FOUND 0230 7200 CLA /FOUND; RETUiRN PTiR 0231 1224 TAD DEVADR 0232 7402 FDRTN,0 H "LT /REP GY CIDF 0)233 5600 EXIT GE I'FO 0234 2106 TES FAGN, IS ODEVCTR / FESIED ALL DEVICES? 0235 5240 JJMP.+3 /N(O 0 236 2200 I SZ GETFD /YES. RETURN 2t r4ddA2' _/.-i~ -.. ~d. 0231 5232 JMP FOR RTO 0240 7200 CLA

124 5.6 PAGE 03 0241 1224 TRA OEVADRi/UPoATE DEVICE ADRt 0 242 1372 TAD (10 0243 3224 DCA DEVADR 0244 5222 JMP DEVLK / o NDEVS=3 /AS OF 12/14/68 0245 2204 DEVTBL, TEXT /RD 0246 2240 R 0247 40 40 0250 4040 0251 0000 / *.-1 0251 7775 -3 /READER CODE 0252 5000 5000 /00N'T fOUCHSOURCE FILE 0253 0200 0200 /ASCII CHARACTERS 0254 0000 0000 0255 2024 TEXT /PT 0256 2240 R 0257 4040 0 260 40 40 0261 0000 / 0261 7776 -2 /PTR CODE 0262 3000 3000 /DtON'Tr'OUCH, SINK FILE 0263 0200 0200 /ASCII. CHrY ACTER4 0264 0000 0000 0265 5204 TEXT /*0 0266:'515 UM 0267 1531 MY 0270 5240 * 0271 0000 / *. -1 0271 7777 -1 /*DJMMY0* CODE 0272 7000 7000 /DON'T TOUJCH, EITIHER SOURCE OR ZSINK 0273 7700 7700 /CONTAINS AiNYTHING 0274 0000 0000 / /MAKFIL - ROUTINE TO CREATE A FILE EN lRY /IN A VTOG. WHEN CALLED, A PARTIlAL VTOC /MUST tE IN L)OGS 10020-10027 (ALL XcEP r /FIRST BLK MUST tE FILLED IN). JNI~ dUPON /WHICH FILE IS TO BE VIADE IS INi 10000. 0275 0000 MAKFIL, 0 0276 7200 CLA 0277 1100 SA VRT\N /Kr: Tlo 0300 6214 / 0 301 3353 0302 6211 CUF 10 0303 47711 JMS GAd2V/ N ry 7 c-do 0304 1101 tAD AVIOC 0305 7001 l AC /Pr Ti TO # OF EN FRi ES 0306 3111 ICGA RiTE;MP

125 5.6 PAGE 04 0307 1 511 TAt) I MtTEMP /GET # OF ENTRIES 0310 1370 TAD (1 76 /NtOOM LEFT? 0311 7710 SPA CLA 0312 5352 JMP,v'KRiTN! /NO R00M 0313 1025 TAD 25 /GET # OF aLK<S NEEDED fr*? (/ 7P RdC1r7' 031 4 0367 AND (377 /MASK OFF SWI'fCHES 0315 3001 DCA I /FOR GETTAP 0316 4766 JJMS GETTAP /GET SPACE FOR FILE 0317 7410 S.Ki /GOT SPACE 0320 5352 JMP MlKRi T'l /ijO r0OOiO1 0321 3010 )CA 10 /SAVE dEGIANINIG dLK# 0322 1000 TAD 0 /EaTER I r INrTO dSER-S VTOC CB23 7112 RTi CLL 0324 1010 TAL) 10 0325 3024 G)CA 24 /dUSErS VIOC COMPLETE' 0326 7240 CLA CMA 0327 151 TAD I rITEIMP /INCRt # OF EN'IiI ES 0330 3511 OCA I MHrTEMP 0331 1511 TAD I Ml'irTEiMP /SETUP TO ADD ENTRY 0 332 7041 CIA /[T0 VTOC 0333 7106 iRTL CLL 0334 700 4 tAL /MJLT dY 8 0335 1101 TAd AVTOC /THIS IS WHERE ENrRtY GOES 0336.1365 TAD (-1 0337 3010 OCA 10 /SINK ADtR 0340 1364 TAD (17 0341 3011 tCA 11 0342 1363 TAO (-10 /C OdtNT 0343 3012 DCA 12 0344 1411 TAd I 11 /lMOV1E 8 WORDS 0345 341J OCA I 10 0346 2012 ISZ 12 0347 5344 JMP.0-3 0350 4762 JMS WJVTOC /RlrTE OUlr CHA.NG EO VTOC 0 351 7410 SKt 0352 2275 4iRTi'N1 IS Z MAKFIL 0353 740)2 MlKT.JO, HLT /,<EP d8 CIDF 0354 5675 EXIT MAKFIL 0362 1270 PAGE 0363 7770 0364 0017 0365 7777 0 366 1 200 0367 037 7 0370 0176 0371 1037 0372 0010 0373 1124 0374 0004 0375 0245 0 376 7775 0377 1000

126 5. 6 PAGE 05 /CO;'PRiESrS - SLJEEZES CHARACTES FROt 1 TO 2 /Pt&R WRo. GNC /12/1 2/68 0 400 0000 C 13 APRE.SS, 0 401 1 70 41 Cl1 /SAVE -N AC 0 40'2 3012 0C.4 tN 0403 7'240 CLA CitA 0 404 1600 TAD I COMPRESS 0405 3010 DCA 10 /SOi0C LIS A 0406 2200 IS COMp.PRESS 0 40 7 7240 CMA CLA 041 1 600 T4 I Co0PrESS 0411 3011 0CA 11 /SIiK LIST AU, R A4 X 0412 2203J Is Z CONPES5S 0 41 3 1 6)00 T I CC/4PN:rSZ /G"ET OOF g/,Zd. _ /ed 0 41 4 3222 OiCA COM4CF'041 S 2200 ISZ COmPirESS 0416 1100 S AV r T COi RTN 0417 6214 /c e 2 0420 3235 0421 3013 0)CA RS 4 Jt Z3,0-~ dc 0422'7402 CO 4Cl)FC, HLT /rkEiP t3Y CDFdY.-,e ~/ UD F 0423 1410 / I 0424 3014 0CA T Nt,/ ~ e 0425 1014 TAL) TEMV; 0426 1 3 7 7 TAD (-240/ t - 0427 7650 SNJA CLA 0430 5237 J.VP B LAN:KS/ 0431 1014 YfA T1P / P 0432 4244 JlS STUFF 0433 201 2 IS1 N /.ca xtc,~'u-? 0434 5223 JaPiP COOCO)F+I j/) 0435 743 2 C00CTia, i HLT /r iEi d3Y CI)F A -n~./~AfZ/ 0436 5600 tX I T COMPrE SS /..~' cv2_.. -.. 0437 1376 t3LAN\!)< S TA0 (24),, 4tr cc 0440 4244 JI'S S rJFF 7 0441 20 1 2 ISL N / c- cA /Y?7 IA 7 0442 52337 JRP BL4ANKS / /o-f 8 L.A.N. 0443 523 5 J M C 0:tTN / G'T i.t.. 0 444 00)30 S rUFF, 0 /c- p e/ / 0445 0375 ANJ (77 0446 2013 IS zSi / k sPg/ or-r _ &.4f<Zj -/o$i 0447 5253 J1AR LEFT / 0450 10o5 s:IG;Tv TaD o o/,,_ 40zo 0451 3411 UC0 I 11;$ 0452 5644 EX IT STUJFF 0453 71 ) 6 LEFTs CLL t TL 0 454 70 O6 ti- FL 0455 70036 RTL 0456 301S 0)CA 1t0LL) /CA, tLD 0457 70410 CA0460 301 3 0)CA RS 0461 5644 EK I IT STFF /

127 5. 6 PAGE 06 N= 12 RSiW=13 /CddrJPWY TEMP= 1 4 HOLD= 1 5 /DESTRY - DESTROY A FILE; CALL W/ f -B P~I /IN AG. / 0 462 0000 DESTRY, 0 0463 3114 OCA NTEM/. F~ 0464 1 100 SAVrTIN 0Y~Tq/N 0465 6214 6 0 466 3363 0467 6211 COF 10 /' 0470 1114 TAD iTEiP/ 0471 0374 ANDO (4009/,Zi /r0472 7640 SZA CLA / 0473 7001 IAC / GC. - fi 0474 30000 DCA /, t,,.,z~ x o Z., u' 0475 4520 CALL AGAd3UV/ CALt(VA Al4 a t l /~rTC 0476 1101 TAD AVTOC / C t 0477 7001 IAC 4. 4AG,2o -,,~ 05 00 3111 ICA MRTEMP 0501 1 51 1 TAD I iArTEMP / 0 502 7001 I AC / 0503 3511 OCA I M-i'E1P /f# OF FILES DECREASED BY 1 0 SO 4 1 1 1 4 TL) AR i t:kic 0505 1373 TAD (3 0506 3010 OCA 10 0507 1410 TAD I 10 /GET F8 IX/ FILE h-2 0510 0372 AND (1 77 7 / — o,. 0511 3002 OCA 2 /SAVE FOR "ELTAR CALL 0512 1410 TAD I 10 /# OF BLKS IN FILE 0513 0371 AND (377 / — 7 0 51 4 3001 DCA 1 /ALSO F'/Or RELTaP 0515 4521 CALL ARELTAP /FREE TAPEi.n.r-ec Z/./{k<e — c i 0516 7240 CLA CGlA // To 0 51 7 1 1 1 4 TA.D rfl/ t' M:'' 0 520 3011 )CA 11 /L)ESTINA'FION A0R. FO R DELETING 0 521 2010 IoZ 10 o,,fXc,,r,2.0 522 2010 S Z 10 fSORCE ADdr "1,/r..A,,"i.'1.z 0523 1101 TAD AVrOCG OS24 1370 TAD) (10 / ~ol -, 0525 7041 CIA 4 0 526 1114 TAO) 1r' 1-/ Te~- / - i./TC9'-, tC~.., O 52 7 7 1 2 RTR CLL / ct <r~ Fo- g E 0 530 7110 t AR CLL 0O531 1 51 TAD I MR']TE'IP 0532 3012 )CA 12 0533 1012 TAD 12 /NEG OF # OF ENTRIEiS TO MOVE 0534 7650 SN.\A CL.4 iAvee,>eW,< n ba'v/ 0535 5362 JMP L)YFN-1 /,,o 0536 10 01 TAr I/.-, 0537 7041 CIA / ort 0540 3001 DCA 1 /~tEG OF # OF BLKS RELEASED

128 5.6 PAGE 07 0 541 1 367 M.OVTOC, TAD ( -4/ A, )3 a, o 542 301 3 UCA 1 3 0o 543 1 41 U'AD) 1 l10 /MOVE FILEN AME,', -2'. 0 544 3411 VCA I 11 0545 2013 ISZ 13 0546 5343 JMP.-3 0547 1410 TAD I 10 /OLD FILE ADDR 0550 1001 TAD 1 /- # OF BLKS RELEASED 0551 3411 DCA I 11 /=fNEWJ FILE AD))ESS 0552 1410 TAO I 10 0553 3411 OCA I 11 0554 1410 TAD I 10 0555 3411 DCA I 1 0556 1410 TAD L 10 0557 3411 OCA I 11/ 0560 2012 ISZ 12 /1c2-. 0 561 5341 JMP M0 VTOC/- "4 0562 4766 JMS IJT'l CV-l 0563 7402 VYRN, kHLT /RER E Y CIF) Y IF t < 0564 5662 EXIT DES TRY r bRi C-dy, 0566 1270 PAGE 0567 7774 0570 0010 0571 0377 0 572 1 777 0573 0003 0574 4000 0575 0077 0576 0240 0577 7540

129 5. 6 PAGE 08 /COMMAND TA.LE - USED BY CLI TO DECODE /USER iCO,4MANOS / COM Tt3L=. /, 0600 0323 SAV, "S L 0 601 0301 "A 0602 0326 "V 3- C -te 0 603 4000 SAVE 0604 0304 DES, "0 3 AScX —.- A, <z. 0605 0305 "Ek 0 606 0323 "S,,'d 0 607 3600 DESTROY C —t 0610 031 1IND, "I 0611 0316 "N -' 0612 0304 "D. c.', 0 613 3400 INDEX / 0614 0320 PUNT, "P; 061 S5 0325 "U 061 6 0316 "N 061 7 3335 NOiTYi T 0620 031 4 LOA, "L 0621 0317 "0 0 622 0301 "A 0623 6400 LOAD 0 624 0322 dRdN, ";0625 0325 "tJ 0626 0316 "N 0 627 5000 PRi UN 0 630 0303 CON, "C 0631 0317 "O 0632 0315 "t 0633 3342 COMMENT 0634 0323 SET, "S0 0635 0305 "E 0636 0324 "T 0637 3335 NOTYET 0 641) 0323 SSI G, "S 0641 0311 "I 0642 0307 "G 0 643 6000 SI GNOFF 0644 4000 E. / ENDA= 4000. H cZ de' PAGE

130 5.6 PAGE 09 /.VTOC SEARCHING iOlTINgE - NIT IN LOC /10000) STA l'Ari*) FORM FILE NAiME IN /10020 - 100235 /.ej -/.c_ / 1000 0000 SRCHaVTUC, o 1001 7200 CL.A 1002 1100 SAVRTN SCRTN0 1003 6214 1004 3232 - taZ{1005 6211 COF 10 1006 4237 J4S G-,ABUV /t 1007 1101 TAD AVTOC b /;7N 1010 3010 OCA 10 n X 1011 1410 FAD I 10 /GET # OF FEIL EINTriIES 1012 3122 D)CA aE:JT / E.N —T 1013 1101 TAD AVT11OC /Vj'iyg C,1D A 4t1o S g-/Z3 1014 1377 VTOCLK, TAD (10 1015 3220 D)CA i'NTADR 1016 1376 TAD (4 1017 4324 JMS CL 1020 0000 NTADRo, 0 /0AD OF V roc E NTRY 1021 0020 0020 /FNAMyIE IS HE*RE 1022 6211 CDF 10 /O0TH IN FLD 1 1023 5227 J.ItP TRYAG /UNEUAL 1024 7200 CLA /FOUdN 1025 1220 TAD ENTA0D,/yj - DF- /rdA c 1026 5232 JMP SCRTNO 1027 2122 TRHYAG ISZ N E N'T 1', 7,Z 1030 5234 JMP.+4 //Jo 1031 2200 ISZ SRCHVTOC /FILE NOT FOUND 1032 7402 SCRTNO, HrLT /HREP tY CDF QFZ'.;./et4,fp 1033 5600 EX I T SRCHVQTOC /~ e -. m.L~ 1034 7200 CLA i1035 1220 TAD ENITADR 1036 5214 JMP VTOCLK /GAUV - GET ADR, t3LK,.ANO UNIT OF A VTOC /SUJITA3LE FOHt TAPE'Wlil TING. GNC ~/ ev A+ >g 6,H ) A /c 1037 0000 GAiBU3V 0 1040 7200 CLA 4?i1 1041 1 100 SAViHTN GVt<fi 1042 6214 - W t_ & 1 043 3265 1044 6211 COF 10 1045 7201 CLA IAC 1046 0000 AN) 0 1047 3,007 oCA 7 / 1050 1007 TAL) 7 1051 1 375 TA. D (A T i6L /?y a-v 9 } f 1052 3101 DCA AV'iOC / - a 1 053 1 501 TAD I' A'.IT0 10S4 3101 DCA AVTOC 10 5 s 1007 TAD 7 1056 1374 TAD (tL / t3L,'..J A 7,JLkie,]'

131 5. 6 PAGE 10 1057 3104 DCA 3VTOC 1061 3104 OCA 3VTOC 1062 1007 TAD 7 1 06'3 1 377 TAD (10 /MEMFLD I, r 1064 3105 OCA UVTOC 1 } -aS /7 -4 J 1065 7402 GVRTN, HLT /REP BY COF 1066 5637 EXIT GAtUV /ROUTINE TO SCAN FOR THE NEXT OPERAND IN /AiN INPUT STIING, ASSiJMES OPERAND PTR /IS IN LOC 0105 i-,8 * / el 1067 0000 OPSCAN, 0 1070 7240 CLA CMA 1071 1773 TAD I (105 O 1072 3010 O)CA 10 /AL).R OF STRIi 1073 1100 SAVRoN ON ONRTNO 1074 6214 1 075 3322 1076 6211 CDF 10 /.z-, zf 1077 1410 3LOOiKs TA D I 10 /, A.9,, /.,k /~'- 4 ffe, 1100 3014 OCA 14 /-,. S 1101 1014 TADV 14 /A, 1102 7450 SNA 1103 5321 JMP ON RET4/y1 - 4_ eaC+ 1 0 4 1372 TAD (-2 40 /, _ /_ ~. -4,7 1105 7640 SZA CLA / 1106 5277 JMP B3LOOK -t 1107 1410 FN)D, TAD I I 4Oc4 1110 7450 SNA O/ 1111 5321 JMP ONRET / 1112 1372 TAD (-240 /,,,, -- 1 113 7650 SNA CLA I114 5307 JMP 8FND / 1 1010 TD 1 6 S? 1116 6201 CDF 00 7 1 1 7 3773 OCA 1 (105 1120 7410 SKP I 121 2267 ONtETT1l ISZ OPSCAN /Mt t~es2.-t, 1122 7402 ONRTNO, HLT /REP BY CIDF 1123 5667 EXIT OPSCAN /CLW - COMiPARE LOGICAL WOR DS, IN WHICH WE /AGAIN PROVE THAT ONE NEED NOT INCLUDE AN /INSTRUCTION IF ONE CAN PROVIDE A SUB/ROUTIN'E TO DO THE SAME THING. GNC 1124 0000 CLWv O / tej e/ f l g tl c Av 4C 1 12 5 7041 CIA -viC -A/ ~c ~i<TfX m 1126 3012 OCA LENGTH'r 1 127 7240 CLA CMA 1130 1724 TAD I CLWI 1131 3010 DCA 10 /ADar OF LIST I /,../~ /~. 1132 2324 1SZ CLW

132 5.6 PAGE 11 1 133 7240 CLA CMA 1134 1724 TAD I CLW 1135 3011 DCA 11 /AtH OF LIST 2 tAX // 1136 2324 ISZ CLW 1137 1724 TAD I CLW 1140 3345 OCA CLWCDF MEMFLD OF LISTS -- 1141 2324 ISZ CLW /~ tL - 1142 1100 SAVITN CLAJ.RT6 Ci I 1 43 621 4 / L Ae' 1144 3356 1145 7402 CLWCDF, HLT /REP dY CDFw te% TL a 2J 1146 1410 TAD L 10 / 1147 7041 CIA / 7' 1150 1411 TAd I 11 1 151 7640 S7ZA CLA 1152 5356 JMP CL & i-9vti tIXrS. -f'2 gC- 1t X L/L 1 153 2012 ISZ LENGTH 1154 5346 JMP CLWCDF+l J 1155 2324 ISZ CLW E" Z1156 7402 CLWRtTNi HLT /liEP 6Y CIDF 1157 5724 EXIT CLW / LENGTH=1 2 1172 7540 PAGE 1173 0105 1174 0112 1175 0107 1176 0004 1177 0010

133 5.6 PAGE 12 /GETTAP - ROUTINE TO ACQUIRtE TAPE SPACE /FOri A FILE. CALL WITH UNITr IN LOC 10000 AND # OF /BLOCKS ON 10001. GNC 1200' 0000 GETTAPr 0 1201 4520 CALL AGAdUV l e z 1202 1101 FAD AVTOC / 1 203 1377 FAD (2 / / 1204 3102 C.A AFFd /ADr OF /STf FiREE BLKd TC 1205 1102 TAD AFFt / 1206'7001 IAC I, 1207 3103 DCA ANt3LS /ADtR OF # OF FREE BLKS 1210 1001 TAD 1 a z-ok 1211 7041 CIA' 1212 1503 TAD I ANB3LKS A C. 1213 7510 SPA /, 1214 5225 JMP GPRET1 / / -a. f2 1 21 5 3503 DCA I AN3LKS /GOOD - ENlJF ROOM. 1216 1502 TAD I AFFt /SAVE FF3 FOR aUSER 1217 3007 DCA 7 /-4 ot-7 1220 1007 TAD 7 /FFB3# 1221 1001 rAD 1 /+# OF 3LKas ALLOCATED 1222 3502 DCA I AFF8 /= NEW FFd 1223 1007 TAO 7 /RET dLK# TO USER 1224 5600 EXIT GETTAP 1225 2200 GPREl. IS7Z GETTAP 1226 5600 ExITr GETrAP /RELEASE fAPE- DEALLOCATE TAPE SPACE AND PACK /UP THE TAPE. UNIT IN 10000. # OF RETURNED /BLKS IN 10001, i3LK #VIN 100J2. GNG *.+10&7770 1230 0000 ~L'TAP, 0 1231 4520 CALL AG.AdUV v7Co c e 1232 1101 TAD AVTOC i 1233 1377 TAD (2 / a' 1 234 3102 DCA FFE/ -A vF.Tt 1235 1102 TAD AFFd 1236 7001 IAC ] 1237 3103 DCA ANdLKS SAE AS ABOVE i E AE 1 240 1001 TAD 1 /COiMPUTE. PACK<IPG I,-FOia'Ti,c,o 1241 1002 TAD 2 /FOR PACK tiOUTINE 1242 7041 CIA 1243 1502 TAD I AFFH 1244 3116 DCA PK83LKS /# OF BLKS TO BE MOVED 1245 1002 FAD 2 1246 3115 OCA PKDOESF /TO HERE YF) e-') 1247 1001 FAD I / 7I 1250 1002 fTA 2 1251 3117 )CA P7SOUtJ /FI0M ErIE szrdc 99 1 2 52 1 00) 1 TAD 1 / PO ATE VTTOC,~, 4r,. 1253 70341 CIA 1254 1502 TAD I AFFB / /d/''-/ 0 1 255 3502 OC.A I AFFd/

134 5. 6 PAGE 13 1256 1001 TAD 1 1 257 1 503 TA) I ANI3LK 1260 3503 DCA I AN3LKS 1261 1116 TAD PK8LK$/' 1 262 7650 SNA CLA 1263 5630 EX I T ELTAP /NO NEED TO PACK 1264 6202 CIF 00 1265 4776 JMS PACK /OTHER-4ISE PACK uP rAPE 1266 5630 EXIT RELTAP / /WVTOC - WRITE OJT A VTOC.AFTER M1.ODIFICATION. * 3. +10&77 70 1270 0000 Wt V'o3 0 1271 7200 CLA 1272 1100 SAVRTN WVRTN - 1273 621 4 1274 3313 1275 6211 COF 10 1276 4520 CALL AGA3JV/IeCt tela a4e 0 1277 1101 TAD AVTOC 1300 3312 DCA VCORAD /AOR OF VTOC IN CORE 1301 1105 TAD UVTOC /GET UNIT WE'RE SUPPOSED TO WRITE ON 1 302 7110 CLL RAR /FOR TAPE CALLING SEo 4-0 1303 7210 CLA RAR /UdJIT IN tBIT 0 304 1104 TAD TCV'T(o/=1) / v /TCO -r 1 305 3310 DCA TPJILK 1 306 6202 CIF 09 /CALL TAPE ROUTINE IN FLD 0 130 7 4446 tW,,RSTAP 1310 0000 TPU83LK, 0 /VTOCG UNIT & BLK# 1311 6010 FLO1+CHECK+10 1 312 0000 VCOiRAD), 0 1313 7402 WVRTN, HLT /IREP BY CIFD 1314 5670 EXIT WVTOC 1376 2115 PAGE 1 377 0002

135 5. 6 /PAGES 12000 AS'ND 14000 - /IiqITII.L VTOC Jf;i TRIES *2000 2000' 0000 0 2001 7775 -3 /3 INITIAL ENTRIES 2002 0500 500 /FIRST FREE 3LK 2003 1300 1300 /# OF 3tlKS FREE 200 4 0000) 0 2005 0000 0 2006 0000 0 2007 0000 0 2010 5523 TEXT /-S 201 1 40 40 2012 40 40 2013 4040 201 4 0000 2014 0100 100 2015 7010 7010 201 6 4000 4000 2017 0000 0 2020 5226 TEXT /* V 2021 2417 TO 2022 0360 C0 2023 40 40 2024 0000 / 2024 0400 400 /LOCN 2025 5010 5010 /I.ENTIG'FH 2026 0100 100 2027 0000 0 2030 5223 TEXT /*S 2031 2624 VT 2032 1703 OC 2033 6040 0 2034 0000 / 2034 0470 470 2035 501 0 5010 2036 0100 100 2037 OOOU 0. 4000 400t0 000 0 4001 7767 -11 /9 N I T ITIAL tT-I ES 4002 0612 612 /FIrST Ft — t3_K z4 003 1166 11 66 /3L6SL6i FT 1004, 0000 0) 40 05 0000 0 4006 0000 0 4007 000 0 4010 5502 TiXT /-: 3 4011 40 40 401;2 4 404 4013 40 40

136 5.6 401 4 0000 / 4014 4100 4100 401 5 7004 7004 401i 6 0400 400 401 7 ~ 0000 0 4020 5223 T;ZXT /*S 4021 2624 VT 4022. 1703 OC 4023 6140 1 4024 0000 / *. -1 40224 4160 4160 4025 5010 5010 4026 0100 100 4027 0000 0 4030 5226 TEXT /*V 4031 2417 TO 4032 0361 Cl 4033 40 40 4034 0000 / 4034 4170 4170 4035 5010 5010 4036 01 0 100 4037 0000 0 4040 5201 TEXT /*A 4041 1417 LO 4042 01004 AD 4043 0 5$22 ER 4044 0000 / 4044 42/40 4240 4045 5020 5020 4046 0100 100 4047 0000 0 4050 5222 TEXT /*R 405t 1417 LO 4052 0104 AO 4053 05t22 ER 40 154 O i30 / e. -1 40 54 4260) 4260 4055 50 4 50i 4 4056 010)0 100 40 57 0000) 0 4060 5205 TEXT /*E 4061 0r440 0 40 62 40) 40 Z063 40 40 4064 0000 / 4064 4320 4320 4065 401 4 401 4 4066t 0400 400) 4067 0000 0

137 5. 6 4070 5201 TEXT /*A 4071 231 5 S1 40 72 /140. 4073 4040 4074 0000 / 4074 4334 4334 4075 4060 4060 4076 0400 0400 4077 0000 0 4100 5206 TEXT /*F 4101 1722 OR 4102 2422 TR 4103 0116 zA',N, 4104 0000 / 4104 4414 4414 4105 4077 40377 4106 0400 0400 4107 0000 0 4110 5223 TEXT /*S 4111 0102 AB 41i2 2240 R 411 3 40 40 4114 0000 / 4114 4513 4513 4115 4077 40 77 4116 0400 0400 4117 0000 0

CHAPTER 6 IOCS3 - THE I/O CONTROL SYSTEM FOR CPS CONTENTS PREFACE...................... e. 139 6.1 INTRODUCTION............. 140 6.2 CONCEPTS AND FACILITIES......... 140 6.3 REQUIREMENTS................... 142 6.4 USE OF IOCS3....................... 143 6.4.1 Conventions........ e.,..... 143 6.4.2 System Level Routines......... 144 6.4.2. 1 Protocol................ 144 6.4.2.2 Calling Sequences........ 145 6.4.3 33ASR Routines............... 145 6.4.3. 1 Protocol................... 145 6.4.3.2 Calling Sequences......... 147 6.4. 4 Magnetic Tape Routines....... 148 6.4.4.1 Protocol..,.......... 148 6.4.4.2 Calling Sequences....... 152 6.4.4.3 Useful Tape Mnemonics..... 154 6.4.5 Useful Locations on Page Zero........... 155 6.4.6 I/O Symbol Table Listing...................... 159 6.5 PROGRAM LISTING... o.............. 159 138

139 Preface This chapter is intended for use as a reference for IOCS3 as well as an introduction to its use as a standard I/O package on the Cooley Electronics Laboratory LINC- 8. IOCS3 is the most complex in a line of standardized I/O controllers written for use on the CEL LINC-8, but is easy to use from the user's viewpoint. The program specifications given herein are subject to change at any time as ways are found to improve the package. IOCS3 is the third version of a comprehensive I/O system for the LINC-8 to be written at CEL, and is the first to do all operations under interrupts. The teleprinter routines are largely lifted in toto from an earlier controller written by Kurt Metzger (who also commented on the system design). The magnetic tape routines were done largely by the author. IOCS3 does all I/O operations associated with the CPS Control Program. Originally written expressly for this purpose, it has found use in other systems and user programs.

140 6.1 Introduction IOCS3 is an input/output control system program written for the Cooley Electronics Laboratory LINC-8. It provides fully buffered teleprinter and reader/keyboard I/O and automatic magnetic tape operation in a convenient, easy to use package. Using IOCS3, a programmer is freed from the burdens of providing his own I/O routines with their attendant bookeeping and addressing problems, and is free to concentrate on the algorithmic aspects of his program. In addition, he gains the benefits of I/O processing under interrupts. As an example of the ease of use of IOCS3, the program in Fig. 6.1 will read 128 characters from the keyboard and echo them; when the 128th character is read, all 128 characters will be written onto tape drive 1, block 400; the program will halt after all I/O operations are finished. 6.2 Concepts and Facilities IOCS3 is a general purpose I/O system for use with PDP-8 programs run on the LINC- 8 computer. It handles the teleprinter, reader/keyboard, and LINC tapes, which comprise the set of I/O devices necessary for most programs. All data transfers are done concurrently with the execution of the user's program utilizing the program interrupt facility on the PDP-8 processor in the LINC-8. Facilities are provided the user to inquire about the status of various data transfers occurring within the system.

141 *2000 CALL RESET /Initialize I/O system RDROPN / Initialize reader/keyboard TAD (5777 /Set up buffer address DCA 10 TAD (- 200 /Set up loop count DCA 7 LOOP, RDRGET /Get character DCA 6 / Save it TAD 6 PTRPUT /Echo character to printer TAD 6 DCA I 10 /Store char into buffer ISZ 7 / Done yet? JMP LOOP / No WRSTAP /Yes - write tape UNIT1+400 /Unit and blk number FLD0+1 / Mem bank and # of blks 6000 /Memory location PTRCLO /Wait for printer to finish TPWAIT /Wait for tape to finish HLT /All done FIG. 6.1. EXAMPLE PROGRAM

142 Both the teleprinter and reader/keyboard are buffered to allow significant overlap of computation and reading/printing. Up to 32 characters may be queued for printing; up to 32 characters may be read in from the keyboard/reader and held for the user's program until it calls for them. The system is capable of reading or writing up to 1777 (octal) blocks of tape in one operation. Transfers may be into or out of any memory bank and to or from either tape unit. In addition the user may specify that write checking or reading without transmitting is to be done. Provision has been made to operate on tapes marked at either 128 or 256 words per block. 256 word per block tapes are PROGOFOP compatible. A transfer vector of system entry point addresses is provided on page zero as a convenience to the user, and a set of IOCS3-related mnemonics and pseudo-ops has been defined in an I/O symbol table which the programmer may use in assembly code programs to facilitate the use of the system. 6.3 Requirements IOCS3 resides in the following memory locations: 0 through 2, 20 through 77, and 200 through 1377 octal. Memory locations 3 through 17, 100 through 177, and 1400 octal upward are available for the user's programs. Equipment required is a LINC-8 computer with appropriate

143 reader selection modifications which allow the reader flag to be cleared without advancing the reader. (See DECUSCOPE, vol. 6, #5, 1967, p. 24 and vol. 6, #6, 1967, p. 10.) The CEL 8K LINC-8 has been so modified, and memos from Wayne Von Wald and Kurt Metzger documenting this change are available separately. 6.4 Use of IOCS3 6. 4.1 Conventions. There is no provision for memory protection on the PDP- 8, so the user must be careful not to store into the memory locations occupied by IOCS3. In addition, IOCS3 makes the assumption that it has full control over all I/O operations and that the user will not do any I/O himself. Users may turn off interrupts for short periods (less than 70 microseconds or so) in order to do delicate diddling. Any interrupt coming from a source other than the 33ASR or the LINC tapes is (hopefully) ignored. The user is responsible for turning off the interrupt system after he is finished using IOCS3. In order to invoke IOCS3 routines, the user may issue a JMS Indirect through page zero. However, remembering which locations are which is a difficult job at best, so a set of definitions for the assembler, called the I/O SYMBOL TABLE, has been created which allows each specification of the desired I/O operation. For example, a call to RDRGET could be coded as "JMS I 50"; using the I/O SYMBOL TABLE allows the programmer to substitute the string

144 "RDRGET" which is defined inside the symbol table to be a JMS I 50. The calling conventions for the routines are given using the symbols from the I/O SYMBOL TABLE. 6.4.2 System Routines. 6.4.2. 1 Protocol. The system makes extensive use of switches and flags to interlock and keep track of the state of I/O transfer operations. Before using the system to transfer data, these must be set to certain initial values by invoking the system routine RESET. Additionally, since both the reader/keyboard and teleprinter are buffered, it is necessary to reset certain switches and zero out character buffers before doing any I/O on the 33ASR. This operation is referred to as the "opening" of the device in question. The teleprinter is opened when RESET is called. In particular, the RESET routine does the following: I. Clears all device flags. 2. Cleans all characters from the printer buffer and opens the printer. 3. Sets the maximum number of times a tape operation may be attempted to the system default value of 4. 4. Resets the tape routine "IGNORE ERRORS" flag to OFF. 5. Closes the reader. 6. Stops any tape operation in progress and reinitializes the tape routines.

145 7. Clears LINC interrupts and then selects (enables interrupts from) the LINC processor. 8. Sets the tape reading and writing mode to 128 words per block. 9. Turns on the interrupt system. A routine called MANUAL is provided to allow calling of RESET from the PDP-8 console switches. This capability is useful for debugging sessions. 6.4.2.2 Calling Sequences. TO RESET THE I/O SYSTEM CALL RESET return call+1 w/ clear AC and LINK, interrupt system enables. The routine MANUAL may be invoked by starting the PDP- 8 at location 00200 (octal) from the console switches. After the system has been reset, the CPU will stop at location 00201. 6.4. 3 33ASR Routines. 6.4. 3. 1 Protocol. With the thought that a particular application might require shutting off the reader for a while and then restarting it without losing any characters, the reader open routine has been split off as a separate entry point to the system. Thus if any reader/ keyboard input is to be done, the reader open routine, RDROPN, must be called after the system reset routine has been called.

146 Fetching of input characters from the 33ASR may be done by either of two routines. RDRTAG, reader test and get, is used when an immediate return from the reader routine is desired whether a character from the 33ASR is present or not. RDRGET, reader get, is used in case the user wishes to have the reader routines wait until a character is available from the 33ASR before returning. With both routines, the character fetched from the input buffer will be in the PDP-8 accumulator upon return. IOCS3 will shut down the paper tape reader when its internal buffer of 32 characters is full. If characters are input from the keyboard when the input.buffer is full, they will be ignored. At any time, the user may shut down the reader and hold in abeyance any typed character by calling the routine to close the reader, RDRCLO. Note that after the reader has been closed by calling RDRCLO, it can only be used again by reopening it - calling RDROPN. Output to the teleprinter is done by loading the character to be typed into the PDP-8 accumulator and calling upon the printer put routine, PTRPUT. This routine will not return to the caller until that character has been inserted into the output buffer. At any time the user may wait for all characters in the buffer to be typed by calling PTRCLO, printer close. Note that the name PTRCLO is somewhat misleading since it is unnecessary to reopen the printer after calling PTRCLO. The name was chosen to retain both compatability with the rest of the computing world and symmetry with the reader routines.

147 6. 4.3. 2 Calling Sequences. TO OPEN THE READER RDROPN /resets reader switches and flags, starts / reading. return call+1 with clear AC; LINK unchanged across the call. TO GET A CHARACTER FROM THE 33ASR (Two Routines) RDRGET /get a char and don't return until you do. return call+1 with character in AC4-11, ACO-3 clear, and LINK bit unchanged across the call. or RDRTAG / check to see if a char from 33ASR is available. return call+l1 with clear AC, LINK unchanged, if no char available. return call+2 with char in AC4- 11, ACO- 3 clear, LINK unchanged if char was available. TO CLOSE THE READER RDRCLO / shutdown reader, accept no more chars for / input buffer. return call+1 with clear AC, LINK bit unchanged across the call.

148 TO WAIT WHILE TELEPRINTER BUFFER IS CLEARED PTRCLO /wait until all chars in printer buffer have been / typed. return call+1 with clear AC, LINK bit unchanged across the call. TO TYPE A CHARACTER ON THE TELEPRINTER PTRPUT / call with character to be typed in AC4- 11. /AC0-3 ignored. return call+1 with clear AC, LINK bit unchanged across the call. 6.4.4 Magnetic Tape Routines. 6.4.4. 1 Protocol. Transfer of data to and from LINC magnetic tapes may be accomplished by calling the read and write tape select routines, RDSTAP and WRSTAP respectively. The user must provide several parameters to the tape routines such as tape drive desired, block number desired, and the like. (See Calling Sequences, section 6.4.4.2.) The tape routine will make copies of the calling parameters, set the "LINC TAPE ON" flag cell to -1 indicating that a tape operation is in progress, and start the proper tape drive. The routine then returns to the caller. The tape data transfer proceeds in interrupt time, at times stealing up to 45 out of every 100 memory cycles from the task time process. When the tape operation is

149 completed, the "LINC TAPE ON" flag cell is reset to zero. A call to the tape routines before a priori operation is completed will automatically be delayed until the prior tape operation is complete. IOCS3 contains a routine, TPWAIT, which will wait until a pending read or write tape operation is completed and then return to the caller. A tape-mode changing routine, TPMODE, is provided so that PROGOFOP compatible tapes marked at 256 words per block may be handled. A block searching routine, SEARCH, allows tape block searching operations to be overlapped with computation. A flag, SRCHSW, indicating whether a block searching operation is in progress is provided to allow the user to control the real time behavior of his program. Any tape read or write operation will override an executing block search, but a requested block search operation will wait until all pending tape read or write operations are completed before executing. Normal system action in the event of a checksum error while reading magnetic tape is to retry the pending operation up to three times. (The number of times the operation may be tried can be changed by the user.) If the operation is successful within the maximum allowed try count, a normal return is made to the user. If the retry is unsuccessful (checksum errors are still present), the system will check to see if the user has specified that checksum errors be ignored. (The default is that checksum errors are not ignored.) If

150 the user has specified that errors be ignored, a normal return to the user is made. If errors are not to be ignored, the tape routines make a task time exit to the tape error routine. (Note that all checking for errors is done in interrupt time.) This error routine is defaulted to a single halt instruction within IOCS3, but the user may provide his own error handling routine. In the event of a tape error, the number of checksum errors as well as the location to return to after the error has been handled are available to the user's program. To recap, the tape system follows the flowchart in Fig. 6.2 in the event of a tape error (see next page). FLOWCHART SYMBOL DEFINITIONS (All symbols are on page zero and thus are available to the user. ) CSCNT contains the number of checksum errors encountered in a read operation. TRYCNT initially contains the negative of the total number of times a tape operation may be tried. IGNORE set to -1 if checksum errors are to be ignored, 0 otherwise. PREG holds the location where the user program was interrupted when a task time tape error exit was made. MFLDS holds the contents of the Interrupt Buffer (memory field settings when the user program was interrupted) when a task time error exit is made.

Enter from "tape transfer complete" point in interrupt time 151 Xas Normal Return through IsZ Retry Interrupt TRYCNT Operation Processor 2 M GNo Skip Skipped- max # of tries exceeded No PREG- C(0) MFLDS- C(Int buff) C(0)- ERREXT Note that the last step causes the interrupt processor to return control of the CPU to the tape error handling routine. FIG. 6.2. MAGNETIC TAPE ERROR HANDLING PROCEDURE

152 ERREXT holds the address of the tape error handling routine to which a task time tape error exit is made. From the flowchart and the table of symbols, user options for tape error handling should be fairly apparent. For example, if the user wishes to read tapes with bad checksums, he may deposit a -1 into IGNORE. After the tape read is complete, the number of errors may be found in CSCNT. If he wishes to change the number of tries the tape routines may make to "N", he need only deposit -N into TRYCNT. If he wishes to handle tape errors in a separate routine of his own, he may do so by depositing the address of his routine into ERREXT; in his routine, he should save the AC and the LINK bit before handling the error. After processing the error, his routine should restore the AC and LINK, restore the memory fields from MFLD, and then jump indirect through PREG to get back to the interrupted program. N. B. The user may change default tape error options only after RESET has been called. 6.4.2.2 Calling Sequences. TO CHANGE MAGNETIC TAPE MODE CALL TPMODE /for 128 word per block tapes, call /with LINK bit cleared to zero. /for 256 word per block tapes, call /with LINK bit set to one. return call+1 with clear AC and LINK.

153 TO READ OR WRITE MAGNETIC TAPE RDSTAP or WRSTAP / RDSTAP to read, or WRSTAP to write. 4000*UNIT+BLKNO /UNIT is 0 or 1, BLKNO is tape block / number. 4000*FLD+2000*C HECK+ #BLKS /FLD is memory bank, either 0 or 1. /CHECK is 0 for no checking and 1 for / checking. If reading and check is set, / the read will be done without trans/mitting words to core - i.e., the /operation is simply a checksum check. / If writing and check is set, a read/ without- transmitting of the just-writ/ ten blocks will be done to insure the /tape is readable. / #BLKS is the number of tape blocks /to be involved in the transfer, and /ranges from 0 through 1777 octal. CORLOC / beginning core location within a bank /to be involved in the transfer. return call+4 with clear AC and LINK bit.

154 TO WAIT UNTIL A TAPE READ OR WRITE OPERATION HAS BEEN COMPLETED TPWAIT /wait until "LINC TAPE ON" flag is / reset to zero. return call+1 with clear AC, LINK bit unchanged across the call. TO MOVE A TAPE ONTO A DESIRED BLOCK SEARCH /hunt for the block specified below. 4000*UNIT+BLKNO / see corresponding parameter on / RDSTAP. return call+2 with clear AC and LINK. 6.4.4. 3 Useful Tape Mnemonics in the I/O Symbol Table. Five mnemonics useful for specifying tape operations are defined in the I/O SYMBOL TABLE: FLDO=0000 for specifying the memory field FLD1=4000 on tape operations CHECK=2000 for specifying checking on tape operations UNIT1=4000 for specifying tape unit UNIT0=0000 on tape operations

155 An example of the use of the 5 mnemonics is in order. Suppose we want to write locations 10200-10577 in memory onto tape drive 1 starting at block 375, and check the operation to be sure that the tape we produce can be read properly. Then the following may be used: WRSTAP UNIT1+375 /unit and blk no. FLD1+CHECK+2 - /memory field, check bit, and # of / blks. 0200 /location in' memory bank 1 where /transfer starts. return here Note the readability of this code as opposed to the following (equivalent) code: JMS I 46 4375 6002 0200 6.4.5 Useful Locations on Page Zero. Many useful flags as well as system entry point addresses are provided on the page zero portion of IOCS3. The relevant parts of page zero are structured as follows. Symbolic names are taken from the I/O SYMBOL TABLE.

156 LOCN SYMBOLIC CONTENTS NAME 23 ARFLAG Address of reader buffer flag. The reader buffer flag is negative if there is at least one character present in the input buffer, and is positive if there is no character present in the buffer. 24 CIFD A CDF CIF instruction (6203 octal). This is useful for constructing returns for off bank subroutine calls. 25 LTON LINC TAPE ON flag. This flag has value -1 if a read or write tape operation is in progress, and is zero otherwise. 26 APFLAG Address of printer buffer flag. The printer buffer flag is positive if there is room left in the printer buffer for at least one character, and is negative otherwise. 31 CSCNT Number of checksum errors encountered in the last LINC magnetic. tape operation.

157 LOCN SYMBOLIC CONTENTS NAME 34 IGNORE LINC-tape checksum error ignore switch. This switch is set to zero if checksum errors are not to be ignored, and is set to - 1 if checksum errors are to be ignored. 35 TRYCNT The negative of the maximum number of times a tape operation may be tried. This count is used for tape error processing. It is set to -4 (4 trys allowed) by the system reset routine, RESET. 37 PREG The program counter value to which the LINC-tape error handling routine should return after the error has been handled. 40 MFLDS The memory field settings which the LINC-tape error handling routine should set up before returning through locn 37. These settings were obtained by reading the interrupt buffer via a RIB instruction. 41 ERREXT Address of the LINC tape error exit routine, which is assumed to be in memory field zero.

158 LOCN SYMBOLIC CONTENTS NAME 60 SRCHSW LINC tape block searching switch. This switch has value -1 if a block search is being conducted, and has value 0 otherwise. Locations 42 through 55 contain system entry point addresses: LOCN CONTAINS WHOSE FUNCTION IS ADDRESS OF 42 RESET system reset routine 43 TPMODE change tape mode 44 TPWAIT wait for tapes to finish 45 RDSTAP read tape 46 WRSTAP write tape 47 RDROPN open reader 50 RDRGET get a char from reader 51 RDRTAG get a char from reader 52 RDRCLO close the reader 53 PTRPUT type a character 54 PTRCLO wait for printer to finish typing 55 SEARCH search for a certain tape block

159 6.4.6 I/O Symbol Table Listing. /IOCS3 SYMBOL TABLE FOR THE VERSION OF 19 MAY, 1969 / /SYSTEM TRANSFER VECTOR DEF'NS RESET=42 TPMODE =43 TPWAIT=4444 RDSTAP=4445 WRSTAP=4446 RDROPN=4447 RDRGET=4450 RDRTAG=4451 RDRCLO=4452 PTRPUT=4453 PTRC LO=4454 SEARC H=4455 /USEFUL CONSTANTS & FLAGS ARFLAG=23 CIFD=24 LTON=25 APFLAG=26 CSCNT=31 IGNORE =34 TRYCNT=35 PREG=37 MFLDS=40 ERREXT=41 SRCHSW=60 / TAPE DE FINITIONS FLD1=4000 FLD0=0000 CHECK=2000 UNIT0=0 UNIT1 =4000 / /"CALL" is defined within the CEL assembler as "JMS I" 6.5 Program Listing A listing of IOCS3 can be found overleaf.

MACRO8 ASSEMBLER (AN229) 160 6.5 PAGE 01 /IOCS III - AN I/O CONTROL SYSTEM FOR THE /COOLEY ELECTRONICS LA3 LINC-8. /THIS SYSTEM IS kIJUN TOTALLY UNDER /INTERRUPd'S, AND SLUPPORTS THE 33AkSR /READER AND PRINTERt, AS WELL AS LINC TAPES /MARKED AT 128 WORDS PER BLOCK. /A MACRO FOR SAVING RETURN MEMORY FIELDS DEFINE SAVRTN SAVOUM <TAD CIFO RDF DCA SAVOUM> /TRAP PROCESSOR JUMP *1 0001 5402 JMP I.+1 0002 0245 TRPROC /PAGE ZERO CONS TANTS *20 0020 1251 ATAPE, T.APINT 0021 0475 AROR, RORIE /INTT HANDLING 0022 0357 APEI'R,'YIYE' /riO3FINE ADDR)iESESE 0023 0000 Git3P-R, 0 /GET UFFEtR-POINTER 0024 6203 CIFO, CIF COPF /FOR OFF-BANK RETURNS 0025 0000 LTON, 0 /IS LINC-TAPE RiJNNiNG'? S NW 0026 0000 PBPTR, 0 /PUJT ROUTINE BUFFER-POINTER 0027 0000 SWITCH, 0 /TAPE ROUTINE SWITCH WORD 0030 0000 LADR, 0 /ADR OF APPROPRIATE ENTRY IN BLK'rBL 0031 0000 BADCS, 0 /t3AD CHECKSUM FLAG, 0 IF OK, NO N-ZERO IF BAD 0032 7600 BLKSI Z -200 /TAPE BLOCK SIZE 0033 0037 BMiASK, 37 /ALLOWS 32DEC LOCN BUFFEfR 0034 0000 IGNORE, 0 /-1 IF CKSUdM EkRtRO'RS ARE TO'tE IGNORtED 0035 777 4 RETRY, -4 /TAPE OPERATION A AX RIETRY CNT 0036 0000 RETCNT, 0 /NUMBE.R OF RETRIES DONE 0037 0000 PRiEG, 0 /PROG CiNI'R FOR TAPE ERRORS 0040 0000 MFLDS, 0 /MEMFLDS FOR " 0041 0747 ERtREX T, SYSHL-T /TAPE Ei-ROR ROUTINE ADR 0042 0203 AR E ST, R E SET /SER TRANSFER VECTOR 0043 1332 ATP MOD, TPMODE 0044 0541 A'P WA i, TPAI T 0045 1000 ARDTAP RS'TAP 0046 1 005 A;qR TAP., W JS T TAP 0047 0317 ARD OPN O PNR N O 0050 0345 ARDiGET, GET 0051 0440 ARD rTAG GETCH 0052 0524 ARDCLO, RDRCLO 0053 0640 ATTPUT, P'UT 0054 0706 AT TCL O,* TTYCLO 0055 1056 AS<ERCH, SEARCH 0056 0000 PTTRTEM, O /TEMP LOC FOR PE', RourTINS 0057 0000 TTYOiN, 0 / I S PTR RUNNING? SW 0060 0000 SRCHSW, 0 /-1 IF'SERCHING FOr'IAPbtLK, O FO ) 0RD OR WR PAGEt

161 6.5 PAGE 02 /ENTRY FOR MANUAL SYSTEM RESET / 0200 4203 MAN iAL, JMS RESET 0201 7402 HLT 0202 5201 JMP - 1 / /SYSTEM I /0 RESET ROUTINE /HAS SAME EFFECT AS SYSTEM RESET /BUTTON ON A /360 0203 0000 RESETS 0 0204 6002 IOF /TUJRN I N TTS OFF 0205 6132 iCC /CLEAR ALL FLAGS 0206 6042 TCF 0207 6312 I3CF 0210 6302 ADCC 0211 6356 ECF EOF /EXTERNAL INTT OFF 0212 1024 SAVRTN RTRTN 0213 6214 0214 3242 0215 6201 CDF F 0216 1377 TAD (WBUFF /OPEN PRINITER 0217 4303 JMS ZERO /SINCE IT'S SUCH A NICE DEVICE 0220 1377 TAD ( -t3UJFF /AND TAKES NO SCRE4Y HANDLING 0221 3026 DCA PaPTR /LIKE THE READER 0222 1026 TAD P3PTR./OPEN PTR dY ZEROING 5JFFER 0223 3776 DCA T8PTR /AND SETTING UP POINTERS 0224 3057 DCA TTYON /PTP, NOT RUNNING 0225 3775 OCA RDRMOD /R'R, IS CLOSED 0226 3774 DCA RFLAG /NO PENDING RDO INTTS 0227 3034 DCA I GNORE /ALL 1'APE EtkRORS PRODUCE HLT 0230 1373 TAD (-4 /SET MAX RETRY CNT 0231 3035 DCA R E TR Y 0232 3025 OCA LTO N /TAPE NOT RUNNING 0233 61 41 ICON /STOP TAPES 0234 1372 TAD (7 0235 6141 ICON /CLEAR LINC INTTS 0236 7001 IAC 0237 6141 ICON /SELECT LINGC,p/-cro/ 0240 7300 CLA CLL /iRETUiRNi W/ CLEAR AC&LINK 0241 4771 JMS TPMODE /SET TAPES TO 128 WEUS /BLK. RlET W/ CLR AC 0 242 7402 r(TrfN, HLr IREP 3Y CIFO 0243 6001 ION /fTt.Ji ON INTTS 0244 5603 EXIT RESET / /SYSTEM TRAP PROCESSOR /ALL I / Ii\JfEitiEtRUP'TS COME HERE 0245 3301 TtRPROC, DCA SAVEAC 0246 7010 RAR /SAVE AC AND LINK 0247 330'2 DCA SAVELK. 0250 6147 INTS -/GET LINC INTT SrATlJS 0251 7710 SPA CLA /SKIP IF NOT rAPE /NOTE THAT ITr MIGHT dE THE CONSOLE SiNTCHES 02 52 5420 JMP I ATAPE /GTO'O IAPE iNTr IIME RNOdTINE

162 6.5 PAGE 03 0253 6131 RSF /TEST Rt~i FLAG 0254 7410 SKP /NOT A RDR INYTT 0255 5/421.JiMP I AkOR /WAS A RDt INTT - GO TO INTT tIME RtOUTINE 0 2.56 6041 TSF /TEST PfI' FLAG 0257 7410 SiKP /NO)T A PTR INTT 0260 5422 JMP I APTR /WJAS A Pt INTF - Go TO INr r rIME ROUTIfNE 0261 6312 I CF /CLEAR ALL,'EMAINING FLAGS 0262 6356 ECF EOF /EKTE0RNAL INTT OFF 0263 6302 ADCC 0264 1025 TAD LTON /IS LI\jC TAPE RUNNING? 0265 771 0 SPA CLA /SKIP IF NO F 0266 5271 J MP TRPRtEf 0267 1372'rAD (7 0270 6141 ICON /CLEAR LIN INT rFS 0271 62144 TRPREf', RrdF /RESTORE PRiEVIOUSd FLDS 0272 7630 SZL CLA /LINK IS 1 IF THERE IS A TASK0273 6203 GIF COF 0 /TIME ERROR RETURN FROM TAPE ROUTINES 0274 130:2 TAO SAVELK /RES'TORE LI;NK IT 0275 7104 CLL RAL 0276 1301 TAD SAVEAC /RESTORE AC 0277 6001 IONi 0300 5400 eIT 0 / 0301 0000 SAVEAC, 0 /.AC SAVE LOCON 0302 0000 SAVELK, 0 /LINKK $a VE WrO / /A ROUTINE TO ZERO-OU'THE RiEADER /ANO PRIN'TER JUFFER<S / 0303 0000 ZERO, 0 / 1 it> * -c. 0304 331 5 OCA ZADR /SAVE AiORESS OF BiU FER 0305 1033 TAO 1SASK 0306 7040 GC /' A 030'7 3316 OCA ZCNT /# OF BUFFER LOCONS 0310 3715 OCA I ZAU/ 0311 2315 ISZ ZAODR /iz 0312 2316 ISZ ZCNIT 0313 5310 JIRP.-3 0314 5703 EXIT ZERO / 0315 0000 ZADOR 0 0316 0030'C, O'N, 0 / /READER OPEN ROUJTINE 0317 0000 ROROPi4 0 0 32i0 7 60t0 OCLA2, 7600 /CLR AC W/ GIOUJP 2 CLA TO SAVE MEMFLO &(.e./': /-, 32 1 1 024 SA V It'iN ti lNRE 0322 6214 4ZCS3) 3'23 3343 0324 6201 COF 0325 3775 OCA ROL'40 /CLOSE iREADUER TO 3E SURE 0326 1370 TrAo (RBU.JFF /SETURP kRD,< 3tUFFEi 0)327 4'303 JIS ZERO 0 330 1370 TAI) ( Rr3UFF /SET P'TIRS

163 6.5 PAGE 04 0331 3767 OCA RB9PTR 0332 1767 TAD R38P'IR.0333 3023 uCA GJPTiR 0334 6002 IOF /TtJUN OFF INTIS FOR DELICIATE DIDDLING 0335 1774 TAD RFLAG /IINTT PENDING? 0336 7640 SZA CLA 0337 4766 JM6S KROIiNP /YES 0340 7240 STA /SET SWITCH TO RDROPNr 0341 3775 DCA RDR1OD) 0342 6001 I ON 0343 7402 iRNRCET, HLT /IREP BY CIFi 0344 5717 EX T I i,<ROPN / /READER C.HARAC fE FETCHING ROUTINE /WILL WAIT UNTIL A CHAiACTER COMES IN 0345 0000 GET, 0 0346 7200 CLA 0347 1024 SAVRTN GTRTN 14ae 0350 6214 0351 3355 0352 6201 CDF 0353 4765 JMS GETCH/-t ta 0354 5353 JNP. -1 /DI T i GET CHARi TRY AGAIN 0355 7402 G TRTiN, HLT /REP dY CIF) 0356 5745 EXIT GET /TELEPRINTER INTT EXIT ROUTINE 0357 6042 TTYIE', TCF /T-/ 0360 4764 JMS TYPE.l / c g. Z 0361 5271 JMP TRPIRET//,e.C.,-/,w 0364 066'7 PAGE 0365 0440 0366 0 502 0367 0540 0370 0400 0371 1332 0372 0007 0373 7774 0374 0535 0375 0536 0376 0721 0377 0600

164 6.5 PAGE 05 /LOCS III /RE/ADER <OUTINiES RBUFF:. /ID)iR UFF E. OF 32 CHARS GOES HERE *RI3UFF+40 /GET-A-CHARACTER ROUTINE - ErTUkNS IMMEDIATELY /IF A CHARACTER IS NOT AVAILABLE 0440 0000 GETCH, 0 0441 7200 CLA /SAVE CALLE'S MEMORY FIELD 0442 1024 SAVRTN GETRET 0443 6214 0444 3273 0445 6201 CDF 00 0446 1423 TAD I GB'TR /DO WE HAVE A CHAr TO REFURN? 0447 7700 S M A CLA /SKP IF YESa-;.E,rz, 0450 5273 JMP GETiET /OTHERWISE RETURN W/ CLR AC 0 451 1423 TAD I GBPTR /GET CHAR 0452 0377 AND \L) (377 /S'RIP FLAGS 0453 3337 DCA RORTEMi /SAVE CHAR 0454 3423 DL)CA I GtPTR /RESET BUFFER -/.~ 0455 7201 CLA IAG /UPDATE GET BUFFER. 0456 1023 TAD GBPTR /POINTER 0457 0033 AND i'QASK- /R:3UFF jUliJST iE ON THE P'ROPER tBOUNDARY 0 460 1376 TAD (R3UiJFF /FOR THIS TO WORK 0 461 3023 DCA GBPTR 0462 6002 IOF /ITU<N OFF INTTS DELICATE DIDDLING GOING ON 0463 1336 TAD RDORi'OD 0464'7640 SZA CLA 0465 1335 TAD) RFLAG 0466 7640 SZA CLA 0467 4302 JillS RDRINP 0 470 6001 ION / TURNI TIrS BACK ON 0471 1337 TAD DORTEa /GET CHAR 0472 2240 ISZ GETCrH /3UMP RETUiRN ADR 0473 7402 GETRETI LT /REP BY CIFD 0474 5640 EXIT GETCH / /READER I.NTrT EXIT ROUTINE 0475 1336 RDRI E, TAD RDRMOD /IS READi)ER OPEN? 0476 7700 S~MA CLA /SK? IF YES 0477 5320 JiP RCLSO 0500 4302 JMS RIDNINP /GET THE CHAR 0501 5775 JMP? f"t-iEf /RE'TUOrN 1'0 I'SK TI E / /READER INPUT ROUTriNE - GETS /PENOING CH.AR INTO LBUFFER IF /POSSIBLE 0502 0000 RORINPi, 0 0503 1740 TAD I RD3P'r /IS THERE RO.OMl IN dUFFER? 0504 7 710 SPA CLA /5KP IF YES

165 6.5 PAGE 06 0 50 5 5320 JMP riCLSO 0 506 6036 KRB /GET CHA;R FROM RD, BUFFER 0507 1374 TAD (400 /'-0' A t4 -1, A 0 51 0 3740 OCA I Ra3P TR 0511 7201 CLA IAC /UPDATE BUFFER POINTER 0512 1340 TAD RBPTR 0513 0033 AND 8MASK 0514 1376 TAD (0RB3UFF 0515 3340 OCA Rt3PT'R 0516 3335 DCA RFLAG /NO CHAR P~ENDING 0517 5702 EXIT RDRINP / /COME HERE IF RDR IS CLOSED AND' WE /GET AN INTT, 0R NO ROOM IN BUFFER 0520 7240 rCLSDo STA /SET CHAR PENDING FLAG 0521 3335 DCA RFLAG 0 522 6132 RCC /CLR FLAG, DON'T ADVANCE READER 0523 5775 JMP TRPRET / /READER CLOSE ROUTINE 0 524 0000 kRDRCLO, 0 0525 7'200 CLA /SAVE CALLER'S AIEMFLO 0526 1024 SAVRTN RORET 0527 621 4 - 0 530 3333 0531 6201 COF 00 0532 3336 OCA RDRMOD 0533 7402 RORET, HLT /REP 3Y CIFD 0534 5724 EXIT RDRCLO / 0535 0000 RFLAG, 0 /-1 IF ROR INTT PENDING, 0 IF NOT 0536 0000 RDRMOD, 0 /-1 IF ROR IS OPEN, 0 IF CLOSED 0537 30000 RORTE4 0o /HOLDS CHAR FOR 3GETCH 0540 0000 RSPTR 0 /IRDR INTT TIME BUFFER PTR / /MAGNETIC TAPE WAITING ROUTINE 0541 0000 TP'A IT r, 0 0542 7200 CLA 0543 1024 SAViRTN TP!W;JRT N 0544 6214 0545 3351 0546 1025 TAD L ON 0547 7710 SPA CLA 0550 5346 JMP. -2 0551 740 2 ETPWiT.N, H-ULT /REP BY CIFO 0552 5741 EXIT TPW(AIT / /COMiOvlN "AF F'ER-BLOCK" ROUTIrl I4E FOR BiOTH /iMAG TAPE rEAD AND Ji lITE 0553 1773 CLEANUP, TAD SSUWRD 0554 6141 ICON /SET SARiCH ON raPE UNlIT

166 6.5 PAGE 07 0 555 730 CGLA CLL /LINK TO ZEhO FOR 1NOkiMAL!iETLJRN 0556 2772 ISZ DESIR<EO /UPDATE DESIRED 3LKiNO 0557 2364 ISZ SLKSLEFT /ANY MORE BLKS LEFT 0560 7410 SKP /YES 0561 5771 JMP POS'LOG /NO MORt.E - STOP 0 562 47 70 JMS WAIT /WAIT FOR dLK INTT 0563 5767 JMP SERCH /AND THEN GO TO SERCFH lRO U fINE 0564 0000 3LKSLEFT, 0 /CONTAINS NEGATIVE OF # OF 3LKS 0567 1200 PAGE 0570 1246 0571 0722 0572 1361 0573 1152 0 574 4000 0575 0271 0576 0400 0577 0377

167 6.5 PAGE 08 /IOCS 11I /TELEPRINTER ROUTINES - NOTE THAT A COPY /OF THEStE ROUTINES COULD dE USZiED FOR HANDLING /A HIGH SPEED PRtINTER LIKE THE INKTiONIC. WBUFF=. /PTR BUFFER OF 32 CHARS GOES HERE * WI3UF F + 40 /PUT CHARACTER ROUTINE /NOTE THAT A RETURN TO THE CALLER / IS NOT M4ADE UNTIL THE CHARACTER /HAS BEEN IONSERTED INTO THE iBUFFER 0640 0000 PUT, 0 0641 0377 AND (377 /IN CASE HE GAVE US GAR3BAGE 0642 30 56 DCA PTRTEM /SAV CHAR 0643 1024 SAVR'TN PUTRET 0 644 621 4 0645 3265 0646 6201 CDF 0647 1426 TAD I PBPTR /SNIFF AT BUFFER - ROOM? 0650 7710 SPA CLA /SKP IF THERE IS ROOM 0651 5247 JMP.-2 /OTHEi —WISE WAIT 0652 1376 TAD (4000 0653 1056 TAD PTi'TEIr,, /CONSTRUC CHAR + S.WITCH 0654 3426 DCA I P8PTR /AND INSERT INTO BUFFER 0655 7201 CLA IaC /UPDATE PUT BUFFER POINTER 0656 1026 TAD PBPTR /USING MASKS 0657 0033 AND B3MASK 0660 1375 TAD ( 4UPFF 0 661 3026 DCA PP'8PT 0662 1057 TAD TTYON 0663 7700 SMA CLA 0664 4267 JMS TYPER 0665 7402 PUTRETi HLT /RlEP BY CIFD 0666 5640 EXIT PUT / /PRINTER TYPING ROUTINE 0667 0000 TYP ER, 0 0670 1721 TAO I TBPTR /IS THERE A CHAR TO TYPE? 0671 7500 SMA /SKP IF YES 0672 5304 JMP TRI 0673 6046 TLS 0674 7300 CLA CLL 0675 3721 OCA I TBPTR /RESET BUFFER 0676 7201 CLA IAC /UPDATE TELEPRINTER UjFFER 0677 1321 TAD TBPTR /POINTER USING MASKS 0700 0033 ND "riM- ASK 0701 137S TAD ( WBUFF 0702 3321 DCA TBPTR 0703 7240 STA /SET TTYOiN SW 0704 3057 TiR1 D )CA TfTYON /AC TO TTYON 0705 5667 EXIT TYPER

168 6.5 PAGE 09 /TELEP.RINTEr CLOSE ROUTINE 0706 0000 TTYCLOi 0 0707 7200 CLA /SAVE CALLER'S MENFLD 0710 1024 SAVRTAi TORET 0711 6214 0712 3317 0713 6201 CDF 03 071 4 1057 rAD -rTYON 0715 7640 SZA CLA 0716 5314 JMP.-2 0717 7402 TORtET, HiLT /REP BY CIFD 0720 5706 EX IT TTYGLO / 0721 0000 Tr3PTh, 0 /PTR INTT TIME BUFFER POINTER / /POSTLOG ROUTINE - CLEANUP AFTER A /MAG TAPE OPERATION 0722 1374 POSTLOG, TAD (4 0723 6141 ICON /krESET ArtPE SEARCH MODE 0724 7200 CLA 0725 6141 ICON /STOP TAPE MOTION 0726 2430 I SZ I LADR /UiPDATE LAST BLKNO 0727 7000 NOP /COJLO SKP 0730 1773 TAD TAPEOP /W'HAT 4ERE WE DOING? 0731 7700 SMA CLA /SKP IF A WJ4RITE 0732 5341 JMP CHKCS /WAS A RD - CHECCK CHKSUM 0 733 1027 TAD SWI TCH /MUST WE CHECK? 0734 7700 SMA CLA /ISKP IF YES 0735 5344 JM4P RETURN /OTHERW4JISE O' b~ACK 0736 3773 DCA TAPEOP /SET OPCODE TO READ 0737 4772 GO, J1MS S TARTUP /START TAP E DORIVE 0740 5771 JA1P WAI T+1 /IEXIT 3ACK TO TAS"K TIME 0741 1031 CHKiCSs fAD ADCS /DID) WE HAVE ANY CS ERRORS? 0742 7640 S7Z CLA /SKP IF NO T 0743 5350 J R P SYSHLT+l /OTHERW^ISE CHK FR rRY 0744 3025.RETrdUN OCGA LTON 0745 3060 DCA SRCHSWJ /ti' FGS FOLG Fi JSER 0746 4770 J',IS I T /IEJRN TO TASrK TIME 0747 7402 SYSHL'f. AiLT /COM'PLETIE HLT FOk TIARtPE Eriit)Rsr ETCG. 0 7 50 2036 I SZ,RETCNT /;4If WE ETRY THE OPlERATI ON? 0 751 5365 JAP AGAIN /YES 0752 1034 TAD IGNORE /\JO - CAN JE IGNORE BAD CS 07 53 77 1 SPA CLA / SKP IF' i; T 0754 5344 JRMP r<~fURN /r<E:ljTRl TO TASKr ir TviE 0755 1l JO TAD 0 /DIDDLE TASK TIME RE fRt AOU 0756 3037 DCA PREG /SAVE OLD ADR 0 757 1041 F40 E,;REtT /AND INSERT FARE 0760 300t) Ca /CA li 0fROR RiOUTINqE AUR 0761 6234,Rid / SAVE MEMFLOS 0762 3040 DCA 4FLL)S 0763 7320) STl CLA /INDICAT~ E RROR REFURN TO TRAPPER 0)764 5344 JAR REFURN

169 6.5 PAGE 10 ) 0765 4767 AGAIN., J.MS SETUP 0766 5337 JMP GO /TTRY OPERA'fION Ai' AIN ) 0767 1 113 PAGE 0770 1246 0771 12 47 077'2 1 125 0773 1365 0774 0004 ) 0775 0600 0776 4000 0777 0377 ) IJ.;)

170 6.5 PAGE 11 /IOCS I II /MAGNIETIC TAPE ROUJTINES 1 000 0000 hOSTAP, 0 1 Oi1 7200 CLA 1002 1200 TAi) riDS-TAP 1 003 320 S DCA iWJiSTAP /L)I DDLE RETURN A)DDtESS 1004 5210 JiqP.+4 1005 0000 WNST'AP, 0 1 00 6 7200 GLLA 1007 1377 TAO (4002 /WRITE FJUNCTION 1010 3200 OCA i DSTAP /HOLD FIUNCTION HER E TE P O A ILY 1011 1025 TAO LTON /StE IF TiHE OPERATION CAN PROCEED 1012 7710 SPA CLA /SKP IF IT CAN i013 5211 JMP.-2 /OTHVERWISE WAIT 1014 1200 TAD RL)STAP 1015 3353 DCA FiUNC T 1016 4301 J1S GETUt3K /GET UNIT # AND BLK # 1017 1605 TAD I WRSTAP /GET SWIT'CHES -AND # OF BLKS 1020 3027 OCA SWITCH 1021 2;205 I SZ WRSTAP 1022 1605 FAD I WRSTAP /GET MEMORY LOCN 1023 3355 DCA LOG 1024 2205 ISZ WRSTAP /POINTS TO RETURN LOCN 1 025 1 0 2 4 SAVRTN G0O3A<K 1026 6214 1027 3277 1030 6201 TPCDF, CDF 1031 1027 TAD SWITCH 1032 0376 AND (1777 1033 7450 SNA 1034 5277 J.'P GOBAK /DO1N'T BOTHER Wv/ 0 BLKS 1035 3354 DCA B3LKS 1036 1027 TAD SWITCH 1037 7710 SPA CLA 1040 1375 FAD (10 1041 1230 FAD TPCDF 1042 3774 DCA VW.CDF 1043 1774 TAD WCDF 1044 3773 OCA RCOF /SET iUP CDF'S FO.R DATA TRANSFE R 1045 3060 L)CA S;CHSW /tRESET SEARCHING SW 1046 7240 STA 1 047 3025 OCA LTON /SErf MAGTAPE ON SW 1050 1027 TAD SW.ITCH /GET CHECKING BIT FOR 1051 7004.RAL /EASI ER TESTS 1052 3027 OCA SWI'CG Hl 1053 1'035 TAD RETRY /SET iJP RETRY COUNT 10 54 3036 DCA t<E TCNT 1055 5)75 JMIP FI'ERGE 1056 0000 SEA.-RCH. 0 10 57 72003 CLA 1060 102.5 rTa LTOiq /!'AY OPERATION PRtOCLED)? 1061 7710 SPA CLA /SKP IF YES 1062 5260 J'tP.-2 /OTHrWISEl WAIf 1063 1024 SaVtT'rN jGOAIK

171 6.5 PAGE 12 1 064 621 4 1 065 3277 1 0 66 6201 C;F l 067 1 2 56 TAD SEARCH /DIDDLE RETURN ADR 1070 3205 DCA WRSTAP 1071 4301 Jg-iIS UGETU K /GET UNIT# AND BLK# 1072 7240 STA /SET SEARCHING SW 1073 3060 DCA SRCHSW 1074 3353 UCA FUNCT 1075 4313 THERiGEv JMS SEiUP /SET UP PAIRAMETERS FOR TiRAP TIME COr<OUTINE 1 076 4325 JMS STARTUP /STARTUP THE PROPER TAPE DRIVE 1077 7402 GOB3AK, HLT /.RE-P BY CIFD 1 100 5605 EXIT WRSTAP / /A ROUTINE TO GET THE TAPE UNIT # /AND BLKNO. 1 101 0000 GETJUBK, 0 1102 1605 TAD I odLSTAP/,BL 1103 0372 AND (4000 1 104 1371 TAD (2 /FORM SET-SEARCH-AND-UNIT WRD 1 105 3352 DCA SSJ WRD 1106 1605 TAD I WkhST.AP 1 107 0370 AND (3777 /UGET BLK,(NO 1 110 3356 DCA BLKNO 1111 2205 ISZ WR.~STAP, /ADVANCE PTR 1112 5701 EXIT GETUBK / /PARAMETER SETUP ROUTINE / 111 3 0000 SETUP, 0O 1114 1352 TAD SSUW3L. 1115 7710 SPA CLA /e ~ C 1 1 1 6 7001 I AC 111 7 1367 TAD (;3LlKT,(Ti- t1/ —, ~7' ~..,r.v 1120 3030 DCA LADzR 1121 3031 DCA 6ADCS /7,t.X -, 1 122 1353 TAD) FiUNCT t1 # 1123 3766 DCA i APEOP /t,/ 1124 5713 EXIT S -lIETUP /TAPE UNIT STARTING ROUTINE 1 125 0000 STARTUP, 0 1126 1365 TAD (SEaC / 1127 3764 OCA WAIf / X 1130 1356 TAD BLIKN()\1 1131 7001 IAC 1 132 3763 DGC'ESI'rEo) 1133 1354 TAD i3LKS 1 134 7041 CIA /FOt< ISZ LOOP 1135 3762 OCA BL:(SLEET 1;36 1355 TAd LOC 1 137 3761 )CA COriLOC /PRti TO COR1E LOCATION 1 140 1352 TAD) SSUJRiDL) /SELECT TAPE NIT'r

172 6.5 PAGE 13 1141 6141 ICON'1 142 7300 CLA CLL 1 143 1356 TAD [BLKNO /COi;?iPUTE 1144 1430 TAD I LADR /I:ITIAL 1145 7210 CLA RAR /DIRECTION 1146 7001 IAC./OF TAPE MOTION 1147 6141 ICON 11 50 7300 CLA CLL 1 151 5725 EXIT ST'ARTUP I 1 52 0000 SSUitRD, 0 /SET-SEARCH-AND-UNIT WtRO FOR TAPE UNIT 1153 0000 FUNCT, 0 /TAPE TRIANStFER FUNCTIOiN - O Oi 4005 FOR R OR i 1154 0000 L:LK$, 0 /(POSITI VE) # OF ELKS TO TRAi4SNvER 1155 0000 LOCG 0 /LOiWEST LOCN IN CORE TO TRANSFER 1156 0000'3LKNOv 0 /STARTING BLK # ON HAG TAPE 1161 1364 PAGE 1.1 62 0564 1163 1361 1 1 64 1246 1165 1200 1 166 1365 1167 1366 1170 3777 1171 0002 1172 4000 1173 1270 1174 1311 1175 0010 1176 1777 1177 4002

173 6.5 PA'GE 14 /IOCS III /MGNETI C TAPE IIOUTINES - CONTINUED /BLOCK SEARCHING ROUTINt'E - OPERATES /IiN IN;TERRiPT TIME 1200.. 6171 SERCH, IAAC /GET B3LKNO FROM TAPE 1201 3430 OCA I LADR /SAVE IN BLK'I JL 1202 6171 IAAC /GEr IT AGAIN 1203 7500 SfMA /SEARCH ALGORITHM COURTESY 1204 7120 STL /OF KUJRT MET7GER 1205 1361 TAD DEZIRED 1 206 7650 SNA CLA 1207 5225 JMP THERE /PROPER BLKNO IF ZERO 1210 61 47 INTS /CHECK MOTION 1211 7010 RAR 121 2 0377 AND (4000 213 7460 SZA SNL 1214 5223 JM P EG /PROPER DIRECTIOTN 1215 7020 CML 1216 7520 SNL SMA 1217 5223 Ji4P S;'4ERGE /PtOPER DIRECTIO-N 1220 6141 ICONA /CHANGE D)IRECTION 1 22 1 1001 IAC 1 222 6141 ICON /i3Y STOPPING AND SfAtTING' 1223 42.46 SMERGE, JMS W1AI' /R TiJiN TO AtSK TIZME 1224 5200 JIMP SERCH /GO THIRU SERCH AGAIN 1225 1060 THERE, TAD SRCHSW /ARE WE SEARCHING FOR A BLOCK? 1226 7710 SPA CLA /SKP IF NOT 1227 5776 JP POSTLOG /SEARCH IS DONE - UdI"T 1230 6147 INTS /GETr IRECTION INFO 1231 7012 RTR /GET Mi'OV0ION BITS 1232 7620 SNL CLA 1233 5223 JMP SMERGE 1234 1032 TAD SLKSI Z /GET BLK SIZE 1235 3362 DCA TAPCNT /AND PUT INTOC WRDCOUiNT 1236 3363 OCA DATASUMi /INITIIALIZE TO 0 1237 1375 TAD (3 /SET BLOCK i- OODE ON TAPE iJNIT 1240 61/41 ICON 1241 1365 TAD TAPEOP /GET OPERATION CODE 1242 7500 SMA /SKIP IF A'WRITE 1243 5255 JMP IREAD /GO TO READ ROUTINE 1244 6141 ICON /E'r WRITERS ON MODE 1245 5310 JMP Wi RITE /GO TO WRITE ROUTINE /WAIT iROUTINE - ALL INTT TIME,ROUTINES /RETURXN HERiE FO GO'3ACK TO TASiK TIME 1246 0000 WAI T, 0 1247 730) CLA CLL /ESE T LINK FOR NORI AL RE TURN iTO Ti'APPER 1250 5774 JMP ir~PRET 1 251 1 373 TAP IN'JT TAD) (7 /COiE' HElRE FOR'rAPE INTT 1252 6141 ICON /CLR LINIC ITI'TS 1253 7300 CLA CLL /RE"IURN W/ CLR AC & LINK 1254 5646 EXIT WAIF

174 6.5 PAGE 15 /INTT TINME TAPtE PEADING tiOU'TINE 1255 4246 IREAD, JMS WAI 1 /WJAIT FOR GUAkiD MARK 1 256 /4246 READv JMIS WAIT /READ FOR REAL 1257 61 71 1AAC /GET WHO FROM LINC AC 1 260 3360 OCA TAPTEM /SAVE IT 1 261 1363 TAD iDATASiUJM 1262 1 360 TAD TAPTE'1 /UJPLDATE DATASUM 1263 3363 OCA DATASUM 1264 1027 TAD SWITCH /SHOULD DATA BE T.RANSFERRiED TO CORE? 1265 7710 SP A CLA /SKIP IF YES 1266 5275 JMP RTEST /OTHERWISE JMP - CHECKING TAPE 1267 1360 TAD TAPTEM /GT WiORD 1270 7402 RCDF, [{LT /CDF TO PROPER BANK WILL GO HERE 1271 3764 OCA I CORLOC /"ORkD TO CORE 1272 6201 COF /RESTORE DATA FLDO 1273 2364 ISZ CORLOC /UPDATE CORE LOCON PT.R 1274 7000 NOP /LOON 7777 SHOULD WORK TOO 1275 2362 RT/ST, ISZ TAPCNT /HAVE WE DONE A BLK YET? 1276 5256 JMP READ /NO, GOT TO DO AGAIN 1277 4246 JMS WAIT /YES - WAIT FOR CKSUM 1300 6171 IAAC /GET CKSUM FROM LINC AC 1 301 7041 FRDCS, CIA /THIS WILL 8 A NOP FOR LINC TAPE /A'BOVE INSTiRUCTION IS CHANGED BY ROUTINE "TPmODE" 1302 1363 T.AD DA'TAS U 1303 7640 SZA CLA /SKP IF ALL OK 1304 7001 IAC /OTHERWISE SET AC TO 1 1305 1031 TAD BADCS /ADO C(AC) T'O0 BADOS 1 306 3031 DuA'BA)CS 1307 5772 JMP CLEANUP /COMMON "AFTER-BLOCK" ROUTINE / /INTT TIME TAPE WRITING ROUTINE / 1310 7200 WRITE, CLA 1311 7402 WOJCOF, HLT /REP BY CDF FOR PROPER FLD 1 312 1764 TAD I CORLOC /GET WORD FROM CORE 1313 61 61 IACB /TRANSFER IT TO LINC d-REG 1314 6201 CDF /RESTORE DAfA FIELD 1315 1363 TAD DATASUM /UPDATE DA TASM 1316 3363 DCA DATASUM 1317 2364 ISZ CORLOC /JPDATE CO,R LOCON PTR 1 320 7000 N0p 1321 4246 JMoiS WAIT /GO BACK TO TASK rIME 1 322 2362 I7 Z TAPCiNt I /COME HERE FR'ASK TIME 1323 5311 JI1P WOOF /D0 T1HIS IF < 1 BLK WRITTEN TO DATE 1324 1363 TAD DATASUM /1 3LK WJRITTEN - WtR1 ITE;(HKSUiMJ NOVW' 132 7000 WRCS, NOP /CIA FOR LING TAP ES /ABOVE INS'fTJCTION CHAN iGE)D BY ROUJ'TINE "TP(IODE" 1326 6161 IACB /'I'tRNSFER CHKSUI TO LICO d -REG 1 327 4246 J;4S WAIT /WRITE IT 1 330 4246 JHS WAIT /WAI I FOR GUARD) MARK 1 331 5772 JYjP CLEANUi? /COOMIMON "AFTER-BLOCK' rOUTINE / /USER-CALLABLE ROUTINE TO CHANGE TAPE NODE

175 6. 5 PAGE 1 6 /FROM LINC-TAPES TO PDP-8 TAPES AND VICE-V ERSA. /LINC TAPES ARE PlrOGOFOP COMPATIBLE A4D' ARE /WRITTEN AT 256 WORDS/BLK PDP-3 TAPES ARE /DEC-TAPE COMPATIBLE, AND) ARE WRITTEN AT 128 WOIRD)S /PER BLK. CALLING SE~UENGE - SET LINK BIT IF LINC /TAPES ARE DESIREiD, OTHERWISE CLR LINK BIT FOR /PDP-8 TAPES. / 1332 0000 TPMODE, 0 1333 7600 C7600 7600 /GROUP 2 CLA INSTR 1334 1024 SAV'RTN TMRTN 1335 621 4 1336 3356 1337 6201 CDF 1340 1371 TAD (CIA 1 341 7430 SLL 1 34'2 3325 DCA WR; RCS 1343 7420 SNL 1344 3301 DCA RDCS 1345 1370 TAD (NOP 1346 7420 SNL 1 347 3325 DCA WR\CS 1350 7430 SZL 1351 3301 OCA RDCS 1 352 1333 TAD C7600 /SET 3LKSIZE 1353 7430 SZL 1354 1333 TAD C7600 /CLRS LINK BIT TOO 1355 3032 DCA BLKSIZ 1 356 7402 TMRTN, HLT /REP BY CIFD 1357 5732 EXIT TPMODE /WI CLI' AC AND LINK 1360 0000 T.IAP'E{, 0 /SED) FOR TEMP BY RD AND WR 1361 0000 DESIRED, 0 /1 +t3LKNO FOR WHICH WE'RE SEARCHING 1362 0000 TAPCNT, 0 /CNTR FOR # OF'WJR DS TRAN S FERR ED IN THIS BLK 1 363 0000 DAT'ASUlM, 0 /S >I OF ALL DATA WllRODS TRANSMITTE D TO DATE 1364 0000 CO,4LOC, 0 /PTR TO WRiD I N CO RE 1365 0000 TAPEOP., 0 /ACTUAL WiD USED TO ESTABLISH H OR W 1366 000)0 LKi'BL, 0 /LAST BN FO rFAPE 0 1367 0000 0 /LAST 3BN FOR TAPE i 1370 7000 PAGE 1371 7041 1372 0553 1373 0007 1374 0271 1375 0003 1376 0722 1 377 4000

CHAPTER 7 SUMMARY OF SYSTEM CONVENTIONS 7.1 CPS Detailed Magnetic Tape Organization Unit 0 tape: Blk # Length in Blks Contents 0 1 cold start loader (CLDSTART) 1 377 symbolic working area (-S) 400 10 unit 0 VTOC (file index) 410 37 bank 0 portion of CPS Control Program 447 1 fresh copy of communication area 450 1 core-image loader (CILDR) 451 1 system bootstrap loader (BOOT) 452 16 unused 470 10 copy of unit 0 VTOC as of last signoff 500 1300 user file area Unit 1 tape: Blk # Length in Blks Contents 0 1 cold start error program (UNITBAD) ~1 147 binary working area (-B) 150 10 bank 1 portion of CPS Control Program 176

177 Unit 1 tape (cont.): Blk # Length in Blks Contents 160 10 copy of unit 1 VTOC as of last signoff 170 10 unit 1 VTOC (file index) 200 40 scratch area used while saving and destroying files 240 20 absolute loader (only 12 of the 20 blocks are used) 260 40 relocating loader (not all 40 blocks are used) 320 14 +text editor (*ED) 334 60 +MACRO8 assembler (*ASM) 414 77 +FORTRAN compiler (*FORTRAN) (not all blocks used) 513 77 +@SABR assembler (*SABR) (not all blocks used) 612 1166 user files +The system does not assume this file is at the location shown. +SABR MUST follow *FORTRAN on the tape where *FORTRAN is stored.

178 7.2 File Tape Table of Contents Structure The volume table of contents (VTOC)- for a CPS file tape consists of 20008 words kept in 108 contiguous blocks on tape. Each file stored on the tape has an entry called a "file control block" in the VTOC for that tape. The file control block includes the file name and various items of information such as location of the file on tape, file length, and so on. The VTOC is structured as a 1-dimensional array, and each file control block consists of eight contiguous words in this array. The VTOC has the capability to catalog 127 files. The first 8 words in every VTOC are reserved for tape storage allocation information, and may not be deleted from the VTOC under any circumstances. This pseudo file control block is structured as follows. Word No. Contents.1 Unused 2 negative (i.e., 2's complement) of the number of files catalogued in this VTOC 3 block number of the first free block on the tape 4 number of remaining free blocks on the tape 5 6 Unused 8

179 Files are a sequential contiguous collection of tape blocks stored on tape starting from the beginning of the file storage area and extending toward the end (i.e., toward higher block addresses) of the tape. Files are always packed - there can be no unallocated space between 2 adjacent files on tape. Tape storage for newly-created files is allocated at the end of the last file on the tape by removing the desired number of tape blocks from the set of free blocks and assigning them to the new file. Whenever a file is destroyed, all files further down the tape are moved toward the beginning of the tape, overwriting the destroyed file in the process; a number of blocks equal to the length. of the destroyed file becomes free after the last file and is subsequently added to the free storage pool of that file tape. Each file control block has the following format: Word No. Contents 1 8 character file name, left justified, 2 packed 2 stripped-ASCII characters 3 per word, padded on the right with 4 trailing blanks. 5 4000* tape unit + tape block number of the first tape block in the file 6 File length and switches word - see below 7 File conitents attribute word - see below 8 Unused

180 Word 6 - File length and switches word 0 1 2 3 4 5 6 7 8 9 10 11 File length in tape blocks Unused If a one, this file may not be destroyed. If a one, this file may be used as an information sink. If a one, this file may be used as an information source. Word 7 - File contents attribute word 0 1 2 3 4 5 6 7 8 9 10 11 C ABS REL COREIASCII BIN BIN IMAC Unused Bit If Set, File Contains 0 Text in compressed symbolic code 1 Absolute assembler object module 2 Relocatable assembler object module (SABR) 3 Core image 4 USASCII characters, one per word 5 Unspecified contents

181 Management of the VTOC is completely analogous to the management of the file storage it describes. Entries for new files are inserted at the end of the current set of entries, and if an entry is deleted, the remaining entries (if any) are packed to fill the space formerly occupied by the deleted entry.

182 7.3 Conventions Regarding Storage of Information in Files 7.3.1 Compressed Symbolic Files. The text editor *ED produces line-oriented files of text in compressed symbolic code. This comma-free code trades CPU time for about twice the information filing capability per tape block as straight one character per word techniques would have. All systems programs which allow text input from files assume that the text is coded in compressed symbolic form. Each ASCII character is coded into either one or two groups of 6 bits. Each 6 bit group is put into the file immediately after the last group and groups are packed 2 per computer word. The only exception to this last rule involves the line terminator, the carriage return. By convention each new line starts at the left-end of a computer word. The following encoding scheme is used: ASCII 6- BIT 240- 276 the lower 6 bits in the ASCII 300- 337 representation {200- 237 (a 77 group followed by the lower 340- 376 6 bits in the ASCII representation 277 The RUBOUT character is not included in the above scheme. For example, the two lines I(CR) DO(CR) would be encoded as

183 1177 1500 0417 7715 By convention, files encoded in compressed symbolic form are terminated by a line of text containing the USASCII ETX character (control C on a Teletype). *ED automatically provides this terminator in the text files it produces. 7.3.2 Language Translator Binary Output Files. Both absolute and relocatable binary files contain binary paper tape frames packed three 8 bit frames per two computer words. LOC frame 1 top 4 bits frm 2 LOC+I-1 bot 4 bits frm 2 frame 3 Absolute binary files start with a 200 frame (leader-trailer) and terminate with a 200 frame. 7.3.3 Core-Image Files. Core-image files are produced by the system loaders, and are used to hold programs (both user and systems) in a form suitable for execution via the CPS RUN command. By convention, they contain in a specially- structured form all machine instructions necessary for the proper execution of a program; that is, the code within a core-image file may not contain an external reference to code not contained within the file. The machine instructions within

184 a core-image file are placed into core memory by the core-image loader when the user RUNs the program. The program in the coreimage file may be composed of code which sits in any memory bank, although only banks 0 and 1 are supported in the system loaders. Each core-image file contains 2 distinct components, a Program Code Area (PCA) and a Descriptor Table (DT). Each 128-word tape block in the PCA contains a piece of the program in the form of a copy of one memory page from the program. For example, if code for a program sits in pages 0, 200, and 600, then the Code Area for the core- image file containing this program would be 3 blocks long on tape; 2 contiguous -blocks would contain the binary code from pages 0 and 200, followed immediately on tape by a third block for the code on page 600. If a program has code resident in a number of contiguous core pages, then the corresponding tape blocks in the PCA which contain the code will be contiguous also, running from lowest to highest contiguous page in that memory bank. These contiguous tape blocks in the PCA have acquired the name "subimage" since they constitute part of an image of core. In the PCA, the subimages belonging to the highest memory bank come first on the tape, followed by the subimages for the next highest bank, and so forth down to bank 0. Within the block of subimages destined for a particular memory bank, the subimage to be loaded at the lowest address must come first, followed by subimages for successively higher addresses.

185 The Descriptor Table (DT) is an encodification of the memory map of the program stored in the Program Code Area. It is used by the core-image loader (CILDR, Chapter 4) to distribute the various subimages comprising the program to the core pages for which they were assembled (or to which they were relocated in the case of the SABR relocating loader). One tape block is allocated to the Descriptor Table, giving the capability to handle 4210 subimages within the core-image. The Descriptor Table block precedes the Program Code Area on tape. The Descriptor Table is structured as a simple I dimensional array whose entries describe subimages in the PCA. Normally, each subimage in the Program Code Area has a three word entry in the Descriptor Table. However, the last subimage to be loaded has a five word entry in the table, 3 words of which are a regular subimage entry, and 2 words of which contain program starting address information. There is a one to one correspondence between Descriptor Table entries and successive subimages on tape in the PCA, i.e., the first Descriptor Table entry describes the first subimage in the PCA, the next Descriptor Table entry describes the next subimage in the PCA, and so forth. The core-image loader utilizes this correspondence to properly situate subimages in core memory. The regular 3 word Descriptor Table entry for a subimage is structured as follows:

186 Word No. Contents This word contains the number of tape blocks in the Program Code Area comprising this subimage. This number will usually be less than 408 since the last page in each memory bank is reserved for system use in the present 8K version of CPS. The top 6 bits of this word must be zero with one exception: the leftmost bit of this word will be set to a 1 as a flag to indicate that this Table entry is describing the last subimage to be loaded. 2 Bits 6-8 of this word contain the memory field into which the subimage is to be loaded. All other bits in this word must be zero since it will be added to a CDF instruction. Thus the only valid contents of this word in the present version of CPS are either 0000 or 00108. 3 This word contains the full 12 bit address (within the memory field specified by word 2) where loading into core of the subimage should start. Both of the system loaders force this address to be page aligned; however, the core image loader does not assume any In other words, one will usually not desire to load into core memory which does not exist!

187 special alignment of this address. (Thus there is a possibility of playing some games by loading across page boundaries; this has not yet been exploited. ) Bits 6-8 in word 4 in the last subimage Descriptor entry contain the memory field where the program is to be started; all other bits in this word must be zero. Word 5 in the last entry contains the full 12 bits starting address in the field specified by word 4.

188 7.4 Structure of the CPS/User Program Interface All user program/CPS intercommunication is achieved by depositing information (in a sense, messages) into the communication area which sits in page 17600. In this page, we have 128 words available. If we allow up to 6 files to be concatenated and assigned to a logical I/O unit, transmission of this information will consume 72 words. We can make the additional reservation of 32 words to hold the contents of the parameter field on the RUN command, and still have 24 words left over for future expansion and kludges. With this in mind, the organization of the area is as follows. 7.4.1 I/O. Communication Area. The structure of the portion of the communications area which passes FD linkages to an executing program is critical to the implementation chosen for concatenated files. Each file or device (FD) chain for a logical I/O unit will consist of 12 consecutive memory locations (organized in 6 entries of 2 words each). The file system will assign to these locations a two word entry for each FD in the logical I/O unit specification given in the RUN command. Up to 6 files may be accommodated on each logical I/O unit, and any number of files over 6 will be flagged as an error. The twoword entry to be assigned for files will include in the first word of the entry, the beginning block number of the file along with the tape unit on which the file resides, and in the second word of the entry, the length of the file in blocks. The information supplied will be copied

189 from words 5 and 6 in the VTOC of the file tape. To transmit other types of information in the FD chain, the following code will be used: 0000 - an all-zero word as the first word in an entry implies the logical end of the FD chain for the referenced I/O unit. (Note that if 6 files are assigned to a logical I/O unit, no all- zero word will appear. Thus the file access procedure will have to bookkeep the number of files referenced. ) 7777 -1 in the first word of an entry implies the unit is assigned to *DUMMY*, the infinite wastebasket and non-producing source (returns only end-of-file when read). The second word may contain anything. 7776 - -2 in the first word of an entry implies the unit is assigned to the printer. There may be anything in the second word. 7775 - -3 in the first word of an entry implies the unit is assigned to the keyboard/reader. The second word is meaningless. The RUN command module will check to see if logical I/O units are assigned properly. At the current time, units 1- 3 are reserved for use as input units, and units 4- 6 are reserved for use as output units. Also at the current time, only a working area or the printer

190 may be assigned to an output unit. To assign a unit, one may use the construct UNIT=FDNAME, where UNIT is an integer between 1 and 6 inclusive, and FDNAME is the name of any currently existing file. To speed up typing, the RUN command module will also accept the following syntax: RUN COREIMAGE FILENAME UNIT1NAME UNIT4NAME.... where the COREIMAGEFILENAME is the name of the file containing the core-image to be loaded and run, UNIT1NAME is the name of an information source FD to be attached to logical I/O unit 1, and UNIT4NAME is the name of an information sink FD to be attached to logical I/O unit 4. The "...." is meant to signify the further assignment of I/O units using the UNIT= construct as well as a parameter specification if such are necessary. Any set of up to 6 FD names may be effectively formed into a name for a file having the contents of all files named by the use of the + concatenation operator. If unit 1 or unit 4 names appear, specification of unit 1 or 4 in the following UNIT= construct will override the names given in the free- standing context. The default FDNAMES for the logical I/O units are:

191 UNIT FDNAME 1 RDR (reader/keyboard 2 *DUMMY* 3 Unassigned 4 PTR (teleprinter) 5 *DUMMY* 6 Unassigned 7.4. 2 Parameter String Area. If the user supplies a parameter string in his RUN command via the "P=..." construct, the first 32 characters he supplies are copied in full 8-bit ASCII form into the parameter string area in the communication area. If the user supplies fewer than 32 characters, the string is padded on the right with trailing blanks. If the user does not supply a parameter string, the parameter string area is not disturbed and remains all zeros (as established by the RUN command module before input line scanning is initiated). The user program is responsible for scanning the string and decoding its contents in light of what options are available in the program. 7.4. 3 Update Key and Update Parameters. User programs (including systems-type programs) often produce files of information in the working areas. It is necessary to update the VTOC of the appropriate file tape if the working areas are thus changed. To do this, the

192 user program must deposit information describing the changed file (either -S or -B or both) into the communication area, and then set the update key in the area to certain values to tell the Control Program that working area descriptions must be updated. The locations and values of these parameters are given in the next section. 7.4.4 Memory Map of the Communications Area. LOCATIONS CONTENTENTS 17600 - 17613 Logical I/O unit 1 FD (file device) chain 17614 - 17627 Logical I/O unit 2 FD chain 17630 - 17643 Logical I/O unit 3 FD chain 17644 - 17657 Logical I/O unit 4 FD chain 17660 - 17673 Logical I/O unit 5 FD chain 17674 - 17707 Logical I/O unit 6 FD chain 17710 - 17747 Parameter string from user's RUN command (32 8-bit ASCII characters), or all zeros if no parameters specified. 17750 - 17764 Unused 17765 - 17767 -S updating parameters; starting block number, length in blocks, and contents attribute word respectively. 17770 - 17772 -B updating parameters; starting block number, length in blocks, and contents attribute word respectively.

193 LOCATIONS CONTENTS 17773 Tape unit number and tape block number of the next file on the tape after the core- image loaded by the last RUN command. Used for overlays in system programso 17774 - 17777 Working area updating key. The key area is set to zeros by the RUN command, and must be reset by the user program if it desires to have the entries for either -S or -B updated. The proper key is: -7402, -1, 1, 7402 in that order. Note that the Cold Start Bootstrap Loader sets location 17774 to -1 in order to indicate a cold start; this in turn causes the identifying comment "CPS(XXXXX)" to be typed out on the teleprinter. (See Cold Start Bootstrap Loader writeup, Chapter 2. )

194 7.5 System Messages Message No. Me ssage 1 LINE TOO LONG 2 CPS (AY219) 3 INVALID COMMAND 4 COMMAND NOT YET IMPLEMENTED 5?" NOT A SOURCE FILE 6 7 " DOES NOT EXIST 8 ENTER REPLACEMENT NAME OR < CR> 9 TOO FEW OPERANDS 10 INVALID FILE NAME 11 FILE SHOULD NOT BE DESTROYED 12 NO ROOM LEFT ON TAPE 13 REPLACE? 14 FILE CANNOT BE DESTROYED 15 FILE DOES NOT EXIST 16 INVALID OPERAND 17 UNIT 18 % #=END OF FILE 19 "NOT A CORE IMAGE 20 ILLEGAL I/O UNIT NO.

195 Message No. Message 21 IMPLICIT I/O- PARAME TER SYNTAX BAD 22 " BAD DIRECTION OF DATA TRANSFER 23 TOO MANY CONCATENATED FILES 24 BYE %c#### 25 ** TAPE ERROR OCCURRED IN ABOVE OPERATION, WILL ATTEMPT TO GO ON

CHAPTER 8 SYSTEM GENERATION 8.1 Introduction The following step by step procedure describes how to generate a working version of CPS on LINC tapes marked at 128 words/ block. A slight modification of this procedure will allow CPS to be generated for DECtape. The instructions assume that a MACR08like assembly system will be available to assemble the source code for CPS. It is also assumed that a program of the following sort is available: a utility program which will read binary paper tape into either core bank (thus encompassing the functions of the binary loader) and which will allow writing onto magnetic tape of selected portions of either core bank in the ratio of one page per tape block. An additional useful capability of this program would be to allow reading of tapes, thus allowing patching of information on the tape. We will call this program "PAPMAG". 8.1.1 Selection and Marking of Tapes. Obtain 2 reels of magnetic tape for the tape drives which are connected to the target machine. These should be formatted with at least 20008 blocks of 12810 words/ block. While it is theoretically possible for CPS to utilize up to 4000 block tapes, we are not certain that we have indeed kept the necessary 196

197 conventions throughout the system to allow this to be done, so only 20008 blocks will be used. Mark the 2 tapes with paper labels; one should read "CPS tape 0" while the other should read "CPS tape 1". 8.1.2 Preliminary Remarks on Magnetic Tape. CPS uses 3 different tape routines for general purpose applications as well as a read-only routine for certain system functions. For operation on a LINC-8, the routines IOCS3, FiTAPE, and PAGER are supplied. The DECtape user must generate his own versions of these routines, and moreover they must preserve the calling sequence of the LINC-8 routines if CPS is to be used without modification. IOCS3 is described in detail in Chapter 6 of this volume, and FlTAPE and PAGER are described in Chapter 5 of volume 4. 8.1.3 Preliminary Remarks on System Modules. If all system modules are assembled into binary paper tape form before attempting to build the system, it should be possible to generate CPS on a pair of tapes in half a day. Refer to the individual module sections in this chapter for instructions on how to assemble the source code for the various modules. The source code for the system modules is available in machinereadable form. The distribution of CPS (AY219) to Digital Equipment Corporation was done via the 4K CPS System, while the modules are available in-house at CEL on the CPS System Library Tape. Some of

198 the modules will also soon be available on paper tape. An alphabetical listing of the various source modules as they are named on the System Library Tape (names are the same for the DEC distribution) is given in Fig. 8.1. The entries are ordered via the standard ASCII collating sequence. 8.2 Cold Start Programs The two cold start programs are the first to go onto tape. They form a basis for building the rest of the system. The cold start boot loader will be put onto unit O after appropriate modification such that invoking it will cause PAPMAG to be read into core. The cold start error program will be put onto unit 1. 8.2. 1 Cold Start Boot Loader. Read in PAPMAG on the target machine using the standard DEC binary loader. Using PAPMAG, read in the binary tape produced by the assembly of the file CLDSTART. (DECtape users must provide their own version of this program.) Using PAPMAG, write PAPMAG out onto the unit 0 tape starting say at block 2. Using the console switches, patch the call to the readonly tape routine within CLDSTART so that when invoked it will read in the copy of PAPMAG which was just written onto the tape and then halt. Using PAPMAG, write this modified CLDSTART program onto block 0 of the unit 0 tape. From now on, when PAPMAG is needed it may be loaded simply by lifting the load switch. (DECtape users see next section. )

199 FILE NAME PART OF FILE NAME PART OF $ UT E2 ED ALl AL E3 ED AL2 AL E4 ED AL3 AL E5 ED AL4 AL EDBUFFNG ED BNKOPOOL CP EDFIX1 ED BNKlPOOL CP EDFIX2 ED BOOT CP EDFLD1 ED C1 FORT FiTAPE UT C2.FORT FILCPYSY FILECOPY C3 FORT INDEX CP C4 FORT IOCS30 IOCS3 C5 FORT IOCS31 IOCS3 C6 FORT IOCS32 IOCS3 C7 FORT IOCS33 IOCS3 CILDR CP IOCS34 IOCS3 CLDSTART CP IOSYMTAB IOCS3 CONSCAN CP LI RL DE STROY CP L2 RL E0 ED L3 RL E1 ED L4 RL FIG. 8.1. LISTING OF FILES COMPRISING SYSTEM COMPONENTS

200 FILE NAME PART OF FILE NAME PART OF L5 RL NUC10000 CP L6 RL NUC10200 CP L7 RL - NUC10400 CP L8 RL NUC10600 CP L9 RL NUC11000 CP L10 RL NUC11200 CP LCOMTBL AL NUC2000 CP LCOMPOOL AL NUC2200 CP LDRTAPE RL NUC2400 CP LOAD CP NUC3000 CP MOO ASM NUC3200 CP M02 ASM P0000 CP Ml 0 ASM SPAPRBIN PAPERBIN M12 ASM RUN CP M1 4 ASM SI SABR Ml 6 ASM S2 SABR M20 ASM S3 SABR M22 ASM S4 SABR M8PATCH ASM S5 SABR ME SSAGE S CP S6 SABR FIG. 8.1. (CONT. )

201 FILE NAME PART OF SAVE CP SIGNOFF CP SMOC T 10 UT SPAGER UT SPUNA UT STRWZ UT UNITBAD CP VTOCS CP FIG. 8.1. (CONT.) UT = UTILITY AL = ABSOLUTE LOADER CP = CONTROL PROGRAM FORT = FORTRAN COMPILER ED = TEXT EDITOR RL = RELOCATING LOADER ASM = ABSOLUTE ASSEMBLER

202 8.2.2 Suggested Cold Start Provisions for Machines without IPL Circuitry. The basis for the CLDSTART program is the LINC- 8 initial program load (IPL) circuitry. Most pieces of 8 equipment do not have such circuitry, and must rely on the rim loader/binary loader route for IPL. We suggest that a very small skeleton tape routine be written for such machines, and punched in RIM format. This skeleton tape routine can simulate the IPL hardware by reading in block 0 of the tape mounted on drive 0, and then transferring to location 0 in memory. The HELP loader system may also prove useful for loading this skeleton routine. In any event, there should be a well-defined method by which the control program can tell it has been invoked from a cold start. This is so that the system may configure itself, make certain it does not try to update working area descriptions using definitions left over from the last user, and the like. This problem will certainly require some thought in machines without IPL hardware as it would be desirable to leave a system boot loader in core between successive uses of the machine just as the binary loader remains in core on more basic systems. Perhaps the SIGNOFF command could leave a special cold start boot loader in page 7600. 8.2.3 Cold Start Error Program. Assemble the file UNITBAD and feed the resulting binary tape into the target machine using PAPMAG. Write the page of code just loaded onto block 0 of the

203 unit 1 tape. 8.3 Control Program Bootstrap Loader The control program bootstrap loader is stored in the file named BOOT; assemble this file and load the resulting binary paper tape into core using PAPMAG. Write the core page just loaded onto block 451 of the unit 0 tape. Note: DE Ctape users must supply their own version of BOOT; see Chapters 3 and 4 of this volume. 8.4 Core Image Loader The core image loader is assembled from the file CILDR. Read the resulting binary paper tape into core using PAPMAG, and write the core page occupied by CILDR out onto block 450 of the unit 0 tape. DECtape users may have to rewrite portions of this module as it interacts strongly with BOOT; see Chapters 3 and 4 of this volume. 8. 5 Prototype Communication Area The Control Program requires a prototype of the Communication Area on block 447 of the unit 0 tape. This area may be built from the console switches as follows. Deposit zeros in all locations on page 200 - i.e., in locations

204 200 - 377 incl. Deposit the following numbers: Locn Contents Function 200 7775 defaults unit 1 to RDR 214 7777 defaults unit 2 to *DUMMY* 244 7776 defaults unit 4 to PTR 260 7777 defaults unit 5 to *DUMMY* Using PAPMAG write page 200 onto block 447 of the unit 0 tape. This module is independent of whether the target machine uses LINCtapes or DECtapes. 8. 6 Establishmeht of Initial VTOCs The VTOC (file index) area on each reel of tape must be initialized. The file VTOCS contains the code which initializes these areas; it creates entries as follows: Unit 0 - -S, *VTOC0, *SVTOC0 Unit 1 - -B, *SVTOC, *VTOCI, *ALOADER, *RLOADER, *ED, *ASM, *FORTRAN, *SABR Assemble the code in VTOCS and read it into core using PAPMAG; then write page 2000 out onto block 400 of the unit 0 tape, and page 4000 out onto block 170 of the unit 1 tape. This operation is independent of the type of tape used on the target machine.

205 An assembly listing of the initial VTOC entries is given at the end of Chapter 5 of this volume. 8.7 Control Program The Control Program occupies both memory banks; because of current memory space limitations and lack of an appropriate assembler, each bank is assembled separately. Two files containing pools of definitions for symbols defined in one bank and used in the other are provided to allow the 2 banks of program to link properly. 8.7.1 Bank 1. Assemble the file BNKOPOOL+IOSYMTAB +NUC10000+NUC10200+NUC10400+NUC10600+NUC11000+NUC11200+$. The resulting binary paper tape should be loaded into core using PAPMAG. Finally locations 10000 - 11377 (6 pages) should be written onto blocks 150 - 155 of the unit 1 tape. This portion of the control program does not vary with the target machine. 8.7.2 Bank 0. Assemble the file IOCS30+IOCS31+IOCS32 +IOCS33+IOCS34+$. The resulting binary paper tape should be labeled "IOCS3" and saved. It will be used to build PAPERBIN (Section 8.9) as well as here. The DECtape user should substitute an equivalent controller here. Assemble the file IOSYMTAB+BNKiPOOL+P0000+NUC2000+ NUC22 00+NUC2 400+NUC 3000+NUC 32 00+INDEX+ DE STROY+SAVE+RUN

206 +CONSCAN+SIGNOFF+LOAD+MESSAGES+$. Label the resulting binary tape "CP" for "control program." Load IOCS3 into core (using PAPMAG); then load CP into core. IOCS3 must precede CP. Then write 378 blocks starting at core location 00000 onto the unit 0 tape starting at block 410. (Obviously PAPMAG must either sit in an unused area in the bank 0 portion of the Control Program, or else in bank 1.) The tape unit dependence for bank 0 of the Control Program is taken care of by having the user supply either IOCS3 for LINC-8 or his own controller for other pieces of 8 equipment. 8.8 A First Check A check will be made of the system as it stands on the tapes at this point. Using PAPMAG, transfer the copy of PAPMAG which is stored on the unit 0 tape over to block #2 of the unit 1 tape. Starting at location 200, toggle into core via the console switches a Descriptor Table for PAPMAG. For instance, if PAPMAG sits in a single contiguous set of pages starting, say, at 160008 and extending through 167778, and if it has starting address 16030, the Descriptor Table would read:

207 Loc Contents Remarks 200 4004 Last subimage to be loaded - 4 blocks long 201 0010 It goes in field I 202 6000 Starting at location 6000 203 0010 Start execution in field 1 204 6030 Start execution at 6030 in above field All other locations in page 200 may contain anything - they are not used. Using PAPMAG, write out page 200 onto block 1 of the unit I tape. You have now constructed a CPS core image file containing PAPMAG in a runable form. The next step will consist of invoking the Control Program. Deposit the following words into the Communication Area to tell the control program that PAPMAG is in -B. Loc Contents 17765 0000 17766 0000 17767 0000 17770 0001 17771 length in blocks of PAPMAG core-image file; for the above example, this would be 4 + 1 = 5 17772 0400 17774 0376

208 Loc Contents 17775 7777 17776 0001 17777 7402 Mount the unit 0 tape on drive 0, and read block 451 into page 07600; mount the unit 1 tape on unit I. Start the computer at location 7600 - the BOOT loader which you just read in should load and start the Control Program. Issue the command SAVE -B PAPMAG When this command has been completed, you should be able to run PAPMAG via RUN PAPMAG Run PAPMAG and use it to restore the locations patched on the cold start loader, block 0, unit 0 tape. After this is completed, lifting the IPL (LOAD) switch on the LINC console should load the Control Program directly. 8.9 Absolute Loader Assemble the file IOSYMTAB+LCOMPOOL+L1+L2+L3+L4+$. Load the binary tape into core and write from locations 3400 - 5777 (128 blocks) to block 240, unit 1 tape. Assemble the file LCOMPOOL+

209 LCOMTBL+$. Load the resulting binary tape into core and write the page just loaded (10600) out onto block 252 of the unit 1 tape. The absolute loader is an overlay on the Control Program, and thus its tape routine problems are taken care of by IOCS3 (or its equivalent). 8. 10 PAPE RBIN PAPERBIN will allow binary paper tape to be read into -B and subsequently to be saved in a CPS file. In conjunction with the absolute loader which was activated above, it will allow construction of the text editor and absolute assembler core-image files. Assemble the file IOSYMTAB+SPAPRBIN+$. Invoke PAPMAG using CPS, and load first the IOCS3 binary tape and then the binary paper tape just produced by the assembly of SPAPRBIN. Write core locations 0 - 1377 (6 pages) onto the unit 1 tape starting at block 2. Write core locations 2000 - 2577 (3 pages) onto the unit 1 tape starting at block 108. Toggle the following Descriptor Table into core memory using the console switches:

210 Loc'n Contents 200 0006 201 0000 202 0000 203 4003 204 0000 205 2000 206 0000 207 2000 Write page 200 out onto the unit 1 tape, block 1. Now using the console switches, alter the following locations in the Communication Area to the contents shown: Loc'n Contents 17765 0000 17766 0000 17767 0000 17770 0001 17771 0012 17772 0400 17774 0376 17775 7777 17776 0001 17777 7402 Using the console switches, start the computer at 7600. BOOT will load the Control Program which will then update the description of

211 -B to indicate that PAPERBIN is stored there. Execute the CPS command SAVE -B PAPERBIN After PAPERBIN is thus filed, it will be used to build the text editor and the assembler. The DECtape user will of course supply his own version of IOCS3. 8.11 Text Editor Assemble the file EO+E1+E2+E3+E4+E5+$. Cycle up CPS and run PAPERBIN; read in the binary paper tape produced by the assembly and save -B into the file "EDi". Similarly, assemble EDBUFFMG and save the binary code in the file "ED2". Assemble EDFLDI and save in "ED3"; assemble EDFIX1 + $ and save in "ED41'; assemble EDFIX2 + $ and save in "ED5". Assemble SPAGER and save in "PAGER". Invoke the absolute loader and build the editor by issuing the following CPS commands: LOAD ABS GET EDI GET ED2 GET ED3

212 GET ED4 GET ED5 GET PAGE R @10400 REP 10503 6211 REP 10505 6211 REP 10536 6211 REP 10540 6211 BUILD supply starting address of 10200 SAVE -B *ED! The DECtape user will have to supply his own tape routine in place of SPAGER. This routine must be set up to read into and write from memory bank 1. 8.12 Absolute Assembler Assemble the file M8PATCH and using PAPERBIN read the resulting binary tape into CPS and save it in the file "ASMPATCH". Similarly assemble MOO+M02+M10+MI2+M14+M16+M20+M22+$ and save it in a file named "ASMBNKi". Assemble the DEC MESAGE routine, DIGITAL-8-18-U at location 1600 and read the binary paper tape into a- CPS file named MESAGE. Read the paper tape produced by an assembly of FiTAPE into a CPS file named "FlTAPE". Finally, feed in the MACRO8 assembler binary tape, DEC-08-CMA1-PB, using

213 PAPERBIN, and save -B into ASMBNK0. Now invoke the absolute loader and build the assembler by issuing the following CPS commands. LOAD ABS GET ASMBNKO GET MESAGE @11 600 GET ASMBNK1 GET ASMPATCH GET FITAPE @10600 BUILD supply starting address of 10200 SAVE -B *ASM! The DECtape user will have to supply his own routine in place of FiTAPE. This routine must be set up to read into and write from memory bank 1. 8.13 Final Cleanup Issue the following CPS commands to remove nonexistent files from the file index and to move *ED and *ASM as close to the beginning of the binary file area as possible. This last is done so that *ED and *ASM can be run as quickly as possible since they are the most-used programs in the system.

214 DESTROY *SABR! DESTROY *FORTRAN! SAVE PAPMAG DUMMY DESTROY PAPMAG SAVE DUMMY PAPMAG SAVE PAPERBIN DUMMY! DESTROY PAPERBIN SAVE DUMMY PAPERBIN DESTROY DUMMY 8.14 Remarks on Mass Storage Device Independence CPS was written to take advantage of the mass storage capability of the LINC tapes attached to the LINC-8. Thus mass storage device addresses for files are given in terms of "unit zero" and "unit one"', following LINC conventions, and this is reflected in the fact that one and only one bit (for two devices) is allocated in each file control block entry for a mass storage device address. If one is attempting to set up CPS to use 2 DECtapes where device addresses are 3 bits wide, note that the DECtape routine can by convention interpret the single unit address bit in a file control block to be either of two 3-bit wide, predetermined DECtape unit addresses. A more general solution to the problem of specifying device addresses would be to dispose of the "source", "sink", and "do not destroy" bits in the sixth word of the file control block, and use some

2-15 of the bits in this sixth word in conjunction with the extant device address bit to specify type of device, i.e., disk or tape or drum, and device address. These bits could then be interpreted by the file access routines so that actual I/O operations could be delegated to the proper device support routine.

Security Classification DOCUMENT CONTROL DATA - R&D (Security claeiflJcation of title, body of abstract and Indexing annotation must be entered when the overall report ie classilied) 1. ORIGINATING ACTIVITY (Corporate author) 2a. REPORT SECURITY C LASSIFICATION Cooley Electronics Laboratory UNCLASSIFIED The University of Michigan - 2 GROUP Ann Arhnr, Miehigan 3. REPORT TITLE CPS Program Logic Manual Volume I -- CPS SYSTEM ARCHITECTURE AND CONVENTIONS 4. DESCRIPTIVE NOTES (Typo of report and Inclfuive dates) Technical Memorandum No. 102-I - 03674-23-M February 1970 5. AUTHOR(S) (Last name. first name, initial) Cederquist, G. N. and Metzger, K. 6.O EPO RT DATE i. TOTAL NO. OF AGE b. NO. OF RE February 1970 223 Ba. CONTRACT OR GRANT NO. 9a. ORIGINATOR'S REPORT NUMBER(S) Nonr-1224(36) TM102-I b. PROJECT NO. NR187- 200 c. e. OTHER R PORT NO(S) (Any othernumbers that may be assigned Uae report) d. 03674-23-M 1 0. A V A IL ABILITY/LIMITA TION NOTICgS Reproduction in whole or in part is permitted for any purpose of the U. S. Government. 11I.SUPPLEMENTARY NOTES 12. SPONSORING MILITARY ACTIVITY Office of Naval Research Department of the Navy Washington, D. C. 20360 13. ABSTRACT CPS is a generalized programming and file management system written for use on the PDP-8 processor of Digital Equipment Corporation's LINC-8 computer. A minimum memory size of 8192 words is required. Extensive use is made of the two tape units present on every LINC-8 for both file storage and system residence. The four volumes entitled CPS System Architecture and Conventions, CPS Basic Programming Package, CPS 8-K FORTRAN Package, and CPS System Utility Programs were written in order to take a snapshot of CPS at one point in its continuing development. This version of CPS is considered to be a first generation system; successive versions are on the drawing boards and internally resemble their parent less and less every day. DD ~* JN 64 1473 Security Classification

Security Classification 11~ I LINK A LINK B LINK C ~KEY WORDS ROLE WT ROLE WT ROLE T Digital Computer Programming System PDP-8 LINC-8 INSTRUCTIONS 1. ORIGINATING ACTIVITY: Enter the name and address imposed by security classification, using standard statements of the contractor, subcontractor, grantee, Department of De- such as: fense activity or other organization (corporate author) issuing (1) "Qualified requesters may obtain copies of this the report. report from DDC." 2a. REPORT SECURITY CLASSIFICATION: Enter the. over- (2) "Foreign announcement and dissemination of this all security classification of the report. Indicate whether report by DDC is not authorized" "Restricted Data" is included. Marking is to be in accordance with appropriate security regulations. (3) "U. S. Government agencies may obtain copies of this report directly from DDC. Other qualified DDC 2b. GROUP: Automatic downgrading is specified in DoD Di- users shall request through rective 5200. 10 and Armed Forces Industrial Manual. Enter the group number. Also, when applicable, show that optional markings have been used for Group 3 and Group 4 as author- (4) "U. S. military agencies may obtain copies of this ized. report directly from DDC Other qualified users 3. REPORT TITLE: Enter the complete report title in all shall request through capital letters. Titles in all cases should be unclassified. If a meaningful title cannot be selected without classification, show title classification in all capitals in parenthesis (5) "All distribution of this report is controlled. Qualimmediately following the title. ified DDC users shall request through 4. DESCRIPTIVE NOTES: If appropriate, enter the type of.i... report, e.g., interim, progress, summary, annual, or final. If the report has been furnished to the Office of Technical Give the inclusive dates when a specific reporting period is Services, Department of Commerce, for sale to the public, indicovered. cate this fact and enter the price, if known. 5. AUTHOR(S): Enter the name(s) of author(s) as shown on 11. SUPPLEMENTARY NOTES: Use for additional explanaor in the report. Entet last name, first name, middle initial. tory notes. If.military, show rank and branch of service. The name of the principal au.thor is an absolute minimum requirement. 12., SPONSORING MILITARY ACTIVITY: Enter the name of the departmental project office or laboratory sponsoring (pay6. REPORT DATE: Enter the date of the report as day, ing for) the research and development. Include address. month, year; or month, year. If more than one date appears on the report, use date of publication. 13. ABSTRACT: Enter an abstract giving a brief and factual summary of the document indicative of the report, even though 7a. TOTAL NUMBER OF PAGES: The total page count it may also appear elsewhere in the body of the technical reshould follow normal pagination procedures, i.e., enter the port. If additional space is required, a continuation sheet shall number of pages containing information. be attached. 7b. NUMBER OF REFERENCES: Enter the total number of It is highly desirable that the abstract of classified reports references cited in the report. be unclassified. Each paragraph of the abstract shall end with 8a. CONTRACT OR GRANT NUMBER: If appropriate, enter an indication of the military security classification of the inthe applicable number of the contract or grant under which formation in the paragraph, represented as (TS), (S), (C). or (U) the report was written. There is no limitation on the length of the abstract. How8b, 8c, & 8d. PROJECT NUMBER: Enter the appropriate ever, the suggested length is from 150 to 225 words. military department identification, such as project number, 14. KEY WORDS: Key words are technically meaningful terns subproject number, system numbers, task number, etc. or short phrases that characterize a report and may be used as 9a. ORIGINATOR'S REPORT NUMBER(S): Enter the offi- index entries for cataloging the report. Key words must be cial report number by which the document will be identified selected so that no security classification is required. Identiand controlled by the originating activity, This number must fiers, such as equipment model designation, trade name, military be unique to this report. project code name, geographic location, may be used as key 9b. OTHER REPORT NUMBER(S): If the report has been words but will be followed by an indication of technical conassigned any other report numbers (either by the' oriinator text. The assignment of links, rules, and weights is optional. or by the sponsor), also enter this number(s). 10, AVAILABILITY/LIMITATION NOTICES: Enter any limitations on further dissemination of the report, other than those Security Classification

UNIVERSITY OF MICHIGAN 3 015 02086 6250111111111 3 0502086 6250