Advertisement
Gabedini

question 3

Aug 1st, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. TITLE MASM Template (main.asm)
  2.  
  3. ; Description:
  4. ;
  5. ; Revision date:
  6.  
  7. INCLUDE Irvine32.inc
  8. .data
  9.  
  10. .code
  11. main PROC
  12. mov eax, 1 ;moves 1 into eax
  13. mov ebx, 0 ;moves 0 into ebx
  14. fibnum:
  15. mov edx, eax
  16. add edx, ebx ; i.e. eax + ebx
  17. mov eax, ebx ; i.e. eax = ebx
  18. mov ebx, edx ; i.e. ebx = ebx +eax
  19.  
  20.  
  21. call DumpRegs
  22. loop fibnum ; how do I tell it to stop after so many iterations?
  23.  
  24. exit
  25. main ENDP
  26.  
  27. END main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement