Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. *-----------------------------------------------------------
  2. * Title      :
  3. * Written by :
  4. * Date       :
  5. * Description: C.W = 0 if A.W = B.W, else 1
  6. *-----------------------------------------------------------
  7.     ORG    $1000
  8. A   DC.W    13
  9. B   DC.W    13
  10. C   DS.W    1    
  11.  
  12. START:                  ; first instruction of program
  13.  
  14. * Put program code here
  15.  
  16.     MOVE.W A, D0
  17.     CMP.W B, D0
  18.     BEQ ET0
  19.     MOVE.W #1, C
  20.     BRA FINISH
  21.    
  22. ET0:
  23.  
  24.     MOVE.W #0, C
  25.    
  26. FINISH:
  27.    
  28.     SIMHALT             ; halt simulator
  29.  
  30. * Put variables and constants here
  31.  
  32.     END    START        ; last line of source
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement