Post Reply 
Valentin Albillo's "Boldly Going... Going Back to the roots" now for the HP-41 !
04-21-2024, 07:27 PM (This post was last modified: 04-21-2024 07:31 PM by Ángel Martin.)
Post: #24
RE: Valentin Albillo's "Boldly Going... Going Back to the roots" now for the...
it's done, quite easy since it's almost a one-by-one replacement...

but the choice of those real data registers is very inefficient (it requires multiple ZENTER^ instructions sprinkled throughout the program).

If I understand your description you used:

R01 and R24
R02 and R25
R03 and R36
etc...

for real and imaginary parts?

Redoing that to use adjacent (contiguous) numbered registers will eliminate the need for all those ZENTER^, abd thus reduce the execution time even further...

Code:
 9:24PM 04/21
 01*LBL "RZVA"
 02*LBL 01
 03 STO 24
 04 RDN
 05 STO 01
 06 1 E-4
 07 STO 19
 08 X^2
 09 STO 20
 10 ,5
 11 STO 25
 12*LBL 02
 13 XEQ IND 00
 14 0
 15 RCL 25
 16 Z/
 17 STO 21
 18 RDN
 19 STO 02
 20 RCL 19
 21 ST+ 24
 22 XEQ IND 00
 23 STO 22
 24 RDN
 25 STO 03
 26 RCL 19
 27 ST- 24
 28 ST- 24
 29 XEQ IND 00
 30 STO 23
 31 RDN
 32 STO 04
 33 R^
 34 RCL 03
 35 RCL 22
 36 Z+
 37 ZENTER^
 38 RCL 02
 39 RCL 21
 40 Z-
 41 ZENTER^
 42 0
 43 RCL 20
 44 Z/
 45 STO 06
 46 RDN
 47 STO 05
 48 RCL 03
 49 RCL 22
 50 ZENTER^
 51 RCL 04
 52 RCL 23
 53 Z-
 54 ZENTER^
 55 0
 56 RCL 19
 57 ST+ 24
 58 Z/
 59 ZENTER^
 60 0
 61 RCL 25
 62 Z*
 63 STO 23
 64 RDN
 65 STO 04
 66 RCL 06
 67 RCL 05
 68 ZENTER^
 69 RCL 04
 70 RCL 23
 71 Z/
 72 STO 22
 73 RDN
 74 STO 03
 75 R^
 76 ZENTER^
 77 RCL 02
 78 RCL 21
 79 Z*
 80 ZENTER^
 81 RCL 04
 82 RCL 23
 83 Z/
 84 1
 85 -
 86 CHS
 87 X<>Y
 88 CHS
 89 X<>Y
 90 RCL 25
 91 Z^X
 92 1
 93 -
 94 ZENTER^
 95 RCL 03
 96 RCL 22
 97 Z/
 98 ST+ 24
 99 RDN
100 ST+ 01
101 R^
102 ZENTER^
103 RCL 01
104 RCL 24
105 Z/
106 R-P
107 RCL 20
108 X<Y?
109 GTO 02
110 RCL 01
111 RCL 24
112 R-P
113 RDN
114 STO 23
115 SIN
116 ABS
117 RCL 20
118 X<=Y?
119 GTO 03
120 RCL 23
121 COS
122 ENTER^
123 ABS
124 X#0?
125 /
126 RCL 01
127 RCL 24
128 R-P
129 X<>Y
130 RDN
131 *
132 STO 24
133*LBL 03
134 RCL 01
135 RCL 24
136 ZAVIEW
137 END

and:

Code:
 9:28PM 04/21
 01*LBL "ZZ"
 02 RCL 01
 03 RCL 24
 04 ZENTER^
 05 W^Z
 06 ZRCL 4
 07 Z-
 08 END

in the last part you see that ZRCL 4 is equivalent to {RCL 08, RCL 09, ZENTER^}

Cheers,
ÁM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Valentin Albillo's "Boldly Going... Going Back to the roots" now for the... - Ángel Martin - 04-21-2024 07:27 PM



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