▼
Posts: 1,392
Threads: 142
Joined: Jun 2007
When I obtained an HP-65 years ago, it came with a user program card called "set time hh.mmss". I always wondered what this did exactly, and I finally got around to actually running it and discovered that it causes the HP-65 to display the time of day, based upon your hh.mmss input via the A function key. It updates about every 5 seconds and runs until you stop it. The time display looks like this, assuming it is 06:22:13
88.062213 0.0.
I don't know how they got the extra periods in there, but it does seem to keep reasonably accurate time.
This is the code. You load the program, enter the current hh.mmss and press the A function key.
Pretty cool.
lbl a
sto 1
745
eex 3
sto 2
eex 16
sto 3
1.0002
sto 8
dsz
rcl 1
lbl b
rcl 2
+
rcl 3
x
rcl 8
/
13
rcl 1
5 eex
chs
4
d.ms+
x=y
1
nop
sto 1
goto b
lbl a
I would welcome comments on exactly how this code works, it is a bit beyond my understanding.
Edited: 7 Oct 2013, 5:00 p.m. after one or more responses were posted
▼
Posts: 1,083
Threads: 126
Joined: Sep 2006
Will try when I get home.
Should the display say 18 instead of 88? A simple sub checking the display for greater then 24 or 12 should work, but you are correct about the code!
Geoff
▼
Posts: 1,392
Threads: 142
Joined: Jun 2007
Thanks Geoff. No, it says 88 at the beginning of the display. Interestingly, if I enter time 23.5940 and press A, in 20 seconds it says 88.240000, so it doesn't handle the midnight rollover.
▼
Posts: 614
Threads: 66
Joined: Jul 2006
Hey Don,
I've entered the program into the GO65C emulator on my Nexus 7. I get a changing 4 digit prefix instead of the 88 that you have. But the timer does work fine, updating every 5 seconds or so.
As to rollover, it'll count to 99 hours, 59 minutes and 55 seconds and then roll over to 00.0000. Try entering 99.5950.
Bill
▼
Posts: 275
Threads: 41
Joined: Mar 2010
This is a very nice program. Having the real 88 display before the time in go65c seem quite difficult. The display is related to various hard timing on the cathode driver. I used rough values for those timings (and not too short to avoid consuming too much battery).
It seem that an old HP calc got a refresh around 100 up to 200 Hz for the leds, but my emulator use at max 20Hz.
If you need an accurate timer, get go01c, this one has the accuracy of your android device :)
Olivier
Edited: 7 Oct 2013, 8:26 a.m.
▼
Posts: 614
Threads: 66
Joined: Jul 2006
Olivier,
Thanks for he explanation on the display differences.
I was able, using the instructions on your site for the go67c) to save the data to a card and associated card pack. Is there any way to write protect the card in the card pack, so that I don't accidently overwrite it?
Thanks for a great emulator.
Bill
▼
Posts: 275
Threads: 41
Joined: Mar 2010
To protect a card on go67c:
Do as if you wanted to load a card, then choose the one you want to protect, use 'Edit Infos'. Check 'Protected' then 'Ok' . Then use 'menu' and 'save' your pack to write the data back.
Olivier
▼
Posts: 614
Threads: 66
Joined: Jul 2006
Okay - I see it now.
Thanks.
Bill
Posts: 151
Threads: 8
Joined: Oct 2009
Actually, it assumes a 12 hour clock and rolls over at 13:00 to 1:00 so rollover works twice a day, as desired. If you use a 24 hour clock, change the "13" to "25" and you're all set.
No synthetic programming is used. The trick is an understanding of how the HP-65's flashing display is controlled during program operation. The shifting of the display and controlled exponent value end up making the display show a useful value - the time - instead of apparently random stuff. For a machine without a PAUSE or display-while-running command (like the HP-41's AVIEW or such), it is limited but can be very useful.
I never had the much-admired HP-65 but it's great to see such code!
▼
Posts: 1,392
Threads: 142
Joined: Jun 2007
Thanks Jim, that's great to know. I emailed the fellow I bought the 65 from 7 years ago (amazingly, he has the same email address!) and asked him if he wrote that code, and he replied and said he can't remember.
Posts: 23
Threads: 5
Joined: Oct 2011
What do the lines E3, e16, 5e mean?
ENTER then 03?
ENTER then 01 06?
05 then ENTER?
or something else?
▼
Posts: 540
Threads: 22
Joined: Jan 2005
Quote:
What do the lines E3, e16, 5e mean?
It's been years since I've owned a 65, but at a guess:
EEX 3
EEX 16
and 5 EEX CHS 4
as a way of shifting the numbers to the right position in the display.
Best,
--- Les
[http://www.lesbell.com.au]
Posts: 1,392
Threads: 142
Joined: Jun 2007
Posts: 73
Threads: 2
Joined: Sep 2011
I grew up on the HP-25, but I assume EEX on the 65 works similarly. On the 25, if I key in EEX 1 1 ENTER, I get 1.0e11 on the stack. Typing EEX with NO digits before it puts +1.0 in the mantissa and immediately goes to entering the exponent of 10. Hitting CHS while entering the exponent changes the sign of the exponent (not the mantissa).
So EEX 3 means enter 1.0e03, EEX 1 6 means enter 1.0e16, and 5 EEX CHS 4 (or 5 EEX 4 CHS) means enter 5.0e-04.
So, yes, I would agree that these are related to decimal shifting.
Hope this helps.
Dale
Posts: 1,477
Threads: 71
Joined: Jan 2005
Pretty cool! This works exactly as stated on my "real" HP-65, the
clock runs fast by around 4%.
Obviously there's some synthetic programming going on here. I'm just
guessing but I think that the link into it is DSZ since it skips 2
instructions if not-zero and that would be funky with the "LBL B" as
one of them.
According to
this
thread you have the PPC journals where this is explained.
Edited: 7 Oct 2013, 3:39 p.m.
▼
Posts: 1,392
Threads: 142
Joined: Jun 2007
Thanks Katie. I remember getting those CDs and looking at them for anything having to do with synthetic programming for the 65, but I don't recall finding anything. As I recall, they weren't easily searchable. I'll have to hunt them down, I must have filed them in the basement somewhere, that was almost 7 years ago.
▼
Posts: 151
Threads: 8
Joined: Oct 2009
I don't have my CD handy but look for the "Rhapsody in Space" article circa 1976. The author ended up figuring out exactly how the flashing display during program running is controlled as well as the very non-obvious internal architecture of the dynamic shift register 6 bit program memory of the '65. *No* RAM or return stack or program address lines. When the '67 came out, its increase in performance and capability was only matched by a much more conventional internal architecture, thanks in part to its Woodstock heritage.
▼
Posts: 1,392
Threads: 142
Joined: Jun 2007
Well, I finally found the CDs Jake sent me 7 years ago and I found the "Rhapsody in Space" article. The article describes a program that was written by Dick Hoppe. When he wrote it to the mag card on his 65, an error in the card reader apparently caused an invalid hex code to be encoded on the card, and this caused very unexpected behavior. The program could not be duplicated by typing in the keycodes from the keyboard, you had to have a physical copy created from the original card.
Very interesting article. Jake, if you see this, I'd like to post a pdf of the page containing the article, but I would want your permission to do that first.
Edited: 9 Oct 2013, 9:52 a.m.
▼
Posts: 349
Threads: 66
Joined: Apr 2007
Quote:
Jake, if you see this, I'd like to post a pdf of the page containing the article, but I would want your permission to do that first.
Hi Don,
Please post it! The material doesn't belong to me; I'm only making copies available to whomever would like it.
Thanks,
Jake
▼
Posts: 1,392
Threads: 142
Joined: Jun 2007
Thanks Jake. Here it is, along with another brief article from the following issue.
Posts: 97
Threads: 1
Joined: Jun 2013
Don
I can not say who wrote the original HP-65 clock program, but two sources may illuminate the question for further inquiry.
Link to NNN's
NNN’s were first mentioned by Richard Nelson in the “65 Notes” newsletter (later known as the “PPC Journal”) in November 1974 (Volume 1, Number 7, Page 8... referred to in later articles as V1N7P8). Excerpt: “The numbers shown in Table 1 are non-normalized numbers whose sign bit [sic] is something other than 0 or 9.” Interesting uses for NNN’s included H. Schnepf’s Digital Clock program for the HP-65 in June 1976 (V3N5P7).
My copy of 65 Notes lists the 87 step program on pg. 7 w/ this short explanation ...
Quote: The program timing is based on the non-normalized number 0.008 generated in R8 and used for division. This process is best understood if one understands how computers perform division by a subtraction process.
... provided by the program author on the following page.
I can provide the listing (for comparison) if there is any interest.
BEST!
SlideRule
Edited: 7 Oct 2013, 6:05 p.m.
▼
Posts: 1,392
Threads: 142
Joined: Jun 2007
Yeah, Kimberly, I'd like to see that program so I can see if it has the same effect as the one I listed above. Thanks, Don
▼
Posts: 97
Threads: 1
Joined: Jun 2013
Don
As requested;
01 . 83 30 * 71 59 2 02
02 0 00 31 1 01 60 4 04
03 1 01 32 + 61 61 gx<=y 35 22
04 Sto 5 33 05 33 Sto 8 33 08 62 Clx 44
05 / 81 34 g 35 63 gx<>y 35 07
06 f 31 35 Dsz 83 64 gRd 35 08
07 INT 83 36 Clx 44 65 Sto 3 33 03
08 Rcl 5 34 05 37 Rcl 8 34 08 66 Lbl 23
09 * 71 38 Sto 4 33 04 67 3 03
10 Sto 3 33 03 39 Clx 44 68 Eex 43
11 . 83 40 5 05 69 7 07
12 0 00 41 6 06 70 / 81
13 5 05 42 Sto 8 33 08 71 + 61
14 1 01 43 Rcl 1 34 01 72 + 61
15 0 00 44 Enter 41 73 Rcl 2 34 02
16 Sto 2 33 02 45 g Ru 35 09 74 Lbl 23
17 Eex 43 46 Gto 22 75 1 01
18 Chs 42 47 3 03 76 + 61
19 1 01 48 Lbl 23 77 Enter 41
20 1 01 49 2 02 78 Enter 41
21 Sto 1 33 01 50 5 05 79 Rcl 4 34 04
22 Rcl 3 34 03 51 8 08 80 / 81
23 2 02 52 Sto 8 33 08 81 gRd 35 08
24 Eex 43 53 Rcl 1 34 01 82 g 35
25 Chs 42 54 Rcl 1 34 01 83 Dsz 83
26 4 04 55 Rcl 3 34 03 84 Gto 22
27 + 61 56 Rcl 5 34 05 85 1 01
28 gLstX 35 00 57 f 31 86 Gto 22
29 4 04 58 Dms+ 02 87 2 02
To use the program, key the start time in the format HH.mm and press A. Steps 14 & 15 can be changed to calibrate each individual machine. The program is for a 24-hour clock. If a 12-hour clock is desired, steps 59 & 60 could be changed to 12 instead of 24.
BEST!
SlideRule
▼
Posts: 1,392
Threads: 142
Joined: Jun 2007
Thanks for this, Kimberly. I'll try it and report back what I find.
Posts: 1,392
Threads: 142
Joined: Jun 2007
This program also shows the time, but in a different format and it updates the screen each second. On the left of the display is a 3-digit number that seems to be increasing, followed by a space, followed by the hhmmss, followed by 2 spaces. When the minute changes, there is more flashing, and the seconds for the new minute seem to be off by a small amount, it's hard to tell.
This is very interesting stuff. I never knew that the flashing digits during program execution on the 65 could be controlled in any way by the user, so this is cool. I'd like to see a writeup about exactly how this occurs.
Thanks again, Kimberly, for this gem from the past.
|