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

      PROGRAM MAIN

      INTEGER*1 TRIANGLE(45)
      INTEGER*2 OLD_MODE
      INTEGER*2 FG_GETMODE, FG_TESTMODE

      DATA TRIANGLE /
     +   #01,#01,#01,#01,#01,#01,#01,#01,#01,
     +   #00,#01,#02,#02,#02,#02,#02,#01,#00,
     +   #00,#00,#01,#02,#02,#02,#01,#00,#00,
     +   #00,#00,#00,#01,#02,#01,#00,#00,#00,
     +   #00,#00,#00,#00,#01,#00,#00,#00,#00/

      IF (FG_TESTMODE(19,1) .EQ. 0) THEN
         STOP 'This program requires a 320 x 200 MCGA graphics mode.'
      END IF

      OLD_MODE = FG_GETMODE()
      CALL FG_SETMODE(19)

      CALL FG_SETCOLOR(7)
      CALL FG_RECT(0,319,0,199)

      CALL FG_MOVE(156,101)
      CALL FG_DRWIMAGE(TRIANGLE,9,5)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET

      STOP ' '
      END
