DATA SEGMENT
MAXLEN DB 100
NUM DB 100
ACTLEN DB ?
DB 100 DUP(?)
INFO1 DB 0AH,0DH,'input the string:','$'
INFO2 DB 0AH,0DH,'input the number:','$'
INFO3 DB 0AH,0DH,'the substring is:','$'
INFO4 DB 0AH,0DH,'input error!','$'
DATA ENDS
STACK SEGMENT STACK
DB 200 DUP(0)
STACK ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA,SS:STACK
START:
MOV AX,DATA
MOV DS,AX
LEA DX,INFO1
MOV AH,09H
INT 21H
LEA DX,MAXLEN
MOV AH,0AH
INT 21H
LEA DX,INFO2
MOV AH,09H
INT 21H
LEA BX,NUM
MOV AH,01H
LP: INT 21H
CMP AL,13
JZ A
CMP AL, '0'
JB ERR
CMP AL, '9'
JA ERR
MOV [BX],AL
INC BX
LOOP LP
JMP A
A: MOV DI,OFFSET NUM
MOV BL,0
LLP: MOV AL,10
MOV DL,[DI]
SUB DL,30H
ADD BL,DL
MUL BL
MOV BX,AX
INC DI
LOOP LLP
JMP B
B: MOV CH,0
MOV CL,AL
LEA DX,INFO3
MOV AH,09H
INT 21H
MOV SI,0
NEXT: MOV DL,MAXLEN[SI+2]
MOV AH,2
INT 21H
INC SI
LOOP NEXT
JMP FIN
ERR: LEA DX,INFO4
MOV AH,9
INT 21H
FIN: MOV AH,4CH
INT 21H
CODE ENDS
END START
这么写哪里有问题,为什么运行不出要的结果