Feb 5 2012, 06:41 PM Post #1 | |
I will kill you Posts: 126 Joined: 13-May 11 | Ok guys, I'm trying to start injecting assembly into scm. I'm using NASM to assemble the code. I started with a very simple code: CODE mov eax, 0xB7CE50; 0xB7CE50 is money address add [eax], dword 10000 ret When NASM assembled: CODE 66 B8 50 CE B7 00 67 66 81 00 10 27 00 00 C3 That seems a little strange for me, because I know that B8 is mov eax, and I didn't put anything before and this 66 appeared in the begining, the sequence 67 66 81 seemed strange too. But ok, I put the code in Sanny: CODE {$CLEO} 0000: while true wait 0 0ADC: test_cheat "MONEY" jf continue 0AC6: 0@ = label @ASM offset 0AA5: call 0@ num_params 0 pop 0 end :ASM hex 66 B8 50 CE B7 00 67 66 81 00 10 27 00 00 C3 end Compiled, play, typed MONEY and... CRASH! SHIT, I WAS SO EXCITED! So, what is wrong? =/ I think that it's not my fault This post has been edited by LINK2012: Feb 5 2012, 06:53 PM |
Feb 5 2012, 08:35 PM Post #2 | |
Coding like a Rockstar! Posts: 1,468 From: ??? Joined: 28-May 09 | Nice to see some advancement going on And I don't think it's your fault either... CODE 66 B8 50 CE B7 00 67 66 81 00 10 27 00 00 C3 The 66 shouldn't be there. Remove it and try again -------------------- | CLEO 4.3.22 | A?i?a?o?3D | UI SDK | Black Market Mod 1.0.1 | GInput 0.3 | Cheat Keyboard | Tactile Cheat Activation | Stream Ini Extender 0.7 | SuperVars | ScrDebug | Vigilante Justice: San Andreas | |
Feb 5 2012, 09:36 PM Post #3 | |
I will kill you Posts: 126 Joined: 13-May 11 | Good! Now it is working! I had to remove two 66, and a 67. Thanks for that Deji EDITED: I setted NASM format to win32 and now it compiles well for San Andreas -- EDITED: The question that had here was compiler issue... -- This post has been edited by LINK2012: Feb 9 2012, 01:45 PM |