4. CODED REPRESENTATIONS

4.1. General

The set of additional control functions in this Standard consists of more than 32 control functions which can be coded in a C1 set.

Each control function belongs to one of the following cate- gories, depending on the method of representation:

  • Control functions which are elements of the C1 set;
  • Control functions represented by control sequences;
  • Control functions represented by ESC Fs sequences.

This Standard also defines a method of representations of control functions by means of control strings (see 4.6).

4.1.1. Control functions which are elements of the C1 set

As in ECMA-35 such a control function is represented:

  • in a 7-bit code by a 2-character escape sequence of the form ESC Fe, where Fe is a bit combination of column 4 or 53
  • in an 8-bit code by a bit combination of column 08 or 09).

This method of representation permits coding of up to 32 control functions. These bit combinations are defined in 4.2

4.1.2. Control functions represented by control sequences

A control sequence consists of the coded representation of CONTROL SEQUENCE INTRODUCER (CSI) followed by one or more bit combinations which identify the control function and, if applicable, represent the parameters of the control function. The control function CSI itself is an element of the C1 set.

The format of a control sequence is:

CSI P1 ... Pn I1 ... Im F

where:

  • CSI is represented by ESC 5/11 in a 7-bit code and by 09/11 in an 8-bit code (see 4.2).
  • P1 ... Pn are bit combinations of column 3 representing the parameter values; these bit combinations shall be omitted if the control function has no parameter, and may be omitted if the default parameter value is to apply.
  • I1 ... Im are bit combinations of column 2 which, together with the final bit combination F, identify the control function; these bit combinations shall be omitted if the control function is identified by the final bit combination F alone;

NOTE 1: The number of intermediate bit combinations is not limited by this Standard; in practice, at most one intermediate will be sufficient since over one thousand control functions may be identified using not more than one intermediate.

  • F is a bit combination of column 4, 5, 6 or 7 (except 7/15) which terminates the control sequence and, together with the intermediate bit combinations I1 ... Im, if present, identifies the control function (see 9).

The occurrence of any bit combinations which do not conform to the above format is an error condition for which recovery is not specified by this Standard.

The final bit combinations (either used alone or together with intermediates) are classified in two categories:

  • The control functions identified by final bit combinations of columns 4, 5 and 6 are either standardized or reserved for future standardization;
  • the control functions identified by final bit combinations of column 7 (except 7/15) are not standardized and are available for private or experimental use.

There are two types of parameters; numeric and selective (see 4.4). A numeric parameter represents a number; a selective parameter merely represents a character string, the meaning of which depends on the control function.

The final bit combinations of columns 4, 5 and 6 and the intermediate bit combinations are defined in 4.3.

4.1.3. Control functions represented by ESC Fs sequences

As in ECMA-35 the coded representations of these control functions in 7-bit and 8-bit codes are 2-character escape sequences of the form ESC Fs, where Fs is a bit combination from 6/0 to 7/14 (see 4.5). These control functions are not part of the C1 set.

4.2. Elements of the C1 Set

The following 25 control functions are the elements of the C1 set:

AbbreviationName
APCAPPLICATION PROGRAM COMMAND
CCHCANCEL CHARACTER
CSICONTROL SEQUENCE INTRODUCER
DESDEVICE CONTROL STRING
EPAEND OF PROTECTED AREA
ESAEND OF SELECTED AREA
HTJHORIZONTAL TABULATION WITH JUSTIFICATION
HTSHORIZONTAL TABULATION SET
INDINDEX
MWMESSAGE WAITING
NELNEXT LINE
OSGOPERATING SYSTEM COMMAND
PLDPARTIAL LINE DOWN
PLUPARTIAL LINE UP
PMPRIVACY MESSAGE
PU1PRIVATE USE 1
PU2PRIVATE USE 2
RIREVERSE INDEX
SPASTART OF PROTECTED AREA
SS2SINGLE SHIFT 2
SS3SINGLE SHIFT 3
SSASTART OF SELECTED AREA
STSTRING TERMINATOR
STSSET TRANSMIT STATE
VTSVERTICAL TABULATION SET

Their coded representations are defined by Table 1.

The definitions of the control functions are specified in 7.2.

If a control function is represented by a 2-character escape sequence (in a 7-bit code), the table specifies the bit combination of the final character by taking A=4 and B=5.

If a control function is represented by a single 8-bit combination the table specifies this bit combination by taking A=08 and B=09.

The open positions in the table are reserved for future standardization. They are not to be used for private or experimental codes.

Row NoColumn AColumn B
0DCS
1PU1
2PU2
3STS
4INDCCH
5NELMW
6SSASPA
7ESAEPA
8HTS
9HTJ
10VTS
11PLDCSI
12PLUST
13RIOSC
14SS2PM
15SS3APC

Table 1: ALLOCATION OF BIT COMBINATIONS TO THE CONTROL FUNCTIONS OF THE C1 SET.

The 3-character escape sequence designating this C1 set is ESC 2/2 F.

NOTE 2: The final character F of the designating 3-character escape sequence is not known at this moment; it is subject to registration procedures in accordance with International Standard ISO 2375.

4.3. Control Sequences

The 51 control functions listed below are represented by control sequences.

The definitions of the control functions are specified in 7.2. The final bit combinations of the control sequences are defined by Tables 2 and 3.

4.3.1. Control functions with numeric parameters

AbbreviationNameTable
CBTCURSOR BACKWARD TABULATION2
CHACURSOR HORIZONTAL ABSOLUTE2
CHTCURSOR HORIZONTAL TABULATION2
CNLCURSOR NEXT LINE2
CPLCURSOR PRECEDING LINE2
CPRCURSOR POSITION REPORT2
CUBCURSOR BACKWARD2
CUDCURSOR DOWN2
CUFCURSOR FORWARD2
CUPCURSOR POSITION2
CUUCURSOR UP2
CVTCURSOR VERTICAL TABULATION2
DADEVICE ATTRIBUTES2
DCHDELETE CHARACTER2
DLDELETE LINE2
ECHERASE CHARACTER2
FNTFONT SELECTION3
GSMGRAPHIC SIZE MODIFICATION3
GSSGRAPHIC SIZE SELECTION3
HPAHORIZONTAL POSITION ABSOLUTE2
HPRHORIZONTAL POSITION RELATIVE2
HVPHORIZONTAL AND VERTICAL POSITION2
ICHINSERT CHARACTER2
ILINSERT LINE2
NPNEXT PAGE2
PPPRECEDING PAGE2
REPREPEAT2
SDSCROLL DOWN2
SLSCROLL LEFT3
SPISPACING INCREMENT3
SRSCROLL RIGHT3
SUSCROLL UP2
TSSTHIN SPACE SPECIFICATION3
VPAVERTICAL POSITION ABSOLUTE2
VPRVERTICAL POSITION RELATIVE2

4.3.2. Control functions with selective parameters

AbbreviationNameTable
CTCCURSOR TABULATION CONTROL2
DAQDEFINE AREA QUALIFICATION2
DSRDEVICE STATUS REPORT2
EAERASE IN AREA2
EDERASE IN DISPLAY2
EFERASE IN FIELD2
ELERASE IN LINE2
JFYJUSTIFY3
MCMEDIA COPY2
QUADQUAD3
RMRESET MODE2
SEESELECT EDITING EXTENT2
SGRSELECT GRAPHIC RENDITION2
SMSET MODE2
SSUSELECT SIZE UNIT3
TBCTABULATION CLEAR2

Table 2 specifies the final bit combinations of the control sequences without intermediates.

Table 3 specifies the final bit combinations of the control sequences which contain bit combination 2/0 as the single intermediate.

The open positions in the tables, as well as all final bit combinations of columns 4, 5 and 6 which are used with other intermediates than one 2/0 only, are reserved for future standardization. All final bit combinations of column 7 except 7/15 (with or without intermediates) are available as final bit combinations for private or experimental use.

Row No.Column #4Column #5Column #6
0ICHDCHHPA
1CUUSEEHPR
2CUDCPRREP
3CUFSUDA
4CUBSDVPA
5CNLNPVPR
6CPLPPHVP
7CHACTCTBC
8CUPECHSM
9CHTCVTMC
10EDCBT
11EL
12ILRM
13DLSGR
14EFDSR
15EADAQ

Table 2: ALLOCATION OF FINAL BIT COMBINATIONS TO CONTROL SEQUENCES WITHOUT INTERMEDIATES.

Row No.Column #4Column #5Column #6
0SL
1SR
2GSM
3GSS
4FNT
5TSS
6JFY
7SPI
8QUAD
9SSU
10
11
12
13
14
15

Table 3: ALLOCATION OF FINAL BIT COMBINATIONS TO CONTROL SEQUENCES WITH 2/0 AS A SINGLE INTERMEDIATE.

4.4. Parameter Representations

A control sequence may contain a string of bit combinations P1 ... Pn representing one or more parameters to complete the specification of the control function.

The string of bit combinations P1 ... Pn contained in a control sequence is called the parameter string. It consists of bit combinations of column 3 and is interpreted as follows:

  • If the first bit combination of the parameter string is in the range 3/0 to 3/11, the parameter string is interpreted according to the format described below.
  • If the first bit combination of the parameter string is in the range 3/12 to 3/15, the parameter string is available for private or experimental use. Its format and meaning are not specified in this Standard.

4.4.1. Parameter string format

  • A parameter string consists of one or more parameter substrings, each of which represents a parameter value.
  • Each parameter sub-string consists of one or more bit combinations from 3/0 to 3/9, representing the decimal digits ZERO to NINE.
  • Parameter sub-strings are separated by one bit combination 3/11.
  • Bit combination 3/10 is reserved for future standardization as an additional parameter separator.
  • Bit combinations 3/12 to 3/15 shall not be used.
  • In each parameter sub-string, leading bit combinations 3/0 are not significant and may be omitted.
  • If the parameter string starts with the bit combination 3/11, an empty parameter sub-string is assumed preceding | the separator; if the parameter string terminates with the bit combination 3/11, an empty parameter sub-string is assumed following the separator; if the parameter string contains successive bit combinations 3/11, empty parameter sub-strings are assumed between the separators.
  • An empty parameter sub-string or a parameter sub-string which consists of bit combinations 3/0 only represents a default value which depends on the control function.

4.4.2. Types of parameters

There are two types of parameters: numeric parameters and selective parameters.

4.4.2.1. Numeric parameters

In a control sequence representing a control function with numeric parameters, each parameter sub-string corresponds to one parameter.

The number of parameters is fixed and depends on the control function. If the control function has more than one numeric parameter, and some (but not all) parameter sub-strings are omitted, the separators (bit combination 3/11) must still be present. Only if all parameter sub-strings are omitted, are the separators not required.

Each numeric parameter sub-string which contains at least one bit combination from 3/1 to 3/9 represents a number in decimal notation.

4.4.2.2. Selective parameters

In a control sequence representing a control function with a selective parameter, each parameter sub-string represents one value of the selective parameter. These values, whilst expressed by digits, are not quantitative. Each corresponds to one of the actions the control function can perform. Neither the maximum number of values nor the order in which the corresponding actions are performed are prescribed by this Standard. The effect of a sequence of values corresponding to conflicting actions depends on implementation.

A particular parameter value may have the same meaning as a combination of two or more separate values.

4.5. ESC Fs Sequences

The following four control functions are represented by ESC Fs sequences:

AbbreviationName
DMIDISABLE MANUAL INPUT
EMIENABLE MANUAL INPUT
INTINTERRUPT
RISRESET TO INITIAL STATE

The definitions of these control functions are specified in 7.2.

The coded representations are defined by Table 4 which specifies the final bit combinations of the 2-character escape sequences representing these control functions.

The open positions in the table are reserved for standardion of other control functions.

Row #Column #6Column #7
0DMI
1INT
2EMI
3RIS
4
5
6
7
8
9
10
11
12
13
14
15

Table 4: ALLOCATION OF FINAL BIT COMBINATIONS TO ESC Fs SEQUENCES.

4.6. Control Strings

A control string is a delimited string of characters which may occur in the data stream as a logical entity for control purposes. A control string consists of an opening delimiter, followed by a string of graphic characters and SPACEs (bit combinations 2/0 to 7/14 inclusive) and terminated by STRING TERMINATOR (ST). The occurrence of other bit combinations within a control string is an error condition for which recovery is not specified by this Standard (see 9).

The opening delimiter indicates the class of the component of the system which is the sender or recipient of the control string. The interpretation of the contents of the control string is not specified by this Standard, but instead requires prior agreement between the sender and the recipient of the data.

The classes of system components which can be specified by the appropriate opening delimiter are the device, the operating system control program, the privacy discipline, and the application program. The corresponding opening delimiters are:

  • DEVICE CONTROL STRING (DCS)
  • OPERATING SYSTEM COMMAND (OSC)
  • PRIVACY MESSAGE (PM)
  • APPLICATION PROGRAM COMMAND (APC)

Examples of applications of device control strings are:

  • program loading
  • configuration control
  • mode control
  • diagnostics

An example of the use of application program command string is the interjection of application program commands in a data stream or file being processed by the application program as data.