$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. 0 .OR. NEW_MODE .EQ. 12) THEN
         STOP 'This program requires a 320 x 200 color graphics mode.'
      END IF

      OLD_MODE = FG_GETMODE()
      CALL FG_SETMODE(NEW_MODE)

      CALL FG_MOVE(0,199)
      CALL FG_DISPFILE('CORAL.SPR'//CHAR(0),320,0)
      CALL FG_WAITKEY

      CALL FG_ERASE
      CALL FG_DISPFILE('CORAL.PPR'//CHAR(0),320,1)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET

      STOP ' '
      END
