# Print Dynamically Fibonacci series in Assembly Language

`ORG 100H.MODEL SMALL.STACK 100H.DATA R DB 'ENTER RANGE \$'F DB 0S DB 1SUM DB ?N DW ? FAB DB 13,10,13,10,'FABANOCCI SERIES\$'.CODEMAIN PROCMOV DX,OFFSET RMOV AH,9 ;PRINTING A STRINGINT 21H;INPUT CODE STARTS HEREMOV N,0 ;N = 0MOV BL,10 ;BL = 10INPUT:MOV AH,1 ;TAKE INPUTINT 21HCMP AL,13 ;IF(INPUT == ENTER) JE NEXT ;JUMP EQUAL TOSUB AL,30HMOV AH,0MOV CX,AX ;CX = AXMOV AX,N ;AX = NMUL BL ;AX = AX BLADD AX,CX ;AX = AX + CXMOV N,AX ;N = AXJMP INPUT;INPUT CODE ENDS HERENEXT:LEA DX,FAB MOV AH,9INT 21HMOV CX,N ;CX = NL:PUSH CXMOV DL,10 MOV AH,2INT 21HMOV DL,13MOV AH,2INT 21HMOV BL,F ;BL = F = 0ADD BL,S ;BL = BL + SMOV SUM,BL ;SUM = BL;OUTPUT CODE STARTS HEREMOV AH,0 ;AH = 0MOV AL,SUM ;AL = SUM;DISPLAYMOV DX,0MOV BX,10MOV CX,0L1:DIV BXPUSH DXMOV DX,0;MOV AH,0 ;AX AH 00000000 AL=QUOTIENTINC CXCMP AX,0JNE L1MOV AH,2L2:POP DXADD DX,48INT 21HLOOP L2;OUTPUT CODE ENDS HEREMOV BL,S ;BL = SMOV F,BL ;F = BL F = SMOV BL,SUM ;BL = SUMMOV S,BL ;S = BLPOP CXLOOP LRETMAIN ENDPEND MAINP`

Contact Details for Assembly Projects

If you want any Project then contact our Customer support

Email: support@wsptech.pk

Mobile no: +92 304 5180559

You can contact any time on Mobile Number.