Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ref:cterm [2024/02/09 13:37] – checkpoint deuce | ref:cterm [2024/02/12 10:12] (current) – [DEC Private Mode Set (DECSET)] Add DECBKM deuce | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== CTerm ====== | ====== CTerm ====== | ||
- | CTerm is the ANSI parsing code maintained as part of ciolib (and used by SyncTERM). | + | CTerm is the ANSI parsing code maintained as part of ciolib (and used by SyncTERM). |
The text file is still the normative reference, but this may serve as a friendlier source. | The text file is still the normative reference, but this may serve as a friendlier source. | ||
Line 50: | Line 50: | ||
==== Supported DCS string values ==== | ==== Supported DCS string values ==== | ||
=== CTerm loadable font === | === CTerm loadable font === | ||
- | **Sequence: | + | **Sequence: |
Indicates the string is a loadable font. (CTerm 1.213) | Indicates the string is a loadable font. (CTerm 1.213) | ||
Line 56: | Line 56: | ||
=== Sixel Sequence === | === Sixel Sequence === | ||
- | **Sequence: | + | **Sequence: |
**Defaults: | **Defaults: | ||
Indicates the string is a sixel sequence. | Indicates the string is a sixel sequence. | ||
Line 85: | Line 85: | ||
=== Request Status String (DECRQSS) === | === Request Status String (DECRQSS) === | ||
- | **Sequence: | + | **Sequence: |
pt is the intermediate and/or final characters of a control function to query the status of. The terminal will send a response in the format '' | pt is the intermediate and/or final characters of a control function to query the status of. The terminal will send a response in the format '' | ||
Line 102: | Line 102: | ||
=== Define Macro (DECDMAC) === | === Define Macro (DECDMAC) === | ||
- | **Sequence: | + | **Sequence: |
**Defaults: | **Defaults: | ||
Sets a macro to be replayed using '' | Sets a macro to be replayed using '' | ||
Line 117: | Line 117: | ||
=== Palette Redefinition === | === Palette Redefinition === | ||
- | **Sequence: | + | **Sequence: |
Specifies one or more palette redefinitions. pX is the palette index, and pY is the colour definition | Specifies one or more palette redefinitions. pX is the palette index, and pY is the colour definition | ||
- | Color format: '' | + | Color format: '' |
==== Supported APS string values ==== | ==== Supported APS string values ==== | ||
Line 136: | Line 136: | ||
=== Set Font === | === Set Font === | ||
- | **Sequence: | + | **Sequence: |
Where Pn is a font slot number (max 255) and Ps is a filename in the cache. | Where Pn is a font slot number (max 255) and Ps is a filename in the cache. | ||
=== Draw PPM === | === Draw PPM === | ||
- | **Sequence: | + | **Sequence: |
Draws a PPM from the cache directory on the screen. Ps2 is the filename and is required. | Draws a PPM from the cache directory on the screen. Ps2 is the filename and is required. | ||
Line 161: | Line 161: | ||
=== Load PPM === | === Load PPM === | ||
- | **Sequence: | + | **Sequence: |
Loads a PPM to a buffer. | Loads a PPM to a buffer. | ||
| '' | | '' | ||
=== Load PBM === | === Load PBM === | ||
- | **Sequence: | + | **Sequence: |
Loads a PBM to a buffer. | Loads a PBM to a buffer. | ||
=== Copy === | === Copy === | ||
- | **Sequence: | + | **Sequence: |
Copies a portion of the screen into an internal buffer for use with the Paste function. | Copies a portion of the screen into an internal buffer for use with the Paste function. | ||
| '' | | '' | ||
Line 179: | Line 179: | ||
=== Paste === | === Paste === | ||
- | **Sequence: | + | **Sequence: |
Pastes from the copied buffer. | Pastes from the copied buffer. | ||
| '' | | '' | ||
Line 205: | Line 205: | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Moves text from the current position to the right edge '' | + | Moves text from the current position to the right edge '' |
==== Scroll Left (SL) ==== | ==== Scroll Left (SL) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Shifts the contents of the screen left Pn columns(s) with leftmost columns going off-screen and the resulting hole being filled with the current attribute. | + | Shifts the contents of the screen left Pn columns(s) with leftmost columns going off-screen and the resulting hole being filled with the current attribute. |
==== Cursor Up (CUU) ==== | ==== Cursor Up (CUU) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Moves the cursor position up Pn lines from the current position. Attempting to move past the screen boundaries stops the cursor at the screen boundary. | + | Moves the cursor position up Pn lines from the current position. Attempting to move past the screen boundaries stops the cursor at the screen boundary. |
==== Scroll Right (SR) ==== | ==== Scroll Right (SR) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Shifts the contents of the screen right Pn columns(s) with rightmost columns going off-screen and the resulting hole being filled with the current attribute. | + | Shifts the contents of the screen right Pn columns(s) with rightmost columns going off-screen and the resulting hole being filled with the current attribute. |
==== Cursor Down (CUD) ==== | ==== Cursor Down (CUD) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Moves the cursor position down Pn lines from the current position. Attempting to move past the screen boundaries stops the cursor at the screen boundary. | + | Moves the cursor position down Pn lines from the current position. Attempting to move past the screen boundaries stops the cursor at the screen boundary. |
==== Cursor Right (CUF) ==== | ==== Cursor Right (CUF) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Moves the cursor position right Pn columns from the current position. Attempting to move past the screen boundaries stops the cursor at the screen boundary. | + | Moves the cursor position right Pn columns from the current position. Attempting to move past the screen boundaries stops the cursor at the screen boundary. |
==== Cursor Left (CUB) ==== | ==== Cursor Left (CUB) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Moves the cursor position left Pn columns from the current position. Attempting to move past the screen boundaries stops the cursor at the screen boundary. | + | Moves the cursor position left Pn columns from the current position. Attempting to move past the screen boundaries stops the cursor at the screen boundary. |
==== Font Selection (FNT) ==== | ==== Font Selection (FNT) ==== | ||
Line 293: | Line 293: | ||
| 42 | Topaz (Amiga) | | | 42 | Topaz (Amiga) | | ||
- | Not all fonts are supported in all modes. | + | Not all fonts are supported in all modes. |
==== Cursor Next Line (CNL) ==== | ==== Cursor Next Line (CNL) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Moves the cursor to the first column of the line Pn down from the current position. Attempting to move past the screen boundaries stops the cursor at the screen boundary. | + | Moves the cursor to the first column of the line Pn down from the current position. Attempting to move past the screen boundaries stops the cursor at the screen boundary. |
==== Cursor Preceding Line (CPL) ==== | ==== Cursor Preceding Line (CPL) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Moves the cursor to the first column of the row Pn up from the current position. | + | Moves the cursor to the first column of the row Pn up from the current position. |
==== Cursor Character Absolute (CHA) ==== | ==== Cursor Character Absolute (CHA) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Movies the cursor to column Pn of the current row. ECMA-48 | + | Movies the cursor to column Pn of the current row. |
==== Cursor Position (CUP) ==== | ==== Cursor Position (CUP) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Moves the cursor to the Pn2th column of the Pn1th line. ECMA-48 | + | Moves the cursor to the Pn2th column of the Pn1th line. |
==== Cursor Forward Tabulation (CHT) ==== | ==== Cursor Forward Tabulation (CHT) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Move the cursor to the Pn-th next tab stop. Basically the same as sending TAB Pn times. | + | Move the cursor to the Pn-th next tab stop. Basically the same as sending TAB Pn times. |
==== Erase in Page (ED) ==== | ==== Erase in Page (ED) ==== | ||
Line 327: | Line 327: | ||
| 1 | Erase from the current position to the start of the screen. | | | 1 | Erase from the current position to the start of the screen. | | ||
| 2 | Erase entire screen. | | 2 | Erase entire screen. | ||
- | Erased characters are set to the current attribute. | + | Erased characters are set to the current attribute. |
==== Erase in Line (EL) ==== | ==== Erase in Line (EL) ==== | ||
Line 341: | Line 341: | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Inserts Pn lines at the current line position. | + | Inserts Pn lines at the current line position. |
==== Delete Line(s) / "ANSI Music" (DL) ==== | ==== Delete Line(s) / "ANSI Music" (DL) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Deletes the current line and the Pn - 1 lines after it scrolling the first non-deleted line up to the current line and filling the newly empty lines at the end of the screen with the current attribute. If the cursor is not currently inside the scrolling margins, has no effect. If " | + | Deletes the current line and the Pn - 1 lines after it scrolling the first non-deleted line up to the current line and filling the newly empty lines at the end of the screen with the current attribute. If the cursor is not currently inside the scrolling margins, has no effect. If " |
==== CTerm Set ANSI Music (CTSAM) ==== | ==== CTerm Set ANSI Music (CTSAM) ==== | ||
Line 358: | Line 358: | ||
==== BananaCom ANSI Music (BCAM) ==== | ==== BananaCom ANSI Music (BCAM) ==== | ||
**Sequence: | **Sequence: | ||
- | If " | + | If " |
==== Delete Character (DCH) ==== | ==== Delete Character (DCH) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Deletes the character at the current position by shifting all characters from the current column + p1 left to the current column. Opened blanks at the end of the line are filled with the current attribute. | + | Deletes the character at the current position by shifting all characters from the current column + p1 left to the current column. Opened blanks at the end of the line are filled with the current attribute. |
==== Scroll Up (SU) ==== | ==== Scroll Up (SU) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Scrolls the screen up Pn lines. | + | Scrolls the screen up Pn lines. |
==== XTerm Set or Request Graphics Attribute (XTSRGA) ==== | ==== XTerm Set or Request Graphics Attribute (XTSRGA) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | If Ps1 is 2, and Ps2 is 1, replies with the graphics screen information in the following format: '' | + | If Ps1 is 2, and Ps2 is 1, replies with the graphics screen information in the following format: '' |
==== Scroll Down (SD) ==== | ==== Scroll Down (SD) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Scrolls all text on the screen down Pn lines. | + | Scrolls all text on the screen down Pn lines. |
==== Erase Character (ECH) ==== | ==== Erase Character (ECH) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Erase p1 characters starting at the current character. | + | Erase p1 characters starting at the current character. |
==== Cursor Line Tabulation (CVT) ==== | ==== Cursor Line Tabulation (CVT) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Move the cursor to the Pn-th next tab stop. Basically the same as sending TAB Pn times. | + | Move the cursor to the Pn-th next tab stop. Basically the same as sending TAB Pn times. |
==== Cursor Backward Tabulation (CBT) ==== | ==== Cursor Backward Tabulation (CBT) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Move the cursor to the p1th preceding tab stop. Will not go past the start of the line. ECMA-48 | + | Move the cursor to the p1th preceding tab stop. Will not go past the start of the line. |
==== Character Position Absolute (HPA) ==== | ==== Character Position Absolute (HPA) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Move the cursor to the specified position on the current row. Will not go past the end of the line. ECMA-48 | + | Move the cursor to the specified position on the current row. Will not go past the end of the line. |
==== Cursor Position Forward (HPR) ==== | ==== Cursor Position Forward (HPR) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Moves the cursor position forward Pn columns from the current position. Attempting to move past the screen boundaries stops the cursor at the screen boundary. | + | Moves the cursor position forward Pn columns from the current position. Attempting to move past the screen boundaries stops the cursor at the screen boundary. |
==== Repeat (REP) ==== | ==== Repeat (REP) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Repeats the previous graphic character Pn times. | + | Repeats the previous graphic character Pn times. |
==== Device Attributes (DA) ==== | ==== Device Attributes (DA) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | If Ps is 0, CTerm will reply with the sequence: '' | + | If Ps is 0, CTerm will reply with the sequence: '' |
==== CTerm Device Attributes (CTDA) ==== | ==== CTerm Device Attributes (CTDA) ==== | ||
Line 432: | Line 432: | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Moves to row specified by Pn. ECMA-48 | + | Moves to row specified by Pn. |
==== Tab Stop Remove (TSR) ==== | ==== Tab Stop Remove (TSR) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Removes a tab stop at postion Pn. ECMA-48 | + | Removes a tab stop at postion Pn. |
==== Line Position Forward (VPR) ==== | ==== Line Position Forward (VPR) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Moves forward Pn rows. ECMA-48 | + | Moves forward Pn rows. |
==== Character and Line Position (HVP) ==== | ==== Character and Line Position (HVP) ==== | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Moves the cursor to the Pn2th column of the Pn1th line. ECMA-48 | + | Moves the cursor to the Pn2th column of the Pn1th line. |
==== Tabulation Clear (TBC) ==== | ==== Tabulation Clear (TBC) ==== | ||
Line 456: | Line 456: | ||
| 3 | Deletes all tab stops. | | | 3 | Deletes all tab stops. | | ||
| 5 | Deletes all tab stops. | | | 5 | Deletes all tab stops. | | ||
- | ECMA-48 | ||
==== Enable DoorWay Mode (BCST) / CTerm Set (CTSET) ==== | ==== Enable DoorWay Mode (BCST) / CTerm Set (CTSET) ==== | ||
Line 480: | Line 479: | ||
| 34 | | 34 | ||
| 35 | | 35 | ||
+ | | 67 | DECBKM | ||
| 69 | | 69 | ||
| 80 | | 80 | ||
| 1000 | | 1000 | ||
- | | 1002 | + | | 1002 |
| 1003 | | 1003 | ||
| 1006 | | 1006 | ||
Line 491: | Line 491: | ||
**Sequence: | **Sequence: | ||
**Defaults: | **Defaults: | ||
- | Moves the cursor position left Pn columns from the current position. Attempting to move past the screen boundaries stops the cursor at the screen boundary. | + | Moves the cursor position left Pn columns from the current position. Attempting to move past the screen boundaries stops the cursor at the screen boundary. |
==== Line Position Backward (VPB) ==== | ==== Line Position Backward (VPB) ==== | ||
Line 504: | Line 504: | ||
| 4 | Disable Last Column Flag mode (CTDLCF) | | | 4 | Disable Last Column Flag mode (CTDLCF) | | ||
| 255 | Disable DoorWay Mode (BDDRWY) | | | 255 | Disable DoorWay Mode (BDDRWY) | | ||
+ | |||
+ | ==== DEC Private Mode Reset (DECRST) ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | Resets one or more mode. The following modes are supported: | ||
+ | ^ Value ^ Mnemonic ^ Default ^ Description ^ | ||
+ | | 6 | DECOM | reset | Origin Mode. With this mode reset, position parameters are relative to the top left of the screen, not the scrolling region. | | ||
+ | | 7 | DECAWM | ||
+ | | 9 | | reset | Disable X10 compatible mouse reporting. | | ||
+ | | 25 | ||
+ | | 31 | ||
+ | | 32 | ||
+ | | 33 | ||
+ | | 34 | ||
+ | | 35 | ||
+ | | 69 | ||
+ | | 80 | ||
+ | | 1000 | ||
+ | | 1001 | ||
+ | | 1002 | ||
+ | | 1003 | ||
+ | | 1004 | ||
+ | | 1005 | ||
+ | | 1006 | ||
+ | | 1007 | ||
+ | | 1015 | ||
+ | | 2004 | ||
+ | |||
+ | ==== Select Graphic Rendition (SGR) ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | Sets or clears one or more text attributes. | ||
+ | ^ | ||
+ | ^ Ps ^ Description | ||
+ | | 0 | Default attribute, white on black | | ||
+ | | 1 | Bright Intensity | ||
+ | | 2 | Dim intensity | ||
+ | | 5 | Blink (By definition, slow blink) | ||
+ | | 6 | Blink (By definition, fast blink) | ||
+ | | 7 | Negative Image - Reverses FG and BG | | ||
+ | | 8 | Concealed characters, sets the foreground colour to the background colour. | | ||
+ | | 22 | Normal intensity | ||
+ | | 25 | Steady (Not blinking) | ||
+ | | 27 | Positive Image - Restores FG and BG | | ||
+ | | 30 | Black foreground | ||
+ | | 31 | Red foreground | ||
+ | | 32 | Green foreground | ||
+ | | 33 | Yellow foreground | ||
+ | | 34 | Blue foreground | ||
+ | | 35 | Magenta foreground | ||
+ | | 36 | Cyan foreground | ||
+ | | 37 | White foreground | ||
+ | | 38 | Extended Foreground (see notes) | ||
+ | | 39 | Default foreground (same as white) | ||
+ | | 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 | Extended Background (see notes) | ||
+ | | 49 | Default background (same as black) | ||
+ | | 91 | Bright Red foreground | ||
+ | | 92 | Bright Green foreground | ||
+ | | 93 | Bright Yellow foreground | ||
+ | | 94 | Bright Blue foreground | ||
+ | | 95 | Bright Magenta foreground | ||
+ | | 96 | Bright Cyan foreground | ||
+ | | 97 | Bright White foreground | ||
+ | | 100 | Bright Black background | ||
+ | | 101 | Bright Red background | ||
+ | | 102 | Bright Green background | ||
+ | | 103 | Bright Yellow background | ||
+ | | 104 | Bright Blue background | ||
+ | | 105 | Bright Magenta background | ||
+ | | 106 | Bright Cyan background | ||
+ | | 107 | Bright White background | ||
+ | |||
+ | All others are ignored. | ||
+ | |||
+ | Blink indicates the blink bit.\\ | ||
+ | Bold indicates the bold bit.\\ | ||
+ | FG indicates the foreground colour.\\ | ||
+ | BG indicates the background colour.\\ | ||
+ | TF indicates that the Tru Colour foreground is changed.\\ | ||
+ | TB indicates that the Tru Colour background is changed.\\ | ||
+ | |||
+ | NOTE: For 90-97, there is no effect unless bright foreground colours are enabled. | ||
+ | |||
+ | NOTE: For 100-107, there is no effect unless bright background colours are enabled. | ||
+ | |||
+ | NOTE: For 38 and 48, two additional formats are supported, a palette selection and a direct colour selection. | ||
+ | |||
+ | For palette selection, an additional two parameters are required after that value. | ||
+ | |||
+ | The default palette is the [[https:// | ||
+ | |||
+ | For direct colour selection, an additional four parameters are required after that value. | ||
+ | |||
+ | ==== Device Status Report (DSR) ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | A request for a status report. | ||
+ | | 5 | Request a DSR | CTerm will always reply with CSI 0 n indicating " | ||
+ | | 6 | Request active cursor position | CTerm will reply with CSI y ; x R where y is the current line and x is the current row. | | ||
+ | | 255 | NON-STANDARD EXTENSION (BCDSR) | Replies as though a CSI 6 n was received with the cursor in the bottom right corner. | ||
+ | |||
+ | ==== CTerm Sate/Mode Request/ | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | When Ps is 1, CTerm will respond with a Font State Report of the form '' | ||
+ | | 0 | successful font selection | | ||
+ | | 1 | failed font selection | | ||
+ | | 99 | no font selection request has been received | | ||
+ | pS0 - pS3 contain the font slots numbers of previously successful "Font Selection" | ||
+ | | pS0 | normal attribute font slot | | ||
+ | | PS1 | high intensity foreground attribute font slot | | ||
+ | | PS2 | blink attribute font slot | | ||
+ | | PS3 | high intensity blink attribute font slot | | ||
+ | |||
+ | When Ps is 2, CTerm will respond with a Mode Report of the form '' | ||
+ | |||
+ | When Ps is 3, CTerm will respond with a Mode Report of the form '' | ||
+ | |||
+ | When Ps is 4, CTerm will respond with a Mode Report of the form '' | ||
+ | |||
+ | When Ps is 5, CTerm will respond with a Mode Report of the form '' | ||
+ | |||
+ | ==== DEC Device STatus Report (DECDSR) ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | |||
+ | When Ps is 62 (DECMSR) and there is no Pn, CTerm will respond with a Mode Report of the form '' | ||
+ | |||
+ | When Ps is 63 (DECCKSR) Pn defaults to 1, and CTerm will respond with a checksum of the defined macros in the form '' | ||
+ | |||
+ | ==== DEC Set Top and Bottom Margins (DECSTBM) ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | Selects top and bottom margins, defining the scrolling region. Pn1 is the line number of the first line in the scrolling region. Pn2 is the line number of the bottom line. | ||
+ | |||
+ | ==== DEC Select Communication Speed (DECSCS) ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | Set the output emulation speed (Select Communication Speed). If Ps1 or Ps2 are omitted, causes output speed emulation to stop. Ps1 may be empty. Sequence is ignored if Ps1 is not empty, 0, or 1. The value of Ps2 sets the output speed emulation as follows: | ||
+ | |||
+ | ^ Value ^ Speed ^ | ||
+ | | empty, 0 | Unlimited | | ||
+ | | 1 | 300 | | ||
+ | | 2 | 600 | | ||
+ | | 3 | 1200 | | ||
+ | | 4 | 2400 | | ||
+ | | 5 | 4800 | | ||
+ | | 6 | 9600 | | ||
+ | | 7 | 19200 | | ||
+ | | 8 | 38400 | | ||
+ | | 9 | 57600 | | ||
+ | | 10 | 76800 | | ||
+ | | 11 | 115200 | ||
+ | |||
+ | ==== CTerm Save Mode Setting (CTSMS) ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | Saves the current mode states as specified by '' | ||
+ | |||
+ | ==== DEC Set Left and Right Margin (DECSLRM) ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | (Only when DEC Left Right Margin Mode - 69 - is enabled)\\ | ||
+ | If either Pn1 or Pn2 is zero, the current setting is retained. Selects left and right margins, defining the scrolling region. Pn1 is the column number of the first column in the scrolling region. Pn2 is the column number of the right column. | ||
+ | |||
+ | ==== SCO Save Cursor ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | (Only when DEC Left Right Margin Mode - 69 - is disabled)\\ | ||
+ | Saves the current cursor position for later restoring with '' | ||
+ | |||
+ | ==== CTerm 24=Bit Colour (CT24BC) ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | Select a 24-bit colour. If Ps is 0, sets the background colour. If Ps is 1, sets the foreground colour. Pn1, Pn2, Pn3 contains the RGB value to set. CTerm handles this with an internal temporary palette, so scrollback may not have the correct colours. | ||
+ | |||
+ | ==== CTerm Restore Mode Setting (CTRMS) ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | Restores the mode states as saved via CSI ? s. If Ps is omitted, restores all such states. | ||
+ | |||
+ | ==== SCO Restore Cursor (SCORC) ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | Move the cursor to the last position saved by CSI s. If no position has been saved, the cursor is not moved. | ||
+ | |||
+ | ==== DEC Tab Stop Report (DECTABSR) ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | Requests a list of tab stops. The list is in the form: '' | ||
+ | |||
+ | ==== DEC Request Checksum of Rectangular Area (DECRQCRA) ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | Returns a checksum for the specified rectangular area. Pn1 is an ID that is returned in the response. Ps MUST be 1. Pn2 specifies the top row of the rectangle. Pn3 specifies the left column of the rectangle. Pn4 specifies the bottom row of the rectangle. Pn5 specifies the right column of the rectangle. The return value is in the format of '' | ||
+ | |||
+ | ==== DEC Invoke Macro (DECINVM) ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | Invokes a macro. Pn specifies the macro number. | ||
+ | |||
+ | ==== CTerm Obsolete Send Font (CTOSF) ==== | ||
+ | **Sequence: | ||
+ | **Defaults: | ||
+ | This is a poorly defined command that violates the basic design laid out in ECMA-48. | ||
+ | |||
+ | Indicates that a font block is following. Ps1 indicates the font slot to place the loaded font into. This must be higher than the last default defined font (See CSI sp D for list of predefined fonts) | ||
+ | | 0 | 8x16 font, 4096 bytes. | | ||
+ | | 1 | 8x14 font, 3584 bytes. | | ||
+ | | 2 | 8x8 font, 2048 bytes. | | ||
+ | |||
+ | The DCS font string should be used instead as of CTerm 1.213 | ||
+ | |||
+ | ===== " | ||
+ | This is the place where the BBS world completely fell on it's face in ANSI usage. | ||
+ | '' | ||
+ | |||
+ | They used a subset of IBM BASICs PLAY statement functionality for ANSI music strings which often start with " | ||
+ | |||
+ | Later on, BananaCom realized the conflict between delete line and music, so they added *another* broken code CSI N (Properly, erase in field... not implemented in many BBS clients) which was to provide an " | ||
+ | |||
+ | CTerm has further introduced a standard compliant ANSI music introducer CSI | | ||
+ | |||
+ | By default, CTerm allows both CSI N and CSI | to introduce a music string. Allowed introducers are set by CSI = p1 M as defined above. | ||
+ | |||
+ | The details of ANSI music then are as follows: | ||
+ | The following characters are allowed in music strings: | ||
+ | " | ||
+ | If any character not in this list is present, the music string is ignored as is the introducing code. | ||
+ | |||
+ | If the introducing code is CSI M the first char is examined, and if it is a one of " | ||
+ | |||
+ | The music string is then parsed with the following sequences supported: | ||
+ | | Mx | sets misc. music parameters where x is one of the following: || | ||
+ | | | F | Plays music in the foreground, waiting for music to complete playing before more characters are processed. | | ||
+ | | | B | Play music in the background, allowing normal processing to continue. | | ||
+ | | | N | " | ||
+ | | | L | Play notes legato | | ||
+ | | | S | Play notes staccato | | ||
+ | | T### | Sets the tempo of the music where ### is one or more decimal digits. If the decimal number is greater than 255, it is forced to 255. If it is less than 32, it is forced to 32. The number signifies quarter notes per minute. The default tempo is 120. || | ||
+ | | O### | Sets the octave of the music where ### is one or more decimal digits. If the decimal number is greater than 6, it is forced to 6.The default octave is 4. || | ||
+ | | N### | Plays a single note by number. | ||
+ | | A,\\ B,\\ C,\\ D,\\ E,\\ F,\\ G,\\ P | Plays the named note or pause from the current octave. | ||
+ | | | + | Sharp. | ||
+ | | | # | Sharp. | ||
+ | | | - | Flat. The next lowest semitone is played. Each flat character will move down one semitone, so " | ||
+ | | | . | Duration is 1.5 times what it would otherwise be. Dots are not cumulative, so " | ||
+ | | | ### | Notelength as a reciprocal of the fraction of a whole note to play the note for. For example, 4 would indicate a ¼ note. The default note length is 4. | | ||
+ | | L### | Set the notelength parameter for all following notes which do not have one specified (ie: override the quarter-note default) | ||
+ | | < | Move the next lowest octave. Octave cannot go above six or below zero. || | ||
+ | | > | Move to the next highest octave. Octave cannot go above six or below zero. || | ||
+ | |||
+ | The lowest playable character is C in octave zero. The frequencies for the six C notes for the seven octaves in rising order are: | ||
+ | 65.406, 130.810, 261.620, 523.250, 1046.500, 2093.000, 4186.000 | ||
+ | |||
+ | Purists will note that the lower three octaves are not exactly one half of the next higher octave in frequency. | ||
+ | |||
+ | !!!PLEASE NOTE!!! If you are playing some ANSI Music then ask the user if they heard it, ALWAYS follow it with an 0x0f as 0x0e is the shift lock character which *will* cause people with anything but an ANSI-BBS terminal (ie: *nix users using the bundled telnet app) to have their screen messed up. 0x0f " | ||
+ | |||
+ | ===== Key Sequences ===== | ||
+ | While CTerm does not handle keyboard I/O, and therefore does not send any key sequences, it's only used by one piece of software (SyncTERM), which does send a set of sequences when keys are pressed. | ||
+ | |||
+ | | Left Arrow | " | ||
+ | | Right Arrow | " | ||
+ | | Up Arrow | " | ||
+ | | Down Arrow | " | ||
+ | | Home | " | ||
+ | | End | " | ||
+ | | Delete | ||
+ | | Page Down | " | ||
+ | | Page Up | " | ||
+ | | F1 | " | ||
+ | | F2 | " | ||
+ | | F3 | " | ||
+ | | F4 | " | ||
+ | | F5 | " | ||
+ | | F6 | " | ||
+ | | F7 | " | ||
+ | | F8 | " | ||
+ | | F9 | " | ||
+ | | F10 | " | ||
+ | | F11 | " | ||
+ | | F12 | " | ||
+ | | Shift + F1 | " | ||
+ | | Shift + F2 | " | ||
+ | | Shift + F3 | " | ||
+ | | Shift + F4 | " | ||
+ | | Shift + F5 | " | ||
+ | | Shift + F6 | " | ||
+ | | Shift + F7 | " | ||
+ | | Shift + F8 | " | ||
+ | | Shift + F9 | " | ||
+ | | Shift + F10 | " | ||
+ | | Shift + F11 | " | ||
+ | | Shift + F12 | " | ||
+ | | Alt + F1 | " | ||
+ | | Alt + F2 | " | ||
+ | | Alt + F3 | " | ||
+ | | Alt + F4 | " | ||
+ | | Alt + F5 | " | ||
+ | | Alt + F6 | " | ||
+ | | Alt + F7 | " | ||
+ | | Alt + F8 | " | ||
+ | | Alt + F9 | " | ||
+ | | Alt + F10 | " | ||
+ | | Alt + F11 | " | ||
+ | | Alt + F12 | " | ||
+ | | Control + F1 | " | ||
+ | | Control + F2 | " | ||
+ | | Control + F3 | " | ||
+ | | Control + F4 | " | ||
+ | | Control + F5 | " | ||
+ | | Control + F6 | " | ||
+ | | Control + F7 | " | ||
+ | | Control + F8 | " | ||
+ | | Control + F9 | " | ||
+ | | Control + F10 | " | ||
+ | | Control + F11 | " | ||
+ | | Control + F12 | " | ||
+ | | Insert | ||
+ | | Back Tab | " | ||
+ | |||
===== See Also ===== | ===== See Also ===== | ||
* [[: | * [[: | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
{{tag>}} | {{tag>}} | ||