输出乱码
DATA segment
MAXLEN db 11
INPTLEN db ?
STR1 db 11 dup(0)
STR2 db 11 dup(0)
DATA ends
STACK1 SEGMENT STACK
dw 40hdup(0)
STACK1 ends
CODE segment
assume cs:CODE,ds:DATA,ss:STACK1
start:mov ax,DATA
mov ds,ax
lea dx,MAXLEN
mov ah,0ah
int 21h
call SHIYAN5
mov dl,0dh
mov ah,02h
int 21h
lea dx,STR2
mov ah,09h
int 21h
mov ah,4ch
int 21h
SHIYAN5 PROC
PUSHF
PUSH BX
PUSH CX
PUSH SI
PUSH DI
XOR CX,CX
MOV CL,INPTLEN
LEA SI,STR1
LEA DI,STR2
DEC SI
L1: INC SI
CMP BYTE PTR[SI],30H
JAE L2
JMP L6
L2: CMP BYTE PTR[SI],39H
JA L3
LOOP L1
L3: CMP BYTE PTR[SI],41H
JAE L4
JMP L6
L4: CMP BYTE PTR[SI],5AH
JA L6
L5: ADD BYTE PTR[SI],20H
L6: MOV BX,[SI]
MOV [DI],BX
INC DI
LOOP L1
LEA SI,STR2
CMP SI,DI
JB L7
MOV BYTE PTR[SI],'?'
L7: POP DI
POP SI
POP CX
POP BX
POPF
RET
SHIYAN5 ENDP
CODE ENDS
END start