home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / txt / cipher.ba < prev    next >
Text File  |  2006-10-19  |  2KB  |  44 lines

  1. 0 'Club 100 Library - 415/939-1246 BBS     937-5039 NEWSLETTER, 932-8856 VOICE
  2. 1 'CIPHER.MMM  - Marvin M. Miller 75665,312  27-Aug-84
  3. 2 '
  4. 110 MAXFILES=2
  5. 115 INPUT" Master Codes xx,xx";H,I
  6. 130 CLS:PRINT" Will you be..."
  7. 140 PRINT"               1 - CODING"
  8. 150 INPUT"               2 - DECODING  ";Z
  9. 170 IFZ<>1ANDZ<>2THEN130
  10. 180 PRINT" File to be ";
  11. 190 IFZ=2THENPRINT"de";
  12. 200 INPUT"coded";A$
  13. 210 INPUT" Name of new file";B$
  14. 220 IFLEN(B$)>6THENCLS:PRINT"New file name must be less then 6 characters":GOTO210
  15. 240 PRINT"TRANSLATION UNDERWAY -- Please wait"
  16. 250 OPENA$FORINPUTAS1
  17. 260 OPENB$FOROUTPUTAS2
  18. 265 N=8:IFZ=2GOTO306
  19. 270 PRINT@270,CHR$(27);"p";" WAIT":C$=INPUT$(1,1):D$=CHR$(ASC(C$)+N):IFASC(C$)<32THEN270
  20. 271 IFD$=CHR$(127)THEND$=CHR$(33):GOTO285
  21. 272 IFD$=CHR$(224)THEND$=CHR$(36)
  22. 273 IF ASC(D$)>243THENPRINT#2,CHR$(39);:D$=CHR$(ASC(D$)-200):GOTO285
  23. 274 IF ASC(D$)>194THENPRINT#2,CHR$(37);:D$=CHR$(ASC(D$)-150):GOTO285
  24. 275 IF ASC(D$)>144THENPRINT#2,CHR$(35);:D$=CHR$(ASC(D$)-73):GOTO285
  25. 280 IF ASC(D$)>126THENPRINT#2,CHR$(34);:D$=CHR$(ASC(D$)-30):GOTO285
  26. 285 PRINT#2,D$;:PRINT@270,CHR$(27);"q";"     ":N=N+H:IFN=>ITHENN=8
  27. 300 IFEOF(1)THEN320
  28. 305 GOTO270
  29. 306 PRINT@270,CHR$(27);"p";" WAIT":E$=INPUT$(1,1)
  30. 307 IFE$=CHR$(39)THENE$=INPUT$(1,1):E$=CHR$(ASC(E$)+200):GOTO311
  31. 308 IFE$=CHR$(37)THENE$=INPUT$(1,1):E$=CHR$(ASC(E$)+150):GOTO311
  32. 309 IFE$=CHR$(35)THENE$=INPUT$(1,1):E$=CHR$(ASC(E$)+73):GOTO311
  33. 310 IFE$=CHR$(34)THENE$=INPUT$(1,1):E$=CHR$(ASC(E$)+30):GOTO311
  34. 311 IFE$=CHR$(33)THENE$=CHR$(127):GOTO313
  35. 312 IFE$=CHR$(36)THENE$=CHR$(224)
  36. 313 F$=CHR$(ASC(E$)-N):PRINT#2,F$;:N=N+H:PRINT@270,CHR$(27);"q";"     ":IFN=>ITHENN=8
  37. 315 IFEOF(1)THEN320
  38. 316 GOTO306
  39. 320 PRINT" File converted"
  40. 330 FORT=1TO10:BEEP:NEXT
  41. 360 PRINT" To kill old file "A$",
  42. 370 PRINT" Type  Kill"CHR$(34)A$".DO"CHR$(34)" AND <ENTER>
  43. 380 CLOSE:END
  44.