Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:30 01 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 : Picomite ' CLS '

Author Message
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 719
Posted: 05:55pm 27 Oct 2021
Copy link to clipboard 
Print this post


CLS


Gives me


Saved 30 bytes
[3] CLS
Error : Display not configured
>


I have not been able to find how
to configure . ( It does ' PRINT ' )
?????
my site
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 06:01pm 27 Oct 2021
Copy link to clipboard 
Print this post

CLS is a graphics command. It works when you have an LCD screen enabled

OPTION LCDPANEL .......

Or am I missing something?
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 07:05pm 27 Oct 2021
Copy link to clipboard 
Print this post

You probably want to do:

Print Chr$(27) + "[2J" + Chr$(27) + "[H"


which will mimic a CLS on a VT serial console.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 719
Posted: 07:24pm 27 Oct 2021
Copy link to clipboard 
Print this post

  matherp said  CLS is a graphics command. It works when you have an LCD screen enabled

OPTION LCDPANEL .......

Or am I missing something?


Normally it would clear the screen :

CLS [colour] CMM
              MM
             DOS

Clears the video display screen and places the cursor in the top left
corner. Optionally 'colour' can be specified which will be used for the
background when clearing the screen (Colour Maximite only).
my site
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 719
Posted: 07:27pm 27 Oct 2021
Copy link to clipboard 
Print this post

  thwill said  You probably want to do:

Print Chr$(27) + "[2J" + Chr$(27) + "[H"


which will mimic a CLS on a VT serial console.

Best wishes,

Tom


Even though it will ' PRINT ' ,
it won't ' CLS '  ????
my site
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 07:33pm 27 Oct 2021
Copy link to clipboard 
Print this post

  hitsware2 said  Even though it will ' PRINT ' ,
it won't ' CLS '  ????


I'm not going to argue the right and wrong of it, but PRINT is a "console command" (I'm guessing it doesn't print to the LCD, you use TEXT for that) whereas on the PicoMite CLS is a purely "graphics command".

Best wishes,

Tom
Edited 2021-10-28 05:33 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 07:37pm 27 Oct 2021
Copy link to clipboard 
Print this post

CLS brings up an error if used on the terminal. It's a graphics only command and will only work on attached LCD display.

  Quote  Saved 30 bytes
[3] CLS
Error : Display not configured
>
is telling you that you have no LCD display configured.

To configure one you'll have to connect it and use the appropriate OPTION LCDPANEL command for that model. Have you got one attached?

Note that on the PicoMite the Console and Graphics commands are completely different and non-interchangeable. There is a reason for this. The PicoMite is intended to be used as an embedded controller, where the user's interface would be via a touch screen or similar. Allowing the user to connect via the Console could be dangerous (or at least damaging). Consequently the Console and LCD modes are completely separate. The PicoMite will run perfectly happily without a console attached.
Edited 2021-10-28 05:51 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 07:58pm 27 Oct 2021
Copy link to clipboard 
Print this post

Another way of looking at it is "Do you really want the act of clearing the LCD to also clear all those debug/diagnostics you were PRINTing to the terminal ?"

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 719
Posted: 08:45pm 27 Oct 2021
Copy link to clipboard 
Print this post

  thwill said  Another way of looking at it is "Do you really want the act of clearing the LCD to also clear all those debug/diagnostics you were PRINTing to the terminal ?"

Tom


Another way of looking at it is
"Do you really want all those debug/diagnostics
you PRINT to the terminal to scroll rather than
refresh ?"    
my site
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 719
Posted: 08:47pm 27 Oct 2021
Copy link to clipboard 
Print this post

  thwill said  You probably want to do:

Print Chr$(27) + "[2J" + Chr$(27) + "[H"


which will mimic a CLS on a VT serial console.

Best wishes,

Tom

Thank You !
Awkward , but it works ....  
my site
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 09:09pm 27 Oct 2021
Copy link to clipboard 
Print this post

I posted a little VT100 library a while ago. It has various commands to control the console, so Vcls clears the screen Vch sends the cursor home Vat(row,column) moves the text position to a set point - like Print@ but it doesn't accept a string. There are also commands to change the foreground and background colours and a bit more stuff. It was intended for the Micromite, but seems to run fine on anything.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 09:44pm 27 Oct 2021
Copy link to clipboard 
Print this post

Here it is....

Thanks Mick
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 07:36am 28 Oct 2021
Copy link to clipboard 
Print this post

I found a bug in it a couple of weeks ago. I think it was to do with text attributes not returning to normal or something. Can't remember what I was doing now...
There are probably others. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
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