Post Reply 
HP-25 Question
07-02-2019, 11:31 AM
Post: #1
HP-25 Question
The HP-25 includes an unlabelled function, g sum, which can be entered into program memory and which seems, on emulators at least, to be NOP.

The emulators include some strange behaviour in how they emulate one of the microcode instructions. If the emulators are correct, the function does behave as NOP. If the microcode instruction behaves more as its name suggests, the function is more likely to behave like R/S.

Would someone with a physical HP-25 or HP-25C, be able to:
- clear program memory,
- key in three g Sum ("15 25" in PRGM mode) steps,
- switch to RUN,
- f CLEAR PRGM (to go to step 00),
- press R/S (to run the three steps),
- switch to PRGM again, and
- let me know what step it ends on please?

If it does behave as a NOP, it should go through all three and then do the GTO 00 at the end. In that case, it would end at step 00.

If it behaves like R/S instead, it should stop at step 01.

s1 is the "running" flag in the HP-25. This is to check whether the microcode for g sum clears s1 and stops as a result; or if - as the emulators suggest - s1 remains set.

I appreciate any help you can give me with this.

All the best,

- Greg from sydneysmith.com
Visit this user's website Find all posts by this user
Quote this message in a reply
07-02-2019, 01:45 PM
Post: #2
RE: HP-25 Question
It looks like the emulators are correct. The microcode for GTO does a "0 -> s 1" which clears s1 if c[m] is 0 (the Program Counter is step 00) and skips that "if c[m] # 0"; but then does a "clear s" in both cases.

If "clear s" resets s1, the "0 -> s 1" would be pointless and any GTO would always stop.
That isn't the case so "clear s" can't be clearing s1.

My guess is that real world HP-25's will run the test program and stop at step "00" just like the emulators.

---

The emulators go to some trouble to clear everything but s1, s2, s5 and s15 when they "clear s". On a HP-25, s15 is connected to the keyboard (a key is pressed) and s5 to the power (battery low sensor). It makes sense that s5 and s15 aren't clearable given they are wired to things.

s3 is also wired up (to the PRGM-RUN switch) so despite "clear s" clearing s3; if it was set, it goes back to set straight after the "clear s".

There doesn't seem to be any good reason for "clear s" not clearing s1 and s2 though. Perhaps it was a feature to have some flags that would remain across a "clear s". Much like having test-cleared and normal flags in HP-67 user programs.

All the best,

- Greg from sydneysmith.com
Visit this user's website Find all posts by this user
Quote this message in a reply
07-02-2019, 02:15 PM
Post: #3
RE: HP-25 Question
An actual HP-25 (not C) ends up on line 00, as you expected.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
07-02-2019, 09:11 PM
Post: #4
RE: HP-25 Question
Thanks Bob. I really appreciate you checking for me. The real thing is always the definitive answer for an emulator question.

All the best,

- Greg from sydneysmith.com
Visit this user's website Find all posts by this user
Quote this message in a reply
07-03-2019, 06:03 AM
Post: #5
RE: HP-25 Question
An emulator *should* do exactly the same thing as a physical calculator because it is running the calculator's ROM.

A simulator (e.g. Free42) does not run the calculator's code and strives to imitate the original behaviour in independently written code.
Find all posts by this user
Quote this message in a reply
07-03-2019, 06:27 AM
Post: #6
RE: HP-25 Question
(07-03-2019 06:03 AM)grsbanks Wrote:  An emulator *should* do exactly the same thing as a physical calculator because it is running the calculator's ROM.

I wish that were true but there is more to it, so as you say code wise yes, but the hardware has to be considered as well :-)

cheers

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




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