title: Why do Off-the-shelf applications work on both Intel and AMD processors?
body: <p>One thing I lack understanding on is how can code compiled for an Intel CPU work on an AMD CPU.</p>
  
  <p>My base understanding is that if you compile C code, for example, the compiler turns the source code into machine language which will have instructions for a particular processor. So, you need to compile with a compiler for whatever platform you want your application to use. Why don't you require a compiler for AMD versus Intel, and have to buy software for a particular processor?</p>
  
  <p>I know that AMD processors and Intel processors share some compatibility in the older x86 instructions; what I'd like to know is how do they do that? I mean, it's not like AMD or Intel are calling each other up and telling each other their trade secrets, so how can they create instruction sets that are compatible?</p>
  
  <p>Is all compatibility still based on the 386 instruction set, with a bunch of statements like "IF AMD CPU, do this ELSE IF INTEL do that"?</p>