title: Real Mode 32-bit registers
body: <p>I'm writing some Real Mode code and using 32 bit registers to do so (using the 0x66 prefix).</p>
  
  <p>I've been looking through Intel's manuals, and cannot find the information I am looking for.
  See: <a href="http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html" rel="nofollow noreferrer">http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html</a> (I have skimmed Volume 1 Chapters 1-7, as well as specific instructions from Volume 2)</p>
  
  <p>Does Intel guarantee specific behavior for the following code in real mode code? Is it the same as protected mode code?</p>
  
  <pre><code>mov eax, &lt;some constant&gt;
  mov ebx, &lt;some constant&gt;
  add ax, bx ; Are the top bits of ax zero'd, sign extended or left?
  mov ax, &lt;some constant&gt; ; Does this leave top 16bits unchanged?
  ; From what I can tell, the top 16bits are unchanged, but where is this documented?
  </code></pre>
  
  <p>Note: I am not after how <strong>specific</strong> implementations act (ie code that checks it -- unless every implementation has always acted the same), just where Intel has documented this behavior.</p>
  
  <p>Related: <a href="https://stackoverflow.com/questions/25455447/x86-64-registers-rax-eax-ax-al-overwriting-full-register-contents">x86_64 registers rax/eax/ax/al overwriting full register contents</a></p>
  
  <p>How this is different: This question relates specifically to Real Mode operation, and whether the observations from the linked question are valid in Real Mode.</p>
  
  <p>Can anyone help me find where I can find this documented for real mode code?</p>