home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
commodore-users-of-norman
/
CUON_18_(11-1984).d64
/
crypto
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
3KB
|
82 lines
5 DIMK$(26)
10 POKE53281,0:POKE53280,0:PRINT"[147]"
11 GOTO40000
20 R=INT(RND(-TI)*10)+1:IFR=1THEN22
21 FORI=1TOR-1:FORJ=1TO4:READS$:NEXT:NEXT
22 FORI=1TO4:READS$(I):NEXT:GOSUB500
25 PRINT"[147]":FORI=1TO4:PRINTTAB(10);S2$(I):PRINT:PRINT:NEXT
30 D$=" "
35 D$=D$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]"
36 X$=",":X2$=",":GOSUB600:X$="'":X2$="'":GOSUB600:X$=".":X2$=".":GOSUB600
40 PRINTD$;"SUBSTITUTE FOR WHICH LETTER >";
50 GETX$:IFX$=""THEN50
55 IFX$="[137]"THEN40000
56 IFX$="[136]"THEN700
60 IFX$<"A"ORX$>"Z"THEN50
65 PRINTX$;
70 PRINTD$;"CHANGE THE LETTER ";X$;" TO A >";
75 GETX2$:IFX2$=""THEN75
76 IFX2$="[137]"THEN40000
77 IFX2$="[136]"THEN700
85 PRINTX2$;
90 GOSUB600
99 GOTO40
499 END
500 REM ENCODE THE SENTENCE S$(I)
501 PRINT"[147] GETTING A CRYPTO..."
510 FORI=1TO26:K$(I)=CHR$(64+I):NEXT
520 FORI=1TO200:R=INT(RND(1)*26)+1:T$=K$(R):K$(R)=K$(26):K$(26)=T$:NEXT
530 FORI=1TO25:IFK$(I)=CHR$(64+I)THENT$=K$(I):K$(I)=K$(I+1):K$(I+1)=T$
540 NEXT
550 IFK$(26)="Z"THENK$(26)=K$(1):K$(1)="Z"
560 FORI=1TO4:S2$(I)="":FORJ=1TOLEN(S$(I)):T$=MID$(S$(I),J,1)
565 IFT$>="A"ANDT$<="Z"THENS2$(I)=S2$(I)+K$(ASC(T$)-64):GOTO570
567 S2$(I)=S2$(I)+T$
570 NEXT:NEXT
599 RETURN
600 REM SHOW X2$ FOR EVERY X$ IN S2$(I)
610 PRINT"":FORI=1TO4:PRINTTAB(10);:FORJ=1TOLEN(S2$(I))
620 T$=MID$(S2$(I),J,1)
630 IFT$=X$THENPRINTX2$;:GOTO640
635 PRINT"";
640 NEXT
650 PRINT:PRINT:PRINT:NEXT
699 RETURN
700 REM SHOW SOLUTION
710 PRINT"":FORI=1TO4:PRINTTAB(10);S$(I):PRINT:PRINT:NEXT
720 PRINTD$;"PRESS ANY KEY TO CONTINUE."
730 GETX$:IFX$=""THEN730
740 GOTO40000
1000 DATA"THE ONLY THING THAT MIGHT","BE WORSE THAN FINDING A"
1001 DATA"FLY IN YOUR SOUP WOULD","BE NOT FINDING IT."
1010 DATA"TRAVEL CAN CERTAINLY BE","BROADENING...ESPECIALLY"
1011 DATA"TRIPS TO BAKERIES, DELIS","AND PIZZA PARLORS."
1020 DATA"HAIRBRUSH MADE FROM REAL","BOAR BRISTLE TREATS LOCKS"
1021 DATA"MORE KINDLY THAN ONE HAVING","SHARP NYLON TUFTS."
1030 DATA"CATACLYSMIC EARTHQUAKE ACTION"
1031 DATA"PRODUCED YAWNING CHASMS,"
1032 DATA"DARK CANYONS THROUGHOUT"
1033 DATA"OUR SOUTHWEST DESERT."
1040 DATA"HE WHO DOES NOT WORK HARD"
1041 DATA"IN HIS YOUTH"
1042 DATA"WILL BE SORRY"
1043 DATA"IN HIS OLD AGE."
1050 DATA"A MOMENTS MISTAKE","MAY BECOME A","THOUSAND YEARS","OF REGRET."
1060 DATA"WHAT A PERSON NEEDS IN","ORDER TO SUCCEED","IS SOMEONE WHO EXPECTS"
1061 DATA"HIM TO DO SO."
1070 DATA"WE STILL CAN'T UNDERSTAND","HOW RUMORS WITHOUT","A LEG TO STAND ON"
1071 DATA"CAN GET AROUND SO FAST."
1080 DATA"I FIND THAT FLOWERS CAN","WHISPER ALL THAT WORDS","CAN'T SAY."," "
1090 DATA"IT CAN DO A PERSON NO GOOD","TO SIT UP AND TAKE","NOTICE IF HE KEEPS"
1091 DATA"RIGHT ON SITTING."
40000 PRINT"[147]";TAB(17);"CRYPTO[146]"
40010 PRINT"";TAB(9);"1) TRY A CRYPTO"
40020 PRINT:PRINTTAB(9);"2) RETURN TO MAIN MENU"
40030 GETX$:IFX$=""THEN40030
40040 IFX$="1"THEN20
40050 IFX$<>"2"THEN40030
40060 PRINT"[147] RETURNING TO THE MAIN MENU...[144]"
40070 PRINT"LOAD"CHR$(34)"0:MENU"CHR$(34)",8"
40080 PRINT"RUN":PRINT"[145][145][145][145][145][145][145][145][145]"
40090 POKE631,13:POKE632,13:POKE198,2