Difference between revisions of "TI-BASIC:Bunny Virus"

From Learn @ Cemetech
Jump to navigationJump to search
(Initial automated import)
 
(Automated @@ correction)
 
Line 1: Line 1:
 
{{Template:TI-BASIC:Routine
 
{{Template:TI-BASIC:Routine
|picture=@@
+
|picture=
 
|summary=Creates a virus-like effect which locks up the calculator.
 
|summary=Creates a virus-like effect which locks up the calculator.
 
|input=None
 
|input=None
Line 6: Line 6:
 
|variable=None
 
|variable=None
 
|compatibility=TI-83/84/+/SE
 
|compatibility=TI-83/84/+/SE
|author=@@
+
|author=
|authors=@@
+
|authors=
|url=@@
+
|url=
 
|download=[file bunny_virus.zip]
 
|download=[file bunny_virus.zip]
 
}}
 
}}

Latest revision as of 22:12, 24 February 2016


Routine Summary

Creates a virus-like effect which locks up the calculator.

Inputs

None

Outputs

None

Variables Used

None

Calculator Compatibility

TI-83/84/+/SE

Download

file bunny_virus.zip

> Disclaimer: We are not responsible for any damage that this routine causes to your calculator or anybody else's calculator. If you decide to try it out on somebody else's calculator, you should give them some warning ahead of time.

:999→dim(∟BUNNY
:While 1
:SortA(∟BUNNY
:End

While it isn't possible to create a true virus in TI-Basic, you can create a virus-like effect which locks up the calculator, and forces the user to have to remove the batteries to get out of the program. Removing the batteries causes the calculator to shut off, and when the calculator is turned back on, the RAM will be cleared. This is where the virus aspect comes from.

The idea behind the code is actually pretty simple. The calculator has a few commands (in particular, SortA( and SortD() which cannot be interrupted by the ON key while they are executing. If you give one of these commands a large list (in the case of SortA( and SortD( ), they will be very time-consuming, which gives the illusion that the calculator has stalled.

Because these commands will eventually finish executing given enough time, an infinite While loop is placed around them so that they will be repeated indefinitely until the person removes their batteries. In addition to these two commands, the Fill( and RandBin( commands also work on the older TI-83 and TI-82 calculators, although it doesn't work on the newer TI-83+ and higher calculators.