home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 3: The Continuation / 17-Bit_The_Continuation_Disc.iso / files / nz27.dms / nz27.adf / Cal / Readme < prev    next >
Text File  |  1993-12-03  |  3KB  |  109 lines

  1. CAL by Steve Martin, NZAmigaUG (Wellington)
  2.  
  3. Copyright:     I am responsible for nothing and people can do what they want
  4.         with this program except to sell it.
  5.  
  6. Any bugs or sugestion concerning this progam please let me know.  My address
  7. is:
  8.  
  9.     56 Colchester Cres
  10.     Newlands
  11.     Wellington
  12.  
  13.     Ph 783366
  14.  
  15. This program was produced in the course of trying to get a little piece of
  16. paper (NZCE).  It is written in 68000 assembler and only runs from cli.
  17.  
  18. The purpose of this program is to add, subtract, multiply or divide two
  19. numbers.  To use the program you have to be in a cli window and the following
  20. command line format is used:
  21.  
  22.     CAL <base> number operator <base> number <=> [return]
  23.  
  24.     < > indicates an optional parameter
  25.     [ ] indicates a key
  26.  
  27.     <base>    The number system used for the number following.
  28.         The following bses and their symbols are used:
  29.  
  30.             $    Hexadecimel number
  31.             @    Octal number
  32.             %    Binary number
  33.             Omitted    Decimal number
  34.  
  35.  
  36.     number    The variables which the calculation is to be performed on.
  37.         When entering HEX, OCT, BIN numbers, bit 32 is used to
  38.         indicate the sign of the number.  For decimal numbers the
  39.         "-" character is used.
  40.  
  41.         NOTE:    The number must be a 32 bit interger, float numbers 
  42.             cannot be processed. 
  43.  
  44.  
  45.     Operator The math operation to be performed on the two variables.
  46.          The following math operations can be performed:
  47.  
  48.             + Addition
  49.             - Subtraction
  50.             * Multiplaction
  51.             / division
  52.  
  53.     <=>    The equal operator is optional and is used to indicate the 
  54.         end of the second variable.
  55.  
  56.     [return] The return key.
  57.  
  58.  
  59. NOTE:    If no input, a guide to the operation of the CAL program is output.
  60.  
  61.  
  62.  
  63. OUTPUT
  64.  
  65. The output of the program gives the equation plus the result in all four
  66. number systems used.
  67.  
  68. When the two numbers are multiplied the result can be a signed 32 bit number
  69. or a signed 64 bit number.
  70.  
  71. When the variables are divided the result is output in the following format:
  72.  
  73.     Quotient + Remainder.
  74.  
  75. There several error messages to indicate a mistake in the input.
  76.  
  77. 1. Error in operator: Output if:
  78.  
  79.             a. A "-" character has been entered for a HEX, OCT or
  80.                BIN number.
  81.  
  82.             b. A character that was not *, +, * or / was entered
  83.                where an operator was expected.
  84.  
  85.  
  86. 2. Error in hexadecimel number
  87. 3. Error in octal number
  88. 4. Error in binary number
  89. 5. Error in decimal number
  90.  
  91. 2, 3, 4, and 5 are output if;
  92.  
  93.     a. A character that does not represent a digit in that number system
  94.        was entered.
  95.  
  96.     b. The number entered is too large for the program to handle.
  97.  
  98. 6. Overflow occurred in addition, numbers are too large
  99.  
  100.     Is output if the result of the addition of the variables is greater
  101.     than the largest positive and negative numbers the program can
  102.     handle.
  103.  
  104. 7. Overflow occurred in subraction, numbers are too large
  105.  
  106.     Is output if the result of the subtraction of the variables is
  107.     greater than the largest positive and negative numbers the program
  108.     can handle.
  109.