I have tested it here and it works. Be sure that you are actually passing the value you think, without seeing an example of what you are passing I can't comment any further. The algo works for ascii strings "0" -> "99" and "00" -> "99".
Posted on 2004-08-06 20:29:36 by donkey

mov dword ptr szDec, eax
pop eax


xor eax,eax
mov al,
sub al,30h
mov dl,
or dl,dl
jz @n ; I changed jz > to jz @n
mov ecx,10
mul cl
sub dl,30h
add al,dl
@n: ;And : to @n
and eax,0FFh

xor edx,edx
mov edi,offset hextab
movzx ecx,al
shr ecx,4
mov dl,
mov ,dl
movzx ecx,al
and ecx,0fh
mov dl,
mov ,dl


mov esi, 01020304
mov eax, dword ptr

mov byte ptr , al ;Here I pass the hex into a memory position

Posted on 2004-08-07 05:32:02 by flapper
You know a solution?
Posted on 2004-08-08 12:26:21 by flapper