Package COM.INFORMATIMAGO.COMMON-LISP.CESARUM.ECMA048

Nicknames: COM.INFORMATIMAGO.COMMON-LISP.CESARUM.ISO6429
    This package loads the ECMA-048 standard text and from
    this specifications can generate functions returning
    the control sequences defined in the standard.
    The user must call GENERATE-ALL-FUNCTIONS
    to get the code function defined in the current package (*package*).

    Note: ECMA-048 should be identical to ISO-6429.
    This package loads the Ecam-048 standard text and from it genrates
    functions returning the control sequences defined in the standard.
    Note: ECMA-048 should be the same as ISO-6429.


    Copyright Pascal J. Bourguignon 2004 - 2015

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version
    2 of the License, or (at your option) any later version.
   
*codes*
variable
Description of the ECMA-048 codes.
Initial value: (#S(CODE :REFERENCE 8.3.1 :NAME ACK :TITLE ACKNOWLEDGE :NOTATION (C0) :REPRESENTATION ...) #S(CODE :REFERENCE 8.3.2 :NAME APC :TITLE APPLICATION PROGRAM COMMAND :NOTATION (C1) :REPRESENTATION ...) #S(CODE :REFERENCE 8.3.3 :NAME BEL :TITLE BELL :NOTATION (C0) :REPRESENTATION ...) #S(CODE :REFERENCE 8.3.4 :NAME BPH :TITLE BREAK PERMITTED HERE :NOTATION (C1) :REPRESENTATION ...) #S(CODE :REFERENCE 8.3.5 :NAME BS :TITLE BACKSPACE :NOTATION (C0) :REPRESENTATION ...) #S(CODE :REFERENCE 8.3.6 :NAME CAN :TITLE CANCEL :NOTATION (C0) :REPRESENTATION ...) #S(CODE :REFERENCE 8.3.7 :NAME CBT :TITLE CURSOR BACKWARD TABULATION :NOTATION (PN) :REPRESENTATION ...) #S(CODE :REFERENCE 8.3.8 :NAME CCH :TITLE CANCEL CHARACTER :NOTATION (C1) :REPRESENTATION ...) #S(CODE :REFERENCE 8.3.9 :NAME CHA :TITLE CURSOR CHARACTER ABSOLUTE :NOTATION (PN) :REPRESENTATION ...) #S(CODE :REFERENCE 8.3.10 :NAME CHT :TITLE CURSOR FORWARD TABULATION :NOTATION (PN) :REPRESENTATION ...) ...)
(ack)
function
ACKNOWLEDGE

    ACK is transmitted by a receiver as an affirmative response
    to the sender. The use of ACK is defined in ISO 1745.
ack
constant
ACKNOWLEDGE
Initial value: 6
(apc)
function
APPLICATION PROGRAM COMMAND

    APC is used as the opening delimiter of a control string for
    application program use. The command string following may consist of
    bit combinations in the range 00/08 to 00/13 and 02/00 to 07/14. The
    control string is closed by the terminating delimiter STRING
    TERMINATOR (ST). The interpretation of the command string depends on
    the relevant application program.
apc
constant
APPLICATION PROGRAM COMMAND
Initial value: 159
(bel)
function
BELL

    BEL is used when there is a need to call for attention; it
    may control alarm or attention devices.
bel
constant
BELL
Initial value: 7
(bph)
function
BREAK PERMITTED HERE

    BPH is used to indicate a point where a line break may occur
    when text is formatted. BPH may occur between two graphic characters,
    either or both of which may be SPACE.
bph
constant
BREAK PERMITTED HERE
Initial value: 130
(bs)
function
BACKSPACE

    BS causes the active data position to be moved one character
    position in the data component in the direction opposite to that of
    the implicit movement. The direction of the implicit movement depends
    on the parameter value of SELECT IMPLICIT MOVEMENT DIRECTION (SIMD).
bs
constant
BACKSPACE
Initial value: 8
(can)
function
CANCEL

    CAN is used to indicate that the data preceding it in the
    data stream is in error. As a result, this data shall be ignored. The
    specific meaning of this control function shall be defined for each
    application and/or between sender and recipient.
can
constant
CANCEL
Initial value: 24
(cbt pn)
function
CURSOR BACKWARD TABULATION

    CBT causes the active presentation position to be moved to
    the character position corresponding to the n-th preceding character
    tabulation stop in the presentation component, according to the
    character path, where n equals the value of Pn.
(cch)
function
CANCEL CHARACTER

    CCH is used to indicate that both the preceding graphic
    character in the data stream, (represented by one or more bit
    combinations) including SPACE, and the control function CCH itself are
    to be ignored for further interpretation of the data stream. If the
    character preceding CCH in the data stream is a control function
    (represented by one or more bit combinations), the effect of CCH is
    not defined by this Standard.
cch
constant
CANCEL CHARACTER
Initial value: 148
(cha pn)
function
CURSOR CHARACTER ABSOLUTE

    CHA causes the active presentation position to be moved to
    character position n in the active line in the presentation component,
    where n equals the value of Pn.
(cht pn)
function
CURSOR FORWARD TABULATION

    CHT causes the active presentation position to be moved to
    the character position corresponding to the n-th following character
    tabulation stop in the presentation component, according to the
    character path, where n equals the value of Pn.
(cmd)
function
CODING METHOD DELIMITER

    CMD is used as the delimiter of a string of data coded
    according to Standard ECMA-35 and to switch to a general level of
    control. The use of CMD is not mandatory if the higher level protocol
    defines means of delimiting the string, for instance, by specifying
    the length of the string.
(cnl pn)
function
CURSOR NEXT LINE

    CNL causes  the active presentation  position to be  moved to
    the first  character position  of the n-th  following line  in the
    presentation component, where n equals the value of Pn.
code
structure
Description of an ECMA-048 code.
(code-default code)
function
The default value for the parameters of the ECMA-048 code.
(code-description code)
function
The description of the semantics of the ECMA-048 code.
(code-name code)
function
The name of the ECMA-048 code.
(code-notation code)
function
The symbolic notation of the ECMA-048 code parameters.
(code-reference code)
function
The section of the ECMA-048 standard where the code is specified.
(code-representation code)
function
The description of the ECMA-048 code representation (byte values).
(code-title code)
function
The title of the ECMA-048 code.
(cpl pn)
function
CURSOR PRECEDING LINE

    CPL causes the active presentation position to be moved to
    the first character position of the n-th preceding line in the
    presentation component, where n equals the value of Pn.
(cpr pn1 pn2)
function
ACTIVE POSITION REPORT

    If the DEVICE COMPONENT SELECT MODE (DCSM) is set to
    PRESENTATION, CPR is used to report the active presentation position
    of the sending device as residing in the presentation component at the
    n-th line position according to the line progression and at the m-th
    character position according to the character path, where n equals the
    value of Pn1 and m equals the value of Pn2. If the DEVICE COMPONENT
    SELECT MODE (DCSM) is set to DATA, CPR is used to report the active
    data position of the sending device as residing in the data component
    at the n-th line position according to the line progression and at the
    m-th character position according to the character progression, where
    n equals the value of Pn1 and m equals the value of Pn2. CPR may be
    solicited by a DEVICE STATUS REPORT (DSR) or be sent unsolicited.
(cr)
function
CARRIAGE RETURN

    The effect of CR depends on the setting of the DEVICE
    COMPONENT SELECT MODE (DCSM) and on the parameter value of SELECT
    IMPLICIT MOVEMENT DIRECTION (SIMD). If the DEVICE COMPONENT SELECT
    MODE (DCSM) is set to PRESENTATION and with the parameter value of
    SIMD equal to 0, CR causes the active presentation position to be
    moved to the line home position of the same line in the presentation
    component. The line home position is established by the parameter
    value of SET LINE HOME (SLH). With a parameter value of SIMD equal to
    1, CR causes the active presentation position to be moved to the line
    limit position of the same line in the presentation component. The
    line limit position is established by the parameter value of SET LINE
    LIMIT (SLL). If the DEVICE COMPONENT SELECT MODE (DCSM) is set to DATA
    and with a parameter value of SIMD equal to 0, CR causes the active
    data position to be moved to the line home position of the same line
    in the data component. The line home position is established by the
    parameter value of SET LINE HOME (SLH). With a parameter value of SIMD
    equal to 1, CR causes the active data position to be moved to the line
    limit position of the same line in the data component. The line limit
    position is established by the parameter value of SET LINE LIMIT
    (SLL).
cr
constant
CARRIAGE RETURN
Initial value: 13
(csi)
function
CONTROL SEQUENCE INTRODUCER

    CSI is used as the first character of a control sequence, see 5.4.
csi
constant
CONTROL SEQUENCE INTRODUCER
Initial value: 155
(ctc &rest ps...)
function
CURSOR TABULATION CONTROL

    CTC causes one or more tabulation stops to be set or cleared
    in the presentation component, depending on the parameter values:
(cub pn)
function
CURSOR LEFT

    CUB causes the active presentation position to be moved
    leftwards in the presentation component by n character positions if
    the character path is horizontal, or by n line positions if the
    character path is vertical, where n equals the value of Pn.
(cud pn)
function
CURSOR DOWN

    CUD causes the active presentation position to be moved
    downwards in the presentation component by n line positions if the
    character path is horizontal, or by n character positions if the
    character path is vertical, where n equals the value of Pn.
(cuf pn)
function
CURSOR RIGHT

    CUF causes the active presentation position to be moved
    rightwards in the presentation component by n character positions if
    the character path is horizontal, or by n line positions if the
    character path is vertical, where n equals the value of Pn.
(cup pn1 pn2)
function
CURSOR POSITION

    CUP causes the active presentation position to be moved in
    the presentation component to the n-th line position according to the
    line progression and to the m-th character position according to the
    character path, where n equals the value of Pn1 and m equals the value
    of Pn2.
(cuu pn)
function
CURSOR UP

    CUU causes the active presentation position to be moved
    upwards in the presentation component by n line positions if the
    character path is horizontal, or by n character positions if the
    character path is vertical, where n equals the value of Pn.
(cvt pn)
function
CURSOR LINE TABULATION

    CVT causes the active presentation position to be moved to
    the corresponding character position of the line corresponding to the
    n-th following line tabulation stop in the presentation component,
    where n equals the value of Pn.
(da ps)
function
DEVICE ATTRIBUTES

    With a parameter value not equal to 0, DA is used to identify
    the device which sends the DA. The parameter value is a device type
    identification code according to a register which is to be
    established. If the parameter value is 0, DA is used to request an
    identifying DA from a device.
(daq &rest ps...)
function
DEFINE AREA QUALIFICATION

    DAQ is used to indicate that the active presentation position
    in the presentation component is the first character position of a
    qualified area. The last character position of the qualified area is
    the character position in the presentation component immediately
    preceding the first character position of the following qualified
    area. The parameter value designates the type of qualified area:
(dc1)
function
DEVICE CONTROL ONE

    DC1 is primarily intended for turning on or starting an
    ancillary device. If it is not required for this purpose, it may be
    used to restore a device to the basic mode of operation (see also DC2
    and DC3), or any other device control function not provided by other
    DCs.
dc1
constant
DEVICE CONTROL ONE
Initial value: 17
(dc2)
function
DEVICE CONTROL TWO

    DC2 is primarily intended for turning on or starting an
    ancillary device. If it is not required for this purpose, it may be
    used to set a device to a special mode of operation (in which case DC1
    is used to restore the device to the basic mode), or for any other
    device control function not provided by other DCs.
dc2
constant
DEVICE CONTROL TWO
Initial value: 18
(dc3)
function
DEVICE CONTROL THREE

    DC3 is primarily intended for turning off or stopping an
    ancillary device. This function may be a secondary level stop, for
    example wait, pause, stand-by or halt (in which case DC1 is used to
    restore normal operation). If it is not required for this purpose, it
    may be used for any other device control function not provided by
    other DCs.
dc3
constant
DEVICE CONTROL THREE
Initial value: 19
(dc4)
function
DEVICE CONTROL FOUR

    DC4 is primarily intended for turning off, stopping or
    interrupting an ancillary device. If it is not required for this
    purpose, it may be used for any other device control function not
    provided by other DCs.
dc4
constant
DEVICE CONTROL FOUR
Initial value: 20
(dch pn)
function
DELETE CHARACTER

    If the DEVICE COMPONENT SELECT MODE (DCSM) is set to
    PRESENTATION, DCH causes the contents of the active presentation
    position and, depending on the setting of the CHARACTER EDITING MODE
    (HEM), the contents of the n-1 preceding or following character
    positions to be removed from the presentation component, where n
    equals the value of Pn. The resulting gap is closed by shifting the
    contents of the adjacent character positions towards the active
    presentation position. At the other end of the shifted part, n
    character positions are put into the erased state. The extent of the
    shifted part is established by SELECT EDITING EXTENT (SEE). The effect
    of DCH on the start or end of a selected area, the start or end of a
    qualified area, or a tabulation stop in the shifted part is not
    defined by this Standard. If the DEVICE COMPONENT SELECT MODE (DCSM)
    is set to DATA, DCH causes the contents of the active data position
    and, depending on the setting of the CHARACTER EDITING MODE (HEM), the
    contents of the n-1 preceding or following character positions to be
    removed from the data component, where n equals the value of Pn. The
    resulting gap is closed by shifting the contents of the adjacent
    character positions towards the active data position. At the other end
    of the shifted part, n character positions are put into the erased
    state.
(dcs)
function
DEVICE CONTROL STRING

    DCS is used as the opening delimiter of a control string for
    device control use. The command string following may consist of
    bit combinations in the range 00/08 to 00/13 and 02/00 to
    07/14. The control string is closed by the terminating delimiter
    STRING TERMINATOR (ST). The command string represents either one
    or more commands for the receiving device, or one or more status
    reports from the sending device. The purpose and the format of the
    command string are specified by the most recent occurrence of
    IDENTIFY DEVICE CONTROL STRING (IDCS), if any, or depend on the
    sending and/or the receiving device.
dcs
constant
DEVICE CONTROL STRING
Initial value: 144

DEFINE-ALL-FUNCTIONS

DEFINE-CODE-FUNCTION

del
constant
 -- delete
Initial value: 127
(dl pn)
function
DELETE LINE

    If the DEVICE COMPONENT SELECT MODE (DCSM) is set to
    PRESENTATION, DL causes the contents of the active line (the line that
    contains the active presentation position) and, depending on the
    setting of the LINE EDITING MODE (VEM), the contents of the n-1
    preceding or following lines to be removed from the presentation
    component, where n equals the value of Pn. The resulting gap is closed
    by shifting the contents of a number of adjacent lines towards the
    active line. At the other end of the shifted part, n lines are put
    into the erased state. The active presentation position is moved to
    the line home position in the active line. The line home position is
    established by the parameter value of SET LINE HOME (SLH). If the
    TABULATION STOP MODE (TSM) is set to SINGLE, character tabulation
    stops are cleared in the lines that are put into the erased state. The
    extent of the shifted part is established by SELECT EDITING EXTENT
    (SEE). Any occurrences of the start or end of a selected area, the
    start or end of a qualified area, or a tabulation stop in the shifted
    part, are also shifted. If the DEVICE COMPONENT SELECT MODE (DCSM) is
    set to DATA, DL causes the contents of the active line (the line that
    contains the active data position) and, depending on the setting of
    the LINE EDITING MODE (VEM), the contents of the n-1 preceding or
    following lines to be removed from the data component, where n equals
    the value of Pn. The resulting gap is closed by shifting the contents
    of a number of adjacent lines towards the active line. At the other
    end of the shifted part, n lines are put into the erased state. The
    active data position is moved to the line home position in the active
    line. The line home position is established by the parameter value of
    SET LINE HOME (SLH).
(dle)
function
DATA LINK ESCAPE

    DLE is used exclusively to provide supplementary transmission
    control functions. The use of DLE is defined in ISO 1745.
dle
constant
DATA LINK ESCAPE
Initial value: 16
(dmi)
function
DISABLE MANUAL INPUT

    DMI causes the manual input facilities of a device to be disabled.
(dsr ps)
function
DEVICE STATUS REPORT

    DSR is used either to report the status of the sending device
    or to request a status report from the receiving device, depending on
    the parameter values:
(dta pn1 pn2)
function
DIMENSION TEXT AREA

    DTA is used to establish the dimensions of the text area for
    subsequent pages. The established dimensions remain in effect until
    the next occurrence of DTA in the data stream. Pn1 specifies the
    dimension in the direction perpendicular to the line orientation Pn2
    specifies the dimension in the direction parallel to the line
    orientation The unit in which the parameter value is expressed is that
    established by the parameter value of SELECT SIZE UNIT (SSU).
(ea ps)
function
ERASE IN AREA

    If the DEVICE COMPONENT SELECT MODE (DCSM) is set to
    PRESENTATION, EA causes some or all character positions in the active
    qualified area (the qualified area in the presentation component which
    contains the active presentation position) to be put into the erased
    state, depending on the parameter values:
(ech pn)
function
ERASE CHARACTER

    If the DEVICE COMPONENT SELECT MODE (DCSM) is set to
    PRESENTATION, ECH causes the active presentation position and the n-1
    following character positions in the presentation component to be put
    into the erased state, where n equals the value of Pn. If the DEVICE
    COMPONENT SELECT MODE (DCSM) is set to DATA, ECH causes the active
    data position and the n-1 following character positions in the data
    component to be put into the erased state, where n equals the value of
    Pn. Whether the character positions of protected areas are put into
    the erased state, or the character positions of unprotected areas
    only, depends on the setting of the ERASURE MODE (ERM).
(ed ps)
function
ERASE IN PAGE

    If the DEVICE COMPONENT SELECT MODE (DCSM) is set to
    PRESENTATION, ED causes some or all character positions of the active
    page (the page which contains the active presentation position in the
    presentation component) to be put into the erased state, depending on
    the parameter values:
(ef ps)
function
ERASE IN FIELD

    If the DEVICE COMPONENT SELECT MODE (DCSM) is set to
    PRESENTATION, EF causes some or all character positions of the active
    field (the field which contains the active presentation position in
    the presentation component) to be put into the erased state, depending
    on the parameter values:
(el ps)
function
ERASE IN LINE

    If the DEVICE COMPONENT SELECT MODE (DCSM) is set to
    PRESENTATION, EL causes some or all character positions of the active
    line (the line which contains the active presentation position in the
    presentation component) to be put into the erased state, depending on
    the parameter values:
(em)
function
END OF MEDIUM

    EM is used to identify the physical end of a medium, or the
    end of the used portion of a medium, or the end of the wanted portion
    of data recorded on a medium.
em
constant
END OF MEDIUM
Initial value: 25
(emi)
function
ENABLE MANUAL INPUT

    EMI is used to enable the manual input facilities of a device.
(enq)
function
ENQUIRY

    ENQ is transmitted by a sender as a request for a response
    from a receiver. The use of ENQ is defined in ISO 1745.
enq
constant
ENQUIRY
Initial value: 5
(eot)
function
END OF TRANSMISSION

    EOT is used to indicate the conclusion of the transmission of
    one or more texts. The use of EOT is defined in ISO 1745.
eot
constant
END OF TRANSMISSION
Initial value: 4
(epa)
function
END OF GUARDED AREA

    EPA is used to indicate that the active presentation position
    is the last of a string of character positions in the presentation
    component, the contents of which are protected against manual
    alteration, are guarded against transmission or transfer, depending on
    the setting of the GUARDED AREA TRANSFER MODE (GATM), and may be
    protected against erasure, depending on the setting of the ERASURE
    MODE (ERM). The beginning of this string is indicated by START OF
    GUARDED AREA (SPA).
epa
constant
END OF GUARDED AREA
Initial value: 151
(esa)
function
END OF SELECTED AREA

    ESA is used to indicate that the active presentation position
    is the last of a string of character positions in the presentation
    component, the contents of which are eligible to be transmitted in the
    form of a data stream or transferred to an auxiliary input/output
    device. The beginning of this string is indicated by START OF SELECTED
    AREA (SSA).
esa
constant
END OF SELECTED AREA
Initial value: 135
(esc)
function
ESCAPE

    ESC is used for code extension purposes. It causes the
    meanings of a limited number of bit combinations following it in the
    data stream to be changed. The use of ESC is defined in Standard
    ECMA-35.
esc
constant
ESCAPE
Initial value: 27
(etb)
function
END OF TRANSMISSION BLOCK

    ETB is used to indicate the end of a block of data where the
    data are divided into such blocks for transmission purposes. The use
    of ETB is defined in ISO 1745.
etb
constant
END OF TRANSMISSION BLOCK
Initial value: 23
(etx)
function
END OF TEXT

    ETX is used to indicate the end of a text. The use of ETX is
    defined in ISO 1745.
etx
constant
END OF TEXT
Initial value: 3
(ff)
function
FORM FEED

    FF causes the active presentation position to be moved to the
    corresponding character position of the line at the page home position
    of the next form or page in the presentation component. The page home
    position is established by the parameter value of SET PAGE HOME
    (SPH).
ff
constant
FORM FEED
Initial value: 12
(fnk pn)
function
FUNCTION KEY

    FNK is a control function in which the parameter value
    identifies the function key which has been operated.
(fnt ps1 ps2)
function
FONT SELECTION

    FNT is used to identify the character font to be selected as
    primary or alternative font by subsequent occurrences of SELECT
    GRAPHIC RENDITION (SGR) in the data stream. Ps
fs
constant
IS4 -- file separator
Initial value: 28
(gcc ps)
function
GRAPHIC CHARACTER COMBINATION

    GCC is used to indicate that two or more graphic characters
    are to be imaged as one single graphic symbol. GCC with a parameter
    value of
(generate-all-functions &key export 8-bit print result-type)
function

DO:             Generate the functions for each of the ECMA-048 codes:

                Defines and exports a function named as ,(CODE-NAME
                CODE) that takes as arguments ,(CODE-NOTATION CODE)
                and that returns a string or byte vector containing
                the control sequence.

                In addition, if the sequence contains only one constant
                byte, defines a constant of same name as the function equal
                to this byte, or this character if RESULT-TYPE is STRING.

CODE:           The code structure to be generated.

EXPORT:         Whether the generated function symbol must be exported.

8-BIT:          Whether the generated function
                must return 8-bit escape sequences or 7-bit escape sequences.

PRINT:          If NIL, then return the escape sequence
                else the function takes an optional last argument of type
                stream or T (which is the default) and writes the escape
                sequence to this stream, or *STANDARD-OUTPUT* for T.

RESULT-TYPE:    The type that the generated function must return:
                '(vector (unsigned-byte 8))  the default.
                'string  Note that it will be subject to encoding conversion!

BUGS:           Perhaps we should generate functions that take 8-BIT and
                RESULT-TYPE as arguments (or special variables) dynamically.

(generate-code-function code &key export 8-bit print result-type)
function

DO:             Defines and exports a function named as ,(CODE-NAME
                CODE) that takes as arguments ,(CODE-NOTATION CODE)
                and that returns a string or byte vector containing
                the control sequence.

                In addition, if the sequence contains only one constant
                byte, defines a constant of same name as the function equal
                to this byte, or this character if RESULT-TYPE is STRING.

CODE:           The code structure to be generated.

EXPORT:         Whether the generated function symbol must be exported.

8-BIT:          Whether the generated function
                must return 8-bit escape sequences or 7-bit escape sequences.

PRINT:          If NIL, then return the escape sequence
                else the function takes an optional last argument of type
                stream or T (which is the default) and writes the escape
                sequence to this stream, or *STANDARD-OUTPUT* for T.

RESULT-TYPE:    The type that the generated function must return:
                '(vector (unsigned-byte 8))  the default.
                'string  Note that it will be subject to encoding conversion!

BUGS:           Perhaps we should generate functions that take 8-BIT and
                RESULT-TYPE as arguments (or special variables) dynamically.

(generate-shell-function code &key 8-bit)
function

CODE:           The code structure to be generated.

8-BIT:          Whether the generated function
                must return 8-bit codes or 7-bit codes.

RETURN:         A string containing a shell function definition
                named as (CODE-NAME CODE) that
                takes as arguments (CODE-NOTATION CODE) and that
                returns a string containing the control sequence.

BUGS:           Perhaps we should generate functions that take 8-BIT and
                RESULT-TYPE as arguments (or special variables) dynamically.

gs
constant
IS3 -- group separator
Initial value: 29
(gsm pn1 pn2)
function
GRAPHIC SIZE MODIFICATION

    GSM is used to modify for subsequent text the height and/or
    the width of all primary and alternative fonts identified by FONT
    SELECTION (FNT) and established by GRAPHIC SIZE SELECTION (GSS). The
    established values remain in effect until the next occurrence of GSM
    or GSS in the data steam. Pn
(gss pn)
function
GRAPHIC SIZE SELECTION

    GSS is used to establish for subsequent text the height and
    the width of all primary and alternative fonts identified by FONT
    SELECTION (FNT). The established values remain in effect until the
    next occurrence of GSS in the data stream. Pn specifies the height,
    the width is implicitly defined by the height. The unit in which the
    parameter value is expressed is that established by the parameter
    value of SELECT SIZE UNIT (SSU).
hop
constant
 -- HIGH OCTET PRESET
Initial value: 129
(hpa pn)
function
CHARACTER POSITION ABSOLUTE

    HPA causes the active data position to be moved to character
    position n in the active line (the line in the data component that
    contains the active data position), where n equals the value of Pn.
(hpb pn)
function
CHARACTER POSITION BACKWARD

    HPB causes the active data position to be moved by n
    character positions in the data component in the direction opposite to
    that of the character progression, where n equals the value of Pn.
(hpr pn)
function
CHARACTER POSITION FORWARD

    HPR causes the active data position to be moved by n
    character positions in the data component in the direction of the
    character progression, where n equals the value of Pn.
(ht)
function
CHARACTER TABULATION

    HT causes the active presentation position to be moved to the
    following character tabulation stop in the presentation component. In
    addition, if that following character tabulation stop has been set by
    TABULATION ALIGN CENTRE (TAC), TABULATION ALIGN LEADING EDGE (TALE),
    TABULATION ALIGN TRAILING EDGE (TATE) or TABULATION CENTRED ON
    CHARACTER (TCC), HT indicates the beginning of a string of text which
    is to be positioned within a line according to the properties of that
    tabulation stop. The end of the string is indicated by the next
    occurrence of HT or CARRIAGE RETURN (CR) or NEXT LINE (NEL) in the
    data stream.
ht
constant
CHARACTER TABULATION
Initial value: 9
(htj)
function
CHARACTER TABULATION WITH JUSTIFICATION

    HTJ causes the contents of the active field (the field in the
    presentation component that contains the active presentation position)
    to be shifted forward so that it ends at the character position
    preceding the following character tabulation stop. The active
    presentation position is moved to that following character tabulation
    stop. The character positions which precede the beginning of the
    shifted string are put into the erased state.
htj
constant
CHARACTER TABULATION WITH JUSTIFICATION
Initial value: 137
(hts)
function
CHARACTER TABULATION SET

    HTS causes a character tabulation stop to be set at the
    active presentation position in the presentation component. The number
    of lines affected depends on the setting of the TABULATION STOP MODE
    (TSM).
hts
constant
CHARACTER TABULATION SET
Initial value: 136
(hvp pn1 pn2)
function
CHARACTER AND LINE POSITION

    HVP causes the active data position to be moved in the data
    component to the n-th line position according to the line progression
    and to the m-th character position according to the character
    progression, where n equals the value of Pn1 and m equals the value of
    Pn2.
(ich pn)
function
INSERT CHARACTER

    If the DEVICE COMPONENT SELECT MODE (DCSM) is set to
    PRESENTATION, ICH is used to prepare the insertion of n characters, by
    putting into the erased state the active presentation position and,
    depending on the setting of the CHARACTER EDITING MODE (HEM), the n-1
    preceding or following character positions in the presentation
    component, where n equals the value of Pn. The previous contents of
    the active presentation position and an adjacent string of character
    positions are shifted away from the active presentation position. The
    contents of n character positions at the other end of the shifted part
    are removed. The active presentation position is moved to the line
    home position in the active line. The line home position is
    established by the parameter value of SET LINE HOME (SLH). The extent
    of the shifted part is established by SELECT EDITING EXTENT (SEE). The
    effect of ICH on the start or end of a selected area, the start or end
    of a qualified area, or a tabulation stop in the shifted part, is not
    defined by this Standard. If the DEVICE COMPONENT SELECT MODE (DCSM)
    is set to DATA, ICH is used to prepare the insertion of n characters,
    by putting into the erased state the active data position and,
    depending on the setting of the CHARACTER EDITING MODE (HEM), the n-1
    preceding or following character positions in the data component,
    where n equals the value of Pn. The previous contents of the active
    data position and an adjacent string of character positions are
    shifted away from the active data position. The contents of n
    character positions at the other end of the shifted part are
    removed. The active data position is moved to the line home position
    in the active line. The line home position is established by the
    parameter value of SET LINE HOME (SLH).
(idcs ps)
function
IDENTIFY DEVICE CONTROL STRING

    IDCS is used to specify the purpose and format of the command
    string of subsequent DEVICE CONTROL STRINGs (DCS). The specified
    purpose and format remain in effect until the next occurrence of IDCS
    in the data stream. The parameter values are
(igs ps)
function
IDENTIFY GRAPHIC SUBREPERTOIRE

    IGS is used to indicate that a repertoire of the graphic
    characters of ISO/IEC 10367 is used in the subsequent text. The
    parameter value of IGS identifies a graphic character repertoire
    registered in accordance with ISO/IEC 7350.
(il pn)
function
INSERT LINE

    If the DEVICE COMPONENT SELECT MODE (DCSM) is set to
    PRESENTATION, IL is used to prepare the insertion of n lines, by
    putting into the erased state in the presentation component the active
    line (the line that contains the active presentation position) and,
    depending on the setting of the LINE EDITING MODE (VEM), the n-
ind
constant
 -- INDEX
Initial value: 132
(int)
function
INTERRUPT

    INT is used to indicate to the receiving device that the
    current process is to be interrupted and an agreed procedure is to be
    initiated. This control function is applicable to either direction of
    transmission.
(is1)
function
INFORMATION SEPARATOR ONE (US - UNIT SEPARATOR)

    IS1 is used to separate and qualify data logically; its
    specific meaning has to be defined for each application. If this
    control function is used in hierarchical order, it may delimit a data
    item called a unit, see
is1
constant
INFORMATION SEPARATOR ONE (US - UNIT SEPARATOR)
Initial value: 31
(is2)
function
INFORMATION SEPARATOR TWO (RS - RECORD SEPARATOR)

    IS2 is used to separate and qualify data logically; its
    specific meaning has to be defined for each application. If this
    control function is used in hierarchical order, it may delimit a data
    item called a record, see
is2
constant
INFORMATION SEPARATOR TWO (RS - RECORD SEPARATOR)
Initial value: 30
(is3)
function
INFORMATION SEPARATOR THREE (GS - GROUP SEPARATOR)

    IS3 is used to separate and qualify data logically; its
    specific meaning has to be defined for each application. If this
    control function is used in hierarchical order, it may delimit a data
    item called a group, see
is3
constant
INFORMATION SEPARATOR THREE (GS - GROUP SEPARATOR)
Initial value: 29
(is4)
function
INFORMATION SEPARATOR FOUR (FS - FILE SEPARATOR)

    IS4 is used to separate and qualify data logically; its
    specific meaning has to be defined for each application. If this
    control function is used in hierarchical order, it may delimit a data
    item called a file, see
is4
constant
INFORMATION SEPARATOR FOUR (FS - FILE SEPARATOR)
Initial value: 28
(jfy &rest ps...)
function
JUSTIFY

    JFY is used to indicate the beginning of a string of graphic
    characters in the presentation component that are to be justified
    according to the layout specified by the parameter values, see annex
    C:
(lf)
function
LINE FEED

    If the DEVICE COMPONENT SELECT MODE (DCSM) is set to
    PRESENTATION, LF causes the active presentation position to be moved
    to the corresponding character position of the following line in the
    presentation component. If the DEVICE COMPONENT SELECT MODE (DCSM) is
    set to DATA, LF causes the active data position to be moved to the
    corresponding character position of the following line in the data
    component.
lf
constant
LINE FEED
Initial value: 10
(ls0)
function
LOCKING-SHIFT ZERO

    LS0 is used for code extension purposes. It causes the
    meanings of the bit combinations following it in the data stream to be
    changed. The use of LS0 is defined in Standard ECMA-35.
ls0
constant
LOCKING-SHIFT ZERO
Initial value: 15
(ls1)
function
LOCKING-SHIFT ONE

    LS1 is used for code extension purposes. It causes the
    meanings of the bit combinations following it in the data stream to be
    changed. The use of LS1 is defined in Standard ECMA-35.
(ls2)
function
LOCKING-SHIFT TWO

    LS2R is used for code extension purposes. It causes the
    meanings of the bit combinations following it in the data stream to be
    changed. The use of LS2R is defined in Standard ECMA-35.
(ls3)
function
LOCKING-SHIFT THREE

    LS3R is used for code extension purposes. It causes the
    meanings of the bit combinations following it in the data stream to be
    changed. The use of LS3R is defined in Standard ECMA-35.
(mc ps)
function
MEDIA COPY

    MC is used either to initiate a transfer of data from or to
    an auxiliary input/output device or to enable or disable the relay of
    the received data stream to an auxiliary input/output device,
    depending on the parameter value:
(mw)
function
MESSAGE WAITING

    MW is used to set a message waiting indicator in the
    receiving device. An appropriate acknowledgement to the receipt of MW
    may be given by using DEVICE STATUS REPORT (DSR).
mw
constant
MESSAGE WAITING
Initial value: 149
(nak)
function
NEGATIVE ACKNOWLEDGE

    NAK is transmitted by a receiver as a negative response to
    the sender. The use of NAK is defined in ISO 1745.
nak
constant
NEGATIVE ACKNOWLEDGE
Initial value: 21
(nbh)
function
NO BREAK HERE

    NBH is used to indicate a point where a line break shall not
    occur when text is formatted. NBH may occur between two graphic
    characters either or both of which may be SPACE.
nbh
constant
NO BREAK HERE
Initial value: 131
(nel)
function
NEXT LINE

    The effect of NEL depends on the setting of the DEVICE
    COMPONENT SELECT MODE (DCSM) and on the parameter value of SELECT
    IMPLICIT MOVEMENT DIRECTION (SIMD). If the DEVICE COMPONENT SELECT
    MODE (DCSM) is set to PRESENTATION and with a parameter value of SIMD
    equal to 0, NEL causes the active presentation position to be moved to
    the line home position of the following line in the presentation
    component. The line home position is established by the parameter
    value of SET LINE HOME (SLH). With a parameter value of SIMD equal to
    1, NEL causes the active presentation position to be moved to the line
    limit position of the following line in the presentation
    component. The line limit position is established by the parameter
    value of SET LINE LIMIT (SLL). If the DEVICE COMPONENT SELECT MODE
    (DCSM) is set to DATA and with a parameter value of SIMD equal to 0,
    NEL causes the active data position to be moved to the line home
    position of the following line in the data component. The line home
    position is established by the parameter value of SET LINE HOME
    (SLH). With a parameter value of SIMD equal to 1, NEL causes the
    active data position to be moved to the line limit position of the
    following line in the data component. The line limit position is
    established by the parameter value of SET LINE LIMIT (SLL).
nel
constant
NEXT LINE
Initial value: 133
(np pn)
function
NEXT PAGE

    NP causes the n-th following page in the presentation
    component to be displayed, where n equals the value of Pn. The effect
    of this control function on the active presentation position is not
    defined by this Standard.
(nul)
function
NULL

    NUL is used for media-fill or time-fill. NUL characters may
    be inserted into, or removed from, a data stream without affecting the
    information content of that stream, but such action may affect the
    information layout and/or the control of equipment.
nul
constant
NULL
Initial value: 0
(osc)
function
OPERATING SYSTEM COMMAND

    OSC is used as the opening delimiter of a control string for
    operating system use. The command string following may consist of a
    sequence of bit combinations in the range 00/08 to 00/13 and 02/00 to
    07/14. The control string is closed by the terminating delimiter
    STRING TERMINATOR (ST). The interpretation of the command string
    depends on the relevant operating system.
osc
constant
OPERATING SYSTEM COMMAND
Initial value: 157
pad
constant
 -- PADDING CHARACTER
Initial value: 128
(pec ps)
function
PRESENTATION EXPAND OR CONTRACT

    PEC is used to establish the spacing and the extent of the
    graphic characters for subsequent text. The spacing is specified in
    the line as multiples of the spacing established by the most recent
    occurrence of SET CHARACTER SPACING (SCS) or of SELECT CHARACTER
    SPACING (SHS) or of SPACING INCREMENT (SPI) in the data stream. The
    extent of the characters is implicitly established by these control
    functions. The established spacing and the extent remain in effect
    until the next occurrence of PEC, of SCS, of SHS or of SPI in the data
    stream. The parameter values are
(pfs ps)
function
PAGE FORMAT SELECTION

    PFS is used to establish the available area for the imaging
    of pages of text based on paper size. The pages are introduced by the
    subsequent occurrence of FORM FEED (FF) in the data stream. The
    established image area remains in effect until the next occurrence of
    PFS in the data stream. The parameter values are (see also annex E):
(pld)
function
PARTIAL LINE FORWARD

    PLD causes the active presentation position to be moved in
    the presentation component to the corresponding position of an
    imaginary line with a partial offset in the direction of the line
    progression. This offset should be sufficient either to image
    following characters as subscripts until the first following
    occurrence of PARTIAL LINE BACKWARD (PLU) in the data stream, or, if
    preceding characters were imaged as superscripts, to restore imaging
    of following characters to the active line (the line that contains the
    active presentation position). Any interactions between PLD and format
    effectors other than PLU are not defined by this Standard.
pld
constant
PARTIAL LINE FORWARD
Initial value: 139
(plu)
function
PARTIAL LINE BACKWARD

    PLU causes the active presentation position to be moved in
    the presentation component to the corresponding position of an
    imaginary line with a partial offset in the direction opposite to that
    of the line progression. This offset should be sufficient either to
    image following characters as superscripts until the first following
    occurrence of PARTIAL LINE FORWARD (PLD) in the data stream, or, if
    preceding characters were imaged as subscripts, to restore imaging of
    following characters to the active line (the line that contains the
    active presentation position). Any interactions between PLU and format
    effectors other than PLD are not defined by this Standard.
plu
constant
PARTIAL LINE BACKWARD
Initial value: 140
(pm)
function
PRIVACY MESSAGE

    PM is used as the opening delimiter of a control string for
    privacy message use. The command string following may consist of a
    sequence of bit combinations in the range 00/08 to 00/13 and 02/00 to
    07/14. The control string is closed by the terminating delimiter
    STRING TERMINATOR (ST). The interpretation of the command string
    depends on the relevant privacy discipline.
pm
constant
PRIVACY MESSAGE
Initial value: 158
(pp pn)
function
PRECEDING PAGE

    PP causes the n-th preceding page in the presentation
    component to be displayed, where n equals the value of Pn. The effect
    of this control function on the active presentation position is not
    defined by this Standard.
(ppa pn)
function
PAGE POSITION ABSOLUTE

    PPA causes the active data position to be moved in the data
    component to the corresponding character position on the n-th page,
    where n equals the value of Pn.
(ppb pn)
function
PAGE POSITION BACKWARD

    PPB causes the active data position to be moved in the data
    component to the corresponding character position on the n-th
    preceding page, where n equals the value of Pn.
(ppr pn)
function
PAGE POSITION FORWARD

    PPR causes the active data position to be moved in the data
    component to the corresponding character position on the n-th
    following page, where n equals the value of Pn.
(print-documentation &key stream description sort-by)
function
Prints the documentation of the escape sequence functions generated.
(print-shell-functions &key stream)
function
Prints sh/bash functions to print the escape sequences.
(ptx ps)
function
PARALLEL TEXTS

    PTX is used to delimit strings of graphic characters that are
    communicated one after another in the data stream but that are
    intended to be presented in parallel with one another, usually in
    adjacent lines. The parameter values are
(pu1)
function
PRIVATE USE ONE

    PU1 is reserved for a function without standardized meaning
    for private use as required, subject to the prior agreement between
    the sender and the recipient of the data.
pu1
constant
PRIVATE USE ONE
Initial value: 145
(pu2)
function
PRIVATE USE TWO

    PU2 is reserved for a function without standardized meaning
    for private use as required, subject to the prior agreement between
    the sender and the recipient of the data.
pu2
constant
PRIVATE USE TWO
Initial value: 146
(quad &rest ps...)
function
QUAD

    QUAD is used to indicate the end of a string of graphic
    characters that are to be positioned on a single line according to the
    layout specified by the parameter values, see annex C:
(rep pn)
function
REPEAT

    REP is used to indicate that the preceding character in the
    data stream, if it is a graphic character (represented by one or more
    bit combinations) including SPACE, is to be repeated n times, where n
    equals the value of Pn. If the character preceding REP is a control
    function or part of a control function, the effect of REP is not
    defined by this Standard.
(ri)
function
REVERSE LINE FEED

    If the DEVICE COMPONENT SELECT MODE (DCSM) is set to
    PRESENTATION, RI causes the active presentation position to be moved
    in the presentation component to the corresponding character position
    of the preceding line. If the DEVICE COMPONENT SELECT MODE (DCSM) is
    set to DATA, RI causes the active data position to be moved in the
    data component to the corresponding character position of the
    preceding line.
ri
constant
REVERSE LINE FEED
Initial value: 141
(ris)
function
RESET TO INITIAL STATE

    RIS causes a device to be reset to its initial state,
    i.e. the state it has after it is made operational. This may imply, if
    applicable: clear tabulation stops, remove qualified areas, reset
    graphic rendition, put all character positions into the erased state,
    move the active presentation position to the first position of the
    first line in the presentation component, move the active data
    position to the first character position of the first line in the data
    component, set the modes into the reset state, etc.
(rm &rest ps...)
function
RESET MODE

    RM causes the modes of the receiving device to be reset as
    specified by the parameter values:
rs
constant
IS2 -- record separator
Initial value: 30
(sacs pn)
function
SET ADDITIONAL CHARACTER SEPARATION

    SACS is used to establish extra inter-character escapement
    for subsequent text. The established extra escapement remains in
    effect until the next occurrence of SACS or of SET REDUCED CHARACTER
    SEPARATION (SRCS) in the data stream or until it is reset to the
    default value by a subsequent occurrence of CARRIAGE RETURN/LINE FEED
    (CR LF) or of NEXT LINE (NEL) in the data stream, see annex C. Pn
    specifies the number of units by which the inter-character escapement
    is enlarged. The unit in which the parameter value is expressed is
    that established by the parameter value of SELECT SIZE UNIT (SSU).
(sapv &rest ps...)
function
SELECT ALTERNATIVE PRESENTATION VARIANTS

    SAPV is used to specify one or more variants for the
    presentation of subsequent text. The parameter values are
(sci)
function
SINGLE CHARACTER INTRODUCER

    SCI and the bit combination following it are used to
    represent a control function or a graphic character. The bit
    combination following SCI must be from 00/08 to 00/13 or 02/00 to
    07/14. The use of SCI is reserved for future standardization.
sci
constant
SINGLE CHARACTER INTRODUCER
Initial value: 154
(sco ps)
function
SELECT CHARACTER ORIENTATION

    SCO is used to establish the amount of rotation of the
    graphic characters following in the data stream. The established value
    remains in effect until the next occurrence of SCO in the data
    stream. The parameter values are 0 0? 1 45? 2 90? 3 135? 4 180? 5 225?
    6 270? 7 315? Rotation is positive, i.e. counter-clockwise and applies
    to the normal presentation of the graphic characters along the
    character path. The centre of rotation of the affected graphic
    characters is not defined by this Standard.
(scp ps1 ps2)
function
SELECT CHARACTER PATH

    SCP is used to select the character path, relative to the
    line orientation, for the active line (the line that contains the
    active presentation position) and subsequent lines in the presentation
    component. It is also used to update the content of the active line in
    the presentation component and the content of the active line (the
    line that contains the active data position) in the data
    component. This takes effect immediately. Ps1 specifies the character
    path: 1 left-to-right (in the case of horizontal line orientation), or
    top-to-bottom (in the case of vertical line orientation) 2
    right-to-left (in the case of horizontal line orientation), or
    bottom-to-top (in the case of vertical line orientation) Ps2 specifies
    the effect on the content of the presentation component and the
    content of the data component: 0 undefined (implementation-dependent)
(scs pn)
function
SET CHARACTER SPACING

    SCS is used to establish the character spacing for subsequent
    text. The established spacing remains in effect until the next
    occurrence of SCS, or of SELECT CHARACTER SPACING (SHS) or of SPACING
    INCREMENT (SPI) in the data stream, see annex C. Pn specifies the
    character spacing. The unit in which the parameter value is expressed
    is that established by the parameter value of SELECT SIZE UNIT (SSU).
(sd pn)
function
SCROLL DOWN

    SD causes the data in the presentation component to be moved
    by n line positions if the line orientation is horizontal, or by n
    character positions if the line orientation is vertical, such that the
    data appear to move down; where n equals the value of Pn. The active
    presentation position is not affected by this control function.
(sds ps)
function
START DIRECTED STRING

    SDS is used to establish in the data component the beginning
    and the end of a string of characters as well as the direction of the
    string. This direction may be different from that currently
    established. The indicated string follows the preceding text. The
    established character progression is not affected. The beginning of a
    directed string is indicated by SDS with a parameter value not equal
    to 0. A directed string may contain one or more nested strings. These
    nested strings may be directed strings the beginnings of which are
    indicated by SDS with a parameter value not equal to 0, or reversed
    strings the beginnings of which are indicated by START REVERSED STRING
    (SRS) with a parameter value of 1. Every beginning of such a string
    invokes the next deeper level of nesting. This Standard does not
    define the location of the active data position within any such nested
    string. The end of a directed string is indicated by SDS with a
    parameter value of 0. Every end of such a string re-establishes the
    next higher level of nesting (the one in effect prior to the string
    just ended). The direction is re-established to that in effect prior
    to the string just ended. The active data position is moved to the
    character position following the characters of the string just
    ended. The parameter values are: 0 end of a directed string;
    re-establish the previous direction 1 start of a directed string;
    establish the direction left-to-right 2 start of a directed string;
    establish the direction right-to-left
(see ps)
function
SELECT EDITING EXTENT

    SEE is used to establish the editing extent for subsequent
    character or line insertion or deletion. The established extent
    remains in effect until the next occurrence of SEE in the data
    stream. The editing extent depends on the parameter value: 0 the
    shifted part is limited to the active page in the presentation
    component 1 the shifted part is limited to the active line in the
    presentation component 2 the shifted part is limited to the active
    field in the presentation component 3 the shifted part is limited to
    the active qualified area 4 the shifted part consists of the relevant
    part of the entire presentation component.
(sef ps1 ps2)
function
SHEET EJECT AND FEED

    SEF causes a sheet of paper to be ejected from a printing
    device into a specified output stacker and another sheet to be loaded
    into the printing device from a specified paper bin. Parameter values
    of Ps1 are: 0 eject sheet, no new sheet loaded 1 eject sheet and load
    another from bin 1 2 eject sheet and load another from bin 2 . . . n
    eject sheet and load another from bin n Parameter values of Ps2 are: 0
    eject sheet, no stacker specified 1 eject sheet into stacker 1 2 eject
    sheet into stacker 2 . . . n eject sheet into stacker n
sgci
constant
 -- SINGLE GRAPHIC CHARACTER INTRODUCER
Initial value: 153
(sgr &rest ps...)
function
SELECT GRAPHIC RENDITION

    SGR is used to establish one or more graphic rendition
    aspects for subsequent text. The established aspects remain in effect
    until the next occurrence of SGR in the data stream, depending on the
    setting of the GRAPHIC RENDITION COMBINATION MODE (GRCM). Each graphic
    rendition aspect is specified by a parameter value: 0 default
    rendition (implementation-defined), cancels the effect of any
    preceding occurrence of SGR in the data stream regardless of the
    setting of the GRAPHIC RENDITION COMBINATION MODE (GRCM) 1 bold or
    increased intensity 2 faint, decreased intensity or second colour 3
    italicized 4 singly underlined 5 slowly blinking (less then 150 per
    minute) 6 rapidly blinking (150 per minute or more) 7 negative image 8
    concealed characters 9 crossed-out (characters still legible but
    marked as to be deleted) 10 primary (default) font 11 first
    alternative font 12 second alternative font 13 third alternative font
    14 fourth alternative font 15 fifth alternative font 16 sixth
    alternative font 17 seventh alternative font 18 eighth alternative
    font 19 ninth alternative font 20 Fraktur (Gothic) 21 doubly
    underlined 22 normal colour or normal intensity (neither bold nor
    faint) 23 not italicized, not fraktur 24 not underlined (neither
    singly nor doubly) 25 steady (not blinking) 26 (reserved for
    proportional spacing as specified in CCITT Recommendation T.61) 27
    positive image 28 revealed characters 29 not crossed out 30 black
    display 31 red display 32 green display 33 yellow display 34 blue
    display 35 magenta display 36 cyan display 37 white display 38
    (reserved for future standardization; intended for setting character
    foreground colour as specified in ISO 8613-6 [CCITT Recommendation
    T.416]) 39 default display colour (implementation-defined) 40 black
    background 41 red background 42 green background 43 yellow background
    44 blue background 45 magenta background 46 cyan background 47 white
    background 48 (reserved for future standardization; intended for
    setting character background colour as specified in ISO 8613-6 [CCITT
    Recommendation T.416]) 49 default background colour
    (implementation-defined) 50 (reserved for cancelling the effect of the
    rendering aspect established by parameter value 26) 51 framed 52
    encircled 53 overlined 54 not framed, not encircled 55 not overlined
    56 (reserved for future standardization) 57 (reserved for future
    standardization) 58 (reserved for future standardization) 59 (reserved
    for future standardization) 60 ideogram underline or right side line
    61 ideogram double underline or double line on the right side 62
    ideogram overline or left side line 63 ideogram double overline or
    double line on the left side 64 ideogram stress marking 65 cancels the
    effect of the rendition aspects established by parameter values 60 to
    64
(shs ps)
function
SELECT CHARACTER SPACING

    SHS is used to establish the character spacing for subsequent
    text. The established spacing remains in effect until the next
    occurrence of SHS or of SET CHARACTER SPACING (SCS) or of SPACING
    INCREMENT (SPI) in the data stream. The parameter values are 0 10
    characters per 25,4 mm 1 12 characters per 25,4 mm 2 15 characters per
    25,4 mm 3 6 characters per 25,4 mm 4 3 characters per 25,4 mm 5 9
    characters per 50,8 mm 6 4 characters per 25,4 mm
(si)
function
SHIFT-IN

    SI is used for code extension purposes. It causes the
    meanings of the bit combinations following it in the data stream to be
    changed. The use of SI is defined in Standard ECMA-35.
si
constant
SHIFT-IN
Initial value: 15
(simd ps)
function
SELECT IMPLICIT MOVEMENT DIRECTION

    SIMD is used to select the direction of implicit movement of
    the data position relative to the character progression. The direction
    selected remains in effect until the next occurrence of SIMD. The
    parameter values are: 0 the direction of implicit movement is the same
    as that of the character progression 1 the direction of implicit
    movement is opposite to that of the character progression.
(sl pn)
function
SCROLL LEFT

    SL causes the data in the presentation component to be moved
    by n character positions if the line orientation is horizontal, or by
    n line positions if the line orientation is vertical, such that the
    data appear to move to the left; where n equals the value of Pn. The
    active presentation position is not affected by this control
    function.
(slh pn)
function
SET LINE HOME

    SLH is used to establish at character position n in the
    active line (the line that contains the active presentation position)
    and lines of subsequent text in the presentation component the
    position to which the active presentation position will be moved by
    subsequent occurrences of CARRIAGE RETURN (CR), DELETE LINE (DL),
    INSERT LINE (IL) or NEXT LINE (NEL) in the data stream; where n equals
    the value of Pn. In the case of a device without data component, it is
    also the position ahead of which no implicit movement of the active
    presentation position shall occur. If the DEVICE COMPONENT SELECT MODE
    is set to DATA, SLH is used to establish at character position n in
    the active line (the line that contains the active data position) and
    lines of subsequent text in the data component the position to which
    the active data position will be moved by subsequent occurrences of
    CARRIAGE RETURN (CR), DELETE LINE (DL), INSERT LINE (IL) or NEXT LINE
    (NEL) in the data stream; where n equals the value of Pn. It is also
    the position ahead of which no implicit movement of the active data
    position shall occur. The established position is called the line home
    position and remains in effect until the next occurrence of SLH in the
    data stream.
(sll pn)
function
SET LINE LIMIT

    SLL is used to establish at character position n in the
    active line (the line that contains the active presentation position)
    and lines of subsequent text in the presentation component the
    position to which the active presentation position will be moved by
    subsequent occurrences of CARRIAGE RETURN (CR), or NEXT LINE (NEL) in
    the data stream if the parameter value of SELECT IMPLICIT MOVEMENT
    DIRECTION (SIMD) is equal to 1; where n equals the value of Pn. In the
    case of a device without data component, it is also the position
    beyond which no implicit movement of the active presentation position
    shall occur. If the DEVICE COMPONENT SELECT MODE is set to DATA, SLL
    is used to establish at character position n in the active line (the
    line that contains the active data position) and lines of subsequent
    text in the data component the position beyond which no implicit
    movement of the active data position shall occur. It is also the
    position in the data component to which the active data position will
    be moved by subsequent occurrences of CR or NEL in the data stream, if
    the parameter value of SELECT IMPLICIT MOVEMENT DIRECTION (SIMD) is
    equal to 1. The established position is called the line limit position
    and remains in effect until the next occurrence of SLL in the data
    stream.
(sls pn)
function
SET LINE SPACING

    SLS is used to establish the line spacing for subsequent
    text. The established spacing remains in effect until the next
    occurrence of SLS or of SELECT LINE SPACING (SVS) or of SPACING
    INCREMENT (SPI) in the data stream. Pn specifies the line spacing. The
    unit in which the parameter value is expressed is that established by
    the parameter value of SELECT SIZE UNIT (SSU).
(sm &rest ps...)
function
SET MODE

    SM causes the modes of the receiving device to be set as
    specified by the parameter values: 1 GUARDED AREA TRANSFER MODE (GATM)
    2 KEYBOARD ACTION MODE (KAM) 3 CONTROL REPRESENTATION MODE (CRM) 4
    INSERTION REPLACEMENT MODE (IRM) 5 STATUS REPORT TRANSFER MODE (SRTM)
    6 ERASURE MODE (ERM) 7 LINE EDITING MODE (VEM) 8 BI-DIRECTIONAL
    SUPPORT MODE (BDSM) 9 DEVICE COMPONENT SELECT MODE (DCSM) 10 CHARACTER
    EDITING MODE (HEM) 11 POSITIONING UNIT MODE (PUM) (see F.4.1 in annex
(so)
function
SHIFT-OUT

    SO is used for code extension purposes. It causes the
    meanings of the bit combinations following it in the data stream to be
    changed. The use of SO is defined in Standard ECMA-35.
so
constant
SHIFT-OUT
Initial value: 14
(soh)
function
START OF HEADING

    SOH is used to indicate the beginning of a heading. The use
    of SOH is defined in ISO 1745.
soh
constant
START OF HEADING
Initial value: 1
(sos)
function
START OF STRING

    SOS is used as the opening delimiter of a control string. The
    character string following may consist of any bit combination, except
    those representing SOS or STRING TERMINATOR (ST). The control string
    is closed by the terminating delimiter STRING TERMINATOR (ST). The
    interpretation of the character string depends on the application.
sos
constant
START OF STRING
Initial value: 152
(spa)
function
START OF GUARDED AREA

    SPA is used to indicate that the active presentation position is
    the first of a string of character positions in the presentation
    component, the contents of which are protected against manual
    alteration, are guarded against transmission or transfer, depending on
    the setting of the GUARDED AREA TRANSFER MODE (GATM) and may be
    protected against erasure, depending on the setting of the ERASURE
    MODE (ERM). The end of this string is indicated by END OF GUARDED AREA
    (EPA).
spa
constant
START OF GUARDED AREA
Initial value: 150
(spd ps1 ps2)
function
SELECT PRESENTATION DIRECTIONS

    SPD is used to select the line orientation, the line progression,
    and the character path in the presentation component. It is also used
    to update the content of the presentation component and the content of
    the data component. This takes effect immediately. Ps1 specifies the
    line orientation, the line progression and the character path: 0 line
    orientation: horizontal line progression: top-to-bottom character
    path: left-to-right 1 line orientation: vertical line progression:
    right-to-left character path: top-to-bottom 2 line orientation:
    vertical line progression: left-to-right character path: top-to-bottom
    3 line orientation: horizontal line progression: top-to-bottom
    character path: right-to-left 4 line orientation: vertical line
    progression: left-to-right character path: bottom-to-top 5 line
    orientation: horizontal line progression: bottom-to-top character
    path: right-to-left 6 line orientation: horizontal line progression:
    bottom-to-top character path: left-to-right 7 line orientation:
    vertical line progression: right-to-left character path: bottom-to-top
    Ps2 specifies the effect on the content of the presentation component
    and the content of the data component: 0 undefined
    (implementation-dependent)
(sph pn)
function
SET PAGE HOME

    SPH is used to establish at line position n in the active page
    (the page that contains the active presentation position) and
    subsequent pages in the presentation component the position to which
    the active presentation position will be moved by subsequent
    occurrences of FORM FEED (FF) in the data stream; where n equals the
    value of Pn. In the case of a device without data component, it is
    also the position ahead of which no implicit movement of the active
    presentation position shall occur. If the DEVICE COMPONENT SELECT MODE
    is set to DATA, SPH is used to establish at line position n in the
    active page (the page that contains the active data position) and
    subsequent pages in the data component the position to which the
    active data position will be moved by subsequent occurrences of FORM
    FEED (FF) in the data stream; where n equals the value of Pn. It is
    also the position ahead of which no implicit movement of the active
    presentation position shall occur. The established position is called
    the page home position and remains in effect until the next occurrence
    of SPH in the data stream.
(spi pn1 pn2)
function
SPACING INCREMENT

    SPI is used to establish the line spacing and the character
    spacing for subsequent text. The established line spacing remains in
    effect until the next occurrence of SPI or of SET LINE SPACING (SLS)
    or of SELECT LINE SPACING (SVS) in the data stream. The established
    character spacing remains in effect until the next occurrence of SET
    CHARACTER SPACING (SCS) or of SELECT CHARACTER SPACING (SHS) in the
    data stream, see annex C. Pn1 specifies the line spacing Pn2 specifies
    the character spacing The unit in which the parameter values are
    expressed is that established by the parameter value of SELECT SIZE
    UNIT (SSU).
(spl pn)
function
SET PAGE LIMIT

    SPL is used to establish at line position n in the active page
    (the page that contains the active presentation position) and pages of
    subsequent text in the presentation component the position beyond
    which the active presentation position can normally not be moved;
    where n equals the value of Pn. In the case of a device without data
    component, it is also the position beyond which no implicit movement
    of the active presentation position shall occur. If the DEVICE
    COMPONENT SELECT MODE is set to DATA, SPL is used to establish at line
    position n in the active page (the page that contains the active data
    position) and pages of subsequent text in the data component the
    position beyond which no implicit movement of the active data position
    shall occur. The established position is called the page limit
    position and remains in effect until the next occurrence of SPL in the
    data stream.
(spqr ps)
function
SELECT PRINT QUALITY AND RAPIDITY

    SPQR is used to select the relative print quality and the print
    speed for devices the output quality and speed of which are inversely
    related. The selected values remain in effect until the next
    occurrence of SPQR in the data stream. The parameter values are 0
    highest available print quality, low print speed 1 medium print
    quality, medium print speed 2 draft print quality, highest available
    print speed
(sr pn)
function
SCROLL RIGHT

    SR causes the data in the presentation component to be moved by n
    character positions if the line orientation is horizontal, or by n
    line positions if the line orientation is vertical, such that the data
    appear to move to the right; where n equals the value of Pn. The
    active presentation position is not affected by this control
    function.
(srcs pn)
function
SET REDUCED CHARACTER SEPARATION

    SRCS is used to establish reduced inter-character escapement for
    subsequent text. The established reduced escapement remains in effect
    until the next occurrence of SRCS or of SET ADDITIONAL CHARACTER
    SEPARATION (SACS) in the data stream or until it is reset to the
    default value by a subsequent occurrence of CARRIAGE RETURN/LINE FEED
    (CR/LF) or of NEXT LINE (NEL) in the data stream, see annex C. Pn
    specifies the number of units by which the inter-character escapement
    is reduced. The unit in which the parameter values are expressed is
    that established by the parameter value of SELECT SIZE UNIT (SSU).
(srs ps)
function
START REVERSED STRING

    SRS is used to establish in the data component the beginning and
    the end of a string of characters as well as the direction of the
    string. This direction is opposite to that currently established. The
    indicated string follows the preceding text. The established character
    progression is not affected. The beginning of a reversed string is
    indicated by SRS with a parameter value of 1. A reversed string may
    contain one or more nested strings. These nested strings may be
    reversed strings the beginnings of which are indicated by SRS with a
    parameter value of 1, or directed strings the beginnings of which are
    indicated by START DIRECTED STRING (SDS) with a parameter value not
    equal to 0. Every beginning of such a string invokes the next deeper
    level of nesting. This Standard does not define the location of the
    active data position within any such nested string. The end of a
    reversed string is indicated by SRS with a parameter value of 0. Every
    end of such a string re-establishes the next higher level of nesting
    (the one in effect prior to the string just ended). The direction is
    re-established to that in effect prior to the string just ended. The
    active data position is moved to the character position following the
    characters of the string just ended. The parameter values are: 0 end
    of a reversed string; re-establish the previous direction 1 beginning
    of a reversed string; reverse the direction.
(ss2)
function
SINGLE-SHIFT TWO

    SS2 is used for code extension purposes. It causes the meanings of
    the bit combinations following it in the data stream to be
    changed. The use of SS2 is defined in Standard ECMA-35.
ss2
constant
SINGLE-SHIFT TWO
Initial value: 142
(ss3)
function
SINGLE-SHIFT THREE

    SS3 is used for code extension purposes. It causes the meanings of
    the bit combinations following it in the data stream to be
    changed. The use of SS3 is defined in Standard ECMA-35.
ss3
constant
SINGLE-SHIFT THREE
Initial value: 143
(ssa)
function
START OF SELECTED AREA

    SSA is used to indicate that the active presentation position is
    the first of a string of character positions in the presentation
    component, the contents of which are eligible to be transmitted in the
    form of a data stream or transferred to an auxiliary input/output
    device. The end of this string is indicated by END OF SELECTED AREA
    (ESA). The string of characters actually transmitted or transferred
    depends on the setting of the GUARDED AREA TRANSFER MODE (GATM) and on
    any guarded areas established by DEFINE AREA QUALIFICATION (DAQ), or
    by START OF GUARDED AREA (SPA) and END OF GUARDED AREA (EPA).
ssa
constant
START OF SELECTED AREA
Initial value: 134
(ssu ps)
function
SELECT SIZE UNIT

    SSU is used to establish the unit in which the numeric parameters
    of certain control functions are expressed. The established unit
    remains in effect until the next occurrence of SSU in the data
    stream. The parameter values are 0 CHARACTER - The dimensions of this
    unit are device-dependent 1 MILLIMETRE 2 COMPUTER DECIPOINT - 0,035 28
    mm (1/720 of 25,4 mm) 3 DECIDIDOT - 0,037 59 mm (10/266 mm) 4 MIL -
    0,025 4 mm (1/1 000 of 25,4 mm) 5 BASIC MEASURING UNIT (BMU) - 0,021
    17 mm (1/1 200 of 25,4 mm) 6 MICROMETRE - 0,001 mm 7 PIXEL - The
    smallest increment that can be specified in a device 8 DECIPOINT -
    0,035 14 mm (35/996 mm)
(ssw pn)
function
SET SPACE WIDTH

    SSW is used to establish for subsequent text the character
    escapement associated with the character SPACE. The established
    escapement remains in effect until the next occurrence of SSW in the
    data stream or until it is reset to the default value by a subsequent
    occurrence of CARRIAGE RETURN/LINE FEED (CR/LF), CARRIAGE RETURN/FORM
    FEED (CR/FF), or of NEXT LINE (NEL) in the data stream, see annex
    C. Pn specifies the escapement. The unit in which the parameter value
    is expressed is that established by the parameter value of SELECT SIZE
    UNIT (SSU). The default character escapement of SPACE is specified by
    the most recent occurrence of SET CHARACTER SPACING (SCS) or of SELECT
    CHARACTER SPACING (SHS) or of SELECT SPACING INCREMENT (SPI) in the
    data stream if the current font has constant spacing, or is specified
    by the nominal width of the character SPACE in the current font if
    that font has proportional spacing.
(st)
function
STRING TERMINATOR

    ST is used as the closing delimiter of a control string opened by
    APPLICATION PROGRAM COMMAND (APC), DEVICE CONTROL STRING (DCS),
    OPERATING SYSTEM COMMAND (OSC), PRIVACY MESSAGE (PM), or START OF
    STRING (SOS).
st
constant
STRING TERMINATOR
Initial value: 156
(stab ps)
function
SELECTIVE TABULATION

    STAB causes subsequent text in the presentation component to be
    aligned according to the position and the properties of a tabulation
    stop which is selected from a list according to the value of the
    parameter Ps. The use of this control function and means of specifying
    a list of tabulation stops to be referenced by the control function
    are specified in other standards, for example ISO 8613-6.
(sts)
function
SET TRANSMIT STATE

    STS is used to establish the transmit state in the receiving
    device. In this state the transmission of data from the device is
    possible. The actual initiation of transmission of data is performed
    by a data communication or input/output interface control procedure
    which is outside the scope of this Standard. The transmit state is
    established either by STS appearing in the received data stream or by
    the operation of an appropriate key on a keyboard.
sts
constant
SET TRANSMIT STATE
Initial value: 147
(stx)
function
START OF TEXT

    STX is used to indicate the beginning of a text and the end of a
    heading. The use of STX is defined in ISO 1745.
stx
constant
START OF TEXT
Initial value: 2
(su pn)
function
SCROLL UP

    SU causes the data in the presentation component to be moved by n
    line positions if the line orientation is horizontal, or by n
    character positions if the line orientation is vertical, such that the
    data appear to move up; where n equals the value of Pn. The active
    presentation position is not affected by this control function.
(sub)
function
SUBSTITUTE

    SUB is used in the place of a character that has been found to be
    invalid or in error. SUB is intended to be introduced by automatic
    means.
sub
constant
SUBSTITUTE
Initial value: 26
(svs ps)
function
SELECT LINE SPACING

    SVS is used to establish the line spacing for subsequent text. The
    established spacing remains in effect until the next occurrence of SVS
    or of SET LINE SPACING (SLS) or of SPACING INCREMENT (SPI) in the data
    stream. The parameter values are: 0 6 lines per 25,4 mm 1 4 lines per
    25,4 mm 2 3 lines per 25,4 mm 3 12 lines per 25,4 mm 4 8 lines per
    25,4 mm 5 6 lines per 30,0 mm 6 4 lines per 30,0 mm 7 3 lines per 30,0
    mm 8 12 lines per 30,0 mm 9 2 lines per 25,4 mm
(syn)
function
SYNCHRONOUS IDLE

    SYN is used by a synchronous transmission system in the absence of
    any other character (idle condition) to provide a signal from which
    synchronism may be achieved or retained between data terminal
    equipment. The use of SYN is defined in ISO 1745.
syn
constant
SYNCHRONOUS IDLE
Initial value: 22
(tac pn)
function
TABULATION ALIGNED CENTRED

    TAC causes a character tabulation stop calling for centring to be
    set at character position n in the active line (the line that contains
    the active presentation position) and lines of subsequent text in the
    presentation component, where n equals the value of Pn. TAC causes the
    replacement of any tabulation stop previously set at that character
    position, but does not affect other tabulation stops. A text string
    centred upon a tabulation stop set by TAC will be positioned so that
    the (trailing edge of the) first graphic character and the (leading
    edge of the) last graphic character are at approximately equal
    distances from the tabulation stop.
(tale pn)
function
TABULATION ALIGNED LEADING EDGE

    TALE causes a character tabulation stop calling for leading edge
    alignment to be set at character position n in the active line (the
    line that contains the active presentation position) and lines of
    subsequent text in the presentation component, where n equals the
    value of Pn. TALE causes the replacement of any tabulation stop
    previously set at that character position, but does not affect other
    tabulation stops. A text string aligned with a tabulation stop set by
    TALE will be positioned so that the (leading edge of the) last graphic
    character of the string is placed at the tabulation stop.
(tate pn)
function
TABULATION ALIGNED TRAILING EDGE

    TATE causes a character tabulation stop calling for trailing edge
    alignment to be set at character position n in the active line (the
    line that contains the active presentation position) and lines of
    subsequent text in the presentation component, where n equals the
    value of Pn. TATE causes the replacement of any tabulation stop
    previously set at that character position, but does not affect other
    tabulation stops. A text string aligned with a tabulation stop set by
    TATE will be positioned so that the (trailing edge of the) first
    graphic character of the string is placed at the tabulation stop.
(tbc ps)
function
TABULATION CLEAR

    TBC causes one or more tabulation stops in the presentation
    component to be cleared, depending on the parameter value: 0 the
    character tabulation stop at the active presentation position is
    cleared 1 the line tabulation stop at the active line is cleared 2 all
    character tabulation stops in the active line are cleared 3 all
    character tabulation stops are cleared 4 all line tabulation stops are
    cleared 5 all tabulation stops are cleared In the case of parameter
    value 0 or 2 the number of lines affected depends on the setting of
    the TABULATION STOP MODE (TSM)
(tcc pn1 pn2)
function
TABULATION CENTRED ON CHARACTER

    TCC causes a character tabulation stop calling for alignment of a
    target graphic character to be set at character position n in the
    active line (the line that contains the active presentation position)
    and lines of subsequent text in the presentation component, where n
    equals the value of Pn1, and the target character about which centring
    is to be performed is specified by Pn2. TCC causes the replacement of
    any tabulation stop previously set at that character position, but
    does not affect other tabulation stops. The positioning of a text
    string aligned with a tabulation stop set by TCC will be determined by
    the first occurrence in the string of the target graphic character;
    that character will be centred upon the tabulation stop. If the target
    character does not occur within the string, then the trailing edge of
    the first character of the string will be positioned at the tabulation
    stop. The value of Pn2 indicates the code table position (binary
    value) of the target character in the currently invoked code. For a
    7-bit code, the permissible range of values is 32 to 127; for an 8-bit
    code, the permissible range of values is 32 to 127 and 160 to 255.
(tsr pn)
function
TABULATION STOP REMOVE

    TSR causes any character tabulation stop at character position n
    in the active line (the line that contains the active presentation
    position) and lines of subsequent text in the presentation component
    to be cleared, but does not affect other tabulation stops. n equals
    the value of Pn.
(tss pn)
function
THIN SPACE SPECIFICATION

    TSS is used to establish the width of a thin space for subsequent
    text. The established width remains in effect until the next
    occurrence of TSS in the data stream, see annex C. Pn specifies the
    width of the thin space. The unit in which the parameter value is
    expressed is that established by the parameter value of SELECT SIZE
    UNIT (SSU).
us
constant
IS1 -- unit separator
Initial value: 31
(vpa pn)
function
LINE POSITION ABSOLUTE

    VPA causes the active data position to be moved to line position n
    in the data component in a direction parallel to the line progression,
    where n equals the value of Pn.
(vpb pn)
function
LINE POSITION BACKWARD

    VPB causes the active data position to be moved by n line
    positions in the data component in a direction opposite to that of the
    line progression, where n equals the value of Pn.
(vpr pn)
function
LINE POSITION FORWARD

    VPR causes the active data position to be moved by n line
    positions in the data component in a direction parallel to the line
    progression, where n equals the value of Pn.
(vt)
function
LINE TABULATION

    VT causes the active presentation position to be moved in the
    presentation component to the corresponding character position on the
    line at which the following line tabulation stop is set.
vt
constant
LINE TABULATION
Initial value: 11
(vts)
function
LINE TABULATION SET

    VTS causes a line tabulation stop to be set at the active line
    (the line that contains the active presentation position).
vts
constant
LINE TABULATION SET
Initial value: 138