Operation Manual

Pu
lting
it
together
Now
vve
can
work
through
a
simple
exam
ph.:.
~1..1ppos~
~
w
~
w,mt L:;
draw
two
diagonal
lines.
Step
1. Begin w1th
LPRINT
and
the
start
graphics
code
for
single
clensity
graphics
this
time:
10
LPRINT
CHR$(27);CHl{Si(/~l;
Step
2. ( (1t111t
thE'
columns
in
the
trn<~f.E'
.
ThPrE'
are
11.
so
we
c
alculate
n1
and
n2
:
n2
=
int
(11
/ 256) = 0
n:
=
11
(n
2 x 256) = 11;
and
add
them
to t
he
statement:
10
LPRINT
CHI\.$(:"'~
1 :CHR$(75) ;CHR$(11) ;CHR$(0);
Step
3.
\dd
the
dot
values
for
each
column
1 2 3 4 5 6 7 8 9
10
11
POSITION
128
VALUE
64
32
16
8
-·-
1---
4
2
ti
l
I
--~
+
j
+-
l
1
e
l,
-;--,.
I
-
~
~
i
l
and
add
them
to
the
statement:
10
LPRINT
CHR$(27); CHR$(75); CHR$(11
);
CHR$(0);
CHR$(1) ;CHR$(2)
;CHR$(
4) ;CHR$(9) ;CHR$(18);
CHR$(36);CHR$(72);CHR$(144);CHR$(32);CHR$(64);CHR$(128);
Step
4.
Run
the
program.
The
result
should
look
like this.
If
not,
check
the
maths
and
typing
and
lry
agam.
#'
4-
14 IBM Modes
Arlva11ced
Features