    	SUBROUTINE CLEARS( IC )
C
C   PROGRAMMER: R.S. ZHOU,	FEB-1986
C
C	THIS ROUTINE ERASES THE SCREEN AREA SPECIFIED BY "IC"
C	BY USING THE STANDARD ANSI COMMANDS.
C
C	IC = 0: ERASE THE ENTIRE SCREEN AND CURSOR HOME AT (1,1)
C	IC = 1: ERASE THE ENTIRE SCREEN AND CURSOR DOES NOT MOVE
C	IC = 2: ERASE FROM THE CURRENT CURSOR TO THE END OF SCREEN
C	IC = 3: ERASE FROM THE CURRENT CURSOR TO THE TOP OF SCREEN
C	IC = 4: ERASE FROM THE CURRENT CURSOR TO THE END OF LINE
C	IC = 5: ERASE FROM THE CURRENT CURSOR TO THE START OF LINE
C	IC = 6: ERASE THE ENTIRE LINE OF CURRENT CURSOR.
C
    	BYTE TEXT(8)
    	DATA TEXT / 0, 27, 91, 0, 0, 27, 91, 72 /
C
    	II = IC
    	TEXT(5) = 74
    	IF( II.GT.3 ) TEXT(5) = 75
    	TEXT(4) = 50
    	IF( II.EQ.2 .OR. II.EQ. 4 ) TEXT(4) = 48
    	IF( II.EQ.3 .OR. II.EQ. 5 ) TEXT(4) = 49
    	IE = 5
    	IF( II.EQ.0 ) IE = 8
     	WRITE(6,1) (TEXT(I),I=1,IE)
1	FORMAT(<IE>A1$)
    	RETURN
     	END
