MODULE DISPATCH 'M01.01' ; ! ! ERROR LOG CONTROL FILE MODULE: DISPATCH ! ! COPYRIGHT (c) 1981 BY ! DIGITAL EQUIPMENT CORPORATION, MAYNARD ! MASSACHUSETTS. ALL RIGHTS RESERVED. ! ! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED ! AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE ! AND WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS ! SOFTWARE OR ANY OTHER COPIES THEREOF, MAY NOT BE PROVIDED OR ! OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND ! OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERED. ! ! THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT ! NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL ! EQUIPMENT CORPORATION. ! ! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ! ITS SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY DIGITAL. ! ! VERSION 01.00 ! ! C. PUTNAM 17-JUL-80 ! ! VERSION 01.01 ! ! R. DENNY 09-AUG-82 Add CSD Special Packet Type 9 ! ! This module is the entry module for the Error Log Control File. The ENTRY ! procedure sets up various variables for use in later modules and then causes ! the command line to be parsed. The packets are then processed. ! ! Declare any literals used by this module. ! LITERAL SUPPORT.IO_ACTIVITY = FALSE ; LITERAL MAXIMUM.CODE_TYPE = 7 ; LITERAL MINIMUM.CODE_TYPE = 1 ; ! ! Declare the CSD Special Packet Type Code ! LITERAL SPECIAL.CODE_TYPE = 9 ; PROCEDURE ENTRY BEGIN ! ! This section defines various general purpose variables. ! $IF SUPPORT.RSX_11M $THEN DECLARE REPORT ; MODE :ASCII [10] ; ! The type of report ST_DATE :RSX_TIME ; ! Starting Date EN_DATE :RSX_TIME ; ! Ending Date VOLUME_LABEL :ASCII [12] ; ! Volume Label FULL_MOD_1 :ASCII [6] ; ! Full format module name #1 FULL_MOD_2 :ASCII [6] ; ! Full format module name #2 FULL_MOD_3 :ASCII [6] ; ! Full format module name #3 FULL_MOD_4 :ASCII [6] ; ! Full format module name #4 DRIVE_SN :LONGWORD ; ! Drive Serial Number PACK_SN :LONGWORD ; ! Pack Serial Number VOLUME_LABEL_VALID :LOGICAL ; ! Volume label is valid DRIVE_SN_VALID :LOGICAL ; ! Drive Serial Number is valid PACK_SN_VALID :LOGICAL ; ! Pack Serial Number is valid WIDE :LOGICAL ; ! Wide format listing flag K_CRASH :LOGICAL ; ! Select Crash Packets K_NORMAL :LOGICAL ; ! Select Normal Packets PROCESSOR :LOGICAL ; ! Select Processor Errors MEMORY :LOGICAL ; ! Select Memory Errors SYSTEM_INFO :LOGICAL ; ! Select System Information PERIPHERAL :LOGICAL ; ! Select Peripheral Errors CONTROL :LOGICAL ; ! Select Control Packets NULL_COMMAND :LOGICAL ; ! Null command line flag PACKET_IDENT :ASCII [7] ; ! Ident of the current packet BRIEF_FORMAT :ASCII [56] ; ! Brief report format string W_G_F_1 :ASCII [19] ; ! WRITE_GROUP format 1 W_G_F_2 :ASCII [19] ; ! WRITE_GROUP format 2 END_DECLARE ; $END_IF $IF SUPPORT.RSX_11M_PLUS OR SUPPORT.VMS $THEN DECLARE REPORT ; MODE :ASCII [10] ; ! The type of report BEGIN_TIME :VMS_TIME ; ! Start time of processing ST_DATE :RSX_TIME ; ! Starting Date EN_DATE :RSX_TIME ; ! Ending Date VOLUME_LABEL :ASCII [12] ; ! Volume Label FULL_MOD :ASCII [6] ; ! Full format module name DRIVE_SN :LONGWORD ; ! Drive Serial Number PACK_SN :LONGWORD ; ! Pack Serial Number VOLUME_LABEL_VALID :LOGICAL ; ! Volume label is valid DRIVE_SN_VALID :LOGICAL ; ! Drive Serial Number is valid PACK_SN_VALID :LOGICAL ; ! Pack Serial Number is valid WIDE :LOGICAL ; ! Wide format listing flag K_CRASH :LOGICAL ; ! Select Crash Packets K_NORMAL :LOGICAL ; ! Select Normal Packets HISTORY :LOGICAL ; ! Select History Summary ERROR :LOGICAL ; ! Select Error Summary GEOMETRY :LOGICAL ; ! Select Geometry Summary PROCESSOR :LOGICAL ; ! Select Processor Errors MEMORY :LOGICAL ; ! Select Memory Errors SYSTEM_INFO :LOGICAL ; ! Select System Information PERIPHERAL :LOGICAL ; ! Select Peripheral Errors CONTROL :LOGICAL ; ! Select Control Packets NULL_COMMAND :LOGICAL ; ! Null command line flag PACKET_COUNT :WORD ; ! Number of packets processed PRINT_COUNT :WORD ; ! Number of packets printed PACKET_IDENT :ASCII [7] ; ! Ident of the current packet REPORT_FILE :ASCII [43] ; ! Report file specification INPUT_FILE :ASCII [43] ; ! Input file specification SAVED_COMMAND_LINE :ASCII [132] ; ! Saved Command Line BRIEF_FORMAT :ASCII [56] ; ! Brief report format string W_G_F_1 :ASCII [19] ; ! WRITE_GROUP format 1 W_G_F_2 :ASCII [19] ; ! WRITE_GROUP format 2 END_DECLARE ; $END_IF ! ! Declare some general purpose variables. ! DECLARE DISP ; NEXT_PACKET :BYTE ; ! Subpacket number index DEVICE_STRING :ASCII [6] ; ! Device name string MODULE_NAME :ASCII [6] ; ! Module to be called PACKET_DATE :RSX_TIME ; ! Time stamp in VMS format MATCH_FLAG :LOGICAL ; ! Flag to indicate a match END_DECLARE ; ! ! Create the Operating System Suffix/Text Conversion Table. ! $IF SUPPORT.RSX_11M_PLUS OR SUPPORT.VMS $THEN TABLE OP_SYS ; INDEX :BYTE ; SUFFIX :ASCII [1] ; TEXT :ASCII [12] ; BEGIN_TABLE 0, 'D', 'RSX-11D' ; 1, 'M', 'RSX-11M' ; 2, 'S', 'RSX-11S' ; 3, 'I', 'IAS' ; 4, 'R', 'RSTS' ; 5, 'V', 'VAX/VMS' ; 6, 'P', 'RSX-11M-PLUS' ; END_TABLE ; $END_IF ! ! Declare the intermodule information transfer variables. ! DECLARE INTERMOD_DEVERR ; DRIVE_SN :ASCII [12] ; DEV_FUNCTION :ASCII [28] ; ERROR_HEAD :ASCII [3] ; ERROR_CYLINDER :ASCII [5] ; ERROR_GROUP :ASCII [3] ; ERROR_SECTOR :ASCII [6] ; ERROR_TYPE :ASCII [30] ; BLOCK_NUMBER :ASCII [10] ; PHYS_UNIT :ASCII [3] ; ALT_NAME :ASCII [12] ; DISP_NAME :ASCII [6] ; DRIVE_TYPE :ASCII [12] ; MISMATCH_FLAG :LOGICAL ; REJECT_FLAG :LOGICAL ; PRINT_FLAG :LOGICAL ; END_DECLARE ; ! ! Create the ERROR file. It contains the errors to be printed. ! FILE ERROR ; ARGUMENT_LIST :ASCII [80] ; END_FILE ; ! ! Create the PACKET_RANGE file. It contains the packet numbers ! to be retrieved. ! FILE PACKET_RANGE ; LOW :ASCII [8] ; HIGH :ASCII [8] ; END_FILE ; ! ! Create the DEVICES file. It contains the device specifications ! of the devices to be selected. ! FILE DEVICES ; MNEMONIC :ASCII [2] ; UNIT :BYTE ; UNIT_VALID :LOGICAL ; END_FILE ; ! ! Create the NOTE_NUMBERS file. It contains one entry for each note requested. ! FILE NOTE_NUMBERS ; INDEX :BYTE ; END_FILE ; ! ! Now create the various ERROR_INFO files. There is one file for each ! of the kinds of summaries that can be created. ! ! Create the ERROR_INFO_H file. It contains information from each ! MOUnt or DMOunt that has been encountered. ! $IF SUPPORT.RSX_11M_PLUS OR SUPPORT.VMS $THEN FILE ERROR_INFO_H ; NAME :ASCII [6] ; DEVICE_TYPE :ASCII [12] ; PACK_SN :LONGWORD ; IO_COUNT :LONGWORD ; VOLUME_LABEL :ASCII [12] ; HARD_ERCNT :WORD ; SOFT_ERCNT :WORD ; END_FILE ; ! ! Create the ERROR_INFO_G file. It contains information from each ! device error that has been encountered. ! FILE ERROR_INFO_G ; NAME :ASCII [6] ; DEVICE_TYPE :ASCII [12] ; PACK_SN :LONGWORD ; DRIVE_SN :ASCII [12] ; VOLUME_LABEL :ASCII [12] ; BLOCK_NUMBER :ASCII [10] ; ERROR_COUNT :WORD ; ERROR_CYLINDER :ASCII [5] ; ERROR_HEAD :ASCII [3] ; ERROR_GROUP :ASCII [3] ; ERROR_SECTOR :ASCII [3] ; END_FILE ; ! ! Create the ERROR_INFO_E file. It contains information from each ! device error that has been encountered. ! FILE ERROR_INFO_E ; NAME :ASCII [6] ; DEVICE_TYPE :ASCII [12] ; PACK_SN :LONGWORD ; DRIVE_SN :ASCII [12] ; VOLUME_LABEL :ASCII [12] ; ERROR_TYPE :ASCII [30] ; ERROR_COUNT :WORD ; FIRST_DATE :RSX_TIME ; LAST_DATE :RSX_TIME ; FIRST_PACKET :ASCII [7] ; LAST_PACKET :ASCII [7] ; END_FILE ; $END_IF ! ! Now create the TITLE file. It contains the banners to be used ! at the top of each page of the report. ! FILE TITLE ; BANNER :ASCII [132] ; END_FILE ; ! ! This section first calls the 'PARSEc' module to parse the command line, where ! 'c' is the O.S. specific suffix as determined by the SUPPORT level. ! When the command line parsing is completed this procedure requests packets, ! giving them one by one to the DISPATCH procedure in this module. When the ! packets are all processed the summary generation module is invoked on M-PLUS. ! ! Set up the initial conditions. ! DO BEGIN $IF SUPPORT.RSX_11M_PLUS OR SUPPORT.VMS $THEN SET REPORT.BEGIN_TIME TO %TIM$VMS_CURRENT ; $END_IF ENABLE MODULE 'ERRORM' PROCEDURE 'ERROR_1' ; $IF SUPPORT.VMS $THEN ! ! Call the VMS command line parsing module. ! CALL MODULE 'PARSEV' PROCEDURE 'SETUP' ; $END_IF $IF SUPPORT.RSX_11M OR SUPPORT.RSX_11M_PLUS $THEN ! ! Call the RSX (11M and 11M_PLUS) command line parsing module. ! CALL MODULE 'PARSEM' PROCEDURE 'SETUP' ; $END_IF ! ! Continue on if the command line is not null. ! IF NOT REPORT.NULL_COMMAND THEN ! ! Now do the first part of the initialization. ! BEGIN $IF SUPPORT.RSX_11M_PLUS OR SUPPORT.VMS $THEN CALL MODULE 'INITP1' PROCEDURE 'INIT_1' ; $ELSE CALL MODULE 'INITM1' PROCEDURE 'INIT_1' ; $END_IF ! ! This is the primary packet dispatcher. These loops request the next ! packet and send it to the DISPATCH procedure. ! POINTER PACKET_RANGE FIRST ; ! ! Loop through the PACKET_RANGE file extracting pairs of range ! specifications. ! WHILE PACKET_RANGE.CONTEXT DO BEGIN ! ! Test the packet range limits for correct syntax as they are set. ! ! Note that this code depends on the side effect of setting the LOW ! and HIGH packet numbers while checking their syntax. This is not ! recommended practice (depending on side effects, that is) but is ! O.K. here because we will quit if the function returns FALSE (bad ! syntax). If we did not quit, we could not depend on either end of ! the range being properly set. ! IF NOT %CTL$INPUT(PACKET_RANGE.LOW, PACKET_RANGE.HIGH) THEN ! ! There is an illegal packet specifier. This is a FATAL error. ! SIGNAL_STOP 'ILLPACRAN' PARAMETERS %CND$IF( %COM$NULL(PACKET_RANGE.LOW), '*', PACKET_RANGE.LOW), %CND$IF( %COM$NULL(PACKET_RANGE.HIGH), '*', PACKET_RANGE.HIGH) ; END_IF ; ! ! Loop until there are no more packets in the range ! selected by the outer loop. ! DO BEGIN SET REPORT.PACKET_IDENT TO %PKT$IDENT ; IF REPORT.PACKET_IDENT NE NULL THEN ! ! Now declare and process the subpackets. ! CALL PROCEDURE 'DISPATCH' ; END_IF ; END ; WHILE REPORT.PACKET_IDENT NE NULL ; ! ! Now get the next packet range specification pair. ! POINTER PACKET_RANGE NEXT ; END ; ! ! We are now out of packets. Create the SUMMARY report(s) (if required) ! $IF SUPPORT.RSX_11M_PLUS OR SUPPORT.VMS $THEN IF REPORT.HISTORY THEN ! ! Create the HISTORY summary. ! CALL MODULE 'SMRYHP' PROCEDURE 'SUM_HISTORY' ; END_IF ; IF REPORT.GEOMETRY THEN ! ! Create the GEOMETRY summary. ! CALL MODULE 'SMRYGP' PROCEDURE 'SUM_GEOMETRY' ; END_IF ; IF REPORT.ERROR THEN ! ! Create the ERROR summary. ! CALL MODULE 'SMRYEP' PROCEDURE 'SUM_ERROR' ; END_IF ; ! ! Now output the final page of the report. ! Also clean up, close files, etc. ! CALL MODULE 'FINLP1' PROCEDURE 'FINAL_1' ; $ELSE ! ! Now clean up, close files, etc. ! CALL MODULE 'FINLM1' PROCEDURE 'FINAL_1' ; $END_IF END ; END_IF ; END ; WHILE NOT %CTL$EOF('COMMAND') ; END ; PROCEDURE DISPATCH BEGIN ! ! This procedure is the main dispatcher for the control file. The ! header subpacket offsets are defined and analyzed to determine the ! error packet type. Based on the error type, a string of the form ! 'DSPncf' is generated where 'n' is the 1 digit decimal ASCII ! representation of the packet type code, 'c' is an Operating System ! specific suffix, and 'f' is the error log packet format identifier. ! A test is then made to see if this module is available. If it is, the ! module is invoked. If the Operating System specific module is not ! available, the common module is used (where is O.S. suffix character ! is 'C'). If a module with that name does not exist, an error message ! is generated. ! ! First set up some variables for this packet. ! $IF SUPPORT.RSX_11M_PLUS OR SUPPORT.VMS $THEN INCREMENT REPORT.PACKET_COUNT ; $END_IF SET DISP.NEXT_PACKET TO 1 ; ! ! Now define the Header Subpacket Offsets. ! SUBPACKET HEADER = DISP.NEXT_PACKET ; SUBPKT_FLAGS :WORD ; ! E$HSBF SFLG_HDR :BIT [0] ; ! Header Subpacket SFLG_TSK :BIT [1] ; ! Task Subpacket SFLG_DID :BIT [2] ; ! Device Id. Subpacket SFLG_DOP :BIT [3] ; ! Device Op. Subpacket SFLG_DAC :BIT [4] ; ! Device Ac. Subpacket SFLG_DAT :BIT [5] ; ! Data Subpacket SFLG_CMD :BIT [6] ; ! Command Subpacket SFLG_ZER :BIT [7] ; ! I/O counts zeroed OP_SYS :BYTE ; ! E$HSYS FORMAT_ID :BYTE ; ! E$HIDN OP_SYS_ID :ASCII [4] ; ! E$HSID CONTEXT_CODE :BYTE ; ! E$HCTX CC_NOR :BIT [0] ; ! Normal Entry CC_STA :BIT [1] ; ! Start Entry CC_CDA :BIT [2] ; ! CDA Entry FLAGS :BYTE ; ! E$HFLG FLG_ADR :FIELD [0:2] ; ! Addressing mode FLG_COU :BIT [2] ; ! Error Counts supplied ENTRY_SEQ :WORD ; ! E$HENS ERROR_SEQ :WORD ; ! E$HERS CODE_TYPE :BYTE ; ! E$HTYC CODE_SUBTYPE :BYTE ; ! E$HTYS TIME_STAMP :RSX_TIME ; ! E$HTIM PROC_TYPE :BYTE ; ! E$HPTY RESERVED :BYTE ; ! Reserved byte PROC_ID :WORD ; ! E$HURM URM_CPU :FIELD [0:4] ; ! Processor Identifier END_PACKET ; INCREMENT DISP.NEXT_PACKET ; $IF SUPPORT.RSX_11M_PLUS $THEN ! ! Find the suffix character for the operating system that generated ! this packet. ! FIND OP_SYS INDEX = HEADER.OP_SYS ; ! ! Make sure there is context after the FIND. If there is no context the ! subpacket may be corrupted. ! IF NOT OP_SYS.CONTEXT THEN ! ! There is no context. Warn the user that the subpacket ! is possibly corrupted and return. ! SIGNAL_STOP 'BADSUBPKT' PARAMETERS 'Header', 'OP_SYS' ; END_IF ; $END_IF ! ! Some of the selection tests can be performed at this time. ! CALL MODULE 'SELTM1' PROCEDURE 'SELECTION_1' ; IF NOT DISP.MATCH_FLAG THEN ! ! One of the tests failed. Reject this packet. ! RETURN ; END_IF ; ! ! The packet has passed all of the tests that can be given at ! this time. More tests can be performed after the rest of the ! subpackets have been declared. Now declare the rest of the ! subpackets. ! ! ! Declare the Task Subpacket if it is available. ! IF HEADER.SFLG_TSK THEN BEGIN SUBPACKET TASK = DISP.NEXT_PACKET ; TASK_NAME :LONGWORD RAD50 ; ! E$TTSK UIC :WORD OCTAL ; ! E$TUIC UIC_MEMBER :FIELD [0:8] ; ! Member number in UIC UIC_GROUP :FIELD [8:8] ; ! Group number in UIC TI_DEV :ASCII [2] ; ! E$TTID TI_UNIT :BYTE OCTAL ; ! E$TTIU FLAGS :BYTE ; ! E$TFLG FLG_PRV :BIT [0] ; ! Privileged Task FLG_PRI :BIT [1] ; ! Privileged Terminal END_PACKET ; INCREMENT DISP.NEXT_PACKET ; END ; END_IF ; ! ! Declare the Device Identification Subpacket if it is available. ! IF HEADER.SFLG_DID THEN BEGIN SUBPACKET DEVICE_ID = DISP.NEXT_PACKET ; MNEMONIC :ASCII [2] ; ! E$ILDV LOGICAL_UNIT :BYTE OCTAL ; ! E$ILUN CONTROLLER_NUM :BYTE ; ! E$IPCO PHYS_UNIT :BYTE ; ! E$IPUN PHYS_SUB_UNIT :BYTE ; ! E$IPSU $IF SUPPORT.RSX_11M_PLUS $THEN IF OP_SYS.SUFFIX EQ 'P' THEN BEGIN PHYS_DEV_MNEMON :ASCII [2] ; ! E$IPDV END ; END_IF ; $END_IF DEV_FLAGS :BYTE ; ! E$IFLG DFLG_SUB :BIT [0] ; ! Subcontroller device RESERVED :BYTE ; ! Reserved byte VOLUME_LABEL :ASCII [12] ; ! E$IVOL PACK_SN :LONGWORD BCD ; ! E$IPAK DEV_TYPE_CLASS :WORD ; ! E$IDCL DEV_TYPE :LONGWORD ; ! E$IDTY IO_COUNT :LONGWORD ; ! E$IOPR SOFT_ERCNT :BYTE ; ! E$IERS HARD_ERCNT :BYTE ; ! E$IERH $IF SUPPORT.RSX_11M_PLUS $THEN IF OP_SYS.SUFFIX EQ 'P' THEN BEGIN WRD_XFR_COUNT :LONGWORD ; ! E$IBLK CYL_CRS_COUNT :LONGWORD ; ! E$ICYL END ; END_IF ; $END_IF END_PACKET ; ! ! Now build up the device name string. ! SET DISP.DEVICE_STRING TO DEVICE_ID.MNEMONIC | %CNV$OCTAL(DEVICE_ID.LOGICAL_UNIT, 3, '0') | ':' ; ! ! At this point we can try some more tests to see if we want ! to keep this packet. ! CALL MODULE 'SELTM1' PROCEDURE 'SELECTION_2' ; IF NOT DISP.MATCH_FLAG THEN ! ! One of the tests failed. Reject the packet. ! RETURN ; END_IF ; INCREMENT DISP.NEXT_PACKET ; END ; ELSE ! ! Now build up the device name string. ! SET DISP.DEVICE_STRING TO NULL ; END_IF ; ! ! Declare the Device Operations Subpacket if it is available. ! IF HEADER.SFLG_DOP THEN BEGIN SUBPACKET DEVICE_OP = DISP.NEXT_PACKET ; TASK_NAME :LONGWORD RAD50 ; ! E$OTSK UIC :WORD OCTAL ; ! E$OUIC UIC_MEMBER :FIELD [0:8] ; ! Member number in UIC UIC_GROUP :FIELD [8:8] ; ! Group number in UIC TI_DEV :ASCII [2] ; ! E$OTID TI_UNIT :BYTE OCTAL ; ! E$OTIU RESERVED :BYTE ; ! Reserved Byte IO_FUNCTION :WORD OCTAL ; ! E$OFNC SF_IQX :BIT [0] ; ! IQ.X subfunction bit SF_IQQ :BIT [1] ; ! IQ.Q subfunction bit SF_IQUMD :BIT [2] ; ! IQ.UMD subfunction bit FLAGS :BYTE ; ! E$OFLG FLG_TRA :BIT [0] ; ! Transfer operation FLG_DMA :BIT [1] ; ! DMA device FLG_BAE :BIT [2] ; ! 22 bit addressing device RESERVED :BYTE ; ! Reserved Byte XFER_ADDRESS_1 :WORD OCTAL ; ! E$OADD + 0 XFER1_HIGH_2:FIELD [4:2] ; ! High Order 2 bits of address XFER1_HIGH_6:FIELD [0:6] ; ! High Order 6 bits of address XFER_ADDRESS_2 :WORD OCTAL ; ! E$OADD + 2 XFER2_TAUB :FIELD [0:13] ; ! T. A. in units of bytes XFER_BYTE_COUNT :WORD ; ! E$OSIZ RETRIES_LEFT :BYTE ; ! E$ORTY MAX_RETRIES :BYTE ; ! E$ORTY+1 END_PACKET ; INCREMENT DISP.NEXT_PACKET ; END ; END_IF ; $IF SUPPORT.RSX_11M_PLUS OR SUPPORT.IO_ACTIVITY $THEN ! ! Declare the Device Activity Subpacket if it is available. ! IF HEADER.SFLG_DAC THEN BEGIN SUBPACKET IO_ACTIVITY = DISP.NEXT_PACKET REPEATED ; MNEMONIC :ASCII [2] ; ! E$ALDV LOGICAL_UNIT :BYTE OCTAL ; ! E$ALUN CONTROLLER_NUM :BYTE ; ! E$APCO PHYS_UNIT :BYTE ; ! E$APUN PHYS_SUB_UNIT :BYTE ; ! E$APSU $IF SUPPORT.RSX_11M_PLUS $THEN IF OP_SYS.SUFFIX EQ 'P' THEN BEGIN PHYS_DEV_MNEMON :ASCII [2] ; ! E$IPDV END ; END_IF ; $END_IF DEV_FLAGS :BYTE ; ! E$IFLG DFLG_SUB :BIT [0] ; ! Subcontroller device TI_UNIT :BYTE OCTAL ; ! E$ATIU TASK_NAME :LONGWORD RAD50 ; ! E$ATSK UIC :WORD OCTAL ; ! E$AUIC UIC_MEMBER :FIELD [0:8] ; ! Member number in UIC UIC_GROUP :FIELD [8:8] ; ! Group number in UIC TI_DEV :ASCII [2] ; ! E$ATID IO_FUNCTION :WORD OCTAL ; ! E$AFNC SF_IQX :BIT [0] ; ! IQ.X subfunction bit SF_IQQ :BIT [1] ; ! IQ.Q subfunction bit SF_IQUMD :BIT [2] ; ! IQ.UMD subfunction bit FLAGS :BYTE ; ! E$AFLG FLG_TRA :BIT [0] ; ! Transfer operation FLG_DMA :BIT [1] ; ! DMA device FLG_BAE :BIT [2] ; ! 22 bit addressing device RESERVED :BYTE ; ! Reserved Byte XFER_ADDRESS_1 :WORD OCTAL ; ! E$AADD + 0 XFER1_HIGH_2 :FIELD [4:2] ; ! High Order 2 bits of address XFER1_HIGH_6 :FIELD [0:6] ; ! High Order 6 bits of address XFER_ADDRESS_2 :WORD OCTAL ; ! E$AADD + 2 XFER2_TAUB :FIELD [0:13] ; ! T. A. in units of bytes XFER_BYTE_COUNT :WORD ; ! E$ASIZ END_PACKET ; INCREMENT DISP.NEXT_PACKET ; END ; END_IF ; $ELSE IF HEADER.SFLG_DAC THEN ! ! We have an IO_ACTIVITY subpacket but no code to handle it. ! Indicate this condition to the user and then increment ! DISP.NEXT_PACKET to skip over the subpacket. ! BEGIN SIGNAL 'NODACSPRT' PARAMETERS REPORT.PACKET_IDENT ; INCREMENT DISP.NEXT_PACKET ; END ; END_IF ; $END_IF ! ! This is the Main Dispatcher for DATA packets. ! IF (HEADER.CODE_TYPE NE SPECIAL.CODE_TYPE) AND ((HEADER.CODE_TYPE GT MAXIMUM.CODE_TYPE) OR (HEADER.CODE_TYPE LT MINIMUM.CODE_TYPE)) THEN ! ! We have just picked up a packet where HEADER.CODE_TYPE ! is out of range. Signal this as an error. ! BEGIN SIGNAL 'ILLPACCOD' PARAMETERS REPORT.PACKET_IDENT, %CNV$DECIMAL_P(HEADER.CODE_TYPE, 3) ; RETURN ; END ; END_IF ; $IF SUPPORT.RSX_11M_PLUS OR SUPPORT.VMS $THEN SET DISP.MODULE_NAME TO 'DSP' | %CNV$DECIMAL(HEADER.CODE_TYPE, 1, '0') | 'P1' ; $ELSE SET DISP.MODULE_NAME TO 'DSP' | %CNV$DECIMAL(HEADER.CODE_TYPE, 1, '0') | 'M1' ; $END_IF ! ! Test for the existence of the O.S. specific module. ! IF %PKT$MODULE(DISP.MODULE_NAME) THEN ! ! If the O.S. specific module exists, use it. ! CALL MODULE DISP.MODULE_NAME PROCEDURE 'START_MOD' ; ELSE ! ! Otherwise, use the common module name of the form 'DSPnCf'. ! If that doesn't exist, report an error. ! $IF SUPPORT.RSX_11M_PLUS OR SUPPORT.VMS $THEN ! ! Include this extra support only on M_PLUS and VMS. ! BEGIN SET DISP.MODULE_NAME TO DISP.MODULE_NAME<1:4> | 'C' | DISP.MODULE_NAME<6:1> ; IF %PKT$MODULE(DISP.MODULE_NAME) THEN CALL MODULE DISP.MODULE_NAME PROCEDURE 'START_MOD' ; ELSE SIGNAL_STOP 'MODNOTFND' PARAMETERS DISP.MODULE_NAME ; END_IF ; END ; $ELSE SIGNAL_STOP 'MODNOTFND' PARAMETERS DISP.MODULE_NAME ; $END_IF END_IF ; END ; END_MODULE ; ! DISPATCH.CNF