Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Clear screen command in CP/M BASIC?

1,332 views
Skip to first unread message

vz24_...@yahoo.com

unread,
Nov 8, 2001, 8:11:42 PM11/8/01
to
I tried CLS, CLRS, and several other commands to clear the screen, but
I cannot get my BASIC programs to have the screen all by themselves
unless I put enough blank PRINT statements to knock the CRUN2 text off
the screen.

Steve

Stephen Mitchell

unread,
Nov 8, 2001, 8:32:18 PM11/8/01
to

Since each terminal used on CP/M machines had it's own code to clear the
screen, you'll have to write your own clear screen function. Control-Z
was a popular choice on many machines, so you could clear the screen
using PRINT CHR$(26); Maybe one of the regulars on this group knows
what the code is for the Eagle.

Steve Mitchell
Alexandria, VA
ssm...@erols.com

jim korman

unread,
Nov 9, 2001, 12:29:27 AM11/9/01
to
vz24_...@yahoo.com wrote:


If you look at some generic CP/M programs, you'll find that was
common. Just print at least 24 blank lines and then start printing
new text from the bottom of the screen!

I use Montezuma Micro CP/m on my Tandy Model IV which emulates an
ADM-3A terminal. Its clear screen command was a ^Z, so you could
write something like

10 CLS$=CHR$(26)
...
PRINT CLS$;
Note trailing semicolon so that you don't move off the top line!

Jim Korman


Amardeep S Chana

unread,
Nov 8, 2001, 10:45:30 PM11/8/01
to

"Stephen Mitchell" <ssm...@erols.com> wrote in message
news:3BEB3222...@erols.com...

Another popular one was <ESC>* which would be PRINT CHR$(27);"*"


Roy Miller

unread,
Nov 9, 2001, 12:01:42 AM11/9/01
to
On the other hand, Apple's BASIC used "Home". You might TRY it....

Roy

Herb Johnson

unread,
Nov 9, 2001, 11:59:23 AM11/9/01
to
vz24_...@yahoo.com wrote:
: I tried CLS, CLRS, and several other commands to clear the screen, but

: Steve

Instead of 24 PRINT statements, a generic alternavive would be to
print 24 "CHR$(10)" which, if I got the syntax correct, would be
24 linefeed (LF) characters to scroll the 24 line display away.
As others have said, some computers or terminals have a set of
characters to clear the screen; some small BASIC programs can be
written to determine by trial and error which characters would work.

Herb JOhnson


--

Herbert R. Johnson http://pluto.njcc.com/~hjohnson
hjoh...@pluto.njcc.com voice 609-771-1503, New Jersey USA
amateur astronomer and telescope tinkerer
reseller of classic Macs & accessories from Plus to PowerMac
S-100 & 8-inch drive manuals and parts, call for "Dr. S-100"

Richard Steven Walz

unread,
Nov 9, 2001, 1:20:15 PM11/9/01
to
In article <cb24ba4b.01110...@posting.google.com>,
--------------------------------
Look up the clearscreen code for your terminal and send it to the video.
It's usually control-Z or somesuch.
-Steve
--
-Steve Walz rst...@armory.com ftp://ftp.armory.com/pub/user/rstevew
-Electronics Site!! 1000 Files/50 Dirs!! http://www.armory.com/~rstevew
Europe Naples, Italy: ftp://ftp.unina.it/pub/electronics/ftp.armory.com

Paul Schlyter

unread,
Nov 9, 2001, 2:09:30 PM11/9/01
to
In article <3BEB6336...@inetnebr.com>,

Roy Miller <mil...@inetnebr.com> wrote:

> On the other hand, Apple's BASIC used "Home". You might TRY it....
>
> Roy

Only Applesoft Basic had the "HOME" command. On Apple's original
Integer Basic, you had to clear the screen with a "CALL -858" (if I
remember correctly), which called the monitor routine for clearing
the screen.

--
----------------------------------------------------------------
Paul Schlyter, Swedish Amateur Astronomer's Society (SAAF)
Grev Turegatan 40, S-114 38 Stockholm, SWEDEN
e-mail: pausch at saaf dot se or paul.schlyter at ausys dot se
WWW: http://hotel04.ausys.se/pausch http://welcome.to/pausch

Frank Zsitvay

unread,
Nov 10, 2001, 1:52:53 AM11/10/01
to
Another common control code that clears the screen on most terminals is
the form feed, 0Ch, 10 decimal, or control-l from your keyboard.

If you want to play around to see what various codes do to your screen,
type this short program into your MBASIC interpreter.

10 A$=INKEY$
20 IF A$="" THEN 10
30 IF A$=CHR$(27) THEN END
40 PRINT A$;
50 GOTO 10

Then type away. An ESC will end the program. A control-C will probably
also break out of it. Try various control codes (hold down the control key
while typing other keys) and see what they do. Some terminals can do some
really goofy things.

If you get things into a real strange state, to the point where you can't
even return to normal, just reboot.

-Frank

Server

unread,
Nov 13, 2001, 9:41:53 PM11/13/01
to
The versions of MBasic (ABASIC & GBASIC) that came the CP/M softcard for the
Apple also had a HOME command.


"Paul Schlyter" <pau...@saaf.se> wrote in message
news:9sh9la$fse$1...@merope.saaf.se...

inret...@gmail.com

unread,
Oct 9, 2017, 4:34:43 AM10/9/17
to
Hi, so what are the odds in looking for CLS information(although Z80 Assembly) on CP/M and I find the answer written by my name sake.

All the best
Stephen Mitchell
Worksop
UK

j...@mdfs.net

unread,
Oct 12, 2017, 8:39:36 PM10/12/17
to
Frank Zsitvay wrote:
> Another common control code that clears the screen on most terminals is
> the form feed, 0Ch, 10 decimal, or control-l from your keyboard.

12 decimal, control-L

0 new messages