Trailing-Edge
-
PDP-10 Archives
-
decuslib10-02
-
43,50266/txtpad.lst
There are no other files named txtpad.lst in the archive.
TTTTTTTTT XXX XXX TTTTTTTTT PPPPPPPP AAA DDDDDDD
TTT XXX XXX TTT PPP PPP AAA AAA DDD DDD
TTT XXX TTT PPPPPPPP AAA AAA DDD DDD
TTT XXX XXX TTT PPP AAAAAAAAA DDD DDD
TTT XXX XXX TTT PPP AAA AAA DDDDDDD
TXTPAD allows the user to construct illustrations formed of
printing characters for use in documentation. A stylus is
used to position and duplicate and/or remove characters or
groups of characters on a 60 character by 60 line grid. The
resulting illustration is monitored on a storage scope, and
can be stored in and retrieved from an output file.
TXTPAD displays the menu shown below on the storage scope.
The 46 characters along the left, lower and right margins
are available for insertion into the illustration. When
TXTPAD is started, it will ask the user if he wishes to read
this portion of the menu from his own file TXTPA.DAT. Up to
84 characters forming the first line of this file will be
substituted for those shown if the answer to this question
is a carriage return, blank or upper case Y.
TTY LIN COPY MOV TRIM KIL WIP READ SWAP SAV HIH LOW ALL EXIT
------------------------------------------------------------
I I
A I I
B I I
C I I
D I I
E I I
F I I
G I I
H I I
I I I
J I I
K I I
L I I
M I I
N I I
O I I
P I I
Q I I
R I I
S I I
T I I
U I I
V I I
W I I
X I I
Y I I
Z ------------------------------------------------------
0
1 2 3 4 5 6 7 8 9 ( ) * / + - . , ' =
Page 2
Length of Displayed Text
------ -- --------- ----
Illustrations created or read by TXTPAD are 60 columns wide
by 60 lines deep. Either the upper or lower 36 lines can be
displayed in the same proportions as would be printed by a
printer or teletype, or all 60 lines can be displayed on a
square grid. Initially, the display is of the upper 36
lines, and this can be reselected by raising the stylus
while pointing at the HIGH switch . The lower 36 lines can
be selected by pointing to the LOW switch as can be all 60
lines by pointing to the ALL switch.
Groups of Characters
------ -- ----------
A group of characters is defined as a collection of
non-blank characters connected either horizontally,
vertically or diagonally. For example, the characters in
the figure at the left below form a single group, while
those at the right below form 2 groups which can be killed,
moved or copied independently of each other. A group can
extend beyond the bottom of the displayed portion of the
illustration if only the upper 36 lines are displayed, or
beyond the top if the lower 36 lines are displayed. Even if
not entirely displayed, the entire group can be killed,
moved or copied (it must be partially displayed though in
order to be selected).
XXXXXXX XXXXXXX
X X X X
X X X X X X X X
X X X X X X X X X X
X X X X X X X X
X X X X X
XXXXXXX XXXXXXX
The maximum size of a group of characters is dictated by the
variable MOST in the program, which is the dimension of the
LINE array. This is set to 1800 which allows structures of
up to 1800 non-blank characters (half of the page buffer),
but is easily changed if necessary. The structure is grown
in a square search pattern around the character pointed to,
so it is possible to kill, move or copy the center of a
group larger than 1800 characters leaving the excess intact.
Even though not all the structure can be processed as
indicated, the outline of such large structures will
sometimes be drawn correctly since outlining of the group is
based on a perimeter search made in the display buffer
starting at the upper left character in the LINE array.
Page 3
Beginning the Illustration
--------- --- ------------
The user can point to (lower and raise the stylus while
pointing at) one of the characters along the left, lower or
right margins, then position one or more copies of the
character on the illustration by pointing to the position or
positions at which it is to be placed. The position of the
stylus will be tracked using the character selected from the
menu. This tracking character will be inserted into the
illustration wherever the stylus is raised. If this
position was previously blank, the character will be written
on the screen. If instead this position already contains
some character other than that used for tracking, a
rectangle is drawn around the location and the screen will
be erased and the illustration corrected when the user next
makes a selection from the menu. In the latter case, the
tracking cursor temporarily becomes a rectangle while the
stylus points to the non-blank position.
A previously created illustration can be read in for
modification by pointing to the READ switch. When this
switch is selected, the tracking cursor changes to R, the
first character of the name of the switch, and the first (or
next if the READ switch has previously been selected) 60
lines of the file named INPUT.DAT on device number 1 will be
read and added to the non-blank portions of the currently
displayed illustration.
The tabulation character is handled properly when read from
the input file, and is converted to the appropriate number
of blanks.
Drawing Lines
------- -----
Lines can be extended from characters already in the
illustration by pointing to the LINE switch, then to the
non-blank character on the illustration which is to be
duplicated to form the line and to the location to which the
line is to be drawn. The tracking cursor changes to L when
the LINE switch is selected, and then temporarily to the
character to be duplicated, and rectangles are repeatedly
drawn around the origin, until the end of the line is
indicated. To aid in the drawing of straight lines, a line
drawn from the origin to the current stylus location is
substituted for the character cursor while the stylus is in
the same row or in the same column as the origin.
The illustration on the next page demonstrates the sequence
of operations by which a single X is duplicated to form a
box drawn from X's. Lines drawn with vector instructions
are indicated by minus signs, I's and plus signs.
Page 4
lower and raise move raised lower and raise
stylus pointing stylus stylus pointing
to origin to end of line
(A) (B) (C)
+-+
IXI X-------------- XXXXXXXXXXXXXXX
+-+
(D) (E) (F)
+-+
XXXXXXXXXXXXXIXI XXXXXXXXXXXXXXX XXXXXXXXXXXXXXX
+-+ I X
I X
I X
I X
I X
I X
I X
I X
(G) (H) (I)
XXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXX
X X X
X X X
X X X
X X X
X X X
X X X
+-+ X X
IXI --------------X XXXXXXXXXXXXXXX
+-+
(J) (K) (L)
XXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXX
X I X X X
X I X X X
X I X X X
X I X X X
X I X X X
X I X X X
+-+ X I X X X
IXIXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXX
+-+
Page 5
Erasing Characters or Groups of Characters
------- ---------- -- ------ -- ----------
The TRIM and KILL switches are used to delete portions of an
illustration. Removal of individual characters while in
TRIM mode is indicated in the display by enclosing these
characters in rectangles. The display will be corrected
when the next item selected from the menu is neither TRIM
nor KILL.
KILL mode is used to remove groups of characters which are
indicated by pointing to members of the groups. The deleted
groups are outlined in the display until the display is
corrected when an item other than TRIM or KILL is selected
from the menu. KILL mode can be used to delete branches of
a structure if these are first disconnected from the main
structure while in TRIM mode.
Selection of the WIPE switch blanks out the entire
illustration.
Moving and Copying Groups of Characters
------ --- ------- ------ -- ----------
The COPY and MOVE modes are controlled in a manner similar
to that used during LINE mode. Following selection of
either of the COPY or MOVE switches, the user points to a
character in the group to be moved or copied. This
character at which the stylus is initially raised becomes
the origin and is indicated by repeatedly drawing a
rectangle around it. The character at the origin is also
used as the tracking cursor until the stylus is lowered and
raised at the point to which the group of characters is to
be moved or at which it is to be copied. To aid in
horizontal or vertical moves or copies, a line drawn from
the origin to the current stylus location is substituted for
the character cursor while the stylus is in the same row or
in the same column as the origin.
In READ, LINE, MOVE, and COPY modes, characters already
displayed on the screen are not destroyed by the attempt to
copy or move other characters into the positions which they
occupy.
In a moved group or in a copy of a group, characters are
lost beyond the left, right, upper or lower margins of the
60 line illustration. When only 36 lines of the
illustration are being displayed, at least one line of the
moved group or copy must be displayed, but none of the
undisplayed portion is lost unless it is longer than 24
lines (60 lines total minus 36 lines displayed).
Page 6
Entering Text
-------- ----
The TTY mode allows the user to read lines of text from the
graphics terminal keyboard and to position such text in the
display, in a manner analogous to that used for LINE mode.
After selecting the TTY switch, the tracking cursor changes
to T. The user then specifies the justification of the
inserted text by pointing to the location at which it is to
be inserted. After lifting the stylus, the user selects the
second end of the line (which need not be horizontal or
vertical) along which the text is to be inserted. If the
second point is to the right of the first, the inserted text
will be plotted with the left character at the point first
indicated. If the second point is to the left of the first,
the inserted text will be plotted with the right character
at the point first indicated. When this second point has
been selected, the program will terminate tracking and wait
for the text (followed by a carriage return) to be typed.
Individual characters are discarded if the indicated
destination already contains a non-blank character or if
these characters are excess beyond that which would fill the
indicated space.
Storage and Retrieval of Illustrations
------- --- --------- -- -------------
The presently displayed illustration is written into a file
named OUTPU.DAT (unless this designation has been modified
by selecting the SWAP switch described below) when the SAVE
switch is selected. Storage of the illustration does not
alter its display. Several illustrations can be written out
into the file, but multiple copies of a single illustration
cannot be created unless it is modified in some way.
Selection of the SWAP switch causes the following operations
to be performed.
(A) The currently displayed illustration is written
into the output file if this illustration has
not already been written out since it was last
modified.
(B) The remainder of the input file, if any, is
copied into the output file.
(C) The input and output designations of the file
INPUT.DAT on unit 1 (initially stored in the
program as INAME and ITAPE) and of the file
OUTPU.DAT on unit 21 (JNAME and JTAPE) are
reversed.
(D) The present illustration is cleared, and the
first illustration from the former output file
(now the input file) is read and displayed.
Selection of the EXIT switch performs steps A and B above,
then terminates execution of the program.
Page 7
Necessary Hardware and its Routines
--------- -------- --- --- --------
TXTPAD is written in FORTRAN and is designed to be used with
a storage scope having a temporarily visible cursor feature
and a tablet and stylus. Routines to access this equipment
must be available. The file ARDMAC.MAC contains the
following entry points for use of this program on a PDP-10
computer with a ARDS graphic terminal.
CRTLTR letters the string given as its first argument at
the X and Y coordinates given as its 4th and 5th
arguments. The scope coordinates are assumed to
extend from 0 through 1023 in both directions. The
2nd and 3rd arguments are the sequence number of the
first and of the final characters to be plotted from
the string. For example, the statement
CALL CRTLTR('ABCDEF',2,5,512,512)
would plot the letters BCDE with the lower left
corner of the letter B at the center of the screen.
CRTOFF positions the beam of the crt tube at the X and Y
coordinates given as arguments.
CRTON draws a line from the present beam position (as
determined by the previous call to either CRTOFF or
CRTON) to the X and Y coordinates given as
arguments.
CRTSTR selects whether subsequent plotting will be stored
on the screen or be temporary. CRTSTR is called
with its single argument one for storage or zero for
temporary.
CRTWIP clears the screen of the terminal.
CRTXYZ returns as its 3 arguments the X, Y and Z
coordinates of the stylus position. The Z
coordinate is zero while the stylus is lowered to
the surface of the tablet, and is non-zero
otherwise.
author: Donald E. Barth
Chemistry Dept.
Harvard Univeristy
October, 1972