Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. mov.w #0x2400, r9 ;r9 = #0x2400 | Set r9 to address #0x2400. This will be the address the program will run in.
  2. mov.w #10, r10 ;r10 = #10 | Set r10 to the decimal number 10
  3. mov.w #0, r11 ;r11 = #0 | Set r11 to 0
  4. mov.w r11, 0(r9) ;r11 = (r9 + 0) | r11 = #0x2400 offset by 0
  5.  
  6. mov.w #1, r12 ;r12 = #1 | Set r12 to the decimal number 1
  7. incd r9 ;
  8. mov.w r12, 0(r9) ;r12 = (0 + r9) |
  9.  
  10. loop tst r10
  11. jz forever ;jump if equal
  12.  
  13. incd r9
  14. dec r10 ;decrement r10 by 1
  15.  
  16. mov.w r12, r13 ;r12 = r13
  17. add.w r11, r12 ;r11 = r12
  18. mov.w r12, 0(r9) ;r12 = (0 + r9)
  19. mov.w r13, r11 ;r13 = r11
  20. jmp loop
  21.  
  22. forever jmp forever
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement