zorke Posted September 5, 2012 Posted September 5, 2012 Hi Recently i've started a project which requires displaying output as a decimal number in ASCII characters. I've done the Hex value - to - ascii char thing but conversion of the number ... say - 2012 from hex (which is 0x07dc) to a decimal number displayed on the screen (2012) is a bit more difficult. Example : eax == 07dc i want to display in a messagebox the decimal value of eax. how do i make it decimal? Thanks
Nacho_dj Posted September 5, 2012 Posted September 5, 2012 (edited) Here is a function of me coded for Delphi performing that task, I hope it could be helpful:function IntegerToString(Quantity: Int64): String;var Remainder: Integer;begin Result := ''; Repeat Remainder := Quantity MOD 10; Result := Chr(Remainder + Ord('0')) + Result; Quantity := Quantity DIV 10; until Quantity = 0;end; Edited September 5, 2012 by Nacho_dj
Vovan666 Posted September 5, 2012 Posted September 5, 2012 masm32\help\masmlib\Conversionsall functions as sources masm32\m32lib
deepzero Posted September 5, 2012 Posted September 5, 2012 also, check the winapis printf/sprintf/wsprintf. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now