Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:58 02 Aug 2025 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 : UMite Escape codes for VT100

Author Message
jeffj
Regular Member

Joined: 04/02/2012
Location: Australia
Posts: 84
Posted: 09:31pm 24 Apr 2017
Copy link to clipboard 
Print this post

Attached are some escape codes I have extracted from various posts for use on a VT100 screen.
I was running some of these to try and understand them
I was using MMedit and quite a few worked ok but all of the lines borders etc would not work.Then none of them worked and I cannot understand what has happened.
I tried them on Teraterm and some of them worked as they did on on MMedit.
I put the latest software into the micromite and ran the same programme on another computer also using MMedit same result.
I am not using a VT100 screen but using the computer screen.
These codes are most confusing . There must be some guides on Syntax somewhere.
Your help would be greatly appreciated
Jeff


x=10
y=20
'EXAMPLE OF ESCAPE CODES
Main:
LOCATE X,Y

print "here";

down_ONE_LINE

LARGE'DOES NOT WORK
print "here";

BORDER 'DOES NOT WORK
DRAW_A_LINE 'DOES NOT WORK
DRAW_CIRCLE 'DOES NOT WORK

pause 5000
Clear_screen'Clear screen and put cursor @ row3 col 6
end



Sub Clear_screen

x=0 ' used as a counter value that is displayed on the console window
Do
Print Chr$(27)+"[2J"+Chr$(27)+"[3;6H"; ' Escape codes to clear screen & move cursor to Row 3; Column 6
Print Str$(x); ' Print value of counter at cursor location (set above)
x=x+1 ' inc counter
Pause 333 ' delay a bit
Loop ' and repeat . . .
endsub



Sub down_ONE_LINE
PRINT CHR$(27)+"[<1>B" ' 10= no lines

end sub

SUB DRAW_A_LINE

'PRINT CHR$(27)+"[+Z1;<0>;<0>;<10>;<20>Z"
END SUB

Sub DRAW_CIRCLE
PRINT CHR$(27)+ "[Z4;240;144;100;Z";
END SUB


'SUB Clear_screen
PRINT CHR$(27)+"[f" : PRINT CHR$(27)+"[2J";'J=clear screen from cursor down f=move cusor to upper left
END SUB


LOCATE X,Y

SUB LOCATE X,Y
PRINT CHR$(27)+"["+STR$(X)+";"+STR$(Y)+"f";
END SUB


COLOR f,b

SUB COLOR f,b
PRINT CHR$(27)+"[0;"+STR$(f)+";"+STR$(b)+";1m";
END SUB

Sub MENU (T$)
WIPE
Print Chr$(27)+"[6m"; 'Select Jumbo font
Print Chr$(27)+"[7m"; 'Select Inverse Video
Print Chr$(27)+"[4m"; 'Select Underline mode
Print T$ 'Print menu title
STANDARD 'Select standard text mode(turn all text attributes off)
Print NL$ 'Blank line for space
LARGE 'Select Large font
End Sub
'-------------------------------------------------------------------
Sub WIPE
Print Chr$(27)+"c"; 'Reset terminal
Print Chr$(27)+"[2J"; 'Clear entire screen
Print Chr$(27)+"[H"; 'Cursor to top-left
End Sub
'-------------------------------------------------------------------
Sub BORDER
Print Chr$(27)+"[Z2;5;5;10;20Z"; 'Draw border box
End Sub
'-------------------------------------------------------------------
Sub LARGE
Print Chr$(27)+"[3m"; 'Large font
End Sub
'-------------------------------------------------------------------
Sub STANDARD
Print Chr$(27)+"[0m"; 'Standard font
End Sub
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 11:00pm 24 Apr 2017
Copy link to clipboard 
Print this post

MMEdit only uses a subset of the VT100 controls.
It is intended for basic use only.

You may get better success from TeraTerm or Putty.

Jim
VK7JH
MMedit
 
jeffj
Regular Member

Joined: 04/02/2012
Location: Australia
Posts: 84
Posted: 08:19pm 15 May 2017
Copy link to clipboard 
Print this post

Thanks Jim sorry for delayed reply
Yr mmedit is the bees knees I really like it.
As regards the escape codes . the only ones I really wanted was to position the cursor and clear the screen.
What I find odd is that if I programme using mmedit then switch to teraterm they work ok.
For the benefit of others with this problem I found that if I select "VT" in the chat window they work ok . Maybe that is what I should have been doing all along
regards Jeff
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 08:49pm 15 May 2017
Copy link to clipboard 
Print this post

That's it.

The VT button puts it into VT-100 mode.
the A is ASCII mode which does not recognise the esc codes, but is good to se what's being spat out.

The other code I use a lot is clear to end of line;

It helps tidy thing up if the buffer over runs.

Phil.
 
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 2025