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

      PROGRAM MAIN

      INTEGER*2 MAXX
      INTEGER*2 MAXY
      INTEGER*2 MODE
      INTEGER*2 FG_GETMAXX, FG_GETMAXY, FG_GETMODE

      MODE = FG_GETMODE()
      CALL FG_SETMODE(4)

      MAXX = FG_GETMAXX()
      MAXY = FG_GETMAXY()

      CALL FG_SETMODE(MODE)
      CALL FG_RESET
      WRITE(6,1000) MAXX, MAXY

      STOP ' '
1000  FORMAT(' (',I3,',',I3,')')
      END
