But it crashes at the label "setAddressAtIndex".
What I want to do is put the address `edx` into the array `invPtr` at index `indexPtr`, can someone help me with that?
`mov [invPtr + indexPtr * 4], edx` - this instruction doesn't do what you think it does. `invPtr` and `indexPtr` are both addresses. Treating `invPtr` as an address is probably correct, but you almost certainly want the value at `indexPtr` instead of the address `indexPtr`.
Code:
mov ecx,[indexPtr]
mov [invPtr+ecx*4],edx
Also, this is `jmp` instruction does nothing:
Code:
jmp setAddressAtIndex
setAddressAtIndex:
_________________
I don't know where I'm going, but I'll figure it out when I get there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum