TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: ALL
from: CLINT SPROTT
date: 1998-04-10 10:07:00
subject: Re: Setting the VGA palet

From: Clint Sprott 
Subject: Re: Setting the VGA palette?
 
For anyone who may be interested, Don Schullian provided advice from
which I wrote the following subroutine to produce a 16-level gray scale
in SCREEN 12:
 
SUB grayscale ()
    'sets RGB palette to a gray scale in 16-color VGA screen modes
    FOR pal% = 0 TO 15
        PALETTE pal%, pal%
        c% = INT(4.2 * pal%)
        OUT &h3C8, pal%
        OUT &h3C9, c%    'red
        OUT &h3C9, c%    'green
        OUT &h3C9, c%    'blue
    NEXT pal%
END SUB
 
--
 
| J. C. (Clint) Sprott           Tel: (608) 263-4449                  |
| Professor of Physics           Fax: (608) 262-7205                  |
| University of Wisconsin        E-mail: sprott@juno.physics.wisc.edu |
| Madison, WI 53706-1390 USA     WWW: http://sprott.physics.wisc.edu/ |
 
*** QwkNews (tm) v2.1
 * [TN71] Toast House Import
--- GEcho 1.20/Pro
---------------
* Origin: Toast House Remote (1:100/561)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.