Show HN: I'm 17 and I created a Forth interpreter for the TI-84+ calculator
https://github.com/siraben/ti84-forth
Hi HN!
For the past year I've been getting into programming in Z80 assembly (especially for the TI-84+). More recently I've been learning about the Forth programming language and after a lot of searching online (in vain) for a Forth interpreter for the TI-84, I decided to write one myself. It's been fun demoing this to others, because it's a very unexpected use of a calculator.
It's my largest project to date, and I'm interested to know what the HN community thinks, please feel free to critique my code!
-- Ben
17 comments
[ 5.3 ms ] story [ 35.7 ms ] threadThe computer industry needs more people like you.
OT, but with PDP-11 you could write 103737 (in octal), which propagated across memory (backwards).
10 means "move", first 37 means "from what R7 is pointing to, autodecrementing R7 before copying", second 37 is "to what R7 is poiting to, autodecrementing R7 before copying". R7 is the program counter, so this operation was copied one word (16 bits) before the executing instruction and then control was passed to that new word.
Of course, with GA144 you can have up to 4 commands in a single 18-bit long instruction, so opportunities are better...
What you did is truly incredible.
The code looks readable and pretty clean. Very cool.
If you want to continue down the Z80 route, and have too much time on your hands, I recommend designing a simple IR and building a little compiler/code generator for the Z80 (twas fun for me).
I still remember being amazed by xlib [1], a util to give you access to things only assembly programs could do in TI-BASIC. This meant you could do ALL your programming on the calculator itself but leverage things like clearing the screen, drawing a sprite, scroll the screen and more. This added capability blew my mind and I used it heavily in my development. After that I realized you could use this (very crappy, but I didn't know it at the time) "IDE" toolset from TI that ran on my computer. I remember the OS X and Windows versions didn't have feature parity and so I always liked using my friend's Mac because it was easier. Being able to code on the computer and push my code to my calculator was another huge step forward for me but I still loved being able to make tweaks on the go.
I never did jump into Z80 though, it was a little too arcane for me at the time and by this point I'd hit my 10th grade year (Sophomore in High School) and I could finally take the "Intro to Programming" class offered by my school where I learned Java. That really changed things for me, curly braces and the ability to group and abstract code crazy concepts to me but I picked them up fast enough.
I'm going to go ahead and stop here because I realize I've rambled on and this is a pretty off-topic comment as-is without me going into my history of programming.
[0] http://calcg.org/cgi-bin/files.cgi?action=autha&autha=Josh+S...
[1] http://tibasicdev.wikidot.com/xlib