![]() |
Forum Index : Microcontroller and PC projects : VT100 Escape Codes.
Author | Message | ||||
cosmic frog Senior Member ![]() Joined: 09/02/2012 Location: United KingdomPosts: 300 |
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: AustraliaPosts: 6220 |
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: AustraliaPosts: 120 |
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: AustraliaPosts: 6220 |
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 KingdomPosts: 300 |
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: AustraliaPosts: 3269 |
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 KingdomPosts: 300 |
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. |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |