【求助】关于密码输入。。。结果是乱码。。。
刚学汇编几节课。。DATA SEGMENT
PASSW DB 'PASSWORD','$'
stri2 DB 100 DUP(?)
stri3 DB '12345','$'
stri4 DB 'Hello!'
stri5 DB 'Sorry!'
DATA ENDS
code SEGMENT
ASSUME CS:code,DS:data
start: MOV AX,data
MOV DS,AX
MOV SI,0
LEA DX,PASSW
MOV AH,09H
INT 21H
input: MOV AH,08H
INT 21H
CMP AL,0DH
JE finish
MOV input[SI],AL
INC SI
MOV AH,02H
MOV DL,'*'
INT 21H
JMP input
finish:MOV input[SI],24H;
MOV SI,0
MOV DI,0
MOV CX,5
check: CMP CX,0
JE right
MOV BL,input[SI]
MOV DL,stri3[DI]
CMP DL,BL
JNE error
INC SI
INC DI
DEC CX
JMP check
right: LEA DX,stri4
MOV AH,09H
INT 21H
MOV AH,4CH
INT 21H
JMP exit
error: LEA DX,stri5
MOV AH,09H
INT 21H
MOV AH,4CH
INT 21H
JMP exit
exit:MOV AH,4CH
INT 21H
code ENDS
END start
新手 不要笑话我啊。。。