title: How does an OS affect how assembly code runs?
body: <p>I'm hoping to learn assembly language for x86.  I'm on a Mac, and I'm assuming most x86 tutorials/books use code that's meant for Windows.</p>
  
  <p>How does the OS that code is run on affect what the code does, or determine whether the code even works?  Could I follow a Windows-based tutorial, and modify a few commands to make it work for Mac with relative ease?  More generally, is there anything tricky that a Mac assembly programmer, specifically, should know?  Thanks!</p>