B. The Virtual Character Display
A VCD consists of the following virtual hardware (see Figure 1):
-
A rectangular display screen capable of displaying N lines of M characters.
-
A local buffer of M x N characters used to refresh the display.
-
A cursor register which addresses the characters in the buffer (and hence on the screen). This register controls the writing of text into the local buffer from either the keyboard or the server, and the reading of the local buffer by the server.
-
A keyboard containing text keys and control keys. Each text key enters a character into local buffer at the current cursor address and steps the cursor register by 1.
-
A communication interface through which the server CPU can send a stream of command segments to the VCD and receive a stream of response segments from the VCD. The command segments include control commands to the VCD and text to be written into the local buffer. Response segments contain status indicators and text read from the buffer. In addition, both VCD and server may send break signals.
The current address in the cursor register, an integer between 0 and M x N - 1, is displayed as a blitch, underscore, or other visual indication at the corresponding point on the screen; this indication is called the cursor. Position 0 is the upper left corner of the screen.
The screen is addressed in line ("row") order, and read and write operations by the server overflow automatically from one line to the next. The cursor register is not assumed to operate modulo M x N + σ. It is possible for a server command to set the cursor register to M x N, one position beyond the last screen position; however, the server should never set the register to an address beyond M x N, and it should not leave the cursor at M x N when the keyboard is unlocked.
The application program or conversational system using the VCD may format each display screen in a variety of ways, and may use a number of styles of interaction. One consequence is that the application program might have to look anywhere on the screen (i.e., in the local buffer) to find the input information it requires.
Mechanisms for Transmitting Information
We may consider three alternative mechanisms for transmitting information from the VCD to the serving CPU:
-
Mechanism 1 — Whenever the user presses a "Transmit" control key, the entire M x N characters in the buffer are transmitted to the server CPU.
-
Mechanism 2 — When the user presses "Transmit", the string of text between a "start" control character and the cursor is transmitted to the server.
-
Mechanism 3 — The server must send a read command segment to the VCD before the "Transmit" key will have an effect. The read command segment determines which parts of the buffer are to be transmitted to the server.
Mechanism 1 may be faulted as too costly in transmission time and channel capacity, while Mechanism 2 is too restrictive. The scheme which we propose here is based on Mechanism 3, which subsumes the other two.
VCD Control Keys
The VCD is assumed to include the following control keys:
-
Erase — Clears the display buffer to all blanks and resets the cursor to position 0 (the upper left corner of the screen).
-
Transmit — Locks the keyboard and places the VCD under control of the server CPU. Typically, the server will read specified areas of the screen and perhaps write out new data before unlocking the keyboard again.
-
Break — Has the same effect as Transmit, and in addition sends an interrupt message to the server CPU. The Break key always sends the interrupt, regardless of the state of the VCD.
-
Reset — May be used to unlock the VCD keyboard in case the server CPU fails to respond immediately and the user wishes to enter new or different information.
These may be called pure control keys, since they do not correspond to any text characters. The following control key does store a character into the display buffer:
- Newline — Enter a Newline (NL) character into the display buffer and reset the cursor to the beginning of the next line. If this character is encountered during a read or write operation, it is executed (i.e., the cursor is moved to the beginning of the next line) and the NL is counted as one character.
Finally, there are assumed to be keys for manually positioning the cursor to any address on the screen. Cursor positioning keys may include: cursor right, cursor up, cursor left (BS), cursor down (LF), and cursor return (CR). A tab (HT) mechanism could also be defined, although none is included here.