我有一些代码应该显示一条短消息。这是相关的代码:
DATA SEGMENT 'DATA'
MSG DB 0AH, 0DH, 'Hello, Adam', '$'
CHAR DB 00H
DATA ENDS
CODE SEGMENT 'CODE'
PRINT_MSG:
MOV AH, 09H ;Command to print string of characters
MOV DX, OFFSET MSG ;Mov address of message into DX
INT 21H ;DOS Interrupt
JMP WAITING ;Loop back to waiting state
CODE ENDS
输出是:
E:\ece323\software\lab2>MAIN.EXE
?F ^?¶ ? N? ? -!-
Hello, Adam-
这里发生了什么?