210 HOME : VTAB 5: HTAB 12: PRINT "** CRYPTO **": PRINT : PRINT "THIS PROGRAM HELPS CREATE AND SOLVE": PRINT "CRYPTOGRAMS. PLEASE SEE THE NIBBLE": PRINT "ARTICLE FOR INFORMATION ON USING IT."
220 PRINT : HTAB 5: PRINT "COPYRIGHT 1992 BY MINDCRAFT": VTAB 18: INPUT "PRESS <RETURN> TO BEGIN:";XX$: REM INITIALIZATION
450 HOME : INVERSE : PRINT C$: NORMAL :L = LEN(C$): GOSUB 100: GOSUB 550: ONERR GOTO 600
460 REM START OF ANALYSIS
470 VTAB 23: INVERSE : PRINT "ASSIGNMENTS ? = ";: NORMAL : HTAB 21: PRINT "CTRL-F FOR FREQ TBL": PRINT "CTRL-M FOR MESSAGE";: HTAB 21: PRINT "SPACE BAR FOR MENU";: VTAB 23: HTAB 14: GET Z1$: PRINT Z1$:V = ASC(Z1$)
480 ON V <65 OR V >90 GOTO 540: VTAB 23: INVERSE : PRINT "ASSIGNMENTS ? = ";: NORMAL : HTAB 14: PRINT Z1$;: HTAB 21: PRINT "CTRL-F FOR FREQ TBL": VTAB 23: HTAB 16: GET Z2$: PRINT Z2$:W = ASC(Z2$):B(V) = W: FOR K = 64 TO 90
490 ON K = V GOTO 500: IF B(K) = B(V) THEN B(K) = 42
500 NEXT K:O$ = "": FOR I = 1 TO L:O$ = O$ + CHR$(B(CN(I))): NEXT I
510 HOME : INVERSE : PRINT C$: NORMAL : PRINT P$: PRINT : PRINT :E$ = "":F$ = "": FOR I = 1 TO 26:E$ = E$ + CHR$(I +64): IF B(I +64) = 42 THEN J = 45
520 IF B(I +64) < >42 THEN J = I +64
530 F$ = F$ + CHR$(B(J)): NEXT I: PRINT O$: PRINT : PRINT : INVERSE : PRINT E$;: NORMAL : PRINT " CRYPTO": INVERSE : PRINT F$;: NORMAL : PRINT " PLAIN TEXT": NORMAL : GOTO 460
540 HOME : ON V = 6 GOTO 550: IF V = 13 THEN FOR K = 64 TO 90: GOTO 490
545 GOTO 250: REM FREQUENCY ANALYSIS OUTPUT
550 PRINT : HTAB (12): INVERSE : PRINT "FREQUENCY ANALYSIS": NORMAL : PRINT :J = 1: FOR I = 1 TO 26: IF I = 1 THEN MM$(I) = MS$(1): GOTO 590
560 IF I >1 THEN IF S(I) < >S(I -1) THEN J = J +1
570 IF J <7 THEN MM$(I) = MS$(J)
580 IF J = >7 THEN MM$(I) = MS$(7)
590 NEXT I: FOR I = 1 TO 13: PRINT TAB( 7)S(I);: HTAB 11: PRINT CHR$(C(I) +64)MM$(I) TAB( 27)S(I +13);: HTAB 30: PRINT CHR$(C(I +13) +64)MM$(I +13): NEXT I: PRINT : PRINT P$: PRINT : PRINT : GOTO 470
600 PRINT "ERROR HAS OCCURRED... ERR#:"; PEEK(222): END