Skip to main content

D. VCD Commands

The server sends the VCD a string of command segments. These are of varying length, consisting of an op code and none or more parameters. The commands recognized by the VCD are as follows.

1. Display & Keyboard Control Commands​

  • ERASE (no parameters) — Erase display and reset cursor to 0, i.e., clear the local buffer.

  • BLANK (no parameters) — Disable display refresh (i.e., blank the screen but do not clear the local buffer).

  • UNBLANK (no parameters) — Enable display refresh.

  • LOCAL (no parameters) — Put VCD in local state. The result is to suspend command interpretation and unlock the keyboard.

  • SYNC (no parameters) — Used to synchronize reverse Break from server. SYNC (X'80') is placed in stream by server at same time that it sends an INS. VCD enters Control State, synchronizes INS with BREAK command (see the next chapter), and continues command interpretation.

2. Cursor Control Commands​

  • CURSOR P — Parameter: 16 bit integer P. Set cursor register to P, where 0 <= P <= M x N.

  • FIND c — Parameter: X'0001' followed by one character c. Move the cursor to point to an occurrence of the character c. Specifically, search backwards (toward lower addresses) from the current cursor position and take the first occurrence of c (i.e., the one with the largest address). If no occurrence is found, leave cursor at position 0.

  • SAVE (no parameters) — Save a copy of the current cursor address in local register S.

  • RESTORE (no parameters) — Replace cursor register contents by value S.

3. I/O Commands​

  • WRITE n, text — Parameters: 16 bit integer n, followed by n text bytes. Write n bytes of text into display buffer starting at current cursor position and advancing cursor by 1 for each byte (except NL character advances to beginning of next line). Here σ + n <= M x N.

  • READ n — Parameter: 16 bit integer n. Read n bytes starting at the cursor and advancing cursor by one for each byte (except NL advances cursor to beginning of next line). NL counts as one character. Send the text to the server as a response segment. Must have n + σ <= M x N.

  • SREAD (no parameters) — Read S - σ bytes starting from the current cursor position σ up to (but not including) the cursor address stored in register S. The cursor is left in position S as a result. Send the text to the server as a response segment.

  • AWRITE n, text — Parameters: 16 bit integer n, followed by n text bytes. Same as WRITE n, except characters are not stored in buffer if they have a lower cursor address than the value in S.

Applications of These Commands in URSA​

Here are some applications of these commands in URSA:

  1. One elementary URSA terminal operation reads the screen from position x up to (but not including) the current cursor position. This could be done with the sequence of VCD command segments:

    SAVE
    CURSOR x
    SREAD
  2. Another common operation in URSA is to remember the cursor, update specific information on the screen, and replace the cursor. This can be done by the following 8 + n byte sequence of command segments:

    SAVE
    CURSOR x
    WRITE n, text
    RESTORE
  3. In URSA, the area in which a user is to type his response is usually delimited on the left by a "Start Symbol" (graphic '[1]'). This is a historical remnant of the IBM 2260, which has only two hardware read operators: read the full screen, and read from the Start Manual Input Symbol ("SMI") to the cursor. The SMI read operation can be simulated easily on the VCD as follows:

    SAVE
    FIND '[1]'
    SREAD
  4. The Break (or Transmit) key on the VCD may serve the function of the INTerrupt key on a CCI console (or ENTer on an IBM 2260). URSA will often attempt to minimize network traffic by sending a sequence of commands (one message if allocation allows) like the following:

                                          -+
    CURSOR m |
    WRITE n, text | - URSA writes a request
    LOCAL |
    -+
    -+
    +- +-+ |_ User types response
    | _BREAK_ | |
  • -User Presses | TRANSMIT |key - - - + +- -+ -+ SAVE | CURSOR p - URSA reads response SREAD | -+


    At other times, URSA might send the sequence:

    ```text
    CURSOR m
    WRITE n,TEXT
    LOCAL
    READ 0

    and wait for the INS from the user pressing Break (or the response segment triggered by the zero-length read if he presses Transmit); then URSA will send the appropriate read command sequence.