Assembly 阿萨姆布雷语间接地址

Assembly 阿萨姆布雷语间接地址,assembly,Assembly,我是新来阿萨姆贝尔的。。但我想问一个关于阿萨姆布困难话题的问题。。。 好啊 例如: mov [bx],9h ;9h into segment in memory with value 9h mov ax,[bx] ;i get what is pointed to memory in bx 9h 好的,这里的问题是,在这种情况下,返回是 ax=ah=20al=09正确我得到了9h的值,但是为什么在ah 如果我这样做: mov word ptr [bx],9h mov ax ,[bx] 好

我是新来阿萨姆贝尔的。。但我想问一个关于阿萨姆布困难话题的问题。。。 好啊 例如:

mov [bx],9h  ;9h into segment in memory with value 9h
mov ax,[bx]  ;i get what is pointed to memory in bx 9h
好的,这里的问题是,在这种情况下,返回是

ax
=
ah
=20
al
=09正确我得到了9h的值,但是为什么在
ah

如果我这样做:

mov word ptr [bx],9h
mov ax ,[bx]
好的……
ah
=00
al
=09

也可以这样说:

mov word ptr [bx],9h
mov al ,[bx]

为什么20 in
ah
9h
适合一个字节,因此指令
mov[bx],9h
mov byte ptr[bx],9h
相同。它将把值
09h
放在
bx
所指向的字节中

当您将值读入
ax
时,这是一个字操作,因为
ax
是一个字寄存器。它将获得您放入内存中的值
09h
,但也会获得以下字节中的值。在这种情况下,该值恰好是
20h

使用
mov word ptr[bx]时,9h
是一个字操作,值
9h
扩展为一个字(
0009h
)。它将作为两个字节
09h
00h
存储在内存中


当您使用
mov-al[bx]
时,这是一个字节操作,因为
al
是一个字节寄存器,所以它将只读取您存储的字节。

首先谢谢,但现在我还证明了mov-byte-ptr[bx],9h,然后是mov-ax[bx]同样的ah20 al 09,不管你怎么说都是对的。是的,就像9是ax=16位中的一个字节,当它从内存返回时,也许让我们假设内存中的地址1000是09 20。我还好吗?