资源描述:
《微机原理课设字幕机代码》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、PUBLICL_CON;定义公共变量M8255_AEQU0640H;定义8255A口、B口、C口和控制口地址M8255_BEQU0642HM8255_CEQU0644HM8255_CONEQU0646HSSTACKSEGMENTSTACK;定义堆栈段DW32DUP(?);定义一个32位的字型存储空间SSTACKENDSDATASEGMENTTAB1DB4fH,00H,00H,00H,00H,00H,00H,00H;组成“中华”二字的TAB2DB48H,4fH,00H,00H,00H,00H,00H,00H数字代码TAB3DB7eH,
2、48H,4fH,00H,00H,00H,00H,00HTAB4DB0feH,7eH,48H,4fH,00H,00H,00H,00HTAB5DB7eH,0feH,7eH,48H,4fH,00H,00H,00HTAB6DB49H,7eH,0feH,7eH,48H,4fH,00H,00HTAB7DB4fH,49H,7eH,0feH,7eH,48H,4fH,00HTAB8DB00H,4fH,49H,7eH,0feH,7eH,48H,4fHTAB9DB48H,00H,4fH,49H,7eH,0feH,7eH,48HTAB10DB2AH,48H
3、,00H,4fH,49H,7eH,0feH,7eHTAB11DB1CH,2AH,48H,00H,4fH,49H,7eH,0feHTAB12DB78H,1CH,2AH,48H,00H,4fH,49H,7eHTAB13DB1CH,78H,1CH,2AH,48H,00H,4fH,49HTAB14DB2AH,1CH,78H,1CH,2AH,48H,00H,4fHTAB15DB48H,2AH,1CH,78H,1CH,2AH,48H,00HL_CONDB?DATAENDSCODESEGMENTASSUMECS:CODE,DS:DATASTART
4、:MOVAX,DATA;初始化语句MOVDS,AXMOVL_CON,7FHMOVDX,M8255_CONMOVAL,80H;写8255控制字OUTDX,ALAA0:MOVBL,0D0H;定义外循环次数AA1:MOVSI,OFFSETTAB1;循环显示第一个图形MOVCX,0008H;定义内循环次数8次DIS1:MOVDX,M8255_AMOVAL,L_CONOUTDX,ALMOVDX,M8255_BMOVAL,[SI]OUTDX,ALRORL_CON,1;列右移一位INCSI;行自动加1CALLDELAY;调用延时子程序LOOPDI
5、S1DECBLCMPBL,00HJNEAA1MOVBL,0D0HAA2:MOVSI,OFFSETTAB2;循环显示第二个图形;MOVCX,0008HDIS2:MOVDX,M8255_AMOVAL,L_CONOUTDX,ALMOVDX,M8255_BMOVAL,[SI]OUTDX,ALRORL_CON,1INCSICALLDELAYLOOPDIS2DECBLCMPBL,00HJNEAA2MOVBL,0D0HAA3:MOVSI,OFFSETTAB3;循环显示第三个图形MOVCX,0008HDIS3:MOVDX,M8255_AMOVAL,
6、L_CONOUTDX,ALMOVDX,M8255_BMOVAL,[SI]OUTDX,ALRORL_CON,1INCSICALLDELAYLOOPDIS3DECBLCMPBL,00HJNEAA3MOVBL,0D0HAA4:MOVSI,OFFSETTAB4;循环显示第四个图形MOVCX,0008HDIS4:MOVDX,M8255_AMOVAL,L_CONOUTDX,ALMOVDX,M8255_BMOVAL,[SI]OUTDX,ALRORL_CON,1INCSICALLDELAYLOOPDIS4DECBLCMPBL,00HJNEAA4MO
7、VBL,0D0HAA5:MOVSI,OFFSETTAB5;循环显示第五个图形MOVCX,0008HDIS5:MOVDX,M8255_AMOVAL,L_CONOUTDX,ALMOVDX,M8255_BMOVAL,[SI]OUTDX,ALRORL_CON,1INCSICALLDELAYLOOPDIS5DECBLCMPBL,00HJNEAA5MOVBL,0D0HAA6:MOVSI,OFFSETTAB6;循环显示第六个图形MOVCX,0008HDIS6:MOVDX,M8255_AMOVAL,L_CONOUTDX,ALMOVDX,M8255_
8、BMOVAL,[SI]OUTDX,ALRORL_CON,1INCSICALLDELAYLOOPDIS6DECBLCMPBL,00HJNEAA6MOVBL,0D0HAA7:MOVSI,OFFSETTAB7;循环显示第七个图形MOVCX,