start tok64 d64-hJHbek 0 POKE53280,.:POKE53281,. 1 REM (c) mr.p. /softwolves software 2 REM august 5th,1991 10 REM alphabet to be used: 20 al$=" abcdefghijklmnopqrstuvwxyz0123456789+-*/=.!$%&[{pound}]?" 100 PRINT"{clear}{green}{down}{right}the word (de)coder 110 PRINT"{down}{right}{down}{156}(1) code one sentence 120 PRINT"{down*2}{right}{156}(2) decode one sentence 130 PRINT"{down*3}{yellow}made on august 5th, 1991 by mr.p. for 140 PRINT"softwolves software public domain/sys pd 150 PRINT"{down}{cyan}enter your choice : ";:OPEN1,0:INPUT#1,a$:CLOSE1 160 IFa$<>"1"ANDa$<>"2"THEN100 170 cc$="":dd$="de":IFa$="2"THENcc$="de":dd$="" 200 PRINT"{clear}{green}{down}{right}the word "cc$"coder 205 PRINT"{down}{right}{white}nb! {yellow}if your text or code word is 206 PRINT"{space*4}starting with a space, please enter 207 PRINT"{space*4}a {white}^{yellow} (up arrow) in its place! 210 PRINT"{yellow}{down}please enter the "dd$"coded sentence: 220 OPEN1,0:INPUT#1,cs$:CLOSE1 225 IFLEFT$(cs$,1)="^"THENcs$=" "+MID$(cs$,2) 230 PRINT:PRINT"{yellow}{down}please enter the code word 240 OPEN1,0:INPUT#1,cw$:CLOSE1 243 IFLEFT$(cw$,1)="^"THENcs$=" "+MID$(cw$,2) 244 ww$=cw$ 245 IFLEN(cw$)"y"ANDws$<>"n"THEN260 300 IFcc$="de"THEN1000 400 PRINT"{clear}{down}{right}{white}the uncoded sentence 410 PRINT"{yellow}{right}the code word 420 PRINT"{cyan}{right}the coded sentence 430 PRINT"{home}{down*5}{white}"cs$ 440 PRINT"{home}{down*7}{yellow}"cw$ 450 FORi=1TOLEN(cs$) 460 :l$=MID$(cs$,i,1):uc$=l$ 470 :GOSUB9000 480 :uc=l:l$=MID$(cw$,i,1) 490 :GOSUB9000 500 :IFuc=-1THENPRINT"illegal char in uncoded sentence:"uc$:GOTO2000 510 :IFl=-1THENPRINT"illegal char in code word:"l$:GOTO2000 520 :IFws$<>"y"THEN580 530 :PRINT"{cyan}{home}{down*9}"TAB(i-1)uc$ 540 :FORt=1TOl 550 ::uc=uc+1:IFuc>LEN(al$)THENuc=1 560 ::PRINT"{home}{down*9}"TAB(i-1)MID$(al$,uc,1) 570 :NEXT:GOTO610 580 :uc=uc+l 590 :IFuc>LEN(al$)THENuc=uc-LEN(al$):GOTO590 600 :PRINT"{cyan}{home}{down*9}"TAB(i-1)MID$(al$,uc,1) 610 NEXT 620 GOTO2000 1000 PRINT"{clear}{down}{right}{white}the coded sentence 1010 PRINT"{yellow}{right}the code word 1020 PRINT"{cyan}{right}the uncoded sentence 1030 PRINT"{home}{down*5}{white}"cs$ 1040 PRINT"{home}{down*7}{yellow}"cw$ 1050 FORi=1TOLEN(cs$) 1060 :l$=MID$(cs$,i,1):uc$=l$ 1070 :GOSUB9000 1080 :uc=l:l$=MID$(cw$,i,1) 1090 :GOSUB9000 1100 :IFuc=-1THENPRINT"illegal char in coded sentence:"uc$:GOTO2000 1110 :IFl=-1THENPRINT"illegal char in code word:"l$:GOTO2000 1120 :IFws$<>"y"THEN1180 1130 :PRINT"{cyan}{home}{down*9}"TAB(i-1)uc$ 1140 :FORt=1TOl 1150 ::uc=uc-1:IFuc<1THENuc=LEN(al$) 1160 ::PRINT"{home}{down*9}"TAB(i-1)MID$(al$,uc,1) 1170 :NEXT:GOTO1210 1180 :uc=uc-l 1190 :IFuc<1THENuc=uc+LEN(al$):GOTO1190 1200 :PRINT"{cyan}{home}{down*9}"TAB(i-1)MID$(al$,uc,1) 1210 NEXT 2000 PRINT"{home}{down*22}{light blue}press a key to continue{home} 2010 POKE198,.:WAIT198,1:POKE198,.:RUN 8999 STOP 9000 FORl=1TOLEN(al$) 9010 :IFMID$(al$,l,1)=l$THENRETURN 9020 NEXT:l=-1:RETURN stop tok64 (bastext 1.0)