![]() |
Can anyone check this strange behavior on HP-15C - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: Can anyone check this strange behavior on HP-15C (/thread-134413.html) |
Can anyone check this strange behavior on HP-15C - Bastian Erdnüß - 03-16-2008 I have an HP-15C. I wrote the following program (a nimb game):
LBL A: 01 - 42, 21, 11 It's a rewrite from the program from Genes HP.
The rules are easy:
Now, my problem is the following: If I start by taking 1 or 3 sticks, all works fine and I lose. I guess that something may be weak in my computer, but what? It seems not to be the test (in line 9 it works very well, and replacing X =/= Y in line 34 by X >= Y doesn't changes anything). It also seems not to be the ENTER key, because in line 6 it works well and in the usual calculating also. Or did I misunderstood something in the way my computer works and did a mistake in the program? Can anyone check this? Has anyone a idea what could make this behavior?
Thanks, Bastian.
Re: Can anyone check this strange behavior on HP-15C - Egan Ford - 03-16-2008 Quote:Perhaps your 15C is a poor sport. :-) Can you post the original source that you used as the basis for your code? Update
I added an extra ENTER after line 22. Seems to work with 1, 2, or 3 as a starting number. 001 LBL A 014 4 027 GTO 3 040 3 053 8Please post the original code. Edited: 16 Mar 2008, 1:09 p.m.
Re: Can anyone check this strange behavior on HP-15C - Bastian Erdnüß - 03-16-2008 The original source can be found here: http://www.rskey.org/gene/calcmuseum/25nimb.htm. But it is for the HP-25. Now, it also works on my computer. Can you explain why this change is needed? I don't see it. Thank you very much
Bastian
Re: Can anyone check this strange behavior on HP-15C - Egan Ford - 03-17-2008 Quote:I do not recall exactly, but I remembered having a similar problem that did not present itself when using R/S. The solution was the same, an extra ENTER. Re: Can anyone check this strange behavior on HP-15C - Bastian Erdnüß - 03-17-2008 Ohh noo!! I see it. The [ENTER] copies the content of the X register to the Y register. But then the stack will be disabled. If I would use a function now, like [x^2] or anything else (with one argument) the function would enable the stack again and use the copy in the X register for the operation. But I enter a [1] in the next step and so my copy in the X register will be overwritten. After performing [-] on X and Y I lost my copy in the Y register, of course! But when I stepped the program, every time after the [ENTER] was executed, I checked the content of the Y register by pressing [X <-> Y] two times. But this operations have enabled the stack again, and so the next command ([1]) didn't overwrite the content in the X register, but shifted it. And so my lost copy was stored in the Z register as it should be and all worked fine.
Bastian
|