Author |
Topic: Valid program step ignored, no error/warning (Read 1438 times) |
|
RickN
Member
HP Calculator Enthusiast
Gender:
Posts: 45
|
|
Valid program step ignored, no error/warning
« on: Jan 8th, 2015, 2:15pm » |
Quote Modify
|
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.
|
|
IP Logged |
|
|
|
Jamie OConnell
Administrator
Gender:
Posts: 2027
|
|
Re: Valid program step ignored, no error/warning
« Reply #1 on: Jan 21st, 2015, 12:30pm » |
Quote Modify
|
Amazingly thorough! I will look into all of these and likely an update will follow.
|
|
IP Logged |
--Jamie Music is its own reward.
|
|
|
|