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

      PROGRAM MAIN

      INTEGER*2 MAX_COL
      INTEGER*2 MAX_ROW
      INTEGER*2 MODE
      INTEGER*2 FG_GETMAXX, FG_GETMAXY, FG_GETMODE

      MODE = FG_GETMODE()
      CALL FG_SETMODE(3)

      MAX_COL = FG_GETMAXX()
      MAX_ROW = FG_GETMAXY()

      CALL FG_SETMODE(MODE)
      CALL FG_RESET

      WRITE (6,1000) MAX_COL
      WRITE (6,1010) MAX_ROW

      STOP ' '
1000  FORMAT(' Last col = ',I2)
1010  FORMAT(' Last row = ',I2)
      END
