$INCLUDE: 'C:\FG\INTRFACE.FOR'

      PROGRAM MAIN

      INTEGER*2 ATTR, VALUE
      INTEGER*2 OLD_MODE
      INTEGER*2 FG_GETATTR, FG_GETCHAR, FG_GETMODE

      OLD_MODE = FG_GETMODE()
      CALL FG_SETMODE(3)
      CALL FG_CURSOR(0)

      CALL FG_SETATTR(9,7,0)
      CALL FG_LOCATE(24,0)
      CALL FG_TEXT('Test',4)
      VALUE = FG_GETCHAR(24,0)
      ATTR  = FG_GETATTR(24,0)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET
      WRITE(6,'(1X,A1,1X,Z2)') VALUE, ATTR

      STOP ' '
      END
