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

📄 daconvert.asm

📁 大学微型计算机接口技术实验源代码,直接就可以运行,包含了C++和asm代码,比较前面.
💻 ASM
字号:
;*------------------------------------------------------*/
;*    DAConvert.asm(D/A转换器接口实验-锯齿波发生器)       */
;*    锯齿波发生器程序 Source File                       */
;*    Copyright (c) 2001 by HUST                        */
;*		Modify Date	2005.4.10											 */
;*------------------------------------------------------*/

cseg segment para public 'code'
  assume  cs:cseg,ds:cseg
  org 100h
start:  jmp begin
message  db 'Please watch the wave form on the scope'
         db 0dh,0ah
         db 'If you want to quit,please press ''ESC'''
         db 0dh,0ah,'$'
begin: mov  ah,9                   ;显示提示信息
	    mov  dx,seg message
	    mov  ds,dx
	    mov  dx, offset message
	    int  21h
check:mov  ah,0bh                  ;检测是否有ESC键按下
	   int  21h
	   cmp  al,00h
      je   next                    ;若无键按下,则输出锯齿波
	   mov  ah,8
	   int  21h
	   cmp  al,1bh
	   je   quit                     ;若ESC键按下,则程序退出
next: mov  bx,20
next1:mov  al,00h
again:inc  al                      ;输出锯齿波
	   mov  dx,30fh
	   out  dx,al
	   cmp  al,0
	   jne  again
      dec  bx
      jnz  next1
	   jmp  check
quit:	 mov  ax ,4c00h               ;程序退出
	   int   21h
cseg ends
end  start

⌨️ 快捷键说明

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