From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: THE -O2 PROBLEM - PART II Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: <38F20E7A DOT 3330E9A4 AT mtu-net DOT ru> <38F6C64E DOT C7753C6C AT mtu-net DOT ru> <8d7l3g$j3i$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <38F76B94 DOT 5E968BA7 AT mtu-net DOT ru> <38F7A6FE DOT ED9B3E59 AT mtu-net DOT ru> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 20 X-Trace: /Kkf2LHEJsFrKMwCfBb8S2i9MQozQauEx00yvRqEM6tpZb3j8XEVlE/2MwKueJxn65HAdnmauQeC!Ls0yPjGh5zeaGYZRXDByFTZ86NHwCvRougikUBWcdCM9kH8OnMCZK4WwDhNH0Y8w/03LFnuFbhgW!lA/QBJw= 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: Sat, 15 Apr 2000 00:43:46 GMT Distribution: world Date: Sat, 15 Apr 2000 00:43:46 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Sat, 15 Apr 2000 03:17:18 +0400, "Alexei A. Frounze" wrote: >My keyborad IRQ0 ISR puts 1 to an array, if a key is pressed and puts 0, if it >is released. > >But with optimizations enabled, I simply get faulty code, since compiler >eliminates checking of the array. How to prevent this from optimizations? Try comparing your keyboard handler against the Allegro library's. If you wonder how to code something low-level on the DJGPP system, the Allegro sources are often a good place to start. -- 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/