BUFFERCTL       - I/O BUFFER CONTROL                             21-AUG-1978 19:38:04   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)      34  MOVE FROM USER BUFFER

   (1)      65  MOVE TO USER BUFFER

   (1)      95  FILL SYSTEM PTE WITH TRANSFER PTE

BUFFERCTL       - I/O BUFFER CONTROL                             21-AUG-1978 19:38:04   VAX-11 MACRO X0.3-11               Page   1

01                                                                                                                               (1)



                                     0000     1 	.TITLE	BUFFERCTL - I/O BUFFER CONTROL

                                     0000     2 	.IDENT	/01/

                                     0000     3  

                                     0000     4 ;

                                     0000     5 ; COPYRIGHT (C) 1977

                                     0000     6 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

                                     0000     7 ;

                                     0000     8 ; THIS SOFTWARE IS FURNISHED UNDER  A LICENSE FOR USE ONLY  ON  A

                                     0000     9 ; SINGLE COMPUTER SYSTEM AND MAY BE  COPIED ONLY WITH  THE INCLU-

                                     0000    10 ; SION OF  THE  ABOVE  COPYRIGHT NOTICE.  THIS SOFTWARE,  OR  ANY

                                     0000    11 ; OTHER COPIES THEREOF, MAY NOT BE  PROVIDED  OR  OTHERWISE  MADE

                                     0000    12 ; AVAILABLE TO ANY OTHER PERSON EXCEPT  FOR  USE  ON  SUCH SYSTEM

                                     0000    13 ; AND TO  ONE WHO AGREES  TO  THESE LICENSE  TERMS.  TITLE TO AND

                                     0000    14 ; OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

                                     0000    15 ;

                                     0000    16 ; THE INFORMATION IN THIS SOFTWARE  IS  SUBJECT TO CHANGE WITHOUT

                                     0000    17 ; NOTICE AND SHOULD NOT BE CONSTRUED  AS  A COMMITMENT BY DIGITAL

                                     0000    18 ; EQUIPMENT CORPORATION.

                                     0000    19 ;

                                     0000    20 ; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS

                                     0000    21 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

                                     0000    22 ;

                                     0000    23 ; D. N. CUTLER 9-AUG-76

                                     0000    24 ;

                                     0000    25 ; I/O BUFFER CONTROL ROUTINES

                                     0000    26 ;

                                     0000    27 ; MACRO LIBRARY CALLS

                                     0000    28 ;

                                     0000    29  

                                     0000    30 	$PRDEF				;DEFINE PROCESSOR REGISTERS

                                     0000    31 	$PTEDEF				;PAGE TABLE ENTRY DEFINITIONS

                                     0000    32 	$UCBDEF				;DEFINE UCB OFFSETS

BUFFERCTL       - I/O BUFFER CONTROL                             21-AUG-1978 19:38:04   VAX-11 MACRO X0.3-11               Page   2

01              MOVE FROM USER BUFFER                                                                                            (1)



                                     0000    34 	.SBTTL	MOVE FROM USER BUFFER

                                     0000    35 ;+

                                     0000    36 ; IOC$MOVFRUSER - MOVE FROM USER BUFFER

                                     0000    37 ;

                                     0000    38 ; THIS ROUTINE IS CALLED BY AN I/O DRIVER TO MOVE A STRING FROM A USER

                                     0000    39 ; BUFFER TO AN INTERNAL BUFFER.

                                     0000    40 ;

                                     0000    41 ; INPUTS:

                                     0000    42 ;

                                     0000    43 ;	R1 = ADDRESS OF INTERNAL BUFFER.

                                     0000    44 ;	R2 = NUMBER OF BYTES TO BE MOVED.

                                     0000    45 ;	R5 = UCB ADDRESS OF DEVICE UNIT.

                                     0000    46 ;

                                     0000    47 ; OUTPUTS:

                                     0000    48 ;

                                     0000    49 ;	***TBS***

                                     0000    50 ;-

                                     0000    51  

                                 00000000    52 	.PSECT	WIONONPAGED

                                     0000    53 IOC$MOVFRUSER::				;MOVE FROM USER BUFFER

                          36     10  0000    54 	BSBB	IOC$FILSPT		;FILL SYSTEM PTE WITH PROPER RELOCATION

            50         6C A5     A8  0002    55 	BISW	UCB$W_BOFF(R5),R0	;MERGE BYTE OFFSET WITH VIRTUAL ADDRESS

                          0D     11  0006    56 	BRB	20$			;

            50       01FF 8F     B3  0008    57 10$:	BITW	#^X01FF,R0		;OVERFLOW PAGE BOUNDRY?

                          06     12  000D    58 	BNEQ	20$			;IF NEQ NO

         68 A5            04     C0  000F    59 	ADDL	#4,UCB$L_SVAPTE(R5)	;UPDATE ADDRESS OF USER PTE

                          23     10  0013    60 	BSBB	IOC$FILSPT		;FILL SYSTEM PTE WITH PROPER RELOCATION

            81            80     90  0015    61 20$:	MOVB	(R0)+,(R1)+		;MOVE BYTE TO INTERNAL BUFFER

            ED            52     F5  0018    62 	SOBGTR	R2,10$			;ANY MORE BYTES TO MOVE?

                                 05  001B    63 	RSB				;

BUFFERCTL       - I/O BUFFER CONTROL                             21-AUG-1978 19:38:04   VAX-11 MACRO X0.3-11               Page   3

01              MOVE TO USER BUFFER                                                                                              (1)



                                     001C    65 	.SBTTL	MOVE TO USER BUFFER

                                     001C    66 ;+

                                     001C    67 ; IOC$MOVTOUSER - MOVE TO USER BUFFER

                                     001C    68 ;

                                     001C    69 ; THIS ROUTINE IS CALLED BY AN I/O DRIVER TO MOVE A STRING FROM AN INTERNAL

                                     001C    70 ; BUFFER TO A USER BUFFER.

                                     001C    71 ;

                                     001C    72 ; INPUTS:

                                     001C    73 ;

                                     001C    74 ;	R1 = ADDRESS OF INTERNAL BUFFER.

                                     001C    75 ;	R2 = NUMBER OF BYTES TO BE MOVED.

                                     001C    76 ;	R5 = UCB ADDRESS OF DEVICE UNIT.

                                     001C    77 ;

                                     001C    78 ; OUTPUTS:

                                     001C    79 ;

                                     001C    80 ; ***TBS***

                                     001C    81 ;-

                                     001C    82  

                                     001C    83 IOC$MOVTOUSER::				;MOVE TO USER BUFFER

                          1A     10  001C    84 	BSBB	IOC$FILSPT		;FILL SYSTEM PTE WITH PROPER RELOCATION

            50         6C A5     A8  001E    85 	BISW	UCB$W_BOFF(R5),R0	;MERGE BYTE OFFSET WITH VIRTUAL ADDRESS

                          0D     11  0022    86 	BRB	20$			;

            50       01FF 8F     B3  0024    87 10$:	BITW	#^X01FF,R0		;OVERFLOW PAGE BOUNDRY?

                          06     12  0029    88 	BNEQ	20$			;IF NEQ NO

         68 A5            04     C0  002B    89 	ADDL	#4,UCB$L_SVAPTE(R5)	;UPDATE ADDRESS OF USER PTE

                          07     10  002F    90 	BSBB	IOC$FILSPT		;FILL SYSTEM PTE WITH PROPER RELOCATION

            80            81     90  0031    91 20$:	MOVB	(R1)+,(R0)+		;MOVE BYTE TO USER BUFFER

            ED            52     F5  0034    92 	SOBGTR	R2,10$			;ANY MORE BYTES TO MOVE?

                                 05  0037    93 	RSB				;

BUFFERCTL       - I/O BUFFER CONTROL                             21-AUG-1978 19:38:04   VAX-11 MACRO X0.3-11               Page   4

01              FILL SYSTEM PTE WITH TRANSFER PTE                                                                                (1)



                                     0038    95 	.SBTTL	FILL SYSTEM PTE WITH TRANSFER PTE

                                     0038    96 ;+

                                     0038    97 ; IOC$FILSPT - FILL SYSTEM PTE WITH TRANSFER PTE

                                     0038    98 ;

                                     0038    99 ; THIS ROUTINE IS CALLED TO FILL A SYSTEM PTE WITH A TRANSFER PTE OF A

                                     0038   100 ; LOCKED DOWN BUFFER SO THAT IT MAY BE DIRECTLY ADDRESS.

                                     0038   101 ;

                                     0038   102 ; INPUTS:

                                     0038   103 ;

                                     0038   104 ;	R5 = DEVICE UNIT UCB ADDRESS.

                                     0038   105 ;

                                     0038   106 ; OUTPUTS:

                                     0038   107 ;

                                     0038   108 ;	R0 = SYSTEM VIRTUAL ADDRESS OF START OF PAGE CONTAINING THE BUFFER.

                                     0038   109 ;

                                     0038   110 ;	REGISTERS R1, R2, AND R3 ARE PRESERVED ACROSS CALL.

                                     0038   111 ;-

                                     0038   112  

                                     0038   113 IOC$FILSPT::				;FILL SYSTEM PTE WITH TRANSFER PTE

                          53     DD  0038   114 	PUSHL	R3			;SAVE REGISTERS

         64 A5            04     C5  003A   115 	MULL3	#4,UCB$L_SVPN(R5),R0	;CALCULATE BYTE OFFSET IN SYSTEM PAGE TABLE

                          50         003E       

            53         68 B5     D0  003F   116 	MOVL	@UCB$L_SVAPTE(R5),R3	;GET CONTENTS OF TRANSFER PTE

                          03     19  0043   117 	BLSS	10$			;IF LSS ENTRY IS VALID

                          FFB8'  30  0045   118 	BSBW	IOC$PTETOPFN		;GET PFN FOR INVALID PTE

            00            53     F0  0048   119 10$:	INSV	R3,#PTE$V_PFN,#PTE$S_PFN,@MMG$GL_SPTBASE[R0]

   00000000'FF40          15         004B       

                                     0052   120 					;SET SYSTEM PTE ENTRY PFN

            50            07     78  0052   121 	ASHL	#7,R0,R0		;CONVERT SVPN TO SYSTEM VIRTUAL ADDRESS

                          50         0055       

            50            1F     E2  0056   122 	BBSS	#31,R0,20$		;

                          00         0059       

                                     005A   123 20$:	INVALID	R0			;INVALIDATE TRANSLATION BUFFER

                          08     BA  005D   124 	POPR	#^M<R3>			;RESTORE REGISTERS

                                 05  005F   125 	RSB				;

                                     0060   126  

                                     0060   127 	.END

BUFFERCTL       - I/O BUFFER CONTROL                             21-AUG-1978 19:38:04   VAX-11 MACRO X0.3-11               Page   5

SYMBOL TABLE                                                                                                                     (1)



BIT...         = 00000000            PTE$C_SR       = 58000000            UCB$B_REMSRV     0000003D            

GBL...         = 00000000            PTE$C_SREW     = 48000000            UCB$B_SECTORS    0000003C            

IOC$FILSPT       00000038 RG    03   PTE$C_SRKW     = 50000000            UCB$B_SLAVE      00000074            

IOC$MOVFRUSER    00000000 RG    03   PTE$C_SW       = 40000000            UCB$B_SPR        00000075            

IOC$MOVTOUSER    0000001C RG    03   PTE$C_UOWN     = 01800000            UCB$B_STATE      00000052            

IOC$PTETOPFN     ********   X   03   PTE$C_UR       = 78000000            UCB$B_TRACKS     0000003D            

MMG$GL_SPTBASE   ********   X   03   PTE$C_UREW     = 68000000            UCB$B_TYPE       0000000A            

PR$_ACCR       = 00000029            PTE$C_URKW     = 70000000            UCB$B_VERTSZ     0000003F            

PR$_ACCS       = 00000028            PTE$C_URSW     = 60000000            UCB$C_LENGTH     00000074            

PR$_ASTLVL     = 00000013            PTE$C_UW       = 20000000            UCB$C_LOGLNK   = 00000001            

PR$_ESP        = 00000001            PTE$M_CRF      = 00010000            UCB$K_LENGTH     00000074            

PR$_ICCS       = 00000018            PTE$M_DZRO     = 00020000            UCB$L_AMB        00000054            

PR$_ICR        = 0000001A            PTE$M_GPTX     = 003FFFFF            UCB$L_ASTQBL     00000010            

PR$_IPL        = 00000012            PTE$M_MODIFY   = 04000000            UCB$L_ASTQFL     0000000C            

PR$_ISP        = 00000004            PTE$M_OWN      = 01800000            UCB$L_CPID       0000005C            

PR$_KSP        = 00000000            PTE$M_PFN      = 001FFFFF            UCB$L_CRB        00000020            

PR$_MAPEN      = 00000038            PTE$M_PGFLVB   = 003FFFFF            UCB$L_DDB        00000024            

PR$_NICR       = 00000019            PTE$M_PROT     = 78000000            UCB$L_DEVCHAR    00000034            

PR$_P0BR       = 00000008            PTE$M_TYP0     = 00400000            UCB$L_DEVDEPEND  0000003C            

PR$_P0LR       = 00000009            PTE$M_TYP1     = 04000000            UCB$L_DPC        00000080            

PR$_P1BR       = 0000000A            PTE$M_VALID    = 80000000            UCB$L_DUETIM     0000005C            

PR$_P1LR       = 0000000B            PTE$M_WRT      = 00040000            UCB$L_DX_BFPNT   0000009C            

PR$_PCBB       = 00000010            PTE$S_GPTX     = 00000016            UCB$L_DX_BUF     00000098            

PR$_PME        = 0000003D            PTE$S_OWN      = 00000002            UCB$L_DX_RXDB    000000A0            

PR$_RXCS       = 00000020            PTE$S_PFN      = 00000015            UCB$L_EMB        00000078            

PR$_RXDB       = 00000021            PTE$S_PGFLVB   = 00000016            UCB$L_FIRST      00000014            

PR$_SBIER      = 00000034            PTE$S_PROT     = 00000004            UCB$L_FPC        0000000C            

PR$_SBIFS      = 00000030            PTE$S_STX      = 00000010            UCB$L_FQBL       00000004            

PR$_SBIMT      = 00000033            PTE$V_CRF      = 00000010            UCB$L_FQFL       00000000            

PR$_SBIQC      = 00000036            PTE$V_DZRO     = 00000011            UCB$L_FR3        00000010            

PR$_SBIS       = 00000031            PTE$V_GPTX     = 00000000            UCB$L_FR4        00000014            

PR$_SBISC      = 00000032            PTE$V_MODIFY   = 0000001A            UCB$L_IOQBL      00000044            

PR$_SBITA      = 00000035            PTE$V_OWN      = 00000017            UCB$L_IOQFL      00000040            

PR$_SBR        = 0000000C            PTE$V_PFN      = 00000000            UCB$L_IRP        0000004C            

PR$_SCBB       = 00000011            PTE$V_PGFLVB   = 00000000            UCB$L_LINK       0000002C            

PR$_SID        = 0000003E            PTE$V_PROT     = 0000001B            UCB$L_LOGADR     00000064            

PR$_SIRR       = 00000014            PTE$V_STX      = 00000000            UCB$L_MAXBLOCK   00000084            

PR$_SISR       = 00000015            PTE$V_TYP0     = 00000016            UCB$L_MEDIA      0000008C            

PR$_SLR        = 0000000D            PTE$V_TYP1     = 0000001A            UCB$L_NT_DATSSB  00000074            

PR$_SSP        = 00000002            PTE$V_VALID    = 0000001F            UCB$L_NT_INTSSB  00000078            

PR$_TBIA       = 00000039            PTE$V_WRT      = 00000012            UCB$L_OPCNT      00000060            

PR$_TBIS       = 0000003A            UCB$B_AMOD       00000053            UCB$L_OWNUIC     0000001C            

PR$_TODR       = 0000001B            UCB$B_CEX        00000077            UCB$L_PID        00000028            

PR$_TXCS       = 00000022            UCB$B_CM1        0000004A            UCB$L_RQBL       00000004            

PR$_TXDB       = 00000023            UCB$B_CM2        0000004B            UCB$L_RQFL       00000000            

PR$_USP        = 00000003            UCB$B_DEVCLASS   00000038            UCB$L_SVAPTE     00000068            

PR$_WCSA       = 0000002C            UCB$B_DEVTYPE    00000039            UCB$L_SVPN       00000064            

PR$_WCSD       = 0000002D            UCB$B_DIPL       00000052            UCB$L_TTCHAR     0000003C            

PTE$C_EOWN     = 00800000            UCB$B_DX_SCTCNT  000000A6            UCB$L_VCB        00000030            

PTE$C_ER       = 38000000            UCB$B_ERTCNT     00000070            UCB$M_BACKP    = 00000020            

PTE$C_ERKW     = 30000000            UCB$B_ERTMAX     00000071            UCB$M_BSY      = 00000100            

PTE$C_EW       = 28000000            UCB$B_ESCAPE     0000004B            UCB$M_CANCEL   = 00000008            

PTE$C_KOWN     = 00000000            UCB$B_FEX        00000076            UCB$M_DEADMO   = 00000400            

PTE$C_KR       = 18000000            UCB$B_FIPL       0000000B            UCB$M_DELMBX   = 00000002            

PTE$C_KW       = 10000000            UCB$B_LOCSRV     0000003C            UCB$M_DIAGBUF  = 00000002            

PTE$C_NA       = 00000000            UCB$B_OFFNDX     00000094            UCB$M_DX_WRITE = 00000008            

PTE$C_SOWN     = 01000000            UCB$B_OFFRTC     00000095            UCB$M_ECC      = 00000001            

BUFFERCTL       - I/O BUFFER CONTROL                             21-AUG-1978 19:38:04   VAX-11 MACRO X0.3-11               Page   6

SYMBOL TABLE                                                                                                                     (1)



UCB$M_ERLOGIP  = 00000004            UCB$W_CHARGE     0000004A            

UCB$M_INT      = 00000002            UCB$W_CYLINDERS  0000003E            

UCB$M_INTTYPE  = 00000080            UCB$W_DA         0000008C            

UCB$M_JOB      = 00000001            UCB$W_DC         0000008E            

UCB$M_MOUNTING = 00000200            UCB$W_DEVBUFSIZ  0000003A            

UCB$M_NOCNVRT  = 00000004            UCB$W_DEVSTS     0000005A            

UCB$M_NT_BFROVF= 00000004            UCB$W_DIRSEQ     00000088            

UCB$M_NT_BREAK = 00000020            UCB$W_DSTADDR    00000018            

UCB$M_NT_NAME  = 00000010            UCB$W_DX_BCR     000000A4            

UCB$M_ONLINE   = 00000010            UCB$W_EC1        00000090            

UCB$M_POWER    = 00000020            UCB$W_EC2        00000092            

UCB$M_PRMMBX   = 00000001            UCB$W_ERRCNT     00000072            

UCB$M_TIM      = 00000001            UCB$W_FUNC       0000007E            

UCB$M_TIMOUT   = 00000040            UCB$W_MB_SEED    FFFFFFFC            

UCB$M_TT_NOTIF = 00000004            UCB$W_MSGCNT     00000016            

UCB$M_TT_TIMO  = 00000002            UCB$W_MSGMAX     00000014            

UCB$M_UNLOAD   = 00001000            UCB$W_NT_CHAN    0000007C            

UCB$M_VALID    = 00000800            UCB$W_OFFSET     0000008A            

UCB$S_LNKPRI   = 00000002            UCB$W_REFC       00000050            

UCB$S_LTYPE    = 00000002            UCB$W_SIZE       00000008            

UCB$T_PARTNER    0000000C            UCB$W_SRCADDR    0000001A            

UCB$V_BACKP    = 00000005            UCB$W_STS        00000058            

UCB$V_BSY      = 00000008            UCB$W_UNIT       00000048            

UCB$V_CANCEL   = 00000003            UCB$W_VPROT      0000001A            

UCB$V_DEADMO   = 0000000A            

UCB$V_DELMBX   = 00000001            

UCB$V_DIAGBUF  = 00000001            

UCB$V_DX_WRITE = 00000003            

UCB$V_ECC      = 00000000            

UCB$V_ERLOGIP  = 00000002            

UCB$V_INT      = 00000001            

UCB$V_INTTYPE  = 00000007            

UCB$V_JOB      = 00000000            

UCB$V_LNKPRI   = 00000006            

UCB$V_LTYPE    = 00000000            

UCB$V_MOUNTING = 00000009            

UCB$V_MSGACK   = 00000004            

UCB$V_MSGFLO   = 00000003            

UCB$V_NOCNVRT  = 00000002            

UCB$V_NT_BFROVF= 00000002            

UCB$V_NT_BREAK = 00000005            

UCB$V_NT_NAME  = 00000004            

UCB$V_ONLINE   = 00000004            

UCB$V_POWER    = 00000005            

UCB$V_PRMMBX   = 00000000            

UCB$V_SEGFLO   = 00000002            

UCB$V_TIM      = 00000000            

UCB$V_TIMOUT   = 00000006            

UCB$V_TT_NOTIF = 00000002            

UCB$V_TT_TIMO  = 00000001            

UCB$V_UNLOAD   = 0000000C            

UCB$V_VALID    = 0000000B            

UCB$W_BCNT       0000006E            

UCB$W_BCR        00000096            

UCB$W_BOFF       0000006C            

UCB$W_BUFQUO     00000018            

UCB$W_BYTESTOGO  0000003E            

BUFFERCTL       - I/O BUFFER CONTROL                             21-AUG-1978 19:38:04   VAX-11 MACRO X0.3-11               Page   7

PROGRAM SECTION SYNOPSIS                                                                                                         (1)







PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

$ABS$            FFFFFFFE      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

WIONONPAGED      00000060      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

17642. BYTES LEFT IN FREE MEMORY POOL.

3602. BYTES OF RECLAIMED MEMORY.

OBJ$:BUFFERCTL,LIS$:BUFFERCTL/-SP=EXECML$/ML,SRC$:BUFFERCTL

4 MLB DIR RDS - 437 GETS TO DEFINE 13 MACROS. 28 INTER. FILE WRITES. 

