simple code cause NXT brick frozen

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: simple code cause NXT brick frozen

Post by afanofosc »

The earlier compiler always moved tst and cmp results into and out of a "zero flag" signed long and that code was not ever optimized out due to its variable name. Since that time I switched to using the "register" (d0) compiler-generated variables for this zero flag stuff as well and that changed the code generation a bit such that it allowed mixing floats and longs in places where it couldn't happen before.

I suppose I should consider moving back to that form of code generation so that it better supports the buggy standard firmware but there are so many other things that you get from the enhanced firmware that it is hard for me to justify compiler changes just to avoid bugs in the standard firmware when if you use NXC there is really no good reason to use the standard firmware.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests