Epson LX-90 User Manual - Apple IIc 8699 PIC for LX-90 - Page 48

Print Chr$27;k;chr$l00; Chr$0, For X=1 To 50: Print Chr$42; Chr$ 85

Page 48 highlights

To see how more than one line combines to form a figure, enter and run the following program, which uses the lines you have already typed and adds several more. 5 PRINT CHR$(4);"PR#l" 10 PRINT CHR$(9);"Z" 20 PRINT CHR$(27);"A";CHR$(7) 30 FOR R=l TO 3 40 PRINT CHR$(27);"K";CHR$(l00); CHR$(0); 50 FOR X=1 TO 50: PRINT CHR$(85); CHR$(42); 60 NEXT X: PRINT 70 PRINT CHR$(27);"K";CHR$(l00); CHR$(0) 80 FOR X=1 TO 50: PRINT CHR$(42); CHR$ (85); 90 NEXT X: PRINT: NEXT R 100 PRINT CHR$(27);"@" 300 PRINT CHR$(4);"PR#0" Now run the program to see the six print lines combine into a pattern: Because the short and simple program that produced the pattern demonstrates many elements of graphics programming, each line is explained below. Line 20 changes the line spacing to 7/72 of an inch, which is the height of the dot patterns used in the program. Therefore, there is no space between the print lines. Line 30 begins a loop to produce multiple print lines. Lines 40 and 50 were explained previously. Lines 70 and 80 are similar to lines 40 and 50 except that line 80 uses a reversal of the patterns in line 50. As 46

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116

To see how more than one line combines to form a figure, enter and
run the following program, which uses the lines you have already
typed and adds several more.
5 PRINT CHR$(4);"PR#l"
10 PRINT CHR$(9);"Z"
20 PRINT CHR$(27);"A";CHR$(7)
30
FOR R=l TO
3
40
PRINT CHR$(27);"K";CHR$(l00);
CHR$(0);
50 FOR X=1 TO
50:
PRINT CHR$(85); CHR$(42);
60 NEXT X: PRINT
70 PRINT CHR$(27);"K";CHR$(l00); CHR$(0)
80 FOR X=1 TO 50: PRINT CHR$(42); CHR$ (85);
90 NEXT X: PRINT: NEXT R
100 PRINT CHR$(27);"@"
300
PRINT CHR$(4);"PR#0"
Now run the program to see the six print lines combine into a pat-
tern:
Because the short and simple program that produced the pattern
demonstrates many elements of graphics programming, each line is
explained below.
Line 20 changes the line spacing to 7/72 of an inch, which is the
height of the dot patterns used in the program. Therefore, there is no
space between the print lines.
Line 30 begins a loop to produce multiple print lines. Lines 40 and
50 were explained previously. Lines 70 and 80 are similar to lines 40
and 50 except that line 80 uses a reversal of the patterns in line 50. As
46