rosen

Compiles Lua to TI-84 Plus TIBasic

Usage no npm install needed!

<script type="module">
  import rosen from 'https://cdn.skypack.dev/rosen';
</script>

README

Rosen

Annoyingly, the TI 84 Plus calculator only supports programming in Assembly or TI Basic, because Texas is apparently stuck in the 1970s.

This compiler takes a snippet of Lua code and makes an equivalent TI Basic code snippet. Because Lua includes some things that TI Basic doesn't, like functions and local variables, the compiler has to add those features, which adds some small overhead.

To use the compiler with the terminal, run:

rosen file.lua # makes a file in the current directory called a.out

To give the compiled file a name, run:

rosen file.lua -o file.8xp # makes a file in the current directory called file.8xp

To use the compiler in Node, run:

const rosen = require("rosen");

const basicCode = rosen("name = 'Abhinav Madahar'");

Currently supports:

  • Setting global variables
  • Binary expressions e.g. "a + b"