home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FreeWare Collection 2
/
FreeSoftwareCollection2pd199x-jp.img
/
manboetc
/
mred.c
< prev
next >
Wrap
Text File
|
1990-06-14
|
688b
|
42 lines
#include <stdio.h>
#include <string.h>
#include <dos.h>
void main(argc,argv)
int argc ;
char *argv[] ;
{
union REGS regs ;
unsigned int i,j ;
if (argc != 2) error() ;
if (stricmp(argv[1],"on")== 0)
{
regs.x.ax = 0x1bc2 ;
int86(0x91,®s,®s) ;
regs.x.ax = 0xff00 ;
regs.h.dl = 0x1c ;
int86(0x91,®s,®s) ;
}
else if (stricmp(argv[1],"off")== 0)
{
regs.x.ax = 0x1b82 ;
int86(0x91,®s,®s) ;
regs.x.ax = 0xff00 ;
regs.h.dl = 0x0d ;
int86(0x91,®s,®s) ;
}
else
error() ;
}
error()
{
printf("Usage: mode on : T-VRAM mode.\n") ;
printf(" mode off : BUFFER mode.\n") ;
exit(1) ;
}