C\$INCLUDE:'C.INT'
	SUBROUTINE PDF2DSP(ANSI)
C
C	     Produce a PDF Card image on a CRT screen.
C
C	     By: Mark Holomany, JCPDS     Date: 18-Oct-1985
C
C	     Revised:
C	   14-JUL-87 MAH Converted to Microsoft Fortran V4.0
C	   19-JUL-87 MAH Send reference buffer to the PHBOXn
C	                 routines.  Allows customization of buffer len
C	                 based on MAXCPL.
C
C=====================================================================
 
	IMPLICIT INTEGER(A-Z)
	LOGICAL ANSI
 
C	 ... Maximum characters per line output to screen
D	PARAMETER    (MAXCPL = 80)
C\	  PARAMETER    (MAXCPL = 79)
C\	  PARAMETER    (PGUP = 73, PGDN = 81)

	CHARACTER*(2*MAXCPL-5)  REFBUF
 
	CHARACTER*1   QUALTY, REPLY, ESC, XCHAR, DELCD
	CHARACTER*1   CH,GETCHE,GETCH,CHSTR*20
	CHARACTER*3   PICODE
	CHARACTER*8   CARDNO
	CHARACTER*20  TEMP
	CHARACTER*80  LINE1(2), LINE2(2), LINE
	CHARACTER     SG*20, A*13,B*13,C*13, Z*8,MP*25,DX*8,DM*8
	LOGICAL       OPDATA, LOPREF, DONE
	REAL          MATRIX(9)
 
	CHARACTER*9  DELTD(2)

	COMMON /COMCRD/  CCARD, NUMPHC, CHPHC, CDCNT, FSTCRD, LINKCM,
	1              STCRD, NUMCD
	CHARACTER        CCARD*1760
	INTEGER          CDCNT(30), FSTCRD(30), LINKCM(20)
	INTEGER          STCRD(30)
	INTEGER*2        SUB
 
	COMMON /CDEQPD/ EQCELS
	LOGICAL         EQCELS
 
	COMMON /DIH/ DSPACE,INTEN,HKAYL,SUB
	CHARACTER*4     INTEN(200)
	CHARACTER*9     DSPACE(200)
	CHARACTER*22    HKAYL(200)
 
D     INCLUDE 'DSPCDS.CMN'
D     INCLUDE 'CURCRD.CMN'
D     INCLUDE 'CVTSP.CMN'
D     INCLUDE 'IORET.CMN'
D     INCLUDE 'LINEDR.CMN'
D     INCLUDE 'PDFDATA.CMN'
D     INCLUDE 'PICDS.CMN'
D     INCLUDE 'REFTRK.CMN'
D     INCLUDE 'RET3.CMN'
D     INCLUDE 'SWITCH.CMN'
 
C\$INCLUDE:'DSPCDS.CMN'
C\$INCLUDE:'CURCRD.CMN'
C\$INCLUDE:'CVTSP.CMN'
C\$INCLUDE:'IORET.CMN'
C\$INCLUDE:'LINEDR.CMN'
C\$INCLUDE:'PDFDATA.CMN'
C\$INCLUDE:'PICDS.CMN'
C\$INCLUDE:'REFTRK.CMN'
C\$INCLUDE:'RET3.CMN'
C\$INCLUDE:'SWITCH.CMN'
 
	DATA  DELTD /'(DELETED)', ' '/
	ESC = CHAR(27)
C
C	  ... Check if PD and CD cells are equivalent.  To do this, check
C	  ... if the transformation matrix on CARDC is the identity matrix.
C	  ... This was suggested by C. R. Hubbard.
	EQCELS = .FALSE.
 
 
	IF(NUMC(12).EQ.1) THEN
	   READ (CARDC, 1803) MATRIX
1803 	   FORMAT(6X,3( 3(F5.2,1X), 1X))
	   DO 4010 N=1,9,4
	   IF(MATRIX(N) .NE. 1.0) GO TO 30
4010 	   CONTINUE
	   DO 4020 N=2,4
	   IF(MATRIX(N) .NE. 0.0  .OR.  MATRIX(N+4) .NE. 0.0) GO TO 30
4020 	   CONTINUE
	   EQCELS = .TRUE.
	ENDIF
30   	CONTINUE
 
C========================================================================
	LCOUNT = 0
C
C	... Reset switches for routines that must be re-executed due
C	... to special character translation (PITRAN)
	SWPBX1 = .FALSE.
	SWPBX3 = .FALSE.
	SWPBX4 = .FALSE.
	SWPBX5 = .FALSE.
C
C	... Make sure PITRAN uses the default character translations
	ASCII = .FALSE.
 
	IF(.NOT. SWPBX1) THEN
	   CALL PHBOX1 (STATUS)
	   SWPBX1 = .TRUE.
	ENDIF
C
C	  .. Reset counts/existence indicators for footnotes
	IF(.NOT. SWTRFN) THEN
	   CALL TRFNCH ('RESET_ALL', .TRUE., IRET, XCHAR, PICODE, COUNT)
	   SWTRFN = .TRUE.
	ENDIF
 
	CARDNO = RETCRD(1)(1:8)
	QUALTY = RETCRD(1)(9:9)
	NDELTD = 2
	IF(RETCRD(1)(10:10) .EQ. 'D') NDELTD = 1
 
6010	CALL ERASE
	IF (ANSI) THEN
	  WRITE (NOUT,1602) ESC, CARDNO, DELTD(NDELTD), 
	1                 ESC,ESC, QUALTY, ESC
	ELSE
	  WRITE (NOUT,2602) CARDNO, DELTD(NDELTD), QUALTY
	ENDIF

D1602 FORMAT(' ',  A,'[7m',   A,2X, A,7X,  A,'[1m',
D    1  'JCPDS-ICDD Copyright 1990', A,'[0;7m', 24X,'QM= ',A1, A,'[m')
2602	FORMAT(' ',A,2X,A,3X,'JCPDS-ICDD Copyright 1990',20X,'QM= ',A1)

C\1602 FORMAT(A,'[7m',   ' ',A,2X, A,7X,  A,'[1m',
C\	1  'JCPDS-ICDD Copyright 1990', A,'[0;7m', 23X,
C\	2  'QM= ',A1, A,'[m')
 
	LCOUNT = LCOUNT + 1
C
C	 ... Chem. Formula & Dot Formula
	CALL SHFORM (RETCRD(2), LINE1(1), LINE2(1), SIZE1)
	CALL SHFORM (RETCRD(3), LINE1(2), LINE2(2), SIZE2)
	IF(SIZE1 .LT. 1) THEN
	   SIZE1 = 1
	   LINE1(1)(1:1) = ' '
	   LINE2(1)(1:1) = ' '
	ENDIF
	IF(SIZE2 .LT. 1) THEN
	   SIZE2 = 1
	   LINE1(2)(1:1) = ' '
	   LINE2(2)(1:1) = ' '
	ENDIF
 
	WRITE(NOUT, 1603) LINE1(1)(1:SIZE1), LINE1(2)(1:SIZE2),
	1                  LINE2(1)(1:SIZE1), LINE2(2)(1:SIZE2)
1603 	FORMAT(2(' ',A,T45,A/))
	LCOUNT = LCOUNT + 3
C
C	 ... Chem. Name & Mineral Name
	LMIN  = LENGTH(RETCRD(6))
	IF(LMIN .NE. 0) THEN
	   LNAME = LENGTH(RETCRD(4)) + LENGTH(RETCRD(5))
	   IF(LNAME+LMIN .GT. MAXCPL-2) THEN
	      POS = MAXCPL - LMIN - 2
	      CALL FSPLIT (RETCRD(4), POS, L, R)
	      LINE = RETCRD(4)(1:L)
	      LINE(MAXCPL-LMIN+1:) =  RETCRD(6)(1:LMIN)
	      WRITE (NOUT,1601) LINE(1:MAXCPL)
	      WRITE (NOUT,1615) RETCRD(4)(R:),RETCRD(5)(1:R-1)
1615 	      FORMAT(' ',A,A)
	   ELSE
	      IF(LNAME .GE. 1) THEN
	      LINE = RETCRD(4)(1:LNAME)
	    ELSE
	      LINE = ' '
	    ENDIF
	      LINE(MAXCPL-LMIN+1:) =  RETCRD(6)(1:LMIN)
	      WRITE (NOUT,1616) LINE(1:MAXCPL)
1616 	      FORMAT(' ',A /)
	   ENDIF
	ELSE
	   WRITE (NOUT,1601) (RETCRD(N)(1:MAXCPL), N=4,5)
1601 	   FORMAT((' ',A))
	ENDIF
	LCOUNT = LCOUNT + 2
 
	IF (ANSI) THEN
D       WRITE (NOUT,1205) ESC,ESC,ESC,ESC
	ELSE
	  WRITE (NOUT,'(132A1)') ('-',j=1,maxcpl)
	ENDIF
D1205 FORMAT(' ',  A,'[1m', A,'(0',  80('p'),  A,'(B',  A,'[0m')
 
C\	   WRITE (NOUT,1205) ESC, (H1,K=1,MAXCPL), ESC
C\1205  FORMAT(' ',  A,'[1m', 79A1,  A,'[0m')
 
	LCOUNT = LCOUNT + 1
 
C=======================================================================
 
C	 ... Box 2 -- Rad, lambda, filter, d-sp, cutoff, int, I/Icor, PD ref
	IF(.NOT. SWPBX2) THEN
	   CALL PHBOX2 (.FALSE., REFBUF, STATUS)
	   SWPBX2 = .TRUE.
	ENDIF
 
	WRITE (NOUT,1210) RETCRD(7)( 1: 9), RETCRD(7)(10:17),
	1                  RETCRD(7)(18:29), RETCRD(7)(30:41)
1210 	FORMAT(' ','Rad: ',A,1X, 'Lambda: ',A,8X, 'Filter: ',A,2X,
	1  'd-sp: ',A)
	LCOUNT = LCOUNT + 1
 
	WRITE (NOUT,1216) RETCRD(7)(42:46), RETCRD(7)(47:60),
	1                  RETCRD(7)(61:68)
1216 	FORMAT(' ','Cutoff: ',A,2X, 'Int: ',A,5X, 'I/Icor: ',A)
	LCOUNT = LCOUNT + 1
 
	CALL PRTREF (8, MAXCPL, 2)
	LCOUNT = LCOUNT + 2
	IF (ANSI) THEN
D       WRITE (NOUT,1205) ESC,ESC,ESC,ESC
	ELSE
	  WRITE (NOUT,'(132A1)') ('-',j=1,maxcpl)
	ENDIF
C\	  WRITE (NOUT,1205) ESC, (H1,K=1,MAXCPL), ESC
	LCOUNT = LCOUNT + 1
        
C========================================================================
 
	IF(.NOT. SWPBX3) THEN
	   CALL PHBOX3 (.FALSE., REFBUF, STATUS)
	   SWPBX3 = .TRUE.
	ENDIF
C
C	 ... Box 3 -- sys,sg,a,b,c,A,C,A,B,C,Z,mp,CD ref
	SG(1:1) = ' '
	SG(2:)  = RETCRD(10)(19:30)
	IF(RETCRD(10)(31:33) .NE. ' ') THEN
	   SG(15:15) = '('
	   SG(16:18) = RETCRD(10)(31:33)
	   SG(19:)   = ')'
	ENDIF
	IF(RETCRD(10)(34:34) .EQ. 'B') THEN
	   SG(1:1) = '['
	   SG(20:20) = ']'
	ENDIF
	CALL CMPRES (SG, SIZE)
	I = INDEX (SG, '(')
	IF(I .NE. 0) THEN
	   TEMP = SG(I:20)
	   SG(I+1:20) = TEMP
	   SG(I:I) = ' '
	ENDIF
 
	WRITE (NOUT,1212) RETCRD(10)(1:18),SG
1212 	FORMAT(' ','Sys: ',A,5X, 'S.G.: ',A)
	LCOUNT = LCOUNT + 1
        
	CALL ADDERR (A, RETCRD(10)(35:43), RETCRD(10)(44:45))
	CALL ADDERR (B, RETCRD(10)(46:54), RETCRD(10)(55:56))
	CALL ADDERR (C, RETCRD(10)(57:65), RETCRD(10)(66:67))
	WRITE (NOUT,1213) A,B,C, RETCRD(11)(1:8), RETCRD(11)(9:16)
1213 	FORMAT(' ','a: ',A,2X, 'b: ',A,2X, 'c: ',A,2X,
	1  'A: ',A,2X, 'C: ',A)
	LCOUNT = LCOUNT + 1
        
	CALL ADDERR (A, RETCRD(11)(17:24), RETCRD(11)(25:26))
	CALL ADDERR (B, RETCRD(11)(27:34), RETCRD(11)(35:36))
	CALL ADDERR (C, RETCRD(11)(37:44), RETCRD(11)(45:46))
 
	Z(1:1) = ' '
	Z(2:)  = RETCRD(11)(47:52)
	CALL CMPRES (Z(2:8), SIZE)
	IF(RETCRD(11)(53:53) .EQ. 'B') THEN
	   IF(SIZE+2 .GE. 8) THEN
	      Z(1:1) = '['
	      Z(8:8) = ']'
	   ELSE
	      Z(1:2) = ' ['
	      Z(3:) = RETCRD(11)(47:52)
	      CALL CMPRES (Z(3:), SIZE)
	      Z(SIZE+3:SIZE+3) = ']'
	   ENDIF
	ENDIF
 
	MP = RETCRD(11)(54:78)
	LMP = LENGTH (MP)
	IF(LMP .GT. 13) THEN
	   CALL CMPRES (MP, LMP)
	ELSE
	   MP(1:1) = ' '
	   MP(2:)  = RETCRD(11)(54:78)
	ENDIF
	LMPALL = LENGTH (MP)
	IF(LMPALL .LE. 0) LMPALL = 1
	LMP = MIN0( LMPALL, MAXCPL-67)
	IF(LMP .LT. LMPALL) THEN
	   CALL ERRTXT ('W', 'mp field overflowed')
	   CALL ERRTXT ('C', MP)
	   MP(LMP:LMP) = '*'
	ENDIF
 
	WRITE (NOUT,1214) A,B,C, Z, MP(1:LMP)
1214 	FORMAT(' ', 'A: ',A,2X, 'B: ',A,2X, 'C: ',A,2X, 'Z:',A,
	1       'mp:',A)
	LCOUNT = LCOUNT + 1
        
	CALL PRTREF (12, MAXCPL, 2)
	LCOUNT = LCOUNT + 2
C       
C	 ... Box 3 -- Physical constants: Dx,Dm,SS/FOM
	DX(1:1) = ' '
	DX(2:)  = RETCRD(14)(1:6)
	IF(RETCRD(14)(7:7) .EQ. 'B') THEN
	   DX(1:1) = '['
	   DX(8:8) = ']'
	   CALL CMPRES (DX, SIZE)
	ENDIF
	DM(1:1) = ' '
	DM(2:)  = RETCRD(14)(8:13)
	IF(RETCRD(14)(14:14) .EQ. 'B') THEN
	   DM(1:1) = '['
	   DM(8:8) = ']'
	   CALL CMPRES (DM, SIZE)
	ENDIF
	WRITE (NOUT,1220) DX,DM, RETCRD(14)(15:36)
1220 	FORMAT(' ','Dx: ',A,2X, 'Dm: ',A,2X, 'SS/FOM: ',A)
	LCOUNT = LCOUNT + 1
	IF (ANSI) THEN
D       WRITE (NOUT,1205) ESC,ESC,ESC,ESC
	ELSE
	  WRITE (NOUT,'(132A1)') ('-',j=1,maxcpl)
	ENDIF
C\	  WRITE (NOUT,1205) ESC, (H1,K=1,MAXCPL), ESC
	LCOUNT = LCOUNT + 1
        
C========================================================================
 
	IF(.NOT. SWPBX4) THEN
	   CALL PHBOX4 (.FALSE., REFBUF, STATUS, OPDATA, LOPREF)
	   SWPBX4 = .TRUE.
	ENDIF
C
C	 ... Box 4 -- Optical Data: ea,nwb,ey,sign,2v
	IF(OPDATA) THEN
	   WRITE (NOUT,1221) RETCRD(15)( 1:10), RETCRD(15)(11:20),
	1                     RETCRD(15)(21:30), RETCRD(15)(31:33),
	2                     RETCRD(15)(34:45)
1221 	   FORMAT(' ','ea: ',A,2X, 'nwB: ',A,2X, 'ey: ',A,2X,
	1     'Sign: ',A,2X, '2V: ',A)
	   LCOUNT = LCOUNT + 1
	ENDIF
 
	IF(LOPREF) THEN
	   CALL PRTREF (16, MAXCPL, 0)
	   LCOUNT = LCOUNT + 1
	ENDIF
 
	IF (ANSI) THEN
	  WRITE(NOUT,1651) ESC,ESC,ESC
	ELSE
	  WRITE(NOUT,2651)
	ENDIF
D1651	FORMAT(' ',  A,'[24;1H',  A,'[7m',
D	1      'Enter N or <CR> for Next pg; P for Previous; E ',
D	2      'to Exit                         ',A,'[m',$)
2651	FORMAT(' Enter N or <CR> for Next pg; P for Previous; E ',
	2      'to Exit',$)
C\1651 FORMAT(' ',  A,'[24;1H',  A,'[7m',
C\	1     10X,'Hit ENTER to view the next card section or hit',
C\	2 ' <ESC> ',16X,A,'[m',\)
 
D501	READ (NIN, 1501, END=9000) REPLY
1501	FORMAT(A)

D	CALL UPPER (REPLY)
D	IF(REPLY .EQ. 'E') GO TO 9000
D	IF(REPLY .EQ. 'P') GO TO 9000
C==>D	IF(REPLY .NE. 'N') GO TO 501

C\501	CALL INCHAR (CH, ICODE)
C\	IF (CH .EQ. CHAR(27)) GO TO 9000
C\	IF (ICODE .EQ. PGUP) GO TO 9000
C\	IF (ICODE .NE. PGDN) GO TO 501
 
        
C========================================================================
 
6020	CALL ERASE
	LCOUNT = 0

	IF(.NOT. SWPBX5) THEN
	   CALL PHBOX5 (STATUS)
	   SWPBX5 = .TRUE.
	ENDIF
 
	IF (ANSI) THEN
	  WRITE (NOUT,1602) ESC, CARDNO, DELTD(NDELTD), 
	1                 ESC,ESC, QUALTY, ESC
	ELSE
	  WRITE (NOUT,2602) CARDNO, DELTD(NDELTD), QUALTY
	ENDIF
	CALL PRTCOM (MAXCPL)
1605 	CONTINUE
 
	IF (ANSI) THEN
	  WRITE(NOUT,1651) ESC,ESC,ESC
	ELSE
	  WRITE(NOUT,2651)
	ENDIF
 
D512  READ (NIN, 1501, END=9000) REPLY
D     CALL UPPER (REPLY)
D     IF(REPLY .EQ. 'E') GO TO 9000
D     IF(REPLY .EQ. 'P') GO TO 6010
D     IF(DBSW .EQ. 'CDIF') GO TO 9000
C==>D     IF(REPLY .NE. 'N') GO TO 512

C\512	CALL INCHAR (CH, ICODE)
C\	IF (CH .EQ. CHAR(27)) GO TO 9000
C\	IF (ICODE .EQ. PGUP) GO TO 6010
C\	IF (ICODE .NE. PGDN) GO TO 512
 
        
C========================================================================

6030	LCOUNT = 0
	BEGIN  = 1
C
C	 ... Call PHDSP here
	IF(.NOT. SWDSP) THEN
	   CALL PHDSP (STATUS)
	   SWDSP = .TRUE.
	ENDIF
	MAXPGS = (SUB + 29)/30
C
C	 ... Print out d-sp
250	CONTINUE
	CALL ERASE
	IF (ANSI) THEN
	  WRITE (NOUT,1602) ESC, CARDNO, DELTD(NDELTD), 
	1                 ESC,ESC, QUALTY, ESC
	ELSE
	  WRITE (NOUT,2602) CARDNO, DELTD(NDELTD), QUALTY
	ENDIF

	IF (SUB.LE.0) THEN
	WRITE(NOUT,1607)
1607	FORMAT (//,
	1'            There is no data available for these card sections.')
	GO TO 609
	ENDIF

	CURPG = (BEGIN + 29)/30
        WRITE(NOUT,1655) SUB, CURPG, MAXPGS, CONST*2
1655    FORMAT(' ',I3, ' reflections in pattern.  Page ',
	1      I1,' of ',I1,'.',2X,'Radiation=',F9.5)
	CALL PRTDSP (MAXCPL, DONE, BEGIN, PREVBG)
	IF(.NOT. DONE) THEN
	  IF (ANSI) THEN
	    WRITE(NOUT,1652) ESC,ESC,ESC
	  ELSE
	    WRITE(NOUT,2652)
	  ENDIF
D1652	   FORMAT(' ',  A,'[24;1H',  A,'[7m',
D	1         'Enter N or <CR> for Next pg; P for Previous; E ',
D	2         'to Exit; D/2/1/S/Q to convert   ',A,'[m',$)
2652	   FORMAT(' Enter N or <CR> for Next pg; P for Previous; E ',
	2         'to Exit; D/2/1/S/Q to convert',$)
 
D513	   READ (NIN, 1501, END=9000) REPLY
D	   CALL UPPER (REPLY)
D	   IF(REPLY .EQ. 'E') THEN
D	      DONE = .TRUE.
D	      GO TO 9000
D	   ELSE IF (REPLY .EQ. 'P') THEN
D	      IF(PREVBG .EQ. 1) GO TO 6020
D	      BEGIN = PREVBG - 30
D	      GO TO 250
D	   ELSE IF (REPLY .EQ. '2'  .OR.
D	1           REPLY .EQ. '1'  .OR.
D	2           REPLY .EQ. 'D'  .OR.
D	3           REPLY .EQ. 'S'  .OR.
D	4           REPLY .EQ. 'Q'       ) THEN
D	      BEGIN = MAX0(PREVBG,1)
D	      ISPACG = REPLY
D	      GO TO 250
D	   ENDIF
C==>D	   IF (REPLY .NE. 'N') GO TO 513

C\513	   CALL INCHAR (CH, ICODE)
C\	   IF (CH .EQ. CHAR(27)) THEN
C\	      DONE = .TRUE.
C\	      GO TO 9000
C\	   ENDIF
C\	   IF (ICODE .EQ. PGUP) THEN
C\	      IF(PREVBG .EQ. 1) GO TO 6020
C\	      BEGIN = PREVBG - 30
C\	      GO TO 250
C\	   ENDIF
C\	   IF (ICODE .NE. PGDN) GO TO 513

	   GO TO 250
	ENDIF
C========================================================================
C
C	 ... Done with the d-spacings

609	IF (ANSI) THEN
	  WRITE(NOUT,1659) ESC,ESC,ESC
	ELSE
	  WRITE(NOUT,2659)
	ENDIF
D1659	FORMAT(' ',  A,'[24;1H',  A,'[7m',
D	1         'Enter N or <CR> for Next pg; P for Previous; E ',
D	2         'to Exit; D/2/1/S/Q to convert   ',A,'[m',$)
2659	FORMAT(' Enter N or <CR> for Next pg; P for Previous; E ',
	2         'to Exit; D/2/1/S/Q to convert   ',$)

C\1659	FORMAT(' ',  A,'[24;1H',  A,'[7m',
C\	1      30X,'Hit ENTER to continue or ESC ',19X,A,'[m',\)

D502	READ (NIN, 1501, END=9000) REPLY
D	CALL UPPER(REPLY)
D	IF(REPLY .EQ. 'E') THEN
D	   GO TO 9000
D	ELSE IF(REPLY .EQ. 'P') THEN
D	   IF(PREVBG .EQ. 1) GO TO 6020
D	   BEGIN = PREVBG - 30
D          DONE = .FALSE.
D	   GO TO 250
D	ELSE IF (REPLY .EQ. '2'  .OR.
D	1        REPLY .EQ. '1'  .OR.
D	2        REPLY .EQ. 'D'  .OR.
D	3        REPLY .EQ. 'S'  .OR.
D	4        REPLY .EQ. 'Q'       ) THEN
D	   BEGIN = MAX0(PREVBG,1)
D	   ISPACG = REPLY
D	   DONE = .FALSE.
D	   GO TO 250
D	ENDIF
C==>D	IF(REPLY .NE. 'N') GO TO 502
 
C\502	CALL INCHAR (CH, ICODE)
C\	IF (CH .EQ. CHAR(27)) GO TO 9000
C\	IF (ICODE .EQ. PGUP) THEN
C\	   IF(PREVBG .EQ. 1) GO TO 6020
C\	   BEGIN = PREVBG - 30
C\         DONE = .FALSE.
C\	   GO TO 250
C\	ENDIF
C\	IF (ICODE .NE. PGDN) GO TO 502

9000	RETURN
	END
C-----------------------------------------------------------------------
	SUBROUTINE ERASE
	include 'logic.common'
	CALL TERASE(ICRT,LO,LI)
	RETURN
	END
