- Reads a 16-bit value from two consecutive memory locations.
- The address of the first memory location.
peek2() function reads a 16-bit value from two consecutive bytes in the addressable memory region (0x0000-0x7fff). The value is interpreted in the Little Endian representation, which stores the lowest 8 bits in the first byte.
See Memory for information about the memory layout.
poke(0x4300, 0xff) poke(0x4301, 0x0c) b = peek2(0x4300) -- 0x0cff = 3327