| View previous topic :: View next topic |
| Author |
Message |
Nuclear898 Grandmaster Cheater Supreme
Reputation: 0
Joined: 04 Jun 2006 Posts: 1597 Location: The Netherlands
|
Posted: Mon Jul 14, 2008 6:10 am Post subject: [CE ASM] Help on storing register value in allocated... |
|
|
I need some help,
I'm trying to store the value stored in the EAX register in my registered symbol 'storageX'
I tried this:
alloc(storageX, 4)
registersymbol(storageX)
storageX:
db 00 00 00 00
blablabla:
mov eax, [0086000] // just a random pointer
mov eax, [eax+49c] //just arandom pointer offset
mov storageX, [eax]
but it gives an error when trying to assemble to cheat table
Cannot execute line 34: (mov 0000000, [eax])
how do I solve this?
|
|
| Back to top |
|
 |
DoomsDay Grandmaster Cheater
Reputation: 0
Joined: 06 Jan 2007 Posts: 768 Location: %HomePath%
|
Posted: Mon Jul 14, 2008 6:36 am Post subject: |
|
|
mov storageX, [eax] equals to mov [storageX], [eax], which is invalid
| Code: | [Enable]
Alloc(Mem,128)
Label(Code)
Label(start)
Label(Data)
Label(StorageX)
RegisterSymbol(StorageX)
Mem:
Code:
start:
mov eax,[0086000]
mov eax,[eax+0000049C]
push [eax]
pop [StorageX]
Data:
StorageX:
dd 00
[Disable]
Dealloc(Mem)
UnregisterSymbol(StorageX) |
|
|
| Back to top |
|
 |
Nuclear898 Grandmaster Cheater Supreme
Reputation: 0
Joined: 04 Jun 2006 Posts: 1597 Location: The Netherlands
|
Posted: Mon Jul 14, 2008 7:32 am Post subject: |
|
|
Hmm so you just push Eax's value onto the stack and then pop it into StorageX?
but what is this for then?
|
|
| Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Mon Jul 14, 2008 7:47 am Post subject: |
|
|
| Nuclear898 wrote: | but what is this for then?
| Define dword. Same as db 00 00 00 00
|
|
| Back to top |
|
 |
Nuclear898 Grandmaster Cheater Supreme
Reputation: 0
Joined: 04 Jun 2006 Posts: 1597 Location: The Netherlands
|
Posted: Mon Jul 14, 2008 8:06 am Post subject: |
|
|
| ah ok thanks for helping!
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Mon Jul 14, 2008 3:54 pm Post subject: |
|
|
I think you should be doing
| Code: |
MOV EAX, [00860000]
LEA EAX, [EAX+49C]
|
And as personal preference, I'd have simply done
| Code: |
MOV EAX, [EAX]
MOV [STORAGE],EAX
|
But you can do it your way; it works just the same.
Edit:
Btw, when CE allocates the memory, the default for 4 bytes is 00 00 00 00 (00 per byte), so you don't need to do
| Code: |
Storage:
db 00 00 00 00
|
_________________
|
|
| Back to top |
|
 |
DoomsDay Grandmaster Cheater
Reputation: 0
Joined: 06 Jan 2007 Posts: 768 Location: %HomePath%
|
Posted: Tue Jul 15, 2008 3:30 am Post subject: |
|
|
Hmm, next time I should read the question instead of the script O.O
@x0r: nice warning count =)
|
|
| Back to top |
|
 |
|