-
Notifications
You must be signed in to change notification settings - Fork 2
Getting Started
Hey! You! This app is still in development! If you have issues, please send me an email, post in the forums, or open an issue on GitHub! Thanks, you're the best :)
To follow the progress of Grammer, check out Omnimaga, Cemetech or GitHub, where development is most active.
If you have questions or suggestions, feel free to email me, post in the forums, or open an issue on GitHub!
Grammer is a powerful programming language for the TI-83+/84+/SE calculators. It started out as an assembly program (Grammer 1) and then it started to be too large and became an App instead (Grammer 2). While Grammer 1 programs should be compatible with Grammer 2, Grammer 2 offers far more features.
Whereas TI-BASIC is meant for math and analysis and stats, Grammer is meant for games.
- Downside: Grammer math is faaast compared to BASIC, but it is very limited. (You have numbers from 0 to 65535, and only integers. Fast, but limited.)
- Upside: Grammer has way more to offer for fast graphics and data storage (ex. : You can create an appvar to store save data.)
If you are going to learn how to effectively use Grammer, you will first need the Grammer interpreter on your calculator (this document assumes you have the latest version of the Grammer App). After that, you should become familiar with Grammer's:
- Number system
- Math
- Pointers
- Drawing
- Data structures (sprites, arrays)
First, send Grammer 2 to your calculator. If you have this document, I assume you have the App (in the bin
folder grammer.8xk
).
Next, run the app on your calc. Grammer is now installed until your next RAM clear.
The app's menu controls are as follows:
- [Clear] exits
- [Up/Down] scroll through the filtered list of programs and appvars
- [Enter] selects a program or appvar to run as a Grammer program
- [*] toggles archived/unarchived
- [Y=] toggles the
Gram
filter. This shows only files with a Grammer header. - [Window] toggles the
AppV
filter. Toggled on, this will only show appvars, off will show progams and appvars. - [Zoom] toggles the
Asm
filter. Toggled on, this will only show assembly programs. - [Trace] exits the app, like [Clear].
- [Graph] shows more options. At the moment, enable/disable the lowercase and the token hook.
Grammer programs start with .0:
. I like to make my header like this, and you'll see this throughout the documentation:
:.0:Return
This way, if Grammer isn't installed, the BASIC interpreter just exits. You could also do something like:
:.0:Pause "GRAMMER 2 NOT INSTALLED":Return
In Grammer, lines that start with a .
are treated as comments/labels. So when the Grammer interpreter is installed, the line is ignored. When it isn't installed, the line is run as valid TI-BASIC.
Grammer programs only stop when Stop
is reached, or there is an error. Your code must have a Stop
, otherwise it can crash your calculator!
With that out of the way, try out your first program:
:.0:Return
:ClrDraw
:Text(0,0,"YUM
:DispGraph
:Stop
It should look like this:
As you might expect from TI-BASIC, ClrDraw
clears the graph screen, Text(0,0,"YUM
draws YUM
to the upper-left corner of the graph screen, and DispGraph
just displays the graph screen. This last piece is redundant in BASIC, but necessary in Grammer. This is fantastic
for when you want to do a lot of drawing, then show the contents. In TI-BASIC, the user
sees everything as it is being drawn. Aside from smoother graphics, this also helps with
speed since the LCD on these calculators is a bottleneck-- the LCD is pretty slow, so LCD
updates have a lot of code to wait for the LCD to be ready.