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

      PROGRAM MAIN

      INTEGER*2 OLD_MODE
      INTEGER*2 MINX, MAXX, MINY, MAXY
      INTEGER*2 FG_GETMODE, FG_XCONVERT, FG_YCONVERT

      OLD_MODE = FG_GETMODE()
      CALL FG_SETMODE(16)

      CALL FG_SETCOLOR(14)
      CALL FG_TEXT('yellow',6)

      CALL FG_SETCOLOR(10)
      CALL FG_TEXT(' green',6)

      CALL FG_SETCOLOR(7)
      MINX = FG_XCONVERT(0)
      MAXX = FG_XCONVERT(16) - 1
      MINY = FG_YCONVERT(24)
      MAXY = FG_YCONVERT(25) - 1
      CALL FG_RECT(MINX,MAXX,MINY,MAXY)
      CALL FG_SETCOLOR(12)
      CALL FG_LOCATE(24,0)
      CALL FG_TEXT(' Press any key. ',16)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET

      STOP ' '
      END
