/ 
/ 
/                   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 #1
/
/COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/
/		14 JUN 73  T.MURRAY
/		28 JAN 74 M. HEBENSTREIT
/
/	DSKGET AND DSKPUT SUBROUTINE
/
/	DSKGET - FORTRAN CALLABLE ENTRY POINT TO TRANSFER DATA
/		FROM A DISK TO AN ARRAY
/	DSKPUT - FORTRAN CALLABLE ENTRY POINT TO TRANSFER DATA
/		FROM AN ARRAY TO DISK
/
/	CALLING SEQUENCE:
/		CALL DSKGET/DSKPUT (CTB,OFFSET,WORDS,ARRAY,
/		+	DVCODE,UNIT,EV)
/	WHERE
/		CTB	7 WORD CONTROL TABLE
/			CTB(1) TO CTB(3) = CONTROL TABLE
/			RETURNED BY DSKAL SUBROUTINE
/			CTB(4) TO CTB(7) RESERVED, USED BY THIS SUB-
/			ROUTINE AS GET/PUT CTB
/		OFFSET	DISK ADDRESS OFFSET
/		WORDS	NUMBER OF WORDS TO TRANSFER
/		ARRAY	CORE ADDRESS AT WHICH TRANSFER BEGINS
/		DVCODE	DISK DEVICE CODE
/		UNIT	DISK DEVICE UNIT NUMBER
/		EV	EVENT VARIABLE ADDRESS
/
IDX=ISZ
	.GLOBL	DSKGET,  DSKPUT,  .DAA
 
DSKGET	0		/DSKGET ENTRY
	LAC	DSKGET	/MOVE RETURN POINT
	DAC	GETPUT
	CLA		/CLEAR BITS TO FORM CPB CODE
	JMP	ENTRY	/GOTO COMMON ENTRY
 
 
DSKPUT	0		/DSKPUT ENTRY
	LAC	DSKPUT	/MOVE RETURN POINT
	DAC	GETPUT
	LAC	(100)	/SET BITS TO FORM PUT CPB CODE
 
ENTRY	TAD	(13000)	/COMPLETE GET (13000) OR PUT (13100)
	DAC	CPB	/FUNCTION CODE
	SKP		/SKIP RETURN POINT, WHICH MUST SHOW UP
 
GETPUT	0
	JMS*	.DAA	/JUST BEFORE .DAA CALL FOR .DAA TO WORK
	JMP	ARGEND
TBLADR	0
OFFSET	0
WORDS	0
ARRAY	0
DVCODE	0
UNIT	0
EVNTV	0
 
ARGEND	LAC	EVNTV	/MOVE EVENT VAR. ADDRESS.  THEN CLEAR
	DAC	REQEV	/POINTER, SINCE THIS PARAMETER IS OPTIONAL.
	DZM	EVNTV
 
	LAC*	DVCODE	/MOVE DEVICE CODE TO 5TH WORD OF
	DAC	DSKTYP	/GET/PUT CPB
 
	LAC	TBLADR	/GET PASSED CTB ADDRESS  
	IAC		/SAVE ADDR. OF WD 1 OF CTA
	DAC	TABTMP
	AAC	2	/  DEFINE START OF GET/PUT CPB,
	DAC	CTBADR	/LAST 4 WORDS OF TBLADR.
 
	LAC*	UNIT	/GET THE UNIT NUMBER
	LRS!10000  3	/CLQ, THEN LEFT JUSTIFY UNIT NO. IN MQ
	LAC*	TABTMP	/GET PLATTER NUMBER, 2ND WORD OF DSKAL CPB
	IDX	TABTMP
	IDX	TABTMP
	AND	(77777)	/CLEAR UNIT NUMBER FIELD
	OMQ		/IMPOSE UNIT NUMBER
	DAC*	TABTMP	/PUT INTO 1ST WORD OF GET/PUT CPB
	LAW	-1
	TAD	TABTMP
	DAC	TABTMP
 
	LAC*	TABTMP	/GET DISK BASE ADDRESS, 3RD WORD OF DSKAL CPB
	IDX	TABTMP
	IDX	TABTMP
	TAD*	OFFSET	/COMPUTER DISK TRANSFER START ADDRESS
	DAC*	TABTMP	/PUT INTO 2ND WORD OF GET/PUT CTB
	IDX	TABTMP
 
	LAC	ARRAY	/GET CORE START ADDRESS
	DAC*	TABTMP	/MOVE TO THIRD WORD OF GET/PUT CPB
	IDX	TABTMP
	LAC*	WORDS	/GET NUMBER OF WORDS TO TRANSFER
	DAC*	TABTMP	/PUT INTO 4TH WORD OF GET/PUT CBP
 
	CAL	CPB	/EXECUTE GET/PUT FUNCTION
	JMP*	GETPUT	/RETURN
/
TABTMP	0
/
 
CPB	0		/GET (13000) OR PUT (13100)
REQEV	0		/EVENT VARIABLE ADDRESS
	1		/LUN-1
CTBADR	0		/GET/PUT CONTROL TABLE ADDRESS
DSKTYP	0		/DISK TYPE CODE
/
/
/THE GET PUT CAL IS CONSTRUCTED TO THE FORM
/
/	UNIT (BITS 0-3), PLATTER NO. (BITS 4-17)
/	DISK STARTING ADDRESS
/	CORE STARTING ADDRESS
/	NUMBER OF WORDS TO TRANSFER
/
	.END
