8-Bit Software Online Conversion

Basic Program Protector - Listing

10REM BASIC program protector 20REM (C) 1996 Jon Ripley 30REM This program is NOT PD 40REM Please DO NOT ALTER this progra m 50DEFFNS="BasProt" 60MODE 7 70DEFPROCcentre(A$,Y):PRINTTAB((40-LE NA$)/2,Y)A$;:ENDPROC 80FORY=1TO2:PROCcentre(CHR$141+CHR$(1 28+Y)+"BASIC Program Protector ",Y):PRO Ccentre(CHR$141+CHR$(127+2*Y)+"(C) Jon R ipley 1996 ",22+Y):NEXT 90VDU28,0,21,39,4 100INPUT"Address of program:&"a$ 110A%=EVAL("&"+a$) 120REPEAT 130INPUT"(Un)Protect? (U/P):"a$ 140IFa$="U"ORa$="u"p$="un":P%=FALSE 150IFa$="P"ORa$="p"p$="":P%=TRUE 160UNTILINSTR("PpUu",a$) 170REPEAT 180X%=A%?1 190IF?A%=13ANDX%=&FFA%=-1 200IF?A%=13A%=A%+3 210IF?A%=&F4 AND(A%?1=91ORA%?1=21) A%? 1=-(21*P%)-(91*NOTP%) 220IF?A%=&F4 AND(A%?1=93ORA%?1=6) A%?1 =-(6*P%)-(93*NOTP%) 230A%=A%+1 240UNTILA%=0 250PRINT"Program ";p$;"protected." 260PAGE=EVAL("&"+a$) 270END