Post Reply 
HP41 backarrow to CLX behavior
07-25-2016, 05:39 PM
Post: #4
RE: HP41 backarrow to CLX behavior
(07-25-2016 01:18 PM)Harald Wrote:  But the question is, why do we get the annulled "CLX"?
If you have entered more then one digit, say you have entered 56, and then press and hold the back arrow, the 6 gets deleted, leaving the 5. Nothing else happens. Why is that different when deleting the last digit?

Harald

Normally in digit entry, adding (or erasing) a digit will just happen once you press the key. There is no NULL test or backing out. It just waits for you to release the key and debounce it. Done, end of story.

When you back arrow to the point of erasing all previous digit entries, what happens is that digit entry puts 0 in X, without touching the stack lift flag. Then it kick back the function code of CLX to the keyboard parser who now thinks you pressed a key to execute that function. It then performs the NULL test on this key pressed, and aborts if it times out with NULL. If the key is not aborted, it proceeds to normal CLX operation.

If you try to put:
7
5
9 ENTER

So we have:
7
5
9
9 (stack lift disabled)

Now start entering a number, then rub out and hold on last to get CLX-NULL. We are left with:
7
5
9
0

And stack lift disabled, press 1 + and you get:

7
7
5
10

So the problem is that stopping last entry with CLX-NULL, does put a zero in X, but it does not affect the original status of the stack lift flag.

I still think it is a bug. The intention would be that if you back out of digit entry, you get 0 and stack lift disabled, so that you can start over with another number, which will replace the 0. This is not always what happens here.

The problem is that digit entry when it decides to give up just does half the job by putting a 0 in X, but it does not clear the stack lift flag, which I think it should have. This can be seen in BAKDE (@732 in QUAD 2).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP41 backarrow to CLX behavior - hth - 07-24-2016, 07:34 PM
RE: HP41 backarrow to CLX behavior - hth - 07-25-2016 05:39 PM



User(s) browsing this thread: 8 Guest(s)