$INCLUDE: 'C:\FG\FASTGRAF.FI'

      PROGRAM MAIN

      INTEGER*1 IMAGE(8)
      INTEGER OLD_MODE
      INTEGER FG_GETMODE, FG_TESTMODE

      CALL FG_INITPM
      OLD_MODE = FG_GETMODE()

      IF (FG_TESTMODE(3,1) .EQ. 1) THEN
         CALL FG_SETMODE(3)
      ELSE IF (FG_TESTMODE(7,1) .EQ. 1) THEN
         CALL FG_SETMODE(7)
      ELSE 
         STOP 'This program requires an 80-column display.'
      END IF

      CALL FG_CURSOR(0)

      CALL FG_SETATTR(9,7,0)
      CALL FG_TEXT('text',4)
      CALL FG_WAITKEY

      CALL FG_LOCATE(0,0)
      CALL FG_GETIMAGE(IMAGE,8,1)
      CALL FG_LOCATE(1,1)
      CALL FG_DRWIMAGE(IMAGE,8,1)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET

      STOP ' '
      END
