HtvttT^Ci^
^
<5^
"PR^ck
^/
•:
:
-.
TECHNICAL
INFORMATION
(Machine-Language
Input/Output)
In
this
chapter, we'll discuss the
technical
details
which
are
happening "behind
the
scenes" You
don't
need
to know this information when
you are
programming in
BASIC. In fact, you
won't even
be
aware that
these
details are happening.
However, if
you plan to write
machine-language
disk
programs or
are simply
interested
in know-
ing all
you can, you'll definitely want
to
read
this
chapter. We'll
begin by discussing how
the Com-
puter
organizes
all the bytes on the
disk.
Then,
we'll show how
to access them through
machine-
language
programming
and other
advanced
techniques.
WHAT
A DISK CONTAINS
When
you power-up the
Computer,
it organizes
the
bytes on the disk into
tracks
and sectors.
Some
of these
bytes control the
system.
The great
major-
ity of them
are for data.
TVacks
The
Computer
organizes the
disk into
35 tracks,
numbered 0-34.
Each track
contains
approxi-
mately
6,250 bytes*
6,084
of them are
divided
into
sectors; the
remaining
are for system
controls.
Byte#
Contents
0-31
System controls
32-6115
Sectors
6116-6249*
System
controls
The
system control bytes all
contain
the value
of
4E
(hexadecimal).
*the number
of
system control bytes at
the end
of
each track might vary
slightly due to slight
speed
variations.
Note:
One byte contains
8 bits.
Each bit contains
either a
1
or
a 0. Normally, we express the
contents
of
these bits
as a hexadecimal (base 16) number.
For
example,
if
we say a byte
contains the value
of
hexa-
decimal
4B, it contains this
bit
pattern
—
0100110.
kYou
can
find
more
information on
hexadecimal
and
binary number
systems
in
a math textbook.
57