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

      PROGRAM MAIN

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

      NEW_MODE = FG_BESTMODE(320,200,1)
      IF (NEW_MODE .LT. 19) THEN
         STOP 'This program requires a 256-color graphics mode.'
      END IF

      OLD_MODE = FG_GETMODE()
      CALL FG_SETMODE(NEW_MODE)

      CALL FG_SETCOLOR(9)
      CALL FG_TEXT('text',4)
      CALL FG_WAITKEY

      CALL FG_TRANSFER(0,31,0,7,4,15,0,0)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET

      STOP ' '
      END
