10 Print on the TI-92
By Michael Doornbos
- 2 minutes read - 227 wordsThe “famous” 10PRINT program on vintage computers was a delight for many in the 70s and 80s. It’s fun to port to other platforms and machines.
I’m always looking for calculators that can do it. It requires both a slash - ASCII character 47, and a backslash - ASCII character 92. Most calculators can print the forward slash, but the backslash is only sometimes implemented.
No one is surprised; calculators have limited space, and printing random patterns isn’t a primary function for standard use cases.
Other calculators
I went through my pile of calculators to look for candidates. A number of the newer ones have Python interpreters built in. If they implemented the char() function in Python, then you’re in luck.
Here’s a Numworks and TI-nspire doing a 10PRINT variant.
TI-92
The TI-92 has a query keyboard; look, there’s a backslash! Woot!
This calculator uses TI-BASIC, a dialect that started in the 80s and continues to the TI-84 today, although the newer TI-84 models have Python built-in.
ten()
Prgm
ClrIO
Lbl a
"" -> s
For i,0,39
int(rand(()*2))→n
If n=0 Then
s&"/"->s
Else
s&"\"->s
Endif
EndFor
Disp s
Goto a
EndPrgm
Results
Extra credit
Do you have a unique machine to try 10PRINT on? Let me know.
For example, this BASIC code should work on a TI-nspire since it also speaks TI-BASIC.
Happy hacking!