Advertisement
Guest User

Untitled

a guest
Jul 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. Show Fibonacci series upto 50 index. starting with first two number 1,1
  2. Done with DW
  3. =====================================================
  4.  
  5.  
  6. org 100h
  7.  
  8. MOV si,offset arr
  9.  
  10. MOV ax,1
  11. MOV bx,1
  12. MOV cx,50
  13.  
  14. MOV [si],ax
  15.  
  16. inc si
  17. inc si
  18.  
  19. MOV [si],bx
  20.  
  21. inc si
  22. inc si
  23.  
  24.  
  25. l:
  26.  
  27. MOV ax,[si-2]
  28. MOV bx,[si-4]
  29.  
  30. ADD ax,bx
  31. MOV [si],ax
  32.  
  33. inc si
  34. inc si
  35.  
  36.  
  37. loop l
  38.  
  39.  
  40. ret
  41.  
  42. arr dw 50 dup(?)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement