Definition: | mem_set(atom addr, integer byte, integer n) |
Description: | Set n bytes of memory, starting at address addr, to the value of byte. |
Comments: | The low order 8 bits of byte are actually stored in each byte.
mem_set(addr, byte, n) is equivalent to: poke(addr, repeat(byte, n)) but is much faster. |
Example: |
destination = allocate(1000) mem_set(destination, ' ', 1000) -- 1000 consecutive bytes in memory will be set to 32 -- (the ASCII code for ' ') |
See Also: | mem_copy, peek, poke, allocate |