Please see the disclaimer.
In my last post, I mentioned the first program I ever wrote.
That, plus thinking about the calculators where I learned the basics of programming, made me feel nostalgic.
So if you don’t mind, I would like to take a walk down memory lane.
These programs were written by a teenager who was just learning how to program. Please don’t judge.
All of my first programs were written on a TI-84 Plus Silver Edition.
At the time, I did not have much money, but I still dropped $120 for it. The reason was because my friend had showed me some of what he had done with his TI-84.
I was so taken by what he did that I plunked that money down. That was well over a decade ago. I might have been 15 or 16.
All of these programs were rescued manually from my TI-84 by typing in the code on my computer. I also formatted them because on the TI-84, there is no such thing as code formatting.
There are also some translations from TI-BASIC to a plain text format. In most cases, the translation should be obvious.
My first program ever was named SimpQuad. This was short for “Simple Quadratic Formula.”
The TI-84 only allowed 8 characters for the program name.
You would input the
C of the quadratic formula, and the
calculator would solve it for you. It would also attempt to print it in the
form of the quadratic formula, if it could reduce it. If it could not, then it
just printed it in the form of a complex number.
Anyway, here it is.
If you look at it, one input is the “Reducing Number”. This would be the number of iterations that the program would use to attempt to reduce the answers.
Looking at it again, I am struck by how many things I remember.
First, I left out any
End’s or anything else (like closing parentheses) I
could to save memory.
Second, I seemed to get the idea of structured programming pretty well, though I
did not understand the use
goto and labels to create functions.
To be fair, I still don’t have any idea how to create functions without a stack.
Third, I am surprised by the size of the program. It’s 208 lines long!
I guess I just wasn’t the kind of kid that would be satisfied with “Hello,
20 GOTO 10.
Funny story about this program: it caused a teacher to threaten to get me suspended, simply because I wrote it. She thought I was cheating on homework and tests with it.
I talked her down by making a deal with her that I would turn in the calculator to her before every test, and I would use one of the class' dinky calculators instead.
Unnamed Calculus Program
In Calculus, my teacher had us all create a way to help us memorize the basic derivations and integrations. I did it on my TI-84 with a slideshow sort of thing. That program was deleted sometime back, and I do not have it. I don’t even remember what it was called.
ChessNut and ChessSet
Next, I wanted a way to play chess on my calculator.
I was under no illusion; I knew that it would not include an AI, but I could at least make a two-player chess program.
And I did.
This was the first program where I dealt with technical limitations because the entire program and its data would not fit into RAM. I had to split it into two programs.
ChessSet was the auxiliary program. It could draw the starting board, the splash screen, or the board from a saved game. It could also take the data from ChessNut and save it to be continued later. It also contained the instructions for ChessNut.
And ChessNut was the actual game.
Looking at ChessSet, the code wasn’t complicated; it was more a bunch of busywork to write.
But ChessNut was a tough nut to crack.
I am fascinated looking at it, mostly because I seemed to intuitively understand the idea behind event loops, something I did not learn about until far later.
But it also has sprites, a splash screen, and checks for illegal moves.
Though, for some reason, the game will not allow players to move queens or rooks to the left. I checked that code, and it exists and seems correct. I have no idea what’s wrong.
Also, there was once when I fat-fingered the
Clear button and erased a line. I
put my best guess as to what it was in the text file.
Yes, I made a minesweeper game on the TI-84, called Mineswpr.
It was slow, but it worked. It would even clear all of the spaces surrounding a
0, just like the real thing.
I did not implement the equivalent of mass clearing by clicking somehow on a square with all the mines marked.
This game still works wonderfully!
After I entered the Air Force Academy, I wrote NumConv. It was to help me convert numbers from any base into any other base.
I did this because there was one point where the cadre told me to convert the serial number of my “firearm” (it was a fake) into binary. I failed because the serial number was at least 10 digits.
So I wrote NumConv to convert it for me.
I never did get another chance. Oh well.
There was no point to this post, except maybe to save my first programs for my posterity. However, I hope you enjoyed looking at the code.