171 of 323
ZBasic System Library 161 ZX Microcontroller Family MemSet Type Subroutine Invocation MemSet(addr, count, val) Parameter Method Type Description addr ByVal int16 The address of a block to initialize. count ByVal int8/16 The number of bytes to initialize. val ByVal Byte The initialization value. Discussion This routine is useful for initializing arrays, buffers, etc. that reside in RAM. Example Dim ba(1 to 20) as Byte Call MemSet(MemAddress(ba), Sizeof(ba), &H55) Call MemSet(ba.DataAddress, Sizeof(ba), 0) Caution Using this routine to initialize data other than your own program variables may have detrimental effects. Compatibility This routine is not available in BasicX compatibility mode. See Also MemCmp, MemCopy