;
;	SUBROUTINE DRIO
;
;	FORTRAN CALLABLE ROUTINE TO READ/WRITE FROM THE DR11C
;
;	Use the following syntax in fortran, use all integer*2 variables
;	CALL DRIO(i,j)   
;	if i=0 the data is read from the dr-11/c into variable j
;	if i=1 the data is moved from j into the output register on the dr-11/c
;	External devices can synchronize with the "new data ready" and
;	"data transmitted" signals on the DR-11/c.
;
;	RETURNS: DR11c input buffer to A
;
	.ENTRY	DRIO  ^M<R2>
	MOVW @4(AP),R0
	BEQL	DREAD
	MOVW @8(AP),R3
	$CMKRNL_S DRWRITE  
	RET
DREAD:	$CMKRNL_S DRREAD
	MOVW R3,@8(AP)	
	RET
;
;
;
	.ENTRY	DRREAD ^M<R2>
	MOVW	@#^x800189C4,R3	;PUT CONTENTS OF DR INTO R3
	MOVL	#17,R0
	RET
;
;
;
	.ENTRY	DRWRITE	^M<R2>
;
;	SENDS r3 INTO DR11C OUTPUT BUFFER
;
	MOVW	R3,@#^x800189C2
	MOVL	#17,R0
	RET
	.END
