Warning

You're browsing the old v2.x documentation. This version is no longer maintained. Click here to go the v3.x documentation.

This is an old revision of the document!


POKE

Syntax:

poke <int address>, <byte or int value>

The POKE command stores a value into the given memory address. Both the address and the value are integers, thus the following conversions will be made:

- The address will be recognized as an unsigned integer, or if it's an expression, a signed integer will be converted to unsigned - The value will be truncated to 8 bits

Examples:

rem ** turn border to black **
poke 53280, 0

rem ** unsigned conversion **
let x = -5
poke x, 0
rem ** which will effectively be the same as:
poke 65531,0

rem ** values are truncated to 8 bits - the MSB is discarded **
poke 53280, 65535
rem ** will be the same as
poke 53820, 255