How to stop the power button from breaking the program in TI-BASIC
So, I made a TI-BASIC program that spoofs the calculator's home screen, but gives the wrong answer to mathematical equations. This is the code:
:ClrHome
:Lbl 1
:Input "",A
:Disp rand
:Goto 1
It works great and that's it, and it's fun to fool friends, but I would like to make it more sophisticated. For example:
1) How can I get around the automatic breaking of the program when pressing "ON" and
2) Are there any other ways to improve the home screen spoofing (for example, when someone clicks on an operation without a number in front of it, it automatically spoofs the variable " ANS ") and how can I write it in the program.
Thanks in advance.
source to share
Method 1:
(may or may not answer your question)
The following website shows how you can use SortA to keep the ON button:
http://tibasicdev.wikidot.com/bunny-virus
Using SortA on list of items 999 will keep the calculator busy for a while and prevent the "on" button from working. Website coding can be used for jokes, but don't use it for anything destructive like removing people's code.
Method 2:
(perhaps answering your question)
If you want to disable the ON button when the calculator actually does something, try putting the following program in your calculator and be sure to read the README file:
http://www.ticalc.org/archives/files/fileinfo/330/33039.html
source to share
There is no way to turn off the break. This prevents hobbyists from sending the calculator into an infinite loop.
As far as Ans is concerned, what I did (albeit not very realistic) was to store the input in str1
and then use
sub(str1,1,1) -> str1
if str2 = "+" or str2 = "/" or str2 = "*" or str2 = "-"
then
expr(str1)
Else
Disp "Cannot begin function with an operation"
end
expr()
can be found in the same area where you found strings.
After doing this, it is now treated as a number and not a string, so you can no longer use string commands.
I haven't used TIBASIC in a long time, so if expr(str1)
there is a syntax error or it doesn't show up, just store it in a variable and then use it Disp <variable>
to display the response.
Also I found that almost all TIBASIC functions can be found here .
source to share