Figure 17-1.Barchart

In line 130 the parameters for “&” specify that our 14 user-defined characters will be stored at positions 94 to 107 (ASCII symbols ^ to k).

Line 140 sets up a READ loop (Y) for the characters and sends the attribute byte—CHRS(139). Line 160 closes the loop and sets the form length to 33 lines so that, while you are setting the chart up, you can print two charts to a page. When you finish making experimental printouts, you will probably want to change this specification to 66 to conform to the usual page size. Check that you like the positioning of your paper since “C” also sets top of form to the current position of the print head. Now add these lines:

10 FOR J=1 TO 3: FOR K=1 TO 320READ MAX(J,K)30NEXT K: NEXT J40DATA 12,18,23,28,36,34,28,27,30

Line 20 READS the maximum heights for the chart’s vertical bars from line 40 and stores them in the array MAX. The next data lines define three new characters:

70

DATA

2,1,64,32,16,8,4,2,1,64,32

80

DATA

127,0,99,0,65,0,65,0,99,0,127

90

DATA

127,0,28,0,62,65,62,0,28,0,127

228