CRFPREFIX                                                        22-AUG-1978 04:41:24   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (2)      41  DECLARATIONS

   (2)     181  DECLARATIONS

   (3)     201  GET_NXT_PRV 

   (4)     264  REQUEST_SPACE 

   (5)     319  RELEASE_SPACE 

   (6)     370  LOGICAL_INSERT 

   (7)     424  LOGICAL_DELETE 

   (8)     475  TRANSFER_ENTRY 

   (9)     531  MOVE_ENTRY 

GETNEXT                                                          22-AUG-1978 04:41:24   VAX-11 MACRO X0.3-11               Page   1

X01.00          DECLARATIONS                                                                                                     (1)



                                     0000     1 	.TITLE	GETNEXT 

                                     0000     2 	.IDENT	/X01.00/

                                     0000     3 

                                     0000     4 ;

                                     0000     5 ; COPYRIGHT (C) 1977

                                     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 MODULE CONTAINS MISCELLANEOUS ROUTINES TO HANDLE MINOR

                                     0000    28 ;		SEARCHES.

                                     0000    29 ;

                                     0000    30 ;

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

                                     0000    32 ;

                                     0000    33 ; AUTHOR:  K.D. MORSE, CREATION DATE:  29-APR-77

                                     0000    34 ;

                                     0000    35 ; MODIFIED BY:

                                     0000    36 ;

                                     0000    37 ;	, : VERSION

                                     0000    38 ; 01	- 

                                     0000    39 ;--

GETNEXT                                                          22-AUG-1978 04:41:24   VAX-11 MACRO X0.3-11               Page   2

X01.00          DECLARATIONS                                                                                                     (2)



                                     0000    41 	.SBTTL	DECLARATIONS

                                     0000    42 ;

                                     0000    43 ; INCLUDE FILES:

                                     0000    44 ;

                                     0000    45 

                                     0000    46 ;

                                     0000    47 ; MACROS:

                                     0000    48 ;

                                     0000    49 

                                     0000    50 	$CRFDEF					; DEFINE CRF GLOBALS

                                     0000    51 

                                     0000    52 ;

                                     0000    53 ; EQUATED SYMBOLS:

                                     0000    54 ;

                                     0000    55 

                                     0000    56 ;

                                     0000    57 ; OWN STORAGE:

                                     0000    58 ;

                                     0000    59 

GETNEXT                                                          22-AUG-1978 04:41:24   VAX-11 MACRO X0.3-11               Page   3

X01.00          GET_NXT_PRV                                                                                                      (3)



                                     0000    61 	.SBTTL	GET_NXT_PRV 

                                     0000    62 ;++

                                     0000    63 ; FUNCTIONAL DESCRIPTION:

                                     0000    64 ;

                                     0000    65 ;	THIS ROUTINE FINDS THE NEXT SEQUENTIAL ENTRY IN A NODE, GIVEN

                                     0000    66 ;	THE NODE'S ADDRESS AND THE ADDRESS OF THE CURRENT ENTRY.

                                     0000    67 ;

                                     0000    68 ; CALLING SEQUENCE:

                                     0000    69 ;

                                     0000    70 ;	BSBW	GET_NXT_PRV

                                     0000    71 ;

                                     0000    72 ; INPUT PARAMETERS:

                                     0000    73 ;

                                     0000    74 ;	NONE

                                     0000    75 ;

                                     0000    76 ; IMPLICIT INPUTS:

                                     0000    77 ;

                                     0000    78 ;	R2 - CONTAINS THE ADDRESS OF THE NODE

                                     0000    79 ;	R3 - CONTAINS THE ADDRESS OF THE CURRENT ENTRY IN THE NODE

                                     0000    80 ;	CRF_INSRT_FLAG - CONTAINS EITHER:

                                     0000    81 ;			A ONE INDICATING GET THE NEXT ENTRY

                                     0000    82 ;			A ZERO INDICATING GET THE PREVIOUS ENTRY

                                     0000    83 ;

                                     0000    84 ; OUTPUT PARAMETERS:

                                     0000    85 ;

                                     0000    86 ;	NONE

                                     0000    87 ;

                                     0000    88 ; IMPLICIT OUTPUTS:

                                     0000    89 ;

                                     0000    90 ;	SUCCESS:

                                     0000    91 ;		R0 - CONTAINS A ONE, INDICATING THERE WAS A NEXT ENTRY

                                     0000    92 ;		R1 - CONTAINS THE ADDRESS OF THE NEXT ENTRY

                                     0000    93 ;	FAILURE:

                                     0000    94 ;		R0 - CONTAINS A ZERO, INDICATIONG THERE WAS NO NEXT ENTRY

                                     0000    95 ;		R1 - CONTAINS THE ADDRESS OF THE NODE

                                     0000    96 ;

                                     0000    97 ; COMPLETION CODES:

                                     0000    98 ;

                                     0000    99 ;	NONE

                                     0000   100 ;

                                     0000   101 ; SIDE EFFECTS:

                                     0000   102 ;

                                     0000   103 ;	NONE

                                     0000   104 ;

                                     0000   105 ;--

                                     0000   106 

                                     0000   107 

                                     0000   108 

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

                                     0000   110 

                                     0000   111 GET_NXT_PRV::

                          50     D4  0000   112 	CLRL	R0				; ASSUME NO NEXT ENTRY

                     0000'CF     95  0002   113 	TSTB	W^CRF_INSRT_FLAG		; GET THE PREVIOUS ENTRY?

                          08     12  0006   114 	BNEQ	5$				; NO, BRANCH

            51         02 A3     3C  0008   115 	MOVZWL	KEY$W_PREV(R3),R1		; GET OFFSET TO PREV

                          0A     13  000C   116 	BEQL	10$				; BRANCH ON NONE

                          05     11  000E   117 	BRB	6$				; BRANCH TO SET SUCCESS CODE

GETNEXT                                                          22-AUG-1978 04:41:24   VAX-11 MACRO X0.3-11               Page   4

X01.00          GET_NXT_PRV                                                                                                      (3)



            51            63     3C  0010   118 5$:	MOVZWL	KEY$W_NEXT(R3),R1		; GET OFFSET TO NEXT ENTRY

                          03     13  0013   119 	BEQL	10$				; BRANCH ON NO NEXT ENTRY

            50            01     9A  0015   120 6$:	MOVZBL	#1,R0				; SET CODE FOR NEXT EXISTS

            51            52     C0  0018   121 10$:	ADDL2	R2,R1				; GET ADDRESS TO NEXT ENTRY

                                 05  001B   122 	RSB					; RETURN

GETNEXT                                                          22-AUG-1978 04:41:24   VAX-11 MACRO X0.3-11               Page   5

X01.00          REQUEST_SPACE                                                                                                    (4)



                                     001C   124 	.SBTTL	REQUEST_SPACE 

                                     001C   125 ;++

                                     001C   126 ; FUNCTIONAL DESCRIPTION:

                                     001C   127 ;

                                     001C   128 ;	THIS ROUTINE IS CALLED TO TAKE AN ENTRY OFF A NODE'S FREE HOLE

                                     001C   129 ;	LIST AND UPDATE THE LIST COUNT AND POINTERS.  THE FREE HOLE

                                     001C   130 ;	ADDRESS IS RETURNED.

                                     001C   131 ;

                                     001C   132 ; CALLING SEQUENCE:

                                     001C   133 ;

                                     001C   134 ;	JSB	REQ_SPACE

                                     001C   135 ;

                                     001C   136 ; INPUT PARAMETERS:

                                     001C   137 ;

                                     001C   138 ;	NONE

                                     001C   139 ;

                                     001C   140 ; IMPLICIT INPUTS:

                                     001C   141 ;

                                     001C   142 ;	R7 - CONTAINS THE ADDRESS OF THE NODE TO REQUEST SPACE FROM

                                     001C   143 ;

                                     001C   144 ; OUTPUT PARAMETERS:

                                     001C   145 ;

                                     001C   146 ;	NONE

                                     001C   147 ;

                                     001C   148 ; IMPLICIT OUTPUTS:

                                     001C   149 ;

                                     001C   150 ;	SUCCESS:

                                     001C   151 ;		R0 - CONTAINS A ONE

                                     001C   152 ;		R1 - CONTAINS THE ADDRESS OF THE EXTRACTED SPACE

                                     001C   153 ;	FAILURE:

                                     001C   154 ;		R0 - CONTAINS A ZERO, THERE IS NO FREE ROOM IN THE NODE

                                     001C   155 ;

                                     001C   156 ; COMPLETION CODES:

                                     001C   157 ;

                                     001C   158 ;	NONE

                                     001C   159 ;

                                     001C   160 ; SIDE EFFECTS:

                                     001C   161 ;

                                     001C   162 ;	NONE

                                     001C   163 ;

                                     001C   164 ;--

                                     001C   165 

                                     001C   166 

                                     001C   167 

                                     001C   168 REQ_SPACE::

                          50     D4  001C   169 	CLRL	R0				; ASSUME FAILURE STATUS

            51         0E A7     3C  001E   170 	MOVZWL	DMY$W_1STFREE(R7),R1		; GET OFFSET TO FREE SLOT

                          0F     13  0022   171 	BEQL	10$				; BRANCH ON NO FREE SPACE

            51            57     C0  0024   172 	ADDL2	R7,R1				; GET ADDR OF FREE SLOT

                       0C A7     B7  0027   173 	DECW	DMY$W_NUMFREE(R7)		; DEC COUNT OF FREE SLOTS

         0E A7            61     B0  002A   174 	MOVW	KEY$W_NEXT(R1),DMY$W_1STFREE(R7) ; SET NEW HEAD OF FREE LIST

                          61     B4  002E   175 	CLRW	KEY$W_NEXT(R1)			; CLEAN UP NEW SPACE

            50            01     9A  0030   176 	MOVZBL	#1,R0				; SET SUCCESS STATUS

                                 05  0033   177 10$:	RSB					; RETURN

GETNEXT                                                          22-AUG-1978 04:41:24   VAX-11 MACRO X0.3-11               Page   6

X01.00          RELEASE_SPACE                                                                                                    (5)



                                     0034   179 	.SBTTL	RELEASE_SPACE 

                                     0034   180 ;++

                                     0034   181 ; FUNCTIONAL DESCRIPTION:

                                     0034   182 ;

                                     0034   183 ;	THIS ROUTINE RELEASES AN ENTRY IN A NODE AND PLACES IT ON THE

                                     0034   184 ;	FREE ENTRY LIST FOR THE NODE.  THE NEXT AND PREVIOUS POINTERS 

                                     0034   185 ;	OF THE PREVIOUS AND NEXT ENTRIES, RESPECTIVELY, ARE UPDATED.

                                     0034   186 ;

                                     0034   187 ; CALLING SEQUENCE:

                                     0034   188 ;

                                     0034   189 ;	JSB	REL_SPACE

                                     0034   190 ;

                                     0034   191 ; INPUT PARAMETERS:

                                     0034   192 ;

                                     0034   193 ;	NONE

                                     0034   194 ;

                                     0034   195 ; IMPLICIT INPUTS:

                                     0034   196 ;

                                     0034   197 ;	R2 - CONTAINS THE ADDRESS OF THE NODE WHOSE ENTRY IS TO BE RELEASED

                                     0034   198 ;	R3 - CONTAINS THE ADDRESS OF THE ENTRY TO BE RELEASED

                                     0034   199 ;

                                     0034   200 ; OUTPUT PARAMETERS:

                                     0034   201 ;

                                     0034   202 ;	NONE

                                     0034   203 ;

                                     0034   204 ; IMPLICIT OUTPUTS:

                                     0034   205 ;

                                     0034   206 ;	NONE

                                     0034   207 ;

                                     0034   208 ; COMPLETION CODES:

                                     0034   209 ;

                                     0034   210 ;	NONE

                                     0034   211 ;

                                     0034   212 ; SIDE EFFECTS:

                                     0034   213 ;

                                     0034   214 ;	THE RELEASED ENTRY IS PLACED ON THE FREE HOLE LIST FOR THE NODE.

                                     0034   215 ;	THE POINTERS IN THE PREVIOUS AND NEXT ENTRIES ARE UPDATED.

                                     0034   216 ;

                                     0034   217 ;--

                                     0034   218 

                                     0034   219 

                                     0034   220 

                                     0034   221 REL_SPACE::

            7E            51     D0  0034   222 	MOVL	R1,-(SP)			; SAVE R1

            63         0E A2     B0  0037   223 	MOVW	DMY$W_1STFREE(R2),(R3)		; SET PNTR TO OLD 1ST FREE

            53            52     C3  003B   224 	SUBL3	R2,R3,R1			; GET OFFSET TO NEW FREE ENTRY

                          51         003E       

         0E A2            51     B0  003F   225 	MOVW	R1,DMY$W_1STFREE(R2)		; NEW FREE ENTRY IS 1ST

                       0C A2     B6  0043   226 	INCW	DMY$W_NUMFREE(R2)		; INC NUMBER OF FREE HOLES

            51            8E     D0  0046   227 	MOVL	(SP)+,R1			; RESTORE R1

                                 05  0049   228 	RSB					; RETURN

GETNEXT                                                          22-AUG-1978 04:41:24   VAX-11 MACRO X0.3-11               Page   7

X01.00          LOGICAL_INSERT                                                                                                   (6)



                                     004A   230 	.SBTTL	LOGICAL_INSERT 

                                     004A   231 ;++

                                     004A   232 ; FUNCTIONAL DESCRIPTION:

                                     004A   233 ;

                                     004A   234 ;	THIS ROUTINE LOGICALLY INSERTS AN ENTRY INTO A NODE.  THE NEXT

                                     004A   235 ;	AND PREV POINTERS ARE SET UP.  

                                     004A   236 ;

                                     004A   237 ; CALLING SEQUENCE:

                                     004A   238 ;

                                     004A   239 ;	JSB	LOG_INSRT_KEY

                                     004A   240 ;

                                     004A   241 ; INPUT PARAMETERS:

                                     004A   242 ;

                                     004A   243 ;	NONE

                                     004A   244 ;

                                     004A   245 ; IMPLICIT INPUTS:

                                     004A   246 ;

                                     004A   247 ;	R0 - CONTAINS THE OFFSET TO THE INSERTION POINT

                                     004A   248 ;	R1 - CONTAINS THE ADDRESS OF THE ENTRY TO BE INSERTED

                                     004A   249 ;	R7 - CONTAINS THE ADDRESS OF THE NODE TO GET THE INSERT

                                     004A   250 ;

                                     004A   251 ; OUTPUT PARAMETERS:

                                     004A   252 ;

                                     004A   253 ;	NONE

                                     004A   254 ;

                                     004A   255 ; IMPLICIT OUTPUTS:

                                     004A   256 ;

                                     004A   257 ;	NONE

                                     004A   258 ;

                                     004A   259 ; COMPLETION CODES:

                                     004A   260 ;

                                     004A   261 ;	NONE

                                     004A   262 ;

                                     004A   263 ; SIDE EFFECTS:

                                     004A   264 ;

                                     004A   265 ;	NONE

                                     004A   266 ;

                                     004A   267 ;--

                                     004A   268 

                                     004A   269 

                                     004A   270 

                                     004A   271 LOG_INSRT_KEY::

                          14     BB  004A   272 	PUSHR	#^M<R2,R4>			; ENTRY POINT (OR MASK)

            51            57     C3  004C   273 	SUBL3	R7,R1,R2			; GET OFFSET TO INSRT ENTRY

                          52         004F       

            61            50     B0  0050   274 	MOVW	R0,KEY$W_NEXT(R1)		; SET PNTR TO NEW ENTRY

            50            57     C1  0053   275 	ADDL3	R7,R0,R4			; GET ADDR OF NEXT ENTRY

                          54         0056       

         02 A1         02 A4     B0  0057   276 	MOVW	KEY$W_PREV(R4),KEY$W_PREV(R1)	; SET LINK PREV OF NEW ENTRY

         02 A4            52     B0  005C   277 	MOVW	R2,KEY$W_PREV(R4)		; SET OLD ENTRY'S LINK PREV

            54         02 A1     3C  0060   278 10$:	MOVZWL	KEY$W_PREV(R1),R4		; SET NEXT OF OLD ENTRY

            54            57     C0  0064   279 	ADDL2	R7,R4				; GET ADDR PREV TO INSERT

            64            52     B0  0067   280 	MOVW	R2,KEY$W_NEXT(R4)		; POINT OLD ENTRY TO NEW

                          14     BA  006A   281 	POPR	#^M<R2,R4>			; RESTORE REGISTERS

                                 05  006C   282 	RSB					; RETURN

GETNEXT                                                          22-AUG-1978 04:41:24   VAX-11 MACRO X0.3-11               Page   8

X01.00          LOGICAL_DELETE                                                                                                   (7)



                                     006D   284 	.SBTTL	LOGICAL_DELETE 

                                     006D   285 ;++

                                     006D   286 ; FUNCTIONAL DESCRIPTION:

                                     006D   287 ;

                                     006D   288 ;	THIS ROUTINE LOGICALLY DELETES AN ENTRY FROM A NODE.  IT

                                     006D   289 ;	UPDATES THE POINTERS IN THE PREVIOUS AND NEXT ENTRIES.

                                     006D   290 ;

                                     006D   291 ; CALLING SEQUENCE:

                                     006D   292 ;

                                     006D   293 ;	JSB	LOG_DELETE_KEY

                                     006D   294 ;

                                     006D   295 ; INPUT PARAMETERS:

                                     006D   296 ;

                                     006D   297 ;	NONE

                                     006D   298 ;

                                     006D   299 ; IMPLICIT INPUTS:

                                     006D   300 ;

                                     006D   301 ;	R2 - CONTAINS THE ADDRESS OF THE NODE

                                     006D   302 ;	R3 - CONTAINS THE ADDRESS OF THE ENTRY TO DELETE

                                     006D   303 ;

                                     006D   304 ; OUTPUT PARAMETERS:

                                     006D   305 ;

                                     006D   306 ;	NONE

                                     006D   307 ;

                                     006D   308 ; IMPLICIT OUTPUTS:

                                     006D   309 ;

                                     006D   310 ;	NONE

                                     006D   311 ;

                                     006D   312 ; COMPLETION CODES:

                                     006D   313 ;

                                     006D   314 ;	NONE

                                     006D   315 ;

                                     006D   316 ; SIDE EFFECTS:

                                     006D   317 ;

                                     006D   318 ;	NONE

                                     006D   319 ;

                                     006D   320 ;--

                                     006D   321 

                                     006D   322 

                                     006D   323 

                                     006D   324 LOG_DELETE_KEY::

            7E            51     D0  006D   325 	MOVL	R1,-(SP)			; SAVE R1

            51            63     3C  0070   326 	MOVZWL	KEY$W_NEXT(R3),R1		; GET OFFSET TO NEXT ENTRY

            51            52     C0  0073   327 	ADDL2	R2,R1				; GET ADDR OF NEXT ENTRY

         02 A1         02 A3     B0  0076   328 	MOVW	KEY$W_PREV(R3),KEY$W_PREV(R1)	; SET PREV TO PREV OF DELETED

            51         02 A3     3C  007B   329 	MOVZWL	KEY$W_PREV(R3),R1		; GET OFFSET TO PREV ENTRY

            51            52     C0  007F   330 	ADDL2	R2,R1				; GET ADDR OF PREV ENTRY

            61            63     B0  0082   331 	MOVW	KEY$W_NEXT(R3),KEY$W_NEXT(R1)	; SET NEXT TO NEXT OF DELETED

            51            8E     D0  0085   332 	MOVL	(SP)+,R1			; RESTORE R1

                                 05  0088   333 	RSB					; RETURN

GETNEXT                                                          22-AUG-1978 04:41:24   VAX-11 MACRO X0.3-11               Page   9

X01.00          TRANSFER_ENTRY                                                                                                   (8)



                                     0089   335 	.SBTTL	TRANSFER_ENTRY 

                                     0089   336 ;++

                                     0089   337 ; FUNCTIONAL DESCRIPTION:

                                     0089   338 ;

                                     0089   339 ;	THIS ROUTINE TRANSFERS AN ENTRY FROM THE LINK-UP THROUGH THE

                                     0089   340 ;	DATA PORTION OF THE ENTRY.  THE NEXT AND PREV OFFSETS ARE LEFT

                                     0089   341 ;	UNTOUCHED.

                                     0089   342 ;

                                     0089   343 ; CALLING SEQUENCE:

                                     0089   344 ;

                                     0089   345 ;	JSB	TRANS_ENTRY

                                     0089   346 ;

                                     0089   347 ; INPUT PARAMETERS:

                                     0089   348 ;

                                     0089   349 ;	NONE

                                     0089   350 ;

                                     0089   351 ; IMPLICIT INPUTS:

                                     0089   352 ;

                                     0089   353 ;	R1 - CONTAINS THE ADDRESS TO RECEIVE THE ENTRY

                                     0089   354 ;	R5 - CONTAINS THE ADDRES OF THE ENTRY TO MOVE

                                     0089   355 ;	R6 - CONTAINS THE ADDRESS OF THE TREE LISTHEAD

                                     0089   356 ;

                                     0089   357 ; OUTPUT PARAMETERS:

                                     0089   358 ;

                                     0089   359 ;	NONE

                                     0089   360 ;

                                     0089   361 ; IMPLICIT OUTPUTS:

                                     0089   362 ;

                                     0089   363 ;	NONE

                                     0089   364 ;

                                     0089   365 ; COMPLETION CODES:

                                     0089   366 ;

                                     0089   367 ;	NONE

                                     0089   368 ;

                                     0089   369 ; SIDE EFFECTS:

                                     0089   370 ;

                                     0089   371 ;	NONE

                                     0089   372 ;

                                     0089   373 ;--

                                     0089   374 

                                     0089   375 

                                     0089   376 

                                     0089   377 TRANS_ENTRY::

                          2C     BB  0089   378 	PUSHR	#^M<R2,R3,R5>			; ENTRY POINT (OR MASK)

                          51     DD  008B   379 	PUSHL	R1				; SAVE R1

            52         04 A6     3C  008D   380 	MOVZWL	CRF$W_ENTSIZE(R6),R2		; GET SIZE OF AN ENTRY

            53            04     9A  0091   381 	MOVZBL	#KEY$L_LINKUP,R3		; GET OFFSET TO LINK-UP

            52            53     C2  0094   382 	SUBL2	R3,R2				; GET NUMBER OF BYTES TO MOVE

            51            53     C0  0097   383 	ADDL2	R3,R1				; ADD OFFSET TO RECEIVE

            55            53     C0  009A   384 	ADDL2	R3,R5				; ADD OFFSET TO MOVE ENTRY

            81            85     90  009D   385 10$:	MOVB	(R5)+,(R1)+			; MOVE ONE BYTE

            FA            52     F5  00A0   386 	SOBGTR	R2,10$				; REPEAT FOR EACH BYTE

            51            8E     D0  00A3   387 	MOVL	(SP)+,R1			; RESTORE R1

                          2C     BA  00A6   388 	POPR	#^M<R2,R3,R5>			; RESTORE REGISTERS

                                 05  00A8   389 	RSB					; RETURN

GETNEXT                                                          22-AUG-1978 04:41:24   VAX-11 MACRO X0.3-11               Page  10

X01.00          MOVE_ENTRY                                                                                                       (9)



                                     00A9   391 	.SBTTL	MOVE_ENTRY 

                                     00A9   392 ;++

                                     00A9   393 ; FUNCTIONAL DESCRIPTION:

                                     00A9   394 ;

                                     00A9   395 ;	THIS ROUTINE MOVES AND ENTRY FROM ONE NODE TO ANOTHER.

                                     00A9   396 ;	IT REQUESTS ENTRY SPACE FROM THE RECEIVING NODE AND RELEASES

                                     00A9   397 ;	ENTRY SPACE IN THE SENDING NODE.  THE NEXT AND PREVIOUS POINTERS

                                     00A9   398 ;	IN BOTH NODES ARE UPDATED.

                                     00A9   399 ;

                                     00A9   400 ; CALLING SEQUENCE:

                                     00A9   401 ;

                                     00A9   402 ;	JSB	MOVE_ENTRY

                                     00A9   403 ;

                                     00A9   404 ; INPUT PARAMETERS:

                                     00A9   405 ;

                                     00A9   406 ;	NONE

                                     00A9   407 ;

                                     00A9   408 ; IMPLICIT INPUTS:

                                     00A9   409 ;

                                     00A9   410 ;	R2 - CONTAINS THE ADDRESS OF THE NODE CONTAINING THE ENTRY

                                     00A9   411 ;	R3 - CONTAINS THE ADDRESS OF THE ENTRY TO MOVE

                                     00A9   412 ;	R7 - CONTAINS THE ADDRESS OF THE NODE TO RECEIVE THE ENTRY

                                     00A9   413 ;	CRF_TEMP_INSRT - CONATINS THE ADDRESS OF THE LOGICAL INSERTION ENTRY

                                     00A9   414 ;

                                     00A9   415 ; OUTPUT PARAMETERS:

                                     00A9   416 ;

                                     00A9   417 ;	NONE

                                     00A9   418 ;

                                     00A9   419 ; IMPLICIT OUTPUTS:

                                     00A9   420 ;

                                     00A9   421 ;	R0 - CONTAINS EITHER:

                                     00A9   422 ;		A ONE INDICATING THE LOGICAL ENTRY WAS MOVED

                                     00A9   423 ;		A ZERO INDICATING THE LOGICAL ENTRY WAS NOT MOVED

                                     00A9   424 ;	R1 - CONTAINS THE ADDRESS OF THE NEW ENTRY

                                     00A9   425 ;	R3 - CONTAINS THE ADDRESS OF THE NEXT ENTRY OR A ZERO INDICATING

                                     00A9   426 ;		THERE IS NO NEXT ENTRY

                                     00A9   427 ;

                                     00A9   428 ; COMPLETION CODES:

                                     00A9   429 ;

                                     00A9   430 ;	NONE

                                     00A9   431 ;

                                     00A9   432 ; SIDE EFFECTS:

                                     00A9   433 ;

                                     00A9   434 ;	NONE

                                     00A9   435 ;

                                     00A9   436 ;--

                                     00A9   437 

                                     00A9   438 

                                     00A9   439 

                                     00A9   440 MOVE_ENTRY::

                          FF70   30  00A9   441 	BSBW	REQ_SPACE			; GET ADDR OF TARGET ENTRY

            50            67     3C  00AC   442 	MOVZWL	DMY$W_FIRST(R7),R0		; ASSUME RIGHT ROTATION

                     0000'CF     95  00AF   443 	TSTB	W^CRF_INSRT_FLAG		; RIGHT ROTATION?

                          02     13  00B3   444 	BEQL	10$				; BRANCH ON YES

                          50     D4  00B5   445 	CLRL	R0				; NO, ROTATE LEFT

                          FF90   30  00B7   446 10$:	BSBW	LOG_INSRT_KEY			; LOGICALLY INSERT ENTRY

                                     00BA   447 MOVE_ENTRY_1::

GETNEXT                                                          22-AUG-1978 04:41:24   VAX-11 MACRO X0.3-11               Page  11

X01.00          MOVE_ENTRY                                                                                                       (9)



            55            53     D0  00BA   448 	MOVL	R3,R5				; GET ADDR TO MOVE

                          FFC9   30  00BD   449 	BSBW	TRANS_ENTRY			; MOVE ENTRY TO NEW NODE

            7E            51     D0  00C0   450 	MOVL	R1,-(SP)			; SAVE NEW ENTRY ADDR

                          FF3A   30  00C3   451 	BSBW	GET_NXT_PRV			; GET NEXT ENTRY ADDR

                          FFA4   30  00C6   452 	BSBW	LOG_DELETE_KEY			; LOGICALLY DELETE OLD ENTRY

            50            01     9A  00C9   453 	MOVZBL	#1,R0				; ASSUME WAS A LOGICAL ENTRY

       0000'CF            53     D1  00CC   454 	CMPL	R3,W^CRF_TEMP_INSRT		; ENTRY PHYSICALLY IN NODE?

                          05     13  00D1   455 	BEQL	20$				; NO, ONLY LOGICALLY, BRANCH

                          FF5E   30  00D3   456 	BSBW	REL_SPACE			; YES, RELEASE THE SPACE

                          50     D4  00D6   457 	CLRL	R0				; LOGICAL ENTRY NOT MOVED

            53            51     D0  00D8   458 20$:	MOVL	R1,R3				; SET NEXT ENTRY IN CONTAIN NODE

            51            8E     D0  00DB   459 	MOVL	(SP)+,R1			; SET NEW ENTRY IN RECEIVE NODE

                                 05  00DE   460 	RSB					; RETURN

                                     00DF   461 	.END

GETNEXT                                                          22-AUG-1978 04:41:24   VAX-11 MACRO X0.3-11               Page  12

SYMBOL TABLE                                                                                                                     (9)



BIT...         = 006580AA            FLD$B_SET_CLR  = 00000002            

CRF$B_FLAGS      00000009            FLD$K_LENGTH   = 0000000C            

CRF$B_IR_DEFIND  00000014            FLD$L_FAODSC   = 00000004            

CRF$B_KEYTYPE    00000008            FLD$W_MASK     = 00000000            

CRF$B_OU_PAG1    0000000C            GBL...         = 00000000            

CRF$B_OU_PRTIND  00000014            GET_NXT_PRV      00000000 RG    03   

CRF$B_OU_SAVIND  00000018            HIS$K_ENTRYSIZE= 00000010            

CRF$B_OU_SUCPAG  00000010            HIS$K_LISTSIZE = 00000070            

CRF$K_FACILCOD = 00000065            HIS$L_FATHER   = FFFFFFF0            

CRF$L_ERROR      0000000C            HIS$L_FATHROFF = FFFFFFF4            

CRF$L_IK_CTLTBL  00000004            HIS$L_LEFTBRO  = FFFFFFF8            

CRF$L_IK_KEYADR  00000008            HIS$L_LEFTSON  = 00000008            

CRF$L_IK_VALADR  0000000C            HIS$L_LINKUP   = 00000008            

CRF$L_IR_CTLTBL  00000004            HIS$L_LINKUPOFF= 0000000C            

CRF$L_IR_KEYADR  00000008            HIS$L_NODE     = 00000000            

CRF$L_IR_REFADR  0000000C            HIS$L_NTH      = 0000000C            

CRF$L_K1FMTBL    00000014            HIS$L_OFFSET   = 00000004            

CRF$L_K2FMTBL    00000018            HIS$L_RIGHTBRO = FFFFFFFC            

CRF$L_OUTPUT     00000010            HIS$L_RIGHTSON = 0000000C            

CRF$L_OU_CTLTBL  00000004            HIS$L_TOP      = 00000004            

CRF$L_OU_LINWID  00000008            KEY$B_DEFLNG   = 00000018            

CRF$L_R1FMTBL    00000024            KEY$K_DATASIZE = 0000001C            

CRF$L_R2FMTBL    00000028            KEY$K_SIZE     = 00000028            

CRF$L_ROOT       00000000            KEY$L_DATA     = 0000000C            

CRF$L_V1FMTBL    0000001C            KEY$L_KEYADDR  = 00000008            

CRF$L_V2FMTBL    00000020            KEY$L_LINKUP   = 00000004            

CRF$W_ENTSIZE    00000004            KEY$L_REFLIST  = 00000010            

CRF$W_ERRSTS     0000000A            KEY$L_VALADDR  = 0000000C            

CRF$W_IK_VALFLG  00000010            KEY$T_DEFNAME  = 00000019            

CRF$W_IR_REFLAG  00000010            KEY$W_DEFFLAG  = 00000016            

CRF$W_NODSIZE    00000006            KEY$W_NEXT     = 00000000            

CRF$_BLDNODFAIL= 00658052            KEY$W_PREV     = 00000002            

CRF$_BLKWTHINBL= 00658072            KEY$W_VALFLAG  = 00000014            

CRF$_EXPREGFAIL= 0065806A            LOG_DELETE_KEY   0000006D RG    03   

CRF$_FAILINSRT = 0065807A            LOG_INSRT_KEY    0000004A RG    03   

CRF$_FAOFAIL   = 0065809A            MOVE_ENTRY       000000A9 RG    03   

CRF$_FOUNDKEY  = 00658021            MOVE_ENTRY_1     000000BA RG    03   

CRF$_HISTOVRFLO= 00658062            NOD$K_1STFREE  = 00000010            

CRF$_ILLBLKSIZE= 00658082            NOD$K_NUMFREE  = 0000000C            

CRF$_KEY1STENTR= 00658011            NOD$K_SIZE     = 000001F0            

CRF$_KEYPRVENTR= 00658009            REF$B_REFLNG   = 00000006            

CRF$_KEYTYPE   = 006580A2            REF$K_SIZE     = 00000016            

CRF$_LINELNG   = 00658092            REF$L_FLINK    = 00000000            

CRF$_NO_OUTRTN = 0065808A            REF$T_REFNAME  = 00000007            

CRF$_REFLNG    = 0065805A            REF$W_REFFLAG  = 00000004            

CRF$_REFPRVENTR= 00658019            REL_SPACE        00000034 RG    03   

CRF$_SUCCESS   = 00658001            REQ_SPACE        0000001C RG    03   

CRF_INSRT_FLAG   ********   X   03   TRANS_ENTRY      00000089 RG    03   

CRF_TEMP_INSRT   ********   X   03   

DMY$K_SIZE     = 00000010            

DMY$L_KEYADDR  = 00000008            

DMY$L_LINKUP   = 00000004            

DMY$W_1STFREE  = 0000000E            

DMY$W_FIRST    = 00000000            

DMY$W_LAST     = 00000002            

DMY$W_NUMFREE  = 0000000C            

FLD$B_MAXLNG   = 00000003            

GETNEXT                                                          22-AUG-1978 04:41:24   VAX-11 MACRO X0.3-11               Page  13

PROGRAM SECTION SYNOPSIS                                                                                                         (9)







PROGRAM SECTION SYNOPSIS



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

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

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

CRF$CODE         000000DF      03       PIC   USR   CON   REL   LCL   SHR   EXE   RD  NOWRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

23568. BYTES LEFT IN FREE MEMORY POOL.

1308. BYTES OF RECLAIMED MEMORY.

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

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

