title: MASM Sum of Ascii in a string
body: <pre><code>INCLUDE Irvine32.inc
  .data
  fullName BYTE "Bob Johnson",0
  nameSize = ($ - fullName) - 2
  .code
  main PROC
      mov ECX,nameSize
      mov ESI,OFFSET fullName
  Sum:
      mov EBX,[ESI+ECX]
      add EAX,EBX
      loop Sum
      exit
  main ENDP
  END main
  </code></pre>
  
  <p>So I am having an issue I just want to read one character from the string at a time and store it in EBX register then take the value of that character and keep a running sum in EAX.</p>
  
  <p>Add together all of the ASCII codes of the characters of the string, using 8-bit unsigned arithmetic. Overflow is ignored. 
  The final value is the checksum. For example, if the string is "Joe", then the ASCII values are 4A, 6F, 65. The sum is 11E.</p>