TIdBiT – TI BASIC Translator

Download: TidBit source

V3.0 – Updated on September 13, 2016

TidBit was created to help write TI-99/4A BASIC and Extended BASIC programs.  TidBit is a pre-processor that lets you write your code in a more natural way (no line numbers, use indentation and comments, use labels, etc.) and then generates a normal BASIC/XB program that can be run on a TI-99/4A computer.  Some of the main features are:

  • Line numbers are not necessary and will be assigned.
  • Labels can consist of A-Z, a-z, 0-9, _, and -. They can be any length, but a maximum line length is 256 characters. Label “definitions” must start a line and end with a single colon. Labels can be referenced any place a line number can be used, currently: THEN, ELSE, [ON]GOTO, [ON]GOSUB, and ON ERROR.
  • Comments are any line that start with REM or // (C/C++ style single line comment notation). XB also has a “trailing comment” designated by a ! that causes the rest of the line to be ignored. The C-style // comments will be stripped from the code, but the REM and ! comments will be retained in the output.
  • Leading space is ignored so you can indent as much as you like.
  • Long lines can be split by ending a line with .. (double period). These lines will be joined into one long line and the XB limit of 140 characters will be checked.
  • Lines that end with the XB multi-statement operator ::, that end with a THEN or ELSE statement, or where an ELSE statement is on the next line, will automatically join the next line.
  • A pseudo ENDIF statement can be used with IF-THEN-ELSE statements to help make code more readable.
  • The starting line number and line number increment can be specified.
(must be between 1 and 32767)
(must be between 1 and 100)

19 comments to TIdBiT – TI BASIC Translator

  • Works as advertised. It really makes code much more readable, especially with the long labels and the indentation.

  • I’m looking forward to getting involved with this… Thanks for the hard work, Matthew!

  • I’m working on a large program right now that requires many “jumps” and “jump-backs”… Something that labels are much better suited for than line numbers. I knocked out a good chunk of the framework very quickly using this translator. The more I use it, the better I like it. I’m just free-form coding in Notepad++ and pasting into TIdBiT and it works like a charm. Is there any size limitation to the code I can paste in for translation?

  • matthew

    Hey Owen, I’m glad you are getting some use from it. The only limit is the size limitation for a form post in my web server configuration. Currently that limit is about 2MB to 8MB I think. So, for a TI BASIC program, practically no limitation. 🙂

    If you end up using it heavily, I could probably be enticed to make a desktop version.

  • Matthew— I REALLY wish I had started my program in this syntax…. It’s proving to be difficult to integrate on the fly. Once I convert and run– if there’s a bug, I’m not updating my TIdBiT source, just fixing it in Classic99 on the fly… It’s a bit tough to debug and update the program, my XB source in Notepad and my TIdBiT source as well.

    Next project, I think I’ll program in TIdBit and just “translate” it each time I want to run…. Kinda like assembly source that you have to assemble before running. I wonder if we could go in reverse?? “Disassemble” XB code into TIdBiT?

  • matthew

    The only problem with going in reverse is, the translator can not come up with descriptive labels. Also, the computer can’t really decide how you want your formatting, since everyone does it a little differently. I think the results would be less than desirable.

  • Walid Maalouli

    A desktop version will be soooo nice! Having to use the command line to run the php script every time is cumbersome and clumsy at best. Using the web version is slick, but ties you to an internet connection which may not always be available.

    • matthew

      Let me see what kind of bindings there are for PHP and a GUI lib (like QT). However, no matter how you run the translator the workflow from TidBit to a running program in an emulator is still cumbersome at best.

  • Owen Brand

    Just finished a complete conversion of a fairly large XB listing. This program has proven (and looks to continue to prove) invaluable in learning to break out of the LINE number mentality. More should take advantage of it’s capabilities. I will certainly be a vocal advocate. 🙂

  • Airshack @ AtariAge

    This is part of my TI-99/4A BASIC programming workflow. I wouldn’t return to BASIC without it. A must have for anyone using BASIC in the modern era.

  • Rich

    I am trying to translate a code using the above code in and code out. I am not very good with computers or for that matter code. The code I got was left on the website geocaching.com. When translated it is supposed to give me numbers to a geocache. Can someone help guide me in the translating of the code?

    • matthew

      Hello Rich,

      This translator has nothing to do with GeoCaching. This translator is used for people enjoying the retro-computing hobby, and specifically programming in BASIC or Extended BASIC on the TI-99/4A Home Computer. You will have to search elsewhere for help with GeoCaching. Sorry.


  • Hi Matt.
    Would it be possible to add a paste from clipboard button next to the Code in window which clears the window and pastes code from the clipboard? Similarly, a copy to clipboard button next to the Code out window would copy its contents to the clipboard.
    This feature would tremendously help in streamlining the process of inputting code and getting code out, particularly for lengthy programs.

    • matthew

      Hello Walid,

      Apologizes for the late reply. I’m going to rework my whole site soon, I’ll see what I can do at that point.

  • James Shackel

    See TIdBiT working locally (no internet connection) on my low end Win10 dev machine in the first three minutes of this video:


    I like Walid’s copy-to-clipboard button idea.

  • Walid Maalouli

    Hi Matt.
    I found an error in TidBit with the ON ERROR statement.
    In the following construct

    ON ERROR label::INPUT #1:ANS$

    label is not converted to a line number.

    It’s not a common construct, but I happened to need it for my robotics project…


    • matthew

      Fixed. Also, adding a space after the label name and before the double-colon would have worked too. But the bug is now squashed. Thanks for reporting the problem!

  • James Shackel

    I’ve recently used this with an unexpected level of success while writing Aquarius BASIC. Sure would be nice to have a button for converting TI double-colons into single colons for the more standardized variants of BASIC.

  • James Shackel

    Never mind. It already does the single-colon deal correctly. Seems like a useful tool for BASIC coding on just about any platform.