home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_01_05
/
1n05052a
< prev
next >
Wrap
Text File
|
1990-07-16
|
975b
|
34 lines
/* Listing1.c */
#include <dos.h>
/******************************************************************
* SetColorRegister - modify color register value
*
* Parameters:
* nRegister (in) - desired register, 0 - 255
* nRed (in) - red component, 0 - 63
* nGreen (in) - green component, 0 - 63
* nBlue (in) - blue component, 0 - 63
*
* Global:
* Turbo C register pseudovariables
*
* Notes:
* 1. Compiled with Turbo C version 3.0
*
* Copyright:
* Original code by William H. Roetzheim (619) 669-6970
* Copyright 1990 by William H. Roetzheim
* All rights reserved.
**********************************************************************/
void SetColorRegister (int nRegister, int nRed, int nGreen, int nBlue)
{
_AH = 0x10; /* Video function 10h */
_AL = 0x10; /* Subfunction is 10h */
_BX = nRegister; /* Register number to modify */
_CH = nGreen;
_CL = nBlue;
_DH = nRed;
geninterrupt (0x10); /* video service interrupt */
}