HP-41c(V/X) memory testing...


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!



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)


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.


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.

Possibly Related Threads...
Thread Author Replies Views Last Post
  Testing card reader motor for 65 Michae Altmann 2 1,250 03-17-2013, 09:24 PM
Last Post: Randy
  [WP 34S] New GCC - Testing required Marcus von Cube, Germany 3 1,186 01-07-2013, 01:59 PM
Last Post: Marcus von Cube, Germany
  Testing the water Ken McPherson 0 701 08-07-2012, 09:18 PM
Last Post: Ken McPherson
  41 User Memory vs System Memory Gerry Schultz 6 1,894 07-01-2012, 12:02 AM
Last Post: Monte Dalrymple
  NCEES and Computer Based Testing Richard Garner 2 1,011 04-10-2012, 07:14 PM
Last Post: Steve Fennell
  WP 34S: Memory Allocation - New Document / Testing Marcus von Cube, Germany 0 636 11-09-2011, 11:48 AM
Last Post: Marcus von Cube, Germany
  Fully testing HP 41 Le Babou 7 1,671 10-23-2011, 08:59 AM
Last Post: Allen
  WP 34S: Some testing required Marcus von Cube, Germany 27 5,664 10-15-2011, 11:15 AM
Last Post: Marcus von Cube, Germany
  OT: Help with Testing Random Number Generators Namir 5 1,512 08-01-2011, 11:20 PM
Last Post: Paul Dale
  Testing functionality of older HP calculators Pat Slattery 2 880 05-25-2011, 09:18 PM
Last Post: Pat Slattery

Forum Jump: