/ 
/ 
/                   FIRST PRINTING, FEBRUARY 1974
/ 
/ THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO 
/ CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED
/ AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
/ DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPON-
/ SIBILITY FOR ANY ERRORS THAT MAY APPEAR IN THIS
/ DOCUMENT.
/ 
/ THE SOFTWARE DESCRIBED IN THIS DOCUMENT IS FUR-
/ NISHED TO THE PURCHASER UNDER A LICENSE FOR USE ON
/ A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH
/ INCLUSION OF DIGITAL'S COPYRIGHT NOTICE) ONLY FOR 
/ USE IN SUCH SYSTEM, EXCEPT AS MAY OTHERWISE BE PRO-
/ VIDED IN WRITING BY DIGITAL.
/ 
/ DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY
/ FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIP-
/ MENT THAT IS NOT SUPPLIED BY DIGITAL.
/ 
/ COPYRIGHT (C) 1974, BY DIGITAL EQUIPMENT CORPORATION
/ 
/ 
        .EJECT
/	EDIT #2
/
/COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/
/		13 AUG 73	T.MURRAY
/
/	MTGET AND MTPUT SUBROUTINE
/
/	MTGET - FORTRAN CALLABLE ENTRY POINT TO
/		DO A MAGTAPE GET
/
/	MTPUT - FORTRAN CALLABLE ENTRY POINT TO
/		DO A MAGTAPE PUT
/
/	CALLING SEQUENCE
/		CALL MTGET/MTPUT (LUN,IBUFF,NW,CTB[,EV])
/
/		LUN	LOGICAL UNIT NUMBER
/		IBUF	CORE STARTING ADDRESS
/		NW	NUMBER OF WORDS TO TRANSFER
/		CTB	THREE WORD INTEGER ARRAY TO BE USED
/			AS A CONTROL TABLE
/			CTB(1) CORE START ADDRESS
/			CTB(2) NUMBER OF WORDS TO TRANSFER (IF MTGET,
/			IS NUMBER OF WORDS GOTTEN WHEN COMPLETED)
/			CTB(3) "MAGTAPE STATUS"
/		EV	EVENT VARIABLE, OPTIONAL
/
IDX=ISZ
 
	.GLOBL	MTGET,  MTPUT,  .DAA
 
MTGET	0		/MTGET ENTRY
	LAC	MTGET	/SET RETURN POINT
	DAC	GETPUT
	CLA		/CLEAR BITS TO FORM CPB CODE
	JMP	ENTRY	/GOTO COMMON ENTRY
 
MTPUT	0		/MTPUT ENTRY
	LAC	MTPUT	/SET RETURN POINT
	DAC	GETPUT
	LAC	(100)	/SET BITS TO FORM PUT CPB
 
ENTRY	ADD	(3000)	/3000 = GET, 3100 = PUT
	DAC	CPB
	SKP		/SKIP RETURN POINT, WHICH MUST SHOW UP JUST
 
GETPUT	0		/BEFORE .DAA CALL FOR .DAA TO WORK
	JMS*	.DAA
	JMP	ARGEND
LUN	0
IBUF	0
NW	0
CTB	0
IEV	0
 
ARGEND	LAC	IEV	/DEFINE EV ADDRESS IN CPB
	DAC	EV	/RESET IT T0 ZERO IN CASE IS NOT SPECIFIED
	DZM	IEV
	LAC*	LUN	/GET LUN
	DAC	ILUN	/..SET IT INTO CPB
	LAC	CTB	/GET CONTROL TABLE ADDRESS..
	DAC	CTA	/..SET IT INTO CPB..
	DAC	TEMP	/.. AND INTO TEMP 
	LAC	IBUF	/GET START ADDRESS
	DAC*	TEMP	/..PUT INTO FIRST WORD OF CTA
	LAC*	NW	/GET NUMBER OF WORDS TO TRANSFER
	IDX	TEMP	/PUT INTO SECOND WORD OF CTA
	DAC*	TEMP
	CAL	CPB	/EXECUTE GET/PUT
	JMP*	GETPUT
 
CPB	0		/3000 IF GET OR 3100 IF PUT
EV	0		/EVENT VARIABLE ADDRESS
ILUN	0		/LUN
CTA	0		/CONTROL TABLE ADDRESS
TEMP	0		/TEMP STOREAGE FOR A POINTER TO CTA
/	.DSECT  CONTROL TABLE
/BUFF		START ADDRESS
/WORDC		NUMBER OF WORDS TO TRANSFER
/STATUS		STATUS WORD
 
	.END
