EasyManua.ls Logo

Commodore MPS 1200 - Page 139

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...
Repeat
Bit
Image
Printing
ON
Format
BASIC
Hex
chr$(8)
......
chr$(26);chr$(n);chr$(m
=
bit
image
data)
08
.....
1A
nh
mh
Often,
you'll
need to reproduce the same line
of
bit image D
AT
A
for parts
of
images.
The
chr$(26) sequence
within
chr$(8)
mode
enables
you
to repeat printing a bit image quite easily.
The
format
is
shown
above.
"n"
is
a binary
number
(from
0
to
255)
which
specifics the
number
of
repetitions to be printed, and the
"bit
image data"
is
the pin
pattern data for the pattern that
is
being repeated.
If
you
supply a
value
of
zero for n, it
is
READ
as
256, meaning the bit image will
be reprinted 256 times. In
order
to
repeat
more
than 256 times, you
must
use this sequence
more
than once.
The
following
program
demonstrates
how
this sequence works:
10
open
1,4,7
'
20
fot'
i=1
to
6
30
t'ead
n
40
print#1,chr$(B);chr$(26);chr$(n);chr$(243);chr$(15)
50
ne:·:t
i
60
for
j=l
to
8:print#1:next
j
70
close
1
100
data
34,57,75,89,123,186
Result:
7-5

Related product manuals