Re: Received HP 12C 30th Anniv. Message #17 Posted by Glenn Shields on 10 Sept 2011, 12:03 a.m., in response to message #16 by Katie Wasserman
Thanks for sharing that, Katie- I didn't realize how far back that goes. I have learned so much from this forum, and hoped that I could share a little along the way (but I get a little hasty in composing posts and don't edit with separate lines the way most of you do).
Anyway, here is something I sort of adapted from working with the 35S (which has flags and indirect addressing, of course) but is more fun on the extremely fast 12C, using up to 16 items stored in registers 0 -> .5 :
1 5 STO n 0 STO i RCL gCFj RCL gCFj x<y? GTO 20 x<>y gCFj x<>y gCFj
STO i RCL n 1 - STO n GTO 24 RCL n 1 + STO n x=0? GTO 27 GTO 06
RCL i x=0? GTO 00 GTO 01
When register i has any value besides 0 it means a switch is necessary. Again, what an honor to hear from you, Katie - thanks,
Glenn :-)
|