CONTENTS Title Page Copyright Page Preface 1 ACP-QIO Interface 1.1 ACP Functions and Encoding 1.2 File Information Block (FIB) 1.3 ACP Subfunctions 1.3.1 Directory Lookup 1.3.1.1 Input Parameters 1.3.1.2 Operation 1.3.1.3 Directory Entry Protection 1.3.2 Access 1.3.2.1 Input Parameters 1.3.2.2 Operation 1.3.3 Extend 1.3.3.1 Input Parameters 1.3.3.2 Operation 1.3.4 Truncate 1.3.4.1 Input Parameters 1.3.4.2 Operation 1.3.5 Read/Write Attributes 1.3.5.1 Input Parameters 1.4 ACP QIO Record Attributes Area 1.5 ACP-QIO Attributes Statistics Block 1.6 Major Functions 1.6.1 Create File 1.6.1.1 Input Parameters 1.6.1.2 Disk ACP Operation 1.6.1.3 Directory Entry Creation 1.6.1.4 Magnetic Tape ACP Operation 1.6.2 Access File 1.6.2.1 Input Parameters 1.6.2.2 Operation 1.6.3 Deaccess File 1.6.3.1 Input Parameters 1.6.3.2 Operation 1.6.4 Modify File 1.6.4.1 Input Parameters 1.6.4.2 Operation 1.6.5 Delete File 1.6.5.1 Operation 1.6.6 Mount 1.6.7 ACP Control 1.6.7.1 Input Parameters 1.6.7.2 Magnetic Tape Control Functions 1.6.7.3 Miscellaneous Disk Control Functions 1.6.7.4 Disk Quotas 1.7 I/O Status Block 2 Card Reader Driver 2.1 Supported Card Reader Device 2.2 Driver Features 2.2.1 Special Card Punch Combinations 2.2.1.1 End-of-File Condition 2.2.1.2 Set Translation Mode 2.2.2 Submitting Batch Jobs Through the Card Reader 2.2.3 Passing Data to Commands and Images 2.2.4 Error Recovery 2.3 Card Reader Driver Device Information 2.4 Card Reader Function Codes 2.4.1 Read 2.4.2 Sense Mode 2.4.3 Set Mode 2.4.3.1 Set Mode 2.4.3.2 Set Characteristic 2.5 I/O Status Block 3 Disk Drivers 3.1 Supported Disk Devices and Controllers 3.1.1 UDA50 UNIBUS Disk Adapter 3.1.2 KDA50 Disk Controller 3.1.3 KDB50 Disk Controller 3.1.4 HSC-Series Controllers 3.1.5 SII Integral Adapter 3.1.6 KFQSA Adapter 3.1.7 RQDX3 Controller 3.1.8 RA70 and RA90 Disk Drives 3.1.9 RA60 Disk 3.1.10 RA80/RB80/RM80 and RA81 Fixed-Media Disks 3.1.11 RB02 and RL02 Cartridge Disk 3.1.12 RC25 Disk 3.1.13 RD-Series Disks 3.1.14 RF-Series Disks 3.1.15 RK06 and RK07 Cartridge Disks 3.1.16 RM03 and RM05 Pack Disks 3.1.17 RP05 and RP06 Disk 3.1.18 RP07 Fixed Media Disk 3.1.19 RRD40 and RRD50 Read-Only Memory (CDROM) 3.1.20 RX01 Console Disk 3.1.21 RX02 Disk 3.1.22 RX-Series Drives 3.1.22.1 RX23 3.1.22.2 RX33 3.1.22.3 RX50 3.1.23 RZ-Series Disks 3.1.24 TU58 Magnetic Tape (DECtape II) 3.2 Driver Features 3.2.1 Dual-Pathed Disks 3.2.2 Dual Porting MASSBUS Disks 3.2.2.1 Port Selection and Access Modes 3.2.2.2 Disk Use and Restrictions 3.2.2.3 Restriction on Dual-Ported Non-DSA Disks in a VAXcluster 3.2.3 Dual-Pathed DSA Disks 3.2.4 Dual-Porting HSC Disks 3.2.5 Dual-Pathed RF-Series Disks 3.2.6 Data Check 3.2.7 Overlapped Seeks 3.2.8 Error Recovery 3.2.8.1 Skip Sectoring 3.2.9 Logical-to-Physical Translation (RX01 and RX02) 3.2.10 DIGITAL Storage Architecture (DSA) Devices 3.2.10.1 Bad Block Replacement and Forced Errors for DSA Disks 3.2.11 VAXstation 2000 and MicroVAX 2000 Disk Driver 3.2.12 SCSI Disk Class Driver 3.3 Disk Driver Device Information 3.4 Disk Function Codes 3.4.1 Read 3.4.2 Write 3.4.3 Sense Mode 3.4.4 Set Density 3.4.5 Search 3.4.6 Pack Acknowledge 3.4.7 Unload 3.4.8 Available 3.4.9 Seek 3.4.10 Write Check 3.4.11 Set Preferred Path 3.4.11.1 Forcing a Path Change 3.4.11.2 Using IO$_SETPRFPTH with Disks Dual Pathed Between HSCs 3.4.11.3 Using IO$_SETPRFPTH with Disks Dual Pathed Between VMS Systems 3.4.11.4 Using IO$_SETPRFPTH with Disks Accessed Through MSCP Servers 3.4.11.5 Using IO$_SETPRFPTH with Phase I Volume Shadowing 3.4.11.6 Using IO$_SETPRFPTH with Phase II Volume Shadowing 3.5 I/O Status Block 3.6 Disk Driver Programming Example 4 Laboratory Peripheral Accelerator Driver 4.1 Supported Device 4.1.1 LPA11-K Modes of Operation 4.1.2 Errors 4.2 Supporting Software 4.3 LPA11-K Device Information 4.4 LPA11-K Function Codes 4.4.1 Load Microcode 4.4.2 Start Microprocessor 4.4.3 Initialize LPA11-K 4.4.4 Set Clock 4.4.5 Start Data Transfer Request 4.4.6 LPA11-K Data Transfer Stop Command 4.5 High-Level Language Interface 4.5.1 High-Level Language Support Routines 4.5.1.1 Buffer Queue Control 4.5.1.2 Subroutine Argument Usage 4.5.2 LPA$ADSWP - Initiate Synchronous A/D Sampling Sweep 4.5.3 LPA$DASWP - Initiate Synchronous D/A Sweep 4.5.4 LPA$DISWP - Initiate Synchronous Digital Input Sweep 4.5.5 LPA$DOSWP - Initiate Synchronous Digital Output Sweep 4.5.6 LPA$LAMSKS - Set LPA11-K Masks and NUM Buffer 4.5.7 LPA$SETADC - Set Channel Information for Sweeps 4.5.8 LPA$SETIBF - Set IBUF Array for Sweeps 4.5.9 LPA$STPSWP - Stop In-Progress Sweep 4.5.10 LPA$CLOCKA - Clock A Control 4.5.11 LPA$CLOCKB - Clock B Control 4.5.12 LPA$XRATE - Compute Clock Rate and Preset Value 4.5.13 LPA$IBFSTS - Return Buffer Status 4.5.14 LPA$IGTBUF - Return Buffer Number 4.5.15 LPA$INXTBF - Set Next Buffer to Use 4.5.16 LPA$IWTBUF - Return Next Buffer or Wait 4.5.17 LPA$RLSBUF - Release Data Buffer 4.5.18 LPA$RMVBUF - Remove Buffer from Device Queue 4.5.19 LPA$CVADF - Convert A/D Input to Floating-Point 4.5.20 LPA$FLT16 - Convert Unsigned 16-Bit Integer to Floating-Point 4.5.21 LPA$LOADMC - Load Microcode and Initialize LPA11-K 4.6 I/O Status Block 4.7 Loading LPA11-K Microcode 4.7.1 Microcode Loader Process 4.7.2 Operator Process 4.8 RSX-11M/M-PLUS and VMS Differences 4.8.1 General 4.8.2 Alignment and Length 4.8.3 Status Returns 4.8.4 Sweep Routines 4.9 LPA11-K Programming Examples 4.9.1 LPA11-K High-Level Language Program (Program A) 4.9.2 LPA11-K High-Level Language Program (Program B) 4.9.3 LPA11-K QIO Functions Program (Program C) 5 Line Printer Driver 5.1 Supported Line Printer Devices 5.1.1 LP11 Line Printer Controller 5.1.2 DMF32 and DMB32 Line Printer Controllers 5.1.3 LP27 Line Printer 5.1.4 LA11 DECprinter I 5.1.5 LN01 Laser Page Printer 5.1.6 LN03 Laser Page Printer 5.2 Driver Features 5.2.1 Output Character Formatting 5.2.2 Error Recovery 5.3 Line Printer Driver Device Information 5.4 Line Printer Function Codes 5.4.1 Write 5.4.1.1 Write Function Carriage Control 5.4.2 Sense Printer Mode 5.4.3 Set Mode 5.5 I/O Status Block 5.6 Line Printer Driver Programming Example 6 Magnetic Tape Drivers 6.1 Supported Magnetic Tape Controllers 6.1.1 TM03 Magnetic Tape Controller 6.1.2 TS11 Magnetic Tape Controller 6.1.3 TM78 and TM79 Magnetic Tape Controllers 6.1.4 TU80 Magnetic Tape Subsystem 6.1.5 TU81 and TA81 Magnetic Tape Subsystems 6.1.6 TU81-Plus Magnetic Tape Subsystem 6.1.7 TA90 Magnetic Tape Subsystem 6.1.8 RV20 Write-Once Optical Drive 6.1.9 TK50 Cartridge Tape System 6.1.10 TK70 Cartridge Tape System 6.1.11 TZ30 Cartridge Tape System 6.1.12 Read and Write Compatibility Among Cartridge Tape Systems 6.2 Driver Features 6.2.1 Dual Path Tape Drives 6.2.2 Dynamic Failover and Mount Verification 6.2.3 Tape Caching 6.2.4 Master Adapters and Slave Formatters 6.2.5 Data Check 6.2.6 Error Recovery 6.2.7 Streaming Tape Systems 6.3 Magnetic Tape Driver Device Information 6.4 Magnetic Tape Function Codes 6.4.1 Read 6.4.2 Write 6.4.3 Rewind 6.4.4 Skip File 6.4.5 Skip Record 6.4.5.1 Logical End-of-Volume Detection 6.4.6 Write End-of-File 6.4.7 Rewind Offline 6.4.8 Unload 6.4.9 Sense Tape Mode 6.4.10 Set Mode 6.4.11 Data Security Erase 6.4.12 Pack Acknowledge 6.4.13 Available 6.4.14 Flush 6.5 I/O Status Block 6.6 Magnetic Tape Driver Programming Examples 6.6.1 Magnetic Tape Data Program Example 6.6.2 Magnetic Tape Device Characteristic Program Example 6.6.3 Set Mode and Sense Mode Program Example 7 Mailbox Driver 7.1 Mailbox Operations 7.1.1 Creating Mailboxes 7.1.2 Deleting Mailboxes 7.1.3 Mailbox Message Format 7.1.4 Mailbox Protection 7.2 Mailbox Driver Device Information 7.3 Mailbox Function Codes 7.3.1 Read 7.3.2 Write 7.3.3 Write End-of-File Message 7.3.4 Set Attention AST 7.3.5 Set Protection 7.4 I/O Status Block 7.5 Mailbox Driver Programming Example 8 Terminal Driver 8.1 Supported Terminal Devices 8.2 Terminal Driver Features 8.2.1 Input Processing 8.2.1.1 Command Line Editing and Command Recall 8.2.1.2 Control Characters and Special Keys 8.2.1.3 Read Verify 8.2.1.4 Escape and Control Sequences 8.2.1.5 Type-Ahead Feature 8.2.1.6 Line Terminators 8.2.1.7 Special Operating Modes 8.2.2 Output Processing 8.2.2.1 Duplex Modes 8.2.2.2 Formatting of Output 8.2.2.3 SET HOST Facility and Output Buffering 8.2.3 Dial-Up Support 8.2.3.1 Modem Signal Control 8.2.3.2 Hangup on Logging Out 8.2.3.3 Preservation of a Process Across Hangups 8.2.4 Terminal/Mailbox Interaction 8.2.5 Autobaud Detection 8.2.6 Out-of-Band Control Character Handling 8.3 Terminal Driver Device Information 8.3.1 Terminal Characteristics Categories 8.4 Terminal Function Codes 8.4.1 Read 8.4.1.1 Function Modifier Codes for Read QIO Functions 8.4.1.2 Read Function Terminators 8.4.1.3 Itemlist Read Operations 8.4.1.4 Read Verify Function 8.4.2 Write 8.4.2.1 Function Modifier Codes for Write QIO Functions 8.4.2.2 Write Function Carriage Control 8.4.3 Set Mode 8.4.3.1 Hangup Function Modifier 8.4.3.2 Enable CTRL/C AST and Enable CTRL/Y AST Function Modifiers 8.4.3.3 Set Modem Function Modifier 8.4.3.4 Loopback Function Modifier 8.4.3.5 Enable Out-of-Band AST Function Modifier 8.4.3.6 Broadcast Function Modifier 8.4.4 LAT Port Driver QIO Interface 8.4.4.1 LAT Port Driver Functions 8.4.4.2 Application Services Creation 8.4.4.3 Hangup Notification 8.4.5 Sense Mode and Sense Characteristics 8.4.5.1 Type-ahead Count Function Modifier 8.4.5.2 Read Modem Function Modifier 8.4.5.3 Broadcast Function Modifier 8.5 I/O Status Block 8.6 Terminal Driver Programming Examples 8.6.1 Terminal I/O Program Example 8.6.2 Read Verify Program Example 8.6.3 LAT Application Device Program Example 9 Pseudoterminal Driver 9.1 Pseudoterminal Operations 9.1.1 Creating a Pseudoterminal 9.1.2 Canceling a Request 9.1.3 Deleting a Pseudoterminal 9.2 Pseudoterminal Driver Features 9.3 Pseudoterminal Driver Device Information 9.4 I/O Buffers 9.5 Pseudoterminal Functions 9.5.1 Reading Data 9.5.2 Writing Data 9.5.3 Using Write with Echo 9.5.4 Flow Control 9.5.5 Event Notification 9.5.5.1 Input Flow Control 9.5.5.2 Output Stop 9.5.5.3 Output Resume 9.5.5.4 Characteristics Changed 9.5.5.5 Output Abort 9.5.5.6 Terminal Driver Read Events 9.6 Pseudoterminal Driver Programming Example 9.6.1 Design Overview 10 Shadow-Set Virtual Unit Driver 10.1 Introduction 10.2 Phase I and Phase II Compatibility 10.3 Configurations 10.3.1 Processors and Controllers 10.3.2 Compatible Disk Drives and Volumes 10.4 Driver Functions 10.4.1 CRESHAD 10.4.2 ADDSHAD 10.4.3 COPYSHAD 10.4.4 REMSHAD 10.4.5 AVAILABLE 10.4.6 SENSECHAR 10.4.7 Read and Write Functions 10.5 Error Processing 11 Using the VMS Generic SCSI Class Driver 11.1 Overview of SCSI 11.2 VMS SCSI Class/Port Architecture 11.3 Overview of the VMS Generic SCSI Class Driver 11.4 Accessing the VMS Generic SCSI Class Driver 11.5 SCSI Port Features Under Application Control 11.5.1 Setting the Data Transfer Mode 11.5.2 Enabling Disconnection and Reselection 11.5.3 Disabling Command Retry 11.5.4 Setting Command Timeouts 11.6 Configuring a Device Using the Generic Class Driver 11.6.1 Disabling the Autoconfiguration of a SCSI Device 11.7 Assigning a Channel to GKDRIVER 11.8 Issuing a $QIO Request to the Generic Class Driver 11.9 Generic SCSI Class Driver Device Information 11.10 Generic SCSI Class Driver Programming Example A I/O Function Codes A.1 ACP-QIO Interface Driver A.2 Card Reader Driver A.3 Disk Drivers A.4 Laboratory Peripheral Accelerator Driver A.5 Line Printer Driver A.6 Magnetic Tape Drivers A.7 Mailbox Driver A.8 Terminal Driver B Tables B.1 Terminal Sequences and Modes C Control Connection Routines PTD$CANCEL PTD$CREATE PTD$DELETE PTD$READ PTD$SET_EVENT_NOTIFICATION PTD$WRITE EXAMPLES 3-1 Disk Program Example 4-1 LPA11-K High-Level Language Program (Program A) 4-2 LPA11-K High-Level Language Program (Program B) 4-3 LPA11-K QIO Functions Program (Program C) 5-1 Line Printer Program Example 6-1 Magnetic Tape Data Program Example 6-2 Device Characteristic Program Example 6-3 Set Mode and Sense Mode Program Example 7-1 Mailbox Driver Program Example 8-1 Terminal Program Example 8-2 Read Verify Program Example 8-3 LAT Application Device Program 9-1 Sample Pseudocode for Pseudoterminal Driver Program FIGURES 1-1 ACP-QIO Interface 1-2 ACP Device- or Function-Dependent Arguments 1-3 ACP Device/Function Argument Descriptor Format 1-4 File Information Block Format 1-5 Typical Short File Information Block 1-6 Attribute Control Block Format 1-7 ACP-QIO Record Attributes Area 1-8 ACP-QIO Attributes Statistics Block 1-9 Quota File Transfer Block 1-10 IOSB Contents - ACP-QIO Functions 2-1 A Card Reader Batch Job 2-2 Binary and Packed Column Storage 2-3 Set Mode Characteristics Buffer 2-4 Set Characteristic Buffer 2-5 IOSB Contents 3-1 Disk Physical Address 3-2 Dual-Ported Disk Drives 3-3 Starting Physical Address 3-4 Physical Cylinder Number Format 3-5 IOSB Contents 3-6 IOSB Contents for the Sense Mode Function 4-1 Relationship of Supporting Software to LPA11-K 4-2 Data Transfer Command Table 4-3 Buffer Queue Control 4-4 I/O Functions IOSB Content 5-1 P4 Carriage Control Specifier 5-2 Write Function Carriage Control (Prefix and Postfix Coding) 5-3 Set Mode Buffer 5-4 Set Characteristics Buffer 5-5 IOSB Contents - Write Function 5-6 IOSB Contents - Set Mode Function 6-1 IO$_SKIPFILE Argument 6-2 IO$_SKIPRECORD Argument 6-3 Sense Mode P1 Buffer 6-4 Set Mode Characteristics Buffer 6-5 Set Characteristics Buffer 6-6 IOSB Contents 7-1 Multiple Mailbox Channels 7-2 Typical Mailbox Message Format 7-3 Read Mailbox 7-4 Write Mailbox 7-5 Write Attention AST (Read Unsolicited Data) 7-6 Read Attention AST 7-7 Protection Mask 7-8 IOSB Contents - Read Function 7-9 IOSB Contents - Write Function 7-10 IOSB Contents - Set Protection Function 8-1 Modem Control - Two-Way Simultaneous Operation 8-2 Terminal Mailbox Message Format 8-3 Short and Long Forms of Terminator Mask Quadwords 8-4 Itemlist Read Descriptor 8-5 P4 Carriage Control Specifier 8-6 Write Function Carriage Control (Prefix and Postfix Coding) 8-7 Set Mode and Set Characteristics Buffers 8-8 Set Mode P1 Block 8-9 Relationship of Out-of-Band Function with Control Characters 8-10 IO$M_LT_MAP_PORT Item List 8-11 Sense Mode Characteristics Buffer 8-12 Sense Mode Characteristics Buffer (type-ahead) 8-13 Sense Mode P1 Block 8-14 IOSB Contents-Read Function 8-15 IOSB Contents-Itemlist Read Function 8-16 IOSB Contents-Write Function 8-17 IOSB Contents-Set Mode, Set Characteristics, Sense Mode, and Sense Characteristics Functions 8-18 IOSB Contents-LAT Port Driver Function 9-1 Buffer Layout 10-1 I/O Status Block for Copy Operations 10-2 I/O Status Block for Copy Information 11-1 VMS SCSI Class/Port Interface 11-2 Generic SCSI Class Driver Flow 11-3 SCSI_NOAUTO System Parameter C-1 Device Characteristics Buffer TABLES 1-1 Contents of the File Information Block 1-2 FIB Fields (Lookup Control) 1-3 FIB Fields (Access Control) 1-4 FIB Fields (Extend Control) 1-5 FIB Fields (Truncate Control) 1-6 Attribute Control Block Fields 1-7 ACP-QIO Attributes 1-8 File Characteristics Bits 1-9 ACP Record Attributes Values 1-10 Contents of the Statistics Block 1-11 IO$_CREATE and the File Information Block 1-12 IO$_ACCESS and the File Information Block 1-13 IO$_ACPCONTROL and the File Information Block 1-14 Magnetic Tape Operations and the File Information Block 1-15 Disk Quota Functions (Enable/Disable) 1-16 Disk Quota Functions (Individual Entries) 2-1 Card Reader Device-Independent Characteristics 2-2 Device-Dependent Characteristics for Card Readers 2-3 Card Reader I/O Functions 2-4 Set Mode and Set Characteristic Card Reader Characteristics 2-5 Card Reader Codes 3-1 Supported Disk Devices 3-2 Disk Device Characteristics 3-3 Disk I/O Functions 4-1 Minimum and Maximum Configurations per LPA11-K 4-2 LPA11-K Device-Independent Characteristics 4-3 LPA11-K Device-Dependent Characteristics 4-4 VAX Procedures for the LPA11-K 4-5 Subroutine Argument Usage 4-6 LPA$IGTBUF Call - IBUFNO and IOSB Contents 4-7 LPA$IWTBUF Call - IBUFNO and IOSB Contents 4-8 Program A Variables 4-9 Program B Variables 5-1 Printer Device-Independent Characteristics 5-2 Device-Dependent Characteristics for Line Printers 5-3 Write Function Carriage Control (FORTRAN: byte 0 not equal to 0) 5-4 Write Function Carriage Control (P4 byte 0 equal to 0) 6-1 Supported Magnetic Tape Devices 6-2 Magnetic Tape Device-Independent Characteristics 6-3 Device-Dependent Information for Tape Devices 6-4 Extended Device Characteristics for Tape Devices 6-5 Magnetic Tape I/O Functions 6-6 Set Mode and Set Characteristics Magnetic Tape Characteristics 6-7 Extended Device Characteristics for Tape Devices 7-1 Mailbox Read and Write Operations 7-2 Mailbox Characteristics 8-1 Supported Terminal Devices 8-2 Terminal Control Characters 8-3 Control and Data Signals (Full Modem Mode Configuration) 8-4 Terminal Device-Independent Characteristics 8-5 Terminal Characteristics 8-6 Extended Terminal Characteristics 8-7 Read QIO Function Modifiers for the Terminal Driver 8-8 Item Codes for Itemlist Read Operations for the Terminal Driver 8-9 Write QIO Function Modifiers for the Terminal Driver 8-10 Write Function Carriage Control (FORTRAN: byte 0 not equal to 0) 8-11 Write Function Carriage Control (P4 byte 0 = 0) 8-12 Broadcast Requester IDs 8-13 IO$M_LT_CONNECT Request Status 8-14 IO$M_LT_MAP_PORT and IO$M_LT_RATING Request Status 8-15 Byte IOSB+5 Status Information 8-16 LAT Rejection Codes 10-1 Hardware Devices That Support Volume Shadowing 10-2 Functions of the Shadow Set Virtual Unit Driver B-1 DEC Multinational Character Set B-2 Sequences and Modes C-1 Control Connection Routines C-2 Symbolic Names Defined by $PTDDEF Macro