Post Reply 
The sophisticated HP-65
08-03-2022, 04:18 PM
Post: #10
RE: The sophisticated HP-65
(08-02-2022 11:22 PM)Don Shepherd Wrote:  prime factor finder

Here's a listing of the program that can be used with this online emulator for the HP-65:
Code:
001: 23    : LBL
002: 11    : A
003: 34 01 : RCL 1
004: 61    : +
005: 33 01 : STO 1
006: 34 02 : RCL 2
007: 35 07 : g x<>y
008: 81    : /
009: 32    : f-1
010: 83    : INT
011: 00    : 0
012: 35 21 : g x!=y
013: 24    : RTN
014: 35 01 : g NOP
015: 35 00 : g LSTx
016: 33 02 : STO 2
017: 31    : f
018: 09    : SQRT
019: 33 03 : STO 3
020: 34 01 : RCL 1
021: 84    : R/S
022: 00    : 0
023: 22    : GTO
024: 11    : A
025: 23    : LBL
026: 12    : B
027: 04    : 4
028: 11    : A
029: 02    : 2
030: 11    : A
031: 04    : 4
032: 11    : A
033: 02    : 2
034: 11    : A
035: 04    : 4
036: 11    : A
037: 06    : 6
038: 11    : A
039: 02    : 2
040: 11    : A
041: 06    : 6
042: 11    : A
043: 34 02 : RCL 2
044: 01    : 1
045: 35 23 : g x=y
046: 00    : 0
047: 24    : RTN
048: 34 01 : RCL 1
049: 34 03 : RCL 3
050: 35 24 : g x>y
051: 22    : GTO
052: 12    : B
053: 34 02 : RCL 2
054: 84    : R/S
055: 44    : CLx
056: 24    : RTN
057: 23    : LBL
058: 13    : C
059: 33 02 : STO 2
060: 31    : f
061: 09    : SQRT
062: 33 03 : STO 3
063: 00    : 0
064: 33 01 : STO 1
065: 02    : 2
066: 11    : A
067: 01    : 1
068: 11    : A
069: 02    : 2
070: 11    : A
071: 02    : 2
072: 11    : A
073: 34 02 : RCL 2
074: 01    : 1
075: 35 21 : g x!=y
076: 22    : GTO
077: 12    : B
078: 00    : 0
079: 24    : RTN
080: 35 01 : g NOP
081: 35 01 : g NOP
082: 35 01 : g NOP
083: 35 01 : g NOP
084: 35 01 : g NOP
085: 35 01 : g NOP
086: 35 01 : g NOP
087: 35 01 : g NOP
088: 35 01 : g NOP
089: 35 01 : g NOP
090: 35 01 : g NOP
091: 35 01 : g NOP
092: 35 01 : g NOP
093: 35 01 : g NOP
094: 35 01 : g NOP
095: 35 01 : g NOP
096: 35 01 : g NOP
097: 35 01 : g NOP
098: 35 01 : g NOP
099: 35 01 : g NOP
100: 35 01 : g NOP

Example

11111
C
41.00

R/S
271.00

R/S
0.00


Performance Question

Maybe someone with a better understanding of the internals of the HP-65 can answer the following question:
Would it make sense to invert the order of the three sections A, B and C since e.g. B is calling A often?

This is the reordered program:
Code:
001: 23    : LBL
002: 13    : C
003: 33 02 : STO 2
004: 31    : f
005: 09    : SQRT
006: 33 03 : STO 3
007: 00    : 0
008: 33 01 : STO 1
009: 02    : 2
010: 11    : A
011: 01    : 1
012: 11    : A
013: 02    : 2
014: 11    : A
015: 02    : 2
016: 11    : A
017: 34 02 : RCL 2
018: 01    : 1
019: 35 21 : g x!=y
020: 22    : GTO
021: 12    : B
022: 00    : 0
023: 24    : RTN
024: 23    : LBL
025: 12    : B
026: 04    : 4
027: 11    : A
028: 02    : 2
029: 11    : A
030: 04    : 4
031: 11    : A
032: 02    : 2
033: 11    : A
034: 04    : 4
035: 11    : A
036: 06    : 6
037: 11    : A
038: 02    : 2
039: 11    : A
040: 06    : 6
041: 11    : A
042: 34 02 : RCL 2
043: 01    : 1
044: 35 23 : g x=y
045: 00    : 0
046: 24    : RTN
047: 34 01 : RCL 1
048: 34 03 : RCL 3
049: 35 24 : g x>y
050: 22    : GTO
051: 12    : B
052: 34 02 : RCL 2
053: 84    : R/S
054: 44    : CLx
055: 24    : RTN
056: 23    : LBL
057: 11    : A
058: 34 01 : RCL 1
059: 61    : +
060: 33 01 : STO 1
061: 34 02 : RCL 2
062: 35 07 : g x<>y
063: 81    : /
064: 32    : f-1
065: 83    : INT
066: 00    : 0
067: 35 21 : g x!=y
068: 24    : RTN
069: 35 01 : g NOP
070: 35 00 : g LSTx
071: 33 02 : STO 2
072: 31    : f
073: 09    : SQRT
074: 33 03 : STO 3
075: 34 01 : RCL 1
076: 84    : R/S
077: 00    : 0
078: 22    : GTO
079: 11    : A
080: 35 01 : g NOP
081: 35 01 : g NOP
082: 35 01 : g NOP
083: 35 01 : g NOP
084: 35 01 : g NOP
085: 35 01 : g NOP
086: 35 01 : g NOP
087: 35 01 : g NOP
088: 35 01 : g NOP
089: 35 01 : g NOP
090: 35 01 : g NOP
091: 35 01 : g NOP
092: 35 01 : g NOP
093: 35 01 : g NOP
094: 35 01 : g NOP
095: 35 01 : g NOP
096: 35 01 : g NOP
097: 35 01 : g NOP
098: 35 01 : g NOP
099: 35 01 : g NOP
100: 35 01 : g NOP

A single test using 11113 with the emulator would indicate this.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
The sophisticated HP-65 - Matt Agajanian - 08-01-2022, 10:12 PM
RE: The sophisticated HP-65 - [kby] - 08-02-2022, 02:48 AM
RE: The sophisticated HP-65 - C.Ret - 08-02-2022, 05:05 PM
RE: The sophisticated HP-65 - Thomas Klemm - 08-02-2022, 08:30 PM
RE: The sophisticated HP-65 - C.Ret - 08-03-2022, 06:42 AM
RE: The sophisticated HP-65 - Don Shepherd - 08-02-2022, 11:22 PM
RE: The sophisticated HP-65 - Gene - 08-03-2022, 12:08 AM
RE: The sophisticated HP-65 - Sylvain Cote - 08-03-2022, 01:37 AM
RE: The sophisticated HP-65 - Dave Britten - 08-03-2022, 02:46 PM
RE: The sophisticated HP-65 - Thomas Klemm - 08-03-2022 04:18 PM
RE: The sophisticated HP-65 - Thomas Klemm - 08-03-2022, 04:32 PM
RE: The sophisticated HP-65 - Thomas Klemm - 08-03-2022, 04:49 PM
RE: The sophisticated HP-65 - C.Ret - 08-03-2022, 06:13 PM
RE: The sophisticated HP-65 - TomC - 01-22-2024, 06:11 PM



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