当前位置: 代码迷 >> 汇编语言 >> 编译语言课程实验一
  详细解决方案

编译语言课程实验一

热度:159   发布时间:2016-05-02 04:35:30.0
汇编语言课程实验一
实验一,编写汇编程序,验证从键盘输入的是否为一合法的整数assume cs:code,ds:datadata segment	show db "Input a charactor ",0dh,0ah,"$"	msg  db " is a number",13,10,"$"	msg2 db " is not a number$"data endscode segmentstart:	mov ax,data	mov ds,ax	lea dx,show	mov ah,9	int 21h	mov ah,1	int 21h		cmp al,'0'	jb no	cmp al,'9'	ja noyes:	lea dx,msg	mov ah,9	int 21h	jmp exitno:	lea dx,msg2	mov ah,9	int 21hexit:	mov ax,4c00h	int 21hcode endsend start

?

  相关解决方案