      SUBROUTINE XCHAR (BUF, K)
      IMPLICIT NONE
      INCLUDE MATLAB$KOM:IOP.KOM
C
C SYSTEM DEPENDENT ROUTINE TO HANDLE SPECIAL CHARACTERS
C
      INTEGER BUF(*), K
C
      INTEGER BACK, MASK, L
C
      DATA BACK / Z'20202008' /, MASK / Z'000000FF' /
C
C
      IF (BUF(1).EQ.BACK) K = -1
      L = BUF(1).AND.MASK
      IF (K.NE.-1) WRITE (WTE, 10) BUF(1), L
10    FORMAT (' ''', A1, ''' = ', Z2,
     .             ' hex is not a MATLAB character.')
C
      RETURN
      END
