www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/12/17:15:21

From: "Dahl" <no-spam-to:dahl AT c64 DOT org>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Detecting interrupt on printer port
Date: Wed, 12 Aug 1998 22:51:49 +0200
Organization: Algonet/Tninet
Lines: 27
Message-ID: <6qsv6g$4ip$1@cubacola.tninet.se>
References: <C22A1.62$Qi3 DOT 325552 AT sapphire DOT mtt DOT net> <35D0BF71 DOT 9FB3EE0B AT unb DOT ca> <625A1.98$Qi3 DOT 473241 AT sapphire DOT mtt DOT net>
NNTP-Posting-Host: du212-150.ppp.algonet.se
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Michel Gallant skrev i meddelandet <625A1.98$Qi3 DOT 473241 AT sapphire DOT mtt DOT net>...
>
>Endlisnis wrote in message <35D0BF71 DOT 9FB3EE0B AT unb DOT ca>...
>>Michel Gallant wrote:
>>
>>
>>use:
>>volatile int counter = 0;

All registers and addresses concerning the parallel-port should be treated
as volatile addresses.

That should do it

>>
>>You need to do this because DJGPP will likely move counter into a
>register
>>during the loop where you print the value in printf.  Setting a
>variable to
>>'volatile' forces DJGPP to reload 'counter' from memory every time it
>is
>>used.
>>



- Raw text -


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