- Reads one or more bytes from contiguous memory locations starting at
- The address of the first memory location.
- The number of bytes to return. (1 by default, 8192 max.)
peek() function reads and returns one or more bytes from the addressable memory region (0x0000-0x7fff).
See Memory for information about the memory layout.
@ operator added in 0.2.0 performs the same function as
peek(address) and is now the recommended way to read one byte of memory at a time, as it uses fewer tokens, costs fewer cycles at runtime, and runs on the real host CPU much more efficiently. Simply replace
b = peek(0x4300) b = @0x4300 -- preferred method delay,interval = peek(0x5f5c, 2) -- assign variables with the btnp() settings