Digital PDFs
Documents
Guest
Register
Log In
EK-1VAXD-TM-001
August 1979
466 pages
Original
23MB
view
download
OCR Version
20MB
view
download
Document:
VAX Diagnostic Design Guide
Order Number:
EK-1VAXD-TM
Revision:
001
Pages:
466
Original Filename:
OCR Text
EK-1TVAXD-TM-001 - VAX Diagnostic Design Guide digital equipment corporation - maynard, massachusetts First Edition, August 1979 Copyright © 1979, Digital Equipment Corporation All Rights Reserved. The material in this manual is for informational purposes and is subject to change without notice.. Digital Equipment Corporation assumes no responsibility for any errors which may appear in this manual. Printed in U.S.A. The following are trademarks of Digital Equipment Corporation, Maynard, Massachusetts: DIGITAL DECsystem-10 MASSBUS DEC DECSYSTEM-20 PDP OMNIBUS DIBOL DECUS 0S/8 EDUSYSTEM UNIBUS VAX VMS RSTS RSX IAS CONTENTS Page VAX DIAGNOSTIC ENGINEERING DESIGN PHILOSOPHY APT-RD 2 DIAGNOSTIC PROGRAM METRICS COVERAGE = N o . Fault Troubleshooting DIAGNOSTIC DIAGNOSTIC Isolation Support PROGRAM SIZE EXECUTION TIME OPERATIONAL FUNCTIONALITY AND DOCUMENTATION VAX DIAGNOSTIC SYSTEM: = N System - -3 for the Use of Environment [\ System/User o = N Level Environment System 3 4 3-1 3-5 3-5 3-8 3-8 3-8 3-10 3-10 Level 2 (Level 2R) The VAX System Diagnostic Program (ESXBB) 3-10 3-11 3-11 DIAGNOSTIC DEVELOPMENT PROCESS CONSULTATION PHASE PLANNING PHASE o the Diagnostics System Exerciser Tests w > & N |] |] [] — - OB GRS I STRUCTURE AND STRATEGY VAX FAMILY DIAGNOSTIC STRATEGY Console Environment CPU Cluster Environment System and User Environments System Environment User Environment Guidelines n N = Test Mode Diagnostic Functionality Troubleshooting and Repair Diagnostic Functionality and User Environments [] 2 BwWwwWwwh - WWwWwwwwww L] ® [ ® [] [] L] el o |] [] W L] w w * o SUPPORT FAULT ISOLATION AND TROUBLESHOOTING CHAPTER o | 1 B WW NN = N Applications APT Diagnostics e I T Engineers | | | N BWWNON - o o e wN - Automated FAULT DETECTION . U eWwWwNDNOND - o » NONDN o ¢ [] DN Service Local Operator Application N o e NN o o o o o o e Field DIAGNOSTIC APPLICATIONS CHAPTER 3 W USERS Computer Design Engineers Manufacturing Technicians CHAPTER L DIAGNOSTIC USERS AND APPLICATIONS DIAGNOSTIC NN et s CHAPTER 1 Diagnostic Project Plan Diagnostic Functional Specification iii 4-1 4-1 4-2 4-2 Diagnostic IMPLEMENTATION Program Design Breadboard > W o Final Diagnostic PART SYSTEM-WIDE DIAGNOSTIC WK = mdWwWh = = COMMANDS Control Command File Execution Control 6 SUPERVISOR FUNCTIONAL DIAGNOSTIC PROGRAM OVERALL PROGRAM PROGRAM HEADER Program Module Nesting Functions DESCRIPTION DESIGN STRUCTURE MODULE Header Section (Module Declarations Section Initialization TEST Script the Script Format STRUCTURE AND Preface) Routine Cleanup Routine Summary Routine Initialization, Cleanup, and Documentation SUBROUTINES AND THE GLOBAL MODULE ROUTINES GUIDELINES Commands Command Interrupting GLOBAL DW= [] o e [} Macros Sequence Scripting AW = e L =3 o o o o o o [] WNNMNDNDNDN - [} s o e o o (SO RS N, R NN o o o o o o e NN - (e )W) We WMo We Wer o W e)) . w o)} e L] OYOYON e @ * DIAGNOSTIC @ Command Processing Buffer Allocation and Summary oo o b AN SUPERVISOR Program/Test Scripting SUBROUTINE L THE LIBRARY Utility Macros Supervisor Service VMS Service Macros DIAGNOSTIC 5 Q o SUPERVISOR L] - BASICS SUPERVISOR FUNCTIONS FOR ENGINEER AND THE USER MACRO PHASE GUIDELINES ($)) SUPERVISOR Prototype Implementation RELEASE NN, NS NN NS, 5 II AND B_WWWwWwWwwwwwwpooNon CHAPTER QA and AND FOR TEST MODULES Guidelines for 1, 2, Writing Guidelines Guidelines for for for Writing Level 2 Writing Writing Level Level 2R Programs 3 Diagnostic Guidelines LEVELS Programs iv 2R, 3, 4 Level 1 Programs Programs U1'~.|J'|U1U|U'!U1U'l Engineering DIAGNOSTIC Specification PHASE Support .2 (Cont) R WWND NN — L * .3 * o - * wwN CONTENTS CONTENTS (Cont) Guidelines for Writing 6.5.5 Level 4 UTILITY MACROS Header Directive Dispatch Table Macro Initialization Data Section Directives Device Register Storage S dbdwhHFER Area Statistics Table Directives Section Definition Table Directives Quadword Descriptor Directive Initialization Code Directives Cleanup Code Directives Summary Code Directives Interrupt Service Routine Directives Test Routine Directives Message Routine Directives Numeric Error Header Information HEWOOJOUMT b WN Ll -~ PROGRAM CONTROL 7-13 UTILITY MACROS Pass Control Macros Quick Flag Macros Operator Flag Macros Program Subtest Control Loop Control Escape Macros Macros Control Macro Exit from Program Phase Macro Break in Diagnostic Program Macro Break on Complete Utility Macros Branch on Error Utility Macros Aborting the Test Sequence Macro $DS CLI COMMAND LINE INTERPRETER TREE MACRO P-TABLE CONTROL MACROS o o ¢ & o e & e e N [] e [} OWROJAAUNWN |- P-Table e o S e o & o & o ¢ O 2 ° o » * NSNNSNNSNNSNNSNNNNSNSNSNNNCNNNNNaNNN OO LLLTUTOTUBWWWWWWWWWwwww Directive [ RVOROIJAAAAD WD - FORMAT b PROGRAM N MACROS LA L U s T D R T A UTILITY Program Module Directive Macros Subtitle Directives R HEREEREFEOONOAUTES WN - [] CODING - UTILITY MACROS NN | Pl CHAPTER 7 NN DODNDNODNDNDODNODNDNODNODNDNODN - GUIDELINES FOR REGISTER TESTING NN SNSNNNNSNNNNNNNGNONGN 6.6 NN NN Diagnostics Descriptor Macros $DS SINITIALIZE $DS $DECIMAL $DS_$OCTAL IMAL $DS_$HEXADEC $DS_$STRING $DS_SLITERAL $DS_$SFETCH $DS $STORE $DS $END Structure Definition Macros 7-13 7-13 7-14 7-15 7-16 7-16 7-18 7-19 7-19 71-20 7-20 7-21 7-21 7-23 7-23 7-23 7-24 7-24 7-24 7-24 7-25 7-25 7-25 7-25 7-25 CONTENTS SDEFINI $DEF 7.5.2.1 7.5.2.2 $DEFEND 7.5.2.3 7.5.3 P-Table Control Macro Examples SYMBOL DEFINITION UTILITY MACROS 7.6 $DS_BITDEF $DS CFDEF 7.6.1 7.6.2 7.6.3 7.6.4 $DS CHCDEF $DS_CHIDEF $DS_CHMDEF 7.6.5 $DS_CHSDEF $DS_CHDEF $DS_CLIDEF 7.6.6 7.6.7 7.6.8 $DS DEVTYP 7.6.9 7.6.10 7.6.11 7.6.12 7.6.13 7.6.14 7.6.15 7.6.16 7.6.17 7.6.18 7.6.19 7.6.20 8.3 8.3.1 $DS DSDEF $DS_DSSDEF $DS ENVDEF $DSTM ERRDEF $DS HDRDEF $DS HPODEF $DS PARDEF $DS_SCBDEF $DS SECDEF $DS_DEFDEL 8 SUPERVISOR CODING SERVICE MACROS name G STATUS PROGRAM CODES CONTROL SERVICE MACROS $DS_CNTRLC_x $DS_INLOOP_x x $SDS_SUMMARY $DS_ENDPASS_x CHANNEL SERVICE MACROS $DS_CHANNEL_x x $DS_SETMAP 8.4.2 8.4.3 _x $DS_SHOWCHAN MEMORY MANAGEMENT SERVICE $DS_MMON_x _x $DS_MMOFF 8.5.2 8.5.3 8.5.4 8.6 8.6.1 8.6.2 8.6.3 MACROS $DS_name_S RETURN 8.3.2 8.5 8.5.1 SUPERVISOR $DS 8.3.3 8.3.4 8.4 8.4.1 SERVICE _x $DS_GETBUF $DS RELBUF x DELAY SERVICE MACROS $DS_WAITUS x x $DS_WAITMS x T ANWAI $DS_C vi N 8.1 8.1.1 8.1.2 8.2 $DS_DSADEF Q0 00 00 00 G0 00 OO0 0o OO0 O QO | I L DWW J~JJO0O BN CHAPTER (Cont) MACROS CONTENTS (Cont) [] ® [] D W - [] o o o B WN ¢ o o o o o o o o o WHNMNDNNDNDNE WN - $DS_ASKSTR_x x $DS_ASKDATA $DS_ASKVLD_ x x $DS_ASKLGCL AU $DS_ASKADR_x $DS_PARSE_x SERVICE MACROS $DS_INITSCB_ x HARDWARE P-TABLE ACCESS o n 2] 'u -3 $DS_GPHARD_x VMS SERVICE MACROS CODING VMS SERVICE $name G $Sname_S e o (S BB WWWWWWWWWWWN et CONTROL x $DS_CLRVEC MACROS RETURN = W N B o ¢ e . o aAanMbdbwwwwwn - I/0 STATUS CODES SERVICE MACROS x $ASSIGN x SDASSGN $QI0 x T QIO Service Diagnostic Functions Function Encoding Synchronizing I/0 Completion I/0 Completion Status SQIOW x SGETCHAN SCANCEL x o o o EVENT FLAG N W = o o * ® o ° 0 o o o x $DS_PRINTS $DS_CVTREG_x o ¢ o o ¢ 6 & 6 8 © o o ¢ x $DS__PRINTX x $DS_PRINTF _ $DS_SETIPLx $DS_SETVEC_x o BB BB Information Message Macros $DS_ERRSYS_x $DS_ERRDEV_x $DS_ERRHARD_x $DS_ERRSOFT x Information Print Macros $DS_PRINTB_x SYSTEM * OCOWOWOOVOWOWOOWOWOWOWOWWYWOWOYWLOW Header PROGRAM-OPERATOR DIALOGUE SERVICE MACROS & Q ERROR MESSAGE SERVICE MACROS HEWYOWOVUWOVWOVWOWOOOWOOOMWONOMINNNNNNNNNNIN 00 00 00 00 00 00 00 00 00 00 00 O CO 00 CO OO 0O OO CO0 00 00 00 CO 0o O €O Page SERVICE SSETEF x _x SCLREF SREADEF x x SWAITFR x SWFLAND vii MACROS 8-23 8-24 8-24 8-26 8-27 8-28 8-28 8-33 8-34 8-35 8-35 8-36 8-40 8-42 8-43 8-43 8-46 8-46 8-48 8-53 8-53 8-54 8-54 8-54 8-55 8-55 CONTENTS (Cont) SERVICE . (@) wNn - SGETTIM x (o) T, I -3 Specifying 9-38 9-38 9-49 9-41 9-42 9-42 9-44 9-44 $CANTIM Use Timer Services ASCII OUTPUT SERVICE 10.6 10.7 10.8 10.9 MACROS x $FAO_ x $FAOL B wN - 190.5 x of the FAO Directives String Processing FAO Control MANAGEMENT HIBERNATE 190.1 Time Values at Assembly X SSETIMR MEMORY 16.2 16.3 1.4 Delta AND WAKE and SERVICE SERVICE Parameter MACROS MACROS x SHIBER X SWAKE UNWIND 10 SERVICE DIAGNOSTIC MACRO SYSTEM MACRO SASSIGN x 9-45 9-48 9-49 9-50 9-51 9-52 DICTIONARY 19-1 19-4 19-5 x SBINTIM x SCANCEL x SCANTIM 190-6 SCLREF x 19-7 SDASSGN _x SDEF $DEFEND 19-8 19-9 19-9 SDEFINI 10-9 ABORT 19.11 $DS_ASKADR_x 16-9 10-10 19.12 A $SDS_ASKDATx 10-11 10.10 10.13 10.14 19.15 10.16 19.17 19.18 190.19 10.20 190.21 10.22 19.23 10.24 10.25 10.26 10. 27 $DS 9-33 9-34 9-35 9-35 Time FORMATTED CHAPTER MACROS SBINTIM x N o o e o o o e e o o « e o o o o o o o o e Weor R e e T, O, NS, WO WY WILWYWWOWYWOWY () O O O WY . $SWFLOR_x TIMER \O© 00 00 00 ~J (SIS0 BN O - O WO WYY Y Page $DS_ASKLGCL x $DS_ASKSTR X $DS ASKVLD 10-14 $DS BERROR 10-15 10-16 19-12 19-13 $DS_BCOMPLETE $DS_BGNCLEAN $SDS BGNDATA 190-16 10-16 $DS BGNINIT $DSBGNMESSAGE $DS BGNMOD 10-17 19-17 19-17 $DS_BGNREG $DS_BGNSERV $DS BGNSTAT 19-18 19-18 19-18 190-18 19-18 $DS BGNSUB $DS_BGNSUMMARY viii CONTENTS (Cont) Page 10.28 19.29 10.30 19.31 10.32 19.33 10.34 10.35 14.36 18.37 19.38 19. 39 10.40 19.41 10.42 19.43 10.44 19.45 10.46 10.47 10.48 10. 49 19.580 18.51 16.52 19.53 16-19 16-19 10-20 $DS BGNTEST $DS BITDEF $DS BNCOMPLETE $DS_BNERROR 10-20 10-290 190-2¢0 $DS_BNOPER $DS_BNPASS@ $DS_BNQUICK $DS BOPER $DS BPASS@ $DS_BQUICK $DS_BREAK $DS CANWAIT $SDS”_CFDEF 19-21 19-21 19-21 19-21 19-22 19-22 19-22 19-22 10-26 x $DS CHANNEL x $DS__CHCDEF $DS CHDEF 10-26 10-26 19-27 19-27 $DS_CKLOOP $DS_CLI $DS _CLIDEF $DS_CLRVEC_x 10-27 $DS CHIDEF $DS CHMDEF $DF__CHSDEF 10-28 16-29 19-29 x $DS CNTRLC $DS_CVTREG_x $DS_DEFDEL 10-30 16-390 19-31 16.54 16.55 $DS DEVTYP 10-31 19-32 19.56 $DS_DSADEF $DS DSDEF 19-32 196.57 16.58 10.59 19.690 18.61 10.62 190.63 190.64 18.65 10.66 16.67 16.68 19.69 10.70 10.71 19.72 10.73 $DS _DISPATCH $DS ENDDATA $DS_ENDINIT $DS_ENDMESSAGE $DS ENDMOD $DS ENDPASS x $DS_ENDREG $DS ENDSERV $DS ENDSUB $DS_ENDSTAT $DSENDSUMMARY $DS ENDTEST $DS ENVDEF $DS_ERRDEF $DS ERRDEV x 10.74 D $DS_ERRHARx 19.75 16.76 $DS_ERRSOFT 18.77 19-33 19-34 190-35 19-36 16-36 10-36 19-36 18-36 16-37 10-37 16-37 10-37 19-37 10-38 19-38 19-38 19-39 16-39 10-40 10-41 19-41 $DS DSSDEF $DSENDCLEAN $DS ERRNUM $DS_ERRSYS_x ix CONTENTS (Cont) Page 10.78 $DS_ESCAPE 14.79 10-8¢ 16.81 10.82 10.83 $DS_EXIT 19-43 19-43 $DS_GPHARD x 19-43 10-44 10.84 14.85 10.86 10.87 19.88 16.89 16.99 16.91 10.92 16.93 10.94 10.95 10.96 16.97 16.98 14.99 10.100 16.101 10.102 16.103 19.104 16.105 10.106 10.107 1¢.108 10.189 16.110 14.111 10.112 16.113 19.114 10.115 10.116 16.117 16.118 18.119 14.119.1 19.119.2 10.120 190.121 10.122 16.123 10.124 $DS_GETBUF_x $DS_HDRDEF $DS_HEADER $DS_HPODEF $DS INITSCB x 10-44 10-45 19-45 x $DS_INLOOP 19-46 10-46 $DS_MMON_x 19-47 $DS_MMOFF_x $DS_PAGE $DS_PARDEF $DS_PARSE_x $DS_PRINTB_x x $DS_PRINTF $DS_PRINTS x x $DS_PRINTX $DS_PSLDEF $DS_RELBUF_x $DS_SBTTL $DS_SCBDEF $DS_SECDEF $DS_SECTION $DS_SETIPL $DS_SETMAP_x $DS_SETVEC_x $DS_SHOWCHAN_x $DS_STRING 19-46 19-47 10-47 10-48 10-48 10-50 18-50 19-51 16-51 10-52 16-52 10-53 10-54 19-54 10-54 19-54 19-56 19-57 18-57 x $DS_SUMMARY_ x $DS_WAITMS_ 10-58 $DS_$DECIMAL $DS_SEND SDS_SFETCH $DS_SHEXADECIMAL 19-59 $DS_WAITUS x 19-58 190-58 19-59 10-59 $DS_$INITIALIZE 190-60 10-60 $DS_S$OCTAL 10-60 19-60 $DS_SLITERAL $DS_$STORE $DS_$STRING $FAO x FAO Directives FAO Control String and Parameter Processing SFAOL_x SGETCHN_x x SGETTIM SHIBER S $QI0 x 19-61 19-61 19-61 10-62 190-63 10-66 190-67 10-69 19-79 10-70 CONTENTS (Cont) Page CHAPTER 10-74 SQIOW x SREADEF _x 18-75 16.125 10.126 19.127 16.128 10.129 16.130 190.131 16.132 16.133 19.134 SSETEF x x $SETIMR X $SETPRT x SUNWIND SWAITFR x 10-75 10-76 19-78 10-80 10-80 19-81 19-82 16-83 SWAKE x x SWFLAND $SWFLOR_x 11 11.1 DIAGNOSTIC PROGRAM FILE Documentation DOCUMENTATION 11-1 DOCUMENTATION 11.1.1 Cover Sheet Program Abstract Hardware Requirements Software Requirements Prerequisites Operating Instructions Program Functional Description 11.1.2 11.1.3 11.1.4 11.1.5 11.1.6 11.1.7 11.2 MODULE Directives Environment Statement Program and Module Version Numbers Module Maintenance History Module Functional Description 11.2.4 11.2.5 11.2.6 11.3 11.3.1 ROUTINE Parameters Completion Codes Side Effects Register Usage 2.4 2.5 2.6 COMMENTS Block Group Line CHAPTER 12.1 12.2 12.3 12,4 12 11-5 11-7 11-7 11-7 11-8 11-9 11-19 11-10 PREFACE Routine Functional Description Routine Interface Sequence Calling Input and Output Parameters Implicit Input and Output 11.3.2 11.3. 2. 1 11.3. 2.2 2.3 11-4 11-4 11-6 PREFACE Linker and Assembler Copyright Statement 11.2.1 11.2.2 11.2.3 11-2 11-3 11-3 11-4 Comments Comments Comments 11-12 11-13 11-13 11-13 11-14 11-14 11-14 11-14 11-14 11-15 11-16 11-17 CODING CONVENTIONS AND PROCEDURES GUIDELINES FOR EXECUTABLE CODES SUBROUTINE GUIDELINES GLOBAL ERROR MESSAGE HANDLING ROUTINES INTERRUPTS xi 12-1 12-2 12-2 12-4 CONTENTS (Cont) Page 12.5 12.6 ASYNCHRONOUS 12.7 12.7.1 12.7.2 12.7.3 12.8 USER-DEFINED EXCEPTION Data Macro SYMBOL 12-6 CONDITION HANDLERS MACROS that Build Libraries NAMING 13 13.1 13.2 EXTERNAL Executable Code CONVENTIONS PROGRAM INTERFACE 12-15 12-16 12-16 12-16 12-16 12-18 12-19 DIAGNOSTIC CONSIDERATIONS SETUP AUTOMATED 12-19 12-14 12-14 Macros Public Symbols Private Symbols Object Data Types ASSEMBLY AND LINK PROCEDURES 12.9 CHAPTER TRAPS AND Structure Macros 12.8.1 12.8.2 12.8.3 SYSTEM HANDLERS 13-1 PRODUCT TEST (APT) CONSTRAINTS 13-1 13-2 13-2 13-2 13.3 SCRIPTING CONSTRAINTS 13.4 RUN-TIME CONSIDERATIONS 13.5 PARALLEL 13.6 13.7 LOOPING CONSTRAINTS 13-3 VOLUME VERIFICATION 13.8 LONG 13-3 13-3 CHAPTER 14.1 14 VERSUS COMMON TEST CODING Endless 14.1.3 14.1.4 14.1.5 DESIGN ERRORS AND THEIR SYMPTOMS Loops 14-1 14-2 14-2 Improper 14-2 Forgetting 14.1.8 Stack QUALITY Context the I/0 Number Underflow ASSURANCE for and References Sign (#) 14-3 14-3 14.2.2 14.2.3 14.2.4 Conventions Check Load and Execution Check Fault Detection and Reporting Operational Checks User Mode Checks DEBUG AND UTILITY DIAGNOSTIC 14.3.1 14.3.2 14.3.3 14.3.4 14.3.5 14.3.6 14-3 PROCEDURES Specifications 14.2.6 14.3 Check COMMANDS IN SUPERVISOR Set Base Command Set Breakpoint Command Clear Breakpoint Command Show Breakpoints Command Set Default Command Example Command xii 14-2 14-3 Overflow 14.2.1 14.2.5 14-1 14-1 Forgetting Initialization Forgetting Return Status Neglecting to Save Registers Forgetting the Context or Properties of an Instruction 14.1.6 14.1.7 14.2 TESTING SILENCES DEBUGGING 14.1.1 14.1.2 SERIAL 14-3 14-4 Check 14-4 14-5 14-6 THE 14-6 14-6 14-6 14-7 14-7 14-7 14-8 CONTENTS (Cont) Page 14-9 14-9 Deposit Command Next Command 14.3.7 14.3.8 APPENDIX A A SAMPLE DIAGNOSTIC PROGRAM APPENDIX B GLOSSARY OF DIAGNOSTIC SOFTWARE TERMS FIGURES Figure No. Title 3-1 VAX Diagnostic = | T’Q - AU \O\D\D\?\O | WN O 00il W N o wm[ W N ()] H o | L{n»ww | e w ) W Environments 12-2 12-3 12-4 12-5 12-6 The Building System: and Program Levels, Operating Modes Block Structure of the Diagnostic Environments Console Environment CPU Cluster Environment System Environment Diagnostic Supervisor Functional Block Diagram Diagnostic Supervisor and Diagnostic Program Interaction Diagnostic System Memory Allocation Memory Format for RELBUF Supervisor Service Macro Arguments Operator Dialogue Flowchart Command Interpreter Tree Structure Memory Format for the ASSIGN VMS Service Macro Arguments Queue I/0 Diagnostic Buffer Format I/0 Function Format Function Modifier Format I/0 Status Block Format Buffer Layout Supplied by the GETCHAN System Service Diagnostic Buffer Format Printing and Error Message, Program Flow Handling Interrupts Coordination of I/0 Transfer with an AST Data Structures that Support the AST Condition Handler Flowchart Condition Handler Argument List and Associated Arrays xiii TABLES - = | | =\ = \D\D\O&O\D\O\?\D\D\D@O\U‘l HOOJOAUNDWN R Table No. Title Page Device 5-6 6-9 8-31 9-15 9-17 9-18 9-19 9-20 9-20 9-2¢0 9-21 Naming Conventions Symbolic Offsets Summary of FAO Directives Read and Write I/0 Functions Terminal I/0 Driver Functions Disk I/0 Driver Functions Magnetic Tape I/O Driver Functions Line Printer I/0 Driver Functions Card Reader I/0 Driver Functions Mailbox I/0 Driver Functions P-Table DMC-11 I/0 Driver Functions ACP Interface Driver Functions Field Function for ASCII Absolute or Delta Time Values Summary of FAO Directives Summary of 12-1 FAO Object Data 14-1 Examine 9-37 9-46 19-64 Directives Types Command 9-21 12-18 Qualifier Descriptions 14-8 — l = (%] MW e M) e ) Wer e ) WS, T, NS, | | [ I OO & WN = (RPRRERA e 192N Command Command Load Attach Run Select Commands | Command Select Command Deselect Command Show Device and Show Start Command Command Use of Control C, Continue Commands Summary, and Use Summary, and ' of Control C, Commands A Typical Execution Command File of a Typical Command File Use of the Flag Control Commands Event Flags Control Commands A Program Header Module Preface Declarations Section Program Header Data Block Dispatch Table Psect P-Table Global Program Error Format Data Text Report Section Section Statement Xiv HFROIIIUTdL D U'IU'|U1(f1U1U'|U'I L N Load Abort 5-12 Command 0 o} Load Show = Set o) Title vl U1U10'IU1U'I({|U1U1U1U1 I T I B [ I I HOONOUL s WN - Example No. ® EXAMPLES EXAMPLES (Cont) Page 6-9 Initialization Device Testing Routine for Parallel 6-19 Initialization Routine for Serial 6-14 Device 6-15 Testing 6-16 for a Print Routine 6-18 The Passing of Parameters from a Calling Routine to a Global Subroutine Arrangement of Arguments on the Stack Use of Structural Macros to Define Test and Subtest Boundaries Typical Test and 32-Bit Register Header Macro Subtest Test Documentation Patterns Format Name Use of Begin and End Module Macros Subtitle Directives Expansion of the $DS_HEADER Macro in the DZ11 Diagnostic Program (ESDAA) Use of the $DS_DISPATCH Macro Test Argument Table Directives Device Register Storage Area Directives Statistics Table Directives Use of the $DS_SECTION and $DS_SECDEF Macros Quadword Descriptor Directive Initialization Code Directive Cleanup Code Directives Summary Code Directives Interrupt Service Routine Directives Test Directives Message Routine Directives Pass Control in Initialization Code Quick Flag Macros Operator Flag Macros Program Subtest Control Macros Loop Control Macro Use Escape Control Macro Branch on Complete Utility Macro Program Abort Macro Building a Data Structure P-Table Offsets for Use the Building a P-Table Descriptor Use of the $DS name L Macro Format Xv 6-20 6-22 6-26 7-1 Specification of Arguments by Position Specification of Arguments by Keyword Names Specification of Arguments by Position and Keyword 6-19 6-19 RH780 to l Data 6-15 B W N Received a 2 S|EMOOOIJoU;m and for Level <N~ Expected a - Typical Design Specification Summary Report Routine Typical Design Specification for 1 Design Specification Cleanup Routine NN Typical Program NNNNNNY i | I 6-11 Macro = o 0 B wWwHS Format Macro Status Code $DS CNTRLC x Macro Usage Use of the$DS_INLOOP x Macro Use of the $DS_ENDPASS the Unibus Macro Call Channel with =00~ Ww wn o - 00 o | Use of the $DS SETMAP x Macro of the $DS SHOWCHAN x Macro Use of the $DS WAITUS xMacro Coordination of the $DS_WAITMS x $DS_CANWAIT and x Macros Error Message Header Format Sample Use Use Error Message Header Printout the $DS_ERRSYS x Macro the $DSERRHARD x Macro of of Standard Use Use A of of for Basic $DSPRINTB x $DS_CVTREGx Error Messages Macro Macro Error Message Prompting and Parsing Use of the $DS GPHARD a Command x Macro Vo) (o] Use of the $name Macro Format to Build an Argument List Calling a VMS Service with the $name G > W O O the Sample Macro Format Modification Uses of O %)) o) = O o0 o e Macro O WYY Formats the of an $name G, Argument S$name, and List S$SnameDEF Formats Checking the Return Status Error Condition Checking the Return Status Determine the Nature of an Use of the SASSIGN x Macro Code of the Absolute $BINTIM x to Time Value to xvi for an Code to Error Use of the $DASSGN x Macro Synchronizing I/0 Completion, Use www the $DS_CHANNEL x Macro Use 1911 with Arguments Position Expansion of the $DS RELBUF_S Testing for Successful Return Identifying the Return Status Resetting Ly 0 oo o o] Format Three Methods Convert System OCoOJanhoMhuo,m $DS_name S 0] $DS_name DEF Macro Formats Use of the $DS nameS Macro with Keywords Form 0 0o 00 00 00 0o TM L o) ~ Expansion of $DS _name G Macro Qo W the Ul with [\ o Build an Argument List Calling a Supervisor Service $DS_name G Macro Format Specified by Q0 CO 00 €0 00 GO CO (Cont) Modification of an Argument List Uses of $DS_name G, $DS nameL, and 0] 0 0 1\ 10.¢) EXAMPLES an Format EXAMPLES (Cont) Page Use of Use of Value SBINTIM x to Convert a to System Format to Create Use of the SETIMR Service at an Absolute Time to Call Second SETIMR Time 9-38 Service B@ the Delta a 9-41 Delay an AST -9-42 Documentation Cover Sheet Program Abstract Hardware Requirements Documentation Software Requirements Documentation Prerequisites Operating Instructions Test Description Linker and Assembler Directives in the Module Preface and Link Commands Shown in the Environment Statement Module History Sample Routine Preface Standard Calling Sequence 11-3 11-3 11-4 11-4 11-4 11-5 11-6 11-7 Assemble Input 11-8 11-10 - 11-12 11-13 11-13 11-14 Parameters Output Parameters Implicit Inputs Completion Codes 11-14 Block 11-14 11-15 Comment 11-16 11-18 Group Comments Line Comments Declaration of a Condition Handler Continue from a Condition Handler Resignal and Return from a Condition Handler A Table of Addresses and Strings A Data A Macro Structure that Macro Definition Generates Executable 12-190 12-13 12-13 12-14 12-15 Code Creating a Library Include Files Assembly and Link Commands A Special Prompt Message for the $DS_ASKxxX _x Macro A Special Prompt Message that Causes Rejection of Scripted Responses Set Base Command Set Breakpoint Command Clear Breakpoint Command Show Breakpoints Command Set Default Command Example Command Deposit Command Next Command xvii 12-15 12-16 12-16 12-19 13-2 13-2 14-6 14-7 14-7 14-7 14-8 14-8 14-9 14-9 PREFACE This manual presents an overview of the VAX diagnostic philosophy and procedures and an explanation of how to write diagnostic It is written for diagnostic programs for VAX Family computers. engineers who are familiar with the VAX-11l Macro assembly language, VAX hardware, the VAX/VMS operating system, and the You can use the manual as a hardware device to be tested. tutorial guide to diagnostic program development or as a reference for specific features of the diagnostic supervisor and diagnostic macro library. manual consists standards. : The two of Part parts. I the describes VAX It deals with diagnostic diagnostic engineering philosophy. goals, functions, methods, and the structure of the VAX diagnostic It tells you how system. Part II presents system-wide guidelines. with the interface to write a diagnostic program that will ng engineeri diagnostic supervisor and that will conform to DIGITAL ’ Related documentation on VAX systems is listed in the following table. Related Document VAX-11 KA780 Central Processor Technical 7 Description vAX-11 MS780 Memory System Technical Description VAX-11 DW780 Unibus Adaptor Technical ‘ : VAX-11 RH780 Masébus Adaptor Technical Description : | , VAX-11 Diagnostic Systemv User's Guide EK-KA780-TD Microfiche and hard copy EK-MS780-TD Microfiche and hard copy EK-DW780-TD Microfiche and hard copy : : VAX-11] KC788 Console Interface Board Technical Description Media Number Title Description Documents EK-RH780-TD Microfiche and hard copy EK-KC780-TD Microfiche and hard copy EK-DS780-UG Xix : S Hard copy only Related Documents (Cont) Document Number Media EK-DS780-TD Microfiche and hard-copy VAX-11 Macro Language. Reference Manual AA-D@32A-TE Hérd cépy~on1y VAX-11 Manual AA-D@19A-TE Hard Title VAX-11l Diagnostic Technical System Description Linker Reference VAX/WS Guide to Device Driver Writing copy’only - AA-H499A-TE Hérd copy only VAX-11 Text Editing Reference Manual AA-D@29A~TE Hard copy’ohly VAX/VMS System Services Reference Manual AA-DO1A8-TE Hard éopy.oniy VAX/WMS Command Language User's AA-D@23A-TE Hard copy AA-D@28A-TE Hard copy only EB-07466 Hard copy only EB-09987 Hard copy only B EB-08126 Hard copy only EB-07667 Hard copy only EB-15486 Hard | copy a VAX/WMS Guide I/0 Guide User' s VAX-11/788 Handbook Architecture VAX-11/780 Handbook Hardware VAX-11 Software Handbook PDP-11 only Per1pherals Handbook Terminals and Communications Handbook | | only NOTES 1. If you wish to order these manuals from within the United States, call Digital Equipment Corporatlon at either of the From call two numbers listed below. all areas of the (800) 258-1710. United XX : States except New Hampshire, PART VAX DIAGNOSTIC DESIGN 1 ENGINEERING PHILOSOPHY Part I provides an overview of the VAX diagnostic system purposes, metrics, structure, and procedures. Diagnostic engineers must be familiar that with contribute this material in order substantially to the to write effective VAX diagnostic system. programs CHAPTER 1 DIAGNOSTIC USERS AND APPLICATIONS primary attempt by their 1.1 describes chapter This purposes the users and applications is made to introduce the users and DIAGNOSTIC Diagnostic applications. of diagnostic programs for in the DIGITAL environment. An requirements placed on diagnostics USERS programs are used by computer design engineers, manufacturing technicians, and field service or customer engineers. The common denominator of diagnostic users is their requirement for excellent fault detection coverage. Requirements concerning other diagnostic metrics such as program size, run-time, fault isolation, or troubleshooting support, and operational documentation will vary with users 1.1.1 and applications. Computer Design Engineers Computer design engineers rely on design verification test programs to detect functional or design implementation mistakes early in the hardware development phase. Fault (mistake) detection is their main Design engineers have 1little or no concern for program concern. size, run-time, fault isolation and troubleshooting support, or design incomplete or poor But documentation. operational verification test coverage (mistake detection) can result in costly ECOs affecting manufacturing inventories, installed systems, and/or missed development schedules. 1.1.2 Manufacturing Technicians Manufacturing technicians use diagnostics at several levels of the hardware test and repair processes. Diagnostic programs are used to screen (for defects) modules arriving from the module build process. This application requires excellent fault coverage but is usually sensitive to program run-time, thus forcing some design trade-offs between exhaustive testing and acceptable time-to-test. Fault isolation and troubleshooting support is generally not required in module screen diagnostics, since module repair is usually performed at a special purpose repair station utilizing repair tools (eg., GR or microdiagnostics). Also, diagnostic operational documentation is not heavily emphasized because the module screen process is generally automated with the details of diagnostic execution/control masked from the technicians. A second area of manufacturing diagnostic use 1is unit or system test, where CPUs, memory systems, I/O channels, and peripherals are tested either as components or as newly integrated systems. As in module screening, excellent fault detection coverage is required to minimize the number of faults slipping through to later system tests (utilizing operating system software) or customer applications. Diagnostic programs used for unit or system test do not have the severe size and run-time constraints associated with the module screening diagnostics. However, unit and system test diagnostics must provide effective fault isolation and troubleshooting support, since repair is performed on-line, that is, at the time that the 1-1 VAX Diagnostic Design Guide problem more 1is directly also wide detected. important in involved must deal variety of 1.1.3 Field Diagnostic this with operational application diagnostic documentation because execution the and control. with a wide variety of hardware diagnostic programs is needed. becomes technicians are Technicians options; hence, a Field Service Engineers service engineers use diagnostic programs to 1install, maintain, and repair computer systems in countless configurations running countless applications. Their diagnostic requirements include the full spectrum of metrics: fault detection, fault isolation and operational coverage, obvious troubleshooting documentation. fault from isolation, the repair support, The need and and effective for excellent troubleshooting objective of the support field diagnostic fault is detection probably service engineer's run-time parameter task. The need for simple, effective diagnostic operational documentation is based on the variety and complexity of the systems that Field Service engineers support. Often the field service engineer is required to isolate and repair faults in equipment on which he has received little or no recent training. To further complicate the task, details of equipment configuration and options will seldom be known to the field service engineer and, therefore, should not be required in order to execute the diagnostic programs. Default diagnostic test scripts are key elements in the VAX diagnostic operational effectiveness goal. Several diagnostic metrics (such definition) as program partitioning are heavily driven to and achieve the diagnostic operational goals. 1.2 DIAGNOSTIC Often, that APPLICATIONS diagnostic are quite programs are independent of used the in applications ultimate test and or processes repair mission. These applications impose requirements or constraints on the diagnostic programs which, in some cases, conflict with test and repair considerations. Since the ultimate effectiveness of a diagnostic process and program is effectiveness, effective a result both compromise of both of requirements sets solutions programs testing, fault percentage of is local 1isolation, the VAX important operator and diagnostic effectiveness must be and addressed engineered. 1.2.1 Local Operator Application The traditional and probably most diagnostic mission application controlled repair and verification. supervisor command for directed A major functionality and the major diagnostic test design and documentation effort are directed toward local operator effectiveness. Diagnostic scripting, predefined configuration parameter files, and default unit testing are examples of 1local operator test effectiveness tools. Diagnostic Users and Applications summary listing Halt and loop-on-error control, multilevel error reporting, test reports, field replaceable unit (FRU) callout, and isolation diagnostic and repair effectiveness tools. excellence in test and repair support of use, and control effectiveness. 1.2.2 Over Automated Applications the past few years, diagnostic scripts, processed by the via local that are link. In supplied command files processed to the the packaged by the the execution on the supervisor, remote diagnostic local have computer, supervisor script case, or via of a used in predefined The scripting can be diagnostic or ease Automated applications. of diagnostic programs. diagnostic achieve been or of effective, to programs sequences, consists totally implemented operator often centrally controlled, operation be fault operator effectiveness, automated, diagnostic To and designed be must programs local examples of are documentation troubleshooting remote media command diagnostic serial the diagnostic and files host, and communication programs are usually remote script loaded directly from the same local media, although there is at least one VAX diagnostic application in which a 1local script program requests applications, the diagnostic media down-line ‘ diagnostic controlled, have a can loaded be 1loaded from the the host via the from local serial " applications, definite In host. remote the diagnostics or communication link. Automated from loads whether impact locally on diagnostic an Automated or remotely design and Product Test packaging. 1.2.2.1 APT - APT is the control functions (end acronym for pass, error application used throughout DIGITAL Manufacturing. APT employs remote diagnostic scripting with down-line diagnostic program load. Once APT loads a diagnostic program (and the diagnostic supervisor) and starts diagnostic execution, it performs all monitoring and APT-unique diagnostic software of interface supervisor. This and status protocol APT collection) implemented interface is via an in the totally indistinguishable, to diagnostic programs, from local operation, and totally insensitive to command or program output message content and syntax (associated with local diagnostic operation). APT as an application, however, is sensitive to diagnostic operator intervention requirements, and to diagnostic program size and down-line load time. Diagnostic operator intervention, whether for configuration information or for hardware option information, 1is generally unacceptable to the APT application because of the need to create a finite set of test scripts that can be applied to a wide set of possible system configurations and hardware options. (This issue of run-time diagnostic configuration and option selection also applies to local script and local operator diagnostic operation. VAX diagnostic standards specifically disallow mandatory hardware option or test sequence run-time selection.) VAX Diagnostic Design Guide Diagnostic program size and load-time considerations are obvious in time sensitive test processes. Although arbitrary program size reduction will reduce diagnostic fault coverage, thoughtful program partitioning (to allow selective hardware testing) and avoidance of verbose error and status messages (ASCII text) can benefit the diagnostic APT application. | 1.2.2.2 APT-RD application customers with APT-RD becomes call, by - APT-RD utilized 1is by an DIGITAL automated field diagnostic service to provide quick response and effective on-site repair involved shortly after a customer requests a establishing a phone connection with the target control contract action. service system and initiating a diagnostic test session prior to the dispatching of a field service engineer. APT-RD effects remote diagnostic control by issuing to diagnostic load (from supervisor local command sequences, via customer-mounted diagnostic media) the phone and link, execute the appropriate diagnostics. Unlike APT, APT-RD will down-line load diagnostics only in rare situations (such as inability to boot or load from the local diagnostic media). APT-RD scripts use standard supervisor commands and key on ASCII message output (from the supervisor and individual diagnostic programs) for all monitoring and control functions. As an application, APT-RD is extremely sensitive command to and the details response of the messages. supervisor Also, as and diagnostic with APT, program APT-RD is sensitive to diagnostic operator intervention requirements and, to a lesser degree, diagnostic program size and load time. Essentially the APT same diagnostic design considerations that are important to meet application requirements (program partitioning, no mandatory operator addition, (from run-time intervention) are required for APT-RD. 1In APT-RD requires well-defined, documented, and enforced program and standards to program and version implementation. to version) command and message CHAPTER DIAGNOSTIC In this chapter, the term diagnostic metrics 2 PROGRAM METRICS refers to the characteristics, qualities, and attributes that affect the usefulness or effectiveness of diagnostics for their various users and applications. Chapter 1 introduces diagnostic metrics from the standpoint of the diagnostic users and applications. attempts to further define the metrics and relate diagnostic design and development process. Considered Fault Fault in this are the following detection coverage isolation and troubleshooting Diagnostic Diagnostic size execution Operational 2.1 chapter FAULT metrics: support time functionality DETECTION This chapter them to the and documentation COVERAGE Fault detection coverage is the common denominator or basic metric of all diagnostic uses. Inadequate, incomplete fault detection increases repair cost in either of two ways. First, it may defer detection of a fault to a later point in the computer manufacturing process. This results in higher repair or recycling costs. Or it may defer detection of a fault to a higher level diagnostic program (ultimately the customer's application). This results in longer troubleshooting and repair verification time. Effective diagnostic fault detection coverage is achieved through thorough planning and thorough, conscientious implementation. Planning Define the scope of referred to the as desired unit testing. under The test scope of (UUT). testing Avoid is often including functionality that is (or should be) tested by a higher 1level diagnostic program. For example, disk drive faults detected by a program intended to test Jjust the controller will give misleading failure information and probably frustrate repair of the actual fault. Define and minimize the diagnostic hard-core functionality (Paragraph 3.1, Chapter 3) which is used by the diagnostic program in testing the UUT. Faults in the hard-core will result in uncontrolled detection operation) and (i.e., render program crash, fault 1isolation unpredictable program or troubleshooting information ineffective. Hard-core functions should be provided with built-in error detection such as parity or limit checks. The diagnostic program should provide handlers or recovery routines for all abnormal predictable hard-core exception interrupts or machine checks. situations such as VAX Diagnostic Design Guide Develop a diagnostic functional specification that details each logic function to be tested, and the proposed method of test. Carefully document the use of all hardware diagnostic aids such as loopback or special controls, and review the specification with the hardware designer. In addition to mapping out the diagnostic test strategy, the functional goals, and operational functionality, the functional specification also provides a reasonable basis for predicting program size and execution time. Develop a design specification. Do a thorough job implementing the functional specification. Check-off the logic prints as the tests are designed and debugged, and double-check that all significant boundary conditions, exception cases, and interactions are tested. Document during design, not as an afterthought. Subject the diagnostic program to physical fault insertion if feasible and cost justified. (Note that fault insertion has shown conscientiously planned and implemented diagnostics achieve 95 percent fault detection greatest importance provide field listing-based and coverage. payback replaceable troubleshooting Fault for unit insertion diagnostic (FRU) information.) has programs callout 2.2 FAULT ISOLATION AND TROUBLESHOOTING SUPPORT Fault isolation and troubleshooting support that 85 - or are the that detailed the primary functions of repair diagnostic programs. Fault isolation is defined as explicit identification, via error reports, of one or more FRUs. An FRU may be a subassembly (backplane and modules), one or a few modules, or one or a few ICs. Troubleshooting support consists of error reports (short of FRU callout), listing documentation, and operational documentation intended to assist the technician in locating the failing components using scope, logic prints, etc. 2.2.1 Fault Fault Isolation isolation is an ambitious diagnostic undertaking that cannot be achieved without active cooperation from the hardware designer. This cooperation must be in the form of well-defined and controlled FRU functional logic partitioning or FRU interconnect visibility. FRU functional percent) of 1logic the partitioning logic that requires implements a that test (or 99 function all be physically and logically located on one FRU. The implication is that by detecting the fault, the diagnostic program has isolated it to an FRU. Because of module density requirements, tristate bus designs, and function interactions, diagnostic isolation based on FRU functional logic FRU interconnect partitioning visibility rarely requires succeeds. diagnostic read access to logic states and signals that feed or control the test function. When the diagnostic program detects a failure, it gathers the appropriate inputs and control states to determine if the fault is within the test function, or reflecting into the test function from other interacting logic (which may be located in another FRU 2-2 Diagnostic module or <chip). interconnect microdiagnostics Even with PFRU control (QC) effectiveness 2.2.2 Module interconnect visibility (module are level interconnect visibility employed by FRU). visibility, 1is necessary to measure (invariably exposing some Troubleshooting Program Metrics the fault and function VAX-11/780 insertion quality diagnostic FRU 1isolation incorrect callouts). Support Troubleshooting support is a traditional component of virtually all diagnostic programs. Error reports provide the first level of troubleshooting information by supplying the failing test and subtest numbers, a brief statement of the function and test performed, and relevant test data and result data. Unless the user has extensive experience with the diagnostic’ and hardware failure symptoms, the error report information will not, in 1itself, suffice to identify the repair action. However, the report should direct with the the detailed The user to test data the correct and troubleshooting test 1listing test result listing data section which, reported, coupled should provide assistance. documentation, coupled functionality such as loop-on-error, provides documentation. is with operational with a tool for determining the failure source. Unfortunately, effective use of test listing documentation and loop-on-error techniques requires a trained user and well-designed and structured It not prerequisites to be missing, influence level and repair sessions. the The of the potential the implementor to 2.3 DIAGNOSTIC PROGRAM Diagnostic occupied the program by a diagnostic training user. The engineer can, structured, informative maximize uncommon resulting and for user one of in extended engineer expertise however, implement error reports and transfer the of these cannot the greatly diagnostic well-designed, test sections of troubleshooting user. two troubleshooting assistance well that from ' SIZE size is diagnostic measured program at in kilobytes execution (KB) time. of memory Diagnostic programs are comprised of test data, test execution code, environment interface code, and ASCII data. None of these components can be reduced arbitrarily without sacrificing test coverage, operational troubleshooting support functionality, effectiveness. currently affecting diagnostic test functions are grouped into Obviously, program memory size. system be a function single program The program loadable, or only isolation viable and trade-off size, is packaging: executable entities. how size must not exceed the minimum supported Beyond this restriction, program size should of the hardware covering a total test application. For example, a hardware subsystem maximizes local load media and test efficiency. Conversely, several small covering specific hardware subassemblies and modules will APT down-line 1load time in a structured test process manufacturing module screening. programs minimize such as VAX Diagnostic Design Guide Program size can rarely be specified accurately until implementation is well underway. However, it is often necessary to make size estimates earlier than this. Diagnostic functional and program design specifications provide a wuseful basis for generating reasonably accurate size and execution time estimates. Once the diagnostic program is well-defined functionally and structurally, it is quite possible to compare it to other existing programs where visible similarities or differences (affecting size) can be compared. 2.4 DIAGNOSTIC Diagnostic EXECUTION execution TIME time 1is fortunately typically and unusual program test situations. The execution is the elapsed time from start to pass. A test selected UUT selected UUTs primarily the pass may the consist (serial test), (parallel defined by 1least the metric, of or controllable metric except in time of a diagnostic completion of one test completion of all tests for each completion of all tests for all test). the 1least <critical Diagnostic characteristics and execution test time requirements is of UUT. Pure logic tests usually many test passes to Electromechanical positioning delays (pauses) Media result data or data resulting electromechanical, and or in many minutes tape or disk Therefore, loop-back test (disk units to tape) per at in machine a few test media It require 30 minutes diagnostic program such tests, passes of incurs pass. speed, thus allowing seconds or 1less. tests, communication in testing transfer, or tests execute occur a a few minutes not delays uncommon for one media execution disk time 1is head millisecond combination motion is as incur or less. of data that for test can large pass. the least single pass media test controllable metric. However, diagnostic program design should not impose unnecessary pass time requirements by bulldlng iterations into each Finally, test section. the diagnostic engineer should execution time (via the functional specification), review it with the users, test algorithms execution to optimize estimate and and electromechanical program design employ thoughtful and time. 2.5 OPERATIONAL FUNCTIONALITY AND DOCUMENTATION Diagnostic program operational functionality and documentation define the ease of loading and running the diagnostic program and the use and interpretation of the diagnostic program in a troubleshooting and repair situation. Operational functionality is primarily what the diagnostic program and the diagnostic supervisor are capable of providing to the user. Documentation largely defines how easily and effectively the user can take advantage of the functionality. Diagnostic Clearly, operational functionality is a Program Metrics prerequisite for easy, effective diagnostic program use. However, without effective documentation, the operational functionality will go unused. Diagnostic programs are used in two modes: test mode and troubleshooting and repair mode. From an operational standpoint, these two modes have quite different requirements. 2.5.1 Test Mode Diagnostic Functionality Test mode diagnostic use is typically an attempt to answer the question "Is there a hardware fault in the unit, subsystem, or system?" The goal of test mode diagnostic operation is to facilitate the running of all applicable diagnostic programs with as little system configuration, hardware option, and diagnostic knowledge as possible. Only when a fault is detected by a diagnostic program should it be necessary and appropriate for the operator to understand the hardware operation, diagnostic test algorithm, and troubleshooting functionality. The VAX programs) diagnostic system scripts automate, execution use VAX of utilizes to diagnostic diagnostic documented in (supervisor configuration programs. Chapter test mode. 2.5.2 Troubleshooting 5 of and much as Diagnostic supervisor driven as interface this Repair plus unit parameter diagnostic and possible, programs diagnostic the conventions, manual, will Diagnostic test adhering to which operate in mode the are script Functionality Troubleshooting and repair support diagnostic functionality is important once a fault has been detected and reported by a diagnostic program. The effectiveness of the failure isolation and repair process depends on a combination of the diagnostic error report, diagnostic test algorithm and supporting documentation, and the diagnostic operator controls. The error report must inform and direct the repair engineer without overwhelming him with superfluous data. The VAX diagnostics employ a three level error report structure —- header, basic, and extended. The intention is to provide essential test information and function or FRU callout (header), final test status information (basic) , and 1initial and free-form troubleshooting information (extended). The reports should provide this information in structured, controlled packets that can be selectively enabled or disabled according to the ability or need of the Diagnostic diagnostic user test algorithms to use the and their information. supporting documentation are often the final resort troubleshooting guide for the repair engineer. The diagnostic program must clearly define (through documentation and test structure, not through a reading of the code) what the test is doing, and how it is doing it. Hardware VAX Diagnostic Design Guide initialization, initial state) should be formal diagnostic test clearly user data, and identified and training must test results (data and Although some prerequisite for accessible. be a effective diagnostic troubleshooting, the test algorithms and documentation must transfer as much as possible of the diagnostic engineer's hardware and test expertise to non-specialist diagnostic The users. diagnostic element of supervisor's diagnostic troubleshooting test and functions controls subtest long troubleshooting such selection, provided control operator troubleshooting by as controls provide functionality. 1loop-on-error, the halt-on-error, bell-on-error, etc., diagnostics. In general, to all functions are generic final Diagnostic are traditional these diagnostics, and are standardized and implemented largely by the diagnostic supervisor. However, effective use of these functions depends on the diagnostic test design and proper program interface to (interaction with) these functions. VAX DIAGNOSTIC SYSTEM: CHAPTER 3 STRUCTURE AND STRATEGY This chapter describes the structure of the VAX diagnostic system and the underlying strategy behind it. For completeness, the description will include all 1levels of VAX diagnostic programs (from console-based microdiagnostics through diagnostic). However, the emphasis will be level 3.1 2 I/0 diagnostic programs, VAX FAMILY DIAGNOSTIC the the on predominant VMS-based the level type system 3 and required. STRATEGY The VAX architecture is intended computer systems spanning a to be wide implemented in a family of range of product cost, functionality, and diagnostic requirements. diagnostic strategy 1is intended to achieve The VAX Family consistent and appropriate diagnostic effectiveness and functionality across the family, and to minimize the need for redundant diagnostic development and support from Achievement of the diagnostic VAX implementation to implementation. effectiveness and functionality goals is dependent on careful attention to the key diagnostic applications (Chapter 1), metrics (Chapter 2), and adherence to a sound diagnostic development process (Chapter 4). Awareness of the VAX diagnostic strategy and structure rationale will help ensure consistency of implementation. Six program levels make up the VAX diagnostic system, as follows. Level 1 -Level 2R Operating [using system logical -- Diagnostic based queue supervisor-based (restricted) physical (VMS) or virtual QIO) that can be run diaghostic programs diagnostic programs I/0 (QIO)] only under VS (using Certain peripheral diagnostic programs System diagnostic program Level 2 -- Diagnostic supervisor-based diagnostic programs that 1in the or (on-line) run either under WVMS can be standalone mode Bus diagnostic 3 -- physical QIO) interaction program Formatter Level (using Diagnostic and reliability 1level peripheral programs supervisor-based diagnostic can be run in standalone mode only programs that (using direct I/0) Functional level peripheral diagnostic programs Repair level peripheral diagnostic programs CPU cluster diagnostic programs VAX Diagnostic Design Guide Level 4 Console Level -- —-- Standalone macrodiagnostic the supervisor programs Hard-core instruction test Console-based diagnostic programs the standalone mode only that that run can without be run in ~ Microdiagnostics Console program Octal Debugging Technique (ODT) ROM resident power—-up tests LSI-11 diagnostic programs These six program environments: 1levels user, system, operate in cluster, the and context console. of four These four environments, in turn, run within two operating modes: (under VMS) and standalone (without VMS). Figure 3-1 schematic representation of these relationships. The four environments form the basis of the on-line gives a building block diagnostic approach. For each environment a portion of the hardware functions as a hard-core, which is assumed to be good. Specific diagnostic programs operate from the hard-core of this environment to test the hardware in an area beyond the hard-core. The hard-core for each environment consists of the hard-core of the next lower environment plus the area tested in that lower environment. Figure 3-2 shows the building block structure of the diagnostic environments. VAX Diagnostic System: Structure and Strategy 1 LEVEL (VIRTUAL QI0) ON-LINE (CONTROL FROM ANY TERMINAL LEVEL 2R ON SYSTEM) (PHYSICAL QIO) DIAGNOSTIC ______ T TleveLz ] SYSTEM SUPERVISOR (PHYSICAL QIO) ENVIRONMENT STAND ALONE —————— LEVEL3 (DIRECT 1/0) MODE CLUSTER ENVIRONMENT 4 LEVEL (CONTROL FROM (MACHINE-LEVEL) CONSOLE TERMINAL, OFF-LINE) CONSOLE CONSOLE LEVEL ENVIRONMENT (SUB-MACHINE LEVEL) TK-3007 Figure 3-1 VAX Diagnostic Environments, and System: Program Operating Modes Levels, VAX Diagnostic Design Guide USER MODE A l i TN STAND ALONE MODE USER A r | ' ENVIRONMENT ] AREA UNDER | TEST SYSTEM ENVIRONMENT AREA UNDER TEST 'CPU CLUSTER ENVIRONMENT AREA UNDER TEST CONSOLE ENVIRONMENT = ~ B USER ek CONENT SYSTEM AREA UNDER TEST > ENVIRONMENT HARD-CORE CPU CLUSTER CONSOLE HARDWARE ENVIRONMENT HARD-CORE CONSOLE ENVIRONMENT HARD-CORE J J ) TK-3009 Figure 3-2 The Building Block Structure Diagnostic Environments 3-4 of the VAX Diagnostic 3.1.1 Console Environment The console environment operates System: in the system It provides programmer console Strategy only. terminal. The This hardware, software, and operator control functions, fundamental debugging and standalone mode operator controls the system from the environment consists of submachine level firmware. Structure functions, and basic diagnostic functions. Figure 3-3 shows the configuration. The console hardware forms the (kernel) console machine environment hard-core that must be good in order to run the microdiagnostics. Notice that the CPU microcode remains untested in the console environment. From a diagnostic strategy standpoint, the console environment is the most basic, most implementation-specific piece of the diagnostic system. It ranges from the extensive capability and functionality of the VAX 11/780 console (LSI-11 subsystem) to totally ROM based quick verify tests in lower priced VAX CPUs. The VAX console strategy is to the CPU kernel environment (also called kernel logic) diagnostic implement, at minimum, thorough fault detection logic. Fault isolation to a replaceable module integrated circuit where justified by (IC) the will be system, performed on those price, market, and of or VAX systems maintenance strategy. | 3.1.2 CPU Cluster Environment Like the console environment, the CPU cluster environment operates in the standalone mode only. This environment consists of the console environment plus the machine level components (complete CPU, memory, I/0 channels) that support standalone, macro-level program execution. configuration. the The Figure 3-4 hardware microdiagnostics, shows tested forms the in CPU the cluster console environment environment, the hard-core of the environment diagnostic strategy by <cluster environment. The VAX CPU cluster is to implement a small number of 1level 4 and 1level 3 diagnostic programs which, in a building block fashion, test basic CPU/memory functionality, extended CPU/memory functionality, I/0 channel operation, and CPU/memory/I/0 channel/cluster interaction functionality. programs make The full plug-in exerciser effectiveness. I/0 channel use of units and channel cluster loopback (manufacturing interaction diagnostic capability use) to and special maximize test VAX Diagnostic Design Guide P0E-ANL |l8s JHVYMAYVH ainbrg¢-¢9TOSUODJUBWUOITAUZ L# Z# H3HS3I0H4IX3IX3 |:370SNOD IVNIWHI7L0SNOD Ndd 370SNOD aNv Ndd LINIWNOHIANT 431SN19 1S3L 431SN10 | AVYNIWHIL 3TOSNOD JHVMAYHVH anNv @anbigH-€NdD193ISNTDJuswUoITAUY SNESSYVIN Ndd IHVYMAHVH Ndd o# L# V3HYINIWNH3ANNOYIANT VAX Diagnostic System: 43SI10H3X3 Structure and Strategy €0E-MIL VAX Diagnostic Design Guide System and User Environments 3.1.3 The system and user environments environment plus components. In application) the that make the subsystems I/0 up system the consist useful, (disk, of the Unibus, the at cluster system solving application environment, CPU communication, tape, Massbus, DRXXbus interconnect level, the proliferation and variety of I/0 subsystems generate a strong demand for ongoing diagnostic program development. 3.1.3.1 System Environment - The the in terminal. standalone The mode. system environment operates only This environment contains a use must operator wide spectrum console the of diagnostic programs ranging from level 3 repair diagnostics through level 2 The environment level (QI0) device VAX exercisers. system diagnostic strategy is to implement a series of level 3 repair diagnostic programs and level 2 functional diagnostic programs for diagnostic series (level 3 and level 2) designed static basic to logic give function and building-block and maintenance test I/O0 coverage. loopback electromechanical each subsystem. The for each I/0 subsystem is tests timing This (level tests evolves 3) (level from through 3 or 2) to media reliability, acceptance and multidevice exercisers (level 2). Figure 3-5 shows the system environment configuration in a typical VAX system. The hardware tested in the CPU cluster environment forms the 3.1.3.2 hard-core for the system environment. User Environment - The VAX user environment operates in the on-line mode, under VMS. The operator can control the diagnostic process from any terminal on the system, including the console terminal. The user environment includes the level 2 diagnostic programs, which run in the system environment, as well as the level 2R programs, which do not. Many of the diagnostic programs that run in the user environment will run simultaneously with user application programs. However, some, like the system diagnostic program, require exclusive use of the computer system. 3-8 VAX Diagnostic System: LINE PRINTER MODEM TERMINAL ENVIRONMENT AREA UNDER TEST — PRINTER conTROLLER| TAPE ASYNC MUX COMM |CONTROLLER FORMATTER DISK DRIVE DISK DRIVE TAPE FORMATTER | DisK CONTROLLER| DISK |CONTROLLER MASSBUS #1 #2 - EYERCISER MICROCODE EXERCISER UNIBUS INTERFACE MASSBUS | mTERFACE | MEMORY MASSBUS ‘ EXERCISER MASSBUS ilfilgTERFACE ' SYSTEM ENVIRONMENT MASSBUS CPU UNIBUS HARD-CORE | MASSBUS UNIBUS 1 TAPE DRIVE ~——J L_,. SYSTEM TAPE DRIVE TERMINAL Structure and Strategy CPU HARDWARE CONSOLE HARDWARE AND TERMINAL TK-3012 Figure 3-5 System Environment 3-9 VAX Diagnostic Design Guide 3.1.4 Guidelines for the Use of the System and User Environments The following guidelines should help diagnostic engineers to determine the sets of diagnostic levels and functions applicable for their target I/0 subsystems and diagnostic effectiveness requirements. Each 1level possesses a set of diagnostic characteristics and capabilities. However, each 1level imposes constraints as well. 3.1.4.1 A, System Environment Level 3 Diagnostics Diagnostic Capabilities Direct I/0 device access (maximum hardware visibility) Unrestrained use of device maintenance logic, unorthodox command sequences, etc. Microsecond range timer capability Dedicated use of CPU cluster and I/0 channel loopback, functions (i.e. standalone) Tightest scope loops B. c. Constraints Execution in A. only Considerations Performance of all I/0 channel programming functions via the diagnostic supervisor channel services interface (Chapter 5) to achieve VAX system transportability Standalone debug and test facilities are required No 3.1.4.2 standalone mode VMS driver System/User support is Environment required Level 2 Diagnostics Diagnostic Capabilities Physical (privileged) QIO device access Full device functional test capability Millisecond range timer capability VMS (privileged user) and standalone B. Device test in is possible the VMS/application Execution with the VAX system Constraints Device access restricted No direct control over interrupts Share CPU cluster Development c. of VMS time operation execution diagnostic is environment possible. to QIO functions I/0 channel functions and functions physical in I/0 driver user is such as mode required Considerations Appropriate for most functional 1level diagnostic programs where standard VMS support is planned Especially appropriate for lengthy (run-time) reliability or acceptance tests VAX system VMS/diagnostic transportability supervisor 3-10 level 1is 2 achieved interface. media through Structure and Strategy VAX Diagnostic System: 3.1.4.3 A, (Level 2R) System Exerciser Tests Capabilities Concurrent execution and full control of several level 2 or 2R diagnostic programs from one terminal are possible (Paragraph 3.1.5) Three system diagnostic modes are provided: All Quick verify mode Acceptance mode Conversation mode standard modification B. The VAX diagnostic programs run without Constraints implied 3.1.5 2 Execution under VMS only (level 2R) Virtual C. level dedication of Considerations Same as for level 2 system resources to Diagnostic is (Paragraph 3.1.4.2) The VAX System Diagnostic Program (ESXBB) System testing Program runs with the WMS operating system. is a privileged process that ESXBB performs a multiplexer function enabling a single VMS operator terminal to load, start, control (with the full set of diagnostic supervisor functions) and receive test results from any level 2 diagnostic program. Throughout the test session, ESXBB allows the operator to exercise individual diagnostic control and device test selection. CHAPTER 4 DIAGNOSTIC DEVELOPMENT PROCESS This chapter identifies the activities that make up the diagnostic development process. The process presented is general in that it is appropriate for any diagnostic development effort -- large or The presentation small. in that is also specific is heavily it biased toward the DIGITAL diagnostic development process. The diagnostic development process consists of the following major phases: Consultation Planning Implementation QA and release Each phase involves objectives, time and staffing requirements, Although specific objectives, dependencies. external and vary from project to project, will cies requirements, and dependen product requires thoughtful ic diagnost development of an effective attention to each of the development phases. 4.1 CONSULTATION PHASE The consultation phase of diagnostic development information gathering product or engineering is informal an and exchange process that begins as soon as management a to admits project and |is willing or anxious to talk about it. It is usually a part-time effort (less than 25 percent) requiring an experienced diagnostic project leader or technical supervisor to work with engineering, field service, and manufacturing to formulate diagnostic strategy, key project milestones, and preliminary staffing requirements. The consultation phase typically starts before project funding is negotiated and continues through the writing of a cursory project plan (strategy, key milestones, staffing). a of Failure project startup a in involved be to engineer diagnostic for ty consultation phase reduces his opportuni early diagnostic inputs and hinders project team building. 4.2 The PLANNING PHASE diagnostic development planning phase when the cursory diagnostic project plan upon and diagnostic a diagnostic project project plan or leader functional can is 1is in begin reviewed and assigned. specification earnest agreed Then the is written. For moderate to large projects (3 or more diagnostic engineers and/or 9 month or more duration), the following diagnostic planning documents should be developed: Diagnostic project plan Diagnostic functional specification Diagnostic program design specification 4-1 VAX Diagnostic Design Guide For smaller projects, it is appropriate to combine the relevant planning information (project plan, functional specification, and program design specification) into one or two documents. DIGITAL engineers should follow the DIGITAL standards for the diagnostic engineering project plan (7C3-1), functional specification (7C3-2), and program design specification (7C3-3). 4.2.1 Diagnostic Project Plan The diagnostic project plan lays the foundation for the total development effort. It presents, in a single document, an overview of the product and product goals, a statement of diagnostic goals and strategy, a summary of key project and diagnostic development milestones, and estimates of required resources (staff and computer facilities). Often, the project plan is developed in two stages. A Rev 0 project plan requiring from two to several weeks to develop may be followed 1later specifications are written) by the Rev 1 (often after functional or final project plan. Thoughtful development and review of the project plan are prerequisites for all diagnostic development efforts, regardless of their 4,2.2 size or Diagnostic The diagnostic complexity. Functional functional Specification specification is essentially a statement of how the diagnostic goals for each major diagnostic component will be achieved. The functional specification should be developed by the project 1leader or diagnostic engineer responsible for program The implementation. diagnostic facets of and the A. the functional product: development specification diagnostic goals, addresses three diagnostic important requirements, process: Diagnostic Product Goals: Intended users (design manufacturing) engineering, field service, Intended applications (local operator test, repair, APT, APT-RD) Diagnostic metrics (fault detection, isolation, and troubleshooting goals; program size and execution-time goals; operational functionality and documentation s) goal B. Diagnostic Requirements Hardware test and isolation aids (special control logic, partitioning, test visibility) Hardware and software environments (hard-core error detection, minimum memory size and required hardware options, operating system driver) Development requirements (development resources: hardware and software, debug and evaluation resources, project staffing) Diagnostic Development cC. Development Process Key projJect milestones prototype support: what availability, Key process reviews, t) suppor 4.2.3 Diagnostic final assurance (defined in It the Detailed how the diagnostic specification) is to (structured (PDL) an appropriate program level hierarchy IMPLEMENTATION In theory, and the the Such is the case It is transition however, where for well before developed. functionality implemented. are available: charts design often between the phase should both -- PDL descriptions It increases the scheduled, program of useful program engineering final diagnostic activities for diagnostic efforts hardware the representation to detailed PHASE implementation Occasionally, programs to the program flowcharts) -is well worth the initial investment. probability of a high quality, accurately implementation and the timely development maintenance documentation. products, be representation design language of overview 4.3 post-release specification blocks Programming from procedure, specification describes, internal diagnostic program design diagrams Development implementation hierarchy charts Interface HIPO describes functional Several methods of and Design Specification The diagnostic program design working design level, t he implementation. availability) (specification quality Program (engineering breadboard and and when, preliminary release completed events Process debug must design diagnostic product and desirable planning clearly go on phase defined. in parallel. in support of new hardware breadboard and necessary be and prototype verification is to needed, plan or the support are needed could be engineering breadboard and prototype diagnostic support phase as a semiindependent part of a project within the overall diagnostic effort. Based on the timing of engineering hardware support requirements, with respect to the startup of the diagnostic plan and specification effort, it may be necessary, and desirable, to defer detailed diagnostic completion until Obviously the the ‘4.3.1 engineering hardware requirements must be Engineering functional and support dependent design programs diagnostic specification are in place. capabilities and specified during hardware design. Breadboard and Prototype Support The objective of this part of the implementation phase is to provide the hardware engineers with basic hardware debug programs and design verification programs. These programs will be required VAX Diagnostic Design Guide within a few hours to a few days of initial hardware power-on. The level of hardware debug program support and diagnostic engineer support will wvary from project to project. However, hardware design verification programs are normally essential to reduce the propagation of design mistakes into large numbers of prototypes or final systems. The timely debug and development design of the correct verification (needed) programs is set an of early, engineering visible, and important phase in the diagnostic development process. Also, this phase enables the diagnostic engineer to develop the hardware functional understanding and the hardware implementation understanding that 1is essential for specification and implementation of effective diagnostics. The hardware debug and design same verification extent as the effort final requires diagnostic planning and review to the effort. 4.3.2 Final Diagnostic Implementation To the same degree that the engineering breadboard and prototype support diagnostic effort must be focused on engineering hardware debug and design verification needs, the final diagnostic implementation effort must be focused on the diagnostic effectiveness and process needs of field service and manufacturing. Since the needs considerably service not of (Paragraph readily from 1l.1), and the the are and of design diagnostic manufacturing diagnostic significant evaluation manufacturing engineering to However, expertise debug those the transportable environments. knowledge engineering different and and programs field engineer's and are field are service acquired transportable. The final diagnostic implementation phase begins with review of the diagnostic functional and program design specifications and ends when the diagnostic programs are suitable for pre-release. Since this phase of diagnostic implementation is often a critical path for key product milestones (manufacturing startup, design maturity testing, that development the in measurable the planning and stages, phase first tasks pay development between diagnostic program interim diagnostic programs. incompleteness reviewed for off efforts, are possible well early shipment) well-defined, monitored, will product and customer be and For trade-offs is fine as it Good foresight complex may and communicated. support important scheduled reported. here. completion This is understood, have the critical to be need long in or to made provide as deficiencies Schedules interference with should be remaining development and test. Legitimate diagnostic program pre-release can occur when diagnostic development is complete (including debug and test), listing documentation and operational documentation are in final been form, prepared. and a formal quality assurance (QA) checklist has Diagnostic Development Process The diagnostic engineer should prepare the QA checklist according to the goals set up in the functional specification and the VAX diagnostic engineering standards and conventions (see Chapter 14 of this manual for details). is It good practice (required in DIGITAL diagnostic engineering) to conduct a pre-release review of the package (including the planned QA checklist) with hardware engineering, manufacturing and field service -engineering representatives. Support of early manufacturing startup and support of in-house and customer field test units normally require the pre-release of programs. diagnostic 4.4 DIAGNOSTIC QA AND RELEASE PHASE diagnostic stage in the be planned (via the QA checklist, diagnostic user The final development effort leading to formal diagnostic release. reviewed (via metrics (Chapter 2) have to ensure (Chapter been the Chapter 14 of this manual) the pre-release review) applications is process 1) achieved. QA The QA process should and that all diagnostic Execution and specified of the user QA checklist involves detailed diagnostic effectiveness checks, operational functionality checks, and operating environment checks. Depending on hardware availability and diagnostic product complexity, the QA checklist process requires from two to six weeks to complete properly. Full fault insertion QA, required for fault isolating repair diagnostic programs, requires one to two Years of experience in diagnostic weeks per hardware module. program development show that this final QA effort makes the difference between delivering prototype quality diagnostic products and delivering finished, production quality diagnostic products. From the perspective of the diagnostic end user, the vs. (prototype qualities product the between difference production) makes the QA process non-negotiable. PART II SYSTEM-WIDE GUIDELINES Part II describes those features in the VAX diagnostic system common to all diagnostic programs, in particular, those which run In under the VAX diagnostic supervisor (levels 2, 2R, and 3). the for guidelines and standards provides II Part addition, diagnostic engineer concerning program interface with the diagnostic supervisor, proper use of macros and the supervisor library, program structure, and program debugging. CHAPTER 5 DIAGNOSTIC SUPERVISOR BASICS 1is fundamental to the VAX (ESSAA) The diagnostic supervisor Most diagnostic programs developed to test the diagnostic system. central processor, channel adapters, and peripheral devices on VAX Family computers should be designed to interface with the The supervisor is a program that resides in memory supervisor. It provides a framework for together with a diagnostic program. control and diagnostic of execution programs, nondiagnostic services to diagnostic programs. and it provides In addition, the supervisor incorporates all system-specific features of the diagnostic system, enabling transportability of peripheral device diagnostic programs between VAX implementations. for A disk diagnostic, instance, should run on a small VAX system as well as on a VAX-11/780 system. The supervisor CPU runs in three environments: Environments Cluster System Environments User Environments The CPU cluster environment and the system environment operate the standalone mode and In this mode, (without VMS). the diagnostic program have exclusive control in the supervisor of the computer The user environment operates only in the on-line mode system. (under VMS), sharing the computer system with user applications The CPU cluster environment supports (Figure 3-1 in Chapter 3). only the 1level 3 diagnostic programs that test the central The system processor, memory, and the channel adapters. environment supports level 3 and level 2 peripheral device diagnostic programs. The user level 2R diagnostic programs In addition, the CPU level 2 and the system (refer to Chapter 3 for details). cluster environment can be modified environment and for automated product testing (APT). SUPERVISOR FUNCTIONS FOR THE DIAGNOSTIC ENGINEER AND 5.1 The environment supports THE USER common services provided by the three operating environments of the supervisor are necessary for test operation, but they are Incorporation of not directly related to the testing of a device. these functions in the supervisor leaves the diagnostic engineer free to concentrate on the device. supervisor commands includes debug deposit, examine, and breakpoints. In addition, a subset of the and utility features such as VAX Diagnostic The 2R, Design Guide framework that the supervisor provides for VAX level and 1level 3 diagnostic programs frees the operator 2, level from the need to have a detailed knowledge of each program. A general knowledge of the programs to be run and a familiarity with the supervisor commands are sufficient to make good use of the diagnostic programs. The supervisor commands enable the diagnostic programs and to set operator to flags that load and control run the program execution. The control flags and commands are program independent and, therefore, are consistent across the range of diagnostic programs. 5.2 SUPERVISOR MACRO LIBRARY The macros in the supervisor macro library (DIAG.MLB) function as a high 1level diagnostic 1language supplement to the 1language (VAX-11 Macro or Bliss) used by the programmer. These macros fall into three categories, according to the functions they perform and the ways they are implemented. Utility Macros 5.2.1 The utility macros provide a variety of services for the program. The program format utility macros provide assembler and 1linker directives that aid in the interface between the diagnostic program and the supervisor. The program control utility macros enable the program to test specific conditions and to alter the flow of the program. Some of these macros call supervisor services to perform the required functions. Others merely generate in-line executable code. The symbol definition defining many of the macros global These macros dgenerate assembler directives. Refer to Chapter 7 for a more save the programmer great symbols required by most complete explanation of effort by programs. the utility macros. 5.2.2 Supervisor Service Macros The supervisor service macros call supervisor service routines to perform specific functions. They do not, generally, alter the flow of the program. Most of the supervisor routines return status codes. The supervisor service macros call routines that provide the following functions: Program Channel control control Memory management Program delay Error reporting Program-operator System control Hardware P-table dialogue control address retrieval 5-2 Diagnostic Chapter 8 gives a more complete description Supervisor of the Basics supervisor service macros. VMS Service Macros 5.2.3 A subset of the VMS service macros is available to 1level 2 level 2R diagnostic programs. A small number of these macros also available to 1level 3 programs. When the supervisor and are runs on-line, the service calls are mapped through the supervisor to the required VMS routines. In the standalone mode, however, the supervisor emulates these services. Six types of VMS services are available to diagnostic programs: 1/0 services Event flag services Timer services Formatted ASCII output services Memory management services Hibernate and wake services Refer to Chapter 9 for a more compete explanation of the VMS service macros. 5.3 DIAGNOSTIC SUPERVISOR COMMANDS The diagnostic supervisor commands are grouped Program and test sequence Scripting control Execution control Debug and utility control The debug and utility in four sets: control features are listed in Chapter 14. Commands, switches, and literal arguments may be abbreviated to the minimum number of characters necessary to retain their unique identity. For example, the Load command can be specified by a single L, whereas the Start command requires a minimum of ST. In the symbolic command descriptions that follow, certain special characters are employed which require some explanation. Angle brackets, < >, are used to enclose symbolic arguments that are satisfied by a numeric expression or character arguments are enclosed by square brackets, [ ]. indicated with an exclamation point,!. Literal ALL, OFF, and FLAGS are capitalized. Use the line to hyphen, -, continue a command exclamation line. point, Notice that operator follow. string. Optional An OR function is arguments such as as a continuation character at the end of a command from one 1line to the next. Use an !, to separate input is a comment underlined from 1in the a command examples in a that VAX Diagnostic Design Guide 5.3.1 Program/Test Sequence Control Commands These commands enable the operator to select programs and portions of programs and to control the sequence of test execution. Set Load Command SET LOAD <deviced>: [directory]<CR> The Set Load command establishes the storage supervisor will 1load diagnostic programs. command in combination with the Load command DS> SET DS> LOAD device Use or the from which the the Set Load Run command. LOAD DMA@: [SYSMAINT] ESDXA DS> SET LOAD DMAQ: [SYSMAINT] DS> RUN ESDXA Example 5-1 Set Load Command NOTE The directory name, and the square brackets around it, are necessary in the Set Load command. Show Load SHOW LOADKCR> The Show Command Load command causes the device from which diagnostic Load command is given. DS> supervisor programs are to display to be the storage loaded when memory from the SHOW LOAD DMA@: [SYSMAINT] DS> Example Load Command LOAD <file-spec><CR> This command loads default load storage device established on the device. from the 5-2 Show specified The which previous file default the Set Load 5-4 into file program Load Command main extension is .EXE. is is the command. loaded the The device Diagnostic Supervisor Basics Note that you need supply only the five-letter code that jdentifies each diagnostic program for the command line argument <file-spec>. For example: ! Load the local terminal LOAD ESTAA ! Example 5-3 diagnostic program. Load Command Attach Command ATTACH <UUT-type> <link-name> <generic-device-name> . . .<CR> The operator should use several Attach commands, before starting a diagnostic program, to define each unit under test (UUT), and the If you are devices which link it to the SBI, for the supervisor. for each command Attach the testing several units at once, repeat hardware a by defined ly unique device. Every unit under test is designation and a line. The first parameter <UUT-type> is the hardware designation of the For example, RH78¢, TM@3, TEl6, and DZ11 are unit under test. hardware designations. The second parameter <link-name> is the generic name of the piece of hardware that links the unit under test, in most cases through intermediate links, to the main system bus. For example, an RH780 is linked to the SBI. A TU45 is linked to an MTa; and a DZ1l1 is linked to a DWn. You must attach each piece of hardware (with the exception of the SBI) before you can use it as a 1link in an Attach command. The third parameter is the generic device name, which identifies to the supervisor the particular unit to be tested. Use the form "GG" is a 2-character generic device "GGan" for the device name. name (alphabetic). TM"a" is an alphabetic character, specifying the device controller. "n" is a decimal number in the range of #-255, specifying the number of the unit with respect to the controller. Use the unit number, "n" or "a", only if it is applicable to the You must supply additional information for some types of - device. hardware to enable the diagnostic program to address the device. RH780, For example, you must supply the TR and BR numbers for an the controller number for a TM@3, and the CSR vector and BR for a If you include such additional information in the Unibus device. 5-1. Attach command line, use the order and format shown in Table tion informa the but If you do not include additional information, is necessary, the supervisor will prompt you for it. VAX Diagnostic Design Guide Table In Device Naming Conventions Type Link Generic Additional KA780 SBI KAa <G-floating> MS780 RH780 SB1I SBI MSa RHa DW788 <tr> <tr> SBI <br> DWa <tr> <br> DBan RPO7 RHa RPO 6 RHa DBan RPO5 RHa DBan RPO 4 RM@3 RHa RHa DRan RK611 DWa RK@ 7 RK@6 DMa DMa DMa DMan DMan TM@ 3 The 5-1 : Information <H-floating> <WCS-last-address> DBan TE1l6 RHa MTa MTa TU45 MTan MTa MTan TU77 MTa MTan DZ11 DWa TTa <ucsr> <uvector> <ubr> <uvector> <20MA> <ubr> <drive> <ucsr> I DUP1l1 DWa XJan DMC11 <ucsr> <uvector> XMan XMan <ubr> KMC11 DWa DWa <ucsr> <ucsr> <uvector> <uvector> <ubr> <ubr> LP1l1 CR1l1 DWa DWa DR11B LPa CRa DWa <ucsr> ucsr> <uvector> <uvector> ?2?a <ubr> <ubr> <ucsr> PCL11 <uvector> DWa <ubr> ??a <ucsr> <uvector> <ubr> TS04 DWa RL@ 2 ??a RL11 DWa definitions for : the MTan <ucsr> <uvector> <ubr> ??an <ucsr> <uvector> <ubr> ??an <ucsr> <uvector> <ubr> additional fields are: <tr> Adapter TR number <br> Adapter decimal br level 1-15 decimal 4-7 <drive> Massbus {ucsr> Unibus CSR <uvector> Unibus vector <ubr> <EIA> Unibus BR level EIA terminal interface <20MA> 20 the generic "a" "n" is "??" is is mA drive address terminal <EIA> decimal a-7 octal 760000-777776 octal 2-776 decimal 4-7 interface name: a letter from A to Z. a decimal number in the range @-255, a generic device name which may be any 5-6 two letters. Diagnostic DS> ATTACH DW780 SBI DWd 3 4 DS> ATTACH DZ11 DWB TTA CSR?TM 760120 VECTOR? 320 4 BR? Supervisor Basics Attach the DW784. Attach the DZ1l1l TTA. The supervisor prompts for information not supplied in the command line. DS> Attach Command Example 5-4 Select Command SELECT <generic-device-name>[:],-<CR> [<generic-device-name>[:] . . . ] ! ALL<CR> The operator must select each unit to be tested with the Select command, after attaching it. For each wunit, supply the The appropriate generic device name, as shown in Table 5-1. to units of list the to device specified Select command adds the diagnostic next the when effect takes command The be tested. program is started. DS> DS> SELECT TTA: Example 5-5 Select Command Deselect Command DESELECT <generic-device-name>([:] « o o] ! ALLKLKCR> [,<generic-device-name>[:] - Use the Deselect command to remove the name of one or more devices list of from the units to be DS> DESELECT TTA: DS> DESELECT ALL tested. DS> Example 5-6 Deselect Command Show Device Command SHOW DEVICE <generic-device-name>[:]-<CR> [,<generic-device-name>[:] The Show Device command . . .]<CR> causes the supervisor to display the characteristics of the specified devices on the operator's If you omit the device name, the supervisor will list terminal. the characteristics of all attached devices (Example 5-7). VAX Diagnostic Design Guide Show Select Command SHOW SELECT<KCR> The Show Select command causes the display of same is format shown DS> SHOW DMA RK6ll the devices _DW@ DMA Dzll _DW@ SHOW DS> SELECT DS> SHOW command. information in the However, the information that have been previously selected. ' RKO7 DS> _TTA"TM Show Device DEVICE DW780 _TTA the only for _DWgTM "DMA® as 60006009 TR=3. 6013FF20 CSR=00000777440 (0) VECTOR=0008088080210 (0) BR=4. NUMBER=0. BR=5. 6013E@5@ CSR=000888760120(0) VECTOR=00000000320(0) BR=4. 60613E@50 CSR=p@00@760120(0) VECTOR=08000000320 (0) BR=4. 00000000 SELECT TTA: SELECT DZI11 DW@ DS> DESELECT TTA: DS> SHOW , SELECT | , DS> Example 5-7 Start Show Device and Show Select Commands Command START [/SECTION:<section-name>]-<CR> [/TEST:<first>[:<last>!/SUBTEST:<num>]]-<CR> [ /PASSES:<count>]<CR> The Start command causes the diagnostic supervisor to pass control to the initialize routine in the diagnostic program in memory, thus beginning program execution. Each diagnostic program is organized in discrete tests. The tests are grouped in sections, according to their functions, execution times, and whether or not there is need for operator interaction. If the Start command is given without switches, the program will run the tests in the default section. 1In other words, the initial setting tests the for that default operator The in Section have a only the tests do DEFAULT. designed section. The by Default the supervisor diagnostic section tests calls only engineer should to not those run in require intervention. SECTION the data When is been switch, if structures section tests not is required, must be set up by the programmer section of the program (Chapters 6 and 7). selected that require it in conjunction contains operator will be with intervention. 5-8 the executed. Start command, Default section Diagnostic Supervisor Basics If the The TEST switch is used in two distinctly different ways. r superviso the specified, are arguments last and first last, through sequentially passes control to tests first If the first argument is combined with the SUBTEST inclusively. switch, program execution begins at the beginning of the first If the SUBTEST at the end of the subtest num. test and terminates the operator switch, switch is used in conjunction with the PASSES case, only this In y. is provided with a loop-on-subtest capabilit the subtest named in the command line is executed, once looping begins. If the TEST switch is not specified, all tests within the named 1In other words, the default section of the program are executed. for TEST is TEST 1 through TEST n, where TEST n is the highest numbered test in the section. specified with the TEST switch, If only the first argument 1is the last argument is assumed by default to be the highest numbered test within the program. Tests are run only if they are included in the section named. Test If the PASSES switch is not used, the default value is 1. 1. is passes for value and pass numbers are decimal, the minimum context. this in The maximum value is @, which means infinity VAX Diagnostic For Design Guide example: DS> START ! Start execution of the ! diagnostic DS> DS> START/SEC: MANUAL START /SEC : MANUAL /TEST:32:33 program Start execution manual section Run in tests the tests 32 may unless not the of of and manual in memory. the the 33 program. if they section. Some be are executed section is specified. DS> DS> START /TEST:6:12 START /TEST:9 /SUBTEST:5 Run tests 11, 12. Run 3, START /TEST:9 9, 7, 8, 9, subtests 5. 19, 1, 2, Run tests 9 through n, where n is the last test the default section. DS> START /PASS: 3 DS> START /TEST:9 /SUBTEST /PASS: :5 in Run 3 passes of the default section. G fem g & DS> test 4, 6, Example 5-8 5-10 Execute test 3, 9, 4, and then indefinitely. Start Command subtests loop on 1, 2, subtest 5 Diagnostic Supervisor Basics Run Command <file-spec>[/SECTION:<section-name>]-<CR> RUN [/TEST:<first>[:<last>!/SUBTEST:<num>]]-<CR> <CR> [ /PASSES:<count>] The Run Run is equivalent to a Load and Start command sequence. command switches are identical to those in the Start command. For example: DS> RUN DS> RUN ESTAA/SEC:MANUAL Load and run the local terminal diagnostic. ESTAA Load the local diagnostic and manual Load DS> RUN ESTAA/SEC:MANUAL/TEST:32:33 terminal run the section. the local diagnostic 32 and 33 and in terminal run tests the manual section. Load DS> RUN ESTAA/TEST:6:12 the local diagnostic and terminal run tests Load the local terminal DS> RUN ESTAA/TEST:9/SUBTEST:5 diagnostic and run test 9, Load the local terminal diagnostic and run tests 9 through n, where n is the last test in the default | section. DS> RUN ESTAA/TEST:9 Load DS> RUN ESTAA/PASS:3 the local diagnostic and terminal run three passes. DS> RUN ESTAA/TEST:9/SUBTEST:5/PASS:0@ Load the local terminal diagnostic, execute test 9, subtests 1, 2, 3, 4, and then loop on subtest 5 indefinitely. Example 5-9 5-11 Run Command VAX Diagnostic Design Guide Summary Command SUMMARY<CR> This command causes the execution of the program's summary report code section, which prints statistical reports. Note that this command 1is generally used only after running a pass of a diagnostic any time, program. However, and would Program is Reliability to the summary command can be used at be wuseful, for example, when the Disk run. Type Control C first to return control the command 1line interpreter (CLI). Then type SUMMARY to obtain a statistical report on the program. CONTINUE may be typed at this point, if the operator wishes to resume program execution . Control C Command “C<CR> Normally the a CLI Control in the C returns diagnostic command wait terminal. C is the The Continue Command state and operator control from a diagnostic program to supervisor. The supervisor then enters displays may then the issue DS> prompt any valid on the operator's command. Control only diagnostic supervisor command that may be issued while a program is running. When a diagnostic program is running in conversation mode, Control C returns control to a command interpreter within the program for the conversation mode. CONTINUE<CR> This command causes program execution to resume at the point at which the program was suspended. This command is used to proceed from a breakpoint, error halt, summary, or Control C situation. The can and following example shows how Control C, Summary, and Continue be used together to obtain statistics on the program being run to then resume execution. 5-12 Diagnostic Supervisor Basics ...Program is running... Operator types Control supervisor prompt DS> SUMMARY Operator requests statistical C. , report. Statistical Report DS> supervisor CONTINUE Operator resumption ...Program Example 5-10 is prompt requests of program. running... Use of Control C, Summary, and Continue Commands Abort Command ABORT<KCR> This command passes control to the program's cleanup code and then returns control to the supervisor, which enters a command wait state and displays the supervisor prompt, DS>. At this point the operator may issue any command except Continue. Example 5-11 shows how the Abort command can be used together with Control C and Summary. ...Program is running... ~C Operator types Control supervisor prompt DS> SUMMARY Operator C. requests statistical report. Statistical Report DS> ABORT ! DS> Example 5-11 Use of Control C, 5-13 supervisor ! Operator ! cleanup ! supervisor Summary, prompt requests and and program termination. prompt Abort Commands VAX Diagnostic Design Guide 5.3.2 Scripting The scripting feature operator to run in the predefined supervisor sequences enables of the computer diagnostic programs automatically. Supervisor commands normally solicited operator's terminal are instead taken from a text file. 5.3.2.1 Scripting from the Command @[load-device: [directory]]<file-spec><CR> This command causes the supervisor to execute the commands that it finds in the command file specified. You should build the command file with a text editor before starting the supervisor, and then copy the command file on the diagnostic program load device. When you execute assumes from that which the command the the load file from the supervisor, the supervisor device for the command is the supervisor was loaded. If file the load device device is different, specify the device and the directory for the either with the scripting command or with a preceding Set command. S Example 5-12 shows a typical command file. Example 5-13 shows file Load how the file can be used. Notice that in Example 5-13 the load device is specified, but the file type and version are not spec1f1ed When the operator does not supply the file type and_ version number, the superv1sor applles the defaults “.COM a". o DS> ATTACH DW780 DS> ATTACH DZ1l1l DS> SELECT TTA: DS> RUN SBI DW@ DW@ TTA 3 4 76fll?fl 320 4 ESDAA/PASS:3 Example 5-12 A - The author supply the of DS> Typical Command NOTE the at command the COPY of must each CMD.COM DMAfl[TEST] S RUN ESSAA DS> file beginning line. $ File “ @DBAQ [TEST]CMD Example 5-13 Execution of a Typical Command File NOTE The square brackets around the name, [TEST], are necessary. 5-14 directory Diagnostic Supervisor Basics Diagnostic programs should not solicit information from Exceptions circumstances. operator, except under unusual manual intervention programs that write tests and on disks. the are volume verification failures for Responses to questions of this nature should come from the operator, not from a Therefore, script files contain only supervisor commands. script. All of the $DS_ASKxxxX X supervisor services (Chapter 8) will prompt the operator at the terminal regardless of the state of scripting. Synchronization between the script and the supervisor is not a problem, since each line in the script is a separate and complete supervisor command exactly command. as if it had The supervisor interprets The supervisor processes been typed on the each operator's terminal. 5.3.2.2 command @ Command roughly as Processing - follows. supervisor the The 2. A DSSLOAD command reads the whole script at once into a buffer. This prevents interaction between the unit under test and the 1load unit. Any interaction might cause interpretation current of unit, program if @ 1. incorrect aborts the necessary. controller, or channel first line of status. 3. The supervisor 4, The supervisor sets a flag to 1indicate command is to be taken from the script. 5. As the supervisor processes the commands in the script, it displays the prompt and command text on the operator's script. the initializes a pointer to the that the next terminal. 6. 5.3.2.3 When "@ the exhausted, supervisor the types <EOF>". Buffer dynamically control and script has been Allocation allocates position and Script the memory information. Nesting buffer Each - The supervisor for script text and script descriptor |is linked to previous script descriptors. This allows you to nest scripts. The amount of memory available on a given VAX computer system limits the number of nesting levels possible. You can invoke script nesting with an "@<file-spec>" command within a script. The supervisor processes commands from the second script file until it reaches the end of the script. The supervisor then releases the second script and resumes processing commands from the first script. If no previous script is left unprocessed, control returns to the operator's terminal. 5-15 VAX Diagnostic Design Guide 5.3.2.4 Interrupting the Script - The operator may type Control on the terminal to interrupt the script, if necessary. Control causes the supervisor to suspend the script and stop the C C current program, if a program is. running. The operator can issue any command while the script is suspended. However, if the operator wants to resume the script, eventually, by typing CONTINUE, the selection of commands is limited. These commands can be followed by resumption of the program. Set Clear Examine Deposit Show Summary Next Continue The following commands flush all scripts and command line interpreter in the supervisor: return control would be to the Attach Select Deselect Load Start Run Abort In general, a to continue the 5.3.2.5 command Command script File flushes after scripts the Format - if command A it has command been meaningless executed. procedure must be a contiguous ASCII file created by VAX-11 RMS (record management services) on an ODS-1 or ODS-2 disk file structure. The file must be line oriented and records must not exceed 72 characters. You can create VMS Create a command procedure command. The supervisor commands. in a script. Any file with supervisor legitimate 5.3.3 Execution Control Functions The execution control functions allow any editor treats supervisor the all or command operator with the records to is as wvalid alter the characteristics of the diagnostic programs and the diagnostic supervisor. These functions are implemented by command flags and event flags. The command flags are used to control the printing of error messages, ringing the bell, halting and looping of the program, and so on. 5-16 Diagnostic Supervisor Basics Set Flags Command SET [FLAGS] <arg-list><CR> This command results in the setting of the execution control flags No other flags are affected. specified by arg-list. a string of flag mnemonics from the following table, Arg-list is separated by commas. HALT When the program detects a Halt on error detection. failure and if this flag is set, the supervisor enters a after state wait command messages error all The associated with the failure have been output. the abort or restart, continue, then may operator Loop the over precedence takes flag This program. flag. LOOP When set, this flag causes the program Loop on error. to enter a predetermined scope loop on a test or subtest that detects a failure. the program. Set the IE1 flag if Looping will 1inhibit error messages. you want to to the control returns operator the until continue The command. C Control the using by supervisor and flag the clear continue, operator may then or continue, BELL IEl IE2 Bell on abort error. When set, this flag will error messages at level 1. When cause supervisor to send a bell to the operator whenever program detects a failure. Inhibit flag suppresses all error messages, except are forced by the program or supervisor. set, those the the this that Inhibit error messages at level 2. When set, this flag suppresses basic and extended information concerning the failure. Only the header information message (first three 1lines) 1is output for each When set, this failure. IE3 Inhibit flag error failure. are output IES QUICK messages suppresses Inhibit The for header each summary suppresses at extended and level 3. basic information information failure. report. statistical When concerning set, report messages. the messages this flag When set, this flag indicates to the Quick verify. program that the operator wants a quick verify mode of The interpretation of this flag is program operation. (Refer to Chapter 7, Paragraph 7.3.2.) dependent. 5-17 VAX Diagnostic Design Guide TRACE Report flag the execution causes each Operator the of present. control When that test. When to report within the test dispatches supervisor each supervisor individual supervisor OPERATOR the to set, this execution of program as the that this set, the test. flag indicates to operator interaction is possible. When cleared, the supervisor and the program take appropriate actions to ensure that the test session continues without an operator. (Refer to Chapter 7, Paragraph PROMPT - Display to the limits 7.3.3.) long dialogue. When set, this flag indicates supervisor that the operator wants to see the and defaults for all questions printed by the program. ALL All Clear Flags CLEAR [FLAGS] flags in this Command <arg-list><CR> This command results in the clearing 6f the arg-list. No other flags flag mnemonics separated supported arguments. Set Flags Default SET FLAGS DEFAULT<LCR> This The list. command default affected. by commas. flags specified by Arg-list See the is a Set string command of for Command returns flag are all settings flags to their initial default are OPERATOR and PROMPT. status. Show Flags Command SHOW FLAGS<KCR> This command displays all the execution control flags and their The flags are displayed as two mnemonic lists; those flags that are set, the other for those that current status. one list is for are clear. The following Show Flags DS> SET DS> DS> CLEAR example commands FLAG shows can be how the TRACE FLAG Set Flags, Clear Flags, and coordinated. QUICK ! Set ! Clear the TRACE the flag. QUICK flag. SHOW FLAGS CONTROL FLAGS SET: CONTROL FLAGS CLEAR: PROMPT, QUICK, OPER, I1IES, TRACE I1E3, IE2, IE1l, BELL, LOOP, DS > Example 5-14 Use of the 5-18 Flag Control Commands HALT Diagnostic Supervisor Basics Set Event Flags Command [FLAGS] SET EVENT <arg-1list> ALL<KCR> ! This command results in the setting of the event flags specified Arg-list is a No other event flags are affected. by arg-list. strIng of flag numbers in the range of 1-23, separated by commas. ALL may be specified instead of arg-list. Event flags are status posting bits maintained by VMS and the Diagnostic programs can use event flags to perform a supervisor. variety of signaling functions, including communication with the operator. The diagnostic engineer should follow three event flag conventions in particular. (EVg) Event Flag 1 (EV1l) is reserved connection with QIO functions. b. clear) Event under VMS. (EV2) enables (when set) the supervisor or disables in (when or disables (when under VMS. retries clear) for enables (when set) logging error Event Flag 2 c. Clear @ Event Flag a. Flags Command CLEAR EVENT [FLAGS] This command <arg-list> results by arg-list. ! ALL<KCR> in the clearing of No other numbers event string of flag in Show Event Flags Command SHOW EVENT [FLAGS]<CR> the flags the event are affected. range of 1-23, flags separated An optional ALL may be specified instead of arg-list. supervisor This command causes the to display a specified Arg-list list of by is a commas. the event flags that are currently set. Example 5-15 shows how the Set Event Flags, Clear Event Flags, and Show Event DS> SET Flags commands can be coordinated. EVENT FLAGS 1, DS> CLEAR EVENT FLAGS DS> SHOW EVENT EVENT FLAGS 9, 2, 15 6 FLAGS SET: 15, 9, 1 DS> Example 5-15 Event Flags Control Commands VAX Diagnostic Design Guide 5.4 SUPERVISOR FUNCTIONAL DESCRIPTION Most functions categories: of the diagnostic supervisor command line interpreter (CLI) and fall into program two interface (PGI). Together these categories of functions form the framework within which 1level 2, 2R, and 3 diagnostic programs must be executed. The CLI forms the interface between the operator's terminal, the supervisor, and the program to be run. The program interface the handles communication between supervisor. the PGI to The CLI program and the CLI and operator's implements together prompt the diagnostic Figure 5-1 shows the relationship of with symbol, the operator. When interprets it terminal the supervisor supervisor DS>, when the and and it operator the the device commands debug commands. types a is waiting dispatches for listed The a command, under to an called routines previously, CLI displays command a control test. parser in from the appropriate a the CLI action routine. Depending desired on diagnostic command, the then prompt on the then For parser another turn and program. the Control command, command, function returns pass control instance, will call to the a CLI, the operator's however, the CLI initiates diagnostic in back response routine which calls the will the to that causes terminal. program to perform CLI a or the FLAG IE2 the flag. to START display In response dispatch the SET sets routine, a which execution. DIAGNOSTIC SUPERVISOR CLI DIAGNOSTIC SET FLAGS, ETC PROGRAM OPERATOR'S TERMINAL o SERVICE PGI < S%N'NES' 4 . ! / | L; o 1 DIRECT I/0 uniT UNDER TEST CHANNEL SERVICES AND QUEUE I/Q SERVICES TK-1736 Figure 5-1 Diagnostic Supervisor Functional 5-20 the to Block Diagram of in Diagnostic Supervisor Basics program The message handling routines that the implements interface control program services, memory management services, services, channel The dispatch routine calls the services, and 1/0 services. program in the proper sequence ic diagnost various routines of the The n, and cleanup). 2,...test test 1, (initialization, test make the up diagnostic call turn, in program, different service routines in the PGI as needed. Figure 5-2 is a simplified flowchart showing how the CLI and the of interface supervisor the PGI portions This figure highlights two program. particular. not routines an features of the diagnostic (initialization, 5-3 diagnostic The shows the test 1, It extends space from always starts FC@@ at to etc.) consists of that are system memory diagnostic program space supervisor mailbox system in Second, the diagnostic program program. independent dispatch routine in the supervisor. Figure | First, control begins and ends with the DS> prompt in the CLI portion of the supervisor. is diagnostic a with o a FFFF. address The diagnostic program and the APT mailbox and are available for use as memory buffers. 5-21 by the : allocation. The address 200. starts at virtual virtual series of called APT 10000. The the supervisor spaces above between the - VAX Diagnostic Design Guide DIAGNOSTIC SUPERVISOR l DIAGNOSTIC ' CLI PROGRAM -~ “DS>" PROMPT INITIALIZE PROGRAM I CONTEXT _____15___ CLEANUP I DISPATCH ROUTINE INITIALIZE DEVICE P J " ' TEST 1 i l YES SERVICE ' CONTROL- NO l Figure 5-2 TESTN (LAST TEST) . l ROUTINES ° - : I PGI . l TK-1738 Diagnostic Supervisor and Program Interaction 5-22 Diagnostic Diagnostic Supervisor 0 200 DIAGNOSTIC PROGRAM v P — SPACE AVAILABLE FOR MEMORY BUFFERS ' FC00 APT MAILBOX DIAGNOSTIC 1 SUPERVISOR ] ' SPACE AVAILABLE FOR MEMORY BUFFERS TK-1737 Figure 5-3 Diagnostic System Memory Allocation 5-23 Basics CHAPTER 6 DIAGNOSTIC 6.1 OVERALL PROGRAM PROGRAM STRUCTURE AND DESIGN STRUCTURE diagnostic VAX software, programs are organized 1in program sections, modules, routines, subroutines, and data and the structures. Once a diagnostic program has been developed, Like all source have modules the have following been assembled and Header the listing Module Nonexecutable Header Section Declaration Section Include Files Program Header Data Code Module preface. Macro library declarations. Parameters that define programs to supervisor. ) Block Dispatch Table Program Equates Table of test addresses. Area for macro and definitions. Program Data Area for one test. Device Register Contents Statistics Table Character String Type Program Section Names Device Mnemonics List Names of Device their Bits ASCII should Function Section Program linked, format. Table Working Routine Summary Report Routine more than storage. Data ASCII strings. Information for ASCII strings. supervisor. and ASCII strings. Message texts for Routine by to be used in conjunction with the summary report routine. Executable Initialization used Statistics Registers Messages Cleanup data symbol error reports. to original Code Initialize device. Restore device condition. Print statistics. VAX Diagnostic Design Guide Subroutine and Test Modules Section Function Nonexecutable Code Global Module Header Declaration Equated Own Subroutine Module Section Section Symbols Storage Executable Program Global Subroutines Code Common services. Test Modules Nonexecutable Code Module Header Section Declarations Section Equated Own Symbols Storage Executable Test 1 -- Test 1 -- Test n -- description Test n —- code that the Notice Code description code tests subtests placed at the form the heart tests program., checks a In a functional level program, major function of the device or check separable parts of the exercise and are However, end of of the any listing. diagnostic each test exercises or under test. Subtests function to be tested. In a repair level program, tests check major logic areas, while subtests check subordinate 1logic areas. The sequence of tests should be designed and arranged in a building block structure. A minimum set of logic or functions should be tested first. After basic operations have been verified, a larger and more complex set of logic or functions should be tested, using the previously tested block or strategy enables possible. a base area that is known to the programmer to define errors be as good. This precisely as Diagnostic Program Structure and Design You should functions group and the run-time tests into sections, requirements. Each according diagnostic to their program should have a default section, which contains the basic tests and will run without operator intervention. Examples of other section follow: types manual intervention section loopback section media test section The remainder of the diagnostic program provides support for the The initialization and cleanup code sections form an tests. The global subroutines can be envelope around test execution. called from the tests to perform common services such as error The data structures at the beginning of the program reporting. e provide supervisor interface information, test patterns, messag and texts, symbol definitions, other test-related working storage areas in memory. information, and a test Files containing templates for the header module program ostic diagn module, the diagnostic macro library, and other ring. Enginee development tools are available from VAX Diagnostic te a comple first In developing a program, the programmer should design a and project plan, a functional specification, should then specification (refer to Chapter 4 of this manual). He the program. code build on the header and test module templates to Diagnostic programs that follow this standard, modular formatto are be easy to develop, debug, and maintain. The format has proven It provides a good interface with the supervisor, and reliable. it conforms to standard DIGITAL software methodology. 6.2 PROGRAM HEADER MODULE 6.2.1 Program Header Section (Module Preface) m The program header section is the first item in the first progra the of uses module. This section defines the functions and the line program for the user. Except for the first two lines,t, each data not begins with a semicolon to indicate that it is a commen The program header section consists of the or executable code. following items in the order given. a. A .TITLE statement specifying the program name. . TheA title is a symbol of up to 15 characters in length phrase indicating the program function should follow on The TITLE statement is always the first the same line. line of the b. file. An .IDENT statement indicating the program's current version number. The IDENT statement is always the second line of the file. VAX Diagnostic Design Guide Standard DIGITAL legal capital letters in the notices. These source program. A facility VAX A short functional extensive separate listing statement: program program as a description abstract statement: The program A detailed that preface. current versions, the version. This of description Environment author, Diaghostic VAX date, edit the should program history. modifier, and item also lists This be typed in System. program. should Diagnostic and should be be A given attached more in to a the Supervisor. version item number. specifies the last date of the specific changes the each made between base 1levels (during production) or releases, providing a short, functional description of each problem and 1its solution, as well as appropriate reference information, such as SPR number(s), etc. The comments include the full name of the person responsible for each version. If several people modify the module, the initials of the others appear in each edit line. Example 6-1 shows a program header 6-4 module preface. ZZ ABCDE /V1.1-2/ DEVICE-X REPAIR LEVEL DIAGNOSTIC COPYRIGHT DIGITAL THIS (C) 1978, 1979 EQUIPMENT CORPORATION, SOFTWARE IS FURNISHED UNDER A MASSACHUSETTS LICENSE AND MAY BE COPIED COPYRIGHT NOTICE. FOR USE 01754 ONLY ON ONLY WITH THE THIS SOFTWARE, SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN W N W THE Ny WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT Ne DEC. BY DIGITAL VNP NE IN A OR W W SINGLE COMPUTER SYSTEM INCLUSION OF THE ABOVE MAYNARD, W NI Wy % W e We Wy W .TITLE .IDENT Program Structure and Design ANY OTHER COPIES THEREOF, MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE ‘ CORPORATION. ++ Facility: VAX-11 Diagnostic System. Abstract: The program consists of two subtests in one test. The subtests are executed via commands by the user. The test routine uses the command parser in conjunction with syntax W command Mo Ve a Author: MY WE WE We NE W e VG WE We WO Ve EQUIPMENT Environment: Modified By: N WO WO -Jgownbdwn -+ Diagnostic tree. VAX Diagnostic Supervisor. Ted Bear Jim Skunk 1-NOV-78 Version V1.0. 1-DEC-78 Added Quick Verify. Version V1.1. Example 6-1 A Program Header Module Preface New VAX Diagnostic Design Guide 6.2.2 Module Declarations Section The module declarations section contains the data structures the entire program. The following items should be given. The 1Include library Files (DIAG) and section any names other the diagnostic 1libraries referenced for macro by the program. Definition Equated macro Example also 6-2 local symbols. and symbols may of a set macros This of (user-defined section other consists macros that macros). of the define $DS the BGNMOD keyword for macros in the diagnostic macro library. equate local symbols to literal values. shows a typical declaration section for the You header module. 39 49 41 .SBTTL Declarations ; ; 42 43 Include Files: ; .Library \DIAG\ 44 45 ; 46 47 48 ; ; 49 50 ; ; 51 52 ; ; VAX Diagnostic Macro Library. Macros: Equated Symbols: $DS_BGNMOD ; DIAGNOSTIC 53 MACRO <SEP_REPAIR> LIBRARY V4.03 "DIAG.MLB (516)" 54 55 56 $DS_BITDEF $DS CHDEF GLOBAL GLOBAL ; ; mnemonic bit definitions channel service symbols $DS_DSADEF $DS_DSSDEF 57 GLOBAL GLOBAL $DS_ERRDEF ; ; GLOBAL 58 59 60 $DS_PARDEF GLOBAL $DS_CLIDEF $DS_PRINTX DEF ; offsets in supervisor/APT mailbox supervisor service entry vectors 61 62 63 NOP SUB1 SUB2 = = = 2 1 2 Example 6-2 error call parameter parameter ; ; syntax tree symbols and literals Print call parameter offsets ; ; ; no action select subroutine select subroutine Declarations 6-6 code offsets ; symbols Section #1 #2 Diagnostic Program Structure and Design 53 is not numbered. The Notice that the line between lines 52 and assembler expands the $DS _BGNMOD mode to generate the line that follows. The Program Header Data Block program section contains ° program parameters that allow the diagnostic supervisor to control the program. The diagnostic supervisor looks for this information beginning at virtual address 200 (hex). The $DS_HEADER macro, together with appropriate arguments, Example 6-3 shows a creates the header data block. ‘typical program header data block after module assembly. 64 .SBTTL Program Header Data Block. 65 ;++ 67 ; 66 ; Functional Description 68 ; The program header data block contains the parameters the 69 ; which allow the diagnostic supervisor to control for the header 7¢ ; program. The diagnostic supervisor looks 200 (hex). 71 ; information beginning at virtual address 72 ; 73 ;-- 74 $DS_HEADER LSL HEADLENGTH: <DEVICE-X REPAIR LEVEL DIAGNOSTIC>, REV=01, DEPO=0, NUNIT=4 .SAVE .PSECT S$HEADER, PAGE, NOEXE, NOWRT .LONG AHEADEND-. ;LENGTH OF THE HEADE ;:DATA BLOCK. L$L_ENVIRON: .LONG $ENV ; PROGRAM ENVIRONMENT. L$L_UPDATE: L$A_ LASTAD: .LONG 0 .ADDRESS LASTAD ;DIAGNOSTIC ENGINEERING PATCH ORDER. ;FIRST FREE LOCATION AFTER PROGRAM. L$A NAME: L$L REV: L$SA DTP: L$A _DEVP: L$L_UNIT: L$A_DREG: ; PROGRAM NAME TEXT ADDRESS. ; PROGRAM REVISION LEVEL. .ADDRESS TNAME .LONG 01 .ADDRESS DISPATCH .ADDRESS AL DEVTYP .LONG 1 .ADDRESS DEV_REG .LONG 8[5] L$A_ICP: .ADDRESS INITIALIZE L$SA-REPP: LSA_STATAB: .ADDRESS SUMMARY .ADDRESS # L$A_CCP: L$L_ERRTYP: L $A-SECNAM: L$A_TSTCNT: A_HEADEND: T-NAME: LASTAD: L-TSTCNT: ;TEST DISPATCH TABLE POINTER. ;DEVICE TYPE LIST POINTER. ;NUMBER OF UNITS THAT CAN BE TESTED. ;DEVICE REGISTER CONTENTS TABLE POINTER ;INITIALIZATION CODE POINTER. .ADDRESS CLEAN-UP ;CLEAN-UP CODE POINTER. .LONG 0 ;4 OF TYPES OS $ERRSOFT AND S$SERRHARD. ; SUMMARY REPORT CODE POINTER. ;STATISTIC TABLE POINTER. .ADDRESS SECTION .ADDRESS L-TSTCNT ;LIST OF SECTION NAME ADDRESSES. ;POINTER TO NUMBER OF TESTS. .ASCIC \DEVICE-X REPAIR LEVEL DIAGNOSTIC\ .PSECT _LAST, PAGE .PSECT STSTCNT, NOEXE, NOWRT, OVR, LONG .RESTORE Example 6-3 Program Header Data Block VAX Diagnostic Notice Block Design Guide that is ) the line numbers stop at 74; the Progr am Header created by the $DS-HEADER macro at assembly time. The Dispatch macro. This program macro section generates a contains the new a psect, Data $DS_DISPATCH beginning tag, address label, and ending tag for the dispatch table. The actual entries in the dispatch table are create d at link time by use of the $DS BGNTEST macro at the beginning of each test. When fully put together, the dispatch table consists of a list of addresses point ing to the beginning of each test. The supervisor accesses this table when sequencing through the tests in the program. Example 6-4 shows how the dispatch table 76 77 78 ; 79 80 81 82 ; ; ; ; 83 84 85 ; ; ;-- ; ++ 86 87 .SBTTL $DS DISPATCH psect. Dispatch Functional macro is used to create the Table. Description: The dispatch table is a collection of information describing each test and grouped together into a contiguous list by the linker. This is done by defining a psect called dispatch. $DS_DISPATCH -.SAVE .PSECT DISPATCH, . PSECT DISPATCH_X, DISPATCH: .LONG LONG, NOWRT, NOEXE LONG, NOWRT, Table Psect @ (6] NOEXE «RESTORE Example ° 6-4 Dispatch The basic hardware P-table supervisor. One entry is operator-selected Each device. entry contains located by using the and each nine items. P-table entries are $DS GPHARD supervisor service call; of the offsets. The symbolic shows the offsets. P-table SDS_BGNHARD or entry are provided by the dynamically built for each items can be accessed with symbolic offsets are defined by either the $DS_HPODEF format. macro Table statement. 6-1 shows Example the 6-5 symbolic Diagnostic Program Structure and Design device name quadword descriptor size drive "_"; a including name device ASCII name device in maximum of 11 characters device address direct virtual address address of P-table for link to Vector ASCII device the CPU type; maximum of characters 11 device dependent information Example Table 6-1 Symbol HP$Q_ DEVICE HPSW_SIZE HP $B_DRIVE HPST DEVICE HP$A DEVICE HP $A_DVA 6-5 P-Table Format P-Table Symbolic Offsets Function Quadword descriptor of device name Total size of Unit number P-table ASCII device name with leading "_", max length = 11 characters Device address for this UUT Address used to directly address another UUT through this device of P-table for the device HP$A_LINK Address HP $W_VECTOR HP$T_TYPE Primary interrupt vector for device ASCIC hardware type, max length = linking this to characters 6-9 the CPU 11 VAX Diagnostic Design Guide The Program Global Data section contains all dynamically modified data. Address pointers and buffers should be placed here. A device register contain information The $DS_BGNREG and define A the table statistics contents table should be set up to obtained from the I/0 system services. $DS_ENDREG macros should be used to boundaries. table may be set hardware and software errors. created for each device under SDS_ENDSTAT The summary Example report. 6-6 typical 128 129 data section. LONG We My ; registers. section contains global addresses of device ;—— DRWC: : .ADDRESS @ ; word count register ; base DRBA:: .ADDRESS # ;7 buffer -ADDRESS DRDB:: @ ; command .ADDRESS # ; data HDW PTBL:: PHYSICAL ADR:: 0 @ .ADDRESS 0 .ADDRESS 0 Device Register Contents «e %o W VIRTUAL ADR:: .ADDRESS .ADDRESS $DS_BGNREG REG_BUF: .BLKL 40 Table. (device address) DRST:: DEV_REG: 151 152 global We This 132 133 149 150 program Description: s ++ 143 144 145 146 147 148 and -+ Functional ; 149 141 142 $DS BGNSTAT of be + DATA, 130 138 139 The should W e W . PSECT 131 134 135 136 137 test. tabulation table WO 124 125 126 127 the «.SBTTL Progrém Global Data Section. 120 121 122 123 a for separate macros define the boundaries of the table. routine accesses this table when printing the statistical shows up A address and buffer register status register register Diagnostic Program Structure and Design 153 154 $DS_ENDREG ;++ 155 ;Statistics 156 ;-- 157 158 159 160 161 Table. : statistical data supplied ; by the summary routine $DS-BGNSTAT STATISTIC: $DS_ENDSTAT ;*** Other global data *** 162 163 CVTREG _CHARBUF:: DIOMEM:: ; memory buffers .BLKB 132 .WORD "0160000 165 LOG_UNIT:: .LONG @ STATUS2:: .WORD 0 TEMP:: .WORD # 164 INTER FLAG:: . LONG @ 166 STATUS1:: 168 STATUS RVR:: 167 169 170 0 . LONG .WORD @ . LONG @ UNIT:: Global Data Section Example 6-6 The Program Text section contains all common character Program section names, device string type data entries. register bit mnemonics are and rs, types, device registe listed here. Example 6-7 shows a typical program text section. 171 .SBTTL Program Text Section. 172 ;++ 174 ; 173 175 176 ; Functional Description: This section contains all the common character string ; type data entries. ; : 177 ; 178 ;-- 179 180 ;++ 181 ; 182 ;-—-- 183 Program Section Names: $DS SECTION <QUICK> S _DEFAULT: S DRB: - SECTION: .ASCIC \DEFAULT\ .ASCIC \QUICK\ 2 S _DEFAULT S_QUICK .LONG .LONG .LONG 184 185 ;++ Device Mnemonics List. 186 ; 187 ;-’ | VAX Diagnostic 188 189 190 T DEVICE 191 192 193 s ++ Design Guide $DS_DEVTYP ; 194 195 196 <DR1lC>,< > : Device . Register Bit Mnemonics ; CSR_BIT DEF:: .ASCIC REG_BIT DEF:: .ASCIC \ERR,NEX,ATTN,MAINT, DSTATA,\\DSTATB,DSTATC,CYCLE,READY \, \IE,XBAl1l7,XBAl6,FNCT3,FNCT2,\~ \FNCT1,GO\ \BIT15,BI1T14,BIT13,BIT12,\~\BIT11,BIT10,BIT9,BIT8,BIT7,\\BIT6,BIT5,BIT4,BIT3,BIT2,\\BIT1l,BITO\ 197 198 199 200 201 202 203 Example ° Formatted ASCII operator, ) such listed here. Error report messages 6-7 and Program output '‘as 208 209 statements. ASCII error components for should should be all error be listed messages. + + typical texts the W we W message to e WMo 206 207 some Messages questions, Error Report Statements. ASCII texts of error messages NE 205 shows and M 203 204 6-8 Section statements. instructions here. Example Text 210 211 MSGl_PTBLE FAIL:: .ASCIC \FAILED TO READ P_TABLE 212 MSG2_UBA_FAIL:: 213 .ASCIC \FAILED TO MSG3 UNI_FAIL:: .ASCIC 214 215 INITIALIZE -ABORTING\ UBA\- \ - ABORTING\ \FAILED TO INITIALIZE \ - ABORTING\ 216 MSG4_CLEAR FAIL:: 217 .ASCIC \FAILED TO CLEAR \ - ABORTING\ 218 MSG5_INTER FAIL:: 219 .ASCIC \UNEXPECTED 220 MSG6_INTER UNKN:: ,ASCIC DW788 UBA UNIBUS\- STATUS\- INTERRUPT\- \ - ABORTING\ \UNKNOWN 6-12 INTERRUPT ENCOUNTERED\- Diagnostic Program Structure and Design 221 \ - ABORTING\ 222 MSG7_STAT_FAIL:: 223 .ASCIC \FAILED WHILE CHECKING UBA\\STATUS - ABORTING\ 224 MSG8 _ENINT_FAIL:: .ASCIC \CHANNEL SERVICES INTERRUPT\- 226 MSG9 DSINT_FAIL:: 227 .ASCIC \CHANNEL SERVICES INTERRUPT\\DISABLE FAIL - ABORTING\ 228 MSG1¢ BRLV_FAIL:: 229 .ASCIC \E XPECTED/RECEIVED BR LEVELS\\DON'T MATCH\ 225 Example Error 6-8 Initialization Routine 6.2.3 The \ENABLE FAIL - ABORTING\ initialization routine is the Report Statement the of part first diagnostic program to be called by the dispatch routine in the supervisor. The routine initializes the device or devices to be tested. It then sets up conditions in the CPU and the rest of the computer system that are necessary for diagnostic program execution such as making a channel assignment for each unit to be tested. The initialization routine is executed at the beginning of each It checks to determine whether execution of the test sequence. Following the completed. been the last pass to be executed has the dispatch to returns control end of the initialization routine, appropriate next the calls routine in the supervisor, which (e.g., test 1). Print routines should error. If routine not called be from the initialization routine except on the detection of a device fatal or system fatal a system macro should be used. fatal error is detected, the $DS ERRSYS x If a device fatal error is detected, the $DS_ERRDEV_x macro should be used. A program that is designed to test more than one unit may test one unit at a time (serial testing), or it may test several units at a time (parallel testing). The initialization code reflects some of the differences between these two designs. Example 6-9 shows a program design language (PDL1) description of an initialization routine for a program that performs parallel testing. ROUTINE INITIALIZATION PASS 0§ THEN REPEAT : : CALL $DS_GPHARD g | *%***DPROGRAM INITIALIZATION**** SET LUN=@ sam IF For each unit get hardware parameter oo oo oo ¢ 00 : o [T) o0 END 3 CALL ¢ INCREMENT UNTIL $DS_ASSIGN LUN INVALID assign ! last I/0 channel. unit LSE *%**END OF 00 00 HOUSEKEEPING*#*%* [T] 6o PASS UPDATE CALL $DS_ENDPASS | ****EVERY PASS ¢ ! LUN REPEAT o0 oo o¢ oo : oo 06 VAX Diagnostic Design Guide STATISTICS TABLE NDIF CLEAR CLEAR E ND INITIALIZATIONX***%* BUFFERS COUNTERS ROUTINE INITIALIZE Example 6-9 Initialization Device Routine Testing for Parallel On pass @ (program startup) the routine fetches the P-table address and assigns an I/0 channel for each device to be tested. On subsequent executions, the initialization routine performs end of pass housekeeping functions. It also calls the end pass supervisor service with $DS ENDPASS X. If no more passes are to be executed, the end pass service terminates program execution by calling the summary and cleanup routines. If the last pass has not been completed, every-pass initialization functions, the routine performs some clearing counters. Example buffers and 6-18 shows a PDL1 description of an initialization routine for a program that performs serial testing. On pass @ the routine allocates buffers and sets the logical unit number to @, to test the first unit. On subsequent executions of the routine, the code increments the 1logical unit number. Each time through the routine, the code selects a higher numbered unit. ROUTINE IF INITIALIZE PASS 0 o0 ALLOCATE SET INITIALIZATION BUFFERS LUN=0 oo LSE INCREMENT o9 [T] e | ****PROGRAM oo THEN IF LAST LUN UNIT DONE o0 : ¢ 1****END 00 : : o0 : CALL : ® o0 THEN END SET $DS OF PASS ENDPASS HOUSEKEEPING**#** LUN=§ IF ENDIF | ¥***TEST SEQUENCE INITIALIZATION®** %% 6-14 Diagnostic Program Structure and Design oo CALL $DS GPHARD oo ASSIGN CHANNEL e¢ o0 CLEAR BUFFERS CLEAR COUNTERS ROUTINE [X] ND INITIALIZE Example 6-10 If all the units routine performs end pass completed, another The test sequence The sets the operator If the logical initialization routine have Serial been tested, the functions and calls the last pass unit number to has not @, been beginning program sequence. program should force the in routine these follow the supervisor test last the of execution the functions performs housekeeping each with functions at program termination. Cleanup Routine dispatch following time the service. code execution except 6.2.4 by for pass. functions. The selected end of pass housekeeping supervisor the Initialization Routine Device Testing in calls the last this pass routine of the The dispatch routine will also call cleanup any is The abnormally. terminated routine cleanup initialization of the device under test without error The routine should stop any data transfers in progress, checking. a If the program is release memory buffers, and cancel timers. level 2 diagnostic program, assigned channels should be deassigned to return control of the device or devices under test to the In addition, the cleanup routine should be set operating system. up to handle machine checks, in case the device under test is powered down. Example 6-11 is a PDL1 description of a typical cleanup routine. ROUTINE : STOP CLEANUP I/0 IN PROGRESS PAGES IF MEMORY : : THEN : : : : ENDIF : SET : REPEAT CALL $DS_RELBUF CALL S$SCANTIM = : : CALL $DASSGN : INCR UNTIL release buffers. ! cancel timers. ! deassign I/0 channel. LUN GREATER THAN OR EQUAL TO TEST o0 LUN ! ! oo [T] so ND ! @ oo LUN os : IN USE NOT EQUAL TO ZERO END UNITS TEST_UNITS units under = # test. REPEAT ROUTINE Example CLEANUP 6-11 Typical Design Specification for a Program Cleanup Routine 6-15 Level 2 of VAX Diagnostic 6.2.5 The Design Guide Summary Routine summary report routine is optional. In conjunction with the statistics table it provides the operator with information describing program activity. The summary report is unnecessary in programs that execute in a few seconds. But it is very useful in programs with long execution times, such as a magnetic media reliability program. When a summary report routine is provided, the operator can interrupt program execution at any time, obtain a summary, and then PDL1 description ROUTINE : continue of a execution typical or summary TEST UNITS SET LUN : IF : : = = # OF UNITS STATISTICS a ARE VALID THEN : : : : PRINT SUMMARY : : : PRINT TOTAL TRANSFERS : : : : PRINT TOTAL READS WRITES HEADER : : : : PRINT TOTAL : : : : PRINT TOTAL : ERRORS E : : PRINT TOTAL READ : : : : : : : : PRINT TOTAL INCR LUN ELSE : : : : : : : : : : ENDIF : IF : : : THEN :' INCR LUN : : 2 ENDIF END REPEAT ROUTINE Example GREATER ERRORS THAN OR EQUAL TO TEST - UNITS RETURN SUMMARY 6-12 Typical Initialization, initialization, documented. ' LUN Design This routine prints statistics statistics are valid. 6.2.6 MESSAGE ERRORS WRITE Report on Cleanup, cleanup, Specification for each and device under A summary The documentation consists .SBTTL statement Summary specifying 6-16 test, if the Summary Documentation and routines of a should the name of be fully routine preface, line comments. comments for each logical block of code, and routine preface should be organized a follows: ) a Routine block The is 0 : The 6-12 REPEAT : E ND Example SUMMARY SET : : abort. routine. the routine. Diagnostic Program Structure and Design ° A functional description of the routine. ® A list of the routine calling sequence. ° A list of the ° A list of implicit Refer (normally none). (normally none). and output outputs, and input routine inputs, Each routine to Chapter 11 for details. parameters side effects should have one entry point and one exit point, so that it will behave in the An entry point is a expected manner under all circumstances. label that points to the first location in a routine. The first location contains a register save mask that will save the contents An exit point is a label of the registers used by the routine. pointing to a return instruction (RET). GLOBAL SUBROUTINES AND THE GLOBAL SUBROUTINE MODULE 6.3 Normally, global subroutines should be grouped in a separate if However, module. the program is small and the global subroutines are few and short, they may be included in the header Global subroutines should be used to perform functions module. that are performed two or more times in the test routines. procedure applicable. Like header the should performed module, global the The enough to be widely subroutines module should general be contain a module preface and an equated symbol section. Each global subroutine, like the initialization routine, should include a routine preface and be fully documented with block comments and line comments. Each global subroutine should have one entry point and one exit point only. A 1list of typically functions by global performed subroutines follows: Print channel status if a channel error has been detected. Print expected and received data. Print device and channel register contents. Alter baud rate on a communications device. Compare data. Check channel status. Perform housekeeping functions. Set up specific test conditions on a device. Handle device interrupts. Example 6-13 is a PDL1 description of prints expected and received data. 6-17 a typical routine that VAX Diagnostic Design Guide ROUTINE 5 PRINT EX REC GET REGISTER NAME : GET RECEIVED DATA : GET EXPECTED DATA : FIND : PRINT REGISTER : PRINT EXPECTED DATA : PRINT RECEIVED DATA : PRINT BITS END ROUTINE BITS IN ERROR IN NAME ERROR PRI EX NT REC Example 6-13 Typical Design Specification for a Print Expected Parameters are passed normally by pushed specified by accesses these the and Received the calling on the global Data routine stack by subroutine. parameters by Routine to the The adding a global caller global offsets in subroutine the subroutine to the order then argument pointer and moving the data into the general registers. Example 6-14 shows how parameters are passed with a CALLS instruction in a VAX-11 Macro program. The first argument is offset 4 bytes from the argument pointer. The second argumen is t offset 8 bytes. In an actual would would to diagnostic push the be called Example Calling 8-25 program, information from in on DSSERRHARD Chapter however, the the stack routine in $DS_ERRHARD S and the 8.) the Routine R9 RS Global #3, data received data we ADR NAME expected PRIN EX REC T e PUSHAL CALLS “o PUSHL wo TEST N:: PUSHL address of register Call subroutine. name Subroutine PRI EX NT REC:: .WORD MOVL MOVL "M <R2, 4 (AP), 8 (AP), R3, R4, R5, R6, R2 R7> ; Save registers. ; Save address name. R3 ; 6-18 Save macro print routine supervisor. (Refer of register , received data. Diagnostic Program Structure and Design R4 Save expected data. “e MOWL 12 (AP), ; Return to calling routine. RET Example 6-14 The Passing of Parameters from a Calling Routine to a Global Subroutine Example 6-15 shows the arrangement of data as it is placed on the | stack. ADR NAME argument pointer 3 4 (AP) received data (AP) 8 (AP) 12 (AP) expected data Arrangement of Arguments on the Stack Example 6-15 Notice that the general registers used by the global subroutine (R2 to R7) are saved at register save mask. subroutine before restores returning the beginning of the routine of these C, for with a The RET instruction at the end of the global the original control to the contents calling VAX-11/780 Architecture Handbook, Appendix routine. registers See details the on If the global subroutine must pass data back to subroutine calls. the calling routine, the calling routine specifies a buffer in which the global subroutine can write the data. 6-19 VAX Diagnostic Design Guide 6.4 TEST ROUTINES AND TEST MODULES The test portion of level 2, 2R, and 3 programs should be arranged in one or more separate modules. Each module should contain the following elements: a module an preface equated symbol test code. test code subtests. The The logic A in section each tests module divide should the areas. be program organized into in major tests and functional or test can be part of more than one section. Each test should be as an independent routine to be called by the dispatch routine in the supervisor. It must be able to stand by itself between the execution of initialization and cleanup routines. coded Ideally, each test should have one entry point and one exit point. simplifies program debugging procedures. It also helps to ensure proper program flow under unforeseen error conditions. Each test can contain one or more subtests within it. Subtests are blocks of code within the test routine. They check portions of the functional areas or logic areas covered by the test. Although each test in a program must be independent of the structure tests which requirement. on functions performed However, each subtest executed as tight executed once. macros as are shown in a used A to should loop set Example after of define in be the the utility the 6-16, preceding constructed macros $DS_BGNSUB ; (text code $DS_ENDSUB for test 1, subtest 1) for test 1, subtest 2) $DS_BGNSUB ; (test code $DS_ENDSUB $DS_ENDTEST $DS_BGNTEST $DS BGNSUB ; (test code $DS_ENDSUB $DS_ENDTEST Example for test 6-16 Use and Each test Provide and a subtest preface 2, of 1) Structural Subtest should that subtest be Macros describes test 6-20 can have and be been service subtest, ; test 1 ; test 1, subtest 1 ; test 1, subtest 2 test 2 test 2, subtest 1 to Define documented. the subtests. it Boundaries fully no such test may supervisor each $DS_BGNTEST that subtests and of three so preceding boundaries have given W depend precede and follow it, subtests For example, the fourth subtest in a “e This whole Each test Test test and must 1lists Diagnostic Program Structure and Design assumptions. logic areas The programmer should explain what functional or are assumed to be working properly when the test starts. A complete description and list of assumptions must be included in the preface to each subtest. This description should explain what areas the subtest checks, how the subtest works, and what error isolation procedures should be used when the subtest detects a hardware failure. Example 6-17 and shows part of the documentation for a typical test subtest. + + Test Description: It performs This test checks the map registers in the UBA. this test by checking whether all registers hold zeros and Then the test will write patterns to the map ones. registers to check for bits tied together. Assumptions: This test assumes that the data path from the CPU to the UBA has been checked and that register addressing works correctly. WO WO M WO Testl2 MY N W NP N W W W WE We We Wy W $DS_BGNTEST -+ + Subtest Description: This subtest checks whether UBM@@@--UBM496 will hold an all zeros data pattern and an all ones data pattern. Assumptions: Subtest [ [] ® L] B W N WMo LI T WE 1 Test’Steps: Me WP VO e NI N WE N NE Ve W W N $DS_BGNSUB Init map register index to zero (R3). Clear selected map register-MP (R3). @ then continue else report error. If MP (R3) .EQU Complement selected register-MP (R3). 6-21 VAX Diagnostic If MP (R3) .EQU -1 then continue else report Select next register (update R3). If R3 .GTR 496 then exit else GOTO step 2. error. Errors: l. Timeout - UBA failed Zeros data failure Ones data failure 2. 3. to respond WS e Ve W Debug: Error #1This error WO W N WE Ne U g N Ne N Ne N Ny 5. 6. 7. Design Guide Error Check #2bit(s) that failed for stuck at one Error Check #3bit(s) that failed for stuck at zero (test code) could mean power failure. Check supplies. state. W N N Ve ME state. ; $DS_ENDSUB $DS_ENDTEST Example In addition 6-17 to Typical the macros Test shown and in Subtest Examples macros in the diagnostic library and are required for many test and subtest (level should are the use 6.5.1 to Guidelines 1 1is all VAX for Writing reserved level 1 program non-privileged software as file well as 6-17, avoid any the macros 7-19). code that specific hardware features 1, 2, 2R, and 3 diagnostic programs architectural features, so that they implementations. Level on VAX for Level 1 high-level require use of the operating system. use of the diagnostic supervisor. A and implementation 4 excepted). rely strictly transportable Level of 6-16 certain VMS service operations (Chapters 6.5 GUIDELINES FOR LEVELS 1, 2, 2R, 3, 4 In general, the diagnostic programmer should requires Documentation may use access. the Programs diagnostic They may require transfers to perform I/0 test the hardware. 6-22 ~ that nhot virtual may programs may It or operating system Diagnostic Program Structure and Design Guidelines for Writing Level 2 Programs 6.5.2 Level 2 diagnostic programs use device driver routines built into the VMS operating system and the supervisor to handle all I/0 Device registers must not be transfers to the device under test. should be totally hardware In addition, accessed directly. channel services or supervis The transparent to the program. should not be used. The I/0 driver routines dump the device registers into a buffer allocated by the programmer. The format for the dump varies with Use this buffer (specified by the keyword P6) to each device. check the conditions on the unit under test following QIO completion. Any service that provides an optional event flag must be given an event flag in the range of 32-63 or a parameter. Use of virtual Level 2 programs must use physical I/0 transfer. 1/0 transfers will change the program level to Z2R. Guidelines for Writing Level 2R Program 6.5.3 Diagnostic programs should not be designed as level 2R programs However, certain program types, unless there is no alternative. subprocesses and allocate create such as a system exerciser, must require the user functions Such and deallocate devices. 2R. level program the environment (on-line mode), making In addition, VMS supports some devices that the supervisor does not support. (with driver routines) Diagnostic programs that use QIO to test such devices are designated as level 2R. Guidelines for Writing Level 3 Diagnostic Programs 6.5.4 Level 3 diagnostic programs make use of VAX system features such as direct I/0 and the privileged instructions (e.g., MTPR) In this unavailable to programs running in the VMS environment. level than y way, level 3 programs can define errors more precisel 2 programs. Level 3 programs should use the channel supervisor services to perform all channel functions when accessing a peripheral device. The map registers and memory should not be handled directly. Hardware between the device under test and the program should not be manipulated except through supervisor services. For example, mode type features x and $DS_RELBUF_x macros should be used when it is the $DS_GETBUF necessary Level where 3 to allocate diagnostic the hardware memory. programs permits, use in maintenance order to step through certain functions. Avoid these. analysis of unexpected errors. The supervisor will handle VAX Diagnostic Design Guide In general, level parallel testing. 6.5.5 Guidelines A 4 level must run stand program without between 3 programs perform serial testing instead of for Writing Level 4 Diagnostics use the VAX native instruction set, This it must the the supervisor. microdiagnostic means program and that level 4 programs the level 3 programs and in the diagnostic strategy. Some problems may prevent execution of the supervisor. However, they may go undetected by the microdiagnostics. Level 4 programs may test for these problems. For example, 1level instructions the 4 programs are necessary required by the supervisor (hard-core) translation buffer and cache in the VAX CPU. Avoid developing really level necessary. operator to run and 4 Make your level line code instead line code, the never reset. beginning the diagnostic progréms 4 are programs interpret program of as than level simple as modular listing Make of 4 Level the is 2, 2R, set they are difficult not for the and 3 possible. simple, the to program structure. simple and the program instruction test and when more to test programs. Use straight With straight counter (PC) is particularly program. at the Write the program in position independent code (PIC) so that it can be loaded into any area in memory if there is a known memory problem. Build in a section of code in the program (preferably at the beginning) that will handle traps, interrupts, and machine checks. Use the processor Halt instruction routines should be used. the failing location plus use a current location test and (e.g., The PC on error printed on detection. the No print console points to one. 1In addition, the programmer should location @) to hold the numbers of the subtest. Since no error message is printed on error detection, must be able to identify the failing test, subtest, through commands to the console. the and operator location Use consistent test patterns throughout the program when possible, so that the operator can deal with new errors through the use of techniques already familiar to him. For example, when a verification process involves comparison of expected and received data, the data patterns can be placed in the general registers for easy access, as follows: RA = expected data Rl = receilived data R2 = exclusive OR. Diagnostic Program Structure and Design Level no error messages can be printed. Block comments and line comments explain fully and precisely what the code is doing. should 6.6 4 program documentation must be excellent, since GUIDELINES FOR REGISTER TESTING Diagnostic programs that test hardware must often check registers, buses, and memory locations to detect failures such as bits stuck at one (S-A-1), bits stuck at zero (S-A-0), or bits tied together. One of the most commonly used methods is the writing and reading of the PS1). human floating one and floating These patterns show observer. However, are required. Another which set (pattern set one, to a more 32 patterns For a 16-bit register, register. in the patterns 2 x N patterns are needed, where N is the patterns than necessary. number of bits zero up solid errors in a way apparent this pattern set requires far For a 32-bit register, 64 patterns are required. of requires patterns, only (pattern 1 + (log,N) set 2, patterns. can PS2), be Therefore, 4 generated patterns may be used to check outTM8 bits; 5 patterns for 9 to 16 bits; 6 patterns for 17 to 32 bits; etc. This set of patterns can be 1. 2. 3. from either end of a register: starting generated as follows, 19101010 91010101 (10610 |0101 |10 |01 Double the number of 90119011 |0011 |11 00001111 000601111 of the adjacent until (if N pattern. first ones and 2zeros the last pattern, is a 2) power of _ T 2-bit set |10 |81 Set every other bit. Use the 1's complement 4-bit set — 8-bit set ; l16-bit set 0000000011111111 contains half ones and half zeros. Starting with the 3rd pattern, the ones or zeros must be inserted into the same end. If pattern 2 pattern 3 pattern 4 Conversely, ends ends ends in in in . . . . . . . .fllz. . flllz. flllllz, if pattern 2 ends pattern 3 pattern 4 ends ends then etc. in . . . in in . . . . . 1@2, then .1@@2, 10000 2| etc. . These patterns will detect all S-A-1ls, all S-A-0@s, and bits tied together. Using 5 patterns instead of 32 or 6 instead of 64 could save a lot of time, especially in Quick Verify mode. Consider routine that tests a RAM containing 256 32-bit registers. PS1l: 256 (32-bit (patterns) registers) X 10 = approximately (microseconds 164 milliseconds. per test) X a 64 VAX Diagnostic Design Guide PS2: 256 (32-bit registers) X (patterns) = approximately 10 (microseconds 15 milliseconds. per | test) X 6 Whether PS1, PS2, or some other pattern upon the application. Plug in your own set is used will depend numbers above and then will not mean anything to a decide. A saving of 149 milliseconds human operator, but a saving of 149 seconds certainly would. Another point, pattern generating PS2, them and if a scope loop algorithm is may set be it is more efficient to store the one after another. The scope loop reading Example 32-bit 6-18 of only shows patterns AAAA AAAA 5555 3333 QFOF @OFF d000 (in one the pattern two hex) at a up inside PS2 patterns Alternate for 32 32-bit 5555 3333 OFQF Q@OFF CCCC FOF0 FFO0 cCcccC FOF0 FFFF FFFF 32-Bit PS1 is scope used, loop. the With and use writing time. 5555 AAAA 6-18 the patterns in memory should include the 5555 AAAA Example when bits. patterns FFO0 0009 Register Test Patterns (in hex) CHAPTER Four types of utility macros are available in the library: Program format Program control utility macros P-table control utility macros Symbol definition 7.1 Some do utility UTILITY MACROS of utility macros the However, MACROS diagnostic macro macros utility macros. CODING not. 7 UTILITY the call supervisor format for argument list each routines, utility macro while others call is the same: $DS_macro-name In the paragraphs square keyword in that brackets. the name. All The following $DS_HEADER follow, format The arguments position, for example. pname, rev, Example by for as PNAME, that nothing The in in by position or header directive macro Macro Format NUNIT, and ERRTYP <SAMPLE TEST>», of the that next, a 01, , can 8, Arguments STAT arguments are be used. However, an is shown [stat] be specified 6 by Position omitted, omitted so that argument commas. The commas function as a argument requires no commas, the must place since it. list following can be specified PNAME = REV = NUNIT 01, 7-3 Specification when the hyphen with keyword names as example. = ERRTYPE Notice [errtypl, Header REV, with a pair of omitted STAT $DS_HEADER Example [nunit], and will argument the enclosed Specification UPDATE follows same shown the 7-2 arguments be indicated holder. The are specified follows: Example default the arguments be should [update], 7-1 $DS_HEADER Notice optional arguments argument must of 8, = is each TEST>, - - 6 Arguments list terminate <SAMPLE by Keyword continued line from except the Names one line last. to VAX Diagnostic Design Guide Specification ERRTYPE Specification of Arguments by Position Example 7-4 7.2 The and Keyword Name PROGRAM FORMAT UTILITY MACROS program format utility macros generate assembler and directives that clarify the diagnostic program structure. Macros of functions. this one provide type ® Generation of subtitles ) Generation of e in - REV = @1, NUNIT = 8, % = name keyword as shown below. <SAMPLE TEST>», $DS_HEADER and position by arguments of combination is a third alternative, of more or the linker following psects Generation of routine entry points and masks ) Generation of beginning and ending tags ® Generation routines for labels address of and storage areas The statements that these macros generate provide listing controls and labels. The supervisor, other program routines, and other macros can access data use these storage labels to control areas. the and examples are provided. to Program Module Directive Macros $DS_BGNMOD env, = env = test subtest = flow and Functional explanations A list of program format macros follows. 7.2.1 program [test], [subtest] SEP-FUNCTIONAL CEP REPAIR, CEP FUNCTIONAL, SEP REPAIR number of the first test in this module. number of the first subtest in this module. NOTES 1. $DS BGNMOD is absolutely required in 2. CEP _FUNCTIONAL every module. environment = CPU functional cluster diagnostic with failing function callout error detection (level 3 only). on or Utility Macros 3. CEP_REPAIR = CPU cluster environment 4. repair module diagnostic with failing callout on error detection (level 3 only). SEP_FUNCTIONAL = system or user environment functional diagnostic with failing function callout on error detection (level 2, 2R, or 3). 5. SEP REPAIR = environment system with failing module detection (level 2, $DS ENDMOD This pair of every 6. Default TEST 7. Default macros program must be module, as $DS_BGNMOD ; (module used to =1. define in error 1. argument shown user diagnostic callout on 2R, or 3). argument = SUBTEST (no arguments) of or functional the Example 7-5. beginning and end SEP_REPAIR text) $DS_ENDMOD Example 7.2.2 7-5 Subtitle Use of Begin and End Module Macros Directives $DS_SBTTL $DS SBTTL generates subtitle, with the test assembly and (.SBTTL) listing. subtest. in an assembler directive the diagnostic test all Use other $DS_SBTTL ascii, Use this the or macro normal to subtest only at the assembler cases. provide number the given included, beginning subtitle of for each directive S [align] ascii = subtitle string, align = psect alignment PAGE macro maximum length = 50. of the test. $DS_PAGE The $DS should be used in conjunction with the listing the $DS SBTTL macro. It causes the .SBTTL assembler directive to appear as the first output line of the next assembler listing page by suppressing expansion. the next macro call ($DS_SBTTL) and VAX Diagnostic Design Guide $DS_PAGE num = 0 1 (num) or 1. indicates that a indicates that a .PAGE directive should be generated. .PAGE directive should not be generated. @ Example 7-6 shows how the $DS PAGE and $DS_SBTTL macros should be A e o [] [} coordinated. (code) NUM = 1 <WIDGET TEST> $DS_PAGE $DS_SBTTL Example 7-6 Subtitle Directives 7.2.3 Header Directive Macro The $DS HEADER macro should be diagnostic program to generate a structure to the used table supervisor. $DS_HEADER pname, rev [update], [nunit], phame = program name rev = program release update nunit = = DEPO patch level number. the maximum number of concurrently. errtype = the = unit under test. a pointer to the stat at the beginning of a that defines the program number [errtype],'[stat] string. of level types number. of units error statistics that that can can be tested occur on the table. NOTES l. REV and UPDATE are used as major and minor revision numbers and will be changed to MAJREV and MINREV in the future. 2. If STAT is specified, it must STATISTIC; refer to $DS _BGNSTAT. Example 7-7 shows a typlcal with the macro expansion. use of the $DS HEADER be macro together Utility Macros .SAVE « PSECT HEADEND SENV T NAME T 91 -. NOEXE LENGTH OF THE PROGRAM DISPATCH TEST DISPATCH TABLE -.ADDRESS AL DEVTYP MO DEV_REG me L$A ICP: . LONG .ADDRESS INITIALIZE L$A_CCP: L$A REPP: L$A STATAB: LSL_ERRTYP: L$A TSTCNT: .ADDRESS CLEANUP -.ADDRESS SUMMARY .ADDRESS ) 1) . LONG .ADDRESS SECTION HEADEND: .ASCIC .PSECT, LASTAD: PROGRAM NAME TEXT ADDRESS. PROGRAM REVISION LEVEL FIRST . LONG .ADDRESS TNAME: HEADER DATA BLOCK. DIAGNOSTIC ENGINEERING ) LAST, W|e Wme N N W N 9[5] \DZ11] 8 NUNIT = 8 ENVIRONMENT. . LONG .ADDRESS .ADDRESS LASTAD = @, NOWRT 8 A DEPO WS .ADDRESS . LONG A PAGE, @1, Wy LSL_NAME: LSL _REV: L$SL_UPDATE: L$SA LASTAD: L$A_DTP: L$A DEVP: L$A UNIT: LSA DREG: SHEADER, REV = W . LONG - LONG LINE ASYNC MUX TEST>, Wy L$L HEADLENGTH: LSL_ENVIRON: 8 v <DZ11 $DS HEADER Ny -- s ; Wy 79 |80 FREE DEVICE LOCATION TYPE LIST PATCH ORDER. AFTER PROGRAM. POINTER. POINTER. NUMBER OF UNITS THAT CAN BE TESTED. DEVICE REGISTER CONTENTS TABLE POINTER. INITIALIZATION CODE POINTER. CLEAN-UP CODE POINTER. SUMMARY REPORT CODE POINTER. STATISTIC TABLE POINTER. # OF TYPES OF SERRSOFT & SERRHARD. LIST OF SECTION NAME ADDRESSES. LINE ASYNC MUX TEST\ PAGE .PSECT, SYSTCNT, NOEXT, NOWRT, OVR, LONG Example 7-7 Expansion of $DS_HEADER Macro Diagnostic the in the DZ11 Program (ESDAA) VAX Diagnostic 7.2.4 Dispatch Table $DS DISPATCH This macro generates for are Design Guide Initialization (no arguments) should the be psect, used the dispatch table. The generated (at link time) beginning of each following beginning test. tag, actual by use Example the $DS address HEADER label, and macro. It ending tag entries in the dispatch table of the $DS BGNTST macro at the 7-8 shows the standard use = 8 of the of the $DS_DISPATCH macro. $SDS_HEADER <SAMPLE TEST>, REV @gl, DEPO @, NUNIT = $DS_DISPATCH Example 7.2.5 Data $DS_BGNDATA align = a.1ign 7-8 Section Use of the $DS DISPATCH Macro Directives [align] Psect )alignment. following data The alignment may be for any types. BYTE WORD LONG QUAD PAGE $DS_ENDDATA (no arguments) These macros test. The data identifies the follow, can coming macro. The the table. test be used section test. The between will to be set should the up a data section for the .SBTTL statement follow data to be $DS BGNDATA executed once used in macro and for every the a specific test the that should $DS_ENDDATA argument list in The $DS_BGNDATA macro dgenerates a label (DATA 00n), where n corresponds to the number of the test. Several argument lists can follow the $DS BGNDATA macro call. The $SDS ENDDATA macro generates a longword of zeros code should that functions as the test argument table terminator. The test reference the argument 1lists with offsets from the argument pointer (AP). Each time the test is repeated, the supervisor advances the argument pointer to point to the next argument list. When the 1longword of =zeros, provided by $DS ENDDATA, is accessed after the last argument 1list has been used, control test. In passes Example 7-9, through three the dispatch argument lists 7-6 routine are given. to the next Utility Macros {test name> $DS_SBTTL $DS_BGNDATA .LONG 4, 0, .LONG 4, 0, ; ; .LONG 4, 06, M_NRZ, M _ODD, M RANBYT flrst argument list MPE, MODD, MRANBYT second argument list MNRZ, M EVEN, M RANBYT ; third argument Tist $DS ENDDATA $DS_BGNTST 10$ ; (test code) Example The supervisor list. Then, 7-9 calls when Test Argument the the test three times, supervisor Device Register $DS_BGNREG $DS _ENDREG (no arguments) (no arguments) The device register the beginning device and register DEV_REG:, as each the =zero passes macros ending of the contents. The $DS BGNREG to the be used argument 1longword dispatch memory can storage macro area produces to mark used for a label, follows. DEV_REG: CSR REG:: TCR REG:: $DS ENDREG Example 7 1@ ; label @ ; CSR data Device Register .LONG .LONG @ ; created by $DS_BGNREG TCR data Storage Area Directives Statistics Table Directives $DS_BGNSTAT $DS with Directives directive $DS BGNREG 7.2.7 once control Storage Area storage Directives encounters supplled by the $DS_ENDDATA macro, routine in the supervisor. 7.2.6 Table ENDSTAT (no arguments) (no arguments) The statistics table directives should be used to set up an area in memory for each 1logical unit being tested. The hardware and software errors may be tabulated here and accessed by the summary 7-7 VAX Diagnostic Design Guide report routine. The $DSBGNSTAT macro sets up a base address with a label (STATISTIC:). The programmer can build the statistics table by storing error information in locations offset from STATISTIC. The statistics storage area table directives directives in the should header follow the device register module. $DS_BGNSTAT STATISTIC: $SDS_ENDSTAT Example 7.2.8 Section macro to define be used arg, should the in be Table Directives Table arg... used program the Statistics Definition $DS_SECTION arg, This 7-11 in conjunction with section program text names. The section of arguments for $DS SECTION must appear arguments for $DS"SECDEF These section the $DS SECDEF macro $DS_SECTION macro the in the names header same are module. order used SDS_BGNTEST macro to show which section a test belongs to. 7-12 is ; Header as with Module .SBTTL Program Test Section section names Program $DS_SECTION ALL,H237,H3190,CONVERSATION Module ; Equated symbols $DS_BGNMOD SEP_REPAIR $DS_SECDEF ALL,H327,H3190,CONVERSATION Example 7-12 The the the Example typical. ; ; Test should Use of the $DS SECTION and $DS_SECDEF Macros Utility Macros 7.2.9 Quadword $DS_STRING text = text, an Descriptor Directive [locsyml], ASCII string [locsym2] to be generated. locsyml = address of an ASCIC string. locsym2 = address of an ASCIZ string. The $DS _STRING macro generates a quadword descriptor for a given character string. The macro provides an ASCII string count and an ASCII string terminated by a zero byte. This macro can be used in the as header module appropriate. or in $DS_STRING of the shows tests the or usual program subroutines, format. <message> Example 7-13 7.2.10 one Example 7-13 Quadword Descriptor Directive Initialization Code Directives [psect] $DS_BGNINIT ([regmask], regmask psect the entry point register save mask. any legal arguments for the. .PSECT directive. = = 7-9 VAX Diagnostic Design Guide (no arguments) $DS_ENDINIT the for frame provide a point entry an provides macro initialization code. The $DS_BGNINIT to the call should macros These to The $DSENDINIT macro routine. the to used be DSSBREAK routine in produces an the supervisor Control C), and a return instruction (Example 7-14). exit (to label, check a for .SBTTL INITIALIZATION CODE $DS_BGNINIT ; (init code) $DS_ENDINIT Example 7-14 7.2.11 Cleanup Code Directives $DS_BGNCLEAN regmask psect 1Initialization Code Directives = = $DS_ENDCLEAN [regmask], [psect] the entry point register save mask. any legal arguments for the .PSECT dlrectlve. (no arguments) These macros provide a frame for the cleanup routine. $DS_BGNCLEAN macro generates an entry mask for the routine. $DS_ENDCLEAN macro generates an exit label, a call to DSSBREAK routine in the supervisor, and a return instruction. .SBTTL CLEANUP CODE $DS BGNC LEAN ; (cleanup code) $DS_ENDCLEAN Example 7-15 7.2.12 Summary Code Directives $DS_BGNSUMMARY regmask Cleanup Code Directives = [regmask], [psect] the entry point register save mask. 7-10 The The the Utility Macros psect = any legal arguments $DS_ENDSUMMARY (no These provide macros $DS_BGNSUMMARY macro provides the supervisor, The summary statistics a frame produces and return exit a routine SUMMARY for an label, table. .SBTTL the .PSECT directive. arguments) macro an for the entry a call to the instruction. should print REPORT CODE summary point. out The routine. $DS The ENDSUMMARY DS$BREAK routine the contents of in the $DS_BGNSUMMARY ; (summary report code) $DS_ENDSUMMARY Example 7.2.13 Interrupt 7-16 Service Summary Routine Code Directives Directives $DS_BGNSERV label label = the $DS_ENDSERV These The identifying (no macros for this routine. arguments) provide $DS_BGNSERV label macro a frame for generates the an interrupt entry point, service routine. ensures longword alignment, and generates push instructions to save R# and Rl on the stack. The $DS_ENDSERV macro generates instructions that restore R# and Rl and then perform a return from interrupt instruction. | .SBTTL DEVICE $DS_BGNSERV ; (interrupt $DS_ENDSERV Example 7.2.14 Test INTERRUPT SERVICE SERVICE routine code) 7-17 1Interrupt Routine Directives Service $DS_BGNTEST [section], [regmask], section = HANDLER Directives [align] the test section name(s). than one section, place 7-11 Routine If the a test section belongs names to in more angle VAX Diagnostic Design Guide brackets, < >, and separate the section names with commas. regmask align = = entry point register boundary alignment. $DS_ENDTEST (no save mask. arguments) The $DS BGNTEST and $DS_ENDTEST macros provide a frame for each test routine in a diagnostic program. $DS BGNTEST produces an entry mask, an entry point, and an entry in the dispatch table. The $DS_ENDTEST macro produces instructions which move a #1 into RO to indicate normal test completion, call the DSS$BREAK routine in the supervisor, and return to the dispatch routine. The test directives should be used in conjunction with the $DS BGNSUB, $DS_ENDSUB, and $DS_CKLOOP macros to provide program control (Examples 7-18 and 7-24). $DS_SBTTL <WIDGET TEST> $DS BGNTEST <DEFAULT,ALL>,ALIGN=LONG $DS_BGNSUB : (subtest 1 code) $SDS_ENDTEST Example 7-18 7.2.15 Test Directives Message Routine Directives $DS_BGNMESSAGE [regmask] regmask = entry point the $DS_ENDMESSAGE register save mask. (no arguments) These macros should be used to provide a print subroutine in a diagnhostic program. produces produces a ; an entry return (data mask for instruction. the frame around each global The $DS BGNMESSAGE macro routine. The $DS_ENDMESSAGE storage) TAG: $DS_BGNMESSAGE ; (print routine code) $DS_ENDMESSAGE Example 7-19 Message Routine Directives Utility Macros 7.2.16 Numeric Error Header Information Directive $DS _ERRNUM macro inserts an error number into an The at the label given. If sequential supervisor error number routine. $DS_ERRNUM label, an error will be number used. is The not argument given, macro does the not list next call a [num] label = 1label on num = error humber argument to 1list. insert. NOTE This macro generates that uses (destroys) pointing to LABEL. 7.3 program some control cases, $DS_BREAK, like $DS BCOMPLETE, calls to any jump, utility alters like or code left PROGRAM CONTROL UTILITY MACROS The in executable R@. RO is the macros flow generate of calls merely to expand executable program. Some supervisor to a few of code which, the macros, routines. instructions Others, without routine. When program flow is altered with a branch execution of the instructions generated often use of related macros. For example, $DS _CKLOOP, successful involves correct the check loop macro, $DS_BGNTST macros. of must be coordinated Not all the program control The supervisor routines called return produce the status 7.3.1 utility by with the macros utility $DS require macros do BGNSUB and arguments. not provide codes. Pass Control Macros $DS_BPASS@ label label = the $DS_BNPASS# label Either = the address transfer of program control. for transfer of program control. label address SDS_BPASS@ supervisor for or service $DS_BNPASS@, macro, must together with be in used the the $DS_ENDPASS x initialization routine of a diagnostic program. The $DS BPASS# and $DS BNPASSO macros check the status of a one time switch used for program initialization. These macros enable the programmer to omit execution of to track keep certain of portions test and of the pass initialization iterations. The code in order $DS_ENDPASS x supervisor service macro calls a routine in the supervisor (DSX$DSENDPASS) to mark the end of a pass of the diagnostic program. If the number of passes run corresponds to the number of VAX Diagnostic Design Guide passes selected by the operator, the routine causes execution of the summary and cleanup routines. Example 7-20 shows how the $DS_BPASS@ and $DS_ENDPASS x macros can be coordinated. 1 2 .SBTTL INITIALIZATION $DS _BGNINIT 3 4 5 CLRL LOG_UNIT BRB 20$ ; ; INCL CMPL LOG UNIT DSASGL UNITS, ; No, BNEQ 20$ ; ; Is last No. ; Yes, 8 9 10 11 12 $DS ENDPASS 20$: $DS GPHARD SASSIGN 14 15 . . 16 . 17 CLRQ . . . In Example . ; . CSRW 7-20, the LOG_UNIT . Example 7-20 program, ; G CLRL LOG UNIT 13 ; on unit Pass Control the first number is First time through? Yes, start with first Begin device initialization. to unit check next tested? for last pass. ; Get P-table address. ; Assign Initialize test. in @ a channel. device Initialization at of the line unit. unit. Last pass not done. execution set start with TMo 1@0S$: 10$ e 6 7 $DS_BNPASS#® CODE Code first 4 and under pass then of the control passes to line 12. On the second execution of the first pass, the pass @ flag is clear. Control passes from line 3 to line 6, and the 1logical wunit number 1is incremented. When the 1last unit selected has been tested, the incremented 1logical unit number equals MAX UNITS, and the $DS_ENDPASS G macro is executed. If the last pass has been completed, the supervisor routine called by $DS ENDPASS G passes control to the summary and cleanup routines. to line another When the 11 If the last pass has not been completed, control returns for selection of the first device number is incremented and the execution of pass. logical unit in line 6 and the last unit has not been tested, the BNEQ instruction in line 9 causes a branch to 1line 12, beginning the initialization of the device under test. Compare this code with the PDL1 description of an initialization routine 7.3.2 Flag Macros Quick for serial testing in Example $DS_BQUICK label $DS_BNQUICK label label = the address for transfer of 7-14 program control. 6-10. Utility Macros These macros macros lengthy check enable the tests when The tests program. should contain cursory check the status programmer the of to operator that are the Quick provide desires executed a control branches quick when the the core of the program and of the device under test. flag. around execution Quick flag The certain of the is set provide at 1least a The $DS BQUICK and SDS_BNQUICK macros can be used in conjunction with the $DS EXIT macro and the $DS_ENDTEST macro, as shown in Example 7-21. .SBTTL TEST 3 N $DS_BGNTST $DS BNQUICK 10$% CLRL R6 ; (test WMo 190S: Branch to TMo $DS_EXIT TEST Branch if not quick verify mode. leave test NS We - $DS ENDTEST macro Clear character to 3. counter. code) $DS_ENDTEST Example 7-21 7.3.3 Operator Quick Flag Macros Flag Macros $DS_BOPER label $DS_BNOPER label label = program control. This pair of macros enables the programmer omission of certain tests, depending on the to force state of control check the address flag. the The status of for transfer $DS BOPER of macro theOperator dgenerates flag and label specified by the programmer if the fashion, the $DS BNOPER macro generates flag is execution or the Operator instructions cause a branch flag is set. a branch if to that the In a similar the Operator clear. These flags may be used in tests or portions of tests operator intervention, as shown in Example 7-22. require w9 4 Branch “e TEST $DS_BGNTST $DS BBOPER 10$ $DS_EXIT TEST Branch to we .SBTTL that if macro to operator is $DS_ENDTEST leave test 4. present. VAX Diagnostic Design Guide $DS_BGNSUB 10$: $DS_ENDSUB $DS_ENDTEST Example 7-22 7.3.4 Operator Flag Macros Program Subtest Control Macros $DS_BGNSUB $DS_ENDSUB (no arguments) (no arguments) This pair of macros should be used to form a frame around each subtest in a test. The $DS BGNSUB macro provides an entry point to the subtest and generates a call to a supervisor routine to indicate the beginning of a subtest. The supervisor routine ensures that the diagnostic program is sequencing through the subtests in each test in numerical order. If the routine detects a sequencing error, it notifies the operator and returns control to the command mode. The $DS_ENDSUB macro generates an exit label for the subtest and generates a call to a supervisor routine (RENDSUB). This routine checks both the test numbers and the subtest numbers within each test for correct sequence. On error detection the supervisor routine notifies the operator of the error and returns control to the command mode. Example 7-23 shows coordination of the test and subtest control : macros. $DS_BGNTST $DS_BGNSUB ; (subtest 1 code) $DS_ENDSUB $DS_BGNSUB ; (subtest $DS_ENDSUB 2 code) $DS_ENDTEST Example 7-23 7.3.5 Loop Control Program Subtest Control Macros Macros $DS_CKLOOP label label = the address for transfer of program control. Utility Macros This macro generates a call to a supervisor routine that controls the subtest 1looping mechanism. If an error has been detected (Error flag is set) and the Loop flag is set, the supervisor routine sets up a scope loop on the error by causing a branch back to the label specified. THE $DS_CKLOOP should be used in conjunction with the following macros: $DS BGNTEST $DS ENDTEST $DS_BGNSUB $DS_ENDSUB Example 7-24 shows .SBTTL LABEL LABEL - TEST test structure that should be used. 5 $DS BGNTEST $DS_BGNSUB 1: 2: the ; (test code 1) SDS CKLOOP LABEL 1 ; (test code 2) SDS_CKLOOP LABEL 2 $DSENDSUB $DS_BGNSUB LABEL 3: ; (test code $DS CKLOOP 3) LABEL $DS_ENDSUB 3 $DS_ENDTEST Example If an first error occurs in the $DS CKLOOP However, no Loop Control Macro Use error occurs in test code 1, a loop will $DS_CKLOOP macro back to LABEL 1. In the second would 7-24 1if occur matter argument address the in code back $DS CKLOOP the how within refer Ffirst many supplied LABEL must test macro the to same an 2, a loop statements the will $DS were (from were be made from the omitted, only one loop $DS _ENDSUB detected. CKLOOP subtest., address made from the same way, if an LABEL _2. subtest errors with to be If within the the Note macro $DS BGNSUB), that must test same to has test. the refer no LABEL to an subtests, VAX Diagnostic Design Guide Program loops may be nested and/or overlapped in order to satisfy local program requirements. The supervisor stores the addresses of both error the and call $DS _CKLOOP the so statement, macro subsequent repetitions of the loop will be consistent with first. However, if a different error should then occur within loop, the error condition. 7.3.6 loop range will Escape Control be modified to conform to the that the the latest Macro $DS_ESCAPE arg TEST or arg = This macro test or SUB provides subtest. a conditional The checks the macro exit generates status of the from a a diagnostic call Error to flag. a If program supervisor routine that the Error enables the programmer to eliminate execution of certain portions flag is set, control passes to the end of the current subtest or test, depending on the argument supplied. The $DS ESCAPE macro of a program be redundant preserves the if prior testing indicates and bound to fail. contents of R#. Note If the $DS _ESCAPE macro is to be used of an error loop, it should be placed the loop, as shown in Example 7-25, .SBTTL TEST $DS_BGNTST that those that the ; subtest 1 ; subtest 2 Example 7-25 Escape | LABEL 1: ; (test code ; (test code 1) LABEL 2: SDS CKLOOP LABEL 3: $DS ESCAPE - ; (test code 2) LABEL SUB 2 3) SDS_ENDSUB $DS_BGNSUB ; (test code 4) $DS ENDSUB would sequence with test code that is part after the macro that causes 6 ; (set up code) $DS_BGNSUB portions escape $DS_ENDTEST Control Macro Utility Macros If an error occurs in from the $DS_CKLOOP However, test code 2 and the Loop flag is set, macro statement to LABEL 2 will a loop occur. 1if an error in test code 2 occurs and the Loop flag is not set, the $DS_ESCAPE macro will give program control to the second subtest, thus bypassing test code 3. 7.3.7 Exit from Program Phase Macro $DS_EXIT arg arg = TEST, SUB, INIT, CLEAN, SERV, MESSAGE, SUMMARY This macro generates an unconditional branch statement, causing a branch to the 1last statement 1in the current section of the program, depending on the argument. This macro can be used to omit execution of code requiring some condition that is not present, as shown in Example 7-22. 7.3.8 Break $DS_BREAK (no in Diagnostic arguments) This macro calls for Control C. the DS$SBREAK routine in the If the operator has typed routine inserts a breakpoint and flag, the command mode in called whenever DSSBREAK that Program Macro routine allows Control C a flag. the CLI. Note a supervisor is the that the service only mechanism supervisor Control passes DS$BREAK routine provided C, to check setting control to routine is is called. in the a the also The supervisor diagnostic program to check the status of the However, if the diagnostic program performs loops that do not contain any supervisor calls, the operator will be unable to interrupt the program with a Control C, once the program has gone into a tight loop. In order to prevent this condition, any potential loop that does not should contain a $DS_BREAK macro include a supervisor service call to check for Control C. 7-19 call VAX Diagnostic Design Guide Branch on Complete Utility Macros 7.3.9 $DS_BCOMPLETE label $DS_BNCOMPLETE label label = the address for transfer of program control. These macros generate instructions that test R# and branch conditionally to the address specified by LABEL. The $SDS BCOMPLETE macro call causes a branch if the low bit of RO is set, indicating successful The completion of some $DS BNCOMPLETE macro clear, indicating the function. causes failure a of branch some if the low bit of R# is function. By convention, when a test routine or service routine is executed, a return status code is placed in R@. The low-order bit indicates success or failure. Other bits in the register may be used to qualify the nature of the success or failure, but a test of bit @ 10$: $DS_CHANNEL S UNIT $DS = the testing - LOG UNIT- FUNC = # CHCS DSINT BCOMPLETE 20S$ G LIST $DS_ERRSYS $DS_ABORT TEST 20%: INCL R5 Example 7-26 7.3.10 are analyzed. of ; channel ; device % 7-26. the other bits simplify Disable bit as The branch shown in interrupts. success? Print error Leave test. proceed Branch on Complete @, call ws Example macros Wy performed before e be complete NG should on message. Utility Macro Use Branch on Error Utility Macros $DS_BERROR label $DS_BNERROR label label = the address for transfer These macros, like the instructions that test RO specified by of program control. branch on complete macros, generate and branch conditionally to the address LABEL. The $DS BERROR macro call causes a branch if the low bit of RO is clear. The $DS_pNERROR macro call causes a break if the low bit of R@ One 1s set. of these completion of macros a should previous be used to service call or test test for successful routine (Example ~Utility Macros 7.3.11 Aborting the Test Sequence Macro of (PROGRAM $DS_ABORT arg arg = This the level is PROGRAM, macro enables current test or abort the the programmer entire transfers If the argument failure routine The terminal, control to is TEST, the program at macro any should point be abort default argument execution on the of macro to it clears call is cleanup to R@ the abort clear code, INITIALIZATION If and then indicating test supervisor . the that dispatch current further test or in the execution will be invalid. For example, if a system error is detected initialization routine, the program should be aborted. .SBTTL the argument. macro generates a call to a prints an abort message on the used where The depending executes the program's the supervisor. and then does an RET and start the next test. $DS ABORT the TEST). to program, the argument is PROGRAM, the supervisor routine. This routine operator's or CODE $DS_BGNINIT - Get N $DS_GPHARD S = MSG40 $DS_ABORT PROGRAM 208: MOVL HDW PTBLE, Example In Example to obtain 7-27, the a R2 7-27 supervisor hardware P-table gy M W - We LOG_UNIT, Branch e - P-table system W MSGADR 20$ address of device We = UNIT, system Wy $DS_BNERROR S $DS_ERRSYS UNIT LOG = HDw:PTBLE error if fatal no error. error services Fatal error, abort Move P-table base Abort service macro address to message Program base test pointer We = P-table W|e DEVNUM ADRLOC hardware address. device under By 10$: program. to index. Macro ($DS_GPHARD) for a specific is used device. The $DS BNERROR macro is then used to test the return status code. If no error is detected, the program performs a branch to location 20S. Otherwise, an error message is printed and the program is aborted. 7.4 $DS CLI $DS_CLI trees. down is a Each the Command utility call tree Line macro. generates until a Interpreter The one mismatch macro node or in branch 7-21 Tree Macro is used the tree. to directive build The is parsing parser goes encountered. VAX Diagnostic Design Guide down the tree until a mismatch or branch directive is encountered. The macro Chapter 8 does = action = miss = ascii = a supervisor 8-27 Example routine. comparison character. See Note 1. a code to be passed to the action routine. See note a mismatch or branch displacement in the tree. an ASCII string to use for comparison. Return status codes: not in tree. [ascii] [miss], [action], $DS_CLI char, char call not shows how the macro can be used to build a 2. applicable. NOTES 1. Special character codes defined $DS_CLIDEF to be optionally used the CHAR by as argument: Symbolic Function CLISK _ERROR Action/Parser return (bit @ of RO = @). Action/Parser return (bit @ of RO = 1). Unconditional branch within the tree using MISS. Branch if. Checks bit @ of R#. CLISK EXIT CLISK BR CLISK BIF Bit Bit @ # = @, = 1, fall through to next node. branch using MISS. CLISK SPACE o CLISK NUM - Traverse spaces and/or tabs and call ACTION if any were found (R8 points to next non-space CHAR). Traverse numeric fields and call action with numeric value in R1@. This function uses the default radix. CLISK ALPHA Traverse alphabetic fields. It branches using MISS CLISK ALNUM Traverse g-9). Same CLISK OCT as if no numeric data is alphanumeric CLISK DEC Same as CLI$K NUM, CLISK HEX Same fields. except CLI$K NUM, forced. (Uppercase A-Z). as CLISK NUM, except that forced. ASCII argument used for match. the (Note: character of the string need match). 2. octal the that except that the decimal forced. CLISK STRING (Uppercase Upon entry to the action registers contain: Register Content RO R7 R8 Action code parameter Parse tree pointer Input string pointer from routine tree R9 Input string count remaining R19 Numeric data buffer 7-22 hex found. A-Z or radix is radix is radix is Only the first the Utility Macros 7.5 The P-TABLE VAX programs standard CONTROL MACROS diagnostic that VAX system test provides special configuration. for devices However, the addition that the are of not diagnostic parts of any types of parameters that describe special devices vary. The supervisor does not automatically know what parameters to prompt the operation for in such cases. Therefore, diagnostic programs that test special devices must include macros that define a P-table descriptor for each unit type to be tested. The resulting P-table descriptor defines the device dependent information offsets in the P-table, and it defines the fields required and their locations. At run time, as prepares to load program the ATTACH run the the command. computer program before In operator that tests attaching response to runs the the device the ATTACH the supervisor special to be and device, he must tested with the command, the supervisor looks into the program already loaded for the P-table descriptor. It then prompts the operator for the required device parameters and adds the retrieved information to the P-table. When the the supervisor searches for a P-table descriptor, it checks DEVTYP 1list in the program first. If the search is unsuccessful, the supervisor checks a list within the supervisor itself. In this way, requiring an upaate to the program can the supervisor. You of must use two P-table types descriptor Structure 7.5.1 The build P-table device without descriptors: macros P-Table Descriptor Macros 7.5.1.1 are available to build P-table descriptors. $DS_SINITIALIZE Start P-Table Processing $DS_SINITIALIZE device, device = max = lengtE = the hardware name the maximum allowable number allowed = the for max, driver the device, macro should unit be e.g., number zero RP06 as if a in the unit or DW784. device number name. is not (as on a TM@3). two-character QIO device should this length, the total length of the associated P-table. This Use to a definition macros following macros driver macros define be null the if it is first of the not driver name. This argument applicable. P-table descriptor macros. VAX Diagnostic Design Guide 7.5.1.2 $DS_S$DECIMAL Retrieve and Range Check a Decimal Number low, high $DS_$DECIMAL prompt, prompt the ASCIC name low T = of the 1low limit operator. : the igh high the field needed. if operator, used as a prompt for the for the parameter supplied by the for the parameter supplied by the 1limit operator. Use the this macro to prompt the operator for a decimal value. range check, the value becomes the current VALUE. 7.5.1.3 $DS_SOCTAL Retrieve and Range Check an Octal Number low, high $DS_$OCTAL prompt, the ASCIC name of the operator, if needed. prompt low = T high After the low limit operator. the high 1limit field used as a prompt for the for the parameter supplied by the for the parameter supplied by the operator. Use the this macro range check 7.5.1.4 to prompt the operator for an octal the value becomes the current VALUE. $DS_SHEXADECIMAL Retrieve Number and Range Check wvalue. a After Hexadecimal $DS_$HEXADECIMAL prompt, low, high prompt = the low operator, the 1low = ASCIC name of the if needed. 1limit for field used as a prompt for the the parameter supplied by the the parameter supplied by the operator. high = the high 1limit for operator. Use this After the macro to range check 7.5.1.5 prompt $DS_$STRING $DS_$STRING prompt, prompt = strings Use the a ASCIC list macro scans the to the operator value becomes Retrieve for the a hexadecimal current value. VALUE. and Verify an ASCII String strings name if operator, = this macro the of of the needed. valid prompt input field used as a prompt for an ASCII for the string. The strings. the stream operator for a matching 7-24 string. Utility Macros 7.5.1.6 $DS_SLITERAL Define a Constant Value $DS_SLITERAL value value = Use a this constant. macro program, if to there create a is need no constant to value for retrieve a VALUE from wvalue from the this operator. 7.5.1.7 $DS_SFETCH Extract $DS_SFETCH offset, offset bit, a bit = O<OFFSET<K65536. a bit displacement size = the Use this OFFSET, offset parameter. size macro BIT, 7.5.1.8 to and offset the extract SIZE = a byte field a bit, the from (in field specify $DS_SSTORE $DS_SSTORE offset, from @<BIT<255. of from the P-Table size = o byte a Field the base the beginning bits) to from the field in Insert a Value of be into of P-table. the extracted P-table. the the The OFFSET from the parameters P-table. the P-Table size offset from the base of the P-table. @ <OFFSET<65536. bit __“ size = = a bit displacement from the beginning of the OFFSET parameter. @<BIT<255. the size of the field (in bits) to be inserted into the P-table. 7.5.1.9 B0<KSIZE<32. $DS_SEND Finish Processing P-Table $DS_SEND (no arguments) Use macro to mark this 7.5.2 the end of the P-table descriptor. Structure Definition Macros Use the three structure definition macros to define the structure of the addition to the P-table that you wish to create. These macros are available through LIB.MLB in VMS. 7.5.2.1 $DEFINI struc = %bl ot = = $DEFINI Start a Data Structure struc, gbl, dot the structure name (e.g., the GLOBAL or LOCAL. the value of the first symbol 7-25 name to be of the P-table). generated. VAX Diagnostic Design Guide Use this macro 7.5.2.2 $DEF sym, sym = alloc = to start the definition of a data structure. SDEF Define Some FPields Within the Structure alloc, siz the name of an assembler the symbol to be defined. directive indicating blocks be the block size to be used: .BLKB . BLKW .BLKL siz Use = the number this macro 7.5.2.3 to generate the Q 51 Use this after to allocated. an offset for the symbol given. SDEFEND Finish Definitions SDEFEND struc, struc of gbl structure name GLOBAL or LOCAL. macro to clean all of the symbols (e.g., the name of the P-table). , up for the data structure definition process the structure have been defined. 7.5.3 P-Table Control Macro Examples Example 7-28 shows how the supervisor uses the data structure macros to define device dependent offsets for the P-table for the RH780 interface. SDEFINI RH780, $GBL, HP$A DEPENDENT $DEF RH780$B TR, .BLKB,1 $DEF RH780$K_LEN SDEF RH780$B BR, .BLKB, 1 SDEFEND ; TR number of adapter ; BR level of adapter 8 , $GBL, DEF RH789 Example 7-28 Building a Data Structure for the RH780 P-Table Offsets In this example the programmer has created a data structure called RH780, which defines the symbolic offsets for the P-table describing an RH788. The symbols are global, and the value of the The symbols is HPSA DEPENDENT. to be generated symbol first RH7803$B TR and RH780B BR are both allocated one byte of storage space. The symbol RH780$K LEN points to a value containing the length of the P-table. Example 7-29 shows how the supervisor uses the P-table descriptor macros to create a P-table descriptor that fills in the P-table at run time. Utility Macros 1 $DS_SINITIALIZE 2 3 $DS_$DECIMAL $DS_$STORE 4 $DS_S$STORE RH780,RH780$K LEN,8 TR,1,15 RH7805B_TR,9,8 ' 5 o HP$A DEVICE,13,4 $DS_S$STORE HP$W_VECTOR, 2,4 6 $DS_SDECIMAL 7 $DS_$STORE RH78G$B_BR,Q,8 8 $DS_SSTORE HPSW_VECTOR, 6,2 BR,4,7 Request TR number. Store TR in : RH788$B ; Store TR in bits $DS_$LITERAL $DS_$STORE 1 HP$W_VECTOR,8,1 13 $DS » S$END of device ; of vector. example descriptor 7-29 from for Building the the a 13-16 address. Store TR in bits 2-5 Request BR. Store BR in RH780$B_BR. Store BR in bits 6-7 ; of ;i ; ; ; ; Get a literal 6. Set bits 29-30 of device address. Get a literal 1. Set bit 8 in SCB ; vector ; End P-table ; Example TR. ; ; 11 12 this ; ; ; ; 6 HP$A_DEVICE,28,4 In descriptor. ; $DS_SLITERAL $DS_$STORE P-table Start P-table ; ; 9 10 - ; vector. offset. descriptor. P-Table Descriptor supervisor, line RH788. As many as 1 initializes the eight units may be selected by the operator. The $DS_$DECIMAL macro in line 2 will cause the supervisor to prompt the operator with the symbol TR. The supervisor will accept a number within the range of 1 to 15. The $DS value S$STORE macro retrieved from in the line 3 causes operator (the the TR superv1sor to number) the in store the location specified by the offset symbol RH788$B TR. The bit displacement from the beginning of the location is zero, and the size of the field is eight bits. Line 4 stores the same TR value in bits 13 to 16 of the device address and line 5 stores the TR value in bits 2-5 of the device vector. Lines 6 to 8 prompt for and store the BR number in the same way. Lines 9 and 10 use a literal 6 to set bits 29 and 30 of the device address. Lines 11 and 12 set bit 8 in the vector; and the $DS_SEND macro terminates the P-table descriptor. VAX Diagnostic Design Guide SYMBOL DEFINITION UTILITY MACROS 7.6 The symbol definition utility macros define symbols common to the VAX diagnostic system. Many of the symbols defined are keyword names for other macros. These symbols are necessary to the supervisor-program interface. Other definition macros define useful symbols such as bit names, table offsets, and return status codes. The symbol definition utility macros should be used primarily in the program equates section of the header module. If other sets of symbols are confined to any specific module, the symbols should be defined in the equates section of that module. Example 6-2 in Chapter 6 shows a typical use of some of the See the channel definition macros in the header module template. services in used GLOBAL or corresponding to the GLOBAL or provides The defined symbols from the frame symbolic pointer to BIT31 and the masks (FP). for definitions call frame offsets are: CFSL_ONCOND CFSW_PSW Condition Handler Processor Status Word CFSL_AP CFSL FP 0l1d Argument Pointer 01ld Frame Pointer Register Mask CF$W_MASK | Return PC CFS$SL_PC Saved Registers CFSL_REG $DS_CHCDEF Channel Function Definition $DS_CHCDEF = BIT@# LOCAL. macro gbl mnemonics each bit. This 7.6.3 symbols [gbl] $DS_CFDEF = the $DS_CFDEF Call Frame Definitions 7.6.2 gbl for LOCAL. defines macro This 8.4, [gbl] $DS BITDEF = Paragraph service macros. $DS_BITDEF Define Bit Mask Mnemonics 7.6.1 gbl Chapter 8, description, the channel [gbl] GLOBAL or LOCAL. This macro provides symbolic definitions for the functions used in the channel call macro $DS_CHANNEL_x. Utility Macros 7.6.4 $DS_CHIDEF $DS_CHIDEF gbl = This Interrupt Status Definitions [gbl] GLOBAL or macro LOCAL, defines $DS_CHANNEL x, to the codes indicate that are adapter used status by the The $DS CHIDEF macro is used in conjunction function of the $DS_CHANNEL x macro. 7.6.5 $DS_CHMDEF Channel Mapping $DS_CHMDEF gbl = This channel following with an the service, interrupt. CHCS _ENINT Function Definition [gbl] GLOBAL macro or LOCAL. provides symbolic definitions for the $DS SETMAP x functions. 7.6.6 $DS_CHSDEF Channel Adapter $DS_CHSDEF gbl = [gbl] GLOBAL or This macro codes for 7.6.7 gbl = This symbolic STATUS by the of for the Symbol Definitions other macros return status $DS_CHANNEL x the macro. LOCAL. invokes and four $DS_CHSDEF) channel service $DS_CLIDEF Command $DS_CLIDEF definitions function [gbl] macro = CHCS GLOBAL or 7.6.8 gbl provides the $DS_CHMDEF, used LOCAL. $DS_CHDEF Channel $DS_CHDEF Status Definitions to define calls. Line ($DS _CHCDEF, all of the $DS_CHIDEF, channel symbols Interpreter Definitions [gbl] GLOBAL or LOCAL. This macro generates special character CHAR parameter of the $DS CLI macro. follows: CLISK ERROR CLI$K EXIT CLISK BR 7-29 code definitions 1list of these A for the symbols VAX Diagnostic Design Guide CLISK BIF CLI$K SPACE CLISK_NUM CLIS$K ALPHA CLI$K ALNUM CLIS$K OCT CLISK_DEC CLISK HEX CLI$K_STRING 7.6.9 $DS_DEVTYP Device Types $DS_DEVTYP [<name, name,...>][,<addresses separated by commas>] name = of P-table descriptors 2-character dgeneric device type. This macro generates a string of device type names and a string of P-table listed descriptors below are (see Chapter 5, known the to the type names Paragraph 5.3.1). program. recognized The device type names in the Attach command Device Type Name KA780 RK@6 MS789 RH780 TTMTMO3 TE16 DW780 RP@7 TU45 DZ11 RPO6 RP@5 RPO4 DMC11 CR11 RM@3 RK611 DR11B PCL11 LP11 RK@7 7.6.18 $DS DSADEF Define APT Command and Mailbox Flag Offsets $DS_DSADEF gbl = ([gbl] GLOBAL or LOCAL. This macro provides symbols that define CLI flags, command areas, DSASAL APTMAIL is the base address of the and APT mailbox areas. APT mailbox. Symbol Meaning DSASGL FLAGS longword containing the following flag bits Utility Macros Flags DSA$M_HALTD halt DSASM_HALTI DSASM_LOOP DSA$M BELL DSASM_IE1 DSA$M_IE2 DSASM_IE3 DSASM_IES DSASM QUICK DSASM_SPOOL halt on error isolation loop on error flag bell on error inhibit all error reports inhibit basic error reports inhibit extended error reports inhibit summary reports quick verify DSASM_TRACE DSASM_LOCK on spool output trace tests lock DSAS$M_OPER DSA$SM_PROMPT error in detection messages physical operator memory present display long dialogue suppress all output to user environment pass 0 flag DSASM NORPT DSASM_USER DSASM PASS@ DSA$M_APT the terminal APT mode Command Area Definitions DSASGL_APTCOM DSASGL PASSES APT command DSASGL_UNITS passes to run number of units DSAS$GL_SECTNO DSA$GL_CPUTYP VAX section CPU to be tested number code type APT Mailbox Area Definitions DSA$GL_MSGTYP DSA$GL_ERRNO DSASGL EVENT DSASGL message _SUBTNO DSA$GL_DEVLEN This = counter number number number device descriptor length device descriptor message descriptor $DS_DSDEF Define Supervisor Status $DS_DSDEF gbl number event test pass DSASGL_DEVNAM DSASGL_MSGPTR 7.6.11 error subtest DSASGL_TESTNO DSASGL_PASSNO type [gbl) GLOBAL or macro supervisor return one indicate and Condition Codes LOCAL. generates service of the the return symbols that denote error conditions. The macros call supervisor service routines that codes represented by these symbols in R@ to status. The following symbols are generated. VAX Diagnostic Design Guide Symbol Meaning DS$_WARNING DS$ NORMAL warning normal DS$ overflow null string DS$ _ERROR DS$ SEVERE DS$_OVERFLOW NULLSTR DS$ PROGERR DS$S TRUNCATE DS$ NOTDON DS$ IVVECT DS$_IVADDR DS$ VASFUL DS$ INSFMEM error truncation not done invalid vector invalid address virtual address space insufficient memory full memory management is off DS$S FHWE DS$ LOGIC final hardware error interface error illegal page count buffer was fragmented DS$ ILLPAGCNT DS$_FRAGBUF DS$_ MCHK DS$ KRNLSTK DS$S POWER DSS_ TRANSL initial hardware error machine check not implemented DS$ IPL is IPL2HI released translation not valid change mode DS$_ICERR DS$ ICBUSY DS$ ARITH when kernel stack not valid power fail DS$ CHME DSS$S NOTIMP too error high interval clock error interval clock busy arithmetic trap SDS_DSSDEF Define Supervisor Service Entry Points 7.6.12 $DS_DSSDEF = program data DS$S MMOFF DS$ IHWE gbl error condition severe error condition [gbl] GLOBAL or LOCAL. This macro generates symbols that define the supervisor service entry points for the diagnostic program. When a supervisor service macro is expanded, it generates a call to one of these entry points in the supervisor entry module. The $DS _DSSDEF macro generates the following symbols. DS SENDPASS DS SGPHARD DS $SUMMARY DSS$SCLRVEC DS SMMOFF DSSABORT DS $SETVEC DSSINITSCB DSSSETIPL DS SCHANNEL Utility Macros DSSSETMAP DSS$SBGNSUB DS$SCKLOOP DSSESCAPE DSSWAITMS DSSCANWAIT DSSASKDATA DSSASKADR DSSASKSTR DSSPARSE DSSERRDEV DSSERRSOFT DSSPRINTX DSSPRINTS DSSELOGOFF DSSRELBUF DSSMOVVRT DSS$MMON DS $SHOCHAN DSSENDSUB DS$SINLOOP DSS$BREAK DSSWAITUS DSSCNTRLC DSS$SASKVLD DS$ASKLGCL DS$CVTREG DSS$SERRSYS DSSERRHARD DSSPRINTB DSSPRINTF DS$SE LOGON DSSGETBUF DS$GETMEM DSSMOVPHY SYSSQIOW SYSSASSIGN SYSSCANCEL SYSSCLREF SYS$SDASSGN SYSS$SQIO SYSSSETEF SYS$SETPRT SYSSALLOC SYSSBINTIM SYSSCANTIM SYSSDALLOC SYSSGETTIM SYSSREADEF SYSSSETIMR SYSSWAITFR SYSSWFLOR 7.6.13 $DS_ENVDEF Define Environment Codes $DS_ENVDEF This SYSSWFLAND SYSSGETCHN macro (no arguments) defines the symbols that can be used for argument of the $DS BGNMOD macro. The $DS BGNMOD macro The following symbols are defined: $DS_ENVDEF macro. the ENV invokes the CEP_FUNCTIONAL CEP_REPAIR SEP_FUNCTIONAL SEP_REPAIR 7.6.14 $DS_ERRDEF Define Error Call Arglist Offsets $DS_ERRDEF This macro (no arguments) defines symbolic arguments for the $DS _ERRDEV X, The and $DS_ERRSYS X macros. $DS_ERRSOFT_X, $DS ERRHARD _ X, following symbols are defined. VAX Diagnostic Design Guide 7.6.15 Symbol Meaning ERRS NUM error ERRS UNIT ERR$_MSGADR ERR$ PRLINK ERRS P1 ERRS P2 ERRS P3 ERRS P4 logical This = header ERRS P6 additional data $DS HDRDEF Define Header area defines the LOCAL. defines absolute following symbols for the header The macro symbols: Symbol Meaning LSL HEADLENGTH LSL ENVIRON 1length of the header program environment data block L$SA NAME program name test address LSL REV L$L UPDATE LSA LASTAD LSA DTP program revision level diagnostic engineering LSA STATAB L$A ERRTYP statistics table pointer number of types of $ERRSOFT and SERRHARD list of section name addresses pointer to number of tests patch order first free location after program test dispatch table pointer device type list pointer number of units that can be tested device register contents table pointer address initialize cleanup code pointer summary report code pointer LSA SECNAM L$SA TSTCNT $DS_HPODEF Define Hardware P-Table Entry Offsets $DS_HPODEF macro offsets. addressable (the area defined by the $DS_HEADER macro). LSL DEVP LSL_UNIT LSA DREG LSA ICP LSA CCP LSA REPP allowing Section Area [gbl] section This routine additional data data macro address extended error print additional data additional data additional data additional GLOBAL or 7.6.16 unit number message ERRS P5 $DS_HDRDEF gbl number (no arguments) defines the offsets programmer to for items access the in the items hardware with their P-table, symbolic Utility Macros NOTES Only device defined. Symbol HP$Q DEVICE HP$W SIZE HP$B_DRIVE HP$T DEVICE HP$A DEVICE HP$A DVA independent offsets Description quadword descriptor device name ASCII device name with leading " max length = 11 characters device address for this UuT address used to another address UUT HP$W_VECTOR for device linking this to the CPU primary interrupt vector HPST TYPE for ASCIC hardware device length characters type, = 11 $DS_PARDEF Parameter Definitions 7.6.17 $DS_PARDEF This through this device address of P-table max gbl = of total size of P-table unit number directly HP$A LINK are [gbl] GLOBAL or macro macros of LOCAL. defines the the form defined. radix and exception mask arguments for $DS ASKxxxX. The following symbols PAR$_BIN PARS_OCT PAR$ DEV PARS HEX PARS NO PARS_YES PARS_NODEF PARS_ATLO PAR$_ATHI PARS ATDEF 7-35 the are VAX Diagnostic Design Guide $DS_SCBDEF System Control Block Definitions 7.6.18 $DS_SCBDEF [gbl] GLOBAL or gbl = LOCAL. This macro defines symbols for the system control block vector offsets. The following symbols are defined: SCBS$SL_ZERO SCBSL POWER SCBSL_ROPRAND SCBSL CHME SCBSL_SFTLVL1 SCBSL SFTLVL4 SCBSL SFTLVL1# SCB$L SCBSL SFTLVL?7 SCBSL SFTLVL13 SCBS$L_TIMER 7.6.19 SCBSL_ACCESS SCB$L_RADRMOD SCBSL_TBIT SCBSL_ARITH SCB$L_CHMS SCBSL_SFTLVL2 SCB$L _SFTLVL5 SCBSL TRANSL SCBSL_COMPAT SCB$L_KNLSTK SCBSL_OPCCUS SCBSL_MACHCHK SCBSL_OPCDEC SCBSL_BREAK SCBSL_CHMK SCB$L_CHMU SCBSL _SFTLVL3 SCB$L_SFTLVL6 SCB$L_SFTLVL9 SCB$L _SFTLVLS SCB$L SFTLVL12 SFTLVL11 SCBSL_SFTLVL15 SCBSL SFTLVL14 SCBSL_TXDB SCB$L RXDB $DS_SECDEF Section Definitions $DS_SECDEF <arg,arg,arg...> section name. arg = This macro should be used by the diagnostic programmer to define Use this macro the test sections in each program source module. in all program modules except the header module. NOTE The section names used as arguments must appear in the same order as they do in the $DS _SECTION module. 7.6.20 in the header $DS_DEFDEL Delete Macro Expansion $DS_DEFDEL This macro macro this macro it deletes (no arguments) is used to conserve memory space during assembly. When call follows a group of the symbol definition macros, the macro expansions from memory after the assembler has defined the corresponding symbols. CHAPTER SUPERVISOR SERVICE 8 MACROS In addition to the utility macros, the diagnostic macro library in the supervisor provides a variety of macros that call supervisor routines to perform functions. Unlike the utility macros, the supervisor service macros generally return status codes. Furthermore, the supervisor service calls return control to the location following the instruction that called the supervisor service routine. Generally, they do not modify the £flow of the program. Eight types of supervisor service macros are available. Program control service macros Channel service macros Memory management service macros Delay service macros Error message service macros Program-operator dialogue service macros System control service macros Hardware P-table access service macro 8.1 The CODING SUPERVISOR SERVICE MACROS supervisor service macros take the form $DS xxxx x. The $DS prefix signifies the diagnostic supervisor. The suffix, x, shows that the macro may end in any of four ways, depending on the function required. _DEF--generate symbols and offsets _L--generate S--call the an argumment service with list CALLS _G--call service CALLG the The RELBUF service following four macros with (release relate to buffer space) this service: 1is typical. The UF $DS_RELBDEF L $DS_RELBUF G $DS_RELBUF S $DS_RELBUF The listings for these macros are available in DIAG.LST. Paragraph 8.5.4 provides an explanation of the service performed and arguments required. That section gives the following format the RELBUF service. ' $DS_RELBUF x pagcnt, [retadr], the for [region] The suffix x following $DS_RELBUF shows that the RELBUF service may be called with G or S suffixes. The arguments that follow it show the argument. positional The dependence arguments enclosed and in the square keyword brackets names are of each optional. They may be omitted. When the optional argument, the macro argument 1list supplied to any programmer does not specify an supplies a default value. The supervisor service must have a format in in memory like that shown 8-1 Figure 8-1. VAX Diagnostic Design Guide PAGCNT RETADR REGION TK-1884 Memory Format for RELBUF Superv1sor Figure 8-1 Macro Service Arguments All arguments are longwords. However, they should be coded as symbols. The symbols must specify addresses or data, except for the first longword. The first longword must always contain, in its low-order byte, the number of arguments in the remainder of the list. 8.1.1 The macro $DS_namél§ service Format $DS name G Macro Call routine is to call be format called is when useful with repeatedly a the supervisor same (or argument list, or when there is no argument list. nearly the same) This macro format generates a CALLG instruction. It requires the programmer to construct an argument list elsewhere in the program and to specify the address of the 1list as an argument to the as G macro call, $DS_name G $DS_name The programmer follows: label should use the $DS name L macro format to generate In general, the the 1list of arguments referenced by LABEL. $DS_name_L macro format should be used in the data section of the program, LIST:: in the first module, as shown in Example 8-1. $DS_RELBUF_L - ; PAGCNT = 10, - RETADR = BUFLIM, REGION = @ BUFLIM: .BLKL 2 Example 8-1 Use of to Build - arglist for RELBUF ; 10 pages ;: Buffer ; buffer address ; return virtual location is in PO space. the $DS nameL Macro Format an Argument List Supervisor The supervisor service associated with that argument be called with a $DS_name_G macro format, Example 8-2 Calling the The argument, LIST, Call %o o LIST with e $DS_RELBUF G LIST. a arguments shown in then specified in Service with Format to items following to the macro format as is necessary to alter one or more of the arguments in the LIST 1label in the data section supervisor service being called. The VAX-11 can as shown in Example 8-2. Supervisor the macro list Macros RELBUF supervisor service $DS _name G Macro enables Service macro assembler expands the pass of the the $DS name G program Example 8-3. $DS_RELBUF G Example Sometimes it LIST CALLG LIST, 8-3 ; Call @#DSSRELBUF Expansion of RELBUF. $DS_name G Macro Form the list to be passed to the supervisor service, leaving the rest unchanged. For example, the programmer may want to use the RELBUF supervisor service another time with a page count argument of 7. Several steps are required. First, the programmer must use the $DS name DEF macro 1in the data section of the test module that contains the supervisor service call. This macro provides a set of symbols that describe from the base address $DS_RELBUF DEF macro creates RELBUF$_NARGS = RELBUFS_PAGCNT RELBUFS _RETADR RELBUFS REGION of the following argument MOVAL LIST, #7, 4 R2 PAGCNT (R2) Ny RELBUF$ Exampl e 8-4 The 8 12 programmer must replace the old value new value, as shown in Example 8-4. MOVL 1list. symbols and offsets: 3 W Second, the list with a the We of fsets in the argument base address of arglist Replace the page count in LIST with the number 7. Modification of an Argument List VAX Diagnostic Third, the Design Guide supervisor service can then $DS_name G macro. The modified argument Example 8-5 shows the entire process. ; Header be called 1list will with be the passed. Module LIST:: BUFLIM: ; Test = BUFLIM, = 0 H argument ; ; Return Buffer ; - BLKL 2 list 10 pages to be for RELBUF released virtual location is in PO space. here. e RETADR REGION - address of released buffer TMo - " PAGCNT = 10, Create e $DS RELBUF L argument Module $DS RELBUF_DEF we e list with Call RELBUF we Example 8-5 and Uses ) Replace TMo LIST (R Nho RELBUFS$ PAGCNT $DS RELBUF G base address for RELBUF s #7, R2 wy MOVL LIST, W MOVAL list symbols for for RELBUF. Call RELBUF supervisor service with unmodified argument list. W LIST e $DS RELBUF G offset the of argument page count the number list in 7. supervisor service with modified argument list. of $DS name G, $DS name DEF Macro $DS name_ L, Formats 8.1.2 $DS _name S Macro Call Format The $DS name S macro call format is useful when a supervisor service routine is to be called infrequently. It is also useful when the supervisor routine is to be called repeatedly, but with a different argument list each time. This macro format generates a CALLS instruction. It requires the programmer to construct the argument list as a part of the macro call. At assembly time, the macro is expanded to create code that pushes the argument 1list on the stack during program execution. Supervisor Arguments either of 1. for the two ways. Keywords $DS_name_S keywords may must value the of values will macro be used to followed argument, as can be specified supplied, by the macro, for unspecified arguments. Example 8-6 Use 1, = 12 of - W = we REGION PAGCNT %o $DS_RELBUF S -~ the $DS in describe the arguments. All by an equal sign (=) and the shown in Example 8-6. Default be be format Service Macros name S Call RELBUF service. Buffer is in Pl space. 12 page buffer Macro Format with Keywords Notice that the order of arguments has changed the RETADR argument is omitted altogether. and that Position, with omitted arguments indicated by doubled commas in the argument position, may be used to describe the arguments. Commas for optional trailing arguments may be omitted. Example 8-7 shows how position Example 8-7 $DS #1 name S W , Call wme #12, service TMo $DS_RELBUF S RETADR default N used. REGION 1 Macro RELBUF Format These same on two way the macro calls (Examples by the assembler. stack as shown PUSHL PUSHAQ in In 8-6 each RETADR £12 CALLS #3, Example 8-8 Figu 8-1 re shows the 8-7) the PAGCNT = 12. value with Arguments are expanded arguments are in the pushed Example 8-8. #1 PUSHL and case, be supervisor with Specified by Position should ; region i pointer ; page @#DSSRELBUF Expansion of the to count buffer $DS_RELBUF_S arrangement of data on the description Macro stack. VAX Diagnostic Design Guide STATUS CODES RETURN Most of the supervisor services provide a return status code in general register R@, when execution of the service has been completed. When bit 0 of RO is set, it 1indicates that the 8.2 supervisor service has been completed successfully. The low order three bits, taken together, indicate the severity of the error, as : follows: NdwWHE warning success error reserved severe -7 error reserved. The remaining bits in the low-order word of R# (bits 3-15) classify the particular return condition. Return status codes for each supervisor service macro are indicated in the entries for each macro. Each return status code has a unique symbolic name in the format, DS$ code, where code is a mnemonic describing the return condition. For example: DS$ NORMAL indicates successful DSS IHWE indicates an return. initial hardware error on a channel call. If this status code is returned, it shows that the function has not been performed, because the adapter hardware status was found to be in error. When you code a supervisor service macro, you should examine the explanation of the macro in order to determine what return codes must be checked. The program can test for successful completion of a supervisor service call by checking the low-order bit of R#, as shown in BLBC RO, ERRLABEL ; error if low bit clear Example 8-9. Example 8-9 Testing for Successful Return Status The error checking routine at ERRLABEL should check RO for specific values with a compare instruction as shown in Example 8-14. CMPW RO, DSS_IHWE Example 8-19 ; initial hardware error? Identifying the Return Status Code Supervisor 8.3 PROGRAM CONTROL SERVICE MACROS The program control the exception of control program the service macros enable flow during execution. x macro, $DS_ENDPASS these Service Macros the programmer to However, with the supervisor macros do not directly change the course of the program. 8.3.1 service $DS_CNTRLC_x Control-C This macro calls a supervisor routine that enables the diagnostic program to intercept the next Control C typed by the operator. provides the address of a routine for the supervisor to call It on Control C. The routine sets an Enable flag. This flag remains set until a Control C is typed or until the flag is canceled by a call with a routine address of zero. If a routine has been specified when the next Control C is typed, the Enable flag is cleared and the specified routine is called. $DS_CNTRLC_x 1label label = the address for transfer of program control. Return Status Codes SS$ NORMAL: Service completed successfully. $DS_CNTRLC_S CNTRLC_HANDLER Example 8-11 $DS CNTRLC_x Macro Usage In Example 8-11, the $DS_CNTRLC_S macro call causes a transfer of program control to a Control C handler, which can call the summary This feature is useful in programs routine and then rearm itself. that run for a long 8.3.2 time. $DS_INLOOP_x Check for a Loop This macro calls a supervisor routine that tests whether or not the program is looping on an error. The routine sets the low bit of RO if the program is in a loop. It clears the low bit of RO if the program is not in a loop. $DS_INLOOP_x (no arguments) Return Status Codes DS$ NORMAL: The program is in a loop. DS$ ERROR: The program is not in a loop. VAX Diagnostic Design Guide .SBTTL TEST 5 $DS_BGNTST $DS_BGNSUB LABEL [LABEL 2: " ; (test code 1) SDS_BNERROR LABEL 3 $DS_INLOOP_S BLBS R@, LABEL 3 $DS_ABORT ; Program is in a loop. 3: ~$DS_CKLOOP LABEL 2 $DS_ENDSUB Example In Example abort on 8-12 error 8-12 the Use of $SDS_INLOOP detection the $DS_INLOOP_ x Macro macro unless the call enables program is in the an program error 8.3.3 $DS SUMMARY x Execute the Summary Report Section This macro calls a supervisor service routine. This, in calls the user summary message. The from initialization the completion of $DS_SUMMARY x summary macro report program routine routine code with is to print normally out a called the $DS_ENDPASS x the Supervisor turn, summary indirectly macro at the execution. (no arguments) 8.3.4 $DS_ENDPASS Pass is Completed This report to loop. x Indicate to that a Logical calls pass of the the routine a routine in the supervisor to mark the end of a diagnostic program. If enough passes have been run, causes execution of the user summary and cleanup routines. $DS_ENDPASS x (no arguments) Return Status Codes: None. Example with the 8-13 shows how $DS BPASS# macro the $DS ENDPASS X in the INITIALIZATION macro initialization can be coordinated code. 1 «SBTTL 2 SDS CODE 3 4 5 $DS BNPASSO 10$ CLRL LOG UNIT BRB 20$ ; ; ; INCL LOG UNIT CMPL DSASGL UNITS, ; No, ; Is last unit tested? BGNINIT ; 6 17 8 10$: - LOG UNIT - First time through? Yes, start with first unit. Begin device initialization. start with next unit. Supervisor Service Macros : No. BNEQ 20§ 9 $DS_ENDPASS G CLRL LOG_UNIT $DS GPHARD . . $ASSIGN . . . 10 11 12 29$: 13 14 15 16 ; Yes, check for last pass. ; Last pass not done. ; Get P-table address. . ; Assign a channel. . . . ; Initialize device under CSRW CLRQ 17 ; test. Use of the $DS_ENDPASS Macro Call Example 8-13 Notice that the $DSENDPASS_x macro call is executed at the end of each pass. Notice also that the $DS_ENDPASS_x macro is not executed between passes. 8.4 CHANNEL SERVICE MACROS The channel service macros are designed to promote transportability of diagnostic programs across various implementations. to interface macros also transparent with make as enable These macros the channel design possible. changes The level adapters in channel 3 in the diagnostic a general channel service available to level 2 and 2R diagnostic programs. the VAX programs way. .The : as adapters macros are not - x Channel Service $DS_CHANNEL 8.4.1 This macro calls a supervisor routine that provides a channel adapter interface service, enabling general control over the hardware status of the channel adapter. Any of ten functions (such as purge or clear) function specified may be specified. by The call accomplishes the or reading [vecadr], [stsadr] writing bits on the adapter registers. x unit, func, $DS_CHANNEL unit = the logical unit number. func = the function code specifying the operation to be The performed. The code is expressed symbolically. sign number a by preceded be function argument should . (#) vecadr = the entry point address for interrupt service when an interrupt occurs. Required for the CHCSENINT function. stsadr = the address of the channel call. a quadword that stores adapter status when the CHC$ STATUS function is used and when an interrupt occurs. This argument is required when the CHC$_STATUS and CHC$_ENINT functions are specified for VAX Diagnostic Design Guide $DS_CHANNEL Functions: CHCS$ INITA Initialize Return status DS$ NORMAL: codes: Service status DS$ _NORMAL: Initialize device bus codes: Service Adapter status DS$S NORMAL: DSS LOGIC: Service Service function purges the data call, path Enable status DS$ NORMAL: Service DSS_IHWE: Initial before hardware the DS$ IVVECT: invalid An error. function set/clear An was DS$_IHWE: found Service Initial vector by the 1last was adapter error condition The Interrupt Enable found by $SETVEC. bit interrupts successfully completed. hardware error. An adapter function was performed. An invalid failure. vector CHCS_ CLEAR status codes: DS$ NORMAL: Service DSS Bit LOGIC: error condition the DSS_LOGIC: Bit set/clear failed to clear. Return specified codes: before DS$_IVVECT: (UBA only) performed. Disable was (MBA). interrupts failure. CHCS_DSINT DSS NORMAL: set successfully completed. DS$ _LOGIC: Bit failed to set. status path not codes: was found did successfully completed. CHCS_ENINT Return (MBA only) codes: $DS_SETMAP x macro Return DTABT Purge data status DS$S NORMAL: This abort successfully completed. CHCS PURGE Return only codes: Bit set/clear failure. not clear (MBA). ABORT did (UBA) successfully completed. CHCS ABORT Return adapter successfully completed. CHCS INITB Return channel failed to clear. was The Interrupt found by S$CLRVEC. Clear adapter Enable bit status successfully completed. set/clear 8-10 failure. One of the status bit(s) Supervisor CHC$ STATUS Return Request status DS$_NORMAL: Service successfully completed. Set status DS$S NORMAL: defeat parity Service successfully completed. Clear defeat status DS$_NORMAL: (UBA only) codes: CHCS$ CLRDFT Return status codes: CHCS SETDFT Return adapter Service Macros parity (UBA only) codes: Service successfully completed. NOTES l. The interrupt enable function (CHC$ ENINT) will enable adapter interrupts and, in the case of the UBA, device interrupts. After Unibus initialization or UBA initialization, perform a clear-function interrupts. 2. Adapter 3. before status, returned enabling in response to the CHCS STATUS function, stored in a 1location specified is by the argument in Note 3. STSADR, Returned status longwords of each as shown description: status request are Two returned status for function (CHC$ STATUS) of the channel call. This status, along with certain specific interrupt information, is also that supplied on all interrupts are to be passed to a program that has enabled interrupt processing. The two 1longwords returned have the following format: STATUS 1 RVR STATUS STATUS 1 = STATUS 2 = Adapter One word defined RVR = status of as defined in Note 4. interrupt status as in Note 5. Receive Vector Register devices that UBA. 8-11 2 interrupt for those through the VAX Diagnostic 4. Design Guide Adapter Status Definitions Symbol CHSS$M_SYSERR CHS$M_CHNERR CHS$M DEVERR (Status 1) Definition System error (category) Channel error (category) Device CHS$M_ PGMERR CHS$M PGMHDE error (category) Program error (category) Program error (hardware detected) CHS$M DEVBUS Unibus/Massbus error Device time-out CHSS$M DEVTO A Channel data parity error Channel memory parity error Channel power fail/overtemp CHSSM_CHNDPE CHS$M_CHNMPE CHSSM_CHPFOT CHS$M_SYSMEM CHS$M_SYSSBI System memory System CHS$M MBAEXC error SBI error exception Massbus CHS$M_MBANED CHS$M MBADTB CHS$M_MBADTC MBA non-existent MBA data CHS$M_MBAWCK MBA write check Bus init clear (deassertion) drive transfer busy MBA data transfer complete MBA control parity error CHS$M_MBACPE CHS$M BUSIC CHS$M BUSINIT CHS$M_BUSPDN CHS$M_ERRANY Bus init Bus power down Any error category (assertion) (CHSSM| SYSERR, CHSS$M| CHNERR, CHSSM| DEVERR, CHSSM PGMERR) 5. Interrupt Status Definitions CHISM CHNINT CHI$M DEVINT CHI$M IPL When CHCS$ header A ENINT module complete is to list of DS$ NORMAL: DS$_PROGERR: Channel Device interrupt interrupt Interrupt $DS_CHIDEF used, define (Status 2) the return Service Program status status should codes codes successfully error be used returned for at level in the completed. program STSADR. $DS_CHANNEL x encountered. 8-12 priority follows: Supervisor Service Macros The adapter Initial hardware error encountered. DS$ IHWE: hardware status was found to be in error before performance of requested the performed. function The function. will not be DS$ FHWE: Final hardware error status encountered. The adapter hardware status was found to be 1in error after performance of the requested function. The capability of the adapter to correctly operate is in question. DS$ LOGIC: An adapter function that sets or clears an adapter The capability of the adapter to status bit has failed. correctly operate DS$ IVVECT: is in question. An invalid vector has been given as an argument. DS$ IVADDR: An invalid address has been given as an argument. DS$ ERROR: An error shows how has been found in trying to associate a hardware P-table with the logical unit argument. Example 8-14 reset the Unibus channel L SBTTL the $DS_CHANNEL_x (DW780). macro can test be used INITIALIZATION CODE (error Reset UBA. Branch if ; Failure, %N W0 - UNIT, FUNC = #CHCS$_INITA $DS_BNERROR 10% ; channel call device under we S $DS_CHANNEL UNIT = LOG we $DS BGNINIT message) $DS_ABORT PROGRAM Example 8-14 with Resetting successful. abort program. the Unibus Channel the $DS_CHANNEL x Macro 8-13 to VAX Diagnostic 8.4.2 This Design Guide $DS_SETMAP x Set Channel Adapter Mapping macro adapter enables mapping $DS_SETMAP x unit = the func = the to phyadr for unit, the transfers. func, phyadr, logical function be the diagnostic I/O unit physical will be code symbol See of a adapter the two [bytcnt], up channel [datpth] specifying the listed 1longword array type of describing addresses. addresses Normally returned the these by a . select. corresponds mapping below. call. map register parameter set symbols buffer start and end the start and end $DS_GETBUF_ x macro mapbas [mapbas], to number. performed. address engineer to the For the upper 9 UBA bits (DW788) of the this Unibus address (bits 17:09) to be used in the base address (BA) registers of the desired device. The number supplied for the MAPBAS parameter to the UBA should be in the range of # For to 495 the MBA (decimal). (RH780) the MAPBAS current map register through map register. The default for bytcnt the positive byte count parameter bits 16:89 of the MAPBAS is zero. (used for This field is ignored when the However, the field is checked for the adapter type to be used. datpth= UBA (DW780) ignored Function Argument Symbol CHMS FORWARD when data the path MBA number (RH780) is the UBA (DW780) (8-15). virtual (RH780) validity only). 1is used. regardless This used. the field of is Symbols Function Prime the operation. CHMS REVERSE selects Prime the operation. CHMS INVALIDATE Invalidate CHMS MAP Set CHM$ OFFSET Mapping adapter for a forward adapter for a reverse all requested map entries. mapping. with byte offset. Supervisor CHMS_MFWDV Service Macros Invalidate all map entries, set requested mapping, for adapter the prime a forward operation. CHM$_MFWDN Do not invalidate any map entries, set requested mapping, prime the operation. CHM$ NFWDN CHMS MREVV Do not adapter | for a forward invalidate any map entries, do not set mapping, adapter the prime operation. for a forward a reverse Invalidate all map entries, set requested mapping, adapter the prime for operation. CHM$_MREVN ‘CHM$ _NREVN CHM$_MFWDVO Do not invalidate any map entries, set requested mapping, adapter the prime operation. Do not for | a Invalidate all map entries, set requested mapping with byte adapter the (UBA only), prime reverse offset, a for operation. Do not invalidate any map entries, set requested mapping with byte offset, a for adapter the (UBA only), prime forward CHM$ _MREVVO reverse invalidate any map entries, do not set mapping, adapter the prime operation. forward CHM$ _MFWDNO a for operation. Invalidate all map entries, set requested mapping with byte offset, a for adapter the (UBA only), prime reverse operation. VNO CHM$_MRE Do not invalidate any map entries, set requested mapping with byte adapter the (UBA only), prime reverse operation. offset, a for VAX Diagnostic Design Guide Return Status DS$_NORMAL: Codes Service DS$ PROGERR: successfully completed. Program error. The buffer address is out the base address is out of range (9 through 255-MBA, 495-UBA), or the specified byte count is too large. of range, @ through DS$_IHWE: Adapter hardware error status was encountered before the mapping the was performed. mapping DSS ERROR: will An P-table with Example 8-15 be error the The error condition has been found logical unit argument. the set shows must be cleared before performed. how trying map to associate service can a hardware be set up and executed. SECTOR W W CLRL #256, WORD COUNT cyl =1 track = 0 sector = @ Specify word count for compare. Initialize disk drive. R3, ; disk address and CYLN, MOVB MOVB TRACK, RKDA+1 (R2) SECTOR, RKDA(R2) map RKDCYL(R2) RKWC(R2) #701000 WMo MOW RKBA (R2) SDS _SETMAPS "UNIT =LSUNIT, FUNC = #CHM$ MFWDV,- PHYADR = WRITE MAPBAS = #1, DATPTH = #1 Load WME #256, Load cylinder. Load track. BUFFER, - - sector. Word count = 256. Set transfer address (8). BA. to We MNEGW done. buffers. N MOV CLRW Loop until T 25% "e #64, Load Clear index. Fill write buffer indexed by R3. Mo AOBLSS - 1000 N -~ R3 T CLRL MOVQ # “XFFFF00QOFFFFO008, @WRITE BUFFER[R3] LY | 205: “e we wmo W MOVZWL CYLN WMe TRACK WMe #1, CLRL Ne MOVZBL Clear ; ; ; ; ; device Invalidate all map entries, set requested mapping, prime adapter for a forward operation. ; ; Unibus page 1 direct data path Supervisor Service Macros $DS BNERROR 30% $DSZERRSYS_S, LSUNIT, UBAMAP, - to disk. MOWW #WRITE, HOLD CSl1 “o ; we JSB @START XFER 409 error reporting code $DS_§BORT TEST ; Initiate NPR transfer, ; read from memory, write wme 308$: UBA e DUMP Define command to be executed. Execute command. BLBS R#, 40$ ; (error message) [4 ; (compare expected and received data) Example 8-15 Use of the $DS_SETMAP_x Macro In Example 8-15 the $DS SETMAP_x macro enables the program to set a failure of up map registers on the channel adapter. Notice that to be fatal. ered consid is and error system a this function is drive disk the up, set sfully succes been After the transfer has the from data ve retrie to ers transf will perform NPR read WRITE BUFFER in memory through the direct data path. disk drive After successful completion of the NPR transfer, the upt service interr The upt. interr an m under test should perfor routine can then return control to the program. 8.4.3 $DS SHOWCHAN x Show Channel Registers This macro <calls a supervisor routine (DSX$SHOWCHAN) which the configuration register displays on the operator ts for the channel adapter conten er regist contents and the status require the display of that errors tes indica in use. If the status terminal additional registers, those registers will also be displayed. For the example, if the status register indicates an invaliyd map, each for displa The ed. display be will ‘relevant map register al address of register contains the register mnemonics, the physic ption of descri ic mnemon a and ts, conten er the register, the regist the register contents. $DS_SHOWCHAN_x unit unit = logical unit number. Return Status Codes DSS$_NORMAL: Service successfully completed. DS$_PROGERR: An error has been found while trying to associate a hardware P-table with the logical unit argument. »Example 8-16 shows how the $DS_SHOWCHAN_Xx macro should be used to display channel information. VAX Diagnostic Design Guide CSRERR: .ASCIC \ERROR MSG_TAG: $DS_BGNMESSAGE IN CSR\ w $DS_PRINTB S... = LOG_UNIT Wmg UNIT W $DS_SHOWCHAN - e Ns $DS_PRINTB S... $DS_PRINTB_S... error description Display channel information. Display device CSR. Display device SR status register. $DS_ENDMESSAGE ; TEST N SDS_BNERROR 182$ ; S$DS ERRHARD S “UNIT = LOG_UNIT, MSGADR PRLINK 19$: ; In this print example, subroutine 8.5 Is there an Yes, print. error? - = MSG_TAG 8-16 the test Use of the $DS_SHOWCHAN x Macro $DS_SHOWCHAN x called SDS_ERRHARD_x macro - = CSRERR, continue with Example ; through in Test N macro the is PRLINK incorporated parameter (refer to Paragraph 8.7.1.3). in in a the MEMORY MANAGEMENT SERVICE MACROS management for the diagnostic system is provided by supervisor or VMS. These memory management services All memory either the ensure system various operating integrity and operational environments and consistency processor types. across In the the stand- alone environment, memory management is normally off. In the WS environment, memory management is totally controlled by WS and is always on. The supervisor provides services that allocate memory, both virtual and physical. Physical memory allocation is restricted to level 3 diagnostic programs. 8.5.1 $DS_MMON_x Turn Memory Management On This macro calls a supervisor routine (DSX$MMON) management on. $DS_MMON_x (no arguments) Return Status Use this Codes: macro None. in level 3 programs that turns memory only. Supervisor Service Macros $DS_MMOFF_x Turn Memory Management off 8.5.2 calls a supervisor routine (DSXSMMOFF) macro This that turns only. ms progra 3 level in memory management off. Use this macro $DS_MMOFF_x (no arguments) Return Status Codes: 8.5.3 None. $DS_GETBUF_x Get Virtual Memory Space This macro calls a supervisor service to (DSXSGETBUF) routine obtain memory space for buffer areas. The service allocates memory In the space at the logical end of the program (Figure 5-3). is tion alloca memory l standalone environment, the physica Control for check to AK DSSBRE contiguous. The routine also calls C. $DS_GETBUF_x pagcnt, [retadr]l, [phyadr], [region] pagcnt = the number of pages of memory desired. retadr the address of a 2 longword array to receive the virtual phyadr = region = . limits. buffer the address of a 2 longword array to receive physical ’ start and end addresses. that part allocated. system of 0 memory to (default) which P@ the space. 1 buffer = Pl is to space. 2 be = space. Return Status Codes SS$ NORMAL: Service successfuly completed. SS$_ILLPAGCNT: Page count is less than 1 SS$ VASFULL: Virtual address space full. x, together with $DS_RELBUF_x, to obtain You should use $DS_GETBUF memory as it is needed for specific tests. When large buffers are needed, this service enables the programmer to avoid loading a large block of zeros at the time that the program is loaded into memory. 8.5.4 $DS_RELBUF_x Release Buffer Space This macro calls a supervisor routine to release a buffer area in virtual memory from program control. $DS_RELBUF_x pagcnt, [retadr], pagcnt = the number of pages. retadr the address of a [region] 2 1longword de-allocated buffer limits. array to receive | VAX Diagnostic region = Return Design Guide the space from which the buffer is to be released. (default) P@ space. 1 = Pl space. 2 = system space. Status g = Codes SS$_NORMAL: Service DS$S_FRAGBUF: Buffer successfully completed. was not contiguous. SSS_ILLPAGCNT: Page count is less SSS_PAGOWNVIO: Page owned by a more than 1. privileged access mode. 8.6 DELAY SERVICE MACROS diagnostic program can delay itself a specified number of microseconds or milliseconds through the use of a delay service call. For example, if your program is testing a Unibus device and A you suspect delay the service possibility macro. You of a Unibus timeout, you can use should a specify the greatest allowable time as an argument. When the return from the call is made, the service returns the increment of the time delay not used via the optional RETTIM argument. You can abort the operation SDS_CANWAIT x macro. of the delay macros with the 8.6.1 $DS_WAITUS x Microsecond Delay This macro calls a supervisor routine that operation for a number of microseconds equal number specified. SDS_WAITUS x time, time = the rettim = the [rettim] number of Status Service DS$_ICERR: Interval address to units. receive unused time units. in 10 successfully completed. clock Negative specified. SSS_QUOTA: microsecond Codes DS$ NORMAL: DS$_PROGERR: 10 longword microsecond Return suspends program to ten times the Multiple time error. (or less than function error. overhead) time interval Example 8-17 shows how you can set up a delay with SDS_WAITUS x while waiting for completion of a Unibus read function. Supervisor Service Macros - MOVL BASE ADR, R2 W W MOVW R3, (R2) MOVZWL (R2), R3 Example 8-17 Ne S #10 $DS_WAITUS Get RKCS1 address. Write RKCS1. Read RKCS1. Stall for 100 to us for an event occur. _ Macro Use of the $DS_WAITUSx NOTE Because of overhead, the minimum delay is about 108 microseconds. x Millisecond Delay $DS_WAITMS 8.6.2 routine that supervisor calls a This macro equal milliseconds of number a for execution number specified. $DS_WAITMS_x time, time = rettim [rettim] the number of 18 ms units. the longword to address receive unused units. Return Status Codes Service successfully completed. $DS_NORMAL: DS$ ICERR: suspends program to ten times the Interval clock error. DS$_PROGERR: Negative time interval specified. - SS$_EXQUOTA: Multiple time function error. 8-21 time in 10 ms VAX Diagnostic Design Guide 8.6.3 $DS_CANWAIT x Cancel Wait This macro calls a routine in the | that supervisor cancels effect of a previous $DS_WAITMS_x or $DS_WAITUS x invoking the SWAKE x system service macro. the macro by $DS_CANWAIT x (no arguments) Return Status DS$_NORMAL: Codes Service successfully completed. NOTE This macro normally occurs interrupt service routine. You should delay coordinate service occurred. program occur. the macros For to example, could delay When the $DS CANWAIT determine in an interrupt than required interrupt does occur, routine could set a flag bit and Control would then return to return flag bit would know control were to upon interrupt an Notice actual time This that the requested. programs, resources Example since in 8-18 the cleared that the VMS shows $DS_CANWAII_X. Test routine. an with of the has service routine, the for interrupt the not interrupt execute the $DS CANTIM X macro supervisor, which would, in program. return to the timeout had may may However, program, occurred. time achieved may be especially true of level you to service the be environment. how a the diagnostic programs one timeout or delay is other with macro whether longer call. turn, x in coordinate if the program longer than the 2 level 2R competing the the and for system $DS_WAITMS X macro START XFER: : PUSHR #"M<R3, MOVZWL DRVTYP, R4 MOVB H HOLD CS1, R4 MOVW R4, H RO H [4 RKCS1 (R2) $DS WAITMS S Interrupt ’ #1, BLBS DN_FLG, 10$: R4> MOVZBL #10 $DS_ERRHARD... ; Yes, interrupt service BBC Load transfer. UBASTATUSS$W 2,20$ 8-22 command and start Wait 100 ms. Did an interrupt occur? No, timeout. H chec k data transferred. routine. #CHNINT, Set up drive type. OR in command. ; i occurred, registers. Initialize return status for optimistic start. H i 10% Save ; Branch ; interrupt. Set TMo ~e Branch if not interrupt. e Supervisor Service Macros a UBA $DS_ERRSYS... $DS ABORT PROGRAM 20S: BBS DEVINT, UBASTATUSSW_2,309$ 30$: $DS_ERRSYS_S... SDS_ABORT PROGRAM $DS_CANWAIT_S #1, MOVB DN FILG if device interrupt done flag. REI Example 8-18 ~ x Coordination of the $DS_WAITMS_ x Macros and $DS_CANWAIT In Example 8-18, the test routine starts a non-processor request (NPR) transfer. The $DS _WAITMS macro then causes the program to delay 100 for ms. When the device completes the transfer required, it causes an interrupt. The interrupt service routine fields the interrupt. The interrupt service routine then cancels what remains of the delay, sets a flag to indicate that the interrupt occurred, and then returns control to the test routine. The test routine, in turn, checks the flag to determine whether or not the interrupt did . occur ERROR MESSAGE SERVICE MACROS 8.7 The VAX diagnostic system provides three categories of error information. These correspond to the three inhibit error message flags (IE1, IE2, IE3) in the supervisor command language. First, both the supervisor and the diagnostic program provide the header. The header includes the program name, version and update; the test, subtest, and error numbers; the error type; the device under and a brief message. test; Second, the diagnostic program provides basic information. The basic information includes a description of the error, the contents of the device registers, and expected and received data patterns. Third, the diagnostic program provides extended error information to describe certain program conditions and/or hardware conditions. The type of information printed varies with the program, but might include statistics such as the number of bytes transferred. If the Bell each error flag is set, that the the supervisor will program encounters. ring the bell for VAX Diagnostic In addition, print Design Guide a convert register subroutines. mnemonics of This failing information macro enables register the is available to programmer to bits. specify 8.7.1 'Header Information Message Macros You can use four macros to request the printing information. These macros are identical in format, but use each to report a particular type of error. Each of calls a supervisor service routine. line error message for the title and version number, error number, and prints a message Example brief 8-19 time shows kkkkkk** PASS # TEST ERRTYP -- format In addition, by the for the 8-20 -- VER.UPD., SUBTEST the header shows a information typical Message Header Format each message daytim message 77 _ESRCA FATAL for ****xx%xxx Error DEVICE three routine error Example 8-19 TEST a service # 1 should macros programmer. ERROR -- header produces # UUT *x%kk*** PASS # stamp. Example DPROGNAME routine of you the operator. The message shows the program pass number, test and subtest numbers, specified the of these macros. header printout. The the 1 RPOX/DCL SUBTEST WHILE DIAGNOSTIC ©# ERROR TESTING - 2 4,1 *k#kkkk# 10-MAR-1978 DBA®: CONTROL @8:26: 20. 26 BUS PARITY ERROR DETECTED Example The programmer PRLINK must no 8-20 must parameter be printed. error message will that the basic or Note also that the 8.7.1.1 use IE1l use = the is a unique the Print of if a Printout print routine supplemental operator has set as information the Halt flag, Print when error by set, System after [unit], macro within the print routine Patal detecting [msgadr], number the inhibits default $SDS_ERRSOFT_x, to Error a within messages. Header Information system [prlink}, the $DS BGNTEST header fatal error. [pl--6] current and subtest. $DS_BGNSUB wuses in the and $DS_ERRDEV_x. 8-24 macros $DS - NUM macros and automatically sequenced when not specified. automatic sequencing of this parameter also includes its the information. flag, initialized address Header printed. thismacro [num], Message 8.7.1.1) if extended $DS_ERRSYS x should $DS_BRRSYS_x num should be Error the Otherwise, print You specify (Paragraph Note you Sample The all ERRHARD - x, unit = the msgadr = logical unit number of the Supervisor Service Macros unit test. under the address of a counted ASCII string. This message is included in the third line of the error header message. It should be a brief description of the error or a module call out message. prlink = the address of an error reporting routine. This is the address of a closed routine to print supplemental information about the error that has occurred. The error reporting code at this address must be surrounded by $DS_BGNMESSAGE section of code and $DS_ENDMESSAGE. is not contingent on Execution the Halt of On this Error flag. pl--6 _one to six optional parameters that may be passed to the error print routine. If specified, they must be used in sequence. Return Status Codes: None. NOTES 1. 2. R2 through R11l are preserved within this service by the supervisor and are intact is executed. when the $DS_ERRSYS x may between subtests. call to PRLINK not be used The failure of a channel call is a system fatal error. You should follow it with a $DS_ERRSYS x macro call and, generally, a $DS_ABORT macro call, as shown in Example 8-21. .SBTTL INIT $DS _BGNINIT SDS CHANNEL_S 9, #CHC$_INITA - —-we $DS_BNERR 10$ $DS_ERRSYS_S WO wmy - Initialize the UBA. Is there an error? Yes, a system fatal 10$: ; Continue with Example 8-21 -y $DS_ABORT PROGRAM program. Use e 0,= UBA_INIT_ERR, POINTER = DUMP_UBA %o error. UNIT = MSGADR of the message error reporting code Terminate program execution. $DS _ERRSYS x Macro VAX Diagnostic Design Guide 8.7.1.2 $DS_ERRDEV_x You should use $DS_ERRDEV x num Print Device this macro [num], after [unit], Fatal Error Header [prlink], [pl--6] detecting [msgadr], a device Information fatal error. the unique error number within the current subtest. NUM is initialized by the $DS BGNTEST and $DS_BGNSUB macros and automatically sequenced when not specified. The automatic sequencing of this parameter also includes all its default wuses 1in the macros $DS ERRHARD x, $DS_ERRSOFT x, and $DS_ERRSYS Xx. unit the logical unit msgadr the address of number a of counted the - unit ASCII under string. - test. This message is included in the third line of the error header message. It should be a brief description of the error or a module call out message. prlink the address of an error reporting routine. This is the address of a closed routine to print supplemental information about the error that has occurred. The error reporting code at this address must be surrounded by $DS BGNMESSAGE code one optional flag. pl--6 and section of to error six print $DS _ENDMESSAGE. is not contingent on parameters routine. If that specified, Execution the may Halt be of On passed they must be this Error to the used in of the sequence. Return Status Codes: Noné. NOTES 1. R2 through R1l1 are preserved within this service by the supervisor and are intact when the call to PRLINK is 2. A fatal device executed. $DS_ERRDEV_x may between subtests. error is one that not prevents be used further testing device. Following the error detection and message, the programmer may want to drop the testing of the device under test and proceed to the next device to be tested, or the programmer may want to abort the program. Supervisor Service Macros 8.7.1.3 $DS_ERRHARD_x Print Hardware Error Header Information You should use this macro after detecting a hardware error. $DS_ERRHARD_x [num), [unit], num = ([msgadr], [prlink], [pl--6] the unique error number within the current subtest. NUM is initialized by the $DS BGNTEST and $DS_BGNSUB macros and automatically sequenced when not specified. The automatic sequencing of this parameter also includes all §$DS_ERRDEV_x, macros the in wuses default its $DS_ERRSOFT_x, and $DS_ERRSYS_x. unit = msgadr = the logical unit number of the unit under test. the address of a counted ASCII string. This message is included in the third line of the error header message. It should be a brief description of the error or a module call out message. This is the the address of an error reporting routine. address of a closed routine to print supplemental information about the error that has occurred. The error reporting code at this address must be surrounded by prlink and $DS_BGNMESSAGE $DS_ENDMESSAGE. Execution of this is not contingent on the Halt On Error section of code flag. pl--6 = one to six optional parameters that may be passed to the error print routine. If specified, they must be used in sequence. Return Status Codes: 1. None. NOTES R2 through R1l1l are preserved within this service by the supervisor and are intact when the call to PRLINK is executed. 2. $DS_ERRHARD_x may between subtests. not be used x macro is the error messageé macro most commonly The $DS_ERRHARD used upon error detection. Example 8-22 is typical. 10$: : ; Write to CSR. MOVW #"X5068, @DZCSR MOVW @DZCSR, CSRW ; Read CSR. BEQL 28$ S $DS_ERRHARD ; success XORW3 #7°X5068, CSRW, XORW - UNIT = LOG_UNIT, MSGADR = REGERR 20S: ; Check data. ; device under test ; message address $DS_CKLOOP Example 8-22 x Macro Use of the $DS _ERRHARD 8-27 VAX Diagnostic Design Guide 8.7.1.4 $DS_ERRSOFT x a fails test should use = Soft but Error works Header the is [num], [unit], unique error initialized and [msgadr], number by the automatically automatic its when default unit = the logical msgadr = the address included within the - When retried, vyou of in and when this the address reporting not the of number a the of counted third of specified. also macros unit ASCII of an error The includes $DS all ERRHARD B the line NUM macros under string. the reporting of test. This error x, - message header the error routine. is message. This or is a the a closed routine to print supplemental about the error that has occurred. The error code at and of subtest. BGNSUB and $DS_ERRSYS x. $DS BGNMESSAGE section $DS parameter It should be a brief description module call out message. address of information [pl--6] current $DS_BGNTEST uses unit in [prlink], sequenced sequencing $DS_ERRDEV_x, prlink Information correctly this macro. $DS_ERRSOFT x num Print initially code this is address must $DS_ENDMESSAGE. not contingent on be surrounded Execution the Halt of by this On Error flag. one pl--6 to error six optional print parameters routine. If that specified, may be passed they must be to the used in sequence. Return Status Codes: None. NOTES 1. R2 2. through R1l1l 8.7.2 same preserved the the call supervisor to $DS_ERRSOFT_x may not be wused format. print macros Each and PRLINK subtests. Information Print Macros basic and extended information four within this service by are intact when is executed. between The are calls the extended print all use the routine in the supervisor to check a different set of the inhibit flags before printing the message, as follows: Flags $DS_PRINTB x IE1l, IE2 IEl, IE2, IES $DS_PRINTF x Example 8-23 shows message checked $SDS_PRINTX x $DS_PRINTS x error IE3 none the three standard messages. 8-28 formats for basic error Supervisor Service Macros 1 REGISTER VALUE WRONG GOOD: <EXPECTED-VALUE> XOR : <XOR-VALUE> BAD : <ACTUAL-VALUE> ; <XMNEMONICS OF XOR BITS> REGISTER DUMP OF UNIT UNDER TEST 2 <REGISTER-0> : <REGISTER-VALUE><RADIX> ; XMNEMONICS OF SET BITS> <REGISTER-N> : <REGISTER-VALUE><RADIX> ; (MNEMONICS OF SET BITS><SEE NOTE 1> DATA COMPARE ERROR IN BUFFER 3 DEVICE STARTING ADDRESS: MEMORY BUFFER ADDRESS RECORD WORDS <PHYSICAL STARTING ADDRESS ON UUT> <MEMORY ADDRESS> <LENGTH OF SIZE TRANSFER> <NUMBER OF WORDS THAT ARE BAD> IN ERROR ADDRESS GOOD <MEMORY ADDRESS> <EXPECTED DATA> <MEMORY ADDRESS> <EXPECTED DATA> XOR BAD <ACTUAL DATA> <XOR OF GOOD AND BAD> <ACTUAL DATA> Example 8-23 for Basic Standard <XOR OF GOOD AND BAD><SEE NOTE 2> Formats Error Messages NOTES 1. All mnemonics must be identical to the ones in the hardware engineering specification for 2. A maximum of eight memory locations will be dumped. the unit under test. 8-29 VAX Diagnostic Design Guide The extended print routine uses formatted ASCII output (FAO) to compile a string and then print it. You should use the $DS_PRINTB_x and $DS_PRINTX x macros in the print routine (PRLINK argument), rather than in the test routines. In this way only one macro call (e.g., SDS ERRHARD x) must be made for each error detected in Program data a test routine, as shown in Example 8-24. section: MSG5: : .ASCIC \CSR IN ERROR\ MSG6: : .ASCIC Print subroutine PRINT ROUTINE:: \TRANSMIT containing READY IS CLEAR, SHOULD BE SET\ address of basic $DS_PRINTB X macro: $DS_BGNMESSAGE REGMASK MOVL = <R2, ERRS P1(AP), R3, R4> R2 » ; Save ; error message. ; Print basic $DS_PRINTB S FORMAT = (R2) message. $DS_ENDMESSAGE Test routine which calls the print data and compare. subroutine: 19$: = MSG5, PRLINK = - - Is yes an error? device under test header message 20$: $DS_CKLOOP = MSG6 text basic print error information routine basic print message We - wme Pl PRINT ROUTINE, there WE g MSGADR W $DS_BNERROR 20§ $DS ERRHARD S ~ UNIT = LOG_UNIT, 4y transfer Ny ; NI $DS_BGNSUB 10$ Example 8-24 Use of the $DS PRINTB_x Macro Supervisor Service Macros In Example PRINT 8-24 ROUTINE, the and $DS_ERRHARD S MSG6. The macro macro takes first as arguments calls a MSGS5, supervisor routine to produce a three-line error header message. The MSGADR argument (MSGS5) points to an ASCII string that makes up a part of the header message. The PRLINK argument identifies the basic print routine, to which control passes from the supervisor routine. The print routine saves the Pl argument from the $DS ERRHARD S macro call in R2. The $DS PRINTB S macro causes MSG6 to be printed. in the print subroutine then However, you will generally need to print a message containing information which varies, such as the value in a register or the mnemonic of a bit in error. In this case, instead of providing a complete message in the data section, you must provide a control string that includes FAO directives. Variable data and character strings can be represented with the FAO directives. Table 8-1 gives a summary of these directives. Table 8-1 Character Summary of FAO Directives String Substitution Directive | Function 1AC Parameter(s) * Insert a string. counted ASCII Address of the string; the first byte must contain !AD ! AF 1AS Insert an ASCII string. l. Insert an ASCII string. l. Replace all ASCII codes Insert Numeric Conversion an nonprintable with periods ASCII 2. length. Length of string Address of string Length of string Address of string (.). string. Address of quadword character string descriptor pointing to the string. (zero—-filled) 10B Convert a byte 10L Convert 1XB Convert a byte to IXW Convert a word 10W 2. the to octal. Convert a word to octal. a longword hexadecimal. hexadecimal. to to octal. Value to be converted to ASCII representation. For byte or word conversion, FAO uses only the low-order byte or word of the longword VAX Diagnostic Design Guide Summary of Table 8-1 Convert a longword hexadecimal. Convert FAO Directives to (Cont) parameter. an unsigned decimal Convert word. an unsigned decimal Convert an unsigned decimal byte. longword. Numeric Conversion (blank-filled) 'UB an unsigned decimal an unsigned decimal an unsigned decimal IUW Convert byte. Convert Value ASCII to be converted representation. to word. UL Convert longword. ! SB Convert ! SW byte. Convert a signed decimal For conversion, FAO uses only the low-order byte signed decimal a signed decimal parameter. (CR/LF). None or Convert or a word. ISL byte word of word the longword longword. Output String Formatting ! Insert new line ! Insert a tab. 17 Insert a form 1! Insert an Insert S !3S exclamation if converted not 1. 13T 13D Insert Insert feed. the the mark. most recently numeric value system time. Address date time value to be converted to ASCII. system is and time. @ is Define output field width of n characters. Format all data and directives within delimiters,<and>, and blank-filled None left-justified, within 8-32 the f}eld. a quadword specified, current used. I n< 1> of system If the time is Supervisor Table 8-1 In*c Repeat the Parameter Summary of the character output string n FAO ¢ Directives in Service Macros (Cont) None times. Interpretation l- Reuse the the list. last '+ Skip the next the list. parameter parameter in None in *If a variable repeat count and/or a variable output field length is specified with a directive, parameters indicating the count and/or length must precede other parameters required by the directive. Example 8-25 control string the shows and $DS_ERRxxx x how the how the and $DS_CVTREG_x macros. 8.7.2.1 $DS_PRINTB_x macro print to basic explanatory Print error data received data Typically, Basic Error information, Information for explanatory message, XOR data. The message Use will be the expected inhibited if data, the received either the IEl or one line. print the data, the IE2 set. $DS_PRINTB x format = format, = [arg], the address of consists of the conversion arg this data one $DS PRINTB x macro is used to print four $D§lPRINT§;x macros would be used to Therefore, - example: message expected XOR FAO directives should be built into the print macros should be coordinated with directive [arg]l, and the flag is ... the control string. The fixed text of the output control string string and the directives. parameters contained in longwords. A parameter be a value that is to be converted, the address of string that is to be inserted, a 1length, or an argument count, depending on the directive. For each directive in the <control string there may be corresponding parameters. Up to 16 arguments may be may the VAX Diagnostic Design Guide None. Return Status Codes: Refer this to Chapter NOTE 9, the and manual Paragraph Services Reference Manual of 9.6 VAX/VMS System for more FAO information. 8.7.2.2 $DS PRINTX x macro should be used basic error Print Extended Error Information - This to print information that supplements the information, failing such as: addresses device register contents channel register contents additional The service will is explanations IE2, or IE3 The control string not print the message if either IEl, set. x format, $DS_PRINTX format = the [arg], address of [arg]l, ... the control string. consists of the fixed text of the output string and the conversion directives. - arg = directive parameters contained in longwords. A parameter may be a value that is to be converted, the address of the string that is to be or an each For . the directive Dbe may there string be may to 16 arguments inserted, argument count, depending on control the in directive Up corresponding parameters. a length, supplied. Return Status Codes: None. Refer to Chapter and this manual NOTE 9, Paragraph 9.6 of VAX/VMS System the Services Reference Manual ' information. for more FAO Supervisor Service Macros 8.7.2.3 $DS_PRINTF_x Print a Forced Message - Use this macro when the inhibit error control flags (IEl1, IE2, 1IE3) must be overridden. Messages which should be forced are those which alert the operator to significant events or notify the operator that some action on his in main-line code. part $DS_PRINTF x format, format = the is required. [arg]l, address of [argl, the control of the fixed text conversion directives. = macro is normally used ... consists arg This string. of the The output control string string and the directive parameters contained in longwords. A parameter may be a value that is to be converted, the address of the string that is to be inserted, a 1length, or an argument count, depending on the directive. For each directive in corresponding the control parameters. string Up to 16 there may arguments be may be supplied. Return Status Codes: None. NOTE Refer to Chapter 9, Paragraph 9.6 of this manual and the VAX/VMS System Services Reference Manual for more FAO information. 8.7.2.4 $DS_PRINTS_x Print macro should be used summary message. The control flag is set. $DS_PRINTF x format, format = arg = [argl, [argl, Report summary not be - The routine printed directive parameters be a value that string that is argument count, directive in corresponding supplied. Status Codes: contained is to in on control parameters. Up the to 16 there arguments 9, Paragraph 9.6 of the VAX/VMS System Services Reference Manual information. 8-35 a IES for A parameter directive. string None. to Chapter manual and print the the address length, or NOTE Refer this to if control string string and the longwords. to be converted, be inserted, a depending the $DS PRINTS x ... the address of the control string. The consists of the fixed text of the output conversion directives. may the Return Summary only in the message will more FAO For of an each may may be be VAX Diagnostic Design Guide $DS_CVTREG_x Convert Register 8.7.3 This macro calls a supervisor routine that converts the contents of a register to a counted ASCII string of mnemonics for inclusion in an error message. For every bit set in the register, the corresponding mnemonic is included in the ASCII string. Several bits in a register may make up a function. In this case, the corresponding mnemonic should registers mnemonics the device followed be list, where: "=n"R" by or "=n@" in the number of bit positions that make up the field. n = R = the radix be printed. in which the value of the function field should in a print routine in The $DS CVTREG_x macro can be used conjunction with one of the PRINT macros. Since the routine will be called through one of the $DS _ERRxXX_ X macros, all information necessary to the routine must be “specified with arguments to that X macro. $DS_ERRXXX_ $DS_CVTREG_x msb, data, mneadr, strbuf, maxlen, [V1--6] msb = the most significant bit data = the address of the mneadr = strbuf = the address of a buffer where the counted ASCII string maxlen = the address the register contents in memory. a ASCII counted string of bit mnemonics. is returned. to be length of the buffer. = pointers to counted 1lists pointing to the ASCII function values specified with a strings defining vVl -- V6 in the mnemonic Return of position. form xxxxxx=n@. Status Codes $DS_NORMAL: Service $DS_PROGERR: This following successfully completed. status code to returned is indicate any of the conditions: is greater than 11, a. the number of arguments b. the MSB c. the mnemonic string is exhausted and an = sign encountered with nothing to the right of it, d. a negative digit was encountered is greater than 32, 8-36 has been in the mnemonic string, Supervisor Service Macros e. a f. some character was character other separate mnemonics g. the ASCII format h. the Notice output that bad caller's encountered in than the a is no from this routine. 2. Rl contains the full length of the string plus the count byte. This is true even if the buffer size is too short or the string is longer than 8-25 shows The are related shown as Global Data and a bytes. print subroutine global well. data containing the $DS_CVTREG_x section and the calling test buffers PROGRAM GLOBAL DATA SECTION. Description: All dynamically modified data should be placed in this section. This is the only section which will normally be write enabled. NS Ne wy W Ne W to NOTES Example WMy used is returned, 16(AP), the zero in 16 (AP) indicates The first mnemonic 1is associated with the bit position MSB. macro. routine Functional been 1. 255 .SBTTL has string, overflowed. | ++ comma mnemonic overflowed, buffer output the string, that when the code DS$ PROGERR buffer address, is cleared. The there in LOG_UNITSL:: DZSCSR:: DEV REG:: CSRSW: : XORSW: : . LONG -ADDRESS ¢ ; ; LUN CSR address .ADDRESS @ ; register .WORD .WORD HDW PTBLESA:: .LONG CHAR_BUF:: .BLKB - CSRREGSC: : ; XOR of exp and ; ; data address ; 132 ; buffer ; 132 8-37 of to P-table .ASCIC /TRDY,TIE,SA,SAE,NUM, //MSE,CLR,MAINT,NU,NU,NU/ pointer ; CSR buffer rec pointer character 1/0 VAX Diagnostic Design Guide Subroutine .SAVE . PSECT PRINT, LONG .ASCIC \!/EXPECTED:!XW(X)\ ; RCV_FMTSC:: .ASCIC \!/RECEIVED:!XW(X)\ ; XOR FMTSC:: .ASCIC \!/XOR:! s ~e EXP FMTS$C:: - IXW(X);!AC!/\ , : N - We WE WMy W - MOVL ERRS$ We , P1(AP),R2 REGMASK = FORMAT = R4, Wy e (R2) R5, R2 $DS_CVTREG_S MSB = #15, DATA = R2, MNEADR = CSR REG $C MAXLEN $DS - #132, $DS_PRINTx S - FORMAT = RCV_FMTSC, P@ = R5 $DS_PRINTX_S FORMAT P8 Pl = XOR_FMT$C, - - - = R2, = #CHAR_BUF 8-38 R5, R6> register address of register expected data received data print message exclusive OR ; ; ; 16-bit register bits in error address of counted ASCII string ; ; address of string buffer ; buffer ; ; Print message expected data ; print message ; received data ; PRINTX S FORMAT = EXP FMTS$SC, PO = R4 - R4, name of ; ; - added. line feed ; ; - STRBUF = CHAR BUF, o is hex. converted to hex. The string of bit mnemonics is R3, we MOVL ERR$ P2 (AP),R3 MOVZWL ERRS$ P3(AP),R4 MOVZWL ERR$ P4 (AP) ,R5 S $SDS PRINTB XORL3 <R2, W ERRORSA:: $DS _BGNMESSAGE to XOR data is length (CVTREG) W REG LASCIC \!/\ Received data converted print TMo FMTCR: : Expected data is converted to hex. XOR data we Print message bits in error Routine MOW #°X5068, @DZS$CSR error ; extended ; ; extended message address of CSRREGSC ; ; expected data received data We Wy MOVL #°X5068, CSRSW MOW @DZS$CSR, CSR$W XORW3 #°X5068, CSR$W, BEQL Write to CSR. expected data read CSR check “ Test N Calling w-e Supervisor Service Macros XORSW 10$ $DS_ERRHARD S UNIT = LOG_UNITSL, MSGADR = REGERR, PRLINK = REG - - ERRORSA, Pl P2 = #MSG CSRERRSC, = REGISTERSA, - P3 P4 = #°X5068, = CSRSW - ; - - -e 10$: Example In this call in 8-25 Use message - of the print routine (continue $DS _CVTREG_ x test) Macro example, the PRLINK parameter in the $DS_ERRHARD_S the calling test routine specifies the name of the subroutine. Pl through P4 specify the address containing bit mnemonics for the received data. The CVTREG macro in the mnemonics $DS corresponding S to the CHAR_BUF. The third print extended CSR, and message, expected the and subroutine places the failing $DS PRINTX S macro print macro bits in the buffer call following the $DS_CVTREG_S macro causes the failing bit mnemonics to be printed. Example 8-26 Example 8-25. khkkkkkk*k shows PROGNAME PASS 1 HARD ERROR the -- message Vl.fl produced by the code shown kkkkkkkk TEST 1 SUBTEST 1 ERROR 3 10-APR-1979 15:37:50.47 WHILE TESTING TTA: DEVICE REGISTER ERROR CSR IN ERROR EXPECTED: 5068 (X) RECEIVED: XOR: 0000 (X) 5068 (X); TIE, SAE,RIE,MSE,MAINT Example 8-26 A Sample Error Message Printout 1in VAX Diagnostic Design Guide 8.8 PROGRAM-OPERATOR DIALOGUE SERVICE MACROS Some diagnostic programs require operator-supplied information for the execution of certain tests. These tests should be placed in a separate section named Manual Intervention. The following service call macros are useful in organizing the dialogue and adapting the program flow to the operator response: $DS_ASKxXX macros $DS_PARSE_X $DS_CLI. You can use operator specified The with any of the with a message. buffer. $DS PARSE a syntax x macro tree. five $DSASKxxX x macros The operator's response is can At then each be used node of to parse the tree a to prompt returned command (created the in a line by a $DS_CLI macro) control passes to a CASE instruction. Control then Figure passes to the code that executes the operator's command. 8-2 shows program. the flow of a typical operator dialogue ' portion of a Supervisor C START ’ | Y PROMT THE OPER. BUFFER<STRING ' PARSE THE INPUT LINE ERROR YES NO FINAL COMMAND PROCESSING ' EXECUTE THE COMMAND TK-1883 Figure 8-2 Operator Dialogue Flowchart Service Macros VAX Diagnostic Design Guide should If the operator has typed in an improper command, the code d. If comman r anothe for or operat detect the error and prompt the the command there is no error, the code should complete processing and then execute it. $DS_ASKSTR_x Ask the Operator for a String 8.8.1 This macro calls a supervisor routine that prompts the operator for a string response. It accepts an ASCII string that it checks 1is against a list of possible responses. placed in a caller-specified buffer. If valid, the string $DS_ASKSTR_x msgadr, bufadr, [maxlen], [valtab], [defadr] msgadr = the address of a counted ASCII string used as a prompt. bufadr = the address of a counted ASCII buffer. maxlen = the maximum valtab = the defadr = length of include count byte). address of a the counted not response string (does of string pointers. Default = 72. 1list Default = @, meaning no validation table. the address of a counted ASCII string to be used if the operator gives a null response. that there is no default string. Default = @, meaning Return Status Codes DS$ NORMAL: Service successfully completed. DS$ PROGERR: The number of arguments supplied is incorrect. DS$ TRUNCATE: The string supplied by the operator has been truncated because it will not fit into the buffer supplied by the program. 1. NOTES Execution of this macro will cause a program flag 2. if abort is clear. the Operator If the Prompt flag is set, ranges and default values will be printed with the prompt message. 3. 4. If VALTAB = @, any string will be accepted without qualification. If VALTAB # @, Rl will return with an index value into the validation table. If DEFADR is specified and 8-42 Supervisor Service Macros the operator selects return only, Rl will containing @. 5. Do not prompt use PFAO string. ensure that a carriage be returned directives the If you prompt in the want to message always starts on a new line, place CR and LF before the first message delimiter. For example: <13><16>\PLEASE TYPE A COMMAND\. $DS_ASKDATAx Ask the Operator for a Numeric Value 8.8.2 This macro calls a superv1sor service routine that prompts the operator for a numeric value and ensures that it is within an acceptable range. The service converts the ASCII numeric string to and stores it 1in a it if necessary, truncates binary data, field (mask). x msgadr, $DS_ASKDATA datadr, caller-specified [exword] [radix], [mask], [lolim], [hilim], [defalt], [unused], msgadr = the address of a counted ASCII string used as a prompt. datadr = the a of address 1longword that will or the receive the response. default radix radix = PARS$ BIN, PARS$ OCT, PARS$_HEX, mask = a bit mask indicating the lolim = the minimum acgfptable numeric response. Default value = hilim = PAR$_DEC. - maximum, field -(277). the maximum agfeptable numeric + maximum, position and size. response. Default value = -1). (27 use if the operator gives a null response. defalt = the value to unused = reserved for exword = the mask. PARS$ NODEF means that there is no PARS ATDEF, PAR§—ATLO, and PARS ATHI cause the expansion. exception default. parameters DEFALT, LOLIM, ~and HILIM to be interpreted as containing the addresses where the corresponding values instead of containing their literal mag be found, values. Return Status Codes DS$ NORMAL: Service successfully completed. VAX Diagnostic Design Guide DSS PROGERR: DS$ TRUNCATE: fit in The number value arguments by the is incorrect. to $DS_ASKVLD x Ask the Operator for a Numeric Value the $DS_ASKDATA macro, the $DS_ASKVLD macro calls a specified supplied supplied large the The of operator is too buffer. NOTES 1. Execution of this macro will cause a program abort if the Operator flag is clear. 2. If 3. set, ranges and default values will be with the prompt message. the Prompt flag is printed Truncation of left-most bits occurs if a response is larger than the mask. 4, The radix and arguments $DS_PARDEF. 5. Rl contains value, 6. 8.8.3 Like supervisor not the not use FAO prompt string. that mask defined by converted truncated, Do routine exception are prompts on binary return. directives the operator in for the a numeric value. It accepts an ASCII numeric string as input, converts the string to binary format, and truncates the string if necessary. The supervisor routine then checks to determine whether the value is within an acceptable range and stores the value 1in a caller-specified variable field. This field is specified by position and $DS_ASKVLD x fhilim], msgadr = datadr = size, rather msgadr, [defalt]l, the the then with datadr, [unused], address of address mask. [radix], [pos], [size], [lolim], [exword] a counted of a a ASCII string used as that will receive 1longword a prompt. the response. radix = pos = PARS$S BIN, PAR$_DEC. the right-most Default = size = the PARS$ number OCT, | PARS HEX, or Range bit of the field. bits in the field. 4. of 8-44 the default = @ radix through 31l. Supervisor Service Macros lolim the minimum acgfptable numeric response. - hilim -(2 maxXximum, the maximum + maximum, value Default value agfeptable numeric (277 to response. Default value -1). defalt the unused reserved exword the exception mask. PARS NODEF means that there is no default. PAR$ ATDEF, PARS$ ATLO, and PAR$ ATHI cause the parameters DEFALT, LOLIM, and HILIM to be interpreted as containing the addresses where the corresponding values may be found, instead of containing their 1literal for use if the operator gives a null response. expansion. values. Return Status Codes DS$ NORMAL: Service DS$ PROGERR: The successfully completed. number of arguments DS$ TRUNCATE: The value supplied fit in the specified buffer. supplied by the is incorrect. operator is 2. Execution of this macro will cause a program abort if the Operator flag is clear. If the Prompt and default with the flag values is set, ranges will be printed prompt message. 3. The radix arguments $DS_PARDEF. and are 4, Do FAO not use prompt string. large to | NOTES 1. too exception defined directives mask by in the VAX Diagnostic 8.8.4 Design Guide $DS_ASKLGCL x Ask the Operator for a Logical Response This macro calls a supervisor service routine that prompts operator for a 1logical response to a specified question. the It accepts an ASCII "yes" or "no" string and converts this to single bit (flag). The supervisor routine then stores the bit in caller-specified bit position within a caller-specified byte. $DS_ASKLGCL_x msgadr, datadr, msgadr = the address of a counted datadr = the address of a byte pos = a bit Default yexfer = noxfer = defalt = Return position = ASCII that within [yexfer], [noxfer], string will used receive as the DATADR. Range = @ positive response. a [defalt] a prompt. response. through 7. 0. the branch meaning no address branch. branch address meaning no for for a negative response. Default Default = 4, = @, by the branch. PARS YES or Status [pos], a PARS NO. Codes DS$ NORMAL: Service DSS PROGERR: The caller is too is incorrect. successfully completed. bit large a position argument number the or (POS) number of specified arguments supplied NOTES 1. Execution of this macro will cause a program abort 1if the Operator flag is clear. 2. If the Prompt flag is set, ranges and default values will be printed with the prompt message. 3. Do not 1in the 8.8.5 $DS_ASKADR x Ask Operator for an Address 'This macro calls a supervisor service routine that prompt the prompt an message address. on The the FAO operator's service and checks whether service then stores use directives string. accepts terminal, asking an numeric ASCII displays operator address a for string or not it is within an acceptable range. the address in a user-specified longword. The Supervisor [radix], x msgadr, datadr, $DS_ASKADR Service Macros [hilim], [lolim], [defalt], [unused], [exword] msgadf = the address of a counted ASCII string used as a prompt. datadr the address a of receive will that 1longword the response. radix = PAR$ BIN, PARS _OCT, PARS HEX. the minimum lolim PARS$_DEC, or the default radix acceptable numeric response. Default value thgzmaximum acceptable numeric response. Default value 2. hilim = (277-1). defalt the value to use Default value = unused exword reserved the for if 0. the operator gives a null response. expansion. exception mask. PARS NODEF means there is no default. PAR$ ATDEF, PAR$_ATLO, and PARS_ATHI cause the parameters DEFALT, LOLIM, and HILIM to be interpreted as containing the addresses where the corresponding values may be found, instead of containing their literal values. Return Status Codes DS$ NORMAL: Service DS$ PROGERR: successfully completed. The number of arguments supplied is incorrect. NOTES 1. Execution of this macro will cause a program abort if the Operator flag 2. 3. is clear. If the Prompt flag is set, ranges and default values will be printed with the prompt message. The radix and exception mask are defined by arguments $DS_PARDEF. 4, Do not use FAO prompt string. directives in the VAX Diagnostic Design Guide | $DS_PARSE_x Parse 8.8.6 This macro calls a supervisor routine (DSXSPARSE) to parse an ASCII string in the buffer described, using a caller-supplied parse tree. When a match in the tree is found, the routine calls a caller-supplied action routine. Upon a mismatch, the supervisor routine branches to another point in the parse tree. $DS_PARSE x bufadr, tree, bufadr = the tree the address of the tree structure to be used = action = address the address Return Status Codes DS$ NORMAL: Service DS$ ERROR: of action of a quadword the action for the buffer. in parsing. routine. successfully completed. Error match code DFS$ OVERFLOW: descriptor Numeric input encountered overflow in in the the parse tree. quadword descriptor, BUFADR. NOTES The 1. repeated use of The ASCII string that $DS_CLI_x. 2. be generated The simplest by defined is structure tree the is macro parsed may in a number of ways. way to generate the use to is string X Macros. $DS_ASKxXXX_ one of the Example 8-27 shows how the $DS_ASKSTR x, $DS_PARSE_x, and $DS_CLI macros can be coordinated to solicit and act on information from the operator. flowchart The code shown in in this example corresponds roughly to the Figure 8-2. ;‘Header module NULL=0 SUB1=1 SUB2=2 STOP =3 INIT=4 CHAR BUF:: CMD BUF:: TOKEN BLOCK:: .BLKB 132 . QUAD .ADDRESS 0 ; ; ; 132 character I/0 buffer quadword descriptor buffer for action routine Supervisor Service Macros . PAGE Interpreter tree commands: NG This SUB1l NWE Wy Command W N s ++ SUB2 for the interpretation of three STOP M Mo nodes An be ambiguous or invalid command notified to that effect. will cause the operator to -e Are ~e Operator Is still Is still Is e “s e not “e - MISS=110$ $DS CLI“CHAR=CLIS$K_STRING, ACTION=STOP, Clear token block. Is the first character -e 20$ - TCHAR=<"A"S">, ACTION=NULL, 30S: INIT $DS CLI CLISK BR, $DS CLI- we 10$: 208$: we FIRTREE: : ~e WE WI WP WP Tree provides enough the an S? information next 3 characters TOP? - ASCII=<\TOP\> 705 MISS=110$ $DS CLI- ACTION=NULL, - TCHAR=<"A"1">, ACTION=SUB1l, MISS=98$ - $DS CLI- 9@S: "CHAR=CLISK EXIT $DS CLITCHAR=<"A"2">, - 100$: MISS=1108$ $DS CLICHAR=CLIS$K EXIT ACTION=SUB2, 110$: $DS_CLI- the the enough next not character next information character enough U? B? information character 1? - 808$: - CHAR=<"A"B">, 3 $DS _CLI- not STOP. Operator the has next typed SUBI. “Ne 60S: - next typed Is “ ACTION=NULL, MISS=110$ the has Operator has typed SUB2. e 50S$: $DS CLI“CHAR=CLIS$K_EXIT $DS CLIT CHAR=<"A"U">, - Operator has typed an we 40$: character 2? improper command. - CHAR=CLI$K ERROR 8-49 VAX Diagnostic Design Guide .SBTTL PROGRAM SUBROUTINES ACT_ENTRY:: CASEL RO, #0,#4 .WORD ACT NULL ACT:SUBl -10$ -10$ ; If If SuUBl .WORD .WORD .WORD ACT SUB2 ACT_STOP ACT INIT -10$ -10$ -10$ ; : If If SUB2 STOP ; fatal error ; Abort program. ; Load command routine ; Load command routine ; Load command routine ; ADR. 168S: WORD 20$: $DS_ERRSYS S . PAGE $DS ABORT ACT INIT: - CLRL RSB ACT SUB1l: MOVAL - PROGRAM TOKEN BLOCK SUB1 ADR, TOKEN BLOCK - RSB ACT SUB2: - ACT NULL: - - null ; ADR. MOVAL SUB2 ADR, TOKEN BLOCK RSB ACT STOP: ; - ; ADR. MOVAL STOP_ADR, TOKEN BLOCK RSB GETLINE: : .ASCIC <13><10>\PLEASE TYPE A COMMAND\ ; FAO directives ; permitted not here. AMBICMD:: .ASCIC \!/AMBIGUOUS COMMAND\ INVCMD: : .ASCIC \!/INVALID COMMAND\ ; Test Module $DS BGNTEST : WHATNEXT: 198: $DS ASKSTR S - - ALIGN=LONG - MSGADR=GETLINE, BUFADR=CHAR BUF, DEFADR=0 ; ; - ; - ; ; Ask operator command. Prompt for a line. command storage There is no default. CMDBUF CMDBUF+4 CHAR BUF+l1, WP MOVAL if at succeed... WME MOVZBL CHAR _BUF, W 10% W $DS_BNCOMPLETE Ny Supervisor Service Macros - -y S $DS_PARSE BUFADR=CMDBUF, TREE=FIRTREE, ACTION=ACT ENTRY o 20$ we $DS_BCOMPLETE $DS 20$: ~ PRINTF S - FORMAT=INVCMD ; BRB 10$ TSTL TOKEN_BLOCK BNEQ 30$ S $DS_PRINTF FORMAT=AMBICMD 39$ BRW JSB BRW @TOKEN BLOCK SUB1 ADR:: command string length Build quadword descriptor. Parse the command. The command has been parsed. "INVALID COMMAND" Get another command. Is TOKEN_BLOCK empty? No, a valid command was ; typed. ; ; ; 10$ you don't ; ; ; H 18§ first "AMBIGUOUS COMMAND" H Get another command. Execute command. Last command executed, get another. ; exit RSB SUB2_ADR:: RSB STOP_ADR:: $DS_ENDTEST Example 8-27 Prompting and Parsing a Command The service called by $DS ASKSTR S prompts the operator with a message at GETLINE. When the operator responds, the service places the response string in the response buffer, CHAR BUF. If the service does not complete these tasks successfully, the macro is called again. On successful the $DS return PARSE S macro. from the This string In CHAR BUF according Figure 8-3 of the $DS_CLI macro. shows the ASKSTR macro to service, calls the configuration control a service the tree. tree created of that by the The passes parses to the repetition parse macro checks one letter at a time against the tree. At 20$ the first character is checked. If the character is not an S, control passes to the label specified by the MISS argument, 110$. A miss at this point shows that the operator has typed an improper command. If the first character is an S, control 8-51 passes to the ACT NULL label. Z81-M1 cansyav Hav—ians 34000 VAX Diagnostic Design Guide 30 0 HOH43 2an3onig p21u9e3r91wWd]iO,eDjul 8-52 Supervisor Service Macros Control then returns to 30$, where the next three characters are checked against TOP. T or TO or TOP will match. Any other character combination is a miss. If there is a match, control passes to 49$, an exit from the tree back to the parse service. If there is a miss, the character checked may or may not be an error. Control The passes tree to 50$ which checks provides 40S for seven for a the the operator ACT ENTRY and so on. exits: STOP 80$ for SUB1 100$ for SUB2 110$ for an improper command 20S$, 50$, and 60$, for ambiguous If U, or commands has typed STOP, SUB1l, label. The CASEL instruction SUB2, control selects passes ACT STOP to for STOP, and so on. Each of these brief action routines places a different address in TOKEN BLOCK, after ACT_INIT has cleared it. The JSB @TOKEN BLOCK following the $DS PARSE S macro then passes control to the appropriate test code: SUB1 ADR SUB2 ADR or STOP_ADR If the operator has typed an ambiguous command, such as S, SU, or SUB, the token block is left empty. The instruction at 26$ in the test code detects this condition. The code then notifies the operator of an ambiguous command and returns control to 10$ in order to get another command. 8.9 SYSTEM CONTROL SERVICE MACROS The programmer should not try to modify the system control block (SCB) directly, since doing so would probably cause supervisor errors. Therefore, four supervisor service macros are provided to enable indirect control of the system control block by the diagnostic program. They should be used in level 3 diagnostic programs only. 8.9.1 This from $DS_SETIPL x Set Interrupt Priority Level macro should be used to raise the IPL to block the device under test. x level $DS_SETIPL level = interrupt priority level. Return Status Codes DS$ NORMAL: Service successfully completed. interrupts VAX Diagnostic Design Guide 8.9.2 $DS_SETVEC_x Set System Control Block Vector This macro calls a supervisor routine (DSXSSETVEC) to address control of an block, exception or interrupt setting a system control routine into block vector load the the system for program control. $DS_SETVEC_x vector, vector [code] the absolute vector isradr the virtual address code P Return DS$ = isradr, or Status NORMAL: DS$ IVADDR: the set, the the = kernel a service stack; 1 = routine. interrupt stack. Codes Service address bits <@1:88> are not zero. Invalid vector. Interval clock busy. $DS interrupts # of Vector modified. DS$_IVVECT: DS$_ICBUSY: Use 1; address. SETVEC or x macro exceptions vector points in when you the most directly to a want direct your program to possible manner. service routine field When specified by programmer. 8.9.3 $DS_CLRVEC_x Clear a System Control Block Vector This macro calls a supervisor routine that sets the system control block vector for supervisor handling. The routine loads the vector in the system control block (SCB) with the contents of the corresponding vector in the SCB IMAGE (a page that holds the initial contents of each vector). $DS_CLRVEC_x vector vector = absolute Return Status DS$_NORMAL: vector address. Codes Service completed successfully. The $DS CLRVEC x macro may be palred with the keep the system control block in good order. $DS SETVEC macro 8.9.4 $DS_INITSCB x Initialize System Control Block This macro calls a supervisor routine (DSX$SINITSCB) that vectors in the system routine copies control block. a 512 control byte $DS_INITSCB x (no arguments) Return Codes Status DS$S _NORMAL: Service block image for supervisor (SCB_IMAGE) successfully completed. 8-54 to sets the handling. The 1into the system Supervisor Service Macros You should use the $DS _INITSCB x macro to clear up the system control block if several elements of the system control block have been altered. 8.10 When the started, HARDWARE P-TABLE supervisor is the supervisor ACCESS running builds and a a hardware diagnostic program P-table each for is device selected by the operator for testing. The format for the hardware P-table is shown in Example 6-5. The programmer can gain access to the hardware P-table for the device under test with the SDS_GPHARD x macro. In this way, of the device and calculate registers. 8.14.1 he can determine offsets to all the of $DS_GPHARD x unit, retadr address device $DS_GPHARD x Get Hardware P-Table Base Address This macro calls a superv1sor routine (RGPHARD) address of the entry in the P-table associated logical unit number. unit base the to obtain the with the given retadr the logical unit number. the longword to receive the base address of the P-table entry. Return Status Codes DS$ NORMAL: Service DS$S ERROR: The elements, or the Example successfully completed. argument 1list does not contain exactly logical unit number specified is too large. 8-28 shows a initialization code. typical use of the $DS GPHARD X macro in two the VAX Diagnostic Design Guide $DS_BGNINIT INITIALIZE: CSRSW -e o LOG _UNITSL We CLRL CLRW - DEVNUM = ADRLOC = HDW PTPBLES$A We S $DS_GPHARD We M 16$: “M<O 198 . WORD $DS_BPASS# G $DS_ENDPASS LOG_UNITSL, - $DS_BERROR MOVL HDW PTBLESA, R2 MOVL HPS$A DEVICE (R2), Example 8-28 DZSCSR Use of the ; ; entry mask logical unit 0 Clear CSR Buffer Get hardware P-table address. logical unit P-table offset to R2 CSR address to DZSCSR $DS _GPHARD x Notice that the P-table base address is returned This address is then moved to R2. After this, the P-table are easily accessible. Macro in HDW PTBLESA. contents of the CHAPTER VMS A small subset diagnostic level 3 codes. of VMS programs. diagnostic services Some are available of these services programs. These services Furthermore, they return control to the instruction that called the VMS service. change the flow of the program. Seven types are available. I/0 service Memory management service $, a VMS system in of may DEF - generate blank - generate an argument list supervisor service macros) S -. call the service with - the service with CALLG call Consider macros the are 2R to return location status following They do not generally of VMS service macros any four symbols ASSIGN related the this form The x $xxxx x. The suffix shows prefix, that the ways: and (Assign to macros service. macro G end the 2 macros Coding VMS Service Macros system service macros take signifies always and available macros Hibernate and Wake service Unwind service macro VMS level also 9 MACROS macros Event flag service macros Timer service macros Formatted ASCII output service 9.1 The to are SERVICE offsets (this corresponds to L in the CALLS Channel) service. The four following service: SASSIGNDEF SASSIGN G SASSIGN S $ASSIGN This chapter available format for and VMS the the following services. chapter Paragraph ASSIGN service. provide 9.3.1 explanations gives of the service may the following $ASSIGN X devnam,chan,[acmode] , [mbxnam] The be suffix called show the x with following G or positional S $ASSIGN shows suffixes. dependence and that The the ASSIGN arguments that follow it keyword names of each argument. VAX Diagnostic Design Guide The arguments enclosed in square brackets are optional and may be When you do not specify an optional argument, the macro omitted. supplies a default value. The service must have a format in argument list supplied to any VMS memory like that shown in Figure 9-1. | 4 DEVNAM CHAN ACMODE MBXNAM TK-1897 Figure 9-1 Memory Format for the Service Macro Arguments ASSIGN VMS All arguments are longwords. However, you should code them as symbols. The symbols must specify addresses or data. When the macro is assembled, the first longword will always contain, in its low-order byte, the number of arguments in the remainder of the list. 9.1.1 $name G Macro Call Format Use the S$name G macro call format when you wish to call a VMS service repeatedly with the same or nearly the same argument list. This macro generates a CALLG instruction. It requires the programmer to construct an argument list elsewhere in the program. You should specify $name G macro call, the as address follows: of the list as an argument to the G label $name Use the $name referenced by macro the format label. to Again, generate the the S$name 1list macro of arguments format for VMS services corresponds to the $DS name L macro format for supervisor services (refer to Chapter 8, Paragraph 8.1.1). In general, you should use the $name macro format to define argument lists in the data section of the program in the first module, as shown in Example 9-1. VMS LIST:: % SASSIGN - Ne N - DEVNAM=DISK, e we CHAN=CHANNEL_NO Example 9-1 to arglist for assign device name string descriptor address channel for number the S$Sname Macro Format Use of Build Service Macros an Argument List You can then call the VMS service associated with that argument list with a $name G macro format, as shown in Example 9-2. The the being Sometimes W VMS LIST. in Calling a VMS Service with the $name G Macro Format argument, LIST, LIST label in service ASSIGN service with the arguments specified We Example 9-2 Call Ny W LIST $ASSIGN G enables the macro to the data section of pass the items following the program to the VMS called. you may want to alter one or more of the arguments in the list to be passed, leaving the rest unchanged. For example, you may need to use the $ASSIGN G macro again with a DEVNAM argument of TAPE. Several steps are required. First, use the $SnameDEF macro format in the data section of the test module that contains the VMS service call. This macro defines a set of symbols that describe offsets from the base address of the argument list. The $ASSIGNDEF macro creates the following symbols and offsets. TAPE,ASSIGN$_DEVNAM(R2) Example 9-3 W LIST,R2 argument base address arglist WO MOVL ~ the 'name in with tape. Modification of an whole process. 9-3 of list Argument Third, you can then call the VMS service with format. The macro will pass the argument list. the list with a Replace the device Wmy MOVAL in N Second, you must replace the o0ld value new value, as shown in Example 9-3. WMy ASSIGNS NARGS = 4 ASSIGN$ DEVNAM = 4 ASSIGNS CHAN = 8 ASSIGN$ ACMODE = 12 ASSIGNS MBXNAM = 16 List the $name G macro Example 9-4 shows VAX DiagnoStic'Design Guide ; Header Module LIST:: W SASSIGN - Wo DEVNAM=DISK, «e o “e for W CALL ASSIGN VMS service with unmodified TAPE, ASSIGNS_DEVNAM(RZ) : ' the device in with tape. we wme “ G LIST $ASSIGN Example 9-4 list list name Call ASSIGN VMS service with modified argument list. VUses of S$Sname G, Sname, and $nameDEF Macro 9.1.2 $name S Macro Call Format The $name S macro call format is useful VMS service infrequently. a VMS service repeatedly, list. Replace We MOVL LIST,R2 argument argument list. base address of argument for ASSIGN We MOVAL ASSIGN WMo $ASSIGN G LIST Create offset symbols %o SASSIGNDEF Wy Module Test we e CHAN=CHANNEL NO arglist for ASSIGN device name string descriptor address for channel number when you wish Formats to call a It is also useful when you wish to call but with a different argument list each time. This format generates a CALLS instruction. It requires the programmer to specify the argument list as a part of the macro call. create The code assembler (at assembly time) expands the macro to that pushes the argument 1list on the stack during program execution. You can specify of two ways: 1. 2. The arguments the $name S macro format in either Keywords Position. $name S macro macro for call further call format. details. service macros. Be format Refer sure to functions to just Chapter omit the 8, $DS like prefix - the Paragraph when $DS name_S 8.1.2 for coding VMS VMS 9.2 Like RETURN STATUS CODES service return return example, the two the codes status codes status CLREF after for the supervisor services, the provide useful information. codes (Clear Event successful Service Macros flag) service may return For of completion: SS$ _WASCLR the event flag was previously 4, SS$_WASSET the event flag was previously 1. Warning returns, service may have functions. either WMS and some error returns, performed some, but not indicate all, of that the VMS the requested In general, the programmer should check the low-order bit of R# following the completion of a WS service call. If bit 8 is set, it indicates success. The programmer can cause a branch to an checking routine BLBC R@, if The error example, checking event flag service. the clear routine may error check in 9-6 error condition SS$ _ILLEFC, for Example shown if in low Checking R# the Return Nature of specific 9-6 8-5. clear Code codes for call to or values. an illegal the CLREF Is the event flag number illegal? Status an a Example bit checks following e Example as Checking the Return Status for an Error Condition Wy CMPW is ; instruction number @ LABEL Example 9-5 For bit W error Code to Determine the Error Notice that the instruction checks the low-order word in R@®. This is possible because the high-order word of the longword returned in RO is 9.3 the same for all status codes. 1/0 SERVICE MACROS Direct access to peripheral device registers is unavailable to level 2 and 2R diagnostic programs. Furthermore, some of the supervisor services, including the channel services, cannot be called from available to access and these programs. The WS 1I/0 services that are the diagnostic system handle all peripheral device all channel control for 1level 2 and 2R diagnostic programs. 9.3.1 SASSIGN x Assign I/0 Channel A level 2 peripheral or 2R diagnostic program must assign a device before the program can perform channel to a any input or output operation on the device. The $ASSIGN_x macro calls a WS service that assigns a channel and a channel number to a device. 9-5 VAX Diagnostic Design Guide This channel provides a path between the program and the device. In addition, logical you link with a remote node in a network $ASSIGN devnam, chan, [acmode], devnam = | [mbxnam] the address of a character string descriptor that points to the device name string. The string may be either a physical device name or a logical name. If the first character in the string 1is an underscore ( ), the service = acmode = a in level 2R programs. treats the name as a physical Otherwise, the service performs a logical name translation and uses the | if there is any. chan establish to macro S$ASSIGN_x the use can device name. single level of equivalence name, the address of a word to receive the channel number that the service assigns to the device. the access mode to be associated with the channel. The service maximizes the specified access mode with the access mode of the caller. I/0O operations on the channel can be access performed only from equal and modes. Kernel mode = 0 Executive mode = more privileged : 1 Supervisor = 2 User mode = 3 mbxnam = the address of the character string descriptor pointing to the 1logical name string for the mailbox to be associated with the device, if there is a mailbox. The mailbox receives status information from the device driver. Return Status Codes SS$ NORMAL: Service successfully completed. SS$ REMOTE: Service successfully established with target the on a completed. remote A logical 1link was mode. SS$ ACCVIO: The device or mailbox name string or string descriptor cannot be read, or the channel number cannot be written, by the caller (access violation). SS$ DEVALLOC: Warning. The device 1is allocated to another process. SS$ DEVNOTMBX: A mailbox name has been specified for a device that is not a mailbox. VMS Service Macros SS$ EXQUOTA: The target of the assignment is on a remote node and the process has insufficient buffer quota to allocate a network control - block. SS$ INSFMEM: The target there 1is insufficient of the assignment is on a remote node system dynamic memory to complete and the request. SS$ IVDEVNAM: No device name was specified, or the device or mailbox name string contains invalid characters. Or, the Network Connect Block has an invalid format. SS$ IVLOGNAM: The device or mailbox name or has more than 63 characters. string SS$ NOIOCHAN: for SS$ NOPRIV: No I/0 channel The process network operations. SS$ NOSUCHDEV: Additional The return SS$ NOLINKS: No SS$ NOSUCHNODE: is does available not have the has a length of @ assignment. privilege to perform : specified device or mailbox does not exist. status codes logical The for network network operations: links specified are network available. node 1is nonexistent or unavailable. SS$ REJECT: The network connect was rejected by NSP (network services protocol) or the partner on the remote node; or the target image exited before the connect confirm could be issued. NOTES 1. Channels can be assigned to devices For details on on remote systems. how with to use network Assign in conjunction operations, see the VAX-11 DECnet User's Guide. 2. Only the owner of a device can associate a mailbox with the device (the owner is the process that has allocated the device, either implicitly or explicitly). Then the device driver can send messages containing status information to the mailbox, as in the following cases: ® If the message hangup, device may or unsolicited is the input. 9-7 a terminal, indicate a dialup, reception of VAX Diagnostic Design Guide o ° If the target is on a network, the message may indicate the network connect or initiate. Or it may indicate whether the line is down. If the the the device is a line printer, message may indicate that printer is off-line. For details and the the VAX/VMS 3. Channels on the information message format returned, see 1/0 User's Guide. remain assigned until they are explicitly deassigned with the Deassign I/0 Channel (DASSGN) system service, or until the image that assigned 4. The the ASSIGN channel exits. service establishes a path to a device, but does not check whether the caller can actually perform I/0 operations to the device. Privilege and protection restrictions may be applied to the device drivers. For details on how the system controls access to devices, see the VAX/VMS I/0 User's Guide. The Assign Channel system service 1is basic to communication between a program and a device, because the QIO system service will function only on an assigned channel. The access mode of the process calling the QIO system service must be equal to or more privileged than the access mode from which the original channel assignment was made. 9-8 VMS Service Macros Example 9-7 shows the assignment of an I/0 TTA2. The Assign Channel service returns the word at channel to the device the channel number in TTCHAN. TTNAME: we we .ASCID terminal name descriptor string terminal number Assign " 1 we .BLKW e TTCHAN: channel. CHAN =TTCHAN string desciptor terminal channel number we w3 name TMo terminal DE VNAM=TTNAME, WTMe N SSASSIG channel Example 9-7 Use of the x $ASSIGN Macro VAX Diagnostic Design Guide 9.3.2 $DASSGN_x Deassign I/0 Channel This macro calls a VMS service that acquired for I/O operations with service. the releases Assign to be deassigned. an I/0 Channel channel system $DASSGN_x chan chan = the number Return Status of I/O channel Codes SS$ NORMAL: Service SSS_IVCHAN: An channel number available. SS$_NOPRIV: from a more the successfully completed. invalid of @ or a channel number was specified; that number larger than the of channels was assigned The specified channel is privileged access mode. Privilege Restrictions An I/O0 channel can be deassigned or more privileged than the channel assignment was made. not only access number assigned, from mode an from or access mode which the NOTES 1. When a channel is deassigned, any outstanding I/0 requests on the channel are canceled. If a file has been opened on the specified channel, the file is closed. 2. 3. If a mailbox was associated with the device when the channel was assigned, and there are not more channels assigned to the mailbox, the 1linkage to the mailbox is cleared. If the a network I/O channel was operation, link 1is disconnected. information on channel and desassignment operations, see the User's Guide. 4. 5. assigned the for network For more assignment for network VAX-11 DECnet If the specified channel is the channel assigned to a device last that has been marked for dismounting, device is dismounted. the I/0 channels are automatically deassigned at image exit. 9-10 is, equal a to original VMS Service Macros You should use the Deassign Channel service in a diagnostic program when the program no longer needs access to the device. The service is normally used in the cleanup code and the initialization code, as shown in Example 9-8. CLEANUP: : $DASSGN_S ; Release TTCHAN. CHAN=TTCHAN Example 9-8 9.3.3 Use of the $DASSGN x Macro $0I0 x Queue I/O0 Request This macro operation. calls a VMS The service service that begins an input queues a request to a channel or output associated with a specific device. Control returns 1immediately to the calling program. The program can synchronize I/0 completion in any of three ways. 1. Specify the address of an AST when the I/0 is completed. 2. Wait for Poll the 3. a specified event specified I/0 routine flag to status be that is to execute a completion set. block for status. The service clears they are specified, the event flag and the I/0 status before it queues the I/0 request. $QI0 x efn, chan, func, (p3]1, [p4l, [p5], [p6] efn = the number [iosb], of the [astadr], event flag request completion. If the specified, the default value in the supervisor. chan = the number of directed. number. func = : the function operation the the code to be symbolically. codes channel = the to address receive of in modifier which bits The reference the final the to service performed. For listed is notes to be (p2], set at event flag number is not of @ will cause an error | ASSIGN and that ([pl]l, if the to that code purposes, quadword completion 9-11 below. request obtain specify 1is is this the expressed the I/0 Details function valid I/0 function codes and parameters required by each are documented in the VAX/VMS I/0 User's Guide. iosb are I/O Use [astprm], block, status status. block on that is VAX Diagnostic Design Guide astadr = the entry point address of the AST routine to be executed when the I/0O function is completed. 1If specified, the AST routine executes at the access mode from which the QIO service was requested. astprm = the AST routine. parameter to optional device- and Pl to p6 = be passed to the AST service function-specific I/0 request parameters. The first parameter whether the respectively. is, the first may be specified as Pl or P1lV, depending function code requires an address If the keyword is not used, Pl is the argument is considered an address. P2 through P6 are always interpreted as values. used as addresses, preface the number with #. Return Status Codes SS$ NORMAL: Service successfully was successfully queued. completed. The on or a value, default, that If they are I/O request to be packet SS$ ACCVIO: The I/0 status block cannot be written by the caller. This status code may also be returned if parameters for device~dependent function codes are incorrectly specified (access violation). SS$ EXQUOTA: direct The process has exceeded I/0 quota and has disabled its buffered I/0O Resource Wait Mode (SETRWM) system service. Or, the exceeded its AST limit quota or buffer space quota. SS$ ILLEFC: An illegal event flag quota or resource wait mode with the Set number was process has specified. SS$ INSFMEM: Insufficient system dynamic memory is available to complete the service, and the process has disabled resource wait mode with the Set Resource Wait Mode (SETRWM) system service. SS$ _IVCHAN: An invalid channel number was specified. That is, a channel number of @ or a number larger than the number of channels available. SS$ NOPRIV: from a more The specified channel does privileged access mode. SS$ UNASEFC: The process 1is containing the specified event SS$ ABORT: A network logical not exist, not associated flag. link was 9-12 broken. or was assigned with the cluster VMS Service Macros Privilege Restrictions The QIO Request system service can be performed only on assigned I/0 channels and only from access modes that are equal to or more privileged than the access mode from which the original channel assignment was made. Resources Required/Returned l. Queued I/0 requests ) ° ° the use process's quota three quotas: for buffered I/0 or direct I/O the process's quota for buffer space the process's AST limit quota, if routine is specified. an AST service System dynamic memory is required to construct a data base to queue the I/0 request. Additional memory may be required on a device-dependent basis. ' NOTES l. The specified event flag is set even if the service terminates without queuing an I/0 request. 2. See Paragraph information on the 9.3.3.4 I/0 status for block format. 3. Many services return character string data, and write the length of the data returned in a word provided by the caller. Function codes for the QIO system service require length specifications in longwvords. If 1lengths returned by other services are to be used as input parameters for QIO requests, a longword should be reserved to ensure that no error occurs when QIO reads the length. 4., PFor information on performing input and output operations on a network, see the VAX-11l DECnet User's Guide. 5. The QIO features service provides special for diagnostic functions. QIO Service Diagnostic Functions - Diagnostic operations performed via physical I/0 functions that specify a diagnostic buffer. The diagnostic buffer must be large enough to receive the final device register contents at the end of the operation. 9.3.3.1 are 9-13 VAX Diagnostic Design Guide A diagnostic buffer is specified by parameter 6 for all physical I/0 functions. If this parameter is nonzero, then a diagnostic buffer is specified and the 1issuing process must have the diagnostic privilege. Specification of a diagnostic buffer address causes the QIO system service to allocate a buffer and store the address of the buffer in the I/O packet (IRPSL DIAGBUF). The virtual address of the requester's buffer bit is set in the I/0 packet status word. When the I/0 operation is completed, the final device register contents are stored in the buffer. The I/0 packet is submitted to the I/0 posting routine. The I/O posting routine determines that the diagnostic buffer bit is requester's buffer. The dynamic storage pool. requester's buffer has set and transfers the information to allocated buffer is then returned to The information transferred to the format shown in Figure 31 9-2. 00 OPERATION START TIME IN 64 BIT FORMAT OPERATION COMPLETION TIME IN 64 BIT FORMAT FINAL ERROR COUNTER CONTENTS NUMBER OF DEVICE REGISTERS DEVICE REGISTERS, ONE PER LONGWORD TK-3002 Figure 9-2 Queue I/0 Diagnostic 9-14 Buffer Format the the the VMS Service Macros I1/0 Function Encoding - I/0 functions fall into three 9.3.3.2 groups that correspond to the three I/0 transfer modes (physical, logical, and Depending on can be I/0 virtual). the device expressed to be which two, or functions are described performed and any optional symbolically expressed. shows to in one, the format of the it is all directed, an three by I/0 transfer modes. 16-bit wvalues function that are Figure 9-3 They specify the particular I/0 operation 16-bit function modifiers. function value. 15 06 05 00 1 I | —~— FUNCTION MODIFIERS CODE TK-1899 Figure Symbolic names 9-3 1I/0 Function Format are described by the SIODEF macro. See System Services Reference Manual. the VAX/VMS Function Codes - The low-order six bits of the function value make up a code that specifies the particular operation to be performed. For example, the code for read 1logical block 1is expressed as I0$ READLBLK. Table 9-1 1lists the symbolic wvalues for read and write I1/0 functions Physical in the Table 9-1 Read and Write I/0 Functions 1/0 Logical IO$_READPBLK 1/0 Virtual I0S READLBLK I10$ WRITEPBLK The three transfer modes. I/0 IOS_BEADVBLK I10$ WRITELBLK I0$ WRITEVBLK set mode I/0 function has a code of I0$_SETMODE. Function codes are defined for all supported devices. Although some of the function codes (for example, IO$ READVBLK and I0$S WRITEVBLK) are used with several types of devices, most are device-dependent. particular types device-dependent file-structured That is, they perform of devices. For function code. devices such as disks 9-15 functions example, It 1is and specific IO$ CREATE used only magnetic tapes. to 1is a with VAX Diagnostic Design Guide Function Modifiers - The are function modifiers. basic operation to be high-order 10 bits of the function value These are individual bits that alter the performed. For example, the function modifier IO$M NOECHO can be specified with the function IO$ READPBLK to a terminal. When used together, the two values are written as IOS_READPBLK!IOS$M NOECHO. This means that data typed at the terminal keyboard not echoed (displayed) at the format of function modifiers. 15 is entered terminal. 13 12 in the user buffer Figure 9-4 shows but the 06 T A DEVICE/FUNCTION ) T INDEPENDENT DEVICE/FUNCTION DEPENDENT TK-1900 Figure 9-4 Function Modifier Format As shown, bits 13 through 15 are device/function independent bits, and bits 6 through 12 are device/function dependent bits. However, device/function dependent bits have the same function, whenever possible, for different device classes. For example, the function tape modifier devices to IO$M ACCESS cause a is file used to with be both accessed disk and magnetic during a create operation. Device/function dependent bits always have the same function within the same device class. Most function modifiers are device/function dependent. There are two device/function independent modifier Dbits: IOSM_INHRETRY and IOSM_DATACHECK. IO$M_INHRETRY is used to inhibit all error recovery. If any error occurs, and this modifier bit is specified, the operation is immediately terminated and a failure status 1is returned in the I/0 status block. IO$SM DATACHECK is a disk or magnetic A list of function 9-2 through codes and used 9-9. modifiers that the arguments function specified. details. to tape. codes The are compare and function data in memory on Tables These for the QIO service depend VAX/VMS I/0 User's Guide for on the further (P1-P6) according 9-16 are to follows that in grouped modifiers with listed. arguments required See the the also device types. Note VMS Table Function 9-2 Terminal I/0 Driver PFunctions Parameters Modifiers I0$ READVBLK Pl=buffer IO$_READLBLK I0$ READPROMPT IO$_READPBLK P2=buffer size P3=time-out P4=read terminator address IOSM CVTLO block addresi PS5=prompt string buffer addrfss P6=prompt string buffer size I0$S WRITEVBLK I0$ WRITELBLK Pl=buffer P2=buffer IO$_WRITEPBLK P3=(ignored) Pl=address buffer of IOSM _CANCTRLO IOSM_ENABLMBX specifier characteristics P2=(ignored) P3=speed specifier P4=fill specifier P5=parity flags , IO$_SETMODE!IO$M_HANGUP I0S$S SETCHAR!IOSM HANGUP (none) 10$ _SETMODE! I0$M _CTRLCAST P1=AST service routine address I10$ I0$ - SETMODE!IOSM_CTRLYAST P2=AST parameter SETCHAR!IOSM CTRLYAST ~ P3=access 2Only for I0$_READPROMPT. Only for I0$ WRITEBLK and mode I0$SM_PURGE IO$M:TRMNOECHO 5 control IO$M_DISABLMBX IO$M_NOECHO IOS$SM NOFILTR IOSM TIMED address size P4=carriage I0$ SETCHAR I0S SETMODE Service Macros to deliver I0$ WRITEVBLK. AST IO$M_NOFORMAT VAX Diagnostic Design Guide Table 9-3 Disk I/0 Driver Functions Function Parameters Modifiers 10$ READVBLK I0$_READLBLK I0$_READPBLK Pl=buffer address P2=byte count P3=disk address I0$M_ DATACHECK IO$M_INHRETRY I0$M_INHSEEK I0$_ WRITEVBLK I0$ WRITELBLK I0$ WRITEPBLK Pl=characteristic P1=FIB descriptor address P2=file name string address P3=result string address length P4=result string descriptor address P5=attribute list address lOnly for I0S READPBLK and IO$_WRITEPBLK. 2 3Only for I0$ I0$ INHRETRY CREATE and I0$ ACCESS. Only for IO$ CREATE and IO$ DELETE. 9-18 IOS$M_CREATE I0$M_ACCESS I0$M DELETE NN I0$ CREATE I10$ ACCESS 105 DEACCESS 10$ MODIFY I0$ DELETE buffer address w 10$_ SETMODE I10$ SETCHAR VMS Service Macros Table 9-4 ‘Magnetic Tape I/0 Driver Functions Function Parameters Modifiers I0$ READVBLK I0$ READLBLK Pl=buffer address P2=byte count I0$M_DATACHECK I0$M_INHRETRY 10$M REVERSE I0$M_INHEXTGAP2 10$ READPBLK I0$ WRITEVBLK I0$ WRITELBLK I0$ WRITEPBLK I0$ SETMODE I0$ SETCHAR address I0$ CREATE P1=FIB 10$ ACCESS I0$ DEACCESS 10$ MODIFY P2=file I0$_ACPCONTROL buffer Pl=characteristics descriptor name address P3=result address P4=result address address string string length string descriptor P5=attribute list I0$M_INHRETRY I0$M_INHEXTGAP TOSM_CREATE I0$M_ACCESS) IO$M_DMOUNT address I0$ SKIPFILE Pl=skip n tape marks I0$M_INHRETRY I0$ SKIPRECORD Pl=skip n records IO$M_INHRETRY I0$_ MOUNT (none) I0$ REWIND I0$_REWINDOFF (none) I0$ WRITEOF (none) I0$_ SENSEMODE (none Only for read functions. Only for write functions. Only for IO$ CREATE and IO$ ACCESS. W 1 Only for IO$ ACPCONTROL. IO$M INHRETRY IO$M NOWAIT IOSM_INHEXTGAP IO$M INHRETRY I0$ INHRETRY VAX Diagnostic Design Guide Table 9-5 Line Printer Function Parameters I0$ WRITEVBLK I0$ WRITELBLK Pl=buffer P2=buffer I0S$S _WRITEPBLK P3=ignored 1 Only for address size Table 9-6 (none) 1 control specifier Parameters I0$ READLBLK Pl=buffer I0$S READVBLK 10$ READPBLK (none) IOS WRITELBLK Modifiers address P2=byte count I0S_SETMODE I0$ SETCHAR Pl=characteristics buffer address IOS_SENSEMODE (none) Table 9-7 Mailbox Parameters IO$_READVBLK Pl=buffer address P2=buffer size none P1=AST IO$_SETMODE!IO$M WRTATTN P1=AST IO$M BINARY I0O$M_PACKED (none) Functions Modifiers I0$ WRITEVBLK T0$ WRITELBLK 10$ WRITEPBLK IO$_SETMODE!IO$M READATTN | I/O Driver Function I0$ READLBLK I10$READPBLK address Card Reader I/0 Driver Functions Functions I0$ WRITEOF | Pl=characteristics buffer IO$ WRITEVBLK and Functions Modifiers P4d=carriage I0$ SETMODE I0$ SETCHAR I/O Driver address parameter IO$M_NOW VMS Service Macros Table 9-8 DMC-11 I/0 Driver Functions Modifiers Function Parameters I0$ READLBLK I0$ READPBLK I0$ READVBLK I0$ WRITELBLK Pl=buffer size P2=message size P6=optional diagnostic IOSM DISQBLMBX2 buffer 1 |TO$M_NOW 3 I0$M_ENABLMBX I0$ WRITEPBLK I0$ WRITEVBLK I0$ SETMODE Pl=characteristics buffer 10$ SETCHAR address IO$ SETMODE'IOSM_ATTNAST P1=AST service IO$_§ETCHAR!IO$M_ATTNAST P2=(ignored) P3=AST access routine address mode I0$ SETMODE!IOSM SHUTDOWN Pl=characteristics block address block address 10$. SETCHAR'IO$M SHUTDOWN I10$ SETMODE'IOSM STARTUP Pl=characteristics I0$ SETCHAR'IO$M_STARTUP P2= (1gnored) P3=receive message blocks Only for I0$ READPBLK and IO$ WRITEPBLK. ’2 Oonly for IOSREADLBLK and IO$READPBLK. 3 Only for IO$WRITELBLK and I0$5WRITEPBLK. Table 9-9 ACP Interface Driver Functions Function . Parameters Modifiers I0$ CREATE I0O$ ACCESS P1=FIB descriptor address P2=file name string I0$M_CREATE. IOSM ACCESS% I0$ DEACCESS I0$ MODIFY IOS DELETE address P3=result string length address I0$ ACPCONTROL P4=result I0$_MOUNT P5=address (none) address 1 string descriptor of attribute Used only with IO$ACCESS and IO$_CREATE. 3Used only with I0$ CREATE and IO$ DELETE. Used with I0$ACPCONTROL. list IO$M DELETE 3 - I0$M_DMOUNT VAX Diagnostic Design Guide 9.3.3.3 returns Synchronizing I/0 Completion - The QIO system service control to the calling program as soon as the I/0 request is queued. The status code returned in R@ indicates whether or not the request was queued successfully. The program must perform the following two steps to ensure proper synchronization of the I1/0 operation with 1. Test respect whether to the program. the 1I/0 operation has been queued successfully. 2. Test whether the successfully. Optional arguments to I/0 the operation QIO itself service has provide been techniques synchronizing I/0 completion. There are three methods to test for the completion of an I/O request: Specify the number of an event I/0 operation is completed. b. Specify the address of an AST routine to be executed when C. Example I/0 Specify when 9-9 unrelated the operation the of operation shows how you The be set when the completed. address I/0 programs. is to for you can use a. the flag completed can an is use following I/0 status block these three techniques completed. notes are keyed to to the be posted in three example. 1. When you code an event flag number as an argument, QIO clears the event flag when it queues the I/0 request. When the I/0 operation is completed, the flag is set. 2. In this example, the program issues two I/0 requests. different event flag is specified for each request. 3. The Wait service for operations the Logical places event indicates are of complete. flags the AND the process Event in The Flags (WFLAND) system a wait state until EFN indicates argument are both in cluster 1; the MASK flags that the service is to wait A both I/O that argument for. 4, When you code the ASTADR argument to the QIO system service, the system interrupts the process when the I/O operation 1is completed and passes control to the specified AST service routine. 5. The AST 6. When the QIO system service call specifies the address of the routine, TTAST, and a parameter to pass as an argument to the AST service routine. When QIO returns control, the process continues execution. called, I/0 operation and it is responds to 9-22 completed, the I/0 the routine TTAST is completion. VMS Service Macros When this routine has finished'executing, control returns to the For process at more the point .at which it was interrupted. on how code an AST 7. An I/0 status block is a quadword structure that system uses to post the status of an I/0 operation. quadword area must be defined in your program. the The 8. TTIOSB defines I/0 service information routine, refer to ASTs and Paragraph 3.2 to of the VAX/VMS System Services Reference Manual. operation. refers to The this the IOSB I/0O status argument quadword. in block the QIO for this system service 9. QIO clears the quadword when it queues the When the request 1is successfully queued, continues execution. 10. The process polls the I/0 status block. 1If the low-order word still contains @, it indicates that the 1I/0 operation has not yet been completed. In I/0 request. the program program program loops until the request is complete. C, Program A: Using Event Flags W RJ,ERROR ‘ Using An AST Routine @ @ $QI0 S ...,ASTADR=TTAST,ASTPRM=#1,... ; I/0 with AST Queued successfully? Continue. AST mask service routine entry - . Handle I/0 completion. end of service o 23] X I Ne L ] | R@,ERROR " BLBC W Program B: N SWFLANDS EFN=#32,MASK="Bll We Wy w4 BLBC We (:) R®,ERROR $QI0_S EFN=#33,... we . BLBC Issue lst I/0 request. Queued successfully? Issue 2nd I/0 request. Queued successfully? Wait till both are done. W (:) $QI0S EFN=#32,... W (:) routine the VAX Diagnostic Design Guide z;logram C: USING THE I/0 STATUS BLOCK 7 I/0 e 1 R@,ERROR Issue TTIOSB 10§ TTIOSB,#5S$ NORMAL BNEQ ERROR Example 9.3.3.4 9-9 I/0 Completion N I/0 W I/0 Status request. successful? No, error. Yes, handle WMe Synchronizing I/0 Three Methods - I/0 When an format 31 for the I/0 status 16 15 BYTE COUNT : operation 1is status in the 1I/0 completion status actually completed successfully, the number of bytes that were additional device-dependent return information. the it. Completion, completed, the system posts the completion status block, if one 1is specified. The indicates whether or not the operation was Figure 9-5 shows block Is 1/0 done yet? No, loop till done. o TSTW BEQL CMPW e - 16$: status Queued successfully? Continue. We $QI0O S ...,IOSB=TTIOSB,... BLBC we (:) .BLKQ = TTIOSB: transferred, and block. 00 STATUS DEVICE-DEPENDENT INFORMATION TK-1901 Figure 9-5 1I/0 Status Block Format The first word contains a system status code indicating the success or failure of the operation. The status codes used are the same as for all returns from system services; for example, SS$ NORMAL indicates successful completion. The second word contains the number transferred in the I/O operation. 9-24 of bytes that were actually VMS The second longword To ensure successful I/0 the should transfers, contains IOSB device-dependent completion be and checked Service Macros return the information. integrity following I/0 of data requests, particularly for device-dependent I/0 functions. For complete details on how to use the I/O status block, refer to the VAX/VMS I1/0 User's Guide. 9.3.4 $QIOW_x Queue I/0O Request and Wait for Event Flag This macro calls a VMS service that combines the Queue I/0 Request and the Wait for Event Flag system services. You should use this macro when your proceeding. It program takes the same $QIOW x efn, chan, func, (p31, [p4]1, [p5], [p6] efn = the number = [iosb], | iosb = astadr = astprm I/0O channel the function code and modifier operation to symbolically. be the QIO entry about a of to performed. which bits The the that code point address of the QIOW executes at the access service was requested. the AST the I/0 is completed. routine parameter to passed device-specific request parameters. status codes, in be and and privilege notes, Paragraph to device to which information 1. The The may [p2], refer an be If specify is the routine to be specified, the AST from channel has requested: primary device characteristics, secondary device characteristics. 9-25 which returns 1I/0 resources description been is completion 9. 3. 3. I/O the expressed that restrictions, to is block mode the request function-specific $SGETCHN Get I/0 Channel Information I/0 Channel Information system service 2. AST AST the service [pl], that is to be set at I/0 You must specify the event flag number. value of @ will cause supervisor errors. when returned, before flag executed optional and system 9.3.5 The Get sets = return required [astprm], the routine. For [astadrl}, of number completion $Q10 x. the address of the quadword I/O status to receive final completion status. = Pl - p6 I/O as event the = for the directed. func wait arguments of completion. The default chan must of the information assigned. Two VAX Diagnostic Design Guide In most cases, the two sets of characteristic information are However, the two sets prov1de different information in identical. the following »If 1. cases: the associated an has device primary the mailbox, characteristics are those of the assigned device and the secondary characteristics are those of the associated mailbox. 2. If the device 1is a spooled device, the primary characteristics are those of the intermediate device and the secondary characteristics are those of the spooled device. If the device represents a logical link on the network, the secondary characteristics contain information about 3. link. the $GETCHN chan ,[prilen] chan = service, prilen = pribuf = the the by address of secbuf = I/0 word to primary characteristics. (ASSIGN) Channel receive the 1length system of the the address of the character string descriptor pointing to the buffer that is to receive the primary device An address of @ (the default) implies characteristics. that no buffer seclen = Assign the ,[secbuf] The channel number of a device is the channel number. returned ,[seclen] ,[pribuf] is specified. the address of the word to receive the length of the secondary characteristics. the address of the character string descriptor pointing to the buffer that is to receive the secondary device An address of # (the default) implies characteristics. that no buffer is specified. Return Status Codes The device SS$ BUFFEROVF: Service successfully completed. information returned overflowed the buffers provided and has been truncated. SS$ NORMAL: Service successfully completed. SS$ ACCVIO: A buffer buffer descriptor length cannot be written, cannot be read, or a buffer or by the caller. An invalid SS$ IVCHAN: An invalid channel number was specified. channel number is @ or a number larger than the number of channels available. 9-26 VMS Service Macros SS$ NOPRIV: The from a more specified pr1v1leged channel is not access mode. assigned or was assigned Privilege Restrictions The Get I/O Channel information service can be performed assigned channels and from access modes that are equal to privileged assignment than the was made. access mode from Format of Device Information The GETCHN system service returns 53-byte buffer. represent offsets The field offset which information Symbolic names defined from the beginning of the names, lengths, the and original in a in the buffer. contents are only on or more channel user-supplied S$DIBDEF listed macro below. Length Field Name (bytes) | Contents DIBSL DEVCHAR DIB$B_DEVCLASS 4 1 DIBSB_TYPE DIBSW DEVBUFSIZ 1 2 DIBSL DEVDEPEND DIBSW UNIT Device characteristics Device class : Device type Device buffer 4 2 DIBSW DEVNAMOFF 2 DIBSL PID 4 DIB$SW VPROT DIBS$W ERRCNT DIBSL OPCNT 2 2 4 DIBSL OWNUIC Of fset to Process 4 DIB$W VOLNAMOFF size Device dependent Unit number information device name string identification of device owner UIC of device owner Volume protection mask Hard error count for device Operation count ' 2 - Offset to volume label string The device name string and volume label string are returned in the buffer as counted offset values. ASCII strings and must be located by their Figure 9-6 shows the buffer layout. The offsets are displacements from the front of the buffer. Offsets of 0@ show missing fields. Both the device name and the volume label are stored as counted strings. You service returns length is 9.3.6 The 64 must locate both a through label the and a offset device values. name, I/0 requests on requests that a On the - 1/0 Channel specific are If the buffer bytes. SCANCEL x Cancel Cancel them volume on Channel system channel. queued, as _ service 1In cancels all general, well as the this includes request | | pending I/0 all 1/0 currently in progress. $CANCEL_x chan chan = the number which of the I/0 I/0 operation is channel to be 9-27 assigned cancelled. to the device for VAX Diagnostic Design Guide 31 16 15 08 07 00 DEVICE CHARACTERISTICS BUFFER SIZE TYPE CLASS DEVICE DEPENDENT INFORMATION OFFSET TO DEVICE NAME UNIT NUMBER OWNER PROCESS PID OWNER PROCESS UIC ERROR COUNT | VOLUME PROTECTION MASK OPERATION COUNT OFFSET TO VOLUME LABEL TK-1902 Figure 9-6 Buffer Layout Supplied by the GETCHN System Service Return Status Codes SS$ NORMAL: Service successfully completed SS$ _EXQUOTA: The process has exceeded its quota for direct this context, direct I/0 refers to use of the direct data the Unibus interface. I/0. In path on SS$ INSFMEM: Insufficient system dynamic memory is available to cancel the ‘I/0, and the process has disabled resource wait mode with the Set Resource Wait Mode (SETRWM) system service. SS$ IVCHAN: number of available. SS$ NOPRIV: from a more @ An invalid channel was specified, that is, a channel or The a number specified privileged 1larger channel access than the number is not a551gned, mode. 9-28 : of channels or was a551gned - , VMS Service Macros Privilege Restrictions » I/0 can be canceled only from an access mode equal to privileged than the access mode from which the original assignment was made. NOTES 1. When a request currently in progress is canceled, the driver is notified immediately. Actual cancellation may or may not occur immediately depending on the 1logical state of the driver. When cancellation does occur, the same action as that taken for queued requests is performed: a. The specified event flag is set. b. The first word of the block, if specified, SS$ CANCEL. c. The AST, queued. Proper if I/0 status is set specified, synchronization between to 1is this service and the actual canceling of I/0 requests requires the issuing process to wait for I/O completion in the normal manner and to then note that the I/0 has been canceled. 2. If the I/0 operation is a wvirtual I/0 operation involving a disk or tape ancillary control process, the I/0 operation cannot be canceled. In the case of a magnetic tape, however, cancellation may occur if the device driver is hung. 3. Outstanding automatically exit. 1/0 requests canceled 9-29 at are image or more channel VAX Diagnostic Design Guide 9.4 EVENT FLAG SERVICE MACROS Event flags are status postlng bits can require some system services to maintained by VAX/VMS You set specific event flags in order occurrence to program the QIO indicate the completion that calls the system service service sets an or of an event. or output operation has been completed. You can use the flag services to perform any of the following functions. The The can test these flags. For example, event flag when the requested input event ) Set or clear specific flaQs. ° Test the current status of flags. ° Place a process in a wait state pending the setting of a specific supervisor However, event the program for use and flag or group provides two flags 1-23 the This flags. event are operator, by VAX/A/MS. of flag clusters, restricted to 0-31 and event flags 24-31 leaves flags 32-63 for the diagnostic program developer. is reserved for the supervisor. Do not and communication use are 32-63. between restricted exclusive event flag use #. ' by This ‘ 9.4.1 $SETEF_x Set Event Flag This macro calls a service that sets the event flag specified. Any processes waiting for the event flag are made executable. $SETEF efn efn = the number flag @. of the event flag to be set. Do not use event Return Status Codes' SS$_WASCLR: Service successfully flag was previously #@. completed. The specified event SS$_WASSET: Service successfully flag was previously 1. completed. The specified event SS$ ILLEFC: An illegal event flag number'was_speCified. SSS UNASEFC: The process is containing the specified event not associated flag. with the cluster VMS Service Macros 9.4.2 This $CLREF_x Clear Event Flag macro calls a service that clears an event flag. be cleared. x efn $CLREF efn = the number of Return Status Codes SS$S WASCLR: Service flag was flag was Service previously SS$_ILLEFC: An SS$ UNASEFC: containing 9.4.3 The flag to completed. o The specified successfully completed. The specified event event 1. illegal the event | successfully 0. previously SS$_WASSET: the event process specified $READEF X Read flag is number was specified. not event associated flag. with the cluster - Event Flags This macro calls a service that returns the 32 event flags in an event flag cluster. current status of all to be $READEF X efn, state efn = the number of any event = flag number of @ through 31 specifies cluster @; a flag number 32 63 cluster and the of address all event Return Status Codes SS$ WASCLR: Service flag is clear. SS$ WASSET: Service flag is set. SS$ ACCVIO: all event The flags SS$ ILLEFC: An SS$ UNASEFC: containing the cluster A 1. state flag within read. the of a in the through to receive specifies the current status cluster. successfully completed. The specified event successfully completed. The specified event the illegal The longword flags longword in of that cluster event process specified is flag 1is event to receive cannot be number not the written was current by the state of caller. specified. associated with the cluster flag. 9.4.4 SWAITFRx Wait for Single Event Flag This macro calls a service that tests a specific event flag. If the flag is set, control returns to the calling program immediately. 1If the flag is cleared, the process is placed in a wait state until the event flag is set. 9-31 VAX Diagnostic Design Guide x efn $WAITFR efn = the number of the event flag for which to wait. Return Status Codes SS$ NORMAL: Service successfully completed. SS$ ILLEFC: An illegal event flag number was specified. The process is not SS$_ UNASEFC: containing the specified event flag. associated with NOTE The wait state caused by this service can be interrupted by an asynchronous the access (1) if system trap (AST), mode at which the AST executes is less than or equal to the access mode from which the wait was issued and (2) the process is enabled for ASTs at that access mode. When the AST service routine completes the repeats system the execution, If the event flag has WAITFR request. been set, the process resumes execution. the cluster VMS Service Macros 9.4.5 SWFLAN x Wait D for Logical AND of Event Flags This macro calls a service that allows the program to specify a mask of event flags for which it wishes to wait. If all of the flags indicated by the mask are set, control returns immediately to the calling program. Otherwise, the program is placed in a wait state until the flags are all set. SWFLAND_x efn, mask efn = mask = the number used. the any 32-bit flags Return of of Status mask in interest. event which flag bits within set 1 cluster indicate the being event Codes SS$ NORMAL: Service successfully completed. SS$ ILLEFC: An SS$_UNASEFC: to the illegal The containing the event process specified flag is number was specified. not associated event with the flag. ‘ cluster NOTE The wait state caused by this service can be interrupted by an AST, if (1) the access mode at which the AST executes is less than or equal to the access mode from which the wait was issued and (2) the process is enabled for ASTs at that access mode. When the AST service routine completes execution, the system repeats the WAITFR request. If the event flag has been set, the process resumes execution. 9.4.6 $WFLOR_x Wait for Logical OR of Event Flags This macro calls a service that tests the event flags specified by a mask within a specified cluster. The service returns control to the calling program immediately if any of the flags are set. Otherwise, the service places the program in a wait state until one of the selected event flags is set. x efn, mask SWFLOR efn = the number of any event flag within the cluster being used. mask = a 32-bit mask of Return Status SS$ NORMAL: in which bits set to interest. Codes Service successfully completed. 9-33 1 show the event flags VAX Diagnostic Design Guide SS$_ILLEFC: illegal event An SS$_UNASEFC: containing The the process specified flag is event number not was specified. associated with flag. the cluster - | NOTE The wait state caused by this service can be interrupted by an AST, if (1) the access mode at which the AST executes is less from than or equal to the access mode which the wait was issued and (2) the process is enabled for ASTs at that access mode. When the AST service routine completes execution, the system repeats the WAITFR request. 1If the event flag has been set, the process resumes execution. 9.5 The TIMER SERVICE MACROS timer and time conversion services enable the program to schedule program activity according to clock time. They are available to 1level 2, 2R, and 3 diagnostic programs. You may schedule events according to the time of day or the passage of a time interval. The timer services enable you to schedule the setting of an event flag or the queueing of an asynchronous system trap for the program. The timer services also enable you to cancel a pendlng request that has not yet been honored. These services require you to specify the time in a 64 bit system format. ' You can use the time conversion 1. Obtain the time 2. Convert an ASCII in services the system string into to perform two functions. format the system format. VAX/VMS maintains the current date and time (using a 24 hour clock) in 64 bit format. The time value is a binary number representing 100 ns offsets from the system base date and time. This is 00:00 o'clock, November 17, 1858. All time values passed to the timer services must also be expressed in the 64 bit system format. A time value may be time, expressed which in three ways. 1. An absolute is a specific date and time of 2. A delta time, which is a future offset (number of days, hours, minutes, seconds, and so on) from the current time. Delta times are always expressed as negative day. Absolute times are standalone supervisor does values. always positive values. The not support absolute times. ‘ 9-34 - VMS Service Macros 3. A 0, which indicates that the system service the current date and time. The does not support this function. 9.5.1 $GETTIMx Get Time This macro calls a service that in the 64 (SETIMR) bit system system format furnlshes suitable standalone the for should supervisor current system receive the input to use the Set time Timer service. x timadr SGETTIM timadr = Return the address time in 64 Status of bit a quadword format. that is to current Codes SS$ NORMAL: Service SS$_ACCVIO: The successfully completed. quadword to receive the time cannot be written by the caller. 9.5.2 This $BINTIM x Convert ASCII String macro calls a service that to Binary Time converts an ASCII absolute or delta time value in the 64 bit system for input to the Set Timer (SETIMR) service. $BINTIM x timbuf = timbuf, the address to the the of the absolute address converted Return Status Codes SSS NORMAL: Service SSS$S IVTIME: or the time character or delta string time of time in a 64 quadword bit an format suitable descriptor pointing value in that format. to one is be of to converted. the formats receive the successfully completed. The syntax of the specified component is out of range. ASCII string NOTES l. to timadr The ASCII string value must be shown in Note 1, which follows. timadr = string The requ1red have the ASCII following input strings formats: Absolute Time: dd-mmm-yyyy hh:mm:ss.cc Delta Time: dddd hh:mm:ss.cc Table 9-18 each string shows the in format. the 9-35 function of is invaliaqd, ' " VAX Diagnostic Design Guide 2. The following syntax rules apply to the coding of the ASCII input string: ® Any of the fields of the and time can be omitted. For absolute time date values, the BINTIM service supplies the current system date and time for nonspecified fields. Trailing fields can be truncated. If leading fields are omitted, the punctuation (hyphens, blanks, colons, periods) must be specified. For example, the string --12:00:00.00 ~results in an absolute time 12:00 on the current day. For ‘delta time of values, the periods) must be specified. For BINTIM service defaults g. to fields nonspecified be can fields Trailing fields leading If truncated. are omitted from the time value, the punctuation (blanks, colons, example, the string B::10 results in a delta time of 160 seconds. ° For both absolute and delta time values, there can be any number of 1leading blanks, and any number of blanks between fields normally delimited by blanks. However, there may be no embedded blanks within the date or time fields. either VMS Table 9-10 Field Punction or Delta Field (Bytes)| Range 1 2 day 1 mmm hyphen 3 month blank Absolute Values Contents - - YYYY for ASCII of month - of Values 31 Required FEB, MAR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC 1 hyphen Required 4 year g - n blank Required more hh 2 hour : 1 colon mm Required 2 minutes g 9 syntax syntax (one blanks) syntax -59 : 1 colon Required 2 seconds 8 - syntax 59 . 1 period cc 2 Required hundredths g - 99 & - 9999 4 APR, -23 Ss of syntax JAN, or dddd Macros Length dd - Time Service syntax seconds number of days| (in 24- hour units) .BLKQ $BINTIM S TIMBUF=ANOON, TIMADR'BNOON Example 9-10 Use of $BINTIM X to to System When 64 the bit ASCII buffer noon Convert time. an noon for Absolute time binary Time Format 12 Value program calls value The value service. Convert 12 Ny BNOON: absolute We DESCRIPTOR <-- 12:00:00. 88> | ANOON: ASCII wy an e Example 9-10 shows how you can translate valu to the e 64-bit system format. in the BINTIM service, the service returns a representing noon today in the quadword at BNOON. BNOON may then serve as an input to the SETIMR Example 9-11 shows how .to use the BINTIM service to translate a time interval (delta time) given in ASCII format to the 64 bit system format. 9-37 VAX Diagnostic Design Guide DESCRIPTOR <9 00:10:00.00> ASCII ten minutes S $BINTIM S TIMBUF=ATENMIN, TIMADR=BTENMIN Example 9-11 buffer for minutes ; Convert time. W 1 . BLKQ e BTENMIN: e ATENMIN: Use of $BINTIM x to Value to System Convert a Delta binary ten Time Format This code returns the delta time of ten minutes to BTENMIN in 64 bit system format. 9.5.3 Specifying Delta Time Values at Assembly Time You can also specify delta time values at assembly time (instead of run time) using a MACRO .LONG directive. You can code an arithmetic expression to represent a time value in terms of 100 ns units. The arithmetic is based on the following formula. 1 second = 10 million *100 ns For example, 5 seconds in FIVESEC: the following statement defines the 64-bit system format: .LONG -10*1000*1000*5,-1 ; five a delta time value of seconds The value 10 million is expressed as 10*1000*1000 for readability. Note that the delta time value longword, extends the sign bit. is negative. The -1 in the second If you use this notation, however, you are limited to the max imum number of is 100 somewhat ns more units than 7 that can be minutes. expressed in a longword. : This 9.5.4 $SETIMR x Set Timer This macro calls a service that allows a program to schedule the setting of an event flag and/or the queueing of an asynchronous system trap (AST) at some future time.- You can specify the time for the event as an absolute time or as a delta time. $SETIMR_x efn, daytim, [astadr], [regidt] efn daytim = the number of the event flag to set when the time interval expires. You must specify the EFN, since the default value is @ and will cause supervisor errors. the address of the quadword containing the expiration time value. A positive time value indicates an absolute time at which the timer is to expire. A negative time value indicates an offset (delta time) from the current time. The time value should be coded in the 64-bit system format. 9-38 - VMS astadr = the ' to address be argument reqidt = of called is the entry mask when not for an AST service routine time interval expires. If this the specified, supplied. @ a request identification @. You specify shows can Service Macros that no the AST default is to number. a be The value of queued. default @ 1is value is ' unique request identification number in each Set Timer request. Or, you can give the same request identification number to related Set Timer requests. You can later to cancel argument is also number is passed use the Set Timer request identification requests. If supplied, the request to the AST routine. an number ASTADR identification Return Status Codes SSS_NORMAL: Service SS$_ACCVIO: The expiration SSS$ EXQUOTA: The exceeded, the Set and Resource An SS$_IVTIME: An already Mode illegal passed, or the quota has event Insufficient SS$ UNASEFC: The flag was read by the caller. timer entries resource system has wait mode been with the specified has service. number was expiration time SS$_INSFMEM: for disabled (SETRWM) absolute completed. time cannot be process process Wait SS$ ILLEFC: successfully time specified. that specified as was 4. dynamic memory is available to allocate a timer queue entry, and the process has disabled resource wait mode with the Set Resource Wait Mode (SETRWM) system service. containing Resources the process specified 1is not event Required/Returned 1. The 2. The Set Timer associated - system service Set Timer system timer queue entries. with The access service mode access mode the AST. 2, dynamic uses process's the of of the the caller request is the and of Use the Convert ASCII String to Binary Time (BINTIM) system service to convert to the as input a specified quadword to cluster 1 requires NOTES l. the flag. the time ASCII format string required SETIMR service. memory. quota for VAX Diagnostic Design Guide x Cancel Timer Request $CANTIM 9.5.5 The Cancel Timer Request system service cancels all, or a selected subset, of the Set Timer requests previously issued by the current Cancellation 1is based on the image executing in a process. the Set Timer (SETIMR) system in specified request identification has been given the same request timer one If more than service. canceled. all are they request identification, Macro Format [acmode] x $CANTIM ([reqidt], reqidt = timer the of number identification request the default) (the § of value A canceled. be request(s) to indicates that all timer requests are to be canceled. acmode = the access mode of the request(s) to be canceled. The access mode is maximized with the access mode of the Only those timer requests issued from an access caller. mode equal to or less privileged than the resultant access mode are canceled. Return Status Codes SS$ NORMAL: Service successfully completed. Privilege Restrictions Timer requests can be canceled only from access modes equal to or more privileged than the access mode from which the requests were issued. Resources Required/Returned Canceled timer requests are restored to the process's quota for timer queue entries. NOTE Outstanding timer requests automatically canceled at image exit. 9-49 are VMS Service Macros 9.5.6 Use of the Timer Services Timer requests made with the Set Timer service are queued. That is, they are ordered for processing according to their expiration times. The number of entries a process can have pending in this timer queue is controlled by a quota. Example 9-12 shows how a 30 second delay can be coded. WAITIME: . LONG -10*1000*1000*309,-1 $SETIMR;S BLBC ; EFN=#36, DAYTIM=WAITIME R@, ERROR SWAITFR S EFN=#36 BLBC R@, ERROR Example 9-12 the delta The $SETIMR service The SWAITFR service Control then Absolute time returns is DESCRIPTOR BNOON: .BLKQ 30 time Second Set Branch ; Wait ; Branch wait time timer. if error. 30 seconds. if error. is Delay given through event flag number 36 delays the program until to <-—- the in program. Example 12:00:00.00> TIMBUF=ANOON, TIMADR=BNOON R@, ERROR $SETIMR_S the MACRO after 30 the flag .LONG seconds. is set. 9-13. 1 $BINTIM_S BLBC ; ; sets used ANOON: second Use of the SETIMR Service to Create a Notice that directive. 30 : ; ASCII ; binary noon noon ; Convert ; Branch ; entry mask ; ; Check AST parameter. Go to noon routine. time. if error. BLBC DAYTIM=BNOON, ASTADR=ASTSERV, REQIDT=$#12 Rd3, ERROR ; Branch if error. .WORD CMPL BEQL ) #12,4 (AP) 10$ ASTSERV: %o 10$: Service - VAX Diagnostic Design Guide request. noon RET Example 9-13 Use of the SETIMR Service to Call an AST at an Absolute Time In this example, the call to BINTIM converts the ASCII string The value returned in representing 12:00 noon to system format. BNOON is used as input to the SETIMR system service. The AST routine specified in the SETIMR request will be called The REQIDT when the timer expires, that is, at 12:00 noon. The process continues argument identifies the timer request. execution. When the timer expires, it 1is interrupted by the delivery of the AST. Note that if the current time of day is past noon, the timer expires immediately. This AST service routine checks the parameter passed by the REQIDT argument and determines, in this example, that it must service the When the AST service routine 12:00 noon timer request. completed, the process continues execution at the point |is of with the | interruption. You could following cancel code. the request in shown Example 9-13 $SCANTIM S REQIDT=#12 FORMATTED ASCII OUTPUT SERVICE MACROS 9.6 wWwhen you wish to send a message to the operator from the diagnostic program, some of the information in the message may be variable strings or numerics. The formatted ASCII output system services enable level 2, 2R, and 3 diagnostic programs to assemble the complete message in the test code and place the text in a buffer, before calling one of the print macros. This procedure may be easier, in some cases, than assembling the message with the print macro in the print routine. See the VAX/VMS System Services Reference Manual for examples. 9.6.1 x Formatted ASCII Output $FAO The Formatted ASCII Output system service converts binary values into ASCII characters and returns the converted characters in an output string. ® [ Insert It can be used to: example) variable character string into an output string. data (filename, for Convert binary values into the ASCII representations of their decimal, hexadecimal, or octal equivalents and substitute the results into an output string. 9-42 VMS $FAO_xctrstr, ctrstr = [outlen], the address outbuf, of [pl], character [p2]..., string Service Macros [pn] descriptor pointing the control string. The control string consists of fixed text of the output string and FAO directives. outlen = the the outbuf = -- pn = of string returned the that is count. a word to receive the actual length of returned. this on to Each buffer. parameters the be directive, inserted, directive corresponding Status SS$ NORMAL: in directive Depending Return a the address of a character string descriptor pointing to the output buffer. The fully formatted output string is Pl address output to the in contained in a may or a the parameter parameter length, control or 1longwords. or string be an may parameters. a value argument require Codes Service successfully completed. SS$ BUFFEROVF: Service output overflowed string successfully the completed. output buffer, The formatted and has been truncated. SS$ BADPARAM: An control string. invalid directive was specified NOTES 1. The $FAO S macro | form uses a PUSHL instruction for all parameters (Pl through Pn) coded in the macro instruction. If a 1literal is specified, it must be preceded with a number sign (#) character or loaded into a register. 2. A maximum specified of 20 parameters in the $FAO x instruction. parameters are If more The FAO system service can be macro than required, $FAOL x macro. 3. in use executes 20 the at the access mode of the caller and does not check whether address arguments are accessible before it executes. Therefore, an access violation <causing an exception condition occurs if an input field cannot be read or, in some cases, if an invalid length is specified. the FAO VAX Diagnostic Design Guide x Formatted ASCII Output with List Parameter $FAOL 9.6.2 The Formatted ASCII Output with List Parameter macro provides an system input specify to way alternate a for parameters the FAO pointing to to call service. x ctrstr, $FAOL the control text fixed string. directives. outlen = character address of the ctrstr = [outlen], outbuf, prmlst of address of the a the output string The string descriptor control the output word to returned. string string receive the consists of the and conversion actual length of the address of a character string descriptor pointing to the output buffer. The fully formatted output string is outbuf = returned the prmlst = used in this buffer. address of the parameter list of longwords to be as Pl through Pn. The parameter list may be a data structure that already exists in a program and from which certain values are to extracted. be Return Status Same as for the FAO system service. FAO Directives 9.6.3 An FAO directive has the format: I1DD ! (exclamation mark) indicates that the following character or characters are to be interpreted as an FAO directive. DD is a 1 character or 2 character code indicating the action that FAO is to perform. Each directive may require one or more input parameters on the call to FAO. Directives must be specified optionally, A using uppercase letters. a directive may include: repeat An output count field length VMS A repeat count is coded as Service Macros follows: In(DD) where n is a directive for An output decimal value indicating that FAO is the specified number of parameters. field length is specified as to repeat the to place the follows: !lengthDD where length output is a resulting characters in the A directive may as shown below: decimal wvalue from directive a output instructing into string. contain both a repeat FAO a count field and an may be of length output length, In(lengthDD) Repeat counts and output variables, using a # numeric If # is by value. parameter passed a to If a variable will only have output one the a place the field 1length, the 1length is is specified of an count, repeat contain parameter specified in must field length 1lengths sign) specified for FAO specified for an output contain the length value. count, field (number count. next length. absolute the If a next # parameter specified required. with Each as is must a repeat output string 9.6.4 An FAO FAO Control String and Parameter Processing control string may be any length and may contain any number of FAO directives. The only restriction is on the use of the ! character (ASCII code X'21') in the control string. If a literal ! is required in the output string, the directive !! provides it. When FAO processes part of a a control directive string, each character is written into the output encountered, it is validated. If it FAO consecutive reads number of parameters past call the the parameters parameters from arguments it has the argument coded end of in the list. the It is not When a is not a valid returns an error status code. If the requires one or more parameters, the specified are analyzed and processed. directive is directive, FAO terminates and directive is valid, and if it next that buffer. argument been is list. passed. list, If FAO It does there will not are check not continue your responsibility, FAO directives when the enough reading coding a FAO, to ensure that there are enough parameters to satisfy requirements of all the directives in the control string. Table to 9-11 parameters summarizes required by the each directive. and 1lists the VAX Diagnostic Design Guide Table 9-11 Summary of FAO Directives Character String Substitution Directive| Function Parameters¥* 1AC Insert a counted ASCII Address of the string; string. the first byte must contain 'AD Insert an ASCII string. ! AF Insert an ASCII string. Replace all nonprintable ASCII codes with periods the length. 1. Length of string 2. Address of string 1. Length of string 2. Address of string (O)o 'AS Insert an ASCII string. Address of quadword character string descriptor pointing the string. to Numeric Conversion (zero—filled) 10B 1 OW Convert a byte to octal. Convert a word to octal. Value to be converted to ASCII representation. Directive| PFunction Parameters¥* 10L Convert a longword to octal. I1XB Convert a byte to hexadecimal. Convert a word to LXW XL hexadecimal. Convert a longword to 1ZB " Convert an unsigned decimal 1ZW Convert an unsigned decimal 1ZL hexadecimal. For byte or word conversion, FAO uses only the low-order byte or word of the longword parameter. byte. word. Convert an unsigned decimal longword. Numeric Conversion (blank-filled) 1UB Convert an unsigned decimal 1UW Convert an unsigned decimal UL byte. word. Convert an unsigned decimal longword. 9-46 Value to be converted to ASCII representation. VMS Table 9-11 Summary of FAO Directives Directive | Function 1SB Convert byte. Convert word. ISW !SL Output '/ ! Parameters* a signed decimal For byte or conversion, word FAO uses only the low-order byte or word of the longword | signed decimal Convert a longword. signed decimal parameter. (CR/LF) None Formatting Insert new line e Insert Insert a 1 Insert an exclamation mark. 1%S Insert 'S' if most recently converted numeric value is not '$T a tab. form feed. 1. Insert the system time. Address value 13D Macros (Cont) a String Service Insert time. the system date and to of a be ASCII. 1f 0 the current is Directive | Function quadword converted to is specified, system time used. - Parameters* ' n< Define output field width D of "n" characters. Format all data and directives None within delimiters, <and>, left-justified and blankfilled within the field. In*c Repeat the Parameter 1- If a string n c in None times Interpretation Skip the the list. variable last parameter in None next repeat is specified with a and/or length must directive. character output Reuse the the list. '+ * the parameter count and/or directive, precede in a None variable output parameters other field indicating parameters length the required count by the VAX Diagnostic Design Guide MEMORY MANAGEMENT SERVICE MACROS 9.7 The Set Protection on Pages system service allows an image running in a process to change the protection on a page or range of pages. x inadr, [retadr], [acmode], prot, [prvprt] $SETPRT inadr = address the of a array 2-longword containing the starting and ending virtual addresses of the pages on 1If the starting and which protection is to be changed. ending virtual addresses are the same, a single page is Only the virtual page number portion of the changed. The 1low-order 9 bits are virtual address is used. ignored. retadr = the address of a 2-longword array to receive the starting and ending virtual addresses of the pages that have had their protection changed. acmode = the access mode on behalf of which the request is being The specified access mode is maximized with the made. The resultant access mode access mode of the caller. must be equal to or more privileged than the access mode of the owner of each page in order to change the protection. prot = the new protection specified in bits @ through 3 in the The high-order format of the hardware page protection. defining the names Symbolic 28 bits are ignored. specified as If protection codes are listed in Note 2. the default access of kernel read-only is used. @, prvprt = the address of a byte to receive the protection previously assigned to the last page whose protection This argument is useful only when was changed. protection for a single page is being changed. Return Status Codes SS$ NORMAL: Service successfully completed. SS$ ACCVIO: 1. The input address array cannot be read by the 2. The output address array or the byte to receive the caller. 3. An previous protection cannot be written by the caller. page. ent nonexist a of attempt was made to change the protection SS$ EXQUOTA: The process exceeded its paging file gquota while changing a page in a read-only private section to a read/write page. SS$ IVPROTECT: of T or The specified protection code has a numeric value is greater than 15 (decimal). SS$ LENVIO: A page in the specified range is beyond the end of the program or control region. VMS SSS_NOPRIVE: address A SS$ PAGOWNVIO: change page in the specified space. the Page protection owner on a Restrictions For in pages global the accessibility of owner of the page. 1. is in the Macros system violation. An attempt was made to owned by a more privileged access page mode. Privilege range Service sections, the new the for modes page protection less can alter privileged than only the NOTES If an error occurs while changing page protection, the return array, if requested, indicates the pages that were successfully changed before the pages have longwords array 2. error 1in contain Hardware occurred. been the a If affected, return no both address -1. protection code symbols: Symbol Meaning PRTSC_NA PRTSC_KR PRTSC_KW PRT$C_ER PRT$C_EW PRTSC_SR PRT$C_SW PRTSC_UR No access Kernel read only Kernel write Executive read only Executive write Supervisor read only Supervisor write User read only PRT$SC_UW User write PRTSC_ERKW PRTSC SRKW Executive read; kernel write Supervisor read; kernel write Supervisor PRTSC_URKW PRTSC_UREW PRT$C_URSW read; User User User kernel write executive write supervisor write PRT$C_SREW These symbols are read; read; read; defined executive write by $PRTDEF. 9.8 HIBERNATE AND WAKE SERVICE MACROS A diagnostic program can place itself in a Hibernate system service. This a useful programs that magnetic media simultaneously started, the test the is (in parallel). After program can hibernate. the wait state with the feature for diagnostic on several transfers have devices all been VAX Diagnostic Design Guide The wait state can (asynchronous system wake itself execution, however, the be program interrupted When trap). continues AST the in for the delivery hibernation. The routine service an AST program may, routine AST by of completes calling Wake process system service. Then, after the AST service is completed, the program continues execution. 9.8.1. $HIBER x Hibernate The Hibernate system service allows hibernating Wake a process to the routine make itself the process inactive but to remain known to the system so that it can be interrupted, for example, to receive ASTs. A hibernate request is a wait-for-wake-event request. When a wake 1is issued for a continues process execution with at the the system instruction service, following the call. SHIBER s (no arguments) Return Status Codes SS$ NORMAL: Service successfully completed. NOTES 1. A hibernating process can be swapped out of the balance set if it is not locked into 2. the balance set. The wait state caused by this system service can be interrupted by an AST if (1) the access mode at which the AST is to execute is equal to or more privileged than the access mode from which the hibernate request was issued and (2) the process is enabled for ASTs at that access mode. When the AST service routine completes execution, the system reexecutes the HIBER system service on the process's behalf. If a wakeup request has been issued for execution the of the process AST during service the routine (either by itself or another process), the process resumes execution. Otherwise, it continues 3. to hibernate. If one or more wakeup requests are issued for the process while it is not hibernating, the next hibernate call returns does immediately. not maintained That hibernate. of is, the No outstanding requests. 9-59 process count 1is wakeup Hibernate VMS 4, 9.8.2. Service Macros Only the _S macro form is provided the Hibernate system service. for SWAKE x Wake The Wake system service activates a process that has placed in a state of hibernation with the Hibernate (HIBER) service. | SWAKE x [pidadr], pidadr the [prcnam] address of a of the identification the prcnam address the If neither Return a by a wake longword the containing process character name process the Status of process qualified wake. specified, itself system to string string. group number of is for the the process awakened. descriptor The identification request be name the nor process a pointing is to implicitly issuing process the name is caller. Codes SS$ NORMAL: Service SS$ ACCVIO: The process name string or string descriptor cannot be read, or the process identification cannot be written, by the caller. SS$_IVLOGNAM: The or SS$ _NONEXPR: SS$ NOPRIV: ) process than The 15 name does string has a length process does identification not have process. the was not exist, required to privilege to wake wake: Other processes in the same group (GROUP privilege) Any other process in the system (WORLD privilege). NOTE If one or more wake requests are issued for a process that is not currently hibernating, a subsequent hibernate request will be completed immediately. That is, the process will not hibernate. No count is maintained of outstanding wakeup requests. @ or specified. Restrictions are of characters. specified process process specified privileges ® more invalid The : Privilege specified has Warning. an User successfully completed. the VAX Diagnostic Design Guide UNWIND SERVICE MACRO 9.9 stack to change A condition handler routine may unwind the call problem. The the flow of execution, if it cannot handle a given to be removed handler may specify a depth to which call frames are s from the stack. In addition, it may specify a new return addres has frame to alter the flow of execution when the topmost call been unwound. [newpc] x [depadr], SUNWIND depadr = the address of a longword indicating the depth to which the stack is to be unwound. A depth of @ indicates the call frame that was active when the condition occurred, 1 indicates the caller of that frame, 2 indicates the caller of the caller of the frame, and so on. If depth is specified as @ or less, no unwind occurs. If no address is specified, the unwind is performed to the caller of the frame that established the condition handler. newpc the address complete. to be given control when the unwind is Return Status Codes SS$ NORMAL: SS$ ACCVIO: Service successfully completed. The call stack is not accessible to the caller. This condition is detected when the call stack is scanned to modify the return address. SSS_INSFRAME: SS$ NOSIGNAL: There are insufficient call frames to unwind to the specified depth. No signal condition. for 1is currently active SS$_UNWINDING: An unwind is already in progress. The actual immediately. NOTE unwind is Rather, not the performed return addresses in the call stack are modified so that when the condition handler returns, the unwind procedure is called from each frame that is being unwound. 9-52 an exception DIAGNOSTIC This chapter 3 diagnostic lists all of programs, the macros are available to one or can be the descriptions. the macros available to in alphabetical order. used at all program CHAPTER 190 DICTIONARY SYSTEM MACRO levels. level However, Those two program levels only are 2, 2R, and not all of macros that identified in For example, most of the VMS system service macros are available only to level 2 and 2R diagnostic programs, and the supervisor channel service macros are available only to level 3 diagnostic programs. The supervisor service macros take the form $DS xxxx x. The $DS prefix signifies the diagnostic supervisor. The suffix, x, shows that the macro may end in any of four ways, depending on the function required. _L -- generate an argument list _DEF -- generate symbols and offsets S -- call the service with CALLS G -- call the service with CALLG The utility macros supervisor diagnostic take service supervisor. the form $DS xxxx. The lack macros, the of 3$DS_ a As in the case of prefix suffix signifies indicates that the the the macro is a utility macro. Some of the utility macros call routines in the supervisor, while others merely generate in-line code. Status codes, however, are never returned. The VMS system service macros take the $, signifies macro may end a WS system service. in any of four ways. form $xxxx. The prefix, The _x suffix shows that the (this corresponds to _L in blank - generate an argument list _DEF - generate symbols and offsets S - call the service with CALLS G - call the service with CALLG the supervisor service macros) Most of the supervisor services and the WS system services return status codes in R@. The program should check the contents of R0 following one of these macros calls, in order to determine whether the service was completed successfully. Arguments enclosed in square brackets are optional. For detailed background information on the macros and for explanations of how to code the macros, refer to Chapters 7, 8, and 9 of this manual. VAX Diagnostic Design Guide x Assign I/0 Channel $ASSIGN 10.1 x is a VMS system service macro available only to level 2 $ASSIGN and 2R diagnostic programs. A level 2 or 2R program must assign a channel to a peripheral device before the program can perform any input or output operation on the device. The SASSIGN_x macro calls a VMS service that assigns a channel and a channel number to a device. This channel provides a path between the program and the device. In addition, you can use the $SASSIGN x macro to establish a logical 1link with a remote node in a network in 1level 2R | programs. x devnam, chan, $ASSIGN the devnam address the to points [mbxnam] [acmode], a character string descriptor that device name string. The string may be of either a physical device name or a logical name. If the first character in the string is an underscore ( ), the service treats the name as a physical device name. of level the service performs a single Otherwise, logical name translation and uses the equivalence name, there if chan = acmode any. is of the address the access mode a word to receive the that the service assigns to the device. to be associated with channel the number channel. The service maximizes the specified access mode with the I/0 operations on the access mode of the caller. from equal and more only channel can be performed privileged access modes. Kernel mode = @ Executive mode = 1 Supervisor mode = 2 User mode = 3 mbxnam = the address of the character string descriptor pointing to the 1logical name string for the mailbox to be associated with the device, if there is a mailbox. The mailbox receives status information from the device driver. Return Status Codes SS$ NORMAL: Service successfully completed. SS$ REMOTE: Service established with the successfully completed. target on a remote node. A logical 1link was SS$ ACCVIO: The device or mailbox name string or string descriptor cannot be read, or the channel number cannot be written, by the caller (access violation). 19-2 Diagnostic SS$_DEVALLOC: Warning: the SSS_DEVNOTMBX: A mailbox is not a mailbox. SS$_EXQUOTA: device name is has System Macro Dictionary allocated been to specified another for a process. device that The process has control block. target of the assignment is on a remote node and insufficient buffer quota to allocate a network SSS_INSFMEM: target the there is The of insufficient the assignment system dynamic is on a memory request. remote to node, and complete the SS$ _IVDEVNAM: mailbox Connect No device name was specified, or the device or name string contains invalid characters. Or, the Network Block has an invalid format. SS$_IVLOGNAM: The device or mailbox has more than 63 characters. or SS$_NOIOCHAN: No I/O channel SS$ NOPRIV: The process network operations. SS$ NOSUCHDEV: SS$_NOLINKS: No SS$ NOSUCHNODE: unavailable. The does specified logical The is name string available for have the device or mailbox links specified are The network connect was Services Protocol) or the partner on target image exited before the connect privilege does not node is Channels on can remote be For to devices details on how to use ASSIGN in conjunction with network operations, see the VAX-11 2. Only DECnet User's Guide. the owner of a device can associate a mailbox with the device (the owner is the process that has allocated the device, either implicitly or explicitly). Then the device driver can send messages containing status information to the mailbox, as in the following cases: @ If the message device may 19-3 is of # perform exist. or rejected by NSP (Network the remote node. Or, the confirm could be issued. assigned systems. to nonexistent NOTES l. length available. network SS$_REJECT: a assignment. not network has a terminal, indicate a dialup, VAX Diagnostic Design Guide the or hangup, unsolicited input. reception of e If the target is on a network, the message may indicate the network connect or initiate, or whether the line is down. e If the device is a line printer, the message may indicate that the printer is off-line. For and details on the message format the information returned, refer to the VAX/VMS I/0 User's Guide. Channels remain assigned until they are explicitly deassigned with the 3. deassign I/0 channel (DASSGN) system that image the until or service, assigned the channel exits. The ASSIGN service establishes a path to a device, but does not check 4. actually can caller the whether perform 1I/0 operations to the device. Privilege and protection restrictions may be applied by the device drivers. For details on how the system controls access to to refer devices, User's Guide. 19.2 VAX/VMS 1I/0 the $BINTIM x Convert an ASCII String to Binary Time It calls a service that SBINTIM x is a VMS system service macro. converts an ASCII string to an absolute time value or a delta time value in 64-bit system format. This format is suitable for input to (SETTIMR) the Set Timer x timbuf, $BINTIM system service. timadr timbuf the address of the character string descriptor pointing to the absolute or delta time value to be converted. The ASCII string value must be in one of the formats shown in the following note. timadr the address of a quadword that converted time in 64-bit format. Return Status SS$ NORMAL: receive the successfully completed. SS$ IVTIME: The component time to Codes Service or the 1is syntax of is the out of specified range. 10-4 ASCII string is invalid, Diagnostic ' Dictionary NOTE The the required ASCII input strings have following formats: Absolute Time: dd-mm-yyyy hh:mm:ss.cc, dddd hh:mm:ss.cc. 16.3 System Macro $CANCEL x Cancel Delta Time: I/0 on Channel SCANCEL _x is a VMS system service macro available only to and 2R diagnostic programs. It calls a cancels all pending I/O requests on general, this includes all I/O requests as those that are currently in progress. WS service routine that a specific channel. 1In that are queued, as well level 2 $CANCEL_x chan chan = the number which Return I/0 Status of is Service SS$_EXQUOTA: The this on the context, Unibus SS$_INSFMEM: cancel with the the I/O channel canceled. be to the device for successfully completed. process direct channel has I/0 and exceeded refers the system invalid channel has was of available. @ SS$ _NOPRIV: from a more The specified channel is privileged access mode. a quota of the number larger memory disabled (SETRWM) number or its use dynamic process Set Resource Wait Mode An to for direct direct data I/0. path adapter. Insufficient I/0, SS$_IVCHAN: assigned Codes SS$_NORMAL: In the to system specified, than the is available resource wait to mode service. that number is, a channel of channels or was assigned Restrictions I/0 can be canceled only from an access mode equal to privileged than the access mode from which the original or more channel not assigned, Privilege assignment was made. NOTES 1. When a request currently in progress is canceled, the driver is notified immediately. Actual cancellation may or may not occur depending on the the driver. When occur, for a. the queued The immediately, 1logical state of cancellation does same action as that taken requests is performed. specified event 19-5 flag is set. VAX Diagnostic Design Guide b. The first word of the if specified, block, SS$ CANCEL. I/O status is set to c. The AST, is queued. Proper if specified, between synchronization this service and the actual canceling of issuing I/0 requests requires the process to wait for I/O completion in the normal manner and then to note that the I/0 has been canceled. 2. If I1/0 the I/0 operation operation is involving tape ancillary control a a virtual disk process, or the I/0 cannot be canceled. In the case however, tape, magnetic a of cancellation may occur if the device driver 3. is hung. are requests I1/0 Outstanding image at canceled automatically exit. x Cancel Timer Request SCANTIM 10.4 It calls a VMS service x is a VMS system service macro. $CANTIM that cancels all or a selected subset of the Set Timer requests previously issued by the current image executing in a process. Cancellation is based on the request identification specified in Timer the Set all canceled. (SETIMR) system service. If more than request has been given the same request identification, one timer they are [acmode] x $CANTIM [reqidt], reqidt = the request identification of the timer request(s) to be canceled. A value of @ (the default) indicates that all timer requests are to be canceled. acmode = the access mode of the request(s) to be canceled. The access mode is maximized with the access mode of the caller. Only those timer requests issued from an access mode equal to or less privileged than the resultant access mode are canceled. Return Status Codes SS$ NORMAL: Service successfully completed. Privilege Restrictions Timer requests can be canceled only from access modes equal to or more privileged than the access mode from which the requests were issued. 10-6 Diagnostic Resources Required/Returned Canceled timer timer requests entries. queue are restored to System Macro Dictionary the process's quota for NOTE Outstanding timer requests are at image exit. automatically canceled 16.5 $CLREF x Clear $CLREF _x is that a clears an VMS Event system event flag. Flag service macro. It calls a VMS service $CLREF_x efn efn = Return the number Status of the event flag to be cleared. Codes SS$_WASCLR: Service successfully flag was previously #@. completed. The specified event SS$_WASSET: completed. The specified event flag was Service previously SS$_ILLEFC: An SSS_UNASEFC: containing the successfully 1. illegal The event process specified flag 1is event number not flag. 19-7 was specified. associated with the cluster VAX Diagnostic Design Guide 10.6 A $DASSGN_x Deassign I/O Channel _x is a VMS system service macro available only to level 2 SDASSGN and 2R diagnostic programs. It calls a VMS service that releases an I/0 channel acquired for I/O with the Assign Channel system service. x chan $DASSGN chan = the number of the I/0 channel to be deassigned. Return Status Codes SS$ NORMAL: Service successfully completed. SS$ IVCHAN: An invalid channel number was specified; that is, a channel number of @ or a number larger than the number of channels available. SSS_NOPRIV: The specified channel is not assigned, or was assigned from a more privileged access mode. Privilege Restrictions to An I/0 channel can be deassigned only from an access mode equal al or more privileged than the access mode from which the origin channel assignment was made. 1. When . NOTES the file is closed. 1If a mailbox was associated with the was channel the when device assigned, channels the and there assigned 1linkage cleared. 3. any outstanding I/0 requests on the channel are canceled. If a file has specified the on opened been channel, 2. deassigned, is channel a to to the are the no more mailbox, mailbox is If the I/O channel was assigned for a network operation, the network link is disconnected. For more information on channel assignment network for deassignment and operations, refer to the VAX-11 DECnet User's Guide. 4. 1If the specified channel is the last channel assigned to a device that has been marked for dismounting, the device is dismounted. s. I/0 channels are automatically deassigned at image exit. 10-8 Diagnostic System Macro 16.7 S$SDEF Define Some SDEF sym, alloc, siz Sym = Field Within a Data Dictionary Structure the name of the symbol.to be defined. alloc an be assembler used: directive 1nd1cat1ng : blocks be the block size to .BLKB . BLKW .BLKL siz = Return Use the Status number Codes: of Not to allocated. Applicable. this structure definition utility macro to generate the symbols given in a P-table data structure. for 190.8 an offset SDEFEND Finish Definitions $DEFEND struc, gbl struc = the gbl = GLOBAL or Return Status Use this structure for structure the 19.9 definition stucture S$DEFINI the name of the Ptable) clean Not Applicable. structure data (e.g., LOCAL Codes: P-table name utility macro to after all definition have been process defined. Start a Data Structure $DEFINI struc, gbl, dot of the up struc = the structure name (e.g., the name of the P-table). gbl = GLOBAL or LOCAL. dot = the value of Return Status Codes: Use this structure definition 10.10 of a the first P-table data $DS_ABORT Abort the argument an abort the supplied macro message by a the program's cleanup code, and routine in the supervisor. If the an RET, be generated. macro to start the structure. Program calls on to Not Applicable. definition utility $DS_ABORT is a utility macro. PROGRAM, symbol the symbols or Test The function of the macro depends on the programmer. routine in operator's then the If the supervisor terminal, transfers control argument that executes to argument is TEST, the macro merely clears R@# and to call the dispatcher and start the next test. 18-9 1is prints the then the BEGIN does VAX Diagnostic Design Guide $DS_ABORT [arg] arg = the level of abort PROGRAM = Execute clean up code and return to command mode. (PROGRAM or TEST). Terminate current test and proceed to the next test. TEST Default Return Status Codes: 18.11 NOTE arg = PROGRAM. Not Applicable. $DS_ASKADR_x Ask Operator for an Address It calls a supervisor _x is a supervisor service macro. $DS ASKADR routine that displays a prompt message on the operator's terminal, asking the operator for an address. The service accepts an ASCII numeric address string, checks whether or not it is within an acceptable range, and stores the address in a user-specified ' longword. $DS_ASKADR x msgadr, datadr, [radix], [lolim], ' [hilim], [defalt], [unused], [exword] msgadr = the address of a counted ASCII string used as a prompt. datadr = the a longword that PAR$_OCT, PAR$ _DEC, or address of the receive will response. radix = PAR$ BIN, lolim = the minimum acceptable numeric response. Default value = PARS_HEX. the default radix, a. hilim = defalt = unused = exword = the maximum agfeptable numeric +maximum, + (2 the value response. to use if the operator gives a Default value = reserved -1). 0. Default value null response. for expansion. the exception mask. may be PARS NODEF means that there is no default. PARS ATDEF, PAR$ ALTO, and PARS$ ATHI cause the parameters DEFALT, LOLIM, and HILIM to beinterpreted as containing the addresses where the corresponding values found, instead values. 10-10 of containing their literal Diagnostic System Macro Dictionary Return Status DS$S NORMAL: Codes Service successfully completed. DSS;PROGERR: The number of arguments supplied is incorrect. NOTES 1. Execution program 2. 3. this macro abort is clear. If the if Prompt the flag will set, ranges be printed the prompt message. radix Do not and are exception defined use FAO string. prompt flag is with arguments a will default values cause Operator and The 4. of mask by $DS_PARDEF. directives in the 10.12 $DS_ASKDATAx Ask the Operator for a Numeric Value $DS_ASKDATA x is a superv1sor service macro. It calls a supervisor service routine ensures that that the numeric string if necessary, (mask) . prompts value is the operator within for a numeric acceptable range. an value The and ASCII that the operator returns is converted, truncated and stored in a caller-specified variable field $DS_ASKDATA x [defalt], [unused], msgadr, datadr, msgadr = the address of datadr = the [exword] address a [radix], counted of a ([mask], ASCII [lolim], ([hilim], string used as 1longword that will receive PAR$ DEC, or a prompt. the response. radix = PAR$ _BIN, mask = the lolim = bit mask the minimum -max1mum, hilim = defalt = unused = PAR$_OCT, PARS_HEX. the indicating agfeptable field the position default and radix, size. numeric response. Default value numeric response. Default = -(277). maximum agfeptable +maximum, +(2°"-1). the to value | Default value reserved for use = if the operator 0. expansion. 10-11 gives a null value response. VAX Diagnostic Design Guide exword = the exception default. mask. PAR$ NODEF means PARS ATDEF, PARS_ALTO, and parameters DEFALT, containing may be values. Return Status Codes DS$ NORMAL: Service DS$ PROGERR: DS$ _TRUNCATE: fit in the the found, addresses instead PARS ATHI value where of the cause the corresponding containing supplied by the is operator NOTES their values literal invalid. is too large to | clear. ranges If the Prompt flag is set, and default values will be printed with 3. no Execution of this macro will cause a program abort if the Operator flag is 2. 1is successfully completed. specified buffer. 1. there LOLIM, and HILIM to beinterpreted as The value supplied by the operator The that the prompt message., Truncation of left-most bits occurs if a response is 1larger than the mask. 4. mask exception and radix The arguments are defined by $DS_PARDEF. 5. General truncated, 6. 19.13 Do not Rl register converted binary value, the not return. on use contains FAO prompt string. directives in the $DS_ASKLGCL_x Ask the Operator for a Logical Response $DS ASKLGCL X is a supervisor service macro. It calls a supervisor service routine that prompts the operator for a logical response to a specified gquestion. The service accepts an ASCII "yes" or "ho" string, converts this to a single bit (flag), and stores the information in a caller-specified bit within a caller-specified byte. x msgadr, datadr, [pos], [yexfer], [noxfer}), [defalt] $DS_ASKLGCL msgadr the address of a counted ASCII string used as a prompt. datadr the address of a byte that will 19-12 receive the response. Diagnostic pos = the bit position Default = within System Macro DATADR. Range 0. = Dictionary # through 7. yexfer = the branch meaning no address branch. for positive response. Default = 3, : noxfer = the branch meaning no address branch. for negative response. Default = a, defalt = PAR$_YES Return Status Service DS$_PROGERR: The is PAR$ NO. Codes DS$_NORMAL: caller, or is too incorrect. successfully completed. bit large position a number, argument, or the POS, number NOTES l. Execution of program is 2. clear. Do not prompt It routine accepts strings. an If the use FAO string. $DS_ASKSTR _x Ask $DS_ASKSTR x is a service by the supplied cause Operator a flag If the Prompt flag is set, ranges and default values will be printed with the prompt message. 3. 16.14 if arguments : this macro will abort specified of the supervisor directives Operator service that prompts the ASCII string, which valid, the buffer. string in o : for a macro. operator is is String It calls for a checked placed the in a against a supervisor string response. a 1list of caller-specified | $DS_ASKSTR_x msgadr, bufadr, [maxlen], [valtab]l, msgadr = the address of a counted ASCII string bufadr = the address of a counted ASCII buffer. maxlen = valtab = [defadr] used as a prompt. the maximum length of response string (does not.include the the count byte) . Default address Default = @, of a meaning = 72, counted that 19-13 1list there is of no string pointers. validation table. VAX Diagnostic Design Guide defadr = the address of a counted ASCII string to be used if the operator response. null a gives that there is no default string. 0, Default = meaning Return Status Codes DS$ NORMAL: Service successfully completed. DS$ PROGERR: The number of arguments supplied is incorrect. DS$_TRUNCATE: The string supplied by the operator been has truncated because it will not fit into the buffer supplied by the program. NOTES 1. Execution of this macro will cause a program abort if the Operator flag is clear. 2. If and the flag Prompt values default is will with the prompt message. set, be ranges printed be 3. If VALTAB = @, any string will accepted without qualification. 4. If VALTAB not = @, Rl will return the into value 1index an with If the validation table. Warning: default uses program the and operator selects <CR> only (a null response), Rl will contain @. 5. Do not FAO use prompt string. directives in the x Ask the Operator for a Numeric Value $DS_ASKVLD 19.15 $DS_ASKVLD_x is a supervisor service macro. It calls a supervisor service routine that prompts the operator for a numeric value. The routine accepts an ASCII numeric string as input, converts the determine string, truncates the string if necessary, checks to stores the whether the value is within an acceptable range, and value in a caller-specified variable field (position and size). $DS ASKVLDx msgadr, datadr, [radix], [posl, I[sizel, ([lolim], [hiTim], [defalt], [unused], [exword] msgadr = the address of a counted ASCII string used as a prompt, datadr = the radix = a longword that will PARS$ OCT, PARS_HEX, or the address of receive the response. PAR$ BIN, PARS _DEC. 19-14 default radix, Diagnostic System Macro Dictionary pos the right-most Default = 0. size the lolim number of the minimum -maximum, hilim the bit of the bits in the agfeptable max1mum agfeptable +(2°7-1). defalt the to unused reserved value the for numeric response. Default value if the operator DS$ TRUNCATE: PARS$ NODEF means PARS _ALTO, and it null response. LOLIM, “and HILIM where instead of the that there PARS _ATHI to is cause be interpreted corresponding containing their no the as values 1literal successfully completed. invalid The a expansion. found, because gives mask. Service An field. PAR$_ATDEF, Return Status Codes PROGERR: 31. value the addresses DS$ through Default DEFALT, DSS NORMAL: 6 response. parameters be values. = numeric containing may truncated use exception default. range -(277). +maximum, exword field, value string will was supplied supplied not fit by into by the the operator the operator. buffer has supplied by been the program. NOTES 1. 2. Execution of this macro will cause a program abort if the Operator £flag is clear. If the Prompt flag is and default values will with the prompt message. set, ranges be printed 3. The radix and exception mask arguments are defined by $DS_PARDEF. 4. Do not prompt use FAO directives 1in the string. $DS_BCOMPLETE Branch on Complete $DS BCOMPLETE is a utility macro. It generates 10.16 The program low bit previous will branch to the address of RO is set, indicating supervisor call. 10-15 code specified successful by that tests R0O. LABEL, if the completion of the VAX Diagnostic Design Guide $DS_BCOMPLETE label the address label = Return Status Codes: 10.17 for transfer of program control. Not Applicable. $DS_BERROR Branch on Error $DS_BERROR is a utility macro. It generates code that causes a branch to the address specified by LABEL, if the low bit of R@ is clear, indicating an error condition in a preceding supervisor call. $DS_BERROR label the address label = Return Status Codes: for transfer of program control. Not Applicable. $DSBGNCLEAN Begin Cleanup Code Section 10.18 $DS |BGNCLEAN is a utility macro. This macro should be the first statement in the cleanup code section of a diagnostic program. It does not call a supervisor routine. It simply provides an entry point to the cleanup code section. $DS_BGNCLEAN [regmask], the entry point register save mask. regmask = psect [psect] any legal arguments for the .PSECT directive. = Return Status Codes: Not Applicable. NOTE Default PSECT arguments = <CLEANUP, LONG>. 10.19 $DSBGNDATA Begin Data Section $DS_BGNDATA is a utility macro. Use this macro at the beginning of a test data section to provide a label. The macro does not call a supervisor routine. $DS_BGNDATA [align] align = the psect alignment. Return Status Codes: Not Applicable. NOTE The default ALIGN argument is PAGE. 10-16 Diagnostic System Macro Dictionary 10.20 $DS_BGNINIT Begin Initialize Code Section $DS_BGNINIT is a utility macro. Use this macro at the the initialization in the diagnostic program to routine. The macro does not call a entry point routine,. to $DS_BGNINIT [regmask], the = the entry point psect = any legal arguments Status of provide an supervisor [psect] regmask Return beginning routine register Codes: Not Default LONG>. PSECT save for the mask. .PSECT directive. Applicable. NOTE arquments = <INITIALIZE, 190.21 $DS BGNMESSAGE Begin a Message $DS_BGNMESSAGE is a utility macro. Use this macro of a global entry mask. error It does message print not a call routine. supervisor $DS_BGNMESSAGE [regmask] regmask = entry point register Codes: Not Applicable. Return the Status The source beginning routine. module of in a diagnostic a source module. $DS_BGNMOD env, [test], [subtest] env = CEP_FUNCTIONAL, program. It does at The not CEP_REPAIR, test = the number of the first test subtest = the number of the first subtest Return Status Not in the macro call this in module. NOTES 2. Default 10-17 an in SUBTEST of the supervisor module. this $DSBGNMOD is absolutely required every module. Default defines SEP_FUNCTIONAL l. 1. beginning a Applicable. TEST = argument = 1. beglnnlng creates save mask. SEP_REPAIR. Codes: the routine. 16.22 $DS_BGNMOD Begin a Program Module $DS_BGNMOD is a Utlllty macro. Use this macro each at macro or VAX Diagnostic Design Guide $DS_BGNREG Begin a Device Register Storage Area 10.23 $DS_BGNREG is a utility macro. You should use the macro to define an area in memory where information from device registers may be stored and kept up to date. The macro provides a label, DEV_REG, which identifies the first location in the area. It also defines this label for the $DS_HEADER macro. supervisor routine. $DS_BGNREG (no arguments) Return Status Codes: $DS_BGNREG does not call a Not Applicable. $DS_BGNSERV Begin Interrupt Service Routine 10.24 $DS BGNSERV is a utility macro. Use this macro to define an entry point for an interrupt service routine. The macro also ensures longword alignment, and pushes registers RO and R1 on the stack. It does not call a supervisor routine. $DS_BGNSERV label label = an identifying label for this routine. Return Status Codes: Not Applicable. $DS BGNSTAT Begin Statistics Section 10.25 a utility macro. Use this macro to define an area STAT'TS $DS_BGN in memory for each logical unit (LUN) being tested. The hardware and software errors may be tabulated in this area. The macro does not call a supervisor routine. $DS_BGNSTAT (no arguments) Return Status Codes: 16.26 Not Applicable. $DS_BGNSUB Begin a Subtest $DS BGNSUB is a utility macro. It calls a supervisor routine that marks the beginning of a subtest. The routine ensures that the diagnostic program is sequencing through its subtests in numerical order. If the routine detects a sequencing error, it notifies the operator and then returns control to the command mode. $DS_BGNSUB (no arguments) Return Status Codes: 10.27 Not Applicable. $DS BGNSUMMARY Begin Summary Report Section $DS BGNSUMMARY is a utility macro. Use this macro at the beginning of the summary code section of a program to produce an entry mask and a label (SUMMARY). The summary report routine can be called to print a report based on information in the data and statistics areas of the program. This macro does not call a supervisor routine. 10-18 Diagnostic $DS_BGNSUMMARY [regmask], [psect] regmask ~&egm asx = the entry point psect = any legal arguments Return Status Codes: Not Default register $DS a test in notifies macro a $DS_BGNTEST section supervisor not call a test section belongs to in two names the entry align = the boundary and $DS_BITDEF gbl = Return the with Not This SECTION This sections, < save the of mask and routine. The name test. place >, and If the of the a test section Separate the mask. argument is is macro also generates the dispatch table. an Define Bit Value Mnemonics #4. PAGE. entry It defines the symbols BIT® through corresponding to [gbl] LOCAL. Not test is the argument utility macro. Codes: entry NOTES 3. Status beginning Applicable. default ALIGN or a the alignment. The GLOBAL of includes register 2. masks an commas. default $DS_BITDEF at [align] more The SDS_BITDEF is a <SUMMARY, macro brackets, l. in directive. produces name(s). or point this It that single = Codes: = routine. section Status .PSECT beginning the regmask BIT31 the Program __section 16.29 of supervisor [regmask], names Return Use Program. [section], = mask. Begin a Test utility macro. diagnostic the does a the NOTE argquments PSECT $DS_BGNTEST BGNTEST is for save Applicable. LONG>. 10.28 System Macro Dictionary Applicable. 18-19 each bit. . VAX Diagnostic Design Guide 16.39 $DS_BNCOMPLETE Branch on not Complete $DS_BNCOMPLETE is a utility macro. It generates code to check the low—-order bit of RO, in order to test for a failure in a previous call to the supervisor. If bit @ is clear, a branch occurs. The macro does not call a supervisor routine. $DS_BNCOMPLETE label label = the address for transfer of program control. Not Applicable. Return Status Codes: 19.31 $DS_BNERROR Branch on not in Error $DS_BNERROR 1is a utility macro. low-order bit of RO, in order It generates code to check the to test for the success of a previous call to the supervisor. If bit @ is set, a branch occurs. The macro does not call a supervisor routine. $DS_BNERROR label label = the address for transfer of program control. Not Applicable. Return Status Codes: 10.32 $DS_BNOPER Branch if no Operator Present $DS BNOPER is a utility macro. It generates code that checks the t, status of the Operator control flag. If no operator is presen the by ied specif s addres the to the macro causes a branch programmer. No supervisor routine is called by this macro. $DS_BNOPER label label = the address for transfer of program control. Return Status Codes: 10.33 Not Applicable. $DS_BNPASS@ Branch if not in Pass Zero the $DS BNPASS@# is a utility macro. It generates code that tests the in on lizati initia m progra status of a one-time switch used for the ted, comple been y alread has initialization section. If pass @ macro causes a branch to the address specified by the programmer. No supervisor routine is called by the macro. $DS_BNPASS@# label label = the address for transfer of program control. Return Status Codes: This Not Applicable. macro is NOTE valid initialization section. 10-20 only in the Diagnostic System Macro Dictionary 10.34 $DS_BNQUICK Branch if not in Quick Mode | $DS BNQUICK is a utility macro. The macro generates code that checks the status of the Quick control flag. If the flag is not set, control passes to the address specified supervisor routine is called by the macro. by the programmer. No $DS_BNQUICK label label = the address Return Status Codes: 16.35 $DS $DS BOPER status passes not call the the a transfer Not utility of program control. Applicable. BOPER Branch is a of to for if Operator macro. It Present generates code Operator control flag. If the flag address specified by the operator. supervisor that checks the is set, control This macro does routine. $DS_BOPER 1label label = Return 19.36 the address Status Codes: for transfer Not is a program control. Applicable. SDS BPASS@ Branch $DS BPASS@ of if in Pass utility macro. It Zero generates code that checks the status of a one-time switch used for program initialization in the initialization section. If pass 0 has not been completed, the macro causes a branch to the address specified by the programmer. No supervisor routine is called by the macro. $DS_BPASS# label label = the address Return Status Codes: for transfer of program control. Not Applicable. NOTE This macro 1is wvalid initialization section. 10.37 $DS_BQUICK Branch $DS BQUICK is a utility checks the the macro status of causes a programmer. No = the supervisor address Return Status Codes: in in the Quick Mode The macro generates code the Quick control flag. If the flag branch to the address specified $DS_BQUICK label label if macro. only routine is called transfer of program by the macro. | for Not Applicable. 19-21 control. that is set, by the VAX Diagnostic Design Guide $DS_BREAK Break in Diagnostic Program 19.38 a utility macro. It calls the DS$BREAK routine in the $DS_BREAK is supervisor. The DS$BREAK routine, in turn, checks the status of the Control C flag. If the operator has typed Control C, setting the flag, the routine inserts a breakpoint and passes control to the command mode $DS BREAK priority is in the CLI. used loops. primarily as a call no-op for tight, high- $DS_BREAK (no arguments) Return Status Codes: 10.39 Not Applicable. x Cancel Wait $DS_CANWAIT $DS CANWAIT X is a supervisor service macro. It calls a routine in x the supervisor that cancels the effect of a previous $DS_WAITMS or x macro $DSWAITUS invoking by the x S$WAKE system service macro. x (no arguments) $DS_CANWAIT Return Status Code DS$ NORMAL: Service successfully completed. NOTE In general, you should use this macro in interrupt service routines. $DS_CFDEF Call Frame Definitions 10.490 $DS_CFDEF is a utility macro. It provides symbolic definitions for call frame offsets from the frame pointer. It does not call a routine in the supervisor. $DS_CFDEF gbl = [gbl] GLOBAL or LOCAL. Return Status Codes: Not Applicable. NOTE The defined symbols are: CFSL ONCOND CF$W_PSW CFSW_MASK CF$SL AP Condition Handler Processor Status Word Register Mask 01d Argument Pointer CFSL_PC Return PC CFS$L_FP CF$L_REG 16.41 01d Frame Pointer Saved Registers x Channel Service $DS_CHANNEL_ $DS CHANNEL_x is a supervisor service macro available to level 3 diagnostic programs only. It calls a supervisor routine that 10-22 Diagnostic System Macro Dictionary provides a channel adapter interface service. The service enables a diagnostic program to exercise general control over the hardware status of the channel adapter. $DS_CHANNEL x unit, unit = func = func, the logical the function [vecadr], unit [stsadr] number. code specifying performed. The code 1is function argument should the operation to expressed symbolically. be preceded by a number be The sign (#) . vecadr = the entry point interrupt stsadr = address occurs. the address the CHCS_STATUS This argument CHCS ENINT of for Required a interrupt for the service CHC$ ENINT quadword to store function or the CHC$ ENINT for the CHC$ STATUS is required adapter when functions. an function. status for function. and $DS_CHANNEL Functions CHCS INITA Return Status DS$ _NORMAL: Initialize Channel Adapter Code: Service successfully completed. CHCS INITB Return Status DS$_NORMAL: Initialize device bus Code: Service successfully completed. CHCS_ABORT Return Status Service DS$ LOGIC: Bit ABORT did CHCS$ Adapter Codes: DS$_NORMAL: not set/clear clear NORMAL: the failure. Purge Service data (MBA only) DTABT did data successfully path specified by path completed. the CHCS$ ENINT (MBA). last This function $DS_SETMAP X macro Enable interrupts Status DS$ NORMAL: DS$_IHWE: was set (UBA only) call. Return not (MBA). PURGE DS$ abort successfully completed. Return Status Code: purges (UBA only) found Codes: Service Initial before DS$_LOGIC: Bit successfully completed. hardware the error. function was set/clear failure. DS$_IVVECT: Invalid vector was DS$_IVADDR: Invalid address Enable found was 190-23 Adapter error condition performed. found bit failed to by $DS_SETVEC_x. by $DS_SETVEC x. set. VAX Diagnostic Design Guide DS$ NORMAL: DS$S Service successfully completed. Initial IHWE: interrupts Disable CHCSDSINT Return Status Codes: error. hardware Adapter was found before the function was performed. DS$_LOGIC: to Bit set/clear error condition Interrupt enable bit failed failure. clear. DS$_IVVECT: Invalid vector was found by $DS_CLRVEC_X. Clear CHCS CLEAR adapter status Return Status Codes: DS$ NORMAL: Service successfully completed. Bit DS$ LOGIC: failed to clear. set/clear CHCS$ STATUS of failure. One Request adapter the status status Return Status Code: DS$ NORMAL: Service successfully completed. Set defeat parity CHC$_ SETDFT Return Status DS$ NORMAL: (UBA only) Code: Service successfully completed. Clear defeat parity (UBA only) CHCS$ CLRDFT Return Status Code: DS$ NORMAL: Service successfully completed. l. The NOTES interrupt (CHC$ ENINT) enable will enable function adapter interrupts and, in the case of the After interrupts. device UBA, UBA or initialization Unibus perform a clear initialization, function before enabling interrupts. Adapter status, returned in response to the CHC$_STATUS function, is stored in location spec1f1ed by the argument STSADR, as shown in Note 3. Returned status description: Two longwords of status are returned for function status request each (CHC$STATUS) of the CHANNEL service with along status, call. This ainform upt interr ic specif n certai all on ed suppli also is tion, interrupts that are to be passed to 19-24 bits Diagnostic System Macro Dictionary program which has a enabled interrupt processing. The two longwords returned have the following format. status STATUS 1 STATUS 2 adapter = = . RVR = status one word Note 5. receive vector interrupt 4. of Adapter as status defined in interrupt register through Status the Definition CHS$M SYSERR CHS$M_CHNERR Channel System CHS$M DEVBUS CHSS$M DEVTO CHS$M_CHNDPE CHS$M_CHNMPE CHS$M_CHPFOT CHS$M SYSMEM CHS$M SYSSBI CHS$M_MBAEXC CHS$M MBANED CHS$M_MBADTB CHS$M_MBADTC CHSSM_MBACPE CHSSM MBAWCK error error those (STATUS that 1) (category) (category) Program error Program (category) error (hardware error Channel detected) Channel error memory parity error power fail/overtemp System memory error SBI error Massbus exception MBA nonexistent drive System MBA data transfer busy MBA data transfer complete MBA control MBA write Bus Bus init clear (deassertion) init (assertion) power down Any error Bus parity category CHI$M CHNINT CHISM DEVINT CHISM IPL Status (CHS$MSYSERR, CHSS$M |DEVERR, CHS$M_PGMERR) Interrupt error check CHSSM| CHNERR, When devices in Device timeout Channel data parity CHS$M_ERRANY 6. defined (category) Unibus/Massbus CHS$M BUSIC CHSSM BUSINIT CHS$SM_BUSPDN 5. 4. as UBA. error Device CHSSM PGMHDE status for 2 Note Definitions Symbol CHS$M DEVERR CHSS$SM PGMERR 1 | rvr T Definitions (STATUS | 2) Channel interrupt Device interrupt Interrupt CHCS_ENINT priority is used, should be used to codes deflne returned at STSADR. 19-25 level $DS_CHIDEF the status VAX Diagnostic Design Guide A complete list of return status codes for $DS_CHANNEL_x follows. DS$ NORMAL: Service successfully completed. DS$ PROGERR: Program error encountered. DS$ IHWE: Initial hardware error encountered. The adapter hardware " status was found to be in error before the performance of the requested function. The function will not be performed. DS$ FHWE: Final hardware error status encountered. The adapter hardware status was found to be in error after the performance of the requested function. correctly is in question. The capability of the adapter to operate DS$ LOGIC: An adapter function that sets or clears an adapter status bit has failed. The capability of the adapter to operate correctly is in question. DS$ _IVVECT: An invalid vector has been given as an argument. DS$ ERROR: An error has been found trying to associate a hardware p-table with the logical unit argument. 16.42 $DS_CHCDEF Channel Function Definitions $DS CHCDEF is a utility macro available to level 3 diagnostic programs only. It provides symbolic definitions for the functions not used in the channel call macro, $DS _CHANNEL_X. The macro does call a supervisor routine. $DS_CHCDEF gbl = [gbl] GLOBAL or LOCAL. Return Status Codes: 16.43 Not Applicable. $DS_CHDEF Channel Symbol Definitions $DS CHDEF is a utility macro available to level 3 diagnostic HSDEF, programs only. It invokes four other macros ($SDS_Cof the all define to ) $DS_CHIDEF, $DS_CHMDEF, and $DS CHSDEF channel symbols used by the channel service calls. call a supervisor routine. It does not $DS_CHDEF [gbl] gbl = GLOBAL or LOCAL. Return Status Codes: 10.44 Not Applicable. $DS CHIDEF Interrupt Status Definitions $DS_CHIDEF 1is a utility macro available to 1level 3 diagnostic programs only. It defines the codes that are used by the channel x, to indicate adapter status following an service, $DS_CHANNEL 10-26 Diagnostic interrupt. the You $DS_CHIDEF gbl = Codes: is programs Not macro $DS_CHANNEL x in conjunction with macro. Applicable. Channel utility It not Mapping Function Definitions macro available to provides symbolic definitions call a supervisor 1level 3 diagnostic for the routine. [gbl] GLOBAL or Return the functions. does $DS_CHMDEF = a only. $DS_SETMAP_x gbl $DS_CHIDEF LOCAL. SDS_CHMDEF $DS CHMDEF macro the of Dictionary [gbl] Status 16.45 use function GLOBAL or Return The should CHCS_ENINT System Macro Status LOCAL. Codes: Not Applicable. 16.46 $DS_CHSDEF Channel Adapter Status Definitions SDS_CHSDEF is a utility macro available to 1level 3 programs only. CHCS_STATUS The macro provides function does $DS_CHSDEF It not of the call a GLOBAL or LOCAL. Return Status a If of scope supervisor Codes: Not Applicable. the and loop subtest the by Loop 1looping flag causing a is It calls a mechanism. set, branch the back supervisor If an supervisor to the macro label may Return the address Status Codes: for Not transfer of Applicable. 16-27 program routine error has routine that been sets up specified. modify ' $DS_CKLOOP label = the routine. a new error occurs, the $DS_CKLOOP the loop the next time around. label for $DS_CHANNEL x macro. 16.47 $DS_CKLOOP Check Loop $DS _CKLOOP is a utility macro. detected diagnostic definitions [gbl] gbl = controls symbolic control, the range VAX Diagnostic Design Guide $DS CLI Command Line Interpreter Tree 10.48 ing macro is used to build parsgJoes $PDS CLI is autility macro.oneThenode er pars in the tree. The trees. Each call generates ch directive is encountered. bran or atch down the tree until a mism a supervisor routine. The macro does not call $DS CLI char, [action], [miss], [ascii] char = action = miss = ascii = comparison character. See Note 1. a code to be passed to the action routine. See Note 2. a mismatch or branch displacement in the tree. an ASCII string to use for comparison. Return Status Codes: 1. Not Applicable. NOTES Special character codes defined by $DS_CLIDEF to be optionally used as the CHAR argument: Symbol CLI$K ERROR CLISK EXIT CLIS$K BR CLISK BIF CLISK SPACE CLISK NUM Function Action/Parser return (bit 0 of RO = g). 1). Action/Parser return (bit @ of R# = tree the Unconditional branch within using MISS. Branch if. Checks bit @ of R#. Bit # = @, fall through to next node. Bit # = 1, branch using MISS. Traverse spaces and/or tabs and scall to ACTION if any were found next non-space CHAR). (R8 point Traverse numeric fields and call ACTION with numeric function uses wvalue the in default Rl8. This radix. It branches using MISS if no numeric data CLISK ALPHA CLISK ALNUM CLISK OCT CLISK DEC CLISK HEX CLISK STRING is found. Traverse alphabetic fields. (Uppercase alphanumeric fields. _ A-Z). Traverse (Uppercase A-Z or 0-9). Same as CLISK NUM except that the octal radix is forced. Same as CLISK NUM except that the decimal radix is forced. Same as CLI$K NUM except that the hex radix is forced. ASCII argument used for match. (Note: only the first character of the string need match). 19-28 Diagnostic 2. Upon entry to the action registers contain: \ Register Content RO Action R7 Parse R8 Input string Input string Numeric data R9 R10 code tree System Macro Dictionary routine parameter from the tree. pointer. pointer. count remaining. buffer. 190.49 $DS_CLIDEF Command Line Interpreter Definitions $DS_CLIDEF is a utility macro. It generates special charac definitions these for the CHAR symbols follows: parameter of the $DS_CLI ter macro. A code list of CLIS$K_ ERROR CLISK EXIT CLISK_BR CLISK BIT CLISK_SPACE CLISK NUM CLIS$K ALPHA CLI$K ALNUM CLISK_OCT CLIS$K DEC CLISK_HEX CLISK_STRING The macro does $DS_CLIDEF gbl = not a supervisor Not Applicable. routine. [gbl] GLOBAL or Return call Status LOCAL. Codes: 10.59 SDS_CLRVEC_x Clear a System Control Block Vector SnS_CLRVEQ_x is a supervisor service macro available to level 3 d-agnostic programs. The macro calls a supervisor routine that sets the routine system loads control the vector block in vector the for system supervisor control the contents of the corresponding vector in the that holds the initial contents of each vector). $DS_CLRVEC_x vector vector = Return Status the DSS$_NORMAL: absolute vector address. Codes Service successfully completed. 16-29 handling. block (SCB) SCB_IMAGE (a The with page VAX Diagnostic Design Guide $DS_CNTRLC_x Enable Control C Interception 16.51 $DS CNTRLC x is a supervisor service macro. It calls a supervisor service routine that enables the diagnostic program to intercept the next Control C typed by the operator. It provides the address of a routine for the supervisor to call on Control C. The routine sets an Enable flag. This flag remains set until a Control C is typed or until the flag is canceled by a call with a routine address of zero. If a routine has been specified when the next Control C is typed, the Enable flag is cleared and the specified routine is called. $DS_CNTRLC_x label the address for transfer of program control. label = Return Status Codes SS$ NORMAL: Service successfully completed. $DS_CVTREG_x Convert Register Bits to Mnemonics 19.52 $DS CVTREG_x is a supervisor service macro. It calls a supervisor service routine that converts the contents of a register to a counted ASCII string of mnemonics for inclusion in an error message. For every bit set in the register, the corresponding mnemonic is included in the ASCII string. If several bits in the register make up a function, the corresponding mnemonic, 1in the names of device registers mnemonics list, should be followed by "=n"R" or where, "=n@", n = the number of bit positions that make up the field. R the radix in which the function field should be printed. $DS_CVTREG_x msb, data, mneadr, strbuf, maxlen, [V1-6] msb = the most significant bit position. data = the address of the register contents in memory. mneadr = the address of a counted ASCII string of bit mnemonics. strbuf = the maxlen = the length of the buffer. V1-V6 = pointers address string is of the returned. to counted buffer where lists of counted Return Status Codes Service successfully completed. 10-30 ASCII strings defining function values specified with a mnemonic XXXXXX=n@. DS$ NORMAL: ASCII the in the form Diagnostic DS$ PROGERR: following This status code The number of ® The MSB greater The mnemonic is encountered ° A negative ° A bad ) returned arguments Some is than string with to any indicate of the is was was not equal exhausted to the and an right of encountered encountered in in the other than a comma mnemonics in the string. The ASCII ® The caller's buffer when DSS$ PROGERR code is cleared. The Notice that output buffer is format the address, no output 11. = sign it. has mnemonic the mnemonic character ° there to 32. nothing digit character separate that Dictionary conditions: ) ) is System Macro has been string. string. been used to overflowed. from overflowed. this is returned, 16 (AP), the zero in 16 (AP) indicates routine. NOTES l. 2. The first with the Rl mnemonic is associated bit position MSB. contains the full length of the string plus the count byte. This is true even if the buffer size is too short or the string is longer than 255 bytes. 16.53 $DS $DS DEFDEL DEFDEL Delete is a wutility Macro Definitions macro. It serves as a conservation mechanism for the assembly process. You should use the macro to delete the code generated by the symbol definition macros after the symbols have been defined. The macro does not call a supervisor routine. ' $DS_DEFDEL Return (no arguments) Status 19.54 Not Applicable. $DS_DEVTYP Device Types SDS DEVTYP type Codes: is names program. a and The utility macro. a string device type names recognized Paragragh 5.3.1.). of It generates P-table names, listed a string descriptors in the note, are in the ATTACH command (refer to No supervisor routine is called by 10-31 of known device to the the type Chapter 5, this macro. VAX Diagnostic Design Guide $DS_DEVTYP name, name = name,... generic device type. Return Status Codes: Not Applicable. NOTE Device Type Names KA780 MS780 RH780 DW788 RP@7 RPO6 RP@5 RP@4 RM@3 RK611 RK@7 Return Status Codes: | - RK0O6 TM@3 TE16 TU4S TU77 DZ11 DMC11 LP11 CR1l1 DR11B PCL11 Not Applicable. $DS_DISPATCH Initialize Dispatch Table 19.55 $DS DISPATCH is a utility macro. It generates the psect directive, beginning tag, address label, and ending tag for the dispatch table. The actual entries in the dispatch table are generated (at link time) by use of the $DS BGNTEST macro at the beginning of each test. No supervisor routine is called by this macro. $DS_DISPATCH (no arguments) Return Status Codes: 19.56 $DS_DSADEF Not Applicable. Define Supervisor, APT Command, and Mailbox Areas $DS DSADEF is a utility macro. It provides symbols that define CLI flags, command areas, and APT mailbox areas. The macro does not call a supervisor routine. $DSASAL APTMAIL is the base address of the APT mailbox. $DS_DSADEF gbl = [gbl] GLOBAL or Symbol DSASGL_FLAGS DSASM HALTD DSASM HALTI DSASM_LOOP DSASM BELL LOCAL. Description Longword containing flag bits the Halt on error detection Halt on error Loop on error Bell on error 19-32 isolation flag following Diagnostic System Macro Dictionary Description Inhibit all error reports Inhibit basic error reports Inhibit extended error reports Inhibit summary reports Quick verify - Symbol DSASM_IE1 DSASM IE2 DSASM_IE3 DSASM_IES DSASM_QUICK DSASM TRACE DSA$M_LOCK DSASM OPER Trace tests Lock in physical memory Operator present Display long dialogue DSASM_PROMPT DSA$M NORPT Suppress all output to the terminal DSAS$M USER DSA$M_PASSO User environment Pass 0 DSASM_APT APT mode flag Command Area Definitions DSASGL_APTCOM DSASGL_PASSES APT command DSASGL_UNITS Units to be tested Section number VAX CPU type code Passes DSASGL_SECTNO DSASGL_CPUTYP to run APT Mailbox Area Definitions DSASGL_MSGTYP DSASGL_ERRNO Message Error Event DSASGL_EVENT DSASGL_SUBTNO Subtest number Test number Pass number DSASGL_TESTNO DSASGL PASSNO DSAS$GL_DEVLEN Device descriptor DSASGL_DEVNAM Status 18.57 Not Applicable. Codes: $DS_DSDEF Define Supervisor $DS DSDEF is a utility error conditions. Many the codes represented return status. following length Device descriptor Message descriptor DSAS$GL_MSGPTR Return type number counter The symbols macro. supervisor by macro are Symbol DSS_WARNING DS$S_NORMAL DSS$S_ERROR DS$_SEVERE DS$S OVERFLOW It these does not Status and Condition Codes generates service symbols call a symbols routines in RO to supervisor generated: | Description warning normal error condition severe error condition overflow 19-33 that return denote one of indicate the routine. The VAX Diagnostic Design Guide Symbol Description DS$ NULLSTR null DS$ PROGERR program DS$ _TRUNCATE data truncation not done DS$ IVVECT invalid vector invalid address virtual address space full insufficient memory memory management off initial hardware error final hardware error interface error DS$ NOTDON DS$_IVADDR DS$ VASFUL DS$_INSFMEM DS$_MMOFF DS$_IHWE DS$_FHWE DS$ LOGIC DS$ ILLPAGCNT DS$ FRAGBUF DS$_MCHK DS$_KRNLSTK DS$_POWER DS$_TRANSL DS$_CHME DS$ NOTIMP DS$ _IPL2HI DS$ ICERR DS$ ICBUSY DS$ ARITH Return Status Codes: 10.58 string error illegal page count buffer was fragmented machine check kernel stack not when released valid power fail translation not valid change mode error not implemented IPL is too high interval clock error interval clock busy arithmetic trap Not Applicable. $DS DSSDEF Define Supervisor Service Entry Points $DS_DSSDEF is a utility macro. It generates symbols that define the supervisor service entry points for the diagnostic program. When a supervisor service macro is expanded, it generates a call to one of these entry points in the supervisor entry module. The $DS_DSSDEF macro generates the following symbols: DSSENDPASS DS SABORT DS$SBGNSUB DS SCKLOOP DSSESCAPE DSSWAITMS DSSCANWAIT DS SASKDATA DSSASKADR DS SASKSTR DSSPARSE DSSERRDEV DSSERRSOFT DSSPRINTX DSSPRINTS DS SELOGOFF DSSRELBUF DS SRELMEM DS SGPHARD DS $SUMMARY DSSENDSUB DSSINLOOP DS$BREAK DSSWAITUS DS SCNTRLC DS SASKVLD DS SASKLGCL DS SCVTREG DS SERRSYS DS SERRHARD DSSPRINTB DSSPRINTF DS SELOGON DSSGETBUF DS SGETMEM DS SMOVVRT 10-34 Diagnostic DSSMOVPHY DS SMMOFF DS SMMON DS$SSETVEC DSSSETIPL DS$SETMAP DS SCHANNEL DS $SHOCHAN DS$SCLRVEC SYSSALLOC SYSSASSIGN SYSSCANCEL SYSSCLREF SYSSBINTIM SYSSCANTIM SYS$SDALLOC SYS$SDASSGN SYSSGETTIM SYSSQIO SYSSREADEF SYSSSETIMR SYSSWAITFR SYS SWFLOR SYSSSETEF SYSSSETPRT SYSSWF LAND SYS SGETCHN macro does $DS_DSSDEF gbl = Return 16.59 call a supervisor Not Applicable. End of Cleanup Code service routine. [gbl] GLOBAL or Status LOCAL. Codes: SDS_ENDCLEAN SDS_ENDCLEAN cleanup not Dictionary DSSINITSCB SYSSQIOwW The System Macro code is a utility macro. section label, checks instruction. for of a diagnostic Control $DS_ENDCLEAN (no arguments) Return Codes: Status Not Use C, 19-35 program. and Applicable. Section the macro then at It the end produces produces a of an the exit return VAX Diagnostic Design Guide 10.60 $DS_ENDDATA End of Data Section $DS ENDDATA is a utility macro. Use this macro following the last item in the data section of a test routine. It provides a 1long word containing zeros at the end of the data section. It does not call a supervisor routine. $DS_ENDDATA (no arguments) Return Status Codes: Not Applicable. $DS_ENDINIT End of Initialize Code Section 10.61 $DS_ENDINIT is a utility macro. Use this macro to end the initialization section of a diagnostic program. It produces an exit label, checks for Control C, and then produces a return instruction. $DS_ENDINIT (no arguments) Return Status Codes: 10.62 Not Applicable. $DS_ENDMESSAGE End of a Global Error Report Sequence $DS ENDMESSAGE is a utility macro. Use this macro at the end of a global error message print routine. It produces a instruction. No supervisor routine is called by the macro. $DS_ENDMESSAGE (no arguments) Return Status Codes: 190.63 return Not Applicable. $DS_ENDMOD End of a Program Module e each $DS_ENDMOD is a utility macro. Use this macro to terminat er. assembl the to ves directi es generat macro The module. program No supervisor routine is called. $DS_ENDMOD (no arguments) Return Status Codes: Not Applicable. $DS_ENDPASS_x Indicate to the Supervisor that a Logical Pass is Completed $SDS_ENDPASS_x is a supervisor service macro. Use this macro in the initialization section of the program. The macro calls a service routine in the supervisor to mark the end of a pass of the diagnostic program. If the number of passes selected by the 16.64 operator have been run, the routine causes execution of the user summary and cleanup codes. $DS_ENDPASS_x (no arguments) Return Status Codes: None. 10-36 Diagnostic System Macro Dictionary 16.65 $DS_ENDREG End a Device Register Storage Area $DS_ENDREG is a utility macro. Use this macro to mark the end of a device register storage area. The macro produces no executable code and does $DS_ENDREG Return not (no Status call ‘a supervisor routine. arguments) Codes: Not Applicable. 10.66 $DS_ENDSERV End of Interrupt Service Routine | $SDS_ENDSERV Is a utility macro. Use this macro to mark the end of an interrupt service routine. When executed, it restores register RO and R1 and performs a return from interr upt instruction.’ ” $DS_ENDSERV (no arguments) Return Status 10.67 Codes: $DS_ENDSTAT Not End Applicable. of Statistics SDS_ENDSTAT is a utility macro. of the statistics section of produces no executable $DS_ENDSTAT Return (no Status code You and Section should use a diagnostic no calls to it to mark program. the The supervisor end macro routines, arguments) Codes: Not Applicable. 10.68 $DS_ENDSUB End of a Subtest SDS_ENDSUB is a utility macro. Use the subtest within message $DS in and sequence. notifies the routine also Return is at in subtest the program. 1In the time supervisor does operator and returns control checks for Control C. the end produces if the to within detect at macro addition, numbers routine macro The assembly found. routine the If $DS_ENDSUB 1listing macro service numbers diagnostic the BGNSUB RENDSUB a no each error corresponding macro check each of an calls both test the for the test correct a sequencing error, to the it mode. The command (no arguments) Status Codes: Not Applicable. 10.69 $DS_ENDSUMMARY End of Summary Report Sectio n SDS_ENDSUMMARY is a utility macro. Use this macro to mark of for to the summary report Control the C and generates calling routine. $DS_ENDSUMMARY Return section Status a of a diagnostic return (no arguments) Codes: Not Applicable. 19-37 program. instruction to the end It checks return control VAX Diagnostic Design Guide 10.79 $DS_ENDTEST End of a Test $DS_ENDTEST is a utility macro. Use this macro to mark the end of each test in a diagnostic program. The macro moves a 1 into R@ to indicate normal test completion. Then it checks for Control C, and executes an RET instruction to return (dispatch routine in the supervisor). to the test sequencer $DS_ENDTEST (no arguments) Return Status Codes: 18.71 1 in R#. $DS_ENVDEF Define Environment Codes $DS_ENVDEF is a utility macro. It defines symbols that can be used for the ENV argument of the $DS BGNMOD macro. The $DS_BGNMOD macro invokes the $DS_ENVDEF macro. The following symbols are defined. Symbol CEP_FUNCTIONAL CEP REPAIR SEP_FUNCTIONAL SEP_REPAIR Definition Cluster Environment Functional Cluster Environment Repair System Environment Functional System Environment Repair No supervisor routine is called by the macro. $DS_ENVDEF (no arguments) Return Status Codes: Not Applicable. $DS_ERRDEF Define Error Call Arglist Offsets 10.72 $DS ERRDEF is a utility macro. It defines symbolic arguments for the $DS ERRDEV, $DS ERRHARD, $DS _ERRSOFT, and S$DS ERRSYS macros. The following symbols are defined: Symbol ERRS NUM ERR$ UNIT ERR$ MSGADR Definition error number logical unit number header message address ERRS Pl ERRS P2 ERRS P3 ERRS P4 additional data additional data additional data additional data ERRS P6 additional data extended error print routine ERRS POINTER additional data ERRS P5 No supervisor routine is called by this macro. $DS_ERRDEF (no arguments) Return Status Codes: - Not Applicable. 10-38 Diagnostic 10.73 9DS_ERRDEV_x Print Device Fatal SDS_ERRDEV_x is a supervisor routine togenerate message a indicates the number, test and 3-line error program subtest $DS_ERRDEY_x'[num], service Error macro. and [unit], [msgadr], the version stamp. [prlink], Dictionary Information calls for and time Header It message title numbers, System Macro a supervisor operator. The number, pass [pl-6] a unique error number within the current subtest. NUM is initialized by the $DS BGNTEST and $DS BGNSUB macros and automatically sequenced when not specified. The num automatic sequencing of this parameter all its default uses in the macros $DS_ERRSOFT_x, and $DS_ERRSYS x. also $DS includes ERRHARD X, - - unit = the msgadr = the address of a counted ASCII string. This message is included in the third line of the error header message and should be a brief description of the error or a module call out message. prlink = the address of the the address of a logical unit information error by Return code the is at and the unit under reporting routine routine. to print error that this address has $DS_ENDMESSAGE. not test. This occurred. must be Halt to six optional parameters that may the error print routine. If specified, used in sequence. they one Status Codes: 1. of On this Error passed must to be None. NOTES R2 through R1l1 are preserved within this service by the supervisor and are intact when is executed. 2. be The surrounded Execution contingent on is supplemental the flag. = error code $DS BGNMESSAGE of closed about reporting section of pl-6 number the $DS_ERRDEV _x may not subtests. call be to used PRLINK between 10.74 $DS_ERRHARD x Print Hardware Error Header Information SDS_ERRHARD x is a supervisor service macro. It calls a supervisor routine message number, to generate a indicates the test and 3-line subtest error message program numbers, title and 10-39 and time for the version stamp. operator. The number, pass VAX Diagnostic Design Guide x [num], [unit], [msgadr], [prlink], [pl-6] $DS_ERRHARD a unique error number within the current subtest. NUM is initialized by the $DS BGNTEST and $DS_BGNSUB macros num — B automatically and sequenced when not specified. The automatic sequencing of this parameter also includes all its default uses in the macros $DS ERRDEV x, - x, and $DS_ERRSYS_x. $DS_ERRSOFT unit number of the unit under - test. unit the logical msgadr the address of a counted ASCII string. This message is included in the third line of the error header message and should be a brief description of the error or a prlink out message. call module This is the address of the error reporting routine. ntal suppleme print to routine the address of a closed The occurred. has that information about the error d surrounde be must address error reporting code at this this of Execution SSAGE. $DS_ENDME by $DS_BGNMESSAGE and siction of code is not contingent on the Halt On Error flag. one the used to six optional parameters that may be passed to error print routine. If specified, they must be in sequence. Return Status Codes: None. NOTES R2 through R1l1l are preserved within 1. this service by the supervisor and are intact when the call to PRLINK is executed. _x $DS_ERRHARD 2. may not be used between subtests. $DS_ERRNUM Insert Numeric Error Header Information $DS ERRNUM is a utility macro. It inserts an error number into an argument list at the label given. If an error number is not given, the next sequential error number will be used. The macro does not 19.75 call a supervisor $DS_ERRNUM label, routine. [num] attached label label num error number Return Status Codes: to to argument list. insert. Not Applicable. 10-40 Diagnostic NOTE $DS_ERRNUM that generates uses pointing System Macro Dictionary to executable (destroys) R@. LABEL. RO code is left 16.76 $DS_ERRSOFT_x Print Software Error Header Information $DS_ERRSOFT x is a supervisor service macro. It calls a supervis or routine message number, to generate a indicates the test and 3-line subtest (num], [unit], num unique error a is The and and number by includes the version the sequenced subtest. and when not its wuses 1in the and $DS_ERRSYS x. default this parameter unit number of the unit under msgadr = the of a counted third ASCII line of string. the and should be a brief description module call out message. prlink = the the information about reporting surrounded Execution Return = the Halt by of On one to the error used in Status message header the is message error or a address of the error reporting routine. This is address of a closed routine to print supple mental error pl-6 of also macros test. This error NUM BGNSUB specified. of $DS_ERRDEV_x, the $DS sequencing the logical in pass current BGNTEST = address The number, [pl1-6} unit included operator. stamp. [prlink], $DS automatically automatic all SDS_ERRHARD_x, time within the for and [msgadr], initialized macros message title numbers, $DS_ERRSOFT_x = error program error that has code at this address $DS this Error six the section flag. optional print BGNMESSAGE code parameters routine. sequence. Codes: of and If occurred. $DS is not that may The must be ENDMESSAGE. contingent be specified, passed they . must on to be None. NOTES 1. R2 2. SODS_ERRSOFT_x may between subtests. through R1l1l are preserved within this service by the supervisor and are intact when the call to PRLINK is executed. not be used : 16.77 9DS_ERRSYS_x Print System Fatal Error Header Inform ation $DS_ERRSYS x is a supervisor service macro. It calls a supervisor routine message number, togenerate a indicates the test and 3-line subtest error program numbers, message title and 10-41 and time for the version stamp. operator. The number, pass VAX Diagnostic Désign Guide x [num}, [unit], [msgadr], [prlink], [pl-6] $DS_ERRSYS num a unique error number within the current subtest. NUM sequenced when not specified. The - - is initialized by the $DS BGNTEST and $DS_BGNSUB macros automatically and automatic sequencing of this parameter also includes its default uses in the macros $DS ERRHARD x, all $DS_ERRSOFT x, and $DS_ERRDEV_x. unit the logical msgadr the unit number of the unit under address of a counted ASCII string. test. This message is included in the third line of the error header message and should be a brief description of the error or a module call out message. prlink the address of the error the reporting code. This is the address of a closed routine to print supplemental information about the error that has occurred. The error reporting code at this address must be surrounded by $DS_BGNMESSAGE and $DS_ENDMESSAGE. Execution of this iiction of code is not contingent on the Halt On Error ag. one to six optional parameters that may be passed to the error print routine. If specified they must be used in sequence. Return Status Codes: None. NOTES R2 through R11 are preserved within this service by the supervisor and 1. are intact when the call to PRLINK is executed. x may not be used between $DS_ERRSYS 2. - subtests. 19-42 Diagnostic 16.78 $DS_ESCAPE $DS_ESCAPE a is diagnostic a program check the status control passes to argument Program test. The of the Error the end of supplied. eliminate The Sequence It provides a macro conditional exit a supervisor routine calls escape the $DS_ESCAPE macro enables the programmer of certain portions of a program that those portions would be redundant sequence preserves from to If the Error flag is set, subtest or test, depending on the flag. execution testing indicates to fail. The Escape utility macro. System Macro Dictionary the contents of if and to prior bound R@. $DS_ESCAPE arg EEQ = TEST or SUB. Return Status 16.79 SDS_EXIT the last ARG). The Codes: Not Applicable. $DS_EXIT Unconditional Exit is a utility macro. It causes statement macro in does the not current call a an test unconditional or supervisor subtest branch to (depending on routine. $DS_EXIT arg arg = Return TEST, SuUB, Status 10.80 INIT, Codes: $DS_GETBUF CLEAN, Not SERV, MESSAGE, or SUMMARY. Applicable. x Get Virtual Memory Space $DS_GETBUF x is a supervisor service macro. It calls a supervisor routine (DSX$GETBUF) to obtain memory space for buffer areas. The memory space is allocated at the logical end of the program. In the standalone contiguous. The environment, the physical memory routine also checks for Control C. $DS_GETBUx F pagcnt, [retadr], pagcnt = of retadr = the the number address virtual phyadr = the of of two-longword start allocate to region = Return Status SSS$_NORMAL: a and two-longword end Page Virtual array to receive the array to receive the addresses. @=(default) P@g, 1=pl, Codes Service SS$_ILLPAGCNT: SS$_VASFULL: : desired. limits. of physical a memory successfully completed. count is address less space than 1. full. 19-43 1is [region] pages buffer address [phyadr], allocation 2=system space. VAX Diagnostic Design Guide NOTE 19.81 management is If memory be allocated only to P#. off, space may $DS_GPHARD x Get Hardware P-table Base Address $DS GPHARD x is a supervisor service macro. It calls a supervisor the entry in the address of to obtain the (RGPHARD) routine P-table associated with the given logical x unit, $DS_GPHARD retadr the logical unit the retadr unit number. longword unit number. to receive the base address of the P-table entry. Return Status Codes DSS$S NORMAL: Service DS$ ERROR: The elements, or the successfully completed. argument 1list does not contain exactly logical unit number specified is too large. two NOTE P-table entries are stacked reverse order. 19.82 in memory in $DS_HDRDEF Define Header Section Area is a utility macro. It defines absolute, addressable section area (the area defined by the header the for $DS_HDRDEF symbols $DS_HEADER macro). The macro defines the following symbols: Symbol LSL HEADLENGTH LSL ENVIRON L$A NAME Definition L$L UPDATE diagnostic engineering patch order first free location after program test dispatch table pointer device type list pointer LSL REV L$L_LASTAD LSL_DTP LSL DEVP LSL_UNIT L$A DREG L$A ICP L$A _CCP length of program the header data block environment program name text address program revision level number of units that can be tested device register contents table pointer address initialize L$A_ STATAB L$L_ERRTYP cleanup code pointer summary report code pointer statistics table pointer number of types of S$ERRSOFT L$A_SECNAM L$A TSTCNT list of pointer LSA REPP SERRHARD section name to number of addresses tests The macro does not call a routine in the supervisor. 10-44 and Diagnostic $DS_HDRDEF gbl = Return System Macro Dictionary [gbl] GLOBAL or Status LOCAL. Codes: Not Applicable. 10.83 $DS_HEADER Generate Program Header Section SDS HEADER 1s a utility macro. Use this macro at the a diagnostic program structure to the routine. to generate supervisor. $DS_flEADER pname, rev, a The macro [update]l, program name table does [nunit], Pname = the rev = the program release level update = the DEPO nunit = the maximum patch that defines not call [errtyp]l, beginning the a supervisor [stat] string. level number, number. number of types of error statistics table. units that can be concurrently. errtyp = ‘ stat Return the number of unit under = a Status of program that can occur tested on the test. pointer to Codes: Not Applicable. NOTES 1. REV and UPDATE are used as major and minor revision numbers and will be changed to MAJREV and MINREV in the future. 2. If STAT is STATISTIC; 1¢.84 to it must be $DS _BGNSTAT. $DS_HPODEF Deflne Hardware P-table Entry Offsets $DS HPODEF hardware specified refer is a utility macro. P-table, their symbolic supervisor. $DS_HPODEF allowing offsets. the The It defines offsets programmer macro does to not for the call routine a (no arguments) Return Status Codes: Not Applicable. 'NOTES l. Only device-independent defined. 10-45 items access offsets are in items in the with the VAX Diagnostic Design Guide 2. Symbol Description HP$Q DEVICE quadword descriptor of device HPSW SIZE total name size of P-table HP$B DRIVE unit number HPST DEVICE - ASCII device name with leading " max length = 11 characters device address for this UUT address used to directly address HPSA DEVICE HPSA DVA another UUT through this device address of P-table for HPSA LINK - device linking this to the CPU HP$W_VECTOR primary interrupt vector for device ASCIC hardware, type, HPST TYPE max length = 11 16.85 $DS_INITSCB x Initialize System Control Block $DS INITSCB x is a supervisor service macro. It calls a routine (DSXS$INITSCB), which sets the vectors in control block for supervisor handling. The routine byte image(SCB_IMAGE) into the system control block. $DS_INITSCB_x supervisor the copies system a 512 (no arguments) Return Status Codes $DS NORMAL: Service successfully completed. 16.86 $DS_INLOOPx Check for a Loop $DS_INLOOP x is a supervisor service macro. It calls a supervisor routine to test whether or not the program is 1oop1ng on an error. The routine sets the low bit of RO if the program is in a loop. It clears the low bit of R if the program is not in a loop. $DS_INLOOP_x (no arguments) Return Status Codes DS$ NORMAL: The program DS$S ERROR: The program is is in a not in loop. a loop. 16.87 SDS MMOFF_x Turn Memory Management Off $DS_MMOFF x is a supervisor service macro available to level 3 diagnostic programs only. It calls a supervisor service routine (DSXSMMOFF) that turns off memory management. $DS_MMOFF (no arguments) 10-46 Diagnostic Return Status Codes: System Macro Dictionary None. 19.88 = $SDS_MMON_x Turn'nemory Management On SDS_MMON_x is a supervisor service macro available to level 3 diagnostic programs only. It calls a supervisor routine (DSX$MM ON) that turns memory management $DS_MMON_x Return (no arguments) Status 16.89 Codes: None. $DS_PAGE Assembler SDS_PAGE is directive on. a wutility Page Control macro. It causes the .SBTTL assembler to appear as the first output line of the next assembler listing page when you use the $DS _SBTTL macro. The $DS PAGE macro inhibits the listing of the $DS_SBTTL macro call. If this were not done, the .SBTTL expansion would appear on the second line of the listing page. The assembler, therefore, would not recognize it for the heading on that page. The optional argument will cause the $DS PAGE macro to include a .PAGE directive if the NUM argument is 1. The macro does $DS_PAGE [num] hum @ or l indicates @, the = a supervisor 1. Status Codes: Not arguments for the macros of the the form the default. PARS_OCT PARS _DEC PAR$ HEX PARS NO PARS YES PARS _NODEF PAR$_ATLO PARS ATHI PARS_ATDEF supervisor $DS_PARDEF gbl = Return routine is called. [gbl] GLOBAL or Status Codes: LOCAL. Not LOCAL is Applicable. 10-47 radix and $DS_ASKxxxx_x. PARS BIN No generated. should not Applicable. 106.90 $DS_PARDEF Parameter Definitions $DS_PARDEF is a utility macro. It defines mask routine. that a .PAGE directive should be default, indicates that a .PAGE directive generated. be Return not call exception VAX Diagnostic Design Guide 10.91 $DS_PARSE x Parse $DS_PARSE_x'Ts a supervisor service macro. It calls a supervisor routine (DSXSPARSE) to parse an ASCII string in the buffer described, using a caller-supplied parse tree. When a match in the tree is found, the routine calls a caller-supplied action routine. Upon a mismatch, the supervisor routine branches to another point in the parse tree. $DS_PARSE x bufadr, tree, bufadr = the address tree = the address parsing. action = the DS$ ERROR: of address Return Status Codes DS$ NORMAL: Service a quadword of of the the descriptor tree action for structure the to buffer. be used parse tree. 1in routine. successfully completed. Error match DS$ OVERFLOW: action Numeric code was encountered input overflowed a in the quadword. NOTE You should with define successive the use tree of structure the $DS CLI macro. 10.92 $DS PRINTB x Print Basic Error Information $DS PRINTB x is a supervisor service macro. Use this macro in print subroutines called through one of the $DS ERRXXXX X macros to print basic extended print error information. routine in the The $DS supervisor. PRINTB x macro calls The supervisor uses formatted ASCII output (FAO) to compile a print it. Either of two supervisor control flags, set, will inhibit the printing of the message. $DS PRINTB x macro is used to print one 1line. $DS_PRINTB x message, the macros would be expected data, the used to received 10-48 print data, string and then IEl or IE2, when Typically, one Therefore, four the and the routine the explanatory XOR data. Diagnostic System Macro Dictionary $DS_PRINTB x fmtadr, [arg]l, fmtadr [arq]l,... the address of the control string. The of output fixed text a character the string descriptor pointing to control string consists of the string and the conversion directives. the directive parameter address or an of may the argument parameters contained in longwords. A a value that is to be converted, the string that is to be inserted, a length, be count, depending each directive in the control corresponding parameters. Up to supplied. Return Status Codes: on the directive. string there 16 arguments None. NOTE Refer to Chapter 9, Paragraph 9.6, of this manual and the VAX/VMS System Services Manual for FAO information. 10-49 may may For be be VAX Diagnostic Design Guide x Print a Forced Message $DS PRINTF 10.93 $DS PRINTF x is a supervisor service macro. Use this macro in print subroutines called through one of the $DS_ERRXXX_X macros to force the printing of error information. The SDS PRINTF x macro The supervisor calls the extended print routine in the supervisor. routine uses formatted ASCII output (FAO) then print it. The be message will [arg]l, largl,... to compile a string and printed regardless condition of the Inhibit Error flags in the supervisor. $DS_PRINTF_x fmtadr, fmtadr = of the the address of a character string descriptor pointing to the control string. fixed text of the The control string consists of the output string and the conversion directives. arg = the directive parameters contained in longwords. A parameter may be a value that is to be converted, the address of the string that is to be inserted, a length, or an argument count, depending on the directive. For each directive in the control string, there may be Up to 16 arguments may be corresponding parameters. supplied. Return Status Codes: None. NOTE Paragraph 10.6, Refer to Chapter 16, of the VAX/VMS System and this manual FAO for Services Reference Manual information. $DS_PRINTS_x Print Summary Report 19.94 $DS_PRINTS_x is a supervisor service macro. Use this macro in the summary routine to print a summary report. The macro calls the extended print routine in the supervisor. The supervisor routine uses formatted ASCII output (FAO) to compile a string and then in the print it. If the IES control flag (inhibit summary) printed. be supervisor is set, the summary report will not x fmtadr, $DS_PRINTS_ fmtadr = [argl, [arg]l,... the address of a character string descriptor pointing to the control string. fixed text of the The control string consists of the output string and the conversion directives. arg = the directive parameters contained in longwords. A parameter may be a value that is to be converted, the address of the string that is to be inserted, a length, or an argument count, depending on the directive. For each directive in the control string, there may be corresponding parameters. Up to 16 arguments may be supplied. ' 10-50 Diagnostic Return Status Codes: System Macro Dictionary None. NOTE Refer to Chapter 9, Paragraph 9.6, of this manual and the VAX/VMS Systenm Services Reference Manual for FAO information. 14.95 $DS PRINTX $DS_PRINTX x is print a x Print subroutine called macro should used basic error be message, failing Extended supervisor by to one of print such Error service Information macro. the Use this $DS ERRXxXxX information that as: X macro in a macros. The supplements the addresses device register contents channel register contents additional If the explanations. any of the supervisor control flags service will not print the message. $DS_PRINT x fmtadr, fmtadr = the [arg], address of the control fixed text = the a address or an each may of the argument Return Status Codes: a value string that count, in contained that is is to in be is set, longwords. converted, to be inserted, depending on the the control parameters. supplied. IE3 string descriptor pointing to The control string consists of the output string and the conversion parameters be directive corresponding or character string. of the directive parameter IE2, [argl,... directives. arg IE1, Up string to 16 a A the length, directive. For there may be arguments may be the bit None. NOTE Refer to Chapter 9, Paragraph 9.6 of this manual and the VAX/VMS System Services Reference Manual for FAO information. 16.96 $DS_PSLDEF SDS_PSLDEF mask No positions supervisor $DS_PSLDEF gbl is a = Processor utility macro. and the routine mode is Status It bits in called. [gbl] GLOBAL or LOCAL. 18-51 Longword defines the the Definitions symbols processor for status longword. VAX Diagnostic Design Guide The following symbols are defined: PSL$M CBIT PSL$M VBIT PSL$SM ZBIT PSL$M NBIT PSL$K KERNEL PSLS$K EXEC PSL$K_SUPER PSL$K_USER. Return Status Codes: 10.97 Not Applicable. $DSRELBUF_x Release Buffer Space $DS_RELBUF_X is a supervisor service macro. It calls a supervisor routine to release a buffer area in memory from program control. x pagcnt, $DS_RELBUF [retadr], pagcnt = the number of pages. retadr = the region = address of from: @ a [region] two-longword deallocated buffer limits. release = (default) PO, array to Pl, 2 1 = receive | = system space. Return Status Codes SS$ NORMAL: Service successfully completed. DS$ FRAGBUF: Buffer was not contiguous. is less than l. SS$ ILLPAGCNT: Page count SS$ PAGOWNVIO: Page is owned by more privileged access mode. 10.98 $DS_SBTTL Specify Test or Subtest Subtitle $SDS SBTTL is a ut111+y macro. It generates an assembler directive to provide the given subtitle, with the diagnostic test or subtest name included, for the assembly listing. No supervisor routine is Use this macro only at the beginning of each test and called. Use the normal assembler subtitle directive subtest in a program. (.SBTTL) in all $DS_SBTTL ascii, ascii = align = other cases. [align] a subtitle string; maximum length = 58. the psect alignment of the test (default = PAGE). Return Status Codes: Not Applicable. 18-52 Diagnostic System Macro 16.99 SDS_SCBDEF System Control Block Definitions $DS_SCBDEF is a utility macro. It defines symbols for control block $DS_SCBDEF vector offsets. No supervisor routine {gbl] gbl = The following GLOBAL or LOCAL symbols (default are = LOCAL). defined: SCBSL_ZERO SCBSL_MACHCHK SCBSL_POWER SCBSL_OPCDEC SCBSL_KNLSTK SCBSL_OPCCUS SCBSL_TBIT SCBSL_BREAK SCBS$SL_ROPRAND SCBSL_TRANSL SCBSL_COMPAT SCBSL_CHME SCBSL_RADRMOD SCBSL_ARITH SCBSL_CHMS SCBSL SFTLVL1 SCBSL_SFTLVL4 SCBSL_SFTLVL2 SCBSL_SFTLVL5 SCBSL_SFTLVL1@ SCBSL_SFTLVL1l SCBSL_SFTLVL7 SCBSL_SFTLVL13 SCBSL_TIMER Return Status SCB$L _SFTLVLS SCBSL_SFTLVL14 SCBSL RXDB Codes: Not SCBSL_ACCESS SCBSL_CHMK SCBSL_CHMU SCBSL_SFTLVL3 SCBSL_SFTLVL6 SCB$L_SFTLVL9 SCBSL SFTLVL12 SCBS$L SFTLVL15 SCBSL_TXDB Applicable. 19-53 is Dictionary the system called. VAX Diagnostic Design Guide 19.100 $DS_SECDEF Section Definitions $DS_SECDEF is a utility macro. Use the macro to define the test sections in each program source module. Use this macro in all No supervisor routine program modules except the header module. is called. arg, $DS_SECDEF arg, arg = argy... section name. Return Status Codes: Not Applicable. NOTE The order of arguments here must be the same as the order of arguments in the $DS_SECTION macro in the header module. 19.101 $DS_SECTION Section Definitions Table It generates a utility macro. $DS SECTION ts a table of ASCII section names used to define the test sections for the supervisor. These section names should be used with the $DSBGNTEST macro to This macro should be used show which section the test belongs to. module. No supervisor header the of in the program text section ‘ routine is called. arg, $DS_SECTION arg, arg = section arg,... name. Return Status Codes: Not Applicable. NOTE The order of arguments here must be the same as the order $DS_SECDEF macro. of arguments in the $DS_SETIPL_x Set Interrupt Priority Level 19.102 $DS_SETIPL _x is a “supervisor service macro. Use this macro raise the IPL to block interrupts from the device under test. to x level $DS_SETIPL level = interrupt priority level. Return Status Codes DS$ NORMAL: 190.103 Service successfully completed. $DS_SETMAP_x Set Channel Adapter Mapping $DS_SETMAP_x is a supervisor dlagnostlc programs only. It mapping for I/0O transfers. service macro available to level 3 enables you to set channel adapter $DS_SETMAP_x unit, func, phyadr, [mapbas], 19-54 [bytcnt], [datpth] Diagnostic System Macro Dictionary unit = func = the logical the function mapping phyadr = unit the to be address number. code symbol performed. of a specifying See the two-longword physical buffer start and these will be the start and a $DS_GETBUF x macro call. mapbas = the adapter map symbols register array the type listed of below. describing the end addresses. Normally end addresses returned by address. For the UBA (DW780) this parameter corresponds to the upper nine bits of the Unibus address (bits 17:09) to be used in the base address (BA) register of the desired device. The number supplied for the MAPBAS parameter to the UBA should be in the range of @ to 495 (decimal). the MBA (RH780) current For map register map bytcnt register. MAPBAS default parameter bits for 16:89 MAPBAS is of selects the the virtual =zero. the positive byte count (used for the MBA only). This field is ignored when the UBA is used. However, the field is checked for validity regardless of the adapter datpth Function The the through type to the UBA data when the MBA arg ument be used. path is number used. (0-15). This field is symbols: Symbol Function CHMS FORWARD Pr ime the adapter for a forward operation CHM$_ REVERSE Prime the adapter for a reverse operation CHMS INVALIDATE Invalidate CHM$ MAP Set CHM$ OFFSET Mapping CHMS MFWDV requested Do not the map entries mapping byte all requested Prime CHM$_ MFWDN with Invalidate Set all map offset entries mapping adapter invalidate for Do Do not not Prime invalidate set the forward any map Set requested mapping Prime the adapter for CHM$ NFWDN a a entries forward any map operation operation entries mapping adapter 19-55 for a forward operation ignored VAX Diagnostic Design Guide CHM$ MREVV Invalidate all map entries Set requested mapping Prime the adapter for CHMS MREVN Do not invalidate Do not set -Prime CHM$ MFWDVO the CHMS$ MFWDNO Do the not for a CHM$ MRE VNO invalidate operation entries for with a byte forward operatlon any map entries with byte forward offset (UBA operation all map entries Set requested mapping with byte offset only) Prime adapter for a reverse operation (UBA not mapping for invalidate with reverse byte operation any map entries successfully completed. Program is adapter error. out of The range specified byte count DS$ IHWE: Adapter hardware error mapping was performed. The error the mapping will be performed. buffer (@ is address through too 225 large. is An error has been found while trying hardware P-table with the logical unit argument. $DS_SETVEC x Set System Control is a supervisor out MBA, of range, 0 through 495 status was encountered before the conditions must be cleared before DSS ERROR: $DS_SETVEC x (UBA (UBA Return Status Codes DS$ NORMAL: Service 190.104 offset offset Do address entries reverse mapping requested only) Prime the map adapter Invalidate Set or any map Set requested mapping only) Prime the adapter for a CHM$ MREVVO UBA), all requested only) Prime base operation mapping adapter Invalidate Set the reverse Do not invalidate any map entries Set requested mapping Prime the adapter for a reverse operation CHMS NREVN DS$ PROGERR: a to associate a Block service macro available only to level 3 diagnostic programs. It calls a supervisor routine (DSX$SETVEC) to load the address of an exception or interrupt routine into the system control block, setting a system control block vector for » program control. 16-56 Diagnostic System Macro Dictionary $DS_SETVEC_x vector, vector = isradr, [code] the absolute vector isradr the virtual address code @ Return or Status 1; 0 = kernel address. of the stack; service 1 = routine. interrupt Codes DS$_NORMAL: Vector modified. DSS IVADDR: Service address DSS_IVVECT: Invalid vector. DSS ICBUSY: Interval bits <1:08> are not zero. clock busy. 16.105 $DS_SHOWCHANx Show Channel Registers SDS SHOWCHAN x is a supervisor service macro "level 3 diagnostic (DSX$SHOWCHAN) programs. that displays It calls a available supervisor only to routine on the operator's terminal the and the status register for the channel status indicates errors that require the configuration register use. If the adapter display stack. in of additional registers, those registers will also be displayed. For example, if the status indicates an invalid map, the relevant map register will be displayed. The display for each register contains the register mnemonic, the physical address of the the register, the register register contents. contents, and a mnemonic description of $DS_SHOWCHAN x unit unit = Return a logical Status DS$ NORMAL: DSS number. Codes Service PROGERR: hardware unit An successfully completed. error has been found while trying with the logical unit argument. P-table $DS_STRING Generate ASCII String $DS_STRING is a utility macro. It generates to associate a 16.106 prov1d1ng a zero an ASCII byte. $DS_STRING No strlng count, supervisor text, and routine is [locsyml], [locsym2] string be an called. text = ASCII locsyml = address of an ASCII string. locsym2 = address of an ASCIZ string. Return Status Codes: to generated. None. 16-57 a ASCII quadword string descriptor, terminated by VAX Diagnostic Design Guide 10.107 $DS_SUMMARYx Execute the Summary Report Section $DS_SUMMARY x is a superv1sor service macro. It calls a supervisor routine which, in turn, calls a user summary report routine print out a summary message. The summary report routine normally called at the completlon of program execution. to 1is (no arguments) SDS_SUMMARI_x None. Return Status Codes: 19.108 $DS_WAITMSx Millisecond Delay $DS_WAITMS x is a supervisor service macro. It calls a supervisor service routine that suspends program execution for a number of milliseconds equal to ten times the number specified. x time, $DS_WAITMS time = the number the rettim [rettim] of 1longword millisecond 10 millisecond address units. to units. receive unused time in 190 Return Status Codes DS$ NORMAL: DS$ ICERR: DS$ Service successfully completed. Interval error. clock PROGERR: Negative time interval specified. SS$ EXQUOTA: Multiple time function error. NOTES l. Interrupts can occur. 2. The wait function prematurely. 3. Wait functions may not be nested. can be terminated $DS_WAITUSx Microsecond Delay 16.109 $DS_WAITUS X is a supervisor service macro. It calls a supervisor routine that suspends program execution for a number of microseconds equal to ten times the number specified. x time, $DS_WAITUS time rettim = [rettim] the number the longword microsecond Return Status Codes DS$ NORMAL: Service of 10 microsecond address units. to units. receive successfully completed. 19-58 unused time in 10 Diagnostic System Macro Dictionary DSS$_ICERR: Interval DS$_PROGERR: Negative specified. SS$ QUOTA: clock Multiple error. (or time less than function overhead) time interval error. NOTES 19.116 l. Interrupts 2. The 3. Wait can occur. wait function prematurely. can be functions may not $SDS_S$DECIMAL Retrieve terminated be nested. and Range Check a the field Decimal Number $DS_SDECIMAL prompt, low, high prompt = low = the ASCIC name of used as operator, if the 1limit for the parameter 1limit for the parameter low = the high operator. Use this P-table decimal wvalue. current VALUE. 16.111 $DS_$END $DS_SEND (no descriptor bit = a byte < 65536 a bit bit, Use = this P-table. in the supplied by the supplied by the to prompt the operator for a check, the value becomes the to mark from the end of the P-table @ < OFFSET the P-table from the base of the P-table. ‘ displacement 8 the size the P-table. P-table macro size offset parameter. size macro range Extract a Field $DS_SFETCH offset, = the Finish Processing P-table $DS_$FETCH offset for arguments) Use this P-table descriptor. 10.112 descriptor the After prompt ' operator. high a needed. of < BIT the 0 the beginning of the OFFSET 255, field < descriptor The parameters P-table. from < SIZE (in < 32 macro to OFFSET, BIT, 10-59 bits) to be extracted extract a field and specify | SIZE from from the the field VAX Diagnostic Design Guide Number a Check Range $DS_SHEXADECIMAL Retrieve and 16.113 Hexadecimal $DS_S$SHEXADECIMAL prompt, low, high prompt = low = the ASCIC the 1low if needed. operator, used as a field name of the prompt for the 1limit for the parameter supplied by the 1limit for the parameter supplied by the operator. the = high high operator. Use this P-table descriptor macro to prompt the operator for a After the range check, the value becomes the hexadecimal wvalue. current VALUE. $DS SINITIALIZE Start P-table Processing 16.114 $DS_INITIALIZE device, length, max, driver device = the hardware name for length = the total max = = Use the maximum number the two-character QIO descriptor macro (as allowable should on a P-table descriptor e.g., RP@6 or DW784. associated P-table. unit be number zero TTM03). argument should be null this 16.115 the This allowed driver length of the device, if a device if in the device name. unit number is driver name. This the P-table it is not applicable. the as of first not macros. $DS_$LITERAL Define a Constant Value $DS_SLITERAL value value = a constant. Use this P-table descriptor macro to create a constant value for VALUE from the program, if there is no need to retrieve a value from the operator. ' 10.116 $DS_SOCTAL Retrieve and Range Check an Octal Number prompt = low = $DS_$OCTAL prompt, low, high the ASCIC the low operator, name of field the if needed. used as a prompt for the limit for the parameter supplied by the 1limit for the parameter supplied by the operator. high = the high operator. ' 10-60 Diagnostic System Macro Use this octal P-table value. descriptor After the macro range to check, the VALUE. 10.117 $SDS SSTORE 1Insert a Value $DS_$STORE offset, offset = bit = bit, a bit size = 10.118 the of 8 $DS_SSTRING prompt = Use prompt, the strings = this < name a valid of ) It can of < of the the @ < OFFSET P-table. beginning of the OFFSET 255. (in bits) be inserted 32. and Verify an ASCII the field macro into the for the String used as a prompt macro to prompt the operator for an scans the input stream for a matching the converted binary characters variable character string into an output string. data values in an into output (filename, for Convert binary values into the ASCII representations of their decimal, hexadecimal, or octal equivalents and substitute the results into an output string. = the [outlen], outbuf, address of a [pll, character to the control string. the fixed text of directives. outlen an current strings. and returns be used to: Insert for the the P-table $FAO _x Formatted ASCII Output is a VMS system service. It converts $FAO_x ctrstr, ctrstr becomes descriptor The example) ) from < needed. ASCITI characters string. value operator strings if list base field SIZE Retrieve ASCIC P-table the BIT the < operator, ASCII string. string. 16.119 $FAO x @ size $DS_$STRING from displacement P-table. into the size a byte offset < 65536. parameter. prompt Dictionary = the address the output The the [p2]..., string [pn] descriptor control pointing string output consists of string and FAO | of a string word to receive returned. 190-61 the actual - length of VAX Diagnostic Design Guide 3 O | | i e ] = outbuf the address of a character string descriptor pointing The fully the output buffer. to string is returned in this buffer. output formatted the directive parameters contained in longwords. Depending on the directive, a parameter may be a value is that count. to Each be inserted, directive require a corresponding in a or 1length, the control parameter or an argument string parameters. may Return Status Codes SS$ NORMAL: Service successfully completed. SS$ BUFFEROVF: output string truncated. SS$ BADPARAM: control string. Service successfully completed. The formatted overflowed the output buffer, and has been An directive invalid specified was 1in the FAO NOTES 1. S macro form uses a PUSHL The $FAO instruction for all parameters (Pl in the macro coded through Pn) is 1literal a If instruction. specified, it must be preceded with or character (#) a number sign loaded into a register. 2. A maximum of 20 parameters can be macro S$FAO_x the in specified than more If instruction. parameters are required, use x macro. $FAOL 3. The FAO 240 the executes at before it system service are accessible the access mode of the caller and address whether check not does arguments executes. Therefore, an access exception an causing violation condition occurs if an input field cannot be read or, in some cases, if an invalid length is specified. 16.119.1 FAO Directives An FAO directive has the format: I1DD ! (exclamation mark) indicates that the following character or characters are to be interpreted as an FAO directive. 10-62 Diagnostic System Macro Dictionary DD is a to perform. 1 or 2 parameters using a A on the indicating call to may FAO. action that one more Directives letters. may the require or must be FAO is input specified include: count output count code directive directive repeat An repeat Each uppercase Optionally, A character field is coded length as follows: !'n(DD) where n is a decimal directive for An field output the value indicating specified length is number of specified that FAO is to FAO to repeat the place the parameters. as follows: !lengthDD where length output characters A as is a decimal resulting in directive shown the may from value instructing a directive output into a count and string. contain both a repeat below: field an of length output 1length, !n(lengthDD) Repeat counts and output field 1lengths may be specified as variables by using a # (number sign) in Place of an absolute numeric value. If a # is specified for a repeat count, the next parameter passed to FAO specified for an output contain the length value. If a variable count, will only have the 16.119.2 An FAO output one FAO Control string contain 1length, - field length specified control must field 1length parameter is length. the the is specified required. String and Parameter any length If a $ parameter M may be count. next with Each is must a repeat output string Processing and may contain any number of FAO directives. The only restriction is on the use of the character (ASCII code X'21') in the control string. If a literal is required in the output string, the directive 1! provide s it. When FAO processes part of a directive directive, directive next a directive is is encountered, FAO is control terminates valid, consecutive and string, written it and if parameters it is into each character the output validated. returns an error requires one specified 16-63 are If it is status or more analyzed that is buffer. not code. a valid If parameters, and not When a ! ! the the processed. VAX Diagnostic Design Guide FAO reads parameters from the argument list. It does not check the enough number of arguments it has been passed. If there are not reading e continu will FAO parameters coded in the argument list, a past the end of the list. It is your responsibility, when coding satisfy to ers paramet enough call to FAO, to ensure that there are the requirements of all the directives in the control string. Table 106-1 summarizes FAO the directives parameters required by each directive. Table 16-1 and the 1lists Summary of FAO Directives Character String Substitution Parameters* Directive | Function !AC Insert a counted ASCII string. Address of the string; the first byte must contain the length. 1AD Insert an ASCII string. 1. Length of string ! AF Insert an ASCII string. Replace all nonprintable 1. Length of string 2. Address of string ASCII codes with periods 2. Address of string (')o !AS Insert an ASCII string. Address of quadword character string descriptor pointing the string. to Numeric Conversion (zero-filled) !10B !OW Convert a byte to octal. Convert a word to octal. 10-64 Value to be converted to ASCII representation. Diagnostic Table Directive 10—-1 Summary of FAO System Macro Dictionary Directives Function (Cont) Parameters* Convert a longword Convert a byte to octal. to For byte or word conversion, FAO uses only the low-order byte or word of the longword hexadecimal. Convert a word to hexadecimal. Convert a longword to parameter. hexadecimal. Convert an unsigned decimal byte. Convert an unsigned decimal Convert an longword. unsigned decimal word. Numeric Conversion (blank-filled) Convert byte. an Convert an unsigned decimal !UL Convert an longword. unsigned decimal Directive Function !SB Convert byte. Convert word. 'UB 'Uw unsigned decimal Value to ASCII representation. be converted to word. ! SW !SL Convert Parameters* a signed decimal a signed decimal a signed decimal For byte or word conversion, FAO uses only the low-order byte or word of the longword parameter. longword. Output 1/ String Formatting Insert new line Insert a tab. Insert a form (CR/LF). None feed. Insert an exclamation mark. Insert 'S' if most recently converted numeric value is not 1. Insert the system time. Insert the system date and time. 10-65 Address of a quadword value to be converted to ASCII. If 0 is specified, the current system time is used. VAX Diagnostic Design Guide Table 16-1 Summary of FAO Directives (Cont) Directive Punction Parameters* I n< 1> Define output field width of "n" characters. Format all data and directives within delimiters, < and > left-justified, and blankfilled within the field. None In*c Repeat the character C None the Parameter output n in times. Interpretation 1- Reuse the last parametér in the 1+ * string list. Skip the the If a list. variable None next repeat is specified with a and/or 1length must directive. 10.120 parameter count in and/or None a variable output field length directive, parameters indicating the count precede other parameters required by the $FAOL x Formatted ASCII Output with List Parameter The Formatted ASCII Output with List Parameter macro provides an alternate way to specify input parameters for a call to the FAC system service. $SFAOL x ctrstr, [outlen], outbuf, prmlst ctrstr = the address of a character string descriptor pointing to the control string. The control string consists of the fixed text of the output string and conversion directives. | outlen = | the address of a the output string outbuf = the address of a word to receive returned. character string the output buffer. The fully returned in this buffer. prmlst = parameter list exists in a program be extracted. may and be a from 190-66 list data actual descriptor formatted the address of the parameter used as Pl through Pn. The the of pointing output string longwords structure which length certain that values to of to is be already are to Diagnostic System Macro Dictionary Return Same Status as for 16.121 FAO system service. $SGETCHN x Get I/0 Channel Information SGETCHN x is a VMS system service macro available only to and 2R diagnostic programs. It calls a VMS service that information about assigned. Two sets In a of device to which an I/0 channel information may be requested. 1. The primary device 2, The secondary most cases, the two 1. If the device been characteristics. sets two has characteristics. device identical. However, the the following cases: level 2 returns of sets characteristic provide information different are information in has an associated mailbox, the primary are those of the assigned device and the characteristics are those of the associated characteristics secondary mailbox. 2. If the device is a spooled device, the primary characteristics are those of the intermediate device and the secondary characteristics are those of the spooled device. 3. If the devicé represents a logical the the secondary link. SGETCHN_x chan, chan = the characteristics channel by service. information about ' [prilen], returned 1link on the network, contain [pribuf], number. the The Assign [seclen], channel I/0 [secbuf] number Channel _ of a device (ASSIGN) is system Prilen = the address of a word to primary characteristics. pribuf = the address of a character string descriptor pointing to the buffer that is to receive the primary device characteristics. An address of 0 (the default) implies that no buffer is specified. seclen = the address secondary secbuf = of a word to characteristics. receive receive the the length length of of the the the address of a character string descriptor pointing to the buffer that is to receive to secondary device characteristics. An address of # (the default) implies that no buffer is specified. 10-67 VAX Diagnostic Design Guide Return Status device The Service successfully completed. SS$ BUFFEROVF: has and provided buffers the overflowed has information returned been truncated. SS$ NORMAL: Service successfully completed. SS$ ACCVIO: A buffer descriptor cannot be read, or a buffer or buffer length cannot be written, by the caller. SS$ IVCHAN: An invalid channel number was specified. That is, a channel number of @ or a number larger than the number of channels available. SS$ NOPRIV: The specified channel is not assigned, or was assigned from a more privileged access mode. Privilege Restrictions The Get I/O Channel Information service can be performed only on assigned channels and from access modes that are equal to or more privileged than the access mode from which the original channel assignment was made. NOTE The Get I/0 Device Information (GETDEV) same the returns service system Channel I/0 Get information as the Information system service. Format of Device Information The GETCHN and GETDEV system services return information in a user-supplied 53-byte buffer. Symbolic names defined in the $DIBDEF macro represent offsets from the beginning of the buffer. The field offset names, lengths, and contents are listed below. Field Name Length DIBSL DEVCHAR DIBSB DEVCLASS DIB$B_TYPE DIBSW DEVBUFSIZ 4 1 1 2 DIBSW_UNIT 2 DIBSL DEVDEPEND DIBSW DEVNAMOFF DIBSL PID Contents (bytes) 4 2 4 Device Device Device Device characteristics class type buffer size Device dependent information Unit number Offset to device name string of identification Process device owner DIBSL_OWNUIC DIBSW VPROT DIBSW_ERRCNT 4 2 2 User identification code Volume protection mask Hard error count for device DIBSW VOLNAMOFF 2 Offset to volume label string DIBSL OPCNT 4 Operation count 10-68 Diagnostic The device buffer offset Any name string as counted values. fields and ASCII volume label strings and System Macro string must are be Dictionary returned 1located in by the their ‘ inapplicable to a particular device are returned as zeros. For further details device-dependent User's Guide. 16.122 the contents of information on returned, refer this to buffer, the and on VAX/VMS I/O $GETTIM x Get Time $SGETTIM x is a VMS system service macro. It that gives the current system time in the suitable for input to the Set Timer (SETIMR) calls a VMS service 64-bit system format system service. x timadr $GETTIM timadr = the address of time in 64-bit Return Status that is to receive the current Codes SS$ NORMAL: Service SS$ ACCVIO: The the a quadword format. successfully completed. quadword to receive caller. 10-69 the time cannot be written by VAX Diagnostic Design Guide 16.123 S$HIBER S Hibernate The Hibernate macro calls a VMS system service that allows a process to make itself inactive but to remain known to the systenm, so that it can be interrupted, for example, to receive ASTs. A Hibernate request is a wait-for-wake-event request. When a wake is issued for a hibernating process with the Wake system service, the process continues Hibernate call. $HIBER_S Return execution at the instruction following the (no arguments) Status SS$ _NORMAL: Codes Service successfully completed. NOTES 1. A hibernating swapped it is out not of process the locked can balance into the set be if balance set. 2. The wait state caused by this system service can be interrupted by an asynchronous system trap (AST) if (1) the access mode at which the AST is to execute is equal to or more privileged than the access mode from which the hibernate request was issued and 3. (2) the at that process is enabled access mode. If one issued or more wakeup requests are for the process while it is not hibernating, for ASTs the next Hibernate call returns immediately. That is, the process does not hibernate. No count is maintained of outstanding wakeup requests. 4. Only the S macro form is prov1ded for the Hibernate system service. 16.124 $QI0_x Queue I/0 Request $QI0O_x is a VMS system service macro available only to level 2 and 2R diagnostic programs. It calls a VMS service that begins an input or output operation. The service queues a request to a channel associated with a specified device. Control returns immediately to the calling program. The program can synchronize I/0 completion 1. 2. in Specify any of three ways. the the address of an AST routine I/0 operation is completed. that when Wait for a set. specified event 10-79 flag to be is to execute Diagnostic System Macro Dictionary 3. Poll the specified I/0 status block for a completion status. The service clears they are specified, $QI0 x [p31, efn, [p4l, efn = chan = chan, [p5], the event flag and the I/0 status before it queues the I/0 request. func, [p6] [iosb], [astadr], [astprm], | block, ([pl]l, if [p2], the number of the event flag that is to be set at request completion. If the event flag number is not specified, the default value of 8 will cause errors in the supervisor. the number directed. of the Use I/0 the channel ASSIGN to which service the to request obtain is this number. func = the function operation to code be and modifier performed. bits The that code specify the 1is expressed symbolically. For reference purposes, the function codes are listed in the following notes. Details on valid I/0 function codes and the parameters required by each are documented in the VAX/VMS 1I/0 User's Guide. iosb = the address of the quadword 1I/0 status to receive final completion status. astadr = the entry point address of the AST routine to be executed when the 1I/0 operation is completed. TIf specified, the AST routine executes at the access mode from which astprm = the AST the QIO service was to parameter be block that is requested. passed the to service AST routine. Pl to p6 = optional request The device-specific and function-specific 1I/0 parameters. first parameter may be specified as Pl or PlV, depending on whether the function code requires address or a value, respectively. If the keyword not used, Pl is the default. That is, the argument considered an an Iis is address. P2 through P6 are always interpreted as values. If they are to be used as addresses, preface the numbers with Return Status SS$ NORMAL: was §. Codes Service successfully successfully completed. queued. 19-71 The I/0 request packet VAX Diagnostic Design Guide SS$ ACCVIO: The I/O status block cannot be written This status code may also be returned device-dependent function codes are specified SS$ EXQUOTA: The direct I/0 quota Resource exceeded SS$ An SS$ INSFMEM: caller. if parameters incorrectly. for process has exceeded its buffered I/0 quota or and has disabled resource wait mode with the Set Wait Mode (SETRWM) its AST limit quota ILLEFC: by the illegal event Insufficient system service. Or, the or buffer space quota. flag system number was dynamic process specified. memory is available complete the service, and the process has disabled resource mode with the Set Resource Wait Mode (SETRWM) system service. SS$ IVCHAN: channel An to wait channel number was specified. That a number larger than the of channels The specified channel does privileged access mode. not exist, or was assigned with the cluster number invalid has of @ or number is, a available. SS$ NOPRIV: from a more SS$ UNASEFC: The process is containing the specified event SS$ ABORT: A network logical not associated flag. link was broken. Privilege Restrictions The Queue I/0 Request system service can be performed only on assigned I/0 channels and only from access modes that are equal to or more privileged than the access mode from which the original channel assignment was made. | Resources Required/Returned 1. Queued I/0 requests e process's quota process's quota e 2. the the the process's routine is use AST three quotas: for buffered I/0 or direct for buffer space 1limit specified. quota, if an AST 1/0 service System dynamic memory is required to construct a data base to queue the I/0 request. Additional memory may be required on a device-dependent basis. NOTES 1. The specified if the queuing event flag is service terminates an I/0 request. 19-72 set even without Diagnostic System Macro Dictionary 2. Refer to 9.3.3.4 for status block Chapter 9, information format. Paragraph on the I/0 3. Many services return character string data, and write the length of the data returned in a word provided by the caller. Function codes for the QIO system service require length specifications in longwords. If 1lengths returned by other services are to be used as input parameters for QIO requests, a longword should be reserved to ensure that no error occurs when QIO reads the length. 4. Por information and see output operations on a network, the VAX-11 DECnet User's Guide. 5 The queue on I/0 special features functions. performing service for input provides diagnostic Diagnostic operations are performed via physical I/0 functions that specify a diagnostic buffer. The diagostic buffer must be large enough to receive the final device register contents at the end of the operation. A diagnostic buffer is specified by parameter 6 (P6) of all physical I/0 functions. If this parameter is nonzero, then a diagnostic buffer is specified and the issuing process must have the diagnostic privilege. , Specification of a diagnostic buffer address causes the Queue system service to allocate a buffer and store the address of buffer in the I/O packet (IRPSL DIAGBUF). The virtual address I/0 the of the requester's buffer is stored in the allocated buffer, and the diagnostic bit is set in the I/0 packet status word. When the I/0 operation is completed, the final device register contents are stored in the buffer. The I/0 packet is submitted to the 1/0 posting routine. The I/O0 posting routine determines that the diagnostic buffer bit is set and transfers the information to the requester's buffer. The allocated buffer is then returned to the dynamic storage pool. The information transferred to the requester's buffer has the format shown in Figure 10-1. Refer to Chapter 9, Paragraph 9.3.3 for more details. 16-73 VAX Diagnostic Design Guide 31 00 OPERATION START TIME IN 64 BIT FORMAT OPERATION COMPLETION TIME IN 64 BIT FORMAT FINAL ERROR COUNTER CONTENTS NUMBER OF DEVICE REGISTERS DEVICE REGISTERS, ONE PER LONGWORD TK-3002 Figure 10-1 Diagnostic 16.125 Buffer Format x Queue I/0 Request and Wait for Event Flag $QIOW $QIOW x is a VMS system service macro available only to level 2 and 2R diagnostic programs. It calls a VMS service that combines the Queue I/0O Request and Wait for Event flag system services. Use this macro where the program must wait for I/O completion before proceeding. The macro takes the same arguments as $QIO x. W chan, func, _x efn, $QIO [p3]1, [p4l, (p5]1, [p6] efn = the number [iosb], of the [astadr]l, event flag [astprm], that is to ([pl], (p2], set be at request completion. If the event flag number is not specified, the default value of @ will cause errors in the supervisor. chan = the number of the I/0 channel to which the request is directed. Use the ASSIGN service to obtain this number. func = the function code and modifier bits that specify the operation to be performed. The code is expressed _ symbolically. 19-74 Diagnostic iosb = th. astadr address status. the entry point address the when routine the I/0 service the AST at the requested. was parameter to Paragraph to 9.3.3 of 10.126 SREADEF SREADEF x that is a returns SREADEF_x efn, efn = the number A the A Status flag is flag is of be the from the mode to the which AST service and the resources QIO system required/ service all 32 It event calls flags a in VMS an service event flag of any event flag within the cluster to be number of @ through 31 specifies cluste r number of 32 through 63 specifies clust er 1. of all a event 1longword to receive flags the cluster. in the. current Service successfully completed. The specified event successfully completed. The specified event The longword that is to receive the current state flags in the Cluster cannot be written by the caller. event SS$_ILLEFC: An SSS_UNASEFC: containing 16.127 SSETEF_x that event illegal The the sets flag a event process specified $SETEF_x is in Flags SS$_ACCVIO: all 1I/0 Codes clear. set. to specified, function-specific service macro. of address Service SS$ WASSET: of routine is flag flag Status SS$ WASCLR: and that state 8. Return pzcssed If block 9. Event system status read. state Read AST access restrictions, description Chapter VMS the cluster. the x be device-specific privilege refer of completed. parameters. status, returned, is executes QIOW optional return status completion request For I/0 final routine. Pl to p6 = quadword receive AST = the to executed astprm of System Macro Dictionary UMS Set is number was not event Event system flag specified. associated flag. of with the cluster | Flag service the event flag are made executable. macro. specified. 19-75 Any It calls processes a VMS waiting service for the VAX Diagnostic Design Guide _x efn $SETEF the number of event flag efn = Return Status Codes to be set. SS$ WASCLR: Service successfully completed. The specified event SS$ WASSET: Service successfully completed. The specified event flag is clear. flag is set. An SS$ ILLEFC: SS$ UNASEFC: containing 19.128 illegal The event flag process the specified 1is number was specified. not event flag. associated with the cluster x Set Timer $SETIMR It calls a VMS service x is a VMS system service macro. $SETIMR of an event flag setting the schedule to program that allows a You can specify time. future some at AST an of queuing and/or the a delta time. as or time absolute an as event the for time the support absolute the standalone supervisor does not However, times. x efn, daytim, [astadr], [reqidt] $SETIMR efn = the number of the event flag to set when the time interval expires. You must specify the EFN, since the default value is @, and will cause supervisor errors. daytim = the address of the quadword containing the expiration time value. A positive time value indicates which the timer is to expire. an absolute A negative time value indicates an offset from the current time. time at (delta time) astadr = the address of the entry mask for an AST service routine to be called when the time interval expires. 1f this argument is not specified, the default value of @ is supplied. @ shows that no AST is to be queued. reqgidt = a request identification number. The default value is You can specify a unique request identificaton . number in each Set Timer request. Or, you can give the Set related identification number to request same Timer requests. You can use the request identification If an Set Timer requests. number later to cancel ASTADR argument is also supplied, the request identification number is passed to the AST routine. 10-76 Diagnostic Return Status Codes SS$ _NORMAL: Service SS$ ACCVIO: The System Macro Dictionary successfully completed. expiration time cannot be read by the caller. SSS_EXQUOTA: The process quota for timer entries has been exceeded, and the process has disabled resource wait mode with the Set Resource Mode (SETRWM) system service. SS$ ILLEFC: An illegal SSS$ _IVTIME: already An passed, event flag number was specified. absolute expiration time that or the time was specified as 0. was specified has SS$ INSFMEM: Insufficient dynamic memory is available to allocate a timer queue entry, and the process has disabled resource wait mode with the Set Resource Wait Mode (SETRWM) system service. SS$ UNASEFC: The process 1is containing the specified event Resources Required/Returned 1. The Set Timer system 2. The Set timer Timer queue system not associated flag. with requires dynamic memory. service uses the process's entries. The access mode of the caller is the access mode of the request and of the AST. 2. cluster service NOTES 1. the The Convert ASCII String to Binary Time (BINTIM) system service can be used to convert a specified ASCII string to the quadword time format required as input to the SETIMR service. 19-77 quota for VAX Diagnostic Design Guide SSETPRT x Set Protection on Pages 16.129 x is a VMS system service macro available only to level 2 $SETPRT and 2R diagnostic programs. It calls a VMS service that enables an image running in a process to change the protection on a page or range of pages. _x inadr, $SETPRT inadr = the [retadr], address starting and of [acmode], prot, [prvprt] a ending two-longword virtual array addresses containing of the pages the on which protection is to be changed. If the starting and ending virtual addresses are the same, a single page is changed. Only the virtual page number portion of the virtual address 1is used. The 1low-order 9 bits are ignored. retadr = the address of a two-longword array to receive the starting and ending virtual addresses of the pages that have had their protection changed. acmode = the access mode on behalf of which the request is being made. The specified access mode is maximized with the access mode of the caller. The resultant access mode must be equal to or more privileged than the access mode of the owner of each page in order to change the | protection. prot = the new protection specified in bits @ through 3 in the format of the hardware page protection. The high-order 28 bits are ignored. Symbolic names defining the protection codes are listed in Note 2. If specified as @, the default access of kernel read-only is used. prvprt = the address of a byte to receive the protection previously assigned to the last page whose protection wuseful only when 1is argument This was changed. protection for a single page is being changed. Return Status Codes SS$ NORMAL: Service successfully completed. SS$ ACCVIO: 1. The input address array cannot be read by the 2. The output address array or the byte to receive the caller. previous protection cannot be written by the caller. 3. An attempt was made to change the protection of a nonexistent page. SS$ _EXQUOTA: The process exceeded its paging file quota while changing a page in a read-only private section to a read/write page. SS$ IVPROTECT: The specified protection code has a numeric value of 1 or is greater than 15 (decimal). 10-78 Diagnostic System Macro Dictionary SS$ LENVIO: A page program or control in the specified region. range is beyond the SS$ NOPRIV: in range is in system A page the specified the end of the address space. SS$ PAGOWNVIO: Page protection on a the owner violation. An attempt was made to change page owned by a more privileged access mode. Privilege Restrictions For pages in global sections, the the accessibility of the owner of the page. page the new for modes protection less can NOTES 1. If an error occurs while changing page protection, the return array, if requested, indicates the pages that were before the successfully changed error occurred. If no pages have been longwords in the array contain -1. 2. affected, both return address Hardware protection code symbols: Symbol Meaning PRTSC NA No access PRTSC KW Kernel write PRTSC KR PRTSC ER PRTSC_EW PRTSC SR PRTSC SW PRTSC_UR PRTSC UW PRTSC ERKW - Kernel read only Executive read only Executive write Supervisor read only Supervisor write User read only User write Executive read; PRTSC SRKW PRTSC_SREW kernel write Supervisor read; kernel write Supervisor read; PRTSC URKW - User write executive write PRTSC UREW PRTSC URSW - These symbols read; kernel User read; executive write User read; supervisor write are defined by S$PRTDEF. 10-79 alter privileged than only the VAX Diagnostic Design Guide 196.138 | x Unwind Call Stack SUNWIND SUNWIND x is a VMS service macro. It calls a system service that allows a condition handling routine to unwind the procedure call stack to a specified depth. A new return address can be specified to alter the flow of execution when the topmost call frame has been unwound. [newpc] x [depadr], SUNWIND depadr = the address 1longword a of is performed to the caller established the condition handler. = depth to A depth of 0 which the stack is to be unwound. when the active indicates the call frame that was condition occurred, 1 indicates the caller of that frame, 2 indicates the caller of the caller of the If depth is specified as @ or less, frame, and so on. If no address is specified, the no unwind occurs. unwind newpc the indicating the address to of the frame that be given control when the unwind is complete. Return Status Codes SS$ NORMAL: Service successfully completed. SS$_ACCVIO: The call is not accessible to ther caller. stack This condition is detected when the call stack is scanned to modify the return address. SS$ INSFRAME: There are insufficient call frames to unwind to the SS$ NOSIGNAL: No specified depth. signal is currently active for an exception condition. SS$ UNWINDING: An unwind is already in progress. NOTE The actual unwind is not performed return the Rather, immediately. addresses in the call stack are modified so that when the condition handler returns, the unwind procedure is called from each frame that is being unwound. 16.131 x Wait for Single Event Flag $WAITFR SWAITFRx is a WS system service macro. tests a specific event flag. If the flag It calls a service that is set, control returns to the calling program immediately. If the flag is cleared, the process is placed in a wait state until the event flag is set. 19-80 Diagnostic System Macro Dictionary R x efn SWAITF efn = the Return number Status of event flag for which to wait. Codes SS$S _NORMAL: Service SS$ An ILLEFC: the successfully completed. illegal event flag SSS_UNASEFC: The process is containing the specified event number was specified. not associated flag. with the cluster NOTE The wait state caused by this service can be interrupted by an asynchronous system trap (AST), if (1) the access mode at which the AST executes is less than or equal to the access mode from which the wait was issued, and (2) the process 1is enabled for ASTs at that access mode. When the AST service routine completes execution, the system repeats the WAITFR request. If the event £flag has been set, the process resumes execution. 16.132 SWAKE x Wake The Wake system service activates a process that has placed in a state of hibernation with the Hibernate (HIBER) itself system service. $WAKE x [pidadr], pidadr = prcnam = [prcnam] the address of a longword containing the identification of the process to be awakened. the address of a character string to the process name string. qualified by the group number the wake. Return Status pointing The name is implicitly of the process issuing Codes SSS NORMAL: Service SS$ ACCVIO: The successfully completed. specified descriptor The or specified has more process cannot identification SS$_IVLOGNAM: descriptor process cannot process than 15 1¢-81 name string or be 1read, or be written, by the caller. has a length of name string characters. the string ©process @ VAX Diagnostic Design Guide The specified process does not exist, or Warning. SS$ NONEXPR: an invalid process identification was specified. The calling process does not have the privilege to SS$ NOPRIV: the specified process. wake Privilege Restrictions User privileges are required to wake: ) ) Other processes in the same group (GROUP privilege) Any other process in the system (WORLD privilege). NOTE I1If one or more Wake requests are issued for a process that is not currently Hibernate subsequent a hibernating, request will be completed immediately. That is, the process does not hibernate. No count is maintained of outstanding Wake 16.133 requests. x Wait for Logical AND of Event Flags $WFLAND It calls a WS service SWFLANDx is a WS system service macro. event flags for which of mask a specify to program the allows that by the mask are indicated flags the of all If wait. to wishes it control set, Otherwise, immediately returns to the program. <calling the program is placed in a wait state until the flags are all set. x efn, mask $WFLAND efn = mask = the of number any event flag within in which bits set the cluster being the event used. the mask 32-bit flags of to 1 show interest. Return Status Codes SS$ NORMAL: Service successfully completed. SS$_ILLEFC: An illegal event flag number was specified. SS$ UNASEFC: The process 1is containing the specified event not flag. 19-82 associated with the cluster Diagnostic System Macro Dictionary NOTE The wait can be caused interrupted by system mode than state trap at or (AST), which equal the to by this an asynchronous if (1) service the access AST the executes is less access mode from which the wait was issued, and (2) the process is enabled for ASTs at that access mode. When the AST service routine completes execution, the system repeats the WAITFR been 10.134 SWFLOR SWFLOR x tests is the a request. set, the x Wait for VMS system event flags If the process Logical service event resumes OR of macro. specified by a flag has execution. Event It Flags calls a service mask within within the a that specified cluster. The service returns control to the calling program immediately if any of the flags is set. Otherwise, the service places the program in a wait state until one of the selected event flags is set. : $WFLOR x efn, mask efn = the number of any event flag cluster being used. mask = a 32-bit of Return mask Status which bits set to 1 show the event flags Codes SS$ NORMAL: Service SS$ ILLEFC: An SS$_UNASEFC: containing in interest. illegal The the successfully completed. event process specified flag is number not event was specified. associated with flag. NOTE The wait state caused by this service can be interrupted by an asynchronous system trap (AST), if (1) the access mode at which the AST executes is less than or equal to the access mode from which the wait was issued, and (2) the process is enabled for ASTs at that access mode. When the AST execution, WAITFR been service the request. set, the routine system If the process 10-83 completes repeats event resumes flag the has execution. the cluster DIAGNOSTIC CHAPTER 11 DOCUMENTATION PROGRAM Good documentation is important in all diagnostic programs. A program without it is incomplete and of little use, since code by itself is generally obscure. Programs require several aspects of the program purpose lines and of structure code. Here of are 1levels should the of be program three documentation. All important explained, from the overall to reasons the meaning for documenting of individual your program carefully. 1. Documentation is an important aid in the debugging phase of program development. Prefaces and comments tell what the code should do, so that unwanted side effects stand out. 2. Documentation helps the program user to understand the capabilities and requirements of the increases the value of the program as program. It also a fault isolation tool, with if the user must troubleshoot the program listing. 3. Documentation 1is essential to the program maintainer, whether or not the maintainer is the individual who developed the program. Since the documentation tells what the code is intended to do, the maintainer can fix the code if, in fact, the code does not perform as intended. Or, if the maintainer wishes to alter the function of the code, he the must documentation your program leave until the end, be hard 11.1 Make to help him to determine what change. Document it will in each phase when the of its development. Do not program strategy and details may recall. DOCUMENTATION FILE the documentation file the first item in the listing when you release a diagnostic program. Direct this file at the program user, and include in it all information necessary to running and using the program. function of the test in instructions, of each Organize lowing the The documentation file program. run-time the In requirements, are it and identifies a gives the name and program functional operating description program. documentation headings addition, file under standard: Documentation cover sheet Program abstract Hardware requirements Software requirements Prerequisites 11-1 several headings. The fol- VAX Diagnostic Design Guide Operating instructions Program functional description 11.1.1 Documentation Cover Sheet The documentation cover sheet is the first page of the documentation file. Use the following format: PRODUCT CODE: Component part number assigned to the docu- A ment. The format is ZZ-XXXXX-V.U-E. All VAX diagnostic XXXXX uniquely identifies the programs start with ZZ. B.S.D.E. V.U-E indicates the by d assigne is and program version number (Paragraph 11.2.4). PRODUCT NAME: Up to 29 character description matching the title of the engineering change order (ECO). Although the description may be expanded on the cover sheet, the first 7 characters of the ECO description are unique and must be the first 7 characters of the product name. PRODUCT DATE: Not necessarily the release date, but whatever date the program is being created or revised. MAINTAINER: Maintaining group, such as Diagnostic Engineering, is sufficient. DISCLAIMER: shown in disclaimer The Example statement should appear as 11-1. COPYRIGHT STATEMENT: DIGITAL engineers use the format shown in Example 11-1, giving the first and last copyright years. These copyright years should be the same as those on the ECO. They should be the first year that the program was released from SDC and the current year. Additional information, is optional. such as AUTHOR, Example 11-1 is typical. REVISED BY, or REPLACES, = oQw > IDENTIFICATION' PRODUCT CODE: ZZ-ESDAA-2.1-7 PRODUCT DATE: MAINTAINER: 20 FEBRUARY 1979 BASE SYSTEMS DIAGNOSTIC ENGINEERING THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY PRODUCT NAME: ESDAA21 DZ1l 8 LINE ASYNC MUX TEST ON A SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY 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 EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO TITLE TO AND OWNERSHIP OF THE LICENSE TERMS. THESE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC. 11-2 Diagnostic Program Documentation THE INFORMATION IN THE SOFTWARE IS SUBJECT TO WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED COMMITMENT BY DIGITAL EQUIPMENT CORPORATION. F DEC ASSUMES OF ITS NO COPYRIGHT (C) Example 11.1.2 The RESPONSIBILITY SOFTWARE ON 1976, 11-1 FOR EQUIPMENT 1979 BY THE WHICH DIGITAL Documentation USE IS OR NOT AS A RELIABILITY SUPPLIED EQUIPMENT Cover CHANGE BY CORPORATION Sheet Program Abstract program abstract is a short statement (from 3 to 20 lines) that describes the major functions and features of the program. The following categories are representative. Diagnostic program Device tested level (1, 2, 2R, 3, or 4) Program purpose and functions Error resolution: chip, module, or function Operator selectable program sections Unique program Program Example 11-2 callout features transportability shows the abstract for the DZ1l diagnostic ESDAA. program, ABSTRACT This level 3 diagnostic program checks the functionality of from eight DZ1ll units attached to any VAX-11 processor. The program provides error messages which identify failing modules and functions and aid in the repair of the device. The program uses the internal 1loopback mode on the DZ11l to check most of the circuitry on the device. In addition, the program provides two one to operator selectable sections which test optional hardware configurations. The H327 section checks the modem control feature of the M7819 (EIA) module. The H3190 section enables the operator to use the H319@4 turn around connector for testing the M7814 (28 ma) module. Example 11-2 Program 11.1.3 Hardware Requirements Under this heading list the minimum sary for diagnostic program execution. hardware as List appropriate, 11-3 Abstract hardware optional as shown configuration hardware in and Example neces- specific 11-3. VAX Diagnostic Design Guide HARDWARE REQUIREMENTS: VAX-11 processor with minimum configuration DW7860 M7819, Dz11, or M7814 OPTIONAL REQUIREMENTS: H327 turn around connector for use with the M7819 module H3190 turn around connector for use with the M7814 module Hardware Requirements Documentation Example 11-3 11.1.4 Software Requirements Under this heading you should 1list the software environment or environments in which the program will run, as shown in Example REQUIREMENTS: SOFTWARE VAX Diagnostic Example 11-4 11.1.5 This Prerequisites category includes Supervisor Software Requirements Documentation all requirements must that be satisfied is brief before the diagnostic program will yield valid results. For example, a level 3 Unibus device diagnostic program will provide a useful test of that device only if the operator has verified the correct operation of the central processor and the Unibus channel adapter. The sufficient. information in shown Example 11-5 but PREREQUISITES: Functional VAX-11 Central Processor and Memory Functional Unibus Channel Example 11-5 11.1.6 Adapter Prerequisities Operating Instructions Include in this category all instructions for loading and executing the diagnostic program. If the program can be loaded and run on-line (under VMS) as well as off-line (standalone), show both methods. Example 11-6 shows the operating instructions for the disk reliability program. 11-4 Diagnostic Program Documentation P >>>BOOT Type Control P. Load and start the diagnostic supervisor SX@ DS> ATTACH DW780 SBI DWg® DS> ATTACH RK611 DW@ DMA DS> SELECT DMA DS> RUN from the floppy disk drive. 4 ! Attach the 777440 210 5 UBA, link. Attach the RK611. Select the RK611. Run the disk ESRAA reliability program. NOTE Operator Example input 11-6 is underlined. Operating 11.1.7 Program Functional Description This section of the documentation following information Program file categories. should overview Program purpose and transportability Program Instructions. strategy size .EXE file size Program run timer quick verify default other modes Run-time dynamics e.g. memory allocation other restrictions Event flags used Fault requirements detection error resolution error message percentage Performance formats of possible faults during hardware failures unsuspected detected traps power failure Sequence of testing Program on multiple applications field service units manufacturing customers How engineering to Program set up test and run (and subtest) with 11-5 APT and APT-RD descriptions include the VAX Diagnostic Design Guide n the functions For each test (and subtest, if appropriate) explai or should operat the that s action and tested, possible failures, of the ption descri the shows 11-7 e Exampl ion. take on error detect profirst test in the RK611-RK#6/RKP7 drive functional diagnostic gram (ESREF). TEST - 1 TEST DESCRIPTION: This test will read the RKCS1 register and then test the UBA status to verify that an error did not result from the read. If an error is detected, the diagnostic will be aborted. This test's primary function is to verify that the RK611 registers can be accessed, without detection of an error on the UBA, before further testing. STEPS: Issue adapter init. Report error and abort if init failed. Clear UBA status. Test for stuck UBA status error - abort if error. [] OO N bW+ TEST Read RKCS1. Wait (stall execution) Get UBA for approx. 70 microseconds. status. Test for UBA error - abort if error. ) DEBUG: If this test fails, the user should run the appropriate RK611 or UBA diagnostic. Example 11-7 Test Description Notice that the test steps are listed in order. You should be able to use material from the functional and design specifications when you write the test descriptions for the documentation file. E MODULE PREFAC 11.2 The module preface is a documenting comment that should be placed at the beginning of the source file of a module. Each line in the should, preface (except for 1linker and assembler directives) in the "!", or ";" ter, therefore, begin with a comment delimi es provid e prefac module leftmost character position. The in certa ins conta It . information for the program maintainer and control items (without a comment delimiter) that the 1linker ght copyri L DIGITA rd standa the assembler need, and it contains ownership statement needed for the protection of DIGITAL'S legal have a must m progra stic diagno rights. While each module in a preface, the preface for the first module is the most important. 11-6 Diagnostic It Program Documentation contains some information that describes the program as a as well as information specific to the first module. Five sections make up a module preface. Build the module prefaces from whole, the diagnostic Chapter 6. program templates Linker Assembler Directives and as shown in Example 6-1 in Copyright statement Environment statement History Module functional description 11.2.1 Linker and Assembler Directives This section of the module preface contains four items as shown in Example 11-8. Refer to Paragraph 6.2.1 of Chapter 6 for more details. .SBTTL DZ11 8 LINE ASYNC MUX TEST .TITLE DZ11 8 . IDENT LINE ASYNC /V2.1-7/ HEADER, PAGE, MUX TEST . PSECT Example 11-8 Linker in 11.2.2 The Copyright copyright statement NOWRT the and Assembler Module Preface Directives Statement statement furnished in should the be identical documentation 11.2.3 Environment Statement The environment statement 1lists assumptions that a module may make. to the copyright file. any special environmental For level 2, 2R, and 3 diagnostic programs, for example, the run-time environment includes the diagnostic supervisor. A module in a level 2R diagnostic program also assumes that it runs only on-line system (under traps anything out environment. The VMS). (ASTs) of Or are the the module disabled. ordinary might In that the first module in a program should (or compile) and 1ink the modules given the source modules. Example sample 11-9 shows diagnostic the commands program assume general, that you module asynchronous should assumes document about its also explain to assemble into an executable program, required to assemble written language. 11-7 in the VAX-11 how and Macro 1link a assembly VAX Diagnostic Design Guide Assemble module 1 (header) $ MACRO/LIS TESTM1 creating an OBJ file and a LIS file. Assemble module 2. $ MACRO/LIS TESTM2 ! Assemble the last module. $ MACRO/LIS TESTMN S LINK/EXE:SAMPLE/CONTIGUOUS/MAP/FULL/SYSTEM:2@@ TESTM1, TESTMZ, ... TESTMN Link the assembled modules creating an EXE file called SAMPLE in contiguous memory locations starting Example 11-9 at address 200. Assemble and Link Commands Shown in the Environment Statement 11.2.4 Program and Module Version Numbers provides a unique The VAX-11 standard version number softw are. Whenever you use in-ho AL identification for all DIGIT on number of the versi the am, progr make a change to a completed d reflect the shoul e modul ted header module and of each affec change. The version number is a compound string constructed as follows: <support><version>.<update>—<edit> <support> is a single capital letter (or null) identifying the support level of the program. S special customer version T field test version \'/ released or frozen version X unsupported experimental version Normally you can omit this letter from the modul.e identification, since the letter reflects the program as a whole ° Increment this number <version> refers to major changes.bili ty of the program. if you change a function or capa essed number. It <version> is a decimal leading zero-supprment at a time. incre one starts with @ and progresses release. 1 first the e befor Never skip a number. Use @ designates the first release, and so on. 11-8 Diagnostic ) <update> period digit. is to minor changes. If present, it is a followed by a single decimal digit. Never skip Null designates a major change, because <updat cleared first ° refers Program Documentation when update, <edit> <version> and so identifies is but any may changed. 1 designates on. alteration is never reset. <edit> is decimal maintenance number, be skipped number. a e> never of a hyphen starting be lower the source the code and sign followed by a with 1. Numbers may than a previous edit There may be several edits in one release. For example , if three software problem reports (SPRs) are handled, the edit number should be increased by 3. The three changes should then be identified in the maintenance histories of the affected modules. Use these edit numbers in the module maintenance history . The preface tion NOTE number given version is the module the program to identifica- be used the number statement in also as shown in in Example .IDENT 11-8. 11.2.5 Module Maintenance History When you modify an existing program module, assign to each problem addressed (each logical unit of an edit number modification). After a release you may bump the edit number to a round number, but this number should never be reset. Add a maintenance comment, derived from the edit number, to each line of source code that is affected. There are two good reasons for using edit comments. 1. The modifications may well be module. The the places maintenance comment where a correction problem made. was This is distributed All too often it innocently modify over the you to find all single functional of a especially useful rection has to be further corrected the original modifier and/or if it by the field service engineer. 2. all enables if by someone has to be happens that as we an instruction that correct was the the cor- other than understood bug B, we correction for a previous bug, A. Bug B is fixed at the expense of the reappearance of bug A (or one of its relatives). If modification of a program leads you to the modification of a line that already has a maintenance comment, then find out (from the detailed current history) who the modifier was, consult that person, and exercise extreme caution in effecting your modification. In many cases the edit numbers may be assigned consistently across modules in a program. In this case, the module defining the program's version number should have a full maintenance history and the others should include only module specific changes. all 11-9 VAX Diagnostic Design Guide Periodically, old, detailed, current history log entries may be deleted, together with their corresponding documenting comments (and lines marked for deletion). Do not make the deletion until the program has proven itself in the field. Keep a history of the changes to each module in the module preface. the header module preface must reflect the history of the Example 11-10 shows how a program history might entire program. look as documented in the preface to the header module. First release, me N Ne bytes to in Test 5 CHAR BUF 31-DEC-83, Jim Skunk Major change, vV2.1-4 Minor change, 12-JAN-84, Jim Skunk -4 changed Test 46 Subtest 5 Error print out from -3 added conversation mode WS we added 2 Ted Bear vV2.0-3 WM wme 22-MAR-79, -1 fixed Unibus timeout -2 Ted Bear 21-FEB-79, First minor change, vi.1l-2 W e ; V1.0 we "CSR" to "TCR" Example 11-10 11.2.6 Module History Module Functional Description Group the routines and data structures that make up a diagnostic program in modules according to their functions. For example, the header module should contain global data, program/supervisor interface structures such as the header macro, and the initialization, cleanup, and summary routines. Global subroutines, if they are large or many, should make up one or more separate modules. The test routines should be grouped in modules according to common elements. Write the module functional description so that it describes the common elements and the general purpose of the module. For example, if module 3 of a program contains tests that check the interface between the Massbus and a tape formatter, you should explain this fact in the module functional description. 11.3 ROUTINE PREFACE Like the module preface, the routine preface is a documenting comment included in a module source file. Begin the routine preface with a begin sentinel, of the form ".++", Use an end sentinel, of the form ";--" as the last line. Begin each line in the text of the routine preface with a comment delimiter in the leftmost character position. 11-10 Diagnostic Write a routine preface nostic program. al subroutines, For and for each example, the test routine in Program Documentation each module in a diag- the initialization routine, the globroutines should each be preceded with a routine preface. Example 11-11 shows a sample routine preface. Paragraphs 11.3.1 and 11.3.2 provide a detailed discussion of the different elements that make up the routine preface. Notice that each section of the routine preface should be 1labeled with a keyword, whether or not it and write contains We Wy WMo VI any ** text. None If **" there on logical unit Note that no byte determines the byte then 528 bytes are number header and is passed count is specified; count. If the drive transferred for each WE : number : cylinder of sectors number : track : : sector wvalue logical unit PUSHL BUFFER_ADR : : address which header and CALLS #4 , READ : : data call WO WE WY W WE WY Ve We NO_BLOCKS CYLINDER,- (SP) We W PUSHL MOVW SECTORS,- (SP) LUN NP that the drive sequence. drive under test is an RK@6, then 12 bytes per block are transferred. 1If the drive under test is an RKO6 then only headers in each block are read. Calling Sequence: TRACK, - (SP) Input The HEADER argument of those Wy Implicit NV * % symbol lists. blocks. QIOLIST The LUN is the Inputs: * % Parameters: None Implicit Outputs: ** WS N N N None % % Completion RO=1 if no WMe ** RP=0 if any Codes: errors errors are are base creates an Ne None Output * % to to the read use value number is to receive information routine Parameters: global NE NI text, the number of blocks under test is an RP#X, block number. If the MOVB VY N no 1line data command to in the calling MOVB PUSHL WMy MF is the + W WE whose WS Wy Functional Description: This routine issues a read WE W "; + keyword Wy We leave the follows. detected. detected. 11-11 address implied of a block association of QIO with one Side Effects: * % None Registers Used: R@P=byte count Debug: program. If this routine fails, run the appropriate level 3 diagnostic WNe MNP Wy WE Mg block number R4=DSKDC address R8=sector R9=track Rl@=cylinder WO R3=logical We WMe |y Ne % % ME W " 4 Wy VAX Diagnostic Design Guide Example 11-11 11.3.1 Sample Routine Preface Routine Functional Description The routine functional description should explain the purpose of the routine, necessary run-time conditions, and debug or test procedures. Explain the purpose of the routine according to what it does, not how it does it. Describe the routine as if it were a large scale instruction. Make the explanation clear and logical, so that the casual reader can get a fairly accurate idea of what the routine accomplishes (Example 11-11). If there are run-time conditions necessary to proper operation of the routine, they will often involve assumptions that you should state explicitly. Diagnostic programs should be designed to operate in a hostile environment. Therefore, the programmer must explain how the routine will behave if the required conditions are not met, and he must provide debug or test instructions in the routine preface. These program maintainer how instructions to verify will the tell correct the operator behavior routine under a variety of possible circumstances. of or the For example, a test routine may require that a loopback cable be installed on the device under test. The test routine should check for the presence of this cable and abort if it is missing. This point should be explained in the routine preface, together with instructions for verifying whether or not the routine does abort when the cable is not connected. Of course, the debug instructions in the routine preface should also explain how to verify correct operation of the routine when run—time conditions are normal. 11-12 Diagnostic 11,3.2 Program Documentation Routine Interface Global subroutines perform generalized always called global subroutines by are generally called from within functions. Unlike the test routines, the dispatch can be routine called in in the Calling Input supervisor, different variety of reasons. The routine preface for a therefore, should specify the following items: tests to which are ways global and the for a subroutine, sequence parameters Implicit Output inputs parameters Implicit outputs Completion codes Side effects Registers 11.3.2.1 Calling used. Sequence - If the routine 11-12. routine can be follows called the with standard CALLS or ~e sequence: CALLS e Calling or “e e call procedure, then the CALLG, as shown 1in Example CALLG ENTRY NAME (formal parameters) ENTRY NAME (formal parameter Example 11.3.2.2 Input and 11-12 Standard Output Calling Parameters - The list name) Sequence input parameters that the routine expects may be items in a table (a list) or items on the stack. The input parameters statement should declare what the parameters are. The argument pointer should p01nt to the longword preceding the first parameter. Example 11-13 is taken from a print routine preface. of ASCII string address of ASCII name - address 4 (AP)= -e parameters: 8 (AP)= e Input 12 (AP)= expected data. “e ; 16 (AP)= received data. Example If the called calling parameters. a buffer, routine routine, For you the the 1Input values, should example, should of 11-13 returns you of if the state the extended register addresses, these routine address 11-13 be message. converted. Parameters document called to error or strings items returns (label) and as a to string size the output of in the VAX Diagnostic Design Guide buffer. Then it should be clear that the calling routine should access the buffer after the call is completed. Notice that the general registers (R1-R1ll) may be used for output parameters, as shown in Example 11-14, ; Output parameters: ; R2= Binary parameter retrieved Example 11-14 from operator, Output if successful. Parameters 11.3.2.3 Implicit Input and Output Parameters - In these sections of the routine preface you should include all locations in global or own (local) storage that are accessed by the routine. Implicit inputs are locations that the routine reads. Implicit outputs are locations that the routine writes. Be sure not to confuse these items input and output parameters. example: Implicit inputs: DSSGA PBASE: P-table base address, P=direct addressing «e ; wg For with Example 11-15 Implicit Inputs 11.3.2.4 Completion Codes - Your routine preface should specify all of the completion codes that the routine may return in RO to the code's indicate each code Opposite program. calling the meaning, ; as shown Completion in RO=0 if no . RP=1 if any [ 11-16. codes: . [ Example errors are detected. errors Example are detected. 11-16 Completion Codes 11.3.2.5 Side Effects - Document here anything out of the ordinary that the routine does to its environment. For example, the routine some situation under strange in a hardware the leave may circumstances, jeopardizing the integrity of the operating system. 11.3.2.6 Register Usage - Under this heading, list the registers used by the routine and the function to which each is applied. 11.4 COMMENTS Use comments to make your program understandable to any reader. The reader should be able to read the comments alone and get a good understanding of what the program does. 11-14 Diagnostic In a sense there are two programs to be Program Documentation written: one consisting of code, and one consisting of comments. Write the comment program to describe the intent and algorithm of the code. That is, comments are not simply rewordings of the code. They are explanations of the overall logical meaning of the code. A comment is any text embedded between a comment delimiter on the left and the end of the source line on the right. In addition to the module and routine prefaces, your program should provide three types of comments: block comments, group comments, and 1line comments. 11.4.1 Block Comments Use a block comment to strategy allow of the each reader to The block of page !) is is a comment entered, character the code 1left The first line of the block of the form ";+" or ";++". ° The ° The body of the block. by ° line of a the the the form the block Separate consisting comment or ; This ° — ’ is a block and should without is block a block block text comment comment hav- begin (; or first sentinel, consists of text describing from comment delimiter with describes the a matching end blank line. The code should follow the blank <skip> <CODE> Block 11-15 1line's number a — 11-17 a is comment. Example of delimiter the <skip> ++ It ";--",. comment the in comment comment ";-" line. ; function code. follows tab. Follow that of the The aligned, ° last the of that paragraph lines. position. sentinel describe grouping code. Notice that the code may be assembler executable code. The following rules apply comment wide and distinct understand ing to read the actual directives as well as to block comments: ° introduce logically Comment VAX Diagnostic Design Guide 11.4.2 Group Comments Use a group comment whenever the attention of the reader should be called to a particular sequence of code as shown in Example 11-18. When several paths join, note the conditions which cause the flow to reach this point. we wmy e 1. All exceptions converge at this point with: ...{register and stack status> a loop. looking for a handler to call e W W At the top of When some data base has been built, such as a complex At this point the stack has the following format: g0 (SP) = saved R2 g4 (SP) = number of bytes... we WO WMo We ng W we sequence on the stack. Example 11-18 Group Comments The following rules apply to group comments: The group comment consists of a number of page wide comment lines: the comment delimiter is entered left aligned, in the line's first character position. The first and last lines of the group comment are comment delimiters and are set off from surrounding code by a blank line before and after the group. Both the blank comment lines and the blank lines are mandatory and help the reader to distinguish the comments and code visually. The body of the group comment consists of descriptive text, separated from the comment delimiter by a space. Tabular information delimiter by a tab. is 11-16 separated from the comment Diagnostic Program Documentation 11.4.3 Use line being Line Comments comments to explain the meaning and function commented. For example, the instruction MOVAL should area." of be or thumb, comment of the lines A,B commented "; Initialize pointer to first buffer in free such, not "; Move the address of A into B." As a rule symbols should not appear in a comment. Instead, the should say what each symbol is or means. Line comments can be connected so that they show the function of a section of several lines of code. When they are used in this way, the 1line comments help the reader to follow the flow of the program. Several lines of one more lines or successive connection lines by <space>...". ® comment attached All to be in which case lines with is rules apply placed statement. ® may follow-on following comment be comments code, tagging The The of may of on to the one line of code. attached to several you can comments line indicate of the ° If right-hand side of language comments are aligned with delimiter in column 41 of the text (five left margin). the statement would "; comments: assembly field, line. the form comment from Or normally overflow long be contained on a comment delimiter and the into the a the tabs comment then it can be broken and continued on the next Place the comment on the second 1line of the statement. ) If the comment is too to single line, or if the statement is too long to be commented on the same 1line, then the comment may be placed (or continued) on the following 1line. Place the comment delimiter in column 41, as before. ® Leave of the a space between the comment. 11-17 text VAX Diagnostic Design Guide shows some uses of STATEMENT STATEMENT the LONG A LONGER STATEMENT STATEMENT Ne Ny SOMEWHAT wo A SOMEWHAT W wNe Wme W STATEMENT comment. Compute multiple-line function Here we do something new and extend the comment to next two lines. VERY VERY VERY And - LONG STATEMENT its comment on next %8 FRAGMENTED Ne STATEMENT Example 11-19 the And its comment And its long comment which continues on additional line(s). W A VERY VERY VERY VERY A line W STATEMENT W 11-19 e Example the statement's Line 11- 18 Comments comment line CODING Diagnostic engineers CHAPTER CONVENTIONS AND 12 PROCEDURES should organize all diagnostic programs in a main-line code in the test routines should proceed in functionally distinct steps. Many of the functions can be broken out from the main routine and coded as subroutines. Proper use of subroutines should reduce the size of the object code. And, if you make all subroutines global, they can be assembled in a separate module. They can then be made available to other modules within the program and to other programs. modular fashion. Asynchronous interrupt The system service trap (AST) routines routines, should also condition be handlers, global. and In addition, proper organization of the program into functi onally distinct steps requires that error reports be made from the highest level (the main-line code). Error reports should not be made from subroutines, interrupt service routines, AST routines, or condition handlers. Two important reason s for restricting error reports 1. to the If highest all user error will number 2. A the find easily if a the test, and main-line code, subtest, and error the error an error directly subroutine from has detected user error message, the code that tests failing performs useful functions. from the that globally come failing code the routine more the However, delivered never follow. reports find in message. and level than one a the distinct routine may in fact function. function that the only performs is several Subroutines should deal with errors as the system and supervisor services do, by returning appropriate status codes. The main-line code should check return status codes following all calls to the supervisor and VMS services and to routines within the program. 12.1 GUIDELINES Arrange each flows from the top necessary, should Use branches Each upward FOR segment go EXECUTABLE of CODE executable code down. All branches, down the page, to implement so and except that the jumps when in the case procedure they of are loops. loops. segment of executable code should have one entry point and point, ideally. This simplifies program debugging. It also increases the diagnostic value of a program for the user, by making it easy for him to retrace the steps that have led to a failure. one exit 12-1 VAX Diagnostic Design Guide ge, pointers, and base Use the general registers for local storathat your comments are addresses, when possible, making sure ter, make certain that adequate. However, before you use a regis register save mask at you are not destroying important data. Use aregis ter that the code the beginning of each routine to save each uses. not destroy Make your code efficient, so long as efficiency does BSBW instruction le, a the readability of the program. For examp JSB instruction, and a uses memory more economically than more than efficient is addressing word-PC-relative longword-PC-relative addressing. GLOBAL SUBROUTINE GUIDELINES 12.2 like a high level Each subroutine should function independently, is totally closed, instruction. Design each subroutine so that it clean and precise. making its interface to the main-line code between branches, Programmers should be aware of the trade-offs stand ard interface jumps, and calls. The call procedure is the r, 1if no between the main-line code and subroutines.d andHoweve the routine is parameters (or few parameters) are to be passe because branches short, branches may be more efficient than calls, branch es may be require less overhead. on the other hand, cumbersome if you use them with more than a few parameters. , data When you use standard call procedures (CALLS or CALLG) ned retur s, passed should consist entirely of received value as codes s values, and returned status codes. Make the statu accurate as necessary to describe all possible conditions. In most cases you should not mix functions within subroutines. For test example, a subroutine that handles I/0 to the device under should handle only I/0. In all cases, be sure to avoid nesting print 12.3 routines. ERROR MESSAGE PRINT ROUTINES e header Call error message print routines through the error messagcode, as ine macros (for example, $DS_ERRHARD_x) from the main-l message header shown in Example 8-24. Coordination of the error the formatted and x), INTB $DS_PR (e.g., macros, the print macros print any ASCII output (FA0) directives should enable you to for each e priat appro as ble, varia information, fixed and detectable error. Figure 12-1 shows the steps involved. 12-2 Coding (TEST Conventions and Procedures N) A PERFORM 1/0 FUNCTION ON DEVICE UNDER TEST CALL $DS_ERRHARD_S MACRO, PASSING YES ERROR MESSAGE PARA- METERS AND PRINT ROUTINE PARAMETERS NO y ERRHARD ANOTHER 1/0 : FUNCTION ON MESSAGE A HEADER DEVICE UNDER TEST | | C RET ERRHARD SUPERVISOR SERVICE ) CALLS REQUESTED PRINT ROUTINE PRINT ROUTINE BUILDS MESSAGES AND USES THE DS_PRINTB_S MACRO TO CALL THE PRINT SUPERVISOR ERVICE ROUTINE AND PRINT THE MESSAGE RET TK-3005 Figure 12-1 Printing an Error Message, Program Flow VAX Diagnostic Design Guide HANDLING INTERRUPTS 12.4 Interrupt service routines enable level 3 diagnostic programs to Use interrupt field device interrupts directly, as they occur. service routines only toward the end of the program, after all hardware logic on the unit under test has been verified. Through routines diagnostic programs can field interrupt service interrupts, necessary, the capture return and unit and the status of main-line the to control the channel, if some In code. routine may initiate other 1interrupt service the cases, operations. Figure 12-2 shows the flow of control and interaction between main-line code (test n) and an interrupt service routine in a typical level 3 diagnostic program. The circled numbers the paragraphs that follow are keyed to the flowchart. The channel is x) ($DS_CHANNEL macro services test the in used in routine (:) To clear the channel. (g) Then to enable channel interrupts. In addition, the test (§> The routine clears the unit and enables device interrupts. routine test starts and transfer than allow more transfer required (:) then a enough for the 1I/0 of the I/0 sets up buffers time for completion watchdog (worst case). timer. The timer should Then the test code starts a transfer on the unit. When the sets unit an finishes interrupt its bit. transfer or detects The central an error, processor fields interrupt and calls the interrupt service routine (E) (:) it the With the vector supplied to the channel service in step 1. The interrupt service routine analyzes the vector To determine whether it can handle the interrupt. If it cannot, it prints an error message (note that an error message is permissible in the case of a fatal error) and terminates the program. can handle the interrupt If the interrupt service routine (the vector is valid), it takes appropriate action (:) Sets a done flag, and to the main-line test code. Returns control (:) The test code is at this point in a loop checking done flag the loop expires. cancels and checking until the If the timer. The program the executes timer the finished or unit has the the code transfer has been completed, timer, and 12-4 Coding CLEAR CHANNEL CANCEL Conventions and Procedures ANALYZE AND TIMER REPORT TIMEOUT ERROR ERROR MESSAGE SYS. FATAL CLEAR UNIT SET DONE FLAG ROt PROGRAM UNDER TEST ERROR ENABLE DEVICE (: YES FLAG AND CHANNEL INTERRUPTS NO SET UP TRANSFER ERROR SYS.FATAL ABO ERROR ABORT DEV-FATAL PROGRAM MESSAGE PROGRAM ANALYZE AND 4 y y MESSAGE (: TIMER TRANSFER START CHECK DONE FLAG RET ) ® /O TRANSFER w y ) REPORT TRANSFER ERROR STATUS C) START REI ERROR MESSAGE > DEV-FATAL ABORT PROGRAM 1 @ e f D | :) TRANSMIT | i OUTPUT RECEIVE TRANSFER ERROR i INPUT y ‘ C) CAPTURE STATUS QPBGSET ERROR TK-3013 Figure Handling 12-2 Interrupts 12-5 VAX Diagnostic Design Guide e Checks the error flag. If the interrupt service routin es analyz e routin has detected a transfer error, the test and reports the error. If the timer expires, one or more errors have occurred, and they must be analyzed and reported. (:) Notice that the interrupt service routine captures the status of the device when it detects a transfer error vector. In this way error reporting is 1left to the main-line code. 12.5 ASYNCHRONOUS SYSTEM TRAPS several devices in If a level 2 or 2R diagnostic program must test d coordinate the shoul you parallel, as in reliability testing, es various 1/0 transfers with asynchronous system trapresroutin three requi 12-3 (ASTs). The approach shown in Figure components of code a main-line test routine an I/0 routine an AST routine. The circled 12-3. OO0 Figure numbers in the ‘ The main-line code following (test n) for each unit to be tested. paragraphs are keyed to calls the I/0 routine once The I/0 routine reads the command buffer for a given unit. It then sets up the parameters for the queue 1/0 system service, queues the request, and returns control to the main-line code. The I/0 transfers are started by the device driver code 6 When queue 1/0 requests for all the units have been made, ® in WS (or the supervisor) asynchronously. The driver routine calls the AST routine at the completion of each I/0 transfer. For example, when the first transfer has been completed on the first unit, the AST routine identifies the device that has completed the the main-line code hibernates. Q, transfer and checks for errors. If the AST routine finds that an error has occurred, it captures the status of the device and the diagnostic buffer in an error buffer for the failing unit. It then sets an error flag to signal the main-line code that an error has occurred. The AST routine does not report errors to the operator directly. 12-6 ® 9O Coding Conventions If the been The required number of transfers for and Procedures the unit have not completed, I/0 routine is called If all transfers for AST sets a unit flag, the again. given unit have been made, the Wakes the main-line code, and returns. When the main-1line code wakes up, it checks the error flag for each unit, ® and Prints a message for each error on each failing test then checks to see whether all of the I/0 have been done on all units. @2) If so, the Buffers and flags Figure 12-4. test is finished. hibernates until the AST routine transfers on another unit have been are necessary to support If not, the program as shown wakes 1it, completed. the AST unit. The transfers after all in AST routines are necessary in all diagnostic programs that hibernate. A timer can be set to call an AST routine after the expiration of a delta time or at a specified absolute time. The AST routine can, in turn, wake the hibernating program, as it does in Figure Notice 12-3. that the AST mechanism, together with the Hibernate and Wake system services, enables you to make level 2 and 2R diagnostic programs highly efficient. When the program hibernates, it frees the system resources for use by other processes. 12-7 VAX Diagnostic Design Guide ) START (I/O ROUTINE)@ MAIN-LINE CODE I/0 ® TRANSFER CLEAR FLAGS READ CMD BUFFER SET UP QIO FOR LUN SET LUN=0 fiinwej><:> EXECUTE QIO WITH AST O AP => CONTROL PARAMETER CALL 1/0 ROUTINE CHECK STATUS AND DIAGNOSTIC BUFFERS = ) INCREMENT LUN 4 DONE ALL UNITS ERROR YES LOAD ERROR STATUS IN ERROR BUFFER AND SET ERROR FLAG FORUNIT YES HIBERNATE C) UNIT TRANSFERS YES DONE NO A INCREMENT PASS NUMBER PRINT MESSAGE FOR EACH ERROR | YES e ) @ ® SET UNIT FLAG 170 ROUTINE WAKE MAIN-LINE (TESTN) e ) TK-3011 Figure I/0 12-3 Coordination of Transfers 12-8 with an AST Coding Conventions and Procedures 5 4 3 2 1 0 UNIT DONE FLAGS UNIT ERROR FLAGS 1 2N COMMAND POINTERS - 2 o 0 e N COMMAND BUFFER UNIT ERROR BUFFERS 1 TK-3010 Figure 12-4 Data Structures 12-9 that Support the AST VAX Diagnostic Design Guide 12.6 EXCEPTION HANDLERS AND CONDITION HANDLERS Use of a handler routine increases the ability of a diagnostic program to deal with a hostile environment. It enables the program to detect, and in some cases recover from, exceptions (including machine checks) that would otherwise cause the program to abort. If your program may generate exceptions under some conditions, you should design a handler with those specific exceptions in mind. All conditions not handled by the program are reported by the supervisor. There are two ways to deal with exceptions in the system: exception handlers and condition handlers. First, should level 3 use the implement address of diagnostic programs that test processor specific functions Set Vector supervisor service ($DS SETVEC x) to exception (SCB). When VAX handlers. The Set the exception handler the exception condition is entered directly. Use exception system control block mechanism. into Vector the occurs, handlers service system the loads control exception primarily to the block handler test the Level 2 and 2R diagnostic programs, and level 3 programs that are not processor specific, should use condition handlers to deal with exceptions. Those routines in a program which may generate exceptions should begin with instructions that declare the condition handler mechanism. You should move the address of the condition handler routine to the stack 1location that the frame pointer points to, as shown in Example 12-1, MOVAL Example 12-1 COND HANDLER, Declaration of a (FP) Condition Handler This declaration enables the exception dispatcher routine in VMS or the supervisor to search the stack until it finds this address. The dispatcher routine then calls the condition handler. The condition handler is treated as a called procedure. As such it must end with an RET instruction. Figure 12-5 is a flowchart showing the organization of a typical condition handler. It could be used in conjunction with the test routine shown in Figure 12-2., In that case, exceptions might be expected while the I/O transfers are in progress and the test code is looping at step 9. 12-10 Coding Conventions and Procedures CONDITION HANDLER A GET POINTER TO SIGNAL ARRAY A GET CONDITION NAME CODE FROM SIGNAL ARRAY EXPE%TED EXCEPTION | ggfiitfiffigfi?w SET ERROR FLAGS RESIGNAL (TO RETURN TO SUPERVISOR) SUNWIND_S SET ERROR FLAGS (TO RETURN TO MAIN - LINE) CONTINUE (TO RETURN TO NEXT INSTRUCTION) = ) TK-3006 Figure 12-5 Condition Handler 12-11 Flowchart VAX Diagnostic Design Guide When the dispatcher fault causing routine in VMS which violation dispatcher the examines the stack and vectors occurred, in order handler. register longword The dispatcher images backward in each frame to When dispatcher the the exception occurs, an exception or the supervisor gains control. The for the access mode in to 1locate a condition follows the saved frame pointer (FP) through the stack. It checks the first determine whether it is non-zero. locates the address of the condition handler loaded previously, it constructs an argument list and calls the handler. The argument list consists of two addresses that point to longword arrays, as shown in Figure 12-6. N ARGUMENT LIST CONDITION NAME 2 SIGNAL ARRAY ADR ADDITIONAL - ARGUMENTS, _ - IF ANY SIGNAL _ | ARRAY MECHANISM ARRAY ADR PC PSL 4 ESTABLISHER FRAME MECHANISM EPT ARRAY DEPTH RO R1 TK-3008 Figure 12-6 Condition Handler and Associated 12-12 Argument Arrays List Coding The first address in the argument list Conventions and Procedures points to the signal array. the mechanism arguments. the number of longword The second points to an array containing The first longword of each array shows arguments in the array. The condition handler routine should get the pointer to the signal array (Figure 12-5) and then find the condition name code. The handler can then check the <condition code name and take appropriate action. The as condition shown in handler Figure can handle exceptions in any of three ways, 12-5. Continue Unwind Resignal If the the condition required Example handler function, 12-2, and can executes MOVZWL deal moves the the with RET #SS$_CONTINUE, the continue exception, code to R@, it performs as shown in instruction. R# RET Example 12-2 Continue from a Condition Handler The continue code return control to is a signal to the exception dispatcher to the instruction that was executing when the exception occurred. Since the same exception will probably occur again unless the condition causing the exception has been fixed, care should be used with the continue function. For example, if the program is polling devices to determine what devices are on the system, or if the program is sizing memory, access violations will probably result, causing exceptions. The condition handler may have to <change the address to be accessed next before returning control to the program. When the resignal If the handler handler or cannot unwind, deal program must should resignal, MOVZWL with a on the depending abort, #SSS$ giving as shown RESIGNAL, given condition, control in it can condition. to Example either ' the supervisor, the 12-3. R# RET Example If the a program is exception routine require the 12-3 Resignal executing may have and a Return from subroutine occurred can be corrected. If 12-13 the Condition when because of failure. Such an exception, while return from the subroutine to the problem a the an Handler exception error such as occurs, an AST not catastrophic, may main-line code before subroutine has declared the VAX Diagnostic Design Guide condition handler, the handler should call the Unwind system service (SUNWIND x), generally without arguments. The Unwind system service 1iIs available to 1level 2, 2R, and 3 diagnostic programs. Refer to the VAX/VMS System Services Reference Manual for details on UNWIND. However, the unwind operation is complex, and should be used with care. The stack is then unwound to the next higher 1level and control is returned to the return PC for that procedure (the location to which control would have returned following normal completion of the routine that caused the exception), as shown in Figure information to the test code test code should, of course, messages as appropriate. 12.7 Macros 12-5. The handler should pass error via flags and status buffers. The check these flags and print error USER-DEFINED MACROS defined by the user contribution to any user-defined macros than it would categories: be (programmer) diagnostic should otherwise. be program. more Most make A readable user-defined macros that build data macros that build executable an program and important that easier uses to code fall into two developed for one macros structures code 12.7.1 Data Structure Macros Most data structures are repetitive. A pattern item is repeated continuously to form a table. If the table is long, building it and making changes to it can be tedious. Consider the table of addresses and labeled strings in Example 1.2'-4:0 <STAR, SUN,MOON, ROCK> .ADDRESS T .ADDRESS W TSUN MOON TROCK Ny Ne .ASCIC /STAR/ .ASCIC /SUN/ Example 12-4 user-defined A Table macro STRSET of STRSET arguments STAR, SUN, MOON, definition for STRSET. «MACRO N .ASCIC /MOON/ .ASCIC /ROCK/ Ne T _MOON: T ROCK: The Wy T_STAR .ADDRESS T STAR: T SUN: W $$ T1 .ADDRESS Wy .LONG WTMy STRSET and C) $SST1=$S$T1+1 address address builds ROCK. of of string string Generate ASCIC Generate ASCIC Generate ASCIC Generate ASCIC Addresses and this Example string. string. string. string. Strings table, 12-5 given shows the the macro STRINGS $ST1=0 . IRP Insert count of strings. address of string address of string ; X ,<STRINGS> 12-14 , counter ; Count the number of Coding Conventions and . ENDR C) T_'x: . LONG $ST1 . IRP (3 X,<STRINGS> . ADDRESS T 'X' . ENDR . IRP X,<STRINGS> .AscIc strings. ; Insert count of strings. ; address of string /X/ . ENDR ; Procedures ; Generate ASCIC string. . ENDM Example 12-5 A Data Structure Macro Definition Three indefinite repeat macros definition. After the counter (IRP) $$T1 make up most of is initialized, pointer to be generated. of the table you can produce this macro the first indefinite repeat macro C) counts the number of strings to be set up. The second indefinite repeat macro () sets up an address for each ASCIC string It adds an ASCIC However, with a "T_" prefix to each string, making labels and pointers to the labels. for by The third indefinite repeat each string given. that you define for with formats macro may 12.7.2 not be The useful your in macro format every program, generates program. produced data string this macros structures that are appropriate. Macros that Build Executable Code You can deal in two ways with functions that must be repeated often: building macros or building subroutines. Consider the trade-offs before choosing either. Macros require more memory space than subroutines but execute more efficiently. Subroutines save on memory space but require a greater overhead in execution time. In general, you should use macros for repeated short segments of code. Subroutines are useful for implementing longer or more complex coding sequences. Be sure that user-defined macros are expanded in the listing. Use the listing directives, .LIST and .NLIST, to control the listing of the macro expansion, as shown in Example 12-6 (refer to the VAX-11] Macro Language Reference Manual for more details). an error. .MACRO VERIFY .NLIST argument to check DEVADR,FUNC, TEST, CMP Wy N MEB PUSHL CMP PUSHL WNe PUSHL TEST PUSHL FUNC WMy .LIST DEVADR CALLS MEB #4, Example 12-6 Expand macro. Save expected Save Save pattern. test pattern. function. We for example shows a user-defined macro that builds an from test data and calls a subroutine (CK VERIFY) Save address of device We This list register. ; Disable macro CK_VERIFY expansion. « ENDM A Macro that Generates 12-15 Executable Code VAX Diagnostic Design Guide 12.7.3 Build Macro Libraries a separate diagnostic 1library file program. for user-defined macros for each In this way, the macros are available globally and available to other programs as well. Create a library from the file with a DCL command, as shown in Example 12-7. $ LIB<name_ofi_1ibrary>/CREATE::::MAC/—SZ=<source—name> Example 12~7 Creating a Library List all of the required macro libraries (user-defined and VAX family libraries) in the include files section of each program module, as shown in Example 12-8. Include Files: N “Ne¢ w9 .SBTTL DECLARATIONS . LIBRARY . LIBRARY : VAX family diagnostic library ; DZ unique macro library \LB:DIAG.MLB\ \ESDAA.MLB\ Example 12-8 1Include Files SYMBOL NAMING CONVENTIONS 12.8 Two types of global symbols are used in the VAX diagnostic system: public symbols and private symbols. 12.8.1. Public Symbols The diagnostic supervisor, the VMS operating system, and other DIGITAL software facilities use public symbols throughout.rs All and DIGITAL public symbols contain a currency sign ($). Custome cy curren t withou diagnostic engineers are advised to use symbols signs in order to avoid future conflicts. Private Symbols 12.8.2 Diagnostic engineers should apply the following conventions to produce useful private symbols that convey as much information as possible about the entities they name. 1. A private symbol is an alphanumeric string of up to 15 It consists of letters a through characters in length. z and A through Z, digits @ through 9, and the special Characters underline (), and dot (.). distinguish not does assembler The ° between uppercase and lowercase alphabetic characters Thus "symbol", "SYMBOL", constituting a symbol. "SyMbOl", etc., are all interpreted as equivalent. 12-16 Coding To minimize reader Conventions confusion, symbols. Lowercase should and in text strings. °® The underline character never use used only be () is used lowercase to in in comments separate the name. wunderline when constructing readability and comprehension. Freely use names to of a compound (or the In Procedures qualified) parts ® and Make sure general, placing an would go. that your follow the underscore symbols rules ( ) are for unique. DIGITAL public where the use descriptive currency macros simply a names, sign - User-defined improve and ($) unique name. Global of the entry form: point names that have to are not nonstandard calls are entryname Rn where register RO Rn preserved. Note that at least the caller of such an entry point must include registers R2 through Rn in its own entry mask. Global variable names are of the form: Gt_variablename The letter G stands for global variable and the t is a letter representing the type of the variable as defined in Paragraph 12.8.3. Addressable the global letter G) and arrays are of use the the letter A (instead of form: Atarrayname The letter A stands for letters representing according to the list Structure offset global array and t is one the type of the array in Paragraph 12.8.3. names are of the of the element form: structure t fieldname The t is a letter representing the data type of the field as defined in the next section. The value of the symbol is the byte offset to the start of the datum in the structure. 12-17 VAX Diagnostic Design Guide the field offset bit Structure and single bit names are of form: structure_V_fieldname The value of the symbol is the bit offset from the start (not from the start of the of the containing field control block). Structure bit field size names are of the form: e S fieldname structur The value the is symbol the of number of bits in the field. 10. names Structure mask are of the form: ure M fieldname struct The value of the symbol is a mask with bits set for each bit in the field. This mask is not right Jjustified. Rather, it has structure V fieldname zero bits on the right. 11. Structure constant value names are of the form: me e constantna Kctur stru Object Data Types 12.8.3 Use the letters listed and types in Table 12-1 to indicated. functions ~ OZRrRUuHIOTMEUOLY TM 1) cr tr O Table 12-1 represent the various data Object Data Types Data Type or Usage address byte integer single character double-precision floating single-precision floating DIGITAL reserved to general value integer value for counters reserved for integer extensions reserved to customers for escape to other codes constant longword field integer mask numeric string (all byte forms) reserved to DEC as an escape to 12-18 other codes Coding Table Letter Data NKXE<CHNITOW 12-1 packed N, Object Data Types Or and Procedures (Cont) Usage string quadword integer reserved field for records size text (character) smallest unit of field position word integer and T dependent (generic) (generic) strings character count I/0O are or reference (BLISS) nonstandard typically records storage field they variable contain length. a Frequently byte-sized digit preceding the string. If so, the location to the count. Counted strings cannot be passed Instead, a string descriptor is generated. points 12.9 Assemble file (assembler); dependent or offset CALLs. string addressable context unspecified P, (structure) context structures for Type Conventions ASSEMBLY AND LINK each module in a (.0OBJ) all and a listing in or or in PROCEDURES program file separately, (.LIS). Then creating 1link the an object object files the modules together to produce an executable file (.EXE) and a map (.MAP). Use the CONTIGUOUS and SYSTEM switches with the Link command. Example 12-9 shows the assembly and linking of three modules. $MACRO/LIS HEADER SMACRO/LIS TESTA SMACRO/LIS TESTB SLINK/EXE:SAMPLE/MAP/FULL/CONTIGUOUS/SYSTEM: 200 Example 12-9 Assembly 12-19 and Link HEADER, TESTA, TESTB Commands CHAPTER EXTERNAL Diagnostic run, and program programs they that breaks or comes to a considerations Program APT should should be run down INTERFACE DIAGNOSTIC reliable, simple under easily a variety under of automated to set up, easy to circumstances. product test A (APT) stop in a script file is limited in value. of this type are especially important: set 13 CONSIDERATIONS Eight up constraints Scripting constraints Run-time consideration Parallel versus serial Looping constraints Volume Long 13.1 In testing verification silences PROGRAM SET general, UP diagnostic modifications to the programs hardware. should However, on not require special some devices abnormal jumper configurations or loop-back cables are necessary in enable the program to test specific logic or functions. order to Keep set up requirements of this tests that require special set up sort in a to a minimum. Place all separate program section. In this way, the operator may run a quick verification check on the device without making changes to the hardware. Then, 1if he suspects a problem in the area left untested, he can make the special for 13.2 All hardware set up and select the appropriate program section execution. AUTOMATED PRODUCT TEST (APT) CONSTRAINTS diagnostic programs should be executable VAX environment. First, APT the imposes three constraints. program must be able to yield in the APT of the control processor within 3 seconds at any time, following the typing of Control C by the operator. This means that any potentially 1long 1loops or operations must contain the $DS_BREAK macro at Second, the overlays, program the at APT since must environment it load microcode assembly appropriate must cannot will open microcode be points. built not files. into a into the accept This program means that microprogrammable diagnostic image if a device, program file time. Third, any tests that prompt the operator for a response must be placed in a separate, manual intervention section that will not be executed under APT. The program will fail if it executes an instruction that 13-1 prompts the operator under APT. VAX Diagnostic Design Guide SCRIPTING CONSTRAINTS 13.3 When diagnostic programs run under the control of a script file, no operator is present to answer questions or perform other tasks. Therefore, placed in all functions that require operator intervention section that a manual message) . However, action should be is not executed x macros will normally $DS_ASKxxx unless explicitly selected. the 1if the operator, not the script, from responses solicit prompt the for 13-1 Example (see program is running under a script macros prompt to program, diagnostic as the programmer the if volume for disk ~or a on tape prompt string with a null code the should he Example 13-2 shows the first character. $DS ASKxXX X the using is verification prompt message be used with a $DS ASKxxx x macro to prompt the operator for response, even when the program is running under a script file. to a .ASCIC \ DO YOU WANT TO CONTINUE?\ A Normal Prompt Message for the $DS_ASKxxx_x Macro Example 13-1 .ASCIC (9) \ DO YOU WANT TO CONTINUE?\ A Special Prompt Message that Causes Example 13-2 Scripted Rejection of For details further on Responses verification, volume Paragraph to refér 13.7. RUN-TIME CONSIDERATIONS 13.4 In general, diagnostic programs should execute in as little time Programmers should be especially careful to optimize as possible. Three considerations are execution time on 1long programs. important. particularly First, design, where make exhaustive tests are run optional. a quick essential For to example, program the a given if test repeats a function with a large number of data patterns, choose basic patterns for the quick run and make the extra patterns optional. make Second, message tends your to be information time and than nothing. messages error efficient, more conveyed, than efficient. in terms several of small One execution And you can improve the value of your messages if Unnecessary information only pertinent registers. Third, make the possible. 13.5 Most scope A long loops for level are designed to test type. 13-2 several messages. you dump 1is worse 3 programs as short scope loop is generally hard PARALLEL VERSUS SERIAL TESTING programs device : large to units of a as use. particular External Interface Diagnostic Considerations Serial testing is useful for basic programs that test logic and provide scope loops. Therefore, all level 3 programs should test units serially. In serial testing, the initialization routine normally determines which unit is to be tested next. The entire program is run on the unit selected. Then, control returns to the initialization routine, and the next unit is selected. The program completes one pass only when it has Alternatively, each test in a program may test before passing control to the next test. Parallel testing magnetic media example, a is and useful for devices that then required functions processor than serial Parallel testing 13.6 Avoid LOOPING CONSTRAINTS making tight some supervisor program hangs operator will in be do that a loop that to 13.7 VOLUME VERIFICATION Diagnostic programs that use a destroying the fail-safe the volume possible scratch ID unknown ID the program the media of the 13.8 LONG Diagnostic a for $DS_BREAK Control not check of for the or If the C, the Control system. write on magnetic media (disk or tape) that prevents them from accidentally a customer. identifies does program macro C. on the These media programs under should test for three test it the volume should not respond should abort make no as prompt "scratch" the (time-out) testing on or the assumptions it should operator before types unit about a in carriage question. the volume SILENCES programs with long execution times should avoid long order to assure the operator that the program is properly, the program should type a message (a summary, silences. for AST include more programs. ID The program should identification. running diagnostic 1is approach Otherwise, operator verify without therefore, control continuing. return, access. cases: proceed. If that memory independently checks does regain identification unrecognizable If not that call programs For transfers on several units under test may perform the and media loops 2R direct testing, for service unable and long units simultaneously intervention. efficient 2 perform program can initiate hibernate. All of the and must level tested all units. all units serially In example) at least once every five routine to perform this function. 13-3 minutes. You can set up an DEBUGGING CHAPTER 14 TEST DESIGN If you fail to design and code your diagnostic program carefully, the debugging phase may require more effort than the development phase. However, even in the most carefully constructed program, a wide variety of errors may develop. Many of the coding errors will appear during initial program assembly, 1linking, and execution. Some types of design errors, however, may dgo undetected until you make a thorough quality assurance (QA) check. The debug features necessary an error set a tools at 1is connected breakpoint Deposit, of this and Next the with to supervisor point. a specific get provide 1In general, there. commands to when area of Then proceed locate the the you with the you suspect that program, you with can Examine, problem and ¢try solutions. 14,1 COMMON Some coding programs. CODING errors Others ERRORS are unique to wide of methods. obvious, The list which of the applications diagnostic errors are catastrophic and identify or unpredictable. some specific variety And while some programming others may be difficult to explains to a or follows are AND THEIR SYMPTOMS common most common errors and their symptoms. 14.1.1 Endless Sometime sleep C after Loops the program (silent death). started, the symptoms of even be computer unresponsive to appears the to Control command. An endless loop program checks is never set. You can avoid loops until force time the the will a bit bit this is (perhaps kind 5 a status of error set, seconds). to 14.1.2 Forgetting the produce in an register, endless by program to branch out of condition If has It may the program initialization For example, device, test The code this If the example, and then up a watchdog timer loop will setting result if the bit to the loop at the end of a given that follows should report the operator. Initialization behaves or in an cleanup erratic failure. when the program B may initialize way, performs a conditions necessary both to test B and to test C. the device as well, an program to loop on test Make sure that each stand alone. initialization type. for and error may result it may be because of an sequence of tests on a on the device that are Unless test C initializes if the operator a program causes the C. test cleanup within functions 14-1 necessary to performs enable it the to VAX Diagnostic Design Guide 14.1.3 Forgetting Return Status If interrupts occur when they are unexpected, or the program indicates a hardware failure where none exists, the problem may be return status codes. to related a test A. If step A involves a that be may it steps, sequential involves that In successful execution of step B depends on prior completion of step subroutine, to proceeding and take other and loose successfully, control Step to the the check the appropriate interrupts. disables supervisor service or a call should If step B. executed not was code the return status if, in which step A unexpected B may encounter in error the report Consider a case supervisor before indicates that step A program can the steps. to a program status return fact, interrupts interrupts have not been disabled. 14.1.4 Neglecting to Save Registers Erratic (clobbering). of the contents of a register Make from program behavior may result general your that sure inadvertent destruction previous contents of the program saves the save the contents of registers when control passes from the main-line code to a You subroutine. should registers all (RO through R1l1l) which the subroutine uses, whether or not you think Failure to do this may that they all contain useful data. introduce bugs that are very difficult to isolate. Use of the register save mask procedure is the most efficient way to preserve the register contents. 14.1.5 Forgetting the Context or Properties of an Instruction though it makes no direct reference to that register or location, Your program may if you forget For example, contexts of clobber a the context or R@ a MOVC3 through references memory properties of an R5. instruction is too slow to For and it may cause Instead, you should (Branch on Bit Set) slow or instruction. unreliable destroys the if they make I/0 operate efficiently problems. the BIT is In the unreliable (Bit Test) Field) (Extract EXTV an example, instruction use even : program may be incorrectly. location, instruction Character) (Move register, In or Improper Context for I/0 References 14.1.6 Portions of a branch register on same in an the I/O device BBS way, the I/O context. then instruction and conditionally. addition, references. be sure Unibus to use device the correct registers data require types word references. Massbus device registers, RH780 registers, registers require longword (32-bit) references. 14-2 for 1I/0 (16-bit) and DW780 Debugging 14.1.7 Do Forgetting not the Number Sign forget to put the number front of literals in statements when appropriate or required. Stack may supervisor instructions or Underflow and overflow memory or instructions make keep the the straight where there is if passing wiping you use of potential Use for stack diagnostic program of up the program the development standard process, release. quality the This program. a diagnostic of in assembly and simple, and the pop The CALLS CALLS or and they CALLG, problems. last stage in a vital is it 1leads check process. of push stage and Five distinct assurance portions the parameters automatically. a out subroutines. QUALITY ASSURANCE PROCEDURES 14.2 The quality assurance process forms development operands Overflow when calling stack therefore, literal underflow, buffers, incorrectly CALLG and in language stack calls (#) lists The macro (#) argument 14.1.8 for sign Test Design to the part formal procedures make specification check conventions check fault detection and operational check user No mode reporting check check diagnostic program 1is complete until these checks have been made. 14.2.1 After Specification Check you have completed program, you must ensure manual) . Make design and operational all functional this concerned phase of 14.2.2 check in groups and training a with Conventions documenting (e.g., use of (refer the the diagnostic in the VAX-11l Software Engineering Manual. the six questions listed follow analyze 11, below are program understanding to must (refer to Chapters 6, the diagnostic test Include 4 content people field review of as the this and from service, the initial program. Check program Is a implemented Chapter engineering, Treat diagnostic 1. to review. The this manual to regard formal training). in and specifications requirements, manufacturing, coding that you have completely of the conventions 12 and 13 test code? 14-3 Positive particularly documentation each set answers in and to important. sufficient without forth in particular) requiring to the convey reader VAX Diagnostic Design Guide 2. Do all the 3. bit and relevant Does the program supervisor 4, Do 5. formats agree error Chapter 8 this manual. of all error from Is reporting error Load and that the names from the diagnostic of with the except subtest from the standards See Example system bodies cleanup fatal set for 8-23 in messages (main-line code)? code avoided? Execution Check the commands the test or features messages? messages reported follow services)? basic sure sequence channel and 14.2.3 Check correctly use (e.g. error mnemonics specification? header Are 6. Make the register hardware diagnostic in ability the of program diagnostic executes supervisor the 1load without and errors. the program to perform the following pass beginning with a load and functions. 1. An error free normal start procedure. 2. Multiple error free passes. 3. A trace of program with 4, A loop 5. Multiple loop on test. 6. Infinite loop on test. 7. Error in 14.2.4 Verify on the test free Fault of and and program. Introduce inserting incorrect data. failures. Use this for the program 1. 2. All error procedure following reports Loop-on—-error properly for all test, flag with program Reporting detection diagnostic the each Trace set. no sections errors. not included section. Detection fault for execution the default the check the to by will check capability setting produce each of the breakpoints and data unique comparison test case in features. function and each faults This Check reporting properly. halt-on-error detectable 14-4 error. facilities function Debugging Test Design The four unique 5.3.3. error report. of this manual. Error reports with IE3, IES) flags should Refer accurately the error reports properly under adverse fault insertion. When the a wunit functions under meaningful test is message and then returns interpreter. For capable of write faults powered to the problem, command line devices each Paragraph 5, callout physical gives Chapter reports for module verify Checks program to inhibit properly reflect must Operational that the that function You sure Make conditions. 1. control IE2, report. 14.2.5 execution (IE1, the off, the operator, control to protection that the which they program explaining supervisor are write protected, the program reports the problem with a meaningful message (without bad side effects). The program then returns control to the supervisor command line interpreter. For devices capable of being placed off-line, unit under test is placed off-line, the an appropriate message and returns supervisor command line interpreter. The program runs under APT-VAX when the program types control to out the control. The program runs in the minimum system stated in the functional specification. configuration The program runs in the maximum system stated in the functional specification. configuration The program runs with each appropriate module extended on a module extension board. (Perform this check one module at a time, making one complete pass per module.) If the program requirements VAX of is transportable, Paragraphs Family computer 14.2.1 it through satisfies 14.2.4 on the all types. 14.2.6 User Mode Checks Make sure that level 2 and level 2R diagnostic programs run in the user mode with the latest version of VMS. The program should run multiple passes without encountering software problems. When program execution is aborted, the unit under test should be left in the state in which the program found it. 14-5 VAX Diagnostic Design Guide 14.3 DEBUG AND UTILITY COMMANDS IN THE DIAGNOSTIC SUPERVISOR This group of commands provides the operator with the ability to isolate errors and to alter diagnostic program code. The supervisor allows up to 15 simultaneous breakpoints within the program. The operator can also examine and/or modify the program image in memory. 14.3.1 Set Base Command Syntax: SET BASE This command <address><CR> loads the address specified into a software register. This number is then used as a base to which the address specified in the Set Breakpoint, added. commands 1is should be set referencing code the section program to in the Clear Breakpoint, The diagnostic program (see address the base referenced. Examine, command Base Set Then the the PC is and Deposit useful when 1listings. The base numbers provided program link map) of in the listings can be used directly in referencing locations in the program For sections. example: DS> SET BASE E@0 Set the base address to the beginning of the psect of the routine under examination. DS> Example 14-1 Set Base Command NOTE Virtual address when (normally) turned See Example 14-7 14.3.2 Set command execution command. within address management is further clarification. Breakpoint Command causes <address><CR> control encounters A ©physical off. SET BREAKPOINT Syntax: This for = memory maximum the diagnostic the of to pass <address> 15 to the simultaneous program. 14-6 supervisor when breakpoints can previously specified program by be this set Debugging For example: DS> SET BREAKPOINT 30 Set at a base command location clears specified specified argument the by address, of ALL For example: DS> CLEAR <address>. clears error all BREAKPOINT memory Command <address> ! previously no the Command ALL<KCR> set breakpoint at no breakpoint existed If message previously 30 is given. defined the An at the optional breakpoints. gom This Breakpoint BREAKPOINT Breakpoint Clear O Clear CLEAR Set address. at the gum 14.3.3 Syntax: 14-2 of is offset = Example Design breakpoint an offset from the 30 Test breakpoint the base address. location 3¢ which from DS> Example 14-3 Clear 14.3.4 Show Breakpoints Syntax: SHOW BREAKPOINTS<CR> This command For example: DS> SHOW BREAKPOINTS CURRENT displays all Breakpoint Command Command currently defined 1 Display ! currently breakpoints. breakpoints set. BREAKPOINTS: PPOBOE30 (x) DS> Example 14-4 Show Breakpoints 14.3.5 Set Default Command Syntax: SET DEFAULT <argument-1list><CR> This command and Deposit data 1length qualifiers causes setting of commands. The default and/or are present, default Data Length: qualifiers for the Examine <argument-list> argument consists of radix default qualifiers. If both they are separated one default qualifier is specified, Initial defaults are HEX and LONG. Radix: Command Byte, Hexadecimal, Word, Long Decimal, 14-7 by a comma. If only the other one is not affected. Default qualifiers are: Octal VAX Diagnostic Design Guide For example: DS> SET DEFAULT BYTE, DECIMAL Set the default data length qualifier as byte and the default radix qualifier as decimal. DS> Example 14-5 Set Default Command Examine Command 14.3.6 EXAMINE Syntax: [<address>] [<qualifiers>] <CR> The Examine command displays the contents of memory in the format 1If no qualifiers are specified, the described by the qualifiers. default qualifiers set by a previous set Default command are used. The applicable qualifiers are described in Table 14-1. Examine Command Qualifier Descriptions Table 14-1 When Qualifier Description /B /W /L /H Address points to a byte Address points to a word Address points to a longword Display in hexadecimal radix /D Display in /0 /A Display Display in octal radix in ASCII bytes specified, the <address> decimal argument is radix accepted in hexadecimal format unless some other radix has been set with the set default command. Optionally, <address> may be specified in decimal, octal, or hexadecimal, by immediately preceding the address argument with %D, %0, or %X, respectively. <Address> may also be one of the following: R@-R1l1l, AP, FP, SP, PC, PSL. For example: DS> EXAMINE 30 Display the of is the 08000E30: contents the longword which offset 30 from base address. DO513DO1 DS> Example 14-6 Examine Command Debugging 14.3.7 Deposit Command Syntax: DEPOSIT [<qualifiers>] <address> Test Design <data><CR> This command accepts data and writes it into the memory location specified by <address> in the format described by the qualifiers. If no qualifiers are specified, the default qualifiers are used. The applicable qualifiers are identical to those of the Examine command and described in Table 14-1. The <address> argument some other radix has is accepted in hexadecimal format unless been set with the Set Default command. <address> may be specified as decimal, octal, or by immediately preceding <address> with 3D, %0, or %X, Optionally, hexadecimal respectively. For example: DS> DEPOSIT/W/H 30 0001 Deposit in the offset the PO000BE30: @801 (hex) word 30 base from address. 0001 DS> Example See Example 14.3.8 14-1, 14-7 Deposit Command preceding. Next Command [number-of-instructions]<CR> Syntax: NEXT This command causes the supervisor to execute one machine language instruction. If you specify a number (decimal) after NEXT, the supervisor will execute that number of machine 1language instructions. The supervisor displays the PC of the next instruction and the contents of the next four bytes, after execution of Use command this suspect stopped a instruction. to problem. the For example: DS> NEXT g80@BE31: each ! step Do program at Execute the through not a use an the area Next of a program where you command unless you have breakpoint. next D@513D71 instruction. DS> Example 14-8 Next 14-9 Command APPENDIX A A SAMPLE DIAGNOSTIC PROGRAM VAX Diagnostic Design Guide VAXK/VTMMY S1APLES VAX/VMS VAX/VMS STAPLES STAPLES VAX/VMS VAX/VMS VAX/V*S STAPLES STAPLES STAPLES EEEEEEEEEE EEEEEEEEEE EE EE EE EE EEEEEEEE EEEEEEEE EE EE EE EE EEEEEFEEEE EEEEEEEEEE [ Y/Y BeAllGe 1D31D EVPRG 8eApG-1979 16215 LPAG: EVPRG 1379 16215 BeAUGS LPAGS EVPRG B=sAjG~1979 16315 LPARR BeAUG=1479 16215 LPARy EvPRG EVPRG vy Vy PPPPPPPP Vv vy vy vy Vv vy PPPPPPPE PP PP PP PP &R &R \A) vy -] PF RR Vv vV vy Vv A" PP PPPPPPRP PP PR PPPPPPPP RRRRFARK RRRRRRRR PP AR KRR PP KR RR Vv vv Vv vy vy Vv vy MM MM AAAAAA MM MM AAAAAA MMMM MMMM MMMM MMMM AA AA RK pR RR ar op 1] PP N PP PP 1323 PP PP $13s MM MM Ad AA PP MM MM PP MM AA AA PP MM MM AA AA PPPPPPPP 119 MM MM AA AA PPPPPPOP 1133 MM MM AAAAAAALAR MM MM AAAAAAAAAA PP PP 111 1313 MM MM AA AA PP H PP R] MM MM AA MM MM AA AA AR 2] : MM MM AA AA PP H STAPLES STAPLES STAPLES EVPRSG EVPRG EVPRG 8=AUG=1979 Qe AG=1979 B=aPGe1979 O3 1Y MArS DY DB ILDTIAMLESJEVFRL B8=AUG=1979 8=AUG=1979 16315 1611 DRVWE (STAPLES)EVPRG,MAP 33 VAX/VMS VAX/VMS§ BeAhGe1979 10115 EeaAUG=197Y 16215 DR4: [STAPLESIEVPRG,MAP3 DR [STAPLES}EVPRG,MAP)3 DB [STAPLESIEVPRG,MAP)3 VAX/VMY VAX/YMS VAX/VMS 16115 DBE [STAPLES)EVPRG,MAPS3 VAX/VM VAX/VYM! 8=AliG=1979 16:15 3 DR (STAPLES)JEVPRG,MAP VAR VMY GGEGEGLG6 GEHGGGGE6 ] 66 GG GG GG GGGGGE GGGGRG GG GG GG 6G GG G6 GGGGGG GG6GGG AR 1333 MM de=llUbelY/v 66 PP PPPPPPPF PpPPPPPP AA AA LPAL? RRRRRNRA QIRRRRRKA PP PP VAX/VMS VAX/VMS VAX/VMS LMAVE EVP R 16315 16315 16115 333333 13 333333 33 33 33 33 33 33 33 33 33 33 313 33 333333 333333 33 LPAB: 8=AlGe=1979 LPABg BR=AUG~=1979 LPav: BehdijG=1979 16115 16115 MAP} 3 DBt [STAPLES)EVPRG DB [STAPLESIEVPRG,MAP)3 VAX/ VM ! L1J3rEQ 3NQ0W SsISdONAS ! j o n s c s a c s c s c s a s n a s e s u v s e a n é I1S39¥TudNA3OdWINYN PvieONT3A0I S3l2A1LdnoT$SIrP8A.0O}3°1*T91u4Y98YdYaAY3T(Y$(36Y7Y3a1YvPaLviSiP]SI1LtIYna0dLQIX 6L6N1OL=9VNY3IVNa)gD36201i8v13a91Tlemx¥0YA1v3O¥Jd3OueNlPRE°280A OesNdeAnZccsaugsseasa YTysmsan 6L61=9nVel£191PyYTTH3IYNTILTIP2°1eXssensas 39vdt A Sample Diagnostic Program QIHONIW aIyorvw ¥4318N71271Nv430 3 n 39vd VAX Diagnostic Design Guide §3¥d496Av0l1d9 ""..'..'..'.."'..-..'l.."'.....".'.*’OYNHSON‘TITVINOI‘UENYIT3IX3 ON3 8906000 neugavde 9¥dA3 S¥dA3 *ouN*yIe INOT NG ONOT ONO ONOT DL e 9NOT 9eM0T 2 e ot 2 2 2 e 2 el2dvouy ¢levanay ndvoedna 32009 6npQeoRe 43v00¢ yvecorwy dvEvnaen 2qiunade vali:anew Jvedoe Jvedune n32000a Ngvenese w69d4K0g NulABAL QudAd 9¥dA3 |LEPLY e 2 2 ) 9Mm07 oMo INO" INOT INOT 30ve39v¢ 66 4 2 39vd 39vd 4 e I9NOT INOT - ddd‘TdUd4'3X3ON33OOOOOONENHNNNNHHDTTSI/DBDIDSIOTT1ONOOXSH‘’SU'XNEISS‘NNN’ON‘NUO3'7TYSIIIN¢'/NIH1NI2OE7’03OTNIJ8VT/‘‘1N3/13N83O2TPT1I7UNSON/‘1171‘33NH1¥334O/34SU8V0II7’YYHIN2THOE4SSS5INONONOfff‘N333NxxX333 ‘0¥ lym ‘ay Ly LEMON‘QY ‘0¥ L¥4 l‘yow L‘uqMOyN 18v" Jd920v08@ St LyMON‘Qy l‘¥Q8u LY¥MON‘QY lumoN‘QY 9udAl O¥dA3 el t194dA3 3148 3 9NOT 2 31lA6 6P 3lA8 9NO 22 9N01 L‘UM0ON dNNY3IN 194dA3 hoenovao 36200090 d92upeae gldpoenve ni20vb0e foepedue reQvLALy wo2oneoe d u e 3Vl n2voBe2Y n62oUpGYL TAT-BUT.T \ Lloovgee npevY2ee hJI2udde gae7enee 8tnscone hQeaeedd wELOVBYE neYvavoe 0 0 8 ¢ 2399 nne3l9o2v0e0s Llaoveweéy “i:d0a0ew AT TLTI T guvanden Aondenve vpdeue G crvdaeed PA0BVERY 39NOM39vdg¢ 626 6$L61=9n9Ve1g v L 2 0 Q 0 0 0 n y o e n 18179uY ¢Ll)2eLTvion £62 0 06% HJIlves1a 198dA3 Xg9THIviLvVQadTSM1a 6 l u o d v e dLIXvTiuTnae 1x347g9 3aN2IIlvnIo¥LsIaNnIs n3924040 @de390 AHVWWNE 12071834 194¢A3 ypave M 1403308VeadNSINYN ($)37nqow asva Ia22Te44vene ACdr d P O N D I T ‘ X 4 8 N I 4 A 0 O ‘ 1 N 9 7 1 H 3 8 H E O N ened Vv oe l2canbuy d‘OHNTBON‘T1I71 38/NOINSN 3X3 0d1‘ONHN3NSOOIX‘NH‘EITNI*OTT31NM01N‘1O3DU8‘HHENISTO3Nx3 t£a4g3ax3°9¥dA3([83dV18) wWYE90ud NOILJIS SISHONAS 1 dIONXDT13I8'NOI¥*3NHHENI'?TYBUT2°V1H@xEON A Sample Diagnostic 6 CYATL 94dA3 Program £ LYQUMYON . Al VAX Diagnostic Design Guide 119984ddAA33 e L8 03INIFNIL4TY 193dA3 1948dA3 198a8A3 198cA3 19udA3 19udAS GA3NTt430 JudA3 BET-LY] 94dA3 9udA3 9udA3 198dA3 9ydAl SudA3d 94dA3 194dA3 198dA3 19¥dA3 198dA3 N4I4N3O8LT97T1Q7919 94dA3 192dSXS13L4lAwAIdITTL74TiLLvTY1e LH2D8O1XI7W1n7d4T9LT Ldd0IOLNNSITTTHMXYX""SD LTI OX180TN170H19e8733191833871 SudAl LET-LE 9¥dA3 198dA3 39vd " M 287t €674 1ensTyvY QHOXTMT 9 AdELwdTMLTLY LaONVA7sWDITPLUE)TE INGNEITLTLO 19¥3iwd¥1V INIL39TLTLS H3ONTLTL1SH¥393947L7 2ENSTMHTY 19nv430MCAT1Y) QZISARYITNT2185187570QD9N T T Q9¥SITMT AN3S 202000800 1£24630X3°9udA3(637dY18) LQQ140X90I8447VVvAVNINIT Ah0eo2R0R2V00 42Y0a0?08aepBEOLOER 0v5I5S000000o1:9uynzYqIcN»EuI»ATaLIcT 80000 QYZISAWITHNT 2T310nLt»i403932Id22S020Tg0000)e200000038a0L0000 LAA1990Y9eL1OyyyIWIsNn¥¥RLIv3TvSSE4TI@IAG3N1NWAP6qTMIN8LYTTA1IELdNTILTE 1deOnNsTHyT"Y9 v2aS90000900 1L09%e=yyd!oLc1MYacYXs3I=ciinsnWgndYdcIvoMvancacansd! anva ¢donvsencsvacsdosasand * °8708mWAS aL2€024030ax030*9udA3(2A8aN3n3sSdTvMxi"sy] do18TMN'9 Y)29C9g1T2R0t343))I2s22TL0o00LTTcT02o00IToIIT0e00T g9A41LLQ99=9%09G=N~MyyyYyy=yLBMLNNIMLT1 TT¥9IIANYAOTNNTXLIOA0JWTTATLTEYXIVSTTILILTTILOYT~ 8724P]6891LT03635229-9980LT60000o03S0800o000gT00e00 =1L12H19IiYY68I8=Ve313L7y=y101Yy01BLN7yV2iYAyTLM 178ASUXII710dITS18NtX¥NH93ToiT=ypnLYTdaT 11}} ==- =¥ « 3I03V7IS8NuvIi4Av3IiA0N13y 1! A Samplé Diagnostic Program 9vd pNI2NtaINx TYILI]Y 2Oa18N09YW=0TOY0I 1BL6H590IOV0yN0T €1 o2 gt’entoutze enawd gt*tetontae °2n YXT =4 ! -t Guide Desig n VAX Diagnostic 9 3ovd =12 6§vd 1S108WAS V8019 40 HIEWNN pwue]uUbeod}IN)3NZ0J}QNE8pSo83y A Sample Diagnostic 6312 22¢ o|qef30$3U03U0)DLYACL]LYSLERL suojeae|38Q )G#nPauOleAP1v4B0uON8nyg aen non (91) s 9¥dAl 1 Sé ct) (st) Program wapw 9¢ i Ve 6A{AtyY ¢ L2 Jiregdt ‘g VAX Diagnostic Design Guide 10 9¥dAd vy e beue B¢B9U14RORJQ)USO|)OIQJUeASSOWPOODBuyO,JBOUS)IAPJUORLNWEO/DuOJJB8OIJ8OJCI0O3IUU)|00'004044) IVE)VS n s on wern sa ey ¢C 2hed Gaey 2iand Cirei 9y L9 w9 69 a4 11 viduid 9l Ss e e At + iL - oa P on [1d'ad + PRfoA0vvdeYneraca1eT Waey TYMEL 'd [ on aperod S6EL616=09N1V9a1y ey °1 169 {20 3040 BUC A(e JQOIdWLvNSyOOsENaBOlTV*BIUQS\OIVM<IyICIvGvwIdAaAUnNVTVHdNE3BBIIIsTT>IE+S2A°SSA8IN"OVIAuw(nlS) 4LT LR d1288S$aOGu003nNS$%¢8$0sTKT4XN4MI1IH333y74TN00x0uvYS7I4"14o0Y8NvYa037dQT8”=z72x430W217 ¢¢¢¢§J3o|8(SJXIeu3dsejBOU9ajuJBj8(ddUoY|3u;oreAudw2o5ey9See)J,duJaO0(wde09Oe9DeaNu88USj4}3d(|)a8jiQnpAJLBoOdogDudeVj)S[d/qsoAOUJnuQ8Odswu1{v)OSAu00J3BSeQis 2Q)jud4uUAATJISS$8OU3ASSPN0lS8R,4J804XO30Q)3|9L8IAOW J}380UBE}Qui.0ud91duex3 ¢peepine|nabu3dLl0I4N(|8I0}Q"TyuNHAt7'SeYOso18=x28€h ¢Xva0xoyW%OJ9)09UO|uBoUjRaAeUzCjDie)OPaOjUuWp A Sample Diagnostic AD0xjdJIRsvOJouIWbAQeN)jTq J‘(IWVAO0IUSOD9AJ ! sL eoeueRad e 1%<v}S.- Program 9NOT°*82 !alqeagyaBuUe|JO4GR°nhLpQuaoduwonA VAX Diagnostic Design Guide AJLdvbQadn‘=SL §dJOfUojwUAOR)SjOAIDSJ sa0L¢j&3Jqx=u)I!eidjNueD(wenNs su 04 Su Su 16 tovisvT 1 1) BALQBR0QyVA0 Itavpyeodesae B0veORvABYnLY nL,Be80VvCRdLER JQD9C0NeRA2YD gsuy G¢6bL34€i§1£02ehl9L3 1O‘93ILN¥X3YJ8OALIMS4TO0L°EN B2eENd IRy ,40000V0002LON0Y, 0,V3209 node2agvh P Su L] ou 1 on L,J080 0 3 ne n +* + 13‘i93Sv8I¢d1’T Sdued 9¥dA3 Avaet )Ay PIAl'AY @Vv A-12 Nty (ALTAS IRR U ey §Ui di P3RS S6 Y +4¢ ¥dAl jSMaIlsLulsv’dSIuadQoiTeasig olqel A Sample Diagnostic gvl S¢l YI]15 cuFroLey A-13 Program glenCIq %iqeimg03JOJU|Od4Osdupe T IVTP nel navn 80BL0eR A|LvgRd §R1 am! Py 3148274709 21 gAPR 13gLa” 9709 §21 w4ey! A-14 En du e AR VAX Diagnostic Design Guide 9¥dA3B°1A nSs 961 + an 861 #S1 S V60 povy -I Su 291 491 el St LL 6l Sa 141 Sa S nyi) Yoy tans 24nS d0ls on su B L1 Sit 1737849 %812 LIX3 w9‘1sL1u3I7Na5It3¢VTGYs o 641 lLel evé gne {2 2349 P4 L ¥ien se A-15 4 viné AT e tn A e re6l TR 9ol Bb61 on lel r4-} LRI éul tel A sn tel 9% Lol 861 16% bl sm Iul ¢ , 8 y | 0 3 P p a m M O | A Q d u B N , )iedv1 v Bn it e 1e1 on 051 Ny TIONYW OITLYAY LThyedpbyAPyutLdA |9(€Q0®IRQUo}3238g PUWO)wa39JdJdIJUl83J) |180204p8mO117|1337A7sQ8a0s81,.L‘d¢I0ulxNu3u7Vwe§e>]10‘804JOITdROJNRTUHOTYPOCAL*.d0s1a8nu 1$5¢ 17137803‘eu2uVe® "9126N8 sen D}380UBR}QwRuBOWdd|Uw¥x3 146L8E1]HNEO.Y311117|7729033037788P8784UI080°}3M088O|J‘‘8‘‘C¢A<IvuQuuJiftSvEiuuaJ®uvvTUVeeIeY$®>?AD,92,YUYEONiLO1uTSuY8""‘30%dd94XOO3NN0TTfJNNY1OT"gIY9NReJIAOPOCA11$L1o)4n*w28N8u A Sample Diagnostic Program <\d0i\>» L1IX39%7se1a9s ou LT DR N O?N VAX Diagnostic Design Guide i ou Ou nie 1te vg1eil2 o 212 Vv Ai ad uward 2°1A A-16 VeLeYRY +4! 222 g2 nQgy nQun ABAL née s2e 922 Leée 6e age 1g2 2¢e £€2 naes ..h ol2 Jee L 1 8 S ° [ 9 Q O 0 1 9 d I X I L ) A 2 9 5 W O NSN§SIn97SMN«CKWDNl LTIV A Sample Diagnostic 9 94NDY* + o e tn vee INOTLI3S cLauod) 17 Program VAX Diagnostic Design Guide 6 LayyTl 913.7¢ NLNIN <liNL?oTILILaNNICONNndN> BE°2OA 043K TTaXVA nte \9TILN \9@ad\ L90dyTMLfona" L niTMy 13 8¢" + une gt1 3% Lt g e n4Sh28oey0 2 1A 94dA3 31 9¢ 131 itv 08 NS SN Afp niee WO }300g Ixel (PQOLY [} 131 st 9¢ 11 e ige [ A-18 gns6n vole ryopeoRe,1810830,5081000,VY81000 6h A-19 ns 11 11 6h 9% J2 18 ns 113 t602ven§rs n&N2ancSy a6neyashr J162aehSnd 82&13ehS"n NS |1 4 I26€1nNA ns 1 an 32 Qs 6h 143+8610@4 992 s92 292 §92 nh 192 662 gse 2s 962 nse 2se $%2 S nS 6n 2S LS S40 2v6el1e0 31 o 141 ns 6% CRL ns 14 32 L $ S 1 G T L A D T L T nS 6n 2n 9nid 6he 131 hs ig hs TN 1€ 6h 162 Zne tne sne Lne 82 wse L19463LA0T1IT TN 1€ ns on 3 Je LN E /0T1TTRAN 11116723120 ¢TLIEPTLITIHISTL e \GLIQ’6L18 + I6 IR /RTLIOISTLIAN 8%3T4 ‘T I02TLITIACT « \gllQ’6Ll1 ‘92 1062118 0ELT0TELIAN T 211082i18 = \h2iI0¢c SE363:91 6L61=9NV=9 Q¥dAd A Sample Diagnostic Program 1ti9s8yTVy £S1t 4.1 6l sa S9 LA "l an ve ni €L ns 92L0 el g31a 319 9. ne 4 GERL 1e nee 182 g6e £82 nee 562 i8e 682 ee 2L Sum 982 gee Su ne ni €4 22 ne ni a2 12 S¢ 12 tvle 41YY Qe on WLYI0A L038l gnQlo el 2l ae 89 2L 2l il 02 o929 B 2s 22 2t 1t ¢lS9 89 82 8°tA §i19 "9 £n £S 9L F19 LA 9L al 4¢ ee 48 F11 2 F11 we 11 g2 £9 @e )CYPTY * gL¢ 6l 9L Lie as S 98 A(IW0®XOSQ9L eLe §L2 Qs 9610 9014 o Jod 1X-Y4 1J03s4* LA b3¢ wLa 142 oa RETENT ML) o PIyda0ONTLTLY e LT L9 120A08WYT |} > PIyu303NT4TLY 383INTILIAOTLTID ON\83jA8pvairsiBau\¥OJO VAX Diagnostic Design Guide 2lez 49a2l 20 :B0yJRuJO)SIUPWOIRIESyPISNO3928UyJO[ewPO'3908S)0 61499689%n2l6w9230892§628N2NwL22S3262530122442211V22g00N9Sn9LSg2é2uy% A%13 AR sdox(X)mxt &\/t1avt €9S98LS9@2593969nLSL492l 2gen H¢L93SO96029Sn9l3S9L6492nlLwSL23S9v2iL602909lq1v8d2i9d ¢¢PPRRIICRLLJIISOOOSSy}}OI8J8e0EW|UOII;NNAOIISNNIOOUI*L‘SISIIULUPIPWEWRAIIGENAIIJSSESBY)JOUJEIBESBIUW'BUPINOIQANS Vet et nt vaévs Lo vee2 662 ]JPw4ie3J08dw0bluOBdxOl +4 o! df neey g2t 42 12 .0 ei20 Jiev Sy heg Ticg 2Lewn 21 sgLe2n (TY-Y4-' ve y+20 61§ 141 17I1A9XIANYW AST 13x3aNv3I7LTL9 vgew L1s ule 8424 Slawu elg siea [B81 Siay 431 sien nig £ qlen 91¢ sig $3IXILINITLTLS nt 4528 LPYIMOXLIWdTLT vaen -Y-Y4 962 72 020 y R¢9°tAnL9 S9 OL 9L|9s(n0Q0€2I@x2al42v0)1238.09 V2w $$I18Aa2dMXLIILNWEdT2TJLIlTToLLsSYv* I\ tpe3deax3 \N(X)MX) S@g¢8926@26&2288£9§9S8S8224L2(L2S5S188¥92%S1&102@nI923n21vv2gg©2n,vL98Z a2J29n5e2gé89dw LPSENILWAT1L3TSV° /t 1at®den wx! I 1 I 0 8 V ° * / I \ ( ® } p 3 p u l B 2 S U ) A n 0 d 4@g2/2431L192913Q3929486nQ299ItShSi29Ll3€£2n4S2lL5nS¢41299L2£3Sv32992l3SS"3n29L92844S§2L2LL9S1€A1n2299L2JS64S90L2d96tQ9VuH3e9e2E2edY14t JJIJJsSVv° *°*/I1\dANJUOWRwEN|gYOuuw})I3Ni0JOoJdos\/1)°I\Np/0P1OO°Y3P9NOy3OIX\N®/J1O°XPdO3INJOX® )CETTY A Sample Diagnostic Program 2o1A VW]o@j}ae2}89P0 |OWO)VS5Ou1yB8D2°$4839P8U00OoYujbIee2)JjOeB)}aAvJ]RTN8Spo)8|95Bj4dBUINOJ)mY3@TVSUOHIINUABU) 8¢ 9J2w)N,IlBJdOuUBSAeORx)3J(gQ s3en X417 2 nes £32v g3 92¢ CET4Y L2¢ g3aev Y41 HeL §32u I8¢ I€¢€ e3ew £4¢ 441 <+ +* Ss Sa $3en g3z Sa G4 6n Sa @u Sn G4 Su g3e¢ S3e £329 $32n g SR Sa Su Sn Sa Su Sa g32n e3¢ 93en Lrg ere vSe 18¢ 25¢ nSt 1317 G 131 tng nng Srs sJuUoONN dduuUoOyN J$snvdouwube]a Su G% Sa S §324 Sa S3en §329 g32v S$32v $324 g3ev G4 Sidéh §3ev S3en Sn YUON 0BYSP3OeUIa8uLUoN}JINUyDYOB®X3NIJDOS nes St 9¢¢ Lss e¢¢ ¢6% A VAX Diagnostic Design Guide duON Sh S 22 Sa 8% Sa Sa s32n On O £6¢ 90 83 144 4lve6loe nig 23 Yie LLs s$ig Sle 44 64 vd na vig i9% 95¢% 69% vt L€ el 6eunw LAY 2u d vd ot vL2ewn 9t LS§ S9¢ 810 10 0 46 F1.) ad J0e9 43,J¢340 0 1s w32y 84 vAoe §32¢ |@pI N]) 9p0J)vaneevd UOjIeZ Si1s0.29S0A7§SgS8TGvuaYHdNEDITT -!IUOWIJOU)S8edIUNO tx7a21vI1IND QIVAONW‘NUAOMI®TITO9<OWTey, ¢¢ATMnIjNeIsW4EOYWJUONDOJ,0ByOUBJO $71 v ‘2% QUVHd9$SAme 1$7D13v8)d° “ONNEOSTHYIQZIINWIINLdISNIAne PE 20N Sdde, TTlaxVA J¥dA3 A Sample Diagnostic Program @u©3Re3| S9‘Yd(O7NdISSVQH)e 8310=4:74V0TVA9 19 84S01600 IN1OTJ4a3N8Y3¢TI°D + SudA3 A-24 Lin gin eln nin 9ln Iin LA 19 %4 ol §32wn g3en s32v 632 uen 1an ean gAn §3¢ewn §32w 66¢ 177 6et 06%16% 26%¢ ney 94¢ $6% S6¢ Los Im Sa Sh Sa Sa On St OSn Mn Ba nen Quity Gu Sa Ga S4 Ou Gu GL Sn Sa Sa Sa N4 G4 Sum S5 0% Sa fu ¢u 11321 s8¢ Lee g32¢ q3en CET4E 6lLE wig Sn %6 Sm B4 Sk Gn nét 96¢ 86% + glr £329 §324 IMVBgdod 2en 1#8p30}$9 UON ddUUOONN duoy dWON IXxTaNTNY3IND auom*®17/'3 41Ys’ cnaued|) #p0) ¢ A¥LIND NEVYW VAX Diagnostic Design Guide oln §£2h nen 9en veén €32v 6320 §32¢ %A fa Lan 6en vEn SEn LEn g3av SG Sa Gu S Gu §3ed G4 Su 6% Sa Su St Lny gnn enn ulh 1Sh Sn ésn nSn 9Sn G4 n b enn ]19:1 ehn ghn ntn Juoy duoN SUON ¢h S& Sa fa 2°tA A-25 fe Su '.“ LABVHWNS SuUON I$8N49G30uUbu]Ra (31G8;3un90)w}] o31u843n0awI}NC] Ga 8 t£an _ SANVWOISNUET e On wV3d At42e $XTANYRWNS ¢32¢ §324 S s32@ §3zu 0a §32u QUON Sa f0 1£%] 4% Sn 4%} 3%/} nin n9t S SUON ¢30 10 0 46 2en Sa 1 J 3 6 ¢ ° O N O T P A Y V H K R N S q u o m " * S k , ¢ A N L I N G W E V W g y M S N e I X I A Y V W M N E T L T L D nd siac 917vD ‘(dS) HVIUES GH® §d2v AvBuwuwngYJy4OUIWROC) §TRININGT§SIO1SVDIX‘FNASNYHWN8SiTNLITNLdOSaRe2843Bu}aINOYUO)INJEX® el 9¥dA3 A Sample Diagnostic 13 2ANYnAKISOgNET 6Sh ear JBVg0eY v0udn0de CRIdY 94S06120 Program auon SUON 312)lowIslUuOoHNt83ncu} 1418S° weubOJdg $9u)INCJIQNE VAX Diagnostic Design Guide SUON suoy + Su Gu Sa Sa Sa T Sa Su In S On §3¢ g3 Son su Sa Sn 9320 S& Oa on 1114 sn su On sa On o on sa e se 16h ebn Sen 9t¥dA3A 8 g3eén Sa nEn E9n iin ein nin 9iln o ea nén Soen 1Y fu 98n G4 §3en $322 S3ev Er4S ta 932w S3év Pa §3¢er S9dv 3e¢ g 6% 99y S 68h L 4 A-26 $32v g3év §32v OudAl 8°tA «2 0 «820 B30 ee 34 §¢¢ nes 8¢S Jevi envn 1 91vJ‘(dv).hxom<amono SsT0SASHYIT ¢(®3@;JOJ4® JgpuP}UpaBRIWONe|YD I4H3S¢NRd S‘ASWHYiIVSsUENe T9N‘IXMOieLsTnyTC9 névo oa ou ou LY$1INIT NINOLTITQO AAOW |BPOSDIUQWRI}S}NYOUIOENDST 44 | 4@ldoe6loe 27 92¢ 1ansvLav 12oenVsT tLd04y8T S9 43,nlo000 nes Les 1§86 TAOKW asy va slg 61§ neéni na 12 T4 628 J9 Qiua ngei ho ¢2s 2es t2% n2s 82S s nis s1S 91s L1S @q aa vd 118 Stav tls 320 84 Sved Qq Qa Ga 80 62¢ 618 19§ + 43,n1h0 0 0 R E 1]PY-14 138V ‘@Y ¢ap bE H S N e 9 % H S N e e ® H S h e g % 4! TvE09 ¥ON¥3 1 LPAMYINAT 17 2s he eng n2s Sus TS wedbBougN0JQhs4$3U LL1¥30B8VdT°S0S‘36nLI6WLTYi=Hn9OoN¥VN8NedS8‘S9EN1O6T019L1HMONTaxVA©uO8NPS°20A obed91 8sy O 1473 A Sample Diagnostic & n Jevid D 11 aey Program L9% v o OSn élLs €LS LLS gLS 28s L85 S8s Sa nes on 6L5 1 18s 31 LSS on 69S vlS $6¢ 965 s 09s 29s £6¢ 1hg 3% rss 9SS 8898 65§ 14 eSS vh§ ers £$nS oS S Oa S S o Sa Sa Sk Sa4 0n Su Su On Su 6a Sn G G4 S. Sa Ofa Fa Ga Se S 4 Su ¢n OL SN 6% vl SLS 9LS el > 1Ls L d JLUO2N 2 14 e 2d lou] PdQ9UUOONNisandu} ouom® COBSYINE‘CU'2WIN,. VAX Diagnostic Design Guide CE! 46 J¥dAS 0°1A A-28 £s ns 2s ns J¢ Jie £d a0 SSa 11 4] °tA QU €4 SS ee 46 29 46 o4 dq Qa 16 46 2s 46 vy 83valoce ]¥ 43.v27060d9 38A g3de1aee voeve a4 ns vedad 46 1YY Qa4d 84 2s 3g9.1 L ag ad 1] Qq n9davo e 48 aa a0 aa oe ae 17 evian viv¥ 83001000 6L61=9NVe8NEIRI9T2080SudAI[S31dVLiS]niuvN(02) ]2)380ubEweJdBOJugP(ouEXx3 HAVINK=91A0TL1T.I9a&SBjuujddwiasvw4O838)3Q}QU}SoJjOUJdoJud®OLW 168 41 fes 18% 489S 695 265 ILyNwEaN0dd B28¥IiwdATLTLO $ blol=9nVY=8 SEL6L19T H1YHHeNgHES88NNNddde Ae¢0¢¥o%88 MSeNg 24 LI$1Hy7EwvNd2dO3d =S‘yNAENSLHIWXdiTNLITuLdYsSaone§ S80INSUdNIBJP09 gWRJBOUS$9uU}NOJIGNE gM4GvnSSNWENEAdNL&dS‘S3l62Yy¢‘1t4I®nAIaVyLiIETTLI9TODo-¢¢S9B0u3P)qPRJ49O38)B0UHJISJO4NG $g$Hy7y1Ek1wNevavNG2)0ndd =L A‘h‘JyN1LNE1L7Sn4WH9AOTX43LIg8IxNY13LIAYiN2wd¢dS80Q%owee§ JJujUu)jJuad sebBeesseoouw SOTXININ8HQl1yGS9HNTwvSua)N0e =L dH‘0NN1X§ey1S¥olhixwisdwTX1dLI7TTNUILT9M1Rd9S Oo-Ne{ JJuOXjuaeieeples ou TAOW S‘118IvYry ‘NES XIN]¥dSQameJNANLIMOLJILSONOVIQY0SIAN3dNS aa 268401000 e3e01000 OddAl p0PO3I8FIPXS epa3AjedepN L6S 86S 66% 96 N1YJI2oi¢y=bX4uVTnshgm| oAOnvgMysLNTnLdTEY STAXI-NISN4T h2=¢Yd @dvx3HlSwdNTd1VLY S8TXI-0NINSGT So8Y¢d¥ 41na=y8¢4TM1Taox §TXINI-HLTSAS gWvILHWEANTLaTLO hes SesS LHyno F1.) 8119 nd ve9 279 999 Sample 46 84 ©d A Diagnostic 2s 839vS48S3INASN3IT Program geb2eg VAX Diagnostic Design Guide (12) any’ 0OWONITSUS PE 20N 0490y Tl=xVA 9¥dA3 sadojan;odaOngLm 30 9e A Sample Diagnostic Program 90 000022080 pLOR100 peoniepe 9800VA0 etoetedn agentleon AHWLaIWVCSaAWSTTAASSSHH)YID XTanTnv3ITN) Q U O M A T I N T H S I T D WESKI NLYEW tveroe0 9ITSEIND NvLIIETS AM98NdT ININHITWEINDWINISAIDOeWI m INIAQTASIND TQSrymky04 SOuACwMAhWdTSNWAIHKWT AKNIDYWT NAZENTSWHI LINISNETWESKDNGdSNATHWESHD ao (<4 puRduned Xxoroorxoaoox 1Yd0L8T e. o11ite21418ttil1e8 SLiite9tilegtiretite 1aite a9sn2iyel2eallrtt1ee g i1 62l1e gi 10 A-31 gel e sel1869i18il1e1e n6ttiigtee 1188 rI'H Wes ows i6$ NiS NOdSNETASHD Lite 0veAvnaY LYdALA3QTiLL19oYyYyyALTt2eeMIInnNINssINTTTTIMMT ozuo<u:h< (AoNq3uSAg oaey S¥dA3 NES 88 BlUVEHTWESHIT2W1E¢SvHaIn nCoRBVOR LYT povpoLvel )BT vRBVILALS @8dv0RAn eo0RVARL d4d444 greenan gleanan LPD g1si1nlitei1e6 2gL10 (L] 2118 eei1e 9 neRvLYidyY venovivey XA)TYId 7PenAguerod davaeon poenonuvd Pudrvue NCMANTSWHI hveRnvre PNEvAGKED NArBtIngd AT Aecand pebovete Tevowoen Jluvaden 1000 naernero teovavne veQoeave HB0ur0aL nodVNoeY d W I N 0 S A S e T W R E S H u D n k o d dITl4FT3lvyY)P)v30N3d78LOi9vEN7TIST$LRdIIN3MENdDMNST Sl1sneded vivodouy ¢ a k e r n i g l QANYEWTWESHI Seuenved IXIVAWTASHI l04dHITASHI H¥3AIATASHI JlavawTASH) I188ASTASHI WONTIYTXSITDVXHSEINYD LIx3TMys17>XIHTHEIND 12078172 ONINLETHSID 14I3N0V HAVHEVSESQ YIVANSYESQ LIvMNYI8SQ 23A872804N3J7IS9Q 8NEANISU VAX Diagnostic Design Guide 9y 9y 8¢ vacdvound 6EenoLvRY NIVWOTS8ANG 1Ad3v1sd7 $3ITA$VSG ¥I01TABYSA vEBYdTALYSA N$dANIT 9y BidvRrved VeI J1C¢0REA Pe sueny 9y TME! 5 ONYE3T198VEQ $9vI147198veQ $38veT198V60 ONLBNETI98YSQa WYNAZQTL198YSO 23d48N3TKWSYSQAQLIvRTWSYe0 $3ITWSYSO LdHONTWEYEQ43d40TWSYSa W8Q3vIW08l118I3N90I¢S60Q 6139840 d0INISE0 NOW$SA AHJAOWSA 3suvasead diININESEQ XINIY¥ES8Q AIWT3NE80 dvYWi3880 J3AL3680 AdvWnNesa SNiIVMEsQ 32 ¥d3001TT"WWSEYVSeUa asvdTWEveQ als1W23rdSL1sYII7ETTvNwQ1HWNe9Ss1vTY8s98vge38QeQ8Vd7ga N3TA3AT198Vved 48N4LY0NHWIINHOEdH8S0SQEASA SudAD |oqu g eLqe3 BIVAUBOY BovaANGY 33 NOIS VYS AS OWNWILWNNSSAS 0v4EIHVlI4iLS3388AS99A88S8AAE8 QIDSEB AS mOIOS EAS 430v3488A8 plyevuy pev2vnen n2eopry edasnvou 206080 enLNene lYGH4NLdIIlLMV3INYM8BNEESE6SAASS 4ON3V1I38M%S8AA8S AS TNOSSYQ2WIINIES VWIINYI43873880 vQsEE4SSSAS848ESASAS L Y2610 Y] ANYW HNS 01VSE FIESRlM L3w n"1aOn UvInviLunyTMl fhu'L LinTe 9Cexn"4 oF dDXWILISYENJEEEMTT3TOYAL8INNB1YIO3WLINI8HVLSASLNISSMN ST PUBEANLY ONTS¥ S¥vd 1vd307 6Gonean L6T=9NVeE hEiO0tol 144l 40Xy cOuY %edy 9134 9w)|W3J8eu0LBb¥OexU|]d( E12SSSdOxdXXVUXVIIEYEANNXNXNiITAIISNNNNXGdIGIINNn2LNGde4a]NINdG eJULNCRTLTBORR.TNU0e ESSSXLN$XINIXdXILSINXNITINdINNGNdNIdd9NY886L4d4ddTa N4SSFGdXXdVII7SNNXEiIIXINYANddINQNdIde MMorsaBe QudAI 43G0NTASHYd [SLSNsOyyYuIQvvWvguddHdTAOSX3gS3euTi0HVSA7"0dX1IQe3 A Sample Diagnostic eSevtepu pIeatonen 8N y Program 6@ XXX Y o reCcBONLo 8S0VALD 1elaney vivonved elepopd 0 ooo eanvtpon p2ruten IX3ON MHSON 127 3AX30N ¥WSON 1T 13y ekl DD NOID i asn 140N 140N (%9 (°L ) we ) Le $93Nqjdaay *oOn 12394 (*2'2 (°he ) ) haeonenl glavepre uyojaedofly susuy 1J38d ANYH AS oy Qy GELHvi9l 6l61=9NVe8B XTHI1vdS810 INILlnowens O¥dAS lym RE°20A ©43%n T1exXVA gdn9NNvYi3v1adT VAX Diagnostic Design Guide 114 A-34 J})380UBE}QWeJBOUddL0wex3 3ANTIVA NiS ¥=Jfuyeane Y=2ho008 de=hioR0dv0 Y=n20u008 y=62000 20uangvon y3s 88 A-35 £lile ni le helle hovuQoeon (et) (el) n (st1) (st) 91n aen 910 nESe¥ eti 1111le9 rt) (02) one (2 (st) (61) #llll!lll.lllll.# ¢oancswnsastonavasassennd 410Q3TININI 2(1est (/31)1 L(nts)(Lt8nt¢) (9e%t) l(ev1s) ALY1o¥yINT1IeInTNs1T9TMY 3al2AIQTY SUAkepuoR ¥=J200p0ne € a s ( a t ) d1110aN3avau®y Y=BS0euveo lenvnovos eRrvoenos 19 (2) alite VLT ouvos P00t si1i1eeliletile8 YsdPaunooves dbpvueetaTveooess 9141LARYY 0 v v e d u a2i1e ooednvnupuevnpepve2lnooosses es12i1eoeli1etaaalliilee dwdYgeovnAnape 9el1sLallei1e sdol R B o B N A R d0eaneueoe 6nite1€410ogile2i1e dJdVloonovds vRosu0o2v0rn080200oa9rnnnegssn 19 (2) s AN3S NSS $¢8 1i¢8 s Hes M068WAS 11200400 2Ltst (tertl) nen 444444442 8ncAud00s Sonveo0as 1enenones PegBuBLRE Y=00B0oes £aS (a1) 804102.UBJO, 430NOTLINT 2 0 3 0 0 L1YYLdI04NiI8T7 nes (el) BYuenouds O¥dA3d 92 A Sample Diagnostic Program (12) (61) (62%) 1(29) £1 8 SKMIQUYMY0IT ABILHANEs ILSSSIlHNOEVIIAAASININUTNEWTTEEWSWEKHSHDHDD AAAsvnrp1eh9Lhp0ovna6ss JQiI0NVBEWNTWESHDI BeYnNuYdEeVeA dT6i3Yl)1N8OILINGTnAEceoArRbvEeodsr P8T1R9 NS2NWOIAHM8dIANSNENTTBASHTZWEEWHSNEIHTSDHI nRAvZeeBoNa0evBErngYAgriLdouVseE YHA IATWESHI neAvgbage VAX Diagnostic Design Guide 29 A-36 cY ¢a (2) co (¢) wihINpINiHrITpArSIaNDe 9SNu2AHBTVRHNBDWET FAdrAoNaHrITuHnEdIsSHD wJAEWUNdHVILTiWgEeSHD wOeLsArFnApTWnEySsEHI 2NL0IvYnVEoBTRnTeWSsEHD aIdXIuVdATNnTgWeEHI AHWgoYEvuIrSTnAHnNsIDV30oHgNhIaAvTAW0IESHI ]@2w)le3oy8u0BluOUxubdY glagnnos nliveoids tluviduvos 1ldbunpos tdnvnpdne 8uRvAve Yvoiyl L8vbuvros f8vbuvn ehvrecas TPR [} O4AL333N0I0TWH490L3NIS8Ty7TANEENIADND Ahleeendwdvdoumrnnpivitioyosee HyvOiIvvlYavExdVsSSvIeOOa AgeBrUnAtTvRdgYd q¢MeQdNIi9ESAg9nNHTNsS%o-vYS8EeSsYsEdUsa gCdLEeARuEPTR BAIHEuToeIY] A-37 vee L) w12 rle (2) (¢) (<) (e) ®) hen (s1) 9¢1 tee (s) (%) (s1) gee (52) Diagnostic el (é) (S) n9 (2) S9 1] S9 S9 89 ALINPYNAE eLR gvactoep () uel Vil (9) 6L61=9Nnveg nEtaniol gue té) rol tve (9) (2) (2) nie el SHTASNGD TR AL la06avssg Q) (1) (2 120"%S8I9) IVdSTHSINI (2) (&) BAdJ8uovLRdEYU28 IR QWANTXE1EOMAIT9)NEIN) i2) 330TMNSIT) (é) WkLCEEEM)IAXNS3TTI "YnTeH1S7IDY) FJSWNHITASEND AANHITASEHD OVHVAS IR S0NNA1AYAV33E0AHTTAASSSHHIDD Us 28200 IIXIVENT Stenionds BJQINVERTVAS LdAIVPAUNNTTAASSHDASSESOHDHHIID Alorndeos HnHAWmYYGwIIHWmSNnADImEEdB4TTnAA“SSwEEuNHNwDII Tgvikirdus oRuneonvos OudA3 Y1OIH8dNINSSEAATSSATTTSWAWESSHBDHHHDIID vLT1oaarangslnvosryuvTosx W2NLINISNETACSH) 1HdL4OYUSdIIANAMIHSIOITTTHAAASSSEESHHHIDII Auvduvupe xHYaLuSTzA<SuN4Du tauevguos 8wmu“0xuDaz~a4H09uJ40UUeud, A Sample Program geb2ey gee twe (%) e S9 Q4Q83dy0uN93vv%8SKI¢1hJdNQ3yIaI99dNWSs83Ii8$Sk8¢slQaQA ePIginCLtuvlpl1uttoeuveneADg aSSALN3AMQOSivUOduNoAvIWDsd1AOa¥NOsdSWas8Sa6S0Q g6lutave N d c e T a v e 1XCJNdASSvN3WiYSTyLi8ANHYwIlLIRWWIvi63NOv3Em0y8aNR8MMSLESTsE8¢Edes0E0QlSQQaT gk9evnVt9aounteT IQOSOKNOOOxN031NNNViLJT8LSHIlJA7B4a331NVATv809SdTIT7N%TTi911IvI1v9899e99s88V8d88vvYsVVYeSeQsaS80dQqdQQ ]E24J7vCA08HPS33d3E440TvdT00rnILAneB10Lun6yee09L) SVl1V1OYS9NSO8LvIQ387SYNWW38dESLQTwIW1Y90N8AVv3ISeIQ0QT vdRvJ4sa88gG33lu44ea0¢hv2nyE0gse T9J3ASaT3nI33sUAN04vE¥SN¥iaI7Y¥eAN3nH3aI88N8IS¢s3sS8s0CC0deAd wdB18Y9lhel1vuuuvo0vdpitltluuaootivtuudJiednye sDw}|lIJaBOduUbeLOExd}]Qy Ld00INIssa IVYMNYI8 Q 9¥dA3 THI§EVd3lNS9Id1Y59IA4EvV3S80dVTHHITTI d190AL89L%V8OvSEV8QEK0YTaQ 08VUd4yJI), (e) 14050983980SASHNITSC 3dY283s$sO (2) govntefe gGudtove yetvluve ¢Steing gnlvtavy unluloun A30et10en BTARP¥ eLTelued ERVACIT) d9teteny 40WKSQ 4iNTIHdES0 SININdS8Q A-38 te) (e) (¢) (2) Mnadnvio gn3qnuvs G981 ALY ldyTHeEveq (<) §(£s6eav02e9%) ¥3n4304C90 N80¢ 713420 0 43 (rt) (41) (2) §6S (42) (rt1) £9¢ VAX Diagnostic Design Guide (nt) (é) 340¢20 Y3nos wmsmmuaHwm“uu>zm>aau<<rmm“ao<ma cNANLOvos 1IAIT ASAND LRSI SCWSdHAOA0NNNuIDYTNS0H4TT¥AnSYYaH3INSGIWITZIYNVTYhOeiydIevhunLopwIvnopNtoaAss tdvgave Jonunhuas ErdveS 4l VAYRaneAns Jivvnydve HNT33IIdVANA3EOITQTWTSSEASANANSNST Tavenidngs N¥NdIT$I3VaYNWSOANITQATSAASNAGNT teaanados Wdprepae aRr@Ivoes YW¥33LdSNASsSTTSSAANNID Teovdenone P O 2 B v A G e n l d u e n v s gledvaceos ITE T LICTE]MEA (2) ASVSQ Vdndugrds vAdevycon idevv os= td) (e) () (2, (é) (<) (2) AmuI«mN»E4TuHmEaVEmQw 4le0nynes Buudrogne tunvvvnoe= vldboprios Ag0nneuds JT3IdAsInTT3WISTAANSIYDSO JdJdtuidvnns BHd£8Jd38I3l10047JT18vw)TNHWseWH3vETu0VeVwsVQ0SEvaQVUed0aI0hevugnos n1AAWLSS0ElYVVIYSSdevgQ8QHT1TH1AE13SV8YE77-E]QkQ wedVdtNneedevluyGvruoeceetnngpnoauBaeevrvgudoadoessssEa $#d¥3LL4£1§030d3dII31¥0wv874O1QN¥NTAdNT¥OiS8TAdTAYTASTRAeVASvAYSSaYSeESYQSYEQdYSEaEQEQAQ NIVWOUTWSANI O¥dA3 (2) A-39 (e) (2) id) (2) (2) (2) (%) (2 (nl) A Sample Diagnostic Program (2) 2) e2) ALY LuvvuvosRT]CIAkL glvsuvios Jigduweads bdBuBNS 20duwvinas levsrpane 43dNSTESANT (61) (61) PESed 2) () Jesveae Jlnangs TdVsu 32d7S¥N3 131 VAX Diagnostic Design Guide (12) obed A-49 (gnLdI29iNvluI)ot"naXs"Y ¥9n82N0t1a0ce HedPANRA0 HeJNPUnene NL=BANVLYVO NIQTsuve Suvd 2307 LIAINTI8NIDNLELTIATMS"TT H=214uavee W4300NT EN01LvTHSuYd dYdYWdS 4301V cvvunRacus ASYYE 0LV lovendvas J¥dAd 4N£0SSsSLdduYO3XNTywU0I7SVdHYN$SN0N1XXT4T2XIATS0IN3dS7SXINHXI2NTYINdGdNIINNGGndg1il0naVveeOovvNneaBvnrRaeAYnsSE 81IP1HM884LO9TiO0TvI3N4TNiIwvC3TS39Edd1oYLOndETuVIBHJT, SXININNIG8Pd LIS AR X3JLIadONW7YYISSNXXGIINSINy0Gd nrdanBvudunbsze 4WTIINVISSASWNOISSWIANVISAJdT3IaIM1Y8LsYLiNWIs¥NOHlSIINiVESASVIvGSEaLiS3IeA¥NST ST ynseeguattaneew ANOSSYQS2L01vaSASs vw3dvlv wy 43G1vTASYHYd eRNonuRYs VOoALagLvos tuvugnonge n R A r v a s N$XING I " Ta S86LSdddXX"TTSII$SSXNNXXIAIIIN¥NNIdIdINNNV9ddde¢ n2Qpdnys Jlui2cuos Jevpngess NG i Jerunupue §34A7SdYd A-41 (%) (%) (2) {2) PEERFETFY 1Y) ) 69 Sample tvovoNGs LNAvunuos R]P I0Y1MKoA0 fevRvnga 8E2niung ALY V U L Y = l d e r l o u n u d XTANYH WWNS 0 u d =4I 01vEsAS (2) (¢) NOILI3S e) (2) (é) 1¢) L0MY 904y (2) (¢) 4dTSXININd @) () (41) (%) A Diagnostic Program (%) {s1) (2) t2) 2 ey &9 B62utave sdevinae 111 VAX Diagnostic Design Guide (atl) wne ane 192 Ane 192 (1) (ef) ene 90d¥*L .“wp Lind dON*L 92 MOIOESAS nne ene A-42 A-43 ((o8t21)) h$0e9s (9%) Li1oz 1 n(9ets) nt2 W) S8B8S4S$§4A03G88T3q90OB0T08Xs8ASSVSYQeVI8ASLTXJ3WN4uNvYiOII3dIiN0YWSH7TAN188TNHGE¥Ava8SI0TEQEdNQT"88ASRSTIOGTN7VS83IQ08T7S 2"24I14 19 ;1 68L29n062S$6i16§9sg0¢1. 2(9(62srn011):)lt2e)) L8Y09n8762tSi01s]¢g9n¢t (i((2e2s9en)12)2t)) 8g6t5n (¢s21) o189 6 % ( e 2 ) £ 0 9 ( 2 ) 1 ) A8qU¢YW43N06E8N90E7TM8aS 43 "g9sh 2(9)1) "g6stt ((%9)1) pae (o) te2 6 L 6 1 = 9 N V e g S E 1 6 0 1 9 T 7 6 L 6 1 = 9 N V e 8 N E L A B I S T dfeoancescavcasevsencssnnoanscaonasd SN4dQQ8Ss8N442d1LNFd4IlMaSWO8Y3qAa700O03vg383sNu0hU¥I9YYsWlS88sQ80a0010aS8LIdNIvvAS321Nv84gg1VA3l819ILs4SH4a1dv$eN83NV32¢9eCqI0LN3T3Q6T0iT%OIET3HlVT7A77e87~0sIWOB¢NM0vINe808a8eaIHNqTM8GddKO0sg0IasOI9A7TN8sTs8N8SN1ETMa7QGDaTS0EYTJ)2€132141I2332-3t31131a28v10a8UsBE|QweJBOJaL"o8€22S18ninL6£9n"g16£2NXUie9n§99ayLie9SI1S1Od¢}sSeltgssn%sy3g2TLIdXI|YNdIXu2t((SeP(i(lt2((tie(hs5n2¢2n239nseIx89)))t2()t)t1)1Gt]X))))|80LsngT£o2S2n£86Ln1gL"962f*T49en990£esi915StS0eSV¢g1ghe1t3ssn8¢g2¢X,SY3IY8NYs2(I(2((Y20(2e((nr699Yn2s4n81)")t))t)2t))1It1t)Y))))LIIT09LYyIUeJpg€95gO8att,n1((t9s2s)1)t)) 29o8991h1n0l8yQvw'O¥dAI[831dVL6] 8 049 0o8¢UsJB 002 965 (e2) (12) A Sample Diagnostic Program (9) (e2) OOudeKAJ®JQj|JUBU udewAJRUQ}|80438)303a8] VAX Diagnostic Design Guide 8S0¥4dIA/831/ A-44 8|qey40$3U0TE43U0D|31S80)3318B01UTuOp)IeUR0ANwLeOJ)dYbOVugO3e0|au1e8x33 194dA3 6L6%=9NVe=g 90121 91 A ) 45 Sample Diagnostic Program VAX Diagnostic Design Guide Pool ¢ Q¢ T4 Pt LIS 3AQ PO ipON ¢ 9% *2 g Al anpe Vg Y] ! [§ LA $93Q Yt Ujewad ! 1l Aid COVD L A-46 80$ 39vd <1> L1les’ 230BuUC}eue A Sample Diagnostic Program Y ry e an + Py s sa o e oa on dT]UGnR A1aA A 189°u1dAA3 Nk APt VAR sa Gt A 31 114 sa BurgA su Ln o 47 l1lEs®1631BTjesudALO)VO3803 VAX Diagnostic Design Guide SduuUUOONN QUON dsUuOoNN QUON Ld Gn 8a on Su e Sa Sa en 00 n o6 Sm Sum 66 G4 Sa B4 So 04 A% S G4 Su Sn Gn Sa LA') LAY nian s A-48 & Sa Su Ba fa Ca G On Sn Oa an 42.,00010/]41Kq 38JayjouwpuUSWOd O)380uBR}(UOW}e3JUB8O4J0dAUGCu)wEX3130|03 SS§3S§888)0T00TS1SS3H3sL74¥EwvNWdTS¥HQ90¥vQuQNYTIaoHvVOvNTmE4OTg*EN3Sn*®TdeQW=y =nI$<2NY80O4I1/nTy3aNILNnITWOIdTLTL31T9TL7aY197Ls-9-{$‘§@ {¢‘PPeNUUBdREoRPyWW)WJWOOO)DI8)ROJouEObjAURd0JaOesIpJSO)AyjIho§eueP|URUWOD o bahekakal X R R 6L0e 41 4 u90d Ed31.00y00 A-49 621 L21 et s2t 040 10 0 46 NN I N O £0 84 LR g1t 611 et 121 el nét 921 ‘T4 If1 ¥‘4O=nVNafI¥LNSTEL709 yANWgsulNeTnLdT09 ANawd¥Liva9 NALO=NTILNOVY3T aOvWIHAENINTdLTL9 AUINI ANBYW P8UsSJWyeOd) 0sl o§T4INI¥dTvSyMAHSeNned A4NYBWGWOITLLAT9d9 -{ vivd3 1 0 118871831 06L561T2=9n1V¢=€801 i1 vipe nina T12]0 aadaQd s 63 0000 edoe0 0202 aty L 8duwo)y|d d43i,.n00000000 183l '1 6L61=9NV=8 90121391 LS3L INIWNONY 370YL SOLVYNIWY3L vipe H S N d 8 % 2 I M S N d o ® s n d e v a n e 4 8 a H S N d L ¥ 9 2 u v e oveotoese 46 4433..00 00 00 8000 v4é VYgA2OAW0W 23184N7a16NNaL8e1T8I‘7To1AuT9A$9at == {{ A n 9 + L V 4 N 8 A W A T 3 u 1 L =3 O N Y W O I T L T O 9 o 4veoteoe 46 1433..,008000000a0600s #144i334lQ4 g3u1e374w020§LY$3§7oy01y7t8w1THVa4yVe)s0)N4d &$8‘‘L‘o2NSOy»SWIAA#$3YN05I2dTNULIvINdTIs1Y8Ida9S¥eONef$ 2°tA 1OudAS A Sample Diagnostic Program |PU®GAL}WUOD 43.006800 netl S€1 9t te1 81 et t1ins 15ue 1msuT8g4tiNINdTN'SI)ANLYOLTITUS=¢!¢0sn8onuedJxjOnqyouIyeOU%E2p0u(sPqwUBoWldAOrdDue VAX Diagnostic Design Guide J$‘IN7IN1dESvardeH 6t! A-50 1831TUO}IeSUBALO)31803 w¥xuwL49[})dNg0UO}B3IICU|YJuOY8O0}p4BOUINYOOEREJLSOBY1B0s‘8yee0BnsdLejO98dmM(]iPQ[eI®)8yBd83)YN87o|d0)Y0"vdS1)jIS9r|U8xN4eOdWOJA,,IU3NSCM¥TOe*lUy;Pu0YBWIO0S40IyOPB¥ 9) gye xT18v1IL J int R LA 9t in eni 4% 4 S ent int ant 40 Sa + Sa S60 431,080900804810980 01¢8 vdRveoYe M1u0g38 x30T81s71l 01 vs1 181 ast nst §S81 951 8s1 6§81 4 L 6 1 a 9 N n V a g 9 0 1 2 1 9 1 3803GNE 1u0}3d)J4o80p du Sa S Sa ta Sm £S1 16nqeg S& 4Q83v0 A-51 830 dlen 2Lt gLt niy SL1 91 Lit 8t 6L1 nd = ¥83TMTas SN ¥3s# 8TauvVHYEITSGS 19L201 8d1at4q 21g64deevs 291 £91 891 aLt 173 a8NaSNs98~ HOXTNMTAS 434d.,0348080Q0 pdeeteen 46 LSt AR 991 Sa 191 S 291 JOu d o0es du J}3Is0UBEe|QweJBOJd9(duex3 t3esJed30aunds3gwwuxnk1asd}4eRIiI)sNuYf6PULOO6|1I=MT9O}N}UVD=BgJOEP9O65YO32DJ1BO¢Uy1|m3I8U33'0238u0a3NQbNE8S"¥EuXx04Dsxy 43.,0 0 0 01 1€@3 agvey 1s0g EMTMAdOEWWOdX ‘‘9IgQN1I99N0aVOSG)LXXTe.I®HT(‘Q$UuYS68ISIT1TH8IMMNTTSAEQYTNYH9TGOE%SaNe npNeoeS3eN0IyddyoOeLaOpxPsU)p BeW3e3Op0D 4P0O L I N = I N T I T G 9 H Q V I S E W = u N 3 9 3 8 T L T L 9 N I T N G =W t u y 3 0 I N T O S W p e p u U G I X S } J T U A N 0 J d U 1 4 = 1 I 4 O Y y A N G T L e I x e s f e s s a u 4 82 A O K ‘ 4 8 T € d & ¥ 9 0 8 X p e l d e d x e e i e p A j l 9d444339.0..S,00P0820000080000408 Q44QQ@qga tdL18S343aQ0eeva00ead MHyIYT“HHHYNSEESSHsNeNSNNNddNdddd dN8Y¥N¥4y9H8a80IA3I2S9T¥T7X3AM8MeNTITa#TQTQSO9L9E®TWLI9OF ¢4 L183f 1 L1S316©8N1n7eV)‘1 ¥O‘NWE¥3*1QUYHY ICEON®djxs aN0 4% o49s,e0ot0o0e 00406 vd Seey 1811871y 4433..,00800 00000 4133..,,00999§¢000000408 18 6828ngee 491€91 MYT) A9 USITHT 1 £} Q9 691 1038 son 8°1A 10u¥dAR A sample Diagnostic Program go9be Ga - g40 vd b4 aaq 44 qa aa AR - eToNVHANITSOS 9Rt21891 6l61=9nV=8 ! MN3ONTLTLY9 = MOVOSW RE°20A 04Oy TlexvA 43,90040406 30 ebed |5 VAX Diagnostic Design Guide 7a? 2°tA A-52 0°1A B61 Y] 9214 9214 ¢U 4 Sa Su Sa 1 4 $3287 Sn Su Ba que 6216 ONuS it1 144 1y ae 49,80000 A-53 44 Qg RRN ELARY 16 %1 ) SQ1b vd LE] S HSNa 28 ¢12 rie 1XxvTesTiL MAC3JEUO¢=0JLd®JeEy) ne S Shia 31840ud LTS 9gNSNIevsas E‘NE7N39Bv8eS3O4Re aa TdwdNINGITITA992%gneTyN&Xo0ydpuBWWODopOY H$¢183y‘T1S3Ll8$9NQ1n7VsIvVS)‘K2WH=ho‘Su2W§SySiLITTtL7G1LNQVSULOV9NH3NESIHSRQen¢eebesOW00Jo3uU Gn I1e 21e Sn it Gq Sa L2 sue vwi2 44 L1grPR ign Sn a1 Sn 3210 921 Sa 2ue gve & -+ 12 961 Su 921t n&l 561 S 0t0 610 0 46 1948dA3 0olofit161 L9l g9t A Sample 4]13 84101600 Diagnostic Program 19¥8dA3 1S3L $1 oa X nweld #910 RB ox ea P on W oM fe o % Ba oa an 8¢ ¥4 3 e txvEsTIL 97V) ‘88 gNSON3¢50%e E9“NS§ND1B8EvS9ON3Se LAY 91w 21 V4 8o 1 leCang1LxTe ¢pueA)¥s3INC3}30U398403 (e Sa wite LT vl vl + 1a V4 Sa hee je2 eee 22 nee g2¢ 9ee Lee g2 Y-£4 L 14 182 ese tge Sa iv9iAuQ Yy A ] A (L gl 612 512 VAX Diagnostic Design Guide aensan3Tscs 11 B°TA A-54 she iheIne XF(L It Sai4 wyg1lawal3oTM¢J8e|PURWWODRpaINDOXd10WOYIOUD 1A8Svotlonen46s 183}1] 3e8940AU0@v)d4Osiy3l18e93 L833IXTIsOarsT0wan39a1~7D6n31Lo5v6*4I1°=9NV‘N‘UeL(ISgdNSD)I9L0S1L’S2v133Y“8e39Xs13c0qNse‘LHMON“HADONOT 19¥dA3 Idl) O39wI1e8u30BUu}OBeJRxg)ydQ 8919 BbGLH1T2I=N3V8e1g Ls3lan3Tsas £he Ik ILT2‘YnI¢w04X1HOw3N L¥1oN3uI6N¢n38NLlB3I1yS ane A Sample Diagnostic Program lpoapcove A-55 VAX Diagnostic Design Guide 2 2 I X X X NIVWOGTASAND 810080722 4SNEAICTWESHD 0004 QENYAIYNNOOILLTOINTATSANTAYR0T2ARyeR Sgw9ildiavtmniesqY TPI0A=IT02ARS0ANS NQSe=0AaevNedRS o*0=0*70809NENNTREXINTGY 0UNYVWK9TOILT 9 NLYVEHWTALSHI SY0 t¥b GIAXSYEST XIHTNEITD #$W1wiN3T Lu08YT$IMD SNLVLISTSINIDININHITWSIND 1dITSINDANINMITASIND 14ITASIND FLVAINVANITSWHDdYWTSHKID A-56 SWHISWHHMDD OONAOQMSAWT Q M I N T SSWWHHII ONNAAMSIENWTT NiS TdITWSIHID NS 111} AN3S INIAOTASIND INISGTSIMD 198dA3 s113Wes 3YA¥iBI8L3vvITaeN1i1II¥0TT'LE7dII3YNdD 9{01Q9u0A3S §VENBAN0 208nVove 218NE8TWESHD IV$GILNLNIIIIDNNANTIZ3ITQ9TSSTUSIIWINNSdMDDI"IND SWHD ST QNVYMYO SSWWHHMHIDDONAAGAMJTIAEBWUNTTWT SVRAONR0 SILWCIHUNIIIASNINANESTTNSWWETHSIHD NQdSNETWESHI 9 ¥¥3SASTAISHI 18 TAwNaYSEKDT Pl1ovbnve wIABEn vIveuaw HL1Y0IdNHHIITTWWEESSHHO) tdudo er ruakveae HAA5vuVeAIBnnee cuietae ALCETCIA PE2Vnaed IAXRl Livdrvey 9TLYuid 92¢ArYed ABNBLIVY §£0 AdANHITWEBHI JdWNHITHESHI ) J}3I80LBR,QweJBOJdS|owex3 a Y EYYYIL) TR )nsaNXTYIEY2y[ sYYYTTLL T RTRX [ M d I I Y I M X YTTI YRXY X(2Y YT) ® v92ateve 862910230 gueniang vaedtven A-57 66Lib66T1==99NnVYe=g4 8905118221338911 Sample €871l 11" 43138 848 B TYNQ & £2 dWNOISS30711VH3Il1svLaIIaLSVESASyISSASVTNdN34As~S TR T438732WW03I7IL1NINIvVG8848aIBLS8AASS 89201000 NOSSY ONWIlL39 vTHOIV4L4IS8E9AASEAS88ASASSEAS £gStntoun L S E 2 1 0 0 gInATa0n WILWN 01088 MY430VIUE OWII1DlSIS46NSSAS8ASEAS8AS LaCEIUALTT) d 2 u v l a v e ] A L A GENBTAGY O¥A4014Malw4NYNdlVdIiIlM3VA3NoE8ASMSTESSM8tAALSS GATaonalavd ihnlewAe Y1L¥382871lxTesvi4-xTesT2 8 La B£ 92130000 vilnondea L110883741X9T3140 7 lnvree 3N M3 YtensT d0L8TMXN "9¢yn 12ansT207MivyM OgN Y4038 198dA3 L1WD43974IBWY LT 719T EYYPYYYILY FRNERENY (1Lg1Y¥2H¥499099¥83I30Q319AUXuO3NAE"N7g4IIMT17TTLT7Q4LLTyP73TTL) A Diagnostic te x 8IEAT0 otnAvte sihyian vieaono SénuvuIY v9lvuae gtaveny Program STou0yW*1948dA(S3TdAVLE] VAX Diagnostic Design Guide LYMON L¥MON ¥sQ1NauJHO3eSxd¥vnJ73N N¥1OQAHX43eS2¥0OnyD7N ¥318QNJ¥HXl3ASId¥O0oyTnN 1JI41d0oNu¥seNnNOJ13y17329H¥HSEON3Xax3QayY drosacanensnd bPeceasncacsnsnsd 1J384d *ON | 3 % 0 8 ¢ g s ) s d O u A s { LHs1IIN0aJlvL7VsS1dL88S3110 ho0dVy2vg0ooocjdneaetnveceanhaeeoo| S83NQdI Y 96L063T=291NVY9=81 o lalelalalatal e d)e )leo MMITINL )Se (*9¢ ) ) ) ) ) ) ) * JNYIE * 194dA3 30848)8A0UAS heeaond A-58 X¥g1SSs31tsN¥N3YTISLTN¥0L8YYL"STdd2LevJB=pddX8e0lnBddXL0rREFoCdd0NdnUmssN0e “iNWAOu1sSSn03s6SWAS 1tnfL]oo3eoLdNponEIoaLoVcvacVAoaRaLconTaecLssss i4t3T¥N1¢ISl83IeIiNYYgvDvN0SN3I8Ndd)7NEA3OIY1I1a8VT4IIN2y0SSN0ITL87ITSd7IHQ31NIITd27ST¥lQ2T9Sn0o8e8LURodgnc0ALXnvo0Rou0Y=oeeEn0UT0enos0eTDco0oaE0Oondu2o00oaYYP sn8E3ss0P0 V3IS1TIT9LLNdaNdUNIIIIIINANTTNATdWIHEMSA17TSOISIQS4$SITTI0IHMWAH1NNDSSD3IDDII87HNIDD dLJ18t2SE12]Aveolve000unvudooL0Q0oneruUd6agodoA0R0LpeannU0oooadeV0ss0snsE QNSdSHHYHWAKKKSWHHMIIDDTUHSWTS AONOWTQLONAJHSYMQ4DHQAMTUIWSASITWHVTAINT1fSILt2o00oTvnrpeo0ueRBcbIvoVee0nvuRoaoe\eOedn8T0Eoe3YRRnss SOHNWAIDINAWNTSEWHTNI Jloeveproa0nEoeos (®) 1L (6) (6) ) (v1) 102 hge nge ) s(0h1e) (1) SHIOAIEWT 400008 tne 212 NOMANTSHMI 208 0 $Y=8l¢oocaoe 8Lt 19¥dA3 A Sample Diagnostic Program sne (6) ate (L 19 (2) (08295) (2) nee A-59 () 29 89 @9 29 VAX Diagnostic Design Guide (2) 2) V9 0ANYEKWTWESHI 19 A0SHTWOI vHdIYTHSTID 23¢T%8$19) QEOMAINTHSIND 1307%8179 LXWI3AXHN3"TTHYMES%$I1D) 0 9 2 0 3 0 SANNVBEAU3IGTTWWSSEESHHID SWHD NASYNT 804)0942UNJO, 19 voeanacas vEIuAGKAS WIAWSASTASSHD 60 vlQveevvoe Bovoevuos 20006 ponpnvons 19 a9 29 o9 JdWNHITHESHD HU3AIATHESHI NLYVEBWTWSESHI3dIVENTHESHI 210vENTWSHIIXAVENTWESHD HE3SASTWSHD LINISNBTASEHD F4WNHITASEHD YEIAQTASEHD FdANHITWSSHID 198dA3 49 9lsvvdcos noovagos nov3oands0V0O8N ¥R10vd0es 09 L] (2) u0uHITHSIND @09 HWAYNITSIAYSTTXHASSISTHDI 29 29 NQdSNATAS HI 980 vor0e 09 418"%$11) FEMTIGE (2) (2) (e) 2) (e) we NIVWOATASANZ ToePonos 8s (2) 8s Y4T13I3dAdAN3N3ETST7AE8SSAANNIS lePPVBo0ava0evao2nn0dssE= 889ssS ((¢2)) 8‘( s 6L6l=9AVeq 9N¥21891 o l 6 l = 9 v e p 8 5 3 2 8 5 1 tSgaJ§9dLTa¥8n¥0a3AIlIVnTvNvsASA¥V3aEd7N¥Hay1M~a%VEsynTANav2YS¥3I3YsNin8YH3ssIev3¢SsISeSoas8eSeaa0aQaQA 2dg8AaTDgaS0ElE498L8Av3nan01tGnaP36dbaoEudI11tT1tIt1ED00oaunaRuaYI0evAev00VgwneDye1ALRl 2222221999999 (((((2(2222én)))))) sG9hlT1e ()a an)t) $834LANG8dQ13lYIis¥H4OAv034n¥YSNuvgW098Hy2TIv8AnI11dY3%¥dOWS$NIE8¥e0sKgN93IgQSI¢SW8%S8a3Ss80iQQaQ0nQQ g1ea)EegvP283)nTnl1ETZ3QvtTv81t0ueouaEo0oLTIRtt1i1RCeaev0Ap0ECLRne0aT6CIdaIe09SRY 222999 1(2((2¢22&)))) 9g2t1 SHTNASNJdW1XA33VwdIMN3aYlLAidHgVAKW4TIlIN1WLi,VITO3SWON1YvM4yHT3N8MWH¥d%WTSsSS8sSEWEeg¢84AS0QSoQAqa0NANQSSND J1I2i0P032gv8#8g0W9o926LsSe4d1040utnl0e00gpIvAaoo2u008ad1tT1t1onv02eNu0o00oa00vn0nxs0dey0 18F28222L%%9999) (((((¢22e2¢2))3))) eT DA#3NQeuNd9¥83s8aQ 3TA}2UI0Ys120O88U09B90E}(We22J99BOJ4§9((122))3wl16S(9) Qa2(9) nge.(s)t1olE=dxvLAS)O(d8O301K4B1E9°82dBA3TyvW edeg(a91) 3NHVLO8¥Ni0sIvV0v8Na4dvsIn9Es$eSsYT8QvSN089YsQE7yNQI3SaU9NIDPT)J0,gFg)Tw9EHéenauve]YaRnlioA2PP auL8vo0nds4 2199 ((2¢2)) 1O8dA2 A A-61 Sample Diagnostic Program (o1) VAX Diagnostic Design Guide i (9) @ (8) " =z 99 (r) (9) t2t (9) (2) (%) sQ2e1080 2TOGR0P BLr21ABYTLA TlHNeAB8NY LSTILSY)[H0erdR9d W1I0LVIvN4$I6EASSAS 0S261Une WIL 398 AS n 2 n l o n o A L B T O N M4LIVMS AS Y LQNOI3NXNOSTLSTAINSTLAYRIYNOIBNV SAN3 T VAPA0RN0E NeI 10nyove (¢) (r) (<) 8s 911 (2) CIYTAEL N926t140 NHIL398AS 430YV34848 ONVIMESAS 1lawd13sTM 9gN 1207 WILOSVSSAS 13INVI88AS WFEEREFEITY IL S N9S VASS8AS WMO1888AS IOLIWONSANAESSAS ¥WI13688AS AHOV4M3SAS NIMN S AS xx£871L187142sT1LvTaI2ss"7v11L4 985U0J04,09V ¥3dNETSANDW3LSASTSANS LaONYWTdHOI L)MO INITLIOTLTLY 1y¥393Y87L7 1ensTN"S2"an9sTM dIlvday“d3s2071v$SAS @9HOXTMT 19udA3 Ho=Htd lLhe=2 1 85 8 gLt 89S (s) " (2) 62 1811X988T3380E4ld4sA9TXS1eTaL0t9T4Me0aUvRJe, l1HeO6VN2JLR043IRL0sNA0NEueRUHYBEo0e 21 (n) L§2=1 =b6ylL661aT9ej91VNeVy O8SC:L22133%911 gweJdpbOu3dy wex 21096uQdA3[S31dVLIS]TiHYW A Sample 8! et) (6) (r) (6) il I(n&)e S(enle) A-63 Diagnostic Program VAX Diagnostic Design Guide (23) (2) 2) (whi)l BSO8u0eJ4) A-64 (Lun1e) 112 19 a9 in2 nte 6ne at1) g8l hee nt2 ete sne ete tn2 6) nge [} @9 29 e9 (8e%) "o bupeassnencuasanssnanasi +'.'..."...'..'." OJdOBY AJRJIQ}| WOy §SuvBiyo|lBdLBiM®)OU(sBoU)uOeJdgDilJO‘SEUIEM Lg sn (NP¥2o@[(ApsDBSYuO0}§OopytuTOLo0vLq?ledeR2jS8LudXyUsTVIBYyIAy)WeLeB3UgBABO2zUIeE)JIj$x0N(di)2#0NIdJO(e8|8Ja*MOS{;lAq1sIMO0ea0803UjVPS32Au(O38I0SlE9UAU1A4)8N|NSN49(ISA0YIU8IBBNIJO))NRGSNjuI$AeY1IJGw3TN3jOI)8|0NMA,3BG0AJ81OB)PESWOR83|]MLIT0OUJW3a“Q°S8bPUhABGeUeSyJ)gaAsM*B9|a(s8ntQa0Pea1qbde,O260e2£seS)]2t918ndN[3s23O0B0u8BnSngS gN2gedu2dieculN(}%P'*cuo0,ptrsugOR0eeivi|dLtIJtpwsedx%nnTiEeaeOs9uihpadpdr90Jlnuts¢i1tO]oe2aune|wrcgd‘83P1ZOA0J}3J928®[0eJQ3P5Icp§oLspfw01qnsS(heEOa)*aS't*eyt|ss02gelnSadeLaudPatsRsJt1vgced2eOeo2eo)}ddoaant3Ottds8Yeoyo|ue}psnen8Bj62O5nlu3lU0)9bO|31E~88,=u.90N!6 9uPVOeUn*P2I3U@tRoINP§Lt2(1®8J90T|‘S|OTolqeQuXUVAASCudOy20AP obegdg2 18J999ol¥%|p8qld§puAlle33s9esyeS34AuIQnJMyITp(1P92I|)J3J)I0(NI3BDsaEYbOeuaObE4OSUWL(e4OJONPBIDnOJéJ}8SdAn3*Aw8Je0OJux4w30Sdw2|w°9F1uta2euantPsnIayBnNs0n3snaeYcgBa*LceIsaNntGsnvAatoc4ns)npaOwsWyIGIU}239'8pP0 s1ei6l2*e°n2LgPitEpyTaRnseyR 8 0¥3/61 / 198dA3 A Sample A-65 Diagnostic facsensusesssenassasansd Program APPENDIX B GLOSSARY OF DIAGNOSTIC SOFTWARE TERMS absolute (ABS) —-- A program section (psect) attribute. An absolute psect contains only symbol definitions. It does not contribute binary code memory allocation. to the image. The Therefore, converse is it must have relocatable a =zero-length (REL). access mode -- Any of the four processor access modes in which software executes. Processor access modes are, in order, from most to least (mode 1), When the privileged and protected: supervisor (mode 2), processor complete control processor is in and kernel kernel user mode, (mode (mode the executing of, and in any other mode, of a process. For example, the and 1is protected. is responsibility @), the executive 3). for, the processor software system. is has When the inhibited from executing privileged instructions. The processor status longword contains the current access mode field. The operating system uses access modes to define protection levels for software executing in the context kernel and executive modes interpreter is less protected and debugger runs in user mode and is user most runs in no more executive runs The in command supervisor mode. The protected than normal programs. access type —— The way in operands. branch. Access types alignment —-- address The which are: the processor read, write, accesses modify, boundary at which a reserve a particular instruction address, program and section is based. allocate a unit for exclusive device is use. A user process can allocate a device only when not allocated by any other process. that allocation program device -- a--z2), a ancillary interface functions file The section alphanumeric and -- to number a sign control of bytes particular character dollar To -- An ($), process between user supplemental an to memory contributed by a module. upper or lower A process underscore (ACP) software those directory management. of device -- ( ), case or a in the decimal that and an I/0 driver. performed 1et§er acts (Af4g, digit as an such as An ACP provides driver, VAX Diagnostic Design Guide automated An -- APT DIGITAL manufacturing. with down-line diagnostic remote employs APT load. throughout used application test product scripting diagnostic APT-RD -- An automated diagnostic control application used by DIGITAL field service to provide contract customers with quick response and effective on-site repair action. -- address, data). specifies where, or on what, contains the address of procedures initiated using a channel -- To the a 12 will operate the base of the argument the CALL instructions. establish the necessary (e.g., convention, By (R12). that statement command command register argument pointer -- General assign within independent value An argument 1list software AP €for linkage between a user process and a device unit before a user process can transfer any data to or from that device. A user process requests the system to assign a channel and the system returns a channel number. assembler —— A program that translates source language code, whose operations correspond directly to machine op codes, into object code. language asynchronous to a system user-defined be notified AST routine occurrence of a for the routine exits, was (AST) asynchronously, executes it trap service specific an AST the interrupted. event, routine system -—- routine. with event. the when A software-simulated ASTs enable respect to If its a a user process that event occurs. system resumes the 2. has defined the process process the point at When the assigned to the an and AST where by contain the address data structure. 1. The smallest addressable unit of device can transfer in an I/0 operation for most disk devices). of interrupts base register -- A general register used to the entry in a list, table, array, or other bytes interrupt process execution, attributes —- Various characteristics that can be programmer to each psect in a module (e.g., ABS). block -specified user the of data that the (512 contiguous An arbitrary number of contiguous bytes used to store logically related status, control, processing information (i.e., process control block). or other breakpoint -- In diagnostics, an address assigned through diagnostic supervisor. When the PC equals the value of breakpoint, control returns to the diagnostic supervisor. the the Glossary of boot Diagnostic (bootstrap) -- A program that loads another into memory from a peripheral device. (usually program buffer call a -- A temporary frame —-- procedure A data standard call, storage data Software Terms larger) area. structure built on the stack during starting from the location addressed by the FP to lower addresses, and popped off during a return from procedure (also called stack frame). channel -- device unit. A command file —- A A logical path connecting a user process to a physical process requests the operating system to assign a channel to a device so that the process can transfer data to or from that device. user file containing command strings. command interpreter -Procedure-based code to receive, syntax check, and parse commands typed by the user at a terminal or submitted in a command file. command line interpreter (CLI) supervisor that handles the diagnostic terminal, The CLI interprets The command line, string terminated -- by A typing command, and complete command portion of diagnostic operator's to be run. typed on positional file The the commands command parameter —by spaces, such as a -- communication between the supervisor, and the program the operator's operand specification, of a option, command or a set of continued lines, normally carriage return key, containing a optionally, information modifying the command. consists of a command; its qualifiers, string for concatenate attribute. (CON) concatenated, are delimited constant. or the any; its parameter (file specifications, their qualifiers, if any. modules terminal. all to -- A program psects be of assigned section the same contiguous example), name yet addresses address space. Each module can specify an The linker performs the necessary padding contributions. The base alignment of the If from in A if if any; and a psect is different the virtual independent alignment. of zero bytes between resulting concatenated psects is according to the greatest alignment granularity of all the contributions to the psect. For example, if the greatest alignment granularity of all contributors is a page, the psect is page-aligned; although, some contributors may be byte-aligned, others word—-aligned, etc. VAX Diagnostic Design Guide condition —-- An exception condition detected and declared by software. condition codes —-- Four bits in the processor status word indicate the results of the previously executed instruction. that condition handler -- A procedure that a process wants the system to execute when an exception condition occurs. When an exception condition does occur, the operating system searches for a condition handler. When it finds the condition handler, the operating system initiates the handler immediately. The condition handler may perform some act to change the situation that caused the exception condition and then continue execution of the process that incurred the exception condition. Condition handlers execute in the context of the process at the access mode of the code that incurred the console level in the exception —-- console-based standalone context mode switching switching to condition. -- another diagnostic program that can be run only. Interrupting activity. the activity Context in switching progress occurs and as one using the process for process after another is scheduled for execution. The operating system saves the interrupted process's hardware context in its hardware PCB using the save process context instruction, loads another load process's process execution. cylinder -- surfaces of hardware context The tracks disk pack. a PCB into instruction, at the hardware context and the schedules that same radius on all recording default -- Assumed value supplied when not specifically override the normal a command qualifier does command function; also, fields system specification in a file is not complete. default disk -- The system files that whenever a name a specification that disk to which the operator creates, by file specification in a device. the of the string. system in when the writes all default. The default is used command does not explicitly delimiter —— A character or symbol used to within a command or data string. However, member the fills separate or limit items the delimiter is not a Glossary of device -- connected The to general the name processor for that any is Diagnostic physical capable of Software terminus Terms or receiving, 1link storing, or transmitting data. Card readers, line printers, and terminals are examples of record-oriented devices. Magnetic tape devices and disk devices are examples of mass storage devices. Terminal 1line interfaces and interprocessor links are examples of communications devices. device interrupt -- An levels 16 devices, through 23. controllers, interrupt Device and received interrupts on can interrupt be priority requested only by memories. device name -- The field in a file specification that identifies the device unit on which a file is stored. Device names also include data the mnemonics transfer followed by that request. a controller A followed by a unit number it from following fields. diagnostic provide a programs. identify an device name I/0 identification (if peripheral consists letter applicable). A of (if colon device in a mnemonic (:) separates applicable), supervisor -- A program that is loaded in memory to framework for control and execution of diagnostic It provides nondiagnostic services to diagnostic programs. direct I/0 program on drive | -- A mode addresses support -- from The of the the access device operating to peripheral registers system electro-mechanical -- The set of system code devices directly, in which without the relying drivers. unit system on which a recording medium magnetic tape reel) is mounted. driver a of (disk that a mass storage cartridge, handles disk physical device pack, I/O0 or to a device. entry mask -- A word (1) whose bits represent the régisters to be saved or restored on a subroutine or procedure call using the call and return instructions, and (2) which includes trap enable bits. entry point -- A location that can be specified as the object of a call. entry event It contains point mask. an entry mask and exception enables known as the -A change in process status or an indication of the occurrence of some activity that concerns an individual process or cooperating processes. An incident reported to the scheduler that affects a process's ability to execute. Events can be synchronous with the process's execution (a wait request, or they can be asynchronous (I/0O completion). Some examples of events: swapping, wake request, page fault. VAX Diagnostic Design Guide A event flag -- that flag. Event cleared to process or in bit the indicate among flags event flag cluster are used to synchronize occurrence of the normal be with associated event or set activities in a hardware (other than an instruction) that changes execution. instruction flow of can processes. many exception -- An event detected by the interrupt or jump, branch, case, or call the that an An exception is always caused by the execution of an instruction or set of instructions, while an interrupt is caused by an activity in the system independent of the current instruction. There are three types of hardware exceptions: traps, faults, and aborts. Examples are: underflow, and attempts to execute a privileged or reserved instruction; trace traps; compatibility mode faults; breakpoint instruction arithmetic execution; and exception condition such as hardware- or traps overflow, divide-by-zero. (other than instruction) -- A an interrupt that changes execution. exception dispatcher condition, the -- An software-detected or Jjump, branch, the normal flow operating system event case, or call of instruction procedure that searches for an exception handler when an exception condition occurs. If no exception handler is found for an exception or image that incurred the exception is terminated. executable (EXE) -- A program section attribute. The psect contains only instructions. This attribute provides the capability to separate instructions from read-only and read/write data. The linker uses this attribute in gathering psects and in the verification of the transfer address that must be present in an executable psect. executable image -- An image that is capable of being process. When run, an executable image is read from a execution in a run in a file for process. executive -- The generic name for the collection of procedures included in the operating system software that provides the basic control and monitor functions of the operating system. field replaceable modules, or one or in the field. file -physical as disk assigned logical -- A subassembly, one or a few (FRU) unit a few integrated circuits that may be replaced A logically related collection of data treated as a entity that occupies one or more blocks on a volume such or magnetic tape. A file can be referenced by a name by the user. A file normally consists of one or more records. Glossary of Diagnostic Software Terms file specification -- A unique name for a file on a mass storage medium. frame pointer -- General the base address register 13 of the most contains (R13). recent By convention, FP call frame on the stack. global symbol -- A symbol defined in available for reference by another (matches references with local symbol. a module that is potentially module. The linker resolves definitions) global symbols. Contrast with granularity boundary. -- The alignment of a contribution to a psect on a The alignment granularity may be byte, word, longword, quadword, or page. home block -- A block in the index file that contains identification, such as volume label and protection. image —-- An image consists of procedures bound together by the 1linker. There executable, sharable, and system. and are data three that types the volume have of been images: index file —- The access information file on for all a FILES-11 wvolume that contains files on the volume and enables operating system to identify and interrupt -- event An (other access than an the volume. exception or case, or call instruction) that changes the instruction execution. Interrupts are generally process executing when the interrupt the the branch, jump, normal flow of external to the occurs. interrupt priority level (IPL) —-- The interrupt level at which the processor executes when an interrupt is generated. There are 31 possible interrupt priority levels. IPL 1 is lowest, 31 highest. The levels arbitrate contention for processor service. For example, a device cannot interrupt the processor if the processor is currently executing at an interrupt priority level greater than the interrupt priority level of the device's interrupt service routine. interrupt stack -- The interrupt service a process kernel with context mode; kernel or in system-wide context. At executing system-wide privileges, current mode bits context-switched. in as the stack used when any time, the in user, supervisor, interrupt indicated PSL. by The executing processor service the is an in executive, or context interrupt interrupt in either operating stack stack 1is and not VAX Diagnostic Design Guide I/0 function code -- A 6-bit value specified in a Queue 1/0 request system service that describes the particular I/0O operation (e.g., to be performed read, write, level 1 -- Operating system logical Diagnostic -- level 2 using physical level 2R —-- can be QIO. or virtual run either QIO. under (VMS) rewind). based diagnostic programs using programs that standalone mode, supervisor-based diagnostic supervisor-based diagnostic VMS (on-line) or in the programs that level 3 -- Diagnostic supervisor-based diagnostic programs can be run in standalone mode only, using direct I/O0. that Diagnostic can be run only under VMS, level the 4 -- Standalone using physical macrodiagnostic QIO. programs that run without supervisor. library file modules of the —-- A same direct module access type. linked commands —-- A group together (linked) so as to file containing of independent form a single one or more commands connected executable 1list of commands. Once initiated, the entire linked command executed without further operator intervention. list may be Glossary of linker —— A program that by language processors sharable image file, or The reads one or Diagnostic more object Software modules and produces an executable a system image file. resolution of external created image references Terms file, between a linking —-- modules library and the used to create an image; the acquisition of referenced routines, service entry points, and data for the image; assignment of virtual addresses to components of an image. object link map -- A link map shows the virtual memory allocation of the total program image. The link map is found in a program listing in the program literal section -- translated An to allocation operand some synopsis. which is other value. used immediately, An operand literal argument -An independent statement that specifies itself. local symbol -- A symbol that is which value meaningful without specifies within only a to being itself. command the module that defines it. Symbols not identified to a language processor as global symbols are considered to be 1local symbols. A language processor resolves (matches references with definitions) 1local symbols. to another object module. They can, however, be passed through linker to the symbolic debugger. Contrast with global symbol. They are known the logical block A by using the -- to block (device-oriented) address comprise blocks logical @-7) of macro and on mass storage device rather than are labeled a that with logical address or block the the 4. unit number (LUN) -a device under test. —-- generate memory A a statement predefined management hardware's image linker volume-relative The starting the that set of virtual volume The cannot be made available (file-relative) numerical requests a -- The system and protection and and address. sequentially designation language physical (normally processor to include the instructions. page mapping activator identified the functions that the operating system's pager. module -- A part of a program assembled as a unit. Modular programming allows the development of large programs in which separate parts share data and routines. mount a physical volume -- To 1logically associate a wvolume with the unit on which it is loaded (an activity accomplished by system software on-line (an activity accomplished by a place a magnetic at the request of an operator). Or, to load or tape or disk pack on a drive and place the drive system operator). VAX Diagnostic Design Guide -- The logical link control layer (NSP) network service protocol of DECNET architecture. object module -- The binary output of a language processor such as the assembler or a compiler, which is used as input to the linker. on disk structure (ODS1, ODS2) -- A files-11 disk format used by VMS. operand —- a value (address or data) instruction. by an that is operated on, or with, overlay (OVR) -- A program section attribute. If a psect is overlayed, all contributions to the psect have the same base address. The 1length of the psect is the size of the largest contribution. All contributions to an overlayed psect must have the same alignment. page —— A set of 512 contiguous byte locations used as the unit of memory mapping and protection. Also, the data between the beginning of file a and page marker, a between a marker and the end of a file. between two markers, or page frame number (PFN) -- The address of the first byte of a page in physical memory. The high-order 21 bits of the physical address of the base of a page make up the PFN. page table entry (PTE) -- The data structure that identifies the location and status of a page of virtual address space. When a virtual page is in memory, the PTE contains the page frame number needed to map the virtual page to a physical page. When it is not in memory, the PTE contains the information needed to locate the page on secondary storage (disk). parameter —- A parameter is the object of a command. It can be a file specification, a keyword option, or a symbol value passed to a command procedure. In diagnostics, parameters are usually operator-supplied answers to questions asked by a program tested. concerning devices to be parameter switch -- A command preceded by a slash (/). In qualifier. diagnostics, it is parser —— A procedure that breaks down the components of a command into structural forms. physical address -- The address used by hardware to identify a location in physical memory or on directly addressable secondary storage devices such as disks. A physical memory address consists of a page frame number and the number of a byte within the page. A physical sector disk number. block address consists of a cylinder or track and Glossary of Diagnostic Software Terms physical block -- A block on a mass storage device referred to by its physical (device-oriented) address rather than a 1logical (volume-relative) or virtual (file-relative) address. position The independent contents of virtual (NOPIC) . memory. Priority -- level of code (PIC) -- A program section attribute. the psect do not depend on a specific location in The converse is nonposition independent code The rank assigned to an activity that determines service. For example, when several jobs system resources, the Jjob the highest priority service first. Program with its contend for receives interface (PGI) -The portion of the diagnostic that handles communication between the diagnostic program and the supervisor. The PGI implements services requested by diagnostic programs. supervisor Program number section of directives precedes -- program by the the first program section by Through program A portion of a module. The assembler creates a sections (psect) within a module, according to program developer. In addition, any code that defined program the assembler. sectioning the section program is placed developer in the BLANK controls the virtual memory allocation of a program. Any program attributes established by the program section directive are passed on to the linker. Thus, program sections can be declared as read only, nonexecutable, etc. See the VAX-11 MACRO Language Reference Manual an explanation of the various program section attribute functions. for In diagnostic programs, each test is given a separate program section. prompt —-- operator A program's typed out response to and/or request for action. qualifier —— A portion of a command string that modifies a command verb or command parameter by selecting one of several options. A qualifier, if present, follows the command verb or parameter to which it applies example, COPIES in the and qualifier file printed. queue -- A list queue I/O0 -- system calls or the of A in commands mode on of driver diagnostic the string indicates given program is command that or access format: "PRINT the jobs to routines supervisor /qualifier:option. <filename> user wants waiting to peripheral provided to by transfer /COPIES:3", three be copies For the of a which a processed. devices the VMS data. in operating VAX Diagnostic Design Guide radix -- The base of the number system currently in use. readable (RD) -- A program section attribute. The contents of the psect can be read at the execute time. The converse is nonreadable . (NORD) record -- A collection of adjacent items of data treated as a unit. A logical record can be of any length whose significance is A physical record section attribute. The programmer. the by determined is a device-dependent collection of contiguous bytes such as a block on a disk, or a collection of bytes sent to or received from a record-oriented device. relocatable (REL) and/or data. -- A program be assigned a base address by the linker. code psect must This psect can contain script file —— A line-oriented ASCII file that contains a list of commands. section -- A group selected sector VAX-11 the by —- A tests in a diagnostic program that may a disk. track on the surface of interpretation of and relation between portion system, of be operator. each of a track on a disk is normally divided On into a 22 sectors. semantics -or command The commands symbols. sharable image —- An image that has all of its internal references resolved, but which must be linked with an object module(s) to produce an executable image. A sharable image cannot be executed. to contain a library of image file can be used A sharable as a global section by installed be can image routines. A sharable the system manager. spooling —- Output Spooling: The method by which output to a low- speed peripheral device (such as a line printer) is placed into queues maintained on a high-speed device (such as disk) to await The method Input Spooling: transmission to the low-speed device. the card as (such peripheral low-speed a from input by which device high-speed a on maintained queues into reader) is placed (such input. as disk) to await transmission to a Job processing that stack -- An area of memory set aside for temporary storage, or for procedure and interrupt service 1linkages. A stack uses the last-in, first-out concept. As items are added to (pushed on) the stack, the stack pointer decrements. As items are retrieved from (popped off) the stack, the stack pointer increments. Glossary of stack a frame -- procedure A standard call, to lower addresses, and Also called call frame. stack pointer address of -- the data starting structure from popped Diagnostic the off built on location during a Software the stack addressed return Terms during by the FP procedure. from General top register 14 (Rl14). SP contains the (lowest address) of the processor-defined SP will access one of the five possible stack stack. Reference to pointers: kernel, executive, supervisor, user, or interrupt, depending on the value in the current mode and interrupt stack bits in the Processor Status Longword (PSL). standalone program mode and -- A the diagnostic diagnostic program environment in which supervisor run without the the VMS operating system. The operator must use the console terminal when running diagnostics in the standalone mode, and no other users have access to the system. status code -- failure of a always return symbolic another 1longword value that indicates the success argument -- An argument within a command that or services refers to value. syntax way A specific function. For example, system a status code in R@ upon completion. -- in The rules which governing command a symbols command are language ordered to within a structure. The form meaningful command statement statements. syntactic (e.g., unit -- An item contained argument, a qualifier). an system image storage when -- The image that is read the system is started up. into memory switch parameter from a command line that checks a specific a specific -- A that is passed from secondary to a program. test —— function time A unit or portion stamp -- A event occurred. track -- recording trap -- A of diagnostic the statement collection surface An a of of a exception of of the been executed. time blocks condition that caused the address of the next trap conditions the of at day a at single which radius on one of the disk. instruction is program hardware. that occurs All software can with a instruction. single at the end exception. The PC saved on the stack instruction that would normally have enable and disable some of the VAX Diagnostic Design Guide record device —-- A device unit such a as card reader or line printer. unwind the call stack -- To remove call frames from the stack by tracing back through nested procedure using the current portion of the computer calls content of the FP register and FP register content stored on the stack UUT for frame. each call (unit under test) -- The device or hardware being tested by a diagnostic program. virtual block number -- A number used to identify a block on a mass Storage device. The number is a file-relative address rather than a logical (volume-oriented) or physical (device-oriented) address. The first block in a file is always virtual block number one. : writable (WRT) -- A program section attribute. The content of the psect can be modified at execute time. The converse is nonwritable . (NOWRT) INDEX Automated Product Test Automated Automated Product Product Test Constraints, 13-1 Test-Remote Diagnosis (APT-RD), Assembly and Asynchronous (APT), 1-3 Link Procedures, 12-19 System Trap (AST), 12-6 Channel Services Macros, 8-9 Cleanup Routine, 6-15 Coding Conventions and Procedures, Coding Utility Coding VMS Command Macros, Service Line Condition Console Cluster Debug, Phase, 5-20 1-1 12-10 Environment, Consultation 9-1 (CLI), Engineers, Handlers, 13-1 8-1 7-1 Macros, Interpreter Comments, 11-14 Computer Design CPU Service Macros, Supervisor Coding 3-5 4-1 Environment, 3-5 14-1 Debug and Utility Commands, 14-6 Delay Service Macros, 8-24 Design Engineer, 1-1 Diagnostic Applications, 1-2 Diagnostic Execution Time, 2-4 Diagnostic Program Size, 2-3 Diagnostic Program Structure, 6-1 Diagnostic Supervisor, 5-1 Documentation, 11-1 Documentation File, 11-1 Error Error Message Message Formats, 8-29 Print Routines, 12-2 Error Message Service 8-23 Macros, Event Flag Service Macros, 9-30 Exception Handlers, 12-10 Execution Control Commands, 5-16 Fault Detection Coverage, 2-1 Field Field Service, 1-3 Replaceable Unit Formatted ASCII Global Subroutines, Header Module, Hibernate, (FRU), Output, 2-2 9-42 6-17 6-3 9-49 Implementation Phase, 4-3 Initialization Routine, 6-13 Input/Output (I/0) Service Macros, 9-5 Interrupts, 12-4 Level 1, 3-1, 6-22 Level 2, Level 2R, Level 3, 3-1, 6-23 4, 3-2, 6-24 Level Link 3-1, 3-1, 6-23 6-23 Procedures, 12-19 INDEX-1 1-4 Long Silences, 13-3 Looping Constraints,13-3 Macros - Alphabetical List, 16-1 Manufacturing Technicians, 1-1 Memory Management Service Macros, 8-18, 9-48 Module Preface, 11-6 Operational Functionality, 2-4 13-2 Parallel Testing, Planning 4-1 Phase, Program Control Commands, 5-4 Program Control Utility Macros, 7-13 Program Format Utility Macros, 7-2 Program Interface (PGI), Program Structure, 6-1 5-20 Program/Operator Dialogue Service Macros, 8-40 P-Table Control Macros, 7-23 P-Table Format, 6-9 Quality Assurance Procedures, 4-5 Queue I1/0 (QIO), Register Testing, 9-11 6-25 Return Status Codes, 9-5 Routine Preface, 11-190 Run-Time Considerations, 2-4, 13-2 Scripting Control, 5-14 Scripting Constraints, 13-2 Serial Testing, 13-2 Summary Routine, 6-16 Supervisor Service Macros, 8-1 Symbol Naming Conventions, 12-16 System Control Service Macros, 8-9 System Environment, Test Timer Routine, 6-20 3-8 Service Macros, User Defined Macros, Utility Macros, 7-1 9-34 12-14 VMS Service Macros, 9-1 Volume Verification, 13-3 INDEX-2 VAX DIAGNOSTIC DESIGN GUIDE Reader’s Comments EK-1VAXD-TM-001 Your comments and suggestions will help us in our continuous effort to improve the quality and usefulness of our publications. What is your general reaction to this manual? In your judgment is it complete, accurate, well organized, well written, etc.? Is it easy to use? What features are most useful? What faults or errors have you found in the manual? Does this manual satisfy the need you think it was intended to satisfy? Does it satisfy your needs? O Why? Please send me the current copy of the Technical Documentation Catalog, which contains information on the remainder of DIGITAL’s technical documentation. Name Street Title City Company State/Country Department » Zip Additional copies of this document are available from: Digital Equipment Corporation 444 Whitney Street Northboro, Ma 01532 Attention: Communications Services (NR2/M15) Customer Services Section Order No. EK-1VAXD-TM-001 Enanan No Postage Necessary if Mailed in the United States BUSINESS REPLY MAIL FIRST CLASS PERMIT NO.33 MAYNARD, MA. POSTAGE WILL BE PAID BY ADDRESSEE Digital Equipment Corporation Educational Services Development and Publishing 1925 Andover Street Tewksbury, Massachusetts 01876
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies