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 >
Wrap
Text File
|
1993-12-03
|
3KB
|
109 lines
CAL by Steve Martin, NZAmigaUG (Wellington)
Copyright: I am responsible for nothing and people can do what they want
with this program except to sell it.
Any bugs or sugestion concerning this progam please let me know. My address
is:
56 Colchester Cres
Newlands
Wellington
Ph 783366
This program was produced in the course of trying to get a little piece of
paper (NZCE). It is written in 68000 assembler and only runs from cli.
The purpose of this program is to add, subtract, multiply or divide two
numbers. To use the program you have to be in a cli window and the following
command line format is used:
CAL <base> number operator <base> number <=> [return]
< > indicates an optional parameter
[ ] indicates a key
<base> The number system used for the number following.
The following bses and their symbols are used:
$ Hexadecimel number
@ Octal number
% Binary number
Omitted Decimal number
number The variables which the calculation is to be performed on.
When entering HEX, OCT, BIN numbers, bit 32 is used to
indicate the sign of the number. For decimal numbers the
"-" character is used.
NOTE: The number must be a 32 bit interger, float numbers
cannot be processed.
Operator The math operation to be performed on the two variables.
The following math operations can be performed:
+ Addition
- Subtraction
* Multiplaction
/ division
<=> The equal operator is optional and is used to indicate the
end of the second variable.
[return] The return key.
NOTE: If no input, a guide to the operation of the CAL program is output.
OUTPUT
The output of the program gives the equation plus the result in all four
number systems used.
When the two numbers are multiplied the result can be a signed 32 bit number
or a signed 64 bit number.
When the variables are divided the result is output in the following format:
Quotient + Remainder.
There several error messages to indicate a mistake in the input.
1. Error in operator: Output if:
a. A "-" character has been entered for a HEX, OCT or
BIN number.
b. A character that was not *, +, * or / was entered
where an operator was expected.
2. Error in hexadecimel number
3. Error in octal number
4. Error in binary number
5. Error in decimal number
2, 3, 4, and 5 are output if;
a. A character that does not represent a digit in that number system
was entered.
b. The number entered is too large for the program to handle.
6. Overflow occurred in addition, numbers are too large
Is output if the result of the addition of the variables is greater
than the largest positive and negative numbers the program can
handle.
7. Overflow occurred in subraction, numbers are too large
Is output if the result of the subtraction of the variables is
greater than the largest positive and negative numbers the program
can handle.