SecondBASIC Documentation v3

Home / Command Reference / Poke, PokeInt, PokeLong

Poke, PokeInt, PokeLong

Description: Sets the value at <Address> to <Data>.

Syntax:

Poke <Address>, <Data>

Part Description
<Address> Required. The <Address> to write the <Data> to.
<Data> Required. The <Data> to write. Use the table below to determine how much data you can store based on each iteration of the Poke command.
Command Data Length
Poke Byte length.
PokeInt Word length.
PokeLong Long Word length.
<Index> Required. Color index of the palette to start. Valid number range is 0 to 15.
<Count> Required. Number of colors to load from the <PaletteLabel>.
<Offset> Optional. Offset from the <PaletteLabel> to start from.

Example:

    a = 15
    b& = VarPtr&(a)
 
    Print "Before: "; a
    PokeInt b&, &h41
 
    Print "After: "; a