20 PRINT:PRINT:COLOR 14,0:PRINT SPC(21);">>> This is SKIP10.EXE <<<";SPC(26);:COLOR 0,7:PRINT
30 LOCATE 25,3:PRINT" More info: hit M";SPC(13);:COLOR 31,4:PRINT" * * * ";:COLOR 0,7:PRINT SPC(19);"By Penn Leary ":LOCATE 2,1:COLOR 14,1
40 PRINT:PRINT:PRINT SPC(5);"This program will print Bacon's +4 Caesar plaintext for the ciphertext."
50 PRINT" Nomenclature: The Ciphertext is the problem to be attacked, usually the"
60 PRINT" letters/words in a facsimile edition of Shakespeare's poems or plays. The"
70 PRINT" Plaintext is the readout of the possible solution of the ciphertext."
80 PRINT:PRINT SPC(5);"A 21 letter Elizabethan alphabet is used (see below); therefore"
90 PRINT" characters X, Z, space and all others will be rejected; the letter I will"
100 PRINT" be substituted for J, and the letter V for U and W. Enter them in either"
110 PRINT" upper or lower case. Ciphertext letters may be selected to be skipped"
120 PRINT" from 2 to 10. These may be repeated or reversed.":PRINT
130 COLOR 11,1:PRINT SPC(5);"Bacon's alphabet is A B C D E F G H I K L M N O P Q R S T V Y"
140 PRINT SPC(5);"The +4 ciphertext is E F G H I K L M N O P Q R S T V Y A B C D":COLOR 14,1:PRINT
150 PRINT SPC(5);"The ciphertext may have no more than 1000 characters. If you exceed"
160 PRINT" that, the program will terminate and begin the readout. You may also make"
170 PRINT" or read a disk file. Backspace will erase; end entry by pressing Enter."
180 PRINT" Only the compiled .EXE program will read or write more than 255 letters."
190 PRINT" If you enter more than 252 letters, a diskfile called MYFILE will be created."
200 PRINT:COLOR 14,1:LOCATE,,1
210 COLOR 14,0:PRINT SPC(22);">>> To begin, hit a key <<<";SPC(25);:COLOR 14,1:W$=INPUT$(1):CLS
220 IF W$="M" OR W$="m" THEN GOSUB 2360
230 DIM M(1024),T(255)
240 DEFINT A-I,K-L,O-Z
250 M(J%)=0:N=0
260 CLOSE:PRINT
270 COLOR 27,1:PRINT" . . . . . . . . . ";:COLOR 10,4:PRINT"To read a disk file, enter";:COLOR 30,0:PRINT" D:":COLOR 14,1:PRINT
280 COLOR 10,4:PRINT"Or, to enter letters WITH OPTION TO MAKE A DISK FILE, hit";:COLOR 30,0:LINE INPUT" Return:";Z$:COLOR 14,1
290 IF Z$="D" OR Z$="d" THEN PRINT:GOTO 2170
300 CLS:COLOR 11,1:PRINT"Number of letters entered are:":COLOR 14,1
310 LOCATE 2,1:COLOR 11,1:PRINT"Enter ciphertext:";SPC(32);"(Hit Escape to abort)":COLOR 14,1
320 LOCATE 3,1:PRINT CHR$(26):LOCATE 3,2
330 FOR J%=1 TO 1000
340 X$=INKEY$:IF X$="" THEN 340
350 IF ASC(X$)=8 AND N<>0 AND POS(X)=1 THEN LOCATE CSRLIN-1:LOCATE,80:PRINT" ";:LOCATE CSRLIN-1:LOCATE,80:N=N-1:J%=J%-1:GOTO 340
360 IF ASC(X$)=8 AND N<>0 THEN H=POS(1):LOCATE CSRLIN,H-1:PRINT" ";:LOCATE CSRLIN,H-1:N=N-1:J%=J%-1:GOTO 340
370 BB=INT(J%/80)
380 COLOR 15,4:LOCATE 1,31:PRINT J%:LOCATE BB+3,J%-(BB*80)+1:COLOR 14,1
390 IF ASC(X$)=27 THEN CLS:PRINT:GOTO 1780
400 IF ASC(X$)=13 THEN COLOR 14,1:GOTO 520
410 IF ASC(X$)<65 THEN BEEP:GOTO 340
420 IF ASC(X$)>90 AND ASC(X$)<97 THEN BEEP:GOTO 340
430 IF ASC(X$)>96 AND ASC(X$)<123 THEN X$=CHR$(ASC(X$)-32)
440 IF ASC(X$)>122 THEN BEEP:GOTO 340
450 IF ASC(X$)=90 OR ASC(X$)=88 THEN BEEP:GOTO 340
460 IF ASC(X$)=74 THEN X$="I":GOTO 490
470 IF ASC(X$)=85 THEN X$="V":GOTO 490
480 IF ASC(X$)=87 THEN X$="V"
490 PRINT X$;:M(J%)=ASC(X$):N=N+1
500 IF J%=1000 THEN BEEP:PRINT:INPUT"Limit of 1000 characters has been reached -- hit RETURN.";W$:IF W$="" THEN PRINT:PRINT:GOTO 510
510 NEXT J%
520 J%=0:M(J%)=0:E$="":Y$=""
530 IF N > 252 THEN Y$="M":R$="MYFILE":PRINT
540 IF N < 253 THEN COLOR 14,0:PRINT:PRINT:PRINT"To make a disk file enter M ":PRINT
550 IF N < 253 THEN INPUT"Otherwise hit return ";Y$:COLOR 14,1:PRINT
560 IF Y$="M" OR Y$="m" THEN GOTO 580 ELSE GOTO 640
570 IF N < 253 THEN GOTO 640
580 IF N < 253 THEN COLOR 11,1:CLS:PRINT:PRINT"Files on disk are (Limit for compiled program--about 8000 characters):"
590 IF N < 253 THEN FILES"????????"
600 IF N < 253 THEN PRINT SPC(13);"Enter a name for the new disk file"
610 IF N < 253 THEN PRINT SPC(12);"(maximum of 8 letters, no extension)":PRINT
620 IF N < 253 THEN INPUT"CAUTION: If the name you enter exists, it will be ERASED and written over ";R$:COLOR 14,1:CLS:PRINT
630 IF N < 253 AND R$="" THEN PRINT:PRINT"You must enter a name.":GOTO 540
640 IF N < 253 THEN COLOR 10,4:PRINT"To reverse ciphertext hit";:COLOR 30,0:PRINT" D ";:COLOR 10,4:PRINT"otherwise hit a key for each series.":COLOR 14,1:V$=INPUT$(1):CLS:PRINT
650 IF V$="D" OR V$="d" THEN GOSUB 1980:COLOR 14,1
660 IF Y$="M" OR Y$="m" THEN COLOR 14,1:CLS:PRINT "Diskfile ";R$;" has been created.";:COLOR 10,1
670 LOCATE 25,29:COLOR 9,0:PRINT " Hit X to exit":COLOR 14,1:CLS 2:COLOR 14,1:LOCATE 2,1
680 IF V$="D" OR V$="d" THEN LOCATE 25,17:COLOR 9,0:PRINT " Hit X to exit, ciphertext is reversed.":COLOR 14,1:CLS 2:COLOR 14,1:LOCATE 2,1
690 IF N < 253 AND V$="D" OR V$="d" THEN COLOR 11,1:PRINT "Ciphertext reversed is:":COLOR 14,1:ELSE IF N<253 THEN COLOR 11,1:PRINT"Ciphertext is:":COLOR 14,1
700 FOR J%=1 TO N:IF N < 253 THEN PRINT CHR$(M(J%));" ";
710 E$=E$+CHR$(M(J%))
720 NEXT J%
730 COLOR 14,6:IF N > 1 AND N < 253 THEN PRINT N;"Letters entered.":COLOR 14,1
740 IF N > 252 THEN GOSUB 2130:COLOR 14,1:PRINT "Diskfile ";R$;" has been created":COLOR 14,1:GOTO 2230
750 IF Y$="M" OR Y$="m" THEN GOSUB 2130:GOTO 760
760 COLOR 14,1
770 K=0:IF LEN(E$) > 320 THEN COLOR 14,6:PRINT"To set lower printout speed enter a number from 1 to 20, otherwise hit return. ":INPUT K:COLOR 14,1
780 COLOR 11,1:PRINT"Plaintext, +4 is:":COLOR 14,1
790 B$="ABCDEFGHIKLMNOPQRSTVY"
800 C$="EFGHIKLMNOPQRSTVYABCD"
810 FOR Q=1 TO LEN(E$):FOR JJ=1 TO (K*20):NEXT JJ
820 X=INSTR(B$,MID$(E$,Q,1))
830 IF X>0 THEN MID$(E$,Q,1)=MID$(C$,X,1)
840 T$=E$:GOSUB 3230
850 PRINT" ";
860 NEXT Q
870 COLOR 0,7
880 PRINT:PRINT "To read from 2 to 10 skips, enter C, or hit a key.":S$=INPUT$(1)
890 IF S$="C" OR S$="c" THEN BB=1:GOTO 900 ELSE IF S$="X" OR S$="x" THEN GOTO 1780 ELSE GOTO 910
900 BB=BB+1:GOTO 970
910 LOCATE CSRLIN-1:PRINT SPC(80);:LOCATE CSRLIN
920 IF BB>1 THEN COLOR 14,6:PRINT "Last skip is ";AA$;
930 COLOR 15,0
940 INPUT " Enter a number from 2 to 10 to select skip or 1 to exit";BB:COLOR 14,1
950 IF BB=1 THEN GOTO 1780
960 IF BB <2 OR BB >10 THEN BEEP:PRINT"Error...";:GOTO 920
1090 FOR Q=1 TO LEN(E$) STEP BB:FOR JJ=1 TO (K*20):NEXT JJ
1100 T=ASC(MID$(E$,Q,1)):GOSUB 3220
1110 NEXT Q
1120 PRINT
1130 COLOR 11,1
1140 COLOR 11,1:W$=INPUT$(1):GOSUB 3240
1150 COLOR 7,1:PRINT AA$;" (2):":COLOR 14,1
1160 COLOR 14,1
1170 FOR Q=2 TO LEN(E$) STEP BB:FOR JJ=1 TO (K*20):NEXT JJ
1180 T=ASC(MID$(E$,Q,1)):GOSUB 3220
1190 NEXT Q
1200 PRINT
1210 COLOR 11,1:W$=INPUT$(1):GOSUB 3240:IF BB=2 THEN PRINT:GOTO 1760
1220 COLOR 7,1:PRINT AA$;" (3):":COLOR 14,1
1230 COLOR 14,1
1240 FOR Q=3 TO LEN(E$) STEP BB:FOR JJ=1 TO (K*20):NEXT JJ
1250 T=ASC(MID$(E$,Q,1)):GOSUB 3220
1260 NEXT Q
1270 PRINT
1280 COLOR 11,1:W$=INPUT$(1):GOSUB 3240:IF BB=3 THEN PRINT:GOTO 1760
1290 COLOR 7,1:PRINT AA$;" (4):":COLOR 14,1
1300 COLOR 14,1
1310 FOR Q=4 TO LEN(E$) STEP BB:FOR JJ=1 TO (K*20):NEXT JJ
1320 T=ASC(MID$(E$,Q,1)):GOSUB 3220
1330 NEXT Q
1340 PRINT:COLOR 11,1:W$=INPUT$(1):GOSUB 3240:IF BB=4 THEN PRINT:GOTO 1760
1350 COLOR 7,1:PRINT AA$;" (5):":COLOR 14,1
1360 COLOR 14,1
1370 FOR Q=5 TO LEN(E$) STEP BB:FOR JJ=1 TO (K*20):NEXT JJ
1380 T=ASC(MID$(E$,Q,1)):GOSUB 3220
1390 NEXT Q
1400 PRINT:COLOR 11,1:W$=INPUT$(1):GOSUB 3240:IF BB=5 THEN PRINT:GOTO 1760
1410 COLOR 7,1:PRINT AA$;" (6):":COLOR 14,1
1420 COLOR 14,1
1430 FOR Q=6 TO LEN(E$) STEP BB:FOR JJ=1 TO (K*20):NEXT JJ
1440 T=ASC(MID$(E$,Q,1)):GOSUB 3220
1450 NEXT Q
1460 PRINT
1470 COLOR 11,1
1480 COLOR 11,1:W$=INPUT$(1):GOSUB 3240:IF BB=6 THEN PRINT:GOTO 1760
1490 COLOR 7,1:PRINT AA$;" (7):":COLOR 14,1
1500 COLOR 14,1
1510 FOR Q=7 TO LEN(E$) STEP BB:FOR JJ=1 TO (K*20):NEXT JJ
1520 T=ASC(MID$(E$,Q,1)):GOSUB 3220
1530 NEXT Q
1540 PRINT
1550 COLOR 11,1:W$=INPUT$(1):GOSUB 3240:IF BB=7 THEN PRINT:GOTO 1760
1560 COLOR 7,1:PRINT AA$;" (8):":COLOR 14,1
1570 COLOR 14,1
1580 FOR Q=8 TO LEN(E$) STEP BB:FOR JJ=1 TO (K*20):NEXT JJ
1590 T=ASC(MID$(E$,Q,1)):GOSUB 3220
1600 NEXT Q
1610 PRINT
1620 COLOR 11,1:W$=INPUT$(1):GOSUB 3240:IF BB=8 THEN PRINT:GOTO 1760
1630 COLOR 7,1:PRINT AA$;" (9):":COLOR 14,1
1640 COLOR 14,1
1650 FOR Q=9 TO LEN(E$) STEP BB:FOR JJ=1 TO (K*20):NEXT JJ
1660 T=ASC(MID$(E$,Q,1)):GOSUB 3220
1670 NEXT Q
1680 PRINT:COLOR 11,1:W$=INPUT$(1):GOSUB 3240:IF BB=9 THEN PRINT:GOTO 1760
1690 COLOR 7,1:PRINT AA$;" (10):":COLOR 14,1
1700 COLOR 14,1
1710 FOR Q=10 TO LEN(E$) STEP BB:FOR JJ=1 TO (K*20):NEXT JJ
1720 T=ASC(MID$(E$,Q,1)):GOSUB 3220
1730 NEXT Q
1740 IF V$="D" OR V$="d" OR P$="D" OR P$="d" THEN COLOR 11,1:PRINT"(Ciphertext was reversed.)"
1750 W$=INPUT$(1):PRINT
1760 IF BB=10 THEN GOTO 1780 ELSE IF S$="C" OR S$="c" THEN GOTO 900
1770 W$="":IF Z$="d" THEN Z$="D":IF V$="d" THEN V$="D":IF P$="d" THEN P$="D":IF Y$="m" THEN Y$="M"
1780 Y$="":COLOR 14,0:PRINT:PRINT "If you made (or read) a diskfile and wish to read it again, hit R."
1790 IF Z$="D" OR Z$="d" THEN GOTO 1800 ELSE COLOR 14,0:PRINT" To run letters entered again, reverse or make diskfile, hit A."
1800 INPUT" To quit enter X, or to start over enter S.";W$
1810 IF W$<>"R" AND W$<>"r" AND W$<>"A" AND W$<>"a" AND W$<>"S" AND W$<>"s" AND W$<>"X" AND W$<>"x" OR W$="" THEN PRINT:GOTO 1780
1820 IF W$="S" OR W$="s" THEN BEEP:PRINT"Are you sure?...............Enter N to stop ":QQ$=INPUT$(1):IF QQ$="N" OR QQ$="n" THEN COLOR 14,1:CLS:PRINT:GOTO 1780 ELSE COLOR 14,1:CLS:RUN 230
1830 IF W$="X" OR W$="x" THEN COLOR 14,1:GOSUB 1880:COLOR 14,1:CLS:PRINT:GOSUB 2090:GOSUB 1890:GOSUB 1910:PRINT:COLOR 14,6:PRINT"SKIP10.EXE terminated.":COLOR 14,1:END
1840 IF W$="A" OR W$="a" AND N < 253 THEN P$="":CLOSE:COLOR 14,1:CLS:GOTO 520
1850 IF W$="R" OR W$="r" THEN P$="":COLOR 14,1:CLS:E$="":COLOR 14,4:PRINT:PRINT"To read your diskfile ";R$;", enter the name again.":CLOSE:PRINT:GOTO 2170
1860 IF Z$="D" OR Z$="d" AND W$="A" OR W$="a" THEN CLS:COLOR 14,1:PRINT:PRINT "To read your diskfile again, enter ";R$:CLEAR:COLOR 14,1:GOTO 2170
1870 IF N > 252 AND W$="A" OR W$="a" THEN W$="R":GOTO 1850
1880 IF W$="X" OR W$="x" THEN BEEP:INPUT"Are you sure?...............Enter N to stop ";WW$:IF WW$="N" OR WW$="n" THEN COLOR 14,1:CLS:GOTO 1780 ELSE RETURN
1890 IF R$="" THEN RETURN ELSE GOTO 1900
1900 CLOSE:COLOR 14,4:PRINT:PRINT"To erase the file -";R$;"- hit X, otherwise hit RETURN":PRINT:SS$=INPUT$(1):IF SS$="X" OR SS$="x" THEN PRINT:PRINT" Diskfile ";R$;" erased.":KILL R$:RETURN ELSE RETURN
1910 IF SS$="X" OR SS$="x" THEN RETURN ELSE GOTO 1920
1920 IF R$="" THEN RETURN ELSE COLOR 14,4:PRINT"To rename the file -";R$;"- hit X, otherwise hit RETURN":GOTO 1930
1930 TT$=INPUT$(1):IF TT$=CHR$(13) THEN RETURN ELSE COLOR 14,1:PRINT "Enter new name."
1940 LINE INPUT DD$
1950 NAME R$ AS DD$
1960 PRINT:PRINT "File renamed ";DD$:RETURN
1970 END
1980 F=0:L=N+1
1990 COLOR 14,1
2000 F=F+1:L=L-1
2010 IF F=L THEN GOTO 2050
2020 IF F=L+1 THEN GOTO 2050
2030 SWAP M(F),M(L)
2040 GOTO 2000
2050 COLOR 11,1:PRINT"Ciphertext reversed is:"
2060 COLOR 14,1
2070 RETURN
2080 END
2090 IF R$ <> "" THEN COLOR 11,1:PRINT:PRINT"Last file made or read was ";R$:GOTO 2100
2100 IF N > 1 THEN COLOR 14,1:PRINT:FOR J%=1 TO N:PRINT CHR$(M(J%));" ";:NEXT J% ELSE RETURN
2110 IF N > 1 THEN COLOR 11,1:PRINT"(Last";N;"letters)":COLOR 14,1:J%=0:RETURN
2120 END
2130 CLOSE
2140 OPEN"O",#1,R$
2150 PRINT#1, E$;
2160 CLOSE #1:RETURN
2170 K=0:COLOR 14,1:PRINT"Files available are (None with extensions listed):":PRINT:FILES"????????"
2180 PRINT" (Limit is about 8000 characters.)"
2190 INPUT"Enter name of file to read ";R$:
2200 ON ERROR GOTO 3290
2210 IF R$<>"" THEN GOTO 2230 ELSE COLOR 10,4:INPUT"To reverse ciphertext enter D, otherwise hit Return ";P$:COLOR 14,1:CLS
2220 IF R$="" THEN CLS:PRINT:PRINT"You must enter a filename.":GOTO 2170 ELSE CLS:PRINT
2230 IF R$="MYFILE" THEN E$="":
2240 COLOR 10,4:INPUT"To reverse ciphertext enter D, otherwise hit Return ";P$:COLOR 14,1
2250 COLOR 9,0:LOCATE 25,1:PRINT" Pause-Break to stop scrolling, X to exit. Diskfile is ";R$;:IF P$="D" OR P$="d" OR V$="D" OR V$="d" THEN PRINT " reversed.":COLOR 14,1:LOCATE 2,1 ELSE PRINT:COLOR 14,1:LOCATE 3,1
2260 IF P$="D" OR P$="d" OR V$="D" OR V$="d" THEN CLS 2:COLOR 11,1:PRINT "Ciphertext is reversed":COLOR 14,1 ELSE CLS 2:COLOR 11,1:PRINT"Ciphertext is:":COLOR 14,1
2270 COLOR 14,1:OPEN"I",#1,R$
2280 IF P$="" THEN GOTO 2290 ELSE IF P$="D" OR P$="d" THEN GOTO 2310
2290 IF P$="" THEN INPUT #1,E$:GOSUB 2300:GOTO 2340
2300 FOR J=1 TO LEN(E$):I$=MID$(E$,J,1):MID$(E$,J,1)=CHR$(ASC(I$) AND 223):NEXT J:RETURN
2310 IF P$="D" OR P$="d" THEN INPUT #1,E$:GOSUB 2320:GOTO 2330
2320 FOR J=1 TO LEN(E$):I$=MID$(E$,J,1):MID$(E$,J,1)=CHR$(ASC(I$) AND 223):NEXT J:RETURN
2330 T$=E$:E$="":FOR A=LEN(T$) TO 1 STEP-1:U=ASC(MID$(T$,A,1)):PRINT CHR$(U);" ";:E$=E$+CHR$(U):FOR JJ=1 TO (K*20):NEXT JJ:NEXT A:GOTO 2350
2340 COLOR 14,1:FOR A=1 TO LEN(E$):PRINT MID$(E$,A,1);" ";:FOR JJ=1 TO (K*20):NEXT JJ:NEXT A
2350 IF LEN(E$)<3 THEN GOTO 3290 ELSE COLOR 14,6:PRINT LEN(E$);"letters.":GOTO 760
2360 PRINT:PRINT" In order to prepare a file for use with this program, do the following:"
2370 PRINT"1. With your word processor SAVE your 'Shakespeare' file as an ASCII file."
2380 PRINT"2. Stage directions and the character's names (both in italics in the"
2390 PRINT" original) should be erased. Using 'find and replace,' do the following:"
2400 PRINT"3. Remove quotation marks AND commas. Put ONE quotation mark AT THE BEGINNING."
2410 PRINT"4. Save the result as an ASCII file. This can then be processed by ASCIFILE."
2420 COLOR 14,4:PRINT" In contemporary editions the printing of the INITIAL capital letters "
2430 PRINT" has usually been accurately preserved, and these may be taken as reliable.":COLOR 14,1
2440 PRINT" However the spelling in most Shakespeare texts has been modernized,"
2450 PRINT" so the results may be doubtful. There are several facsimile editions"
2460 PRINT" of the 1623 Folio, one being 'Mr. William Shakespeares Comedies,"
2470 PRINT" Histories & Tragedies', Yale University Press, 1954 and later printings."
2480 PRINT" There are also facsimiles of the early quarto editions of the plays and"
2490 PRINT" poems. With these you can check your own copy; most good libraries"
2500 PRINT" have them, and a Xerox machine."
2510 PRINT" Good hunting.";SPC(10);"Penn Leary"
2520 PRINT" Version 2.4, 3/26/92";SPC(30);"218 So. 95"
2530 PRINT" Contributed to the public domain.";SPC(17);"Omaha NE 68114":PRINT
2540 PRINT" To run ASCIFILE program hit A, otherwise hit return."
2550 PRINT" To view an index of occurrences of Bacon's name, hit B, otherwise hit return."
2560 PRINT " (To select B, the file INDEX2.EXE must be on this directory.)
2570 W$=INPUT$(1):GOSUB 3240
2580 CLS:IF W$="A" OR W$="a" THEN CLEAR:GOTO 2620
2590 IF W$="B" OR W$="b" THEN CLS:GOTO 3260
2600 RETURN
2610 END
2620 CLS
2630 DEFINT A-Z
2640 DIM T(1024),I(1024),K(1024),N(1024),G(1024),A(1024),B(1024),J(1024)
2650 PRINT:PRINT"This file will convert an ASCII file containing spaces, punctuation, etc."
2660 PRINT"to a file readable by SKIP10.EXE. J will be converted to I; W and U will"
2670 PRINT"be converted to V, and X and Z will be discarded."
2680 COLOR 10,4:PRINT"Remove all quotation marks AND commas with your word processor.":COLOR 14,1
2690 PRINT" LIMIT, ABOUT 8000 CHARACTERS."
2700 PRINT"All letters will be capitalized and output to a new file."
2710 COLOR 14,1:PRINT"Files available are (None with extensions listed):":PRINT:FILES"????????"
2720 INPUT"Enter name of file to read.";R$
2730 IF R$="" THEN BEEP:PRINT:PRINT"You must enter a filename. Hit a key and start over.":W$=INPUT$(1):CLEAR:CLS:GOTO 10
2740 COLOR 10,4:PRINT"Diskfile = ";R$;":";:COLOR 11,1:PRINT:PRINT"Ciphertext is:":COLOR 14,1
2750 OPEN"I",#1,R$
2760 INPUT #1,A$
2770 COLOR 14,1:FOR A=1 TO LEN(A$)
2780 PRINT MID$(A$,A,1);
2790 NEXT A
2800 PRINT:PRINT LEN(A$);" Characters."
2810 CLOSE
2820 FOR G=1 TO LEN(A$):CC$=MID$(A$,G,1):MID$(A$,G,1)=CHR$(ASC(CC$) AND 223):NEXT G
2830 FOR N=1 TO LEN(A$)
2840 B=ASC(MID$(A$,N,1))-64
2850 J=J+1
2860 T(J)=B
2870 NEXT N
2880 I=0
2890 FOR K=1 TO J
2900 IF T(K)<1 OR T(K)>25 THEN T(K)=0:GOTO 2980
2910 IF T(K)=23 OR T(K)=21 THEN T(K)=22
2920 IF T(K)=10 THEN T(K)=9
2930 IF T(K)=24 THEN GOTO 2980
2940 I=I+1
2950 T(I)=T(K)
2960 D$=CHR$(T(I)+64)
2970 C$=C$+D$
2980 NEXT K
2990 PRINT C$
3000 A$=C$
3010 PRINT"=";I;"Squeezed and capitalized ciphertext letters converted to"
3020 PRINT" Bacon's 21 letter alphabet. (Hit a key)"
3030 W$=INPUT$(1):CLS
3040 PRINT:PRINT"Next make a diskfile for the new ASCII ciphetext."
3050 PRINT:PRINT"Files on disk are:"
3060 FILES"????????"
3070 PRINT SPC(13);"Enter a name for the new disk file"
3080 PRINT SPC(12);"(maximum of 8 letters, no extension)":PRINT
3090 INPUT"CAUTION: If the name you enter exists, it will be ERASED and written over ";Z$:COLOR 14,1:PRINT
3100 IF Z$="" THEN BEEP:PRINT:PRINT"You must enter a name. Hit a key and start over.":W$=INPUT$(1):CLEAR:CLS:GOTO 20
3110 OPEN"O",#1,Z$
3120 PRINT#1, A$
3130 CLOSE #1
3140 OPEN"I",#1,Z$
3150 INPUT #1,A$
3160 COLOR 10,0:PRINT"Contents of new diskfile ";Z$;" is:":COLOR 14,1:PRINT
3170 PRINT A$
3180 CLOSE
3190 PRINT"To run again hit A; to exit hit Return."
3200 W$=INPUT$(1):IF W$="A" OR W$="a" THEN CLEAR:GOTO 2620 ELSE CLEAR:CLS:GOTO 20
3210 END
3220 IF CHR$(T)="B" OR CHR$(T)="N" THEN COLOR 11,1:PRINT CHR$(T+32);" ";:RETURN ELSE COLOR 14,1:PRINT CHR$(T+32);" ";:RETURN
3230 IF MID$(T$,Q,1)="B" OR MID$(T$,Q,1)="N" THEN COLOR 11,1:PRINT MID$(T$,Q,1);:RETURN:ELSE COLOR 14,1:PRINT MID$(T$,Q,1);:RETURN
3240 IF ASC(W$)=88 OR ASC(W$)=120 THEN PRINT:GOTO 1780 ELSE RETURN
3250 END
3260 SHELL "INDEX2"
3270 GOTO 10
3280 END
3290 IF ERR=53 THEN COLOR 14,4:PRINT "The file ";R$;" was not found, so enter a corrected file name.":W$=INPUT$(1):CLEAR:RUN 10 ELSE GOTO 3300
3300 IF ERR=58 THEN DD$="":PRINT:PRINT"Error--you entered an existing file name.":RESUME 1920 ELSE GOTO 3310
3310 CLS:COLOR 14,4:LOCATE 21,1:PRINT "The file ";R$;" is not in SKIP10 format or is too long."
3320 PRINT"Run SKIP10 again, hit M and then A for formatting instructions."
3330 PRINT"Hit a key to start over. ":W$=INPUT$(1):COLOR 11,1:CLEAR:RUN 10