delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/09/11:30:15

From: Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: getpal problem!
Organization: Pin Eight Software http://pineight.8m.com/
Message-ID: <eq5hmsgs4ocjr4ub5r1sutdu6q9bm42dap@4ax.com>
References: <8k7p95$6f127 AT baran22 DOT ttnet DOT net DOT tr>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 28
X-Trace: /KHlxNAgtpHtBdYryrgb4ua5pqd3Vu8uUKaB3pq2gLebdTWWS9asi++eQ2OCnJ8suYxTNL9cVCaj!Y+OBmXPlXHwEM7IkwC3uJVGMZ0EtpSKW/reqsuV8AdQCbccVdkI0tcyR0ZXuYy1gWZV2vSUcFyTt!XA==
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Sun, 09 Jul 2000 15:21:37 GMT
Distribution: world
Date: Sun, 09 Jul 2000 15:21:37 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Sat, 8 Jul 2000 13:15:04 -0700, "helionb" <bcicek AT phreaker DOT net>
wrote:

>I am coding mode 13h, and I have problems with getpal.
>which is code
>void getpal(byte colno,byte &r,byte &g,byte &b)
>{ outp(0x03c8,colno),
>   r=inp(0x03c9);
>   g=inp(0x03c9);
>   b=inp(0x03c9);
>}
>but when I take pal bye this source I can recall it it was wrong ..
>
>Can anyone tell me what is wrong ?

Searching Google for [vga reading palette ] I found this:
http://www.goodnet.com/~tinara/FreeVGA/vga/vgareg.htm#color

Turns out you have to change the outp() line to
  outp(0x3c7, colno);

-- 
Damian Yerrick
"I refuse to listen to those who refuse to listen to reason."
See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html

This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses.  http://www.mcafee.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019