News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Is this possible in MASM32 ?

Started by rodolfolopes, October 16, 2014, 05:31:16 PM

Previous topic - Next topic

rodolfolopes

HI there guys AGAIN!
I know i have been asking a lot of help from you, but im really new to this.

I have been reading documentation contained in the MASM32 editor but I couldnt find anything, but, here's my question:

Is there a way to convert a number to the equal value in HEXADECIMAL and OCTAL value?

For example:
Number: 10
The result:
Hexadecimal: A
Oct: 12



I dont know if its possble, BUt if it's i would appreciate a lot the help.

Thanks a lot guys ^_^


MichaelW

There is a CRT function that can convert an integer to a string, using any base from 2 to 36, see _itoa..., and you can readily call (invoke) the function using the name crt__itoa.
Well Microsoft, here's another nice mess you've gotten us into.

dedndave

we rarley use octal - lol
but there are also macros to handle these conversions

look in the file: \masm32\help\hlhelp.chm

print hex$(eax)
print str$(eax)