Volume 1, 1976 Dr. Dobb's Journal of Computer Calisthenics & Orthodontia 0918790018


312 52 323MB

English Pages [368] Year 1977

Report DMCA / Copyright

DOWNLOAD PDF FILE

Recommend Papers

Volume 1, 1976 
Dr. Dobb's Journal of Computer Calisthenics & Orthodontia
 0918790018

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

Dr. Dobb’s Journal of

C O M P U T E R (Calisthenics

^5 Orthodontia

Running Light W ithout O verbyte Volume O ne

People’s C o m p u te r Company, Box E, M en lo Park, C A 9 4 0 2 5 ___________

A Reference Journal for Users of Home Computers

Volume One

People's Computer Company

1976

DR. DOBB'S JOURNAL OF COM PUTER C A L IST H E N IC S & O R T H O D O N T IA V o lu m e 1, 1976

ED ITO R’S PREFACE

January 21, 1977

Jim C. Warren, Jr., Editor

Library o f C ongress N o . 77-73015 ISB N : 0-918790-01-8 First o f all, some mundane details: this is not one of those “Best o f. . . ” digests; it’ s everything from the first year’ s pub­ Box E, Menlo Park CA 94025 lication o f DDJ (except subscription forms & questionnaires, and propaganda concerning other PCC offerings. . . which we Copyright © 1977 by People’s Computer Company have managed to squeeze in at the end of the book). It con­ tains all the rest o f the content o f the original issues—all ten Publisher issues o f Volune 1. Please note that this includes now-obsolete P e o p le ’s C om p u ter Company product announcements, product pricing that is sometimes no 1263 E l Camino Real longer valid, definitive predictions o f things that didn’t happen, M en lo Park, California and all o f our original, authentic typographical errors. We hope (4 1 5 ) 323-3111 that you will also find that it contains considerable useful in­ Editor formation, program listings, and reference material. Jim C. Warren, Jr. A Reference Periodical Watchdogs From the beginning, we have viewed Dr. Dobb’s Journal Bob A lb re ch t as a reference publication rather than merely as a periodical. Dennis A llison Thus, as we ran out o f back issues, we repeatedly reprinted Underdog them as the demand for them continued and increased. Now Rosehips M alloy that a year of publication has passed, and we find a consider­ able number of new subscribers requesting all back issues, we Disclaimer have chosen to bind Volume One into a more convenient form We serve as a com m u n ica tion m edium f o r the exchange o f and continue to make it available. We expect to continue to in form ation . We do n o t guarantee the validity o f that in form ation . reprint it, as long as there is a demand for it. We believe this is an appropriate policy for a reference periodical. A Year of Hindsight A more personal commentary: when Dennis Allison and Bob Albrecht first approached me about editing DDJ, I U.S. Subscriptions Back Issues to U.S. thought o f it as an entertaining spare-time effort—an interest­ □ $12 for one year □ All o f Vol. 1 for $13 □ $22 for two years Vol____ No_____ for $1>.50 ing project with which to diddle for a while. I’m an inveterate □ $21 for one year for first class/ airmail to anywhere in the U.S. Vol____ No_____ for $1.50 project phreaque, and had been a computer fanatic for most of a decade. I had been following the development o f hobby Foreign Via Surface Mail Foreign Via Air Mail □ $16/year - anywhere outside U.S. □ $21/year to Canada computing ever since I stumbled into one o f the early meetings (2nd-class Regulations require surcharge □ $28/year to Europe & Pan America of the Homebrew Computer Club in April, 1975, and had on mail sent to Canada) □ $32/year - other foreign written a couple o f obscure articles for some o f the early issues o f Byte. But, when I took over as Editor o f Dr. D obb’s, I actually did so with little foresight—little vision o f where DDJ could go, and little vision o f where personal computing could go. The vision remains misty, certainly, however some very exciting features are taking shape. The changes and growth that have taken place in this past year have been phenomenal, and they do little more than imply still greater development in the immediate future. At the most obvious level: hardware has gone from strictly glitchy kits to assembled and reliable complete units. Systems software has gone from virtually nonexistent, to where multitasking, multi-user soft-disc operating systems are being offered to the hobbyist community. Average memory capacity on home systems has probably doubled, and possibly quadrupled. Though applications have remained quite limited, awaiting adequate systems software, it appears certain that they will develop much more rapidly in 1977. The principal actors have also developed significantly. The customers — the hobbyists and users — have become more sophisticated and discriminating in their demands and their purchases. The vendors and manufacturers have, in many cases, overcome start-up prob­ lems such as under-financing and inadequate customer service. Although there are still some highwaymen in this frontier community, most of the vendors are maturing into responsible, properly functioning organizations. As is the case with hardware and software, how­ ever, there is still considerable room for further growth and development. The most exciting aspect o f that hazy vision into the future, however, is my growing suspicion that personal and home computing well may have as significant an impact on the general public — the overall society — as has the automobile, the telephone, and tele­ vision . . . all o f which were considered to be mere technical novelties o f no practical value, when they were first developing. Having lived in the San Francisco Bay Area since the early 60’s, I have seen a number o f attempts made at various forms o f social utopias, and seen all o f them fail — so I view this new potential utopia, “ computer power to the people,” with a somewhat jaundiced eye. However, the more I see o f it; the more I slowly come to believe that the massive information processing power which has traditionally been available only to the rich and powerful in government and large corporations will truly beocme available to the general public. And, I see that as having a tremendous democratizing potential, for most assuredly, information — data and the ability to organize and process it — is power. It is an exciting vision to me. I am honored to be a part o f it. I wish to point out that you, who have chosen to read this book, must also be a part of that venture. This is a new and different kind o f frontier. We are part o f the small cadre o f new frontiersmen who are exploring it. To the extent that we can blaze a trail to new and useful pastures, the larger society will follow, and hopefully the overall culture will benefit. So, pick up your eight-bit musket and forge onward.

CONTENTS: Volume One 1976 V O L U M E I, N U M B E R 1, 1976

— — ----------- -------------- Page

Tiny Basic Status Letter ■ Dennis Allison 16-Bit Binary to Decimal Conversion Routine - Dennis Allison Build Your Own Basic - Dennis Allison & Others Build Your Own Basic-Revised Dennis Allison & M. Christoffer Design Notes for Tiny Basic - Dennis Allison, Happy Lady & Friends Tiny Basic - Dennis Allison, Bernard Greening, Happy Lady & Lotso f Friends Extendable Tiny Basic - John Rible Corrected Tiny Basic K - Bernard Greening Tiny Basic, Extended Version - Dick Whipple & John Arnold TB Code Sheet - Dick Whipple

5 6 7 8 9 13 14 16 18 20

V O L U M E I, N U M B E R 2, 1976 What’s DOJCC & O A ll About? - JimC.Warren, Jr. A Critical Look at Basic - DennisAllison Music o f a Sort - Steve Dompier SCELBAL - A Higher Level Language for 8008/8080 Systems - Mark Arnold & Nat Wadsworth Tiny Basic, Extended (Part 2) - DickWhipple &John Arnold Computers That Talk - Jim Day Letters and Notes TBX Mods fo r a SWTP TVT-2 Tiny BASIC Available fo r the 6800

25 26 28 30 35 54 56 56

V O L U M E I, N U M B E R 3, 1976 Where Do We Go From Here? Quik Bits Program Repository & Tape Duplication Facility Signetics 2650 K it fo r Under $200 - Roy Blacksher Public Interest Satellite Association Computer Process fo r Rapid Production o f Musical Compositions (Reprinted from Campus Report) It Can Talk — But Can I t Sing? Touchless Sensing fo r Under $100. Parser Saves Pain - Harvey Hahn Yet Another BASIC BOMBOUT! Keyboard Loader fo r Octal Code Via the TVT-2 - Jack O. Coats, Jr. Breakpoint Routines for 6502s - John Zeigler Denver Tiny BASIC for 8080s: A 2nd Version That Includes 1-0 Arrays F. J. Greeb

58 59 63 64 64 65 67

68 70 70 71 72 75

V O L U M E I, N U M B E R 4, 1976 Editorial: History Repeats Itself — I Hope - Jim C. Warren, Jr. Scanning the History Periodicals (in fo rm a tio n Derived fr o m e l e c t r o n i c N EW S - May 24, 1976) First Word on a Floppy-Disc Operating System - Jim C. Warren, Jr. Hardware & Software for Speed Synthesis - Lloyd Rice MINOL-Tiny BASIC With Strings in 1.75K Bytes - Erik T. Mueller System Monitor for 8080-based Microcomputers - Charlie Pack

89 90 91 92 95 104

1

— ---- — -------- V O L U M E I, N U M B E R 5, 1976 — -------------------------------Copyright Mania - Jim C. Warren, Jr. 120 The 1976 Trenton Computer Festival - Sol Libes 121 Votrax Makes the Offer: Speed Synthesis K it fo r Under $1K John McDaniel 124 Bad Bit Getters: Memory Test Programs - Ray Boaz 126 Unizap: A Modification o f “Shooting Stars” - John C. Shepard 127 Palo Alto Tiny BASIC - Li-Chen Wang 129 A Note to Members o f the S. California Computer Society - Jim C. Warren, Jr. 142 Index to THE COMPUTER HOBBYIST 143 Texas Tiny BASIC (TBX) Marries TV-Cassette Operating System (TVCOS) Digital Group Software Systems, Inc. Staff 144 The Alpha-Numeric Music System - Malcolm Wright 148 V O L U M E I, N U M B E R 6 , 1976 Consumer Comments A Novice Constructs an IM SAI - S.A. Cochran, Jr. Bootstrap fo r 8080 - Li-Chen Wang BYTE Saving Programming Tricks fo r the 8080 - Tom Pittman An Exercise fo r Novice Translator Implementors - Bill Thompson A Classy 8080 Text Editor - F. J. Greeb 48 Lines o f 64 Characters on a T V ( (Video Term inal Technology) Variable Character Spacing in Video Displays - Jim Day T V T - I I Mods to Get 64 Characters Per Line - David 0. Valliere Homebrew TV Display with Graphics - Glendon Smith $98.50 Graphics Terminal K it - SWTPC Errors In & Improvements fo r Whipple & Arnold’s Tiny BASIC Extended (TB X ) - Charles Skeldon MinErrata fo r MINA Plus Tiny TREK - Erik Mueller Button, Button in 8080 Machine Code - Ron Santore FCCPetition on ANSC II Transmissions by Hams - Bruce J. Brown

155 156 157 159 161 175 176 177 178 181 182 183 186 190

---------------------------- V O L U M E I, N U M B E R 7, 1976 — ----------- ---------------------Personal Computing ’76: Looks Like I t ’s Going to Be a GREAT Show - Jim C. Warren 193 1977 NCC Includes Significant Personal Computing Events 194 The Time for Floppy’s is Just About NOW! - Editor 195 Design Contest Offers Head-Per-Trade Hard DISCs as Prizes 197 Proposed Hobbyist-Standard Bus Structure - D. Denney & J. Broom 198 The PCM-12: A PDP-8 Look-Alike Well Worth Looking at - Jim C.Warren, Jr. 200 Z-80. . . Coming on Strong - Jim C. Warren, Jr. 201 Remember Those Secret Codes You Played With as a Kid? - Mai Stiefel 202 8080 TECO and Floating Point Pack - William E. Severance, Jr. 206 Floating Point Routines fo r the 6502 - Roy Rankin & Steve Wozniak 207 Monitor fo r the 6502 - Jack Bradshaw 210 Lunar Lander fo r the 6502 - Mark Garetz 212 “Applications Software” - Games in Pittman’s 6800 TinyBasic - Carl Kelb 216 Low-Cost 6800 Systems Software & Games - Technical Systems Consultants’ Staff 218 Shooting Stars fo r Vitersyk’s 6800 Micro-BASIC - Mark J. Borgerson 219 Bugs & Fixes M INOL: Tiny Trek - More Details & A Correction -Erik Mueller 221 M INOL Errata & Praise - Erik T. Mueller & Phillip Hansford 222 Computer Music Bibliography - John Snell 223 SMRT Will Hurt - Leroy Finkel 226 Lou Field’s Response to the Editor’s Note to the SCCS - Lou Fields 228 -----------------------------V O L U M E I, N U M B E R 8 , 1976 -------------- ---------------------Realizable Fantasy: Computer Control o f Music Tapes for Your Home Stereo - Jim C. Warren, Jr. A Realized Fantasy: Unlimited Speech Synthesis fo r Home Computers Jim C. Warren, Mr. Plessey Does Right by Hobbyists Proposal: A Board to Expand 8880 Instructions - Walt Ferris

2

230 234 238 239

University o f California Requests Suggestions About Stand-Alone Computers fo r Its 120,000 Students 241 Personal Computers: A Bit o f Wheat Amongst the Chaff - Jef Raskin 242 How to Make the 6800 Resident Assembler Work in Your System -Tom Pittman 246 A 6502 Disassembler from Apple - Steve Wozniak & Allen Baum 249 A Number Game fo r the 6502 - Steve Wozniak 253 The Bouncing Beastie: A Random Walker fo r Processor Tech’s VDM Marvin R. Winzenread 255 TBX Additions: String Handling and a New Print Delimiter- Penny Tiger 257 More Mods to Comprer’s Music Program, A 5-Instruction Memory - Erase Routine & Other Memory-Test Programs - Richard Kaapke 259 Bugs & Fixes A ‘Fix ’fo r Denver Tiny BASIC, Praise & a Bug-Note on P. T. ’s 5K BASIC- F. J. Greeb 261 How Secure is Computer Data? N o t Very, say Stanford Experts from the STANFORD OBSERVER 262

■----- ----- —------- —

V O L U M E I, N U M B E R 9, 1976 - — --------- —

---------

Policy Statement: Handling o f Consumer’s Complaints Regarding Vendor’s Products and Services - Editor Hurray & Beware: Everybody’s Jumping on the Convention Bandwagon ( C om p u ter H ob b y ist Conventions Calendar) - Jim C. Warren, Jr. Some Personal Observations on PERSONAL COMPUTING 76 Jim C. Warren, Jr. First West Coast Computer Faire Inside Dope From Motorola An Excellent, Point-by-Point Response to Complaints About the Digital Group - Richard C. Bemis Assembling an IM SA I Microcomputer - Pierre duPont V PCC Research Engineer Evaluates the 16-Bit PACER K it - John Snell The Computer at Puberty from TECHNOLOGY REVIEW How to Code Code Jack Armstrong’s Super Decoder Ring - Jon 0. Stedman Music by Computer Timer Routines fo r 6800’s - Gregory Worth Micro BASIC Plus fo r $15.95 Tiny BASIC fo r the 6800 & 6502 from Tom Pittman’s ‘Company’ Save + Load Mods to Pittman/s 6800 Tiny BASIC - Henry L. Lee A BASIC Terminal Exchange Program - Robert Wilcox Octal Debugging Program (ODT-8 O) for the MCS-80 Computer - E.R.Risher OOPS! A Line-Drawing Game fo r Your Video Terminal - Martin Winzenread SCRUNCH (Pass 1) - A Compact fo r BASIC in 8080 - Martin Winzenread TIN Y HI - Martin Buchanan Book Review Computer Power + Human Reason - Reviewed by Dave Caulkins Tutorials from the IEEE Computer Society - Selected Bibliography With Abstracts Wayne Green to Start Publishing KILO BYTE - John Craig

------------- — ----------V O L U M E I, N U M B E R 10, 1976



265 265 268 270 271 272 273 274 276 278 280 281 281 282 283 284 286 290 291 292 296 296 298

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

Product & Software Testing to Become Regular Feature in DDJ Machine-Readable Programs in Magazine Format - Jim C. Warren, Jr. Use An Acoustic Coupler to Read/Write Tape Cassettes - Jim C. Warren, Jr. Thinking o f Opening a Computer Store? Jim McCord Reports on the LS I-II - T. McCord Tarbell Responses, Compliments & Complaints NEC and IM SAI Incompatible with 8080A - Letters from Glen Tenney, IMSAI and NEC Product Review: P O L Y 88 —An Excellent System - Jef Raskin It’s a BASIC, It’s an APL . .. It’s CASUAL! - Bob Van Valzah Active Low - Mark Space N IB L —Tiny BASIC for National’s SC/MP Kit - Mark Alexander Upgraded CP/M Floppy Disc Operating System Now Available Arithmetic Expression Evaluator Mod - Jim Abshire CHASE: A One or Two Player Video Game - Marvin Winzenread Life’s Like That: Life on an 8080 with a VOM - Marvin Winzenread

300 303 304 307 308 309 311 313 316 329 331 348 349 355 357

$1.50

dr. dobb’s journal of

COM PUTER rthodontia C alisthenics Running Light Without Overbyte January, 1976

Box 310, Menlo Park C A 94025

Volume 1, Number 1

A RE FER EN C E J O U R N A L FO R USERS O F HOME COMPUTERS

Table o f Contents for Volume, 1, Number 1 (20 pages)

page

Tiny BASIC Status Letter - Dennis Allison 1 16-Bit Binary-to-Decimal Conversion Routine - Dennis Allison 2 3uild Your Own BASIC [reprinted from PCC, Vol. 3, No. 4] - Dennis Allison &others 3 Build Your Own BASIC, Revived [reprinted from PCC, Vol. 4, No. 1] - D.Allison& M. Christoffer 4 Design Notes for Tiny BASIC [reprinted from PCC, Vol. 4, No. 2] - D. Allison,Happy Lady,& friends 5 Tiny BASIC [reprinted from PCC, Vol. 4, No. 3] - D. Allison, B. Greening, H.Lady, &lots o f friends 9 Extendable Tiny BASIC - John Rible 10 Corrected Tiny BASIC IL - Bernard Greening 12 Tiny BASIC, Extended Version (TBX), Part 1- Dick Whipple & John Arnold E x a m p le , C o m m a n d Set, L o a d in g In s tru c tio n s , O c ta l L is tin g

14

Letter & Schematics - Dr Robert Suding Using a c a lc u la to r ch ip to add m a th e m a tica l fu n c tio n s to T in y B A S IC

T H I S

T H E

V

4

O

L

I S

O

U

M

R

E

A

I

G

I

1

N

R

E

A

L

N

P

U

18

R

M

I

B

N

E

T

R

O F

1

dr dobb's journal of

T C

ny

B A S IC

alisthenics

60

rthodontia

Running Light Without Overbyte Box 310, Menlo Park C A 94025

V o lum e 1, Num ber 1

fi Q -g-O J U U JULiULSLSULOJULJLgJULOJiJULajLO_gJLOJiJLlLiLftAA.a&OXOXOJL^^^

BASIC ST A TU S L E T T E R b y D e n n is A llis o n The magic o f a good language is the ease w ith w h ich a particular idea may be expressed. The assembly language o f most m icrocom puters is very com plex, very po w e rfu l, and very hard to learn. The T in y BASIC project at PCC represents our a tte m p t to give the ho bb yist a more hum an-oriented language o r no tation w ith which to encode his programs. This is done at some cost in space and/or tim e. As m em ory still is relatively expensive, we have chossn to trade features fo r space {and tim e fo r space) where we could. Our ow n im plem entation o f T in y BASIC has been very slow. I have provided technical directio n o n ly on a sporadic basis. The real w o rk has been done by a num ber o f volunteers; Bernard Greening has le ft the project. As m ight be guessed, T in y BASIC is a tin y part o f w hat we do regularly. (A nd volunteer labor is not the way to run a softw are project w ith any kin d o f deadline!) W hile we've been slow, several others have really been fast. In this issue we publish a version o f T in y BASIC done by D ick W hipple and John A rn o ld in T yle r, Texas. (And oth er versions can 't be far behind.)

SiBHISSSIISiSBBS M Y, HOW T I N Y BASIC C R O W E D ! O n c e u p o n a tim e , in PCC, T in y BASIC started o u t to be: t a BASIC-like language fo r tin y kids, to be used fo r games, recreations, and the s tu ff you fin d in elem entary school math books. t an exercise in getting people together to develop FREE s o ft­ ware. t portable-m achine independent, t open-ended--a to y fo r software tinkerers. t small. Then . . . (fanfare!) . . . along came D ick W hipple and John A rn o ld . They b u ilt T in y BASIC Extended. It works. See pp 13-17 and 19 in th is issue fo r more in fo rm a tio n . More next issue. W AN TED : More T in y BASICs up and running. W AN TED : More articles fo r this newsletter. W A N T E D : T in y other languages. I m ight be able to live w ith T in y F O R TR A N but, I im plore you, no T in y CO BO L! How about T in y APL? Or T in y PASCAL (whatever th a t is)? W A N TE D : E n tire ly new, never before seen. T in y Languages, im ported fro m another planet o r invented here on Earth. Especially languages fo r kids using home com puters th a t ta lk to tvs or play music o r run model trains o r . . .

BASIC, Beginners' All-purpose S ym bolic Instructio n Code, was in itia lly developed in 1963 and 1964 by Professors John Kemeny and Thomas K u rtz o f D a rtm o uth College, w ith partial Isupport fro m the National Science Foundation under the term s o f G rant N SF GE 3864. For in fo rm a tio n on D artm outh BASIC publications, get Publications L is t (TM 086) fro m Documents Clerk, K ie w it Com pu­ ta tio n Center, D a rtm o uth College, Hanover NH 03755. Telephone 603-646-2643. T ry these: T M 028 B ASIC : A Specification $3.15 TM 075 B ASIC $4.50 ^

^

sj / «JL»*

^

*T*

«JL/*

•vjL?’

It w ould help a lo t i f you would each send us a 3x5 card with your name, address (including zip ), telephone number, and a rather com plete description o f your hardware. +JLs

sj/

‘'sjs “J-’’

•*vL*s>

VL*

**T'*

-T*

DRAGON THOUGHTS t We p r o m is e d th re e issues. A fte r these are done, shall we continue? t I f we do, we w ill change the name and include languages o th er than BASIC. t This new sletter is m eant to be a sharing experience, inte nd ed to disseminate F R EE software. It's O K to charge a few bucks fo r tape cassettes o r paper tape o r otherwise recover the cost o f sharing. B u t please make docum entation essentially free, in clu d in g annotated source code. t I f we do continue, we w ill have to charge a b o u t $1 pe r issue to recover our costs. In X eroxed fo rm , we can provide a b o u t 20-24 pages per issue o f tin y eye-strain s tu ff. I f we g et big bunches o f subscriptions, w e 'll p r in t i t and expand the num ber o f pages, depending on the num ber o f subscribers. t So, le t us k n o w . . . shall we c o n tin u e ?

For our new readers, and those who have been following articles on Tiny BASIC as they appeared in P eop le’s Computer Company, we have reprinted on pages 3-12 the best o f Tiny BASIC from P C C as an introduction, and as a reference.

5

January 1976 Tiny BASIC Calisthenics & Orthodontia Box 310, Menlo Paik CA 94025 Page 2

t = v + v; u = t + t; u= u+ u+t u =n -u

T E C H N IQ U E S & PR ACN IQ UES by Dennis Allison, 1 2/1 /75 (T h is w i ll be a c o n t in u in g c o lu m n o f tr ic k s , a lg o r ith m s , and other good s tu ff everyone needs when w ritin g software. C o ntrib u­ tions solicited.) 16-BIT B IN A R Y TO D E C IM A L CO NVER SIO N R O U TIN E t saves characters on stack t perform s zero suppressed conversion t uses m u ltip lica tio n by 0.1 to obtain n/10 and n mod 10 define crutch = O FFH ; declare n, u, v, t; B IT (16) if n < 0 then do; n = -n; call o u tc h ('-'); end; i call push (crutch) repeat; v = shr (n,1); v = v + shr (v,1); v = v + shr (v,4); v = v + shr (v,8); v = shr (v,3);

These c o u ld be registers, o r on the stack

The crutch marks the end o f num­ ber on the stack

These a ll are 16 b it shifts Computes / n/101 o r [ n/1 0J - 1 b y m u ltip lic a tio n Call i t x

.flflflflfljunnflnflBBamflBOOBBoooooaoooeoQooooooooooooff

if u ^ 10 then do; u = u - 10; n = v + 1; end else n = v; call push (u); u n til n = 0;

Computes 10 - x B yte o n ly as high order m ust be equal Perhaps one co u ld use a decimal feature here

ch = pop; do w hile < > crutch; call outch (ch + 030H ); ch = pop; end

Corrects fo r case where [n /1 0 ] - 1 is com p uted and creates ln /1 0 J and n m o d 10 Saves re su lt on stack Loop a t least once

W rite re su lt in reverse order Converts digits to A S C II 0 = 0 3 0 H 02 = 03 2H etc. Pop takes one w o rd o f f the stack

Q Q Q Q Q O QQQflflBflflflflflB 1SLSL& 8 8 8 8 S S i SSL S. A S . S.ASL3JLSLSLSLSLSJLSJL

f Letters from readers are most welcome. Unless they note otherwise, we will assume we are free to publish and share them. t We hereby assign reprint rights to all who wish to use Tiny B A S IC Calisthenics & Orthodontia for non­ commercial purposes. t To facilitate connection between our subscribers, we will

in subsequent issues publish our subscriber list (including addresses and equipment o f access/interest).

PCC T in y BASIC Reorganizes. . .

VT-- IS ' 7 5

I want to subscribe to » DR. DOBB'S J O U R N A L OF

T IN Y BASIC C A L IS T H E N IC S & O R T H O D O N T I A ■ OevvnvS

(3 issues for $3)

T iMi

-fee^

\ >We. ■A - .

Vsfct.

AaaA.

N AM E .

1

\ ‘ U
’ * Z" < A N Y - C H A R > : : = a n y c h a ra c te r e x c e p t " o r ($*) < E X P R ? :: = (+ I - | e ) < T E R M ? i ( + 1- ) < T E R M '» * 2 < T E R M ? ::-< F A C T O R ? ( ( * \ l) < F A C T O R ? ) * 2

< F A C T O R > :: = < .V A R > | < N U M B E R ? I « E X P R > ) < V A R -L IS T > < V A R ? ( ,< V A R ? ) * 2 | € ) | > { = | < | e ) |

=

: ( is n u ll c h a ra c te r a c tu a l c h a ra c te rs a re in b o ld face *

re p e a t lim it e d b y size o f p ro g ra m m e m o ry space re p e a t lim it e d b y le n g th o f lin e re p e a te d 0 t o 4 tim e s

S

m m a

B HHBBBBBBBBBBiBBBBBBBBB

January 1976 Tiny BASIC Calisthenics & Orthodontia Box 310, Menlo Park CA 94025 Page 1 I I also wondered about the TST character string. In my implementation I am using the following technique: the string follows the TST byte pair immediately with a bit 7 set in the last character.

Dear Mr. Allison, I was very interested in your T iny BASIC article in PCC. Your ideas seem quite good. I have a few suggestions regarding your fL system. I hope I am not being presumptuous or pre­ mature with this. Unless I misunderstood you, your IL encoding scheme seems inadequate. For instance, IL JMPs must be capa­ ble o f going up and down from the current PC. This means allotting one o f the 6 remaining bits of the IL byte as a sign bit resulting in a maximum PC change o f 4 31 which is not ade­ quate in some cases, ie. the JMP from just above S17 back to STA RT. May I suggest the following scheme which is based on 2 bytes per IL instruction: IL

YYYg

CA LL

TST

C A LL

X X CO

JMP OX Xg

ML

2X X g

ixx8

(1 s t b y te )

YYYg

YYYg

YYYg

(2 n d b y te )

where XX = lower 6 bits o f high part o f address (assume upper 2 bits are 00) Y Y Y = all 8 bits o f low part of address. The complete address being O X X Y Y Y g. These addresses repre­ sent the locations associated with the IL and ML instructions. Note that if » points to a table with a stored address, you have 3 bytes used— my scheme uses only 2 bytes with the same basic information.

Dear People at PCC, I have a couple o f comments on T in y BASIC: S4 says TST S7, b u t S7 got le ft ou t. T1 says TST on my paper which I suppose should be TST T2. What is L IT and all these " o r 2 0 00 "? When are we going to start p u ttin g some o f this in to machine code? Sincerely, BOB BEARD 2530 Hillegass, No. 109 Berkeley CA 94704 Soon! Ed.

Dear T in y BASIC Dragon, Please scratch m y name on to you r list fo r T in y BASIC V o l. 1. Enclosed is a coupon fo r 3 chunks o f fire. I am really enjoying m y subscription to PCC, especially the article on T in y BASIC. Someday I am going to build an extended T in y BASIC th a t w ill take over the w orld. Basically yours, RON YOUNG 2505 W ilburn, No. 144 Bethany O K 73008

Example:

240^ TST

faM a[)dress in 040006g

0 \L \ 0*E$ HTj On the TSTL, TSTV, and TSTN IL's, it appears you need a ML address for the particular subroutine and 2 additional bytes for the fail address. A t least this is how I am handling it. I am looking forward to future articles in the series. Thanks again— keep up the good work! P.S. I am co-owner o f an Altair. We are writing our Tiny BASIC in Baudot to feed our Model 19's. Richard Whipple 305 Clemson Dr. Tyler, Tx. 75701 We found the same problem with the published IL inter­ preter. We solved it by doing a bit o f rearranging and intro­ ducing a new operations code which does jumps relative to the start of the program, but has the same basic encoding. Your mechanization will, o f course, work, but requires one more byte per IL instruction, may be harder to implement on some machines, and takes more code. We are using the same scheme of string termination (i.e., using the parity bit) as you are. It's simple, easy to test, and difficult to get into the assembler. There are a few errors and oversights in the IL language and in the interpreter you didn't mention. See the new listing in this issue. Good luck. Keep us informed o f your progress.

Since the last issue came o u t, the / L code, macro d e fin itio n s fo r each IL in ­ struction, a subroutine address table fo r the assembly language routines th a t exe­ cute the IL functions, the assembly lan­ guage code th a t executes the IL fun c­ tions (all except the 16-bit a rith m e tic ones), and the IL processor have been punched on paper tape in source form . HOP, TST, TSTN, and TSTL no w do branches +32 relative to the cu rre n t posi­ tio n counter. I f the relative branch fie ld has a zero in it, indica ting a branch to " here", the / L processor p rin ts o u t the syntax error message w ith the line num ­ ber. The ERR in stru ctio n th a t was in the o ld IL code no longer exists. I JM P and I C A L L are used because the In te l 80 80 assembler uses JMP and C A LL as m nem onics fo r 8080 in stru c­ tions. I JMP and I C A LL are fo llo w e d b y one byte w ith an unsigned num ber from 0 to 255. This is added to S T A R T to do an indexed ju m p o r call. Bernard

15

January 1976 Tiny BASIC Calisthenics & Orthodontia Box 31 0, Menlo Park CA 94025 Page 1 2 t

IN T E R P R E T IV E

LANGUAGE

corrected

S U B R O U TIN E S

; EXPR I

) E0 i E01 x El t

) E2:

; E3 :

TER M : T0 t

TIIMV BASIC IL

TST DB IC A L L NEG HOP

;T E S T FOR UNARY * - * E0 • - * OR 2 0 0 0 ; P U T TERM ON A E S TK TERM ; n e g a te v a l u e on a e s t k I GO GET A TERM El

TST DB IC A L L TS T DB C ALL ADD HOP

; t e s t fo r u n a r y E01 * + f OR 2 0 0 0 ; p u t t e r m on a e s t k TERM ; t e s t fo r a d d it io n E2 * OR 2 0 0 0 ; g e t se c o n d term TERM ; P U T SUM OF TERMS ON A E S TK ; l o o p a r o u n d fo r more El

TS T DB CALL SUB HOP

; t e s t f o r s u b t r a c t io n E3 • OR 2 0 0 0 ; get sec o n d term TERM ; p u t d if f e r e n c e o f term s ; l o o p a r o u n d f o r more El ; t h is

R TN

IC A L L TST DB IC A L L MPY HOP

can

be

S T A T E M E N T E X E C U T O R W R I T T E N IN I L ( I N T E R P R E T I V E L A N G U A G E ) T H I S IS W R I T T E N I N M A C R O S F O R T H E I N T E L I N T E L E C 8 / M O D 8 0 S Y S T E M U S I N G I N T E L ’S A S S E M B L E R . CONTROL START* ERRENTl CO I

XECi

; I

on

r e c u r s iv e

i

SEI j SE21

I T1

T2

TST DB IC A L L D IV .HOP

J T E S T FOR D I V I S I O N V * iOR 2 0 0 0 ; g e t t h e q u o t ie n t FAC T ; p u t q u o t ie n t on a e s t k ; l o o p f o r more T0 ; retu rn

RTN

to

caller

j

; F AC T i

F0: FI :

TSTV IND RTN TS TN RTN TST DB IC A L L

F0

; t e s t fo r v a r ia b l e ; g e t in d e s o f t h e v a r ia b l e

FI

; test

FI * (* i EXPR

/e r r o r ; t h is

fo r

num ber

if is

it s a

not

a

r e c u r s iv e

RELOP I

rs T DB RTN

FE1 • )•

TST DB L IT R TN

R0 • =*

TST DB TST DB L IT R TN

RA • • 3

; every IOR 2 0 0 0

;C H E C K l OR 2000

HAS

FOR

0

; R0 I

R1 t

R3 i

L IT RTN

R4 i

TST DB TST DB L IT RTN

; R5 *

i R6 t

16

TST DB L IT RTN L IT RTN

/•CHECK FOR

' • OR 2 0 0 0 R5 * « * OR 2 0 0 0 5

R6 * •

TO

I

S2 |

/ INITIALIZE /’W R I T E A C R - L F ;WRITE PROMPT AND GET A LINE ;IF NO L I N E N U M B E R GO E X E C U T E ; INSERT OR DELETE THE LINE ;l o o p f o r a n o t h e r l i n e JINITIALIZE FOR EXECUTION

CO

IT

EXECUTOR

TST DB TSTV TST DB ICALL DONE STORE NXT

/ C H E C K F O R ’L E T * SI • L E ’, ’T • O R 2 0 0 0 SEI / E R R O R IF N O V A R I A 3 L E I SE2 / E R R O R IF N O ’- ’ O R 2 0 0 0 /PUT EXPRESSION ON AESTK EXPR /CHECK FOR CR LINE TERMINATOR / P U T V A L U E O F E X P R E S S I O N IT I T S /CONTINUE NEXT LINE

TST DB TST DB ICALL DONE XFER

S3 * G ’* S2 *T* / EXPR

TST DB ICALL DONE SAV XFER

S2

TST DB TST DB PRS TST DB SPC HOP

S8 * P R 11 S7 OR

CELL

/ C H E C K F O R 'GO* OR 2000 / C H E C K F O R ’G O T O * on 2 0 0 0 /g e t t h e l a b e l ;CHECK FOR CR LINE TERMINATOR ; D0 a 'GOTO* TO T H E L A B E L

•su*, XPER

.... (

S6 1O R S4

DONE NXT

*

/ C H E C K F O R * G O S U B ’* F A I L U R E I S A N E R R O R I OR 2000 /PUT EXPRESSION ON AESTK ;CHECK FOR CR LINE TERMINATOR ; S A V E N E X T L I N E N U M B E R IN B A S I C T E X T ; D 0 A ’G O S U B ’ T O T H E L A B E L

JC H E C K F O R 'PRINT* T ’ OR 2000 / C H E C K F O R ”V T O B E G I N A S T R I N G 2000 / P R I N T T H E D A T A E N C L O S E D IN Q U O T E S J ’/ ’ M E A N S M O R E T O C O M E 2000 ;SPACE TO N E X T ZONE ;G0 BACK FOR MORE ;CHECK FOR CR LINE TERMINATOR /CONTINUE NEXT LINE

process

; El i

STATEMENT

STMT 1

JG ET ONE FAC TO R FA C T ; t e s t fo r m u l t ip l ic a t io n T1 • I OR 2000 ; get a factor FA C T ; p u t t h e p r o d u c t on a e s t k ; l o o p a r o u n d fo r more T0

SECTION

INIT NLINE GETLN TSTL INSRT 1J M P XINIT

HAVE A

TST DB ICALL ICALL ICALL TST DB CMPR IJ M P

/ C H E C K F O R * I F* S9 ’I ’* ’F ’ O R 2 0 0 0 EXPR /GET THE FIRST EXPRESSION RELOP /GET THE R E LATIONAL OPPERATOR /GET THE SECOND EXPRESSION EXPR S8A / C H E C K FOP. ’T H E N ’ ’T H E ’, ’N ’ O R 2 0 0 0 /IF NOT TRUE CONTINUE NEXT LINE STMT /IF TRUE PROCESS THE REST OF THIS

TST DB ICALL INNUM STORE TST DB DONE NXT

SI 2 / C H E C K F O R ’I N P U T * ’I N P U ’# * T ’ O R 2 0 0 0 VAR / G E T T H E V A R I A B L E ’S I N D E X /GET THE NUMBER FROM THE TELETYPE / P U T T H E . V A L U E O F T H E V A R I A B L E IN / ’/ ’ M E A N S M O R E D A T A SI I OR 2000 /CHECK FOR CR LINE TERMINATOR /CONTINUE NEXT LINE

TST DB DONE RSTR

SI 3 / C H E C K F O R ’R E T U R N * ’R E T U R ’# * N * O R 2 0 0 0 /CHECK FOR CR LINE /R E T U R N TO C A L L E R

TST DB FIN

S 14 / C H E C K F O R ’E N D * • E N ’, ’D|’ O R 2 0 0 0 /GO B ACK TO C O N T R O L

TST DB DONE LST NXT

SIS / C H E C K F O R ’L I S T * ’L I S ’,' T * O R 2 0 0 0 /CHECK FOR CR LINE TERMINATOR /TYPE OUT THE BASIC PROGRAM /CONTINUE NEXT LINE

DONE NXT

ITS

TERMINATOR

MODE

SI 6

; C H F . C K F O R ’R U N * ’ OR 2000 ;CHF.CK F O R C R L I N E T E R M I N A T O R /CONTINUE NEXT LINE

S 16 •CLEA* START

i C H E C K FOP. ’C L E FAILURE • R ’ OR 2000 /REINITIALIZE EVERYTHING!

•RU’

LINE

IS A N

ERRORI

January 1976 Tiny BASIC Calisthenics & Orthodontia Box 310, Menlo Park CA 94025 Page 1 3 December 12, 1975 The T yle r Branch o f the N orth Texas C om puter Club is s till having fun w ith T in y BASIC as you can see by examining the p rin t-o u t th a t 00090 follow s. We are now calling it T in y BASIC Extended a fte r the addi­ 00100 00105 tio n o f F O R -N X T loops, DIMension statements-arrays, and a few 00110 other goodies. The L IF E program was w ritte n by David Piper, a 00112 high school student o f John's (he teaches at Robert E. Lee High 00115 00120 School). David is w orking on KIN G D O M no w -w e can hardly w ait. 00130 Below are a fe w com ments about our system and T in y BASIC th a t 001/10 00150 may be o f interest to yo u r readers. 00150 1. Our A lta ir 8800 is interfaced to a Model 19 Baudot Teletype 00170 at John's and via modems and a leased telephone line to a Model 15 00175 OOIRO Teletype at m y house about 3 /4 mile away. A t present the system 00190 is s tric tly B A U D O T -n o ASCII conversion whatsoever. 00200 00210 2. We use a Suding-type cassette interface th a t has been very 00212 reliable. 4 K bytes load in about 1 m inute 20 seconds. 00 214 00220 3. The T in y BASIC Extended takes about 2.9K bytes o f 00225 memory. 00230 4. The storage fo rm a t fo r our T in y BASIC is as fo llo w s: 00240 00250 2 byte statem ent label - 1 byte length o f te x t - m u ltib y te text - (cr) 00260 The statem ent label range is 1 to 65535. The "leng th o f te x t 00270 00230 b y te " is used to speed up label searching in GOTO and other 002S5 branching. 00287 5. To conserve m em ory, we have shortened some commands to 00290 00300 tw o or three letters (i.e., PR fo r P R IN T, IN fo r INPUT, NXT fo r 00301 N EXT, etc.). 00302 00303 6. A " $ " is used to w rite m ulti-statem ent lines. A " ! " is used to 00305 suppress new line o u tp u t in a PR statement. This allow s continuing 00310 the next PR on the same line. The provides one skipped space in 00315 00320 a PR statement. 00330 7. Functions cu rre n tly on line are: 00335 RN •» generates random numbers between 0 and 10,000 decimal. 00335 003'; 5 TB (exp) -►TAB fu n c tio n in PR statement produces a number 00350 o f skipped spaces equal to the value o f " e x p ," an a rith m e tic 00355 05000 expression. 05010 8. M em ory fo r arrays is allotted fro m the to p o f m em ory down 05020 while the program builds fro m the b o tto m up. If the y cross, you get 05030 error message. Arrays may be 1 or 2 dimension. Max. size: 255 by 05040 05110 255. 05120 9. Here are some B A U D O T equivalances: 05130 05140 : = (equal to) 05150 ) : > = (greater than equal to) 05160 05170 (: < = (less than equal to) 05180 )( (n o t equal to) 05200 & + (plus) 05205 05210 # * (times) 05220 Parentheses are also used in arith m etic expressions. The system 05230 05240 understands the difference by context. 05250 10. FOR 1=1,1000 05260 NXT I 05270 05230 END take sabo ut 1.6 seconds to execute. 05290 11. The colon is used as a T in y BASIC prom pt. 06000 12. " ? " is used as a ru b o u t key and tw o LT R 's keystrokes are used to begin a line over (LTR and FGS are keystrokes used to change case in Model 15/19 Teletypes) 13. Model 15/19 Teletypes are great machines and we have proved th e ir w o rth to com puter hobbyists! Thanks again fo r you r fin e w o rk at PCC, we remain Yours T ru ly , D IC K W HIPPLE 305 Clemson Dr. T yler T X 75701

JOHN A R N O L D Rt 4, Box 52A T y le r T X 75701

06010 06020 05030 06040 06050 06060 06070 06080 06090 06100 06110 06120 06130 06140 06150 S

PR "L IF E WITH T IN Y B\SIC EXTENDED" PR "S I 7.E" J I LET FlO IN A P S " "$ PR "THE BEGINNING-W AIT'S P R " " LET BIAA2 DIM G < P ,B ),H (B ,B ) FOR J : l TO B FOR I I I TO B LET G ( I , J ) J 0 $ L I T H < I,J )1 0 IRUN NXT I NXT J Lire WITH TINY BASIC EXTENDED LET MIA 11 S I Z E J 11 FOR J 12 TO M THE BEGINNING-WAIT FOR I S2 TO M ?2 IN K . ?2 I F K < ! 1 GO TO 220 t 2 LET I : M T2 »2 GO TO 230 t 0 10)1 tl 1 I l l t l II LET G ( I , J ) S K t 2 I t K ! 1 L IT FsF&l T2 12 NXT I 12 P R "" t 2 NXT J GENERATIONS ? 3 PR "GENERATIONS";! jtJ D CENERATION 0 P R "" P R "" P O P U L A T I O N IS 7 __________ Li'T S :o I I t i i I t FOR EIS TO D PR "GENERATION"JESPS"" P R "" I F F ) 0 GO TO 305 PR "POPULATION IS ZERO"$PR” "$END PR "POPULATION I S » j F $ P R " " CENERATION 1 GO SUB 6000 LET F :0 GO SUB 5000 P O P U L A T I O N IS 15 NXT E PR "HOU NY MORE"; !$ IN C $PR "" PR" " IF C S 0 END t i t * * LET S :ESL£T DSDIC #/#I / GO TO 290 t t f I ) FOR I :2 TO M FOR J :2 TO M LET N SO LET N : G C I - l , J - l > t C ( I . J - l ) i C < U l , J - l > t G < L E T N : N 't G ( I - l , J t l ) i G ( I , J l l ) i G ( I 4 l , J i l ) \ I F G ( I , J ) )< 1 GO TO 5180 \ I F N ) 1 GO TO 5150 LET H C I , J ) : 0 GO TO 5210 I F N C 3 GO TO 5200 LET K ( I , J > SO GO TO 5210 IF N X 3 GO TO 5210 LET H ( I . J ) S i LET F S F il NXT J NXT I FOR I S 1 TO B FOR J U T O B LET G ( I , J ) S H C I , J ) LET H C I,J )1 0 NXT J NXT I RET FOR JS2 TO M LET R SO FOR OSl TO M IF G (Q ,J ) S 1 LET RSI NXT Q I F RIO GO TO 6120 FOR I S2 TO M I F G C I,J > S 1 GO TO 6100 PR " " ; ! GO TO 6110 PR I NXT I PR " " NXT J P R ""S P R ” RET

1 i t 2

I- l,J > lG < m ,J ) GE NERATION 2 P O P U L A T I O N IS 12

*

*

#

# # *

*

*

it*

P O P U L A T I O N I S 22

9

0 0 f

i f a§

0

t f # #i 800 *0 0 *

HOU MANY MORE ? 1 CENERATION U P O P U L A T I O N IS 16

#

#

* * 0

#

* *

# *

*

* #

0

*

§

KOtf M A N Y M O R E ? 0

17

January 1976 Tiny BASIC Calisthenics & Orthodontia Box 310, Menlo Park CA 94025 Page 14

T I N Y BASIC, E X T E N D E D V E R SIO N 6.

DJM Statement: Ono or two dimensional arrays perm itted. Array arguments can be expressions.

by Dick W hipple (305 Clemson Dr., T yle r T X 75701) & John A rn o ld ( Route 4, Box 52-A, T yler T X 7570 1) IN TR O D U C TIO N The version o f T IN Y BASIC (TB) presented here is based on the design noted published in September 1975 PCC (V ol. 4, No. 2). The differences where they exist are noted below. In this issue we shall endeavor to present su fficie n t in fo rm a tio n to bring the system up on an Itel 8080-based com puter such as the A lta ir 8800. Included is an octal listing o f our ASCII version o f T IN Y BASIC EX T E N D E D (T B X ). In subsequent issues, structural details w ill be presented along w ith a source listing. A Suding-type cassette is now available from the authors (in fo rm a tio n to fo llo w ). We w ould greatly appreciate comments and suggestions fro m readers. U n like some software people o u t there, we hope you w ill fid d le w ith T IN Y BASIC E X T E N D E D and make it less T iny\

Example:

STANDARD BASIC

LET PR GOTO GOSUB RET IP IN LST RUN NEW » SZE DIM FOR NXT

LET PRINT GOTO GOSUB RETURN in

I$ m ^TBX

7.

f'_QR and NXT Statements: Step equal to 1 only. It e r a tiv e lim its can be expressions. Nesting perm itted. Caro must bo exercised when e x itin g a loop p rio r to completion o f indexing. See Example. t a m p le :

NEW

LET X = 10 FOR I = 1 to X LST Y = 2 * A+ B 17 Y ~ Z I = X$NXT I$GOTO 60 * NXT I LET Y = 3

see no. 9.

8.

A vaila ble Functions: a) RN: Random number generator. Range 0 i R N -10,000. No argument perm itted. b) TB(E) : Tab fu n ction . In a PR statement, TB(K) p rin ts a number o f SPACE'S equal to the value o f expression "E” .

9.

The d o lla r sign can bo used to w rite m u ltip le statement lin e s . Example:

10 20

IN B LET A=2*(B+1):|PRA£END

When using an IF statement, a “f a ls e ” condition tran sfers execution to the next minhered lin o . Thus in. lin e 40 o f the example o f no. "7, the chained statements w i l l not be executed unless a “ tru e" condition is encountered, 10. L£2? Command: a) b) c) 11.

LST CR-— l i s t s a l l statements in program LST a Qil— l i s t s only statement la b e lle d a IoT a,b CiV~ l i s t s a l l statements between la b e ls a and b in clu sive. P rin ts two decimal numbers equal toJ

Number o f memory byte3 used by current program. Number o f memory b yte3 remaining.

Note: 12.

Can take ar\yone o f three forms:

SZE Command: a) b)

NEXT

*CLEAR in original TB

10 20 30 40 50 60

* For explanation o f

INPUT LIST RUN SIZE DIMENSION FOR

LST V = 10 DIM A(1 0 ,1 0 ),B(2 + V)

Array variables can bo used in the same manner as ordinary v a ria b le s.

ABBREVIATED COMMAND SET TB AND TBX

10 20

Array storage included only a fte r f i r s t execution o f program.

Recording Programs on C assette: Core dumps to cassette should begin at 033350 ( c o l i t o c ta l) and continue through addross stored at 033354 (low byte o f addross) 033355 (high byte o f address)

TBX

HOW IT DDYERS FROM TB

1.

TEX system prompt is a colon

2.

Statement label values 1 to 65535,

3*

Error correctio n during lin o entry:



a)

Rubout (ASCII 177o) to d ele te a character. P rin ts a "

b)

Control L (For/a Feed ASCII 014g) to d e le te f u l l lin o .

IN Statement: Termination o f numeric input is accomplished by SPACE keystroke. A l l other terminations use CR (Carriage Return). Statement : A ca'ama is used fo r zone spacing v h ile u semicolon produces a s in g le space. A comma or semicolon at the end o f a lin e surproasos CR ana LF (Line Feed). To skip a lin o , use PR by i t s e l f .

18

Of course these cassette programs should bo loaded back at 033350.

IMPLEMrLTTING Tig Memory A llo c a tio n : I. II. III.

Misc. Storage (i/ o Routines) C00000 to 000377* TBX

020000 to 033377

TEX Programs

034000 to upper lim it o f memory.

* In our system we maintain a Monitor/Ed i t or in the f i r s t IK byte o f memory. 3/4 & is protected and 1/4 K can be used fo r system PAM. Such a con figu ration is usefu l but not necessary.

January 1976 Tiny BASIC Calisthenics & Orthodontia Box 310, Menlo Park CA 94025 Page 15 EXEC U TIN G T B X : S im ply examine 000000 and place the com puter in the RUN mode. A colon indicates the system is operative.

E x t e r n a l P rogra m R e q u ir e m e n t s : 1*

S ystem E n t r y R o u tin e —

ADRS

IHST

000000 000001

061 6 ll L X I SP

000003

377 77 J 000 00 J 303

000004

254

JMP TEX E n t r y P o i n t

000005

021

000-002

}

Th e s t a c k p o i n t e r (S P ) must n o t b e i n p r o t e c t e d memory. I f y o u d e o ir e t o r e l o c a t e t h e SP ch ange t h e f o l l o w i n g lo c a tio n s a c c o r d in g ly : a) b)

000001 (S P l o w ) 026301 (S P l o w )

and 000002 (S P h ig h ) and 026302 (S P h ig h )

S ystem R e c o v e r y R o u tin e —

3.

ADRS

INST

000070 000071 000072

303 000 000

In p u t S u b r o u t in e : Y ou r in p u t s u b r o u t in e must b e g i n a t 000030. I t s h o u ld c a r r y o u t t h e f o l l o w i n g f u n c t i o n s : a)

b)

H ove an A S C II c h a r a c t e r fr o m t h e in p u t d e v i c e t o r e g is te r A. The A S C II c h a r a c t e r s h o u ld bo r i g h t j u s t i f i e d in A w ith P a r i t y b i t eq u a l to z o r o . E x a m p le : nBn k e y s t r o k e s h o u ld s e t A t o 102 ^ . T e s t f o r ESC k e y s t r o k e (A S C II 1 7 7 g) and jump i f t r u e t o 0 00 000. S u g g e s te d i n s t r u c t i o n s

376? 177) 312)

C P I *ESC»

000 V 000 J

JPZ S ystem E n t r y R o u tin e

ERROR MESSAGES The fo rm o f error messages is: ERR a 3 where a is error num ber, and 3 is statement number where error was detected. Label 00000 indicates error occurred in direct execution. ERROR NUMBER 1 In p u t line to o long--exceeds 72 characters. 2 Num eric o ve rflo w on input. 3 Illegal character detected during execution. 4 No ending qu otatio n mark in PR literal. 5 A rith m e tic expression to o com plex. 6 Illegal a rith m e tic expression. 7 Label does n o t exist. 8 Division by zero not perm itted. 9 S ubroutine nesting too deep. 10 RET executed w ith no p rio r GOSUB 11 Illegal variable. 12 unrecognizable statement or command. 13 E rror in use o f parentheses. 14 M em ory depletion. EXAM PLE PROGRAM OF T B X One example program w ritte n in T B X follow s. It m ig ht assist you in debugging. A T B X line is structured as fo llo w s:

n-t-1 Byte No.

c)

Output an ech o ch eck o f t h e in p u te d c h a r a c t e r .

d)

No r e g i s t e r s

sh o u ld b e m o d ifie d e x c e p t A .

O u tpu t S u b r o u t in e : Y ou r o u tp u t s u b r o u t in e s h o u ld b e g i n a t 000 050. I t s h o u ld move t h e A 3 'J II c h a r a c t e r i n r e g i s t e r A t o t h e o u tp u t d e v i c e . P a r it y b i t i s z e r o . No r e g i s t e r s i n c lu d in g A s h o u ld b e m o d i f i e d .

1& 2 3 4 th ru n n+1

Binary value o f label; most significant part in Length o f te x t plus 2 in octal. T ext o f line. CR (015 g ).

1.

A fte r the last line you should fin d tw o 377s. A t the end o f the example run is an octal dum p o f the program area o f m em ory. EXAMPLE PROGRAM IN TEX

5.

C f t - U S u b r o u t in e : A t 000020 y o u must h a v e a s u b r o u t in e t h a t w i l l o u tp u t a CR f o l l o w e d by a L F . O n ly r e g i s t e r A may b e m o d i fi e d .

L O A D IN G T B X : The octal listing o f T B X is reproduced later in the te xt. Addressing is split octal and gives the address o f the firs t byte o f each line. An octal loader o f some kind is almost a necessity. Load­ ing by fro n t panel switches w ould be a considerable chore. A Suding-type cassette is available fo r $5, postpaid, fro m the authors. Send check or money order to : T B X Tape c/o John A rn o ld , Route 4, Box 52-A, T yle r T X 75701. If you are interested in a Baudot version o f T B X , please inquire at the same address. Use o f a cassette tape to store T B X is v irtu a lly a necessity. Every e ffo rt has been made to protect T B X against self-destruction b y t nothing is 100% sure! The highest address available in you r system fo r program storage must be loaded as follow s: 026115

XXXg

low part

026116

XXX8

high part

Exam ple: Suppose you have one 4K board:

026115 377 026116 037

1NEW ! 1 0 IN A :2 0 P R * TEST A IS 130 PR 1 -HO GOTO 10 : LST

* ;A

0 0 0 1 0 IN A 0 00 20 P R * TEST A IS 0 0 0 3 0 PR 0 0 0 4 0 GOTO 10 IL S T 20

* ;A

00020 PR " IL S T 2 0 , 3 0

TEST A IS

0 0 0 2 0 PR * 0 0 0 3 0 PR 1 RUN

TEST A 13 * ; A

T 12

t 356

TEST A IS

*;A

12

TEST A IS

356

t !D P 0 : 0 3 4 0 0 0 000 034000 03 4 0 1 0 015 034020 040 034030 040 000 03 4 0 4 0 034050 050 034 060 061 1

007 012 000 040 11 1 03 6 012 06 0

007 024 124 123 00 5 040 015

040 025 105 Oh O 040 107 377

1 11 116 040 0 4 0 120 122 123 124 0 40 042 073 101 120 122 015 117 124 117 377 W - ■Oi^-2

101 0 42 10 1 015 000 040

19

January 1976 Tiny BASIC Calisthenics & Orthodontia Box 310, Menlo Park CA 94025 Page 1 6

20

02 0 0 0 0 020010 02 0 0 2 0 020030 020040 02 0 0 5 0 020 060 020070 020100 0 2 0 1 iO 020120 02 0 1 3 0 020 140 020150 02 0 1 6 0 02 0 1 7 0 020200 0202 10 020220 020230 02 0 2 4 0 020250 02 0 2 6 0 020270 020300 020 3 iO 020320 02 0 3 3 0 020340 020 350 020360 020370 02 1 0 0 0 021010 021020 021030 021040 02 1 0 5 0 021060 0 21 070 02 1 1 0 0 021 A10 02 1 1 2 0 02 1 1 3 0 02 1140 02 i i 50 021160 02 1 1 7 0

041 312 376 312 053 332 021 07 6 303 000 054 105 040 117 073 1l l 123 0 62 000 346 000 0 00 00 0 325 033 020 315 311 104 026 325 020 345 021 356 312 175 026 332 354 205 03 0 174 114 043 043 02 1 053

ill 036 014 306 004 000 303 072 000 1 :4 066 123 042 122 11 1 122 042 0 10 032 0 i7 000 000 000 0 32 04 1 0 42 331 3 15 115 1 17 052 076 026 024 033 052 206 021 037 0 33 322 104 272 021 163 321 043 345

0 20 020 312 026 076 021 371 357 020 123 062 124 105 04 0 015 105 015 000 3 76 31 1 000 000 000 376 000 350 020 221 051 0 06 350 07 1 001 043 321 021 157 04 3 021 3 45 105 115 302 023 043 032 023 043

021200 02 1 2 1 0 02 1 2 2 0 021230 021240 0 2 )2 5 0 021260 021270 021300 021310 021320 02 1330 021340 021350 02 1 3 6 0 021370 022000 022010 022020 022030 022040 022050 022060 022070 022100 022110 022120 02 2 1 3 0 022140 022150 02 2 1 6 0 022170 022200 022210 022220 022230 022240 02 2 2 5 0 022260 02 2 2 7 0 02 2 3 0 0 022 310 022320 02 2 3 3 0 02 2 3 4 0 02 2 3 5 0 022360 02 2 3 7 0

312 353 032 021 354 361 376 300 346 151 022 023 353 043 303 021 346 022 021 033 000 000 000 000 000 020 315 02*. 315 377 322 127 311 026 104 327 312 315 312 341 34 1 312 022 015 322 065 041 357

207 052 167 173 033 020 200 02 1 077 303 346 376 03* 023 257 353 07 7 345 04 3 357 000 000 000 000 345 047 147 04 1 201 004 151 170 000 022 1 15 170 275 205 227 301 301 304 030 312 022 302 360 227

021 3 54 043 271 072 321 322 043 107 257 077 040 37 6 312 021 301 043 147 043 04 3 000 000 000 000 325 315 02 2 012 022 173 022 271 000 3) 1 052 2 72 022 026 022 303 34 5 022 0 32 317 04 1 345 03 3 311

006 376 067 303 077 07 6 020 076 00 0 124 060 061

116 122 015 0 40 015 000 060 000 OOu 000 000 040 00 0 033 04 2 020 051 000 033 043 076 303 052 322 322 176 053 0 72 021 34 1 114 052 072 167 303 043 043 033 023 302 356 311 314 15G 043 021 107 312 200 341 346 023 116 151 303 065 000 000 000

coo

305 147 041 000 301 225 173 310 00 0 32 5 304 302 032 023 305 254 311 033 02 3 026 360 022 066 000

T I K I BASIC EXTENDED

1 10 177 020 00 5 3 57 05 7 ooo 01 5 000 040 0 15 04 2 104 117 1 11 1 14 042 000 330 000 0 JO 000 000 02 3 3?6 000 3 50 376 O il 01 1 104 276 0 15 005 352 064 026 271 053 356 044 176 021 3 50 356 376 152 043

337 3 12 167 020 303 276 000 062 000 066 015 044 042 12 7 124 111 015 000 576 000 000 000 02 1 3 12 iOO 321 033 012 051 303 11 5 303 276 021 033 021 021 312 325 033 157 002 i 75 033 033 015 021 176

376 040 043 167 005 322 000 00 7 000 060 042 120 015 040 040 1 16 057 000 072 000 000 000 111 271 3 32 311 067 320 332 331 04 1 050 312 1 72 176 043 044 170 353 306 315 0 53 273 353 074 312 321 376

015 020 00 5 31 1 02 0 OCO 327 020 000 060 124 122 106 04 2 1 16 105 067 000 320 000 000 000 020 020 320 000 321 023 311 020 111 020 016 062 2 70 043 303 0 21 052 003 340 013 302 162 167 166 311 015

303 0*3 172 220 033 04 1 02 1 147 116 376 043 327 322 021 177 04 3 043 351 2 57 300 000 000 000 000 353 022 144 3!5 321 137 205 015 00 0 052 03 3 2*3 147 023 345 022 032 376 376 315 033 066 017 311

175 104 270 02 i 376 002 376 303 043 300 116 021 363 32 1 276 303 34 5 34 1 021 066 000 000 000 000 0 16 04 1 000 147 34 1 172 137 315 306 306 353 022 02 3 032 315 32 1 023 01 5 042 026 07 6 017 000 052

021 115 302 053 001 032 100 257 345 322 043 033 021 140 302 257 04 1 322 04 1 017 000 000 000 000 000 350 315 022 311 234 172 201 060 033 033 171 032 37 6 026 3 11 376 310 3 10 022 04 0 247 076 350

043 341 220 042 302 176 322 021 140 000 032 325 276 151 3 55 02 1 015 25 7 357 311 000 000 000 000 041 003 147 173 006 127 214 022 315 053 023 2 73 157 015 022 000 040 303 376 303 357 311 012 033

OCTAL LISTING

023000 02 3 0 1 0 02 3 0 2 0 023030 02 3 0 4 0 02 3 0 5 0 02 3 0 6 0 023070 023100 0 2 3 )1 0 023120 023130 023140 023150 023160 023170 02 3 2 0 0 02 3 2 1 0 023220 023230 023240 0232 50 023260 023270 023300 023310 023320 023330 023340 023350 023360 023370 024000 024010 024020 024030 024040 024050 024060 024070 024100 024 1 iO 024120 024130 024 140 024150 024160 024170

227 023 311 350 343 361 033 026 042 301 175 174 076 101 104 320 2 20 117 013 154 026 040 02 1 000 044 24 7 023 312 157 311 033 310 000 000 002 000 000 324 OOJ 016 032 376 026 044 146 07 1 043 023

274 041 023 033 305 033 301 305 361 320 057 267 055 022 115 303 023 322 140 023 32 5 357 11 1 312 023 311 303 324 046 0 32 376 04 1 023 001 000 000 000 046 000 0 00 023 015 023 02 3 150 023 161 321

302 004 032 023 247 160 175 052 033 303 157 362 345 24 7 34 1 204 320 163 151 353 076 06* 020 312 076 023 277 023 024 376 100 000 0 55 002 001 000 000 004 0 03 004 376 310 076 311 315 1 14 247 076

021 032 147 023 311 043 376 361 146 325 04 3 147 315 311 0 i2 023 013 023 311 312 077 00 7 032 02 3 015 315 023 033 315 040 322 000 050 000 000 000 000 000 000 000 040 3 76 001 315 044 105 311 001

023 30 S O2 3 301 305 161 177 033 175 026 311 02 3 026 345 2 74 003 003 0 04 315 022 315 02 0 376 315 062 33 1 032 306 044 023 310 303 0 07 001 013 070 000 002 126 00 0 312 044 315 07 1 023 315 03 5 311

275 343 032 04 1 104 043 330 053 376 174 315 315 022 052 312 012 003 303 07 1 023 026 315 055 331 00 7 020 37 6 300 023 312 023 124 056 000 0 00 000 0 00 000 053 023 100 310 331 02 3 24 7 071 372 023

302 305 157 022 1 15 042 303 1C6 100 057 0/1 115 341 352 174 275 012 163 023 303 022 000 04 1 020 02 0 315 040 320 067 351 376 024 073 001 010 025 002 001 000 000 024 303 020 106 3 11 023 034 000

021 24 7 042 032 052 361 322 053 150 147 023 023 315 033 023 3 12 201 023 315 330 076 020 000 31 5 321 115 023 00 7 023 023 050 0 00 025 000 000 000 000 000 023 023 033 314 315 043 315 160 125 023

024200 02 4 2 1 0 0 24 220 02 4 2 3 0 024240 02 4 2 5 0 02 4 2 6 0 02 4 2 7 0 024 300 02 4 3 1 0 024320 02 4 3 3 0 02 4 3 4 0 024350 024 360 02 4 3 7 0 025 000 02 5 0 1 0 02 5 0 2 0 02 5 0 3 0 02 5 0 4 0 02 5050 02 5 0 6 0 02 5070 025100 0251 10 02 5 1 2 0 025130 02 5 1 4 0 025150 02 5 1 6 0 025170 02 5 2 0 0 02 5 2 1 0 025220 02 5 2 3 0 02 5 2 4 0 02 5 2 5 0 02 5260 025 2 70 02 5 3 0 0 02 5 3 1 0 025320 025330 02 5 3 4 0 025350 025360 025370

315 01 i 023 023 325 374 267 314 311 115 033 333 157 062 301 174 023 274 315 001 004 104 172 137 075 051 043 303 023 000 023 302 025 02 5 025 004 325 015 321 303 311 001 376 001 307 02 5 115 042

07 1 315 315 01 i 006 301 374 115 004 041 170 024 072 363 311 267 174 302 026 174 303 115 230 172 312 3 53 072 104 315 325 34 5 262 174 303 322 04 1 351 312 311 224 376 310 000 056 001 315 052 364

023 044 115 315 000 024 301 02 3 315 000 037 031 363 033 325 374 267 020 02 5 346 031 04 1 127 210 1 15 303 363 02 5 044 315 315 025 272 224 22 7 076 312 375 172 02 5 000 376 310 2 76 056 044 364 033

104 023 023 044 315 353 024 315 115 000 107 174 03 3 303 006 301 374 02 5 303 100 02 5 000 322 127 02 5 055 033 315 02 3 07 1 071 172 3 12 025 02 5 00 0 260 022 34 6 376 310 004 37 6 00 1 315 023 033 301

115 24 7 104 023 07 1 3 15 315 044 023 07 6 171 037 075 321 000 02 4 301 c7 5 267 302 170 000 1 17 051 062 025 C75 071 247 023 023 346 214 175 076 34 1 02 5 023 200 000 376 311 004 056 001 247 160 175

315 311 115 24 7 023 07 1 306 023 311 021 037 147 312 02 4 315 353 024 312 024 O 44 0 62 173 02 5 072 363 301 312 023 311 3 53 174 200 025 273 001 021 321 303 302 31 1 001 376 311 301 056 311 043 376

071 315 315 311 174 023 024 321 305 062 117 175 356 1 40 07 1 3 15 353 333 305 025 363 22 1 173 363 033 311 115 315 000 3 15 346 302 322 3 12 04 1 242 032 24 6 201 376 311 004 056 001 320 305 161 177

023 071 0? 1 000 267 174 005 24 7 104 363 322 037 024 151 023 071 22 7 026 JO c 051 033 137 201 033 353 051 02 5 1 15 000 07 1 2 00 227 227 232 076 025 376 025 02 5 001 376 51 1 273 0 56 04 6 104 043 330

January 1976 Tiny BASIC Calisthenics & Orthodontia Box 310, Menlo Park CA 94025 Page 17 0 26 042 301 356 247 311 350 003 034 000 24 1 100 042 033 033 303 033 377 000 357 000 040 357 302 0 CO 002 056 001 012 056 001 000 000 000 357 325 104 023 02 3 051 117 274 026 115 043 051 044 315

30 5 364 320 025 311 000 033 0 *3 001 164 051 030 364 126 023 360 247 303 000 07 6 315 357 0 33 267 303 001 005 056 001 015 056 000 000 000 052 315 115 32 1 303 .0 4 174 302 140 0 42 160 104 023 044

052 033 303 247 076 000 176 303 0 34 0 *4 32 1 042 033 04 3 02 3 0 22 311 107 076 040 101 315 021 026 2 57 056 001 010 056 001 020 000 000 000 115 07 1 315 305 072 115 230 120 151 366 247 115 2 47 023

364 146 34 1 311 OsO 000 002 064 000 377 377 361 3 15 136 247 327 34 5 022 105 357 022 205 106 04 1 021 003 056 001 013 056 303 000 000 000 0^ 6 0 23 044 315 027 052 107 027 301 033 311 315 311 052

033 175 026 315 315 041 175 026 040 057 057 033 020 353 311 076 32 5 000 357 04 6 0 52 026 026 002 056 001 006 056 001 016 2i6 0 00 000 000 042 353 023 2 40 315 366 013 171 160 3 15 315 071 315 370

0 53 376 142 0 03 026 0 77 3 76 000 017 000 377 04 1 02 7 000 0 76 017 305 000 076 000 350 016 032 032 001 056 001 O il 0 56 001 026 000 000 000 366! 3 15 353 024 071 03 3 052 275 053 071 071 023 071 033.

031000 031010 031020 031030 031040 031050 031060 031070 031100 0311 10 031120 031130 031140 031150 031160 031170 03 1 2 0 0 031210 031220 031230 031240 031250 031260 031270 03 1 3 0 0 0 31 310 031320 031330 03 1 3 4 0 031350 03 1 3 6 0 031370 032000 03 2 0 1 0 032020 032030 032040 03 2 0 5 0 03 2 0 6 0 032070 032100 032110 032120 032130 032140 032150 03 2 1 6 0 032170

052 033 0 52 3 15 033 060 171 352 042 042 276 033 043 043 042 3 15 000 000 000 0 00 000 000 000 000 231 232 322 3 75 231 375 331 322 326 320 326 310 375 317 275 326 132 032 324 363 304 232 322 215

354 O il 352 101 104 031 225 033 306 304 302 247 076 043 304 154 000 000 000 000 000 000 000 000 310 330 300 232 351 132 134 213 053 265 131 132 232 132 123 027 343 022 326 124 322 226 232 322

033 345 033 022 115 3 J5 15/ 042 033 033 117 311 015 042 033 023 000 000 000 000 000 coo 000 0 00 122 124 231 210 215 343 322 032 326 032 232 340 074 343 125 323 133 233 363 317 3 75 120 173 375

053 052 01 1 076 052 101 170 304 247 043 031 000 043 306 24 7 310 000 000 000 000 000 000 000 000 316 302 331 244 331 231 213 216 167 022 04 1 324 107 322 302 2 24 1 14 326 132 327 075 322 2 54 232

104 366 301 040 354 022 234 033 311 043 043 315 276 033 311 303 000 000 000 000 000 000 0 00 000 330 132 215 326 067 366 032 047 320 320 114 147 317 304 132 232 132 106 340 3 05 04 6 231 322 202

115 033 315 357 033 32 7 147 052 315 076 0 43 165 302 315 315 330 000 000 0 00 000 000 000 000 000 204 343 326 175 322 254 2 16 041 070 360 105 322 2 32 323 343 1 12 343 117 324 132 062 322 342 273

052 104 060 052 053 247 311 354 165 015 042 031 143 165 071 026 000 000 0 00 0 00 000 000 000 000 322 330 175 323 213 132 331 066 322 032 324 304 057 224 324 1 11 325 322 147 343 004 242 232 326

376 115 031 3 66 315 31 I 052 033 03) 04 3 306 043 031 031 023 000 000 000 0 00 000 000 0 00 000 000 300 300 322 034 322 343 105 010 360 004 133 322 124 2 32 100 306 151 323 226 3 22 032 322 332 044

023 146 027 032 31 1 1 16 151 342 000 302 247 043 023 27 1 315 341 023 140 376 032 306 321 067 306 000 000 000 00 i 155 213 322 223 146 007 055 054 005 346 322 175 023 302 0 63 07 3 033 0*2 033 303 3 60

315 02 7 033 376 151 04 3 042 000 000 064 311 106 003 322 044 315 34 1 151 044 376 300 520 31 1 02 7 036 012 030 0 14 022 322 50*4 322 015 00 7 176 176 302 0 77 204 376 105 304 301 073 274 3 54 326 026

240 032 306 050 046 106 370 000 000 030 325 315 172 361 023 044 247 315 302 040 320 376 376 347 000 000 326 21 1 006 37 5 027 304 04 1 0 07 027 02 7 2 11 147 0 30 0 *0 076 0 30 34 X 073 3/2 033 0 00 000

024 023 300 312 024 043 0 33 000 325 353 3i5 071 270 027 34 1 023 311 0 44 314 02 3 325 015 044 323 0 06 000 036 326 005 2 30 320 027 375 2 56 167 167 030 376 3 15 303 040 0 63 043 073 360 3 11 275 000

315 3 76 320 24 3 116 315 067 0 00 023 315 071 0^ 3 3 02 303 3 53 140 34 1 023 0^6 312 023 3 iO 312 241 000 000 322 167 220 166 230 3 00 0 33 027 054 0 54 052 04 7 0 44 262 315 063 04 3 073 030 000 322 000

200 040 00/ 027 043 044 311 000 032 044 023 353 361 006 315 151 315 321 303 0 32 032 376 315 324 007 030 375 323 322 012 073 000 006 02 7 176 176 374 312 023 030 026 063 345 311 332 000 352 000

032 200 0322 10 03 2 2 2 0 03 2 2 3 0 032 240 03 2 2 5 0 03 2 2 6 0 03 2 2 7 0 0 32300 03 2 3 1 0 03 2 3 2 0 03 2 3 3 0 03 2 3 4 0 03 2 3 5 0 03 2 3 6 0 0323/0 0 33 000 03 3 0 1 0 033020 03 3 0 3 0 033040 03 3 0 5 0 03 3 0 6 0 0 33 070 03 3 1 0 0 03 3 1 1 0 0 33 120 03 3 1 3 0 0 33 140 033 150 03 3 1 6 0 033 170 033200 033 210 03 3 2 2 0 033 230 033 240 033 250 0 33 260 033270 033 300 033310 033320 033330 033340 033350 033360 03 3 3 7 0

032 132 322 11 1 232 375 322 304 123 122 101 326 232 32 5 00 5 032 2 16 133 257 032 047 324 35 i 132 352 032 326 275 325 232 322 300 232 352 254 233 375 000 34 3 251 327 327 323 1 16 324 000 017 0 00

166 343 375 315 245 232 304 326 324 125 116 347 343 133 232 361 032 027 133 035 133 033 033 343 232 2 16 322 325 337 330 300 325 27 5 226 132 235 226 000 233 32/ 146 214 324 130 324 000 100 000

326 323 000 133 254 264 322 167 031 316 105 232 275 032 37^ 233 36) 32 4 027 035 254 057 065 233 330 000 300 334 322 276 233 342 104 355 34 3 254 355 000 275 166 322 033 326 324 147 000 030 056

175 125 000 310 032 122 375 323 34 0 32^ 32 7 154 2 32 361 2 53 055 133 240 324 031 324 324 322 077 123 000 233 3 22 300 k!33 171 322 111 250 226 033 251 000 2 54 322 300 320 344 323 322 034 0 00 241

322 03 2 000 323 232 105 33 O il 322 304 322 24 4 354 232 133 255 Od7 033 362 300 133 133 300 251 132 233 150 300 3 25 162 2 74 300 315 132 355 205 32 7 226 132 300 044 133 322 3' 3 ! 21 evaluate an expression w ith o u t aunary plus or minus on the fro n t. Ich. 'O f.7 > W IT/? I TR- . n . r 7 > 6 ? ,w r c executor is viable fo r a really small, slow system like an 8008 system. o o f DLf? s 6 1 1 3 3 7 V T /rJ T alk about crunching! A n yw a y, I w a nt to see more. I'm crazy, 31 2 1 ?t J 3 7 & 7 C F I tk > & maybe? Who cares. £3 30 c > 7Pi F/?l?30t, 65' 03 7 > Sincerely, 02 6 j I'J 3° 21 ?s\37(> €&r 0 0 1 1 j w ? c o v r 3 F R IT Z ROTH c ri ) 020 j Rt 7

10

0-1

00

Carbondale IL 62901

tY h iz i

6(1 n

3? 7 fesr CKLF

tr>Kjr ^ '

ARRAY 1 RTN TSTA JMP \0 CALL ARRAY RTN TSTV ERR 11 RTN TST S4 *NXT* TSTV ERR 14 NEXT STORE DONE NXT

NOP

377 057

53

31

Page

32

February

1976

Dr

Dob b's

/AJSrXNT P o s T S z m P T v o ice

r/A jr/yes/zE A

k it s

Journal

Ta

FaA

VerA /LS

/ L

of

C om puter

C a li s th e n ic s

UJH/)T / C o i 6 o w / j $ / 0 e t

Q

if

£ M

H

q

rti^y a/ o u j

&

O rth o d o n tia

\ J u S T 0, 0 if a=0, _1 if a < 0 Tab to print position a Remainder on dividing a by b Greatest Common Divisor o f a and b Exchange a and b Maximum o f a,b Minimum o f a,b Least Prime Factor o f a Greatest Prime Factor o f a

Or should we scrap BASIC and start over? The Dragon PCC Box 310 Menlo Park CA 94025

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o Park C A 9 4 0 2 5

Page 5

ADR

DOMPIER’S A LTA IR MUSIC PROGRAM MODIFIED D ATA

000 001 002 003 004 005 006 007 010 Oil 012 013 014 015 016 017 020 021 022 023 024 025 026 027 030 031 032 032 033 034 035

333 377 147 056 000 176 376 377 312 000 000 026 XXX (Tempo: higher = slower) 005 302 022 000 106 015 302 015 000 025 302 015 000 043 303 303 005 000

MODS TO DOMPIER’S MUSIC PROGRAM & A L T A IR HARDWARE GLITCHES/FIXES Dear Editor, March 30, 1976 I am sending you my modifications to Steve Dompier’s Altair music program [see D r D obb’s Journal, Vol. 1, No. 2, p. 6]. Using this program you can store several tunes in mem­ ory and select which one will be played by using the sense switches. Each tune is stored with its first note at HI adr. “ XXX,” and LO adr. “ 000.” ( “ XXX” is any HI address avail­ able in memory.) Each tune will be played when its HI adr. is selected by the sense switches. I f a new address is selected, the first tune will complete, and then the next one will start. Perhaps some o f your readers would also be interested in some o f the problems I had in de-bugging my Altair. The fix for the RAM board has been published before, but it is still not in the Altair manual. On the 4K dynamic RAM board, connect pin 10 o f IC “ T ” to ground (pin 11) instead o f to plus 5 volts. I f IC “ T ” is already installed you must remove it to get at the PC board land that must be removed. Also, connect a .01 MFD capacitor from pin 5 o f IC “ T ” to ground. These changes stabilize the operation o f the protect flip-flop. On the CPU board, some of the capacitors being supplied for C5 in the clock circuit are o ff tolerance, causing the 02 clock pulse to be too wide. This prevents the CPU from writing into memory correctly. (In my case, the result o f any arith­ metic operation was octal 377 written into memory.) The Mits engineer I talked to suggested trying other lOOpf capacitors for C5. I didn’t have any so I instead changed R42 to 5.6K and this worked fine. If your kit comes with a little blue capacitor for C5 you should be on the lookout for this problem. 902 N. Washington Owosso MI 48867

Bob Wilcox

GRAMMAR GLITCH IN EXTENDABLE TIN Y BASIC SPECS Dear PCC, In the Nov., ’75 issue o f PCC [reprinted in Dr. D obb’s Journal, Vol. 1, No. 1, p. 10], John Rible’s extendable Tiny BASIC seems to have an error in its grammar. The entity does not appear in the righthand side o f any rule. This would seem to mean that there is no way to utilize this rule. To correct this is a manner which will follow the author’s intent, I would recommend changing the rule < program> : := to : := | Thanks for your attention. Donald D. Hartley 3415 NE Manchester Corvallis OR 97330

Page 6

Dear Sir, March 26, 1976 I ordered a system 3 assembled from SPHERE in September 1975 during their introductory offer period. Until now, almost 180 days after I sent the check, I have not yet received the system. I already wrote them another nasty letter a few days ago. If I don’t hear from them in early April, I will write another nasty letter and send copies to all the hobbyist computer clubs in the States. Also I will have to write to FTC concerning this matter. Sincerely yours, Eugene Cheng Box 6177 T.S.T. Kowloon, Hong Kong

Jim:

April 12, 1976 DDJ could perform a great service to hobbyists by coming down hard on kit manufacturers who have lousy documentation. Send out a call for very carefully done criticisms on documentation. Bob Albrecht P.O. Box 310 Menlo Park, CA 94025

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o Park C A 9 4 0 2 5

M a r c h , 1976

61

T IN Y BASIC EXPANDERS, TAKE NOTE Dear Bob, 28 Aug 1975 It would be nice to have CLOAD, CSAVE for cassette LOAD/DUMP. Also eventually a floating point package to replace the integer arithmetic. 3723 Jackstadt Paul Farr San Pedro CA 90731 Dear Tiny BASIC, I have a suggestion. Identify all subroutines required, then split them into 8080 and 8008 Groups. Let those o f us with 8008s in on a good thing. By the way, I think a stack should be included in the 8008 program as it is easy and cheap to add. Sincerely, 2914 Snyder Ave Lee Hanson Cheyenne WY 82001

Hey implementers: How Tjout trying to isolate 8080 code that will cause 8008 owners headaches? Then they will need only to modify those headache routines in order to share your software and praise your thoughtfulness. --JCW, Jr

Dear Sirs, 19 Jan. 1976 I am currently working on a Tiny BASIC interpreter to run on my Altair 8800, and at the same time, am interested in the educational aspects o f computers. 613 Willow Oaks Blvd M.B. Bloodworth Hampton VA 23669

TIN Y BASIC & MICRO-8 Dear Editor 3/31/76 I noted your request for Tiny BASIC suggestions: 1. KEY WORD TABLE: with key words ( “ PRINT” , in fuctions like ABS, etc.-ignore or eliminate LET in stored programs?) versus a special 8-bit code assigned to it (codes from octal 200 to 377 could be reserved for such special purposes, and 040 through 137 would be regular ASCII characters) versus the address o f a routine to perform the execution for that keyboard. Interpretation routines would be set up to use this same table to convert both ways between key words and those special coded bytes. (I.e., for when a user enters a program, the key words get condensed to a single byte and stored in memory; and when the program is LISTED, these special bytes get con­ verted back to keywords.) I f there are several parameters or “ control modes” that need to be controllable by the user as well as accessible to the user (by displaying the “ status” o f something?), then it may be advantageous to modify that table so each “ definition” (which need only be 1 byte) implies the address o f the parameter in memory, and the address o f a pair o f subroutines. One to take input from a keyboard, perform a code conversion unique to this pair o f subroutines, and store the resulting data in the proper memory location. The other would perform the reverse conversion and output the result. This would have the overall effect o f making your M arch, 1 9 7 6

62

f ^ I f you only subscribed to the first three issues, (A YOUR SU B SC RIPTIO N H A S R U N O U Tl %5lf you like w hat you have seen, and w ant to see hurry and send in your subscription renewal. See page 33 for details & form . S o S S Q

i N

B

K

S K

S M

S i N

“ portable” interpreter efficient at interpreting tables, especially if several tables are used. 2. OUTPUT PAGE WIDTHS: you will, no doubt, find it necessary to allow for different page widths (line lengths) on different output devices, etc. TVT-I & II have 32 characters per line; and have no need o f carriage returns if you want to con­ tinue on the next line, after storing the last character on the previous line. Note, however, that carriage returns on TVT-I (I don’t know about TVT-II-haven’t studied the RE schematics in detail) do not blank the characters they skip over (in the original version, anyway). It will be highly desirable not to split words/numbers between lines, therefore it is necessary to more than just have Tiny BASIC call a user-defined subroutine to output characters. The user may also want to output to more than one device in the same session-further complicating the problem of different line lengths. I suggest you have 2 routines: a) One that is given a string o f characters to be outputted without splitting between lines. (Say, with beginning address in HL and end address in DE, or length? or 1 register?) This routine would then take appropriate action depending on whether this additional segment will fit on the current line, by making use o f access to the current line length accessible to it~ but not to the program that called it. b) Another-user-deflned-subroutine that handles the actual output characters, which is separate from the userdefined line length parameter. (I have implemented a scheme very similar to this on the IBM 360 and the-then RCA Spectra 70-which have the same user = non-privileged instructions, but builtthe I/Omacros are quite different-in which the same program could be used in either batch or time sharing mode as well as accommodate a variety o f page widths on printers and termin­ als.) 3. INFIX (ALGEBRAIC) EXPRESSION INTERPRETA­ TION: I f you want, I can supply information on an algorithm that uses stacks for result numbers and saving binary operators that have to be delayed one operand/expression before execution-without having to scan the algebraic expression more than once. While I find your Tiny BASIC project intriguing, I am not interested enough to spend the money to subscribe to yet another journal. Pop, (Victor W. Amoth) doesn’t seem to think computer hobbyists need high level languages, even though his programming experience is almost entirely confined to BASIC on GE time sharing-he’s still very “ green” at programming in machine language on the Mark-8. My expertise runs the full range from hardware through software to continued fraction series for transcendental func­ tions. I’m interested in further developing the “ asynchronous I/O ports” I implemented. They make hardware automatically take care o f “ waiting,” etc., and make possible my 180 cps TVT-I

[please continue on page 31]

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o P ar k C A 9 4 0 2 5

Page 7

PROGRAM A

P U B L IC

R E P O S IT O R Y

D O M A IN

8c

A L T E R N A T IV E

TAPE TO

The Community Computer Center (CCC) will act as a repository for program tapes; both source tapes and binary tapes. Everyone wishing to contribute programs to the public domain may do so by forwarding appropriate paper tapes to CCC. In particular, if you are hesitant about submitting a program for publication in Dr. D obb’s Journal because you don’t want to hassle with its distribution, you are encouraged to forward the tapes to CCC and the documentation to the Journal for publication. The CCC will thus serve as a desirable alternative and supplement to the User Groups that are controlled and operated by many of the processor manufacturers, some o f whom charge up to $100 for “ membership” and access to the programs that their customers developed and offered to the User Group, without compensation. There is no membership fee for access to the tapes from the Community Computer Center. Instead, one pays only for the duplication and mailing costs: Duplication charge: $1 /ounce or fraction thereof, for tapes (weighed after punching on fanfold tape) (Add 6% tax for orders mailed to a California address) Postage & handling: $0.50 on orders o f $5 and less $1 on orders exceeding $5 Payment must accompany all orders. Orders will be mailed First Class, within 3 days o f receipt. Lists of available tapes will be published, periodically, in Dr. Dobb’s Journal, as well as being available from CCC: Community Computer Center 1919 Menalto Avenue Menlo Park, CA 94025 (415)326-4444 The following source tapes are currently available. They are programs written for the version o f BASIC that is implemented for the HP 2000F minicomputers, and are discussed in What To Do After You Hit Return (available from the PCC Bookstore, $6.95). Number Guessing Games Number Abase Trap Stars Clocks Bagels Quadgt Button Word Games Letter Abagel Hangmn Madlib Word “ Nimlike” Games 23Mtch Batnum Nim Chomp Zot Page 8

$12 2 3 2 2 3 2 3 2 $10 2 3 3 6 2 $11 2 3 4 3 5

D U P L IC A T IO N

F A C IL IT Y

M A N U F A C T U R E R S ’ USER

GROUPS

Hide-n-Seek in 2D Hurkle Mugwmp Snark Pattern Games Dangle Sunsgn Biosin Mandal Life Amaze Board Games Qubic5 Gomoku Teaser Rover Welcome to the Caves Cave si Wumpus Caves2 Business & Social Science Hamrbi King Civil2 Market Stock Policy Polut Science Fiction Games Trader Sttrl Last Chapter Crash Lunar Revers Zeros Taxman The following games are in Dartmouth BASIC Motie Rescue

$ 4 2 2 2 $11 2 3 3 3 3 3 $11 5 4 3 5 $ 9 5 4 5 $22 3 5 7 5 5 4 4 $12 10 9 $10 4 3 2 3 3

For historical reasons, CCC maintains a different price schedule for postage and handling on this particular set o f tapes: duplication charge and tax, as above postage and handling: $0.50 on orders under $10 $1.00 on order o f $10 or more

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , IVlenlo Park C A 9 4 0 2 5

M arch, 1 9 7 6

63

S IG N E T IC S 2 6 5 0 K I T F O R U N D E R $200

[from Roy Blacksher, MOS Microprocessor Applications Manager, Signetics, 811 E. Arques, Sunnyvale CA 94086; (4 0 8 ) 7 3 9 -7 7 0 0 ]

The Signetics Adaptable Board Computer, ABC 1500, is a modular microcomputer containing a CPU, memory, I/O ports and support circuitry. It is designed to cover a broad range of applications from software development to system hardware prototyping. Cost performance trade-offs have been carefully considered to achieve maximum flexibility and allow the card to be tailored to a variety of individual requirements. The basic configuration consists o f the 2650 microprocessor, 512 bytes of read/write memory (four 2112 static RAM’s), IK bytes o f 2608 ROM with PIPBUG*, two 8T31 I/O ports and buffering on data, address and control lines. A single +5 volt supply will be required to power the card and communicate with a serial 20 ma current-loop terminal. Modifications to the basic system can be easily made to allow for various memory configurations and operating modes. Unused plated-through holes are provided for the PROM memory chips (82S115’s). Other options are jumper selectable. The ABC 1500 is sold either as a completely assembled and tested card (2650 PCI 500) or in kit form (2650KT9500). The kit is priced below $200. FEATURES -- Expandable printed circuit card: unused area on card filled with plated-through holes on .300-inch centers for wirewrap sockets.

P U B L IC I N T E R E S T S A T E L L I T E A S S O C I A T I O N The Public Interest Satellite Association (PISA) was formed in October, 1975, as a non-profit national organization to explore how satellite communications technology can be adapted to meet the long-distance telecommunications needs o f non-profit users. For the past fifteen years, satellites have been providing global links via television, radio, telephone, data, telex and facsimile for business, industry, and the military. Up to now, though, the technology, for a number o f reasons, has been beyond the reach of public groups, despite the fact that satellites have been developed with nearly $80 billion o f public funds. But recent technical breakthroughs in the field promise to greatly reduce satellite costs, and make the technology available for low-cost public use. To spearhead the public effort that will be required to turn this potential into reality, PISA has been formed. PISA’s goals are to: 1) Help non-profit groups understand the many facets of satellite technology; 2) Assist these groups in examining their long-distance

M arch, 1 9 7 6

64

- IK bytes o f PIPBUG ROM (in socket). -- 512 bytes o f RAM -- Two latched I/O ports -- Four non-extended I/) read/write user strobes. -- Tri-state buffers on data, address and control lines. - Serial input/output port. -- Single +5 volt supply requirement (1.7A max.) for card and 20 ma current loop interface (+12 volt supply for RS 232 interface). - Simple memory and I/O port decoding with two 16-pin dips. - Interrupt and single step capability. - Simple clock configured from dual monostable multi­ vibrator. - 24K memory expansion capability. -- Directly compatible with 4K RAM card (2650PC2000) and power supply demonstration base (2650DS2000). -- Card dimensions: 8” x 6.875” with a 100-pin connector along the 8” dimension.

*PIPBUG is a basic monitor having the following commands: ALPHA CHARACTER INPUT COMMAND A B C D G L S

Alter memory Set breakpoint Clear breakpoint Dump memory to papertape Go to address Load memory from papertape See and alter registers

Note: the program is entered by resetting the card. The termin­ al will then respond with an asterisk (* ).

communications costs, and in determining how satellites-and what kinds o f satellites-may better serve their needs; and 3) Explore ways the technology can be used by them to form new networks o f information exchange, and to im­ prove their outreadh to the public-at-large. In March, 1975, PISA received grants from the Stern Fund and the Ottinger Foundation to permit the following first steps to be taken: 1) Conduct a survey o f the communications needs, uses, and costs o f non-profit organizations; 2) Prepare written material informing these groups about satellites, the potential benefit they hold for the non-profit community, and what must be done to realize this potential; 3) Design one or more demonstration projects, using available NASA experimental satellites, to give non-profit groups some experience with the technology; and 4) Plan PISA’s organization structure. For additional information, write or call: PISA 55 W 44 Street New York N Y 10036 (212) 661-2540

D r . D o b b ' s J o u r n a l o f C o m p u t e r C ali s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o P ar k C A 9 4 0 2 5

Page 9

C O M P U T E R PROCESS F O R R A P ID P R O D U C T IO N O F M U S I C A L C O M P O S IT IO N S

[reprinted from Stanford University’s March 31 ,1 9 7 6 , Campus Report] D O N ’T K E E P IT A S E C R E T !

Let us know what exciting new software and systems you are working on. We’ll tell everyone else (if you wish). Maybe someone is also working on the same thing. You can work together and get results twice as fast. Or, may be someone else has already done it; no reason for everyone to reinvent the wheel.

[A . A t * w

r * tr

kL M I L

M

Careful, detailed comparison and contrast o f the several versions o f Tiny BASIC we are publishing. Systems software for the public domain, including: — Tiny BASIC versions for the INTEL 8008 Motorola/AMI 6800 RCA COSMAC

SIGNETICS 2650 MOS Technology 6502 Fairchild F-8

— Tiny block-structured languages for Microprocessors PASCAL-like

ALGOL-like

— Resident structured and unstructured assemblers Any old assemblers PL360-like

Macro-assemblers

— Interactive Debuggers — Graphics Software For the TV Dazzler

For any TV interface (including schematics)

— Music software Like Dompier’s program (DDJ, V. 1, No. 2) Like Wright’s Alpha Numeric Music (PCC Bookstore) — File systems for cassettes This is a partial list. It will change before the ink drys. We welcome your suggestions fo r additions.

Page 1 0

\L.

A complete cycle of music produc­ tion from the composer’s mind to the page the musicians play-has been devel­ oped at Stanford’s Center for Research in Music and Acoustics. Here’s how it works: Prof. Leland Smith, working at the Artificial Intelligence Laboratory on Arastradero Road, types a composition into the computer. The computer then transmits all the necessary parts either directly to a Xerox copier or to a plotter. The latter makes a king-sized reproduction of the score which can be reduced in size mechanical­ ly. Hither copy produces an engravingquality format from the Xerox in about 15 seconds. The sapie procedure, done the old way by a music publisher, might take as long as two years, with the necessary en­ graving, printing, binding, and publishing. At Stanford it can take less than two weeks, including final editing. The advantage o f Smith’s system is that it eliminates the need for copyists. The computer supplies all the parts for the instruments based on the master copy typed into the PDP-10 computer. At the moment, the process is strictly for academic purposes. It allows com­ posers like Smith to prepare works for performance or enables graduate students to prepare scores for their degree require­ ments. Smith feels it is inevitable that such a system will become the standard method for the publication of music. But Smith’s work on music printing has been done without formal sponsorship—literally, on his own time. He sometimes gets to*the Lab at 4 a.m. to take advantage o f the quiet and the availability of the computer. Michael McNabb, a Stanford graduate student in music now studying in Paris, wrote an impressionistic piece called “ Solstice” which was premiered by .the Stanford Symphony under Prof. Mark Starr a few weeks ago. It was prepared and produced entirely by computer, with Smith’s help. "It took longer to rehearse than it did to edit it,” Smith said. One of his own projects shows how a computer can help. I'rancesco Bonporti, an obscure 18th

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o P ar k C A 9 4 0 2 5

M arch, 1 9 7 6

65

century Italian composer, once had the misfortune to get his work accidentally mixed up with that o f the great Johann Sebastian Bach. This came about when Bach, taken with Bonporti’s ingenious “ inventions” for violin and string bass, hand copied the latter’s work. When someone else in­ cluded four of them in Bach’s collected works, they were credited to Bach’s genius until researchers discovered the error. Using the computer printing method, Smith developed and expanded Bon­ porti’s “ Inventio Septima” (“ Seven In­ ventions,” ) adding a double scherzo o f his own, based on Bonporti’s original. Smith published it under his own “ logo,” the San Andreas Press, with the credit line: “ Graphic Realization by PDP-10 Computer.” The computer printed the entire score and the title page, including a “ snapshot” of an oaktree against rolling Peninsula hills-the “ San Andreas” monogram. Smith has produced computer scores for Renaissance and Baroque chamber groups o f ancient instruments in the origi­ nal notation—square instead of round notes, or special notation for the 17th century lute. , Students in Prof. George Houle’s classes in early music already are finding this handy for producing music required for their master’s degrees. The computer is coupled with a video display screen, which presents a five-line music staff on the operator’s command. The notes appear in response to the proper typing on the keyboard. These are fed into the computer which transmits them direct to the Xerox or to the “ Calcomp” plotter, whichever is de­ sired. The plotter, about 40 inches wide, has two parallel metal arms across the width. On these, a special ink-laden pen travels sedately back and forth, placing the notes on the treble or bass staff while the drum moves up or down to accommodate the notation. To the casual observer it looks as though a giant musical Ouija board was in action, operated by an invisible hand. Smith foresses the day when hundreds of computer-produced scores, reduced to digital form, can be stored in the Library of Congress. Prom any place in the country, he predicts, a musician could dial up the Library’s computer, code the correct numerals for Dvorak’s Fifth Symphony, for example, and have the full orchestral score delivered by telecopier.

M a rc h , 1 97 6

The cost could be billed to his phone or be provided for by a coin-in-the-slot arrangement. The computer in the Li­ brary of Congress could assess the royal­ ties due the composer, if necessary, and credit the amount to his account. The Stanford computer’s value as a research tool has no limits either, Smith feels. One doctoral candidate already has started a computer-developed thesis, working on a method which could pro­ duce thematic catalogues o f the works of the classical com posers-a job of monu­ mental drudgery if attacked in the tradi­ tional manner. His project will be so comprehensive that it will be able to compare composers’ themes, where and when they were used, down to the book, page, and line of the original score. It also will cite the places where the same themes have been used or adapted to other compositions. Anything the computer does can be stored on magnetic tape for permanent instant recall, or erasure and reuse. The Smith system could quite readily be adopted by music publishers. “ It would cost them only about $130,000 to set up this system,” Smith says, “ but they seem to be afraid or reluctant to make the change.” Smith, 50, is a native of Oakland who was elected to Phi Beta Kappa as an undergraduate at UC-Berkeley. He also earned his master’s degree in music at Berkeley, where he studied under the noted composer Roger Sessions. He took additional postgraduate work at the Paris Conservatory under Olivier Messaien. Smith taught at Mills and the Univer­ sity of Chicago before coming to Stan­ ford in 1958. He has received many com­ missions for his original compositions, which include “ Orpheus” for harps­ ichord, harp, and guitar; a string trio, and an opera, “ Santa Claus,” as well as “ Three Pacifist Songs.” While he has been extremely busy in the last few years developing the Center’s comprehensive program for editing and printing computer music, he has also found time to produce a piano trio, a “ Rhapsody for Flute and Computer,” “ Arabesque for Small Orchestra,” “ Six Bagatelles for Piano,” a suite for mixed trio, and two motets for mixed chorus. Almost all of these have been perfor­ med at Stanford, the Cabrillo Music Fes­ tival, or at other universities. An accomplished pianist, clarinetist, and bassoonist as well, he has played with the Chicago and San Francisco symphony orchestras. His papers on the computeri­ zation of music have appeared in profes­ sional journals.

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o P ar k C A 9 4 0 2 5

Page 11

(T CAN TALK...BU T CAN IT SING? Votrax is proposing making the guts of this English language synthesizer system available in kit form for $1K. More details, next issue. Note that the system described below is a turn-key, off-the-shelf item that has been on the market for several years.

T h e V O T R A X M odel V S -6 is a new departure in voice response technology. This unique system combines low u nit cost, unlim ited vocabulary, operational sim plicity and low data requirements to provide the u ltim ate in fle x ib ility and cost effectiveness. T h e price o f the V S -6 w ith parallel buffered interface is $ 3 6 0 5 in single-unit q u a n tity. Purchase prices are discounted fo r q u a n tity buys starting at tw o units. M axim um discount is over 50%. T h e V S -6 is programmed to speak based on phonetic coding principles. Each eight-bit command w ord selects one o f 61 phonemes (sounds) and one o f fo u r levels o f inflection (p itch). Utterances are spelled" phonetically to produce all combinations o f words and phrases required by the application. Since words and phrases are stored in the form o f digital inform ation in some storage m edium , such as magnetic disc or solid-state m em ory, there is virtu ally no lim itation as to the am ount o f vocabulary V O T R A X can produce. O ne w ell-know n com puter services com pany reports a vocabulary in excess of 3 0 0 ,0 0 0 words. The value o f unlim ited vocabulary is th at the same low-cost V O T R A X unit can be used fo r any and all applications. T h e use o f phonetic coding in the V O T R A X V S -6 permits the production o f speech at uniquely low data rates. A rule o f thum b indicates th a t the num ber of phonemes per w ord is approxim ately equal to the num ber o f letters per w ord. A t eight data bits per phoneme comm and, V O T R A X can achieve continuous speech from input as low as 150 bps.

The V O T R A X V S -6 was developed to fit into a w ide variety o f applications and physical environments. A com plete range o f interface types and options makes V O T R A X com pat­ ible w ith virtu ally all computers, from the largest business mainframes to the smallest microprocessors. The small am ount of data and lim ited controls required to drive V O T R A X perm it installation at almost any point in a com m unications netw ork: host com puter, comm unications concentrator, com m unications m u ltip lexo r, or com puter term inal. Data rates of 110 to 9 6 0 0 bps also allow V O T R A X to f it in w ith a m inim um of change to existing systems. Operating tem perature and h u m id ity specifications are such th at specially conditioned environments are not required. Applications Include: C om puter Timesharing, Education, Handicapped Aids, Instrum entation, Manufacturing, Military and Training Simulators. Electrical Input Power R e q u irem en ts................................115 V A C ±10% , 47 -4 2 0 H z, 0.2 5 Amps Input Power F u s e .................... . .3 A G - 1 /2 A m p, 125 V olts Audio O u tp u t...............1OO-5OO0 H z, 6 Volts Peak, Nominal Audio O utp u t Drive C a p a b ility ..................0.5 Watts into an 8 O hm load Environmental Operating Tem perature..........................................0 ° C. to 5 0 ° C. Storage T e m p e ra tu re ................................... — 2 0 ° C. to 7 0 ° C. Operating H u m id ity ...............0 to 95% w ith no condensation C o m m and W ord 6-bits: 64 selections available, Includes phonemes, pause* and control functions 2-bits: 4 levels of inflection available

Page 1 2

If you are interested in having this available in $1K kits, write to: John McDaniel Vocal Interface Div. 4340 Campus Dr. Suite 212 Newport Beach CA 92660 (714) 557-9181

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o Park C A 9 4 0 2 5

M arch, 1 9 7 6

67

T O U C H L E S S S E N S IN G F O R U N D E R $100

available that "see” clear plate glass or 3 mil clear mylar or liquid surfaces at more than 102 cm (40 in).

We just spoke with a representative for a manufacturer o f low-cost proximity sensors (about $95@ in groups o f 50; $133@ in single units), and turned him on to the hobbyist movement. These sensors are capable o f determining the presence or absence o f materials some distance away. They can “ see” water flowing from a pipe or through a semi-transparent tube, doors that are opened or closed, people, hands, fingers, spokes of a rotating wheel, etc. Their range is from at least 24 inches for sensing highly reflective material, or 40 inches for minimally reflective material, up to about 30 feet when a reflector is used beyond the material “ under surveillance.” They can even “ see” through materials that we normally think o f as being opaque (e.g., cardboard, skin, thin wood panels, etc.) much like you can see the glow o f a flashlight that you have stuck in your mouthfor some obscure reason-through your cheeks. We will carry much more extensive information on this within the next several issues. In the meantime, if you are interested in such devices being made available through distribu­ tors, mail-order hobbyist sales, and computer stores, write to the manufacturer and tell them so. You might also tell them .the maximum that you would be willing to pay for such sensors. Please do not ask them for literature, schematics, etc., however, unless you are planning on purchasing them in quantity. We will be furnishing such information in forthcoming issues; the company is not set up to deal with very small retail sales . . . and we want them to be happy with the hobbyist community . . . and eager to enter our marketplace. We do not want them to avoid the hobbyist market because they feel they can’t deal with the end users. Just let ’em know you are very interested in their making the products available at the lowest possible price, to the hobby community, via the already-existent retail distributors (and, o f course, group buys can be set up at any time). Send your quick statements o f interest to: Anthony Lazzara, President, Scientific Technology, Inc., 1201 San Antonio Rd, Mountain View CA 94043.

The AL3093 can be mounted anywhere, indoors or out, submerged or in a vacuum. Interference from ambient light, environmental contaminants and thin filmaccumu­ lations of dust, oil, etc., is virtually impossible in normal operation. A form of automatic gain control (AGC) maintains the modulated beam sensitivity under chang­ ing operating conditions.

..s.a a a.aa a a s,g.g-g_o.a-8jLa_ita.3£ flaaogooQOftga ojLa_a a a a a aa.a a.a DESCRIPTION The STI Model AL3093 is a self-contained, complete, sensitive non-contact proximity and retro-reflective sensor system component. All circuitry is totally sealed in the shockproof 4.4 cm (1%”) by 10.1 cm (4.06”) long aluminum housing. The AL3093 responds to any surface or object entering its field of view, irrespective of material. It also detects certain changes of color or texture. Range of the AL3093 is up to 102 cm (40 in) as a proximity sensor. When used with a retro-reflective target, range is up to 9.8 m (30 ft). Long range units are

M arch, 1 9 7 6

68

S P E C IA L F E A T U R E S

■ Responsive to virtually all objects and materials, many color and texture changes. 58 Simple to set up with adjustable, wide sensitivity range—visible alignment indicator—no focusing. ■ Range to 102 cm (40”) in proximity mode, to 9.8 m (30’) as a retro-reflective control. ■ Long, maintenance-free life—solid state throughout, never a bulb to change. Circuit protected output. a Operates anywhere—rugged, sealed unit is com­ pletely self-contained. ■ Invisible modulated beam unaffected by ambient light, even bright sun. ■ Automatic compensation for fog, dust and other atmospheric or ambient conditions. ■ Versatile system component—available in custom O.E.M. configurations. O P E R A T IO N

The STI Model AL3093 is simple to set up and operate, requiring neither focusing nor critical adjustment. A visible LED indicator glows brightly when the sensor is aligned on target and permits visual monitoring during operation. A potentiometer provides range and target sensitivity adjustment. • Maintenance requirements are practically non-existent. There are no lamps or other components that deteri­ orate rapidly or periodically in the ail solid state circuitry. Service life is conservatively rated at 10 years. Any number of sensors may be interconnected for simultaneous or sequential operation. Outputs can be ANDed, ORed, or arranged in any other logic sequence. USES

The STI AL3093 is useful for every type of non-contact sensing application within its wide range capabilities. Major uses include sensing, counting, routing, position­ ing, inspecting, measuring, code reading, web moni­ toring and performing a wide variety of other automated process control functions. Additional applications in­ clude safety controls, perimeter or intrusion protection or alarms and many, many others where visible movements or changes must be sensed automatically. A series of externally mounted relay and switch outputs, including delays, latches, and other control circuits are available for use with the AL3093. Externally mounted transformers for any input voltage are also optional.

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o Park C A 9 4 0 2 5

Page 1 3

SPECIFICATIONS ELECTRICAL & PERFORMANCE SPECIFICATIONS

Sensing Range—screwdriver adjustable Maximum Range Proximity Mode* 40 in. (102 cm) (90% reflectance surface) 24 in. (61 cm) (18% reflectance surface) Retro-reflective Mode 30 ft. (9.8 m) 'Color and texture affect range in Proximity Mode. Measurements made with Kodak standard (visible) reflectance test cards.

MECHANICAL SPECIFICATIONS

‘5ENSVTMTY ADJ.

Input Power

Normally 12 VAC or VDC, or 24 VDC at 200 mA. Externally mounted transformers available for other input voltages. Operating Temperature Range

-50°C to +70°C (-60°F to +160°F) Control Options

Time delays, one shots, alarm latches and other modular control options are available for remote, external mounting.

\°0 v

/

IO X £4- E C U S SE M SIN G N a C A T O K -

LIGHT

Output

+ 10 VDC active pulldown—will sink 100 ma (current shutdown protection approximately 200 mA) or source 1 mA. Output may be pulled up to higher voltages, e.g. 12 VDC for MOS-type logic, without damage. Response Tune

Turn-On 0.0005 sec.; Turn-Off 0.01 sec.; Counting speed 6,000 CPM; Normal Cycle Life 10 billion. Cabling

Standard 1.5 m (5 feet) 5-conductor for input and output leads. Additional length to 150 m (500 feet) and flexible armored conduit available. Circuitry

Totally solid state, encapsulated. Withstands shock of 100 g @ 10 milliseconds. Multiple Sensor Options

Any number of units may be ANDed or ORed through external logic circuitry. Specify requirements.

Page 1 4

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o Par k C A 9 4 0 2 5

M arch, 1 9 7 6

69

Parser saves pain Harvey E. Hahn 630 N. Lincoln Ave., Apt 208 Addison IL 60101

February 24, 1976

Our current solution happened in three stages. 1.

In reading PCC [article, below] I was intrigued by your parsing subroutine, which avoids the direct input o f the user (which can prevent game players, etc., from initiating control commands to BASIC itself). This would appear to be very useful in situations where inadvertent input commands could upset or destroy a program, particularly by someone who is not conver­ sant with programming or computer languages. It would appear to be a useful “ safety” feature to incorporate in BASIC interpreters.

A subroutine fo r all in pu t. Pass the number and types (num eric or string) o f inputs wanted to the subroutine. In p u t the entire user response in to a character string and parse it. One special in p u t was always recognized — STOP (the user could typ e STOP anytim e to stop the game). We never bothered to te ll our game players about C o ntrol C (remember, we never wanted a game player to give com ­ mands d ire ctly to BASIC). Return the inputs and a con dition code to the calling routine; 1 = STOP , 2 = c o u ld n 't fin d all the inputs you wanted , 3 = o.k. The '2 ' w ould cause a " h e lp fu l" message to be sent to the player and the in p u t w ould again be requested. The parsing o f the inputted string was com plicated because there was no direct way to convert fro m string to ascii (ascii is the num eric representation o f a character) and num eric operations (like subtrac­ tion ) could not be perform ed w ith strings. If we could com pute T

ye t a n o th e r B A S IC B O M B O U T ! or H o w we learned to live w it h th e IN P U T s ta te m e n t [reprinted from PC C , Vol. 3, No. 3 (Jan., 1975)]

= C$ - “ 0 " ,

we'd alm ost be done; T w ould equal the d ig it in C$ (fro m 0 to 9) (you s till need to check if T is fro m 0 to 9 to see if C$ actually is a d ig it). For num eric in pu t, we used a F O R -N E X T loop variable as a pointer in to an internal character string. I f a match were found w ith the in pu t character, the value of the F O R -loo p variable was the ascii representation. (?!?).

Sometimes in the old days, often in the middle o f a game, and usually to somebody new to computers, our term inals would say:

The problem (and the reason th a t step 1 was n o t our fin a l solution) was th a t it to o k a lo t o f tim e to parse the input. People got really im patient, especially w ith m u ltip le terminals running.

ERROR x x IN L IN E x x x READY (By which the com puter meant: "Y o u typed the wrong thing when I asked fo r INPUT so I've kicked you o u t o f the program. O ut o f the goodness o f m y heart. I've described w hat you did wrong (i.e. ERROR x x) and where the error happened (i.e. IN L IN E xx x ). To understand it, all you have to do is look at page x x in the reference manual, then took at the program listing (wherever that is or type LIST), and w ith your thorough knowledge o f BASIC (oh, you say you d o n 't speak the language — well, ask somebody then), you can figure o u t where you w ent wrong. N aturally, the R E A D Y means you're in BASIC so if you type some "ra n d o m " number (like the in pu t you tried to typ e in the firs t place), you m ight wipe o u t a line in the program and then . . . To pick up again where you le ft o ff, type GOTO x x x — by the way, I zero all variables so you can't really start where you le ft o ff so you may as w ell start over. Be more careful next tim e !!") Games encourage non-standard responses — like, I TH O U G H T YO U WERE ‘ IT ’ when the term inal is asking, WHERE DO YO U T H IN K THE H U R K L E IS H ID IN G ?. People were being heavily discouraged from exploring and seeing what would happen if. Suppose the term inals would p rin t something like, I ’M CONFUSED — I NEED 2 CO O R D IN ATES FRO M 0 TO 9 . Then the com p u ter is the dum m y — it doesn't understand me. "W atch me get the com puter all confused."Q uite diffe re nt than feeling upset because the program has to be reloaded (on ou r 10 cps reader — no mass storage, alas) because a few random lines were erased. Blahh!

M arch, 1 976

70

2.

We elim inated the parsing subroutine. We trie d all programs having line numbers greater than 1000 (ho pe fu lly, it w ould be harder to accidently erase a line since most inputs to the games were less than 1000). The player was supposed to ignore an ERROR when (and generally when, rather than if, fo r first-tim ers) it occurred and b lin d ly typ e RUN. It was faster than before but it d id n 't solve much — "W h a t does ERROR x x IN LIN E x x x mean"? A nd a player c o u ld n 't continue where the game aborted because o f the zero-all-variables insanity o f our BASIC. So, . . .

3.

One night, after everyone was asleep and ail was quiet, it happened. Did you know th a t if you com pute T = CS and X = IN T (L O G (A B S (T ))) + SGN(T) tha t X w ill be unique fo r each possible ascii character (on DEC EDU20, at least)? This gives you a unique index in to an array where the ascii value o f each character can be stored. So, we redid phase 1 w ith a streamlined, razzle-frazzle lookup th a t would gladden the heart o f the most hardened hacker. A nd — our m ethod o f parsing INPUT isn't perceptibly slower to the user, even w ith m u ltip le term inals, than good (or is it bad) o l' INPUT. T H E

E N D

(We hope.)

D r . D o b b ' s J o u r n a l o f C o m p u t e r C ali s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o P ar k C A 9 4 0 2 5

Page 1 5

021 022 023 024 Jack 0. Coats, Jr, 213 Argonaut, No. 27, El Paso TX 79912 025 El Paso Computer Group 026 This program is being used in a modified form by the EPCG 027 030 (El Paso Computer Group) for loading machine language pro­ 031 grams that have been coded in octal. The program does no char­ 032 acter validation so if you enter an invalid character it will be 033 processed just like a valid character (the digits 0 to 7, and 0 to 3 034 in the most significant digit). This program should work without 035 modification for an eight-level ASR-33 or similar device. 036 The program will be loaded, beginning in location 000 111. 037 Once loaded, a program may be started by typing “ $” as input 040 to this keyboard loader. 041 The status input port is port no. 1, and the data I/O port, 042 no. 0. In the status word, the high order (left-most) bit is the 043 not-ready flag for the output port. It is high when the output 044 port is busy and low when the port is ready to accept more out­ 045 put. The right-most bit is used for the input port status bit. It is 046 low when the port is ready to present input, and high while 047 there is no new data available. It is assumed that the input status 050 bit is reset to the high state after data is input. 051 All input and output are done by subroutines GET and 052 PUT, respectively. I f any other I/O routines are desired, these 053 routines must be replaced. For the GET routine, the character is 054 returned in the accumulator. For the PUT routine, the character 055 is passed to it in the accumulator. These routines may be called 056 from any user routine as a subroutine as long as the conventions 057 are observed. 060 These routines are not optimized for either memory or 061 time. However, they are a starting place for those who need or 062 desire a crude alternative to the panel switches. 063 064 DATA LABEL SYM OPERAND COMMENT ADDR DAI 065 000 ORG 0 066 STACK EQU High memory address 000 067 RUN EQU END+1 Start of program entered 000 070 000 061 START LXI SP,STACK 071 001 377 072 002 000 073 003 041 LXI H,RUN Where do I store it? 074 004 111 075 005 000 076 006 076 MVI A,CR Output a carriage 077 007 015 return 100 010 315 CALL PUT 101 063 011 102 012 000 103 013 076 MVI A,LF Output a line feed 104 014 012 105 015 CALL PUT 315 106 063 016 107 017 000 110 020 076 MVI A ,A ‘ * ’ Output an asterisk 110 K E Y B O A R D L O A D E R F O R O C T A L CODE V IA T H E T V T -2

Page 1 6

052 315 063 000 257 006 375 007 007 007 117 315 077 000 315 063 000 376 044 312 111 000 346 007 201 004 302 030 000 167 043 303 000 000 365 333 001 346 200 302 064 000 361 323 000 311 333 001 346 001 302 077 000 333 000 311

LOOP

PUT PI

GET

END

CALL

PUT

XRA MVI

A B,(-3)

RLC RLC RLC MOV CALL

C,A GET

Store it in Reg. C Get a character

CALL

PUT

Write out the character

CPI

AT

JZ

RUN

Compare to the run signal character Run the program entered

ANI

7

ADD INR JNZ

C B LOOP

Mask out unwanted bits Add it in to the running Is that all? total No: go to loop

MOV INX JMP

M,A H GO

Store it in memory Increment the address Go again

PUSH IN

PSW STATUS PORT

Keep the chtr Get the status

ANI

OUTM ASK Is it ready?

JNZ

PI

No; go to PI

POP OUT

PSW DATA PORT

Retrieve the charctr Write the data

RET IN

STATUS PORT

Get minus the character count Rotate it left 3 bits

Go back Get the status

ANI

INMASK

Is it what we want?

JNZ

GET

No; return to get

IN

DATA PORT

Get the data

RET END

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o P ar k C A 9 4 0 2 5

M arch , 1 9 7 6 ­

71

B R E A K P O IN T R O U T IN E F O R 6502s John Zeigler 8 Seaview Dr., Pittsburg CA 94565 (415) 894-3661

[This routine was distributed at the Homebrew Computer Club meeting, March 17, 1976. It is reprinted with the author’s permission.] This routine is entered via a software breakpoint. It is entered when the processor encounters a 00 op-code. Upon

entering, the program counter is printed, followed by the active flags, accumulator, X index register, & index register, and stack pointer, terminated by a carriage return and line feed. It then waits for the user to type in a new op-code. Upon receiving that op-code, the original 00 code is replaced with the op-code that was input, the stack is returned to pre-interrupt status, and execution o f the original program continues from the breakpoint. To use this routine, it is necessary to load the interrupt vector, FFFE and FFFF, with 64 and 02, respectively, and place the 00 breakpoint op-code in the desired location. The following storage is required: 0000-0007, 0200-02E3, FFFE-FFFF. Note: This routine calls subroutines located in the TIM Monitor.

BUG PROGRAM L I S T I N G

0200 0202 0204 0207 0209 020C 020E 0210 0213 0215 0218 021 A 021 C 021 F 0221 0224 0226 0228 022B 022D 0230 0232

M arch, 1 9 7 6

85 A9 20 A5 4C 85 A9 20 A5 4C 85 A9 20 A5 AC

85 A9 20 A5 AZ

85 A9

AE

C6 07 7F 07 56 C6 07 82 07 42 C6 07 86 07 44 C6 07 89 07 49

STA LDA JSR LDA JMP 0VERFL STA LDA JSR LDA JMP BRK STA LDA JSR LDA JMP STA DEC LDA JSR LDA JMP IRQDIS STA LDA

NEG

07 72 02

72 02

72 02

72 02

07 #£4E WRT 07 V 07 #£56 WRT 07 B 07 #$42 WRT 07 D 07 #$44 WRT 07 I 07 #$49

VERSI0M

J I I I 1 I t t I I i t I t t I

J I

1 J J I

i

MODIFIED P STATUS A WITH *N • ’N * 3RE MODIFIED P *N T0 PR 0G. V MODIFIED P A WITH 'V* •V

5RE MODIFIED P *N TO PROG. B MODIFIED P * A WITH *B * •B* 3RE MODIFIED P *N TO PROGRAM D MODIFIED P A WITH ’ D* •D* 3RE MODIFIED P *N TO PR0GRAM I MODIFIED P A WITH * I •

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o P ar k C A 9 4 0 2 5

Page 17

0234 0237 0239 023C 023E 0240 0243 0245 0248 024A 024C 024F 0251 0254 0256 0258 025A 025B 025D 025E 0260 0261 0263 0264 0266 0267 026A 026D 026F 0272 0274 0277 027A 027C 027D 027F 0280 0282 0283 0284 0286 0287 0289

Page 1 8

20 A5 4C 85 Ay 20 A5 4C 85 A9 20 A5 4C 85 86 84 68 85 68 85 68 85 BA 86 D8 20 20 A5 20 A5 20 20 A5 2A B0 2A B0 2A 2A B0 2A B0 2A

C6 07 8C 07 5A C6 07 8F 07 43 C6 07 92 00 01 02

72 02 ZERO 72 02 CARRY 72 02

03 04 05 06 8A CF 05 B1 04 B1 77 03

72 02 72 72 73

81 V 8A B 92 D 9B I

JSR LDA JMP STA LDA JSK LDA JMP STA LDA JSR LDA JMP STA STX STY PLA STA PLA STA PLA STA TSX STA CLD JSR JSR LDA JSR LDA JSR JSR LDA R0L BCS R0L BCS R0L R0L BCS R0L BCS R0L

WRT 07 Z 07 # J>5A WRT 07 C 07 # $43 WRT 07 CONT 00 01 02 03 04 05 06 CRLF M0DPC 05 WR0B 04 WR0B SPACE 03 A NEG A 0VERFL A A BRK A DEC A

JTYPE *1* JREST0RE MODIFIED P JRETURN T0 PR0GRAM Z J SAVE MODIFIED P JL0AD A WITH ‘ Z • JTYPE ’ Z* J RESTORE MODIFIED P JRETURN T0 PROGRAM C JSAVE MODIFIED P J LOAD A WITH *C* JTYPE ’ C ’ J RESTORE MODIFIED P J RETURN T0 PROGRAM CONT JSAVE A IN 0 0 JSAVE X IN 01 JSAVE Y IN 0 2 JPULL p ot a JSAVE P IN 0 3 JPULL PCL TO A JSAVE PCL IN 0 4 JPULL PCH TO A JSAVE PCH IN 0 5 J MOVE S TO X JSAVE S IN 0 6 JN0T DECIMAL MODE JDO A CRLF JC0RRECT PCL & PCH J LOAD A WITH PCH JTYPE PCH IN HEX J LOAD A WITH PCL JTYPE PCL IN HEX J SPACE 1 CHARACTER J LOAD A WITH P JR0TATE N FLAG T0 CARRY JBRANCH IF N FLAG SET JR0TATE V FLAG T0 CARRY JBRANCH IF V FLAG SET JR0TATE PAST UNUSED B I T JROTATE B FLAG TO CARRY JBRANCH IF B FLAG SET JROTATE D FLAG V d CARRY JBRANCH IF D FLAG SET JROTATE I FLAG T0 CARRY

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s 8t O r t h o d o n t i a , B o x 3 1 0 , M e n l o P ar k C A @ 402 5

M arch, 1976

73

028A 028C 028D 028F 0290 0292 0295 0297 029A 029D 029F 02A2 02A5 02A7 02AA 02AD 02AF 02B2 02B5 02B8 02BA 02BC 02BE 02BF 02G1 02C2 02C4 02C5 02C7 02C8 02CA 02CC 02CE 02CF 0201 0203 02D5 02D7 02D9 02DA 020C 02DF 02EI

M arch, 1 9 7 6

74

B0 2A B0 2A 80 20 A5 20 20 A5 20 20 A5 20 20 A5 20 20 20 A2 81 A6 9A A5 48 A5 48 A5 48 A4 A6 A5 40 A5 FO C6 FO C6 60 06 4C C6

A4 AD B6 77 73 00 B1 7 2 77 73 01 B1 7 2 77 73 02 B1 7 2 77 73 06 B1 7 2 8A 7 2 B3 7 3 00 04 06 05 04 03 02 01 00 04 07 04 08 04

OS 03 02 05 AC D7 OS

BCS R0L BCS R0L BCS JSR LDA JSR JSR LDA JSR JSR LDA JSR JSR LDA JSR JSR JSR

IRQDIS A ZER0 c A CARRY C0NT SPACE 00 WR0B SPACE 01 UR0B SPACE 02 WR0B SPACE 06 WR0B CRLF RDHEX LD X # $ 0 0 STA ( 0 4 » X ) LDX 0 6 TXS LDA 0 5 PHA LDA 0 4 PHA LDA 0 3 PHA LDY 0 2 LDX 01 LDA 0 0 RTI LDA 0 4 M0DPC BEQ ALTERl ALT! DEC 0 4 BEQ ALTER2 AL.T2 DEC 0 4 RTS ALTERl DEC 0 5 JMP ALT! ALTER2 DEC 0 5 JMP ALT2 END Z

JBRANCH IF I FLAG SET JROTATE Z FLAG T0 CARRY JBRANCH IF Z FLAG SET JR0TATE C FLAG T0 CARRY SBRANCH IF C FLAG SET JSPACE 1 CHARACTER J GET A JTYPE A JSPACE I CHARACTER 1 GET X JTYPE X JSPACE 1 CHARACTER J GET Y JTYPE Y JTYPE SPACE J GET S 1 TYPE S J 0 0 A CRLF JREAD VALID 0PC0DE JPREPARE T0 L0AD 0PC0DE JST0RE C0RRECT 0PC0DE J GET S JREST0RE STACK P0INT ER JGET PCH JRESTORE PCH T 0 STACK JGET PCL JREST0RE PCL T 0 STACK JGET P JRESTORE P T 0 STACK JREST0RE Y JRESTORE X JRESTORE A JRETURN T0 PROGRAM JL0AD PCL IN A JBRANCH IF PCL * 0 JSET PCL = PC L- 1 JBRANCH IF PCL = 0 JSET PCL * P C L - 2 JRETURN FROM SUBROUTINE JSET PCH * PCH-1 JJUMP TO ALT1 JSET PCH = PCH-1 J JUMP T0 ALT2

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n i o P ar k C A 9 4 0 2 5

Page 1 9

D € f l V € R TinV BASIC F O R 6 0 6 0 s fl 2 nd version thot includes l-D a rra y s F.J. Greeb, 1915 S. Cape Way, Denver CO 80227, (303) 986-6651 [An earlier release o f Fred’s Tiny BASIC was submitted to the Denver Amateur Computer Society. This release is a considerably improved version.] This is a version of Tiny BASIC based on the design notes which have been published in People’s Computer Company newspaper, and in the Journal. The program is written in 8080 assembly language for a system utilizing a TV-Typewriter and a Suding-type cassette tape interface. The program requires approximately 2.75K bytes o f memory, including storage space for variables. COMMAND SET LET PR (print) GOTO GOSUB RET (return) IN (input)

IF CLEAR LIST RUN END

DIM REM CLRS SIZE TAPE LOAD

DIM -- allows single-dimensioned variables (only single letter variables may be dimensioned) REM - remarks follow CLRS - clears screen on TVT SIZE -- prints number o f bytes used, and number remain­ ing (does not include dimensioned-variable stor­ age areas, which are above the program) Control -- X input in response to an INPUT statement returns control to the Tiny BASIC monitor. FEATURES AND RESTRICTIONS Integer Arithmetic only, +/- 32767 maximum range Single letter variables optionally followed by the numbers 1 to 6 1-dimensional variables Only one function available RND(X); random number generator, returns a value between 0 and +32767. If X i 0, initialize the routine and return a random number. If X = 0, return a random number. Multiple statements per line allowed using a colon (:) separator. Strings ok in print statements; string variables not allowed. Direct mode operation (except that GOSUB and INPUT will not operate in the direct mode) Built-in editor for creation/modification of programs Full line erase using a ?. No single character erase. Dump and load programs to/from cassette tape Implied THEN in IF statements. The THEN clause may have any recognizable Tiny BASIC statements. Multiple statements following an IF THEN clause will be execut­ ed only if the relational clause is satisfied. Single byte line numbers, 2 to 255 Page 2 0

Zone spacing suppression on PRINT statements using a semi-colon (;) Expressions may be input (e.g., 3 * 5/2 is a valid input) ARITHMETIC OPERATIONS +, *, I allowed. Expressions are evaluated from left to right with multiply/divide precedence unless otherwise parenthesized. Too deeply nested parentheses is the most common cause o f error number 45. The expression complexity which can be handled is a function o f the program being processed. Variables and expression operands are stored in a common memory block, with variable values entered from the bottom up, and expression operands from the top down. I f overlap occurs, the error message is output. I f only a few variables have been referenced, a very complex expression can be handled. I f the maximum allowable number of vari­ ables (120) have been referenced, arithmetic expressions must be kept very simple. COMMAND MODE A “ greater-than” symbol ( > ) is output indicating that the interpreter is awaiting a command from the keyboard. Commands entered with a line number will be entered in proper numerical sequence in the program area. Com­ mands entered without a line number will be executed immediately if possible. Errors encountered in the direct mode will be output as mmm A T O since there is no line number associated with them. The LIST command is optionally followed by two numbers (LIST mmm nnn). I f no numbers are entered, the. entire file will be displayed on the TVT. I f LIST mmm is entered, line mmm will be listed. I f both mmm and nnn are entered, the listing will be from line number mmm to nnn, inclusive. I f mmm or nnn do not exist, the first line number greater than the input numbers will be used as limits. LIST, RUN, CLEAR, TAPE (Output a program to cassette), and LOAD (Input a program from cassette), are designed to be used primarily in the command mode. I f these commands are included in a program, they will execute properly, but upon completion (with the exception o f RUN, which will simply restart the program), they will return control to the monitor portion o f the program (i.e., a “ > ” will be output as a prompt, and no further statements will be executed until a command is input). OTHER FEATURES & A SAMPLE PROGRAM Some other features o f the system are best illustrated by the following sample program:

Dr. D o b b ' s Journal o f C o m p u t e r Cal i st heni cs & O r t h o d o n t i a , B o x 3-KT; M e n l o Park C A 9 4 0 2 5

__________ Wlarch, 1 9 7 6

75

5 GOSUB 200 10 PR “ INPUT X ,Y ” ; 20 IN X,Y 22 IF X=0 GO TO 230 23 IF Y=0 GO TO 230 25 IF X 120 Y = Y / lll:G O T O 50 60 IF X< > 0 IF Y < > 0 Z=RND (X*Y) 65 IF Z> 100 Z=Z/8: GOTO 65 67 C2 = 0 70 PR 75 PR “ I MADE A NEW NUMBER” 80 IF C> 5 GOSUB 200 85 PR “ GUESS MY NUMBER” ; 90 IN Cl 95 C2 = C2 + 1 : C = C + 1 100 IF Cl = Z GOTO 160 110 IF Cl M 2 ERNT H H, 0 L ,R 100 L IS 2 R, ' ' TVTO fl, L 10 L IS 2 R, ' ' TVTO DECR H H R, M TVTO H 13 L I S3 D* M LNUM B L IS 1 + 6 ERNT ERROR HANDLING L, 10 H, 0 S P . STRK CRLF DECR fi, ' ' TVTO A, ' R ' TVTO R, "T " TVTO a, ' ' TVTO LNUM L. A H, 0 DECA CRLF ERNT

TAPU B, 1 2 8

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 31 0 , M e n l o P a r k C A 9 4 0 2 5

Page 2 9

011 011 011 011 011 011 811 011 811 811 011 011 011 011 011 011 011 011 011 011 011 011 011 011 811 011 011 011 011 011 011 011 811 011 011 811 011 011 011 011 011 011 011 011 011 011 011 011 011 ©11 011 011 011 011 011 011 011 011 011 011 011 011 011 011 011 011 811 011 011 011 011 011 011 811 011 012 013 013 013 813 813 813

14? 151 154 156 161 164 165 170 172 175 17? 202 204 20? 211 214 216 221 223 226 230 233 235 240 242 245 24? 252 254 257 261 264 266 271 273 276 300 303 305 310 312 315 315 315 315 315 315 315 315 315 315 315 315 315 315 315 31? 321 323 325 326 327 331 333 335 33? 341 342 343 343 343 345 346 347 357 147 147 147 261 261 261 261

056 303 056 303 072 267 312 056 303 056 303 056 303 056 303 056 303 056 303 056 303 056 303 056 303 056 303 056 303 056 303 056 303 056 303 056 303 056 303 056 303

017 071 011 024 071 011 325 011 024 031 071 036 071 043 071 050 071 055 071 062 071 06? 071 074 071 101 071 106 071 113 0?1 120 071 125 071 132 071 137 071 144 071 151 071

000 011 011 011 O il 011 011 011 011 011 011 011 011 011 011 011 011 811

ERRM MVI L, 1 5 JMP ERR1 ERMO MVI L, 20 JMP ERR1 EOFR LDA LNUM A ORA ERNT JZ MVI U 25 JMP ERR1 ERML MVI Ls 3 0 JMP ERR1 GSER MVI L, 35 ERR1 JMP SHOE MVI L, 40 JMP ERR1 STOF MVI L, 4 5 JMP ERR1 RNER MVI L> 5 0 JMP ERR1 CRER MVI L* 5 5 JMP ERR1 REER MVI L* 6 0 JMP ERR1 RPER MVI L, 65 JMP ERR1 UDVE MVI L/ 70 ERR1 JMP L/ 75 AOFE MVI ERR1 JMP MGFE MVI L, 80 JMP ERR1 L, 85 DZER MVI ERR1 JMP ENDM MVI L, 9 0 JMP ERR1 L, 95 SUFE MVI JMP ERR1 MVI IL TL L a100 JMP ERR1 DMER MVI L» 1 0 5 ERR1 JMP ♦VARIABLE d e f i n i t ; 6 EQU SP PSW EQU 6 0 TVT EQU TAPU EQU 1 0E03E H CRLF EQU CLRS EQU 0E 0 9 0 H STAK EQU 0E780H NSVM EQU 120 .20H MMAX EQU. XBLN EQU 74 *

SOFTWARE

Sponsored b y P e op le ’s C o m p u te r C o m p a n y P.O. B o x 310 , M e n lo Park, Ca. 9 4 0 2 5

F IR S T P R IZ E:

$500

certificate for hardware from CROMEMCO

SECOND P R IZ E:

$250

certificate for hardware from CROMEMCO

OBJ E C T :

RULES:

Develop a program resulting in a new and interesting display using the Cromemco T V Dazzler. (The Dazzler is an interface that permits a home color T V set to be a graphic terminal for certain microcomputers.) •

RSTR SVMT VSTR ASTR IBUF TOPL

DS DS DS DS DS DS DS DS DS DS DS DS DS EQU EQU DS DS DS DS DS DS EQU DS EQU

2 2 2 2 1 1 2 2 2 2 2 1 1 PRD1 PRD2 2 1 1 8 120 256 * 74

END OF PROGRAM

A ll entries m u s t use th e C ro m e m c o Dazzler d isplay and m u s t n o t require m o re than 2 0 K o f c o m p u te r m e m o ry .

®

A ll entries w ill be judged by People’s C o m p u te r C o m p a n y on 1 — o r ig in a lity 2 — general user appeal 3 — c la r ity o f d o c u m e n ta tio n

®

Entries should in c lu d e source code and o b je c t code on p un c he d paper tape. A listin g o f an a p p ro p ria te b o o ts tra p loader should also be p rovided.

STORAGE AREAS

EFPN TMP1 NMLC APNT LNUM FNUM ASTK VSTK RSTK PRD1 PRD2 CHCT TEMP DVD1 DVD2 HORD LORD

CONTEST



S o ftw a re s hould be c o m p a tib le w ith M IT S R E V 1 serial I/O p o r t c o n v e n tio n f o r I/O req uire ­ m ents (i.e., data transfer is on p o r t 1, b i t 7 [a ctive lo w ] o f i n p u t p o r t 0 is used to indicate receiver ready, and b i t 0 [active l o w ] o f i n p u t p o r t 0 is used to ind ica te tr a n s m itte r e m p ty ) .

Microcomputers can be incredibly versatile. The Dazzler adds the dimension of full-color graphic display to the microcomputer. What can you develop? — games? — business? — education? — art? — others? SEND A L L E N T R IE S TO: P E O P L E ’S COM PUTER CO P.O. Box 310 Menlo Park, Ca. 94025 E N T R IE S MUST BE R E C E I V E D BY SEPT. 30, 1976

Page 3 0

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o Park C A 9 4 0 2 5

M arch , 1976

85

6800 T in y BASIC FOR $5 interface, as well as resolving some bugs in my Micro-8 Vol. 2, Issue 1, page 11 article. I made the mistake o f not indicating that just because you haven’t encountered these bugs in your Mark-8 in no way means they aren’t in your system. In soft­ ware, I’m interested in writing a “ suffix” notation program­ mable calculator, some sort o f relocatable loader, and, perhaps, some sort o f pseudo-assembler. I’m disappointed that there doesn’t seem to be any place or journal that effectively supports the Mark-8.1 think there is a tremendous need for national journals specializing in individual microcomputers or at least individual microprocessors-and teaching programming, solving problems, creating hardware and software for that particular machine. This would be very valuable for the individual user with that machine. Sincerely yours, Thomas R. Amoth 228 Fox Rd Media PA 19063 (215) 566-1068 Dear Tom, We will try to publish everything of value that we receive concerning the Mark-8. There is a need for machinespecific journals, however the market isn’t yet there to support them. (It costs much bucks to publish a quality periodical.) Of course, there are the manufacturer’s newsletters, and user groups, but it seems to me they don’t meet hobbyist needs; particularly not inexpensively. We’re gonna try. Send us your software as you get it running so we can share it with all Micro-8 owners. -JCW, Jr

APL’S APPEAL Dear Dragons: I have an Altair 8K system (the 8K currently on vacation in Albuquerque due to MITS’ recall order). Incidentally, my favorite language is APL, although I know more BASIC than APL. It seems to me that a limited knowledge of APL (i.e., just a few o f its features) allows greater creative freedom than knowing BASIC intimately, and is somewhat easier to attain. My initial bias against APL (and what I see as your continuing bias) comes from my background-I started off on FORTRAN, so BASIC (an “ extended subset o f FORTRAN” as Jean Sammet might call it) seems as natural as English. And old FORTRAN handwould likely see BASIC as the ideal language for beginners. You really should look into APL, and how it can be implemented on small machines. At least as a beginning, BASIC looks like fun, and is easily suited to small machines. Tiny BASIC looks like even more fun, since very little has been written on languages for small machines. (A friend o f mine recently said, “ Why bother? You can always get a few ‘K ’ cheap.” This is the worst argu­ ment I ’ve heard in favor o f inefficient programming.) Thus my interest in your journal. After all, my pie-in-the-sky 8080 APL system has to start out with a few “ basic” steps. Sincerely, 419 Simons Ave Ed Luwish Hackensack NJ 07601

M arch, 1 9 7 6

86

Dear folks at PCC & Readers of DDJ 2 April 1976 I have gotten a version of Tiny BASIC up and running on the 6800. It largely follows the logic and philosophy outlined in the PCC articles (saved a lot of time!), but I have enhanced it in the following ways: two-byte line numbers, LIST can specify a range, semicolon formatting on PRINT, REM added, INPUT accepts expressions, and RND and USR functions ( = machine language function call) are available. The interpreter fits into a little less than 2K bytes (may be ROM) and uses a single JMP to each o f three user-supplied I/O routines (character input, character output, and break test). I did this as a commercial venture (software is my living), but I am asking only $5 for a hex tape (Motorola format) and 20 page User’s Manual. Please specify RAM-based (ORG at 0100) or ROM-base (ORG at E000, I/O preset for AMI “ PROTO” board). When I have more time, and if there is sufficient interest, I will publish the IL code (I made a few changes), and show how to add extra functions. How about an assembler written in Tiny? For a copy o f this TIN Y BASIC for the Motorola and AMI 6800, send your name, address, and $5 to: Tom Pittman P.O.Box 23189 San Jose, CA 95153 PS As was noted in the TB articles, there is no such thing as a free lunch. Software comes in the lunch category, but perhaps I can offer you a cheap sandwich. Editor’s notes: Tom has a good reputation around the local Homebrew crowd. We believe that he will back his product. We would be quite interested in hearing from those who purchase his Tiny BASIC; we’d like to hear their praise and their complaints (if any). If you wish for him to publish his Intermediate Language code (IL ) in the Journal, write him and encourage him to do so soon. Tom - What do you mean by, “ an assembler in Tiny?” I hope that you don’t mean an assembler that is written in Tiny BASIC.

ERRATA The author o f the 6800 version o f Tiny BASIC was incorrectly given, in one place in the February issue, as being Tim Pitmann. His correct name and address is: Tom Pittman Box 23189 San Jose CA 95153 (408) 578-4944

Anyone out there know anything about Arrow Micro­ computer Systems in Farmingdale, NY? We’d like their address (none was given in their ad we saw), and any other tidbits you might know about them. -JCW, Jr

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o Park C A 9 4 0 2 5

________ Page 31

Dear Bob Albrecht, 3/29/76 Would give away time on machine in return for help on desired goals-Computer Graphic Animation!--software or hard­ ware implementations. However, to be honest, don’t want total beginners for this project. Otherwise all time will be spent teaching instead o f building. Sincerely, Charles R. Patton Alpha Electronics Svcs. 8431 Monroe Ave. Stanton CA 90680 (714) 821-4400

Dear People, Dragons, or whatever, 4-1-76 I have some suggestions for articles you could include: 1) An article on how to get something (especially a computer program) copyrighted, and just what rights the copy­ right gives you. 2) An explanation o f the 8080 instruction set (the MITS manual is extremely vague about the details o f certain opera­ tions like CMP and DAA, and even ADD). 3) Construction projects for ‘make-believe’ computer peripherals. One o f my old PCCs says that PCC was trying to build a model for a ‘recreational language,’ more suited to games and simulations than other languages now available. I have tried to design one myself. I came up with lots o f ideas and individual features it should include, but was not able to organize them all into a consistent whole. Were you able to do any better? I will write the compiler or interpreter if someone helps me invent the grammar and syntax. Sincerely, Bruce Smith 57 Glenside Way San Rafael CA 94903 Bruce, Send me your ‘make-believe’ fantasies! And . . . I would very much like to hear your ideas about a ‘recreational language.’ We would be very happy to publish random ideas about this. Cheers, Bob Albrecht

SIGNETICS 2650 TIN Y BASIC Gentlemen, I have a small system with a Signetics 2650. Using only about 3K o f the present 4K, “ T.B.” works quite well (one or two bugs present, but they’ll soon die out). Our preference for expansion is to tailor software for use on wide-platen terminals (e.g., Teletype Mod 38) for much nicer plotting (where time is not a factor). 2635 Littlaton Rd Melvin B. Smith El Cajon CA 92020 Is your system a homebrew, or a commercially available kit? Also, I hope you will choose to distribute your 2650 Tiny BASIC via D r D obb’s Journal, as soon as you’ve finished fumigating it. We are eager to provide software support for non-Intel systems. It improves market competition, promotes the general welfare, and slows Intel’s rush towards being an IBM look-alike. --JCW, Jr

AND NOW, TINIER BASIC Dear Bob, I’ve almost finished my version o f BASIC which will inevitably be called Tinier BASIC as it fits in 2K. Any o f your readers in the Cleveland area can join our club, Cleveland Digital Group, by writing me or our president, John Kabat, 1200 Seneca Rd, Apt 407, Broadview Heights OH 44147. We are in contact with groups in Buffalo, Pittsburgh, Toledo, Detroit, Lansing, Dayton, and Columbus, as well as a few others, and would like to get in touch with other nearby groups. Gary Coleman 14058 Superior Rd, Apt 8 Cleveland OH 44118 (216) 371-9304 Gary, Hope you will forward Tinier BASIC to us as soon as you get it finished, so everyone can share it. --JCW, Jr

FORMAT DIALOGUE Gentlemen: December 9, 1975 I’m not interested in the games or letters in PCC so I feel impelled to subscribe to D r D obb’s Journal. I wish you and the MITS people would change from the tabloid size. Newsprint paper should not be used for anything worth keeping. I’ve copied everything I ’ve wanted to keep out o f PCC before it crumbles and turns to dust. Please change! Yours truly, Richard R. Kenyon 18609A Del Rio PL Cerritos CA 90701 Dear Richard, 12/31/75 Sorry you don’t like our tabloid format. We can’t afford to change. We operate on very little money with part-time people who are grossly underpaid ($ 2 /hour?) and occasional volunteers. A newspaper o f standard size is the least expensive way to publish the most info. To go to 8 !/2x l 1 would double (wow!!) our printing cost, and . . .sigh!. . . we just don’t have the $$$. You say you don’t like P C C s games & letters, but you don’t say what you would like. Most of our readers are teachers & students in secondary schools or college people--they love the games & letters! Cheers, Bob Albrecht Bob,

1/2/76 Sorry--I didn’t intend to sound like a chronic complainer! I do like your publication and was interested in a more “ filable” format and more permanent paper. I know I’m in the minority not being excited by games. Tiny BASIC stuff has been great and I marvel at the way it has been presented for begin­ ners. (I did subscribe to the Journal-which is a positive indica­ tion!) I would enjoy more material in this area-ineluding other languages such as the SP/k family o f PL/I subsets, math sub­ routines, etc. I hope that you and the rest o f the staff will not have to maintain a shoe string existence with the growing, explosive, computer hobby. Last, but not least, the artwork is outstanding. Dick Dick-- Ho, ho . . . is this better? --JCW, Jr

Page 3 2

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o Par k C A 9 4 0 2 5

M arch, 1 9 7 6

87

$1.50

dr. dobbs journal of

C O M P U T E R (Calisthenics & Orthodontia Running Light W ithout Overbyte April, 1976

Box 310, Menlo Park CA 94025

Volume 1, Number 4

A REFERENCE JOURNAL FOR USERS OF HOME COMPUTERS

In

This

Issue.

. .

Editorial: History Repeats Itself . . . I Hope

Jim C. Warren, Jr.

Scanning the Industry Periodicals

3 4

Information derived from the May 24th issue o f E le ctro n ic News

FEATURE ARTICLES First Word on a Floppy-Disc Operating System

5

Command Language & Facilities Similar to DECSYSTEM-10

Hardware & Software for Speech Synthesis

Lloyd Rice

6

Detailed discussion o f techniques & hardware/software trade-offs

SYSTEMS SOFTWARE MINOL—Tiny BASIC with Strings in 1.75K Bytes

Erik T. Mueller

9

An outstanding implementation by a high school junior

System Monitor for 8080-Based Microcomputers

Charlie Pack

Keyboard control over program loading, examination, modification & execution

DATA Submitting items for publication Reprint privileges Subscription & information form PCC Bookstore titles TV Dazzler Contest

88

2 2 33 35 36

18

H ist o ry repeats its el f . . . I hope Last December, I had the very good fortune to attend a lecture on the history o f the electronic digital computer given by Professor Henry S. Tropp. Not too long ago, Dr. Tropp spent several years direct­ ing a research project for the Smithsonian Institute concerning the history o f computers in the period, 1935 to 1955. Much o f his work consisted o f traveling around interviewing many of the “old Timers” in the fastmoving world o f digital computers. Because the field is as new as it is—the first “real” computer was invent­ ed in the 1940’s—many o f the original researchers in computer science and technology are still alive. Dr. Tropp often spent several days talking with them. His December lecture was a rambling collage o f fascinating anecdotes and facts about the people and the technology, and insights into the intellectual character o f the times. Some o f his observations come to my mind, repeatedly, as I interact with computer hobbyists: Dr. Tropp noted that, in those first years, there was a tremendous amount o f intellectual and technical ferment in the area o f computers. A number o f prodigious steps were taken in a relatively short time, out­ lining and developing the majority o f the concepts, theories, and principles that remain the cornerstones of computer science and computer engineering. A number o f intellectual giants were involved: John Von Neu­ mann, Alan Turing, George Stibitz, Howard Aiken, John Mauchly, and many others. As often as not, how­ ever, it appears that they had little idea o f where they were going, and almost stumbled upon their great discoveries. The research community involved in these efforts was relatively small; most of the researchers knew one another, and there was often close communication among them. It seems like each new discovery by any one person quickly triggered renewed excitement and activity on the part o f many others, even though they were scattered all over the northeastern United States, and some were in England. Each new discovery or development was quickly shared, and often served as a foundation element for someone else’s discovery. This continued until the early 1950’s. Then, this great rush o f creation and advancement seemed to slow to a crawl. Some o f the researchers went o ff to work for industry. A number o f them moved to the West Coast to apply their research to the aircraft industry. Computers came out o f the experimental labs, and became a profitable area o f activity for business and industry. Particularly important: It appears that the easy communication and exchange o f ideas that was so evident in the ’4 0 ’s was greatly curtailed in the ’50’s. I see several parallels between what happened in those early days, and what is now occuring in the hobby­ ist community: I see a great deal o f excitement and obvious pleasure in the hobbyists, as they learn about these funny machines and discover their phenomenal capabilities. It seems to me that those early researchers must have felt much o f the same excitement and intellectual stimulation, for computers were as new and novel to them, then, as they now are to many o f the hobbyists. I hear o f hobbyists who are spending most o f their time in a great flurry o f activity and experimentation. In the same way, those first computer scientists often worked night and day on their research, sometimes moving bunks into their labs to facilitate their continuous efforts. I note the extensive development o f very inexpensive hardware within the hobbyist community, often developed in a basement shop. Similarly, the computer researchers of the ’4 0 ’s often worked on a shoe­ string budget in antiquated facilities. Perhaps most significantly, I note the great willingness to share ideas, developments, facilities, and solu­ tions to problems among the hobbyists. This obviously compares with the easy and open communication that was perhaps invaluable to those early researchers. It is this open sharing that particularly delights me, and with which I am particularly concerned. I hope that it continues. We must all do whatever we can to encourage it. The sharing o f ideas is useful in that it allows us to stand on one another’s shoulders, instead o f standing on one another’s feet. But, there is some­ thing else being shared that is o f at least equal value: the enthusiasm and intellectual excitement. There is no doubt in my mind that the sharing o f such enthusiasm, as well as information, was a significant factor in the prodigious creativity o f those original researchers. When one o f them was frustrated and “down,” probably someone came flying through the door, “wired” over some new discovery, and ricocheting o ff the walls . . . and the depressed co-worker wasn’t “down” for very long. I believe the same holds true for the computer hobbyists. So . . . continue to share your ideas, and continue to share your excitement. -Jim C. Warren, Jr., Editor

A p ril,

1976

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o P ar k C A 9 4 0 2 5

Page 3

89

SCANNING THE INDUSTRY PERIODICALS FROM THE MAY 24TH ISSUE OF E LE CTRO N IC NEWS (Fairchild Publications, Inc., 7 E 12 St., NYC 10003; (212) 741-4230) D R O P IN D EC O R D E R S C A U S E S L S I / 1 1 C H IP M A K E R M A JO R F IN A N C IA L PR O B LE M S

lies w ill see a slowing growth, and l-squared-L a questionable growth. P- and N-channel M OS increase fro m $ 7 2 8 m illion (in 1975) to $ 9 5 9 is projected to jum p fro m $ 9 6 m illion (19 75 ) million.

w ill see, at best, is expected to m illion. C /M O S to $1 53

Western Digital Corp., based in New port Beach, Cal., manufactures the 16-bit microprocessor th at is the basis for Digital Equipm ent Corporation's L S I/1 1 . Western's attorney recently told its creditors th at the company had a "cash flow position where it could not operate," due to drops in DEC orders (e.g., fro m $ 4 0 0 K in March to less than $ 1 0 0 K in A p ril. A vice-president from DEC indicated th at, although their L S I/1 1 sales had been going as expected, th ey could not afford to continue to buy in the same quantities they had in the past. Evidently, DEC had been purchasing more than they

M otorola Sem iconductor and Advanced M icro Devices recently signed a licensing agreement fo r M otorola to secondsource the bipolar, bit-sliced, 2901 microprocessor fam ily developed by A M D . This makes M otorola the third secondsource fo r 2 9 0 1 's. Others include Ratheon Sem iconductor, and the Sescosem Division of the Paris-based Thomason-CSF.

were using; th ey indicated th at their inventory was filled to capacity. The creditors’ com m ittee recommended giving West­ ern 30 days to rectify its financial position.

F L O A T I N G P O IN T S O F T W A R E IN P / R O M 's F O R 8 0 8 0 's

Editor's Note: If I remember correctly. Western agreed to sell their chip only to DEC. If DEC really wants to keep

Western afloat, as appears to be the case, then DEC could try releasing Western from that exclusive sales agreement. My sus­ picion is that, if Western were free to peddle their PDP-11 look-alike microprocessor to everyone who wished to buy it, they could cure their financial problems rather quickly. N A T I O N A L ' S S C /M P K I T FOR $ 99 National Semiconductor has a microprocessor k it avail­ able fo r $9 9. This includes their SC/M P m-p (46 instruction types, single- and double-byte instructions, built-in serial I/O ports, bi-directional 8-bit bus, parallel data port, and latched, 12-bit address port), a preprogrammed 512-b yte K IT B U G ROM (m onitor and debugger), 25 6 bytes of R A M , T T Y interface (including buffer and driver fo r 20m A current-loop), voltage regulator, data buffer crystal (1 .0 M H z), complete literature and schematics, and all the passive components and a PC board required to build a wee m icrocomputer. Contact Semiconductor Concepts: 145 Oser Ave., Hauppauge N Y 11787, or 21201 Oxnard St., Woodland Hills CA 9 1 3 6 4 .

Any computer stores carrying SC/MP kit?

M OTOROLA & AM D AGREE ON 2901 S E C O N D -S O U R C E

Recognition Systems in Van Nuys, Cal., is offering a floating point package in P /R O M 's fo r $4 9 5 . A num ber of routines are included: floating point m u ltip ly, divide, add, subtract, fixed -p oin t to floating-point conversion, square root, and floating-point to binary-coded decimal conversion.

M O N O L IT H IC M E M O R IE S O F F E R S M IC R O P R O C E S S O R - B A S E D N O V A C O M P E T IT O R M onolithic Memories, Inc. o f Sunnyvale, Cal., recently announced a 16-bit microcomputer th a t is said to be both software and I/O compatible w ith Data General's N O V A 2 and 3. M M I expects to be producing about 50 /m o n th by midJuly. The systems w ill be priced at $ 2 5 0 0 in quantities o f 50 or more, including 3 2 K words o f m emory. T he systems use four o f M M I's 6701 fo u r-b it bipolar microprocessors. T h e 3 2 K word memories use o f 128 of M M I's 2 1 8 0 4 K RA M 's. There is also a rum or o f a NO VA-on-a-chip in the fo re­ seeable fu ture.

8 K PD P -8/E M E M O R Y F O R $ 6 5 0 WE Com puter Extension Systems of Houston has an­ nounced a plug-in m em ory board fo r the PDP-8 Omnibus. The m em ory uses N M O S R A M 's. A 4 K version costs $4 00 ; the 8 K version is $ 6 5 0 . The company states th at they come w ith an unconditional one-year w arranty.

S E M I C O N D U C T O R S H IP M E N T S E X P E C T E D T O N E A R $5 B IL L IO N M A R K , T H IS Y E A R

P A S C A L C O M P IL E R F O R PDP tI 1 E X T E N D E D FOR R E A L -T IM E F U N C T IO N S

Western Electronics Manufacturers' Association (W E M A ), has projected th at w orldw ide semiconductor shipments will h it $ 4 .9 8 billion in 1976. This is 24% above the $ 4 .0 2 billion shipped in 1975. This report was a joint effo rt o f all the major semiconductor manufacturers except Texas Instruments. O ther preductions contained in this report included: MOS circuits w ill byte into the bipolar circuit m arket, ECL fam i­

A compiler fo r PA SC A L on the PDP-11 is being offered by Electro Scientific Industries o f Portland, O re., for $1 50 0. PASC AL is an excellent, cleanly-designed, block-structured, high-level language, created about five years ago by Niklaus W irth. ESI has extended the language to include the necessary constructs fo r real-time data acquisition and process control. The system runs under DEC's RT-11 operating system and requires 1 6 K words.

Page 4

90

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o

Park C A

94025

A p ril,

1976

F ir s t w o r d on a floppy-disc o p e r a t i n g s y s te m Command l anguage & f a c i l i t i e s similar to D E C S Y 3 T E M - 1 0 by Jim C. Warren, Jr., Editor, Dr. Dobb's Journal We have the first tidbits o f inform ation on the floppy-disc operating system to which we have alluded in past issues: T he system, called " C P /M ," runs on an 8 0 8 0 . It is available from Digital Research, Box 5 7 9 , Pacific Grove CA 9 3 9 5 0 ; (408) 3 7 3 -3 4 0 3 . Its user interface is patterned after th a t of the D E C S Y S T E M -10. T h e file commands include R E N A M E , T Y P E , ER A S E , Dl R E C T O R Y , L O A D , and auto-load/execute fac ility (type the name of an object file; it w ill be loaded and begin execution). File-names fo llo w the DEC standard o f a 1-8 character name w ith a 1-3 character su ffix. An E ditor is included th at has somewhat the flavor of T E C O . There is a PIP fac ility th a t allows easy transfer o f files to and fro m any available device, e.g., term inal, paper-tape I/O , cassettes, flo p p y discs on any drive, etc.. Note: PIP is DECeze fo r Peripheral /nterchange Program. Other systems software is likely to be included. Internally, the system allows fo r dynam ic file allocation of files ranging fro m 0 to 2 5 0 K bytes in length. It is in itially set up to allow up to 63 d ifferen t user-defined file-names (C P /M system files do not impinge on this file-name space), and can be simply m odified to allow up to 2 5 5 such file-names. T h e system is w ritten in P L /M . A t an absolute and rather undesirable m inim um , it w ill run on 80 80 's w ith only 8 K bytes of m em ory. T o be really usable, it requires 12K or, preferably, 16K bytes. The system includes an autom atic bootstrap fa c ility via a R E S E T of the controller, or allows a software bootstrap, if the controller doesn't have the R E S E T fa c ility . The system is sufficiently modular that its designer feels he can easily m odify it to operate on most floppy-disc drives and w ith most floppy-disc controllers. This system already exists and has been in use fo r over a year. It was originally designed and implemented by Dr. Gary Kildall, a Com puter Science Professor at the Naval Postgraduate School in M onterey, and a w ell-know n, independent consultant in the area of mocroprocessor systems software. G ary is also the

Floppy-disc d rive s............................................................ $ 5 5 0 -$ 6 5 0 We expect to carry more inform ation, including firm prices, and one or several articles by D r. Kildall in near-future issues. From our experience, this is the hottest deal going! It's cheap, as far as floppy-disc systems fo r micros go. The software is well-designed, based on a w ell-known and easy-to-use operating system th at has been around fo r a DECade. A d d itio n a lly—major points w orth considering—it has been in use for some tim e, it has been used by a number of people, and it is fairly com pletely debugged. We know G ary personally, know 'where his head's at," and know th at he backs his products and is responsive to his customers. Incidentally, he has an excellent and ongoing working relationship w ith Digital Research. You should very seriously consider obtaining a flo p p y disc subsystem—hardware and software— fo r your home computer (either G ary’s or someone else's). A short-access mass-storage fa ­ cility increases your capabilities by several orders of magnitude, particularly when it is backed by comprehensive, well-designed, debugged systems software. Note that the IBM 65 0 (the Model T of computers, and the one th at moved computers out of the laboratory and into mass production and widespread usage) had a

main m em ory that was a 2000-w ord rotating drum w ith access measured in milliseconds. [The Dragon sez we should tell you that the 6 5 0 had 20 00

ten-digit words. T h in k o f it as about 1 0 ,000 bytes.]

’ A P L E A F O R E X P L I C I T D l R E C T IO N S Dear Jim Warren Jr., 4-2 7-7 6 M y problem is interfacing (hooking all the components together so they w ork as a system). For instance, I can find no where instructions on exactly how to hook m y SWTC keyboard and T V T -I I up to my A lta ir through m y 3P + S and 2 2 " video m onitor. I don 't mean a few general instructions. I mean a wiring

designer and im plem entor o f P L /M , the "industry standard" highlevel language fo r microprocessors. P L /M was produced fo r Intel

diagram showing exactly which lines go where so all the strobes, waits, readys, etc. w ork together. T he same is true of my suding

for their 80 00 -fam ily micros. G ary recently completed PLuS, a language fo r the Signetics 2 6 5 0 microprocessor that is upwardscompatible w ith P L /M . Incidentally, since C P/M is w ritten in

cassette interface. Then, if I order a tape from John Arnold w hat do I have to do to get it to w ork. I have no trouble building the parts and getting them to w ork, but nobody w ill furnish me w ith comprehensive instructions on putting them together into a

P L /M , and PLuS is--for the most part--a superset o f P L /M , Gary feels th at it w ill be relatively simple fo r him to make this operat­ ing system also available fo r 2650-based systems. It is expected that Digital Research w ill offer all o f the parts for an inexpensive floppy-disc system, ready to build (k it), and/or plug-in (assembled) to an IM S A I or A lta ir m icrocom puter. These "parts" consist of: C P /M , the operating system; a floppy-disc controller; and floppy-disc drive(s). Pricing is still tentative, however these are the conservative estimates: CP/M User's Manual + Editor User's Manual + CP/M Interface M a n u a l..................................................................$15 Extensive systems docum entation package..................$3 5 Form atted, verified, "loaded" d is c .................... j . . . . $20 Note: a "ra w " disc costs about $8 Floppy-disc c o n tro lle r.....................................................$10Q -$350 A p ril,

1976

system. Sincerely, John Greiner, Jr.

2 0 0 0 2 S 57th Tem ple T X 76501

SAN F R A N C IS C O B A Y A R E A S T O R E ; C O M P U T E R S & S T U F F o f San L oren zo Computers & Stuff, a new retail computer outlet, has opened at 664 Via Alamo, San Lorenzo CA 94580; (415) 278-4720. Its hours are: Wed. - Fri., 4 - 8 p.m. Sat. - Sun., 1 - 7 p.m.

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o Park C A 9 4 0 2 5

Page 5

91

H a r d w a r e & so f tw a r e f o r speech synthesis by Lloyd Rice Com putalker Consultants 821 Pacific St., No. 4 Santa Monica C A 90 4 0 5 The process o f generating voice o utp ut w ith a computer can be broken down into several steps. We w ill examine the opera­ tions at each step to determine the flo w of inform ation into and out o f the step. This exam ination w ill give us the back­ ground needed to decide which parts o f the overall process should be wired into a hardware device, and which parts should be kept as software to retain fle x ib ility and control over the process. Perhaps the easiest way to carry out such an examination is by following an example phrase thru the sys­ tem as it is transformed into a speech signal and sent to the loudspeaker,

r e s o lu t io n o f

g r a j- m a t ic a l

" I t was a dull subject," and "T h e y were going to subject him to cruel punishm ent." It is not evident fro m the spelling which usage is intended, and requires th at a fa irly complete grammatical analysis be carried o u t to make th at decision. One advantage at this point is th a t good use can be made of the recovered grammatical structure in the next step, where a more elaborate assignment o f stress is perform ed. T he second step in the synthesis process deals w ith the assignment o f sentence stress levels to the phonetic te x t string. T o clarify th at operation we w ill first have a closer look at the nature o f the linguistic feature known as stress. T he stress w ill be coded as a numerical value attached to a vowel in the phonetic string. T h a t value w ill be realized later by the synthesizer in three d ifferen t ways: as an increase in the pitch frequency, as a lengthening o f the vowel duration, and to some extent as an increase in am plitude. T h e prim ary or highest

Figure 1 shows a flow ch art o f the speech o u tp u t system to be described. We w ill see th at the kinds of external infor­ mation needed fo r the first 2 steps is quite d ifficu lt to obtain and can require large amounts o f processing, whereas th e in­ form ation needed in the third step is easily determined, and in most applications can be set as constants in the system. Finally, the acoustic parameters contain all the inform ation necessary to control the last step, the actual synthesizer, to produce audio output. As a result of these observations, we w ill see th at is most cases, one should specify the material to be synthesized in the form o f marked phonetic te x t rather than raw English tex t. In order to present a more complete description, however, w e w ill begin w ith the first step shown in Figure 1, input of English text. Beginning w ith the sample te x t, "T his is computer speech.'', we first consult a phonetic dictionary, which per­ form s a direct translation to phonetic te x t. A phonetic coding scheme suitable for this purpose which is compatible w ith the A S C II character set and Teletype o utp ut was developed by the Advanced Research Projects Agency (A R P A ) as a part of

level o f stress is marked as a " 1 " follow ing the vowel symbol. Secondary stress, marked w ith a " 2 ," has less extrem e acous­ tic effects than prim ary stress. As many as 3 or 4 distinct levels o f stress may be marked in a sentence. W ith regard to its communicative value, stress serves tw o x quite distinct functions. The sentence stress pattern, together w ith tim ing and intonation, serves to communicate the gram­ matical structure to the listener. One can th in k o f the grarrtmatical structure as being transformed into a stress and in to ­ nation pattern by the speaker which is then decoded back into the phrase structure by the listener. Using the term "gram m ar," I am here including several kinds o f inform ation about words, such as the noun-verb distinction discussed above as well as syntactic inform ation about the phrase and clause structure. T h e second function of the stress pattern is to indicate which item or items in a sentence are to be given special emphasis. The meaning o f a sentence can be shifted around by emphasizing d ifferen t items. The sources o f info r­ mation needed fo r marking these tw o components of the stress pattern are quite d ifferen t and must be considered sep­ arately. O ur example, w ith the stress pattern marked, would be something like, " D H IH 3 S /IH Z /K A H M P Y U W 1 T E R / S P IY 2 C H .# " . Notice also th at the word and utterance bound­ ary markers have been kept explicitly in the te x t string. The purpose o f the portion o f the system described thus far is im ply to generate strings o f phonetic te x t w ith marked

a recent speech recognition study. T h a t phonetic code, known as A R P A B E T , is listed in Table 1. The output o f the phonetic dictionary in our example w ould be, " D H IH S /IH Z /K A H M -

stress patterns which are to be synthesized by the 2 steps in the bottom row o f Figure 1. Marked phonetic te x t strings can be obtained in other ways, of course. In the case of pre­ determined phrases, marked phonetic strings can be stored instead o f raw English te x t, making the synthesis task much simpler. On the other hand, consider synthesis of speech from

P Y U W T E R /S P IY C H .# " . The main problem which arises at this stage is due to homographs, words th a t are spelled the same but pronounced differen tly. T w o d ifferen t types of homographs, however, pre­ sent quite d ifferen t problems. The first typ e consists mainly of short words such as "b o w ," pronounced either as in "tied a b ow " and "b o w and arro w ," or as in " o ff the starboard bow ." In these cases, the pronounciation can usually be re­ solved by examining th e surrounding context. The other type of am biguity is a lesser noticed but very widespread phe­ nomenon in English: the situation where a word has a d iffe r­ ent stress pattern depending on whether it is used as a noun or a verb. As an example of this, notice the difference in

an inform ation netw ork o f some kind. The qrammatical info r­ mation could come fro m a phrase struo jre grammar which is being driven by relationships in the netw ork. Items in th e net­ work w ould be coded as phonetic strings, or in essence, refer­ ences to the phonetic dictionary described above. There are many significant problems remaining w ith this approach, but it is perhaps one of the more exciting applications o f synthetic speech. T h e third box in the flow ch art in Figure 1 is the acous­ tic rules section. In order to describe w hat the acoustic rules are and w hat they do, we must first look at the acoustic structure o f speech. The speech code must be broken down into components so it can be synthesized by controlling, in real tim e, a lim ited number o f parameter values. T o a good

Page 6

92

D r . D o b b ' s J o u r n a l o f C o m p u t e r C ali s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o P ar k C A 9 4 0 2 5

A p ril,

1976

approxim ation, speech can be represented by the model shown in Figure 2. This model requires 9 parameter control values consist­ ing of 5 frequency controls and 4 am plitude controls. The box labeled "pulse source" is a controllable frequency oscil­ lator which is adjusted dynam ically to determ ine th e voice

T able 1 COMPUTER PHONETIC REPRESENTATIONS

N O T E : Spaces are ignored except within escapes.

Computer Representation 1-Character 2-Characters

phoneme

pitch. T h e boxes labeled "resonator" are tunable, single-pole, bandpass resonators which determine the frequency or spec­ tral shape o f the speech signal in d ifferen t ways. The data bus symbol used to represent the control inputs indicates th at each parameter can be controlled by at most 8 bits fro m the computer's o utp ut bus. T h e data rates needed to control the

Example

Computer Representation Phoneme L1 -Character 2-Characters

P

£et

t

P t

T

ten

bait

k

k

K

kit

EH

bet

b

b

B

bet

@

AE

bat

d

a

D

&

a

AA

Bob

g

9

G

debt get

A

A

AH

but

h

h

HH

hat

Z3

o

AO

bought

f

£

F

fat

o

o

OW

boat

0

T

TH

thing

u

U

UH

book

s

s

S

sat

u

u

UW

boot

* t s or /

S

SH

shut

a

X

AX

about

V

V

V

vat

5

X

IX

roses

*

D

DH

that

Jf

R

ER

bird

z

Z

ZOO

a U or aw

W

AW

down

z V z orj

Z

ZH

azure

C

CH

church

j

JH

jjudge

H

WH

which

L

EL

battle

i

i

IY

beat

p

I

I

IH

bit

e

e

EY

e

E

&

V

al or ay

Y

AY

&U£

al or =>y

0

OY

boy

c V J

y

y

Y

JJOU

n

w

w

W

wit

r

r

R

rent

syl m,m

M

EM

bottom

1

1

L

let

syl n,n

N

EN

button

m

xa

M

met

flapped t,X

F

DX

batter

n

n

N

net

glottal Sto£j'

Q

Q

n

G

NX

sin£

syl 1,1

silence non-speech segment

Symbol

I

laugh, etc.

Meaning

:3 or

Fall-rise or non-term juncture

/

Word boundary

*

Comment (anything except * or **)

*

Utterance boundary

**

Apos-surround special symbol in comment

1 or .

Tone group boundary Falling or decl. juncture

Phoneme class information

2 or ?

Rising or inter, juncture

Phonetic or allohonic escape

-Value 0

1976

1 ».... AUXILIARY SYMBOLS (1- AND 2-CHARACTER CODES ARE IDENTICAL) Symbol Meaning Morpheme boundary

+

April.

Example

STRESS REPRESENTATIONS (IF PRESENT, MUST IMMEDIATELY FOLLOW THE VOWEL) Stress Assignment S tress ?^iOT.rpr.t Value No stress Tertiary stress

1

Primary stress

2

Secondary stress

(Etc.)

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o P ar k C A 9 4 0 2 5

Page 7

93

parameters are quite low , the highest rate needed fo r any parameter being less than 100 new settings per second. I w ill not go into detail here describing the actual parameter values needed to represent particular speech sounds. An article to appear in the August, 1 9 76 issue of Byte Maga­ zine goes into some detail on the nature o f the d ifferen t kinds of speech sounds and how they can be generated by con­ trolling the parameter values in such a model. Sucn inform ation w ould, of course, be necessary to w rite a software implemen­ tation of the acoustic rules. For our present purposes, we con­ sider the 9 control values as outlined above to represent an acoustic parameter model o f speech. We can now turn to a discussion o f the acoustic rules and the tasks th ey must per­ form to generate controls fo r this model. Each phoneme, as encoded in the phonetic te x t string, is a symbol representing one or more acoustic speech segments, each such segment being produced by a particular pattern o f values on the control parameters. Each pattern, or configura­ tion o f control values, must be held fo r a specific length of tim e before changing to the next pattern. As a first approxi­ mation then, the rules would consist of a series o f table look­ ups to convert each phoneme into a sequence o f parameter patterns, along w ith the duration each pattern is to be held. Now comes the catch! This first approxim ation makes rather poor speech. The problem is th at the transitions be­ tween parameter values are often more im portant than the actual values at any given tim e. The flo w o f parameter values must be more carefully orchestrated. A ctually, the only tough problem here is th at correct transitions between phonemes are just as im portant as having the correct temporal structure within a phoneme. This means that phonemes cannot be coded as independent sets o f parameter tim e functions which are merely joined together sequentially, but th at some interac­ tion must take place between phoneme patterns before they are sent out to the synthesizer module. Briefly, the different phonemes o f a language can be classified according to the effects of boundary interactions. T he transition o f each param­ eter value across a given phoneme boundary can then be de­ termined fro m the boundary characteristics of each o f the neighborhing phonemes. Such boundary behavior inform ation can be stored in phoneme look-up tables. In addition to assigning initial parameter values and mapping the transitions across boundaries, the acoustic rules must also assign and m o d ify durations. For example, a stressed vowel is given a longer duration than the same vowel in an unstressed position. A third function the acoustic rules must perform —proba­ bly the most im portant fo r natural sounding speech—is to as­ sign the tim e pattern of values to the pitch frequency parameter. First, an archetypal intonation pattern is chosen on the basis o f punctuation (retained in the phonetic te x t just fo r this purpose). A period selects a falling pitch, a comma signals a level pause, and a question mark indicates a rising pattern. O ther diacritical marks could be defined in the pho­ netic string to generate more complex pitch patterns such as singing. The selected archetypal pitch pattern is then m odi­ fied locally by specific phonemes. Such local m odification of the pitch pattern is one o f the effects o f a stress level marked on a vowel. Also, some consonants affect the pitch value slightly. To com plete the synthesis process, the acoustic param­ eters generated by the acoustic rules are output, in real tim e, to a synthesizer module such as sketched in Figure 2 and Pa9e 8

94

described in the forthcom ing Byte article. T h e synthesizer constructs an audio frequency signal as specified by the con­ trol parameters. The audio signal is then

sant to a loud­

speaker as the speech output. It would be impractical to consider simulating the syn­ thesizer module in software because o f the speed needed to generate speech in real tim e. T h a t task is much more appro­ priately handled by analog hardware. Such a hardware syn­ thesizer module is currently being developed by Com putalker, 821 Pacific S t., No. 4, Santa Monica CA 9 0 4 0 5 . The Com pu­ talker synthesizer module would be driven by the microcom ­ puter o utp ut data bus as described above. T he software inter­ face consists either o f a direct, manuaIly-controlled parameter pattern generator or an im plem entation o f the acoustic rules. Software fo r the acoustic rules w ill also be developed by Com putalker as the hardware becomes available. I believe it is im portant to consider at this point some o f the trade-offs involved in implementing the acoustic rules in software rather than hardware. A synthesizer system such as the V o trax VS-6 contains a hardware im plem entation o f the basic acoustic rules. As a result, the language available fo r coding the phonetic te x t is fixed and cannot be extended. In addition, the phoneme table values are fixed so th a t each pho­ neme has a set phonetic quality. By implementing these rules in software you could retain the fle x ib ility over pitch pat­ terns and speech rate and also have control over the phonetic qualities which determ ine the language and dialect. The acous­ tic rules determine a number of qualities in the resulting speech which are characteristic o f a particular speaker, such as the sex and age, and other qualities which vary from occasion to occasion, such as voice quality, speaking rate, distinctness o f articulation, etc. Because o f tim e constraints, a software version o f the acoustic rules may not have tim e to handle ail these possibilities as on-line variables. O f course, it is cheaper to produce a synthesizer module if a hardware acoustic rules system is not included. H ow could speech o utp ut from a microcomputer be used? Several applications come to mind fo r the hobbyist environment, such as responses in games, voice readout of measurement data, system status warnings, etc., etc. Other applications might include telephone answering and intrusion warnings. What about generating audio tape labels autom atical­ ly? Each o f these applications makes its own demands for quality, naturalness and range o f vocabulary needed. I w ould very much like to hear o f your interest in com puter speech output. What applications do you have in mind? W hat prob­ lems do you foresee? A note to the above address w ill assure th at you receive fu rth er inform ation as it becomes available.

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o Park C A 9 4 0 2 5

A p ril,

1976

M IN O L — T in y B A S I C

w ith

S t r i n g s in 1.75K B y t e s

AN OUTSTANDING JOB DONE BY A HIGH SCHOOL JUNIOR Dear Mr. Warren: May 1, 1976 I have a Tiny BASIC program running on my Altair that I think you might be interested in. I call it MINOL (mine-ail). It fits in 1.75K memory. Unlike the other Tiny BASIC's, MINOL has a string-handling capability, but only single-byte, integer arithmetic and left-to-right expression evaluation. Additions to TB include CALL machine-language sub­ routines, multiple statements on a line (like TBX), and optional "LE T" in variable assignments. Memory locations of the form (H,L) can be used interchangably with variables, per­ mitting DIM-like operations. Sincerely, Erik T. Mueller 36 Homestead Lane Roosevelt NJ 08555

PR 5 6 + !/A ,B PR A semicolon at the end o f a PR suppresses C R L F . A blank PR produces a C R L F . PR Form at: Numerical values are printed w ith one lead­ ing and trailing space and w ith all leading zeros suppressed. A ll strings and literals are printed w ith o u t leading and trailing spaces. No zone spacing.

GOTO Transfers control to the specified statement. G O T O 0 transfers control to beginning o f unnumbered statement. Ex: G O T O A * 1 0 G O T O 78

IF ; Executes the statement follow ing the (semi-colon) if the specified relation is true. If it is untrue, control is trans­ ferred to the next statement on the line (if present). Ex:

M IN O L is an abbreviated form o f BA SIC w ith additional features. It has tw elve statements: L E T , PR, IN , G O T O , IF , C A L L , E N D , N EW , R U N , C L E A R , L IS T , and OS. Variables: A letter fro m A to Z , or a m em ory location of the fo rm (H ,L ), where H is th e high address (decimal), and L is the low address. H and L may be expressions. Num ber: A n integer fro m 0 to 255. Expression: A series o f terms separated by arithm etic operators. Terms: Numbers, variables, schars, random. Schar: A single character enclosed in single quotes. Gives the A S C II value o f the character. Random: " ! " (exclam ation point) gives a random num ­ ber between 0 and 255. (Subroutine by Jim Parker.) A rith m e tic Operators: + - * / Relational Operators (not perm itted in expressions): = # < ("less th an ") A rith m e tic Evaluation: A ll expressions are evaluated from left to right (no precedence of operations). Statements: A statement consists o f one or more sub­ statements separated by " : " (colon), and term inated by CR. Lines up to 72 characters. Line numbers fro m 1 to 254. A ll statements may be used w ith or w ith o u t a line number. Statements w ith o u t a line number are executed im m ediately. Statements w ith line numbers are edited into the existing program. Substatements: [LET | ] < var> = Assigns the value o f a variable. T h e " L E T " can be left out if desired. Ex: LET S = 0 L E T (24 ,0 ) = P - 5 9 A = B + C * J -1 9 8 (2 5 ,5 )= A *7 /B

PR [;|] < var-list> : Literals, strings, or expressions separated by commas. Literal: Characters to be printed enclosed in double quotes. Strings: $ (H ,L ): A series o f m em ory locations starting at H ,L which contain characters previously entered. Expressions: Simple variable or expression. Ex: P R "Y O U S A Y Y O U R N A M E IS ",$ (1 0 ,0 ) P R A ,B ,(6 ,0 ), A p ril, 1976

IF IF IF IF

X = 5 ; G O T O 20 A = 'Y ' ;P R "S U R E , W H Y N O T ?" A + B *C # !;G O T O 20 : P R A + B *C Y # 6; S=!

IN [< var> | < str>] [,[ | < str>] ] * This statement permits tw o types of data to be entered from the term inal: a) Num eric data; and b)

Alphanum eric data; either a

letter, or a string of n characters. Using a < v a r> : The input data is tested. If it is numeric, the number is deposited into the variable. If the data is not a number, the A S C II value of the first character typed is deposited. Using a < s tr> : (of the fo rm $ (H ,L ) The inputted char­ acters are deposited into mem ory sequentially starting at loca­ tion H ,L . 255 is placed in m em ory after the last character before CR. A ll spaces inputted are ignored unless enclosed by quotes. Note th a t (H ,L ) refers to a single location, but $ (H ,L ) refers to a series o f locations beginning at H ,L . (H ,L ) can be used in expressions as a variable, but $ (H ,L ) can only be used in I/O statements (IN , PR).

CALL (H,L) Calls users subroutine starting at location H ,L decimal.

END: Term inates program. NEW: Deletes all lines o f a program. CLEAR: Sets all variables (A -Z ) equal to zero. RUN: Starts execution of program at lowest numbered state­ ment.

LIST: Lists program in memory. OS: Transfers control to user's operating system. Line editing and correction: Typing X s deletes the last character typed. X deletes an entire line. X c stops executing program. Prints: B R E A K A T L L (L L is the line th at was to be executed before the interrupt occurred.) T o delete a line, typ e the line number follow ed by CR. T o change a line, typ e in the line w ith changes. T h e new line w ill replace the old one.

ERROR MESSAGES IE R R L AT X X 1. Label does not exist

D r . D o b b ' s J o u r n a l o f C o m p u t e r C ali s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o P ar k C A 9 4 0 2 5

Page 9

95

2. 3. 4. 5. 6.

Inp u t is over 72 characters. Unrecognizable statement type. Illegal variable. Syntax error. O u t of memory.

altered. Must C A L L , INT

36 3

002

EM MINOL 2.1 SYNTAX A p r. 1976 < line>

= < n u m b e r> < state m e n t> cr | < statem ent> cr = < substatement> * : [L E T |(j>] < var> = < e x p r> PR < exp r-list> [;|

315

00 0 1 1 6 - 0 0 6 377 000 253 L 261 H 001 142 L 143 H

This checks fo r keyboard interrupt ( X c). M IN O L Interpreter Highest m em ory location available fo r M IN O L programs. Address o f user's operating system, or m onitor.

IF < e x p r> < re lo p > < e x p r> ; < statem en t> A ll input te x t is stored at 0 0 6 2 1 0 - 0 0 6 3 2 0 G O TO < e x p r> Free speace is left fo r short strings at 0 0 6 3 3 3 - 0 0 6 377 C A L L < m em lo c> Variables (A -Z ) are stored at 0 0 5 0 0 7 - 0 0 5 042 END RUN 007 0 0 0 + Program storage L IS T Executing MINOL: NEW To start M IN O L and initialize program area, E X A M IN E 0 0 2 35 0, R U N . CLEAR To start w ith o u t initialization, E X A M IN E 0 0 0 0 0 0 , R U N . OS Dear Jim: May 24, 1976 = < d ig it > * 2 < d ig it>

< d ig it> < var> < re lo p >

= ° h i r -ip|9 =A B . . |Y |Z |< m e m lo O

= # = |


< e x p r> < te rm > < lite ra l>

< m em lo c>

< lo w a d r> < ch ar>

= [ lite ra l > | < ex p r> | < str>] [, [ < jite rg l> < e x p r> (< str>] ] * :: = [< var> | < str>] [;[< v a r > |< s tr > ] ] * ::= [< te r m > < a ro p e r> ] * < te rm > ::= < var> I < n um ber> I '< s c h a r> ' ll ::= " < c h a r > * " ::= < char> ::= $ < m em lo c> : := (< highadr>,< low adr>) ::= < n u m b e r> ::= < n u m b e r> ::=any character except " and cr

Notes: < >encloses an element o f M IN O L (f) is the em pty set

I am enclosing the listing of MINOL—manually typed! There are several features of my program, both positive and negative, that I might point out. On the plus side, MINOL uses only 1.75K of memory, including the input-output subroutines (although since writing it I see how I can make it even smaller.) Memory locations of the form (H,L) can be used similarly to one- or two-dimen­ sional DIMs in higher BASIC's. Simple input or output strings are possible by specifying a series of memory locations—of the form $(H,L) where H,L is the first location where characters are to be deposited. I am enclosing three programs to illustrate these features. On the negative side, the program is not designed for arithmetic functions, having no grouping of operations, and being limited to a value of 255. The relational operators are restricted to =, # , and < , although > ("greater than") can be done by reversing the logical expres­ sions. Fewer error messages are provided than usual. MINOL is written completely in machine language without using IL.

* repeat lim ited by length o f line

*2

repeat from 0 to 2 times

MINOL Memory Allocation: (A ll locations are split octal) 0 0 0 0 0 0 - 0 0 0 115 System Reset:

I/O Routines, etc. 00 0 000 061 L X I SP 001 377 002 017

CRLF:

003 004 005 00 6 010

IN P U T :

02 0

OUTPUT:

04 0

Page 10

96

317 RST CRLF 30 3 JMP, M IN O L 116 000 A subroutine to o utp ut a CR follow ed by a LF. Moves a character from input device to the A reg­ ister. Parity equals 1. Must o utp ut an echo check o f the inputted character. O utputs character in the A register. Parity equals 1. No registers m ay be

When I can supply MINOL on a cassette I'll let you know. You might like to know that I am in my third year of high school. Yours truly, Erik T. Mueller Britton House Roosevelt NJ 08555

Additions/changes since the M ay 1st letter: Spaces are ignored:

a. During line/statem ent entry

unless enclosed by quotes. b. When inputting variables. c. When inputting strings if the L address is zero. Spaces are accepted: a. When inputting strings if the L address is non-zero. b. When enclosed by quotes. Instead o f G O S U B /R E T statements, use the follow ing substitute statements to perform the same function: First initialize the GOSUB stack pointer Y ,Z : 2 Y = 1 4 :Z = 2 5 5 (Y and Z are the H ,L address of some free space in memory.) Instead o f a GOSUB statement, substitute the

D r . D o b b ' s J o u r n a l o f C o m p u t e r C a li s th e n ic s & O r t h o d o n t i a , B o x 3 1 0 , M e n l o Park C A 9 4 0 2 5

A p ril,

1976

following: L E T (Y ,Z )= < R e tu rn label> :Z = Z -1 :G O T O < subroutine label>

On a directly-executed IN statement, although the data w ill be correctly stored, an error message may appear after

Instead o f a R E T , substitute:Z = Z + 1 :G O T O (Y ,Z )

its execution. The m onitor gives a J as a prom pt. The gives a "? " unless a senseswitch is up.

Free space is left fo r very

shortuser's strings fro m

0 0 6 3 6 6 to 0 0 6 3 7 7 .

IN statement

Three programs in M IN O L :

3 L IS T 1 0 PR "G IVE ME A SENTENCE" : I N $ ( 1 4 , 1 ) 2 0 PR "STR ING TO SEARCH F O R ? " : I N $ ( 1 4 , 1 0 1 ) 21 A =0 22 A = A + 1 : I F ( 1 4 , A ) # 2 5 5 ; G0T022

23 B=0 24 B =B +1: I F ( 1 4 , 1 0 0 + B )# 2 5 5 ;G 0 T 0 2 4 3 0 C = 1 :D = 1 :S = 0 40 I F ( 1 4 , D + 1 0 0 ) # ( 1 4 , C ) ; G 0 T 0 7 0 50 D = D + 1 : C = C + 1 : IF D < B ; GOTO40 6 0 LETS=S+1 6 5 C=C—1 70 LETD=1 80 C = C + 1 : IF C h 3

E Et­ on) n 03 O ' P

*H o O

CQ D 2 rft ^ t J < ro

*H o O

rH in ro

H *H O o o

► J i

o o

1 P 0 p 0 E p to 0 COp 0 p p 0 TJ TJ >1 03 u

Xi

0

CP §

X

R

0 0 H p ~•H c cm to 0 P H O O CP P H •H *H O •H 0 w X. a o a w o 0 Q O P CO rH C TJ rH -H to•H C ■H ft N- > ft O

to

2 O2

Z O b

2

2 O

O

o O o 't o o O o o o o O fN KOVOO m f'' rm i n oj m orH rH Xuo lO X V O O ro in O •H in r- oin rH o ro rH O in r'J X v O o X OJ rH m *— OH NO i OJ OJ rH OJ ro o Ol ro OJ X Ol ro X OJ Oi VOOi m

OJ

\o

oj

§

yo

8 O

3

oj

8 i n vd

id

3 13

TJ .C rJ to

r H +)

s

cr 0 M 0«

£c *3 gg

«

.oj

8

8 ro

O' m

§83

S

m m i o i N r o i oj

O

r ' r- o O ( f-l ro m

m


* 0 f0 ' ^ invor^ O H f 0 '0 ,H,* r^ or, 1 ,:,' r^ o r nT: f u) H™ n y 3 0 r^ ,3'r^ O ,H O j mi n o m^ u ^ i o r ^ o j m^ r ^ O r H o j r o * i ' rx » l H v £ ) O < N i o o j i 0 C M r H v o r sj v o r o i o v o c > j \ £ > r s' f ^ r r> v £ > c j m o v D r y i v o r s' m r o i n v 0

O H O ' ,i o c o o o t N O O O O O H O H O H O H O H O r ( O H O r i o n H M O ^ O Q n i ,i r i i ,i H ^ n n n n H n ( ,i o n o n n o n n n n n n o i ,i n r ■■ ~ ~ r* rr> ro ro ro ro ro ro ro ro

*

SSSSSSSS

r^r-r't-ooOHrHrHr

8 8 8 8 iiilliill!iiii!lill!lllll!ll? llll? li? ||? lll!i? lliiil||illllllll||? l| 0.

Q

8

s 3d 33* ?ss

H

s

0)

u

g X5

■P

a-

a

+

o V4 ■P

> M f ! ^ ? ! ^ ^ 9 f Hy t Q o y z 'j^ u b w u 2 t o 2 w u u b w u « o c :2 z < S Q b ! 3 2 S O ^ < 2 Q ^ J 3 u b S U S « H a « U

_ Eh o« e

«n O O r* rj- O O oo OO o OO o

vo £h

f-O4

o o o

o o o in vor* CMo

cmeg

O fN

Or-i oo

in o oo oo CMO oo •HO

N H O C t f

o n»hoo oin nr0

xj- mvor-1 ro morviniOhOH(NntjvOH(N' r* o o o OOOO^l” C O o o o o in cm o rtmininininvovovoiovovot^r^i oooooooooooooo< Tf ininin o oo inin o o o o o o o o o inmuTininininminininininini OOOOOOOOOOOOOCM o o o o o o o o o OOOOOOOOOOOOOOt

inO H n

m r*.

•H

oo oo

roo •H 00OOVOO VO rH rHrHrHroro O

o o

o o

^o

CO r - *-i

CM O

oo oo oo Wr'-O0MrHO o rao

£o

0

■P

< 0

DfOi ro r(o D

< 0

E

u

cd

•H W U— o« *

V Ts:> :>s>

O. H B. K D. H D. H 5

o o o o

OJ

^ o o

2‘ vo o< 2wy *j *so

o o ; o < S < n B1K X > ^ ‘tH> OODOUO^O? t> o QSWSIQSUbS (0 £

cj

-oS’

rt

o o

in O O O o

o

o r* vo

r - rH VO m v o om

o *» M

O VO OJ

o s > ;

GJ

o o

a m 25«

JW ••rO HO wP rK Q Q O >03uOKOB.NWte o0000000000000000000 > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

o:

« ; >j f t •w*-2; H < x £* x -E-* xoeh^suhsm Sow

a

J J > ft > > ft ^ ‘ ^ cr X CO o sO X < UI X CO t— < co c r c r UJ X *—4 X c_> Ul h ­ 3 o CO Ul X X t— UJ w o X 1— I-* CO X U l £ CJ CD CO - U CO 1 ft UJ a? 3 c o »-

• >or < ft cn »—♦ _j UJ 7 »—« r— 3 o rr CD 3 to

CL 3: 3 *->

• O •

cd

o o

_J < »CJ o

>CD 2 5—S C UJ > -J f t -J O