我想从输入行计算空格。我通过以下方式做到了,但每次都给出相同的输出:0。似乎COUNT标签不起作用!!!!!!
**MAIN PROC
XOR CX, CX
MOV AH, 1
WHILE_:
INT 21H
CMP AL, 0DH
JE END_WHILE
PUSH AX
INC CX
JMP WHILE_
END_WHILE:
MOV AH, 2
MOV DL, 0DH
INT 21H
MOV DL, 0AH
INT 21H
MOV BL,48
TOP:
JCXZ EXIT
POP DX
DEC CX
CMP DX, 20H
JE COUNT
JMP TOP
COUNT:
INC BL
JMP TOP
EXIT:
MOV AH, 2
MOV DL, BL
INT 21H
MOV AH, 4CH
INT 21H
MAIN ENDP
END MAIN**