home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_02_11 / 2n11054a < prev    next >
Text File  |  1991-04-17  |  807b  |  41 lines

  1. /* Listing 3.                  */
  2. /* Test program for BIOS Fonts */
  3.  
  4. #include<stdio.h>
  5. #include<dos.h>
  6. #include<stdlib.h>
  7. #include<string.h>
  8. #include<bfont.h>
  9.  
  10.  
  11. void main(int argc, char *argv[])
  12. {
  13.   struct REGPACK Regs;
  14.   int x, y;
  15.  
  16.   Regs.r_ax = 0x0012;
  17.   intr(0x10, &Regs);
  18.  
  19.   SetBFonts();
  20.   for(x = 1; x < 100; x += 2)
  21.     EGABlock(0, x, 100, 1, 4);
  22.   getch();
  23.   for(x = 0, y = 0; y < 100; ++x, y += 4)
  24.   {
  25.     SetBFColor(0, x);
  26.     PrintBF(x, y, "This is a test!!!");
  27.   }
  28.   getch();
  29.   SetBFColor(0, 10);
  30.   PrintBF(10, 120, "ROM 8x8 Font");
  31.   SetBFColor(BF8x14, 9);
  32.   SetBFFont(BF8x14);
  33.   PrintBF(10, 130, "ROM 8x14 Font");
  34.   SetBFColor(BF8x16, 13);
  35.   SetBFFont(BF8x16);
  36.   PrintBF(10, 150, "ROM 8x16 Font");
  37.   getch();
  38.   Regs.r_ax = 0x0001;
  39.   intr(0x10, &Regs);
  40. }
  41.