title: Easy68k Assembly ORG directive
body: <p>I know similar questions have been asked, but listen anyway.</p>
  
  <p>I've written quite a few Easy68k programs this semester, and I am curious why org directive is always set to $1000, or $2000, or $2500.</p>
  
  <p>While the answer is "by personal convention", I am more interested in understanding the following:</p>
  
  <ul>
  <li>What are the benefits of setting org directive, CPU can execute anything from 0x0 to 0xffffffff, so what is the need to offset the program start all the way to 0x1000?</li>
  </ul>
  
  <p>For instance:</p>
  
  <pre><code>    org $1000
  start:
      moveq #9, d0
      trap  #15
  
      end start
  </code></pre>
  
  <p>works, but is offset by 4096 bytes down</p>
  
  <pre><code>start:
      moveq #9, d0
      trap  #15
  
      end start
  </code></pre>
  
  <p>works also, but is not offset at all</p>
  
  <p>So why is this directive needed? I am not reserving [0x0, 0x1000) for any particular purpose, so what is the point of keeping this offset?</p>
  
  <p>Conclusions so far</p>
  
  <ul>
  <li>Easy68k does not have a default place for global variables, they are placed at pc (usually at the end of program by convention).</li>
  <li>Easy68k's default stack pointer is at 0, growing downwords to 0xffffffe, and downwards (it is word aligned): this means that there is no conflict with [0, 0x1000) region. In fact, it would corrupt the code before corrupting the [0, 0x1000) region.</li>
  </ul>
  
  <p>I'm really curious.</p>
  
  <p>Thanks ahead of time!</p>
  
  <p>~Dmitry</p>