    	SUBROUTINE PUTEXT( STR, N, IL, IC )
C
C	PROGRAMMER: R.S. ZHOU		FEB-1986
C
C	THIS ROUTINE OUTPUTS N CHARACTERS OF STR AT LINE --- IL
C	AND COLUMN --- IC
C
C		IC<0 : DISPLAY IN DOUBLE HEIGHT LINE
C		IL<0 : DISPLAY IN DOUBLE WIDTH LINE
C
    	BYTE TEXT(9), DLIN(3)
     	CHARACTER STR(1)*1
     	DATA TEXT / 0, 27, 91, 0, 0, 59, 0, 0, 72 /
    	DATA DLIN / 27, 35, 54 /
C
C  TEXT = <ESC>[00;00H
C  DLIN = <ESC>#6
C
     	N0 = IABS(N)
    	ICD = 0
    	IF( IL.LT.0 ) ICD = 1
    	IF( IC.LT.0 ) ICD = 2
    	ILL = IABS(IL)
    	ICC = IABS(IC)
     	IL0 = ILL/10
     	IL1 = ILL-10*IL0
     	IC0 = ICC/10
     	IC1 = ICC-10*IC0
    	TEXT(4) = 48 + IL0
    	TEXT(5) = 48 + IL1
    	TEXT(7) = 48 + IC0
    	TEXT(8) = 48 + IC1

     	IF( ICD.EQ.0 ) WRITE(6,1) TEXT, (STR(J),J=1,N0)
1	FORMAT(9A1,<N0>A1,$)

     	IF( ICD.EQ.1 ) WRITE(6,2) TEXT,DLIN, (STR(J),J=1,N0)
2	FORMAT(9A1,3A1,<N0>A1,$)

     	IF( ICD.EQ.2 ) THEN
    	    DLIN(3) = 51
    	    WRITE(6,2) TEXT,DLIN, (STR(J),J=1,N0)
    	    DLIN(3) = 52
    	    ILL = ILL+1
     	    IL0 = ILL/10
     	    IL1 = ILL-10*IL0
    	    TEXT(4) = 48 + IL0
    	    TEXT(5) = 48 + IL1
    	    WRITE(6,2) TEXT,DLIN, (STR(J),J=1,N0)
    	ENDIF
    	RETURN
     	END
