[0001] This invention relates to a text highlighting arrangement in a text processing system
and more particularly to an arrangement for the definition of a block of characters
for deletion, moving or copying.
[0002] Heretofore text processing machines included hardware and controls that enabled an
operator to highlight on a display screen a character or a block of characters in
the text stored in the machine. One or more selected functions may then be applied
to the character(s) within this block.
[0003] Typically, such functions include the delation, movement or copying of the highlighted
character(s) contained within the block. However, the controls limited the operator
to start the character highlighting definition by positioning a cursor at a starting
point nearest the start of the character or characters to be highlighted and subsequently
positioning the cursor to end the block definition at an end point nearest the end
of the identified characters. This restriction reduces the productivity of the operator
by placing an artificial constraint on the manner in which the operator defines the
character or block of characters to be highlighted.
[0004] In accordance with the present invention, a text highlighting arrangement is provided
for highlighting text stored in a text processing system, with the text to be highlighted
being bounded by characters identified by the operator. The arrangement includes a
text storage buffer for storing characters in a contextual array and a display screen
for displaying characters stored in the storage buffer in a spatial array. A display
control block is provided for highlighting a character or block of characters displayed
on the display bounded by a character identified by a start pointer and a character
appearing subsequent in the text and identified by an end pointer. A keystroke service
routine provides control instructions for determining which character(s) to bound
the text to be highlighted appears earliest and identifying this character with the
start pointer, and identifying the highlighting subsequently appearing character identified
by the operator with the end pointer.
[0005] In accordance with another feature of the present invention, a text storage buffer
control block defines first and second location pointers and a cursor pointer for
indicating individual characters in the text storage buffer. A display control block
is provided which defines a display cursor for indicating individual characters displayed
on the display. The operator determines the character to be indicated by the first
location pointer by highlighting the character with the display cursor on the display
screen. The operator subsequently determines the character to be indicated by the
second location pointer with the display cursor. A keystroke service routine provides
control instructions for highlighting characters between a start pointer and an end
pointer in both the text storage buffer and the display. The keystroke service routine
determines which character indicated by the first and second location pointers, respectively,
appears earliest in the text and identifies this point with the start pointer. The
keystroke service routine then identifies the latter character with an end pointer
and the display control block highlights the text bounded thereby.
[0006] A more complete understanding of the invention may be had by reference to the following
detailed description when taken in conjunction with the accompanying drawings, wherein
:
FIGURE 1 is a block diagram of various components in a text processing system in which
the present invention is employed;
FIGURE 2 is a block diagram of logic element components in the processor illustrated
in FIGURE 1;
FIGURE 3 is a logic flow chart of the block definition routine forming a portion of
the present invention;
FIGURE 4 is a logic flow chart for a cursor up or down motion routine forming a portion
of the present invention;
FIGURE 5 is a logic flow chart of a cursor movement routine for movement other than
up and down; and
FIGURE 6 is a logic flow chart of the highlight routine forming a portion of the present
invention.
[0007] Referring now to the drawings, wherein like reference characters designate like or
corresponding parts throughout several views, FIGURE 1 illustrates a text processing
10 which prepares hard or printed-copies of text entered by operator controlled keys
on the keyboard 12. The keyboard 12 drives a processor 14. The processor 14 is operably
interconnected to a visual display 16, a diskette drive 18 and a random access memory
20 by a memory bus 22. A system clock 23 is provided for timing functions within the
text processor system 10. Text is input to the system by an operator entering keystrokes
on the keyboard 12, which includes a conventional typewriter keyboard with additional
control keys. The text input by-the operator appears as a textual display on the display
screen 16 and the keystroke and instruction data is placedrdnto a memory for future
recovery in preparing hard copy.
[0008] One important control function in keyboard 12 is the definition or highlighting of
a character or a block or group of sequential characters in the text stored in memory
and displayed on display screen 16. Once a block of characters is defined, a number
of functions are available for performance on this block. For example, the character
or characters in the block may be deleted, moved to another part of the text in the
memory, or copied at another location in the text. The present invention permits the
operator to define the block by moving a cursor or other indication pointer either
forward or backward in the text. This allows the operator to define the block in whichever
direction is easiest, rather than placing an artificial constraint on the direction
of cursor motion as required in previous systems. The text processing machine 10 then
functions to highlight the character or characters within the block in preparation
for a further function.
[0009] Referring to FIGURE 2, the processor 14 is further detailed to show typical logic
hardware elements as found in such processors. The processor may be a commercially
available unit, such as from Intel Corporation and identified by the Number 8086.
Typically, the processor includes a control logic unit 30 which responds to interrupts
on a device bus 21 from the keyboard 12. The control logic unit 30 is also connected
to the data and address bus 34 interconnected to various other logic units of the
processor 14.
[0010] In response to a fetch instruction from the random access memory 20, the control
logic unit 30 generates control signals to other logic elements of the processor.
These control signals are interconnected to the various other elements by means of
a control line 36 which is illustrated directly connected to an arithmetic logic unit
38 and identified as a "control" line 36 to other elements of the processor. Synchronous
operation of the control unit 30 with other logic elements of the processor 14 is
achieved by means of clock pulses input to the processor from an external clock source
40. This instruction bus is also shown interconnected to other logic elements of the
processor detailed in FIGURE 2.
[0011] Data and instructions to be processed in the processor 14 are input through a bus
control logic unit 42. Data to be processed may also come from program input/output
control logic 44. The bus control logic 42 connects storage elements of the memory
20 and receives instructions for processing data received from the data input/output
control 44 or received from the random access memory 20. Thus, the input/output control
44 receives data from the keyboard 12 or the memory 20 while the bus control logic
42 receives instructions and/or.data from the same memory. Note that different storage
sections of the random access memory are identifiable for instruction storage and
data storage.
[0012] Device control information from the processor 14 is output through the program input/output
controller 44 over a data bus (48,49). Input data on the data bus (48,49) from the
keyboard 12 is processed internally through the processor by instructions on the bus
34 to the scratch register 52,. The arithmetic logic unit 38, in response to a control
signal on line 36 and in accordance with instructions received on the memory bus 22,
performs arithmetic computations which may be stored in temporary scratch registers
52. Various other transfers of data between the arithmetic logic unit 38 and other
logic elements of the processor are of course possible. Such additional transfers
may be to a status register 60, data pointer register 56 or a stack pointer register
58. Also in the data stream for these various logic elements by means of the bus 34
is a program counter 54.
[0013] A particular operating sequence for the processor 14 is determined by instructions
and data on the memory bu 22 and input data on the bi-directional bus (48,49). As
an example, in response to received instructions, the processor transfers data stored
in the scratch registers 52 to one of the registers 56, 58 or 60, Such operations
of processors as detailed in FIGURE 2 are considered to be well known and understood
by one of ordinary skill in the data processing field. A detailed description of each
operation of the processor of FIGURE 2 for the described invention would be useless
to an understanding of the invention as claimed.
[0014] With reference again to FIGURE 1; the operator keystrokes are displayed on display
screen 16 quite similar in nature to a conventional television receiver screen. This
screen either displays a full page of text, a partial page or, in some systems, only
a single line of text. The display not only provides a visual presentation to the
operator of the text being prepared but also provides prompting instructions for the
operator on how to interface with the machine.
[0015] The diskette drive 18 includes a magnetic disk for maintaining keystroke and instruction
data in a semi-permanent manner in association with the text storage buffer (TSB)
as a part to the random access memory 20 discussed hereinafter. Typically, parts of
a single page of text or a complete page of text in a document stored in the machine
10 is stored in the text storage buffer while the remaining document is stored in
the diskette drive.
[0016] The random access memory 20 represents a combination of electronic hardware and software
to perform a number of discrete functions within the text processing system 10. The
keystroke control service function 70 takes a keystroke from the keyboard 12 and determines
which of the keystroke service routines 72 is to be used to process the keystroke.
A routine may be found in keystroke service routines 72 to service every keystroke
on the keyboard 12. If the keystroke represents a typed character for insertion in
a text, a routine in keystroke service routines 72 will insert the keystroke in the
data stream within the text storage buffer (TSB) 74 for display and eventual hard
copy. Also within the keystroke service routines 72 are the block definition routine
76 and the highlight routine 100. These routines act to define a block of characters
and perform the desired highlighting function on that block. The text storage buffer
(TSB) 74 stores the text being displayed on the display screen 16. Routines are provided
for handling and updating the text stored therein within a TSB control block 75. A
display access method program 80 controls the formatting of text on the display screen
16 through display refresh buffer 82.
[0017] The text stored in the TSB 74 is in contextual array. In other words, the characters
and the controls that format the characters in the text are stored in sequential order
from the beginning to the end of the text. The information on display screen 16, in
turn, is displayed in a spatial array, i.e., each graphic to be displayed is displayed
at some spatial (X,Y) coordinate relative to the top left hand corner of the display
16. Therefore, to define a block of characters in both TSB 74 and on the display screen
16, a bi-directional character definition routine is stored as one of the keystroke
service routines. A routine is provided in memory 20 for converting the contextual
to the spatial for interaction between the TSB and the display to permit the bi-directional
character definition.
[0018] One portion of the TSB control block 75 comprises a set of pointers which identify
characters in the text stored in the TSB. The TSB manager 84 will be instructed by
a keystroke service routine to set the first location pointer to identify a preselected
character in the TSB. The TSB manager will also set the second location pointer to
a preselected character stored in the TSB upon direction by the keystroke service
routine. Whenever text is moved or altered within the text storage buffer, the location
pointers will always indicate the preselected characters as long as the characters
remain in the memory of the system 10. The location pointers will indicate the preselected
characters even if they have moved out of the TSB and into the diskette drive 18 for
storage. Typically, as noted above, the TSB will store a portion of or one entire
page of text in a given document stored within the machine 10. The remainder of the
document will be stored on magnetic disks in the diskette drive 18. The location pointers
will also indicate whether the preselected characters are on that page or stored in
the diskette drive. If stored in the diskette drive, the location pointers will indicate
whether these characters are on a prior or subsequent page.
[0019] The TSB control block 75 also includes a cursor pointer which identifies a character
stored in the TSB. A cursor key controlled display cursor identifies a character displayed
on display screen 16 perceived visually by the operator. The cursor pointer and display
cursor identify the identical character substantially continuously during the operation
of system 10. The only time at which the indicated characters may not correspond is
during an internal operation necessary to service an operator request, for example,
the display cursor roving across the line of text displayed. Between the time the
operator presses the cursor key and the time when the cursor moves on the display
screen, there will be a very short time when the location cursor is not equal to the'display
cursor because the routines have rot had time to execute.
[0020] With reference to FIGURE 3, the block definition routine 76 is represented by a series
of logic sequences. The operator will first press a delete, move or copy key on the
keyboard 12 as represented by sequence 90. The keystroke is transferred into the keystroke
service routines 72 (KSR) for processing in sequence 92. When the delete, move or
copy key is depressed, the position of the display cursor will identify the location
of the first location pointer LP1 to identify one end of the character or block of
characters to be enlighted. This function is represented by sequence 93. The operator
may, depending on the key depressed, then employ either of two modes of highlighting.
In one mode, the other end of the block of characters is determined by the location
of the display cursor at a given moment. In the second mode, the other end of the
block is defined by the second lcoation pointer, regardless of the position of the
display cursor.
[0021] The operator activates the "highlight to cursor" mode by depressing a suitable key
on the keyboard 12. If this mode is activated, the display cursor forms one boundary
of the block and the first location pointer is the other, regardless of the other
actions of the operator. This activation is represented as sequence 94. The operator
can also activate the "highlight between pointers" rode represented by a sequence
96. In this mode, the operator positions the display cursor to identify the character
which the operator desires to be identified by the second location pointer. The operator
inputs a keystroke and the second location pointer (LP2) thereafter represents that
character and defines the other end of the block of characters. Subsequently, the
display cursor may be moved throughout the text without shifting the boundaries of
the character block.
[0022] In general, the system 10 uses the "highlight to cursor" mode after the first end
of the block of characters has been identified and until the other end of the block
has been identified. After both ends have been identified, the system uses the "highlight
between pointers" mode until the function has been completed or cancelled.
[0023] Without consideration of the particular mode, the block definition routine 76 disables
any other highlights on the display screen 16, as represented by sequence 98. There
are spelling functions, spelling check functions and other functions which also employ
highlighting of the display screen. The deletion of the other highlighting avoids
confusion for the operator because the only thing the operator sees highlighted on
the display screen 16 is text to be deleted, moved or copied.
[0024] The block definition routine 76 then calls a highlight routine 100 (fig. 1), as represented
by sequence 102. The purpose of the highlight routine is to determine where the beginning
and end pointers of the block of text to be highlighted are to be located. This is
necessary as system 10 builds the highlighted text beginning at the top of the display
and moves downward in the text. However, in the highlight between pointers, the second
location pointer is the second one used in time, but not necessarily in the text.
The second pointer location may be prior to the first pointer location in the text,
at a corresponding location or be positioned after the first pointer location. In
the
*highlight to cursor"mode, the display cursor forming the final boundary on the block
may, in turn, be positioned before at or after the first location pointer in the text.
[0025] The "BUILD" routine, represented by sequence 99, will be called if necessary to change
the page or portion of a page stored in the TSB. Additional keystroke information
may be input in the text during highlighting as desired, as represented by sequences
101 and 103. The system 10 awaits the depression of an enter key by the operator to
determine the location of the location pointer or cursor pointer to fully define the
character or block of characters to be highlighted. This function is represented by
test 105 (fig. 6). If the highlight function is not active, the routine will disable
the display highlight, represented by sequence 106, and return the highlight routine
to the routine of FIGURE 3 at the return call.
[0026] If the highlighting is active, the routine will then determine whether the highlight
to cursor or highlight between pointers node has been selected by the operator. This
determination is represented by a test 108 (fig. 6). If the highlight between pointers
mode is selected, the routine will then determine if the first location pointer lies
beyond the second location pointer in the text as represented by test 110.
[0027] The internal registers of processor 14 maintain a start pointer (SP) and an end pointer
(EP) for entry into the display control block 86 (fig. 1) so that at the next energization
of the display access method program 80, the text display will be highlighted beginning
with the topmost boundary and moving downward in the text. The principle function
of highlight routine 100 is to determine which location pointer appears first in the
text and make this the start pointer. The other location then becomes the end pointer.
[0028] If test 110 (fig. 6) is answered yes, i.e., the first location pointer lies beyond
the second location pointer in the text, then the first location pointer is the end
pointer and the second location pointer is the start pointer, as indicated by sequence
112. If the test 110 is answered no, then the second location pointer is the end pointer
and the first location pointer is the start pointer as represented by sequence 114.
[0029] Once the starting point and ending point defining the boundary of the block is determined,
the highlighting may be enabled to appear on the display screen 16 in most cases.
However, while most characters stored in the TSB 74 occupy only one byte of information,
some characters, such as control instructions, contain more than one byte per character
on the display. To highlight a multiple byte character, the end pointer should indicate
the last byte of the sequence of bytes representing that character. However, the operator
can only position the display cursor or location pointer at the first byte of a multi-byte
character.
[0030] Each multi-byte character is introduced by a sequence byte, a class byte, a count
byte and a type byte. The sequence byte indicates the presence of a multi-byte character.
The class byte and type byte together tell the machine 10 what type of control is
represented by the multi-byte character.
[0031] For example, an instruction such as a format change or keyboard change may be be
directed by these bytes. The count byte, which is the second byte of the sequence,
indicates how long the sequence is, starting with and including the count byte.
[0032] The highlight routine 100 makes provisions for multi-byte character text controls.
The routine determines if the end point is on a text control, represented by test
116. If so, the end pointer is automatically positioned at the end of the text control
character by examining the count byte and moving the end pointer the appropriate number
of bytes as represented by sequence 117. After sequence 117, or if the end pointer
is not on a text control, the start pointer and end pointer are entered into the display
control block 86 and the text is highlighted on the display screen 16 as represented
by sequence 119.
[0033] If the "highlight to cursor" mode is elected, the test 108 will be answered yes.
In the "highlight to cursor" mode, the highlight routine becomes somewhat more complex
because the text stored in the TSB 74 is in a stream of continuous contextual characters
while the text displayed on display screen 16 is in a spatial (X,Y) coordonate format.
When the operator moves the display cursor up and down the text, the system 10 must
translate the motion in the spatial array on the display screen 16 to a contextual
array in the TSB 74. This translation is performed by a "MOVE" function. The "MOVE"
function permits the cursor pointer within the TSB 74 to indicate the identical character
as the display cursor.
[0034] The cursor pointer will be represented by a temporary pointer (TP) during the operation
in the "highlight to cursor" mode as represented by sequence 115. If the display cursor
is being moved up or down, test 118 will direct the routine, to call the "CONSP" routine
(convert spatial to contextual) as represented by sequence 120.
[0035] The updated display cursor will update the cursor pointer in the TSB 74 through the
"MOVE" function and the new location of the cursor pointer will form a temporary pointer
(TP) in sequence 121. When this is done, or if there is no cursor up or down motion,
the test 122 will determine whether the temporary pointer is beyond the first location
pointer. If so, the temporary pointer represents the start pointer and the first location
pointer represents the end pointer as represented by sequence 124. If the temporary
pointer is not beyond the first location pointer, the first location pointer forms
the start pointer and the temporary pointer forms the end pointer as represented by
sequence 126. The start and end pointers may then be entered into the display control
block 86 for display on the display screen 16 in a manner similar to the highlight
between pointer mode.
[0036] Referring to FIGURE 4, the cursor up or down motion routine is illustrated by a series
of sequences. Activation of the cursor up or down motion by the operator, represented
by sequence 130, is processed in the appropriate key stroke service routine represented
by sequence 132. The routine highlight is called, as indicated by sequence 134, which
provides the pointers for highlighting on the display. The "MOVE" routine is called,
represented by sequence 136, to update the display cursor and inform the system of
the desired location of the cursor pointer in the TSB 74. The routine sets the cursor
point in the TSB 74, as represented by sequence 138 before returning to the routine
of FIGURE 6, represented by sequence 140.
[0037] During cursor up or down motion, the display cursor informs the cursor pointer within
the TSB 74 of the proper location so that the cursor pointer is synchronous with the
display cursor. Referring to FIGURE 5, a routine for other cursor motion is provided
which is represented by a series of sequences. An operator may select a function on
keyboard 12 which directs the cursor to go to a particular page of text. The keystroke
of such a function is represented by sequence 152. The appropriate keystroke service
routine, represented as sequence 154 processes the input keystroke. Internal calculations
within the machine determine where the cursor pointer should be located in the TSB
74. Sequence 156 represents the motion of the cursor pointer within the TSB. It is
then necessary to update the display cursor with reference to the location of the
cursor pointer in the TSB 74. The function then calls the highlight routine, as represented
by sequence 158.
[0038] There are two paths that may be taken. If the new cursor pointer location is on the
same page of text stored in the TSB 74 but not displayed on display screen 16, the
sequence 160 will be answered no. The routine update will be called, as represented
by sequence 162, to update the display as it may be necessary to display different
portions of the same page as stored in the TSB 74. If the new location of the cursor
pointer is on a page prior to or subsequent to the present page stored in the TSB,
it will be necessary to move the cursor pointer and build the text within the TSB
74 as represented by sequence 164.
[0039] In summary, the block definition routine permits the operator to begin at either
end in defining a character or block of characters to be deleted, moved or copied.
This feature enhances the productivity of the operator by defining the block in whichever
direction is easiest, rather than placing an artificial constraint on the direction
of cursor movement. In addition, depending on the function, the system 10 will activate
either the "highlight to cursor" or "highlight between pointers" mode. The "highlight
to cursor" node highlights the characters between the initial point of the cursor
and the present position of the cursor, The "highlight between pointers" node permits
the cursor to be moved on the display screen without affecting the block after definition
of the block.
[0040] Although a single embodiment of the invention has been illustrated in the accompanying
drawings described in the foregoing detailed description, it will be understood that
the invention is not limited to the embodiment disclosed, but is capable of numerous
rearrangements, modifications and substitutions of parts and elements without departing
from the spirit of the invention.