home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
James Briskly's Game Magazine 1
/
jbgm001s.zip
/
MODE13.C
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-07
|
952b
|
36 lines
/* This is copyright(c) Bruno Stroobandt anno 1995.
This is part of the JB Game Magazine.
Disclaimer : see inside JBG magazine !!!
*/
#include <conio.h> // keyboard IO ect
#include <stdio.h> // printf() ect
#define vga 0x0013 // vga is not VGA is not Vga is not vGa ...
// this are all different variables.
// I say this now, because I am going to use
// VGA as a pointer to the VGAmonitor.
// (in later demo's)
#define txt 0x0003
void vgamode(int mode)
{
asm {
mov ax,mode
int 0x10
}
}
// here follows the main programm
void main(void)
{
vgamode(vga); //put your PC in mode 13h
printf("\nHallo this is in mode 13h");
printf("\nPress a spacebar...");
getch(); //wait for a key
vgamode(txt); //put your PC in mode 3h
printf("\nHallo this back in tekstmode");
printf("\nPress a spacebar...");
getch();
printf("\nThe End.");
}