Extended BASIC Review
TI 99er, June 1981
Gary Kaplan
Nothing has caused as much excitement and anticipation in the Ti-99/4 community as the announcement
(what now seems like an eternity ago) that an Extended
BASIC would be forthcoming. Well, now that the new programming language is about to be gobbled up by hungry
Home Computer users, the question on everyone's mind is,
naturally enough, "Was it worth waiting for?"
For the answer to this, and to help put the new software
in proper perspective, we first should examine TVs claim
(in the introduction to the reference manual): "Texas
Instruments Extended BASIC... bas the features expected
from a high level language plus additional features not
available in many other languages, including those designed
for use with large, expensive computers." The key words
here are "expected" and "not available." Features such as
DISPLAY AT, ACCEPT AT, PRINT... USING, IMAGE,
ON ERROR, multiple statement lines, expanded IF-THEN-
ELSE statements, PEEK, Boolean operators, and assembly
language subroutine calls are indeed "expected." Unfortunately, they were expected in the ordinary TI BASIC, since
they're standard features of various Microsoft BASICs
found in other machines. But just as plain, old, ordinary TI
BASIC has its share of surprises that aren't commonly
found in other BASICs (e.g., CALL SAY, RESEQUENCE,
complete EDIT, TRACE, and BREAK utilities, plus its
marvelously simple character definition and color assignment facilities), TI Extended BASIC too has its own unique
bag of tricks not found on other machines. And this bag of
tricks includes some mighty impressive feats of computing magic.
But before we get into these extended features,let's examine some of the obvious changes from TI-BASIC. First,
there's the matter of a slight reduction in usable RAM. The
maximum program size of Extended BASIC is 864 bytes
smaller than TI BASIC. Although this represents only about
a 6% reduction, any reduction in user memory is significant
if it prevents certain applications from being RUN. And, in
fact, as little as 500 bytes is frequently the critical amount
of extra memory needed. [Witness the several programs in
this issue that cannot be loaded or RUN with the disk controller's power turned on even with the CALL FILES(l)
command that frees all but about 500 bytes for the disk
system.) So programmers without the 32K RAM expansion,
should try wherever possible to make up the loss with
Extended BASICs built-in memory saving features: multiple statement lines [with more allowable characters per
line), expanded IF-THEN-ELSE statements, multiple variable assignments, trailer comments that immediately follow statements (instead of separate REMs), repetition of strings with the RPT$ function, and the use of MIN and MAX functions.
The loss of user-definable characters in the character sets
15 and 16 is another departure from the TI BASIC standard.
These custom characters are no longer available to programmers since the memory area is needed to keep track of
sprites. Therefore, a TI BASIC program that doesn't use
these character sets is supposed to RUN in Extended BASIC
[Watch the next issue for an analysis of what is and isn't
interchangeable.] in most circumstances-unless, of course,
you've done something that will obviously cause trouble
such as accidentally using a TI Extended BASIC key word as
a variable in your TI BASIC program (e.g., DIG IT, ERASE,
ERROR, IMAGE, MERGE, MAX, MIN, SIZE, WARNING,
etc.)
Now, let's take a peek (no pun intended) into the "bag
of tricks" I mentioned earlier. We'll cover only the highlights
in this article; subsequent articles will take an in-depth look
at the different features, and show you powerful and
unique ways of using them.
A good place to start is with Extended BASIC's exciting
new graphics capabilities. Nine new subprograms (plus 2 redesigned ones) provide the ability to create and thoroughly
control the shape, color, and motion of smoothly moving,
high-resolution graphics. These are the true sprites-graphics
that can be displayed and moved at any of 49, 59 positions
192 rowsx 256 columns) rather than the /68 positions
24 rows x 32 columns) CALLed by the VCHAR and
HCHAR statements of TI BASIC. But that's only the beginning. Sprites can be set in motion with simple X and Y
velocity components, and will continue their motion
without further program control; they can grow and shrink
at will, be relocated or "hidden", and even pass over and
blot out fixed objects and other sprites to give the illusion
of depth and 3-D animation. [This is a function of the
three-dozen stacked image planes of the Home Computer's
video display processor chip-a unique graphics display that
will be explained more fully in the next issue.
Although games aficionados and educators have every
right to be overjoyed with the new sprites capability, TI-99/4
users who are more interested in business, scientific and
professional applications ,' 0e drawn to other Extended
BASIC features. First on the list is the impressive subprogram capability. Several options exist for communicating
values (and entire arrays) between main and subprograms.
There's also built-in protection to prevent a subprogram's
Local variables from affecting the main variables. Additionally, commonly used subprograms may be SAVEd on a separate disk, and later MERGEd. This will allow programmers to build up an library of "universal" subprograms that can
be called upon to supply the appropriate modules for new
programming tasks-without time-consuming re-coding and
debugging.
If this new subprogram flexibility is not enough for your
most demanding tasks, how about "program chaining"
-where one program can load and RUN another program
from a disk. This means that multi-part programs of almost
un/ira/ted size can now RUN on the T1-99/4 by breaking
them into pieces and letting each segment RUN the next.
And at any point in this chain, a "menu" may be inserted,
allowing the user to choose with a single keystroke the
particular program to be RUN. Imagine the possibilities.
Those of you with a speech synthesizer, or thinking of
purchasing one, will be happy to learn that Extended BASIC
includes a speech editor. You will no longer need the separate Command Module (with a retail price of about $45).
What's more, with the combination of CALL SPGET, the
capability of subroutine MERGEs, and the data for the
code patterns (that TI supplies in the appendix of the reference manual), you can now easily add the suffixes ING, S,
and ED to the roots of words in the resident vocabulary.
And if TI ever supplies users with their master file of coded
speech patterns and rules for combining them, it would be
possible to create your own new words. As of now, they
only provide the cryptic, "Because making new words is a
complex process, it is not discussed in this manual."
Incidentally, this capability of having the computer say
what you want it to say rather than being limited to a fixed
vocabulary will, in fact, be implemented through a related
approach. I'm referring to the "text-to-speech" capability
of the forthcoming Terminal Emulator II Command Module
which is programmable in TI BASIC. Since only one Command Module at a time can be attached to the T1-99/4,
text-to-speech cannot
be used with the Extended BASIC Command Module. I
think it's safe to say, however, that we can expect to see TI
solve this problem in the near future.
The final two features I'm going to cover in this overview
provide a fair degree of software protection and open the
door to additional language capabilities. Consequently, these
are the particular features that may have the most profound
impact on the entire T1-99/4 community-ultimately determining the quality and quantity of most of the commercial
software produced for this machine.
Extended BASIC programs can be SAVEd in a PROTECTed form to guard against software piracy. This irreversible feature only allows a program to be RUN or loaded
into memory with an OLD command. A program thus
PROTECTed cannot be LISTed, EDITed, or SAVEd. If the
program was originally SAVEd and PROTECTed on a disk,
you still must use the protect feature of the Disk Manager
Command Module to completely "lock up" the software by
preventing it from being copied as well.
Extended BASIC has the capability to CALL and RUN
assembly language programs if the 32K RAM expansion
peripheral is attached to the computer. Since assembly language has a much faster execution speed than BASIC, many
applications programs that are unfeasible to write in either
TI BASIC or TI Extended BASIC (and Extended BASIC is
not significantly faster than its predecessor) can now be
written in TMS9900 assembly language, LOADed into the
expansion memory periphe and RUN on a TI-99/4. This
paves the way for some fancy sophisticated applications
programs that now can be targeted for the TI-99/4 users.
Even though a TI-99/4 with Extended BASIC and the
memory expansion can CALL and RUN assembly language
programs and subroutines, it presently cannot be used towrite them. [Except for its "P-coded" version equipped
with the UCSD Pascal DeveloprnentSystem as explained in
this issue's related articles on third-party software development, and UCSD Pascal/Version 4.01 Alternately, it would
have been helpful if TI had given Extended BASIC users the
capability to POKE values into memory locations, but this
feature was not implemented. Nevertheless, the door is now
opened for a TMS9900 assembler [which TI will soon be
marketing) that can be loaded into the expansion 32K
RAM peripheral, and called up through Extended BASIC.
Besides the obvious use of an assembler-being able to write
programs or subroutines in assembly language--it does, in
fact open up other exciting possibilities: "More exotic"
languages can be specially written in TMS9900 assembly
for T1-99/4 implementations. (FORTH and LISP hackers
take note...)
The bottom line is more software tools for developers,
and more economic incentive for them to produce valuable
programs that can be protected against most piracy. This
means that the T1-99/4 user community will be seeing a lot
more useful software enter the market. Being able to run
this software should more than justify the $100(retail)
price for this filled-to-capacity 36Kbyte TI Extended BASIC
Command Module with accompanying 224-page reference
manual. Therefore, the answer to the title's rhetorical question, "How Extended Is Extended BASIC?" is apparently,
"Extended enough..."
|