Introduction

Many has been the time when you have left a program on the '80 to do complex tasks, such as a 724 day program to prove the four-colour map theorem, only to find that on the 723rd day someone has come along, pressed BREAK and typed

10 PRINT "HELLO"; 20 GOTO 10

or changed line 10360 from GOTO 560 to GOTO 560700 or something equally infuriating. Apart from looking for the correct neck to twist, did you not also wish that there was a way of stopping people from BREAKing, LISTing, EDITing or NEWing (or in some cases, CSAVEing) your programs. Well, this program is able to cut out access to the computer to the point where, short of rebooting DOS or restarting at the MEMORY SIZE? question, i.e. turning the computer off, it is impossible for any user to modify the program in memory. The comments should make operation of the program clear, but I will give two common examples. Suppose your friends insist on copying all your programs. Simply load the disable routine, add 186,-173 to line 3 and RUN. Everything will work normally except CSAVE and SAVE which wil 1 be disabled, along with BREAK. Or the computer is on display and you don't want anybody to look at the program. Load the program and extend line 3 with 185,167,174,-142 then change the data item 32 to 40. After RUNning, everything will be disabled except CLOAD,LOAD,SYSTEM and RUN. To find the keywords, run this program:-

10 X=128 s FOR I=5712T06176 s PR INTCHR$(PEEK(I)AND 127) 5 ; IFPEEK(I +1) >127THENPRINTX,s X = X + 1 20 NEXT

1 'LIST DISABLE (C) 1980 BY BRENTON HOFF

2 CLEAR:P=PEEK(16548)+PEEK(16549)S256:F0RI=PT0P+99:READJ:POKEI,A BS(J):IFJ >=0THENNEXTELSEK=I+1:L=I—P—34:I=P+35:POKEP+17,IAND255:P0 KEP+18,I/256:P0KEP+20,LAND255:POKEP+21,L/256:F0RI=0T02:P0KEP+32+I ,PEEK(16818+1):NE XT;POKE16396,241:POKE16397,201

3 POKE16819,PAND255:POKE16820,P/256:POKE16818,195:POKEK,O:K=K+1 : POKEK,O:POKEK+1,Os POKE16548,KAND255:P0KE16549,K/256*

4 DATA56,24,245,229,213,229,209,19,26,183,40,17,254,128,56,247,3 3,0,0,1,0,0,237,177,32,237,195,204,6,209,225,241,201,O,O

TYPE IN THE DECIMAL VALUES OF THE KEYWORDS YOU WANT TO ENABLE/DISABLE, WITH LAST ELEMENT NEGATIVE. THEN EITHER 1. SIMPLY RUN IF YOU WANT ONLY THE KEYWORDS JUST TYPED IN DISABLED, OR

6 '2. CHANGE THE DATA ITEM 32 TO 40 (JR NZ, TO JR Z,)

Was this article helpful?

0 0

Post a comment