Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Show Fibonacci series upto 50 index. starting with first two number 1,1
- Done with DW
- =====================================================
- org 100h
- MOV si,offset arr
- MOV ax,1
- MOV bx,1
- MOV cx,50
- MOV [si],ax
- inc si
- inc si
- MOV [si],bx
- inc si
- inc si
- l:
- MOV ax,[si-2]
- MOV bx,[si-4]
- ADD ax,bx
- MOV [si],ax
- inc si
- inc si
- loop l
- ret
- arr dw 50 dup(?)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement