Date: Fri, 4 Apr 1997 08:19:20 -0800 (PST) From: Orlando Andico Reply-To: Orlando Andico To: Jono Greene cc: djgpp AT delorie DOT com Subject: Re: Parallel Port Program? In-Reply-To: <01bc40df$f8f93ea0$6e221cce@ppro> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 3 Apr 1997, Jono Greene wrote: > I am trying to write a simple program that will turn on a designated pin of > the parallel port, at a designated time. I have found the following code, > but I can't get it to compile under DJGPP: > > #include > #include > #include > > void main(void) > { > struct time t; > unsigned port = 0x378; > while() > { > gettime(&t); > if(t.ti_hour==10 && t.ti_min==05) _outp8(port,1); > else _outp8(port,0); > } > } > 1. Lose the #include 2. Use outb () instead of _outp8() ----------------------------------------------------------------------- Orlando Andico IRC Lab/EE Dept/UP Diliman email: orly AT gibson DOT eee DOT upd DOT edu DOT ph http://gibson.eee.upd.edu.ph "There's an obvious attraction to the path of least resistance.."