Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Joshuasm32 on February 09, 2014, 11:30:29 pm
-
I am a newb at Axe Parser, and was wondering how to slow a program down... I have already used ExprOff. What is the best method to do so, without random code that takes up bytes?
-
You could have a meaningless interrupt going on in the background that just increments a counter variable. This has actually never occurred to me before. I wonder why you need to slow down a program, though?
-
It is a very basic program, and some of the graphics are too hard to see, not to mention the fact that one keypress moves a tank across the screen. What exactly do you mean with the breaks? (Like I said, I am a total newb)
-
Breaks? I said interrupts. They are routines that interrupt the execution of a program based on the internal timers, and continue where the program left off.
That said, an easy way is that for the things that move, you multiply the position variable by a number and increment when you increment by a smaller number than the scaler constant. When you display, you just divide the position variable by the scaler constant.
For example:
2*5->X
2*5->Y
X+[keypress]->X
Y+[keypress]->Y
Pt-On(X/2,Y/2,[Ptr])
-
I would recommend using Pause x. x=1800 corresponds to approximately one second on a calculator running at 6MHz (the default), or x=4500 corresponds to approximately one second on a calculator running at 15MHz (if you've used Full on a 15MHz-capable calculator).
-
Thank you! That is a great idea...
-
Pimath went a little too far on this one :P I hope you're not using imterrupts to slow down a program ... Such a waste.
-
Matref: see my second post.
No interrupts :P