汇编 输入带空格的代词,输出时把空格删掉(有效果图)

20080501173933[1]

data segment
buf1 db ‘shu ru yi ge dan ci,jieguo:huo ba kong ge shan diao’,13,10,’$’
int1 db 100,101 dup(0),’$’
buf db 100,101 dup(0),’$’
data ends
code segment
assume  cs:code,ds:data
main:mov dx,data
     mov ds,dx
     lea dx,[buf1]
     mov ah,9
     int 21h   ;输出提示:题目用途
     lea dx,[int1]
     mov ah,10
     int 21h
     lea si,[int1+2]
     lea di,[buf+2]
     mov ch,0
     mov cl,[int1+1]
again:mov al,[si]
      cmp al,’ ‘
      je lab
      mov [di],al
      inc di
lab: inc si 
      loop again
      mov ah,2
      mov dl,13
      int 21h
      mov dl,10
      int 21h
      lea dx,[buf+2]
      mov ah,9
      int 21h
      mov ax,4c00h
      int 21h
      code ends
      end main

- THE END -
版权声明:
转载原创文章请注明,文章出处:http://kinggoo.com
原文地址:http://kinggoo.com/chengxu-huibian-shanchukongge.htm
发表评论?

16 条评论。

  1. I’m really loving the contents of your blog. Hopefully you keep posting regularly. Thanks.

  2. Really interesting blog, keep up the good work!

  3. Really great article with very interesting information. You might want to follow up to this topic!?! 2012

  4. Really great article with very interesting information. You might want to follow up to this topic!?! 2011

  5. Great article with very interesting information. You are a very skilled blogger, thats for sure! =)

  6. I just added your website on my blogroll. Really enjoyed reading through. Excellent information!

  7. I just added your website on my blogroll. I may come back later on to check out updates. Excellent information!

  8. This is such a great resource that you are providing and you give it away for free. I enjoy seeing websites that understand the value of providing a prime resource for free. I truly loved reading your post. Thanks!

发表评论