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)
|