(HP-67/97) a little fun with the fifteen puzzle
|
05-03-2017, 12:03 AM
Post: #15
|
|||
|
|||
RE: (HP-67/97) a little fun with the fifteen puzzle
(05-02-2017 03:03 PM)Dave Britten Wrote: Here's a quick 16C version of Don's 65 program. The bit manipulation/counting instructions make this algorithm pretty trivial on this model: you don't have to implement any kind of loop for bit counting, just mask them off and use #B to get a count. Of course, the lack of register arithmetic adds a few unnecessary steps. But 25 steps and 2 registers ain't bad! Thanks Dave, the 16c is a great calculator. In fact it was the first HP I ever owned, back in the early 80's. Yes, I was thinking as I was looking at the 65 code that a loop would be unnecessary if we could only sum the bit range rather than looping through all the bits looking for a 1, but I didn't see an easy way to do that. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)