---------------------------------------------------------------
-----------------  Computer Math Calculator  ------------------
---------------------------------------------------------------
                  ---     Version 19b    ---
                  ---    4 April 1998    ---

       Copyright (c) 1991, 1992, 1994-1998 by Eugene Dorr
                      All rights reserved.

---               ---
---  Introduction ---
---               ---

CMCalc for the HP-100/200LX is a system-manager compliant
application which provides a rich set of computer-science-
oriented integer manipulations. It features variable word size
(from 1 to 64 bits), selectable number representation modes
(unsigned, 1's complement, and 2's complement), four number
bases (binary, octal, decimal and hexadecimal), and visible
carry and overflow indicators.  Both algebraic and RPN entry
is supported.

Because CMCalc is "system-manager compliant" it can be started
and used along with all other system-manager compliant applica-
tions, including other add-in system-manager applications.  You
can switch between these applications without quitting any of
them, and when you return to an application, you are returned
right where you were when you left.  Of course, this also means
that CMCalc will operate ONLY on HP 100LX, HP 200LX, and
HP OmniGo 700LX palmtop computers.

CMCalc is freeware. You may freely use it, copy it, and give it
away. You may not charge for it, however, and you may not make
any changes to the archive.

Note: Previous versions of CMCalc were written for the HP-95LX
palmtop computer -- the predecessor to the HP-100LX. However,
all references in this document to "CMCalc" are to the version
of CMCalc written for the HP-200LX. Also, though the following
documentation refers to the palmtop computer you run CMCalc on
as an HP-200LX, CMCalc will run identically on an HP-100LX or
HP OmniGo 700LX. CMCalc does not run on the OmniGO 100 or 120.


---            ---
---  Manifest  ---
---            ---

CMCalc is distributed in an archive called CMCALC19.ZIP.  When
"unzipped" you should have three files:

           cmcalc.txt -- This documentation file
           cmcalc.exm -- The CMCalc executable
           cmcalc.icn -- An Application Manager icon for CMCalc


---                     ---
---  Installing CMCalc  ---
---                     ---

---  Step 1: Load the files  ---

Copy the following files to your HP-200LX (They must both be
copied to the same subdirectory):

      cmcalc.exm
      cmcalc.icn

---  Step 2: Define CMCalc to Application Manager  ---

Start the 'MORE' application (also known as 'Application
Manager') by pressing the [&...] key. Press [F2] (Add), and
enter the following values:

      Name:    CMCalc
      Path:    (drive):\(subdirectory)\CMCALC.EXM
      Comment:

In the Path field, (drive) and (subdirectory) should be replaced
with the drive letter (a or c) and the subdirectory to which you
copied the CMCalc files.

Now tab to the Icon field, and the CMCalc icon should appear.
If it does not, press the down-arrow key until you see the
CMCalc icon.

Press F10 (OK).

Now press the key-combination you want to use as the hot-key for
CMCalc (I use Alt+Calc; if you want to use something else, the
dialog which is displayed at this point describes what your
options are).

---  Step 3: Start CMCalc  ---

Back at the Application Manager screen, highlight the CMCalc
icon and press Enter. To end CMCalc, press MENU, Q.

---  Step 4: Registering CMCalc ----

CMCalc requires registration data before all of the functions
are available: an unregistered copy of CMCalc does not allow
use of the Number Format or Display Format dialogs. In order 
to register a copy of CMCalc, you must have a registration ID. 
Instructions for obtaining a registration ID given at the end 
of this file.


---                ---
---  Using CMCalc  ---
---                ---

To start CMCalc once it has been installed, hold down the ALT
key and press the HP CALC key (or whatever key you made the
hot-key during the installation process).  To quit CMCalc, press
MENU, Q(uit).  CMCalc uses the HP 200 calculator paradigm, so if
you are familiar with using the built-in HP 200 calculator,
operation of CMCalc should be straight-forward. The documentation
which follows explains the operations and features unique to
CMCalc. 

CMCalc supports both algebraic and RPN data entry. This doc-
umentation assumes that you are familiar with the entry mode you
will be using as it is implemented in the built-in HP 200
calculator. If you are not, refer to the HP 200 Owner's Manual.

The CMCalc calculator operates on integers only.  If you need to
operate on floating-point numbers, you can use the HP 200
built-in calculator and use CUT and PASTE to transfer numbers
between CMCalc and the built-in calculator application.


---                                ---
---  Controlling How CMCalc Works  ---
---                                ---

NOTE: The controls in the Number Format and Display Control 
dialogs are effective only after registering CMCalc.

Number Format
-------------
You can control how CMCalc operates in several ways. The
following options are controlled in the Options/Number Format
dialog (press [MENU], [O], [N]):

  * You can specify how many bits will be used to store numbers
    (the word size -- from 1 to 64 bits). In the number format
    dialog, press W to select the Wordsize field, and then use
    the up-arrow and down-arrow keys to select the wordsize you
    want. You can press the first digit of the desired wordsize
    (or blank if the desired wordsize is less than 10) as a
    shortcut to quickly get to the area of the list you want.

  * You can specify what complement mode is to be used (the
    complement mode affects the results of arithmetic functions,
    and the display of numbers in decimal mode). In the number
    format dialog, press 1 for 1's complement mode, 2 for 2's
    complement mode, or U for unsigned mode.

  * You can specify the number base you want to use for number
    entry. This setting also governs the base used to display
    numbers in the stack windows and the calc line. The bases
    you can choose are binary (base 2), octal (base 8), decimal
    (base 10), or hexadecimal (base 16); in the number format
    dialog, press the first letter of the name of the base
    you want. The base can also be controlled by pressing the
    up-arrow key to select a higher base, or the down-arrow
    key to select a lower base. If you have selected bases in
    the 'view set' (described in the section describing Display
    Options), then the up-arrow and down-arrow keys will only
    select among those bases in the current view set (even if
    the views window is not displayed).

Calculator Modes
----------------
The following options are controlled using the Options/
Calculator Mode dialog:

  * You can specify what character set standard (i.e. ASCII/ISO
    or EBCDIC) when using character entry mode. Note that this
    specification is independent of the character display in
    the "Views" window, which can be both ASCII/ISO *and*
    EBCDIC. The character code or codes displayed in the
    "Views" window is specified in the Options/Display Options
    dialog.

    [The term "ASCII/ISO" as used in this document means ISO
    646-6 (identical to ANSI X3.4), which is a seven-bit
    character set. "EBCDIC" means IBM EBCDIC code page 37.)

Display Control
---------------
The following options are controlled from the Options/Display
Options dialog:

  * You can specify which of the following windows will be
    displayed:
                 - the stack window
                 - the flags window
                 - the "views" window

  * Within the "views" windows you can select which of the
    following views of the data entry register are displayed:

                 - hexadecimal
                 - decimal
                 - octal
                 - binary
                 - ASCII/ISO
                 - EBCDIC

    Any combination, including none or all, can be selected.
    the combination of currently selected views is the "view
    set".

  * You can specify whether you want leading zeros to be
    displayed. Leading zeros are displayed for hexadecimal,
    octal and binary displays only. Decimal number displays
    never show leading zeros.

    Example: with a wordsize of 32, the hexadecimal number
    "539C0" would be displayed as "000539C0" if the "leading
    zeros" option is set.

  * You can specify whether to use "dotted decimal" notation.
    Dotted decimal notation is the method used to represent IP
    addresses. Each byte is represented by a decimal number from
    0 to 255, and separated from adjacent bytes by a period.
    If you have selected dotted decimal notation, then that
    notation is used for number entry as well as display if
    the prevailing base is decimal.

    Example: In dotted decimal notation, the decimal number
    2602775400 is displayed as "155.35.51.104".


  * You can specify whether to separate numbers into
    groups of digits, for readability. If you select this
    option, hexadecimal, octal and binary numbers are displayed
    in groups of 4, and decimal numbers are displayed in groups
    of 3.

    Example: with digit grouping specified, the hexadecimal
    number 7A9C40024B35480 would be displayed as 
    7A9 C400 24B3 5480.


Note that there is not enough room on the display for all
windows and all views at the same time. However, the Overflow
and Carry flags will be shown on the status line if the flags
window is not displayed.

The windows are always displayed in the order (from the top of
the screen to the bottom): Flags, Stack, Views.

When very large numbers are displayed in binary
or with a pending algebraic operation on the calc line,
they may not fit the display. In this case,
the display of the number will contain an arrow at the left or
right end of the number, to indicate digits that are not
displayed. To see the most-significant (leftmost) digits under
these conditions, press the [HOME] ([Fn]+left-arrow) key; to
see the least-significant (rightmost) digits, press the [END]
([Fn]+right-arrow) key.

The .ENV File
-------------
The settings you select are recorded in the file CMCALC.ENV,
which is stored in the _DAT subdirectory on the C: drive.  Each
time you start CMCalc, the settings which were in effect the
last time CMCalc was used are restored from this file.  (The
contents of the stack, the storage registers, the overflow and
carry flags, and the current F-key set are also restored.)


The CMCalc Menu Selections
--------------------------
The menu functions are summarized below.


MENU/File
  /New       --  not used
  /Open      --  not used
  /Save      --  not used
  /Exit      --  exits CMCalc

MENU/Edit
  /Insert    --  not used
  /Delete    --  not used
  /Cut       --  not used
  /Copy      --  copies the number in the X register, formatted
                 in the prevailing base and display options, to
                 the clipboard
  /Paste     --  pastes a character-formatted number from the
                  clipboard into the X register

MENU/Clear
  /Flags     --  zeros the Carry and Overflow flags
  /Stack     --  zeros all stack registers and the data entry
                 register
  /Registers --  zeros all storage registers 0-9 and A-F
  /Calc Line --  zeros the data entry register

MENU/Options
  /Number format...       --  controls the prevailing base, the
                              complement mode and the wordsize
  /Calculator Modes...     --  controls the data entry mode (i.e.
                              algebraic or RPN), and the charac-
                              ter code used in character entry
                              mode
  /Display Options...     --  controls what information is
                              displayed, and in what format

MENU/Quit                 --  ends CMCalc

MENU/Help
  /Using CMCalc...        --  displays a help screen which
                              provides information about how to
                              use CMCalc
  /Controlling CMCalc...  --  displays a help screen which
                              provides information about how to
                              control the features of CMCalc
  /About CMCalc...        --  provides version and contact info
  /Registering CMCalc...  --  provides registration information


---                         ---
---  Number Representation  ---
---                         ---

Unsigned
--------
In unsigned representation, all bits of the word are used to
represent the integer magnitude of the word. No provision is made
for the representation of negative values. The smallest value
that can be represented is 0.

One's Complement
----------------
In one's complement representation, the leftmost bit of a number
represents the sign of the number. When the leftmost bit is 0,
the number is positive; when it is 1, the number is negative.
The remaining bits of the number represent the magnitude
(absolute value) of the number. For positive numbers, the
remaining bits are interpreted as-is; for negative numbers, the
complement (or logical NOT) of the remaining bits represent the
value of the magnitude. So, with a wordsize of 16, the decimal
number 456 is represented in hexadecimal as 1C8. The number -456
is FE37:
                   456                   -456   [decimal]
                   1C8                   FE37   [hexadecimal]
   0000 0001 1100 1000    1111 1110 1100 0111   [binary]

This has the consequence that a representation of negative zero
exists, namely when all bits are set to 1:

                    +0                     -0   [decimal]
                     0                   FFFF   [hexadecimal]
   0000 0000 0000 0000    1111 1111 1111 1111   [binary]

In one's complement representation, when a carry occurs out of
the most-significant bit during addition, 1 must be added to
the result; and when a borrow occurs into the MSB during
subtraction, 1 must be subtracted from the result. This is
because when the boundary between positive and negative is
passed, there are two representations of zero to account for.

Two's Complement
----------------
Two's complement is the most common number representation,
because results are computed exactly as they are for unsigned,
and because you don't have to deal with the concept of negative
zero.

In two's complement representation, the MSB represents the sign,
as in one's complement mode. Positive numbers are represented by
the remaining bits. Negative numbers are represented by the
complement of the remaining bits.


---             ---
---  Functions  ---
---             ---

In the following descriptions, upper case X, Y, Z and T refer
to the stack registers, lower case x, y, z and t refer to the
values contained in the corresponding stack registers.  No stack
movement occurs unless explicitly stated.  The Carry and
Overflow flags are unaffected unless stated otherwise.

When operating in algebraic mode, "x" refers to the first (or
only) operand; "y" refers to the second operand; and "X" refers
to the calc line.

The Carry Flag
--------------
The Carry flag is usually used to indicate the value of a bit in
the result which could not be accommodated in the current word-
size, for example, a carry during addition, a borrow during
subtraction, or a bit shifted out of a register during a shift
function. 

The Carry flag is affected by the following operations:

     SLn SRn         (any of the bits shifted out was = 1)
     SL RL RLC       (if the MSB of the operand == 1)
     RLn RLCn        (if bit (1+wordsize-n) of the operand == 1)
     SR RR RRC ASR   (if the LSB of the operand == 1)
     RRn RRCn        (if bit n-1 of the operand == 1)
     +               (carry)
     -               (borrow)
     /               (nonzero remainder)


The Overflow Flag
-----------------
The Overflow flag is used to indicate that the result could not
be expressed within the current wordsize and complement mode.
For example, if the wordsize is 8 and the complement mode is 2's
complement, then the largest positive number which can be
expressed is 127, and the largest negative number which can be
expressed is -128.  If the CHS (change sign) function is applied
to -128, then the Overflow flag will be set, since +128 cannot
be expressed in 8 bits.

The following functions affect the Overflow flag:

     +  -  *  /  ABS   CHS

When an overflow occurs, the lower n bits (where n is the current
wordsize) of the result is returned. For multiply and divide, if
the current number representation is 1's or 2's complement, the
sign bit will represent the sign of the correct result.


Bit Numbering
-------------
Bits are numbered from the least-significant, or rightmost bit
to the most significant, or leftmost bit, starting with 0.
So with a wordsize of 16, the decimal number 23456 would be
represented as:

   Bit number: 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
    Bit value:  0  1  0  1  1  0  1  1  1  0  1  0  0  0  0  0

Some functions (the ones which refer to bit positions) use the
absolute (positive) value of x.  This is indicated by the
notation |x|.

As with the HP 200 built-in calculator, many functions are
assigned to F-keys, which are labeled on the bottom of the
display.  Four groups of functions are available, and the
different groups are accessed by pressing F10 (labeled 'More').
In the following descriptions, functions which are assigned to
F-keys carry the notation '[Fkey]'.

The examples in following sections are shown in algebraic
style. If you prefer RPN, the first operand is always in Y and
the second is always in X.


--------------------
ARITHMETIC FUNCTIONS
--------------------
For all the arithmetic operations, the Overflow flag is set when
the result of the operation cannot be represented in the current
wordsize and complement mode. For example, if the wordsize is 16
and the number representation mode is 2's complement, the result
of 32760 + 8 would be greater than 32767, which is the largest
positive number that can be represented in that mode (the MSB is
used to indicate sign). In this case, the Overflow flag is set.
For division, the Overflow flag is set only when the largest
possible magnitude negative number is divided by -1.

+        Add -- [+]
         Returns the sum of two integers. The Carry flag is set
         if a carry was generated out of the MSB.

-        Subtract -- [-]
         Returns the difference between two integers. The Carry
         flag is set if a borrow occurs into the MSB.

*        Multiply -- [*]
         Returns the product of two integers. The Carry flags is
         not affected.

/        Divide -- [/]
         Returns the integer quotient from division; the
         remainder is discarded.  The Carry flag is set if there
         is a nonzero remainder, otherwise it is cleared. The
         function is inhibited and an error message is displayed
         if the divisor is 0 or -0.

RMD      Remainder -- [%] or (Fkey)
         Returns the remainder from division; the quotient is
         discarded. The Carry flag is unaffected. The function
         is inhibited and an error message is displayed if the
         divisor is 0 or -0.

ABS      Absolute value -- (Fkey)
         Returns the magnitude of a signed integer. If the 
         operand is negative (this can only be true if the
         complement mode is not unsigned) then it is made
         positive, if possible, and the result is returned, and
         Overflow is reset.  If it is not possible to make the
         operand positive (i.e. the complement mode is 2's
         complement, and the operand is the largest possible 
         negative number), then the operand remains unchanged
         and the Overflow flag is set.

CHS      Change Sign -- (assigned to the [L] key)
         Returns the complement of the operand.  Carry and
         Overflow are set as appropriate for the complement
         mode.  The function is inhibited and an error message
         is displayed in unsigned mode.
         
-----------------------
BOOLEAN LOGIC FUNCTIONS
-----------------------

AND      Bitwise AND -- [&] or (Fkey)
         Returns the result of a bitwise logical AND.

         Example:       34 AND       F0 =       30   [hex]
                  00110001 AND 11110000 = 00110000   [bin]


OR       Bitwise OR -- [|] or (Fkey)
         Returns the result of a bitwise logical OR.

         Example:       81 OR       C0 =       C1   [hex]
                  10000001 OR 11000000 = 11000001   [bin]


XOR      Bitwise Exclusive OR -- [^] or (Fkey)
         Returns the result of a bitwise logical exclusive OR.

         Example:       34 XOR       F0 =       C4   [hex]
                  00110100 XOR 11110000 = 11000100   [bin]


NOT      Bitwise NOT -- [~] or (Fkey)
         Returns the result of a bitwise logical NOT.

         Example:       CA NOT =       35   [hex]
                  11001010 NOT = 00110101   [bin]


--------------------------
BIT-MANIPULATION FUNCTIONS
--------------------------

MASKL    Mask left -- (Fkey)
         A bit mask of the size specified by the absolute value
         of the operand is returned in the leftmost positions
         of the result.

         Example:   5 MASKL = F8         [hex, wordsize=8]
                  101 MASKL = 11111000   [bin, wordsize=8]

MASKR    Mask right -- (Fkey)
         A bit mask of the size specified by the absolute value
         of the operand is returned in the rightmost positions
         of the result.

         Example:   5 MASKR =    1F   [hex]
                  101 MASKR = 11111   [bin]


SB       Set bit -- (Fkey)
         The first operand is returned, with the bit specified by
         the absolute value of the second operand set to 1.

         Example:        60 SB 0 =       61   [hex]
                   01100000 SB 0 = 01100001   [bin]


CB       Clear bit -- (Fkey)
         The first operand is returned, with the bit specified by
         the absolute value of the second operand set to 0.

         Example:       45 CB  2 =       41   [hex]
                  01000101 CB 10 = 01000001   [bin]


REV      Reverse bit order -- (Fkey)
         The order of the bits in the operand is reversed.

         Example:       45 REV =       A2   [hex, wordsize=8]
                  01000101 REV = 10100010   [bin, wordsize=8]


REVBYTE  Reverse byte order -- (Fkey)
         The order of the bytes in x is reversed, the result is
         returned in X.  REVB is only valid when the word size
         is an integral number of bytes (in other words, a
         multiple of 8).

         Example: 123456 REVBYTE = 56341200   [hex, wordsize=32]


BITS     Bit count -- (Fkey)
         The number of 1-bits in x is returned in X.

         Example:             432A BITS =   6   [hex]
                  0100001100101010 BITS = 110   [bin]
                   ^    ^^  ^ ^ ^

--------------------------
SHIFT AND ROTATE FUNCTIONS
--------------------------

SL       Shift left -- (Fkey) or (Left-arrow key)
         x is shifted to the left by one position, a zero bit is
         introduced into the rightmost bit position, and the
         result is returned in X. The Carry flag is set to the
         value of the leftmost bit of x.

                  +---+     +----------------+
                  |   | <-- |     <-----     | <-- 0
                  +---+     +----------------+
                  Carry

SR       Shift right -- (Fkey) or (Right-arrow key)
         x is shifted to the right by one position, a zero bit
         is introduced into the leftmost bit position, and the
         result is returned in X. The Carry flag is set to the
         value of the rightmost bit of x.
 
                        +----------------+     +---+
                  0 --> |     ----->     | --> |   |
                        +----------------+     +---+
                                               Carry

SLn      Shift left multiple -- (Fkey)
         y is shifted to the left by the number of positions
         specified by |x|, zero bits are introduced into the
         vacated rightmost bit positions, the result is
         returned in X.  The stack drops.  The Carry flag is
         set to the value of the last bit to be shifted from the
         leftmost position of y.

SRn      Shift right multiple -- (Fkey)
         y is shifted to the right by the number of positions
         specified by |x|, zero bits are introduced into the
         vacated leftmost bit positions, the result is returned
         in X.  The stack drops.  The Carry flag is set to the
         value of the last bit to be shifted from the rightmost
         position of y.

ASR      Arithmetic shift right -- (Fkey)
         x is shifted to the right by one position, the leftmost
         bit (which, in 1's complement and 2's complement mode,
         represents the sign of the value of x) retains its
         original value (and therefore the sign), the result is
         returned in X.  The Carry flag is set to the value of
         the leftmost bit of x.

                   +------+
                   |      |
                   |    +----------------+     +---+
                   +--> |     ----->     | --> |   |
                        +----------------+     +---+
                                               Carry

LJ       Left justify -- (Fkey)
         If x<0, then x is shifted left until the leftmost bit
         contains a one bit.  The result is returned to Y.  The
         number of shifts performed is returned in X.  The stack
         is lifted.  If x=0, the stack is lifted and X and Y are
         set to 0.

RL       Rotate left -- (Fkey)
         x is shifted left by one position, the value of the
         leftmost bit is returned in the rightmost bit position,
         and also in the Carry flag. The result is returned in
         X.

                         +--------------------------+
               +---+     |    +----------------+    |
               |   | <---+--- |     <-----     | <--+
               +---+          +----------------+
               Carry

RR       Rotate right -- (Fkey)
         x is shifted right by one position, the value of the
         rightmost bit is returned in the leftmost bit position,
         and also in the Carry flag.  The result is returned in
         X.

                    +--------------------------+
                    |    +----------------+    |     +---+
                    +--> |     ----->     | ---+---> |   |
                         +----------------+          +---+
                                                     Carry

RLn      Rotate left multiple -- (Fkey)
         y is shifted left by |x| positions, and as each bit is
         shifted out of the leftmost bit position, it is
         introduced into the rightmost bit position, and into
         the Carry flag.  The result is returned in X. The stack
         drops.

RRn      Rotate right multiple -- (Fkey)
         y is shifted right by |x| positions, and as each bit is
         shifted out of the rightmost bit position, it is
         introduced into the leftmost bit position, and into the
         Carry flag.  The result is returned in X. The stack
         drops.

RLC      Rotate left through carry -- (Fkey)
         x is shifted left one position, the value of the Carry
         flag is introduced into the vacated rightmost bit
         position, and the Carry flag is set to the value of the
         bit shifted out of the leftmost position.

               +------------------------------------+
               |    +---+     +----------------+    |
               +--- |   | <-- |     <-----     | <--+
                    +---+     +----------------+
                    Carry

RRC      Rotate right through carry -- (Fkey)
         x is shifted right one position, the value of the Carry
         flag is introduced into the vacated leftmost bit
         position, and the Carry flag is set to the value of the
         bit shifted out of the rightmost position.

               +------------------------------------+
               |    +---+     +----------------+    |
               +--> |   | --> |     ----->     | ---+
                    +---+     +----------------+
                    Carry

RLCn     Rotate Left through Carry multiple -- (Fkey)
         y is shifted left by |x| positions, and at each shift,
         the rightmost bit position receives the value of the
         Carry bit, and the Carry bit receives the value of the
         bit shifted out of the leftmost position. The result is
         placed in X.  The stack drops.

RRCn     Rotate Right through Carry multiple -- (Fkey)
         y is shifted right by |x| positions, and at each shift,
         the leftmost bit position receives the value of the
         Carry bit, and the Carry bit receives the value of the
         bit shifted out of the rightmost position. The result
         is placed in X.  The stack drops.

------------------------
STACK CONTROL OPERATIONS
------------------------

Rv       Roll Down -- (assigned to the [V] key)
         The contents of each stack register is shifted into the
         next lower register, and x is shifted into T.

R^       Roll Up -- (assigned to the [Shift][V] key)
         The contents of each stack register is shifted into the
         next higher register, and t is shifted into X.

x<>y     Exchange X and Y -- (assigned to the [X] key)
         The contents of the X and Y registers are exchanged.

----------------------------
NUMBER STORAGE AND RETRIEVAL
----------------------------

STO      Store -- (assigned to the [N] key)
         The calculator waits for a register specifier - a
         digit key (0..9) or A..F; when a register has been
         specified, x is stored into that register.  The value
         may later be recalled to X by pressing RCL and the same
         register specifier.  x remains in X.  The STO operation
         may be canceled before specifying a register, by
         pressing ESC.

RCL      Recall -- (assigned to the [M] key)
         As with STO, RCL must be followed by a register
         specifier.  The stack is lifted and the value last
         stored into the specified register is placed into X.
         The value remains in the specified register.  The RCL
         operation may be canceled before specifying a register
         by pressing ESC.

RCL L    Last X -- (Press the [M] (RCL) key, followed by [L])
         Returns to X the value which was in X prior to the last
         function.

------------
NUMBER ENTRY
------------

0..9     Digits -- Used to enter numbers.  The letters A through
A..F     F are used for digit entry in hexadecimal mode.

.        When the prevailing base is decimal, and dotted decimal
         mode is enabled, the period can be used in digit entry
         to indicate byte boundaries.

" or ,   Activates character entry mode. In character entry
         mode, the character value (interpreted as either
         ASCII/ISO or EBCDIC, depending on the current character
         code setting) of each keypress is appended to x. Note
         that in character entry mode, bits are allowed to shift
         out of the left side of X: in numeric entry mode, this
         loss of bits is disallowed. To terminate character
         entry mode, press ENTER or ESC. Functions which are
         normally invoked with a character key (such as +, *,
         STO, RCL, etc.) are not accessible until character
         entry mode is terminated. Selection of ASCII/ISO or
         EBCDIC character codes is done in the Options/
         Calculator Mode dialog.

ENTER    Enter -- [ENTER]
         Copies x into Y, and disables stack lift.  If numeric
         or character entry mode is active, it is terminated.
         The space bar and the equal key ('=') may also be used
         for this function (except when in character entry
         mode).

<--      Backspace -- (assigned to the backarrow key)
         When numeric (or character) entry mode is active (the
         cursor is displayed on the entry line) the last digit
         (or character) entered is deleted.  If no digits
         remain, entry mode is terminated.  When entry mode is
         not active, the X register is set to zero, and stack
         lift is disabled.

DEL      Clear X -- [DEL]
         The value of X is set to zero. Stack lift is disabled.


---                  ---
---  Error Messages  ---
---                  ---

Can't divide by 0
    A divide (/) or RMD function was attempted when the divisor
    was 0 or (in 1's complement mode) -0.  Division by 0 is
    undefined.

Can't divide 0 by 0
    A divide (/) or RMD function was attempted when both the
    divisor and the dividend were 0 or (in 1's complement mode)
    -0.  Division by 0 is undefined.

Exceeds current word size
    A mask (MASKL or MASKR), bit-addressing (SB or CB), shift
    multiple (SLn or SRn), or rotate multiple (RLn or RRn)
    function was attempted and |x| was greater than the
    currently selected word size; or a rotate through carry
    multiple (RLCn or RRCn) function was attempted and |x| was
    greater than the currently selected word size + 1.

Current mode is unsigned
    You attempted to change the sign (using CHS) of a number,
    but the currently selected number representation mode is
    unsigned.  A negative number cannot be expressed in unsigned
    mode.  The currently selected number representation mode is
    displayed at the top of the screen in the mode display area.
    You can change the number representation mode by pressing 
    MENU O, N, and then pressing the first character of the 
    desired complement mode.

Word size not byte integral
    REVB (reverse bytes) was attempted when the word size was
    set to a size which is not a multiple of 8 (the size of a
    byte).  REVB can only be performed when the word size is set
    to 8 (in which case REVB has no effect), 16, 24, 32, 40, 48,
    56 or 64. The current word size is displayed at the top of 
    the display in the mode display area.  You can change the
    word size when the Number Format dialog is active by pressing 
    W, and then pressing the up- or down-arrow keys until the 
    desired wordsize is displayed, and then pressing F10 (OK).


---                                  ---
---  The HP 200 Calculator Paradigm  ---
---                                  ---

I have tried to make CMCalc adhere to the HP 200 calculator
paradigm, but there are some exceptions:

  * In algebraic entry mode, there is no operator precedence,
    and operation grouping by parentheses is not allowed.
  * CMCalc uses the "large" font instead of the "extra-large"
    font on the calc line
  * Help information is presented in dialog-style windows
    instead of via the built-in help system
  * STO @ and RCL @ are not supported
  * STO arithmetic is not supported
  * Shift-V performs roll-up
  * Square root and inverse are omitted

Since the "B" and "C" keys are used for entering hexadecimal
numbers, they are unavailable for the standard LAST and x<>y
functions.  Therefore...

  * LAST is obtained by RCL L
  * x<>y is assigned to the X key


---                                 ---
---  CMCalc Compared to the HP-16C  ---
---                                 ---

For those familiar with the HP-16C, CMCalc does not provide
programmability, and omits functions directly related to
programmability (there is no indirect register, no x?y or x?0
comparisons, no flag manipulation functions, and no bit test
(B?) function).  CMCalc also omits floating-point mode, and the
square root function, since these are available in the built-in
HP 100 calculator.  The three DBL functions have been omitted.
Whereas the HP-16C had a variable number of storage registers,
CMCalc has a fixed set of 16 registers: 0..9 and A..F.  The
HP-16C allows you to perform CHS when the complement mode is
set to unsigned: CMCalc does not.


---                   ---
---  Version History  ---
---                   ---

The first released version of CMCalc was version 16.

Version 17 introduced the following changes:
  * The number base can be changed by pressing the UP and DOWN
    arrow keys.
  * The INV (invert bit order) function was renamed REV
    (reverse bit order.)
  * The REVB (reverse byte order) function was added.
  * The stack display can, as an option, be replaced with the
    SHOW display.
  * Character code was added to the SHOW display.
  * In support of the character code display, the option of
    selecting the ASCII or EBCDIC character code was added.
  * The selected number base is always displayed.  In version
    16, if the currently selected number base was decimal, no
    indication was displayed on the status line.
  * The status display (MENU Status) no longer displays the
    selected base, since it now always appears on the status
    line.  The selected character code was added to the status
    display.
  * The active F-key set is remembered in the CMCALC.ENV file.
  * The space bar can be used to perform the same function as
    the ENTER key.
  * A display bug (leftover junk when an alarm window was
    displayed on top of the CMCalc display) was fixed.
  * The overflow flag is now set correctly during
    multiplication.
  * The most-significant-bit is now set correctly during
    multiplication.
  * Due to a bug in the HP 95 ROMs, task-switching between
    applications which have "fixups" can sometimes cause
    problems of a completely unpredictable nature.  CMCalc is
    now free of fixups (thanks to Craig Finseth for the
    technique).

Version 18 was a complete re-engineering of CMCalc to conform
to the HP 100 calculator paradigm. Numerous changes were made,
including:

  * A complete re-design of the display, so that both the X
    register in all number bases, and the stack can be shown at
    all times.
  * Allowed user configuration of the display.
  * Added "dotted decimal" display option.
  * Added CUT and PASTE operations.
  * Added character entry mode.

Version 18a was a re-build of version 18 with changed link
options, which significantly reduced memory requirements.

Version 19 introduced the following changes:

  * Word sizes up to 64 bits are now supported.
  * In support of display of very long binary numbers, the
    HOME and END keys now select which end of a number to
    show when the entire number will not fit on a line.
  * Algebraic entry mode is supported, though with operator
    precedence and without parentheses.
  * The digit grouping option was added.
  * The concept of a "view set" was added. A view set is
    the set of number bases currently selected in the
    "Views" window. Pressing the up- and down-arrow keys
    cycles the current number base through the bases in
    the current view set.
  * The help system was revised and the "help" windows
    were made scrollable.
  * Several functions were made accessible on keys
    additional to their function-key assignments. 
    Boolean functions were assigned to their C-language
    operator characters (&, |, ^, and ~); remainder was
    assigned to its C-language operator, %; and shift
    -left and shift-right were assigned to the left and
    right arrow keys.
  * The current modes (wordsize, complement mode, and
    character code) are always displayed at the top of 
    the screen.

Version 19b was a minor rebuild and documentation change to
make CMCalc freeware.


Eugene Dorr
e-mail: edorr@pobox.com

===============================================================
====   CMCalc  -  Computer Math Calculator  -  Version 19b  ===
===============================================================
