1 J
Figure 7- 1. Starting with the most significant bit at the top, each
pin of the print head is assigned a value which is a power of two.
A short program should demonstrate how to implement the
graphics command. The program below gave us this printout:
__----._._
-- ______._ --.
___““““--....” _-_,
10 i Demo of dot graphics
20 PI=3.14159
30 WID=lOO
40 OPEN "LPTl:" AS #l : WIDTH #1,255
50 PRINT#l, CHR$(27);"H";CHR$(0);
60 PRINT#l, CHR$(WID MOD 256);
70 PRINT#l, CHR$(INT(WID/256));
80 FOR I=0 TO WID-1
90 J=l+SIN(I"PI/32)
100 PRINT#l, CHR$(2*INT(J*3.5+.5
110 NEXT I
120 LPRINT
230 CLOSEXl
In lines 50 to 70, we’ve selected normal density graphics and
said that 100 characters of graphics data would follow. The loop
between lines 80 and 110 is repeated to plot 100 points along a
curve. This is an example of plotting a very simple