maybe a bit off topic, but thus an short algo can also be simply inlined:
; return: EAX = number
; tchr2d psz
; tchr2dw &sz
; tchr2dw ADDR sz
; tchr2dw Addr sz
; tchr2dw addr sz
tchr2dw macro psz:req
LOCAL l1,l2
% FOR arg,<reparg(psz)>
IF @InStr(1,<&arg>,<ADDR >) OR @InStr(1,<&arg>,<Addr >) OR @InStr(1,<&arg>,<addr >)
lea ecx,@SubStr(<&arg>,5)
ELSEIFIDN @SubStr(<&arg>,1,1),<!&>
lea ecx,@SubStr(<&arg>,2)
ELSE
mov ecx,arg
ENDIF
EXITM
ENDM
xor eax,eax
l1: movzx edx,TCHAR ptr [ecx]
test edx,edx
jz l2
lea eax,[eax+eax*4]
lea eax,[eax*2+edx-'0']
lea ecx,[ecx+SIZEOF TCHAR]
jmp l1
l2:
endm