-----BEGIN PGP SIGNED MESSAGE-----
Mysol and Myinit v1.0
written in 100% SysRPL
by Balazs Fischer
Disclaimer
- ----------
These programs have no guarentees. They have been tested on a HP48G revision
P with no problems. I don't know if they will work on an S/SX series
calculator. I did not write them for SX's and there are no guarentees.
I take no responsibility for any loss of memory or damage these programs
cause to your calculator. Use at your own risk.
As always, BACKUP YOUR CALCULATOR BEFORE LOADING THIS PROGRAMS!! There is no
way of telling if a new ROM revision may cause this program to crash. It uses
one unsupported entry point. You have been warned. Nothing is guaranteed
except that the programs take space on your Calc. According to murphy's law
these programs will behave perfectly until you use them in an exam and then
they will give you wrong answers and bomb your memory :-).
Registration
- ------------
This programs are freeware but if you like them I would like to hear about it.
My email address is Balazs.Fischer@studbox.uni-stuttgart.de.
Installation
- ------------
1. Transfer mysol, myinit and delvar to your HP48G/GX using
Kermit/Xmodem/etc. (use binary transfer)
2. That's it if you want to you can assign the programs to any key you want,
I have Mysol and Myinit assigned to 62.5 and 62.6 (alpha left- and right
shifted 7) and Delvar to 55.5 (alpha left shift DROP)
If you want to make sure that the programs transferred correctly, place
them on the stack and run "BYTES". The following numbers should appear:
Mysol:
Checksum: #F781h [#63361d]
Size: 235
Myinit:
Checksum: #5D58h [23896d]
Size: 405
Delvar:
Checksum: #D74Dh [55117d]
Size: 112.5
Now what are these programs about?
- ----------------------------------
I found that the multi equation solver is pretty useful but veeeery slow. I
wanted to see if I could rewrite it faster if I leave out the bells and
whistles. Most of the time I don't need variable initialization, I never
use the MES with units and I don't have to know for which variable it is
solving in the moment. Also looking at the results is too slow for me when
you have to switch between the values and the equations. I wrote a little
userrpl program and it was already 2-3 times faster than the MES.
When not to use it
- ------------------
The program doesn't support units. It uses the internal root command and it's
guess is always 1. That means you should't use it if you want negative
results. MYSOL will not give you complex results (try 'A=sqrt(B)' with B=-1).
How to use it
- -------------
Store your equations in 'EQ' as a list (even if there is only one equation
store it as a list). Store all known variables (if A is 17.4 then do
17.4 'A' STO). NO MINIT needed!! Start MYSOL. If there are no errors it
returns 2 lists. The list on stack level 2 contains the unused equations,
if you add other variables you can store this list in 'EQ', this makes
solving faster. The list on stack level 1 contains your results in the format:
{ Equation_i
:Var_i: Result_i
.
.
.
Equation_1
:Var_1: Result_1}
So the variable first found is on the bottom (I did this because I use Java
and it display lists from the bottom). In case of an error MYSOL stops with
a External on stack level 6 lists on stack levels 3-5, an equation on stack
level 2 and the variable it attempted to solve for on stack level 1. Enter a
new guess and press ROOT (left shift 7, ROOT, ROOT). The other stuff on the
stack you need is the list on stack level 4 (this contains the values solved
for prior to the error). I did no real Error trapping because I think it
would slow down the program. There is an internal version of root and maybe
I will use it in the next version of MYSOL.
What is MYINIT?
- ---------------
I found that it is easy to make mistakes (typos) when you enter variables, so
I needed a programm to check if the vars I entered really exist in 'EQ'. This
is MYINIT. I also wanted to automatically do some stuff before using MYSOL
(like turning rad on). MINIT is the resulting program. MYINIT takes the first
object out of 'EQ' and evals it if is a program (this program should not
change the stack). If the first object is no program then it doesn't change
'EQ' If a list with even size is on stack level 1 then it tries to store
variables. The list should look like {Value Var Value Var...}.
And Delvar?
- -----------
Delvar simply purges everything left from the variable 'EQ' so don't use it
if you reordered you variables.
Examples
- --------
Store {'A+B=2' 'B+2=C' 'D=C+7' 'D=F^G' 'X=Y+7'} in EQ
Put {2 F 3 G 5 H} on stack level 1.
Execute MYINIT. You should see on your Screen
NO PROG EVAL
2 VAR(S) STORED
1 UNKNOWN VAR(S)
Press any key and on stack level one is the list {5 H}. The variables
F and G now contain 2 and 3.
Execute MYSOL
You get on stack level 2 {'X=Y+7'}
on stack level 1 {'A+B=2' :A: 3
'B+2=C' :B: -1
'D=C+7' :C: 1
'D=F^G' :D: 8}
That means first 'D=F^G' was solved for D and the value of D is 8,
....
and last 'A+B=2' was solved for A and the value of A is 3.
'X+Y=7' was not used. So if you now store a value for X you can store the
list on stack level 2 in EQ and the solver does't have to go through so many
equations where all variables are known.
Execute DELVAR
'EQ' A B C D F and G will be purged.
How to make MYSOL, MINIT and DELVAR faster
- -------------------------------------------
Get FAST (programm that increases the speed by 11% by turning the screen of,
written by Detlef Mueller).
I think it is also a part of GXTOOLS by Jack Levy.
You can hack delvar and replace Purge with Xpurge written by Bill Wickes
(also part of GXTOOLS).
Known bugs
- ----------
I don't use CKNOLASTWD because I want to make a library out of these progs
(in the far future). So errors will look like this:
XLIB XXXX YYY Error:
Errmsg
Just in case you wondered :-).
Credits
- -------
Thanks go out to:
Mika Heiskanen : JAZZ, entries.srt, timings.gx and stuff
Joe Horn : In one of the Goodies Disks there is a mail from him
with the unsupported entry point I use. Without this
it would have been a lot harder to write these programs.
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: cp850
iQEVAwUBMv4q/ZR2OBbtdEflAQFw5AgAklc+sTYRHLXt6IgMJu7XGuYuqTVuobZQ
RH9o7S5lZHBeJXmye4CMoAnBxPA20zwbTDUE5l2KyxfzHZDmzx6kfHXwxlWNQeAp
YI8cmpDdoCdRd+SNIqunfFRaGybfsWuj0ZBg9xVgjsC1Orblu/oOyCKSTXSKQ7fO
g0EY0xR7XIoWfTaz5l23XyrOQj0hOI81qCWBh5uPdEzVwkV2uQFQJyWk9WaV8LFy
aO7ytd6LpuBSX+PDC8ksX30SZUPMtGTCBSnhDcnmbo6Y0wTl24jX51xRs/2N6AKY
vs+r1CQ8pkxQVFvVpxz02JEtfY3q6ehpT206IIYdrkWcF4GToO8y7w==
=a58g
-----END PGP SIGNATURE-----