5

I've been looking to make a program in TIBASIC that can evaluate what kind of calculator the code is running from, no assembly. Since I don't think there's anything that would get information from the about screen. Here's one piece of code I came up with:

:ClrDraw
:Text(0,0,0
:PxlTest(6,1

This will have different outputs based on which calculator it was run on. Are there any other tricks of a similar nature, or is there a better way of doing this?

Julian Lachniet
  • 223
  • 4
  • 25
  • Very interesting problem! I'm not getting any output from the code you gave--just goes back to the home screen. Is that what you are expecting? (TI-84 Plus C Silver Edition) You also might be interested in https://en.wikipedia.org/wiki/Comparison_of_Texas_Instruments_graphing_calculators – Fred Barclay Aug 07 '16 at 02:33
  • 1
    If you want it to display the output, you have to add Disp to the 3rd line. `Disp PxlTest(6,1` – Julian Lachniet Aug 07 '16 at 17:15

2 Answers2

5

Here's a simple and fast way to tell the difference between a TI-84 and TI-84 CE. The other answer seems to be focusing on distinguishing between SE and non-SE. Since you approved it (and asked this a year ago), I don't know if this is useful to you, but here you go.

: 0→Xmin
: 1→ΔX
: If Xmax=264
: Disp "TI-84 CE

Because the CE screens are wider, the auto-generated max is set to a higher value (264) than a normal TI-84 would be. You can also set the window vars used to something else and restore them afterwards to keep the graph screen unaffected.

tryashtar
  • 278
  • 3
  • 13
  • Hey, that's a great answer. I don't have a CE but I know the resolution is higher so this definitely makes sense. – Timtech Feb 16 '17 at 20:01
3

Great question! The only thing I could think of off the top of my head is the processor speed difference (or RAM/ROM difference, but I couldn't think of a way to test that without assembly). Unfortunately, the TI-83 doesn't have a built-in clock, but some code like this should be able to tell the difference between a TI-84 and a TI-84 SE:

:startTmr→T
:For(I,1,99
:e^9
:End
:sub("TI-84+ SE",1,6+3(19>T
Timtech
  • 1,224
  • 2
  • 19
  • 30