EasyManua.ls Logo

Commodore VIC-20 - Page 145

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...
Example
of
how
a
base
10
(decimal
number)
is
constructed.
Base
raised
by 3
2
10
increasing
powers..
10
10 10 10
Equals:
1000
100
10
1
Consider4569(base10)45
69
-
4x1000
+
5x100
+
6x10
+
9
Example
of
how
a
base
16
(hexadecimal
number)
is
constructed.
Base
raised
by
3 2
10
increasing
powers.,
16 16
16 16
Equals:
4096
256
16
1
Consider
11D9
(basei
6)
1 1
D9
=
1*4096+
r256-r13'16
+
Therefore
4569{Base10)
=
11D9(Base16)
The
range
for
addressable
memory
locations
is
0
-
65535
(as
was
stated
earlier).
This
range
is
therefore
0
-
FFFF
in
hexadecimal
notation.
Usually
hexadecimal
numbers
are
prefixed
with
a
dollar
sign,
to
distinguish
them
from
decimal
numbers.
Let's
look
at
some
"hex"
numbers,
using
VICMon
by
displaying
the
contents
of
some
memory.
VICMon
shows
you:
B'
PC
SR
AC XR
YR
SP
<I
0401
32
04
5E
00 F6
(these
may
be
different)
Then
if
you
type
in:
,M
0000 0020
(and
press
RETURN
).
You
will
see
rows
of
6
hex
numbers.
The
first
4
digit
one
is
the
address
of
the
first
byte
of
memory
being
shown
in
that
row,
and
the
other
five
numbers
are the
actual
contents
of
the
rnemory
locations
beginning
at
that
start
address.
You
should
endeavor
to
learn
to
HLthink"
in
hexadecimal.
This
is
not
difficult,
since
there
is
no
need
to
think
in
decimal.
For
example,
if
it
is
said
that
a
particular
value
is
stored
at
$14ED
instead
of
5357,
this
shouldn't
cause
any
headaches,
129