CRFPREFIX                                                        22-AUG-1978 04:40:26   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (2)      41  DECLARATIONS

   (2)     182  DECLARATIONS

   (3)     217  CRF$OUT 

CRFOUT                                                           22-AUG-1978 04:40:26   VAX-11 MACRO X0.3-11               Page   1

X01.01          DECLARATIONS                                                                                                     (1)



                                     0000     1 	.TITLE	CRFOUT

                                     0000     2 	.IDENT	/X01.01/

                                     0000     3 

                                     0000     4 ;

                                     0000     5 ; COPYRIGHT (C) 1977,1978

                                     0000     6 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

                                     0000     7 ;

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

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

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

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

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

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

                                     0000    14 ; REMAIN IN DEC.

                                     0000    15 ;

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

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

                                     0000    18 ; CORPORATION.

                                     0000    19 ;

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

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

                                     0000    22 ;

                                     0000    23 

                                     0000    24 ;++

                                     0000    25 ; FACILITY:  CROSS REFERENCE PROGRAM

                                     0000    26 ;

                                     0000    27 ; ABSTRACT:  THIS ROUTINE EXTRACTS INFORMATION FROM THE B-TREE FOR OUTPUT.

                                     0000    28 ;

                                     0000    29 ;

                                     0000    30 ; ENVIRONMENT:  IT IS PART OF A LINKABLE IMAGE.

                                     0000    31 ;

                                     0000    32 ; AUTHOR:  K.D. MORSE, CREATION DATE:  13-MAY-77

                                     0000    33 ;

                                     0000    34 ; MODIFIED BY:

                                     0000    35 ;

                                     0000    36 ;	K.D. MORSE, 20-JUN-78, X01.01

                                     0000    37 ;	CRF$OUT IS DECLARED BY .ENTRY TO MAKE CRF A SHARABLE IMAGE.

                                     0000    38 ;

                                     0000    39 ; 01	- 

                                     0000    40 ;--

CRFOUT                                                           22-AUG-1978 04:40:26   VAX-11 MACRO X0.3-11               Page   2

X01.01          DECLARATIONS                                                                                                     (2)



                                     0000    42 	.SBTTL	DECLARATIONS

                                     0000    43 ;

                                     0000    44 ; INCLUDE FILES:

                                     0000    45 ;

                                     0000    46 

                                     0000    47 ;

                                     0000    48 ; MACROS:

                                     0000    49 ;

                                     0000    50 	$CRFDEF					; DEFINE CRF GLOBALS

                                     0000    51 

                                     0000    52 ;

                                     0000    53 ; EQUATED SYMBOLS:

                                     0000    54 ;

                                     0000    55 

                           00000020  0000    56 BLANK = 32.					; ASCII SPACE OR BLANK

                           00000084  0000    57 MAXLINWID = 132.				; MAX SIZE OF OUTPUT LINE

                                     0000    58 

                                     0000    59 ;

                                     0000    60 ; OWN STORAGE:

                                     0000    61 ;

                                     0000    62 

                                 00000000    63 	.PSECT	CRF$DATA,RD,WRT,NOEXE,NOSHR,PIC

                           00000000  0000    64 MULT_COLM_BLNKS: .LONG				; # BLANKS BETWEEN COLUMNS

                           00000000  0004    65 REFS_PER_LINE:	.LONG				; MAXIMUM # REFS/LINE

                           00000000  0008    66 DEF_LINE_LNG:	.LONG				; LENGTH OF LINE W/OUT REFS

                           00000000  000C    67 KEYS_PER_LINE: .LONG				; # KEYS/LINE

                           00000028  0010    68 HIST_LIST_TBL: .BLKL	6			; TABLE OF HISTORY LIST ADDRS

                           00000000  0028    69 KEY_VAL_SIZE:	.LONG				; LENGTH OF FIELDS KEY1-VAL2

                           00000000  002C    70 REF_SIZE:	.LONG				; SIZE OF FIELDS REF1+REF2

                           00000044  0030    71 KEY_NUM_TBL:	.BLKL	5			; HOLDS KEY # FOR HIST LIST TOP

                           000000C8  0044    72 OUTLINE:	.BLKB	MAXLINWID		; OUTPUT LINE BUFFER

                           000000D0  00C8    73 OUT_DSC:	.BLKL	2			; OUTPUT LINE STRING DESC

                                 20  00D0    74 SPACE:		.ASCII	/ /			; ASCII STRING FOR SPACE

                               0000  00D1    75 OUT_SIZE:	.WORD				; FAO RETURN LENGTH

CRFOUT                                                           22-AUG-1978 04:40:26   VAX-11 MACRO X0.3-11               Page   3

X01.01          CRF$OUT                                                                                                          (3)



                                     00D3    77 	.SBTTL	CRF$OUT 

                                     00D3    78 ;++

                                     00D3    79 ; FUNCTIONAL DESCRIPTION:

                                     00D3    80 ;

                                     00D3    81 ;	THIS ROUTINE EXTRACTS INFORMATION FROM THE B-TREE AND FORMATS

                                     00D3    82 ;	ONE OUTPUT LINE AT A TIME.  IT THEN CALLS THE USER ROUTINE TO

                                     00D3    83 ;	PRINT THAT LINE BEFORE IT FORMATS ANOTHER LINE.  THE USER MUST

                                     00D3    84 ;	HANDLE HIS OWN HEADERS, LINE COUNT PER PAGE, AND CARRIAGE-CONTROL.

                                     00D3    85 ;

                                     00D3    86 ;	KEYS MAY BE EXTRACTED FOR OUTPUT IN EITHER OF TWO WAYS.  THE

                                     00D3    87 ;	FIRST INCLUDES ONLY THE KEY AND VALUE FIELDS OF THE OUTPUT LINE,

                                     00D3    88 ;	WITH MULTIPLE KEYS PER LINE.  THIS IS REQUESTED BY SPECIFYING

                                     00D3    89 ;	MORE THAN ONE KEY PER LINE.  BY SPECIFYING THE NUMBER OF KEYS

                                     00D3    90 ;	PER LINE AS GREATER THAN ONE.  THE SECOND MODE OF OUTPUT IS A

                                     00D3    91 ;	COMPLETE CROSS REFERENCE LINE CONSISTING OF KEY, VALUE, AND

                                     00D3    92 ;	REFERENCE INDICATOR FIELDS.  THIS IS REQUESTED BY SPECIFYING

                                     00D3    93 ;	ONE AS THE NUMBER OF KEYS PER LINE.

                                     00D3    94 ;

                                     00D3    95 ;	THE LAST ARGUMENT SPECIFIES WHETHER OR NOT TO DELETE THE 

                                     00D3    96 ;	CROSS REFERENCE INFORMATION AFTER EXTRACTING THE INFORMATION.

                                     00D3    97 ;

                                     00D3    98 ; CALLING SEQUENCE:

                                     00D3    99 ;

                                     00D3   100 ;	CALLS	#7,CRF$OUT

                                     00D3   101 ;

                                     00D3   102 ; INPUT PARAMETERS:

                                     00D3   103 ;

                                     00D3   104 ;	CRF$L_OU_CTLTBL(AP) - CONTAINS THE ADDRESS OF THE OUTPUT FORMAT TABLE

                                     00D3   105 ;	CRF$L_OU_LINWID(AP) - CONTAINS THE LINE WIDTH

                                     00D3   106 ;	CRF$B_OU_PAG1(AP) - CONTAINS THE NUMBER OF LINES ON FIRST PAGE

                                     00D3   107 ;	CRF$B_OU_SUCPAG(AP) - CONTAINS THE NUMBER OF LINES ON SUCCESSIVE PAGES

                                     00D3   108 ;	CRF$B_OU_PRTIND(AP) - CONTAINS THE PRINT INDICATOR

                                     00D3   109 ;				CRF$K_VALUES - PRINT VALUES

                                     00D3   110 ;				CRF$K_DEFS_REFS - PRINT VALUES, DEFS, & REFS

                                     00D3   111 ;				CRF$K_VALS_REFS - PRINT VALUES & REFS

                                     00D3   112 ;	CRF$B_OU_SAVIND(AP) - CONTAINS THE SAVE/DELETE INDICATOR

                                     00D3   113 ;				CRF$K_SAVE - SAVE THE CRF TABLE

                                     00D3   114 ;				CRF$K_DELETE - DELETE THE CRF TABLE

                                     00D3   115 ;

                                     00D3   116 ; IMPLICIT INPUTS:

                                     00D3   117 ;

                                     00D3   118 ;	NONE

                                     00D3   119 ;

                                     00D3   120 ; OUTPUT PARAMETERS:

                                     00D3   121 ;

                                     00D3   122 ;	SIZE AND ADDRESS OF FORMATTED LINE ARE PASSED TO USER'S OUTPUT ROUTINE.

                                     00D3   123 ;

                                     00D3   124 ; IMPLICIT OUTPUTS:

                                     00D3   125 ;

                                     00D3   126 ;	CALLS THE USER ROUTINE WITH EACH OUTPUT LINE IT FORMATS.

                                     00D3   127 ;	SUCCESS:

                                     00D3   128 ;		R0 - HAS LOW BIT SET

                                     00D3   129 ;	FAILURE:

                                     00D3   130 ;		R0 - HAS LOW BIT CLEAR

                                     00D3   131 ;

                                     00D3   132 ; COMPLETION CODES:

                                     00D3   133 ;

CRFOUT                                                           22-AUG-1978 04:40:26   VAX-11 MACRO X0.3-11               Page   4

X01.01          CRF$OUT                                                                                                          (3)



                                     00D3   134 ;	R0 - CONTAINS ONE OF THE FOLLOWING:

                                     00D3   135 ;

                                     00D3   136 ;	CRF$_BLKWTHINBL - DEALLOCATE FAILURE, BLOCK WITHIN PREV DEAL BLOCK

                                     00D3   137 ;	CRF$_EXPREGFAIL - EXPAND PROGRAM REGION FAILED

                                     00D3   138 ;	CRF$_FAOFAIL - FAO CALL FAILED

                                     00D3   139 ;	CRF$_HISTOVRFLO - HISTORY LIST OVERFLOWED

                                     00D3   140 ;	CRF$_ILLBLKSIZE - ILLEGAL BLOCK SIZE ON ALLOCATE BLOCK

                                     00D3   141 ;	CRF$_LINELNG - ILLEGAL OUTPUT LINE LENGTH, >132. OR <0.

                                     00D3   142 ;	CRF$_SUCCESS - SUCCESSFULL OUTPUT STATUS CODE

                                     00D3   143 ;

                                     00D3   144 ; SIDE EFFECTS:

                                     00D3   145 ;

                                     00D3   146 ;	R1 IS WIPED OUT.

                                     00D3   147 ;

                                     00D3   148 ;--

                                     00D3   149 

                                     00D3   150 ;

                                     00D3   151 ;

                                     00D3   152 ;  INTERNAL REGISTER USAGE:

                                     00D3   153 ;

                                     00D3   154 ;	R0 - TEMPORARY ADDRESSES AND SIZES

                                     00D3   155 ;	R1 - TEMPORARY ADDRESSES AND SIZES

                                     00D3   156 ;	R2 - HIST_LIST_TBL ADDRESS, TABLE OF HISTORY LIST ADDRESSES

                                     00D3   157 ;	R3 - KEY_NUM_TBL ADDRESS, TABLE OF #'S OF FIRST KEY FROM HIST LIST

                                     00D3   158 ;	R4 - ADDRESS OF CURRENT HISTORY LIST

                                     00D3   159 ;	R5 - SEQUENTIAL NUMBER OF THE NTH KEY, I.E., N

                                     00D3   160 ;	R6 - FORMAT TABLE ADDRESS

                                     00D3   161 ;	R7 - COUNT OF UNUSED LINES ON CURRENT PAGE

                                     00D3   162 ;	R8 - MAXIMUM LENGTH OF FIELD BEING FORMATTED

                                     00D3   163 ;	R9 - SIZE OF OUTPUT LINE UNUSED

                                     00D3   164 ;      R10 - MAXIMUM LINES ON THIS PAGE

                                     00D3   165 ;      R11 - COUNT OF REFS UNUSED ON CURRENT OUTPUT LINE

                                     00D3   166 ;

                                     00D3   167 ;

                                     00D3   168 

                                     00D3   169 	.ENABL LSB

                                     00D3   170 

                                 00000000   171 	.PSECT	CRF$CODE,EXE,RD,NOWRT,SHR,PIC

                               0FFC' 0000   172 	.ENTRY	CRF$OUT, ^M<R2,R3,R4,R5,R6,R7,R8,R9,R10,R11>

       00D0'CF            01     2C  0002   173 	MOVC5	#1,W^SPACE,#BLANK,#MAXLINWID,W^OUTLINE ; BLANK FILL OUTPUT BUFFER

       0084 8F            20         0007       

                     0044'CF         000B       

            7E   00658001 8F     D0  000E   174 	MOVL	#CRF$_SUCCESS,-(SP)		; ASSUME SUCCESS

            56         04 AC     D0  0015   175 	MOVL	CRF$L_OU_CTLTBL(AP),R6		; GET OUTPUT LINE TABLE

                                     0019   176 ;

                                     0019   177 ; CHECK THE WIDTH OF THE OUTPUT LINE.

                                     0019   178 ;

            5B         08 AC     D0  0019   179 	MOVL	CRF$L_OU_LINWID(AP),R11		; GET LINE WIDTH

                          0A     12  001D   180 	BNEQ	2$				; CHECK FOR ZERO WIDTH

            50   00658092 8F     D0  001F   181 1$:	MOVL	#CRF$_LINELNG,R0		; SET ILLEGAL LINE WIDTH CODE

                          0434   31  0026   182 	BRW	ERROR_EXIT			; RETURN

   00000084 8F            5B     D1  0029   183 2$:	CMPL	R11,#MAXLINWID			; OUTPUT LINE > 132?

                          ED     1A  0030   184 	BGTRU	1$				; YES, ERROR RETURN

            50         14 A6     D0  0032   185 	MOVL	CRF$L_K1FMTBL(R6),R0		; GET KEY1 FIELD ADDR DESC

                          1D     13  0036   186 	BEQL	4$				; CHECK FOR NO TABLE DESC

                          14     11  0038   187 	BRB	3$				; BRANCH ON TABLE DESC EXISTS

                                     003A   188 ;

CRFOUT                                                           22-AUG-1978 04:40:26   VAX-11 MACRO X0.3-11               Page   5

X01.01          CRF$OUT                                                                                                          (3)



                                     003A   189 ; ROUTINE TO FIND THE MAXIMUM WIDTH OF A FIELD.

                                     003A   190 ;

                                     003A   191 ;	R0 - ADDR OF FIRST FORMAT FIELD DSC

                                     003A   192 ;	R1 - RETURNED MAXIMUM WIDTH OF FIELD.

                                     003A   193 ;

                                     003A   194 MAXLNG:

            51         03 A0     9A  003A   195 	MOVZBL	FLD$B_MAXLNG(R0),R1		; GET MAXIMUM FIELD WIDTH

            50            0C     C0  003E   196 17$:	ADDL2	#FLD$K_LENGTH,R0		; GET NEXT FIELD DESCRIPTION

                          60     B5  0041   197 	TSTW	(R0)				; NO MORE?

                          08     13  0043   198 	BEQL	18$				; NO, NONE, ALL DONE

         03 A0            51     91  0045   199 	CMPB	R1,FLD$B_MAXLNG(R0)		; IS NOW DESCRIPTION LARGER?

                          EF     1F  0049   200 	BLSSU	MAXLNG				; YES, USE IT

                          F1     11  004B   201 	BRB	17$				; NO, KEEP SEARCHING

                                 05  004D   202 18$:	RSB					; RETURN

                                     004E   203 ;

                                     004E   204 ; FIND THE MAXIMUM WIDTHS OF THE PARTS OF THE OUTPUT LINE.

                                     004E   205 ;

            51         03 A0     9A  004E   206 3$:	MOVZBL	FLD$B_MAXLNG(R0),R1		; GET FIELD WIDTH

            5B            51     C2  0052   207 	SUBL2	R1,R11				; LINE=LINE-KEY1 WIDTH

            50         18 A6     D0  0055   208 4$:	MOVL	CRF$L_K2FMTBL(R6),R0		; GET KEY2 FIELD ADDR DESC

                          05     13  0059   209 	BEQL	5$				; BRANCH ON NO FIELD DESC

                          DD     10  005B   210 	BSBB	MAXLNG				; GET MAXIMUM FIELD WIDTH

            5B            51     C2  005D   211 	SUBL2	R1,R11				; LINE=LINE-KEY2 WIDTH

            50         1C A6     D0  0060   212 5$:	MOVL	CRF$L_V1FMTBL(R6),R0		; GET VAL1 FIELD DESC

                          07     13  0064   213 	BEQL	6$				; BRANCH ON NO FIELD DESC

            51         03 A0     9A  0066   214 	MOVZBL	FLD$B_MAXLNG(R0),R1		; GET FIELD WIDTH

            5B            51     C2  006A   215 	SUBL2	R1,R11				; LINE=LINE-VAL1 WIDTH

            50         20 A6     D0  006D   216 6$:	MOVL	CRF$L_V2FMTBL(R6),R0		; GET VAL2 FIELD DESC

                          05     13  0071   217 	BEQL	7$				; BRANCH ON NO FIELD DESC

                          C5     10  0073   218 	BSBB	MAXLNG				; GET MAXIMUM FIELD WIDTH

            5B            51     C2  0075   219 	SUBL2	R1,R11				; LINE=LINE-VAL2 WIDTH

         08 AC            5B     C3  0078   220 7$:	SUBL3	R11,CRF$L_OU_LINWID(AP),W^KEY_VAL_SIZE ; GET LNG OF KEY1-VAL2 FLDS

                     0028'CF         007C       

                          9E     15  007F   221 	BLEQ	1$				; BRANCH ON LINE TOO SMALL

                          51     D4  0081   222 	CLRL	R1				; INITIALIZE FIELD WIDTH

            50         24 A6     D0  0083   223 	MOVL	CRF$L_R1FMTBL(R6),R0		; GET REF1 FIELD DESC

                          02     13  0087   224 	BEQL	8$				; BRANCH ON NO FIELD DESC

                          AF     10  0089   225 	BSBB	MAXLNG				; GET MAXIMUM FIELD WIDTH

       002C'CF            51     D0  008B   226 8$:	MOVL	R1,W^REF_SIZE			; SAVE REF1 FIELD WIDTH

                          51     D4  0090   227 	CLRL	R1				; INITIALIZE FIELD WIDTH

            50         28 A6     D0  0092   228 	MOVL	CRF$L_R2FMTBL(R6),R0		; GET REF2 FIELD DESC

                          04     13  0096   229 	BEQL	9$				; BRANCH ON NO FIELD DESC

            51         03 A0     9A  0098   230 	MOVZBL	FLD$B_MAXLNG(R0),R1		; GET FIELD WIDTH

       002C'CF            51     C0  009C   231 9$:	ADDL2	R1,W^REF_SIZE			; GET WIDTH OF REF FIELDS

                          19     13  00A1   232 	BEQL	11$				; BRANCH ON NO REF WIDTH

       002C'CF       0028'CF     C1  00A3   233 	ADDL3	W^KEY_VAL_SIZE,W^REF_SIZE,W^DEF_LINE_LNG ; GET REF PART OF LINE

                     0008'CF         00AA       

            5B       002C'CF     C2  00AD   234 	SUBL2	W^REF_SIZE,R11			; GET LINE LNG MINUS DEF

            5B       002C'CF     C7  00B2   235 	DIVL3	W^REF_SIZE,R11,W^REFS_PER_LINE	; GET # REFS/LINE

                     0004'CF         00B7       

                          05     11  00BA   236 	BRB	12$				; SKIP NO LNG DEFAULT

       0004'CF            01     9A  00BC   237 11$:	MOVZBL	#1,W^REFS_PER_LINE		; REF LNG=0, SET A ONE

       000C'CF         14 AC     9A  00C1   238 12$:	MOVZBL	CRF$B_OU_PRTIND(AP),W^KEYS_PER_LINE ; INITIALIZE KEYS/LINE

                          49     12  00C7   239 	BNEQ	16$				; NO, BRANCH ON 1 KEY/LINE

            50         08 AC     D0  00C9   240 	MOVL	CRF$L_OU_LINWID(AP),R0		; GET LINE WIDTH IN LOWER BYTES

                          51     D4  00CD   241 	CLRL	R1				; CLEAR UPPER BYTES

            50       0028'CF     7B  00CF   242 	EDIV	W^KEY_VAL_SIZE,R0,W^KEYS_PER_LINE,R1 ; GET # KEYS/LINE

CRFOUT                                                           22-AUG-1978 04:40:26   VAX-11 MACRO X0.3-11               Page   6

X01.01          CRF$OUT                                                                                                          (3)



            51       000C'CF         00D4       

                     000C'CF     D7  00D8   243 	DECL	W^KEYS_PER_LINE			; GET KEYS/LINE -1

            51       000C'CF     C7  00DC   244 	DIVL3	W^KEYS_PER_LINE,R1,W^MULT_COLM_BLNKS ; GET # BLANKS BETWEEN COLUMNS

                     0000'CF         00E1       

                          11     12  00E4   245 	BNEQ	15$				; BRANCH ON GOT BLANKS

                     000C'CF     D7  00E6   246 	DECL	W^KEYS_PER_LINE			; NO BLANKS, SET ONE LESS KEY/LINE

            51       0028'CF     C0  00EA   247 	ADDL2	W^KEY_VAL_SIZE,R1		; ELIMINATE ONE KEY-VAL COLUMN

            51       000C'CF     C7  00EF   248 	DIVL3	W^KEYS_PER_LINE,R1,W^MULT_COLM_BLNKS ; GET # BLANKS BETWEEN COLUMNS

                     0000'CF         00F4       

                     000C'CF     D6  00F7   249 15$:	INCL	W^KEYS_PER_LINE			; SET DEFAULT OF ONE

   00000070 8F       000C'CF     C5  00FB   250 	MULL3	W^KEYS_PER_LINE,#HIS$K_LISTSIZE,R0 ; GET SIZE OF HISTORY LISTS

                          50         0104       

   00000000'EF            00     FB  0105   251 	CALLS	#0,CRF$ALBLK			; ALLOCATE HISTORY LISTS

            0D            50     E8  010C   252 	BLBS	R0,20$				; BRANCH ON SUCCESS

            6E            50     9A  010F   253 	MOVZBL	R0,(SP)				; REMEMBER STATUS CODE

            51       0000'CF     9E  0112   254 16$:	MOVAB	W^CRF_HISTORY,R1		; SET UP ONE HISTORY LIST

       000C'CF            01     9A  0117   255 	MOVZBL	#1,W^KEYS_PER_LINE		; SET UP DEFAULT KEYS/LINE

            53       000C'CF     D0  011C   256 20$:	MOVL	W^KEYS_PER_LINE,R3		; GET COUNT OF KEYS

            54       0010'CF     9E  0121   257 	MOVAB	W^HIST_LIST_TBL,R4		; GET ROOM TO STORE LIST ADDRS

            84            51     D0  0126   258 25$:	MOVL	R1,(R4)+			; SAVE HISTORY LIST ADDR

            51   00000070 8F     C0  0129   259 	ADDL2	#HIS$K_LISTSIZE,R1		; GET NEXT LIST ADDR

            F3            53     F5  0130   260 	SOBGTR	R3,25$				; REPEAT FOR EACH LIST

                          64     D4  0133   261 	CLRL	(R4)				; END THE HISTORY ADDR LIST

            5A         0C AC     9A  0135   262 	MOVZBL	CRF$B_OU_PAG1(AP),R10		; GET # LINES/FIRST PAGE

       0030'CF            01     9A  0139   263 	MOVZBL	#1,W^KEY_NUM_TBL		; SET FIRST KEY # ON PAGE 1

                          0E     11  013E   264 	BRB	40$				; BRANCH PAST INCR OF PREV PAGE

            5A       000C'CF     C4  0140   265 35$:	MULL2	W^KEYS_PER_LINE,R10		; GET # KEYS FROM PREV PAGE

       0030'CF            5A     C0  0145   266 	ADDL2	R10,W^KEY_NUM_TBL		; GET FIRST KEY # ON NEW PAGE

            5A         10 AC     9A  014A   267 	MOVZBL	CRF$B_OU_SUCPAG(AP),R10		; SET NEW COUNT OF LINES/PAGE

            51       0034'CF     9E  014E   268 40$:	MOVAB	W^KEY_NUM_TBL+4,R1		; GET KEY # TABLE ADDR

            50            04     9A  0153   269 	MOVZBL	#4,R0				; MAX COUNT OF HIST LISTS

            5A         FC A1     C1  0156   270 45$:	ADDL3	-4(R1),R10,(R1)+		; SET FIRST KEY # IN COLUMN

                          81         015A       

            F8            50     F5  015B   271 	SOBGTR	R0,45$				; REPEAT FOR EACH HIST LIST

            57            5A     D0  015E   272 50$:	MOVL	R10,R7				; SET COUNT OF UNUSED LINES

            52       0010'CF     9E  0161   273 	MOVAB	W^HIST_LIST_TBL,R2		; GET ADDR OF HIST LIST TBL

            53       0030'CF     9E  0166   274 	MOVAB	W^KEY_NUM_TBL,R3		; GET ADDR OF KEY # TBL

                          59     D4  016B   275 	CLRL	R9				; CLR # USED BYTES IN LINE

       00C8'CF         08 AC     D0  016D   276 	MOVL	CRF$L_OU_LINWID(AP),W^OUT_DSC	; SET NEW LINE SIZE IN DSC

       00CC'CF       0044'CF     9E  0173   277 	MOVAB	W^OUTLINE,W^OUT_DSC+4		; SET ADDR OF OUTPUT BUFR

            5B       0004'CF     D0  017A   278 	MOVL	W^REFS_PER_LINE,R11		; RESET COUNT OF UNUSED REFS

            55            83     D0  017F   279 53$:	MOVL	(R3)+,R5			; GET # OF NEXT KEY

            54            82     D0  0182   280 	MOVL	(R2)+,R4			; GET ADDR OF HIST LIST

                          1E     12  0185   281 	BNEQ	70$				; BRANCH ON GOT A LIST

                          59     D5  0187   282 55$:	TSTL	R9				; IS A LINE FORMATTED

                          03     14  0189   283 	BGTR	60$				; BRANCH ON YES

                          024F   31  018B   284 	BRW	DEAL_TREE			; NO, ALL DONE WITH OUTPUT

            51         10 A6     D0  018E   285 60$:	MOVL	CRF$L_OUTPUT(R6),R1		; GET OUTPUT ROUTINE ADDR

                          03     12  0192   286 	BNEQ	65$				; BRANCH TO OUTPUT LINE

                          02BF   31  0194   287 	BRW	NO_OUTRTN			; BRANCH ON NO ROUTINE

                          59     DD  0197   288 65$:	PUSHL	R9				; PUSH SIZE OF LINE

                     0044'CF     9F  0199   289 	PUSHAB	W^OUTLINE			; PUSH ADDR OF LINE

            61            02     FB  019D   290 	CALLS	#2,(R1)				; CALL USER OUTPUT ROUTINE

                          57     D7  01A0   291 	DECL	R7				; DEC # UNUSED LINES/PAGE

                          0206   31  01A2   292 	BRW	225$				; GO TEST IF DONE WITH PAGE

   00000000'EF            00     FB  01A5   293 70$:	CALLS	#0,FIND_NTH_KEY			; GO FIND TOP KEY ON PAGE

            29            50     E8  01AC   294 72$:	BLBS	R0,100$				; BRANCH ON KEY FOUND

CRFOUT                                                           22-AUG-1978 04:40:26   VAX-11 MACRO X0.3-11               Page   7

X01.01          CRF$OUT                                                                                                          (3)



            52            04     C2  01AF   295 	SUBL2	#4,R2				; POINT TO CURRENT HIST LIST

            50         70 8F     9A  01B2   296 80$:	MOVZBL	#HIS$K_LISTSIZE,R0		; NOT FOUND, GET HIST LIST SIZE

            51            82     D0  01B6   297 	MOVL	(R2)+,R1			; GET HIST LIST ADDR

                          CC     13  01B9   298 	BEQL	55$				; BRANCH ON NO NEXT LIST

                 00000000'EF     9F  01BB   299 	PUSHAB	CRF_HISTORY			; GET PERMANENT LIST (IN PIC MANNER)

            51            8E     D1  01C1   300 	CMPL	(SP)+,R1			; IS NEXT LIST THE PERMANENT ONE?

                          0D     13  01C4   301 	BEQLU	90$				; BRANCH ON YES, DON'T DEAL

   00000000'EF            00     FB  01C6   302 	CALLS	#0,CRF$DEALBLK			; DEALOCATE HIST LIST

            03            50     E8  01CD   303 	BLBS	R0,90$				; BRANCH ON SUCCESS

                          028A   31  01D0   304 	BRW	ERROR_EXIT			; RETURN ON FAILURE

                       FC A2     D4  01D3   305 90$:	CLRL	-4(R2)				; FORGET THIS HIST LIST

                          DA     11  01D6   306 	BRB	80$				; GO GET NEXT HIST LIST

                                     01D8   307 ;

                                     01D8   308 ; FOUND THE NTH KEY.  FORMAT KEY1 FIELD.

                                     01D8   309 ;

            54            51     D0  01D8   310 100$:	MOVL	R1,R4				; SAVE KEY ENTRY ADDR

            50         08 A4     D0  01DB   311 	MOVL	KEY$L_KEYADDR(R4),R0		; GET KEY NAME ADDR

                       08 A6     95  01DF   312 	TSTB	CRF$B_KEYTYPE(R6)		; ASCIC OR BINARY KEY?

                          03     13  01E2   313 	BEQL	105$				; BRANCH ON ASCIC

            50            60     D0  01E4   314 	MOVL	(R0),R0				; GET BINARY KEY VALUE

            51         14 A6     D0  01E7   315 105$:	MOVL	CRF$L_K1FMTBL(R6),R1		; GET FORMAT DSC ADDR

                          10     13  01EB   316 	BEQL	110$				; BRANCH ON NO FIELD DESC

            58         03 A1     9A  01ED   317 	MOVZBL	FLD$B_MAXLNG(R1),R8		; REMEMBER FIELD LENGTH

            51            04     C0  01F1   318 	ADDL2	#FLD$L_FAODSC,R1		; OFFSET TO FAO DSC

                          00A3   30  01F4   319 	BSBW	FORMAT_FLD			; GO FORMAT FIELD

            03            50     E8  01F7   320 	BLBS	R0,110$				; BRANCH ON SUCCESS

                          0260   31  01FA   321 	BRW	ERROR_EXIT			; RETURN ON FAILURE

                                     01FD   322 ;

                                     01FD   323 ; FORMAT KEY2 FIELD.

                                     01FD   324 ;

            51         18 A6     D0  01FD   325 110$:	MOVL	CRF$L_K2FMTBL(R6),R1		; GET FORMAT DSC TBL

                          0C     13  0201   326 	BEQL	120$				; BRANCH ON NO FIELD DESC

            50         14 A4     3C  0203   327 	MOVZWL	KEY$W_VALFLAG(R4),R0		; GET VALUE FLAGS

                          55     10  0207   328 	BSBB	SRCH_FORMAT			; INSERT INTO OUTPUT LINE

            03            50     E8  0209   329 	BLBS	R0,120$				; BRANCH ON SUCCESS

                          024E   31  020C   330 	BRW	ERROR_EXIT			; RETURN

                                     020F   331 ;

                                     020F   332 ; FORMAT VAL1 FIELD.

                                     020F   333 ;

            51         1C A6     D0  020F   334 120$:	MOVL	CRF$L_V1FMTBL(R6),R1		; GET FORMAT DSC TBL

                          37     13  0213   335 	BEQL	130$				; BRANCH ON NO FIELD DESC

            58         03 A1     9A  0215   336 	MOVZBL	FLD$B_MAXLNG(R1),R8		; REMEMBER FIELD LENGTH

            51            04     C0  0219   337 	ADDL2	#FLD$L_FAODSC,R1		; GET FORMAT FAO DSC

            50         0C A4     D0  021C   338 	MOVL	KEY$L_VALADDR(R4),R0		; GET KEY VALUE ADDRESS

                          1F     12  0220   339 	BNEQ	125$				; BRANCH ON ADDRESS EXISTS

                          50     DD  0222   340 	PUSHL	R0				; REMEMBER R0

                          51     DD  0224   341 	PUSHL	R1				; REMEMBER R1

                          3C     BB  0226   342 	PUSHR	#^M<R2,R3,R4,R5>		; SAVE REGISTERS

            50       00CC'CF     D0  0228   343 	MOVL	W^OUT_DSC+4,R0			; GET ADDR OF OUTPUT BUFFER

       00D0'CF            01     2C  022D   344 	MOVC5	#1,W^SPACE,#BLANK,R8,(R0)	; BLANK OUT VALUE FIELD

            58            20         0232       

                          60         0234       

                          3C     BA  0235   345 	POPR	#^M<R2,R3,R4,R5>		; RESTORE REGISTERS

            51            8E     D0  0237   346 	MOVL	(SP)+,R1			; RESTORE R1

            50            8E     D0  023A   347 	MOVL	(SP)+,R0			; RESTORE R0

                          7A     10  023D   348 	BSBB	95$				; GO ADD IN LENGTH OF FIELD

                          0B     11  023F   349 	BRB	130$				; GET FORMAT VAL2 FIELD

CRFOUT                                                           22-AUG-1978 04:40:26   VAX-11 MACRO X0.3-11               Page   8

X01.01          CRF$OUT                                                                                                          (3)



            50            60     D0  0241   350 125$:	MOVL	(R0),R0				; GET VALUE OF KEY

                          54     10  0244   351 	BSBB	FORMAT_FLD			; INSERT INTO OUTPUT LINE

            03            50     E8  0246   352 	BLBS	R0,130$				; BRANCH ON SUCCESS

                          0211   31  0249   353 	BRW	ERROR_EXIT			; RETURN

                                     024C   354 ;

                                     024C   355 ; FORMAT VAL2 FIELD.

                                     024C   356 ;

            51         20 A6     D0  024C   357 130$:	MOVL	CRF$L_V2FMTBL(R6),R1		; GET FORMAT DSC TBL

                          75     13  0250   358 	BEQL	140$				; BRANCH ON NO FIELD DESC

            50         14 A4     3C  0252   359 	MOVZWL	KEY$W_VALFLAG(R4),R0		; GET VALUE FLAGS

                          06     10  0256   360 	BSBB	SRCH_FORMAT			; INSERT INTO OUTPUT LINE

            6C            50     E8  0258   361 	BLBS	R0,140$				; BRANCH ON SUCCESS

                          01FF   31  025B   362 	BRW	ERROR_EXIT			; BRANCH ON FAILURE

                                     025E   363 ;

                                     025E   364 ; SEARCH THROUGH FIELD DESCRIPTIONS FOR MATCHING BIT MASK.

                                     025E   365 ;

                                     025E   366 ;	R0 - FLAG VALUE OF KEY

                                     025E   367 ;	R1 - ADDRESS OF FIRST FORMAT TABLE FIELD DESCRIPTION

                                     025E   368 ;

                                     025E   369 SRCH_FORMAT:

            58         03 A1     9A  025E   370 	MOVZBL	FLD$B_MAXLNG(R1),R8		; REMEMBER FIELD LENGTH

                          0C     BB  0262   371 	PUSHR	#^M<R2,R3>			; SAVE REGISTERS

            53            51     D0  0264   372 	MOVL	R1,R3				; GET TABLE DSC ADDR

            51            04     C0  0267   373 	ADDL2	#FLD$L_FAODSC,R1		; SET RETURN FORMAT ADDR

            52            63     3C  026A   374 91$:	MOVZWL	FLD$W_MASK(R3),R2		; GET FORMAT DSC MASK

                          29     13  026D   375 	BEQL	94$				; BRANCH ON END OF DSC'S

            52   00008000 8F     CA  026F   376 	BICL2	#^X8000,R2			; CLEAR BIT 15

                       02 A3     95  0276   377 	TSTB	FLD$B_SET_CLR(R3)		; MASK SET OR CLEAR?

                          03     12  0279   378 	BNEQ	92$				; BRANCH ON MASK SET

            50            50     D2  027B   379 	MCOML	R0,R0				; COMPLEMENT MASK

            52            50     CA  027E   380 92$:	BICL2	R0,R2				; TEST FOR MASK MATCH

                          08     12  0281   381 	BNEQ	93$				; BRANCH ON NO MATCH

            51         04 A3     9E  0283   382 	MOVAB	FLD$L_FAODSC(R3),R1		; SET NEW RETURN FORMAT ADDR

            58         03 A3     9A  0287   383 	MOVZBL	FLD$B_MAXLNG(R3),R8		; REMEMBER FIELD LENGTH

                       02 A3     95  028B   384 93$:	TSTB	FLD$B_SET_CLR(R3)		; CHECK FOR RESTORING FLAGS

                          03     12  028E   385 	BNEQ	97$				; BRANCH ON TEST=SET

            50            50     D2  0290   386 	MCOML	R0,R0				; RESTORE FLAGS

            53            0C     C0  0293   387 97$:	ADDL2	#FLD$K_LENGTH,R3		; GET NEXT DSC ADDR

                          D2     11  0296   388 	BRB	91$				; REPEAT SEARCH

                          0C     BA  0298   389 94$:	POPR	#^M<R2,R3>			; RESTORE REGISTERS

                                     029A   390 ;

                                     029A   391 ;

                                     029A   392 ; FORMAT A FIELD INTO THE OUTPUT LINE AND UPDATE THE LINE SIZE AND

                                     029A   393 ; OUTPUT LINE STRING DESCRIPTOR.

                                     029A   394 ;

                                     029A   395 ;	R0 - ARGUMENT ADDR OR VALUE

                                     029A   396 ;	R1 - ADDR OF FAO CONTROL STRING DESCRIPTOR

                                     029A   397 ;

                                     029A   398 FORMAT_FLD:

                          50     DD  029A   399 	PUSHL	R0				; PUSH ARGUMENT ADDR/VALUE

                     00C8'CF     9F  029C   400 	PUSHAB	W^OUT_DSC			; PUSH OUTPUT LINE DSC

                     00D1'CF     9F  02A0   401 	PUSHAB	W^OUT_SIZE			; PUSH WORD FOR RET SIZE

                          51     DD  02A4   402 	PUSHL	R1				; PUSH ADDR OF FAO STR DSC

   00000000'EF            04     FB  02A6   403 	CALLS	#4,SYS$FAO			; FORMAT FIELD

            09            50     E8  02AD   404 	BLBS	R0,95$				; BRANCH ON SUCCESS

            50   0065809A 8F     D0  02B0   405 	MOVL	#CRF$_FAOFAIL,R0		; REPORT FAO FAILURE

                          0D     11  02B7   406 	BRB	96$				; RETURN

CRFOUT                                                           22-AUG-1978 04:40:26   VAX-11 MACRO X0.3-11               Page   9

X01.01          CRF$OUT                                                                                                          (3)



            59            58     C0  02B9   407 95$:	ADDL2	R8,R9				; UPDATE PART OF LINE USED

       00CC'CF            58     C0  02BC   408 	ADDL2	R8,W^OUT_DSC+4			; UPDATE LINE ADDR

       00C8'CF            58     C2  02C1   409 	SUBL2	R8,W^OUT_DSC			; UPDATE FREE BYTE COUNT

                                 05  02C6   410 96$:	RSB					; RETURN

                                     02C7   411 ;

                                     02C7   412 ; CHECK IF SHOULD FORMAT REFERENCE FIELDS.

                                     02C7   413 ;

         14 AC         00'8F     91  02C7   414 140$:	CMPB	#CRF$K_VALUES,CRF$B_OU_PRTIND(AP) ; PRINT ONLY VALUES?

                          1A     12  02CC   415 	BNEQ	150$				; NO, GO FORMAT REFS

                          62     D5  02CE   416 	TSTL	(R2)				; IS THERE ANOTHER COLUMN?

                          13     13  02D0   417 	BEQL	145$				; BRANCH ON NO

            59       0000'CF     C0  02D2   418 	ADDL2	W^MULT_COLM_BLNKS,R9		; ADD IN SPACE BETWEEN COLUMNS

       00C8'CF       0000'CF     C2  02D7   419 	SUBL2	W^MULT_COLM_BLNKS,W^OUT_DSC	; DECREMENT BUFFER SIZE

       00CC'CF       0000'CF     C0  02DE   420 	ADDL2	W^MULT_COLM_BLNKS,W^OUT_DSC+4	; INCR BUFFER ADDRESS

                          00BB   31  02E5   421 145$:	BRW	220$				; NO, BRANCH

                                     02E8   422 ;

                                     02E8   423 ; FORMAT DEF1 FIELD.

                                     02E8   424 ;

         14 AC         00'8F     91  02E8   425 150$:	CMPB	#CRF$K_DEFS_REFS,CRF$B_OU_PRTIND(AP) ; PRINT DEFS?

                          2D     12  02ED   426 	BNEQ	170$				; BRANCH ON NO, PRINT ONLY REFS

            51         24 A6     D0  02EF   427 	MOVL	CRF$L_R1FMTBL(R6),R1		; GET REF1 FORMAT DSC TBL

                          0D     13  02F3   428 	BEQL	160$				; BRANCH ON NO FIELD DESC

            50         16 A4     3C  02F5   429 	MOVZWL	KEY$W_DEFFLAG(R4),R0		; GET DEF FLAGS

                          FF62   30  02F9   430 	BSBW	SRCH_FORMAT			; INSERT INTO OUTPUT LINE

            03            50     E8  02FC   431 	BLBS	R0,160$				; BRANCH ON SUCCESS

                          015B   31  02FF   432 	BRW	ERROR_EXIT			; RETURN ON FAILURE

                                     0302   433 ;

                                     0302   434 ; FORMAT DEF2 FIELD.

                                     0302   435 ;

            51         28 A6     D0  0302   436 160$:	MOVL	CRF$L_R2FMTBL(R6),R1		; GET FORMAT DSC TBL

                          14     13  0306   437 	BEQL	170$				; BRANCH ON NO FIELD DESC

            58         03 A1     9A  0308   438 	MOVZBL	FLD$B_MAXLNG(R1),R8		; REMEMBER FIELD LENGTH

            51            04     C0  030C   439 	ADDL2	#FLD$L_FAODSC,R1		; OFFSET TO FAO DSC

            50         18 A4     9E  030F   440 	MOVAB	KEY$B_DEFLNG(R4),R0		; GET ADDR OF DEF INDIC

                          FF84   30  0313   441 	BSBW	FORMAT_FLD			; INSERT FIELD INTO OUTPUT

            03            50     E8  0316   442 	BLBS	R0,170$				; BRANCH ON SUCCESS

                          0141   31  0319   443 	BRW	ERROR_EXIT			; RETURN ON FAILURE

                                     031C   444 ;

                                     031C   445 ; SEARCH FOR OTHER REFERENCE INDICATORS.

                                     031C   446 ;

            54         10 A4     D0  031C   447 170$:	MOVL	KEY$L_REFLIST(R4),R4		; GET REF LISTHEAD

                          03     12  0320   448 175$:	BNEQ	180$				; BRANCH ON GOT REF

                          FE62   31  0322   449 	BRW	55$				; BRANCH ON NO REFS

                          5B     D5  0325   450 180$:	TSTL	R11				; ROOM FOR ANOTHER REF?

                          45     12  0327   451 	BNEQ	190$				; YES, GO INSERT IT

            51         10 A6     D0  0329   452 	MOVL	CRF$L_OUTPUT(R6),R1		; GET OUTPUT ROUTINE ADDR

                          03     12  032D   453 	BNEQ	183$				; BRANCH TO OUTPUT LINE

                          0124   31  032F   454 	BRW	NO_OUTRTN			; BRANCH ON NO ROUTINE

                          59     DD  0332   455 183$:	PUSHL	R9				; PUSH SIZE OF OUTPUT LINE

                     0044'CF     9F  0334   456 	PUSHAB	W^OUTLINE			; PUSH ADDR OF OUTPUT LINE

            61            02     FB  0338   457 	CALLS	#2,(R1)				; CALL USER'S OUTPUT ROUTINE

       00CC'CF       0044'CF     9E  033B   458 185$:	MOVAB	W^OUTLINE,W^OUT_DSC+4		; SET NEW LINE ADDR

            59       0008'CF     D0  0342   459 	MOVL	W^DEF_LINE_LNG,R9		; CLEAR USED BYTE COUNT

                          3C     BB  0347   460 	PUSHR	#^M<R2,R3,R4,R5>		; SAVE REGISTERS

       00D0'CF            01     2C  0349   461 	MOVC5	#1,W^SPACE,#BLANK,W^DEF_LINE_LNG,W^OUTLINE ; CLEAR OUTPUT LINE

       0008'CF            20         034E       

                     0044'CF         0352       

CRFOUT                                                           22-AUG-1978 04:40:26   VAX-11 MACRO X0.3-11               Page  10

X01.01          CRF$OUT                                                                                                          (3)



                          3C     BA  0355   462 	POPR	#^M<R2,R3,R4,R5>		; RESTORE REGISTERS

         08 AC       0008'CF     C3  0357   463 	SUBL3	W^DEF_LINE_LNG,CRF$L_OU_LINWID(AP),W^OUT_DSC ; DEC TO REF FIELD COUNT

                     00C8'CF         035D       

       00CC'CF       0008'CF     C0  0360   464 	ADDL2	W^DEF_LINE_LNG,W^OUT_DSC+4	; SKIP TO REF FIELDS

            5B       0004'CF     D0  0367   465 	MOVL	W^REFS_PER_LINE,R11		; GET # UNUSED REFS

                          B7     11  036C   466 	BRB	180$				; NOW, GO TRY TO INSERT

                                     036E   467 ;

                                     036E   468 ; PUT REFERENCE INTO OUTPUT LINE.

                                     036E   469 ;

            51         24 A6     D0  036E   470 190$:	MOVL	CRF$L_R1FMTBL(R6),R1		; GET FORMAT DSC TBL

                          0D     13  0372   471 	BEQL	200$				; BRANCH ON NO FIELD DESC

            50         04 A4     3C  0374   472 	MOVZWL	REF$W_REFFLAG(R4),R0		; GET REF FLAGS

                          FEE3   30  0378   473 	BSBW	SRCH_FORMAT			; INSERT REF1 FIELD

            03            50     E8  037B   474 	BLBS	R0,200$				; BRANCH ON SUCCESS

                          00DC   31  037E   475 	BRW	ERROR_EXIT			; RETURN ON FAILURE

                                     0381   476 ;

                                     0381   477 ; INSERT REF2 FIELD INTO OUTPUT LINE.

                                     0381   478 ;

            51         28 A6     D0  0381   479 200$:	MOVL	CRF$L_R2FMTBL(R6),R1		; GET FORMAT DSC TBL

                          14     13  0385   480 	BEQL	210$				; BRANCH ON NO FIELD DESC

            58         03 A1     9A  0387   481 	MOVZBL	FLD$B_MAXLNG(R1),R8		; REMEMBER FIELD LENGTH

            51            04     C0  038B   482 	ADDL2	#FLD$L_FAODSC,R1		; OFFSET TO FAO DSC

            50         06 A4     9E  038E   483 	MOVAB	REF$B_REFLNG(R4),R0		; GET ADDR OF REF INDIC

                          FF05   30  0392   484 	BSBW	FORMAT_FLD			; INSERT INTO OUTPUT LINE

            03            50     E8  0395   485 	BLBS	R0,210$				; BRANCH ON SUCCESS

                          00C2   31  0398   486 	BRW	ERROR_EXIT

                          5B     D7  039B   487 210$:	DECL	R11				; DEC COUNT OF UNUSED REFS/LINE

            54            64     D0  039D   488 	MOVL	REF$L_FLINK(R4),R4		; GET NEXT REF INDIC ADDR

                          FF7D   31  03A0   489 	BRW	175$				; GO REPEAT LOOP

                                     03A3   490 ;

                                     03A3   491 ; CHECK FOR TYPE OF TREE SEARCH--FIND NTH KEY OR FIND NEXT KEY.

                                     03A3   492 ;

            5A            57     D1  03A3   493 220$:	CMPL	R7,R10				; # UNUSED LINES:LINES/PAGE

                          23     12  03A6   494 	BNEQ	240$				; BRANCH ON NOT FIRST LINE

                          FDD4   31  03A8   495 	BRW	53$				; BRANCH ON FIRST LINE

                                     03AB   496 ;

                                     03AB   497 ; TEST FOR DONE WITH CURRENT PAGE.

                                     03AB   498 ;

                          57     D5  03AB   499 225$:	TSTL	R7				; ANY UNUSED LINES?

                          03     12  03AD   500 	BNEQ	230$				; YES, CONTINUE

                          FD8E   31  03AF   501 	BRW	35$				; NO, SET UP NEW KEY #

            52       0010'CF     9E  03B2   502 230$:	MOVAB	W^HIST_LIST_TBL,R2		; GET HIST LIST TBL ADDR

                          59     D4  03B7   503 	CLRL	R9				; ZERO LINE SIZE

            5B       0004'CF     D0  03B9   504 	MOVL	W^REFS_PER_LINE,R11		; GET # REFS/LINE

       00C8'CF         08 AC     D0  03BE   505 	MOVL	CRF$L_OU_LINWID(AP),W^OUT_DSC	; SET NEW LINE SIZE IN DSC

       00CC'CF       0044'CF     9E  03C4   506 	MOVAB	W^OUTLINE,W^OUT_DSC+4		; SET ADDR OF OUTPUT BUFR

            54            82     D0  03CB   507 240$:	MOVL	(R2)+,R4			; GET HIST LIST ADDR

                          03     12  03CE   508 	BNEQ	250$				; BRANCH ON NO NEXT LIST

                          FDB4   31  03D0   509 	BRW	55$				; GO GET NEXT KEY

   00000000'EF            00     FB  03D3   510 250$:	CALLS	#0,FIND_NEXT_KEY		; FIND NEXT SEQUENTIAL KEY

                          FDCF   31  03DA   511 	BRW	72$				; GO INSERT INTO OUTPUT LINE

                                     03DD   512 	.DSABL	LSB

                                     03DD   513 ;

                                     03DD   514 ; ROUTINE TO DEALLOCATE TREE SPACE.

                                     03DD   515 ;

                                     03DD   516 DEAL_TREE:

         18 AC            00'    91  03DD   517 	CMPB	S^#CRF$K_SAVE,CRF$B_OU_SAVIND(AP) ; DELETE TREE?

CRFOUT                                                           22-AUG-1978 04:40:26   VAX-11 MACRO X0.3-11               Page  11

X01.01          CRF$OUT                                                                                                          (3)



                          03     12  03E1   518 	BNEQ	1$				; YES, GO DEALLOCATE TREE

                          008D   31  03E3   519 	BRW	SUCC_EXIT			; NO, RETURN

            52            66     D0  03E6   520 1$:	MOVL	CRF$L_ROOT(R6),R2		; GET ROOT ADDRESS

            54       0000'CF     9E  03E9   521 	MOVAB	W^CRF_HISTORY,R4		; GET HISTORY LIST ADDRESS

       0000'CF            01     90  03EE   522 	MOVB	#1,W^CRF_INSRT_FLAG		; SET FLAG TO GET NEXT ENTRY

            53            52     D0  03F3   523 	MOVL	R2,R3				; SET ADDR OF CURRENT ENTRY

                          84     7C  03F6   524 	CLRQ	(R4)+				; CLEAR BOTTOM OF LIST

            84            52     D0  03F8   525 	MOVL	R2,(R4)+			; MOVE NODE ADDR ONTO LIST

                       04 A3     D5  03FB   526 5$:	TSTL	KEY$L_LINKUP(R3)		; IS THERE A LINKUP?

                          10     13  03FE   527 	BEQL	10$				; BRANCH ON NO

            84            53     D0  0400   528 	MOVL	R3,(R4)+			; MOVE CURRENT ENTRY TO LIST

            84         04 A3     D0  0403   529 	MOVL	KEY$L_LINKUP(R3),(R4)+		; MOVE LINKUP ONTO LIST

            52         04 A3     D0  0407   530 	MOVL	KEY$L_LINKUP(R3),R2		; SET NEW NODE ADDRESS

            53            52     D0  040B   531 	MOVL	R2,R3				; SET CURRENT ENTRY ADDR

                          EB     11  040E   532 	BRB	5$				; GO CHECK FOR LINKUP

                          FBED'  30  0410   533 10$:	BSBW	GET_NXT_PRV			; GET ADDR OF NEXT ENTRY

            1E            50     E9  0413   534 	BLBC	R0,20$				; BRANCH ON NO NEXT ENTRY

            53            51     D0  0416   535 	MOVL	R1,R3				; SET NEW CURRENT ENTRY

            55         10 A1     D0  0419   536 	MOVL	KEY$L_REFLIST(R1),R5		; GET REF LISTHEAD

            51            55     D0  041D   537 15$:	MOVL	R5,R1				; REMEMBER REF ADDR

                          D9     13  0420   538 	BEQL	5$				; NO REF, GO CHECK LINKUP

            55            65     D0  0422   539 	MOVL	REF$L_FLINK(R5),R5		; GET NEXT REF IN LIST

            50            16     9A  0425   540 	MOVZBL	#REF$K_SIZE,R0			; GET SIZE OF REF ENTRY

   00000000'EF            00     FB  0428   541 	CALLS	#0,CRF$DEALBLK			; DEALLOCATE REF

            2B            50     E9  042F   542 	BLBC	R0,ERROR_EXIT			; BRANCH ON FAILURE

                          E9     11  0432   543 	BRB	15$				; GO CHECK IF IT EXISTS

            51            52     D0  0434   544 20$:	MOVL	R2,R1				; SET NODE ADDR TO DEALLOCATE

            50         04 A6     3C  0437   545 	MOVZWL	CRF$W_ENTSIZE(R6),R0		; GET SIZE TO DEALLOCATE

   00000000'EF            00     FB  043B   546 	CALLS	#0,CRF$DEALBLK			; DEALLOCATE NODE

            18            50     E9  0442   547 	BLBC	R0,ERROR_EXIT			; BRANCH ON DEALLOCATE ERROR

            54            0C     C2  0445   548 	SUBL2	#12.,R4				; ELIMINATE NODE FROM LIST

            52            84     D0  0448   549 	MOVL	(R4)+,R2			; GET FATHER NODE ADDR

                          05     13  044B   550 	BEQL	30$				; BRANCH ON NO FATHER

            53            64     D0  044D   551 	MOVL	(R4),R3				; GET CURRENT ENTRY IN NODE

                          BE     11  0450   552 	BRB	10$				; GO GET NEXT ENTRY

                          66     D4  0452   553 30$:	CLRL	CRF$L_ROOT(R6)			; RE-INITIALIZE ROOT LISTHEAD

                          1D     11  0454   554 	BRB	SUCC_EXIT			; SET SUCCESS CODE AND RET

                                     0456   555 NO_OUTRTN:

            50   0065808A 8F     D0  0456   556 	MOVL	#CRF$_NO_OUTRTN,R0		; SET NO OUTPUT ROUTINE CODE

                                     045D   557 

                                     045D   558 ERROR_EXIT:

            51         65 8F     9A  045D   559 	MOVZBL	#CRF$K_FACILCOD,R1		; GET CRF FACILITY CODE

            10            51     F0  0461   560 	INSV	R1,#16,#8,R0			; SET ERROR CODE

            50            08         0464       

            51         0C A6     D0  0466   561 	MOVL	CRF$L_ERROR(R6),R1		; GET ERROR ROUTINE ADDR

                          13     15  046A   562 	BLEQ	OUT_EXIT			; BRANCH ON NO ROUTINE

                          50     DD  046C   563 	PUSHL	R0				; PUSH ERROR CODE

            61            01     FB  046E   564 	CALLS	#1,(R1)				; CALL ERROR ROUTINE

                          0C     11  0471   565 	BRB	OUT_EXIT			; RETURN

                                     0473   566 

                                     0473   567 SUCC_EXIT:

            50            8E     D0  0473   568 	MOVL	(SP)+,R0			; SET SUCCESS CODE

            51         65 8F     9A  0476   569 	MOVZBL	#CRF$K_FACILCOD,R1		; GET CRF FACILITY CODE

            10            51     F0  047A   570 	INSV	R1,#16,#8,R0			; SET RETURN CODE

            50            08         047D       

                                     047F   571 

                                     047F   572 OUT_EXIT:

CRFOUT                                                           22-AUG-1978 04:40:26   VAX-11 MACRO X0.3-11               Page  12

X01.01          CRF$OUT                                                                                                          (3)



                                 04  047F   573 	RET					; RETURN

                                     0480   574 	.END

CRFOUT                                                           22-AUG-1978 04:40:26   VAX-11 MACRO X0.3-11               Page  13

SYMBOL TABLE                                                                                                                     (3)



BIT...         = 006580AA            DEF_LINE_LNG     00000008 R     03   OUTLINE          00000044 R     03   

BLANK          = 00000020            DMY$K_SIZE     = 00000010            OUT_DSC          000000C8 R     03   

CRF$ALBLK        ********   X   04   DMY$L_KEYADDR  = 00000008            OUT_EXIT         0000047F R     04   

CRF$B_FLAGS      00000009            DMY$L_LINKUP   = 00000004            OUT_SIZE         000000D1 R     03   

CRF$B_IR_DEFIND  00000014            DMY$W_1STFREE  = 0000000E            REF$B_REFLNG   = 00000006            

CRF$B_KEYTYPE    00000008            DMY$W_FIRST    = 00000000            REF$K_SIZE     = 00000016            

CRF$B_OU_PAG1    0000000C            DMY$W_LAST     = 00000002            REF$L_FLINK    = 00000000            

CRF$B_OU_PRTIND  00000014            DMY$W_NUMFREE  = 0000000C            REF$T_REFNAME  = 00000007            

CRF$B_OU_SAVIND  00000018            ERROR_EXIT       0000045D R     04   REF$W_REFFLAG  = 00000004            

CRF$B_OU_SUCPAG  00000010            FIND_NEXT_KEY    ********   X   04   REFS_PER_LINE    00000004 R     03   

CRF$DEALBLK      ********   X   04   FIND_NTH_KEY     ********   X   04   REF_SIZE         0000002C R     03   

CRF$K_DEFS_REFS  ********   X   04   FLD$B_MAXLNG   = 00000003            SPACE            000000D0 R     03   

CRF$K_FACILCOD = 00000065            FLD$B_SET_CLR  = 00000002            SRCH_FORMAT      0000025E R     04   

CRF$K_SAVE       ********   X   04   FLD$K_LENGTH   = 0000000C            SUCC_EXIT        00000473 R     04   

CRF$K_VALUES     ********   X   04   FLD$L_FAODSC   = 00000004            SYS$FAO          ********   X   04   

CRF$L_ERROR      0000000C            FLD$W_MASK     = 00000000            

CRF$L_IK_CTLTBL  00000004            FORMAT_FLD       0000029A R     04   

CRF$L_IK_KEYADR  00000008            GBL...         = 00000000            

CRF$L_IK_VALADR  0000000C            GET_NXT_PRV      ********   X   04   

CRF$L_IR_CTLTBL  00000004            HIS$K_ENTRYSIZE= 00000010            

CRF$L_IR_KEYADR  00000008            HIS$K_LISTSIZE = 00000070            

CRF$L_IR_REFADR  0000000C            HIS$L_FATHER   = FFFFFFF0            

CRF$L_K1FMTBL    00000014            HIS$L_FATHROFF = FFFFFFF4            

CRF$L_K2FMTBL    00000018            HIS$L_LEFTBRO  = FFFFFFF8            

CRF$L_OUTPUT     00000010            HIS$L_LEFTSON  = 00000008            

CRF$L_OU_CTLTBL  00000004            HIS$L_LINKUP   = 00000008            

CRF$L_OU_LINWID  00000008            HIS$L_LINKUPOFF= 0000000C            

CRF$L_R1FMTBL    00000024            HIS$L_NODE     = 00000000            

CRF$L_R2FMTBL    00000028            HIS$L_NTH      = 0000000C            

CRF$L_ROOT       00000000            HIS$L_OFFSET   = 00000004            

CRF$L_V1FMTBL    0000001C            HIS$L_RIGHTBRO = FFFFFFFC            

CRF$L_V2FMTBL    00000020            HIS$L_RIGHTSON = 0000000C            

CRF$OUT          00000000 RG    04   HIS$L_TOP      = 00000004            

CRF$W_ENTSIZE    00000004            HIST_LIST_TBL    00000010 R     03   

CRF$W_ERRSTS     0000000A            KEY$B_DEFLNG   = 00000018            

CRF$W_IK_VALFLG  00000010            KEY$K_DATASIZE = 0000001C            

CRF$W_IR_REFLAG  00000010            KEY$K_SIZE     = 00000028            

CRF$W_NODSIZE    00000006            KEY$L_DATA     = 0000000C            

CRF$_BLDNODFAIL= 00658052            KEY$L_KEYADDR  = 00000008            

CRF$_BLKWTHINBL= 00658072            KEY$L_LINKUP   = 00000004            

CRF$_EXPREGFAIL= 0065806A            KEY$L_REFLIST  = 00000010            

CRF$_FAILINSRT = 0065807A            KEY$L_VALADDR  = 0000000C            

CRF$_FAOFAIL   = 0065809A            KEY$T_DEFNAME  = 00000019            

CRF$_FOUNDKEY  = 00658021            KEY$W_DEFFLAG  = 00000016            

CRF$_HISTOVRFLO= 00658062            KEY$W_NEXT     = 00000000            

CRF$_ILLBLKSIZE= 00658082            KEY$W_PREV     = 00000002            

CRF$_KEY1STENTR= 00658011            KEY$W_VALFLAG  = 00000014            

CRF$_KEYPRVENTR= 00658009            KEYS_PER_LINE    0000000C R     03   

CRF$_KEYTYPE   = 006580A2            KEY_NUM_TBL      00000030 R     03   

CRF$_LINELNG   = 00658092            KEY_VAL_SIZE     00000028 R     03   

CRF$_NO_OUTRTN = 0065808A            MAXLINWID      = 00000084            

CRF$_REFLNG    = 0065805A            MAXLNG           0000003A R     04   

CRF$_REFPRVENTR= 00658019            MULT_COLM_BLNKS  00000000 R     03   

CRF$_SUCCESS   = 00658001            NOD$K_1STFREE  = 00000010            

CRF_HISTORY      ********   X   04   NOD$K_NUMFREE  = 0000000C            

CRF_INSRT_FLAG   ********   X   04   NOD$K_SIZE     = 000001F0            

DEAL_TREE        000003DD R     04   NO_OUTRTN        00000456 R     04   

CRFOUT                                                           22-AUG-1978 04:40:26   VAX-11 MACRO X0.3-11               Page  14

PROGRAM SECTION SYNOPSIS                                                                                                         (3)







PROGRAM SECTION SYNOPSIS



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

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

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

CRF$DATA         000000D3      03       PIC   USR   CON   REL   LCL NOSHR NOEXE   RD    WRT BYTE  

CRF$CODE         00000480      04       PIC   USR   CON   REL   LCL   SHR   EXE   RD  NOWRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

23570. BYTES LEFT IN FREE MEMORY POOL.

4. BYTES OF RECLAIMED MEMORY.

OBJ$:CRFOUT,LIS$:CRFOUT/-SP=LIB$:CRF/ML,SRC$:CRFPREFIX,CRFOUT

16 MLB DIR RDS - 149 GETS TO DEFINE 8 MACROS. 14 INTER. FILE WRITES. 

