HP65 s3 – W/PRGM

The HP-65 calculator has an internal set of status flags known as the “s register”. “s3” is one of those flags but it behaves a bit strangely …

Any check of s3 doesn’t do what you’d expect. For example:

                          ; S= ............
00537 if s3 = 0
00540 goto 00552          ; ??? didn't go 0552 yet s3 doesn't seem set
00541 if s11 = 0

s3 is clearly 0 yet “if s3 = 0” didn’t go where one would expect.

There is something going on “under the hood” here. The tests(num) function that does the “if sN = 0” microcode instruction sets carry if sN is 1; OR rN is 1. More flags!

rN is labelled in the code as “hard status for HP-55”. It looks like there are some hardware attachments of some type that can be wired in to override individual bits of the s register. This is similar to the s3 flag being used by the HP-67 for status information from the card reader (eg execute a “CRC ready? command” then test “if s3 = 1”). With the ’67 it is obvious because the hardware actually sets the s3 flag. It shows as “S= …3……..”.

The catch with the ’65 is the s3 flag appears clear but tests as if set (because r3 is). The behaviour doesn’t match what the presented status info suggests.

The only use of the 12 HP-55 “r” flags in the HP-65 is r[3]. This is 1 if the relevant slide switch is at W/PRGM and 0 if it is in the RUN position.

So s3 means W/PRGM – but you’ll never notice it being set. Something to be aware of in microcode traces.

It might have been better if s3 were directly tied to the W/PRGM-RUN switch and couldn’t be cleared or set by software. I’m not sure whether the HP-65 microcode ROMs would work with that but, if so, it would show what’s happening a lot better.

It's only fair to share...Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInShare on StumbleUponDigg thisPin on PinterestEmail this to someone

Leave a Reply

Your email address will not be published. Required fields are marked *