IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)    3300  HISTORY			; DETAILED

   (2)     100  DECLARATIONS

   (3)     100  I/O COMPLETION POSTING

   (4)     100  PAGIO - PAGE I/O COMPLETION

   (5)     100  VIRTUAL I/O COMPLETION

   (6)     100  QUEUE NEXT SEGMENT

   (7)     100  BUFFERED READ COMPLETION AST ROUTINE

   (8)     100  DIRECT I/O COMPLETION AST ROUTINE

   (9)     100  MOVE DATA TO USER BUFFER

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page   1

0302                                                                                                                             (1)



                                     0000   100 	.TITLE	IOCIOPOST - I/O COMPLETION POSTING

                                     0000   200 	.IDENT	/0302/

                                     0000   300 

                                     0000   400 ;

                                     0000   500 ; COPYRIGHT (C) 1978

                                     0000   600 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

                                     0000   700 ;

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

                                     0000   900 ; COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY WITH  THE INCLUSION OF THE

                                     0000  1000 ; ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,

                                     0000  1100 ; MAY NOT BE PROVIDED OR  OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

                                     0000  1200 ; EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE

                                     0000  1300 ; TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES

                                     0000  1400 ; REMAIN IN DEC.

                                     0000  1500 ;

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

                                     0000  1700 ; AND SHOULD  NOT BE CONSTRUED  AS A COMMITMENT  BY DIGITAL  EQUIPMENT

                                     0000  1800 ; CORPORATION.

                                     0000  1900 ;

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

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

                                     0000  2200 

                                     0000  2300 ;++

                                     0000  2400 ; FACILITY: EXECUTIVE, I/O SYSTEM

                                     0000  2500 ;

                                     0000  2600 ; ABSTRACT:

                                     0000  2700 ;	*** TBS ***

                                     0000  2800 ;

                                     0000  2900 ; ENVIRONMENT:

                                     0000  3000 ;

                                     0000  3100 ;--

                                     0000  3200 ;	.PAGE

                                     0000  3300 	.SBTTL	HISTORY			; DETAILED

                                     0000  3400 ;

                                     0000  3500 ; AUTHOR: R. HUSTVEDT, CREATION DATE: 26-AUG-76

                                     0000  3600 ;

                                     0000  3700 ; MODIFIED BY: P. H. LIPMAN	29-DEC-77

                                     0000  3800 ;

                                     0000  3900 ; 02	- PAGIO CODE REWRITTEN FOR PAGE FAULT CLUSTERING

                                     0000  4000 ;

                                     0000  4100 ; MODIFIED BY: P. H. LIPMAN	1-MAY-78

                                     0000  4200 ;

                                     0000  4300 ; 03	- SEGMENTED COMPLETION FOR PAGIO, SWAPIO

                                     0000  4400 ;

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page   2

0302            DECLARATIONS                                                                                                     (2)



                                     0000   100 	.SBTTL	DECLARATIONS

                                     0000   200 ;

                                     0000   300 ; INCLUDE FILES:

                                     0000   400 ;

                                     0000   500 	$ACBDEF				; AST CONTROL BLOCK DEFINITIONS

                                     0000   600 	$AQBDEF				; DEFINE AQB OFFSETS

                                     0000   700 	$CADEF				; CONDITIONAL ASSEMBLY PARAMETERS

                                     0000   800 	$CCBDEF				; CCB DEFINITIONS

                                     0000   900 	$CXBDEF				; DEFINE CXB OFFSETS

                                     0000  1000 	$IPLDEF				; IPL DEFINITIONS

                                     0000  1100 	$IRPDEF				; IRP DEFINITIONS

                                     0000  1200 	$PCBDEF				; PCB DEFINITIONS

                                     0000  1300 	$PFNDEF				; PFN DATA BASE DEFINITIONS

                                     0000  1400 	$PHDDEF				; PROCESS HEADER DEFINITIONS

                                     0000  1500 	$PRDEF				; PROCESSOR REGISTER DEFINITIONS

                                     0000  1600 	$PRIDEF				; PRIORITY INCREMENT DEFS

                                     0000  1700 	$PTEDEF				; PAGE TABLE ENTRY DEFINITIONS

                                     0000  1800 	$RSNDEF				; DEFINE RESOURCE WAIT NUMBERS

                                     0000  1900 	$UCBDEF				; DEFINE UCB OFFSETS

                                     0000  2000 	$VADEF				; DEFINE VIRTUAL ADDRESS FIELDS

                                     0000  2100 	$VCBDEF				; DEFINE VCB OFFSETS

                                     0000  2200 	$WCBDEF				; DEFINE WCB OFFSETS

                                     0000  2300 	$WQHDEF				; WAIT QUEUE HEADER DEFINITIONS

                                     0000  2400 

                                     0000  2500 ;

                                     0000  2600 ; OWN STORAGE:

                                     0000  2700 ;

                                 00000000  2800 	.PSECT	$AEXENONPAGED,LONG

                                     0000  2900 PRITBL:					; TABLE OF PRIORITY INCR CLASSES

                                 01  0000  3000 	.BYTE	PRI$_IOCOM		; 0 => DIRECT WRITE

                                 03  0001  3100 	.BYTE	PRI$_TOCOM		; 1 => BUFFERED WRITE

                                 01  0002  3200 	.BYTE	PRI$_IOCOM		; 2 => DIRECT READ

                                 04  0003  3300 	.BYTE	PRI$_TICOM		; 3 => BUFFERED READ

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page   3

0302            I/O COMPLETION POSTING                                                                                           (3)



                                     0004   100 	.SBTTL	I/O COMPLETION POSTING

                                     0004   200 ;++

                                     0004   300 ; FUNCTIONAL DESCRIPTION:

                                     0004   400 ;

                                     0004   500 ;	IOC$IOPOST IS INITIATED BY TRIGGERING AN IPL$_IOPOST SOFTWARE

                                     0004   600 ;	INTERRUPT AFTER PLACING A COMPLETED I/O PACKET IN THE IOPOST

                                     0004   700 ;	QUEUE.  IOC$IOPOST PERFORMS ALL APPROPRIATE COMPLETION ACTIVITY

                                     0004   800 ;	REQUIRED FOR THE PACKET EITHER DIRECTLY OR BY QUEUEING KERNEL

                                     0004   900 ;	ASTS TO CONCLUDE PROCESSING IN THE CONTEXT OF THE PROCESS

                                     0004  1000 ;	WHEN REQUIRED.

                                     0004  1100 ;

                                     0004  1200 ; CALLING SEQUENCE:

                                     0004  1300 ;

                                     0004  1400 ;	SOFTINT	#IPL$_IOPOST

                                     0004  1500 ;

                                     0004  1600 ; INPUT PARAMETERS:

                                     0004  1700 ;

                                     0004  1800 ;	NONE

                                     0004  1900 ;

                                     0004  2000 ; IMPLICIT INPUTS:

                                     0004  2100 ;

                                     0004  2200 ;	IOC$GL_PSFL - IOPOSTING QUEUE

                                     0004  2300 ;

                                     0004  2400 ; OUTPUT PARAMETERS:

                                     0004  2500 ;

                                     0004  2600 ;	NONE

                                     0004  2700 ;

                                     0004  2800 ; IMPLICIT OUTPUTS:

                                     0004  2900 ;

                                     0004  3000 ;	*** TBS ***

                                     0004  3100 ;

                                     0004  3200 ; SIDE EFFECTS:

                                     0004  3300 ;

                                     0004  3400 ;	*** TBS ***

                                     0004  3500 ;--

                                     0004  3600 

                                     0004  3700 	.ENABL	LSB

                                     0004  3800 IOC$IOPOST::				; I/O POSTING INTERRUPT

            7E            54     7D  0004  3900 	MOVQ	R4,-(SP)		; SAVE

            7E            52     7D  0007  4000 	MOVQ	R2,-(SP)		; NORMAL

            7E            50     7D  000A  4100 	MOVQ	R0,-(SP)		; REGISTERS

            55       0000'DF     0F  000D  4200 IOPOST:	REMQUE	@W^IOC$GL_PSFL,R5	; GET HEAD OF POST QUEUE

                          0D     1C  0012  4300 	BVC	10$			; QUEUE NOT YET EMPTY

            50            8E     7D  0014  4400 	MOVQ	(SP)+,R0		; RESTORE

            52            8E     7D  0017  4500 	MOVQ	(SP)+,R2		; REGISTERS

            54            8E     7D  001A  4600 	MOVQ	(SP)+,R4		; AND EXIT

                                 02  001D  4700 	REI				; IF QUEUE EMPTY

                                     001E  4710 

                          02C7   31  001E  4720 5$:	BRW	VIRTUAL			; PROCESS VIRTUAL I/O COMPLETION

                                     0021  4730 

            51         0C A5     3C  0021  4800 10$:	MOVZWL	IRP$L_PID(R5),R1	; GET PROCESS INDEX

            54       0000'DF41   D0  0025  4900 	MOVL	@W^SCH$GL_PCBVEC[R1],R4	; AND TRANSLATE TO PCB ADDRESS

         2A A5            00     E0  002B  5000 	BBS	#IRP$V_BUFIO,IRP$W_STS(R5),BUFIO ; IF SET, BUFFERED I/O

                          7C         002F       

                       44 A4     B6  0030  5100 	INCW	PCB$W_DIOCNT(R4)	; UPDATE DIRECT I/O COUNT

            53         2C A5     D0  0033  5200 	MOVL	IRP$L_SVAPTE(R5),R3	; GET ADDRESS OF FIRST PTE

                                     0037  5300 

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page   4

0302            I/O COMPLETION POSTING                                                                                           (3)



                                     0037  5400 	ASSUME	IRP$V_PAGIO LE 7

                                     0037  5500 	ASSUME	IRP$V_SWAPIO LE 7

         2A A5         44 8F     93  0037  5600 	BITB	#<IRP$M_PAGIO ! IRP$M_SWAPIO>,IRP$W_STS(R5) ; PAGIO OR SWAPIO?

                          2F     12  003C  5700 	BNEQ	PAGIO_OR_SWAPIO

                                     003E  5800  

                                     003E  5900 ;

                                     003E  6000 ; DIRECT I/O COMPLETION

                                     003E  6100 ;

                                     003E  6200  

                          53     D5  003E  6300 DIRIO:	TSTL	R3			; PTE ADDRESS VALID?

                          26     13  0040  6400 	BEQL	15$			; IF EQL NO PAGES TO UNLOCK

            51         32 A5     3C  0042  6500 	MOVZWL	IRP$W_BCNT(R5),R1	; GET REQUESTED TRANSFER BYTE COUNT

            52         30 A5     3C  0046  6600 	MOVZWL	IRP$W_BOFF(R5),R2	; GET BYTE OFFSET IN PAGE

         2A A5            04     E1  004A  6700 	BBC	#IRP$V_VIRTUAL,IRP$W_STS(R5),UNLOCK ; BRANCH IF NOT VIRTUAL I/O

                          0B         004E       

            CB         34 A5     E9  004F  6710 	BLBC	IRP$L_IOST1(R5),5$	; BRANCH IF ERROR IN VIRTUAL REQUEST

         3E A5         36 A5     B1  0053  6720 	CMPW	IRP$L_IOST1+2(R5),IRP$W_OBCNT(R5) ; IF COMPLETED ORIGINAL BYTE COUNT

                                     0058  6730 					; THEN NO SPECIAL VIRTUAL PROCESSING

                          C4     12  0058  6740 	BNEQ	5$			; OTHERWISE DO THE SEGMENTED COMPLETION

            51       01FF C142   9E  005A  6800 UNLOCK:	MOVAB	511(R1)[R2],R1		; COMBINE OFFSET AND COUNT AND ROUND

            51         F7 8F     78  0060  6900 	ASHL	#-VA$S_BYTE,R1,R1	; CONVERT TO NUMBER OF PAGES

                          51         0064       

                          FF98'  30  0065  7000 	BSBW	MMG$UNLOCK		; UNLOCK PAGES

                                     0068  7100 15$:					; REFERENCE LABEL

                                     0068  7200  

                                     0068  7300 	.IF DF	CA$_MEASURE_IOT

                                     0068  7400  

                          FF95'  30  0068  7500 	BSBW	PMS$END_RQ		; INSERT END OF I/O REQUEST MESSAGE

                                     006B  7600  

                                     006B  7700 	.ENDC

                                     006B  7800  

                          5E     11  006B  7900 	BRB	30$			;

                                     006D  8100  

                                     006D  8200 ;

                                     006D  8300 ;	PAGE I/O OR SWAP I/O COMPLETION

                                     006D  8400 ;

                                     006D  8500 

                                     006D  8600 PAGIO_OR_SWAPIO:

         3E A5         36 A5     B1  006D  8700 	CMPW	IRP$L_IOST1+2(R5),IRP$W_OBCNT(R5) ; IF COMPLETED THE

                                     0072  8800 					; ORIGINAL BYTE COUNT

                          29     13  0072  8900 	BEQL	26$			; THEN NO SEGMENTING NECESSARY

                                     0074  9000 ;

                                     0074  9100 ; THIS MUST BE EITHER A SEGMENTED REQUEST OR AN ERROR

                                     0074  9200 ;

         3C A5         36 A5     A0  0074  9300 	ADDW	IRP$L_IOST1+2(R5),IRP$W_ABCNT(R5) ; UPDATE ACCUMULATED BYTE COUNT

            07            09     EF  0079  9400 	EXTZV	#VA$V_VPN,#<16-VA$V_VPN>,IRP$L_IOST1+2(R5),R1 ; PAGES TRANSFERRED

            51         36 A5         007C       

         40 A5            51     C0  007F  9500 	ADDL	R1,IRP$L_SEGVBN(R5)	; NEXT STARTING VBN (OR ERROR VBN)

            09         34 A5     E9  0083  9600 	BLBC	IRP$L_IOST1(R5),24$	; BRANCH IF ERROR

                       3C A5     A3  0087  9700 	SUBW3	IRP$W_ABCNT(R5),IRP$W_OBCNT(R5),- ; CALCULATE REMAINING BYTE

         32 A5         3E A5         008A  9800 		IRP$W_BCNT(R5)		; COUNT TO BE TRANSFERRED

                          63     12  008E  9900 	BNEQ	BRW_QNXTSEG		; BRANCH IF ANOTHER SEGMENT TO DO

                                     0090 10500 ;

                                     0090 10600 ; LAST SEGMENT COMPLETED OR ERROR

                                     0090 10700 ;

         36 A5         3C A5     B0  0090 10800 24$:	MOVW	IRP$W_ABCNT(R5),IRP$L_IOST1+2(R5) ; SET BYTES TRANSFERRED

            53         44 A5     D0  0095 10900 	MOVL	IRP$L_DIAGBUF(R5),R3	; GET SAVED SVAPTE

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page   5

0302            I/O COMPLETION POSTING                                                                                           (3)



         2C A5            53     D0  0099 11000 	MOVL	R3,IRP$L_SVAPTE(R5)	; AND PUT IT BACK

                                     009D 11100 26$:

                                     009D 11200 	.IF DF	CA$_MEASURE_IOT

                                     009D 11300  

                          FF60'  30  009D 11400 	BSBW	PMS$END_RQ		; INSERT END OF I/O REQUEST MESSAGE

                                     00A0 11500  

                                     00A0 11600 	.ENDC

                                     00A0 11700  

         2A A5            02     E0  00A0 11800 	BBS	#IRP$V_PAGIO,IRP$W_STS(R5),PAGIO ; BRANCH IF PAGE I/O

                          51         00A4       

                                     00A5 11900 

                                     00A5 12000 ;

                                     00A5 12100 ;	SWAP I/O COMPLETION

                                     00A5 12200 ;

                                     00A5 12300 

         18 A5         14 A5     D0  00A5 12400 	MOVL	IRP$L_ASTPRM(R5),ACB$L_KAST(R5)	; SET KERNEL AST ADDRESS

                          25     11  00AA 12500 	BRB	40$			; AND ENQUEUE AST

                                     00AC 12600 

                                     00AC 12700 ;

                                     00AC 12800 ; BUFFERED I/O COMPLETION

                                     00AC 12900 ;

                                     00AC 13000  

                       3E A4     B6  00AC 13100 BUFIO:	INCW	PCB$W_BIOCNT(R4)	; UPDATE BUFFERED I/O COUNT

                                     00AF 13200  

                                     00AF 13300 	.IF DF	CA$_MEASURE_IOT

                                     00AF 13400  

                          FF4E'  30  00AF 13500 	BSBW	PMS$END_RQ		; INSERT END OF I/O REQUEST MESSAGE

                                     00B2 13600  

                                     00B2 13700 	.ENDC

                                     00B2 13800  

         42 A4         30 A5     A0  00B2 13900 	ADDW	IRP$W_BOFF(R5),PCB$W_BYTCNT(R4) ; UPDATE BYTE COUNT QUOTA

            50         2C A5     D0  00B7 14000 	MOVL	IRP$L_SVAPTE(R5),R0	; ANY BUFFER SPECIFIED?

                          0E     13  00BB 14100 	BEQL	30$			; IF EQL NO

         18 A5       03A9'CF     9E  00BD 14200 	MOVAB	W^BUFPOST,ACB$L_KAST(R5) ; ASSUME READ FUNCTION

         2A A5            01     E0  00C3 14300 	BBS	#IRP$V_FUNC,IRP$W_STS(R5),40$  ; IF SET, READ FUNCTION

                          09         00C7       

                          FF35'  30  00C8 14400 	BSBW	EXE$DEANONPAGED		; DEALLOCATE WRITE BUFFER

         18 A5       0474'CF     9E  00CB 14500 30$:	MOVAB	W^DIRPOST,ACB$L_KAST(R5) ; SET SPECIAL KERNEL AST ADDRESS

            02            00     EF  00D1 14700 40$:	EXTZV	#IRP$V_BUFIO,#2,IRP$W_STS(R5),R0  ; GET PACKET TYPE

            50         2A A5         00D4       

            51         0C A5     D0  00D7 14800 	MOVL	IRP$L_PID(R5),R1	; PROCESS IDENTIFICATION

            52       FF20 CF40   9A  00DB 14900 	MOVZBL	PRITBL[R0],R2		; SET PRIORITY INCREMENT CLASS

            53         22 A5     9A  00E1 15000 	MOVZBL	IRP$B_EFN(R5),R3	; GET EVENT FLAG NUMBER

                          FF18'  30  00E5 15100 	BSBW	SCH$POSTEF		; AND POST IT

                                     00E8 15150 IOPOST_KAST:

         0B A5         80 8F     88  00E8 15200 	BISB	#^X80,ACB$B_RMOD(R5)	; SET INTERNAL AST FLAG

                          FF10'  30  00ED 15300 	BSBW	SCH$QAST		; NOW QUEUE THE KERNEL AST

                          FF1A   31  00F0 15400 	BRW	IOPOST			; GET NEXT PACKET TO POST

                                     00F3 15500 	.DSABL	LSB

                                     00F3 15600 

                                     00F3 15700 BRW_QNXTSEG:

                          0223   31  00F3 15800 	BRW	QNXTSEG			; GO DO THE NEXT VIRTUAL SEGMENT

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page   6

0302            PAGIO - PAGE I/O COMPLETION                                                                                      (4)



                                     00F6   100 	.SBTTL	PAGIO - PAGE I/O COMPLETION

                                     00F6  1000 ;

                                     00F6  1100 ; PAGING I/O COMPLETION

                                     00F6  1200 ;

                                     00F6  1300 ; INPUTS:

                                     00F6  1400 ;

                                     00F6  1500 ;	R3 = SYSTEM VIRTUAL ADDRESS OF PAGE TABLE ENTRY

                                     00F6  1600 ;	R4 = PROCESS CONTROL BLOCK ADDRESS

                                     00F6  1700 ;	R5 = I/O REQUEST PACKET ADDRESS

                                     00F6  1800 ;

                                     00F6  1900 ;		FOR PAGE READ COMPLETION, THE FOLLOWING LOCATIONS IN THE

                                     00F6  2000 ;	I/O REQUEST PACKET HAVE SPECIAL SIGNIFICANCE.

                                     00F6  2100 ;

                                     00F6  2200 ;	IRP$L_ASTPRM	= ORIGINAL PROCESS PAGE TABLE ENTRY BACKING STORE

                                     00F6  2300 ;			  ADDRESS IF PAGE WAS A COPY ON REFERENCE PAGE.

                                     00F6  2400 ;			  PFN$V_GBLBAK SET IF IT WAS GLOBAL CRF

                                     00F6  2500 ;			= 0 IF NOT A COPY ON REFERENCE PAGE

                                     00F6  2600 ;	IRP$L_AST	= MASTER PTE CONTENTS IF GLOBAL CRF (>0)

                                     00F6  2700 ;			= SLAVE PTE ADDRESS IF GLOBAL NOT CRF (<0)

                                     00F6  2800 ;			= 0 IF NOT GLOBAL

                                     00F6  2900 ;

                                     00F6  3000 ;		FOR PAGE WRITE COMPLETION, THE FOLLOWING LOCATIONS IN

                                     00F6  3100 ;	THE I/O REQUEST PACKET HAVE SIGNIFICANCE.

                                     00F6  3200 ;

                                     00F6  3300 ;	IRP$B_RMOD	= REQUEST MODE ! ACB$V_QUOTA.  IF ACB$V_QUOTA IS SET,

                                     00F6  3400 ;			  PROCESS REQUESTED AN AST ON PAGE WRITE COMPLETION

                                     00F6  3500 ;	IRP$L_AST	= AST ADDRESS IF REQUESTED

                                     00F6  3600 ;	IRP$L_ASTPRM	= AST PARAMETER IF SPECIFIED

                                     00F6  3700 ;	IRP$L_IOSB	= ADDRESS OF I/O STATUS BLOCK IF SPECIFIED.  IF

                                     00F6  3800 ;			  NON-ZERO, THEN PROCESS EXPECTS I/O STATUS RETURNED.

                                     00F6  3900 ;

            7E            56     7D  00F6  4000 PAGIO:	MOVQ	R6,-(SP)		; SAVE SOME MORE REGISTERS

            56            55     D0  00F9  4200 	MOVL	R5,R6			; USE R6 FOR IRP ADDRESS

                                     00FC  4300 

                                     00FC  4600 	SETIPL	#IPL$_SYNCH		; SYNCHRONIZE ACCESS TO SYSTEM DATA BASE

            55         64 A4     D0  00FF  4700 	MOVL	PCB$L_PHD(R4),R5	; USE R5 FOR PROCESS HEADER ADR

                          09     EF  0103  4720 	EXTZV	#VA$V_VPN,#<16-VA$V_VPN>,- ; FORM PAGE COUNT

         36 A6            07         0105  4740 		IRP$L_IOST1+2(R6),R7	; OF THE DATA TRANSFERRED

                          57         0108       

         2A A6            01     E0  0109  4800 	BBS	#IRP$V_FUNC,IRP$W_STS(R6),PAGRD_DONE ; BRANCH IF PAGE READ

                          25         010D       

                                     010E  4900 ;

                                     010E  5000 ; PAGE WRITE COMPLETE - R7 = NUMBER OF PAGES

                                     010E  5050 ;	CONDITION CODES SET FROM LOAD OF R7

                                     010E  5100 ;

                          11     13  010E  5150 	BEQL	60$			; BRANCH IF NO PAGES SUCCESSFULLY TRANSFERRED

                          53     DD  0110  5200 20$:	PUSHL	R3			; SAVE SVAPTE

                          01A2   30  0112  5300 	BSBW	PFN_IO_DONE		; SET PFN DATA BASE

                                     0115  5400 ;

                                     0115  5500 ; CONDITION CODES SET FROM DECREF

                                     0115  5600 ;

                          03     14  0115  5700 	BGTR	40$			; BRANCH IF REFCNT NOT 0

                          FEE6'  30  0117  5800 	BSBW	MMG$RELPFN		; RELEASE THE PAGE

            8E            04     C1  011A  5900 40$:	ADDL3	#4,(SP)+,R3		; GET NEXT PTE ADDRESS

                          53         011D       

            EF            57     F5  011E  6000 	SOBGTR	R7,20$			; DO THE NEXT PAGE IF ANY

         08 A6       004C 8F     A3  0121  6100 60$:	SUBW3	#IRP$C_LENGTH,IRP$W_SIZE(R6),R7 ; IF EXTENDED I/O PACKET

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page   7

0302            PAGIO - PAGE I/O COMPLETION                                                                                      (4)



                          57         0127       

                                     0128  6200 					; THEN COMPLETION IS DONE BY

                                     0128  6250 					; SPECIAL UPDATE SECTION KERNEL AST

            04         34 A6     E9  0128  6300 	BLBC	IRP$L_IOST1(R6),PAGWRT_ERR ; BRANCH IF PAGE WRITE ERROR

                                     012C  6400 ;

                                     012C  6500 ; CONDITION CODES SET FROM LOAD OF R7

                                     012C  6600 ;

                                     012C  6700 PAGWRT_ERR_DONE:

                          68     13  012C  6800 	BEQL	PAGIO_DONE1		; BRANCH IF NOT, COMPLETE THE I/O HERE

                          6D     11  012E  6900 	BRB	PAGIO_DONE2		; COMPLETE I/O IN PROCESS CONTEXT

                                     0130  7000 PAGWRT_ERR:

                          013D   31  0130  7100 	BRW	PAGWRT_ERR1

                                     0133  7200 ;

                                     0133  7300 ; PAGE READ COMPLETE - R7 = NUMBER OF PAGES

                                     0133  7350 ;	CONDITION CODES SET FROM LOAD OF R7

                                     0133  7400 ;

                                     0133  7500 PAGRD_DONE:

                          3C     13  0133  7600 	BEQL	100$			; BRANCH IF NO PAGES SUCCESSFULLY TRANSFERRED

                          017F   30  0135  7800 20$:	BSBW	PFN_IO_DONE		; RECORD PAGE READ DONE

                                     0138  7900 ;

                                     0138  8000 ; CONDITION CODES SET FROM DECREF

                                     0138  8100 ;

                          11     14  0138  8200 	BGTR	30$			; BRANCH IF REFCNT NOT ZERO

                                     013A  8300 ;

                                     013A  8400 ; NO MORE REFERENCES FOR THIS PAGE, DON'T MAKE IT VALID, RELEASE IT

                                     013A  8500 ;

                       04 A3     DF  013A  8600 	PUSHAL	4(R3)			; SAVE PTE ADR FOR NEXT PTE

                          FEC0'  30  013D  8700 	BSBW	MMG$RELPFN		; RELEASE THE PFN

                          08     BA  0140  8800 	POPR	#^M<R3>			; RECOVER PTE FOR NEXT PAGE IN CLUSTER

         10 A6            04     C1  0142  8900 	ADDL3	#4,IRP$L_AST(R6),R1	; GLOBAL PAGE?

                          51         0146       

                          25     18  0147  9000 	BGEQ	80$			; BRANCH IF IT ISN'T

                          1F     11  0149  9100 	BRB	60$			; YES, SET CONTEXT FOR NEXT PAGE IN CLUSTER

       0000'DF40          07     88  014B  9200 30$:	BISB	#PFN$C_ACTIVE,@W^PFN$AB_STATE[R0] ; PAGE IS NOW ACTIVE

            50            1F     E2  0151  9300 	BBSS	#PTE$V_VALID,R0,40$	; TURN VALID ON WITH PFN

                          00         0154       

            83            50     C8  0155  9400 40$:	BISL	R0,(R3)+		; SET VALID IN PTE

                                     0158  9500 					; NEXT PTE ADDRESS IN R3

            51         10 A6     D0  0158  9600 	MOVL	IRP$L_AST(R6),R1	; GLOBAL PAGE?

                          10     18  015C  9700 	BGEQ	80$			; BRANCH IF NOT

                                     015E  9800 ;

                                     015E  9900 ; PAGE IS A GLOBAL PAGE, R1 = PROCESS PTE, MUST MAKE IT VALID TOO

                                     015E 10000 ;

            61   867FFFFF 8F     CB  015E 10100 	BICL3	#^C<PTE$M_PROT ! PTE$M_OWN>,(R1),R2 ; PROTECTION AND OWNER FIELDS

                          52         0165       

            52            50     C9  0166 10200 	BISL3	R0,R2,(R1)+		; MAKE PROCESS PTE VALID

                          81         0169       

         10 A6            51     D0  016A 10300 60$:	MOVL	R1,IRP$L_AST(R6)	; SET UP FOR NEXT PAGE IN CLUSTER

            C4            57     F5  016E 10400 80$:	SOBGTR	R7,20$			; DO THE NEXT PAGE IF ANY

            77         34 A6     E9  0171 10500 100$:	BLBC	IRP$L_IOST1(R6),PAGRD_ERR ; BRANCH IF PAGE READ ERROR

                                     0175 10600 ;

                                     0175 10700 ; LAST PAGE IN CLUSTER HAS BEEN PROCESSED, COMPLETE THE PROCESSING

                                     0175 10800 ; ASSOCIATED WITH THE TRANSFER AS A WHOLE.

                                     0175 10900 ;

                                     0175 11000 PAGIO_DONE:

            51         14 A6     D0  0175 11100 	MOVL	IRP$L_ASTPRM(R6),R1	; COPY ON REFERENCE SECTION?

                          1B     13  0179 11200 	BEQL	20$			; BRANCH IF NOT

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page   8

0302            PAGIO - PAGE I/O COMPLETION                                                                                      (4)



            51            17     E1  017B 11300 	BBC	#PFN$V_GBLBAK,R1,10$	; BRANCH IF NOT GBL CRF

                          0B         017E       

            55   00000000'FF     DE  017F 11400 	MOVAL	@MMG$GL_SYSPHD,R5	; SYSTEM HDR FOR GBL CRF PAGE

            51         10 A6     D0  0186 11500 	MOVL	IRP$L_AST(R6),R1	; CONTENTS OF GBL PTE FOR GBL CRF

            51            51     32  018A 11600 10$:	CVTWL	R1,R1			; SECTION INDEX

                          09     EF  018D 11700 	EXTZV	#VA$V_VPN,#<16-VA$V_VPN>,- ; PAGE COUNT FROM

         36 A6            07         018F 11800 		IRP$L_IOST1+2(R6),R0	; BYTE COUNT TRANSFERRED

                          50         0192       

                          FE6A'  30  0193 11900 	BSBW	MMG$SUBSECREF		; SUBTRACT R0 FROM SECTION REFERENC COUNT

                                     0196 12000 ;

                                     0196 12100 ; REPORT THAT PAGE I/O HAS COMPLETED.

                                     0196 12200 ;

                                     0196 12300 ; NORMALLY IT IS ONLY NECESSARY TO REPORT "PAGE FAULT COMPLETE"

                                     0196 12400 ; TO THE PROCESS THAT INITIATED THE I/O, BUT FOR SYSTEM PAGES

                                     0196 12500 ; AND FOR GLOBAL PAGES, MULTIPLE FAULTS CAN OCCUR FOR THE SAME

                                     0196 12600 ; PAGE WHILE IT IS ON ITS WAY INTO MEMORY.  ALL PROCESSES WHICH

                                     0196 12700 ; FAULT THE PAGE WHILE ITS STATE IS "READ IN PROGRESS" GET QUEUED

                                     0196 12800 ; ON THE COLLISION PAGE QUEUE, AND THE COLLISION BIT IS SET IN THE

                                     0196 12900 ; TYPE BYTE OF THE PFN DATA BASE.  THIS ROUTINE ALSO REPORTS THE

                                     0196 13000 ; COLLISION PAGE AVAILABLE EVENT TO ALL PROCESSES ON THE COLLISION

                                     0196 13100 ; QUEUE, IF THE COLLISION BIT IS SET.

                                     0196 13200 ;

                                     0196 13300 20$:

                                     0196 13400 PAGIO_DONE1:

            52            01     9A  0196 13500 	MOVZBL	#PRI$_IOCOM,R2		; SET PRIORITY INCREMENT CLASS

                                     0199 13600 	RPTEVT	PFCOM			; REPORT PAGE FAULT COMPLETE

                                     019D 13700 ;

                                     019D 13800 ; IRP$W_BOFF WAS INCREMENTED IF ANY OF THE PAGES HAD THE COLLISION BIT SET

                                     019D 13900 ;

                                     019D 14000 ;	R7 = NON ZERO IF SUPPOSED TO ISSUE KERNEL AST

                                     019D 14100 ;	     USED ONLY FOR PAGE WRITE COMPLETION

                                     019D 14200 ;	     BUT MUST BE ZERO FOR PAGE READ COMPLETION

                                     019D 14300 ;

                                     019D 14400 PAGIO_DONE2:

                       30 A6     B5  019D 14500 	TSTW	IRP$W_BOFF(R6)		; ANY PAGES WITH COLLISION BIT SET?

                          15     13  01A0 14600 	BEQL	60$			; BRANCH IF NOT

                          54     DD  01A2 14700 	PUSHL	R4			; SAVE PCB ADDRESS

                     0008'CF     B5  01A4 14800 40$:	TSTW	W^SCH$GQ_COLPGWQ+WQH$W_WQCNT ; ANYONE WAITING?

                          0B     15  01A8 14900 	BLEQ	50$			; BRANCH IF NOT

            54       0000'CF     D0  01AA 15000 	MOVL	W^SCH$GQ_COLPGWQ,R4	; GET NEXT PCB

                                     01AF 15100 	RPTEVT	COLPGA			; REPORT "COLLISION PAGE AVAILABLE"

                          EF     11  01B3 15200 	BRB	40$			; REPEAT UNTIL QUEUE IS EMPTY

                          10     BA  01B5 15300 50$:	POPR	#^M<R4>			; RESTORE SAVED PCB ADDRESS

                                     01B7 15400 60$:	SETIPL	#IPL$_IOPOST		; LOWER TO I/O POST LEVEL

                          57     D5  01BA 15500 	TSTL	R7			; EXHAUSTED PAGE COUNT NON-ZERO?

                          16     12  01BC 15600 	BNEQ	PAGIO_KAST		; BRANCH IF YES, COMPLETE I/O IN PROCESS

            76         34 A6     E9  01BE 15700 	BLBC	IRP$L_IOST1(R6),PAGIO_ERR ; BRANCH IF MORE ERROR PROCESSING TO DO

            50            56     D0  01C2 15800 	MOVL	R6,R0			; GET PACKET ADDRESS FOR RELEASE

            56            8E     7D  01C5 15900 	MOVQ	(SP)+,R6		; RESTORE SAVED REGISTERS

                                     01C8 16000 ;

                                     01C8 16100 ; R0 = I/O REQUEST PACKET ADDRESS

                                     01C8 16200 ;

                                     01C8 16300 PAGIO_ERR_DONE:

                          FE35'  30  01C8 16400 	BSBW	EXE$DEANONPAGED		; AND RELEASE IT

            50            01     3C  01CB 16500 	MOVZWL	#RSN$_ASTWAIT,R0	; SET AST WAIT RESOURCE WAIT NUMBER

                          FE2F'  30  01CE 16600 	BSBW	SCH$RAVAIL		; SET RESOURCE AVAILABLE

                          FE39   31  01D1 16700 	BRW	IOPOST			; CONTINUE TO PROCESS POST QUEUE

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page   9

0302            PAGIO - PAGE I/O COMPLETION                                                                                      (4)



                                     01D4 16800 ;

                                     01D4 16900 ; COMPLETE THE PAGE WRITE IN THE PROCESS CONTEXT

                                     01D4 17000 ;

                                     01D4 17100 PAGIO_KAST:

            55            56     D0  01D4 17200 	MOVL	R6,R5			; I/O PACKET ADDRESS BACK TO NORMAL REG

            56            8E     7D  01D7 17300 	MOVQ	(SP)+,R6		; RESTORE SAVED REGISTERS

            51         0C A5     D0  01DA 17350 	MOVL	IRP$L_PID(R5),R1	; PROCESS ID FOR ISSUING KERNEL AST

         18 A5   00000000'EF     9E  01DE 17400 	MOVAB	MMG$UPDSECAST,ACB$L_KAST(R5) ; ADDRESS TO START KERNEL AST

            52            01     9A  01E6 17450 	MOVZBL	#PRI$_IOCOM,R2		; PRIORITY INCREMENT

                          FEFC   31  01E9 17500 	BRW	IOPOST_KAST		; ISSUE THE KERNEL AST

                                     01EC 17600 ;

                                     01EC 17700 ; PAGE READ ERROR - CLEAN UP LOGIC

                                     01EC 17800 ;

                                     01EC 17900 ;	R3 = PTE ADDRESS OF BAD PAGE

                                     01EC 18000 ;	R4 = PCB ADDRESS

                                     01EC 18100 ;	R5 = PROCESS HEADER ADDRESS

                                     01EC 18200 ;	R6 = I/O REQUEST PACKET ADDRESS

                                     01EC 18300 ;	R7 = 0 AND MUST BE PRESERVED

                                     01EC 18310 ;	IRP$L_AST(R6) = PROCESS PTE ADR OF BAD PAGE IF GLOBAL PAGE

                                     01EC 18320 ;	IRP$L_ASTPRM(R6) = GPTX FOR START OF TRANSFER IF GLOBAL CRF

                                     01EC 18400 ;

                                     01EC 18500 PAGRD_ERR:

                          00C8   30  01EC 18600 	BSBW	PFN_IO_DONE		; COMPLETE THE I/O FOR ERR PAGE

                                 90  01EF 18700 	MOVB	#<PFN$M_DELCON ! PFN$C_RDERR>,- ; SET PAGE TO

       0000'DF40          14         01F0 18800 		@W^PFN$AB_STATE[R0]	; READ ERROR STATE

            51         14 A6     D0  01F5 18900 	MOVL	IRP$L_ASTPRM(R6),R1	; GET BACKING STORE ADR IF CRF

                          18     13  01F9 19000 	BEQL	120$			; BRANCH IF NOT COPY ON REFERENCE

            51            17     E1  01FB 19100 	BBC	#PFN$V_GBLBAK,R1,100$	; BRANCH IF NOT GLOBAL CRF

                          0E         01FE       

                          09     EF  01FF 19200 	EXTZV	#VA$V_VPN,#<16-VA$V_VPN>,- ; ADJUST GPTX BY

         36 A6            07         0201 19300 		IRP$L_IOST1+2(R6),R2	; TRANSFERRED PAGE COUNT

                          52         0204       

            51            52     C0  0205 19400 	ADDL	R2,R1			; TO GET CORRECT GPTX FOR BAD PAGE

            51            01     C1  0208 19450 	ADDL3	#1,R1,IRP$L_ASTPRM(R6)	; SET GPTX FOR START OF NEXT TRANSFER

                       14 A6         020B       

       0000'DF40          51     D0  020D 19500 100$:	MOVL	R1,@W^PFN$AL_BAK[R0]	; FIX BACKING STORE ADDRESS

                       10 A6     D5  0213 19600 120$:	TSTL	IRP$L_AST(R6)		; IF GLOBAL PAGE (NOT CRF)

                          04     18  0216 19700 	BGEQ	140$

         10 A6            04     C0  0218 19800 	ADDL	#4,IRP$L_AST(R6)	; THEN SKIP OVER PROCESS PTE ADR

                     0000'DF40   B5  021C 19900 140$:	TSTW	@W^PFN$AW_REFCNT[R0]	; IS THIS THE LAST REFERENCE?

                          12     14  0221 20000 	BGTR	160$			; BRANCH IF NOT

                     0000'DF40   B5  0223 20010 	TSTW	@W^PFN$AW_SWPVBN[R0]	; IF THIS PROCESS HAS BEEN SWAPPED OUT

                          08     13  0228 20020 	BEQL	150$

            52            02     9A  022A 20030 	MOVZBL	#PFN$C_BADPAGLST,R2	; THEN PUT THIS PAGE IN LIMBO

                          FDD0'  30  022D 20040 	BSBW	MMG$INSPFNT		; ON THE BAD PAGE LIST

                          03     11  0230 20070 	BRB	160$

                          FDCB'  30  0232 20100 150$:	BSBW	MMG$RELPFN		; OTHERWISE RELEASE THE PAGE

                          FF3D   31  0235 20200 160$:	BRW	PAGIO_DONE		; COMPLETE THIS PORTION OF THE PAGE READ

                                     0238 20300 ;

                                     0238 20400 ; DO THE REMAINING SEGMENT OF THE I/O FOR A PAGE READ OR WRITE ERROR

                                     0238 20500 ; SKIP OVER THE PORTION THAT WAS TRANSFERRED SUCCESSFULLY AND SKIP OVER

                                     0238 20600 ; THE PAGE IN ERROR WHICH WAS DEALT WITH BY EITHER PAGRD_ERR OR

                                     0238 20700 ; PAGWRT_ERR AND SET UP TO TRANSFER THE REMAINING PAGES IF ANY.

                                     0238 20800 ; NOTE THAT FOR PAGE WRITE ERRORS THE REST OF THE TRANSFER IS NOT DONE

                                     0238 20900 ; IF I/O COMPLETION STATUS IS RETURNED TO THE PROCESS.

                                     0238 21000 ;

                                     0238 21100 PAGIO_ERR:

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  10

0302            PAGIO - PAGE I/O COMPLETION                                                                                      (4)



            55            56     D0  0238 21200 	MOVL	R6,R5			; IRP ADDRESS

            56            8E     7D  023B 21300 	MOVQ	(SP)+,R6		; RESTORE ADDITIONAL SAVED REGISTERS

            07            09     EF  023E 21400 	EXTZV	#VA$V_VPN,#<16-VA$V_VPN>, - ; GET PAGE COUNT TRANSFERRED

            51         36 A5         0241       

                                     0244 21500 		IRP$L_IOST1+2(R5),R1

                          51     D6  0244 21600 	INCL	R1			; COUNT THE ERROR PAGE AS DONE

            51            09     9C  0246 21700 	ROTL	#9,R1,R0		; BYTE COUNT COMPLETED

                          50         0249       

         3E A5            50     A2  024A 21800 	SUBW	R0,IRP$W_OBCNT(R5)	; BYTE COUNT REMAINING

                          1A     13  024E 21900 	BEQL	40$			; BRANCH IF NOTHING LEFT TO DO

                       3C A5     B4  0250 22000 	CLRW	IRP$W_ABCNT(R5)		; ZERO ACCUMULATED BYTE COUNT

                                     0253 22100 

                                     0253 22200 	ASSUME	IRP$W_BCNT EQ IRP$W_BOFF+2

                                     0253 22300 	ASSUME	IRP$W_OBCNT EQ IRP$W_ABCNT+2

         30 A5         3C A5     D0  0253 22400 	MOVL	IRP$W_ABCNT(R5),IRP$W_BOFF(R5) ; ZERO BOFF, SET NEW BYTE COUNT

                       40 A5     D6  0258 22500 	INCL	IRP$L_SEGVBN(R5)	; SEGMENT VBN WAS POINTING AT ERROR VBN

            53         44 A5     D0  025B 22600 	MOVL	IRP$L_DIAGBUF(R5),R3	; STARTING SVAPTE OF ENTIRE TRANSFER

         44 A5            6341   DE  025F 22700 	MOVAL	(R3)[R1],IRP$L_DIAGBUF(R5) ; STARTING PTE ADDRESS OF THIS SEGMENT

                                     0264 22710 

                                     0264 22720 	.IF	DF,CA$_MEASURE_IOT

                          FD99'  30  0264 22730 	BSBW	PMS$START_RQ		; INSERT START OF I/O REQUEST MESSAGE

                                     0267 22740 	.ENDC

                                     0267 22750 

                          00AF   31  0267 22800 	BRW	QNXTSEG			; QUEUE THIS SEGMENT AND RETURN TO IOPOST

            50            55     D0  026A 22900 40$:	MOVL	R5,R0			; I/O PACKET ADDRESS

                          FF58   31  026D 23000 	BRW	PAGIO_ERR_DONE

                                     0270 23100 ;

                                     0270 23200 ; PAGE WRITE ERROR - CLEAN UP LOGIC

                                     0270 23300 ;

                                     0270 23400 ;	R3 = PTE ADDRESS FOR ERROR PAGE

                                     0270 23500 ;	R4 = PCB ADDRESS

                                     0270 23600 ;	R5 = PROCESS HEADER ADDRESS

                                     0270 23700 ;	R6 = I/O REQUEST PACKET ADDRESS

                                     0270 23800 ;	R7 = 0 IF ALL COMPLETION LOGIC IS DONE IN IOPOST

                                     0270 23900 ;	   = NON-ZERO IF COMPLETION (AND ERROR REPORT) ARE TO BE

                                     0270 24000 ;	     RETURNED TO THE PROCESS.

                                     0270 24100 ;

                                     0270 24200 PAGWRT_ERR1:

                          57     DD  0270 24300 	PUSHL	R7			; SAVE KERNEL AST FLAG

                          09     EF  0272 24400 	EXTZV	#VA$V_VPN,#<16-VA$V_VPN>,- ; PAGE COUNT TRANSFERRED

         36 A6            07         0274 24500 		IRP$L_IOST1+2(R6),R0

                          50         0277       

                          09     EF  0278 24600 	EXTZV	#VA$V_VPN,#<16-VA$V_VPN>,- ; ORIGINAL PAGE COUNT

         3E A6            07         027A 24700 		IRP$W_OBCNT(R6),R7

                          57         027D       

            57            50     C2  027E 24800 	SUBL	R0,R7			; COUNT OF REMAINING PAGES

                          6E     D5  0281 24900 	TSTL	(SP)			; IF NOT REPORTING ERROR TO PROCESS

                          03     12  0283 25000 	BNEQ	20$

            57            01     D0  0285 25100 	MOVL	#1,R7			; ONLY CLEAN UP THE ERROR PAGE HERE

                                     0288 25200 					; REST OF TRANSFER WILL BE DONE BY PAGIO_ERR

                          7E     D4  0288 25300 20$:	CLRL	-(SP)			; INIT "ERROR PAGE" FLAG

                          53     DD  028A 25400 70$:	PUSHL	R3			; SAVE SVAPTE

                          0028   30  028C 25500 	BSBW	PFN_IO_DONE		; COMPLETE I/O FOR THIS PAGE

       0000'DF40          07     E2  028F 25600 	BBSS	#PFN$V_MODIFY,@W^PFN$AB_STATE[R0],80$ ; FORCE MODIFY BIT

                          00         0295       

                                     0296 25700 80$:

                                     0296 25800 ;

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  11

0302            PAGIO - PAGE I/O COMPLETION                                                                                      (4)



                                     0296 25900 ; CONDITION CODES STILL SET FROM DECREF AT END OF PFN_IO_DONE

                                     0296 26000 ;

                          10     14  0296 26100 	BGTR	120$			; BRANCH IF NOT THE LAST REFERENCE

         04 AE            00     E2  0298 26200 	BBSS	#0,4(SP),100$		; BRANCH IF NOT ERROR PAGE

                          08         029C       

                                     029D 26300 ;

                                     029D 26400 ; THIS IS THE PAGE THAT HAD THE WRITE ERROR

                                     029D 26500 ;

            52            02     D0  029D 26600 	MOVL	#PFN$C_BADPAGLST,R2	; PUT IT ON THE BAD PAGE LIST

                          FD5D'  30  02A0 26700 	BSBW	MMG$INSPFNT		; WITH "MODIFY" SET AND "BAD" CLEAR

                          03     11  02A3 26800 	BRB	120$

                          FD58'  30  02A5 26900 100$:	BSBW	MMG$RELPFN		; NO MORE REFERENCES, RELEASE THE PAGE

            8E            04     C1  02A8 27000 120$:	ADDL3	#4,(SP)+,R3		; NEXT PTE ADDRESS

                          53         02AB       

            DB            57     F5  02AC 27100 	SOBGTR	R7,70$

                          03     BA  02AF 27200 	POPR	#^M<R0,R1>		; CLEAN OFF BAD PAGE FLAG

                                     02B1 27300 					; R1 = SAVED KERNEL AST INDICATOR

            57            51     D0  02B1 27400 	MOVL	R1,R7			; PUT IT IN R7, SET CONDITION CODES

                          FE75   31  02B4 27500 	BRW	PAGWRT_ERR_DONE

                                     02B7 27600 ;

                                     02B7 27700 ; PFN_IO_DONE

                                     02B7 27800 ;

                                     02B7 27900 ; INPUTS:

                                     02B7 28000 ;

                                     02B7 28100 ;	R3 = SVAPTE

                                     02B7 28200 ;	R4 = PROCESS CONTROL BLOCK ADDRESS OF PROCESS THAT REQUESTED THE I/O

                                     02B7 28300 ;	R5 = PROCESS HEADER OF THE PROCESS THAT REQUESTED THIS I/O

                                     02B7 28400 ;	R6 = I/O REQUEST PACKET ADDRESS

                                     02B7 28500 ;

                                     02B7 28600 ; OUTPUTS:

                                     02B7 28700 ;

                                     02B7 28800 ;	R0 = PFN

                                     02B7 28900 ;	R3 PRESERVED

                                     02B7 29000 ;	IRP$W_BOFF(R6) INCREMENTED IF THIS WAS A COLLISION PAGE

                                     02B7 29100 ;	CONDITION CODES SET FROM DECW @W^PFN$AW_REFCNT[R0]

                                     02B7 29200 ;

                                     02B7 29300 PFN_IO_DONE:

            15            00     EF  02B7 29400 	EXTZV	#PTE$V_PFN,#PTE$S_PFN,(R3),R0 ; GET PAGE FRAME NUMBER

            50            63         02BA       

                                 8B  02BC 29500 	BICB3	#^C<PFN$M_COLLISION ! PFN$M_PAGTYP>,- ; FETCH THESE

       0000'DF40       E8 8F         02BD 29600 		@W^PFN$AB_TYPE[R0],R1	; BITS FROM PFN TYPE BYTE

                          51         02C3       

            51            04     E5  02C4 29700 	BBCC	#PFN$V_COLLISION,R1,20$	; CLEAR COLLISION BIT, BRANCH IF WAS CLEAR

                          09         02C7       

       0000'DF40          10     8A  02C8 29800 	BICB	#PFN$M_COLLISION,@W^PFN$AB_TYPE[R0] ; CLEAR IT IN PFN DATA

                       30 A6     B6  02CE 29900 	INCW	IRP$W_BOFF(R6)		; MUST EMPTY THE COLLISION QUEUE

            04            51     91  02D1 30000 20$:	CMPB	R1,#PFN$C_PPGTBL	; IF PROCESS PAGE TABLE PAGE

                          07     12  02D4 30100 	BNEQ	40$

            51         46 A5     3C  02D6 30200 	MOVZWL	PHD$W_PHVINDEX(R5),R1	; MUST COUNT ONE LESS

                          FD23'  30  02DA 30300 	BSBW	MMG$DECPHDREF1		; PROCESS HEADER REFERENCE

                                     02DD 30400 40$:	DECREF				; ONE LESS REFERENCE FOR THE PAGE

                                 05  02E7 30500 	RSB				; RETURN WITH CONDITION CODES SET

                                     02E8 30600 					; TO NEW STATE OF THE REFCNT

                                     02E8 30700 

                                     02E8 30800 

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  12

0302            VIRTUAL I/O COMPLETION                                                                                           (5)



                                     02E8   100 	.SBTTL	VIRTUAL I/O COMPLETION

                                     02E8   200 ;

                                     02E8   300 ; VIRTUAL I/O COMPLETION

                                     02E8   400 ;

                                     02E8   500 ; CALLING SEQUENCE:

                                     02E8   600 ;

                                     02E8   700 ;	BRW	VIRTUAL

                                     02E8   800 ;

                                     02E8   900 ; INPUTS:

                                     02E8  1000 ;

                                     02E8  1100 ;	R1 = REQUESTED BYTE COUNT, POSSIBLY DIFFERENT FROM TRANSFERRED

                                     02E8  1200 ;	     BYTE COUNT FOR MAGTAPE

                                     02E8  1300 ;	R2 = IRP$W_BOFF CONTENTS

                                     02E8  1400 ;	R3 = SVAPTE OF START OF TRANSFER

                                     02E8  1500 ;

                                     02E8  1600 ; OUTPUTS:

                                     02E8  1700 ;

                                     02E8  1800 ;	BRANCHES TO UNLOCK, PRESERVING R1,R2,R3

                                     02E8  1900 ;	OR BRANCHES TO IOPOST

                                     02E8  2000 ;

                                     02E8  2010 

                                     02E8  2020 	.ENABL	LSB

                                     02E8  2030 

                                     02E8  2100 VIRTUAL:				; VIRTUAL I/O FUNCTION

            50         36 A5     3C  02E8  2200 	MOVZWL	IRP$L_IOST1+2(R5),R0	; GET ACTUAL NUMBER OF BYTES TRANSFERED

         3C A5            50     A0  02EC  2300 	ADDW	R0,IRP$W_ABCNT(R5)	; ACCUMULATE TOTAL BYTES TRANSFERED

            50         F7 8F     78  02F0  2400 	ASHL	#-VA$S_BYTE,R0,R0	; CALCULATE NUMBER OF BLOCKS TRANSFERED

                          50         02F4       

         40 A5            50     C0  02F5  2500 	ADDL	R0,IRP$L_SEGVBN(R5)	; CALCULATE DISK ADDRESS OF NEXT SEGMENT

         36 A5         3C A5     B0  02F9  2600 	MOVW	IRP$W_ABCNT(R5),IRP$L_IOST1+2(R5) ; SET ACCUMULATED BYTES TRANSFERED

            33         34 A5     E9  02FE  2800 	BLBC	IRP$L_IOST1(R5),20$	; IF LBC I/O ERROR

            50         1C A5     D0  0302  2900 	MOVL	IRP$L_UCB(R5),R0	; GET ADDRESS OF DEVICE UCB

         34 A0            00'    E0  0306  3000 	BBS	S^#DEV$V_SQD,UCB$L_DEVCHAR(R0),10$ ; IF SET, SEQUENTIAL DEVICE

                          1F         030A       

                       3C A5     A3  030B  3100 	SUBW3	IRP$W_ABCNT(R5),IRP$W_OBCNT(R5),- ; CALCULATE BYTES REMAINING

         32 A5         3E A5         030E  3200 		IRP$W_BCNT(R5)		;

                          16     13  0312  3300 	BEQL	10$			; IF EQL NONE

            51         F7 8F     78  0314  3400 	ASHL	#-VA$S_BYTE,R1,R1	; CALCULATE NUMBER OF PAGES REQUESTED

                          51         0318       

                                     0319  3420 QNXTSEG:

         2C A5            6341   DE  0319  3500 	MOVAL	(R3)[R1],IRP$L_SVAPTE(R5) ; SET ADDRESS OF NEXT PTE ENTRY

            53            55     D0  031E  3550 	MOVL	R5,R3			; COPY I/O REQUEST PACKET ADDRESS

            55         1C A3     D0  0321  3600 	MOVL	IRP$L_UCB(R3),R5	; GET ADDRESS OF DEVICE UCB

                          25     10  0325  3700 	BSBB	IOC$QNXTSEG		; QUEUE THE NEXT VIRTUAL SEGMNET

                          FCE3   31  0327  3800 5$:	BRW	IOPOST

                                     032A  3900 ;

                                     032A  4000 ; ALL SEGMENTS OF THIS TRANSFER ARE COMPLETE

                                     032A  4100 ;

            51         3E A5     3C  032A  4200 10$:	MOVZWL	IRP$W_OBCNT(R5),R1	; GET ORIGINAL BYTE COUNT

            53         44 A5     D0  032E  4300 	MOVL	IRP$L_DIAGBUF(R5),R3	; GET ORIGINAL PAGE TABLE ADDRESS

                          FD25   31  0332  4400 	BRW	UNLOCK			;

                                     0335  4500  

                                     0335  4600 ;

                                     0335  4700 ; I/O OPERATION ENDED WITH AN UNSUCCESSFUL STATUS

                                     0335  4800 ;

                                     0335  4900 ;		IF THE DEVICE IS A SEQUENTIAL DEVICE, THEN THE I/O PACKET IS

                                     0335  5000 ;		MERELY SENT TO THE ACP FOR NOTIFICATION OF THE ERROR.

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  13

0302            VIRTUAL I/O COMPLETION                                                                                           (5)



                                     0335  5100 ;

                                     0335  5200 ;		IF THE DEVICE IS A RANDOM DEVICE, THEN THE VIRTUAL BLOCK NUMBER

                                     0335  5300 ;		STORED IN IRP$L_SEGVBN IS THE BLOCK THAT HAS AN ERROR.

                                     0335  5400 ;

                                     0335  5500  

            53            55     D0  0335  5600 20$:	MOVL	R5,R3			; COPY IRP ADDRESS

                       44 A4     B7  0338  5650 	DECW	PCB$W_DIOCNT(R4)	; ADJUST DIRECT I/O COUNT

         2A A3            10     AA  033B  5700 	BICW	#IRP$M_VIRTUAL,IRP$W_STS(R3) ; CLEAR VIRTUAL I/O FLAG

         2C A3         44 A3     D0  033F  5800 	MOVL	IRP$L_DIAGBUF(R3),IRP$L_SVAPTE(R3) ; RESET PAGE TABLE ADDRESS

            52         3E A3     3C  0344  5900 	MOVZWL	IRP$W_OBCNT(R3),R2	; GET ORIGINAL BYTE COUNT

                          25     10  0348  6000 	BSBB	IOC$QTOACP		; QUEUE PACKET TO ACP

                          DB     11  034A  6100 	BRB	5$

                                     034C  6200 

                                     034C  6300 	.DSABL	LSB

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  14

0302            QUEUE NEXT SEGMENT                                                                                               (6)



                                     034C   100 	.SBTTL	QUEUE NEXT SEGMENT

                                     034C   200 ;

                                     034C   300 ; FUNCTIONAL DESCRIPTION:

                                     034C   400 ;

                                     034C   500 ;	IOC$QNXTSEG PERFORMS THE FUNCTION OF QUEUEING THE NEXT

                                     034C   600 ;	SEGMENT OF A VIRTUAL I/O REQUEST THAT DID NOT MAP TO A

                                     034C   700 ;	SINGLE CONTIGUOUS I/O REQUEST.

                                     034C   800 ;

                                     034C   900 ; CALLING SEQUENCE:

                                     034C  1000 ;

                                     034C  1100 ;	BSBW	IOC$QNXTSEG

                                     034C  1200 ;

                                     034C  1300 ; INPUTS:

                                     034C  1400 ;

                                     034C  1500 ;	R3 = I/O REQUEST PACKET ADDRESS

                                     034C  1600 ;	R4 = PCB ADDRESS ASSOCIATED WITH THE PID IN THE PACKET

                                     034C  1700 ;	R5 = UCB ADDRESS OF THE ASSOCIATED DEVICE

                                     034C  1800 ;

                                     034C  1900 ; OUTPUTS:

                                     034C  2000 ;

                                     034C  2100 ;	R4 NOT PRESERVED

                                     034C  2200 ;

                                     034C  2300 IOC$QNXTSEG::

            52         18 A3     D0  034C  2400 	MOVL	IRP$L_WIND(R3),R2	; GET ADDRESS OF MAPPING WINDOW

            51         32 A3     3C  0350  2500 	MOVZWL	IRP$W_BCNT(R3),R1	; GET SIZE OF NEXT SEGMENT

            50         40 A3     D0  0354  2600 	MOVL	IRP$L_SEGVBN(R3),R0	; GET STARTING VIRTUAL BLOCK NUMBER

                                     0358  2700 ;

                                     0358  2800 ; ALTERNATE ENTRY TO IOC$QNXTSEG:

                                     0358  2900 ;

                                     0358  3000 ;	BSBW	IOC$QNXTSEG1

                                     0358  3100 ;

                                     0358  3200 ; ADDITIONAL INPUTS:

                                     0358  3300 ;

                                     0358  3400 ;	R0 = VIRTUAL BLOCK NUMBER OF START OF NEXT SEGMENT

                                     0358  3500 ;	R1 = DESIRED BYTE COUNT OF NEXT SEGMENT

                                     0358  3600 ;	R2 = WINDOW ADDRESS

                                     0358  3700 ;

                                     0358  3800 IOC$QNXTSEG1::

                       44 A4     B7  0358  3900 	DECW	PCB$W_DIOCNT(R4)	; ADJUST THE DIRECT I/O COUNT

                          FCA2'  30  035B  4000 	BSBW	IOC$MAPVBLK		; MAP VIRTUAL TO LOGICAL BLOCK

         32 A3            52     A3  035E  4100 	SUBW3	R2,IRP$W_BCNT(R3),IRP$W_BCNT(R3) ; CALCULATE SIZE OF NEXT SEGMENT

                       32 A3         0362       

                          09     13  0364  4200 	BEQL	30$			; IF EQL TOTAL MAP FAILURE

            50            51     D0  0366  4300 	MOVL	R1,R0			; COPY STARTING LOGICAL BLOCK NUMBER

                          FC94'  30  0369  4400 	BSBW	IOC$CVTLOGPHY		; CONVERT LOGICAL TO PHYSICAL BLOCK

                          FC91'  31  036C  4500 	BRW	EXE$INSIOQ		; INSERT I/O PACKET IN DEVICE QUEUE

                                     036F  4600 					; AND RETURN

                                     036F  4700 30$:

                                     036F  4705 ;

                                     036F  4710 ; ALTERNATE ENTRY TO IOC$WAKACP:

                                     036F  4715 ;

                                     036F  4720 ;	BSBW	IOC$QTOACP

                                     036F  4725 ;

                                     036F  4730 ; INPUTS:

                                     036F  4735 ;

                                     036F  4740 ;	R2 = DESIRED BYTE COUNT

                                     036F  4745 ;	R3 = IRP ADDRESS

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  15

0302            QUEUE NEXT SEGMENT                                                                                               (6)



                                     036F  4750 ;	PCB$W_DIOCNT(R4) ALREADY DECREMENTED

                                     036F  4755 ;

                                     036F  4800 IOC$QTOACP:

         32 A3            52     B0  036F  4900 	MOVW	R2,IRP$W_BCNT(R3)	; SET REMAINING BYTES TO TRANSFER

            52         18 A3     D0  0373  5000 	MOVL	IRP$L_WIND(R3),R2	; GET WINDOW ADDRESS

                          02     E0  0377  5100 	BBS	#WCB$V_NOTFCP,WCB$B_ACCESS(R2),- ; IF SET THEN

            29         0B A2         0379  5200 		NOTFCPWCB		; NOT FCP WINDOW

            52         1C A3     D0  037C  5300 	MOVL	IRP$L_UCB(R3),R2	; GET ADDRESS OF DEVICE UCB

                                     0380  5400 ;

                                     0380  5500 ; FUNCTIONAL DESCRIPTION:

                                     0380  5600 ;

                                     0380  5700 ;	SUBROUTINE TO QUEUE AN I/O PACKET FOR AN ACP PROCESS AND WAKE

                                     0380  5800 ;	THE PROCESS IF ITS QUEUE WAS PREVIOUSLY EMPTY.

                                     0380  5900 ;

                                     0380  6000 ; CALLING SEQUENCE:

                                     0380  6100 ;

                                     0380  6200 ;	BSBW	IOC$WAKACP

                                     0380  6300 ;

                                     0380  6400 ; INPUTS:

                                     0380  6500 ;

                                     0380  6600 ;	R2 = DEVICE UCB ADDRESS

                                     0380  6700 ;	R3 = I/O REQUEST PACKET ADDRESS

                                     0380  6800 ;

                                     0380  6900 ; OUTPUTS:

                                     0380  7000 ;

                                     0380  7100 ;	R4 ALTERED

                                     0380  7200 ;

                                     0380  7300 IOC$WAKACP::				; QUEUE I/O PACKET AND WAKE ACP PROCESS

                                     0380  7400 	DSBINT	#IPL$_SYNCH		; SYNCHRONIZE ACCESS TO SYSTEM DATA BASE

            52         30 A2     D0  0386  7500 	MOVL	UCB$L_VCB(R2),R2	; GET ASSOCIATED VCB ADDRESS

            52         10 A2     D0  038A  7600 	MOVL	VCB$L_AQB(R2),R2	; GET ACP QUEUE BLOCK ADDRESS

                          FC6F'  30  038E  7700 	BSBW	EXE$INSERTIRP		; INSERT I/O PACKET IN ACP QUEUE

                          0E     12  0391  7800 	BNEQ	10$			; IF NEQ NOT FIRST IN QUEUE

            51         0C A2     D0  0393  7900 	MOVL	AQB$L_ACPPID(R2),R1	; GET ACP PROCESS ID

                          FC66'  30  0397  8000 	BSBW	SCH$WAKE		; WAKE ACP PROCESS

            04            50     E8  039A  8100 	BLBS	R0,10$			; IF LBS ACP STILL PRESENT

                                     039D  8200 	BUG_CHECK NONEXSTACP		; NONEXISTENT ACP PROCESS

                                     03A1  8300 10$:	ENBINT				; RESTORE SAVED IPL

                                 05  03A4  8400 	RSB				;

                                     03A5  8500 ;

                                     03A5  8600 ; WINDOW IS NOT AN FCP WINDOW, ONLY USED FOR BOOT TIME INTIALIZED WINDOWS

                                     03A5  8700 ; FOR CONTIGUOUS FILES.  IT IS NOT POSSIBLE TO NEED TO TURN SUCH A WINDOW.

                                     03A5  8800 ;

                                     03A5  8900 NOTFCPWCB:

                                     03A5  9000 	BUG_CHECK NOTFCPWCB,FATAL

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  16

0302            BUFFERED READ COMPLETION AST ROUTINE                                                                             (7)



                                     03A9   100 	.SBTTL	BUFFERED READ COMPLETION AST ROUTINE

                                     03A9   200 ;++

                                     03A9   300 ; FUNCTIONAL DESCRIPTION:

                                     03A9   400 ;

                                     03A9   500 ;	BUFPOST PERFORMS ALL NECESSARY COMPLETION OPERATIONS REQUIRED

                                     03A9   600 ;	FOR A BUFFERED READ OPERATION IN THE CONTEXT OF THE PROCESS

                                     03A9   700 ;	ISSUING THE I/O REQUEST.

                                     03A9   800 ;

                                     03A9   900 ; CALLING SEQUENCE:

                                     03A9  1000 ;

                                     03A9  1100 ;	JSB	BUFPOST

                                     03A9  1200 ;

                                     03A9  1300 ; INPUT PARAMETERS:

                                     03A9  1400 ;

                                     03A9  1500 ;	R4 = CURRENT PROCESS PCB ADDRESS.

                                     03A9  1600 ;	R5 = IRP/AST CONTROL BLOCK.

                                     03A9  1700 ;

                                     03A9  1800 ; IMPLICIT INPUTS:

                                     03A9  1900 ;

                                     03A9  2000 ;	SCH$GL_CURPCB - POINTER TO PCB OF CURRENT PROCESS

                                     03A9  2100 ;--

                                     03A9  2200 

                                     03A9  2300 BUFPOST:				; BUFFERED READ COMPLETION

                     00E0 8F     BB  03A9  2400 	PUSHR	#^M<R5,R6,R7>		; SAVE REGISTERS

            56         2C A5     D0  03AD  2500 	MOVL	IRP$L_SVAPTE(R5),R6	; GET ADDRESS OF I/O BUFFER

            57         32 A5     3C  03B1  2600 	MOVZWL	IRP$W_BCNT(R5),R7	; GET COUNT OF BYTES OR DESCRIPTORS

         2A A5            03     E1  03B5  2700 	BBC	#IRP$V_COMPLX,IRP$W_STS(R5),40$ ;IF CLR, NOT COMPLEX BUFFER FORMAT

                          3F         03B9       

         2A A5            05     E0  03BA  2800 	BBS	#IRP$V_CHAINED,IRP$W_STS(R5),50$ ;IF SET ,CHAINED BUFFERS

                          4D         03BE       

            56            66     D0  03BF  2900 	MOVL	(R6),R6			; GET ADDRESS OF FIRST BUFFER DESCRIPTOR

            50         02 A6     3C  03C2  3000 10$:	MOVZWL	2(R6),R0		; GET COUNT OF BYTES TO TRANSFER

                          27     13  03C6  3100 	BEQL	30$			; IF EQL NONE THIS DESCRIPTOR

            51         04 A6     D0  03C8  3200 	MOVL	4(R6),R1		; GET ADDRESS OF USER BUFFER

            54            66     3C  03CC  3300 	MOVZWL	(R6),R4			; GET OFFSET TO DATA AREA

            53       FE00 8F     32  03CF  3400 	CVTWL	#-^X200,R3		; SET ADDITION CONSTANT

                                     03D4  3500 20$:	IFNOWRT	R0,(R1),35$,(R6)[R4]	; CAN BUFFER BE WRITTEN?

            51            53     C2  03DB  3600 	SUBL	R3,R1			; UPDATE ADDRESS OF BUFFER

            50            6043   3E  03DE  3700 	MOVAW	(R0)[R3],R0		; UPDATE REMAINING LENGTH

                          F0     18  03E2  3800 	BGEQ	20$			; IF GEQ MORE TO CHECK

         01 A644       02 A6     28  03E4  3900 	MOVC	2(R6),1(R6)[R4],@4(R6)	; MOVE DATA TO USER BUFFER

                       04 B6         03EA       

            55            6E     D0  03EC  4000 	MOVL	(SP),R5			; RESTORE ADDRESS OF I/O PACKET

            56            08     C0  03EF  4100 30$:	ADDL	#8,R6			; ADVANCE TO NEXT BUFFER DESCRIPTOR

            CD            57     F5  03F2  4200 	SOBGTR	R7,10$			; ANY MORE DESCRIPTORS TO PROCESS?

                          72     11  03F5  4300 	BRB	130$			;

                          6D     11  03F7  4400 35$:	BRB	120$			; CONTINUE

                          00FA   30  03F9  4500 40$:	BSBW	MOVBUF			; MOVE BUFFER TO USER

            55            6E     D0  03FC  4600 	MOVL	(SP),R5			; RETRIEVE ADDRESS OF I/O PACKET

         2A A5            0A     E1  03FF  4700 	BBC	#IRP$V_MBXIO,IRP$W_STS(R5),130$; BR IF NOT MAILBOX READ

                          65         0403       

            50            02     9A  0404  4800 	MOVZBL	#RSN$_MAILBOX,R0	; SET UP RESOURCE RELEASE

                          FBF6'  30  0407  4900 	BSBW	SCH$RAVAIL		; DECLARE MAILBOX RESOURCE AVAILABLE

                          5D     11  040A  5000 	BRB	130$			;

            50            57     D0  040C  5100 50$:	MOVL	R7,R0			; SET LENGTH OF USER BUFFER

            51         04 A6     D0  040F  5200 	MOVL	4(R6),R1		; SET ADDRESS OF USER BUFFER

            02            00     EF  0413  5300 	EXTZV	#0,#2,IRP$B_RMOD(R5),R2 ; GET REQUEST ACCESS MODE

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  17

0302            BUFFERED READ COMPLETION AST ROUTINE                                                                             (7)



            52         0B A5         0416       

            53       FE00 8F     32  0419  5400 	CVTWL	#-^X200,R3		; SET ADDITION CONSTANT

                                     041E  5500 60$:	IFNOWRT	R0,(R1),90$,R2		; CAN BUFFER BE WRITTEN?

            51            53     C2  0424  5600 	SUBL	R3,R1			; UPDATE ADDRESS OF BUFFER

            50            6043   3E  0427  5700 	MOVAW	(R0)[R3],R0		; CALCULATE NEW LENGTH

                          F1     18  042B  5800 	BGEQ	60$			; IF GEQ MORE TO PROBE

            53         04 A6     D0  042D  5900 	MOVL	4(R6),R3		; GET STARTING ADDRESS OF USER BUFFER

         0C A6            57     B1  0431  6000 70$:	CMPW	R7,CXB$W_LENGTH(R6)	; REMAINING LENGTH LARGER THAN DATA AREA?

                          04     1E  0435  6100 	BGEQU	80$			; IF GEQU YES

         0C A6            57     B0  0437  6200 	MOVW	R7,CXB$W_LENGTH(R6)	; TRUNCATE LENGTH OF DATA AREA

            96         0C A6     28  043B  6300 80$:	MOVC	CXB$W_LENGTH(R6),@(R6)+,(R3) ; MOVE DATA TO USER BUFFER

                          63         043F       

            55            6E     D0  0440  6400 	MOVL	(SP),R5			; RETRIEVE ADDRESS OF I/O PACKET

            57         08 A6     A2  0443  6500 	SUBW	CXB$W_LENGTH-4(R6),R7	; REDUCE REMAINING BYTES TO TRANSFER

                          0B     13  0447  6600 	BEQL	100$			; IF EQL DONE

            56         0C A6     D0  0449  6700 	MOVL	CXB$L_LINK-4(R6),R6	; GET ADDRESS OF NEXT BUFFER IN CHAIN

                          E2     12  044D  6800 	BNEQ	70$			; IF NEQ MORE TO GO

                          03     11  044F  6900 	BRB	100$			;

                          00C8   30  0451  7000 90$:	BSBW	ACCVIO			; SET ACCESS VIOLATION

            50         2C A5     D0  0454  7100 100$:	MOVL	IRP$L_SVAPTE(R5),R0	; GET ADDRESS OF FIRST BUFFER

            56         10 A0     D0  0458  7200 110$:	MOVL	CXB$L_LINK(R0),R6	; GET ADDRESS OF NEXT BUFFER

                          0F     13  045C  7300 	BEQL	140$			; IF EQL NONE

                          FB9F'  30  045E  7400 	BSBW	EXE$DEANONPAGED		; DEALLOCATE BUFFER

            50            56     D0  0461  7500 	MOVL	R6,R0			; SET ADDRESS OF NEXT BUFFER

                          F2     11  0464  7600 	BRB	110$			;

                          00B3   30  0466  7700 120$:	BSBW	ACCVIO			; SET ACCESS VIOLATION STATUS

            50         2C A5     D0  0469  7800 130$:	MOVL	IRP$L_SVAPTE(R5),R0	; GET ADDRESS OF BUFFER TO RELEASE

                          FB90'  30  046D  7900 140$:	BSBW	EXE$DEANONPAGED		; DEALLOCATE BUFFER

                     00E0 8F     BA  0470  8000 	POPR	#^M<R5,R6,R7>		; RESTORE REGISTERS

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  18

0302            DIRECT I/O COMPLETION AST ROUTINE                                                                                (8)



                                     0474   100 	.SBTTL	DIRECT I/O COMPLETION AST ROUTINE

                                     0474   200 ;++

                                     0474   300 ; FUNCTIONAL DESCRIPTION:

                                     0474   400 ;

                                     0474   500 ;	DIRPOST PERFORMS ALL GENERAL I/O COMPLETION ACTIVITIES WHICH

                                     0474   600 ;	MUST BE DONE IN THE CONTEXT OF THE PROCESS. THESE INCLUDE

                                     0474   700 ;	I/O STATUS POSTING IF AN IOSB WAS SPECIFIED, CHANNEL CONTROL

                                     0474   800 ;	BLOCK ACTIVITY COUNT DECREMENTING, QUEUEING OF ANY REQUESTED

                                     0474   900 ;	AST OR RELEASE OF THE I/O REQUEST PACKET.

                                     0474  1000 ;

                                     0474  1100 ; CALLING SEQUENCE:

                                     0474  1200 ;

                                     0474  1300 ;	JSB	DIRPOST

                                     0474  1400 ;

                                     0474  1500 ; INPUT PARAMETERS:

                                     0474  1600 ;

                                     0474  1700 ;	R4 = CURRENT PROCESS PCB ADDRESS.

                                     0474  1800 ;	R5 = IRP/AST CONTROL BLOCK ADDRESS.

                                     0474  1900 ;

                                     0474  2000 ; IMPLICIT INPUTS:

                                     0474  2100 ;

                                     0474  2200 ;	SCH$GL_CURPCB - POINTER TO CURRENT PCB

                                     0474  2300 ;--

                                     0474  2400 

                                     0474  2500 DIRPOST:				; DIRECT I/O POSTING AST

            01            00     EF  0474  2600 	EXTZV	#IRP$V_BUFIO,#1,IRP$W_STS(R5),R0 ; GET INDEX TO ACCOUNTING ENTRY

            50         2A A5         0477       

            51   00000000'9F     D0  047A  2700 	MOVL	@#CTL$GL_PHD,R1		; GET PROCESS HEADER ADDRESS

                       50 A140   D6  0481  2800 	INCL	PHD$L_DIOCNT(R1)[R0]	; ACCOUNT FOR BUFFERED OR DIRECT I/O

                                     0485  2900 

                           00000002  0485  3000 	.IF NE	CA$_MEASURE		; CHECK FOR MEASUREMENT ENABLED

                 00000000'EF40   D6  0485  3100 	INCL	PMS$GL_DIRIO[R0]	; UPDATE MEASUREMENT I/O COUNTER

                                     048C  3200 	.ENDC

                                     048C  3300 

         2A A5            07     E1  048C  3400 	BBC	#IRP$V_DIAGBUF,IRP$W_STS(R5),10$ ; IF CLR, NO DIAGNOSTIC BUFFER

                          1C         0490       

                     00E0 8F     BB  0491  3500 	PUSHR	#^M<R5,R6,R7>		; SAVE REGISTERS

            56         44 A5     D0  0495  3600 	MOVL	IRP$L_DIAGBUF(R5),R6	; GET ADDRESS OF DIAGNOSTIC BUFFER

            57         08 A6     3C  0499  3700 	MOVZWL	IRP$W_SIZE(R6),R7	; GET SIZE OF DIAGNOSTIC BUFFER

            57            0C     C2  049D  3800 	SUBL	#12,R7			; REDUCE BY SIZE OF BUFFER HEADER

                          54     10  04A0  3900 	BSBB	MOVBUF			; MOVE DIAGNOSTIC INFORMATION TO USER

                     00E0 8F     BA  04A2  4000 	POPR	#^M<R5,R6,R7>		; RESTORE REGISTERS

            50         44 A5     D0  04A6  4100 	MOVL	IRP$L_DIAGBUF(R5),R0	; RETRIEVE ADDRESS OF DIAGNOSTIC BUFFER

                          FB53'  30  04AA  4200 	BSBW	EXE$DEANONPAGED		; DEALLOCATE DIAGNOSTIC BUFFER

            50         28 A5     32  04AD  4300 10$:	CVTWL	IRP$W_CHAN(R5),R0	; GET CHANNEL NUMBER (NEGATED)

            51   00000000'FF40   9E  04B1  4400 	MOVAB	@CTL$GL_CCBBASE[R0],R1	; SET CCB BASE ADDRESS

                       0A A1     B7  04B9  4500 	DECW	CCB$W_IOC(R1)		; DECREMENT I/O COUNT FOR CHANNEL

                          12     12  04BC  4600 	BNEQ	30$			; NOT IDLE YET

            53         0C A1     D0  04BE  4700 	MOVL	CCB$L_DIRP(R1),R3	; GET ADDRESS OF DEACCESS PACKET

                          0C     13  04C2  4800 	BEQL	30$			; IF EQL NONE

                       0C A1     D4  04C4  4900 	CLRL	CCB$L_DIRP(R1)		; CLEAR ADDRESS OF DEACCESS PACKET

                       0A A1     B6  04C7  5000 	INCW	CCB$W_IOC(R1)		; ACCOUNT FOR DEACCESS

            52            61     D0  04CA  5100 	MOVL	CCB$L_UCB(R1),R2	; GET ASSIGNED DEVICE UCB ADDRESS

                          FEB0   30  04CD  5200 	BSBW	IOC$WAKACP		; QUEUE I/O PACKET AND WAKE ACP

                                     04D0  5300 					; R4 ALTERERED

                                     04D0  5400 30$:

                                     04D0  5500 ;

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  19

0302            DIRECT I/O COMPLETION AST ROUTINE                                                                                (8)



                                     04D0  5600 ; R4 DOES NOT NECESSARILY HAVE CURRENT PCB ADDRESS IN IT AT THIS POINT

                                     04D0  5700 ;

                                     04D0  5800 IOC$DIRPOST1::

            50         24 A5     D0  04D0  5900 	MOVL	IRP$L_IOSB(R5),R0	; GET IOSB ADDRESS

                          10     13  04D4  6000 	BEQL	35$			; IF EQL NONE SPECIFIED

            02            00     EF  04D6  6100 	EXTZV	#0,#2,IRP$B_RMOD(R5),R1	; GET REQUEST ACCESS MODE

            51         0B A5         04D9       

                                     04DC  6200 	IFNOWRT	#8,(R0),35$,R1		; CAN I/O STATUS BE WRITTEN?

            60         34 A5     7D  04E2  6300 	MOVQ	IRP$L_IOST1(R5),(R0)	; MOVE STATUS INTO IOSB

         0B A5            06     E1  04E6  6400 35$:	BBC	#ACB$V_QUOTA,IRP$B_RMOD(R5),40$ ; IF CLR, NO AST SPECIFIED

                          05         04EA       

                          52     D4  04EB  6500 	CLRL	R2			; SET NULL PRIORITY INCREMENT

                          FB10'  31  04ED  6600 	BRW	SCH$QAST		; QUEUE AST FOR REQUESTOR

            50            55     D0  04F0  6700 40$:	MOVL	R5,R0			; SETUP ADDRESS FOR DEALLOCATE

                          FB0A'  31  04F3  6800 	BRW	EXE$DEANONPAGED		; AND RELEASE I/O PACKET

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  20

0302            MOVE DATA TO USER BUFFER                                                                                         (9)



                                     04F6   100 	.SBTTL	MOVE DATA TO USER BUFFER

                                     04F6   200 ;

                                     04F6   300 ; SUBROUTINE TO MOVE DATA FROM A SIMPLE BUFFERED I/O BUFFER TO A USER BUFFER

                                     04F6   400 ;

                                     04F6   500  

                                     04F6   600 MOVBUF:					; MOVE BUFFER

            50            57     D0  04F6   700 	MOVL	R7,R0			; SET LENGTH OF USER BUFFER

            51         04 A6     D0  04F9   800 	MOVL	4(R6),R1		; GET ADDRESS OF USER BUFFER

            02            00     EF  04FD   900 	EXTZV	#0,#2,IRP$B_RMOD(R5),R2	; GET REQUEST ACCESS MODE

            52         0B A5         0500       

            53       FE00 8F     32  0503  1000 	CVTWL	#-^X200,R3		; SET ADDITION CONSTANT

                                     0508  1100 10$:	IFNOWRT	R0,(R1),ACCVIO,R2	; CAN BUFFER BE WRITTEN?

            51            53     C2  050E  1200 	SUBL	R3,R1			; UPDATE BUFFER ADDRESS

            50            6043   3E  0511  1300 	MOVAW	(R0)[R3],R0		; UPDATE REMAINING LENGTH OF BUFFER

                          F1     18  0515  1400 	BGEQ	10$			; IF GEQ MORE TO CHECK

            96            57     28  0517  1500 	MOVC	R7,@(R6)+,@(R6)+	; MOVE DATA TO USER BUFFER

                          96         051A       

                                 05  051B  1600 	RSB				;

         34 A5            00'    B0  051C  1700 ACCVIO:	MOVW	S^#SS$_ACCVIO,IRP$L_IOST1(R5) ; SET FINAL TRANSFER STATUS

                                 05  0520  1800 	RSB				;

                                     0521  1900 

                                     0521  2000 

                                     0521  2100 	.END

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  21

SYMBOL TABLE                                                                                                                     (9)



ACB$B_RMOD       0000000B            CTL$GL_CCBBASE   ********   X   03   IRP$L_AST        00000010            

ACB$B_TYPE       0000000A            CTL$GL_PHD       ********   X   03   IRP$L_ASTPRM     00000014            

ACB$L_AST        00000010            CXB$B_CODE       0000000B            IRP$L_DIAGBUF    00000044            

ACB$L_ASTPRM     00000014            CXB$B_TYPE       0000000A            IRP$L_IOQBL      00000004            

ACB$L_ASTQBL     00000004            CXB$C_DDCCON   = 00000001            IRP$L_IOQFL      00000000            

ACB$L_ASTQFL     00000000            CXB$C_DDCDAT   = 00000002            IRP$L_IOSB       00000024            

ACB$L_KAST       00000018            CXB$C_DDCERR   = 00000004            IRP$L_IOST1      00000034            

ACB$L_PID        0000000C            CXB$C_DDCRCV   = 00000003            IRP$L_IOST2      00000038            

ACB$M_QUOTA    = 00000040            CXB$C_LENGTH     00000018            IRP$L_MEDIA      00000034            

ACB$S_MODE     = 00000002            CXB$C_NSPSTART   0000001A            IRP$L_PID        0000000C            

ACB$V_KAST     = 00000007            CXB$K_LENGTH     00000018            IRP$L_SEGVBN     00000040            

ACB$V_MODE     = 00000000            CXB$K_NSPSTART   0000001A            IRP$L_SEQNUM     00000048            

ACB$V_QUOTA    = 00000006            CXB$L_BL         00000004            IRP$L_SVAPTE     0000002C            

ACB$W_SIZE       00000008            CXB$L_FL         00000000            IRP$L_TT_TERM    00000038            

ACCVIO           0000051C R     03   CXB$L_IRP        00000010            IRP$L_UCB        0000001C            

AQB$B_ACPTYPE    00000015            CXB$L_LINK       00000010            IRP$L_WIND       00000018            

AQB$B_CLASS      00000016            CXB$L_SSB        00000014            IRP$M_BUFIO    = 00000001            

AQB$B_MNTCNT     0000000B            CXB$W_CHANNEL    00000010            IRP$M_CHAINED  = 00000020            

AQB$B_STATUS     00000014            CXB$W_LENGTH     0000000C            IRP$M_COMPLX   = 00000008            

AQB$B_TYPE       0000000A            CXB$W_OFFSET     0000000E            IRP$M_DIAGBUF  = 00000080            

AQB$C_LENGTH     00000018            CXB$W_SIZE       00000008            IRP$M_FUNC     = 00000002            

AQB$K_F11V1    = 00000001            DEV$V_SQD        ********   X   03   IRP$M_MBXIO    = 00000400            

AQB$K_F11V2    = 00000002            DIRIO            0000003E R     03   IRP$M_PAGIO    = 00000004            

AQB$K_LENGTH     00000018            DIRPOST          00000474 R     03   IRP$M_PHYSIO   = 00000100            

AQB$K_MTA      = 00000003            EVT$_COLPGA      ********   X   03   IRP$M_PRIVIO   = 00000200            

AQB$K_NET      = 00000004            EVT$_PFCOM       ********   X   03   IRP$M_SWAPIO   = 00000040            

AQB$K_UNDEFINED= 00000000            EXE$DEANONPAGED  ********   X   03   IRP$M_VIRTUAL  = 00000010            

AQB$L_ACPPID     0000000C            EXE$INSERTIRP    ********   X   03   IRP$Q_NT_PRVMSK  0000003C            

AQB$L_ACPQBL     00000004            EXE$INSIOQ       ********   X   03   IRP$S_FCODE    = 00000006            

AQB$L_ACPQFL     00000000            GBL...         = 00000000            IRP$S_FMOD     = 0000000A            

AQB$L_LINK       00000010            IOC$CVTLOGPHY    ********   X   03   IRP$S_MODE     = 00000002            

AQB$M_CREATING = 00000008            IOC$DIRPOST1     000004D0 RG    03   IRP$V_BUFIO    = 00000000            

AQB$M_DEFCLASS = 00000002            IOC$GL_PSFL      ********   X   03   IRP$V_CHAINED  = 00000005            

AQB$M_DEFSYS   = 00000004            IOC$IOPOST       00000004 RG    03   IRP$V_COMPLX   = 00000003            

AQB$M_UNIQUE   = 00000001            IOC$MAPVBLK      ********   X   03   IRP$V_DIAGBUF  = 00000007            

AQB$V_CREATING = 00000003            IOC$QNXTSEG      0000034C RG    03   IRP$V_FCODE    = 00000000            

AQB$V_DEFCLASS = 00000001            IOC$QNXTSEG1     00000358 RG    03   IRP$V_FMOD     = 00000006            

AQB$V_DEFSYS   = 00000002            IOC$QTOACP       0000036F R     03   IRP$V_FUNC     = 00000001            

AQB$V_UNIQUE   = 00000000            IOC$WAKACP       00000380 RG    03   IRP$V_MBXIO    = 0000000A            

AQB$W_SIZE       00000008            IOPOST           0000000D R     03   IRP$V_MODE     = 00000000            

BIT...         = 0000000C            IOPOST_KAST      000000E8 R     03   IRP$V_PAGIO    = 00000002            

BRW_QNXTSEG      000000F3 R     03   IPL$_ASTDEL    = 00000002            IRP$V_PHYSIO   = 00000008            

BUFIO            000000AC R     03   IPL$_HWCLK     = 00000018            IRP$V_PRIVIO   = 00000009            

BUFPOST          000003A9 R     03   IPL$_IOPOST    = 00000004            IRP$V_SWAPIO   = 00000006            

BUG$_NONEXSTACP  ********   X   03   IPL$_MAILBOX   = 0000000B            IRP$V_VIRTUAL  = 00000004            

BUG$_NOTFCPWCB   ********   X   03   IPL$_POWER     = 0000001F            IRP$W_ABCNT      0000003C            

CA$_MEASURE    = 00000002            IPL$_QUEUEAST  = 00000006            IRP$W_BCNT       00000032            

CA$_MEASURE_IOT= 00000004            IPL$_SCHED     = 00000003            IRP$W_BOFF       00000030            

CA$_SIMULATOR  = 00000001            IPL$_SYNCH     = 00000007            IRP$W_CHAN       00000028            

CCB$B_AMOD       00000009            IPL$_TIMER     = 00000007            IRP$W_FUNC       00000020            

CCB$B_STS        00000008            IRP$B_CARCON     00000038            IRP$W_OBCNT      0000003E            

CCB$C_LENGTH     00000010            IRP$B_EFN        00000022            IRP$W_SIZE       00000008            

CCB$K_LENGTH     00000010            IRP$B_PRI        00000023            IRP$W_STS        0000002A            

CCB$L_DIRP       0000000C            IRP$B_RMOD       0000000B            IRP$W_TT_PRMPT   0000003C            

CCB$L_UCB        00000000            IRP$B_TYPE       0000000A            MMG$DECPHDREF1   ********   X   03   

CCB$L_WIND       00000004            IRP$C_LENGTH     0000004C            MMG$GL_SYSPHD    ********   X   03   

CCB$W_IOC        0000000A            IRP$K_LENGTH     0000004C            MMG$INSPFNT      ********   X   03   

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  22

SYMBOL TABLE                                                                                                                     (9)



MMG$REFCNTNEG    ********   X   03   PCB$V_PHDRES   = 00000012            PFN$M_LOC      = 00000007            

MMG$RELPFN       ********   X   03   PCB$V_PSWAPM   = 00000004            PFN$M_MODIFY   = 00000080            

MMG$SUBSECREF    ********   X   03   PCB$V_PWRAST   = 00000016            PFN$M_PAGTYP   = 00000007            

MMG$UNLOCK       ********   X   03   PCB$V_RES      = 00000000            PFN$M_PGFLX    = FF000000            

MMG$UPDSECAST    ********   X   03   PCB$V_RESPEN   = 00000005            PFN$M_RPTEVT   = 00000040            

MOVBUF           000004F6 R     03   PCB$V_SSFEXC   = 00000006            PFN$S_BAK      = 00000017            

NOTFCPWCB        000003A5 R     03   PCB$V_SSFEXCE  = 00000007            PFN$S_GBLBAK   = 00000001            

PAGIO            000000F6 R     03   PCB$V_SSFEXCS  = 00000008            PFN$S_LOC      = 00000003            

PAGIO_DONE       00000175 R     03   PCB$V_SSFEXCU  = 00000009            PFN$S_PAGTYP   = 00000003            

PAGIO_DONE1      00000196 R     03   PCB$V_SSRWAIT  = 0000000A            PFN$S_PGFLX    = 00000008            

PAGIO_DONE2      0000019D R     03   PCB$V_SUSPEN   = 0000000B            PFN$V_BADPAG   = 00000005            

PAGIO_ERR        00000238 R     03   PCB$V_SWPVBN   = 00000010            PFN$V_BAK      = 00000000            

PAGIO_ERR_DONE   000001C8 R     03   PCB$V_WAKEPEN  = 0000000C            PFN$V_COLLISION= 00000004            

PAGIO_KAST       000001D4 R     03   PCB$V_WALL     = 0000000D            PFN$V_DELCON   = 00000004            

PAGIO_OR_SWAPIO  0000006D R     03   PCB$W_APTCNT     00000034            PFN$V_GBLBAK   = 00000017            

PAGRD_DONE       00000133 R     03   PCB$W_ASTCNT     0000003C            PFN$V_LOC      = 00000000            

PAGRD_ERR        000001EC R     03   PCB$W_BIOCNT     0000003E            PFN$V_MODIFY   = 00000007            

PAGWRT_ERR       00000130 R     03   PCB$W_BIOLM      00000040            PFN$V_PAGTYP   = 00000000            

PAGWRT_ERR1      00000270 R     03   PCB$W_BYTCNT     00000042            PFN$V_PGFLX    = 00000018            

PAGWRT_ERR_DONE  0000012C R     03   PCB$W_BYTLM      00000068            PFN$V_RPTEVT   = 00000006            

PCB$B_ASTACT     0000000C            PCB$W_DIOCNT     00000044            PFN_IO_DONE      000002B7 R     03   

PCB$B_ASTEN      0000000D            PCB$W_DIOLM      00000046            PHD$B_ASTLVL     000000CF            

PCB$B_PRI        0000000B            PCB$W_FILCNT     00000048            PHD$B_DFPFC      00000038            

PCB$B_PRIB       00000033            PCB$W_GPGCNT     00000038            PHD$B_PAGFIL     0000001F            

PCB$B_TYPE       0000000A            PCB$W_GRP        00000022            PHD$B_PGTBPFC    00000039            

PCB$B_WEFC       00000032            PCB$W_MEM        00000020            PHD$C_LENGTH     00000118            

PCB$C_LENGTH     0000007C            PCB$W_MTXCNT     0000000E            PHD$C_PHDPAGCTX= 00000008            

PCB$K_LENGTH     0000007C            PCB$W_PPGCNT     0000003A            PHD$K_LENGTH     00000118            

PCB$L_ASTQBL     00000014            PCB$W_PRCCNT     0000006A            PHD$L_BIOCNT     00000054            

PCB$L_ASTQFL     00000010            PCB$W_SIZE       00000008            PHD$L_CPULIM     00000058            

PCB$L_EFC2P      00000058            PCB$W_STATE      00000030            PHD$L_CPUTIM     0000003C            

PCB$L_EFC3P      0000005C            PCB$W_TMBU       00000036            PHD$L_DIOCNT     00000050            

PCB$L_EFCS       00000050            PCB$W_TQCNT      0000004A            PHD$L_ESP        0000007C            

PCB$L_EFCU       00000054            PFN$AB_STATE     ********   X   03   PHD$L_FREP0VA    00000028            

PCB$L_EFWM       0000004C            PFN$AB_TYPE      ********   X   03   PHD$L_FREP1VA    00000030            

PCB$L_OWNER      0000001C            PFN$AL_BAK       ********   X   03   PHD$L_FREPTECNT  0000002C            

PCB$L_PHD        00000064            PFN$AW_REFCNT    ********   X   03   PHD$L_KSP        00000078            

PCB$L_PHYPCB     00000018            PFN$AW_SWPVBN    ********   X   03   PHD$L_P0BR       000000C8            

PCB$L_PID        00000060            PFN$C_ACTIVE   = 00000007            PHD$L_P0LRASTL   000000CC            

PCB$L_PQB        0000004C            PFN$C_BADPAGLST= 00000002            PHD$L_P1BR       000000D0            

PCB$L_SQBL       00000004            PFN$C_FREPAGLST= 00000000            PHD$L_P1LR       000000D4            

PCB$L_SQFL       00000000            PFN$C_GBLWRT   = 00000003            PHD$L_PAGEFLTS   0000004C            

PCB$L_STS        00000028            PFN$C_GLOBAL   = 00000002            PHD$L_PAGFIL     0000001C            

PCB$L_UIC        00000020            PFN$C_GPGTBL   = 00000005            PHD$L_PC         000000C0            

PCB$L_WSSWP      00000024            PFN$C_MFYPAGLST= 00000001            PHD$L_PCB        00000078            

PCB$L_WTIME      0000002C            PFN$C_PPGTBL   = 00000004            PHD$L_PGFLCNT    00000034            

PCB$T_LNAME      0000006C            PFN$C_PROCESS  = 00000000            PHD$L_PGFLQUOTA  0000005C            

PCB$V_ASTPEN   = 00000011            PFN$C_RDERR    = 00000004            PHD$L_PSL        000000C4            

PCB$V_BATCH    = 0000000E            PFN$C_RDINPROG = 00000006            PHD$L_PSTBASOFF  00000020            

PCB$V_DELPEN   = 00000001            PFN$C_RELPEND  = 00000003            PHD$L_PTWSLELCK  00000064            

PCB$V_FORCPEN  = 00000002            PFN$C_SYSTEM   = 00000001            PHD$L_PTWSLEVAL  00000068            

PCB$V_HIBER    = 00000013            PFN$C_WRTINPROG= 00000005            PHD$L_R0         00000088            

PCB$V_INQUAN   = 00000003            PFN$M_BADPAG   = 00000020            PHD$L_R1         0000008C            

PCB$V_LOGIN    = 00000014            PFN$M_BAK      = 007FFFFF            PHD$L_R10        000000B0            

PCB$V_NETWRK   = 00000015            PFN$M_COLLISION= 00000010            PHD$L_R11        000000B4            

PCB$V_NOACNT   = 0000000F            PFN$M_DELCON   = 00000010            PHD$L_R12        000000B8            

PCB$V_NODELET  = 00000017            PFN$M_GBLBAK   = 00800000            PHD$L_R13        000000BC            

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  23

SYMBOL TABLE                                                                                                                     (9)



PHD$L_R2         00000090            PR$_ESP        = 00000001            PTE$C_SW       = 40000000            

PHD$L_R3         00000094            PR$_ICCS       = 00000018            PTE$C_UOWN     = 01800000            

PHD$L_R4         00000098            PR$_ICR        = 0000001A            PTE$C_UR       = 78000000            

PHD$L_R5         0000009C            PR$_IPL        = 00000012            PTE$C_UREW     = 68000000            

PHD$L_R6         000000A0            PR$_ISP        = 00000004            PTE$C_URKW     = 70000000            

PHD$L_R7         000000A4            PR$_KSP        = 00000000            PTE$C_URSW     = 60000000            

PHD$L_R8         000000A8            PR$_MAPEN      = 00000038            PTE$C_UW       = 20000000            

PHD$L_R9         000000AC            PR$_NICR       = 00000019            PTE$M_CRF      = 00010000            

PHD$L_REFERFLT   00000014            PR$_P0BR       = 00000008            PTE$M_DZRO     = 00020000            

PHD$L_SSP        00000080            PR$_P0LR       = 00000009            PTE$M_GPTX     = 003FFFFF            

PHD$L_USP        00000084            PR$_P1BR       = 0000000A            PTE$M_MODIFY   = 04000000            

PHD$L_WSL        00000118            PR$_P1LR       = 0000000B            PTE$M_OWN      = 01800000            

PHD$M_DALCSTX  = 00000002            PR$_PCBB       = 00000010            PTE$M_PFN      = 001FFFFF            

PHD$M_PFMFLG   = 00000001            PR$_PME        = 0000003D            PTE$M_PGFLVB   = 003FFFFF            

PHD$M_WSPEAKCHK= 00000004            PR$_RXCS       = 00000020            PTE$M_PROT     = 78000000            

PHD$Q_PRIVMSK    00000000            PR$_RXDB       = 00000021            PTE$M_TYP0     = 00400000            

PHD$S_ASTLVL   = 00000008            PR$_SBIER      = 00000034            PTE$M_TYP1     = 04000000            

PHD$S_P0LR     = 00000018            PR$_SBIFS      = 00000030            PTE$M_VALID    = 80000000            

PHD$V_ASTLVL   = 00000018            PR$_SBIMT      = 00000033            PTE$M_WRT      = 00040000            

PHD$V_DALCSTX  = 00000001            PR$_SBIQC      = 00000036            PTE$S_GPTX     = 00000016            

PHD$V_P0LR     = 00000000            PR$_SBIS       = 00000031            PTE$S_OWN      = 00000002            

PHD$V_PFMFLG   = 00000000            PR$_SBISC      = 00000032            PTE$S_PFN      = 00000015            

PHD$V_WSPEAKCHK= 00000002            PR$_SBITA      = 00000035            PTE$S_PGFLVB   = 00000016            

PHD$W_ASTLM      00000044            PR$_SBR        = 0000000C            PTE$S_PROT     = 00000004            

PHD$W_BAK        00000048            PR$_SCBB       = 00000011            PTE$S_STX      = 00000010            

PHD$W_DFWSCNT    0000001A            PR$_SID        = 0000003E            PTE$V_CRF      = 00000010            

PHD$W_EMPTPG     000000D8            PR$_SIRR       = 00000014            PTE$V_DZRO     = 00000011            

PHD$W_EXTDYNWS   00000076            PR$_SISR       = 00000015            PTE$V_GPTX     = 00000000            

PHD$W_FILLM      00000060            PR$_SLR        = 0000000D            PTE$V_MODIFY   = 0000001A            

PHD$W_FLAGS      0000003A            PR$_SSP        = 00000002            PTE$V_OWN      = 00000017            

PHD$W_PHVINDEX   00000046            PR$_TBIA       = 00000039            PTE$V_PFN      = 00000000            

PHD$W_PRCLM      00000042            PR$_TBIS       = 0000003A            PTE$V_PGFLVB   = 00000000            

PHD$W_PST        00000020            PR$_TODR       = 0000001B            PTE$V_PROT     = 0000001B            

PHD$W_PSTBASMAX  0000004A            PR$_TXCS       = 00000022            PTE$V_STX      = 00000000            

PHD$W_PSTFREE    00000026            PR$_TXDB       = 00000023            PTE$V_TYP0     = 00000016            

PHD$W_PSTLAST    00000024            PR$_USP        = 00000003            PTE$V_TYP1     = 0000001A            

PHD$W_PTCNTACT   00000070            PR$_WCSA       = 0000002C            PTE$V_VALID    = 0000001F            

PHD$W_PTCNTLCK   0000006C            PR$_WCSD       = 0000002D            PTE$V_WRT      = 00000012            

PHD$W_PTCNTMAX   00000072            PRI$_IOCOM     = 00000001            QNXTSEG          00000319 R     03   

PHD$W_PTCNTVAL   0000006E            PRI$_NULL      = 00000000            RSN$_ASTWAIT   = 00000001            

PHD$W_QUANT      00000040            PRI$_RESAVL    = 00000002            RSN$_BRKTHRU   = 00000006            

PHD$W_TQLM       00000062            PRI$_TICOM     = 00000004            RSN$_IACLOCK   = 00000007            

PHD$W_WSAUTH     0000000A            PRI$_TIMER     = 00000002            RSN$_MAILBOX   = 00000002            

PHD$W_WSDYN      0000000E            PRI$_TOCOM     = 00000003            RSN$_NPDYNMEM  = 00000003            

PHD$W_WSFLUID    00000074            PRITBL           00000000 R     03   RSN$_PGDYNMEM  = 00000005            

PHD$W_WSLAST     00000012            PTE$C_EOWN     = 00800000            RSN$_PGFILE    = 00000004            

PHD$W_WSLIST     00000008            PTE$C_ER       = 38000000            SCH$GL_PCBVEC    ********   X   03   

PHD$W_WSLOCK     0000000C            PTE$C_ERKW     = 30000000            SCH$GQ_COLPGWQ   ********   X   03   

PHD$W_WSLX       0000004A            PTE$C_EW       = 28000000            SCH$POSTEF       ********   X   03   

PHD$W_WSNEXT     00000010            PTE$C_KOWN     = 00000000            SCH$QAST         ********   X   03   

PHD$W_WSQUOTA    00000018            PTE$C_KR       = 18000000            SCH$RAVAIL       ********   X   03   

PMS$END_RQ       ********   X   03   PTE$C_KW       = 10000000            SCH$RSE          ********   X   03   

PMS$GL_DIRIO     ********   X   03   PTE$C_NA       = 00000000            SCH$WAKE         ********   X   03   

PMS$START_RQ     ********   X   03   PTE$C_SOWN     = 01000000            SS$_ACCVIO       ********   X   03   

PR$_ACCR       = 00000029            PTE$C_SR       = 58000000            TMP...         = 00000000            

PR$_ACCS       = 00000028            PTE$C_SREW     = 48000000            UCB$B_AMOD       00000053            

PR$_ASTLVL     = 00000013            PTE$C_SRKW     = 50000000            UCB$B_CEX        00000077            

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  24

SYMBOL TABLE                                                                                                                     (9)



UCB$B_CM1        0000004A            UCB$L_RQBL       00000004            UCB$V_POWER    = 00000005            

UCB$B_CM2        0000004B            UCB$L_RQFL       00000000            UCB$V_PRMMBX   = 00000000            

UCB$B_DEVCLASS   00000038            UCB$L_SVAPTE     00000068            UCB$V_SEGFLO   = 00000002            

UCB$B_DEVTYPE    00000039            UCB$L_SVPN       00000064            UCB$V_TIM      = 00000000            

UCB$B_DIPL       00000052            UCB$L_TTCHAR     0000003C            UCB$V_TIMOUT   = 00000006            

UCB$B_DX_SCTCNT  000000A6            UCB$L_VCB        00000030            UCB$V_TT_NOTIF = 00000002            

UCB$B_ERTCNT     00000070            UCB$M_BACKP    = 00000020            UCB$V_TT_TIMO  = 00000001            

UCB$B_ERTMAX     00000071            UCB$M_BSY      = 00000100            UCB$V_UNLOAD   = 0000000C            

UCB$B_ESCAPE     0000004B            UCB$M_CANCEL   = 00000008            UCB$V_VALID    = 0000000B            

UCB$B_FEX        00000076            UCB$M_DEADMO   = 00000400            UCB$W_BCNT       0000006E            

UCB$B_FIPL       0000000B            UCB$M_DELMBX   = 00000002            UCB$W_BCR        00000096            

UCB$B_LOCSRV     0000003C            UCB$M_DIAGBUF  = 00000002            UCB$W_BOFF       0000006C            

UCB$B_OFFNDX     00000094            UCB$M_DX_WRITE = 00000008            UCB$W_BUFQUO     00000018            

UCB$B_OFFRTC     00000095            UCB$M_ECC      = 00000001            UCB$W_BYTESTOGO  0000003E            

UCB$B_REMSRV     0000003D            UCB$M_ERLOGIP  = 00000004            UCB$W_CHARGE     0000004A            

UCB$B_SECTORS    0000003C            UCB$M_INT      = 00000002            UCB$W_CYLINDERS  0000003E            

UCB$B_SLAVE      00000074            UCB$M_INTTYPE  = 00000080            UCB$W_DA         0000008C            

UCB$B_SPR        00000075            UCB$M_JOB      = 00000001            UCB$W_DC         0000008E            

UCB$B_STATE      00000052            UCB$M_MOUNTING = 00000200            UCB$W_DEVBUFSIZ  0000003A            

UCB$B_TRACKS     0000003D            UCB$M_NOCNVRT  = 00000004            UCB$W_DEVSTS     0000005A            

UCB$B_TYPE       0000000A            UCB$M_NT_BFROVF= 00000004            UCB$W_DIRSEQ     00000088            

UCB$B_VERTSZ     0000003F            UCB$M_NT_BREAK = 00000020            UCB$W_DSTADDR    00000018            

UCB$C_LENGTH     00000074            UCB$M_NT_NAME  = 00000010            UCB$W_DX_BCR     000000A4            

UCB$C_LOGLNK   = 00000001            UCB$M_ONLINE   = 00000010            UCB$W_EC1        00000090            

UCB$K_LENGTH     00000074            UCB$M_POWER    = 00000020            UCB$W_EC2        00000092            

UCB$L_AMB        00000054            UCB$M_PRMMBX   = 00000001            UCB$W_ERRCNT     00000072            

UCB$L_ASTQBL     00000010            UCB$M_TIM      = 00000001            UCB$W_FUNC       0000007E            

UCB$L_ASTQFL     0000000C            UCB$M_TIMOUT   = 00000040            UCB$W_MB_SEED    FFFFFFFC            

UCB$L_CPID       0000005C            UCB$M_TT_NOTIF = 00000004            UCB$W_MSGCNT     00000016            

UCB$L_CRB        00000020            UCB$M_TT_TIMO  = 00000002            UCB$W_MSGMAX     00000014            

UCB$L_DDB        00000024            UCB$M_UNLOAD   = 00001000            UCB$W_NT_CHAN    0000007C            

UCB$L_DEVCHAR    00000034            UCB$M_VALID    = 00000800            UCB$W_OFFSET     0000008A            

UCB$L_DEVDEPEND  0000003C            UCB$S_LNKPRI   = 00000002            UCB$W_REFC       00000050            

UCB$L_DPC        00000080            UCB$S_LTYPE    = 00000002            UCB$W_SIZE       00000008            

UCB$L_DUETIM     0000005C            UCB$T_PARTNER    0000000C            UCB$W_SRCADDR    0000001A            

UCB$L_DX_BFPNT   0000009C            UCB$V_BACKP    = 00000005            UCB$W_STS        00000058            

UCB$L_DX_BUF     00000098            UCB$V_BSY      = 00000008            UCB$W_UNIT       00000048            

UCB$L_DX_RXDB    000000A0            UCB$V_CANCEL   = 00000003            UCB$W_VPROT      0000001A            

UCB$L_EMB        00000078            UCB$V_DEADMO   = 0000000A            UNLOCK           0000005A R     03   

UCB$L_FIRST      00000014            UCB$V_DELMBX   = 00000001            VA$M_BYTE      = 000001FF            

UCB$L_FPC        0000000C            UCB$V_DIAGBUF  = 00000001            VA$M_P1        = 40000000            

UCB$L_FQBL       00000004            UCB$V_DX_WRITE = 00000003            VA$M_SYSTEM    = 80000000            

UCB$L_FQFL       00000000            UCB$V_ECC      = 00000000            VA$M_VPG       = FFFFFE00            

UCB$L_FR3        00000010            UCB$V_ERLOGIP  = 00000002            VA$M_VPN       = 3FFFFE00            

UCB$L_FR4        00000014            UCB$V_INT      = 00000001            VA$S_BYTE      = 00000009            

UCB$L_IOQBL      00000044            UCB$V_INTTYPE  = 00000007            VA$S_VPG       = 00000017            

UCB$L_IOQFL      00000040            UCB$V_JOB      = 00000000            VA$S_VPN       = 00000015            

UCB$L_IRP        0000004C            UCB$V_LNKPRI   = 00000006            VA$V_BYTE      = 00000000            

UCB$L_LINK       0000002C            UCB$V_LTYPE    = 00000000            VA$V_P1        = 0000001E            

UCB$L_LOGADR     00000064            UCB$V_MOUNTING = 00000009            VA$V_SYSTEM    = 0000001F            

UCB$L_MAXBLOCK   00000084            UCB$V_MSGACK   = 00000004            VA$V_VPG       = 00000009            

UCB$L_MEDIA      0000008C            UCB$V_MSGFLO   = 00000003            VA$V_VPN       = 00000009            

UCB$L_NT_DATSSB  00000074            UCB$V_NOCNVRT  = 00000002            VCB$B_CUR_RVN    0000002F            

UCB$L_NT_INTSSB  00000078            UCB$V_NT_BFROVF= 00000002            VCB$B_EOFDELTA   0000004E            

UCB$L_OPCNT      00000060            UCB$V_NT_BREAK = 00000005            VCB$B_IBMAPSIZE  00000038            

UCB$L_OWNUIC     0000001C            UCB$V_NT_NAME  = 00000004            VCB$B_IBMAPVBN   0000003A            

UCB$L_PID        00000028            UCB$V_ONLINE   = 00000004            VCB$B_LRU_LIM    00000049            

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  25

SYMBOL TABLE                                                                                                                     (9)



VCB$B_QNAMECNT   0000000B            VCB$V_OVRSETID = 00000003            WCB$W_ACON       00000014            

VCB$B_RESFILES   0000004F            VCB$V_PARTFILE = 00000000            WCB$W_COUNT      00000000            

VCB$B_SBMAPSIZE  00000039            VCB$V_STARFILE = 00000008            WCB$W_NMAP       00000016            

VCB$B_SBMAPVBN   0000003B            VCB$V_SYSTEM   = 00000007            WCB$W_P1_COUNT   00000024            

VCB$B_STATUS     0000000B            VCB$V_WAIMOUVOL= 00000002            WCB$W_P2_COUNT   0000002A            

VCB$B_TM         0000002E            VCB$V_WAIREWIND= 00000003            WCB$W_PREVCOUNT  FFFFFFFA            

VCB$B_TYPE       0000000A            VCB$V_WAIUSRLBL= 00000004            WCB$W_REFCNT     0000000E            

VCB$B_WINDOW     00000048            VCB$V_WRITE_IF = 00000000            WCB$W_SIZE       00000008            

VCB$C_COMLEN     00000024            VCB$V_WRITE_SM = 00000001            WQH$C_LENGTH     0000000C            

VCB$C_LENGTH     00000054            VCB$W_CLUSTER    0000003C            WQH$K_LENGTH     0000000C            

VCB$C_MRKLEN     0000000B            VCB$W_CUR_NUM    00000024            WQH$L_WQBL       00000004            

VCB$K_COMLEN     00000024            VCB$W_CUR_SEQ    00000026            WQH$L_WQFL       00000000            

VCB$K_LENGTH     00000054            VCB$W_EXTEND     0000003E            WQH$W_WQCNT      00000008            

VCB$K_MRKLEN     0000000B            VCB$W_FILEPROT   0000004A            WQH$W_WQSTATE    0000000A            

VCB$L_AQB        00000010            VCB$W_MCOUNT     0000004C            

VCB$L_BLOCKBL    00000004            VCB$W_MODE       0000002C            

VCB$L_BLOCKFL    00000000            VCB$W_RECORDSZ   00000050            

VCB$L_CUR_FID    00000024            VCB$W_RVN        0000000E            

VCB$L_FCBBL      00000004            VCB$W_SIZE       00000008            

VCB$L_FCBFL      00000000            VCB$W_START_NUM  00000028            

VCB$L_FREE       00000040            VCB$W_START_SEQ  0000002A            

VCB$L_HOME2LBN   00000028            VCB$W_TRANS      0000000C            

VCB$L_HOMELBN    00000024            VIRTUAL          000002E8 R     03   

VCB$L_IBMAPLBN   00000030            WCB$B_ACCESS     0000000B            

VCB$L_IXHDR2LBN  0000002C            WCB$B_TYPE       0000000A            

VCB$L_MAXFILES   00000044            WCB$C_LENGTH     00000024            

VCB$L_MVL        00000034            WCB$C_MAP        00000024            

VCB$L_RVT        00000020            WCB$K_LENGTH     00000024            

VCB$L_SBMAPLBN   00000034            WCB$K_MAP        00000024            

VCB$L_START_FID  00000028            WCB$L_FCB        00000018            

VCB$L_ST_RECORD  00000030            WCB$L_LBN        00000002            

VCB$L_USRLBLAST  00000044            WCB$L_ORGUCB     00000010            

VCB$L_VPBL       00000040            WCB$L_P1_LBN     00000026            

VCB$L_VPFL       0000003C            WCB$L_P2_LBN     0000002C            

VCB$L_WCB        00000038            WCB$L_PID        0000000C            

VCB$M_CANCELIO = 00000020            WCB$L_PREVLBN    FFFFFFFC            

VCB$M_MUSTCLOSE= 00000040            WCB$L_RVT        0000001C            

VCB$M_NOWRITE  = 00000080            WCB$L_STVBN      00000020            

VCB$M_WAIMOUVOL= 00000004            WCB$L_WLBL       00000004            

VCB$M_WAIREWIND= 00000008            WCB$L_WLFL       00000000            

VCB$M_WAIUSRLBL= 00000010            WCB$M_NOTFCP   = 00000004            

VCB$T_QNAME      0000000C            WCB$M_READ     = 00000001            

VCB$T_VOLNAME    00000014            WCB$M_SHRWCB   = 00000008            

VCB$V_CANCELIO = 00000005            WCB$M_WRITE    = 00000002            

VCB$V_EBCDIC   = 00000005            WCB$V_DLOCK    = 00000001            

VCB$V_EXTFID   = 00000005            WCB$V_NOREAD   = 0000000A            

VCB$V_GROUP    = 00000006            WCB$V_NOTFCP   = 00000002            

VCB$V_HOMBLKBAD= 00000002            WCB$V_NOTRUNC  = 0000000B            

VCB$V_IDXHDRBAD= 00000003            WCB$V_NOWRITE  = 00000000            

VCB$V_INTCHG   = 00000004            WCB$V_READ     = 00000000            

VCB$V_LOGICEOVS= 00000001            WCB$V_READCK   = 00000009            

VCB$V_MUSTCLOSE= 00000006            WCB$V_SEQONLY  = 00000006            

VCB$V_NOALLOC  = 00000004            WCB$V_SHRWCB   = 00000003            

VCB$V_NOWRITE  = 00000007            WCB$V_SPOOL    = 00000004            

VCB$V_OVRACC   = 00000001            WCB$V_WRITE    = 00000001            

VCB$V_OVREXP   = 00000000            WCB$V_WRITEAC  = 00000008            

VCB$V_OVRLBL   = 00000002            WCB$V_WRITECK  = 00000005            

IOCIOPOST       - I/O COMPLETION POSTING                         21-AUG-1978 19:51:53   VAX-11 MACRO X0.3-11               Page  26

PROGRAM SECTION SYNOPSIS                                                                                                         (9)







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  

$AEXENONPAGED    00000521      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT LONG  





THERE WERE NO ERRORS OR WARNINGS.

4248. BYTES LEFT IN FREE MEMORY POOL.

2328. BYTES OF RECLAIMED MEMORY.

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

20 MLB DIR RDS - 1327 GETS TO DEFINE 36 MACROS. 94 INTER. FILE WRITES. 

