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

      PROGRAM MAIN

      INTEGER*1 ARROW(12)
      INTEGER*2 OLD_MODE
      INTEGER*2 FG_GETMODE, FG_TESTMODE

      DATA ARROW /6,1,9,2,2,9,1,19,7,2,8,1/

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

      OLD_MODE = FG_GETMODE()
      CALL FG_SETMODE(4)
      CALL FG_SETCLIP(0,15,0,199)

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

      CALL FG_MOVE(10,10)
      CALL FG_DRAWMASK(ARROW,12,10)
      CALL FG_MOVE(10,20)
      CALL FG_CLIPMASK(ARROW,12,10)
      CALL FG_MOVE(10,30)
      CALL FG_REVMASK(ARROW,12,10)
      CALL FG_MOVE(10,40)
      CALL FG_FLIPMASK(ARROW,12,10)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET

      STOP ' '
      END
