MIDI-OX User Forum (http://www.midiox.com/cgi-bin/yabb/YaBB.pl)
HP16C Emulator >> HP16C Bug Reports >> Valid program step ignored, no error/warning
(Message started by: RickN on Jan 8th, 2015, 2:15pm)

Title: Valid program step ignored, no error/warning
Post by RickN on Jan 8th, 2015, 2:15pm
Do these keystrokes in DEC 2-32-0000 status:

3
x<=y?
4

The real HP-16C shows "4" being entered and Ry=3.  The emulator shows "34" being entered.  I found this in a running program where it can lead to missing a valid step.  Enter the following program:

LBL B
4
WSIZE
3
ENTER
4
x<=y?
CLx   (don't care, not executed)
8
WSIZE
RTN

GSB B.  On a real HP-16C this skips over the CLx step, sets WSIZE to 8, and returns with Rx=4, Ry=3.  On the emulator it leaves WSIZE set to 4 and Rx=3.  Single-stepping through the program on the emulator helps understand what is happening.  The "8" step is ignored, apparently because "48" is an invalid value in 4-bit word size.  Then the 4 that is still in Rx is used as the WSIZE argument and the stack is dropped so Rx=3.

Title: Re: Valid program step ignored, no error/warning
Post by Jamie OConnell on Jan 21st, 2015, 12:30pm
Amazingly thorough!  I will look into all of these and likely an update will follow.



MIDI-OX User Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.