Thank you NIdud,
This code is intended for a GoAsm program
So I have modified it slightly.
Data entered is f42400H but could be any hex number
I get a result of "ni rorre"?
dwtoa is a masm32 and GoAsm convert Dword to ascii string module
BufAdd dd 0
saveeax dd 0 ; temp save
HexInputData db ' ',0 ; set for 6 positions
; HexInputData to Decimal DD
lea esi,HexInputData
xor eax,eax ; result
xor ecx,ecx
xor edx,edx
xor edi,edi
mov edi,5
.lupe
mov cl,[esi] ; esi: string
add esi,1
and ecx,not 030h
bt ecx,6
sbb edx,edx
and edx,55
sub ecx,edx
shl eax,4
add eax,ecx
dec edi ; length of string
jnz <.lupe
mov [saveeax],eax
; test code begin
;tmsg db 'testing result of HexInputData',0
;tmsg2 db ' ',0
mov ecx,[saveeax]
lea ebx,tmsg2
mov [BufAdd], ebx
invoke dwtoa, ecx,[BufAdd] ; Hex DD to string
; output is in tmsg2
invoke MessageBox, [hWnd], addr tmsg, addr tmsg2, MB_OK ;true
; test code end