EVERHART%ARISIA@rca.COM ("GLENN EVERHART, 609 486 6328") (07/22/87)
Folks - Since the uuencoded version of pddriver.exe send via info-vax earlier may be a bit hard to understand, here's a disassembled version of it. It's not commented but is somewhat more accessible. All and sundry are invited to comment it and let the rest of us see the commented version. Code improvements are of course also welcome. ------------------cut here--------------------- .TITLE PDDRIVER SYS$SYSROOT:[SYSEXE]PDDRIVER.EXE;1 Disassembly .IDENT /X-1/ ; ; Disassembly of SYS$SYSROOT:[SYSEXE]PDDRIVER.EXE;1 ; on 4-FEB-1987 09:28:48.38 by VAX/VMS DISM32 V3.6 ; ; as linked by LINK-32 V04-00 on 22-MAR-1986 18:15:08.42 ; ; image ID = X-1, type IHD$K_LIM ; contains 1 image sections ; ; image contains 0 blocks of debug symbol table data, ; and 4 records of global symbol table data ; linker flags: LNKNOTFR DBGDMT (V4+) ; I/O channel count = 0, image I/O count = 0 ; requested privilege mask = FFFFFFFF FFFFFFFF ; ; no patches made to this image .SBTTL External symbol definitions ; ; External symbols ; .LIBRARY /SYS$LIBRARY:LIB/ $CRBDEF ; Channel request block $DCDEF ; Device classes and types $DDBDEF ; Device data block $DYNDEF ; Dynamic-data-structure types $IDBDEF ; Interrupt data block $IRPDEF ; I/O request packet $IODEF ; I/O function codes $SSDEF ; system condition codes $UCBDEF ; Unit control block $VECDEF ; Interrupt vector block ; .SBTTL Image section $IMPURE_1 ; ; Image section 1: start ^X00000000, end ^X000003FF ; contains 2 pages, PFC = 0, linker flags ^X00000A ; base VBN = 2, type=PRVFXD ; .PSECT $IMPURE_1,USR,CON,REL,NOVEC,RD,WRT,EXE,PIC,LCL,NOSHR,LONG ; .SBTTL PDDRIVER Driver Prologue Table ; ; Driver prologue table ; DPTAB - ; version 4 VMS END=PD$END_OF_DRIVER,- ADAPTER=NULL,- FLAGS=+DPT$M_SVP,- UCBSIZE= 208,- UNLOAD=PD$UNLOAD,- MAXUNITS= 1,- NAME=PDDRIVER DPT_STORE INIT DPT_STORE DDB , 16,L,<^X00313146> DPT_STORE DDB , 19,B,<^X03> DPT_STORE UCB , 11,B,<^X08> DPT_STORE UCB , 56,L,<^X1C054008> DPT_STORE UCB , 60,L,<^X00000200> DPT_STORE UCB , 64,B,<^X01> DPT_STORE UCB , 65,B,<^X10> DPT_STORE UCB , 66,W,<^X0200> DPT_STORE UCB , 69,B,<^X01> DPT_STORE UCB , 68,B,<^X01> DPT_STORE UCB , 94,B,<^X15> DPT_STORE UCB ,104,W,<^X0004> DPT_STORE CRB , 48,D,PD$CTRLINIT DPT_STORE CRB , 60,D,PD$UNITINIT DPT_STORE DDB , 12,D, DPT_STORE END ; ; Driver dispatch table ; DDTAB - DEVNAM=PD,- START=PD$START,- FUNCTB=PD$FDT PD$FDT: FUNCTAB ,- <LOADMCODE,- PACKACK,- WRITEPBLK,- READPBLK,- AVAILABLE,- SENSECHAR,- FORMAT,- WRITELBLK,- READLBLK,- SENSEMODE,- WRITEVBLK,- READVBLK,- ACCESS,- CREATE,- DEACCESS,- DELETE,- MODIFY,- ACPCONTROL,- MOUNT> FUNCTAB ,- <LOADMCODE,- PACKACK,- AVAILABLE,- SENSECHAR,- FORMAT,- SENSEMODE,- ACCESS,- CREATE,- DEACCESS,- DELETE,- MODIFY,- ACPCONTROL,- MOUNT> FUNCTAB +ACP$READBLK,- <READPBLK,- READLBLK,- READVBLK> FUNCTAB +ACP$WRITEBLK,- <WRITEPBLK,- WRITELBLK,- WRITEVBLK> FUNCTAB +ACP$ACCESS,- <ACCESS,- CREATE> FUNCTAB +ACP$DEACCESS,- <DEACCESS> FUNCTAB +ACP$MODIFY,- <DELETE,- MODIFY,- ACPCONTROL> FUNCTAB +ACP$MOUNT,- <MOUNT> FUNCTAB +EXE$LCLDSKVALID,- <LOADMCODE,- PACKACK,- AVAILABLE> FUNCTAB +EXE$ZEROPARM,- <LOADMCODE,- PACKACK,- AVAILABLE> FUNCTAB +EXE$ONEPARM,- <FORMAT> FUNCTAB +EXE$SENSEMODE,- <SENSECHAR,- SENSEMODE> PD$UNLOAD: RSB PD$CTRLINIT: CLRL (R5) RSB PD$UNITINIT: BISW2 S^#16,B^100(R5) CMPL @#EXE$GL_SYSUCB,R5 BNEQ LB$00000174 MOVAL L^PD$END_OF_DRIVER,R1 ADDL2 S^#15,R1 BICL2 S^#15,R1 SUBL2 S^#8,R1 MOVL (R1)+,W^204(R5) DIVL3 I^#^X00000200,(R1),W^176(R5) LB$00000174: RSB PD$START: MOVW B^32(R3),W^154(R5) EXTZV S^#0,S^#6,B^32(R3),R1 MOVB R1,W^146(R5) BBS S^#8,B^42(R3),LB$00000197 BBS S^#11,B^100(R5),LB$00000197 MOVZWL I^#^X0254,R0 BRB LB$000001C7 LB$00000197: CMPB S^#1,R1 BEQL LB$000001B6 CMPB S^#17,R1 BEQL LB$000001B6 CMPB S^#8,R1 BEQL LB$000001AE CMPB S^#30,R1 BEQL LB$000001CF BRW LB$00000224 LB$000001AE: BISW2 I^#^X0800,B^100(R5) BRB LB$000001BC LB$000001B6: BICW2 I^#^X0800,B^100(R5) LB$000001BC: MOVZWL S^#1,-(SP) MOVW B^50(R3),B^2(SP) MOVL (SP)+,R0 LB$000001C7: CLRL R1 JMP @#IOC$REQCOM LB$000001CF: MOVL W^204(R5),R0 BEQL LB$000001EF MOVL W^176(R5),R1 BEQL LB$000001EF MULL2 I^#^X00000200,R1 PUSHL R3 JSB @#EXE$DEANONPGDSIZ MOVL (SP)+,R3 LB$000001EF: MULL3 I^#^X00000200,B^56(R3),R1 BEQL LB$0000021A JSB @#EXE$ALONONPAGED BLBC R0,LB$0000021A MOVL R2,W^204(R5) DIVL3 I^#^X00000200,R1,W^176(R5) CVTLW W^176(R5),B^70(R5) BRB LB$000001BC LB$0000021A: CLRL W^204(R5) CLRL W^176(R5) BRB LB$000001C7 LB$00000224: BBC S^#8,B^42(R3),LB$00000240 MOVZBL B^68(R5),R1 MULW2 B^58(R3),R1 ADDW2 B^56(R3),R1 DECL R1 MULL2 I^#^X00000200,R1 BRB LB$00000249 LB$00000240: MULL3 I^#^X00000200,B^56(R3),R1 LB$00000249: ADDL2 W^204(R5),R1 MOVL B^50(R3),R2 BBC S^#1,B^42(R3),LB$00000260 JSB @#IOC$MOVTOUSER BRW LB$000001BC LB$00000260: JSB @#IOC$MOVFRUSER BRW LB$000001BC .LONG ^X64A520AA .LONG ^X00000005 .ADDRESS + .BYTE ^X00 PD$END_OF_DRIVER: .BYTE ^X00 .BYTE ^X00 .BYTE ^X00 .BYTE ^X00 ; .END