汇编的帮忙看看啊!做出来了加100啊!
来源:百度知道 编辑:UC知道 时间:2024/08/22 10:16:17
STACK SEGMENT STACK
DB 200 DUP(0)
STACK ENDS
DATA SEGMENT
BUF DB 80
DB 0
DB 80 DUP(0)
CRLF DB 0AH,0DH,'$'
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,SS:STACK,DS:DATA
BEGIN: MOV AX,DATA
MOV DS,AX
LEA DX,BUF
MOV AH,10
INT 21H
LEA DX,CRLF
MOV AH,9
INT 21H
MOV CL,BUF+1
MOV CH,0
MOV BX,1
LOPA1: INC BX
DEC CX
CMP BUF+[BX],39H
JG LOPA2
CMP [BX],30H
JL LOPA2
JMP LOPA1
LOPA2: MOV DL,[BX]
MOV AH,2
INT 21H
JMP LOPA1
EXIT: MOV AH,4CH
INT 21H
CODE ENDS
END BEGIN
就是把数字去掉的!比如输入asd123asd,就输出asdasd,中间的123去掉!
DB 200 DUP(0)
STACK ENDS
DATA SEGMENT
BUF DB 80
DB 0
DB 80 DUP(0)
CRLF DB 0AH,0DH,'$'
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,SS:STACK,DS:DATA
BEGIN: MOV AX,DATA
MOV DS,AX
LEA DX,BUF
MOV AH,10
INT 21H
LEA DX,CRLF
MOV AH,9
INT 21H
MOV CL,BUF+1
MOV CH,0
MOV BX,1
LOPA1: INC BX
DEC CX
CMP BUF+[BX],39H
JG LOPA2
CMP [BX],30H
JL LOPA2
JMP LOPA1
LOPA2: MOV DL,[BX]
MOV AH,2
INT 21H
JMP LOPA1
EXIT: MOV AH,4CH
INT 21H
CODE ENDS
END BEGIN
就是把数字去掉的!比如输入asd123asd,就输出asdasd,中间的123去掉!
CMP BUF+[BX],39H
JG LOPA2
CMP [BX],30H
JL LOPA2
JMP LOPA1
LOPA2: MOV DL,[BX]
改为:
[BX]改为BUF+[BX]
你这2个地方都少了BUF+
还有在下面语句下加2句(2行小写字母)
LOPA1: INC BX
cmp cx,0
jz exit