Post Reply 
4K HP 67 Games rom attached for testing
11-19-2016, 09:46 PM
Post: #141
RE: 4K HP 67 Games rom attached for testing
Ok, it looks like it is working.

I was out of range. I think we are good to send off once I play a few more games. Hopefully Robert can play a bit to check.
Find all posts by this user
Quote this message in a reply
11-19-2016, 10:48 PM
Post: #142
RE: 4K HP 67 Games rom attached for testing
(11-19-2016 09:46 PM)Gene Wrote:  Ok, it looks like it is working.

I was out of range. I think we are good to send off once I play a few more games. Hopefully Robert can play a bit to check.

I just added a sample game to my last post.
Maybe you want to try it and see if you can reproduce the results.

And please don't forget the FIX 2. Just to be sure. ;-)

Dieter
Find all posts by this user
Quote this message in a reply
11-19-2016, 11:01 PM
Post: #143
RE: 4K HP 67 Games rom attached for testing
FIX 2 noted and included. ty
Find all posts by this user
Quote this message in a reply
11-20-2016, 12:47 AM (This post was last modified: 11-20-2016 01:05 AM by Gene.)
Post: #144
RE: 4K HP 67 Games rom attached for testing
Urgent:

Does the AOS program have a problem? I did a XEQ AOS to initialize. Then I did 1 + 2 = and it shows 0.

?

Code:
 01 LBL "AOS" 
 02 SF 27 
 03 LBL a 
 04 CF 01 
 05 CF 02 
 06 22 
 07 CF 22 
 08 0 
 09 LBL 09 
 10 STO IND Y 
 11 DSE Y 
 12 GTO 09 
 13 STO 00 
 14 12 
 15 STO 23 
 16 -1 
 17 STO 24 
 18 CLST 
 19 RTN 
 20 LBL "+" 
 21 LBL A 
 22 61 
 23 GTO 00 
 24 LBL "-" 
 25 LBL B 
 26 51 
 27 GTO 00 
 28 LBL "*" 
 29 LBL C 
 30 42 
 31 GTO 00 
 32 LBL "/" 
 33 LBL D 
 34 32 
 35 GTO 00 
 36 LBL "YX" 
 37 LBL b 
 38 14 
 39 GTO 00 
 40 LBL "NEG" 
 41 LBL c 
 42 23 
 43 GTO 00 
 44 LBL "<" 
 45 LBL d 
 46 5 
 47 LBL 00 
 48 10 
 49 / 
 50 STO 22 
 51 INT 
 52 X!=0? 
 53 GTO 00 
 54 FS? 01 
 55 XEQ 03 
 56 LBL 00 
 57 RDN 
 58 FS?C 22 
 59 XEQ 02 
 60 RCL 22 
 61 INT 
 62 X=0? 
 63 GTO 00 
 64 LBL 07 
 65 RCL 24 
 66 X<0? 
 67 GTO 00 
 68 RCL IND 24 
 69 FRC 
 70 RCL 22 
 71 FRC 
 72 X>Y? 
 73 GTO 00 
 74 RCL IND 24 
 75 INT 
 76 X=0? 
 77 GTO 00 
 78 XEQ 01 
 79 GTO 07 
 80 LBL 00 
 81 ISG 24 
 82 ENTER 
 83 RCL 24 
 84 13 
 85 X<=Y? 
 86 ASIN 
 87 RCL 22 
 88 STO IND 24 
 89 RCL IND 23 
 90 CF 01 
 91 GTO 99 
 92 LBL ">" 
 93 LBL e 
 94 1 
 95 STO 22 
 96 X<>Y 
 97 FS?C 22 
 98 XEQ 02 
 99 RCL 24 
100 X<0? 
101 SQRT 
102 RCL IND 24 
103 INT 
104 X=0? 
105 GTO 08 
106 XEQ 01 
107 GTO e 
108 LBL 08 
109 DSE 24 
110 ENTER 
111 RCL IND 23 
112 SF 01 
113 GTO 99 
114 LBL E 
115 LBL "=" 
116 1 
117 STO 22 
118 X<>Y 
119 FS?C 22 
120 XEQ 02 
121 RCL 24 
122 X<0? 
123 GTO 00 
124 RCL IND 24 
125 XEQ 01 
126 GTO E 
127 LBL 00 
128 RCL IND 23 
129 XEQ a 
130 RDN 
131 RDN 
132 SF 22 
133 GTO 99 
134 LBL 02 
135 ISG 23 
136 ENTER 
137 21 
138 RCL 23 
139 - 
140 X<0? 
141 SQRT 
142 RDN 
143 STO IND 23 
144 RCL 22 
145 INT 
146 X!=0? 
147 RTN 
148 LBL 03 
149 ISG 24 
150 ENTER 
151 4.2 
152 STO IND 24 
153 RDN 
154 RTN 
155 LBL 01 
156 RCL IND 23 
157 DSE 23 
158 RCL IND 23 
159 X<>Y 
160 XEQ IND Z 
161 FS?C 02 
162 ISG 23 
163 ENTER 
164 RCL 23 
165 13 
166 - 
167 X<0? 
168 SQRT 
169 X<>Y 
170 STO IND 23 
171 DSE 24 
172 RTN 
173 RTN 
174 LBL 01 
175 Y^X 
176 RTN 
177 LBL 02 
178 CHS 
179 LBL 00 
180 SF 02 
181 RTN 
182 LBL 03 
183 / 
184 RTN 
185 LBL 04 
186 * 
187 RTN 
188 LBL 05 
189 CHS 
190 LBL 06 
191 + 
192 LBL 99 
193 RTN 
194 SF 22 
195 END

Link to AOS raw file: AOS raw file

The code should have the fix for this NOP: NOP

Original write-up from PPC Journal: AOS PPC Journal article

Gene: I think it has a problem. :-(
Find all posts by this user
Quote this message in a reply
11-20-2016, 02:31 AM
Post: #145
RE: 4K HP 67 Games rom attached for testing
Until we figure out if there is a problem in the AOS, this is the version that will go in. It gives answers instead of zeroes. :-)

AOS into .rom
Find all posts by this user
Quote this message in a reply
11-20-2016, 05:11 PM (This post was last modified: 11-20-2016 05:48 PM by Dieter.)
Post: #146
RE: 4K HP 67 Games rom attached for testing
(11-20-2016 02:31 AM)Gene Wrote:  Until we figure out if there is a problem in the AOS, this is the version that will go in. It gives answers instead of zeroes. :-)

AOS into .rom

Yes, there is a problem that I fixed in the last version I got here – but obviously the wrong one went into the zip file I posted.

The problem is in the Equals-routine (E) which finally calls the clear-all routine (XEQ a) at a point where the final result is in X. Due to the CLST in the clear-routine this value is lost. So your program works correctly, it just clears its result right before returning it. #-)

The attachment includes two versions: AOS_3 uses CLRG and thus clears all the 41's data registers. Here the final result is saved in Z and finally recalled by two RDNs (same as the original progam). AOS_3a uses a CLRGX loop that clears only R00...R22 and saves the result in LastX so that it can be finally recalled from there after the clearing is done. Both versions should work, both have a specific advantage: AOS_3 is faster, but clears all data registers, while AOS_3a clears only the required ones but takes 2-3 seconds longer for each "AOS" and "=" call due to the clear loop. If a complete CLRG is fine for you, use AOS_3.

Edit: I wonder if this CLRG is required at all. After the stack pointers are reset everything should work without setting all registers to zero. Gene, could you try this by loading AOS_3 and removing the initial CLRG? I have filled R00...R22 with random numbers and the program seems to work fine without clearing the registers.

Dieter


Attached File(s)
.zip  AOS_3.zip (Size: 2.62 KB / Downloads: 3)
Find all posts by this user
Quote this message in a reply
11-20-2016, 05:20 PM (This post was last modified: 11-21-2016 07:42 AM by Dieter.)
Post: #147
RE: 4K HP 67 Games rom attached for testing
(11-20-2016 12:47 AM)Gene Wrote:  Does the AOS program have a problem? I did a XEQ AOS to initialize. Then I did 1 + 2 = and it shows 0.
(...)
Code:
(...)
127 LBL 00 
128 RCL IND 23 
129 XEQ a 
130 RDN 
131 RDN 
132 SF 22 
133 GTO 99

Here is/was the problem: The final result is recalled by RCL IND 23 and then the whole operation stack is cleared (XEQ a). Here the result is lost due to the CLST (and four other values filling the stack) in that routine. Two fixed versions are attached to my previous post.

(11-20-2016 12:47 AM)Gene Wrote:  The code should have the fix for this NOP: NOP

Excuse me, but what is this "NOP" supposed to mean? You have used this term in a few posts and it seems to mean something like a bug report. Here I expected some way of doing a NOP = "no operation" on a '41. #-)

Of course this fix is and was included in AOS and AOS_3/3a.

Dieter
Find all posts by this user
Quote this message in a reply
11-20-2016, 07:12 PM (This post was last modified: 11-20-2016 07:13 PM by Dieter.)
Post: #148
RE: 4K HP 67 Games rom attached for testing
(11-20-2016 02:31 AM)Gene Wrote:  Until we figure out if there is a problem in the AOS, this is the version that will go in.

I see there is already one download of the fixed version 3/3a, and I guess I know who did it. ;-)

Anyway, here is the AOS version 4 which I am currently testing. It has no CLRG or another clearing routine, and it recalls the final result after an "=" operation directly from R13. Also note the SF22 instead of CF22 on startup which allows starting with an operator key (and x=0). Maybe you can try this one as well.

Dieter


Attached File(s)
.zip  AOS_4.zip (Size: 1.29 KB / Downloads: 2)
Find all posts by this user
Quote this message in a reply
11-20-2016, 07:41 PM
Post: #149
RE: 4K HP 67 Games rom attached for testing
(11-20-2016 05:20 PM)Dieter Wrote:  Excuse me, but what is this "NOP" supposed to mean? You have used this term in a few posts and it seems to mean something like a bug report. Here I expected some way of doing a NOP = "no operation" on a '41. #-)

Dieter

Gene: NOP was a column heading for corrections in the PPC Journal for many years. It might be article corrections, programming errors, etc.

Here's a link to a two page illustration of the Journal cover page and the page showing the NOP column: PPC V5N4 NOP
Find all posts by this user
Quote this message in a reply
11-20-2016, 07:55 PM
Post: #150
RE: 4K HP 67 Games rom attached for testing
AOS_3 is the one going into the rom.

I played with AOS4, but I think it has a bit more tweaking to do. Great idea, but I need to get the files to Angel and AOS3 seems to work fine.

AOS4 had a problem with this:

( 1 + 2 ) * ( 2 + 3 ) =

It showed a 0 in the middle of the calculation and gave a 0.

AOS3 is a great program! :-)
Find all posts by this user
Quote this message in a reply
11-20-2016, 08:02 PM
Post: #151
RE: 4K HP 67 Games rom attached for testing
Link to PDF of all program listings in the rom: PDF

Link to .zip of all .raw files in the rom: .zip of .raw

The .zip file includes a space "SumDigits.raw" file which is rom filler if there is enough space. I don't expect there to be enough room, so it will be carried over to rom2. :-) If it is included, it should be XROM 23,27 to avoid changing the hard coded XROM instructions we put in to call the Seed and RN routines.
Find all posts by this user
Quote this message in a reply
11-20-2016, 08:07 PM
Post: #152
RE: 4K HP 67 Games rom attached for testing
(11-20-2016 07:55 PM)Gene Wrote:  AOS4 had a problem with this:

( 1 + 2 ) * ( 2 + 3 ) =

It showed a 0 in the middle of the calculation and gave a 0.

Hmm... will check this.

(11-20-2016 07:55 PM)Gene Wrote:  AOS3 is a great program! :-)

OK then. But please also try it without the CLRG at the beginning. It should work just as well without losing all data registers.

Dieter
Find all posts by this user
Quote this message in a reply
11-20-2016, 08:14 PM
Post: #153
RE: 4K HP 67 Games rom attached for testing
(11-20-2016 07:41 PM)Gene Wrote:  Gene: NOP was a column heading for corrections in the PPC Journal for many years. It might be article corrections, programming errors, etc.

Fine – but what does it stand for? I didn't find an explanation on page 3 of V5N4 you posted. Is it an acronym? An abbreviation? Or does it simply refer to the NOP instruction?

Dieter
Find all posts by this user
Quote this message in a reply
11-20-2016, 08:38 PM
Post: #154
RE: 4K HP 67 Games rom attached for testing
CLRG is removed from the AOS program.

I think NOP does refer to the No OPeration instruction because errors in an article didn't do anything or errors in a program were incorrect. I am not sure of the original derivation, but it has been around in HP calculator circles for ages.
Find all posts by this user
Quote this message in a reply
11-21-2016, 01:22 AM
Post: #155
RE: 4K HP 67 Games rom attached for testing
Gene & Dieter,

Are you feeling like HP Quality/Test Engineers testing about-to-be-released calculator software back in the day? Impressive amount of testing and updates happening at a fast pace!

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
11-21-2016, 03:44 AM (This post was last modified: 11-21-2016 03:52 AM by Gene.)
Post: #156
RE: 4K HP 67 Games rom attached for testing
No, because they did a much better job at this than we are doing. :-)

And Robert and Dieter are the coders here.
Find all posts by this user
Quote this message in a reply
11-21-2016, 08:53 PM (This post was last modified: 11-21-2016 10:10 PM by Dieter.)
Post: #157
RE: 4K HP 67 Games rom attached for testing
(11-19-2016 07:14 PM)Dieter Wrote:  (ST program)
I cannot say anything for sure, but the attached version (less than 30 minutes old) seems to run OK. It even does some things right that the original 67 program (and its documentation) did not.

I just saw that one of the data registers can be saved since R07 only holds the constant 25, which is the sensor range. This value is used only once, and another time half of this to define the phaser reach (so that's 12,5 here).

So I replaced R11 with R07 and inserted the two constants directly into the code: the sensor range still is 25 (line 53), the max. allowed Klingon distance for a phaser attack was rounded up to 15 (line 162, saves two bytes compared to 12,5 ;-)).

If you want to update the ST program – although it is not strictly required –, here is version 3a.

Edit: There is also an improved version of the SD program. Requires 96 bytes and needs two registers less than the original version. Also the output looks cleaner now since I added the one or other CF 29. ;-)

Dieter


Attached File(s)
.zip  ST3a.zip (Size: 1.83 KB / Downloads: 5)
Find all posts by this user
Quote this message in a reply
11-22-2016, 02:36 AM
Post: #158
RE: 4K HP 67 Games rom attached for testing
Gene,
Tried to send you a PM and it said you had reached your private message quota. Sad
Visit this user's website Find all posts by this user
Quote this message in a reply
11-22-2016, 02:56 AM
Post: #159
RE: 4K HP 67 Games rom attached for testing
fix now. :-)
Find all posts by this user
Quote this message in a reply
11-22-2016, 02:58 AM
Post: #160
RE: 4K HP 67 Games rom attached for testing
(11-21-2016 08:53 PM)Dieter Wrote:  Edit: There is also an improved version of the SD program. Requires 96 bytes and needs two registers less than the original version. Also the output looks cleaner now since I added the one or other CF 29. ;-)
Dieter


Gene: Post it! That's the filler program for the .rom and if it takes less room it might make it.
Find all posts by this user
Quote this message in a reply
Post Reply 




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