Periodic Table+v3.3 by JL
<JayEll64@aol.com>
TI-85:  Needs Usgard 1.5+ (4587 bytes)
TI-86:  Run from home screen or shell (4553 bytes)
Thanks to ZoneMarrow for helping out on the TI-86 version!!!  Couldn't have done it without him!  Also thanks to Matthew Swann and DOZIEDO for beta testing where ZoneMarrow left off!


Hey!  Glad you downloaded this program, and hope it helps you in your chemistry class, or maybe in Usgard programming (nearly every line is commented!).  This is an excellent periodic table program, and I plan on working continuously on it to make it smaller (and better!).  The keys are pretty easy to remember, and it gives a bunch of info on each element.  In fact, I was expecting this program to be at least 8000 bytes, and I was afraid it'd be upwards toward 9000 bytes!  Surprisingly, it remained under 7000 bytes in the first version.  In version 2.0, I cut that by about *1300 bytes* down to under 5700 bytes!!  In version 3.0, I did even more revising and optimization to shave off another *800-900 bytes* to around 4800 bytes!!!  This leaves plenty of room for extra information on each element, so let me know what you want!


**New In Version 3.3!**
-Made some pretty good optimizations.  Changed the symbol entering routine to be more like the name entering routine.  Also changed the number->string converting routine to be smaller.


**Note on Version 3.3**
**READ THIS!!**
-I've figured out a way to save about 200 more bytes, and I would've done that except that it slowed down the processing time down considerably, especially in the name and symbol searching routines.  If I was to implement this space-saving idea into Periodic+, you'd have to wait about a second between entering characters when searching for a symbol or name.  What I want you (the reader) to do is email me about your opinion on this idea.  Which is more important to you:  200 bytes saved or faster symbol/name entering?  Please email me to let me know.  Also specify which version (85 or 86) of Periodic+ you're using, because I would guess that 85 users are more memory conscience than 86 users.


**Features**
So what makes this program "excellent"?  Here's a list of the features:
-Displays on each element (if you would like something added to this list, please email me!):
	-Atomic Number
	-Symbol
	-Name
	-Atomic Mass
	-Boiling Point (BP) in Degrees Kelvin
	-Melting Point (MP) in Degrees Kelvin
	-First Ionization Energy (1stIoEn) in KiloJoules per mol
	-Oxidation States (OxSts)
	(Note:  I decided not to label the atomic number, symbol, name, and 	atomic mass because they're pretty self explanatory.  All four are 	in the top left-hand corner.  Rest of the stuff is labeled with the 	expression in parantheses.)

-"Smart" searches on:
	-Atomic Number
	-Symbol
	-Name

-Nice table in the corner with a blinking cursor!

-Electron configuration of all elements, including correct configurations for those that don't follow the normal order of filling!

-Now no need to press function keys for the different searches!  Just scroll to one using '2nd' and then start typing!

-Shutdown the calc while in the program to save battery life and get quickly back to what you were doing before shutting down!  Note:  I suppose this could also be used as a sort of teacher key...?  (Only for TI-85 version)

-Well under 5000 bytes (and creeping to 4500!!!), so there's still plenty of room for games (or more features)!


**Keys**
EXIT:	Exits to Usgard
2nd:	Scroll through different searches
MORE:	Switch between electron configuration page and information page
CLEAR:	Clears whatever you've entered into the search
A-Z:	For symbol searching and name searching
0-9:	For atomic number searching
ENTER:	Enters in whatever you've entered into symbol and atomic number 	search.  Also acts as CLEAR in name searching.
Arrows:	Move cursor around table graphically.
F5:	Shutdown calc to save battery life.  (Only for TI-85 version)


**Searches**
Use '2nd' to scroll through the different searches, then press either letter keys to enter symbols and names or number keys to enter atomic numbers.  I call these "smart" searches because you only have enter a minimum number of letters/numbers before the calc "does something".  In the atomic number search, you have to press enter after entering your number if the it's below 12, else the calc'll go right to the element you're looking for!  In the symbol search, you'll sometimes have to press enter after entering a one letter symbol (exceptions are in, like, Xenon and Vanadium), but that's it.  If the symbol's two letters long, just type in two letters; if it's three letters long, type in three letters, no ENTER required!  In the name search, you just have to type in enough letters so the calc knows what you want.


**Electron Configuration**
I think this is one of the few periodic table programs that has electron configurations...anyway, I heard it was pretty useful, so here it is!  One thing that needs to be fixed is that for elements past 106, the electron configuration isn't confirmed; it's meerly a guess.  If anyone knows the "true" electron configuration for elements 107-112 (or can confirm them), please email me.


**Contacting Me**
You can contact me at the address above.  Please email me and tell me what you think of the program, what you think can be improved upon, what should be dropped/added, and any compliments :)  Because of the algorithm I use to store the information on each element, something added to the display would take up no more than 500 bytes, so please give your input.  As you can see, I've configured the display so that I can add at least three more constants, but you have to let me know what you want!  If you have more accurate information, or can fill in those gaps on the information my Chemistry book didn't list, please let me know.  Also email about any bugs so I can fix them.  Bottom line: email me!


**Thanks**
Thanks to...
	-the Usgard team, for Usgard, the best shell for the TI-85!
	-Andrew Hockman, for the original idea.
	-STL, for commenting on what I should include in my program.
	-ticalc.org, for their vast archive and awesome site!
	-God, can't forget him!
	-SmilySnake, for reporting Thallium's symbol typo in v3.0.
	-ZoneMarrow, who suggested I get rid of the wire frames, and for 		pushing me to create a TI-86 version.
	-Matthew Swann and DOZIEDO, for beta testing.
	-Dim-TI and TI-Files, for also putting in the time to have other 		very large archives.
	-To anyone, if they write a review or tell the ticalc.org review 		staff to write a review :)


**Version History**
(There were no TI-86 versions until v3.2.)

v1.0 (6976 bytes) (Released???)
-First release.  No bugs to my knowledge yet...  Still need to make it smaller, I hope.

v2.0 (5690 bytes)
-Made it A LOT smaller, using words and bytes instead of strings for the element information.  This saved, on average, more than 10 bytes per element this way (that's over 1100 bytes!)!  Also fixed some electron config bugs (like in Copper).  Changed output: displays first ionization energy and oxidation states instead of density and specific heat.  Thanks STL!  Plan on changing it a little to make it smaller and more able to handle numbers with many decimal places (including those less than one).

v2.01 (5693 bytes) (Never released)
-Exactly the same as v2.0, except a major, hidden bug was fixed.  What bug?  Apparently I forgot the PC (program counter) was pushed to the stack in each call, and I would continuously jump out of the called routine before popping back the PC, so the SP (stack pointer) got really messed up (maxxed out or something).  Fortunately, I was able to fix the bug before crashing a bunch of calcs :)

v2.3 (5670 bytes) (Never released)
-Not too many "interface" changes , because most changes were "internal", in that they were made to save space or make it easier to update (or both!).  The most noticeable things are the addition of the F5 key to shutdown the calc, you can see the cursor a lot better when moving it fast, and now the graph_mem is cleared.  I also changed the algorithm that converts the number information into strings to make it more flexible and also take up less space in some cases.  That's where most of the 50 or so bytes shaved off from the last version came from (you only "see" 23 bytes because the shutdown option took 5 bytes, the clearer cursor took 9 bytes, and the cleared graph_mem took 11 bytes, plus there were a few other tweaks).  Fixed a bug in the electron config, too.

v3.0 (4829 bytes)
-Most changes were "internal" and drastically cut the program's size!  The only visible changes were the smaller negative sign in the displaying of the ox states, electron config for elements 107-112, and a better (and a lot smaller!) name search.  I saved around 400 bytes by just deleting the table that had the name information!  Now, the calc looks in the actual string that's displayed for each element instead of searching a whole, seperate, 400 byte table.  Another 200 bytes were saved by changing the symbol search in the same way.  Plus, I rewrote the code to include both the name searching and symbol searching in the same routine!

v3.01 (4830 bytes)
-Fixed typo in Thallium's info.  Now Thallium's symbol is Tl instead of Ti (when I typed up the information, I misinterpreted the l for an I).  Thanks SmilySnake!

v3.02 (4827 bytes)
-Just changed the key loop a bit to save a few bytes and conserve battery life using the 'halt' instruction.

v3.1 (4675 bytes)
-New format (got rid of those wire frames), thanks to ZoneMarrow's suggestions.  Shaved off quite a few bytes from that, but also did a little optimization (like moving some routines and changing some of the 4-byte absolute jumps to 2-byte relative jumps).  New format allows at least three more constants to add to the elements' info...wonder what I should put there (hint-hint)?

v3.2 (TI-85 version: 4669 bytes; TI-86 version: 4632 bytes)
-Wow!!  Finally got Periodic+ ported to the 86!!  Bug-free as far as I know, but, since I don't even have an 86, I can't be 100% sure.  Very special thanks to ZoneMarrow for beta testing and putting up with all those crashes (which, by the way, wouldn't have happened had someone documented the ROM calls...how the h*ll am I suppose to know D_ZT_STR destroys the accumulator???).  Oh yeah, also fixed Chromium's electron configuration and Sulfar to Sulfur.  Shaved off another 6 bytes on the 85 version, too, as you can see.  Still waiting for suggestions on what more to include.

v3.3 (TI-85 version: 4587 bytes, TI-86 version: 4553 bytes)
-Broke the 4600 byte barrier on both versions by cutting off another 80 bytes!  Optimized the code even further to combine the symbol and name entering routines even more (there's only one branch now).  Also optimized in few other places, too, like the number->string routine.


**Future Versions**
What to expect in the next version?  Probably just some more optimization...but I'm also working on a Periodic+][...stay tuned :)