HP48 FAQ Section 4: Questions about the Operating System and Using the HP

Previous Contents Next

4.1 How do I find the checksum of an object?

Many documents (including this FAQ) make references to the "checksum" of an object. This is a 16-bit user binary resulting from a CRC calculation on the contents of an object. This binary is supposed to be relatively unique, with only 1 change in 65536 of accidental equal checksums on two different objects. This allows you to distinguish programs that look the same but may be quite different (even if the size of them is the same). It is also often used to verify correct transmission of files.

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.

4.2 I typed RULES on my G/GX and got a crossword puzzle!

From: Joe Horn

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.

The other names in the "Easter egg" above belong to:

4.3 Why does my HP48 occasionally "freeze" for a moment?

The HP48 must occasionally do "garbage collection" to free up unused memory, and it is this garbage collection that is causing the momentary "freeze". "Garbage collection" is where the HP48 scans through memory, looking for objects that are no longer used.

Using less stack supposedly makes garbage collection go faster.

The easiest way to force a garbage collection is to run MEM DROP. Otherwise you can use #05F42h SYSEVAL or the SysRPL command GARBAGE.

4.4 What do I do if my HP48 locks up?

  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:
  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:
  5. If this still does not work, it is possible that the HP is not responding because it is not accepting input from the keyboard. It is possible to execute a system halt without the keyboard using the hidden reset button. The reset button is hidden under one of the two upper rubber feet on the bottom of the calculator (it's under one of the two feet near the serial connector and I/R port). Note that the location of the reset button (under which foot) varies from calculator to calculator. If you gently pull out the rubber feet, you'll notice that there is a small hole under each foot. The reset button is located in the hole that has an "R" next to it. Once you've located the correct hole, you press the button by GENTLY sticking an unbent paper clip, into the hole with the "R" next to it. Hold for one second and remove.
  6. The next thing to try is a complete memory reset. Depending on the state of your calculator, this may or may not preserve the contents of memory. At the very least, even if the contents are preserved, the contents of the HOME directory will probably be moved into a new directory below HOME (HOME will be empty with the exception of this new directory); you'll have to manually move the items back into HOME. To perform a complete memory reset, press ON-A-F. This means:
  7. If that fails, you should still be able to induce a complete memory reset by removing your batteries and pressing ON several dozen times. This will drain the capacitor that stores information when the batteries are removed, and you should get a "Try to Recover Memory?" prompt if you have pressed ON enough times to reset your calculator. If this doesn't work you can try taking the batteries out for a few hours and then putting them back again. You should definitely try this method before even considering the next step!
  8. WARNING: the next method is HIGHLY unrecommended! Permanent damage to your HP can result if you try this. In particular, you could fry a couple diodes used to protect your HP48. You have been warned! If your HP48 does not respond to any of the above attempts, you might consider reversing the polarity of 2 of the 3 batteries VERY BRIEFLY, pressing ON, then correcting the batteries. Your HP48 should start with a "Try to Recover Memory?" prompt. Even reversing only 2 of the 3 batteries is dangerous, but it is safer than reversing all 3 batteries. Note that simply shorting the battery terminals will not discharge the storage capacitors. There are diodes between the battery terminal and the storage capacitors which prevent the DC current from flowing backward. This method apparently drains the capacitors and reverse charges them by running current through the parasitic input protection diodes in the various CMOS chips.
  9. If all of the above fail, or if you decide not to try the last step, you may have to contact Hewlett Packard for service.

4.5 My HP48 seems to take longer to turn on and off.

The usual causes for this are RAM/ROM cards and libraries. When you turn the calculator on, it checks RAM (the more you have, the longer it takes), and checks to see if any libraries need initializing.

Also, having a lot of alarms can supposedly also cause this.

4.6 What are all the different ON-KEY combinations?

From: Dave Arnett


In most cases, this will move you to, or toward, the stack environment.


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.


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.


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.


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.


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.


Cancels repeating alarms.


Screen dump utility.

ON+'+' and ON+'-'

Adjusts display contrast.


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.

4.7 What are the different interactive self-tests?

Pressing ON-D enters the interactive self test function of the HP48. When you first press ON-D, your HP will beep and you will see 3 vertical lines, one on each side of the screen and one in the middle. You can exit this mode with a Warmstart, ON-C. The tests are:


Displays CPU speed


LCD test. Press Enter to cycle through the tests


Internal ROM test


Internal RAM test


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".


Partial keyboard test


ESD test monitor. Battery status is shown by bars.


UART loop-back test


Wired UART echo


Shows what cards are plugged in. Press any key a few times.


Test RAM cards in ports


Blanks display


Sends system time from IR port


Receives system time from IR port (have another HP send it)


IR loop-back test


IR UART echo


Shows test start time


Shows test fail time

[U V W X Y Z]

Looping test


Initialize test times


Test summary


Enters memory scanner (SX only)

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.

4.8 Why do I get an ESD error when I check my batteries with the self test?

From: Detlef Mueller

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.

4.9 I can't account for some of the RAM in the HP48!

The HP48 S/SX/G have 32K base memory, and the GX has 128K. However not all this memory is available to the user. The operating systems uses memory for system variables, flags, fonts, last stacks, last arguments, last menus, and such. It also can be any one of a number of things:

  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 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:

  1. Download it into a variable of the calc.
  2. Place the library on the stack.
  3. Type the number of the port in which you want to store the library in. 0 is appropriate if you do not have any expansion cards.
  4. Press STO to store the library in that port.
  5. Turn the calculator off and then on, or press ON-C, to finish installation of the 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 them. For example, to delete a library 4 in port 0 you can add 2048 to the library number, as follows:

  1. Type :0: 2052 DETACH
  2. Type :0: 4 PURGE

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):


4.11 How can I attach large libraries?

If have just successfully transferred a library to your HP, and try to store it in a port you may get an "Insufficient Memory" error. This is because your HP is trying to make a duplicate copy to store in your port, but it doesn't have any memory to do so. This is especially true on the HP48 S/SX/G since they only have 32K of memory built in.

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 type the number, then CF.

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.

4.13 Can I use my HP48 as a remote control?

There are numerous programs available for using your HP48's IR port as a remote control. However, the level of support depends on the particular unit you wish to control. The HP48 is capable of reproducing many of the IR controls of many popular brands of appliances.

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:

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.

4.14 Can the HP48 be used as a DTMF phone dialer?

To make phone dialing tones, you need to produce two simultaneous tones. The tones used to dial phones are known as DTMF (dual tone multi frequency) tones, which consist of two tones at the same time.

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.

4.15 How can I run a program on warmstarts and/or power-up?

You can use some of the utilities available on the Goodies Disks (see Appendix E.5 on where to obtain these):

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.

4.16 I could speed up my HP-28S. How can I speed up my HP48?

You can't, really. Unlike the HP-28S, the clock speed in the HP48 SX is hardwired to 2 MHz, and to 4MHz in the HP48 GX.

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.

4.17 What is the hidden directory and how do I access it?

The "hidden directory" is a subdirectory of the HOME directory. It is created on startup, and it contains variables with your alarms and user key configurations. You can use the hidden directory to store whatever you want, however you CAN NOT ORDER the contents of this directory, as this causes memory loss.

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.

4.18 How can I recall one object from a memory archive?

From: Joe Horn

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.

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:


Or, you can RCL instead of EVAL, and it will be pushed onto the stack.

4.19 Are there any key combinations that aren't in the manual?

From: John Meyers

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!

4.20 How do I find out about commands not in the GX manual?

From: John Meyers

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!).

Some notes on omissions, however:

4.21 How can one delete (or purge) an entire directory?

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.

4.22 How does binary wordsize affect my calculations?

From: John Meyers

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.

4.23 Can I add my own equations to HP's Equation Library?

No, the Equation Library is in ROM, and can't be written to. There are several programs which allow you to create your own equation library such as EQBrowser, EQ Lib, Equation Manager, and xMGR.LIB. All of these programs can be found at http://www.hpcalc.org/hp48/utils/misc/.

Previous Contents Next

Part of the HP Calculator Archive - http://www.hpcalc.org/