Clear Screen Command

31 views
Skip to first unread message

Lamont McCloud

unread,
Aug 19, 2025, 1:03:07 AMAug 19
to Altair-Duino
Hello
Can anyone please tell me what the clear screen command is when running Mini-Disk or Disk BASIC on my Altair-Duino with a monitor? CLR, CLS, HOME, ?CHR$(125), ?CHR$(12)...none of these seem to work with a monitor, ?CHR$(12) does work with PuTTY. 

Charley Jones

unread,
Aug 19, 2025, 1:09:26 AMAug 19
to Lamont McCloud, Altair-Duino
CLS may have come around later. 

I think this is more rx rx.  
Very old school.

Sent from my iPhone 15pm!
Charley Jones, PMP

On Aug 18, 2025, at 10:03 PM, Lamont McCloud <biglo...@gmail.com> wrote:

Hello
Can anyone please tell me what the clear screen command is when running Mini-Disk or Disk BASIC on my Altair-Duino with a monitor? CLR, CLS, HOME, ?CHR$(125), ?CHR$(12)...none of these seem to work with a monitor, ?CHR$(12) does work with PuTTY. 

--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/altair-duino/943f281c-e339-4dce-aa49-2dbfad988a41n%40googlegroups.com.

Lamont McCloud

unread,
Aug 19, 2025, 1:29:49 AMAug 19
to Altair-Duino
I just want to add that I did read the Altair 8800 BASIC manual, that's how I found CHR$(12), but not much else concerning a clear screen command.

Charley Jones

unread,
Aug 19, 2025, 1:41:29 AMAug 19
to Lamont McCloud, Altair-Duino
If your terminal is ansi, you can try

printf("\033[2J\033[H");

Of course, that’s the c version

Sent from my iPhone 15pm!
Charley Jones, PMP

On Aug 18, 2025, at 10:29 PM, Lamont McCloud <biglo...@gmail.com> wrote:

I just want to add that I did read the Altair 8800 BASIC manual, that's how I found CHR$(12), but not much else concerning a clear screen command.


On Tuesday, August 19, 2025 at 1:03:07 AM UTC-4 Lamont McCloud wrote:
Hello
Can anyone please tell me what the clear screen command is when running Mini-Disk or Disk BASIC on my Altair-Duino with a monitor? CLR, CLS, HOME, ?CHR$(125), ?CHR$(12)...none of these seem to work with a monitor, ?CHR$(12) does work with PuTTY. 

--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.

Tom Wilson

unread,
Aug 19, 2025, 2:42:22 AMAug 19
to Altair-Duino
There's no CLS command, since BASIC does not know or care what kind of terminal you are using. In fact, I think Altair BASIC was meant to work on a teletype, which can't clear the screen, because it outputs on paper!

If you are using any VT-102 compatible terminal, including the one included with the AD Pro, then you can write ESC (27) followed by [2J to clear the screen. 

In BASIC, that would generally look like

PRINT:PRINT CHR$(27);"[2J";

One little issue to be aware of is that Microsoft BASIC counts the number of characters sent to the terminal and will send a Newline after 80 characters, even some of those are unprintable. This is why you want to send a bare PRINT first, so the first line doesn't get wrapped prematurely.

Some terminals (including PCs running BASIC or DOS) also clear the screen when CHR$(12) is sent (a Form Feed on a printer), but not all terminals respond to that, and it's not actually in the VT-102 standard. 
Reply all
Reply to author
Forward
0 new messages