The Trigonometry Machine v3.6

The Trig Machine v3.6




BASIC Version ASM Version
Author
Kevin Selkowitz Morgan Davies
E-mail
kevinselkowitz@wa.freei.net morgan@ticalc.org
Title
The Trigonometry Machine v2.5 The Trigonometry Machine v3.6
Size
4850
2274
Date
February 2, 1999
May 13, 2004



1. Introduction - Description of Program
2. Key Commands
3. Improvements Upon BASIC Version
4. Improvements Upon ASM Version 3.4
5. Special Thanks
6. Need Help With ASM




Introduction - Description of Program

THE ULTIMATE TRIANGLE SOLVER! Simply stated this program will solve for any angle or side of a triangle that you don't know. Input any variation of 3 different angels or sides and the program will automatically find and solve the resulting unknowns. The program also displays an option of viewing the area of each triangle. There are two different ways to view the results, including a graphical display and a list option. In addition the program also checks and makes sure that the triangle is in fact a real triangle. An error is displayed if it is not. This is a direct ASM port from the BASIC version and is 53% smaller in size and of course runs faster. It looks and acts exactly as the original does and includes a "teacher key" and exit key from any menu.



Key Commands

Keys
Sides Input Menu
Angle Input Menu
F1
Change to Angle Input Menu
Change to Side Input Menu
F2
Change View between list and GUI view
Change View between list and GUI view
F3
Input Side 'a'
Input Angle 'A'
F4
Input Side 'b' Input Angle 'B'
F5
Input Side 'c' Input Angle 'C'
Exit
Exits Program
Exits Program
Alpha
Teacher Key
Teacher Key
More
About the ASM Port
About the ASM Port

~~~

Keys
More Than One Answer Menu Only One Answer Menu - Most Likely to Occur
F1
Goto the Next Answer
Restart the Program - Solve for a Different Triangle
F2
Change View between list and GUI view Change View between list and GUI view
F3
Display the Area of the Triangle Display the Area of the Triangle
F5

Exits Program
Exit
Exits Program Exits Program
Alpha
Teacher Key Teacher Key



Improvements Upon BASIC Version

  • The size of this program (v3.4) is 2274 bytes which is less than half the size of the original. This is due largely in part to Lite 86 II written by Kirk Meyer. From past experience I have optimized my programs and then compared my optimization to the compressed file by Lite 86 II and my version was always slightly larger. Thus I have learned to not optimize my programs. Using Lite 86 II on this file cut 3312 bytes off the size of the program. So yeah...THANKS Kirk :-)
  • The Basic version did not offer many places to exit the program. I added to ability to press the Exit key from any menu to quit the program. In addition there is the teacher key which quickly shuts down the calculator.
  • Believe it or not there were in fact errors in the BASIC version. There were areas on the original that would result in an endless loop and the user would ultimately have to press [On] to exit the program. This only happened when the program couldn't calculate the other angles and sides because the numbers input could not possibly result in a triangle. I fixed that and added a small routine that displays the error if three angles were input since no side length can be determined.
  • And of course the program is FASTER!!! Not that the original was too slow, as it actually had a reasonable speed, but faster is always better :-)



Improvements Upon ASM Version 3.4
  • Well you may have not noticed, but there is a very cool intro page :-) Ok, that isn't all necessary, but I wanted to add it.
  • When you are inputting the number values that you know it will now show you all the variables in the GUI view, as well as the real values that you have entered.
  • You can now exit from any results menu not just the last one.
  • Still adding more...do you have any? If you do you should tell me!



Special Thanks

  • Kirk Meyer <kirkmeyer@bigfoot.com>
    • The provider of Lite 86 II. What can I say it is the best compression utility available for the 86 and has not disappointed me yet.
  • Cullen Sauls <sauls@tamu.edu>
    • Thanks for helping a pleading cry. He assisted greatly in solving the problem I encountered with the routine that stores numbers to real variables. Check out Cullen's author profile at ticalc.org. He has produced some very great stuff for the 86. Thanks! (NOTE: If you were looking through the code for those routines they are no longer there. I found a more efficient method of storing the numbers I needed. However his assistance got my project off the ground, and without it I may have never finished the program.)
  • Michael Vincent <michael@radicalsoft.org>
    • Assisted in helping me solve a problem occurring when exiting the program. I am in your debt :-)
  • David Straney <straney@umbi.umd.edu>
    • I owe David more than anyone. Because of David I now have a very efficient method of storing the numbers I needed. In order to make this program work I needed to save almost 15 numbers and have them accessible at any given point in the program and David showed me how to use the unused space in _plotSScreen. Through that you can save nearly 100 numbers and easily get that at any given point. If you were curious how I was doing this before, I was actually creating real variables on the calculator and recalling the real variables when I needed them. With David's method I shaved off another 175 bytes on the program. Thank you!



Need Help With ASM

If you are wanting help with any part of 86 Assembly math or any of the code used in this program feel free to contact me. I love helping out. It gives me an opportunity to learn if I don't know how to do it already. I might be willing to help a bit with some other z80 ASM as well. So like I said, feel free to contact me. I have AIM and am on quite a bit. My screen name is Morgazum85.

That's about it. Thanks for downloading and please feel free to use segments of code if you wish, but please give credit. Thanks for downloading and feel free to give the program to anyone you want! :-)