HP Forums

Full Version: REVERSE DIGITS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 !
For example :

123 ==> 321
1935 ==> 5391
etc.
Reference URL's