Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
感觉好像看不懂8086汇编中中断21H的函数0AH。我阅读了语法教程,例如:
"缓冲区的第一个字节指定它可以容纳的最大字符数(1到255)。这个值必须由用户提供。缓冲区的第二个字节由DOS设置为实际读取的字符数,不包括终止返回。”
所以我尝试了一个非常基本的代码。
mov dh, 01 mov ah, 0AH int 21H
我运行这个程序,输入一个数值并按下回车键。然而,调试显示我的任何寄存器都不会因这个操作而改变。我不知道我输入的值存储在哪里,如果有的话。有人可以帮我弄这个吗?
您必须在调用 int 21h 之前设置 DS:DX 指向缓冲区
Buffer on entry: +0: db MaxLength Buffer on exit: +0: db MaxLength +1: db Length of entered text (L) +2: db 'Entered text of length L' +(2+L): db 0Dh