    	SUBROUTINE CURSOR( IL, IC )
C
C	PROGRAMMER: R.S. ZHOU		FEB-1986
C
C	THIS ROUTINE POSITIONS THE ALPHA CURSOR
C
C		AT SCREEN   LINE --- IL
C		AT SCREEN COLUMN --- IC
C
C	IN DIALOGUE AREA BY ANSI CURSOR COMMANDS.
C
C		1<=IL<=30,     1<=IC<=80
C
C	IF IL=0, IC SPECIFIES CURSOR RIGHTWARD/LEFTWARD MOTION;
C	IF IC=0, IL SPECIFIES CURSOR UP/DOWN MOTION:
C
C		POSITIVE NUMBER ===> DOWN/LEFTWARD
C		NEGATIVE NUMBER ===> UP/RIGHTWARD
C
C	IF BOTH IC=0,IL=0, CURSOR MOTION IS ONE LINE DOWN.
C
    	BYTE CUR1(9), CUR2(6), CUR3(6), CUR4(6), CUR5(6)

    	DATA CUR1/ 0, 27, 91, 0, 0, 59, 0, 0, 72 /	!<ESC>[00;00H (POSITION)
    	DATA CUR2/ 0, 27, 91, 0, 0, 65 /		!<ESC>[00A (UP)
    	DATA CUR3/ 0, 27, 91, 0, 0, 66 /		!<ESC>[00B (DOWN)
    	DATA CUR4/ 0, 27, 91, 0, 0, 67 /		!<ESC>[00C (RIGHT)
    	DATA CUR5/ 0, 27, 91, 0, 0, 68 /		!<ESC>[00D (LEFT)

     	ILL = IABS(IL)
     	IF( ILL.GT.30 ) ILL = 30
     	ICC = IABS(IC)
     	IF( ICC.GT.80 ) ICC = 80
     	IL0 = ILL/10
     	IL1 = ILL-10*IL0
     	IC0 = ICC/10
     	IC1 = ICC-10*IC0

     	IF( IL.GT.0 .AND. IC.GT.0 ) THEN
     	    CUR1(4) = IL0+48
     	    CUR1(5) = IL1+48
     	    CUR1(7) = IC0+48
     	    CUR1(8) = IC1+48
     	    WRITE(6,1) CUR1
     	ENDIF

     	IF( IC.EQ.0 ) THEN
     	    IF( IL.LT.0 ) THEN
     		CUR2(4) = IL0+48
     		CUR2(5) = IL1+48
     		WRITE(6,1) CUR2
     	    ELSE
     		CUR3(4) = IL0+48
     		CUR3(5) = IL1+48
     		WRITE(6,1) CUR3
     	    ENDIF
     	ENDIF

     	IF( IL.EQ.0 ) THEN
     	    IF( IC.LT.0 ) THEN
     		CUR4(4) = IC0+48
     		CUR4(5) = IC1+48
     		WRITE(6,1) CUR4
     	    ELSE
     		CUR5(4) = IC0+48
     		CUR5(5) = IC1+48
     		WRITE(6,1) CUR5
     	    ENDIF
     	ENDIF

1	FORMAT(9A1$)
    	RETURN
     	END
