title: converting a vector of chars to int in assembly
body: <p>I'm trying to do the following, but I'm having some trouble, and the only code I find on the web is for transforming strings into a number (basicly atoi), but I need something slightly different, e.g:</p>
  
  <pre><code>num1 Db '60','30'
  num2 Db '2', '3'
  num3 Db '*', '*'
  </code></pre>
  
  <p>Basicly I only need to transform the chars in the vector into numbers (separately), so I can do the operation marked by <code>num3</code> with <code>num1</code> and <code>num2</code>
  as operators, as an example, I'll use my function that multiplies two numbers.
  What I tried was:</p>
  
  <pre><code>MOV AX, DADOS
  MOV DS, AX
  MOV CX, 2
  cycle:      
      CMP num3[si], 2Fh
      JE DIVISAO
      CMP num3[si], 2Ah
      JE MULTIPLICA
      CMP num3[si], 2Bh
      JE SOMA
      CMP num3[si], 2Dh
      JE SUBTRACAO
      inc si
      loop cycle
  
      JMP FIM
  </code></pre>
  
  <p>The multiply function:</p>
  
  <pre><code>MULTIPLICA PROC
      PUSH AX
      MOV AH, 0
      SUB num1[si], 48
      MOV AL, num1[si]
      SUB num2[si], 48
      IMUL num2[si]
      MOV DX, AX
      POP AX
      RET 
  MULTIPLICA ENDP
  </code></pre>
  
  <p>I thought I only needed to subtract 48 to each position to make it into the correspondant number, but I guess there's something more to it. Thanks.
  Edit: Did some ajustments, found out that it's only multiplying the first character, e.g: instead of 60*2, it's only doing 6*2</p>