Amstrad CPC escape codes
The Amstrad CPC's block graphics and symbols are typed as their Unicode glyphs (█, ▛, α, ♠…), and every code with no printable form is written as a raw {0xNN} byte, so imported listings re-tokenize byte-exactly. The escapes that carry meaning are the firmware's text VDU control codes 0x00–0x1F — the CHR$ codes that move the cursor, switch MODE, set PEN/PAPER/INK, ring the buzzer and so on. Each stores a single introducer byte; several then read further bytes from the print stream, noted per row.
Escapes are recognised inside string, REM and DATA literals; a {...} that is not a recognised escape stays literal text (the CPC has real {/} characters at 0x7B/0x7D). Filters can be prefilled with ?q= and ?cat= query parameters.
See also the Locomotive BASIC reference and file formats.
| Description | ||
|---|---|---|
{0x00} | 0x00 | NUL — ignored; prints nothing. |
{0x01} | 0x01 | Print the following code as a symbol even if it is itself a control code (PRINT CHR$(1);CHR$(n)). |
{0x02} | 0x02 | Disable the text cursor (cursor off). |
{0x03} | 0x03 | Enable the text cursor (cursor on). |
{0x04} | 0x04 | Select screen MODE — the next byte is the mode (0, 1 or 2). |
{0x05} | 0x05 | Print the next character at the graphics cursor rather than the text cursor. |
{0x06} | 0x06 | Enable the text screen (text VDU on). |
{0x07} | 0x07 | BEL — sound the buzzer (a short beep). |
{0x08} | 0x08 | Move the cursor one column left (backspace). |
{0x09} | 0x09 | Move the cursor one column right (tab). |
{0x0A} | 0x0A | Move the cursor one line down (line feed). |
{0x0B} | 0x0B | Move the cursor one line up. |
{0x0C} | 0x0C | Clear the whole text window (CLS). |
{0x0D} | 0x0D | Move the cursor to the start of the line (carriage return). |
{0x0E} | 0x0E | Set the PAPER (background) ink — the next byte is the pen. |
{0x0F} | 0x0F | Set the PEN (text) ink — the next byte is the pen. |
{0x10} | 0x10 | Delete the character under the cursor. |
{0x11} | 0x11 | Clear from the start of the line to the cursor. |
{0x12} | 0x12 | Clear from the cursor to the end of the line. |
{0x13} | 0x13 | Clear from the start of the screen to the cursor. |
{0x14} | 0x14 | Clear from the cursor to the end of the screen. |
{0x15} | 0x15 | Disable the text screen (text VDU off). |
{0x16} | 0x16 | Set transparent-print mode — the next byte is 0 (off) or 1. |
{0x17} | 0x17 | Set the graphics write mode — the next byte selects 0–3. |
{0x18} | 0x18 | Exchange PEN and PAPER (inverse video). |
{0x19} | 0x19 | Define a character matrix (SYMBOL) — the next 9 bytes are the code then eight row bit-patterns. |
{0x1A} | 0x1A | Set the text window — the next 4 bytes are left, right, top and bottom columns/rows. |
{0x1B} | 0x1B | ESC — ignored. |
{0x1C} | 0x1C | Set an INK — the next 3 bytes are the pen and its two flashing colours. |
{0x1D} | 0x1D | Set the BORDER — the next 2 bytes are its two flashing colours. |
{0x1E} | 0x1E | Move the cursor to the top-left of the window (home). |
{0x1F} | 0x1F | Move the cursor (LOCATE) — the next 2 bytes are the column and row. |
{0xNN} | 0x20–0xFF with no glyph | Any code with no plain or Unicode glyph — DEL (0x7F) and the upper-half graphics/symbols that have no faithful Unicode form (0x80, 0xA0, and the Legacy-Computing-only mosaics/shades). Typed and stored byte-for-byte so imported listings round-trip exactly; CHR$(n) is the usual way to print them. |
Showing 33 of 33 escape codes