Tektronix 4023 Instruction Manual page 45

Computer display terminal
Hide thumbs Also See for 4023:
Table of Contents

Advertisement

4023
Users
PROGRAMMING
(cont.)
John
S»j th
-^
irk
Fig. 2-1.
A
Formatted
Display.
position cursor information.
To
find
the
specific
horizontal
(X)
and
vertical
(Y)
codes
necessary
to position
the
cursor,
you must
add
32
J0 to
both
the
X
address
and
the
Y
address.
The
X
address
is
the
specific
character position
in
a
line,
and
the
Y
address
is
the
specific
line.
For example, assume
that
you
wish
to position
the
cursor to the
18th character
position of the
10th
line.
Horizontal address = 18
+
32
=
50
10
Vertical
address
= 10
+ 32
= 42,
n
Referring to the
ASCII
Code
Chart,
you
find that
the
numeral
2
and
the
asterisk
codes
are
the
respective
X
and
Y
codes needed
to position
the cursor to the
above
address.
The
complete sequence
would
be:
Set Horizontal
Address
Set
Vertical
Address
Read
Cursor
Send
2
(50 10
)
Send
*
(42 10
)
Set
Cursor
Position
Send
FS(28
10
)
To
read (send) the cursor position to the
computer,
the
two-character
control
sequence
of
ESC
followed
by
]
(93 10
)
is
used.
Receiving
this
sequence
causes the
4023
to
send GS,
X, Y,
END
to
the
computer.
GS
(29 10
)
identifies
the
next
two
characters
as
cursor position information.
X
is
the
code
for
the character position
in
a
line;
Y
is
the
line
number; and
END
is
the character that
marks
the
end
of
the
message and
is
usually
CR
(The
End
character can
be
strapped
to
be
any
control character).
NOTE
To
obtain
the actual character
and
line
position
number,
the
program
must
subtract
32
from both
the
X
and
Y
values received.
®
2-5

Advertisement

Table of Contents
loading

Table of Contents