Jump to content
Tuts 4 You

Edit History

evlncrn8

evlncrn8


got the index and array mixed up, was 1/2 asleep when i typed it

lea edx, [esp+24] - load effective address edx as esp + 24 ... look upon this as pointing to an array

mov eax, [esp+140] ; load some pointer to an address .. look upon this as the index

add eax, ebx ; pretty much index + base.. 

movzx eax, byte ptr [eax] ; load value from the area

----

the movzx part could have been written as 

movzx eax, byte ptr [eax+ebx]

same thing essentially, just removing the add eax, ebx (which is probably there as there'll be some reuse or whatnot later)

 

evlncrn8

evlncrn8

lea edx, [esp+24] - load effective address edx as esp + 24 ... look upon this as making an index

mov eax, [esp+140] ; load some pointer to an address .. look upon this as making a base

add eax, ebx ; pretty much index + base.. 

movzx eax, byte ptr [eax] ; load value from the area

----

the movzx part could have been written as 

movzx eax, byte ptr [eax+ebx]

same thing essentially, just removing the add eax, ebx (which is probably there as there'll be some reuse or whatnot later)

 

evlncrn8

evlncrn8

lea edx, [esp+24] - load effective address edx as esp + 24 ... look upon this as making an index

mov eax, [esp+140] ; load some pointer to an address .. look upon this as making a base

add eax, ebx ; pretty much index + base.. 

movzx eax, byte ptr [eax] ; load value from the area

----

the movzx part could have been written as 

movzx eax, byte ptr [eax+ebx]

same thing

 

×