Difference between revisions of "0A8C"

From GTAMods Wiki
Jump to navigation Jump to search
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<code>0A8C=4, %1d%  %2d%  %3d%  %4d%</code><br>
+
{{This|For CLEO for GTA III and Vice City prior to v2.0.0.0, use opcode 05DF.}}
'''Description''': writes a value to the game memory.<br>
+
{{OpCode
'''Parameter 1''': [[memory_addresses(SA)|memory address]](hexadecimal value) <br>
+
| games      = {{Icon|t}} (with [[CLEO]])
'''Parameter 2''': number of bytes to write: 1, 2 or 4 bytes <br>
+
| description = Writes a value to the game memory
'''Parameter 3''': value to write (any number)<br>
+
| syntax1    = 0A8C: write_memory [''int1''] size [''int2''] value [''any''] virtual_protect [''int3'']
'''Parameter 4''': Virtual Protect(0/1)<br>
+
| p1t        = [''int1'']
'''Supports''': San Andreas (with [[CLEO]])<br>
+
| p1d        = [[:Category:Memory Addresses|Memory address]] (generally a hexadecimal value, which is indicated by the leading characters <code>0x</code>)
 +
| p2t        = [''int2'']
 +
| p2d        = Number of bytes to write
 +
| p3t        = [''any'']
 +
| p3d        = Value to write (any data type)
 +
| p4t        = [''int3'']
 +
| p4d        = 0 = if the address is rewritable, 1 = if the address is read-only
 +
}}
  
This opcode writes a value to the game memory.
+
This [[CLEO]] opcode writes the value to the memory location if the number of bytes to write is 1, 2, or 4. For other number of bytes, the opcode converts the value to an unsigned character and fills the memory location with that value (see [http://en.cppreference.com/w/cpp/string/byte/memset memset]).
  
Virtual Protect: use 1 to write to the read-only address, address is rewritable.
+
== Keywords ==
 +
CLEO, write, memory, address
  
==Sanny Builder Example==  
+
== See also ==
 
+
* {{Icon|t}} [[0A8D]], reads a value from game memory
<source lang="scm">0A8C: write_memory 0xC0BC15 size 1 value 1 virtual_protect 0</source>
 
 
 
==Keywords==
 
CLEO, write memory, memory address
 
  
 
[[Category:CLEO Opcodes]]
 
[[Category:CLEO Opcodes]]

Latest revision as of 04:34, 6 August 2017

For CLEO for GTA III and Vice City prior to v2.0.0.0, use opcode 05DF.

GTA III Vice City San Andreas (with CLEO)


Description
Writes a value to the game memory
Syntax
0A8C: write_memory [int1] size [int2] value [any] virtual_protect [int3]
Parameter
[int1]
Memory address (generally a hexadecimal value, which is indicated by the leading characters 0x)
[int2]
Number of bytes to write
[any]
Value to write (any data type)
[int3]
0 = if the address is rewritable, 1 = if the address is read-only

This CLEO opcode writes the value to the memory location if the number of bytes to write is 1, 2, or 4. For other number of bytes, the opcode converts the value to an unsigned character and fills the memory location with that value (see memset).

Keywords

CLEO, write, memory, address

See also

  • GTA III Vice City San Andreas 0A8D, reads a value from game memory