EasyManua.ls Logo

Commodore VIC-20 - Control Statements

Commodore VIC-20
308 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
point
lo
RAM,
however,
we
will
be
displaying
memory
that
we
can
change
any
way
we
want.
Add
the
following
line to
the
program:
5
POKE
36869,255
(This
will
give
us
64
programmable
characters,
which
we
can
set
up as
an
8-by-a
character
matrix,
which
will
give
us
a
64-dot
by
64-dot
HI-RES
screen—just
what
we
were
looking
for.)
RUN
the
program
now.
Garbage
appeared
on
the
screen,
right?
Just
like
the
regular
screen,
we
have
to
clear
the
HI-RES
screen
before
we
use
it.
Printing
a
key
won't
work
in
this
case.
Instead
we
have
to
clear
out
the
section
of
memory
used
for
our
programmable
characters.
Add
the following
line
to
your
program
to
clear
the
HI-RES
screen;
6
FOR
I-
7168
TO
7679
:
POKE
I,
0
:
NEXT
Now
RUN
the
program
again,
You
should
see
nothing
but
black
on
the
screen—your
program
is
a
success.
What
we
want
to
add
now
is
the
means
to
turn
dots
on
and
off
on
the
Hl-RES
screen.
To
SET
a
dot
(turn
the dot on)
or
UNSET
a
dot
you
must
know
how
to
find
the
correct
bit
in
the
character
memory
that
you
must
set
to
one.
In
other
words,
you
have
to
find
the
character
you
need
to
change,
the
row
of
the
character,
and
which
bit
of
the
row
that
you
have
to
change.
We
need
a
formula
to
calculate
this.
We
will
use
X
and
Y
to
stand
for
the
horizontal
and
vertical
position
of
the
dot.
The
dot
where
X
=
0
and
Y
-
0
is
at
the
upper-left
of
the
display.
Dots
to
the
right
have
higher
X
values,
and
the
dots
toward
the
bottom
have
higher
Y
values.
The
dots
where
0<
=
X<
= 7
and
0<
-
Y<
=
7
are
in
character
number
0,
which
we
placed
at
the
upper-left
corner
of
the
screen.
Each
character
contains
64
dots.
8
rows
of
8
dots each.
These
are
the
simple
calculations
to
decide
which
dot
of
which
character
is
being
altered:
The
character
number
is.
.
.
CHAR
-
INT{X/8)
*3
+
INT(Y6}
I
90