Commodore MPS-803 User's Guide Page 23

  • Download
  • Add to my manuals
  • Print
  • Page
    / 32
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 22
5.
Print
Position
Determination
CHRSO6);
"nHnL"
With
the
POSCode
^CHRS(IG)]
you
can
determine
the
print
start
position.
This
is
done
by
assigning
a 2-digit
number
following
the
CH
RS{16)
(see
the
examples
below).
EXAMPLE
1:
ClO--.-SET
PRINT
POSITION
100
REM
C
1U3
-
120
OPEN
4,4
:REM
PRINT
IN
GRflPHIC
MODE
140
FOR
1=1
TO
4
150
PRINT#4,"B1234367&9"I
160
NEXT
T
170
PRIHT#4
LB0
PRINT#4>PO*;"08";"COMMODORE";
190
PRIHT#4j
PO*.;
":":8".:
"PRINTER";
20©
;
21©
FOP
J=l
TO
:=:-PRINT#4
-
HT
\T
1
226
CL0SE4
RUN
01234'?67oSl£i
1
234^6^8901
23415«57S901
2345578?
COMMODORE
PRINTER
The
two
numbers
following the
CHRS(16)
codes
are
the
print
start
position
of
your
standard
characters.
This
can
be
proven
using
the following
example.
EXAMPLE
2:
190
REtf
CVHR*<16>
SET
PRINT
POSITION
110
120
OPEN
4,4
--REM
PRINT
IN
GPRFKIC
MODE
L40
FOR
1=1.
TO
4
1
PR
I
NTS
4,
"
@
1234567S911
i
[SB
MEKT
I
170
PRIHT#4
L75
PRIMT#4,EH$;
i
30
PR
I
NT*M
,
PO*.-
"
OS
"
.■
1f
CDnH'
p|'-"!!.:i
sa
NOTE:
If
you
want
to
change
a
printer
device
numbsr,
you
can
have
it
changed
by
DIP
switch
(you
might
want
to
have
a
printer's
device
number
changed
if
you
have
two
printers
attached
to
your
computer.
You
need
to
refer
to
each
of
the
individually;
hence, the
need
to
change one
of
the device
numbers.)
Is
the
secondary
addre&s,
a
unique
way
of
instructing
your
Printer's
internal
microprocessor
to
perform
certain
specific
tasks.
More
about
this
important
feature
later.
2.
The
PRINT*
Command;
This
cammand
works
just
like
the
BASIC
PRtNT
cammand
except
that
it
directs
the
output
to
the
Primer
instead
of
the
video
screen.
The
abbreviation
for
PRINTS
is
pR
(unshifted
p
and
shifted
RL
There
must
be
no
space
before
the
#,
and
spaces
after
the
#
are
ignored.
The
format
is
as
fol
lows:
PRINT;
Ifn
<,
variable/data
>
where:
Ifn
Is
the
logical
file
Ifniber
{any
number
from
1
to
255).
This
number
must
correspond
to
a
given
OPEN
command.
Oariableydata
>
will
be
discussed
in
detail
later
in
this
user's
guide.
3,
The
CLOSE
Command:
Careful
use
of
this
command
is
important
because
you
may
only
have
a
maxi
mum
of
ten
files
open
at
any
one
time.
Programming
your
Printer
may
require
that
you
keep
several
files
open
simultaneously.
Always
close
files
when
you
are
finished
using
them.
The
format
is
as
follows:
CLOSE
Ifn
where:
Ifn
is
the
logical
file
number
of
the
file
being
closed,
this
number
must
correspond
\o
a
given
OPEN
command.
4.
The
CMD
Command:
Good
programming
practice
dictates
never
using
this
statement
wcthin
a
pro
gram;
use
this
statement
in
direct
mode
only.
This
statement
transfers
the
primary
output
device
(TV
screen)
to
the
logical
file
number
specified
in
the
command.
The
file
must
have
been
previously
OPENed.
17
Page view 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 ... 31 32

Comments to this Manuals

No comments