Star Micronics SB-15 Printer User Manual


 
(if you’re not sure which type of interface your computer has,
check the appendix for your computer).
So when do you use graphics and when do you use download
characters? Practically anything you can do with graphics you
can do with download characters, and vice versa. A clever pro-
grammer could actually plot a mathematical curve using down-
load characters or use strings of graphics data as user-defined
characters. But why do it the hard way? There are several in-
stances when dot graphics is clearly the best way to approach
the problem:
l If the graphic image to be printed is wider than 11 dots
or higher than 8 dots
l If an image is to be printed just one time, as opposed to
a frequently used “text” character
l If you want higher resolution (SD-IO/l 5 can print as many
as 240 dots per inch in dot graphics mode; text mode, which
includes download characters, prints 60 dots per inch)
USING THE DOT GRAPHICS COMMANDS
The command to print normal density (60 dots per inch hor-
izontal; 72 dots per inch vertical) dot graphics uses this format:
<ESC‘> "K" nl n2 ml m2 . . . . .
Just like many of the other codes you have learned, the com-
mand starts with an escape sequence ( < ESC > “K” in this case).
But unlike SD-lo/l 5’s other codes there can be any number of
graphics data bytes following the command. That’s where nl and
n2 come in; they are used to tell SD-lo/l 5 how many bytes of
graphics data to expect.
n Specifying the number of columns of dots
To figure the values of MI and n2, you’ll need to ligure out
how wide your graphic image will be (remember that there are
60 columns of dots per inch in normal density). Then comes the
fun part: converting one number (the number of columns of dots)
into two! Why is it necessary to use two numbers to tell SD-lo/l5
the number of graphics codes to expect? Because the largest
number we can send in one byte (that’s what the BASIC CHR$()
function sends: one byte) is 255. And with normal density graphics
104