title: Convert string to int. x86 32 bit Assembler using Nasm
body: <p>So I'm trying to convert a string to a number so I can add another number to it later. here is what I have to far in my .text for the conversion. num2Entered is what the user entered. Num1plusNum2 is the label that I will eventually add to. They are both declared in the .bss section. Any help would be appreciated! </p>
  
  <pre><code>    mov ax, [num2Entered + 0]
      sub ax, '0'
      mov bx, WORD 1000
      mul bx
      mov [Num1plusNum2], ax
  
      mov ax, [num2Entered + 1]
      sub ax, '0'
      mov bx, WORD 100
      mul bx
      add [Num1plusNum2], ax
  
      mov ax, [num2Entered + 2]
      sub ax, '0'
      mov bx, WORD 10
      mul bx
      add [Num1plusNum2], ax
  
      mov ax, [num2Entered + 3]
      sub ax, '0'
      add [Num1plusNum2], ax
  </code></pre>