To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 552
  LNP collision detection Bug found and fixed
 
Hi there, i just found an evil little bug in lnp ( or maybe it's actually a bug in gcc ). The problem is the definition of tx_state as char, and compare operations like if (tx_state < TX_ACTIVE) . The compiler generates wrong code for this (...) (25 years ago, 8-Dec-99, to lugnet.robotics.rcx.legos)
 
  Re: LNP collision detection Bug found and fixed
 
(...) It shouldn't matter if it does. More likely, it seems to me, is that TX_COLL is defined like this: #define TX_COLL -1 in which case, the offending statement becomes: tx_state=-1; which is old-style for: tx_state-=1; (should generate a (...) (25 years ago, 9-Dec-99, to lugnet.robotics.rcx.legos)
 
  Re: LNP collision detection Bug found and fixed
 
(...) it is already defined this way... indeed it looks like egcs for h8300 treats char as unsigned by default. look at the following test proggy... char ch; void showbug(void) { if (ch < 1) ch=-2; } ... and the disassembled code (...) (...) (25 years ago, 10-Dec-99, to lugnet.robotics.rcx.legos)

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR