Assembly 从字节键盘读入word

Assembly 从字节键盘读入word,assembly,Assembly,我对这个地方和集会很陌生,我想问一个对我有很大帮助的问题。我有一个密码: mov dx, 200 mov ah, 0A int 21 mov bh, 00 mov bl, byte ptr [201] mov byte ptr[200], 0D mov byte ptr[201], 0A mov byte ptr[202 + bx], 24 mov dx, 200 mov ah, 09 int 21 mov ah, 4c int 21 它精确地显示了我在键盘上输入的内容,但它只针对6个数字。我

我对这个地方和集会很陌生,我想问一个对我有很大帮助的问题。我有一个密码:

mov dx, 200
mov ah, 0A
int 21
mov bh, 00
mov bl, byte ptr [201]
mov byte ptr[200], 0D
mov byte ptr[201], 0A
mov byte ptr[202 + bx], 24
mov dx, 200
mov ah, 09
int 21
mov ah, 4c
int 21

它精确地显示了我在键盘上输入的内容,但它只针对6个数字。我必须使我可以输入多达8。据我所知,我需要将字节ptr改为word,但我不知道怎么做。你能解释一下怎么做以及为什么吗。我将不胜感激。

从stdin(int 21h,ah=0a)读取字符串时,ds:dx必须指向一个有效的缓冲区来存储该字符串。但此缓冲区具有特定的格式:

 offset | content
--------+----------
      0 | maximum string length
      1 | will contain number of characters read
      2 | will contain the string
因此,基本上您必须指定需要的字符数(最多):

字节ptr和字ptr(以及dword ptr)指定CPU应从内存中加载多少字节,因此它们与此无关


参考。

认为我需要word,因为我需要8个以上的字节和更多的数字。谢谢你清楚的解释。
mov byte ptr[200], 8
mov dx, 200
mov ah, 0A
int 21