home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast2.iso
/
handicap
/
bcdemo.zip
/
BCDEMO.DOC
next >
Wrap
Text File
|
1990-02-25
|
43KB
|
821 lines
BigCalc Copyright (c) 1990 Charles L. Broome
WHAT IT IS
==========
BigCalc is my first pass at a scientific-calculator program for
computer users who are blind or visually impaired. There are actually
three different BigCalc programs, all with the same calculator
engine. One program has a large-character display that should be
about three inches high in the typical CGA monitor, one is tailored
for Braille Terminals, and one for Voice Synthesizers. Each version
has been optimized a little for it's particular mode of use.
All of the programs together, plus the regular manual, would come
to about 300 kilobytes, which would take forever for someone to
download. So for demo purposes I've resurrected this earlier version
of the program which was written back when I was trying to make one
program handle all three modes. Although the program was a bit rough
back then and it's output isn't ideal in any one mode, overall it
provides a good demonstration of the final BigCalc program.
The demo version intentionally only does three of the four basic
arithmetic operations - it adds, subtracts, and multiplies, but it
doesn't divide. All of its other fucntions are fully implemented.
The functions performed include about 20 of the usual trigonometric
and other transcendental functions, plus a percent key and 26 storage
registers that are saved to disk. Most keys identify themselves when
pressed and are subsequently selected using the ENTER key, which
makes it easy to "hunt" for the right function.
Parentheses levels are theoretically supported to about 50 levels -
I got bored on the 15th level and so haven't tested this feature
farther than that.
A variety of options are offered for displaying numbers in normal,
scientific, or Engineering modes, with or without commas every three
digits, and of course for controlling how many digits are displayed.
Computations are carried out to 15 decimal places and then are
rounded down to twelve. The calculator can display up to 12 digits
and can handle exponents between ten to the two-hundred ninety-ninth
power and ten to the minus-two-hundred-ninety-ninth.
A tracking feature automatically saves a "list" of your operations
and their results to a standard text file on-disk, and one key allows
you to add short notes to describe what your various results
represent.
Most keys are user-configurable through a separate configuration
mode, and for those who use the large-letter mode the screen colors
are also configurable.
The large-letter mode currently works only on systems with CGA or
EGA video cards, but I expect to have a version finished shortly that
will also work on Hercules Graphics systems. The calculator works
nicely in the 80 or 40 column modes. The full version offers an
additional 20-column large-letter mode. This demo version's
large-letter mode gives you three lines of ten columns.
If there's enough interest to justify the effort - meaning if this
program generates enough income to pay the bills for three weeks
while I accomplish the task - I intend to turn this into a
programmable calculator eventually. Early customers - even those who
get the program at the $15 price - will of course get that upgrade
either for free or for no more than $5 when and if that time comes.
ORDER INFORMATION
=================
BigCalc's regular price will be $25, but as usual I'm offering an
introductory price just to get things off the ground fast. If your
order is postmarked no later than March 15, 1989, you can have the
program for $15. That price includes a manual on cassette, all
shipping, handling, taxes, and one free update if any major bugs show
up. Further upgrades are guaranteed to cost no more than $5 each.
Copies may be ordered be sending a check or money order made out to
Charles Broome to the following address: Charles L. Broome, P.O. Box
2270, RockPort, Texas 78382
Although I'll be happy to answer any questions you might have, I'm
not set up for credit-card services. At my low prices, I also must
charge extra to cover COD or other special orders and of course cannot
accept collect calls. You can generally reach me any day of the week
during reasonable hours at (512) 729-1188.
A better manual accompanies the full program, but as mentioned
earlier I want to keep this file as small as possible to encourage it
to be passed from BBS to BBS, so the rest of this manual is just a
quick, informal run through the BigCalc demo program's features and
just intended to give you a feel for how the full program functions.
RUNNING THE PROGRAM
===================
Unless you've gotten this program directly from me, the first thing
we need to do is to get it into a known state of configuration.
Unless you're running a DOS version 3.0 or above, it's absolutely
essential that the program be named "BCDEMO.EXE", otherwise the
configuration steps we're about to go through won't work.
Simply log onto the drive and directory containing the program, be
sure the disk isn't write-protected, and at the DOS prompt type
"BCDEMO /reset". The program will then change all user-configurable
options back to their default values and exit to DOS.
If you're doing this demo on a hard-disk drive and are running a
DOS version earlier than 3.0, then next you should type "BCDEMO
/path". This will cause the program to read in the current path and
save it, so that the program will always know where to find itself
when you change the configuration. Otherwise you'll always have to
log into the same directory with the program when doing these
configuration steps or the program can't self-modify.
Once the path is installed, BigCalc will exit to DOS again. If you
later change your mind, you can repeat the procedure to install a
different path, or use "BCDEMO /nopath" to "unsave" the path.
Now we're ready to go. If using a braille terminal, it should be
unlocked from the cursor. All output will be to the "HOME" position
of the screen - that is, line 1, column 1. Voice synthesizers should
be placed in their "automatic output" mode so they automatically
speak any changes to the screen. The large-letter mode will NOT work
in conjunction with a braille terminal or voice synthesizer, so if
using either you should run the program in it's normal mode. At the
DOS prompt, simply type "BCDEMO" and press the ENTER key to run the
program. You'll be presented with an abbreviated copyright message,
and after pressing any key (the spacebar works nicely) the calculator
will be ready to use.
If you have a CGA system and want to run the program in it's
large-letter mode, then at the DOS prompt instead of typing just
"BCDEMO" type "BCDEMO /BIG" and press the ENTER key. You can use the
shifted arrow keys on the numeric keypad to adjust foreground and
background colors to your liking. When you exit the program, those
colors will be saved to a file either in the current directory or in
the installed path, called "BIGCALC.REG". All 26 registers will also
be written to that file. If you run the program from the same
directory later, then both the registers and the colors that you
chose will be automatically restored from that file.
BigCalc also works nicely in the 40 column modes. Use the DOS MODE
command to switch into the desired mode.
If you are using a 20-column braille terminal, the number display
will always be shown and will fit exactly into the 20 columns, but
some messages may "spill" over to the right and you'll have to move
over once to read all of them. So that you woon't have to search for
the frequently-appearing "READY" prompt about which I'll speak later,
that prompt is always accompanied by a brief, high-pitched chirp.
It's very important to remember that the only way out of BigCalc is
with Control-C. This will work at any time, in the middle of
anything. Exiting the program will cause two files to be saved to
disk. Those will be "BCDEMO.LST" and "BCDEMO.REG", which store the
trace listing and register values, respectively.
BCDEMO.LST is a simple text file that you can read or modify with
your word-processor and will ALWAYS be saved to the current
directory. If a file from a previous session is already stored there,
then this latest information will be tacked onto the end of it. Most
lines will be about 30 columns long at most.
BCDEMO.REG will be saved either to the current directory or to the
path saved via the "/path" configuration command that we used above.
This is a critical file that you shoud under no circumstances attempt
to read, edit, or modify. If you think the file might have been
corrupted, just delete it. If the file IS deleted, then all register
contents and any color customizing you might have done will be lost,
but not other harm will be done.
BigCalc also allows you to customize the keyboard, and we'll cover
that configuration proceduare at the end of the manual.
INITIAL DEFINITIONS
===================
To simplify things, let's start with a few definitions. A FUNCTION
key is one that requires a single value to operate on and that
returns a single value. For example, the key to "square" a value. On
the other hand, a BINOP key requires two values to operate on and
returns a single value. The familiar operations of adding,
subtracting, multiplying, and dividing are BINOPS, which is my slang
term for "binary operations". A percent function is also a BINOP -
you feed it two values, and it tells you what percentage one is of
the other. The calculator also raises Y to the Xth power - again a
BINOP - and also returns the Xth root of Y, which is yet another
BINOP.
Either side of a BINOP can be a value or an expression. A value is
a single number (though that number can have multiple digits, a
decimal, a sign, and an exponent) , whereas an expression is a
combination of numbers, functions, and operators contained within
parentheses. A FUNCTION can operate on either a single number or
an expression.
We also have to distinguish between algebraic notation and
calculator notation. The syntax used by BigCalc is nearly identical
to that used the horde of scientific calculators already out there,
which is to say that it doesn't at all follow the precedence rules of
algebra. In algebra, if you have "6 + 5 * 3" then the multiply takes
precedence over the add, so first you multiply 5*3 to get 15 and then
add 6. But in calculator notation, operations are performed as you
enter them, so in this example we would first add 6 to 5 and only
then multiply by three. Parentheses are necessary to force the proper
levels of precedence.
BASIC OPERATIONS:
Unfortunately, most keyboards totally ignore the keypad-5 key
unless the NUMLOCK is on, so there's no way I can translate that one
key. All other keys on the numeric keypad can automatically be
translated to number keys irregardless of whether the NUMLOCK key is
enabled or not. If you prefer the numeric keypad to the usual number
keys, then you need to be sure that the NUMLOCK is enabled.
Ok, let's add two numbers. Just type in "3.5", press either the
keypad-plus or the keyboard-plus key, then type in "4.8", then press
the equals key and you'll get the answer of "8.3". Note that after
pressing the equals key, the word "READY" appears after the answer to
let you know that the calculator is waiting for your next operation.
Now, what if you wanted to add your answer to itself? Go ahead and
press the "+" key followed by the equals key, and you'll get an
answer of "16.6". This is what I call an "AUTO-OPERATION", because it
involves a "BINOP" that requires two values to operate on, and gets
the second value by automatically copying the first to it.
Automatic operations are permissible using any BINOP. For example,
"*=" to multiply the value by itself, or "-=" to subtract it, etc.
AUTO-OPERATIONS are only permissible when no numbers have been
entered after the first BINOP since the READY display. For example,
if the display shows "3 READY" then you can do a "*=" to get 9.
If the display shows the word "READY" and you type in a number,
then the value currently in the display register will be erased and
replaced with the new number. Try that now - type in "4 + 5 = ". The
moment you type in the "4", the "16.6" was erase and the "4" took
it's place.
Here's one: If you had typed "4+5+=" would an AUTO-OPERATION have
taken place on the 5? The answer is "no". If the word "READY" is
displayed and the display shows the number "4", then you can do a
"+'" to add the four to itself. If the word "READY" is showing then
you can also type in "4+=" to add four to itself. But if you enter
any number after that first BINOP (the "+") then you can no longer do
an AUTO-OPERATION until the word "READY" appears in the display,
which will either be after you complete the current operation by
pressing an equals sign or clear the calculator.
Speaking of clearing: The calculator is cleared using the tilde
key. Unshifted, this is the "reverse apostrophe" as most people call
it. In 84-key AT keyboards, it's just above the "TAB" key.
Go ahead and try this: hold down the shift key and press the tilde.
The display will show "0.0 READY". This just shows that it's been
cleared. Now type in "4+5+=". When you press the equals key, you'll
get a message that says "syntax error", and the calculation will be
aborted. Whenever you get an error message like this, just press any
key afer reading the message and you'll be back at the "READY"
prompt with the calculator cleared and ready to try again.
PARENTHESES:
You can use parentheses to force the order in which operations are
performed. For example, earlier when I was talking about algebraic
notation, I used the example of "6+5*3" to show how calculator
notation differed from algebraic notation, and mentioned that you can
use parentheses to force the desired order of precedence. Let's try
it.
First, try it this way: Type in "6+5*3=". You'll notice that as
soon as you press the "*", the 6 and 5 are added to get 11, and this
subtotal is displayed. Then when you press the "3", the subtotal will
be erased from the display and replaced with the "3". When you press
the equals key, then the final result of "33" will be shown. This is
how calculator notation totals up things. Now lets force the "3" to
be multiplied by the "5".
Type in "6+(5*3)=". You'll notice that when you type in the right
parentheses, the subtotal for "5*3" will be displayed. When you press
the equals key, you'll get an answer of "21".
Now, suppose you want to multiply 5 times 3 and subtract that from
8 times 9, and then multiply the result by 6? You would type this in
as "6*((5*3)-(8*9))=", in that exact order. This is what is called
NESTED PARENTHESES - that is, one level of parentheses is nested
inside another. In theory, BigCalc can handle 50 levels of
parentheses nested inside each other, but as mentioned earlied I got
kind of bored at fifteen and few people go beyond two on scientific
calculators anyway.
Now clear the calculator and let's try something else. Type in
"6+(5*2) - 4)=". When you press the EQUALS sign, you'll get a message
that says "unbalanced parentheses". This makes sense because for
every left parentheses you should have a right one, and it's just and
example of how BigCalc handles an error when it has no way of knowing
enough about what you'd intended to recover more gracefully. You get
the same thing when trying to divide by zero, take the LOG of a
negative number, etc.
FUNCTIONS:
Now it's time to try a function. Clear the calculator using the
shifted-tilde key. Type in the number "5". Press F5 and it will
announce "square". Then press F1 and it announces "sine". Press F5
again and it announces "square" again. So far all that's happened is
that the keys have named themselves as you pressed them. The last key
we pressed was the one we wanted, so not press the ENTER key to
select this function and you'll get an immediate answer of "25".
Note that the "READY" display has gone away, signifying that we are
now in the middle of a calculation. type in "+4", then press F5
again, followed by the ENTER key to select it. This will square the
"4" to get "16". Press the ENTER key and the "25" will be added to
the "16" to get 41 - and we're back to the "READY" display.
Now, what if you want to square 41? Just press F5, it will announce
"square", and press the ENTER key to get 1681. Once again the "READY"
display is gone, signifying that we're starting another calculation.
Press the "EQUALS", and the word "READY" comes back. This is like
saying just that some number followed by the equals key is itself.
Now clear the calculator again. Type in "3+4+". The display will
show a subtotal of 7. Now, at this point, press F5, it will announce
"square". Press the ENTER key to select this, and you'll get "49".
Press the EQUALS key, and you'll get "56". This is something like an
AUTO-OPERATION. We hadn't entered a number after the final "+" sign,
so the "square" function used the number that was displayed.
This is important to remember. When a number hasn't been entered
since the last BINOP and you then use a FUNCTION key, then that
function key will use the currently-displayed number or subtotal in
lieu of a number explicitly supplied by you. I don't like this kind
of feature myself because it's too error-prone, but for consistency
with the way most scientific calculators work I went ahead and
implemented it this way.
Now let's try one more thing. Clear the calculator once again. Type
in "8+2". Press F5 and it will announce "Square". Press the ENTER key
to implement this, and it will square 2 to get 4. Now press F5 again,
and again it will announce "square". Press the ENTER key to select
this again, and it will square the 4 to get 16. So you can apply
functions over and over like this and let their effects on a single
number build. You only leave your current place in things when you
enter another BINOP, an EQUALS sign, or a parentheses. So now press
"+" and the display will show a subtotal of 24, which is eight plus
two squared twice. Now type in a "5" and press the EQUALS key to get
29.
I've tried to arrange the functions logically. F1 gives the SINE of
a angle, shifted-F1 gives the arc sine, control-shifted F1 gives the
hyperbolic sine, and as soon as I find the equations alt-shifted-F1
will give the arc-hyperbolic sine. F2 works similarly for the COSINE,
and F3 for the TANGENT. You'll also find square, square root, log,
ten to the X, natural log, two to the x, 1/x, Y to the X, the Xth
root of Y, percent, Y factorial, and so on. F4 selects DEGREES,
RADIANS or GRADS for angular units (The default is RADIANS) and we'll
have more to say about F4 and some of it's counterparts later. If you
would prefer to have things arranged differently, then another later
section will tell you how you can do that.
Although the reciprocol key names itself for the demo version of
the program, the key has been disabled for that version. IF you try
to use it, it will simply leave it's argument unaffected.
FUNCTION BINOPS
===============
F6 in it's unshifted, shifted, and control-shifted states gives you
Y to the X, the Xth root of Y, and Percent functions respectively. As
mentioned before, these are really BINOPS similar to the add,
subtract, multiply, and divide keys and can be used identically.
However, they're usually thought of as functions and are
rarely-enough used that I placed them with the functions and also
made them self-identifying, so that you can "hunt" for the right key
and then select it using the ENTER key.
Let's try an example. Clear the calculator. Type in "8+5", then
press F5 and it will announce "square". Instead of pressing ENTER,
now press F6. It will announce "Y to the X". Press the ENTER key. The
display will clear and the letters "Y2X" will appear just to confirm
what you are doing and to remind you that now the calculator needs
the "x" part of this operation. Now press "3", then the "plus" key.
You'll get a subtotal of "133" - which is 8 plus 5 to the third - and
type in "4=" to get an answer of 137.
Now let's do something differently. Clear the calculator. Type in
"3 + 2". Press F6 again, and it will announce "Y to the X". Press
the ENTER key to select it, then type in "(1+3". So far the Y to the
X function hasn't been performed, because it's waiting for us to
complete our expression. Now type the right parentheses. The 1 will
be added to the 3 to get 4, which will be shown as a subtotal. Press
the EQUALS key and then two will be taken to the fourth power (which
is 16) and added to 3 to get 19.
So just like the add, subtract, multiply, and divide, you can use
these other BINOPS (Y to the X, etc) with individual numbers on each
side or with whole expressions enclosed in parentheses.
MEMORY REGISTERS
================
BigCalc has 26 memory registers, one for each letter of the
alphabet. First, let's store a number. Clear the calculator. Type in
"3.141592654", which the oft-used value of PI. The TAB key stores
numbers, so press it and it will annnounce "STORE". It is now waiting
for you to select a letter key. Prss the letter "a" and the display
will say "STORE A". Press "B" and it will say "STORE B". So far
nothing has happened. The STORE function names off the letter keys so
voice and braille users can be sure they have the desired key. Now
press the letter "P" (which is a handy abbreviation for "PI") and
then press the ENTER key to select this as the proper place to store
the number.
You'll now be back to the previous display. Clear the calculator
again. Now type in "2*". Tab stores numbers, so shift-tab recalls
them. Press shift-tab and it will announce "RECALL". Like STORE, it's
waiting for you to select the proper letter key. Press the letter "A"
and it announces "RECALL A", followed by whatever value happens to be
stored un A. Press "B" and it announces "RECALL B", followed once
again by whatever value happens to be stored in "B". Press
"P" and it announces "RECALL P", followed by the value we type in
earlier. Press the ENTER key to select this register. It's contints
have now been substituted exactly as if you had manually typed them
in. So now we have 2 * 3.141592654. Functions keys can now be used on
this value just as if you had manually typed it in. Go ahead and
press F5, and it will announce "square". Press the ENTER key to
select this function and PI will be squared, then press the equals
key and that will be added to the two.
Whenever you exit BigCalc using control-C, these registers will be
saved to disk. When you run the program again later, they'll be read
back. No heavy-duty attempts at warnings or error-checking are done.
If the file can't be read when BigCalc first runs, then all memory
locations will be cleared to zero. If a file can't be written - for
example, because of a write-protected diskette - then the program
just exits to DOS without warning that the registers weren't saved.
CALCULATOR MODES:
Depending on the need of the moment, you may wish to have numbers
displayed in different ways. Sometimes you'll want all 12 digits of
precision, other times you'll only be adding up dollars and cents,
and so on. You may also prefer "normal" numbers, or you may wish them
to be expressed in "Scientific" or "Engineering" notation. You also
may prefer to express angles in Degrees, Radians, or Grads. Let's
take these one by one.
First angular units: F4, shifted F4, and control-shifted F4 selects
Degrees, Radians, and Grads in that order. The default is RADIANS.
You use these keys just like you would any other function key. Press
it, it announces it's name, then press the ENTER key to select it.
You can indeed change units in the middle of a calculation. That's
sometimes handy, but it's also error-prone if you aren't well
familiar with BigCalc because of course it only affects operations
that are pending or haven't been entered yet. For safety, you may
wish to only change units when the "READY" prompt is showing.
These are NOT conversion keys. They simply tell the trigonometric
functions, for example, that a "4" means "4 degrees" and not "4
Radians", so you will see no change in numbers.
(The rest of the keys in this section control how numbers are
displayed. Whenever you use these keys, no change will be made to the
number currently displayed but the change will take place with the
next operation. If you're at the READY prompt and make use one of the
following functions, then you can just press the "=" key to get the
current number to be displayed in the new format.)
Next are the NORMAL, SCIENTIFIC, and ENGINEERING modes. NORMAL
displays numbers without using an exponent unless those numbers
exceed 12 digits to the left of the decimal point or are smaller than
about 10 to the minus 11, in which case it switches automatically to
Scientific mode. In Scientific mode, all numbers are expressed as a
single digit to the left of the decimal point, all other digits to
the right, the letter "E", and a power of ten. Engineering mode is a
variation on the Scientific mode in which the decimal point is
shifted to the right until the power of ten is an even multiple of
three - for example, ten to the third, ten to the sixth, ten to the
minus 12th, and so on.
Shifted 2, 3, and 4 ( The "@",. "#", and "$" keys) select these
three modes. Like the other function keys, they announce their names
and are selected using the ENTER key. Although these keys are
primarily intended to be used only at the READY prompt, there are
certain other points in a calculation where you can use them. If you
can't use them at a particular point, they'll just beep at you
instead of identifying themselves and no harm will be done.
By default, trailing zeroes are always suppressed. If you want
them, you can use the shifted-5 key, which will announce "toggle
zeroes". Selecting this once enables all trailing zeroes and
selecting it again turns them off again.
Commas make it a lot easier to keep track of the thousands,
millions, billions, and so on. By default, commas are OFF. You can
use shifted-6 to toggle commas off and on.
Finally, you can control how many digits of precision are
displayed. All calculations will continue to be taken out to 15
decimal places, but you can round the displayed value all the way down
to two digits. This is done with the "fix digits" key, which is the
exclamation point. This key works slightly differently depending on
which display mode the calculator is in.
In the NORMAL mode, it controls how many decimal places are shown
to the right of the decimal point. This is handy when working with
dollar amounts. Only if a number grows so large that significant digits
would be lost will fewer than the selected decimal places be shown to
the right of the decimal point.
In the SCIENTIFIC and ENGINEERING modes, this function instead
controls how many total digits will be displayed. As previously
mentioned, the calculations will continue to be performed to 15
decimal places, but will then be rounded to the specified number of
digits.
Finally, the version of BigCalc which has been optimized for voice
synthesizers throws in one extra trick which isn't in this demo. A
large number can be broken down and appropriate letter groups
suffixed with the words "trillion", "billion", "million", "thousand"
and so on. In the Engineering mode, numbers are suffixed with the
words "mega", "kilo", "milli", "micro", and so on.
RANDOM NUMBERS
==============
BigCalc includes a pseudo-random number generator. F9 generates a
12-digit random number between 0 and 1. The random sequence will be
the same each time you run the program unless you choose to "seed"
the random-number generator. You can randomly seed it - in which case
the "seed" is generated using the computer clock - or you can
manually select the "seed" so that you can repeat the same
pseudo-random sequence later. Shifted-F9 lets you manually select the
seed, and control-F9 selects a time-generated seed.
VIEW BUFFER
===========
The trace buffer was originally installed as a debug tool so I
could develop the syntax for the programmable version of BigCalc. It
worked so nicely for other things that I cleaned it up a little and
left it in place for those who might occasionally need it's features.
As your computations are perrformed, BigCalc generates a list
containing the various operations and values. Each line on the list
is in the form of an operation name or symbol followed by a number
that was operated on. This list contains everything you need to know
to reconstruct a chain of computations, and in addition you can add
your own notes to the list as you go.
To be sure that notes go at the expected places, you can only add
notes at certain points in a computation. At any other point you'll
get beeped at. Otherwise if you tried to annotate a currently
displayed number the note might actually end up several numbers away.
This is a peculiarity of the parser I'm using and unfortunately there
isn't anything that can be done about it without re-writing large
parts of the program. But about 90% of the time you shouldn't be
prevented from adding a note whenever you wish.
To add a note, just press the double-quote key. It will announce
"annotate listing". Press the ENTER key to select this and you'll be
prompted to "type note". Type in your note, press the ENTER key, and
the note will be added to the list. You'll then be taken back to
wherever you were when you pressed the double-quote key and can
proceed with your computation.
To view the list, press the question-mark key. It will announce
"view buffer". Press the ENTER key to select this. Now you can use
the HOME key to go to the start of the list, the END key to go to the
end, and the up and down-arrow keys to go one line at a time. Without
exception, every line starts with either an operator or an
abbreviated function name. Most are self-explanatory and quite closly
resemble what is displayed when performing computations.
Comments that have been added start with a double quote. If you go
to the very start of the list, you will see the word "RESET", which
was generated when the calculator engine was reset when BigCalc first
started to run. Immediately following that will be the word "CLEAR",
which signifies that the display was cleared. Below that will be a
comment, which will be the time and date reported by the computer,
and then finally a "0.0" which is the number that was displayed right
after the calculator was cleared.
From here on out, you can fairly well follow everything simply by
going from the number to the operator that starts the following line,
the number that follows that, the operator on the line after that,
and so on. Subtotals will be prefixed with the word "SUBTL". Function
keys have names that can be up to five letters long - TAN for
"tangent", "ATAN" for "Arc Tangent", "TANH" for "hyperbolic tangent",
"LOG" for base ten log, "LN" for natural log, and so on.
Occasionally, a number cannot be listed immediately following an
operator. For example, consider "3+5*(2+6)=". We start out with just
a "3", then the next line will have "+ 5". The next line starts with
an asterisk all right - but until the closing parentheses is found,
BigCalc has no idea what number goes here. The rule also is that
every line except the first must start with an operator and there can
be no more than one operator on any one line. So the "*" and the "("
can't be allowed on one line. Rather than just leaving a blank after
the asterisk, I put in three periods where the number would go, to
signify that it is unknown at the moment, and then proceed with the
opening parentheses on the next line.
Just as the arrow-keys go line-by-line, the page-up and page-down
keys take you to the previous or next comment. This is helpful when
you're looking for some value that you've annotated.
If some of that seems a little strange - well, don't forget that
this will hopefully eventually evolve into a language that will allow
users to program their own function keys. This list is basically how
such a program would be stored in memory so that it could be played
back later.
CHANGE SIGN and ENTER EXPONENT
==============================
So far we've entered only simple, positive numbers. What if you
need an exponent or need to change the sign of a number? The
UNSHIFTED reverse-apostrophe key is used for entering an exponent,
and the backslash key for changing a number sign while entering the
number. Though this might seem a bizzarre choice of keys, it places
them all on a row with the number keys and in practice has worked
quite well.
Clear the calculator. Now type in "6.23". Press the backslash key
and this will be changed to -6.23. Press the backslash key again and
the negative sign will go away. Enter a the digits "56", and then
press the backslash sign again. So far, you can change the sign of the
number without interfering with the entry of digits.
You can use the rubout key to back up over digits and re-enter the
number, but it won't back up over the negative sign. The only way to
change the sign of that number is with the backslash key.
Now, with the number "-6.2356" entered, press the
reverse-apostrophe key (be sure not to shift this key or you'll just
clear the calculator!). BigCalc will now append a space, a capitol
letter "E", and another space to your previously-entered number. At
this point it's too late to change your mind - you can't go back and
change the number. Go ahead and type in the number "125". What you
should now have is "-6.2356 E 125". Press the backslash key, and
you'll have "-6.2356 E -125". So now the backslash key affects the
sign of the exponent.
Now press the "+" key because we're going to add this to something.
Type in "123.456", press the reverse-apostrophe key, type in "123",
then press the backslash key to get "123.456 E -123". Now press the
equals key and you'll get your total. Don't bother trying to check
this on a pocket calculator - I have yet to see on that can handle
exponents smaller than ten to the minus ninety-ninth!
Anyway, that's how you change the sign of a number while entering
it and also tack on a power of ten.
If you want to change the sign of a number that's already in the
calculator - for example, the result from a previous calculation -
then for now you'll need to use unshifted F10, which will announce
"change sign". You should not, however, use this function key when
actually entering a number unless all digits and the exponent are
already entered to your satisfaction.
THE ESCAPE KEY
==============
The ESCAPE key serves two related purposes. When entering a number,
you can use it as a "clear entry" key to erase the whole number and
start over. If you start searching for a function key and then change
your mind, then you can press the ESCAPE key to get back to where
your were before starting to search for a function.
CUSTOMIZING KEYS
================
Everybody has their own way of organizing keys and functions,and
some of my choices that seem perfectly logical to me will appear
bizzarre to others. By using the /keys configuration mode, you can
re-arrange BigCalc's keys to suit your own preferences.
Be sure the disk containing BCDEMO is not write-protected. Log onto
the disk and at the DOS prompt type "BCDEMO /keys". You'll get a
message that says "configuring keys (any key)". Go ahead and press
any key, and you'll be presented with the name of a function key, a
dash, and the name of the key to which it has been assigned. You can
use the arrow keys to go up and down an entire list of these function
names and key assignments. When you get to one that you want to
assign, then just press the enter key.
At that point, you'll be asked to press the new key. Press the
desired key, the function will be assigned to it, and you'll hear a
rapid-fire triple beep to let you know that the assignment was made.
The function name will then be displayed along with the new key name
and you are ready to use the arrow keys again.
If you want to totally disable a function key, then instead of
pressing a key to assign it to, press the ENTER key. If a function
key has been disabled, then instead of being fillowed by the name of
a key, the function name will be followed by the word "OFF". To
re-enable that function later, all you have to do is assign it to a
key again.
When you are done assigning keys, press the ESCAPE key and you'll
be asked if you want to save the changes to disk. Press "N" if you
don't or "Y" if you do. Next BigCalc will try to update itself on
disk with the new information. If it fails for any reason, it will
continue to beep and inform you until you either correct whatever the
problem may be or decide to give it up.
Rather than spending an hour changing all the keys and then losing
all that work because of a disk problem, you're better off to change
only a half-dozen or a dozen keys at a time and save the work
in-between. Once you exit this routine you will be placed back at the
DOS prompt and will have to re-run the program to change more keys.
There are a few quirks you need to know about. First, BigCalc
doesn't check to see if you've assigned a key to more than one
function. If you've assigned a key to a function and it doesn't seem
to be working, then you may have assigned the key to do something
else.
Second, you cannot assign any functions to the following keys: The
ENTER key, any of the shift keys, the NumLock, CapsLock, Scroll Lock,
Sys Request, or PrintScreen keys, the ESCAPE key, the numbers 0
through 9, or the punctuation symbols " + - * / = ( )". However, you
CAN assign functions to tha alphabet keys and they will NOT conflict
with the storage registers that are also assigned to the alphabet
keys.
Third, and surprisingly, not every key on the keyboard can be used
with the shift, control-shift, and alt-shift keys. The computer
simply doesn't pass along the information to user programs, and
though there are tricks to circumvent this limitation they would
likely run into serious problems with some clone computers. Also, the
keypad-5 key in it's unshifted state with the NumLock off isn't
supposed to be a valid key and isn't recognized by most systems.
In both the second and third cases above, when you try to assign a
function to a key that is not allowed or is not recognized by the
computer, then nothing happens at all and you don't hear the fast
triple-beep that signifies that the assignment has been made. You
then have to press a different key to assign the function to.
Fourth, TAB is defined as control-I, and pressing the TAB key is
exactly the same as pressing control-I. If you try to assign
different functions to each key, then the effect will be the same as
if you had assigned the two functions to the same key.
Fifth, certain keys are duplicated. For example, a numeral "1" on
the numeric keypad is the same as a numeral "1" on the alphabetic
keyboard, and a "plus" on the numeric keypad is the same as a "+" on
the alphabetic keyboard, and so on. These are what I call "extra"
keys, and they can be re-assigned right along with the other function
keys. They will be listed as you get towards the end of the list of
functions. You can also disable them as mentioned above, or you can
assign functions over them. With the exception of the keypad-five key
mentioned above, these produce the same results whether or not the
NumLock is turned on.
Sixth, to gain access to some keys that are normally not
recognized but that I think a lot of people will want to use, I did
take a chance on accessing the keyboard on a slightly different than
normal level. In a few cases this will lead to innaccurate
descriptions of what keys the functions are assigned to. If pressing
the indicated key doesn't activate the desired function, and if
you're sure that no other functions are assigned to that key, then
try assigning the function as above. Whether or not the
key-description is accurate, the above procedure assigns functions to
the keys that are actually pressed.
Seventh, when keys are named, their unshifted name is given
preceded by the word "shift", "alt", or "control". For example, a
percent would be displayed not as a percent symbol, but as "shift 5".
BigCalc may also recognize that a key has been pressed, but may not
know what the name of the key is. In this case the key will be
described as "not recognized", but you can still assign a function to
it if you wish.
Finally, multiple shift keys - for example, control-alt F10 - are
ignored. Only one level of shift is recognized. The alt key takes
priority, so that holding down the shift key, the control-shift key,
and the alt-shift key simultaneously is the same as holding down just
the alt-shift key. The control-shift takes the next priority, so that
holding down the shift key and the control-shift key is the same as
holding down just the control-shift key.
If you're going to do some major re-arranging, it's wise to plan
very carefully in advance. BigCalc needs most of the keys on the
keyboard at one time or another, so assigning large numbers of keys
wholesale without any prior planning will likely just get you backed
into a corner and waste a lot of time. Be sure to take account in
your planning that not all control- and alt-shift key combinations
will be recognized by the computer.
To make it easier to learn which keys your system will recognize
and which it won't I've provided one last mode you can enter from the
DOS prompt. Type "BCDEMO /keyboard", or "BCDEMO /big /keyboard" if
you want to use the large-letter display. Then as you press the
various keys only their names will be displayed. If nothing happens
when a key is displayed then that key isn't passed along by the
computer and you can't assign a function to it. Use control-C to exit
when done.
And that is pretty much an informal whirlwind tour through the demo
version of BigCalc. Although I'm happy with the program as it is,
part of the reason for distributing this demo is so people can play
with it and offer up their own suggestions and ideas. Feel free to
suggest changes or extra features whether or not you choose to
purchase the full program. -- Chuck