资源描述:
《实验二:8259 中断控制器实验》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、实验二8259A中断控制器实验1、编制程序:拨动单脉冲开关,“”送给8259A的IR0,触发中断,8088计数中断次数,显示于G5区的数码管上2、运行程序3、上下拨动单脉冲开关,拨动二次,产生一个“”,观察结果,数码管上显示的次数与拨动开关次数是否对应。.MODELTINYEXTRNDISPLAY8:NEARIO8259_0EQU0F000HIO8259_1EQU0F001H.STACK100.DATABUFFERDB8DUP(?)COUNTERDB?REDISPLAYFLAGDB0.CODESTART:MOVAX,@DATAMOVDS,AXMOVES,AXNOPCALLINIT8259CA
2、LLWRIINTVERMOVCOUNTER,0MOVREDISPLAYFLAG,1STI;¿ªÖжÏSTART1:CMPREDISPLAYFLAG,0JZSTART1CALLLEDDISPLAYMOVREDISPLAYFLAG,0JMPSTART1INIT8259PROCNEARMOVDX,IO8259_0MOVAL,13HOUTDX,ALMOVDX,IO8259_1MOVAL,08HOUTDX,ALMOVAL,09HOUTDX,ALMOVAL,0FEHOUTDX,ALRETINIT8259ENDPWRIINTVERPROCNEARPUSHESMOVAX,0MOVES,AXMOVDI,20
3、HLEAAX,INT_0STOSWMOVAX,CSSTOSWPOPESRETWRIINTVERENDPLEDDISPLAYPROCNEARMOVAL,COUNTERMOVAH,ALANDAL,0FHMOVBUFFER,ALANDAH,0F0HRORAH,4MOVBUFFER+1,AHMOVBUFFER+2,10H;¸ßÁùλ²»ÐèÒªÏÔʾMOVBUFFER+3,10HMOVBUFFER+4,10HMOVBUFFER+5,10HMOVBUFFER+6,10HMOVBUFFER+7,10HLEASI,BUFFERCALLDISPLAY8RETLEDDISPLAYENDPINT_0:PUS
4、HDXPUSHAXMOVAL,COUNTERADDAL,1DAAMOVCOUNTER,ALMOVREDISPLAYFLAG,1MOVDX,IO8259_0MOVAL,20HOUTDX,ALPOPAXPOPDXIRETENDSTART