DRDEX	X0006 - READ EXTENSION 	MACRO M1110  21-AUG-78 20:11  PAGE 3





      1	000000					$BEGIN	DRDEX,0006,<READ EXTENSION HEADER FROM DISK>

						.TITLE	DRDEX	X0006 - READ EXTENSION HEADER FROM DISK

						.IDENT	"X0006"

      2

      3					;

      4					; COPYRIGHT (C) 1976 BY DIGITAL EQUIPMENT CORPORATION,

      5					; MAYNARD, MASSACHUSETTS

      6					;

      7					; THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A

      8					; SINGLE  COMPUTER  SYSTEM AND MAY BE COPIED ONLY WITH THE IN-

      9					; CLUSION OF THE ABOVE COPYRIGHT NOTICE.   THIS  SOFTWARE,  OR

     10					; ANY  OTHER  COPIES THEREOF, MAY NOT BE PROVIDED OR OTHERWISE

     11					; MADE AVAILABLE TO ANY OTHER PERSON EXCEPT FOR  USE  ON  SUCH

     12					; SYSTEM  AND TO ONE WHO AGREES TO THESE LICENSE TERMS.  TITLE

     13					; TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL  TIMES  REMAIN

     14					; IN DIGITAL.

     15					;

     16					; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITH-

     17					; OUT  NOTICE  AND  SHOULD NOT BE CONSTRUED AS A COMMITMENT BY

     18					; DIGITAL EQUIPMENT CORPORATION.

     19					;

     20					; DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY  FOR

     21					; THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT WHICH IS

     22					; NOT SUPPLIED BY DIGITAL.

     23					;

     24					; ANDREW C. GOLDSTEIN  16-AUG-76  2:47

DRDEX	X0006 - READ EXTENSION 	MACRO M1110  21-AUG-78 20:11  PAGE 4





     26					;+

     27					;

     28					; *** - $DRDEX	READ EXTENSION HEADER FROM DISK

     29					;

     30					; THIS ROUTINE READS THE NEXT EXTENSION HEADER OF THE CURRENT INPUT

     31					; FILE, IF IT EXISTS.

     32					;

     33					; INPUTS:

     34					;

     35					;	CURRENT FILE HEADER IN $IHBF

     36					;

     37					; OUTPUTS:

     38					;

     39					;	CC - C	CLEAR IF EXTENSION HEADER READ

     40					;		SET IF ERROR OR NONE

     41					;	NEW FILE HEADER IN $IHBF AND $BUF2

     42					;

     43					;-

     44

     45	000000				$DRDEX::

     46	000000					$CALL $FILSZ <,,,,,#$IHBF>	; COMPUTE SIZE OF PRESENT HEADER

     47	000010					LET H.VBN(R5) := H.VBN(R5) + R1	; ADD TO STARTING VBN

     48	000014					LET H.VBN+2(R5) := H.VBN+2(R5) + CARRY + R0

     49	000024					LET R4 := #$IHHD		; GET HEADER BCB

     50	000030					LET B.STAT(R4) := #0		; RELEASE OLD HEADER

     51	000034					$CALL $RDNXH <,,,,R4,R5>	; TRY TO READ HEADER

     52	000040					ON.ERROR

     53	000042					  ERRP ER.RXD			; PRINT MESSAGE

     54	000044					  RETURN

     55	000046					END

     56

     57	000046					$CALL $FILSZ <,,,,,R5>		; COMPUTE SIZE OF NEW HEADER

     58	000052					LET $IHVBN := $IHVBN + R1	; AND ACCUMULATE IT

     59	000056					LET $IHVBN+2 := $IHVBN+2 + CARRY + R0

     60	000066					$CALL $BUFCK <,,,,#$B2HD>	; GET I/O BUFFER

     61	000076					LET B.STAT(R4) := #1		; MARK BUFFER BUSY

     62	000104					LET R0 := #$BUF2		; POINT TO BUFFER DATA

     63	000110					LET (R0)+ := #512.		; BYTE COUNT

     64	000114					LET (R0)+ := #PF.HDR		; FLAG AS FILE HEADER

     65	000120					LET (R0)+ := #0			; VBN

     66	000122					LET (R0)+ := #0

     67	000124					LET (R0)+ := $FID		; USE FILE ID OF

     68	000130					LET (R0)+ := $FID+2		; PRIMARY HEADER

     69	000134					LET (R0)+ := $FID+4

     70	000140					LET (R0)+ := #0

     71	000142					THRU R1 := #256.

     72	000146					  LET (R0)+ := (R5)+		; COPY HEADER FROM $IHBF

     73	000150					END LOOP

     74	000154					RETURN

     75

     76

     77

     78		000001 				.END

DRDEX	X0006 - READ EXTENSION 	MACRO M1110  21-AUG-78 20:11  PAGE 4-1

SYMBOL TABLE



A3    = 000001   	L0      000046R  	$DRDEX  000000RG 	$IHVBN= ****** GX	$SUPMC= 000043

B.STAT= ****** GX	PF.HDR= ****** GX	$EF$  = 000000   	$I$   = 000001   	$T    = 000001

B0      000146R  	TYPS0 = 000006   	$E$   = 000001   	$L    = 000001   	$T1   = 000006

ER.RXD= ****** GX	$BUFCK= ****** GX	$FID  = ****** GX	$L$   = 000000   	$T2   = 000000

E0      000154R  	$BUF2 = ****** GX	$FILSZ= ****** GX	$O$   = 000000   	$Y$   = 000000

H.VBN = ****** GX	$B2HD = ****** GX	$IHBF = ****** GX	$R    = 177777   	$Z$   = 000000

IIII  = 177777   	$DIDDO= 000000   	$IHHD = ****** GX	$RDNXH= ****** GX	.$T   = 000005

LBLS0 = 000000



. ABS.	000000	   000

      	000156	   001

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  11293 WORDS  ( 45 PAGES)

DYNAMIC MEMORY:  12276 WORDS  ( 47 PAGES)

ELAPSED TIME:  00:00:53

EXE$:DRDEX,LIS$:DRDEX/-SP=SRC$:SMAC/PA:1,DSCPRE,DRDEX

