John, I found the problem thanks to your help. The problem turned out to be an easy fix but was difficult to know what was going on. Thanks to your float bug tip, I found the problem. It turned out that I had the floating point bug "fix" installed incorrectly. I did a search of my disk and found the location of libgcc.a. So, I copied the new library over the old one. Then, later I found that there were two locations for libgcc.a. Because I installed CYGWIN, there was a libgcc.a for CYGWIN and that was where I installed libgcc.a. Unfortunately that was not the correct place to fix the problem, for prc-gools. Once I copied the new libgcc.a to the correct location under prc-tools, my math problems went away. I also found that while an application might work without all necessary includes, in the non multiple code resources, it won't when using multiple code resources. Summary: 1) Install floating point bug fix (libgcc.a), if you use floating point. 2) Make darn sure that all functions in a module, have proper includes otherwise you get "illegal instruction" errors. My app is now compiles, links and even better, functions, with multiple code resources. Thanks John for the, way too many, hours you have helped me with this problem. Mike > Mike Davis <[EMAIL PROTECTED]> wrote: > > It's acting as > > though fmod(i,6) is returning zero. > > That's interesting... and congratulations on the detective work. > > The basic thing that comes to mind is that there are a lot of unnecessary > fp conversions going on in there. It would be very interesting to see the > assembler code generated for that function. > > 1. There is definitely a prototype in scope for fmod(), right? > > 2. What does `m68k-palmos-objdump -h' on your multisection executable say? > > (If the .text section (which contains fmod) has sneaked out past 32K, this > could cause your problem. See also Eugene Chin's similar thread on > pilot.programmer.gcc entitled "Application bus error in non-fp > arithmetic".) > > 3. Er, why don't you just use `(i % 6)'? Of course, probably this > wouldn't > solve all the instances of your problem. :-) > > John > > -- > For information on using the Palm Developer Forums, or to unsubscribe, > please see http://www.palm.com/devzone/mailinglists.html -- ----------------------------------------------------------------- Discussion Group: http://www.halcyon.com/ipscone/wwwboard/ Protect your constitutional rights. Your favorite one may be next! ----------------------------------------------------------------- -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palm.com/devzone/mailinglists.html
