2014-05-16 306 views
1

我有以下彙編指令(你還可以在標題看到的):指令是什麼LODS DWORD PTR DS:[ESI]?

LODS DWORD PTR DS:[ESI] 

在一個網站上我已經發現了:

The lods instruction is unique among the string instructions. 
You will never use a repeat prefix with this instruction. 
The lods instruction copies the byte or word pointed at by ds:si 
into the al, ax, or eax register, after which it increments or 
decrements the si register by one, two, or four. 

但我並沒有說明白點:我怎麼能確定在哪個寄存器al,ax或eax中複製了字節或字。

有人可以解釋給我的操作更

+0

此外,您不使用rep前綴的原因是您需要在重複之前以某種方式檢查加載的值。 –

回答

2

大小將決定寄存器針對性和多遠ESI寄存器是先進的。對於LODS DWORD,加載一個雙字(32位)數據,即32位EAX寄存器。 LODS WORD將16位AX寄存器中的16位,而LODS BYTE將是8位AL。

+3

通常縮寫爲「lodsb」,「lodsw」和「lodsd」。 –

+1

ahaaaa ...好的。所以寄存器的選擇取決於「DWORD」,「WORD」或「BYTE」,對吧?意思是當你寫下「DWORD」時,然後將[ESI]中的值存入EAX寄存器,等等......好的,謝謝 – user3097712

相關問題