任何用于消除多余空白的算法或建议,将不胜感激。
修剪:
推
推斧
推bx
推cx
推
推di
mov di,si
mov bx,si
mov ax,[bp+4];;; taking message of string from stack//
xor cx,cx
copyloop: 罗兹 cmp al,'';; space ascii jne空格
dec cx
stosb
jmp copyloop
;;;;; copy next to previous index
;if equal to Null termination
cmp al,0
je store
个空格: mov cx,1 stosb mov bx,di jmp copyloop
商店:
mov [bp + 4],bx
pop di
pop si
pop cx
pop.......0 bx
pop ax
pop es
ret