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

      PROGRAM MAIN

      INTEGER*1 TRIANGLE(10)
      INTEGER OLD_MODE
      INTEGER FG_GETMODE, FG_TESTMODE

      DATA TRIANGLE /#FF,#80, #7F,#00, #3E,#00, #1C,#00, #08,#00/

      CALL FG_INITPM
      IF (FG_TESTMODE(6,1) .EQ. 0) THEN
         STOP 'This program requires a CGA graphics mode.'
      END IF

      OLD_MODE = FG_GETMODE()
      CALL FG_SETMODE(6)

      CALL FG_MOVE(316,101)
      CALL FG_DRWIMAGE(TRIANGLE,2,5)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET

      STOP ' '
      END
