MPWIND          - MAP BLOCKS THROUGH FILE WINDOW                 21-AUG-1978 22:47:50   VAX-11 MACRO X0.3-11               Page   1

X0001                                                                                                                            (1)



                                     0000     1 	.TITLE	MPWIND - MAP BLOCKS THROUGH FILE WINDOW

                                     0000     2 	.IDENT	"X0001"

                                     0000     3 

                                     0000     4 ;

                                     0000     5 ; COPYRIGHT (C) 1976

                                     0000     6 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

                                     0000     7 ;

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

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

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

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

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

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

                                     0000    14 ; REMAIN IN DEC.

                                     0000    15 ;

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

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

                                     0000    18 ; CORPORATION.

                                     0000    19 ;

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

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

                                     0000    22 

                                     0000    23 ;++

                                     0000    24 ;

                                     0000    25 ; FACILITY:  F11ACP STRUCTURE LEVEL 1

                                     0000    26 ;

                                     0000    27 ; ABSTRACT:

                                     0000    28 ;

                                     0000    29 ;	THIS ROUTINE MAPS THE GIVEN VIRTUAL BLOCK(S) INTO THE

                                     0000    30 ;	CORRESPONDING LOGICAL BLOCKS.

                                     0000    31 ;

                                     0000    32 ; ENVIRONMENT:

                                     0000    33 ;

                                     0000    34 ;	STARLET OPERATING SYSTEN, INCLUDING PRIVILEGED SYSTEM SERVICES

                                     0000    35 ;	AND INTERNAL EXEC ROUTINES. THIS ROUTINE MUST BE EXECUTED IN

                                     0000    36 ;	KERNEL MODE.

                                     0000    37 ;

                                     0000    38 ; AUTHOR:  ANDREW C. GOLDSTEIN, CREATION DATE:  3-MAR-1977  11:15

                                     0000    39 ;

                                     0000    40 ; MODIFIED BY:

                                     0000    41 ;

                                     0000    42 ;  , VERSION  ,

                                     0000    43 ; 01	- 

                                     0000    44 ;--

                                     0000    45 

                                     0000    46 ;

                                     0000    47 ; INCLUDE FILES:

                                     0000    48 ;

                                     0000    49 ;	.INCLUDE	FCPDEF.MAR

                                     0000    50 

                                     0000    51 ;

                                     0000    52 ; EQUATED SYMBOLS:

                                     0000    53 ;

                                     0000    54 ; AP OFFSETS

                                     0000    55 ;

                           00000004  0000    56 VBN	= 4				; DESIRED VBN

                           00000008  0000    57 WINDOW	= 8				; WINDOW ADDRESS

MPWIND          - MAP BLOCKS THROUGH FILE WINDOW                 21-AUG-1978 22:47:50   VAX-11 MACRO X0.3-11               Page   2

X0001                                                                                                                            (1)



                           0000000C  0000    58 COUNT	= 12				; BLOCK COUNT TO MAP

                           00000010  0000    59 UNMAPPED= 16				; ADDRESS OF LONGWORD TO STORE

                                     0000    60 					; COUNT OF UNMAPPED BLOCKS

                                     0000    61 

                                     0000    62 

                                     0000    63 	$WCBDEF				; DEFINE WINDOW STRUCTURE

MPWIND          - MAP BLOCKS THROUGH FILE WINDOW                 21-AUG-1978 22:47:50   VAX-11 MACRO X0.3-11               Page   3

X0001                                                                                                                            (2)



                                     0000    65 ;++

                                     0000    66 ;

                                     0000    67 ; FUNCTIONAL DESCRIPTION:

                                     0000    68 ;

                                     0000    69 ;	THIS ROUTINE MAPS THE GIVEN VIRTUAL BLOCK(S) INTO THE

                                     0000    70 ;	CORRESPONDING LOGICAL BLOCKS.

                                     0000    71 ;

                                     0000    72 ; CALLING SEQUENCE:

                                     0000    73 ;	CALL	MAP_WINDOW (ARG1, ARG2, ARG3, ARG4)

                                     0000    74 ;

                                     0000    75 ; INPUT PARAMETERS:

                                     0000    76 ;	ARG1: DESIRED VBN

                                     0000    77 ;	ARG2: ADDRESS OF WINDOW TO USE

                                     0000    78 ;	ARG3: NUMBER OF BLOCKS TO MAP

                                     0000    79 ;

                                     0000    80 ; IMPLICIT INPUTS:

                                     0000    81 ;	CURRENT_UCB CONTAINS UCB ADDRESS OF UNIT IN PROCESS

                                     0000    82 ;

                                     0000    83 ; OUTPUT PARAMETERS:

                                     0000    84 ;	ARG4: ADDRESS OF LONGWORD TO RECEIVE UNMAPPED COUNT

                                     0000    85 ;

                                     0000    86 ; IMPLICIT OUTPUTS:

                                     0000    87 ;	NONE

                                     0000    88 ;

                                     0000    89 ; ROUTINE VALUE:

                                     0000    90 ;	LBN IF ANY BLOCKS MAPPED

                                     0000    91 ;	-1 IF NONE MAPPED

                                     0000    92 ;

                                     0000    93 ; SIDE EFFECTS:

                                     0000    94 ;	NONE

                                     0000    95 ;

                                     0000    96 ;--

                                     0000    97 

                                 00000000    98 	.PSECT	$CODE$,NOWRT,LONG

                                     0000    99 

                                     0000   100 MAP_WINDOW::

                               003C  0000   101 	.WORD	^M<R2,R3,R4,R5>		; SAVE REGISTERS

            52         08 AC     D0  0002   102 	MOVL	WINDOW(AP),R2		; GET WINDOW ADDRESS

            55       0000'CF     D0  0006   103 	MOVL	W^CURRENT_UCB,R5	; GET UCB ADDRESS FOR MAPPER

                                     000B   104 

            50         04 AC     D0  000B   105 10$:	MOVL	VBN(AP),R0		; GET VBN

         0C AC            09     78  000F   106 	ASHL	#9,COUNT(AP),R1		; GET EXPLICIT COUNT

                          51         0013       

                 00000000'9F     16  0014   107 20$:	JSB	@#IOC$MAPVBLK		; CALL SYSTEM MAPPING ROUTINE

            0A            50     E9  001A   108 	BLBC	R0,40$			; BRANCH IF NO MAP

                                     001D   109 ;

                                     001D   110 ; SUCCESSFUL MAP - RETURN LBN AND COUNT OF UNMAPPED BLOCKS IF WANTED

                                     001D   111 ;

            50            51     D0  001D   112 	MOVL	R1,R0			; LBN TO ROUTINE VALUE

            52         F7 8F     78  0020   113 	ASHL	#-9,R2,@UNMAPPED(AP)	; STORE RESULT

                       10 BC         0024       

                                 04  0026   114 30$:	RET				; AND RETURN

                                     0027   115 ;

                                     0027   116 ; WE GET HERE IF THE MAP FAILS COMPLETELY. RETURN -1 AS VALUE.

                                     0027   117 ;

         10 BC         0C AC     D0  0027   118 40$:	MOVL	COUNT(AP),@UNMAPPED(AP)	; RETURN ENTIRE COUNT AS UNMAPPED

            50            01     CE  002C   119 	MNEGL	#1,R0			; VALUE = -1

MPWIND          - MAP BLOCKS THROUGH FILE WINDOW                 21-AUG-1978 22:47:50   VAX-11 MACRO X0.3-11               Page   4

X0001                                                                                                                            (2)



                                 04  002F   120 	RET

                                     0030   121 

                                     0030   122 

                                     0030   123 

                                     0030   124 	.END

MPWIND          - MAP BLOCKS THROUGH FILE WINDOW                 21-AUG-1978 22:47:50   VAX-11 MACRO X0.3-11               Page   5

SYMBOL TABLE                                                                                                                     (2)



AQB_TYPE       = 00000005            WCB$W_REFCNT     0000000E            

BIT...         = 0000000C            WCB$W_SIZE       00000008            

BITMAP_TYPE    = 00000001            WCB_TYPE       = 00000001            

COUNT          = 0000000C            WINDOW         = 00000008            

CURRENT_UCB      ********   X   03   

DIRECTORY_TYPE = 00000002            

FCB_TYPE       = 00000000            

GBL...         = 00000000            

HEADER_TYPE    = 00000000            

INDEX_TYPE     = 00000003            

IOC$MAPVBLK      ********   X   03   

MAP_WINDOW       00000000 RG    03   

MVL_TYPE       = 00000004            

RVT_TYPE       = 00000003            

UNMAPPED       = 00000010            

VBN            = 00000004            

VCB_TYPE       = 00000002            

WCB$B_ACCESS     0000000B            

WCB$B_TYPE       0000000A            

WCB$C_LENGTH     00000024            

WCB$C_MAP        00000024            

WCB$K_LENGTH     00000024            

WCB$K_MAP        00000024            

WCB$L_FCB        00000018            

WCB$L_LBN        00000002            

WCB$L_ORGUCB     00000010            

WCB$L_P1_LBN     00000026            

WCB$L_P2_LBN     0000002C            

WCB$L_PID        0000000C            

WCB$L_PREVLBN    FFFFFFFC            

WCB$L_RVT        0000001C            

WCB$L_STVBN      00000020            

WCB$L_WLBL       00000004            

WCB$L_WLFL       00000000            

WCB$M_NOTFCP   = 00000004            

WCB$M_READ     = 00000001            

WCB$M_SHRWCB   = 00000008            

WCB$M_WRITE    = 00000002            

WCB$V_DLOCK    = 00000001            

WCB$V_NOREAD   = 0000000A            

WCB$V_NOTFCP   = 00000002            

WCB$V_NOTRUNC  = 0000000B            

WCB$V_NOWRITE  = 00000000            

WCB$V_READ     = 00000000            

WCB$V_READCK   = 00000009            

WCB$V_SEQONLY  = 00000006            

WCB$V_SHRWCB   = 00000003            

WCB$V_SPOOL    = 00000004            

WCB$V_WRITE    = 00000001            

WCB$V_WRITEAC  = 00000008            

WCB$V_WRITECK  = 00000005            

WCB$W_ACON       00000014            

WCB$W_COUNT      00000000            

WCB$W_NMAP       00000016            

WCB$W_P1_COUNT   00000024            

WCB$W_P2_COUNT   0000002A            

WCB$W_PREVCOUNT  FFFFFFFA            

MPWIND          - MAP BLOCKS THROUGH FILE WINDOW                 21-AUG-1978 22:47:50   VAX-11 MACRO X0.3-11               Page   6

PROGRAM SECTION SYNOPSIS                                                                                                         (2)







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$            FFFFFFFC      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

$CODE$           00000030      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD  NOWRT LONG  





THERE WERE NO ERRORS OR WARNINGS.

24570. BYTES LEFT IN FREE MEMORY POOL.

1034. BYTES OF RECLAIMED MEMORY.

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

2 MLB DIR RDS - 144 GETS TO DEFINE 8 MACROS. 7 INTER. FILE WRITES. 

