The Museum of HP Calculators

HP Forum Archive 14

[ Return to Index | Top of Index ]

HP-41c(V/X) memory testing...
Message #1 Posted by WigglePig on 15 Oct 2004, 10:26 a.m.

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!

WigglePig

      
Re: HP-41c(V/X) memory testing...
Message #2 Posted by Emmanuel, France on 15 Oct 2004, 10:40 a.m.,
in response to message #1 by WigglePig

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.

      
Re: HP-41c(V/X) memory testing... EDITED!!
Message #3 Posted by Vieira, Luiz C. (Brazil) on 15 Oct 2004, 3:32 p.m.,
in response to message #1 by WigglePig

Hi;

If you wanna give this a try...

LBL`MTST
SF 25
(your pattern number)
ENTER^  (this ENTER was missing)
-
LBL 00
LASTX
STO IND Y
FC? 25
GTO 02
RCL IND Y
-
X!=0?  (!= means "different")
GTO 01
1
ST+ Z
RDN
RDN
GTO 00
LBL 01
'ERROR!
PROMPT
LBL 02
'REG=
ARCL Y
AVIEW
END
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.

Cheers.

Luiz (Brazil)

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

            
Re: HP-41c(V/X) memory testing... EDITED!!
Message #4 Posted by JasonG on 19 Oct 2004, 7:48 a.m.,
in response to message #3 by Vieira, Luiz C. (Brazil)

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!

Regards JasonG

                  
Re: HP-41c(V/X) memory testing... EDITED!!
Message #5 Posted by Vieira, Luiz C. (Brazil) on 19 Oct 2004, 11:34 p.m.,
in response to message #4 by JasonG

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        ?          ?
08 STO IND Y
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!
22 PROMPT
23 LBL 02        patn      patn      cntr        ?          ?
24 'REG=
25 ARCL Y
26 AVIEW
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.

Cheers.

Luiz (Brazil)

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

                        
Re: HP-41c(V/X) memory testing... EDITED!!
Message #6 Posted by JasonG on 21 Oct 2004, 6:55 a.m.,
in response to message #5 by Vieira, Luiz C. (Brazil)

AHA!

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!

ttfn

JasonG

                              
Re: HP-41c(V/X) memory testing... EDITED!!
Message #7 Posted by Vieira, Luiz C. (Brazil) on 21 Oct 2004, 11:16 a.m.,
in response to message #6 by JasonG

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)

            
Re: HP-41c(V/X) memory testing... EDITED!!
Message #8 Posted by Eric Smith on 19 Oct 2004, 7:57 p.m.,
in response to message #3 by Vieira, Luiz C. (Brazil)

There's a somewhat more thorough test in this thread: http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv014.cgi?read=54123

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.

      
Re: HP-41c(V/X) memory testing...
Message #9 Posted by Mike (Stgt) on 19 Oct 2004, 8:12 a.m.,
in response to message #1 by WigglePig

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

Ciao.....Mike

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


[ Return to Index | Top of Index ]

Go back to the main exhibit hall