Some facts about the USPS module


Hi, all.

For those of you interested on this particular subject, I briefly inspected the USPS u-code functions (user coded programs) and collected some facts. Because all U-code programs are PRIVATE, I consider that listing them publicly is infringement; then I'll just comment the facts as general observations, OK?

This is the little beast -

All of the following observations are based on the assumption that the calculator is an HP41CV or an HP41C with one quad memory or two dual memory modules - not a 41CX -, no X-Functions module is plugged in it and only one X-Memory is plugged in the calculator along with the DEL. SERV 1 ROM module. If there is any other module than the DEL. SERV 1 plugged in the HP41CV, it is also assumed that there are no conflicting XROM numbers nor functions/labels names. This is just to avoid any further information conflict, OK?

By executing u-code function 'L', a single 235-register long data file named 'DS' is created, meaning that it 'eats up' all of the XMEMORY and, if installed, a second XMEMORY module will not be used by the module’s functions. It is important to notice that if only one X-Memory is plugged in, creating data files by your own with the USPS’ XMEMORY functions will not allow the programs using these resources to perform correctly. I did not check it completely to make sure if there are parts of it that might work without the XMEMORY (at this point some documentation would help...)

User memory is also entirely used because some of the programs in the module take register R317 as index. If SIZE is less then 318 these programs will not run. I can only think of the fact that the remaining user memory – 1 register and 4 bytes - is left for key assignments, a maximum of two.

One particular fact called my attention: except for SEEKPTA, the U-code programs 'invoke' the XMEMORY handling functions by their names, not by their XROM numbers. I suspect of one reason for that but I am not quite sure. Is it possible that, if the USPS module is used with an HP41CX or with an HP41C/CV with an X-Function module, the original X-Functions will be used then? I remember that the HP41 manual states that the user can write his own custom versions of internal functions because once you execute them with [XEQ] [ALPHA] name [ALPHA], the calculator would first search for it in user memory; if not finding it in user memory, then it would search for the name amongst internal resources. Since the USPS’ programs originally run in ROM, I am not sure if the search for the global labels CRFLD, GETX and SAVEX will follow this scheme. If so, the module will work with no conflicts with an HP41CX or with an HP41CV with an X-Functions PLUS an X-Memory module (‘DS’ file will still be created with 325 registers). Chances are that in the case of using the USPS module with a X-Functions module, the USPS module should be plugged in a higher-numbered port (documentation, please?).

CLFL is not used in any of the U-code programs in the module, so ‘DS’ contents are not cleared by regular program execution. I’d guess it must be explicitly performed by the user, though. It might also be performed by some 'housekeeping' (as mentioned by Àngel Martin in a previous thread) when the calculator is turned on, possibly if a particular key is pressed (as it happens if [ENTER] is pressed when the calculator is turned ON and the -MLDL ROM is installed).

These are the facts I could bring up from briefly inspecting the u-code in the USPS module. I would like to know if it is logical to conclude that the module was produced by Hewlett-Packard just because it has a regular HP identifier – 82500B-A38 – and in this case I guess it would be easier to understand why it implements the XMEMORY access in such a way.

If there is anything else that might be added, I’d very much like to know. Also, if there is anything wrong or wrongly written here, PLEASE let me know. I appreciate any comments, corrections and additional facts.


Luiz (Brazil)

Edited: 11 Nov 2012, 9:27 a.m.


Hi Luiz, excellent summary, thanks for a nice article. I'still trying to get to this - maybe in a few days...


Hi, Ángel.

Thanks for your follow-up.

One correction about the 'housekeeping' that I should add. I took an HP41CV with nothing but an X-Memory module and an MLDL2000 with the USPS ROM image and a few other images so I could clear all of its memory and set SIZE 000. After turning it ON, the [WORKING] message was briefly shown and then I turned program mode on:

[.END. REG 318]
meaning that one register is taken by the module. Also, the calculator was set to USER mode. Because I had the CCD ROM running I tried CAT 6 and U-code function 'L' was assigned to [EEX].

So far no news.


Luiz (Brazil)


Well this is an interesting module indeed. First issue I got was with the ROM image file from TOS, which has the first word wrong: it should be 015, but it is 115. I thought my copy got corrupted but the same error exists on the copy from the CL library.

I've sent you an email with the code from the Polling points from the lower page section. It's very similar to other HP Custom ROMS, almost the same identical code to do the Key assignments and other housekeeping. The irony is that there's only ONE key assigned, a lot of code for so little outcome!

Besides that there are three other routines (at xF67, xF69, and xF9C) executed at start up. And the polling points for I/O_SVC and CALC_OFF are also active. More yet, the I/O_SVC is active on BOTH pages... feels like an overkill to me, maybe there was a reason for htat but I still haven't dug deep enough to tell.

To be continued...


Hi, Ángel.

Thank you for your follow up.

I had already mentioned the XROM number problem to T.O.S. webmaster and there is a corrected version already available there.

I just got home now, will open the e-mail and answer you ASAP. I guess we'll have some material here to increase the skills - at least mine - about the use of X-Memory. I wonder why not to rewrite the necessary portions of the X-Functions (maybe some subroutines) and allow it to work as ROM image accessing the X-Memory area of the X-Memory modules only. This would give us at least 476 registers of X-Memory, i.e., 124 registers shorter than the 600 tops. Yep, less X-Memory, but we'd not need a physical X-Functions module, only a modified ROM image.

Just wondering...


Luiz (Brazil)

Possibly Related Threads...
Thread Author Replies Views Last Post
  HP-80 History, Design and Interesting Facts BShoring 1 1,047 11-30-2013, 08:50 AM
Last Post: Xavier A. (Brazil)
  DEL. SERV 1 (USPS) module: I didn't see that coming... Luiz C. Vieira (Brazil) 4 1,323 11-09-2012, 01:29 AM
Last Post: Ángel Martin
  USPS hpnut 9 2,338 09-08-2011, 02:29 PM
Last Post: John B. Smitherman
  New facts on HP-42S J-F Garnier 5 1,315 04-12-2002, 03:44 PM
Last Post: Frank Travis

Forum Jump: