| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 632 人关注过本帖
标题:[求助]要交了,还没弄好,谁能给个比较完整的!
只看楼主 加入收藏
可见光
Rank: 1
等 级:新手上路
帖 子:143
专家分:0
注 册:2007-6-15
收藏
 问题点数:0 回复次数:4 
[求助]要交了,还没弄好,谁能给个比较完整的!
一.采用0AH功能输入一个字符串,对输入的字符串实现下面的功能:
1. Sort(s or S):从小到大(1)或从大到小(2)
2. Insert(i or I):输入插入位置和需要插入的关键字
3. Delet(d or D):输入需要删除的位置和删除字符的个数
4. Find(f or F):输入某一个关键字进行查找
5. Exit(e or E)
要求:
1. 进入程序后,显示上面的操作主界面。各功能的快捷键如上规定。选择某一快捷键后进入相应的某一功能的操作界面,根据选择实现相应的功能。
2. 在某一功能的主界面中,都要求实现返回程序主界面的功能(快捷键为 r or R)。
3. 任意一个操作界面中,要求对需要用到的数据和运算结果方便的实现输入、输出操作,并给出相应的提示语句,说明需要输入什么,输出的是什么等等。
4.程序不停执行,直到选择退出。
搜索更多相关主题的帖子: 弄好 
2007-06-19 09:37
可见光
Rank: 1
等 级:新手上路
帖 子:143
专家分:0
注 册:2007-6-15
收藏
得分:0 
2007-06-19 19:54
爱以走远
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:52
帖 子:7542
专家分:21
注 册:2007-3-16
收藏
得分:0 

lz自己写嘛
不对发上来在看看


   好好活着,因为我们会死很久!!!
2007-06-19 20:16
可见光
Rank: 1
等 级:新手上路
帖 子:143
专家分:0
注 册:2007-6-15
收藏
得分:0 
date segment
org 0
string db 20,?,20 dup(?),'$'
str1 db 'please input a string:',0ah,0dh,'$'
str2 db '------------------Main menu-------------------',0ah,0dh
db 's or S------------------Sort the string',0ah,0dh
db 'i or I------------------Insert a string',0ah,0dh
db 'd or D------------------Delet a part',0ah,0dh
db 'f or F------------------Find a string',0ah,0dh
db 'e or E------------------Exit',0ah,0dh
db 'Enter your choice:',0ah,0dh,'$'
str3 db '------------------sort string-------------------',0ah,0dh
db '1--------Sort the string in up order-----',0ah,0dh
db '2--------Sort the string in down order-----',0ah,0dh
db 'r or R---Return to the main menu',0ah,0dh
db 'Enter your choice:',0ah,0dh,'$'
tishi1 db 'the former date is:',0ah,0dh,'$'
tishi2 db 'please input the place of the number you want to insert(1-9):',0ah,0dh,'$'
tishi3 db 0ah,0dh,'please input the number you want to insert:$'
tishi4 db 0ah,0dh,'the result after insert is:$'
err db 'the number you input is wrong,please input again:',0ah,0dh,'$'
tishi6 db 0ah,0dh,'the result of shengxu is:',0ah,0dh,'$'
tishi7 db 0ah,0dh,'the result of jiangxu is:',0ah,0dh,'$'
tishi8 db 0ah,0dh,'please input the date you want to search:$'
tishi9 db 0ah,0dh,'find$'
tishi0 db 0ah,0dh,'not found$'
dat1 db 13 dup(?),'$'
date ends
code segment
assume cs:code,ds:date
start:mov ax,date
mov ds,ax
lea dx,str1
mov ah,9h
int 21h
lea dx,string
mov ah,0ah
int 21h
main1:lea dx,str2
mov ah,9h
int 21h
mov ah,1h
int 21h
cmp al,'s'
jz sort
cmp al,'S'
jz sort
cmp al,'i'
jz insert
cmp al,'I'
jz insert
cmp al,'f'
jz search
cmp al,'F'
jz search
cmp al,'e'
jz exit
cmp al,'E'
jz exit
sort:lea dx,str3
mov ah,09h
int 21h
mov ah,1h
int 21h
cmp al,'1'
jz shengxu
cmp al,'2'
jz jiangxu
cmp al,'r'
jz main1
cmp al,'R'
jz main1
lea dx,err
mov ah,9h
int 21h
jmp sort
shengxu:lea dx,tishi1
mov ah,9h
int 21h
lea dx,string
mov ah,9h
int 21h
lea si,string
add si,2
go5:mov di,si
inc di
cmp si,9
jnbe ok
mov al,[si]
go3:cmp di,10
jnbe go4
cmp [di],al
jb go7
inc di
jmp go3
go7:xchg al,[di]
mov [si],al
inc di
jmp go3
go4:inc si
jmp go5
ok:lea dx,tishi6
mov ah,9h
int 21h
lea dx,string
mov ah,9h
int 21h
jmp sort
jiangxu:lea dx,tishi1
mov ah,9h
int 21h
lea dx,string
mov ah,9h
int 21h
lea si,string
add si,2
g5:mov di,si
inc di
cmp si,9
jnbe k
mov al,[si]
g3:cmp di,10
jnbe g4
cmp [di],al
ja g7
inc di
jmp g3
g7:xchg al,[di]
mov [si],al
inc di
jmp g3
g4:inc si
jmp g5
k:lea dx,tishi7
mov ah,9h
int 21h
lea dx,string
mov ah,9h
int 21h
jmp sort
search:lea dx,tishi8
mov ah,9h
int 21h
mov ah,1h
int 21h
lea si,string
add si,2
d:cmp si,10
ja cc
cmp [si],al
jz find
inc si
jmp d
find:lea dx,tishi9
mov ah,9h
int 21h
jmp exit
cc:lea dx,tishi0
mov ah,9h
int 21h
jmp main1
insert:lea dx,tishi2
mov ah,9h
int 21h
mov ah,1h
int 21h
mov cl,al
and cl,0fh
lea dx,tishi3
mov ah,9h
int 21h
mov ah,1
int 21h
inc cl
mov ch,0
mov si,10
next:cmp si,cx
jb finish
mov bl,[si]
mov [si+1],bl
dec si
jmp next
finish:inc si
mov [si],al
lea dx,tishi4
mov ah,9h
int 21h
lea dx,string
mov ah,9h
int 21h
jmp main1
exit: mov ah,4ch
int 21h
code ends
end start
还没通过而且功能还没加全!帮忙啊!大伙
2007-06-19 22:57
爱以走远
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:52
帖 子:7542
专家分:21
注 册:2007-3-16
收藏
得分:0 
转移超出拉范围

   好好活着,因为我们会死很久!!!
2007-06-21 18:48
快速回复:[求助]要交了,还没弄好,谁能给个比较完整的!
数据加载中...
 
   



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

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