The MASM Forum

General => The Campus => Topic started by: Exit on July 26, 2012, 03:54:43 AM

Title: dword to Hex
Post by: Exit on July 26, 2012, 03:54:43 AM
Hello..!

include c:\masm32\include\masm32rt.inc
.data
variable  dword  3 dup(?)

.code
start:
mov eax, 7543210h
mov variable, eax

push offset variable
push eax
call dwtoa

invoke StdOut, offset variable
invoke ExitProcess,0
end start

comment!
the output is 122958352, decimal representaation of 7543210h
how do i get instead of in decimal, the output in hex ?

thank you.!
Title: Re: dword to Hex
Post by: qWord on July 26, 2012, 04:07:30 AM
invoke dw2hex,value,ADDR sz
see \masm32\help\masmlib.chm for more details.

the corresponding macro:
mov psz,hex$(value)
see \masm32\help\hlhelp.chm