convert ascii / binary to decimal in assembly language
<p>i wanted to convert a binary number to a decimal in assembly but i keep on getting zero</p>

<p>this is the number </p>

<pre><code>aLength     db  "00000000000000000000000000010101", NULL
</code></pre>

<p>and i tried using this code to get each character and subbing by '0' multiplying by 2 and adding but it keeps saying that the answer is 0</p>

<pre><code>mov rbx,aLength
mov dword[rsum],0
mov ecx,0
mov r10,32


lp: 
mov cl,byte[rbx]
sub cl,'0'
mov eax,dword[rsum]
mul dword[two]
add eax,ecx
mov dword[rsum],eax
add rbx,1
dec r10
cmp r10,0
jbe lp

mov r8d,dword[rsum]
mov byte[aLength],r8b
</code></pre>