
C ========================================================================
C
C	THIS ROUTINE REPAINTS THE ENTIRE SCREEN FROM THE SCREEN MAP
C	LEAVING THE CURSOR AT THE SAME POSITION (ROW,COL).
C
C ========================================================================

	SUBROUTINE PAINT(ROW,COL)

	INTEGER*2 ROW,COL,prow,pcol,spos,epos

C ---	CLEAR THE SCREEN FIRST
	CALL ClrScr

	entry PaintNoClr(ROW,COL)

	call CsrPos(1,1)

	pcol=1
	prow=1

100	if (prow.ge.22) then
	   call CsrPos(row,col)
	   return
	endif

C ---	find the beginnig of the next field on the line
	call bfield(prow,pcol,spos)

	if (spos.ge.80) then
	   prow=prow+1
	   pcol=1
	   goto 100
	endif

C ---	find the end of the field now
	call efield(prow,spos,epos)

C ---	display the field just field (spos,epos)
	call DspStr(prow,spos,epos)

	pcol=epos+1

	goto 100

	END


	SUBROUTINE PaintOne(ROW,COL,Attr,Lnth)

	INTEGER*2 ROW,COL, Attr, Lnth, I

	call SaveAttribute
	call CsrPos( Row, Col )

	call DspAttribute( Attr )
	do 10 I = 1 , Lnth
	  call TTYO( 95 )
10	continue

	call CsrPos( Row, Col )
	call RstAttribute

	END


C ========================================================================
C
C	THIS ROUTINE CLEARS THE VIDEO SCREEN AND LOADS THE SCREEN
C	MAP WITH NULLS AND NORMAL DISPLAY ATTRIBUTES.
C
C ========================================================================

	SUBROUTINE MCLEAR

	INTEGER*2 MAP(21,80,3), I, J, K

	COMMON /BLK1/MAP

	DO 100 I=1,21

	   DO 200 J=1,80

	      DO 300 K=1,3

	         MAP(I,J,K)=0

300	      CONTINUE

200	   CONTINUE

100	CONTINUE

C ---	CLEAR THE SCREEN

	CALL ClrScr

	END

