Suppose I have a delphi function like this:
procedure sortArray(arr: array of DWORD); register;
asm
//access array here
end;
How would I access a specific element of the array in inline-assembly? I already know that arr actually consists of 2 parameters: a pointer to the array and its High(), but I need to know exactly how it works. I assume the pointer will be in eax and the High-value in ebx, but I'm not quite sure.
procedure sortArray(arr: array of DWORD); register;
asm
mov DWORD PTR [eax+$4], $09 //set the second element of arr to 9 ???
end;
btw. if anyone wonders: I'm doing this in assembly because
a) I want to enhance my asm-skills
b) I have to do this for school and want to make it a little less boring