home *** CD-ROM | disk | FTP | other *** search
/ James Briskly's Game Magazine 1 / jbgm001s.zip / MODE13.C < prev    next >
C/C++ Source or Header  |  1995-08-07  |  952b  |  36 lines

  1. /* This is copyright(c) Bruno Stroobandt anno 1995.
  2.    This is part of the JB Game Magazine.
  3.    Disclaimer : see inside JBG magazine  !!!
  4. */
  5. #include <conio.h> // keyboard IO ect
  6. #include <stdio.h> // printf() ect
  7.  
  8. #define vga 0x0013 // vga is not VGA is not Vga is not vGa ...
  9.            // this are all different variables.
  10.            // I say this now, because I am going to use
  11.            // VGA as a pointer to the VGAmonitor.
  12.            // (in later demo's)
  13. #define txt 0x0003
  14.  
  15. void vgamode(int mode)
  16.    {
  17.    asm {
  18.        mov ax,mode
  19.        int 0x10
  20.        }
  21.    }
  22.  
  23. // here follows the main programm
  24. void main(void)
  25.    {
  26.    vgamode(vga); //put your PC in mode 13h
  27.    printf("\nHallo this is in mode 13h");
  28.    printf("\nPress a spacebar...");
  29.    getch(); //wait for a key
  30.    vgamode(txt); //put your PC in mode 3h
  31.    printf("\nHallo this back in tekstmode");
  32.    printf("\nPress a spacebar...");
  33.    getch();
  34.    printf("\nThe End.");
  35.  
  36.    }