title: Compare two buffers by char X86 MASM
body: <p>I am using X86 Assembly and need to compare two buffers by character and reflect if they match or not in a third buffer</p>
  
  <p>PsuedoCode:</p>
  
  <pre><code>Compare(ESI=msg_buffer_ptr, EDI=recover_buffer_ptr, EBX=err_buffer_ptr)
  
  ;Compare a character in ESI &amp;&amp; EDI
  ;if ESI == 0 then we are at the end of the string and just return after adding add a 0 to EBX
  ;if they equal; " " -&gt; EBX
  ;if it's a 0dh or 0ah, then transpose them into EBX
  ;else if they don't equal; "X" -&gt; EBX
  ;Loop to next character
  </code></pre>
  
  <p>I'm having trouble figureing out how to access the by each character. </p>