*****************************************************************
Chemical Equation Balancer (ChemBal) v2.1
Author: Anthony Loven
Date: 1-18-05
Email: greenorange5656@gmail.com
*****************************************************************
     This program can be modified at will.  However, my name
(Anthony Loven) must be referenced in documentation, and I must
be listed as a co-author.
---------------

Introduction:

     This program is a port of my TI-86 program of the same name.
This version (2.1) is completly different from 1.0.  It's extremely fast
(takes about 1 second to balance an equation), a lot more easy to use,
so much more less space (642 bytes!!!), and now has a port to the TI-82.
It can take on any solvable equation (this version does not include 
charges, redox, equilibrium, etc.) and is a MUST for College chemistry,
General Chemistry, AP Chemistry, or anything related.  With only 642 bytes,
who wouldn't want it?

---------------

Purpose:

     The purpose of this program is to balance any user-entered chemical
equation in a quick, efficient manner.

---------------

Contents and installation:

     The contents of this ZIP are:

CHEMBAL2.82p - The main program for the calculator.
chembal2.gif - screenshot
chembal2.txt - This file :)

To install, simply send CHEMBAL2.82p to your calculator using some type of
linking software.  The file was extracted from my calc using TiLP, which
is recommended.

---------------

Usage:

     To begin, let's start with an example.  Numbers are
actually subscripts, so H2O is water, and CO2 is carbon dioxide, etc:

	 C2H5OH + O2 -----> CO2 + H20

Split up into simpler parts:
	 C2 H6 O + O2 -----> C O2 + H2 O

To balance the above equation, start the program.  When prompted for elements,
enter 3, because we have C, H, and O.  For reactants, enter 2, because we
have C2H5OH and O2.  For products, enter 2 for CO2 and H2O.

Now, you must enter how much of each element is in each reactant/priduct.
For this problem, you will be prompted for 3 elements, and each element, you
will need to give 4 values.  The first element is C (however, it makes no
difference which element you start entering first; it can be any order.)
We have 2 Carbons in reactant 1, 0 carbons in reactant 2, 1 in product 1,
and 0 in product 2.  Enter 2, [HIT ENTER], 0, [ENTER], 1, [ENTER], 0, [ENTER].
The next element will be hydrogen.  Enter the series 6,0,0,2.  For element
3, enter 1,2,2,1.  Now, you will wait 1 second, and the answer will be given.
It is:

	{ 1, 3, 2, 3}

This represents the cooefficients to place before each reactant/product in
the order you entered them.  Basically, the equation balanced is:

	C2H5OH + 3 O2 -----> 2 CO2 + 3 H2O

---------------

Fine points:

There are some things to be aware of.  If you have the equation:

	AgNO3 + H2SO4 -----> Ag2SO4 + HNO3

You MUST treat NO3 as one element, and SO4 as one element.  So instead
of having 4 elements for Ag, N, O, S, you have these 4: Ag, NO3, H, SO4.
IT WILL NOT SOLVE OTHERWISE!

This same procedure should be applied to any other similiar equation.  It will
require examination before solving.  Also, in the example stated in the Usage
section, the first compound, C2H5OH, is rearranged to be C2H6O.  DO NOT ENTER
AN ELEMENT TWICE FOR ONE COMPOUND!

If this program has trouble with certain equations, email the equation to me,
with "ChemBal unsolvable" as the subject.  I will take care if it, and send
you a new version back.

---------------

History:

1-18-05  Version 2.1

 - Third public release
 - Ported to the TI-82
   - 82 version uses self-made greatest common denominator function

1-15-05  Version 2.0

 - Second public release
 - 600 bytes
 - 3 second solve
 - 99% effective :)
 - Rewrote whole program from scratch
 - new input system
 - matrix solve system

12-21-04  Version 1.0

 - First public release.
 - 4.7 Kb
 - VERY SLOW
 - VERY BUGGY

---------------

Credits:

Anthony Loven - design and programming
www.shodor.org - taught me how to use matrices to solve chemical equations

---------------

This file should always accompany the program it came with.  This program can
be distributed freely, but this file should always be with it.
