+OLD CS1 Posted November 6, 2010 Share Posted November 6, 2010 Are there any good tips for helping increase the performance of TI BASIC programs? I have whipped out several of my old TI BASIC programs from ages past with the intention of cleaning them up and applying more of what I have learned over the years. Though, what I have learned has come from other platforms. In particular, in Microsoft BASIC on the Commodore 64 and 128 I was taught to use a "jump" table at the beginning of the program (consisting of GOTOs at static locations) to use for subroutines, along with the subroutines at lower line numbers than the main portions of the programs. The idea being first that having a static "jump" (probably taken from JMP tables used in ML) locations were easier to track and maintain in code than GOSUBs which could move around, and that GOSUBs and GOTOs search from the beginning of the program for their targets, thus having subroutines at the beginning of the program supposedly made things run a little faster. Now, my understanding of the inner-workings of TI BASIC is that a table of line numbers is kept which point to the line's location in memory. In theory, searching a table would be faster than to search through a program which is constructed from a linked list. Which would be correct for TI BASIC? Another thing I have done is try to reduce the amount of math the program has to do, by changing IF-THENs with things like "IF S=0 THEN" to "IF S THEN", or ON-GOTOs, etc. I have also decided to pick up where I left off with machine language. I programmed some simple support routines using the line-by-line editor with MiniMemory for a couple of TI BASIC games, but I think I will like to convert them fully to ML at some point. (A quick special thanks to Tursi for Classic99, which has been indispensable in re-writing my programs, as well as the authors of CS1er and Tape994A for helping me get my programs into the emulated environment, and even back to the real TI-99/4A.) Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.