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

      PROGRAM MAIN

      INTEGER LINES
      INTEGER OLD_LINES
      INTEGER OLD_MODE
      INTEGER FG_GETLINES, FG_GETMODE, FG_TESTMODE

      CALL FG_INITPM
      OLD_LINES = FG_GETLINES()
      OLD_MODE = FG_GETMODE()
      CALL FG_SETMODE(3)
      CALL FG_CURSOR(0)

      CALL FG_SETCOLOR(15)
      CALL FG_TEXT('first line',10)
      CALL FG_WAITKEY

      IF (FG_TESTMODE(16,0) .EQ. 1) THEN
         CALL FG_SETLINES(43)
         CALL FG_CURSOR(0)
         CALL FG_WAITKEY
      END IF

      IF (FG_TESTMODE(17,0) .EQ. 1) THEN
         CALL FG_SETLINES(50)
         CALL FG_CURSOR(0)
         CALL FG_WAITKEY
      END IF

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_SETLINES(OLD_LINES)
      CALL FG_RESET

      STOP ' '
      END
