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

      PROGRAM MAIN

      INTEGER*2 OLD_MODE
      INTEGER*2 NEW_MODE
      INTEGER*2 FG_BESTMODE, FG_GETMODE

      OLD_MODE = FG_GETMODE()
      NEW_MODE = FG_BESTMODE(80,25,1)

      IF (NEW_MODE .LT. 0) THEN
         STOP 'This program requires an 80-column display.'
      END IF

      CALL FG_SETMODE(NEW_MODE)
      CALL FG_CURSOR(0)

      CALL FG_SETCOLOR(15)
      CALL FG_TEXT('Hello, world.',13)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET

      STOP ' '
      END
