Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:26 11 May 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 : VT100 Escape Codes.

Author Message
cosmic frog
Senior Member

Joined: 09/02/2012
Location: United Kingdom
Posts: 300
Posted: 09:17am 28 Jun 2014
Copy link to clipboard 
Print this post

Hi,
Just built Geoffs ASCII Video Terminal on strip board (Vero Board) and it's all working fine, but I've never used a VT100 before and know nothing about ESC Codes.
I looked at some guides on Google but still non the wiser.
I did try the example in the manual - PRINT CHR$(27)+"[Z4;240;144;100Z"; but all I get on screen is > [Z4;240;144;100Z" just as you would expect from a PRINT statement.
If someone could help me out it would be much appreciated.
Just to be able to clear the screen would be great (ESC [2J)?

Thanks. Dave.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 01:07pm 28 Jun 2014
Copy link to clipboard 
Print this post

What are you connecting to?

Getting > [Z4;240;144;100Z suggests that the ESC character is not being received by the terminal.
Why you get the ending quote is a puzzle.

What you do get suggests that the terminal setting are correct.
Assuming that you are connecting to a micromite, try
PRINT MM.VER
and PRINT MM.DEVICE$

I am not able to test the line drawing commands but they all look OK to me.

ESC [2J is definitely correct and should work on all terminals.

Jim
VK7JH
MMedit
 
VK2MCT
Senior Member

Joined: 30/03/2012
Location: Australia
Posts: 120
Posted: 01:57pm 28 Jun 2014
Copy link to clipboard 
Print this post

Hi I've not used VT100 before, but I'm wondering if the " are actually reverse quotes or some other microsoft weirdism brought across by cut and paste. Suggest to try " from the keyboard.

Ignorantly,

John B.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 02:51pm 28 Jun 2014
Copy link to clipboard 
Print this post

  VK2MCT said  I'm wondering if the " are actually reverse quotes or some other microsoft weirdism brought across by cut and paste.
John B.

A good thought and it was the first thing I thought of.
Assuming he is talking to a micromite, 'smart quotes' would give a syntax error for the first quote.
The micromite doesn't seem to need the closing quote and a 'smart quote' there would print it out but the VT100 command would be acted on first.

Jim
VK7JH
MMedit
 
cosmic frog
Senior Member

Joined: 09/02/2012
Location: United Kingdom
Posts: 300
Posted: 01:04am 29 Jun 2014
Copy link to clipboard 
Print this post

Thanks for all your comments.
The " at the end shouldn't be there, it's a mistake on my part (typo) sorry.
Just to clarify, if I type >PRINT CHR$(27)+"[2J" It should clear the screen but it just prints >[2j
I am using a Micromite with the latest firmware connected to Geoffs ASCII Video Terminal. I can write programs and run them fine, but it's the ESC Codes I cannot get to work.

Thanks. Dave.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3269
Posted: 03:55am 29 Jun 2014
Copy link to clipboard 
Print this post

Your example (>PRINT CHR$(27)+"[2J") uses an uppercase J while your output (>[2j) shows a lowercase j. Which one were using? Escape codes are case sensitive.

Also, you should terminate the PRINT statement for escape codes with a semicolon (;) to suppress the automatic addition of CR and LF.

Try this, it should work:
PRINT CHR$(27)+"[2J";


Geoff
Geoff Graham - http://geoffg.net
 
cosmic frog
Senior Member

Joined: 09/02/2012
Location: United Kingdom
Posts: 300
Posted: 07:35am 29 Jun 2014
Copy link to clipboard 
Print this post

Thanks Geoff, that seems to have fixed it.
So all it needed was to be in upper case, who have thought it

Thanks to everyone who tried to help me with this.
 
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