Skip to content

Commit 8413108

Browse files
authored
Update WRITE_MEMORY.md for size parameter clarification
Clarified the behavior of the 'size' parameter for memory writes.
1 parent 22a0da5 commit 8413108

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

shared/docs/WRITE_MEMORY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
This command writes a value at the memory address. The address must be an absolute memory address. If the address is not writable by default (e.g. inside a code section), use virtual_protect `1`.
22

3-
A `size` can be any positive number. Sizes `1`, `2`, and `4` write one byte, two bytes, or four bytes of `value` respectively. Other sizes act as a number of contiguous writes of the same value. For example, size `6` writes `value` six times, starting from the `address`. It can be used to fill a memory region with a value. A common use case is to NOP out some code instructions by overwriting them with `0x90` (NOP) `size` times.
3+
A `size` can be any positive number. Sizes `1`, `2`, and `4` write one byte, two bytes, or four bytes of `value` respectively.
4+
Other sizes act as memory block fill with first byte from the `value`. For example, size `6` writes `value` six times, starting from the `address`. A common use case is to NOP-out some code instructions by overwriting them with `0x90` (NOP) `size` times.

0 commit comments

Comments
 (0)