TeamREPENTOGON / REPENTOGON

Script extender for The Binding of Isaac: Repentance
https://repentogon.com/
GNU General Public License v2.0
146 stars 16 forks source link

Move function for ASMPatch #222

Closed namishere closed 1 month ago

namishere commented 10 months ago

I am writing a generic patch to be used multiple times with various different registers that requires me to mov [destReg], [srcReg]. The current Move[x] functions that have a register as the destination are in the form of mov dword ptr ds:[destReg], srcReg, which does not work for this patch and crashes. I would like a ASMPatch.Move(ASMPatch::Registers srcReg, ASMPatch::Registers destReg) that equates to mov [destReg], [srcReg]. Thank you!

Sylmir commented 10 months ago

I didn't realize this what was you wanted to do at first. On x86 memory-to-memory moves are not possible. If you want to do *eax = *ebx, you need to do ecx = *ebx; *eax = ecx;.

Sylmir commented 10 months ago

Update: register-to-register copy is requested, not memory-to-memory

namishere commented 1 month ago

CopyToRegister does what this issue is requesting. Marking resolved.