Kjetil <el9
...@lhg.hib.no> writes:
>I have a problem whit those programs. When i have both installed at the
>same time I loose all my memory when i am using cont to end the EQSTK.
>I have been using EQSTK v5.3 for a long time whit no problem, it is a
>realy nice program, but when i uppgraded to v9.0 and installed TED v3.1
>and UFL 101 my calc crashes. I have a HP48SX whit an 128 K ram card. I
>have also installed ALG48 and Algb, but the problem first came when i
>installed TED.I Now i have lost my memory three times in tree days.
>Is ther anyone who know what to do.
>I need help.I have also tried whit EQSTK v5.3 but it didnt help.I realy
>like the programs and I need them for my exam.
This is probably the bug which most stack replacements have in common, namely
executing an alternate environment by typing the name instead pressing the
respective menu key may or may not cause trouble depending on the current
settings in the stack save.
Here's a report I got from Joe Horn on the BLIND program:
> When launched from a menu key, all's well. But when launched by typing
> its name into a command line, it does not exit (via CONT) properly. It
> usually warmstarts, but I'll bet two cents that if the phase of the moon is
> right it'll get a Memory Clear.
And my answer was:
----------------------------------------------------------------------
This bug is due to the annoying use of LAM's when the editline is terminated.
When this happens the keyhandler saves the last KeyOb to 1LAM and evaluates
the editline as is - then recalls the 1LAM to evaluate the actual key
which terminated the editline. In the simple case of enter key the 1LAM
would actually only contain NOP.
What makes it annoying is that one cannot easily obtain information on how
a program was started. For SOL's the difference is that they also have to
handle stack saves, and this of course happens by creating a new lambda
environment. The keyhandler itself of course still expects 1LAM to contain
the KeyOb which terminated the editline, thus when the SOL exits it must
o Either leave the saved stack as it is for the SOL below
o Abandonn it so that 1LAM becomes visible
In this particular SOL I have now finally made an exit which should always
work - even UNDO immediately after the exit. This probably is not the case
with all SOL's - including those by me..
For your benefit I have included the source code of BLIND since the program
is not disassemblable due to assembly language jumps. However I do use a
personalized entry table which probably would make assembling the source
a bit hard for other people.
The crucial part is after the BEGIN-UNTIL loop
UNDO_TOP? IT ABND ( Abandon saved stack from this SOL )
TEN GETLAMPAIR ( Recall first lambda variable )
casedrop CacheStack ( Handle the possibility of no 1st lam )
UNROT2DROP ( Leave lambda name on stack only )
EQ: PTR 5A777 ?SEMI ( Abort if it is the KeyOb save )
CacheStack ( Else save stack again if necessary )
;
Note that an exit like this is only necessary when stack saves complicate
things - it is not necessary in regular programs.
I should note though that if the SOL is started by typing the name then
a subsequent UNDO after exit will restore the stack which one had right
before the SOL whereas UNDO after exiting a directly executed SOL will
do nothing since the stack is saved at exit. Changing the behaviour to
be uniform does not seem worth the extra code.
----------------------------------------------------------------------
Environments like EQSTK which bind their own local variables should also add
an extra ABND:
UNDO_TOP? IT ABND ( Abandon saved stack from this SOL )
ABND
TEN GETLAMPAIR ( Recall first lambda variable )
...
I am planning to fix this today, and also implement some checks on system
flags to trace any changes in system flags which affect display modes so
that the cache is cleared automatically. Version 9.1 should be available
from http://www.hut.fi/~mheiskan fairly soon.
--
---
--> Mika Heiskanen mheis...@gamma.hut.fi http://www.hut.fi/~mheiskan