Difference between revisions of "Auto Assembler:readMem"

From Cheat Engine
Jump to navigation Jump to search
(Added clarification on input formats.)
m
 
Line 2: Line 2:
 
'''Auto Assembler''' readMem(''Address'', ''Size'')
 
'''Auto Assembler''' readMem(''Address'', ''Size'')
  
Writes the memory at the specified address with the specified size to the current location.
+
Copy a memory block of ''Size'' bytes from the specified ''Address'' to the current location.
  
 
Tip: Use to store the original bytes if the injection location has a changing address that is hard coded in on game or level load. Or if there are code changes with updates when using a shifted [[Auto Assembler:aobScan|aobScan]].
 
Tip: Use to store the original bytes if the injection location has a changing address that is hard coded in on game or level load. Or if there are code changes with updates when using a shifted [[Auto Assembler:aobScan|aobScan]].
Line 35: Line 35:
 
   
 
   
 
  x:
 
  x:
  readmem(00410000,16) //place the contents of address 00410000 at the address of X
+
  readmem(00410000,16) //copy 16 bytes from address 00410000 at the current address of "x"
  
 
== See also ==
 
== See also ==

Latest revision as of 14:09, 22 April 2022

Auto Assembler readMem(Address, Size)

Copy a memory block of Size bytes from the specified Address to the current location.

Tip: Use to store the original bytes if the injection location has a changing address that is hard coded in on game or level load. Or if there are code changes with updates when using a shifted aobScan.

Command Parameters[edit]

Parameter Type Description
Address string The address or symbol to read; hexadecimal, unless specified otherwise
Size integer The number of bytes to read; decimal, unless specified otherwise


Examples[edit]

SomeSymbol:
readMem(00123ABC, 5)
alloc(x,16)
alloc(script,2048)

script:
mov eax,[x]
mov edx,[x+c]
ret

x:
readmem(00410000,16) //copy 16 bytes from address 00410000 at the current address of "x"

See also[edit]

Related Commands[edit]