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

      PROGRAM MAIN

      INTEGER NEW_MODE, OLD_MODE
      INTEGER FG_BESTMODE, FG_GETMODE

      CALL FG_INITPM
      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_SETCOLOR(15)
      CALL FG_RECT(0,319,0,199)
      CALL FG_SETCOLOR(10)
      CALL FG_TEXT('line one',8)
      CALL FG_LOCATE(1,0)
      CALL FG_TEXT('line two',8)
      CALL FG_WAITKEY

      CALL FG_SETCOLOR(15)
      CALL FG_SCROLL(0,63,8,15,4,1)
      CALL FG_WAITKEY
      CALL FG_SCROLL(0,63,12,19,-4,1)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET

      STOP ' '
      END
