- Reads a byte from a memory location.
- The address of the memory location.
peek() function reads a byte from the addressable memory region (0x000-0x7fff). See Memory for information about the memory layout.
Superseded by @ operator[edit | edit source]
@ operator added in 0.2.0 performs the same function as
peek() and is now the recommended way to read a byte of memory, as it uses fewer tokens, costs fewer cycles at runtime, and runs on the real host CPU much more efficiently. Simply replace
Examples[edit | edit source]
b = peek(0x4300) b = @0x4300 -- preferred method