mined by the data numbers as columns 0 to 10, then in Proportional Mode the minimum and maximum starting and stopping columns will be 0 and 11. Why 11 instead of 10? Column 11 is the maximum value because Proportional characters are always Emphasized; this makes each character wider by one intermediate column. So when defining your own characters for proportional printing, always reserve one extra column.

Suppose you want a character to start in column 1 and end in column 10. How do you put this information into the attribute byte? The starting column number (1) is converted to a 3-bit binary number

(001)and stored in bits 4, 5, and 6 of the attribute byte. The ending column number (10) is converted to a 4-bit binary number (1010) and stored in bits 0 to 3. The conversions are shown in Figure 15-5.

Figure 15-5.Attribute byte conversionsThe full 8-bit attribute byte, then, is composed of three parts:1.Bit 7 determines which pins are used to print the character.2.Bits 4, 5, and 6 determine the starting column number.3.Bits 0, 1, 2, and 3 determine the ending column number.

So the attribute byte constructed in Figure 15-5—CHR$(154)—uses the top eight pins, starts printing in column 1, and ends in column 10.

204