在使用 dosbox 时,我在程序集 (8086) 中遇到了一个奇怪的错误。我正在尝试打印绿色的文本。这是我的主要功能,当我调用该函数时:
mov bl,2h ; set the color (green)
mov dx,OFFSET str_msg ; set the string to print
call WRITE_TEXT_IN_COLOR
call NEW_LINE
这是函数 WRITE_TEXT_IN_COLOR
proc WRITE_TEXT_IN_COLOR
mov ah,9
mov cx,200 ; number of chars that will be painted
int 10h
int 21H
ret
endp WRITE_TEXT_IN_COLOR
现在,当我运行该程序时,它会打印“必需”文本以及一长串“dddddd”,我将非常感谢可能的解决方案。