Re: (Long) What is a warm start? and HP48 rant Message #5 Posted by James M. Prange on 23 Mar 2004, 8:15 a.m., in response to message #4 by bill platt
Quote: Begs the question: just why did HP leave so much room for
improvement, anyway?
Didn't Bill Wickes once write "Life is short and ROM is full."?
The 48 series calculators are still amazingly useful products with
just the built-in operating system. Sooner or later, you have to
abandon or shelf the project or else decide that the current design is
good enough and start manufacturing and marketing the product. How
many products would be available if we waited until all designs were
beyond improvement? It seems to me that we'd still be "naked apes",
perhaps discussing what the "perfect" design for some sort of clothing
would be. Maybe chimpanzees are the real perfectionists.
Quote:
But I keep hearing this term "warm start" and I don't know what it
means---it doesn't say that word anywhere in the manual that I can
find. Can you please explain this term? And how about the other
starts--if there is a "warm one, is there also a "cold start"? I must
be doing it, because all my "libraries" are obviously attached!
Sorry about that. I think that the manuals mention the [ON] and [C]
keypresses together operation to exit the system tests, but I don't
know that they bother to give it a name. And yes, the 48 series
automatically does the warmstart for you, if you haven't already done
it yourself.
I suppose that a "cold start" would be just turning the calculator on
when none of the conditions (mentioned below) that would cause a
"warmstart" are present. Or maybe that would be a "hot start", with a
"cold start" being a complete Memory Clear.
What's commonly referred to as a "warmstart" is what Bill Wickes calls
a "system halt" in his "Insights" series. The "Try To Recover Memory?"
event is commonly called a "TTRM". This will tell you more than you
asked for, but I think that it's all good to know. The "father of RPL"
explains it better than I could, so plagiarizing from "Insights":
Quote:
Calculator Resets
The HP48 provides a special operation, called a memory
reset, that clears all global and port 0 variables and
restores all of the calculator's default modes. Part of the memory
reset is a system halt, that by itself resets the
HP48's execution without affecting stored objects.
A system halt is obtained by pressing [ON] and the [C] menu key
together. This operation does all of the following:
- Aborts all current execution;
- clears the stack, the return stack, all local memories, last
arguments, the recovery stack, the command stack, and the graphics
display;
- turns off user mode;
- sets the last error number to zero and the last error message to
an empty string;
- detaches all libraries currently attached to the home directory,
and executes the configuration programs of all libraries in the
various ports;
- reestablishes the home directory as the current directory;
- activates the MTH menu;
- leaves global or port variables, alarms, and key assignments
unchanged. All flags are also left unchanged, except flag -62, which
is cleared.
A system halt is performed automatically when you turn the HP48 on, if
you have stored or removed any libraries from any ports since the
previous time the HP48 was turned on, or if you have inserted or
removed memory cards, or changed a RAM card's write-protect switch
position. This ensures that there are no references remaining to
library objects that you may have removed.
A memory reset, for which you press the [ON], [A],
and [F] together, starts by executing a system halt. Then the HP48
displays
Try To Recover Memory?
YES NO
If you see this display when you turn the calculator on, or at any
other time when you have not deliberately performed a memory reset, it
indicates that the calculator has detected a corruption of memory
contents such that it can not continue normal operations without at
least a partial memory reset. This corruption can be caused by a
hardware fault, including the effects of static electricity, by the
execution of a SYSEVAL with an incorrect system address, or just by
defective built-in or add-in software.
If you choose [NO], the HP48 performs a complete reset, deleting all
global variables, port 0 variables, key assignments, and alarms and
resetting all flags to their default values. The calculator displays
Memory Clear when it is ready to resume manual operation.
If you choose [YES] at the Recover RAM prompt, the HP48
attempts to recover or restore as many user memory and port 0
variables as it can by scanning through memory for recognizable
objects. If it detects a valid user memory, then it can usually
restore it unchanged, except that key assignments and alarms are
always lost. If it finds invalid objects, it discards them and
rebuilds as much of the user memory structure as it can. In some
cases when the home directory itself is corrupt, subdirectory objects
there can be reconstructed, but they lose their names. The HP48 makes
up variable names for these directories, naming them D.01, D.02, and
so forth. When the automatic reconstruction process is finished, the
standard display is restored. Then you can inspect the VAR menu to
determine how much of user memory is intact.
During variable reconstruction, the HP48 looks for library objects in
memory to try to determine where port 0 begins. Unfortunately, if it
encounters a library that was stored in a global variable, it takes
that as the start of port 0, which means that some part of user memory
will be discarded. For this reason, you should not keep libraries in
user memory for long term storage--store them in a port instead.
Note that the 49 series don't do a warmstart on turn-on just because
libraries stored in the ports have changed since the last turn-on, so
you have to force the warmstart, and it seems that purging a library
from a port automatically detaches it first. Of course, if the new
library doesn't have a configuration routine, you'll have to use an
ATTACH command, and if all that the configuration routine does is to
attach the library (the usual case), then you can use ATTACH instead
of a warmstart. And of course the 49G doesn't have cards, and although
the 49g+ has an SD card, you can't have an attached library in the
card.
Ordinarily, all keys except [ON] are put into the key buffer as soon
as they're pressed, and execution continues, and the buffer is
accessed when the system is next ready to take something from it. But
the [ON] key is different; when you press it, all execution (except
changing the LCD darkness for [+] or [-] and system tests) stops until
you release [ON] (and all other keys pressed while it was down), and
which operation occurs then depends on what (if any) other keys have
been pressed while the [ON] key was down. Note that in the
[ON]-[A]-[F] memory reset operation, you have to release the [F] key
before the [A] key, or else you'll go into the [ON]-[F] test mode. If
you've pressed [ON] and some other key, but change your mind before
you've actually released [ON], then press and release [B] before
releasing [ON] to cancel the operation.
A warmstart may be needed if a buggy operating system or misbehaving
program (or library) "hangs" the calculator. Or if you happen to
assign keys such that you can't otherwise get out of user mode, such
as 0 DELKEYS 'S' DELKEYS for example. It's also used for getting out
of the various system tests.
But sometimes the crash is so bad that even the [ON]-[C] operation
won't work. A warmstart can also be forced with a "hardware" (AKA
"paperclip") reset through the hole marked "R" under one of the upper
feet on a 48 series, or the hole in the back of a 49 series. Note
that, as long as memory hasn't actually been corrupted, this doesn't
cause a TTRM, just a warmstart.
A paperclip reset also adds an entry similar to "C-03/20/04 21:35:31"
to the warmstart log (execute WSLOG to put it on the stack), where the
"C" indicates "Hardware reset occurred (for example, an
electrostatic-discharge or user reset).", and of course the rest is
the date and time that it occurred. A warmstart invoked from the
keyboard, or a warmstart due to a library or port change at turn-on,
doesn't affect the warmstart log.
As I mentioned in my earlier post, on the 49 series, holding down the
backspace key through a warmstart bypasses the library configuration
routines.
Most libraries seem to include an ATTACH command as part of their
configuration routines. But sometimes libraries use "unsupported"
entry points, and when a new flash ROM is released for a 49 series,
the entry point will have moved, so the library doesn't work anymore.
Trying to use a library intended for a different model may well be a
problem too. And of course some may be corrupted or are just plain
buggy. Sometimes the library will auto-attach and hang the calculator
immediately after a warmstart, or repeatedly warmstart, or repeatedly
TTRM regardless of whether you press YES or NO, before you can purge
the library or even turn the the calculator off, and those are the
main reasons for bypassing the configuration routines.
On the 49G, [ON] and [D] together gets you to the "Tests" screen, and
from there, pressing [Q] for "Reboot" does a warmstart. On the 49g+,
[ON] and [F] together gets you to a different tests screen, and from
there, pressing [ON] for "REBOOT" does a warmstart. I find it easier
to hold down the backspace while pressing one of these warmstart keys
than doing [ON] and [C] together and then (trying to) press backspace
after releasing [ON] but still early enough in the warmstart routine
to be effective.
The 48 series doesn't have a built-in way to bypass the library
configuration routines, but there are applications available to do
this; try hpcalc.org if you want one.
Regards, James
Edited: 23 Mar 2004, 9:10 a.m.
|