Skip to content

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}0x00NUL — ignored; prints nothing.
{0x01}0x01Print the following code as a symbol even if it is itself a control code (PRINT CHR$(1);CHR$(n)).
{0x02}0x02Disable the text cursor (cursor off).
{0x03}0x03Enable the text cursor (cursor on).
{0x04}0x04Select screen MODE — the next byte is the mode (0, 1 or 2).
{0x05}0x05Print the next character at the graphics cursor rather than the text cursor.
{0x06}0x06Enable the text screen (text VDU on).
{0x07}0x07BEL — sound the buzzer (a short beep).
{0x08}0x08Move the cursor one column left (backspace).
{0x09}0x09Move the cursor one column right (tab).
{0x0A}0x0AMove the cursor one line down (line feed).
{0x0B}0x0BMove the cursor one line up.
{0x0C}0x0CClear the whole text window (CLS).
{0x0D}0x0DMove the cursor to the start of the line (carriage return).
{0x0E}0x0ESet the PAPER (background) ink — the next byte is the pen.
{0x0F}0x0FSet the PEN (text) ink — the next byte is the pen.
{0x10}0x10Delete the character under the cursor.
{0x11}0x11Clear from the start of the line to the cursor.
{0x12}0x12Clear from the cursor to the end of the line.
{0x13}0x13Clear from the start of the screen to the cursor.
{0x14}0x14Clear from the cursor to the end of the screen.
{0x15}0x15Disable the text screen (text VDU off).
{0x16}0x16Set transparent-print mode — the next byte is 0 (off) or 1.
{0x17}0x17Set the graphics write mode — the next byte selects 0–3.
{0x18}0x18Exchange PEN and PAPER (inverse video).
{0x19}0x19Define a character matrix (SYMBOL) — the next 9 bytes are the code then eight row bit-patterns.
{0x1A}0x1ASet the text window — the next 4 bytes are left, right, top and bottom columns/rows.
{0x1B}0x1BESC — ignored.
{0x1C}0x1CSet an INK — the next 3 bytes are the pen and its two flashing colours.
{0x1D}0x1DSet the BORDER — the next 2 bytes are its two flashing colours.
{0x1E}0x1EMove the cursor to the top-left of the window (home).
{0x1F}0x1FMove the cursor (LOCATE) — the next 2 bytes are the column and row.
{0xNN}0x20–0xFF with no glyphAny 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

Released under GNU GPL v3.0. Some ROM images are third-party copyrighted works, separate to this project, strictly for personal/educational purposes.