dr. dobbs journal of

Ti n y   BASIC

Calisthenics & Orthodontia

Running Light Without Overbyte

 
Box 310, Menlo Park CA 94025 Volume 1, Number 1


STATUS LETTER

by Dennis Allison

The magic of a good language is the ease with which a particular idea may be expressed. The assembly language of most microcomputers is very complex, very powerful, and very hard to learn. The Tiny BASIC project at PCC represents our attempt to give the hobbyist a more human-oriented language or notation with which to encode his programs. This is done at some cost in space and/or time. As memory still is relatively expensive, we have chosen to trade features for space (and time for space) where we could.

Our own implementation of Tiny BASIC has been very slow. I have provided technical direction only on a sporadic basis. The real work has been done by a number of volunteers; Bernard Greening has left the project. As might be guessed, Tiny BASIC is a tiny part of what we do regularly. (And volunteer labor is not the way to run a software project with any kind of deadline!)

While we've been slow, several others have really been fast. In this issue we publish a version of Tiny BASIC done by Dick Whipple and John Arnold in Tyler, Texas. (And other versions can't be far behind.)


MY, HOW TINY BASIC GROWED!

Once upon a time, in PCC, Tiny BASIC started out to be:
* a BASIC-like language for tiny kids, to be used for games, recreations, and the stuff you find in elementary school math books.
* an exercise in getting people together to develop FREE software.
* portable-machine independent.
* open-ended--a toy for software tinkerers.
* small.

Then ... (fanfare!) ... along came Dick Whipple and John Arnold. They built Tiny BASIC Extended. It works. See pp 13-17 and 19 in this issue for more information. More next issue.
WANTED: More Tiny BASICs up and running.
WANTED: More articles for this newsletter.
WANTED: Tiny other languages. I might be able to live with Tiny FORTRAN but, I implore you, no Tiny COBOL! How about Tiny APL? Or Tiny PASCAL (whatever that is)?
WANTED: Entirely new, never before seen, Tiny Languages, imported from another planet or invented here on Earth. Especially languages for kids using home computers that talk to tvs or play music or run model trains or ...


BASIC

BASIC, Beginners' All-purpose Symbolic Instruction Code, was initially developed in 1963 and 1964 by Professors John Kemeny and Thomas Kurtz of Dartmouth College, with partial support from the National Science Foundation under the terms of Grant NSF GE 3864. For information on Dartmouth BASIC Publications, get Publications List (TM 086) from Documents Clerk, Kiewit Computation Center, Dartmouth College, Hanover NH 03755. Telephone 603-646-2643.
 
Try these: TMO28 BASIC: A Specification $3.15
TM075 BASIC $4.50



It would help a lot if you would each send us a 3x5 card with your name, address (including zip), telephone number, and a rather complete description of your hardware.

DRAGON THOUGHTS

* We promised three issues. After these are done, shall we continue?
* If we do, we will change the name and include languages other than BASIC.
* This newsletter is meant to be a sharing experience, intended to disseminate FREE software. It's OK to charge a few bucks for tape cassettes or paper tape or otherwise recover the cost of sharing. But please make documentation essentially free, including annotated source code.
* If we do continue, we will have to charge about $1 per issue to recover our costs. In Xeroxed form, we can provide about 20-24 pages per issue of tiny eye-strain stuff. If we get big bunches of subscriptions, we'll print it and expand the number of pages, depending on the number of subscribers.
* So, let us know... shall we continue?


For our new readers, and those who have been foilowing articles on Tiny BASIC as they appeared in People's Computer Company, we have reprinted on pages 3-12 the best of Tiny BASIC from PCC as an introduction, and as a reference.


TECHNIQUES & PRACNIQUES

by Dennis Allison, 12/1/75

(This will be a continuing column of tricks, algorithms, and other good stuff everyone needs when writing software. Contributions solicited.)

16-BIT BINARY TO DECIMAL CONVERSION ROUTINE

* saves characters on stack
* performs zero suppressed conversion
* uses multiplication by 0.1 to obtain n/10 and n mod 10

define crutch = OFFH;
declare n, u, v, t; BIT (16)  These could be registers, or on the stack
if n < 0 then
  do;
    n = -n;
    call outch('-');
  end;
call push (crutch)            The crutch marks the end of number on the stack

repeat;
  v = shr (n,l);
  v = v + shr (v,l);          These all are 16 bit shifts
  v = v + shr (v,4);          Computes [n/10] or [n/10] - 1 by
  v = v + shr (v,8);          multiplication
  v = shr (v,3);              Call it x
  t = v + v;
  u = t + t;                  Computes 10 - x
  u = u + u + t;
  u = n - u;                  Byte only as high order must be equal

  if u >= 10 then             Perhaps one could use a decimal feature here
    do
      u = u - 10;
      n = v + 1;              Corrects for case where [n/10] - 1
    end                       is computed and creates [n/10] and n mod 10
  else
      n = v;
  call push (u);              Saves result on stack
until n = 0;                  Loop at least once

ch = pop;
do while < > crutch;          Write result in reverse order
  call outch (ch + 030H);     Converts digits to ASCII 0 = 030H 02 = 032H etc.
  ch = pop;                   Pop takes one word off the stack
end


PCC Tiny BASIC Reorganizes...

... and so we procede somewhat more slowly than some of our readers
 

Dennis Allison - technical editor
Bob Albrecht
John Arnold
Dick Whipple
contributing
editors
Lois Britton -
Rhoda Horse -
circulation manager
midwife-at-large

* Letters from readers are most welcome. Unless they note otherwise, we will assume we are free to publish and share them.

* We hereby assign reprint rights to all who wish to use Tiny BASIC Calisthenics & Orthodontia for non-commercial purposes.

* To facilitate connection between our subscribers, we wil in subsequent issues publish our subscriber list (includin addresses and equipment of access/interest).


I want to subscribe to

* DR. DOBB'S JOURNAL OF TINY BASIC CALISTHENICS & ORTHODONTIA *
(3 issues for $3)

NAME____________________________________

ADDRESS_________________________________

CITY______________ STATE______  ZIP_______

(If you would like us to publish your name, address, and equipment of access/interest in futirre issue(s), please indicate VERY SPECIFICALLY.

EQUIPMENT
OF ACCESS/INTEREST______________________________

__________________________________________________

Please send check or money order (purchase order minimum: $6) to TINY BASIC CALISTHENICS & ORTHODONTIA
[ADDRESS DELETED] Thank you.


[Links to Tiny Basic articles...]
Build Your Own Basic (reprinted from People's Computer Company Vol. 3. No.4)
Design Notes for Tiny Basic (reprinted from People's Computer Company Vol. 4, No. 2)
Tiny Basic letters (reprinted from People's Computer Company Vol. 4, No. 3)
Corrected Tiny Basic IL
Jeffrey Henning's IL implementation (2017)
Tiny Basic Extended (Dick Whipple & John Arnold)
Last two pages...