	SUBROUTINE ASCAN(ID,IOUT,JOUT,IR,N,I0,J0,NS)
C	ROUTINE TO PRINT OUT SCAN DISPLAY
C	IOUT IS OUTPUT ARRAY (ROTATED AND STORED IN JOUT)
C	IR IS RANGE (DISTANCE) OF SCAN FROM CRAWLER
C	L IS THE ABSOLUTE SCAN DIRECTION
C	IUS IS ABSOLUTE DIRECTION OF 'UP' FROM CRAWLER
C	N=0 FOR NORMAL CONIC SCAN
C	  1 FOR  X-RAY CONIC SCAN
C	  2 FOR  FULL CUBE X-RAY SCAN
C 
C----------------------standard common block----------------------------
C 
	COMMON ICR(8,12),IPARM(10),IS1,IS2,NT,ICU(10,10,10,2),CLEAR(8)
	COMMON MARKER(4,3,3)
	LOGICAL*1 ICU,CLEAR
C 
C-----------------------------------------------------------------------
	LOGICAL*1 IOUT(10,10),JOUT(10,10),C,S
	LUN=ICR(ID,8)
7	DO 8 I=1,10
	DO 8 J=1,10
	C=IOUT(I,J)
	IF(N.EQ.2) GOTO 9
C	CONIC SCANS:
	IC1=I0-IR-1
	IC2=I0+IR+1
	JC1=J0-IR-1
	JC2=J0+IR+1
	IF(I.LT.IC1.OR.I.GT.IC2) GOTO 8
	IF(J.LT.JC1.OR.J.GT.JC2) GOTO 8
	IF(N.EQ.1) GOTO 9 ! X-RAY SCAN
C	DON'T OVERPRINT ARRAY:
	IF(JOUT(I,J).NE.'.'.AND.JOUT(I,J).GT.' ') GOTO 8
C	IF(I.NE.IC1.AND.I.NE.IC2.AND.J.NE.JC1.AND.J.NE.JC2) GOTO 8
9	JOUT(I,J)=C
8	CONTINUE
	S='+'
	IF(IR.LT.0) S='-'
	IF(IR.EQ.0) S=' '
	IS=IABS(IR)
	IF(NS.EQ.0) WRITE(LUN,105) "33,"33,CLEAR(ID)
105	FORMAT(X,A1,'Y  ',2A1)
	NS=1
	WRITE(LUN,104) "33,S,IS,((JOUT(J,K),K=1,10),J=1,10)
104	FORMAT(X,A1,'Y  ',18X,'s c a n n e r'/
     C18X,' range [',A1,I1,']'/10(16X,10(A1,X)/)/)
	RETURN
	END
