HP Forums

Full Version: HP-41c(V/X) memory testing...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Hi all,

I'm looking to see if anyone has already written a program to run through all the memory which might be present in a 41, writing and reading to test the memory is OK.

Any ideas? Failing that, I suppose I'm gonna have to get writing!

ttfn...happy Friday afternoon!


Standard solution is a SIZE 000 and PRGM
in order to see the available registers in program memory :
63 for a C and additional 64 for each Memory Module (256 for a QUADRAM)
319 for a CV/CX
if there's no key assignment, alarm or program
To be continued ...

Edited: 15 Oct 2004, 10:42 a.m.


If you wanna give this a try...

SF 25
(your pattern number)
ENTER^ (this ENTER was missing)
LBL 00
FC? 25
GTO 02
X!=0? (!= means "different")
GTO 01
GTO 00
LBL 01
LBL 02
I did not test it because I wrote it now. It is too simple, I know, but maybe it will give you a hint of what can be done.

If it does not work and some good soul finds the cause, please, feel free correcting it and posting, please. I'm in a rush, now.


Luiz (Brazil)

Edited: 15 Oct 2004, 7:39 p.m.

Hi there Luiz,

Thanks for that.
I have typed it all in and can run it but I'm not sure what it's doing...could you explain it, if you have a bit of time spare?

Many thanks!


Yes, I know such a program. It is built in the HP-41 and executed every time you switch it on. NO! Sorry, I have to correct: at MEMORY LOST only.

0255: 0AE A<>C   ALL     
0256: 270 RAMSLCT
0257: 0AE A<>C ALL
0258: 2F0 WDATA
0259: 1A6 A=A-1 X
025A: 3DB JNC -05 0255


Edited: 19 Oct 2004, 8:38 a.m.

There's a somewhat more thorough test in this thread:

Most of the simply memory test programs (including the 41C coldstart memory test) will succeed even if a fair number of register bits are stuck at zero. The test program in that thread is not exhaustive but does store values (resulting from trig functions) that exercise many more of the bits. It's also slower, though.

Hi, Jason; thank you for your interest. What I guess helps more than adding comments is a stack trace. But these are just my thoughts, please, feel free asking for additional explanations. I'd gladly comment it.

As Eric have correctly posted, this is just a simple program and does not effectively test all bits in memory. It is necessary to add some sort of "sweep" in data range. Also, the HP41 system tests for higher existing memory address (register) and highest contiguous program RAM. It is easily seen when you remove a standard memory module from an HP41C that contains program data. At the first attempt to turn the calcualtor ON results in immediate MEMORY LOST. But it is acceptable having gaps in register area. Also, there are some synthetic code that allow checking for memory SIZE and, surely, for memory integrity. What I wanted most was to give an example that it can be done with a simple code (and check if my brain cells in the 'HP41 programming area' still respond to external stymulus...). At least it's been fun to program and debug without using the calculator to check it. I confess I did not load it yet and ran it. But I was able to trace it...

                  L        X          Y          Z          T
01 LBL`MTST ? ? ? ? ?
02 SF 25
03 pattern ? patn ? ? ?
04 ENTER^ ? patn patn ? ?
05 - patn 0.00 ? ? ?
06 LBL 00 patn cntr ? ? ?
07 LASTX patn patn cntr ? ?
09 FC? 25
10 GTO 02
11 RCL IND Y patn patn(r) patn(o) cntr ?
12 - patn(r) (o)-(r) cntr ? ?
13 X!=0? patn(r) (o)-(r) cntr ? ?
14 GTO 01 patn(r) (o)-(r) cntr ? ?
15 1 patn 1 0.00 cntr ?
16 ST+ Z patn 1 0.00 cntr+1 ?
17 RDN patn 0.00 cntr+1 ? 1
18 RDN patn cntr+1 ? 1 0.00
19 GTO 00 patn cntr+1 ? 1 0.00
20 LBL 01 patn(r) (o)-(r) cntr ? ?
21 'ERROR!
23 LBL 02 patn patn cntr ? ?
24 'REG=
27 END patn patn cntr(last reg)

If the stack diagram fails explaining, let me know and I'll add comments. In time: (o) and (r), from line 11 on, are respectively (o)riginal and memory (r)etrieved pattern.


Luiz (Brazil)

Edited: 19 Oct 2004, 11:45 p.m.


Many thanks Luiz...that does indeed explain what's going on. It was actually working fine but I had set SIZE 000 some time in the past so it ran rather quickly!

Setting SIZE nnn, where nnn!=000 give much better results. :-)

I will now begin work on somethingthat exercises all bits in the whole of the adressable memory and I will post the results here, of course!



Hi, Jason;

in fact, if you set SIZE 000 there are no registers to be tested, and all remaining main memory (about 2KBytes for the CV/CX or C with all memory modules or one quad mem moule) is set to programs, alarms, function assignments OR some 'transcendential' thirdy-part functions. Wit SIZE 000, my programstops without testing any register because there is none available: after finding FC? 25 (step # 09) for the first time, it jumps to LBL 02 and stops because STO IND Y (step # 08) found no exisiting R00 to store the pattern so flag 25 is cleared (error "detection" flag). Hence, no futher STO/RCL neither comparisons are performed.

Just a question: are you new for the 41 system? Please, this is just to know, no offense neither a bothering question. There is a universe of teasing and mysteries related to it. This is just about to be the first step after openning the door... or falling into the rabbit's hole!

Cheers and success.

Luiz (Brazil)