Re: read this promgram,please



spamtrap@xxxxxxxxxx wrote:

what does " shl si,1 add si,di" do?

"mov si,es:[di]" fetches an index from the table. Since entries in the
table are two bytes wide, you have to multiple the index by 2 to get the
byte offset of that entry. "shl si,1" multiplies si by 2. "add si,di"
adds the address of the start of the table. When those 3 instructions are
done, es:[si] will contain the entry in the table at the index stored in
es:[di].
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

.



Relevant Pages

  • Re: greatest multiple algorithm
    ... Bronson wrote: ... i'm looking for a fast way to find greatest multiple of a, ... Providenza & Boekelheide, Inc. ...
    (comp.lang.asm.x86)
  • Re: greatest multiple algorithm
    ... Bronson wrote: ... i'm looking for a fast way to find greatest multiple of a, ... Providenza & Boekelheide, Inc. ...
    (comp.lang.asm.x86)