|
POKE
Abbreviation: P <SHIFT+O>
TYPE: Statement
FORMAT: POKE <location>,<value>
Action: The POKE statement is used to write a one-byte (8-bits)
binary value into a given memory location or input/output register.
The <location> is an arithmetic expression which must equal
a value in the range of 0 to 65535. The <value> is an expression
which can be reduced to an integer value of 0 to 255. If either
value is out of its respective range, the BASIC error message
?ILLEGAL QUANTITY occurs.
The POKE statement and PEEK statement (which is a built-in function
that looks at a memory location) are useful for data storage,
controlling graphics displays or sound generation, loading assembly
language sub-routines, and passing arguments and results to and
from assembly language subroutines. In addition, Operating System
parameters can be examined using PEEK statements or changed and
manipulated using POKE statements. A complete memory map of useful
locations is given in Appendix G.
EXAMPLES of POKE Statement:
POKE 1024, 1 (Puts an "A" at position 1 on the
screen)
POKE 2040, PTR (Updates Sprite #0 data pointer)
10 POKE RED,32
20 POKE 36879,8
2050 POKE A,B
|