MemSet
See Also: Memory Management Functions
Purpose
Stores a given byte value in a memory block of a given size.
Return Type
Syntax
(MemSet( {pBlock}, {iValue}, {iBytesToSet} ))
Where:
- {pBlock} is a Pointer variable that is the memory address of the buffer whose value is to be set.
- {iValue} is the character value to set (an integer).
- {iBytesToSet} is the number of bytes to set.
What It Does
The MemSet function is used to set a block of bytes to the same character value. It can be used, for example, to initialize blocks of data.
Example
Move (MemSet(pMemory, (ASCII('A')), 100)) to bOK // Move the letter 'A' to every byte in the memory buffer.