	SUBROUTINE RESET(LINES)
C************************************************************
C
C  THIS ROUTINE IS USED TO RESET THE GT40 TO ITS
C  INITIAL STATUS FOLLOWING A LOAD. ALL USER DISPLAYS
C  IN THE GT40 WILL BE DELETED (INCLUDING WRITE-PROTECTED
C  DISPLAYS!!). NONE OF THE DISLIB PARAMETERS ARE
C  AFFECTED. IN ADDITION THE INTEGER PARAMETER LINES
C  SPECIFIES HOW MANY LINES OF TEXT TO ALLOCATE TO
C  THE CHARACTER DISPLAY FILE.
C
C  POSSIBLE ERRORS:
C	%RESET COMMAND NOT YET IMPLEMENTED (TEMPORARY)
C	?INVALID REPLY TO A RESET
C
C  ROUTINES CALLED:
C	SEND   - SENDS A COMMAND TO THE GT40
C	GET    - RECEIVES A STATUS TRANSMISSION FROM THE GT40
C	ERROR  - ERROR LOGGING ROUTINE
C
C************************************************************
	IMPLICIT INTEGER (A - Z)
	COMMON /OPTBLK/ OPTION(10, 3), OPMSG, OPPTR, OPLIST

	OPLIST = 0
100	CALL SEND(15, LINES, 0, 0)
	CALL GET(STATUS, X, Y, DNUM)
	IF(STATUS .EQ. "66) GO TO 100
	IF(STATUS .EQ. 0) RETURN
	IF(STATUS .NE. 10) GO TO 200
	CALL ERROR('%RESET NOT YET IMPLEMENTED',0)
	RETURN

200	CALL ERROR('?INVALID REPLY TO RESET, STATUS =',STATUS)
	RETURN
	END
