delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/05/14:44:27

From: "GiLbI" <GiLbI AT ngi DOT it>
Newsgroups: comp.os.msdos.djgpp
Subject: Outportb function
Date: Sun, 5 Mar 2000 19:57:43 +0100
Organization: NGI - www.ngi.it - A Place to Play!
Lines: 21
Message-ID: <89udu8$cpm$1@agnus.ngi.it>
NNTP-Posting-Host: h213-26-190.pd1.albacom.net
Mime-Version: 1.0
X-Trace: agnus.ngi.it 952285960 13110 213.213.26.190 (5 Mar 2000 19:52:40 GMT)
X-Complaints-To: news AT news DOT ngi DOT it
NNTP-Posting-Date: 5 Mar 2000 19:52:40 GMT
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Why if I use the function

void setpalette(int color,int r,int g,int b)
{
  outportb(0x3c8,color);
  outportb(0x3c9,r);
  outportb(0x3c9,g);
  outportb(0x3c9,b);
}

in the main source file of a program set the palette correctly but if I
insert it in another file (in ex. palette.c) and i compile all with gcc -o
file.exe main.c palette.o (or palette.c) i see black screen?
I've tried to make a lib and use gcc -o file.exe main.c -libpal but... black
screen!
The application isn't crashed. I'm using VBE 2.0 and i've checked VGA
compatibility!!
Thanks.



- Raw text -


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