汇编中用0a号功能输入,然后倒序输出,我写了一个程序,有错误,在输出乱码后有正确结果输出,这是什么问题,新手求教
程序代码:
S1 SEGMENT STRING DB 100,?,100 DUP(0) S1 ENDS S2 SEGMENT PARA STACK DW 100 DUP (?) TOP LABEL WORD S2 ENDS S3 SEGMENT ASSUME DS:S1,SS:S2 ,CS :S3 P PROC FAR MOV AX,S1 MOV DS, AX MOV AX ,S2 MOV SS,AX LEA SP,TOP LEA DX,STRING MOV AH,0AH INT 21H LEA BX,STRING MOV CX,STRING[1] ADD BX,CX ADD BX,1 L1: MOV DL,[BX] MOV AH,2H INT 21H DEC BX LOOP L1 mov ah ,4ch int 21H P ENDP S3 ENDS END P