memset( destaddr, val, len )

Writes a byte value to every address in a region of memory.

The address of the first memory location to write.
The byte value to write.
The length of the region of memory to write, as a number of bytes.

The memset() function is a fast way to fill a region of memory with one byte value.

Examples Edit

-- clear all user data
memset(0x4300, 0, 0x1b00)

-- fill the screen with white
-- (equivalent to rectfill(0,0,128,128,7))
memset(0x6000, 0x77, 0x2000)

See also Edit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.