[Coco] KCBasic
Guillaume Major
guillaume.major at gmail.com
Fri Jan 27 13:14:36 EST 2017
KCBasic can be found on a VHD (in the CMDS folder) hosted on the Color
Computer Archive:
http://www.colorcomputerarchive.com/coco/Virtual%20Hard%20Drives/NitrOS-9%20L2%20V3.3.0/
The manual for KCBasic is missing in the archive but I've found a review of
it in The Rainbow Feb. 86 page 192. It lists the available functions and
commands. Here it is:
Software Review
Kansas City BASIC
Scores a Home Run
Since the Kansas Gity Royals won the 1985 World Series,
this seems an appropriate time to review Kansas City
BASIC (KCB). KCB is an inexpensive BASIC interpreter for
OS-9 written by Steve Odneal. In order to use KCB you
must have a 64K Color Computer, at least one disk drive
and OS-9 Level 1 Version 1.00.00 or later. While it does not
have the power to rival BASIC09, KCB should be considered
before buying a BASIC language for OS-9.
KCB is distributed on a Radio Shack Color Computer
OS-9 formatted diskette. There are six files on the
distribution disk:
KCB — This is the main-line source code for Kansas City
BASIC. There are USE statements in KCB that pull in the
next three source files.
TOKENIZE — This is the logic that tokenizes and de-
tokenizes the command and function words used in KCB.
DISKIO — This is the logic for KCB that handles most
of the disk input/ output functions.
CMDTABLE — This is the look-up table for all of the
command and function words used in KCB.
KCBASIC — This is the binary load module that was
created from an assembly of KCB and the other source
modules.
MEM DUMP — This is a sample program for KCB. It
is a simple memory dump/examine program.
To load KCBASIC, you must first boot OS-9, then at the
OS-9 prompt, type KCBASIC 8xxK, where xx is the amount
of memory you want KCB to have. This needs to be done
so you will not run out of memory for your BASIC program.
>From this point on, KCB performs like Radio Shack BASIC
to a large extent. In general, the syntax of Kansas City
BASIC is very similar to Microsoft BASIC used under Radio
Shack's Disk Extended BASIC. It even supports the use of
the '?' for the PRINT command, however, not all of the
capabilities are implemented. For example, no graphics
commands have been included.
KCB only supports integers from -32768 to 32767 (the
Hex and binary equivalents, also). BASIC programs are
saved and loaded from disk in ASCII text format. This is
done so you can use any text editor or OS-9's EDIT
command to create BASIC programs. KCB does not have
an EDIT command.
The manual states that variables can be any one or two
alphanumeric characters, of which the first must be
alphabetic. However, in the version I reviewed, numeric
characters produced an error. KCB does not support
arrayed variables, either. The author needs to make some
improvements in variable handling in order to make KCB
a top-notch version of BASIC.
KCB supports the following functions:
ABS(X)
MID$(X,Y,Z)
AND
RIGHT$(X,Y)
CHR$(X)
RND(X)
HEX$(X)
MEM
JOYSTKfX)
OR
LEFT$(X )
PEEK(X)
STRING$(N,<char>)
Arithmetic and Compare Operators:
/
*
-
+
>
<
=
<>
>=
<=
Direct Commands:
$(fork)
NEW
SAVE
LIST
LOAD
QUIT
LLIST
Program Control Commands:
RUN
CLS
REM or '
FORK
LET
PRINT or ?
PRINT USING
PRINT @
INPUT
IF/THEN/ELSE
GOTO
GOSUB
RETURN
FOR/NEXT/STEP
STOP
END
ONERROR GOTO
RESUME
The last two (DNERROR GOTO and RESUME) deal with KCB's error-trapping
routine.
Disk I/O Commands:
OPEN
PRINT n
LOF
CLOSE
GET
EOF
INPUT #
PUT #
As you can see, KCB supports most of Radio Shack's
basic commands and adds a few of its own. The author
states if you are good at machine language programming,
feel free to add other commands and functions since the
source code is included.
The documentation on KCB is excellent. It does not teach
you BASIC (refer to your BASIC manuals for this), but it does
describe every detail of Kansas City BASIC. The 24 pages
of documentation come in a three-clasp folder and are
printed on a dot-matrix printer (which can still be easily
read).
You might be thinking, "If BASIC09 has more power, why
should I consider KCB over BASIC09?" The answer, quite
plainly, is price. BASIC09 costs $99.95 — that's quite a bit
of money just to be able to program in BASIC under OS-
9. Kansas City BASIC costs only $25! That's right! For one-
fourth of the money, you get an excellent interpreter.
In conclusion, Kansas City BASIC is not a replacement
for BASIC09, but if you do not plan on performing major
applications in BASIC under OS-9, then KCB is the one for
you in the combined aspects of performance and cost. If
the author fixed the problem with the variable names and
added arrayed variables, Kansas City BASIC could handle
major applications.
(Steve Odneal, 8609 East 73 Terrace, Kansas City, MO
64133, $25)
— John R. Curl
Enjoy!
Guillaume
"Bob Devries" <devries.bob at gmail.com> a écrit
dans le message de news:8c325254-fb23-5849-d7c5-4321077d1c6c at gmail.com...
>I just downloaded a .vhd file from colorcomputerarchive, and found a file
>called 'kcbasic'aka Kansas City Basic.
> Is there any documentation for this? I have googled for it but no hits.
>
> Regards, Bob Devries
> Dalby, QLD, Australia
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
More information about the Coco
mailing list