Post Reply 
HHC 2015 RPN programming Contest is now open
09-27-2015, 11:54 PM (This post was last modified: 09-28-2015 01:21 PM by Bill (Smithville NJ).)
Post: #21
RE: HHC 2015 RPN programming Contest is now open
I took a pass at it. 40 steps and 75 bytes on an HP-42S using only HP-41C instructions (I hope).

Code:

 01 LBL "RR"
 02 CF 00
 03 CF 01
 04 CF 02
 05 CF 03
 06 CF 04
 07 CF 05
 08 CF 06
 09 0
 10 STO 07
 11 5
 12 STO 10
 13 LBL 01
 14 RCL IND 10
 15 FS? IND X
 16 GTO 02
 17 SF IND X
 18 1
 19 -
 20 10^X
 21 ST+ 07
 22 LBL 02
 23 DSE 10
 24 GTO 01
 25 RCL 07
 26 1111
 27 X=Y?
 28 SF 00
 29 10
 30 *
 31 X=Y?
 32 SF 00
 33 10
 34 *
 35 X=Y?
 36 SF 00
 37 1
 38 FS? 00
 39 0
 40 END

There should be some opportunity to make it smaller, but I'm just happy that I was able to come up with a solution to it. I forgot how rusty I was with programming a calculator (I don't do it much any more). It gave me an opportunity to re-familiarize myself with the HP-41C manual.

Lots of fun.

Bill Smithville

Edit: Minor Change of Program LBL to "RR". Jud now actually read the complete Rules.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HHC 2015 RPN programming Contest is now open - Bill (Smithville NJ) - 09-27-2015 11:54 PM



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