Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:45 20 Oct 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Question regarding MMBasic VT100 Escape sequences used

Author Message
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2994
Posted: 07:25am 19 Oct 2026
Copy link to clipboard 
Print this post

Probably a question for Peter or Geoff:

Please would it be possible to have a list of all the different Escape sequences that are outputted by MMBasic (i.e. that are sent to the serial console pin).

I am aware of the full VT100 list of escape sequences (and extended ones), however, this question is specifically asking exactly which ones are used by MMBasic as I guess just a subset is outputted rather than all of them.

Many thanks for any help…..
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 12021
Posted: 10:47am 19 Oct 2026
Copy link to clipboard 
Print this post

Cursor and screen control (VT100/ANSI)

Sequence Meaning Where it comes from
ESC[row;colH Cursor position PRINT @, the editor
ESC[row;colf Cursor position, alternate form Draw.c text positioning
ESC[H Cursor home
ESC[2J Clear screen CLS, editor
ESC[J and ESC[0J Clear to end of screen Prompt line editing, editor
ESC[K Clear to end of line Editor
ESC[nA Cursor up. In practice ESC[1A. Command-line history and multi-line editing
ESC[nC Cursor forward. The count is computed from the prompt position. PicoMite.c prompt handling
ESC[99B followed by \n Move to the bottom of the screen and force a scroll Editor
ESC M Reverse index (scroll window down one line) Editor
ESC 7 and ESC 8 Save and restore cursor Editor and Commands.c (framebuffer setup)


Cursor visibility, wrap and mouse modes

Sequence Meaning Where it comes from
ESC[?25h and ESC[?25l Show or hide the cursor Editor, Commands.c, and the keep-alive in PicoMite.c
ESC[?7l and ESC[?7h Autowrap off or on Editor entry and exit, and once at reset
ESC[?1000h and ESC[?1000l Mouse click reporting (VT200, used by Tera Term) Editor


Attributes and colour (SGR, ESC[...m)

Reset: 0 and the bare ESC[m.
Underline: 4.
Reverse video: 7.
8-colour foreground: 30–37 (the editor syntax colours and file manager).
8-colour background: 40–47.
Bright foreground: 97, as in ESC[97;40m.
Combined forms such as ESC[37;40m, ESC[30;46m and ESC[0m ESC[7m.
COLOUR also sends a single ESC[<code>m, built in Commands.c.


Window resize (xterm)

ESC[8;rows;colst asks the terminal to resize its window. The firmware sends it when the frame or console size changes (Commands.c and MM_Misc.c).
It is a nicety, and terminals that ignore it still work.
Not used
Edited 2026-10-19 20:53 by matherp
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2994
Posted: 11:03am 19 Oct 2026
Copy link to clipboard 
Print this post

Many Thanks Peter for the rapid response - exactly the information I was after!
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026