title: Adding two hex values in assembly language (EASy68K)
body: <p>I want to create a program that adds two hex values together using ADD.B, ADD.W, and ADD.L and see what the differences are. I'm new to assembly programming, so I can't seem to get it quite right. There are no errors, but when I run the program, no result is displayed. There also doesn't seem to be any value stored in register D3. Can anyone tell me what I am doing wrong? Thanks a lot for any help.</p>
  
  <pre><code>START   ORG     $1000       Program starts at loc $1000
          MOVE    $374D1FC4,D2     [D0] &lt;- $374D1FC4
          MOVE    $F22C4663,D3    [D1] &lt;- $F22C4663
          ADD.B   D2,D3           [D1] &lt;- [D0] + [D1] 
  *       ADD.W   D2,D3           [D1] &lt;- [D0] + [D1]
  *       ADD.L   D2,D3           [D1] &lt;- [D0] + [D1]
          MOVE    D3,R
  * The following three instructions will display [R] to Output Window
  * Task number 3 of trap #15 is to display D1.L as a signed decimal
      MOVE    R,D1    [D1] &lt;- R
      EXT.L   D1  Extend sign bit to presreve the sign
      MOVE    #3,D0   Assign task number to [D0]
      TRAP    #15 Ask "OS" to perform the task
  
      STOP    #$2700  Stop execution
  
  * Data section
  R   DS.W    1   int R;
      END START
  </code></pre>