Monday, September 20, 2010

MASM Programs: Fibonacci Series

.model small
.stack
print macro q
lea dx,q
mov ah,09h
int 21h
endm
.data
msg db "Fibonacci series is $"
.code
.startup
print msg
mov dl,30h
mov ah,02h
int 21h
mov dl,31h
mov ah,02h
int 21h
mov bh,00h
mov bl,01h
mov cx,05
l:mov dh,bl
add bl,bh
mov bh,dh
mov dl,bl
add dl,30h
mov ah,02h
int 21h
loop l
.exit
end


0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes