home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_01_05
/
1n05052b
< prev
next >
Wrap
Text File
|
1990-07-16
|
923b
|
31 lines
/* Listing2.c */
#include <dos.h>
/******************************************************************
* SetPaletteRegister - modify palette register value
*
* Parameters:
* nRegister (in) - desired register, 0 - 15
* nPaletteNumber (in) - palette number, either 0 - 63 (mode 0)
* or 0 - 15 (mode 1)
*
* 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 SetPaletteRegister (int nRegister, int nPaletteNumber)
{
_AH = 0x10; /* Video function 10h */
_AL = 0x00; /* Subfunction is 00h */
_BL = nRegister; /* Register number to modify */
_BH = nPaletteNumber;
geninterrupt (0x10); /* video service interrupt */
}