TRDDA	X0005 - READ FILE DATA 	MACRO M1110  21-AUG-78 21:18  PAGE 3





      1	000000					$BEGIN	TRDDA,0005,<READ FILE DATA FROM TAPE>

						.TITLE	TRDDA	X0005 - READ FILE DATA FROM TAPE

						.IDENT	"X0005"

      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  15-AUG-76  20:32

     25					; GEORGE RITTENBURG 7-APR-77  MODIFIED FOR VFY/CMP FOR DISK TO/FROM TAPE

     26						.MCALL ALUN$S

TRDDA	X0005 - READ FILE DATA 	MACRO M1110  21-AUG-78 21:18  PAGE 4





     28					;+

     29					;

     30					; *** - $TRDDA	READ FILE DATA FROM TAPE

     31					;

     32					; THIS ROUTINE INITIATES A READ OPERATION FROM THE OUTPUT

     33					; TAPE.

     34					;

     35					; INPUTS:

     36					;

     37					;	R1 = BLOCK COUNT

     38					;	R4 = BUFFER DESCRIPTOR ADDRESS

     39					;

     40					; OUTPUTS:

     41					;

     42					;	READ OPERATION INITIATED

     43					;	R4 PRESERVED, OTHER REGISTERS CLOBBERED

     44					;

     45					;-

     46

     47	000000				$TRDDO::

     48	000000					LET $FLAG1 := $FLAG1 SET.BY #KY.NIP  ;FLAG O.P.

     49	000006					PUSH $INDEV	;SAVE PTR TO CURR. IP DEV

     50	000012					LET R0 := $OUDEV

     51	000016					LET R3 := #INLUN

     52	000022					ALUN$S  R3,(R0),2(R0)  	;ASGN LUN TO O.P.

     53	000040					$CALL  $BUFCK  <,,,,R4>   ;CHECK BUFFER

     54	000044					DCOMP  $WVBN+2,$WVBN,$OHVBN+2,$OHVBN  ;CHECK VBN

     55	000062					IF RESULT IS HI GOTO NXTEXT

     56	000064					LET $WVBN := $WVBN + R1	;INCREMENT VBN

     57	000070					LET $WVBN+2 := $WVBN+2 + CARRY

     58	000074	000301 				SWAB R1			;CONVERT TO BYTES

     59	000076	006301 				ASL R1

     60	000100					LET R1 := R1 + #P.SIZ  ;ADD PREAMBLE SIZE

     61	000104					$CALL  $READ   <,R1,,,R4>  ;INITIATE READ

     62	000110					LET $FLAG1 := $FLAG1 OFF.BY #KY.NIP  ; RESET FOR I.P.

     63	000116					POP R0

     64	000120					LET R3 := #INLUN

     65	000124					ALUN$S  R3,(R0),2(R0)	;RE-ASGN LUN TO I.P.

     66	000142					RETURN

     67	000144				NXTEXT:

     68	000144					$CALL  $TRDEX			; READ EXT. HDR

     69	000150					GOTO $TRDDO			;GET DATA FROM NEXT EXTENT

     70

TRDDA	X0005 - READ FILE DATA 	MACRO M1110  21-AUG-78 21:18  PAGE 5





     72	000152				$TRDDA::

     73	000152					$CALL $BUFCK <,,,,R4>		; WAIT FOR BUFFER

     74	000156					DCOMP $VBN+2,$VBN, $IHVBN+2,$IHVBN

     75	000174					IF RESULT IS HI GOTO EXIT	; OFF END OF SECTION

     76	000176					LET $VBN := $VBN + R1		; BUMP VBN BY BLOCKS

     77	000202					LET $VBN+2 := $VBN+2 + CARRY

     78	000206	000301 				SWAB R1				; CONVERT TO BYTE COUNT

     79	000210	006301 				ASL R1

     80	000212					LET R1 := R1 + #P.SIZ		; TOTAL BYTE COUNT

     81	000216					$CALL $READ <,R1,,,R4>		; START THE READ

     82	000222					RETURN

     83					;

     84					; TO HERE TO SET UP A DUMMY READ FOR A ZERO BYTE COUNT

     85					;

     86	000224				EXIT:	LET B.SIZ+P.CNT(R4) := #0	; ZERO COUNT

     87	000230					LET 2(R4) := #0

     88	000234					LET (R4) := #1			; SUCCESSFUL COMPLETION

     89	000240					LET B.STAT(R4) := #3		; READ IN PROGRESS

     90	000246					$CALL $LINKI <,,,,R4>		; LINK ONTO WAIT LIST

     91	000252					RETURN

     92

     93

     94

     95		000001 				.END

TRDDA	X0005 - READ FILE DATA 	MACRO M1110  21-AUG-78 21:18  PAGE 5-1

SYMBOL TABLE



B.SIZ = ****** GX	P.CNT = ****** GX	$IHVBN= ****** GX	$O$   = 000000   	$TRDEX= ****** GX

B.STAT= ****** GX	P.SIZ = ****** GX	$INDEV= ****** GX	$R    = 177777   	$VBN  = ****** GX

EXIT    000224R  	TYPS0 = 000000   	$I$   = 000001   	$READ = ****** GX	$WVBN = ****** GX

IIII  = 177777   	$BUFCK= ****** GX	$L    = 000000   	$SUPMC= 000043   	$Y$   = 000000

INLUN = ****** GX	$DIDDO= 000000   	$LINKI= ****** GX	$T    = 000000   	$Z$   = 000000

KY.NIP= ****** GX	$EF$  = 000000   	$L$   = 000000   	$TRDDA  000152RG 	$$TT  = 000000

LBLS0 = 000000   	$E$   = 000001   	$OHVBN= ****** GX	$TRDDO  000000RG 	.$T   = 000005

NXTEXT  000144R  	$FLAG1= ****** GX	$OUDEV= ****** GX



. ABS.	000000	   000

      	000254	   001

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  11376 WORDS  ( 45 PAGES)

DYNAMIC MEMORY:  12276 WORDS  ( 47 PAGES)

ELAPSED TIME:  00:00:56

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

