ANSI X3.64 Standard

ANSI X3.64 Standard

The Ambassador uses the control-function code space defined by ANSI X3.64 "Additional Controls For Use With American National Standard Code for Information Interchange". The corresponding International Standard is ISO DP 6429. These Standards define a set of encoded functions to facilitate data interchange with two-dimensional imaging devices, including display and printer terminals.

ANSI X3.64 augments the set of control functions defined in ANSI X3.4 (ASCII) and ANSI X3.41. The types of controls defined by X3.64 include cursor functions, editing functions, formatting functions, specification/control of input areas, setting/interrogation of status, mode selections, etc. The code structure defined is similar to escape sequences, but permits the inclusion of numeric and selective parameters. The paragraphs below summarize aspects of the Standard that are important to understanding the Ambassador; the reader is referred to the Standard itself for more detail. Copies of the Standard may be ordered from the American National Standards Institute, 1430 Broadway, New York, New York 10018, (212) 354-3300.

Code Notation

For consistency with the Standard, codes are represented by column/row of the ASCII table; see Appendix, page A-2. For example, the code for the character "K" is written as 4/11 (which is also 4B hex).

Control Codes

The Ambassador recognizes and responds to only those ASCII control codes (0/0 to 1/15 inclusive) shown in the Appendix, Control Codes table.

Escape Sequences

One of these control codes, ESC (1/11) tells the terminal to look at the next code(s) and assemble an escape sequence. Valid escape sequences are of the form:

ESC I...I F

ESC is the introducer code 1/11.

I...I are intermediate codes in the range 2/0 (Sp) to 2/15 (/) inclusive (and are not used by the Ambassador).

F is the final code in the range 3/0 (0) to 7/14 (~) inclusive.

The terminal assembles the sequence and, if it is one of the sequences recognized by the terminal (see Appendix, Escape Sequences table), executes the control function called for by the sequence. Otherwise it ignores the entire sequence.

Control Sequences

If the code immediately following the ESC (1/11) code is a final code 5/11 ([), the terminal is told to assemble a control sequence. Valid control sequences are of the form:

CSI P...P I...I F

CSI is the two-code sequence 1/11 5/11 (ESC [)

P...P are parameter codes in the range 3/0 (0) to 3/15 (?) inclusive.

I...I are intermediate codes in the range 2/0 (Sp) to 2/15 (/) inclusive (and are not used by the Ambassador).

F is the final code in the range 4/0 (@) to 7/14 (~) inclusive.

The terminal assembles the sequence and, if it is one of the sequences recognized by the terminal (see Appendix, Control Sequences table), executes the control function called for by the sequence. Otherwise, it ignores the entire sequence.

Parameters

The parameter portion of a control sequence may represent one or more parameter values. Each parameter may consist of one or more codes in the range 3/0 (0) to 3/9 (9), inclusive (representing the parameter value in decimal). Parameters are separated from each other by a 3/11 (;) code. There are two types of parameters: numeric and selective. Numeric parameters are used to pass numeric values. Selective parameters are used to select entries from a specified list. The form of both types is the same.

Numeric Parameters

The value passed by a numeric parameter is its decimal value (using the codes 3/0 (0) through 3/9 (9)). The value relates as directly as possible to the function (e.g. line 12, column 56, move 34 columns, etc.). In each parameter, leading 3/0 (0) codes are not significant, and may be included or omitted. The maximum parameter value recognized by the Ambassador is 255.

Selective Parameters

The value passed by a selective parameter is also a decimal value, but specifies which entry (in a table of functions applicable to the control) is being called for. For example, the EL (Erase in Line) control permits the following parameter values: 0 (= from cursor to end), 1 (= from start to cursor), or 2 (= all of line).

Default Values

If a parameter is omitted, or consists only of 3/0 (0) codes, it is given a default value which is specified in the control description.

Private-Use Provisions

The Standard provides for the addition of non-standard control sequences (to add features not envisioned by the standard) in two ways:

  1. If the first code in the parameter string (of a control sequence) is 3/12 (<) to 3/15 (?) inclusive, then the entire parameter string is subject to private interpretation.

  2. If the final character (of a control sequence) is 7/0 (p) to 7/14 (~) inclusive, then the entire sequence is subject to private interpretation.

The Ambassador has used these provisions to add certain features to its control set. For users who wish to adhere rigidly to the Standard, these features are not necessary to operation of the terminal.