|
There's a few little tricks to stay within 26-bytes. Here's a quick list:
1. Use the smallest size possible. Words give 0-65535, Bytes are 0-255, Nibs are 0-15, and bits are 0-1.
2. Reuse variables whenever possible. For example, you said you needed two counter loops--one during auto mode, the other regular. Is there any reason why you can't use the same variable for both?
3. Strip down your SERIN. Only import the stuff you actually use, making sure to update the constants accordingly. For example, the default code imports the X and Y axis for all the joysticks. If you don't use them, get rid of them. Also, just removing them from SERIN doesn't undeclare them. You need to find that section of the code.
4. As a last resort, use scratchpad. It can get to be very messy, very fast but it can also save you a lot of variable space if done correctly.
To answer a few of your specific questions:
Make sure delta_t is in the SERIN statement in the proper place
You cannot ever "undeclare" a variable. VAR, CON, and DATA are all compile-time directives that can be placed ANYWHERE in your source code and have the same effect.
Last edited by rbayer : 10-02-2003 at 22:21.
|