Hi Matt, Good job!
> I added the debug lib + sample. Joep, would you like your name to be > added as author? No, your idea, you did the work so you deserve the credits. > Good: When I change the major constant to false to turn off the > library, none of the debug code is in the ASM file. So, this will > require no extra processing power when turned off. Good indeed! > Bad: I have some problem with print_string/debug_string. Can someone > please test my sample? the debug string does not seem to get carried > correctly to the print_string lib. This is a bug related to pragma inline (at least I think it is - if you remove it, it works like it should). Create a small program to demonstrate, but it (with all required libraries and the asm + hex output) in a bugreport directory under casulaties and ask Kyle to check. On 'debug_enable': - I see you use capitals, which implies it is a constant. The good thing about debug_enable is that is allows runtime enable and disable of groups. And there is little reason to make it a constant, since this won't remove debug statements when a group is disabled. So I suggest to make it lower case. - In addition to this: the array was my first idea, but since we don't have bit arrays, I suggest to use a single (word) variable, not an array. The check would be to 'and' debug_enable with debug_level and execute when the result is non-zero. const DEBUG_0 = 1 const DEBUG_1 = 2 const DEBUG_2 = 4 const DEBUG_3 = 8 .. const DEBUG_15 = 32768 A single statement is: debug_print(DEBUG_0, "testing"); But at the same price you can do: debug_print(DEBUG_0 | DEBUG_3 | DEBUG_7, "new frame"); Joep -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
