▼
Posts: 24
Threads: 3
Joined: Mar 2012
Well, this is probably not new but I was not aware of it before...
In indirect addressing mode (I) or (J), if the program stores 0 in the register 55 or higher and then when it tries to recall it, it shows Invalid(I) or Invalid(J).
Example:
LBL D
55
STO I
0
STO(I)
RCL(I)
If I replace the 55 with a lower number then it's fine or if I replace 0 with any other number then it's also okay.
Does this bring any bell?
Thank you.
▼
Posts: 2,448
Threads: 90
Joined: Jul 2005
Posting as did is just fine.
Paul has been keeping a comprehensive list here: http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=735
Posts: 3,229
Threads: 42
Joined: Jul 2006
Is this a bug? Try storing a non-zero number there? Does that work?
What is in register 54 on your device?
After storing 0 in register 55, does doing the same with register 54 produce the error?
The 35S deallocates the highest numbered registers if they contain zero & I'm guessing this is what is happening here.
- Pauli
Posts: 980
Threads: 239
Joined: Aug 2006
▼
Posts: 325
Threads: 18
Joined: Jul 2006
Quote:
Is there a workaround?
Store a non-zero value in a register numbered higher than 55. Storing a zero in a register only deallocates registers if no higher-numbered register contains a non-zero value.
▼
Posts: 980
Threads: 239
Joined: Aug 2006
This confirms what I was experimenting with last night. I took the base code and I experimented with several variations between changing the '55' value and the '0' value. I changed both or either of these numbers in various combinations: reg>55, val<>0; reg<55, val<0, reg>55, val>0, etc. And yes, I did notice that when a non-zero quantity for 'val' was involved, I was allowed access to the higher registers.
Posts: 850
Threads: 10
Joined: Mar 2009
I do not see what the problem is in the first place. From p14-24 of the manual:
Quote:
The calculator allocates memory for variable 0 to the last non-zero variable. It is important to store 0 in variables after using them in order to release the memory.
The training module on using the HP-35s Indirect Registers, it states it more clearly:
Quote:
If the highest used register is cleared or has a zero stored into it, the allocation will shrink down to the next highest non-zero indirect register.
If you need to work with 0 values in indirect registers, then allocate a non-0 value to your highest required register + 1 (just store 0 in it at the end of your program to release the memory).
▼
Posts: 24
Threads: 3
Joined: Mar 2012
Thank you Bart for the clarification, it makes sense now.
I appreciate the inputs received from everybody.
Posts: 980
Threads: 239
Joined: Aug 2006
SO, the questions become:
1--how do you find the highest register available at the time so that you can store a non-zero value in the n+1th register that you set at the max register?
2--if the highest register you want to use is not accessible (already has been de-allocated), how do you reset the availability of all registers so that you can set your max+1th register by placing a non-zero value there?
▼
Posts: 3,283
Threads: 104
Joined: Jul 2005
You can store a non-zero value any time in any register. This will create the necessary allocation for the register and all lower numbered registers. You normally should know how many registers your program will need. Just allocate one more as the "curtain" by storing a 1 into it. De-allocating can be done with the clear command.
▼
Posts: 275
Threads: 38
Joined: Jul 2007
Would it break anything if RCL from an unallocated register returned zero instead of invalid j?
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
Posts: 850
Threads: 10
Joined: Mar 2009
Quote:
1--how do you find the highest register available at the time so that you can store a non-zero value in the n+1th register that you set at the max register?
Let's say my program has just started using the nth indirect register, which may contain a 0 at some time - and I wish to be able to recall that 0.
...
nth register allocated, now allocate n+1th register:
1
STO+ I
STO (I)
STO- I
Rv
Notes:
- Line numbers omitted
- assumes I was used to reference indirect registers
- increments and decrements I so that eventual reference doesn't change
- Rv is roll down and restores the X-register present before incrementing I
- uses one stack register
- you can manually clear all indirects after the program finishes
Quote:
2--if the highest register you want to use is not accessible (already has been de-allocated), how do you reset the availability of all registers so that you can set your max+1th register by placing a non-zero value there?
Seeing that as in the text above, the register that is one higher than which you want to use is allocated with a non-0 value, it should not be a problem. Remember that when an indirect register is allocated, all lower registers are automatically allocated too - this means memory management as I stated here.
Edit:edited to correct spelling.
Edited: 10 Mar 2012, 2:44 p.m.
▼
Posts: 3,283
Threads: 104
Joined: Jul 2005
Normally you should know in advance how many registers to allocate and can do it once for the whole program. For a polynomial of degree N you will need (N+1) registers for the coefficients. In this case you even know that the highest coefficient can't be zero so it's just a matter of how you store the coefficients: just assign the highest coefficient to the highest indirect register and you are done.
Posts: 24
Threads: 3
Joined: Mar 2012
Then I was playing with SOLVE and found this very odd behavior, maybe someone can explain it...
If I try to SOLVE this program everything works as expected:
Example 1 (no problem here):
D001 LBL D
D002 10
D003 STO N
D004 DSE N
D005 GTO D006
D006 RCL X
D007 COS
D008 RTN
And I assign this to FN=D and finally SOLVE X, then no problem. However if instead of jumping forward (line D005) I jump backward the calculator displays "SOLVING" for ever until I hit R/S or C:
Example 2 (problem when try to SOLVE):
D001 LBL D
D002 10
D003 STO N
D004 DSE N
D005 GTO D004
D006 RCL X
D007 COS
D008 RTN
Running this simple program outside SOLVE returns the expected result.
Both tests on the HP41 with the Advantage module work fine.
Am I doing something wrong, a bug, or a "feature"?
Thanks in advance.
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
Seems like a bug to me. Once someone confirms this, I'll add it to the list.
- Pauli
▼
Posts: 24
Threads: 3
Joined: Mar 2012
Hi Pauli,
I've seen this person complaining about the same issue:
http://compgroups.net/comp.sys.hp48/HP35s-solving-functions-in-user-programs
Thank you!
Andres.-
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
That's good enough for me. Added as a bug.
I really do wonder why people still bother enough with this lemon of a calculator to keep uncovering its flaws.
- Pauli
▼
Posts: 24
Threads: 3
Joined: Mar 2012
Haha! that's a good question... I was trying to port some programs from my old 41.... but I gave up now and getting the promising WP34S, I think it's going to get here this Saturday! BTW, even when I haven't experienced it yet, I can tell that you have done a tremendous job, congratulations to you and all the other contributors.
Andres.-
Posts: 429
Threads: 31
Joined: Jul 2011
Quote:
why people still bother
Easy: Because it is the best looking calculator in portrait version that HP ever made and it does everything I need in daily use, none of the bugs ever bothers me while doing basic programming and checking my high school kid`s homework.
▼
Posts: 24
Threads: 3
Joined: Mar 2012
It has a "sexy" design indeed, too bad it has no flash memory and any PC connectivity or flash card slot to be able to load new FW versions and for long term memory for programs and data.
▼
Posts: 2,448
Threads: 90
Joined: Jul 2005
It can't have I/O because it has a specific target marchet which bans that.
For I/O, go to the 50G...I know, I know, too bad there isn't a small I/O machine. Perhaps someday they will make a small I/O machine. Maybe the 30b platform will go this direction.
▼
Posts: 3,283
Threads: 104
Joined: Jul 2005
Bill, there is a version of the 30b with I/O. It's just not running the original firmware. :-)
▼
Posts: 2,448
Threads: 90
Joined: Jul 2005
That's what I suspected. But is that I/O a "stock" feature of the WP34s or is it another project?
▼
Posts: 3,283
Threads: 104
Joined: Jul 2005
I/O is an integral part of the design. You can write programs on your PC (with an editor), compile it, test it on the emulator, and then send it to the calculator through the same cable used for flashing the firmware. Programs written on the device can be sent back to the emulator and even disassembled to a text file for archiving, sharing, and for further development.
▼
Posts: 2,448
Threads: 90
Joined: Jul 2005
Holy cow, I hadn't noticed this! If this is an easy and painless interface, then that is TERRIFIC!
One of
▼
Posts: 4,587
Threads: 105
Joined: Jul 2005
The holy cow must have eaten your third sentence ;-) Yes, the WP 34S contains everything we always wanted to have and the HW of the 30b allows. d:-)
▼
Posts: 3,283
Threads: 104
Joined: Jul 2005
WP 34S is the intersection of two sets: { whishes } and { possibilities }. :-)
▼
Posts: 1,216
Threads: 75
Joined: Jun 2011
Quote:
WP 34S is the intersection of two sets: { whishes } and { possibilities }. :-)
'union' of both would still be better than 'intersection'. ;-)
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
Once we figure out the impossibilities we'll give it a try :-)
- Pauli
Posts: 3,283
Threads: 104
Joined: Jul 2005
Sorry, Franz, but { possibilities } was an unsurmountable constraint. { whishes } includes many aspects not contained in { possibilities } such as more memory to handle tagged objects like in the RPL machines or a better display for more readable fonts and a more elaborate user interface. I have the feeling we went pretty far given the contents of { possibilities } but at some point we just had to give up. :-(
Posts: 24
Threads: 3
Joined: Mar 2012
Sorry for being a pain... I observed the same bug integrating a "program". Therefore no jump backward possible in a program if you expect to integrate it... I'll put it away now, I promise!!!
Posts: 1
Threads: 0
Joined: Mar 2012
Hello,
This is not related to the bugs. I am new here and this was the first article related to the HP35s.
I have a question:
Is there any way to attach caracters to a LBL or variable that are visible (to indentify them later easier)?
Thanks
Gabe
▼
Posts: 875
Threads: 37
Joined: Jul 2005
There is no direct way to attach characters to a label or variable with the 35s. You can use equations to provide prompts or reminders of the program, for example.
A001 LBL A
A002 SF 10
A003 QUADRATIC (entered as an equation, i.e., press EQN first then type it in)
A004 PSE
A005 CF 10
...
The above assumes you have a program you would like to label "QUADRATIC". When viewing the program listing, it will be there to tell you what the program is. When run, the program will pause, display QUADRATIC briefly then continue. Similar messages can be used to tell you what variables are going into what registers.
Sorry if you are well aware of the above.
Edited: 13 Mar 2012, 1:54 p.m.
|