|
FindMemoryRunLength | ||
Steps = FindMemoryRunLength(Address, Direction, MaxDistance, PatternType, SearchPattern) | ||
Parameters: Address = The Address in memory to start searching at Direction = The direction to search (-1 = backwards, 1 = forward) MaxDistance = The Max length it should scan for PatternType = The type of compare it should use (1= byte, 2= word, 4 =long) SearchPattern = The byte pattern we've expect to the find the run length of |
||
Returns: Steps = The Number of steps (bytes/word/longs) that are the same |
||
The FindMemoryRunLength() will find the length of a run of byte/words or longs in memory. Pattern Types
FACTS: * FindMemoryRunLength is dealing with raw memory, as such, PlayBASIC can not protect you from making mistakes. Thus FindMemoryRunLength assumes the memory area you give it is valid, if not, you should expect your program to crash ! Mini Tutorial: This example finds the length of a run of zero bytes in a memory bank.
This example would output.
|
Related Info: | CompareMemory | CopyMemory | FillMemory | GetArrayPtr | PeekByte | Pointer : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |