PICO-8 Wiki
PICO-8 Wiki
Advertisement
poke2( addr, [...] )
Writes one or more 16-bit values to contiguous groups of two consecutive memory locations.
addr
The address of the first memory location.

...
The 16-bit values to write to memory. If these are omitted, a zero is written to the first 2 bytes.

The poke2() function writes one or more 16-bit values to contiguous groups of two consecutive bytes in the addressable memory region (0x0000-0x7fff). The values are interpreted in the Little Endian representation, which stores the lowest 8 bits in the first byte.

See Memory for information about the memory layout.

Examples[]

poke2(0x4300, 0x0cff)

b0,b1 = peek(0x4300, 2) -- 0xff,0x0c

See also[]

Advertisement