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

Completed my programming language overview with a 'BASIC for CP/M' page also

341 views
Skip to first unread message

Peter Dassow

unread,
Aug 28, 2009, 1:05:41 PM8/28/09
to
Just as an info for curious people... I got finished my long planned but
never finished BASIC for CP/M page at http://www.z80.eu/basic.html .
I added also infos about SUPER STAR TREK, for me it's one of the most
famous BASIC programs I ever started ;-)

Regards
Peter

P.S.: As I already mentioned on the page, I have not made a 100%
complete overview of all published BASIC versions for CP/M. I just
wanted to mention the most common used versions. So Emmanuel, please do
not point out that some very rare vendors are missing ;-)

Mr Emmanuel Roche, France

unread,
Aug 28, 2009, 4:19:25 PM8/28/09
to
Peter Dassow wrote:

> P.S.: As I already mentioned on the page, I have not made a 100%
> complete overview of all published BASIC versions for CP/M. I just
> wanted to mention the most common used versions. So Emmanuel, please do
> not point out that some very rare vendors are missing ;-)

Ok. So, let us read your Web page.

- "BASIC for CP/M - a popular choice"

The PL of the people? As far as I know, no other PL in history was so
successful with non-programmers. Find me a non-programmer able to
write "StarTrek" in "C"...

- "BASIC was the "Ford Model T" of the programming languages"

Hum... There were many PLs before BASIC. As an old COBOL programmer,
FORTRAN, COBOL, ALGOL, and PL/I spring automatically to (my) mind. In
fact, BASIC was created to train students in FORTRAN... However, it
was much simpler than FORTRAN, in general, and could be minimized down
to 3KB, in particular, the size of the "Palo Alto Tiny BASIC Version
3.0" that I published in the comp.os.cpm Newsgroup. This small size
was important at the beginning of microcomputers. For example, Paul
Allen had made on a mainframe and shown a 8K BASIC to MITS. This was
so big that they (Allen, Gates, and Davidoff) spent the next months
making a 4K "Altair BASIC". It is only when the later was running that
Altair BASIC was announced. Advertisements of the time were saying
that an 6KB RAM memory was enough to load 4K "Altair BASIC" and run
some programs.

- "BASIC is a very old programming language."

Really? I was thinking that about 120 PLs were listed in:

- "Programming Languages: History and Fundamentals"
Jean Sammett
Prentice Hall, 1969

And BASIC is *NOT* listed among those 120 PLs... It was the "new kid
on the block", at the time...

- "It was developed 1964 in the Darthmouth College"

It was developed in 1964 at Dartmouth College, in Hanover, New
Hampshire, USA.

- "take a look on the"

look at the

- "MBASIC by MicroSoft"

At the time, it was named "Micro-Soft" (and "Altair BASIC", not
MBASIC. Micro-Soft was calling the CP/M version "BASIC-80").

- "CBASIC by Digital Research"

CBASIC was the descendant of BASIC-E, itself the descendant of NBASIC,
all 3 made by Gordon Eubanks. NBASIC was ported under CP/M by Gary
Kildall. It was integer-only, and became the basis for BASIC-E.. It
was written in PL/M, contrary to "Altair BASIC" which was totally
written in 8080 ASM. BASIC-E was public domain, and used a 8008/8080
Floating Point package from the Intel Software Library. CBASIC was
made by "Compiler Systems, Inc. (Sierra Madre, Ca)" and used BCD
numbers, since it was a "Commercial BASIC" intended for serious
programming. It was bought by Digital Research (as explained in one
InfoWorld article) when DRI decided to have a "Language" division.

- "These two were also sold as compilers."

MBASIC was an interpreter. BASCOM was a compiler, but so incompatible
with MBASIC that you needed to have 2 source code files. You could
not, in general, compile a MBASIC program with BASCOM.

CBASIC was a "p-code compiler". It compiled the program in an INT
(ermediary) file, which was then "interpreted" by CRUN. There never
was an interpreter version.

- "Nevada BASIC was less common used"

commonly used

- "Tiny BASIC was published with source code in 1976"

"Tiny BASIC" is the name of a family of public domain small BASIC
interpreters. The first one, which launched the creation of DDJ, was
TBX (Tiny BASIC eXtended) by Dick Whipple and John Arnold. One could
enter the 3KB of code, published as an Octal dump in the first issue
of DDJ. The second issue contained the source code, again in Octal
(like "Altair BASIC").

- "Remember to exit the interpreter, you have to use 'BYE' instead of
'SYSTEM'."

Normally, if you use a PL, you read its doc before... Else, you can
change its commands, since the source code is provided with Tiny
BASICs.

- "BASIC/E"

BASIC-E(ubanks)

- "BASIC/E was (...) less common used"

commonly used

- "To be honest, may be other, rare"

maybe

- " variations for CP/M exists also"

exist

- "to list all here."

all them, here.

- "there is one worth to be mentioned"

What about SBASIC (Structured BASIC) that James Moxham is trying to
ressurrect? (Since he is a Doctor, let us hope that he will be able to
save his patient!)

My favorite one is COMAL, which is BASIC + Pascal + interpreter +
compiler + full-screen editor... Incredible! When will an English
manual be found for this incredibly powerful PL running under CP/M?
How comes that it was not as successful as Turbo Pascal, since it is
obviously better? (You can call *INTERACTIVELY* assembly language
subroutines! The names of the registers of the CPU are reserved words
of the COMAL interpreter.)

- "One of the most (...) were adapted (...) and were

was ... was

- "Also, to get an impression how it looks"

To show what it looked

(Notice that your "screenshots" are all text-only: You could have
simply redirected the screen output into a file, and pasted the text
in your word-processor. No images needed with text-only programs.)

- "Loading and starting is very simple:"

A>mbasic startrek

- "BASIC-80 Rev. 5.21

"Someone" found Version 5.29, the last one for CP/M, and gave it to
the RetroArchive Web site.

- "a three character command"

3-character

- "here, fun to discover will"

the fun of discovery

- "(c) 2005"

As far as I know, the last time I checked, we were in August 2009...

Well, that's all I found, but I am not a native speaker of English.

Hope it helps.

Yours Sincerely,
Mr. Emmanuel Roche, France

Peter Dassow

unread,
Aug 29, 2009, 4:10:04 AM8/29/09
to
Mr Emmanuel Roche, France wrote:
>
> - "BASIC for CP/M - a popular choice"
>
> The PL of the people? As far as I know, no other PL in history was so
> successful with non-programmers. Find me a non-programmer able to
> write "StarTrek" in "C"...
>
> - "BASIC was the "Ford Model T" of the programming languages"
>
> Hum... There were many PLs before BASIC. As an old COBOL programmer,
> FORTRAN, COBOL, ALGOL, and PL/I spring automatically to (my) mind. In
> fact, BASIC was created to train students in FORTRAN... However, it
> was much simpler than FORTRAN, in general, and could be minimized down
> to 3KB, in particular, the size of the "Palo Alto Tiny BASIC Version
> 3.0" that I published in the comp.os.cpm Newsgroup. This small size
> was important at the beginning of microcomputers. For example, Paul
> Allen had made on a mainframe and shown a 8K BASIC to MITS. This was
> so big that they (Allen, Gates, and Davidoff) spent the next months
> making a 4K "Altair BASIC". It is only when the later was running that
> Altair BASIC was announced. Advertisements of the time were saying
> that an 6KB RAM memory was enough to load 4K "Altair BASIC" and run
> some programs.

So what's the point ? BASIC was still a popular choice.
And for me, because of the simplicity of the language, it was comparable
with a "Model T" because so many used BASIC - and in terms of computer
history, 1964 is not close to 2009.

> - "BASIC is a very old programming language."
>
> Really? I was thinking that about 120 PLs were listed in:
>
> - "Programming Languages: History and Fundamentals"
> Jean Sammett
> Prentice Hall, 1969
>
> And BASIC is *NOT* listed among those 120 PLs... It was the "new kid
> on the block", at the time...

Again, what's the point ? Other languages were less popular at colleges,
schools, universities etc. - even 1969.

> InfoWorld article) when DRI decided to have a "Language" division.
>

> [...] many quoted stuff deleted with useless comments


>
> MBASIC was an interpreter. BASCOM was a compiler, but so incompatible
> with MBASIC that you needed to have 2 source code files. You could
> not, in general, compile a MBASIC program with BASCOM.

I didn't mentioned anything about compatibility. May be that will be a
helpful comment on my page. But my goal was not to teach BASIC.

> CBASIC was a "p-code compiler". It compiled the program in an INT
> (ermediary) file, which was then "interpreted" by CRUN. There never
> was an interpreter version.

I didn't mention that CBASIC was an interpreter.

> - "Nevada BASIC was less common used"
>
> commonly used

Lol. Sorry, in 1983 I owned my first CP/M computer, and it was a time of
... hmmm ... swapping software from time to time... so if somebody had
the possibility to get MBASIC (or BASIC-80, that's not important), he
took it - instead of Nevada BASIC.

> - "Tiny BASIC was published with source code in 1976"
>
> "Tiny BASIC" is the name of a family of public domain small BASIC
> interpreters. The first one, which launched the creation of DDJ, was
> TBX (Tiny BASIC eXtended) by Dick Whipple and John Arnold. One could
> enter the 3KB of code, published as an Octal dump in the first issue
> of DDJ. The second issue contained the source code, again in Octal
> (like "Altair BASIC").

I see no mistake if I stated that it was published with source code.

> - "Remember to exit the interpreter, you have to use 'BYE' instead of
> 'SYSTEM'."
>
> Normally, if you use a PL, you read its doc before... Else, you can
> change its commands, since the source code is provided with Tiny
> BASICs.

Most of the people are starting a program without reading the manual.
That's why "RTFM" exists as an abbreviation.

> - "BASIC/E"
>
> BASIC-E(ubanks)
>
> - "BASIC/E was (...) less common used"
>
> commonly used

No. Please - where is the evidence of your statement.
I wrote this, remembering the time I had my computer, as mentioned
before. BASIC/E wasn't my choice in any case. May be a short time before
CBASIC or BASIC-80 (or MBASIC, choose what you want) was sold, people
took also BASIC/E. But this was a real short period.

> [many stuff deleted]


>
> What about SBASIC (Structured BASIC) that James Moxham is trying to
> ressurrect? (Since he is a Doctor, let us hope that he will be able to
> save his patient!)
>
> My favorite one is COMAL, which is BASIC + Pascal + interpreter +
> compiler + full-screen editor... Incredible! When will an English
> manual be found for this incredibly powerful PL running under CP/M?
> How comes that it was not as successful as Turbo Pascal, since it is
> obviously better? (You can call *INTERACTIVELY* assembly language
> subroutines! The names of the registers of the CPU are reserved words
> of the COMAL interpreter.)

COMAL isn't related with BASIC, except that parts of BASIC were re-used
to develop that language. COMAL is not compatible with BASIC in any
case. Regardless of that, it was an elegant try and I liked it, too.

> (Notice that your "screenshots" are all text-only: You could have
> simply redirected the screen output into a file, and pasted the text
> in your word-processor. No images needed with text-only programs.)

To get a more vintage feeling, I choosed screenshots. So what ?

> - "Loading and starting is very simple:"
>
> A>mbasic startrek
>
> - "BASIC-80 Rev. 5.21
>
> "Someone" found Version 5.29, the last one for CP/M, and gave it to
> the RetroArchive Web site.

I didn't mentioned that it was the latest version. That's not a mistake
to take an earlier version.

>
> Well, that's all I found, but I am not a native speaker of English.
>

Emmanuel,
you aren't acting polite. I am not a native speaker of English, too.
If I was making mistakes, that's one reason why. Another reason why was
it was my first version of the page.
Do you advise me to avoid making vintage computer info pages ?
Maybe (or May be - that's also possible - wow!) I have to block french
web visitors with a bit PHP code, that would help.

Regards
Peter

James Moxham (Dr_Acula)

unread,
Aug 29, 2009, 5:01:30 AM8/29/09
to
>As I already mentioned on the page, I have not made a 100%
>complete overview of all published BASIC versions for CP/M. I just
>wanted to mention the most common used versions.

and

> What about SBASIC (Structured BASIC) that James Moxham is trying to
> ressurrect? (Since he is a Doctor, let us hope that he will be able to
> save his patient!)

Sbasic is my favourite language! It has the basic keywords, but the
structure of C. The best of both languages. I am using it in my home
automation project, so it is very much alive (even if I am the only
person in the world still using it!). So, I would be most grateful if
you could mention it.

Some example sbasic code is in a link right at the bottom of this page
http://smarthome.viviti.com/build

There are not many links to anything about sbasic. The instruction
manual exists inside a disk image on the altair simh, so a google
search won't find them. I might upload the manuals to my website...

Also re BASCOM vs MBASIC, I have a book that describes the
differences. There are not a great number - I think there was about 1
page in the book describing the few instructions that need changing.

Thankyou to Peter for writing this webpage. I look forward to seeing
it grow.

Was there the source code for the startrek program? I'd like to see if
I can get that running.

Bill Buckels

unread,
Aug 29, 2009, 7:03:38 AM8/29/09
to

"Peter Dassow" <z8...@arcor.de> wrote:

>And for me, because of the simplicity of the language, it was comparable
>with a "Model T"

<snip>

Good comparison. Earlier programming languages were more like blimps and
zeppelins and Stanley Steamers and Omnibusses and Diving Bells.

Space Shuttles and C++ came later.

>Do you advise me to avoid making vintage computer info pages ?

Don't do that... but make sure you mention GBASIC for the SoftCard.

>I have to block french web visitors with a bit PHP code, that would help.

Or just use the following disclaimer which should be understood by all
thinking humans regardless of country of origin:)

"Omnem dimittite spem, o vos intrantes".
or :
"Omnes relinquite spes, o vos intrantes".

Peter Dassow

unread,
Aug 29, 2009, 7:59:30 AM8/29/09
to
James Moxham (Dr_Acula) wrote:
>> What about SBASIC (Structured BASIC) that James Moxham is trying to
>> ressurrect? (Since he is a Doctor, let us hope that he will be able to
>> save his patient!)

> Sbasic is my favourite language! It has the basic keywords, but the
> structure of C. The best of both languages. I am using it in my home
> automation project, so it is very much alive (even if I am the only
> person in the world still using it!). So, I would be most grateful if
> you could mention it.

Please help me with additional infos. SBASIC was sold separately
(without a Kaypro) ? What was the last version (I got 5.4) ?
There was only a compiler for it ?
I will mention SBASIC (and offering it for download) after getting some
more infos ;-)

> Was there the source code for the startrek program? I'd like to see if
> I can get that running.

On the same page http://www.z80.eu/startrek/startrek.zip

But it is for sure not running with SBASIC, but good luck to port it, I
really would appreciate it ;-)

Regards
Peter

Katzy

unread,
Aug 29, 2009, 8:54:31 AM8/29/09
to
Hello.

Peter Dassow wrote in message
<4a991823$0$32682$9b4e...@newsspool2.arcor-online.net>...


>James Moxham (Dr_Acula) wrote:
>>> What about SBASIC (Structured BASIC) that James Moxham is trying to
>>> ressurrect? (Since he is a Doctor, let us hope that he will be able to
>>> save his patient!)
>
>> Sbasic is my favourite language! It has the basic keywords, but the
>> structure of C. The best of both languages. I am using it in my home
>> automation project, so it is very much alive (even if I am the only
>> person in the world still using it!). So, I would be most grateful if
>> you could mention it.
>
>Please help me with additional infos. SBASIC was sold separately
>(without a Kaypro) ? What was the last version (I got 5.4) ?
>There was only a compiler for it ?
>I will mention SBASIC (and offering it for download) after getting some
>more infos ;-)


You can download it too at my www.nostalgia8.nl\cpm\basic\sbasic.zip site

From the intro:

1. What is S-BASIC?

S-BASIC stands for "structured BASIC." S-BASIC is a native-code
compiler for a structured dialect of the BASIC programming
language. It runs on 8-bit microcomputers using the Z80 CPU chip
and the CP/M operating system. The compiler and the language it
compiles were developed during the period 1979-1981 by Gilbert
Ohnysty, who saw a need for a true native-code compiler and a
language implementation that preserved BASIC's ease of use and
straight-forward syntax, while incorporating the control-flow
constructs associated with modern programming languages.

The original BASIC programming language was developed by John
Kemeny and Thomas Kurtz at Dartmouth College in 1964. It
borrowed syntax from both FORTRAN and ALGOL, but more heavily
from the former than the latter. S-BASIC reaches back to BASIC's
ALGOL roots to incorporate features from that language
indispensable to the writing of good structured programs,
including local variables, recursion, statement grouping with
BEGIN and END, looping with WHILE and REPEAT statements,
multi-way decisions with a CASE statement, and user-defined
procedures and functions. S-BASIC also incorporates a number of
other useful features: COMMENT and TEXT statements that
eliminate the need for multiple REM or PRINT statements, a FIXED
(binary coded decimal) variable type for financial calculations,
BASED variables that may be positioned at run-time, and a
powerful $INCLUDE command that allows functions and procedures to
be gathered into library files and selectively extracted at
compile time.

>> Was there the source code for the startrek program? I'd like to see if
>> I can get that running.
>
>On the same page http://www.z80.eu/startrek/startrek.zip
>
>But it is for sure not running with SBASIC, but good luck to port it, I
>really would appreciate it ;-)


You can run it with QBasic.

Bye, Katzy.


James Moxham (Dr_Acula)

unread,
Aug 29, 2009, 10:02:13 AM8/29/09
to
I have edited my website with some more info on sbasic. At the bottom
of http://www.smarthome.viviti.com/build

The instruction manual is a single text file that combines all the
help files and code examples on the simh site into one single text
file. I've also included a zip of the 4 files needed to compile a
program. Version 5.4b the same as yours. There is nothing new about
this, but what I have done is incorporated it into an integrated
development environment so you can write the code in a rich text box
and it inserts coloured text eg quotes in red, comments in green. Then
you click one button to compile and it shells out to the simh,
compiles, returns and then downloads the compiled program. So the
entire compile process takes only about 8 seconds.

Re MBASIC and BASCOM, the differences are:
1) ERASE is not allowed (erasing arrays)
2) DIM(20) is allowed but DIM(A) is not allowed (where A is a
variable)
3) COMMON is not allowed
4) CLEAR is not allowed
5) the /E switch is needed if there are any ON ERROR GOTO statements

Apart from that, everything works the same as MBASIC.

I have got the STARTREK program working in MBASIC. It is great fun!
I'm off to conquer the universe now...

Mr Emmanuel Roche, France

unread,
Aug 29, 2009, 11:47:40 AM8/29/09
to
Hello, Peter!

You seem not to have understood some of my remarks.

So, let us try to clarify a few things.

> So what's the point ? BASIC was still a popular choice.
> And for me, because of the simplicity of the language, it was comparable
> with a "Model T" because so many used BASIC - and in terms of computer
> history, 1964 is not close to 2009.

As far as I know, the Ford Model "T" was the first mass-produced car
in history. The equivalent in PLs is FORTRAN, not BASIC, which came
(at least) after COBOL, ALGOL, and PL/I (and LISP). That's why I
suggested "the PL of the People". (My Grand-Father had a Ford Model
"T" in his youth.)

> Again, what's the point ? Other languages were less popular at colleges,
> schools, universities etc. - even 1969.

BASIC became the PL of the people. If you compare it with "C", you
instantly "see" that "C" remained popular in Universities, while BASIC
became the standard of microcomputers. Two different worlds. One
theorical, the other practical.

> > - "Nevada BASIC was less common used"
>
> > commonly used

Ok. It is obvious that I should have written:

"Nevada BASIC was less commonly used."

> > - "BASIC/E was (...) less common used"
>
> > commonly used

Idem: "BASIC-E was (...) less commonly used."

> COMAL isn't related with BASIC, except that parts of BASIC were re-used
> to develop that language. COMAL is not compatible with BASIC in any
> case. Regardless of that, it was an elegant try and I liked it, too.

Personally, I think that COMAL is definitely a member of the BASIC
family, since it is interpreted, rather than compiled like Pascal.
(This debate (interpreted versus compiled) is interesting, since the
original Dartmouth BASIC was compiled, like CBASIC.)

> > (Notice that your "screenshots" are all text-only: You could have
> > simply redirected the screen output into a file, and pasted the text
> > in your word-processor. No images needed with text-only programs.)
>
> To get a more vintage feeling, I choosed screenshots. So what ?

The first CP/M / BASIC computers had no screen...

> I didn't mentioned that it was the latest version. That's not a mistake
> to take an earlier version.

I wanted to mean: You could have used the last CP/M version, since it
is freely available. This way, there is more probability that old
BASIC programs will run without problems with first-time users. Else,
Micro-Soft would not have maintained it. (If you want an earlier
version, a MITS 8800 emulator (for example, the one of Peter Schorn)
will enable you to produce "screenshots" (re-read the above remark)
with the "Altair BASIC 4K Version 3.2" -- if I remember correctly.
Else, "OBASIC" alias Version 4.51 runs under CP/M.)

> you aren't acting polite.

??? I answered your message, took the pain to read your Web page line
by line, making suggestions, and I am not polite?

> Do you advise me to avoid making vintage computer info pages ?

Of course, not. Else, I would not have taken the time to try to help
you improve it.

> Maybe (or May be - that's also possible - wow!) I have to block french
> web visitors with a bit PHP code, that would help.

?!? I help you, and you want to block access to your Web page by
French people? Strange reasoning. I am the only one, so far, who
provided constructive criticism to your Web page.

Do you prefer to remain the only one who reads your Web page?

Peter Dassow

unread,
Aug 29, 2009, 5:55:29 PM8/29/09
to
Mr Emmanuel Roche, France wrote:
> [...]
>> you aren't acting polite.
>
> ??? I answered your message, took the pain to read your Web page line
> by line, making suggestions, and I am not polite?
>
Emmanuel, it's also not what you're telling me, it's the way you do it.
I think you have a lot of knowledge collected, but unfortunately if
you're talking about things, there are two points which makes it hard to
listen... it seems you're accepting at least only one opinion - your
own, and you're are often concentrating yourself on less important
things, e.g. my copyright info at the bottom of the page (who cares
about copyright notices here?) or what expression I'm using to describe
things, what words I have choosen a.s.o.
I like to talk about facts and figures, not about things of no importance.
If you want to talk about my choice of words, plz send it via email.
Not here. Thanks.

Charles Richmond

unread,
Aug 30, 2009, 12:11:49 AM8/30/09
to

That's why they call him "The French Loser"... ;-)

--
+----------------------------------------+
| Charles and Francis Richmond |
| |
| plano dot net at aquaporin4 dot com |
+----------------------------------------+

Henk Siewert

unread,
Aug 30, 2009, 6:04:54 AM8/30/09
to
Mr Emmanuel Roche, France:

Why don't you SHUT UP!

Henk Siewert,
The Netherlands

(Wonder why I never go on hollyday to France....?)

mike7g

unread,
Aug 30, 2009, 6:58:45 AM8/30/09
to


I am just curious, sbasic sounds good-and cp/m BBC Basic is still with
us aswell as DOS & Win32 ( and a Nix version ) but has anyone got an
opinion on bywater basic ( bwbasic ) - their should be a cp/m version
on the net somewhere ( not that i can find it; and its possible ( as
the later versions are GPL lisensed ) that their is source code
available for it also.

actually here are a couple of links, and descrition; and at the end is
a quick history-which seems inceredible if true( btw the download
contains the source so i hope it would be able to compile on a cp/m
system ?? its in the debian repositories-which is a very conservative
Linux distro - so should be a good basic i hope.


Bywater BASIC Interpreter/Shell, version 2.10
---------------------------------------------

Copyright (c) 1993, Ted A. Campbell
for bwBASIC version 2.10, 11 October 1993

-----------------------------------------
snip-----------------------------------------------

1. DESCRIPTION

The Bywater BASIC Interpreter (bwBASIC) implements a large
superset of the ANSI Standard for Minimal BASIC (X3.60-1978)
and a significant subset of the ANSI Standard for Full BASIC
(X3.113-1987) in C. It also offers shell programming facilities
as an extension of BASIC. bwBASIC seeks to be as portable
as possible.

bwBASIC can be configured to emulate features, commands, and
functions available on different types of BASIC interpreters;
see the file INSTALL for further installation information.

The interpreter is fairly slow. Whenever faced with a choice
between conceptual clarity and speed, I have consistently chosen
the former. The interpreter is the simplest design available,
and utilizes no system of intermediate code, which would speed
up considerably its operation. As it is, each line is interpreted
afresh as the interpreter comes to it.

bwBASIC implements one feature not available in previous BASIC
interpreters: a shell command can be entered interactively at the
bwBASIC prompt, and the interpreter will execute it under a
command shell. For instance, the command "dir *.bas" can be
entered in bwBASIC (under DOS, or "ls -l *.bas" under UNIX) and
it will be executed as from the operating system command line.
Shell commands can also be given on numbered lines in a bwBASIC
program, so that bwBASIC can be used as a shell programming
language. bwBASIC's implementation of the RMDIR, CHDIR, MKDIR,
NAME, KILL, ENVIRON, and ENVIRON$() commands and functions
offer further shell-processing capabilities.


2. TERMS OF USE:

This version of Bywater BASIC is released under the terms of the
GNU General Public License (GPL), which is distributed with this
software in the file "COPYING". The GPL specifies the terms
under which users may copy and use the software in this
distribution.

A separate license is available for commercial distribution,
for information on which you should contact the author.

------------------
snip------------------------------------------------------------

http://sourceforge.net/projects/bwbasic/
http://encyclopedia2.thefreedictionary.com/bwBASIC

8. THE STORY OF BYWATER BASIC

This program was originally begun in 1982 by my grandmother, Mrs.
Verda Spell of Beaumont, TX. She was writing the program using
an ANSI C compiler on an Osborne I CP/M computer and although my
grandfather (Lockwood Spell) had bought an IBM PC with 256k of
RAM my grandmother would not use it, paraphrasing George Herbert
to the effect that "He who cannot in 64k program, cannot in 512k."
She had used Microsoft BASIC and although she had nothing against
it she said repeatedly that she didn't understand why Digital
Research didn't "sue the socks off of Microsoft" for version 1.0
of MSDOS and so I reckon that she hoped to undercut Microsoft's
entire market and eventually build a new software empire on
the North End of Beaumont. Her programming efforts were cut
tragically short when she was thrown from a Beaumont to Port
Arthur commuter train in the summer of 1986. I found the source
code to bwBASIC on a single-density Osborne diskette in her
knitting
bag and eventually managed to have it all copied over to a PC
diskette. I have revised it slightly prior to this release. You
should know, though, that I myself am an historian, not a
programmer.


9. COMMUNICATIONS:

email: tc...@delphi.com

mike7g

unread,
Aug 30, 2009, 7:04:46 AM8/30/09
to
Here is the full Man page for anyone interested:

bwbasic (1)
Name

bwbasic - Bywater BASIC interpreter/shell

Bywater BASIC Interpreter/Shell, version 2.10

-------------------------------------------- Copyright (c) 1993, Ted


A. Campbell for bwBASIC version 2.10, 11 October 1993

Contents:

1. DESCRIPTION
2. TERMS OF USE 3. QUICK REFERENCE LIST OF COMMANDS AND FUNCTIONS
4. GENERAL NOTES ON USAGE 5. EXPANDED REFERENCE FOR COMMANDS AND
FUNCTIONS 6. PREDEFINED VARIABLES 7. UNIMPLEMENTED COMMANDS AND
FUNCTIONS and AGENDA FOR DEVELOPMENT 8. THE STORY OF BYWATER BASIC 9.
COMMUNICATIONS

The author wishes to express his thanks to Mr. David MacKenzie, who
assisted in the development Unix installation and configuration for
this version.

1. DESCRIPTION

2. TERMS OF USE:

3. QUICK REFERENCE LIST OF COMMANDS AND FUNCTIONS

Be aware that many of these commands and functions will not be
available unless you have set certain flags in the header files (see
the expanded reference section below for dependencies).

ABS( number )
ASC( string$ )
ATN( number )
CALL subroutine-name
CASE ELSE | IF partial-expression | constant CHAIN [MERGE] file-name
[, line-number] [, ALL] CHDIR pathname
CHR$( number )
CINT( number )
CLEAR
CLOSE [[#]file-number]...
CLS
COMMON variable [, variable...]
COS( number )
CSNG( number )
CVD( string$ )
CVI( string$ )
CVS( string$ )
DATA constant[,constant]...
DATE$
DEF FNname(arg...)] = expression
DEFDBL letter[-letter](, letter[-letter])...
DEFINT letter[-letter](, letter[-letter])...
DEFSNG letter[-letter](, letter[-letter])...
DEFSTR letter[-letter](, letter[-letter])...
DELETE line[-line]
DIM variable(elements...)[variable(elements...)]... DO NUM|UNNUM
DO [WHILE expression]
EDIT
ELSE
ELSEIF
END IF | FUNCTION | SELECT | SUB
ENVIRON variable-string = string
ENVIRON$( variable-string )
EOF( device-number )
ERASE variable[, variable]...
ERL
ERR
ERROR number
EXP( number )
FIELD [#] device-number, number AS string-variable [, number AS string-
variable...] FILES filespec$
FUNCTION
FOR counter = start TO finish [STEP increment] GET [#] device-number
[, record-number]
GOSUB line | label
GOTO line | label
HEX$( number )
IF expression THEN [statement [ELSE statement]] INKEY$
INPUT [# device-number]|[;]["prompt string";]list of variables INSTR
( [start-position,] string-searched$, string-pattern$ ) INT( number )
KILL file-name
LEFT$( string$, number-of-spaces )
LEN( string$ )
LET variable = expression
LINE INPUT [[#] device-number,]["prompt string";] string-variable$
LIST line[-line]
LOAD file-name
LOC( device-number )
LOCATE line, column
LOF( device-number )
LOG( number )
LOOP [UNTIL expression]
LSET string-variable$ = expression
MERGE file-name
MID$( string$, start-position-in-string[, number-of-spaces ] ) MKD$
( number )
MKDIR pathname
MKI$( number )
MKS$( number )
NAME old-file-name AS new-file-name
NEW
NEXT [counter]
OCT$( number )
ON variable GOTO|GOSUB line[,line,line,...]
ON ERROR GOSUB line
OPEN “O"|"I"|"R", [#]device-number, file-name [,record length] file-
name FOR INPUT|OUTPUT|APPEND AS [#]device-number [LEN = record-length]
OPTION BASE number
POS
PRINT [# device-number,][USING format-string$;] expressions... PUT [#]
device-number [, record-number]
QUIT
RANDOMIZE number
READ variable[, variable]...
REM string
RESTORE line
RETURN
RIGHT$( string$, number-of-spaces )
RMDIR pathname
RND( number )
RSET string-variable$ = expression
RUN [line][file-name]
SAVE file-name
SELECT CASE expression
SGN( number )
SIN( number )
SPACE$( number )
SPC( number )
SQR( number )
STOP
STR$( number )
STRING$( number, ascii-value|string$ )
SUB subroutine-name
SWAP variable, variable
SYSTEM
TAB( number )
TAN( number )
TIME$
TIMER
TROFF
TRON
VAL( string$ )
WEND
WHILE expression
WIDTH [# device-number,] number
WRITE [# device-number,] element [, element ]....

4. GENERAL NOTES ON USAGE:

4.a. Interactive Environment

An interactive environment is provided if the flag INTERACTIVE is
defined as TRUE in bwbasic.h, so that a line with a line number can be
entered at the bwBASIC prompt and it will be added to the program in
memory.

Line numbers are not strictly required, but are useful if the
interactive environment is used for programming. For longer program
entry one might prefer to use an ASCII text editor, and in this case
lines can be entered without numbers. One can use DO NUM and DO UNNUM
to number or unnumber lines. See also the documentation below for the
pseudo-command EDIT.

4.b. Naming Conventions

Command names and function names are not case sensitive, so that “Run”
and “RUN” and “run” are equivalent and “abs()" and “ABS()” and “Abs()”
are equivalent. HOWEVER, variable names ARE case sensitive in bwbASIC,
so that “d$” and “D$" are different variables. This differs from some
BASIC implementations where variable names are not case sensitive.

Variable names can use any alphabetic characters, the period and
underscore characters and decimal digits (but not in the first
position). They can be terminated with ‘#’ or ‘!’ to allow Microsoft-
type names, even though the precision is irrelevant to bwBASIC.

4.c. Numerical Constants

Numerical constants may begin with a digit 0-9 (decimal), with the
“&H” or “&h” (hexadecimal) or the “&o” or “&O” (octal). Decimal
numbers may terminated with ‘E’, ‘e’, ‘D’, or ‘d’ followed by an
exponent number to denote exponential notation. Decimal constants may
also be terminated by the ‘#’ or ‘!’ to comply with Microsoft-style
precision terminators, although the precision specified will be
irrelevant to bwBASIC.

4.d. Command-Line Execution

A filename can be specified on the command line and will be LOADed and
RUN immediately, so that the command line

bwbasic prog.bas

will load and execute “prog.bas".

4.e. Program Storage

All programs are stored as ASCII text files.

4.f. TRUE and FALSE

TRUE is defined as -1 and FALSE is defined as 0 in the default
distribution of bwBASIC. These definitions can be changed by those
compiling bwBASIC (see file BWBASIC.H).

4.g. Assignments

Assignment must be made to variables. This differs from some
implementations of BASIC where assignment can be made to a function.
Implication: “INSTR( 3, x$, y$ ) = z$” will not work under bwBASIC.

4.h. Operators and Precedence

bwBASIC recognizes the following operators, with their level of
precedence given (1 = highest):

^
1 exponentiation
*
2 multiplication
/
2 division
3
integer division
+
5 addition
-
5 subtraction
=
6 equality or assignment
MOD
4 modulus (remainder) arithmetic
<>
7 inequality
<
8 less than
>
9 greater than
<=
10 less than or equal to
=<
10 less than or equal to
>=
11 greater than or equal to
=>
11 greater than or equal to
NOT
12 negation
AND
13 conjunction
OR
14 disjunction
XOR
15 exclusive or
IMP
16 implication
EQV
17 equivalence

4.h. Numerical Precision (NOT)

bwBASIC utilizes numbers with only one level of precision. If the flag
NUMBER_DOUBLE is defined as TRUE in bwbasic.h, the precision
implemented will be that of the C “double” data type; otherwise
(default) the precision will be that of the C “float" type. At a
number of points there are commands (or pseudocommands) that seem to
recognize Microsoft-style precision distinctions, but for the most
part these are just work-around aliases to allow Microsoft-style
programs to be run.

5. EXPANDED REFERENCE FOR COMMANDS AND FUNCTIONS

The “Dependencies” listed in the following reference materials refers
to flags that must be set to TRUE in bwbasic.h for the associated
command or function to be implemented. These flags are as follows:

(core)
Commands and Functions in any implementation of bwBASIC; these are
the ANSI Minimal BASIC core

INTERACTIVE
Commands supporting the interactive programming environment

COMMON_CMDS
Commands beyond ANSI Minimal BASIC which are common to Full ANSI
BASIC and Microsoft BASICs

COMMON_FUNCS
Functions beyond the ANSI Minimal BASIC core, but common to both
ANSI Full BASIC and Microsoft-style BASIC varieties

UNIX_CMDS
Commands which require Unix-style directory and environment
routines not specified in C

STRUCT_CMDS
Commands related to structured programming; all of these are part
of the Full ANSI BASIC standard

ANSI_FUNCS
Functions unique to ANSI Full BASIC

MS_CMDS
Commands unique to Microsoft BASICs

MS_FUNCS
Functions unique to Microsoft BASICs

-----------------------------------------
Function: ABS( number )

Description: ABS returns the absolute value of the argument ‘number’.

Dependencies: (core)

-----------------------------------------
Function: ASC( string$ )

Description: ASC returns the ASCII code for the first letter in the
argument string$.

Dependencies: MS_FUNCS

-----------------------------------------
Function: ATN( number )

Description: ATN returns the arctangent value of the argument ‘number’
in radians.

Dependencies: (core)

-----------------------------------------

Command:
CALL subroutine-name

Description: CALL calls a named subroutine (see SUB and END SUB).

Dependencies: STRUCT_CMDS

-----------------------------------------

Command:
CASE ELSE | IF partial-expression | constant

Description: CASE introduces an element of a SELECT CASE statement
(see SELECT CASE). CASE IF introduces a conditional SELECT CASE
element, and CASE ELSE introduces a default SELECT CASE element.

Dependencies: STRUCT_CMDS

-----------------------------------------

Command:
CHAIN [MERGE] file-name [, line-number] [, ALL]

Description: CHAIN passes control to another BASIC program. Variables
declared COMMON (q.v.) will be passed to the new program.

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
CHDIR pathname$

Description: CHDIR changes the current directory to that indicated by
the argument pathname$.

Dependencies: UNIX_CMDS

-----------------------------------------
Function: CHR$( number )

Description: CHR$ returns a one-character string with the character
corresponding to the ASCII code indicated by argument ‘number’.

Dependencies: COMMON_FUNCS

-----------------------------------------
Function: CINT( number )

Description: CINT returns the truncated integer for the argument
‘number’.

Dependencies: MS_FUNCS

-----------------------------------------

Command:
CLEAR

Description: CLEAR sets all numerical variables to 0, and all string
variables to null.

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
CLOSE [[#]file-number]...

Description: CLOSE closes the file indicated by file-number (see
OPEN).

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
CLS

Description: CLS clears the display screen (IBM and compatibles only
as of version 2.10).

Dependencies: IMP_IQC and IMP_CMDLOC

-----------------------------------------

Command:
CMDS

Description: CMDS is a debugging command that prints a list of all
implemented bwBASIC commands.

Dependencies: DEBUG

-----------------------------------------

Command:
COMMON variable [, variable...]

Description: COMMON designates variables to be passed to a CHAINed
program (see CHAIN).

Dependencies: COMMON_CMDS

-----------------------------------------
Function: COS( number )

Description: COS returns the cosine of the argument ‘number’ in
radians.

Dependencies: (core)

-----------------------------------------
Function: CSNG( number )

Description: CSNG is a pseudo-function that has no effect under
bwBASIC. It replicates a Microsoft-type command that would convert the
‘number’ to single-precision.

Dependencies: MS_FUNCS

-----------------------------------------
Function: CVD( string$ )

Description: CVD converts the argument string$ into a bwBASIC number
(precision is irrelevant in bwBASIC since bwBASIC numbers have only
one precision).

Implementation-Specific Notes:

CVD(), CVI(), CVS(), MKI$(), MKD$(), MKS$(): These functions are
implemented, but are dependent on a) the sizes for integer, float, and
double values on particular systems, and b) how particular versions of
C store these numerical values. The implication is that data files
created using these functions on a DOS-based microcomputer may not be
translated correctly by bwBASIC running on a Unix-based computer.
Similarly, data files created by bwBASIC compiled by one version of C
may not be readable by bwBASIC compiled by another version of C (even
under the same operating system). So be careful with these.

Dependencies: MS_FUNCS

-----------------------------------------
Function: CVI( string$ )

Description: CVI converts the argument string$ into a bwBASIC number
(precision is irrelevant in bwBASIC since bwBASIC numbers have only
one precision; see also the note on CVD).

Dependencies: MS_FUNCS

-----------------------------------------
Function: CVS( string$ )

Description: CVI converts the argument string$ into a bwBASIC number
(precision is irrelevant in bwBASIC since bwBASIC numbers have only
one precision; see also the note on CVD).

Dependencies: MS_FUNCS

-----------------------------------------

Command:
DATA constant[,constant]...

Description: DATA stores numerical and string constants to be accessed
by READ (q.v.).

Dependencies: (core)

-----------------------------------------
Function: DATE$

Description: DATE$ returns the current date based on the computer’s
internal clock as a string in the form “YYYY-MM-DD". As implemented
under bwBASIC, DATE$ cannot be used for assignment (i.e., to set the
system date).

Note:
bwBASIC presently (v2.10) does not allow assignment to a function.

Dependencies: COMMON_FUNCS

-----------------------------------------

Command:
DEF FNname(arg...)] = expression

Description: DEF defines a user-written function. This function
corresponds to Microsoft-type implementation, although in bwBASIC DEF
is a working equivalent of FUNCTION.

Dependencies: (core)

-----------------------------------------

Command:
DEFDBL letter[-letter](, letter[-letter])...

Description: DEFDBL declares variables with single-letter names as
numerical variables (precision is irrelevant in bwBASIC).

Dependencies: MS_CMDS

-----------------------------------------

Command:
DEFINT letter[-letter](, letter[-letter])...

Description: DEFINT declares variables with single-letter names as
numerical variables (precision is irrelevant in bwBASIC).

Dependencies: MS_CMDS

-----------------------------------------

Command:
DEFSNG letter[-letter](, letter[-letter])...

Description: DEFSNG declares variables with single-letter names as
numerical variables (precision is irrelevant in bwBASIC).

Dependencies: MS_CMDS

-----------------------------------------

Command:
DEFSTR letter[-letter](, letter[-letter])...

Description: DEFSTR declares variables with single-letter names as
string variables.

Dependencies: MS_CMDS

-----------------------------------------

Command:
DELETE line[-line]

Description: DELETE deletes program lines indicated by the argument
(s). If you want to use DELETE for nonnumbered programs, first use DO
NUM, then DELETE, then DO UNNUM.

Dependencies: INTERACTIVE

-----------------------------------------

Command:
DIM variable(elements...)[variable(elements...)]...

Description: DIM specifies variables that have more than one element
in a single dimension, i.e., arrayed variables.

Note:
As implemented under bwBASIC, DIM accepts only parentheses as
delimiters for variable fields. (Some BASICs allow the use of square
brackets.)

Dependencies: (core)

-----------------------------------------

Command:
DO NUM|UNNUM

Description: DO NUM numbers all lines in a program. The first line is
given the number 10, and subsequent lines are numbered consecutively
in multiples of 10. DO UNNUM removes all line numbers from a program.
NOTE that these functions do nothing to line numbers, e.g., following
a GOSUB or GOTO statement; these commands cannot be used as a
replacement for RENUM (available in some systems, but not bwBASIC).
With these commands, however, one can develop unnumbered programs by
entering new lines with numbers, then running DO UNNUM to remove the
line numbers. Together with LOAD and SAVE (q.v.) one can use bwBASIC
as a primitive text editor.

Dependencies: INTERACTIVE

-----------------------------------------

Command:
DO [WHILE expression]

Description: DO implements a number of forms of program loops.
DO...LOOP simply loops; the only way out is by EXIT; DO WHILE...LOOP
loops while “expression” is true (this is equivalent to the older
WHILE-WEND loop, also implemented in bwBASIC); DO...LOOP UNTIL loops
until the expression following UNTIL is true.

Dependencies: STRUCT_CMDS

-----------------------------------------

Command:
EDIT

Description: EDIT is a pseudo-command which calls the text editor
specified in the variable BWB.EDITOR$ to edit the program in memory.
After the call to the text editor, the (edited) program is reloaded
into memory. The user normally must specific a valid path and filename
in BWB.EDITOR$ before this command will be useful.

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
ELSE

Description: ELSE introduces a default condition in a multi-line IF
statement.

Dependencies: STRUCT_CMDS

-----------------------------------------

Command:
ELSEIF

Description: ELSEIF introduces a secondary condition in a multiline IF
statement.

Dependencies: STRUCT_CMDS

-----------------------------------------

Command:
END IF | FUNCTION | SELECT | SUB

Description: END IF ends a multi-line IF statement. END FUNCTION ends
a multi-line function definition. END SELECT ends a SELECT CASE
statement. END SUB ends a multiline subroutine definition.

Dependencies: STRUCT_CMDS

-----------------------------------------

Command:
ENVIRON variable-string$ = string$

Description: ENVIRON sets the environment variable identified by
variable-string$ to string$.

It might be noted that this differs from the implementation of ENVIRON
in some versions of BASIC, but bwBASIC’s ENVIRON allows BASIC
variables to be used on either side of the equals sign. Note that the
function ENVIRON$() is different from the command, and be aware of the
fact that in some operating systems an environment variable set within
a program will not be passed to its parent shell.

Dependencies: UNIX_CMDS

-----------------------------------------
Function: ENVIRON$( variable-string$ )

Description: ENVIRON$ returns the environment variable associated with
the name variable-string$.

Dependencies: MS_FUNCS

-----------------------------------------
Function: EOF( device-number )

Description: EOF returns TRUE (-1) if the device associated with
device-number is at the end-of-file, otherwise it returns FALSE (0).

Dependencies: MS_FUNCS

-----------------------------------------

Command:
ERASE variable[, variable]...

Description: ERASE eliminates arrayed variables from a program.

Dependencies: COMMON_CMDS

-----------------------------------------
Function: ERL

Description: ERL returns the line number of the most recent error.

Dependencies: MS_FUNCS

-----------------------------------------
Function: ERR

Description: ERR returns the error number of the most recent error.

Note that if PROG_ERRORS has been defined when bwBASIC is compiled,
the ERR variable will not be set correctly upon errors. It only works
when standard error messages are used.

Dependencies: MS_FUNCS

-----------------------------------------

Command:
ERROR number

Description: ERROR simulates an error, i.e., displays the message
appropriate for that error. This command is helpful in writing ON
ERROR GOSUB routines that can identify a few errors for special
treatment and then ERROR ERR (i.e., default handling) for all others.

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
EXIT [FOR]

Description: EXIT by itself exits from a DO...LOOP loop; EXIT FOR
exits from a FOR...NEXT loop.

Dependencies: STRUCT_CMDS

-----------------------------------------
Function: EXP( number )

Description: EXP returns the exponential value of ‘number’.

Dependencies: (core)

-----------------------------------------

Command:
FIELD [#] device-number, number AS string-variable$ [, number AS
string-variable$...]

Description: FIELD allocates space in a random file buffer for device
indicated by device-number, allocating ‘number’ bytes and assigning
the bytes at this position to the variable string-variable$.

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
FILES filespec$

Description: FILES is a pseudocommand that invokes the directory
program specified in the variable BWB.FILES$ with the argument filespec
$. Normally, the user must set this variable before FILES can be used.
E.g., for PC-type computers,

BWB.FILES$ = “DIR"

will work, for Unix machines,

BWB.FILES$ = “ls -l"

etc.

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
FNCS

Description: CMDS is a debugging command that prints a list of all pre-
defined bwBASIC functions.

Dependencies: DEBUG

-----------------------------------------

Command:
FUNCTION

Description: FUNCTION introduces a function definition, normally
ending with END FUNCTION. In bwBASIC, FUNCTION and DEF are working
equivalents, so either can be used with single-line function
definitions or with multiline definitions terminated by END FUNCTION.

Dependencies: STRUCT_CMDS

-----------------------------------------

Command:
FOR counter = start TO finish [STEP increment]

Description: FOR initiates a FOR-NEXT loop with the variable ‘counter’
initially set to ‘start’ and incrementing in ‘increment’ steps
(default is 1) until ‘counter’ equals ‘finish’.

Dependencies: (core)

-----------------------------------------

Command:
GET [#] device-number [, record-number]

Description: GET reads the next record from a random-access file or
device into the buffer associated with that file. If record-number is
specified, the GET command reads the specified record.

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
GOSUB line | label

Description: GOSUB initiates a subroutine call to the line (or label)
specified. The subroutine must end with RETURN.

Dependencies: (core), but STRUCT_CMDS for labels

-----------------------------------------

Command:
GOTO line | label

Description: GOTO branches program execution to the specified line (or
label).

Dependencies: (core), but STRUCT_CMDS for labels

-----------------------------------------
Function: HEX$( number )

Description: HEX$ returns a string giving the hexadecimal (base 16)
value for the ‘number’.

Dependencies: MS_FUNCS

-----------------------------------------

Command:
IF expression THEN [statement [ELSE statement]]

Description: IF evaluates ‘expression’ and performs the THEN statement
if it is true or (optionally) the ELSE statement if it is FALSE. If
STRUCT_CMDS is set to TRUE, bwBASIC allows multi-line IF statements
with ELSE and ELSEIF cases, ending with END IF.

Dependencies: (core), STRUCT_CMDS for multi-line IF statements

-----------------------------------------
Function: INKEY$

Description: INKEY$ reads the status of the keyboard, and a single
keypress, if available. If a keypress is not available, then INKEY$
immediately returns a null string (""). Currently (v2.10) implemented
in bwx_iqc.c only.

Dependencies: IMP_IQC and IMP_CMDLOC

-----------------------------------------

Command:
INPUT [# device-number]|[;]["prompt string";]list of variables

Description: INPUT allows input from the terminal or a device
specified by device-number. If terminal, the “prompt string” is
output, and input is assigned to the appropriate variables specified.

bwBASIC does not support the optional feature of INPUT that suppresses
the carriage-return and line-feed at the end of the input. This is
because C alone does not provide for any means of input other than CR-
LF-terminated strings.

Dependencies: (core)

-----------------------------------------
Function: INSTR( [start-position,] string-searched$, string-pattern$ )

Description: INSTR returns the position at which string-pattern$
occurs in string-searched$, beginning at start-position. As
implemented in bwBASIC, INSTR cannot be used for assignments.

Note:
bwBASIC presently (v2.10) does not allow assignment to a function.

Dependencies: MS_FUNCS

-----------------------------------------
Function: INT( number )

Description: INT returns the largest integer less than or equal to the
argument ‘number’. NOTE that this is not a “truncated" integer
function, for which see CINT.

Dependencies: (core)

-----------------------------------------

Command:
KILL file-name$

Description: KILL deletes the file specified by file-name$.

Dependencies: UNIX_CMDS

-----------------------------------------
Function: LEFT$( string$, number-of-spaces )

Description: LEFT$ returns a substring a string$ with number-of-spaces
from the left (beginning) of the string). As implemented under
bwBASIC, it cannot be used for assignment.

Dependencies: MS_FUNCS

-----------------------------------------
Function: LEN( string$ )

Description: LEN returns the length in bytes of string$.

Dependencies: COMMON_FUNCS

-----------------------------------------

Command:
LET variable = expression

Description: LET assigns the value of ‘expression’ to the variable. As
currently implemented, bwBASIC supports implied LET statements (e.g.,
“X = 4.5678” at the beginning of a line or line segment, but does not
support assignment to multiple variables (e.g., “x, y, z = 3.141596").

Dependencies: (core)

-----------------------------------------

Command:
LINE INPUT [[#] device-number,]["prompt string";] string-variable$

Description: LINE INPUT reads entire line from the keyboard or a file
or device into string-variable$. If input is from the keyboard
(stdin), then “prompt string” will be printed first. Unlike INPUT,
LINE INPUT reads a whole line, not stopping for comma-delimited data
items.

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
LIST line[-line]

Description: LIST lists program lines as specified in its argument.

Dependencies: INTERACTIVE

-----------------------------------------

Command:
LOAD file-name

Description: LOAD loads an ASCII BASIC program into memory.

Dependencies: INTERACTIVE

-----------------------------------------
Function: LOC( device-number )

Description: LOC returns the next record that GET or PUT statements
will use.

Dependencies: MS_FUNCS

-----------------------------------------

Command:
LOCATE line, column

Description: LOCATE addresses trhe curor to a specified line and
column. Currently (v2.10) implemented in bwx_iqc.c only.

Dependencies: IMP_IQC and IMP_CMDLOC

-----------------------------------------
Function: LOF( device-number )

Description: LOF returns the length of a file (specified by device-
number) in bytes.

Dependencies: MS_FUNCS

-----------------------------------------
Function: LOG( number )

Description: LOG returns the natural logarithm of the argument
‘number’.

Dependencies: (core)

-----------------------------------------

Command:
LOOP [UNTIL expression]

Description: LOOP terminates a program loop: see DO.

Dependencies: STRUCT_CMDS

-----------------------------------------

Command:
LSET string-variable$ = expression

Description: LSET transfers data from ‘expression’ to the left-hand
side of a string variable or random access buffer field.

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
MERGE file-name

Description: MERGE adds program lines from ‘file-name’ to the program
in memory. Unlike LOAD, it does not clear the program currently in
memory.

Dependencies: COMMON_CMDS

-----------------------------------------
Function: MID$( string$, start-position-in-string[, number-of-
spaces ] )

Description: MID$ returns a substring of string$ beginning at start-
position-in-string and continuing for number-of-spaces bytes.

Dependencies: MS_FUNCS

-----------------------------------------

Command:
MKDIR pathname$

Description: MKDIR creates a new directory path as specified by
pathname$.

Dependencies: UNIX_CMDS

-----------------------------------------
Function: MKD$( number )

Description: MKD$, MKI$, and MKS$ are all equivalent in bwBASIC. They
convert the numerical value ‘number’ into a string which can be stored
in a more compressed form in a file (especially for random file
access). Since bwBASIC does not recognize differences in precision,
these commands are effectively equivalent.

Dependencies: MS_FUNCS

-----------------------------------------
Function: MKI$( number )

Description: Equivalent to MKD$ (q.v.)

Dependencies: MS_FUNCS

-----------------------------------------
Function: MKS$( number )

Description: Equivalent to MKD$ (q.v.).

Dependencies: MS_FUNCS

-----------------------------------------

Command:
NAME old-file-name AS new-file-name

Description: NAME renames an existing file (old-file-name) as new-file-
name.

Dependencies: UNIX_CMDS

-----------------------------------------

Command:
NEW

Description: NEW deletes the program in memory and clears all
variables.

Dependencies: INTERACTIVE

-----------------------------------------

Command:
NEXT [counter-variable]

Description: NEXT comes at the end of a FOR-NEXT loop; see FOR.

Dependencies: (core)

-----------------------------------------
Function: OCT$( number )

Description: OCT$ returns a string giving the octal (base 8)
representation of ‘number’.

Dependencies: MS_FUNCS

-----------------------------------------

Command:
ON variable GOTO|GOSUB line[,line,line,...]

Description: ON either branches (GOTO) or calls a subroutine (GOSUB)
based on the rounded value of variable; if it is 1, the first line is
called, if 2, the second line is called, etc.

Dependencies: (core)

-----------------------------------------

Command:
ON ERROR GOSUB line|label

Description: ON ERROR sets up an error handling subroutine. See also
ERROR.

Dependencies: COMMON_CMDS, STRUCT_CMDS for labels

-----------------------------------------

Command:
OPEN “O"|"I"|"R", [#]device-number, file-name [,record length]
file-name FOR INPUT|OUTPUT|APPEND AS [#]device-number [LEN = record-
length]

Description: OPEN allocates random access memory for access to a disk
file or other device. Note that two quite different forms of the OPEN
statement are supported. In the first form, “O” (note that these
letters must be encased in quotation marks) denotes sequential output,
“I” denotes sequential input, and “R” denotes random-access input and
output. Once OPEN, any number of operations can be performed on a
device (see WRITE #, INPUT #, PRINT #, etc.).

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
OPTION BASE number

Description: OPTION BASE sets the lowest value for array subscripts,
either 0 or 1.

Dependencies: (core)

-----------------------------------------
Function: POS

Description: POS returns the current cursor position in the line.

Dependencies: COMMON_FUNCS

-----------------------------------------

Command:
PRINT [# device-number,][USING format-string$;] expressions...

Description: PRINT outputs text to the screen or to a file or device
specified by device-number. In the current implementation of bwBASIC,
expressions to be printed must be separated by the comma (tabbed
output), the semicolon (immediate sequential output) or the plus sign
(immediate sequential output by string concatenation). Expressions
separated by blanks or tabs are not supported. If USING is specified,
a number of formatting marks may appear in the format string:

!
prints the first character of a string

prints 2+x characters of a string, where x = the number of spaces
between the backslashes

&
variable-length string field

#
represents a single digit in output format for a number

.
decimal point in a number

+
sign of a number (will output + or -)

-
trailing minus after a number

** fill leading spaces with asterisks

$$ output dollar sign in front of a number

^^ output number in exponential format

_
output next character literally

As currently implemented, the exponential format will be that used by
the C compiler.

Dependencies: (core), COMMON_FUNCS for USING

-----------------------------------------

Command:
PUT [#] device-number [, record-number]

Description: PUT outputs the next available record or the record
specified by record-number to the file or device denoted by device-
number.

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
QUIT

Description: QUIT is a synonym for SYSTEM; with INTERACTIVE
environment, it exits the program to the operating system (or the
calling program).

Dependencies: INTERACTIVE

-----------------------------------------

Command:
RANDOMIZE number

Description: RANDOMIZE seeds the random number generator (see RND).
Under bwBASIC, the TIMER function (q.v.) can be used to supply a
‘number’ seed for the random number generator.

Dependencies: (core)

-----------------------------------------

Command:
READ variable[, variable]...

Description: READ reads values from DATA statements and assigns these
values to the named variables. Variable types in a READ statement must
match the data types in DATA statements as they are occurred. See also
DATA and RESTORE.

Dependencies: (core)

-----------------------------------------

Command:
REM string

Description: REM allows remarks to be included in a program. As
currently implemented, the entire line following REM is ignored by the
interpreter (thus, even if MULTISEG_LINES is set, a REM line will not
be able to find a segment delimiter (":") followed by another line
segment with command. bwBASIC does not currently implement the
Microsoft-style use of the single quotation mark to denote remarks.

Dependencies: (core)

-----------------------------------------

Command:
RESTORE line

Description: RESTORE resets the line and position counters for DATA
and READ statements to the top of the program file or to the beginning
of the specified line. (Currently this must be a line number.)

Dependencies: (core)

-----------------------------------------

Command:
RETURN

Description: RETURN concludes a subroutine called by GOSUB.

Dependencies: (core)

-----------------------------------------
Function: RIGHT$( string$, number-of-spaces )

Description: RIGHT$ returns a substring a string$ with number-of-
spaces from the right (end) of the string). As implemented under
bwBASIC, it cannot be used for assignment.

Dependencies: MS_FUNCS

-----------------------------------------

Command:
RMDIR pathname

Description: RMDIR deletes the directory path indicated by pathname.

Dependencies: UNIX_CMDS

-----------------------------------------
Function: RND( number )

Description: RND returns a pseudo-random number. The ‘number’ value is
ignored by bwBASIC if supplied. The RANDOMIZE command (q.v.) reseeds
the random-number generator.

Dependencies: (core)

-----------------------------------------

Command:
RSET string-variable$ = expression

Description: RSET transfers data from ‘expression’ to the right-hand
side of a string variable or random access buffer field.

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
RUN [line][file-name$]

Description: RUN executes the program in memory. If a file-name$ is
supplied, then the specified file is loaded into memory and executed.
If a line number is supplied, then execution begins at that line.

Dependencies: INTERACTIVE

-----------------------------------------

Command:
SAVE file-name$

Description: SAVE saves the program in memory to file-name$. bwBASIC
only saves files in ASCII format.

Dependencies: INTERACTIVE

-----------------------------------------

Command:
SELECT CASE expression

Description: SELECT CASE introduces a multi-line conditional selection
statement. The expression given as the argument to SELECT CASE will be
evaluated by CASE statements following. The SELECT CASE statement
concludes with an END SELECT statement.

As currently implemented, CASE statements may be followed by string
values, but in this case only simple comparisons (equals, not equals)
can be performed.

Dependencies: STRUCT_CMDS

-----------------------------------------
Function: SGN( number )

Description: SGN returns the sign of the argument ‘number’, +1 for
positive numbers, 0 for 0, and -1 for negative numbers.

Dependencies: (core)

-----------------------------------------
Function: SIN( number )

Description: SIN returns the sine of the argument ‘number’ in radians.

Dependencies: (core)

-----------------------------------------
Function: SPACE$( number )

Description: SPACE$ returns a string of blank spaces ‘number’ bytes
long.

Dependencies: MS_FUNCS

-----------------------------------------
Function: SPC( number )

Description: SPC returns a string of blank spaces ‘number’ bytes long.

Dependencies: MS_FUNCS

-----------------------------------------
Function: SQR( number )

Description: SQR returns the square root of the argument ‘number’.

Dependencies: (core)

-----------------------------------------

Command:
STOP

Description: STOP interrupts program execution. As implemented under
bwBASIC, STOP issues a SIGINT signal.

Dependencies: (core)

-----------------------------------------
Function: STR$( number )

Description: STR$ returns a string giving the decimal (base 10)
representation of the argument ‘number’.

Dependencies: COMMON_FUNCS

-----------------------------------------
Function: STRING$( number, ascii-value|string$ )

Description: STRING$ returns a string ‘number’ bytes long consisting
of either the first character of string$ or the character answering to
the ASCII value ascii-value.

Dependencies: MS_FUNCS

-----------------------------------------

Command:
SUB subroutine-name

Description: SUB introduces a named, multi-line subroutine. The
subroutine is called by a CALL statement, and concludes with an END
SUB statement.

Dependencies: STRUCT_CMDS

-----------------------------------------

Command:
SWAP variable, variable

Description: SWAP swaps the values of two variables. The two variables
must be of the same type (either numerical or string).

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
SYSTEM

Description: SYSTEM exits from bwBASIC to the calling program or (more
usually) the operating system.

Dependencies: INTERACTIVE

-----------------------------------------
Function: TAB( number )

Description: TAB outputs spaces until the column indicated by ‘number’
has been reached.

Dependencies: (core)

-----------------------------------------
Function: TAN( number )

Description: TAN returns the tangent of the argument ‘number’ in
radians.

Dependencies: (core)

-----------------------------------------
Function: TIME$

Description: TIME$ returns the current time based on the computer’s
internal clock as a string in the form “HH-MM-SS". As implemented
under bwBASIC, TIME$ cannot be used for assignment (i.e., to set the
system time).

Note:
bwBASIC presently (v2.10) does not allow assignment to a function.

Dependencies: COMMON_FUNCS

-----------------------------------------
Function: TIMER

Description: TIMER returns the time in the system clock in seconds
elapsed since midnight.

Dependencies: MS_FUNCS

-----------------------------------------

Command:
TROFF

Description: TROFF turns of the trace facility; see TRON.

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
TRON

Description: TRON turns on the trace facility. This facility will
print each line number in square brackets as the program is executed.
This is useful in debugging programs with line numbers. To debug an
unnumbered program with TRON, call DO NUM first, but remember to call
DO UNNUM before you save the program later.

Dependencies: COMMON_CMDS

-----------------------------------------
Function: VAL( string$ )

Description: VAL returns the numerical value of the string$.

Dependencies: COMMON_FUNCS

-----------------------------------------

Command:
VARS

Description: VARS is a debugging command which prints a list of all
variables defined which have global scope.

Dependencies: DEBUG

-----------------------------------------

Command:
WEND

Description: WEND concludes a WHILE-WEND loop; see WHILE.

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
WHILE expression

Description: WHILE initiates a WHILE-WEND loop. The loop ends with
WEND, and execution reiterates through the loop as long as the
‘expression’ is TRUE (-1).

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
WIDTH [# device-number,] number

Description: WIDTH sets screen or device output to ‘number’ columns.
device-number specifies the device or file for output.

Dependencies: COMMON_CMDS

-----------------------------------------

Command:
WRITE [# device-number,] element [, element ]....

Description: WRITE outputs variables to the screen or to a file or
device specified by device-number. Commas are inserted between
expressions output, and strings are enclosed in quotation marks.

Dependencies: COMMON_CMDS

-----------------------------------------

6. PREDEFINED VARIABLES

BWB.EDITOR$
BWB.FILES$
BWB.PROMPT$
BWB.IMPLEMENTATION$

The commands EDIT and FILES are pseudo-commands that launch shell
programs named in the variables BWB.EDITOR$ and BWB.FILES$,
respectively. The default values for these variables can be changed in
bwbasic.h (DEF_EDITOR and DEF_FILES), or they can be changed on the
fly by the user. An idea might be to initialize these variables in
“profile.bas” for specific implementations; for instance, BWB.FILES$
might be defined as “ls -l” on Unix systems or “dir” on DOS systems.

The preset variable BWB.PROMPT$ can be used to set the prompt string
for bwBASIC. Again, it is suggested that a userselected prompt can be
set up in a “profile.bas” to be initialized each time bwBASIC starts.
Note that special characters can be added to the prompt string, e.g.,

BWB.PROMPT$ = “Ok"+CHR$(10)

will give an “Ok” prompt followed by a linefeed.

The preset variable BWB.IMPLEMENTATION$ will return “TTY” for the
bwx_tty implementation and will return “IQC” for the IBM PC or
Compatibles with QuickC (bwx_iqc) implementation. This may be useful
in determining which commands and functions (specifically CLS, LOCATE,
and INKEY$) may be available.

7. UNIMPLEMENTED COMMANDS AND FUNCTIONS, and AGENDA FOR DEVELOPMENT

There are some items not implemented that have been so long a part of
standard BASICs that their absence will seem surprising. In each case,
though, their implementation would require operating-system-specific
functions or terminal-specific functions
that cannot be universally provided. Some specific examples:

CLOAD
Relies on CP/M or MSDOS conventions for binary executable files.

CONT
See RESUME below (programmer ignorance?).

DEF USR
Relies on CP/M or MSDOS conventions for binary executable files.

FRE()
The ability to report the amount of free memory remaining is
system-specific due to varying patterns of memory allocation and
access; consequently this ability is not present in ANSI or earlier
versions of C and this function is not available in bwBASIC.

INPUT$() C by itself is not able to read unechoed keyboard input, and
can read keyboard input only after a Carriage-Return has been entered.

INP
Calls to hardware ports, like machine-language routines, are
highly system-specific and cannot be implemented in C alone.

LLIST
See LPRINT below.

LPOS
See LPRINT below.

LPRINT
and LLIST, etc., require access to a printer device, and this
varies from one system to another. Users might try OPENing the printer
device on their own operating system (e.g., “/dev/lp” on Unix systems,
or “PRN” under DOS) and see if printing can be done from bwBASIC in
this way.

NULL
In this case, I am convinced that NULL is no longer necessary,
since very few printers now require NULLs at the end of lines.

OUT
See INP above (calls to hardware ports).

PEEK()
PEEK and POKE enabled earlier BASICs to address particular memory
locations. Although bwBASIC could possibly implement this command
(POKE) and this function (PEEK()), the limitation would be highly
limited by the different systems for memory access in different
systems.

POKE
see PEEK() above.

RENUM
Since unnumbered lines can be entered and executed under bwBASIC,
it would not be possible to implement a RENUM routine. Instead,
bwBASIC uses DO NUM and DO UNNUM.

RESUME
Is this possible under C? If so, I simply have failed to figure it
out yet. Mea culpa (but not maxima).

USR
See CALL and DEF USR above (machine language subroutines).

VARPTR
See PEEK and POKE above.

WAIT
See INP and OUT above.

There are other commands, functions, and implementation details that I
am working on, and which are on the agenda list for future versions of
bwBASIC. These agenda include:

PARACT
i.e., the ability to execute PARallel ACTions. This is described
in ANSI BASIC, although I have not seen it implemented before. It will
offer a rough, nonpreemptive form of multitasking within the scope of
a BASIC program. Programmers will note points at which there are
already hooks for PARACT in bwBASIC.

XMEM
PC-type computers need to be able to use extended memory. If we
could use extended memory for program lines, variables, and function
definitions, we could write much longer programs. This would entail,
however, a fairly serious rewriting of the program to utilize memory
handles for these storage features instead of direct memory pointers.

Windows
The addition of memory handles in addition to the non-preemptive
execution of program lines (in a crude form, already present) will
make it possible to develop implementations for Windows and perhaps
for other graphical user interfaces. But what form should this take? I
have in mind presently a BASIC that would run in the background,
appearing only as an icon in the GUI space, with pop-up editors and
output windows. Thus, the interpreted language would serve a purpose
something like ‘cron’ (a task scheduler) under Unix systems. You may
have some reflections that would help me in this.

Graphics Here we face fairly critical differences in different styles
and implementations of graphics, e.g., between GWBASIC, ANSI BASIC,
VisualBASIC, etc. But it’s possible that Graphics commands and
functions could be added. These would all be implementation-specific.

The ANSI Standard for full BASIC does not specify which particular
commands or functions must be implemented, and in fact the standard is
very robust. Perhaps no implementation of BASIC would ever include all
of the items, but some ANSI commands and functions which remain
unimplemented are:

ACCESS
ANGLE
AREA
ARITHMETIC
ARRAY
ASK
BSTR
BVAL
CEIL
CELLS
CLIP
COLLATE
CONNECT
COSH
DATUM
DEBUG
DECIMAL
DECLARE
DEGREES
DEVICE
DISCONNECT
DISPLAY
DOT
DRAW
ERASE
EVENT
EXCEPTION
GRAPH
HANDLER
IMAGE
KEY
LCASE
LINES
LOG10
LOG2
MAT
MIX
MULTIPOINT
OUTIN
OUTPUT
PARACT
PICTURE
PIXEL
PLOT
POINTS
RADIANS
RECEIVE
RENUMBER
REWRITE
ROTATE
ROUND
SEIZE
SEND
SHIFT
SINH
TANH
TIMEOUT
TRACE
TRANSFORM
TRUNCATE
UBOUND
UCASE
VIEWPORT
WAIT
VIEWPORT
ZONEWIDTH

8. THE STORY OF BYWATER BASIC

This program was originally begun in 1982 by my grandmother, Mrs.
Verda Spell of Beaumont, TX. She was writing the program using an ANSI
C compiler on an Osborne I CP/M computer and although my grandfather
(Lockwood Spell) had bought an IBM PC with 256k of RAM my grandmother
would not use it, paraphrasing George Herbert to the effect that “He
who cannot in 64k program, cannot in 512k." She had used Microsoft
BASIC and although she had nothing against it she said repeatedly that
she didn’t understand why Digital Research didn’t “sue the socks off
of Microsoft” for version 1.0 of MSDOS and so I reckon that she hoped
to undercut Microsoft’s entire market and eventually build a new
software empire on the North End of Beaumont. Her programming efforts
were cut tragically short when she was thrown from a Beaumont to Port
Arthur commuter train in the summer of 1986. I found the source code
to bwBASIC on a single-density Osborne diskette in her knitting bag
and eventually managed to have it all copied over to a PC diskette. I
have revised it slightly prior to this release. You should know,
though, that I myself am an historian, not a programmer.

9. COMMUNICATIONS:

email: tcamp AT delphi DOT com

October 11, 1993
BWBASIC(1)

Peter Dassow

unread,
Aug 30, 2009, 7:22:18 AM8/30/09
to
mike7g wrote:
> On Aug 30, 11:04 am, Henk Siewert <swtsta...@gmail.com> wrote:
> I am just curious, sbasic sounds good-and cp/m BBC Basic is still with
> us aswell as DOS & Win32 ( and a Nix version ) but has anyone got an
> opinion on bywater basic ( bwbasic ) - their should be a cp/m version
> on the net somewhere [...]

>
> Bywater BASIC Interpreter/Shell, version 2.10
> ---------------------------------------------
>
> Copyright (c) 1993, Ted A. Campbell
> for bwBASIC version 2.10, 11 October 1993


It's just a thought... 1993 is too "new" for CP/M-80. At this time most
of the software was developed for MS-DOS (or even Windows 3.0, and the
rest was developed for Mac OS 7).
CP/M-86 and the successors of it were not widely spreaded.

Regards
Peter

mike7g

unread,
Aug 30, 2009, 7:53:53 AM8/30/09
to

Hi yea you gotta be right: i just wondered what happened to the cp/m
version of this basic, and whether like the later versions it is open
source . Here is another older ( 1992 ) still DOS or Nix , no CP/M -
but like i said its maintained as of 2009. Just a thought - albeit a
long one maybe . :-)

http://www.developer-resource.com/product.php%5Bid%5D40496%5BSiteID%5Dsimtel.net

that version 1.10 (source and doc - 1992)
the first links are current 2009 :-)

All...@localhost.net

unread,
Aug 30, 2009, 5:55:33 PM8/30/09
to
On Fri, 28 Aug 2009 13:19:25 -0700 (PDT), "Mr Emmanuel Roche, France"
<roch...@laposte.net> wrote:

>Peter Dassow wrote:
>
>> P.S.: As I already mentioned on the page, I have not made a 100%
>> complete overview of all published BASIC versions for CP/M. I just
>> wanted to mention the most common used versions. So Emmanuel, please do
>> not point out that some very rare vendors are missing ;-)
>
>Ok. So, let us read your Web page.
>
>- "BASIC for CP/M - a popular choice"
>
>The PL of the people? As far as I know, no other PL in history was so
>successful with non-programmers. Find me a non-programmer able to
>write "StarTrek" in "C"...

Basic in all it incarnations was ubieqious, not good, not even very
compatable between varients. It was a weak applications language,
a poor teaching language, and slow. Most of the people that wrote in
Basic also wrote horrible unmaintainable code.

Back in '78 there was a mass movement toward "structured languages"
with two major camps C and Pascal. the goal of both camps was a
system language that had the power and speed of compiler and also
offered a language that was maintainable.

The problem with your straw dog is StarTrek in C is that when StarTrek
was popular C was not seen an anything less than a minicomputer.
What you missed was the unix world had their own set of games and
many much better. By time C was a available choice on CP/M the level
and quality of games had taken a whole new life.

>
>- "BASIC was the "Ford Model T" of the programming languages"
>
>Hum... There were many PLs before BASIC. As an old COBOL programmer,
>FORTRAN, COBOL, ALGOL, and PL/I spring automatically to (my) mind. In
>fact, BASIC was created to train students in FORTRAN... However, it
>was much simpler than FORTRAN, in general, and could be minimized down
>to 3KB, in particular, the size of the "Palo Alto Tiny BASIC Version
>3.0" that I published in the comp.os.cpm Newsgroup. This small size
>was important at the beginning of microcomputers. For example, Paul
>Allen had made on a mainframe and shown a 8K BASIC to MITS. This was
>so big that they (Allen, Gates, and Davidoff) spent the next months
>making a 4K "Altair BASIC". It is only when the later was running that
>Altair BASIC was announced. Advertisements of the time were saying
>that an 6KB RAM memory was enough to load 4K "Altair BASIC" and run
>some programs.

PaloAlto Tiny Basic was published in DDJ long before comp.os.cpm
had a network presence.

The problem with MITS 4k and later 8k was yes they fit in small memory
but your straw dog game StarTek required MITS 8k and needed not
less than 12K of ram if you stripped all the comments and packed it
otherwise it was 16K. I'd add 4K basic plain sucked as it was slow,
buggy and string IO was very limited. If you needed to do IO that
was not super slow, or handle strings assembler was often a choice.
An amazing number of people learned assember for a large variety
of systems based on nearly every CPU out there at the time.

The reason small was good is back then memory was expensive. Once
that barrier was broken along with usable low cost mass storage tiny
languages started to be kids toys as real languages were quickly
emerging and in a wider variety. That explosion of software very
nearly killed MicroSoft.

In the end Basic was defacto and often replaced when the user
realized it was also limiting or worse non portable without editing.

Compilers were desired for speed and compact code size, once
someone did it and made the result "open" then everyone realize that
compilters were not so difficult and unstructured Basic was not an
easy language to write a compiler for. The SmallC compiler was
not long after TBX and its impact is felt to this day. Name a CPU
you cannot get a C compiler for?

All that happend between late 1974 and before 1982. Before 74 it was
8008 and they were 180$US a copy and not easy to bring up. After
1982 the PC opened the flood gates for users. Right in the middle of
that around 78-79 UCSD Pascal and many ideas like Visicalc took form
and Basic was religated to the long list of thing that went by. When
you consider that Apple, Tandy, CP/M all hit the scene around then
and memory prices were dropping and cheap (relatively) floppy systems
started to show up it's not hard to see that limited tools like Basic
were going to see less promenence.

The history of the time was much broader and a simple myoptic view
of only relatively weak language does it little justice.

The rest every one else has had their peice.

Allison

Axel Berger

unread,
Aug 30, 2009, 11:56:00 AM8/30/09
to
*Charles Richmond* wrote on Sun, 09-08-30 06:11:

>That's why they call him "The French Loser"... ;-)

Sorry to but in off-topic, but I have to correct that:
"French Loser" was the name Emmanuel himself chose for himself, when he
began posting too frequently to keep up his previous "French Lurker".

Nobody else, to my knowledge, has ever called him that.

--
Tsch� wa
Axel

All...@localhost.net

unread,
Aug 31, 2009, 7:14:12 AM8/31/09
to

;) It used to be "French Luzer" for many years.

Allison

mike7g

unread,
Aug 31, 2009, 8:10:15 AM8/31/09
to
On Aug 31, 12:14 pm, Alli...@localhost.net wrote:
> On Sun, 30 Aug 2009 17:56:00 +0200, Axel_Ber...@b.maus.de (Axel

Interesting reading, its not going to hurt my mind in any way learning
a bit of basic though is it? :-S

mike7g

unread,
Aug 31, 2009, 8:22:14 AM8/31/09
to
On Aug 31, 12:14 pm, Alli...@localhost.net wrote:
> On Sun, 30 Aug 2009 17:56:00 +0200, Axel_Ber...@b.maus.de (Axel

I have actually the same basic interpreter as Emmanuel is still a
champion odf; namely Mallard Basic by Locomotive software (an enhanced
MBasic, i think ) ( CP/M80 ver ) , and as i have had my interest in
computers rekindled ( it never really was kindled in the first place
""back in the day"", but i still have a few old school books and its a
personal ambition to learn some of what i should have then: so for me
basic it is ( and a bit of 8080 asm hopefully ) . My idea was an 8bit
CP/M stystem , would be easier to understand then a pc - is there
anything to be said for using old 8bit systems to learn some basics
( basics as in fundamentals not pl's )?

All...@localhost.net

unread,
Sep 1, 2009, 8:12:00 AM9/1/09
to
On Mon, 31 Aug 2009 05:22:14 -0700 (PDT), mike7g <tru...@yahoo.co.uk>
wrote:

>I have actually the same basic interpreter as Emmanuel is still a
>champion odf; namely Mallard Basic by Locomotive software (an enhanced
>MBasic, i think ) ( CP/M80 ver ) , and as i have had my interest in
>computers rekindled ( it never really was kindled in the first place
>""back in the day"", but i still have a few old school books and its a
>personal ambition to learn some of what i should have then: so for me
>basic it is ( and a bit of 8080 asm hopefully ) . My idea was an 8bit
>CP/M stystem , would be easier to understand then a pc - is there
>anything to be said for using old 8bit systems to learn some basics
>( basics as in fundamentals not pl's )?

I'd say CP/M is one of the few OSs that can be learned and studied in
its entirety. Sources are available and systems that run it are
available or can be resurected. There are more than a few BASIC
languages some good some not so. Learning 8080 asm (and by
default 8085 and z80) is a good thing and as it opens the door to
applications that do not always fit well in Basic.

Allison

mike7g

unread,
Sep 1, 2009, 2:33:13 PM9/1/09
to

Well that gladens my heart to hear;-especially coming from you
Alison :-)

Thanks Mike

mike7g

unread,
Sep 2, 2009, 4:37:38 PM9/2/09
to

Your the second person who has said positive things about CP/M etc in
the last cupla days - to me, but not everybody is of that opinion. I
am glad i listen <erm> :-) "read and heed" (?) to sense - rather than
slander . Bits are bits and bytes are bytes ( aint they :-S :-) . I
will plod on! B-)

All...@localhost.net

unread,
Sep 2, 2009, 7:10:28 PM9/2/09
to
On Wed, 2 Sep 2009 13:37:38 -0700 (PDT), mike7g <tru...@yahoo.co.uk>
wrote:

?!? Been here long? I'm an active CP/M user and have a few ( N
greater than 40) CP/M platforms that are functional and a couple
are used frequently. If I don't need internet or or the ability to
build a linux kernal CP/M on Z80 with a 32mb disk proves to be
a very good platform for small cpus/mpus.

Besides having a lot of existing systems I still build and 8085/z80
systems and use CP/M as both development core and as the
target OS. Not everything needs a dual core Atom cpu with 4gb ram.

So yes, I'm rather pro CP/M.

Allison

mike7g

unread,
Sep 3, 2009, 3:10:43 PM9/3/09
to

8-)
Not long - but long enough:-) I have been lurking round here maybe 2
years on and off, just reading the odd post here and there , and i
have only had a pc ( or any other sort of computer for 4 years now -
wow , time flies). I have enjoyed reading some of the topics in this
newsgroup: most things go over my head though :-)

I did kind of get the impression, you were pro CP/M lol.

Well Unix has Gurus - but you are a "CP/M SuperHero!" :-D
Mike

Mr Emmanuel Roche, France

unread,
Sep 3, 2009, 4:14:48 PM9/3/09
to
Peter Dassow wrote:

> I just wanted to mention the most commonly used versions.


IW5-39.WS4
----------

- "CBASIC Compiler (CB-80) 1.4 from Digital Research"
John Halamka
"InfoWorld", 26 September 1983, Vol.5, No.39, p.34

(Retyped by Emmanuel ROCHE.)


Faster than a speeding FORTRAN, more powerful than a perfect C,
able to multiply 16-bit integers in a single microsecond...

The search for the ultimate language goes on. From LISP lovers
to Forth fanatics, each language has its devotees. The CBASIC
Compiler from Digital Research adds another icon to the language
sanctuary. The language is well developed and executes with
amazing speed.


Features
--------

The 8-bit CBASIC Compiler, otherwise known as CB-80, produces
8080 code that you can put into ROM, and COM files for the CP/M
operating system. Gone are the days of interpreters and pseudo-
code. True compilation, which produces directly executable
files, is CB-80's chief contribution.

CB-80 has an advanced set of BASIC keywords. In fact, CB-80 has
almost too many features to be called a BASIC. It is a multi-user
language that supports file locking, multiple printer
attachment, and full error trapping. It gives you full control
over variable type and, unlike most other BASICs (except for
Cromemco's SBASIC), allows truly structured programming.

Several structure-oriented constructions are available. Unlike
most BASICs, CB-80 does not require a line number on every line
-- CB-80 programs look like more like text than code. Thus, you
can use WordStar or any other screen-oriented editor for program
text creation, and can move program code, trim it, and expand it
easily without worrying about changing line numbers constantly.

Line labels of GOTOs or GOSUBs can be real numbers or words,
making programs self-documenting. Also, variables can be any
length (up to 32K). CB-80's flexibility allows structures like
this:

IF Accounts.Receivable - Accounts.Payable < 0
THEN GOTO Broke
ELSE GOTO Heaven

Broke:
PRINT "File Chapter 11"
STOP

Heaven:
PRINT "It is time to trickle down"
STOP

Another feature of CB-80 is its impressive control over variable
use. You can designate string, real, or integer variables. Also,
user-defined functions can stay in memory when you are chaining
between programs. With the PUBLIC function, stored user-defined
functions are always accessible, through program chain after
program chain. Variables in user-defined functions remain
associated with their particular function, however, and thus do
not interfere with the calling program.

CB-80's most useful improvement on CBASIC is the error-trapping
routines. Unlike CBASIC, which terminates after any error, CB-80
allows error branching and full error recovery. As users demand
ever greater "friendliness", this feature becomes a necessity.

CB-80 supports a full complement of arithmetic and string-
manipulating functions.

CB-80 I/O facilities surpass those of every other BASIC I have
worked with. Integration into CP/M and MP/M is evident. File
functions such as SIZE (comparable to CP/M 2.2's STAT), RENAME
(like REN), and ERASE (like ERA) simplify file manipulation. You
can lock files from other users, mark them as read-only, and
write them in sequential of random-access format.

Machine-interface functions such as PEEK, POKE, INP, OUT, GET,
PUT, and FRE, allow full control of most hardware features.

Overall, it is the most full-featured compiler I have ever used:
It has 11 string-manipulations functions, 12 numeric functions,
15 machine-interaction functions, and a total of 125 keywords --
you get the idea.


Performance
-----------

CB-80 has two negative aspects that I must point out. First, its
file structure provides only for sequential and random-access
reading. No sorting or keying of files is permissible; thus, the
ordering of data is deathly slow. Digital Research has a
solution, though. The "Access Manager" product provides a series
of CB-80-compatible routines that build keyed files. Access
Manager is relatively easy to use, and complements CB-80 with an
intelligent file structure.

Second, all Floating-Point calculations are double-precision,
making mathematics amazingly slow.

Digital Research has a solution for this problem, also. The firm
recommends that all numbers be multiplied by enough factors of
10 to make them integers. Thus, you can use faster integer
arithmetic throughout, and can arrive at the real number at the
end of computation by dividing.

As a test of the compiler, I wrote a program to set and read a
Real-Time Clock. CB-80's flexible program features allowed
machine-level communication with POKE, PEEK, INP, and OUT. Using
MBASIC and CBASIC, I had few problems and read the clock without
any problems. To my surprise, CB-80's resulting COM file was so
fast that I had to add dummy loops to waste time. The board
simply could not send information fast enough!

One strange abnormality I discovered while testing performance
was integer rounding. Every language I have ever used does the
following:

If A is REAL and B is INTEGER,

A = 2.71416
B = A
PRINT B

yields B=2 for every language, except CB-80. With CB-80, the
answer is B=3. Integer conversion are rounded, rather than
truncated. Very strange.


Ease of use
-----------

Compiling is as simple as CB80 TEST, linking is as simple as
LK80 TEST. When you type TEST, the program executes immediately.
You can use WordStar to generate program text, making editing as
painless as possible. Unfortunately, a few of WordStar's marking
characters (such as those that mark the beginning and end of
blocks to be moved) generate errors in compilation.


Error handling
--------------

Internally, CB-80's error handling is magnificent but, during
compilation, errors abound. As with any compiler, one error can
multiply rapidly as compilation goes on, but CB-80 seems very
touchy.

In the program TEST above, leaving a colon off the HEAVEN label
creates 11 errors. To make matters worse, errors during
compilation are marked with carets and cryptic code. This forces
the programmer to look up errors in the CB-80 manual appendix,
which is an inconvenience.


Documentation
-------------

As a registered user of earlier releases of CB-80, I noticed a
great improvement in the current documentation. In this latest
release, Version 1.4, the documentation is not only better
organized, but also more understandable. The earlier releases of
the documentation were filled with flowcharts and syntax
diagrams, and were organized by keyword function, rather than in
alphabetical order, which makes finding a keyword next to
impossible.

The new documentation looks like Microsoft's BASIC manual, and
is organized alphabetically. It includes a full glossary, and
English rather than technospeak is used throughout.
Unfortunately, the index is miserable and omits most keywords
and their cross-references. In fact, a few keywords in the "New
keywords added to CBASIC" category are still a mystery to me.

Still, the documentation is well organized and quite
descriptive.


Summary
-------

CB-80 is packed with features. Program development is fast and
painless -- if you have memorized the manual and never make
programming errors.

The CB-80/CBASIC combination does not have the advantages of the
MBASIC/BASCOM combination, though. CBASIC is not an interpreter,
but a pseudo-code compiler. Thus, the convenience of developing
and debugging code in an interpreter environment is absent.

Compiling, recompiling, debugging, and recompiling wastes an
incredible amount of time. CBASIC is well supported across
systems, and 8086 versions are also available. All in all, CB-80
is a powerful language for programs that are not file-intensive;
you can write them in small modules and debug them separately,
saving compiling time.

The CBASIC Compiler will certainly be a force in the future of
microcomputing. Version 2 of the compiler will contain the GSX
graphics commands. The "Display Manager" addition to CB-80
provides "screen" templates for quick display writing.

Digital Research has put much effort into the CBASIC Compiler,
CB-80, and future support of the product is guaranteed.


EOF

All...@localhost.net

unread,
Sep 3, 2009, 5:12:34 PM9/3/09
to
On Thu, 3 Sep 2009 12:10:43 -0700 (PDT), mike7g <tru...@yahoo.co.uk>
wrote:

>On Sep 3, 12:10�ソスam, Alli...@localhost.net wrote:
>> On Wed, 2 Sep 2009 13:37:38 -0700 (PDT), mike7g <tru...@yahoo.co.uk>
>> wrote:
>>
>>
>>

>> >On Sep 1, 7:33�ソスpm, mike7g <tru...@yahoo.co.uk> wrote:


>> >> On Sep 1, 1:12�ソスpm, Alli...@localhost.net wrote:
>>
>> >> > On Mon, 31 Aug 2009 05:22:14 -0700 (PDT), mike7g <tru...@yahoo.co.uk>
>> >> > wrote:
>>
>> >> > >I have actually the same basic interpreter as Emmanuel is still a
>> >> > >champion odf; namely Mallard Basic by Locomotive software (an enhanced
>> >> > >MBasic, i think ) ( CP/M80 ver ) , and as i have had my interest in
>> >> > >computers rekindled ( it never really was kindled in the first place
>> >> > >""back in the day"", but i still have a few old school books and its a
>> >> > >personal ambition to learn some of what i should have then: so for me
>> >> > >basic it is ( and a bit of 8080 asm hopefully ) . My idea was an 8bit
>> >> > >CP/M stystem , would be easier to understand then a pc - is there
>> >> > >anything to be said for using old 8bit systems to learn some basics
>> >> > >( basics as in fundamentals not pl's )?
>>

>> >> > I'd say CP/M is one of the few OSs that can be learned and �ソスstudied in
>> >> > its entirety. �ソスSources are available and systems that run it are
>> >> > available or can be resurected. �ソス There are more than a few BASIC


>> >> > languages some good some not so. Learning 8080 asm (and by
>> >> > default 8085 and z80) is a good thing and as it opens the door to
>> >> > applications that do not always fit well in Basic.
>>
>> >> > Allison
>>
>> >> Well that gladens my heart to hear;-especially coming from you
>> >> Alison :-)
>>
>> >> Thanks Mike
>>
>> >Your the second person who has said positive things about CP/M etc in
>> >the last cupla days - to me, but not everybody is of that opinion. I
>> >am glad i listen <erm> :-) "read and heed" (?) to sense - rather than

>> >slander �ソス. Bits are bits and bytes are bytes ( aint they :-S :-) . I
>> >will plod on! B-)
>>
>> ?!? Been here long? �ソスI'm an active CP/M user and have a few ( N


>> greater than 40) CP/M platforms that are functional and a couple

>> are used frequently. �ソス �ソスIf I don't need internet or or the ability to


>> build a linux kernal CP/M on Z80 with a 32mb disk proves to be
>> a very good platform for small cpus/mpus.
>>
>> Besides having a lot of existing systems I still build and 8085/z80
>> systems and use CP/M as both development core and as the

>> target OS. �ソス Not everything needs a dual core Atom cpu with 4gb ram.


>>
>> So yes, I'm rather pro CP/M.
>>
>> Allison
>
>8-)
>Not long - but long enough:-) I have been lurking round here maybe 2
>years on and off, just reading the odd post here and there , and i
>have only had a pc ( or any other sort of computer for 4 years now -
>wow , time flies). I have enjoyed reading some of the topics in this
>newsgroup: most things go over my head though :-)
>
>I did kind of get the impression, you were pro CP/M lol.
>
>Well Unix has Gurus - but you are a "CP/M SuperHero!" :-D
>Mike

SuperHero, no. I'd say there are a few here I'd call that. I just
stick to the idea of applying stable mature machines we know
how to use.

Besides I also do OS-8(PDP-8), RT-11(PDP11) and VMS(VAX)
and a uClinux (embedded linux).

Allison

0 new messages