Google
 

Trailing-Edge - PDP-10 Archives - tops10_tools_bb-fp64b-sb - 10,7/rsx20f/rsxtol/init.lst
There are 3 other files named init.lst in the archive. Click here to see a list.
CDT2B - CONVERT FROM DECIMAL TO	MACRO M1113  14-APR-81 11:15  PAGE 3


      1						.TITLE	CDT2B - CONVERT FROM DECIMAL TO TWO BINARY WORDS
      2						.IDENT	/01/
      3					;
      4					;
      5					;                             COPYRIGHT (C) 1974, 1978 BY
      6					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      7					;
      8					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      9					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     10					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     11					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     12					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     13					;
     14					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     15					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     16					;       CORPORATION.
     17					;
     18					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     19					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     20					;
     21
     22					;
     23					; VERSION:	V001A
     24					; BY:		STEVE HORT
     25					; DATE:		03/26/74
     26					;
     27						.MCALL	RETURN
CDT2B - CONVERT FROM DECIMAL TO	MACRO M1113  14-APR-81 11:15  PAGE 4


     29					;+
     30					; *** - .CDT2B - CONVERT A DECIMAL NUMBER TO TWO BINARY WORDS.
     31					;		 THIS SUBROUTINE CONVERTS AN ASCII DECIMAL NUMBER STRING
     32					;		 TO A DOUBLE LENGTH BINARY NUMBER.
     33					;
     34					; INPUT:
     35					;	R0 - ADDRESS OF NEXT CHARACTER IN BUFFER (DECIMAL DIGIT)
     36					;	R1 - ADDRESS OF TWO WORD FIELD TO HOLD CONVERTED NUMBER
     37					;		WORD 1 - LOW ORDER 16 BITS
     38					;		WORD 2 - HIGH ORDER 16 BITS
     39					;
     40					; OUTPUT:
     41					;	R0 - UPDATED BUFFER POINTER (NEXT CHARACTER + 1)
     42					;	R1 - REMAINS UNCHANGED
     43					;	R2 - NEXT CHARACTER IN STRING
     44					;
     45					;	CC-C
     46					;	     CLEAR - 16 BIT NUMBER ONLY
     47					;	     SET   - 32 BIT NUMBER
     48					;
     49					;-
     50
     51	000000	005011 			.CDT2B::CLR	(R1)		; ZERO LOW ORDER 16 BITS
     52	000002	005061 	000002 			CLR	2(R1)		; ZERO HIGH ORDER 16 BITS
     53	000006	112002 			10$:	MOVB	(R0)+,R2	; YES, FETCH IT NOW
     54	000010	122702 	000060 			CMPB	#'0,R2		; CHECK FOR POSSIBLE DECIMAL DIGIT
     55	000014	101025 				BHI	20$		; NOT A DECIMAL CHARACTER
     56	000016	122702 	000071 			CMPB	#'9,R2		; LAST CHANCE TO BE IN RANGE
     57	000022	103422 				BLO	20$		; DEFINITELY NOT DECIMAL
     58	000024	162702 	000060 			SUB	#60,R2		; CONVERT TO A BINARY DIGIT
     59	000030	006321 				ASL	(R1)+		; MULTIPLY CURRENT BINARY NUMBER BY
     60	000032	006111 				ROL	(R1)		; USE FULL 32 BIT ACCURACY
     61	000034	011146 				MOV	(R1),-(SP)	; SAVE HIGH ORDER BITS
     62	000036	014146 				MOV	-(R1),-(SP)	; SAVE LOW ORDER BITS
     63	000040	006321 				ASL	(R1)+		; MULTIPLY AGAIN BY
     64	000042	006111 				ROL	(R1)		; KEEP THOSE BITS MOVING
     65	000044	006341 				ASL	-(R1)		; MAKE TOTAL MULTIPLICATION BY 8
     66	000046	006161 	000002 			ROL	2(R1)		; NOW HAVE (NEW NUMBER) = (OLD NUMBER)*8
     67	000052	062621 				ADD	(SP)+,(R1)+	; ADD BACK (OLD NUMBER)*2
     68	000054	005511 				ADC	(R1)		; ADD ANY OVERFLOW TO HIGH ORDER
     69	000056	062611 				ADD	(SP)+,(R1)	; NOW HAVE (NEW NUMBER) = (OLD NUMBER)*10
     70	000060	060241 				ADD	R2,-(R1)	; ADD THIS DECIMAL DIGIT TO MAKE NEW TOTAL
     71	000062	005561 	000002 			ADC	2(R1)		; MAKE SURE OVERFLOW IS CONSIDERED
     72	000066	000747 				BR	10$		; GO GET NEXT DIGIT
     73	000070	005761 	000002 		20$:	TST	2(R1)		; MORE THAN 16 BITS IN CONVERTED NUMBER?
     74	000074	001401 				BEQ	30$		; YES
     75	000076	000261 				SEC			; NO, SO SET THE 32-BIT FLAG
     76	000100				30$:	RETURN			; RETURN TO CALLER
     77					;
     78		000001 				.END
CDT2B - CONVERT FROM DECIMAL TO	MACRO M1113  14-APR-81 11:15  PAGE 4-1
SYMBOL TABLE

E$$MSG= 000001   	F$$LVL= 000001   	R$$10F= 000001   	R$$20F= 000001   	.CDT2B  000000RG
E$$TRP= 000001   	M$$HDR= 000001   	R$$11D= 000001

. ABS.	000000	   000
      	000102	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  146 WORDS  ( 1 PAGES)
DYNAMIC MEMORY:  2518 WORDS  ( 9 PAGES)
ELAPSED TIME:  00:00:03
[53,10]CDT2B,[53,20]CDT2B/-SP/CR=[53,30]RSXDC,CDT2B
CDT2B      CREATED BY  MACRO  ON 14-APR-81 AT 11:15	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

E$$MSG	= 000001	#1-33      
E$$TRP	= 000001	#1-32      
F$$LVL	= 000001	#1-28      
M$$HDR	= 000001	#1-34      
R$$10F	= 000001	#1-30      
R$$11D	= 000001	#1-29      
R$$20F	= 000001	#1-31      
S$$YDF	= ******	 1-1        1-37      
.CDT2B	  000000 RG	#4-51      
CDT2B      CREATED BY  MACRO  ON 14-APR-81 AT 11:15	PAGE 2

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

RETURN		#3-27       4-76      
RSXDC	MACRO M1113  14-APR-81 11:15  PAGE 3


      1					;                             COPYRIGHT (C) 1975, 1978 BY
      2					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      3					;
      4					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      5					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
      6					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
      7					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
      8					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
      9					;
     10					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     11					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     12					;       CORPORATION.
     13					;
     14					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     15
     16					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     17
     18
     19						.MCALL RETURN
     20	000000	000241 			.CKPRV::	CLC
     21	000002					RETURN
     22		000001 				.END
RSXDC	MACRO M1113  14-APR-81 11:15  PAGE 3-1
SYMBOL TABLE

E$$MSG= 000001   	F$$LVL= 000001   	R$$10F= 000001   	R$$20F= 000001   	.CKPRV  000000RG
E$$TRP= 000001   	M$$HDR= 000001   	R$$11D= 000001

. ABS.	000000	   000
      	000004	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  126 WORDS  ( 1 PAGES)
DYNAMIC MEMORY:  2518 WORDS  ( 9 PAGES)
ELAPSED TIME:  00:00:03
[53,10]CKPRV,[53,20]CKPRV/-SP/CR=[53,30]RSXDC,CKPRV
CKPRV      CREATED BY  MACRO  ON 14-APR-81 AT 11:15	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

E$$MSG	= 000001	#1-33      
E$$TRP	= 000001	#1-32      
F$$LVL	= 000001	#1-28      
M$$HDR	= 000001	#1-34      
R$$10F	= 000001	#1-30      
R$$11D	= 000001	#1-29      
R$$20F	= 000001	#1-31      
S$$YDF	= ******	 1-1        1-37      
.CKPRV	  000000 RG	#3-20      
CKPRV      CREATED BY  MACRO  ON 14-APR-81 AT 11:15	PAGE 2

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

RETURN		#3-19       3-21      
COT2B - CONVERT FROM OCTAL TO T	MACRO M1113  14-APR-81 11:15  PAGE 3


      1						.TITLE	COT2B - CONVERT FROM OCTAL TO TWO BINARY WORDS
      2						.IDENT	"01"
      3					;
      4					;                             COPYRIGHT (C) 1973, 1978 BY
      5					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      6					;
      7					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      8					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
      9					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     10					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     11					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     12					;
     13					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     14					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     15					;       CORPORATION.
     16					;
     17					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     18					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     19					;
     20					;
     21
     22					;
     23					; VERSION: 	01
     24					; BY:		H.LEV
     25					; DATE:		09/19/73
     26					;
     27						.MCALL	RETURN
     28
     29					;+
     30					; *** - .COT2B  - CONVERT OCTAL NUMBER TO TWO BINARY WORDS
     31					;		THIS SUBROUTINE CONVERTS AN ASCII OCTAL
     32					;		NUMBER TO BINARY.  IT ACCEPTS ONLY
     33					;		OCTAL DIGITS.
     34					;
     35					; INPUT:
     36					;	R0 - ADDRESS OF NEXT DIGIT IN BUFFER FOR NUMBER
     37					;	R1 - ADDRESS OF TWO WORD FIELD TO PUT CONVERTED NUMBER IN
     38					;		WORD 1 - LOW 16 BITS
     39					;		WORD 2 - HIGH 16 BITS
     40					;
     41					; OUTPUT:
     42					;	R0 - UPDATED BUFFER POINTER
     43					;	R1 - UNCHANGED
     44					;	R2 - TERMINATING CHARACTER
     45					;
     46					;	CARRY BIT
     47					;		CLEAR - ONLY 16 BIT NUMBER
     48					;		SET - 32 BIT NUMBER
     49					;
     50					;-
     51	000000	005011 			.COT2B::CLR	(R1)		; ZERO OUT LOW 16 BITS
     52	000002	005061 	000002 			CLR	2(R1)		; ZERO OUT HIGH 16 BITS
     53	000006	112002 			10$:	MOVB	(R0)+,R2	; GET NEXT CHARACTER
     54	000010	120227 	000060 			CMPB	R2,#'0		; IS IT <0 ?
     55	000014	002420 				BLT	30$		; YES
     56	000016	120227 	000067 			CMPB	R2,#'7		; IS IT >7 ?
     57	000022	003015 				BGT	30$		; YES
COT2B - CONVERT FROM OCTAL TO T	MACRO M1113  14-APR-81 11:15  PAGE 3-1


     58	000024	042702 	177770 			BIC	#177770,R2	; STRIP OF ASCII BITS
     59	000030	012746 	000003 			MOV	#3,-(SP)	; SET SHIFT COUNT
     60	000034	000241 			20$:	CLC			; ZERO CARRY BIT
     61	000036	006111 				ROL	(R1)		; ROTATE BIT 15
     62	000040	006161 	000002 			ROL	2(R1)		; INTO BIT 16
     63	000044	005316 				DEC	(SP)		; DONE ?
     64	000046	001372 				BNE	20$		; NO, LOOP FOR THREE BITS
     65	000050	005726 				TST	(SP)+		; POP OFF COUNTER
     66	000052	050211 				BIS	R2,(R1)		; PUT IT IN
     67	000054	000754 				BR	10$		; GET NEXT DIGIT
     68	000056	005761 	000002 		30$:	TST	2(R1)		; IS THERE MORE THAN 16 BITS ?
     69	000062	001401 				BEQ	50$		; NO
     70	000064	000261 				SEC			; YES, SET 32 BIT FLAG
     71	000066				50$:	RETURN			; RETURN TO CALLER
     72
     73		000001 				.END
COT2B - CONVERT FROM OCTAL TO T	MACRO M1113  14-APR-81 11:15  PAGE 3-2
SYMBOL TABLE

E$$MSG= 000001   	F$$LVL= 000001   	R$$10F= 000001   	R$$20F= 000001   	.COT2B  000000RG
E$$TRP= 000001   	M$$HDR= 000001   	R$$11D= 000001

. ABS.	000000	   000
      	000070	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  151 WORDS  ( 1 PAGES)
DYNAMIC MEMORY:  2518 WORDS  ( 9 PAGES)
ELAPSED TIME:  00:00:04
[53,10]COT2B,[53,20]COT2B/-SP/CR=[53,30]RSXDC,COT2B
COT2B      CREATED BY  MACRO  ON 14-APR-81 AT 11:15	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

E$$MSG	= 000001	#1-33      
E$$TRP	= 000001	#1-32      
F$$LVL	= 000001	#1-28      
M$$HDR	= 000001	#1-34      
R$$10F	= 000001	#1-30      
R$$11D	= 000001	#1-29      
R$$20F	= 000001	#1-31      
S$$YDF	= ******	 1-1        1-37      
.COT2B	  000000 RG	#3-51      
COT2B      CREATED BY  MACRO  ON 14-APR-81 AT 11:15	PAGE 2

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

RETURN		#3-27       3-71      
GTCML - GET COMMAND LINE WITH C	MACRO M1113  14-APR-81 11:15  PAGE 3


      1					.TITLE	GTCML - GET COMMAND LINE WITH CONTINUATIONS
      2
      3					.IDENT	"V0004"
      4
      5					;                             COPYRIGHT (C) 1975, 1978 BY
      6					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      7					;
      8					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      9					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     10					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     11					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     12					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     13					;
     14					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     15					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     16					;       CORPORATION.
     17					;
     18					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     19					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     20					;
     21					;
     22					; ANDREW C. GOLDSTEIN  23 JAN 75  19:57
     23
     24					;
     25					; THIS ROUTINE ACCEPTS A COMMAND LINE WITH CONTINUATIONS FOR THE FILES
     26					; MCR FUNCTIONS. IT FIRST GETS THE MCR COMMAND LINE. IF THERE IS NONE,
     27					; OR IF CONTINUATIONS ARE CALLED FOR, IT PROMPTS AND READS INPUT FROM
     28					; THE TASK'S LUN #1, WHICH IS HOPEFULLY ASSIGNED TO TI. ALL ERROR
     29					; HANDLING IS DONE INTERNALLY.
     30					;
     31
     32		000001 			LUN = 1				; LUN FOR CONSOLE I/O
     33		000001 			EFN = 1				; LIKEWISE EFN
     34
     35		000015 			CR  = 15			; CARRIAGE RETURN CHAR
     36
     37						.MCALL	QIOW$,QIOW$S,GMCR$,DIR$,CALL,RETURN,EXIT$S
     38					;
     39					; BUFFER TO BUILD COMMAND LINE
     40					;
     41		000376 			BUFSIZ = 256.-2.
     42
     43	000000				BUFFER:	GMCR$
     44	000122					.BLKB	BUFSIZ+BUFFER+G.MCRB-.
     45					;
     46					; QIO TO OUTPUT PROMPT TO TERMINAL
     47					;
     48	000400				PROMPT:	QIOW$	IO.WVB,LUN,EFN,,IOSTAT,,<,,<'$>>
     49
     50	000422				IOSTAT:	.BLKW	2		; I/O STATUS BLOCK
     51					;
     52					; ERROR MESSAGES FOR VARIOUS FORMS OF LOSSAGE
     53					;
     54	000426	   015 	   130 	   130 	IOERRM:	.ASCII	<CR>"XXX -- COMMAND I/O ERROR"
	000431	   130 	   040 	   055
	000434	   055 	   040 	   103
	000437	   117 	   115 	   115
GTCML - GET COMMAND LINE WITH C	MACRO M1113  14-APR-81 11:15  PAGE 3-1


	000442	   101 	   116 	   104
	000445	   040 	   111 	   057
	000450	   117 	   040 	   105
	000453	   122 	   122 	   117
	000456	   122
     55		000031 			IOERRL = .-IOERRM
     56
     57	000457	   015 	   130 	   130 	OVERM:	.ASCII	<CR>"XXX -- COMMAND TOO LONG"
	000462	   130 	   040 	   055
	000465	   055 	   040 	   103
	000470	   117 	   115 	   115
	000473	   101 	   116 	   104
	000476	   040 	   124 	   117
	000501	   117 	   040 	   114
	000504	   117 	   116 	   107
     58		000030 			OVERL = .-OVERM
     59
     60						.EVEN
GTCML - GET COMMAND LINE WITH C	MACRO M1113  14-APR-81 11:15  PAGE 4


     62					;+
     63					;
     64					; *** - .GTCML - GET COMMAND LINE WITH CONTINUATION
     65					;
     66					; THIS ROUTINE OBTAINS A COMMAND LINE FROM THE MCR COMMAND LINE
     67					; BUFFER OR FROM THE CONSOLE TERMINAL. A TRAILING HYPHEN (-)
     68					; CAUSES CONTINUATION: THE ROUTINE PROMPTS AND ACCEPTS ANOTHER
     69					; LINE FROM THE CONSOLE TERMINAL.
     70					;
     71					; INPUTS:
     72					;
     73					;	R3 = LENGTH OF PROMPT STRING
     74					;	R4 = ADDRESS OF PROMPT STRING
     75					;
     76					; OUTPUTS:
     77					;
     78					;	R3 = LENGTH OF COMMAND STRING
     79					;	R4 = ADDRESS OF COMMAND STRING
     80					;	R0-R2 ARE GARBAGED
     81					;
     82					;-
     83
     84						.ENABL	LSB
     85
     86	000510				.GTCML::
     87	000510	010467 	177700 			MOV	R4,PROMPT+Q.IOPL ; SET UP PROMPT STRING
     88	000514	010367 	177676 			MOV	R3,PROMPT+Q.IOPL+2 ; IN QIO DPB
     89	000520	012701 	000376 			MOV	#BUFSIZ,R1	; AND MAXIMUM BYTE COUNT
     90	000524					DIR$	#BUFFER		; TRY FOR MCR COMMAND BUFFER
     91	000532	103421 				BCS	30$		; BRANCH IF NONE
     92	000534	013703 	000000G			MOV	@#$DSW,R3	; PICK UP THE BYTE COUNT
     93	000540	001416 				BEQ	30$		; BRANCH IF NULL
     94	000542	160301 				SUB	R3,R1		; COMPUTE SPACE LEFT
     95	000544	012704 	000002'			MOV	#BUFFER+G.MCRB,R4 ; POINT TO START OF ACTUAL COMMAND LINE
     96	000550				10$:	CALL	SPTEST		; SEARCH FOR THE FIRST SPACE
     97	000554	103003 				BCC	20$
     98	000556	005204 				INC	R4		; TRY NEXT CHARACTER
     99	000560	077305 				SOB	R3,10$
    100	000562	000405 				BR	30$		; NO SPACES - THROW COMMAND LINE AWAY
    101
    102	000564				20$:	CALL	SPTEST		; NOW LOOK FOR FIRST REAL COMMAND CHAR
    103	000570	103411 				BCS	40$
    104	000572	005204 				INC	R4		; TRY THE NEXT
    105	000574	077305 				SOB	R3,20$
    106					;
    107					; THERE IS NO MCR COMMAND LINE, EITHER BECAUSE THE DIRECTIVE FAILED
    108					; OR THERE WAS NO USEFUL INFORMATION IN IT. SET UP TO GET COMMAND
    109					; FROM THE TERMINAL.
    110					;
    111	000576	012704 	000002'		30$:	MOV	#BUFFER+G.MCRB,R4 ; RE-INIT POINTER
    112	000602	005003 				CLR	R3
    113	000604	012701 	000376 			MOV	#BUFSIZ,R1	; R1 = SPACE AVAILABLE
    114	000610	010400 				MOV	R4,R0		; R0 = ADDRESS FOR INPUT
    115	000612	000411 				BR	60$
    116					;
    117					; WE HAVE A GOOD MCR COMMAND LINE. UPDATE VARIOUS REGISTERS.
    118					;
GTCML - GET COMMAND LINE WITH C	MACRO M1113  14-APR-81 11:15  PAGE 4-1


    119	000614	010400 			40$:	MOV	R4,R0		; POINT TO END OF DATA
    120	000616	060300 				ADD	R3,R0
    121					;
    122					; WE HAVE A COMMAND LINE FROM SOMEWHERE. LOOK FOR CONTINUATION.
    123					;
    124	000620	126027 	177777 	000055 	50$:	CMPB	-1(R0),#'-	; CONTINUATION CHARACTER IS A "-"
    125	000626	001051 				BNE	EOL		; NO - ALL DONE
    126	000630	005300 				DEC	R0		; YES - THROW IT AWAY
    127	000632	005201 				INC	R1
    128	000634	005303 				DEC	R3		; ADJUST THE CHARACTER COUNT
    129					;
    130					; READ AN INPUT LINE FROM THE TERMINAL.
    131					;
    132	000636				60$:	DIR$	#PROMPT		; OUTPUT THE PROMPT STRING
    133	000644	103444 				BCS	IOERR		; CHECK FOR DIRECTIVE ERROR
    134	000646	105767 	177550 			TSTB	IOSTAT		; AND FOR I/O ERROR
    135	000652	002441 				BLT	IOERR
    136	000654					QIOW$S	#IO.RVB,#LUN,#EFN,,#IOSTAT,,<R0,R1,<#' >>
    137	000716	103417 				BCS	IOERR		; DIRECTIVE ERROR
    138	000720	105767 	177476 			TSTB	IOSTAT
    139	000724	002414 				BLT	IOERR		; I/O ERROR
    140	000726	105767 	177471 			TSTB	IOSTAT+1	; CHECK FOR A TERMINATED LINE
    141	000732	001422 				BEQ	OVER		; NO - BUFFER HAS OVERFLOWED
    142	000734	016702 	177464 			MOV	IOSTAT+2,R2	; GET THE BYTE COUNT
    143	000740	001736 				BEQ	60$		; IGNORE NULL LINES
    144	000742	160201 				SUB	R2,R1		; ADJUST THE REMAINING SPACE COUNT
    145	000744	060203 				ADD	R2,R3		; ACCUMULATE BYTE COUNT
    146	000746	060200 				ADD	R2,R0		; POINT TO NEW END OF DATA
    147	000750	000723 				BR	50$		; AND LOOK FOR CONTINUATION AGAIN
    148					;
    149					; END OF LINE
    150					;
    151	000752	105010 			EOL:	CLRB	(R0)		; THROW IN A TERMINATING NULL
    152	000754					RETURN
    153					;
    154					; TO HERE ON I/O ERROR
    155					;
    156	000756	126727 	177440 	000000G	IOERR:	CMPB	IOSTAT,#IE.EOF	; LOOK FOR CONTROL Z
    157	000764	001441 				BEQ	90$		; YES - JUST GET OUT QUIETLY
    158	000766	012700 	000426'			MOV	#IOERRM,R0	; SET UP MESSAGE POINTER
    159	000772	012701 	000031 			MOV	#IOERRL,R1	; AND BYTE COUNT
    160	000776	000404 				BR	70$
    161					;
    162					; TO HERE IF THE INPUT BUFFER OVERFLOWS
    163					;
    164	001000	012700 	000457'		OVER:	MOV	#OVERM,R0
    165	001004	012701 	000030 			MOV	#OVERL,R1
    166	001010	010002 			70$:	MOV	R0,R2
    167	001012	005202 				INC	R2
    168	001014	012703 	000003 			MOV	#3,R3		; COUNT 3 BYTES OF THE PROMPT STRING
    169	001020	016704 	177370 			MOV	PROMPT+Q.IOPL,R4 ; POINT TO PROMPT STRING
    170	001024	112422 			80$:	MOVB	(R4)+,(R2)+	; COPY PROMPT INTO ERROR MESSAGE
    171	001026	077302 				SOB	R3,80$
    172	001030					QIOW$S	#IO.WVB,#LUN,#EFN,,,,<R0,R1,<#' >>
    173	001070				90$:	EXIT$S			; DON'T GO AWAY MAD, JUST GO AWAY....
    174
    175					;
GTCML - GET COMMAND LINE WITH C	MACRO M1113  14-APR-81 11:15  PAGE 4-2


    176					; SUBROUTINE TO CHECK FOR BLANKS OR TABS. R4 POINTS TO CHARACTER
    177					; BEING TESTED. CARRY CLEAR MEANS BLANK OR TAB.
    178					;
    179	001076	121427 	000040 		SPTEST:	CMPB	(R4),#40	; BLANK?
    180	001102	001405 				BEQ	100$		; YES
    181	001104	121427 	000011 			CMPB	(R4),#11	; TAB?
    182	001110	001402 				BEQ	100$		; YES
    183	001112	000261 				SEC			; NEITHER
    184	001114					RETURN
    185	001116	000241 			100$:	CLC
    186	001120					RETURN
    187
    188						.DSABL	LSB
    189
    190
    191
    192		000001 				.END
GTCML - GET COMMAND LINE WITH C	MACRO M1113  14-APR-81 11:15  PAGE 4-3
SYMBOL TABLE

BUFFER  000000R  	G.MCRB= 000002   	LUN   = 000001   	Q.IOFN= 000002   	SPTEST  001076R
BUFSIZ= 000376   	IE.EOF= ****** GX	M$$HDR= 000001   	Q.IOLU= 000004   	$DSW  = ****** GX
CR    = 000015   	IOERR   000756R  	OVER    001000R  	Q.IOPL= 000014   	$$    = 000067
EFN   = 000001   	IOERRL= 000031   	OVERL = 000030   	Q.IOPR= 000007   	$$$ARG= 000003
EOL     000752R  	IOERRM  000426R  	OVERM   000457R  	Q.IOSB= 000010   	$$$OST= 000014
E$$MSG= 000001   	IOSTAT  000422R  	PROMPT  000400R  	R$$10F= 000001   	$$$T1 = 000011
E$$TRP= 000001   	IO.RVB= ****** GX	Q.IOAE= 000012   	R$$11D= 000001   	.GTCML  000510RG
F$$LVL= 000001   	IO.WVB= ****** GX	Q.IOEF= 000006   	R$$20F= 000001

. ABS.	000000	   000
      	001122	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  1904 WORDS  ( 8 PAGES)
DYNAMIC MEMORY:  2518 WORDS  ( 9 PAGES)
ELAPSED TIME:  00:00:16
[53,10]GTCML,[53,20]GTCML/-SP/CR=[53,30]RSXDC,GTCML
GTCML      CREATED BY  MACRO  ON 14-APR-81 AT 11:15	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

BUFFER	  000000 R	#3-43       3-44       4-90       4-95       4-111     
BUFSIZ	= 000376	#3-41       3-44       4-89       4-113     
CR    	= 000015	#3-35       3-54       3-57      
EFN   	= 000001	#3-33       3-48       4-136      4-172     
EOL   	  000752 R	 4-125     #4-151     
E$$MSG	= 000001	#1-33      
E$$TRP	= 000001	#1-32      
F$$LVL	= 000001	#1-28      
G.MCRB	= 000002	#3-43       3-44       4-95       4-111     
IE.EOF	= ******  GX	 4-156     
IOERR 	  000756 R	 4-133      4-135      4-137      4-139     #4-156     
IOERRL	= 000031	#3-55       4-159     
IOERRM	  000426 R	#3-54       3-55       4-158     
IOSTAT	  000422 R	 3-48      #3-50       4-134      4-136      4-138      4-140      4-142      4-156     
IO.RVB	= ******  GX	 4-136     
IO.WVB	= ******  GX	 3-48       4-172     
LUN   	= 000001	#3-32       3-48       4-136      4-172     
M$$HDR	= 000001	#1-34      
OVER  	  001000 R	 4-141     #4-164     
OVERL 	= 000030	#3-58       4-165     
OVERM 	  000457 R	#3-57       3-58       4-164     
PROMPT	  000400 R	#3-48      *4-87      *4-88       4-132      4-169     
Q.IOAE	= 000012	#3-48      
Q.IOEF	= 000006	#3-48      
Q.IOFN	= 000002	#3-48      
Q.IOLU	= 000004	#3-48      
Q.IOPL	= 000014	#3-48      *4-87      *4-88       4-169     
Q.IOPR	= 000007	#3-48      
Q.IOSB	= 000010	#3-48      
R$$10F	= 000001	#1-30      
R$$11D	= 000001	#1-29      
R$$20F	= 000001	#1-31      
SPTEST	  001076 R	 4-96       4-96       4-102      4-102     #4-179     
S$$YDF	= ******	 1-1        1-37      
$DSW  	= ******  GX	 4-92      
$$    	= 000067	#4-96       4-96      #4-102      4-102     
$$$ARG	= 000003	#3-48       3-48      #3-48       3-48      #3-48       3-48      #3-48       3-48      #4-136     
                         4-136      4-136      4-136      4-136      4-136      4-136      4-136      4-136      4-136     
                         4-136      4-136     #4-172      4-172      4-172      4-172      4-172      4-172      4-172     
                         4-172      4-172      4-172      4-172      4-172     
$$$GLB	= ******	 3-43       3-43       3-48       3-48       3-48       3-48       3-48       3-48       3-48      
                         3-48      
$$$OST	= 000014	#3-43       3-43       3-43      #3-43      #3-48       3-48       3-48      #3-48       3-48      
                         3-48      #3-48       3-48       3-48      #3-48       3-48       3-48      #3-48       3-48      
                         3-48      #3-48       3-48       3-48      #3-48       3-48      
$$$T1 	= 000011	#4-136      4-136     #4-172      4-172     
.GTCML	  000510 RG	#4-86      
GTCML      CREATED BY  MACRO  ON 14-APR-81 AT 11:15	PAGE 2

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

CALL  		#3-37      #4-96      #4-102     
DIR$  		#3-37      #4-90      #4-132     #4-136     #4-136     #4-172     #4-172     #4-173     #4-173     
ERR$  		#4-90      #4-132     #4-136     #4-172     #4-173     
EXIT$S		#3-37      #4-173     
GMCR$ 		#3-37       3-43      
MOV$  		#4-136     #4-136     #4-136     #4-136     #4-136     #4-136     #4-136     #4-136     #4-136     #4-172     
                #4-172     #4-172     #4-172     #4-172     #4-172     #4-172     #4-172     #4-172     
MVB$  		#4-136     #4-136     #4-172     #4-172     
OFF$  		#3-43       3-43       3-43      #3-48       3-48       3-48       3-48       3-48       3-48       3-48      
                 3-48       3-48      
QDPB$ 		#3-48      #3-48      
QDPB$S		#4-136     #4-136     #4-172     #4-172     
QIOW$ 		#3-37       3-48      
QIOW$S		#3-37      #4-136     #4-172     
RETURN		#3-37      #4-152     #4-184     #4-186     
RVP$  		#4-136      4-136     #4-172      4-172     
INIALL - ALLOCATE SYSTEM FILE S	MACRO V05.04  Tuesday 10-May-88 15:42
Table of contents

     4-   34	CONSTANTS AND LOCAL DATA
     5-   67	FILE ALLOCATION
     6-  134	SUBROUTINES
RSXDC	MACRO V05.04  Tuesday 10-May-88 15:42  Page 2


     39
INIALL - ALLOCATE SYSTEM FILE S	MACRO V05.04  Tuesday 10-May-88 15:42  Page 3


      1						.TITLE	INIALL - ALLOCATE SYSTEM FILE SPACE
      2						.IDENT	/01/
      3					;
      4					;
      5					;                             COPYRIGHT (C) 1974, 1978, 1985 BY
      6					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      7					;			ALL RIGHTS RESERVED.
      8					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      9					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     10					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     11					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     12					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     13					;
     14					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     15					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     16					;       CORPORATION.
     17					;
     18					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     19					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     20					;
     21
     22					;
     23					; VERSION:	V002A
     24					; BY:		STEVE HORT
     25					; DATE:		1-JUL-74
     26					; EDIT:		001	8/12/74	13:30:00
     27					;
     28					; THIS CODE TRIES TO ALLOCATE SYSTEM FILE SPACE ON A FILES-11 TYPE
     29					; VOLUME TAKING INTO CONSIDERATION ANY 'BAD BLOCKS' WHICH MAY BE
     30					; PRESENT.
     31					;
     32						.MCALL	CALL,DIR$,QIOSY$,RETURN,WTSE$S
INIALL - ALLOCATE SYSTEM FILE S	MACRO V05.04  Tuesday 10-May-88 15:42  Page 4
CONSTANTS AND LOCAL DATA

     34						.SBTTL	CONSTANTS AND LOCAL DATA
     35					;
     36					; EQUATED SYMBOLS
     37					;
     38		000001 			BDEFN1	=	1		; EVENT FLAG ONE
     39		000142 			BDOFFS	=	142		; OFFSET INTO 'BAD BLOCK' DATA
     40		000146 			BD.PNT	=	BDOFFS+4	; OFFSET FOR START OF 'BAD BLOCK' POINTERS
     41		000144 			BD.USE	=	BDOFFS+2	; OFFSET FOR #BAD BLOCK WORDS IN USE
     42					;
     43					; EXTERNAL DATA
     44					;
     45	000000					QIOSY$			; DEFINE I/O CODES
     46					;
     47					; LOCAL DATA
     48					;
     49	000000	000000 			ALTMP1:	.WORD	0		; TEMPORARY STORAGE WORD #1
     50	000002	000000 	000000 		ALTMP2:	.WORD	0,0		; TEMPORARY STORAGE WORD #2
     51					;
     52			.NLIST	BIN
     53		;
     54		; ERROR MESSAGES
     55		;
     56	000006	ALERR1:	.ASCIZ	/INI -- ALLOCATION FOR SYS FILE EXCEEDS VOLUME LIMIT/
     57		;
     58	000072	ALERR2:	.ASCIZ	/INI -- BITMAP TOO LARGE-INCREASE CLUSTERFACTOR/
     59		;
     60	000151	ALERR3:	.ASCIZ	/INI -- HOMEBLOCK ALLOCATE WRITE ERROR/
     61		;
     62			.EVEN
     63		;
     64						.LIST	BIN
     65					;
INIALL - ALLOCATE SYSTEM FILE S	MACRO V05.04  Tuesday 10-May-88 15:42  Page 5
FILE ALLOCATION

     67						.SBTTL	FILE ALLOCATION
     68					;
     69					;+
     70					;
     71					; *** - $INALL - THIS CODE WILL ACCEPT A LIST OF FILE BLOCK POINTERS
     72					;		 AND ALLOCATE SPACE FOR EACH OF THESE BEGINNING AT THE
     73					;		 FIRST AVAILABLE BLOCK ON OR AFTER THE GIVEN BLOCK NUMBER.
     74					;
     75					; ENTRY:
     76					;
     77					;	CALL	$INALL
     78					;
     79					;-
     80					;
     81	000220	012700 	000000G		$INALL::MOV	#$WBUF,R0	; GET ADDRESS OF WORD BUFFER
     82	000224	012701 	000400 			MOV	#256.,R1	; GET SIZE OF BUFFER
     83	000230	012720 	177777 		10$:	MOV	#-1,(R0)+	; 'ZERO' THE BLOCK
     84	000234	077103 				SOB	R1,10$		; FILL COMPLETELY
     85	000236	016700 	000012G			MOV	$IDVTP+12,R0	; SETUP TO DETERMINE THE
     86	000242	016701 	000014G			MOV	$IDVTP+14,R1	; SIZE OF THE BITMAP FILE
     87	000246	012702 	010000 			MOV	#4096.,R2	; DIVIDE BY 4096.
     88	000252					CALL	DIVIDE		; GO DO THE CALCULATION
     89	000256	005201 				INC	R1		; BITMAP LONGER BY ONE MORE BLOCK!!!
     90	000260	016702 	000000G			MOV	$ICLF,R2	; GET THE CLUSTERFACTOR INTO THE DIVISOR
     91	000264					CALL	DIVIDE		; DIVIDE THE DISK UP
     92	000270	020127 	000400 			CMP	R1,#256.	; TOO BIG TO STORE IN A BYTE?
     93	000274	103404 				BLO	20$		; NO
     94	000276	012700 	000072'			MOV	#ALERR2,R0	; YES, YOUR DISK IS TOO BIGGG!
     95	000302	000167 	000000G			JMP	$INIER		; GO TELL THE GUY
     96	000306	110167 	000001G		20$:	MOVB	R1,$SBMAP+1	; STORE THE RESULT IN THE 'FILE SIZE' HOLE
     97	000312	016701 	000000G			MOV	$IMXF,R1	; GET THE MAXIMUM NUMBER OF FILES PERMITTED
     98	000316	012702 	010000 			MOV	#4096.,R2	; DIVIDE BY 4096.
     99	000322					CALL	DIVIDE		; DO IT NOW
    100	000326	010167 	000000G			MOV	R1,$NDXSZ	; SAVE THE NUMBER OF BLOCKS REQUIRED
    101	000332	005702 				TST	R2		; ANY REMAINDER?
    102	000334	001402 				BEQ	30$		; NO
    103	000336	005267 	000000G			INC	$NDXSZ		; YES, ONE MORE THAN IMAGINED
    104	000342	066701 	000000G		30$:	ADD	$IINF,R1	; ADD THE NUMBER OF PERMANENT FILES
    105	000346	110167 	000001G			MOVB	R1,$INDXF+1	; SAVE THE NUMBER OF BLOCKS REQUIRED
    106	000352	112767 	000002 	177776G		MOVB	#2,$BTBLK-2	; INITIALIZE FILE COUNTER
    107	000360	116700 	177777G			MOVB	$BTBLK-1,R0	; GET #FILES TO CHECK
    108	000364	005300 				DEC	R0		; BOOT BLOCK ALREADY ALLOCATED
    109	000366	012703 	000000G			MOV	#$HMBLK,R3	; GET ADDRESS OF FILE BLOCKS
    110	000372				40$:	CALL	CHECK		; TRY TO ALLOCATE THE HBN
    111	000376	103020 				BCC	50$		; SUCCESS AT LAST!
    112	000400	011367 	000022G			MOV	(R3),$INDPB+22	; GET HI ORDER BITS OF THIS BLK
    113	000404	016367 	000002 	000024G		MOV	2(R3),$INDPB+24	; GET LO ORDER BITS NEXT
    114	000412					CALL	DVQIOW		; 'ZERO' THIS BAD HOME BLOCK
    115	000416	103423 				BCS	ALLERR		; THAT BLOCK MUST REALLY BE BADDDDDDD
    116	000420	042763 	000001 	000002 		BIC	#1,2(R3)	; KILL THE FIRST 'FUNNY' BIT
    117	000426	062763 	000400 	000002 		ADD	#400,2(R3)	; ADD THE STANDARD OFFSET
    118	000434	105513 				ADCB	(R3)		; TAKE CARE OF OVERFLOWS
    119	000436	000755 				BR	40$		; TRY ONCE MORE WHILE THERE'S STILL ROOM
    120	000440	005300 			50$:	DEC	R0		; ONE MORE DONE
    121	000442				60$:	CALL	CHECK		; SEE IF THIS LOT FITS IN
    122	000446	103005 				BCC	70$		; YES
    123	000450	062763 	000001 	000002 		ADD	#1,2(R3)	; SO MUCH FOR THE 'INC' INSTRUCTION!!!
INIALL - ALLOCATE SYSTEM FILE S	MACRO V05.04  Tuesday 10-May-88 15:42  Page 5-1
FILE ALLOCATION

    124	000456	105513 				ADCB	(R3)		; WATCH THOSE NASTY BITS
    125	000460	000770 				BR	60$		; ONCE MORE FOR THE ROAD
    126	000462	077011 			70$:	SOB	R0,60$		; FILL IN THE REST OF THE BLANKS
    127	000464					RETURN			; EXIT TO THE CALLER
    128					;
    129	000466	012700 	000151'		ALLERR:	MOV	#ALERR3,R0	; GET ADDRESS OF THIS ERROR
    130	000472	000167 	000000G			JMP	$INIER		; GO REPORT THE PROBLEM
    131					;
    132
INIALL - ALLOCATE SYSTEM FILE S	MACRO V05.04  Tuesday 10-May-88 15:42  Page 6
SUBROUTINES

    134						.SBTTL	SUBROUTINES
    135					;
    136					;+
    137					;
    138					; *** - CHECK - ROUTINE TO SEE IF IT IS POSSIBLE TO ALLOCATE
    139					;		SPACE FOR A PARTICULAR SYSTEM FILE.
    140					;
    141					; ENTRY:
    142					;
    143					;	CALL	CHECK
    144					;
    145					; INPUT:
    146					;
    147					;	R3 - POINTER TO FILE BLOCK TO BE ALLOCATED
    148					;	      (R3) - HIGH ORDER 8-BITS OF FILE STARTING BLOCK#
    149					;	     1(R3) - SIZE OF FILE
    150					;	     2(R3) - LOW ORDER 16-BITS OF FILE STARTING BLOCK
    151					;
    152					; OUTPUT:
    153					;
    154					;	R3 - INPUT VALUE + 4 IF SPACE ALLOCATED
    155					;	     INPUT VALUE IF SPACE NOT ALLOCATED
    156					;
    157					;	CC-C	CLEAR - SPACE ALLOCATED
    158					;		  SET - NO SPACE AVAILABLE BEGINNING AT THIS BLOCK ADDRESS
    159					;
    160					;-
    161					;
    162	000476	010146 			CHECK:	MOV	R1,-(SP)	; SAVE R1
    163	000500	010246 				MOV	R2,-(SP)	; SAVE R2
    164	000502	010446 				MOV	R4,-(SP)	; SAVE R4
    165	000504	010546 				MOV	R5,-(SP)	; SAVE R5
    166	000506	012701 	000000'			MOV	#ALTMP1,R1	; TEMPORARY STORE FOR FILE SIZE
    167	000512	012702 	000002'			MOV	#ALTMP2,R2	; TEMPORARY STORE FOR FILE BLOCK#
    168	000516	005011 				CLR	(R1)		; ZERO THE FILE SIZE
    169	000520	005062 	000002 			CLR	2(R2)		; MAKE SURE UPPER BYTE IS 'CLEAN'
    170	000524	111362 	000002 			MOVB	(R3),2(R2)	; GET HIGH ORDER 8-BITS OF BLOCK#
    171	000530	116311 	000001 			MOVB	1(R3),(R1)	; GET FILE SIZE
    172	000534	016312 	000002 			MOV	2(R3),(R2)	; GET LOW ORDER 16-BITS OF BLOCK#
    173	000540					CALL	VERIFY		; VERIFY THAT WE ARE STILL IN RANGE
    174	000544	103004 				BCC	10$		; BLOCK DOES NOT EXCEEDS VOLUME
    175	000546	012700 	000006'			MOV	#ALERR1,R0	; GET ADDRESS OF ERROR MESSAGE
    176	000552	000167 	000000G			JMP	$INIER		; GO TELL THE WORLD
    177	000556	012705 	000146G		10$:	MOV	#$IBBUF+BD.PNT,R5 ; GET ADDRESS OF BAD BLOCK BUFFER
    178	000562	116704 	000144G			MOVB	$IBBUF+BD.USE,R4  ; GET NUMBER OF WORDS IN USE
    179	000566					CALL	MATCH		; SEE IF ANY BLOCKS COINCIDE
    180	000572	103416 				BCS	20$		; YES, TOO BAD
    181	000574	012705 	000000G			MOV	#$BTBLK,R5	; NOW CHECK THOSE ALREADY ALLOCATED
    182	000600	116704 	177776G			MOVB	$BTBLK-2,R4	; GET THE COUNT
    183	000604					CALL	MATCH		; CHECK THESE OUT TOO
    184	000610	103407 				BCS	20$		; SURE WOULD SAVE DISK SPACE
    185	000612	116223 	000002 			MOVB	2(R2),(R3)+	; RESTORE FINAL RESULTS
    186	000616	111123 				MOVB	(R1),(R3)+	; INCLUDING FILE SIZE
    187	000620	011223 				MOV	(R2),(R3)+	; NOW LEAVES POINTER IN CORRECT POSITION
    188	000622	062767 	000002 	177776G		ADD	#2,$BTBLK-2	; BUMP COUNTER
    189	000630	012605 			20$:	MOV	(SP)+,R5	; RESTORE R5
    190	000632	012604 				MOV	(SP)+,R4	; RESTORE R4
INIALL - ALLOCATE SYSTEM FILE S	MACRO V05.04  Tuesday 10-May-88 15:42  Page 6-1
SUBROUTINES

    191	000634	012602 				MOV	(SP)+,R2	; RESTORE R2
    192	000636	012601 				MOV	(SP)+,R1	; RESTORE R1
    193	000640					RETURN			; AND EXIT TO CALLER
    194					;
    195		000001 				.END
INIALL - ALLOCATE SYSTEM FILE S	MACRO V05.04  Tuesday 10-May-88 15:42  Page 6-2
Symbol table

ALERR1  000006R  	IE.EOF= 177766   	IE.SQC= 177734   	IO.LOV= 001010   	IO.STP= 016400
ALERR2  000072R  	IE.EOT= 177702   	IE.SRE= 177762   	IO.LTK= 000050   	IO.SYN= 003040
ALERR3  000151R  	IE.EOV= 177765   	IE.STK= 177706   	IO.MCS= 013400   	IO.TRM= 002410
ALLERR  000466R  	IE.EXP= 177676   	IE.ULN= 177773   	IO.MDA= 016000   	IO.UNL= 000042
ALTMP1  000000R  	IE.FEX= 177717   	IE.UPN= 177777   	IO.MDI= 014400   	IO.WAT= 013400
ALTMP2  000002R  	IE.FHE= 177705   	IE.VER= 177774   	IO.MDO= 015400   	IO.WLB= 000400
BDEFN1= 000001   	IE.FOP= 177713   	IE.WAC= 177743   	IO.MLO= 006000   	IO.WLS= 000410
BDOFFS= 000142   	IE.HFU= 177744   	IE.WAT= 177741   	IO.MOD= 003000   	IO.WLV= 000500
BD.PNT= 000146   	IE.HWR= 177772   	IE.WER= 177737   	IO.MSO= 005000   	IO.WVB= 011000
BD.USE= 000144   	IE.IDU= 177644   	IE.WLK= 177764   	IO.RAL= 001010   	IO.XMT= 014400
CHECK   000476R  	IE.IEF= 177637   	IE.2DV= 177720   	IO.RAT= 013000   	IO.XNA= 014410
DIVIDE= ****** GX	IE.IFC= 177776   	IO.ACE= 007400   	IO.RBC= 003000   	IQ.Q  = 000002
DVQIOW= ****** GX	IE.IFU= 177747   	IO.ACR= 006400   	IO.RCI= 015000   	IQ.X  = 000001
E$$MSG= 000001   	IE.ILL= 177726   	IO.ACW= 007000   	IO.RCV= 015000   	IS.BV = 000005
E$$TRP= 000001   	IE.ILU= 177640   	IO.ADS= 014000   	IO.RDB= 001200   	IS.CLR= 000000
F$$LVL= 000001   	IE.INS= 177776   	IO.APC= 014000   	IO.RDN= 000022   	IS.CR = 006401
IE.ABO= 177761   	IE.IPR= 177641   	IO.APV= 014010   	IO.REL= 013400   	IS.ESC= 015401
IE.ACT= 177771   	IE.ISQ= 177703   	IO.ATT= 001400   	IO.RHD= 001010   	IS.PND= 000000
IE.ADP= 177636   	IE.ITI= 177643   	IO.CCI= 014000   	IO.RLB= 001000   	IS.RDD= 000002
IE.ALN= 177736   	IE.ITS= 177770   	IO.CCT= 002460   	IO.RLV= 001100   	IS.SET= 000002
IE.AST= 177660   	IE.LCK= 177745   	IO.CLN= 003400   	IO.RNA= 005400   	IS.SUC= 000001
IE.BAD= 177777   	IE.LNL= 177646   	IO.CON= 015400   	IO.RNC= 001004   	MATCH = ****** GX
IE.BBE= 177710   	IE.MBK= 177721   	IO.CRC= 001020   	IO.RNE= 001020   	M$$HDR= 000001
IE.BDI= 177714   	IE.MOD= 177753   	IO.CRE= 012000   	IO.RTC= 003400   	R$$10F= 000001
IE.BDR= 177716   	IE.NBF= 177731   	IO.CTI= 015400   	IO.RTI= 016400   	R$$11D= 000001
IE.BDV= 177711   	IE.NBK= 177727   	IO.CTL= 016400   	IO.RTK= 000060   	R$$20F= 000001
IE.BHD= 177700   	IE.NFI= 177704   	IO.DAC= 010000   	IO.RVB= 010400   	VERIFY= ****** GX
IE.BLK= 177754   	IE.NLN= 177733   	IO.DCI= 014400   	IO.RWD= 002400   	$BTBLK= ****** GX
IE.BNM= 177712   	IE.NNC= 177674   	IO.DCT= 002470   	IO.RWU= 002540   	$HMBLK= ****** GX
IE.BTF= 177675   	IE.NOD= 177751   	IO.DEL= 012400   	IO.R1C= 002400   	$IBBUF= ****** GX
IE.BTP= 177725   	IE.NSF= 177746   	IO.DET= 002000   	IO.SAO= 004000   	$ICLF = ****** GX
IE.BVR= 177701   	IE.OFL= 177677   	IO.DIS= 016000   	IO.SCS= 013000   	$IDVTP= ****** GX
IE.BYT= 177755   	IE.ONP= 177773   	IO.DTI= 016000   	IO.SDI= 013000   	$IINF = ****** GX
IE.CKP= 177766   	IE.OVR= 177756   	IO.ENA= 006000   	IO.SDO= 012400   	$IMXF = ****** GX
IE.CKS= 177742   	IE.PRI= 177760   	IO.EOF= 003000   	IO.SEC= 002520   	$INALL  000220RG
IE.CLO= 177732   	IE.RAC= 177724   	IO.ESA= 002500   	IO.SEM= 002440   	$INDPB= ****** GX
IE.CON= 177752   	IE.RAT= 177723   	IO.EXT= 011400   	IO.SHT= 002410   	$INDXF= ****** GX
IE.DAA= 177770   	IE.RBG= 177730   	IO.FDX= 003020   	IO.SLO= 005400   	$INIER= ****** GX
IE.DAO= 177763   	IE.RCN= 177722   	IO.FNA= 004400   	IO.SMO= 002560   	$NDXSZ= ****** GX
IE.DFU= 177750   	IE.RER= 177740   	IO.HDX= 003010   	IO.SNM= 002450   	$SBMAP= ****** GX
IE.DNA= 177771   	IE.RNM= 177715   	IO.HIS= 015000   	IO.SPB= 002420   	$WBUF = ****** GX
IE.DNR= 177775   	IE.RSU= 177757   	IO.INL= 002400   	IO.SPF= 002440   	$$    = 000067
IE.DUN= 177767   	IE.SDP= 177635   	IO.ITI= 017000   	IO.SSO= 004400   	$$MSG = 000000
IE.DUP= 177707   	IE.SNC= 177735   	IO.KIL= 000012   	IO.SST= 002430   	...GBL= 000000
IE.EBX= 177776   	IE.SPC= 177772   	IO.LED= 012000   	IO.STC= 002500

. ABS.	000000    000	(RW,I,GBL,ABS,OVR)
      	000642    001	(RW,I,LCL,REL,CON)
Errors detected:  0

*** Assembler statistics


Work  file  reads: 0
Work  file writes: 0
Size of work file: 10802 Words  ( 43 Pages)
Size of core pool: 12356 Words  ( 47 Pages)
INIALL - ALLOCATE SYSTEM FILE S	MACRO V05.04  Tuesday 10-May-88 15:42  Page 6-3
Symbol table

Operating  system: RSX-11M/PLUS

Elapsed time: 00:00:32.17
[53,10]INIALL,[53,20]INIALL/-SP/CR=[53,30]RSXDC,INIALL
INIALL     CREATED BY  MACRO  ON 10-MAY-88 AT 15:43	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

ALERR1	  000006 R	#4-56       6-175     
ALERR2	  000072 R	#4-58       5-94      
ALERR3	  000151 R	#4-60       5-129     
ALLERR	  000466 R	 5-115     #5-129     
ALTMP1	  000000 R	#4-49       6-166     
ALTMP2	  000002 R	#4-50       6-167     
BDEFN1	= 000001	#4-38      
BDOFFS	= 000142	#4-39       4-40       4-41      
BD.PNT	= 000146	#4-40       6-177     
BD.USE	= 000144	#4-41       6-178     
CHECK 	  000476 R	 5-110      5-110      5-121      5-121     #6-162     
DIVIDE	= ******  GX	 5-88       5-88       5-91       5-91       5-99       5-99      
DVQIOW	= ******  GX	 5-114      5-114     
E$$MSG	= 000001	#1-33      
E$$TRP	= 000001	#1-32      
F$$LVL	= 000001	#1-28      
MATCH 	= ******  GX	 6-179      6-179      6-183      6-183     
M$$HDR	= 000001	#1-34      
R$$10F	= 000001	#1-30      
R$$11D	= 000001	#1-29      
R$$20F	= 000001	#1-31      
S$$YDF	= ******	 1-1        1-37      
VERIFY	= ******  GX	 6-173      6-173     
$BTBLK	= ******  GX	*5-106      5-107      6-181      6-182     *6-188     
$HMBLK	= ******  GX	 5-109     
$IBBUF	= ******  GX	 6-177      6-178     
$ICLF 	= ******  GX	 5-90      
$IDVTP	= ******  GX	 5-85       5-86      
$IINF 	= ******  GX	 5-104     
$IMXF 	= ******  GX	 5-97      
$INALL	  000220 RG	#5-81      
$INDPB	= ******  GX	*5-112     *5-113     
$INDXF	= ******  GX	*5-105     
$INIER	= ******  GX	 5-95       5-130      6-176     
$NDXSZ	= ******  GX	*5-100     *5-103     
$SBMAP	= ******  GX	*5-96      
$WBUF 	= ******  GX	 5-81      
$$    	= 000067	#5-88       5-88      #5-91       5-91      #5-99       5-99      #5-110      5-110     #5-114     
                         5-114     #5-121      5-121     #6-173      6-173     #6-179      6-179     #6-183      6-183     
INIALL     CREATED BY  MACRO  ON 10-MAY-88 AT 15:43	PAGE 2

MACRO CROSS REFERENCE                                   CREF   04.00 

MACRO NAME	REFERENCES

CALL  		#3-32       5-88       5-91       5-99       5-110      5-114      5-121      6-173      6-179      6-183     
DIR$  		#3-32      
QIOSY$		#3-32       4-45      
RETURN		#3-32       5-127      6-193     
WTSE$S		#3-32      
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44
Table of contents

     4-   33	CONSTANTS AND LOCAL DATA
     5-   74	MESSAGE LIST
     6-  111	BAD BLOCK PROCESSOR
     9-  294	SUBROUTINES
RSXDC	MACRO V05.04  Tuesday 10-May-88 15:44  Page 2


     39
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 3


      1						.TITLE	INIBAD - SETUP 'BAD BLOCK' FILE.
      2						.IDENT	/01/
      3					;
      4					;
      5					;                             COPYRIGHT (C) 1974, 1978, 1985 BY
      6					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      7					;			ALL RIGHTS RESERVED.
      8					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      9					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     10					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     11					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     12					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     13					;
     14					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     15					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     16					;       CORPORATION.
     17					;
     18					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     19					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     20					;
     21
     22					;
     23					; VERSION:	V002A
     24					; BY:		STEVE HORT
     25					; DATE:		1-JUL-74
     26					; EDIT:		001	8/12/74	13:00:00
     27					;
     28					; THIS CODE RECORDS BAD BLOCK INFORMATION FROM THE USER AND/OR
     29					; THE VOLUME UNDER INITIALIZATION IN THE 'BAD BLOCK' FILE.
     30					;
     31						.MCALL	ALUN$,CALL,DIR$,QIOSY$,QIO$,RETURN,WTSE$,WTSE$S
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 4
CONSTANTS AND LOCAL DATA

     33						.SBTTL	CONSTANTS AND LOCAL DATA
     34					;
     35					; EQUATED SYMBOLS
     36					;
     37		000001 			BDEFN1	=	1		; EVENT FLAG #1
     38		000001 			BDLUN1	=	1		; LUN-1 ASSIGN TO 'CI'
     39		000142 			BDOFFS	=	142		; OFFSET INTO 'BAD BLOCK' BLOCK
     40		000776 			BB.CKS	=	510.		; OFFSET TO CHECKSUM WORD
     41		000003 			BD.BLK	=	3		; SIZE IN BYTES OF BAD BLOCK NUMBERS
     42		000001 			BD.LEN	=	1		; SIZE IN BYTES OF LENGTH OF BAD BLOCK GROUPS
     43		000145 			BD.MAX	=	BDOFFS+3	; OFFSET TO MAXIMUM #WORDS AVAILABLE IN BLOCK
     44		000146 			BD.PNT	=	BDOFFS+4	; OFFSET FOR START OF BAD BLOCK GROUP DATA
     45		000144 			BD.USE	=	BDOFFS+2	; OFFSET FOR #BAD BLOCK GROUPS IN USE
     46		000004 			BKLEN	=	BD.BLK+BD.LEN	; LENGTH OF POINTER
     47		000314 			BKSIZE	=	256.-<BDOFFS/2>-3/2*2	; NUMBER OF AVAILABLE WORDS IN BAD BLOCK FILE
     48		001401 			BKWRD1	=	BD.BLK*256.+BD.LEN ; FIRST WORD IN BAD BLOCK FILE
     49		146000 			BKWRD2	=	BKSIZE*256.+0	   ; SECOND WORD OF BAD BLOCK FILE
     50					;
     51					; EXTERNAL DATA
     52					;
     53	000000					QIOSY$			; DEFINE I/O CODES
     54					;
     55					; LOCAL DATA
     56					;
     57	000000	000000 	000000 		DSKADR:	.WORD	0,0		; CURRENT VOLUME LBN ADDRESS
     58	000004	000000 	000000 		BLKNUM:	.WORD	0,0		; CURRENT INPUT BLOCK NUMBER
     59	000010	000000 	000000 		BLKSIZ:	.WORD	0,0		; SIZE OF CURRENT INPUT BLOCK GROUP
     60	000014	   000 			BDERRN:	.BYTE	0		; ERROR MESSAGE#
     61						.EVEN
     62					;
     63					; DEFINE TTY INPUT DPB
     64					;
     65	000016				TTIDPB:	QIO$	IO.RLB,BDLUN1,BDEFN1,0,$INSTA,0,<TTIBUF,32.,40>
     66					;
     67	000040				TTIATT:	QIO$	IO.ATT,BDLUN1,BDEFN1	; ATTACH TTY
     68					;
     69	000054				TTIDET:	QIO$	IO.DET,BDLUN1,BDEFN1	; DETACH TTY
     70					;
     71	000070				TTIBUF:	.BLKB	32.			; INPUT BUFFER
     72					;
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 5
MESSAGE LIST

     74						.SBTTL	MESSAGE LIST
     75			.NLIST	BIN
     76		;
     77		; MESSAGE LIST FORMAT:
     78		;
     79		;	.ASCIZ	'MESSAGE'
     80		;
     81			.EVEN
     82	000130	BDMES1:	.ASCII /INI -- CHECKING /
     83	000150	BDUNIT:	.ASCIZ	/XX0:/
     84		;
     85	000155	PROMPT:	.ASCIZ	/INI>BAD=/
     86		;
     87	000166	ERROR1:	.ASCIZ	/INI -- DATA ERROR/
     88		;
     89	000210	ERROR2:	.ASCIZ	/INI -- BLOCK(S) EXCEED VOLUME LIMIT/
     90		;
     91	000254	ERROR3:	.ASCIZ	/INI -- NO BAD BLOCK DATA FOUND/
     92		;
     93	000313	ERROR4:	.ASCIZ	/INI -- DUPLICATE BLOCK(S) FOUND/
     94		;
     95	000353	ERROR5:	.ASCIZ	/INI -- FILE CORRUPT - DATA IGNORED/
     96		;
     97	000416	ABOERR:	.ASCIZ	/INI -- BAD BLOCK FILE FULL - TASK ABORTED/
     98		;
     99			.EVEN
    100						.LIST	BIN
    101					;
    102					; LIST OF ERROR MESSAGE ADDRESSES
    103					;
    104	000470	000166'			BDERRL:	.WORD	ERROR1
    105	000472	000210'				.WORD	ERROR2
    106	000474	000254'				.WORD	ERROR3
    107	000476	000313'				.WORD	ERROR4
    108	000500	000353'				.WORD	ERROR5
    109					;
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 6
BAD BLOCK PROCESSOR

    111						.SBTTL	BAD BLOCK PROCESSOR
    112					;+
    113					;
    114					; *** - $INBAD - ACCEPT 'BAD BLOCK' DATA FROM THE USER'S CONSOLE AND/OR
    115					;		 A 'BAD BLOCK' FILE WHICH MAY HAVE BEEN WRITTEN ON THE
    116					;		 DISK BY THE HARDWARE DIAGNOSTIC.
    117					;
    118					;
    119					; INPUTS:
    120					;	1.	USER'S CONSOLE:
    121					;		INI>BAD=BBBBBBB[,NNN]
    122					;		WHERE:	   INI>BAD= - PROMPT
    123					;			    BBBBBBB - BLOCK NUMBER
    124					;			        NNN - OPTIONAL BLOCK GROUP SIZE (1<=NNN<=256.)
    125					;
    126					;	2.	VOLUME UNDER INITIALIZATION
    127					;
    128					; OUTPUT:
    129					;		'BAD BLOCK' FILE
    130					;
    131					;-
    132					;
    133	000502				$INBAD::DIR$	#TTIATT		; ATTACH THE TTY
    134	000510	105067 	177300 			CLRB	BDERRN		; INITIALIZE EVERYTHING
    135	000514	012700 	000000G			MOV	#$IBBUF,R0	; INITIALIZE 'BAD BLOCK' BUFFER
    136	000520	012701 	000400 			MOV	#256.,R1	; ZERO THE WHOLE BUFFER
    137	000524	005020 			10$:	CLR	(R0)+		; CLEAR THE REMAINING WORDS
    138	000526	077102 				SOB	R1,10$		; LOOP UNTIL COMPLETION
    139	000530	012767 	001401 	000142G		MOV	#BKWRD1,$IBBUF+BDOFFS   ; SETUP 'BAD BLOCK' HEADER
    140	000536	012767 	146000 	000144G		MOV	#BKWRD2,$IBBUF+BDOFFS+2 ; NOW PUT IN SECOND HEADER WORD
    141	000544	032767 	000000G	000000G		BIT	#KY.BAD,$IKEY	; DO WE NEED TO DO ANY WORK?
    142	000552	001002 				BNE	20$		; YES
    143	000554	000167 	000454 			JMP	BDEXIT		; NO
    144	000560	012700 	000000G		20$:	MOV	#$IDVTP,R0	; GET ADDRESS OF DATA FROM PARSER
    145	000564	012067 	177360 			MOV	(R0)+,BDUNIT	; GET DEVICE NAME
    146	000570	111001 				MOVB	(R0),R1		; GET INITIAL UNIT#
    147	000572	062701 	000060 			ADD	#60,R1		; FORM ASCII DIGIT
    148	000576	110167 	177350 			MOVB	R1,BDUNIT+2	; SAVE IN MESSAGE FOR PRINTOUT
    149	000602	005067 	177172 			CLR	DSKADR		; RESET THE INITIAL VOLUME ADDRESS
    150	000606	005067 	177170 			CLR	DSKADR+2	; BOTH WORDS REPRESENT LBN
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 7
BAD BLOCK PROCESSOR

    152					;
    153					; USE 'AUTO' MODE IF DIAGNOSTIC HAS BEEN RUN ON DISK
    154					;
    155	000612	032767 	000000G	000000G	AUTO:	BIT	#IN.AUT,$IBAD	; AUTO MODE SELECTED?
    156	000620	001521 				BEQ	MANUAL		; NO, TRY FOR MANUAL MODE
    157	000622	012700 	000130'		10$:	MOV	#BDMES1,R0	; YES, TELL USER WHICH DISK IT IS
    158	000626					CALL	PRINT		; TYPE OUT THE MESSAGE
    159	000632	012700 	000000G			MOV	#$WBUF,R0	; GET ADDRESS OF TEMPORARY BUFFER
    160	000636	010067 	000014G			MOV	R0,$INDPB+Q.IOPL ; SETUP ADDRESS OF WORK BUFFER
    161	000642	012704 	000022G		20$:	MOV	#$INDPB+22,R4	; GET PTR TO CURRENT LBN
    162	000646	016724 	177126 			MOV	DSKADR,(R4)+	; NOW THE THE LBN
    163	000652	016714 	177124 			MOV	DSKADR+2,(R4)	; BOTH HALVES OF THE NUMBER
    164	000656					CALL	NXTDSK		; POINT TO THE END OF THIS DISK + 1
    165	000662	012705 	000401 			MOV	#257.,R5	; SETUP MAXIMUM #BLKS TO CHECK + 1
    166	000666	000422 				BR	40$		; FUDGE A SUBTRACTION
    167	000670				30$:	CALL	DVQIOR		; READ THE SO CALLED 'BAD BLOCK'
    168	000674	103417 				BCS	40$		; BLOCK MUST BE BAD
    169	000676					CALL	CHKSUM		; VALIDATE CHECKSUM FOR THIS BLOCK
    170	000702	020160 	000776 			CMP	R1,BB.CKS(R0)	; MATCH?
    171	000706	001012 				BNE	40$		; NO!!!
    172	000710	022720 	001401 			CMP	#BKWRD1,(R0)+	; IS THE HEADER CORRECT?
    173	000714	001007 				BNE	40$		; NO, OFF TO A BAD START
    174	000716	005003 				CLR	R3		; MAKE SURE UPPER BYTE IS CLEAR
    175	000720	152003 				BISB	(R0)+,R3	; GET COUNT OF GROUPS ALREADY IN BUFFER
    176	000722	001460 				BEQ	100$		; NONE, THEREFORE IGNORE ANY GARBAGE
    177	000724	006203 				ASR	R3		; FORM NUMBER OF GROUPS (#WORDS/2)
    178	000726	122720 	000314 			CMPB	#BKSIZE,(R0)+	; DO THE MAXIMUM NUMBER OF GROUPS MATCH?
    179	000732	001410 				BEQ	50$		; YES, AT LAST A GOOD 'BAD' BLOCK
    180	000734	162714 	000001 		40$:	SUB	#1,(R4)		; BACK OFF ONE BLOCK
    181	000740	005664 	177776 			SBC	-2(R4)		; TAKE CARE OF ANY UNDERFLOW
    182	000744	077527 				SOB	R5,30$		; LOOP THE LOOP
    183	000746					CALL	BDERR3		; NO 'BAD BLOCK' FOUND ON THIS DISK
    184	000752	000444 				BR	100$		; SEE IF THERE ARE ANY MORE ON THIS VOLUME
    185					;
    186					; MARK OFF EVERY BLOCK INDICATED IN EACH OF THE 'BAD BLOCK' FILES
    187					; (ONE FILE PER PHYSICAL DISK)
    188					;
    189	000754	016746 	000144G		50$:	MOV	$IBBUF+BD.USE,-(SP) ; SAVE THE NUMBER OF WORDS CURRENTLY IN USE
    190	000760	012701 	000010'			MOV	#BLKSIZ,R1	; SETUP A HOLE FOR THE BLOCK SIZE
    191	000764	005011 				CLR	(R1)		; INITIALIZE IT NOW
    192	000766	012702 	000007'		60$:	MOV	#BLKNUM+3,R2	; SETUP TO STORE THE CURRENT BLK BEING TESTED
    193	000772	105012 				CLRB	(R2)		; ZERO THE HIGH 8 BITS
    194	000774	112042 				MOVB	(R0)+,-(R2)	; MOVE IN THE HIGH BITS OF THE BLOCK#
    195	000776	112011 				MOVB	(R0)+,(R1)	; NOW GET THE SIZE OF THE GROUP
    196	001000	012042 				MOV	(R0)+,-(R2)	; FINALLY STORE THE LOW ORDER BITS
    197						.IF DF	$MUVOL
    198						ADD	DSKADR+2,(R2)	; RELOCATE THIS BLOCK
    199						ADC	2(R2)		; ADD IN ANY OVERFLOW BIT
    200						ADD	DSKADR,2(R2)	; THE REST TAKE CARE OF THEMSELVES
    201						.ENDC
    202	001002					CALL	VERIFY		; CHECK TO SEE IF WE ARE IN VOLUME RANGE
    203	001006	103414 				BCS	70$		; NOT THIS ONE ANYWAY
    204	001010					CALL	ONFILE		; SEE THAT THIS GROUP DOESN'T MATCH OTHERS
    205	001014	103414 				BCS	75$		; STRIKE A LIGHT, A MATCH
    206	001016	077315 				SOB	R3,60$		; MORE GROUPS TO TEST?
    207					;
    208					; WE HAVE FOUND A GOOD 'BAD BLOCK' SO MARK IT OFF AS IN USE
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 7-1
BAD BLOCK PROCESSOR

    209					;
    210	001020	011412 				MOV	(R4),(R2)	; GET LOW ORDER BITS OF LBN
    211	001022	016462 	177776 	000002 		MOV	-2(R4),2(R2)	; NOW THE HIGH ORDER BITS
    212	001030	005011 				CLR	(R1)		; SAY WE HAVE ONLY ONE BLOCK
    213	001032					CALL	ONFILE		; GO MARK IT OFF
    214	001036	000411 				BR	90$		; LOOP THE LOOP
    215	001040				70$:	CALL	BDERR2		; BLOCK TOO LARGE FOR THE VOLUME
    216	001044	000402 				BR	80$		; SKIP THE NEXT PRINTOUT
    217	001046				75$:	CALL	BDERR4		; BLOCK NUMBER(S) MATCH
    218	001052				80$:	CALL	BDERR5		; SOMETHING'S ALSO FISHY IN DENMARK
    219	001056	111667 	000144G			MOVB	(SP),$IBBUF+BD.USE ; RESTORE PREVIOUS COUNT
    220	001062	005726 			90$:	TST	(SP)+		; POP JUNK NOW ON TOP OF THE STACK
    221	001064				100$:	.IF DF	$MUVOL
    222						INCB	BDUNIT+2	; BUMP DISPLAYED UNIT#
    223						MOV	#DSKADR+2,R4	; PREPARE TO ADVANCE ONE DISK UNIT
    224						CALL	NXTDSK		; BUMP DPB BLK PTR TO NEXT DISK
    225						BCC	10$		; STILL ONE MORE DISK TO TRY
    226						.ENDC
    227					;
    228					; CHECK IF USER WANTS TO ADD EXTRA BLOCKS OF HIS OWN
    229					;
    230	001064	032767 	000000G	000000G	MANUAL:	BIT	#IN.MAN,$IBAD	; MANUAL MODE SELECTED?
    231	001072	001460 				BEQ	BDEXIT		; NO
    232	001074	012700 	000155'		RESTRT:	MOV	#PROMPT,R0	; MANUAL ENTRY REQUIRED, GO PROMPT HIM
    233	001100					CALL	INPUT		; OK, GIVE ME THOSE NASTY BLOCKS
    234	001104	103453 				BCS	BDEXIT		; NO MORE, SO EXIT GRACEFULLY
    235	001106	012701 	000004'			MOV	#BLKNUM,R1	; SETUP ADDRESS FOR RETURNED NUMBER
    236	001112					CALL	GETNUM		; GO CONVERT THE BLOCK NUMBER
    237	001116	103402 				BCS	10$		; WE HAVE A NUMBER OF SOME SORT
    238	001120	005711 				TST	(R1)		; OR DO WE HAVE ANY NUMBER AT ALL?
    239	001122	001422 				BEQ	20$		; NO, TELL THE USER HIS/HER PROBLEM
    240	001124	105761 	000003 		10$:	TSTB	3(R1)		; IS THE BLOCK# TOO LARGE?
    241	001130	001017 				BNE	20$		; YES, GREATER THAN 24-BITS
    242	001132	012701 	000010'			MOV	#BLKSIZ,R1	; SETUP ADDRESS OF RETURNED BLOCK SIZE
    243	001136	105702 				TSTB	R2		; TERMINATOR NEXT?
    244	001140	001416 				BEQ	30$		; YES, SETUP DEFAULT LENGTH
    245	001142	120227 	000054 			CMPB	R2,#',		; NO, THEN IS NEXT CHARACTER A <,>?
    246	001146	001010 				BNE	20$		; NO, THEN ERROR - BAD NUMBER
    247	001150					CALL	GETNUM		; GO CONVERT THE NUMBER TO BINARY
    248	001154	103405 				BCS	20$		; CHECK BLOCK SIZE LIMIT (1<=N<=256.)
    249	001156	005311 				DEC	(R1)		; REMEMBER BLK #1 = 0
    250	001160	100403 				BMI	20$		; DATA ENTERED WAS BAD!
    251	001162	021127 	000377 			CMP	(R1),#255.	; LAST CHANCE TO PASS THE TEST
    252	001166	101404 				BLOS	40$		; JUST MADE IT
    253	001170				20$:	CALL	BDERR1		; SOME SORT OF DATA ERROR
    254	001174	000737 				BR	RESTRT		; GIVE THE GUY/GAL ANOTHER CHANCE
    255	001176	005011 			30$:	CLR	(R1)		; SET DEFAULT BLOCK SIZE = 1
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 8
BAD BLOCK PROCESSOR

    257					;
    258					; CHECK IF BLOCK(S) EXCEED VOLUME LIMIT
    259					;
    260	001200	012702 	000004'		40$:	MOV	#BLKNUM,R2	; GET POINTER TO INPUT BLOCK(S)
    261	001204					CALL	VERIFY		; GO CHECK IF BLOCK IS ON THIS DISK
    262	001210	103003 				BCC	50$		; NO ERROR, SO SEE IF BLK IS ON FILE
    263	001212					CALL	BDERR2		; BLOCK EXCEEDS VOLUME LIMIT
    264	001216	000726 				BR	RESTRT		; LOOP FOR ANOTHER TRY
    265					;
    266					; CHECK IF BLOCK(S) ALREADY IN FILE
    267					;
    268	001220				50$:	CALL	ONFILE		; SEE IF THIS BLOCK(S) ALREADY NOTED
    269	001224	103323 				BCC	RESTRT		; NO INPUT ERROR, GET THE NEXT GROUP
    270	001226					CALL	BDERR4		; SOME BLOCK(S) MATCH - ERROR
    271	001232	000720 				BR	RESTRT		; TRY FOR SOME MORE
    272					;
    273					; COME HERE IF THE '/BAD' OPTION WAS NOT GIVEN IN THE COMMAND LINE
    274					;
    275	001234	012704 	000004'		BDEXIT:	MOV	#BLKNUM,R4	; GET A TWO WORD DATA BLOCK
    276	001240	012714 	177777 			MOV	#-1,(R4)	; SET INITIAL LBN = -1
    277	001244	012414 				MOV	(R4)+,(R4)	; REMEMBER IT'S DOUBLE PRECISION
    278	001246	012701 	000010'			MOV	#BLKSIZ,R1	; GET A PLACE TO HOLD THE BLOCK SIZE
    279	001252	005011 				CLR	(R1)		; SET THE SIZE = 1
    280	001254				10$:	CALL	NXTDSK		; CALCULATE THE END OF THIS DISK
    281	001260	103410 				BCS	20$		; NON-EXISTENT DISK
    282	001262	012702 	000002'			MOV	#DSKADR+2,R2	; GET ADDR OF PLACE TO HOLD THE DATA
    283	001266	016412 	177776 			MOV	-2(R4),(R2)	; SWAP THE HIGH ORDER BITS
    284	001272	011442 				MOV	(R4),-(R2)	; NOW THE LOW ORDER BITS
    285	001274					CALL	ONFILE		; GO PUT IT IN THE 'BAD BLOCK' FILE
    286	001300	000765 				BR	10$		; LOOP TILL WE HAVE MARKED THEM ALL
    287	001302				20$:	DIR$	#TTIDET		; DETACH THE TTY
    288	001310	012700 	000000G			MOV	#$IBBUF,R0	; GET ADDRESS OF 'BAD BLOCK' BUFFER
    289	001314					CALL	CHKSUM		; FORM THE CHECKSUM
    290	001320	010160 	000776 			MOV	R1,BB.CKS(R0)	; STORE THE CHECKSUM IN THE BUFFER
    291	001324					RETURN			; MORE TESTS TO DO BEFORE THIS VOLUME PASSES
    292					;
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 9
SUBROUTINES

    294						.SBTTL	SUBROUTINES
    295					;
    296					;+
    297					;
    298					; *** - NXTDSK - CODE TO INCREMENT THE GIVEN BLOCK NUMBER BY THE
    299					;		 SIZE OF THE DISK CURRENTLY UNDER INITIALIZATION.
    300					;
    301					; ENTRY:
    302					;
    303					;	CALL	NXTDSK
    304					;
    305					; INPUT:
    306					;
    307					;	R4 - ADDRESS OF TWO WORD BUFFER TO BE INCREMENTED
    308					;	      -2(R4) - HIGH ORDER BITS
    309					;	        (R4) - LOW ORDER BITS
    310					;
    311					; OUTPUT:
    312					;
    313					;	CC-C	CLEAR - BLOCK STILL IN VOLUME RANGE
    314					;		  SET - BLOCK OUT OF VOLUME RANGE
    315					;
    316					;-
    317					;
    318	001326	066714 	000010G		NXTDSK:	ADD	$IDVTP+10,(R4)	; ADD INCREMENTAL DISK SIZE
    319	001332	005544 				ADC	-(R4)		; WATCH FOR OVERFLOW
    320	001334	066714 	000006G			ADD	$IDVTP+6,(R4)	; NOW ADD THE HIGH ORDER BITS
    321	001340	026724 	000012G			CMP	$IDVTP+12,(R4)+	; CHECK IF WE ARE STILL IN RANGE
    322	001344	101006 				BHI	20$		; MUST BE
    323	001346	103403 				BLO	10$		; NO WAY IN THE WORLD
    324	001350	026714 	000014G			CMP	$IDVTP+14,(R4)	; COULD BE
    325	001354	101002 				BHI	20$		; JUST MADE IT
    326	001356	000261 			10$:	SEC			; SET THE CARRY FLAG
    327	001360	000401 				BR	30$		; AND EXIT
    328	001362	000241 			20$:	CLC			; CLEAR THE CARRY FLAG
    329	001364				30$:	RETURN			; AND EXIT
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 10
SUBROUTINES

    331					;
    332					;+
    333					;
    334					; *** - ONFILE - THIS ROUTINE CHECKS THAT A GIVEN CONTIGUOUS
    335					;		 SET OF BAD BLOCKS ARE NOT ALREADY ON FILE
    336					;		 AND IF NOT SAVES THE REFERENCE FOR FUTURE
    337					;		 USE.
    338					;
    339					; ENTRY:
    340					;
    341					;	CALL	ONFILE
    342					;
    343					; INPUTS:
    344					;
    345					;	R1 - POINTER TO LENGTH OF CONTIGUOUS BAD BLOCKS
    346					;	R2 - POINTER TO FIRST BAD BLOCK IN THIS GROUP
    347					;	      (R2) - LOW ORDER 16 BITS
    348					;	     2(R2) - HIGH ORDER 8 BITS
    349					;
    350					; OUTPUTS:
    351					;
    352					;	CC-C	CLEAR - BLOCK(S) NOT ON FILE
    353					;		  SET - BLOCK(S) MATCH OTHERS ALREADY ON FILE
    354					;
    355					;-
    356					;
    357	001366	010546 			ONFILE:	MOV	R5,-(SP)	     ; SAVE R5
    358	001370	010446 				MOV	R4,-(SP)	     ; SAVE R4
    359	001372	012705 	000146G			MOV	#$IBBUF+BD.PNT,R5    ; GET ADDRESS OF IN-CORE BUFFER
    360	001376	116504 	177776 			MOVB	BD.USE-BD.PNT(R5),R4 ; GET NUMBER OF BAD GROUPS IN USE
    361	001402	001406 				BEQ	ONOKAY		     ; NO NEED TO CHECK ANY MORE
    362	001404	126504 	177777 			CMPB	BD.MAX-BD.PNT(R5),R4 ; IS THE BUFFER ALREADY OVERFLOWING?
    363	001410	101413 				BLOS	ONERR2		; YES, SORRY - HOUSE FULL
    364	001412					CALL	MATCH		; SEE IF ANY BLOCKS MATCH
    365	001416	103417 				BCS	ONEXIT		; YES, SO MUST BE A BADNESS
    366	001420	016225 	000002 		ONOKAY:	MOV	2(R2),(R5)+	; SAVE THIS BLOCK NUMBER
    367	001424	011215 				MOV	(R2),(R5)	; INCLUDING THE LOW ORDER BITS
    368	001426	111145 				MOVB	(R1),-(R5)	; REMEMBER HOW LONG IT WAS
    369	001430	062767 	000002 	000144G		ADD	#BKLEN/2,$IBBUF+BD.USE ; BUMP GROUP COUNT IN FILE HEADER
    370	001436	000407 				BR	ONEXIT		; EXIT GRACEFULLY
    371	001440	012700 	000416'		ONERR2:	MOV	#ABOERR,R0	; THAT PACK MUST BELONG ON THE JUNK HEAP
    372	001444					DIR$	#TTIDET		; DETACH THE TTY
    373	001452	000167 	000000G			JMP	$INIER		; GO REPORT THE PROBLEM - BUT DON'T RETURN
    374	001456	012604 			ONEXIT:	MOV	(SP)+,R4	; RESTORE R4
    375	001460	012605 				MOV	(SP)+,R5	; RESTORE R5
    376	001462					RETURN			; EXIT TO CALLER
    377					;
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 11
SUBROUTINES

    379					;
    380					;+
    381					;
    382					; ERROR HANDLING AND MESSAGE SWITCHING ROUTINE
    383					;
    384					; ENTRY:
    385					;
    386					;	CALL	BDERRX
    387					;
    388					;	WHERE:
    389					;		X - INDICATES THE ERROR MESSAGE#
    390					;
    391					; RETURN:
    392					;
    393					;	ROUTINE RETURNS TO THE INSTRUCTION FOLLOWING THE CALL.
    394					;
    395					; REGISTERS:
    396					;
    397					;	R0 - SCRATCH
    398					;	R5 - SCRATCH
    399					;
    400					;-
    401					;
    402	001464	105267 	176324 		BDERR5:	INCB	BDERRN		; ERROR #5
    403	001470	105267 	176320 		BDERR4:	INCB	BDERRN		; ERROR #4
    404	001474	105267 	176314 		BDERR3:	INCB	BDERRN		; ERROR #3
    405	001500	105267 	176310 		BDERR2:	INCB	BDERRN		; ERROR #2
    406	001504	016700 	176304 		BDERR1:	MOV	BDERRN,R0	; GET ERROR NUMBER
    407	001510	016000 	000470'			MOV	BDERRL(R0),R0	; GET ADDRESS OF THIS MESSAGE
    408	001514					CALL	PRINT		; YES, GO OUTPUT THE 'GOOD' WORDS
    409	001520	000261 				SEC			; INFORM USER OF HIS/HER ERROR
    410	001522					RETURN			; RETURN TO THE PLACE WHENCE WE CAME [+2]
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 12
SUBROUTINES

    412					;
    413					;+
    414					;
    415					; *** - INPUT - ROUTINE TO FIRST ASK A QUESTION OF THE USER
    416					;		 AND THEN TO RECEIVE HIS REPLY.
    417					;
    418					; ENTRY:
    419					;
    420					;	CALL	INPUT
    421					;
    422					; INPUT:
    423					;
    424					;	R0 - ADDRESS OF MESSAGE TO SEND
    425					;
    426					; OUTPUT:
    427					;
    428					;	R0 - POINTS TO THE MESSAGE RECEIVED (IF ANY)
    429					;
    430					;	CC-C	CLEAR - SOME CHARACTERS WERE RECEIVED
    431					;		  SET - NO CHARACTERS WERE RECEIVED (ONLY TERMINATOR)
    432					;
    433					;-
    434					;
    435	001524	012767 	000044 	000020G	INPUT:	MOV	#'$,$ERDPB+20	; DON'T OUTPUT A CR & LF
    436	001532					CALL	PRINT		; GO PRINT THIS MESSAGE
    437	001536	012767 	000040 	000020G		MOV	#40,$ERDPB+20	; RESTORE OLD TERMINATOR VALUE
    438	001544					DIR$	#TTIDPB		; GET LINE FROM USER
    439	001552					WTSE$S	#BDEFN1		; WAIT FOR TTY TO FINISH
    440	001564	000261 				SEC			; ASSUME NO INPUT DATA
    441	001566	016700 	000002G			MOV	$INSTA+2,R0	; GET ACTUAL COUNT
    442	001572	001402 				BEQ	10$		; NO CHARACTERS INPUT
    443	001574	105060 	000070'			CLRB	TTIBUF(R0)	; TERMINATE INPUT WITH A NULL
    444	001600	012700 	000070'		10$:	MOV	#TTIBUF,R0	; SET POINTER TO INPUT BUFFER
    445	001604					RETURN			; EXIT
    446					;
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 13
SUBROUTINES

    448					;
    449					;+
    450					;
    451					; *** - PRINT - CODE TO CALL THE ERROR REPORT ROUTINE IN THE
    452					;		ROOT SEGMENT WITH THE OPTION OF RETURNING TO
    453					;		THE PLACE FROM WHERE IT WAS CALLED.
    454					;
    455					; ENTRY:
    456					;
    457					;	CALL	PRINT
    458					;
    459					; INPUT:
    460					;
    461					;	R0 - ADDRESS OF MESSAGE TO PRINT ON TTY
    462					;
    463					;-
    464					;
    465	001606	005267 	000000G		PRINT:	INC	$IERFL		; INFORM '$INIER' WE WANT TO RETURN
    466	001612					CALL	$INIER		; GO DO YOUR STUFF
    467	001616					RETURN			; RETURN TO WHERE WE LEFT OFF
    468					;
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 14
SUBROUTINES

    470					;
    471					;+
    472					;
    473					; *** - GETNUM - THIS ROUTINE WILL DETERMINE WHETHER THE NUMBER
    474					;		 TO BE CONVERTED IS EITHER OCTAL OR DECIMAL
    475					;		 AND CONVERT IT ACCORDINGLY TO A DOUBLE PRECISION
    476					;		 INTEGER NUMBER.
    477					;
    478					; ENTRY:
    479					;
    480					;	CALL	GETNUM
    481					;
    482					; INPUT:
    483					;
    484					;	R0 - ADDRESS OF NEXT DIGIT IN BUFFER
    485					;	R1 - ADDRESS OF TWO WORD FIELD FOR RESULT
    486					;		 (R1) - LOW 16 BITS
    487					;		2(R1) - HIGH 16 BITS
    488					;
    489					; OUTPUT:
    490					;
    491					;	R0 - UPDATED BUFFER POINTER
    492					;	R1 - UNCHANGED
    493					;	R2 - TERMINATING CHARACTER
    494					;
    495					;	CC-C	CLEAR - 16 BITS OR LESS IN CONVERTED NUMBER
    496					;		  SET - MORE THAN 16 BITS IN NUMBER
    497					;
    498					;-
    499					;
    500	001620	010046 			GETNUM:	MOV	R0,-(SP)	; SAVE R0 FOR LATER
    501	001622					CALL	.CDT2B		; CONVERT AS IF IT WERE DECIMAL
    502	001626	120227 	000056 			CMPB	R2,#'.		; IS THE NUMBER FOLLOWED BY A DECIMAL PT?
    503	001632	001002 				BNE	10$		; NO, MUST BE OCTAL NUMBER THEN
    504	001634	112002 				MOVB	(R0)+,R2	; YES, MOVE INPUT PTR & GET NEXT CHAR
    505	001636	000403 				BR	20$		; GO EXIT THIS ROUTINE
    506	001640	011600 			10$:	MOV	(SP),R0		; RESTORE INPUT PTR
    507	001642					CALL	.COT2B		; CALL OCTAL ROUTINE THIS TIME
    508	001646	005726 			20$:	TST	(SP)+		; JUNK THE OLD R0
    509	001650	005761 	000002 			TST	2(R1)		; SEE IF WE HAVE A 32 BIT NUMBER
    510	001654	001401 				BEQ	30$		; NO
    511	001656	000261 				SEC			; YES
    512	001660				30$:	RETURN			; EXIT TO CALLER
    513					;
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 15
SUBROUTINES

    515					;
    516					;+
    517					;
    518					; *** - CHKSUM - ROUTINE TO FORM THE CHECKSUM WORD OF A
    519					;		 STANDARD BLOCK OF DATA FROM WORDS 0-254.
    520					;
    521					; ENTRY:
    522					;
    523					;	CALL	CHKSUM
    524					;
    525					; INPUT:
    526					;
    527					;	R0 - ADDRESS OF BUFFER TO CHECK
    528					;
    529					; OUTPUT:
    530					;
    531					;	R0 - UNCHANGED
    532					;	R1 - VALUE OF CHECKSUM
    533					;
    534					;-
    535					;
    536	001662	010046 			CHKSUM:	MOV	R0,-(SP)	; SAVE R0
    537	001664	005046 				CLR	-(SP)		; CLEAR THE CHECKSUM VALUE
    538	001666	012701 	000377 			MOV	#255.,R1	; SETUP THE LOOP COUNTER
    539	001672	062016 			10$:	ADD	(R0)+,(SP)	; FORM THE CURRENT CHECKSUM VALUE
    540	001674	077102 				SOB	R1,10$		; ALL DONE?
    541	001676	012601 				MOV	(SP)+,R1	; YES, GET THE TOTAL CHECHKSUM
    542	001700	012600 				MOV	(SP)+,R0	; RESTORE R0
    543	001702					RETURN			; RETURN TO THE MAINLINE
    544					;
    545		000001 				.END
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 15-1
Symbol table

ABOERR  000416R  	IE.BYT= 177755   	IE.SDP= 177635   	IO.MDA= 016000   	IQ.X  = 000001
AUTO    000612R  	IE.CKP= 177766   	IE.SNC= 177735   	IO.MDI= 014400   	IS.BV = 000005
BB.CKS= 000776   	IE.CKS= 177742   	IE.SPC= 177772   	IO.MDO= 015400   	IS.CLR= 000000
BDEFN1= 000001   	IE.CLO= 177732   	IE.SQC= 177734   	IO.MLO= 006000   	IS.CR = 006401
BDERRL  000470R  	IE.CON= 177752   	IE.SRE= 177762   	IO.MOD= 003000   	IS.ESC= 015401
BDERRN  000014R  	IE.DAA= 177770   	IE.STK= 177706   	IO.MSO= 005000   	IS.PND= 000000
BDERR1  001504R  	IE.DAO= 177763   	IE.ULN= 177773   	IO.RAL= 001010   	IS.RDD= 000002
BDERR2  001500R  	IE.DFU= 177750   	IE.UPN= 177777   	IO.RAT= 013000   	IS.SET= 000002
BDERR3  001474R  	IE.DNA= 177771   	IE.VER= 177774   	IO.RBC= 003000   	IS.SUC= 000001
BDERR4  001470R  	IE.DNR= 177775   	IE.WAC= 177743   	IO.RCI= 015000   	KY.BAD= ****** GX
BDERR5  001464R  	IE.DUN= 177767   	IE.WAT= 177741   	IO.RCV= 015000   	MANUAL  001064R
BDEXIT  001234R  	IE.DUP= 177707   	IE.WER= 177737   	IO.RDB= 001200   	MATCH = ****** GX
BDLUN1= 000001   	IE.EBX= 177776   	IE.WLK= 177764   	IO.RDN= 000022   	M$$HDR= 000001
BDMES1  000130R  	IE.EOF= 177766   	IE.2DV= 177720   	IO.REL= 013400   	NXTDSK  001326R
BDOFFS= 000142   	IE.EOT= 177702   	INPUT   001524R  	IO.RHD= 001010   	ONERR2  001440R
BDUNIT  000150R  	IE.EOV= 177765   	IN.AUT= ****** GX	IO.RLB= 001000   	ONEXIT  001456R
BD.BLK= 000003   	IE.EXP= 177676   	IN.MAN= ****** GX	IO.RLV= 001100   	ONFILE  001366R
BD.LEN= 000001   	IE.FEX= 177717   	IO.ACE= 007400   	IO.RNA= 005400   	ONOKAY  001420R
BD.MAX= 000145   	IE.FHE= 177705   	IO.ACR= 006400   	IO.RNC= 001004   	PRINT   001606R
BD.PNT= 000146   	IE.FOP= 177713   	IO.ACW= 007000   	IO.RNE= 001020   	PROMPT  000155R
BD.USE= 000144   	IE.HFU= 177744   	IO.ADS= 014000   	IO.RTC= 003400   	Q.IOAE= 000012
BKLEN = 000004   	IE.HWR= 177772   	IO.APC= 014000   	IO.RTI= 016400   	Q.IOEF= 000006
BKSIZE= 000314   	IE.IDU= 177644   	IO.APV= 014010   	IO.RTK= 000060   	Q.IOFN= 000002
BKWRD1= 001401   	IE.IEF= 177637   	IO.ATT= 001400   	IO.RVB= 010400   	Q.IOLU= 000004
BKWRD2= 146000   	IE.IFC= 177776   	IO.CCI= 014000   	IO.RWD= 002400   	Q.IOPL= 000014
BLKNUM  000004R  	IE.IFU= 177747   	IO.CCT= 002460   	IO.RWU= 002540   	Q.IOPR= 000007
BLKSIZ  000010R  	IE.ILL= 177726   	IO.CLN= 003400   	IO.R1C= 002400   	Q.IOSB= 000010
CHKSUM  001662R  	IE.ILU= 177640   	IO.CON= 015400   	IO.SAO= 004000   	RESTRT  001074R
DSKADR  000000R  	IE.INS= 177776   	IO.CRC= 001020   	IO.SCS= 013000   	R$$10F= 000001
DVQIOR= ****** GX	IE.IPR= 177641   	IO.CRE= 012000   	IO.SDI= 013000   	R$$11D= 000001
ERROR1  000166R  	IE.ISQ= 177703   	IO.CTI= 015400   	IO.SDO= 012400   	R$$20F= 000001
ERROR2  000210R  	IE.ITI= 177643   	IO.CTL= 016400   	IO.SEC= 002520   	TTIATT  000040R
ERROR3  000254R  	IE.ITS= 177770   	IO.DAC= 010000   	IO.SEM= 002440   	TTIBUF  000070R
ERROR4  000313R  	IE.LCK= 177745   	IO.DCI= 014400   	IO.SHT= 002410   	TTIDET  000054R
ERROR5  000353R  	IE.LNL= 177646   	IO.DCT= 002470   	IO.SLO= 005400   	TTIDPB  000016R
E$$MSG= 000001   	IE.MBK= 177721   	IO.DEL= 012400   	IO.SMO= 002560   	VERIFY= ****** GX
E$$TRP= 000001   	IE.MOD= 177753   	IO.DET= 002000   	IO.SNM= 002450   	$ERDPB= ****** GX
F$$LVL= 000001   	IE.NBF= 177731   	IO.DIS= 016000   	IO.SPB= 002420   	$IBAD = ****** GX
GETNUM  001620R  	IE.NBK= 177727   	IO.DTI= 016000   	IO.SPF= 002440   	$IBBUF= ****** GX
IE.ABO= 177761   	IE.NFI= 177704   	IO.ENA= 006000   	IO.SSO= 004400   	$IDVTP= ****** GX
IE.ACT= 177771   	IE.NLN= 177733   	IO.EOF= 003000   	IO.SST= 002430   	$IERFL= ****** GX
IE.ADP= 177636   	IE.NNC= 177674   	IO.ESA= 002500   	IO.STC= 002500   	$IKEY = ****** GX
IE.ALN= 177736   	IE.NOD= 177751   	IO.EXT= 011400   	IO.STP= 016400   	$INBAD  000502RG
IE.AST= 177660   	IE.NSF= 177746   	IO.FDX= 003020   	IO.SYN= 003040   	$INDPB= ****** GX
IE.BAD= 177777   	IE.OFL= 177677   	IO.FNA= 004400   	IO.TRM= 002410   	$INIER= ****** GX
IE.BBE= 177710   	IE.ONP= 177773   	IO.HDX= 003010   	IO.UNL= 000042   	$INSTA= ****** GX
IE.BDI= 177714   	IE.OVR= 177756   	IO.HIS= 015000   	IO.WAT= 013400   	$WBUF = ****** GX
IE.BDR= 177716   	IE.PRI= 177760   	IO.INL= 002400   	IO.WLB= 000400   	$$    = 000067
IE.BDV= 177711   	IE.RAC= 177724   	IO.ITI= 017000   	IO.WLS= 000410   	$$MSG = 000000
IE.BHD= 177700   	IE.RAT= 177723   	IO.KIL= 000012   	IO.WLV= 000500   	$$$ARG= 000006
IE.BLK= 177754   	IE.RBG= 177730   	IO.LED= 012000   	IO.WVB= 011000   	$$$OST= 000014
IE.BNM= 177712   	IE.RCN= 177722   	IO.LOV= 001010   	IO.XMT= 014400   	.CDT2B= ****** GX
IE.BTF= 177675   	IE.RER= 177740   	IO.LTK= 000050   	IO.XNA= 014410   	.COT2B= ****** GX
IE.BTP= 177725   	IE.RNM= 177715   	IO.MCS= 013400   	IQ.Q  = 000002   	...GBL= 000000
IE.BVR= 177701   	IE.RSU= 177757

. ABS.	000000    000	(RW,I,GBL,ABS,OVR)
INIBAD - SETUP 'BAD BLOCK' FILE	MACRO V05.04  Tuesday 10-May-88 15:44  Page 15-2
Symbol table

      	001704    001	(RW,I,LCL,REL,CON)
Errors detected:  0

*** Assembler statistics


Work  file  reads: 0
Work  file writes: 0
Size of work file: 11108 Words  ( 44 Pages)
Size of core pool: 12356 Words  ( 47 Pages)
Operating  system: RSX-11M/PLUS

Elapsed time: 00:00:37.39
[53,10]INIBAD,[53,20]INIBAD/-SP/CR=[53,30]RSXDC,INIBAD
INIBAD     CREATED BY  MACRO  ON 10-MAY-88 AT 15:44	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

ABOERR	  000416 R	#5-97       10-371    
AUTO  	  000612 R	#7-155     
BB.CKS	= 000776	#4-40       7-170     *8-290     
BDEFN1	= 000001	#4-37       4-65       4-67       4-69       12-439    
BDERRL	  000470 R	#5-104      11-407    
BDERRN	  000014 R	#4-60      *6-134     *11-402    *11-403    *11-404    *11-405     11-406    
BDERR1	  001504 R	 7-253      7-253     #11-406    
BDERR2	  001500 R	 7-215      7-215      8-263      8-263     #11-405    
BDERR3	  001474 R	 7-183      7-183     #11-404    
BDERR4	  001470 R	 7-217      7-217      8-270      8-270     #11-403    
BDERR5	  001464 R	 7-218      7-218     #11-402    
BDEXIT	  001234 R	 6-143      7-231      7-234     #8-275     
BDLUN1	= 000001	#4-38       4-65       4-67       4-69      
BDMES1	  000130 R	#5-82       7-157     
BDOFFS	= 000142	#4-39       4-43       4-44       4-45       4-47      *6-139     *6-140     
BDUNIT	  000150 R	#5-83      *6-145     *6-148     
BD.BLK	= 000003	#4-41       4-46       4-48      
BD.LEN	= 000001	#4-42       4-46       4-48      
BD.MAX	= 000145	#4-43       10-362    
BD.PNT	= 000146	#4-44       10-359     10-360     10-362    
BD.USE	= 000144	#4-45       7-189     *7-219      10-360    *10-369    
BKLEN 	= 000004	#4-46       10-369    
BKSIZE	= 000314	#4-47       4-49       7-178     
BKWRD1	= 001401	#4-48       6-139      7-172     
BKWRD2	= 146000	#4-49       6-140     
BLKNUM	  000004 R	#4-58       7-192      7-235      8-260      8-275     
BLKSIZ	  000010 R	#4-59       7-190      7-242      8-278     
CHKSUM	  001662 R	 7-169      7-169      8-289      8-289     #15-536    
DSKADR	  000000 R	#4-57      *6-149     *6-150      7-162      7-163      8-282     
DVQIOR	= ******  GX	 7-167      7-167     
ERROR1	  000166 R	#5-87       5-104     
ERROR2	  000210 R	#5-89       5-105     
ERROR3	  000254 R	#5-91       5-106     
ERROR4	  000313 R	#5-93       5-107     
ERROR5	  000353 R	#5-95       5-108     
E$$MSG	= 000001	#1-33      
E$$TRP	= 000001	#1-32      
F$$LVL	= 000001	#1-28      
GETNUM	  001620 R	 7-236      7-236      7-247      7-247     #14-500    
INPUT 	  001524 R	 7-233      7-233     #12-435    
IN.AUT	= ******  GX	 7-155     
IN.MAN	= ******  GX	 7-230     
IO.ATT	= 001400	 4-67      
IO.DET	= 002000	 4-69      
IO.RLB	= 001000	 4-65      
KY.BAD	= ******  GX	 6-141     
MANUAL	  001064 R	 7-156     #7-230     
MATCH 	= ******  GX	 10-364     10-364    
M$$HDR	= 000001	#1-34      
NXTDSK	  001326 R	 7-164      7-164      8-280      8-280     #9-318     
ONERR2	  001440 R	 10-363    #10-371    
ONEXIT	  001456 R	 10-365     10-370    #10-374    
INIBAD     CREATED BY  MACRO  ON 10-MAY-88 AT 15:44	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

ONFILE	  001366 R	 7-204      7-204      7-213      7-213      8-268      8-268      8-285      8-285     #10-357    
ONOKAY	  001420 R	 10-361    #10-366    
PRINT 	  001606 R	 7-158      7-158      11-408     11-408     12-436     12-436    #13-465    
PROMPT	  000155 R	#5-85       7-232     
Q.IOAE	= 000012	#4-65      #4-67      #4-69      
Q.IOEF	= 000006	#4-65      #4-67      #4-69      
Q.IOFN	= 000002	#4-65      #4-67      #4-69      
Q.IOLU	= 000004	#4-65      #4-67      #4-69      
Q.IOPL	= 000014	#4-65      #4-67      #4-69      *7-160     
Q.IOPR	= 000007	#4-65      #4-67      #4-69      
Q.IOSB	= 000010	#4-65      #4-67      #4-69      
RESTRT	  001074 R	#7-232      7-254      8-264      8-269      8-271     
R$$10F	= 000001	#1-30      
R$$11D	= 000001	#1-29      
R$$20F	= 000001	#1-31      
S$$YDF	= ******	 1-1        1-37      
TTIATT	  000040 R	#4-67       6-133     
TTIBUF	  000070 R	 4-65      #4-71      *12-443     12-444    
TTIDET	  000054 R	#4-69       8-287      10-372    
TTIDPB	  000016 R	#4-65       12-438    
VERIFY	= ******  GX	 7-202      7-202      8-261      8-261     
$ERDPB	= ******  GX	*12-435    *12-437    
$IBAD 	= ******  GX	 7-155      7-230     
$IBBUF	= ******  GX	 6-135     *6-139     *6-140      7-189     *7-219      8-288      10-359    *10-369    
$IDVTP	= ******  GX	 6-144      9-318      9-320      9-321      9-324     
$IERFL	= ******  GX	*13-465    
$IKEY 	= ******  GX	 6-141     
$INBAD	  000502 RG	#6-133     
$INDPB	= ******  GX	*7-160      7-161     
$INIER	= ******  GX	 10-373     13-466     13-466    
$INSTA	= ******  GX	 4-65       12-441    
$MUVOL	= ******	 7-197      7-221     
$WBUF 	= ******  GX	 7-159     
$$    	= 000067	#7-158      7-158     #7-164      7-164     #7-167      7-167     #7-169      7-169     #7-183     
                         7-183     #7-202      7-202     #7-204      7-204     #7-213      7-213     #7-215      7-215     
                        #7-217      7-217     #7-218      7-218     #7-233      7-233     #7-236      7-236     #7-247     
                         7-247     #7-253      7-253     #8-261      8-261     #8-263      8-263     #8-268      8-268     
                        #8-270      8-270     #8-280      8-280     #8-285      8-285     #8-289      8-289     #10-364    
                         10-364    #11-408     11-408    #12-436     12-436    #13-466     13-466    #14-501     14-501    
                        #14-507     14-507    
$$$ARG	= 000006	#4-65       4-65      #4-65       4-65      #4-65       4-65      #4-65       4-65      #4-67      
                         4-67      #4-69       4-69      
$$$GLB	= ******	 4-65       4-65       4-65       4-65       4-65       4-65       4-65       4-65       4-67      
                         4-67       4-67       4-67       4-67       4-67       4-67       4-67       4-69       4-69      
                         4-69       4-69       4-69       4-69       4-69       4-69      
$$$OST	= 000014	#4-65       4-65       4-65      #4-65       4-65       4-65      #4-65       4-65       4-65      
                        #4-65       4-65       4-65      #4-65       4-65       4-65      #4-65       4-65       4-65      
                        #4-65       4-65      #4-67       4-67       4-67      #4-67       4-67       4-67      #4-67      
                         4-67       4-67      #4-67       4-67       4-67      #4-67       4-67       4-67      #4-67      
                         4-67       4-67      #4-67       4-67      #4-69       4-69       4-69      #4-69       4-69      
                         4-69      #4-69       4-69       4-69      #4-69       4-69       4-69      #4-69       4-69      
                         4-69      #4-69       4-69       4-69      #4-69       4-69      
INIBAD     CREATED BY  MACRO  ON 10-MAY-88 AT 15:44	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

.CDT2B	= ******  GX	 14-501     14-501    
.COT2B	= ******  GX	 14-507     14-507    
INIBAD     CREATED BY  MACRO  ON 10-MAY-88 AT 15:44	PAGE 4

MACRO CROSS REFERENCE                                   CREF   04.00 

MACRO NAME	REFERENCES

ALUN$ 		#3-31      
CALL  		#3-31       7-158      7-164      7-167      7-169      7-183      7-202      7-204      7-213      7-215     
                 7-217      7-218      7-233      7-236      7-247      7-253      8-261      8-263      8-268      8-270     
                 8-280      8-285      8-289      10-364     11-408     12-436     13-466     14-501     14-507    
DIR$  		#3-31       6-133      8-287      10-372     12-438    #12-439     12-439    
ERR$  		#6-133     #8-287     #10-372    #12-438    #12-439    
MOV$  		#12-439     12-439    
OFF$  		#4-65       4-65       4-65       4-65       4-65       4-65       4-65       4-65       4-65      #4-67      
                 4-67       4-67       4-67       4-67       4-67       4-67       4-67       4-67      #4-69       4-69      
                 4-69       4-69       4-69       4-69       4-69       4-69       4-69      
QDPB$ 		#4-65       4-65      #4-67       4-67      #4-69       4-69      
QIOSY$		#3-31       4-53      
QIO$  		#3-31       4-65       4-67       4-69      
RETURN		#3-31       8-291      9-329      10-376     11-410     12-445     13-467     14-512     15-543    
WTSE$ 		#3-31      
WTSE$S		#3-31       12-439    
INIBIT - FILE BITMAP ALLOCATION	MACRO V05.04  Tuesday 10-May-88 15:44
Table of contents

     4-   35	CONSTANTS AND LOCAL DATA
     5-   63	FILE BITMAP ALLOCATION
RSXDC	MACRO V05.04  Tuesday 10-May-88 15:44  Page 2


     39
INIBIT - FILE BITMAP ALLOCATION	MACRO V05.04  Tuesday 10-May-88 15:44  Page 3


      1						.TITLE	INIBIT - FILE BITMAP ALLOCATION
      2						.IDENT	/01/
      3					;
      4					;                             COPYRIGHT (C) 1974, 1978, 1985 BY
      5					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      6					;			ALL RIGHTS RESERVED.
      7					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      8					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
      9					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     10					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     11					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     12					;
     13					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     14					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     15					;       CORPORATION.
     16					;
     17					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     18					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     19					;
     20					;
     21
     22					;
     23					; VERSION:	V002A
     24					; BY:		STEVE HORT
     25					; DATE:		1-JUL-74
     26					; EDIT:		001	8/12/74	13:30:00
     27					;
     28					;
     29					; THIS OVERLAY CODE IS USED TO ALLOCATE ALL SYSTEM BLOCKS IN THE
     30					; VOLUME BIT MAP. THIS INCLUDES ALL KNOWN 'BAD BLOCKS'.
     31					;
     32
     33						.MCALL	CALL,DIR$,QIOSY$,RETURN,WTSE$S
INIBIT - FILE BITMAP ALLOCATION	MACRO V05.04  Tuesday 10-May-88 15:44  Page 4
CONSTANTS AND LOCAL DATA

     35						.SBTTL	CONSTANTS AND LOCAL DATA
     36					;
     37					; EQUATED SYMBOLS
     38					;
     39		000001 			BDEFN1	=	1		; EVENT FLAG
     40		000142 			BDOFFS	=	142		; OFFSET TO START OF 'BAD BLOCK' FILE
     41					;
     42					; EXTERNAL DATA
     43					;
     44	000000					QIOSY$			; DEFINE I/O CODES
     45					;
     46			.NLIST	BIN
     47		;
     48		; ERROR MESSAGE
     49		;
     50	000000	BTMSG1:	.ASCIZ	/INI -- DEVICE NOT READY/
     51		;
     52	000030	BTMSG2:	.ASCIZ	/INI -- DEVICE WRITE-LOCKED/
     53		;
     54			.EVEN
     55		;
     56						.LIST	BIN
     57					;
     58					; LOCAL DATA
     59					;
     60	000064				BMBUF:	.BLKW	256.		; BITMAP SPECIAL BUFFER
     61					;
INIBIT - FILE BITMAP ALLOCATION	MACRO V05.04  Tuesday 10-May-88 15:44  Page 5
FILE BITMAP ALLOCATION

     63						.SBTTL	FILE BITMAP ALLOCATION
     64					;
     65					;+
     66					;
     67					; *** - $INSTB - ALLOCATES SPACE ON THE SYSTEM VOLUME
     68					;		 FOR ANY AND ALL SYSTEM FILES.
     69					;
     70					; ENTRY:
     71					;
     72					;	CALL	$INSTB
     73					;
     74					;
     75	001064	012700 	000400 		$INSTB::MOV	#256.,R0	; SETUP TO 'ZERO' THE FILE BITMAP
     76	001070	012701 	000064'			MOV	#BMBUF,R1	; THE 'SPECIAL' ONE FIRST
     77	001074	005021 			10$:	CLR	(R1)+		; ZERO THIS WORD
     78	001076	077002 				SOB	R0,10$		; CARRY ON TILL THE BITTER END
     79	001100	012700 	000400 			MOV	#256.,R0	; DO IT ALL AGAIN BUT WITH 1'S
     80	001104	012701 	000000G			MOV	#$WBUF,R1	; GET ADDRESS OF WORK BUFFER
     81	001110	010167 	000014G			MOV	R1,$INDPB+14	; SET BUFFER ADDRESS
     82	001114	012721 	177777 		20$:	MOV	#-1,(R1)+	; SET ALL BITS TO A '1'
     83	001120	077003 				SOB	R0,20$		; FILL COMPLETLY
     84	001122	116767 	000000G	000022G		MOVB	$SBMAP,$INDPB+22   ; GET HIGH ORDER PART OF BITMAP BLK#
     85	001130	016767 	000002G	000024G		MOV	$SBMAP+2,$INDPB+24 ; GET LOW ORDER BITS OF ABOVE
     86	001136	005000 				CLR	R0		; CLEAR UPPER BYTE OF REGISTER
     87	001140	156700 	000001G			BISB	$SBMAP+1,R0	; GET COUNT OF THE NUMBER OF BLOCKS
     88	001144	001410 				BEQ	40$		; LAST BLOCK TO MARK
     89	001146				30$:	CALL	DVQIOW		; GO WRITE THIS BLOCK OUT
     90	001152	062767 	000001 	000024G		ADD	#1,$INDPB+24	; BUMP TO THE NEXT BLOCK#
     91	001160	005567 	000022G			ADC	$INDPB+22	; ADD IN ANY OVERFLOW
     92	001164	077010 				SOB	R0,30$		; ALL FINISHED?
     93					;
     94					; HANDLE LAST BLOCK IN BITMAP FILE
     95					;
     96	001166	016700 	000012G		40$:	MOV	$IDVTP+12,R0	; GET HIGH ORDER OF MAX BLOCK#
     97	001172	016701 	000014G			MOV	$IDVTP+14,R1	; GET LOW ORDER OF SAME
     98	001176	012702 	010000 			MOV	#4096.,R2	; FIND OUT HOW MANY BLOCKS
     99	001202					CALL	DIVIDE		; PLUS THE REMAINDER
    100	001206	005201 				INC	R1		; AT LEAST ONE BLOCK
    101	001210	110167 	176653 			MOVB	R1,BMBUF+3	; SET NUMBER OF BLOCKS IN BITMAP
    102	001214	006301 				ASL	R1		; FORM OFFSET
    103	001216	006301 				ASL	R1		; TO THE LAST BM BLOCK
    104	001220	010146 				MOV	R1,-(SP)	; SAVE FOR LATER
    105	001222	012705 	000004 			MOV	#4,R5		; SET INITIAL OFFSET INTO FIRST BM BLOCK
    106	001226	012765 	010000 	000064'	50$:	MOV	#4096.,BMBUF(R5) ; SET MAX 'FREE' BLOCKS
    107	001234	022525 				CMP	(R5)+,(R5)+	; BUMP OFFSET POINTER
    108	001236	020105 				CMP	R1,R5		; FILLED IN ALL THE HOLES?
    109	001240	003372 				BGT	50$		; NO
    110	001242					CALL	GETBIT		; GET BIT POSITION FOR THIS BLOCK
    111	001246	012600 				MOV	(SP)+,R0	; RESTORE OFFSET TO FIRST BITMAP BLOCK
    112	001250	040561 	000000G		60$:	BIC	R5,$WBUF(R1)	; CLEAR THIS BLOCK'S BIT
    113	001254	005360 	000064'			DEC	BMBUF(R0)	; ONE LESS FREE BLOCK
    114	001260	006305 				ASL	R5		; SHIFT MASK ALONG
    115	001262	001372 				BNE	60$		; AND DO IT OVER AGAIN
    116	001264	005721 			70$:	TST	(R1)+		; BUMP BYTE POINTER
    117	001266	020127 	001000 			CMP	R1,#512.	; AT THE END YET?
    118	001272	002006 				BGE	80$		; YES
    119	001274	005061 	000000G			CLR	$WBUF(R1)	; 'SET' THESE BLOCKS IN 'USE'
INIBIT - FILE BITMAP ALLOCATION	MACRO V05.04  Tuesday 10-May-88 15:44  Page 5-1
FILE BITMAP ALLOCATION

    120	001300	162760 	000020 	000064'		SUB	#16.,BMBUF(R0)	; 16. BLOCKS JUST BECAME 'IN USE'
    121	001306	000766 				BR	70$		; LOOP THE LOOP
    122	001310				80$:	CALL	DVQIOW		; WRITE LAST BLOCK OUT
    123					;
    124					; MARK AS 'IN USE' ALL 'BAD BLOCKS' AND 'SYS' FILES
    125					;
    126	001314	012702 	000146G			MOV	#$IBBUF+BDOFFS+4,R2 ; GET ADDRESS OF BAD BLOCK FILE
    127	001320					CALL	TICOFF		; MARK OFF THE RESPECTIVE BITS
    128	001324	012702 	000000G			MOV	#$BTBLK,R2	; NOW ENTER THE OTHER FILES
    129	001330					CALL	TICOFF		; SET THE APPROPRIATE BITS IN THE MAP
    130	001334	116700 	000001G			MOVB	$SBMAP+1,R0	; GET NUMBER OF BITMAP BLOCKS
    131	001340	005200 				INC	R0		; ADD ONE FOR THE 'FIRST' BLOCK
    132	001342	006300 				ASL	R0		; FORM BYTE ADDRESS
    133	001344	006300 				ASL	R0		; FOR OFFSET POINTER
    134	001346	016760 	000012G	000064'		MOV	$IDVTP+12,BMBUF(R0) ; STORE HIGH ORDER BITS OF MAX BLK#
    135	001354	005720 				TST	(R0)+		    ; BUMP POINTER
    136	001356	016760 	000014G	000064'		MOV	$IDVTP+14,BMBUF(R0) ; NOW PUT IN THE LOW ORDER BITS
    137	001364	012767 	000064'	000014G		MOV	#BMBUF,$INDPB+14    ; SETUP THE BUFFER ADDRESS
    138	001372	116767 	000000G	000022G		MOVB	$SBMAP,$INDPB+22    ; RESET DEVICE BLOCK#
    139	001400	016767 	000002G	000024G		MOV	$SBMAP+2,$INDPB+24  ; IN DPB
    140	001406					CALL	DVQIOW		; WRITE THIS LOT OUT
    141	001412					RETURN			; EXIT TO CALLER
    142					;
INIBIT - FILE BITMAP ALLOCATION	MACRO V05.04  Tuesday 10-May-88 15:44  Page 6
FILE BITMAP ALLOCATION

    144					;
    145					;+
    146					;
    147					; *** - TICOFF - ROUTINE TO CALL THE FILE BITMAP ALLOCATER.
    148					;
    149					; ENTRY:	CALL	TICOFF
    150					;
    151					; INPUT:
    152					;
    153					;	R1 - SCRATCH
    154					;	R2 - ADDRESS OF GROUPS OF BLOCK NUMBERS TO ENTER
    155					;	     -2(R2) - NUMBER OF GROUPS TO ENTER
    156					;	       (R2) - HIGH 8-BITS OF BLOCK NUMBER
    157					;	      1(R2) - LENGTH OF THIS GROUP OF BLOCKS
    158					;	      2(R2) - LOW 16-BITS OF BLOCK NUMBER
    159					;
    160					;-
    161					;
    162	001414	116201 	177776 		TICOFF:	MOVB	-2(R2),R1	; GET NUMBER OF 'FILES' TO ENTER
    163	001420	006201 				ASR	R1		; ONLY HALF THOSE INDICATED
    164	001422	001404 				BEQ	20$		; NONE TO MARK IN THIS LOT
    165	001424				10$:	CALL	BITMAP		; GO ALLOCATE THIS LOT
    166	001430	022222 				CMP	(R2)+,(R2)+	; BUMP GROUP POINTER
    167	001432	077104 				SOB	R1,10$		; ONLY THE LOOP
    168	001434				20$:	RETURN			; EXIT TO THE NEXT HIGHER LEVEL
    169					;
INIBIT - FILE BITMAP ALLOCATION	MACRO V05.04  Tuesday 10-May-88 15:44  Page 7
FILE BITMAP ALLOCATION

    171					;
    172					;+
    173					; *** - GETBIT - CODE TO DETERMINE THE STARTING BIT POSITION
    174					;		 OF A MASK PATTERN WHICH IS USED TO MARK OFF
    175					;		 THE SYSTEM BITMAP.
    176					;
    177					; ENTRY:	CALL	GETBIT
    178					;
    179					; INPUT:
    180					;
    181					;	R0 - ZERO
    182					;	R1 - SCRATCH
    183					;	R2 - RELATIVE BLOCK# WITHIN A PARTICULAR BLOCK OF POINTERS
    184					;
    185					; OUTPUT:
    186					;
    187					;	R1 - RELATIVE OFFSET INTO BITMAP BLOCK
    188					;	R5 - BIT POINTER TO ACTUAL BLOCK CONTAINED WITHIN
    189					;	     THIS WORD OF THE MAP.
    190					;
    191					;-
    192					;
    193	001436	010201 			GETBIT:	MOV	R2,R1		; NOW FIND WORD# IN THIS BLOCK
    194	001440	012702 	000020 			MOV	#16.,R2		; PLUS BITS REMAINING
    195	001444					CALL	DIVIDE		; GIVES OFFSET INTO BLOCK + BIT IN WORD
    196	001450	006301 				ASL	R1		; GET BYTE OFFSET
    197	001452	005202 				INC	R2		; BUMP BIT POSITION COUNTER
    198	001454	005005 				CLR	R5		; CLEAR MASK
    199	001456	000261 				SEC			; SET INITIAL BIT FOR MASK
    200	001460	006105 			10$:	ROL	R5		; SHIFT MASK TO NEXT POSITION
    201	001462	077202 				SOB	R2,10$		; GET MASK TO CORRECT PLACE
    202	001464					RETURN			; RETURN TO CALLER
INIBIT - FILE BITMAP ALLOCATION	MACRO V05.04  Tuesday 10-May-88 15:44  Page 8
FILE BITMAP ALLOCATION

    204					;
    205					;+
    206					;
    207					; *** - BITMAP - FILE BIT MAP ALLOCATER. TAKES A GIVEN LBN PLUS A BLOCK
    208					;		 LENGTH AND ALLOCATES THE RESPECTIVE BLOCKS IN THE SYSTEM
    209					;		 BITMAP FILE.
    210					;
    211					; ENTRY:
    212					;
    213					;	CALL	BITMAP
    214					;
    215					; INPUT:
    216					;
    217					;	R2 - POINTER TO LBN + SIZE
    218					;	      (R2) - HIGH ORDER 8 BITS OF LBN
    219					;	     1(R2) - SIZE OF BLOCK GROUP
    220					;	     2(R2) - LOW ORDER 16 BITS OF LBN
    221					;
    222					;-
    223					;
    224	001466	010046 			BITMAP:: MOV	R0,-(SP)	;SAVE R0
    225	001470	010146 				MOV	R1,-(SP)	; SAVE R1
    226	001472	010246 				MOV	R2,-(SP)	; SAVE R2
    227	001474	010346 				MOV	R3,-(SP)	; SAVE R3 THIS TIME
    228	001476	010446 				MOV	R4,-(SP)	; AND R4
    229	001500	010546 				MOV	R5,-(SP)	; AS WELL AS R5
    230	001502	012767 	000000G	000014G		MOV	#$WBUF,$INDPB+14 ; GET ADDRESS OF BUFFER TO USE
    231	001510	005003 				CLR	R3		; CLEAR THE UPPER BYTE
    232	001512	156203 	000001 			BISB	1(R2),R3	; GET SIZE OF BLOCK TO ALLOCATE
    233	001516	005203 				INC	R3		; ONE MORE THAN INDICATED
    234	001520	005000 				CLR	R0		; ZERO HIGH ORDER BITS OF DIVIDEND
    235	001522	151200 				BISB	(R2),R0		; GET HIGH ORDER 8 BITS
    236	001524	016201 	000002 			MOV	2(R2),R1	; GET LOW ORDER 16 BITS OF LBN
    237	001530	012702 	010000 			MOV	#4096.,R2	; DIVIDE BY 4096.
    238	001534					CALL	DIVIDE		; FIND OUT WHICH BITMAP BLOCK WE NEED
    239	001540	012704 	000024G			MOV	#$INDPB+24,R4	; GET ADDRESS OF BLOCK# IN DPB
    240	001544	116764 	000000G	177776 		MOVB	$SBMAP,-2(R4)	; MOVE START BLOCK# OF
    241	001552	016714 	000002G			MOV	$SBMAP+2,(R4)	; BITMAP FILE TO DPB
    242	001556	005201 				INC	R1		; DON'T USE THE FIRST BLOCK
    243	001560	060114 				ADD	R1,(R4)		; ADD OFFSET FOR THIS LBN
    244	001562	005544 				ADC	-(R4)		; WATCH FOR ANY OVERFLOW
    245	001564	006301 				ASL	R1		; DOUBLE OFFSET
    246	001566	006301 				ASL	R1		; AND AGAIN
    247	001570	010146 				MOV	R1,-(SP)	; SAVE FOR LATER
    248	001572					CALL	GETBIT		; GO GET THE FIRST BIT FOR THIS FILE
    249	001576				10$:	CALL	DVQIOR		; GO READ THIS BLOCK
    250	001602	103442 				BCS	BTERR1		; SOME SORT OF DEVICE ERROR
    251	001604	040561 	000000G		20$:	BIC	R5,$WBUF(R1)	; MARK THIS BLOCK OFF IN THE MAP
    252	001610	011600 				MOV	(SP),R0		; GET OFFSET INTO FIRST BITMAP BLOCK
    253	001612	005360 	000064'			DEC	BMBUF(R0)	; MARK NUMBER OF BLOCKS IN USE
    254	001616	005303 			30$:	DEC	R3		; IS THIS GROUP ALL ENTERED?
    255	001620	003420 				BLE	50$		; YES
    256	001622	006305 				ASL	R5		; SHIFT BIT MASK TO NEXT POSITION
    257	001624	001367 				BNE	20$		; LOOP UNTIL WE NEED ANOTHER WORD IN THE FILE
    258	001626	005721 				TST	(R1)+		; BUMP POINTER TO OFFSET IN BITMAP BLOCK
    259	001630	005205 				INC	R5		; RESET BIT MARKER OFFER
    260	001632	022701 	001000 			CMP	#512.,R1	; AT THE END OF THIS BLOCK?
INIBIT - FILE BITMAP ALLOCATION	MACRO V05.04  Tuesday 10-May-88 15:44  Page 8-1
FILE BITMAP ALLOCATION

    261	001636	003362 				BGT	20$		; NO
    262	001640	005001 				CLR	R1		; RESET THE OFFSET INTO BUFFER
    263	001642					CALL	DVQIOW		; YES, WRITE IT OUT TO THE DISK
    264	001646	103423 				BCS	BTERR2		; ANOTHER TYPE OF DEVICE ERROR
    265	001650	062764 	000001 	000002 	40$:	ADD	#1,+2(R4)	; BUMP THE BITMAP BLOCK NUMBER
    266	001656	005514 				ADC	(R4)		; TAKE CARE!
    267	001660	000746 				BR	10$		; KEEP PLUGGING THOSE HOLES
    268	001662	005726 			50$:	TST	(SP)+		; JUNK THE TOP OF THE STACK
    269	001664					CALL	DVQIOW		; WRITE THE LAST BLOCK OUT
    270	001670	103412 				BCS	BTERR2		; STILL ANOTHER ERROR
    271	001672	012605 				MOV	(SP)+,R5	; RESTORE R5
    272	001674	012604 				MOV	(SP)+,R4	; AND R4
    273	001676	012603 				MOV	(SP)+,R3	; DON'T FORGET R3
    274	001700	012602 				MOV	(SP)+,R2	; RESTORE R2
    275	001702	012601 				MOV	(SP)+,R1	; RESTORE R1
    276	001704	012600 				MOV	(SP)+,R0	; RESTORE R0
    277	001706					RETURN			; RETURN TO CALLER
    278					;
    279	001710	012700 	000000'		BTERR1:	MOV	#BTMSG1,R0	; GET THE MESSAGE ADDRESS
    280	001714	000402 				BR	BTERRC		; TAKE COMMON EXIT
    281	001716	012700 	000030'		BTERR2:	MOV	#BTMSG2,R0	; GET THE ADDRESS OF THIS MESSAGE
    282	001722	000167 	000000G		BTERRC:	JMP	$INIER		; GO PRINT THE ERROR TYPE
    283					;
    284					;
    285		000001 				.END
INIBIT - FILE BITMAP ALLOCATION	MACRO V05.04  Tuesday 10-May-88 15:44  Page 8-2
Symbol table

BDEFN1= 000001   	IE.EBX= 177776   	IE.SNC= 177735   	IO.INL= 002400   	IO.SNM= 002450
BDOFFS= 000142   	IE.EOF= 177766   	IE.SPC= 177772   	IO.ITI= 017000   	IO.SPB= 002420
BITMAP  001466RG 	IE.EOT= 177702   	IE.SQC= 177734   	IO.KIL= 000012   	IO.SPF= 002440
BMBUF   000064R  	IE.EOV= 177765   	IE.SRE= 177762   	IO.LED= 012000   	IO.SSO= 004400
BTERRC  001722R  	IE.EXP= 177676   	IE.STK= 177706   	IO.LOV= 001010   	IO.SST= 002430
BTERR1  001710R  	IE.FEX= 177717   	IE.ULN= 177773   	IO.LTK= 000050   	IO.STC= 002500
BTERR2  001716R  	IE.FHE= 177705   	IE.UPN= 177777   	IO.MCS= 013400   	IO.STP= 016400
BTMSG1  000000R  	IE.FOP= 177713   	IE.VER= 177774   	IO.MDA= 016000   	IO.SYN= 003040
BTMSG2  000030R  	IE.HFU= 177744   	IE.WAC= 177743   	IO.MDI= 014400   	IO.TRM= 002410
DIVIDE= ****** GX	IE.HWR= 177772   	IE.WAT= 177741   	IO.MDO= 015400   	IO.UNL= 000042
DVQIOR= ****** GX	IE.IDU= 177644   	IE.WER= 177737   	IO.MLO= 006000   	IO.WAT= 013400
DVQIOW= ****** GX	IE.IEF= 177637   	IE.WLK= 177764   	IO.MOD= 003000   	IO.WLB= 000400
E$$MSG= 000001   	IE.IFC= 177776   	IE.2DV= 177720   	IO.MSO= 005000   	IO.WLS= 000410
E$$TRP= 000001   	IE.IFU= 177747   	IO.ACE= 007400   	IO.RAL= 001010   	IO.WLV= 000500
F$$LVL= 000001   	IE.ILL= 177726   	IO.ACR= 006400   	IO.RAT= 013000   	IO.WVB= 011000
GETBIT  001436R  	IE.ILU= 177640   	IO.ACW= 007000   	IO.RBC= 003000   	IO.XMT= 014400
IE.ABO= 177761   	IE.INS= 177776   	IO.ADS= 014000   	IO.RCI= 015000   	IO.XNA= 014410
IE.ACT= 177771   	IE.IPR= 177641   	IO.APC= 014000   	IO.RCV= 015000   	IQ.Q  = 000002
IE.ADP= 177636   	IE.ISQ= 177703   	IO.APV= 014010   	IO.RDB= 001200   	IQ.X  = 000001
IE.ALN= 177736   	IE.ITI= 177643   	IO.ATT= 001400   	IO.RDN= 000022   	IS.BV = 000005
IE.AST= 177660   	IE.ITS= 177770   	IO.CCI= 014000   	IO.REL= 013400   	IS.CLR= 000000
IE.BAD= 177777   	IE.LCK= 177745   	IO.CCT= 002460   	IO.RHD= 001010   	IS.CR = 006401
IE.BBE= 177710   	IE.LNL= 177646   	IO.CLN= 003400   	IO.RLB= 001000   	IS.ESC= 015401
IE.BDI= 177714   	IE.MBK= 177721   	IO.CON= 015400   	IO.RLV= 001100   	IS.PND= 000000
IE.BDR= 177716   	IE.MOD= 177753   	IO.CRC= 001020   	IO.RNA= 005400   	IS.RDD= 000002
IE.BDV= 177711   	IE.NBF= 177731   	IO.CRE= 012000   	IO.RNC= 001004   	IS.SET= 000002
IE.BHD= 177700   	IE.NBK= 177727   	IO.CTI= 015400   	IO.RNE= 001020   	IS.SUC= 000001
IE.BLK= 177754   	IE.NFI= 177704   	IO.CTL= 016400   	IO.RTC= 003400   	M$$HDR= 000001
IE.BNM= 177712   	IE.NLN= 177733   	IO.DAC= 010000   	IO.RTI= 016400   	R$$10F= 000001
IE.BTF= 177675   	IE.NNC= 177674   	IO.DCI= 014400   	IO.RTK= 000060   	R$$11D= 000001
IE.BTP= 177725   	IE.NOD= 177751   	IO.DCT= 002470   	IO.RVB= 010400   	R$$20F= 000001
IE.BVR= 177701   	IE.NSF= 177746   	IO.DEL= 012400   	IO.RWD= 002400   	TICOFF  001414R
IE.BYT= 177755   	IE.OFL= 177677   	IO.DET= 002000   	IO.RWU= 002540   	$BTBLK= ****** GX
IE.CKP= 177766   	IE.ONP= 177773   	IO.DIS= 016000   	IO.R1C= 002400   	$IBBUF= ****** GX
IE.CKS= 177742   	IE.OVR= 177756   	IO.DTI= 016000   	IO.SAO= 004000   	$IDVTP= ****** GX
IE.CLO= 177732   	IE.PRI= 177760   	IO.ENA= 006000   	IO.SCS= 013000   	$INDPB= ****** GX
IE.CON= 177752   	IE.RAC= 177724   	IO.EOF= 003000   	IO.SDI= 013000   	$INIER= ****** GX
IE.DAA= 177770   	IE.RAT= 177723   	IO.ESA= 002500   	IO.SDO= 012400   	$INSTB  001064RG
IE.DAO= 177763   	IE.RBG= 177730   	IO.EXT= 011400   	IO.SEC= 002520   	$SBMAP= ****** GX
IE.DFU= 177750   	IE.RCN= 177722   	IO.FDX= 003020   	IO.SEM= 002440   	$WBUF = ****** GX
IE.DNA= 177771   	IE.RER= 177740   	IO.FNA= 004400   	IO.SHT= 002410   	$$    = 000067
IE.DNR= 177775   	IE.RNM= 177715   	IO.HDX= 003010   	IO.SLO= 005400   	$$MSG = 000000
IE.DUN= 177767   	IE.RSU= 177757   	IO.HIS= 015000   	IO.SMO= 002560   	...GBL= 000000
IE.DUP= 177707   	IE.SDP= 177635

. ABS.	000000    000	(RW,I,GBL,ABS,OVR)
      	001726    001	(RW,I,LCL,REL,CON)
Errors detected:  0

*** Assembler statistics


Work  file  reads: 0
Work  file writes: 0
Size of work file: 10678 Words  ( 42 Pages)
Size of core pool: 11300 Words  ( 43 Pages)
Operating  system: RSX-11M/PLUS
INIBIT - FILE BITMAP ALLOCATION	MACRO V05.04  Tuesday 10-May-88 15:44  Page 8-3
Symbol table


Elapsed time: 00:00:26.35
[53,10]INIBIT,[53,20]INIBIT/-SP/CR=[53,30]RSXDC,INIBIT
INIBIT     CREATED BY  MACRO  ON 10-MAY-88 AT 15:45	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

BDEFN1	= 000001	#4-39      
BDOFFS	= 000142	#4-40       5-126     
BITMAP	  001466 RG	 6-165      6-165     #8-224     
BMBUF 	  000064 R	#4-60       5-76      *5-101     *5-106     *5-113     *5-120     *5-134     *5-136      5-137     
                        *8-253     
BTERRC	  001722 R	 8-280     #8-282     
BTERR1	  001710 R	 8-250     #8-279     
BTERR2	  001716 R	 8-264      8-270     #8-281     
BTMSG1	  000000 R	#4-50       8-279     
BTMSG2	  000030 R	#4-52       8-281     
DIVIDE	= ******  GX	 5-99       5-99       7-195      7-195      8-238      8-238     
DVQIOR	= ******  GX	 8-249      8-249     
DVQIOW	= ******  GX	 5-89       5-89       5-122      5-122      5-140      5-140      8-263      8-263      8-269     
                         8-269     
E$$MSG	= 000001	#1-33      
E$$TRP	= 000001	#1-32      
F$$LVL	= 000001	#1-28      
GETBIT	  001436 R	 5-110      5-110     #7-193      8-248      8-248     
M$$HDR	= 000001	#1-34      
R$$10F	= 000001	#1-30      
R$$11D	= 000001	#1-29      
R$$20F	= 000001	#1-31      
S$$YDF	= ******	 1-1        1-37      
TICOFF	  001414 R	 5-127      5-127      5-129      5-129     #6-162     
$BTBLK	= ******  GX	 5-128     
$IBBUF	= ******  GX	 5-126     
$IDVTP	= ******  GX	 5-96       5-97       5-134      5-136     
$INDPB	= ******  GX	*5-81      *5-84      *5-85      *5-90      *5-91      *5-137     *5-138     *5-139     *8-230     
                         8-239     
$INIER	= ******  GX	 8-282     
$INSTB	  001064 RG	#5-75      
$SBMAP	= ******  GX	 5-84       5-85       5-87       5-130      5-138      5-139      8-240      8-241     
$WBUF 	= ******  GX	 5-80      *5-112     *5-119      8-230     *8-251     
$$    	= 000067	#5-89       5-89      #5-99       5-99      #5-110      5-110     #5-122      5-122     #5-127     
                         5-127     #5-129      5-129     #5-140      5-140     #6-165      6-165     #7-195      7-195     
                        #8-238      8-238     #8-248      8-248     #8-249      8-249     #8-263      8-263     #8-269     
                         8-269     
INIBIT     CREATED BY  MACRO  ON 10-MAY-88 AT 15:45	PAGE 2

MACRO CROSS REFERENCE                                   CREF   04.00 

MACRO NAME	REFERENCES

CALL  		#3-33       5-89       5-99       5-110      5-122      5-127      5-129      5-140      6-165      7-195     
                 8-238      8-248      8-249      8-263      8-269     
DIR$  		#3-33      
QIOSY$		#3-33       4-44      
RETURN		#3-33       5-141      6-168      7-202      8-277     
WTSE$S		#3-33      
INIHOM-MCR INITVOL-BOOT AND HOM	MACRO V05.04  Tuesday 10-May-88 15:45
Table of contents

     4-   42	EQUATED SYMBOLS
     5-   66	LOCAL DATA
     6-  101	ERROR MESSAGES
     7-  107	WRITE OUT BOOT BLOCK
     8-  149	BUILD HOME BLOCK
     9-  325	ERROR PROCESSING
    10-  332	SUBROUTINES
    11-  370	BOOT BLOCK
RSXDC	MACRO V05.04  Tuesday 10-May-88 15:45  Page 2


     39
INIHOM-MCR INITVOL-BOOT AND HOM	MACRO V05.04  Tuesday 10-May-88 15:45  Page 3


      1						.TITLE	INIHOM-MCR INITVOL-BOOT AND HOME BLOCK PROCESS
      2
      3						.IF	DF	R$$11M
      4						.IFT
      5						.IDENT	"M02"
      6						.IFF
      7						.IDENT	"D02"
      8						.ENDC
      9
     10					;                             COPYRIGHT (C) 1974, 1978, 1985 BY
     11					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
     12					;			ALL RIGHTS RESERVED.
     13					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
     14					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     15					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     16					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     17					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     18					;
     19					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     20					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     21					;       CORPORATION.
     22					;
     23					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     24					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     25					;
     26					;
     27					; VERSION:	02
     28					; BY:		H. LEV
     29					; DATE:		5/2/74
     30					; EDIT	02	E. H. MARISON	24-DEC-74 09:15:00
     31					;
     32					; THIS MODULE WRITES OUT THE BOOT BLOCK AND BUILDS AND WRITES OUT THE
     33					; HOME BLOCK.
     34					;
     35
     36						.MCALL	CALL,DIR$,GTIM$,RETURN,WTSE$S
     37						.MCALL	HMBOF$,QIOSY$
     38						.IF	DF	R$$11M
     39						.MCALL	HDRDF$,DEVDF$,F11DF$,TCBDF$
     40						.ENDC
INIHOM-MCR INITVOL-BOOT AND HOM	MACRO V05.04  Tuesday 10-May-88 15:45  Page 4
EQUATED SYMBOLS

     42						.SBTTL	EQUATED SYMBOLS
     43		164000 			FPRO	=	164000		; FILE PROTECTION [RWED,RWED,RWED,R]
     44		000001 			LUN3	=	1		; LUN FOR I/O TO DEVICE
     45		000001 			EFN1	=	1		; EVENT FLAG TO WAIT ON
     46
     47					;
     48					; TELETYPE REGISTERS
     49					;
     50		177564 			TPS	=	177564		; CONTROL AND STATUS REGISTER
     51		177566 			TPB	=	177566		; DATA BUFFER
     52
     53
     54					;
     55					; DEFINE SYSTEM CONTROL BLOCK OFFSETS
     56					;
     57	000000					HMBOF$			; HOME BLOCK
     58	000000					QIOSY$			; I/O CODES
     59						.IF DF	R$$11M
     60						HDRDF$			; TASK HEADER
     61						DEVDF$			; DEVICE BLOCKS
     62						F11DF$			;
     63						TCBDF$			; TASK CONTROL BLOCK
     64						.ENDC
INIHOM-MCR INITVOL-BOOT AND HOM	MACRO V05.04  Tuesday 10-May-88 15:45  Page 5
LOCAL DATA

     66						.SBTTL	LOCAL DATA
     67					;
     68					; TIME AND DATE BUFFER
     69					;
     70	000000				GTIM:	GTIM$	$DATIM		;
     71	000004				CONVRT:	.BLKB	6		; BUFFER TO CONVERT INTO
     72	000012	000042'			MONTH:	.WORD	MJAN		;
     73	000014	000045'				.WORD	MFEB		;
     74	000016	000050'				.WORD	MMAR		;
     75	000020	000053'				.WORD	MAPR		;
     76	000022	000056'				.WORD	MMAY		;
     77	000024	000061'				.WORD	MJUN		;
     78	000026	000064'				.WORD	MJUL		;
     79	000030	000067'				.WORD	MAUG		;
     80	000032	000072'				.WORD	MSEP		;
     81	000034	000075'				.WORD	MOCT		;
     82	000036	000100'				.WORD	MNOV		;
     83	000040	000103'				.WORD	MDEC		;
     84	000042	   112 	   101 	   116 	MJAN:	.ASCII	/JAN/		;
     85	000045	   106 	   105 	   102 	MFEB:	.ASCII	/FEB/		;
     86	000050	   115 	   101 	   122 	MMAR:	.ASCII	/MAR/		;
     87	000053	   101 	   120 	   122 	MAPR:	.ASCII	/APR/		;
     88	000056	   115 	   101 	   131 	MMAY:	.ASCII	/MAY/		;
     89	000061	   112 	   125 	   116 	MJUN:	.ASCII	/JUN/		;
     90	000064	   112 	   125 	   114 	MJUL:	.ASCII	/JUL/		;
     91	000067	   101 	   125 	   107 	MAUG:	.ASCII	/AUG/		;
     92	000072	   123 	   105 	   120 	MSEP:	.ASCII	/SEP/		;
     93	000075	   117 	   103 	   124 	MOCT:	.ASCII	/OCT/		;
     94	000100	   116 	   117 	   126 	MNOV:	.ASCII	/NOV/		;
     95	000103	   104 	   105 	   103 	MDEC:	.ASCII	/DEC/		;
     96					;
     97					; DEC FILE11 FORMAT I/D STRING
     98					;
     99	000106	   104 	   105 	   103 	DECF11:	.ASCIZ	/DECFILE11A/
	000111	   106 	   111 	   114
	000114	   105 	   061 	   061
	000117	   101 	   000
INIHOM-MCR INITVOL-BOOT AND HOM	MACRO V05.04  Tuesday 10-May-88 15:45  Page 6
ERROR MESSAGES

    101						.SBTTL	ERROR MESSAGES
    102
    103	000121	   111 	   116 	   111 	ERR1:	.ASCIZ	/INI -- BOOT BLOCK WRITE ERROR/
	000124	   040 	   055 	   055
	000127	   040 	   102 	   117
	000132	   117 	   124 	   040
	000135	   102 	   114 	   117
	000140	   103 	   113 	   040
	000143	   127 	   122 	   111
	000146	   124 	   105 	   040
	000151	   105 	   122 	   122
	000154	   117 	   122 	   000
    104	000157	   111 	   116 	   111 	ERR2:	.ASCIZ	/INI -- HOME BLOCK WRITE ERROR/
	000162	   040 	   055 	   055
	000165	   040 	   110 	   117
	000170	   115 	   105 	   040
	000173	   102 	   114 	   117
	000176	   103 	   113 	   040
	000201	   127 	   122 	   111
	000204	   124 	   105 	   040
	000207	   105 	   122 	   122
	000212	   117 	   122 	   000
    105						.EVEN
INIHOM-MCR INITVOL-BOOT AND HOM	MACRO V05.04  Tuesday 10-May-88 15:45  Page 7
WRITE OUT BOOT BLOCK

    107						.SBTTL	WRITE OUT BOOT BLOCK
    108					;+
    109					; ***-$INHOM-WRITE OUT BOOT BLOCK AND BUILD HOME BLOCK AND
    110					;	     WRITE IT OUT.
    111					;	INFORMATION FOR THE HOMEBLOCK IS ALREADY PARSED
    112					;	AND SITTING IN THE APPROPRIATE WORDS IN THE ROOT. FLAGS
    113					;	IN $INKEY INDICATE WHICH KEYWORDS HAVE BEEN SEEN.
    114					;	THE BOOT BLOCK IS WRITE TO BLOCK ZERO. THE HOME BLOCK
    115					;	IS WRITTEN TO THE BOOT SELECTION BY THE ALLOCATE OVERLAY.
    116					;
    117					; INPUT:
    118					;
    119					;	$ICHA	-	CHARACTERISTICS
    120					;	$ICLF	-	CLUSTER FACTOR
    121					;	$IFPRO	-	DEFAULT FILE PROTECTION
    122					;	$INDX	-	INDEX FILE POSITION
    123					;	$IMXF	-	MAXIMUM NUMBER OF FILES
    124					;	$ILRU	-	DIRECTORY PRE-ACCESS LIMIT
    125					;	$IPRO	-	VOLUME PROTECTION
    126					;	$IUIC	-	VOLUME OWNER UIC
    127					;	$IWIN	-	WINDOW SIZE IN NUMBER OF POINTERS
    128					;	$IEXT	-	FILE EXTEND SIZE
    129					;	$IINF	-	INITIAL NUMBER OF FILES IN INDEX FILE
    130					;	$IVNAM	-	VOLUME LABEL
    131					;	$NDXSZ	-	INDEX FILE SIZE IN BLOCKS
    132					;	$IFRBK	-	NUMBER OF FREE BLOCKS ON VOLUME
    133					;	$HMBLK	-	HOME BLOCK LOGICAL BLOCK NUMBER
    134					;
    135					;-
    136	000216	005067 	000022G		$INHOM::CLR	$INDPB+22	; ZERO LBN
    137	000222	005067 	000024G			CLR	$INDPB+24	; FOR BOOT BLOCK
    138	000226	012767 	001174'	000014G		MOV	#BOOTBK,$INDPB+14 ; SET ADDRESS OF BOOT BLOCK
    139	000234	012767 	000400 	000016G		MOV	#400,$INDPB+16 ; AND SET ITS LENGTH
    140	000242	012767 	000400 	000002G		MOV	#IO.WLB,$INDPB+2 ; SET FUNCTION CODE
    141	000250					DIR$	#$INDPB		; WRITE IT OUT
    142	000256	103411 				BCS	10$		;
    143	000260					WTSE$S	#EFN1		; WAIT TILL DONE
    144	000272	103403 				BCS	10$		;
    145	000274	105367 	000000G			DECB	$INSTA		; ANY ERRORS?
    146	000300	001402 				BEQ	INHOM		; NO
    147	000302	000167 	000614 		10$:	JMP	INHE1		; YES, BOOT BLOCK I/O ERROR
INIHOM-MCR INITVOL-BOOT AND HOM	MACRO V05.04  Tuesday 10-May-88 15:45  Page 8
BUILD HOME BLOCK

    149						.SBTTL	BUILD HOME BLOCK
    150	000306	012700 	000000G		INHOM:	MOV	#$WBUF,R0	; SET ADDRESS OF WORK BUFFER
    151	000312	012701 	000400 			MOV	#256.,R1	; SET COUNT OF WORDS
    152	000316	005020 			10$:	CLR	(R0)+		; ZERO NEXT ONE
    153	000320	005301 				DEC	R1		; DONE?
    154	000322	001375 				BNE	10$		; NO, LOOP
    155	000324	012700 	000000G			MOV	#$WBUF,R0	; POINT TO START OF HOME BLOCK
    156					;
    157					; SET INDEX BIT MAP SIZE, LBN, MAX FILES AND DIRECTORY PRE-ACCESS LIMIT ON VOLUME
    158					;
    159	000330	016760 	000000G	000000 		MOV	$NDXSZ,H.IBSZ(R0) ; SET INDEX BIT MAP SIZE
    160	000336	116760 	000000G	000002 		MOVB	$INDXF,H.IBLB(R0) ; AND LBN
    161	000344	016760 	000002G	000004 		MOV	$INDXF+2,H.IBLB+2(R0) ;
    162	000352	016760 	000000G	000006 		MOV	$IMXF,H.FMAX(R0) ;  SET FROM KEYWORDS
    163	000360	116760 	000000G	000056 		MOVB	$ILRU,H.LRUC(R0) ; DIRECTORY PRE-ACCESS LIMIT
    164					;
    165					; SET CLUSTER FACTOR, DEVICE TYPE AND STRUCTURE LEVEL
    166					;
    167	000366				20$:	.IF	GT,F$$LVL-1
    168						.IFF
    169	000366	012760 	000401 	000014 		MOV	#401,H.VLEV(R0) ; SET VOLUME STRUCTURE LEVEL [1,1]
    170						.IFTF
    171	000374	016760 	000000G	000010 		MOV	$ICLF,H.SBCL(R0) ; SET HOME BLOCK CLUSTER FACTOR
    172						.IFT
    173						MOVB	$ICLF,H.VLEV(R0) ; SET SUPPORT CLUSTER FACTOR
    174						MOVB	#F$$LVL,H.VLEV+1(R0) ; SET SUPPORT LEVEL
    175						.ENDC
    176					;
    177					; SET VOLUME LABEL
    178					;
    179	000402	012703 	000014 			MOV	#12.,R3		; SET LABEL SIZE
    180	000406	010002 				MOV	R0,R2		; GET ADDRESS
    181	000410	062702 	000016 			ADD	#H.VNAM,R2	; OF LABEL FIELD
    182	000414	012701 	000000G			MOV	#$IVNAM,R1	; GET LABEL ADDRESS
    183	000420	112122 			40$:	MOVB	(R1)+,(R2)+	; MOVE IN NEXT ADDRESS
    184	000422	005303 				DEC	R3		; DONE?
    185	000424	001375 				BNE	40$		; NO, LOOP
    186					;
    187					; SET VOLUME OWNERS UIC, VOLUME PROTECTION, AND CHARACTERISTICS
    188					;
    189	000426	016760 	000000G	000036 		MOV	$IUIC,H.VOWN(R0) ;VOLUME OWNER
    190	000434	016760 	000000G	000040 		MOV	$IPRO,H.VPRO(R0) ; VOLUME PROTECTION
    191	000442	016760 	000000G	000042 		MOV	$ICHA,H.VCHA(R0) ; SET VOLUME CHARACTERISTICS
    192					;
    193					; SET FILE PROTECTION, SEQUENCE NUMBER, AND FREE BLOCKS
    194					;
    195	000450	016760 	000000G	000044 		MOV	$IFPRO,H.FPRO(R0) ;  SET FROM PARSE
    196						.IF	DF,R$$11M
    197						MOVB	$BTBLK-1,R1	; GET NUMBER OF FILES ALLOCATED
    198						MOVB	R1,H.VFSQ(R0)	; SET VOLUME FILE SEQUENCE NUMBER
    199						.ENDC
    200
    201					;
    202					; SET DEFAULT WINDOW SIZE, AND FILE EXTENSION SIZE
    203					;
    204	000456	116760 	000000G	000054 		MOVB	$IWIN,H.WISZ(R0) ; SET WINDOW SIZE
    205	000464	116760 	000000G	000055 		MOVB	$IEXT,H.FIEX(R0) ; SET FILE EXTENSION
INIHOM-MCR INITVOL-BOOT AND HOM	MACRO V05.04  Tuesday 10-May-88 15:45  Page 8-1
BUILD HOME BLOCK

    206					;
    207					; SET DATE AND TIME
    208					;
    209	000472				100$:	DIR$	#GTIM		; GET CURRENT DATE AND TIME
    210	000500	010046 				MOV	R0,-(SP)	; SAVE ADDRESS OF HOME BLOCK
    211	000502	012704 	000000G			MOV	#$DATIM,R4	; GET DATE AND TIME ADDRESS
    212	000506	010005 				MOV	R0,R5		; GET ADDRESS OF
    213	000510	062705 	000074 			ADD	#H.VDAT,R5	; DATE TIME FIELD
    214	000514	062704 	000006 			ADD	#G.TIDA+2,R4	; POINT TO DATE
    215	000520	014401 				MOV	-(R4),R1	; GET DAY
    216	000522					CALL	CONMOV		; CONVERT AND MOVE
    217	000526	014401 				MOV	-(R4),R1	; GET MONTH
    218	000530	006301 				ASL	R1		; MULTIPLY BY 2
    219	000532	016101 	000010'			MOV	MONTH-2(R1),R1	; GET ADDRESS OF MONTH
    220	000536	112125 				MOVB	(R1)+,(R5)+	; AND MOVE
    221	000540	112125 				MOVB	(R1)+,(R5)+	; MONTH TO
    222	000542	112125 				MOVB	(R1)+,(R5)+	; HOME BLOCK
    223	000544	014401 				MOV	-(R4),R1	; GET YEAR
    224	000546					CALL	CONMOV		; AND CONVERT IT AND MOVE IT.
    225	000552	062704 	000006 			ADD	#G.TIHR,R4	; POINT TO HOUR
    226	000556	012401 				MOV	(R4)+,R1	; GET IT
    227	000560					CALL	CONMOV		; MOVE IN HOUR
    228	000564	012401 				MOV	(R4)+,R1	; GET MINUTE
    229	000566					CALL	CONMOV		; AND MOVE IT
    230	000572	011401 				MOV	(R4),R1		; GET SECOND
    231	000574					CALL	CONMOV		; AND MOVE IT
    232					;
    233					; COPY DATE AND TIME FOR OTHER FILES
    234					;
    235	000600	011605 				MOV	(SP),R5		; GET DATE
    236	000602	062705 	000074 			ADD	#H.VDAT,R5	; AND TIME ADDRESS
    237	000606	012701 	000015 			MOV	#13.,R1		;SET COUNT OF CHARACTERS
    238	000612	012704 	000000G			MOV	#$DATIM,R4	; SET DESTINATION ADDRESS
    239	000616	112524 			110$:	MOVB	(R5)+,(R4)+	; MOV CHARACTER
    240	000620	005301 				DEC	R1		; DONE?
    241	000622	001375 				BNE	110$		; NO, LOOP
    242					;
    243					; FILL IN THE SYSTEM INDEPENDENT AREA OF THE HOME BLOCK
    244					;
    245	000624	011600 				MOV	(SP),R0		; GET ADDR OF SYS IND AREA
    246	000626	062700 	000730 			ADD	#H.INDN,R0	; AND FILL WITH SPACES
    247	000632	012701 	000044 			MOV	#36.,R1		; AREA IS 36 BYTES LONG
    248
    249	000636	112720 	000040 		120$:	MOVB	#<' >,(R0)+
    250	000642	005301 				DEC	R1
    251	000644	001374 				BNE	120$
    252
    253					;
    254					; PUT IN THE VOLUME NAME
    255					;
    256	000646	011600 				MOV	(SP),R0
    257	000650	062700 	000730 			ADD	#H.INDN,R0
    258	000654	012701 	000014 			MOV	#12.,R1		; MAX COUNT
    259	000660	012702 	000000G			MOV	#$IVNAM,R2	; GET VOL ID PTR
    260
    261	000664	105712 			130$:	TSTB	(R2)		; IF NULL EXIT LOOP
    262	000666	001403 				BEQ	140$
INIHOM-MCR INITVOL-BOOT AND HOM	MACRO V05.04  Tuesday 10-May-88 15:45  Page 8-2
BUILD HOME BLOCK

    263	000670	112220 				MOVB	(R2)+,(R0)+
    264	000672	005301 				DEC	R1
    265	000674	001373 				BNE	130$
    266
    267	000676				140$:				; REF TAG
    268					;
    269					; PUT IN OWNER UIC IN DECIMAL "[XXX,YYY]"
    270					;
    271	000676	011605 				MOV	(SP),R5		; POINT TO OWNER FIELD
    272	000700	062705 	000744 			ADD	#H.INDO,R5
    273	000704	112725 	000133 			MOVB	#'[,(R5)+
    274	000710	010546 				MOV	R5,-(SP)	; SAVE PTR TO 1'ST DIGIT
    275	000712	005205 				INC	R5
    276	000714	005001 				CLR	R1		; GET GROUP CODE
    277	000716	156701 	000001G			BISB	$IUIC+1,R1
    278	000722					CALL	CONMOV		; CONVERT AND MOV LAST 2 DIGITS
    279	000726	116736 	177054 			MOVB	CONVRT+2,@(SP)+ ; MOV 1'ST DIGIT
    280	000732	112725 	000054 			MOVB	#<',>,(R5)+
    281	000736	010546 				MOV	R5,-(SP)	; NOW STORE PGM CODE
    282	000740	005205 				INC	R5
    283	000742	005001 				CLR	R1
    284	000744	156701 	000000G			BISB	$IUIC,R1
    285	000750					CALL	CONMOV
    286	000754	116736 	177026 			MOVB	CONVRT+2,@(SP)+
    287	000760	112725 	000135 			MOVB	#'],(R5)+
    288
    289					; STORE FORMAT TYPE
    290
    291	000764	011600 				MOV	(SP),R0
    292	000766	062700 	000760 			ADD	#H.INDF,R0
    293	000772	012701 	000106'			MOV	#DECF11,R1
    294
    295	000776	112120 			150$:	MOVB	(R1)+,(R0)+
    296	001000	001376 				BNE	150$
    297	001002	112740 	000040 			MOVB	#<' >,-(R0)	; OVERWRITE NULL WITH SPACE
    298
    299					;
    300					; COMPUTE CHECKSUMS AND STORE IN HOME BLOCK
    301					;
    302	001006	011600 				MOV	(SP),R0		; GET HOME BLOCK ADDRESS
    303	001010	012701 	000035 			MOV	#H.CHK1/2,R1	; SET COUNT OF WORDS
    304	001014					CALL	CKSUM		; COMPUTE CHECKSUM
    305	001020	010210 				MOV	R2,(R0)		; AND STORE IT
    306	001022	012600 				MOV	(SP)+,R0	; GET HOME BLOCK ADDRESS
    307	001024	012701 	000377 			MOV	#H.CHK2/2,R1	; SET COUNT OF WORDS
    308	001030					CALL	CKSUM		; COMPUTE SECOND CHECKSUM
    309	001034	010210 				MOV	R2,(R0)		; AND STORE IT
    310					;
    311					; WRITE OUT HOME BLOCK
    312					;
    313	001036	012767 	000000G	000014G		MOV	#$WBUF,$INDPB+14 ; SET ADDRESS OF BUFFER
    314	001044	012767 	001000 	000016G		MOV	#512.,$INDPB+16	; SET LENGTH TO WRITE
    315	001052	116767 	000000G	000022G		MOVB	$HMBLK,$INDPB+22 ; SET HIGH LBN
    316	001060	016767 	000002G	000024G		MOV	$HMBLK+2,$INDPB+24 ; SET LOW LBN
    317	001066					DIR$	#$INDPB		; WRITE IT OUT
    318	001074	103415 				BCS	INHE2		;
    319	001076					WTSE$S	#EFN1		; WAIT TILL DONE
INIHOM-MCR INITVOL-BOOT AND HOM	MACRO V05.04  Tuesday 10-May-88 15:45  Page 8-3
BUILD HOME BLOCK

    320	001110	103407 				BCS	INHE2		;
    321	001112	105367 	000000G			DECB	$INSTA		; ANY ERRORS?
    322	001116	001004 				BNE	INHE2		; YES, HOME BLOCK WRITE ERROR
    323	001120					RETURN			; NO, RETURN TO ROOT
INIHOM-MCR INITVOL-BOOT AND HOM	MACRO V05.04  Tuesday 10-May-88 15:45  Page 9
ERROR PROCESSING

    325						.SBTTL	ERROR PROCESSING
    326
    327	001122	012700 	000121'		INHE1:	MOV	#ERR1,R0	; BOOT BLOCK WRITE ERROR
    328	001126	000402 				BR	INHERR		;
    329	001130	012700 	000157'		INHE2:	MOV	#ERR2,R0	; HOME BLOCK WRITE ERROR
    330	001134	000167 	000000G		INHERR:	JMP	$INIER		;
INIHOM-MCR INITVOL-BOOT AND HOM	MACRO V05.04  Tuesday 10-May-88 15:45  Page 10
SUBROUTINES

    332						.SBTTL	SUBROUTINES
    333
    334					;+
    335					; **-CONMOV CONVERT DATE/TIME FIELD TO DECIMAL AND MOVE IT
    336					;
    337					; INPUT:
    338					;
    339					;	R1	-	BINARY (DAY, YEAR, HOUR, MINUTE, OR SECOND)
    340					;	R5	-	OUTPUT FIELD 2 CHARS.
    341					;-
    342	001140	012700 	000004'		CONMOV:	MOV	#CONVRT,R0	; POINT TO CONVERSION BUFFER
    343	001144					CALL	$CBDMG		;
    344	001150	116725 	176633 			MOVB	CONVRT+3,(R5)+	;
    345	001154	116725 	176630 			MOVB	CONVRT+4,(R5)+	;
    346	001160					RETURN
    347					;+
    348					; ***-CKSUM COMPUTE CHECKSUM
    349					;
    350					;	THE CHECKSUM IS COMPUTED BY ADDING ALL THE WORDS TOGETHER
    351					;
    352					; INPUT:
    353					;
    354					;	R0	-	STARTING ADDRESS
    355					;	R1	-	LENGTH IN WORDS
    356					;
    357					; OUTPUTS:
    358					;
    359					;	R0	-	POINTS TO LAST WORD+2
    360					;	R1	-	ZERO
    361					;	R2	-	CHECKSUM
    362					;
    363					;-
    364	001162	005002 			CKSUM:	CLR	R2		; ZERO CHECKSUM RESULT
    365	001164	062002 			10$:	ADD	(R0)+,R2	; ADD NEXT WORD
    366	001166	005301 				DEC	R1		; DONE?
    367	001170	001375 				BNE	10$		; NO, LOOP
    368	001172					RETURN			; YES
INIHOM-MCR INITVOL-BOOT AND HOM	MACRO V05.04  Tuesday 10-May-88 15:45  Page 11
BOOT BLOCK

    370						.SBTTL	BOOT BLOCK
    371
    372	001174	000005 			BOOTBK:	RESET			; CLEAR THE WORLD
    373	001176	012706 	001000 			MOV	#1000,SP	; SET TEMP STACK
    374	001202	010700 				MOV	PC,R0		; SET ADDRESS
    375	001204	062700 	000034 			ADD	#BOTMSG-.,R0	; OF MESSAGE
    376	001210	112001 			10$:	MOVB	(R0)+,R1	; GET NEXT CHARACTER
    377	001212	001403 				BEQ	20$		;END
    378	001214					CALL	TYPIT		; NO, PRINT IT
    379	001220	000773 				BR	10$		; LOOP FOR NEXT CHARACTER
    380	001222	000000 			20$:	HALT			; HALT
    381
    382
    383	001224	110137 	177566 		TYPIT:	MOVB	R1,@#TPB	; PRINT CHARACTER
    384	001230	105737 	177564 		10$:	TSTB	@#TPS		; DONE?
    385	001234	100375 				BPL	10$		; NO, WAIT
    386	001236					RETURN			;
    387
    388
    389	001240	   015 	   012 	   012 	BOTMSG:	.BYTE	15,12,12
    390	001243	   040 	   040 	   040 		.ASCII	/   ***THIS VOLUME DOES NOT CONTAIN A HARDWARE BOOTABLE SYSTEM ***/
	001246	   052 	   052 	   052
	001251	   124 	   110 	   111
	001254	   123 	   040 	   126
	001257	   117 	   114 	   125
	001262	   115 	   105 	   040
	001265	   104 	   117 	   105
	001270	   123 	   040 	   116
	001273	   117 	   124 	   040
	001276	   103 	   117 	   116
	001301	   124 	   101 	   111
	001304	   116 	   040 	   101
	001307	   040 	   110 	   101
	001312	   122 	   104 	   127
	001315	   101 	   122 	   105
	001320	   040 	   102 	   117
	001323	   117 	   124 	   101
	001326	   102 	   114 	   105
	001331	   040 	   123 	   131
	001334	   123 	   124 	   105
	001337	   115 	   040 	   052
	001342	   052 	   052
    391	001344	   015 	   012 	   012 		.BYTE	15,12,12,0
	001347	   000
    392						.EVEN
    393		000001 				.END
INIHOM-MCR INITVOL-BOOT AND HOM	MACRO V05.04  Tuesday 10-May-88 15:45  Page 11-1
Symbol table

BOOTBK  001174R  	IE.BTF= 177675   	IE.RNM= 177715   	IO.MCS= 013400   	IQ.X  = 000001
BOTMSG  001240R  	IE.BTP= 177725   	IE.RSU= 177757   	IO.MDA= 016000   	IS.BV = 000005
CKSUM   001162R  	IE.BVR= 177701   	IE.SDP= 177635   	IO.MDI= 014400   	IS.CLR= 000000
CONMOV  001140R  	IE.BYT= 177755   	IE.SNC= 177735   	IO.MDO= 015400   	IS.CR = 006401
CONVRT  000004R  	IE.CKP= 177766   	IE.SPC= 177772   	IO.MLO= 006000   	IS.ESC= 015401
DECF11  000106R  	IE.CKS= 177742   	IE.SQC= 177734   	IO.MOD= 003000   	IS.PND= 000000
EFN1  = 000001   	IE.CLO= 177732   	IE.SRE= 177762   	IO.MSO= 005000   	IS.RDD= 000002
ERR1    000121R  	IE.CON= 177752   	IE.STK= 177706   	IO.RAL= 001010   	IS.SET= 000002
ERR2    000157R  	IE.DAA= 177770   	IE.ULN= 177773   	IO.RAT= 013000   	IS.SUC= 000001
E$$MSG= 000001   	IE.DAO= 177763   	IE.UPN= 177777   	IO.RBC= 003000   	LUN3  = 000001
E$$TRP= 000001   	IE.DFU= 177750   	IE.VER= 177774   	IO.RCI= 015000   	MAPR    000053R
FPRO  = 164000   	IE.DNA= 177771   	IE.WAC= 177743   	IO.RCV= 015000   	MAUG    000067R
F$$LVL= 000001   	IE.DNR= 177775   	IE.WAT= 177741   	IO.RDB= 001200   	MDEC    000103R
GTIM    000000R  	IE.DUN= 177767   	IE.WER= 177737   	IO.RDN= 000022   	MFEB    000045R
G.TIBA= 000002   	IE.DUP= 177707   	IE.WLK= 177764   	IO.REL= 013400   	MJAN    000042R
G.TICP= 000016   	IE.EBX= 177776   	IE.2DV= 177720   	IO.RHD= 001010   	MJUL    000064R
G.TICT= 000014   	IE.EOF= 177766   	INHERR  001134R  	IO.RLB= 001000   	MJUN    000061R
G.TIDA= 000004   	IE.EOT= 177702   	INHE1   001122R  	IO.RLV= 001100   	MMAR    000050R
G.TIHR= 000006   	IE.EOV= 177765   	INHE2   001130R  	IO.RNA= 005400   	MMAY    000056R
G.TIMI= 000010   	IE.EXP= 177676   	INHOM   000306R  	IO.RNC= 001004   	MNOV    000100R
G.TIMO= 000002   	IE.FEX= 177717   	IO.ACE= 007400   	IO.RNE= 001020   	MOCT    000075R
G.TISC= 000012   	IE.FHE= 177705   	IO.ACR= 006400   	IO.RTC= 003400   	MONTH   000012R
G.TIYR= 000000   	IE.FOP= 177713   	IO.ACW= 007000   	IO.RTI= 016400   	MSEP    000072R
H.CHK1= 000072   	IE.HFU= 177744   	IO.ADS= 014000   	IO.RTK= 000060   	M$$HDR= 000001
H.CHK2= 000776   	IE.HWR= 177772   	IO.APC= 014000   	IO.RVB= 010400   	R$$10F= 000001
H.DVTY= 000012   	IE.IDU= 177644   	IO.APV= 014010   	IO.RWD= 002400   	R$$11D= 000001
H.FIEX= 000055   	IE.IEF= 177637   	IO.ATT= 001400   	IO.RWU= 002540   	R$$20F= 000001
H.FMAX= 000006   	IE.IFC= 177776   	IO.CCI= 014000   	IO.R1C= 002400   	TPB   = 177566
H.FPRO= 000044   	IE.IFU= 177747   	IO.CCT= 002460   	IO.SAO= 004000   	TPS   = 177564
H.IBLB= 000002   	IE.ILL= 177726   	IO.CLN= 003400   	IO.SCS= 013000   	TYPIT   001224R
H.IBSZ= 000000   	IE.ILU= 177640   	IO.CON= 015400   	IO.SDI= 013000   	$CBDMG= ****** GX
H.INDF= 000760   	IE.INS= 177776   	IO.CRC= 001020   	IO.SDO= 012400   	$DATIM= ****** GX
H.INDN= 000730   	IE.IPR= 177641   	IO.CRE= 012000   	IO.SEC= 002520   	$HMBLK= ****** GX
H.INDO= 000744   	IE.ISQ= 177703   	IO.CTI= 015400   	IO.SEM= 002440   	$ICHA = ****** GX
H.LRUC= 000056   	IE.ITI= 177643   	IO.CTL= 016400   	IO.SHT= 002410   	$ICLF = ****** GX
H.SBCL= 000010   	IE.ITS= 177770   	IO.DAC= 010000   	IO.SLO= 005400   	$IEXT = ****** GX
H.VCHA= 000042   	IE.LCK= 177745   	IO.DCI= 014400   	IO.SMO= 002560   	$IFPRO= ****** GX
H.VDAT= 000074   	IE.LNL= 177646   	IO.DCT= 002470   	IO.SNM= 002450   	$ILRU = ****** GX
H.VLEV= 000014   	IE.MBK= 177721   	IO.DEL= 012400   	IO.SPB= 002420   	$IMXF = ****** GX
H.VNAM= 000016   	IE.MOD= 177753   	IO.DET= 002000   	IO.SPF= 002440   	$INDPB= ****** GX
H.VOWN= 000036   	IE.NBF= 177731   	IO.DIS= 016000   	IO.SSO= 004400   	$INDXF= ****** GX
H.VPRO= 000040   	IE.NBK= 177727   	IO.DTI= 016000   	IO.SST= 002430   	$INHOM  000216RG
H.WISZ= 000054   	IE.NFI= 177704   	IO.ENA= 006000   	IO.STC= 002500   	$INIER= ****** GX
IE.ABO= 177761   	IE.NLN= 177733   	IO.EOF= 003000   	IO.STP= 016400   	$INSTA= ****** GX
IE.ACT= 177771   	IE.NNC= 177674   	IO.ESA= 002500   	IO.SYN= 003040   	$IPRO = ****** GX
IE.ADP= 177636   	IE.NOD= 177751   	IO.EXT= 011400   	IO.TRM= 002410   	$IUIC = ****** GX
IE.ALN= 177736   	IE.NSF= 177746   	IO.FDX= 003020   	IO.UNL= 000042   	$IVNAM= ****** GX
IE.AST= 177660   	IE.OFL= 177677   	IO.FNA= 004400   	IO.WAT= 013400   	$IWIN = ****** GX
IE.BAD= 177777   	IE.ONP= 177773   	IO.HDX= 003010   	IO.WLB= 000400   	$NDXSZ= ****** GX
IE.BBE= 177710   	IE.OVR= 177756   	IO.HIS= 015000   	IO.WLS= 000410   	$WBUF = ****** GX
IE.BDI= 177714   	IE.PRI= 177760   	IO.INL= 002400   	IO.WLV= 000500   	$$    = 000067
IE.BDR= 177716   	IE.RAC= 177724   	IO.ITI= 017000   	IO.WVB= 011000   	$$MSG = 000000
IE.BDV= 177711   	IE.RAT= 177723   	IO.KIL= 000012   	IO.XMT= 014400   	$$$OST= 000020
IE.BHD= 177700   	IE.RBG= 177730   	IO.LED= 012000   	IO.XNA= 014410   	...GBL= 000000
IE.BLK= 177754   	IE.RCN= 177722   	IO.LOV= 001010   	IQ.Q  = 000002   	...TPC= 001000
IE.BNM= 177712   	IE.RER= 177740   	IO.LTK= 000050

INIHOM-MCR INITVOL-BOOT AND HOM	MACRO V05.04  Tuesday 10-May-88 15:45  Page 11-2
Symbol table

. ABS.	000000    000	(RW,I,GBL,ABS,OVR)
      	001350    001	(RW,I,LCL,REL,CON)
Errors detected:  0

*** Assembler statistics


Work  file  reads: 0
Work  file writes: 0
Size of work file: 11093 Words  ( 44 Pages)
Size of core pool: 12356 Words  ( 47 Pages)
Operating  system: RSX-11M/PLUS

Elapsed time: 00:00:32.49
[53,10]INIHOM,[53,20]INIHOM/-SP/CR=[53,30]RSXDC,INIHOM
INIHOM     CREATED BY  MACRO  ON 10-MAY-88 AT 15:45	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

BOOTBK	  001174 R	 7-138     #11-372    
BOTMSG	  001240 R	 11-375    #11-389    
CKSUM 	  001162 R	 8-304      8-304      8-308      8-308     #10-364    
CONMOV	  001140 R	 8-216      8-216      8-224      8-224      8-227      8-227      8-229      8-229      8-231     
                         8-231      8-278      8-278      8-285      8-285     #10-342    
CONVRT	  000004 R	#5-71       8-279      8-286      10-342     10-344     10-345    
DECF11	  000106 R	#5-99       8-293     
EFN1  	= 000001	#4-45       7-143      8-319     
ERR1  	  000121 R	#6-103      9-327     
ERR2  	  000157 R	#6-104      9-329     
E$$MSG	= 000001	#1-33      
E$$TRP	= 000001	#1-32      
FPRO  	= 164000	#4-43      
F$$LVL	= 000001	#1-28       8-167     
GTIM  	  000000 R	#5-70       8-209     
G.TIBA	= 000002	#5-70      
G.TICP	= 000016	#5-70      
G.TICT	= 000014	#5-70      
G.TIDA	= 000004	#5-70       8-214     
G.TIHR	= 000006	#5-70       8-225     
G.TIMI	= 000010	#5-70      
G.TIMO	= 000002	#5-70      
G.TISC	= 000012	#5-70      
G.TIYR	= 000000	#5-70      
H.CHK1	= 000072	 8-303     
H.CHK2	= 000776	 8-307     
H.FIEX	= 000055	*8-205     
H.FMAX	= 000006	*8-162     
H.FPRO	= 000044	*8-195     
H.IBLB	= 000002	*8-160     *8-161     
H.IBSZ	= 000000	*8-159     
H.INDF	= 000760	 8-292     
H.INDN	= 000730	 8-246      8-257     
H.INDO	= 000744	 8-272     
H.LRUC	= 000056	*8-163     
H.SBCL	= 000010	*8-171     
H.VCHA	= 000042	*8-191     
H.VDAT	= 000074	 8-213      8-236     
H.VLEV	= 000014	*8-169     
H.VNAM	= 000016	 8-181     
H.VOWN	= 000036	*8-189     
H.VPRO	= 000040	*8-190     
H.WISZ	= 000054	*8-204     
INHERR	  001134 R	 9-328     #9-330     
INHE1 	  001122 R	 7-147     #9-327     
INHE2 	  001130 R	 8-318      8-320      8-322     #9-329     
INHOM 	  000306 R	 7-146     #8-150     
IO.WLB	= 000400	 7-140     
LUN3  	= 000001	#4-44      
MAPR  	  000053 R	 5-75      #5-87      
MAUG  	  000067 R	 5-79      #5-91      
MDEC  	  000103 R	 5-83      #5-95      
INIHOM     CREATED BY  MACRO  ON 10-MAY-88 AT 15:45	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

MFEB  	  000045 R	 5-73      #5-85      
MJAN  	  000042 R	 5-72      #5-84      
MJUL  	  000064 R	 5-78      #5-90      
MJUN  	  000061 R	 5-77      #5-89      
MMAR  	  000050 R	 5-74      #5-86      
MMAY  	  000056 R	 5-76      #5-88      
MNOV  	  000100 R	 5-82      #5-94      
MOCT  	  000075 R	 5-81      #5-93      
MONTH 	  000012 R	#5-72       8-219     
MSEP  	  000072 R	 5-80      #5-92      
M$$HDR	= 000001	#1-34      
R$$10F	= 000001	#1-30      
R$$11D	= 000001	#1-29      
R$$11M	= ******	 3-3        3-38       4-59       8-196     
R$$20F	= 000001	#1-31      
S$$YDF	= ******	 1-1        1-37      
TPB   	= 177566	#4-51      *11-383    
TPS   	= 177564	#4-50       11-384    
TYPIT 	  001224 R	 11-378     11-378    #11-383    
$CBDMG	= ******  GX	 10-343     10-343    
$DATIM	= ******  GX	 5-70       8-211      8-238     
$HMBLK	= ******  GX	 8-315      8-316     
$ICHA 	= ******  GX	 8-191     
$ICLF 	= ******  GX	 8-171     
$IEXT 	= ******  GX	 8-205     
$IFPRO	= ******  GX	 8-195     
$ILRU 	= ******  GX	 8-163     
$IMXF 	= ******  GX	 8-162     
$INDPB	= ******  GX	*7-136     *7-137     *7-138     *7-139     *7-140      7-141     *8-313     *8-314     *8-315     
                        *8-316      8-317     
$INDXF	= ******  GX	 8-160      8-161     
$INHOM	  000216 RG	#7-136     
$INIER	= ******  GX	 9-330     
$INSTA	= ******  GX	*7-145     *8-321     
$IPRO 	= ******  GX	 8-190     
$IUIC 	= ******  GX	 8-189      8-277      8-284     
$IVNAM	= ******  GX	 8-182      8-259     
$IWIN 	= ******  GX	 8-204     
$NDXSZ	= ******  GX	 8-159     
$WBUF 	= ******  GX	 8-150      8-155      8-313     
$$    	= 000067	#8-216      8-216     #8-224      8-224     #8-227      8-227     #8-229      8-229     #8-231     
                         8-231     #8-278      8-278     #8-285      8-285     #8-304      8-304     #8-308      8-308     
                        #10-343     10-343    #11-378     11-378    
$$$GLB	= ******	 5-70       5-70       5-70       5-70       5-70       5-70       5-70       5-70       5-70      
                         5-70      
$$$OST	= 000020	#5-70       5-70       5-70      #5-70      #5-70       5-70       5-70      #5-70       5-70      
                         5-70      #5-70       5-70       5-70      #5-70       5-70       5-70      #5-70       5-70      
                         5-70      #5-70       5-70       5-70      #5-70       5-70       5-70      #5-70       5-70      
                         5-70      #5-70      
INIHOM     CREATED BY  MACRO  ON 10-MAY-88 AT 15:45	PAGE 3

MACRO CROSS REFERENCE                                   CREF   04.00 

MACRO NAME	REFERENCES

CALL  		#3-36       8-216      8-224      8-227      8-229      8-231      8-278      8-285      8-304      8-308     
                 10-343     11-378    
DIR$  		#3-36       7-141     #7-143      7-143      8-209      8-317     #8-319      8-319     
ERR$  		#7-141     #7-143     #8-209     #8-317     #8-319     
GTIM$ 		#3-36       5-70      
HMBOF$		#3-37       4-57      
MOV$  		#7-143      7-143     #8-319      8-319     
OFF$  		#5-70       5-70       5-70       5-70       5-70       5-70       5-70       5-70       5-70       5-70      
                 5-70      
QIOSY$		#3-37       4-58      
RETURN		#3-36       8-323      10-346     10-368     11-386    
WTSE$S		#3-36       7-143      8-319     
INIMAG - MAGTAPE INITIALIZATION	MACRO V05.04  Tuesday 10-May-88 15:45
Table of contents

     4-   35	CONSTANTS AND LOCAL DATA
     5-   84	MAGTAPE INITIALIZATION
     6-  199	SUBROUTINES
RSXDC	MACRO V05.04  Tuesday 10-May-88 15:45  Page 2


     39
INIMAG - MAGTAPE INITIALIZATION	MACRO V05.04  Tuesday 10-May-88 15:45  Page 3


      1						.TITLE	INIMAG - MAGTAPE INITIALIZATION
      2						.IDENT	/0004/
      3					;
      4					;
      5					;                             COPYRIGHT (C) 1974, 1978, 1985 BY
      6					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      7					;			ALL RIGHTS RESERVED.
      8					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      9					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     10					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     11					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     12					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     13					;
     14					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     15					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     16					;       CORPORATION.
     17					;
     18					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     19					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     20
     21					;
     22					; VERSION:	V002A
     23					; BY:		STEVE HORT
     24					; DATE:		1-JUL-74
     25					; EDIT:		002	12/18/74 15:50:00
     26					;		BY E. H. MARISON
     27					; EDIT:		003	12/31/74 13:30:00
     28					;		BY E. H. MARISON
     29					; EDIT		0004	05-MAR-75 222:00:00
     30					;		BY E. H. MARISON
     31					;
     32						.MCALL	CALL,DIR$,QIO$,QIOSY$,RETURN,WTSE$S
     33					;
INIMAG - MAGTAPE INITIALIZATION	MACRO V05.04  Tuesday 10-May-88 15:45  Page 4
CONSTANTS AND LOCAL DATA

     35						.SBTTL	CONSTANTS AND LOCAL DATA
     36					;
     37					; EQUATED SYMBOLS
     38					;
     39		000001 			MTEFN1	=	1		; EFN #1
     40		000002 			MTLUN2	=	2		; USE LUN #2
     41					;
     42					; FORMAT OF VOLUME HEADER LABEL (VOL1)
     43					;
     44		000000 			M.VHLI	=	0		; LABEL IDENTIFIER	(3B)
     45		000003 			M.VHLN	=	3		; LABEL NUMBER		(1B)
     46		000004 			M.VHVI	=	4		; VOLUME IDENTIFIER	(6B)
     47		000012 			M.VHAC	=	10.		; ACCESSIBILITY		(1B)
     48		000013 			M.VHRS	=	11.		; RESERVED		(26B)
     49		000045 			M.VHOI	=	37.		; OWNER IDENTIFIER	(14B)
     50		000063 			M.VHR1	=	51.		; RESERVED		(28B)
     51		000117 			M.VHLS	=	79.		; LABEL STANDARD VERSION(1B)
     52					;
     53		000025 			M.HDSI	=	21.		; FILE SET IDENTIFIER	(6B)
     54		000033 			M.HSEC	=	M.HDSI+6.	;FILE SECTION NUMBER	(4B)
     55					;
     56					; EXTERNAL DATA
     57					;
     58	000000					QIOSY$			; DEFINE I/O CODES
     59					;
     60					; LOCAL DATA
     61					;
     62			.NLIST	BIN
     63	000000	MTVHL1:	.ASCIZ	/VOL1/			; VHL LABEL IDENTIFIER
     64	000005	MTVHL2:	.ASCIZ	/D%B/			; VHL DEC SYSTEM IDENTIFIER
     65	000011	MTNUMB:	.ASCIZ	/000/			; 3 BYTE NUMBER FIELD
     66	000015	MTFHL1:	.ASCIZ	/HDR1/			; FHL LABEL IDENTIFIER
     67	000022	MTFHL2:	.ASCII	/00010000000100 / ; FILE SECTION NUMBER ETC.
     68	000041		.ASCIZ	/00000 00000 000000DECFILE11A/
     69	000076	MTFTL1:	.ASCIZ	/EOF1/			; FTL LABEL IDENTIFIER
     70		;
     71	000103	MTPROT:	.ASCII	/4444444444324410/	; MAGTAPE VOLUME PROTEC. CODES
     72		;
     73	000123	MTMSG0:	.ASCIZ	/INI -- MAGTAPE LABEL MUST BE SPECIFIED/
     74	000172	MTMSG1:	.ASCIZ	/INI -- MAGTAPE DEVICE ERROR/
     75	000226	MTMSG2:	.ASCIZ	/INI -- MAGTAPE WRITE ERROR/
     76	000261	MTMSG3:	.ASCIZ	/INI -- UNIT DOES NOT SUPPORT 1600 BPI/
     77		;
     78			.EVEN
     79						.LIST	BIN
     80					;
     81	000330				MTDPB:	QIO$	0,MTLUN2,MTEFN1,0,$INSTA,0,<0,80.>
     82					;
INIMAG - MAGTAPE INITIALIZATION	MACRO V05.04  Tuesday 10-May-88 15:45  Page 5
MAGTAPE INITIALIZATION

     84						.SBTTL	MAGTAPE INITIALIZATION
     85					;
     86					;+
     87					;
     88					; *** - $INIMT - SPECIAL PROCESSING FOR INITIALIZATION OF A MAGTAPE
     89					;
     90					; ENTRY:
     91					;
     92					;	CALL	$INIMT
     93					;
     94					;-
     95					;
     96	000350				$INIMT::
     97	000350	105767 	000000G			TSTB	$IVNAM		; USER MUST SPECIFY VOL LABEL
     98	000354	001567 				BEQ	MTERR0		; HE DIDN'T GO TELL HIM
     99	000356	012704 	000330'			MOV	#MTDPB,R4	; GET ADDRESS OF DPB
    100	000362	022767 	003100 	000000G		CMP	#1600.,$IDENS	; IS THIS A HIGH DENSITY UNIT?
    101	000370	001404 				BEQ	10$		; YES
    102	000372	012764 	000004 	000014 		MOV	#4,Q.IOPL(R4)	; YES, SET CHARACTERISTICS
    103	000400	000411 				BR	20$		; GO SET THE HARDWARE DRIVER
    104	000402	016703 	000000G		10$:	MOV	$PUD,R3		; GET ADDRESS OF THE PUD
    105	000406	036327 	000000G	100000 		BIT	U.C2(R3),#100000 ; IS THIS A TU16?
    106	000414	001560 				BEQ	MTERR3		; NO
    107	000416	012764 	004004 	000014 		MOV	#4004,Q.IOPL(R4) ; OBVIOUSLY DIFFERENT FOR TU16
    108	000424				20$:	CALL	MTSTC		; CHARACTERISTICS = DUMP MODE + DENSITY
    109	000430	103544 				BCS	MTERR1		; MT DEVICE ERROR
    110					;
    111					; REWIND TAPE TO BOT
    112					;
    113	000432					CALL	MTRWD		; REWIND THE TAPE
    114	000436	103541 				BCS	MTERR1		; RESULTS WERE NOT SO GOOD
    115					;
    116					; PREPARE TO WRITE VOLUME HEADER LABEL
    117					;
    118	000440	012700 	000000G			MOV	#$WBUF,R0	; GET ADDRESS OF OUR WORK BUFFER
    119	000444					CALL	CLRBUF		; INITIALIZE BUFFER TO SPACES
    120	000450	012703 	000000'			MOV	#MTVHL1,R3	; GET ADDRESS OF VHL LABEL IDENT
    121	000454					CALL	MOVCHR		; MOVE IT TO THE BUFFER
    122	000460	012703 	000000G			MOV	#$IVNAM,R3	; GET ADDRESS OF VOLUME LABEL
    123	000464					CALL	MOVCHR		; ONLY USE THE FIRST 6 CHARS
    124	000470	012700 	000045G			MOV	#$WBUF+M.VHOI,R0 ; SKIP OVER THE RESERVED AREA
    125	000474	012703 	000005'			MOV	#MTVHL2,R3	; GET OWNER IDENT
    126	000500					CALL	MOVCHR		; PUT IT IN ITS PLACE
    127					;
    128					; STORE PROTECTION CODE
    129					;
    130					; '0 = NO ACCESS , '1 = READ ACCESS , '2 = EXTEND ACCESS (APPEND TO LAST FILE ONLY)
    131					; '3 = READ/EXTEND ACCESS , '4 = TOTAL ACCESS (W AND D YEILD TOTAL)
    132					;
    133	000504	012705 	000004 			MOV	#4,R5		; FOUR GROUPS
    134	000510	016701 	000000G			MOV	$IPRO,R1	; GET PROTECTION CODE
    135	000514				30$:				; REF TAG
    136	000514	010102 				MOV	R1,R2		; GET INDEX INTO CODE TABLE
    137	000516	042702 	177760 			BIC	#^C17,R2	; CODE IS 4 BITS LONG
    138	000522	116220 	000103'			MOVB	MTPROT(R2),(R0)+ ; STORE IT AWAY
    139	000526	006201 				ASR	R1		; MOVE TO NEXT GROUP
    140	000530	006201 				ASR	R1
INIMAG - MAGTAPE INITIALIZATION	MACRO V05.04  Tuesday 10-May-88 15:45  Page 5-1
MAGTAPE INITIALIZATION

    141	000532	006201 				ASR	R1
    142	000534	006201 				ASR	R1
    143	000536	077512 				SOB	R5,30$		;LOOP
    144					;
    145	000540	012703 	000011'			MOV	#MTNUMB,R3	; GET ADDR OF OUR TEMP NUMBER FIELD
    146	000544	005001 				CLR	R1		; MAKE SURE UPPER BYTE IS ZERO
    147	000546	156701 	000001G			BISB	$IUIC+1,R1	; GET PROJECT NUMBER OF UIC
    148	000552					CALL	BINTOO		; CONVERT TO A 3 DIGIT DECIMAL NUMBER
    149	000556					CALL	MOVCHR		; STORE IN THE BUFFER
    150	000562	012703 	000011'			MOV	#MTNUMB,R3	; RESET ADDRESS OF TEMP DATA FIELD
    151	000566	005001 				CLR	R1		; ZERO THE LAST RESULT
    152	000570	156701 	000000G			BISB	$IUIC,R1	; GET THE PROGRAMMER NUMBER OF THE UIC
    153	000574					CALL	BINTOO		; CONVERT TO DECIMAL ASCII
    154	000600					CALL	MOVCHR		; GO MOVE THEM
    155	000604	112767 	000061 	000117G		MOVB	#'1,$WBUF+M.VHLS ; ANSI LABEL STANDARD VERSION
    156									; WE USE #1 TO AVOID PROBLEMS WITH OS360
    157									; THE ACP ACCEPTS #1,2,AND 3
    158	000612					CALL	MTWLB		; GO WRITE THIS BLOCK TO TAPE
    159	000616	103454 				BCS	MTERR2		; MT WRITE ERROR
    160					;
    161					; WRITE EMPTY FILE SECTION
    162					;
    163	000620	012700 	000000G			MOV	#$WBUF,R0	; RESTORE THE BUFFER POINTER
    164	000624					CALL	CLRBUF		; 'CLEAR' THE DATA BUFFER
    165	000630	012703 	000015'			MOV	#MTFHL1,R3	; GET THE LABEL IDENTIFIER
    166	000634					CALL	MOVCHR		; MOVE IT TO THE BUFFER
    167	000640	012700 	000025G			MOV	#$WBUF+M.HDSI,R0 ; MOVE THE POINTER TO THE FILE SET IDENTIFIER
    168	000644	012703 	000000G			MOV	#$IVNAM,R3	; FILE SET ID = VOLUME NAME
    169	000650					CALL	MOVCHR		; MOVE IT INTO LABEL
    170	000654	012700 	000033G			MOV	#$WBUF+M.HSEC,R0 ; MOVE PTR TO FILE SECTION #
    171	000660	012703 	000022'			MOV	#MTFHL2,R3	; PREPARE TO MOVE THE REST OF THE HDR1 LABEL
    172	000664				40$:	CALL	MOVCHR		; MOVE THE NEXT 6 CHARACTERS
    173	000670	105713 				TSTB	(R3)		; AT THE END OF THE STRING?
    174	000672	001374 				BNE	40$		; NO
    175	000674					CALL	WRTEOF		; WRITE DATA & THEN EOF MARKERS
    176	000700	103423 				BCS	MTERR2		; AN ERROR HAS OCCURRED
    177					;
    178					; WRITE END-OF-FILE LABEL (EOF1)
    179					;
    180	000702	012700 	000000G			MOV	#$WBUF,R0	; RESET BUFFER POINTER
    181	000706	012703 	000076'			MOV	#MTFTL1,R3	; GET LABEL IDENTIFIER ADDRESS
    182	000712					CALL	MOVCHR		; MOVE TO THE BUFFER
    183	000716					CALL	WRTEOF		; WRITE THE DATA + THE EOF MARKERS
    184	000722	103412 				BCS	MTERR2		; WOT, ANOTHER ERROR!
    185	000724					CALL	MTRWD		; REWIND THE TAPE FOR HIM
    186	000730	103404 				BCS	MTERR1		; NEARLY MADE IT
    187	000732					RETURN			; BUT THIS ISN'T
    188					;
    189	000734	012700 	000123'		MTERR0:	MOV	#MTMSG0,R0	; GET ADDR OF MESSAGE
    190	000740	000410 				BR	MTERRC		; TAKE COMMON EXIT
    191	000742	012700 	000172'		MTERR1:	MOV	#MTMSG1,R0	; GET ADDRESS OF MESSAGE
    192	000746	000405 				BR	MTERRC		; TAKE COMMON EXIT
    193	000750	012700 	000226'		MTERR2:	MOV	#MTMSG2,R0	; GET THE MESSAGE ADDRESS
    194	000754	000402 				BR	MTERRC		; USE COMMON ERROR RETURN
    195	000756	012700 	000261'		MTERR3:	MOV	#MTMSG3,R0	; GET THE ADDRESS OF THIS MESSAGE
    196	000762	000167 	000000G		MTERRC:	JMP	$INIER		; TELL THE USER ABOUT THE ERROR
    197					;
INIMAG - MAGTAPE INITIALIZATION	MACRO V05.04  Tuesday 10-May-88 15:45  Page 6
SUBROUTINES

    199						.SBTTL	SUBROUTINES
    200					;
    201					;+
    202					;
    203					; *** - WRTEOF - CODE TO WRITE OUT THE LAST DATA BUFFER AND
    204					;		 TO FOLLOW THIS BY TWO EOF MARKERS.
    205					;
    206					; ENTRY:
    207					;
    208					;	CALL	WRTEOF
    209					;
    210					;-
    211					;
    212	000766				WRTEOF:	CALL	MTWLB		; WRITE THIS LOT OUT
    213	000772	103405 				BCS	10$		; ERRORS!!!!
    214	000774					CALL	MTEOF		; WRITE AN EOF MARKER
    215	001000	103402 				BCS	10$		; MUST KEEP CHECKING THESE THINGS
    216	001002					CALL	MTEOF		; WRITE ANOTHER EOF MARKER
    217	001006				10$:	RETURN			; RETURN TO MAINLINE
    218					;
INIMAG - MAGTAPE INITIALIZATION	MACRO V05.04  Tuesday 10-May-88 15:45  Page 7
SUBROUTINES

    220					;
    221					;+
    222					;
    223					; *** - MOVCHR - THIS ROUTINE MOVES CHARACTERS FROM A GIVEN PLACE
    224					;		 TO A PREDETERMINED PLACE IN THE MAGTAPE BUFFER.
    225					;		 NOTE: A MAXIMUM OF 6 CHARACTERS MAY BE TRANSFERRED
    226					;		       DURING ANY ONE CALL.
    227					;
    228					; ENTRY:
    229					;
    230					;	CALL	MOVCHR
    231					;
    232					; INPUT:
    233					;
    234					;	R0 - CURRENT ADDRESS POINTER TO THE MT BUFFER
    235					;	R3 - ADDRESS OF DATA TO TRANSFER (TERMINATED BY A NULL)
    236					;
    237					; OUTPUT:
    238					;
    239					;	R0 - POINTER UPDATED BY NUMBER OF CHARACTERS TRANSFERRED
    240					;	R3 - DITTO
    241					;
    242					;-
    243					;
    244	001010	010246 			MOVCHR:	MOV	R2,-(SP)	; AND R2
    245	001012	012702 	000006 			MOV	#6,R2		; SET THE MAXIMUM TRANSFER COUNT
    246	001016	105713 			10$:	TSTB	(R3)		; IS THIS THE END?
    247	001020	001402 				BEQ	20$		; YES, NO MORE TO MOVE
    248	001022	112320 				MOVB	(R3)+,(R0)+	; NO, SO PUT THIS ONE IN THE BUFFER
    249	001024	077204 				SOB	R2,10$		; MAXIMUM COUNT REACHED?
    250	001026	012602 			20$:	MOV	(SP)+,R2	; YES, RESTORE R2
    251	001030					RETURN			; EXIT
    252					;
INIMAG - MAGTAPE INITIALIZATION	MACRO V05.04  Tuesday 10-May-88 15:45  Page 8
SUBROUTINES

    254					;
    255					;+
    256					;
    257					; *** - MTRWD - REWIND THE MAGTAPE TO BOT
    258					; *** - MTSTC - SET THE MAGTAPE CHARACTERISTICS
    259					; *** - MTEOF - WRITE AN EOF MARK ON THE TAPE
    260					; *** - MTWLB - WRITE A LOGICAL BLOCK ON THE TAPE
    261					;
    262					; ENTRY:
    263					;
    264					;	CALL	MT[FUNCTION NAME]
    265					;
    266					; INPUT:
    267					;
    268					;	R4 - ADDRESS OF DPB
    269					;
    270					;-
    271					;
    272	001032	012764 	002400 	000002 	MTRWD:	MOV	#IO.RWD,Q.IOFN(R4) ; SETUP THE 'REWIND' FUNCTION
    273	001040	000412 				BR	MTCOMX		   ; EXECUTE THE COMMON CODE
    274	001042	112764 	000007 	000001 	MTSTC:	MOVB	#7,1(R4)	   ; SET THE DPB SIZE
    275	001050	012764 	002500 	000002 		MOV	#IO.STC,Q.IOFN(R4) ; SETUP THE 'SET CHARACTERISTICS' FUNCTION
    276	001056	000420 				BR	MTCOMN		   ; GO EXECUTE THE COMMON CODE
    277	001060	012764 	003000 	000002 	MTEOF:	MOV	#IO.EOF,Q.IOFN(R4) ; SETUP THE 'END-OF-FILE' FUNCTION
    278	001066	112764 	000006 	000001 	MTCOMX:	MOVB	#6,1(R4)	   ; SET THE DPB SIZE
    279	001074	000411 				BR	MTCOMN		   ; MORE COMMON CODE
    280	001076	112764 	000010 	000001 	MTWLB:	MOVB	#8.,1(R4)	   ; SET THE DPB SIZE
    281	001104	012764 	000400 	000002 		MOV	#IO.WLB,Q.IOFN(R4) ; SETUP TO 'WRITE' A LOGICAL BLOCK
    282	001112	012764 	000000G	000014 		MOV	#$WBUF,Q.IOPL(R4)  ; GET THE ADDRESS OF THE BUFFER
    283	001120				MTCOMN:	DIR$	R4		; GO EXECUTE THE GIVEN FUNCTION
    284	001124	103413 				BCS	10$		; SOME SORT OF RSX CALL ERROR
    285	001126					WTSE$S	#MTEFN1		; WAIT ON EFN #1
    286	001140	103405 				BCS	10$		; ANOTHER CHANCE FOR RSX TO FAIL
    287	001142	005367 	000000G			DEC	$INSTA		; CHECK FOR ERRORS
    288	001146	000261 				SEC			; ASSUME BAD RETURN, SET ERROR FLAG
    289	001150	001001 				BNE	10$		; IT REALLY WAS AN ERROR
    290	001152	000241 				CLC			; RESET ERROR FLAG FOR GOOD RETURN
    291	001154				10$:	RETURN			; EXIT TO CALLER
    292					;
INIMAG - MAGTAPE INITIALIZATION	MACRO V05.04  Tuesday 10-May-88 15:45  Page 9
SUBROUTINES

    294					;
    295					;+
    296					;
    297					; *** - BINTOO - BINARY TO DECIMAL ASCII CONVERSION (3 DIGITS ONLY)
    298					;
    299					; ENTRY:
    300					;
    301					;	CALL	BINTOO
    302					;
    303					; INPUT:
    304					;
    305					;	R1 - BINARY NUMBER TO CONVERT
    306					;	R3 - ADDRESS OF ASCII RECEIVER BUFFER
    307					;
    308					;-
    309					;
    310	001156	010046 			BINTOO:	MOV	R0,-(SP)	; SAVE R0
    311	001160	010246 				MOV	R2,-(SP)	; SAVE R2
    312	001162	010346 				MOV	R3,-(SP)	; SAVE R3
    313	001164	005000 				CLR	R0		; HIGH ORDER BITS OBVIOUSLY ZERO
    314	001166	012702 	000144 			MOV	#100.,R2		; PREPARE TO GET THE FIRST DIGIT
    315	001172					CALL	DIVIDE		; RESULT OBTAINED BY SIMPLE DIVISION
    316	001176	062701 	000060 			ADD	#60,R1		; FORM THE ASCII EQUIVALENT
    317	001202	110123 				MOVB	R1,(R3)+	; STORE IN TEMP BUFFER
    318	001204	010201 				MOV	R2,R1		; GET THE REMAINDER
    319	001206	012702 	000012 			MOV	#10.,R2		; NOW DETERMINE THE SECOND DIGIT
    320	001212					CALL	DIVIDE		; EXACTLY AS BEFORE
    321	001216	062701 	000060 			ADD	#60,R1		; CONVERT IT TO ASCII
    322	001222	110123 				MOVB	R1,(R3)+	; PUT IT NEXT TO THE LAST ONE
    323	001224	062702 	000060 			ADD	#60,R2		; THIS MUST BE THE LAST DIGIT
    324	001230	110213 				MOVB	R2,(R3)		; SAVE THIS ONE TOO
    325	001232	012603 				MOV	(SP)+,R3	; RESTORE R3
    326	001234	012602 				MOV	(SP)+,R2	; AND R2
    327	001236	012600 				MOV	(SP)+,R0	; DON'T FORGET R0
    328	001240					RETURN			; EXIT GRACEFULLY
    329					;
INIMAG - MAGTAPE INITIALIZATION	MACRO V05.04  Tuesday 10-May-88 15:45  Page 10
SUBROUTINES

    331					;
    332					;+
    333					;
    334					; *** - CLRBUF - CODE TO INITIALIZE THE MT BUFFER TO SPACES
    335					;
    336					; ENTRY:
    337					;
    338					;	CALL	CLRBUF
    339					;
    340					; INPUT:
    341					;
    342					;	R0 - ADDRESS OF MT BUFFER
    343					;
    344					;-
    345					;
    346	001242	010046 			CLRBUF:	MOV	R0,-(SP)	; SAVE R0
    347	001244	010146 				MOV	R1,-(SP)	; SAVE R1
    348	001246	012701 	000120 			MOV	#80.,R1		; GET NUMBER OF BYTES TO 'CLEAR'
    349	001252	112720 	000040 		10$:	MOVB	#40,(R0)+	; CLEAR THIS BYTE
    350	001256	077103 				SOB	R1,10$		; ANY MORE LEFT?
    351	001260	012601 				MOV	(SP)+,R1	; NO, RESTORE R1
    352	001262	012600 				MOV	(SP)+,R0	; AND R0
    353	001264					RETURN			; EXIT TO CALLER
    354					;
    355		000001 				.END
INIMAG - MAGTAPE INITIALIZATION	MACRO V05.04  Tuesday 10-May-88 15:45  Page 10-1
Symbol table

BINTOO  001156R  	IE.IPR= 177641   	IO.CRC= 001020   	IO.RWU= 002540   	MTFTL1  000076R
CLRBUF  001242R  	IE.ISQ= 177703   	IO.CRE= 012000   	IO.R1C= 002400   	MTLUN2= 000002
DIVIDE= ****** GX	IE.ITI= 177643   	IO.CTI= 015400   	IO.SAO= 004000   	MTMSG0  000123R
E$$MSG= 000001   	IE.ITS= 177770   	IO.CTL= 016400   	IO.SCS= 013000   	MTMSG1  000172R
E$$TRP= 000001   	IE.LCK= 177745   	IO.DAC= 010000   	IO.SDI= 013000   	MTMSG2  000226R
F$$LVL= 000001   	IE.LNL= 177646   	IO.DCI= 014400   	IO.SDO= 012400   	MTMSG3  000261R
IE.ABO= 177761   	IE.MBK= 177721   	IO.DCT= 002470   	IO.SEC= 002520   	MTNUMB  000011R
IE.ACT= 177771   	IE.MOD= 177753   	IO.DEL= 012400   	IO.SEM= 002440   	MTPROT  000103R
IE.ADP= 177636   	IE.NBF= 177731   	IO.DET= 002000   	IO.SHT= 002410   	MTRWD   001032R
IE.ALN= 177736   	IE.NBK= 177727   	IO.DIS= 016000   	IO.SLO= 005400   	MTSTC   001042R
IE.AST= 177660   	IE.NFI= 177704   	IO.DTI= 016000   	IO.SMO= 002560   	MTVHL1  000000R
IE.BAD= 177777   	IE.NLN= 177733   	IO.ENA= 006000   	IO.SNM= 002450   	MTVHL2  000005R
IE.BBE= 177710   	IE.NNC= 177674   	IO.EOF= 003000   	IO.SPB= 002420   	MTWLB   001076R
IE.BDI= 177714   	IE.NOD= 177751   	IO.ESA= 002500   	IO.SPF= 002440   	M$$HDR= 000001
IE.BDR= 177716   	IE.NSF= 177746   	IO.EXT= 011400   	IO.SSO= 004400   	M.HDSI= 000025
IE.BDV= 177711   	IE.OFL= 177677   	IO.FDX= 003020   	IO.SST= 002430   	M.HSEC= 000033
IE.BHD= 177700   	IE.ONP= 177773   	IO.FNA= 004400   	IO.STC= 002500   	M.VHAC= 000012
IE.BLK= 177754   	IE.OVR= 177756   	IO.HDX= 003010   	IO.STP= 016400   	M.VHLI= 000000
IE.BNM= 177712   	IE.PRI= 177760   	IO.HIS= 015000   	IO.SYN= 003040   	M.VHLN= 000003
IE.BTF= 177675   	IE.RAC= 177724   	IO.INL= 002400   	IO.TRM= 002410   	M.VHLS= 000117
IE.BTP= 177725   	IE.RAT= 177723   	IO.ITI= 017000   	IO.UNL= 000042   	M.VHOI= 000045
IE.BVR= 177701   	IE.RBG= 177730   	IO.KIL= 000012   	IO.WAT= 013400   	M.VHRS= 000013
IE.BYT= 177755   	IE.RCN= 177722   	IO.LED= 012000   	IO.WLB= 000400   	M.VHR1= 000063
IE.CKP= 177766   	IE.RER= 177740   	IO.LOV= 001010   	IO.WLS= 000410   	M.VHVI= 000004
IE.CKS= 177742   	IE.RNM= 177715   	IO.LTK= 000050   	IO.WLV= 000500   	Q.IOAE= 000012
IE.CLO= 177732   	IE.RSU= 177757   	IO.MCS= 013400   	IO.WVB= 011000   	Q.IOEF= 000006
IE.CON= 177752   	IE.SDP= 177635   	IO.MDA= 016000   	IO.XMT= 014400   	Q.IOFN= 000002
IE.DAA= 177770   	IE.SNC= 177735   	IO.MDI= 014400   	IO.XNA= 014410   	Q.IOLU= 000004
IE.DAO= 177763   	IE.SPC= 177772   	IO.MDO= 015400   	IQ.Q  = 000002   	Q.IOPL= 000014
IE.DFU= 177750   	IE.SQC= 177734   	IO.MLO= 006000   	IQ.X  = 000001   	Q.IOPR= 000007
IE.DNA= 177771   	IE.SRE= 177762   	IO.MOD= 003000   	IS.BV = 000005   	Q.IOSB= 000010
IE.DNR= 177775   	IE.STK= 177706   	IO.MSO= 005000   	IS.CLR= 000000   	R$$10F= 000001
IE.DUN= 177767   	IE.ULN= 177773   	IO.RAL= 001010   	IS.CR = 006401   	R$$11D= 000001
IE.DUP= 177707   	IE.UPN= 177777   	IO.RAT= 013000   	IS.ESC= 015401   	R$$20F= 000001
IE.EBX= 177776   	IE.VER= 177774   	IO.RBC= 003000   	IS.PND= 000000   	U.C2  = ****** GX
IE.EOF= 177766   	IE.WAC= 177743   	IO.RCI= 015000   	IS.RDD= 000002   	WRTEOF  000766R
IE.EOT= 177702   	IE.WAT= 177741   	IO.RCV= 015000   	IS.SET= 000002   	$IDENS= ****** GX
IE.EOV= 177765   	IE.WER= 177737   	IO.RDB= 001200   	IS.SUC= 000001   	$INIER= ****** GX
IE.EXP= 177676   	IE.WLK= 177764   	IO.RDN= 000022   	MOVCHR  001010R  	$INIMT  000350RG
IE.FEX= 177717   	IE.2DV= 177720   	IO.REL= 013400   	MTCOMN  001120R  	$INSTA= ****** GX
IE.FHE= 177705   	IO.ACE= 007400   	IO.RHD= 001010   	MTCOMX  001066R  	$IPRO = ****** GX
IE.FOP= 177713   	IO.ACR= 006400   	IO.RLB= 001000   	MTDPB   000330R  	$IUIC = ****** GX
IE.HFU= 177744   	IO.ACW= 007000   	IO.RLV= 001100   	MTEFN1= 000001   	$IVNAM= ****** GX
IE.HWR= 177772   	IO.ADS= 014000   	IO.RNA= 005400   	MTEOF   001060R  	$PUD  = ****** GX
IE.IDU= 177644   	IO.APC= 014000   	IO.RNC= 001004   	MTERRC  000762R  	$WBUF = ****** GX
IE.IEF= 177637   	IO.APV= 014010   	IO.RNE= 001020   	MTERR0  000734R  	$$    = 000067
IE.IFC= 177776   	IO.ATT= 001400   	IO.RTC= 003400   	MTERR1  000742R  	$$MSG = 000000
IE.IFU= 177747   	IO.CCI= 014000   	IO.RTI= 016400   	MTERR2  000750R  	$$$ARG= 000010
IE.ILL= 177726   	IO.CCT= 002460   	IO.RTK= 000060   	MTERR3  000756R  	$$$OST= 000014
IE.ILU= 177640   	IO.CLN= 003400   	IO.RVB= 010400   	MTFHL1  000015R  	...GBL= 000000
IE.INS= 177776   	IO.CON= 015400   	IO.RWD= 002400   	MTFHL2  000022R

. ABS.	000000    000	(RW,I,GBL,ABS,OVR)
      	001266    001	(RW,I,LCL,REL,CON)
Errors detected:  0

*** Assembler statistics
INIMAG - MAGTAPE INITIALIZATION	MACRO V05.04  Tuesday 10-May-88 15:45  Page 10-2
Symbol table



Work  file  reads: 0
Work  file writes: 0
Size of work file: 10802 Words  ( 43 Pages)
Size of core pool: 12356 Words  ( 47 Pages)
Operating  system: RSX-11M/PLUS

Elapsed time: 00:00:32.41
[53,10]INIMAG,[53,20]INIMAG/-SP/CR=[53,30]RSXDC,INIMAG
INIMAG     CREATED BY  MACRO  ON 10-MAY-88 AT 15:46	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

BINTOO	  001156 R	 5-148      5-148      5-153      5-153     #9-310     
CLRBUF	  001242 R	 5-119      5-119      5-164      5-164     #10-346    
DIVIDE	= ******  GX	 9-315      9-315      9-320      9-320     
E$$MSG	= 000001	#1-33      
E$$TRP	= 000001	#1-32      
F$$LVL	= 000001	#1-28      
IO.EOF	= 003000	 8-277     
IO.RWD	= 002400	 8-272     
IO.STC	= 002500	 8-275     
IO.WLB	= 000400	 8-281     
MOVCHR	  001010 R	 5-121      5-121      5-123      5-123      5-126      5-126      5-149      5-149      5-154     
                         5-154      5-166      5-166      5-169      5-169      5-172      5-172      5-182      5-182     
                        #7-244     
MTCOMN	  001120 R	 8-276      8-279     #8-283     
MTCOMX	  001066 R	 8-273     #8-278     
MTDPB 	  000330 R	#4-81       5-99      
MTEFN1	= 000001	#4-39       4-81       8-285     
MTEOF 	  001060 R	 6-214      6-214      6-216      6-216     #8-277     
MTERRC	  000762 R	 5-190      5-192      5-194     #5-196     
MTERR0	  000734 R	 5-98      #5-189     
MTERR1	  000742 R	 5-109      5-114      5-186     #5-191     
MTERR2	  000750 R	 5-159      5-176      5-184     #5-193     
MTERR3	  000756 R	 5-106     #5-195     
MTFHL1	  000015 R	#4-66       5-165     
MTFHL2	  000022 R	#4-67       5-171     
MTFTL1	  000076 R	#4-69       5-181     
MTLUN2	= 000002	#4-40       4-81      
MTMSG0	  000123 R	#4-73       5-189     
MTMSG1	  000172 R	#4-74       5-191     
MTMSG2	  000226 R	#4-75       5-193     
MTMSG3	  000261 R	#4-76       5-195     
MTNUMB	  000011 R	#4-65       5-145      5-150     
MTPROT	  000103 R	#4-71       5-138     
MTRWD 	  001032 R	 5-113      5-113      5-185      5-185     #8-272     
MTSTC 	  001042 R	 5-108      5-108     #8-274     
MTVHL1	  000000 R	#4-63       5-120     
MTVHL2	  000005 R	#4-64       5-125     
MTWLB 	  001076 R	 5-158      5-158      6-212      6-212     #8-280     
M$$HDR	= 000001	#1-34      
M.HDSI	= 000025	#4-53       4-54       5-167     
M.HSEC	= 000033	#4-54       5-170     
M.VHAC	= 000012	#4-47      
M.VHLI	= 000000	#4-44      
M.VHLN	= 000003	#4-45      
M.VHLS	= 000117	#4-51      *5-155     
M.VHOI	= 000045	#4-49       5-124     
M.VHRS	= 000013	#4-48      
M.VHR1	= 000063	#4-50      
M.VHVI	= 000004	#4-46      
Q.IOAE	= 000012	#4-81      
Q.IOEF	= 000006	#4-81      
Q.IOFN	= 000002	#4-81      *8-272     *8-275     *8-277     *8-281     
INIMAG     CREATED BY  MACRO  ON 10-MAY-88 AT 15:46	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

Q.IOLU	= 000004	#4-81      
Q.IOPL	= 000014	#4-81      *5-102     *5-107     *8-282     
Q.IOPR	= 000007	#4-81      
Q.IOSB	= 000010	#4-81      
R$$10F	= 000001	#1-30      
R$$11D	= 000001	#1-29      
R$$20F	= 000001	#1-31      
S$$YDF	= ******	 1-1        1-37      
U.C2  	= ******  GX	 5-105     
WRTEOF	  000766 R	 5-175      5-175      5-183      5-183     #6-212     
$IDENS	= ******  GX	 5-100     
$INIER	= ******  GX	 5-196     
$INIMT	  000350 RG	#5-96      
$INSTA	= ******  GX	 4-81      *8-287     
$IPRO 	= ******  GX	 5-134     
$IUIC 	= ******  GX	 5-147      5-152     
$IVNAM	= ******  GX	 5-97       5-122      5-168     
$PUD  	= ******  GX	 5-104     
$WBUF 	= ******  GX	 5-118      5-124     *5-155      5-163      5-167      5-170      5-180      8-282     
$$    	= 000067	#5-108      5-108     #5-113      5-113     #5-119      5-119     #5-121      5-121     #5-123     
                         5-123     #5-126      5-126     #5-148      5-148     #5-149      5-149     #5-153      5-153     
                        #5-154      5-154     #5-158      5-158     #5-164      5-164     #5-166      5-166     #5-169     
                         5-169     #5-172      5-172     #5-175      5-175     #5-182      5-182     #5-183      5-183     
                        #5-185      5-185     #6-212      6-212     #6-214      6-214     #6-216      6-216     #9-315     
                         9-315     #9-320      9-320     
$$$ARG	= 000010	#4-81       4-81      #4-81       4-81      #4-81       4-81      
$$$GLB	= ******	 4-81       4-81       4-81       4-81       4-81       4-81       4-81       4-81      
$$$OST	= 000014	#4-81       4-81       4-81      #4-81       4-81       4-81      #4-81       4-81       4-81      
                        #4-81       4-81       4-81      #4-81       4-81       4-81      #4-81       4-81       4-81      
                        #4-81       4-81      
INIMAG     CREATED BY  MACRO  ON 10-MAY-88 AT 15:46	PAGE 3

MACRO CROSS REFERENCE                                   CREF   04.00 

MACRO NAME	REFERENCES

CALL  		#3-32       5-108      5-113      5-119      5-121      5-123      5-126      5-148      5-149      5-153     
                 5-154      5-158      5-164      5-166      5-169      5-172      5-175      5-182      5-183      5-185     
                 6-212      6-214      6-216      9-315      9-320     
DIR$  		#3-32       8-283     #8-285      8-285     
ERR$  		#8-283     #8-285     
MOV$  		#8-285      8-285     
OFF$  		#4-81       4-81       4-81       4-81       4-81       4-81       4-81       4-81       4-81      
QDPB$ 		#4-81       4-81      
QIOSY$		#3-32       4-58      
QIO$  		#3-32       4-81      
RETURN		#3-32       5-187      6-217      7-251      8-291      9-328      10-353    
WTSE$S		#3-32       8-285     
ININDX - INITVOL WRITE OUT INDE	MACRO V05.04  Tuesday 10-May-88 15:43
Table of contents

     4-   49	LOCAL DATA
     5-   73	ERROR MESSAGES
     6-   85	BUILD INDEX FILE BIT MAP
     7-  109	BUILD INDEX FILE HEADERS
     9-  213	ERROR PROCESSING
    10-  231	SUBROUTINES
RSXDC	MACRO V05.04  Tuesday 10-May-88 15:43  Page 2


     39
ININDX - INITVOL WRITE OUT INDE	MACRO V05.04  Tuesday 10-May-88 15:43  Page 3


      1						.TITLE	ININDX - INITVOL WRITE OUT INDEX FILE
      2
      3						.IF DF	R$$11M
      4						.IFT
      5						.IDENT	"M01"
      6						.IFF
      7						.IDENT	"D01"
      8						.ENDC
      9
     10					;                             COPYRIGHT (C) 1974, 1978, 1985 BY
     11					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
     12					;			ALL RIGHTS RESERVED.
     13					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
     14					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     15					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     16					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     17					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     18					;
     19					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     20					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     21					;       CORPORATION.
     22					;
     23					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     24					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     25					;
     26					;
     27
     28					; VERSION:	01
     29					; BY:		H. LEV
     30					; DATE:		5/3/74
     31
     32					;
     33					; THIS ROUTINE WRITES OUT THE INDEX FILE BIT MAP AND SYSTEM FILE
     34					; HEADERS
     35					;
     36
     37						.MCALL	CALL,DIR$,FHDOF$,FDOFF$,FCSBT$,QIOSY$,RETURN,WTSE$S
     38	000000					FHDOF$			; DEFINE FILE HEADER OFFSETS
     39	000000					FDOFF$	DEF$L		;
     40	000000					FCSBT$			;
     41	000000					QIOSY$			;
     42					;
     43					; EQUATED SYMBOLS
     44					;
     45		160000 			FILPRO	=	160000		; [RWED,RWED,RWED,R]
     46		000001 			EFN1	=	1		; EVENT FLAG TO WAIT ON
     47
ININDX - INITVOL WRITE OUT INDE	MACRO V05.04  Tuesday 10-May-88 15:43  Page 4
LOCAL DATA

     49						.SBTTL	LOCAL DATA
     50	000000	000000 			FILID:	.WORD	0		; FILE ID
     51	000002	000000 			FILSEQ:	.WORD	0		; FILE SEQUENCE #
     52	000004	000016'			FILNAM:	.WORD	FIL1
     53	000006	000026'				.WORD	FIL2
     54	000010	000036'				.WORD	FIL3
     55	000012	000046'				.WORD	FIL4
     56	000014	000056'				.WORD	FIL5
     57	000016	035164 	021406 		FIL1:	.RAD50	/INDEXF/
     58	000022	000000 				.WORD	0
     59	000024	075273 				.RAD50	/SYS/
     60	000026	006774 	050570 		FIL2:	.RAD50	/BITMAP/
     61	000032	000000 				.WORD	0
     62	000034	075273 				.RAD50	/SYS/
     63	000036	006254 	007153 		FIL3:	.RAD50	/BADBLK/
     64	000042	000000 				.WORD	0
     65	000044	075273 				.RAD50	/SYS/
     66	000046	140116 	140116 		FIL4:	.RAD50	/000000/
     67	000052	000000 				.WORD	0
     68	000054	015172 				.RAD50	/DIR/
     69	000056	012452 	035117 		FIL5:	.RAD50	/CORIMG/
     70	000062	000000 				.WORD	0
     71	000064	075273 				.RAD50	/SYS/
ININDX - INITVOL WRITE OUT INDE	MACRO V05.04  Tuesday 10-May-88 15:43  Page 5
ERROR MESSAGES

     73						.SBTTL	ERROR MESSAGES
     74
     75	000066	   111 	   116 	   111 	ERR1:	.ASCIZ	%INI -- INDEX FILE BIT MAP I/O ERROR%
	000071	   040 	   055 	   055
	000074	   040 	   111 	   116
	000077	   104 	   105 	   130
	000102	   040 	   106 	   111
	000105	   114 	   105 	   040
	000110	   102 	   111 	   124
	000113	   040 	   115 	   101
	000116	   120 	   040 	   111
	000121	   057 	   117 	   040
	000124	   105 	   122 	   122
	000127	   117 	   122 	   000
     76	000132	   111 	   116 	   111 	ERR2:	.ASCIZ	%INI -- INDEX FILE HEADER I/O ERROR%
	000135	   040 	   055 	   055
	000140	   040 	   111 	   116
	000143	   104 	   105 	   130
	000146	   040 	   106 	   111
	000151	   114 	   105 	   040
	000154	   110 	   105 	   101
	000157	   104 	   105 	   122
	000162	   040 	   111 	   057
	000165	   117 	   040 	   105
	000170	   122 	   122 	   117
	000173	   122 	   000
     77	000175	   111 	   116 	   111 	ERR3:	.ASCIZ	%INI -- STORAGE BIT MAP FILE HEADER I/O ERROR%
	000200	   040 	   055 	   055
	000203	   040 	   123 	   124
	000206	   117 	   122 	   101
	000211	   107 	   105 	   040
	000214	   102 	   111 	   124
	000217	   040 	   115 	   101
	000222	   120 	   040 	   106
	000225	   111 	   114 	   105
	000230	   040 	   110 	   105
	000233	   101 	   104 	   105
	000236	   122 	   040 	   111
	000241	   057 	   117 	   040
	000244	   105 	   122 	   122
	000247	   117 	   122 	   000
     78	000252	   111 	   116 	   111 	ERR4:	.ASCIZ	%INI -- BAD BLOCK HEADER I/O ERROR%
	000255	   040 	   055 	   055
	000260	   040 	   102 	   101
	000263	   104 	   040 	   102
	000266	   114 	   117 	   103
	000271	   113 	   040 	   110
	000274	   105 	   101 	   104
	000277	   105 	   122 	   040
	000302	   111 	   057 	   117
	000305	   040 	   105 	   122
	000310	   122 	   117 	   122
	000313	   000
     79	000314	   111 	   116 	   111 	ERR5:	.ASCIZ	%INI -- MFD FILE HEADER I/O ERROR%
	000317	   040 	   055 	   055
	000322	   040 	   115 	   106
	000325	   104 	   040 	   106
ININDX - INITVOL WRITE OUT INDE	MACRO V05.04  Tuesday 10-May-88 15:43  Page 5-1
ERROR MESSAGES

	000330	   111 	   114 	   105
	000333	   040 	   110 	   105
	000336	   101 	   104 	   105
	000341	   122 	   040 	   111
	000344	   057 	   117 	   040
	000347	   105 	   122 	   122
	000352	   117 	   122 	   000
     80	000355	   111 	   116 	   111 	ERR6:	.ASCIZ	%INI -- NULL FILE HEADER I/O ERROR%
	000360	   040 	   055 	   055
	000363	   040 	   116 	   125
	000366	   114 	   114 	   040
	000371	   106 	   111 	   114
	000374	   105 	   040 	   110
	000377	   105 	   101 	   104
	000402	   105 	   122 	   040
	000405	   111 	   057 	   117
	000410	   040 	   105 	   122
	000413	   122 	   117 	   122
	000416	   000
     81	000417	   111 	   116 	   111 	ERR7:	.ASCIZ	%INI -- CHECKPOINT FILE HEADER I/O ERROR%
	000422	   040 	   055 	   055
	000425	   040 	   103 	   110
	000430	   105 	   103 	   113
	000433	   120 	   117 	   111
	000436	   116 	   124 	   040
	000441	   106 	   111 	   114
	000444	   105 	   040 	   110
	000447	   105 	   101 	   104
	000452	   105 	   122 	   040
	000455	   111 	   057 	   117
	000460	   040 	   105 	   122
	000463	   122 	   117 	   122
	000466	   000
     82	000467	   111 	   116 	   111 	ERR8:	.ASCIZ	%INI -- MFD WRITE ERROR%
	000472	   040 	   055 	   055
	000475	   040 	   115 	   106
	000500	   104 	   040 	   127
	000503	   122 	   111 	   124
	000506	   105 	   040 	   105
	000511	   122 	   122 	   117
	000514	   122 	   000
     83						.EVEN
ININDX - INITVOL WRITE OUT INDE	MACRO V05.04  Tuesday 10-May-88 15:43  Page 6
BUILD INDEX FILE BIT MAP

     85						.SBTTL	BUILD INDEX FILE BIT MAP
     86
     87					;+
     88					; *** - $INDXF - BUILD INDEX FILE AND WRITE IT OUT
     89					;	THIS ROUTINE BUILDS THE INDEX FILE BIT MAP BLOCK(S) AND
     90					;	WRITES THEM OUT. IT THEN BUILDS FILE HEADERS FOR THE INDEX
     91					;	FILE, STORAGE BIT MAP FILE, BAD BLOCK FILE, MASTER FILE
     92					;	DIRECTORY AND (FOR RSX-11D) THE CHECKPOINT FILE.
     93					;-
     94	000516				$INOXF::CALL	WKZERO		; ZERO WORK BUFFER
     95	000522	052715 	000037 			BIS	#37,(R5)	; SET FILE HEADERS 1 THRU 5 BUSY
     96	000526	116767 	000000G	000022G		MOVB	$INDXF,$INDPB+22 ; SET FIRST LBN
     97	000534	016767 	000002G	000024G		MOV	$INDXF+2,$INDPB+24 ; OF INDEX FLE
     98	000542	010567 	000014G			MOV	R5,$INDPB+14	; SET BUFFER ADDRESS
     99	000546	012767 	001000 	000016G		MOV	#512.,$INDPB+16	; SET BUFFER LENGTH
    100	000554				10$:	CALL	DOIO		; WRITE OUT THE BLOCK
    101	000560	103412 				BCS	20$		; ERROR
    102	000562	022767 	010000 	000000G		CMP	#4096.,$IMXF	; NEED ANOTHER BLOCK?
    103	000570	103010 				BHIS	INDFH		; NO
    104	000572	162767 	010000 	000000G		SUB	#4096.,$IMXF	; YES, COMPUTE HEADERS LEFT
    105	000600					CALL	WKZERO		; ZERO WORK BUFFER
    106	000604	000763 				BR	10$		; LOOP
    107	000606	000167 	000550 		20$:	JMP	INDE1		;
ININDX - INITVOL WRITE OUT INDE	MACRO V05.04  Tuesday 10-May-88 15:43  Page 7
BUILD INDEX FILE HEADERS

    109						.SBTTL	BUILD INDEX FILE HEADERS
    110	000612				INDFH:
    111	000612	012767 	000001 	177160 		MOV	#1,FILID	; INITIALIZE FILE ID
    112	000620	012767 	000001 	177154 		MOV	#1,FILSEQ	; INITIALIZE FILE SEQUENCE #
    113					;
    114					; BUILD INDEX FILE HEADER
    115					;
    116	000626					CALL	BLDHDR		; BUILD COMMON DATA
    117	000632	112764 	000006 	000010 		MOVB	#6,M.USE(R4)	; SET WORDS IN USE
    118	000640	112764 	000314 	000011 		MOVB	#377-<56+<M.RTRV/2>>,M.MAX(R4) ; SET TOTAL AVAILABLE
    119	000646	010403 				MOV	R4,R3		; GET ADDRESS
    120	000650	062703 	000012 			ADD	#M.RTRV,R3	; OF RETRIEVAL POINTER
    121	000654	005023 				CLR	(R3)+		; POINTER FOR
    122	000656	005023 				CLR	(R3)+		; BOOT BLOCK
    123	000660	016723 	000000G			MOV	$HMBLK,(R3)+	; POINTER FOR
    124	000664	016723 	000002G			MOV	$HMBLK+2,(R3)+	; HOME BLOCK
    125	000670	016723 	000000G			MOV	$INDXF,(R3)+	; POINTER FOR
    126	000674	016713 	000002G			MOV	$INDXF+2,(R3)	; INDEX FILE ALLOCATION
    127	000700					CALL	WTFLH		; WRITE IT OUT
    128	000704	103002 				BCC	5$		; GOOD
    129	000706	000167 	000442 			JMP	INDE2		; INDEX FILE HEADER I/O ERROR
    130					;
    131					; BUILD STORAGE HEADER
    132					;
    133	000712				5$:	CALL	BLDHDR		; BUILD COMMON DATA
    134	000716	112764 	000004 	000010 		MOVB	#4,M.USE(R4)	; SET WORDS IN USE
    135	000724	112764 	000314 	000011 		MOVB	#377-<56+<M.RTRV/2>>,M.MAX(R4) ; SET SPACE IN MAP AREA
    136	000732	105064 	000013 			CLRB	M.RTRV+1(R4)	; SET RETRIEVAL POINTER LENGTH
    137	000736	116764 	000000G	000012 		MOVB	$SBMAP,M.RTRV(R4) ; SET RETRIEVAL
    138	000744	016764 	000002G	000014 		MOV	$SBMAP+2,M.RTRV+2(R4) ; POINTER TO BIT MAP
    139	000752	016764 	000000G	000016 		MOV	$SBMAP,M.RTRV+4(R4) ; SET SECOND RETREIVAL POINTER
    140	000760	105364 	000017 			DECB	M.RTRV+5(R4)	; BLOCK LENGTH
    141	000764	016764 	000002G	000020 		MOV	$SBMAP+2,M.RTRV+6(R4) ; AND LBN
    142	000772	062764 	000001 	000020 		ADD	#1,M.RTRV+6(R4)	;
    143	001000	105564 	000016 			ADCB	M.RTRV+4(R4)	;
    144	001004					CALL	WTFLH		; WRITE IT OUT
    145	001010	103556 				BCS	INDE3		; STORAGE BIT MAP FILE HEADER I/O ERR
    146					;
    147					; BUILD BAD BLOCK FILE HEADER
    148					;
    149	001012	012705 	000000G			MOV	#$IBBUF,R5	; POINT TO BAD BLOCK BUFFER
    150	001016					CALL	BLDHD1		; FILL IN HEADER
    151	001022	112764 	000314 	000011 		MOVB	#377-<56+<M.RTRV/2>>,M.MAX(R4) ; SET SPACE IN MAP AREA
    152	001030	010567 	000014G			MOV	R5,$INDPB+14	; SET BUFFER ADDRESS
    153	001034					CALL	WTFLH		; WRITE OUT BAD BLOCK FILE HEADER
    154	001040	103537 				BCS	INDE4		; BAD BLOCK FILE HEADER I/O ERROR
    155					;
    156					; BUILD MASTER FILE DIRECTORY
    157					;
    158	001042					CALL	BLDHDR		; BUILD MFD HEADER
    159	001046	012765 	000001 	000016 		MOV	#R.FIX,H.UFAT+F.RTYP(R5) ; SET RECORD TYPE AND ATTRIBUTES
    160	001054	012765 	000020 	000020 		MOV	#20,H.UFAT+F.RSIZ(R5) ; SET RECORD SIZE
    161	001062	116765 	000001G	000024 		MOVB	$MFD+1,H.UFAT+F.HIBK+2(R5) ; SET HIGH VBN
    162	001070	105265 	000024 			INCB	H.UFAT+F.HIBK+2(R5)	;
    163	001074	012765 	000001 	000030 		MOV	#1,H.UFAT+F.EFBK+2(R5) ; SET BLOCK WITH EOF IN IT
    164	001102	012765 	000120 	000032 		MOV	#20*5,H.UFAT+F.FFBY(R5) ; SET FIRST FREE BYTE
    165	001110	112764 	000002 	000010 		MOVB	#2,M.USE(R4)	; SET WORDS IN USE
ININDX - INITVOL WRITE OUT INDE	MACRO V05.04  Tuesday 10-May-88 15:43  Page 7-1
BUILD INDEX FILE HEADERS

    166	001116	112764 	000314 	000011 		MOVB	#377-<56+<M.RTRV/2>>,M.MAX(R4) ; SET MAX WORDS AVAIL
    167	001124	016764 	000000G	000012 		MOV	$MFD,M.RTRV(R4)	; SET MFD
    168	001132	016764 	000002G	000014 		MOV	$MFD+2,M.RTRV+2(R4) ; RETRIEVAL POINTER
    169	001140	010567 	000014G			MOV	R5,$INDPB+14	; SET BUFFER ADDRESS
    170	001144					CALL	WTFLH		; WRITE IT OUT
    171	001150	103470 				BCS	INDE5		; MFD FILE HEADER I/O ERROR
    172					;
    173					; RSX11D CHECKPOINT FILE
    174					;
    175	001152					CALL	BLDHDR		; FILE IN HEADER
    176	001156	112764 	000314 	000011 		MOVB	#377-<56+<M.RTRV/2>>,M.MAX(R4) ; SET MAX WORDS AVAILABLE
    177	001164					CALL	WTFLH		; WRITE IT OUT
    178	001170	103452 				BCS	INDE7		; ERROR
    179					;
    180					; ZERO OTHER FILE HEADERS
    181					;
    182	001172					CALL	WKZERO		; ZERO BUFFER
    183	001176	016703 	000000G			MOV	$IINF,R3	; GET INITIAL NUMBER OF FILES
    184	001202	162703 	000005 			SUB	#5,R3		;ACCOUNT FOR HEADERS ALREADY WRITTEN
    185	001206				10$:	CALL	DOIO		; WRITE OUT NEXT ONE
    186	001212	103444 				BCS	INDE6		; NULL FILE HEADER I/O ERROR
    187	001214	005303 				DEC	R3		; DONE?
    188	001216	001373 				BNE	10$		; NO, LOOP
ININDX - INITVOL WRITE OUT INDE	MACRO V05.04  Tuesday 10-May-88 15:43  Page 8
BUILD INDEX FILE HEADERS

    190					;
    191					; BUILD DIRECTORY ENTRIES IN MFD FOR SYSTEM FILES
    192					;
    193	001220					CALL	WKZERO		; ZERO WORK BUFFER
    194	001224	005001 				CLR	R1		; ZERO FILE ID
    195	001226	012704 	000016'			MOV	#FIL1,R4	; POINT TO FIRST FILE NAME
    196	001232	005201 			20$:	INC	R1		; SET NEXT FILE ID
    197	001234	010125 				MOV	R1,(R5)+	; SET FILE ID
    198	001236	010125 				MOV	R1,(R5)+	; AND SEQUENCE NUMBER
    199	001240	005725 				TST	(R5)+		; SKIP UNUSED WORD
    200	001242	012425 				MOV	(R4)+,(R5)+	; SET FILE NAME
    201	001244	012425 				MOV	(R4)+,(R5)+	;
    202	001246	012425 				MOV	(R4)+,(R5)+	;
    203	001250	012425 				MOV	(R4)+,(R5)+	; SET FILE TYPE
    204	001252	012725 	000001 			MOV	#1,(R5)+	; SET VERSION NUMBER TO ONE
    205	001256	020127 	000005 			CMP	R1,#5		; ALL DONE?
    206	001262	001363 				BNE	20$		; NO, LOOP
    207	001264	116767 	000000G	000022G		MOVB	$MFD,$INDPB+22	; SET LBN FOR MFD
    208	001272	016767 	000002G	000024G		MOV	$MFD+2,$INDPB+24 ;
    209	001300					CALL	DOIO		; WRITE IT OUT
    210	001304	103401 				BCS	INDE8		;
    211	001306					RETURN			;
ININDX - INITVOL WRITE OUT INDE	MACRO V05.04  Tuesday 10-May-88 15:43  Page 9
ERROR PROCESSING

    213						.SBTTL	ERROR PROCESSING
    214	001310	012700 	000467'		INDE8:	MOV	#ERR8,R0	; MFD WRITE ERROR
    215	001314	000424 				BR	INDERR		;
    216	001316	012700 	000417'		INDE7:	MOV	#ERR7,R0	; RSX11D CHECPOINT FILE HEADER WRITE ERROR
    217	001322	000421 				BR	INDERR		;
    218	001324	012700 	000355'		INDE6:	MOV	#ERR6,R0	; NULL FILE HEADER I/O ERROR
    219	001330	000416 				BR	INDERR		;
    220	001332	012700 	000314'		INDE5:	MOV	#ERR5,R0	; MFD FILE HEADER I/O ERROR
    221	001336	000413 				BR	INDERR		;
    222	001340	012700 	000252'		INDE4:	MOV	#ERR4,R0	; BAD BLOCK FILE HEADER I/O ERROR
    223	001344	000410 				BR	INDERR		;
    224	001346	012700 	000175'		INDE3:	MOV	#ERR3,R0	; STORAGE BIT MAP FILE HEADER I/O ERROR
    225	001352	000405 				BR	INDERR		;
    226	001354	012700 	000132'		INDE2:	MOV	#ERR2,R0	; INDEX FILE HEADER I/O ERROR
    227	001360	000402 				BR	INDERR		;
    228	001362	012700 	000066'		INDE1:	MOV	#ERR1,R0	; INDEX FILE BIT MAP I/O ERROR
    229	001366	000167 	000000G		INDERR:	JMP	$INIER		;
ININDX - INITVOL WRITE OUT INDE	MACRO V05.04  Tuesday 10-May-88 15:43  Page 10
SUBROUTINES

    231						.SBTTL	SUBROUTINES
    232					;+
    233					; ***-BLDHDR-BUILD FILE HEADER
    234					;	BUILD A FLE HEADER FOR A SYSTEM FILE
    235					;
    236					; OUTPUT:
    237					;
    238					;
    239					;	R5 - ADDRESS OF WORK BUFFER SET UP AS FILE HEADER
    240					;	R4 - ADDRESS OF MAP AREA
    241					;-
    242	001372				BLDHDR:	CALL	WKZERO		; ZERO WORD BUFFER
    243	001376	112765 	000027 	000000 	BLDHD1:	MOVB	#27,H.IDOF(R5)	; SET IDENT AREA OFFSET
    244	001404	112765 	000056 	000001 		MOVB	#56,H.MPOF(R5)	; SET MAP AREA OFFSET
    245	001412	016765 	176362 	000002 		MOV	FILID,H.FNUM(R5) ; SET FILE NUMBER
    246	001420	005267 	176354 			INC	FILID		; UPDATE IT
    247	001424	016765 	176352 	000004 		MOV	FILSEQ,H.FSEQ(R5) ; SET FILE SEQUENCE NUMBER
    248	001432	005267 	176344 			INC	FILSEQ		; UPDATE IT
    249
    250						.IF	GT	F$$LVL-1
    251						.IFF
    252
    253	001436	012765 	000401 	000006 		MOV	#401,H.FLEV(R5)	; SET LEVEL TO [1,1]
    254
    255						.IFT
    256
    257						MOVB	$ICLF,H.FLEV(R5) ; SET CLUSTER FACTOR
    258						MOVB	#F$$LVL,H.FLEV+1(R5) ; SET STRUCTURE LEVEL
    259						.ENDC
    260	001444	012765 	000401 	000010 		MOV	#401,H.FOWN(R5)	; SET FILE OWNER TO [1,1]
    261	001452	012765 	160000 	000012 		MOV	#FILPRO,H.FPRO(R5) ; SET PROTECTION TO [RWED,RWED,RWED,R]
    262	001460	016504 	000002 			MOV	H.FNUM(R5),R4	; GET FILE NUMBER
    263	001464	005304 				DEC	R4		;
    264	001466	006304 				ASL	R4		; CONVERT TO WORD INDEX
    265	001470	016400 	000004'			MOV	FILNAM(R4),R0	; GET ADDRESS OF FILE NAME
    266	001474	116504 	000000 			MOVB	H.IDOF(R5),R4	; GET OFFSET TO ID SECTION
    267	001500	006304 				ASL	R4		; CONVERT TO BYTES
    268	001502	060504 				ADD	R5,R4		; GET IDENT AREA ADDRESS
    269	001504	062704 	000000 			ADD	#I.FNAM,R4	; POINT FILE NAME
    270	001510	012024 				MOV	(R0)+,(R4)+	; MOVE IN
    271	001512	012024 				MOV	(R0)+,(R4)+	; FILE NAME
    272	001514	012024 				MOV	(R0)+,(R4)+	;
    273	001516	012024 				MOV	(R0)+,(R4)+	; EXTENSION
    274	001520	012724 	000001 			MOV	#1,(R4)+	; AND VERSION
    275	001524	062704 	000017 			ADD	#I.CRDT-I.RVNO,R4 ; POINT TO CREATION DATE
    276	001530	012700 	000015 			MOV	#13.,R0		; SET COUNT OF CHARS
    277	001534	012701 	000000G			MOV	#$DATIM,R1	; POINT TO ASCII DATE
    278	001540	112124 			10$:	MOVB	(R1)+,(R4)+	; MOVE NEXT CHARACTER
    279	001542	005300 				DEC	R0		; DONE?
    280	001544	001375 				BNE	10$		; NO, LOOP TILL DONE
    281	001546	116504 	000001 			MOVB	H.MPOF(R5),R4	; GET MAP AREA OFFSET
    282	001552	006304 				ASL	R4		; CONVERT TO WORDS
    283	001554	060504 				ADD	R5,R4		; GET ADDRESS OF MAP AREA
    284	001556	012764 	001401 	000006 		MOV	#1401,M.CTSZ(R4) ; SET RETRIEVAL POINTER FORMAT (1,3)
    285	001564					RETURN
ININDX - INITVOL WRITE OUT INDE	MACRO V05.04  Tuesday 10-May-88 15:43  Page 11
SUBROUTINES

    287					;+
    288					; ***-DOIO - ISSUE QIO AND WAIT FOR COMPLETION
    289					;
    290					; INPUT:
    291					;
    292					;	$INDPB-SET UP FOR QIO
    293					;
    294					; OUTPUT:
    295					;
    296					;	CARRY CLEAR - SUCCESSFUL
    297					;	CARRY SET - ERROR
    298					;-
    299	001566				DOIO:	DIR$	#$INDPB		; ISSUE QIO
    300	001574	103417 				BCS	10$		;
    301	001576					WTSE$S	#EFN1		; WAIT FOR COMPLETION
    302	001610	103411 				BCS	10$		;
    303	001612	005367 	000000G			DEC	$INSTA		; ANY ERRORS?
    304	001616	001006 				BNE	10$		; YE
    305	001620	062767 	000001 	000024G		ADD	#1,$INDPB+24	; NO, UPDATE LBN
    306	001626	005567 	000022G			ADC	$INDPB+22	;
    307	001632	000401 				BR	20$		;
    308	001634	000261 			10$:	SEC			; YES, SET ERROR FLAG
    309	001636				20$:	RETURN			; RETURN
    310
    311
    312					;+
    313					; *** - WKZERO  ZERO WORK BUFFER
    314					;
    315					; INPUT: NONE
    316					; OUTPUT:
    317					;	R5 - ADDRESS OF WORK BUFFER
    318					;
    319					;-
    320	001640				WKZERO:
    321	001640	012705 	000000G			MOV	#$WBUF,R5	; GET WORK BUFFER ADDRESS
    322	001644	010567 	000014G			MOV	R5,$INDPB+14	; SET BUFFER ADDRESS FOR WRITING
    323	001650	010500 				MOV	R5,R0		; COPY ADDRESS
    324	001652	012701 	000400 			MOV	#256.,R1	; SET COUNT OF WORDS
    325	001656	005020 			10$:	CLR	(R0)+		; ZERO NEXT WORD
    326	001660	005301 				DEC	R1		; DONE?
    327	001662	001375 				BNE	10$		; NO, LOOP
    328	001664					RETURN			;
    329
    330
    331
    332					;+
    333					; *** - WTFLH   - COMPUTE FILE HEADER CHECKSUM AND WRITE IT OUT
    334					;
    335					; INPUT:
    336					;	R5 - HEADER ADDRESS
    337					;
    338					; OUTPUT:
    339					;	CARRY CLEAR - WRITTEN SUCCESSFULLY
    340					;	CARRY SET    - UNSUCCESSFUL
    341					;
    342					;-
    343	001666	010500 			WTFLH:	MOV	R5,R0		; COPY FILE HEADER ADDRESS
ININDX - INITVOL WRITE OUT INDE	MACRO V05.04  Tuesday 10-May-88 15:43  Page 11-1
SUBROUTINES

    344	001670	005002 				CLR	R2		; ZERO CHECK SUM
    345	001672	012701 	000377 			MOV	#H.CKSM/2,R1	; SET WORD COUNT
    346	001676	062002 			10$:	ADD	(R0)+,R2	; SUM THE CHECK
    347	001700	005301 				DEC	R1		; DONE?
    348	001702	001375 				BNE	10$		; NO, LOOP
    349	001704	010210 				MOV	R2,(R0)		; SET THE CHECK SUM
    350	001706					CALL	DOIO		; WRITE OUT THE HEADER
    351	001712					RETURN			; RETURN WITH CARRY CORRECT
    352		000001 				.END
ININDX - INITVOL WRITE OUT INDE	MACRO V05.04  Tuesday 10-May-88 15:43  Page 11-2
Symbol table

BLDHDR  001372R  	F.ALOC= 000040   	IE.ABO= 177761   	IE.NNC= 177674   	IO.DET= 002000
BLDHD1  001376R  	F.BBFS= 000062   	IE.ACT= 177771   	IE.NOD= 177751   	IO.DIS= 016000
DOIO    001566R  	F.BDB = 000070   	IE.ADP= 177636   	IE.NSF= 177746   	IO.DTI= 016000
EFN1  = 000001   	F.BGBC= 000057   	IE.ALN= 177736   	IE.OFL= 177677   	IO.ENA= 006000
ERR1    000066R  	F.BKDN= 000026   	IE.AST= 177660   	IE.ONP= 177773   	IO.EOF= 003000
ERR2    000132R  	F.BKDS= 000020   	IE.BAD= 177777   	IE.OVR= 177756   	IO.ESA= 002500
ERR3    000175R  	F.BKEF= 000050   	IE.BBE= 177710   	IE.PRI= 177760   	IO.EXT= 011400
ERR4    000252R  	F.BKP1= 000051   	IE.BDI= 177714   	IE.RAC= 177724   	IO.FDX= 003020
ERR5    000314R  	F.BKST= 000024   	IE.BDR= 177716   	IE.RAT= 177723   	IO.FNA= 004400
ERR6    000355R  	F.BKVB= 000064   	IE.BDV= 177711   	IE.RBG= 177730   	IO.HDX= 003010
ERR7    000417R  	F.CNTG= 000034   	IE.BHD= 177700   	IE.RCN= 177722   	IO.HIS= 015000
ERR8    000467R  	F.DFNB= 000046   	IE.BLK= 177754   	IE.RER= 177740   	IO.INL= 002400
E$$MSG= 000001   	F.DSPT= 000044   	IE.BNM= 177712   	IE.RNM= 177715   	IO.ITI= 017000
E$$TRP= 000001   	F.DVNM= 000134   	IE.BTF= 177675   	IE.RSU= 177757   	IO.KIL= 000012
FA.APD= 000100   	F.EFBK= 000010   	IE.BTP= 177725   	IE.SDP= 177635   	IO.LED= 012000
FA.CRE= 000010   	F.EFN = 000050   	IE.BVR= 177701   	IE.SNC= 177735   	IO.LOV= 001010
FA.EXT= 000004   	F.EOBB= 000032   	IE.BYT= 177755   	IE.SPC= 177772   	IO.LTK= 000050
FA.NSP= 000100   	F.ERR = 000052   	IE.CKP= 177766   	IE.SQC= 177734   	IO.MCS= 013400
FA.RD = 000001   	F.FACC= 000043   	IE.CKS= 177742   	IE.SRE= 177762   	IO.MDA= 016000
FA.SHR= 000040   	F.FFBY= 000014   	IE.CLO= 177732   	IE.STK= 177706   	IO.MDI= 014400
FA.TMP= 000020   	F.FNAM= 000110   	IE.CON= 177752   	IE.ULN= 177773   	IO.MDO= 015400
FA.WRT= 000002   	F.FNB = 000102   	IE.DAA= 177770   	IE.UPN= 177777   	IO.MLO= 006000
FD.BLK= 000010   	F.FTYP= 000116   	IE.DAO= 177763   	IE.VER= 177774   	IO.MOD= 003000
FD.CCL= 000002   	F.FVER= 000120   	IE.DFU= 177750   	IE.WAC= 177743   	IO.MSO= 005000
FD.CR = 000002   	F.HIBK= 000004   	IE.DNA= 177771   	IE.WAT= 177741   	IO.RAL= 001010
FD.DIR= 000010   	F.LUN = 000042   	IE.DNR= 177775   	IE.WER= 177737   	IO.RAT= 013000
FD.FTN= 000001   	F.MBCT= 000054   	IE.DUN= 177767   	IE.WLK= 177764   	IO.RBC= 003000
FD.INS= 000010   	F.MBC1= 000055   	IE.DUP= 177707   	IE.2DV= 177720   	IO.RCI= 015000
FD.PLC= 000004   	F.MBFG= 000056   	IE.EBX= 177776   	INDERR  001366R  	IO.RCV= 015000
FD.RAH= 000001   	F.NRBD= 000024   	IE.EOF= 177766   	INDE1   001362R  	IO.RDB= 001200
FD.RAN= 000002   	F.NREC= 000030   	IE.EOT= 177702   	INDE2   001354R  	IO.RDN= 000022
FD.REC= 000001   	F.OVBS= 000030   	IE.EOV= 177765   	INDE3   001346R  	IO.REL= 013400
FD.RWM= 000001   	F.RACC= 000016   	IE.EXP= 177676   	INDE4   001340R  	IO.RHD= 001010
FD.SDI= 000020   	F.RATT= 000001   	IE.FEX= 177717   	INDE5   001332R  	IO.RLB= 001000
FD.SQD= 000040   	F.RCNM= 000034   	IE.FHE= 177705   	INDE6   001324R  	IO.RLV= 001100
FD.TTY= 000004   	F.RCTL= 000017   	IE.FOP= 177713   	INDE7   001316R  	IO.RNA= 005400
FD.WBH= 000002   	F.RSIZ= 000002   	IE.HFU= 177744   	INDE8   001310R  	IO.RNC= 001004
FILID   000000R  	F.RTYP= 000000   	IE.HWR= 177772   	INDFH   000612R  	IO.RNE= 001020
FILNAM  000004R  	F.STBK= 000036   	IE.IDU= 177644   	IO.ACE= 007400   	IO.RTC= 003400
FILPRO= 160000   	F.UNIT= 000136   	IE.IEF= 177637   	IO.ACR= 006400   	IO.RTI= 016400
FILSEQ  000002R  	F.URBD= 000020   	IE.IFC= 177776   	IO.ACW= 007000   	IO.RTK= 000060
FIL1    000016R  	F.VBN = 000064   	IE.IFU= 177747   	IO.ADS= 014000   	IO.RVB= 010400
FIL2    000026R  	F.VBSZ= 000060   	IE.ILL= 177726   	IO.APC= 014000   	IO.RWD= 002400
FIL3    000036R  	H.CKSM= 000776   	IE.ILU= 177640   	IO.APV= 014010   	IO.RWU= 002540
FIL4    000046R  	H.FCHA= 000014   	IE.INS= 177776   	IO.ATT= 001400   	IO.R1C= 002400
FIL5    000056R  	H.FLEV= 000006   	IE.IPR= 177641   	IO.CCI= 014000   	IO.SAO= 004000
FO.APD= 000106   	H.FNUM= 000002   	IE.ISQ= 177703   	IO.CCT= 002460   	IO.SCS= 013000
FO.MFY= 000002   	H.FOWN= 000010   	IE.ITI= 177643   	IO.CLN= 003400   	IO.SDI= 013000
FO.RD = 000001   	H.FPRO= 000012   	IE.ITS= 177770   	IO.CON= 015400   	IO.SDO= 012400
FO.UPD= 000006   	H.FSEQ= 000004   	IE.LCK= 177745   	IO.CRC= 001020   	IO.SEC= 002520
FO.WRT= 000016   	H.IDOF= 000000   	IE.LNL= 177646   	IO.CRE= 012000   	IO.SEM= 002440
FP.DEL= 000010   	H.MPOF= 000001   	IE.MBK= 177721   	IO.CTI= 015400   	IO.SHT= 002410
FP.EXT= 000004   	H.PROG= 000010   	IE.MOD= 177753   	IO.CTL= 016400   	IO.SLO= 005400
FP.RAT= 000001   	H.PROJ= 000011   	IE.NBF= 177731   	IO.DAC= 010000   	IO.SMO= 002560
FP.RDV= 000001   	H.SCHA= 000015   	IE.NBK= 177727   	IO.DCI= 014400   	IO.SNM= 002450
FP.WRV= 000002   	H.UCHA= 000014   	IE.NFI= 177704   	IO.DCT= 002470   	IO.SPB= 002420
F$$LVL= 000001   	H.UFAT= 000016   	IE.NLN= 177733   	IO.DEL= 012400   	IO.SPF= 002440
ININDX - INITVOL WRITE OUT INDE	MACRO V05.04  Tuesday 10-May-88 15:43  Page 11-3
Symbol table

IO.SSO= 004400   	IS.RDD= 000002   	M.MAX = 000011   	N.UNIT= 000034   	UC.DLK= 000100
IO.SST= 002430   	IS.SET= 000002   	M.RTRV= 000012   	R$$10F= 000001   	WKZERO  001640R
IO.STC= 002500   	IS.SUC= 000001   	M.USE = 000010   	R$$11D= 000001   	WTFLH   001666R
IO.STP= 016400   	I.CRDT= 000031   	NB.DEV= 000200   	R$$20F= 000001   	$DATIM= ****** GX
IO.SYN= 003040   	I.CRTI= 000040   	NB.DIR= 000100   	R.FIX = 000001   	$HMBLK= ****** GX
IO.TRM= 002410   	I.DASZ= 000007   	NB.NAM= 000004   	R.VAR = 000002   	$IBBUF= ****** GX
IO.UNL= 000042   	I.EXDT= 000046   	NB.SD1= 000400   	SC.BAD= 000100   	$IINF = ****** GX
IO.WAT= 013400   	I.FNAM= 000000   	NB.SD2= 001000   	SC.MDL= 000200   	$IMXF = ****** GX
IO.WLB= 000400   	I.FTYP= 000006   	NB.SNM= 000040   	S.FATT= 000016   	$INDPB= ****** GX
IO.WLS= 000410   	I.FVER= 000010   	NB.STP= 000020   	S.FDB = 000140   	$INDXF= ****** GX
IO.WLV= 000500   	I.RVDT= 000014   	NB.SVR= 000010   	S.FNAM= 000006   	$INIER= ****** GX
IO.WVB= 011000   	I.RVNO= 000012   	NB.TYP= 000002   	S.FNB = 000036   	$INOXF  000516RG
IO.XMT= 014400   	I.RVTI= 000023   	NB.VER= 000001   	S.FNBW= 000017   	$INSTA= ****** GX
IO.XNA= 014410   	I.TISZ= 000006   	N.DID = 000024   	S.FNTY= 000004   	$MFD  = ****** GX
IQ.Q  = 000002   	M$$HDR= 000001   	N.DVNM= 000032   	S.FTYP= 000002   	$SBMAP= ****** GX
IQ.X  = 000001   	M.CTSZ= 000006   	N.FID = 000000   	S.HDHD= 000056   	$WBUF = ****** GX
IS.BV = 000005   	M.EFNU= 000002   	N.FNAM= 000006   	S.IDHD= 000056   	$$    = 000067
IS.CLR= 000000   	M.EFSQ= 000004   	N.FTYP= 000014   	S.MPHD= 000012   	$$MSG = 000000
IS.CR = 006401   	M.ERVN= 000001   	N.FVER= 000016   	S.NFEN= 000020   	...GBL= 000000
IS.ESC= 015401   	M.ESQN= 000000   	N.NEXT= 000022   	UC.CON= 000200   	...TPC= 000140
IS.PND= 000000   	M.LBSZ= 000007   	N.STAT= 000020

. ABS.	000000    000	(RW,I,GBL,ABS,OVR)
      	001714    001	(RW,I,LCL,REL,CON)
Errors detected:  0

*** Assembler statistics


Work  file  reads: 0
Work  file writes: 0
Size of work file: 10872 Words  ( 43 Pages)
Size of core pool: 12356 Words  ( 47 Pages)
Operating  system: RSX-11M/PLUS

Elapsed time: 00:00:35.37
[53,10]ININDX,[53,20]ININDX/-SP/CR=[53,30]RSXDC,ININDX
ININDX     CREATED BY  MACRO  ON 10-MAY-88 AT 15:43	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

BLDHDR	  001372 R	 7-116      7-116      7-133      7-133      7-158      7-158      7-175      7-175     #10-242    
BLDHD1	  001376 R	 7-150      7-150     #10-243    
DOIO  	  001566 R	 6-100      6-100      7-185      7-185      8-209      8-209     #11-299     11-350     11-350    
EFN1  	= 000001	#3-46       11-301    
ERR1  	  000066 R	#5-75       9-228     
ERR2  	  000132 R	#5-76       9-226     
ERR3  	  000175 R	#5-77       9-224     
ERR4  	  000252 R	#5-78       9-222     
ERR5  	  000314 R	#5-79       9-220     
ERR6  	  000355 R	#5-80       9-218     
ERR7  	  000417 R	#5-81       9-216     
ERR8  	  000467 R	#5-82       9-214     
E$$MSG	= 000001	#1-33      
E$$TRP	= 000001	#1-32      
FILID 	  000000 R	#4-50      *7-111      10-245    *10-246    
FILNAM	  000004 R	#4-52       10-265    
FILPRO	= 160000	#3-45       10-261    
FILSEQ	  000002 R	#4-51      *7-112      10-247    *10-248    
FIL1  	  000016 R	 4-52      #4-57       8-195     
FIL2  	  000026 R	 4-53      #4-60      
FIL3  	  000036 R	 4-54      #4-63      
FIL4  	  000046 R	 4-55      #4-66      
FIL5  	  000056 R	 4-56      #4-69      
F$$LVL	= 000001	#1-28       10-250    
F.EFBK	= 000010	*7-163     
F.FFBY	= 000014	*7-164     
F.HIBK	= 000004	*7-161     *7-162     
F.RSIZ	= 000002	*7-160     
F.RTYP	= 000000	*7-159     
H.CKSM	= 000776	 11-345    
H.FLEV	= 000006	*10-253    
H.FNUM	= 000002	*10-245     10-262    
H.FOWN	= 000010	*10-260    
H.FPRO	= 000012	*10-261    
H.FSEQ	= 000004	*10-247    
H.IDOF	= 000000	*10-243     10-266    
H.MPOF	= 000001	*10-244     10-281    
H.UFAT	= 000016	*7-159     *7-160     *7-161     *7-162     *7-163     *7-164     
INDERR	  001366 R	 9-215      9-217      9-219      9-221      9-223      9-225      9-227     #9-229     
INDE1 	  001362 R	 6-107     #9-228     
INDE2 	  001354 R	 7-129     #9-226     
INDE3 	  001346 R	 7-145     #9-224     
INDE4 	  001340 R	 7-154     #9-222     
INDE5 	  001332 R	 7-171     #9-220     
INDE6 	  001324 R	 7-186     #9-218     
INDE7 	  001316 R	 7-178     #9-216     
INDE8 	  001310 R	 8-210     #9-214     
INDFH 	  000612 R	 6-103     #7-110     
I.CRDT	= 000031	 10-275    
I.FNAM	= 000000	 10-269    
I.RVNO	= 000012	 10-275    
M$$HDR	= 000001	#1-34      
ININDX     CREATED BY  MACRO  ON 10-MAY-88 AT 15:43	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

M.CTSZ	= 000006	*10-284    
M.MAX 	= 000011	*7-118     *7-135     *7-151     *7-166     *7-176     
M.RTRV	= 000012	 7-118      7-120      7-135     *7-136     *7-137     *7-138     *7-139     *7-140     *7-141     
                        *7-142     *7-143      7-151      7-166     *7-167     *7-168      7-176     
M.USE 	= 000010	*7-117     *7-134     *7-165     
R$$10F	= 000001	#1-30      
R$$11D	= 000001	#1-29      
R$$11M	= ******	 3-3       
R$$20F	= 000001	#1-31      
R.FIX 	= 000001	 7-159     
S$$YDF	= ******	 1-1        1-37      
WKZERO	  001640 R	 6-94       6-94       6-105      6-105      7-182      7-182      8-193      8-193      10-242    
                         10-242    #11-320    
WTFLH 	  001666 R	 7-127      7-127      7-144      7-144      7-153      7-153      7-170      7-170      7-177     
                         7-177     #11-343    
$DATIM	= ******  GX	 10-277    
$HMBLK	= ******  GX	 7-123      7-124     
$IBBUF	= ******  GX	 7-149     
$IINF 	= ******  GX	 7-183     
$IMXF 	= ******  GX	 6-102     *6-104     
$INDPB	= ******  GX	*6-96      *6-97      *6-98      *6-99      *7-152     *7-169     *8-207     *8-208      11-299    
                        *11-305    *11-306    *11-322    
$INDXF	= ******  GX	 6-96       6-97       7-125      7-126     
$INIER	= ******  GX	 9-229     
$INOXF	  000516 RG	#6-94      
$INSTA	= ******  GX	*11-303    
$MFD  	= ******  GX	 7-161      7-167      7-168      8-207      8-208     
$SBMAP	= ******  GX	 7-137      7-138      7-139      7-141     
$WBUF 	= ******  GX	 11-321    
$$    	= 000067	#6-94       6-94      #6-100      6-100     #6-105      6-105     #7-116      7-116     #7-127     
                         7-127     #7-133      7-133     #7-144      7-144     #7-150      7-150     #7-153      7-153     
                        #7-158      7-158     #7-170      7-170     #7-175      7-175     #7-177      7-177     #7-182     
                         7-182     #7-185      7-185     #8-193      8-193     #8-209      8-209     #10-242     10-242    
                        #11-350     11-350    
ININDX     CREATED BY  MACRO  ON 10-MAY-88 AT 15:43	PAGE 3

MACRO CROSS REFERENCE                                   CREF   04.00 

MACRO NAME	REFERENCES

CALL  		#3-37       6-94       6-100      6-105      7-116      7-127      7-133      7-144      7-150      7-153     
                 7-158      7-170      7-175      7-177      7-182      7-185      8-193      8-209      10-242     11-350    
DIR$  		#3-37       11-299    #11-301     11-301    
ERR$  		#11-299    #11-301    
FCSBT$		#3-37       3-40      
FDOFF$		#3-37       3-39      
FHDOF$		#3-37       3-38      
MOV$  		#11-301     11-301    
QIOSY$		#3-37       3-41      
RETURN		#3-37       8-211      10-285     11-309     11-328     11-351    
WTSE$S		#3-37       11-301    
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40
Table of contents

     4-   36	CONSTANTS AND LOCAL DATA
     6-   94	ERROR MESSAGES
     7-  124	INITIALIZATION
    10-  218	STATE TABLE FOR TPARS
    11-  275	OPTION PROCESSING
    14-  435	ACTION ROUTINES
RSXDC	MACRO V05.04  Tuesday 10-May-88 15:40  Page 2


     39
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 3


      1						.TITLE	INIPAR - INITVOL COMMAND PARSER
      2						.IDENT	"V0007"
      3					;
      4					;                             COPYRIGHT (C) 1974, 1978, 1985 BY
      5					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      6					;			ALL RIGHTS RESERVED.
      7					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      8					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
      9					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     10					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     11					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     12					;
     13					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     14					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     15					;       CORPORATION.
     16					;
     17					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     18					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     19					;
     20					;
     21
     22					;
     23					; VERSION:	V001A
     24					; BY:		STEVE HORT
     25					; DATE:		1-JUL-74
     26					; EDIT:		002	12/12/74 18:00:00
     27					; EDIT:		003	24-DEC-74 09:00:00
     28					; EDIT:		004	07-JAN-75 16:40:00
     29					;
     30						.MCALL	ALUN$,CALL,DIR$,F11DF$,GLUN$,QIOSY$,QIOW$,RETURN
     31					;
     32						.MCALL	FHDOF$,FCSBT$
     33	000000					FHDOF$
     34	000000					FCSBT$
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 4
CONSTANTS AND LOCAL DATA

     36						.SBTTL	CONSTANTS AND LOCAL DATA
     37					;
     38					; EQUATED SYMBOLS
     39					;
     40		000001 			EFN1	=	1		; EVENT FLAG #1
     41		000002 			LUN2	=	2		; LUN FOR MYSTERY DEVICE
     42					;
     43					; BAD BLOCK PROCESSING FLAGS
     44					;
     45		000001 			IN.AUT	==	1		; AUTO BAD BLOCK PROCESSING SELECTED
     46		000002 			IN.MAN	==	2		; MANUAL BAD BLOCK PROCESSING SELECTED
     47					;
     48					; VOLUME DEFAULT VALUES
     49					;
     50		000003 			DFLRU	=	3		; DIRECTORY PRE-ACCESS LIMIT
     51		000001 			DFCLF	=	1		; STORAGE BIT MAP CLUSTERFACTOR
     52		001440 			DFDENS	=	800.		; MAGTAPE DENSITY
     53		000005 			DFEXT	=	5		; FILE EXTENSION SIZE IN BLOCKS
     54		164000 			DFFPRO	=	164000		; DEFAULT FILE PROTECTION
     55		165000 			DMTPRO	=	165000		; DEFAULT MAGTAPE VOLUME PROTECTION
     56		000020 			DFINF	=	16.		; INITIAL INDEX FILE ALLOCATION
     57		000000 			DFPRO	=	0		; FILE PROTECTION [RWED,RWED,RWED,RWED]
     58		000401 			DFUIC	=	401		; UIC [1,1]
     59		000007 			DFWIN	=	7		; WINDOW SIZE IN NUMBER OF RETRIEVAL POINTERS
     60		000020 			MAXCLF	=	16.		; MAXIMUM CLUSTER FACTOR
     61					;
     62					; EXTERNAL DATA
     63					;
     64	000000					F11DF$			; FILES-11 MACRO CODES
     65	000000					QIOSY$			; DEFINE QIO CODES
     66					;
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 5
CONSTANTS AND LOCAL DATA

     68					;
     69					; DEVICE DPB DEFINITIONS
     70					;
     71	000000				ATLUN2:	QIOW$	IO.ATT,LUN2,EFN1	; ATTACH THE UNKNOWN DEVICE
     72					;
     73	000014				GTLUN2:	GLUN$	LUN2,LUNBUF		; GET INFORMATION ABOUT LUN-2
     74					;
     75	000022				ASLUN2:	ALUN$	LUN2,XX,0		; ASSIGN THE UNKNOWN DEVICE
     76		000026'			$DEV	==	ASLUN2+A.LUNA		; ADDRESS OF DEVICE NAME
     77		000030'			$UNT	==	ASLUN2+A.LUNU		; ADDRESS OF DEVICE UNIT NUMBER
     78					;
     79	000032				DTLUN2:	QIOW$	IO.DET,LUN2,EFN1	; DETACH THE MYSTERY DEVICE
     80					;
     81					; BUFFER FOR LUN INFORMATION
     82					;
     83	000046				LUNBUF:	.BLKW	6			; 6 WORD BUFFER
     84					;
     85	000062	000000 			ERRNUM:	.WORD	0			; ERROR NUMBER
     86					;
     87					; PROMPT STRING FOR COMMAND INPUT
     88					;
     89	000064	   111 	   116 	   111 	PROMPT:	.ASCII	"INI>"
	000067	   076
     90		000004 			PROMPL = .-PROMPT
     91
     92						.EVEN
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 6
ERROR MESSAGES

     94						.SBTTL	ERROR MESSAGES
     95					;
     96					; ERROR MESSAGES
     97					;
     98			.NLIST	BIN
     99	000070	ERROR1:	.ASCIZ	%INI -- COMMAND I/O ERROR%
    100		;
    101	000121	ERROR2:	.ASCIZ	/INI -- SYNTAX ERROR/
    102		;
    103	000145	ERROR3:	.ASCIZ	/INI -- DEVICE NOT IN SYSTEM/
    104		;
    105	000201	ERROR4:	.ASCIZ	/INI -- HANDLER NOT RESIDENT/
    106		;
    107	000235	ERROR5:	.ASCIZ	/INI -- ILLEGAL UIC/
    108		;
    109	000260	ERROR6:	.ASCIZ	/INI -- ILLEGAL KEYWORD VALUE/
    110		;
    111			.EVEN
    112						.LIST	BIN
    113					;
    114					; ERROR MESSAGE ADDRESSES
    115					;
    116	000316	000070'			ERRMSG:	.WORD	ERROR1		; ADDRESS OF ERROR #1
    117	000320	000121'				.WORD	ERROR2		;
    118	000322	000145'				.WORD	ERROR3		;
    119	000324	000201'				.WORD	ERROR4		;
    120	000326	000235'				.WORD	ERROR5		;
    121	000330	000260'				.WORD	ERROR6		;
    122					;
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 7
INITIALIZATION

    124						.SBTTL	INITIALIZATION
    125					;
    126					;+
    127					;
    128					; *** - INIPAR - INITVOL COMMAND LINE PARSER. THIS CODE GETS THE COMMAND FROM THE
    129					;		 MCR AND PARSES IT INTO A FORM SUITABLE FOR ALL OTHER PROGRAM
    130					;		 SEGMENTS.
    131					;
    132					; OUTPUTS:
    133					;
    134					;	THE FOLLOWING CELLS IN THE ROOT SEGMENT ARE INITIALIZED OR SET TO
    135					;	PARAMETERS OBTAINED FROM THE COMMAND LINE.
    136					;
    137					;	$IBAD	-	BAD BLOCK PROCESSING BITS		/BAD=
    138					;	$ICHA	-	CHARACTERISTICS				/CHA=
    139					;	$ICLF	-	CLUSTERFACTOR				/CLF=
    140					;	$IDENS	-	MAGTAPE DENSITY				/DENS=
    141					;	$IDEV	-	DEVICE UCB OR PUD ADDRESS
    142					;	$IFPRO	-	FILE DEFAULT PROTECTION			/FPRO=
    143					;	$IINDX	-	INDEX FILE LBN				/INDX=
    144					;	$IINF	-	INITIAL FILE HEADER ALLOC IN INDEX FILE
    145					;	$IKEY	-	KEYWORD INDICATOR FLAG WORD
    146					;	$IMXF	-	MAXIMUM NUMBER OF FILES			/MXF=
    147					;	$ILRU	-	DIRECTORY PRE-ACCESS LIMIT		/LRU=
    148					;	$IPRO	-	VOLUME PROTECTION			/PRO=
    149					;	$IVNAM	-	VOLUME NAME
    150					;	$IUIC	-	USER ID CODE				/UIC=
    151					;	$IWIN	-	WINDOW SIZE				/WIN=
    152					;
    153					;-
    154					;
    155	000332	012701 	000000G		$IPREP::MOV	#$IVNAM,R1	; GET ADDRESS OF THE VOLUME NAME
    156	000336	012702 	000006 			MOV	#6,R2		; SETUP TO ZERO THE NAME
    157	000342	005021 			10$:	CLR	(R1)+		; CLEAR THESE TWO CHARACTERS
    158	000344	077202 				SOB	R2,10$		; DO THEM ALL
    159	000346	012703 	000000G			MOV	#$IUIC,R3	; SETUP DEFAULT PARAMETERS
    160	000352	012723 	000401 			MOV	#DFUIC,(R3)+	; SET DEFAULT UIC
    161	000356	012723 	000000C			MOV	#CH.NAT!CH.NDC,(R3)+ ; CHARACTERISTICS
    162	000362	012723 	000000 			MOV	#DFPRO,(R3)+	; VOLUME PROTECTION
    163	000366	012723 	164000 			MOV	#DFFPRO,(R3)+	; FILE PROTECTION
    164	000372	012723 	001440 			MOV	#DFDENS,(R3)+	; MAGTAPE DENSITY
    165	000376	112723 	000005 			MOVB	#DFEXT,(R3)+	; FILE EXTENSION
    166	000402	112723 	000007 			MOVB	#DFWIN,(R3)+	; WINDOW SIZE
    167	000406	012723 	000001 			MOV	#DFCLF,(R3)+	; CLUSTERFACTOR
    168	000412	012723 	000020 			MOV	#DFINF,(R3)+	; INITIAL FILE ALLOCATION
    169	000416	112767 	000003 	000000G		MOVB	#DFLRU,$ILRU	; SET DEFAULT DIRECTORY PRE-ACCESS LIMIT
    170	000424	005067 	000000G			CLR	$IKEY		; CLEAR THE KEYWORD FLAG
    171	000430	005067 	177426 			CLR	ERRNUM		; RESET THE ERROR NUMBER
    172	000434	005067 	177370 			CLR	$UNT		; ASSUME DEVICE UNIT #0
    173	000440	012704 	000064'			MOV	#PROMPT,R4	; GET PROMPT STRING
    174	000444	012703 	000004 			MOV	#PROMPL,R3	; AND BYTE COUNT
    175	000450					CALL	.GTCML		; GET A COMMAND LINE
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 8
INITIALIZATION

    177					;
    178					; SETUP TO CALL THE PARSER
    179					;
    180	000454	005001 				CLR	R1		; SET SPACE FLUSH OPTION
    181	000456	012702 	000000'			MOV	#INIKTB,R2	; GET KEYWORD TABLE ADDRESS
    182	000462	012705 	000000'			MOV	#START,R5	; GET STARTING STATE ADDRESS
    183	000466					CALL	.TPARS		; GO PARSE THE INPUT LINE
    184	000472	103450 				BCS	IPRER2		; SOME SORT OF SYNTAX ERROR
    185					;
    186					; SET FINAL DEFAULTS AND CLEAN UP
    187					;
    188	000474	032767 	000000C	000000G		BIT	#KY.IND!KY.DEN,$IKEY ; '/INDX' OPTION SEEN?
    189	000502	001011 				BNE	20$		; YES
    190	000504	026727 	177336 	052104 		CMP	LUNBUF,#"DT	; IS THIS DEVICE A DECTAPE?
    191	000512	001403 				BEQ	15$		; YES
    192	000514					CALL	SETMID		; NO, SO SETUP DEFAULT CASE
    193	000520	000402 				BR	20$
    194	000522				15$:	CALL	SETBEG		; PUT INDEX FILE AT START FOR DECTAPES
    195	000526	016767 	000000G	000000G	20$:	MOV	$INDXF,$MFD	; PUT THE MFD IN THE SAME PLACE
    196	000534	016767 	000002G	000002G		MOV	$INDXF+2,$MFD+2	; DON'T FORGET THE LOW ORDER BITS
    197	000542	016767 	000000G	000000G		MOV	$INDXF,$SBMAP	; SET STORAGE BIT MAP
    198	000550	016767 	000002G	000002G		MOV	$INDXF+2,$SBMAP+2 ; CONTIGUOUS WITH MFD
    199	000556	012767 	002400 	177776G		MOV	#5*256.,$BTBLK-2 ; SETUP RETRIEVAL PTR HEADER
    200	000564	012767 	000001 	000002G		MOV	#1,$HMBLK+2	; SET HOME BLOCK STARTING LBN
    201	000572					RETURN			; RETURN TO THE MAINLINE
    202					;
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 9
INITIALIZATION

    204					;
    205					; ERROR MESSAGE HANDLER
    206					;
    207	000574	005267 	177262 		IPRER6:	INC	ERRNUM		; ERROR #6
    208	000600	005267 	177256 		IPRER5:	INC	ERRNUM		; ERROR #5
    209	000604	005267 	177252 		IPRER4:	INC	ERRNUM		; ERROR #4
    210	000610	005267 	177246 		IPRER3:	INC	ERRNUM		; ERROR #3
    211	000614	005267 	177242 		IPRER2:	INC	ERRNUM		; ERROR #2
    212	000620	016700 	177236 		IPRER1:	MOV	ERRNUM,R0	; ERROR #1
    213	000624	006300 				ASL	R0		; MAKE ERROR# INTO WORD OFFSET
    214	000626	016000 	000316'			MOV	ERRMSG(R0),R0	; GET ADDRESS OF ERROR MESSAGE
    215	000632	000167 	000000G			JMP	$INIER		; GO PRINT THE HORRIBLE TRUTH
    216					;
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 10
STATE TABLE FOR TPARS

    218						.SBTTL	STATE TABLE FOR TPARS
    219
    220						.NLIST	MEB
    221
    222						.MCALL	ISTAT$,STATE$,TRAN$
    223
    224	000636					ISTAT$	INISTB,INIKTB
    225
    226						.GLOBL	START
    227
    228					; READ DEVICE AND UNIT NUMBER
    229
    230	000636					STATE$	START
    231	000636					TRAN$	$ANY,,SETDV1
    232
    233	000636					STATE$
    234	000636					TRAN$	$ANY,,SETDV2
    235
    236	000636					STATE$
    237	000636					TRAN$	$NUMBR,DEV1,SETUNT
    238	000636					TRAN$	$LAMDA
    239
    240	000636					STATE$	DEV1
    241	000636					TRAN$	':,,GETDEV
    242
    243					; READ VOLUME LABEL
    244
    245	000636					STATE$
    246	000636					TRAN$	$STRNG,,SETLAB
    247
    248					; SCAN FOR OPTIONS AND END OF LINE
    249
    250	000636					STATE$	OPTS
    251	000636					TRAN$	$EOS,$EXIT
    252	000636					TRAN$	'/
    253
    254	000636					STATE$
    255	000636					TRAN$	"BAD",BAD		; BAD BLOCK PROCESSING
    256	000636					TRAN$	"CHA",CHA		; CHARACTERISTICS
    257						.IF	GT F$$LVL-1
    258						TRAN$	"CLF",CLF		; CLUSTERFACTOR
    259						.ENDC
    260	000636					TRAN$	"DENS",DENS		; MAGTAPE DENSITY
    261	000636					TRAN$	"EXT",EXT		; EXTEND INCREMENT
    262	000636					TRAN$	"FPRO",FPRO		; FILE DEFAULT PROTECTION
    263					.IF DF R$$20F
    264	000636					TRAN$	"FULL",OPTS,SETFUL	; FULL FILE SYSTEM (NOT TOPS-20)
    265					.ENDC
    266	000636					TRAN$	"INDX",INDX		; INDEX FILE LBN (WHERE TO PUT FILE)
    267	000636					TRAN$	"INF",INF		; INITIAL NUMBER OF FILES IN INDEX FILE
    268	000636					TRAN$	"MXF",MXF		; MAXIMUM NUMBER OF FILES FOR VOLUME
    269	000636					TRAN$	"PRO",PRO		; VOLUME PROTECTION
    270	000636					TRAN$	"UIC",UIC		; USER IDENTIFICATION CODE
    271	000636					TRAN$	"WIN",WIN		; WINDOW BLOCK SIZE
    272	000636					TRAN$	"LRU",LRU		; DIRECTORY PRE-ACCESS LIMIT
    273
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 11
OPTION PROCESSING

    275						.SBTTL	OPTION PROCESSING
    276					;
    277					; BAD BLOCK PROCESSING
    278					;
    279	000636					STATE$	BAD			; START BAD BLOCK PROCESSING
    280	000636					TRAN$	'=			; KEYWORD MUST BE FOLLOWED BY '='
    281
    282	000636					STATE$
    283	000636					TRAN$	'[			; MUST BE THEN FOLLOWED BY '['
    284
    285	000636					STATE$	BAD1			; CHECK MODE(S) REQUIRED
    286	000636					TRAN$	"AUTO",BAD2,SETAUT	; AUTO MODE SELECTED
    287	000636					TRAN$	"MAN",BAD2,SETMAN	; MANUAL MODE SELECTED
    288
    289	000636					STATE$	BAD2
    290	000636					TRAN$	<',>,BAD1		; MORE THAN ONE MODE REQUIRED
    291	000636					TRAN$	'],OPTS			; GET NEXT OPTION
    292					;
    293					; CHARACTERISTICS
    294					;
    295	000636					STATE$	CHA			; START CHARACTERISTICS PROCESSING
    296	000636					TRAN$	'=			; KEYWORD MUST BE FOLLOWED BY '='
    297
    298	000636					STATE$
    299	000636					TRAN$	'[			; MUST THEN BE FOLLOWED BY A '['
    300
    301	000636					STATE$	CHA1			; CHECK CHARACTERISTICS REQUIRED
    302	000636					TRAN$	"ATCH",CHA2,SETATC	; DOES HE WANT TO ATTACH?
    303	000636					TRAN$	"DCF",CHA2,SETDCF	; DOES HE WANT DEVICE CONTROL FUNCTIONS
    304	000636					TRAN$	$LAMDA
    305
    306	000636					STATE$	CHA2
    307	000636					TRAN$	<',>,CHA1
    308	000636					TRAN$	'],OPTS
    309
    310					;
    311					; 1600 BPI MAG TAPE
    312					;
    313	000636					STATE$	DENS			; MAGTAPE DENSITY PROCESSING
    314	000636					TRAN$	'=			; MUST BE FOLLOWED BY '='
    315
    316	000636					STATE$
    317	000636					TRAN$	"1600",OPTS,SET160	; SET MT DENSITY = 1600
    318	000636					TRAN$	"800",OPTS,SET080	; SET MT DENSITY = 800
    319
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 12
OPTION PROCESSING

    321						.IF	GT F$$LVL-1
    322					;
    323					; CLUSTERFACTOR
    324					;
    325						STATE$	CLF			; START CLUSTERFACTOR PROCESSING
    326						TRAN$	'=			; KEYWORD MUST BE FOLLOWED BY '='
    327
    328						STATE$
    329						TRAN$	$NUMBR,OPTS,SETCLF	; GET THE GIVEN CLUSTERFACTOR
    330						.ENDC
    331
    332					;
    333					; EXTEND INCREMENT
    334					;
    335	000636					STATE$	EXT			; START EXTEND INCREMENT PROCESSING
    336	000636					TRAN$	'=			; KEYWORD MUST BE FOLLOWED BY '='
    337
    338	000636					STATE$
    339	000636					TRAN$	$NUMBR,OPTS,SETEXT	; GET THE GIVEN EXTEND INCREMENT
    340					;
    341					; FILE DEFAULT PROTECTION
    342					;
    343	000636					STATE$	FPRO			; START THE FILE PROTECTION PROCESSING
    344	000636					TRAN$	'=,CPRO,SETFDP		; KEYWORD MUST BE FOLLOWED BY '='
    345					;
    346					; INDEX FILE LBN
    347					;
    348	000636					STATE$	INDX			; START INDEX FILE LBN PROCESSING
    349	000636					TRAN$	'=			; KEYWORD MUST BE FOLLOWED BY '='
    350
    351	000636					STATE$
    352	000636					TRAN$	"BEG",OPTS,SETBEG	; START AT BEGINNING OF VOLUME
    353	000636					TRAN$	"MID",OPTS,SETMID	; START AT MIDDLE OF VOLUME
    354	000636					TRAN$	"END",OPTS,SETEND	; START NEAR END OF VOLUME
    355	000636					TRAN$	"BLK"			; USE GIVEN BLOCK NUMBER
    356
    357	000636					STATE$
    358	000636					TRAN$	':			; NEXT CHARACTER MUST BE ':'
    359
    360	000636					STATE$
    361	000636					TRAN$	$NUMBR,OPTS,SETBLK	; GO SETUP ACTUAL BLOCK NUMBER
    362
    363					; INITIAL NUMBER OF FILES IN THE INDEX FILE
    364					;
    365	000636					STATE$	INF			; START THE INDEX FILE PROCESSING
    366	000636					TRAN$	'=			; KEYWORD MUST BE FOLLOWED BY '='
    367
    368	000636					STATE$
    369	000636					TRAN$	$NUMBR,OPTS,SETINF	; SETUP NUMBER OF FILES TO ALLOCATE
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 13
OPTION PROCESSING

    371					;
    372					; MAXIMUM NUMBER OF FILES FOR VOLUME
    373					;
    374	000636					STATE$	MXF			; START THE PROCESSING FOR THE MAX NUMBER OF FILES
    375	000636					TRAN$	'=			; KEYWORD MUST BE FOLLOWED BY '='
    376
    377	000636					STATE$
    378	000636					TRAN$	$NUMBR,OPTS,SETMXF	; SETUP MAXIMUM FILES ON VOLUME
    379					;
    380					; DIRECTORY PRE-ACCESS LIMIT
    381					;
    382	000636					STATE$	LRU
    383	000636					TRAN$	'=
    384	000636					STATE$
    385	000636					TRAN$	$NUMBR,OPTS,SETLRU
    386
    387					;
    388					; PROTECTION
    389					;
    390	000636					STATE$	PRO			; START VOLUME PROTECTION PROCESSING
    391	000636					TRAN$	'=,CPRO,SETPRO		; KEYWORD MUST BE FOLLOWED BY '='
    392
    393	000636					STATE$	CPRO			; COMMON PROTECTION PROCESSING
    394	000636					TRAN$	'[,,IGROUP
    395
    396	000636					STATE$	SPRO
    397	000636					TRAN$	'],OPTS,ENDGRP
    398	000636					TRAN$	<',>,SPRO,NXGRP
    399	000636					TRAN$	'R,SPRO,SETRP
    400	000636					TRAN$	'W,SPRO,SETWP
    401	000636					TRAN$	'E,SPRO,SETEP
    402	000636					TRAN$	'D,SPRO,SETDP
    403
    404					;
    405					; READ UIC
    406					;
    407	000636					STATE$	UIC			; START PROJECT/PROGRAMMER PROCESSING
    408	000636					TRAN$	'=
    409
    410	000636					STATE$
    411	000636					TRAN$	'[
    412
    413	000636					STATE$
    414	000636					TRAN$	$NUMBR,,SETGN		; SET GROUP NUMBER
    415
    416	000636					STATE$
    417	000636					TRAN$	<',>
    418
    419	000636					STATE$
    420	000636					TRAN$	$NUMBR,,SETPN		; SET PROGRAMMER NUMBER
    421
    422	000636					STATE$
    423	000636					TRAN$	'],OPTS
    424					;
    425					; WINDOW SIZE
    426					;
    427	000636					STATE$	WIN			; START WINDOW SIZE PROCESSING
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 13-1
OPTION PROCESSING

    428	000636					TRAN$	'=			; KEYWORD MUST BE FOLLOWED BY '='
    429
    430	000636					STATE$
    431	000636					TRAN$	$NUMBR,OPTS,SETWIN	; SETUP WINDOW SIZE IN NUMBER OF RETRIEVAL PTRS
    432					;
    433	000636					STATE$				; DUMMY TERMINATING STATE
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 14
ACTION ROUTINES

    435					.SBTTL	ACTION ROUTINES
    436
    437	000000					.PSECT	ACTION
    438					;
    439					; DEVICE NAME CHAR 1
    440					;
    441	000000	116767 	000000G	000026'	SETDV1:	MOVB	.PCHAR,$DEV
    442	000006					RETURN
    443					;
    444					; DEVICE NAME CHAR 2
    445					;
    446	000010	116767 	000000G	000027'	SETDV2:	MOVB	.PCHAR,$DEV+1
    447	000016					RETURN
    448					;
    449					; UNIT NUMBER
    450					;
    451	000020	016767 	000000G	000030'	SETUNT:	MOV	.PNUMB,$UNT
    452	000026					RETURN
    453					;
    454					; GET DEVICE FROM THE PUD ENTRY
    455					;
    456	000030				GETDEV:	DIR$	#ASLUN2		; ASSIGN THE GIVEN LUN
    457	000036	103430 				BCS	40$		; LUN NOT AVAILABLE
    458	000040					DIR$	#ATLUN2		; NOW ATTACH THE LUN SO NOBODY CAN STEAL IT
    459	000046	103002 				BCC	10$		; ATTACH SUCCESSFUL
    460	000050	000167 	000604'			JMP	IPRER4		; HANDLER NOT RESIDENT
    461	000054				10$:	DIR$	#GTLUN2		; GET INFO ON THE REAL DEVICE
    462					.IF DF R$$20F
    463	000062	012701 	000000G			MOV	#.PUDBA,R1	; GET THE ADDRESS OF THE FIRST PUD
    464					.IFF
    465						MOV	.PUDBA,R1	; GET THE ADDRESS OF THE FIRST PUD
    466					.ENDC
    467	000066	026167 	000000G	000046'	20$:	CMP	U.DN(R1),LUNBUF	; DO THE DEVICE NAMES MATCH?
    468	000074	001004 				BNE	30$		; NO, DON'T CHECK ANY FURTHER
    469	000076	126167 	000000G	000050'		CMPB	U.UN(R1),LUNBUF+2 ; YES, BUT DO THE UNIT NUMBERS MATCH?
    470	000104	001407 				BEQ	50$		; YES, WE FOUND OUR PUD AT LAST
    471	000106	062701 	000000G		30$:	ADD	#U.SZ,R1	; NO MATCH, SO BUMP PUD POINTER
    472					.IF DF R$$20F
    473	000112	020127 	000000G			CMP	R1,#.PUDEA	; AT THE END OF THE TRAIL?
    474					.IFF
    475						CMP	R1,.PUDEA	; AT THE END OF THE TRAIL?
    476					.ENDC
    477	000116	103763 				BLO	20$		; NO, TRY AGAIN
    478	000120	000167 	000610'		40$:	JMP	IPRER3		; YES, NO SUCH DEVICE IN SYSTEM
    479	000124	010167 	000000G		50$:	MOV	R1,$PUD		; SAVE THE PUD ADDRESS FOR LATER
    480					;
    481					; SETUP DEVICE PARAMETERS
    482					;
    483	000130	012702 	000000G			MOV	#$IDVTP,R2	; GET ADDRESS OF DEVICE INFO TABLE
    484	000134	016722 	000046'			MOV	LUNBUF,(R2)+	; SAVE THE NAME OF THE DEVICE
    485	000140	036727 	000000C	000040 		BIT	LUNBUF+U.C1,#FD.SQD ; IS THIS MAGTAPE?
    486	000146	001406 				BEQ	60$		; NO!
    487	000150	052767 	000000G	000000G		BIS	#KY.DEN,$IKEY	; YES, SET MT FLAG
    488	000156	012767 	165000 	000000G		MOV	#DMTPRO,$IPRO	; AND DEFAULT VOLUME PROTECTION
    489	000164	016722 	000050'		60$:	MOV	LUNBUF+2,(R2)+	; SAVE THE UNIT NUMBER
    490	000170	016112 	000000G			MOV	U.LBN(R1),(R2)	; PICK UP VOLUME SIZE
    491	000174	016146 	000000G			MOV	U.LBH(R1),-(SP)	; ALSO GET HIGH ORDER
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 14-1
ACTION ROUTINES

    492	000200	006226 				ASR	(SP)+		; GET LOW ORDER BIT INTO C
    493	000202	001403 				BEQ	70$		; BRANCH IF REMAINING HIGH ORDER IS ZERO
    494	000204	012712 	177777 			MOV	#177777,(R2)	; IT ISN'T - USE MAXIMUM OF 65K
    495	000210	000261 				SEC
    496	000212	006012 			70$:	ROR	(R2)		; SET MAXIMUM NUMBER OF FILES AS HALF VOLUME SIZE
    497	000214	012267 	000000G			MOV	(R2)+,$IMXF	; SETUP DEFAULT MAXIMUM NUMBER OF FILES
    498	000220	000241 				CLC
    499	000222	006067 	000000G			ROR	$IMXF		; HALF AS MANY AS MAXIMUM ALLOWED
    500	000226	016122 	000000G			MOV	U.LBH(R1),(R2)+	; GET THE HIGH ORDER PART OF THE VOLUME SIZE
    501	000232	016122 	000000G			MOV	U.LBN(R1),(R2)+	; SAVE THE LOW ORDER BITS OF THE VOLUME SIZE
    502	000236	016212 	177774 			MOV	-4(R2),(R2)	; ASSUME THE VOLUME SIZE IS THE SAME AS THE DISK SIZE
    503	000242	012267 	000000G			MOV	(R2)+,$INDXF	; SETUP TEMPORARY PTR TO INDEX FILE
    504	000246	016212 	177774 			MOV	-4(R2),(R2)	; DON'T FORGET THE LOW ORDER BITS
    505	000252	011267 	000002G			MOV	(R2),$INDXF+2	; DITTO FOR INDEX FILE
    506	000256					RETURN
    507					;
    508					; VOLUME LABEL
    509					;
    510	000260	005767 	000000G		SETLAB:	TST	.PSTCN		; DID WE GET ANY CHARACTERS?
    511	000264	001426 				BEQ	30$		; NO
    512	000266	032767 	000000G	000000G		BIT	#KY.DEN,$IKEY	; IF THIS IS MAGTAPE
    513	000274	001404 				BEQ	5$
    514	000276	022767 	000006 	000000G		CMP	#6,.PSTCN	; 6 CHARS MAX
    515	000304	000403 				BR	6$
    516	000306	022767 	000014 	000000G	5$:	CMP	#12.,.PSTCN	; CHECK LENGTH OF VOLUME NAME
    517	000314	103002 			6$:	BHIS	10$		; OK IF LESS THAN 12.
    518	000316	000167 	000614'			JMP	IPRER2		; SYNTAX ERROR OTHERWISE
    519	000322	016701 	000000G		10$:	MOV	.PSTPT,R1	; GET THE ADDRESS OF THE STRING
    520	000326	012702 	000000G			MOV	#$IVNAM,R2	; GET ADDRESS OF WHERE TO STORE STRING
    521	000332	112122 			20$:	MOVB	(R1)+,(R2)+	; SAVE IN PREDEFINED PLACE
    522	000334	005367 	000000G			DEC	.PSTCN		; ANY MORE?
    523	000340	003374 				BGT	20$		; YES
    524	000342				30$:	RETURN
    525					;
    526					; SET BAD BLOCK MODES
    527					;
    528	000344	052767 	000001 	000000G	SETAUT:	BIS	#IN.AUT,$IBAD	; AUTO MODE REQUESTED
    529	000352	000403 				BR	BADCOM		; TAKE COMMON EXIT
    530	000354	052767 	000002 	000000G	SETMAN:	BIS	#IN.MAN,$IBAD	; MANUAL MODE REQUESTED
    531	000362	052767 	000000G	000000G	BADCOM:	BIS	#KY.BAD,$IKEY	; SAY WE HAVE PASSED THIS WAY
    532	000370	000525 				BR	ERRCHK		; CHECK IF VALID KEYWORD
    533					;
    534						.IF	GT F$$LVL-1
    535					;
    536					; SET CLUSTERFACTOR
    537					;
    538					SETCLF:	CMP	#MAXCLF,.PNUMB	; IS THE CLUSTERFACTOR SIZE VALID
    539						BLO	ILLERR		; NO
    540						MOV	.PNUMB,$ICLF	; SET CLUSTERFACTOR
    541						BEQ	ILLERR		; ZERO IS ALSO AN ERROR
    542						BR	ERRCHK		; CHECK IF VALID KEYWORD
    543						.ENDC
    544					;
    545					;
    546					; SET MAGTAPE DENSITY
    547					;
    548	000372	012767 	003100 	000000G	SET160:	MOV	#1600.,$IDENS	; HI DENSITY MT DRIVE
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 14-2
ACTION ROUTINES

    549	000400	000403 				BR	SEXIT		; EXIT NOW
    550	000402	012767 	001440 	000000G	SET080:	MOV	#800.,$IDENS	; STANDARD DEFAULT CASE
    551	000410	032767 	000000G	000000G	SEXIT:	BIT	#KY.DEN,$IKEY	; IS THIS REALLY MT?
    552	000416	001537 				BEQ	SYNTAX		; NO!
    553	000420					RETURN			; YES, TRY FOR MORE OPTIONS
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 15
ACTION ROUTINES

    555					;
    556					; SET EXTEND INCREMENT
    557					;
    558	000422	022767 	000200 	000000G	SETEXT:	CMP	#200,.PNUMB	; NUMBER OF BLOCKS TOO LARGE?
    559	000430	103002 				BHIS	SETEX1		; NO
    560	000432	000167 	000574'		ILLERR:	JMP	IPRER6		; YES, ILLEGAL VALUE
    561	000436	116767 	000000G	000000G	SETEX1:	MOVB	.PNUMB,$IEXT	; SO SET IT
    562	000444	000477 				BR	ERRCHK		; CHECK IF VALID KEYWORD
    563					;
    564					; SETUP FILE DEFAULT PROTECTION
    565					;
    566	000446	012767 	000000G	000302 	SETFDP:	MOV	#$IFPRO,PROTEC	; GET POINTER TO THE PROTECTION WORD
    567	000454	000473 				BR	ERRCHK		; CHECK IF VALID KEYWORD
    568					.IF DF R$$20F
    569					;
    570					; SET FULL FILE STRUCTURE (NOT TOPS-10)
    571					;
    572	000456	052767 	000000G	000000G	SETFUL:	BIS	#KY.FUL,$IKEY	; NOTE THE FACT
    573	000464	000467 				BR	ERRCHK		; RETURN
    574					.ENDC
    575					;
    576					; SETUP INDEX FILE LBN ALLOCATION
    577					;
    578	000466	005067 	000000G		SETBEG:	CLR	$INDXF		; START AT THE BEGINNING
    579	000472	005067 	000002G			CLR	$INDXF+2	; OF THE VOLUME
    580	000476	000421 				BR	INDCOM		; TAKE COMMON EXIT
    581					;
    582	000500	006267 	000000G		SETMID:	ASR	$INDXF		; MOVE BLOCK PTR TO THE MIDDLE
    583	000504	006067 	000002G			ROR	$INDXF+2	; BY DIVIDING BY 2
    584	000510	000414 				BR	INDCOM		; TAKE COMMON EXIT
    585					;
    586	000512	162767 	000100 	000002G	SETEND:	SUB	#100,$INDXF+2	; START AT LEAST 100 BLOCKS BACK
    587	000520	005667 	000000G			SBC	$INDXF		; FROM THE END OF THE VOLUME
    588	000524	000406 				BR	INDCOM		; TAKE COMMON EXIT
    589					;
    590	000526	016767 	000000G	000000G	SETBLK:	MOV	.PNUMH,$INDXF	; GET HIGH ORDER BITS OF BLOCK NUMBER
    591	000534	016767 	000000G	000002G		MOV	.PNUMB,$INDXF+2	; STORE THE LOW ORDER BITS
    592	000542	032767 	000000G	000000G	INDCOM:	BIT	#KY.IND,$IKEY	; HAVE WE BEEN THIS WAY BEFORE?
    593	000550	001062 				BNE	SYNTAX		; YES
    594	000552	052767 	000000G	000000G		BIS	#KY.IND,$IKEY	; NO, BUT SET JUST IN CASE
    595	000560	000431 				BR	ERRCHK		; CHECK IF VALID KEYWORD
    596					;
    597					; SETUP INITIAL FILE ALLOCATION IN INDEX FILE
    598					;
    599	000562	026767 	000000G	000004G	SETINF:	CMP	.PNUMB,$IDVTP+4	; TOO LARGE?
    600	000570	101320 				BHI	ILLERR		; YES
    601	000572	016767 	000000G	000000G		MOV	.PNUMB,$IINF	; NO, SO SAVE IT
    602	000600	001714 				BEQ	ILLERR		; ZERO IS ALSO AN ERROR
    603	000602	000420 				BR	ERRCHK		; CHECK IF THIS KEYWORD IS VALID
    604					;
    605					; SETUP MAXIMUM NUMBER OF FILES PERMITTED
    606					;
    607	000604	026767 	000000G	000004G	SETMXF:	CMP	.PNUMB,$IDVTP+4	; TOO LARGE?
    608	000612	101307 				BHI	ILLERR		; YES
    609	000614	016767 	000000G	000000G		MOV	.PNUMB,$IMXF	; SAVE FOR LATER
    610	000622	001703 				BEQ	ILLERR		; ZERO IS BAD TOO
    611	000624	000407 				BR	ERRCHK		; IS KEYWORD VALID IN THIS CONTEXT?
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 15-1
ACTION ROUTINES

    612					;
    613					; SET DIRECTORY PRE-ACCESS LIMIT
    614					;
    615	000626	105767 	000001G		SETLRU:	TSTB	.PNUMB+1	; LRU IS A BYTE VALUE
    616	000632	001277 				BNE	ILLERR
    617	000634	116767 	000000G	000000G		MOVB	.PNUMB,$ILRU
    618	000642	000400 				BR	ERRCHK
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 16
ACTION ROUTINES

    620					;
    621					; CHECK IF THE GIVEN KEYWORD IS VALID IN THE GIVEN CONTEXT
    622					;
    623	000644	032767 	000000G	000000G	ERRCHK:	BIT	#KY.DEN,$IKEY	; IS THE DEVICE MT?
    624	000652	001021 				BNE	SYNTAX		; YES, SO KEYWORD IS ILLEGAL
    625	000654					RETURN			; NO, ALL'S WELL
    626					;
    627					; SET CHARACTERISTICS
    628					;
    629	000656	142767 	000000G	000000G	SETDCF:	BICB	#CH.NDC,$ICHA	; DEVICE CONTROL FUNCTIONS
    630	000664	000767 				BR	ERRCHK		; CHECK IF KEYWORD LEGAL
    631
    632	000666	142767 	000000G	000000G	SETATC:	BICB	#CH.NAT,$ICHA	; ALLOW ATTACH/DETACH
    633	000674	000763 				BR	ERRCHK		; IS THIS KEYWORD VALID
    634					;
    635					; SET WINDOW SIZE IN NUMBER OF RETRIEVAL POINTERS
    636					;
    637	000676	022767 	000177 	000000G	SETWIN:	CMP	#127.,.PNUMB	; TOO BIG?
    638	000704	103652 				BLO	ILLERR		; YES, ILLEGAL VALUE
    639	000706	116767 	000000G	000000G		MOVB	.PNUMB,$IWIN	; SAVE FOR LATER
    640	000714	000753 				BR	ERRCHK		; IS KEYWORD VALID IN THIS CONTEXT?
    641					;
    642					; TO HERE FOR SYNTAX ERRORS DETECTED BY ACTION ROUTINES
    643					;
    644	000716	000167 	000614'		SYNTAX:	JMP	IPRER2		; INPUT ERROR
    645					;
    646					; PPN - GROUP NUMBER
    647					;
    648	000722	116767 	000000G	000001G	SETGN:	MOVB	.PNUMB,$IUIC+1	; GET GROUP NUMBER
    649	000730	000403 				BR	TSTPPN
    650					;
    651					; PPN - PROGRAMMER NUMBER
    652					;
    653	000732	116767 	000000G	000000G	SETPN:	MOVB	.PNUMB,$IUIC	; GET PROGRAMMER NUMBER
    654	000740	105767 	000001G		TSTPPN:	TSTB	.PNUMB+1	; CHECK IF NUMBER IS IN RANGE
    655	000744	001402 				BEQ	10$		; NOT GREATER THAN 377 - OK
    656	000746	000167 	000600'			JMP	IPRER5		; BAD UIC
    657	000752				10$:	RETURN			; EXIT
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 17
ACTION ROUTINES

    659					;
    660					; SET VOLUME PERMISSIONS
    661					;
    662	000754	000000 			GRCNT:	.WORD	0		; GROUP COUNTER
    663	000756	000000 			PROTEC:	.WORD	0		; POINTER TO PROTECTION CODE WORD
    664
    665	000760	012767 	000000G	177770 	SETPRO:	MOV	#$IPRO,PROTEC	; GET POINTER TO THE PROTECTION WORD
    666	000766					RETURN
    667
    668	000770	012767 	000004 	177756 	IGROUP:	MOV	#4,GRCNT
    669					;
    670					; MOVE TO NEXT PERMISSIONS CATEGORY
    671					;
    672	000776	000261 			NXGRP:	SEC			; FORCE ONES
    673	001000	006077 	177752 			ROR	@PROTEC
    674	001004	006277 	177746 			ASR	@PROTEC		; SHIFT TO NEXT GROUP
    675	001010	006277 	177742 			ASR	@PROTEC
    676	001014	006277 	177736 			ASR	@PROTEC
    677	001020	005367 	177730 			DEC	GRCNT		; COUNT GROUPS
    678	001024	002734 				BLT	SYNTAX		; TOO MANY IS AN ERROR
    679	001026					RETURN
    680					;
    681					; SET READ PERMIT
    682					;
    683	001030	042777 	010000 	177720 	SETRP:	BIC	#FP.RDV*10000,@PROTEC
    684	001036					RETURN
    685					;
    686					; SET WRITE PERMIT
    687					;
    688	001040	042777 	020000 	177710 	SETWP:	BIC	#FP.WRV*10000,@PROTEC
    689	001046					RETURN
    690					;
    691					; SET EXTEND PERMIT
    692					;
    693	001050	042777 	040000 	177700 	SETEP:	BIC	#FP.EXT*10000,@PROTEC
    694	001056					RETURN
    695					;
    696					; SET DELETE PERMIT
    697					;
    698	001060	042777 	100000 	177670 	SETDP:	BIC	#FP.DEL*10000,@PROTEC
    699	001066					RETURN
    700					;
    701					; END OF PROTECTION SPEC
    702					;
    703	001070	005767 	177660 		ENDGRP:	TST	GRCNT		; CHECK THE GROUP COUNT
    704	001074	001310 				BNE	SYNTAX		; MUST HAVE 4
    705	001076					RETURN
    706
    707		000001 				.END
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 17-1
Symbol table

ASLUN2  000022R  	FD.DIR= 000010   	H.FLEV= 000006   	IE.IPR= 177641   	IO.CCT= 002460
ATLUN2  000000R  	FD.FTN= 000001   	H.FNUM= 000002   	IE.ISQ= 177703   	IO.CLN= 003400
A.LULU= 000002   	FD.INS= 000010   	H.FOWN= 000010   	IE.ITI= 177643   	IO.CON= 015400
A.LUNA= 000004   	FD.PLC= 000004   	H.FPRO= 000012   	IE.ITS= 177770   	IO.CRC= 001020
A.LUNU= 000006   	FD.RAH= 000001   	H.FSEQ= 000004   	IE.LCK= 177745   	IO.CRE= 012000
BAD     000124R     002	FD.RAN= 000002   	H.IDOF= 000000   	IE.LNL= 177646   	IO.CTI= 015400
BADCOM  000362R     004	FD.REC= 000001   	H.MPOF= 000001   	IE.MBK= 177721   	IO.CTL= 016400
BAD1    000130R     002	FD.RWM= 000001   	H.PROG= 000010   	IE.MOD= 177753   	IO.DAC= 010000
BAD2    000144R     002	FD.SDI= 000020   	H.PROJ= 000011   	IE.NBF= 177731   	IO.DCI= 014400
CHA     000154R     002	FD.SQD= 000040   	H.SCHA= 000015   	IE.NBK= 177727   	IO.DCT= 002470
CHA1    000160R     002	FD.TTY= 000004   	H.UCHA= 000014   	IE.NFI= 177704   	IO.DEL= 012400
CHA2    000176R     002	FD.WBH= 000002   	H.UFAT= 000016   	IE.NLN= 177733   	IO.DET= 002000
CH.NAT= ****** GX	FO.APD= 000106   	IE.ABO= 177761   	IE.NNC= 177674   	IO.DIS= 016000
CH.NDC= ****** GX	FO.MFY= 000002   	IE.ACT= 177771   	IE.NOD= 177751   	IO.DTI= 016000
CPRO    000336R     002	FO.RD = 000001   	IE.ADP= 177636   	IE.NSF= 177746   	IO.ENA= 006000
DENS    000206R     002	FO.UPD= 000006   	IE.ALN= 177736   	IE.OFL= 177677   	IO.EOF= 003000
DEV1    000020R     002	FO.WRT= 000016   	IE.AST= 177660   	IE.ONP= 177773   	IO.ESA= 002500
DFCLF = 000001   	FPRO    000234R     002	IE.BAD= 177777   	IE.OVR= 177756   	IO.EXT= 011400
DFDENS= 001440   	FP.DEL= 000010   	IE.BBE= 177710   	IE.PRI= 177760   	IO.FDX= 003020
DFEXT = 000005   	FP.EXT= 000004   	IE.BDI= 177714   	IE.RAC= 177724   	IO.FNA= 004400
DFFPRO= 164000   	FP.RAT= 000001   	IE.BDR= 177716   	IE.RAT= 177723   	IO.HDX= 003010
DFINF = 000020   	FP.RDV= 000001   	IE.BDV= 177711   	IE.RBG= 177730   	IO.HIS= 015000
DFLRU = 000003   	FP.WRV= 000002   	IE.BHD= 177700   	IE.RCN= 177722   	IO.INL= 002400
DFPRO = 000000   	F$$LVL= 000001   	IE.BLK= 177754   	IE.RER= 177740   	IO.ITI= 017000
DFUIC = 000401   	F.DREF  000042   	IE.BNM= 177712   	IE.RNM= 177715   	IO.KIL= 000012
DFWIN = 000007   	F.DRNM  000044   	IE.BTF= 177675   	IE.RSU= 177757   	IO.LED= 012000
DMTPRO= 165000   	F.FEXT  000002   	IE.BTP= 177725   	IE.SDP= 177635   	IO.LOV= 001010
DTLUN2  000032R  	F.FNUM  000006   	IE.BVR= 177701   	IE.SNC= 177735   	IO.LTK= 000050
EFN1  = 000001   	F.FOWN  000014   	IE.BYT= 177755   	IE.SPC= 177772   	IO.MCS= 013400
ENDGRP  001070R     004	F.FPRO  000016   	IE.CKP= 177766   	IE.SQC= 177734   	IO.MDA= 016000
ERRCHK  000644R     004	F.FSEQ  000010   	IE.CKS= 177742   	IE.SRE= 177762   	IO.MDI= 014400
ERRMSG  000316R  	F.FSQN  000013   	IE.CLO= 177732   	IE.STK= 177706   	IO.MDO= 015400
ERRNUM  000062R  	F.FVBN  000046   	IE.CON= 177752   	IE.ULN= 177773   	IO.MLO= 006000
ERROR1  000070R  	F.HDLB  000022   	IE.DAA= 177770   	IE.UPN= 177777   	IO.MOD= 003000
ERROR2  000121R  	F.LBN   000026   	IE.DAO= 177763   	IE.VER= 177774   	IO.MSO= 005000
ERROR3  000145R  	F.LGTH  000052   	IE.DFU= 177750   	IE.WAC= 177743   	IO.RAL= 001010
ERROR4  000201R  	F.LINK  000000   	IE.DNA= 177771   	IE.WAT= 177741   	IO.RAT= 013000
ERROR5  000235R  	F.NACS  000036   	IE.DNR= 177775   	IE.WER= 177737   	IO.RBC= 003000
ERROR6  000260R  	F.NLCK  000037   	IE.DUN= 177767   	IE.WLK= 177764   	IO.RCI= 015000
EXT     000224R     002	F.NWAC  000040   	IE.DUP= 177707   	IE.2DV= 177720   	IO.RCV= 015000
E$$MSG= 000001   	F.RVN   000012   	IE.EBX= 177776   	IGROUP  000770R     004	IO.RDB= 001200
E$$TRP= 000001   	F.SCHA  000021   	IE.EOF= 177766   	ILLERR  000432R     004	IO.RDN= 000022
FA.APD= 000100   	F.SIZE  000032   	IE.EOT= 177702   	INDCOM  000542R     004	IO.REL= 013400
FA.CRE= 000010   	F.STAT  000040   	IE.EOV= 177765   	INDX    000242R     002	IO.RHD= 001010
FA.EXT= 000004   	F.STD   000004   	IE.EXP= 177676   	INF     000300R     002	IO.RLB= 001000
FA.NSP= 000100   	F.UCHA  000020   	IE.FEX= 177717   	INIKTB  000000RG    003	IO.RLV= 001100
FA.RD = 000001   	GETDEV  000030R     004	IE.FHE= 177705   	INISTB  000000RG    002	IO.RNA= 005400
FA.SHR= 000040   	GRCNT   000754R     004	IE.FOP= 177713   	IN.AUT= 000001 G 	IO.RNC= 001004
FA.TMP= 000020   	GTLUN2  000014R  	IE.HFU= 177744   	IN.MAN= 000002 G 	IO.RNE= 001020
FA.WRT= 000002   	G.LUBA= 000004   	IE.HWR= 177772   	IO.ACE= 007400   	IO.RTC= 003400
FC.CEF= 020000   	G.LUCW= 000004   	IE.IDU= 177644   	IO.ACR= 006400   	IO.RTI= 016400
FC.DIR= 040000   	G.LUFB= 000003   	IE.IEF= 177637   	IO.ACW= 007000   	IO.RTK= 000060
FC.FCO= 010000   	G.LULU= 000002   	IE.IFC= 177776   	IO.ADS= 014000   	IO.RVB= 010400
FC.WAC= 100000   	G.LUNA= 000000   	IE.IFU= 177747   	IO.APC= 014000   	IO.RWD= 002400
FD.BLK= 000010   	G.LUNU= 000002   	IE.ILL= 177726   	IO.APV= 014010   	IO.RWU= 002540
FD.CCL= 000002   	H.CKSM= 000776   	IE.ILU= 177640   	IO.ATT= 001400   	IO.R1C= 002400
FD.CR = 000002   	H.FCHA= 000014   	IE.INS= 177776   	IO.CCI= 014000   	IO.SAO= 004000
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 17-2
Symbol table

IO.SCS= 013000   	I.RVDT= 000014   	R$$11D= 000001   	U.C1  = ****** GX	$HMBLK= ****** GX
IO.SDI= 013000   	I.RVNO= 000012   	R$$20F= 000001   	U.DN  = ****** GX	$IBAD = ****** GX
IO.SDO= 012400   	I.RVTI= 000023   	R.FIX = 000001   	U.LBH = ****** GX	$ICHA = ****** GX
IO.SEC= 002520   	I.TISZ= 000006   	R.VAR = 000002   	U.LBN = ****** GX	$IDENS= ****** GX
IO.SEM= 002440   	KY.BAD= ****** GX	SC.BAD= 000100   	U.SZ  = ****** GX	$IDVTP= ****** GX
IO.SHT= 002410   	KY.DEN= ****** GX	SC.MDL= 000200   	U.UN  = ****** GX	$IEXT = ****** GX
IO.SLO= 005400   	KY.FUL= ****** GX	SETATC  000666R     004	VC.BMW= 000002   	$IFPRO= ****** GX
IO.SMO= 002560   	KY.IND= ****** GX	SETAUT  000344R     004	VC.IFW= 000001   	$IINF = ****** GX
IO.SNM= 002450   	LRU     000320R     002	SETBEG  000466R     004	V.FCB   000006   	$IKEY = ****** GX
IO.SPB= 002420   	LUNBUF  000046R  	SETBLK  000526R     004	V.FFNU  000055   	$ILRU = ****** GX
IO.SPF= 002440   	LUN2  = 000002   	SETDCF  000656R     004	V.FIEX  000025   	$IMXF = ****** GX
IO.SSO= 004400   	MAXCLF= 000020   	SETDP   001060R     004	V.FMAX  000016   	$INDXF= ****** GX
IO.SST= 002430   	MXF     000310R     002	SETDV1  000000R     004	V.FPRO  000030   	$INIER= ****** GX
IO.STC= 002500   	M$$HDR= 000001   	SETDV2  000010R     004	V.FRBK  000034   	$IPREP  000332RG
IO.STP= 016400   	M.CTSZ= 000006   	SETEND  000512R     004	V.IBLB  000012   	$IPRO = ****** GX
IO.SYN= 003040   	M.EFNU= 000002   	SETEP   001050R     004	V.IBSZ  000013   	$IUIC = ****** GX
IO.TRM= 002410   	M.EFSQ= 000004   	SETEXT  000422R     004	V.IFWI  000002   	$IVNAM= ****** GX
IO.UNL= 000042   	M.ERVN= 000001   	SETEX1  000436R     004	V.LABL  000040   	$IWIN = ****** GX
IO.WAT= 013400   	M.ESQN= 000000   	SETFDP  000446R     004	V.LGTH  000056   	$LAMDA= 000300
IO.WLB= 000400   	M.LBSZ= 000007   	SETFUL  000456R     004	V.LRUC  000035   	$MFD  = ****** GX
IO.WLS= 000410   	M.MAX = 000011   	SETGN   000722R     004	V.SBCL  000021   	$NUMBR= 000302
IO.WLV= 000500   	M.RTRV= 000012   	SETINF  000562R     004	V.SBLB  000024   	$PUD  = ****** GX
IO.WVB= 011000   	M.USE = 000010   	SETLAB  000260R     004	V.SBSZ  000022   	$RAD50= 000316
IO.XMT= 014400   	NB.DEV= 000200   	SETLRU  000626R     004	V.STAT  000054   	$SBMAP= ****** GX
IO.XNA= 014410   	NB.DIR= 000100   	SETMAN  000354R     004	V.STD   000004   	$STRNG= 000304
IPRER1  000620R  	NB.NAM= 000004   	SETMID  000500R     004	V.TRCT  000000   	$SUBXP= 000310
IPRER2  000614R  	NB.SD1= 000400   	SETMXF  000604R     004	V.WISZ  000020   	$UNT  = 000030RG
IPRER3  000610R  	NB.SD2= 001000   	SETPN   000732R     004	WIN     000430R     002	$$    = 000067
IPRER4  000604R  	NB.SNM= 000040   	SETPRO  000760R     004	WI.BPS= 100000   	$$MSG = 000000
IPRER5  000600R  	NB.STP= 000020   	SETRP   001030R     004	WI.DLK= 010000   	$$$ARG= 000006
IPRER6  000574R  	NB.SVR= 000010   	SETUNT  000020R     004	WI.EXT= 002000   	$$$FLG= 177777
IQ.Q  = 000002   	NB.TYP= 000002   	SETWIN  000676R     004	WI.LCK= 004000   	$$$KEY= 000026
IQ.X  = 000001   	NB.VER= 000001   	SETWP   001040R     004	WI.RDV= 000400   	$$$OST= 000014
IS.BV = 000005   	NXGRP   000776R     004	SET080  000402R     004	WI.WRV= 001000   	$$$STA= 000030R     002
IS.CLR= 000000   	OPTS    000030R     002	SET160  000372R     004	W.CTL   000000   	$$$TMP= 000260R     003
IS.CR = 006401   	PRO     000330R     002	SEXIT   000410R     004	W.FCB   000002   	$$$T1 = 000002
IS.ESC= 015401   	PROMPL= 000004   	SPRO    000342R     002	W.RTRV  000012   	.GTCML= ****** GX
IS.PND= 000000   	PROMPT  000064R  	START   000000RG    002	W.STD   000004   	.PCHAR= ****** GX
IS.RDD= 000002   	PROTEC  000756R     004	SYNTAX  000716R     004	W.VBN   000006   	.PNUMB= ****** GX
IS.SET= 000002   	Q.IOAE= 000012   	S.HDHD= 000056   	W.WISZ  000007   	.PNUMH= ****** GX
IS.SUC= 000001   	Q.IOEF= 000006   	S.IDHD= 000056   	$ANY  = 000320   	.PSTCN= ****** GX
I.CRDT= 000031   	Q.IOFN= 000002   	S.MPHD= 000012   	$BLANK= 000306   	.PSTPT= ****** GX
I.CRTI= 000040   	Q.IOLU= 000004   	S.STBK= 000012   	$BTBLK= ****** GX	.PUDBA= ****** GX
I.DASZ= 000007   	Q.IOPL= 000014   	TSTPPN  000740R     004	$DEV  = 000026RG 	.PUDEA= ****** GX
I.EXDT= 000046   	Q.IOPR= 000007   	UC.CON= 000200   	$DNUMB= 000314   	.TPARS= ****** GX
I.FNAM= 000000   	Q.IOSB= 000010   	UC.DLK= 000100   	$EOS  = 000312   	...GBL= 000000
I.FTYP= 000006   	R$$10F= 000001   	UIC     000406R     002	$EXIT = 000000   	...TPC= 000012
I.FVER= 000010

. ABS.	000056    000	(RW,I,GBL,ABS,OVR)
      	000636    001	(RW,I,LCL,REL,CON)
$STATE	000440    002	(RW,D,LCL,REL,CON)
$KTAB 	000270    003	(RW,D,LCL,REL,CON)
ACTION	001100    004	(RW,I,LCL,REL,CON)
Errors detected:  0

*** Assembler statistics
INIPAR - INITVOL COMMAND PARSER	MACRO V05.04  Tuesday 10-May-88 15:40  Page 17-3
Symbol table



Work  file  reads: 0
Work  file writes: 0
Size of work file: 11186 Words  ( 44 Pages)
Size of core pool: 12356 Words  ( 47 Pages)
Operating  system: RSX-11M/PLUS

Elapsed time: 00:01:41.22
[53,10]INIPAR,[53,20]INIPAR/-SP/CR=[53,30]RSXDC,INIPAR
INIPAR     CREATED BY  MACRO  ON 10-MAY-88 AT 15:41	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

ASLUN2	  000022 R	#5-75       5-76       5-77       14-456    
ATLUN2	  000000 R	#5-71       14-458    
A.LULU	= 000002	#5-75      
A.LUNA	= 000004	#5-75       5-76      
A.LUNU	= 000006	#5-75       5-77      
BAD   	  000124 R	 10-255    #11-279    
BADCOM	  000362 R	 14-529    #14-531    
BAD1  	  000130 R	#11-285     11-290    
BAD2  	  000144 R	 11-286     11-287    #11-289    
CHA   	  000154 R	 10-256    #11-295    
CHA1  	  000160 R	#11-301     11-307    
CHA2  	  000176 R	 11-302     11-303    #11-306    
CH.NAT	= ******  GX	 7-161      16-632    
CH.NDC	= ******  GX	 7-161      16-629    
CPRO  	  000336 R	 12-344     13-391    #13-393    
DENS  	  000206 R	 10-260    #11-313    
DEV1  	  000020 R	 10-237    #10-240    
DFCLF 	= 000001	#4-51       7-167     
DFDENS	= 001440	#4-52       7-164     
DFEXT 	= 000005	#4-53       7-165     
DFFPRO	= 164000	#4-54       7-163     
DFINF 	= 000020	#4-56       7-168     
DFLRU 	= 000003	#4-50       7-169     
DFPRO 	= 000000	#4-57       7-162     
DFUIC 	= 000401	#4-58       7-160     
DFWIN 	= 000007	#4-59       7-166     
DMTPRO	= 165000	#4-55       14-488    
DTLUN2	  000032 R	#5-79      
EFN1  	= 000001	#4-40       5-71       5-79      
ENDGRP	  001070 R	 13-398    #17-703    
ERRCHK	  000644 R	 14-532     15-562     15-567     15-573     15-595     15-603     15-611     15-618    #16-623    
                         16-630     16-633     16-640    
ERRMSG	  000316 R	#6-116      9-214     
ERRNUM	  000062 R	#5-85      *7-171     *9-207     *9-208     *9-209     *9-210     *9-211      9-212     
ERROR1	  000070 R	#6-99       6-116     
ERROR2	  000121 R	#6-101      6-117     
ERROR3	  000145 R	#6-103      6-118     
ERROR4	  000201 R	#6-105      6-119     
ERROR5	  000235 R	#6-107      6-120     
ERROR6	  000260 R	#6-109      6-121     
EXT   	  000224 R	 10-261    #12-335    
E$$MSG	= 000001	#1-33      
E$$TRP	= 000001	#1-32      
FD.SQD	= 000040	 14-485    
FPRO  	  000234 R	 10-262    #12-343    
FP.DEL	= 000010	 17-698    
FP.EXT	= 000004	 17-693    
FP.RDV	= 000001	 17-683    
FP.WRV	= 000002	 17-688    
F$$LVL	= 000001	#1-28       10-257     12-321     14-534    
GETDEV	  000030 R	 10-245    #14-456    
GRCNT 	  000754 R	#17-662    *17-668    *17-677     17-703    
INIPAR     CREATED BY  MACRO  ON 10-MAY-88 AT 15:41	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

GTLUN2	  000014 R	#5-73       14-461    
G.LUBA	= 000004	#5-73      
G.LULU	= 000002	#5-73      
G.LUNA	= 000000	 5-73      
IGROUP	  000770 R	 13-396    #17-668    
ILLERR	  000432 R	#15-560     15-600     15-602     15-608     15-610     15-616     16-638    
INDCOM	  000542 R	 15-580     15-584     15-588    #15-592    
INDX  	  000242 R	 10-266    #12-348    
INF   	  000300 R	 10-267    #12-365    
INIKTB	  000000 RG	 8-181     #10-224    
INISTB	  000000 RG	#10-224    
IN.AUT	= 000001  G	#4-45       14-528    
IN.MAN	= 000002  G	#4-46       14-530    
IO.ATT	= 001400	 5-71      
IO.DET	= 002000	 5-79      
IPRER1	  000620 R	#9-212     
IPRER2	  000614 R	 8-184     #9-211      14-518     16-644    
IPRER3	  000610 R	#9-210      14-478    
IPRER4	  000604 R	#9-209      14-460    
IPRER5	  000600 R	#9-208      16-656    
IPRER6	  000574 R	#9-207      15-560    
KY.BAD	= ******  GX	 14-531    
KY.DEN	= ******  GX	 8-188      14-487     14-512     14-551     16-623    
KY.FUL	= ******  GX	 15-572    
KY.IND	= ******  GX	 8-188      15-592     15-594    
LRU   	  000320 R	 10-272    #13-382    
LUNBUF	  000046 R	 5-73      #5-83       8-190      14-467     14-469     14-484     14-485     14-489    
LUN2  	= 000002	#4-41       5-71       5-73       5-75       5-79      
MAXCLF	= 000020	#4-60      
MXF   	  000310 R	 10-268    #13-374    
M$$HDR	= 000001	#1-34      
NXGRP 	  000776 R	 13-399    #17-672    
OPTS  	  000030 R	#10-250     10-264     11-291     11-308     11-317     11-318     12-339     12-352     12-353    
                         12-354     12-361     12-369     13-378     13-385     13-397     13-423     13-431    
PRO   	  000330 R	 10-269    #13-390    
PROMPL	= 000004	#5-90       7-174     
PROMPT	  000064 R	#5-89       5-90       7-173     
PROTEC	  000756 R	*15-566    #17-663    *17-665     17-673     17-674     17-675     17-676     17-683     17-688    
                         17-693     17-698    
Q.IOAE	= 000012	#5-71      #5-79      
Q.IOEF	= 000006	#5-71      #5-79      
Q.IOFN	= 000002	#5-71      #5-79      
Q.IOLU	= 000004	#5-71      #5-79      
Q.IOPL	= 000014	#5-71      #5-79      
Q.IOPR	= 000007	#5-71      #5-79      
Q.IOSB	= 000010	#5-71      #5-79      
R$$10F	= 000001	#1-30      
R$$11D	= 000001	#1-29      
R$$20F	= 000001	#1-31       10-263     14-462     14-472     15-568    
SETATC	  000666 R	 11-303    #16-632    
SETAUT	  000344 R	 11-287    #14-528    
SETBEG	  000466 R	 8-194      8-194      12-353    #15-578    
INIPAR     CREATED BY  MACRO  ON 10-MAY-88 AT 15:41	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

SETBLK	  000526 R	 12-365    #15-590    
SETDCF	  000656 R	 11-304    #16-629    
SETDP 	  001060 R	 13-407    #17-698    
SETDV1	  000000 R	 10-233    #14-441    
SETDV2	  000010 R	 10-236    #14-446    
SETEND	  000512 R	 12-355    #15-586    
SETEP 	  001050 R	 13-402    #17-693    
SETEXT	  000422 R	 12-343    #15-558    
SETEX1	  000436 R	 15-559    #15-561    
SETFDP	  000446 R	 12-348    #15-566    
SETFUL	  000456 R	 10-266    #15-572    
SETGN 	  000722 R	 13-416    #16-648    
SETINF	  000562 R	 13-374    #15-599    
SETLAB	  000260 R	 10-250    #14-510    
SETLRU	  000626 R	 13-390    #15-615    
SETMAN	  000354 R	 11-289    #14-530    
SETMID	  000500 R	 8-192      8-192      12-354    #15-582    
SETMXF	  000604 R	 13-382    #15-607    
SETPN 	  000732 R	 13-422    #16-653    
SETPRO	  000760 R	 13-393    #17-665    
SETRP 	  001030 R	 13-400    #17-683    
SETUNT	  000020 R	 10-238    #14-451    
SETWIN	  000676 R	 13-433    #16-637    
SETWP 	  001040 R	 13-401    #17-688    
SET080	  000402 R	 12-335    #14-550    
SET160	  000372 R	 11-318    #14-548    
SEXIT 	  000410 R	 14-549    #14-551    
SPRO  	  000342 R	#13-396     13-398     13-399     13-400     13-401     13-402    
START 	  000000 RG	 8-182      10-226    #10-230    
SYNTAX	  000716 R	 14-552     15-593     16-624    #16-644     17-678     17-704    
S$$YDF	= ******	 1-1        1-37      
TSTPPN	  000740 R	 16-649    #16-654    
UIC   	  000406 R	 10-270    #13-407    
U.C1  	= ******  GX	 14-485    
U.DN  	= ******  GX	 14-467    
U.LBH 	= ******  GX	 14-491     14-500    
U.LBN 	= ******  GX	 14-490     14-501    
U.SZ  	= ******  GX	 14-471    
U.UN  	= ******  GX	 14-469    
WIN   	  000430 R	 10-271    #13-427    
$ANY  	= 000320	#10-224     10-233     10-236    
$BLANK	= 000306	#10-224    
$BTBLK	= ******  GX	*8-199     
$DEV  	= 000026 RG	#5-76      *14-441    *14-446    
$DNUMB	= 000314	#10-224    
$EOS  	= 000312	#10-224     10-252    
$EXIT 	= 000000	#10-224     10-251    
$HMBLK	= ******  GX	*8-200     
$IBAD 	= ******  GX	*14-528    *14-530    
$ICHA 	= ******  GX	*16-629    *16-632    
$IDENS	= ******  GX	*14-548    *14-550    
$IDVTP	= ******  GX	 14-483     15-599     15-607    
INIPAR     CREATED BY  MACRO  ON 10-MAY-88 AT 15:41	PAGE 4

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

$IEXT 	= ******  GX	*15-561    
$IFPRO	= ******  GX	 15-566    
$IINF 	= ******  GX	*15-601    
$IKEY 	= ******  GX	*7-170      8-188     *14-487     14-512    *14-531     14-551    *15-572     15-592    *15-594    
                         16-623    
$ILRU 	= ******  GX	*7-169     *15-617    
$IMXF 	= ******  GX	*14-497    *14-499    *15-609    
$INDXF	= ******  GX	 8-195      8-196      8-197      8-198     *14-503    *14-505    *15-578    *15-579    *15-582    
                        *15-583    *15-586    *15-587    *15-590    *15-591    
$INIER	= ******  GX	 9-215     
$IPREP	  000332 RG	#7-155     
$IPRO 	= ******  GX	*14-488     17-665    
$IUIC 	= ******  GX	 7-159     *16-648    *16-653    
$IVNAM	= ******  GX	 7-155      14-520    
$IWIN 	= ******  GX	*16-639    
$LAMDA	= 000300	#10-224     10-240     11-306    
$MFD  	= ******  GX	*8-195     *8-196     
$NUMBR	= 000302	#10-224     10-238     12-343     12-365     13-374     13-382     13-390     13-416     13-422    
                         13-433    
$PUD  	= ******  GX	*14-479    
$RAD50	= 000316	#10-224    
$RONLY	= ******	 10-224     10-224    
$SBMAP	= ******  GX	*8-197     *8-198     
$STRNG	= 000304	#10-224     10-250    
$SUBXP	= 000310	#10-224    
$UNT  	= 000030 RG	#5-77      *7-172     *14-451    
$$    	= 000067	#7-175      7-175     #8-183      8-183     #8-192      8-192     #8-194      8-194     
$$$ARG	= 000006	#5-71       5-71      #5-75       5-75      #5-75       5-75      #5-75       5-75      #5-79      
                         5-79      
$$$FLG	= 177777	#10-224     10-230    #10-230     10-230    #10-230    #10-230     10-231    #10-231     10-231    
                        #10-231     10-233    #10-233     10-233     10-233     10-233     10-233     10-233     10-233    
                        #10-233    #10-233     10-234    #10-234     10-234    #10-234     10-236    #10-236     10-236    
                         10-236     10-236     10-236     10-236     10-236    #10-236    #10-236     10-237    #10-237    
                         10-237    #10-237     10-237    #10-237     10-238     10-238     10-238     10-238     10-238    
                        #10-238     10-240    #10-240     10-240     10-240     10-240     10-240     10-240     10-240    
                        #10-240    #10-240     10-241    #10-241     10-241    #10-241     10-245    #10-245     10-245    
                         10-245     10-245     10-245     10-245     10-245    #10-245    #10-245     10-246    #10-246    
                         10-246    #10-246     10-250    #10-250     10-250     10-250     10-250     10-250     10-250    
                         10-250    #10-250    #10-250     10-251    #10-251     10-251    #10-251     10-252     10-252    
                         10-252     10-252     10-252    #10-252     10-254    #10-254     10-254     10-254     10-254    
                         10-254     10-254     10-254    #10-254    #10-254     10-255    #10-255     10-255    #10-255    
                         10-256     10-256     10-256     10-256     10-256    #10-256     10-256    #10-256     10-260    
                         10-260     10-260     10-260     10-260    #10-260     10-260    #10-260     10-261     10-261    
                         10-261     10-261     10-261    #10-261     10-261    #10-261     10-262     10-262     10-262    
                         10-262     10-262    #10-262     10-262    #10-262     10-264     10-264     10-264     10-264    
                         10-264    #10-264     10-264    #10-264     10-264    #10-264     10-266     10-266     10-266    
                         10-266     10-266    #10-266     10-266    #10-266     10-267     10-267     10-267     10-267    
                         10-267    #10-267     10-267    #10-267     10-268     10-268     10-268     10-268     10-268    
                        #10-268     10-268    #10-268     10-269     10-269     10-269     10-269     10-269    #10-269    
                         10-269    #10-269     10-270     10-270     10-270     10-270     10-270    #10-270     10-270    
                        #10-270     10-271     10-271     10-271     10-271     10-271    #10-271     10-271    #10-271    
                         10-272     10-272     10-272     10-272     10-272    #10-272     10-272    #10-272     11-279    
INIPAR     CREATED BY  MACRO  ON 10-MAY-88 AT 15:41	PAGE 5

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

                        #11-279     11-279     11-279     11-279     11-279     11-279    #11-279    #11-279     11-280    
                        #11-280     11-282    #11-282     11-282     11-282     11-282     11-282     11-282     11-282    
                        #11-282    #11-282     11-283    #11-283     11-285    #11-285     11-285     11-285     11-285    
                         11-285     11-285     11-285    #11-285    #11-285     11-286    #11-286     11-286    #11-286    
                         11-286    #11-286     11-287     11-287     11-287     11-287     11-287    #11-287     11-287    
                        #11-287     11-287    #11-287     11-289    #11-289     11-289     11-289     11-289     11-289    
                         11-289    #11-289    #11-289     11-290    #11-290     11-290    #11-290     11-291     11-291    
                         11-291     11-291     11-291    #11-291     11-291    #11-291     11-295    #11-295     11-295    
                         11-295     11-295     11-295     11-295    #11-295    #11-295     11-296    #11-296     11-298    
                        #11-298     11-298     11-298     11-298     11-298     11-298     11-298    #11-298    #11-298    
                         11-299    #11-299     11-301    #11-301     11-301     11-301     11-301     11-301     11-301    
                         11-301    #11-301    #11-301     11-302    #11-302     11-302    #11-302     11-302    #11-302    
                         11-303     11-303     11-303     11-303     11-303    #11-303     11-303    #11-303     11-303    
                        #11-303     11-304     11-304     11-304     11-304     11-304    #11-304     11-306    #11-306    
                         11-306     11-306     11-306     11-306     11-306     11-306    #11-306    #11-306     11-307    
                        #11-307     11-307    #11-307     11-308     11-308     11-308     11-308     11-308    #11-308    
                         11-308    #11-308     11-313    #11-313     11-313     11-313     11-313     11-313     11-313    
                        #11-313    #11-313     11-314    #11-314     11-316    #11-316     11-316     11-316     11-316    
                         11-316     11-316     11-316    #11-316    #11-316     11-317    #11-317     11-317    #11-317    
                         11-317    #11-317     11-318     11-318     11-318     11-318     11-318    #11-318     11-318    
                        #11-318     11-318    #11-318     12-335    #12-335     12-335     12-335     12-335     12-335    
                         12-335    #12-335    #12-335     12-336    #12-336     12-338    #12-338     12-338     12-338    
                         12-338     12-338     12-338     12-338    #12-338    #12-338     12-339    #12-339     12-339    
                        #12-339     12-339    #12-339     12-343    #12-343     12-343     12-343     12-343     12-343    
                         12-343    #12-343    #12-343     12-344    #12-344     12-344    #12-344     12-344    #12-344    
                         12-348    #12-348     12-348     12-348     12-348     12-348     12-348    #12-348    #12-348    
                         12-349    #12-349     12-351    #12-351     12-351     12-351     12-351     12-351     12-351    
                         12-351    #12-351    #12-351     12-352    #12-352     12-352    #12-352     12-352    #12-352    
                         12-353     12-353     12-353     12-353     12-353    #12-353     12-353    #12-353     12-353    
                        #12-353     12-354     12-354     12-354     12-354     12-354    #12-354     12-354    #12-354    
                         12-354    #12-354     12-355     12-355     12-355     12-355     12-355    #12-355     12-357    
                        #12-357     12-357     12-357     12-357     12-357     12-357     12-357    #12-357    #12-357    
                         12-358    #12-358     12-360    #12-360     12-360     12-360     12-360     12-360     12-360    
                         12-360    #12-360    #12-360     12-361    #12-361     12-361    #12-361     12-361    #12-361    
                         12-365    #12-365     12-365     12-365     12-365     12-365     12-365    #12-365    #12-365    
                         12-366    #12-366     12-368    #12-368     12-368     12-368     12-368     12-368     12-368    
                         12-368    #12-368    #12-368     12-369    #12-369     12-369    #12-369     12-369    #12-369    
                         13-374    #13-374     13-374     13-374     13-374     13-374     13-374    #13-374    #13-374    
                         13-375    #13-375     13-377    #13-377     13-377     13-377     13-377     13-377     13-377    
                         13-377    #13-377    #13-377     13-378    #13-378     13-378    #13-378     13-378    #13-378    
                         13-382    #13-382     13-382     13-382     13-382     13-382     13-382    #13-382    #13-382    
                         13-383    #13-383     13-384    #13-384     13-384     13-384     13-384     13-384     13-384    
                         13-384    #13-384    #13-384     13-385    #13-385     13-385    #13-385     13-385    #13-385    
                         13-390    #13-390     13-390     13-390     13-390     13-390     13-390    #13-390    #13-390    
                         13-391    #13-391     13-391    #13-391     13-391    #13-391     13-393    #13-393     13-393    
                         13-393     13-393     13-393     13-393    #13-393    #13-393     13-394    #13-394     13-394    
                        #13-394     13-396    #13-396     13-396     13-396     13-396     13-396     13-396     13-396    
                        #13-396    #13-396     13-397    #13-397     13-397    #13-397     13-397    #13-397     13-398    
                         13-398     13-398     13-398     13-398    #13-398     13-398    #13-398     13-398    #13-398    
                         13-399     13-399     13-399     13-399     13-399    #13-399     13-399    #13-399     13-399    
                        #13-399     13-400     13-400     13-400     13-400     13-400    #13-400     13-400    #13-400    
                         13-400    #13-400     13-401     13-401     13-401     13-401     13-401    #13-401     13-401    
INIPAR     CREATED BY  MACRO  ON 10-MAY-88 AT 15:41	PAGE 6

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

                        #13-401     13-401    #13-401     13-402     13-402     13-402     13-402     13-402    #13-402    
                         13-402    #13-402     13-402    #13-402     13-407    #13-407     13-407     13-407     13-407    
                         13-407     13-407    #13-407    #13-407     13-408    #13-408     13-410    #13-410     13-410    
                         13-410     13-410     13-410     13-410     13-410    #13-410    #13-410     13-411    #13-411    
                         13-413    #13-413     13-413     13-413     13-413     13-413     13-413     13-413    #13-413    
                        #13-413     13-414    #13-414     13-414    #13-414     13-416    #13-416     13-416     13-416    
                         13-416     13-416     13-416     13-416    #13-416    #13-416     13-417    #13-417     13-419    
                        #13-419     13-419     13-419     13-419     13-419     13-419     13-419    #13-419    #13-419    
                         13-420    #13-420     13-420    #13-420     13-422    #13-422     13-422     13-422     13-422    
                         13-422     13-422     13-422    #13-422    #13-422     13-423    #13-423     13-423    #13-423    
                         13-427    #13-427     13-427     13-427     13-427     13-427     13-427    #13-427    #13-427    
                         13-428    #13-428     13-430    #13-430     13-430     13-430     13-430     13-430     13-430    
                         13-430    #13-430    #13-430     13-431    #13-431     13-431    #13-431     13-431    #13-431    
                         13-433    #13-433     13-433     13-433     13-433     13-433     13-433    #13-433    #13-433    
$$$GLB	= ******	 5-71       5-71       5-71       5-71       5-71       5-71       5-71       5-71       5-73      
                         5-73       5-73       5-75       5-75       5-75       5-75       5-79       5-79       5-79      
                         5-79       5-79       5-79       5-79       5-79      
$$$KEY	= 000026	#10-224     10-255    #10-255     10-255     10-256     10-256    #10-256     10-256     10-260    
                         10-260    #10-260     10-260     10-261     10-261    #10-261     10-261     10-262     10-262    
                        #10-262     10-262     10-264     10-264    #10-264     10-264     10-266     10-266    #10-266    
                         10-266     10-267     10-267    #10-267     10-267     10-268     10-268    #10-268     10-268    
                         10-269     10-269    #10-269     10-269     10-270     10-270    #10-270     10-270     10-271    
                         10-271    #10-271     10-271     10-272     10-272    #10-272     10-272     11-279     11-286    
                        #11-286     11-286     11-287     11-287    #11-287     11-287     11-289     11-302    #11-302    
                         11-302     11-303     11-303    #11-303     11-303     11-304     11-317    #11-317     11-317    
                         11-318     11-318    #11-318     11-318     12-335     12-352    #12-352     12-352     12-353    
                         12-353    #12-353     12-353     12-354     12-354    #12-354     12-354     12-355     12-355    
                        #12-355     12-355     12-357    
$$$OST	= 000014	#5-71       5-71       5-71      #5-71       5-71       5-71      #5-71       5-71       5-71      
                        #5-71       5-71       5-71      #5-71       5-71       5-71      #5-71       5-71       5-71      
                        #5-71       5-71      #5-73       5-73       5-73      #5-73       5-73       5-73      #5-73      
                        #5-75       5-75       5-75      #5-75       5-75       5-75      #5-75       5-75       5-75      
                        #5-75      #5-79       5-79       5-79      #5-79       5-79       5-79      #5-79       5-79      
                         5-79      #5-79       5-79       5-79      #5-79       5-79       5-79      #5-79       5-79      
                         5-79      #5-79       5-79      
$$$STA	= 000030 R	#10-237     10-238    #10-251     10-252    #10-255     10-256    #10-256     10-260    #10-260    
                         10-261    #10-261     10-262    #10-262     10-264    #10-264     10-266    #10-266     10-267    
                        #10-267     10-268    #10-268     10-269    #10-269     10-270    #10-270     10-271    #10-271    
                         10-272    #10-272     11-279    #11-286     11-287    #11-287     11-289    #11-290     11-291    
                        #11-291     11-295    #11-302     11-303    #11-303     11-304    #11-307     11-308    #11-308    
                         11-313    #11-317     11-318    #11-318     12-335    #12-339     12-343    #12-344     12-348    
                        #12-352     12-353    #12-353     12-354    #12-354     12-355    #12-361     12-365    #12-369    
                         13-374    #13-378     13-382    #13-385     13-390    #13-391     13-393    #13-397     13-398    
                        #13-398     13-399    #13-399     13-400    #13-400     13-401    #13-401     13-402    #13-402    
                         13-407    #13-423     13-427    #13-431     13-433    
$$$TMP	= 000260 R	#10-255     10-255     10-255    #10-256     10-256     10-256    #10-260     10-260     10-260    
                        #10-261     10-261     10-261    #10-262     10-262     10-262    #10-264     10-264     10-264    
                        #10-266     10-266     10-266    #10-267     10-267     10-267    #10-268     10-268     10-268    
                        #10-269     10-269     10-269    #10-270     10-270     10-270    #10-271     10-271     10-271    
                        #10-272     10-272     10-272    #11-286     11-286     11-286    #11-287     11-287     11-287    
                        #11-302     11-302     11-302    #11-303     11-303     11-303    #11-317     11-317     11-317    
                        #11-318     11-318     11-318    #12-352     12-352     12-352    #12-353     12-353     12-353    
INIPAR     CREATED BY  MACRO  ON 10-MAY-88 AT 15:41	PAGE 7

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

                        #12-354     12-354     12-354    #12-355     12-355     12-355    
$$$T1 	= 000002	#5-75       5-75       5-75      #5-75       5-75       5-75      #5-75       5-75       5-75      
.GTCML	= ******  GX	 7-175      7-175     
.PCHAR	= ******  GX	 14-441     14-446    
.PNUMB	= ******  GX	 14-451     15-558     15-561     15-591     15-599     15-601     15-607     15-609     15-615    
                         15-617     16-637     16-639     16-648     16-653     16-654    
.PNUMH	= ******  GX	 15-590    
.PSTCN	= ******  GX	 14-510     14-514     14-516    *14-522    
.PSTPT	= ******  GX	 14-519    
.PUDBA	= ******  GX	 14-463    
.PUDEA	= ******  GX	 14-473    
.TPARS	= ******  GX	 8-183      8-183     
INIPAR     CREATED BY  MACRO  ON 10-MAY-88 AT 15:41	PAGE 8

MACRO CROSS REFERENCE                                   CREF   04.00 

MACRO NAME	REFERENCES

ALUN$ 		#3-30       5-75      
CALL  		#3-30       7-175      8-183      8-192      8-194     
DIR$  		#3-30       14-456     14-458     14-461    
ERR$  		#14-456    #14-458    #14-461    
FCSBT$		#3-32       3-34      
FHDOF$		#3-32       3-33      
F11DF$		#3-30       4-64      
GLUN$ 		#3-30       5-73      
ISTAT$		#10-222     10-224    
MTRAN$		#10-224     10-230     10-231     10-233     10-234     10-236     10-237     10-238     10-240     10-241    
                 10-245     10-246     10-250     10-251     10-252     10-254     10-255     10-256     10-260     10-261    
                 10-262     10-264     10-266     10-267     10-268     10-269     10-270     10-271     10-272     11-279    
                 11-280     11-282     11-283     11-285     11-286     11-287     11-289     11-290     11-291     11-295    
                 11-296     11-298     11-299     11-301     11-302     11-303     11-304     11-306     11-307     11-308    
                 11-313     11-314     11-316     11-317     11-318     12-335     12-336     12-338     12-339     12-343    
                 12-344     12-348     12-349     12-351     12-352     12-353     12-354     12-355     12-357     12-358    
                 12-360     12-361     12-365     12-366     12-368     12-369     13-374     13-375     13-377     13-378    
                 13-382     13-383     13-384     13-385     13-390     13-391     13-393     13-394     13-396     13-397    
                 13-398     13-399     13-400     13-401     13-402     13-407     13-408     13-410     13-411     13-413    
                 13-414     13-416     13-417     13-419     13-420     13-422     13-423     13-427     13-428     13-430    
                 13-431     13-433    
NBL$  		#5-75       5-75      
OFF$  		#5-71       5-71       5-71       5-71       5-71       5-71       5-71       5-71       5-71      #5-73      
                 5-73       5-73       5-73      #5-75       5-75       5-75       5-75       5-75      #5-79       5-79      
                 5-79       5-79       5-79       5-79       5-79       5-79       5-79      
QDPB$ 		#5-71       5-71      #5-79       5-79      
QIOSY$		#3-30       4-65      
QIOW$ 		#3-30       5-71       5-79      
RETURN		#3-30       8-201      14-442     14-447     14-452     14-506     14-524     14-553     16-625     16-657    
                 17-666     17-679     17-684     17-689     17-694     17-699     17-705    
STATE$		#10-222     10-230     10-233     10-236     10-240     10-245     10-250     10-254     11-279     11-282    
                 11-285     11-289     11-295     11-298     11-301     11-306     11-313     11-316     12-335     12-338    
                 12-343     12-348     12-351     12-357     12-360     12-365     12-368     13-374     13-377     13-382    
                 13-384     13-390     13-393     13-396     13-407     13-410     13-413     13-416     13-419     13-422    
                 13-427     13-430     13-433    
TRAN$ 		#10-222     10-231     10-234     10-237     10-238     10-241     10-246     10-251     10-252     10-255    
                 10-256     10-260     10-261     10-262     10-264     10-266     10-267     10-268     10-269     10-270    
                 10-271     10-272     11-280     11-283     11-286     11-287     11-290     11-291     11-296     11-299    
                 11-302     11-303     11-304     11-307     11-308     11-314     11-317     11-318     12-336     12-339    
                 12-344     12-349     12-352     12-353     12-354     12-355     12-358     12-361     12-366     12-369    
                 13-375     13-378     13-383     13-385     13-391     13-394     13-397     13-398     13-399     13-400    
                 13-401     13-402     13-408     13-411     13-414     13-417     13-420     13-423     13-428     13-431    
$$$ACT		#10-231     10-233    #10-234     10-236    #10-237     10-238    #10-241     10-245    #10-246     10-250    
                #10-264     10-266    #11-286     11-287    #11-287     11-289    #11-302     11-303    #11-303     11-304    
                #11-317     11-318    #11-318     12-335    #12-339     12-343    #12-344     12-348    #12-352     12-353    
                #12-353     12-354    #12-354     12-355    #12-361     12-365    #12-369     13-374    #13-378     13-382    
                #13-385     13-390    #13-391     13-393    #13-394     13-396    #13-397     13-398    #13-398     13-399    
                #13-399     13-400    #13-400     13-401    #13-401     13-402    #13-402     13-407    #13-414     13-416    
                #13-420     13-422    #13-431     13-433    
$$$TYP		#10-231     10-233    #10-234     10-236    #10-237     10-238    #10-238     10-240    #10-241     10-245    
                #10-246     10-250    #10-251     10-252    #10-252     10-254    #10-255     10-256    #10-256     10-260    
                #10-260     10-261    #10-261     10-262    #10-262     10-264    #10-264     10-266    #10-266     10-267    
INIPAR     CREATED BY  MACRO  ON 10-MAY-88 AT 15:41	PAGE 9

MACRO CROSS REFERENCE                                   CREF   04.00 

MACRO NAME	REFERENCES

                #10-267     10-268    #10-268     10-269    #10-269     10-270    #10-270     10-271    #10-271     10-272    
                #10-272     11-279    #11-280     11-282    #11-283     11-285    #11-286     11-287    #11-287     11-289    
                #11-290     11-291    #11-291     11-295    #11-296     11-298    #11-299     11-301    #11-302     11-303    
                #11-303     11-304    #11-304     11-306    #11-307     11-308    #11-308     11-313    #11-314     11-316    
                #11-317     11-318    #11-318     12-335    #12-336     12-338    #12-339     12-343    #12-344     12-348    
                #12-349     12-351    #12-352     12-353    #12-353     12-354    #12-354     12-355    #12-355     12-357    
                #12-358     12-360    #12-361     12-365    #12-366     12-368    #12-369     13-374    #13-375     13-377    
                #13-378     13-382    #13-383     13-384    #13-385     13-390    #13-391     13-393    #13-394     13-396    
                #13-397     13-398    #13-398     13-399    #13-399     13-400    #13-400     13-401    #13-401     13-402    
                #13-402     13-407    #13-408     13-410    #13-411     13-413    #13-414     13-416    #13-417     13-419    
                #13-420     13-422    #13-423     13-427    #13-428     13-430    #13-431     13-433    
INIROT - INITVOL MCR COMMAND RO	MACRO V05.04  Tuesday 10-May-88 15:40
Table of contents

     4-   39	CONSTANTS AND LOCAL DATA
     6-  120	GLOBAL DATA
     8-  196	INITVOL - DISPATCHER
     9-  251	ERROR PROCESSING
    10-  279	VERIFY BLOCK WITHIN DISK BOUNDARY
    11-  322	LOOK FOR A BLOCK MATCH
    12-  384	DISK READ/WRITE ROUTINE
    13-  422	DOUBLE PRECISION INTEGER DIVIDE
RSXDC	MACRO V05.04  Tuesday 10-May-88 15:40  Page 2


     39
INIROT - INITVOL MCR COMMAND RO	MACRO V05.04  Tuesday 10-May-88 15:40  Page 3


      1						.TITLE	INIROT - INITVOL MCR COMMAND ROOT SEGMENT
      2						.IDENT	"V0006"
      3
      4					; ALTERED:
      5					; ANDREW C. GOLDSTEIN  11 MAR 75  15:55
      6					;
      7					;                             COPYRIGHT (C) 1974, 1978, 1985 BY
      8					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      9					;			ALL RIGHTS RESERVED.
     10					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
     11					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     12					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     13					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     14					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     15					;
     16					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     17					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     18					;       CORPORATION.
     19					;
     20					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     21					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     22					;
     23					;
     24
     25					; VERSION:	01
     26					; BY:		H. LEV
     27					; DATE:		5/1/74
     28					; UPDATED BY:	STEVE HORT	16-AUG-74	16:00:00
     29					; EDIT:		E. H. MARISON	24-DEC-74	08:45:00
     30
     31
     32					;
     33					; THIS IS THE ROOT SEGMENT FOR THE INITVOL COMMAND
     34					;
     35
     36						.MCALL	ALUN$,CALL,DIR$,GMCR$,F11DF$,QIOSY$,WTSE$S,RETURN,EXIT$S
     37						.MCALL	QIOW$
INIROT - INITVOL MCR COMMAND RO	MACRO V05.04  Tuesday 10-May-88 15:40  Page 4
CONSTANTS AND LOCAL DATA

     39						.SBTTL	CONSTANTS AND LOCAL DATA
     40					;
     41					; EQUATED SYMBOLS
     42					;
     43		000040 			SPA	=	40		; SPACE
     44		000001 			EFN1	=	1		; EVENT FLAG #1
     45		000002 			EFN2	=	2		; EVENT FLAG #2
     46		000001 			LUN1	=	1		; "TI" LOGICAL UNIT
     47		000002 			LUN2	=	2		; INIT DEVICE LUN
     48
     49
     50					;
     51					; LOCAL MACRO TO DEFINE KEYWORD PRESENT FLAGS
     52					;
     53						.MACRO	KYFLG,NAME
     54					KY.'NAME	==	KY$BIT
     55					KY$BIT	=	KY$BIT*2
     56						.ENDM
     57
     58					;
     59					; DEFINE KEY WORD FLAGS
     60					;
     61		000001 			KY$BIT	=	1		; INITIALIZE BIT FLAG
     62	000000					KYFLG	BAD		; /BAD
     63	000000					KYFLG	CHA		; /CHA
     64						.IF	GT F$$LVL-1
     65						KYFLG	CLF		; /CLF
     66						.ENDC
     67	000000					KYFLG	DENS		; /DENS
     68	000000					KYFLG	EXT		; /EXT
     69	000000					KYFLG	FPR		; /FPRO
     70					.IF DF R$$20F
     71	000000					KYFLG	FULL		; /FULL
     72					.ENDC
     73	000000					KYFLG	IND		; /INDX
     74	000000					KYFLG	INF		; /INF
     75	000000					KYFLG	MXF		; /MXF
     76	000000					KYFLG	PRO		; /PRO
     77	000000					KYFLG	UIC		; /UIC
     78	000000					KYFLG	WIN		; /WIN
     79
     80	000000					F11DF$			;
     81	000000					QIOSY$			; DEFINE I/O CODES
     82
     83
     84					;
     85					; LOCAL DATA
     86					;
     87
     88
INIROT - INITVOL MCR COMMAND RO	MACRO V05.04  Tuesday 10-May-88 15:40  Page 5
CONSTANTS AND LOCAL DATA

     90					;
     91					; ERROR MESSAGE DPB
     92					;
     93	000000	   001 	   014 		$ERDPB::.BYTE	1.,12.		; DIC AND LENGTH
     94	000002	011000 				.WORD	IO.WVB		; WRITE FUNCTION
     95	000004	000001 				.WORD	LUN1		; LUN
     96	000006	000001 				.WORD	EFN1		; EVENT FLAG
     97	000010	000000 	000000 			.WORD	0,0		; I/O STATUS AND AST
     98	000014	000000 	000000 		ERRBUF:	.WORD	0,0		; BUFFER ADDRESS AND LENGTH
     99	000020	000040 				.WORD	40		; CARRIAGE CONTROL (LF, CR)
    100
    101					;
    102					; DETACH LUN-2 AFTER USE
    103					;
    104	000022				DETLN2:	QIOW$	IO.DET,LUN2,EFN1
    105					;
    106					; ENABLE THE VOLUME (HARDWARE WISE)
    107					;
    108	000036				ENBLN2:	QIOW$	IO.STC,LUN2,EFN1
    109					;
    110					;
    111					; ERROR MESSAGES FOR ROOT
    112					;
    113			.NLIST	BIN
    114	000052	ERR1:	.ASCIZ	/INIT -- NOT FILES-11 DEVICE/
    115	000106	ERR2:	.ASCIZ	/INIT -- VOLUME MOUNTED/
    116	000135	ERR3:	.ASCIZ	/INIT -- ILLEGAL FUNCTION FOR NON-PRIVILEGED TERMINAL/
    117			.EVEN
    118						.LIST	BIN
INIROT - INITVOL MCR COMMAND RO	MACRO V05.04  Tuesday 10-May-88 15:40  Page 6
GLOBAL DATA

    120						.SBTTL	GLOBAL DATA
    121					;
    122					; DATA PARSED FROM COMMAND
    123					;
    124	000222	000000 			$IUIC::	.WORD	0		; USER ID CODE
    125	000224	000000 			$ICHA::	.WORD	0		; CHARACTERISTICS
    126	000226	000000 			$IPRO::	.WORD	0		; VOLUME PROTECTION CODE
    127	000230	000000 			$IFPRO::.WORD	0		; DEFAULT FILE PROTECTION CODE
    128	000232	000000 			$IDENS::.WORD	0		; MAGTAPE DENSITY
    129	000234	   000 			$IEXT::	.BYTE	0		; EXTEND SIZE IN BLOCKS
    130	000235	   000 			$IWIN::	.BYTE	0		; WINDOW SIZE IN BYTES
    131	000236	000000 			$ICLF::	.WORD	0		; STORAGE BIT MAP CLUSTER FACTOR
    132	000240	000000 			$IINF::	.WORD	0		; INITIAL NUMBER OF FILES
    133	000242	000000 			$IMXF::	.WORD	0		; MAXIMUM NUMBER OF FILES FOR VOLUME
    134	000244	000000 			$ILRU::	.WORD	0		; DIRECTORY PRE-ACCESS LIMIT
    135	000246	000000 			$IKEY::	.WORD	0		; KEY WORD INDICATOR FLAG WORD
    136									; BITS ARE ALPHABETICL BY KEYWORD
    137									; FROM RIGHT TO LEFT
    138	000250	000000 			$IBAD::	.WORD	0		; BAD BLOCK PROCESSING
    139									; BIT 0 - MANUAL
    140									; BIT 1 - AUTO
    141	000252				$PUD::
    142	000252	000000 			$IDEV::	.WORD	0		; ADDRESS OF DEVICE UCB OR PUD
    143	000254				$IVNAM::.BLKW	6		; VOLUME LABEL IN ASCII
    144	000270				$IDVTP::.BLKW	7.		; DEVICE SPECIFIC DATA FROM PARSER
    145									; WORD 1	DEVICE MNEMONIC IN ASCII
    146									; WORD 2	UNIT NUMBER IN BINARY
    147									; WORD 3	MAX FILES PER VOLUME
    148									; WORDS 4-5	LOGICAL BLOCKS PER UNIT
    149									; WORDS 6-7	LOGICAL BLOCKS PER VOLUME
    150	000306	000000 			$NDXSZ::.WORD	0		; INDEX BIT MAP SIZE IN BLOCKS
    151	000310	000000 			$IERFL::.WORD	0		; ERROR EXIT FLAG
    152
    153					;
    154					; INITIAL ALLOCATIONS FOR SYETM FILES (WINDOW BLOCK FORMAT)
    155					;	BYTE 1	LENGTH OF FIRST ALLOCATION
    156					;	BYTES 2-4 LOGICAL BLOCK NUMBER OF FIRST BLOCK
    157					;
    158	000312	000000 				.WORD	0		; NUMBER OF RETRIEVAL POINTERS
    159	000314	000000 	000000 		$BTBLK::.WORD	0,0		; BOOT BLOCK RETREIVAL PPOINTER
    160	000320				$HMBLK::.BLKW	2		; HOME BLOCK
    161	000324				$INDXF::.BLKW	2		; INDEX FILE
    162	000330				$MFD::	.BLKW	2		; MASTER FILE DIRECTORY
    163	000334				$SBMAP::.BLKW	2		; STORAGE BIT MAP FILE
    164	000340				$CRIMG::.BLKW	2		; RSX11D CHECKPOINT FILE
    165
    166	000344				$DATIM::.BLKW	8.		; DATE AND TIME IN ASCII (USED BY GTIM$ ALSO)
    167		000061 			$INILN	==	<.-$IUIC>/2	; LENGTH OF GLOBAL AREA
    168
INIROT - INITVOL MCR COMMAND RO	MACRO V05.04  Tuesday 10-May-88 15:40  Page 7
GLOBAL DATA

    170					;
    171					; DPB FOR DEVICE TO INITIALIZED
    172					;
    173	000364				$INDPB::QIOW$	IO.WLB,LUN2,EFN2,,$INSTA,,<,,,,,>
    174
    175	000414				$INSTA::.BLKW	2.		; I/O STATUS AREA
    176
    177
    178					;
    179					; ****** WARNING! DO NOT SEPARATE THE FOLLOWING LINES.
    180					;
    181	000420				GCML:	GMCR$			; GET MCR COMMAND LINE FOR ERROR EXIT ONLY
    182		000422'			.=GCML+G.MCRB			; SAVE THE BUFFER SPACE
    183					;
    184					; BAD BLOCK FILE HEADER BUFFER
    185					;
    186	000422				$IBBUF::.BLKW	256.		;
    187
    188					;
    189					; WORK BUFFER
    190					;
    191	001422				$WBUF::	.BLKW	256.		;
    192					;
    193					; ****** WARNING! DO NOT SEPARATE THE PRECEDING LINES.
    194					;
INIROT - INITVOL MCR COMMAND RO	MACRO V05.04  Tuesday 10-May-88 15:40  Page 8
INITVOL - DISPATCHER

    196						.SBTTL	INITVOL - DISPATCHER
    197					;+
    198					; *** - $INIEP - INITVOL COMMAND ENTRY POINT
    199					;
    200					;	THIS MODULE IS THE ROOT SEGEMENT OF THE INITVOL MCR COMMAND
    201					;	IT PASSES CONTROL TO THE VARIOUS OVERLAYS AND PROVIDES
    202					;	COMMON STORAGE FOR PASSING DATA AMOUNG THE OVERLAYS
    203					;	IN ADDITION IT CONTAINS THE ERROR MESSAGE CODE WHICH
    204					;	WRITES ERROR MESSAGES TO THE DEVICE "TI"
    205					;
    206					; THE INITVOL COMMAND IS USED TO INITIALIZE A VOLUME
    207					; TO THE FILES -11 FILE STRUCTURE.
    208					;-
    209	002422				$INIEP::CALL	.CKPRV		; SEE IF INVOKING TERMINAL IS PRIVILEGED
    210	002426	000407 			PRIVLG::BR	5$		; IGNORE RESULT
    211	002430	103006 				BCC	5$		; BRANCH IF YES
    212	002432					DIR$	#GCML		; PICK UP COMMAND LINE FOR NEATNESS SAKE
    213	002440	012700 	000135'			MOV	#ERR3,R0
    214	002444	000457 				BR	ERRCOM		; OUTPUT ERROR MESSAGE
    215	002446				5$:	CALL	$IPREP		; PARSE COMMAND
    216	002452	016700 	175574 			MOV	$PUD,R0		; GET ADDRESS OF THE PUD
    217	002456	032760 	000000G	000000G		BIT	#UC.F11,U.C1(R0) ; IS THIS A FILES-11 DEVICE?
    218	002464	001442 				BEQ	INIER1		; NO
    219	002466	132760 	000000G	000000G		BITB	#CH.OFF,U.CH(R0) ; VOLUME MOUNTED?
    220	002474	001441 				BEQ	INIER2		; YES
    221	002476	032767 	000004 	175542 		BIT	#KY.DEN,$IKEY	; MAGTAPE?
    222	002504	001403 				BEQ	10$		; NO!
    223	002506					CALL	$INIMT		; YES, SPECIAL CASE
    224	002512	000421 				BR	EXIT		; EXIT NOW!!!
    225	002514				10$:	DIR$	#ENBLN2		; ENABLE THE HARDWARE
    226					.IF DF R$$20F
    227	002522					CALL	$IN10		; READ TOPS-20 HOM BLOCKS
    228					.ENDC
    229	002526					CALL	$INBAD		; PROCESS BAD BLOCKS
    230	002532					CALL	$INALL		; ALLOCATE SPACE FOR SYSTEM FILES
    231	002536					CALL	$INSTB		; WRITE OUT STORAGE BIT MAP FILE
    232					.IF DF R$$20F
    233	002542					CALL	$IN11		; MARK BITMAP FOR TOPS-20 FILE SYSTEM
    234					.ENDC
    235	002546					CALL	$INHOM		; BUILD BOOT AND HOME BLOCKS
    236	002552					CALL	$INOXF		; WRITE OUT INDEX FILE AND HEADERS AND MFD
    237	002556				EXIT:	DIR$	#DETLN2		; DETACH LUN-2
    238	002564					EXIT$S			; DEPART THIS PLACE
    239
    240
    241
    242
    243					;
    244					; ROOT ERROR PROCESSING
    245					;
    246	002572	012700 	000052'		INIER1:	MOV	#ERR1,R0	;
    247	002576	000402 				BR	ERRCOM		;
    248	002600	012700 	000106'		INIER2:	MOV	#ERR2,R0	;
    249	002604				ERRCOM:	CALL	$INIER		;
INIROT - INITVOL MCR COMMAND RO	MACRO V05.04  Tuesday 10-May-88 15:40  Page 9
ERROR PROCESSING

    251						.SBTTL	ERROR PROCESSING
    252					;+
    253					; *** - $INIER  -  INITVOL ERROR PROCESSING ROUTINE
    254					;
    255					; THIS ROUTINE PRINTS AN ERROR MESSAGE ON DEVICE "TI"
    256					;
    257					; INPUT:
    258					;	R0 - ERROR MESSAGE ADDRESS - ENDS IN ZERO BYTE
    259					;
    260					; OUTPUT:
    261					;	NONE
    262					;
    263					;-
    264	002610	010067 	175200 		$INIER::MOV	R0,ERRBUF	; SET ERROR MESSAGE ADDRESS
    265	002614	005001 				CLR	R1		; ZERO CHARACTER COUNT
    266	002616	105720 			10$:	TSTB	(R0)+		; TEST NEXT CHARACTER
    267	002620	001402 				BEQ	20$		; END OF STRING
    268	002622	005201 				INC	R1		; INCREMENT CHARACTER COUNT
    269	002624	000774 				BR	10$		; LOOP
    270	002626	010167 	175164 		20$:	MOV	R1,ERRBUF+2	; SET MESSAGE LENGTH
    271	002632					DIR$	#$ERDPB		; ISSUE QIO
    272	002640	103405 				BCS	30$		;
    273	002642					WTSE$S	#EFN1		; WAIT FOR COMPLETION
    274	002654	005767 	175430 		30$:	TST	$IERFL		; ERROR EXIT?
    275	002660	001736 				BEQ	EXIT		; YES
    276	002662	005067 	175422 			CLR	$IERFL		; NO, ZERO ERROR EXIT FLAG
    277	002666					RETURN			; RETURN TO CALLER
INIROT - INITVOL MCR COMMAND RO	MACRO V05.04  Tuesday 10-May-88 15:40  Page 10
VERIFY BLOCK WITHIN DISK BOUNDARY

    279						.SBTTL	VERIFY BLOCK WITHIN DISK BOUNDARY
    280					;
    281					;+
    282					;
    283					; *** - VERIFY - CODE TO CHECK IF A GIVEN LOGICAL BLOCK NUMBER IS
    284					;		 CONTAINED WITHIN THE BOUNDRY OF A GIVEN VOLUME.
    285					;
    286					; ENTRY:
    287					;
    288					;	CALL	VERIFY
    289					;
    290					; INPUTS:
    291					;
    292					;	R1 - POINTER TO LENGTH OF CONTIGUOUS BAD BLOCKS
    293					;	R2 - POINTER TO FIRST BAD BLOCK OF THIS GROUP
    294					;	      (R2) - LOW ORDER 16 BITS
    295					;	     2(R2) - HIGH ORDER 8 BITS
    296					;
    297					; OUTPUT:
    298					;
    299					;	CC-C	CLEAR - BLOCK(S) WITHIN VOLUME RANGE
    300					;		  SET - BLOCK(S) OUT OF VOLUME RANGE
    301					;
    302					;-
    303					;
    304	002670	010546 			VERIFY::MOV	R5,-(SP)	; SAVE R5
    305	002672	011205 				MOV	(R2),R5		; GET LOW ORDER BITS
    306	002674	016246 	000002 			MOV	2(R2),-(SP)	; GET HIGH ORDER BITS
    307	002700	061105 				ADD	(R1),R5		; ADD GROUP SIZE
    308	002702	005516 				ADC	(SP)		; ADD IN ANY OVERFLOW
    309	002704	026716 	175372 			CMP	$IDVTP+12,(SP)	; CHECK HIGH ORDER PART
    310	002710	101006 				BHI	20$		; MUST BE OK
    311	002712	103403 				BLO	10$		; NO WAY IN THE WORLD
    312	002714	026705 	175364 			CMP	$IDVTP+14,R5	; CHECK LOW ORDER PART
    313	002720	101002 				BHI	20$		; YOU WIN THIS TIME
    314	002722	000261 			10$:	SEC			; SET THE ERROR FLAG
    315	002724	000401 				BR	30$		; AND GO EXIT
    316	002726	000241 			20$:	CLC			; NO ERROR THIS TIME
    317	002730	005226 			30$:	INC	(SP)+		; JUNK TOP OF STACK
    318	002732	012605 				MOV	(SP)+,R5	; RESTORE R5
    319	002734					RETURN			; EXIT TO CALLER WITH C-BIT (RE)SET
    320					;
INIROT - INITVOL MCR COMMAND RO	MACRO V05.04  Tuesday 10-May-88 15:40  Page 11
LOOK FOR A BLOCK MATCH

    322						.SBTTL	LOOK FOR A BLOCK MATCH
    323					;
    324					;+
    325					;
    326					; *** - MATCH - CODE TO CHECK FOR A MATCH BETWEEN TWO GIVEN
    327					;		SETS OF NUMBERS EACH HAVING AN INITIAL VALUE
    328					;		PLUS A LENGTH VALUE. IF ANY NUMBER(S) WITHIN
    329					;		THE FIRST SET MATCH WITH OTHERS IN THE SECOND
    330					;		SET THEN THE ERROR RETURN IS TAKEN.
    331					;
    332					; ENTRY:
    333					;
    334					;	CALL	MATCH
    335					;
    336					; INPUTS:
    337					;
    338					;	R1 - POINTER TO LENGTH OF FIRST SET
    339					;	R2 - POINTER TO INITIAL VALUE OF FIRST SET
    340					;	      (R2) - LOW ORDER 16 BITS
    341					;	     2(R2) - HIGH ORDER 8 BITS
    342					;	R4 - (COUNTER OF NUMBER OF SETS TO CHECK)*2  (1B)
    343					;	R5 - POINTER TO SECOND SET
    344					;	      (R5) - HIGH ORDER 8 BITS
    345					;	     1(R5) - LENGTH OF SECOND SET
    346					;	     2(R5) - LOW ORDER 16 BITS
    347					;
    348					; OUTPUTS:
    349					;
    350					;	CC-C	CLEAR - NUMBERS DO NOT MATCH ANYWHERE
    351					;		  SET - AT LEAST ONE NUMBER MATCHES
    352					;
    353					;-
    354					;
    355	002736	042704 	177400 		MATCH::	BIC	#177400,R4	; USE LOWER BYTE ONLY
    356	002742	006204 				ASR	R4		; ACTUALLY ONLY HALF NUMBER INDICATED
    357	002744	001433 				BEQ	60$		; NO POINTERS, SO DON'T CHECK ANY FURTHER
    358	002746	016546 	000002 		10$:	MOV	2(R5),-(SP)	; PUT CURRENT BLOCK# ON STACK
    359	002752	005046 				CLR	-(SP)		; FOR FURTHER MANIPULATION
    360	002754	111516 				MOVB	(R5),(SP)	; LET HIGH ORDER BITS BE ON TOP
    361	002756	161266 	000002 			SUB	(R2),2(SP)	; SUBTRACT ENTERED BLOCK#
    362	002762	005616 				SBC	(SP)		; TAKE CARE OF BORROW BIT
    363	002764	166216 	000002 			SUB	2(R2),(SP)	; FINALLY USE THE HI BITS
    364	002770	100403 				BMI	20$		; BRANCH IF ENTERED# > CURRENT#
    365	002772	001015 				BNE	40$		; RESULT > 255. SO MUST BE OK
    366	002774	111116 				MOVB	(R1),(SP)	; GET THE LENGTH OF THE ENTERED BLOCKS
    367	002776	000410 				BR	30$		; GO CHECK IF IN RANGE
    368	003000	022716 	177777 		20$:	CMP	#-1,(SP)	; HOW LARGE IS THE DIFFERENCE?
    369	003004	001010 				BNE	40$		; TOO BIG, SO BLOCKS CAN'T MATCH
    370	003006	005466 	000002 			NEG	2(SP)		; NEGATE THE DIFFERENCE
    371	003012	005016 				CLR	(SP)		; CLEAR A HOLE
    372	003014	116516 	000001 			MOVB	1(R5),(SP)	; MOVE IN THE CURRENT BLOCK SIZE
    373	003020	022626 			30$:	CMP	(SP)+,(SP)+	; CHECK IF SOME BLOCKS MATCH
    374	003022	103006 				BHIS	70$		; YES, ASK HIM TO TRY AGAIN
    375	003024	000401 				BR	50$		; GO SEE IF ANY MORE TO CHECK
    376	003026	022626 			40$:	CMP	(SP)+,(SP)+	; CLEAR THE STACK OF JUNK
    377	003030	022525 			50$:	CMP	(R5)+,(R5)+	; MOVE 'CURRENT BLOCK' POINTER
    378	003032	077433 				SOB	R4,10$		; HAVE WE CHECKED THEM ALL YET?
INIROT - INITVOL MCR COMMAND RO	MACRO V05.04  Tuesday 10-May-88 15:40  Page 11-1
LOOK FOR A BLOCK MATCH

    379	003034	000241 			60$:	CLC			; YES, RESET FLAG FOR GOOD EXIT
    380	003036	000401 				BR	80$		; DO IT NOW
    381	003040	000261 			70$:	SEC			; SET ERROR FLAG
    382	003042				80$:	RETURN			; RETURN WITH THE GOOD/BAD NEWS
INIROT - INITVOL MCR COMMAND RO	MACRO V05.04  Tuesday 10-May-88 15:40  Page 12
DISK READ/WRITE ROUTINE

    384						.SBTTL	DISK READ/WRITE ROUTINE
    385					;
    386					;+
    387					;
    388					; *** - DVQIOR - ROUTINE TO READ A BLOCK FROM THE DEVICE
    389					;		 UNDER INITIALIZATION INTO CORE.
    390					;
    391					; ENTRY:
    392					;
    393					;	CALL	DVQIOR
    394					;
    395					; *** - DVQIOW - ADDITIONAL ENTRY INTO THE SAME CODE BUT
    396					;		 THIS TIME IT WRITES FROM CORE TO DEVICE.
    397					;
    398					; ENTRY:
    399					;
    400					;	CALL	DVQIOW
    401					;
    402					; OUTPUT:
    403					;
    404					;	CC-C	CLEAR - TRANSFER OK
    405					;		  SET - SOME SORT OF ERROR OCCURRED
    406					;
    407					;-
    408					;
    409	003044	012767 	001000 	175314 	DVQIOR::MOV	#IO.RLB,$INDPB+Q.IOFN ; SETUP TO READ A BLOCK
    410	003052	000403 				BR	DVCOMN		      ; EXECUTE COMMON CODE
    411	003054	012767 	000400 	175304 	DVQIOW::MOV	#IO.WLB,$INDPB+Q.IOFN ; SETUP TO WRITE A BLOCK
    412	003062	012767 	001000 	175312 	DVCOMN:	MOV	#512.,$INDPB+16	; SETUP THE STANDARD BLOCK SIZE
    413	003070					DIR$	#$INDPB		; PERFORM GIVEN FUNCTION
    414	003076	105367 	175312 			DECB	$INSTA		; SEE IF WE CREATED AN ERROR
    415	003102	103403 				BCS	10$		; AN RSX CALL ERROR
    416	003104	000261 				SEC			; ASSUME AN ERROR EXISTS
    417	003106	001001 				BNE	10$		; YES IT REALLY DOES
    418	003110	000241 				CLC			; NO ERROR
    419	003112				10$:	RETURN			; EXIT TO CALLER
    420					;
INIROT - INITVOL MCR COMMAND RO	MACRO V05.04  Tuesday 10-May-88 15:40  Page 13
DOUBLE PRECISION INTEGER DIVIDE

    422						.SBTTL	DOUBLE PRECISION INTEGER DIVIDE
    423					;
    424					;+
    425					;
    426					; *** - DIVIDE - DOUBLE PRECISION INTEGER DIVIDE ROUTINE.
    427					;
    428					; ENTRY:
    429					;
    430					;	CALL	DIVIDE
    431					;
    432					; INPUTS:
    433					;
    434					;	R0 - HIGH ORDER BITS OF DOUBLE PRECISION INTEGER
    435					;	R1 - LOW ORDER BITS
    436					;	R2 - DIVISOR
    437					;
    438					; OUTPUTS:
    439					;
    440					;	R0 - HIGH ORDER BITS OF RESULT
    441					;	R1 - LOW ORDER BITS OF RESULT
    442					;	R2 - REMAINDER
    443					;
    444					;-
    445					;
    446	003114				DIVIDE::
    447	003114	010346 				MOV	R3,-(SP)	; SAVE R3
    448	003116	012703 	000040 			MOV	#32.,R3		; SET ITERATION COUNT IN R3
    449	003122	010246 				MOV	R2,-(SP)	; PUT DIVISOR ON STACK
    450	003124	005002 				CLR	R2		; SET REMAINDER TO ZERO
    451	003126	006301 			10$:	ASL	R1		; SHIFT THE ENTIRE DIVIDEND ...
    452	003130	006100 				ROL	R0		; ... ONE BIT TO THE LEFT AND ...
    453	003132	006102 				ROL	R2		; ... INTO THE REMAINDER
    454	003134	020216 				CMP	R2,(SP)		; IS REMAINDER .GE. DIVISOR?
    455	003136	103402 				BLO	20$		; NO, SKIP TO ITERATION CONTROL
    456	003140	161602 				SUB	(SP),R2		; YES, SUBTRACT DIVISOR OUT
    457	003142	005201 				INC	R1		; AND INCREMENT THE QUOTIENT
    458	003144	077310 			20$:	SOB	R3,10$		; REPEAT AS LONG AS NECESSARY
    459	003146	005726 				TST	(SP)+		; PURGE DIVISOR FROM TOP OF STACK
    460	003150	012603 				MOV	(SP)+,R3	; RESTORE R3
    461	003152					RETURN			; EXIT TO CALLER
    462					;
    463		002422'				.END	$INIEP
INIROT - INITVOL MCR COMMAND RO	MACRO V05.04  Tuesday 10-May-88 15:40  Page 13-1
Symbol table

CH.OFF= ****** GX	IE.BLK= 177754   	IE.RER= 177740   	IO.MDI= 014400   	IS.ESC= 015401
DETLN2  000022R  	IE.BNM= 177712   	IE.RNM= 177715   	IO.MDO= 015400   	IS.PND= 000000
DIVIDE  003114RG 	IE.BTF= 177675   	IE.RSU= 177757   	IO.MLO= 006000   	IS.RDD= 000002
DVCOMN  003062R  	IE.BTP= 177725   	IE.SDP= 177635   	IO.MOD= 003000   	IS.SET= 000002
DVQIOR  003044RG 	IE.BVR= 177701   	IE.SNC= 177735   	IO.MSO= 005000   	IS.SUC= 000001
DVQIOW  003054RG 	IE.BYT= 177755   	IE.SPC= 177772   	IO.RAL= 001010   	KY$BIT= 010000
EFN1  = 000001   	IE.CKP= 177766   	IE.SQC= 177734   	IO.RAT= 013000   	KY.BAD= 000001 G
EFN2  = 000002   	IE.CKS= 177742   	IE.SRE= 177762   	IO.RBC= 003000   	KY.CHA= 000002 G
ENBLN2  000036R  	IE.CLO= 177732   	IE.STK= 177706   	IO.RCI= 015000   	KY.DEN= 000004 G
ERRBUF  000014R  	IE.CON= 177752   	IE.ULN= 177773   	IO.RCV= 015000   	KY.EXT= 000010 G
ERRCOM  002604R  	IE.DAA= 177770   	IE.UPN= 177777   	IO.RDB= 001200   	KY.FPR= 000020 G
ERR1    000052R  	IE.DAO= 177763   	IE.VER= 177774   	IO.RDN= 000022   	KY.FUL= 000040 G
ERR2    000106R  	IE.DFU= 177750   	IE.WAC= 177743   	IO.REL= 013400   	KY.IND= 000100 G
ERR3    000135R  	IE.DNA= 177771   	IE.WAT= 177741   	IO.RHD= 001010   	KY.INF= 000200 G
EXIT    002556R  	IE.DNR= 177775   	IE.WER= 177737   	IO.RLB= 001000   	KY.MXF= 000400 G
E$$MSG= 000001   	IE.DUN= 177767   	IE.WLK= 177764   	IO.RLV= 001100   	KY.PRO= 001000 G
E$$TRP= 000001   	IE.DUP= 177707   	IE.2DV= 177720   	IO.RNA= 005400   	KY.UIC= 002000 G
FC.CEF= 020000   	IE.EBX= 177776   	INIER1  002572R  	IO.RNC= 001004   	KY.WIN= 004000 G
FC.DIR= 040000   	IE.EOF= 177766   	INIER2  002600R  	IO.RNE= 001020   	LUN1  = 000001
FC.FCO= 010000   	IE.EOT= 177702   	IO.ACE= 007400   	IO.RTC= 003400   	LUN2  = 000002
FC.WAC= 100000   	IE.EOV= 177765   	IO.ACR= 006400   	IO.RTI= 016400   	MATCH   002736RG
F$$LVL= 000001   	IE.EXP= 177676   	IO.ACW= 007000   	IO.RTK= 000060   	M$$HDR= 000001
F.DREF  000042   	IE.FEX= 177717   	IO.ADS= 014000   	IO.RVB= 010400   	PRIVLG  002426RG
F.DRNM  000044   	IE.FHE= 177705   	IO.APC= 014000   	IO.RWD= 002400   	Q.IOAE= 000012
F.FEXT  000002   	IE.FOP= 177713   	IO.APV= 014010   	IO.RWU= 002540   	Q.IOEF= 000006
F.FNUM  000006   	IE.HFU= 177744   	IO.ATT= 001400   	IO.R1C= 002400   	Q.IOFN= 000002
F.FOWN  000014   	IE.HWR= 177772   	IO.CCI= 014000   	IO.SAO= 004000   	Q.IOLU= 000004
F.FPRO  000016   	IE.IDU= 177644   	IO.CCT= 002460   	IO.SCS= 013000   	Q.IOPL= 000014
F.FSEQ  000010   	IE.IEF= 177637   	IO.CLN= 003400   	IO.SDI= 013000   	Q.IOPR= 000007
F.FSQN  000013   	IE.IFC= 177776   	IO.CON= 015400   	IO.SDO= 012400   	Q.IOSB= 000010
F.FVBN  000046   	IE.IFU= 177747   	IO.CRC= 001020   	IO.SEC= 002520   	R$$10F= 000001
F.HDLB  000022   	IE.ILL= 177726   	IO.CRE= 012000   	IO.SEM= 002440   	R$$11D= 000001
F.LBN   000026   	IE.ILU= 177640   	IO.CTI= 015400   	IO.SHT= 002410   	R$$20F= 000001
F.LGTH  000052   	IE.INS= 177776   	IO.CTL= 016400   	IO.SLO= 005400   	SPA   = 000040
F.LINK  000000   	IE.IPR= 177641   	IO.DAC= 010000   	IO.SMO= 002560   	S.STBK= 000012
F.NACS  000036   	IE.ISQ= 177703   	IO.DCI= 014400   	IO.SNM= 002450   	UC.F11= ****** GX
F.NLCK  000037   	IE.ITI= 177643   	IO.DCT= 002470   	IO.SPB= 002420   	U.CH  = ****** GX
F.NWAC  000040   	IE.ITS= 177770   	IO.DEL= 012400   	IO.SPF= 002440   	U.C1  = ****** GX
F.RVN   000012   	IE.LCK= 177745   	IO.DET= 002000   	IO.SSO= 004400   	VC.BMW= 000002
F.SCHA  000021   	IE.LNL= 177646   	IO.DIS= 016000   	IO.SST= 002430   	VC.IFW= 000001
F.SIZE  000032   	IE.MBK= 177721   	IO.DTI= 016000   	IO.STC= 002500   	VERIFY  002670RG
F.STAT  000040   	IE.MOD= 177753   	IO.ENA= 006000   	IO.STP= 016400   	V.FCB   000006
F.STD   000004   	IE.NBF= 177731   	IO.EOF= 003000   	IO.SYN= 003040   	V.FFNU  000055
F.UCHA  000020   	IE.NBK= 177727   	IO.ESA= 002500   	IO.TRM= 002410   	V.FIEX  000025
GCML    000420R  	IE.NFI= 177704   	IO.EXT= 011400   	IO.UNL= 000042   	V.FMAX  000016
G.MCRB= 000002   	IE.NLN= 177733   	IO.FDX= 003020   	IO.WAT= 013400   	V.FPRO  000030
IE.ABO= 177761   	IE.NNC= 177674   	IO.FNA= 004400   	IO.WLB= 000400   	V.FRBK  000034
IE.ACT= 177771   	IE.NOD= 177751   	IO.HDX= 003010   	IO.WLS= 000410   	V.IBLB  000012
IE.ADP= 177636   	IE.NSF= 177746   	IO.HIS= 015000   	IO.WLV= 000500   	V.IBSZ  000013
IE.ALN= 177736   	IE.OFL= 177677   	IO.INL= 002400   	IO.WVB= 011000   	V.IFWI  000002
IE.AST= 177660   	IE.ONP= 177773   	IO.ITI= 017000   	IO.XMT= 014400   	V.LABL  000040
IE.BAD= 177777   	IE.OVR= 177756   	IO.KIL= 000012   	IO.XNA= 014410   	V.LGTH  000056
IE.BBE= 177710   	IE.PRI= 177760   	IO.LED= 012000   	IQ.Q  = 000002   	V.LRUC  000035
IE.BDI= 177714   	IE.RAC= 177724   	IO.LOV= 001010   	IQ.X  = 000001   	V.SBCL  000021
IE.BDR= 177716   	IE.RAT= 177723   	IO.LTK= 000050   	IS.BV = 000005   	V.SBLB  000024
IE.BDV= 177711   	IE.RBG= 177730   	IO.MCS= 013400   	IS.CLR= 000000   	V.SBSZ  000022
IE.BHD= 177700   	IE.RCN= 177722   	IO.MDA= 016000   	IS.CR = 006401   	V.STAT  000054
INIROT - INITVOL MCR COMMAND RO	MACRO V05.04  Tuesday 10-May-88 15:40  Page 13-2
Symbol table

V.STD   000004   	W.VBN   000006   	$IDVTP  000270RG 	$INIEP  002422RG 	$IWIN   000235RG
V.TRCT  000000   	W.WISZ  000007   	$IERFL  000310RG 	$INIER  002610RG 	$MFD    000330RG
V.WISZ  000020   	$BTBLK  000314RG 	$IEXT   000234RG 	$INILN= 000061 G 	$NDXSZ  000306RG
WI.BPS= 100000   	$CRIMG  000340RG 	$IFPRO  000230RG 	$INIMT= ****** GX	$PUD    000252RG
WI.DLK= 010000   	$DATIM  000344RG 	$IINF   000240RG 	$INOXF= ****** GX	$SBMAP  000334RG
WI.EXT= 002000   	$ERDPB  000000RG 	$IKEY   000246RG 	$INSTA  000414RG 	$WBUF   001422RG
WI.LCK= 004000   	$HMBLK  000320RG 	$ILRU   000244RG 	$INSTB= ****** GX	$$    = 000067
WI.RDV= 000400   	$IBAD   000250RG 	$IMXF   000242RG 	$IN10 = ****** GX	$$MSG = 000000
WI.WRV= 001000   	$IBBUF  000422RG 	$INALL= ****** GX	$IN11 = ****** GX	$$$ARG= 000014
W.CTL   000000   	$ICHA   000224RG 	$INBAD= ****** GX	$IPREP= ****** GX	$$$OST= 000122
W.FCB   000002   	$ICLF   000236RG 	$INDPB  000364RG 	$IPRO   000226RG 	.CKPRV= ****** GX
W.RTRV  000012   	$IDENS  000232RG 	$INDXF  000324RG 	$IUIC   000222RG 	...GBL= 000000
W.STD   000004   	$IDEV   000252RG 	$INHOM= ****** GX	$IVNAM  000254RG

. ABS.	000056    000	(RW,I,GBL,ABS,OVR)
      	003154    001	(RW,I,LCL,REL,CON)
Errors detected:  0

*** Assembler statistics


Work  file  reads: 0
Work  file writes: 0
Size of work file: 11231 Words  ( 44 Pages)
Size of core pool: 12356 Words  ( 47 Pages)
Operating  system: RSX-11M/PLUS

Elapsed time: 00:00:35.03
[53,10]INIROT,[53,20]INIROT/-SP/CR=[53,30]RSXDC,INIROT
INIROT     CREATED BY  MACRO  ON 10-MAY-88 AT 15:40	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

CH.OFF	= ******  GX	 8-219     
DETLN2	  000022 R	#5-104      8-237     
DIVIDE	  003114 RG	#13-446    
DVCOMN	  003062 R	 12-410    #12-412    
DVQIOR	  003044 RG	#12-409    
DVQIOW	  003054 RG	#12-411    
EFN1  	= 000001	#4-44       5-96       5-104      5-108      9-273     
EFN2  	= 000002	#4-45       7-173     
ENBLN2	  000036 R	#5-108      8-225     
ERRBUF	  000014 R	#5-98      *9-264     *9-270     
ERRCOM	  002604 R	 8-214      8-247     #8-249     
ERR1  	  000052 R	#5-114      8-246     
ERR2  	  000106 R	#5-115      8-248     
ERR3  	  000135 R	#5-116      8-213     
EXIT  	  002556 R	 8-224     #8-237      9-275     
E$$MSG	= 000001	#1-33      
E$$TRP	= 000001	#1-32      
F$$LVL	= 000001	#1-28       4-64      
GCML  	  000420 R	#7-181      7-182      8-212     
G.MCRB	= 000002	#7-181      7-182     
INIER1	  002572 R	 8-218     #8-246     
INIER2	  002600 R	 8-220     #8-248     
IO.DET	= 002000	 5-104     
IO.RLB	= 001000	 12-409    
IO.STC	= 002500	 5-108     
IO.WLB	= 000400	 7-173      12-411    
IO.WVB	= 011000	 5-94      
KY$BIT	= 010000	#4-61       4-62       4-62      #4-62       4-63       4-63      #4-63       4-67       4-67      
                        #4-67       4-68       4-68      #4-68       4-69       4-69      #4-69       4-71       4-71      
                        #4-71       4-73       4-73      #4-73       4-74       4-74      #4-74       4-75       4-75      
                        #4-75       4-76       4-76      #4-76       4-77       4-77      #4-77       4-78       4-78      
                        #4-78      
KY.BAD	= 000001  G	#4-62      
KY.CHA	= 000002  G	#4-63      
KY.DEN	= 000004  G	#4-67       8-221     
KY.EXT	= 000010  G	#4-68      
KY.FPR	= 000020  G	#4-69      
KY.FUL	= 000040  G	#4-71      
KY.IND	= 000100  G	#4-73      
KY.INF	= 000200  G	#4-74      
KY.MXF	= 000400  G	#4-75      
KY.PRO	= 001000  G	#4-76      
KY.UIC	= 002000  G	#4-77      
KY.WIN	= 004000  G	#4-78      
LUN1  	= 000001	#4-46       5-95      
LUN2  	= 000002	#4-47       5-104      5-108      7-173     
MATCH 	  002736 RG	#11-355    
M$$HDR	= 000001	#1-34      
PRIVLG	  002426 RG	#8-210     
Q.IOAE	= 000012	#5-104     #5-108     #7-173     
Q.IOEF	= 000006	#5-104     #5-108     #7-173     
Q.IOFN	= 000002	#5-104     #5-108     #7-173     *12-409    *12-411    
INIROT     CREATED BY  MACRO  ON 10-MAY-88 AT 15:40	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

Q.IOLU	= 000004	#5-104     #5-108     #7-173     
Q.IOPL	= 000014	#5-104     #5-108     #7-173     
Q.IOPR	= 000007	#5-104     #5-108     #7-173     
Q.IOSB	= 000010	#5-104     #5-108     #7-173     
R$$10F	= 000001	#1-30      
R$$11D	= 000001	#1-29      
R$$20F	= 000001	#1-31       4-70       8-226      8-232     
SPA   	= 000040	#4-43      
S$$YDF	= ******	 1-1        1-37      
UC.F11	= ******  GX	 8-217     
U.CH  	= ******  GX	 8-219     
U.C1  	= ******  GX	 8-217     
VERIFY	  002670 RG	#10-304    
$BTBLK	  000314 RG	#6-159     
$CRIMG	  000340 RG	#6-164     
$DATIM	  000344 RG	#6-166     
$ERDPB	  000000 RG	#5-93       9-271     
$HMBLK	  000320 RG	#6-160     
$IBAD 	  000250 RG	#6-138     
$IBBUF	  000422 RG	#7-186     
$ICHA 	  000224 RG	#6-125     
$ICLF 	  000236 RG	#6-131     
$IDENS	  000232 RG	#6-128     
$IDEV 	  000252 RG	#6-142     
$IDVTP	  000270 RG	#6-144      10-309     10-312    
$IERFL	  000310 RG	#6-151      9-274     *9-276     
$IEXT 	  000234 RG	#6-129     
$IFPRO	  000230 RG	#6-127     
$IINF 	  000240 RG	#6-132     
$IKEY 	  000246 RG	#6-135      8-221     
$ILRU 	  000244 RG	#6-134     
$IMXF 	  000242 RG	#6-133     
$INALL	= ******  GX	 8-230      8-230     
$INBAD	= ******  GX	 8-229      8-229     
$INDPB	  000364 RG	#7-173     *12-409    *12-411    *12-412     12-413    
$INDXF	  000324 RG	#6-161     
$INHOM	= ******  GX	 8-235      8-235     
$INIEP	  002422 RG	#8-209      13-463    
$INIER	  002610 RG	 8-249      8-249     #9-264     
$INILN	= 000061  G	#6-167     
$INIMT	= ******  GX	 8-223      8-223     
$INOXF	= ******  GX	 8-236      8-236     
$INSTA	  000414 RG	 7-173     #7-175     *12-414    
$INSTB	= ******  GX	 8-231      8-231     
$IN10 	= ******  GX	 8-227      8-227     
$IN11 	= ******  GX	 8-233      8-233     
$IPREP	= ******  GX	 8-215      8-215     
$IPRO 	  000226 RG	#6-126     
$IUIC 	  000222 RG	#6-124      6-167     
$IVNAM	  000254 RG	#6-143     
$IWIN 	  000235 RG	#6-130     
$MFD  	  000330 RG	#6-162     
INIROT     CREATED BY  MACRO  ON 10-MAY-88 AT 15:40	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

$NDXSZ	  000306 RG	#6-150     
$PUD  	  000252 RG	#6-141      8-216     
$SBMAP	  000334 RG	#6-163     
$WBUF 	  001422 RG	#7-191     
$$    	= 000067	#8-209      8-209     #8-215      8-215     #8-223      8-223     #8-227      8-227     #8-229     
                         8-229     #8-230      8-230     #8-231      8-231     #8-233      8-233     #8-235      8-235     
                        #8-236      8-236     #8-249      8-249     
$$$ARG	= 000014	#5-104      5-104     #5-108      5-108     #7-173      7-173     #7-173      7-173     #7-173     
                         7-173     #7-173      7-173     #7-173      7-173     #7-173      7-173     #7-173      7-173     
$$$GLB	= ******	 5-104      5-104      5-104      5-104      5-104      5-104      5-104      5-104      5-108     
                         5-108      5-108      5-108      5-108      5-108      5-108      5-108      7-173      7-173     
                         7-173      7-173      7-173      7-173      7-173      7-173      7-181      7-181     
$$$OST	= 000122	#5-104      5-104      5-104     #5-104      5-104      5-104     #5-104      5-104      5-104     
                        #5-104      5-104      5-104     #5-104      5-104      5-104     #5-104      5-104      5-104     
                        #5-104      5-104     #5-108      5-108      5-108     #5-108      5-108      5-108     #5-108     
                         5-108      5-108     #5-108      5-108      5-108     #5-108      5-108      5-108     #5-108     
                         5-108      5-108     #5-108      5-108     #7-173      7-173      7-173     #7-173      7-173     
                         7-173     #7-173      7-173      7-173     #7-173      7-173      7-173     #7-173      7-173     
                         7-173     #7-173      7-173      7-173     #7-173      7-173     #7-181      7-181      7-181     
                        #7-181     
.CKPRV	= ******  GX	 8-209      8-209     
INIROT     CREATED BY  MACRO  ON 10-MAY-88 AT 15:40	PAGE 4

MACRO CROSS REFERENCE                                   CREF   04.00 

MACRO NAME	REFERENCES

ALUN$ 		#3-36      
CALL  		#3-36       8-209      8-215      8-223      8-227      8-229      8-230      8-231      8-233      8-235     
                 8-236      8-249     
DIR$  		#3-36       8-212      8-225      8-237     #8-238      8-238      9-271     #9-273      9-273      12-413    
ERR$  		#8-212     #8-225     #8-237     #8-238     #9-271     #9-273     #12-413    
EXIT$S		#3-36       8-238     
F11DF$		#3-36       4-80      
GMCR$ 		#3-36       7-181     
KYFLG 		#4-53       4-62       4-63       4-67       4-68       4-69       4-71       4-73       4-74       4-75      
                 4-76       4-77       4-78      
MOV$  		#9-273      9-273     
OFF$  		#5-104      5-104      5-104      5-104      5-104      5-104      5-104      5-104      5-104     #5-108     
                 5-108      5-108      5-108      5-108      5-108      5-108      5-108      5-108     #7-173      7-173     
                 7-173      7-173      7-173      7-173      7-173      7-173      7-173     #7-181      7-181      7-181     
QDPB$ 		#5-104      5-104     #5-108      5-108     #7-173      7-173     
QIOSY$		#3-36       4-81      
QIOW$ 		#3-37       5-104      5-108      7-173     
RETURN		#3-36       9-277      10-319     11-382     12-419     13-461    
WTSE$S		#3-36       9-273     
INI20F - INITVOL RSX20F FILES-1	MACRO V05.04  Tuesday 10-May-88 15:43
Table of contents

     4-   55	CONSTANTS AND LOCAL DATA
     5-   93	READ TOPS HOME BLOCKS
     5-  173	DETERMINE THAT THIS IS A RSX20F FILE-11 PACK
     5-  191	RELOCATE -11 HOME BLOCK
     5-  227	RECALCULATE VOLUME SIZE
     6-  242	SECOND ENTRY -- MARK BITMAP
     6-  254	MARK OFF THE LOWER PART OF DISK
RSXDC	MACRO V05.04  Tuesday 10-May-88 15:43  Page 2


     39
INI20F - INITVOL RSX20F FILES-1	MACRO V05.04  Tuesday 10-May-88 15:43  Page 3


      1					.TITLE	INI20F - INITVOL RSX20F FILES-11 VOLUME INITIATOR
      2					.IDENT	"V001A"
      3					;
      4					;
      5					;
      6					;                             COPYRIGHT (C) 1975, 1978, 1985 BY
      7					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      8					;			ALL RIGHTS RESERVED.
      9					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
     10					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     11					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     12					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     13					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     14					;
     15					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     16					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     17					;       CORPORATION.
     18					;
     19					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     20					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     21					;
     22					;
     23					;
     24					;
     25					;	MODULE:  RSX20F FILES-11 VOLUME INITIATOR
     26					;
     27					;	VERSION:  V001A
     28					;
     29					;	AUTHOR:  JULIAN SHIH
     30					;
     31					;	DATE:  JULY 15, 1975
     32					;
     33					;
     34					;	THIS MODULE IS REQUIRED WHEN RSX20F INITIATES ITS FILE-11
     35					;	SYSTEM.  SINCE THE DISK PACK IS SHARED BY THE FILE-10 SYSTEM
     36					;	UNDER SNARK, IT IS NECESSARY TO MARK ALL DISK AREAS USED BY
     37					;	FILE-10 SYSTEM AS IN USE (IN THE RSX20F FILE-11 BITMAP) SUCH
     38					;	THAT IT MAY NOT BE DESTROYED BY THE RSX20F FILE-11 SYSTEM.
     39					;
     40					;
     41					;	THIS PROGRAM GAINS CONTROL FROM INIROT (THE ROOT SECTION FOR
     42					;	THE INITVOL COMMAND) RIGHT AFTER THE COMMAND HAS BEEN PARSED BUT
     43					;	BEFORE THE VARIOUS OVERLAYS HAVE BEEN CALLED AND EXECUTED.
     44					;
     45					;
     46					;	SINCE THE RSX20F FILE-11 AREA IS ALWAYS ALLOCATED CONTIGUOUSLY
     47					;	BY THE SNARK SYSTEM, THE SIZE OF THE AREA (IN HOMFE1) IS USED
     48					;	TO FORM THE NUMBER OF BLOCKS THAT ARE TO BE MARKED AS "IN USE"
     49					;	IN THE RSX20F FILE-11 BITMAP.
     50					;
     51					;
INI20F - INITVOL RSX20F FILES-1	MACRO V05.04  Tuesday 10-May-88 15:43  Page 4


     53						.MCALL	QIOSY$,DIR$,QIOW$,CALL,RETURN
     54					;
     55						.SBTTL	CONSTANTS AND LOCAL DATA
     56					;
     57					;	EQUATED SYMBOLS
     58					;
     59		000001 			HMBK01=1		;-10 HOME BLOCK #1
     60		000012 			HMBK10=10.		;-10 HOME BLOCK #10
     61		000061 			HOMFE0=61		;THIS IS THE 61TH WORD OF -10 HOME BLOCK
     62		000062 			HOMFE1=62		;THIS IS THE 62TH WORD OF -10 HOME BLOCK
     63					;
     64					;
     65					;	ERROR MESSAGES
     66					;
     67			.NLIST	BIN
     68	000000	ERMSG1:	.ASCIZ	/INI -- WRONG PACK - NO RSX20F FILE SYSTEM ALLOCATED/
     69	000064	ERMSG2:	.ASCIZ	/INI -- TOPS HOME BLOCK NOT FOUND/
     70	000125	ERMSG3:	.ASCIZ	/INI -- RSX20F FILE SYSTEM ALLOCATED LESS THAN 256. BLOCKS/
     71	000217	ERMSG4:	.ASCIZ	"INI -- TOPS HOME BLOCK I/O ERROR"
     72	000260	ERMSG5:	.ASCIZ	/INI -- RSX20F FILE SYSTEM OUTSIDE OF VOLUME RANGE/
     73	000342	ERMSG6:	.ASCIZ	"INI -- STORAGE BITMAP I/O ERROR"
     74			.EVEN
     75						.LIST	BIN
     76					;
     77					;	LOCAL DATA
     78					;
     79	000402	000000 			WKAREA:	.WORD	0		;WORD 1 - BITS 2 - 17 OF HOMFE0
     80									;  BIT 2 OF HOMFE0 (BIT15 OF THIS WORD)
     81									;  SET INDICATES THAT RSX-20F FILE SYSTEM EXISTS
     82	000404	000000 				.WORD	0		;WORD 2 - BITS 20 - 35 OF HOMFE0
     83									;  WORDS 1 & 2 COMBINE TO FORM A DOUBLE
     84									;  PRECISION # WHERE BITS 0-7 IN
     85									;  WORD 1 + BITS 0-15 IN WORD2 FORM
     86									;  A 24-BIT DISK ADDRESS
     87	000406	000000 				.WORD	0		;WORD 3 - BITS 2 - 17 OF HOMFE1
     88	000410	000000 				.WORD	0		;WORD 4 - BITS 20 - 35 OF HOMFE1
     89									;  HOMFE1 CONTAINS THE 24-BIT SIZE OF THE
     90									;  RSX20F AREA.
     91	000412	000000 			FLAG:	.WORD	0		;WHEN THIS FLAG IS SET, DON'T CALL $IN11
INI20F - INITVOL RSX20F FILES-1	MACRO V05.04  Tuesday 10-May-88 15:43  Page 5
READ TOPS HOME BLOCKS

     93						.SBTTL	READ TOPS HOME BLOCKS
     94					;+
     95					;
     96					; *** - READ -10 HOME BLOCK AND DETERMINE
     97					;	WHETHER THIS IS A FILE-11 PACK.....IF THE -10 HOME BLOCK
     98					;	INDICATES THAT THIS IS A FILE-11 PACK (BIT 2 OF HOMFE0 = 1),
     99					;	THIS ROUTINE WILL PROCEED TO MARK OFF ALL FILE-10 DISK
    100					;	SPACE AS IN USE IN THE RSX20F FILE-11 BITMAP FILE.
    101					;
    102					;INPUT:-10 HOME BLOCK
    103					;
    104					;	WHERE:	WORD	BITS	MEANING
    105					;
    106					;		HOMFE0	2	=1 INDICATE THAT THIS PACK CONTAINS
    107					;				THE FILE-11 SYSTEM.
    108					;				=0 INDICATE THAT THIS PACK DOES NOT
    109					;				CONTAIN THE FILE-11 SYSTEM.
    110					;
    111					;			3-17 AND
    112					;			20-35	1ST LINEAR SECTOR (BLOCK) ADDRESS
    113					;
    114					;		HOMFE1	2-17
    115					;			AND
    116					;			20-35	SECTOR COUNT OF FILE-11 SYSTEM(FILE SIZE)
    117					;
    118					;		ALL ABOVE INFORMATION WILL BE SET TO ZERO BY THE SNARK
    119					;		MONITOR AT REFRESH TIME.
    120					;
    121					;	THE RELATION BETWEEN TOPS AND PDP-11 WORDS IS RECORDED
    122					;	ON THE RP04 IN 22 SECTOR FORMAT AS FOLLOWS:
    123					;
    124					;	0  2	LEFT		17  20		RIGHT	 35
    125					;	---------------------------------------------------
    126					;	I  I			 I  I			  I
    127					;	I  I	TOPS HALF WORD I  I	TOPS HALF WORD  I
    128					;	---------------------------------------------------
    129					;	   I			 I  I			  I
    130					;	   I	PDP-11 WORD 0	 I  I	PDP-11 WORD 1	  I
    131					;	   ------------------------------------------------
    132					;	   15			 0  15			  0
    133					;
    134					;OUTPUT: A RSX20F FILE-11 BITMAP WITH ALL FILE-10 AREA MARKED AS IN USE
    135					;
    136					;-
    137					;
    138					;	1ST ENTRY:
    139					;
    140					;	CALL	$IN10 (FROM INIROT)
    141					;
    142					;	RETURN:
    143					;
    144					;	ROUTINE RETURNS TO THE INSTRUCTION FOLLOWING THE CALL
    145					;
    146					;
    147	000414	005067 	177772 		$IN10::	CLR	FLAG		;INIT FLAG
    148	000420	032767 	000000G	000000G		BIT	#KY.FUL,$IKEY	;/FULL SPECIFIED?
    149	000426	001004 				BNE	50$		;YES-- SKIP ALL OF THIS
INI20F - INITVOL RSX20F FILES-1	MACRO V05.04  Tuesday 10-May-88 15:43  Page 5-1
READ TOPS HOME BLOCKS

    150	000430	026727 	000000G	041104 		CMP	$IDVTP,#"DB	;IS DEVICE "DB ?
    151	000436	001403 				BEQ	1$		;YES, CONTINUE
    152	000440	005267 	177746 		50$:	INC	FLAG		;SET FLAG TO BLCOK ENTERING $IN11
    153	000444					RETURN
    154	000446	012767 	000000G	000014G	1$:	MOV	#$WBUF,$INDPB+14
    155	000454	012704 	000022G			MOV	#$INDPB+22,R4	;GET PTR TO CURRENT LBN
    156	000460	005024 				CLR	(R4)+		;NOW THE UPPER PART OF LBN
    157	000462	012714 	000001 			MOV	#HMBK01,@R4	;-10 HOME BLOCK #1
    158	000466				15$:	CALL	DVQIOR		;GO READ -10 HOME BLOCK
    159	000472	103414 				BCS	16$		;READ ERROR
    160	000474	026727 	000000G	105755 		CMP	$WBUF,#105755	;LAST 16-BIT OF "HOM" IN SIXBIT
    161	000502	001416 				BEQ	20$		;IT IS -10 HOME BLOCK
    162	000504	022767 	000012 	000024G		CMP	#HMBK10,$INDPB+24 ;IS THIS -10 HOME BLOCK #10 ?
    163	000512	001407 				BEQ	17$		;YES, ERROR
    164	000514	012767 	000012 	000024G		MOV	#HMBK10,$INDPB+24 ;OTHERWISE TRY -10 HOME BLOCK #10
    165	000522	000761 				BR	15$
    166					;
    167	000524	012700 	000217'		16$:	MOV	#ERMSG4,R0
    168	000530	000461 				BR	ERROR		;INDICATES -10 HOME BLOCK I/O ERROR
    169					;
    170	000532	012700 	000064'		17$:	MOV	#ERMSG2,R0
    171	000536	000456 				BR	ERROR		;TELL PEOPLE -10 HMEBLK NOT FOUND
    172					;
    173						.SBTTL	DETERMINE THAT THIS IS A RSX20F FILE-11 PACK
    174					;
    175	000540	012701 	000304G		20$:	MOV	#$WBUF+<HOMFE0*4>,R1 ;POINTS TO HOMFE0 IN -10 HMRBLK
    176	000544	012702 	000402'			MOV	#WKAREA,R2	;POINTS TO WORK AREA
    177	000550	012122 			30$:	MOV	(R1)+,(R2)+	;MOVE HIGH ORDER 8-BIT
    178	000552	100403 				BMI	40$		;BIT 2 OF HOMFE0 (BIT15) SET-- RSX20F FILE SYSTEM
    179	000554	012700 	000000'			MOV	#ERMSG1,R0	;NO, WRONG PACK
    180	000560	000445 				BR	ERROR		;TELL USER ABOUT IT
    181					;
    182	000562	012122 			40$:	MOV	(R1)+,(R2)+	;MOVE LOW ORDER 16-BIT
    183	000564	105067 	177613 			CLRB	WKAREA+1	;CLEAR BIT 2 OF HOMFE0
    184	000570	010200 				MOV	R2,R0		;COPY WKAREA+4
    185	000572	012122 				MOV	(R1)+,(R2)+	;GET SECTOR COUNT
    186	000574	012122 				MOV	(R1)+,(R2)+
    187	000576	064042 				ADD	-(R0),-(R2)	;ADD 'EM TO GET THE HIGH END BLOCK #
    188	000600	005542 				ADC	-(R2)		;CARRY ON
    189	000602	064012 				ADD	-(R0),(R2)	;ALSO HIGH PART
    190					;
    191						.SBTTL	RELOCATE -11 HOME BLOCK
    192					;
    193	000604	012703 	000000G		RELOCT:	MOV	#$HMBLK,R3	;GET -11 HOME BLOCK
    194	000610	000407 				BR	20$
    195	000612				10$:
    196	000612	042763 	000001 	000002 		BIC	#1,2(R3)	;CLEAR BLOCK #1
    197	000620	062763 	000400 	000002 		ADD	#400,2(R3)	;USE MUTIPLE OF 400
    198	000626	105513 				ADCB	(R3)		;ADD OVERFLOW
    199	000630				20$:
    200	000630	021367 	177546 			CMP	(R3),WKAREA	;COMPARE HIGH 8-BIT OF BLK #
    201	000634	103766 				BLO	10$		;STILL NOT IN RSX20F AREA
    202	000636	101004 				BHI	30$		;ALREADY IN AREA-- GO ON
    203	000640	026367 	000002 	177536 		CMP	2(R3),WKAREA+2	;COMPARE LOW 16-BIT OF BLK #
    204	000646	103761 				BLO	10$		;NOT IN RSX20F SYSTEM AREA
    205	000650				30$:
    206	000650	021367 	177532 			CMP	(R3),WKAREA+4	;IS IT IN THE AREA?
INI20F - INITVOL RSX20F FILES-1	MACRO V05.04  Tuesday 10-May-88 15:43  Page 5-2
RELOCATE -11 HOME BLOCK

    207	000654	103411 				BLO	FINE		;YES-- OK
    208	000656	101004 				BHI	60$		;NO-- ERROR
    209	000660	026367 	000002 	177522 		CMP	2(R3),WKAREA+6	;STILL IN LOW PART?
    210	000666	103404 				BLO	FINE		;YES-- ALL OK
    211	000670	012700 	000125'		60$:	MOV	#ERMSG3,R0	;AREA IS < 400
    212	000674	000167 	000000G		ERROR:	JMP	$INIER		;RSX20F SYSTEM AREA TOO SMALL
    213					;
    214	000700	005067 	000000G		FINE:	CLR	$INDXF		;CLEAR DEFAULT POINTER SET BY
    215	000704	005067 	000002G			CLR	$INDXF+2	;COMMAND PARSER (INIPAR)
    216	000710	012704 	000000G			MOV	#$INDXF,R4	;GET INDEX FILE POINTER
    217	000714	066364 	000002 	000002 		ADD	2(R3),2(R4)	;RELOCATE INDEX FILE HEADER TO
    218	000722	005514 				ADC	(R4)		;RSX20F FILE-11 AREA
    219	000724	061314 				ADD	(R3),(R4)	;ADD HIGH ORDER 8-BIT
    220	000726	062764 	000001 	000002 		ADD	#1,2(R4)	;NEXT LBN IS FOR INDEX BIT MAP
    221	000734	105514 				ADCB	(R4)		;ADD OVERFLOW
    222	000736	016767 	000000G	000000G		MOV	$INDXF,$MFD
    223	000744	016767 	000002G	000002G		MOV	$INDXF+2,$MFD+2	;MAKE SURE MFD IS IN RSX20F AREA
    224	000752	016767 	000000G	000000G		MOV	$INDXF,$SBMAP
    225	000760	016767 	000002G	000002G		MOV	$INDXF+2,$SBMAP+2 ;SO IS STORAGE BITMAP FILE
    226					;
    227						.SBTTL	RECALCULATE VOLUME SIZE
    228					;
    229	000766	012703 	000406'			MOV	#WKAREA+4,R3	;GET LOW PART HOMFE1
    230	000772	016704 	000000G			MOV	$PUD,R4		;GET PUD
    231	000776	126413 	000000G			CMPB	U.LBH(R4),(R3)	;COMPARE HIGH ORDER PART
    232	001002	101010 				BHI	GOOD		;MUST BE GOOD
    233	001004	103404 				BLO	BAD		;CAN'T BE GOOD
    234	001006	026463 	000000G	000002 		CMP	U.LBN(R4),2(R3)	;COMPARE LOW ORDER PART
    235	001014	101003 				BHI	GOOD		;STILL GOOD
    236	001016	012700 	000260'		BAD:	MOV	#ERMSG5,R0	;RSX20F FILE SYSTEM TOO BIG!
    237	001022	000724 				BR	ERROR
    238	001024	012367 	000012G		GOOD:	MOV	(R3)+,$IDVTP+12	;USE AS HIGH ORDER PART OF MAX
    239	001030	011367 	000014G			MOV	(R3),$IDVTP+14	;USE AS LOW ORDER PART OF MAX
    240	001034					RETURN
INI20F - INITVOL RSX20F FILES-1	MACRO V05.04  Tuesday 10-May-88 15:43  Page 6
SECOND ENTRY -- MARK BITMAP

    242						.SBTTL	SECOND ENTRY -- MARK BITMAP
    243					;
    244					;
    245					;	2ND ENTRY:
    246					;
    247					;	CALL	$IN11 (FROM INIROT)
    248					;
    249					;	RETURN:
    250					;
    251					;	ROUTINE RETURNS TO THE INSTRUCTION FOLLOWING THE CALL
    252					;
    253					;
    254						.SBTTL	MARK OFF THE LOWER PART OF DISK
    255					;
    256	001036	005767 	177350 		$IN11::	TST	FLAG		;FLAG SET ?
    257	001042	001076 				BNE	90$		;YES, JUST EXIT
    258	001044	012703 	000404'			MOV	#WKAREA+2,R3	;GET LOW PART DISK ADDRESS
    259	001050	011301 				MOV	(R3),R1		; . .
    260	001052	014300 				MOV	-(R3),R0	; AND HIGH PART
    261	001054	001003 				BNE	10$		;NON-ZERO-- GO ON TO MARK
    262	001056	020127 	000001 			CMP	R1,#1		;ZERO OR ONE?
    263	001062	101466 				BLOS	90$		;YES-- DON'T MARK ANYTHING
    264	001064				10$:
    265	001064	012702 	010000 			MOV	#16.*256.,R2	;GET # BITS IN BLOCK
    266	001070					CALL	DIVIDE		;COMPUTE # BLOCKS WITH ALL ZEROS
    267	001074	005701 				TST	R1		;ANY BLOCKS TO ZERO?
    268	001076	001432 				BEQ	30$		;NO-- SKIP THIS
    269	001100	012703 	000000G			MOV	#$WBUF,R3	;GET SCRATCH BUFFER ADDRESS
    270	001104	010367 	000014G			MOV	R3,$INDPB+14	;SET THE ADDRESS
    271	001110	012704 	000400 			MOV	#256.,R4	;SET WORD COUNT TO CLEAR
    272	001114				15$:
    273	001114	005023 				CLR	(R3)+		;CLEAR A WORD
    274	001116	077402 				SOB	R4,15$		;CLEAR BUFFER (MARK ALL BLOCKS "IN USE")
    275	001120	012704 	000022G			MOV	#$INDPB+22,R4	;GET BLOCK # AREA FOR QIO
    276	001124	016714 	000000G			MOV	$SBMAP+0,(R4)	;SET HIGH LBN TO STORAGE BIT MAP ADDRESS
    277	001130	016764 	000002G	000002 		MOV	$SBMAP+2,2(R4)	; ALSO LOW PART
    278	001136				20$:
    279	001136	062764 	000001 	000002 		ADD	#1,2(R4)	;BUMP TO NEXT BLOCK IN STORAGE BIT MAP
    280	001144	005514 				ADC	(R4)		; . .
    281	001146					CALL	DVQIOW		;WRITE BLOCK OF ZEROS (ALL "IN USE")
    282	001152	103003 				BCC	25$		;OK-- GO ON
    283	001154	012700 	000342'			MOV	#ERMSG6,R0	;ERROR-- TELL PEOPLE
    284	001160	000645 				BR	ERROR		; . .
    285					;
    286	001162				25$:
    287	001162	077113 				SOB	R1,20$		;LOOP TO ZERO THESE BLOCKS
    288	001164				30$:
    289	001164	010201 				MOV	R2,R1		;GET REMAINDER (# BLOCKS LEFT TO MARK "IN USE")
    290	001166	012702 	000402'			MOV	#WKAREA,R2	;POINT TO BLOCK # WORDS FOR "BITMAP"
    291	001172	042762 	007777 	000002 		BIC	#<16.*256.>-1,2(R2) ;TRIM TO LAST BLOCK ADDRESS
    292	001200				40$:
    293	001200	010103 				MOV	R1,R3		;COPY CURRENT BLOCK COUNT
    294	001202	001416 				BEQ	90$		;ALL DONE-- GIVE UP
    295	001204	020327 	000377 			CMP	R3,#256.-1	;MORE THAN ONE "BITMAP"'S WORTH LEFT?
    296	001210	101402 				BLOS	50$		;NO-- USE WHAT WE HAVE
    297	001212	012703 	000377 			MOV	#256.-1,R3	;YES-- USE JUST 256.-1 BLOCKS
    298	001216				50$:
INI20F - INITVOL RSX20F FILES-1	MACRO V05.04  Tuesday 10-May-88 15:43  Page 6-1
MARK OFF THE LOWER PART OF DISK

    299	001216	110362 	000001 			MOVB	R3,1(R2)	;STORE BLOCK COUNT FOR "BITMAP"
    300	001222					CALL	BITMAP		;MARK THESE BLOCKS IN USE
    301	001226	060362 	000002 			ADD	R3,2(R2)	;BUMP TO NEXT SET OF BLOCKS
    302	001232	105512 				ADCB	(R2)		; . .
    303	001234	160301 				SUB	R3,R1		;DECREMENT BLOCKS LEFT
    304	001236	003360 				BGT	40$		;BACK FOR MORE
    305	001240				90$:
    306	001240					RETURN			;ALL DONE WITH $IN11
    307					;
    308					;
    309					;
    310		000001 				.END
INI20F - INITVOL RSX20F FILES-1	MACRO V05.04  Tuesday 10-May-88 15:43  Page 6-2
Symbol table

BAD     001016R  	ERMSG5  000260R  	HMBK01= 000001   	R$$20F= 000001   	$INIER= ****** GX
BITMAP= ****** GX	ERMSG6  000342R  	HMBK10= 000012   	U.LBH = ****** GX	$IN10   000414RG
DIVIDE= ****** GX	ERROR   000674R  	HOMFE0= 000061   	U.LBN = ****** GX	$IN11   001036RG
DVQIOR= ****** GX	E$$MSG= 000001   	HOMFE1= 000062   	WKAREA  000402R  	$MFD  = ****** GX
DVQIOW= ****** GX	E$$TRP= 000001   	KY.FUL= ****** GX	$HMBLK= ****** GX	$PUD  = ****** GX
ERMSG1  000000R  	FINE    000700R  	M$$HDR= 000001   	$IDVTP= ****** GX	$SBMAP= ****** GX
ERMSG2  000064R  	FLAG    000412R  	RELOCT  000604R  	$IKEY = ****** GX	$WBUF = ****** GX
ERMSG3  000125R  	F$$LVL= 000001   	R$$10F= 000001   	$INDPB= ****** GX	$$    = 000067
ERMSG4  000217R  	GOOD    001024R  	R$$11D= 000001   	$INDXF= ****** GX

. ABS.	000000    000	(RW,I,GBL,ABS,OVR)
      	001242    001	(RW,I,LCL,REL,CON)
Errors detected:  0

*** Assembler statistics


Work  file  reads: 0
Work  file writes: 0
Size of work file: 8654 Words  ( 34 Pages)
Size of core pool: 9188 Words  ( 35 Pages)
Operating  system: RSX-11M/PLUS

Elapsed time: 00:00:11.45
[53,10]INI20F,[53,20]INI20F/-SP/CR=[53,30]RSXDC,INI20F
INI20F     CREATED BY  MACRO  ON 10-MAY-88 AT 15:43	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF   04.00 

SYMBOL	VALUE		REFERENCES

BAD   	  001016 R	 5-233     #5-236     
BITMAP	= ******  GX	 6-300      6-300     
DIVIDE	= ******  GX	 6-266      6-266     
DVQIOR	= ******  GX	 5-158      5-158     
DVQIOW	= ******  GX	 6-281      6-281     
ERMSG1	  000000 R	#4-68       5-179     
ERMSG2	  000064 R	#4-69       5-170     
ERMSG3	  000125 R	#4-70       5-211     
ERMSG4	  000217 R	#4-71       5-167     
ERMSG5	  000260 R	#4-72       5-236     
ERMSG6	  000342 R	#4-73       6-283     
ERROR 	  000674 R	 5-168      5-171      5-180     #5-212      5-237      6-284     
E$$MSG	= 000001	#1-33      
E$$TRP	= 000001	#1-32      
FINE  	  000700 R	 5-207      5-210     #5-214     
FLAG  	  000412 R	#4-91      *5-147     *5-152      6-256     
F$$LVL	= 000001	#1-28      
GOOD  	  001024 R	 5-232      5-235     #5-238     
HMBK01	= 000001	#4-59       5-157     
HMBK10	= 000012	#4-60       5-162      5-164     
HOMFE0	= 000061	#4-61       5-175     
HOMFE1	= 000062	#4-62      
KY.FUL	= ******  GX	 5-148     
M$$HDR	= 000001	#1-34      
RELOCT	  000604 R	#5-193     
R$$10F	= 000001	#1-30      
R$$11D	= 000001	#1-29      
R$$20F	= 000001	#1-31      
S$$YDF	= ******	 1-1        1-37      
U.LBH 	= ******  GX	 5-231     
U.LBN 	= ******  GX	 5-234     
WKAREA	  000402 R	#4-79       5-176     *5-183      5-200      5-203      5-206      5-209      5-229      6-258     
                         6-290     
$HMBLK	= ******  GX	 5-193     
$IDVTP	= ******  GX	 5-150     *5-238     *5-239     
$IKEY 	= ******  GX	 5-148     
$INDPB	= ******  GX	*5-154      5-155      5-162     *5-164     *6-270      6-275     
$INDXF	= ******  GX	*5-214     *5-215      5-216      5-222      5-223      5-224      5-225     
$INIER	= ******  GX	 5-212     
$IN10 	  000414 RG	#5-147     
$IN11 	  001036 RG	#6-256     
$MFD  	= ******  GX	*5-222     *5-223     
$PUD  	= ******  GX	 5-230     
$SBMAP	= ******  GX	*5-224     *5-225      6-276      6-277     
$WBUF 	= ******  GX	 5-154      5-160      5-175      6-269     
$$    	= 000067	#5-158      5-158     #6-266      6-266     #6-281      6-281     #6-300      6-300     
INI20F     CREATED BY  MACRO  ON 10-MAY-88 AT 15:43	PAGE 2

MACRO CROSS REFERENCE                                   CREF   04.00 

MACRO NAME	REFERENCES

CALL  		#4-53       5-158      6-266      6-281      6-300     
DIR$  		#4-53      
QIOSY$		#4-53      
QIOW$ 		#4-53      
RETURN		#4-53       5-153      5-240      6-306     
.TPARS - TABLE DRIVEN FINITE ST	MACRO M1113  14-APR-81 11:15
TABLE OF CONTENTS

     3-    5	TITLE PAGE
     4-   29	MACRO DEFINITIONS
     4-   64	IMPURE DATA
     5-   80	MAIN ROUTINE BODY
     6-  202	COMPLEX TYPE ROUTINES
     7-  281	GET STRING ROUTINE
.TPARS - TABLE DRIVEN FINITE ST	MACRO M1113  14-APR-81 11:15  PAGE 3


      1					.TITLE	.TPARS - TABLE DRIVEN FINITE STATE PARSER
      2
      3					.IDENT	"V0112"
      4
      5					.SBTTL	TITLE PAGE
      6
      7					;                             COPYRIGHT (C) 1975, 1978 BY
      8					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      9					;
     10					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
     11					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     12					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     13					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     14					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     15					;
     16					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     17					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     18					;       CORPORATION.
     19					;
     20					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     21					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     22					;
     23					;
     24					; ANDREW C. GOLDSTEIN  5 MAR 75  20:51
     25
     26
     27		000000 				R$$EIS = 0		; USE EIS
.TPARS - TABLE DRIVEN FINITE ST	MACRO M1113  14-APR-81 11:15  PAGE 4
MACRO DEFINITIONS

     29					.SBTTL	MACRO DEFINITIONS
     30
     31						.MCALL	CALL,RETURN
     32
     33					; INTERNAL MACROS
     34
     35					.MACRO	PUSH	LIST
     36						.IRP	RX,<LIST>
     37						MOV	RX,-(SP)
     38						.ENDM
     39					.ENDM	PUSH
     40
     41					.MACRO	POP	LIST
     42						.IRP	RX,<LIST>
     43						MOV	(SP)+,RX
     44						.ENDM
     45					.ENDM	POP
     46
     47					; MACRO TO DO SOB'S ON SMALL MACHINES
     48
     49						.IF	NDF	R$$EIS
     50					.MACRO	SOB	RX,LABEL
     51						DEC	RX
     52						BNE	LABEL
     53					.ENDM	SOB
     54						.ENDC
     55
     56					; RANDOM CHARACTERS
     57
     58		000011 			TAB=	11
     59		000015 			CR=	15
     60		000033 			AM=	33
     61		000040 			SPA=	40
     62
     63
     64					.SBTTL	IMPURE DATA
     65
     66	000000					.PSECT	IMPURE,D
     67
     68					; ITEMS OF INTEREST TO ACTION ROUTINES AND THE OUTSIDE WORLD
     69					; IN GENERAL.
     70
     71	000000				.PSTCN::.BLKW	1		; CHARACTER COUNT OF FOUND STRING
     72	000002				.PSTPT::.BLKW	1		; POINTER TO FOUND STRING
     73
     74	000004				.PNUMH::.BLKW	1		; HIGH ORDER VALUE AND ....
     75	000006				.PNUMB::.BLKW	1		; LOW ORDER VALUE OF FOUND NUMBER
     76	000010				.PCHAR::.BLKW	1		; FOUND CHARACTER
     77
     78	000000					.PSECT
.TPARS - TABLE DRIVEN FINITE ST	MACRO M1113  14-APR-81 11:15  PAGE 5
MAIN ROUTINE BODY

     80					.SBTTL	MAIN ROUTINE BODY
     81
     82					;+
     83					;
     84					; *** - .TPARS
     85					;
     86					; ENTRY:	CALL	.TPARS
     87					;
     88					; INPUTS:
     89					;
     90					;	R1 = 0	IGNORE ALL SPACES BETWEEN SYNTACTIC ELEMENTS
     91					;	  >< 0	TREAT SPACES AS SIGNIFICANT CHARACTERS
     92					;	R2 =	POINTER TO KEYWORD TABLE
     93					;	R3 =	LENGTH OF COMMAND STRING
     94					;	R4 =	ADDRESS OF COMMAND STRING
     95					;	R5 =	INITIAL STATE POINTER
     96					;
     97					; OUTPUTS:
     98					;
     99					;	C = 0	SUCCESSFUL PARSE
    100					;	C = 1	SYNTAX OR STATE TABLE ERROR
    101					;	R3 =	NUMBER OF CHARACTERS NOT SCANNED
    102					;	R4 =	POINTER TO UNSCANNED PART OF COMMAND STRING
    103					;
    104					;	ALL OTHER REGISTERS ARE PRESERVED.
    105					;
    106					; .TPARS PARSES THE COMMAND STRING ACCORDING TO THE FINITE
    107					; STATE MACHINE REPRESENTED IN THE STATE AND KEYWORD TABLES
    108					; SUPPLIED BY THE CALLER. USER SUPPLIED ACTION ROUTINES ARE
    109					; CALLED AS SPECIFIED.
    110					;
    111					;-
    112
    113
    114	000000				.TPARS::
    115	000000					PUSH	<R0,R5,R2,R1>	; SAVE REGISTERS
    116
    117					; ENTER THE STATE SPECIFIED IN R5 AND
    118					; EVALUATE POSSIBLE STATE TRANSITIONS
    119
    120	000010	005067 	000000'		TSTAT:	CLR	.PSTCN		; KILL ANY OLD STRING
    121	000014	005716 				TST	(SP)		; CHECK SPACE FLUSH FLAG
    122	000016	001002 				BNE	10$
    123	000020					CALL	GETSP		; EAT SPACES IF FLAG IS ZERO
    124	000024	112500 			10$:	MOVB	(R5)+,R0	; GET TYPE BYTE
    125	000026	002044 				BGE	TSCHAR		; BIT 7 = 0 - MATCH SPECIFIED CHAR
    126	000030	120027 	000300 			CMPB	R0,#300
    127	000034	002573 				BLT	DOKEY		; 200 - 277 - MATCH KEYWORD
    128	000036	120027 	000320 			CMPB	R0,#MAXTYP	; CHECK TYPE CODE FOR LEGALITY
    129	000042	003034 				BGT	SYNERR		; TOO HIGH - OUT
    130	000044	010701 				MOV	PC,R1		; GARBAGE R1 FOR USE AS A FLAG
    131	000046	042700 	177700 			BIC	#^C77,R0	; RETAIN ONLY THE TYPE INDEX
    132	000052	060007 				ADD	R0,PC		; AND DISPATCH ON IT
    133	000054	000440 				BR	DOLAMB		; $LAMDA = 300 - MATCH EMPTY
    134	000056	000510 				BR	DONUMB		; $NUMBR = 302 - MATCH NUMBER
    135	000060	000503 				BR	DOSTRG		; $STRNG = 304 - MATCH ANY STRING
    136	000062	000553 				BR	DOBLNK		; $BLANK = 306 - MATCH ANY SET OF BLANKS
.TPARS - TABLE DRIVEN FINITE ST	MACRO M1113  14-APR-81 11:15  PAGE 5-1
MAIN ROUTINE BODY

    137	000064	000455 				BR	DOSUBR		; $SUBXP = 310 - MATCH A SUBEXPRESSION
    138	000066	000403 				BR	DOENDS		; $EOS   = 312 - MATCH END OF STRING
    139	000070	000502 				BR	DODNMB		; $DNUMB = 314 - MATCH DECIMAL NUMBER
    140	000072	000475 				BR	DORD50		; $RAD50 = 316 - MATCH RAD-50 STRING
    141	000074	000423 				BR	DOCHAR		; $ANY   = 320 - MATCH ANY CHARACTER
    142
    143					; NOTE - IT IS CRITICAL THAT R0 AND R1 BE NON-ZERO AT THE DISPATCH
    144
    145		000320 				MAXTYP = 320
    146
    147					; CHECK FOR END OF STRING
    148
    149	000076	005703 			DOENDS:	TST	R3		; CHECK CHAR COUNT
    150	000100	001426 				BEQ	DOTRAN		; YES
    151
    152					; TYPE MATCH FAILED - TRY NEXT ENTRY IN TRANSITION TABLE
    153
    154	000102	066703 	000000'		NXTRAN:	ADD	.PSTCN,R3	; RETURN ANY STRING
    155	000106	166704 	000000'			SUB	.PSTCN,R4	; TO THE COMMAND LINE
    156	000112	112500 				MOVB	(R5)+,R0	; GET FLAGS BYTE
    157	000114	002407 				BLT	SYNERR		; THIS WAS LAST TRANSITION - YOU LOSE
    158	000116	012701 	000003 			MOV	#3,R1		; COUNT OF FLAG BITS TO TEST
    159	000122	006000 			20$:	ROR	R0		; CHECK FLAG BIT
    160	000124	103001 				BCC	30$
    161	000126	005725 				TST	(R5)+		; SKIP POINTER WORD
    162	000130	077104 			30$:	SOB	R1,20$		; COUNT BITS
    163	000132	000726 				BR	TSTAT		; TRY NEXT TRANSITION
    164
    165					; OUT OF TRANSITION TABLE ENTRIES, OR SOME OTHER ANOMALY,
    166					; LIKE A BAD TYPE CODE. ALL ARE SYNTAX ERRORS.
    167
    168	000134	000261 			SYNERR:	SEC			; SAY SO
    169	000136	000423 				BR	EXIT		; AND QUIT
    170
    171					; TEST FOR SPECIFIED CHARACTER
    172
    173	000140	120014 			TSCHAR:	CMPB	R0,(R4)		; CHECK CHAR IN COMMAND STRING
    174	000142	001357 				BNE	NXTRAN		; IF NO MATCH, TRY ANOTHER TRANSITION
    175
    176					; GOBBLE A CHARACTER AND DO THE TRANSITION
    177
    178	000144	005703 			DOCHAR:	TST	R3		; CHECK FOR END OF STRING
    179	000146	003755 				BLE	NXTRAN		; IF YES, DON'T TRY THIS
    180	000150	112467 	000010'			MOVB	(R4)+,.PCHAR	; SAVE CHAR FOR ACTION ROUTINE
    181	000154	005303 				DEC	R3		; COUNT IT
    182
    183					; DO THE STATE TRANSITION
    184
    185	000156				DOLAMB:
    186	000156	112500 			DOTRAN:	MOVB	(R5)+,R0	; GET FLAGS BYTE
    187	000160	006000 				ROR	R0		; CHECK EXTENSION BIT
    188	000162	103001 				BCC	40$
    189	000164	005725 				TST	(R5)+		; SKIP EXTENSION WORD
    190	000166	006000 			40$:	ROR	R0		; CHECK ACTION BIT
    191	000170	103001 				BCC	50$
    192	000172					CALL	@(R5)+		; CALL ACTION ROUTINE
    193	000174	006000 			50$:	ROR	R0		; CHECK EXPLICIT TRANSITION BIT
.TPARS - TABLE DRIVEN FINITE ST	MACRO M1113  14-APR-81 11:15  PAGE 5-2
MAIN ROUTINE BODY

    194	000176	103304 				BCC	TSTAT
    195	000200	012505 				MOV	(R5)+,R5	; POINT TO NEXT STATE
    196	000202	001302 			60$:	BNE	TSTAT		; PROCESS NEXT STATE
    197	000204	000257 				CCC			; STATE NUMBER OF ZERO MEANS STOP
    198
    199	000206				EXIT:	POP	<R1,R2,R5,R0>	; RESTORE ALL THE REGISTERS
    200	000216					RETURN
.TPARS - TABLE DRIVEN FINITE ST	MACRO M1113  14-APR-81 11:15  PAGE 6
COMPLEX TYPE ROUTINES

    202					.SBTTL	COMPLEX TYPE ROUTINES
    203
    204					; SUB EXPRESSION TYPE - CALL ONESELF RECURSIVELY
    205
    206	000220	011601 			DOSUBR:	MOV	(SP),R1		; SET SPACE FLUSH FLAG
    207	000222	016602 	000002 			MOV	2(SP),R2	; SET KEYWORD TABLE POINTER
    208	000226					PUSH	<R3,R4>		; SAVE STRING POINTERS FOR UNWIND
    209	000232	010500 				MOV	R5,R0		; SAVE STATE TABLE POINTER
    210	000234	016505 	000001 			MOV	1(R5),R5	; GET STARTING STATE
    211	000240					CALL	.TPARS		; AND TRY TO PARSE SUBEXPRESSION
    212	000244	010005 				MOV	R0,R5		; RESTORE STATE POINTER
    213	000246	103402 				BCS	10$		; CHECK FOR SUCCESS
    214	000250	022626 				CMP	(SP)+,(SP)+	; THROW AWAY STRING POINTER SAVE
    215	000252	000741 				BR	DOTRAN		; AND TAKE THE TRANSITION
    216
    217	000254	005067 	000000'		10$:	CLR	.PSTCN		; FLUSH ANY STRINGS FOUND
    218	000260					POP	<R4,R3>		; RESTORE STRING POINTERS
    219	000264	000706 				BR	NXTRAN		; AND TRY SOMETHING ELSE
    220
    221					; MATCH ANY ALPHANUMERIC STRING
    222
    223	000266	005000 			DORD50:	CLR	R0		; SET RAD-50 FLAG
    224	000270				DOSTRG:	CALL	GETSTR		; JUST DRAG IN THE STRING
    225	000274	000730 				BR	DOTRAN
    226
    227					; MATCH ANY NUMBER
    228
    229	000276	005001 			DODNMB:	CLR	R1		; SET DECIMAL MODE
    230	000300				DONUMB:	CALL	GETSTR		; GET A STRING
    231	000304	005767 	000000'			TST	.PSTCN		; CHECK STRING LENGTH
    232	000310	001674 				BEQ	NXTRAN		; COME ON, AT LEAST ONE DIGIT
    233	000312	005701 				TST	R1		; CHECK MODE
    234	000314	001411 				BEQ	20$		; DECIMAL - DON'T LOOK FOR TRAILING DOT
    235	000316	005703 				TST	R3		; SEE IF WE'RE AT END OF STRING
    236	000320	003407 				BLE	20$		; YES
    237	000322	121427 	000056 			CMPB	(R4),#'.	; CHECK FOR TRAILING DECIMAL
    238	000326	001004 				BNE	20$		; NO
    239	000330	005204 				INC	R4		; YES - INCLUDE IN NUMBER STRING
    240	000332	005303 				DEC	R3
    241	000334	005267 	000000'			INC	.PSTCN		; BUMP STRING COUNT
    242	000340				20$:	PUSH	<R3,R4,R5>	; SAVE REGISTERS
    243	000346	016705 	000002'			MOV	.PSTPT,R5	; GET STRING POINTER
    244	000352	016704 	000000'			MOV	.PSTCN,R4	; AND STRING COUNT
    245	000356	012703 	000004'			MOV	#.PNUMH,R3	; POINT TO DOUBLE WORD FOR NUMBER
    246	000362	005701 				TST	R1		; CHECK IF OCTAL OR DECIMAL
    247	000364	001003 				BNE	30$		; OCTAL
    248	000366					CALL	.DD2CT		; DECIMAL
    249	000372	000402 				BR	40$
    250	000374				30$:	CALL	.OD2CT		; DO OCTAL/DECIMAL CONVERT
    251	000400				40$:	POP	<R5,R4,R3>	; RESTORE REGISTERS
    252	000406	103635 				BCS	NXTRAN		; IF ERRORS, FORGET IT
    253	000410	000662 				BR	DOTRAN		; ELSE JUST DO TRANSITION
    254
    255					; MATCH ANY NON-EMPTY STRING OF SPACES OF TABS
    256
    257	000412				DOBLNK:	CALL	GETSP		; LOOK FOR SPACES
    258	000416	005702 				TST	R2		; CHECK NUMBER FOUND
.TPARS - TABLE DRIVEN FINITE ST	MACRO M1113  14-APR-81 11:15  PAGE 6-1
COMPLEX TYPE ROUTINES

    259	000420	001630 				BEQ	NXTRAN		; NO BLANKS - TRY SOMETHING ELSE
    260	000422	000655 				BR	DOTRAN		; YES - DO IT
    261
    262					; MATCH SPECIFIED KEYWORD
    263
    264	000424				DOKEY:	CALL	GETSTR		; GET ALPHA STRING
    265	000430	042700 	177700 			BIC	#^C77,R0	; GET KEYWORD INDEX
    266	000434	006300 				ASL	R0		; CONVERT TO OFFSET
    267	000436	006300 				ASL	R0
    268	000440	006300 				ASL	R0
    269	000442	066600 	000002 			ADD	2(SP),R0	; INDEX INTO KEYWORD TABLE
    270	000446	016701 	000000'			MOV	.PSTCN,R1	; GET STRING DESCRIPTOR
    271	000452	001613 				BEQ	NXTRAN		; DON'T TRY TO MATCH NULL STRING
    272	000454	016702 	000002'			MOV	.PSTPT,R2
    273
    274	000460	122022 			50$:	CMPB	(R0)+,(R2)+	; COMPARE TO KEYWORD
    275	000462	001207 				BNE	NXTRAN		; OUT ON MISMATCH
    276	000464	077103 				SOB	R1,50$		; COUNT CHARS AND LOOP
    277	000466	121027 	000377 			CMPB	(R0),#377	; CHECK FOR KEYWORD TERMINATOR
    278	000472	001203 				BNE	NXTRAN		; STRING WAS SUBSET - NO
    279	000474	000630 				BR	DOTRAN		; MATCH
.TPARS - TABLE DRIVEN FINITE ST	MACRO M1113  14-APR-81 11:15  PAGE 7
GET STRING ROUTINE

    281					.SBTTL	GET STRING ROUTINE
    282
    283					; THIS ROUTINE POINTS THE STRING DESCRIPTOR AT THE ALPHA-NUMERIC
    284					; STRING AT THE CURRENT POSITION IN THE COMMAND LINE.
    285
    286	000476	010467 	000002'		GETSTR:	MOV	R4,.PSTPT	; INIT STRING POINTER
    287	000502	005067 	000000'			CLR	.PSTCN		; AND COUNT
    288	000506	005703 				TST	R3		; CHECK FOR END OF STRING
    289	000510	003414 				BLE	20$		; IF YES, DON'T TRY THIS
    290
    291	000512	121427 	000060 		10$:	CMPB	(R4),#'0	; CHECK NEXT CHAR IN COMMAND LINE
    292	000516	002411 				BLT	20$		; LESS THAN "0" - OUT
    293	000520	121427 	000071 			CMPB	(R4),#'9
    294	000524	003416 				BLE	30$		; LESS THAN "9" - OK
    295	000526	121427 	000101 			CMPB	(R4),#'A
    296	000532	002403 				BLT	20$		; LESS THAN "A" - OUT
    297	000534	121427 	000132 			CMPB	(R4),#'Z
    298	000540	003410 				BLE	30$		; LESS THAN "Z" - OK
    299	000542	005700 			20$:	TST	R0		; SEE IF RAD-50 MODE
    300	000544	001012 				BNE	40$		; NO
    301	000546	121427 	000056 			CMPB	(R4),#'.	; CHECK FOR "."
    302	000552	001403 				BEQ	30$
    303	000554	121427 	000044 			CMPB	(R4),#'$	; CHECK FOR "$"
    304	000560	001004 				BNE	40$
    305	000562	005267 	000000'		30$:	INC	.PSTCN		; GOOD CHAR - BUMP COUNT
    306	000566	005204 				INC	R4		; GOBBLE THE CHAR
    307	000570	077330 				SOB	R3,10$		; COUNT IT AND LOOP
    308	000572				40$:	RETURN			; END OF LINE OR NON-ALPHA NUMERIC
    309
    310
    311					; THIS ROUTINE FINDS AND PASSES OVER BLANKS AND TABS AT THE CURRENT
    312					; POSITION IN THE COMMAND LINE.
    313
    314	000574	005002 			GETSP:	CLR	R2		; ZERO CHAR COUNT
    315	000576	005703 				TST	R3		; CHECK FOR END OF STRING
    316	000600	003411 				BLE	70$		; IF YES, DON'T TRY THIS
    317	000602	121427 	000040 		50$:	CMPB	(R4),#SPA	; TEST FOR SPACE IN COMMAND LINE
    318	000606	001403 				BEQ	60$
    319	000610	121427 	000011 			CMPB	(R4),#TAB	; TEST FOR TAB
    320	000614	001003 				BNE	70$
    321	000616	005202 			60$:	INC	R2		; BLANK OR TAB FOUND - BUMP COUNT
    322	000620	005204 				INC	R4		; BUMP STRING POINTER
    323	000622	077311 				SOB	R3,50$		; COUNT CHARS AND LOOP
    324	000624				70$:	RETURN
    325
    326
    327
    328		000001 				.END
.TPARS - TABLE DRIVEN FINITE ST	MACRO M1113  14-APR-81 11:15  PAGE 7-1
SYMBOL TABLE

AM    = 000033   	DONUMB  000300R  	F$$LVL= 000001   	R$$11D= 000001   	.DD2CT= ****** GX
CR    = 000015   	DORD50  000266R  	GETSP   000574R  	R$$20F= 000001   	.OD2CT= ****** GX
DOBLNK  000412R  	DOSTRG  000270R  	GETSTR  000476R  	SPA   = 000040   	.PCHAR  000010RG    002
DOCHAR  000144R  	DOSUBR  000220R  	MAXTYP= 000320   	SYNERR  000134R  	.PNUMB  000006RG    002
DODNMB  000276R  	DOTRAN  000156R  	M$$HDR= 000001   	TAB   = 000011   	.PNUMH  000004RG    002
DOENDS  000076R  	EXIT    000206R  	NXTRAN  000102R  	TSCHAR  000140R  	.PSTCN  000000RG    002
DOKEY   000424R  	E$$MSG= 000001   	R$$EIS= 000000   	TSTAT   000010R  	.PSTPT  000002RG    002
DOLAMB  000156R  	E$$TRP= 000001   	R$$10F= 000001   	$$    = 000067   	.TPARS  000000RG

. ABS.	000000	   000
      	000626	   001
IMPURE	000012	   002
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  562 WORDS  ( 3 PAGES)
DYNAMIC MEMORY:  2518 WORDS  ( 9 PAGES)
ELAPSED TIME:  00:00:08
[53,10]TPARS,[53,20]TPARS/-SP/CR=[53,30]RSXDC,TPARS
TPARS      CREATED BY  MACRO  ON 14-APR-81 AT 11:15	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

AM    	= 000033	#4-60      
CR    	= 000015	#4-59      
DOBLNK	  000412 R	 5-136     #6-257     
DOCHAR	  000144 R	 5-141     #5-178     
DODNMB	  000276 R	 5-139     #6-229     
DOENDS	  000076 R	 5-138     #5-149     
DOKEY 	  000424 R	 5-127     #6-264     
DOLAMB	  000156 R	 5-133     #5-185     
DONUMB	  000300 R	 5-134     #6-230     
DORD50	  000266 R	 5-140     #6-223     
DOSTRG	  000270 R	 5-135     #6-224     
DOSUBR	  000220 R	 5-137     #6-206     
DOTRAN	  000156 R	 5-150     #5-186      6-215      6-225      6-253      6-260      6-279     
EXIT  	  000206 R	 5-169     #5-199     
E$$MSG	= 000001	#1-33      
E$$TRP	= 000001	#1-32      
F$$LVL	= 000001	#1-28      
GETSP 	  000574 R	 5-123      5-123      6-257      6-257     #7-314     
GETSTR	  000476 R	 6-224      6-224      6-230      6-230      6-264      6-264     #7-286     
MAXTYP	= 000320	 5-128     #5-145     
M$$HDR	= 000001	#1-34      
NXTRAN	  000102 R	#5-154      5-174      5-179      6-219      6-232      6-252      6-259      6-271      6-275     
                         6-278     
R$$EIS	= 000000	#3-27       4-49      
R$$10F	= 000001	#1-30      
R$$11D	= 000001	#1-29      
R$$20F	= 000001	#1-31      
SPA   	= 000040	#4-61       7-317     
SYNERR	  000134 R	 5-129      5-157     #5-168     
S$$YDF	= ******	 1-1        1-37      
TAB   	= 000011	#4-58       7-319     
TSCHAR	  000140 R	 5-125     #5-173     
TSTAT 	  000010 R	#5-120      5-163      5-194      5-196     
$$    	= 000067	#5-123      5-123     #5-192      5-192     #6-211      6-211     #6-224      6-224     #6-230     
                         6-230     #6-248      6-248     #6-250      6-250     #6-257      6-257     #6-264      6-264     
.DD2CT	= ******  GX	 6-248      6-248     
.OD2CT	= ******  GX	 6-250      6-250     
.PCHAR	  000010 RG	#4-76      *5-180     
.PNUMB	  000006 RG	#4-75      
.PNUMH	  000004 RG	#4-74       6-245     
.PSTCN	  000000 RG	#4-71      *5-120      5-154      5-155     *6-217      6-231     *6-241      6-244      6-270     
                        *7-287     *7-305     
.PSTPT	  000002 RG	#4-72       6-243      6-272     *7-286     
.TPARS	  000000 RG	#5-114      6-211      6-211     
TPARS      CREATED BY  MACRO  ON 14-APR-81 AT 11:15	PAGE 2

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

CALL  		#4-31       5-123      5-192      6-211      6-224      6-230      6-248      6-250      6-257      6-264     
POP   		#4-41      #5-199     #6-218     #6-251     
PUSH  		#4-35      #5-115     #6-208     #6-242     
RETURN		#4-31      #5-200     #7-308     #7-324