This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. 68k Calculator Basic => TI-BASIC
Author Message
IAmACalculator
In a state of quasi-hiatus


Know-It-All


Joined: 21 Oct 2005
Posts: 1571

Posted: 30 May 2006 06:20:43 pm    Post subject:

I have discovered a way to disable On-breaking in 68k basic, without using the [font="courier new"]Exec function. I don't think this has been done before, but let me know if it has. It's probably only useful for password protection and the such. Anyway, here's a simple virus written with this method:
Code:
v()
Prgm
Local X
Loop
Try
Input "",x
Else
EndTry
Endloop
Endprgm
You have to use [font="courier new"]Input or a similar command, surrounded by a [font="courier new"]Try...EndTry block. However, this can be bypassed by hitting Enter and On rapidly.

I also made a password protection program this way:
Code:
pass()
Prgm
Local p
0->p
While p≠"ABC"
ClrIO
Try
InputStr "Password:",p
Else
EndTry
EndWhile
ClrIO
DispHome
EndPrgm
Comments? Suggestions? Ideas for implementation?
Back to top
SilverCalcKnight
|_


Active Member


Joined: 15 Nov 2005
Posts: 577

Posted: 30 May 2006 06:40:40 pm    Post subject:

That's s-w00t. Only works for text adventures and passprotectors, but error handling is very powerful--in the right hands.

Well done, IAmACalculator.

-=SilverCalcKnight=-
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 30 May 2006 06:50:20 pm    Post subject:

I read something on this a while back (before I even came to UTI), but when I tried to find it recently I couldn't, and my attempts to get it to work failed. Presumably because it only works during input. Good job getting it to work, this could be quite useful.
Back to top
IAmACalculator
In a state of quasi-hiatus


Know-It-All


Joined: 21 Oct 2005
Posts: 1571

Posted: 30 May 2006 07:06:00 pm    Post subject:

I've also noticed that the more code you put inside the infinite loop (the one that checks for input), the easier it is to break, as it has more code to evaluate until it gets to the protected [font="Courier New"]Input. It also works with dialogs, but not quite as well.
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 30 May 2006 09:31:09 pm    Post subject:

even in z80 basic


Code:
While 1
End


wont necessarily respond to [on] right away
Back to top
IAmACalculator
In a state of quasi-hiatus


Know-It-All


Joined: 21 Oct 2005
Posts: 1571

Posted: 31 May 2006 06:29:45 am    Post subject:

Well, yes, but how useful is that?
Back to top
chipmaster


Active Member


Joined: 21 Sep 2005
Posts: 601

Posted: 31 May 2006 08:18:45 am    Post subject:

IAmACalculator wrote:
Well, yes, but how useful is that?
[post="81305"]<{POST_SNAPBACK}>[/post]

It shows that you can limit how well the On break feature works. This was exploited in the infamous bunny virus, in which a BASIC program was able to go into an infinite while loop that wasn't impossible to Break, but would require you to hold down ON for a few minutes.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement