could be this has been talked already,
and its not i dont wanna search, but the point is to learn alone without
looking into ready made code.
so i have coded this snippet procedure, the way i see it, its pretty long,
and i wanna make it more efficient, and faster.
i would love to hear suggestions.



pushad
pushf
xor ecx,ecx
xor eax,eax
xor edi,edi
mov edi,8h
mov esi, AsmDwordNum ; point to the string, i.e: 12345678
_start:
mov cl,[esi]
cmp cl,30h
jl _lower
cmp cl,39h
jg _upper
sub cl,30h
jmp _jmp1

_upper:
sub cl,37h
jmp _jmp1
_lower:
_jmp1:
add eax,ecx
cmp edi,1
jz _out
shl eax,4h
_out:
inc esi
dec edi
jnz _start

mov DwordNum,eax
popf
popad
Posted on 2002-12-29 13:33:06 by wizzra