title: What does the ".align" x86 Assembler directive do exactly?
body: <p>I will list exactly what I do not understand, and show you the parts I can not understand as well.</p>
  
  <p>First off, </p>
  
  <p><strong>The .Align Directive</strong></p>
  
  <ol>
  <li>.align integer, pad. 
  The .align directive causes the next data generated to be aligned modulo integer bytes</li>
  </ol>
  
  <p>1.~ ? : What is implied with "<strong><em>causes the next data generated to be aligned modulo integer bytes?"</em></strong>  I can surmise that the next data generated is a memory-to-register transfer, no? Modulo would imply the remainder of a division. I do not understand "<strong><em>to be aligned modulo integer bytes</em></strong>".......   </p>
  
  <p>What would be a remainder of a simple data declaration, and how would the next data generated being aligned by a remainder be useful? If the next data is aligned modulo, that is saying the next generated data, whatever that means exactly, is the remainder of an integer? That makes absolutely no sense.</p>
  
  <p>What specifically would the .align, say, <code>.align 8</code> directive issued in x86 for a data byte compiled from a C <code>char</code>, i.e., <code>char CHARACTER = 0;</code> be for? Or specifically coded directly with that directive, not preliminary Assembly code after compiling C? I have debugged in Assembly and noticed that any C/C++ data declarations, like <code>chars</code>, <code>ints</code>, <code>floats</code>, etc. will insert the directive <code>.align 8</code> to each of them, and add other directives like <code>.bss</code>, <code>.zero</code>, <code>.globl</code>, <code>.text</code>, <code>.Letext0</code>, <code>.Ltext0</code>. </p>
  
  <p>What are all of these directives for, or at least my main asking? I have learned a lot of the main x86 Assembly instructions, but never was introduced or pointed at all of these strange directives. How do they affect the opcodes, and are all of them necessary?</p>