home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / grafik / fgl105 / 03-04.c < prev    next >
Encoding:
Text File  |  1991-05-05  |  419 b   |  26 lines

  1. main()
  2. {
  3.    int old_mode;
  4.    int new_mode;
  5.  
  6.    old_mode = fg_getmode();
  7.    new_mode = fg_bestmode(80,25,1);
  8.  
  9.    if (new_mode < 0) {
  10.       printf("This program requires\n");
  11.       printf("an 80-column display.\n");
  12.       exit();
  13.       }
  14.  
  15.    fg_setmode(new_mode);
  16.    fg_cursor(0);
  17.  
  18.    fg_setcolor(15);
  19.    fg_text("Hello, world.",13);
  20.  
  21.    fg_waitkey();
  22.  
  23.    fg_setmode(old_mode);
  24.    fg_reset();
  25. }
  26.