PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 0 Table of contents (1) 67 Declarations (1) 213 Controller Initialization (1) 242 Unit Initialization (1) 330 Clone a new UCB and create a new pair of PTY's (1) 427 Set Unit Characteristics (1) 522 Start I/O Routine (1) 575 Receiver service routine (1) 630 Port control routines - ABORT and DISCONNECT (1) 692 End of PTYDRIVER PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 1 4.00 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 0000 1 .TITLE PTYDRIVER - Port Driver for PTY's 0000 2 .IDENT /4.00/ 0000 3 0000 4 ;++ 0000 5 ; Facility: 0000 6 ; VAX/VMS Pseudo-terminal driver 0000 7 ; 0000 8 ; Abstract: 0000 9 ; This is a port driver to provide a pseudo-terminal capability for VAX 0000 10 ; VMS. The pseudo-terminal is a pair of pseudo devices with consecutive 0000 11 ; unit numbers. These devices behave like mailboxes in that 0000 12 ; they are created dynamically when a channel is assigned. Assigning 0000 13 ; a channel on the device PTY0: will automatically create two new 0000 14 ; devices, PTYn and PTY(n+1). A PTY differs from a mailbox in that it 0000 15 ; is a terminal class device, and responds correctly to all terminal 0000 16 ; driver QIO functions. 0000 17 ; 0000 18 ; The PTY(n+1) device is called the terminal device. It is 0000 19 ; usually assigned as the primary input/output device (the "terminal") 0000 20 ; for a process created to perform some task. The PTYn device is 0000 21 ; called the control device. It is usually assigned to a program which 0000 22 ; transmits and receives messages from the terminal device process. 0000 23 ; 0000 24 ; The two devices communicate at STARTIO level through 0000 25 ; the code of this driver. Both devices are terminal class devices and 0000 26 ; are serviced by the terminal class driver. The characteristics of 0000 27 ; the control device are fixed and cannot be changed. Any changes made 0000 28 ; to the control device characteristics will be propagated to the 0000 29 ; terminal device. The temporary and permanent characteristics of 0000 30 ; the devices are always the same. 0000 31 ; 0000 32 ; The process which creates a PTY device must have sufficient BYTLM 0000 33 ; quota for both device's UCBs. 0000 34 ; 0000 35 ; Author: 0000 36 ; Gary L. Grebus, 27-Nov-1983 00:28:15 0000 37 ; Rewritten extensively by Kevin Carosso for VMS V4 and then enhanced. 0000 38 ; 0000 39 ; Revision History: 0000 40 ; 0000 41 ; 4.00 -- Kevin Carosso, 6-Jan-1985 0000 42 ; Converted to VMS V4. Did the following: 0000 43 ; - Changed references to owner and prot to use new ORB structure. 0000 44 ; - Changed PORT/CLASS interface table to use $VEC macros. 0000 45 ; - Changed SET_UNIT port interface to SET_LINE for the table. 0000 46 ; - Changed PORT/CLASS interface to use unit/controller init macros. 0000 47 ; - Moved PTY specific UCB fields to end of the TTY UCB, since it 0000 48 ; used to use (unused) TT_MAP which is no longer in the UCB. 0000 49 ; - Completely rewrote the mechanism whereby master and slave UCBs 0000 50 ; are cloned. I now use the CLONEDUCB entry point in the DDT to 0000 51 ; initialize the master UCB. The CLONE initialization code then 0000 52 ; calls the proper IOC$ routines to clone yet another UCB for the 0000 53 ; slave. This gets rid of the odd restrictions on UCB size 0000 54 ; brought about by the old method of cloning a huge UCB and 0000 55 ; cutting it in half for the two PTY's. This meant I had to 0000 56 ; rewrite the code that handles DISCONNECTs so that it either 0000 57 ; marks a UCB for deletion by $DASSGN or deletes it explicitly. PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 2 4.00 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 0000 58 ; 0000 59 ; I have a better way of handling DISCONNECT so that the PTY 0000 60 ; works more like a terminal with the HANGUP characteristic. I 0000 61 ; will work on that once I figure out how the class driver really 0000 62 ; handles terminal hangup. 0000 63 ; 0000 64 ;-- 0000 65 PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 3 4.00 Declarations 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 0000 67 .SBTTL Declarations 0000 68 0000 69 .LIBRARY /SYS$LIBRARY:LIB/ 0000 70 ; 0000 71 ; External Constants 0000 72 ; 0000 73 $CRBDEF ; Define CRB 0000 74 $DCDEF ; Define adapter types 0000 75 $DDBDEF ; Define DDB 0000 76 $DDTDEF ; DDT 0000 77 $DEVDEF ; Define device types 0000 78 $DYNDEF ; Define DYN symbols 0000 79 $IDBDEF ; Define IDB 0000 80 $TTYDEF ; Define terminal driver symbols 0000 81 $TTDEF ; Define terminal types 0000 82 $TT2DEF ; Define extended characteristics 0000 83 $UCBDEF ; Define UCB 0000 84 $VECDEF ; Define CRB vector fields 0000 85 $TTYMACS ; Define terminal driver macros 0000 86 $TTYDEFS ; Define terminal driver symbols 0000 87 $ORBDEF ; Object rights block 0000 88 ; 0000 89 ; Add some fields to the end of the UCB. 0000 90 ; 0000 91 $DEFINI LOCAL,GLOBAL 0000 92 00000134 0000 93 .=UCB$C_TT_LENGTH ; Add to end of normal TT UCB 0134 94 $DEF UCB$L_PTY_CPID .BLKL 1 ; Place to save creator PID 0138 95 $DEF UCB$L_PARTNER_UCB .BLKL 1 ; Address of partner's UCB. 013C 96 $DEF UCB$L_PTY_CLASS_DDT .BLKL 1 ; Class driver's DDT 0140 97 $DEF UCB$C_PTY_LENGTH .BLKW 1 ; New length of UCB 0142 98 0142 99 $DEFEND UCB 0000 100 0000 101 ; 0000 102 ; Control PTY characteristics 0000 103 ; 0000 104 PTY_DEFCHAR = TT$M_HOSTSYNC ! TT$M_LOWER ! TT$M_MECHFORM ! TT$M_MECHTAB - 0000 105 ! TT$M_NOECHO ! TT$M_SCOPE ! TT$M_TTSYNC ! TT$M_NOBRDCST - 002AB1B2 0000 106 ! TT$M_EIGHTBIT ! TT$M_MODEM ! TT$M_REMOTE 00040084 0000 107 PTY_DEFCHAR2 = TT2$M_HANGUP ! TT2$M_ALTYPEAHD ! TT2$M_PASTHRU 00000050 0000 108 PTY_DEFWIDTH = 80 00000000 0000 109 PTY_DEFPAGE=0 00000000 0000 110 PTY_DEFTYPE = TT$_UNKNOWN 0000 111 0000 112 ; 0000 113 ; Local macros 0000 114 ; 0000 115 .MACRO IF_TERMINAL LABEL 0000 116 BLBC UCB$W_UNIT(R5),LABEL ;; Branch if even (terminal) unit 0000 117 .ENDM IF_TERMINAL 0000 118 0000 119 .MACRO IF_CONTROL LABEL 0000 120 BLBS UCB$W_UNIT(R5),LABEL ;; Branch if odd (control) unit 0000 121 .ENDM IF_CONTROL 0000 122 ; 0000 123 ; Local storage PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 4 4.00 Declarations 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 0000 124 ; 00000000 125 .PSECT $$$105_PROLOGUE 0000 126 0000 127 ; 0000 128 ; Driver prologue table 0000 129 ; 0000 130 PTY$DPT:: ; Driver start 0000 131 DPTAB - 0000 132 END=PTY$END,- ; End of driver 0000 133 UCBSIZE=UCB$C_PTY_LENGTH,- ; Size of UCB (double size) 0000 134 FLAGS=DPT$M_NOUNLOAD,- ; No unload allowed 0000 135 ADAPTER=NULL,- ; No adapter 0000 136 NAME=PTYDRIVER,- ; Name of driver 0000 137 VECTOR=PORT_VECTOR ; Port driver vector table 0038 138 DPT_STORE INIT ; DPT initialization 0038 139 DPT_STORE UCB,UCB$B_FIPL,B,8 ; Fork IPL 003C 140 DPT_STORE UCB,UCB$L_DEVCHAR,L,<- 003C 141 DEV$M_REC!- ; Leave AVL clear, will be 003C 142 DEV$M_IDV!- ; set in the UNIT_INIT if 003C 143 DEV$M_ODV!- ; no errors creating new DDT. 003C 144 DEV$M_TRM!- 003C 145 DEV$M_CCL> 0043 146 DPT_STORE UCB, UCB$L_DEVCHAR2,L,<- 0043 147 DEV$M_NNM> ; Prefix with node name 004A 148 ; 004A 149 ; The site-defined default characteristics are specified for PTY devices so 004A 150 ; that the terminal device will resemble a default terminal. The values which 004A 151 ; could affect PTYDRIVER operation are reset in the unit init routine. 004A 152 ; 004A 153 DPT_STORE UCB,UCB$B_DEVCLASS,B,DC$_TERM ; Class 004E 154 DPT_STORE UCB,UCB$B_TT_DETYPE,B,TT$_UNKNOWN ; Type 0052 155 DPT_STORE UCB,UCB$W_TT_DESIZE,@W,TTY$GW_DEFBUF ; Buffer size 0059 156 DPT_STORE UCB,UCB$L_TT_DECHAR,@L,TTY$GL_DEFCHAR ; Default character 0060 157 DPT_STORE UCB,UCB$L_TT_DECHA1,@L,TTY$GL_DEFCHAR2 ; Ditto 0067 158 DPT_STORE UCB,UCB$W_TT_DESPEE,@B,TTY$GB_DEFSPEED ; Default speed 006E 159 DPT_STORE UCB,UCB$W_TT_DESPEE+1,@B,TTY$GB_RSPEED ; Default rspeed 0075 160 DPT_STORE UCB,UCB$B_TT_DEPARI,@B,TTY$GB_PARITY ; Default parity 007C 161 DPT_STORE UCB,UCB$B_TT_PARITY,@B,TTY$GB_PARITY ; Ditto 0083 162 DPT_STORE UCB,UCB$B_DEVTYPE,B,TT$_UNKNOWN ; Type 0087 163 DPT_STORE UCB,UCB$W_DEVBUFSIZ,@W,TTY$GW_DEFBUF ; Buffer size 008E 164 DPT_STORE UCB,UCB$L_DEVDEPEND,@L,TTY$GL_DEFCHAR ; Default character 0095 165 DPT_STORE UCB,UCB$L_TT_DEVDP1,@L,TTY$GL_DEFCHAR2 ; Ditto 009C 166 DPT_STORE UCB,UCB$W_TT_SPEED,@B,TTY$GB_DEFSPEED ; Default speed 00A3 167 DPT_STORE UCB,UCB$W_TT_SPEED+1,@B,TTY$GB_RSPEED ; Default rspeed 00AA 168 DPT_STORE UCB,UCB$B_DIPL,B,8 ; Device IPL (no device involved) 00AE 169 DPT_STORE UCB,UCB$L_TT_WFLINK,L,0 ; Zero write queue 00B5 170 DPT_STORE UCB,UCB$L_TT_WBLINK,L,0 ; Ditto 00BC 171 DPT_STORE UCB,UCB$L_TT_RTIMOU,L,0 ; Zero read timed out disp. 00C3 172 00C3 173 DPT_STORE ORB,ORB$B_FLAGS,B, ; Allow world access 00C7 174 DPT_STORE ORB,ORB$W_PROT,@W,TTY$GW_PROT ; Default TTY prot 00CE 175 DPT_STORE ORB,ORB$L_OWNER,@L,TTY$GL_OWNUIC ; Default TTY owner 00D5 176 DPT_STORE DDB,DDB$L_DDT,D,PTY$DDT ; Dispatch table 00DA 177 00DA 178 DPT_STORE REINIT ; Reinitialization 00DA 179 DPT_STORE CRB,CRB$L_INTD+VEC$L_INITIAL,D,PTY$INITIAL ; Ctrller init 00DF 180 DPT_STORE END PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 5 4.00 Declarations 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 0000 181 0000 182 DDTAB DEVNAM = PTY,- ; Dummy dispatch table 0000 183 START = 0,- 0000 184 FUNCTB = 0, - 0000 185 UNITINIT = PTY$INIT_UNIT, - 0000 186 CLONEDUCB = PTY$CLONE_UCB 0038 187 00000038 188 .PSECT $$$115_DRIVER,LONG 0038 189 0038 190 ; The associated class driver uses this table to command the port driver. 0038 191 ; The address of this table is contained in the terminal UCB extension area. 0038 192 ; The offset definitions are defined by $TTYDEFS. 0038 193 0038 194 PORT_VECTOR: 0038 195 0038 196 ; PTY port specific dispatch table 0038 197 0038 198 $VECINI PTY, PTY$NULL 0070 199 0070 200 $VEC STARTIO, PTY$STARTIO ; Start new output 003C 201 $VEC DISCONNECT, PTY$DISCONNECT ; Disconnect port 0040 202 $VEC ABORT, PTY$ABORT ; Abort output in progress 005C 203 $VEC SET_LINE, PTY$SET_LINE ; Set unit characteristics 0044 204 0044 205 $VECEND 0074 206 0074 207 ; Dummy entry points for unsupported functions 0074 208 0074 209 PTY$null:: 05 0074 210 RSB ; Null routine 0075 211 PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 6 4.00 Controller Initialization 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 0075 213 .SBTTL Controller Initialization 0075 214 0075 215 ;++ 0075 216 ; Functional Description: 0075 217 ; 0075 218 ; This routine is entered at controller configuration and power 0075 219 ; recovery. 0075 220 ; 0075 221 ; Inputs: 0075 222 ; R4 - address of the CSR (controller status register) 0075 223 ; R5 - address of the IDB (interrupt data block) 0075 224 ; R6 - address of the DDB (device data block) 0075 225 ; R8 - address of the CRB (channel request block) 0075 226 ; 0075 227 ; Outputs: 0075 228 ; None 0075 229 ; 0075 230 ; Implicit inputs: 0075 231 ; IPL = IPL$_POWER 0075 232 ; 0075 233 ;-- 0075 234 0075 235 PTY$INITIAL:: 0075 236 class_ctrl_init PTY$DPT, port_vector ; Relocate port driver table 0B A8 94 00A1 237 CLRB CRB$B_TT_TYPE(R8) ; Set unknown controller type 05 00A4 238 RSB 00A5 239 00A5 240 PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 7 4.00 Unit Initialization 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 00A5 242 .SBTTL Unit Initialization 00A5 243 00A5 244 ;++ 00A5 245 ; PTY$INIT_UNIT - Unit Initialization 00A5 246 ; 00A5 247 ; Functional Description: 00A5 248 ; 00A5 249 ; This routine performs unit initialization for the PTY0 device. 00A5 250 ; This can only be called for unit 0, since all the other units get 00A5 251 ; pointed at the standard TTDRIVER DDT, which has no UNIT_INIT. 00A5 252 ; 00A5 253 ; Main thing to do here is ignore any powerfails, hook up to the 00A5 254 ; class driver (we also did some of this in the controller init 00A5 255 ; routine), then some special initialization for unit 0. 00A5 256 ; 00A5 257 ; Inputs: 00A5 258 ; R5 - Address of our UCB 00A5 259 ; 00A5 260 ; Outputs: 00A5 261 ; R3, R4, R5 must be preserved 00A5 262 ; Device available (AVL) bit set in UCB$L_DEVCHAR if no errors. 00A5 263 ; 00A5 264 ; Implicit inputs: 00A5 265 ; IPL = IPL$_POWER 00A5 266 ;-- 00A5 267 00A5 268 PTY$INIT_UNIT:: 03 64 A5 05 E1 00A5 269 bbc #UCB$V_POWER, - ; Do nothing if powerfail 00AA 270 UCB$L_STS(r5), 10$ 0077 31 00AA 271 brw 99$ 00AD 272 10$: 00AD 273 ; 00AD 274 ; Init class/port interface 00AD 275 ; 50 88 AF DE 00AD 276 moval PTY$VEC, r0 ; Set PTY port vector table 00B1 277 ; 00B1 278 ; Note well! The following code comes directly from the CLASS_UNIT_INIT 00B1 279 ; macro in $TTYMACS. We cannot use the macro directly, however, 00B1 280 ; because it changes our DDT to that of the class driver. We want 00B1 281 ; our template device (unit 0) to have our own DDT. We will 00B1 282 ; explicitly alter UCB's we clone later to point to the class 00B1 283 ; driver's DDT. 00B1 284 ; 51 00000000'GF D0 00B1 285 MOVL G^TTY$GL_DPT,R1 52 1E A1 3C 00B8 286 MOVZWL DPT$W_VECTOR(R1),R2 51 52 C0 00BC 287 ADDL R2,R1 0114 C5 51 D0 00BF 288 MOVL R1,UCB$L_TT_CLASS(R5) 00C4 289 013C C5 10 A1 D0 00C4 290 movl CLASS_DDT(r1), - ; Save class driver's DDT 00CA 291 UCB$L_PTY_CLASS_DDT(r5) 00CA 292 0118 C5 50 D0 00CA 293 MOVL R0,UCB$L_TT_PORT(R5) 010C C5 61 D0 00CF 294 MOVL CLASS_GETNXT(R1),UCB$L_TT_GETNXT(R5) 0110 C5 04 A1 D0 00D4 295 MOVL CLASS_PUTNXT(R1),UCB$L_TT_PUTNXT(R5) 00DA 296 00F8 C5 00000000'GF 90 00DA 297 MOVB G^TTY$GB_PARITY,UCB$B_TT_PARITY(R5) 00EC C5 00000000'GF 90 00E3 298 MOVB G^TTY$GB_PARITY,UCB$B_TT_DEPARI(R5) PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 8 4.00 Unit Initialization 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 00EC 299 ; 00EC 300 ; Perform special processing for unit zero. Most fields have already been 00EC 301 ; set by DPT_STORE. Set various characteristics and things that we want 00EC 302 ; all clones (and clones of clones!) to inherit. Also make this a template 00EC 303 ; device. 00EC 304 ; 00002000 8F D0 00EC 305 movl #UCB$M_TEMPLATE,- 64 A5 00F2 306 UCB$L_STS(r5) 00F4 307 0138 C5 D4 00F4 308 clrl UCB$L_PARTNER_UCB(r5) ; No partner to start off. 00C0 C5 D4 00F8 309 clrl UCB$L_TT_LOGUCB(r5) ; Make sure initialization 00CC C5 D4 00FC 310 clrl UCB$L_TT_WFLINK(r5) ; by the class driver is done. 0100 311 0120 C5 B4 0100 312 clrw UCB$W_TT_OUTLEN(r5) ; No data waiting 0104 313 00C4 C5 00002000 8F C8 0104 314 bisl2 #TT$M_REMOTE, - ; Remote terminal 010D 315 UCB$L_TT_DECHAR(r5) 00C8 C5 04 C8 010D 316 bisl2 #TT2$M_HANGUP, - ; Default to HANGUP 0112 317 UCB$L_TT_DECHA1(r5) 00C8 C5 02 CA 0112 318 bicl2 #TT2$M_AUTOBAUD, - ; No autobaud 0117 319 UCB$L_TT_DECHA1(r5) 0122 C5 01 A8 0117 320 bisw2 #TTY$M_PC_NOTIME, - ; No timer services 011C 321 UCB$W_TT_PRTCTL(r5) 011C 322 ; 011C 323 ; Make it available for use. 011C 324 ; 38 A5 00040000 8F C8 011C 325 bisl2 #DEV$M_AVL, UCB$L_DEVCHAR(r5) ; Make it available 05 0124 326 99$: rsb 0125 327 0125 328 PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 9 4.00 Clone a new UCB and create a new pair of 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 0125 330 .SBTTL Clone a new UCB and create a new pair of PTY's 0125 331 0125 332 ;++ 0125 333 ; PTY$Clone_UCB - Clone UCB from PTY0 0125 334 ; 0125 335 ; Functional Description: 0125 336 ; 0125 337 ; We are called with the cloned UCB after a $ASSIGN to the template device. 0125 338 ; This clone will become the controlling device. We then clone a newer 0125 339 ; device by calling the appropriate VMS UCB cloning routines. Note that 0125 340 ; the method for this madness is taken from the code for EXE$ASSIGN. 0125 341 ; 0125 342 ; Inputs: 0125 343 ; R0 - SS$_NORMAL 0125 344 ; R2 - UCB address of cloned UCB 0125 345 ; R3 - DDT address 0125 346 ; R4 - PCB address 0125 347 ; R5 - Address of template UCB 0125 348 ; 0125 349 ; Outputs: 0125 350 ; R0 - SS$_NORMAL 0125 351 ; R1 - trashed 0125 352 ; R2 - UCB address of control unit 0125 353 ; R5 - trashed (actually it is the UCB address of terminal unit) 0125 354 ; All other registers and IPL are preserved 0125 355 ; 0125 356 ; Implicit inputs: 0125 357 ; IPL = IPL$_ASTDEL 0125 358 ;-- 0125 359 0125 360 PTY$CLONE_UCB:: 00000000'GF 16 0125 361 jsb G^INI$BRK 012B 362 ; 012B 363 ; Clone yet another device. After the clone, put the control device 012B 364 ; in r2 and the new terminal device in r5. 012B 365 ; 00000000'GF 16 012B 366 jsb G^IOC$CHKUCBQUOTA ; See if process has enough for another 7E 50 E9 0131 367 blbc r0, 90$ ; branch on not enough BYTLM 52 DD 0134 368 pushl r2 ; Save the controller UCB 00000000'GF 16 0136 369 jsb G^IOC$CLONE_UCB ; make terminal unit in r2. 55 52 D0 013C 370 movl r2, r5 ; Put new terminal in into r5 52 8ED0 013F 371 popl r2 ; and get back controller unit 6D 50 E9 0142 372 blbc r0, 90$ 0145 373 5C A5 B4 0145 374 clrw UCB$W_REFC(r5) ; Clear reference count in new UCB 64 A5 00010000 8F C8 0148 375 bisl2 #UCB$M_DELETEUCB, - ; Make this UCB get deleted on deassign 0150 376 UCB$L_STS(r5) 0150 377 00000000'GF 16 0150 378 jsb G^IOC$DEBIT_UCB ; Debit the process's BYTLM 0156 379 ; 0156 380 ; The two new units now need to be set up as terminals. First make sure 0156 381 ; they both use the terminal driver's DDT. 0156 382 ; 50 28 A2 D0 0156 383 movl UCB$L_DDB(r2), r0 ; Get our DDB 0C A0 013C C2 D0 015A 384 movl UCB$L_PTY_CLASS_DDT(r2), - ; Make DDB use class DDT 0160 385 DDB$L_DDT(r0) 0160 386 PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 10 4.00 Clone a new UCB and create a new pair of 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 0088 C2 013C C2 D0 0160 387 movl UCB$L_PTY_CLASS_DDT(r2), - ; Set new DDT in UCBs too 0167 388 UCB$L_DDT(r2) 0088 C5 013C C5 D0 0167 389 movl UCB$L_PTY_CLASS_DDT(r5), - 016E 390 UCB$L_DDT(r5) 016E 391 20 A2 D0 016E 392 movl UCB$L_CPID(r2),- ; Save creator PID so we can 0134 C2 0171 393 UCB$L_PTY_CPID(r2) ; return quota later 20 A2 D0 0174 394 movl UCB$L_CPID(r2),- ; Same creator for both UCBs 0134 C5 0177 395 UCB$L_PTY_CPID(r5) 017A 396 ; 017A 397 ; Setup on the terminal device. 017A 398 ; 51 0114 C5 D0 017A 399 movl UCB$L_TT_CLASS(r5), r1 ; Do class driver setup 08 B1 16 017F 400 jsb @CLASS_SETUP_UCB(r1) 2F 10 0182 401 bsbb PTY$SET_LINE ; Set our characteristics 0184 402 ; 0184 403 ; Setup on the control device 0184 404 ; 50 55 D0 0184 405 movl r5,r0 ; Save control UCB address 55 52 D0 0187 406 movl r2,r5 ; Point to terminal UCB 018A 407 51 1C A5 D0 018A 408 movl UCB$L_ORB(r5), r1 ; Get ORB address FF00 8F B0 018E 409 movw #^xFF00,- ; Only allow owner or system 18 A1 0192 410 ORB$W_PROT(r1) ; to access the control device 0194 411 ; 0194 412 ; Now class driver setup on the terminal device. 0194 413 ; 51 0114 C5 D0 0194 414 movl UCB$L_TT_CLASS(r5), r1 08 B1 16 0199 415 jsb @CLASS_SETUP_UCB(r1) 15 10 019C 416 bsbb PTY$SET_LINE ; Set our characteristics 019E 417 55 50 D0 019E 418 movl r0, r5 ; Get back control UCB 01A1 419 0138 C2 55 D0 01A1 420 movl r5,UCB$L_PARTNER_UCB(r2) ; Link terminal to control 0138 C5 52 D0 01A6 421 movl r2,UCB$L_PARTNER_UCB(r5) ; and vice versa 01AB 422 50 00000000'8F D0 01AB 423 movl #SS$_NORMAL, r0 05 01B2 424 90$: rsb 01B3 425 PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 11 4.00 Set Unit Characteristics 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 01B3 427 .SBTTL Set Unit Characteristics 01B3 428 01B3 429 ;++ 01B3 430 ; Functional Description: 01B3 431 ; This routine is called by the class driver whenever device 01B3 432 ; characteristics have been changed or by the CLONE_UCB routine 01B3 433 ; just after the device is created. On a real device, it would 01B3 434 ; set the device registers that control characteristics such as 01B3 435 ; speed and parity. We use this routine to control the 01B3 436 ; terminal specific characteristics on the PTYs. 01B3 437 ; 01B3 438 ; Inputs: 01B3 439 ; R5 - UCB address 01B3 440 ; Outputs: 01B3 441 ; Affects fields in the UCB 01B3 442 ; Affects NO registers 01B3 443 ;-- 01B3 444 01B3 445 PTY$SET_LINE:: 01B3 446 07 BB 01B3 447 PUSHR #^M ; Save registers 01B5 448 01B5 449 IF_CONTROL 10$ ; Branch if this is a control PTY 01B9 450 01B9 451 ; Fixup characteristics for the terminal device 01B9 452 50 55 D0 01B9 453 MOVL R5,R0 ; UCB address parameter in R0 4A 10 01BC 454 BSBb TERMINAL_UNIT ; Fix characteristics 45 11 01BE 455 BRB 5$ 01C0 456 01C0 457 ; For control device, propagate any changes to the terminal device and restore 01C0 458 ; the special set of control characteristics 01C0 459 50 0138 C5 D0 01C0 460 10$: MOVL UCB$L_PARTNER_UCB(R5),R0 ; Get our partner (terminal) UCB 1B 13 01C5 461 BEQL 20$ ; Branch if terminal is gone 01C7 462 44 A5 D0 01C7 463 MOVL UCB$L_DEVDEPEND(R5),- 44 A0 01CA 464 UCB$L_DEVDEPEND(R0) ; Copy terminal characteristics 48 A5 D0 01CC 465 MOVL UCB$L_TT_DEVDP1(R5),- 48 A0 01CF 466 UCB$L_TT_DEVDP1(R0) 41 A5 90 01D1 467 MOVB UCB$B_DEVTYPE(R5),- 41 A0 01D4 468 UCB$B_DEVTYPE(R0) ; Copy terminal type 42 A5 B0 01D6 469 MOVW UCB$W_DEVBUFSIZ(R5),- 42 A0 01D9 470 UCB$W_DEVBUFSIZ(R0) ; and width 47 A5 90 01DB 471 MOVB UCB$B_VERTSZ(R5),- 47 A0 01DE 472 UCB$B_VERTSZ(R0) ; and page length 26 10 01E0 473 BSBB TERMINAL_UNIT ; Enforce terminal device requirements 01E2 474 ; 01E2 475 ; Restore fixed characteristics for control device 01E2 476 ; 002AB1B2 8F D0 01E2 477 20$: MOVL #PTY_DEFCHAR,- 44 A5 01E8 478 UCB$L_DEVDEPEND(R5) ; Reset characteristics 00040084 8F D0 01EA 479 MOVL #PTY_DEFCHAR2,- 48 A5 01F0 480 UCB$L_TT_DEVDP1(R5) 00 90 01F2 481 MOVB #PTY_DEFTYPE,- 41 A5 01F4 482 UCB$B_DEVTYPE(R5) ; Restore terminal type 0050 8F B0 01F6 483 MOVW #PTY_DEFWIDTH,- PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 12 4.00 Set Unit Characteristics 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 42 A5 01FA 484 UCB$W_DEVBUFSIZ(R5) ; and width 00 90 01FC 485 MOVB #PTY_DEFPAGE,- 47 A5 01FE 486 UCB$B_VERTSZ(R5) ; and page length 50 55 D0 0200 487 MOVL R5,R0 ; UCB address parameter in R0 22 10 0203 488 BSBB COPY_PERM ; Copy temp characteristics to perm 0205 489 07 BA 0205 490 5$: POPR #^M ; Restore registers 05 0207 491 RSB 0208 492 ; 0208 493 ; For a terminal device, just insure that the user has not changed any bits 0208 494 ; which will break the driver. 0208 495 ; 0208 496 TERMINAL_UNIT: 00140000 8F CA 0208 497 BICL2 #,- 44 A0 020E 498 UCB$L_DEVDEPEND(R0) ; Temporary char - longword 1 30 C8 0210 499 BISL2 #,- 44 A0 0212 500 UCB$L_DEVDEPEND(R0) ; Temporary char - longword 1 00000142 8F CA 0214 501 BICL2 #,- 48 A0 021A 502 UCB$L_TT_DEVDP1(R0) ; Temporary char - longword 2 00000080 8F C8 021C 503 BISL2 #TT2$M_ALTYPEAHD,- 48 A0 0222 504 UCB$L_TT_DEVDP1(R0) ; Temporary char - longword 2 01 10 0224 505 BSBB COPY_PERM ; Copy temp characteristics to perm 05 0226 506 RSB 0227 507 0227 508 ; Copy the terminal temporary characteristics as permanent characteristics 0227 509 0227 510 COPY_PERM: 41 A0 90 0227 511 MOVB UCB$B_DEVTYPE(R0),- 00F0 C0 022A 512 UCB$B_TT_DETYPE(R0) ; Terminal type 42 A0 B0 022D 513 MOVW UCB$W_DEVBUFSIZ(R0),- 00F1 C0 0230 514 UCB$W_TT_DESIZE(R0) ; Terminal width 44 A0 D0 0233 515 MOVL UCB$L_DEVDEPEND(R0),- 00C4 C0 0236 516 UCB$L_TT_DECHAR(R0) ; Characteristic bits (part 1) 48 A0 D0 0239 517 MOVL UCB$L_TT_DEVDP1(R0),- 00C8 C0 023C 518 UCB$L_TT_DECHA1(R0) ; Characteristic bits (part 2) 05 023F 519 rsb 0240 520 PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 13 4.00 Start I/O Routine 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 0240 522 .SBTTL Start I/O Routine 0240 523 0240 524 ;++ 0240 525 ; PTY$STARTIO - Start I/O operation 0240 526 ; 0240 527 ; Functional Description: 0240 528 ; This routine is called from the class driver to start output 0240 529 ; on the device. It accomplishes its transfer by calling the 0240 530 ; equivalent of the interrupt service routine for its partner 0240 531 ; device. 0240 532 ; 0240 533 ; Inputs: 0240 534 ; R3 = Character AND CC=Plus 0240 535 ; Address AND CC=Negative 0240 536 ; R5 = UCB address 0240 537 ; 0240 538 ; Outputs: 0240 539 ; R5 = UCB address 0240 540 ; -- 0240 541 0240 542 PTY$STARTIO:: 1F 18 0240 543 BGEQ 20$ ; Branch if single character I/O 0242 544 0242 545 ; Here for multiple character case 0242 546 0120 C5 B5 0242 547 TSTW UCB$W_TT_OUTLEN(R5) ; Really characters to output? 1D 15 0246 548 BLEQ 30$ ; Branch if not 0248 549 01 E0 0248 550 10$: BBS #TTY$V_ST_CTRLS,- 21 00B8 C5 024A 551 UCB$Q_TT_STATE(R5),40$ ; If we get XOFF'ed, abort the output 024E 552 011C D5 9A 024E 553 MOVZBL @UCB$L_TT_OUTADR(R5),- 53 0252 554 R3 ; Get next character to output 1B 10 0253 555 BSBB PTY$INPUT_CHAR ; Ship the character to our partner 011C C5 D6 0255 556 INCL UCB$L_TT_OUTADR(R5) ; Adjust pointer 0120 C5 B7 0259 557 DECW UCB$W_TT_OUTLEN(R5) ; Decrement character count E9 14 025D 558 BGTR 10$ ; Loop while characters remain 025F 559 04 11 025F 560 BRB 30$ 0261 561 0261 562 ; Here for single character case 0261 563 02 13 0261 564 20$: beql 30$ ; If no character then skip. 0B 10 0263 565 BSBB PTY$INPUT_CHAR ; Ship character to our partner 0265 566 17 BB 0265 567 30$: PUSHR #^M ; Save registers 010C D5 16 0267 568 JSB @UCB$L_TT_GETNXT(R5) ; Get new characters to output 17 BA 026B 569 POPR #^M ; Restore registers D1 12 026D 570 bneq PTY$STARTIO ; do another if there is one 026F 571 05 026F 572 40$: rsb ; Else, all done 0270 573 PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 14 4.00 Receiver service routine 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 0270 575 .SBTTL Receiver service routine 0270 576 0270 577 ;++ 0270 578 ; PTY$INPUT_CHAR - Receive a character 0270 579 ; 0270 580 ; Functional Description: 0270 581 ; This routine is entered when a character is to be passed to 0270 582 ; the current device's partner. It is analogous to an interrupt 0270 583 ; service routine for the receive side. It is important that 0270 584 ; the interrupt expected (INT) bit be kept clear since parts 0270 585 ; of the class driver will not initiate actions when they think 0270 586 ; the next device interrupt (which we lack) will trigger them. 0270 587 ; 0270 588 ; Inputs: 0270 589 ; R3 - Character to be received 0270 590 ; R5 - Address of sender's UCB 0270 591 ; 0270 592 ; Outputs: 0270 593 ; R5 - Address of sender's UCB 0270 594 ;-- 0270 595 0270 596 PTY$INPUT_CHAR:: 03 CA 0270 597 BICL2 #,- 64 A5 0272 598 UCB$L_STS(R5) ; Make things happen synchronously. 0274 599 ; Don't let write time out. 55 DD 0274 600 PUSHL R5 ; Save UCB context 0138 C5 D0 0276 601 MOVL UCB$L_PARTNER_UCB(R5),- 55 027A 602 R5 ; Switch to receiver's context 15 13 027B 603 BEQL 10$ ; Branch if partner has vanished 027D 604 027D 605 5C A5 B5 027D 606 TSTW UCB$W_REFC(R5) ; Does partner have a channel? 10 13 0280 607 BEQL 10$ ; If not, discard this character 02 CA 0282 608 BICL2 #UCB$M_INT,- 64 A5 0284 609 UCB$L_STS(R5) ; Make driver think things must be 0286 610 ; handled synchronously 17 BB 0286 611 PUSHR #^M ; Save registers 0110 D5 16 0288 612 JSB @UCB$L_TT_PUTNXT(R5) ; Store the character in receiver's 028C 613 ; buffer 17 BA 028C 614 POPR #^M ; Restore registers 028E 615 ; 028E 616 ; At this point, the PUTNXT routine may have returned characters to be 028E 617 ; output on the receiver's output side. This may be something like a 028E 618 ; multi-character echo sequence or an XOFF. Heaven help us if we 028E 619 ; ever get here with conventional echo turned on for the control device!! 028E 620 ; (Can you say "infinite recursion at driver IPL"? Shuure you can...) 028E 621 ; 02 13 028E 622 BEQL 10$ ; Branch if no character 0290 623 AE 10 0290 624 BSBB PTY$STARTIO ; Output the character 0292 625 55 8ED0 0292 626 10$: POPL R5 ; Restore UCB context 05 0295 627 RSB 0296 628 PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 15 4.00 Port control routines - ABORT and DISCON 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 0296 630 .SBTTL Port control routines - ABORT and DISCONNECT 0296 631 0296 632 ;++ 0296 633 ; PTY$ABORT - Abort current port activity 0296 634 ; 0296 635 ; Functional description: 0296 636 ; Abort current output on port 0296 637 ; 0296 638 ; Inputs: 0296 639 ; R5 = UCB address 0296 640 ; 0296 641 ; Outputs: 0296 642 ; Preserve all registers. 0296 643 ;-- 0296 644 0296 645 PTY$ABORT:: 00000000'GF 16 0296 646 jsb G^INI$BRK 0120 C5 B4 029C 647 clrw UCB$W_TT_OUTLEN(r5) ; Dump any pending data 05 02A0 648 RSB 02A1 649 02A1 650 ;++ 02A1 651 ; PTY$DISCONNECT - "Hangup" a deassigned unit 02A1 652 ; 02A1 653 ; Functional description: 02A1 654 ; This entry point is called by TTDRIVER's cancel I/O processing when 02A1 655 ; the last channel has been removed from the device. The control device 02A1 656 ; is ALWAYS a hangup device, so we will always come here for it. The 02A1 657 ; terminal device usually has HANGUP, but that may be disabled. 02A1 658 ; 02A1 659 ; In any case, if we come here because we should hangup a device, we will 02A1 660 ; force a hangup on the other device. 02A1 661 ; 02A1 662 ; Inputs: 02A1 663 ; R5 = UCB address 02A1 664 ; 02A1 665 ; Outputs: 02A1 666 ; Preserve all registers. 02A1 667 ;-- 02A1 668 02A1 669 PTY$DISCONNECT:: 00000000'GF 16 02A1 670 jsb G^INI$BRK 01 BB 02A7 671 pushr #^M ; Save r0 50 0138 C5 D0 02A9 672 movl UCB$L_PARTNER_UCB(r5), r0 ; If no partner, skip... 1B 13 02AE 673 beql 10$ 02B0 674 0138 C0 D4 02B0 675 clrl UCB$L_PARTNER_UCB(r0) ; Partner now has no partner 02B4 676 ; to avoid recursive disconnect 3F BB 02B4 677 pushr #^M 55 50 D0 02B6 678 movl r0, r5 ; Force a disconnect on partner 64 A5 02 CA 02B9 679 bicl2 #UCB$M_INT, UCB$L_STS(r5) ; No ints, allows data to flush 50 0114 C5 D0 02BD 680 movl UCB$L_TT_CLASS(r5), r0 18 B0 16 02C2 681 jsb @CLASS_DISCONNECT(r0) 3F BA 02C5 682 popr #^M 0138 C5 D4 02C7 683 clrl UCB$L_PARTNER_UCB(r5) ; We have no more partner now 02CB 684 64 A5 10 CA 02CB 685 10$: bicl2 #UCB$M_ONLINE, UCB$L_STS(r5) ; Mark the thing OFFLINE 20 A5 0134 C5 D0 02CF 686 movl UCB$L_PTY_CPID(r5), - ; Process to restore quota to PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 16 4.00 Port control routines - ABORT and DISCON 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 02D5 687 UCB$L_CPID(r5) 01 BA 02D5 688 popr #^M 05 02D7 689 rsb 02D8 690 PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 17 4.00 End of PTYDRIVER 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) 02D8 692 .SBTTL End of PTYDRIVER 02D8 693 02D8 694 PTY$END:: 02D8 695 .END PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 18 Symbol table 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) $$$ = 00000020 R 02 PTY$INPUT_CHAR 00000270 RG 03 $$OP = 00000002 PTY$NULL 00000074 RG 03 AT$_NULL = 00000005 PTY$SET_LINE 000001B3 RG 03 CLASS_DDT = 00000010 PTY$STARTIO 00000240 RG 03 CLASS_DISCONNECT = 00000018 PTY$VEC 00000038 R 03 CLASS_GETNXT = 00000000 PTY$VECEND 00000070 R 03 CLASS_PUTNXT = 00000004 PTY_DEFCHAR = 002AB1B2 CLASS_SETUP_UCB = 00000008 PTY_DEFCHAR2 = 00040084 COPY_PERM 00000227 R 03 PTY_DEFPAGE = 00000000 CRB$B_TT_TYPE = 0000000B PTY_DEFTYPE = 00000000 CRB$L_INTD = 00000024 PTY_DEFWIDTH = 00000050 DC$_TERM = 00000042 SS$_NORMAL ******** X 03 DDB$L_DDT = 0000000C TERMINAL_UNIT 00000208 R 03 DEV$M_AVL = 00040000 TT$M_EIGHTBIT = 00008000 DEV$M_CCL = 00000002 TT$M_HALFDUP = 00100000 DEV$M_IDV = 04000000 TT$M_HOSTSYNC = 00000010 DEV$M_NNM = 00000200 TT$M_LOWER = 00000080 DEV$M_ODV = 08000000 TT$M_MECHFORM = 00080000 DEV$M_REC = 00000001 TT$M_MECHTAB = 00000100 DEV$M_TRM = 00000004 TT$M_MODEM = 00200000 DPT$C_LENGTH = 00000038 TT$M_NOBRDCST = 00020000 DPT$C_VERSION = 00000004 TT$M_NOECHO = 00000002 DPT$INITAB 00000038 R 02 TT$M_READSYNC = 00040000 DPT$M_NOUNLOAD = 00000004 TT$M_REMOTE = 00002000 DPT$REINITAB 000000DA R 02 TT$M_SCOPE = 00001000 DPT$TAB 00000000 R 02 TT$M_TTSYNC = 00000020 DPT$W_VECTOR = 0000001E TT$_UNKNOWN = 00000000 DYN$C_CRB = 00000005 TT2$M_ALTYPEAHD = 00000080 DYN$C_DDB = 00000006 TT2$M_AUTOBAUD = 00000002 DYN$C_DPT = 0000001E TT2$M_DMA = 00000040 DYN$C_ORB = 00000049 TT2$M_HANGUP = 00000004 DYN$C_UCB = 00000010 TT2$M_PASTHRU = 00040000 FUNCTAB_LEN = 00000000 TT2$M_SETSPEED = 00000100 INI$BRK ******** X 03 TTY$GB_DEFSPEED ******** X 02 IOC$CHKUCBQUOTA ******** X 03 TTY$GB_PARITY ******** X 02 IOC$CLONE_UCB ******** X 03 TTY$GB_RSPEED ******** X 02 IOC$DEBIT_UCB ******** X 03 TTY$GL_DEFCHAR ******** X 02 IOC$MNTVER ******** X 03 TTY$GL_DEFCHAR2 ******** X 02 IOC$RETURN ******** X 03 TTY$GL_DPT ******** X 03 ORB$B_FLAGS = 0000000B TTY$GL_OWNUIC ******** X 02 ORB$L_OWNER = 00000000 TTY$GW_DEFBUF ******** X 02 ORB$M_PROT_16 = 00000001 TTY$GW_PROT ******** X 02 ORB$W_PROT = 00000018 TTY$M_PC_NOTIME = 00000001 PORT_ABORT = 00000020 TTY$V_ST_CTRLS = 00000001 PORT_DISCONNECT = 00000004 UCB$B_DEVCLASS = 00000040 PORT_LENGTH = 00000038 UCB$B_DEVTYPE = 00000041 PORT_SET_LINE = 00000008 UCB$B_DIPL = 0000005E PORT_STARTIO = 00000000 UCB$B_FIPL = 0000000B PORT_VECTOR 00000038 R 03 UCB$B_TT_DEPARI = 000000EC PTY$ABORT 00000296 RG 03 UCB$B_TT_DETYPE = 000000F0 PTY$CLONE_UCB 00000125 RG 03 UCB$B_TT_PARITY = 000000F8 PTY$DDT 00000000 RG 03 UCB$B_VERTSZ = 00000047 PTY$DISCONNECT 000002A1 RG 03 UCB$C_PTY_LENGTH 00000140 G PTY$DPT 00000000 RG 02 UCB$C_TT_LENGTH = 00000134 PTY$END 000002D8 RG 03 UCB$L_CPID = 00000020 PTY$INITIAL 00000075 RG 03 UCB$L_DDB = 00000028 PTY$INIT_UNIT 000000A5 RG 03 UCB$L_DDT = 00000088 PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 19 Symbol table 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) UCB$L_DEVCHAR = 00000038 UCB$L_DEVCHAR2 = 0000003C UCB$L_DEVDEPEND = 00000044 UCB$L_ORB = 0000001C UCB$L_PARTNER_UCB 00000138 G UCB$L_PTY_CLASS_DDT 0000013C G UCB$L_PTY_CPID 00000134 G UCB$L_STS = 00000064 UCB$L_TT_CLASS = 00000114 UCB$L_TT_DECHA1 = 000000C8 UCB$L_TT_DECHAR = 000000C4 UCB$L_TT_DEVDP1 = 00000048 UCB$L_TT_GETNXT = 0000010C UCB$L_TT_LOGUCB = 000000C0 UCB$L_TT_OUTADR = 0000011C UCB$L_TT_PORT = 00000118 UCB$L_TT_PUTNXT = 00000110 UCB$L_TT_RTIMOU = 000000B4 UCB$L_TT_WBLINK = 000000D0 UCB$L_TT_WFLINK = 000000CC UCB$M_DELETEUCB = 00010000 UCB$M_INT = 00000002 UCB$M_ONLINE = 00000010 UCB$M_TEMPLATE = 00002000 UCB$M_TIM = 00000001 UCB$Q_TT_STATE = 000000B8 UCB$V_POWER = 00000005 UCB$W_DEVBUFSIZ = 00000042 UCB$W_REFC = 0000005C UCB$W_TT_DESIZE = 000000F1 UCB$W_TT_DESPEE = 000000E8 UCB$W_TT_OUTLEN = 00000120 UCB$W_TT_PRTCTL = 00000122 UCB$W_TT_SPEED = 000000F4 UCB$W_UNIT = 00000054 VEC$L_INITIAL = 0000000C +----------------+ ! Psect synopsis ! +----------------+ PSECT name Allocation PSECT No. Attributes ---------- ---------- --------- ---------- . ABS . 00000000 ( 0.) 00 ( 0.) NOPIC USR CON ABS LCL NOSHR NOEXE NORD NOWRT NOVEC BYTE $ABS$ 00000142 ( 322.) 01 ( 1.) NOPIC USR CON ABS LCL NOSHR EXE RD WRT NOVEC BYTE $$$105_PROLOGUE 000000E0 ( 224.) 02 ( 2.) NOPIC USR CON REL LCL NOSHR EXE RD WRT NOVEC BYTE $$$115_DRIVER 000002D8 ( 728.) 03 ( 3.) NOPIC USR CON REL LCL NOSHR EXE RD WRT NOVEC LONG +------------------------+ ! Performance indicators ! +------------------------+ Phase Page faults CPU Time Elapsed Time ----- ----------- -------- ------------ Initialization 35 00:00:00.09 00:00:00.20 Command processing 111 00:00:00.22 00:00:01.33 Pass 1 455 00:00:13.85 00:00:16.83 PTYDRIVER - Port Driver for PTY's 23-MAY-1985 23:06:01 VAX/VMS Macro V04-00 Page 20 VAX-11 Macro Run Statistics 23-MAY-1985 22:38:54 [PTYDRIVER.NEW]PTYDRIVER.MAR;38 (1) Symbol table sort 0 00:00:01.83 00:00:01.95 Pass 2 137 00:00:02.61 00:00:03.26 Symbol table output 20 00:00:00.10 00:00:00.10 Psect synopsis output 4 00:00:00.01 00:00:00.01 Cross-reference output 0 00:00:00.00 00:00:00.00 Assembler run totals 762 00:00:18.73 00:00:23.69 The working set limit was 1400 pages. 106112 bytes (208 pages) of virtual memory were used to buffer the intermediate code. There were 100 pages of symbol table space allocated to hold 1743 non-local and 16 local symbols. 695 source lines were read in Pass 1, producing 19 object records in Pass 2. 59 pages of virtual memory were used to define 54 macros. +--------------------------+ ! Macro library statistics ! +--------------------------+ Macro library name Macros defined ------------------ -------------- SYS$SYSROOT:[SYSLIB]LIB.MLB;2 23 SYS$SYSROOT:[SYSLIB]STARLET.MLB;2 8 TOTALS (all libraries) 31 2250 GETS were required to define 31 macros. There were no errors, warnings or information messages. MACRO/LIST PTYDRIVER