⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 电子时钟的设计.htm

📁 电子时钟的设计,这是通过汇编语言精心编制而成,请大家多多关照
💻 HTM
📖 第 1 页 / 共 5 页
字号:
      lang=EN-US style="FONT-SIZE: 14pt"><o:p></o:p></SPAN></P>
      <DIV 
      style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 12pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .5pt">
      <P class=MsoNormal 
      style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN: 0cm 0cm 0pt; BORDER-LEFT: medium none; TEXT-INDENT: 35.4pt; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none; mso-char-indent-count: 1.96; mso-border-bottom-alt: solid windowtext .5pt; mso-padding-alt: 0cm 0cm 12.0pt 0cm"><B 
      style="mso-bidi-font-weight: normal"><U 
      style="text-underline: double"><SPAN lang=EN-US 
      style="FONT-SIZE: 18pt"><o:p><SPAN style="TEXT-DECORATION: none"><FONT 
      face="Times New Roman">&nbsp;</FONT></SPAN></o:p></SPAN></U></B></P></DIV>
      <P class=MsoNormal 
      style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 35.4pt; mso-char-indent-count: 1.96"><B 
      style="mso-bidi-font-weight: normal"><U 
      style="text-underline: double"><SPAN lang=EN-US 
      style="FONT-SIZE: 18pt"><FONT face="Times New Roman"><SPAN 
      style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN><SPAN 
      style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></FONT></SPAN></U></B><B 
      style="mso-bidi-font-weight: normal"><U 
      style="text-underline: double"><SPAN 
      style="FONT-SIZE: 18pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">西安工业大学课程设计用纸</SPAN></U></B><B 
      style="mso-bidi-font-weight: normal"><U 
      style="text-underline: double"><SPAN lang=EN-US 
      style="FONT-SIZE: 18pt"><FONT face="Times New Roman"><SPAN 
      style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      </SPAN><o:p></o:p></FONT></SPAN></U></B></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
      style="FONT-SIZE: 14pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">出来。并调用屏幕</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt"><FONT 
      face="Times New Roman">I/O</FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中断,定位光标的开始位置,结合着将时间显</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt"><o:p></o:p></SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US 
      style="FONT-SIZE: 14pt"><o:p><FONT 
      face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
      style="FONT-SIZE: 14pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">示在我们预先定义好的位置上。由于获取了的系统时间不会自动刷</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt"><o:p></o:p></SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US 
      style="FONT-SIZE: 14pt"><o:p><FONT 
      face="Times New Roman">&nbsp;</FONT></o:p></SPAN></P>
      <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN 
      style="FONT-SIZE: 14pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">新,所以我们要设计成刷新的方式来不断获取系统的时间,这样就形成了会跳动的电子钟了。<SPAN 
      style="COLOR: #333333">调用延时</SPAN></SPAN><SPAN lang=EN-US 
      style="FONT-SIZE: 14pt; COLOR: #333333"><FONT 
      face="Times New Roman">TIME</FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">延时中断服务程序,累加到存放秒值的寄存器</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt; COLOR: #333333"><FONT 
      face="Times New Roman">DL</FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中,并进行十进制调整。在累加的过程中,不断地对时、分、秒值进行比较,秒不能等于</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt; COLOR: #333333"><FONT 
      face="Times New Roman">60</FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,分不能等于</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt; COLOR: #333333"><FONT 
      face="Times New Roman">60</FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,时不能等于</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt; COLOR: #333333"><FONT 
      face="Times New Roman">24</FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。秒等于限制值时,则使秒值为</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt; COLOR: #333333"><FONT 
      face="Times New Roman">0</FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分值加</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt; COLOR: #333333"><FONT 
      face="Times New Roman">1</FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">;分等于限制值时,则使分值为</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt; COLOR: #333333"><FONT 
      face="Times New Roman">0</FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">时值加</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt; COLOR: #333333"><FONT 
      face="Times New Roman">1</FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">;时等于限制值时,则使时值为</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt; COLOR: #333333"><FONT 
      face="Times New Roman">0</FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">;时、分、秒值都不超过限制值时,就转显示屏输出。</SPAN><SPAN 
      style="FONT-SIZE: 14pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">时间显示的刷新要配合延时程序进行,为了得到良好的显示效果,延时程序要尽量接近</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt"><FONT 
      face="Times New Roman">1</FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">秒,但又不能超过一秒,所以本程序调用了一段较精确的时间延迟程序。</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt"><FONT 
      face="Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      </FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">利用</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt"><FONT 
      face="Times New Roman">BIOSS</FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设计窗口,选择适当的背景和前景等,使屏幕显示更加完美。<SPAN 
      style="COLOR: #333333">程序一旦进入运行,就将不间断地在显示屏显示时间,要想程序停止运行,可同时在键盘按下</SPAN></SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt; COLOR: #333333"><FONT 
      face="Times New Roman">ESC</FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">键返回</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt; COLOR: #333333"><FONT 
      face="Times New Roman">DOS</FONT></SPAN><SPAN 
      style="FONT-SIZE: 14pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">系统。</SPAN><SPAN 
      lang=EN-US style="FONT-SIZE: 14pt; COLOR: #333333"><o:p></o:p></SPAN></P>
      <P class=MsoNormal 
      style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 8.5pt; mso-char-indent-count: .47"><B 
      style="mso-bidi-font-weight: normal"><U 
      style="text-underline: double"><SPAN 
      style="FONT-SIZE: 18pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">四.程序流程图如下:</SPAN></U></B><B 
      style="mso-bidi-font-weight: normal"><U 
      style="text-underline: double"><SPAN lang=EN-US 
      style="FONT-SIZE: 18pt"><o:p></o:p></SPAN></U></B></P>
      <P class=MsoNormal 
      style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 35.4pt; mso-char-indent-count: 1.96"><B 
      style="mso-bidi-font-weight: normal"><U 
      style="text-underline: double"><SPAN lang=EN-US 
      style="FONT-SIZE: 18pt"><o:p><SPAN style="TEXT-DECORATION: none"><FONT 
      face="Times New Roman">&nbsp;</FONT></SPAN></o:p></SPAN></U></B></P>
      <P class=MsoNormal 
      style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 35.4pt; mso-char-indent-count: 1.96"><SPAN 
      lang=EN-US style="FONT-SIZE: 18pt"><o:p><SPAN 
      style="TEXT-DECORATION: none"><FONT face="Times New Roman"><FONT 
      size=2>DATA&nbsp;&nbsp;&nbsp; 
      SEGMENT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      ;设置数据段<BR>&nbsp;&nbsp;&nbsp;BUF1&nbsp;&nbsp;&nbsp; DB 'THE TIME IS NOW: 
      $'<BR>&nbsp;&nbsp;&nbsp;BUF5&nbsp;&nbsp;&nbsp; DB '&nbsp;@@@@@&nbsp;&nbsp; 
      ^^^^^^^&nbsp;&nbsp;&nbsp; @@@@@@&nbsp;$'<BR>&nbsp;&nbsp; 
      BUF6&nbsp;&nbsp;&nbsp; DB 
      '&nbsp;&amp;&amp;&amp;&amp;&amp;&amp;&nbsp;&nbsp;&nbsp; 
      #######&nbsp;&nbsp;&nbsp;&nbsp; 
      &amp;&amp;&amp;&amp;&amp;&amp;&nbsp;$'<BR>&nbsp;&nbsp;&nbsp;BUF7&nbsp;&nbsp;&nbsp; 
      DB ' 00 &gt;o o &lt; 00 $'<BR>&nbsp;&nbsp;&nbsp;BUF8&nbsp;&nbsp;&nbsp; DB 
      ' 00 (::) 00 $'<BR>&nbsp;&nbsp;&nbsp;BUF9&nbsp;&nbsp;&nbsp; DB ' 00 ~~ 00 
      $'<BR>&nbsp;&nbsp;&nbsp;BUF10&nbsp;&nbsp; DB ' 00 !! 00 
      $'<BR>&nbsp;&nbsp;&nbsp;BUF3&nbsp;&nbsp;&nbsp; DB 'CLASS:040402206 
      $'<BR>&nbsp;&nbsp;&nbsp;BUF4&nbsp;&nbsp;&nbsp;&nbsp;DB 'NAME:hu ling 
      wei&nbsp;$'<BR>&nbsp;&nbsp; BUF2&nbsp;&nbsp;&nbsp; DB 
      10<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DB 10 
      DUP(?)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      DATA ENDS<BR>&nbsp;&nbsp;&nbsp;STACK&nbsp;&nbsp; SEGMENT 
      STACK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      ;设置堆栈段<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DB 
      100 DUP(?)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      STACK ENDS<BR>&nbsp;&nbsp;&nbsp;CODE&nbsp;&nbsp;&nbsp; 
      SEGMENT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      ;设置代码段<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      ASSUME 
      CS:CODE,DS:DATA,SS:STACK<BR>&nbsp;&nbsp;&nbsp;CURSOR&nbsp;&nbsp;MACRO 
      ROW,CLM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      ;设置光标位置<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      MOV AH,2 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      MOV BH,0 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      MOV DH,ROW 
      <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MOV 
      DL,CLM&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;INT 
      10H <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      ENDM<BR>&nbsp;&nbsp;&nbsp;&nbsp;WIN&nbsp;&nbsp;&nbsp;&nbsp;MACRO 
      ROWL,CLML,ROWR,CLMR,COLOR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      ;设置窗口,位置,颜色<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      MOV AH,6 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      MOV AL,0 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      MOV 
      CH,ROWL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MOV 
      CL,CLML<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      MOV 
      DH,ROWR<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      MOV 
      DL,CLMR<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MOV 
      BH,COLOR<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      INT 
      10H<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ENDM<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      ASCBCD MACRO 
      REG<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INC 
      BX<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INC 
      BX<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MOV 
      REG,[BX]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      MOV CL,4<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      SHL REG,CL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      INC BX<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MOV 
      AL,[BX]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      AND AL,0FH<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      OR REG,AL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      ENDM<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      BCDASC MACRO 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -