datasegmentOutputBufferdb10dup(0ffh)fibndw25rsnum1Ldw?rsnum1Hdw?rsnum2Ldw?rsnum2Hdw?rtnumLdw?rtnumHdw?msgdb'Fib(n)=','$'dataendscodesegmentassumecs:code,ds:data;,ss:stackmainprocfarstart:movax,datamovds,axmovax,fibncallFibcallSendMsgcallOutputDecmovah,02hmovdl,0ahint21hmovdl,0dhint21hmovah,4chint21hmainendpFibproc;inax,outrtnumpushaxcmpax,2janext1movrtnumL,1movrtnumH,0jmpfib_endnext1:decax;rsnum1=fib(ax-1)callFibmovdx,rtnumLpushdxmovdx,rtnumHpushdxdecax;rsnum2=fib(ax-2)callFibmovdx,rtnumLmovrsnum2L,dxmovdx,rtnumHmovrsnum2H,dx;popdxmovrsnum1H,dxpopdxmovrsnum1L,dx;rtnum=rsnum1+rsnum2movdx,rsnum1Ladddx,rsnum2LmovrtnumL,dxmovdx,rsnum1Hadcdx,rsnum2HmovrtnumH,dxfib_end:popaxretFibendp;OutputDecPROCnearleadi,offsetOutputBufferadddi,9MOVBX,10C0:MOVDX,0MOVAX,rtnumHCMPAX,0JEC1DIVBXMOVrtnumH,AXMOVAX,rtnumLDIVBXMOVrtnumL,AXORDL,30HMOV[DI],DLDECDIJMPC0C1:MOVAX,rtnumLC2:CMPAX,0JZC3MOVDX,0DIVBXORDL,30HMOV[di],DLDECDIJMPC2C3:incdimovah,02hmovdl,[di]int21hcmpdi,9jnzC3RETOutputDecENDP;SendMsgprocnearmovah,09hleadx,msgint21hretSendMsgendp;codeendsendstart