Digital PDFs
Documents
Guest
Register
Log In
DEC-08-ORTMA-C-D
February 1977
163 pages
Original
6.5MB
view
download
OCR Version
6.4MB
view
download
Document:
lilgliltlall RTS/8 User’s Manual
Order Number:
DEC-08-ORTMA-C-D
Revision:
0
Pages:
163
Original Filename:
DEC-08-ORTMA-C-D_RTS8_V2B_UsersMan_Feb77.pdf
OCR Text
=. = s User’s Manual Order No, DEC-08-ORTMA-C-D RTS/8 User’s Manual Order No, DEC-08-ORTMA-C-D Version 2B digital equipment corporation - maynard, massachusetts First Printing, June Revised: September 1975 February 1977 1974 The information in this document is subject to change without notice should not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no respons ibility for any errors that may appear in this document. and The software described and may be used license. or in this document copied only in is furnished under accordance with the terms Digital Equipment Corporation assumes no responsibility or reliability of its software on equipment that is not DIGITAL. Copyright (C) COMMENTS The of Digital are trademarks critical such for the use supplied by form on the last page of this evaluation to assist us in pre- Equipment Corporation: DIGITAL DECsystem-10 DEC MASSBUS DECtape OMNIBUS PDP DIBOL DECUS 0S/8 EDUSYSTEM PHA UNIBUS FLIP CHIP RSTS COMPUTER LABS COMTEX FOCAL INDAC DDT TYPESET-8 LAB-8 DECCOMM DECsystem-20 TYPESET-10 RTS/8 license of 1974, 1975, 1977 by Digital Equipment Corporation The postage prepaid READER'S document requests the user's paring future documentation. following a RSX TYPESET-11 CONTENTS Page vii PREFACE CHAPTER CHAPTER 1 INTRODUCTION 1-1 1.1 1.2 RTS/8 DESCRIPTION REAL-TIME SYSTEM OPERATION 1-1 1-2 2 USING TASKS UNDER RTS/8 2-1 2.1 2,2 THE STRUCTURE OF RTS/8 TASKS CONCEPTS OF TASK COMMUNICATION 2-1 2-1 2.2,2 2.3 Intertask Messages EXECUTIVE INTERNAL TASK TABLES 2=2 2-3 2-5 3 RTS/8 EXECUTIVE REQUESTS 3-1 3.1 COMMUNICATION WITH THE RTS/8 EXECUTIVE 3-1 3.4 3.5 USING INTERRUPTS IN RTS/8 EXECUTIVE REQUEST WAIT STATES 3-9 3-12 2.2.1 CHAPTER 3.2 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.3 3.3.1 3.3.2 3.3.3 3.3.4 CHAPTER Task Synchronization Through the Use of Event Flags ERs USED TO COMMUNICATE BETWEEN TASKS SEND - Send Messade WAITE - Wait on Event Flag SENDW - Send and Wait RECEIVE - Receive Message POST - Post Event Flag Example of ERs for Message and Event Flags ERs USED TO SET AND CLEAR TASK FLAGS BLKARG - Block Task for Specified Reason UNBARG - Unblock Task for Specified Reason SUSPND - Suspend a Task's Execution RUN - Run a Task 3-1 3=-2 3-3 3-3 3-3 3-4 3-5 3-6 3-6 3-8 3-8 3-8 4 RTS/8 SYSTEM TASKS 4-1 4,1 4,1.1 4,2 CLOCK HANDLER Examples of Clock Handler Calls TERMINAL HANDLER 4-2 4-4 4-4 Terminal Handler Properties Useful Equates in the Parameter File Examples of Terminal Handler Messages LINE PRINTER HANDLER MASS STORAGE HANDLERS Floppy Disk Handler LINCtape Handler Example of Mass Storage Handler Call POWER FAIL TASK 0S/8 SUPPORT TASK 4-7 4-9 4-9 4-10 4-11 4-13 4-16 4-18 4-18 4-19 4,2.1 4,2,2 4.2.3 4.3 4.4 4.4,1 4,4.2 4.4.3 4,5 4.6 4.6.1 Additional Assembly Parameters Affecting Mapping of Fields with 0S/8 Support Task iii 4-20 CONTENTS (Cont,) Page 4,7 4,7.1 4,7.2 4,8 4,9 0S/8 -~ RTS/S8 Using Other the A0 4,9.2 AI DI 4.9.5 Digital GC Input 4.9.6 4,9,7 Generic EC RC Code Enable Counter Read Counter 4.9.10 €S DCT 4.10 4.10.1 4,10.2 4.11 4.12 4,13 4,13.1 4,13.2 4,13.3 4,13.4 (UDC/ICS) HANDLER 4-26 4-27 4-27 4-27 4-28 4-29 4-29 4-29 of State Disable Contacts 4-30 4-30 UDC/ICS Assembly Parameters Error 4-31 Conditions CASSETTE HANDLER Handler Function Utility Function CASSETTE FILE SUPPORT HANDLER PDP-8A NULL TASK KL8-A SUPPORT Executive KL8-A Support TTY Task KL8-A Support KL8~A Support for the 0S/8 Support 4,14 for 5 MONITOR ROUTINE 5.1 MCR COMMAND ARGUMENTS MCR COMMANDS DAte [mm/dd/yyyy [,Time-of-day]] 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 5.2.9 5.2.,10 5.2.11 5.2.12 5.2.13 5.2.,14 5.3 TIme a User 4-31 4-32 4-32 4-34 4-35 4~37 4-37 4-37 Task Task 4-38 4-39 5-1 5-1 5=-2 5-2 [Time-of-day ] NAme Task-ID,Newname REquest Task-ID [, (@Time-of-day [,Intervall] STop Task-ID DIsable Task-ID 5=2 5-2 ! Interval) 5-3 5-4 5-4 ENable Task-ID CAncel Task-ID SYstat 4-38 4-39 CONSOLE 5-4 5=4 [Task-ID] OPen Address 4-23 4-24 cChange UDC/ICS 4-22 4-25 KL8~A Support EXIT TASK 5.2 CHAPTER 4-21 DC Disable Counter ECT Enable Contacts 4,9.11 4.9,13 CHAPTER DO SUBSYSTEM Analog Qutput Analog Input Digital Output 4,9.4 4.,9.12 4-21 FILE SUPPORT TASK UNIVERSAL DIGITAL CONTROLLER/INDU STRIAL CONTROLLER 4,9,.,8 4.9.9 (0Os8COM) 05/8 4.9.1 4,9.3 COMMUNICATION 0S8COM Task Techniques 5=-4 [,Count) EXamine Address [,Count] DEposit Address,Word [,Word] POst Address 5=5 [,Word] EXIT 5-6 .... 5-6 5-6 5-6 5.4 MCR ERRORS NONRESIDENT MCR 6 ASSEMBLING AND 6.1 6.1.1 PARAMETER FILE STRUCTURE Executive Specifications 5-6 5-6 LOADING iv TASKS FOR RTS/8 6-1 6-1 6-2 (Cont.) 6.6.1 6.6.3 6.6.4 6.6.5 6.6.6 6.6.7 6.6.8 B B T T 7.1 7.1.1 7.1.2 OVERVIEW Writeable Tasks Checkpointable Tasks 7.1.3 7.2 7.2.1 Interaction Between Tasks MEMORY PARTITIONS FREE Command 7.3 NONRESIDENT TASK 7.3.1 7¢3.2 7.3.3 7.4 7.4.1 7.5 Parameters for Nonresident Tasks Assembling Nonresident Tasks Creating the SAVE Image File PARAMETER INITIALIZATION FOR PARTITIONS General Information NONRESIDENT TASK IMPLEMENTATION 8 DEMONSTRATION PROGRAM 8.1 8.2 8.2.1 8.2.2 MODIFIED PARAMETER FILE (PARAM.PA) NONRESIDENT TASK LISTINGS Nonresident Task NR20 Nonresident Task NR22 8.3 ASSEMBLY AND 8.4 NONRESIDENT 9 ADVANCED RTS/8 PROGRAMMING TECHNIQUES 9.1 PERFORMING A RESCHEDULE Switching 9.2.2 9.2.3 WAITX - Wait for Exactly This Event Flag DERAIL - Derail a Task's Execution v N I Dangers of DERAIL 9.2.3.2 Restrictions Using DERAIL 9.3 STARTING PARTITIONS AT AN ARBITRARY BOUNDARY 9.4 DIRECT REFERENCES TO SYSTEM TABLES [I 9.2.3.1 N N EXECUTIVE REQUESTS FOR ADVANCED APPLICATIONS WAITM - Waiting for Multiple Event Flags BN B Inhibiting Task 9.2 9.2.1 N Writing Delicate Code N EXECUTION N 9.1.2 LOAD PROCEDURE TASK ASSIGNMENT AND NNIJUUtd 9.1.1 = O o INITIALIZATION oo uTldkd WWWWH NONRESIDENT TASKS NN N 7 NN NN NN NN EXIT Task O CHAPTER T 0S/8 Support Task Parameters KL8-=A Support Parameters Line Printer Handler Parameters DECtape Handler Parameters 6.6.9 CHAPTER [[ Clock Handler Parameters Swapper Parameters Terminal Handler Parameters Monitor Console Routine Parameters 6.6.2 CHAPTER Setup B Task CREATING AN RTS/8 SYSTEM USING THE 0S/8 BITMAP PROGRAM SAMPLE RTS/8 TASK PROGRAM USE OF CONTROL FILES UNDER RTS/8 RTS/8 SYSTEM TASK PARAMETERS O WOWWYWWWOWWOWYWWYWWYWOW 6.2 6.3 6.4 6.5 6.6 ANTAAN 6.1.5 HEWOINUTESWWN Task Definitions System Task Specifications System Wide Definitions AN 6.1.2 6.1.3 6.1.4 DN ") o Q ® CONTENTS CONTENTS (Cont.) Page APPENDIX A RTS/8 DISTRIBUTED APPENDIX B RTS/8 COMPONENT APPENDIX C RTS/8 FLOWCHARTS C-1 APPENDIX D RTS/8 ASSEMBLY D-1 APPENDIX E EXECUTIVE SOURCE FILES A-1 SIZES B-1 ERROR MESSAGES INTERNAL TASK TABLES E-1 GLOSSARY Glossary-1 INDEX Index-1 FIGURES FIGURE 2-1 7-1 B-1 Message Format and Linking of Messages Nonresident Task Implementation RTS/8 System Memory Map (Default Memory 2-4 Executive E-5 7=2 Allocation) E-1 Internal Task B~4 Table Structure TABLES TABLE 1-1 RTS/8 2-1 3-3 Summary of Event Flag States Summary of Executive Requests Symbolic Names for Specifying WAITBITS Summary of Wait States Incurred by Executive 4-1 Summary 9-1 Summary B-1 RTS/8 Component MCR Component Size 3-1 3-2 System Tasks Requests of Terminal Default Vvalues B=-2 of Task Handler Assembly Switching Flag Sizes vi 1-2 2-3 3=2 3=-7 3-12 Parameter (TSWFLG) States 4-9 9-4 B-1 B-5 PREFACE ime Operating System (RTS/8) . This manual describes the PDP-8 Real-T ge programming (PAL8) is essential Knowledge of PDP-8 assembly langua of this manual. In addition, the user for a complete understanding should be familiar with real-time systems in general and with the The for the PDP-8, 0S/8. system t opmen operation and use of the devel 1is ” iques Techn mming Progra RTS/8 ced "Advan 9, r Chapte in information has user the after read be should It for the experienced RTS/8 user. gained familiarity with RTS/8. ed and expanded to This version of the manual has been enlarg es include Major The incorporate several new RTS/8 features. EXIT Task,featur two new and the Task, Null KL8-A Support, PDP-8/A on entati implem ident the nonres Executive Requests. Other features are facili 0S/8 the allows that ty OS8COM an t, of the MCR, UDC/ICS suppor files that allow the user system to talk to an RTS/8 task, and controlRTS/8 flowcharts have been . copies to efficiently make multiple task added to show system operation. The following PDP-8 handbooks will be helpful for review and reference: INTRODUCTION TO PROGRAMMING (DEC-08-XINPA-A-D) SMALL COMPUTER HANDBOOK (90P45) 0S/8 HANDBOOK (DEC-S8-OSHBA-A-D) UDC8 UNIVERSAL DIGITAL CONTROL SUBSYSTEM MAINTENANCE MANUAL (46H745) PDP-8A MINICOMPUTER HANDBOOK (EB0621976) 1CS8 INDUSTRIAL CONTROL SUBSYSTEM MAINTENANCE MANUAL (EKOICS8MM) vii CHAPTER 1 INTRODUCTION 1.1 RTS/8 DESCRIPTION of RTS/8 is a compact real-time system designed for the PDP-8 family to tasks 63 to up allows processors (except the PDP-8/S). This system basis. priority fixed a on s resource for compete and ntly run concurre It can be used for a wide range of applications in which a number of e processes must be monitored and controlled. As with other real-tim systems, RTS/8 responds to physical or conceptual events to permit the timely execution and. scheduling of tasks. The RTS/8 Executive controls execution and interaction among all The Executive decides which tasks should run (based on the tasks. priorities of the runnable tasks), and services the tasks by means of (ERs). Executive Requests RTS/8 system tasks A task is the basic program unit within RTS/8. (DEC-supplied) and their file names are listed in Table 1-1. The system supports both resident and nonresident tasks. A resident task resides permanently in memory; a nonresident task is one in which the major portion of the task resides on a mass storage device and is loaded into memory only when that task becomes executable. Using nonresident tasks permits portions of several tasks to share the areas of memory, providing economical use of memory. same RTS/8 includes system tasks that control most standard DIGITAL 1I/0 devices. A full complement of peripherals is supported, including RKS8 and RK8-E moving-head disks, DF32 and RF08 fixed-head disks, TCO08 DECtape, RX8 floppy disk, LINCtape, DEC cassette, and LE8 and LS8E The Monitor line printers (RTS/8 does not support TD8E DECtape). Console Routine (MCR) task provides an interface between the user at the console terminal and the system. The MCR provides the user with a series of commands to control, inspect, and, to some extent, debug the They system. The MCR commands are straightforward and easy to use. intervals, specified at tasks execute and schedule to allow the user suspend task execution, and print system status reports. A system task also is provided that allows a single copy of the 0S/8 operating system to run in the background, creating a real-time foreground-0S/8 background system. With 0S/8 in the background, the user has the facilities for program assembly, debugging, and editing. The minimum RTS/8 hardware configuration required for a foreground only system is a PDP-8 family processor, 4K words of memory, and a A system capable of console terminal capable of papertape input. running a real-time foreground and 0S/8 in the background reguires a PDP-8 family processor with KM8-A, KM8-E or TSS-8 Time Sharing options, a mass storage device (such as an RK8E cartridge disk or RXS8 floppy disk), and two terminals (one must be dedicated to 0S/8 system execution). ‘ INTRODUCTION RTS/8 tasks are created by editing the RTS/8 master parameter produce Task a parameter source files file are that then describes assembled the with user's the edited using the PAL8 assembler. The assembler can run the OS/8 support system under RTS/8. Then using all task binaries are joined into a complete Table RTS/8 Task Name File - Name System RTS8.PA null task 0S8 PWRF . PA CLOCK blank. RTS/8 Executive Console Support OS/8 File Handler LPT LPT.PA DTA RK8 Task Task Task Driver Task DTA.PA Printer Driver Task TC08 RK8.PA DECtape Driver RK8 Task RKS8E.PA Driver RK8E Disk Driver RF08.PA RF08/DF32 Task Task Fixed-Head Disk Task CsA CSA.PA CSAF CSAF.PA UDC/ICS UDCICS.PA RX8A RX01RT.PA Cassette Cassette files. Routine Line Disk to Task Fail Clock inserted parameter Support Power Terminal with ' 0S/8 CLOCK.PA file be task TTY.PA RF08/DF32 file Appropriate specific TTY RKS8 Function should Monitor PWRF Task create Null 0S8SUP. PA system. values MCR.PA OS8SUP. PA RTS/8 parameter MCR.PA OS8F parameter either under 0S/8, or ABSLDR under 0S/8, Tasks equates MCR to system. 1-1 System PARAM. PA file particular Driver File Universal Task Support Digital Controller Driver Task Controller/Industrial Subsystem Floppy Disk Handler Handler Task (1lst controller) RX8B RXO01RT.PA RX8C Floppy RX01RT.PA Disk Handler (2nd Floppy Disk Handler controller) Floppy (3rd Disk Handler (4th controller) controller) RX8D RXO01RT.PA LTA LTA.PA SWAPPER NULLS8A EXIT.PA REAL-TIME SYSTEM A Driver Nonresident NULLS8A.PA EXIT 1.2 LINCtape SWAP.PA Null Task Exit Task Task Task for swapper PDP-8A OPERATION multiprogramming available resources (such convention since "subroutine." it overlaps Multiprogramming allows system a software framework as that allows memory, CPU time, and peripheral devices) to be share by d several tasks. Basically, a task is a portion of machine code that performs a specific function; a task is defined by simultaneously. because it blocked switched system by to is If a waiting tasks the to task cannot for completion some other another task efficiency. many with use definitions be in some available of an of "program" state central I/0 condition), the central to use the available time, of execution processor operation (or time is can be increasing processor thus and INTRODUCTION run Most real-time systems are required to serve a group of tasks that compute being between e alternat and ies frequenc or at varying times bound or I/O bound. If machine resources are to be efficiently r used, these tasks cannot be run in series since the central processo will In be poorly utilized during the periods the tasks are I/0O bound. and tical time-cri lly essentia are tasks e addition, most real-tim should not wait for a slow, less important I/O or compute bound andtaska Thus, multiprogramming to finish before being executed. processor provide maximum central the ng scheduli priority scheme for resource utilization. 1in Thus, a real-time system is a multiprogramming system that to must, critical quickly respond , features addition to the multiprogramming to internal or external events. The real-time system is required suspend the operation of a less important task and start the task that deals with the critical event. A priority scheme establishes the relative importance of various tasks in the system. This allows a less important task to be interrupted to For RTS/8, a fixed permit execution of a critical real-time task. 1is simple and scheme a such because chosen was scheme priority reliable, and requires low scheduling overhead. CHAPTER 2 USING TASKS UNDER RTS/8 2.1 THE STRUCTURE OF RTS/8 TASKS in The RTS/8 Executive is the controlling program an RTS/8 System. The Executive decides which task should run based on the priorities of the runnable tasks (those tasks not waiting for completion of any 1I/O It also provides services to the tasks by means of or other events). Executive Requests are discussed in Chapter 3. Reguests. Executive The user assigns unique task numbers to each task in an RTS/8 System. He can assign up to 63 (77 octal) task numbers, and must account for once A task number, system tasks within the total number of tasks. assigned, cannot change during the execution of the program, since RTS/8 uses a fixed priority system. Task numbers serve the following purposes: 1. The task number is used by the RTS/8 Executive as an index to system tables which contain information about each various task. 2. other The task number is used by tasks in the system to reference a particular task when performing certain Executive Requests (such as sending a message). priority - the lower The Executive uses five internal tables to maintain information about 3. The task number determines the the tasks in the system. in 2.2 task's the task number, the higher the priority of the task. Section 2.3. A brief description of these tables is given CONCEPTS OF TASK COMMUNICATION RTS/8 is event driven, i.e., the highest priority runnable task executes continuously until it is completed or some event or condition in the system causes it to be suspended. Another change or condition can reactivate the task. Tasks can be self-starting if assembled to run at system startup, started by another task, or started by the user at the terminal console using the MCR task. RTS/8 performs two main types of task communication, as follows: 1. Task synchronization through the use of Event Flags 2. Intertask messages USING 2.2.1 Task Whenever Synchronization two wait until illustrated PDP-8, by must ready a now first from the in occur RTS/8 Use of independently, a loop TSF; that physical 2) conceptual Event one Flags process may need character, (TLS) loop if with the to signal alerts the instruction. to it wishes to terminal The do PDP-8 further with Event Flags each other. contains the status processes such as a of a An signalling Event Flag exits mechanism is event. a to user-chosen The events are either ticking or a valve closing, or certain string of characters typed clock occurrences such as scheduling or as an 1/0 next character until the that it is finished printing the flag is raised, the PDP-8 then proceeds to load the next character. provides operator first JMP.-1 When and tasks 1) the Sequence cannot proceed its ready flag RTS/8 synchronize the the generate character. wait location Through Teleprinter wait Similarly, by to Load immediately. It terminal raises the UNDER the execution of the other is finished. This can be by using the PDP-8 terminal interface as an example. The when issuing processes TASKS a a task for execution. Like device Flag can signify either a busy or a completed state, defined as PENDING (>0) and FINISHED (=0), respect ively. Thus, a task can direct another task via a message to perform a specified action, at which time it sets a mutually-agreed upon Event Flag to the PENDING value. When the second task has completed the specified action it flags, sets the an the Event Event waiting then from has Event Flag. for the Flag to As simple a Event the Flag with /LOAD EVENT TAD Event SZA CLA /IF JMP .-2 /KEEP the Posting its Flag 1loop, completed its FINISHED example, EVENT the value; if this the is known first task instructions: FLAG IN as Posting has been AC FINISHED, SKIP TRYING of the Event Flag will continuing on with the processing. cause the knowledge first task to that the second exit task Since this loop ties up the PDP-8 processor, Event Flags under RTS/8 have an additional state, WAITING (<0). Using the example just cited, the addition of the WAITING state now allows the first task to tell the RTS/8 Executive signifying the saves the Wait bit in WAITING the contents its state. that status Task The of taken set, WAITING task's Task Executive Request out of Event Flag the when waiting state Number. call, Wait task is higher RTS/8 wants second for an When the the by task would look WAIT is as until Event The Event Event WAITING Flag is Flag for it (If no other runnable, and will blocked.) WAITE is the an Event fully in Flag. octal is Flag monitor PC and sets the Event Event Flag is set to RTS/8. for the FINISHED. again priority tasks are Executive Request that Waits This code to task of the waiting task's Flags Table Word. The waiting RTS/8 it the 4000 Flag the plus POSTed via an automatically blocking bits are is resume execution mnemonic for the follows: CAL WAITE event All flag Executive Event Flag Requests states is are shown described in Table 2-1. Chapter 3. A summary of USING TASKS UNDER RTS/8 2-1 Table Summary of Event Flag States Value Event Flag State FINISHED 2.2.2 (posted) 0 PENDING >0 WAITING <0 (4000 + Task No.) Intertask Messages to hardware device Just as Event Flags under RTS/8 are analogous nding hardware I/0 data-se to us analogo are messages flags, a task, start s message is, That TLS). , example (for instructions time, same the at and , message a providing the task 1is WAITING for by tted transmi are s Message task. the to tion they pass informa Executive Reguests. d by An RTS/8 message consists of a three-word Message Header followe between ed exchang be to tion informa of any number of contiguous words The RTS/8. two tasks. The Message Header is used exclusively by . message the for Flag Event the first word of the Message Header is to Flag Event the sets ve Executi RTS/8 the sent, When the message is sent but the PENDING state. This signifies that the message has beenreceipt of upon Flag Event the to occurs action not yet completed. No the that s require RTS/8 , however task; ng receivi the by message the performed the action receiver POSTs the Event Flag when it has This posting serves two . message the by ) implied (or specified purposes: 1. 2. It informs the task which sent the message (the that the requested action has been completed, and "sender") It allows the message to be sent again (see Item 2 below). uses If multiple messages are waiting to be received by a task,to RTS/8 these link Header Message the of words third and second the is a CDF (Change messages together (see Figure 2-1). The second wordmessage . The third next the of field the to tion instruc Field) Data 0 signifies of word second A word is the address of the next message. actively not is task ng receivi the If . message last the is that this task's g receivin the on placed waiting for a message, the message is ing decreas of order in queued then are Messages Queue. Message Input from sent s Message . number) priority of the sender (increasing task the same task are queued in the order in which they were issued. USING TASKS RTS/8 EXECUTIVE UNDER RTS/8 , MSGTBL MESSAGE 1 MESSAGE 2 MESSAGE 3 CDF Event Flag Event Flag Event Flag PTR CDF CDF 0 PTR PTR Message Header \ Message Content Figure The a rest of message receiving of the It should into 1. 2. Message the message does not task, first the 2-1 but data be word noted Data the in a Event The same Event can contain physically provides of that receiver's the is Linking any desired move the receiver information has the Messages information. message with in of the a field message following the cannot be sent the a first is second time. the It is legal for the receiving the body of the message. message a can return task sends the driver in a error be returned message a places specific word occurred. the in to In without back message task to the error the the to this the not time store way, an disk For the copied while before its enforces this operation and the message information "answer" to complications sender. to address sender RTS/8 by checking the message Event Flag on a SEND putting the sender into Event Flag Wait if still PENDING. 3. and implications: not be modified by message is PENDING. FINISHED Sending information should for message and message. This message Flag the the area. Flag Format of example, is in the sending when a driver task requesting 1/0, status of the completed operation message to indicate whether an USING TASKS UNDER RTS/8 2.3 EXECUTIVE INTERNAL TASK TABLES maintain information about The Executive uses five internal tables to ption of these tables is as descri brief A the tasks in the system. follows: Description Table Task State Table (TSTABL) Contains as the Task Flags Table (TFTABL) Contains information about why the task information such contents of the task's PC, Link and AC at the time the task stopped running. is not running, i.e., it indicates for what conditions (blocking or wait bits) the task is waiting. Task Input Message Queue Header Table (MSGTBL) Contains messages that have been sent to this task. This table is referred to Residency Table (RESTBL) Used for nonresident tasks, simply as the Message Table. this table specifies where the task is to reside in memory, and where it resides on the swap device. Partition Table (PARTBL) Used for nonresident tasks, contains information table this about each memory partition, such as length and location of the partition. Memory partitions are shared by nonresident tasks. The user does not need to know the RTS/8. Appendix However, E. a format of these tables to use detailed explanation of these tables is given in CHAPTER 3 RTS/8 EXECUTIVE REQUESTS 3.1 COMMUNICATION WITH THE RTS/8 EXECUTIVE tasks RTS/8 Requests communicate (ERs). RTS/8 with uses the RTS/8 1locations Executive 20-27 in communication region for ERs to facilitate Executive via Executive every field as a Requests across any field via a JMS field boundaries. The Executive can be called in The Data Field (DF) CAL). as cally symboli ated (design tion 20 instruc is given, since CAL the when value does not have to be any specific Field (IF), tion Instruc the to DF the sets 20 n locatio in the code sets the IF to 0 and jumps to the RTS/8 Executive. Most of the A summary of Executive Requests is given in Table 3-1. chapter. The this in detail in d explaine are Executive Requests in Chapter RESCHD, WAITX and DERAIL Executive Requests are described 9. The RTS/8 Executive will not honor any request to switch tasks arising was from an interrupt if the interrupted task's Program Counter (PC)point entry e's Executiv RTS/8 less than 100(octal). This protects the (location 20 in each field) from being destroyed. User tasks must be written so that instructions are never executed below 100 in any field. All ER's except DERAIL and SKPINS can relinquish processor control higher-priority tasks as a result of their action. 3.2 to ERs USED TO COMMUNICATE BETWEEN TASKS The five ERs associated with the 1Intertask Messages and the Event Flags are SEND, WAITE, SENDW, RECEIVE and POST. An example of their WAITX use is shown in Section 3.2.6. In addition, a sixth ER called(Section is described in Chapter 9, Advanced Programming Techniques 9.2.2). RTS/8 Table Summary Code| Symbolic SEND 1 RECEIVE Send a 3-1 Executive message Look for message 2 of WAITE Wait a and/or from for to an a Event Run 4 SUSPND Suspend execution 5 POST Post Event Flag 6 SKPINS code into Insert DERAIL Derail BLKARG or Block a 11 SENDW it 12 UNBARG a a to a 14 WAITX Wait for a Flag to be Format: Send be 3.2.2 from a task the 3.3.3 interrupt 3.4 a 9.2.3 task's address running for 3.3.1 for 3.2.3 task 3.3.2 reason and reason blocked Force - to wait received RESCHD SEND 3.2.4 3.2.5 new message be 13 3.2.1 a task Remove is of force to specific Send a 3.3.4 chain execution Reference 3.2.1 task an skip task Flag RUN a Section receive 3 10 Requests task posted 7 REQUESTS Description Name 0 EXECUTIVE from RTS/8 that a running Scheduler particular to run 9.1.2 Event 9.2.2 posted Message CAL SEND TSKNUM MESSAG The SEND ER sends CAL instruction task has a message, In this SEND, and higher the the sent. sender when performed. task as the first only is sender (nonzero), the task priority 1is only message the sender case, message PENDING the to than is meaning be put Flag Care should be last can go taken sleep to in is into is Event Flag still Flag a a busy Wait field If is the state in location is from on once a sent message is permanently. this from a runs. MESSAG location will the for receiver WAIT busy of receiving waiting the (zero) message Event the and Wait FINISHED that send and any Event in TSKNUM. sender message into MESSAG suspended the becomes request to put if the Event the the not However, will at number temporarily the task located whose the is previous MESSAG, SEND only be one remembered; RTS/8 EXECUTIVE REQUESTS WAITE - Wait on Event Flag 3.2.2 Format: CAL WAITE EFLG it is FINISHED, The WAITE ER checks the status of location EFLG and if G, its state is PENDIN is EFLG If . returns control to the <caller is put into Event Flag Wait. changed to WAITING and the calling taskr task or interrupt routine, the When location EFLG is POSTed by anothe Event Flag must be The again. le runnab s calling task become particularly when a cases, initialized (set to 1) before use in most The completed by another task. task is initiating an event to be waiting task must reset the Event Flag before using it again in that the Event Flag does not reset itself. NOTE wuser may In advanced applications, the be waiting for multiple Event Flags (see Section 9.2.1 for description of WAITM). In this case the task will run whenever any one of the Event Flags 1is posted, and not necessarily the one specified in To insure that a the WAITE. Event particular is posted, use the WAITX ER Flag described in Section 9.2.2. SENDW - Send and Wait 3.2.3 Format: CAL SENDW TSKNUM MESSAG The SENDW ER is exactly equivalent to the sequence: CAL SEND /SEND THE MESSAGE TSKNUM MESSAG CAL WAITE /WAIT FOR RECEIVER TO ACKNOWLEDGE MESSAG 3.2.4 RECEIVE - Receive Message TAD TSKNUM Format: CAL MADDR, RECEIVE /ONLY TO RESTRICT TO ONE /SENDING TASK /MESSAGE ADDRESS STORED 0 CDF TO MESSAGE /HERE; /FIELD IN AC ON RETURN If the AC is zero when the RECEIVE ER is issued, the calling task's Input Message Queue is examined. If there are messages in the calling task's Input Message Queue, the first (i.e., highest-priority) message is dequeued and the address of its first data word is placed in MADDR. A CDF to the field of the message is stored in the AC. 3-3 RTS/8 If there such first the If are time no examine state the AC its nonzero matches found, This Input is Number Input task is 1is sent the 1is the contents is removed placed bits ER is for a 1-11 of field issued, the from the the queue a message issuing task from is only given in 0 the 1If task in to be until task may determine calling task's sender's such specified placed a to whose AC. as Wait However, message found, one Message task. Header not allows in this RECEIVE searched of REQUESTS to Message Queue Message Queue. when Queue it is the message the Message message a of Input is messages, as EXECUTIVE a Task message above; if Message a Wait. received. NOTE The following the advanced MSGWT, after its PC as back to the Thus, when user. just the message. Normally, task if there performs a l in issued a messages specified the in (at CAL +3) for the RTS/8 (0f the desired 3.2.5 are no POST with - to task in a is RECEIVE, and accepts is normally no user. harm is One caused RECEIVE of AC Message Queue Message Wait. in the Input put into the equal Queue AC), to Event Format: the zero. the will go is task by once and the to inform pending. type) ER, messages Executive Post ER the Message 1-11 the useful (i.e., the AC is negative) the task is not willing to Input bits done mechanism that MSGWT. 0 of the AC indicates that in is the RECEIVE, bit a a task out of MSGWT because task starts up again, it re-execute into RECEIVE to implication the having This transparent taking is When stored in the TSTABL points location containing the CAL. a message comes in, the task re-executes the information (or none task will The task zero that Dback when a However, when the RECEIVE wait. Thus, with sent then AC by the continue provides there were task to the no is no run means messages Flag TAD EFPTR /POINTER EFFLD /FIELD CAL TO EVENT FLAG POST CDF The Event Flag CDF, 1is set WAITING, Wait. pointed to the the task that This ER never task waiting for the calling task, the other is run. to by FINISHED was AC, (zero) waiting sets Event the the Flag calling in the state. for it calling is of task is is task a OF EVENT FLAG field specified 1If by previous the state was its cleared in a higher temporarily of WAIT its Event state. If Flag the priority than suspended the while the RTS/8 EXECUTIVE REQUESTS 3.2.6 Example of ERs for Message and Event Flags The following example illustrates the RTS/8 ERs dealing with Messages and Event Flags. Since I/O and interrupts under RTS/8 have not been discussed yet, this example is elementary. advantage There is no to keeping the functions of the two tasks separate, and the entire send/receive structure is being used here as an elaborate subroutine call. A description of the execution sequence follows the example. Task CAL SEND ALOOP, Al A /SEND TASK B MESSAGE 1 B MES1 CAL A2 /SEND TASK B MESSAGE 2 SEND B MES?2 CAL A3 /WAIT FOR MESSAGE WAITE MES1 A4 JMP ALOOP /LQOP 15 /RANDOM NUMBERS /MESSAGE 1 ZBLOCK 3 MES1, 1 37 23 ZBLOCK -1 MES?2, /MESSAGE 2 /RANDOM NUMBERS 3 4 Task CAL RECEIVE BLOOP, Bl MADDR, B2 0 DCA EFCDF TAD EFCDF B3 B4 B5 B6 DCA .+1 HLT TAD I MADDR B7 CLA B8 B9 STA CLL RTL TAD MADDR B10 CAL POST B /GET A MESSAGE /SAVE MESSAGE CDF FOR POST /PUT CDF INLINE /CDF TO MESSAGE FIELD /GET 1ST DATA WORD OF /MESSAGE /=3 IN AC /AC POINTS TO MESSAGE /EVENT B1ll FLAG /DECLARE HLT JMP BLOOP EFCDF, (DO NOTHING WITH MESSAGE RECEIVED /CDF TO MESSAGE FIELD HERE /LOOP two the of which on The flow of execution in this example depends Assuming that at some time both A and B ©priority. higher has tasks of sequence the priority, higher A has become runnable and task execution is as follows: Sequence Al A2 A3 Bl Reason For Execution Task A has higher priority than task B. Task A has higher priority than task B. Task A has higher priority than task B. Task A is now in Event Flag Wait since MES1 was PENDING: MES1 is now in WAITING state. 3-5 IT) RTS/8 EXECUTIVE REQUESTS Sequence Reason B2-B1l0 Task A A4 A2 The at POST has A continues A tries to B B1-B10 is B A2 now This B has higher A so priority, that waits the Task B has Task B is are no then sends for Task A's stopped and Now task A2 There in Message is Wait its MES2 MES2 for put task Wait input A. since there queue. Task B MES1 to get out another which so SET allow a Table task entry entry. These 3.3.1 BLKARG ERs - AND of are Block TAD CLEAR TASK to BLKARG, Task for TASKNUM set and UNBARG, 0 and to task B has is put B; B MES1 is run. "wakes Wait. up" Since clear set SUSPND Specified /OR is A FLAGS task, CAL A message. and Message explicitly another A Message FINISHED but messages, is of priority, the WAITE at A3 has no effect and task loops back to Al and sends MES1 again. TO the more, in FINISHED USED the program B. task A A's is: than higher and Wait; POSTed. has to and Execution Task other sends returns and A4 Format: tries no processes Al ERs B Wait execution effect. are Task A be Message sets Flag re-execute runs. B1l0 vet task brings B B POST at Bl to message since other A3 MES1 to priority in not Flag will For in messages no Bl higher A, MES2. modified of up" has WAITING. Event MES]1 placed Wait; The Event now it sequence Bl B2-B1l1 Several POSTs of "woke Bl B. B SEND. Al B1l1l Flags and Reason B2-B10 ERs into is has and at PENDING. MES2 out RECEIVE than again; is is put A Seguence 3.3 MES2 Executive now MES1 priority MES2 RECEIVes counter task it; brings offending A3 posted the executing. resumed; RTS/8 A3 B1l0 send Therefore, Execution waiting; higher processed B1l1l If still MES1 which Al is received For flags flags and in in its the Task own table 1is, not RUN. Reason IF SELF task to BLKARG WAITBITS TASKNUM contains allowed that cause zero, to task's the the the run). Task Flags specified issuing number of WAITBITS word. task task to will the specifies Assuming become be blocked or WAITBITS more is non-runnable. blocked 3-6 be one on the (that bits to nonzero, If be this TASKNUM specified set in will contains wait bits. RTS/8 EXECUTIVE REQUESTS the The TASKNUM=0 form of this ER is the only legal way to specify the to equal is TASKNUM if ; blocked be issuing task as the task to issuing task number, the action of this ER is undefined. Example: Task 14 is placed into User Wait by executing the following code. TAD (14 CAL BLKARG USERWT Symbolic names for specifying the condition for blocking or unblocking a task in the WAITBITS word is given in Table 3-2. Table 3-2 Symbolic Names for Specifying WAITBITS Symbolic Name Meaning Value run cannot task Wait - This NONRWT 4000 Nonresident EFWT 2000 Event Flag Wait - This task is waiting for an RUNWT 1000 RUN ER because it is not in memory. (which contains a WAITING value Flag Event corresponding to this task) to be POSTed. Run Wait - This task is waiting for a to be executed with its number in the AC, or for the operator to type "REQUEST task" to the Monitor Console Routine (see Chapter 5). SWPWT 0400 Swap Wait - This task cannot run because it is EORMWT 0200 Event or Message Wait - This task is waiting USERWT 0100 User Wait - This bit is reserved for use Dby waiting to be in the process of being brought into memory. for an Event Flag to be posted or a message to arrive, whichever happens first. user-written tasks. RTS/8 does not use this bit. ENABWT 0040 Enable Wait - This task and "DISABLE task" commands MSGWT 0020 0001 (see Chapter 5). Message Wait - This task is waiting to be sent a DNEWT 1s Use of this bit is restricted to the Fnabled. Monitor Console Routine for the "ENABLE task"” message. Task does not exist. This bit should never be set or cleared by a user task. RTS/8 3.3.2 UNBARG - Format: Unblock TAD EXECUTIVE Task for REQUESTS Specified Reason TASKNUM CAL UNBARG WAITBITS TASKNUM contains specifies word. one If the operation, the number of or more bits Task Flags word the specified has task the to task be to cleared becomes becomes unblock, in zero runs. ER issuing is a no-op task's (no operation) number. as runnable; higher priority than the issuing task and issuing task is temporarily suspended while This that if issued by executing a if and task's WAITBITS Task result the Flags of this specified task becomes runnable, the higher-priority with TASKNUM equal the task to the Example: Task 14 is taken TAD out of User Wait the following code. (14 CAL UNBARG USERWT 3.3.3 SUSPND - Format: Suspend TAD a Task's TASKNUM /0 IF Execution SELF CAL SUSPND This SUSPND ER is identical TAD TASKNUM in action to the the following following instructions: CAL BLKARG RUNWT 3.3.4 RUN - Run Format: a TAD Task TASKNUM CAL RUN This RUN ER is identical TAD in action to instructions: TASKNUM CAL UNBARG RUNWT The SUSPND and enough to can used A be data RUN warrant in a collection without executed, ERs a task Report because is the to their version. follows. task interrupting the exist shorthand print data Generation a An function is example that report every 1000 collection/reduction Task 3-8 comes up performed running, shows often how data points process. so they that When the RTS/8 EXECUTIVE REQUESTS ied example, first report occurs on the first data. 1In this simplifbeen already have may m progra report the data operated on by the example full A d. reporte being before cycle next the for updated data. the protect to ng bufferi would require a scheme such as double Data TAD DLOOP, Control Task /1000 DECIMAL (-1750 DCA COUNT CAL DATALP, WAITE DATAEF . . /WAIT FOR DATA READY /CODE TO STORE DATA /POINT IN BUFFER . ISZ COUNT /GET A DATA POINT /AND PROCESS IT /COUNT OFF 1000 POINTS JMP DATALP TAD (REPORT /RUN REPORT TASK CAL RUN /KEEP COLLECTING JMP DLOOP 0 COUNT, Report Generation Task /AC=0, SUSPEND /UNTIL NEEDED /HAS BEEN RUN CAL SUSPND JMS TITLE RLOOP, /PRINT REPORT . /WITH TITLE /REPORT OVER-GO JMP RLOOP /BACK AND WAIT To eliminate interference with the data collection, REPORT should have a lower 3.4 priority than DATA. USING INTERRUPTS IN RTS/8 to The RTS/8 Executive contains code receive and dismiss hardware interrupts and to perform interrupt-initiated task switching, but it does not provide room for an interrupt skip chain. Instead, the skip 1is built up dynamically at system 1is 1literally a <chain and chain of the SKPINS ER is as description A ER. startup time via the SKPINS follows. CAL Format: SKPINS MODULE MODULE is the address (in the processing module. 3-9 current field) of an interrupt RTS/8 An interrupt processing MODULE, EXECUTIVE module has 0 REQUESTS the /THIS /TO 0 following format: WORD A THE GETS NEXT /MODULE ENTERED HERE - CONTAINS /CDF CIF TO NEXT MODULE FIELD SKDR /SKIP (SKP) JMP ON /(ONLY I MODULE DEVICE READY SKDR REALLY NOT READY) IF /ON DEVICE /NOT READY - GO TO /CHAIN CDF POINTER MODULE CIF CUR /THIS ONE IS MINE . /INTERRUPT CIF 0 /DISMISS POSTDS /AN See item 7 Whenever a the below very usually SKPINS the task a user's by in THE way, the end inserted them, since once-only code are system The Data module Field and must before interrupt any the indirect module may An interrupt module interrupts are off. 75us. If task Flag. A Event be POSTDS Interrupt entry Link, more to then Interrupt POSTDS be is any jumps than used wake turn the interrupt module, Data Field requiring before must Field as when 0 a JMP the be the by the use the up (MQ) . the the I instruction. 24 is task from because by a not AC, the Therefore, by save setting POSTDS dismissed the second the but MQ should interrupt a Event interrupt. issuing a an of saved, when under needed, the on and interrupt is contents been of dismissing 3-10 performed. POSTing destroyed Quotient dismiss to next described ERs. interrupts will already Multiplier modules defined have to skip the as are this is it of this RTS/8 computing task POSTed or 1I/0 request. those instruction restore Instruction are correct it interrupt modules 1its execution: perform the the usually are compute excessively execution time should be not of (i.e., to must that of not Typical interrupted the and contents may issue "next implies task interrupt must its interrupts. time. scheduled modules of interrupt. and not Wait. state the is 1last as This a at The priority in its addressing should considerably should ERs Field wuser only. by control Instruction module; is broken inserted. This chain. on POST UPON chain is time start-up clear AND MAYBE routine superfluous SKPINS receives 2. above any IF dismiss skip restrictions interrupt interrupt roughly several The interrupt at the ordered DF instruction. module avoid module l‘ On of are IN AC start-up to MODULE DEPENDING POSTDS interrupt tries chain there An the skip interrupt an succeeds), to at the ER, the interrupt system RTS/8 inserts of INTERRUPT, FLAG OF SKPINS at points the which as the tasks this always executed Once executes and In skips definition task module module". the end done interrupt for SET SKIP PROCESSING EVENT /CONTENTS NEXT - /CORRECTLY MEANS An by it, the instruction. Event setting Flag the RTS/8 EXECUTIVE REQUESTS the Data Field to the field of the Event Flag and placing g the issuin to prior AC the in Flag Event the of n locatio POSTDS. For example: CDF CUR TAD (EVFLG CIF O /DF = THIS FIELD /EVFLG MAY NOT BE AT LOCATION 0 /DISMISS INTERRUPT AND POST EVFLG POSTDS If an Event Flag is not going to be posted by the interrupt AC must be cleared prior to issuing the POSTDS the routine, instruction. For example, an RTS/8 Paper Tape Punch handler task might contain the runnable at following sections of code: is In the initialization code (contained in a task that system start-up time): START, CAL SKPINS GETREQ, CAL /LINK THE PUNCH SKIP /INTO THE SKIP CHAIN PTPINT As a punch subroutine used by the main body of the task: character PUNCH, /WAIT FOR MESSAGE RECEIVE O /ENTER WITH CHAR IN AC CAL /WAIT UNTIL PUNCH READY DCA TEMP /SAVE CHAR WAITE PTPEF ISZ PTPEF TAD TEMP PLS /SET PUNCH EVENT FLAG /TO THE PENDING STATE /PUNCH CHAR CLA JMP I PUNCH /RETURN Interrupt skip chain code: PTPINT, ZBLOCK 2 PSF JMP CDF PTPINT CIF CUR I PCF TAD (PTPEF /USED TO CHAIN SKIPS /CHECK PUNCH READY /SET CORRECT /NOT /CLEAR PUNCH FLAG DF, IF FLAG POSTDS /DISMISS INTERRUPT, PTPEF, O /PUNCH INITIALLY READY TEMP, 0 /POSTING PTPEF RTS/8 does not provide a mechanism for removal interrupt skip chain. of entries from the RTS/8 3.5 A EXECUTIVE summary Table of REQUEST WAIT wait states 3-3. Summary ER of Wait EXECUTIVE STATES generated by Table Wait REQUESTS States Executive is shown 1in 3-3 Incurred State Requests by Executive Condition Requests PC Suspended At SEND none EFWT for SEND message busy if - at 'CAL! RECEIVE (No if MSGWT wait AC=4000) WAITE EFWT (No wait EF 'done') if If no in Input and AC If Event not messages 'CAL' Queue positive Flag 'CAL'+3 FINISHED RUN none SUSPND RUNWT POST none - - SKPINS none - - DERAIL none - - BLKARG any If (given by - task = self If task If message but Event = self argument) SENDW EFWT not EFWT If 'CAL'+2 '"CAL'+3 free 'CAL'+3 Flag FINISHED message busy 'CAL" UNBARG none - - RESCHD none - - WAITX EORMWT If specified Flag WAITM any (given by not Event 'CAL" FINISHED - '"CAL'+3 argument) NOTE: (a) (b) 'CAL' denotes the address Executive Request. A message been is said POSTED by its to be of bus y previous 3-12 the 1f CAL its user. instruction Event Flag has in the not yet CHAPTER RTS/8 The RTS/8 standard 4 SYSTEM TASKS the of most control that tasks system I/0 devices. Also included is one task that system includes Digital PDP-8 interactive system control from the console terminal and to run in the system monitor O0S/8 the of copy single Foreground tasks are protected from background tasks; backgroun d. the reverse is not true. The complete list of system tasks however, provides allows a available in the RTS/8 system is as follows: Clock Handler - accepts requests in the form of RTS/8 messages to perform actions after a specified time has elapsed. Console and Non-console Terminal terminal Line in either Printer line Handler or Handlers character - handle a single mode. - supports an LS8, LS8E, LP8 or LV8 line printer. Mass Storage Handlers - Control the passing of information from these devices to and from memory for the RK08 and RK8-E moving-head disks, DF32 and RF08 fixed-head disks, and TCO08 DECtape unit. Data is read and written in the standard RTS/8 block format Floppy Disk floppy disk. LINCtape (400 octal Handler Handler - contiguous - provides supports words). support both for the 0s/8 use and of the RXS8 DIAL-format LINCtapes. 0S/8 Files Support Task - allows the user to look up, create, and delete files in 0S/8 directories from a foreground task. This task, when used with the mass storage handlers, provides the capability to read or write 0S/8 files on mass storage devices. 0S/8 Support Task operating system in UDC/ICS types Handler of Cassette tape - supports the the background. - enables the user the user execution to of control the an 0S/8 wvarious UDC/ICS modules. Handler - allows to read or write data on a cassette. Cassette enter, File and Support delete Handler files from - a allows the DECcassette user in to CAPS-8 1look up, format. RTS/8 ) Power Fail provides Also, it ) Exit TM Task = when used for an allows a Task - making PDP-8A Null sources tasks i.e., the idle they handlers 1I/0 I/0 operation, message 4.1 The and CLOCK Clock 2 to fail when when hardware, AC power power perform in the it lost. returns. special processing RTS/8. the user are to supplied "handlers" the 1is count in decimal are Message messages. Event Flag RECEIVE ER. with the RTS/8 completely Wait state. When the on the systen. message-driven, Other handler associated with to any tasks send completes the the request HANDLER the Task and can The parameter PDP-8A, messages power PDP-8A. request another clocks. in for issues allows as are with user from tasks to POSTs Handler hardware CLKTYP it - the system referred when these of of the exit Task LED display The an TASKS orderly shutdown programmed restart allows before The SYSTEM or file to inserts be the assembled user 3 selects to 0 for DK8-EP. for entries into entries the handle clocks by one setting of the four symbol KD8-EA/DK8-EC, The an to 1 for KW12, to Handler accepts RTS/8 Clock internal clock queue. As the CLKQLN is become due, they are removed from the queue, and the request is decoded and executed. The user fixes the length of the queue at assembly time by defining the symbol CLKQLN in the parameter file to the minimum number of entry slots. The default 20. The format of a CLKMSG, clock ZBLOCK message value for is: 3 /3 COMMAND+TASKNO WORDS /TASKNO=0 RESERVED MEANS FOR RTS/8 TASKNO=SENDING TASK TIMEHI TIMELO EXTRA1 EXTRA?2 The words TIMEHI time in terms system ticks in parameter specified SHERTZ. by completely the by reciprocal exact and of TIMELO specify a of “"system ticks". a second in the RTS/8 The hardware tick HERTZ. CLKTYP parameter the the multiple wuser's software of line-frequency clock time hardware system SHERTZ. might rate (in and from ticks HERTZ configuration. clock For interval the The user specifies parameter file by resolution. example, the be: present the number of defining the per second) are SHERTZ HERTZ is determined equals must parameters the be an for a DECIMAL HERTZ= 120 SHERTZ= 10 indicating that there will be 10 "system ticks" per second based on a 60-cycle clock. Such parameters might be used if only 1/10 second resolution is necessary in the Clock Handler. Note that the maximum interval that can be expressed in TIMEHI and TIMELO is (2**24) /SHERTZ seconds. Other Clock This RTS/8 is system Handler. parameter file approximately tasks The to be use wuser equal three the symbol should to the days 4-2 CLOCK define Clock if SHERTZ=60. when this Handler's referring symbol task in to the number. the RTS/8 It RTS/8 should be COMMAND if a Clock Handler is not to be included in the 6 for a description of the parameter file.) undefined (See Chapter system. SYSTEM TASKS is the type'of request and has the following meanings: Description Symbolic Octal 0000 MARKTIME POST the event flag CLKMSG after the TASKNO, elapses. interval specified EXTRAl, and EXTRA2 are ignored. 1000 SCHEDULE POST CLKMSG immediately. Execute a RUN ER on the task specified by TASKNO after the specified interval elapses. EXTRAl and EXTRA2 are ignored. 2000 TIMOUT POST CLKMSG immediately. DERAIL the task specified by TASKNO 1into a subroutine whose address is specified in EXTRA]l after the specified interval elapses. EXTRA2 is ignored. 3000 SCHEDULE POST CLKMSG immediately. Execute a RUN ER on the task specified by TASKNO PERIODICALLY after the specified interval elapses, and re-queue this command with the parameters EXTRAl and EXTRA2 in place of TIMEHI and TIMELO. This has the effect of running the specified task periodically with a period specified by 7000 CANCEL EXTRAl Cancel all and EXTRA2. the clock requests for the task specified by TASKNO. TIMEHI, TIMELO, EXTRA], and EXTRA2 are ignored. POST CLKMSG immediately. Note 0 1 2 are not actually deleted and that they occupy space in the queue until time out. that the requests still they 3 — Command: —_-I 0 1 2 3 7 MARKTIME SCHEDULE TIMOUT SCHEDULE PERIODICALLY CANCEL Task number Command Word Format - Clock Handler RTS/8 SYSTEM TASKS The Clock Handler also maintains the current ticks TODL wuntil midnight), (low-order) in Page in 0 symbolic of Field zero (i.e., at midnight), it is (24 hours until midnight) and an location DATE in Page 0 of Field Note that bits, in order SHERTZ must error will 4.1.1 result Examples for the be less while of When TODH this 0 is Handler If the SHERTZ Clock to is be /JWITH A /THIS CAUSES CLOCK /TO 3 If the user 2"SHERTZ, in 24 assembly Calls CAL 60HZ "GO TO /MESSAGE 0 0;170 an Handler. SENDW ZBLOCK and reaches contained larger, SYSTEM THE SLEEP" TICK RATE, CURRENT FOR SLEEPM SLEEPM, system quantity - (SHERTZ*86400) date word in symbolic incremented by one day. SHERTZ*86400 192. (in (high-order) time-of-day reset to the 0S/8-format assembling Clock 0. quantity than time-of-day locations 2 TASK SECONDS. HEADER /SET EVENT FLAG AFTER INTERVAL /INTERVAL IS 120 (DECIMAL) SYSTEM /TICKS changes the the preceding value 170 to the THE TASK assembler expression sequence becomes configuration-independent. CAL /RUN SEND /EVERY CLOCK /ASSUMING A HOUR, REPORT ONCE INDEFINITELY, 60HZ SYSTEM TICK RATE RUNMSG RUNMSG, ZBLOCK 3 SCHEDULE REPORT /MESSAGE PERIODICALLY HEADER /RUN REPORT AFTER SPECIFIED /INTERVAL AND PERIODICALLY /THEREAFTER, 0;1 64;5654 4.2 The TERMINAL /FIRST RUN IS ALMOST IMMEDIATELY /(1/60 SECOND) /PERIOD BETWEEN RUNS IS 216000 / (DECIMAL) SYSTEM TICKS = 3600 /SECONDS = 1 HOUR. HANDLER RTS/8 Terminal Handler handles a single terminal in either line or mode. Input in line mode is terminated by a carriage return or an ALTMODE character and may be edited using the RUBOUT and U characters. The RUBOUT character deletes the last valid character typed and prints a backslash; the “U character deletes the entire line and returns the carriage. Character mode input is not echoed and is terminated by overflow of a specified character count. character If multiple terminals are to be handled, multiple copies of Terminal Handler must be assembled. Assembly parameters in the of the handler access 1its handler is specify which device terminal. to be a codes the handler will use this body to These parameters also specify whether the "console" Terminal Handler, that is, the terminal 4-4 RTS/8 SYSTEM TASKS on which the MCR program is going to be run. The console Terminal Handler invokes the MCR whenever a ~C is typed on the keyboard; nonconsole terminal handlers treat "C as any other character. For the console handler, “C wakes up MCR by POSTing an Event Flag. The parameters edited into the distributed version of the Terminal Handler assemble the handler to handle the PDP-8 console terminal as a "console" device. Thus, when the MCR function is required, both the MCR task and the Terminal Handler task must be assembled and included to Modification of the Terminal Handler as part of the RTS/8 system. support a VT50 terminal and other features are described in Section 4.2.1. The format of messages to the Terminal Handler can be the of either following: ZBLOCK 3 ZBLOCK 3 ASSGN+tsknum command+length INBUF OUTTXT Description: Types text Legal Commands, Description: specified by ASSGN=200 Assigns Terminal Handler to task specified Deassigns Terminal Handler if tsknum=0 OUTTXT and command, then reads text into INBUF. which can be combined, are as follows: Octal Symbolic Action if specified Action if not specified 4000 NOPACK Output text is in unpacked ASCII, one character per word terminated by a 0000. Output text is in packed 6-bit, two characters per word terminated by a 00. Type a CR/LF after 2000 NOCRLF Do not type a CR/LF 1000 IND OUTTXT points to the after first word output 0400 NOLINE Length the message. of typing the message. OUTTXT is the first the word of the output text. text. Input is in character Input is mode; terminated after 'length' input characters read. in line mode; terminated by a CR or ALTMODE (ESC). The length is still tested. Is a seven-bit field which specifies the maximum size of the input buffer if input is in line mode, or input if input the 1is number of characters in character mode. to If LENGTH-1 input is in line mode and there are characters in the input buffer, characters RUBOUT ALTMODE, other than carriage return, and "U will not be accepted or echoed the message Event Flag is Posted. INBUF Is a pointer to the input buffer; if it is zero, no input is taken. The input buffer is filled with input characters packed one per word with the parity bit (bit 4) forced on. If of input is in line mode, the last character the line is followed by a zero word 4-5 (if a RTS/8 OUTTXT ASSGN TASKS carriage return =1(7777) word terminated the Is =200 SYSTEM either the terminated (if the an 1line) ALTMODE line). first string (if IND=0) word of the the output same field as word of or pointer a string the the or output (if to the text first IND=1000) message. a character ir "Assigns" the Terminal Handler to the specified task. This will cause the terminal handler to only accept messages from the specified SEND it a is the task. message to If another task the Terminal Handler assigned, tries to while the message will be placed in Handler's Message Input Queue not be removed for processing by the Handler until the assignment is Terminal but will Terminal released. The Handler is assignment Terminal operation task to which assigned can by sending a message Handler to task number is performed the Terminal release the assigning the 0. No I/O by an the ASSGN command of task assignment message. tsknum Is a to 6-bit field specify the used with task number which the terminal is to this field is zero, deassigned allowing the accept commands from any the be assigned. the terminal terminal task task. Packed ASCII Unpacked ASCII } oe : CR/LF at end of message No CR/LF at end of message = e -— Command (bits 0-4) QUTTXT is the first word OUT pointsTXT to first word 0: Input in line mode 1. Input in character mode f Bit 4 must be a 0 l Length (bits 5-11) If bit 3=1, no. of characters to input If bit 3=0, maximum size of input buffer] Command and Length Word Format - Terminal Handler I/0 Mode to If is to RTS/8 SYSTEM TASKS Unused Bit 4 must be a 1 Unused Task Number Command Word Format - Terminal Handler ASSGN Mode 4.,2.1 Additional Assembly Parameters Affecting Terminal Handler Properties an aid CTRL/Q as special If this feature describes these parameters. section This using summary of their default values is shown in Table 3-4. the VT50 TTY =0 task. Do not treat CTRL/S and 1in as Several assembly parameters are available to the user A characters. Support CTRL/S and CTRL/Q. is enabled, typing CTRL/S while data is being cause printed/displayed on the terminal will to stop until the next CTRL/Q is typed. data to terminals CRT fast This can be used on This screen. the "freeze" temporarily user's the if 1 to parameter must be set is a model VTS50 or VT52 since these terminal send occasionally will terminals host the to characters synchronization computer of their own volition. WIDTH =n Where n is an octal number that sets the page n to width characters. currently set to 120(octal) example, = width 1is For the parameter setting WIDTH TTY characters. 60 80 (decimal) to changes the TTY page width n characters are printed After characters. will handler the terminal, the on carriage-return a out type automatically to desirable 1is it Sometimes line-feed. this CR/LF (for example, when using suppress case, this In addressing). direct cursor WIDTH should be SCOPE set equal to 0. This option is used to determine treatment of the RUBOUT key as follows: SCOPE=0 provides the normal support mode of RUBOUT (echo rubouts with a backslash). 4-7 RTS/8 SYSTEM TASKS ©COPE=1 causes one position, character from RUBOUT to move the screen. in column 1, RUBOUT visible effect. TAB This option proper is as with Fill FILL=n sends line 1-5. baud VTO05s. = 0 the means not tabs does the handler The shorter. using OLDTTY = specifies 3-page terminal = 1 = this and the o0ld with has fewer but it is a WIDTH, have wuse listing causes the no of the new of both the three-page. only OLDTTY the field of the example, 20 designates the starting task; for 4-8 of supplied handler handler the Specifies starting use was handler. the new 0O(default) Specifies not handler. specifies by the will VT50, when the 2400 typed. herein effect two-page handler is described FILL in for parameters TAB 0 "C new SCOPE, and this This the after be is being terminal (default). which page must recommended a the (nulls) n is specifies handler via follows: number that 1. the does simulates hardware characters 1 = Handler is characters. MCR when selected listed. TTLOC the TAB supported console version features than for by parameter fill the RTS/8 LSBOT the has This as The means for two-page LSBOT tabs FILL fill FILL=4 1 = up OLDTTY n no feed. range CONSOL no hardware software are parameter provides wake is but spaces. that <characters CONSOL cursor tabs. assembled TTFLD simulate the The FILL=0 0ld works, assembly that specifies assembly LSBOT the tabs. support OLDTTY to the spaces. TAB=1 CONSOL the If still of via specifies support a left removing follows: TAB=0 FILL used number accomplished the cursor physically location handler to TTY Handler field 2. location example, at the parameter 3000. of 3000 the be task: TTY designates RTS/8 SYSTEM TASKS 4-1 Table Summary of Terminal Handler Assembly Parameter Default Values Parameter Meaning Default Value VT50 1 Support “S, "Q WIDTH 120 Page width of 80 (decimal) characters SCOPE 0 Rubouts echo as \ TAB 0 Simulate tabs FILL 0 No fill characters CONSOL 1 “C wakes up MCR OLDTTY 0 Use 3-page TTY task LSBOT 0 List only TTY task selected by OLDTTY TTFLD 10 Not TTLOC 5000 assignments for TTFLD and TTLOC load the TTY value, but a default example to Handler location given show that the given 5000 in 1 field as an number starting at Useful Equates in the Parameter File 4.2.2 e which Several useful equates (described in Section 4.2) are availabl are as They tasks. LPT or TTY to s message sending when used be can follows: NOPACK = 4000 NOCRLF = 2000 Used if output message 1is not 6-bit Used if output message should not be followed by carriage return/line feed. first IND = 1000 Used if OUTTXT points to the NOLINE = 400 Used if input is in character mode. ASSGN = 200 KLSALINE = 100 4.2.3 ASCII format. the output word of for use text. Used to assign the only by this task. device handler Used with KL8-A support (see Section 4.13.2). Examples of Terminal Handler Messages HIYA, ZBLOCK 3 /MESSAGE HEADER 0 TEXT /HELLO/ /NO INPUT /TEXT TO BE OUTPUT 0 /PACKED TEXT, END WITH CR/LF, Sending the above message to the Terminal Handler prints HELLO on terminal. 4-9 the RTS/8 QUEST, SYSTEM ZBLOCK 3 /MESSAGE NOCRLF+60 Sending the ANSWER: above on /48-CHARACTER the carriage. printed on the TYPANS, /POINTER /TYPE THE message to the terminal The answer terminal ZBLOCK the and Terminal inputs from sending the 3 0 The RTS/8 be word present INPUT INPUT Handler reply LIMIT BUFFER prints without TYPE first the above message following message: /MESSAGE HEADER TEXT, INDIRECT, INPUT /POINTER TO OUTPUT could WITH Line Printer and in outputs to format of messages to format of messages to the the the Handler The LINE bit message). 0: Packed ASCII 1: Unpacked ASCII 0: CR/LF at end of message 0: are ignored an LE8, LS8E, the Line terminal (the INBUF LP8 Printer OUTTXT is the first word handler, word or 0: Input in line mode Input in character mode f is the must, however, Bit 4 must be a 0 Length (bits 5-11) If bit 3=1, no. of characters to input If bit 3=0, maximum size of input bufferj and Length Word Format - 4-10 Line Printer Handler LVS8 but l OUTTXT points to first wordf Command CR/LF Handler No CR/LF at end of message 1: 1: be TEXT Command (bits 0-4) 1: THE returning PRINTER HANDLER line printer. identical to the INBUF NO CR/LF, /UNPACKED /NO ANSWER LINE a obtained by TO ANSWER: / NOPACK+IND 4.3 HEADER /PACKED TEXT, ANSWER TEXT TASKS I/O Mode RTS/8 . SYSTEM TASKS Unused Bit 4 must be a 1 Unused Task Number Command 4.4 MASS Word STORAGE Format - Line Printer Handler ASSGN Mode HANDLERS Handlers are available for TC08 DECtape, DF32 and RF08 fixed-head disks, RK8 and RK8E moving-head disks, RX01l floppy disks and LINCtape. All mass storage handlers accept the same message write blocks on various mass storage devices. Disk Handler and the LINCtape Handler allow the parameters other than the ones described herein. described in Sections 4.4.1 and 4.4.2. The format of MSMESG, messages ZBLOCK to mass storage handlers format to read or However, the Floppy wuse of additional These parameters are is: 3 UNIT RW + PAGES + FIELD BUFADD ’ BLOKNO STATUS where: UNIT Is ' the number of the logical unit on which the operation is to be performed. DF32 and RF08 disks consist of only one unit. TC08 DECtape has logical units 0-7 corresponding to its physical units 0-7. LINCtape has logical units 0-7 corresponding to its physical units 0-7. RK8 disk has logical units 0-3 corresponding to its physical units 0-3. RK8E disk has 1logical units 0-7. Units 0-3 correspond to the outer (lower track number) half of physical wunits 0-3, and units 4-7 correspond to the inner (higher track number) half of physical units 0-3, respectively. RX0l has units 0 or 1 which corresponds to the 1left and right drive, respectively. RW Is 0 for PAGES Specifies a read the (times 100 the transfer PAGES=0, operation, number of pages for (128-word) octal). For of 20(octal) 40(octal) 4000 or a write pages operation. to transfer example, PAGES=2000 specifies pages or 2048 words; if 4096 words are transferred. RTS/8 FIELD The Is the PDP-8 field (times 10 transfer takes RW+PAGES+FIELD word SYSTEM in which octal). is TASKS the For place in sometimes transfer example, field 3. called the 1if takes place FIELD=30, function word message. the of the Reserved for task use Unit Unit Word 0: Read operation 1: Write operation Format - Mass Storage Handlers No. of pages to transfer 0-7: Field of transfer Reserved for task use Function Word Format BUFADD Is BLOKNO Is the block transfer will the starting - Mass address number of on begin. Storage the Handlers buffer to be transferred. the All device from which devices are assumed to 256-word blocks. On DECtape, the first 128 words each of an even/odd pair of 129-word DECtape records considered to be a block. STATUS Is a word that operation. the It successful, handler contains otherwise which 1is the Tasks which use it contents the mass sets a on =zero completion if the will contain a of the device of the have operation of are the is nonzero quantity status register. storage handlers should test this word after the 1I/0 operation has been completed (that is, after the Event Flag has been POSTed) to determine if any errors occurred during the transfer. All RTS/8 mass storage handlers retry operations three Note that the times if STATUS word middle storage handlers when same the errors to a are three words are identical operation is encountered before nonzero. of to performed. 4-12 a message to the the arguments to an setting the RTS/8 mass 0S/8 handler RTS/8 SYSTEM TASKS Floppy Disk Handler 4.4.1 Each copy of the Floppy Handler can control one single or dual RXO0l1 for more than one RX01l, multiple copies of the hapdler are drive; required. The format of messages to the Floppy Disk Handler 1is: ZBLOCK 3 CODE+DEL+MODE+UNIT RW+PAGES+FIELD BUFADD BLOKNO STATUS where: CODE =0 BLOKNO is interpreted as an Reqgular condition. PAGES 1is Also, logical record number. 0S/8 interpreted in the 0S/8 sense to mean the number The DEL bit is of pages of data to transfer. ignored. PAGES 4000 Special Physical Sector Condition. It . transferred 1is sector One ignored. specified by BLOKNO which is to be interpreted is 1is as 1is, the high order 7-bits of That TTTTTTTSSSSS. This BLOKNO represent the physical track number. 1in the range 0-76 decimal (0-114 number must be represent The low order 5 bits of BLOKNO octal). This number must the sector number on that track. be in the range 1-26 decimal (1-32 octal). DEL = 0 Deleted data marks should not be considered. as CODE=4000) (if marks data deleted 2000 Handle If writing a sector, write deleted data follows: Do not note this fact in STATUS word. indication. If reading a sector, set bit 5 of STATUS word to a a such In indication. data 1 if read deleted STATUS word may be nonzero even though the case, Other STATUS bits no physical error has occurred. are relevant and STATUS negative means hard error. MODE =0 100 Specifies transfer in 12-bit mode. Specifies transfer in 8-bit mode. 1In 12-bit mode, the 0S/8 format uses 12-bit mode. 0S/8 floppy an comprise that words 12-bit 64 the of sector are packed into the first 96 bytes sector, while the last 32 bytes contain random bit the on byte 8-bit In 8-bit mode, an patterns. of 8-bits order low the to corresponds disk floppy Data in the high order 4 a 12-bit word in memory. bits of a word in memory is not transferred to the floppy disk. (decimal) 64 contains sector In 8-bit mode, a sector data. contains 128 8-bit bytes of data. In 12-bit mode, a of words 12-bit UNIT = Specifies the drive unit number. It may be 0 or The number 0 refers to the unit on the left of 1. a dual drive. RTS/8 SYSTEM TASKS 0: Regular condition 1: Special physical sector condition 0: Do not handle deleted marks 1: Handle deleted marks 0: Transfer in 12-bit mode Transfer in 8-bit mode 1: : Left unit of dual drive 1: Right unit of dual drive CODE = 4000 (bit O set to 1) transfers one sector specified by BLOCKNO as follows: Physical track no. (0-114 octal) Sector no. on track (1-32 octal) Unit Word Format - Floppy Disk Handler Hard error Deleted data INIT done Parity error CRC error Status Word Format - Floppy Disk Handler If The largest legal 0S/8 block number on a floppy disk is 755 octal. block 756 is referenced, an error is generated. Use of larger block Specifying an illegal numbers may produce unpredictable results. track or sector may produce an error with STATUS = 4000. 4-15 RTS/8 The standard 05/8 0S/8 Logical Track 0 Block TASKS Interleave Scheme is as (octal) Floppy Sectors follows: (track/sector 0 1/1, 1/3, 1/5, 1/7 1 1/9, 1/11, 1/13, 1/15 2 1/17, 1/19, 1/21, 1/23 3 1/25, 1l/2, 1/4, 1/6 4 1/8, 1/10, 1/12, 1/14 5 1/16, 1/18, 1720, 1/22 6 1/24, 1/26, 2/1, 2/3 7 2/5, 2/7, 2/9, 2/11 10 2/13, 2/15, 2/17, 2/19 11 2/21, 2/23, 2/25, 2/2 12 2/4, 2/6, 2/8, 2/10 13 2/12, 2/14, 2/16, 2/18 14 2/20, 2/22, 2/24, 2/26 15 3/1, 3/3, 3/5, 3/7 is not used by mode. 4.4.2 SYSTEM LINCtape The LINCtape The format 0S/8, and cannot be accessed in in decimal) the 12-bit Handler Handler supports of messages to the both 0S/8 and DIAL LINCtape Handler is: format LINCtapes. ZBLOCK 3 MODE+UNIT RW+PAGES+FIELD BUFADD BLOKNO STATUS where: UNIT= Specifies the 7. MODE=0 Specifies contain block. 0S/8 200 LINCtape Mode. or 201 unit A number LINCtape (octal) in is words range 0 to presumed to per physical RTS/8 SYSTEM TASKS =4000 Specifies DIAL Mode. A LINCtape is presumed contain 400 (octal) words per physical block. to The LINCtape used is not checked to see if Note: it is ©properly formatted for the specified mode. Use of a LINCtape with improper physical format will produce unpredictable results. RW =0 Read data from LINCtape =4000 Write data to LINCtape PAGES Specifies the number of 128-word pages to transfer For example, PAGES=2000 octal). 100 (times if or 2048 words; pages octal 20 s transfer octal 40 pages=0, pages or are words 4096 transferred. transfer example, FIELD=30, the transfer takes place in field 3). FIELD Specifies the PDP-8 field in which the (For (times 10 octal). takes place BUFADD Is the BLOKNO of address starting the buffer to be transferred. Is the block number on the device from which the All devices are assumed to transfer will begin. two On O0S/8 LINCtapes, have 256-word blocks. consecutive physical blocks comprise one 05/8 logical block. Only the first 128 words in each physical block contain meaningful data. When running in DIAL physical mode, BLOKNO represents a In this case, LINCtape block number. is not transferred, PAGES must be even because an even number of pages PAGES is (incorrectly) odd, If is transferred. the last PAGES=1 being STATUS page which will result in one block except 1if (2 pages) transferred. (checksum). is the ones complement of tape check 0 on always is STATUS error. no means 0 value The Three software retries are a Write operation. Note that the attempted on a checksum read error. errors hardware performs infinite retries on most bad spot on not mounted, tape (write-lock-out, tape) and does not return control to successful. CAUTION In the 0S/8 mode, the word following the temporarily 1is buffer the of is destroyed while a LINCtape operation then 1is 1location The progress. the of completion upon restored RTS/8 is a since However, operation. executing real-time system, code may be while the tape operation is in progress. word this The user must make sure that referenced while the LINCtape never circumstances no Under is being used. should the word following the end of the buffer belong to another 4-17 task. RTS/8 until RTS/8 0: 0S/8 mode 1: DIAL mode SYSTEM TASKS Unit number Unit 4.4.3 Example of Word Mass Format Storage - LINCtape Handler Handler Call CAL SENDW DTA /SEND DTAMSG TAD STATUS SZA CLA /AND JMP ERR 3 4 4210 4.5 The FOR THE - THE DECTAPE COMPLETION STATUS CONTINUE OF THE OPERATION HEADER /DECTAPE UNIT 256 /ADDRESS 55 /INTO 0 PROCESSING /MESSAGE /WRITE BUFFER STATUS, TO /BAD - GO TO ERROR ROUTINE /OK ZBLOCK MESSAGE WAIT /CHECK o DTAMSG, A /HANDLER 4 WORDS OF BLOCK /STATUS OF FROM FIELD BRUFFER 55 (RECORDS OPERATION 132 STORED 1 & 133) HERE POWER FAIL TASK Power recovers option Fail Task from power provides the failure. is If mechanism by which the the power-fail/auto-restart the processor system hardware present and if the system parameter PWRFAL was equated to a = value, the SPL (Skip on Power Low) instruction is included in the interrupt skip chain. If a power 1low condition occurs, the nonzero processor comes state back, POSTed the which is wakes restores the clock, present, and also up the console the in contents this of table, which -1 and state performs on 0 saved processor an If the EFWT the Task task should Power Fail action internal nothing restored terminal, an contains: If is table. should (Event Flags be and for be done Flag Table taken out is and Task. 0S/8 each halted. Event The Power Fail if they terminal task in Each task has for this task Wait) of bit the a power Flag system one-word (default should be for this task Event Flag Wait) entry When an is Task are based entry value) cleared (i.e., in this RTS/8 SYSTEM TASKS If the task should be DERAILed to location ADDR in Fhe field in which it 1is executing as well as having its ADDR EFWT bit ' ‘ cleared. Each task in the system may alter its entry in the Power table message by sending a message to the Power Fail Task. v is: Fail Task's of the The format 3 ZBLOCK. PWRMSG, WORD where: is the new contents of the Power Fail Task's table entry WORD 4.6 0S/8 _ for sending the task. SUPPORT TASK The 0S/8 Support Task supports the execution system as a task under of 0S/8 the operating 0S/8 is run in the top two or more RTS/8. memory fields under control of the KM8-E memory extension and timeshare option (standard on PDP-8/E, 8/F, or 8/M with 8K or more of core memory) or TSS-8 time sharing hardware option. NOTE A jumper on the KM8-E module is used to The function. timeshare the select in Jjumper this module is shipped with disabled). function (timeshare place The PDP-8A utilizes the memory extension and timeshare option provided by the KM8-A extended option board. A switch on the KM8-A module is used to enable the timeshare function. The 0S/8 Support Task is configured at system startup time to establish a correspondence between O0S/8 devices and RTS/8 handler by ring-buffered are from O0S/8 output Terminal input and tasks. several characters to minimize input loss due to the usurpation of the CPU by tasks of higher priority. Because of the 1large number of trapped CDF instructions in 0S/8 and its Commonly Used System Programs (CUSPs), response time is slower than a stand-alone 0S/8 system but still guite reasonable. The background 0S/8 task must have the same system device that was used by the.0S/8 system to 1load RTS/8. The 0S/8 Support Task cannot run on a stand-alone PDP-8 without 0S/8. Several parameters in the system parameter file control the assembly of the 0S/8 Support Task. The parameters and their meanings are as follows: - - OSFLDS : : : ' s Defined as the number of fields to be dedicated to Example: OSFLDS=2 memory for 0OS/8. OSKBDV: ‘ specifies two fields or : _ Set equal to the keyboard IOT terminal. Example: OSKBDV=03 specifies code the of 8K ‘the use of of 05/8 the console terminal keyboard of 0S/8. Note: O0S/8 requires its own dedicated terminal. 4-19 RTS/8 OSTTDV Set equal SYSTEM to the teleprinter terminal. Example: console OSFILL OSTTDV=04 teleprinter Specifies how line-feed many allows high-speed terminals. DECwriter to null the this the Specifies the system Example: device O0SSYSD=DTA to of the follow be used should of a as and be 2400 driver DTAQ0 a This Teletypes! use specifies device. 0S/8 terminal. parameter allows system the must 0S/8 OSFILL=4 0S/8 wuse standard VTO05. OSSYSD the terminals For terminals, of characters on VTO05 code 0S/8. zero. Example: IOT specifies for character 0S/8 set TASKS baud task. as the 0S/8 all 0s/8 NOTE The user does not need to include a terminal driver for the 0S/8 terminal device (it is built into 0S8SUP). The 0S/8 CUSPs system except FORTRAN LAB runtime teleprinter teleprinter. printers are parameter that runs BUILD, under the O0S/8 BOOT, PIP10, functions. All Support Task runs BASIC, and INDUSTRIAL references to the are diverted to the specified 0S/8 References in 0S/8 to the LES, LS8E, LP8 diverted to the RTS/8 line printer handler LPT is Support Task. diverted to defined; otherwise References the to corresponding they are the following RTS/8 handler executed 0S/8 if is and keyboard and keyboard and 1line or if LV8 the system directly device one BASIC names by the will be defined: DTAQ0-DTA?7 LTAQ-LTA7 RKA(Q-RKA3 RKB(O-RKB3 RXAQ-RXA7 If one is standard not defined, 0S/8 handler. 0S/8 will perform the I/0 directly using the In addition, the 0S/8 handlers SYS and DSK are diverted to the handler specified by the parameter 0SSYSD. Other references to I/0 under the supported loop. Section 4.6.1 The OS/8 system References to may a 4.7). Mapping parameter of Fields HGHFLD in field available to the highest field available OS8SUP which etc. cause handler task 0S/8 are maps uses as mapped 0S/8 with the the 0S/8 called 0S/8 support RTS8 Support parameter file are task fields into 0 is into real hang to in OS8COM must fields actually HGHFLD. consecutive fields specify as the highest This is usually the 16K machine). The follows. 0S/8 fields beginning The 1, with !Teletype is a registered trademark of the Teletype Corporation. 4-20 a (see Task entire RTS/8-0S/8 system. in memory (e.g., 30 for a field to diverted field 2, 3, field RTS/8 SYSTEM TASKS HGHFLD-OSFLDS+1, proceeding upward. If an 0S/8 program references a field greater than HGHFLD, unpredictable results will occur, as these fields are mapped over the lower 0S/8 fields. The software core size is correctly set to OSFLDS and should be used by multi-field 0S/8 ' programs. 4.7 0S/8 - RTS/8 COMMUNICATION (OS8COM) The 0S/8 Support Task contains a mechanism by which 0S/8 can talk to an RTS/8 task. To perform this communication, the 0S/8 system must be configured with a handler called RTS8. This handler can be dummy ; a In fact, it can be some other handler to it need not do anything. traps Task Support The 0S/8 which the name RTS8 has been assigned. The arguments that are passed to the RTS8 all calls to this handler. handler by an 0S/8 program will be passed to an RTS8 task «called The user is responsible for writing this OS8COM task. OS8COM. The 0S8COM task performs an RECEIVE ER. RTS/8 The can then through these task receive a message any time an 0S/8 program reads or writes to the RTS8 storage This message looks like any other message to a mass handler. Bits 6 through 0S8SUP does make one change to the arguments. device. the buffer. field of 8 of the function word originally contain the When 0S8COM field where 0S/8 expects the buffer to be. the is This the gets control, these bits identify the actual field that contains to information return can 0S8COM buffer. 0S/8 arguments. 4.7.1 Using the OS8COM Task An 0S/8 program that runs an RTS/8 task as specified by the 0S/8 is shown in the following example. user Example: /LOCATION OF 0S/8 USER SERVICE ROUTINE /PRINT MESSAGE "WHAT TASK WOULD YOU USR=7700 JMS PRINT /LIKE TO RUN?" ON THE 0S/8 TERMINAL /READS RESULT FROM 0S/8 KEYBOARD /RETURNS TASK NUMBER IN RANGE 1-77 JMS READ ' / DCA TASKNUM CIF ADDR /BE It should be noted FOUND) ENTRY POINT FOR THIS HANDLER 0 JMS I ENTRY 0 0 ZBLOCK 2 JMP I (7605 TASKNUM, (HANDLER NOT IS NOT REUSABLE AND THAT LOCATION SET TO THE CIF RESIDENT /ERROR /NOTE THAT THIS CODE IS IT AWAY /CALL USR /TO DO A FETCH /OF DEVICE 'RTS8'! /DUMMY ADDRESS (HANDLER WILL ALREADY HLT /'ENTRY' AC 10 JMS I (USR 1 DEVICE RTS8 ENTRY, IN /STORE that TASKNUM /CALL HANDLER /DUMMY READ /TASK NUMBER /DUMMY /RETURN TO 0S/8 is being passed as the second argument instegd of the first because 0S8SUP automatically modifies bits the first argument, presuming that a mapped field 4-21 number is 6-8 of 1located RTS/8 there. TASKS 058COM expects three arguments after error return. These Where the portion task that OS8COM is what SYSTEM it 0S/8 must be of the specified by program has handles the RTS/8 side written like any other might look like is as of the RTS/8 follows: TASK=0S8COM /OS8COM IS INIWT=0 /COMES CUR=40 /SPECIFY UP ASSIGNED PRIORITY IN of THE HERE GO INTO RECEIVE WAIT FIELD LEFT AC /ADDRESS OF MESSAGE LEFT HERE MSGFLD /CDF ISZ MADDR /POINT TO FUNCTION ISZ MADDR /POINT TO BUFFER TAD I TO MESSAGE HLT : example ADDRESS /IMMEDIATELY 0 DCA 0S8COM written. RUNNING /STARTING RECEIVE MSGFLD, A the be FILE FIELD CAL MADDR, ' CUR%10 *200 START, user. been written, communication must user task, and an /PARAMETER FIELD the handler call plus an the - /(SECOND MADDR 0S/8 IN WORD ADDRESS ARGUMENT) /GET TASK NUMBER /RUN THIS TASK CAL RUN /OS8COM WANTS TO BE /PRIORITY THAN TASK TAD MSGFLD DCA EFCDF TAD (-5 TAD MADDR /GET ADDRESS OF HIGHER IT IS RUNNING EVENT FLAG /FOR MESSAGE CAL POST EFCDF, /POST MESSAGE HLT JMP START /GET ANOTHER MESSAGE In this example, the task number was put in the second argument of the 0S/8 call. However, it became the third word of the RTS/8 message because OS8SUP always adds a word to the mass storage <call argument list, namely the unit number. For a description of the 0S/8 standard handler call format, Manual. For storage devices, 4.7.2 Other Other a see Section description see Section 4.4 1If the RTS/8 posted the 2. of the of the standard this by error Arguments handler OS8COM is employed STATUS 0S/8 Software message format Support for mass manual. return of may passed be the by the word nonzero, list. 3. 4.1 Techniques techniques which can be 1. of back (word then handler to relocated before the handler being <call, to is as followé: of the taken call. to passed are 5) return 0S/8 If more than three words of data need from O0S/8, the wuser can pass a CDF where the data resides. If the CDF argument user it message to 0S/8 at : through the argument to be passed to O0S8COM and address of the area occurs as the automatically OS8COM. first will be RTS/8 4.8 SYSTEM TASKS 0S/8 FILE SUPPORT TASK create, and allows (OS8F) The 0S/8 File Support Task other delete files in 0S/8 directories. tasks look to up, This task is included can wuser the but in the same source file as the 0S/8 Support Task, independently of that task (depending on which tasks are it assemble The format of messages to OS8F defined in the system parameter file). ' is: OSFMSG, ZBLOCK 3 " 10+UNIT+FUNCT DEVHND FILPTR STATUS BLOKNO LENGTH where: DEVHND Is the task number of the handler for the desired Is the unit number on which the operation is to be device. UNIT ’ performed. FUNCT Represents the function to have the following values: be performed. It can returns Looks up the specified filename and its starting block number in BLOKNO, and its complement two's a (as LENGTH length in 0 number) . 2000 Enters the specified filename into the first space (on the device) whose length is empty LENGTH. in wvalue the equal to or exceeds Returns file in the starting block number BLOKNO. If a file of the previously deleted. 4000 FILPTR , STATUS Is existed a pointer to used a 4-word to generate Describes the final The >2 -1 filename is is unchanged. status the same filenames. of the operation as : Operation successful. File not found on Lookup or No room for file on Enter. I/0 in PAL8 pseudo-op FILENAME these follows: 0 1 2 LENGTH Deletes the specified filename. field as the message. can be it device the on The value of of the new same name error occurred. The Delete. wvalue hardware error status of the device. Invalid directory on device. is the RTS/8 SYSTEM TASKS Function: 0 Lookup 1 Enter 2 Delete 3 Unused Unused Task number Unit OS8F Call Function Word If both OS8F and the 0S/8 Support Task are present 1in a interlock is set up to prevent simultaneous updating system, an of directory blocks by both systems. Because 0S/8 tends to leave directory blocks in memory for 1long periods of time, this interlock scheme causes lengthy delays for the OS8F task. Before a Delete or Enter operation is performed, OS8F waits until 0S/8 is in a state in which: 1. There 2. up no active to 05/8 loaded or Look 1is corresponding has USR just into operations are not The UNIVERSAL DIGITAL (UDC/ICS) HANDLER UDC/ICS various two types include handler types of gives of Keyboard on the Monitor, since they CONTROLLER/INDUSTRIAL the user the functional immediate and UDC/ICS the file sending and analog 0S/8 device UNIT. interlocked UDC/ICS action: reading and Command core. directory. 4.9 temporary DEVHND do modify CONTROLLER capability devices. to This associated. and not digital Decoder, the SUBSYSTEM control the handler performs Immediate actions values to appropriate functional devices. Associated actions can be 1linked to specified events within the UDC/ICS (counters overflowing, switches being thrown). The associated actions can do the following: l. 2. 3. Run a specified task when the event occurs Set the' Event Flag when the event occurs DERAIL a specified task when the event occurs The number is determined assembly of associated by parameter the requests size RINGBUF. of that the can be buffer, pending which is simultaneously specified by the RTS/8 SYSTEM TASKS The UDC/ICS handler permits the following operations: 1. Analog Output - send a 10-bit value to an analog channel 2. Analog Input - accept input from analog subchannel 3. Digital Output - send a 12-bit value to a digital channel 4, Digital 5. Get Generic Code - determine 6. Enable Counter - permit interrupts from a counter channel 7. Read Counter - read 8. Disable Counter - disable 9. Enable Contacts - permit interrupts from a contact channel 10. Change Of State - find the current COS value for a contact 11. Disable Contacts - ignore interrupts from a contact channel - read a digital channel Input generic the code for a specified channel current value of the counter a counter channel interrupts from channel channel of format Each operation is discussed in detail below, including the The first three words are for specifying the operation. message the 11 the of one Word 4 specifies required for use by the Executive. GC=3; DI=2; DO=1; AO=0; operations which are as follows: UDC/ICS 5 Word AI=12. DCT=11; CsS=10; ECT=7; DC=6; RC=5; EC=4; Words the channel being used for the indicated operation. designates and operation, 6 through 8 may be required to completely specify the The word that operation. the upon dependent 1is used number the follows the last word specifying the desired operation is used for the Word 10 of all UDC/ICS messages value returned. the or read value contains the The general ZBLOCK error format state. for a UDC/ICS message is: 3 OPERATION CHANNEL OPWORD1 OPWORD?2 OPWORD3 VALUE STATUS 4.9.1 AO Analog Format: Output AO channel number subchannel & wvalue Channel number is the analog output channel. The subchannel and value word 1is formed by the subchannel (0-3) in bits 0 and 1 and the 10-bit value in bits operation: 2-11. For example, a message for an analog output RTS/8 AQEX, 4BLOCK SYSTEM TASKS 3 AO /ANALOG 23 4614 ZBLOCK AOER, OUTPUT /CHANNEL 3 0 0 - 2, VALUE 614 /ERROR INDICATOR 1 . 23 /SUBCHANNEL 2 3 4 5 6 7 8 g 10 11 N__ J Subchannel *_l Value Subchannel 4.9.2 AI Analog Format: and Value Word Format - UbC/ICS Handler Input AT - channel subchannel & gain answer where word channel need is only the analog specify 9-11 the input gain channel. in bits for UDC, and 5-11 for ICS. The (enable conversion) and read control The ICS analog (octal) since slots of placed in the the converters all must converter ICS unit. After answer word. have The 1-3 subchannel and handler the automatically register (UDC addresses which modules must conversion, be bit are located 'the . 8; 1ICS less in the digitized Gain ICS read control register; (for UDC, bit 8) ICS subchannel; {for UDC, bits 9-11) and Gain Word Format - UDC/ICS Handler gain in sets Enable conversion Subchannel and subchannel bits bit bit 0 4). than 20 first 16 value is RTS/8 SYSTEM TASKS An example of a message for an analog input operation is as follows: 3 ZBLOCK AIEX, AI 17 /ANALOG INPUT /CHANNEL 17 3 AIANS, O AIERR, O /SUBCHANNEL 3, GAIN 1 /RESULT HERE » 2 ZBLOCK /ERROR INDICATOR The user should ensure that for each major channel there is sufficient . UDC; 5 milliseconds for ICS) for time (approximately 250 microseconds for each subchannel conversion to be completed before anotherfor isa indicated. In general, it may be helpful if all A/D conversions major channel are initiated from the same task. Digital Output DO 4.9.3 DO Format: channel value Channel is a legal digital output channel and value is the be output. DOEX, DOER, DI ~ Format: 3. ZBLOCK 0 Digital - 3 ZBLOCK DO 20 7777 4.9.4 to number For example: /DIGITAL OUTPUT /CHANNEL 20. /VALUE = 7777 - | /ERROR INDICATOR Input DI channel result Channel is the appropriate digital input contain the value of the channel when read. DIEX, DIANS, DIER, 4.9.5 GC Format: : ZBLOCK 3 DI 27 . O channel /DIGITAL INPUT /CHANNEL 27 3 0 Generic Code GC channel result result will /VALUE OF CHANNEL 27 WILL BE PUT /HERE ZBLOCK and For example: /ERROR INDICATOR RTS/8 The generic code of the example: GCEX, ZBLOCK SYSTEM specified channel /DETERMINES 27 0 ZBLOCK GCER, Generic 2,3 - EC are as Contact Enable Format: in /GENERIC CODE follows: Interrupt GENERIC 27 /ERROR result. For 0 - PUT CODE HERE INDICATOR No interrupt; Modules; converter. 4.9.6 put /CHANNEL 3 0 codes error; is 3 GC GCANS, TASKS 4 - Counter 1 - Controller Module; 7 - A/D is the Counter EC channel initial reload wvalue value event action address Channel first is the value value with counter to be which channel loaded to into be enabled, that to channel, initial and value reload is value the reload the channel after every event. If the 0, the counter is not reloaded. The event action and address words specify what happens when the counter interrupts. There are three mutually exclusive possibilities, indica ted by setting the appropriate bit in the event action word as follows: reload value Bit 0 is =1 - Set Event Wait Flag execution Address Bit 1 =1 - Run a task specified Address Bit 2 =1 - that by word DERAIL the address and Bit 3 =1 - not is specifies as sent bits the 4-11 that only job; the sent word. message; the task by the DERAIL operation address of the DERAIL subroutine calling occurs. run action event the continue event message; of used the The the this when used. task word subroutine. field of of this job word not used. task. must be in the same Do action just once. If bit 3 = 0, specified action 1is performed after each interrupt. Bit 3 indicates whether action is to occur once or repeatedly. Several enable ECEX1, counter ZBLOCK follow: - 3 EC /ENABLE 4 /CHANNEL 4 /INITIAL VALUE 7700 7710 4000 ECER], examples 0 0 /RESET COUNTER TO OF 7700 AFTER EACH FLAG ON EVENT 7710 /POST EVENT /IT OCCURS /UNUSED /ERROR INDICATOR EVENT EVERY TIME RTS/8 ZBLOCK ECEX2, SYSTEM TASKS 3 COUNTER EC /ENABLE 4 1205 0 2016 /CHANNEL 4 /INITIAL VALUE OF 1205 RESET /DON'T /RUN TASK 16 ON EVENT EVERY TIME IT /OCCURS /UNUSED 0 ECER2, /ERROR INDICATOR EC /ENABLE COUNTER 5 10 /CHANNEL 7700 1015 /RESET TO INDICATOR 0 ZBLOCK ECEX3, 3 5 /INITIAL VALUE OF 10 7700 5620 /DERAIL TO TASK 15 EVERY TIME /OCCURS /AT LOCATION 5620 ECER3, 0 /ERROR RC Read 4.9.7 IT Counter RC Format: channel result where channel is the counter channel whose For That value is placed in result. read. ZBLOCK RCEX, RCANS, 4.9.8 DC 1is PUT HERE to Dbe to be 3 COUNTER /READ 6 0 ZBLOCK /CHANNEL 6 /VALUE OF CHANNEL 6 3 /ERROR Disable wvalue example: RC 0 RCER, current INDICATOR Counter DC Format: channel where channel ignored. For DCEX, DCER, is the counter channel from which interrupts are example: ZBLOCK 3 DC /DISABLE COUNTER 6 /CHANNEL 6 ZBLOCK 4 /ERROR 0 4.9.9 ECT Format: Enab. Contacts ECT bit & channel event action address INDICATOR RTS/8 where the from which and the Event bit & channel to enable contact bit is and address counter function. ECTEX1, 2ZBLOCK word are specified For example: /ENABLE 5401 /FROM BIT /RUN TASK ZBLOCK 13(OCTAL) 13 OF AFTER AN CHANNEL EVENT /ENABLE 1001 4000 CONTACT /FROM BIT 2 OF CHANNEL 1 /ON 1ST OCCURRENCE OF EVENT, /EVENT FLAG Format: 1 OCCURS POST 3 /ERROR Change the 3 | are 1in CONTACTS ECT O Cs as INDICATOR messages 4.9.10 manner /ERROR ZBLOCK Twelve same 3 ZBLOCK ECTE2R, the 3 0 ECTEX2, in ECT 2013 ECTE1R, TASKS specifies the bit on the contact channel interrupts. Channel is specified in bits 4-11 packed in bits 0-3 as a value from 0-13(o ctal). action enable SYSTEM required of CSs to enable INDICATOR the entire channel. State ‘ channel result where channel value is to COSEX, is be the contact placed ZBLOCK in channel result. 0 /RESULT ZBLOCK 4.9.11 DCT /ERROR Disable 0-3 to be disabled. INDICATOR Contacts & channel For ZBLOCK example: contact. 4-11 /DISABLE 5401 /FROM ZBLOCK 0 That is, bits specify the channel 3 DCT CONTACTS CHANNEL 1, /13 (OCTAL) DCTANS, state HERE bit & channel is specified as in enable specify the bit (0 - 13 octal) and bits DCTEX, of DCT bit where change 3 0 Format: current example: /READ COS /CHANNEL 1 1 COSER, whose 3 Cs COSANS, For 4 /ERROR INDICATOR BIT RTS/8 SYSTEM TASKS 4.9.12 UDC/ICS Assembly Parameters The UDC/ICS handler has several assembly parameters that the user must specify to indicate the UDC/ICS configuration. The number and address is required only for those modules that perform interrupts. as follows: RINGBF Number of interrupts that can NCNTR Number of counter modules. NCNTC They are in the ‘ ' ring Number ~ be stored buffer. of contact modules. ‘Number of afialog inéut converter modules. NAD The modulés Address of the first counter module. FCTR must be at contiguous module addresses. module. interrupt contact of the first Address at contiguous module be must modules Interrupt FCT addresses. Analog module Address of the first A/D converter module. contiguous at must be modules input FAD : addresses. NMPLX Number of multiplexer modules per analog converter (ICS only). sizes -of several the specify to These parameters are used mainly 30(octal) words per as allocated handler, UDC/ICS the in tables contact module, 3(octal) words/counter module, and 16 (octal) words per The UDC/ICS handler currently assumes that the handler analog module. (although field are entirely within the same data tables its all and the user could easily reprogram this). o The user must keep in mind when establishing RINGBF size that if the buffer is full, UDC/ICS interrupts are disabled until there is room in buffer; Also, each interrupt requires two entries in the the buffer. that is, 4.9.13 the actual buffer UDC/ICS Error size is 2 * RINGBF. Conditions To indicate error conditions, the UDC/ICS handler places a value the tenth word of the task's message. The values and meanings are: Value - Meaning Illega} generic code 1 - for specified Channel or subchannel value not valid 3 Illegal‘fuhction code UDC/ICS control not responding hardware channel and o operation 2 5 in error) 4-31 (power dff or RTS/8 The user should condition Only puts errors manner, are 4.10 device. Cassette of There and this at may the are 1. 2. the noninterrupt also Generic error codes of 0 are returned faulty UDC/ICS or 1 encountered Handler (CSA) records functions allows on DEC (such as Handler general can categories the user cassettes, rewind and operate of eight cassette - read Utility functions - rewind, backspace gap, skip backspace block of the message utility call. handler or 4.10.1 Handler The format call is: of a ZBLOCK 3 CALL + UNIT RW FIELD + error in this hardware at interrupt and read and write Wwrite file sequence. The units. write and defines to as well as to perform write end-file). One operation: functions word no a The user should call these functions in a first A time indicate Handler gap, word. HANDLER Cassette two check TASKS location. ignored. variable-length various special copy in they CASSETTE The 0 encountered thus functional time initialize a SYSTEM to file gap, file gap meaningful the cassette unit and either the Function message ' + to the Cassette Handler when using a handler NONSTORE BUFADD SIZE STATUS For a handler defined as Word Word function, follows: 1 2 bit 0 bit bits 1 =0 9-11 bit 0 0 bits bit =0 = 0 =1 6-8 11 the words after Utility the RTS/8 message header call Handler call Cassette unit Read Write Field of buffer not store data Do (applicable only) Word 3 Buffer address Word 4 Record size Word 5 Status return in bits 4-11 to read are RTS/8 0: Handler call} 1: Utility call SYSTEM TASKS Unit Unit Word 0 1 Format - Cassette Handler 2 4 7 3 5 | 1 0: Read 1: Write 6 —_ 8 9 _J 10 11 | Field 0: Read into memory 1: Check data Function Word Format - Handler Call Cassette conventions specify a record size of 200 bytes, but the user can use any size up to 377 (8 bits are transferred). The buffer specified by the message cannot cross field boundaries. For a read operation, the buffer 1is optional (although its word in the message must be included), according to bit 11 of word 2. The nonstore capability can be used for advancing through a long file. Word 5 contains the contents of status register B, which is defined by the setting Bit as follows: Meaning O 00~ CRC /block Timing EOT/BOT error nmwu O EOF — = bit Drive empty Read/write Write lockout Ready RTS/8 SYSTEM TASKS Word Format - CRC/block error Timing EOT/BOT EOF Drive empty - Read/write Write lookout - Ready At the to check An example buffer end Status Return each cassette of for errors of a starting MSG1, : cassette at operation, encountered. not MSG2, : - o /HANDLER . - v v store ZBLOCK 200 bytes format is: ZBLOCK of 3 CALL+UNIT FUNCTION STATUS is as 100 bytes follows: /WRITE OPERATION FROM Word 5 from a /BUFFER AT 1200 BYTES LONG /STATUS RETURN from unit 2, ON 3 the 2 THE WHICH IS message is: 0000 0200 0000 /STATUS a UNIT FIELD /HANDLER OPERATION ON /READ AND DON'T STORE /UNUSED Utility The examine 3 0001 call write /100 4002 4.10.2 should ' message to to cassette unit 3 0000 and user Handler ZBLOCK 3 4003 1200 0100 read the handler 21200 4020 To Cassette /200 UNIT 2 BYTES RETURN Function message to the Cassette Handler when using a utility RTS/8 SYSTEM TASKS header For a utility function, the words after the RTS/8 message defined are follows: as Word 1 bit 0 = 0 Utility call Word 2 (function in bits 6-8): 10 Handler call Cassette unit bit 0 = 1 bits 9-11 Rewind 30 = Backspace file gap 40 = Write file gap 50 = Backspace block gap 70 = Skip to file gap 3 Word return Status 1 0 [\ 9 8 7 6 5 4 3 2 10 | 11 J ~" Function: 1 Rewind 3 Backspace file gap 4 Write file gap 5 Backspace block gap 7 Skip to file gap Function Word Format - Utility Call For example, to request a rewind on unit 1, the message is: MSG3, ZBLOCK 0001 3 /UTILITY OPERATION ON UNIT 1 /REWIND /STATUS RETURN 0010 0000 except times, If an error is encountered, the operation is retried 3 placed on a write operation or an error 1is out 1lock write a when occurs while reading CRC. The CAPS-8 User's Manual (DEC-8E-OCASA-A-D) is suggested reading for users who are unsure of cassette conventions. 4.11 CASSETTE FILE SUPPORT HANDLER The Cassette File Support Handler (CSAF) the DEC standard requires the cassette supports cassette format and allows the calling task to look up and enter files on cassettes in that handler (CSA) format. This to perform the actual handler I/O operations involved. The cassette operations ENTER, LOOKUP and CLOSE are performed by the File Support Handler (CSAF) which in turn calls the cassette Cassette ENTER and LOOKUP require the user to put’' appropriate handler (CSA). in a record header area with which CSAF performs the file information operations. The header area must be at least 40(octal) cannot cross field boundaries. words long and Word Word CSAF message 2 Address status In TASKS are as follows: i bit bit bit bits [ 1 g SYSTEM [ for SR definitions Pl—'ll ([ Word O No RTS/8 of header return for for ENTER Word 3 Field Word 4 Status return for return is contents all cases, the status 0 of 1 | header the 4 for 5 and LOOKUP; CLOSE ENTER and ENTER 6 and of 7 (bits LOOKUP Status 8 — LOOKUP 9 G Register 10 B. y " y, Function: 1 Close 2 Lookup 4 Enter Unit Unit For ENTER cassette format is and Word Format LOOKUP, standards as the - Cassette File format (and follows: of the therefore is Support Handler header area must conform compatible with CAPS-8). Byte with This Use Filename Filename File 12-13 extension type 1 = ASCII 0 = undefined File record length. Currently word 12 must be 0 14-15 Unused 16-23 Date (ASCII) ddmmyy 24-35 is justified For an ENTER area operation, is found on as Unused Reference header specified if the a to 8-bit bytes, file with the specified -36 unit, one name it is per word, specified deleted. right in the RTS/8 SYSTEM TASKS d file |is For a LOOKUP operation, the record size of the specifie returned in location header+13 (byte 13). If the file is not found or if an error occurs, this location contains 0. The CLOSE operation is automatically followed by a REWIND. Examples of messages follow. 3 ZBLOCK MSG4, 4000 /ENTER ON UNIT 0 /INFORMATION IN HEADER STARTING AT 6400 /6400 /OF FIELD 1 0010 /STATUS RETURN 0000 Z2BLOCK MSG5, 4.12 1003 0000 3 /CLOSE ON UNIT 3 /STATUS RETURN PDP-8A NULL TASK The PDP-8A Null Task counts from 1 to 9999 in decimal 1in the AC It also counts from 1 to 7777 in octal in the MQ display. display. The source which is called NULL8A, takes up configure the null task into a The page. user can RTS/8 system by inclusion in the an parameter file of its task name and the statement NULL8A = NTASKS+1 KL8-A SUPPORT 4.13 The KL8-A is a 4-serial line asynchronous multiplexer for the PDP-8/A that has three lines with partial modem control and one line with full modem control. KL8-A support is available to the RTS/8 Executive, the To use KL8-A support, the user and the 0S/8 Support Task. TTY task, should perform the procedures that are described in the following sections. 4.13.1 Executive KL8-A Support The symbol KL8A in the parameter file is set to a value equal number of being used, KL8-A units being employed by the user. then KL8A=1 is spr-ified. If the symbol 'KL8A' is set to 0 or undefined in the no KL8-A support will be provided by RTS/8. KL8-A support is provided by the RTS/8 KL8ASR.PA must be assembled as .PAL KLB8ASR<PARAM,KL8ASR follows: Executive. to the If one KL8-A is parameter file, source file The RTS/8 The parameters in the parameter KL8A [] follows: o as = n or undefined SYSTEM TASKS file that relate means that means support no KL8-A for desired. Each four lines. KL8ADV = Device <code Default 1is for 1lines 1is KL8-A provides the first KL8-A. consecutive two device codes 41). (e.g., 40 and KL8-A's are used, they consecutive device codes. If multiple have = must page for routine. 1). be l-page KL8-A physical physical uses KL8A Task desired. KL8-A Specifies TTY n is Each connect 4.13.2 service are 40. should KL8ACT to KL8-A service The KL8-A located long for start of Default 1is KL8-A 7400 connect in field (if routine 0. It is one page for every KL8-A and grows a three additional KL8-A's used (or part thereof). value of KL8-A support this parameter routine against the location 7577. end of The is default such gets field that Jjammed 0, ending the up at Support KL8~-A support in the TTY task is initiated by setting symbol KL8A in parameter file +to nonzero. Then the KL8-A line to be used is specified in place of the terminal IOT device code plus 100. For example, if the TTY task is to control line 3 of a KL8-A, the TTDEV is to = KL8ALINE+3 specified have in the the parameter value 100 in file. the (The parameter symbol file.) KLS8ALINE If more is than defined one KL8-A interface is used, the lines are numbered consecutively beginning with 0 and continuing across interfaces. Thus, KL8-A logical line number 5 actually Physical KL8-A support Support is is physical line number lines are numbered from but included 4.13.3 KL8-A requires does in KL8-A for the set to is specified both the O0S/8 0ld for in the the 0S/8 similar using where "line" a in field the TTY of and is of that = KL8ALINE+2 interface. for (3-page) Executive KL8-A TTY support task. First, the for the TTY task. the symbol KL8A is particular KL8-A line form 100+line in place of the of the KL8-A that is 0s/8 conveniently defined as being 100 used. The symbol KL8ALINE is parameter file. For 0S/8 support, OSTTDV 0 task. described Then, the being in the line KL8-A Task used. code, the new Support device is second size file. number the 3. memory to procedure parameter by of to (2-page) the is following nonzero 0 additional increase Support support However, not 1 number the parameter RTS/8 SYSTEM TASKS Wben more specifies that terminal output goes to line 2 of the KL8-A. KL8-A is used, the lines should be numbered successively as one than described for the TTY task support in Section 4.13.2. a User KL8-A Support for 4.13.4 Task KL8-A The KL8-A support in the Executive allows a user to program the in a manner similar to the KL8-J. skip interrupt the First, the user task must insert the KL8-A into and provide a keyboard and printer interrupt routine to service chain the line he wishes to use. This is accomplished via the following code: CDF CUR CIF 0 IOF TAD (LINE"4 JMS I (KLBACT KEYBD INTERRUPT PRINTER ROUTINE INTERRUPT ROUTINE where LINE is the line number of numbers are consecutive, begin at KL8-A line of the number KL8-A specific is actually (0,1,2...) KL8-A of and the KL8-A desired. KL8-A 1line 0, and may span across KL8-As. The the form 4a+b where a is the number b 1is the physical line number of the (0-3). Second, the user must define the instruction corresponding to the instruction that will be used when outputting to the KL8-A line. For example, if the device code for the KL8-A will probably want an instruction such as is 40, then the TLS user TLSX=6404 in his task. Normally, a program would contain the following code to output up the KL8-A to output a character, the following If this a character: TAD char TLS When by using a calling would be KL8-A, the KL8ACT. task Then, would first connect support code used: TAD line TAD char ~400 TLSX The 4.14 The AC is not EXIT EXIT cleared by the TLSX. TASK Task is not required for RTS/8 included in task performs a system, it is run the same functions as command, is, that it waits for operation. by the MCR EXIT those performed any pending 4-39 command. by the operations to be task The MCR is EXIT EXIT completed, RTS/8 SYSTEM TASKS then turns off interrupts and returns to the In addition, special done EXIT exit processing by message (in the having contains the same the a the just user single field as the time routines to Task allows prior task word. the a to send 0S/8 task shutting a This message) user message word is operating to request down RTS/S8. to the the EXIT address that will be called EXIT command is in the order that of the exit. When the MCR will be called and executed EXIT Task. NOTE Any message not MCR get REquest Task. sent to posted. command the EXIT Also, do to run Task not use the will the EXIT systenm. additional This Task. of (via a 1is This routine a JMS) at typed, these they were sent CHAPTER 5 MONITOR CONSOLE ROUTINE The Monitor Console Routine (MCR) provides functions that the user request from the console terminal to control, inspect, and debug some extent) his system. The MCR indicates printing that it is active the prompting character MCR command consists of a terminated by either a carriage and > on command ready the word accept commands system console to terminal. followed return or by can (to by An arguments an ALTMODE. Only the and first two characters of the command are significant except for the EXIT command. Commands can be a maximum of 40 characters long. If a carriage return terminates the command line, the MCR returns to the terminal for another command when it finishes processing the current command. If an ALTMODE terminates the command 1line, the MCR puts itself in a wait state when it finishes processing the command. The MCR is brought out of this wait state by typing “C (CTRL C) on the console terminal. When the MCR prompts RTS/8 task can use with its > and the terminal. is waiting Therefore, for 1input, no other if the terminal is used for something other than error logging), type “C, an exclusive MCR terminal (for type the MCR command and terminate ALTMODE procedure character. This prevents the MCR from 1instance, it with an tying up the several MCR terminal. 5.1 MCR COMMAND ARGUMENTS Certain syntactic constructions are commands. The definitions of these A single used as arguments arguments follow. comma or interchangeably commands. Task-1ID A Task-ID name. is If a to either it is a single to space separate an octal number, may be arguments it number used to or represents MCR a the internal RTS/8 Task Number. This number also designates the priority of a task. If it is a name, the first 4 characters of the name are looked up in the MCR's a Task Number. Task Name table to produce Time-of-day Address A time-of-day is of represents hours represents minutes An is Address digits that 5-1 an the form past past octal hh:mm, where hh and mm midnight hh:00. number represents from a PDP-8 1 to 5 memory MONITOR CONSOLE address. digits Word If the 1long it digits are A is Word ROUTINE address is 0. an octal number long. 5.2 In MCR the MCR the in square command command are or by not the The * if choices points the user [mm/dd/yyyy mm/dd/yyyy, portion others and of if the are 31 equal days to current 1 five order 4 digits to in the system not define date parentheses, the by symbol asterisks CLOCK in the clock is not in the system) , order to shorten the MCR code specified, becomes the The only second printed on the last assumed. midnight, time-of-day. is in preceded a date, length. systen mm/dd/7y. >DATE did embedded Commands portion enclosed [,Time-of-day]] ignored since 197 automatically incremented at being are (). file (indicating that MCRCLK is set to 0 (in symbol DAte date year ([]) present length). 5.2.1 from than high that follow, the significant capitalized. Optional arguments are is exclamation parameter if the descriptions word brackets separated (*) 1less COMMANDS of RTS/8 is assumed The but the no is RTS/8 all argument, If system digit if For the the system date months are treated specified, arguments console date. significant; are terminal 1is specified, in the is as set the form 07/31/76 >DATE 07/31/76 5.2.2 * TInme [Time-of-day] If a Time-of-day time-of-day. If time-of-day >TIME is command is specified, it becomes the no argument is specified the current printed out on the console terminal in the form system system hh:mm. 14:00 >TIME 14:00 5.2.3 The NAme Task-ID,Newname character specified lost. by Newname stored. message string Newname this command. can Newname be any should becomes The length, not be but the results. Task number 7 REPORT 7 is given the name REPO. 5-2 new name only name Examples: >NAME the o0ld of name of the any of that first other the task 4 (if task any) characters task or an if is are error MONITOR CONSOLE ROUTINE >NAME REPORT,FOO Task number 7, which is known as REPO, is now known as FOO. NOTE name MCR the initializes system The time to contain the assembly at table names of any DEC-supplied tasks that are the parameter file (e.g., if in listed the 1in defined 1is CLOCK symbol the parameter file as CLOCK=2, task number 2 the editing By CLCK). gets the name MCR.PA after file task names can be by modifying 5.2.4 REquest Task-ID label the NMTBL, permanently table. the MCR name [, (@Time-of-day ! Interval) [,Interval]] The REguest Task-ID command requests a task only Task-ID interval, Interval or is is at of specified), a given the run to immediately a given time-of-day, (if after a given interval. form: nH nM n n hours minutes ns n seconds nT n system Requesting a at user included task clears the ticks RUNWT bit in the Task Flags Table entry for that task. The interval, given in the third argument, specifies the period at which the task is rerun. If the parameter CLOCK in the RTS/8 parameter file is not defined, the second and third arguments of this command are ignored and the given task runs immediately. In the examples given below, three different formats are used for the REquest command, but only the first two characters are significant except when using the EXIT command. Examples: >REQUEST runs task X X immediately. >RE FO0,@2:00 runs task FOO at at am). 2 >RE 2:00 am (if it is after 2 am, 5 minutes from now clock, this command FOO will run tomorrow five minutes 5,10M,5M runs task number *+en and every thereafter. >REQ On a HIPR,1T,6T machine immediately thereafter). with (that a 60 1is, Hz .016 seconds from now, runs and the task 10 times per HIPR second MONITOR CONSOLE ROUTINE NOTE If, at the time the REquest command executed, (which after typed in) the task does not have the of the by it is Task-ID set in may be several is hours specified RUNWT bit its Task Flags Table entry, then the REquest command 1is a no-op (no operation), that is, the command has no effect. Similarly, the task will not run 5.2.5 The STop STop Task-ID that the A DIsable task by that task. command it had task other will bits bits run are suspends RUNWT has (in bit REquest set only beside when the cleared. been this execution of on Task ENABWT bit 5.2.8 * the stopped command). can it the be is task Flags specified Table for by using the think of as restarted easier to by entry it Task-ID disables ENABWT bit on the future execution in Task the Flags of the Table specified entry for Task-ID Task-~ID entry in instance Task-ID command ENable ENable the that setting Table The blocking command MCR The The other task MCR DIsable 5.2.7 the turning task. 5.2.6 RUNWT; Task-ID REsume execution if Task-ID by REquest upon command for was command the not CAncel clears the ENABWT bit in the task, thus enabling it to command is a no-op. Task specified set, the run. Flags If the Task-ID CAncel Task-ID command cancels any clock queue entries involving task specified by Task-ID. This includes l)any entries made by MCR (from previous timed Request commands), 2)entries involving the specified task made by other tasks (e.g., a timed DERAIL) and 3)entries made by the specified task involving itself (e.g., a timed the the POST) . and the 5.2.9 The In the task may SY¥stat SYstat case of the hang command, either a greater detail on SY¥stat command prints blocking an the bits timed forever POST, the event waiting for whether an flag is not it. POSTed [Task-ID] prints describes up depending general a single prints a on system task. system status If no status existent task are argument report or argument report. Each task in the system. For each number/priority, task name (if it on in its Task Flags 5-4 Table entry. a is is specified, status report specified, line of the in the report task the report has one), and what Each blocking bit MONITOR CONSOLE ROUTINE is printed as a one-letter code, preceded by a space. The one letter ZCoonwo=MHTM codes and their meanings are: for Waiting for for Waiting Waiting a message an event flag to be to be Waiting Waiting flag event REquested or swapped in or a message RUN Disabled USERWT bit set Nonresident wait In addition, an asterisk printed at the end of the line means the task has messages waiting in its input queue. 1is obtained by status report on a single task Task-ID of that task as an argument to the SY¥stat The detailed report contains all the information 1in the A more detailed specifying the command. followed by five octal words: general status report, WORD 1 WORD 2 The location of the Task State Table this entry containing words 2-5; word is colon followed by a Task Link in sign bit, IF in bits 6-8, DF in bits 9-11 (PDP-8/E and 8/A Flags WORD WORD 3 4 Register) Task PC Task AC WORD 5 Task MQ Examples: A general the SYstat command might produce following output sample line: CARD 13 E * This line means task number 13, named CARD, is in Event Flag Wait has input messages pending. >SYSTAT and command: CARD might produce 13 The the CARD E * single 1320: line: 0022 1741 0000 2525 This line indicates that CARD is stopped at location 21741 with its AC and Link zero and 2525 in its MQ. by MCR assembly the of The user can leave the S¥stat facility out the system parameter MCRSYS to 0 in the RTS/8 parameter file. setting saves one page of code. Leaving it out 5.2.10 OPen Address [,Count] The OPen Address command displays the Count locations starting at Address on the console terminal in the form: in octal 11111/ cccc The range of locations displayed may cross a field boundary. is not specified, it is assumed to be 5-5 1. If Count CHAPTER 6 ASSEMBLING AND LOADING TASKS FOR RTS/8 The user assembles RTS/8 tasks with parameter files, wusing the 05/8 PAL8 assembler. RTS/8 parameter files are all edited versions of a master parameter file (PARAM.PA) that is included in the distributed sources. Appendix A lists the RTS/8 source files. All definitions in the master file which are to be supplied by the user are left blank in the file. For example, a sample line in the file is: PDP8E= /1 IF PDP 8/E If this parameter is set to PDP-8/A. 1If either machine OR 1, is PDP 8/A, the not ELSE 0 specified machine is used, this parameter a PDP-8/E or is set to 0. a Thus, a unique parameter file is environment, where environment hardware The and the structure Other of sections set of tasks the parameter in this created for the particular RTS/8 1is a combination of the available being run. file chapter is discussed describe 1) in the the 0S/8 next section. BITMAP program which allows the user to construct a map showing the memory 1locations used by given binary files, 2) a sample RTS/8 program 3) a general procedure for creating an RTS/8 system, and 4) a listing of parameters and their functions that affect the individual RTS/8 system tasks. 6.1 PARAMETER FILE STRUCTURE The parameter file contains the parameters that the user must define to specify a particular RTS/8 system configuration. A parameter file that has been modified for the demonstration program 1is shown in Section 8.1. This file also contains user-defined symbols for DECNET/8. For further information on DECNET/8, see RTS/8 DECNET/8 Programmer's Guide and Reference Manual (DEC-08-LDPRA-A-D). The parameter sections are file is labeled divided as into follows: 1. Executive Specifications 2. Task 3. System Task Specifications 4, System Wide Definitions 5. Task Definitions Setup the following five sections. These ASSEMBLING 6.1.1 The AND LOADING TASKS FOR RTS/8 Executive Specifications parameters assembly of system. The in the the Executive Executive, parameters in Specification and this therefore section follows: and Symbol section are control essential their to meaning Set to the be PDP12 Set or EAE 1 if set to to 1 being to if 1 Set to PDP12 if 1 PDP-8F, used; PDP-8M if not, the an if is the the machine PDP-12 system interrupt power is not should or Set be HGHFLD to a nonzero loaded Set NTASKS to a into if KL8-A is Set to an octal value number of represents to CHECKP the highest if contents task in be assigned symbol merely sets 1 system. the if highest the all actual length any field of Set to in the the number system. of Set partitions defined PARTNS 2 = in the indicates partitions and Task in the have task tasks: this system this the Definitions system of The are 1line deletion line, there system. also assigned tables. task allocated are no For that there is, partition are is memory example, two memory number 0 Definitions tasks. the defined, that partition number 1. if total possible partitions zero when It be nonresident memory to used; 3 the can the should system. that Not to 0 the in field checkpointable. PARTNS of routines specifies in number need the the that any to used; used. 30 specifies core memory. tasks numbers Set must enabled support designating is symbol system. value possible system as switching. fail/restart for example, HGHFLD = using a machine with 16K The are PDP-8/A being being save task hardware. KL8A or this 0. undefined, Set PWRFAL PDP-8/E, machine MQ during Task the RTS/8 Meaning PDP8E 6.1.2 the by which section names defined which defines all here. defines inserting makes of the a Any it slash entire symbolic system tasks system deleted (/) line names which task from character a comment. not this at for are to the various be included included section. the should Perform beginning Symbolic of definitions the user's own tasks can be added to this section. The user is reminded that the assignment of task numbers in octal indicates task priority, that is, the lower the number, the higher the priority of the task. ASSEMBLING AND LOADING TASKS FOR RTS/8 The Task Definitions section, as it initially appears to the user, shown 1s below. /COMMON TASK NUMBERS - EDITED BY USER /IT IS ADVISABLE TO DEFINE ALL TASKS HERE. NAMES GIVEN BELOW /ARE USED BY SOME SYSTEM TASKS AND SHOULD REMAIN COMMENTED OUT /IF THE CORRESPONDING TASK IS NOT INCLUDED IN THE SYSTEM /PWRF= /POWER FAIL HANDLING TASK /SWAPPER= /NONRESIDENT TASK SWAPPER TASK /CLOCK= /TTY= /LPT= /MCR= /DTA= /LTA= /RK8= /RF08= /DF32= /CSA= /CSAF= 70s8= /OS8F= /DDCMP= /TELETYPE DRIVER TASK /LINE PRINTER DRIVER TASK /MONITOR CONSOLE ROUTINE /DECTAPE DRIVER TASK /LINCTAPE DRIVER TASK /RK8 OR RK8E DISK DRIVER TASK /RF08 DISK DRIVER TASK /DF32 DISK DRIVER TASK /CASSETTE DRIVER TASK /CASSETTE FILE SUPPORT TASK JUNIVERSAL DIGITAL CONTROLLER TASK /UDC= /RX8A= /RX8B= /RX8C= /RX8D= /CLOCK HANDLER - SHOULD BE HIGH PRIORITY NTASKS /FIRST FLOPPY CONTROLLER /SECOND FLOPPY CONTROLLER /THIRD FLOPPY CONTROLLER /FOURTH FLOPPY CONTROLLER ,/0S/8 SUPPORT - NORMALLY LOWEST PRIORITY /0S/8 FILE SUPPORT /DDCMP TASK FOR DECNET /NETWORK SERVICES PROTOCOL TASK /NSP= /NETWORK INFORMATION PROGRAM /NIP= /TLK= /LSN= /NULL8A= /EXIT= /NETWORK TERMINAL COMMUNICATIONS TASK TRANSMITTER /NETWORK TERMINAL COMMUNICATIONS TASK RECEIVER /NULL JOB FOR PDP-8/A JEXIT TASK /AUXILIARY DKC8A HANDLER /DKC8A= 8.1 after it This section of the parameter file is shown in Section shows the also It . program n tratio demons nas been modified for the ration demonst the in wused tasks dent nonresi two the of n additio program. 6.1.3 System Task Specifications The parameters in the System Task Specifications section control the rs assemblies of the various RTS/8 system tasks. The set of paramete ed assembl and r togethe grouped controlling a specific task are all only if that task name 1is defined in the Task conditionally The user edits the Definitions section of the parameter file. their meanings are and ers paramet The . section parameters in this 6.4. listed in Section 6.1.4 System Wide Definitions of the The System Wide Definitions section includes the definitions Status Task and s Request symbols that RTS/8 uses to describe Executive tion instruc as such ions definit useful s Flag bits. It also contain and values nal functio UDC/ICS values, call monitor ences, equival section. this alter system locations. The user should not 6-3 ASSEMBLING 6.1.5 The Task Task AND LOADING TASKS FOR RTS/8 Setup Setup body of this that task in section task the to uses five initialize system. symbols the These five are: TASK Defines of the the that RTS/8 the user defines in the entries needed to put and their definitions table symbols task number form: of the task symbolic by a statement name for the RTS/8 parameter TASK=symbol where "symbol" that the file. CUR is wuser the has Defines the field in 6-8 (e.g., bits defined of the in task's the starting CUR=10). task address NOTE The user code is must in the done by pseudo-op place field the wusing the Defines the necessarily INIWT Defines the Table entry means the up; INIWT task's the lowest initial for task = this task Run Wait when another is is when (1000 task types INIWT undefined, a VERS Defines the optional version The wuser can and CUR3, etc. define up symbols for The tables by desired, more than the code task origining Task the a task RUN and or to version number, By convention, to becomes three the other section them; no the that in when a the MCR. up this task's 0 runnable the starts = starts is becomes ER task Flags specifies command the (not INIWT system task's number setup into the example, parameter. value. corresponding task) octal) Request runnable. the initially This issues operator address in runnable the 1. in For condition. is bits This assembler starting runnable starting CUR. places field task. RUNWT not CUR%10 in address wait this by PALS FIELD. For example, FIELD task's starting code START task's specified the If being is an task's initial MQ tasks in one tasks are TASK2 and TASK3, CUR2 data into the RTS/8 places its executable code assembly. is The generated. If tasks can be created 1in one assembly by adding for any additional tasks at the end of the PARAM.PA file. It should be noted that only one task is defined in the demonstration program in Chapter 8. three ASSEMBLING AND LOADING TASKS FOR RTS/8 6.2 CREATING AN RTS/8 SYSTEM procedure that is An RTS/8 System can be created by using the general user has physically the that assumed is It described in this section. apped the bootstr has and medium, ution distrib the of copy a mounted in this treated are tasks ent nonresid Although development system. in given is tasks ent nonresid g employin on detail greater e, procedur Chapter 7. The general procedure for creating an RTS/8 System is as follows: 1. Layout on paper the system and user tasks required for the particular RTS/8 configuration to be employed. Utilize the tables and memory map given in Appendix B that show the RTS/8 components, their sizes, and their default origins determine where the tasks are to be loaded into memory. 2. Assign task names and task priorities. If nonresident to tasks are used, assign the Swapper Task a higher priority than any of the nonresident tasks. Remember that the lower the value assigned to a task, the higher its priority. 3. When large programs are involved, a documentation file should be created as a user convenience to maintain a directory of the system configuration. This file can contain information such as the tasks employed in the system, task names, task priorities, and control files. 4. Obtain a listing of the Use the 0S/8 command .LIST master parameter file (PARAM.PA). PARAM.PA to get a listing from a line printer, or .TYPE PARAM.PA to get a listing from a terminal. 5. Use an editor (EDIT or TECO values of the under 0S/8) to establish the parameters in the parameter file (PARAM.PA). The structure of the parameter file is described in Section 6.1, and the parameters affecting the individual RTS/8 system tasks are described in Section 6.6. PARAM.PA should be read in as an input file, edited, and then This procedure maintains the renamed as an output file. integrity of DIGITAL-supplied sources. Section 6. Create and edit any control files that are used (See 7. Assemble the tasks with the parameter file after all the required parameters are defined. This can be accomplished by individually assembling each task with the parameter file as 6'5). follows: .PAL RTS8<PARAM,RTSS8 or .PAL PARAM-NB, RTS8 ASSEMBLING The CCL option AND -NB LOADING indicates Ccreated. Shown has is done for every file used to Each be control control file with file between follows: -PAL An to the for Batch the and a task must a of parameter RTS/8 binary RTS/8 is included be should in the the system. the required be This Assemble placing and not Executive. assembled. tfile, file file the that also parameter efficient also be are is as used used can the control module be assembly, to inputs for that The generated then commands system. method streanm. system command job can more Batch the SUBMIT method that assembly FOR as TTY1<PARAM,TTYCF1,TTY use commands 05/8 the the alternate is the TASKS as a run and Batch BATCH and save job. which execute installing employed load The will them. nonresident use This tasks into The assembly of each task, prece ded by the parameter file, is required because there 1is no linking loader function with RTS/8. The sources System task loading assemble system a tasks to Obtain a bitmap tasks are same page Load the required at . LOAD RTS/8 Save 11. the When using it (nonresident file . LOAD Then save the same by if two memory are and control time as follows: or area tasks tasks, by into registers required user for can editing the all tasks, Task are after the more or use assembled. files can always included and it is is saved, needed. the nonresident disk as must in be this executive loaded loaded step table by first. in order Also, to entries. using the load following filename is user tasks, image) for follows: does not have to rebuild it create each a SAVE image file nonresident task from its TASKX the device: .SAVE determine it user used autoindex redefined after portions SYS system time binary be the RTS/8 loading 6.3). tasks system .SAVE If and also not for section command: each memory tasks (See Executive resident the locations can The locations system one of Each assembles memory. system from run. RTSS,CLOCK,TTY,MCR,UTl,UT2 nonresident their 0 system loaded The 0 files and that core areas of RTS/8 tasks to erroneously loaded into All be of the tasks binary loaded code area into edit Page tasks. be assembler load system creates to specific or areas. by process ready contains 1into affected the 10. are tasks, specific used assembly that DSK nonresident TASKX portion of the task on the swap N1-N2 where DSK is the swap device, N1 partition, and N2 is the highe st 6-6 is the address lowest in the address in the partition. ASSEMBLING AND LOADING TASKS FOR RTS/8 12. Start the system by using the following command: .R filename The following is applicable when using nonresident tasks. When the system starts, it calls the 0S/8 command decoder, At this which types an asterisk on the console terminal. 1initialize the block address of each nonresident task time, core image as follows: *DSK: TASKX=N In this command line, DSK is the swap device and TASKX is the core image file containing the nonresident portion of task N. Repeat this procedure for each nonresident task, one task per This line, and terminate the 1last 1line with an ALTMODE. procedure automatically initializes and starts the real time system. An RTS/8 system created with the procedure just described has If an RTS/8 system was not 00200. of address starting a it halts PDP-12, specifically confiqured for a PDP-8/E or initially to allow the operator to clear any stray device by switches or nonstandard hardware flags by operating Press START to resume operation on a PDP-8, START. pressing 8/1 or 6.3 8/L. USING THE 0S/8 BITMAP PROGRAM The 0S/8 BITMAP program can be extremely useful in determining that no RTS/8 tasks are loading into the same area or using the same Page two 0S/8 BITMAP accepts a list of binary files as input and 0 locations. Each location of core its output a map of core memory. as produces which has the digit single a by map this in represented is memory following meaning: 0 Nothing has been loaded into this location 1 Information has been loaded into this location 2 Information has been loaded into this location twice 3 ipformation has been loaded into this location three or more imes to allowed are 2's memory where There are certain places in core These areas are the RTS/8 Executive Tables bit map. the in appear (starting at location 01200), the MCR name table in the MCR, the power fail action table, and nonresident task partitions (which may contain these than Appearance of a 3 or a 2 in an area other 2's and 3's). just mentioned in the bit map indicates that two or more areas three tasks are being loading into the same location. 6.4 SAMPLE RTS/8 TASK PROGRAM for selected The task that is used as an example in this section was and to show the basic concepts of RTS/8 operation. its simplicity, The user requires The purpose of the task is simply to print "HELLO". an RTS/8 system configuration that includes a console Terminal Handler the that It is assumed (TTY) and the Monitor Console Routine (MCR). 6-7 ASSEMBLING task will standard be The program with the system. The wuser the on reqguested a LOADING PDP-8 FOR E/F/M/A with terminal. task the by is initially through the console the /SAMPLE terminal, user, RTS/8 START, the same the Run RTS/8 8K of core memory and Wait Console and then seguence a /GIVEN CUR=0 /IN FIELD INIWT=RUNWT /SET TO FIELD /PLACED will the task prints itself. If again requested occur. 0 A PRIORITY RUN WAIT IN FIELD /ANY AVAILABLE BE DEFINED /SEND AND WAIT MSG1 /THE /THE START ZBLOCK /RESUMES 3 /RTS/8 0;0 0 AS "START" /TYPE $ BLOCK TASK HERE IF REQUESTED LINKAGE /TERMINAL /HELLO/ STATE TERMINAL MESSAGE /SUSPEND THE SUSPND § PAGE /MUST CAL OF 0 SENDW TEXT When suspends TTY JMP state. Routine, PROGRAM TASK=5 CAL MSGl, in Monitor *3000 An TASKS (SAMPLE.PA) listed below is complete, and when assembled parameter file, will run as task 5 in a properly-configured by "HELLO" running on console AND OPTIONS HELLO edited version of PARAM.PA now is required for this confiquration, it 1is named PARAMS.PA. To produce PARAMS.PA from PARAM.PA, the following definitions are edited into the paramet er file: and PDP8E=1 HGHFLD=10 NTASKS=10 TTY=4 MCR=3 NTASKS is assigned sample the largest any number task task, and which SAMPLE, MCR and TTY zero less The and program .R than is then number greater is were used than smaller than arbitrarily with the 100 as in system. for octal. chosen NTASKS. assembled this values the The MCR, task range It is TTY and the values greater for than follows: PALS *SAMPLE .BN<PARAMS.PA,SAMPLE.PA The system the TTY following for and Batch the sample MCR Task to task run. stream: $JOB .PAL PARAMS-NB,RTSS8 . PAL PARAMS-NB,MCR . PAL PARAMS-NB,TTY . PAL., PARAMS-NB,SAMPLE . LOAD RTS8,MCR,TTY,SAMPLE .SAVE SYS:SAMP SEND requires This the can be Executive Task RTS8 plus accomplished by using the ASSEMBLING AND LOADING TASKS FOR RTS/8 1is Assembly and loading of the tasks, including saving the program, be to not is PARAM that es indicat -NB option CCL The e. now complet used as the name of the binary file being created. The system now can be run as follows (user input is underlined): .R _SAMP /0S/8 RUN COMMAND HELLO /TASK EXECUTES AND SAYS 'HELLO' /REQUEST SAMPLE FROM MCR >RE 5($) /RETURNS CONTROL TO MCR /SYSTEM STATUS COMMAND el >SYSTAT 03 04 05 MCR TTY >RE 5(8$) HELLO R /MCR TASK /TERMINAL TASK /TASK 5 WAITING TO BE RUN /RUN TASK AGAIN /TASK SAYS 'HELLO' AGAIN /RETURN CONTROL TO MCR /RETURN TO 0S/8 °c >EXIT /0S/8 MONITOR . NOTE all other ($) is the ALTMODE character; input lines are terminated by a Carriage Return. USE OF CONTROL FILES UNDER RTS/8 6.5 There are times when a user may want to assemble a given source module in more than one way and use the results under RTS/8. For example, suppose there are three terminals that a user wants to service under Each terminal has its own characteristics, and each copy of RTS/8. the TTY task needs to have its own set of parameters. The wuser must load three copies of the TTY task into memory at different locations, This cannot be accomplished and possibly in different fields. With a single efficiently when wusing a single parameter file. made and each be must TTY.PA file the of copies three file, parameter one edited to produce three individual tailored copies of the TTY This procedure is not convenient or modular. task. A better way to do this is to use a control file that contains all the equates necessary to define the parameters needed by a particular TTY task. The control file then is assembled together with and placed between the parameter file and the TTY module. .PAL TTY1l For example, <PARAM,TTYCF1l,TTY control creates a binary file called TTYl from TTY.PA using a To facilitate using this procedure, a skeleton TTY control called file TTYCF1l. file |is It contains all the parameters supplied with the RTS/8 task sources. Thus, a user that the user normally defines in the parameter file. the parameters editing of instead terminals, multiple who wants to use in the parameter file, can create a control file for each terminal that is used, and then edit the control file to make multiple copies as necessary. An example of a TTY Control file after it has been edited by a user is shown below. ASSEMBLING AND LOADING TASKS FOR RTS/8 TASK=TTY1l / TTDEV= / KBDEV= VT50= /1 SCOPE=1 / FILL= / WIDTH= / IS DEVICE /KEYBOARD CONSOL=1 / /DEFAULT /PRINTER /NUMBER OF LINE FILL TAB= /1 IF LSBOT= /1 LISTS TTFLD=20 DEFAULT - AND (0 IS DEFAULT 04 IS TTDEV-1 CTRL/Q CHARACTERS, WIDTH TTY -~ CODE CTRL/S /120 OLDTTY=0 / CODE DEVICE ENABLES /TTY 'TTY' MEANS I.E. 4 INFINITE), HAS HARDWARE TARBRS BOTH HANDLERS (DEFAULT that been DEFAULT 0) TTLOC=3000 This example TTY1. shows This a TTY control terminal terminal. file handler task will has be edited for task assembled for the console the floppy. Users Setting SCOPE=1 causes RUBOUT to move the cursor left one physically removing the character from the screen. The new three-page handler is specified. It is placed in field 2, starting at location 3000. position, A skeleton can easily 6.6 RTS/8 control file is generate and use SYSTEM TASK also supplied control for files for the section the parameter, or text 6.6.1 its chapter of Clock this function where manual Handler a is and where detailed noted Parameters Specifies = = description after the (Section selection 2 = PDP-8/A 3 = DK8-EP Specifies Specifies are minimum queue HERTZ of each an the system which task example. task The appears subhead. in 4.1) of hardware number and Specifies OCTAL, octal of SHERTZ preceded This number (default 1in pseudo-operator SHERTZ task parameters for clocks as follows: DK8-EA/DK8-EC KW12 clock HERT?Z those Given MEANING 0 1 CLKQLN of applicable, PARAMETER CLKTYP purposes. PARAMETERS This section provides a convenient groupi ng affect the individual RTS/8 system tasks. is RX01 other the which base. of entry slots decimal the ticks per values in parameter file DECIMAL. is resets in 20). hardware are number parameter is of system followed the by radix ticks the to per the second. that they by the second. pseudo-operator its original ASSEMBLING AND LOADING TASKS FOR RTS/8 Swapper 6.6.2 Parameters (Section 7.4) SYS for task; swap driver Specifies the SYS = RK8 specifies the RK8 driver task. SUNIT Specifies the swap SUNIT selects 0 = MEANING PARAMETER value Is KBDEV is set 4. to default value proper the is TTDEV-1. the TTY VT50 code; device Kkeyboard The following parameters are available to the user to of default Is set to the proper printer device code; TTDEV use unit; drive RKAO. (Section 4.2) Terminal Handler Parameters 6.6.3 physical device example, facilitate the task. CTRL/Q Is set to 1 (default) to enable CTRL/S and set to 0, CTRL/S and CTRL/Q are When functions. CTRL/S Typing not treated as special characters. the on printed/displayed being 1is data while next screen stops the data presentation until the This parameter must be set to 1 1is typed. CTRL/Q Both VT52. or if the user's terminal is a VT50 CTRL/S and CTRL/Q turn off the echo flag. CONSOL WIDTH Is set to 1 to specify that the handler assembled for the console TTY (default). not to specify that this handler should the MCR when "C is typed. TTY the Is set to an octal number that specifies 1is currently set to 120 width TTY width. page decimal 80 of width page a (octal), that is, WIDTH = 60 sets the TTY page width to characters. characters. 48 decimal SCOPE being 1is Set to O up wake This option the RUBOUT SCOPE=0 RUBOUT is used to determine key as (default) the treatment of follows: provides the normal mode of support. SCOPE=1 causes RUBOUT to move the cursor left one position, physically removing the character from RUBOUT If the cursor is in column 1, the screen. still TAB works, but has no visible effect. This option simulates tabs by the proper number of spaces. This 1s accomplished via the assembly parameter TABR=0 not TAB as follows: (default) specifies that the hardware does support tabs. The software simulates tabs by spaces. TAB=1 specifies that tabs. 6-11 the hardware does support ASSEMBLING FILL Fill AND LOADING characters parameter FILL=0 FILL TASKS are as (default) FILL=n OLDTTY sends feed; does to specify to 1 handler. fewer Set 3-page shorter. and set to set specify 20 to specify listed in TTY LPT Used or if the output ASSGN=200 a TTY They is OUTTXT points the Used to assign this task. Used with output the KL8-~A not is Parameters for Task; for character first handler (see of useful for ASCII. be followed word of the mode. for Section (Chapter location are not in device the Task; 6-bit the support PARAMETER new follow: to text. Routine of starting equates message TTY message should return/line feed. if Console of file. These if the carriage Used and 2. location parameter output if the field field specifies the Used the Tasks. The have to 0(default) when only OLDTTY is to be listed. specifies 3000 2-page the has FILL Set by use page TAB o01ld Used use by only 4.13.2). 5) MEANING Is set to printing 1 if the system SYSTAT status tasks. MCRFLD a the NOLINE=400 MCRCLK is SCOPE, both output MCRSYS it list selected a is 2-page to handler 1 to old o0ld set by Monitor The Is 3000. 6.6.4 the handler. Is KL8ALINE=100 of (default) old example, IND=1000 use 0 the Is NOCRLF=2000 the using example, NOPACK=4000 after FILL=4 when handler. fill VT5's. to WIDTH, any 1-5., effect to assembly (nulls) range no handler equates are messages to baud but VT50, the provide the handler. features, 3-page Several sending not in Is set via characters be 2400 barameters TTLOC fill must for standard TTFLD supported recommended TTY LSBOT n n RTS/8 follows: characters. line FOR Is set to by the user. Is set to locate 3. 0 if the MCR. the field clock in MCRFLD = facility reports of functions which 30 is desired for existent system are wanted it is places the not desired MCR in to field ASSEMBLING AND LOADING TASKS FOR RTS/8 MCRPRT Is set to the number of the partition into which nonresident portion of the MCR will be the MCR the makes parameter This swapped. MCR the of page first the r, howeve nonresident; is always resident. MCRORG Is set to specify the starting location of the Default causes the MCR to load against the MCR. end of the field. MCRCDV Set to task name of task which is to console device. 0S/8 Support Task 6.6.5 Parameters Default is TTY. OSTTDV MCR MEANING Is set to the number of fields allocated for 0S/8. specifies OSFLDS = 2 for OSKBDV the (Section 4.6) PARAMETER OSFLDS be two fields or 8K of memory 0S/8. Is set to the device code that selects desired OSKBDV = 03 specifies the 0S/8 keyboard terminal. keyboard for 05/8. terminal use of the console O0S/8 requires its own dedicated terminal. Note: Is set to the device code which selects desired OSTTDV = 04 specifies the use 0S/8 teleprinter. of the console teleprinter for 0S/8. OSSYSD Is set to select the 0SSYSD = DTA task. 0S/8 system device driver specifies DTAO0 as the 0S/8 system device. OSFILL Is set to the number of null characters that hard-copy terminals. A terminal device handler does not have Note: be included for the 0S/8 terminal device. 6.6.6 must follow a line feed character on the 0S/8 terminal. 2400-baud a OSFILL = 4 is specified when wusing 0 when using standard Set to VT05 terminal. KL8-A Support Parameters to (Section 4.13) PARAMETER MEANING KL8ADV KL8-A. first the for Specifies the device code If multiple KL8-A's are used, they Default is 40. should have consecutive device codes. KL8ACT Specifies the page for the KL8-A connect routine. The KL8-A connect (if KL8A=1l). 7400 is Default routine must be located in field 0. ASSEMBLING 6.6.7 Line Printer Handler AND LOADING Parameters TASKS (Section PARAMETER Specifies Printer LPTFLD Handler the starting Handler Specifies DECtape DTALOC the Parameters Specifies DTAFLD of field of the (Section 4.4) Line the Printer (Section the starting 1location of Task. Specifies Task location Line Task. MEANING Handler EXIT 4.3) Task. PARAMETER 6.6.9 RTS/8 MEANING LPTLOC 6.6.8 FOR the field of the DECtape the Handler DECtape Task. 4.14) PARAMETER MEANING EXITFLD Specifies the field EXITLOC Specifies the starting of the EXIT location Task. of the EXIT Task. CHAPTER NONRESIDENT 7.1 7 TASKS OVERVIEW A nonresident task is a task or a portion of a task that resides on a mass sStorage device during the time the task is not runnable. The mass storage storage device medium is (e.g., called the swap device. It can be any mass an RK8 cartridge disk or an RX8 floppy disk). When a nonresident task becomes executable, residency request. The Executive then runs the Executive posts a a special task called the Swapper to load the nonresident or portion of the nonresident task into memory. The loading process is called a swap. The memory area into which or out of which the nonresident task is swapped is called a partition. A partition is a contiguous block of memory that is used for task execution; it is readable in a single mass storage call. The use of nonresident tasks permits several tasks to share the same areas of memory, optimizing the use of available memory. Tasks can be either totally or partially nonresident. are totally nonresident; in most applications, Very few tasks the nonresident portion includes all, or nearly all, of the active locations. Active locations are those that contain executable instructions or data that are never accessed by other tasks. The resident portion of a task includes messages, event flags, buffers and similar passive registers that may be needed by other tasks. NONRESIDENT TASKS PDP-8 MEMORY SWAP DEVICE oK (Disk, DECcassette, etc.) REAL TIME PROGRAM AREA Contains Contains: nonresident 1. Resident tasks 2. Resident portions of portion of a task non resident tasks pK PARTITION AREA SWAPPER TASK 1. Contains non resident portion g (SWAP.PA) ’ - o 2. Allows multiple tasks of same . . . 2. relative size to run in the i Swap Device. 3. The characteristic of a partition as s 3. Also pads and follows- ° Swaps out non- . resident task onto same memory area. is portion of task into memory. swaps 5 writeable and checkpointable tasks. a) Has a starting address b} Resides completely within a single memory field c) Length has to be an integral number of pages d) Cannot overlap another partition nK Figure The process that is similar to related and task onto is the another it are made the Implementation portion capability swapping nonresident is Task nonresident overlay swapped task into of found 1is much has two or out a in task 0S/8 more of "checkpointability". "writeable" its nonresident task. A -~ i.e., if whenever writeable the it is task task's portion swapped is code memory IV and powerful than that establish memory. These two and device into FORTRAN properties "writeability" swap self-modifying Nonresident However, Every how properties A swaps the programs. overlaying. when 7-1 any is must out to be make task written room that changeable during execution, and any task that must initialize before it can start. writeability feature guarantees that the nonresident portion of a is always up to date by refreshing the swap device image of nonresident portion whenever the task is swapped out of memory. A task is made automatically, task. swapped A task back "checkpointable" without that was its if it may be swapped consent, to make room for a checkpointed automatically relinquished the the point where was interrupted. as soon and as necessary memory space. it was interrupted, and swapped all task is The task the of memory higher priority of priority Execution the is task out out higher for then not memory tasks is have continues at aware it that NONRESIDENT TASKS checkpointable Some nonresident tasks have Dboth writeabedle whenanda task must modify utiliz are tasks ble Writea characteristics. temporary or tions instruc itself (for example, it includes JMS that are those are inting checkpo for e suitabl Tasks locations). 1) fairly long-running, and 2) are required only occasionally. Writeable Tasks 7.1.1 difying, or A writeable task is one that includes code that is self-mo execution Before on. executi code that must be initialized before >n the files image core as reside must tasks dent begins, all nonresi ent swap device. The core images are created by loading each nciresid can this command; SAVE monitor 0S/8 an g task separately, and executin portion ent nonresid its , executed is task a When BATCH. under done be If a task 1is is read from this core image file by the swapper. the same file into written be will portion ent nonresid its e, writeabl writeable task, a that when it is swapped from memory. It is likely later some at e writeabl not itself flag would , at execution start-up time when all initialization is completed. The nonresident portion of a task is writeable if it must be saved on a mass storage device (swap device) before overwriting it in memory with another task. Checkpointable Tasks 7.1.2 Checkpointing is ideally suited for long-running can short run tasks tasks. The system 1in the same area, swap them out of memory, and swap the long running task back again. Interaction Between Tasks 7.1.3 any Resident tasks can interact with the resident portion of ng overlappi occupy that tasks nt nonreside Two task. nt nonreside memory regions can interact with each other through their resident partitions. For example, if a nonresident task is executing, it sends The message recipient can a message and is then checkpointed. the sender is not totally though even message acknowledge the sender's resident. 7.2 However, the message sent must be resident. MEMORY PARTITIONS The swappable portion of a nonresident This partition is simply partition. task resides in a memory a contiguous block of memory locations that is readable in one mass storage call. has the following characteristics: Every partition e It is wholly contained in one memory field. e It has a starting address. e It has a length (size) that must divide evenly by 200 (octal) since 0S/8 file structured devices read and write in one-half block e (one page) increments. It normally begins at an address which is a multiple of 400. NONRESIDENT The user can in the parameter procedure are Only 0 one task are being task owns (described long as parameters or Any for the establishing source Section mutually another. partitions number the file described in is Partitions overlap set of the the partition Swapper 7.4. distinct, number TASKS that of is, one partitions can partition be numbered in any order, from 0 to n-1, the first partition. They need not be can the occupy a partition partition in the higher nonexecutable. until at that next section), or (if priority tasks that any given task the share the cannot defined. time. is This The n with partition adjacent. executes task either Task. a The occupying "free" command checkpointable) as partition remain It is most convenient if every partition begins on the first 1location even-numbered pages, that is, the starting address is a multiple of 400 octal. of 7.2.1 A FREE free (for Command request example, can be SEND, appended RECEIVE, CAL /A COMMAND+FREE CALL to the function etc.) as follows: TO IS /REQUEST. THE /ISSUING /MEMORY /BECOMES /CANCELS free the request must be of some ER's EXECUTIVE ANY RTS/8 EXECUTIVE TASK IS TO BE SWAPPED OUT OF SOME OTHER TASK EXECUTABLE AND REQUIRES THE IF /PARTITION A THE ~ /"COMMAND" argument BEFORE THE combined FREE with seguence: THE FREEING TASK REQUEST. some other executive request. If CAL FREE is issued, it will be interpreted as: CAL SEND+FREE Only are nonresident tasks may issue free requests; other free 1ignored. A task may free 1its own partition, but partition A task If swapped pending in In any into compete 1is partition. task its task the the The the has a whenever pending partition partition, partition freeing it request in cancelled, and No read or this case. (which may or may is assured the freeing task along with executable partition. In wait for partition, an it If there no continues requests any this freeing task retains operation is necessary the the executable the write By must for immediately. the task may become residency in programmer partition free for for requests command swap frees partition until some other occupant case, once the freeing task becomes occupants. task task. other request the free either must another normally event. is of requests never other before 1is to wait residency. again, it executable any other case, the free possession of the to effect this the partition whenever the occupying writeable) must wait for an event, the freeing not be that the partition 7-4 contains a running (i.e., NONRESIDENT TASKS nonwaiting) task whenever possible. If there are no writeable_ tasks in the partition, no swap device I/0 1is involved in freeing the partition. 7.3 NONRESIDENT TASK INITIALIZATION RTS/8 system resident task. The following procedure is recommended to implement any containing nonresident tasks. task Code and debug each nonresident 1. a as During the debugging, load the task being debugged and only the tasks required for execution of the task to be debugged. Once the task executes correctly while resident, make it 1in the Making a task nonresident is described nonresident. sections that follow. each of portion On a 1listing, mark the nonresident task's size of each the Determine task. nonresident Then design the partitioning scheme and nonresident portion. allocate nonresident tasks to memory partitions by modifying 2. the parameter file as described Re-origin each 3. nonresident in Section 7.4. task so that its nonresident If necessary, ensure that portion lies within its partition. into resident portions of nonresident tasks do not overlap an O0S/8 utility program, is BITMAP, another partition. two useful for this since it allows the user to determine if being loaded into the same erroneously are tasks more or Section in The use of BITMAP is described memory section. 2 Chapter in given is BITMAP of description detailed A 6.3. task resident a Execute the task as of the 0S/8 Handbook. once more to make sure it does not contain location dependent odd an on begins any memory partition if Also, code. numbered page, temporarily relocate each task that resides in An example of starting a nonresident task at that partition. an arbitrary boundary is given in Section 9.3. 7.3.1 Parameters for Nonresident Tasks employing initialized when Several .assembly parameters must be the in located are the parameters Five of tasks. nonresident the in included three must be and (PARAM.PA) file parameter task nonresident itself. contains (PARAM.PA) file parameter The which SUNIT) and SYS SWAPPER, CHECKP, employing nonresident tasking. These (PARTNS, parameters five 1initialized when be must as defined are parameters follows: PARTNS defined. of memory partitions number is set to the PARTNS is set to zero in the parameter file to indicate that no memory partitions are defined in the system. CHECKP is set to 1 if any nonresident task is checkpointable. SWAPPER is the nonresident task swapper task; it must be a task number that is of higher priority than assigned value in lower number the task it swaps, that is, a than that of any nonresident task in the system. NONRESIDENT SYS is set to designate example, SUNIT is set SYS to = RK8 specify for example, drive. Every nonresident task the SUNIT source PARTNO= n, where 0, if 1, if the WRITE= 0, if the l, if the task Failure to execute task not A initialize a used except nonresident However, the buffers executed. will is executing. always It nonresident portions Each is checkpointable is not is writeable presence Hence, is not out be of no present 1in tasks that Assembling nonresident must include safe TASK3 (see clearly intermixed. task the is when name 0) program to identifies a the PARTNO from a portions that task should while to a resident task. of task since not being a is restrictions. The nonresident nonresident assume that the task is nonresident is not executing. There resident and nonresident defined assembled 6.1.5, at resident and is a tasks; nonresident Tasks parameter Section different memory be Nonresident three (starting PARTNO variable coding have cannot causes parameter nonresident memory generally unit; cartridge tasks. in special correctly of the appreciably not drive disk writeable parameters The number for task. following checkpointable is never present when the task structural difference between slight 7.3.2 task the the partition task; driver physical include task task's nonresident 1is specifies not task. are device 0 is driver disk swap = must in be the the should There portion portion task buffers device is these nonresident swap task unpredictably. as be n the the specifies parameters: CPABLE= TASKS separately. TASK, Task but never The the nonresident parameters Setup). TASK2 task and The swap device file that contains the nonresident portion of the nonresident task requires special treatment. This file must contain the first word of the nonresident portion in the first location of relative block 1, the second word of the nonresident portion in the second location, and so on. This file must be a core image; however, the O0S/8 monitor requires that the first location of any core image section load into a memory address that divides evenly by 400(octal). If the 1lowest address in the partition also divides evenly by 400 (octal), this condition is met. There is no problem because every task can be assembled in the partition directly. Modify- the parameter parameters. Then file assemble the together. 7.3.3 (PARAM.PA) to nonresident establish task and the the desired parameter file Creating the SAVE Image File Create a image file .R SAVE as image file follows: (nonresident ABSLDR *TASKX.BNS .SAVE DEV TASKX.SV N1-N2 7-6 disk image) from the binary NONRESIDENT TASKS For each task, where DEV is the swap device, Nl is the lowest address The in the partition, and N2 is the highest address in the partition. of each s resulting core images contain only the nonresident portion , the However d. outline sly previou ments require the all task and meet control core the is 0) first block of the core image (relative block it is block, which is not used by the swapper. As stated previously, strongly recommended that the partitions begin at a location that is a multiple of 400(octal) starting at 400(octal) since the 0S/8 SAVE command only saves areas boundaries. NOTE can be constructed files image SAVE Also, the 0S/8 CCL under 0S/8 BATCH. command LOAD may be used to create the SAVE 7.4 image. PARAMETER INITIALIZATION FOR PARTITIONS The user must initialize certain parameters to define the partitioning scheme. They can be set in either PARAM.PA or SWAP.PA. The following three variables are required for each of the partitions: MFLDnn= ADDRnn= SIZEnn= MEMORY FIELD OF PARTITION N MEMORY ADDRESS OF PARTITION N SIZE OF PARTITION N, SPECIFIED IN PAGES The user can set up the parameter file to accept eight sets of When more than eight partitions are defined, partition parameters. be extended according to instructions must the parameter table contained in source. Since adding extra partitions does not increase system overhead, it is best to have as many partitions as possible. This minimizes the number of tasks that must share a partition. Each partition should have at least two occupants; otherwise, there is no making the task nonresident. reason for swapper source. also be defined by initializing the 7.4.1 General The partitioning scheme can required parameters within the Information The entire partition table appears on the swapper PAL or CREF output The user should check it carefully to ensure that all listing. partition parameters (MFLDnn, ADDRnn and SIZEnn for each partition) The parameter file generates the residency were defined correctly. table entry for each nonresident task and it appears on the PAL or CREF output listing for that task. The user should examine word 1 of this entry to verify that the nonresident task parameters PARTNO, CPABLE, and WRITE were initialized correctly. Word 2 of the residency table entry will be zero because the task's block address on the swap device is unknown at assembly time. This location is initialized by the 0S/8 command decoder shortly after program startup, and it can be examined anytime thereafter. 1In the usual case, where the file is a core image, this location should contain M+l, where M is the Dblock address returned by the following command: .DIR DEV:TASKX.SV/B NONRESIDENT TASKX.SV is nonresident 7.5 the core portion of NONRESIDENT Perform l. the TASK image the on TASKS the swap device task. containing the IMPLEMENTATION following procedure to implement nonresident tasks. Assemble every task that will be included in the program as described 1in Section 7.3.2. Obtain PAL or CREF listings and bitmaps. Finally, obtain a bitmap of the entire system and verify that memory is allocated correctly. On the bitmap, 3s are legal Create Load only the the within SAVE partitions. image binaries of file as the RTS/8 described or start load their Either save it from the resident the Section executive including nonresident tasks. Always first. Nonresident tasks are included order to entries. in and 1load in this portions and program as a loaded keyboard. 7.3.3. each task, the executive operation in Executive core table image file Start the real-time program using the monitor R command. calls the 0S/8 command decoder, which types an asterisk on the console terminal. At this time, initialize the block address of each nonresident task core image as follows: This *DEV:TASKX.SV=N In this command line, DEV is the swap device and TASKX .SV is file containing the nonresiden t portion of task N. Repeat this procedure for each nonresident task, one task per 1line, and terminate the last line with an ALTMODE. This procedure automatically 1initializes and starts the real-time program. the core This initialization under image 0S/8 BATCH procedure may control. be executed automatically Example: $JOB SYSTEM "SYSTEM" AND INSTALL /NONRESIDENT TASKS. /RUN -RUN SYS SYSTEM *TASK1=35 /TASK *TASK2=36% 35 IS /TASK "TASKI" SAVE 36 IS IMAGE "TASK2" SAVE IMAGE SEND Submitting SYSTEM.BI installing its Debug the placing entire two HLT appropriate) and examining executed. Use remove permanently MCR output undetermined MCR has the MCR HLT resident user system tasks. point to in the the and/or memory the a When snapshot time that terminal. is once console instructions areas. represents output RTS/8 program. Accomplish this instructions (preceded by place and runs nonresident and using of long SYSTEM. SV, by selectively IOF, the HLT switch NOP, has register to modify MCR, remember memory past by if been at the time to all that some the CHAPTER 8 DEMONSTRATION PROGRAM This chapter contains a demonstration of RTS/8 with nonresident tasks 1Included is a listing of the modified executing in the foreground. 1is an example of there In addition, parameter file (PARAM.PA). NR20 (Tasks tasks nonresident NR22) and the assembly and load and instructions required for implementing the demonstration program. 8.1 /2,8 MODIFIED PARAMETER FILE PARAMETERS LSTFLGaQ RTS/8 TASKS VEB+DECNET JCHANGE @ TU 1 TO PREVENT LISTING PARAM N N NN NN NNN YN, XLIST FOR LSTFLG (PARAM.PA) (C) 1974,1975,1976 BY DIGITAL EQUIPMENT CORPORATION NN NN N NN N COPYRIGHT /THE INFORMATIOM IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT NOTICE /AND SHQULD NOT BE CONSTRUED AS A COMMITMENT BY ODIGITAL EQUIPMENT /CORPORATION, /FOR ANY ERRORS OIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY THAT MAY APPEAR IN THIS DOCUMENT, / /THE SOFTwWARE DESCRIBED IN THIS DOCUMENT I8 FURNISHED TO THE PURCHASER /UNDER A LICENSE FOKR USE ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED /(WITH INCLUSION OF DIGITAL’S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH /SYSTEM, EXCEPT AS MAY OTHERWISE BE PROVIDED IN WRITING BY DIGITAL, / /DIGITAL EQUIPMENY CORPORATION ASSUMES NO RESPONSIBILITY FOR THE USE /O0R RELIABILITY L . S T S N N /DIGITAL, OF ITS SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY DEMONSTRATION /RTS8 va EXEC PDP8E=] PARAMETERS = EDITED BY USER /NUMBER OF 1 KL8A’S IF IN USE ONE KL8A (UP PROGRAM PDP1e=D EAE=Q PWRFAL=D KLL8ARD /L.t HGHFLD=3Q IFDEF IFNZRO TO 4 LINES) < CUR HGHWFLD~CURB 42020 €CURBIG, _ERROR_ »> NTASKS=23 /FLAG WARNING IF UNDEFINED FIELD SEEN CHECKP®] PARTNS =1 /(THE N PARTITIONS ARE NUMSERED FROM @ 10 N=1) /COMMON TASK NUMBERS = EDITED BY USER /1T /ARE /1F 18 ADVISABLE TO DEFINE ALL TASKS HERE , NAMES GIVEN BELOW BY SOME SYSTEM TASKS AND SHOULD REMAIN COMMENTED OUT CORRESPONUING TASK IS NOT INCLUDED IN THE SYSTEM USED THE /PWRFs CLOCK={ SWAPPER=]s TTy=se /POWER FAIL HANDLING TASK LPTe3 MCRsd4 /DTAm /LTAs /OECTAPE DRIVER TASK /LINCTAPE DRIVER TASK /RFQ8s /RF28 DISK URIVER TASK /0F32 DISK DRIVER TASK /CASSETTE ORIVER TASK /CASSETYE FILE SUPPORY TASK /UNIVERSAL DIGITAL CONTROLLER RK8=7 /DF32s /CSAx /CSAF= /UDCx /RX8Ax /RX8B= /RX8Cs /RX80Ds DS8=NTASKS 0S8F=15 NR20=20 /FIRST FLOPPY CONTROLLER /SECOND FLOPPY CONTROLLER TASK /THIRD FLOPPY CONTROLLER /FOURTH FLOPPY COUNTROLLER NR22s22 /DDCMPs /NSP= /UDCMP /NIP® /TLKs= /LSNs /NULLL8AS /EXIT= /DKC8An TASK /NETWORK /NETWORK /NETWORK INFORMATION PROGRAM TERMINAL COMMUNICATIONS TERMINAL COMMUNICATIONS /NULL JOB /EXIT TASK PARAMETERS XLIST DECNET SERVICES FOR /AUXILIARY /SOFTWARE FOR /NETWORK = TASK PDP=8/4A UKCBA EDITED PROTOCOL TASK TASK TRANSMITTER RECEIVER HANDLER BY USER 1 IFDEF 0S8 XLIST LSTFLG < 0SFLDSsE2 0STTOVa3] 0SKBDV#3D 0SSYSDeKKS OSFILLwO /DEFAULT IS OSTTOV=} /(EG 4 FOR 24@@ BAUD /QRIGIN (IN FIELD @) /0S80RGa XLIST 1FDEF MCR XLISY LSTFLG K= /MCRCL < MCRSYSs{ /MCRFLD= /MCRORGs /MCRPRTs /MCRCDvVs /0 1F MCR /4 1F DESIRED /FIELD OF /LOCATION 700 /CONSOLE TO /DEFAULT 1§ XLIST 1> IFDEF cLock XLIST LSTFLG FACILITIES MCR NUMBER BE TTY < CLKQLN®=2Q DECIMAL HERTZsiooo /MAY BE CHANGED BY TO BE OMITTED (DEFAULT (DEFAULT) MCR OF /PARTITION CLKTYP®Q VT@S) 1> USER (DEFAULT OF USED MCR BY IS (IF MCR, END OF FIELD) NONeRESIDENT) E,G, TTY ® §) DEMONSTRATION PROGRAM SHERTZu1{ IFNIZRO OCTAL XLIST /LPTLOCs /LPTFLOs IFDEF CLKTYP&{ <HERTZ®175@> 1> LPT < DTa < > IFDEF /FORCE DKBEP,KWwi{2 TO { KHZ /DTALQOCS D= /DTAFL > /SET TO *LSTFLG® 1F YOU DON’T DESIRE TBLLST® 0@ /70 SEE TABLES WHEN PARAMETER FILE 18 /NOT LISTED, /SYSTEM LOCATIONS: MSGTBLS 1200-2 TSTABLS NTASKS+2"2+MSGTBL=4 /TASK MESSAGE TABLE /TASK STATE TABLE = HOLDS TFTABLS NTASKS+2"4+TSTABL=! /TASK FLAGS TABLE = HOLDS XLIST /TASK STATUS FLAGS 1 IFDEF XL1IS8T SWAPPER « LSTFLG IFNDEF SUNIT SYSERKS SUNIT=Q /TASK LINK,UM,DF,I1F,PC,AC,MQ <SUNITs 2> /DEFAULT SWAP UNITY IS 0 @ FIELD / (PARTBL) ENTRIES?H /PARTITION TABLE /MUST BE INITIALIZED 8Y USER AS EXPLAINED IN THE COMMENTS /DON*T FORGET TO REMOVE LEADING "/" FROM LINES USED / RESTBL® TFTABL+NTASKS+2 PARTBL® NTASKS=SWAPPERTM2¢RESTBL*347774 /RESIDENCY TABLE /PARTITION TABLE *PARTBL XLIST IFNZRO MFL.D2O=} XLIST 1 < PARTNS TBLLSY ADDROQO=4Q0 S1ZEQ0Qn} SIZEQQ*10+*MFLDO0Q"10+4000 ADOROD MFLOD]= ADDROQLs= SIZEQ)s IBLOCK XL18Y IFNZRQ XLI8T < PARTNS»=} TBLLST /MEMORY FIELD OF PARTITION »} /LOWEST ADDRESS IN PARTITION #} /8S12E OF PARTITION #1 (CORE PAGES) SIZEQ1TM1@+MFLDBL1TM10+400Y ADDROY I8LOCK XLIST MFLDOes ADDROZ= SIZER2TM= 2 IFNZRQ XL187 2 PARTNS=2 TBLLST < /MEMORY FIELD OF PARTITION #2 /LOWEST ADDRESS IN PARTITION #2 /S81ZE OF PARTITION w2 SIZEQ2"10+*MFLDO2"10+4000 ADDRQ2 ZBLOCK XLISY 2 XLIST THLLST /PARTITION #3 IFNZRO MFLDR3s PARTNS=3 < ADDRO3s SIZEQ3s SI2EQ3~10+MFLDO3"10+4000 ADDRE3 Z8LOCK XLIST IFNZRQ XL1ST MFLDO4s 2 PARTNS=4 TOLLST /PARTITION < #4 ADORO4s S1lEQ4s SIZEG4"1O+*MFLDO4TM10+4000 ADORQ4 DEMONSTRATION ZBLOCHK PROGRAM 4 XLIST IFNZRO PARTNS=5 XLIST TBLLST MFLDRS® < /PARTITION ADDROSH #5 SIZEQSs SIZE@5TM10+MFLDRSTM18+4000 ADDROS ZBLOCK 2 XLIST IFNZROD PARTNS=8 XLIST TBLLST MFLDO6= < /PARTITION ADDRO6®= %6 S1ZEd6s SIZEQ6"1 2+MFLDR6"10+4000 ADDRQS& ZBLOCK 2 XLIST IFNZRO XLIST THLLST /PARTITION #7 PARTNS®=7 MFLLBT= ADDRO7= < SIZEQTs SIZEQTTM) Q*MFLLRT"10+400Y ADDROY ZBLOCK XLIST / /ADDITIONAL 2 {>>»>>»>> PARTITIONS /FURTHERMORE, / THE NN NN, PRTEND=, 1> IFDEF TTy XLIST L3TFLG NNN SCOPEs= FILL» NN OLDTTYn NN LSBOTs TTFLD» TTLOC= OF PARTITION AS SHOWN IN 1> IFNZRO KL8A XLIST LSTFLG XLIST 1> IFDEF EXIT ABQOVE FIELD ZERO TABLE DEVICE CODE DEVICE » DEFAULT LINE /1 /1 1IF TO /1 LISTS WIDTH TTY USE HAS OLD IS BOTH (© MEANS 4 IS TTDEVel 4 INFINITE), DEFAULT HARDWARE TABS 2=-PAGE TTY NANDLER HANDLERS (DEFAULT /FLIELD OF TTY TASK (TIMES /LOCATION OF TTY TASK XLIST 2) 10) < /KL8A /KLBA /KLBACT= DEVICE CODE = DEFAULT IS 40 CONNECT ROUTINE PAGE = DEFAULT I8 74002 < XLIST /EXITFLODs LSTFLG /EXITLOCs /LOCATION i > /FIELD OF EXIT TASK OF EXIT (TIMES TASK 12) LSTFLG PUPBE <PDPBEE{> <PDP12e0> PUP12 EAE <EAEED> PWRFAL <PWRFAL®D> KL8A <kLB8A=D> IFDEF i NSP XLISTY LITFLG MAXCCBs USER ANYWHERE CODE = DEFAULT MEANS CONSOLE TTY (DEFAULT) ENABLES CTRL/S AND CTRL/Q /TTY TABs XLISTY THE RESIDE /1 MEANS TTY CAN 00 A BACKSPACE /NUMBER OF FILL CHARACTERS, 1,E, WIDTHS® IFNDEF IFNDEF 1FNDEF IFNDEF IFNDEF BY MAY < /1 /1 VTSo= XLIST END /KEYBUARDO CONSOL = XLIST DEFINED TABLE /PRINTER KBDEVsS /KL8ADYS BE /NOTE XLIST TYDEVS= MAY PARTITION « /NUMBER /EsG, 3 OF LOGICAL CHANNELS FOR 3 CHANNELS (CCB*S) BEING USED /THESE ARE NUMBERED {,2,3 MAXNOD= /NUMBER OF NODE NAMES IN NODE TABLE NSPFLDw® /PIELD NSPLOCe /(TABLES INCLUDE CCBTAB, LNKTAB, NODTAB AND NETTAB) NODNUMS 2600 OF NSP TASK AND MOST NETWORK /URIGIN OF NSP TASK, MuST BE ,LE, /THE DEFAULT 1S CURRENTLY 3200 /NODE NUMBER OF THIS NOOE TABLES 3200 (E,G. 32) IS 120 DEMONSTRATION PROGRAM /IMPORTANT RELATIVE ORIGINS WITHWIN NETWORKS TASKS DRLXITs N3PLOC+4400 CCBTABs DRLXIT+200 /ADDRESS OF AST DE~QUEUER /ADDRESS OF CCB TABLE NETTAB=® NODTAB+60 /ADORESS OF NETWORK *INFORMATION® TABLE /ADDRESS OF NODE TABLE NODTABs CCBTAB+1R0 /THE DEFAULT NETWURKS TASKS USt CORE AS FOLLOWS: (1 LINE, @ PAGE NODE POOL) /DDCMPE PAGE 0, 0200=~3577 3200~7517 PAGE ©, /N8P /NETWORK TASKS USE PAGE @ AS FOLLOWS: 10=12, 15=17, /DDCFLD: /NSPFLO /NCDE TABLE ENTRIES /EACH ENTRY HAS THE /WORDS 1=3 32=77 77177 FQORM ©@=PADDED) (é=BIT, NODE NAME LINE NUMBER BlT 2=1 IF ADJACENT NODE BITS 4»11 CONTAIN NODE NUMBER /WORD 4 /WORD 5 / IFOEF TASK FIELD NSPFLOX10 < IFZERO TASK=NSP « *NODTAB NOOTAB, TEXT /NAME/ 0 ) *NETTAB+4 /LINE /NODE /0UKk NODE NUMBER TEXT /NAME/ /0UR NODE NAME i DUCMP < NODNUM FIELD NUMBER NUMBER @ >»> >» XLIST IFDEF MAXLINS XLIST MAXPKTs 24 /KG8E®m ODCFLD= DDCLOCs Q200 LCBSIZs 32 PKSIZE= 14 LSTFLG /NUMBER OF PHYSICAL LINES BEING USED /t,6, 3 FOR 3 LINES /THESE ARE NUMBERED /SET TO 10T SKELETON IF KGBE IS PRESENT (E.G, 6118) /FIELD OF DDCMP TASK,LCBTAB AND *NODE POOL* (E,G, 20) /THIS FIELD MUST BE DIFFERENT FROM NSPFLD /O0RIGIN OF DDCMP TASK /THE ABOVE MUST BE BELOW S000~SIZE OF NODE POQL AND LCBTAB /THE DEFAULT IS CURRENTLY 200 /GLOBAL DEFINITION OF LCB SIZE /6L0BAL DEFINITION OF PACKEY ODCFNCs DOCLOC HEAQPKs 9,1,2 /8ET TO NUMBER OF NODE POUL PACKETS TO ALLOW /THE NODE POOL EXISTS AT THE END OF DODCMP /JUST BEFORE THE LCB TABLE (SIMILAR TO THE CLOCK QUEUE) /EACH PACKET REQUIRES 14 WORDS OCTAL, (ABOUT 10, PER PAGE) /(THE DEFAULT REQUIRES 2 PAGES CORE) /ADORESS OF LCBTABs MAXPKT"PKSIZE+HEADPK DDCEF= FREWDs DOCTL=e DDCHD= NETWORKS PAGE @ 46 47 50 S} ATNINPS S¢2 OHORs 5% QCRCLs ODCRCL® 65 65 OUTCOFs 67 DDCUSKRS® N3P XLI8T 12 XLIST IFDEF XLIST /NIPFLDs /NIPLOCs /NIPARTs /SKIMPu 1 NIP LSTFLG (OO0 NOY ALTER) /ADDRESS OF DDCMP DUCLOC+3@2e9? /IMPORTANT (DO NOT ALTER) SIZE fFUNCTION CALL" ROUTINE START OF PACKET FREELIST /ADDRESS OF LINE CONTROL BLOCK TABLE GLOBALS /DOCMP 1/0 EVENT /LOCATION OF I/0 FLAG PACKET /POINTS TO TAIL OF /POINTS TO HEAD OF DDCMP DDCMP FREELIST HEAD INPUT QUEUE INPUT QUEUE /POINTS TO TRANSMIT COMPLETE RING BUFFER /LOCATION OF HEADER BUFFER FOR TRANSMITS /HEADER CRC FOR TRANSMITS /DATA CRC FOR TRANSMITS /DATA DESCRIPTOR FOR TRANSMITS /DEFAULT USER OF DDCMP TASK < /FIELD OF NIP /LOCATION OF (TIMES NIP 10) /PAKTITION FOR NIP /SET TO § TO GET SHORT NIP 8-5 DEMONSTRATION /NIPLOGE PROGRAM /DEVICE NIP QUTPUTS TO /DEFAULT /NIPRESs IS LPT IF IT EXISTS (OTHERWISE FOR RESIDENY PORTION OF NIP /LOCATION /REGUIRED /TLKF| Dn /DEFAULT XLIST 1 > IFDEF XLIST TLK < LSTFLG ONLY IS /FIELD OF /TLKLOCs TLKCHNS XLIST IFDEF XLIST 1 LSN NIPART TLK TASK TLK ASSIGN TASK TO OF TASK /START CHANNL TO /CCB IF DEFINED NIPLOCe2p0 OF TLK TASK > < LSTFLG /LSNFL D= /FIELD /LSNLOC= /START LSNCHNsz OF LSN TLK (TIMES TASK 10) /QCB CHANNL TO ASSIGN TO LSN TASK 1 > XLIST XLIST LSTFLG /EQUIVALENCES: ACTT776s3 CLL STA AC7775= RAL CLL STA RTL AC4D0Os CLA STL RAR AC3T777Ts CLL STA RAR AC20002® CLA STL RTR ACQo0o2m CLA STL RTL /MONITOR CALs= POSTDS= WAITM® SENDs RECEIvs CALL VALUVES: JMS 2y JMP I JMS 24 I 25 /CALL THE EXECUTIVE /DISMISS /WALT AN FOR INTERRUPT MULTIPLE EVENTS /NOTE: "we® MEANS CRITICAL VALUE MAY NOT /BE CHANGED WITHOUT MODIFYING SYSTEM CODE}} /SEND MESSAGE ") | /RECEIVE MESSAGE WAITE= ¢ /WALIT RUN® 3 /CONTINUE SUSPNDs 4 /SUSPEND FOR EVENT TASK TASK FLAG EXECUTION EXECUTION POSTs 5 SKPINS® DERAILs /POST 6 7 BLKARG® /INSERT CODE INTO INTERRUPT /INITIATE ENU=ACTION 10 /BLOCK SENDWs TASK 14 UNBARGS® RESCHDs WAITXs FREE= /SEND 12 13 14 4000 MESSAGE /UNBLOCK TASK FOR REASON SPECIFIED /FORCE A RESCHEDULE /JWALT FOR EXACTLY THIS EVENT FLAG /*«FREE PARTITION XLIST i IFDEF uoC XLIST AN EVENT FLAG FOR REASON AND SKIP SPECIFIED CHAIN IN ARG WAIY IN ARG < LSTFLG AD=2)D0%1}D1s2)GCa3JECu4RCES DCs6JECTS7)CSs1pjDCTa AT 11 /TASK XLIST 1> XLIS8T LSTFLG STATUS NCNRWTs EFWTs 4200 2000 RUNWT=s {p0o@ SWPWTe EORMWTS 2400 22080 FLAGS: /*«NONRESIDENT TASK JEVENT FLAG WAIT /SCHEDULE WAIT /*%SWAPPER WALT /EVENT FLAG OR MESSAGE USERWTs=s 2100 /USER ENABWTs MSGWT= Qp40 /ENABLE NETWTs Q0202 Qp1i@ /NETWORK .DNEWTs Qp01% /*%DOES NOT EXIST IFNZIRO WAIT SPECIFIED /MESSAGE KL8A WAIT WAIT WAIT WALT WAIT _ (RESERVED <IFNDEF FOR POSSIBLE WAIY KL8ACT « KLUD= KLBACT= KL8A=1/3"200 TSWFLG® 35 TODL» TOOHs DATEs MCREFs /TASK L1 37 40 41 /LOW ORDER TIME OF DAY IN FIELD @ /OATE IN 088 FORMAT IN FIELD @ 7420=KLUD>> SW INHIBIT /HIGH ORDER /MCR START FLAG TIME OF DAY EVENT FLAG IN FIELD @ IN FIELD @ IN FIELD 8-6 0 FUTURE USE) TTY) DEMONSTRATION PROGRAM /SOME USEFUL EQUATES FOR TTY AND LPT MESSAGES! IND®1000 /TEXT IS NOT PACKED IN 6=BI7 /OUTPUT SHOULD NOT BE FOLLOWED BY CR/LF /OUTTXT PTS TO FIRST WORD OF TEXT ASSGN=200 /ASSIGNS DEVICE NOPACKS400D NOCRLF=2000 /INPUT IS IN CHARACTER MODE NOL INE= 42V KLBALINE®100 XLIST IFDEF XLIST /USED TO SPECIFY A LINE OF A KLBA i CLOCK < LSTFLG SOME USEFUL EQUATES FOR STANDARD CLOCK MESSAGES! MARKTIME= SCHEOULE= TIMOUT= XLIST IFDEF XLIST /POST EVENT FLAG AFTER SPECIFIED INTERVAL 200e 200v /DERAIL TASK AFTER SPECIFIED INTERVAL /USED AS MODIFIER TO °SCHEDULE’ Te0u /DELETE ALL REQUESTS FROM SPECIFIED TASK FROM GUEUE IFNDEF IFNDEF 1 TASK INIWT INIWT2 INIWT3S *TASK*2+MSGTBL 8L.0CKk /RE=QUEVES RUN REQUEST AFTER SPECIFIED INTERVAL *SCHEDULE FOO PERIOQODICALLY’ /E .G, 1> /FORCE LISTING OFF < /TASK TABLE SETUP = "TASK", /MUST BE DEFINED BY TASK1 IFNDEF /RUN TASK AFTER SPECIFIED INTERVAL 1000 PERIQODICALLYs CANCELs XLISY 2 ¢ "CUR","INIWT", AND "STARTY <INIWTsR> <INIWNT2ED> <INIWT3sD> /MESSAGE BUFFER INITIALLY CLEAR *TASKTM4+TSYABL CUR%12+CUR /INITIAL 2 /INITIAL AC < VERS STARY XLIST} IFDEF FLAGS @ XLIST JINITIAL VERS XLIST XLISTY MQ > *TASKeTFTABL INIWT XLIST > 1FDEF TASK? XLIST *TASK2"2+MSGTBL /MESSAGE BUFFER 2 "4+ TSTABL wTASK2 /INITIAL FLAGSZ CUR2%10+CUR2 ZBLOCK START2 Q XLIST} XLIST VERS2 XLIST XLIST 1IFDEF > /ZINITIAL AC < VERS2 /INITIAL INITIALLY CLEAR @ MQ "TASK2+TFTABL INIWT?2 XLIST 4 IFDEF TASK3 XLIST *TASK3I“2+MSGTBL ¢ ZBLOCK /MESSAGE BUFFER INITIALLY CLEAR CUR3X10@+CURS /INITIAL FLAGS3 *TASK3I~4¢TSTABL STARTS ] XL1ST) IFDEF /INITIAL VERSJ XLIST VERS3 > XLIST XLIST *TASK3I+TFTABL INIWT3 XLIST > /INITIAL < AC M@ 0 DEMONSTRATION 1FDEF 1FDEF TASK PARTND PROGRAM « « XLIST /RESIDENCY TABLE (RESTBL) ENTRY: /INITIALIZED FOR NONRESIDENT TASKS ONLY "TASKeSWAPPER=1%2+RESTBL PARTNOTM4+PARTBL+CPABLE+CPABLE+WRITE XL187 IFNDEF IFNZRO SWAPPER SNOSWAP, ERROR, > /SNAPPER MISSING TASK=SWAPPERL4DOD <SWPRIO, ERROR_>»/NONRESIDENT /HAS »> IFDEF IFNDEF IFNOEF The « SNOTASK, _ERROR_ > <NOSWAP, ERROR, > /PARTITION TASK are Nonresident LISTINGS listings Task of nonresident tasks NR20 TASK=20 002@ TASKS20Q 20e0 TASK=2p START=4002 2400 1173} WRITEal 0ol CPABLEs=] Qoo 5000 200 0ol CUR®=1Q INIWTSRUNWT*NONRWT PARTNQ=Q FIELD CURX1Q 2400 12614 TASK e 8.2.1 10605 12606 10611 10612 10618 NO XLIST following 10600 10603 10604 BUT TASK THAN SWAPPER > NONRESIDENT 104020 106401 10402 10403 10404 10405 10406 10407 10410 HIGHER /PARTITION BUT NO SWAPPER PARTNS <NOPART, _ERRQR_» /MISSING PARTITIONS PARTNO=PARTNSE4000 <PRTERR,_ERROR,>» /PARTNO,GE,PARTNS IFNDEF IFZERO 8.2 PARTND TASK SWAPPER PRIORITY 4020 4011 Q001 0622 420 40141 Q003 0606 5200 2600 0QQ@2 o000 2000 02001 QQQ0 Q000 Q02 2421 2313 10615 4pee 10616 10617 6042 2225 10622 10621 10622 1616 1116 0702 »d00 SLPMSG, LPTMSG, CAL SENDWeFREE CLOCK SLPMSG CAL SENDW+FREE LPT LPTMSG JMP START %600 ZBLOCK 3 2 D7SHERTZ ZBLOCK 3 2 2 TEXT /TASK 28 RUNNING/ (NR20 and NR22): DEMONSTRATION PROGRAM 8.2.2 Nonresident Task NR22 TASKs22 ooee 10400 10401 10402 104023 12404 10405 10406 10407 10410 106302 10633 10634 10635 10636 10641 10642 10643 10644 10645 TASKs22 START=4090 ooeo PARTNO=Q Y0} @400 FIELD x40 4020 CAL 4011 SENDW+FREE CLOCK SLPMSG CAL SENDw+FREE LPT LPTMSG JMP START WRITE=] CPABLEs=] CUR=10 INIWTRRUNWT+NONRWT eapl 2639 4020 4211 0003 636 5200 Q000 0000 veeo 2001 2000 2000 2000 4ol e313 4062 6249 10647 2ees 1616 1116 9709 CUR%i® %630 P630 10646 10650 12651 10652 TASKE=2¢ goee 0400 Qoo oR01 0010 5000 SLPMSG, ZBLOCK 3 2 @) SHERTZ LPTMSG, ZBLOCK 3 2 0 TEXT /TASK 22 RUNNING/ DEMONSTRATION 8.3 ASSEMBLY AND The assembly follows: JFAL and LOAD load PROGRAM PROCEDURE procedure for the demonstration program is as RTS8CFARAMYRTSSE ERRORS DETECTED: 0 LINKS GENERATED: ¢ +FAL CLOCK<FARAMy CLLOCK ERRORS DETECTERD ¢ LINKS GENERATED: O AL MCREPARGMy MCR ERRORS DETECTEDRS 0 LINKS GENERATED: ¢ AL 058SUPCFARAM y 0S8SURF ERRORS DETECTED: ¢ LINKS GENERATED: 0O JPAL TTYSFARA TTY M ERRORS DETECTED: 0 LINKS GENERATED: 0 cFAL LPTSPARAM LT ERRORS DETECTED: 0 LINKS GENERATED: 0 AL RKBECPFARAMy RKBE ERRORS DETECTED: 0 LINKS GENERATED: 0 FAL NRZOCPFARAMy NR2O ERRORS DETECTEDG 0 LINKS GENERATED: O fFAL NR2Z2CPARAMy NR22 ERRORS DETECTED: O LINKS GENERATEDD O +FAL SWAFCFARAMy SWAF ERRORS DETECTED: 0 LINKS GENERATED: O +ROABSLIDR KNR20% +9A BYS NR20 1040010577 +ROARSLIR KNRZ224% + 58 BYS R ARSLIR NR22 1040010577 XRTS8yMCRy CLOCKsRKBE s TTY v LLFT» QSRBSUF XSWA s NR20O» NR22% F +85A 8YS RTS8BV2 This example shows the assembly of the parameter file and the source task itself. The binaries of each nonresident task are then loaded into memory, and their nonresident portions saved on the swap device. All tasks being memory are loaded is then first. saved using loaded using the Finally, the core the 0S/8 SAVE ABSLDR with image command. 8-10 of the RTS/8 all the Executive tasks in PROGRAM DEMONSTRATION NONRESIDENT TASK ASSIGNMENT AND EXECUTION 8.4 The following is the execution of tasks NR20 and NR22 to the system. RTS/8 showing the assignment of +R RTHBV2 ANR20=20 ANRZE2=22 X$:6Y CLOCK 0O 01 M M 02 03 TTY LPT 04 MCRK 07 15 RK8 088F M M 16 SWAF R 20 RN 22 23 088 RE 20 FREO22 FEXTT RN E + In the above example, the user nonresident tasks with an ALTMODE, terminates the installation of and returns to the MCR. A SY¥Ystat command is executed which prints a system status report (see Section 6.2.9). The REquest command is then used to run tasks NR20 and NR22. Shown below is output from tasks NR20 and NR22 on the line printer. TASKR 20 TASK 280 TASK 20 TASK 20 TASK 22 TASK 20 TASK 22 TASK The the RUNNING RUNNING RUNNING RUNNING RUNNING RUNNING RUNNING 20 RUNNING EXIT command is 0S/8 monitor. typed to terminate RTS/8 execution and return to CHAPTER 9 ADVANCED RTS/8 PROGRAMMING TECHNIQUES 9.1 9.1.1 PERFORMING A RESCHEDULE Writing Delicate Code data Frequently, a task needs to manipulate in another task or a common area. Since tasks are running ‘'simultaneously', problems will arise if two tasks want to access the same data at the same time. Consequently, delicate while accessing data code in another wants task. to run with interrupts disabled NOTE temporarily disabled Interrupts may be on or, pair IOF/ION a either using CIF a extension, machines with memory interrupts inhibits which instruction until the execution of JMS instruction. the next JMP or For example, suppose Task A increments location COUNT occasionally and from time to time during program COUNT location B decrements Task following: the like look might code The execution. /TASK A LOOPA, . X, ISZ COUNT JMP LOOPA COUNT, /TASK LOOPB, 0 B . STA Y, TAD COUNT Z, DCA COUNT ADVANCED RTS/8 JMP LOOPB If Task A increments decrements COUNT, it of the program. condition Suppose that waiting Task for an Task B is ready A to ready has to a 5 store that B 7, and then containing a 5 This is higher to with COUNT. executed. into COUNT. event Task resumes goes back and a situation the is employed: Solution /JTASK B LOOPB, . The AC The an contains interrupt for has Task now bumps sleep. happening Either of the Solution /TASK by Task 5 and just is a 6. occurs Task B is routine, occurred, COUNT two A from now 6 to the AC proper interrupts solutions can 2 B CIF CUR STA Y, TAD COQUNT Y, DCA COUNT TAD COUNT Z, DCA COUNT ION : JMP LOOPBRB Solution CIF 2 (only instruction next JMP JMS JMP usable on since machines Task with temporarily it instruction Inhibiting the race containing disabling following Z, Although and a B end LOOPB, I0F 9.1.2 since Task B then resumes with COUNT which is incorrect for into 1 the at service waiting A Task 0 interrupt a A. STA or B, was fronm code. Task currently A 5 prevented delicate than COUNT that be so Task to stores times would However, been and of COUNT necessarily priority occur TECHNIQUES number that not execution. around be a back the Task this decrement Y program same assumed has location suspends the be event after noting COUNT would However, occur. can PROGRAMMING is LOOPB memory extension) inhibits executed. interrupts uses the until the Switching procedure in the previous section can be used, it at times can be very inefficient. If it is desired to perform a lot of manipulation on data which could be accessed by other tasks, it may be inappropriate to turn off interrupts. Inhibiting interrupts for long periods of time could affect other portions of the system where timed events are example, significant For this RTS/8 case, of inhibiting important. interrupts) amount of Also, if time. another solution that wants an interrupt interrupts is are can turned be lost off (for for a possible. A task can inform the continue to run, and that while it is a certain piece of code, no other task should run even if a higher priority becomes runnable. This process is known as Executive executing task very clock task it switching. to ADVANCED RTS/8 PROGRAMMING TECHNIQUES Task switching should be inhibited only under unusual circumstances While task switching is inhibited, with care. per formed and interrupts may still occur and the interrupt service routine will get However, if task switching 1is inhibited, the interrupt control. service routine will always return control to the interrupted task after the interrupt has been serviced even if higher priority tasks are now runnable. NOTE data manipulate to If the user wishes 1is accessed by an interrupt-level which inhibited be must routine, interrupts switching alone task 1inhibiting since will not be sufficient in this case. of There are two methods inhibiting task switching which are as follows: Method 1: PC Task switching is automatically inhibited whenever a task's 1less 1is bottom of page than Thus, 100. 0 of any field. delicate code could be placed in the A task may inhibit task switching by zeroing location 35 in Method 2: This location is symbolically referred to as TSWFLG (task O. field In file. switching flag) and is defined as such in the parameter either case, after the task is through with its delicate code, it may not be sufficient for the task to reset TSWFLG to its original fact that there may be some other to the is due This value (1) . run because to run but did not entitled is that task y higher-priorit this out by find can user The inhibited. switching was task If another task became runnable while interrogating location TSWFLG. the RTS/8 executive sets the task inhibited, task switching was When a task is ready to allow task switching switching flag to -1. 1If it was it must examine this flag before resetting it to 1. again, 1is This -1, the task returns control to the RTS/8 scheduler. performed by using the RESCHD ER as follows: CAL RESCHD This ER causes RTS/8 to perform a reschedule that allows the runnable 1If a user does not perform a task of highest priority to be executed. task priority RESCHD after re-enabling task switching, then a higher run until the next interrupt not run might to entitled is which too The interrupt may never occur, or if it does, it may be occurs. late for proper program execution. The preferred code for inhibiting task switching for Task B which described previously /TASK B LOOPB, . CDF 0 DCA I is shown below: (TSWFLG /INHIBIT TASK SWITCHING STA Y, TAD COUNT Z, DCA COUNT ISZ I (TSWFLG /ALLOW TASK SWITCHING 9-3 was ADVANCED JMP RTS/8 .+3 PROGRAMMING /SHOULD WE CAL /YES TECHNIQUES RESCHEDULE? RESCHD CDF CUR /NO JMP LOOPB NOTE A summary of Interrupt level at the or TSWFLG set states Summary of TSWFLG not shown in Table 9-1 Switching Table Flag (TSWFLG) State 1 Task switching inhibited 0 Task switching inhibited; soon EXECUTIVE REQUESTS WAITM Waiting Sometimes of quite it - is as Flags. simple. The possible -1 FOR ADVANCED APPLICATIONS for desirable Event States Value allowed as look 9-1. switching 9.2.1 OR) should Task reschedule 9.2 is Task routines TSWFLG. Multiple to wait Waiting for Event for the a Flags logical logical AND sequence: combination (AND or of Flags is two Event CAL WAITE A CAL /WAIT FOR EVENT /AND THEN WAIT been POSTed. FLAG A WAITE B waits until both A and Waiting the logical since is the for there a interrupts involved. successfully is testing of state none if the of have EVENT FLAG B OR of several event flags is more possible race condition between the various (or The B FOR task key not to to allow first the executions) waiting Event flags any Flag were for which an and the POSTed. POST the of several OR interrupts difficult tests and Event Flags to placing occur of the Event Flags between task in a the Wait ADVANCED RTS/8 PROGRAMMING TECHNIQUES This is accomplished by using a special sequence of instructions and a It special RTS/8 call named WAITM. WAITM is defined as JMS I 25. must be executed with interrupts off, the Instruction Field set to 0 and the Data Field set to the current field, and it must be followed by a word containing the blocking bit(s) to be set in the Task Flags The action of WAITM is equivalent to the action of the RTS/8 Table. except that a fast path through the RTS/8 Executive is taken ER BLKARG and interrupts remain off until the blocking bits are on in the Task Flags Table. For an example of the use of WAITM, assume that a task "TASK" wants to If A is POSTed, control should go to test two Event Flags A and B. if B is POSTed control should go to 1location BDONE. location ADONE; If neither is POSTed, the task must wait until one of them is POSTed. The code to perform this function is: /INTERRUPTS OFF - DELICATE CODE TESTAB, IOF TAD A SNA CLA TAD (4000+TASK /ADONE MUST TURN INTERRUPTS ON JMP ADONE /SET A TO "WAITING" /THAT THIS TASK IS WAITING ON IT DCA A TAD B SNA CLA TAD (4000+TASK /BDONE MUST TURN INTERRUPTS ON JMP BDONE /SET B TO "WAITING" O CDF CUR STATE /INDICATING /THAT THIS TASK IS WAITING ON IT DCA B CIF STATE /INDICATING WAITM /BLOCK TASK ON EVENT FLAG WAIT /WE'RE BACK - ONE OF THE TWO EFWT JMP TESTAB /EVENT FLAGS HAS BEEN POSTED. /GO BACK TO FIND OUT WHICH ONE 9.2.2 WAITX - Wait for Exactly This Event Flag The exception is that if the The WAITX ER is similar to the WAITE ER. the task goes into EORMWT (instead of FINISHED, is not Flag Event location EFWT), and the task's PC in the TSTBL points back to the Thus, when the task resumes execution, containing the CAL of this ER. some If the EORMWT bit was cleared for it will re-execute the WAITX. reason other than the Posting of the Event Flag in question, the task will immediately go back into EORMWT. Consequently, control will never flow past this ER wunless the Event 1is actually posted (see discussion of DERAIL, Section specified Flag on task was waiting the if If a WAITE had been used and 9.2.3). (which can happen using WAITM), then control Flags Event multiple conceivably could start up after the WAITE ER because some other Event This about, was posted. cared longer is no that and one Flag, situation can not occur with a WAITX. 9.2.3 DERAIL - Derail a Task's Execution The DERAIL ER modifies the execution of a specified task and transfers some process to task the of subroutine special a to control exceptional condition. It does not cause any wait bits to get set cleared. 9-5 or ADVANCED Format: TAD RTS/8 PROGRAMMING TECHNIQUES TASKNUM CAL DERAIL ADDR This ER simulates in TASKNUM (the field in (from which 1its the Task a "JMS ADDR" for the task whose number 1is "derailed" task). ADDR is assumed to be derailed State task Table is entry) executing. is stored The in derailed ADDR; the its Task State Table entry is then set to ADDR+1. points concerning the operation of the DERAIL ER are as 1. The derailed saved by restored by subroutine 2. contents affected by runnable, DERAIL all operations can seconds. It is "watchdog solution 1is task can The RTS/8 if be a for provide in Power-Fail facility to used 1In task's ER. by a it is will not temperature all unmodular machinery location order to task uses on power-fail recovery reinitialize a task. to shut down the (see its DERAIL Section a to derail level. until signal an be to abort critical wvalue. necessary some not not would temperature 10 code in A better equipment-controlling own ER 4.5), piece to of equipment. provide which a can similar be used Example: An example of DENTRY, a DERAIL routine is 0 DCA as follows: /DERAIL ROUTINE SAVAC /SAVE AC SAVLNK /SAVE LINK /SAVE DATA ENTRY POINT RAR DCA RDF RESUME, DFRESET, NORESUME, TAD (CDF DCA DFRESET CDF CUR FIELD . /HANDLE EMERGENCY . /BRANCH TO . /TO . /BRANCH TAD SAVLNK CLL RAL TAD SAVAC HLT JMP I CLA CLL DENTRY CDF CUR JMP RESTART SAVAC, 0 SAVLNK, 0 RESUME TO a every shutdown controlled. each not and task exanple include being which are saved executed task An room to be the be exceeds measures in Flags word are derailed task is sometimes which at priority tasks. room and sense, the PC entry settings this Task task's Two 1important follows: must If high priority where Field contained the same PC they interrupt task a DERAILED an subroutine lower the like derailed inefficient task" to to by Data runnable. environment checked and therefore subroutine. DERAIL derail generally This be the is condition Link, ER; much the becomes process-control this of task ER emergency derail very the AC, DERAIL the is The the The task's the in CONDITION 'RESUME' WHERE IF YOU 'NORESUME' /RESTORE LINK /RESTORE AC /RESUME (SAME /RESTART TASK /RESTORE DF FIELD) YOU LEFT IF WANT OFF NOT ADVANCED RTS/8 PROGRAMMING TECHNIQUES if 9.2.3.1 Dangers of DERAIL - A task can get into serious trouble If this happens, is derailed while already in a derail routine. it is no simple There the original PC, AC, link, etc., will be lost. in the derail routine may be too interrupts Turning off solution. already late to prevent this - the second derail could have before the derail routine was even entered the first time. Consequently, than a user doing a DERAIL should make done is DERAL one sure that not more Alternatively, before doing a a time. at occurred DERAIL, a task can check an interlock flag (which it must maintain) to see whether the target task has been derailed or not. The test and set of such a flag should be performed with interrupts inhibited. runnable, not 1is task a If Restrictions Using DERAIL 9.2.3.2 If the task is in Event Flag it will not make it runnable. derailing When Wait, it will remain in Event Flag Wait until the event occurs. 1is POSTed, the task will wake up and begin to run in Flag Event the its derail routine rather than in the mainline routine. Thus, derailing a task to get it to perform some important job immediately and The task might be in one of the Wait states may not always work. For example, if the task were be able to run for some time. not may a in Receive Wait at the time, the derail routine would not run until message came A partial in for that task. solution around this restriction is to code the task to be derailed so WAITE. Then, that it always waits on events using WAITX instead of if the user wants to derail this task, the task is first An example the taken out of MSGWT or TAD of code EORMWT and for this then derailed. situation is as follows: TASKNUM CAL UNBARG MSGWT ! EORMWT TAD /UNBLOCK THE TASK /FROM MESSAGE-RELATED WAITS TASKNUM CAL DERAIL DENTRY This will work because both the RECEIVE and the WAITX Executive Requests bump the PC back to the CAL before going into a Wait state. Thus, no harm is done if the task is taken out of that wait state for an 1incorrect reason. When the task resumes running at that point, it will re-execute the CAL (RECEIVE or WAITX) and go back into the Wait state as necessary. This method will not work if the task was in EFWT due to a WAITE ER because the task would resume running thinking the Event Flag had been posted when 1in fact it had not. A way to circumvent this (other than WAITX) is for the task to do WAITM instead of a WAITE, and poll the Event Flag upon waking up. 9.3 STARTING PARTITIONS AT AN ARBITRARY BOUNDARY The advanced user can start a partition at an arbitrary boundary by using the following assembly and loading procedure. The example given assumes that the partition in which the user writes the nonresident portion of the task to run is three pages long PAL8 pseudo-operators FIELD and RELOC are used, detail in the 0S/8 handbook. (11200-11777). The and described in ADVANCED RTS/8 PROGRAMMING TECHNIQUES /TASKX FIELD 1 /SET *1000 FIELD /LOAD RELOC 1200 /BUT THIS CODE AT ASSEMBLE IT procedures for 11000-11577 TO RUN AT 11200-11777 <CODE> PAGE <CODE> RELOC The assembly, .R load and save code are: OF TASK) PALS *TASKX<PARAM.PA,TASKX.PA .R the (ASSEMBLY ABSLDR *TASKXS -SAVE (LOADING DEV TASKX 11000-11577 (SAVING OF OF TASK INTO TASK-THREE CODE) The swapper, 11200, 9.4 A upon which DIRECT is loading where REFERENCES task may directly tables to obtain as the following 1. task For may immediately to symbolic symbolic entries TO task, places it assembled to run. SYSTEM into the OF partition at TABLES Due to the interrupt-driven nature of the system, these table entries may change at any time; therefore, interrupts should be inhibited between the time these entries are tested and the time that processing which depends on the testing is a Symbols this was PAGES interrogate 1locations in the RTS/8 Executive information about itself or any other task, as long two restrictions are observed: completed. 2. it 11000) run. example, show after This result of turned off the the and table entries Executive Requests. testing messages, the but test might task test. during System no might To I/0 allow a send prevent Message an a Queue higher message, this, the test. may be changed for occurring priority task invalidating interrupts after Header interrupt only the should through be RTS/8 have been defined in the system parameter table that permit references to be made into these tables symbolically. The expressions which yield the address of the system table for task N+TFTABL N are: Task N; N~ 2+MSGTBL Flags 1if Table zero, Input Message task N; messages if in entry task N Queue zero, its is for task runnable. Header task queue. N has for no ADVANCED RTS/8 PROGRAMMING TECHNIQUES N"4+TSTABL First word of Task Entry N~ 2+RESTBL for task First word State Table Residency Table N. of entry for nonresident task N. For example, for a task to determine whether it had messages 1in input queue without issuing a RECEIVE request, the code would be: CDF The 0 /EXEC TABLES IN FIELD 0 IOF /TURN TAD I (TASK”~2+MSGTBL SNA CLA JMP NONE ION /ANY MESSAGES? /NO /YES code at NONE must eventually turn INTERRUPTS interrupts OFF back on. its APPENDIX A RTS/8 DISTRIBUTED SOURCE FILES The RTS/8 source File Name Task files on included the distributed Task Name MCR MCR.PA null 0S8SUP.PA 0S8 0S8SUP.PA OS8F PWRF.PA PWRF CLOCK.PA CLOCK TTY.PA TTY file with all Appropriate values should specific parameter files. RTS/8 Executive Monitor Console Routine RTS8.PA MCR.PA task LPT.PA LPT DTA.PA bTA RK8.PA RK8 RKBE. PA RK8 RF08.PA RF08/DF32 Null are: Function System parameter PARAM.PA tape be equates inserted task 0S/8 Support Task 0S/8 File Support Power Fail Task Task Clock Handler Task Terminal Driver Task Line TC08 Printer DECtape Driver Driver Task Task RK8 Disk Driver Task RK8E Disk Driver Task RF08/DF32 Fixed-Head Disk Driver Task Cassette Driver Task Cassette File Support Task Universal Digital Controller/ Industrial Controller Subsystem CSA.PA CSA CSAF.PA CSAF UDCICS.PA UDC/ICS RX01RT.PA RX8A Floppy Disk Handler (lst controller) RX01RT.PA RX8B Floppy Disk Handler (2nd controller) RX(01RT.PA RX8C RX01RT.PA RX8D controller) controller) LTA.PA Handler Task LTA Floppy Disk Handler (3rd Floppy Disk Handler (4th LINCtape Driver Task SWAP.PA SWAPPER Nonresident NULL8A.PA NULLS8A Null Task EXIT.PA EXIT Exit Task Task for Swapper PDP-8A to blank. create APPENDIX RTS/8 B COMPONENT SIZES of RTS/8 memory map showing The modules may be default memory allocation is shown in Figure B-1. in memory at the user's discretion except for RTS8, placed anywhere Also, certain modules must be placed in field 0 where CLOCK and SWAP. indicated in the tables. The following table gives the approximate size and default origins each The component following of RTS/8 the parameters, system. which are used An in Table B-1, are defined as follows: Any NTASKS = Number CLKQLN MCRSYS MCRCLK = = = Number of entries in clock queue 1 if MCR SYSTAT function desired, 1 if MCR CLOCK functions desired, KLINES = Number fractions of of tasks in physical from divides system 0 0 KL8-A lines should be Table RTS/8 else else dropped. B-1 Component Sizes Software Default Number of Pages Required (1 page Component Origin =128 RTS/8 Executive 00200 5+NTASKS/18 words) Comments Must be locations in 00200~ Uses 01200. 0 1locations and 20-47 auto-index register 17. Clock Module 1st page 3+CLKQLN/22 after end of RTS/8 Executive (or SWAPPER) New Must be in page 0-3 and field 0. Uses auto-index register 10. 03400 3 03400 2 Terminal Module, V2 0ld Terminal Module, V1 (Continued on next page) RTS/8 COMPONENT Table B-1 RTS/8 SIZES (Cont.) Component Number Sizes of Pages Software Default Component Required Origin =128 Line 14400 1 14600 2 04200 2 04400 1 LINCtape 15000 2 RK8 04200 1 Fail 10200 1+NTASKS/32 Module 10600 Printer Module TC08 DECtape Module RK8E Disk (1 page words) Comments Module DF32/RF08 Module Disk Module Power Module UDC 7-11 on depending table space Uses page 0 locations 130-144 Requires cassette desired. Cassette 13600 3 Label | 13000 3 Module Cassette Support 0S/8 Module File Support handler. 04600 if Module | support 0S/8 6 Requires present, storage otherwise 06200! Must run a mass handler. in field 0' 0S/8 Support 06200* 6 Task Must run in field 0 - requires 8K for 0S/8 mass Monitor Routine Console| Task 17600 minus (15200 with all options and length no KL8A support) 5+3xMCRCLK+ MCRSYS + (NTASKS+40) /64. plus a storage handler. Uses page 0 164-177. locations Requires "console" terminal handler and page 0 locations 100-117. See more Table B-2 for details. !Moves down by length of KL8A support code if KL8A support present. (Continued on next page) RTS/8 COMPONENT Table B-1 SIZES (Cont.) RTS/8 Component Number Software Sizes of Component Default Origin Required RX01 13200 2 SWAPPER lst page after end of RTS/8 Pages (1 page =128 words) Comments 2 Must be field 0 1in May relocate executive EXIT 15000 1/2 NULLS8A 13600 1 17600 minus 1+KLINES+1 KL8A Support length within 3 Must in a page be field 0. RTS/8 COMPONENT SIZES RTS/8 SYSTEM MEMORY MAP (Default Memory Allocation) PAGES 0 FIELD 0 200 - o 400 - FIELD 1 = ( RTS8 600 ~ TPWRF — {20 tasks) — T 1000 n - uDCICS y 2000 _ SWAP n | - CLOCK 3000 \ . ‘ CSAF | — RX01RT TTY V2 4000 TTY, V1 INULLSA TCSA J_ — ]E?KS RKSE | :[FPT :[%FOS — B ' ‘]jjTA 5000 IEXIT — B B CTA ossH 6000 -F A | A | L - 0S8suUP ) |— Large MCR Small MCR 7000 [ l\ iKLSASR u 1 _j_ KEY: RTS/8 modules may vary in size and placement in memory depending upon The following symbology has been chosen to show component Fixed Expandable the chosen system configuration, default allocation in memory. Relocatable Relocatable and Expandable Figure B-1 RTS/8 System Memory Map (Default Memory Allocation) RTS/8 COMPONENT SIZES Table B-2 MCR Component If than less 34(octal) tasks Size If 34(octal) LENGTH: or more tasks 6 pages 6200 PART: 5 pages 6400 6200 6400-7377 LENGTH: 6 ORIG: 6200 6200 6400-7577 IF PART: CLOCK LENGTH: 10 NO ORIG: 5600 IF 5600 6000-7577 IF 5200 PART: PART: 5400-7377 SYSTAT LENGTH: 11 LENGTH: 12 pages CLOCK ORIG: 5400 5200 5400-7377 NO SYSTAT LENGTH: NO CLOCK DEF ORIG: IF NONRS: SYSTAT NO CLOCK IF SYSTAT IF NONRS: NONRS: NONRS: PART: pages pages pages ORIG: PART: 6200 6400-7577 LENGTH: 7 ORIG: 6000 5600 IF NONRS: NONRS: pages PART: 6000-7377 LENGTH: 11 ORIG: 5400 NONRS: DEF ORIG: IF NONRS: PART: pages 5200 5200 5400-7577 APPENDIX RTS/8 C FLOWCHARTS This appendix contains RTS/8 flowcharts that system operation. graphically show RTS/8 RTS/8 FLOWCHARTS Calling Sequence: SAVE AC IN ACARG p-1 TAD VAL p CAL p+i FUNCTION CODE pt2 ARG1 p+3 AGR2 (or return) pt4 RETURN CAL = JMS 20 Thru Current Field: TASK- SWITCHING ALLOWED > ) _ TSWF:‘E ) - 20 0 21 CDF CUR 22 CIFO 23 CMP CALIOF (field 0} 24 DSPOST 25 XWAITM o, Rescan ASAP INHIBIT TASK- SWITCHING. CLEAR RESCAN EXECUTE FLAG DISPATCH JUMP THRU COMMAND - TM ION Function Y TABLE. IGNORE FREE BIT Code | ] JMP | +FUNC+1 0 XSEND Pg. 1 XRECEIV Pg. C-11 1 2 XWAITE Pg. C-7 SAVE RETURN 3 XRUN Pg. C-20 4 XSUSPND Pg. C-20 5 XPOST Pg. C-14 6 XSKPINS Pg. C-15 7 XDERAL Pg. C-16 10 XBLKARG Pg. C-13 12 XUNBARG Pg. C-12 13 XTSTOP Pg. C-8 14 XWAITX Pg. C.7 SAVE CALLING FIELD ADDRESS ') GET FUNCTION C- 9. C-4 CODE ) COMMAND Sw SW designates an operation that is performed only when using nonresident operations. EAE designates an operation that is performed only when the Extended Arithmetic Element is used. FLOWCHARTS RTS/8 SET UP RETURN FIELD Yes TSWFLG=1 TSWFLG = -1 KEEP TASK- Cannot TASKSWITCHING SWITCHING Happen NEEDS RESCAN INHIBITED ? TSWFLG=0 No ALLOW TASK- SWITCHING JMP 1 20 RETURN TO CALLING TASK Pg. C-8 RTS/8 FLOWCHARTS SEND SENDW Calling Sequence: SET CLEAR WAIT FLAG WAIT FLAG p p+1 CAL SEND (W) [ p+2 p+3 TASK # (Sending to) l ‘ P+4 MSGADR RETURN GET TASK NUMBER TO SEND MSG TO Initial Values p MSGADR, 0000 Becqmes Sending Task = y p+1 0000 ADDRESS CDF to next msg, if any GET MESSAGE p+2 0000 | Addr of next msg (0 if none) p+3 Start of Message MESSAGE Yes ALREADY IN QUEUE (FIRST WORD OF MESSAGE =0) Y -4 BACKUP RETURN MSGFRE TO CAL ADDRESS BUMP RETURN TO MSEFWT CAL+4 > Y y AC= MESSAGE FIND ADDRESS RECEIV- ING TASK ='s ENTRY IN MSGTBL i Pg. C-7 GET DATA FIELD OF MESSAGE ADDTOQ Pg. C-8 RTS/8 FLOWCHARTS ADDTOOQ GET FIRST QUEUE WORD (CDF TO NEXT) CDF INTO NEXT MESSAGE 1S & SENDING TASK FIND NEXT NUMBER LESS THAN TASK MESSAGE IN NUMBER IN THIS QUEUE QUEUE MSG & < ENDOFQ Y ~ PUT CDF TO MSG AND PC OF MSG INTO QUEUE WORDS 10F GET TASK # TO SEND MESSAGE TO | to page C-6 ADDTOQ Pg. C-5 RTS/8 < FLOWCHARTS from page C-5 ’ | FREE MSG WAIT AND/OR EVENT WAIT BITS IN Via call to FREEJ STATUS TABLE i L=1IF RECEIV- ING TASK 1S RUNNABLE & OF HIGHER PRIORITY [eRw) THAN SENDER; L=01F NOT r IOCo- -0z MSGCDF i STORE SENDING TASK NUMBER IN MSG HEADER i Link indicates whether a new task should be run or not,. The link status will be checked later on in STORE CDF TO NEXT MSG IN MSGHDR =0 if none POSTEX. - A2 not a SENDW. = | STORE PC OF NEXT MSG IN MSGHDR =0 if none Message is now linked into the message queue. mooon w—-—T4 This will be tested if this CAL was a SEND and CAL WAS SENDW Pg. C-12 RTS/8 FLOWCHARTS WAITE WAITX Calling Sequence: CLEAR SET ACARG TO -1 ACARG ] Enter Here From GET ADDRESS SEND or SENDW OF EVENT p CAL p+1 WAITE p+2 EVENT FLAG ADDR p+3 RETURN FLAG WAITS 'V SAVE ADDRESS ACARG # —1 OF EVENT FLAG Y IOF Yes Restart caller if TASKSW allows Pg. C-3 No EVTFLG = 4000 + TASK NO Give it waiting status PUSH PC BACK TO POINT L TO CAL ‘ AC=EFWT Store Event Flag Wait in Flag Table AC=EORMWT Jump with link clear Y TSWAIT (tested at TSTOP) Pg. C-8 Pg. C-8 RTS/8 FLOWCHARTS Wait for message. Enter here from RECEIVE, BACKUP CALLING PC TO DO CALX AGAIN SET LINK AC = MSGWT Message Wait Status TSWAIT SAVE AC IN MASK TSWATX | STORE IN TASK #'s FLAG TABLE ENTRY ION No CLEAR TASK AC TSTOP No SAVE AC IN ACARG -l | GET TASK NUMBER’S ENTRY IN STATUS TABLE to page C-9 Interrupts were off here if we came from XWAITE. RTS/8 ‘ FLOWCHARTS from page C-8 ) Y SAVE RESTART FLAGS, PC, AC SAVE MQ EAE Y FREE PARTITION IN FREE BIT WAS SET IN COMMAND SW FINDJ RTS/8 Scheduler Schedule next runnable task TASK #=1 (start scan from top) ENABLE TASKSWITCHING | SET ‘MACHINE STATUS UNIMPORTANT’ FLAG FINDJL \ GET TASK #'s ENTRY IN FLAG TABLE Interrupts temporarily inhibited here. FLAGS=0 Pg. C-10 (RUNNABLE) ? Note no end of table check - there must be a runnable task. BUMP TASK NUMBER (Null task is always runnable.} RTS/8 FLOWCHARTS Here from FINDJ (Scheduler) Found a runnable task ION | GET TASK #'s ENTRY IN STATUS TABLE I0F i SAVE OLD STATUS IN TEMP LOCS OF INTERRUPT ROUTINE Interrupt Dismiss o DISMIS Code This is tested on an 8/E or 8/A only PENDING INTERRUPTS SWEEP OLD STATUS INTO DF, IF, AC, PC, ETC. RESTORE MQ EAE iON JMPIO RETURN FROM INTERRUPT Pg. C-17 RTS/8 FLOWCHARTS RECEIV Calling Sequence: p-1 TAD ARG p CAL p+1 RECEIV p+2 MADDR, 0 p+3 RETURN GET ENTRY IN MESSAGE QUEUE Y GET FIRST WORD OF QUEUE ENTRY EMPTY Pg. C-8 (NO MSGS) ? UNLINK THIS o] [) MESSAGE FROM THE QUEUE Y STORE ADDR OF ADVANCE TO NEXT MESSAGE ON THE QUEUE No SENDING Yes MESSAGE IN 2 CAL TASK OF MSG = ARG ? i AC = CDF TO MESSAGE Pg. C-3 C-11 RTS/8 FLOWCHARTS UNBARG XUNBARG GET BIT MASK FROM ARG. LIST - UNBLOK y I0F i CLEAR MASK BITS IN FLAG Call FREEJ TABLE L=1if clearing mask Y bits makes task runnable and it is higher priority; ION L=0 otherwise. POSTEX Pg. C-3 RTS/8 FLOWCHARTS BLKARG XBLKARG GET WAIT BITS FROM ARG. LIST BLOK —> CALLING TASK TO BE BLOCKED (TASK #=10) SET MASK BITS IN FLAG TABLE ENTRY OF SPEC- IFIED TASK Pg. C-3 p—1 TAD TASK# p CAL p+1 BLKARG pt2 WAITBITS pt3 RETURN RTS/8 FLOWCHARTS POST Calling Sequence: p—1 SAVE ORIGINAL EVENT FLAG TAD EFPTR p CAL p+1 POST pt2 ECDF, CDF EFFLD p+3 RETURN CLEAR EVENT FLAG WAS SOMEONE WAITING FOR THIS TO HAPPEN (OLD FLAG NEGATIVE) GET WAITING TASK'S £ FROM LOW ORDER BITS OF THE OLD FLAG CLEAR BOTH EVENT FLAG WAIT AND EVENT OR MSG WAIT Pg. C-12 Pg. C-3 RTS/8 FLOWCHARTS SKPINS Calling Sequence: p CAL p+1 SKPINS pt+2 p+3 MODULE ADDR RETURN GET FIRST MODULE WORD No ALREADY IN THE SKIP CHAINI! PUT DISMIS ROUTINE ADDR Pg. C-3 IN 1st WORD Y PUT CDF, CIF OF DISMIS IN 2nd WORD ] PUT MODULE ADDRESS AND CDF, CIF IN LAST MODULE OF INTERRUPT SKIP CHAIN Pg. C-3 L . RTS/8 FLOWCHARTS DERAIL Calling Sequence: GET TASK #'s STATUS TABLE p—1 TAD TASK# POINTER p CAL p+1 pt+2 SUBROUTINE j p+3 STORE RESTART PC IN SUBR | STORE SUBR+1 IN RESTART PC Pg. C-3 DERAIL RETURN RTS/8 FLOWCHARTS INTERRUPT ROUTINE TIME- SHARING INTERRUPT GO TO 0S/8 SUPPORT If present SAVE THE MACHINE STATUS USERSK \ USER-INSERTED SKIPS FOR ANY e? APPROPRIATE A |NTE;fiUPT HALT MODULE ; CRUCIAL DEVICES GO TO INTERRUPT , FAIL RESTART \ \ | POWER-UP RESTART POWER FAILURE AC = POWER-UP EVENT FLAG ADDRESS GO TO CLOCK HANDLER Pg. C-18 If present GO TO FIRST USER INTERRUPT MODULE RTS/8 FLOWCHARTS POSTDS Come here from user issuing POSTDS p—3 CDF EFFLD p—2 TAD EFPTR p—1 CIFO p POSTDS SAVE THE OLD EVENT FLAG VALUE i ZERO EVENT FLAG WAS A TASK WAITING ON THIS FLAG? (OLD Pg. C-10 VALUE NEGATIVE?) CLEAR EVENT FLAG AND EVENT OR MESSAGE WAIT BITS IN Call FREEJ TABLE ENTRY OF WAIT TASK Run the waiting task if its flag word is now zero and it is higher priority than the current user. RUN WAITING TASK to page C-19 Pg. C-10 RTS/8 FLOWCHARTS from page C-18 TASK SET RESCAN INHIBITED CTSWFLG = —1 SWITCHING FLAG IS Pg. C-10 SAVE STATE FLAG-1 ? SAVE CURRENT TASK'S PC, AC IN ITS STATUS TABLE ENTRY SAVE TASK'S MQ EAE ION Yy PREPARE TO START NEW TASK Start Swapper ISIT = RESIDENT STARTJ Pg. C-10 FINDJ Pg. C-9 RTS/8 FLOWCHARTS ) RUN Calling Sequence: AC = RUNWT p—1 TAD TASK= p CAL p+2 RETURN p+1 Run Wait RUN Pg. C-12 Go and set the flag bits SUSPND Calling Sequence: AC = RUNWT ‘ Pg. C-13 p—1 TAD TASK= p CAL p+1 p+2 SUSPND RETURN RTS/8 FLOWCHARTS WAITM XWAITM SAVE AC IN ‘COMMAND’ SwW CLEARAC, L FAKE A CAL DISABLE TASK SWITCHING \ PUT WAIT BITS IN AC TSWAIT Pg. C-8 RTS/8 FLOWCHARTS RTS/8 SCHEDULER FINDJ ENABLE TASK SWITCHING GET SETTO EXAMINE FIRST TASK ! ZERO SAVE STATE FLAG ION j BUMP TO NEXT TASK IOF GET TASK FLAGS BLOCKING BITS OTHER THAN NRWT ? CONTINUE NEXT PAGE FIND A TASK TO RUN RTS/8 FLOWCHARTS FROM PREVIOUS PAGE IS TASK RESIDENT STARTS Start task PUT TASK INTO SWPWT Sw TAKE SWAPPER OUT OF RUNWT SwW FINDJ APPENDIX RTS/8 Certain user standard PAL8 errors error are ASSEMBLY caught diagnostics on D ERROR MESSAGES at assembly the terminal time. of They the produce form IC US tag IC where the tag specified indicates the type of error as described below. Tag Module MCRBLK MCR. PA Possible MCR was declared Error nonresident (MCRPRT defined) and MCR origin was incorrectly a multiple of 400. Nonresident portion of MCR 1is second page which must start on a block Fix: SYSERR several Redefine System user boundary. error; See RTS8.PA Internal RTS/8 Executive RATERR PARAM. PA CLOCK.PA See task was Fix: Redefine CUR. HERTZ is multiple Fix: specified a Redefine CLOCK.PA SHERTZ less than a too large. 192 (decimal). SHERTZ parameter D-1 wvalue of for CUR SHERTZ. or is Redefine generated SHERTZ in must be file. than Fix: were HGHFLD. HERTZ parameter TODERR tables line error. source. User not unless source the which larger occur on generated incorrectly. CURBIG not sources. comments which TBLERR should modified Fix: MCRORG. file. SHERTZ in RTS/8 Tag NOKLS8A ASSEMBLY ERROR MESSAGES Module KL8ASR. PA Possible The symbol KL8A file. Fix: symbol Set equal to KL8~-A's KLOERR. KL8ASR. PA The symbol the file Fix: HITMON. KL8ASR.PA The Do PARAM.PA KL8A was the in not service preserve A task Fix: this Change if or error if PARAM. PA Some task form in parameter file. assembled Fix: in parameter in was user PARAM. PA Correct One of the was not of Fix: file task. given higher of swapper or user representing 10 value of parameter in file. symbols the Correct times a a field was not in the correct HGHFLD, MCRFLD, etc.) parameter CURERR in swapper. priority times (e.g. do code. PARTNO the parameter number 7600 you resident task. FLDERR KL8-A redefine 0S/8 was SWAPPER undefine than yet swapper. nonresident priority KL8ASR.PA desired KL8ACT no 0 location to nonresident to overlaid want Redefine equal assembled. file. not Define file parameter 1Ignore or set assemble KL8A with the present. 0. Fix: PARAM.PA parameter physical is system SWPRIO in support KL8-A in of KL8ASR.PA was not defined KL8A field A not number in Fix: NOSWAP was parameter Error CUR, proper CUR2, or CUR3 form. value in user field of task. task to 10 APPENDIX EXECUTIVE E INTERNAL TASK TABLES The Executive uses five internal tables to maintain information about the tasks in the system. Each task's task number is used as an index into the first four tables to retrieve and update information for that task. The 1. internal tables are as follows: The Task State Table (TSTABL) - contains 4-word holding the most recent contents of CPU registers task as entries for each follows: Word 1 - contains the link (bit 0) the Greater Than Flag (bit 1) -if exists on machine being used the User Mode Flag (bit 5) =-if exists on machine being used the Instruction Field (bits 6-8) the Data Field (bits 9-11) Word 2 - contains the contents of the Program the Accumulator the Multiplier flag flag Counter (PC) Word 3 - contains the contents of Word 4 - contains the contents of Quotient (MQ) assembled to register save the if the system (AC) has been MQ. Whenever the CPU the system executes a task, it loads the contents of task's Task State Table entries into the corresponding registers. Whenever a task stops executing, its Task State Table registers. Table, that entries The is, are set to the new contents of these Task State Table is located after the Message at location NTASKS+2" 2+MSGTBL-4 in field O. Example: Consider the following TSTABL entries for a task. 4012 3376 1234 0211 The task is interrupted just as it is instruction at location 3376 (entry of entry 1). At this point, the registers 1234 set for (entry (bit entry 1). 0 this task are and the MQ entry 1), and 3), of entered is 0211 the about to execute 2) of field 1 (bits contents of the in the (entry data field TSTABL. 4). is The The 2 (bits AC 1link 9-11 the 6-8 CPU is 1is of EXECUTIVE The Task holding whether Task is set Flags Table (TFTABL) flags (bits) the in task is Table a runnable. entry nonzero run. meanings The are as Octa 1 Symbolic 4000 NONRWT word SWPWT each task is zero. 1l-word task to runnable Each a defined it Wait is Flag Wait Flag if entries determine only flag reason flags, if (bit) its which why the task set, and their This cannot run - This (which to task this be executed with its the operator to type the Monitor Wait task task) Wait in Console - This the is contains to for is This task in memory. Run Swap - - not corresponding 0400 contains Meaning Event RUNWT - for follows: Event 1000 TABLES indicates currently Nonresident EFWT A contains because 2000 TASK various Flags cannot INTERNAL is task to be for (see of a RUN run ER the AC, task" Chapter brought or to 6). because being an value POSTed. number in "REquest cannot for WAITING waiting Routine process waiting a it into memory. 0200 EORMWT Event for or an Event arrive, 0100 USERWT Message Wait Flag whichever - to This be happens User Wait - This bit user-written tasks. task set or is a waiting message to first. is reserved RTS/8 does for not use by use this bit. 0040 ENABWT Enable Wait Enabled. - the Monitor task”TM and Chapter 6). MSGWT 0020 Message sent 0010 NETWT 0001 DNEWT Does The Task that is, Flags at task 1is of this bit Console Routine "DIsable task" Wait - This task future use. Not for Exist Wait because it Task 1s runnable. is located Table location TIf the TFTABL - for a after task to run. 1000 the task is waiting be to for the "ENable commands. (See 1is This the NTASKS+2"4+4TSTABL-1 entry to restricted waiting to be task cannot run is nonexistent. Examples: 1. waiting is message. Reserved - 0000 a This Use is Task in State field 0. Table, EXECUTIVE 2. TIf the TFTABRL INTERNAL entry for a TASK TABLES task is 0440 the task MCR was 3. If was disabled from while the terminal waiting the to TFTABL be swapped for a task running by the nonresident operator portion of at the the task in. is 0000 the task is runnable. However, this task task of higher priority has precedence. may not run if a The Task Input 2-word entries message gueue Word 1 Word - 2 - Message that Queue Header represent for each task: if zero, there if non-zero, the first if word to the the are the message 1 was not address Table "head" no messages word in (MSGTBL) (start) is the zero, of a in CDF - of contains the the to the input queue; field of queue. this the word first is a pointer message in the queue. The Message Executive Table in field 1is located at the end of the RTS/8 0. Example: Consider the following MSGTBL entries for a task. 6211 2044 Since input the first entry is a nonzero, there are messages in the queue waiting for this task to receive them. The first entry is a pointer 2044 The each in CDF instruction indicating field Residency 1 - to the field Table (RESTBL) contains if - a a The that - Residency is, at contains pointer entry task is in bits second begins 2-word to 0 the entry at is a location entries task's through checkpointable, if a task 1is writeable tasks 2 The for task. Table Word 1. first message 1. nonresident Word that writeable. are defined 9. and Bit bit Partition 10 11 is is Checkpointable in Section 5.1. set set and contains the absolute block address (plus 1 to allow for the core control block) of the task's core image on the swap device. Table location is located after TFTABL+NTASKS+2 the in Task field Flags 0. Table, EXECUTIVE INTERNAL TASK TABLES Example: Consider the following RESTBL entries for a task. 1611 0124 This task table has entry task is not is writeable 5. a nonresident used by this checkpointable (bit The the disk-resident swap device. The Partition each 11 1 - (bit entry 1 of The 4-word at location begins 10 is portion of this (The save image Table partition. It Word portion. task of entry a 1). contains a 0), it task begins at block 124 begins at block 123.) on - contains indexed into via the is but (PARTBL) is 1 partition 1610. The length a a (size) 4-word entry for partition number. in bits field 1-5 and (bits 6-8) argument of the mass storage device driver call that reads an occupant into the partition with the "WRITE" bit set. Bit 11 of this word is the partition busy flag. Word 2 contains the Word 3 contains a RESTBL Word The 4 - Partition multiple i.e., at memory pointer address to word at an of the 1 of partition. the occupant's entry. unused Table must begin address that 1is a of four. It is located after the Residency Table, location NTASKS-SWAPPERTM2+RESTBL+3&7774 in field O. Example: Consider the partition. following PARTBL entries for a particular 5421 1400 1553 0000 This partition is by a task whose (entry 3). of field (octal) Figure E-1 Executive. 2 currently in use (bit 11 of entry 1 is 2-word RESTBL entry begins at location The partition (bits 6-8 pages long summarizes the The Residency (bits begins at of entry 1-5 of internal Table and a 1) 1553 location 1400 (entry 1). The partition is entry 2) 14 1). task table structure of the Partition Table are optional in that they are used only when nonresident tasks are employed. The exact location of these tables in memory depends on the number of tasks and other parameters in the parameter file. They can be found for a particular assembly under the "System Locations:" heading at the end of the parameter file assembly listing. TASK INPUT MESSAGE RESIDENCY PARTITION QUEUE HEADER (MSGTBL) TABLE (RESTBL) TABLE (PARTBL) Contains pointer to task PARTBL bit 10 check- Contains the Length (size) and Instruction Data Bits determine if task is If zero, no messages in queue, if Field Field runnable nonzero, word is CDF to the fieid entry in bits 0-9; of first message pointable; If nonzero, this word is pointer Block address plus 1 of the task’s Contains starting address of to the first message in the queue core image on swap device the partition e Represents the “‘head’’ of the e Bit 10 of word 1 is set if task input message queue for each checkpointable the occupant’s RESTBL entry Link GT UM (IF) (DF) 0 1 5 68 9-11 Field argument (bits 1-8) of the mass storage device driver call that reads occupant into partition with ‘write’ bit set (bit 0). Contents of Program Counter (PC) bit 11 - writeable e Task runnable if entry contains zero Word 3 Contents of Accumulator (AC) Contains pointer to word 1 of task o Bit 11 of word 1 is set if task writable Word 4 Unused Contents of Multiplier Quotient (MQ) e Bit 0 is always set (write) e Upon task execution, TSTABL loaded into corresponding CPU e Bit 11 of word 1 is the registers partition memory flag e Upon task interruption, TSTABL entry set to new contents of CPU registers Figure E-1 Executive Internal Task Table Structure JAILNDIXH Word 2 TASK FLAGS TABLE (TFTABL) SHTAVL MSVLI TUVNJILNI Word 1 TASK STATE TABLE (TSTABL) GLOSSARY arithmetic the which in register The operations are performed (abbreviated AC). Accumulator Representation of Analog by information continuous variables. Analog Channel An UDC/ICS functional device. the A variable or constant which is given in a call of a subroutine as information to it; a of value the value whose upon variable Argument the known reference factor function depends; necessary to find an item in a table or array the (i.e. index). A program which translates symbolic op-codes menory assigns and 1language machine into locations for variables and constants. Assembler Auto-index register Auto-restart from 1locations Whenever one of the absolute memory field is any in 0017 through 0010 that of contents addressed indirectly, the 1is incremented by one, rewritten in location the same location, and used as the effective address of the current instruction. The ability to start the CPU automatically on power-up. A unit of measure of data Baud flow (one bit per second) . A binary digit of 12 bits). Bit Bit (each PDP-8 word 1is composed A method of keeping track of used and unused assigning one bit in a table to by entities Map entity. each A Block set of consecutive machine words, unit, a as handled digits or characters and input to reference with varticularly octal 400 is block 0s/8 an output; process also to inhibit a contiguous words; from continuing. Block The blank space between blocks on a Gap recording medium. Blocking Bits Bits why in an a given Byte 2 group upon as Cassette A magnetic data RTS/8 Monitor task 1is of binary a unit. tape storage. Glossary-1 Table which specify blocked. digits device used usually for operated program and Central Processing Unit The unit the of a computing circuits and execution CPO) . Checkpointable Task A task out is of of instructions To includes interpretation (abbreviated if it may be swapped automatically, without its to make room tasks. Clear that the checkpointable memory consent, system controlling for higher priority erase the contents of a storage location replacing the contents, normally with by zeros. Clock A time keeping computer interrupts. Communication Compute Region Bound measuring Locations 20-27 simplify passing field boundaries. every executive Requiring extensive to The number other and (or types Channel Contiguous A UDC/ICS of Code which adjacent Controller Core Image The File A functional circuitry file in 'picture' Core Storage The other main to across of the CPU (such as present memory image core); of CPU Channel Registers A UDC/ICS a device. known storage functional High-speed of (i.e., as a SAVE CPU Data A (e.g., computer general facts, can Data Field A IF, term used numbers, connotes basic processed 3-bit register (abbreviated To detect, the to denote and of which DF). Glossary-2 and any by store correct or the all It which computer. determines operands addressed locate in the symbols. information produced which program. to 1letters or by operation of DF). elements be field from indirectly Debug used affecting PC, a file. device. circuitry information a immediately which binary data is represented switching polarity of magnetic cores. Counter on code. format also high-speed use elements controls core of in sections that used request hardware the periodic device. resides to within field, total) hardware system. Contact device provides of relative I/0 devices). Configuration or system; the memory are taken in instructions mistakes in a Deferred Actions Actions are which not actions Deferred Requests are Requests and are considered performed low-priority until and higher-priority serviced. which are are considered serviced after 1low-priority high-priority requests. Derail To transfer control or execution specified task to a subroutine. Device Codes assigned Numbers to each device of in a the system. Device Status Register A register of Digital Digital a Representation units. Channel Driver A UDC/ICS See Dynamic Flag to The location be The location Executive Requests Field Devices program Codes which of Executive. or and of to 4K of fixed length a recording the size devices Bound increase used routine A I/O and which a by 1is also control begun. status result of of an some occurrence). controls the execution of routines. between tasks on a PDP-8 section of memory. blank tape a and the computer separating generally files several block gap. available in to for signal power. identify which which of condition much affected use under the handler. operation I/0 discrete time) the either medium; of is to contains memory a on A by execution communication A Codes routine functional device caused direct program control to Handler status the condition; system run-time. physical RTS/8 An Generic a Means The to at being programs UDC/ICS Gain as a other times Functional that (such which or A division Gap in (event referring File current device. quantity transferred operation, The a relative features can event Executive the information condition therefore refers to Event of functional Pertaining Point contains Handler. some Entry which device. but a in is of UDC/ICS designed to control the device. which using Glossary-3 type an interrupt and to service routines. a process is performing very little CPU time. Indirect Address An address in a computer instruction which indicates a location where the address of the referenced Initialization Code Code operand which is sets to be found. counters, switches, and addresses to zero or other starting values at the beginning of or at prescribed points in a computer routine. Input Buffer A section of memory used for storage of input data. Instruction Field A register which holds the determining from which field the directly addressed instruction taken (abbreviated 1IF). Interactive Highly Interface The responsive common between Interlock Scheme to hardware two A Interrupt or break in execution Processing Module A routine which which caused an software caused 1is by acts upon the interrupt. 1list of actions to accompanied by the interval to elapse from the previous current Line-frequency Clock so that external resumed external at a event perform, each of time which is action to the whose ticking occurs power line frequency. at a multiple A one-bit register in the PDP-8; an pointer generated automatically by assembler to indirectly address an Link boundary one. A clock the some usually A Queue a be systems. the control of devices operation is interdependent. event; execution later time. Interval and/or devices of inputs. Arranging their Interrupt real-world contents operand should of address the PALS off-page symbol. Logical A logical function of which is true whenever OR A Loop sequence repeatedly prevails. Mass Storage Master Device Parameter File of two or more either input is instructions until a 1is executed condition A device such as disk or DECtape which stores large amounts of data readily accessible to the central processing unit. A file RTS/8 included in which the the distributed user can parameters specific configuration. Memory Address that terminal 1inputs true. A by register a memory which holds reference Glossary-4 to the edit sources of to indicate his address instruction. system specified A contiguous Message information Message~driven An RTS/8 only task from Alphabetic octal Module A 1s of memory which contains execution of tasks. called executes received Mnemonic area about in other message-driven response routine 1if it messaqges tasks. representation machine to of a function ot instruction. which handles particular a function. Monitor Console Multiplier Routine Quotient The Monitor routine which provides the user with functions which allow him to control, inspect, and A register used accumulator to 12-bit the operations Multi-programming Two or same on Nonresident Task A the current task No in task 1is conjunction perform MQ). (tasks) in memory alternately of the a task is with mathematical swapped at the depending system. or into a portion of memory when it proceeds to the executable. operation next system. execute state that becomes No-op programs which nonresident a his (abbreviated more time debug occurs; instruction in control sequence. / Null Characters Overflow Charécters with ASCII code 000. A condition that occurs when a operation yields a result whose greater than of storing. Pack To conserve Page A 128-word the data memory presentation by (decimal) combining section memory beginning at an multiple of 200(octal). Parameter Parity Bit file bit number or Pointer Post A is capable information. of PDP-8 address A file used to record arguments assigned different values. A mathematical magnitude is core which which is may a be which indicates whether the total binary one digits in a word is even of odd. in word containing memory. To post an FINISHED Event state the address Flag means via of to an another set RTS/8 it word to a Executive Request. Posted One of the indicating as states that "FINISHED". Glossary-5 the of an event flag, event is complete; same Power-fail An Priority A Program Scheme Counter interruption scheme by of power to the computer. which execution of preference over a certain operations set of instructions other operations. or is the given A register which contains the address of the next instruction to be executed (abbreviated PC). Prompting Character Queue A character terminal and action. which prints cues the A waiting list (e.g., waiting for processing Ready Flag Real-time A System bit which is ready A system while so a device a queue time). commands in which computation the physical results gquiding of controller accept in of or the console perform some to to related that used a on user sets when the CPU. from is process the programs it performed is occurring computation measuring can be physical the process. Receiver The task another Record Record which task A collection Header Ring-buffer Area as a An area has of related of at least contains perform cassette storage first-in, but a message items of data unit. which A received from (sender). 40(octal) words information in length necessary to operations. area for data accessed first-out basis. Similar involves storage of usually treated on a to Queue, character codes. Scheduling The operation computing Sender The Bit Simulate sharing task task Sign of The which has (receiver). bit resources among tasks. which sent contains To represent the or program with a message to the sign a function another of a of another number. device, device, system system or program. Skip Chain An instruction source - of sequence which determines the interrupt request on a PDP-8; or more tests for each possible an contains one (hardware) interrupt State Status condition. A complete description of piece of hardware or of a That or portion tasks of might Glossary-6 the be the condition task. state which other interested in. of a devices Subchannel One of the functional Suspend To temporarily halt execution of a task another task of higher priority runs. while Symbols Names which can a 4 channels device. which can used to be be of assigned indicate A means of coordinating flags) so that one task wait. System An RTS/8 tasks Task UDC/ICS values specific analog or locations in program. Synchronization Ticks a convention in the freqguency of A task is function. a tasks (through executes while designed system the event others to obviate the from knowing the clock. routine which performs a specific A task may be "resident" or "nonresident". A resident task is permanently located in memory. A nonresident task is loaded into memory as it 1s needed and Task Flags A Table can be table overlaid of after 1-word Input Header Message Table completion. entries Executive whose contents not a task is runnable. Task its 1in determine the RTS/8 whether or Queue A table head of of 2-word the entries 1input which message represent queue for the each task. Task Task A unique assigned Number State Table A Switching Terminal Word between each task 1 in and an 63 (decimal) RTS/8 system. contains registers the for The act of ontinuing stopping execution of one task execution of another from and the point it task. that A peripheral data Utilities to table of 4-word entries which ost recent contents of CPU .ach Task number can was device enter Routines to functions. In the be stored or in leave perform PDP-8, in last a one Glossary-7 12-bit stopped. a system the through non-Monitor unit addressable which computer. of data related which location. may INDEX 4-4, ALTMODE, Digital output UDC/ICS operation, 5-1 Analog input UDC/ICS operation, 4-27 Disable contacts UDC/ICS operation, Analog output UDC/ICS operation, 4-30 4-25 Disable counter UDC/ICS operation, Arbitrary boundaries, 9-7 Assembling nonresident tasks, 4-29 Distributed source files, 7-6 Assembling tasks, 6-5, 8-11 Editing parameter file, ENable command, 5-4 Assembly, nonresident tasks, 7-8 Assembly error messages, Assembly parameters, 5-4 DIsable command, 4-26 A-1 6-5, 6-8 Enable contacts UDC/ICS operation, D-1 UDC/ICS, 4-29 Enable counter UDC/ICS operation, 4-31 4-28 Error conditions, UDC/ICS, 4-31 Batch control, nonresident tasks, 7-8 Batch stream, 6-6, 6-8 Event flag states Event BLKARG ER, 3-6 Buffers, 7-6 flags, 2-5, Cassette handler, E-1 Executive KL8-A support, 4-37 Executive request wait states, 3-12 Executive 4-35 Cassette file support tasks, 4-35 system ‘ requests, BLKARG, 3-6 DERAIL, 9-5 POST, 3-4 RECEIVE, 3-3 4-32 Change of state UDC/ICS operation, 4-30 Character mode, 4-4 Checkpointable tasks, 7-3 RUN, 3-8 SEND, 3-2 Clock handler, 4-2 Clock handler system parameters, 6-10 SENDW, 3-3 SKPINS, 3-9 CTRL/C, 4-5, 5-1 Communication region, 3-1 Component sizes, B-1 Control files, use of, 6-9 Core image, 7-6, 7-7 Creating an RTS/8 system, Creating SAVE image file, UNBARG, 3-8 WAITE, 3-3 WAITX, 9-5 SUSPND, EXIT task system parameters, 6-5 6-6 [4 Field mapping, FINISHED DECtape 5-2 task, file, 4-13 DEposit DERAIL system program, command, ER, ‘Digital 6-10 C-1 command, 7-4 7-8 parameters, Generic code UDC/ICS operation, 6-14 Demonstration 2-2 Floppy disk handler, Flowcharts, 6-14 4-20 state, Floppy disk control FREE handler 3-8 EXIT command, 5-6 EXIT task, 4-39 7-6 command, Debugging, nonresident 2-3 EXamine command, 5-6 Executive internal task tables, CAL instruction, 3-1 CAncel command, 5-4 Cassette file support handler, DAte summary, 2-2 5-6 Inhibiting task Instructions, 9-5 input UDC/ICS 4-27 8-1 operation, CAL, 4=27 3-1 POSTDS, Index-1 3-10 switching, 9-2 INDEX Instructions WAITM, (CONT.) (cont.), 9-4 Interrupt module restrictions, 3-10 skip Intertask messages, support chain, 3-9 TTY 2-3 system parameters, support task, task, User LINCtape 4-38 4-39 handler, 4-16 Line mode, 4-4 Line printer handler, Mass MCR tasks, 7-8 6-6, 8-11 tasks, storage command address, handlers, space, time-of-day, 5-1 CAncel, DAte, 5-4 DEposit address, 5-6 DIsable, 5-4 ENable, 5-4 EXamine address, 5-6 EXIT, 5-6 NAme, 5-2 OPen address, 5-5 POst address, 5-6 REquest, STop, definitions, task setup, task specifications, component size, B-5 MCR error messages, 5-6 MCR system parameters, Message table, file Partition parameter 6-3 structure, 6-1 initializa- 7-7 takle, null E-4 task, state, a POst address POST ER, 4-37 2-2 reschedule, command, 9-1 5-6 3-4 instruction, Power fail Read counter task, 3-10 4-18 UDC/ICS command, task operation, 5-3 structure, RUBOUT, 4-4 RUN 3-8 ER, Sample 6-~12 task program, 2-1 6-7 SAVE image file, creating, 6-6, 7-6 nonresident tasks, 7-8 Saving the system, 6-6, 8-11 7-3 2-3 E-3 SEND 5-2 Nonresident MCR, 5-6 Nonresident task debugging, 7-8 Nonresident task implementation, 7-8 Nonresident task 7-5 €-2 6-4 Parameter REquest MCR header, 4-21 file, task RTS/8 Message 6-13 communication, Residency table, E-3 RTS/8 description, 1-1 5-3 Memory partitions, 4-19 system param- Real-time system operation, RECEIVE ER, 3-3 5-4 command, task 4-29 SYstat, 5-4 TIme, 5-2 NAme task, support POSTDS 5-2 5-5 support Performing MCR commands, 6-5 file support task, 4-23 operating system, 4-19 PENDING 5-1 7-8 0S/8 0S/8 PDP-8A 5-1 file, 7-8 listings, Partition 5-1 7-8 command, tion, single 7-5 7-1 OPen 5-1 5-1 task-ID, image eters, 4-11 parameters, 7-8 starting, 0S/8~RTS/8 arguments, comma, word, SAVE Parameter nonresident Loading tasks, 0S/8 0S/8 . 4-10 system parameters, Line printer 6-14 Loading, Nonresident Obtaining 4-38 task, tasks, batch control, loading, 7-8 6~13 0S/8 task Nonresident assembly, Interrupt KL8~-A Nonresident SKPINS ER, 3-3 3-9 nonresident tasks, command, SUSPND Swap Index-2 3-2 Starting, STop initialization, ER, SENDW ER, ER, 5-4 3-8 device, 7-1, 7-6 7-8 1-2 INDEX Swapper system parameters, Syntactic constructions, SY¥stat command, 6-11 Terminal handler, 4-4 Terminal handler system param- 5-1 5-4 eters, 6-11 ~ Terminal parameter default values, System parameters, clock handler, 6-10 DECtape handler, 6-14 EXIT task, 6-14 KL8-A support, 6-13 line printer, MCR, 6-12 0S/8 support task, swapper, 4-9 TIme 6-14 6-13 6-11 task summary, 4-1 cassette file support, cassette handler, 4-32 LINCtape handler, 4-13 Line printer handler, 4-10 mass storage 4-11 0Ss/8 0S/8 file support, support, 4-18 PDP-8A null, read counter, 4-23 UNBARG ER, power fail, 4-18 terminal handler, 4-2 UDC/ICS handler, 4-24 WAITBITS Task flags table, Task number, Task Task Task 4-29 3-8 Use of control files, 6-9 User task KL8-A support, 4-39 Using BITMAP program, 6-7, 7-5 Using interrupts, 3-9 4-37 Task communication, 4-19 change of state, 4-30 digital input, 4-27 digital output, 4-27 disable contacts, 4-30 disable counter, 4-29 enable contacts, 4-29 enable counter, 4-28 generic code, 4-27 4-35 4-16 handler, 5=~2 UDC/ICS assembly parameters, 4-31 UDC/ICS error conditions, 4-31 UDC/ICS handler, 4-24 UDC/ICS handler system tasks, 4-24 UDC/ICS operation, analog input, 4-26 analog output, 4-25 System tasks, clock handler, 4-2 EXIT, 4-39 floppy disk handler, command, Timeshare function disabled, TTY control file, 6-9 TTY task KL8-A support, 4-38 terminal handler, 6-11 System status report code, 5-5 System tables direct references, 9-8 System (CONT.) 2-1 WAITE E-2 symbolic ER, WAITING names, state, 2-2 2-1 WAITM instruction, state table, E-1 status report, 5-5 WAITX ER, synchronization, Writing delicate Writeable 2-2 Index-3 3-7 3-3 9-4 9-5 tasks, 7-3 code, 9-1 RTS/8 User's Manual DEC-08-0ORTMA~-C=D READER'S COMMENTS This form is for document comments only. DIGITAL will use comments submitted on this form at the company's discretion. Problems with software should be reported on a Software Performance Report (SPR) form. If you require a written reply and are eligible to receive one under SPR service, submit your comments on an SPR NOTE: form. find errors in this manual? If so, Did you find this manual understandable, Please make suggestions for improvement. Is there required sufficient documentation for use of what material Please the is missing indicate the type on usable, and well-organized? associated software described and where specify by page. should of user/reader system programs in this manual? it be If not, placed? that you most nearly represent. E] Assembly language programmer O 0000 Please cut along t his nne . Did you Higher-level language programmer Occasional programmer (experienced) User with little programming experience Student programmer Non-programmer interested Name in computer concepts Date Organization Street City State Zip Code or Country and capabilities Fold Here -— Do Not Tear - Fold Here and Staple FIRST CLASS PERMIT NO. 33 MAYNARD, MASS. BUSINESS REPLY MAIL NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STATES Postage will be paid by: Software 146 Documentation Main Street ML5-5/E39 Maynard, Massachusetts 01754 RTS/8 RW Read data 4000 Write PAGES SYSTEM from data to TASKS floppy disk. floppy disk. Specifies the number of pages to transfer (times 100 octal). Pages = 0 transfers 40 pages (a full field). This value takes the range 0-37 in bits 1-5 of this word. PAGES 1is ignored if CODE = 4000. In that case, either 100 (octal) 12-bit words or 200 transferred 8-bit bytes depending on (from FIELD Specifies the field of buffer Bits 6-8 of this word have the BUFADD the address of the containing data. determined by FIELD. Length PAGES if CODE = 0 or on MODE Specifies Represents first logical CODE = 0. Each Track 0 is ignored is 'employed. physical 0S/8 track a sector STATUS Receives the completion. occurred. If may be The meaning of is buffer depends if on CODE 4000. block 0, positive of nonzero the only STATUS Bit "Meaning 0 1-3 4 Not Not Hard has in if 8 DEL is = as INIT done (can occur 10 Parity CRC error error NOTE On po wer might the fail ¢ alling message restart, occur. task again. When the this should word 2000. follows: INIT error send error occurs, the 1/0 by after failure controller) 11 has This 1 power upon error error temporary format operation controller 9 scheme contains the hard if sectors. word used by controller used by RTS/8 Deleted data indication Not used by controller Reserved for future use 5 6-7 4 occurred. bits if transfer of interleave numbers error to this of the negative, a no = consists status If the buffer 2-to-~l TTTTTTTSSSSS. of of CODE = 4000, and are octal). word Field 0S/8 block and If words) (times 10 range 0-7. first buffer BLOKNO 200 MODE. to
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies