Sharp OZ-707 Operation Manual - Page 89

Example

Page 89 highlights

Example: 5: CLS 10: LINE (10,0) - (95,32) 20: WAIT:LlNE - (40,63) Note: Since the screen is made up of a matrix of dots, a diagonal line may appear as a staircase, and curves may not appear as complete curves. Options 8, R, and X are used to set, reset, or reverse the specified line on the screen. S: Draws a line while activating the corresponding dots on the screen (set). R: Draws a line while deactivating the corresponding dots on the screen (reset). This option is useful to draw a line in reverse video or to erase an existing line. X: Draws a line, activating the corresponding dots if they are inactive, or deactivating the corresponding dots if they are already active (reverse). The default parameter is S. Expression 5 is used to specify the type of line by a value from 0 to 65535. For example, if the value of expression 5 is 5503 (&H157F), the following line is drawn: 1IIIIIIII ttltQ 16 dots The same dot pattern appears repeatedly to draw a dotted line. Binary representation of 5503 (&H157F) is: 0111111100010101 If you compare this bit pattern with the dot pattern above, you will notice that the dots corresponding to "one" bits are activated while those corresponding to "zero" bits are not. Thus, the type of line is determined by the binary 16-bit pattern of the value of expression 5. If the value is zero, no line appears; and if it is 65535 (&HFFFF), a solid line is drawn. A solid line is also drawn if expression 5 is omitted. 166 If option R is specified, the dots corresponding to "one" bits are deactivated on the screen; if option X is specified, the status of the dots corresponding to "one" bits are reversed. Options Band BF are used to draw a rectangle whose opposite corners are specified by (expression 1, expression 2) and (expression 3, expression 4). Option B is used to draw a line rectangle. Option BF is used to draw a solid rectangle. EXAMPLE: 10: CLS : WAIT 0 20: AA$ = "081448BF481408" 30: GCURSOR (30 ,35) 40: GPRINT AA$;AA$;AA$ 50: Llt-IE(2,O)-(90,63),&HF18F,B 60: LlNE(6,2)-(86,61 ),X,BF 70: GOTO 60 167

  • 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
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128

Example:
5: CLS
10: LINE (10,0) - (95,32)
20: WAIT:LlNE -
(40,63)
Note:
Since the screen
is
made up of a matrix of dots, a diagonal line may
appear as a staircase, and curves may not appear
as
complete curves.
Options 8,
R,
and
X are used to set, reset, or reverse the specified
line
on
the screen.
S:
Draws a line while activating the corresponding dots
on
the screen
(set).
R:
Draws a line while deactivating the corresponding dots on the
screen (reset). This option
is
useful to draw a line
in
reverse video
or to erase
an
existing line.
X:
Draws a line, activating the corresponding dots if they are inactive,
or deactivating the corresponding dots if they are already active
(reverse).
The default parameter is
S.
Expression 5
is
used to specify the type of line by a value from 0 to
65535. For example,
if
the value
of
expression 5 is 5503 (&H157F), the
following line is drawn:
1
IIIIIIII
tt
ltQ
16
dots
The
same
dot
pattern
appears
repeatedly
to
draw
a
dotted
line
.
Binary representation of 5503 (&H157F) is:
0111111100010101
If you compare this bit pattern with the dot pattern above, you will
notice that the dots corresponding to "one" bits are activated while
those corresponding
to
"zero" bits are not. Thus, the type of line is
determined
by
the binary 16-bit pattern of the value of expression
5.
If
the value
is
zero, no line appears; and if it
is
65535 (&HFFFF), a solid
line
is
drawn. A solid line is also drawn
if
expression 5
is
omitted.
166
If option R is specified, the dots corresponding to "one" bits are
deactivated on the screen; if option X
is
specified, the status of the
dots corresponding to "one" bits are reversed.
Options
Band
BF are used to draw a rectangle whose opposite
corners are specified
by
(expression
1,
expression 2) and (expression
3,
expression
4).
Option B is used to draw a line rectangle.
Option
BF
is used to draw a solid rectangle.
EXAMPLE:
10
: CLS : WAIT 0
20: AA$
=
"081448BF481408"
30: GCURSOR (30,35)
40: GPRINT AA$;AA$;AA$
50: Llt-IE(2,O)-(90,63),&HF18F,B
60: LlNE(6,2)-(86,61 ),X,BF
70: GOTO 60
167