Thank you very much. I just wasn't sure if I could get the bitwise-xor part any faster. Shame.

]]>Changes from the original design include:

-Instead of characters, the program outputs a number for each letter enciphered.

-The exclusive-or is now used to encipher a letter.

-The number of scramblers is no longer restricted to a definite number. The user can make as many scramblers as he/she desires (though no more than 8-14 would be optimal).

-Theoretically, a letter could be enciphered as "itself," or at least its numerical equivalent. A major flaw of the original Enigma was that it could not do so.

-Finally, the key is no longer a series of numbers to punch in. To make a more efficient key input, a string of n (n being the number of scramblers used) characters is used to extrapolate the scrambler positions.

The only problem I'm having is that the program is a little bit slow. I've optimized it myself quite a bit (from ~4000 bytes to ~600), but I'm not sure if I've done everything I could. If anyone knows how to optimize the program any further, I'd greatly appreciate the input. The code is as below:

` ``:ClrHome :"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890(){}[]=.,?!<>+-*/→Str0 :dim([J]→L₁ :L₁(2→dim(L₁ :Fill(1,L₁ :ClrHome :Disp "KEY :Input ":",Str1 :For(X,1,length(Str1 :inString(Str0,sub(Str1,X,1 :Ans-33int(Ans/33 :1(Ans=0)+Ans→L₁(X :End :0→D :ClrHome :Menu("","ENCRYPT",1,"DECRYPT",2,"QUIT",X :Lbl 2 :1→D :Lbl 1 :Disp "MESSAGE:" :If D:Then :Input "",A :" →Str1 :Else :Input "",Str1 :inString(Str0,sub(Str1,1,1→A :End :If A=π or Str1="π :Goto X :For(Y,1,dim(L₁ :[J](L₁(Y),Y→B :1→C :DelVar θ :While A>0 or B>0 :.5int(A→A :.5int(B→B :fPart(A) xor fPart(B→E :θ+CE→θ :2C→C :End :θ→A :End :1+L₁(1→L₁(1 :For(Y,1,dim(L₁)-1 :1(L₁(Y)=33)+L₁(Y+1→L₁(Y+1 :End :L₁-33int(L₁/33→L₁ :seq(0,Y,1,dim(L₁0,1 :(L₁=Ans)+L₁→L₁ :ClrHome :Disp "NEW TEXT: :If D:Then :sub(Str0,A,1 :Pause Ans :Else :Pause A :End :Goto 1 :Lbl X :DelVar Str1DelVar Str0DelVar DDelVar ADelVar L₁DelVar EDelVar CDelVar BDelVar YDelVar X :ClrHome :"`