EasyManua.ls Logo

Commodore MPS 1200 - Attribute Byte

Commodore MPS 1200
250 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...
The
command
is
ESC
"&"
chr$(O) chr$(n1) chr$(n2) chr$(a)
chr$(dO)
...
chr$(dlO).
The
first three characters,
ESC
"&"
chr$(O),
are easy enough,
but
what
about
the rest
of
it?
First,
n1
and n2 are variables that specify the range
of
characters
that you wish to define
with
this
command.
As
you
know,
each
standard character has a corresponding ASCII code (these codes can
be found in
Appendix
B).
n1
and n2 are asking for the ASCII codes
of
the first and last character you wish
to
define.
Any
ASCII codes
from
32 to 63 can be replaced.
The
codes that follow chr$(a)
chr$(dO)
...
chr$(dlO)O are repeated for each character in the speci-
fied range.
If
you
are defining only
one
character,
n1
and n2 are the
same.
Attribute
byte
The
variable a
is
the attribute byte, for it describes some
of
the
characteristics
of
the
character
you
have defined.
The
first charac-
teristic
is
whether
the
MPS
1200 should
print
your
character
with
the
top
eight pins
of
the
print
head
or
the
bottom
eight pins.
This
is
done
with
the
high
order
bit
of
the attribute byte.
If
it
is
on
(i.e.
equal
to,one),
the
top
eight pins are used;
if
it
is
off
(zero), the
bottom
eight pins are used.
Put
another way,
if
the variable a has a
value
of
128
or
more, the top pins are used;
if
it
is
less than 128, the
bottom
pins will be used.
This
is
shown
in Figure 8-4.
8-5

Related product manuals