94

dots, the printhead would have to slow down and back up to

print both dots-not very efficient! To avoid this inefficiency, this printer will not allow you to define a character like Figure 8-5. (Actually, you can define it, but when it prints, your printer will leave out the overlapping dots, so that it would print like Figure 8-4.)

nRule 2: Each row is divided into three bytes

Now it’s time to give our creative side a break and get down to some basic arithmetic. Each vertical column (which has a max- imum of 24 dots) is first divided into three groups of eight dots. Each group of eight dots is represented by one byte, which con- sists of eight bits. That’s where the numbers down the left side of the grid come in. Notice that there is a number for each row of dots and that each number is twice the number below it. By making these numbers powers of two we can take any combina- tion of dots in a vertical column and assign them a unique value. Some examples will make this clearer. As shown in Figure 8-6, if we add the numbers for the dots that print in a column, the sum will be a number in the range of 0 to 255. Each number from 0 - 255 represents a unique combination of dots.

128

 

 

 

 

 

 

O-128

 

64

0

-

64

 

 

 

0

-

64

32

0

-

32

0

-

32

0

-

32

16

 

 

 

0

-

16

0

-

16

8

 

 

 

O-8

 

.-a

 

4

o-4

 

 

 

 

o-4

 

2

o-2

 

O-2

 

0

-2

1

O-l

 

_____

 

O-1

 

 

-

 

 

 

 

 

 

Sum

 

 

103

 

 

58

 

 

255

Figure 8-6.Byaddingthevaluesofeachdotinacolumn,you’llget auniquedescriptionforanycombinationofdots.

So, add up the values of the dots in each cloumn using this system. In Figure 8-7 we’ve shown our grid with the sums of the columns filled in across the bottom (see if these agree with your answers!). Across the top of the grid you’ve probably noticed the cryptic labeling of each column: dl, d2, ~3, etc. These labels correspond to the labels in the command syntax statement,

Page 102
Image 102
Star Micronics NB-15 user manual 128