資源描述:
《實(shí)驗(yàn)二:8259 中斷控制器實(shí)驗(yàn)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫(kù)。
1、實(shí)驗(yàn)二8259A中斷控制器實(shí)驗(yàn)1、編制程序:撥動(dòng)單脈沖開關(guān),“”送給8259A的IR0,觸發(fā)中斷,8088計(jì)數(shù)中斷次數(shù),顯示于G5區(qū)的數(shù)碼管上2、運(yùn)行程序3、上下?lián)軇?dòng)單脈沖開關(guān),撥動(dòng)二次,產(chǎn)生一個(gè)“”,觀察結(jié)果,數(shù)碼管上顯示的次數(shù)與撥動(dòng)開關(guān)次數(shù)是否對(duì)應(yīng)。.MODELTINYEXTRNDISPLAY8:NEARIO8259_0EQU0F000HIO8259_1EQU0F001H.STACK100.DATABUFFERDB8DUP(?)COUNTERDB?REDISPLAYFLAGDB0.CODESTART:MOVAX,@DATAMOVDS,AXMOVES,AXNOPCALLINIT8259CA
2、LLWRIINTVERMOVCOUNTER,0MOVREDISPLAYFLAG,1STI;?a?D??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;??áù??2?Dèòa??ê?MOVBUFFER+3,10HMOVBUFFER+4,10HMOVBUFFER+5,10HMOVBUFFER+6,10HMOVBUFFER+7,10HLEASI,BUFFERCALLDISPLAY8RETLEDDISPLAYENDPINT_0:PUS
4、HDXPUSHAXMOVAL,COUNTERADDAL,1DAAMOVCOUNTER,ALMOVREDISPLAYFLAG,1MOVDX,IO8259_0MOVAL,20HOUTDX,ALPOPAXPOPDXIRETENDSTART