HP Forums
REVERSE DIGITS - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: REVERSE DIGITS (/thread-5929.html)



REVERSE DIGITS - ggauny@live.fr - 03-25-2016 12:24 PM

In the same ways, because we, sometimes, need reversing order of digits in register X, I have written this little routine.
Code:

001 LBL'REV'
002 LocR 001
003 STO .00
004 STO- .00
005 FP
006 STO+ .00
007 RCL L
008 IP
009 # 010
010 STO[times] .00
011 /
012 x[!=]0?
013 BACK 008
014 RCL .00
015 RTN
016 END

Hope this little routine will agree you.

Have a nice day !


RE: REVERSE DIGITS - ggauny@live.fr - 03-25-2016 12:25 PM

For example :

123 ==> 321
1935 ==> 5391
etc.