home *** CD-ROM | disk | FTP | other *** search
- 32 BIT CALCULATOR
- BY GUY COUSINEAU
- 1059 Hindley St
- OTTAWA Canada
- K2B 5L9
-
- This program has no copyrights and is
- being freely released to the public
- domain. No charge shall be made for its
- distribution nor shall it be included in
- any sold software without the written
- permission of the author.
-
- This double precision calculator is not
- intended to replace the pocket
- calculator, just to provide a useful
- tool for quick reference, especially for
- those who have a RAMDISK. It handles 7
- basic functions, 3 logicals and HEX to
- DEC conversion.
-
- FUNCTIONS
-
- + add
- - subtract
- * multiply
- / divide
- ^ exponent
- ! factorial
- & logical AND
- % logical OR
- # logical XOR
- <n shift left by n over 32 bits
- >n shift right by n over 32 bits
- (n rotate left over 8 bits
- )n rotate right over 8 bits
- M USE PREVIOUS RESULT
- eg
- 5*7<CR>
- 35
- M*2<CR>
- 70
-
- SYNTAX
-
- number[op][number]
-
- Enter just a number and return for HEX to DEC to HEX
-
- All other functions require three inputs.
-
- Put all inputs on one line in upper or
- lower case with NO SPACES. My parser
- doesn't like them.
-
- For convenience, you can put commas in
- your input -- they are ignored by the
- parser.
-
- For simplicity in the parser, use the
- following prefixes:
-
- ' one ASCII character
- H HEX
- I individual bits(binary)
-
- The result is always displayed in HEX
- and DECIMAL as well as the last 8 bits
- in binary and ASCII--this should be
- useful for checking out logicals. For
- example:
-
- 9<CR>
- 00001001 ^I
- 9 <-> 9
-
- 'B+1<CR>
- 01000011 C
- 43 <-> 67
-
- In the first example, I ask to see the
- value 9 displayed. The binary
- equivalent is shown and its
- corresponding ASCII value of CONTROL-I.
- On the next line, I see the HEX and
- DECIMAL equivalents. In the second
- example, I ask to Add 1 to the ASCII
- value of the letter B. The result is
- ASCII C which corresponds to 43HEX and
- 67DECIMAL.
-
- See additional comments in source
- code...note the following hardware
- specific item: the program uses 3
- <ESC>A to move the cursor up. You may
- need to change these for your terminal.
- See the UP label. Other than that, the
- only other control characters used are
- <TAB> (CONTROL-I) and <BEL> (CONTROL-G).
-
- It should also be relatively easy for
- programmers to extract parts of
- functions to include in programs. Feel
- free to do so provided your programs
- will be public domain.
-
- Please report any bugs or suggestions.
-
- Guy
-
- rams. Feel
- free to do so prov