@caption<Response of Tektronix Emulator to Received Characters>
@bar()
@end(table)
In the table, US is the name for the ASCII character Control-Underscore, 31
decimal. Text is written starting with the last drawn point being the lower
left corner of the first 8 by 8 character cell. The drawing position is
updated by 8 dots to the right for each character, and lines wrap at column 80
(column 90 for Hercules boards). If text extends "below the screen" the sign
"@q(More >)" is shown at the bottom right corner and the user needs to press a
key to continue. Then the screen will be cleared and the new text will start
at the top of the screen (no scrolling is done in graphics mode). A real Tek
4010 begins new text at column 40 and will overwrite dots from older material.
Text mode is interrupted by the drawing commands discussed
below.
@subu<Bypass Mode>:
Certain Tektronix commands turn on or off "Bypass" mode whereby incoming
text is not displayed on the screen. Removal of echos of the GIN mode,
discussed below, is the major use of Bypass. Bypass mode is turned on by
receipt of
ESC Control-E, ESC Control-X, and ESC Control-Z
and it is turned off upon receipt of
BEL, LF, CR, US, other escape sequences, and resetting the terminal.
@subu<Drawing commands GS, FS, RS>:
1. Draw a line or move to a point: GS <@i(xy) @i(xy) @value<ellips> @i(xy)>
GS is the name for ASCII character Control-@q<]> (right square bracket),
decimal 29. <@i(xy)> stands for an encoded x,y coordinate as explained below.
One or more x,y coordinates may follow GS and line segments are drawn from
point to point. The first point is reached without drawing so that GS and the
initial <@i(xy)> is a simple "move-to" command rather than a "draw-to" command.XLines may be constructed from six dash patterns described in Table
@ref(-mstekrc). <@i(xy)> coordinates are encoded by separating the 10 bit
value of x and of y into 5 bit components and then adding two high bits to eachXto identify which component is being represented: high-y, low-y, high-x, or
low-x. They are transmitted in that order, with the low-x byte always sent
last. In fact, bytes may be omitted if they do not change from point to point,Xprovided that low-x is always sent. These bytes range from ASCII space (32
decimal) to ASCII DEL (127 decimal). Details are given below, and summarized
in Table @ref(-mstekxy). This mode completes when a new command or a CR LF
(carriage return, line feed) arrives; escape sequences are processed
transparently but other control codes are ignored. The interrupting character
is accepted and processed next.
2. Draw dots at given locations: FS <@i(xy) @i(xy) @value<ellips> @i(xy)>
FS is the name for the ASCII character Control-\ (backslash), decimal 28.
<@i(xy)> is in the same form as above. A dot is drawn at each x,y point. ThisXmode completes when a new command or a CRLF character arrives; escape sequencesXare processed transparently but other control codes are ignored. The
interrupting character is accepted and processed next.
3. Draw dots from the current location: RS @i(<pen> <direction> <direction>
@value<ellips> <direction>)
RS is the name for the ASCII character Control-@q(^) (caret), decimal 30.
@i<pen> is the character Space (32 decimal) to move without drawing or P (80
decimal) to draw while moving. @i(<direction>) is one of the letters A, E, D,
F, B, J, H, I as shown in Table @ref<-mstekdd>.
@begin<table>
@bar()
@blankspace(1)
@begin<format>
@tabclear()@tabset(0.5inch,1.25inch,3.50inch)
@ux(@i[<direction>])@\@ux<Move One Tek Dot This Way>
@\A@\East (right)
@\E@\East and North@\@q< F D E>
@\D@\North (up)
@\F@\North and West@\@q< B * A> (@q<*> is current location)
@\B@\West
@\J@\South and West@\@q< J H I>
@\H@\South
@\I@\South and East
@end<format>
@caption<Tektronix Dot-Drawing Commands>
@bar()
@end(table)
Example: @q<RS P J J J> (no spaces here, naturally) means draw three dots in
the southwest direction, stepping to each in turn. This mode completes when a
new command or a non-@i(<pen>) or non-@i(<direction>) character arrives; the
interrupting character is accepted and processed next.
@subu[Graphics INput (GIN) mode]:
Graphics input mode is entered when ESC Control-Z is received. A crosshair is
drawn on the screen and may be moved by the numeric keypad arrows (fine scale
motion) or the Shift key and these arrows (coarse scale motion). Pressing an
ASCII-producing key sends the position of the crosshairs to the host as the
sequence of: pressed key, X coordinate, Y coordinate, carriage return, then
removes the crosshairs, and then returns to text mode. The coordinates are
encoded by splitting them into five bit fields, adding an ascii space (20H)
to each, and are sent as high-y, low-y, high-x and low-x bytes. Bypass mode
is active while the report is sent to supress echos of the report.
One may prematurely exit GIN mode by typing Control-C or Control-Break.
ESCAPE Control-E requests a status report from the emulator. Tek terminals
have many sub-fields. Kermit-MS sends a byte of 24 hex for being in text mode
or 20 hex otherwise, followed by the encoded X then Y coordinates and a
carriage return. Coordinates are encoded 5 bits at a time similar to the GIN
report.
@subu(Identification Report):
ESCAPE Z requests terminal identification, as for VT52 and VT102. Currently
this report is the 10 character sequence @w(@q<IBM_TEK ESCAPE / Z>) (no
spaces).
@subu(Coordinate Encoding):
Coordinate 0,0 is the lower left corner and the X axis is horizontal. TektronixXpositions are mapped into the typically 640 dots wide by 200 or 350 dots high
PC screen and thus adjacent Tek positions may yield the same PC screen dot.
4010-like devices use positions from 0 to 1023 for both X and Y, although only
0 to 779 are visible for Y due to screen geometry. The Tek screen is 10.24 by
7.80 inches and coordinates are sent as 1-4 characters.
4014-like devices use positions 0 to 4095, but each movement is a multiple of 4Xpositions unless the high-resolution LSBXY are sent. This makes it compatible
with the 4010 in that a full sized plot fills the screen. The emulator acceptsXthe LSBXY components but does not use them.
The various modes are summarized in Table @ref<-mstekxy>, in which the
following notation is used:
@begin(display)
HIX, HIY = High order 5 bits of a 10 or 12 bit position.
LOX, LOY = Middle order 5 bits of position (low order of Tek 4010).
LSBXY = Low order 2 bits of X + low order 2 bits of Y (4014 mode),
recognized by the Tek emulator but not used to calculate position.
Note that LO-Y must be sent if HI-X has changed so that the Tektronix knows theXHI-X byte (in the range of 20h-3Fh) is HI-X and not HI-Y. LO-Y must also be
sent if LSBXY has changed, so that the 4010 will ignore LSBXY and accept LO-Y.
The LSBXY byte is
@MD<60h + (MARGIN * 10h) + (LSBY * 4) + LSBX>
MARGIN is 0 here and refers to splitting the screen left and right for text
rollover, which the Kermit Tek emulator does not do.
@subu<Tek 4010 Example>:
Suppose <@i(xy)> is point y = 300, x = 500 in Tektronix coordinates. Split
each 10-bit coordinate into 5-bit groups, add add the Kind code to each. Send