Quote:
Originally posted by SuperDanman
eh, problem there is you're wasting precious bits. Last year we used up ALL of our memory for our program, and this year we've been VERY conservative with our memory (i.e. if you put your light-relay-on code at the very end of your code, then you can use the two light relay bits as temporary swap bits cause they're just hard-coded later on).
For example...
direction = sw5
If you're setting direction to be equal to sw5, there's no need to make a seperate bit for it. Just make "direction" an alias for "sw5" if you don't want to use sw5 (aliases take no memory).
Same thing with
program1 CON 0
I see no reason for this. Just make the if statement "IF program = 0...."
On PC programming, there's no real problem with memory allocation being as leniant as you're doing it if it's something as small as the robot code is (although it's much more efficient if you use less memory).
However, with something that has as little memory as a PBASIC stamp, you should be really careful with memory allocation - otherwise, you're going to run out.
|
Right...I have room for 20 more bytes in my auton program (160 bits).

3 bits aren't going to make that much of a difference...I'm not going to run out, and we are done with the programming.
You know there are 8 slots on the RC right?