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

📄 aexp12.asm

📁 微机接口技术的入门必备试验代码 试验平台msdi
💻 ASM
字号:
;*------------------------------------------------------*
;*    Aexp12.asm  D/A转换-产生锯齿波                    *
;*    产生锯齿波程序source file                          *
;*    运行步骤: 1.将示波器探头接到平台板上DA输出口        *
;*             2.程序运行后,即可在示波器上看到锯齿波      *
;*    Copyright (c) 2002 by HUST                        *
;*------------------------------------------------------*
    
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 + -