TRS-80 MODEL
III
Since the Video Display is
memory-mapped, you can output to the Display directly
by
POKEing ASCII
data into Video RAM. Video RAM is
from
15360 to 16383.
Example:
IB CLS
20 FOR M
=
15360 TO 16383
30 POKE M»
191
40 NEXT M
50 GOTO 50
RUN the program to see
how fast the screen is
'
'painted" white.
Since POKE can
be used to store information anywhere
in memory, it is very
important when we do our graphics to stay in the range
for display locations
.
If we
POKE
outside this range, we may store the byte in a
critical
place. We could be
POKEing into our program, or
even
in worse places like the stack. Indiscriminate
POKEing can be
disastrous
. You
might have to reset or power off and start over
again. Unless you
know where
you
are POKEing
—
don't.
See
PEEK, USR, SET, and CHR$
for background material
.
Also see the Owners
Section for examples on special uses of POKE.
POSfxJ
Returns a number from to 63 indicating the current cursor position
on the Display
.
Requires a ' 'dummy argument' '
(any
numeric
expression).
100 PRINTTAB(40);POS(0)
prints
40
at position
40. (Note that a blank is inserted before the
"4"
to
accommodate
the sign; therefore the
'
'4'
'
is actually
at position 41
.)
The
'
'0'
' in
"POS(0)' ' is the dummy argument.
190