home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crawly Crypt Collection 2
/
crawlyvol2.bin
/
sound
/
psslib2
/
psskey.lst
< prev
next >
Wrap
File List
|
1994-05-08
|
2KB
|
67 lines
' ************************************************************************
' ** *
' ** PSSKEY - Unlocks the Save feature for PSSLIB patch editor *
' ** and registers the program. *
' ************************************************************************
'
DIM b$(10) !storage to get code
path$=DIR$(0) !path is the current directory
count=1 !initialize count sequence (4 times max)
entercode: !Display message, get key code
CLS
PRINT "Use this program to allow Saving your patches to disk."
PRINT ""
INPUT "Enter the key code: ";code$
o=1
p=1 ! initialize pointers
n=89421 ! set offset to embedded keycode in app
IF code$="exit" THEN ! exit program if user types exit
CLOSE #1
END
ENDIF
OPEN "i",#1,path$+"\psslib.prg" ! open PSSLIB
FOR i=1 TO 10 ! get keycode 1 char at a time
SEEK #1,n
x=INP(#1)
b$(o)=CHR$(x)
INC n
INC o
NEXT i
PRINT
filecode$=b$(1)+b$(2)+b$(3)+b$(4)+b$(5)+b$(6)+b$(7)+b$(8)+b$(9)+b$(10)
IF filecode$=code$
n=89212 ! set offset to where keycode is to be written
CLOSE #1
OPEN "a",#1,path$+"\psslib.prg" ! reopen PSSLIB
g=LOF(#1) ! point to end-of-file
offset=g-n ! get offset relative to EOF
RELSEEK #1,-(offset) ! point to new offset
FOR i=1 TO 10
OUT #1,ASC(b$(i)) ! write the correct keycode to register program
NEXT i
ELSE
IF count=4
PRINT "Sorry, you must become registered! Please pay $7.00 to:"
PRINT ""
PRINT " Mike Silverstein"
PRINT " 555 Rosewood Ave. #306"
PRINT " Camarillo, CA 93010"
PRINT
PRINT "If you would like the GFA Source Code, send a self-addressed stamped"
PRINT "envelope with a blank disk to the above address."
PRINT
PRINT "You may also become registered by offering a $10 Gift of Time to"
PRINT "M.SILVERSTE3 on GEnie"
PRINT
PRINT "Press Esc to return to desktop"
DO
LOOP UNTIL INKEY$=CHR$(27)
END
ENDIF
CLOSE #1
INC count
GOTO entercode
ENDIF
CLOSE #1
END