資源描述:
《實驗二:8259 中斷控制器實驗》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、實驗二8259A中斷控制器實驗1、編制程序:撥動單脈沖開關(guān),“”送給8259A的IR0,觸發(fā)中斷,8088計數(shù)中斷次數(shù),顯示于G5區(qū)的數(shù)碼管上2、運行程序3、上下?lián)軇訂蚊}沖開關(guān),撥動二次,產(chǎn)生一個“”,觀察結(jié)果,數(shù)碼管上顯示的次數(shù)與撥動開關(guān)次數(shù)是否對應。.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