
The following is a list of primitive op codes, infix operators, procedures
and functions supported by XICalc.

                          The primitive op codes are:

A => Auto Display on/off                |  W => Write x (Top number) to file
B => Display learn line                 |  X => Learn, Execute (X learn, X)
C => Change sign of x                   |  Y => Delete (Yank) number from list
F or ! => Factorial by binary splitting |  Z => Output the list of variables
G => Set Digits/Group                   |  " => Start/Stop file name or comment
H => Log screen to log file toggle      |  % => Set FMB = x, FMB on list
I => Input number from file             |  / => x = x Mod FMB, FMB on list
J => Run XICalc code from file          |  \ => Set Input and Output base to x
K => Execute learn line x times         |  $ => Restart/Reset configuration
M => Set Max digits in a number         |  > => Write configuration file
N => Generate a random Number           |  < => Read configuration file
Q => Quit to end the program            |  ] => Write command history file
R => Square root of x, Re = Remainder   |  [ => Read command history file
S => Square x                           |  # => Primorial (like factorial)
                                        |  ? => Help
--------------------------------------------------------------------------------

                           The infix operators are:

         A = X + Y  =>  Set A to X plus Y
         A = X - Y  =>  Set A to X minus Y
         A = X * Y  =>  Set A to X times Y
         A = X / Y  =>  Set A to X divided by Y and set Re to remainder
         A = X ^ Y  =>  Set A to X to the power Y
         A = X # Y  =>  Set A to Mag(X, Y) = SqRt(Sq(X) + Sq(Y)) and set Re
         A = X % Y  =>  Set A to Mod(X, Y) = X Modulo Y
         A = X \ Y  =>  Set A to GCD(X, Y) = Greatest Common Divisor
         A = X & Y  =>  Set A to 1 if X and Y are not 0, else set A to 0
         A = X | Y  =>  Set A to 1 if X or Y, is not 0, else set A to 0
         A = X < Y  =>  Set A to 1 if X < Y, else set A to 0
         A = X > Y  =>  Set A to 1 if X > Y, else set A to 0
         A = X = Y  =>  Set A to 1 if X = Y, else set A to 0, same as ==
         A = X == Y  =>  Set A to 1 if X = Y, else set A to 0
         A = X <= Y  =>  Set A to 1 if X <= Y, else set A to 0
         A = X != Y  =>  Set A to 1 if X not = Y, else set A to 0
         A = X <> Y  =>  Set A to 1 if X not = Y, else set A to 0, same as !=
         A = X >= Y  =>  Set A to 1 if X >= Y, else set A to 0
         A = X -- Y  =>  Set A to X * Repunit(Y), 3--5 = 33333, five threes
--------------------------------------------------------------------------------

                         The assignment operators are:

             =  =>  Set Top to Top (no-op)
             X =  =>  Bring X to top of list
             = Y  =>  Set Top to Y
             += Y  =>  Set Top to Top plus Y
             -= Y  =>  Set Top to Top minus Y
             *= Y  =>  Set Top to Top times Y
             /= Y  =>  Set Top to Top divided by Y and set Re to remainder
             %= Y  =>  Set Top to Mod(Top, Y) = Top Modulo Y
             X = Y  =>  Set X to Y
             X += Y  =>  Set X to X plus Y
             X -= Y  =>  Set X to X minus Y
             X *= Y  =>  Set X to X times Y
             X /= Y  =>  Set X to X divided by Y and set Re to remainder
             X %= Y  =>  Set X to Mod(X, Y) = X Modulo Y
--------------------------------------------------------------------------------

                         The procedures supported are:

               AllD(X) => Compute all divisors of X
           AllowFHT(X) => Set Allow FHT multiple on if X != 0, else off
        AutoDisplay(X) => Set Auto display on if X != 0, else off
               Base(X) => Set Input and Output base to X, [2, 36]
              BaseI(X) => Set Input base to X, [2, 36]
              BaseO(X) => Set Output base to X, [2, 36]
             D1Line(X) => Set display numbers on a single line on if X != 0
              DBool(X) => Set display Boolean state (False/True) if X != 0
               DDig(X) => Set display number of digits in a numbers on if X != 0
              BernM    => Returns the Max index of saved Bernoulli numbers
              ChDir(F) => Change directory to F = "ccc...c", F optional
          ClearBern    => Clear storage of saved Bernoulli numbers
         ClearEuler    => Clear storage of saved Euler numbers
          ClearHist    => Clear history of previous operator entries
           ClearLog    => Clear the log file
               Diag(X) => Set diagnostic mode on or off, (X) is optional
             EulerM    => Returns the Max index of saved Euler numbers
               Exit    => Totally quit the program with no questions asked
           ForceFHT(X) => Set Force FHT multiple on if X != 0, else off
            GenBern(X) => Generate and save Bernoulli number upto B(X)
           GenEuler(X) => Generate and save Euler number upto E(X)
              HelpH(X) => Set Height of Help form in pixels
              HelpW(X) => Set Width of Help form in pixels
              HistH(X) => Set Height of History form in pixels
              HistW(X) => Set Width of History form in pixels
          LogScreen(X) => Log screen to log file mode, on or off
           LX => LT    => Restore LastTop to top of the list
               Next    => Move to next item on the list (no argument)
              Pause    => Pause the calculations to free the processor
                PFA(X) => Run prime factor algorithm A on X
                PFB(X) => Run prime factor algorithm B on X
                PFE(X) => Run prime factor algorithm ECM on X (fastest)
               PTab(X) => Write prime table to XICalcPTab.txt, X primes
                Pri(X) => Set the execution priority in the operating system
              Quiet(X) => Set the quiet mode on or off, (X) is optional
                Ran    => Randomly start a new random number sequence
              ReadN(F) => Read number from file, F = "ccc...c" optional
            Restore    => Restore Configuration, History, & List
                Run(F) => Run XICalc code from file F, F is optional
               RunH(X) => Set Height of Run form in pixels
               RunW(X) => Set Width of Run form in pixels
               Save    => Save Configuration, History, & List
            SaveTop(X) => Set "save top value in LastTop" on or off
               SetC(X) => Set max commands in history
               SetD(X) => Set max decimal digits in display
               SetM(X) => Set max decimal digits allowed in a number
             SetMax(X) => Set max decimal digits allowed in a number
               Time    => Set timing mode on without other diags
              Write(X) => Output X, (X may be "ccc...c", X is optional)
            WriteLn(X) => Write(X) and a line feed
             WriteN(F) => Write X to file F = "ccc...c", F is optional
              XICIn(F) => Enter file name F = "ccc...c" for J command
             XILOut(F) => Enter file name F = "ccc...c" for H command
              XINIn(F) => Enter file name F = "ccc...c" for I command
             XINOut(F) => Enter file name F = "ccc...c" for W command

Note: Top is the item currently on top of the named number list.
--------------------------------------------------------------------------------

                         The functions supported are:

                      Abs(X) = AbsoluteValue(X)
                    BernD(X) = Denominator of Bernoulli number B(X)
                    BernN(X) = Numerator of Bernoulli number B(X)
                  Bino(X, Y) = Binomial coefficient (X, Y) by binary splitting
                 BinoS(X, Y) = Binomial coefficient (X, Y) by standard method
                  Chin(X, Y) = add to Chinese remainder problem z == X mod Y
                 Chin1(X, Y) = Initialize Chinese remainder with X1, Y1
                     CuRt(X) = CubeRoot(X), Re = Remainder
                   Dig(X, Y) = Number of base Y digits in X, Y >= 2
                     DigD(X) = Number of decimal digits in X
                DivInt(X, Y) = Floor(X/Y), integer divide
                DivRem(X, Y) = Floor(X/Y) and set Re to remainder
                    Euler(X) = Euler number E(X)
                   EulerN(X) = Numerator of E(X) = E(X)
                      Fac(X) = Factorial of X by binary splitting
                  Fac2(X, Y) = Fac(X) / Fac(Y) by binary splitting
                     FacM(X) = (Factorial of X) Mod FMB by binary splitting
                 FacM2(X, Y) = Fac(X) / Fac(Y) Mod FMB by binary splitting
                    FacMS(X) = (Factorial of X) Mod FMB by standard method
                     FacS(X) = Factorial of X by standard method
                      Fib(X) = FibonacciNumber(X), Fib(0) = 0
                      Gam(X) = GammaFunction(X) = (X-1)! by binary splitting
                   GCD(X, Y) = Greatest Common Divisor X, Y
                  GCDe(X, Y) = Extended GCD(X, Y) = X*X1 + Y*Y1
                   Inv(X, Y) = Z = Inverse of X Mod Y, X*Z == 1 Mod Y
                     IsSq(X) = 1 (True) if X is a square, else 0
                  Kron(X, Y) = Kronecker-Legendre symbol X over Y
                   LCM(X, Y) = Least common multiple X, Y
                   Mag(X, Y) = SqRt(Sq(X), Sq(Y)), Re = Remainder
                   Max(X, Y) = Greater of X and Y
                      MEq(X) = Mersenne equation = 2^X - 1
                   Min(X, Y) = Lesser of X and Y
                   Mod(X, Y) = Remainder of X/Y
                  Mord(A, N) = Multiplicative order of base A (mod N) or 0
                      MPG(X) = The X'th Mersenne Prime Generator, MPG(1) = 3
                      MPP(X) = Mersenne Prime Power, MPP(1) = 2
                   MPrime(X) = 1 (True) if 2^X - 1 is a Mersenne Prime else 0
                       Mu(X) = Moebius Mu(X) function
                        P(X) = The X'th prime
                      PEq(X) = Perfect equation = (2^X - 1) * 2^(X-1)
                      PGT(X) = First prime > X
                      Phi(X) = Euler's totient function
                  PhiL(X, A) = Legendre's formula
                       Pi(X) = Number of primes <= X by sieve or Lehmer
                      PiL(X) = number of primes <= X by Lehmer's formula
                     PiL1(X) = number of primes <= X by Legendre's formula
                      PiM(X) = number of primes <= X by Meissel's formula
                      PLT(X) = Largest prime < X
                      PNG(X) = The X'th Perfect Number Generator, PNG(1) = 6
                   Pow(X, Y) = X to the Y
                  PowM(X, Y) = (X to the Y) Mod FMB
                    Prime(X) = 1 (True) if X is Prime else 0
                    Primo(X) = Primorial, product of all primes <= X
                    PrimR(X) = Largest and smallest primitive root of X or 0
                   PrimRP(X) = Largest and smallest prime primitive root of X
                PrimRQ(X, Y) = 1 (True) if X is a primitive root of Y, else 0
                      Rev(X) = Digit Reversal of X base 10
                   Rev(X, Y) = Digit Reversal of X base Y
                  RInt(X, Y) = RandomInteger between X and Y inclusive
                       RN(X) = RandomNumber(X=Seed)
                      Sig(X) = Sum of divisors of X
                     Sig0(X) = Sum of divisors of X (-X)
                     Sign(X) = 0 if X=0, else = X / |X|
              Solve(X, Y, N) = Solve for z, X * z == Y Mod N
                  Sord(A, N) = Multiplicative suborder of base A (mod N) or 0
                       Sq(X) = X Squared
                   SqFree(X) = 1 (True) if X is a squarefree, else 0
                     SqRt(X) = SquareRoot(X), Re = Remainder
                  SumD(X, Y) = Sum of base Y digits in X, Y >= 2
                    SumDD(X) = Sum of decimal digits in X
                      Tau(X) = Number of divisors of X
                          -X = Negative of X, 0 - X
                          +X = Positive of X, 0 + X
                          !X = Not X, 0 -> 1 else 0

Note that the ' character can be used to separate the arguments in functions
since commas are allowed in numeric input, ", " works also.
--------------------------------------------------------------------------------

            +------------Function Keys on Run form------------+
            |   F1  => Display Help form (?)                  |
            |   F2  => Totally Quit/end the program (Q)       |
            |   F3  => Restore previous input command         |
            |   F4  => Restore previous input and accept      |
            |   F5  => Get Status of calculation              |
            |   F6  => Display Configuration form             |
            |   F7  => Display Restore Input History form     |
            |   F8  => Accept input and Calculate             |
            |   F9  => Toggle Logging to Log file on/off (H)  |
            |   F11 => Clear output text box                  |
            |   F12 => Pause (Pause)                          |
            |   Ctrl+F2  => Restart ($)                       |
            |   Ctrl+F9  => Clear Log File (ClearLog)         |
            |   Ctrl+F11 => Clear input text box              |
            |   Ctrl+S   => Save All (Save)                   |
            |   Ctrl+O   => Restore All (Restore)             |
            |   ESC => Clear Run form Input Text Box          |
            |   ESC => Interrupt/Abort a long calculation     |
            |  PgUp => Display previous newer command         |
            |  PgDn => Display previous older command         |
            +-------------------------------------------------+
--------------------------------------------------------------------------------

                Commands used in XICalc code files:

        If {expression} Then {statements} Else {statements}
        GoTo {label} (label is a name without a colon)
        GoUpTo {label}
        Labels: A name followed by a colon (:)
        Continuation lines ending with + or -
        Batch Commands (Echo, @Echo, Pause, and Rem)
        Echo On/Off
        @Echo On/Off
        Pause
        Rem ... or //... (for remarks)
--------------------------------------------------------------------------------

-Harry
