Star Micronics Rainbow NX-1000C User Manual page 52

Table of Contents

Advertisement

The third code in the command < 26 > < n > < 255 > does not have
to be 255; it can be any number greater than 128 and less than 256. Different
codes give different types of bars: bars narrower than seven dots, or bars
with black and white stripes. To see what they look like, you may want to
write a program with a loop that prints all these types of bars.
Seven-bit graphics commands can also be used to print arbitrary pat-
terns, and they are compatible with existing Commodore computer software.
For general graphics, however, it is more convenient to use eight-bit graphics,
which work in both the Commodore and ASCII modes. "Convenient" does
not imply that general graphics programming is easy; on the contrary, it
requires time and effort.
Here is how dot graphics can be used to print a large, contoured capital
S. The design of the S is first sketched on graph paper marked with a heavy
horizontal line every eight rows. Each eight-row strip will be printed by one
pass of the print head.
In each strip, a value from 0 to 255 must be calculated for every vertical
column of eight dots. The value is the sum of weights that double as you
move up, from 1 for a dot in the bottom row of the strip to 128 for a dot
in the top row.
..
Figure 3-1. Dot graphics for S
Weight
128
64
32
16
8
4
2
~
~
~
~
~ ~
~ ~
~ ~ ~
~ ~
~
~
§g:
~ ~
g§ ~ ~
~
:::a
~ ~
~
[§§
~
Dot data 0 0 0 0 1 3 7 7 7 15 14 14 14 14
Figure 3-2. Close-up of start of first strip
The calculated values are entered as data values in the program. The
command for printing one strip is < 27> < 75 > < nl > < n2 > < ml
>
<
m2 > ... , where nl
+
n2 x 256 is the dot length of the strip (22 in this
example) and ml, m2, ... are the dot data calculated as described above.
To make the strips join, the line spacing must be set to 8/72 of an inch; this
can be done by the command < 27 > < 65 > < 8 > .
42
f!
n
f!
f!
rJ
r;

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents