HP Forums
WP-34S: Safely copy a graphics register's contents - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: WP-34S: Safely copy a graphics register's contents (/thread-1598.html)

Pages: 1 2


RE: WP-34S: Safely copy a graphics register's contents - Dave Britten - 06-23-2014 12:02 PM

Thanks, that was easy enough.

Here's the RAM dump. I'm seeing the same behavior with the newest emulator build (3.383605). If you run CEL as-is, everything is fine. If you switch to UNSIGN mode first, it will hang in an infinite loop, and upon breaking, you'll see that those three program steps have been changed.

[attachment=878]


RE: WP-34S: Safely copy a graphics register's contents - walter b - 06-23-2014 12:07 PM

Please see pp. 186ff of the v3.2 manual.

d:-)


RE: WP-34S: Safely copy a graphics register's contents - Dave Britten - 06-23-2014 01:01 PM

(06-23-2014 12:07 PM)walter b Wrote:  Please see pp. 186ff of the v3.2 manual.

d:-)

Where can I find that revision? I only see 3.1 on SF.


RE: WP-34S: Safely copy a graphics register's contents - Marcus von Cube - 06-23-2014 06:53 PM

(06-23-2014 12:02 PM)Dave Britten Wrote:  Here's the RAM dump. I'm seeing the same behavior with the newest emulator build (3.383605). If you run CEL as-is, everything is fine. If you switch to UNSIGN mode first, it will hang in an infinite loop, and upon breaking, you'll see that those three program steps have been changed.
I've installed the file in my debugging environment. I hope you are patient because I don't have much time to track the bug. I promise I'll do.


RE: WP-34S: Safely copy a graphics register's contents - Dave Britten - 06-23-2014 07:04 PM

(06-23-2014 06:53 PM)Marcus von Cube Wrote:  
(06-23-2014 12:02 PM)Dave Britten Wrote:  Here's the RAM dump. I'm seeing the same behavior with the newest emulator build (3.383605). If you run CEL as-is, everything is fine. If you switch to UNSIGN mode first, it will hang in an infinite loop, and upon breaking, you'll see that those three program steps have been changed.
I've installed the file in my debugging environment. I hope you are patient because I don't have much time to track the bug. I promise I'll do.

No sweat, you aren't holding me up or anything. The program seems to work fine in 2's-complement mode; it just freaked me out a bit when it corrupted itself in unsigned mode.


RE: WP-34S: Safely copy a graphics register's contents - Marcus von Cube - 07-05-2014 01:30 PM

I think I've found the bug:

in unsigned mode Your program seems to be buggy and creates coordinates out of the bounds bounds of the plot object. These values were mistreated as negative values in the range checking code of the plotting commands. I changed the code to use unsigned int instead of int so the range checking now works and the commands with invalid plot coordinates are simply ignored.

You code still doesn't work but the calculator no longer inadvertently modifies the program area. A new build is uploaded to SF. You can try it in the emulator.


RE: WP-34S: Safely copy a graphics register's contents - Dave Britten - 07-05-2014 02:14 PM

Thanks Marcus, I'll have to play around with that later and see what happens.