DEC 15 GRQA D_RSX15_1971 D RSX15 1971
DEC-15-GRQA-D_RSX15_1971 DEC-15-GRQA-D_RSX15_1971
User Manual: DEC-15-GRQA-D_RSX15_1971
Open the PDF directly: View PDF .
Page Count: 175
Download | |
Open PDF In Browser | View PDF |
real time executive rer:erence manual digital equipment corporation DEC-lS-GRQA-D R S X-I 5 REAL TIME EXECUTIVE REFERENCE MANUAL FOR ADDITIONAL COPIES, ORDER DEC-15-GRQA-D FROM PROGRAM LIBRARY, DIGITAL EQUIPMENT CORPORATION, 146 MAIN STREET, MAYNARD, MASS. 01754 PRICE $7.00 DEC-15-GRQA-D Copyright © 1971 by Digital Equipment corporation The material in this handbook, including but not limited to instruction times and operating speeds, is for information purposes and is subject to change without notice. The following are trademarks of Digital Equipment Corporation, Maynard, Massachusetts: DEC FLIP CHIP DIGITAL PDP FOCAL COMPUTER LAB PDP-15 FAMILY OF MANUALS SOFTWARE HARDWAHE INSTA LLATIO N MANUAL ACCEPTANCE TE ST PROCEDURES OPERATORS GUIDE B/F,15/30/40 PDP-15/20 MODULE MANUAL INTERFACE MANUAL PDP-15 110 SYSTEM USER'S 1-'---4------1 GUIDE PDP-15/10 SOFTWARE SYSTEM UTILITY PROGRAMS MANUAL MACRO -15 FORTRAN TIL FOCAL-15 8/15 TRANSLATOR STATPAC - 15 SCOLDS 15-0040 SYSTEM REFERENCE MANUAL - Overview of PDP-15 hardware and software systems and options; instruction repertoire, expansion features and descriptions of system peripherals. (DEC-15-GRAZ-D) MAINTENANCE MANUAL VOLUME 1, PROCESSOR - Block diagram and functional theory of operation of the processor logic. Preventive and corrective maintenance data. (DEC-15-HB2A-D) USER'S GUIDE VOLUME 1, PROCESSOR Principal guide to system hardware includes system and subsystem features, functional descriptions, machine-language programming considerations, instruction repertoire and system expansion data. (DEC-15-H2DA-D) VOLUME 2, PROCESSOR OPTIONS Block diagram and functional theory of operation of the processor options. Preventive and corrective maintenance data. (DEC-15-HB2A-D) VOLUME 2, PERIPHERALS - Features functional descriptions and programming considerations for peripheral devices. (DEC-15-H2DA-D) OPERATOR'S GUIDE - Procedural data, including operator maintenance, for using the operator's console and the peripheral devices associated with PDP-15 Systems. (DEC-15-H2CA-D) PDP-15/10 SYSTEM USER'S GUIDE COMPACT and BASIC I/O Monitor operating procedures. (DEC-15-GGIA-D) PDP-15/20 SYSTEM USER'S GUIDE ADVANCED Monitor system operating procedures. (DEC-15-MG2B-D) PDP-15/20/30/40 ADVANCED MONITOR SOFTWARE SYSTEM - ADVANCED Monitor System descriptions; programs include system monitor and language, utility, and application types; operation, core organization, and input/output operations within the monitor environment are discussed. (DEC-15-MR2B-D) PDP-15/30 and 15/40 BACKGROUND/ FOREGROUND M9NITOR SOFTWARE SYSTEM - Background/Foreground Monitor description, including the associated language, utility, and application programs. (DEC-15-MR3A-D) PDP-15/35, RSX-15 REAL TIME EXECUTIVE, REFERENCE MANUAL Reference manual for the real time, multiprogramming RSX monitor system. (DEC-15-GRQA-D) VOLUME 3, PERIPHERALS (Set of Manu"als - Block diagram and functional theory of operation of the peripheral devices. Preventive and corrective maintenance data. (DEC-15-HB2A-D) INSTALLATION MANUAL - Power specifications, environmental considerations, cabling, and other information pertinent to installing PDP-15 Systems. (DEC-15-H2AA-D) ACCEPTANCE TEST PROCEDURES - Stepby-step procedures designed to ensure optimum PDP-15 Systems operation. MODULE MANUAL - Characteristics, specifications, timing, and functional descriptions of modules used in PDP-15 Systems. (DEC-15-H2EA-D) INTERFACE ~~UAL - Information for interfacing devices to a PDP-15 System. (DEC-15-HOAA-D) UTILITY PROGRAMS MANUAL - Utility programs common to PDP-15 Monitor Systems. (DEC-15-YWZA-D) MACRO-15 - MACRO assembly language for the PDP-15. (DEC-15-AMZA-D) FORTRAN IV - PDP-15 version of the FORTRAN IV compiler language. (DEC-15-KFZB-D) FOCAL-15 - An algebraic interactive compiler-level language developed by Digital Equipment Corporation. (DEC-15-KJZB-D) TABLE OF CONTENTS Page CHAPTER 1 INTRODUCTION 1.1 1.2 1.3 INTRODUCTION HARDWARE REQUIREMENTS AND OPTIONS SYSTEM SOFTWARE CHAPTER 2 EXECUTIVE 2.1 2.2 2.2.1 2.2.2 2.2.3 2.2.4 INTRODUCTION EXECUTIVE ORGANIZATION CORE AND DISK MANAGEMENT SCHEDULING OF REAL-TIME PROGRAMS INPUT/OUTPUT OPERATIONS DYNAMIC SYSTEM PRIORITY CONTROL CHAPTER 3 MONITOR CONSOLE ROUTINE 3.1 3.1.1 3.1.2 3.1.3 3.2 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.3.10 3.3.11 3.3.12 3.3.13 3.3.14 3.3.15 3.3.16 3.3.17 3.3.18 3.3.19 3.3.20 3.3.21 3.3.22 INTRODUCTION REQUESTING THE RESIDENT MCR ERROR DETECTION AND HANDLING COMMAND STRINGS SUMMARY OF MCR FUNCTIONS MCR FUNCTION DESCRIPTIONS ENTER TIME FUNCTION TIME FUNCTION DATE FUNCTION TASK LIST FUNCTION PARTITIONS FUNCTION COMMON BLOCKS FUNCTION DEVICES AND ASSIGNMENTS FUNCTION INSTALL FUNCTION REMOVE FUNCTION REQUEST FUNCTION SCHEDULE FUNCTION RUN FUNCTION SYNCHRONIZE FUNCTION CANCEL -FUNCTION RESUME FUNCTION FIX IN CORE FUNCTION UNFIX FROM CORE FUNCTION DISABLE FUNCTION ENABLE FUNCTION REASSIGN FUNCTION SAVE FUNCTION OPEN REGISTER FUNCTION CHAPTER 4 RSX SYSTEM DIRECTIVES 4.1 4.2 INTRODUCTION SUMMARY OF RSX DIRECTIVES AND SYSTEM MACROS DESCRIPTION OF DIRECTIVES REQUEST DIRECTIVE SCHEDULE DIRECTIVE RUN DIRECTIVE SYNC DIRECTIVE CANCEL DIRECTIVE SUSPEND DIRECTIVE 4.3 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 v 1-1 1-2 1-3 2-1 2-2 2-2 2-4 2-7 2-8 3-1 3-2 3-2 3-2 3-3 3-4 3-4 3-5 3-5 3-5 3-6 3-7 3-8 3-8 3-9 3-9 3-9 3-10 3-10 3-11 3-11 3-12 3-12 3-12 3-13 3-13 3-14 3-14 4-1 4-1 4-2 4-3 4-4 4-6 4-7 4-9 4-9 Page 4.3.7 4.3.8 4.3.9 4.3.10 4.3.11 4.3.12 4.3.13 4.3.14 4.3.15 4.3.16 4.3.17 4.3.18 4.3.19 4.3.20 4.3.21 4.3.22 4.3.23 4.3.24 4.3.25 4.3.26 4.3.27 4.3.28 4.3.29 4.3.30 4.3.31 4.3.32 4.3.33 4.3.34 4.3.35 RESUME DIRECTIVE ..MARK DIRECTIVE WAITFOR DIRECTIVE WAIT DIRECTIVE EXIT DIRECTIVE CONNECT DIRECTIVE DISCONNECT DIRECTIVE READ DIRECTIVE WRITE DIRECTIVE DSKAL DIRECTIVE DSRDAL DIRECTIVE DSKPUT DIRECTIVE DSKGET DIRECTIVE ATTACH DIRECTIVE DETACH DIRECTIVE SEEK DIRECTIVE ENTER DIRECTIVE DELETE DIRECTIVE CLOSE DIRECTIVE HINF DIRECTIVE DISABLE DIRECTIVE ENABLE DIRECTIVE FIX DIRECTIVE UNFIX DIRECTIVE DECLAR DIRECTIVE TIME SYSTEM MACRO DATE SYSTEM MACRO INTENTRY SYSTEM MACRO INTEXIT SYSTEM MACRO CHAPTER 5 TASK BUILDER 5.1 5.2 5.3 INTRODUCTION TASK BUILDER DESCRIPTION EXAMPLE USING THE TASK BUILDER CHAPTER 6 SYSTEM CONFIGURATOR 6.1 6.2 6.3 6.4 6.5 INTRODUCTION INSTALLING THE RSX SYSTEM STEP BY STEP SYSTEM CONFIGURATION PROCEDURE EXAMPLE OF A SYSTEM CONFIGURATION DESCRIPTION OF ERROR MESSAGES CHAPTER 7 SYSTEM ORGANIZATION 7.1 7.2 7.3 7.4 7.4.1 7.4.2 7.4.3 7.4.4 7.4.5 7.4.6 7.4.7 INTRODUCTION RSX BOOTSTRAP OPERATION RSX MEMORY MAP (WARM START) SYSTEM DEQUES POOL THE SYSTEM TASK LIST (STL) THE ACTIVE TASK LIST (ATL) THE CLOCK QUEUE THE PARTITION BLOCKS DESCRIPTION LIST THE PHYSICAL DEVICE LIST (PDVL) THE SYSTEM COMMON BLOCK DEFINITION LIST (SCDL) INPUT/OUTPUT OPERATIONS 7.5 vi 4-10 4-10 4-11 4-12 4-12 4-13 4-14 4-14 4-15 4-16 4-17 4-18 4-19 4-22 4-22 4-23 4-24 4-24 4-25 4-26 4-27 4-27 4-28 4-29 4-29 4-29 4-30 4-30 4-31 5-1 5-1 5-3 6-1 6-2 6-3 6-5 6-6 7-1 7-1 7-2 7-3 7-4 7-4 7-5 7-5 7-6 7-7 7-8 7-8 Paqe 7-9 7-9 7.5.1 7.5.2 7.5.3 7.5.4 7.5.5 7.5.6 7.5.7 I/O HANDLER TASK INITIALIZATION I/O REQUESTS I/O FUNCTIONS HANDLER TASK EXIT DISK STRUCTURE I/O DATA MODES INTERRUPT PROCESSING CHAPTER 8 TASK CONSTRUCTION 8.1 8.2 8.3 8.4 8.5 8.6 INTRODUCTION COMPUTATIONAL TASK MeR FUNCTION TASK FRONT-END INTERRUPT DRIVER TASK I/O HANDLER TASK ADDITIONAL INFORMATION 8-10 8-19 8-36 SYNTACTICAL DESCRIPTIONS OF MCR A-l 7-11 7-13 7-13 7-14 7-15 8-1 8-2 8~2 APPENDICES APPENDIX A APPENDIX B APPENDIX C APPENDIX D APPENDIX E APPENDIX F FUNCTIONS MACRO EXPANSIONS FOR SYSTEM DIRECTIVES CAL PARAMETER BLOCKS FOR SYSTEM DIRECTIVES SUMMARY OF RETURNED EVENT VARIABLES REGISTERS SAVED DURING "SAVE" AND "RESTORE IJ OPERATIONS CONVERSION TABLES GLOSSARY vii B-1 C-1 D-1 E-1 F-1 CHAPTER ONE INTRODUCTION 1.1 INTRODUCTION RSX-l5 is a real-time monitor system designed for handling real-time information in a multiprogramming environment. The modular construc- tion of the system allows the user to configure his available hardware and software resources to best fit his requirements. RSX-15 controls and supervises all operations within the system including any number of core- and disk-resident programs (called Tasks) limited in number only by available space. This control and super- vision allows an unlimited number of Tasks to share core and disk memory, input/output device handlers, and other resources of the system. The execution of Tasks is determined by software_priorities, hardware interrupts, timing algorithms, and requests from other Tasks. The user can install a new Task on-line, establish its software priority from any of 512 distinct levels, and then request its activation at any time with an automatic reactivation at any periodic interval of time thereafter. Utilizing simple time-directed commands, the user can dynamically schedule Tasks from the console terminal or from within a Task. 1-1 Device independence in RSX then allows the user to obtain results of that Task immediately on his Teletyp~or store them on a mass storage device such as a disk or magnetic tape for future reference. I/O requests from Tasks are queued and processed by RSX on a priority basis allowing high priority requests access to heavily used devices which have pending lower priority requests. Delays are further re- duced by having the actual transfer of data being performed by the I/O Processor independent of the Central Processing Unit, thus allowing concurrent Task execution and I/O processing. 1.2 HARDWARE REQUIREMENTS AND OPTIONS The minimum hardware configuration required to operate the RSX-15 system on a PDP-l5/35**is as follows: 16K of core memory API - Automatic Priority Interrupt EAE - Extended Arithmetic Element Real Time Clock (frequency is 16.7 msec for 60 Hz systems and 20 msec for 50 Hz systems.) NOTE: The clock must be wired to API hardware level 3. One (1) RS15 DECdisk (262,000 word fixed head) and one(l} RF15 .controller. One (1) TU56 DECtape unit and controller. One (1) KSR35 Teletype High Speed Paper Tape Reader High Speed Paper Tape Punch The RSX-15 system supports the following additional hardware: Addition of core memory in increments of 4K up to 32K. Addition of one or more disk units. The disk controller is designed to acconunodate up to 8 disk units (2 million words) • Addition of one or more DECtape units. The controller is designed to acconunodate up to 4 TU56 DEC tape units (8 tape drives). Addition of one or more Teletypes. Up to 16 additional Teletypes, either model KSR33 or KSR35, may be added to the standard system (under LT15/LT19). One (1) VTOI storage tube display system. (Tektronix model 611 storage tube with interface). One (1) to Eight (8) TUIO - 7 or 9 track IBr-1 compatible magtape transport (7 and 9 track may not be mixed) One (1) LP15 - Line Printer. * Teletype is a trademark of the Teletype Corporation. ** A fully ECOed PDP-IS is required. 1-2 1.3 SYSTEM SOFTWARE RSX-15 is a complete system for program preparation, compilation, assembly, debugging, and operation in a system that has been configured to the user's needs. The RSX-15 system utilizes two separate monitors, the ADVANCED Software Monitor and the Real-Time Monitor. The ADVANCED Software Moni- tor is the standard monitor for the PDP-15/20 and PDP-15/35 computers. The ADVANCED Monitor is used in the development, debugging, and building of executable Tasks for the Real-Time Monitor. The system soft- ware includes the FORTRAN IV compiler, MACRO assembler, TEXT EDITOR, TASK BUILDER, and numerous Utility programs*. The TASK BUILDER, TKB, is used to build user's Tasks from relocatable binary files by linking them together along with library functions to constitute an executable Task that runs under control of the RealTime Monitor. TKB is quite similar to the CHAIN program allowing very elaborate overlay structures to be built. A resultant Task is defined by a name (Task name), default run priority, core partition and common block requirements, and resident code. The Task, which resides either on paper tape or DECtape, is now ready to be incorporated into the real-time operating system under control of the RealTime Monitor. Chapter five discusses the TASK BUILDER in greater detail. The Real-Time Monitor is used to supervise and control the execution of real-time Tasks. The real-time software includes the RSX-15 EXECUTIVE, I/O Device Handler Tasks, Resident MCR, and the SYSTEM CONFIGURATOR. The SYSTEM CONFIGURATOR is a Task which is requested by the Real-Time Monitor when the system is initially loaded. * Refer to ADVANCED Software Monitor Manual and Utility Programs Manual. 1-3 The CONFIGURATOR is an interactive program which asks the user several questions in order to tailor the RSX-IS EXECUTIVE to suit his particular application and hardware configuration. The user is required to supply information such as the amount of core memory available, number of disk units and Teletypes, partition sizes and locations, common areas, and which I/O Device-units are in the system. discusses the SYSTEM CONFIGURATOR in greater detail. 1-4 Chapter Six CHAPTER TWO EXECUTIVE 2.1 INTRODUCTION The RSX EXECUTIVE is the heart of the real-time operating system. It coordinates all activities in the system including Task scheduling, I/O supervision, resource allocation, and interactive operator communication. The core memory of the RSX system is divided into partitions that are occupied by the Real-Time Monitor, Monitor Console Routine (MCR) Function Tasks, I/O Handler Tasks, user written Tasks(programs), and COMMON Blocks used for inter-Task communications. There is no limit to the number of core partitions and COMMON Blocks that can be defined except for the amount of core space available. All Tasks are then executed from these partitions allowing several programs to be in core at any given time (multiprogramming). Normally Tasks reside on the disk, and are brought into their partition (if unoccupied) only when requested, and release their partitions upon exit. However, when desirable, or necessary, a Task may be fixed in core, thereby dedicating a partition to a single Task, but assuring core availability and rapid response. Tasks that can tolerate a response time of 100 milliseconds or more will normally be disk resident rather than 2-1 core resident. Since the Task Builder program allows a Task to con- sist of a resident program with a simple to very elaborate overlay structure, a Task can be both core and disk resident at the same time. The core resident program remains in core once the Task has been activated,and overlay segments are requested when needed. Requested over- lay segments will be executed immediately if already in core, or brought in from disk overlaying the previous segment(s) and then executed. When a Task is built using the Task Builder program it can include any number of user written programs and be assigned any core partition (providing the partition was defined at system configuration time and is large enough to contain the Task). The Task can also be assigned any run priority (which may be overridden at run time) from 1 to 512 where 1 is the highest priority. Task execution occurs because of requests by the operator, requests from a currently executing Task, or by a predefined schedule*. Activated Tasks are defined in the system Active Task List and scheduled Tasks are defined in the Clock Queue to be activated at a predefined time. Tasks can also be installed in the system on-line while other Tasks are currently executing. 2.2 EXECUTIVE ORGANIZATION 2.2.1 CORE AND DISK i'lAfJAGEf'iENT Core memory in the RSX system is partitioned to allow several Tasks to be active at any given time. All core above the resident EXECUTIVE (first 4K) can be user specified into Partitions and COMMON Blocks during system configuration. All unspecified space above the first 8K of core will then be used to create Partition Blocks and a reservoir * The scheduling capabilities of RSX will be described later. 2-2 of empty nodes called the Hpool: 1 • Each node in the Pool consists of ten contiguous memory locations with internal pointers connecting the previous node to the next node resulting in a circular or double ended queue called a dequJ. The EXECUTIVE uses nodes to create linked lists containing system information. These nodes are removed from and re- turned to the Pool as needed. Since the Pool and Partition Blocks are needed to run, sufficient core above the lower 8K core should be left unspecified. Unspecified core below 8K (and above the EXECUTIVE) is unused. Partitions and SYSTEM COMMON Blocks2 are fixed at system configuration time and cannot be altered at run time. Tasks are built to execute in specific partitions, and, any number of Tasks may be built to execute in the same. partition. A Partition containing an active Task cannot be used by other Tasks, regardless of priority, until that partition becomes available. When two or more requests for the same partition are made and the partition is occupied, the Task with the highest priority will be serviced first when the partition becomes available. An executing Task releases its partition once it EXITs to the EXECUTIVE. RSX uses the disk for storage of user written Tasks, MCR Function Tasks and data. Disk space is automatically allocated by the EXECUTIVE when Tasks are installed in the system. portions of the disk are available to the user. The remaining When a Task requires disk space to store data, it must request it through the EXECUTIVE via an ALLOCATE Directive. The actual allocation of disk space is performed in increments of 128 10 words of contiguous disk storage providing the user with true random access capability_ The EXECUTIVE maintains a record of available disk space by using a bitmap scheme. A user can relinquish allocated disk space through the use of the IDeque is ptonol,lnced IIdeckll. 2See Glossary: CO~~ON BLOCK, SYSTEM. 2-3 DEALLOCATE Directive. 2.2.2 SCHEDULING OF REAL-TIME PROGRAMS (TASKS) The scheduling of Real-Time programs (Tasks) can result from anyone of three types of events: the request for the activation of a Task, the request for an Input/Output transfer, hardware interrupt. or the occurrence of a It is important that the reader have a thorough understanding of the meaning of "Significant Event"land the Active Task List in order to understand the concepts of scheduling in RSX. The Active Task List is a priority ordered list of Active Tasks that is used to drive the system. This list is scanned from high to low priority by the EXECUTIVE as a result of a Significant Event to give control to the highest priority Task that is capable of executing at that time. Tasks are installed in the system either at the priority given them at Task Building time (default priority) or at the priority specified in the INSTALL Directive. For instance, the user can install a Task named SCAN with default priority 100 by typing: INSTALL SCAN If a new default priority of 78 were desired, the user could have installed SCAN by typing: INSTALL SCAN 78 Task priorities can also be altered at run time either by the operator or by a currently executing Task. Once a Task has been installed in the system it can be activated by typing: REQUEST SCAN (Task will execute at default priority) SCHEDULE SCAN 13:3~:~~ 3~M (Task will execute at default priority at 1:3~ P.M. and be rescheduled every 3~ minutes thereafter) RUN SCAN 25M (Task will execute at default priority 25 minutes from now) ITask initiation, task completion, and I/O completion are examples of significant events. 2-4 SYNC SCAN H 3~M 2H 78 (Task will be executed at priority 78, 39 minutes past the hour, and every 2 hours thereafter) A request to activate a Task will be executed providing that a partition is available and a Task with a higher priority is not currently executing. Once a Task is activated it will run to completion unless interrupted by a higher priority Task. An interrupted lower priority Task will be resumed only when higher priority Tasks have completed or have relinquished control. Whenever one Task is interrupted by another, its active registers are automatically saved by the EXECUTIVE and later restored when execution is resumed. Control will be given to a lower priority Task if a currently executing Task is waiting for the completion of an I/O request or by issuing any of the following Directives: WAIT; WAITFOR; and SUSPEND. Control can be given to a higher priority Task by requesting it to be run or by issuing any of the following Directives: REQUEST, RUN, SYNC, and SCHEDULE. The following example illustrates the mechanism used by the EXECUTIVE to scan the Active Task List. Assume that two Tasks are installed in the system with names TASKl and TASK2 and have priorities of 50 and 100 respectively: The operator requests TASKl to be executed one minute from now and TASK2 to be executed immediately. The operator's commands would be: RUN TASK1 1M REQUEST TASK2 The following chart describes the sequences of events during the request and activation of both Tasks. IThe larger number indicates a lower priority. 2-5 TASK2 finishes execution and system is idle. TASK2 resumes execution at priority 100 • . .". TASKl exits, Monitor restores TASK2's registers and resumes execution of TASK2. TASKl finishes execution. TASKl executes at priority level 50 • - ... Monitor saves TASK2's registers and Clock routine activates TASK1 • .. r Process Clock Interrupt which occurs one minute after operator requested TASK1. TASK2 executes at priority 100. Monitor requests TASK2 - MCR Function processes request. Monitor requests MCR Function. Operator requests TASK2 to be run immediately. Process Keyboard Interrupts -oJ' I · Monitor requests MCR Function which enters request in Clock Queue. Operator requests TASKl to be run one minute from now. Process Keyboard Interrupts System is idle. PRIORITY 0 t.n 0 0 r-I H H > ra:! > ra:! ~ H ~ (J) < E-f rz.. 0 ~ ~ U H Z(J) ~ (J) QZ Ora:! ME-f ~ Figure 2-6 ~~ 2.1 2.2.3 INPUT/OUTPUT OPERATIONS The RSX EXECUTIVE allows the user device independent programming, reassignment of devices on-line, and the ability to queue I/O requests providing him with an extremely powerful and flexible I/O structure. The RSX system provides the user with device handlers for standard I/O devices supplied with the system. These handlers are called I/O Device Handler Tasks and can be installed in the system either at system configuration time or on-line. to the userls lationship. enviror~ent by I/O Handler Tasks are connected means of a logical/physical device re- This relationship allows the user to reference a Logical Unit Number (LUN) rather than a physical device when requesting an I/O operation. At run time the user then may reassign the LUN to the desired physical device. Thus, a Task which normally outputs data to LUN 4 which is currently assigned to the teleprinter can output the same results on a paper tape punch or line printer if the user types the following: REASSIGN 4 PP (or) REA 4 LP PP TT~ (Reassign LUN 4 to the Paper Tape Punch from TT~) (Reassign LUN 4 to the line printer from the Paper Tape Punch) All requests to be serviced by I/O Handler Tasks are entered into a priority ordered queue even though the device may be busy. The priority of the request will be the same as the priority of the Task issuing the request. Once the Task has issued a request, it can either wait for its completion or continue executing and test at any time the current state of the I/O operation it requested. An Event Variable (software flag) may be associated with I/O requests and its value indicates the current status of the I/O operation. 2-7 When an I/O operation completes, the user's Event Variable is set accordingly and a Significant Event is declared. This causes the Active Task List to be scanned and control to be given to the highest priority Task capable of executing. There are two types of I/O Device Handlers in the RSX System: The Standard I/O Device Handler Task and the System I/O Device Handler Task. The System I/O Handlers are the Disk and Multi-Teletype Handler Tasks which must be core resident and cannot be deleted from the system. Standard I/O Device Handler Tasks are those which are not System I/O Handlers supplied by the manufacturer or created by the user. When a L{JN is assigned to a device I the Handler Task is requested and remains in core as long as the LON is assigned to the device. A Task can obtain the exclusive use of an I/O Handler Task by issuing an ATTACH Directive. When the ATTACH Directive is accepted by the Handler, only requests from that Task are serviced with requests from other Tasks queued until a DETACH request is serviced. Example: ATTACH 2,EV DETACH 2,EV 2.2.4 DYNAMIC SYSTEf~l Attach the device assigned to LUN 2 to the currently executing Task. Detach the Device. EV is the event variable. PRIORITY CONTROL The priority structure of the RSX System includes both hardware and software priority levels. Hardware levels are established by the Automatic Priority Interrupt (API) of the PDP-IS computer and software levels are established by the user and controlled by the EXECUTIVE. There are 8 levels of API of which four are used for hard- ware I/O devices and four for the EXECUTIVE. API levels 4 and 6 are used exclusively by the EXECUTIVE and level 7 is used for Task execution (level S is currently not used). 2-8 From level 7, the EXECUTIVE derives its 512 Task priority levels used for Task operations. The following figure illustrates the hierarchy of the entire priority system. AUTOMATIC PRIORITY INTERRUPT SYSTEM Task Priority Levels Executive Priority Levels Hardware Levels Derived from API level 7 by the Executive Exclusive use by the Executive Used by all I/O Devices 512 API LEVELS I .1 7 6 5 4 3 2 1 0 • Increasing Priority Figure 2.2 RSX Priority Structure The hardware API levels 0,1,2, and 3 are used to control I/O devices in the system. Each level can have as many as 8 device controllers connected to it allowing a total of 32 devices to be serviced by the API system. Each of the 32 API lines are associated to unique core locations which specify where program control will be transferred when an interrupt signal occurs on that line. 2-9 CHAPTER THREE MCR MONITOR CONSOLE ROUTINE 3.1 INTRODUCTION The Monitor Console Routine (MCR) allows the user to communicate online with the system from the console teleprinter to dynamically adjust and modify the operation of the system through simple commands (functions). The operator may obtain status information about the system, install or replace Tasks, request Task execution based upon time driven schedules, or fix a Task in core. Other MCR commands permit altering of logical/physical device relationships, examination and modification of core locations, and adjustment of the System Clock and Calendar. The MCR consists of the Resident MCR Task, which accepts the user's commands, and the MCR Functions, which actually carry out the indicated requests. The MCR Functions are similiar to user created Tasks in that they normally reside on the disk and are brought into a core partition when requested. Although the MCR Functions are built (with the Task Builder) to execute in a predefined core partition, they can be built to run in any partition. Execution of MCR Tasks, like all Tasks, is based upon partition availability and Task priority. 3-1 3.1.1 REQUESTING THE RESIDENT MCR The Resident MCR must be Active in order to receive requests for Function Tasks from the operator at the console teleprinter. To request the Resident MCR, type CTRL C (i.e., simultaneously depressing the CTRL and C keys). When the MCR is ready to accept a command it will output: MeR> (on LUN 2)and wait for a command to be typed immediately to the right of the prompting character 3.1.2 (» . ERROR DETECTION AND HANDLING Error detection is provided by the various MCR Functions and Resident MCR where applicable. When an error is detected, an appropriate message, prefixed by the name of the issuing MCR Function, is output to LUN 3. 3.1.3 COf'ii"1AND STR INGS When typing MCR command strings the following conventions apply: a. Command strings are terminated either by a Carriage RETURN or by an ALT MODE. If a Carriage RETURN is typed, the Resident MCR will be requested when the current Function is complete. If an ALT MODE is typed, the Resident MCR will not be requested at the termination of the current Function. b. Each element of a command string must be separated by either a comma (,) or a space (_). c. If an error is discovered while typing a command string prior to typing a terminator, the line may be deleted as far back as the prompting character (» by typing CTRL U (formed by simultaneously typing CTRL and U characters). 3-2 A commercial nat" (@) symbol is echoed informing the user that he can retype the command string. The RUBOUT, echoed as a backs lash (\), may be used to delete the last character typed in. Every time the RUBOUT is typed, a backs lash is echoed and a character is deleted. d~ Any number of characters (except a comma or space) may be inserted between a Function name and its arguments or command string terminator (Carriage R~TURN or ALT MODE). This is useful if the user wishes to improve the readability of his teleprinter copy. 3.2 SUMMARY OF MCR FUNCTIONS* Task Name Function ETI[ME] Enter time and date into the system. TIM[E] Request current time from the system. DAT[E] Request current date and time from the system. TAS[K LIST] Request System Task List. PAR[TITIONS] Request list of Partition definitions. COM[MON BLOCKS] Request list of Common Block definitions. DEV[ICES AND ASSIGNMENTS] Request list of LUN device assignments. INS [TALL] Install a Task in the system. REM [OVE] Remove a Task from the system. REQ[UEST] Request immediate activation of a Task. Schedule the activation of a Task. RUN * Request scheduled Task a delta time from now. Square brackets of the form ([]) specify optional characters. 3-3 SYN[C] Schedule .and synchronize the activation of a Task. CAN [CEL] Cancel the activation of a Task. RES [UME] Resume .execution of a suspended Task. FIX Fix Task in core (Task becomes core resident) • UNF[IX] Unfix Task in core. DIS [ABLE] Disable Task (reject future Task activation directives). ENA[BLE] Enable a disabled Task. REA [SSIGN] Change LUN assignment(s). SAV[E] Save image of core on the disk. OPE[N] Open register for examination or modification. 3.3 MCR FUNCTION DESCRIPTIONS The following paragraphs describe the form and function of the MCR Functions. To simplify the interpretation of the various command strings, the following symbols are used to represent the non-printing teleprinter operations; J = Carriage RETURN ., = LINE FEED V = Terminator (either = Space Carriage Return or ALT MODE) Square brackets of the form ([]) specify optional characters and/or arguments. The ampersand sign (&) is used for concatenation of a numeric argument to an alphabetic letter. 3.3.1 ENTER TIr~E The Enter Time Function is used to set the System Clock and Calendar. Form: ETI[ME]_Hr:Min:Sec[_Mo/Day/Yr]V Variables:Hr = Hours (f8-23) Min = Minutes OJ-59) Sec = Seconds (~-59) Mo = Month (1-12) 3-4 = Day of Month (1-31) = Year (last two digits Day Yr ~-99) NOTE: The European form has the month and day reversed. Example: The time is 3, seconds past 3:45 P.M. and the date is March 23, 1971. MCR>ETIME 15:45:30 3/23/71 :1CR> 3.3.2 TIME The Time Function outputs the time of day on LUN 3. Form: TIM[E]V Example: The time is 41 seconds past 3:45 P.M. f'1 CR> TIME 15:45:41 MCR> 3.3.3 DATE The Date Function outputs the System Calendar and the time of day on LUN 3. Form: OAT [E] V Example: The date is March 23, 1971 and time of day is 52 seconds past 3:45 P.M. f\1CR>DATE 23/23/71 15:45:52 r1CR> 3.3.4 TASK LIST The Task List Function outputs to LUN 3 a description of each Task which has been Installed in the system. The description consists of the following information (printed left to right, one line per Task): Task Name, Partition Name, Priority (decimal), Disk Unit Number (octal), Head Track Address (octal) and Task Size (octal). may be prematurely terminated by typing CTRL C. 3-5 Output Form: TAS[K LIST]V Example: r1CR> TAS:< LIST RX PP •••• DT •••• PR •••• LP •••• ••• DAT ••• OPE ••• SAV • •• RF: A • •• DIS ••• RAR ••• UMF' • •• FIX ••• RES • •• C.4N ••• SYN • •• RU N ••• SCH ••• REQ ••• REM • •• INS ••• DEV ••• COM ••• PAR • •• TAS ••• TH1 • •• ET I P14.6 I 0.2 I o. 1 I 0.2 I 0.2 t1CR MCR MCR f1CR MCR r1CR MCR MCR r1CR [1CR i'1Cn MCR MCR r1CR MCn (,'1CR MCR f1CR r1CR r~CR f1CR f1CR 512 002 0102 002 001 002 002 332 002 002 002 002 002 002 0212 21102 002 0102 002 002 0102 002 002 002 002 002 002 0 11022100 Gj 101200 0 076600 0 075600 ZI 075000 I} 074600 0 07,")600 (3 073200 0 072000 0 071600 0 071400 0 071000 0 070400 0 070000 067600 0 067200 0 066600 0 366000 0 0654100 10 065000 0 063200 0 0624100 0 062000 005310 00617 02261 00736 0046~ 00176 00624 010214 01041000166 0~166 00211 00302 100250 00166 00377 00361 010407 00335 00305 01516 010533 00263 3 ~61400 00230 10 060600 00406 0 060400 00145 iii C60000 00350 " \U i~CR> 3.3.5 PARTITIONS The Partition Function outputs to LUN 3 a description of all core partitions defined in the system. The description consists of (printed from left to right, one line per partition): Partition Name, Parti- tion Base Address (octal), and Partition Size (octal). be prematurely terminated by typing CTRL C. Form: PAR [TITIONS]V 3-6 Output may Example: )'lCR>PARTITIONS MCR 10000 01600 IO.l 11600 03000 ? 14 • 6 14600 03 200 P21.0 21000 05500 P26.5 26500 06500 IO.2 35200 ~1000 P40.0 40000 15000 :'-1CR> 3.3.6 COMMON BLOCKS The COMMON Blocks Function outputs to LUN 3 a description of all System COMMON Blocks defined in the system. The description consists of (printed from left to right, one line per COMMON Block): COMMON Block Name, COMMON Block Base Address (octal), and COMMON Block Size (octal). Output may be prematurely terminated by typing CTRL C. Form: COM [MON_BLOCKSl V Example: MCR>COMMON BLOCKS .XX 20000 00700 FLAG 36200 00600 '1CP> 3-7 3.3.7 DEVICES AND ASSIGNMENTS The Devices and Assignments Function outputs to LUN 3 a list of physical device units and the Logical unit Numbers assigned to them. Output may be prematurely terminated by typing CTRL C. Form: DEV[ICES_AND_ASSIGNMENTS]V Example: MCR>DEVICES AMD A£SIGMMENTS r!K0 1 TTr 2,3,5,1~,11,12,13,14,15,16,17,18,19 20,?1,22,23,24,?5,26,27,2R,29,30,31 32 TTl DT0 DTI DT? I1T3 DT4 I1T5 I1T6 DT7 PP 0 PP!?! LP0 7 ~ 9- MCO> 3.3.8 INSTALL The Install Function is used to input a Task into the RSX System. The Task to be added must be a binary file (TSK extension) produced by the Task Builder. TSK files are installed from LUN 5. Form: Variables:TSKNAM P = Name = Task of Task to be Installed (1 - 6 characters) priority (I - 512) Examples: Install Task SCAN whose default priority defined at Task Building time is 48. MCR>INS SCAN) (or) MCR>INS SCAN l~) 3-8 (SCAN is now redefined with a priority of l~) 3.3.9 REf10VE The Remove Function is used to delete a Task from the RSX System. REM [OVE] TSKNAMV Form: Variables:TSKNAM = Name of Task to be Removed (1 - 6 characters) Example: 3.3.10 The Task SCAN is no longer required and it is desired to remove it from the System. MCR>REM SCAN} REQUEST The Request Function is used to request the execution of a Task at an indicated software priority level. Actual Task execution depends upon priority and partition availability. Form: Variables:TSKNAM = Name of Task (1 - 6 characters) P = Task priority (l - 512) Examples: Request the execution of SCAN whose default priority defined at Task Building or Installation time is 48. MCR>REQ SCAN) (or) (SCAN is requested with MCR>REQ SCAN l~} a priority of l~) 3.3.11 SCHEDULE The Schedule Function is used to schedule the execution of a Task at some time in the future, specified in time-of-day, at an indicated software priority level, and with periodic rescheduling. Form: Variables:TSKNAM Hr Min Sec R1 RU P = Name of Task (1 - 6 characters) = Hours (II - 23) ,,.. - 59) Minutes {(A = Seconds (II - 59) = Reschedule Interval (up to 1 day) = Reschedule Units (T=Ticks, S=Seconds, M=Minutes, and H=Hours) = Task Priority (1 - 512) Examples: Schedule the execution of SCAN at 1:311 P.M. and reschedule it every 311 minutes thereafter at its default priority. 3-9 MCR>SCH SCAN 13:3~:~~ 3~MI Schedule the execution of SCAN at ule it every 2/6~th's of a second priority level l~. MCR>SCH SCAN 8:30:00 2T 3.3.12 8:3~ A.M. (6~ cycle and reschedclock) at l~J RUN The Run Function is used to make a Task active at some future time, specified in delta time from now, at an indicated software priority and with periodic rescheduling. Form: Variables:TSKNAM = Name of Task (1 - 6 characters) SI = Schedule Interval (up to one day) SU = Schedule Units (T=Ticks, S=Seconds, M=Minutes, and H=Hours) RI = Reschedule Interval (up to one day) RU = Reschedule Units (T=Ticks, S=Seconds, M= Minutes, and H=Hours) P = Task Priority (1 - 512) Examples: Schedule the execution of SCAN 3_ minutes from now and reschedule it every hour thereafter. MCR>RUN SCAN 3~M IHJ Schedule the execution of SCAN 1_ minutes from now and reschedule it every 32 seconds thereafter at priority level 28. MCR>RUN SCAN 3.3.13 l~M 32S 28 J SYNCHRONIZE The Sync Function is used to activate a Task at some future time following the occurrence of the next tick, second, minute, or hour. The Task is executed at the indicated software priority and with periodic rescheduling. This Function is particularly useful for minimizing the peak loading of a system which can occur when many Tasks are scheduled for execution at the same time. Form: Variables:TSKNAM = Name of Task (1 to 6 characters) 3-10 SZ = Synchronization Units (T=Ticks, S=Seconds, M= Minutes, and H=Hours) = Schedule Interval from Synchronization time (up to one day) = Schedule Units (T=Ticks, S=Seconds, M=Minutes, and H=Hours) = Reschedule Interval (up to one day) = Reschedule units (T=Ticks, S=Seconds, M=Minutes, and H=Hours) = Task Priority (1 - 512) SI SU RI RU P Example: Schedule the execution of SCAN 3 minutes after the next hour and reschedule it every hour thereafter at its---default priority level. MCR>SYN SCAN H 3M 1HJ Schedule the execution of SCAN l~ seconds after the next minute and reschedule it every hour thereafter at priority 21. MCR>SYN SCAN M 3.3.14 l~S 1H 21) CANCEL The Cancel Function is used to cancel all scheduled requests for activation of a particular Task by removing those requests from the Clock Queue. Cancellation does not affect the current execution of the given Task nor does it affect schedule requests made in the future. The latter case is covered by the DISABLE Function. However, schedule requests which have already been made (and entered in the Clock Queue) are discarded. Form: CAN [CEL]_TSKNAMV Variables:TSKNAM = Name of Task (1 - 6 characters) Example: Cancel the activation of Task SCAN. MCR>CAN SCAN) 3.3.15 RESUME The Resume Function is used to resume the execution of a Task which has been SUSPEND'ed. Form: RES[UME]_TSKNfu~I_Resumption 3-11 addressJV Variables:TSKNAM Example: = Name of Task (1 - 6 characters) Task SCAN has been previously SUSPEND'ed and it is desired to resume its execution. MCR>RES SCAN) 3.3.16 FIX IN CORE The Fix Function is used to fix an inactive Task into a free partition. This dedicates a partition to a Task and provides for a faster response to the REQUEST, SCHEDULE, RUN, and SYNC Directives as well as responses to external interrupts. Form: FIX TSKNAMV Variables:TSKNAM Example: = Name of Task (1 - 6 characters) Fix Task SCAN in core. MCR>FIX SCAN) 3.3.17 UNFIX FROM CORE The Unfix Function is used to nullify a FIX Directive. If a FIXed Task is active when an UNFIX Directive is issued, the partition will be freed when the Task EXITs. Form: UNF[IX]_TSKNAMV Variables:TSKNAM = Name of Task (1 - 6 characters) Example: Unfix Task SCAN from its partition. MCR>UNF SCAN) 3.3.18 DISABLE The Disable Function is used to instruct the system to reject further REQUEST, SCHEDULE, RUN, or SYNC Directives or periodic rescheduling for an indicated Task. This Function renders the specified Task in- capable of responding to other Directives except ENABLE. Task is not deleted from the system. 3-12 lef. REMOVE.) A Disabled Form: Variables:TSKNAM Example: = Name of Task (I - 6 characters) Disable the Task SCAN. MCR>DIS SCAN) 3.3.19 ENABLE The Enable Function is used to re-enable a DISABLEd Task. Form: ENA[BLE] TSKNAMV Variables:TSKNAM Example: = Name of Task (1 - 6 characters) Task SCAN has been previously DISABLEd and it is desired to re-enable it. MCR>ENA 3.3.20 SCA~ REASSIGN The Reassign Function is used to alter the logical/physical device relationships by deassigning a Logical Unit Number (LUN) from a device and reassigning it to another device. This Function causes the REQUESTing and EXITing of I/O Device Handler Tasks. Form: Variables:LUN ND 00 = Logical Unit Number to be Reassigned to which the LUN is to be assigned Device from which the LUN is to be deassigned. = Device = Examples: Assume the following LUN assignments currently exist: LUN 2:TT~, LUN 3:TT~, LUN 4:DTS, and LUN 33:LP. It is now desired to reassign those LUN's to the following devices: LUN 2:TTl, LUN 3:TTl, LUN 4:DT7, and LUN 33:TT~. 3 TTl TT~) 2 TTl TT~) 4 DTl DTS) 33 TT~ LPJ (or) MCR>REA 2 TTl TT/3 TTl TT) MCR>REA 4 DTl DTS/33 TT LP) MCR>REA MCR>REA MCR>REA MCR>REA Note: The MeR Functions, including the REASSIGN Function, use LUN's 2 and 3 for command input and output, respectively. Therefore, it is recommended when the user REASSIGN's these to another device, he should do so by REASSIGNing both LUN's on the same 3-13 line as shown in the second set of examples. The first set of examples are valid when altering LUN's 2 and 3 because the output from the REASSIGN Function Task was altered first and further commands can still be input from LUN 2. Device names associated with I/O Handler Tasks provided with the system are: TT[n] = Teletype (n is the unit number which, if omitted, will be assumed zero) DT[n] = DEC tape DK = DECdisk PR = High Speed Paper Tape Reader PP = High Speed Paper Tape Punch LP = Line Printer SAVE 3,3.21 The Save Function is used to record a core image of an RSX System (from location zero. 3g a to the top of core memory) at the beginning of disk The purpose of this Function is to provide a means for updating the system after Tasks have been added or deleted. The updated system can then be restored at any time by simply loading the RSX Bootstrap. This Function should only be executed when the system is quiescent, i.e., no Tasks should be active and no I/O should be in progress: Since the entire RSX system is recorded on the disk, when the user reloads the system, the System Calendar and clock will reflect the previous settings at the time the Save was done. Therefore the user should reset them to the correct date and time after reloading the system. Form: SAV [E] V Example: Save a copy of the RSX system on disk zero. MCR>SAV[E]J 3.3.22 OPEN REGISTER The Open Register Function permits the user to access any core location for the purpose of examination and/or modification. The user may optionally enter a signed number in any opened location using either IThe former does not imply the latter. 3-14 octal or decimal notation. Furthermore he may open and examine the register whose address is specified by the low order 15 bits of the currently open register or he may continue examination either in ascending or descending address order. Form: OPE [N]_AOR[ Dn]V Variables:AOR = Address of location to be examined. If the specified address is valid, the address and contents of that register are output followed by the prompting character (»~ o = The letter "0" signifies a disk address (ADR) rather than a core address to open. n = Disk unit number. Note: Userls response follows the prompting character (» • The (I) symbol denotes "EXCLUSIVE OR n • Form: ADDRESS/CONTENTS>[new contents] I [*V] I [tV] Variables:new contents Iv =A number (1 - 6 digits) which is to replace the contents of the currently opened register. The number may be optionally signed (+ or -) and/or a radix operator (0 = decimal, a = octal). EXAMPLES: Decimal -39 -039 (or) -D~~~~39 Octal 32 032 (or) +032 (or) 32 Terminators and special characters may be any of the following: - Close the current register and open the ) next higher register. ALT MODE - Close the current register and terminate the Function. - Close the current register and open the next lower register. - Close the current register and open the register specified by the lower 15 bits of the current register. Example: Comments follow the slash character and are used only to describe the different operations. MCR>OPE 242) >¢¢242/¢¢2325) >~H1243i~yJ3432* ) >~3432/¢¢¢¢5¢ ¢~~¢47) >¢3433/~¢~432 -Dl~(ALT MODE) MCR>OPE 243) >¢0243/~~3432t) >00242/0~2325 -6 (ALT MODE) MCR> 3-15 /open register 242 /open register 243 iopen register 3432 /change contents of / 3432 to 47. /change contents of / 3433 to -l~ decimal / and terminate / sequence. /open register 243 /open register 242 /change contents to -6 CHAPTER FOUR RSX SYSTEM DIRECTIVES 4.1 INTRODUCTION Communication to the RSX System from the user is accomplished by the use of system "Directives". Directives may be issued from within a Task or indirectly by an operator via the teleprinter and the Monitor Console Routine (MCR). The manner in which a Directive may be issued varies according to its function and use. Directive routines are structured to be reentrant and may be used to direct the Executive to schedule and reschedule a Task, provide status information for a Task, or queue I/O Handler Tasks to perform indicated I/O operations. 4.2 SUMMARY OF RSX DIRECTIVES &SYSTEM MACROS RSX DIRECTIVES CAL FUNCTION CODE (octal) ~l ~2 ~3 14 ~4 ~6 ~7 MACRO CALL REQUEST SCHEDULE RUN SYNC CANCEL SUSPEND RESUME FORTRAN CALL SYSTEM DIRECTIVE Request Task execution Schedule Task execution Run Task in delta time Sync Task execution Cancel scheduled requests Suspend Task execution Resume Task execution REQST SCHED RUN SYNC CANCEL SUSPND RESUME 4-1 13 MARK MARK WAITFOR WAITFR WAIT WAIT EXIT CONNECT DISCONNECT EXIT READ READ WRITE DSKAL DSKDAL DSKPUT DSKGET ATTACH DETACH SEEK ENTER DELETE CLOSE HINF DISABLE ENABLE FIX UNFIX WRITE DSKAL DSKDAL DSKPUT DSKGET ATTACH DETACH SEEK ENTER DELETE CLOSE HINF DISABL ENABLE FIX UNFIX SYSTEM MACRO CALL FORTRAN CALL DECLAR TIME DATE DECLAR TIME DATE Set Event Variable in delta time Wait for an Event Variable to be set Wait for next Significant Event Terminate execution of the Task Connect to interrupt line Disconnect from interrupt line Read from I/O Handler Task Write to I/O Handler Task Allocate disk storage Deallocate disk storage Put data on disk Get data from disk Attach Device-unit to a Task Detach Device-unit from a Task Seek file Enter file Delete file Close file Handler information Disable Task Enable Task Fix Task in core Unfix Task in core MACROS SYSTEM FUNCTION Declare a Significant Event Obtain Time from Executive Obtain Time and Date from Executive Interrupt Entry (register save routine) Interrupt Exit (register restore routine) INTENTRY INTEXIT 4.3 DESCRIPTION OF DIRECTIVES The RSX Directives are implemented as CAL instructions* which point to argument blocks (CAL Parameter Blocks). As a convenience to the assembly language programmer, the Directives have been defined as macro instructions and are commonly referred to as System Macros. FORTRAN Tasks use Directives through standard CALL statements to a group of FORTRAN Library Routines which themselves issue the Directives. * See Glossary 4-2 The RSX System allows Task names of one to six characters in length, however, not more than five characters may be used in Task names in FORTRAN calls in order to comply with PDP-IS FORTRAN conventions. Most Macro and FORTRAN calls to RSX Directives include the Task priority and its Event Variable (EV). The Task priority is indicated by a decimal number between 1 (highest priority) and 512 (lowest priority). A priority value of zero instructs the Executive that the Task's default priority is to be used. Directives usually have EV's associated with them which provide information concerning the results after the issuance of the Directive. If an EV is not specified when issuing a Directive, the Executive does not attempt to provide any information concerning the operation. Event Variables are set positive upon successful completion, zero when the request is pending, and negative to indicate rejection or failure. Appendix D provides a complete list and explanation of the EV values returned by the system. In the following sections which describe the Directives, square brackets of the form ([]) are used to specify optional arguments. 4.3.1 REQUEST This Directive instructs the Executive to initiate the execution of a Task based on an indicated software priority. The actual execution depends upon the priority and partition availability. The Event Var- iable, or the Event Variable and priority, may be omitted. cannot request itself. routine. A Task REQUEST may be issued from an interrupt service Event Variables ~turned are: +1, SYSTEM MACRO: REQUEST_TSKNAM[,P[,EV]] Variables: TSKNAM P EV = Name = = -2~1, -2~2, -2~4, of Task (1 - 6 characters) Task Priority (1 -512) Event Variable Address 4-3 and -777. Examples: Request the execution of SCAN whose default priority is 48. REQUEST SCAN,~,EV (or) REQUEST SCAN,48,EV Request the execution of SCAN at a priority of REQUEST SCAN,2~,EV (or) REQUEST SCAN,2~ 'lIn this case the testing of the IEvent Variable is not desired. FORTRAN CALL: CALL_REQST(nHTSKNAM,IP[,IEV]) Variables: n TSKNAM IP lEV 2~. = Number of characters in Task Name = Name of Task (1 - 5 characters) = Task Priority (l - 512) May be either Variable name or a direct constant. = Event Variable a Examples: Request the execution of SCAN whose default priority is 48. CALL REQST (4HSCAN,~,IEV) (or) IP=48 CALL REQST (4HSCAN,IP,IEV) Request the execution of SCAN at default priority and no Event Variable is desired. CALL REQST (4HSCAN,0) 4.3,2 SCHEDULE This Directive instructs the Executive to initiate the execution of a Task at an absolute time of day and to reactivate it continuously at a specified interval thereafter based on the indicated priority. If the Reschedule Interval is zero, the Task is executed only once at the time of day specified. A Task may SCHEDULE itself, however, the SCHEDULE Directive may not be issued from an interrupt service routine. Event Variables returned are: +1, -2~1, -2~3, -2~4, and -777. SYSTEM MACRO: SCHEDULE_TSKNAM,SH,SM,SSI,RI,RUI,PI,EV]J] Variables: TSKN1u\1 SH SM = Name of Task (1 - 6 characters) = Schedule Hour (~ - 23) = Schedule Minute (_ - 59) 4-4 SS RI RU P EV = Schedule Second (~ - 59) Reschedule Interval (up to one day) = Reschedule units (l=Ticks, 2=Seconds, 3=Minutes, and 4=Hours) = Task Priority (1 - 512) = Event Variable Address Examples: Schedule Task SCAN to run at 4:3~ P.M. and every'S minutes thereafter at a priority of 2~~. SCHEDULE SCAN~16~3~~~~5~3~2~~~EV SCHEDULE SCAN~16?3~~~~S?3 (or) /If Task1s default /priority was 2~~ and /Event Variable was /not desired. Schedule Task ALPHA to run at its default priority at 7:15 A.M. with no rescheduling and no Event Variable. SCHEDULE ALPHA~7~lS FORTRAN CALL: CALL_SCHED(nHTSKNAM,IT,IP[,IEV]) variables: n = Number of characters in Task Name TSKNAM = Name of Task (1 - 5 characters) = Name of 5 word (integer) array to describe IT the time of scheduling and rescheduling. The array is described below: IT(l) = Schedule Hour (~ - 23) IT(2) = Schedule Minute (~ - 59) IT(3) Schedule Second (~ - 59) IT(4) = Reschedule Interval (up to one day) IT(5) = Reschedule Units (l=Ticks, 2=Seconds, 3=Minutes, and 4=Hours) IP = Task Priority (1 - 512) lEV = Event Variable Examples: This example is equivalent to the first example in this section using FORTRAN. DIMENSION IT(S) IT(l) = 16 IT(2) = 30 IT(3) = ~ IT(4) = 5 IT(S) = 3 TD = 2¢¢ '" lEV =~ CALL SCHED(4HSCAN~IT}IP~IEV) (or) CALL SCHED(4HSCAN~IT~2~0}IEV) Schedule SCAN as above with no Event Variable and at its default priority. IP = ~ CALL SCHED(4HSCAN,IT,IP) 4-5 To schedule SCAN only once, set the reschedule interval equal to zero. IT(4) = ¢ IP =¢ CALL SCHED(4HSCAN,IT,IP) 4.3.3 RUN This Directive instructs the Executive to initiate the execution of a Task at a specified time interval from the time that the Directive is issued and reactivate the Task continuously at a specified interval thereafter. only once. If the Reschedule Interval is zero, the Task is executed A Task may use this Directive to reschedule itself, but the Directive may not be issued from an interrupt service routine. Event Variables returned are: +1, -2~1, -2~3, -2~4, and -777. SYSTEM MACRO: RUN_TSKNAM,SD,SU[,RI,RU(,P[,EV]]] Variables: TSKNAM = Name of Task (1 - 6 characters) SD = Schedule Delta time from now (up to one day) SU = Delta Units (l=Ticks, 2=Seconds, 3=Minutes, and 4=Hours) RI = Reschedule Interval (up to one day) RU = Reschedule Units (l=Ticks, 2=Seconds, 3=Minutes, and 4=Hours) P = Task Priority (1 - 512) EV = Event Variable Address Examples: Run the Task IN ITS 5 seconds from now and every minutes thereafter at priority of 512. l~ RUN INITS,5,2,l¢,3,512,EV Run the same Task at its default priority with no Event Variable specified. RUN INITS,5,2,l¢,3 FORTRAN CALL: CALL_RUN(nHTSKNAM,IT,IP[,IEV]) Variables: n = Number of characters in Task Name TSKNAM = Name of Task (1 - 5 characters) IT = Name of 4 word (integer) array to describe the time of scheduling and rescheduling. The array is described below: IT(l) = Schedule Delta time from now (up to one day) 4-6 IP lEV Example: IT(2) = Delta Schedule Units (l=Ticks, 2=Seconds, 3=Minutes, and 4=Hours) IT(3) = Reschedule Interval (up to one day) IT(4) = Reschedule Units (l=Ticks, 2=Seconds, 3:Minutes, and 4=Hours) = Task Priority (l - 512) = Event Variable Run the Task INITS 5 seconds from now and every minutes thereafter at a priority of 512. l~ DIMENSION IT(4) IT(l) 5 IT(2) IT(3) IT(4) IP = =2 = 10 =3 ::: 512 CALL RUN(5HINITS,IT,IP,IEV) 4.3.4 SYNC This Directive causes the Executive to execute a Task at a specified interval after the next hour, minute, second, or tick and to reinitiate the Task continuously at a specified interval. A Schedule Delta Time value of zero causes the named Task to be started on the next occurrence of the Synchronization Unit. A Reschedule Interval of zero causes the Task to be executed only once. rective may not be issued from an interrupt service routine. may use SYNC to reschedule itself. -2~l, -2~3, -2~4, and This DiA Task Event Variables returned are: +1, -777~ SYSTEM MACRO: SYNC_TSKNAM,SZ,SD,SUI,RI,RUI,Pf,EV]]] Variables: TSKNAM Name of Task (1 - 6 characters) SZ = Synchronization units (l=Ticks, 2=Seconds, 3=Minutes, and 4=Hours) SO = Schedule Interval from synchronization time (up to one day) SU = Schedule units (l=Ticks, 2=Seconds, 3=Minutes, and 4=Hours) 4-7 RI RU = Reschedule Interval (up to one day) = Reschedule Units (l=Ticks, 2=Seconds, 3=Minutes, and 4=Hours) = Task Priority (1 - 512) = Event Variable Address P EV Examples: Assuming the time is now 14:27:47, run Task FRED at l4:28:~9 at a priority of 2~ and reschedule it every 4 minutes thereafter. SYNC FRED,3,9,2,4,3,2¢,SYNEV Schedule the execution of SCAN l~ seconds after the next minute mark and reschedule it every hour thereafter at priority 21. SYNC SCAN,3,1¢,2,1,4,21,SYNEV FORTRAN CALL: CALL_SYNC(nHTSKNAM,IT,IP[,IEV]) Variables: n = Number of characters in Task Name TSKNAM = Name of Task (1 - 5 characters) = Name of 5 word (integer) array to describe IT the time of synchronization, scheduling, and rescheduling. The array is described below: IT(l} = Synchronization Units (l=Ticks, 2=Seconds, 3=Minutes and 4=Hours) IT(2) = Schedule Interval from synchronization time (up to one day) IT(3) = Schedule Units (l=Ticks, 2=Seconds, 3=Minutes, and 4=Hours) IT(4) = Reschedule Interval (up to one day) IT(5) = Reschedule Units (l=Ticks, 2=Seconds, 3=Minutes, and 4=Hours) IP = Task Priority (1 - 512) IEV = Event Variable Examples: Schedule the execution of Tasks FRED and SCAN as described in the examples for the System Macros. INTEGER FREDEV,SCANEV,SCANP,FREDP DIMENSION IT(S) IT(1) = 3 IT(2) = 9 IT(3) = 2 IT(4) = 4 IT(S) = 3 FREDEV = ¢ FREDP 2¢ = CALL SYNC(4HFRED,IT,FREDP,FREDEV) SCANEV = ¢ SCANP = 21 IT(2) = 1¢ IT(4) = 1 4-8 IT(S) 12 C 4 CALL SYNC(4HSCAN,IT,SCANP,S~ANEV) INSURE BOTH SYNC REQUESTS WERE ACCEPTED IF(SCANEV.OR.FREDEV.LT.~) GO TO 1~ BOTH SYNC REQUESTS WERE ACCEPTED AT THIS POINT C C REPORT FAILURE OF SYNC REQUESTS TO BE ACCEPTED TO CONSOLE OPERATOR. WRITEC3,11) FORMATC32H TASKS FRED OR SCAN NOT SYNC'ED.//) STOP END 1~ 11 4.3.5 = CANCEL This Directive instructs the Executive to remove all entries which appear in the Clock Queue for a specified Task. Cancel may not be issued from an interrupt service routine and has no effect on an active Task. Event Variables returned are: SYSTEM MACRO: CANCEL_ TSKNAM [ ,EV] Variables: TSKNAM EV Example: +1 and -2~1. = Name of Task (1 - 6 characters) = Event Variable Address Cancel the activation of Task SCAN. CANCEL SCAN,EV FORTRAN CALL: CALL_CANCEL(nHTSKNAM[,lEV]) Variables: n = Number of characters in Task Name TSKNAM = Name of Task (1 - 5 characters) lEV = Event Variable Example: Cancel the activation of Task SCAN CALL CANCEL(4HSCAN,IEV) 4.3.6 SUSPEND This Directive instructs the Executive to suspend execution of the Task issuing this Directive. The Task remains active in its core partition but execution is not permitted until the system receives a RESUME Directive. The Executive ignores this Directive if it is 4-9 issued from an interrupt service routine. SYSTEM ~~CRO: FORTRAN CALL: 4.3.7 SUSPEND CALL SUSPND RESUME This Directive instructs the Executive to resume execution of a Task which has been SUSPENDed. Task execution continues either at a spec- ified Resumption Address or, if not specified, at the address immediately following the SUSPEND Directive. -2~2, Event Variables returned are: +1, and -2{1S. SYSTEM MACRO: RESUME_TSKNAM[,RA[,EV]] Variables: TSKNAM RA EV Example: = Name of Task (1 - 6 characters) Address (octal) Event Variable Address = Resumption = Resume Task TSKA at location RSTRT. RESUME TSKA,RSTRT,EVA FORTRAN CALL: CALL_RESUME(nHTSKNAM[,IEV]) Variables: n Example: = Number of characters in Task Name TSKNAM = Name of Task (1 - 5 characters) lEV = Event Variable Resume Task TSKA. CALL RESUME(4HTSKA,IEV) Note: The RESUME subroutine permits a SUSPENDed Task to resume only at the location immediately following the CALL SUSPND statement. 4.3.8 MARK This Directive instructs the Executive to clear a specified Event Variable and set it to a non-zero value after a specified time interval has elapsed. If the request is accepted, the Event Variable is 4-10 cleared. After t~e specified interval has elapsed, the Event Varia- ble is set to +1 and a Significant Event is declared. The user may test the Event Variable as desired. The time interval indicates time from the execution of the Directive. The Mark Directive is ignored if issued from an interrupt service routine. Event Variables returned +1, -2~3, and -777. are: SYSTEM MACRO: MARK_ MI , MU , EV Variables: MI MU EV Example: = Delta Interval (up to one day) Delta Units (!=Ticks, 2=Seconds, 3=Minutes, and 4=Hours) = Event Variable Address = Set Event Variable TSTEV 5 minutes from now. MARK 5,3,TSTEV FORTRAN CALL: CALL.J-1ARK (IT, lEV) Variables: IT lEV Example: = Name of 2 word (integer) array to describe the time. The array is described below: IT(l) = Delta Interval (up to one day) IT(2) = Delta Units (l=Ticks, 2=Seconds, 3=Minutes, and 4=Hours) Event Variable Same as above example except in FORTRAN. DIMENSION IT(2) IT(l) = 5 IT(2) = 3 CALL MARK(IT,IEV) 4.3.9 WAITFOR This Directive instructs the Executive to examine a specified Event Variable and, if zero, suspend execution of the issuing Task until the Event Variable is found to be non-zero. The Event Variable is examined at each occurrence of a Significant Event. Once a non-zero value is detected, the suspended Task is resumed (contingent on priority) at the address immediately following the Directive (CAL). If WAITFOR is issued from an interrupt service routine, it will be ignored. 4-11 SYSTEM MACRO: WAITFOR EV Variables: EV Example: = Event Variable Address In this example, the Mark Directive requests that an Event Variable (MRKEV) be zeroed for 5 minutes and then set non-zero. The WAITFOR detects the fact that the Event Variable is zero and suspends Task execution until the value becomes non-zero (i.e., in 5 minutes). The Task is then resumed at the instruction immediately following the WAITFOR. MARK 5,3,MRKEV WAITFOR MRKEV FORTRAN CALL: CALL_WAITFR(IEV) Variables: lEV Example: = Event Variable Same as preceding example except in FORTRAN. DIMENSION IT(2) IT(l) IT(2) C 4.3.10 =5 =3 lEV WILL AUTOMATICALLY BE CLEARED BY MARK CALL MARK(IT,IEV) CALL WAITFR(IEV) WAIT This Directive instructs the Executive to suspend execution of the issuing Task until the next Significant Event occurs. The Task is re- surned (contingent upon priority) at the next Significant Event and con= tinues at the location immediately following the WAIT. It is the responsibility of the Task issuing the WAIT to determine the meaningfulness o~ the Significant Event which caused it to be resumed. This Diractive is ignored if issued from an interrupt service routine. SYSTEM MACRO: WAIT FORTRAN CALL: CALL WAIT 4.3.11 EXIT This Directive causes the Executive to terminate execution of the issuing Task. If the issuing Task is not fixed-in-core (via FIX) the 4-12 core partition occupied by the Task becomes available to other Tasks. This Directive should not be issued until all transfers to the partition (e.g. I/O transfers, Task-to-Task transfers, Event Variable settings, etc.) have been completed. This Directive is ignored if issued from an interrupt service routine. SYSTEM EXIT ~_~CRO: FORTRAN CALL: 4.3.12 CALL EX IT CONNECT This Directive instructs the Executive to create a linkage between a specified API (Automatic Priority Interrupt) trap address and a specified entry point to an interrupt service routine (there is one trap address for each of the 32 API lines in the PDP-IS). returned are: +1, -3~1, and -3~2. Event Variables The following is a list of API line assignments LINE NUMBER ~4 ~5 ~6 f)7 l~ 11 12 13 14 15 16 17 2~ *These DEVICE LINE NUMBER DECtape Magtape (unused) (unused) Paper Tape Reader *Clock Power Failure Memory Parity VP15 Display Card Reader Line Printer A/D Converter Interprocessor Buffer 24 25 26 27 3~ 31 32 33 34 35 36 37 4$l 21 (unused) 41 22 23 Dataphone *Disk 42 43 l~nes are always connected to the system. 4-13 DEVICE Diskpack Plotter (unused) (unused) (unused) UDC15 AFC15 (unused) *LT15/LT19 Printers *LT15/LT19 Keyboards DECtape (additional) Dataphone (additional) *Console TTY (Keyboard; *Console TTY (Printer) Paper Tape Punch Memory Protect SYSTEM MACRO: CONNECT_LN,CL[,EV] Variables: LN CL = EV ~ Example: Interrupt line Number (octal) Address of interrupt service routine Event Variable Address = Entry Connect an interrupt service routine for an A/D Converter (entry point called ADINT) to interrupt line 31. CONNECT 31,ADINT,ADEV FORTRAN CALL: 4.3.13 No subroutine is provided for this Directive since FORTRAN is not an appropriate language for writing interrupt handling routines. DISCONNECT This Directive instructs the Executive to remove the linkage created between an Automatic Priority Interrupt trap address and an interrupt service routine entry by the CONNECT Directive. returned are: +1, -3~1, and -3~2. SYSTEM MACRO: DISCONNECT_LN,CL,EV Variables: LN CL EV Example: = = = Event Variables Interrupt Line Number (octal) Entry Address of interrupt service routine Event Variable Address Disconnect the A/D-Converter from interrupt line 31. DISCONNECT 31,ADINT,ADEV FORTRAN CALL: 4.3.14 No subroutine is provided for this Directive since FORTRAN is not an appropriate language for writing interrupt handling routines. READ READ generates a form of the QUEUE I/O Directive which causes input of formatted ASCII or Binary to a specified buffer via the I/O Device Handler Task assigned to the indicated Logical unit Number. The Event Variable specified is set to zero when the request is accepted and subsequently is set to an appropriate value indicating the status 4-14 of the operation. Event Variables returned are: -l~l, -12, -16, -23, -1~2, -1~3, +2, +1, -5, -7, -"........ , and -777. SYSTEM MACRO: READ_LUN,MODE,BUFF,SIZE[,EV] variables: LUN = Logical Unit Number (decimal) MODE = I/O Data Mode (~=IOPS BINARY, l=IMAGE BINARY, 2=IOPS ASCII, and 3=IMAGE ASCII) = Starting Address of user's buffer = Maximum number of words to transfer (octal) = Event Variable Address BUFF SIZE EV Example: Read 256 (decimal) words in lOPS ASCII from the device assigned to LUN 3 and s.tore them in a blJffer called TXTBF. READ 3,2,TXTBF,402,INDEV wA\-r~f...... FORTRAN CALL: Example: 10 4,3.15 INCti;1/ No subroutine is necessary to implement this Directive. The standard READ statement as described in the PDP-IS FORTRAN IV Manual is used. DIMENSION TXTBF(256) READ (3,10) TXTBF FORMAT(256A1) WRITE WRITE generates a form of the QUEUE I/O Directive which causes output of formatted ASCII or Binary from a specified buffer to the I/O Device Handler Task assigned to the indicated Logical Unit Number. The Event Variable specified is set to zero when the request is accepted and subsequently set to an appropriate value indicating the status of the operation. Event Variables returned are: +2, +1, -6, -7, -11, -12, -15, -16, -23, Variables: -l~l, -1~2, LUN MODE BUFF SIZE EV -1~3, and -777. = Logical Unit Number (decimal) = I/O Data Mode (~=IOPS BINARY, l=IMAGE BINARY, 2=IOPS ASCII, and 3=IMAGE ASCII) = Starting Address of user's buffer = Maximum number of words to transfer (octal) Event Variable Address 4-15 FORTRAN CALL: Example: No subroutine is necessary to implement this Directive. The standard WRITE statement as described in the PDP-IS FORTRAN IV Manual is used. DIMENSION TXTBF(256) WRITE(6.,10)TXTBF l~ FORMAT(256~1) write out II WARNING , XFC OSCILLATING ATII followed by a frequency on LUN 3. WRITE(3.,1~)IFQ l~ 4.3.16 FORMAT(28H WARNING., XFC OSCILLATING AT., 16//) DSKAL DSKAL generates a form of the QUEUE I/O Directive to reserve a disk storage area of a specified size. If the space is available, the starting address, physical disk number, and actual amount of, space allocated1 (in increments of 128 decimal words) is returned to a Control Table which is contained within the issuing Task or in a COMMON Block. The actual allocation does not occur instantaneously; hence; one must test the Event Variable to determine completion. Event Variables returned are: +1, -15, SYSTEM MACRO: DSKAL_CTB[,EV] Variables: CTB EV -1~4, and -777. Address of a Control Table of the following format: Word 1: Desired amount of disk storage which is replaced by the actual amount allocated if allocated. Word 2: Physical disk unit number (returned at completion of oper a tion) • Word 3: Absolute starting address of the space allocated relative to the physical disk unit number (returned at completion of the operation). = Event Variable address lwhich may exceed the amount requested. 4-16 Example: Request 79~ decimal words of disk storage. (Since allocation is given in increments of 128 decimal words, the actual allocation will be 768 decimal words.) LAC DAC DSKAL WAITFOR (1274) CTB+O CTB,EV EV /SETUP FIRST WD OF CONT TBL. /REQUEST ALLOCATION OF 700 /WORDS OF DISK STORAGE. FORTRAN CALL: CALL_DSKAL (ICTB,NW[,IEV]) Variables: ICTB = Control Table (integer array). Table is described below: The Control Word 1: Actual amount of space allocated (returned at completion of the operation). Word 2: Physical disk unit number (returned at completion of oper a tion) • Word 3: Absolute starting address of the space allocated relative to the physical disk unit number (returned at completion of the o~eration). Event Variable Desired storage in words lEV . NW Example: Same as above except in FORTRAN. DIMENSION ICTB(3) CALL DSKAL (ICTB,700,IDKEV) CALL WAITFR (IDKEV) Note: 4.3.17 Space will not be allocated across disk unit bounds (i.e., from one unit to another). No more than l3~,944 words may be allocated by a single DSKAL command. DSKDAL DSKDAL generates a form of the QUEUE I/O Directive to release a disk storage area, which had previously been allocated by DSKAL, from the Disk. Event Variables returned are: +1, -15, -1~4, and -777. SYSTEM MACRO: DSKDAL_CTB[,EV] Variables: CTB EV = Control Table Address. This address should be the same as that used by DSKAL which originally allocated the space. Event Variable Address 4-17 Example: Request deallocation of the disk storage allocated in the previous section. There is no concern for when the disk space is actually freed. DSKDAL CTB FORTRAN CALL: CALL_DSKDAL(ICTBf,IEV]) Var iables :. ICTB lEV Example: = Control Table (integer array). This address should be the same as that used by DSKAL which originally allocated the space. = Event Variable Same as above except in FORTRAN DIMENSION ICTB(3) CALL DSKDAL(ICTB,IEV) 4.3.18 DSKPUT DSKPUT generates a form of the QUEUE I/O Directive to output data onto the disk from a specified area in core. This Directive is used when total freedom in data structuring and random access capabilities are desired. Event Variables returned are: +1 and -N, where N is the contents of the disk status register if a disk error occurs. SYSTEM MACRO: DSKPUT_CTB[,EV] Variables: CTB EV Address of a Control Table of the following format: Word 1: Disk unit number Word 2: Starting address on disk Word 3: Starting address in core Word 4: Length of transfer in words Event Variable address 4-18 FORTRAN CALL: CALL_DSKPUT(ICTA,IOA,NW,ARRAY[,IEV]) Variables: ICTA lOA NW ARRAY lEV Example: = Device Control Table (integer array). This array must be the same as that used to allocate the space onto which the data is being written since this uses information in the Control Table obtained via DSKAL Disk offset address. The relative position '(in words) within an array at which the transfer to the disk is to begin. = Number of words (decimal) to transfer. The name of the array containing the data to be transferreda = Event Variable Allocate 128~ decimal words of disk storage and write out 256 words on the disk from BUF. Writing on disk is to begin 128 words beyond the starting address of the beginning of the disk storaqe area. DIMENSION ICTA(3),BUF(256) CALL DSKAL(ICTA,128~,IDKEV) CALL WAITFR(IDKEV) CALL DSKPUT(ICTA,128,256,BUF,IDKEV) DSKGET 4.3.19 DSKGET generates a form of the QUEUE I/O Directive to read data from the disk into a specified area in core. This Directive is used where total freedom in data structuring and random access capabilities are desired. Event Variables returned are: +1 and -N, where N is the contents of the disk status register if a disk error occurs. SYSTEM MACRO: DSKGET_CTB[,EV] Variables: CTB EV Address of a Control Table of the following format: Word 1: Disk unit number Word 2: Starting address on disk Word 3: Starting address in core Word 4: length of transfer in words Event Variable address / 4-19 FORTRAN CALL: CALL_DSKGET(lCTA,lOA,NW,ARRAY[,lEV]) Variables: lCTA lOA NW ARRAY lEV Example: = Device Control Table (integer array). Array must be the same as that used to allocate the space from which the data is being read since this uses information in the Control Table obtained via DSKAL. Disk offset address. The relative position (in words) within an array at which the transfer from the disk is to begin. = Number of words (decimal) to transfer. = The name of the array where data is to be transferred. = Event Variable Allocate 512 decimal words of disk storage and later read in the last 256 decimal words into BUF. DIMENSION ICTA(3),BUF(256) CALL DSKAL (ICTA,512,IEV) CALL WAITFR(IEV) CALL DSKGET(ICTA,256,256,BUF,IEV) Example: This final FORTRAN example allocates 1024 words of disk storage, writes 256 words from four different arrays, later reads the last array of 256 words, and then deallocates the disk space and EXITs. COMMON BUF2(128) ,ICTA(3) ,BUF1(128) ,BUF3(128) ,BUF4(128) C C ALLOCATE 1~24 WORDS OF DISK STORAGE C CALL DSKAL (ICTA,1~24,IEV) CALL WAITFR (lEV) C C INSURE ALLOCATION WAS MADE C IF (lEV .GT. ~) GO TO 2~ C C STORAGE NOT ALLOCATED, TYPE MESSAGE & EXIT C l~ WRITE (3,1~) FORMAT (2~H ALLOCATION NOT MADE) CALL EXIT C C ALLOCATION MADE, WRITE OUT ARRAYS C 2~ CALL CALL CALL CALL CALL CALL DSKPUT (ICTA,~,256,BUF1,IEV) DSKCK (lEV) DSKPUT (lCTA,256,256,BUF2,IEV) DSKCK (lEV) DSKPUT (lCTA,512,512,BUF3,lEV) DSKCK (lEV) 4-20 C C READ IN LAST ARRAY FROM DISK C CALL DSKGET (ICTA,768,256,BUF4,IEV) CALL DSKCK (lEV) C C RELEASE DISK SPACE & EXIT C CALL DSKDAL (ICTA) STOP END 1~ 2~ SUBROUTINE DSKCK (lEV) CALL WAITFR (lEV) IF (lEV .LT. ~) GO TO 1~ RETURN WRITE (3,2~) FORMAT (llH DISK ERROR) CALL EXIT END 4-21 ATTACH 4.3.20 ATTACH generates a form of the QUEUE I/O Directive which requests the exclusive use of an I/O device. Once the Directive is accepted, no other Task may use the device regardless of priority. All requests by other Tasks, however, will be queued and processed whenever the device becomes free (DETACHED). overrides the ATTACH. -1,1, -1~2, -1~3, The REASSIGN MCR Function, however, Event Variables returned are: and -777. SYSTEM MACRO: ATTACH_LUN[,EV] variables: LUN EV Example: +1, -6, -24, = Logical = Unit Number (decimal) Event Variable Address Attach device assigned to LUN 32. ATTACH 32,ATEV FORTRAN CALL: CALL~TTACH(LUN[,IEV]) variables: LUN Im Example: = = Logical Unit Number Event Variable Same as above except in FORTRAN. CALL ATTACH(32,IEV) 4.3.21 DETACH DETACH generates a form of the QUEUE I/O Directive which releases a device from the exclusive of the issuing Task. use Previous requests which were queued by the I/O Handler Task while ATTACHed will now be processed. The Task issuing the DETACH Directive must be the Task which ATTACHed the device. -6, -1'1, -1~2, -1~3, Event Variables returned are: and -777. SYSTEM MACRO: DETACH_LUN[,EV] Variables: LUN EV = = Logical Unit Number (decimal) Event Variable Address 4-22 +1, Example: Detach device assigned to LUN 23. DETACH 23,DTEV FORTRAN CALL: CALL_DETACH(LUN[,IEV]) Variables: LUN lEV Example: = Logical Unit Number = Event Variable Same as above except in FORTRAN. CALL DETACH(23,IEV) 4.3.22 SEEK (OPEN FILE FOR INPUT) SEEK generates a form of the QUEUE I/O Directive which requests the I/O Handler Task assigned to the indicated Logical unit Number to search the device's file directory for a specified file name. This Directive is used to initiate file-oriented transfers using the READ Directive. Once the SEEK has been accepted by the I/O device, it effectively attaches the LUN to the issuing Task. Event Variables returned are: +1, -6, -l~, -12, -13, -l~l, SYSTEM MACRO: SEEK_LUN,FLNAM,EXT[,EV] Variables: LUN FLNM1 EXT EV Example: -1~2, -1~3, and -777. - Logical Unit Number = File name (1 - 6 characters) = File name extension (1 - 3 characters) = Event Variable Address Search the directory of the file-oriented device associated with LUN 6 for a file named DATA SRC. SEEK 6,DATA,SRC,EV FORTRAN CALL: CALL_SEEK(LUN,nHFLNAM,nHEXT[,IEV]) Variables: LUN n FLNAM EXT lEV Example: C = Logical Unit Number = Number of characters in file name or extension. = File Name (1 - 5 char ac ter s ) = File Name Extension (1 - 3 char ac ter s ) = Event Variable Same as above except in FORTRAN. CALL SEEK(6,4HDATA,3HSRC,IEV) WAIT FOR SEEK TO COMPLETE CALL WAITFR(IEV) 4-23 4.3.23 ENTER (OPEN FILE FOR OUTPUT) ENTER generates a form of the QUEUE I/O Directive which requests the I/O Handler Task assigned to the indicated Logical Unit Number to search the device's file directory for a free Directory Entry Block in which to place the file name specified. This Directive is issued prior to issuing a WRITE Directive to a file-oriented device. The actual recording of the file name does not occur until the CLOSE. Once the ENTER has been accepted by the I/O device, it effectively attaches the LUN to the issuing Task. +1, -6, -1~, -12, -14, -15, -1~1, Event Variables returned are: -1~2, -1~3, SYSTEM MACRO: ENTER_LUN,FLNAM,EXT[,EV] Variables: LUN FLNAM EXT EV Example: and -777. = Logical = = = Unit Number (decimal) File Name (1 - 6 characters) File Name Extension (1 - 3 characters) Event Variable Address Enter into the directory of the file-oriented device associated with LUN 6 the file name DATA SRC. ENTER 6~DATA,SRC,EV FORTRAN CALL : CALL_ENTER (LUN, nHFLNAH, nHEXT [ 1 lEV] ) Variables: LUN n FLNAM EXT lEV Example: = Logical Unit Number Number of characters in file name or extension. = File Name (1 - 5 characters) = File Name Extension ( 1 - 3 characters) = Event Variable Same as above except in FORTRAN. CALL ENTER(6,4HDATA,3HSRC,IEV) 4.3.24 DELETE DELETE generates a form of the QUEUE I/O Directive which requests the I/O Handler Task assigned to the indicated Logical Unit Number to remove the indicated file name from the device's file directory. Variables returned are: +1, --6, -l~, 4-24 -12, -l~l, -1~2, -1~3, Event and -777. SYSTEM MACRO: DELETE_LUN,FLNAM,EXT[,EVj variables: LUN FLNAM EXT EV Example: = Logical Unit Number (decimal) File Name (1 - 6 characters) File Name Extension (1 - 3 characters) = Event Variable Address = Delete the file DATA.SRC from the directory of the fileoriented device associated with LUN 6. DELETE 6,DATA,SRC,EV FORTRAN CALL: CALL_DELETE(LUN,nHFLNAM,nHEXT[,IEV]) variables: LUN n FLNAM EXT lEV Example: = Logical Unit Number = Number of -characters in file name or extension. = File Name (1 - 5 characters) File Name Extension (1 - 3 characters) Event Variable = Same as above except in FORTRAN. CALL DELETE(6,4HDATA,3HSRC,IEV) 4.3.25 CLOSE CLOSE generates a form of the QUEUE I/O Directive which instructs the appropriate I/O Handler Task that the issuing Task has completed an I/O operation to the named file which resides on the device. Once a CLOSE is issued, subsequent transfers to or from the CLOSEd file are not possible until an appropriate SEEK or ENTER is again issued. Variables returned are: +1, -6, -11, -12, -15, -1,0'1, -1~2, -1,0'3, and -777. SYSTEl"v1 MACRO: CLOSE _ LUN , FLNAM, EXT [ , EV] Variables: LUN FLNAM EXT EV Example: = Logical unit Number (decimal) = File Name (1 - 6 characters) = File Name Extension (1 - 3 characters) = Event Variable Address Close the file DATA SRC on the file-oriented device associated with LUN .6. CLOSE 6,DATA,SRC,EV FORTRAN CALL: CALL_CLOSE(LUN,nHFLNAM,nHEXT[,IEV]) 4-25 Event Variables: LUN n FLNAM EXT lEV Example: = Logical Unit Number = Number of characters in file name or extension. = File Name (1 - 5 characters) = File Name Extension (1 - 3 characters) = Event Variable Same as above except in FORTRAN. CALL CLOSE(6,4HDATA,3HSRC,IEV) 4.3.26 HANDLER INFORMATION This Directive provides rudimentary information about the physical device and the I/O handler associated with a particular Logical Unit Number (LUN). Handler information is coded into a single word, which is stored in the requestor's Event Variable as follows: Bit ~ UNUSED This bit is unused to allow a handler to return a value of -6 if this function was not implemented. Bit 1 INPUT Set to 1 if data can be input from the device to the computer. Bit 2 OUTPUT Set to 1 if data can be output from the computer to the device. Bit 3 FILE-ORIENTED Set to 1 if the I/O handler treats the device as being "file-oriented". A device is "file-oriented" if SEEK and ENTER are required prior to READ and WRITE, respectively. "File-oriented implies, but does not guarantee, the existence of a file directory or that the device is bulk or mass storage. ll Bits 4 thru 11 UNIT Bits 12 thru 17 DEVICE CODE Uni t number, These six bits allow up to 63 decimal devices (zero is not a legal device code). The codes listed below are fixed for standard DEC devices. Users should assign codes to their own devices starting with 63 and working towards lower numbers. 1 TT 2 OK 3 DP DT MT 4 5 4-26 The and The The The The TTY terminals (console, LTlS, LT19) RFlS fixed-head DECdisk RP~2 disk pack TC~2D DEC tape TCS9 MAGtape 6 PR CD PP LP VP VT 7 Iff 11 12 13 SYSTEM MACRO: HINF_LUN,EV variables: LUN EV FORTRAN CALL: CALL_HINF(LUN,IEV) Variables: LUN lEV " 3 2'7I 't. I = = = The The The The The The PClS Paper Tape Reader CR~3B Card Reader PClS Paper Tape Punch LPIS Line Printer VPlS Storage Scope VTlS Display Logical Unit Number (decimal) Event Variable Address Logical unit Number Event Variable DISABLE This Directive causes the Executive to render the specified Task incapable of responding to other Directives except ENABLE. is not deleted from the system. The Task If the Task is active, it will con- tinue to execute, however, schedule activations for that Task will be ignored when they come due. When the Task is subsequently ENABLEd, previously established rescheduling for the Task will continue in effect. Event Variables are: +1 and SYSTEM MACRO: DISABLE_TSKNAM[,EV] Variables: TSKNAM EV Example: -2~1. Name of Task (1 - 6 characters) Variable Address = Event Disable Task named SCAN. DISABLE SCAN.,EV FORTRAN CALL: CALL_DISABL(nHTSKN~i[,IEV]) variables: n TSKNAM lEV Example: Number of characters in Task Name - S characters) = Name of Task (1 = Event Variable Same as above except in FORTRAN. CALL DISABL(4HSCAN.,IEV) 4-27 4.3.28 ENABLE This Directive causes the Executive to restore the specified Task to its normal state (i.e., as it was before DISABLE was issuedj. Variables returned are: +1 and -2~1. SYSTEM MACRO: ENABLE_TSKNAM[,EV] Variables: TSKNAM EV Example: Event = Name of Task (1 - 6 characters) = Event Variable Address Enable Task SCAN which is currently disabled. ENABLE SCAN,EV FORTRAN CALL: CALL_ENABLE(nHTSKNAM[,lEV]) Variables: n TSKNAM lEV Example: = Number of characters in Task Name = Name of Task (1 - 5 characters) = Event Variable Same as above except in FORTRAN. CALL ENABLE(4HSCAN,IEV) 4.3.29 FIX This Directive instructs the system to load an inactive Task into an available partition. The Task is not executed, but is fixed-in-core and may therefore respond rapidly to a request for execution. does not wait for a Task to be loaded before setting EV to +1. Directive may not be issued to an active Task. turned are: +1, -2gl, -2~2, -2~4, -2~7, and SYSTEM MACRO: FlX_TSKNAM[,EV] Variables: TSKNAM EV FORTRAN CALL: CALL_FlX(nHTSKNAM[,IEV]) = Name = The Event Variables re- -21~. of Task (1 - 6 characters) Event Variable Address 4-28 FIX Variables: = Number of characters in Task Name n TSKNAM lEV 4.3.30 = Name of Task (1 = Event Variable - 5 characters) UNFIX This Directive instructs the Executive to nullify a FIX Directive thereby freeing a partition for use by other Tasks. If UNFIX is issued to a Task which is currently running, the Task will be allowed to run to completion before the Directive becomes effective. returned are: +1, -2~1, and Event Variables -2~7. SYSTEM MACRO: UNFIX_TSKNAM[,EV] Variables: TSKNAM EV FORTRAN CALL: CALL_UNFIX(nHTSKNAM[,IEV]) Variables: = Number of characters in Task Name n TSKNAM = Name ·of Task (1 - 5 characters) lEV = Event Variable 4.3.31 = = Name of Task (1 - 6 characters) Event Variable Address DECLARE ASIGNIFICANT EVENT The DECLAR Directive provides the means for declaring to the Executive that a Significant Event has occurred. The occurrence of a Significant Event signals the Executive to initiate a scan of the Active Task List with control passing to the Task having the highest priority. DECLAR is particularly useful for intertask signalling and synchronization. SYSTEM MACRO: DECLAR FORTRAN CALL: CALL DECLAR 4.3.32 TIME The TIME System .r.1acro and FORTRAN subroutine obtain the time of day from the Executive's internal clock and deposit these values in three 4-29 locations specified by the issuing Task. SYSTEH MACRO:· TIME _ Hr ,r.1:in f Sec = Hours (~ = Minutes (fJ = Seconds (~ - Variables: Hr Min Sec FORTRAN CALL: CALL_TIME (ITIME) variables: ITIME 4.3.33 = Three 23) 59) 59) word Integer array as follows: ITIME(l) = Hours (fJ - 23) ITIME(2) = Minutes (~ - 59) ITIME(3) = Seconds (~ - 59) DATE The DATE System Macro and FORTRAN subroutine obtain the current time (hours, minutes, and seconds) and date (month, day, and year) from the Executive's internal clock and calendar. The values obtained are de- posited in six locations specified by the issuing Task. SYSTEM }1ACRO: DATE_Hr,Min,Sec,Mon,Day,Yr variables: Man Day Yr Hr Min Sec Note: = = = = Month Day Year Hours Minutes Seconds The month and day reversed in European format. FORTRAN CALL: CALL_DATE (IDATE) Variables: IDATE 4.3.34 (1 - 12) (1 - 31) (fJ - 99) ($1 - 23) (fJ - 59) (fJ - 59) = Six word Integer array I DATE (1) = Month IDATE(2) = Day I DATE (3) = Year IDATE(4) = Hours IDATE(5) = Minutes IDATE (6) = Secnnds as follows: (1 - 12) (1 - 31) (fJ - 99) (fJ - 23) ($1 - 59) (fJ - 59) INTENTRY The INTENTRY System Macro results in an entry to the Executive's Register 4-30 Save Routine. The Save Routine obtains the current contents of all active system registers, including the AC, Index and Limit Registers, first four Autoincrement Registers, and deposits them in a save area created by the Macro Assembler during expansion of the System Macro. This Directive may only be issued from within an interrupt service routine and must be the first instruction of the interrupt routine. The saved registers are restored by execution of the INTEXIT Directive. Appendix E provides a listing of all registers which are saved. SYSTEM MACRO: INTENTRY CL Variable: CL FORTRAN CALL: Example: 4.3.35 = Interrupt service routine entry address. (connect location) No subroutine is provided to implement this since FORTRAN is not an appropriate language for writing interrupt handling routines. See example in next section (4.3.35) INTEXIT The INTEXIT System Macro results in an entry into the Executive's Register Restore Routine. This routine restores all active registers saved by the INTENTRY Directive, Debreaks, and returns to the interrupted Task. INTEXIT may only be issued from within an interrupt service routine. SYSTEM MACRO: INTEXIT CL Variable: CL FORTRAN CALL: Example: = Interrupt service routine entry address (connect location) No subroutine is provided to implement this since FORTR~N is not an appropriate language for writing interrupt handling routines. An interrupt service routine named ADINT for an AID Converter is to use the INTENTRY and INTEXIT System Macros. 4-31 /MUST BE PLACED AT THE ENTRANCE / TO THE INTERRUPT ROUTINE. INTENTRY ADINT /SECTION TO SERVICE INTERRUPT. INTEXIT ADINT /RESTORE REGISTERS, DEBREAK, / AND RETURN TO INTERRUPTED / TASK. 4-32 CHAPTER FIVE TASK BUILDER 5.1 INTRODUCTION The TASK BUILDER program, TKB, is an ADVANCED Software System's program used to build user's Tasks from relocatable binary files. TKB is quite similar to the CHAIN program allowing very elaborate overlay structures to be built. The process of Task building is one where relocatable binary files are linked together along with library functions to constitute an executable Task that runs under the control of the Real-Time Monitor (RSX-l5). A resultant Task is defined by its name (Task name), default run priority, core partition and common block requirements, and resident code. Once a Task has been built it may be incorporated into the real-time operating system under control of the Real-Time Monitor from DECtape or paper tape. 5.2 TASK BUILDER DESCRIPTION The following description of TKB assumes the reade.r has a thorough understanding of the ADVANCED' Software System CHAIN* program since only *TKB and CHAIN have identical Input/Output Device Assignments and loading procedures. (See CHAIN & EXECUTE Manual DEC-l5-YWZA-DN2) 5-L minor differences exist between the two. Only areas which are not part of the CHAIN program will be amplified in this section. Answers to all questions, as for the CHAIN program, must end with an ALT MODE. LIST OPTIONS SZ to output size in load maps, GM to output Global Symbol & File names instead of program names in load maps, NM for no load map, and PAR & PAL for pause after outputting resident code and pause after outputting each Link. NAME TASK Identical to NAME XCT FILE in CHAIN. SPECIFY DEFAULT PRIORITY This is the default priority of the Task which will be assumed at INSTALL time. Default priority is optional and can be any number from 1 (highest priority) to 512 (lowest priority). DESCRIBE PARTITION This is the name of the core partition in which the Task is to be executed. The form of the partition description is: NAME(BASE ADDRESS,SIZE). The NAME is the name of a Partition defined in the RSX System, BASE is the octal start address of the partition, and SIZE is the size of the partition which the Task is to occupy. DESCRIBE SYSTEM COMMON BLOCKS These are the names of the Common Blocks which are referenced by the Task but are common to all Tasks in the RSX System. The form of the Common Blocks is: NAME(BASE ADDRESS,SIZE). NAME is the name of the Common Block defined in the RSX System, BASE is the octal start address of the CornmonBlock, and SIZE is the maximum size of the Co~~on Block in which data is to be placed. Additional Common Block descriptions (maximum of four) may be specified by separating the descriptions with commas. Blank and Named Common declared in FORTRAN programs will be included in the Task's partition block if not specified in a DESCRIBE SYSTEM COMMON BLOCKS description. Blank Common assumes the default name of .XX. DEFINE RESIDENT CODE Identical to CHAIN program. DESCRIBE LINKS & STRUCTURE Identical to CHAIN program. 5-2 5.3 EXAMPLE USING THE TASK BUILDER fC ~,n19-1 $,1\ 5 V5 A DKI -4/DTl -6 $TK3 TAS~ 8UILDER VIA LIS T OPT! or,ls >SZ NM1F: T ASl{ >5Urvt SP~CIFY DEFAULT PRIORITY >40 DESCRIDE PARTITION >P40.0(40000,1500121) DESCRI3E SYSTEM COMMON BLOCKS > F'LA G( 36200,6(20) DEFINE RESIDENT CODE > r1 AIN, F 1 , F' 2, r·1 AC DESCRIBE LINKS & STRUCTURE > 40020-40047 40050-40117 F2 40120-40255 40256-40303 ~iAC WAF'F.l 40304-40316 DSGF'.240317-4121360 EXIF.l 40361-40363 40364-40432 • DA 4121433-40501 • DAA BCDIO 40502-43537 43540-43617 .ss 5TO.3 43620-43631 F'I 0.3 4,3632-44311 ,)TS.5 44312-44440 • sP. 3 44441-4456121 INTEAE 44561-44674 RELEAE 44675-45736 45737-45756 .CB it;AIN FI 00030 00050 00136 019026 0121013 0121042 121121003 121012147 00047 0312136 121006121 121012'12 0046121 1210127 0012121 12121114 01042 1210020 BLMJK CDr1MON .xx 45757-46266 012131121 CORE REQ':D 41211210121-46266 06267 $ 5-3 fC XM9-15 V5 A $A DK1 -4/DTI -6 $TKB TASK BUILDER VIA LIST OPTIONS >SZ NAME TASK >STORE SPECIFY DF.FAULT PRIORITY >35 DESCRIBE PARTITION >P40.0(40000,15000) DESCRIBE SYSTEM COMMON BLOCKS > FLA G( 36200,6(0) DEFINE RESIDENT CODE >STORE DESCRIBE LINKS & STRUCTURE > STORE 40020-40317 00300 WAFF.I 40320- 4033 2 00013 RUNF.2 40333-4~404 00052 EXIF.l 42405-40407 00003 DSAF.2 40410-40433 00024 DSPF.2 43434-40475 00042 F'TS.2 40476-40543 00046 40544-40617 00054 • Be 406221-407110 00071 • EE 40711-41026 00116 • EF' 41027-41072 00044 • EC 4 10'73- 41 14 1 00047 • DA 4 1 142- 41 21 0 00047 • DAA BCDIO 4 121 1- 44 246 03036 44241-44326 00060 • SS STO.3 44321-44340 001012 Fla.,) 44341-45020 00460 OTS.5 45021-45141 00121 • SP. ,) 45150-45261 2101221 INTEAE 4527~-454eJ3 210 11 4 RELEAF. 45404- 46445 01042 46446-46465 00020 .en RL~Nl{ • xx Cm1MON 46466-47000 00313 CORE REQ'D 412000-41000 01001 KW:~-15 V5 ~ S 5-4 CHAPTER SIX SYSTEM CONFIGURATOR 6.1 INTRODUCTION The RSX-15 System is supplied on DECtape (RSX COLD START MASTER TAPE) with each PDP-15/35 computer as a very generalized software package. The Master Tape of the system consists of the RSX Executive, MultiTeletype Handler, Disk Handler, Monitor Console Routine(MCR) Func- tion Tasks, and one running Task called the SYSTEM CONFIGURATOR. The SYSTEM CONFIGURATOR enables the user to tailor his software to fit his requirements. The SYSTEM CONFIGURATOR allows the user to specify core size, disk size, number of Teletypes, clock frequency, Partition descriptions, system units. COW~ON Block descriptions, and a description of peripheral I/O Partitions and COMMON Blocks may be defined anywhere between the top of the Executive (over the SYSTEM CONFIGURATOR) thru the top of core (as long as they do not overlap each other). Partition Blocks and the "Pool of Empty Nodes" are constructed in core above the 8K that has not been defined as a part of a Partition or COMMON Block. 6-1 After the Pool and Partition Blocks have been constructed, all Tasks recorded on DT-~ are installed. that can be installed in the newly configured system, After installation from DT-~, the number of empty nodes in the Pool is typed out, and the system is left running. 6.2 INSTALLING THE RSX SYSTEM When the user receives the RSX COLD START MASTER TAPE he should perform the following steps to configure the RSX Software to best fit his needs and requirements: 1) Mount the RSX COLD START MASTER TAPE onto DECtape unit zero (WRITE LOCK). 2) Read into location ~~~~~ the RSX DECTAPE BOOTSTRAP from the High Speed Paper Tape Reader. This will cause the Cold Start image to be read in from the Master Tape and the SYSTEM CONFIGURATOR started. 3) Answer all questions asked by the SYSTEM CONFIGURATOR (See section 6.3). 4) When the system configuration has completed* and the message "MCR> " is printed on the console Teletype, the user should install his own Tasks into the system and issue the "SAVEll MCR Function command to save an image of the new system on the disk. 5) To make a backup copy of the system, mount scratch tapes on DECtape units one and two (one at a time if only a limited number of DECtapes are available) and read into location ~~~~~ the "DISK TO DECTAPE" from the High Speed Paper Tape Reader to copy an image of the disk(s) onto the DECtapes. This backup system can be restored by reading in "DECTAPE TO DISK" from the High Speed Paper Tape Reader. NOTE: Two DECtapes are required for each disk unit saved. Writing begins on DECtape unit one- for the first half of the first disk and automatically transfers to DECtape unit two when unit one is filled. This process is automatically repeated (from DECtape one to two) until all disks have been saved. (Rewinding and unloading DECtapes between save/restore operations is performed by the save and restore programs.) A similar procedure is used to restore the system from DECtape to disk. The tapes may be restored in any order with transfer beginning from DECtape unit one and continuing with DEC tape unit two. Each DECtape will contain l3l,~721~ disk words followed by a descriptor block. * The SYSTEM CONFIGURATOR is a one-time Task that automatically removes itself once the system has been configured. 6-2 6) Read into location ~~~~~ the RSX DISK (WARM START) BOOTSTRAP from the High Speed Paper Tape Reader. This will cause the restored RSX System to be brought in from the disk and the message "MCR>" to be printed on the console Teletype. The System is now ready to accept commands from the user. 6.3 STEP BY STEP SYSTEM CONFIGURATION PROCEDURE QUES.!ION ANSWE~ SPECIFY CORE SIZE> 16K, 2~K, 24K, 28K, or 32K (SiZe of user's core memory) SPECIFY NUMBER OF DISK UNITS> 1 to 8 (Number of physical disk units) SPECIFY NUMBER OF TTY'S> 1 to 17 (Number of Teletypes connected to the system.) SPECIFY NUMBER OF CLOCK TICKS PER SECOND> 1 - l~~~ (This is the line frequency used to set the Real-Time Clock frequency in the RSX Executive, and will normally be 5~ or 6~.) DEFINE PARTITIONS ilNAME(BASE,SIZE)1I These are the names (NAME) of all partitions in the System along with their base addresses (BASE) and sizes (SIZE). A line with only a terminator (carriage return or ALTMODE) will terminate the response. DEFINE SYSTEM COMMON BLOCKS "NAME(BASE,SIZE)" These are the names of COMMONs to be used for inter-task communication or extra-task data storage. Core is permanently allocated and these COMMONs are always available. The Names, Base Addresses, and Sizes are specified. A line with only a terminator (carriage return or ALTMODE) terminates the response. SPECIFY DEVICE NAMES AND UNIT NUMBERS (ONE PER LINE) List only devices which will be used by the user. Device names are two characters in length followed by a unit number. (The Teletypes and Disk are specified in the system.) The following are names of devices for which liO Handler Tasks are supplied with the system: LP = Line Printer DTn = DECtape (n=~ to 7) PR = High Speed Paper Tape Reader PP = High Speed Paper Tape Punch A line with only a terminator (carriage return or ALTMODE) terminates the response. 6-3 INSTALLATION OF TASKS FROM DTi This process requires no response from the user. All Tasks on DTi that can be installed, are installed in the System at the default priority defined at Task Building time. When all Tasks have been installed 1 the CONFIGURATOR continues with: nnnnn NODES IN POOL This is the number (nnnnn) of empty nodes (in decimal) in the POOL available for queueing and scheduling. The CONFIGURATOR continues with: SYSTEM IS RUNNING This indicates to the user that the system is running and the Resident MCR responds by typing "MCR>". The System is now ready to accept user's commands from the console Teletype. 6-4 6.4 EXAMPLE OF ASYSTEM CONFIGURATION PROCEDURE RSX SYSTEM CONFI GURATI ON SP~CIFY CORE SIZ~ >24K SPECIFY NUMBER OF DISK UNITS >1 SPECIFY NUMBER OF TTY'S >4 SPECIFY NUMBER OF CLOCK TICKS PER SECOND >60 PARTITIONS "NAME(BASE,SIZE)" >f1CR( 10000,1600) >10.1(11600,3000) >10.2(35200,1000) >P14.6(14600,3200) >P21.0(21000,5500) >P26.5C26500,6500) >P40.0(40000,15000) DEFIN~ > DEFINE SYSTEM COMMON BLOCKS >.XXC20000,700) >FLA GC 36200,600) "NAMECBASE,SIZE)" > SPECIFY DEVICE NAMES & UNIT NUMBERS (ONE PER LINE) >DT0 >DTI >DT2 >DT3 >PR >P? > INSTALLATION OF TASKS FROM DT-0 00171 NODES IN POOL SYSTEM IS RUNNING IV;CR>SAVE 6-5 6.5 DESCRIPTION OF SYSTEM CONFIGURATOR ERROR MESSAGES ttt WOULD OVERFLOW ADJACENT AREAS -- RETYPE A Partition and/or COMMON Block has overflowed in an adjacent area. The user must redefine the COMMON or Partition. ttt SYNTAX ERR AT IiX Il -- RETYPE The illegal character "Xii was found in the command string, retype the line. ttt INVALID SIZE -- RETYPE Illegal core size. Must be either 16K, 20K, 24K, 28K, or 32K. ttt INVALID, NUMBER -- RETYPE Illegal number of disk units, Teletype units, or clock frequency setting. ttt NAME ALREADY USED -- RETYPE The name of the Partition or COMMON Block is already defined in the system. Partitions and COMMON Blocks may not have the same name. ttt DEVICE NAME/UNIT ERR -- RETYPE Device name and unit already defined. *** DISK READ ERR A disk read error has occurred. The system will halt and wait for the user to manually depress the continue switch to retry the disk read. *** DISK WRITE ERR A disk write error has occurred. The system will halt and wait for the user to manually depress the continue switch to retry the disk write. *** RE-ENTRANT ECO PACKAGE NEEDED The user's machine does not have the RE-ENTRANT ECO PACKAGE required to run RSX. Contact your local field service office. *** INSUFFICIENT FREE CORE ~- RE-STRUCTURE Insufficient free core for storage of all Partition Blocks or out of nodes in the Pool. TASK "XXXXXX" NOT INSTALLED, TASK ALREADY IN SYSTEM The Task XXXXXX is already installed in the system. TASK IIXXXXXX II NOT INSTALLED, PARTITION NOT IN SYSTEM The Task XXX XXX was built for a partition which is not defined in the system. 6-6 TASK IIXXXXXX" NOT INSTALLED, TASK WOULD OVERFLOW PARTITION The Task XXXXXX is larger than the partition defined for it in the system. TASK "XXXXXX .. NOT INSTALLED, OUT OF DISK STORAGE The Task XXXXXX is larger than the amount of available Disk storage required to install the Task. TASK IfXXXXXX" NOT INSTALLED, INPUT CHECKSUM ERR An input checksum error occurred while installing Task XXXXXX from DECtape. TASK "XXXXXXiI NOT INSTALLED, INPUT PARITY ERROR An input parity error occurred while installing Task XXXXXX from DECtape. TASK IIXXXXXX Il NOT INSTALLED; SYSTEM COMMON BLOCK ERR COMMON Block not defined in system or COMMON Block BASE and/or SIZE specified incorrectly (to the Task Builder)~ TASK IIXXXXXX" NOT INSTALLED, READ ERROR An illegal DECtape block number was found or a DEC tape error exists. TASK lIXXXXXXlJ NOT INSTALLED, NO DEFAULT PRIORITY The Task XXXXXX was not given a default priority at Task Building time. The INSTALL MCR Function can be used to install the Task once System Configuration has completed. 6-7 CHAPTER SEVEN SYSTEM ORGANIZATION 7.1 INTRODUCTION The RSX System is organized into several units consisting of: The Executive, Partitions, Partition Blocks, System COMMON Blocks, several linked lists, and a pool of empty list nodes. The Executive, or heart of the system, lies entirely in the lower 4K memory bank and consists of the Resident MCR Task, Teletype and Disk I/O Handler Tasks, and assorted routines to properly carry out the functions of a real-time operating system. The remaining area of core memory is available for Partitions, Partition Blocks, System COMMON Blocks, and the Pool of Empty Nodes. The following sections describe the system in more detail. 7.2 RSX BOOTSTRAPS The RSX DECTAPE BOOTSTRAP is read in at location ~~~~~ and starts a DECtape to core transfer from tape block zero into core location 3~. The size of the image loaded is the same as the image that was recorded and is determined by the word count and current address registers 31. 3~ & This bootstrap is normally used to initiate a COLD START, but can also be used to initiate a WARM START of a system that does not use the disk. i.e., to load an image of a system where all Tasks have been 7-1 fixed-in-core. viz., an emergency system in case of disk failure. The RSX DISK (WARM START) BOOTSTRAP is a program used to restore a core image of the system (recorded by a SAVE MeR Function), from disk unit zero into core memory. The DISK bootstrap is read into location ~~~~~, clears the disk con- troller, and begins transfer starting from the beginning of disk zero and core location ~~~3~. memory has been restored. Transfer continues until the entire core When the system has been successfully re- stored, control is transferred to the address specified by Rl (absolute location 1~18 in the System Communications table) causing the system to be started. 713 ~SX n MEMORY MAP USAGE 16K+32K part~t~ons. ~I Partitions requiredA-______________________________ to install the _ .-1..0,d 116H~-,-IU~.l __ _ pre-built MCR & 10....3.. USU9.JU)- - - I/O Handler Task 10.1. 0:44.» ~U) _ supplied on the IO.l.. t!16.i~ t..Z6.YL __ Cold Start Image Tape. Normally, the I/O Handler Tasks are rebuilt to run in partiRSX EXECUTIVE tions that satisfy requirements of particular applications. Figure 7.1 ~ Part~t~on BIOCkS' COMMON Blocks, and the Pool of Empty Nodes. 8K Partitions and COMMON Blocks* 4K * Unspecified core space between Common Blocks and Partitions which exist between the RSX Executive and the 8K memory boundary is not used by the system. 7-2 7.4 SYSTEM DEQUES The RSX System uses linked lists, rather than tables, to maintain system information. These lists are linked together as Double Ended Queues called deques. Each deque consists of a listhead and list. elements, or nodes, circularly linked by both forward and backward pointers. The first word of a node or listhead is a forward pointer containing the address of the next node (or the listhead) looking forward. The second word of a node or listhead is a backward pointer containing an address of the previous node (or the listhead) looking backward. The listhead consists of only the two pointers. All nodes in a deque consist of the two pointers followed by eight words of data. Some of the major deques used in the RSX System are the Active Task List (ATL), the System Task List (STL), the Clock Queue, and the Physical Device List (PDVL). Figure 7.2 Figure 7.3 A three node deque An empty deque 7-3 7.4.1 POOL During System Configuration, core which has not been specified by the user for other purposes (viz., Partitions and CO~10N Blocks), is divided into ten-word blocks (empty ten-word nodes) and linked together forming a deque called "The Pool of Empty Nodes!! or HPoolll. When a node is needed to expand a list, it is taken ("Takenll implies changing the node pointers, not moving ten words of data) from the Pool. 7.4.2 When a node is no longer needed, it is returned to the Pool. THE SYSTEM TASK LIST (STL) The System Task List (STL) is a directory of Tasks in the system. The STL is a de que consisting of one node for each Task currently in the system. An STL node has the following format: Word 0 Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 10 Word 11 Forward pointer Backward pointer Task name (first half in .SIXBT) Task name (second half in .SIXBT) Flags and Default priority Partition Block Address Disk address of Task image Size of resident image Disk storage allocated Task entry point Word 4, the Flags and Default priority, has the following bit designations: Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bits 6 - set when the Unused set when the set when the Unused Unused 17 -- Task's Task is active Task is disabled Task is "FIXed in Core" default priority Word 6, the Disk address, contains the disk unit number in bits 15-17. Nodes are added to the STL whenever a Task is INSTALLed into the system, and deleted from the STL when a Task is REMOVEd from the system. 7-4 7.4.3 THE ACTIVE TASK LIST (ATL) The Active Task List (ATL) is a priority ordered list of Active Tasks. The ATL is a de que consisting of one node for each Active Task in the system. An ATL node has the following format: Word 0 Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 10 Word 11 Forward pointer Backward pointer Task name (first half .SIXBT) Task name (second half .SIXBT) Task run priority Partition block address STL node address Task status indicator Start or resumption address Event variable address The ATL is ordered by the priority of the Active Tasks and is used to drive the system. The order in which Tasks are considered is determined by scanning the list, and the action to be taken is determined by examining the Task status word. There are six levels of status, each of which is described below: Status 1: Task image is on the disk. If its partition is available, flag partition unavailable and proceed to status two; otherwise, service next Task in ATL. . Status 2: Task image is on the disk and the partition is available for its use. Queue disk read request with Event Variable in ATL (Word 11) and proceed to status three. Status 3: Waiting for an Event Variable. If the Event Variable, whose address is in the ATL, is non-zero, proceed to status four; otherwise service next Task in the ATL. Status 4: Task is ready to environment will tive, set status (Status four may be started or resumed. In order that its be saved if it is interrupted by the Execufive, and start or continue Task execution. be set by the WAIT or RESUME Directives.) Status 5: Task has been interrupted by the Executive (environment saved in partition block). Restore environment and return control to Task. Status 6: Task has been suspended. SUSPEND Directive.) 7.4.4 (Status six is set only by the THE CLOCK QUEUE The Clock Queue is a deque consisting of one node for each item to be 7-5 done at some time in the tuture. These items are: scheduling of T~sks (SCHEDULE, RUN, and SYNC Directives), rescheduling of Tasks (Clock interrupt service routine), and setting of Event Variables after elapsed time periods (MARK Directive). The nodes are linked in the order in which they come due, and have the following format: Word 0 Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 10 Word 11 Forward Pointer Backward pointer Type indicator (TS,MT) Unused Run priority (TS) or Event Variable address (MT) STL node address (TS) or zero (MT) Schedule interval seconds (TS,MT) Schedule interval ticks (TS,MT) Reschedule interval seconds (TS) Reschedule interval ticks (TS) TS MT Task Scheduling usage Mark Time usage Word 2, the Type indicator, is set as follows: o 1 5 6 The schedule Task Task Mark Null scheduling with no rescheduling scheduling with periodic rescheduling time request node (result of cancellation) interval in all nodes, except the first node, is relative to the previous node. The schedule interval in the first node is relative to "now" and is decremented and examined at each clock tick. Two- words are used to record the schedule interval: II-schedule ticks" and "schedule seconds". The schedule ticks is only zero when a node is to come due at the same time as the previous node and is never greater than the number of ticks per second. When an interval of more than one second is represented, the schedule seconds indicates the number of additional whole seconds. The "reschedule ticks" and "reschedule seconds" are the schedule interval reset values when periodic Task rescheduling has been requested. 7.4.5 THE PARTITION BLOCKS DESCRIPTION LIST (PBDL) Partition Blocks serve three functions: (1) They contain partition description information to assure that a Task being installed into the 7-6 system has been built for an existent partition; (2) they provide core for an Event Variable and disk GET (DSKGET) control table necessary to load Tasks into partitions; and (3) they provide for saving a Task's environment when it is interrupted by the Executive. The Partition Blocks are generated by the System Configurator and are linked together into a deque called the Partition Blocks Description List with abnormal nodes having the following format: Word Word Word Word Word Word Word Word 0 1 2 3 4 5 6 7 Word Word Word Word Word Word Word Word Word Word Word Word Word Word Word Word Word Word Word Word 10 11 12 13 14 15 16 17 20 21 22 23 24 25 26 27 30 31 32 33 7.4.6 Forward pointer Backward pointer Partition name (first half .SIXBT) Partition name (second half .SIXBT) Partition base (address) Partition size Flags word (bit ~ indicates partition is occupied) Register save routine entry point (operand address for wd. 12) Interrupt connect location (JMS here upon interrupt) DBA instruction JMS* .-3 instruction (transfer to save routine) AC buffer XR buffer (Words 15 thru 21 are used by LR buffer the Executive during status two MQ buffer SC butfer. and three to store the disk read Event Variable and Control Rl buffer Table) R2 buffer (Rl thru R6 are pseudo registers R3 buffer used by re-entrant system R4 buffer routines) R5 buffer R6 buffer (XIO thru X13 are autoincrement X10 buffer registers 10 thru 13) Xll buffer X12 buffer X13 buffer (CAL return parameters) L20 buffer SKP is an indicator to the SKP register save routine to transfer control to the Executive (NOP indicates transfer to an interrupt service routine). THE PHYSICAL DEVICE LIST (PDVL) When a logical I/O unit is assigned to a physical unit, the address of a node describing the device and unit is set in a logical unit table entry corresponding to the Logical unit Number (LUN). These nodes are constructed by the System Configurator and linked together into a deque 7-7 called the Physical Device List. Each PDVL node has the following format: Word 0 Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 10 Word 11 7.4.7 Forward pointer Backward pointer Device name (first half .SIXBT) Device name (second half/always zero) Device Attach flag Unit number Device request queue (deque listhead) forward pointer Device request queue (deque listhead) backward pointer Trigger Event Variabl~ address Assign inhibit flag THE SYSTEM COMMON BLOCK DEFINITION LIST (SCDL) The System COMMON Block Definition List (SCDL) is a deque built by the System Configura tor consisting of a description of each COMMON Block in the System. Word 0 Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 10 Word 11 An·SCDL node has the following format: Forward pointer Backward pointer COMMON Block name (first half .SIXBT) COMMON Block name (second half .SIXBT) Unused Base of COMMON Block (address) Size of COMMON Block Unused Unused Unused 7.5 INPUT/OUTPUT OPERATIONS Input/Output operations in the RSX System are device independent, with I/O requests being made to Logical Device Units rather than Physical Device Units. Logical Units are equivalenced to Physical Device Units via a Logical Unit Table (LUT). The LUT is a block of contiguous core with a one word entry, or slot, for each LUN. LUN slots are designated sequentially from one and will contain a zero if unassigned (assigned to NONE). The LUT is maintained by the REASSIGN MCR Function. Physical Device Units are represented by nodes in a deque called the Physical Device List (PDVL). When a LUN is assigned to a Physical 7-8 Device Unit, the corresponding LUT slot contains the address of the appropriate Physical Device List node. Corresponding to the LUT is an Attach-Flag-Table (AFT) with a two word entry for each LUT slot. Whenever a LUN is attached to a Task, the Task name is set in the corresponding AFT slot. Whenever a LUN and Device Unit are both attached to a Task, the Device attach flag in the PDVL points to the appropriate AFT slot. 7.5.1 I/O HANDLER TASK INITIALIZATION All I/O Handlers are RSX Tasks and are called I/O.Handler Tasks (IOHT's). They differ from most other Tasks in that they contain an interrupt service routine and that a naming convention exists.* When a LUN is assigned to a Physical Unit, the appropriate I/O Handler Task is REQUESTed (by the REASSIGN MCR Function). The Handler Task then initializes itself and instructs the system (using the WAITFOR Directive) to suspend its execution until its Trigger Event Variable is set. Handler Task initialization consists of CONNECTing to an interrupt line and setting the address of the Task's Trigger Event Variable in the corresponding Physical Device List node(s). A Handler Task normally services all Units of a Device. 7.5.2 I/O REQUESTS I/O requests are made using the QUEUE I/O Directive. This Directive expects to find a PDVL node address in the LUT slot indicated by the LUN, and a Trigger Event Variable address in the PDVL node. If the LUT slot contains a zero, the request is rejected because the LUN has not been assigned to a Physical unit~ If the Trigger Event Variable address is zero, the request is rejected because not yet been initialized. * See section 8.5 t~e Handler Task has If the LUT slot and Trigger Event Variable 7-9 address have been set, a request node is formed and inserted into a request queue, and the Handler Task is "triggered" by setting the Trigger Event Variable and declaring a Significant Event. If a Handler Task is triggered while it is servicing a request, the trigger is ignored; however, if a Handler Task is idle, the trigger will bring it back into service. There are separate I/O request queues for each Physical Device Unit. These queues are deques with their listheads in the PDVL nodes for the physical units. Requests are normally serviced in order of priority by simply picking up the front node from the request queue. I/O requests are processed at API level 7 and are de-queued by priority of the requestor (software priority 1-512) with the highest priority request at the front of the deque. Requests of equal priority are inserted in the order that the requests were made. If a Physical Device Unit is ATTACHed, only requests from the Task that issued the ATTACH will be serviced, however, I/O requests from all Tasks are queued. When the DETACH request is serviced, pending I/O requests from other Tasks in the queue will then be serviced. The QUEUE I/O Directive allows an I/O requestor to specify an Event Variable to be set to indicate the status of a request. If a request cannot be queued, the requestor's Event Variable is set to one of the following negative values: -1,1 -1,2 -1,3 -777 Illegal LUN not Handler Request (out of range) LUN assigned to a physical unit not resident and initialized node not available (pool empty) If a request is queued, the requestor's Event Variable is zeroed to indicate that the request is pending and the Handler Task will set it non-zero. If a Handler Task cannot successfully complete a request, it will set the requestor's Event Variable to a negative value. (See Appendix D for a complete list of returned Event Variables. 7-10 When an I/O request is successfully completed, the requestor's Event variable is set positive, normally to one (+1). 7.5.3 liD FUNCTIONS The following is a description of CAL Parameter Block operands for the QUEUE I/O Directive. The FUNCTION CODE WORD contains the CAL Function Code for the QUEUE I/O Directive I/O Function code in bits 3-11. (,,> in bits 12-17 and the An Event Variable address of zero implies " no Event Variable specified". ALLOCATE, DEALLOCATE, GET, and PUT are device dependent functions, and the address of a table of control information is a part of the request, i.e., the Control Table is not queued. ALLOCATE (4 words) FUNCTION CODE WORD (1500) EVENT VARIABLE ADDRESS LOGICAL UNIT NUMBER CONTROL TABLE ADDRESS DEALLOCATE (4 words) FUNCTION CODE WORD (1600) EVENT VARIABLE ADDRESS LOGICAL UNIT NUMBER CONTROL TABLE ADDRESS ATTACH (3 words) FUNCTION CODE WORD (2400) EVENT VARIABLE ADDRESS LOGICAL UNIT NUMBER DETACH (3 words) FUNCTION CODE WORD (2500) EVENT VARIABLE ADDRESS LOGICAL UNIT NUMBER READ (6 words) FUNCTION CODE WORD (2600) EVENT VARIABLE ADDRESS LOGICAL UNIT NUMBER CORE BUFFER ADDRESS BUFFER SIZE (max words transferred) WRITE (5 words) FUNCTION CODE WORD (2700) EVENT VARIABLE ADDRESS LOGICAL UNIT NUMBER DATA MODE INDICATOR CORE BUFFER ADDRESS 7-11 GET (4 words) FUNCTION CODE WORD (3000) EVENT VARIABLE ADDRESS LOGICAL UNIT NUMBER CONTROL TABLE ADDRESS PUT (4 words) FUNCTION CODE WORD (3100) EVENT VARIABLE ADDRESS LOGICAL UNIT NUMBER CONTROL TABLE ADDRESS SEEK (6 words) FUNCTION CODE WORD (3200) EVENT VARIABLE ADDRESS LOGICAL UNIT NUMBER FILE NAME (first half) FILE NAME (second half) FILE NAME EXTENSION ENTER (6 words) FUNCTION CODE WORD (3300) EVENT VARIABLE ADDRESS LOGICAL UNIT NUMBER FILE NAME (first half) FILE NAME (second half) FILE NAME EXTENSION CLOSE (3 words) FUNCTION CODE WORD (3400) EVENT VARIABLE ADDRESS LOGICAL UNIT NUMBER DELETE (6 words) FUNCTION CODE WORD (3500) EVENT VARIABLE ADDRESS LOGICAL UNIT NUMBER FILE NAME (first half) FILE NAME (second half) FILE NAME EXTENSION HINF (3 words) FUNCTION CODE WORD (3600) EVENT VARIABLE ADDRESS LOGICAL UNIT NUMBER The following Control Table foromats are expected by the Disk Driver: ALLOCATE (3 words) REQUIRED STORAGE (IN WORDS) DISK UNIT* TRACK & HEAD* * Set by the Disk I/O Handler, not the requestor. 7-12 DEALLOCATE (3 words) STORAGE ALLOCATED DISK UNIT TRACK & HEAD GET (4 words) DISK UNIT TRACK & HEAD CORE ADDRESS WORD COUNT PUT (4 words) DISK UNIT TRACK & 'HEAD CORE ADDRESS WORD COUNT 7.5.4 HANDLER TASK EXIT When there are no Logical Unit Numbers assigned to a physical device, the REASSIGN MCR Function sets the lIassign inhibit flag" and clears the Trigger Event Variable address in the Physical Device List node for each unit of the device and inserts an EXIT request in the I/O queue for one of the device's units. The Handler Task services the EXIT request by: 1) DISCONNECTing from an interrupt line, 2) clearing the assign inhibit flag, and 3) EXITing. 7.5.5 DISK STRUCTURE A disk unit (platter) in the RSX System contains a total of 262,144 decimal words which is divided into 2g48 decimal blocks of 128 decimal words each for purposes of storage allocation. dressable for data transfer purposes. The disk is word ad- Recorded on each disk platter is a bit map that indicates which areas of the disk are free (to be ALLOCATEd) and those which are reserved These maps are initialized (cleared) by the System Configurator indicating that all blocks· are free. Bit maps consist of 128 decimal words • Excluding one bit map block per platter and save area on platter zero. 7-13 (1 disk block) beginning at location 7776JJ a on each platter. Each word in the bit map represents 16 decimal consecutive blocks. Bits 16 & 17 of the PDP-1S word are unused. A J-bit indicates a block is free and a l-bit indicates it is occupied. Since there may exist up to 8 disk platters, it is possible for an ALLOCATE request to require 9 disk transfers (approximately seconds). 3~~ milli- To prevent holding off high priority disk requests for this length of time, the Disk handler consists of two Tasks: "DSK", the Disk Driver, and "DSA", a lower priority Task that handles Disk ALLOCATE/DEALLOCATE requests. Whenever "DSK" encounters an ALLOCATE or DEALLOCATE request in its I/O request queue, it simply moves the request node from its own queue to another queue belonging to "DSA". Then it sets IIDSA's" trigger event variable and declares a significant event so that "DSA" will run ("DSA "DSK tJ runs at a priority level lower than II 7.5.6 ). 1/0 DATA NODES The following I/O data modes are supported in the RSX System: IOPS BINARY IMAGE BINARY lOPS ASCII IMAGE ASCII (mode ~) (mode 1) (mode 2) (mode 3) The data modes, including line buffer construction, have identical meanings to those used in the ADVANCED Software System (see PDP-lS ADVANCED Software System Monitors Manual section 2.2 and 2.3). I/O Handler Tasks provided by DEC are listed below along with the data modes each is capable of handling: DT DK All -- None* * Data modes do not apply to the GET and Put functions. 7-14 LP TT PP PR 7.5.7 lOPS ASCII & IMAGE ASCII lOPS ASCII & IMAGE ASCII All All INTERRUPT PROCESSING Interrupt processing under the RSX System consists of hardware interrupts having various levels of priorities. The hardware interrupts normally suspend the execution of other functions in the System ineluding the Executive; however, the Executive delays the servicing of hardware interrupts while it is completing internal operations which cannot be interrupted. These operations are always short in duration and involve the updating of the various lists of system information maintained by the Executive. This delay is never greater than 30 usecs. Real-Time programs connect themselves to hardware interrupt lines with the use of System Directives; and when hardware interrupts occur on those lines, control is transferred by the hardware (API) directly to the interrupt service routines. Once an interrupt service routine has been entered, it can either save its active registers or use the Executive's Register Save and Restore routines to preserve the contents of the active system registers. The user, however, might or might not decide to save the registers of an interrupted Task depending on timing constraints. Some cases may only require the saving of the Accumu- lator (AC) which would be done by the interrupt service routine itself. The Executive's Save and Restore routines, however, save and restore several system registers including the Accumulator, Link, MQ, first four Autoincrement, Limit, and Index Registers. The decision whether or not to use the Executive's Save and Restore routines depends on two considerations. First, can the interrupt service routine tolerate delays incurred by using these routines (each operation requires about 7' usecs). Second, how many of the system's active 7-15 registers are used by the interrupt service routine? To illustrate the different methods the user can use for saving and restoring system registers, two examples are given. Example one illustrates an interrupt service routine which only requires saving the Accumulator, and example two illustrates the use of the Executive's Save and Restore routines when several registers are required in the interrupt service routine. Example 1: Assume the interrupt servi,ce routine requires only the Accumulator and does not desire to use the Executive', s routines because of timing constraints. The interrupt service routine could be structured as follows: SERDEV if DBA OAC SAVEAC LAC SAVEAC DBR JMP:: SERDEV SAVEAC Example 2: ~ !ENTRY POINT TO ROUTINE !ENTER PAGE ADDRESSING MODE !SAVE ACCUMULATOR /REAl-TiME PROGRAM EXECUTES AT HARDWARE PRIORITY LEVEL. / IRES TORE ACCUMULATOR /DEBREAK FROM HARDWARE LEVEL IRETURN TO INTERRUPTED TASK !TEMPORARY STORAGE FOR ACCUMULATOR Assume the interrupt service routine requires several system registers and desires the use of the Executive's Save and Restore routines. INTENTRY SERDEV ! ENTRY PO I NT TO ROUT I NEt I NTENTRY I S A ! SYSTEM MACRO TO CALL THE EXECUTIVE'S I SAVE ROUTINE. IBODY OF INTERRUPT SERVICE ROUTINE 7-16 INTEXIT SERDEV IINTEXIT IS A SYSTEM MACRO TO CALL THE EXECUTIVE'S RESTORE ROUTINE, DEBREAK FROM HARDWARE LEVEL, AND RETURN TO INTERRUPTED TASK. I I I Interrupt service routines are an integral part of a Task and must be connected to and disconnected from hardware interrupt lines before use. That is, before a Task can process hardware interrupts the Task must first connect itself to a particular API line. Likewise, when a Task no longer requires the use of an interrupt line it should disconnect and release it to the system. Note that even though several Tasks can connect and disconnect themselves to the same API line, only one Task can be connected to it at any given time. The following example illustrates an interrupt service routine that uses the System Directives CONNECT and DISCONNECT to connect and disconnect itself from an interrupt line. Example 3: ICODE TO INITIALIZE A TASK ICONNECT INTERRUPT SERVICE ROUTINE, CONNECT SERDEV,26,EVI SERDEV, TO INTERRUPT LINE 26. ITHE VALUE OF EV, THE EVENT VARIABLE, I SHOULD BE TESTED TO INSURE THE I CONNECTION WAS MADE. INTENTRY SERDEV IENTRY POINT TO INTERRUPT ROUTINE, SAVE ACTIVE REGISTERS. IBODY OF INTERRUPT SERVICE ROUTINE I INTEXIT SERDEV IRESTORE SAVED REGISTERS, DEBREAK FROM I HARDWARE LEVEL, AND RETURN TO INI TERRUPTED TASK. IMAIN PORTION OF TASK WHICH OPERATES AT TASK PRIORITY LEVEL. I DISCONNECT SERDEV,26,EV/DISCONNECT INTERRUPT SERVICE ROUTINE I FROM LINE 26. EXIT lEND OF TASK 7-17 CHAPTER EIGHT TASK CONSTRUCTION 8.1 INTRODUCTION Task construction in the RSX environment falls into one of four distinct categories: (1) a Task which includes computation and/or requests to I/O Handler Tasks; (2) an MCR Function Task; (3) a FrontEnd Interrupt Driver Task; and (4) an I/O Handler Task. All Tasks, regardless of priority, must be built with the Task Builder before installing into the RSX System. When building Tasks, the following conventions must be adhered to for successful operation of the RSX System: (1) All hardware registers are available to the programmer except the last 4 Autoincremerit Registers (14-17) which are used by the system. (2) A naming convention exists for Tasks in categories 2 and 4 (see sections 8.2 and 8.4, respectively). (3) Tasks should not EXIT while I/O, Mark Time, or Event Variable settings are still pending since the Task may be overlayed by another Task before the operation has completede (4) All Directives (viz., the issuing of the CAL instruction) result in a loss of the original contents of the following registers: AC, XR, LR, MQ, LINK, SC, Autoincrement Registers 1~-13, system registers Rl-R6, and location 2~. Unexpected interrupts which suspend normal Task execution always save and restore active registers before use. The following sections describe the different Task categories in 8-1 greater detail. 8.2 COMPUTATIONAL TASK The computational Task is the more common type of user written Task since it includes programs written in FORTRAN and assembly language which do not have interrupt routines and I/O drivers internal to the Task. All necessary Input/Output is referenced through LUN slots. Computational Tasks require no naming conventions except the name must be 1-6 characters in length (Tasks called by FORTRAN programs must be 1-5 characters in length). 8.3 MCR FUNCTION TASK The Monitor Console Routine (MCR) consists of a resident Task called the Resident MCR Task, and a set of MCR Function Tasks. The Resident MCR Task reads a line of input from LUN 2 and REQUESTs the appropriate MCR Function Task which performs the MCR function. MCR Functions normally all share the same core partition dedicated to MCR Functions, however, they may be IIbuiltli to run in any partition. The name of the Resident MeR is " ..• MeR" and the name of an MeR Function is three periods followed by the first three characters of the name of the MeR Function (e.g., the TIME MeR Function is named " ... TIM"). The Resident MCR Task is REQUESTed either by the Teletype Handler Task in response to a CTRL C (from LUN 2) or by an MCR Function Task. Two subroutines, with entry points in the System Communications (SCOM) area, are used by both Resident MCR and MCR Function Tasks. One (FAC) is used to Fetch-A-Character from a line of command input, and the other (IFAC) to Initialize the Fetch-A-Character subroutine by 8-2 reading a line of command and setting the appropriate pointers. Before reading a line, tlMCR>1I is output (on LUN-2) to indicate that the MCR is waiting for input. The name of an MCR Function Task is formed by reading a line of command input (IFAC), fetching the first three characters (FAC), and preceding them with three periods. After forming the MCR Function Task Name, the Resident MCR Task continues to fetch characters until either a SPACE, COMMA, CAR RTN, or ALTMODE is found. This is done so that only as few as the first three characters of an MCR Function need be input. After "flushing thru the first break character ll , tl1e MCR Function Task is REQUESTed and the Resident MCR Task EXIT's. If more informa- tion is contained in the first line of input, it will be read by the Function Task using the FAC subroutine. If additional lines of input are required by the Function Task, they are read using the IFAC and FAC subroutines. Also included in the SCOM area is the MeR Req~est Inhibit flag (MCRRI) which is examined and set by both the Teletype Handler Task and MeR Function Tasks. If MCRRI=~ and a CTRL C is typed in, the Teletype Handler Task will REQUEST ••• MCR and set MCRRI=l. If MCRRIFO and a CTRL C is typed in, the Teletype Handler Task will set MCRRI=-l. MCRRI is cleared by MCR Function Tasks, normally just before they exit, or at least after they have finished fetching characters from the input line. MCRRI is set negative whenever a CTRL C does not result in REQUESTing ••• MCR so that CTRL C may also be used to imply "premature termination" to an MCR Function with lengthy output. When an MCR Function has been perfo~ed, and the first line of command input (the line read by the Resident MCR) has been terminated by a CAR RTN, the Resident MCR Task is REQUESTed by the MCR Function Task. When the first line of command input is terminated by an ALTMODE, the Resident MCR Task is not REQUESTed at the completion of an MCR 8-3 Function, and a CTRL C typein is necessary to re-establish MCR dialogue. The MCR Function Tasks are normal Tasks that adhere to the above conventions related to REQUESTing the Resident MeR Task. A user may build his own MeR Function Tasks and is restricted only in naming it (the name must start with three dots). The following example illustrates the structure of a typical MCR Function Task (TIME MeR Function). Note that the section between line numbers 73-78 (cross-reference line numbers) shows the standard EXIT procedure from an MCR Task. 8-4 ~.GE 1 2 3 4 5 6 7 a 9 10 11 12 13 14 15 ~ I ~ 16 11 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 1 TIM,5 SRC I EDIT #5 I I COPYRIGHT 1910, DIGITA~ EQUIPMENT cORP" MAYNARD, MASS. I I MeA fUNCTIONI TIME R. MCLEAN I I TASK NAME; ",.,TIM" TO TyPE ~UN~3 TIME ON T~E I IN RESPONSE TO THE MeR ~T!ME" REQUEST. I I THE FIRST LtNE or COMMANO INPUT fOR ANY MeR fUNCTION IS READ I BY THE RE~IDENT MCR TASK ("".~C~"). FOR THE "TIME" FUNCTION. I THE SYNTAX OF TH~ FIRST ~lNE IS' I SYNTAX = "TIM"$(CHARACTER) (CR)/(AM) (CHARACTER) =I I-' I\J 17 18 19 30 31 7130504 700604 700724 700521 700722 70121564 71210664 A A A A A A A 34 35 36 37 38 39 CALL. ERASE CAL.L. VECTOR (IX1, I Y1, IX2.IV2) LX8=700504 I."YB=70 0 604 EST=700724 SOOF"=700521 CDOF"1II700122 I"X80=100564 LYBOa7013664 I .GL.OB!.. CINT,DINT.ERASE.vECTOR"OA I I 00000 R 000000 A 01212101 R 000007 R 001211212 R 200227 R 00003 R 140227 0012'12'4 R 7413100 00005 R 620000 00006 R 000232 CINT "". CONNECT INTERRUPT L.INe: I CPI/T (1 CAl.. LAC R DiM A SMA JMP" R R 32 33 (CONNECT INTERRUPTJ (otSCONNe:CT INTERRUPTJ / I 20 21 22 23 24 25 26 27 28 29 #6 ERASf. & VECTOR •• F'ORTR"N CAL.LAB~E SUBROUTINE TO ERASE SCOPE, OR TO CONSTRUCT A VECTOR rRoM P1(lXl,IYl) TO P2 I I I I 10 12 13 EDIT CAL lC EV e::V r.INT (10) I 021007 R 000011 A 00010 R 000227 R 0012111 R 0210014 A 0121012 R eH'J 12! 202 R 11 IC EV 14 VPINT I I I OINT -'II! OISCONNECT INTERRUPT L.I~E 40 00211.3 R 000000 A 210211,4 R 00012116 R 21001,5 R 6221013 R 41 42 43 44 45 47 48 49 A A A 212121(~2 52 "14VPINT R 21000130 A 100724 A R 100174 R R 620022 R E:RASe: ERASE 00"t~3 R 53 54 55 212112l~~4 0004~5 2 VP.6 "'9 64 65 66 6'1 68 69 10 71 7'2 13 14 7, SCOPE 0 EST WF'INT rR.t\SE SRC I"VECTOR 63 SrO~AGE ~RASE I I 60 61 62 -~ JMS JMP* 56 58 DINT 12 ID I I I 51 PAGE to CAL" JMP* R 50 co 0 I 2101211,6 R 210121012 21001,7 R 0212121021 0021i~0 R 0210014 212102:1 R 02121202 46 • .... w DINT 2100~~6 0021i~" R 0000021 A R 1221231 E 021030 R 60012135 R 0021~ll R 212100210 A 000000 A 002112100 A R 00211210121 A VECTOR Xl .-- CONSTRUCT LINE: 0 JMS" JMP Yi X2 0 000~14 Y2 0 021"~''1 R 02121 41121 R 2100~11 R 000 412 R 2100'13 R 0021"14 R 0004~5 R 001!i'16 R 220031 14012131 360033 722000 741100 140031 040213 130000 '51100 777776 R A LAC· R TAD* PAl". SPA A A A ID~TERM'~E TCA X2 TCA R DAQ A A PL.A SPAICI..A A )(1 0 I 21210~'5 R 000~'6 R "'CH ARGl)MENT ADDRESSES IF'~" 121 00"~12 R Q"!10~t3 R , tO A .... ' LAW OEL.X ~2 OELTA~X & X... I~;CR POL A 16 17 18 19 80 81 82 83 84 85 86 87 138 89 90 91 92 93 94 co I ~ "'" 95 96 97 98 99 100 101 102 1,03 104 1,05 106 107 10 8 1,219 110 00041 R 740030 A 00050 R 040215 R tAC OAC xINC LAC· vi I 0012151 R 220032 R 2102152 R 7421031 A 00053 R 360034 R 00054 R 722000 A 00055 R 741100 A 0012156 R 740031 A 00057 R 040214 R 00060 R 730000 A 00061 R 75110121 A 00062 R 777776 A 1210063 R 74003121 A 00064 R 040216 R TCA TAO· PAL IO~TERMINt OE~TA.V y2 SPA TCA. oEI..Y PL.A SPA.ICLA .. 2 LAW lAC yINC OAe DAC I 1210eJ65 121012166 210067 0007121 0121011 R 200214 R R 74121031 A R 340213 R R 741100 A 00012 12.'012113 21012174 121012175 00076 0012177 1210100 001211 00102 00103 00104 00105 00106 R 200213 R 600113 R R R 040223 R R 2121121214 R R 121421226 R R 220031 R R 040221 R R 221212132 R R 2140211 R R 2021233 R R 040111 R R 2021234 R R 040165 R R 200215 R & V~INCR POLA I DELT,eX GREATER THAN OR EQUAL LAC TCA TAO SPA JMP oEL.X LAC OAe LAC OELX NC o£L.V INFhOELrv OAO NR xi IL,CC-X vi ISCC.Y (\.,)(80) Il.,CMIII.)(BO I,..CM (I.,YB) SCM IS9.MIIL.Y8 L.AC· OAe L.AC· OAC LAC OAe LAC OAe LAC De:~y v2 Lec sCC xlNC lIS ,yES flOW INITIAbI~E rOR HOR!~ L.ARGE INO ..... INJTIALI~E rOR VERT LARGE INCaOEL.x 1L.~I·)(INC PAGE :5 VP. ,~ SRC 111 112 113 114 12101121';7 R 040222 0011'~ R 200216 121011:L R 041212221 0011:a R 612121133 116 0011:5 R 2210214 R 0011 14 R 2140223 R 0011!5 R 20121213 R 00111~ R 040226 R 0011~7 R 220032 R 012!121~ R 12140221 R 0012:L R 2202131 R 0012:2 R 12140217 R 0012:5 R 200235 R 1210124 R 1214121171 R 012!12!5 R 2210236 R 1210121; R 040165 R 121012:' R 20121216 R 0013'~ R 040222 R 0013:L R 2121121215 R 0fa13;! R 040220 R 115 111 118 119 2,20 121 122 123 go 124 125 126 127 ....\ItI :1.29 128 130 131 132 133 134 135 136 1:57 138 2,39 :I.." 2,·1 142 14:5 144 145 :1.46 147 2,48 OAe R R L,.AC R OAC R I Va JMP LOI VINC SCI v3 L.AC OAC oEl..Y L.AC nEl..X OAe: LAC" OAC 1..140" OAe LAC OAe I..AO ~C INC-OEL-v INR::OEl,.x t\iR vi Lce x1 sec n. VSD) LCM tL.XS) OAC SCM OAe I..AC OAe LCt XINC SCI L.AC NC DAC RCR OAC NA L,AC IsCt-VINe vlNC IL.CC-V Isec=x It..CM=L.,VBO ISCM=,L X8 IL.CI=VINe IScI=XJNC I 0013:5 R 200223 00134~ R 040224 12!013!5 R 7440221 0013t~ R 04121225 R v3 R A R NT INT=NC INA=NC/2 I LAC· LXA 220031 21014" R 700504 0014~L R 220032 fZl014~! R 700664 0013~' R R A R A ~014~5 R 10~174 R 1..140· I 00144~ R 2210223 "014!S R 7412021 0014t) R 620026 21014i' R 123777 212115" R fZl40223 R A R A R PL.l Xl IPI.OT INITIAL POINT v1 L.VBO JMS W'lNT L,AC NC IN9=0 '1 vECTOR lyE:S -~ EXIT INO ... '" NC~NC""1 SNA jMP* AAC DAC ;;;'1 Me 149 150 151 152 153 :1,54 155 156 157 I 00151 R 2021225 R 00152 R 340226 R 00153 R 040225 R O.l\C NA l..AC ~)T NR R 200224 R 74121031 R 340225 R 741100 R 61210166 R 040225 R 221121217 R 34121220 R 040217 R 740040 163 0121154 1210155 0121156 121 I2l 151 0121160 0121161 00162 0121163 00164 0121165 A 164 165 SCM I xx 0121166 R 21210221 R Pl.2 LAC Lee TAO DAC Lec 159 1612l 161 1,62 I .... 0'\ NA PAGE 166 167 3,68 169 4 VF.6 00167 021110 0121111 0121172 R 116 117 178 119 180 :1,81 182 183 184 TCA TAO A R A R INA)NT NA SPA JMP OAC LAC R R R TAD DAC R PL~ NA sec sCI sec INO -- DO LARGE COUNT MOVEMENT IvtS .- NA.NAeNT & COMBINED MOVE ISM ALL COUNT MOVEMENT I(LYB OR "'XB) ILARGE COUNT MOVEMENT SRC 340222 12140221 R 1401214121 R 100114 R R R R A R 17121 111 172 173 114 115 INA:rNA"'NR I 158 ClO LAC TAO LCM XX JMS LCI 1(I.,X80 OR LYSO) WrlNT I JMP 00113 R 600144 R P1.,1 I 121121174 0121175 00176 0121171 R 000000 A R R R wF'INT 000200 R 140227 R 620174 R 0 CAL,. WF"CP8 DeM jMP* tV wPINT I 012121210 R 00012120 A 0021211 R 01210227 R wF'CP9 20 EV I 0021212 R 01210000 A. 00203 R 04023121 R 0121204 R 440227 R 0021215 R 20121237 R VPINT 0 OAC ACBUF' lSi! EV L.AC (41Zl112100) ITO EXIT TEST 18 5 :1,86 187 188 18 9 3,90 191 192 19 3 194 2,95 :1,96 197 19 8 ,,99 ?00 21211 202 203 204· (X) .........I ra02~'6 002Q" 211212~.0 01212j~1 01212~~2 coor R 7213344 OBR L.AC A R 62121202 R R 2100000 A R 000000 A R 212100121121 A R 00012100 A 002:L7 R 000000 A. 002~~12l R 121121012112121 A 01212.Z1 R 000000 A 12!02:~2 R 000000 A 002j~3 0212~~4 002~L5 002~L6 002:Z3 R 002~24 R 2102:25 R 002:26 R 002;~7 R 021230 R 0012100121 0121000121 000000 000000 02102100 000000 A A A A. A A ~05 4lrll6 ISA R 705504 A R 100722 A. R 200230 R 00001210 A E IoE A lot.. 0212;51 R 121210231 002:32 R 121210010 002:33 R 700564 002;34 R 7210604 002:35 R 100664 002:36 R 70051214 002·37 R 40101210 SIiE a 00240 JMP* I DE\,.X DEL.V 0 0 scc " XINC YINC 0 (1 SCt \{) Lee LOI NO NT NA NR EV 0 0 0 0 0 0 0 ACBUF" I 121 ,END A 1oL. A *L A 4IoL A *L A IoL NO ERROR L.INES ACBUF' vPtNT IOf.LTAeX IOEL"TArr'iy IX INCREMENT IV INCREMENT ISMA!..!.. COUNT ISMALI... COUNT II.,ARGE COUNT I\.ARG£ COUNT (·1 OR .1) (+-1 OR ·1) COORDINATE INCREMENT COORDINATE INCREMENT PAGE AceUF' CDOr OINT 5 VP.6 0~230 700122 !2I000~ 12!12I213 OEL,Y 121121214 12!12I12113 OINT ERASE 12!0022 £5T 712!0724 00227 EV 00007 tC !2l012116 to 00221 Lce 00222 LeI LCM 021171 700504 LXB 700564 LXSD L.ye '00604 700664 LYSO 1210225 NA 0121223 NC NR 1210226 00224 NT PL,1 00144 Pl.2 021166 scc r.?J021? sct 002221 SCM 12!0165 SOOf 7r.?J0521 VECTOR 12!0026 VPINT 00202 V2 00113 v3 00133 Wf'CPB 00200 Wf'INT 1210174 1210215 XINe )(200031 )(2 1210033 00216 VINe 01210::52 Y1 DE~X Q) ....00 I Y2 lOA """3. ""231 CROSS 182 17. 21 72 85 21 21 15. 27 26 41 103 111 107 13. 18. 14. 19. 136 99 11211 134 144. 158 105 113 109 16. 21 36 96 114 174 53 77 61639~ 62* 64. 21 187 166 25* 94 92 40_ 51* 52 28 33* 44. 121 129 125 126 11216 108 124 150 111 119 154 111 165* 123 131 127 58. 41 116. 133. 178. 142 11121 66 68 112 19 81 59 REF'ERENCE 204. 30 118 116 191* 34 115 119 165 166 168.., 139 167 198 .. 191. 141 152 133 151 200* 156 144 2"2 .. 159 148 160 161 163. 162 196* 195- 146 181 .. 189 98 100 42 54 169 13121 1212 173. 128 104 194* 192~ 116 193. 122 120 138 140 183 201. 199. 21213* 8.5 110 HANDLER TASK An I/O Handler Task is a Task dedicated to the control of an I/O Device Unit. I/O requests to these Tasks are made to Logical Unit Numbers and are queued at the requestor's priority. (See section 7.5 for a complete description of I/O operations in an I/O Handler Task.) A naming convention exists for I/O Handler Tasks (Task Building Name), requiring the name to be two characters in length followed by four periods, respectively (e.g., LP •••• , PP •••• , and PR •••• ). An example I/O Handler Task used to drive the LP15C Line Printer is given at the end of this section. the separate The following paragraphs describe sections of the Line Printer Handler, LP.5. Line Number· Label 78-1114 START Description This is the Handler initialization section required by all I/O Handler Tasks. Between lines 78-84, the Physical Device List (PDVL) is scanned for a node for this device. If found (line 85), the device Name (line 1112) was found in the PDVL and a node is returned in the AC. If not found (line 84), the Task EXITs since no node having the name IILP" was found in the PDVL. Once the node address is returned in the AC, the address of the Trigger Event Variable in the node is calculated and saved (line 87). The interrupt line is then CONNECTed (if no connection was made the Task EXITs) and the address of the Trigger Event Variable is placed in the Physical Device node (line 92). Lines 94 to 96 calculate an address to be used by the Index Register later when obtaining arguments from the PDVL. The Handler then clears the controller and waits for the Trigger Event Variable, TG, to be set (WAITFOR TG). • Line Numbers (decimal) along the left hand column of the LP.5 Task listing. 8-19 115-146 PQ The Trigger Event Variable has been Triggered. (The CAL Service Routine in the Executive Triggers the Event Variable whenever the Handler has an I/O request.) The Trigger is cleared (line 118) to prevent the Handler from being inadvertently called when the WAITFOR TG is again issued. At line 129 the request is de-queued (removed from the queue) and if the queue is empty, the Handler issues a WAITFOR TG which will be set at the next I/O request for this device. If a node was de-queued, the Event Variable and CAL Function are removed and tested. If the user's Event Variable address (line 128) is zero, the handler substitutes an internal Event Variable to handle I/O completion indications. The CAL Function is then tested for ATTACH, DETACH, etc •••• When dequeuing a request (line 122), if the de-queue was not made (empty queue) return from DQRQ is immediately following the JMS, otherwise the return is JMS+2 (line 125). If the de-queue was made, the AC will contain the address of the de-queued node. If not, the AC contains either zero, if the queue was empty, or non-zero if the device has been ATTACHed. This is useful when device handlers are multiunit and the REASSIGN MCR Function removes one of its units from the LUT. 159-173 ATTACH Routines to ATTACH, DETACH, and return Handler Information (HINF). 174-293 PRINT Routines to prepare information for and handle the hardware of the LPl5C. Notice lines 243-246 declare a Significant Event indicating that a line has effectively been printed. 327-338 INT This is the interrupt service routine which reads the status of the Line Printer (always nonzero) and saves it in the Handler's Event Variable. A Significant Event is then declared and return given to the interrupted program. 355-38.0 CCPB CPB's used by the Handler. 8-20 PAGE 1 2 3 4 5 6 1 8 9 OJ I l\.) I--' 10 11 12 13 14 15 16 11 18 19 221 21 22 23 24 25 26 21 28 29 30 31 32 33 34 35 36 37 38 39 1 LP.6 SRC I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I e;OIT #6 COPVRIGHT 1971. DIGITAL tQUIPHrNT CORP •• MAYNARD, MASS. RSX PRINTE.R ~A~D~ER TASK 1/APR/71 H, KREJC I THIS HAND~ER TASK IS TO OR1VE THE LP15C HARDWARE, IT IS COMPATABlE WITH NORMAL OUTPUT FROM FORTRAN & MACRO WRITTE~ PROGRAMS. OUTPUT IN IMAGE HOPE: AND OUTPUT NOT BEGINNING WYTI1 A '12'_ 'j4', 't?0', OR '21' CHARACTER IS PRECEDED BY AN UPSPACE (LINEFEEO) AND PRINTED DIRECTLY rROM THE INDICATED CORE, ASCII OUTPUT BEGINNING WITH ONE OF THE AROVE VERTICAL CONTRn~ C~ARACT£RS (E~G., OUTPUT VIA FORTRAN OTS) IS MOVED TO A BUFFER WITHIN THIS HANDLER WHERE THE ~EAD[R AND POSSIBLY THE LEADING CONTROL CHARACTER (FOR OVERPRINT, IS MODtFIEO AND THE LINE (CONSIDERED TWO LINES BV TwE HARDWARi WHtcw TERMINATES LINES AT VERTICAL CONTROL CHARACTERS) IS PRINTED, THERE ARE NO IMPOSED THE ~OLLOWING PAG~ EJECTS AT PAGE BOTTOMS, CAL PARAMETER BLOCKS ARE USED TO QUEUE REQUESTS rOR PRINTER SE.RVICr.. CPS 3600 f:.V LUN CPS 2400 ATTACH PRINTER EVA l.UN CPS 2700 ["VA L UN MOOE LINE CPS 2500 rVA LUN PRINT kINE 40 I 41 42 I I 43 44 I I 45 46 47 48 I TH~ REQUE~TOR'S EVENT VARIA8~E IS cLEARED (~£ROEO) W~EN THE REQUEST IS QUEUED BY T~E "QUEUE 1/0" orRECTIVE. IF THE REQUEST CAN 8E PRE~ORMEO, THE EVENT VARIABLE IS SET TO ONE (.1) UPON COMPLETION. IF THE REQUEST CANNOT BE PERPORMED. THE EVENT VARIAB~E IS SET TO ONE OF THE fOLLOWING NEGATIVE VALUES, I -~ I I I I 49 50 51 X12=12 52 000012 A 000013 A 000101 A Rl=1~1 R2=102 55 000102 A 00"107 .. 53 54 OAT4 MOOE (HEADER) DISAGREES WITH REQUEST MODE ILLEGAL REQUrST FUNCTION LUN HAS BEEN REASSIGNEO WHI~E REQUEST WAS IN QUEUE IAUTO~INCR~MENT REG 12 IAUTO~INCREMENT REG 13 IRE~ENT~ANT REGISTeR ONE )(13=13 r-.JAOO·107 IRe-eNTRANT REGISTER TWO INODE ADDITION ROUTINE ENTRY POINT SN4Mw:123 POOL=2 40 POVL-252 4L.0=325 01..AO=332 DQRQ=337 D.TG=10 wCA=34 CAA=35 LP P1=706541 LPPM=7216521 LPRS=706552 LPEIc106544 LFDl=706561 LPGO=712!6621 LPCS-706641 INAME SCAN ROUTINE ENTRV POINT l~lSTHEAO fOR POO~ OF EMPTY NODES IL1STHEAO POR PHVSICiL DEVICE LIST IATTACH LU N & OEvlcE ENTRY POINT. IDETACH LU N & OEvlcE ENTRY POINT IOE~QUEUE RECUEST ENTRY POINT IPOSITION OF TRIGGER EVENT VARIABLE IN paVL NODE ,WORD COUNT ADDReSS (NOT USEO BY LP CONTROLLER) ICURRENT ADDRESs REGISTER ADDRESS IPRINT ONE LINt IPRI~T MULTIPLE LINE IREAD LP STATUS IENABLE LP INTERRUPTS IOISABI.,E LP INTERRUPTS ICLEAR LP DONE FLAG JCLE.R LP STATUs ANO ERROR rLAGS (X) I I\.) I\.) PAGE 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 2 LP.6 SRC 01Zl0123 A 000240 A 02102~2 A 000325 A 000332 A 02121337 A 0000121 A 0210034 A 000035 706541 706521 706552 7216544 7216561 706621 7216641 A A A A A A A A I 00000 R 002012!2 A 00001 R 0000021 A LBF 0020e2 000~00 IINTERNAL ~INE BUFfER HEADER IINITIALIlAT!ON CODE IS USEO POR TEXT BUFrER 7, 16 17 78 19 80 81 82 83 84 85 86 81 I\J w 12100~L0 000~L1 12121"~~2 00"~L3 R 04121356 0"0~~6 R 12121042~ R 94 "00'!1 R 500425 R 000c!2 R 740031 A 000~!3 R 040342 R 95 96 91 98 99 100 101 102 L.AC OAC* LAC OAC" CAL.. OAe AAO DAC CA~ LAC (POVL) (R 1) (HNAM) R R 1216121356 R 1",15T FOR FaR NODE (R2) (SNAM) ( 10) PDVNA +O.TC; pDVT4 cepe tV SPA CAL. LAC DAC· AND ISvAN P~VSJCAI. OEVICF: IPOR THIS OEVICE:. (10) (TG) pDVTA I(R1, R2, R6. XR. ~ AC ARE ALTERED) INooe F'OUND? INO ... ExlT' ISAVE PDV'" NODE ADDRESS IANO TRIGGER EVENT VARIABLE ADDRESS ITRIGGER ~Ve:NT VARIABl.E ADORESS ADORrss. ICONNECT INTERRUPT LINE: ICONNECT OKAY? INO ~ .. ExIT IY;5 ... sET TRIGGER EVENT VARIABLE lIN PHYSICAL., DEVICE NOOE (0?0000)/OtTERMIN~ ADDRESS "XR., AOJ" TCA OAe XAOJ I 000'!4 R 706621 A 000'!5 R 706641 A 000.~6 R 600070 R 1lI"0.~7 000~~0 103 :1,04 105 106 107 3,08 :1.09 R 2021424 INITIALIlATION JMS* R 1211210423 R R 040355 R R 72312110 A 91 92 93 00"~~0 START 12160421 R R 12121422 R 000~L4 000~~ 7 HAND~ER R R 000351 R 2121121341 000jL5 R 74111210 88 I 21tH'''' R 2021416 R R 0~0417 R R 200420 R R R R A 89 90 co ""0""2 "021"3 00""4 "0"'" 00""6 I I I R 142000 A R 000121021 A LPC::O LPC:S I HNAM JMP leI-EAR LP CONTROLLER WF'TGR • S 1'<9T "LIlPCf""" I IwAIT fOR 'RIGGER IHANOL.ER TASK NAME lEND OF' r NITIAl.li!ATION CODE I 000~~1 R A • 81.0CI< I I I 66·START •• 't"'""".",. "tt't""""" T~E ABOVE CODE IS OVER. tt"""""""" LAYEO BY OT$ ASC 1 I I..INES ,tt't"'t"""" F'AGE ex> I N ,r::.. 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 12'7 128 129 1321 131 132 133 134 13 5 136 137 138 139 140 141 142 143 144 145 146 14., LP.6 SRC I I I I 000121 R 000373 R WPTGR I I I r.. PICK A REQUEST f'ROM QUEUE (IF ANY) ICLEAR TRIGGER LAC DAC" JMS· POVNA (Rl) (OQRO) IOE.OU£UE • REQUEST R R R JMP DAC WF"TGR A A PAX LAC A SNA R R LAC DAe RE LAC AND 5,X (717) I P'Q TAD R 21121005 A R 5121043121 R 540431 R 600123 R 54121432 R 60121132 R 540433 R 6121121143 R 54121434 R 600141 R 54121430 R 600302 R 777712 R 600315 IWAIT rOR TRIGGER tVENT VARIABLE TO 8E SET THE TASK HAS BEEN TRIGGERED I 0011215 0011216 1210107 0011121 1210111 00112 0121113 0121114 21121115 121121116 0121111 0121120 0121121 021122 WPTCPB TG 0012172 R 20121355 R 1210073 R 06121417 R 1210074 R 12121426 R 60021721 040353 34121342 72101210 210006 741200 200427 2140352 CAL D~M 0012171 R 140354 R 1210075 R 002176 R 00071 R 0010121 R "0l01R 00102 R 00103 R 1210104 R WAIT f'OR TASK TO BE TRIGGERED (BY '110 CAL' CAL SERVICE RCIUTYNE) TO SIGNAL THAT A REQUEST HAS BEEN QUEUED, R R R R R R R R R R R A (RE) ,0,4) ATTACH SAO JMP IWAS A REQUEST pOUNO? INO -. WAIT rOR TR%GGER IY~S ~. SAVE ADDRESS or REQUEST NODE ISlTUP XR TO ACCESS NODE ISAVE AOORESS OF REQUESTOR'S EVENT VARIABLE JMP SAO JMP JMP I XADJ SAO SAO R RN IC R1, R2. R4. R5, R6, )(R, & AC ARe: Alf£REO) (025) DETACH (027) pRINT (036) 1oI1NF' SAD (771) JMP LAW JMP OAEX ",6 stV I,ETC~ CA~ PUNCTION CODE IATTACH REQUEST? lyES -. ATTACH TO A TASK INO ~. OETAC~ RECUEST? IY~S .~ oETACH rROM TASK INO -. PRINT REQUEST? IvES -~ wRITE RECORD INO ~- HANDLER INPO REQUEST? lyES ~~ RETURN INFO IN EVENT VARIABLE INO .~ ExIT (OEASSIGNEO) REQUEST? lyES -e OEATTACH & EXIT INO -. UNIMPLIMENTED FUNCTION -~ SET IEVENT VARIAB~E TO ~6 148 I I 149 150 12!2112:3 R 200355 R 02112,4 R 060417 R 021125 R 200353 R 1'1 1'2 ATTACH TO A TASK ATTACH 154 155 156 151 15 8 159 160 161 162 163 164 pDVNA RN eR2) 00127 R 120435 R DAC" LAC OAC* JMS" 00130 R 62121315 R 1210131 R 62121314 R JMP JMP REQCMP 012112,6 R 060421 R 1'3 LAC 00132 R 200355 R 00133 R 060417 R 00134 R 2210353 R 00135 R 0621421 R IATTACH LUN & e R1 ) (AL..AO) s£v I I OET4011 PROM A TASK I OETACH LAC PDVNA (R1 ) DAC* LAC RN cR2) DAC" DEVICE I(R3. R4, R~) , R6, X10, Xll.• XR, Ii. AC A~~ E ALTERED) IWAS LUN ATTACHED? INO .... SET REQUESTOR'S EVENT VARIAbLE TO '!"24 lyE:S ... .., REQu[ST COMPLETED IOE.TACH LUN & DEVICE (X) I tv (J1 PAGE 165 166 161 168 169 110 "'1 1'2 1'13 114 1" 1'6 111 1'18 119 18121 181 :1,82 4 L~.6 SRC 00136 R 12"'436 R JMS" CObAD) 00131 R 600315 R 0014121 R 6210314 R JMI' JMP SEV REQCMP 1(1-<3, R4, RS, R6, X10, Xli, XR, & AC ARE ALTERED) IWAS I..UN DETACHEO? INO srT REQUESTOR'S EVENT VARIA8LE TO .. ?4 lyES ."" REQUEST CONPLETED .- I I RETURN HANOl..ER INrORMATION 1 1210141 R 200437 R 1210142 R 61210315 R HINr I I I 2121143 1210144 210145 00146 00147 2101"21 R 21012110 A R 04121350 R R 1230r212 A 040351 R R 2221350 R R 500440 R R LAC JMP IN EVENT VARIABLE (10121011) S£V PR!NT LINE ~RINT LAC DAO AAC OAC LAC" AND 10,X HX1 ISET ~EADER ADDRESS ... 2 ISET TEXT ADORESS HX:2 \.IXl IGET MODE INDICATOR (003) F"ROM HEAD£~ 183 184 185 186 187 188 189 1921 19 1 192 193 194 195 19 6 197 198 19 9 200 201 co I tv 0'\ 00151 00152 00153 00154 00155 00156 001'7 00160 00161 00162 ~0163 021164 021165 00166 00167 00170 00111 00172 00173 R 5500217 R 600155 R 777773 R 600315 R 540440 R 6021174 R 220351 R 5021441 R 540442 R 6002216 R 540443 R 600206 R 540444 R 6210206 R 540445 R 141000 R 6210174 R 2210446 R 600206 ?,X 100£S DATA MODE A R LAW -5 INO •• S£T EvENT VARIABLE TO .5 JMP (3) uBM ~X2 IvEs -~ tMAGE MODE? lyES """ uNeUF'F'EOE'O MODE INO ~. fETCH fiRST C~ARACTER RrM Iyts JMP SAD JMP LAC· R R R R AND SAO R JM~ R R R R SAO JMP SAO JMP SAO SKP JMP LAO R R A R R R 202 JMP ·J·.3 sEV REQUEST MOO£? or TEXT (774000)/ANO TEST POR LINE TERMINATING CONTROL CHARACTE~ (050000)/LINE fEED (12)1 srM ,yES -~ surPEREO MODE WIT~ LP IN AC BITS 0-6 (060e00)/NO -~ roRM~E£D (14)1 (104000)/NO IY~S 8,M (100000)/NO uBM IvES l064~00) INO -~ eUrrEREO MODE WITH ~. oOUe~E SPACE (21)1 p. OvERPRINT sU'FEREO fP IN AC BITS 21.6 MODE WITH OS IN AC 81TS 0.6 (~0)? p~ eU"EREO MODE WITH ~- uNBur~ERto MODE p- CR IN AC 8ITS 0-6 SYM I I UNBurrER£P OUTPUT MODE ~~ UPSPACE rORMS, ANO PRINT A SINGL~ 2~4 I 205 206 I 209 2121 211 212 213 214 215 216 217 218 219 WIT~ SAO R 203 20'1 208 AG~EE A 00174 00115 021176 00177 021200 00201 'H!J202 R R R R R R 200441 100246 706541 2210350 100246 106541 R 600314 R R A LINE fROM THE ueM R A R I LF'L. BU;fER IN THE MODE INDICATED BV THE HEADER, H. 'L. ) IpRINT LIN[rEEO LINE ~)(1 IpRINT REQUESTED LINE JMS LPPl pRNT JMS LPPl JMP PRNT 002~03 ILIN[PEEO LINE LAC R 00203 R 0212003 A 00204 R 000000 A 00205 R 000012 A LAO R£QUESTOR'~ REQCHP IR~QUEST COMPLETED 000000 000~12 I I I BUFFERED OUTPut MODE CONTRO~ C~AR IS '20' -~ MOVE 5/7 PACKED LINE TO BUfFER IN HANDLER, IF CHANGE TO '15'. AND PRINT THE TWO COV~RPRINT). ,.AGE 220 212222 223 224 225 226 227 228 229 230 231 co I ~ -.J 232 233 234 235 236 237 238 239 240 241 242 243 244 Z45 2'6 241 248 249 2'0 , L.P.,6 002£'6 R 040344 01212£11 R 22121350 002~.21 R 640510 0023.1 R 500450 0023.2 R 140031 21023.3 R 21421346 21023.1 R 177712 0024~0 R 2140346 12l02~!1 R 200350 2102'!2 R .,421030 2102t!3 R 0621451 002c!4 R 200452 002c!5 R 063453 0024!6 R 220012 002c~1 R 2160013 002~112l R 440346 002~11 R 600226 lwtNES (CONT CHAR & TEXT) IN ASCl! MOOE. BrM DAC t..AC* LRS ANO TCA OAe AAC SMA JMP R A R A R A l..AW A OAe L.AC lAC DAC· L.AO DAO· L.AC· DAC· R R JMP R R A R R R A lSi! coer ~X1 10 ISAVe: CONTROL CHAR IMOVE TEXT TO INTERNAL BUFFER (776) eNT ... 66 ,+3 ",66 CNT ~X1 (Xl2) (L.BF'·l) (X13) )(12 )(13 eNT 'I' !!"3 I 002~12 R 002~13 R 002~14 R 002~15 R 002~16 002~11 002~fCll 2'" 2" ClI02~;3 2" R R 7~3066 A 0022.5 R 7421100 A 0023.6 R 600221 R "02~f1 256 I I 002~.4 2'1 2'2 253 SRC 200454 0621352 200455 70551214 L.AC DAC· L.AC R R R I LAC; AND I 002~'2 002~'4 R 200457 R R 1021246 R R 106521 A 012.f' R 600320 LB'+2 (12103177) IcHANGE CONTROL. CHAR TO '15' IF' '20' XOR cCBr 040 LSP+2 LAC (L.8F') PRNT IpRINT TWO L.INES JMP RNTP IRtTURN REQUEST NODE TO POOL AND PROCESS NEXT REQUEST JMS L.PPM I A +1 AND HAS BEEN ISA A R 2021002 R R '00456 R R 240344 R R 04012102 R IS~T R~QUESTOR'S EVENT VARIABI,.£ TO IO~CLARE A SIGNIFICANT EVENT (L.INE (401000)/E~'[CTtvELY PRINTED) (·1) RE: 258 I I 259 2621 261 262 263 264 265 266 267 266 269 21121 211 272 273 2'14 I 00246 R 13130000 A 0121247 R 140301 R 121025121 R 123777 A 00251 R 040345 R 00252 R 0604613 R 00253 R 160461 R 021254 R 420246 R 2121255 R 140347 R 00256 R 7216544 A 00251 R 000315 R 00260 R 200347 R 210261 R 500462 R PRNT ~~ SUSROUTlNE TO PRINT A LINE. THE LINE BUPFER ADQRESS IS IN AC, ANU THE lOT TO PRINT IS IN THE LOCATION ~OLLOWING THE JMS. I PRNT PRNT1 0 DrM AAC OAC DAe" DlM" XCT· O~M pRNT£F' ;1 CA8F (CAA) O/C/d PRNT [V LPEI ICLt£AR ERROR F"I...A G, IOETERMINE & SAVE CURRENT ADDRESS ISET CURR~NT ADDRESS IpREVENT WORO COUNT OVERFLOW IExECUTE PRINT lOT, CI...£AR EVENT VARIABLE, IENABL,.E LP lNTERRUPT, AND WAIT fOR THE EVENT IVARIABLE TO BE SET NON~2ERO BY THE INTERRUPT ISERVICE ROUTINE. CAL. wP'ECF'B LAC ANO tV IINTERRUPT HAS OCCURREO •• EXAMINE PRINTER ST.TUS, ERROR? PRNTXT PRNTE"f" INC -'!II ExIT PRNT SUBROUTINE INEW ERROR? PRNT2 TEMCPB INO ~"" DEL.AY AND RETRY lyES ... TYP£ ERR MESSAGE LAC OAe ",,'tCPB (1 ) PRNTEF CAL. MTt;;P8 IOELAV I (200000)/A~ARM 00 I I\,) 00 PAGE 275 276 211 218 219 280 281 282 283 284 28, 266 287 288 269 29fZl 291 292 293 6 SRC LP.6 210262 210263 210264 2121265 00266 00267 00210 00211 00272 R 741200 A SNA JMP LAC StA JMP R 60(11271 R R 2003211 R R 740200 A R 6210273 R R 21021371 R R 0210375 R R 200454 R R 21403211 R CAL CAl. I 00273 R 000~61 R 210214 R 000375 R 00275 R 200345 R 00216 R 621121252 R pRNT2 CAL. LAC JMP I 210277 R 440246 R 00300 R 620246 R PRNTXT 00301 R 00012100 A PRNTEF' IS~ JMPo I 0 wf"ECPB CAer IRE TRY pRNT pRNT lEX I T PRf-,JT SUBROUTINE: pRNTl 294 I 295 296 297 I 298 299 312121 301 ;}02 303 3214 305 3216 e121J~I2 R 20121463 R 003213 R 12160417 R 311 00 I ~ 1.0 313 314 315 316 311 31.8 J19 32121 321 012131.5 R 060352 R 012131.6 R 200455 R 012131.1 R 705504 A l..AC F?N 0140* JMS* (NAOO) CAL.. cePB IS2 I I I I (POOL) (R l) Di!M* CAL 012131.2 R 16121356 R 02131.3 R 01210423 R 12112133.4 R 2121121454 R LAC o4C* LPDI 0213211 R 71216561 A 012131.0 R 01210363 R 12112131.1 R 440356 R R 200463 R 003t~3 elI2I3,~4 R 2160421 R R 120464 R eJI2I3,~5 R 62102112 R " ,. ,REA") IRE TURN RE.QUEST 1\;00£ TO POOL (R2) pDVTA pDVTA loISABL.E \,,1' I(\i'TE:RRUPTS lolSCONN[CT I NTERRl)PT LINE ICLEAR ASSIGN INHIBIT FLAG IN P()vL NODt: IEXIT ( 10 ) .- COMPL.ETED SET REQUEsTor·p S EVENT VARIABLE TO +1 ANO PICK NEXT REQUE.ST ( 1f ANV) FROM COLJEl)E. REQUEST REQCMP LAC ( +1 ) DAC* LAC lSA RE (4V31v.~0(2l) IS[T REQUESTOR'S E VEr>JT VARIA8LE IOt:.CL.ARE A S I GN I rIC A~I T EVF:hjT (POOL) IR~TURN I SEV I 01213~~0 003~~1 RNTP R 2160417 R 0"3~~2 R 2021353 R 322 323 324 325 326 327 328 329 OAEX 012131214 R ~k'J12I353 R 003~15 R 0621421 R 00:5el6 R 12JlJ464 R 31217 3218 309 31121 312 E)(IT REQUEST (fROM TASK I LAC OAC'" nu. ) LAC RN DAC* JMS" (NADt) ) JMP PQ REQU[Sr NODE TO POOL (R2) I I I I eJI2I3~~6 0"~H~ ., 1211213~ieJ R 21000021 A R 707762 A R (2l4~343 R IPICK ANOiHt;R REQUEST ( I F" ANY) INTERRUPT SERVICE ROUTINE INT 0 DB,A DAC AC8F IINTERRuPT ENTRy POIN'! IENTER I ~,'DE X (P~GE) ~1()DE ISAVE AC PAGE 330 331 332 333 334 335 336 337 338 339 3421 341 342 co I 343 344 345 346 347 0 348 w 349 350 351 352 353 354 355 356 351 358 359 360 361 362 363 364 365 366 367 368 7 SRC LP,6 00331 1210332 0121333 021334 00335 R 7"'6552 A R 0421347 R R 706641 A R 706621 A R 2210455 R L.PRS DAC LPCS LPeD LAC 00336 R 72155214 A 1210337 R 21210343 R IR~AO EV LAC AC8F DBR EV~NT VARIABLE ICl-EAR STATUS, ERR FLAG, & DONE Fl.AG (401~210)/DECLARE ISlA. 00340 R 103344 A 021341 R 620326 R STATUS A.NO SET IN A SIGNIFICANT EVENT IRt::STORE AC: IRETURN TO INTERRUPTED PROGRAM JMP" tNT XADJ AC8F 0 0 CABF CNT 0 0 HX1 HX2 0 121 IXR ADJUST CONSTANT TO SUBTRACT PAGE BITS lAC BUFFER ICONTROL C~AR BUFFER (BITS 121",,6) IINITIAL CURRENT ADDRESS BUFFER ICOUNTER IEVENT VAR%ABL,E IHEADER ADORESS ITEXT ADDRESS IAOO~ESS OF REQu~STOR'S EVENT VARIABLE IADDRESS Of REQUEST NODE PICKED F"ROM QUEUE 11RIGGER (VENT VARIABLE 0 '" IPHYSICA~ OEVICE NODE ADDRESS IADDRESS OFAOR Of TRIGGER EV IN PHY OEV NODE 11 ICONNECT cPe I 00:542 00343 0121344 021345 00346 0121341 1210350 00351 00352 00353 !210354 R R R R R R R R R R R 00121000 000000 2121000121 21121001210 000000 01210000 0121121000 01210000 0012112112121 00021210 0210000 A A fA. A A A A A A A A cear EV RE RN TG 0 0 0 " ~ I 00355 R 00001210 A 021356 R 000000 A 00351 00360 00361 00362 R 2100011 A PDVNA POVTA I CC:PB R 000341 R R 1212102116 A. R 2100326 R EV .1,6 INT I 00363 ~ 2100012 A 1210364 R 1212112121210 A 00365 R 01210016 A 1210366 R 000326 R 1210361 R 0210013 210370 R 212121347 00371 R 02121012 00372 R 00001211 A R A A OCPS 12 IOISCONNEC T CPS 0 16 I MTCP8 INT 13 EV 12 1 IMARK TIME CPS , 369 310 311 R 121021020 A 00374 R 000354 R 0031~5 312 wF'TCPB 20 ,WAIT f"O~ IW~IT FOR EVENT VARIABL,E CP8 I 313 314 375 376 317 R 12100020 A 12!031t) R 000347 R 3'18 2100003 A 12100002 A 21210404 R ~037~) 0037i' R 0212700 A 0040~' R 0040jL R 00421~~ R 00421~S R 319 3821 381 WPECP6 , TEMCPB 0021347 R R 00401212 A R 12'00012'0 A 0040t) R 251245 A 21214~4 0040~) 2121 EV 21210 EV ,TVEP ERR MESSAGE 3 2 ERR MrS I 382 ERRMES 01214'102, "O0000; .ASCII "0*. LP NOT REAOY"(15) 00 I w PAGE 8 L,P dl SRC I-' 0040" R 221212321 ra041~' R 5131011 0041l. R 647650 0041,! R 2212450 00413 R 540610 0041~1 R 544320 0"41~i R 0210000 A A A A A A A 383 314 I 000002 R TRIGGER CPS Tt; .ENi;l START 021416 0121417 00420 00421 00422 R 01210252 A R 12100101 A R R R 1210423 R 00 I w tv 0121424 00425 00426 0121427 1210430 12121431 021432 1210433 1210434 00435 00436 00437 0044121 021441 !2!0442 00443 21121444 00445 00446 R R R R R R R R R R R R R R R R R R R 0121447 R 00121027 0121121102 01210123 12101210121 12121121354 07012l0eJ 01210337 121021352 2100777 121021024 12100025 12121121027 1210012136 1211210325 12121121332 10121011 1210012103 7741211210 1215001210 0.612101210 10401210 l1iH?J00121 06401210 121121021213 0210776 121012112112 12112101211211 121121121013 1211211211211211 42111210121 003777 12121121121121121 0045121 R 1210451 R 12!0452 R 0121453 R 0(()454 R 12121455 R 0121456 R 00457 R 0046121 R 121121012135 0eJ461 R 12121012134 1210462 R 21211211211210 00463 R 00024121 1210464 R 00011211 SIi!E=00465 R A A A R A A R A A A A 4ItL 4ItL *L *L oIIoL *L, 4ItL *L *L *L AL *L *L *L iIIL A A "'L A *L A *L A A. A A. A *L *L *L *L "lor A *l A *L R *L A *L A *L R *L A A A A R A A A A A *L *L *L *L *L Al. *L *L *L "L NO ERROR LIN;S !'AGE ACBF' 9 LP.6 ~12!343 000325 AL.AO ATTACH 00123 BF'M CAA cA9r CCBF' CCP8 CNT I:')AEX 0021216 "00035 0"345 ~0344 00357 00346 0121302 DCPB 0121363 DETACH 00132 DL.AD 01210332 OQRQ olTe 00 I w w 1210121337 CROSS 329 59. 136 192 . 64265 222 336 154 15121* 194 266 287 25121 343. 342. 88 355* 232 240 344* 273 331 3450 356 2~9 223 233 346. 363 251 253 227 144 303 138 60.· 61- 00012110 ERRMES 00404 021347 EV 380 89 IooIINF ~0141 142 IoINAM "'02127 00350 00351 00326 0001210 00203 706621 706641 71216561 706544 706521 706541 706552 00367 12100107 000252 IooIXl IooIX2 INT LoBF' LF'L. LPC:O LPCS LPOI LPEI LPPM LPPl LPRS MTCPB NAOo PDVL POVNA POVTA POOL pQ F'RINT REFERENCE 62* 80 178 180 327. 73206 341 .. 196 360ft 161* 165 122 86 382* 269 172* 102* 181 189 338 236 214* 347. 358 248 333 332 211 55. 302 270 255 208 330 365ft 301 58- 78 71* 69- 68* 66* 65. 67. 285 222. 297~ 98 99 7121- 21211 321 00355 85 120 l~H'l 161 352* 00356 000240 87 93 297 304 317 305 353* 120- 323 117* 00072 00143 57. 1,40 366 374 377 PRNT PR-NTEf." f:'RNTXT 1210246 121031211 00217 PRNT1 00252 PRNT2 00273 RE 00352 REQCMP 1210314 RN 00353 RNTp 00320 R1 000101 R2 00011212 SEV 00315 SNAM 000123 START TEMCPB Tt; PAGE ex> I w ~ 00002 00377 0035. 10 X12 X2.J 00342 0021012 QJ0e013 210 277 290. 288 254 283 2620 2930 268 290 279 285. 130 157 125 257 5354* 146 131 168 152 317. 244 212 163 313 311. 348* 299 319 349. 79 151 164 162 156 121 153 167 298 320 56* 82 78280 92 LP.6 UBM 1210174 WeA 0121"2134 WF'tCPB 210315 Wf'TCPB 210313 Wf'TGR 12113070 XAOJ 207 263 276 266- 81 106 376_ 118 CROSS 1.88 63- 211 114 100 96 5152. 199 267 281 310. 114. 126 ~35 237 173 384 350. 371 REf."ERENC£ 206. 286 124 340. 238 239 373* 300 186 313. 291 318 8.6 ADDITIONAL INFORMATION Tasks written in FORTRAN: The PAUSE statement results in the Task being SUSPENDed. RESUME MCR Function is used to continue after a PAUSE. The The STOP statement results in a Task EXIT. I/O requests to standard I/O Handlers (through LUN's) always wait until the I/O request has completed before continuing. OTS messages are output on LUN 4. OTS-2~ is a FORTRAN READ or WRITE failure. Tasks Written in MACRO: The MACRO Assembler pseudo-op .CBD (Common Block Definition) allows the assembly language programmer to declare a COMMON of an indicated name and size, and to specify a word to be set to its base address. The .CBD pseudo-op takes a COMMON name and its size as arguments, reserves one word of core, and outputs loader codes and parameters to direct the Task Builder to set a vector to the first element of the indicated COMMON in the reserved word. For example, the statement BASE .CBD ABCD 6 will provide the base address of COMMON/ABCD/ in the word labeled BASE. (This feature will become available under DOS August 71.) Normally, 32 LUN's exist; however, this number can be changed by reassembling the system. On a cold start image, LUN 1 is assigned to DSK, LUN's 2, 3, and 4 are assigned to TT~, and all other LUN's are assigned to NONE. 8-35 APPENDIX A SYNTACTICAL DESCRIPTIONS OF MCR FUNCTIONS The following is a description of the MCR Functions provided. The syntax is defined in modified Backus Normal Form using the following conventions and definitions: < > II II ( ) $ NUL A. = Angle brackets delimit metaling:uistic variables = Quote marks delimit a. character string = A vertical bar indicates alternation (OR) No operator indicates concatenation = Parens indicate factoring = Indicates any number (including zero) of the following = Indicates the empty set = Break character -- blank or comma = Carriage Return = ALTMODE = Non-break character = Non-terminal character = Decimal value ENTER TIME SYNTAX = "ETI" $
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.3 Linearized : No XMP Toolkit : Adobe XMP Core 4.2.1-c041 52.342996, 2008/05/07-21:37:19 Create Date : 2003:07:25 20:33:29-07:00 Modify Date : 2016:05:02 12:42:04-07:00 Metadata Date : 2016:05:02 12:42:04-07:00 Producer : Adobe Acrobat 9.0 Paper Capture Plug-in Format : application/pdf Document ID : uuid:6cd87cae-c827-f24f-90e6-710db9de77e9 Instance ID : uuid:401cad1f-c51a-144f-8e97-b7e56167a55b Page Layout : SinglePage Page Mode : UseOutlines Page Count : 175EXIF Metadata provided by EXIF.tools