HP48 Frequently Asked Questions List (FAQ) Questions About The Operating System and Using The HP
HP48 Frequently Asked Questions List (FAQ) Questions About The Operating System and Using The HP
HP48 Frequently Asked Questions List (FAQ) Questions About The Operating System and Using The HP
html
You can find the checksum of an object using the BYTES command. This will return you two things
- the size of the object in bytes on level 1, and the checksum on level two. Note that while the
checksum of a variable name is the same as running the checksum on the object itself, the sizes
will be differ by 4.5 bytes + the size of the variable name itself.
In rare cases the checksum of two objects can be the same, even if the objects are different. This is
due to the limited nature of the HP48's checksum function. You can use the SAME command in
these cases.
Many commercial programs (like Windows) have similar hidden screens that list the program's
design team. Since they are always so cute and well hidden, they are often referred to as "Easter
eggs". The RULES command on the G/GX is one such example.
Try using the RULES command. The names you see are as follows:
/----------------------\
| M G |
| P DIANA |
| CHARLIE X B D |
| BILL U N TED A |
| O A L N ALCUIN |
| B I JIM V |
| RON S E |
\----------------------/
ALCUIN was the HP-internal code name of the HP48 G during development, because Alcuin was
Charlemagne's teacher, and Charlemagne, as you remember, was the code name of the HP48 SX.
1 of 13 2/1/2023, 4:52 PM
HP48 Frequently Asked Questions List (FAQ): Questions about the Ope... https://www.hpcalc.org/hp48/docs/faq/48faq-4.html
The easiest way to force a garbage collection is to run MEM DROP. Otherwise you can use
#05F42h SYSEVAL or the SysRPL command GARBAGE.
1. First, check the batteries to make sure that they are installed correctly.
2. Next, try is pressing the "ON" key again and again very RAPIDLY. The operative word here is
"rapidly". It's possible to write a program that can only be interrupted during a very narrow
window, and so you must press the "OK" key again and again very rapidly to interrupt the
program. If the calculator doesn't respond within ten or so seconds, go on to the next step.
3. Press "ON-+" a couple of times, just in case the LCD display intensity was turned down. Here,
"ON-+" means:
◦ Press and HOLD DOWN the "ON" key.
◦ Press and release the "+" key, WHILE HOLDING DOWN THE "ON" KEY.
◦ Release the "ON" key.
4. If this doesn't work, the next thing to try is ON-C. This is a "warm-start" or "system halt". Note
that this will CLEAR the stack. Here, "ON-C" means:
2 of 13 2/1/2023, 4:52 PM
HP48 Frequently Asked Questions List (FAQ): Questions about the Ope... https://www.hpcalc.org/hp48/docs/faq/48faq-4.html
3 of 13 2/1/2023, 4:52 PM
HP48 Frequently Asked Questions List (FAQ): Questions about the Ope... https://www.hpcalc.org/hp48/docs/faq/48faq-4.html
initializing.
ON
In most cases, this will move you to, or toward, the stack environment.
ON+A+F
This is the manual Coldstart. It will break out of almost any hung program, and offer you the
dreaded option... "Try to recover memory?" Note that this is your next-to-last resort in a lock-
up, so don't give your machine this three-fingered salute unless you really want to possibly
clear memory.
ON+B
This is the Oops! key for ON codes. For many ON sequences, this cancels the operation, so
long as you press the B before releasing the ON key. Try it sometime, if you must, just so you
remember it. It can be a life-saver, in case of an accidental ON+A+F in process, or even
accidentally hitting ON during a plotting routine.
ON+C
This will initiate a Warmstart. You'll lose the stack and PICT, but it will often get you out of a
locked up program with memory intact.
ON+D
Enters interactive test mode. Back up your own machine and play around. Exit this test mode
with Warmstart, ON+C. See the next question for all the various tests available here.
ON+E
Starts a looping self-test mode. Kinda dull after the first five minutes, but it keeps a rather
solid tempo. Exit with Warmstart, ON+C.
ON+4
ON+1
4 of 13 2/1/2023, 4:52 PM
HP48 Frequently Asked Questions List (FAQ): Questions about the Ope... https://www.hpcalc.org/hp48/docs/faq/48faq-4.html
ON+SPC
Initiates Coma Mode and clears Warm Start Log. In Coma mode, all the clocked activity is
halted. The battery power drain is basically the few nano-amps [nA] necessary to sustain your
RAM contents. The Warm Start Log is a nearly bullet-proof area of memory which keeps track
of the last four hazardous events. View it using the command WSLOG. This log is one of the
few things not cleared by a Coldstart. But it is cleared by ON+SPC. Enter Coma this way if
you want to clear the Warm Start Log, if you are planning to study crystal healing in Tibet for a
few years and want to keep your pirated version of Tetris alive, or you just have a low power
fetish. Exit Coma mode with the ON key (tough to remember, huh?), and plan to find your
stack cleared out.
Two additional notes on this Coma stuff. First, I'm not gonna try to list the log codes in
WSLOG. Sorry! Second, if your machine is on, and you drop the batteries out, you will usually
end up in a coma mode to preserve power. WSLOG will not be cleared. Instead, you will find
a code 1 entry there. Some people are paranoid and want to be in Coma when they change
batteries, just in case they have a sudden emergency call from the Prime Minister and don't
get back to their battery change for a half hour. If you are one of these... shall I say, weenies?
No, that would be unprofessional ...users, then I recommend you use the ON+SPC entry
route, rather than the kamikaze method of dropping batteries with the machine running.
Myself, I just turn the machine OFF, like the manual says.
Now, a Coma story... sort of. During the G/GX development, I maintained a small number of
units on which I changed ROM chips as incremental code releases came out. This was so
folks like Bill Wickes and Jim Donnelly could have fully-real hardware to test, instead of just
the EPROM handsets some of you may have seen. We always backed up anything of
importance in the machine before we did this. But I got into the habit of using ON+SPC before
I opened up the calculator. Better than half of the time, I could remove the batteries, open the
case, desolder the old surface-mounted ROM chip, solder down a new chip, and reassemble
the machine... with all of RAM intact! When I pressed ON, I'd come right back up without a
"Try to Recover Memory?" prompt. Pretty good, huh? The folks who put that mode into the
machine certainly weren't in a coma.
[A]
[B]
[C]
[D]
5 of 13 2/1/2023, 4:52 PM
HP48 Frequently Asked Questions List (FAQ): Questions about the Ope... https://www.hpcalc.org/hp48/docs/faq/48faq-4.html
[E]
Keyboard test. Starting with [A], press all the keys in order, left to right, top to bottom. If all
goes well, the HP will show "KBD1 OK".
[F]
[G]
[H]
[I]
[J]
Shows what cards are plugged in. Press any key a few times.
[K]
[L]
Blanks display
[M]
[N]
[O]
IR loop-back test
[P]
IR UART echo
[S]
6 of 13 2/1/2023, 4:52 PM
HP48 Frequently Asked Questions List (FAQ): Questions about the Ope... https://www.hpcalc.org/hp48/docs/faq/48faq-4.html
[T]
[U V W X Y Z]
Looping test
[ENTER]
[DEL]
Test summary
[BACKSPACE]
When the HP48 is in test mode (ON-D or ON-E), the test results that are displayed on the screen
are also sent to the serial port at 9600 baud, 8 bits, no parity, 1 stop bit. This seems to be
unaffected by any settings in IOPAR, PRTPAR, or the system flags. I can only guess that this
feature was included for factory testing purposes. This does explain, however, why the I/O
annunciator lights up so much during the self test.
If your HP48 batteries are low, try this test with fresh alkaline AAAs. This test first records the CRC
of a RAM segment, then starts a loop where it creates power peaks and recalculates the CRC
again until you press a key or the CRCs differ. In the latter case one or more cells of your RAM
were "Electro-Statically Discharged" and the test exits with the last CRC done. If there's a hardwaer
problem, this number should differ in consecutive executed ESD tests - with fresh AAA alkalines!
Old ones or non alkaline batteries may cause trouble under this test condition.
If the test runs continuously, the bars on the screen reflect the battery status (low bat if bar is there)
of port 2 (below the 2), port 1 (below the 1), and the main AAAs (below 0). If the AAAs are very low,
the V bar comes up.
1. Enabling the use of LAST STACK, LAST ARG, LAST CMD, etc., uses up extra RAM, as the
calculator has to keep track of the last stack, arguments, command, etc.. This is particularly
important with LAST STACK if you have a large/complex stack, as the HP48 has to keep
7 of 13 2/1/2023, 4:52 PM
HP48 Frequently Asked Questions List (FAQ): Questions about the Ope... https://www.hpcalc.org/hp48/docs/faq/48faq-4.html
enough information around to recreate the stack after each operation. You can clear out these
variables by pressing ON-C (but also note that this will clear out the stack, the graphics PICT,
etc.)
2. From William Wickes, a member of the HP48 development team: Here's a candidate for
"most obscure way to use up memory on the HP48 SX." When a program executes DOERR
with a string argument, the string and hence the program too if the string is embedded in the
program are referenced for the sake of the ERRM command. Thus if you purge the program,
the memory used by the program is not reclaimed until the ERRM reference is updated to a
new string. If the string is in a port, you will get the Object In Use error if you try to purge the
library or backup object containing the string. A system halt prior to a PURGE will not help
unless the object is in port 1 or port 2 (it will reclaim memory held by a successfully purged
but still referenced object). For port 0 objects, the only way to break the reference is to
execute DOERR again with a new string.
3. Occasionally, I have had problems with libraries disappearing, but still taking up memory. I
found that an "ON-A-F" reset will cause these libraries to re-appear. If you still cannot account
for a large chunk of memory, I would suggest a hardware reset, after backing up your
memory.
4.10 What are the best methods for installing and removing
libraries?
To install a Library:
Sometimes you have to purge the variable containing the library before storing it in a port, if you are
low on memory. See the next question for more information.
If you have FXRECV installed: Just type a port number, hit FXRECV and the library will
automatically go into the specified port. All you have to do then in turn the calc off and then on to
complete the installation.
To delete a Library:
Say you have library 1234 in port 0 that you want to delete.
1. Go to the directory to which the library is attached. In most cases this will be HOME.
2. Enter :0: 1234
3. Press [ENTER] or type DUP
4. Type DETACH
5. Type PURGE
If this doesn't work, there may be a reference to the library still in temporary memory. Try
warmstarting with ON-C, then try again.
Libraries with very low library numbers may require the addition of a constant in order to delete
8 of 13 2/1/2023, 4:52 PM
HP48 Frequently Asked Questions List (FAQ): Questions about the Ope... https://www.hpcalc.org/hp48/docs/faq/48faq-4.html
them. For example, to delete a library 4 in port 0 you can add 2048 to the library number, as
follows:
Therefore, here is a fairly general program for detaching and purging most auto-attaching libraries;
the only required argument being the real library number (e.g. 218 in the above case):
\<< PATH SWAP HOME DUP 2048 + DETACH DTAG "&" \->TAG PURGE EVAL \>>
The solution is to push the library onto the stack, then purge the original variable containing the
library. At this point, the only copy of the library that exists is on the stack. Now you can store the
library in a port as usual. This method avoids temporarily trying to have two identical copies in
memory at the same time.
For example, say you have a library in 'LIB' and you wish to store it in port 0. You would enter the
following:
For the opposite problem - sending large libraries you can follow the reverse procedure. That is,
recall the object from the port to the stack, purge the original in the port, store it in a variable and
then send it.
Alternatively if the library is in a non-covered port (0/1/2 on SX or 0/1 on GX) you can use the
following simple program suggested by Dan Kirkland:
\<< -> lib \<< 'lib' SEND \>> \>>
This does not require a second copy of the library and avoids all the complications of trying to
purge a library and then re-installing it.
4.12 What are those little numbers near the top of my screen?
The little numbers are "user flags". When you or a program sets any of the user flags 1 through 5,
little numbers corresponding to the set flags are displayed at the top of the screen.
The HP uses negative flags for setting various modes and functions, while positive flags were
reserved for the use of the user. To set a user flag type the number, then SF. To clear a user flag
9 of 13 2/1/2023, 4:52 PM
HP48 Frequently Asked Questions List (FAQ): Questions about the Ope... https://www.hpcalc.org/hp48/docs/faq/48faq-4.html
Some programs will use the user flags without you being aware of it. So, if you have a "1" at the top
of the screen you can type 1 CF to get rid of it.
However, some remotes run at speeds that the HP48 is unable to reproduce. Due to their faster
processor speed, the G/GX calculators are able to support more remote controls but are still limited
in some cases.
With typical remote programs you have to "teach" your HP48 by sending it the various IR
sequences with the original remote control. There are some advantages to using your HP48
however:
• You can impress your friends that you can use your calculator to control your TV!
• You can set alarms to turn your things on and off at predetermined times.
• You can use it as a universal remote.
The best remote program by far is Remote by Bjorn Gahm. It has a large database of existing
remotes, meaning you may not have to "teach" your HP48 your specific remote if it is already
supported. However it also have the ability to learn new codes. See the best programs list (later in
the FAQ) for the specific URL.
The speaker in the HP48 is not capable of supporting the DTMF tones because it can only make a
single tone at a time. The best the HP48 can do is switch very quickly between one frequency and
another. Some attempts have been made in machine language to support DTMF, however they
have been unsuccessful. Therefore, you cannot use the HP48 as a phone dialer.
10 of 13 2/1/2023, 4:52 PM
HP48 Frequently Asked Questions List (FAQ): Questions about the Ope... https://www.hpcalc.org/hp48/docs/faq/48faq-4.html
Some stack libraries come with support for AUTOEXEC or an equivalent built in (for example, the
Java library supports AUTOEXEC). If one of the libraries you have installed supports such a
feature, you may not need any of the utilities above.
Digitalis http://www.Digitalis.de/ has a "speed-up" module available. They sell 48G's with this
module added (it looks like it adds about 50DM/$30 or so to the cost). I'm not sure what it does, but
I think it boosts the clock speed. Apparently it can be turned on and off as needed, at the sacrifice
of shorter battery life.
However, in some cases, you can speed up the HP48 by turning off the display refresh, which
supposedly takes up about 11% of the CPU time. Detlef Mueller submitted a program called
SPEED to comp.sources.hp48 that turns off the display refresh. Of course, since it turns the display
off, it is only suitable for long non-interactive runs like calculating large integrals, compiling, etc...
Look in the various HP48 archives for a copy.
The name of the hidden directory is a null character, ''. The only way to get a null character is to
use a syseval. You can use the following program to access the hidden directory:
<< HOME (changes to home dir)
#15777h (syseval to get null character)
SYSEVAL (returns '' to stack)
EVAL >> (changes to hidden dir)
To exit the hidden directory, use HOME or UPDIR. This will return you to the HOME directory.
Also, by putting the null character as a part of your HOME custom directory, you can switch right
into the directory by pressing the softkey.
Note: The SysRPL command NULLID returns a null character to the stack; it is the same as doing
#15777h SYSEVAL.
There is a little-known method of recalling objects from within archives. Just make a list
representing the PATH to the object, and tag the list with the port number. Then hit RCL or EVAL.
11 of 13 2/1/2023, 4:52 PM
HP48 Frequently Asked Questions List (FAQ): Questions about the Ope... https://www.hpcalc.org/hp48/docs/faq/48faq-4.html
For example, if your archive in port 1 is called BKUP, and it contains a directory called GAMES
which contains a program called REVERSI, you can run the game directly (without having a
separate copy of REVERSI stored anywhere!) by:
:1: { BKUP GAMES REVERSI } EVAL
Or, you can RCL instead of EVAL, and it will be pushed onto the stack.
• This method only works in ports 0 and 1 in a GX. It works on any port in the SX.
• This method works with directory objects stored as backup objects, as well as with the results
of the ARCHIVE command, because they are both really the same thing.
Yes, on the G/GX there are a few keys that aren't mentionned. They are:
[Right-shift] [View] is hidden in Appendix G (Operation Index) of the User's Guide [Edition 4] (which
comes with the calc), among the several entries for the word VIEW.
AUR [Edition 1] (in chapter 3, Command Reference, under SERVER) gives the alternate keys
[right-shift] [cursor right] (but of course AUR doesn't come with the calc). This alternative was left
out of Appendix G of the User's Guide. Donnelly's HP48 Handbook [2nd Ed.] even lists it first!
Besides purchasing the Advanced User's Reference Manual (AUR), you can look in Appendix G of
the G/GX User's Guide, which briefly summarizes every command available in the G/GX, including
all the commands not mentioned anywhere else in the User's Guide. Often even the brief
description given in this Appendix is sufficient for you to use the command (and to know it exists!).
12 of 13 2/1/2023, 4:52 PM
HP48 Frequently Asked Questions List (FAQ): Questions about the Ope... https://www.hpcalc.org/hp48/docs/faq/48faq-4.html
PGDIR.
• To purge all variables in the current directory, but not the directory itself, type CLVAR.
Note that with CLVAR, if the current directory contains a non-empty subdirectory, an error occurs at
that point, and no subsequent variables are purged.
Some of the following (but not all) is in the User's Guide, under "Binary Arithmetic and Number
Bases" (Chapter 15 of G/GX).
The system flags contain a segment which specifies a "binary word size". This word size limits how
many low-order bits of a binary value are displayed on the stack, and equally determines how many
low-order bits of the arguments and results of binary arithmetic/logical/shift operations are used.
Curiously, the binary word size has no effect on entering values into the command line - what you
originally enter is displayed in truncated form on the stack, but when you view it again in the
command line (which temporarily reverts back to STD numeric display and 64-bit wordsize) you will
find the complete value as entered is still intact.
As soon as you begin using functions on that value, however, the arguments to binary functions get
truncated to the current wordsize before the functions are executed, and then the final result of the
function gets truncated again.
You can recall the current wordsize using RCWS and set the wordsize using STWS. STWS accepts
a real number argument in the range 1-64 (out of range values get adjusted to either 1 or 64), and it
also accepts a binary argument, in which case the absolute value of the low-order 20 bits is used
(just in case you wondered why #1048576d STWS RCWS gives an answer of 1).
Don't try adjusting the binary wordsize in the hope of saving memory by using shorter values; every
"user binary integer" (type 10) produced by User RPL occupies 13 bytes, no matter what the
current wordsize; the HP48 just sets the leading bits to zero when displaying on the stack or
performing calculations.
13 of 13 2/1/2023, 4:52 PM