大家好,我是这种语言的新手,这是我修改的代码,它应该接受输入 ABC 并返回 ABC,但它返回 ABB。我用 AH,BH 和 Ax,Bx 试过了,它变得更糟了。我该如何修改它(现在我们的老师希望我们坚持使用 MOV、INT、LEA 以及这里的代码内容)。感谢您的提示和答案
.MODEL SMALL
.STACK 100H
.CODE
MOV AH, 01H ; Character input with echo
INT 21H ; Character in AL
MOV BL, AL ; Save in BL
MOV AH, 01H ; Character input with echo
INT 21H ; Character in AL
MOV CL, AL ; Save in CL
MOV AH, 01H ; Character input with echo
INT 21H ; Character in AL
MOV DL, AL ; Save in DL
MOV AH, 02H ; Display character function
MOV DL, 0DH ; carriage return
INT 21H
MOV DL, 0AH ; line feed
INT 21H
MOV DL, BL ; Get character stored in BL and display
INT 21H
MOV DL, CL ; Get character stored in CL and display
INT 21H
MOV DL, DL ; Get character stored in DL and display
INT 21H
MOV AH, 4CH
INT 21H
END