《8259中断程序代码.docx》由会员分享,可在线阅读,更多相关《8259中断程序代码.docx(11页珍藏版)》请在三一办公上搜索。
1、程序1T082590EQUOFOOOHIO8259_1EQUOFOOlH_STACKSEGMENTSTACKDW100DUP(?)_STACKENDS_DATASEGMENTWORDPUBLlCDATA,_DATAENDSCODESEGMENTASSUMECS:CODE,DS:_DATA,SS:_STACKSTART:MOVAX,_DATAMOVDS,AXMOVES,AXNOPCALLInit8259CALLWriIntverAl:CMPCX,OOOHJNZA2CLIA3:JMP$A2:STIJMPAlInit8259PROCNEARMOVDX,T08259OMOVAL,13HOUTDX,AL
2、MOVDX,I08259_lMOVAL,08HOUTDX,ALMOVAL,09HOUTDX,ALMOVAL,OFEHRETInit8259ENDPWrilntverPROCNEARPUSHESMOVAX,OMOVES,AXMOVDI,02HLEAAX,INT_OMOVES:DI,AXADDDI,2MOVES:DI,AXPOPESRETWriIntverENDPINTO:INCCXMOVDX,I08259_0OUTDX,ALIRETCODEENDSENDSTART程序2I08259_0EQUOFOOOHI08259_lEQUOFOOlH_STACKSEGMENTSTACKDW100(?)_STA
3、CKENDS_DATASEGMENTWORDPUBLIC,DATA,_DATAENDSCODESEGMENTASSUMECS:CODE,DS:_DATA,SS:,STACKSTART:MOVAX,_DATAMOVDS,AXMOVES,AXNoPCALLInit8259CALLWriIntverMOVSI,3000HMOVDI,6000HAl:STIJMPAlInit8259PROCNEARMOVDX,T08259OMOVAL,13HOUTDX,ALMOVDX,I08259_lMOVAL,08HOUTDX,ALMOVAL,09HOUTDX,ALMOVAL,7EHRETInit8259ENDPWr
4、ilntverPROCNEARPUSHESMOVAX,OMOVES,AXMOVDI,20HLEAAX,INT_OMOVES:DI,AXADDDI,2MOVAX,CSMOVES:DI,AXMOVDI,3CHLEAAX,INT_7MOVES:DT,AXADDDI,2MOVES:DI,AXPOPESRETWriIntverENDPINT_O:MOVAX,02HMOVSI,AXSTIMOVAX,OlHMOVSI,AXMOVDX,108259OMOVAL,20HOUTDX,ALIRETINT_7:MOVAX,02HMOVDI,AXSTIMOVAX,OlHMOVDI,AXMOVDX,I08259_0MOVAL,20HOUTDX,ALIRETCODEENDSENDSTART