| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 705 人关注过本帖
标题:我的程序有点错误请看看!
只看楼主 加入收藏
sjyf
Rank: 1
等 级:新手上路
帖 子:29
专家分:0
注 册:2005-10-18
收藏
 问题点数:0 回复次数:2 
我的程序有点错误请看看!

;input a capital letter change it opposite one data segment mess db ' please input: ''$' data ends ;----------------------------- code segment assume cs:code,ds:data ;---------------------- start: push cs sub ax, ax push ax

;--------------------------- mov ax, data mov ds, ax ;--------------------------- again: lea dx, mess ;ouput message mov ah, 09 int 21h mov ah, 01 ;input int 21h cmp al, 30h ;if input 0 exit je exit cmp al, 61h ;judge the letter jb next ;the input is't a capital sub al, 20h next: mov dl, al mov ah, 2 int 21h jmp again ;move in circles

exit: ret

code ends end start

搜索更多相关主题的帖子: change 
2005-10-26 20:59
sjyf
Rank: 1
等 级:新手上路
帖 子:29
专家分:0
注 册:2005-10-18
收藏
得分:0 
代码能运行无误,但是有一点不符合我的最初的意识: 如果输入0,退出,但是不退出,还有 :在输出  ' please input: '时输入的不是 please input : 而是 please input: ' 把分号去掉编译时出现警告!
希望高手解答一下!
2005-10-26 21:03
sjyf
Rank: 1
等 级:新手上路
帖 子:29
专家分:0
注 册:2005-10-18
收藏
得分:0 

;input a capital letter change it opposite one data segment mess db ' please input: ','$' data ends ;----------------------------- code segment assume cs:code,ds:data ;---------------------- start: push cs sub ax, ax push ax

;--------------------------- mov ax, data mov ds, ax ;--------------------------- again: lea dx, mess ;ouput message mov ah, 09 int 21h mov ah, 01 ;input int 21h cmp al, 30h ;if input 0 exit je exit cmp al, 61h ;judge the letter jb next ;the input is't a capital sub al, 20h next: mov dl, al mov ah, 2 int 21h jmp again ;move in circles

exit: ret

code ends end start 经过修改已经可以了!

2005-10-27 14:05
快速回复:我的程序有点错误请看看!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016961 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved