c	OPTIONS/NOI4
c	write(*,10)
c10	format(' input ic,ir: ',$)
c	read(*,20) IC,IR
c20	FORMAT(2I4)
c	CALL DTCAT(IC,IR)
c	END
	OPTIONS/NOI4
C
C This routine positions the cursor using the minimal number of transmitted
C characters
	SUBROUTINE DTCAT(IC,IR)
c	CHARACTER*1	Cesc	/27/
	CHARACTER*1	Cnull	/0/
	CHARACTER*10	Coutbuf	
	CHARACTER*8	Cinbuf

	data Coutbuf(1:1)	/27/
	data Coutbuf(2:2)	/'['/	

	WRITE(Cinbuf,1)ir,';',ic,'H'			! Place the prototype
1	format(i3.1,a1,i3.1,a1)				! posit string in buffer
	J=3						! # char in output bufr
	DO I=1,8					! for entire string
	  IF(Cinbuf(I:I) .NE. ' ')	THEN		!  strip out any blanks
	     Coutbuf(J:J) = Cinbuf(I:I)			!  and pack into output
	     J=J+1					! Another character
	  END IF

	END DO
C  Use null byte to disable format control
	write(*,20) Cnull,Coutbuf(1:J-1)		! Write packed data to
20	format(A,a,$)					! terminal

c	WRITE(*,20)COUTBUF(1:J)
c20	FORMAT(' ',A,$)
	return
	end
