这是我写的一个汇编程序,不知道哪里出问题了,请各位高手帮帮忙看一下,实在感谢!


编写程序,实现表的处理:内存单元中有一个ASCII码表,编写程序完成下面的功能:
① 首先输出表的内容;
② 插入一个数据,插入的数据和插入的位置从键盘输入;
③ 对表中的数据进行排序,按升顺或降顺排序可以进行选择;
④ 在表中查找某一个关键字,要查找的关键字从键盘输入;如果找到,输出查找的关键字并给出提示“find”,否则给出提示“no find”;
⑤ 程序执行以后,输出表中的插入以后的内容和排序以后的内容;
⑥ 程序有友好的运行界面;
⑦要求程序能够处理基本的错误信息;


data segment
line1 db 0ah,0dh,'Please input where you want to insert the a letter or number: ',0ah,0dh,'$' 
line2 db 0ah,0dh,'Please input a letter or number:',0ah,0dh,'$'
line3 db 0ah,0dh,'please input a letter or number that you want to find:',0ah,0dh,'$' 
 right db 'find',0ah,0dh,'$' 
wrong db 'no find',0ah,0dh,'$ '
table db 'ietfr8923y7@#%1',0ah,0dh,'$'
table1 db '0000000000000000',0ah,0dh,'$'
data ends 
code segment
assume cs:code,ds:data
start:
  mov ax,data
  mov ds,ax
  mov dx,offset table
  mov ah,09h
  int 21h
  mov dx,offset line1
  mov ah,09h
  int 21h
  mov ah,01h
  int 21h
  sub al,30h
  mov ah,0
  mov bx,ax
  mov dx,offset line2
  mov ah,09h
  int 21h
  mov ah,01h
  int 21h
  mov ah,0
  mov  di,offset table
  add di,bx
  dec di
  mov si,0
  mov cx,0
ll: mov  bl,[table+si]
  mov [table1+si],bl
 
  mov cx,offset [si+table1] 
  
  cmp cx,di
  jz qq
  inc si
  jmp ll
qq:mov [table1+si],al
vv: mov bl,[table+si]
    mov [table1+si+1],bl
    cmp si,15
    jz rr
    inc si
    jmp vv
  rr:mov dx,offset table1
    mov ah,09h
    int 21h
    mov si,offset table1
    mov cx,16
 kk:mov bx,1
    mov di,bx
 aa:lodsb
    cmp al,[table1+di]
    jb ee
    inc di
    cmp [table1],'y'
    jz yy
    jmp aa
 ee: mov bl,[table1+di]
     mov [table1+di],al
     mov [table1+di-1],bl
     inc di
     jmp aa
 yy:mov dx,offset table1
    mov ah,09h
    int 21h
 mov dx,offset line3
mov ah,09h
int 21h
mov ah,01h
int 21h
mov bl,al
mov si,offset table1
mov dl,16
ff:lodsb
cmp al,bl
jz gg
dec dl
jnz ff
jmp oo
gg: mov dx,offset right
    mov ah,09h
    int 21h
    jmp xx
oo:mov dx,offset wrong
    mov ah,09h
    int 21h
    jmp xx
xx:mov ah,4ch
   int 21h
   
code ends
      end start