home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
club100
/
txt
/
cipher.ba
< prev
next >
Wrap
Text File
|
2006-10-19
|
2KB
|
44 lines
0 'Club 100 Library - 415/939-1246 BBS 937-5039 NEWSLETTER, 932-8856 VOICE
1 'CIPHER.MMM - Marvin M. Miller 75665,312 27-Aug-84
2 '
110 MAXFILES=2
115 INPUT" Master Codes xx,xx";H,I
130 CLS:PRINT" Will you be..."
140 PRINT" 1 - CODING"
150 INPUT" 2 - DECODING ";Z
170 IFZ<>1ANDZ<>2THEN130
180 PRINT" File to be ";
190 IFZ=2THENPRINT"de";
200 INPUT"coded";A$
210 INPUT" Name of new file";B$
220 IFLEN(B$)>6THENCLS:PRINT"New file name must be less then 6 characters":GOTO210
240 PRINT"TRANSLATION UNDERWAY -- Please wait"
250 OPENA$FORINPUTAS1
260 OPENB$FOROUTPUTAS2
265 N=8:IFZ=2GOTO306
270 PRINT@270,CHR$(27);"p";" WAIT":C$=INPUT$(1,1):D$=CHR$(ASC(C$)+N):IFASC(C$)<32THEN270
271 IFD$=CHR$(127)THEND$=CHR$(33):GOTO285
272 IFD$=CHR$(224)THEND$=CHR$(36)
273 IF ASC(D$)>243THENPRINT#2,CHR$(39);:D$=CHR$(ASC(D$)-200):GOTO285
274 IF ASC(D$)>194THENPRINT#2,CHR$(37);:D$=CHR$(ASC(D$)-150):GOTO285
275 IF ASC(D$)>144THENPRINT#2,CHR$(35);:D$=CHR$(ASC(D$)-73):GOTO285
280 IF ASC(D$)>126THENPRINT#2,CHR$(34);:D$=CHR$(ASC(D$)-30):GOTO285
285 PRINT#2,D$;:PRINT@270,CHR$(27);"q";" ":N=N+H:IFN=>ITHENN=8
300 IFEOF(1)THEN320
305 GOTO270
306 PRINT@270,CHR$(27);"p";" WAIT":E$=INPUT$(1,1)
307 IFE$=CHR$(39)THENE$=INPUT$(1,1):E$=CHR$(ASC(E$)+200):GOTO311
308 IFE$=CHR$(37)THENE$=INPUT$(1,1):E$=CHR$(ASC(E$)+150):GOTO311
309 IFE$=CHR$(35)THENE$=INPUT$(1,1):E$=CHR$(ASC(E$)+73):GOTO311
310 IFE$=CHR$(34)THENE$=INPUT$(1,1):E$=CHR$(ASC(E$)+30):GOTO311
311 IFE$=CHR$(33)THENE$=CHR$(127):GOTO313
312 IFE$=CHR$(36)THENE$=CHR$(224)
313 F$=CHR$(ASC(E$)-N):PRINT#2,F$;:N=N+H:PRINT@270,CHR$(27);"q";" ":IFN=>ITHENN=8
315 IFEOF(1)THEN320
316 GOTO306
320 PRINT" File converted"
330 FORT=1TO10:BEEP:NEXT
360 PRINT" To kill old file "A$",
370 PRINT" Type Kill"CHR$(34)A$".DO"CHR$(34)" AND <ENTER>
380 CLOSE:END