a.
Screen Locations
20 40
60
b.
Coordinate Locations and Memory Address
1,1
C 1
40,1
32768 0 umns 32807
961
1000
25,1
33728
40,
25
33767
c.
Memory Address of Screen Locations
158
32768
Contents of row
1,
col.
1
32769
Contents
of
row
1,
col. 2
32770
·
·
32771
·
32772
·
·
32773 ·
·
:::::
32774
·
·
ro..32775
Contents of row
1,
col.
8
f.o..32776
·
·
.
·
.
·
32852 Contents of row
3,
col.
5
Figure
5-12.
Screen
Locations
and
Memory
Addresses
memory address for the screen location at column
5,
row 3 (5,3):
= 32768+(COL-1)+(40-(ROW-1))
=
32768+(5
-1)+(40-(3-1))
= 32768+4+(40.2)
=
32768+4+80
= 32852
1
3
Ul
~
o
0:::
5
Columns
25 25
The memory address for screen location
(5,3)
is
32852.
This equation makes
it
possible to POKE characters to the screen
with-
out knowing any more than the column and
row
number of the location to be
POKEd. Recall the format of the
POKE
statement:
POKE
A,X
where:
A
X
is
the screen address.
is
the character or variable to
be
POKEd
into
A.
289