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

      PROGRAM MAIN

      INTEGER*2 OLD_MODE
      INTEGER*2 FG_GETMODE

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

      CALL FG_SETATTR(7,0,0)
      CALL FG_TEXT('hello',5)
      CALL FG_WAITKEY

      CALL FG_LOCATE(0,0)
      CALL FG_SETATTR(0,7,0)
      CALL FG_CHGATTR(5)
      CALL FG_WAITKEY

      CALL FG_LOCATE(0,0)
      CALL FG_CHGTEXT('H',1)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET

      STOP ' '
      END
