去空格
.model small .data string db 'hsu dhiw dwi dwio','$' .code mov si,offset string outlp: cmp byte ptr[si],'$' jz done cmp byte ptr[si],' ' jz next mov di,si inlp: inc di mov al,[di] mov [di-1],al cmp byte ptr[di],'$' jnz inlp jmp outlp next: inc si jmp outlp done: mov ah,09 mov dx,offset string int 21h .exit 0 end