      subroutine clscrn(device,i,j)
*
* Clear the screen of the device with number IDEVCE below the point with
* the coordinates (I,J) where I is the horizontal coordinate measured
* from the left of the screen starting at 1, and J is the vertical
* coordinate measured from the top of the screen starting at 1.
*
      integer device, i, j
      call pcursr(device,i,j)
      write (device,1) '[J'
 1    format(a3)
      return
      end
*
*
*
      subroutine pcursr(device,i,j)
*
* Position the cursor at the position (I,J) of the device with number
* IDEVCE, where I,J are as for CLRSCRN
*
      integer device, i, j
      write (device,1) '[',j,';',i,'H'
 1    format(a2,I3.3,A1,I3.3,A1)
      return
      end
*
*
*
      subroutine plchrs(device,i,j,n,chars)
*
* Write the string of N characters contained in A1 format in the integer
* array CHARS, starting at the location (I,J).  I,J, and IDEVCE are as
* in CLRSCRN.
*
      integer  device, i, j, n, chars(135)
      write(device,1) '[',j,';',i,'H',(chars(k),k=1,n)
 1    format(a2,I3.3,A1,I3.3,A1,135a1)
      return
      end
*
*
*
      subroutine blscrn(idevce)
*
* Blank the screen of the device with number IDEVCE
*
      integer idevce
      write(idevce,1) '[2J'
 1    format(a4)
      return
      end
