Post Reply 
V41 and its display functions
05-08-2016, 03:56 PM
Post: #1
V41 and its display functions
For quite a while I have been using V41 ("Release 8"), and I always wondered why, unlike the "real thing", the display functions FIX, SCI and ENG prompt for a two-digit entry, i.e. FIX shows two underscores, like a STO or RCL. And indeed you can enter the same parameters as with the storage-related commands: FIX 35 or even SCI X are accepted without an error message. But what does this do?

After trying some commands like FIX 20 or SCI 99 it turned out that obviously not only the display-related settings were affected, but also the angular mode which is stored in the following flags. In case you forgot about this: On the '41, the four bits represented by flag 36...39 hold the number of digits, flag 40 is set in FIX mode, flag 41 in ENG mode (both clear means SCI), and flag 42 is set in GRAD resp. flag 43 in RAD (both clear means DEG). So it looks like this:

Code:
 Display Digits    FIX ENG GRD RAD
 F36 F37 F38 F39   F40 F41 F42 F43

For example:

Code:
 Display Digits    FIX ENG GRD RAD
 0   1   0   1      1   0   0   1
  = decimal 5

Here the calculator is set to FIX 5 and Radians mode.

Now what does a command do that is not possible on a real hardware HP41? For instance FIX 20, which can be entered on V41 without a problem. I wrote a short program that displays the status of flags 36...43, and here is what I got:

First of all, let's assume FIX 4 and DEG mode.
This yields...
Code:
 Display Digits    FIX ENG GRD RAD
 0   1   0   0      1   0   0   0
   = 4 digits
...the expected bit pattern.

What about FIX 15?
Code:
 Display Digits    FIX ENG GRD RAD
 1   1   1   1      1   0   0   0
...which means 15 digits, which of course are not displayed. But flags 36...39 now hold a bit pattern that normally would not occur on a real HP41.

Now for the interesting part. I tried a FIX 20 command:
Code:
 Display Digits    FIX ENG GRD RAD
 0   1   0   0      1   0   0   1

From the entered 20 (=10100) the four lowest bits are stored in flag 36...39, and the excessive MSB obviously has spilled into the angular mode section, so that this command turned on Radians mode!

Even more interesting: let's see what a few consecutive FIX 20 commands will do:

Code:
FIX 20 =>
 Display Digits    FIX ENG GRD RAD
 0   1   0   0      1   0   1   0

This is FIX 4 with Grad mode turned on!

Code:
FIX 20 =>
 Display Digits    FIX ENG GRD RAD
 0   1   0   0      1   0   1   1
So another FIX 20 sets both the GRAD and (!) the RAD flags. Here V41 chooses Radians mode.

One more time:

Code:
FIX 20 =>
 Display Digits    FIX ENG GRD RAD
 0   1   0   0      1   1   0   0
This time both the FIX and the ENG mode flags are set. This yields FIX 4 with an automatic switch to ENG instead of the usual SCI for small or large values.

Until here it looks like each successive FIX 20 counts up the four-bit number in F40...F43 (or at least the three bits in F41...F43).

But then, do one last FIX 20:
Code:
FIX 20 =>
 Display Digits    FIX ENG GRD RAD
 0   1   0   0      1   0   0   1

This is the same result as a few steps before.

BTW, if you tried this on V41, be sure to reset its settings to normal by a DEG and FIX 04.

So this means:
  • V41 accepts "illegal" parameters for FIX, SCI and ENG.
  • These parameters > 9 may affect not only the number of displayed digits, but also the display mode and the angular mode.
  • Successive calls of the same command may yield different results.

I have not yet figured out what's exactly happening here inside V41, but I think all this has to be considered a bug that should be corrected.

What do you think?

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
V41 and its display functions - Dieter - 05-08-2016 03:56 PM
RE: V41 and its display functions - Dieter - 05-08-2016, 04:48 PM
RE: V41 and its display functions - Dieter - 05-09-2016, 07:39 AM



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