HP-80 Nonpareil Emulator: fixed a bug in the calendar functions
|
06-25-2014, 09:41 PM
(This post was last modified: 06-25-2014 10:53 PM by Thomas Klemm.)
Post: #1
|
|||
|
|||
HP-80 Nonpareil Emulator: fixed a bug in the calendar functions
Inspired by a recent thread I started using the HP-80 emulator but had troubles with the calendar functions. Whatever I entered the result was always a blinking 9.999999999 99.
So I started to debug the DATE function and noticed a fishy line 6201 in the following block of code: Code: 1708 L06175: .1....11.. 4 -> p The loop was executed once too often and thus the month (here 6) was shifted over the right end of register c and thus got lost: Code: 1712 L06201: 111.1.11.. if p # 14 To be sure I had a look at the original US-patent 3863060 and noticed a special case at exactly that line: The leading L is missing in line number 6201. And while the texts agree (if p # 14 | IF P # 14) the bit pattern don't: 111.1.11.. | 11111.11... And of course [if p # 15] makes more sense. Thus I patched these two files in my installation: /usr/local/lib/nonpareil diff 80.lst.orig 80.lst Code: 2074c2074 Code: 1666c1666 And, lo and behold, the bug in the calendar functions was fixed. Cheers Thomas |
|||
06-25-2014, 10:19 PM
Post: #2
|
|||
|
|||
RE: HP-80 Nonpareil Emulator: fixed a bug in the calendar functions
(06-25-2014 09:41 PM)Thomas Klemm Wrote: Inspired by a recent thread I started using the HP-80 emulator but had troubles with the calendar functions. Whatever I entered the result was always a blinking 9.999999999 99. Thomas - While checking out my new HP-80, I had similar trouble using the DATE function, getting blinking 9.999999999 99 and somtimes even 0.000999999 99, though my conclusion was that I simply didn't know how to use this particular function on such an old machine, assuming usage had changed over time. I must admit, it absolutely did not occur to me to disassemble the ROM and patch the code. Nope, not even for an instant. A quick look at the UG today on the Museum DVD reveals that, e.g. to calculate days between dates, one does DATE1, [SAVE], DATE2, [DAY], and this works correctly after all. Not sure about the issue you encountered, but my conclusion is it's easier to RTFM than to debug the OS. Of course, you may have had more fun than I did. In any case, thanks for the interesting answer to my question about bugs in the HP-80! --Bob Prosperi |
|||
06-25-2014, 10:49 PM
Post: #3
|
|||
|
|||
RE: HP-80 Nonpareil Emulator: fixed a bug in the calendar functions
Not sure whether this has become clear: I assume the bug exists only in Eric's emulator (or ROM-dump, to be precise) but not in the real calculator. This happened probably when scanning the code printed in the patent. The aforementioned line is ambiguous already there.
But you tell me that you have problems with the real calculator? What happens when you calculate something like: 6.252014 [SAVE] 123 [DATE] Kind regards Thomas |
|||
06-25-2014, 11:21 PM
(This post was last modified: 06-25-2014 11:23 PM by bshoring.)
Post: #4
|
|||
|
|||
RE: HP-80 Nonpareil Emulator: fixed a bug in the calendar functions
Thomas, the Nonpariel bug you found is probably responsible for the calendar bug on RPN-80 by Maciej Bartosiak. He stopped offering his emulators (for iPhone) about a year ago. When I asked about the calendar bug he said he got the microcode from Nonpariel.
I don't suppose there is a way to fix my iOS app. Bob |
|||
06-25-2014, 11:51 PM
Post: #5
|
|||
|
|||
RE: HP-80 Nonpareil Emulator: fixed a bug in the calendar functions
(06-25-2014 11:21 PM)bshoring Wrote: Thomas, the Nonpariel bug you found is probably responsible for the calendar bug on RPN-80 by Maciej Bartosiak.Can confirm this: I used its debugger (double touch the display) to track down the issue. Quote:I don't suppose there is a way to fix my iOS app.Unfortunately, that's probably true. Kind regards Thomas |
|||
06-26-2014, 02:53 AM
Post: #6
|
|||
|
|||
RE: HP-80 Nonpareil Emulator: fixed a bug in the calendar functions
(06-25-2014 10:49 PM)Thomas Klemm Wrote: Not sure whether this has become clear: I assume the bug exists only in Eric's emulator (or ROM-dump, to be precise) but not in the real calculator. This happened probably when scanning the code printed in the patent. The aforementioned line is ambiguous already there. Yes, I did misunderstand, I thought you were implying a bug in the HP80. Anyhow, an actual HP80 processes that and returns 10.26, which checks out with result from a 41CX (date format is MM.DDYYYY). --Bob Prosperi |
|||
06-26-2014, 07:52 AM
Post: #7
|
|||
|
|||
RE: HP-80 Nonpareil Emulator: fixed a bug in the calendar functions
(06-25-2014 09:41 PM)Thomas Klemm Wrote: ... To be sure I had a look at the original US-patent 3863060 and noticed a special case at exactly that line: Very nice archeo-software debugging! What is surprising is the coincidence of the missing L letter, and the mismatch between the bit pattern and assembler symbolic instruction in the original patent. J-F |
|||
06-26-2014, 10:55 AM
Post: #8
|
|||
|
|||
RE: HP-80 Nonpareil Emulator: fixed a bug in the calendar functions
(06-26-2014 07:52 AM)J-F Garnier Wrote: What is surprising is the coincidence of the missing L letter, and the mismatch between the bit pattern and assembler symbolic instruction in the original patent. Somehow it reminded me of the movie Brazil: Quote:an error caused by a fly getting jammed in a printer |
|||
06-28-2014, 07:04 PM
Post: #9
|
|||
|
|||
RE: HP-80 Nonpareil Emulator: fixed a bug in the calendar functions
(06-25-2014 11:21 PM)bshoring Wrote: I don't suppose there is a way to fix my iOS app. Possibly. If Maciej included the ROM as a file in the Documents subdirectory of the app, then it may be possible to "upgrade" it using iExplorer (was iPhone Explorer). If the ROM was "included" in the binary or the ROM file is in one of the read-only subdirectories of the .app directory, well then, there is little you can do but request the source from Maciej, get a developers license, and build it yourself. |
|||
06-28-2014, 07:26 PM
Post: #10
|
|||
|
|||
RE: HP-80 Nonpareil Emulator: fixed a bug in the calendar functions
Thanks Egan. Sounds like it is beyond my technical abilities.
Bob |
|||
06-30-2014, 09:11 PM
(This post was last modified: 06-30-2014 09:38 PM by Egan Ford.)
Post: #11
|
|||
|
|||
RE: HP-80 Nonpareil Emulator: fixed a bug in the calendar functions
(06-28-2014 07:26 PM)bshoring Wrote: Thanks Egan. Sounds like it is beyond my technical abilities. It's all point and click: 1. Install iExplorer 2. Quit iTunes 3. Connect iDevice 4. Run iExplorer and browse apps until you find RPN-80 and open up the folders There's an example here: http://retrocompute.org/2011/02/26/final...your-ipad/ |
|||
06-30-2014, 09:28 PM
Post: #12
|
|||
|
|||
RE: HP-80 Nonpareil Emulator: fixed a bug in the calendar functions
(06-30-2014 09:11 PM)Egan Ford Wrote: What is the name of the app in the app store? I cannot find it. Quote:We're sorry, "rpn–80" has been removed from the App Store. Kind regards Thomas |
|||
06-30-2014, 09:42 PM
(This post was last modified: 06-30-2014 09:42 PM by Egan Ford.)
Post: #13
|
|||
|
|||
RE: HP-80 Nonpareil Emulator: fixed a bug in the calendar functions
[quote='Thomas Klemm' pid='15654' dateline='1404163728']
Quote:We're sorry, "rpn–80" has been removed from the App Store. There's another RPN-80 there now from AmeloConsulting. They may have the same bug. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: