Code Monkey home page Code Monkey logo

tibasicc's Introduction

tibasicc

a (de-)compiler for TI-BASIC with comment support

This little program is all about compiling TI-BASIC code on your computer into an .8xp file ready for transferring to your TI-83/TI-83+/TI-84 calculator (and vice versa). Being able to type your programs on a real keyboard instead of the calculator's keypad is much easier and avoids some otherwise big pain.

Note: This project is a fork from pcmattman/tibasic.

Installation

Unix (GNU/Linux, MacOS, FreeBSD, etc.)

If you are using Arch, you can just install my AUR Package either manually or with your prefered aur helper (paru, yay, etc.):

paru -S tibasicc-git

For other systems, here is my also fairly easy general approach. I have recently only tested this on GNU/Linux, but it should still work on any other unix-like OS like MacOS:

git clone https://github.com/noahvogt/tibasicc.git
cd tibasicc
sudo make clean install

Windows

If you are a Windows User, you have to install git (don't forget to add it to your Path variable during the setup process) and MinGW first. Now open cmd.exe with administrator privileges and enter these commands:

git clone https://github.com/noahvogt/tibasicc.git
cd tibasicc
win-installer.bat

Now you have to add the directories specified in the output of the install-script to your Path variable. To do this, press the 'Windows Key' and search for "path". In the window that popped up, click "Environment Variables...". In this window you have to select a path variable (you can choose on your own between the system-wide variable and the user-wide variable), click "Edit..." and add them. Now you can open a new terminal window and it should work.

Usage

After installing, this program should be in your path. This means, you can call it from the terminal like this:

tibasicc [options] filename

I haven't made a man page for this simple program yet, but you can get some usage information when you run this program without any arguments or with some help flags (-h or --help).

Features

Base Features

  • compiling from source to .8xp
  • decompiling from .8xp to source (-d flag)

Preprocessor

  • support for comments (using #)
  • remove empty lines
  • remove lines that only contain whitespaces
  • strip off unneeded whitespaces to make the binary smaller

Additional Options

  • verbose / debug mode that gives a lot of information (-v flag)
  • specify output file (-o flag)

Possible Future Features / TODO's

  • add a 'check' make target
  • add bash / zsh autocompletion
  • update / add documentation

tibasicc's People

Contributors

amarshall avatar miselin avatar noahvogt avatar wolfgang42 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

amarshall tolkien

tibasicc's Issues

Debug: Empty line detected! *** buffer overflow detected ***: terminated when trying to compile test.tib

OS: GNU/Linux

I'm trying to compile the test.tib file and it is giving me the error in the title.

The output with the -v option is below.

Info: Verbose Mode successfully activated
Debug: 'Disp '
Debug: '"'
Debug: 'H'
Debug: 'I'
Debug: '!'
Debug: '"'
Debug: ':'
Debug: 'Disp '
Debug: '"'
Debug: 'W'
Debug: 'O'
Debug: 'O'
Debug: 'T'
Debug: '"'
Debug: 'If '
Debug: '1'
Debug: '='
Debug: '1'
Debug: ':'
Debug: 'Then'
Debug: 'Disp '
Debug: '"'
Debug: 'T'
Debug: 'E'
Debug: 'S'
Debug: 'T'
Debug: '"'
Debug: 'End'
Debug: Empty line detected!
Debug: 'If '
Debug: '-'
Debug: '5'
Debug: '0'
Debug: ' '
Debug: '<'
Debug: ' '
Debug: '-'
Debug: '3'
Debug: '0'
Debug: ':'
Debug: 'Then'
Debug: 'Disp '
Debug: '"'
Debug: 'h'
Debug: 'e'
Debug: 'l'
Debug: 'l'
Debug: 'o'
Debug: '?'
Debug: '"'
Debug: 'End'
Debug: Empty line detected!
*** buffer overflow detected ***: terminated
fish: “tibasicc -v test.tib” terminated by signal SIGABRT (Abort)

Any help is appreciated.

Installation script is broken and decompilation fails

Thanks for your update to the app, Noah. I've been looking for a simple command line tool to assist with compiling 8XP apps and strip comments etc. I gave it a crack but unfortunately it's quite buggy:

  1. The win-installer.bat fails to run as it seems that you've renamed the CPP files to CC. I eventually found my way around this manually and managed to create an EXE file.

  2. When decompiling a very simple 8XP file (temp2.zip):

    Disp 1+1
    

    It produced the following file:

    1+1{->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->FRAC->
    

    Is this a bug in the decompiler? Or perhaps an issue with me not running the g++ commands correctly?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.