LaFarr's Variable Precision Integer Calculator

Last Up date: 2005 November 12
Recent changes: More Links below activated.

IA, (Integer Arithmetic), is a program that runs under DOS or in a DOS Window.

The first thing you need to know about any program is: How to Start it. The second is how to end it! The second is probably more important than the first.

To start IA you just need to enter: ia at the DOS prompt. The file: IA.COM has to be in the current directory, or in the PATH for DOS to find it. You don't need any parameters, although a couple are allowed and will be described latter.

When you start IA almost nothing happens. If you look carefully, the DOS cursor moves in two positions from the left. Your input starts indented, and IA's output always starts at the left edge of the screen. There are no fancy start screens or banners, so you can see as much as possible of what was on your screen.

IA processes one input line at a time, although there is a way to continue lines; for the most part it starts a new, with an empty stack, for each line input. Like Forth and early HP calculators, IA works on a push down stack; at the end of each line IA displays the contents of the stack. For those not familiar with stacks, I have an elementary introduction to stacks.

One more important detail to avoid initial confusion. IA displays the values on the stack either in Decimal or Hexadecimal, for now to insure a Decimal display you can end each line with a Dot or Period. (Internally, all values and calculations are done in binary. It is only the input and output that can be done in different number bases.)

To quit IA give it a line with nothing on it. (Just press the Enter key.)

A line with just a ? on it, will get IA's help screen like shown below. Except below each line is a link for more detail.

You might open a DOS window to give IA a try, start with a few small numbers and experiment a little. You can come back latter and get details when you want to try less obvious things such as: looping, or using different number bases.

Last but not least, except within a few two character operators, all spaces in the input line are ignored. Even within numbers. And, IA can work with numbers up to around 50,000 decimal digits.

As of: Sat 05-04-2002 I have not finished all the links below.
I have not seen enough people interested.
 Functions in the 6 March 2001 version of IA (Integer Arithmetic)
        . Dot input (Decimal)           $ Square Root, $Enter shows .
        , Start new value,at 0          ! Factorial, !Enter shows all
        & Duplicate Top                 | M-things, taken N at a time
        [ Copy 2nd to Top               ` User definable, see _` .`
        ' Delete Top                    @ Count of digits
        " Delete 2nd                    ; Continue to next Line
        ] Delete 3rd                    ( Start Looping
        > To Alternate Stack            ) End Looping
        < From Alternate Stack          = Display Top in Decimal
        ~ Increment Alternate Top       # = with blocked groups
        \ Decrement Top                 : Display Top in Hex
        + Add. Top+2nd=New              % 1.193 MHz Ticks since Midnight
        - Subtract. 2nd-Top=New         { Send Output to PRN/file
        * Multiply. Top*2nd=New         } Return Output to CRT
        / Divide. 2nd/Top=Rem,Quot      ? Help, or Output following
        ^ Power. 2nd^Top=New            _ Decimal Coded Digits (. Input)
>< <> Copy to/from alt. Stack.          .= .: Change Out/In number bases.
Horizontal output with _= _# or _:      _Enter. Kills stack display.
        .' Empty Alternate Stack        _) Loop Top Not Zero
        .- 2's Complement               _} Infinite Loop
        .< .> Double/Half shifts        .) Loop on Keyboard
        .. 80-bit Float of top          .; Wait, for Keyboard
        .@  Count of stack values       .# Block size and symbol for #
I would be grateful to hear what might have been confusing for you.
As the implementor, (all in assembly) I have been deprived of the learning experience.

Contact me at:
My phone #'s
For comments call, or e-mail me. Go to My Home Page or TOP of this page.