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

      PROGRAM MAIN

      INTEGER*2 OLD_MODE
      INTEGER*2 FG_GETMODE

      OLD_MODE = FG_GETMODE()
      CALL FG_SETMODE(3)
      CALL FG_CURSOR(0)
      CALL FG_SETATTR(10,0,0)

      CALL FG_LOCATE(1,0)
      CALL FG_TEXT('Page ',5)
      CALL FG_WAITKEY

      CALL FG_SETPAGE(1)
      CALL FG_LOCATE(23,0)
      CALL FG_TEXT('Page 1',6)

      CALL FG_SETPAGE(0)
      CALL FG_TEXT('0',1)
      CALL FG_WAITKEY

      CALL FG_SETVPAGE(1)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET

      STOP ' '
      END
