(navigation image)
Home American Libraries | Canadian Libraries | Universal Library | Community Texts | Project Gutenberg | Children's Library | Biodiversity Heritage Library | Additional Collections
Search: Advanced Search
Anonymous User (login or join us)
Upload
See other formats

Full text of "80 Microcomputing Magazine September 1980"

September 1980 
USA $2.50/DM 9. 




'Tandy Shoots 
Back with Three 
New Computer 

Inside 80 gives you 
the breakdown on 
Tandy's newest 
market entries: 



• THE COLOR 
COMPUTER 

• THE POCKET 
COMPUTER 

• THE 
MODEL III 
Page 10 



microcomputing 

the magazine for TRS-80 users 








Plus: 

More than 30 a. 
Complete conte 




mi 



or Comes 
o^andy 



rademark of the Tandy Corp. 



TRS-80* Model I Computer Owners 



Store More Data 

on a 5 '-Disk 

Than on an 8 -Disk 



i-ltf 



•,:«»-~. 





The Doubler 1 ': Percom's new 
proprietary double-density 
adapter for the TRS-80* com- 
puter. 



Plug the DOUBLER ™ into the 
disk controller chip socket 
of your Expansion Interface 
and . . . 



Store up to 354 Kbytes of formatted data on five-inch disks. 



• Increase formatted storage 
capacity of your minidiskettes from 
1 V-2 to almost 4 times. 

• Use with standard 5-inch drives 
rated for double-density operation. 

• The DOUBLER IM reads, writes 
and formats either single- or double- 
density disks. 

• Proprietary design allows you to 
continue to run TRSDOS*. NEW- 
DOS?, Percom OS-80'" or other 
single-density software without 
making any changes to software or 
hardware. 

Mini-Disk Systems 
More storage ca- 
pacity, higher re- 
liability — from Per- 
com, the industry 
leader. One-, two- 
and three-drive configurations in 
either 40- or 77-track format, start- 
ing at only $399. 

PRICES AND SWOFICATIONS SI 1BJK I louiwc.l WiTHOI I NOTICL. 




• Includes DBLDOS.™ a 
TRSDOS* compatible double- 
density disk operating system. 

• CONVERT utility, on DBLDOS 1 ' 
minidiskette, converts files and pro- 
grams from single- to double-density 
or double- to single -density. 

• Plug-in installation: No strap- 
ping. No trace cutting. Restore your 
Expansion Interface disk controller 
to original configuration by simply 
removing the DOUBLER ,M and re- 
installing the original disk controller 
chip. 

I T 

| PERCOM DISCOUNT COUPON | 



I 



worth $20 

toward 

The Purchase of a 

DOUBLER™ 

Coupon No. 80M103 

Expires December 30. 1980 

Void where prohibited by law. 




• The DOUBLER™ 
circuit card includes 
high-performance 
data separator, write 
precompensation cir- 
cuits for reliable disk read operations 
— even on 77-track drives. 

Introductory price, including 
DBLDOS™ and format conversion 
utility on minidiskette, only $219.95. 
Use the coupon for even greater 
savings. 

Call toll-free, 1-800-527-1592, 

for the address of your nearest 
dealer, or to order direct from Per- 
com. 

i Mm OS HD • operating ty*t«m 




PERCOM DATA COMPANY, INC. 

;'11 N KIHHY GARLAND. TEXAS 75042 
1214)272-3421 



*" trademark o( P»rcom Data Compoi 

• track-mark <>» Tandy Radio Shack Corporation which ha» no relationship to Percom Data Company 
t trademark or Apparat Comp.r 




The easiest, least expensive way to generate 

spectacular multi-color graphics, sharp two-color alphanumerics: 

Your computer, a color tv set and the Percom Electric Crayon™. 



Add the Electric Crayon™ to your 
system and your keyboard be- 
comes a palette, the tv screen 
your medium. 

You dab and stroke using one- 
key commands to create dazzling 
full-color drawings, eye-catching 
charts and diagrams. 

Or you run any of innumerable 
programs. Your own BASIC lan- 
guage programs that generate 
dynamic pyrotechnic images, 
laujjh-provoking animations. 

From a combined alphanu- 
merics-semigraphics mode to a 
high resolution 256- by 192- 
element full graphics mode, the 
microprocessor-controlled Electric 
Crayon™ is capable of generating 
10 distinctly different display 
modes. 

Colors are brilliant and true, and 
up to eight are available depend- 
ing on the mode. 

As shipped, the Electric Crayon'" 
interfaces a TRS-80* computer via 
your Expansion Interface or Printer 



u»i 



Adapter. It may be easily adapted 
for interfacing to any computer or to 
an ordinary parallel ASCII keyboard 

But that's not all 

The Electric Crayon is not just a 
color graphics generator/control- 
ler. 

It is also a complete self- 
contained control computer With 
built-in provision for 1K-byte of 
on-board program RAM, an 
EPROM chip for extending EGOS™, 
its on-board ROM graphics OS, 
and a dual bidirectional eight-bit 
port — over and above the com- 
puter/keyboard port — for 
peripherals. The applications are 
endless. 

Shipped with EGOS™. 1K-byte of 
display memory and a com- 
prehensive user's manual that in- 
cludes an assembly language list- 
ing of EGOS™ and listings of 
BASIC demo programs, the Elec- 
tric Crayon™ costs only $249.95. 



Options include: 

• LEVEL II BASIC color 
graphics programs on 
minidiskette: $17.95 

• A 34-conductor ribbon 
cable to interconnect the Elec- 
tric Crayon™ to a TRS-80*: 
$24.95. 

• RAM chips for adding re- 
fresh memory for higher den- 
sity graphics modes: $29.95 
per K-byte. 

• Electric Crayon™ 
Sketchpad, a sketching grid 
of proportioned picture ele- 
ments (pixels) in a tv aspect 
ratio. For 128 x 192 or 256 x 
192 graphics modes. 11 -inch 
by 17-inch, 25-sheet pads: 
$3.95 per pad. 

SYSTEM REQUIREMENTS the video cir- 
cuitry of the Electric Crayon™ provides di- 
rect drive input to a video monitor or mod- 
ified tv set An internal up-modulator for rf 
antenna input may be constructed by add- 
ing inexpensive components to the existing 
video circuitry. 

P"ces and specifications suttee! to cnange without notce 




PERCOM DATA COMPANY. INC 

811 N KIRBV GABLANO TEXAS 7504? 
12141 272 3421 



'" = trademark of Percom Gala Company, inc 

• = trademark of Tandy Rado Snack Corporation when has no relationship to Percom Data Company 

Get into computer color graphics the easy, low-cost way with a Per- 
com Electric Crayon™. Available at Percom dealers nationwide. Call 
toll-free, 1-800-527-1592, for the address of your nearest dealer, 
or to order direct if there is no Percom dealer in your area. 



META TECHNOLOGIES 

FOR YOUR TRS-80® DISK SYSTEM 



i.i : 



MTCAIDS- 



• 



MODEL I . . $69.95 MODEL II . . $99.95 

Introducing the latest addition to MTC's family of data management systems. AIDS III NO 
PROGRAMMING easy to use COMPLETE PACKAGE including demonstration application, 
documentation and MAPS III (see below). 

• Up to 20 USER DEFINED FIELDS ol either numeric or character type 

• CHARACTER type fields may be any length (total up to 254 characters) 

• NUMERIC type fields feature automatic formatting, rounding, decimal alignment and 
validation 

• Full feature EDITING when adding or changing records 

ENTER FIELD ican't type in more character* than specified) 
BACKSPACE (delete last character typed) RIGHT JUSTIFY FIELD contents 

DELETE FIELD contents SKIP FIELD (to next or previous field) 

RESTORE FIELD contents SKIP RECORD (to next or previous record) 

• SORTING of records is MACHINE CODE assisted 

200 RECORDS (40 characters) in about 5 SECONDS 

ANY COMBINATION of fields (including numerics) with each field in ascending or 
descending order 

• SELECTION of records for Loading. Updating. Deleting. Printing and Saving is 
MACHINE CODE assisted 

Specify up to 4 CRITERIA, each using one of 6 RELATIONAL COMPARISONS 

LOAD or SAVE selected records using MULTIPLE FILES 

Example Select records representing those people who live in the state of Col 

orado, but not in the city of Denver, whose last names begin with "F" 

and whose incomes exceed $9000.00. 
Example Select records representing those sales made to XYZ COMPANY that 

exceed $25 00, between the dates 03 15 and 04 10 

MAPS III (MTC AIDS PRINT SUBSYSTEM) included at no charge, has the following features 

• Full AIDS III SELECTION capabilities 

• Prints user specified fields DOWN THE PAGF 

• Prints user specified fields in titled columnar REPORT FORMAT, automatically 
generating column headings, paging and (optionally) indentation 

• Can create a single report from MULTIPLE FILES. 

• Prints user defined formats for CUSTOM LABELS, custom forms, etc 

BELOW ARE TESTIMONIALS from owneisof AIDS systems These are absolutely authentic 
statements and are typical of the comments we receive 

"This program will do more for my business than all the other programs I 
have, combined " 

David Wareham. Vice President (EDP) National Hospital and Health Care Services Inc 

"We have 32 different Data Base Management packages for the TRS-80 AIDS III is easily 
the best. It also makes it easier for us to step up to our Model II since the package is 

available for both computers." . _ . _ , __ .. _ 

Jack Bilinski. President 80 Microcomputer Services 

"Your AIDS program is far and away the finest information management system that I've 
ever seen I am currently using it to maintain a clear picture of the demographic data on all 
the kids in our residential treatment program and it is working for me superbly." 

Frank Boehm. Director Front Door Residential Treatment Program 

• COMPATIBLE with AIDS II data files and AIDS subsystems 

• Move up from AIDS II and EXPAND to 20 field capability WITHOUT REENTERING 
DATA 

• AIDS II (Model I or II) owners may UPGRADE FOR ONLY $25 00 

WARNING' This program is written in BASIC and can be listed in the normal manner 
Mod fKal on of program codfl >s NOl PI COMMENDED due to its extreme complexity 



MTC AIDS - II 

Ailing information? Doctor it up with aids II 
This Automated Information Directory System 
offers twelve user defined fields with full feature 
editing when adding or changing records Selec- 
tive Loading, Updating, Deleting, Printing and 
Saving records may be accomplished using any 
of six relational comparisons Also features 
machine code assisted sorting (200 records in 
about 5 seconds) by any combination of fields, 
and much more! Unique "windowing' capability 
aWows directories of unlimited size Window sue 
is typically 200 or more records in 32K. Can be 
used for mailing lists, client reference reporting, 
appointment "calendars' . inventory records and 
other information systems Easy to use Defining 
a system takes about a minute MAPS I (MTC 
AIDS PRINT SUBSYSTEM) is included at no 
charge MAPS features full AIDS II selection 
capabilities, prints user specified fields down the 
page, produces user-specified columnar report 
formats with automatically generated column 
headings and paging, and allows user defined 
print formats for custom forms, labels, etc Add 
subsystems for additional capabilities May be 
upgraded to AIDS III when required. 

MTC AIDS-II $ 49.95 

For Model II $ 79.95 



AIDS 

CALCULATION SUBSYSTEM (CALCS) 

MTC's most popular AIDS subsystem Use for 
report generation involving baste manipulation 
of numeric data. Prints user specified fields in 
titled, columnar report format, automatically 
generating column headings, pacing and (op- 
tionally) indentation Features full AIDS III selec- 
tion capabilities and can create a single report 
from multiple files Provides the additional 
capabilities of user specified balance forward 
computations, columnar subtotals, columnar 
totals and user defined computations (allows 
multiplication, division addition and subtrac 
tion of field values and constants) Features may 
be used in combination. For example, the 
calculation of a user defined quantity cost col- 
umn may simultaneously be listed by itself, used 
as part of a balance forward computation and as 
part of either (or both) a columnar subtotal or 
columnar total Use for accounting, inventory, 
financial and other numeric based information 
systems. 

MTC CALCS $24.95 

For Model II $ 39 95 



MORE 



PRODUCTS ON PAGES 6 & 7 



All products 

guaranteed for 

replacement only 

Prices. Specifications & 

Offerings subiect to 
change without notice. 


MOST ORDERS 

SHIPPED 

WITHIN ONE 

BUSINESS DAY 


QUANTITY 

DISCOUNT 

INQUIRIES 

INVITED 


WE ACCEPT 

• VISA 

• MASTER CHARGE 

• CHECKS 

• MONEY ORDERS 

• COD 


• Add $2 50 for 
standard UPS 
snipping & handling 

• $2 00 EXTRA 
for COD 

• Ohio residents 
add 5 :"o sales tax 


y — . TO ORDER CALL TOLL FREE 

/ih 1-800-321-3552 

V * I/tA / IN 0HI ° ca " (216)289 7500 (COLLECT) 


96 








RS 




\ / \ / 


■ 11- II 1 ll-LJI III 

26111 Brush 


HI lH.il i l—JL 

i Avenue. Euclid, 


Ohio 44132 *«» 


HMO** ■ 


• 


)730 

J 



80 Microcomputing. September 1980 



\ff Q microcomputing | DATA 



September 198( 



*') 



APPLICATION 

162 Doctor Your Records From one who knows. Wilbur A. Muehlig, M.D. 

174 Mind Your A's & P's Super marketing fantasy. Lois L. Leonard 
BUSINESS 

212 Down the Road Maximize your profits. Bill Vick 
DATA MANAGEMENT 

146 Reference Library Index An easy method. James P. Morgan 
EDUCATION 

124 Kidstuff For children only. Dan Keen and Dave Dischart 

182 Music Note Recognition Orchestra, ready? J. David McClung 

216 Ping-Pong Better than the original. Ronald Moehlis 

58 A Bout with the I.R.S. How the 80 won. Fred Blechman 
187 BINAX KIBUFF Entering ROM. John T. Blair 
208 The "Next" Trap How to escape it. Hubert C. Borrmann 
HARDWARE 
84 Teletype Interlace Versatility plus. Jake Commander 

Selectric Hard Copy Put it to use. Michael W. Bickerton, M.D. 
Build Your Own Port Then take off. James S. Hawkes/Reese Grady 



102 
116 
MAT 
170 



Divine Proportions Beautiful graphics. David R. Cecil 



154 Eloquent Eighties Tandy's machine. Jim Wright 

188 Variations on a Theme Deal with PRINT like a pro. George R. Bullitt 
TUTORIAL 

50 Into the 80's A beginning for beginners. I.R. Sinclair 

62 Pulling Strings Together Learn to manipulate. John D. Adams 

138 My Way May be better than your way. Robert V. Meushaw 

152 Stringy Machine Code How to pack it. David D. Grimes 

158 Math Flash Want to add and subtract? Jim Barbarello 

178 An Article Called Intrepid For secret agents. Buzz Gorsky 
UTILITY 

68 Free Space Beat your SYSTEM. David Cornell 

76 Uni-key Cut down entry time. Rowland Archer, Jr. 

88 Document Those Variables Save time and space. William Noel 

94 Printer Calibration Perfect alignment. L.O. Rexrode 

98 Versatile Input Input data with ease. Tim Wilde 

150 Position Display Look professional. Jerry Frost 

168 Delay Loop Waste time. Allan S. Joffe 

173 Walking Words Be sure to catch this one. Hubert C. Borrman 

192 Beyond Shell Metzner Sort with authority. Doug Walker 

196 Deflower your Debug Without reprisals. Donald C. Walker 

202 Slow Scroll For slow readers. Peter A. Lewis 

206 QWIKDISK Cut your access time. Bruce Nazarian 

210 The Competition's Cursor How to get it. R. Daniel Bishop 



8 Remarks Wayne Green. 28 

10 Inside 80 Ed, luge 28 

12 80 Input 36 

20 Reviews Emily Gibbs 42 

26 80 Accountant Michael Tannenbaum 44 



Education 80 Earl R. Savage 
80 Applications Dennis Kitsz 
The Assembly Line William Barden 
80 News Nancy Robertson 
New Products 



PUBLISHER/EDITOR 
Wayne Green 

MANAGING EDITOR 
Michael Comendul 

TECHNICAL ADVISOR 
Jake Commander 

PRODUCTION EDITOR 
Clare McCarthy 

NEWS EDITOR 
Nancy Robertson 

REVIEW EDITOR 
Emily Gibbs 

ASST. TECHNICAL EDITOR 
Chris Brown 

EDITORIAL ASSISTANTS 
Debra Marshall 
Thomas Peabody 

EDITORIAL ADMINISTRATION 
Cresca Clyne 
Nancy Noyd 

DESIGN ASSOCIATE 
Diana Shonk 

DIRECTOR OF MANUFACTURING 
Noel Ray Self 

ASST. DIRECTOR OF MANUFACTURING 
Dion Owens 

ADVERTISING PRODUCTION 

Robert Drew, Bruce Hedin. John White 

MAKE-UP 

Michael Murphy. Steve Baldwin. Linda Drew. 
Kenneth Jackson. Ross Kenyon. Bob Sawyer, 
Patrice Scribner, Sue Symonds 

PHOTOGRAPHY 

William Heydolph, Terrie Anderson, Tedd CM! 

TYPESETTING 

Barbara Latti, Sara Bedell. Linda Locke 

PUBLISHER 
Wayne Green 

ASSOCIATE PUBLISHER 
Edward Ferman 

ASSISTANT PUBLISHER 
Jed DeTray 

EXECUTIVE VICE PRESIDENT 
Sherry Smythe 

CORPORATE CONTROLLER 
Alan Thulander 

ADVERTISING MANAGER 
Kevin Rushalko 
CIRCULATION 
Debra Boudrieau 

EXECUTIVE ASSISTANT 
Leatrice O'Neil 

BULK SALES MANAGER 
Ginny Boudrieau 

ADVERTISING SALES 
(603) 924-7138 
Penny Brooks 
John Gancarz 



Manuscripts are welcome at 90 Microcomputing, we will consider publication of any TRS-8C oriented material Guidelines lor budding authors are available, please send a self- 
addressed envelope and ask for "How to Write for 80 Microcomputing." Entire contents copyright 1960 by 1001001 Inc. No part of this publication may be reprinted, or reproduced 
by any means, without prior written permission from the publisher. All programs are published for personal use only All rights reserved. 

80 Microcomputing (ISSN #0199-6789) is published monthly by 1001001 Inc., 80 Pine Street, Peterborough, NH 03458. Application to mail second class postage rate is pend- 
ing at Peterborough, NH 03458 and at additional mailing offices. Phone: 603-924-3873. Subscription rates in the US are $18 for one year and $45 for three years. In Canada. 
$20— one year only, U.S. funds. Foreign subscriptions (surface mail), $28— one year only, U.S. funds. Foreign subscriptions (air mail), $60— one year only, U.S. funds In 
Europe please contact Monika Nedela, Markstr 3. D-7778. Markdorf, W. Germany In South Africa contact 80 Microcomputing. P.O. Box 782815. Sandton, S Africa 2146. 
Australian Distributor Electronic Concepts, Rudi Hoess. 55 Clarence Street. Sidney 2000. Australia. All US subscription correspondence should be addressed to 80 
Microcomputing. Subscription Department, P.O Box 981, Farmingdale. NY 11737 Please include your address label with any correspondence Postmaster Send form 
•3579 to 80 Microcomputing, Subscription Services P.O. Box 981, Farmingdale, NY 11737. 



TRS-S0 H a trade m ark of the Tandy C u i p e t— ■ ■■ 



80 Microcomputing, September 1980 • 5 



META TECHNOLOGIES 



• • • CUSTOMER APPRECIATION MONTH • • • 
TO OUR THOUSANDS OF CUSTOMERS WE WANT TO SAY 

THANK 
YOU! 

TEAR OUT AND MAIL US THIS AD PAGE AND $19.80 (plus shipping & handling) 
and receive 1 Box of 10 VERBATIM single-sided, single-density, soft-sectored 
MD525-01 Diskettes; exactly the same as our regularly priced ($23.95) diskettes. 

READ THIS CAREFULLY 

Include $2 50 (or shipping & handling Ohio residents add $1.09 sales tax Diskettes will be 
shipped ONLY by standard UPS. with NO deliveries to PO Box addresses NO phone 
orders, purchase orders or CO D orders will be accepted Actual ad page from this 
magazine MUST accompany order NO facsimiles will be accepted VISA and MASTER 
CHARGE will be accepted for payment (make sure cardnumber is correct) Order may in 
elude other products (these orders will be processed first) U S orders only NO foreign 
orders. Our special apologies to our Canadian friends, but customs and shipping difficulties 
prevent us from including you Orders MUST be postmarked between Sept 1. 1980 and 
Sept 30. 1980, mclusive-NO EXCEPTIONS Shipping label MUST be complete Orders will 
be refused and returned, in their entirety, if they are incorrect in ANY way Allow 2 to 4 
weeks for delivery Offer limited to ONE ad page special per order 
Mail to: META TECH CORP.. DEPT. CD. 26111 Brush Ave.. Euclid. OH 44132 



MC VISA NO 

Signature 



fc.p Dale. 



JL 



mTc-SHIRTS 

HIGH-QUALITY. POLY COTTON 
BLEND T-SHIRTS. White with Navy Blue 
neck and sleeve ringers MTC logo on sleeve 
Top quality transfers of your choice on front 

Specify size (S .M L XL.) and Transfer 
. META TECHNOLOGIES MAKES EVERY BYTE 
COUNT! 

• DON T TOUCH MY BITS' 

I I I I I I o 

• RAM it! 

• MICRO LOVERS TAKE SMALLER BYTES! 

mTc SHIRTS $4.95 



Apparat. Inc. introduces 

NEWDOS/80 

Apparat s long awaited successor to NEWDOS+ 
is here 1 This is not an enhanced version of 
NEWDOS. but a completely new product 
Simplified DOS commands can be instantly ex 
ecu ted from BASIC, even within a program, 
without disturbing the resident code System op 
lions such as password protection number and 
type of disk drives, BREAK key enable. disable 
arid lowercase modification recognition, can be 
quickly and easily changed Five new random 
access file types allow record lengths of up to 
4096 bytes, and no FIELDing 1 A powerful CHAIN 
facility allows keyboard INPUT s to be read from a 
disk file An improved RENUMBER facility per 
mits groups of statements to be relocated within 
program code Diskettes may even be 
designated as RUN ONLY 1 Features all 
NEWDOS* utilities (SUPERZAP 30 etc ) and 
much more! One MTC technical staff member 
said having NEWDOS'80 is "better than sex" 
(you'll have to judge for yourself 1 ) Includes 
180 page instruction manual and MTC QUE 
card 

NEWDOS'80 $ 149 95 

CALL REGARDING OUR NEWDOS+ UPGRADE 
PRICING 



s PRINT CAREFULLY! THIS WILL BE YOUR SHIPPING LABEL' 








'. '■ '• . ; 





• PRODUCT PREVIEW • 

Random File Sort 
This product will provide a very powerful high- 
speed sorting capability for use either as part of 
an application system, or as a separate utility. 
Implemented as a combination of BASIC and 
machine language, it will otter flexibility, conve 
nience, and high performance Features will 
include 

• Ability to select' records to be included in 
the sort. Selection comparisons may be done 
against literal values or other fields in the 
record 

• Multiple selection fields may be specified to 
achieve selection using complex conditional 
relationships 

• The sorting key may contain many fields of 
any combination in ascending or descending 
order 

• All available memory is utilized lor higher 
performance. Sort and Merge operations ate 
performed in machine language 

• Can be linked into a system by specifying the 
BASIC program to be run when sort isfmished 

• Automatic deblocking of random files with 
multiple logical records in each sector. 



MORE 



PRODUCTS ON PAGE 4 



Let Your TRS-80" Test Itself With 

THE FLOPPY DOCTOR & 
MEMORY DIAGNOSTIC 

by THE MICRO CLINIC 

A complete checkup for your Model I THE FLOP 
PY DOCTOR completely checks every sector ot 
35 or 40 track disk drives Tests motor speed 
head positioning, controller functions, status bits 
and provides complete error logging. THE 
MEMORY DIAGNOSTIC checks lor proper 
write read, refresh, executability and exclusivity of 
all address locations Includes both diagnostics 
and complete instruction manual 
SYSTEM DIAGNOSTICS $19.95 



Transfer PROGRAMS and DATA 
from MODEL I to MODEL II 

TRAN-SEND 



$49 95 



by MTC 



Requires MODEL II and MODEL I with disk & 
RS 232 Simple to use not a kit nothing else to 
buy Complete with custom cable. 5 • . " & 8 flop 
pies, instructions. May be used over phone lines. 

Custom Cable only $19.95 

Radio Stuck* funster piuciwxACt 0131) 



MAKES EVERY BYTE COUNT 

IN YOUR TRS-80* MODEL I OR MODEL II DISK SYSTEM 



PROGRAMMING SAVE && 



For Model II $74.95 



I Single sided. Single density. Soft sectored 

DISKETTES 



TDAM $19.95 

For Model II $29.95 

Includes MTC QUE Card! 

Having trouble with RANDOM FILES 7 With MTC's 
Table Driven Access Method (TDAM) you'll never 
fret over FILL Ding again No knowledge of 
random access files is required Insert the TDAM 
"interpreter into any BASIC program and type in 
a few DATA statements describing the information 
in your files TDAM does the rest 1 Reads and 
writes fields and records of any type (even com- 
presses a DATE field into 3 bytes') Features 
automatic file buffer allocation deallocation, 
memory buffering, sub record blockingde 
blocking, jnd handles up to 255 fields per record 
Super fast and super simple' Complete with 
TDAM interpreter instructions and demo pro 
gram Requires programming experience 



SIFTER $19 95 

For Model II $29,95 

Twelve in memory high speed sorts for use in any 
BASIC program stable non stable, with, without 
tags for numeric or string data Random File 
Sort included Some sorts written in machine 
code Includes sort subroutines, demo programs 
and instructions Relocate as needed with 
REBUILD Requires programming experience. 



A 



SHRINK $19.95 

For Model II $29.95 

Makes Every Byte Count' Make programs 
smaller and taster' Combines lines & removes un- 
necessary code including remarks, without alter- 
ing program operation. Typically reduces pro- 
gram sue 25% to 40%. 



DIVERGE $19.95 

For Model II $29.95 

Compares two BASIC program tiles, showing the 
differences between them Identities & lists lines 
which have been inserted deleted, & replaced 
Use for version control 



SUPERSEDE $19 95 

For Model II $29.95 

A "must have" tor the professional programmer 
or the serious amateur. Probably one of the 
greatest time savers available Write programs in 
shorthand change variable names generate 
program documentation use with REBUILD and 
MINGLE to build new programs from old ones 



Verbatim 5 4 inch 

$23 



95 

Box Of 10 



Quantities of 10 boxes (each) $22.95 

Hard sectored (10 holel Box of 10 $26 95 

8-inch FLOPPIES 

Single density Box of 10 $29.95 

Double density Box of 10 539 95 

PLASTIC LIBRARY CASES 
5 '.-inch or 8 inch diskette case . ... 53 00 
50 (5' 4 inch) diskette file box $19.95 

FACTORY FRESH ABSOLUTELY FIRST QUALITY 
Minimum order 1 box. NO order limit! 



I 



REBUILD $19.95 

For Model II $29.95 

Reorganize programs lor adding program code, 
faster execution readability Much more than sim- 
ple renumbering Rearran ge groups of statements 
within a program automatically updates 
references to line numbers Use with 
SUPERSEDE and MINGLE for maximum effect 



MINGLE-II $19.95 

For Model II $29.95 

Merge up to 14 files (Program or Data) into a 
single tile Data tiles may be merged In .isc ending 
or descending sequent e with the ordering based 
on a user specified comparison field A very han 
dy utility lor consolidating data files 



Complete for Model I with all utilities 
Plus exclusive MTC QUE card! 

NEWDOS + 

CAQ95 

*P \J 7 °y Apparat 

40 TRACK VERSION $ 79.95 

includes REF. RENUM. SUPERZAP. EDITOR' 
ASSEM . DISASSEM , DIRCHECK, and more' This 
is the original NEWDOS with all of Apparat s utility 

jrograms Includes exclusive MTC QUE (Quick User 

Education) card. 

MTC QUE Card only $1 50 



Let Your TRS-80" Teach You 

ASSEMBLY LANGUAGE 
DISK I/O TECHNIQUES 

REMSOFT does it again! REMDISK 1 is a concise, 
capsulated supplement to REMASSEM 1. Package 
consists of two 45 minute lessons on audio casset 
tes and display programs providing illustration 
and reinlorcement Provides specific track and 
sector I techniques and sequential and random 
file access methods and routines 

REMDISK 1 $29.95 



All products 

guaranteed for 

replacement only. 

Prices. Specifications & 

Offerings subject to 
change without notice 



T 



i 



Let your TRS-80 Teach You 

ASSEMBLY 
LANGUAGE 

REMSOFT s unique package. INTRODUCTION 
TO TRS-80 ASSEMBLY PROGRAMMING in 
eludes ten 45 minute lessons on audio cassettes, a 
display program lor each lesson providing illustra 
tion & reinforcement, and a text book on TRS-80 
Assembly Language Programming Includes use- 
ful routines to access keyboard video printer and 
ROM Requires 16K Level II Model I 

REMASSEM 1 $69 95 



The perfect supplement for your 
NEWDOS. from IJG, Inc. 

"TRS-80 DISK AND 
OTHER MYSTERIES" 

by Harvard C. Pennington 

132 pages written in PLAIN PNGUSH parked with 
HOW TO information with details examples and in 
depth explanations Recover lost files and direc 
tones remove file protection, make BASIC pro 
grams unhstable How to use SUPERZAP recover 
Irom DOS errors and MORE' 

TRS-80 DISK $19.95 



MOST ORDERS 

SHIPPED 

WITHIN ONE 

BUSINESS DAY 



QUANTITY 

DISCOUNT 

INQUIRIES 

INVITED 



d k 



WE ACCEPT 

• VISA 

• MASTER CHARGE 

• CHECKS 

• MONEY ORDERS 

• COD 



• Add $2.50 for 
standard UPS 
shipping & handling 

• $2.00 EXTRA 
for C D 

• Ohio residents 
add 5 "-. % sales tax 




TO ORDER CALL TOLL FREE 

1-800-321-3552 

IN OHIO call (216)289 7500 (COLLECT) 

Meta Temlilligjes Clwl™tj[]m 

26111 Brush Avenue. Euclid. Ohio 44132 .*» 



V7V-1 



t'tdrtrub -t Undi U»P 



530 REMARKS 

^^ ^^ hv Wavnfi Green 



by Wayne Green 



'"When Radio Shack announced 

the TRS-80, Ed must have been 

one of the first to appear 

at their door to get one. " 



Here Come de Juge 



For many years, one of the top ham stores 
in the Southwest was Juge Electronics in 
Fort Worth. Thus, I've known Ed Juge for 
many years, as a ham and as an advertiser in 
my 73 Magazine. 

In mid- 1975, my frustration with trying to 
understand and select a computer for han- 
dling magazine subscriptions led me to micro- 
computers. From this interest I developed a 
plan to put out a magazine for computer hob- 
byists. Thus was born the idea for Byte 
magazine. 

Once I had located someone to edit the new 
magazine, there followed a frantic five-week 
period getting the first issue ready to print. 
Details such as designing and printing the let- 
terhead and envelopes, composing subscription 
letters, writing possible authors, getting mailing 
lists from firms in the business, getting in 
touch with all of the clubs and their newsletter 
editors, etc., were almost endless. 

Then, once the first issue was out, 1 grabbed 
a bunch of copies and flew to visit the major 
firms in the business to show them my new 
magazine and get their support. I visited Mits, 
the pioneer microcomputer firm, then Sphere. 
On my way down to San Antonio to see 
Southwest Tech, 1 stopped off in Dallas and 
drove over to Ft. Worth to say hello to Ed 
Juge. I talked with Ed enthusiastically about 
the future and what I saw as an industry which 
would have to grow very rapidly. 

Apparently my enthusiasm did the trick, 
for Ed quickly sent away for an Altair and 
started in microcomputing. When Radio 
Shack announced the TRS-80, Ed must have 
been one of the first to appear at their door to 
get one. By this time he was out of the ham 
business. 

The ham business was a real bummer dur- 
ing the 1964-1974 period, as a result of a pro- 
posal by the American Radio Relay League to 
change the ham regulations in a way that 
would take enormous frequency bands away 
from most hams. Sales of ham gear dropped 
to about 15 percent of their previous level and 
about 75 percent of the ham stores around the 
country quit the business. Not long after my 
visit, Ed got fed up with the slow ham sales 
and with most of the ham manufacturers go- 
ing out of business (we lost Hallicrafters, Na- 
tional, Hammarlund, Barker & Williamson, 
Johnson, Harvey Wells, Multi-Elmac, World 
Radio, Galaxy — virtually every major ham 
manufacturer) and folded up his ham busi- 
ness. For a while he was manufacturing a fold- 
away mobile mount for car antennas and do- 



ing well. But the micro bug had bitten. 

It didn't take very long for Radio Shack to 
discover this sharp chap right in their 
backyard. Eventually Radio Shack lured Ed 
out of retirement and made him director of 
computer merchandising. That was one of the 
wiser moves made by Radio Shack. Ed is one 
of the reasons that Radio Shack has been able 
to move a bit faster than most of the other 
firms in the field. 

I'm happy to have Ed writing a column for 
80 and thus give all of us TRS-80 owners a 
look at what is happening in that otherwise 
very secretive Tandy Tower in Forth Worth. It 
will be a relief to get some honest information 
on what is happening and what may be in the 
works. The general tendency of large firms is 
to deny all rumors up until a new product is 
ready for sale. This is frustrating, particularly 
in a fast moving field such as microcomput- 
ers. 



Tandy in Europe 

Just in case you are under the impression 
that Tandy is not pushing hard in Europe, 
here is the back cover of their recent catalog 
distributed in the Netherlands. That price 
translates to about S855 in U.S. funds at the 



current rates, not a lot more than the U.S. 
price, considering the problems of shipping, 
duty, service and other distribution costs. 

We stopped to visit a major Tandy store in 
Rotterdam and sure enough, they had a 
TRS-80 on display. We talked with them 
about getting some of our TRS-80 programs 
translated into Dutch and they put us in touch 
with a local programmer who was most inter- 
ested. I think we'll be coming out in one more 
language in short order, if anyone wants to 
brush up on his Dutch. 

The Belgian price translates to about $866 
at the current exchange rate, again a very 
reasonable price for the system when you 
figure all the expenses involved in supporting 
the system in a small country like that. The 
problems are somewhat simplified by the use 
of French in the catalog, but I suspect that 
most programs are still in English. 

As we were driving through a very small 
town in Belgium, Malmedy, about the size of 
Peterborough, N.H. (population 5,000), 
Sherry spotted the Tandy store and we 
stopped. 

We had a pleasant visit with the chap run- 
ning the store and found that even in a town 
this small he was selling an average of two or 
so TRS-80 systems a month! We showed him 
some of the Instant Software packages we had 

Continue to page II 



Tandy 's Catalogs Distributed in the Netherlands and Belgium 



VS-80 




8 • 80 Microcomputing, September 1980 



SPECIAL DELIVERY with EXTRACT 

A 100% Machine Language Word Processor a 



TRS-80® + Electric Pencil® or Radio Shack's Scripsit 



We can't stop improving and expanding the capabilities of your 
TRS-80*! By using SPECIAL DELIVERY with EXTRACT and either 
Electric Pencil" or Radio Shack's Scripsit" you can get even more 
out of your computer. From just one package, you will get all this: 



MAILFORM: Create MAILHLE: The 
ONLY complete name and ad- 
dress list entry/editor program 
written in machine language. 
Instant search on any field, 
complete cursor control, just 
till in the form! 

MAILRITE: Print letters written with 
either the Electric Pencil" or 
Radio Shack's Scripsit" insert- 
ing information from a MAIL- 
FILE into the letter for person- 
alizing and addressing. You 
can send a personalized letter 
to one person then a different 
personalized letter to a second 
person with true typist quality 
from your fine printer. Fea- 
tures: Indents, Underscore, 
Bold Type, End of Page Stop, 



Address Envelopes, unlimited 
insertion from address list and 
More! 

EXTRACT: Take out information 
from MAILFORM, the ma- 
chine language mailing list. 
Find the names you need by 
Zip Code, Street Address, 
Gender, Age or any other way! 

SORT: In-Memory sort on an entire 
address list using any field as 
the key. This program can sort 
an entire list in a matter of 
seconds! 

LABEL: Prints labels from MAILFILE. 



CONVERT: Make 
RS mail list. 



MAILFILE from 



SPECIAL DELIVERY will run on your TRS-80" with TRSDOS," NEWDOS" or any 
other TRS"-like DOS. 

If you bought SPECIAL DELIVERY from us, send us the disk and we will update 
it to include EXTRACT for S25. If you haven't already taken advantage of our 
SPECIAL DELIVERY program, we'll send you the complete program including 
EXTRACT for just $125 (Disk). We can also send you the Electric Pencil " for $150. 



MOD II version now 

available. Intro, price 

$275.00 



^42 




Software Etc . . . 
1839 Chamberlain Drive 
Carrol Iton, Texas 75007. 
Phone Orders: (214(492-0515 



Demand a Demonstration from vour local Dealer or write for a brochure of our complete line of tine software 



INSIDE gO 

by Ed Juge, director of ^^ ^^ 

computer merchandising, Tandy Radio Shack 



4 To those among you who 

didn V //** TRS-80 's modular 

design, and said we aren V 

responsive to our customers — 

may you byte your tongues. ' ' 



Since 1 promised last month to tell you about 
some new products, you're expecting me to 
finally admit the TRS-90 rumor, aren't you? 
We heard so much about that here in Fort 
Worth that we almost used TRS-90 as a code 
name for one of our new computers. 

TRS-80 Color Computer 

I'm writing this prior to any announcements; 
bear this in mind when I say, we are about to 
announce our new TRS-80 Color Computer! 
The Color Computer attaches to any color TV 
— yours or ours. A video modulator is built-in, 
and radio frequency interference (RFI) shield- 
ing is excellent. 

The screen is 16 lines deep by 32 uppercase 
characters across. 

Color graphics are available in five formats 
from 32 times 64 pixels with eight colors, to 196 
times 256 pixels with one color plus back- 
ground. The Color Computer also offers 
sound. 

The keyboard has 53 keys. Although they are 
smaller than those on professional keyboards, 
they are in the normal staggered typewriter lay- 
out. The processor is an MP 6809E. 

The low-end Color Computer comes with 4K 



RAM and an 8K ROM BASIC. Two joystick 
ports and an RS-232-C are built-in. Although a 
recorder is optional, a cassette port is provided 
for program and data storage at 1,500 baud 
(not compatible with our non-color TRS-80 
software). There is also a port for ROM plug-in 
Program Paks and GO programs, which can 
include up to 16K of additional ROM. 

Expansion options will include up to 16K 
RAM, which is required for some of the higher 
resolution graphics modes, a 16K extended BA- 
SIC, the joysticks, communications, printers 
and a disk drive. 

Everything won't be available immediately. 
For example, the extended BASIC is expected 
in late November, and the disk drive in early 
1981. Joysticks should be available by press 
time. The existing Quick Printer II already has 
a serial interface, and its 32-character lines 
match the Color Computer's format. 

TRS-80 Color BASIC is more powerful 
than Level 1 and compares favorably with Lev- 
el II. It includes commands for input from the 
joysticks, for color video, and for sound out- 
put. PEEK, POKE and USR(O) are included 
for the serious programmer. Accuracy is to 
nine digits. String handling, arrays and func- 



TRS-80 Color Video and Model III 




tions (ABS. INT, RND. SGN, SIN, SQR) are 
also included. 

Besides higher resolution in graphics, 
TRS-80 Extended Color BASIC adds rotating 
and zoom movement to your graphic blocks. 
You'll also get editing, tracing, specific error 
messages, user-definable keys, additional in- 
trinsic functions and real-time clock access 
from BASIC. 

I'll bet about now you're saying to yourself, 
"Just what the world needs — another thou- 
sand-dollar color computer!" 

Not quite. The basic computer will sell for 
only $399. The 16K RAM kit is SI 19, and the 
Extended ROM for another $99 plus installa- 
tion charges. In late November a 16K Extended 
Color Basic computer will be available. 

Because the new color computer utilizes a 
different kind of chip in ROM, it requires its 
own software. Initially, eight ROM Program 
Paks will be available from Radio Shack: Per- 
sonal Finance, Quasar Commander, Checkers, 
Chess, Music, Math Bingo, Pinball and a diag- 
nostic pack to check memory and functions. 
Several more are being developed. 

The Model III 

The smoke from our Color Computer did a 
fair job of covering up another new project. To 
those among you who didn't like TRS-80' s 
modular design, and said we aren't responsive 
to our customers — may you byte your tongues. 

There is now a bridge between the Model I 
and Model II. There is now a TRS-80 Model 
III! 

A single housing contains a 12-inch high-res- 
olution video monitor, 65-key professional 
keyboard with a 12-key datapad, computer and 
power supply (with only one power cord). 

Model III will expand quite far without go- 
ing outboard. You can start with the familiar 
4K, Level I system at $699, which is software 
compatible with existing Level 1 cassette pro- 
grams. (The recorder is not included.) 

Additionally, Model III Level I includes 
print commands to take advantage of Model 
Ill's parallel port. The processor is a Z-80, at 
2.0 MHz. 

One kit can be used to upgrade Level I to 14K 
extended Model III BASIC and increase 4K 
RAM to 16K. From there, RAM increases in 
16K jumps to the maximum of 48K — all inter- 
nally. 

Model III BASIC offers two cassette speeds: 
500 baud which is compatible with existing 
Level II programs; and a new reliable 1,500 
baud mode. An expanded character set includ- 
ing upper- and lowercase is standard, as is 
a screen print function in ROM. Also, the 



BREAK key will now exit from a hung-up 
LPRINT or CLOAD— or any other lock-up. 

There is a real-time clock, accessible from 
Model III BASIC or machine language. Also, 
an RS-232 board can be added inside the Model 
III. 

Two internal disk drives can be added. The 
5 V* -inch drives are 40-track double-density 
drives, giving 178,944 bytes per data diskette 
(about 134K user space on drive 0). Two more 
drives can be added externally, for a total of 
four, and almost 600K of on-line storage. With 
two drives, single-density Model I disk software 
can be converted to Model III disks. 

All Radio Shack software, and most non- 
Radio Shack software for the Model I should 
be compatible. Three Model III versions will be 
sold: the4K Level I for $699, the 16K Model HI 
BASIC for $999 and the 32K two-disk RS-232 
system for $2495. Other system configurations 
must be reached by installing upgrade kits. 

Model III TRSDOS will contain all of the 
features of the Model I and many of those of 
the Model II DOS. It includes a BUILD com- 
mand to create a DO file for automatic power- 
up command sequences. HELP gives you de- 
tailed instructions on any specified command. 
SETCOM initializes the RS-232 port, and 
CONVERT reads a Model I disk and converts 
its programs to a Model III disk and Model III 
format . 

We've gone overboard to maintain compati- 
bility with Model I programs. We also kept 
Model I's 16-line by 64-character video format, 
in the interest of compatibility. There are 
strong arguments for others formats, but we 
feel the compatibility of existing software is 
most important. We expect some vocal objec- 
tions, but hope our choice reflects the choice of 
the majority. 

The Pocket Computer 

This year at Radio Shack good things are 
coming in threes. Our third new product is the 
TRS-80 Pocket Computer! That's right— a 
pocket-sized TRS-80. 

It programs in BASIC, has a 24-character li- 
quid crystal scrolling display, features ten-digit 
numeric accuracy, with exponential notation to 
plus or minus the 99th power of ten. It includes 
1 .9K of memory for program and data storage, 
which stays live even with power switched off. 
Program steps are stored in a compressed for- 
mat that packs more commands into available 
memory than you will believe! 

An automatic power saver feature turns the 
power off after 7 minutes of inactivity in case 
you have forgotten. An optional cassette inter- 
face allows external program and data storage. 

The keyboard contains 57 keys, including an 
alphabetic keyboard in typewriter format, nu- 
meric keys in calculator layout and special 
functions. Eighteen of the alphabetical keys 
can represent reserved functions when used 
with the SHIFT key. Four type 675 mercury 
batteries (non-rechargeable) provide a nominal 
life of 300 hours. 

The Pocket Computer can be used like a cal- 
culator. Formulas are input using parentheses 
and symbols, as you would on paper, rather 
than one operation at a lime in typical calcula- 




TRS-80 Pocket Computer. 



tor mode. After an equation is solved, it can be 
recalled and edited. 

We have seven programs already available 
for the Pocket Computer— with more to come. 
Or you can write your own BASIC programs. 
The Pocket Computer contains I IK of ROM, 
including a 7K BASIC and 4K monitor. 

Pocket Computer BASIC is much like Level 
1. But it includes 15 arithmetic functions and no 
graphics. It allows limited string variables (up 
to seven characters), and limited string and nu- 
meric array variables. 

The memory, which holds 1424 steps, is au- 
tomatically partitioned for program and data 
storage. There is a 26-data element memory 



and a 48-step reservable memory for storing 
frequently used functions. This six-ounce beau- 
ty is a true TRS-80— not just a programmable 
calculator with alpha capability. When you've 
tried one, I predict you'll give your program- 
mable to "Junior" to play with! 

Well, I hope I've excited you. Obviously 
Wayne doesn't want me taking up the whole 
magazine. 

Let me close by saying, once again, that as 
Radio Shack brings out new products, we don't 
intend to forget purchasers of our first TRS-80s. 
We intend to continue to support all models 
with new software and hardware products. B 



%Q REMARKS 



From page 8 



for his system and he felt that if he had them 
available to help him, his sales would increase 
dramatically. Tandy stores are not yet permit- 
ted to sell any products not stemming from 
Tandy.! 

Twentieth Anniversary Issue 



With the twentieth anniversary issue of 73 
Magazine (my first publication in the ham 
radio field) going to press, I find myself re- 
flecting over the ups and downs of the past 
twenty years. 

My ham magazine, like 80, is for me a labor 
of love more than a way of making money. 
Amateur radio is beginning to grow again and 
there are some exciting prospects. Many of the 
changes I see coming in radio are tied to micro- 
computers and the circuits which microelec- 
tronics make possible. For those of you who 
have not yet been bitten by the hamming bug. I 
might explain that most of the important inven- 
tions and pioneering developments in radio 
communications have been made by amateurs, 
and there is no reason why this won't continue. 

The list of ham developments is a long one- 
slow scan television, virtually every radiotele- 
type circuit being used today, circular anten- 



nas, etc. 

The pioneers of commercial television were 
amateurs too. I worked in the TV broadcasting 
industry back in the early days ( 1948- 1950) and 
many of the people 1 worked with were grad- 
uates of W2XEL, an amateur television station 
out in Queens, NY. 

Today, we are in the early days of microcom- 
puters, and we are seeing most of the inventing 
and pioneering again being done by amateurs. 
This is one of the exciting aspects of this maga- 
zine. It is a medium for keeping everyone in 
touch with the latest ideas and the state of the 
art . People who depend on reading books are a 
year or more behind what is happening because 
it takes that long before books are published. 
Meanwhile, the art is staying ahead of the 
books and is reflected in magazine articles. 

The art, in our case, is microcomputing— its 
hardware and software. In the hardware line we 
see improvements in the basic computer unit 
(CPU), in memories, in mass storage equip- 
ment such as disks and various tape systems, 
bubbles, in printers, modems, control systems. 
In software we are seeing continuous improve- 
ments in languages, in operating systems, and 
in applications programs of all sorts. 

The basic purpose of 80 Microcomputing is 
to let you know what is going on in all of these 
aspects. We aim to make the material as under- 
standable as possible, and we are making a ma- 
jor effort to see that we have plenty of informa- 
tion to help the rank beginner grasp the funda- 
mentals. But we also want to act as a medium 
for the front runners to communicate and let all 
of us know what is going on up there. ■ 



80 Microcomputing, September 1980 • 11 



SO INPUT 



**. . . if you have a new 
set of ROMs at power on. . . 
The computer will ask MEM 
SIZE instead of MEM OR Y SIZE. M 



Shack Service 



I was amused by a recent local advertisement 
for Radio Shack Computers that said, "We 
service what we sell." As a dealer in business 
systems, we are naturally interested in that line 
of equipment and purchased a Model II, pri- 
marily to get acquainted with it and find out 
just what using and supporting it involved. We 
found out. 

First of all, it was DOA from a bad memory 
chip. We broke the seal as part of our self-im- 
posed indoctrination and luckily had a chip on 
hand from a previous job. The next failure in- 
volved the CRT sweep circuitry, and we dug in- 
to it again. 

It turned out that the part we suspected (hori- 
zontal drive amplifier) had a house number that 
did not cross-reference to anything. It was then 
that we learned that Radio Shack stores are not 
permitted to stock parts for these computers, 
and that Tandy's standard advice is to send the 
entire machine to the nearest service center, 
roughly 600 miles away. That center verified 
that they were not authorized to service boards 
or sell parts. 

Another call on the hot-line gained us the 
names of three other cities having service cen- 
ters, but no names, addresses, or phone num- 
bers. We did locate them through phone direc- 
tory assistance, and eventually found one that 
would accept a board for repair. 

The repair was prompt and well done, at a 
reasonable price. The fix, as nearly as we could 
determine, consisted of changing the value of 
several resistors. This apparently prevents in- 
stability when the drive is low, which was the 
case in our machine. 

In summary, we can only tell our customers 
that yes, Radio Shack does have a service capa- 
bility, but it is somewhat difficult and time- 
consuming to obtain when you need it. 

E. G. Brooner 
Lakeside. MT 



Satisfied Subscriber 



I am just writing to you to express my 
gratitude for your magazine. It is a truly superb 
publication, and I plan to subscribe to it for a 
long time to come. We get a few other TRS-80 
related publications, but yours is the best. 

Just the other day I received as a gift the Ra- 
dio Shack Editor/Assembler and I have started 
learning assembly language. 

1 looked over my first issue of 80 Microcom- 
puting and was again amazed at the amount of 
useful information supplied to the reader. You 



wrote in that issue, " . . .The editor of 80 Mi- 
crocomputing is not trying to impress you with 
his great knowledge of computers, 1 just want 
to provide you with entertainment, a way to 
learn more about your system, a way to save 
money on developing it." I believe you have 
done just that. Please continue to publish the 
fantastic magazine that you do. 

Brad J. Richter 
Ridgefield. CT 

Multiple 1NKEY Entry 

Entering more than one digit or character by 
means of the regular INKEY routine is not pos- 
sible, since the system reacts to the last charac- 
ter entered. Using the INPUT routine displays 
a query symbol and also requires ENTER to be 
pressed: In my opinion, this is for the birds in 
any reasonable operator/machine interface. 

The following routine permits two characters 
to be INKEYed: 



100 GOSUB500 

110 BS AS AS "":PRINT B$; 

120 GOSUB 500: PRINT AS 

500 AS«1NKEY$:IFAS = ""THEN 500 ELSE RETURN 



Line 1 10 stores the first INKEY as BS, and 
resets AS to a null. This requires that two char- 
acters always be entered, e.g. 01 for 1 , etc. The 
routine can be expanded for additional input if 
required. 

The input can be restricted to digits only by 
modifying line 500: 



500 AS = INKEYS:IF AS ■ "THEN 500 ELSE IF ASQASK 
48 OR ASC(AS)>57 THEN 500 ELSE RETURN 



Any non-digit entry will be ignored. 

Michael Barlow 

Pierrefonds, Quebec 

Canada 



New ROMS 



Did you know that Radio Shack has new 
ROMs in the latest models of the TRS-80? In 
case you don't I will tell what little I know and 
problems and fixes I have found. 

First, Radio Shack did a software fix for the 
cassette loading problems. It works wonderful- 
ly! ! Second, they added a control key which is 
the shift, down arrow. Therefore, shift, down 
arrow G will send a CHRS(7) or what is known 
as a bell. This works for all 26 keys. However, 



if you are using NEWDOS the shift, down ar- 
row no longer works for the last program line, 
but shift, down arrow Z will, for the old code 
for shift, down arrow was 26. 

You can determine if you have a new set of 
ROMs at power on. The computer will ask 
MEM SIZE instead of MEMORY SIZE. The 
second message will use R/S for Radio Shack. 
The keyboard will also have the new keyboard 
which is a wonderful improvement in itself. 

I hope this information may be helpful to 
you. Also page calls are all the same for other 
calls I don't know. Radio Shack will only say 
the calls listed in the editor/ assembler are in the 
same place. 

Chess McKinney 
Hermitage, 77V 

Scripsit: Round Three 

Perhaps I should not say anything, not hav- 
ing tried the Electric Pencil WP program, but 
since I saved about $50.00 by buying Scripsit, I 
figure I have two cents I can spare to stick in 
here. 

In his letter to 80, Peter Brennan seemed 
somewhat incensed at Scripsit for a few of its 
shortcomings. Let me simply remind him in a 
blanket approach that Pencil was not written 
for the TRS-80. It is available for many ma- 
chines and has probably undergone changes 
(for the better) as it metamorphosed. 

More specifically, let me address myself to 
what he mentions as defects and see if we can't 
shed some light on them. 

I am using Scripsit with a Teletype 43 until 
my 737 arrives. Mr. Brennan is correct, the pro- 
gram assumes the printer will supply a line feed 
with the carriage return. The only formatting 
problems I have run into using my 43 is that 
double spacing requires using the LS = 3 com- 
mand rather than LS = 2. 

Yes, it does play havoc with page length, but, 
and perhaps there is some other difference be- 
tween the printers we use, I find that the page 
length setting should be full scale at 90, not the 
75 he suggests, and the bottom margin some- 
where around 86, again, not the 70 he men- 
tions. 

The paragraph formatting is simply set to the 
same dimension as the line space. Granted, one 
must then print the text using the (P)ause op- 
tion, but I picked the printer, as I assume he 
did, and I knew full well what its limitations 
were in regard to its compatibility with my 
TRS-80 and the printers Radio Shack suggests 
for it. 

I also have those sheets of paper Tandy 
claims will enable Scripsit to use "my own 



12 • 80 Microcomputing, September 1980 



driver." I also have no idea of what to do with 
them. I think his condemnation of Tandy 
might have been modified to read, "You 
should have bought a Radio Shack compatible 
printer," and in this instance they are right. 
You don't spit in the wind and you don't pull 
the mask of the old Lone Ranger. That only 
makes sense. 

I can't vouch for the ability of the Pencil to 
keep up with the pace of typing, but it's 
definitely not true that Scripsit will keep up 
with a fast typist. I am not the fastest, but there 
arc times when the program will not keep up 
with me, and times, since it allows continuous 
character print by holding down a key, that 1 
get multiple characters when I don't want 
them. 

I have typed some 90 pages using Scripsit, 
which makes me no expert in its operation, but 
I think the bulk of Mr. Brennan's comments 
might be clarified by concentrating on using 
Scripsit and discovering its finer points, rather 
than trying to play it off against Pencil. I would 
have rather he mentioned that selecting a par- 
ticular spot in the text for printing requires re- 
entering the format instructions. That's an in- 
convenience, but that's about the only thing I 
can come up with that bothers me. 

Scripsit is easy for me to use. After the first 
half hour of the tutorial cassette Tandy supplies 
I shut my deck off and started using Scripsit 
with the foldout of operating commands in 
front of me. I guess the decision as to which 
program depends on the matter of application, 
of use and of oneself. 

William O'Brien 
New York, NY 



Micro Mystery 



I am returning the Microsoft editor/macro- 
assembler/linkage-editor to my Radio Shack 
dealer because of totally inadequate documen- 
tation. 

There is absolutely no discussion of con- 
cepts. How is the average Level II BASIC mid- 
night coder supposed to know the difference 
between an assembler, a compiler, and an inter- 
preter? How is he/she supposed to know what 
a macro is? How is he/she supposed to know 
the power and flexibility of a linkage-editor? 

Being a multi-lingual independent commer- 
cial programmer, I have worked on most 3rd 
generation computers, including everything 
made by IBM. I am used to IBM manuals that 
deal with concepts prior to discussing bit- 
fiddling. Microsoft people have obviously 
never seen an IBM manual, which has wonder- 
ful litle aids like examples, concept discussions, 
sample programs, graphs, hints, references to 
other manuals, etc., all of which are totally 
lacking in Microsoft's piece of literature which 
I am hesitant to call a manual. 

User response prompting is non-existent. 
When the editor, assembler, or linkage editor 
are executed, they simply display an asterisk on 
the screen. If I wrote programs like that in in- 
dustry, I'd be fired on the spot. How about 
prompting the user to enter the source file 
name, the object file name, the load address, 
the number of object modules to be linked, do I 



want a cross reference, etc., etc., etc. I'm total- 
ly underwhelmed by their kindergarten code. 

Can this manual really be from the same 
folks who gave us the Level I and Level II (w/o 
index) manuals? Why didn't Microsoft con- 
tract with David Lien to write their assembler 
manual instead of the incompetent trainees 
they used? 

Dave West/all, Pres. 

Aries Computer Software, Inc. 

Farmington Hills, MI 



You are right, of course. I would perhaps be 
more critical of Microsoft if I had had any suc- 
cess in the last four years in getting an article 
written for any of my magazines which covered 
the material you are asking about. I have been 
promised dozens of times by writers that they 
would do this. . . and so far not one promise 
has been kept. 

The difference between an interpreter and a 
compiler is a very difficult concept for both be- 
ginners and intermediate computerists. 

This applies to macro anythings, linked edi- 
tors, and the lot. With the execution of the in- 
structions which come with the Level I TRS-80, 
I would be hard put to point with pride to good 
documentation in our field. I can point to any 
number of ghastly disasters. — Wayne. 



Tired Memory 



If you're tired of continually having to re- 
serve memory for your commonly used ma- 
chine language routines, or if you have more 
than one and have to figure out how much to 
reserve, you can let the 80 do all that for you by 
using the method shown in the listing below. 

so CLS 

200 DEF1NTA.I 

300 l)IMA(K) 

500 FORI=0TO7 

350 READA(l) 

700 POKEVARPTR(A<0))+!,A(I) 

800 NEXT 

1000 DATA62,49,50.32.62,I95,I54,I0 

1200 DEFUSR ■ VARPTR(A(0)):X = USR(0) 

1400 AJ = INKEY$:IFA$ = - , THEN1400ELSESTOP 

Simply answer the MEMORY SIZE? with an 
<ENTER> and append the appropriate data 
statements to your program. The data in the 
program (line 1000) prints a 1 in the center of 
the screen. 

The key to the program is in line 700 where 
the data in line 1000 is POKEd into memory, 
starting at the location where the array A be- 
gins. By setting the DEFUSR to that starting lo- 
cation and executing the USR, the 80 will per- 
form the machine language steps and return to 
your BASIC program. For your routines, just 
replace the data statement with your data and 
change line 500 accordingly. Line 1400 was in- 
serted so you can admire your handy work. 
Note that you can have several machine lan- 
guage routines. 

A word of caution is needed. Since the 80 has 
a habit of rearranging its memory from time to 
time, the starting location of the A array may 
change. For this reason, it is necessary to reset 
DEFUSR each time the USR is called. I would 



recommend carrying statement 1200 as a com- 
pound statement any time you need your ma- 
chine language routine. 

A. W. Maddox 
Creve Coeur, MO 



Simple Debounce 



In the April issue of the magazine, you have 
an article written by C. W. Anderson which 
shows a relocation routine for the KBFIX rou- 
tine. In this article the author makes a request 
for a debounce routine which only contains rel- 
ative jump instructions. For some months now 
I have been using a debounce routine that can 
be directly located anywhere in memory, but 
which normally will not require relocation. 

In my TRS-80 which docs not have an expan- 
sion interface, the reserved RAM area from 
405E to 407F does not seem to be used by any 
of the routines in ROM. Thus if a routine can 
be fitted into this area, then it can remain un- 
touched during execution and the addresses in 
the high end of RAM can be used for other pur- 
poses. Since KBFIX apparently requires 55 
bytes it won't fit in here, but there are fortu- 
nately less memory-consuming methods avail- 
able. The method I am using requires 22 bytes 
of permanently allocated RAM, and will there- 
fore easily fit into this area. 

The extra instructions required to initialize 
the routine are only used once, and can there- 
fore be placed in an area of RAM where they 
may be erased at some later stage. The most 
convenient area to use for this purpose is the 
I/O buffer area from 41 E6 to 42E6. As long as 
the buffer is not used during the initialization 
process, the area is perfectly safe to use for such 
purposes. 

The debounce routine may seem a little prim- 
itive, but during several months of use it has not 
let me down once. During normal processing it 
is even slightly faster in execution than the rou- 
tine in ROM since it does not require as many 
instructions to determine whether the keyboard 
status has changed. When the status does 
change, however, a delay loop is invoked caus- 
ing a delay in processing. 

I can add that when I use the TRS-80 without 
the routine, there will be a repeated character 
on nearly every line, despite clean keyboard 
contacts. 

The 22 bytes of permanent code are as 
follows: 



406A 


118038 


LD DE.3880H 


406U 


213540 


LD HL.4035H 


4070 


NXTCH: 


4070 


CB03 


RLC E 


4072 


F8 


RET M 


4073 


2C 


INC L 


4074 


IA 


LD A.i I) Li) 


4075 


AE 


XOR IH1 i 


4076 


28F8 


JR Z.NXTCH 


4078 


0605 


LD B.5 


407A 


CD6000 


CALL 0060H 


407D 


C3E303 


JP 03E3H 



The value loaded into B in line 4078 could 
possibly be changed to 4, 3 or 2 thus reducing 
the delay time, if this still provides adequate de- 
bounce. 



80 Microcomputing, September 1980 • 13 



SO INPUT 



The only purpose of the initialization routine 
is to put the starting address of the debounce 
routine into the keyboard DCB. Unfortunately 
this cannot be done in BASIC with POKE since 
the address is in constant use during execution 
and should therefore be done in an uninter- 
rupted sequence of instructions or in a single in- 
struction. The following lines can be used, at 
the same time setting the USR address back to 
the default value. 



42DO 


2I6A40 


t.D HL.406AH 


42D3 


221640 


LD (40I6H),HL 


42D6 


214A2E 


LD HL.2E4AH 


42D9 


228E40 


LD (408EH1.HL 


42DC 


C9 


RET 



I use a short BASIC program to POKE these 
values into memory, call them with a USR(O), 
and then issue a NEW statement. I was also 
pleased to see in the April issue that others have 
found out that BASIC can be used to convert 
values from hexadecimal to decimal for the 
POKE statement (MACROPOKE monitor). It 
certainly saves a lot of conversion work and po- 
tential errors. Actually I use a format which in- 
cludes the address at the beginning of each line, 
with the data bytes following, for example: 

DATA 42D0.2I6A40 221640 2I4A2E 228E40 C9 

Intervening spaces can be used to separate the 
individual instructions, making them even 
easier to interpret visually. 

Obviously, since I have neither expansion in- 
terface nor a disk system, I cannot guarantee 
that the area used for the debounce is also un- 
used when these are added, but for users with- 
out these extras (presumably still the majority) 
it should provide a trouble-free debounce that 
doesn't require MEMORY SIZE or interfere 
with other machine language routines. 

Arne Rohde 

Pilevej 31 

7600 Struer 

Denmark 

Box Confusion 



Thought your readers would like to know 
changes necessary to make "Ball Box" (April 
80) work in Level II, since they are elusive and 
not covered in text. 

1) PRINT AT in Level I can be followed by a 
comma or semicolon. PRINT® in Level 
II must be followed by a comma, NOT a 
semi-colon. Therefore, add a comma be- 
fore the semi-colon in lines 2010, 4900, 
4920 & 4940. 

2) POINT returns - 1 in Level II, not 1 as in 
Level I. Therefore, add a minus sign be- 
fore 1 in lines 4320, 4330, 4410, 4420, 5020 
&5120. 

3) No graphics wraparound in Level II, so 
change line 5001 to Y = RND(48 - 4) + 2 
or you will get a FC (function call) error, 
line 5020 frequently (whenever Y>4T). 

Fred Blechman 
Canoga Park, CA 



Like Father, Like Son 



I am 13 years old. I think that 80 Microcom- 
puting is one of the best books about micro- 
computers. My dad subscribes to it, and we 
both enjoy it. 

I like the articles and columns that you have 



printed. It has very interesting stories and pro- 
grams, we both read and like this book very 
much. 
Thank you for making such a fine product. 



Martin Eisenhauer 
Margate, FL 



DEBUg 



Error in SCRNPRNT 



A small error in my SCRNPRNT pro- 
gram in the May issue of 80 Microcomput- 
ing got past me and effectively disabled the 
instruction that fools the computer into 
thinking that its RAM ends just below 
where SCRNPRNT starts. When working 
properly, this instruction both protects the 
program against TRSDOS Disk BASIC'S 
usage of the top few bytes of memory and 
obviates the need for answering MEMORY 
SIZE. Unfortunately, I left off the H in the 
instruction, so the program attempts to 
change a ROM decimal address instead of 
the correct RAM hex address. This would 
not have caused a problem in the program 
as printed, since it was assembled lower in 
RAM, but would cause a conflict with BA- 
SIC if the program were assembled at the 
very top of memory. 

To correct the error, change the fourth 
through sixth bytes of the assembled pro- 
gram to 224940 instead of 22D10F, and 
change the corresponding instruction to 
readLD(4049H),HL. 

My apologies to anyone who may have 
been inconvenienced. 

Louise H. Frankenberg 
Pasadena, MD 



More Story 



The addendum at the end of the text, 
"Get the Whole Story" (July 80) is not 
clear. The programs printed in the article 
arc current, except for the Order Verifica- 
tion Program (Listing 1). This program re- 
quires frequent price updates. The cassette/ 
wafer offered for $25 includes the latest 
high-speed order verification with the prices 
in data in effect at the time of shipment. 
Those who order the whole package for $25 
may receive updates of the order verifica- 
tion program on cassette or wafer for $10. 

Program Listing 3, Bookkeeper, has an 
omission that will create a serious error. 

Line 340 should have :JI =0 

added . 

I'm also including a suggested correction 
to the monthly Gross Profit Statement 
(Listing 4), which will allow a much simpler 
method of providing a printer option. 

With over 160 magazine articles pub- 
lished, I've never had such enthusiastic 
reader response as I've had to this one! 

Fred Blechman 
Canoga Park, CA 



CHANGE LINE 10 TO CLSi PRINT ! IN PUT "PRINTER"' <Y/N)";A» 

PDD LINE 11 IF A»="N" P0KEl6i23.4 

ROD LINE 12 CLS 

CHANGE END Q* LINE 31 TO G0T099 

DELETE LINES 50. 60, 70. 73. BE. 90. 92. 93 

IF YOU ANSWER N TO THE OUESTION IN LINE 10. THE COMPUTER 

WILL IGNORE OLL LPRINT STATEMENTS, AND YOU'LL HAVE SCREEN 

DISPLAY IN THE ORDINARY WAY. TO ENABLE LPRINT AGAIN. JUST 

P0KE16423.5. NOTE: IF YOUR PRINTER NEEDS A SOFTWARE 

DRIVER. PRINT PEEK (16423) PND NOTE THIS VALUE WITH THE 

PRINTER DRIVER ACTIVE. THIS WILL THEN BE YOUR POKE VALUE 

TO ENABLE PRINTER AFTER DISABLING WITH POKE1 6623. U 



Monthly Gross Profit Update 



14 • 80 Microcomputing, September 1980 



QUALITY 

^ THAT'S WHAT 
SEPARATES THIS 
PRINTER FROM 
THE TOYS 







MICROTEK MT-80 

SOLID VALUE FOR YOUR DOLLAR 

The market is flooded with low-cost 
printers that look and last more like 
toys. 

The Microtek MT-80. our versatile alpha- 
numeric line printer, has a high quality 
print mechanism that gives you solid 
value for your dollar. It has been de- 
signed with a superior brain resulting in 
more advanced features and more de- 
pendable performance. Our printer is so 
reliable that we offer you an incredible 
365 days warranty. 

We stand behind every printer we make 
because we build quality into each one. 
So stop tinkering with toys and get 
serious. Demand 100% value by 
specifying the MT-80. 



LOADED WITH INNOVATIONS 

• 40, 80 or 120 columns (software 
selectable) 

• Non-thermal paper, pin feed 

• 125 CPS, 70 lines per minute 
•9x7 dot matrix 

• Vertical format unit 

• 96-character ASCII (upper and lower 
case) 

• Adjustable forms width to 9 1 /2" 

• Parallel and serial (RS-232C) inter- 
faces available 




OUR UNIT PRICE 

$795 Parallel 

$895 Serial (RS-232C] 



MICROTEK^ 



For more information contact: 

MICROTEK, Inc., 

9514 Chesapeake Drive, 

San Diego. CA 92123 

Tel.(714)278-0633 

TWX 910-335-1269 



.^360 



SO INPUT 



Disgruntled Manufacturer 

it have been tome con. 
about the thrust oj John Acres' article, 
"Saving Money, " that appeared in the July 
issue of 90, The piece raised havoc at Micro- 
tek i'i San Diego. 

Acres' piece in no way purported to be a 
re\ iew oj Microtek 's product or oj the Pet 
com drive mentioned. It seemed more ut a 
caution to enthusiastic hobbyists not to let 
their affections lor the hobby etude 
belter judgement The Moral: Always read 
the manual 

Though 80 does not intend to thy away 
from controversy, »<• regret the lost ener 
vws on an article thai apparently was mis- 
construed by \ome readers. The intent oj 
the teres article appears to our editors to 

satirize his own electronic abilities or lack 
thereof 

To help set the record straight, we're re- 
printing the original correspondence 
Acres to Microtek, forwarded to us h\ IXjn 
Obed, Microtek 's president —Eds 

Microtek: 

i remains of a om 



Microtek primer lhat I killed In mv own 
hand. Bad as lhat ma) sound, I am also re 
sponsible foi the death oi two Radio Shack 

disk drives, one Percom 1 1 I) 2<X) disk 

drive, a I KS KO expansion interface and 
perish the thought a TRS-80 keybo 
unit, 

It was not cold-blooded murder though, 
i! was an accident I swear! In my haste to 
see the Microtek unit in action, I used a 
Radio Shack number 2ft 14<)l printer inter 
face cable the one normally used with the 
Centronics '7 l >-2. 

I low was I to know that the Microtek has 
a separate signal and chassis ground (with 
out having read the manual)? 

Lnlortunatclv. the interlace cable men- 
tioned above connects pin 17 |o the signal 
ground ot the IkS ho expansion intei 
while deviously allowing the printet to func- 
tion, giving no indication of the danger 
lurking ahead. 

Although m> intentions were good, I was 
overcome with the lust of a working system 
and — in a moment of insanity— discon- 
nected the three-prong grounded ac plug of 
the III) 2(KI from ac power. Somehow in 
that mysterious electronic twilight /one 
when an ac plug is somewhere between con 



jftAID 



Teletype Interface 



I have an old Model- 1 5 Teletype Printer 
(with a 5-bit code and 60mA current loop) 
that I would like to use with my Radio 
Shack TRS-80 Model II. Unfortunately. 
Radio Shack has nothing that could or 
would help me concerning this type of 
operation. Please! Can you help me? 

Milton J. Belle 
2008 Wayside Street 
Compton. CA 90222 

Friden Schematic 



Could you please print the following in- 
quiry wherever it is appropriate? 

1 am looking for a schematic or informa- 
tion on the Friden Flexowriter Programatic 
Typewriter. I have a model FPC-5P which 
has a 5 level baudot paper tape punch/ read 
assembly. I would like to interface this for 
computer or RTTY. 

Robert G. Gilman 

Box 103 

Hellertown, PA 18055 



Cassette Confusion 



I have a problem with which I hope you, 
your staff or 8ffs readers could help me. 1 
have a copy of the excellent tape Micro Mu- 
sic. Unfortunately, it is very annoying to 
have to pull the cassette plug out, plug it in- 
to a speaker, then plug it into the cassette 
player to load another piece of music. 

Since I own an expansion interface, I 
know that you can have two cassette record- 
ers attached, and if you store one in address 
37E4H all I/O will be done on cassette two. 
This works great with Babybeep (80, April, 
1980), but it will not work with Micro Mu- 
sic. 

Since I know little Assembly Language I 
can't change this. I would like to be able to 
load the data on cassette one and play it out 
of cassette two. Can this be done? If so, I 
would like to know about it. 

Also, if anyone knows how to put any 
Radio Shack machine language tape on 
disk, I would appreciate it if he would drop 
me a line. 

Tarus P. Balog 
Asheboro, NC 



nected anil disconnected, a ground loop (cm 
something') got onto signal ground and 
caused 5 ICsinthe rFD-200 to explode and 
pc traces to vaporize. 

Similar damage was done to the TKS-80 
components. As lor the Microtek printer— 
alas it loo had its luscious circuitry 
violated. Ihc pc trace to pin 17 of the paral- 
lel interface connectoi evaporated. And 
that's not all Hie 8155 seems to he 
When connected, it pulls the • 5 volts to a 
helpless V2. Whatevei ails it is contagious, 
When a known healthy 8155 is plugged in, it 
too soon develops identical symptoms. 
Without the squiggly diagrams outlining; 
circuitry connections, further surgery on 
my part is fruitless. 

I appeal to you then: Ye mellow, laid 
back gods ( ,t California heal this printer 
and return it to me as LUiickls as possible. 
Charge me what you will bin do not make 
ii ovei a hundred dollars without talking to 
me lit si 

II thev have not been sent alreadv. please 
send along a ribbon and spools. They were 
not included with the primer originally. 

loh'i 
New Palestine, IN 



Morse Code Mod 



My Morse Code program in your July 1980 
issue is correct for TRS-80s without the Radio 
Shack E-Z cassette load modification. This 
modification is installed in all TRS-80s sold af- 
ter early '79 and was made available for no-cost 
installation in mid '79 to all earlier models. If 
you have this modification installed, change the 
following eight lines to the Receive Mode sec- 
tion to read: 

1290 IFA<200. 
1310 IFA>200 
1330 IFA<200. 
1360 IFA>200 
1380 IFA>200. . 

1410 IFA>200 

1430 IFA>200 

1470 IFA>200 

A special thank you to Gene Steele K5EVE, 
in Orangefield, Texas for this suggestion. It has 
been mailed out to all the 2000 + purchasers of 
the W4UCH TRS-80 Morse Program and 
should prove useful to your readers that have 
the E-Z cassette load modification installed. 

Also, users should be reminded that a mini- 
mum of one volt peak-to-peak audio is required 
during receive without any RFI (radio fre- 
quency interference) going into the cassette in- 
put line from the station receiver, as the pro- 
gram obviously cannot discriminate between a 
valid Morse code signal and interference from 
the TRS-80. Good quality coax cable and a re- 
mote antenna at least 60 feet away from the 
TRS-80 is an absolute must. 



Robert M. Richardson 

Chautaqua, NY 

Input to Page 40 



16 • 80 Microcomputing, September 1980 



slaving too long 
over a hot computer? 




^48 



AUTOMATED 
SIMULATIONS 



The Temple of Apshai 

First In the Dunjonquest™ series. 
Undertake heroic acts within a 
labyrinth filled with treasures and 
fantastic monsters who guard these 
treasures and move in real time. The 
Book of Lore (included) fills in the 
background and describes the 
appearance of the temple. Over 200 
rooms and 30 monsters. There are 16 
million kinds of characters! The best 
of the dungeon computer games. 

For TRS80 Cassette. 16K, Level II; Disk: 
32K, TRSDOS • Apple Cassette 48K 
Applesoft in cassette or in ROM; Disk 48K 
Applesoft in ROM • Pet Cassette: 32K, old 
or new ROMs. 

$24.95 cassette • $29.95 disk 



Starfleet Orion 

Fight space battles in your living 
room with 12 game scenarios (data 
files) using 2 to 15 spacecraft. Infini- 
tely expandable, invent more game 
versions of your own. For 2 players, 
Includes Battle Manual and Ship 
Control Sheets. 

For TRS80 Casseffe: 16K, Level II; Disk: 32K 
TRSDOS • Apple: Cassette: 16K or 32K. 
Integer BASIC in ROM; Disk: 32K. Integer 
BASIC in ROM • Pet Cassette: 8K, old or 
new ROMs. 

$19.95 cassette • $24.95 disk 



The Datestones of Ryn 

Dunjonquest #2. Recover the 
datestones from the rogue Rex the 
Reaver and his cutthroats — who've 
stolen the stones from the calendar — 
before time runs out. 
Competitive scoring system: How well 
can you do compared to other 
players? 

For TRS80 Cassette: 16K, Level II; Disk: 
32K, TRSDOS • Apple Cassette: 32K 
Applesoft in ROM or 48K Applesoft on 
cassette; Disk: 48K Applesoft in ROM • Pet 
Cassette: 16K, old or new ROMs. 

$14.95 cassette • $19.95 disk 



Rescue at Rigel 

New! Brings the Dunjonquest series 
to the final frontier. As Sudden Smith, 
with force shield and power gun. you 
make your way through several levels 
and scores of rooms to find and beam 
to safety the prisoners held by the 
evil High Tollah. Quickly, before your 
power pack dies and the Tollah and 
his minions can get to you! 

For TRS80 Cassette: 16K, Level II; Disk: 
32K, TRSDOS • Apple Cassette: 32K 
Applesoft in ROM or 48K Applesoft on 
cassette; Disk: 48K Applesoft in ROM • Pet 
Cassette: 16K, old or new ROMs. 

$19.95 cassette • $24.95 disk 



then it's time 
for a fun break! 



m 

m 
-<- 

m 
it* 






(i 






TRIPLE WARRANTY 



Money back guarantee; II 
you don't like the game for 
any reason whatever, return it 
intact within 10 days of receipt for 
a complete refund No questions 
asked 

@ Defective warranty: Cas- 
sette not functioning with- 
in 30 days of receipt? Return it to 
us and we'll exchange it. No 
charge, of course 

/?~~ "~x Limited lifetime war 
forever) rinly: n matter what 
happens to your cas 
sette: the dog chewed it. you left 
it out in the rain., whatever. No 
matter when it happens. Return 
the remains to us (with $5.00 to 
cover all handling and shipping) 
and we'll send you a brand new 
cassette. 




*>» 



.>* 



%SW- 



WBm 



*& 



Morloc's Tower 

Dunjonquest #3. You'll find 3 kinds of 
rings, a magic sword. 2 amulets, 6 or 
so other treasures, 30 rooms, 18 real- 
time command options, and a dozen 
types of monsters including the 
heinous Morloc. Easy to learn, a 
challenge to master. Includes game 
program, 1.2 KB data file, 16 page 
manual. 

For TRS80 Cassette: 16K, Level II; Disk: 
32K. TRSDOS • Apple Cassette: 32K 
Applesoft in ROM or 48K Applesoft on 
cassette; Disk: 48K Applesoft in ROM • Pet 
Cassette 24K, old or new ROMs. 

$19.95 cassette • $24.95 disk 



TO ORDER: 

Master Charge or Visa card holders: 

charge these to your credit card. Just 
call the appropriate toll free number: 
(800) 824-7888, operator 861 

In California: (800) 8527777, op. 861. 
In Hawaii or Alaska: (800) 824-7919 op. 
861 

Or use the handy coupon: 

Automated Simulations 

Department OM2 
P.O. Box 4247 

Mountain View, CA 94040 



We believe that computer games 
should be fun, challenging, intellectu- 
ally stimulating . . and provide you with 
many alternatives and ways to affect 
the outcome. So our games are more 
complex in planning your playing stra- 
tegy. But not in the mechanics and 
rules of play. With all these games, you 
take command. You determine the 
course of history. 



Invasion Orion 

Pit your skills against the computer! 
Same game system as "Starfleet 
Orion" but you can play it solo. 3 skill 
levels; the computer plays either side 
and takes care of the details. It has 10 
fictional scenarios. 30 ship types, and 
3 weapon systems. 

For TRS80 Cassette 16K. Level II; Disk: 
32K, TRSDOS • Apple Cassette 32K 
Applesoft in ROM; Disk: 48K Applesoft in 
ROM • Pet Cassette: 16K, old or new 
ROMs 

$19.95 cassette • $24.95 disk 



AUTOMATED SIMULATIONS 

Please send me the following games: 



Cass. Disk 



Gams 



Temple of Apshai * 

Starfleet Orion i 

_ Invasion Orion $. 

Datestones of Ryn * 

_ Morloc's Tower $ 

Rescue at Rigel * 

Plus Shipping & Handling * 

Sales Tax' $ 

Total $ 



1.00 



My computer is. 



J I enclose my check In the amount 
of 



i Please charge to my 

Visa I Master Charge: 
# expires . 



Name. 



Add reea 



'California residents: add6or6.5% tax 



LOOKING FOR TRS60 

BUSINESS SOFTWARE? 

WE HAVE HUNDREDS 

OF QUALITY BUSINESS 

PROGRAMS IN STOCK! 

AT PRICES YOU CAN 

AFFORD. 

WHERE YOUR TRS-60 MEANS BUSINESS > 

For the first time you can fill most of your software needs with one telephone call. Whether you are 
trying to find a specific program, custom software or just help with your system — give us a call. 
We have the people that count! 

Invoicing • Inventory Control • Accounts Payable • Accounts Receivable • Payroll • General 
Ledger • Letter Writer • Word Processing • Mailing • Manufacturing Inventory • Cost Account- 
ing • SalesReporting • Stock Market • Business Statistics • Statistical Analysis* Data Base 
Systems • Medical Billing • Dental Billing • Special Industries • Advanced Accounting • Income 
Tax • Language • Personal Finance •Technical Programs • Insurance • CP A • Law Office •Asset 
Depreciation • Job Cost • Utility Programs • Education • Games • Home Programs • Loans • 
Credit Bureau • Electronics • Test Systems • Sports • Art • DOS Systems • BASIC lessons • 
and hundreds more! 

Send for our free catalog or give us a call today. We also do custom programs as well as buy top 
quality programs. 



Summer Special: 
Complete business system S299.95 



OYER 100 OF THE BEST 
BUSINESS PROGRAMS FOR 

THE TRS-60* MODEL I 
AND MODEL II IN STOCK 

READY FOR 

IMMEDIATE DELIVERY . 

LET US ANSWER YOUR 
QUESTIONS TODAY. 

Software-Mart ~ 



In California Call (714) 768 7878 Call Toll Free 1 (800) 854-7115 

^£ 24 Hour Service 

OUR BEST ADS ARE MOT WRITTEN — THEY'RE RUNNING ON TKS-80's 



Prices and programs are subject to change without notice All Software Mart Programs are sold on an as is " basis and with All Faults" 
*TRS-80 is a trademark of the Radio Shack Division of Tandy Corporation •— 



SO REVIEWS 



edited by Emily A. Gibbs 



"He assumes the reader 

has a fairly good 

understanding of Level II BASIC, 

although all his tests. . . 

operate on a 4K machine, M 




TRS-80 Interfacing 

Juhnathan Titus 

Blacksburg Continuing Education Series 

Howard W. Sams & Co., Inc. 

$8.95 

by Ed Neister 

In TRS-80 Interfacing, Titus provides the 
reader with a practical knowledge of input/ 
output circuitry and its operations. It is a basic 
book that should be in the library of all hard- 
ware designers who wish to work with the 
TRS-80 system for input/output control. 

The book is written for a general reader. 
Titus does not go too deeply into the basics. He 
assumes the reader has a fairly good under- 
standing of Level II BASIC, although all his 
tests and experiments are designed to operate 
on a Level II 4K machine with read/write 
memory and data storage capability. 

Operation Control 

Titus introduces the reader to the control sig- 
nals one by one and helps the reader grasp the 
purpose for this control system and how to use 
it. He then goes into the operational control of 
these signals by using Level II instructions in 
computer programming steps. Titus leads the 
reader from the initial concept to a point where 
the reader can write the programs and generate 
the control signals he desires. Titus and the 
Blacksburg Group have developed a circuit 
which allows the reader to do all the experi- 
ments presented in the book. 

Command of the Language 

In the first chapter, Titus discusses the Z-80 
microprocessor, its memory capability and the 
setup and use of the diode devices used through 
the Z-80 processor. The information is pre- 
sented quickly and in great detail. 

In Chapter one, Dr. Titus talks about the 
simple diode commands, as well as how soft- 
ware commands and interface circuits are used. 
He briefly discusses the PEEK and POKE com- 
mands in relation to interface circuits. He also 
goes over assembly language vs BASIC pro- 
gramming, as far as data transfer and control 
are concerned. 



TRS-80 interfacing and its hardware are pre- 
sented in more detail in Chapter two. Diode de- 
vice addressing and decoding, as well as how 
gates are used for addressing and decoding are 
discussed. 

Chapter three contains a detailed discussion 
of the output and input ports, device interfac- 
ing and memory mapping. Chapter four fo- 
cuses on flags. The input/output device syn- 
chronization, logical operations, software de- 
tection of flags and complex circuit flags are 
considered. 

Readers are introduced to the breadboard 
circuit design in Chapter five. This allows test- 
ing of the logic probe device, memory coder 
bus buffers and control circuitry. Next Titus 
considers circuit construction. 

Interface Experiments 

Chapter six is the central theme of the book 
and delves into detailed discussion of interface 
experiments. After an introduction, eighteen 
experiments are presented to help the reader 
test and understand the concepts of input/out- 
put transfer. The experiments reinforce the 
concepts presented throughout the book. 

For the size of the book, much information is 
presented. Several appendices are given. One 
presents logic functions concerning lamp moni- 
tors, logic switches and pulses. Another gives 
the parts required for the experiments. The last 
three appendices give the Z-80 microprocessor, 
the TRS-80 interface breadboard parts and PC 
artwork, so that the reader can easily build his 
experimental circuit. 

The first eleven experiments provide a set of 
interfacing and programming investigations 
for readers interested in interfacing concepts. 
The last seven experiments provide additional 
lab investigations of advanced topics and pro- 



jects to supplement the experiments. They cov- 
er logic probe, device address decoding, device 
selecting pulses, constructing an input port, 
handling multi-byte input port information and 
input port applications, constructing an output 
port, I/O interactions, data logging and 
display. 

An analog-to-digital converter is maneu- 
vered by the computer in Experiment 1 1 . When 
the program is run, the operator should be able 
to make the meter needle swing between two 
preset voltages. 

Experiments 12 through 18 get more in- 
volved with device address and decoder cir- 
cuits, output ports, BCD and binary coding, 
using the output ports and a simple program as 
a traffic light controller circuit. 

Experiment 15 is an important one, used to 
demonstrate how logic device testing can be 
done. Simple flag circuits are handled in Exper- 
iment 16. Experiments 17 and 18 are more de- 
tailed in working with programmable interface 
chips and interfacing the A/D converter to the 
TRS-80. 

Experiment 18 is very interesting from the 
standpoint that the resistance capacitance (RC) 
curve can be observed on the TRS-80. An RC 
curve is typically used to measure pressure, 
temperature, speed, conductance or many 
other physical perimeters. 

The reader can obtain an overview of the 
subject in a quick reading. Next the breadboard 
circuit can be assembled, and the TRS-80 
should be put to use. 

The most dramatic thing about the book is 
that it gives the reader practical experience and 
guidance with the TRS-80 with program exam- 
ples and actual hardware. When the reader has 
completed the book, he should have a good un- 
derstanding of I/O devices and interfacing. ■ 



Computer Games for Businesses, 

Schools and Homes 

J. Victor Nahigian and William S. Hodges 

Winthrop Publishers, Inc. 

Cambridge, MA 

Softcover, 157 pages 

$10.95 

by Len Gorney 

Are you looking lor a good computer 
games book that will give you a solid core 
of coding from which to develop your own per- 
sonalized computer games? Do you welcome 
the challenge of converting a program from any 
version of BASIC to your own machine's 
BASIC? 



Do you enjoy debugging others people's pro- 
grams? Do you like to play computer games 
just for the fun of it? If you answer yes to any 
or all of the preceding questions, you are a 
prime candidate to purchase Computer Games 
for Businesses, Schools and Homes. 

In his foreword, Mr. Weinberg introduces 
Computer Games as Winthrop's "first sally in- 
to new territory— the personal computer." The 
programs contained in this 157 page book are 
for the personal computerist. However, the 
particular version of BASIC, which runs on 
PDP type machines, used in these programs is 
not within the grasp of the average personal 
computerist. Assuming you don't have a DEC- 
type BASIC or DEC machine, there are a few 
changes you must make before you power up. 



20 • 80 Microcomputing, September 1980 



The backslash is used as the multiple state- 
ment per line delimiter in these programs. You 
will have to replace it with whatever character 
your BASIC uses as a separator, or code each 
statement on a separate line. You may have to 
change the PRINT statements to LPRINTs, if 
you want a printout. Using INPUTS or INPUT 
in place of GET and PUT statements will elimi- 
nate some problems in your INPUT and 
PRINT statements. 

A listing of the variable names and their uses 
within the programs follows a short description 
and history of each game. This is a nice touch, 
especially if you are the type who likes to tear 
apart a program. A typical sample run and a 
program listing in an easy to read 5 x 7 dot 
matrix round out the games' introductions. 

More Winners Than Losers 

As with any collection, some of the games 
are losers. "Bullet" is the old — click, 
click — computerized version of Russian 
Roulette. "Poem" randomly generates one, 
but with little literary value. 

"Psycho" is a minor league attempt to out- 
put your personality profile based on a design. 
Other poor selections include a Star Trek game, 
"Taplab" and "Tic-Tac-Toe." 

What remains, however, are 21 winners that 
can be divided into five general categories: 
calculation games, casino games, dice games, 
grid/math games, and the ever present miscel- 
laneous category. 

One of the more interesting calculation 
games is called "Date" which, when given to- 
day's date and any other date, calculates the 
number of days between today's date and the 
second date. A variation of this same logic is 
used in the next two programs. 

' ' Biorythm " is a graph of those critical days ! 
"Compat" is advertised as a biorythmic com- 
patibility calculation for two people. Interest- 
ingly enough, for two people to be 100 percent 
compatible, they should either be born on the 
same day or their ages should differ by 59.86 
years. 

Casino games are the downfall of most per- 
sonal computerists. Computer Games has 
"Blackjack", "Draw Poker" and "Jackpot", 
but done rather well. In addition to a fairly 
good description of each game, the authors 
have included probability tables which for 
"Blackjack", give the combinations and odds 
for hitting any particular count; for "Draw 
Poker", give the odds for being dealt each type 
of poker hand; and, for "Jackpot", a payoff 
table listing the odds for spinning a winner. 

There are three interesting dice games, 
"Kismer", "Notone" and "Rollon" — if you 
go for the computer tossing dice, that is. 

The grid/math/number games include 
"Boggle", a number-based Mastermind; 
"Escape", a grid game which pits you against 
five enemy attackers on a simulated battlefield; 
"Golf, a computer simulation; "Gunner", the 
old artillery game which teaches you a bit about 
trigonometry; "Skeedoodle", a math game; 
"Stock", a good stock market simulation. 

Luck and Skill 

The remaining four games require an equal 
amount of luck and skill. "Basket" is a 



2-player basketball game. "Dogs" simulates a 
dog race for up to 13 bettors. This program 
even skims off 17 percent of the wager pool 
before it pays the win, place, show and perfecta 
wagers! 

"Horse" pits up to 10 players, each having 
12 horses. The object is to get one of your 
horses over the finish line before any of your 
opponents. "Tennis", anyone? Input your 



position, the type of shot, and the area your 
shot should go to on the opponent's court and 
settle back. 

The book is a good buy for anyone willing to 
accept the challenge of converting and debug- 
ging programs to expand his or her game 
library. It combines a learning experience with 
pleasure, and this, according to Weinberg, is 
the goal of Computer Games. ■ 



Planetary Lander 
Instant Software, Inc. 
Peterborough, N.H. 

$7.95 

by John Warren 

pace games are one of the most durable 
^-^commodities of the microcomputer boom, 
and spaceship landing programs are a mainstay 
of the genre. One of the best of these is 
Planetary Lander by Instant Software, Inc. 

While the early lander programs were limited 
to number displays, graphics are now in. 
Planetary Lander shows the position of your 
ship in relation to an altitude "yardstick," the 
scale of which changes as your ship approaches 
the planet's surface. 

Next to the altitude display is a control read- 
out that gives lapsed time, speed in meters per 
second, thrust and other indicators. Two of the 
readouts use horizontal bar graphs that give 
speed as a percent of terminal velocity and the 
amount of fuel remaining. These displays are 
updated at one second intervals. 




Instead of limiting itself to a single planet, 
Planetary Lander allows the player to attempt a 
landing on any of the nine planets (and the 
moon) in the solar system. 

Both the thrust and its duration are input as a 
single statement eliminating the need to re- 
peatedly enter identical inputs — an annoying 
feature of some other lander games. 

Although Planetary Lander is only available 
in Level I, Radio Shack's conversion program 
transforms it to Level II by altering only two 
PRINT AT statements (lines 300 and 330). 

Combined with Stellar Wars, a space war- 
fare game, in a two program package (Star 
Trek III), Planetary Lander is an outstanding 
value. ■ 



Interlude: The Ultimate Experience 
Syntonic Software Corp. 
Houston, TX 
$14.95 tape, $17.95 disk 

by Chris Brown 
80 Staff 

Silicon pundits have told us for a long 
time that computers will play a major role 
in our changing lives. We will see the advent 
of electronic mail, electronic money, even 
electronic crime. It seems to me that if the 
devilish device is ever to be mainlined into our 
cultural envelope, it must service more basic- 
needs than game playing and accounts 
payable. Something really basic, for example, 
like sex. 

The time has come. The era of home com- 
puter sex is finally at hand, brought to you by 
Syntonic Software, a forward-looking sub- 
sidiary of Software Technology, Inc. These 
people arc not above pandering to your 
prurient instincts for a buck, or fifteen bucks, 
actually. 

Billed as the ultimate experience, the Inter- 
lude package is a curious piece of software for 
several reasons, not the least of which is the 
unmitigated gall the folks at Syntonic were 
able to muster to market this X-rated program 



in the first place. 

What exactly is Interlude? Well, it isn't 
hard core, high resolution graphics, so if 
you're into blue movies, forget it. You won't 
get that sort of display with Interlude. 

In essence, Interlude is a well-structured in- 
terview designed to plumb the depths of your 
sexual preferences in ten probing questions, 
after which it refers you to a book of "inter- 
ludes" that accompanies the software. 

The paper-bound, 96-page volume of inter- 
ludes contains 106 elaborate sexual scenarios, 
written with acute attention to detail. Titles 
indicate content. For instance, "Wet Fun On 
A Hot Summer Night," "Good Vibrations," 
"Fellatio By Firelight," "Caveman," "My 
Way," "Satin Chains," "Macho Man." The 
list goes on. 

If the computer-suggested interlude suits 
your fancy (or fantasy), you may opt to act 
out the scenario. In addition, certain inter- 
ludes arc stored in the computer and do not 
appear in the book. Getting one of these gems 
is apparently cause for self-congratulation. 
Your answers must have been outstanding! 

This computerized extension of spin the 
bottle is not a revolutionary premise but is, 
one has to admit, an unusual application for 
the home computer and certainly not what the 
gang at Tandy had in mind. 

The software algorithm of this machine lan- 



80 Microcomputing, September 1980 • 21 



SO REVIEWS 



guagc program is straightforward. The inter- 
view formal is logical, and all questions re- 
quire a numerical answer, indicative of the 
degree of enthusiasm the respondent demon- 
strates. Some of the more mild examples are: 

How complicated do you want this interlude 
to be? 

1 . Back to basics. 

2. Keep it fairly simple. 

3. I'm not choosy. 

4. Maybe a small production. 

5. I'm ready for a really big show! 

— or— 
If you were a movie, which would you 
be? 

1. Pillow Talk 

2. Tom Jones 

3. Gone with the Wind 

4. Superman 

5. A Streetcar Named Desire 

6. Fcllini's Satyricon 

After answering several of these thought- 
provoking questions, the computer gets down 
to the nitty-gritty and quizzes you on 
specifics, hopefully picking up on your mores, 
folkways and taboos. Your scalar answers are 
then processed, and an interlude indicative of 
your final tally is suggested. 

The program is fairly interactive. Suzy, one 
of our foxiest secretaries here at 80 Micro, dis- 
played so little enthusiasm during one inter- 
view session that she was directed to interlude 
number 29. The scenario for this interlude 
instructed her to stay home alone and curl up 
with a good book. 

If the interlude suggested is not quite what 
you had in mind (e.g., an acrophobic being 
assigned an interlude involving a high-Hying 
swing), you may request an alternate in- 
terlude. 

You may choose from about six alternates 
before the computer assumes you are a spoiled 
brat and gives up. 

The disk-based version of Interlude we've 
been using even bombs out at this point, pain- 
ting the screen with 2-byte stack symbols as 
the video memory fills. Although this seems 
like a bug to me, it does get the point across. 
Syntonic uses their own DOS boot, which may 
still contain a few bugs related to program ter- 
mination. 

For all its daring, the Interlude package is 
fairly tame in its attitude toward sexual en- 
counters. The maximum number of partici- 
pants in any interlude is limited to two, so no 
free-swinging, group gropes are possible. Fur- 
thermore, all interludes arc strictly hetero- 
sexual. No gay or even bisexual interludes are 
allowed. 

Syntonic hints that this is just the begin- 
ning. The last page of the book suggests that 
Interlude II is coming and requests that users 
send their favorite interlude to Syntonic for 
inclusion in the next edition. No mention of 
royalties is made, but the concept is certainly 
democratic. We may even feature the Inter- 
lude of the Month in 80 Microcomputing 
someday. 

Syntonic's marketing has caused raised 
eyebrows in the industry, and their full-page 



living color ads have elicited both pro and con 
responses from readers. A few irate subscrib- 
ers have taken offense at the quasi-naked lady 
approach Syntonic uses in their promotions 
and canceled. Generally, most readers seem 
curious or amused, rather than indignant. 
This may be just another indication of the 
decadence of the electronic age. 



There you have it — Interlude: The Ultimate 
Experience. The first microcomputer-based 
adult computer program. Will it be a mile- 
stone in microcomputer software, or just 
another trendy diversion? Time will tell. 

What's next? A microprocessor-controlled, 
RS-232-compatible love doll, perhaps. Wel- 
come to the micro-millenia. ■ 



ISAM 

Johnson Associates 
Redding, CA 

$50.00 

by William L. Colsher 

ISAM (Index Sequential Access Method) is a 
set of BASIC subroutines and utilities that 
allow the programmer to create and maintain 
direct access files using keys, rather than the 
hardware-dependent numbers used by Radio 
Shack. For example, a program can access a 
library catalog by the title of a book, rather 
than by some arbitrary number. ISAM requires 
32K and is available for the Model I or Model 
II. 

The ISAM routines which must be merged 
into the application require about 4.5K. There 
are also minor restrictions on variable names 
used by ISAM and, of course, the line numbers 
used by the routines. 

Efficient Disks 

In return for these restrictions, ISAM pays 
off with greatly increased disk space efficiency. 
The Radio Shack random access file method 
wastes a large portion of space if your file has 
only a few records in it . If, for example, the file 
contains records numbered 1 and 100, you have 
actually grabbed space for 100 records, even 
though the file contains only two! 

ISAM files with two records take up space 
for only two records. 

In addition to BASIC subroutines, several 
utilities are provided on the distribution disk. 
INIT is used to create new ISAM files, REORG 
is used to free space taken up by deleted records 
and sorts the file in key sequence, and ISAM- 
PRNT enables you to list the entire file in key- 
sequence on the printer or screen. 

Most companies are content to simply pro- 
vide the routines and utilities, but Johnson has 
included a demonstration program— a mailing 
list system. It may not be the most terrific mail- 
ing list program in the world, but it is more than 
adequate for my personal use and, I suspect, 
for some small businesses. 

Suitability 

ISAM does everything it promises very well. 
Anyone who has suffered the agony of trying to 
fit an existing numbering or naming system into 
Radio Shack's random access method, with ev- 
erything but a shoehorn, should look into this 
package. 

Finally, one of its best features is Johnson's 
delivery. I got my program six days from the 
day I mailed my check. ■ 



Z80ZAP/CMD 

Org-Tex Industries 
Uwisville. TX 
$29.95 

b> Bill Vick 

80ZAP/CMD makes lost file recovery. 

Li file patches and file maintenance a real 
joy, primarily because of its Hash Index. 
Z80ZAP calculates the hash code for any file- 
spec instantly. 

The Z80ZAP/CMD diskette comes with 
Backup on auto when it is booted up. This is a 
subtle way of telling the user to make a copy be- 
fore he experiments with it. The diskette also 
contains a write protect tab, apparently one of 
those "protect us from ourselves" safeguards. 

Automatic or Self-prompting 

The documentation is contained in four 
brief, but comprehensive pages. Most of the 
commands are either automatic or self- 
prompting, making Z80ZAP a real breeze to 
use. Written in machine language, the run time 
is almost instantaneous in all modes, including 
power up. 

When you load the program it waits two sec- 
onds for you to enter a command. 

In the R (read) mode, having entered your 
drive, track and sector numbers, a well organ- 
ized display appears on screen. The first col- 
umn of numbers on the left side of the screen 
represents the drive number; the second col- 
umn, the track number; and the third column, 
the sector you selected. Next is the column con- 
taining the byte numbers, or the location of the 
first byte of each row in the display. All col- 
umns are separated by a blank column for easy 
reading. 

In the middle of the screen is a hex dump dis- 
play of the sector you selected. To the right of 
the screen is an ASCII dump of the same sector. 
Each dump has its own Hashing cursor. The 
cursors move relatively, indicating the ASCII 
byte that corresponds to the hex byte. 

The most fascinating aspect of the program, 
the Hash Index Code, can be demonstrated 
while the display is on the screen. First, read a 
sector from the directory track, (11), sector 
2-9. Choose a program listed in the directory 
and move the cursor down over the first letter 
of the filespec name. 

By pressing H, a new column instantly ap- 
pears on the screen between the hex and ASCII 
dumps. At the top of this column will be the 
Hash Code number for the filespec. Directly 
below it will be the words Hash Code spelled 
out vertically, with an arrow pointing to the 



22 • 80 Microcomputing, September 1980 



EX AT RON 
STRINGY FLOPPY 



I.M. 



SPEED 

LOW COST 

RELIABILITY 



Exatron is a California based corpora- 
tion that has been in business since 1974. 
As well as the Stringy Floppy. Exatron de- 
signs, manufactures and sells state-of-the- 
art electro-mechanical equipment for a 
variety of commercial and industrial ap- 
plications Exatron is an established sup 
plier of automatic test equipment to manu- 
facturers, and large OEM users, of mte 
grated circuits worldwide. 

WHAT IS IT? 

The Exatron Stringy Floppy (ESF) is an 
extremely fast, reliable, economical alter- 
native to cassette or floppy disk storage of 
computer programs or data. 

Totally self-contained, the ESF has no 
buttons, switches, knobs or levers to adjust 
or forget. All of ESF's operations are 
under the computer's control 

HOW DOES IT WORK? 

The ESF uses a miniature tape cartridge 
(called a wafer) as the data storage 
medium, about the size of a business card 
and 3/16th of an inch thick. The tape used 
inside the wafer is a special Mylar based 
Chrome Dioxide type, specially developed 
for digital applications. Wafers are avail- 
able in several lengths. 5 feet being the 
smallest and capable of holding up to 4 
thousand bytes of information — the 
75-foot wafer is the largest available and 
can hold up to 64 thousand bytes of data. 

The wafers contain a single reel of the 
special tape connected as a continuous 
loop, the ends being spliced together with 
a piece of reflective tape. In operation the 
ESF drive unit pulls the tape from the 
center of the reel inside the wafer, causing 
the entire reel to rotate. Thus, the tape 
automatically winds itself around the out- 
side of the reel at the same rate as which 
it is pulled from the center. This process is 
similar to that found in an 8-track car- 
tridge. 

The ESF transport mechanism is very 
simple, consisting of a precision die-cast 
aluminum block — with a capstan, drive 
motor and magnetic record/replay head 
mounted on it. The wafer loads into a slot 
in the casting (it will only fit the correct 
way) and the tape is driven at a single 
point by the capstan, past the record/re- 
play head. 



The software in every ESF adds a parity 
bit to every byte saved on tape, and a 
checksum to the end of every file These 
are checked both after recording data and 
upon replay, any detected error is indi 
cated by a message on the video display 
This system of automatic error checking 
gives confidence m any data saved, also 
each wafer is rated for at least 2.000 com 
plete passes past the record/replay head. 



n 



Assembled and tested 

All operating software in ROM 

Fully automatic operation 

Professional quality 

No Expansion Interface required 

Large Owners Association 

High speed operation 

Extremely reliable 

No technical knowledge needed 



^ 




HOW DO YOU USE IT? WHAT'S THE CATCH? 



Once connected to your computer the 
ESF operating system needs to be activat- 
ed—simple Just type •SYSTEM'(enter). and 
in response to the 7 prompt type 712345' 
(enter) Your TRS-80 will instantly display 
the ESF sign on message EXATRON 
STRINGY FLOPPY VERSION 4.1 \ and from 
this point onwards you will have the extra 
commands r n LOAD'. tfzSAVE' and 
'is NEW" recognized by your TRS-80 

The ESF's operating system is built into 
the electronics of the unit, in much the 
same way that BASIC is built into the com- 
puter, so it is always available - the 
SYSTEM command is to let your computer 
know that the ESF has been connected. If 
you normally reserve some memory for 
subroutines then the ESF software will 
relocate itself under your selected top of 
memory The ESF uses only 4 bytes of your 
available RAM. these bytes are used to 
point' to the 2048 bytes of software in the 
ESF unit itself. 



Well, the only catch that most people 
find is that they have to actually pay Ex- 
atron for their unit! Even this is no big 
deal 

Starter Kits are available with the Exatron 
Stringy Floppy, a supply of wafers, a bus ex 
tender and a selection of useful programs - 
for $299 50. 

Through regular advertisements in both 
Kilobaud Microcomputing and 80 Micro- 
computing, owners are kept informed of 
the latest developments in wafer-based 
software Plus hundreds of user work- 
shops' are starting up over the country, so 
you can always be sure of being near to 
another ESF owner 

Exatron also gives a 30-day full money- 
back guarantee, with a 1 year parts and 
labor warranty on the unit 

If you have any questions about the ESF 
then give Exatron a call on the Hot Line 
lout side CA) 800-538-8559. 

East Coast customers can call 800-343- 
4424 (inside MA 617-899-3862) 



I ! 



Open House Workshops take place from 9 am till 1 pm every Saturday at Exatron's 
factory in Santa Clara, and on the East Coast the last Saturday in each month at 
Micro Communications, 80 Bacon Street, Waltham MA 02154. All are welcome. 



) 



exatron 

3555 Ryder Street 

Santa Clara, CA 95051 

408-737 7111 



^3 



■ Reader Service- see page 226 



80 Microcomputing, September 1980 • 23 



SO REVIEWS 



code at the top. Below this will be the track 
number, sector number and byte location to in- 
stall the code to recover a killed file. By pressing 
the minus key you are able to page back to the 
first sector in the directory track, where you 
may apply the code to recover the file. The 
code, as well as all other information, remain 
on the screen as you page. 

While in the display mode, pressing M. mod- 
ify, allows you to change any byte in the dis- 
play. 

While in the modify mode, the hex cursor in- 
creases in size. Any key pressed (0-1, A-F) 
modifies the byte at the current location of the 
cursor. After each modification, the cursor ad- 
vances one position. 

While in the modify mode, you have access 
to the W, write, command. The W command 
does not immediately write to disk. Instead, the 
prompt comes up. asking you if you desire to 
write to a drive other than the one you read in. 
If the destination is the same, simply press 
7ENTER? and the write takes place. You then 
return to the display mode. 

Z80ZAP even makes sector compares easier 
by using the C key. Pressing C gives you a byte- 
for-byte comparison of any sector on any drive 
to the sector on the display. This function is 
nice to have, if a voltage spike or some other lit- 
tle gremlin got into your diskette. An example 
of this is a diskette that does not boot up be- 
cause of a zapped byte in BOOT/SYS. The 
compare function compares this sector to a 
good diskette and pauses at each byte that is not 
the same. Pressing 7ENTER? continues the 
comparison. 

Another invaluable function is the F, find, 
command. With a sector of data displayed on 
the screen, press F, followed by a two-digit hex 
byte. The flashing cursor goes off to look for 
the byte and resumes flashing directly over it— 
if it exists. If the sector does not contain the 
data, the cursor returns to the first location in 
the display. This function is great for apply 
patches or fixes. 

Using the L, locate, function lets the pro- 
gram move the cursor for you. Press L, fol- 
lowed by the byte number you wish to pin- 
point, and the cursor moves automatically over 
the location. This function also comes in handy 
in applying patches. 

To escape any of Z80ZAP's modes, press X. 
This will return the Hashing cursor to the first 
byte of the display. 

Following arc some of the other important 
functions of Z80ZAP: 

+ or - Pages forward or backward, one sec- 
tor at a time. 
Z Zeros out a sector, handy for clean- 

ing up cluttered sectors on your 
diskettes. 
J Jumps to DOS READY. A word of 

caution here: After using Z80ZAP, 
always reboot the system, as the au- 
thor resets the stack pointer to a dif- 
ferent location than DOS does. 
D Puts you in debug: "G" [ENTER] 

returns you to Z80ZAP. 
The documentation also includes easy in- 
structions for removing passwords from all 
files, as well as extremely easy directions for re- 
covering a killed file. ■ 




Model 800 Printer 
Base-2 

Fuller! on, C'A 
$499 

by Milan D. Chepko 

hortly after adding a disk drive to my 
TRS-80. I decided it was time to turn il in- 
to a decent business system by adding a hard 
copy device. 

1 considered Radio Shack's price of over 
$1000 for their line printer to be out of the 
question, so 1 started looking around in the 
computer journals. There are several com- 
panies producing less expensive line printers 
compatible with the TRS-80, but I finally set- 
tled on the Base-2 Model 800. 

Among its many hardware and software 
features, perhaps the best is the low price — 
$499 for the standard model with friction-feed 
paper drive. 

The printer arrived about six weeks later 
than initially promised, and the paper rack ar- 
rived even later. 

Lighter Than Centronics 

Weighing 10 pounds and measuring 14 by 
10 by 3 inches (six with tractors), the Base-2 
printer is considerably smaller and lighter 
than the standard Centronics 779 printer from 
Radio Shack. It prints 60 lines per minute 
bidirectionally. Its ribbon cartridge is sup- 
posedly good for five million characters. 

All the component subassemblies use con- 
nectors on the cables, so replacement should 
be relatively straightforward. The construc- 
tion is generally sturdy and, though it should 
tolerate considerable use before needing re- 
pairs, I believe the Centronics 779 would 
stand up better under heavy day to day use. 

The Base-2 printer uses an 8085 chip and 
two ROM chips, along with up to four RAM 
chips to achieve some sophisticated functions. 
For example, six different character densities 
are available per line (64. 72, 80. 96. 120. and 
132), and can be selected by a back panel DIP 
switch or by a software control program. 

The DIP switch on the back panel is used to 
establish a standard print density. This can be 
changed at any time. I generally leave mine in 
the 80 character position. This generates an 
automatic line feed after a carriage return, 
which is needed with the TRS-80. 

In addition, the characters can be printed in 
double width in any of the densities, giving 
you 12 different lype sizes. The double-widlh 
characlers can siari and stop in the middle of a 
line for highlighting. Also, lowercase charac- 
ters can be printed by generating the proper 
ASCII code. (On the TRS-80, this is done by 



holding down the shift key while typing the 
letters.) 

The printer comes with two different sets of 
characters— standard and APL, both in 
ROM. There is room for three more character 
sets in ROM (although details are a little 
sketchy in the instruction book). A sixth set 
(maybe the TRS-80 graphics?) can be loaded 
into the on-board RAM by program software. 
Characters are printed in a 5 by 7 dot matrix. 

Changing the different character sizes and 
fonts is relatively easy. Issue an escape char- 
acter, followed by the control code describing 
the desired function. With the TRS-80. the se- 
quence would be: 

LPRINT C HRS(27».l HR(\); 

The codes are all described in the book that 
accompanies the printer. 

Three options can be added to the standard 
Model 800. Option S controls the paper ad- 
vance from one dot to more than full-charac- 
ter height. It permits rapid paper advance 
without forcing the print head to traverse the 
paper, which is important in printing graph- 
ics. Since this is a bidirectional printer, there is 
some variance in character position from line 
to line. Option S prints in one direction, which 
eliminates most of the wobble in the print- 
head-drive mechanism. 

Option T is the tractor feed and I recom- 
mend it based on my limited experience with 
friction feed. Option M adds extra memory, 
enabling the printer to accept 1920 characters 
from the CPU in a burst, then print them out 
while the processor is doing something else. 

Each of these options adds an extra $50. 
But, in order to add the tractor feed (T), you 
have to add paper advance control (S). The 
tractor feed version ends up costing $ 100 more 
than the standard model. However, this is still 
$300 to $400 less than the comparable Cen- 
tronics model, which lacks many of the Model 
800's features. 

Versatile 

Unlike many printers, this one is versatile 
with a capital V. In addition to the Centronics 
port required by the TRS-80, there is a serial 
port handling baud rates up to 19,200 and ac- 
cepting RS232 or 20 mA current loop signals, 
along with an IEEE 488 port that should be 
compatible with Pet syslcms. 

In general, the Base-2 printer is an excellent 
product, and should provide good service for 
most TRS-80 owners. As an added gift, it is 
quiet. Unlike the Centronics 779, the Base-2 
printer is completely silent when it is not print- 
ing. If your printing workload is light to 
medium, the Model 800 could be just what 
you're looking for!H 



120 CHrtffCrtRS/Ur* 

132 U#*tt1fcKS/UNE 

t£LUMUrt rt^L> 



24 • 80 Microcomputing. September 1980 



1 . Outlasts every competitor— 200,000.000 
character head warranty 

2. No duty cycle limitations — even in demanding 
business applications 

3. Professional print quality —9 x 7 matrix 

4. Rugged business use construction — metal 
chassis — two motors 

5. 80 characters per second 

6. Upper and lower case — full 96 character 
ASCII set 

7. Double width characters 



8. Connects directly to TRS-80,™ APPLE " and 
other computers 

9. Block graphics — 64 shapes for charts, 
graphs, diagrams 

10. Friction and pin feed 

1 1 . Plain paper — up to 3 parts 

12. 6 and 8 lines per inch — program controlled 
paper savings 

13. 80 and 132 columns — program controlled 

14. Price — the best value in the industry. Call or 

write today for the name of your local 
Microline 80 dealer. 



{ >\ltl\,. x 



j^a 



14 REASONS 
WHY TRS-80 
OWNERS 
CHOOSE THE 
MICROLINE 80 



^n 




TRS-80 is • registered trade mark of Radio Shack, a division of Tandy Corp. 



All fourteen are standard with every 
Microline 80. The only options are 
snap-on tractors and a buffered (up to 
2000 characters) RS232 interface. 



OKIDATA 

Okidata Corporation 

111 Gait her Drive, Mount Laurel, New Jersey 08054 

Telephone: 609-235-2600 



- Hetdei Serve e see woe 22b 



80 Microcomputing, September 1980 • 25 



559 ACCOUNTANT 



by Michael Tannenbaum C.P.A. 



"For the professional 

accountant or executive. . . 

(Visicalc) is a pure gift. M 



£ \pc of the most frequent questions that I 
\-^have been asked is how the reliability of 
the Model II compares with the Model I. Until 
recently I was unable to give a reply. My Model 
II has performed virtually without a flaw since I 
acquired it. That is, until last week. 

All of a sudden the program I was working 
on dropped out for no reason. When I at- 
tempted to reboot, the operating system gave 
me a memory fault error message. After several 
more trys, I gave up and brought the computer 
to my neighborhood computer center. 

After a brief trial, the salesman agreed that 
the computer was not functioning properly and 
turned it over to the capable hands of the re- 
pairman. Twenty-four hours later it was re- 
turned properly repaired. Frankly, while I was 
not overjoyed to have the computer break 
down after it was out of warranty, the experi- 
ence was not unpleasant. When the Model I 
had problems, the computer took so many trips 
to the repair center I thought they owned the 
machine. 

Pioneered with Model I 

Of course, to be fair, I was a pioneer with the 
Model I. Not only did I purchase one of the 
first 16K Model Is, but I also had one of the 
first interfaces and disk drives. When the ma- 
chine broke down, the local repair center was 
unequipped to deal with it. 

A major difference between the two comput- 
ers lies in the diagnostics that the Model II auto- 
matically performs on power-up. This prevents 
you from using an improperly performing de- 
vice. 

Unfortunately, it is quite easy to use a sick 
Model I. Because much of its operating system 
is in ROM, a memory fault could remain unde- 
tected until a debugged program bombed. Dur- 
ing the time the chip was inoperative, the owner 
could be quite unaware that the machine was 
causing problems. If the computer was just 
used for playing games, such a situation need 
not be fatal. However, if the Accounts Receiv- 
able or the General Ledger file was destroyed as 
a result of the flaw, recovery would certainly be 
painful. 

I recommend that Model I owners acquire 
any of the diagnostic programs that are avail- 
able and run them on a regular basis. 

Well, now that we have covered the "un- 
thinkable" system failure, let's get down to the 
subject of this month's column. . .Accounts 
Payable. Accounts Payable recordkeeping is a 
requirement for almost all businesses. Bills 
must be accumulated and paid for supplies, ser- 
vices and merchandise. Since this type of activi- 
ty usually involves the analysis of invoices, cod- 



ing for subsequent posting to the general led- 
ger, posting to a vendor's payable ledger, prep- 
aration of a check and preparation of a remit- 
tance advice, much work is required. In fact, 
much of the data has to be written over and 
over again. 

The tedious nature of this work has resulted 
in the development of many different Accounts 
Payable systems. One of the most common is 
the so-called One Write system. In a One Write 
system, a scries of forms is designed so that the 
repetitious data is reproduced on all the docu- 
ments by means of carbons with a single entry. 

Another widely used method is the account- 
ing machine, which, like the One Write system, 
uses special forms and requires careful posi- 
tioning when posting data. 

Recent models of electronic accounting ma- 
chines are computers in almost every sense of 
the word. These electronic accounting ma- 
chines, like their mechanical predecessors, 
maintain data on individual ledger cards, much 
like the generations of bookkeepers before 
them. Unfortunately, most computer systems 
do not generate a ledger-card type of record. 

A ledger card contains not only the detail of 
open transactions, but also a record of histori- 



cal closed transactions. Because a microcom- 
puter does not have the capacity to retain closed 
transactions, a ledger card cannot be produced. 
If the lack of a ledger card makes it difficult for 
your staff to function, I'd advise against a mi- 
crocomputer payable system. 

At the end of last month's column, 1 indicat- 
ed that the Radio Shack General Ledger system 
appeared to be the first element of a fully inte- 
grated accounting recordkeeping system. The 
Accounts Payable system catalogue #26-4505 is 
the second element. This system can stand 
alone or be used with the General Ledger. If it is 
to be integrated with the General Ledger, a sec- 
ond drive is required. 

Prior to using the system, an initialization 
program must be completed. You are required 
to specify the firm's name, address, system 
password, internal ledger codes (GLC)s and ac- 
counting method to be used. 

The GLCs are used by the payable system to 
identify ledger accounts. They are not compati- 
ble with the codes used in the General Ledger 
system. For example, an expense account re- 
quires two codes, one for Accounts Payable 
and one for the General Ledger. Both codes 
continued to next page 



EDUCATION g0 

bv Earl R. Savage %f\J 



Savage 



t^ducation 80: The role the 80 plays in 
«-4eaching/learning/educational experi- 
ences. This is the world of the classroom AND 
the homeowner learning to repair a leaky fau- 
cet; the driver learning to tune up his car; the 
new employee learning his job; the old em- 
ployee learning new skills for a promotion. 

Well, you have the idea. The young, old and 
in between are involved in teaching/learning/ 
education at school, at home, work, play — ev- 
erywhere. And the 80 can be the most effective 
aid to those learning situations if we can enlist 
its help. 

That is exactly what we will be discussing in 
this space each month: using your 80 in all 
kinds of instructional situations. We will ex- 
change ideas on planning, programming, eval- 
uating and improving. We'll get into software, 
both home-grown and commercial, and even 
into hardware. 



Sharing Techniques 

In this column, we'll share thoughts and 
techniques for making the 80 a better teacher. 
That's right — share. We will discuss what I 
have found and the findings of others, in- 
cluding you. Each one of us knows something 
about the 80 and about a skill or process that 
others want to learn. Now is the time to begin to 
put it all together. 

Me? Well, I've been in education and elec- 
tronics more years than I care to admit. As far 
as the 80 is concerned, I am far enough "into" 
programming and computer assisted instruc- 
tion (CAI) to have gained a bit of skill and 
glimpse its potential. 

I am convinced that we are on the threshold 
of a real revolution in both formal and infor- 
mal learning. The microcomputer will bring 
changes beyond our current imagining. Teach- 
continued to next page 



26 • 80 Microcomputing, September 1980 



5ft ACCOUNTANT 

From page 26 



must be available to Accounts Payable, if auto- 
matic posting is desired. Failure to do this accu- 
rately will automatically abort the General 
Ledger update at the end of the month. 
When using an integrated Payable and Gen- 



EDUCATION $0 

From page 26 



ing/learning will never be the same. We have 
barely scratched the surface. 

All we have to do is apply our programming 
skills to create situations that help others learn 
most effectively. 

You are invited— no, urged— to participate. 
I welcome your questions, comments and sug- 
gestions about this column. 1 and other readers 
will be most interested in your ideas, software 
techniques and hardware designs. 

What have you found that works well? That 
doesn't work? The rest of us would like to 
know. Write me in care of 80 Microcomputing, 
and they will send you letter along. If you 
would rather "write" on a cassette, that's all 
right, too. 

Oh, yes; I will answer as many of your letters 
as time permits, especially if you have included 
a self -addressed stamped envelope. 

Recording Progress 

Suppose that you have an instructional pro- 
gram that the user studies independently in 
school, office or wherever. Further, the "in- 
structor" wants to keep a record of the user's 
progress. 

Often in such cases, the user and/or the in- 
structor simply writes down the final score 
from the display. It is much more satisfactory 
to have a printout of that information and that 
can be done with the simplest printer. 

The following few statements will do the job 
on the little RS Quick Printer II. (Change the 
commands to suit your printer.) 



IOJO PRINT "PLKASE SWITCH ON THE PRINTER AND 

THEN PRESS ENTER." 
1033 BJ = INKEYS : IF B$ = -'THEN 1035 
1040 LPRINT "NAME 

1045 LPRINT "PROGRAM : AMATEUR THEORY II" 
1050 LPRINT "SCORE : "R" RIGHT OF "T" 

ATTEMPTED" 
1055 FOR X = I TO 4 : LPRINT : NEXT 
1060 END 



Certainly, the variable names will have to be 
made to agree with those in the program. Ev- 
erything should be clear, except perhaps line 
1055, which simply runs the paper up four lines 
so that the printout clears the tearbar. 

This small section prints the essential infor- 
mation, but is easily expanded to include what- 



eral Ledger system, it is a good practice to spec- 
ify a Miscellaneous Account. In the event that 
the specific code is not known, the operator of 
the system will have an account to use which is 
acceptable to both the payable and ledger 
systems. 

Looking over the sample reports supplied 
with the system, I was quite pleased to note 
many "big" system features. In addition to an 
Invoice Listing, Posting Report and an Aging 
Summary, there are Cash Requirements Re- 
ports, Check Preview Reports and a Discounts 



ever you want on the record. Best of all, not on- 
ly can you put it in programs that you write, but 
it can be inserted easily into any you wrote and 
any that you've bought. 



Program Modifications 

A well known expression states, in one form 
or another, that one should not waste time re- 
inventing the wheel. So it is with programs. If 
there is an existing program that meets your 
needs, why spend time writing your own? Bet- 
ter to use it, while writing one that does not ex- 
ist. 

There are instances, however, when a pro- 
gram does part of what you want. It may be a 
game which uses the information you wish to 
teach. It may be an instructional program but 
written for the wrong level — too easy or too 
hard for the student(s). It may have too much 
or not enough explanatory material. 

My own approach in these cases is to modify 
the existing program rather than begin at zero. 
Let's look at an example. 

Suppose you want a tutorial program on 
Newton's Laws of Motion. Suppose, also, that 
you have one of the many forms of that popu- 
lar game in which the player attempts to land a 
space vehicle on a planet. The game provides 
excellent application and practice in using New- 
ton's Laws. Your best bet is to use that pro- 
gram and add the instructional part. 

Here are some of the elements you would 
consider adding: 

Title introduction including personalization; 

Tutorial material, perse, on the level and to 
the depth appropriate; 

Introduction to and rules of the "game"; 

Choice within limits of the number of times 
to play; 

Reward/reinforcement frames for success; 

Review frames for failure; 

Scoring and score-keeping; 

Summary review and conclusion. 

As you see, even a game of the entertainment 
type can be turned into a valuable instructional 
program. There are many such possibilities. 
Often, too, relatively minor modifications will 
turn a poor program into an excellent one. 

Don't re-invent the wheel. Get in there and 
apply it in a different way. In later columns 
we'll discuss the elements listed above and find 
ways to make them easy to add. 

I'll meet you here next month for more Edu- 
cation 80. ■ 



Lost Report. Invoices are specified where a dis- 
count could be lost through failure to make a 
prompt payment. This feature, if properly uti- 
lized, can easily pay for the whole system. 

The information package includes a sample 
check and an order form for supplies. I do not 
see any way to customize the check printout, so 
you will probably be forced to order a supply of 
window envelopes. Using this envelope elimi- 
nates the need for addressing envelopes to the 
vendor. 

The screen formatting and the controls avail- 
able to the user are quite advanced. I especially 
like the file maintenance screens. If you cannot 
remember the number of a vendor, you can 
search by name. If you type just a few letters, 
the computer will automatically put you into 
the proper range for retrieving the information. 
You can then use the "previous" or "next" op- 
tions to locate the precise number. 

The system has a capacity of up to 500 ven- 
dors and 3,000 unpaid invoices can be accom- 
modated. As indicated previously it will run on 
a one drive Model II. 

Visicalc for Model I 

Just before I completed this article, Radio 
Shack announced the availability of the Visi- 
calc Software package for the Model I. This 
software package was originally developed for 
the Apple II and has proved so desirable that 
many Apples were sold on the strength of it. 

For the professional accountant or executive 
who is responsible for planning and projec- 
tions, this program is a pure gift. It turns the 
TRS-80 Model I into a multi-column, multi- 
line worksheet. Each column and line can be 
programmed so that a change in any one figure 
can automatically change all other related fig- 
ures. For example, if you are budgeting a 
12-month period, and each month's activity is 
related to a prior month, you can project an en- 
lire year's activity by simply entering the first 
month's data. 

The program is designed so that the work 
area can be scanned either horizontally or ver- 
tically in columns one to sixty, or lines one to 
two-hundred-and-fifty-six. Any portion of the 
work area can be printed and the results of the 
calculations stored on the disk for recall at any 
time. I urge you to see a demonstration of this 
software. I'm sure you will be as enthused as I 
am. 

In the several months that I have been pre- 
paring this column I have attempted to mix a 
little accounting theory with program reviews 
and recommendations. 1 am not sure how well 
this format has succeeded to date. I would cer- 
tainly welcome any comment on how the col- 
umn can be made more interesting. If you wish 
to contribute to the column, 1 will be glad to in- 
clude your comments with the appropriate 
credits. 

Since many of the TRS-80s currently being 
sold are disk systems, I am certain that there are 
many people who are using them for business 
purposes. Sharing experiences with others can 
be an excellent way to increase the value of the 
machine to all. I look forward to hearing from 
you. My address is: Michael Tannenbaum, 
CPA, 42 Bulaire Road. East Rockaway, NY 
11518. ■ 



80 Microcomputing, September 1980 • 27 



^APPLICATIONS 



by Dennis Kitsz 



"As you may have 

discovered when trying 

to install the high-speed 

modifications, Radio Shack 

has made some changes. M 



The gentleman in the back. Yes, in the green 
shirt. What was that? Customize your 
TRS-80? Sure, folks, just a few simple do-it- 
yourself changes can turn your computer into a 
funny-looking, but more powerful machine. 
Step right up, heat that soldering iron. It's time 
for the Autumnal Equinox Hardware Festival! 
This month we will be adding a second video 
jack, putting a radio frequency (RF) modulator 
into an expansion box, getting rid of the 
RESET lockup in the expansion box, bringing 
RESET up front, adding Level I and Level II, 
adding a keyboard expansion socket, elimi- 
nating the LPRINT/LLIST hangup, and doing 
some preliminary thinking about real-time 
clocks. And you can get nearly everything you 
need at your local Radio Shack. 

In Preparation 

First I have some mixed news for those of 
you with newer TRS-80s. 

As you may have discovered when trying to 
install the high-speed modifications, Radio 
Shack has made some changes. The two-chip 
ROM set is slow, and takes up both available 
ROM sockets; the cassette load improvement 
modification ("XRX") prevents data I/O at 
high speed; and the new expansion box is 
somewhat locked into standard speed. Also, 
the updated no-bounce keyboard style makes it 
harder to install top-mounted items such as a 
control key, and so forth. Radio Shack has 
gone through so many alterations to the com- 
puter that models now hardly look like my own 
antique machine. 

Let me offer a few precautions before start- 
ing. Open the case carefully, setting aside each 
part in order (six screws and six white keyboard 
grommets). Work on a large surface, and set 
the unit on a towel to protect its finish . Flex the 
keyboard's cable as little as possible, and put 
absolutely no stress on it. And most of all, 
always make any changes with the power off 
and disconnected. 

Let's start with an easy one, the installation 
of an extra video jack. You'll need a sub- 
miniature plug/jack pair, a video jack, wire, 
solder and cosmetic tools. 

You can always use this extra video jack, es- 
pecially if your machine makes frequent 
appearances before the general public. You 
may add almost any sort of jack for which you 
have abundant matching connectors; I used a 
simple coax jack. Since long wires will tend to 
make your video signal look messy, choose a 
point near the normal video outlet to mount the 
new jack. 

The plastic used for the TRS-80 case is soft 
and very pliable, almost enjoyable to work 



with. Exact-o knives, drills, wood or linoleum 
cutting tools, and even screwdrivers can be used 
to cut the plastic to the right shape and smooth 
out a hole. 

Open the case and select the placement of the 
jack carefully so that the 80 will reclose without 
striking or binding on the new hardware. Cut 
or drill a mounting hole, and install the video 
jack. Be sure to blow out the bits of plastic, be- 
cause these chips, which will cling by static, can 
cause havoc underneath keycaps. 

Now examine the TRS-80's normal video 
output (DIN) jack; it has five pins, three of 
which are used. Fig. 1 shows the video area with 
the cover removed. 

You will need only two pins because the five- 
volt output pin is used for activating the optical 
isolation circuitry in the video monitor. Isola- 
tion is necessary because, unlike most commer- 
cial monitors, this one has "hot" parts unin- 
sulated from potentially dangerous AC power. 

On Fig. 1 , locate the video and ground traces 
(D and B) where the DIN jack connects to the 
circuit board. Obtain a miniature audio con- 
nector, and mount it on the board, soldering 
the center (hot) lug to point D, and the ground 
lug to point B. 

Solder a short piece of coax cable to the 
mating connector, and run this to your new 
video jack. I used phono cartridge mounting 
hardware for this process. In any. event, if ease 
of getting in and out of the TRS-80 is important 
to you, then mating connectors will allow you 
to work on the computer without having to 



clip, solder, or disentangle anything. 

Insert the connectors, snap the case together, 
hook up your second monitor, and power up. 
Ahhhh. 

Picture and Sound, Will Travel 

Do you carry your video monitor everywhere 
you go with your TRS-80? There's no need to 
do all that lugging. Using a simple RF modula- 
tor available in kit form, you can put computer 
power in your back pocket (if you have very big 
pockets). The materials you'll need are the 
modulator, a case, two five-pin DIN jacks, one 
DIN cable. 

Start with the RF modulator— Radio Shack 
sells a $15 Project Board and complete surplus 
units are easily found. Assemble it according to 
the directions. Hook it to an ordinary televi- 
sion, and temporarily run computer video 
(from the new output jack) to it. The picture 
quality will be underwhelming, but that is 
mostly a function of the limited bandwidth of 
commerical TV receivers. 

For simplicity, you can put the whole assem- 
bly in a small equipment box, driving it with 
either your new video output jack or the built- 
in one. For the modulator's case, I used the 
empty slot reserved for the RS-232 board in the 
expansion interface, although any classy box 
will do. 

The center pin of the video DIN jack (pin C 
in Fig. 1) in the TRS-80 is not used. To it, attach 
a wire from the cassette port's audio output line 
(pin G on the cassette connection shown in the 




A NOT CONNECTED 

B GROUND 

C NOT CONNECTED 

VIDEO 

♦ S VOLTS 

CASSETTE ON/OFF 

DATA OUT 

GROUND 
I DATA IN 
J CASSETTE ON/OFF 



Fig. I 



28 • 80 Microcomputing, September 1980 




TRS-80* OWNERS: 

• Let the computer write your "Basic" 
program for you! 

• Draw pictures, animated figures, data 
forms! 

• Create a library of display forms! 

• Produce "Commercial" grade software! 



Beginner 



Horn* * 
, Animate' programmer 
Game* t * 

Wri««r * * 

A»s«mbly , 
Lansuas* * 
programmer 



The Magic Cursor is a Revolutionary Family of Products which 
provides a dramatic new method of reproducing drawings and displays 
that you create on your screen. It makes both simple displays and 
complex interactive data input forms. It stores a "BASIC PROGRAM" 
on disk (or tape) ready for you to execute alone or as a subroutine. It 
produces screens in both standard or wide screen. 

It is available for any level 2, 16Kor largersystem with tape or disk 
An optional version is now available which creates an assembly 
language program 

Be sure to pick out the system that fits your present needs and 
order it today. You may upgrade your original copy by paying the 
difference and a moderate service charge. 



MAGIC CURSOR PROGRAMS 

THE MAGIC CURSOR allows you to easily create screens (including 
graphics) on your video. A powerful command then generates the 
BASIC instructions to recreate the screen For the first time, a program 
for automatic generation of video display forms. (16K Tape or 
Disk) $24.95 

THE MAGIC CURSOR I additionally makes sophisticated Data Entry 
and Display easy With Magic Cursor I you define the Data Entry or 
Display fields directly on your screen. The definition commands 
generate the BASIC instructions to implement the Data Entry and 
Display. The Magic Cursor I has commands which move, center, and 
duplicate blocks of graphical or alpha/numeric displays. You can even 
justify text (16K Tape Only) $79.95 

THE MAGIC CURSOR II adds the power to write animated games 
easily in BASIC. The Magic Cursor II allows you to reload previous 
screens either from memory or from Disk. You can then modify them 
and store either the modified screen or only the changes. (32K Disk 
Only) $99.95 

THE MAGIC CURSOR III will be available soon for the new Model II 
Computer (32K One or more Disk) $149.95 

THE MAGIC CURSOR IV provides the features of Magic Cursor II but 
stores an assembly language program (32K Disk Only) $99.95 



WRITE FOR OUR COMPLETE 
SOFTWARE CATALOG!! 



Call 713 474-2484 or order by mail Master Charge. Visa Certified Checkor Money 
Order accepted Personal Checks require 14 days to clear COD or collect calls 
nol accepted Software guaranteed tor replacement only Prices suBiect to change 
without notice Some programs supplied on cassette tape For disk versions, the 
cassette supplied will automatically create a disk die 



NEW RELEASES FROM CCCH! 



The Supply Room 

A sophisticated program that is easy to operate This unique 
system helps you manage your retail or wholesale inventory of up to 
1000 line items. Cost may be fractions of a cent, item quantities may be 
decimal values. Automatic cost averaging of updated items and 
suggested sales prices based on gross profit. Transaction reports 
produced during posting functions Printed reports include: 

1. Transaction Listings. 4. Items on Order. 

2. Complete Inventory Listing. 5. Items Out of Stock. 

3. Listings by Prefix. 6. Suggested PC's. 

Requires Mod 1, 32K. 2 Disk $250.00 



The Filing Cabinet 

Take that collection of Job Orders, Personnel Records, Reports, 
Etc and get them organized You define up to 14 data input fields 
specifying field type - alpha/numeric or $$$, field length and field 
separators -such as slashes, etc. During data input, the cursor provides 
for character input and skips over the field separators. 

But that's only half the story. Output reports are automatic 
formated and program automatically requests column headings 

This means you can customize your own data base manager, 
complete with rapid data input and selective output reports Comes 
complete with documentation. 

Requires Mod 1, 32K, Disk & Printer $100.00 

Or Mod 2, 64K, 1 Disk & Printer $150.00 



The Restauranteur's Consultant 

by Ty Halderman 

This food and beverage management tool dramatically reduces 
the human factors in food cost analysis. Those tasks required to 
effectively operate any restaurant or food service business. Over a half 
dozen reports give uniform, accurate and up to the minute information 
for profitability. And, handling of daily cost changes requires only 
minutes per week instead of hours, because the Consultant makes all 
the necessary conversions from your case prices. Reports include: 

1. Menu Recipes. 5. Food Cost Summary. 

2. Ingredient Listing. 6. Input Data Sheets. 

3. Supplier Master File. 7. Batch Update. 

4. Complete Listing of Food Cost Analysis 

Mod 1, 32K. 2 Disk, Printer or Mod 2 $750.00 



"Trademark of Radio Shack, a Tandy Co. 



Send Check or Money Order Payable to: 

CUSTOM COMPUTER CENTER, INC. 

^a*^k TM Attn Jim Martens 

fl ^^^ w P.O. Box 58042 / Houston. Texas 77058 

Vjn|^ or call: (713) 474-2484 



QUAN. 



DESCRIPTION 



Handling Charge. $1.50 
Texas Res. add 6% Sales Tax 



SYSTEM 
(Size. Tape or Disk) 



TAX & HANDLING 



TOTAL 



PRICE 



MASTER CHARGE / VISA 

Card « 



SEND 

INFORMATION 

ONLY. 



.Expires 



NAME. 



ADDRESS. 
CITY 



.STATE. 



.ZIP 



^Reader Service - see page 226 



80 Microcomputing, September 1980 • 29 



^APPLICATIONS 



The Radio Shack catalog numbers, descriptions and 


prices Tor all the parts needed to compute the modifi- 


cation are shown below: 






General stuff 






Wire-wrap wire 


278-301-2,3 


1.99 


Solder- up 


64-2090 


1.49 


Added video jack 






1 F-61 video connector 


278-212 


2/. 89 


1 Miniature plug/jack set 


274-283 


2/1,99 


Added RF modulator 






2 S-pin DIN plugs 


274-003 


1.49 


1 RF modulator (parts extra! 


277-122 


16.95 


1 Case (optional) 


270-232 


2.49 


1 DIN cable 


42-2151 


4.99 


Modified E/l RESET 






1 Miniature SPST switch 


275-612 


1.69 


1 I0K ohm resistor 


271-1335 


5/. 39 


Added RESET button 






1 Pushbutton 


275-1547 


5/2.49 


1 Miniature plug/jack set 


274-283 


2/1.99 


Level I Addition 






1 Miniature DPDT switch 


275-614 


2.19 


2 IK ohm resistors 


271-1321 


5/. 39 


1 Level 1 ROM set 


(see text) 


$10 bribe 


Keyboard addition 






2 16-pin wire-wrap sockets 


276-1994 


2/1.39 


1 16-pin solder-tail socket 


276-1998 


2/ .89 


1 16-pin jumper cable 


276-1976 


3.99 


Paris List 





figure). Inside the RF box, wire two DIN jacks 
in parallel, hooking them up to the RF modula- 
tor as in Fig. 2. 

A short DIN cable connects the computer to 
the RF box, the TRS-80's original monitor 
plugs into the box's other jack, and the RF out- 
put goes to an ordinary television. See Fig. 3. 
Picture and sound can now travel with me and 
my TRS-80. 

Unlocking RESET 

Speaking of the expansion box, I'm amazed 
that Radio Shack has let users suffer with a 
RESET button that locks up the computer 
when ah E/I is connected. There's no good 
reason for leaving it that way, and fortunately 
the solution is very simple. You'll need a single- 
pole, single-throw switch and a I OK ohm re- 
sistor. 

Open the expansion interface, and locate Z32 
(near the power switch). If you have a newer ex- 
pansion interface, this will be marked Z39. In 
either case the part is a 16-pin IC, type 
74LS1 S3 . Now find pin 4, and identify the trace 
that leads underneath the IC and out its other 
side. Look carefully, using an ohmmeter to be 
sure it's the right trace. 

Got it? Okay, take a sharp blade and cut 
through it. Run a 10K ohm resistor from the far 
side of the trace to pin 16 of Z32 (or Z39), and 
solder it carefully. Finally, run a pair of fine 
wires, one from each side of the cut trace. 
Solder one wire to each connection of the 
miniature toggle switch. When the switch is on, 
the cut trace is bridged, and the expansion in- 
terface acts normally. When the switch is off, 
the RESET button again works correctly. 

Why did the expansion box hang up the com- 
puter in the first place? When you power up or 
hit the RESET button, the CPU clears a few in- 
ternal items, and then sends out a signal to hex 
address 37 EC, asking for information about 
the disk system. If it doesn't get anything (no 



© 


A 


1 


C u 


t 


f 


C 


H 


1 


I 


K L 


M 


N 


O 


P 





R 


5 T 


U 


V 


w 


X 


Y 


Z 













1 


2 


3 4 


5 


6 


7 


1 


1 






— 








CLR 


BRK 


UPAR DNAR 


LFAR 


RTAR 


SPACE 


SHIFT 






Table I 









expansion box), it continues to READY (or 
MEMORY SIZE? at power up). But if it does 
find something (the disk chip in the expansion 
interface responding with the proper value), it 
sits and waits for the disk to start rolling and the 
data to come in. No disk ... no data. 

When we cut that single trace, we took the 
disk system's answer from the circuit. The disk 
controller is still sending a signal, but the com- 
puter doesn't see it. The CPU goes happily on 
to READY. As for the 10K ohm resistor, it acts 
like an electronic rope, restraining the answer 
circuit from triggering because of the high- 
speed electronic madness inside the expansion 
box. 

Even disk owners will find this modification 
valuable, because it allows the disk drives to be 
disabled without flipping a glitch-inducing 
power switch. Also, readers using the LNW 
research expansion board may make the same 
modification. The IC is marked U19, but the 
rest of the process is identical. 

An Easy-to-reach RESET 

Where is your RESET button, anyway? In 
frustration, have you torn off the computer's 
little silver port cover? Maybe bent the cable 
and crashed the system when reaching for 
RESET? Well, then, bring the button up front! 

Following the same carpentry precautions 
used for the extra video jack, install a 
momentary-on pushbutton (get them in packs 
of five from Radio Shack) at the left side of the 
computer. Just two wires are needed, as only 
half of the TRS-80 double-pole RESET button 
is actually connected in the circuit. See Fig. 4. 

As before, it is wise to use some sort of 
mating disconnect plug so that access to the 
machine innards is simplified. 

Don't put the button too close to the top of 
the keyboard, as many an Apple user has shed 
tears over hitting its badly positioned RESET 
button. Imagine being on the 7,000th word us- 
ing Electric Pencil, and accidentally swatting 
RESET! 

Level I BASIC on Level II 

Your kids are having trouble with triple- 
dimensioning strings? They can't make sense 
out of ?DD ERROR and holler about having to 
type long lines of command words? Then why 
not use that nice and easy starting lan- 
guage—Level I BASIC? 

But you just upgraded to Level II, you say! 
Fear not, for the virtues of both are available to 
you for the price of a switch and two resistors. 
Let's hope you've saved your Level I ROM. . . 
you paid for it the first time. If not, seek out a 
cooperative ($10 usually encourages coopera- 



Column I — RR — 


8HPX0I ENTER SHIFT 


Column 2 — RJ — 


A 1 V 1 9 CLEAR 


imn3 - R3 - 


B J R Z 2 : BREAK 


Column 4 — R2 — 


C K S 3 ; UP-ARROW 


Column 5 — R7 — 


D L T 4 , DOWNARROW 


Column 6— Rl — 


EMUi- LEFT-ARROW 


Column 7 — R4 - 


F N V 6 . RIOHT-ARROW 


Column 8 — R6 — 


O O W 7 / SPACE 




Table 2 


Row 1 - 7.1 PIN 1 


— JABCDEFfi 


Row 2 - 7.1 PIN 2 


- H 1 1 K L M N O 


Row 3 — Zl PIN 10 


-PQRSTUVW 


Row 4 - Z2 PIN 2 


- X Y Z 


Row 5 - Zl i 


-01234567 


Row 6 — Zl PIN 4 


-89:;.-.' 


Row 7 - Zl PIN 12 


- ENT CLR BRK UPAR DNAR 




1 1 \K RMR gPAl 


Row t — Zl PIN 4 


-SHIFT 




Table 3 



tion) Radio Shack manager and obtain a Level 
I ROM set from the upgrade pile in the back 
room. 

The ROMs you want are marked National, 
and are identified by the numbers M2316E/ 
MMS258ET R/N and S/N, or Motorola, 
marked 7807 and 7804. Best of all is the single- 
chip Motorola ROM, marked 7809. You do not 
want chips marked Intel; these were very early 
ROMs, and wiring is complex. 

Check to see if you've got a two or three-chip 
Level II ROM set. If you've got the three-chip 
set, there will be a connector cable running to a 
separate board. If not, both ROM sockets will 
be filled, and that means no room for Level I. 

Handle the ROMs carefully (use special 
black foam or aluminum-foil-covered vegeta- 
ble trays). Mount a double-pole, double-throw 
switch conveniently, but not where you are like- 
ly to flip it while using the computer. 

Open up and turn over your TRS-80. The 
Level II interconnect cable will be plugged into 
one of the two sockets, and several additional 
wires will be connected from the Level II board 
to various parts of the main circuit card. Find 
the following locations: 

• The green wire from the Level 1 1 board, connected near the 
underside of dip shunt Z3. 

• ROM Socket Z33 or Z34 (whichever is empty), pins 18 
and 20. See earlier "Applications" columns if you need 
to know how to read pin numbers. 

Cut the traces leading from pins 1 8 and 20 of 
the unused ROM socket. Add a short length of 



30 • 80 Microcomputing. September 1980 



Enjoying 80 MICRO? 
then read on... 



Okay, now you've had a 
chance to see what I have in 
mind for you with 80 MICRO- 
COMPUTING. Oh, I admit that 
we're just getting started and 
that the magazine will be im- 
proving a lot as we go along. 
We have some interesting 
ideas in the works for you. 

With the TRS-80* (or 90 . . . 
etc.) being the most popular 
microcomputer in the entire 
world, you are going to benefit 
from this in many ways. The 
more computers there are out 
there of one kind . . . the more 
good programs you are going 
to have for this system. I hope 
that is obvious. You may be 
sure that 80 MICROCOMPUT- 
ING will be packed with the 
shorter programs and reviews 
of the larger ones. You can 
waste an awful lot of money on 
stuff that looks great in the ads. 
but fizzles out when you try to 
use it. You need our reviews. 

The wealth of programs will 
also mean that there will be 
much better programs for the 
TRS-80* than any other system. 
Put yourself in the seat of a 
computer programmer and 
you'll understand this. If you 
are going to spend several 
months developing a compre- 
hensive program, and it takes 
all of that to write and debug a 
big program, would you write it 
for a system which has sold 
one hundred units or one which 
has sold over 300,000 systems? 
The answer is obvious . . . and 
this is why we are already see- 
ing programs coming out for 
the TRS-80* which are far bet- 
ter than anything for any other 
system on the market. This is 
tough for other systems . . . the 
law of the computer jungle. 

Between our connections 
with Instant Software, the larg- 
est publisher of microcomputer 
programs in the world, and 
Kilobaud MICROCOMPUTING, 
you know that 80 MICROCOM- 
PUTING is going to be your 
most important link with soft- 
ware for the TRS-80*. 

With Instant Software being 
sold and promoted in every 
country in the world where the 
TRS-80* is being sold, our input 
of programs is also the best in 
the world. We get programs 
submitted from everywhere . . . 

"TRS 80 is a cademar* ol Tandy Ccwp 



often from 50 to 100 a week! 
You'll get the cream of the crop 
either published or reviewed in 
80. 

HARDWARE TOO 

The same law of the comput- 
er jungle holds for hardware. 
Would you, as a manufacturer, 
market an accessory for a sys- 
tem which has sold 100 units or 
would you go first for the one 
which has sold hundreds of 
thousands. It is, as with soft- 
ware, self-evident why the great 
bulk of the hardware accesso- 
ries for computers are for the 
TRS-80* these days. 

80 MICROCOMPUTING has 
the advantage of the use of the 
largest and most complete mi- 
crocomputer lab in the world 
. . . the one developed for In- 
stant Software and Kilobaud 
MICROCOMPUTING. This 
means that most new pieces of 
equipment are tested and in 
use by our staff . . . and this 
means that we can tell you 
what we think is outstanding 
. . . and where we find ripoffs. 
This lab is important to you. 

SUBSCRIBE 

If you are not already a sub- 
scriber to 80 MICROCOMPUT- 
ING, please get signed up right 
now. The yearly rates are $18, 
and that is a bargain. Just one 
single program of use to you 
can be worth much more than 
that. One review of an acces- 
sory could save you many 
times that much investment. I 
would appreciate it if you would 

II trie coupon below has been used 




appoint yourself a committee 
of one to get more subscribers 
for the magazine. You will bene- 
fit even more than we do here at 
the magazine . . . because the 
more readers we have, the more 
ads we will be able to attract 
. . . and the more ads, the more 
pages of articles you will get 
every month. 

The 80 market can, I think, 
support a couple of hundred 
pages of ads . . . and that 
would mean a magazine of 
nearly 500 pages a month. That 
should hold you. You may not 
have time left to use your com- 
puter. 

ENCYCLOPEDIA 

If you've read Kilobaud MI- 
CROCOMPUTING, you know 
that I try hard not to duplicate 
published material. My concept 
is that every reader should save 
every issue (we sell inexpensive 
boxes for this so they can sit on 
your library shelf) and treat the 
magazine as a continuing ency- 
clopedia of computing. I make 
sure that much of the material 
in each issue is written in sim- 
ple language so it will be under- 
standable by even the rawest 
newcomer to computers. Oh, I 
have articles for the more ad- 
vanced users too, so you'll have 
something to look back over 
later and use as your under- 
standing of your system grows. 

please (ill out subscription form on the Reader 



Try to think of 80 MICRO- 
COMPUTING as more of a large 
club newsletter than an ivory 
tower high-level publication. I'll 
leave the pomp to other pub- 
lishers ... the ones with the 
well-deserved inferiority com- 
plexes who cater to their inade- 
quacies by publishing esoteric 
baloney. This magazine is writ- 
ten by the readers and edited by 
people whose aim is to help you 
enjoy your TRS-80*. 

SAVE 

With each issue costing 
$2.50 at your computer store, 
that's $30 a year. For $18 a year 
you can subscribe ... at least 
for now. As the magazine ex- 
pands, please do not be sur- 
prised if the cover price in- 
creases, along with the sub- 
scription price. I started 73 
Magazine for radio amateurs 
twenty years ago with a cover 
price of 37c (two for 73$) and it 
is up to $2.95 a copy now (and it 
is the largest of the ham maga- 
zines). 

For you bargain hunters . . . 
and those who find that one 
year goes by all too rapidly, the 
three year rate for 80 is $45. 
This, too, will be going up . . . 
reflecting the inflation, paper 
increases, postage increases, 
and a short vacation for me in 
Hong Kong next year. Someone 
has to pay for that. 

Service card -n the bacK ot the magazine 



I 



Sign me on as a subscriber to 



80 Microcomputing for only $18 a year! 



Card* 



Exp 



Signature 



Name 



AlM-"'. . 



12 issues-$18 
j 36 issues -$45 
j Please bill me 

J Payment Enclosed 
J Master Charge 

, VISA 

1 American Express 



City 



State Zip 



£<2 



microcomputing 



Peterborough, N.H. 03458 



SuDsuipiion begin* wiin nexi published issue 
Back usiies wh^e available •«• 13 each 
Caiada l'f> pe' >eai US funds 
An oine' to»e>g" subscriptions $?8 one year only 



•see 



80 Microcomputing. September 1980 • 31 



^APPLICATIONS 



wire between pin 20 and the other end of the cut 
trace from pin 18. Solder a long white wire to 
pin 18. 

Now remove the far end of the Level II ROM 
board's green wire from its connection point 
near shunt Z3, and solder a red wire in its place. 
A blue wire goes to the five-volt supply. I used 
Z57, pin 14. Run the other ends of the white, 
green, red and blue wires to the switch follow- 
ing Fig. 5. 

Note also that two IK ohm resistors are 
necessary to tie up the ROM chip-select leads 
when they are switched off. The resistors hold 
the chips inactive. 

Now here comes the hard, or fun, part if you 
don't have the single-chip Level I set. Find the 
notch at the top of each ROM chip, and line up 
the two chips. Now piggyback one atop the 
other, and solder all 24 pin pairs, so that you've 
got a single, integrated circuit. Do it carefully, 
and be sure to keep the bottom IC anchored in 
some conducting material, like aluminum foil. 
The foil also acts as a heat sink, so work pa- 
tiently and accurately; use good, fine solder, 
and always keep some Solder Up or Solder 
Wick handy in case a blob of solder fuses some 
neighboring pins together. 

Insert this Level I hulk, or the single-chip 
ROM, in the empty socket. Snap the computer 
back together, and power up. You should 
either get MEMORY SIZE?, if it's switched to 
Level II, or a simple READY in Level I. You 
cannot switch back and forth; the languages get 
confused and "hang up." You must power up 
to the language you want. 

Need a Second Keyboard? 

It's an action game, and the youngsters are 
crowded about the keyboard. One youngster 
(balding, with grandchildren) complains, 
"Hey, I'm not close enough to the computer! 
It's rigged in his favor!" 

Need another keyboard? No problem! 
You'll need two high quality wire-wrap in- 
tegrated circuit sockets and one low quality 
solder-tail socket. All three are 16-pin types. 
You will also need some fine wire (wire-wrap is 
best), a 16-pin jumper cable, and a keyboard. 

The type of keyboard is up to you. Perhaps 
you'll want a complete alphanumeric type 
(available in the $40 range) or merely a $10 
numeric keypad. Whatever you choose, it 
should consist of individual keys, each with a 
single pole single throw (SPST) contact pair. 
Small calculator keyboards usually have matrix 
arrangements which aren't compatible with the 
TRS-80. Its keys are arranged in eight columns 
and eight rows, as shown in Table 1 . 

Depressed keys are identified in the TRS-80 
software by column and row. Letter T, for ex- 
ample, is column five row three. That simplici- 
ty makes adding a keyboard a straightforward 
task, since no special encoding is needed. To 
identify any letter, you only need to know 
which column-row combinations produce it. 

There is enough room on the far left side of 
the keyboard for a 16-pin socket in which to 
plug a jumper cable leading to the added key- 
board. Inside the computer, this location is 
directly above a blank part of the keyboard's 
circuit card. 



Use a flat screwdriver to snap out the black 
portion of the cover, and mark precisely where 
the free area is found on the baseboard. Using 
needlenose pliers, pull out all the pins from the 
solder-tail IC socket, and use the socket as a 
guide to mark the baseboard. 

With a small hobby drill, make 16 holes in 
the board to match the 16 pins of the sockets. 
Slide one of the wire wrap sockets into the 
disemboweled solder-tail socket, using the lat- 
ter as a special-purpose grommet. Feed the 
wire-wrap pins through the circuit board, and 
fasten the sockets in place with fast-drying glue. 

Now remove the entire cover, turn the board 
over, and identify pin 1 of the socket. This will 
attach to column one. On most versions of the 
80, you can use the keyboard's resistors to iden- 
tify columns. See Table 2. 

Match column one with socket pin 2. Match 
column two with pin 2, etc. Solder a wire to the 
resistors, and wire-wrap (or solder) the other 
end to the socket pins. Be sure to solder to the 
ends of the resistors closest to the keys. You will 
see that the other ends of the resistors are all 
tied together. 

The keyboard rows are found at the input 
pins of specific IC's on board, but there have 
been so many versions of the 80 keyboard that 
this sequence is far from consistent. The 
technical manual (good for better than half the 



machines in use, but not mine) identifies the 
rows as shown in Table 3 . 

It's better to check it yourself. Look for the 
traces connecting @, A, B, C, D, E, F, and G. 
That is row one. Solder a wire to some point in 
this row, and run it to pin 16 of the socket. 

Locate row two, and solder to socket pin 15 
and so forth down to row eight, soldering it to 
pin 9 of the socket. When viewed from the top, 
the arrangement will be as depicted in Fig. 6. 

Once you have completed the wiring, clip the 
socket pins short, turn the board over, and 
place everything back in order. Leave the cover 
off, power up, and run through a few of the 
usual motions to make sure the computer is 
functioning properly. 

Now take a short length of wire and, at the 
newly-installed socket, jumper each row across 
to each column. You should produce all the 
non-shifted keyboard characters, including the 
four arrows and the cursor. 

Take a second length of wire and jumper row 
eight with column one. This simulates the shift 
key. Repeat the column-row test, and note that 
shifted characters appear. Any bizarre behav- 
ior, such as repeated letters, indicates that a 
wire may be shorted or attached to the wrong 
column or row. 

Last of all, there are the cosmetics to deal 
with. Cut a rectangular hole the size of the 



RF MODULATOR 



-• GROUND 
-• VIDEO IN 
-• AUDIO IN 




Fig. 3 



32 • 80 Microcomputing. September 1980 



16-pin socket in the black plastic cover using a 
hot, sharp knife or razor blade. Work slowly 
and carefully to achieve a factory finish 
(whatever that is). 

Piggyback the remaining wire-wrap socket 
into the first one, and snap the cover back on. 
The socket should fit perfectly, rising about 
1/ 16 of an inch above the surface of the cover. 
The cable plugs in at a comfortable distance 
from the keycaps. 

For each keyboard you wish to add, work 
out a row-column key matrix to match the 
TRS-80's, using Table 1 . You can either make 
the jumper cable an integral part of each added 
keyboard, or include a socket on it as well. Bet- 
ter yet, put a cable and socket on each extra 
keyboard, so that they can be chained. 

No-printer Lockup 

If you've got the time and patience, there's a 
good hardware fix to cure the LPRINT/LL1ST 
no-printer lockup. It involves a few ICs, an 
edge connector, and lots of wire. Instead, do 
this: 

POKE 16422, PEEK (16414) : POKE 16423. PEEK (16415) 

Now do a few LPRINTs and LLISTs. See, it 
sends your mistaken Ls to the screen. Where's 
the hardware? 



The previous little item was included to make 
a point. With computers, there are many ways 
of achieving very similar goals. Software can 
run a printer without the mess of hardware 
used in the expansion box. Although a separate 
data generation circuit could have been used 
for cassette output, data is output via software 
instead. The whys and wherefores are rooted in 
economics, elegance and versatility. It was not 
too long ago that I built a nine-channel multi- 
media controller for a museum out of dozens of 



discrete logic chips and transistors. A very sim- 
ple CPU board and some software could have 
done 30 times that task. Time and technology 
make changes. 

There are those computer users who, if they 
do not fear working with hardware, at least 
sneer at its apparent clumsiness. On the other 
hand, some folks cannot begin to understand 
the contortions (and labor-dollars) program- 
mers go through to accomplish something in 
software that a 15« chip could do with ease.B 



TO FORMER LEVEL II 
BOARD CONNECTION 
NEAR Z3 





Fig. 5 

TOP OF JUMPER SOCKET 





L_l 




□ 




CD 


CD 




□ 


CD 




a 


cd 




CD 


CD 




CD 


CD 




CD 


a 




CD 


CD 




CD 



Fig. 4 




Features of the FIGHTER : 

REDUCES OPERATOR FATIGUE THEREBY ALLOWING MORE EFFI- 
CIENT USE OF THE COMPUTER 

INSTALLS EASILY WITH PRESSURE SENSITIVE ADHESIVE. NO 
SCREWS, CUPS, OR DRILLING TO DAMAGE MONITOR 
DESIGNED TO MATCH TRS-80- STYLING FROM THE BLACK AND 
SILVER BORDER TO THE LETTERING TYPE FACE 

3 FITS BOTH THE MODEL I AND MODEL II 

DOES NOT VOID THE COMPUTER WARRANTY 
ENHANCES THE APPEARANCE OF THE MONITOR 

el PROVIDES A DURABLE, EASY TO CLEAN SURFACE 

jn ORDER SEND Name and Address Typed or Clearly Printed with 

Chech or Money Order lor S9.95* Par Unit COO's 

•PRICE includes smippinc -re sz.so Additional Per Order. Florida Resident* 

TRS-CO 18 A TRADEMARK Of TANOV A|M 4% Sale* Te». 

SOUTHERN INNOVATIVE DESIGN 
1520 NORTHEAST 12TH STREET 
GAINESVILLE, FLORIDA 32601 *>sts 



TMs are O jal r-aawtWri fr*» u» 
fe>ll*vl«e» P»»J —t «Xlol iM| M 

•Vw T OOK W» O* anal Meaaer.« 
far mfXmntm- 'l»»l«», i« eanel 
• frfiaV •»•*■ Ir. U» «reer> kaMl 



'wiWxl le e*v 
BfB) ira» eaaXawt 
ll*r.t fellln* en • CRT. Itmm 
•*•"•• extr a ««■*><*. 
ae w e i ar rati*- . ua 

w M ial aw* (rem Jew* t m m U m. 
tea «»M • filter that wiau»ll« 
— fa X TPaVM atwlln*. Ptetare* 
htr a e« av«ef ec e*r a ua n aa, a 
>radint «a er# aroud af . 





^Header Service— see page 226 



80 Microcomputing, September 1980 • 33 



New Releases for the TRS-80 

Utilities 




We're proud to present three disassemblers for the TRS-80. For 
speed and simplicity, we recommend The Disassembler. For 
complex disassemblies, especially if you wish to make altera- 
tions, you may prefer one of our Labeling Disassemblers, either 
TLDISor DLDIS. 

TLDIS & DLDIS 

You've bought a super machine-code 
program, but now wonder how it works. 
Maybe you even used a quick PEEK 
routine to glance through it when it was 
in memory. If so, you definitely noticed 
the complete lack of comments in the 
code, making it almost impossible for 
you to decipher and understand it. 

Well, Instant Software's Labeling 
Disassemblers are the answer to your 
problem. 

TLDIS (Tape-based Labeling Disas- 
sembler) and DLDIS (Disk-based Label- 
ing Disassembler) are three-pass, label- 
assigning disassemblers which assign 
labels (where appropriate) to the 
routines in a machine-language pro- 
gram. Their output is almost identical to 
that of a hand-assembled source code. 

You can send the disassembly to a 
lineprinter (Radio Shack parallel port) for 
either TLDIS or DLDIS. (The difference 
between these utilities is the storage 
mode of the disassembly.) 

TLDIS can send the disassembly to 
cassette tape. DLDIS can send it to disk; 
both send it to the video monitor. The 
stored disassembly from TLDIS may be 
reassembled with Radio Shack's 
EDTASM<™>-the disassembly from 
DLDIS, with Apparat's extension of ED- 
TASM<™>. 

Because of the use of labels, it is a 
simple matter to change any object code 
program by disassembling it and then 



The Disassembler 

This is a single-pass, hex-notation 
disassembler that will send its output 
either to tape or to a lineprinter (Radio 
Shack parallel port). The tape output is 
directly compatible with Tandy's ED- 
TASM<™>. Thus, you can take an object 
code tape, disassemble and output it to 
tape, then use EDTASM<™> to add. 
delete, change and even re-assemble 
your new version. 

In addition, it displays the displace- 
ment and absolute address of any 
relative jumps made by the disassem- 
bled program. It also displays any ASCII 
characters used in a LD or CP opcode. 



Sample output from the Disassembler 



making changes to the resultant source 
code, without losing track of jump/load 
addresses. Labels start with "AAOO" and 
increment up, in even numbered steps 
(AA02, AA04, etc.). The odd numbers 
(AA01, AA03, etc.) are left for you to use 
for the source code during reassembly. 

The printing of the disassembly may 
be temporarily halted by using [SHIFT] 
@ Oust as in BASIC) or it may be ended 
by pressing the [BREAK] key. It also has 
a comments column to display ASCII 
charachters used in a LD or CP opcode. 

Because TLDIS and DLDIS work only 
on in-memory programs, they may be 
relocated in memory to avoid conflict 
with the program you disassemble. 

The next time you need to "climb in- 
side" a machine-code program, take 
DLDIS or TLDIS with you. We promise 
that it will be an easier journey. 
Order No. 0230R (TLDIS) $14.95 
Order No. 0231 RD (DLDIS) $19.95 



BYTE MACHINE LINE 

NUM CODE 

706E 22057B 

7071 183B 

7073 FE52 

7075 2007 

7077 CD8F70 



MNEMONIC COMMENTS 
NUM COLUMN 

00053 LD (7B05H),HL 



00054 JR 

00055 CP 

00056 JR 

00057 CALL 



$ + 3DH 

52H 

NZ,$ + 09H 

708FH 



70AEH 
= "R" 
707 EH 



H means the number is HEX 

$ means current location counter. 

Since the Disassembler works only on 
in-memory programs, it has been made 
relocatable so that you may move it 
around in memory to avoid conflict with 
the program you wish to disassemble. 
As an added option, you may also jump 
to memory locations and transfer con- 
trol between Disassembler and other 
utility programs in your computer. 

The Disassembler, use it to examine 
and analyze any machine-code pro- 
gram! 
Order No. 0232R $9.95 



Terminal-80 

The Terminal-80 package lets your 
TRS-80 communicate with the rest of the 
world. These programs give you control 
of the RS-232 port of your Expansion In- 
terface. 

You can connect one or more serial 
terminals to your TRS-80. Your computer 
will accept input from the RS-232 port 
just as If it were entered from the 
keyboard. Thus, you can use your com- 
puter from a remote terminal without 
having to move your equipment. 

The TRS-80 can also be transformed 
into a "dumb" terminal. You can use it in 
a time-sharing situation to talk to "big" 
computers via a modem. All data that 
you type in will go out through the 
RS-232 port and all incoming data will be 



displayed on the screen. 

You can transfer programs over the 
phone lines. Just load a program into the 
TRS-80. The LPRINT/LLIST command 
will transfer the program to a receiving 
computer via the RS-232 port. 

Using the upper/lowercase modifica- 
tion of the TRS-80 is simplified. (You 
must have the modification kit installed 
first or follow the detailed instructions 
included in this package.) Control 
characters in Level II and Disk BASIC 
will be properly displayed and all func- 
tions such as CHR$ will work correctly. 

This package even includes a BASIC 
program to set the baud rate. You won't 
have to tear apart your Expansion Inter- 
face if you use more than one configura- 
tion. 



There are thousands of TRS-80 com- 
puters in the world. Let's get together 
and talk to each other— with the Termi- 
nal-80 from Instant Software. 

This package requires the following 
minimum system: 

1. A TRS-80 with 16K of memory. 

2. An Expansion Interface. 

3. An RS-232 Serial Interface (e.g., 
Radio Shack's No. 26-1145 or the 
equivalent). 

4. An optional upper/lowercase 
modification kit. 

Order No.01 30R (cassette-based) $24.95. 



WRITE FOR OUR NEW CATALOG! 



Instant Software 



"A trademark of Tandy Corporation 

PETERBOROUGH, N.H. 03458 
603-924-7296 



34 • 80 Microcomputing, September 1980 



Great Simulations 




Jet Fighter Pilot 

The Jet Fighter Pilot package takes 
you as close to real combat flying as 
possible. . .without pulling G's. 

In this brilliantly realistic simulation, 
you become the pilot of a high perfor- 
mance, twin turbo-jet fighter. Total con- 
trol of the aircraft is yours. 

At the start of your mission, you'll go 
through an entire engine start procedure 
before your flight (provided your ground 
maintenance is up to par). Your takeoff 



will be from either the deck of an aircraft 
carrier (via a steam catapult) or from an 
airfield. 

All controls respond the same as they 
would on a real jet fighter. You'll have to 
constantly monitor your display and 
make adjustments to your throttle, 
flaps, rudder and air spoilers. You 
decide when to retract flaps, landing 
gear and release the auxiliary fuel drop- 
tanks. 

Your on-board navigational computer 
will direct you to your selected airport. 
The Glideslope/Localizer information 
will aid you in approaching and landing 
on an aircraft carrier deck or airfield. 

The Weapons Control Computer will 
arm your missiles, provide you with the 
range and bearing to a target, and tell 
you when to attack. And, if things should 
get a little too hot, you have an ejection 
seat command for egress. 

For a carrier-based landing, you'll 
have to deploy your tail hook. For a land- 
based landing, you'll need reverse thrust 
and your drag chute. 

After you've flown a few missions with 
the Jet Fighter Pilot package, you'll 
know you've earned your wings. 
Order No. 01 59R $14.95 



Cosmic Patrol 

WARNING: PLAYERS OF THIS GAME 

SHOULD BE PREPARED FOR A STATE 

OF REALISM HITHERTO 

UNAVAILABLE ON THE TRS-80 



The Cosmic Patrol program puts you 
in the command chair of a small in- 
terstellar patrol craft. Your mission is to 
defeat Terran space and prey on the 
Quelon supply ships which carry essen- 
tial parts and lubrificants for that im- 
placably hostile robotic force. The drone 
freighters are fairly easy pickings for the 
accomplished starship pilot, but beware 
of the l-Fighter escorts. They're armed, 
fast and piloted by intelligent robots 
linked to battle computers. They never 
miss. 

The Cosmic Patrol program is not just 
another search and destroy game. With 
its fast, real-time action, impressive 
sound option and superb graphics, this 
machine-language program is the best 
of its genre. 



Don't keep putting quarter after 
quarter into arcade games or spending 
big bucks for video games cartridges. 
Get Cosmic Patrol from Instant Soft- 
ware -and get the best for less! 
Order No. 0223R $14.95 





Battleground 

It is late 1944, and the Allied Forces 
are sweeping toward Berlin. As General 
in command of your sector, you study 
the map. At your command, are tanks, 
planes, artillery, infantry, engineers and 
vehicles— an awesome array of fighting 
men and the machines of war. From In- 
telligence reports you know that the 
enemy General is a shrewd tactician, not 
to be under-estimated. It will take plann- 
ing and strategy to outwit this wily old 
campaigner. 

The battle map of your sector will fill 
with markers, each showing the deploy- 
ment of your forces. You and another 
player will slip into the roles of opposing 
German and American commanders as 
yet another battle unfolds. 

Battleground allows you to ex- 
perience the awesome responsibility of 
a battle-area command. It will be up to 
you to deploy your tanks, planes, 
vehicles, weapons and men. On your 
shoulders rests the decision, whether to 
call for direct artillery gunfire, or to order 
your planes into the air. You will con- 
stantly be watching for an enemy air- 
drop, always carefully maneuvering your 
forces. 

The stark reality of World War II 
comes alive in Battleground. 
Order No. 01 41 R $9.95 



Instant Software 



TO ORDER: Look for these programs at the 
dealer nearest you (see list of dealers on page 
199). If your store doesn't stock Instant 
Software send your order with payment to: 
Instant Software 
Order Dept. 
Peterborough, N.H. 03458 
(Add $1.00 for handling) or call toll-free 
1-800-258-5473 (VISA. MC and AMEX ac- 
cepted). 
■ 

Prices subject to change without notice. 

PETERBOROUGH, N.H. 03458 
603-924-7296 



r'ftoadtr S*rvic*s»9 pay 226 



80 Microcomputing, September 1980 • 35 



THE ASSEMBLY LINE 



by William Barden, Jr. 



"Numeric computations are 
very tedious in assembly 
language, especially when floating- 
point numbers must be handled, " 



This month we're going to discuss inter- 
facing assembly language code to BASIC 
—why it is desirable, what techniques are in- 
volved, and what kinds of problems will be en- 
countered when it's done. We'll also be pre- 
senting the winner of the Great Second Assem- 
bly Line Programming Contest. 

A Symbiotic Relationship 

A program made up of both BASIC code 
and assembly language code takes advantage of 
both types of programming. BASIC can be 
used for all of the I/O bound processing, while 
assembly language can be used for the com- 
pute-bound processing, which must be as fast 
as possible. 

An example of I/O bound processing is the 
portion of a mail list program that accepts user 
input for mail list entries. In this case, the high- 
speed processing of assembly language is un- 
necessary, as the data is being input at speeds 
no greater than 30 or 40 words per minute, and 
can easily be handled by BASIC code. A similar 
example is printing output, which proceeds at 
speeds in the area of 100 characters per second. 

Assembly language code can be used in the 
compute bound, or "number crunching" por- 
tions of the program, where BASIC code is 
very slow. We've all seen or heard about mail 
list programs that take hours (or days) to sort 
entries. If the sort routines are coded in assem- 
bly language, this time critical portion of the 
program can be improved by a factor of 100 or 
so. Other examples of processing where assem- 
bly language can be used are high-speed graph- 
ics, searches, and array operations. 

When one opts to use assembly language 
code, there are other trade-offs. BASIC code 
can be developed and debugged much faster 
than assembly language code. Numeric com- 
putations are very tedious in assembly lan- 
guage, especially when floating-point numbers 
(those larger than integer values) must be han- 
dled. String operations are not easily per- 
formed in assembly language. 

However, in spite of its negative aspects pro- 



grams of any significance can benefit greatly by 
having portions of the code in assembly lan- 
guage. 

Level II BASIC and Disk BASIC allow 
BASIC code and assembly language code to be 
run together. The mechanism for this is the 
BASIC USR call. Let's illustrate the use of 
USR in Level II BASIC and Disk BASIC by 
some simple assembly language code. This code 
draws a line across the screen and is shown in 
Program Listing 1 . 

For reasons which we'll discuss later, the 
assembly language code here is relocatable. 
That is the machine code end result of the as- 
sembly (the hexadecimal data in the second col- 
umn) can be moved anywhere in memory and 
will continue to draw that line on the screen. 
Non-relocatable code can only execute in one 
area in memory, the area for which it was as- 
sembled, controlled by the ORG pseudo-op in 
the assembly language statements. (For a more 
complete discussion of relocatability, see this 
column in the May, 1980 issue.). 

Level II BASIC and Assembly Code USR Calls 

Suppose that the 1 2 machine code bytes have 
been put into RAM memory at locations 8000H 
through 800BH. How do we execute the assem- 
bly language code at those locations while in the 
middle of a BASIC program? In Level II 
BASIC, the procedure is this: 

1 . POKE the address of the start of the ma- 
chine language code into locations 16526 and 
16527. The low order byte of the start address 
must be put into location 16526, and the high 
order byte must be put into location 16527. In 
this case 00H must be put into location 16526, 
and 80H must be put into location 16527. Loca- 
tions 16526 and 16527 are simply a variable in 
BASIC that has been set aside specifically to 
hold the address of the machine code to be ex- 
ecuted when a USR call is made. 

2. At the point in the BASIC program at 
which you want to execute the "draw line" 
code, use the BASIC statement X = USR(M). 
When Level II BASIC encounters this state- 





00100 


;ALL CODE HERE 


IS RELOCATABLE - NO ORG NEEDED 


0000 0640 


00110 


DRAWL 


LD 


B,64 ;64 CHARACTER POSITIONS 


0002 21003E 


00120 




LD 


HL.3C00H+512 ;START 


0005 3E8C 


00130 




LD 


A,8CH ;LINE 


0007 77 


00140 


DRA010 


LD 


(HL),A j STORE SEGMENT 


0008 23 


001^0 




INC 


HL j BUMP POINTER 


0009 10FC 


00160 




DJNZ 


DRA010 ;GO IP NOT 64 


000B C9 


00170 




RET 


; RETURN TO BASIC 


0000 


00180 




END 




00000 TOTAL 


ERRORS 












Program Listing. 1. Line Drawing Program 



1H 


'LEVEL, II CALL 


ANr 


RETURN SEQUENCE 


111 


CM 




'CLEAR SCREEN 


121 


POKE 16524,1 




•LS BYTE Or ItllH 


130 


POKE 16527,128 




'MS BYTE Or IIIIH 


14* 


X-USPO) 




•CALL SUBROUTINE 


lit 


GOTO 15» 




'LOOP HERE 


Program Listing 


2. 


Level II Machine- 


Language Calling Sequence. 



ment, it takes the address value in locations 
16526 and 16527 and calls that location. At the 
end of the machine language, a RET instruc- 
tion pops the return address off the stack and 
causes a return to the BASIC interpreter, which 
picks up the BASIC code at the next statement 
after the USR call. This CALL and RETurn se- 
quence is illustrated in Program Listing 2. 

3. We've ignored variables X and M in the 
last two steps. If no arguments are to be passed, 
any dummy value can be used for M and vari- 
able X can be ignored. It's often necessary, 
however, to pass one or more arguments from 
the BASIC code to the machine language code 
and back again. For example, we might want to 
modify the assembly language routine to draw 
a line at any of the 16 screen lines, passing the 
line number of 1-16 from BASIC to the draw- 
line code. Conversely we might want to pass 
back to the result of a high-speed multiply 
routine to BASIC. 

The USR call has a built-in provision for 
passing one argument to the machine code and 
for transferring one argument back from the 
machine code. The M in the statement 
X = USR(M) may be any variable or expression 
that resolves down to an integer value from 
-32768 to 32767. This argument is passed to 
the machine code in the HL register pair only if 
the assembly language code contains a CALL 
0A7FH instruction. When the machine code 
executes the CALL, a ROM routine in Level II 
BASIC transfers the argument to HL. 

To transfer an argument value of - 32768 to 
32767 back to BASIC, the value must be in HL 
and a JP made to ROM routine 0A9AH at the 
end of the machine language code; note that 
this "JP 0A9AH" replaces the normal RET. 

Muliple Arguments and Multiple Routines 

Multiple arguments may be passed from the 
BASIC code to the machine language code in a 
variety of ways. The arguments may be at some 
predefined location known to both the BASIC 
program and the machine language code, for 
example a list starting at location 9000H. A sec- 
ond way to pass arguments is to pass a pointer 
in HL; this pointer identifies the argument list, 
which has a predefined order. The pointer may 



36 • 80 Microcomputing, September 1980 
Scanned by Ira Goldklang - www.lrs-80.com 







00100 


> ALL CODE HERE IS RELOCATABLE 


- NO ORG NEEDED. THIS CODE 






00110 


;ASSUKED TO BE AT B000H. 




••■■ 


CD7F0A 


00120 


MOLT2 CALL 0A7FH 


jGET M INTO HL REGISTER 


0003 


29 


00130 


ADD HL.HL 


; MULTIPLY BY 2 


0004 


C39A0A 


00140 


JP 0A9AH 


;PASS BACK AS X 


0000 




00150 


END 




0000 


TOTAL 


ERRORS 


Listing 3 A 





200 'LEVEL II BASIC HERE. 


ASSUMES MACHINE LANGUAGE 


210 'AT 8000H. 








220 POKE 16526,0 






'LS BYTE OF 8000H 


230 POKE 16527,128 






•MS BYTE OF 8000H 


240 DEFINT M 






•DEFINE M AS INTEGER 


250 INPUT M 






■INPUT INTEGER VALUE 


260 X«USR(M) 






'MULTIPLY BY 2 


270 PRINT "X=";X 






'PRINT RESULT 


280 GOTO 250 






'GO FOR NEXT 


300 'DISK BASIC HERE 


. ASSUMES 


MACHINE LANGUAGE 


310 'AT 8000H. 








320 DEFINT M 






•DEFINE M AS INTEGER 


330 DEFUSR5-&H8000 








340 INPUT M 






'INPUT INTEGER VALUE 


350 X«USR5(M) 






'MULTIPLY BY 2 


360 PRINT "X*";X 






'PRINT RESULT 


370 GOTO 340 






'GO FOR NEXT 




Listing 3B 





188 'DATA VALUES TO PREASSICNED AREA METHOD 

111 'HOVE DATA HERE 

121 FOR X-3276B TO 12774 

131 READ A 

111 POKE X-6S".i6,A 

1SI NEXT X 

Uf DATA 285, 127, 18, 41, 1»5, 154, 18 

2*1 'LEVEL II BASIC HERE 

21t POKE 16526.1 

221 POKE 16527,128 

231 DEFINT H 

248 INPUT N 

258 X'USRiK! 

268 PRINT "X-"jX 

278 GOTO 24* 

388 'DISK BASIC HERE 

318 DEFINT M 

328 DEFUSR5-IIIB888 

3 38 INPUT M 

148 X-USR5IH] 

358 PRINT "X-*|X 

368 GOTO 3 38 



Program Listing 4. DATA Values to 
Preassigned Area Example. 



be one established by the BASIC VARPTR 
command, and the pointer may point to an ar- 
ray or string containing multiple arguments. 
Another method is to pack arguments into HL. 
Four four-bit values could be put into HL, or 
one eight-bit argument could be in H and an- 
other in L. 

More than one assembly language routine 
can be used with a Level II BASIC program; 
it's only necessary to put the starting address of 
the machine language routine to be called into 
16526,7 before each new USR call is executed in 
BASIC. If there is only one machine language 
routine, its starting address needs to be placed 
into 16526, one time only, at the start of the 
BASIC program. 

The calling sequence for Disk BASIC is 
somewhat more straightforward. Disk BASIC 
also uses the USR function, but it has a slightly 
different format. The format is X = USRn(M). 
The small letter n stands for any digit through 
9, which references one of ten possible machine 
code addresses. To call machine code routine 7, 
for example, the statement might be X = 
USR7(M). As in Level II BASIC, M may be 
used to pass one 16-bit argument, or it may be a 
dummy and X may be used to pass back one 
16-bit argument, or it may be ignored. 

Rather than POKEing the address of each 
machine language routine into 16526,7, Disk 
BASIC permits the addresses to be predefined 
by a new function, DEFUSRn. To define ma- 
chine code routine 8 at 8000H, the statement 
DEFUSR8 = &H8000 is executed sometime be- 
fore the call X = USR8(M) is made. Everything 
else works as in Level II BASIC. CALL 0A7FH 



is optionally made to pick up the M argument 
from BASIC, and a JP 0A9AH is optionally 
made to pass an argument in HL back to BA- 
SIC as variable X. 

Another sample program with versions for 
both Level 11 BASIC and Disk BASIC is shown 
in Program Listing 3. This program takes one 
argument M from BASIC, multiplies it by two 
in the machine language code, and passes it 



back to BASIC as variable X. It illustrates all of 
the concepts we've been talking about except 
for multiple argument passing. 

There are basically two methods lor interfac- 
ing machine language programs to BASIC pro- 
grams. The first is the two program approach. 
The second is the embedded machine language 
approach. We'll discuss the techniques and ad- 
vantages of each. 

The Two Program Method 

In the two program approach, the BASIC 
program contains no machine language code. 
The machine language code is separately as- 
sembled and loaded. To integrate the BASIC 
program and the associated assembly language 
program for a cassette based system, the 
following steps are performed: 

1. Execute Level II BASIC. For MEMORY 
SIZE?, type in a memory address correspond- 
ing to the start of the assembly language pro- 
gram. Normally this would be in high memory, 
as everything above this address will not be 
used by the Level II BASIC interpreter. 



100 'DUMMY STRING USING CHR$ 

110 A$=CHR$(205)+CHR$(127)+CHR$(10)+CHR$(41)+CHR$(195)+ 

CHR$(154)+CHR$(10) 
200 'LEVEL II BASIC HERE 
210 DEFINT M 
220 B«VARPTR(A$) 
230 POKE 16526, PEEK(B+1) 
240 POKE 16527, PEEK(B+2) 
250 INPUT M 
260 X-USR(M) 
27 PRINT "X«=";X 
280 GOTO 220 
300 'DISK BASIC HERE 
310 DEFINT M 

320 B-PEEK ( VARPTR ( A$)+1)+PEEK( VARPTR (A$) +2 ) *256 
330 IF B>32767 THEN DEFUSR5=B-65536 ELSE DEFUSR5=B 
340 INPUT M 
350 X=USR5(M) 
360 PRINT "X=";X 
370 GOTO 320 

Program Listing 5. Dummy String Using CHRS Example. 



80 Microcomputing, September 1980 • 37 



THE ASSCMBIY IINE 



100 'DATA VALUE TO DUMMY STRING 

110 A$="DUMMY S" 

120 B=PEEK ( VARPTR ( A$)+1)+PEEK( VARPTR (A$) +2 )*256 

130 IF B>32767 THEN B=B-65536 

140 IF B>32767 THEN C=B+6-65536 ELSE C=B+6 

145 IF B>32767 THEN D=-l ELSE D=l 

150 FOR X=B TO C STEP D 

160 READ A 

17 POKE X,A 

180 NEXT X 

190 DATA 205,127,10,41,195,154,10 

200 'LEVEL II BASIC HERE 

210 DEFINT M 

220 B=VARPTR(A$) 

230 POKE 16526, PEEK(B+1) 

240 POKE 16527, PEEK(B+2) 

250 INPUT M 

260 X=USR(M) 

270 PRINT "X=";X 

280 GOTO 250 

300 'DISK BASIC HERE 

310 DEFINT M 

320 B-PEEK ( VARPTR ( A$)+1)+PEEK( VARPTR (A$) +2 )*256 

330 IF B>32767 THEN DEFUSR5=B-65536 ELSE DEFUSR5=B 

340 INPUT M 

350 X»USR5(M) 

360 PRINT "X=";X 

370 GOTO 340 

Program Listing 6. DA TA Value to Dummy String Example. 



100 'DATA VALUE TO ARRAY 

110 DIM A%(6) 

120 FOR X=0 TO 3 

130 READ B,C 

135 A=B+C*256 

140 IF A>32767 THEN A% (X) =A-65536 ELSE A%(X)=A 

150 NEXT X 

160 DATA 205,127,10,41,195,154,10,-1 

200 'LEVEL II BASIC HERE 

210 DEFINT M 

220 B=VARPTR(A%(0) ) 

230 POKE 16526, B-INT (B/256) *256 

240 POKE 16527, INT(B/256) 

250 INPUT M 

260 X=USR(M) 

27 PRINT "X=";X 

280 GOTO 250 

300 'DISK BASIC HERE 

310 DEFINT M 

320 B=VARPTR(A%(0) ) 

330 IF B>32767 THEN DEFUSR5-B-65536 ELSE DEFUSR5=B 

340 INPUT M 

350 X=USR5(M) 

360 PRINT "X=";X 

370 GOTO 340 

Program Listing 7. DATA Value to Array Example. 



2. Use the SYSTEM command to load a pre- 
viously assembled machine language program 
into the protected memory area. Rather than 
typing slash to start executing the machine 
language code, hit BREAK to go back to the 
BASIC interpreter. 

3. Execute the BASIC program with its USR 
calls to the machine language code. The ma- 



chine language code loaded by the SYSTEM 
tape may contain many different routines, each 
of which can be specified by the proper POKE 
commands to 16526,7 and a subsequent USR 
call. 

To utilize the two program approach with a 
disk based system, follow these steps: 

1 . LOAD the machine language program in- 



to memory. The program must have been pre- 
viously assembled with an object file to disk 
(Apparat assembler) or have been previously 
loaded and saved on disk (Radio Shack Macro 
Disk Assembler). 

2. Execute Disk BASIC by the usual BASIC 
input. Protect the machine language code by- 
entering the starting address of the machine 
language code for "MEMORY SIZE". 

3. Execute the BASIC program with its 
DEFUSRn and USRn functions. 

This method works well, but is best used for 
lengthy assembly language programs that can- 
not use the procedures for embedded code that 
we'll outline shortly. Since it is a two step load- 
ing process, it is somewhat awkward to use. Its 
main disadvantage is that the BASIC code must 
deal with absolute addresses; if the assembly 
language portion is reassembled, the addresses 
of its routines may change, and the correspond- 
ing addresses in the BASIC program will also 
have to be changed. 

The second method of interfacing is the 
embedded machine code approach. This ap- 
proach is best used when the machine code con- 
sists of short routines. The data representing 
the machine code instructions can be incor- 
porated into the BASIC program directly, as 
DATA values, CHRS strings, or dummy 
strings. The advantage of this approach is that 
the BASIC program, complete with its embed- 
ded machine code, can be loaded or edited in 
one fell swoop. 

The disadvantage is that some conversion is 
involved, to change the machine code from an 
assembly listing to corresponding decimal 
DATA or string values. There are a number of 
ways to embed the machine code; we'll discuss 
the most popular. 

DATA Values to Preassigned Area 

This is similar to the two program method in 
that the machine code is at a predefined area 
and should be protected by a MEMORY SIZE 
value. In this approach, the machine code in a 
DATA table is moved to its area sometime 
prior to the USR call. Since the area is prede- 
fined, the machine code does not have to be re- 
locatable, but simply assembled to run at the 
specified memory area. An example for both 
types of BASIC is shown in Program Listing 4. 

A dummy string consisting of CHRS values 
can also hold the machine code. The location of 
the string is found by the VARPTR function. 
As one reader pointed out, this appoach has a 
potential problem. When the infamous "string 
garbage collection" mode is entered in BASIC, 
the location of strings may change. The gar- 
bage collection mode is entered when all string 
space has been used, and the interpreter must 
go back and clean up the string allocation area 
to create additional room. (Garbage collection 
is used in lengthy BASIC programs that manip- 
ulate many strings.) 

When using this method, find the VARPTR 
location immediately prior to the USR call; it 
will work without problems except a 255-byte 
limitation on string size. Relocatable code must 
be used. This approach is shown in Program 
Listing 5. 

DATA Value to Dummy String 



38 • 80 Microcomputing, September 1980 



INFLATION FIGHTER — ROUND # 2 

KO Inflation With Our Knock-Out Prices 

MPI 88T Impact Matrix Printer 
Quality, Full-Page Printout 
For Your TRS 80 Computer! 

Unrivaled champion of the small business, educational, personal computing and 
professional user. Quality construction and continuous duty print head allow 
heavy usage. Attractive styling complements the most elegant of systems 
without sacrificing compact size. 



• Type of Printing: Impact bidirectional 7x7 dot matrix* Print Rate: 1 00 
character! par second {maximum) • Thru put: 80 characters per second 
(maximum) • Character Set: Full upper and lower case 9a character 
ASCII set, software selectable single or double wide character fonts • Character 
Height: 0. 10 In. (0.25 cm)* Print Format: 8.0in.(20.3cm)llnelen|th.80characters 
perllneat IOCPI.9echaractersperlineat 1 2 CPi, 120 characters per line 
at 15 CPI. 1 32 characters per line at 1 6.5 CPI • Paper Feed: 10 lines per 
second, stepper motor controlled. User selectable pressure roller or 
tractor feed • Line Spacing: a or 8 lines pmr inch, user selectable 

• Media: Roll paper 8.5 in. (2 1 A cm) wide by 5 In. ( 1 2.7 cm) diameter 
single ply or pressure sensitive multiple copy paper. 0.01 2 in. (3 mm) 
maximum thickness, fan Fold paper: I tn.(IO.Icm)to9.5in.(24.lcm| 
sprocket (including sprocket margins), 0.01 2 inc. (3 mm) 
maximum thickness Cut Sheet paper: Maximum width. 9.5 in. 
(24. 1 cm) • Ribbon: Continuous loop cartridge. 20 yds. 0.5 in. 
(1 .27 cm) wide black ribbon. 5 million character line • Input 
Power: I IS/ 230 VAC ± 10% S0/60HZ* Data Input: Parallel: 
Centronics compatible 7-bit ASCII. TTL levels with strobe, 
acknowledge returned to indicate data was received. Serial: 
RS232C or 20 ma Current Loop with BUSY (RS232C 
only) handshake. 10 or 1 1 bits: 1 00. I SO. 300. 600. 1 200 
baud • Data Buffer: IK (2K optional) • Forms Control: 
Top of Form (eight selectable forms lengths) Skip over perforation 

• Physical Dimensions: 16.25 in. (41.3 cm) wide x 10.75 in. (27.3 cm) 
deep x 6.25 in. (15.9 cm) high. Dimensions exclude paper and paper 
holder. Weight: less than 1 5 lbs. (6.75 Kg) 




**: 




Other Contenders . . . 




PRINTERS 

■EC 5510 R0 •/tractor list 12950 17593 

■EC 5570 KSR •/tractor list $3270 S29SO 

DmMo 1650 80 w/tiactsr List $3425 S2890 

D-eMo 1650 KSR •/hactor l-st $3895 $3213 

II 110 Basic Serial Lai $1895 $1845 

II 810 Basic PaiaHei List $1940 $1695 

Tl 743 KSR u/c ASCII list $1395 $895 

Aaedei DP9500 200 cps List $1650 $1449 

Centre**! 702 R0 120 cps List $2440 . $1995 
Centronics 703 TO 120 cps List $3140 $2393 
Centronics 704 TO 180 cps Lisl $2350 .$1885 
Sanders Media l?/7 50 2O0cps list $4100$32S5 

St SUPER VALUES $| 

(Eouivalem or better performance than 

Radio Shack TRStO Una Printer III) 

ANftCOM ISO List $1395 MOW $1195 
* 150 cps. bidirectional logic Seeking * 80. 132 or 
136 columns ' ( Of 8 lines per inch 5.3 ips slew 
sens' * 9i9 Matin upper and low cast with 
dectndert ' 10 char/inch * 5" to 14 7/8" faa l»M 
paper, tractor feed ' on|i«al plus 5 copies " 6 
million character life snap-in ribbon eartndga ' 
120/240 VAC 50/60H2 power ' Site 23 1 14° « I 
(IS 4 can 35 6 ceii 20 j cm metric (weight 30 ttn . 
(3816s shipping) 

DAIABOVAISOOO 

80 Column List $1295 $1158 

136 Cotamn list SI 395 $1250 

' 96 ASCII Characters ' 125 cps ' 6 hues est inch ' 
9x9 Mains * Selectable exeaaded character s * Iras 
esoer and tower case pi as underlining * Short line 
capability ' Dynamic Platen with adjustable 
chancter density * Priats orifinat plus 5 copies ' 
Front or bottom paper teed * Tractor feed ' 5 IPS 
paper slew (independent of head motion) ' Top of 
form ' tibbon cartridge ' Paratleft or Serial ( 1 10 to 
9600 Bead) ' Quietued cahiaet 



COMPUTES 
MEW Frees Psrseasl MicraConcetsrt lac. 

PMC -80 C orns rt er 8579 

Funbonely equivalent to TRS80 btodel I Computer 
with level II Basic and 16K Memory Has bwh in 
cassette recorder. TV modulator, TV monitor output 
ptus additional features 

PMC-80 Fsstload Cassette System S2S9 

Loads stand a rd Level 1 1 Basic or Syste m Cassette ta pes 
16 times faster at 8000 Baud Includes modified 
cassette and 1/0 adapter 

TRS-80 AOO-0NS 

FCI-S0 Fsstload Cassette Interface $149 

Unhke other high speed cassette decks. our FCI loads 
m standard format cassettes at 16 times the normal 
speed. Yes. you em load "Blackjack" in less thin 4 
seconds. Mugs into the back or your keyboard or 
expansion interlace and operates on ROM based 
program under TRS-80 control, called from Basic, 
System or Disk Basic. The built-in ROM also provides 
keyboard debounce. auto repeat and key-beep A 
modified CTR-41 cassette tape recorder is used 
allowing play and last toward buttons to latch down 
during read ol tape it can still be used for CSAVE at 
normal speed Comes with instruction booklet for 
modification of CTR41 Powerpack and TRS-80 
interconnect cable eilra 



REX 80 R0MEXIENDER $39 

Enables use ol the 2014 empty address locations 
between the end ol Basic ROM and the TRS-80 RAM it 

I urty decodes them so (here is no interference when a 
2048 Byte ROM is used Allows interchangeable ROMs 
with commonly used routines and programs to be 
accessed by System or USR command Internal 
lumpers allow use ol most industry standard 24 pm 
plus 5 volts ROMs A connector cable attaches REX 80 
to 40 pin bus connector at back of keyboard or 
eipansion 00 1 All signals routed through REX-SOare 
Buttered leicepl data) to allow eipansion tor other 



devices otl-rs output connector Power pack and TRS- 
80 interconnect cable extra 

CAB-40 Flat CsMs/40 PIN $25 

PW8-80 Power Pack (9V at 500 ma) $8 

RC* 
NTT 32— Pnnter/ M siaory Eipentian Modute. Onus 
a n y cety frorwes eo wpatiMd printer sad add l6Ker32K 
of RAM. 

Basic Unit 888 

*Wthi6K 8118 

Wrrh32K $199 

NEW 

MPC Microeoaneeticn List $300 $275 

An integrated RS232 adapter and direct connect 
modem for any modal TRS-80 Connects directly 1o 
computer bus eliminating a need lor Radio Shack 
Expansion Box. RS232 Adapter and Acoustic 
interface Complete with bus connector and intelligent 
terminal software program 

CYBERNETICS TRS-80 -CP/M 
BUSINESS SOFTWARE 

The fastest atod-ll CP/M with the most feateresW 
MOO II CP/M $249 

* Over 610.000 bytes/disk * Downloading package 
■sdwM * 1.000 baud operation of serial printer 
wdhoal data loss • Single drive backup 

MOO I CP/M $149 

* hhiedstngle/doubledens'tyonanyoMdrivesleven 
a I drive system) * Ultra fast d<sk operation * 
Emulation ol cursor addressing lor any of several 
"dkimb" CRTs 

CBASrC2(Modlorll) $109 

* Auto L F printer support 8 ASCII top of form software 
{LPHIH) * Supptemental document descnbmg our 
implementation * User sellable function keys 

The following software for Mod -MCP/Montyuntasi 
otherwise Stated (requires CBASIC 2) 

RM/C0801 Only COBOL 'or CP M with alternate keys 



ACCESSORIES 

1/0 Cable [Specify Cwnnwt w 
Type and Sen* or rVaarl) . $19 

(ma Ribbon Cartridge $9 

2K Butter . . jjj 

Roil Paper MoloX i?4 

(muttihey ISAM), CRT screen handbag, interactive 
debut. 7/80 code, and the mosl useful level 2 features 
Compatible arm Tandy's Cobst— but runs faster! 

$495 

PMS (Property Management System) Interactive, 
menu-driven system includes lul G/l, budgeting, 
cash journal, delinquency ksl, tenant activity/rent 
rot. complete audit trail and reports on vacancies lost 

rent, and vendors $650 

Demo disk and manual $75. 

APH (Automated Patient History) General purpose 
question-asking, answer-printing system furnished as 
sett administered review of systems general patient 

history (Modi also) $175 

Magic Wand Full feature word processing, true 
proportional spacing, trie merging, and use ol furl- 
screen editor for source programs or data $398 

RPA (Residential Property Analysis) Analyzes income 
and eipense. financing, taxes, inflation and 
depreciation on home, condo. or apartments over a 
user-selectable time Shows payoff in terms of RON. 
Cap rate, cash encash Amortization schedules and 

worksheet $299 

R8C (Rent/Buy Comparison) Sales or investment tool 
to compare renting and savings account investment 
vs purchasing a particular property $249 

Osborne CBASIC source programs (Mod- 1 also): 

Payroll w/cosl accounting $249 

Accts. Payable/Accts Receivable $249 

General ledger w/cesh journal $249 

MA (CBASIC Books lea I $20 

GAMES 

Adventure $14 

Bridge Challenger $14 

Star Tret III $14 

Cnbbage $10 

Sargon Chess $19 

Sargon II (Cassette) ..$29 

(Disk) $J3 

Hani $|9 



THUS Cad* check or money o>d« tank saaj Iransiri COO or credit cMl tlOOOamuatvai Charge orders «»»t mrivdo tgpu at loneett Puichair orders iiioaccrattdirowracognmdpiijMviioni include t»ii»ho«tn»r»oti ■•ma* 
orders Ae^lii«d««ei we tor orepa<d orders I 01 rtiseing point Charge and ciedd orders add l'-. COOs rroeired 7 S*t detesil CaMowie itt<dfits add I- sales Hi For Hkeamg ■* U S edd<l] 30»vn ir*-anti« S rsiatle* 
ShtS'tt'Mi «1h«»istht^ctai4xl(airs«vK(whiv(iealKabMI f ereign orders wwat It eccsaaaawd by paywwnl » U $ tends and include 10*- If* stepping 0*"<-l<ts nuy k* imxivd ttUii»r<M»«rylre»«»aiio«e»« Allpncet 
vrtiect kt choagt and an vfttrs t*b|«ci la wihduaii mkkout nonet AM s erwewwa t it new wdh nuavfecUrvi] ancuniy wuttt ethtrwiM indicated 



PAlOMAfl 



COMPUTER " m Call or Write For Free Catalog 
PRODUCTS (714) 744-7314/744-9595 

910 W. San Marcos Blvd. * 105. San Marcos. California 92069 



.- Baader Sarvica—see page 226 



80 Microcomputing, September 1980 • 38 



THE ASSEMBLY LINE 



B8B8 


00100 


ORG 


8000H 








00110 


FAST MULTIPLY 


BY STEVE NELICIC, 


WASHINGTON, DC. 


8888 58 


00120 HUL LD 


I ( | 




.-MULTIPLICAND 


8881 1611 


00130 


LD 


D,a 




;NOW IN DE 


8883 62 


00140 


LD 


H,D 




[ZERO HL 


8084 6A 


80150 


LD 


L.D 






8IIS 07 


00160 


RLCA 






;ROTATE H'lER BIT TO CY 


81*6 3111 


00170 


JR 


NC.SO 




;GO IF H'lER BIT - ■ 


888c 19 


00180 


ADD 


HL.DE 




.-ADD H'CAND TO TOTAL 1 


80(9 29 


00190 


ADD 


HL,HL 




;SHIFT RESULT ONE BIT POS LEFT 


800A 17 


00200 


RLCA 






;SHIFT H' IER BIT 


8MB 3181 


00210 


JR 


NC,S*3 




;GO IF H'lER BIT - 


8MC 19 


00220 


ADD 


HL.DE 




;ADD H'CAND TO TOTAL 


800E 29 


00230 


ADD 


HL.HL 






803r 07 


00240 


RLCA 








8118 3081 


00250 


JR 


NC.SO 






8012 19 


00260 


ADD 


HL.DE 






8013 29 


00270 


ADD 


HL.HL 






8014 07 


00280 


RLCA 








8015 3001 


00290 


JR 


NC.SO 






8017 19 


00300 


ADD 


HL.DE 






8018 29 


00310 


ADD 


HL.HL 






8019 07 


00320 


RLCA 








801A 3001 


00330 


JR 


NC.SO 






801C 19 


00340 


ADD 


HL.DE 






801D 29 


00350 


ADD 


HL.HL 






801E 07 


00360 


RLCA 








801F 3081 


00370 


JR 


NC.SO 






8021 19 


00380 


ADD 


HL.DE 






8022 29 


00390 


ADD 


HL.HL 






8023 07 


00400 


RLCA 








8024 3001 


00410 


JR 


NC.SO 






8026 19 


00420 


RUB 


HL.DE 






8027 29 


00430 


ADD 


HL.HL 






8028 07 


00440 


RLCA 








8029 D0 


00450 


RET 


NC 






802A 19 


00460 


ADD 


HL.DE 






802B C9 


00470 


RET 








0000 


00480 


END 








00000 TOTAL 


ERRORS 














Program Listing 8. Fast 


Multiply Winner. 

^___ — 



This approach avoids the garbage collection 
problem by moving DATA values to a dummy 
string made up initially by legitimate string 
values. The location of this type of string is 
always within the statement itself, rather than 
being in the separate string area. (You may 
want to verify this by some experimentation 
with the V ARPTR.) The size of the string must 
be at least equal to the number of machine code 
bytes to be stored. The 255 byte maximum size 
limitation remains. Relocatable code must be 
used. This approach is shown in Program 
Listing 6. 

DATA Value lo Array 

A final method was suggested by Charley 
Butler of the Alternate Source. In this case, the 
DATA values are moved to an array. As arrays 
are allocated once and are not reshuffled, there 
is no garbage collection problem. Also, the ar- 
rays may be as large as is necessary, and any 
size machine language program may be used. 
Relocatable code must be used as the array 
location is not known beforehand. This ap- 
proach is shown Program Listing 7. 

The Great Second Assembly 
Line Programming Contest 

There was an excellent response to the sec- 
ond contest problem posed in this column in 
June: Write the fastest subroutine possible to 
multiply two eight-bit unsigned numbers in the 
A and B registers with the result to appear in 
HL with A and B preserved. 

Entries were in four categories; those that 
used huge tables to precomputc the result, 
those that used repetitive addition (too slow), 
those that used standard eight-iteration loops 



(some very elegant), and those that wrote in- 
line code to repeat the computations eight 
times, avoiding the loop overhead. 

As the decision of this blear-eyed judge is 
final, the winner belongs in the last group, hav- 
ing (he fastest worst-case multiply that did not 
use extensive prc-computed tables in memory. 
He is Steve Nelick of Washington, DC and his 
fast 157.85 microsecond multiply is shown in 
Program Listing 8. He will shortly receive a 
copy of the new computer science bestseller 
Godel, Escher. Bach by Hofstadter and a copy 
of my new Radio Shack fiction book Program- 
ming Techniques for Level II BASIC. 

Honorable mention goes to Foulk, Van Pelt, 
Mignery. Wallen. Lee. Craig, Thomas, and 
Smith. 

I appreciate all of the entries. Some of you 
went to elaborate documentation and I am in 
awe of the amount of work you performed. 

Many have asked me to keep the problems 
coming, so I am duty bound to pose a third 
problem: Write an assembly language sub- 
routine to draw a line between any two screen 
character positions. (Not points! There are 16 
lines of 64 character positions.) There will be 
two winners, one for the most elegant version, 
and one for the fastest version. Again, token 
prizes will be awarded. Send entries to the ad- 
dress at the end of this column. 

Next month we'll discuss the mysteries of the 
Radio Shack Disk Assembler and review some 
assemblers for the Model I LB 



William Barden. Jr. 
MllCPalrnada 

M - ,■:: Vkjo. CA 92*92 



SO INPUTS 

from page 16 



Double Size Graphics 

In Bertram Thicl's article, "Double Size 
Graphics" which (June 80). states thai the onl> 
\sa> to escape the double character mode is 
with u CIS, or as he goes on to describe later, a 
series of PEEKs. Actually, he is in error, the 
TRS-80 provides an escape from this mode via 
the CHR$(28), which returns the cursor to 
home, and resets the screen back to 64 charac- 
ters. It is the exact opposite of CHRS(23) and 
can be used as such. 

Jeff Lisen 
Huntington I 'alley. PA 



Super Program 



I would like to commend Delmer Hinrichs 
for his super BASIC Word Processor program 
that appeared in the May issue of 80 Microcom- 
puting. 

The program runs perfectly with just minor 
changes to accommodate my printer and pro- 
vide for a stop between printed pages so that 
single sheets can be used. The changes I made 
are: 

1 V*t LPRINT" •' at ihe end of line l«0 

2 Add line 167? to provide lop margin of one inch on Mngk 
vheetv and paper advance on tolled paper 

I6">5 EORZI ITO* I PRINT CHK* 1 38) NEXT/I 
i. Delete LPRINT CHtSQD and GOTO 1 680 from line 1740 
4. Add new line 1745: 

1745 INPUT 'NEW PAGE— PRESS ENTER WHEN 

READY";ZI:OOTOICTS 

There is one apparent misprint in line 880 (a 
lowercase 'P'). I'm guessing, but I think that 
the misprint should be replaced with a zero. 

Morris L. Krome 
Owings Mills, MD 



Recorder Variation 



For the past three years Grant Union High 
School in Sacramento California has been de- 
veloping a TRS-80 based microcomputer pro- 
gram as part of our math and science curricu- 
lum. During this period we have continued to 
acquire systems and build an extensive library 
of programs on tape and disk. Many of our 
programs were CSAVEd on the CTR-41 re- 
corder. Most of our recorders arc now 
CTR-80S. 

We developed an equation to convert refer- 
ence numbers from one tape recorder to anoth- 
er. We checked our results on several different 
tape recorders and found the maximum varia- 
tion to be one to two percent. 

The equation relating the two systems is as 
follows: 

CTR-41 (#) = (1.66KCTR-80(#)) 
CTR-80 (#) = (.6MCTR-41(#)) 

Madeleine Fish (Teacher) 

Steven Emert (Student) 

Sacramento. CA 



40 • 80 Microcomputing. September 1980 



Word Processing HMCT Style 



MM 



MAGKW 



■""-"Co* 



wn*"""' 



^ 




'.Using the best in word process- 
ing software the Magic Wand™ , 
the best in letter quality printers 
the NEC Spinwriter™. and the 
well-known TRS-80™ MOD II. 
You have looked and looked for 
the best and now it is available 
from the Complete Computer 
Company, HMCT. Word Process- 
ing at its best from $7500. 

Magic Wand available separate- 
ly for the MOD II and other com- 
puters $400. 

UMPT The Complete Computer Company 

IllfflOl 5313 Bissonnet Bellaire, Texas 77401 (713)661-2005 ^33 

Magic Wand is a trademark of Small Business Applications, Spinwriter is a trademark of NEC, and TRS-80 is a trademark of Radio Shack. 



friNEWS 



edited by Nancy Robertson 



"7%# fwo existing and 

complex sets of standards 

have led to classification 

chaos of the buyer. " 



COBOL on the 80: Prospects & Pitfalls 



If the item about Tandy's new COBOL 
( COmmon Business Oriented Language) com- 
piler didn't catch your attention in "80 News" 
last month, take another look. And take a peek 
at June's issue where you'll find the Nevada 
COBOL compiler. Then there's May with Mi- 
crosoft's COBOL announcement. 

Chairman of the American National Stan- 
dards Institute (ANSI) COBOL Committee 
James Panttaja explains that the introduction 
of COBOL for microcomputers "may put mi- 
cros in a different market place, taking them 
beyond the home, where they started their ex- 
istence, into the business world." 

One of the first things anybody hears about 
COBOL is that there are hundreds of thou- 
sands of business programs written in the lan- 
guage and hundreds of thousands of program- 
mers trained in COBOL. Like Panttaja, many 
people believe that the TRS-80 compilers, 
which convert COBOL to machine code, will 
open the door for 80 owners to the wealth of 
tried and true COBOL business programs. 

COBOL was first introduced to the market 
in 1959 — about one and a half decades before 
the advent of microcomputers. The language 
was designed to be self-documenting. It is writ- 
ten in full English words, in statements and 
paragraph-like formation. The idea was that a 
group of people could develop programs joint- 
ly, with each program continually stating its 
objectives and progress in plain English. 

Although COBOL originated from an effort 
to organize national libraries, Microsoft's Mike 
Orr explains that, "Over the years, COBOL 
has been tuned to be just what people want it to 
be." It began with good text movement capa- 
bilities and now exceeds BASIC and word pro- 
cessors in screen formatting, generating rows 
and columns of data, report generation, In- 
dexed Sequential Access Method (ISAM) filing 
and graphs. 

But because of its vocabulary and syntax, 
COBOL is a bulky language that can take up a 
great deal of memory. And it is a slow process 
to develop COBOL programs. Programming 
in BASIC is both faster and easier. Yet. BASIC 
cannot be applied to business applications as 
thoroughly. 

The situation is not simple. In its short 
history, BASIC has already been written in 
many versions. There are BASICs for every 
level of the TRS-80, the Apple and the Pet. 
There are BASICs for disk operating systems 



and others for cassette systems. In the long 
history of COBOL, it is hard to say how many 
versions of the language exist. Because of these 
differences in COBOL, programs will need to 
be translated, not only from machine to ma- 
chine, but from one version of COBOL to an- 
other, to operate on the 80. 

Languages dubbed COBOL range from 
scant, specific application languages to gargan- 
tuan languages that can operate in 12 modules 
serving countless applications. The price range 
of the three COBOLs with compilers that have 
been listed in "80 News" is indicative: Business 
Microproducts' Nevada COBOL for TRS-80 
Models I and II with CP/M costs $99. Tandy's 
TRSDOS COBOL for the Model II costs $299. 
Microsoft's TRSDOS COBOL-80 compiler 
costs $750. 



"Programs will need to be 
translated, not only from 

machine to machine, 
but from one. . . 

COBOL to another. " 



In an effort to limit the confusion caused by 
the proliferation of COBOLs, ANSI estab- 
lished the first COBOL standards in 1968. They 
were updated in 1974, and a corollary set, the 
Federal Information Processing Standards 
(FIPS). was issued in 1978. 

Deciphering COBOL types and standards is 
undoubtedly more difficult than programming 
in COBOL. The importance of this standards 
maze is its impact on the translation of the 
thousands of COBOL business programs 
already in existence. 

The ANSI-74 standards divide COBOL into 
12 possible modules and require only sufficient 
performance in the first three to classify a 
language as COBOL. These three modules are 
termed Nucleus, Table Handling and Sequen- 
tial I/O. The complete ANSI standards are ex- 
plained in the ANSI X3.23 manual. The 1978 
FIPS standards separate COBOL into four 



classes: low; low intermediate; intermediate, 
and high. 

ANSI's Panttaja asserts, "If the levels of 
FIPS or the modules of ANSI-74 are the same, 
very little rewrite is necessary to write a com- 
prehensive and comprehensible translation 
from any machine to another." Without the 
standards, COBOL translation can be just as 
difficult as any other machine translation. 

The two existing and complex sets of stan- 
dards have led to classification chaos for the 
buyer. Further, any distributor of COBOL will 
be quick to tell you that the standards do not 
account for non-standard extensions of their 
language. There are also factors of speed and 
run time programs to be considered. 

When and if you get the standards sorted 
out, there's still a hitch. As Panttaja explains, 
"There's no means of verifying ANSI stan- 
dards." And although the government, 
through FIPS, has devised tests to validate 
COBOL language compilers, they arc ad- 
ministered by manufacturers. There is no 
government grading or verification of the test 
results. 

New ANSI standards are being developed 
now and are expected to be released in the next 
few years. The COBOL Information Bulletin, 
citing what can be expected of the future stan- 
dards, is available from the ANSI COBOL 
Committee, 1430 Broadway, New York, NY 
10018. 

Despite the lack of software, both Microsoft, 
Bellevue, WA, and Business Microproducts, 
Livermorc, CA (who have had their separate 
TRS-80 COBOL compilers on the market for 
several months), are satisfied with their sales. 
Business Microproducts' Jim Smith says that 
they have found a market among high schools 
"and even universities" that are teaching 
COBOL programming. Mike Orr of Microsoft 
explains that despite a low advertising take off, 
their $750 compiler has "sold in the dozens in 
its first two months on the market." 

But unless the COBOL standards are quickly 
clarified, it's doubtful that the advent of 
COBOL for the TRS-80 will have the immedi- 
ate and dramatic impact on the business market 
that many people are expecting. Those thou- 
sands of existing business programs can't be 
run on the TRS-80— yet. ■ 

By Nancy Robertson 
80 Staff 



42 • 80 Microcomputing, September 1980 



Confused by the New 
Level II Two-chip ROM? 



Know what? Radio Shack is selling a revised 
two-chip version of ROM for Level II BASIC 
machines. These new 6K chips have given some 
users problems because the new ROM does not 
function in quite the same manner as the old. 

In their monthly newsletter, Microcomputer 
News, Radio Shack ran a list of command cor- 
rections for the new ROM, and some other in- 
teresting tidbits. They are rehashed here in an 
effort to clarify the confusing situation which 
has resulted from the introduction of this new 
two-chip ROM. 

First, the new power-up query is: MEM 
SIZE? The BASIC sign-on prompt is: R/S L2 
BASIC. The memory space saved by condens- 
ing these messages is now devoted to a key- 
bounce fix. The old KBFIX keyboard driver is 
no longer necessary and will not work with the 
new ROM. 

Second, free memory space has been reduced 
by two bytes resulting in a 15570 answer to the 
MEM? query in a 16K machine. 

Third, one can no longer CLOAD from ei- 
ther tape input when an expansion interface is 
bing used. Only tape drive number one may be 
used. CSAVE#-N procedures still allow the op- 
erator to select the destination drive in multi-re- 
corder set-ups, however. 

Fourth, pressing SHIFT and the down arrow 
simultaneously will result in control characters. 
You are in the control mode as long as both 
keys are depressed. 

Fifth, you can now perform multiple 
PRINT® operations by simply constructing 
your print statements as follows: 

PRINT© I0,"A ".©5O, ,, B , \@2000."t" 

In addition, about ten of the Shack's tapes 
will not CLOAD with the new ROM. If you en- 
counter this situation, a new tape will be sup- 
plied by Radio Shack. 

This ROM is not interchangeable with pre- 
vious ROMs. If you want it, be prepared to 
shell out $150 (Level II) for a complete conver- 
sion kit. The kit is only available as an installed 
modification and, as one might expect, only 
certified Radio Shack service centers will be do- 
ing the installations. Installation is extra by the 
way, but how much extra is not mentioned. The 
model number for the new Level II ROM is 
#26-1 120, and it is available now. ■ 

By Chris Brown 
80 Staff 



Please Be Patient 



At 80 Microcomputing we are under- 
going some staff changes that have re- 
sulted in a backlog of mail and manu- 
scripts. We are reading manuscripts as 
quickly as possible. The editors apolo- 
gize for any delay. 




The Infancy of Electronic News Delivery 



July I , The Columbus Dispatch became the 
first newspaper in the country to offer electron- 
ic home delivery. Owners of microcomputers 
can now dial their phones, connect their mo- 
dems and read the evening news from their vid- 
eo screen. 

The Dispatch is one of 1 1 Associated Press 
(AP) newspapers which will be offering elec- 
tronic home delivery through the CompuServe, 
Inc., Columbus, OH, data network. The other 
papers which will participate in electronic deliv- 
ery are: The Washington Post; The New York 
Times; Chicago Suntimes; The St. Louis Post- 
Dispatch; The Minneapolis Star and Tribune; 
The Norfolk Virginian-Pilot and Ledger-Star; 
San Francisco Chronicle and The Middlesex 
News (Framingham, MA). 

CompuServe's president, Jeffrey Wilkins, ex- 
plains that the 1 1 papers were chosen from more 
than 40 that were interested. Several of the 
publications are expected to join The Dispatch 
in electronic delivery sometime in September. 

July 14 Knight- Ridder Newspapers, Inc. also 
began electronic delivery of their paper on an 
experimental basis in 30 homes. Calling the 
project Viewdata, Knight-Ridder is working 
in conjunction with American Telephone and 
Telegraph. 

However, because microcomputers do not 
need to be dedicated to data sharing only, the 
prospects for the future of electronic delivery 
seem more likely to pivot on the reception of 
the CompuServe program. There are 1,300 
daily papers and 3,500 radio and television sta- 
tions who own AP. Most of them are curious: 
Does the public have any interest in microcom- 
puter, electronic delivery of the news? 

As it stands now, electronic delivery through 



CompuServe begins with a local phone call 
from the subscriber, answered by a local com- 
puter, which in turn communicates with Com- 
puServe's data base in Columbus. Via tele- 
phone wires and modems, news enters the 
home microcomputer at 300 words per minute. 
A directory or menu allows users to scan news 
sections and headlines. Stories can be called, 
read, saved or printed from each section. 

However, computer subscribers will have to 
say good-bye to Mary Worth, Steve Canyon 
and Charlie Brown. The comics, political car- 
toons and photographs will not be transmitted. 

For the time being, advertising is also absent 
from computer editions. Advertising generally 
accounts for about two-thirds of newspaper 
revenues. Although electronic delivery may 
prove less expensive than paper printing, it is 
argued by many people in the business that new 
concepts in advertising will be vital to the sur- 
vival of computer news delivery. 

The Dispatch has already made plans to in- 
corporate classified ads in their CompuServe 
edition. They are also working on an advertis- 
ing index system that will make it possible for 
space advertisers to sponsor several articles. 

Philip Meyer, marketing director of Knight- 
Ridder's Viewdata project, does not believe 
computer delivery will completely replace pa- 
per delivery. "The newspaper is not an ineffi- 
cient information retrieval device," he said. 
"You can scan it very quickly. The main threat 
to newspapers is not competition for informa- 
tion, but competition it (data sharing) provides 
for advertisers." 

Publishers and advertisers may adjust to 
electronic delivery of the news, but what will 
become of Sundays without the Sunday com- 



80 Microcomputing, September 1980 • 43 



NEW PRODUCTS 



Utilities for Businesses 



ACCT-M2 from Micro Architect, Inc. con- 
sists of five programs that carry out the on-line 
accounts receivable functions of a small busi- 
ness or a medical clinic. 

The three basic functions are initialization, 
data base management and report generation. 
Initialization allows users to specify the system 
parameters, such as company name and ad- 
dress, late charge policy, etc. It also can sort the 
customer names or change most of the system 
parameters. The data base management lets 
users add, inquire, delete and adjust transac- 
tions and customer information. 

Reports consist of sales journal, receipts 
journal, aging analysis, end of period process- 
ing, data base listing, labels, statements and 
deleted customer reports. A consistency check 
is included. 

ACCT-M2 is priced at $149, including a disk 
and user's manual. The user's manual is avail 
able separately for $5. A simplified version of 
the program is available for the Model 1 and 
costs $69. 

L2I6 is another business package from Mi- 
cro Architect for systems with at least 16K and 
Level II BASIC. It consists of the following 
programs: a cassette data base manager, a word 
processor, an inventory control system, a stock 
management program, a check balancing pro- 
gram, a label printer, a deposit calculator, a 
statistics program, a sort utility and a key- 
access utility. 

The complete package costs $59. 

For more information on either of these 
products, contact Micro Architect Inc., % 
Dothan St., Arlington, MA 02174. 

Reader Service w 1 74 



Color Graphics Circuit Board 

Integrated Service Systems, 1011 W. Broad- 
way, Minneapolis, MN, 5541 1 is selling a 
TRS-80 color graphics circuit board. It is de- 
signed for use with a standard color television 
receiver and a 4K to 48K Level II. The board is 
sold in two different packages: Model C-2000 
and Model C-1000. Both include all electronic 
components. Minor assembly is required to 
complete the RF modulator section. 

Models C-2000 and C-1000 are fully buf- 
fered and expanded to ten display modes. 
ASCII and eight-color semi-graphics can be 
mixed on the screen. Five four-color graphics 
modes and four two-color graphics modes are 
included. 




Mikro-disc Disk Drives 



COLPRT is a machine language program 
that allows ASCII and semi-graphics informa- 
tion to be displayed by LPRINT. COL- 
SCREEN is the program which transfers the 
TRS-80 graphics to a color screen. (COL- 
SCREEN is not available yet, but is expected to 
be on the market by October.) 

Model C-2000 includes the circuit board, 
COLPRT and power supply for $189.95. 
Model C-1000 costs $129.95 for the circuit 
board and software without the power supply. 

Reader Service »^333 



80 Music Synthesizer 



Software Affair, Ltd. is selling Orchestra-80, 
a TRS-80 music synthesis system written for a 
I6K Level II TRS-80. The system consists of 
software and hardware. 

The software is a five part machine language 
program: a digital synthesizer which produces 
four simultaneous voices in a six-octave range; 
a music language compiler, a full function text 
editor with blinking cursor, and a file manager. 

The hardware is a single 1 '/: by two inch PC 
board, completely assembled and tested, which 
plugs into the expansion connector of the 
TRS-80 keyboard or the screen printer connec- 
tor on the expansion interface. 

Tape and disk versions are supplied on 
cassette, with sample music programs. For 
more information, contact Software Affair, 
Ltd., 473 Sapena Court, Suite I, Santa Clara, 
C A 95051. 

Reader Service ^ 340 



Production to Begin on 
New Winchester Drives 



New World Computer Company, Inc., 3176 
Pullman St., Suite 120. Costa Mesa. CA 92626. 
has added the Minimikro-disc V Scries of 
5 V* -inch fixed disk drives and an enhanced 
double-density system called Mikro-disc VIII- 
1TF to its product line. 

According to the company, standard 
5 V* -inch floppy disk drives have an average ac- 
cess time of 298 milliseconds. The Minimikro- 
disc V-ITF can access data in an average of 
eight milliseconds. 

The original Mikro-disc 211, has doubled 
storage capacity and has been renamed the 
Mikro-disc VIII-ITF. 

The Minimikro-disc V-ITF and Mikro-disc 
V1II-1TF are priced at $700 and $1 100 respec- 
tively, in dealer quantities. Production is 
scheduled to begin by the end of the year. 

Reader Service »-* 328 



VTOS 4.0 Plus Manual 



Virtual Technology, Inc., Dallas, TX 75234, 
has a new disk operating system available, the 
VTOS 4.0. 

VTOS 4.0 will support five inch (35. 40 or 77 
tracks), eight inch (single or dual density), or 
ten M hard disks. Speed-up kits that are on the 
market will also be supported. Backup is sim- 
plified so that users only need to indicate the 
type of drives used. Improved chaining offers 
15 chaining commands thai can handle most 



44 • 80 Microcomputing, September 1980 



I'M fi BELIEUER !! 



I Love it !!. . .Its really a incredible O/S. It' just great! 
Now I see why people who have seen it say they are now 
believers. I know I am." lance micklus 



1) Larse (8") drivt support. 
2> Double Sided drive supuort. 
3^ Double Density drive support. 
4> 80 Track drive support. 

*NOTE a 1 1 above drives may be 
mixed on any one system and can be 



at Syssen 



or dur 1 iv 



uu'oos* output spoolers 

synbi : r it desisri provide 

ai p id pros raw 

any user 



out Put 

thout 



conf 1 «u red 
any Backup! 

5) Winchester technoiosy fixed drive 
support . 

0i Suppoi ts any combination of the 
above drives up to a max. of 8 
dr 1 ves. 

7> Supports double-speed processor 
ClOCk modifications. (ArChbOld for 
example ' 

8' FOSTER' Improved overlay 

structure us ins ISAM accessing 
techniques improves 1 oad ■ ns times by 
up to 1600V-. 

9> Genera 
of a true, 
s 1 mu 1 taneous 
execut 1 on 
1 nter vent 1 on. 

10) Keyboard - ' Type-Ahead feature 
permits you to enter keystrokes befor* 
your pros rams need them. 

11) User definable keys. all. 28 
letters. 

12' Built 1 n GraPh.c stiins packer 
i *ts you enter sraPhic symbols into a 
BASIC prosram from the keyboard 
throush the use of the <Ciear> key. 
The (Clear) key is s i me i y held down 
fjust like the (Shift) keys' dur ins 
other keystrokes and 

v i 01 a. . . s raph 1 cs ! 

131 Dated files. All files 

accompanied by the date of their 
modification 1 creation or wr.te'. 

14) Marked f.ies. Ai i files 

accompanied by a 'mark' .f they have 
been modified since they were last 
backed up. This Permits the BACKUP 
ut 1 I 1 ty to copy on I y those f 1 1 es which 
have actually been updated since a 
previous backup. 

1B> File transfer by class. Allows 
transferr ins of ail -f 1 I es of a similar 
directory classification such as /CMD. 
/BAS. /PCL. etc. 



art 

last 



are 



VTOS 
4.0 

VTOS 4.0 

Opera t in£ System 

Diskette with 
Operator's Gunk 1 

$99 .95 

VTOS 4.0 

M ast or 

Reference Manual 

$29.95 

VTOS 4.0 

Combinat ion - 

1 .0 disk. 

Operator's Guide. 

and Master 
Reference Manual 

$125.00 



10) Built-in SYSTEM command contains 
lower case d 1 so 1 ay driver. screen 
print. br.ak key disable. biink.ns 
cursor, disk drive stepoins rate and 
motor-on delay modifications. and 
more. 

17 > User may SYSGEN a custom VTOS 
system conf ■ su rat 1 on conta ■ n i 11s 
spec 1 a 1 I/O drivers. device LINK ins 
and ROUTE. ns. SPOOL ■ ns and DEBUG 
tasks. etc. which Mill be 
automatically loaded dur ins the BOOT 
process w.thout reauirins a more 
lensthy AUTO and CHAIN procedure. 

10) Non-BREAhabie AUTO and CHAIN 
commands. 

19) Wild-card DIRectory. Permits you 
to locate a 1 1 f 1 1 es of a certain 
classification such as '/BAS'. 
Uniformly indicates file s 1 ze in K 
< 10J4 bytes' resardiess of drive type. 
"DIR D" wou 1 d s 1 ve you an your files 
that start with "D". 

20* Dynamic file name defaults in 
APPEND. COPY, and RENAME commands 
allow you to specify only 
information about file names. 

21 1 COPY and APPEND commands 
up to 300% faster. 

22 » ALLOCate command for 
ore-ai 1 ocat ■ on and non-rei easi bi 1 ■ ty 
of file space. F» !• space Hill never 
shr.nk if this option used. 

23» MEMORY command for di recti* 
sett ins upper memory 

24) Variable Lensth fi 
incorporated which 
blocks short user data 



mini ma 1 



execute 



mi t. 

I e support 1 s 
automat i cal 1 y 
records both 



within a sector and across sector 
boundaries thereby tak ■ ns maximum 
advantase of d ■ sk file space. 

20) No security disk needed to make 
backups or to run the system' 

20) Thoush many 0/S bear his desisn 
and code VTOS A. is the only Fully 
Aproved Operatins System by Randy 
Cook! And .t is FANTASTIC 

27) Endorsed by Scott Adams and Lance 
M. ck 1 us' 



VTOS and VTOS 4.0 are registered trademarks of VIRTUAL TECHNOLOGY. INC. - Dallas. Texas 75234 

Available from the following distributors or 
your local computer store, dealer inquiries invited 

S% Discount Just For Mentioning This Ad. (Valid month of this publication ONLY) 



QUALITY 

SOFTWARE 

DISTRIBUTORS 

11234 Park Central PI Suite C 
Dallas Texas 75230 

• (214) 692-1055 

• Micronet - 70130,203 

SOURCE - TCC293 



MMdventure 

^^kW^ INTERNATIONAL " 97 

ADVENTURE INTERNATIONAL 

Box 3435, Longwood, Fla. 32750 
(305) 862-6917 - Voice 
after 8:00 - same number 
as FORUM 80. (SOURCE - TCC957; 



^0 Ma 



SMALL BUSINESS 

SYSTEMS 

GROUP 



Main St. and Lowell Road 
Dunstable, Mass. 01827 
(617) 692-3800 - Voice 
(617) 692-3973 - FORUM 80 
Micronet - 70310,236 



Prices subject to change without notice. 



v Reader Service— see peg* 228 



80 Microcomputing, September 1980 • 45 



NEW PRODUCTS 



types of routines, including timed functions. 

There is a built-in graphics screen packer. 
Graphics can be designed on the screen, listed 
and combined with BASIC LOOK-AHEAD. 

Printer and keyboard speed buffers make it 
possible to use the system for two functions at 
one time. For instance, it is possible to operate 
the printer and run a program simultaneously. 

The VTOS 4.0 Master Reference Manual 
claims to offer "the detailed handholding in- 
formation that so many people have been ask- 
ing for." 

Together, the manual and VTOS 4.0 are sold 
for S 1 25 . The manual is available separately for 
$29.95. 

Reader's Service ^ 330 



Speed Loading Cassettes 



Personal Micro Computers, Inc. (PMC), 475 
Ellis St., Mt. View, CA 94043. is selling Fast- 
load to input cassettes to Level II computers at 
one kilobyte per second. PMC claims this is 16 
times the normal speed. Any cassette saved at 
normal speed (500 baud) can be loaded with 
Fastload at 800 baud. 

Unlike other high speed program loading 
devices, Fastload docs not require transferring 
programs to another media first. This PMC 
product is also able to search for BASIC pro- 
grams at high speed, but it does not provide for 
high speed recording of cassettes. 

The Fastload cassette interface plugs into 
either the back of the TRS-80 Level II 16K 
keyboard or expansion interface. PROM 
memory is located above ROM and belo* 
RAM. It also contains a keyboard debouncc 
program . 

A CTR-41 tape recorder must be used with 
Fastload. Modifications must be made on stan- 
dard CTR-4Is with instructions provided; a 
new recorder with the modifications is sold by 
PMC for S95. The Fastload cassette interface is 
sold for $188. 

Reader Service s 349 



Model II System Monitor 



RSMII is a relocatable system monitor for 
the Model II sold by Small System Software, 
P.O. Box 366. Newbury Park. CA 91320. 

RSMII includes commands to insert break- 
points, dump memory in hex and ASCII, test, 
search, modify, verify, zero and fill memory, 
etc. These features are also included in the com- 
pany's Model I system monitors. 

Features that are new with the RSMII in- 
clude a video editor to modify both memory 
and disk sectors. Disk commands can access 
four drives and can read and write single and 
double-density disks. There are controls for 
split screen scrolling and adjustable scroll 
speeds. 

RSMII will operate printers through either 
parallel or serial printer ports at baud rates 
from 1 10 to 9600. An image of the screen may- 
be printed at any time. Page-length control and 
RS-232-C handshaking are supported. 

The system monitor comes on a self-booting 
disk with a relocater. It is sold for $39.95 with 
an instruction manual. 

Reader Service • 167 

General Ledger System 

Sturdivant & Dunn, Inc., 124 Washington 
St., Box 277, Conway, NH 03818 is selling Full 
Charge Bookkeeper, an advanced general led- 
ger system for small businesses. 

It gives users an efficient method of posting 
income, expense and adjustments to obtain fi- 
nancial statements plus cumulative detail on an 
annual basis. It can handle 12 characters of al- 
pha and 4520 posted entries in up to five de- 
partments. 

Full Charge Bookkeeper is written for a 
TRS-80 Level II with 48K, three disk drives and 
printer. The package, which includes manual 
and programs is priced at $199.95. It will be 
sold for $129.95 through September as an in- 
troductory offer. 

Reader Service ^ 18] 





Fastload Interface and Cassette 



Radio Shack's Self-teaching Guide to Pro- 
gramming 



RS Game and Guide 



A new game from Radio Shack, Dancing 
Demon, displays an animated figure dancing to 
music that can be heard by connecting the com- 
puter to an amplifier and speaker. The program 
is supplied on cassette and includes two prepro- 
grammed selections. The user can also program 
other tunes of up to 248 notes and choreograph 
dance routines to go with the music. 

The program is designed for a Model I Level 
II TRS-80 with at least 16K RAM. It is priced at 
$9.95. 

Radio Shack also has a compact 200 mW 
speaker-amplifier that can be used to produce 
the musical accompaniment for Dancing De- 
mon. The Realistic Micro-Sonic Speaker- 
Amplifier is priced at $1 1.95. 

TRS-80 Level II BASIC, a self-teaching 
guide to programming and using a Level II mi- 
crocomputer, is another new product from 
Radio Shack. Each chapter is composed of 
short, numbered sections which present ideas 
or topics on BASIC, the TRS-80, or a program 
that is being developed. 

TRS-80 Level II BASIC, is priced at $9.95. 

Reader Service *-* 326 



Time-sharing Peripheral 

The Micromint Inc. is selling a new data 
communications product, the Chatterbox. The 
Chatterbox is a combination of the presently 
available Comm-80 I/O interface for the 
TRS-80 and an acoustic modem, to turn 
TRS-80 into a timesharing terminal. 

The Chatterbox includes a built-in program- 
mable 50-19200 baud serial port, a Centronics 
compatible parallel printer port, a 300 baud 
acoustic originate modem, and a spare TRS- 
BUS expansion connector. 



46 • 80 Microcomputing, September 1980 




TRS-80 



EXPAND YOUR MEMORY AT 
AN INCREDIBLY LOW PRICE 



16K RAM- $59.50 
32K RAM -$109.50 



NEW FROM 



•Pretested 

•One year warranty 

•Available now 




MICROTEK^ 



9514 Chesapeake Drive 
San Diego, CA 92123 
Tel. (714) 278-0633 
TWX 910-335-1269 "™ 



"Trademark Radio Shack, Div. Tandy Corp. 



■ Header Service— see page 226 



80 Microcomputing, September 1980 • 47 



NEW PRODUCTS 




Comm-80 of Chatterbox Package 



Model I555S Analog-to-digital Converter 



It comes with power supply, connection 
cable, user's manual, and terminal software for 
immediate operation. It is hardware and soft- 
ware compatible with existing TRS-80 products 
and connects either to the keyboard connector 
or screen printer port on the RS expansion in- 
terface. It does not require the RS expansion in- 
terface for operation. 

The Chatterbox is sold for $259.95 from The 
Micromint Inc., 917 Midway, Woodmere, NY 
11598. 

Reader Service h* 329 



TRS-80 to H-14 Interface 



The Model PTS-3 (for use with an expansion 
interface) and the Model PTS-4 (for use with- 
out an expansion interface) are printer inter- 
faces from Multi Media Systems. They make it 
possible to connect the TRS-80 microcomputer 
with the H-14 Serial Printer. 

The PTS-3 plugs into the parallel printer port 
of the TRS-80 interface. The PTS-4 can be used 
with the PTS-3 in systems that do not include a 
Radio Shack expansion interface. The H-14 is 
connected to the DB-255 connector of the 
PTS-3. 

A software driver is not needed with this 
system, because it will support all printer com- 
mands in BASK' or machine language. 

The PTS-3 and the PTS-4 are each priced at 
$73.45 for an introductory period from Multi 
Media Systems, P.O. Box 41081, Indianapolis, 
IN 46241. 

Reader Service • 338 



E.S.P. Lab for Research 



E.S.P. Lab has been designed by Manhattan 
Software, Inc., P.O. Box 5200 Grand Central 
Station, New York, NY 10017, as a program 
for research into possible extrasensory pheno- 
mena, as well as for casual testing of the possi- 
bility of telepathy, clairvoyance, precognition 
and telekinesis. 

Based on Duke University experiments, 



E.S.P. Lab selects randomly from among a set 
of five symbols (square, triangle, cross, wavy 
lines and oval), presenting one symbol at a time 
on the screen for telepathy experiments. All 
symbols are programmed in machine language 
and appear on the screen instantaneously. For 
clairvoyance and precognition testing, the pro- 
gram selects the symbol before or after the 
response, prompting only with a question mark 
on the screen. 

Complete records are kept in memory of 
each symbol and response for a series of ten 
trials of 25 symbols each. Tables of results are 
constructed, with analysis of matching symbols 
and responses. For TRS-80 Level II I6K, 
E.S.P. Lab costs $9.95. 

Reader Service *•* 339 



Packing Program 

Data Assoc., Box 882, of Framingham, 
MA 01701, has released Pack8, designed to 
pack BASIC programs for faster loads and 
runs. Pack8 can reduce memory as much as 40 
percent. 

Pack8 is written for 32K and 48K Model I 
computers using one disk drive. All the lines in 
the program can be compacted, or a block of 
inclusive numbers. At the end of the packing, a 
summary is presented of the number of bytes 
and lines in the original program. 

PackS is provided on cassette with instruc- 
tions, and is sold for $19.95. 

Reader Service • 169 



1555S Analog-to- 
digital Converter 



Tustin Electronics Co. has added the Model 
1555S to its series 1500 analog-to-digital con- 
verter product line. 

The new model provides a complete conver- 
sion of an analog voltage to a 15-bit digital 
number in less than five microseconds. It is a 
monotonic unit. 

The Model 1555S can be used by itself or 



with other analog modules to form a complete 
system. The converter price is $1500 from 
Tustin Electronics, 1431 E. St. Andrews PI., 
Santa Ana, C A 92705. 
Reader Service • 327 



Software Programming Tools 



PROgrammer by Rational Software, 963 E. 
California Blvd., Pasadena, CA 91106, pro- 
vides professional-quality programming tools 
to users of Levelll BASIC. 

After a short machine language routine is 
read, five functions are continuously available. 
A single keystroke directs keyboard input, 
which interprets and executes the command 
line. After execution, control is automatically 
returned to Level II BASIC. 

The program also includes a keyboard de- 
bounce routine. PROgrammer costs $25. 

Reader Service • 336 



Property Management System 



A-T Enterprises has a new income property 
management software package for TRS-80 
Model II. The Property Management System 
(PMS) is designed to meet the Institute of Real 
Estate Management recommended computer 
system capabilities. 

It is suitable for all types of income proper- 
ties including apartments, mobile home parks, 
office buildings, warehouses, etc. The system is 
a full general ledger system that keeps track of 
all income and expenses providing formatted 
financial statements, management reports and 
exception reports upon request. 

The PMS software operates on the Model II 
with 48K of RAM, two eight inch disk drives 
and a printer. It is written in CBASIC, runs 
under CP/M and is also compatible with most 
Z-80 and 8080 systems. 

PMS, including one year maintenance, costs 
$650. A demonstration disk is available for $35 
from A-T Enterprises, 221 North Lois, La 
Habra, CA 90631. 

Reader Service ** 332 



48 • 80 Microcomputing, September 1980 



If you 

just bought 

another 

printer, 

boy are 

you gonna 

be sorry 




Epson. 



The Epson MX-80. It's not just another worked- 
over rehash of last year's model. It's our top-of- 
the-line 80-column printer. It's new. From the 
ground up. And it's the most revolutionary 
printer to hit the market since Epson invented 
small printers for the 1964 Olympics in Tokyo. 
Don't take our word for it, though. Compare. 
There simply isn't a better value in an 80-column 
printer. Period. 

But here's the fact that's going to stand the 
printer world on its ear. The MX-80 sports the 
world's first disposable print head. After it's 
printed about 50 million characters, you can 
throw it away. Because a new one costs less than 
$30, and the only tool you need to change it is at- 
tached to the end of your arm. 

Now that's revolutionary, 
but that's only the beginning. 
The MX-80 also prints bidirec- 
tionally at 80 CPS with a logi- 
cal seeking function to mini- 
mize print head travel time 



The world's first disposable print 
head. It has a life expectation of over 50 
million characters, yet it's so simple, 
you can change it with one hand. And it 
costs less than - repeat less than -$30. 




and maximize throughput. It prints 96 ASCII, 
64 graphic and eight international characters in 
a tack-sharp 9x9 matrix. And it provides a user- 
defined choice of 40, 80, 66 or 132 columns and 
multiple type fonts. 

We spent three long years developing the 
MX-80 as the first of a revolutionary series of 
Epson MX Printers. We employed the most ad- 
vanced automatic assembly and machining 
techniques in existence to produce a printer that 
is incredibly versatile, remarkably reliable and 
extraordinarily inexpensive. It's a printer that 
could only come from the world's largest man- 
ufacturer of print mechanisms: Epson. 

If it sounds like we're proud of the MX-80, we 
are. Not only does it do things 
some of the world's most ex- 
pensive printers can't do, it'll 
do them for you for less than 
$650. That's right. Under $650. 
And if that isn't revolution- 
ary, we don't know what is. 



.--404 



EPSON 

EPSON AMERICA, INC. 



■ Reader Service - see page 226 



23H44 Hawthorns Boulevard, Torrance. California WW, Telephone (213)378-2220 

80 Microcomputing, September 1980 • 49 



10 Print "The beginning 

of a series" 



20 Pf> int 

"Into the 80's" 

30 Print 

"Toy I R Sinclair' 




U^Eli*} ECJ1 E@ ill ill c? 




/. /?. Sinclair 

89 Alexandra Road 

Sible Hedingham 

Halstead, Essex C09 3NP 

England 



Many articles are written for those of you 
who have owned a TRS-80 for some time 
and know what programming is all about. So, 
this series is dedicated to the thousands of read- 
ers who are just about to buy a TRS-80 — or 
have just bought one— and want to know what 
they've gotten into. 

Throughout the series, we'll be talking about 
the Model I Level II TRS-80. Level is Tandy's 
word to indicate the complexity of program- 
ming language its computer is able to under- 
stand. We're dealing with the Level II only for 
two good reasons. First of all. Level II is much 
more useful. And, secondly, the Level I com- 
puter is already accompanied by an excellent 
manual for the beginner. 

One measure of a computer's power is its 
memory. Memory dictates the amount of infor- 
mation (data) a computer can store and is mea- 
sured in units called kilobytes, shortened to K. 
The 4K computer can store four kilobytes of 
data. Nothing in this series will cause you to run 
out of memory space on a 4K TRS-80. 

Before you proceed, be assured of one point. 
The computer does exactly as you instruct it, 
nothing less, nothing more. 

If you have not put in the instructions to print 
letters or numbers on the video screen, then 
these letters or numbers just don't get printed. 
One of the humiliating things about being a 
computer owner is knowing that whatever goes 
wrong is your fault. 



Practical Pointers 

Take a look at the sockets at the back of your 
80. They are European DIN-type sockets and 
match five-pin plugs. There are three of (hem, 
one each for power in (from the transformer 
unit), cassette in/out (I/O) and video out. 

Before you start using your 80, take the ad- 
vice of an old hand and label these plugs and 
sockets with differently colored tapes. I use red 
for the power plug, green for video and yellow 
for the cassette. If your 80 sits in the same place 
and you never unplug it, this isn't significant. 
The odds are, however, that some day you'll 
want to shift it, and you could easily end up with 
plugs in the wrong sockets, since they are iden- 
tical and easily confused in poor lighting condi- 
tions. 

Keeping your system cool is another useful 
tip. Try not to have a desk lamp shining on the 
keyboard, for instance. It doesn't help, either, 
if you've used the computer all day with bright 
sunlight heating up the keyboard casing and the 
electronics inside. High temperatures also 
damage cassette recordings. 

I've found that a normal room temperature 
of 70-75 degrees won't cause the TRS-80 any 
distress, even if you use it all day. It's another 
story if you have an expansion unit attached, 
but we won't go into that. Just make sure that 
that little black box which is the transformer 
unit is on the bench or on the floor, with room 
for air to circulate around it; don't put it inside 
a box or surround it with books. 

Power It Up 

You're ready to power up. Plug all the line 
plugs into the wall sockets and switch on. 
DON'T switch on the keyboard first — always 
have power on the cables before you turn on the 



"If you have not put in 

the instructions to print letters 

or numbers on the video screen, 

then these letters or numbers just 

don't get printed. One of the 

humiliating things about being a 

computer owner is knowing that 

whatever goes wrong is your fault" 



units, because the switch for the keyboard does 
more than just switch powei 

Start the countdown by switching on the 
monitor. (On the one I use, the brightness con- 
trol must be pulled to switch on.) Let the 
monitor warm up tor a minute, then switch on 
the computer keyboard. The ON/OFF switch is 
at the back . next to where the power supply plug 
enters the casing. It's deliberately made a bit 
hard to find, because when you switch off a 
computer, all the program material you had 
stored in it is lost, gone forever, unless you 
recorded it on a cassette previously. 

As you press the ON/OFF switch, you'll see 
the video screen suddenly filled with a mixture 
of numbers, letters and odd shapes. That's 
"garbage," caused by the computer memory 
being activated. Each little cell of memory can 
store a bit of information; zero voltage repre- 
sented by a zero, or + 5V represented by a 1 . 

Upon power up, when all of these cells are ac- 
tivated, some come on as Is, some as Os. About 
8192 of these memory cells send signals to the 
video screen, the cells which are set to 1 cause 
parts of the video screen to light up, and the 
cells which are left at keep the screen dark. 

The result is a display of light and dark pieces 
at random or almost at random. Circuits inside 
the computer force these light and dark places 
into patterns, the patterns which we call letters, 
numbers and graphics blocks, and this is the 
pattern we see just as we depress the ON/OFF 
switch. When you release the power switch, the 
garbage clears, because the switch operates a 
memory clear routine for the video screen and 
memory — that's why it isn't a good idea to 
switch the keyboard on before plugging in the 
line and powering up. 



The Mystery Message 

Shining on the video screen in all its glory is 
the message MEMORY SIZE ? It has floored 
many a beginner. Did no one back at Fort 
Worth tell the machine what its memory size is, 
you ask? Ignore it for the moment, press the 
ENTER key, and these more reassuring words 
appear: 



RADIO SMACK 

READY 

> 



ll-VH II BASK 



Your computer is prepared for programming 
in the BASIC program language. 

What about the MEMORY SIZE? message? 
Well, as it happens, a lot of computer tasks can 
be performed faster and more efficiently by giv- 
ing instructions directly to the microprocessor 
chip inside the computer. This chip needs 
special instructions, called machine code or ob- 
ject code, and these instructions can't be loaded 
into the computer in the same way as an or- 
dinary BASIC program. 

Unless you're going to use machine code pro- 
grams right away, though, you can ignore the 
MEMORY SIZE? question. 

The one time you can't ignore it is when it ap- 
pears while you're running a program. When 
that happens, it's an unwelcome sign, called a 
re-boot, that something is very wrong with your 
program. The computer has started its power- 
on sequence again. There's no harm in it, but 
you will have lost your program unless you 
saved it on cassette earlier. 

The READY signal is an invitation, but 
unless you know what it's inviting you to do, 
you can't take advantage of it. At the READY 
signal, you can either load a program from a 




cassette or you can type one yourself. Since 
you'll learn more about the 80 from writing 
your own programs, however simple, we'll start 
there and leave the frustrations ,>! cassette 
loading for a later date 

READY is an invitation for a BASIC pro- 
gram. BASIC is an acronym for Beginners All- 
purpose Symbolic Instruction I ode, and it's the 
easiest of programming languages to learn. 

Why should we have to learn BASIC? 

It's all bound up with the way computers 
work and are designed. The fastest and most ef- 
ficient programs are written in machine code, 
but learning and using machine code is a painful 
business, and writing machine code is a 
frustrating experience. 

For these reasons, computer designers have 
continually sought to make it possible to give in- 
structions in simpler forms, using English 
words (or Spanish, French, Italian and others) 
and stringing them together in a way which is 
reasonably simple to understand. 

If you've looked at some of the programs 
printed in the back of the TRS-80 Manual or 
published in 80 Microcomputing, you might not 
quite believe this last statement, but compared 
to most other computer languages, BASIC is 
reasonably easy to understand. We can devise 
simpler languages, but the penalty for using a 
simpler language is either that it doesn't do as 
much as we would like, needs more memory or 
takes longer to run. Right now, your TRS-80 
comes with its BASIC language built in. 

Like any other language (and I've had to cope 
with Latin, French and Greek in my time), 
BASIC is best learned by using it. Unless you in- 
tend to use your computer simply to run pro- 
grams written by other people and obtainable 



80 Microcomputing, September 1980 • 51 



on cassette, you haven't much choice— learn 
BASIC! 

Unlike other computer languages, BASIC" 
isn't standardized. A program written in 
BASIC for another computer may not run on 
the TRS-80, and vice versa, unless you make a 
few changes. 

It is possible to write BASIC programs that 
will run on any computer equipped with the 
BASIC language (the Adam Osborne programs 
are good examples of this), but you can get a lot 
more out of your 80 if you know the peculiar- 
ities of its dialect of BASIC. 

This dialect, incidentally, is one of the most 
advanced BASICs fitted to a small computer. 
We can't hope to show all the features of 
BASIC programming in this series, but we can 
try to fill the gap between elementary BASIC 
textbooks and Radio Shack's Level II Reference 
Manual that comes with your computer. 

Program Proverbs 

If you've never programmed a computer 
before, learning BASIC on your own can create 
as many ulcers as guarding a bank during a 
revolution. Computers are fussy about the way 
you use the language. It the manual says that a 
word must be followed by a comma, then it real- 
ly must be followed by a comma, or your pro- 
gram won't run. 

If, on the other :tariJ, a word needs a semi- 
colon after it, you can't get by with just a com- 
ma or a colon. This punctuation is translated in- 
to instructions by the computer, and different 
marks denote different instructions. 

Translated? That's just what happens. There 
are about twelve thousand bytes of memory in- 
side your TRS-80 which you can't alter. The 
professionals call it ROM, or read-only mem- 
ory. It reads your BASIC program and converts 
each letter or word into machine code instruc- 
tions to the microprocessor. Because each in- 
struction is converted and then carried out, the 
instructions are much more long-winded than 
those in a machine code program. 

Bigger computers can do what's called com- 
piling, which means translating the entire pro- 



gram into machine code in one run, and then 
running the machine code. The TRS-80, like all 
small computers, only interprets — it converts 
each instruction in the BASIC program into 
code, runs it and then goes on to the next part. 
The difference is between dictating directly to a 
secretary, with all the urn's and er's of speech 
and delivering an edited tape to an audio typist. 

Let's start again with the READY signal star- 
ing us in the face. Your first response toward 
writing a program is to type a line number. The 
line number is a tag we can attach to an instruc- 
tion so that we and the computer know where to 
find that instruction. 

Take any number between I and 65529. Nor- 
mally, you start at 10 or 100. It doesn't matter 
what numbers you choose, since you don't use 
more memory by numbering lines 100, 200, 300 
than by numbering them 10, 20, 30. Important 
to remember is that the program should flow 
from the lowest numbered line to the highest. 

Since we have to start somewhere, type 10 
and a space. Your program now starts at the line 
numbered 10. Since it's a bit depressing to stare 
at a blank screen, we'll get the computer to 
PRINT my name. 

10 PRINT "IAN R SINCLAIR" 

Remember, the quote marks must be in place, 
because they indicate to the computer that the 
words between them are to be printed on the 
video screen and are not part of an instruction. 
Marks that divide one kind of word from 
another are called delimiters, and the quote 
marks are the easiest of these delimiters to work 
with . Make sure that anything you want printed 
to the video screen starts and ends with quote 
marks. 

Made a mistake? We're not all trained typ- 
ists, so the TRS-80 is very forgiving. Use the 
backspace, the arrow which points to the left, 
on the key next to the @. Each time you press 
this key, one letter of your instruction is wiped 
out, and you can type another one. Keep on un- 
til the line is perfectly typed. 



Now that you've typed the line, you must 
press ENTER to make certain that it's planted 
in the computer's memory. Even if you forget 
the line number, you still get a result— the 
words which were inside the quote marks will be 
printed, but you don't have a program because 
it won't repeat, and you must start again. If 
your line was entered correctly, it is now a very 
simple program. We can run the program by 
typing the word RUN and then hitting ENTER 
again. 

All right, so it's not impressive, but each time 
you type the word RUN and hit ENTER, you'll 
get my name printed on the screen. Makes me 
feel good at least. 

Try typing the instruction with no space be- 
tween the 10 and the PRINT, so that it reads 
10PRINT "IAN R. SINCLAIR". Does it make 
any difference in the way the program runs? 
Did I say that computers were fussy? 

Now type LIST10 and hit ENTER. This 
prints your instruction line on the screen again. 
Notice anything about it? Right, the space has 
been put in again between the 10 and the 
PRINT. You can't cheat your TRS-80 this way! 

Now try some more deliberate errors. It 's just 
as well to know at this stage what effects they 
have, rather than be tangled up with an un- 
familiar error message later on. For a start, 
leave out the first set of quote marks. Then try 
typing PPRINT or PRI1NT instead of PRINT. 
Doesn't run, does it? 

Instead, you get the words SN ERROR. SN is 
a shortened version of SYNTAX, a word that 
language teachers use to mean the way in which 
a language is constructed. If you say in English, 
"I am here since yesterday," your syntax in 
English is poor, but the same phrase in French is 
grammatically correct. 

Syntax is a matter of rules, and a SN error 
means you have broken a rule of BASIC, by 
leaving out a delimiter, or misspelling an in- 
struction word. Some newer computers, in- 
cidentally, reject a syntax error the moment it is 
entered, but the TRS-80, like its entire genera- 
tion of home computers, doesn't spot the error 
until you try to RUN. 



Rat's ftevsngs! 
Featuring 3-D Graphics! 

Rat s Revenge allows you to run a maze from 
the inside' Exceptional use of the TRS-80 s 
often maligned graphics capabilities produces 
3-dimensionai pictures o( hallways, dead -ends 
openings to right and left, and more Rat s Re 
venge generates a new maze tor each game 
You musf find the cheese before you starve As 
starvation approaches, hallucinations appear 
and mysterious poems are heard At the end of 
each game the maze is displayed and your 
wanderings traced out Additibnai features in- 
clude help hint quit, and acceleration com 
mands. two levels of difficulty and two sizes of 
maze Either the four arrowbuttonsor a numeric 
keypad -:an be used fc movement 
TRS- HO Level li 16Kcasse1te $1295 



Systems Software unconditionally 
guarantees satisfaction Oders are mailed 
withm two days of order receipt Write for 
our complete catalog ot software 



Med Systems Software 

PO Box 26/4 Chapel Hill NC 27514 
(919)933-1990 ^128 



VISA 
M.C. 




These 


popular, professionally 


developed 


•PPll 


cations are low-priced. 


Guaranteed 


performance! Detailed booklet 


included. 


• 


BUDGET i. INVESTMENT 


117.95 


• 


BUDGET 1. CHECKING 


IK..95 


• 


HOKE INFO RETRIEVAL 


•11.95 




MATH (ages 5 and up) 


» 7.95 




STOCK PORTFOLIO 


118.95 




AUTOMOBILE 


112.95 




MASTERMIND gene 


110.95 




MONTE CARLO gaae 


» 7.95 




and others from 


1 ^95 



Send order, or J 1.00 for descriptive 
catalogue (free with order) to: k- 1 >6 

NCWIY SOFTWARE DEVELOPMENT CO 
2M OAWLISM AVE TORONTO CANADA M4N 1 Jfl 



779 UPPER CASC/tOWOr COS* 

"Conversion Kit r 

Expand the capabilities of vour 779 line printer to 
include word processing 11 Available to a* Centronics 
779 TRS 80 Printer i owners is the option of lower 
case ana cnanginq slash Zero to standard No etch 
cuts or soidennq needed mstaits m minutes with a 
screwdriver no program modification or additional 
interface « reauirea Prtcs $125.00 

Motor control "COttvnrstOM kit ir 

*OR AU CSNTROWCS 779 'TIS S3 FSMTBt I IMi PeWTSWI 

Our Conversion Kit " Motor Controller gives vour 779 
the ability tc turn the motor on and off automatically 
Removes the annoying noise of constant run 
increasing tne life soan of your 779 TRS 80 line printer 
motor 1 no soioenng software or hardware changes 
needed installs easily Price $95.00 

SAVfl Buy Service Technologies Conversion Kit i 
and Conversion Kit n together for the sinqie price 
Of $199.00 

To order please send check or money order m the 
proper amount to I , Til <1 

I 'trrtrt /rrnnrfvon*, fnr. 

52 Nightingale Rd 
Nashua NH 05062 t*W 
I605I 885-5569 
visa and Master Charge accepted (please include 
signature expiration date and phone number 

Service Technologies will pay all shipping and 
handling 



52 • 80 Microcomputing, September 1980 



64K RAM 

FOR YOUR MODEL 1 TRS-80 



•Release your software chains with the NEW 
FREEDOM OPTION, a pluggable board that 
restructures thi TRS-80*. on command, to perform 
like a large Zfr) system. All the TRS-80' features 
are retained. A I TRS-80* software will run without 
interference Tie option has a FREEDOM BOARD 
& TBVOSon ■ 5 .."disk. Tt/OS allows your TRS-80* 
to execute sof'ware originally written for CDOS . 
TSA/OS.& CWM .operating systems TaVOS opens 
the door to higt er level languages such as COBOL. 
FORTRAN 8 UCSD PASCAL 

*To further enhance your TRS80* processing power 
a MEMORY EXPANSION OPTION is available to 
replace (on command) the ROM and provide a full 
64K RAM This jption ,s switched into operation by 
the FREEDOM BOARD providing 54K of user RAM 
with ToVOS loaled & 61K with BIOS only Both op 
tions assume a 48K disk system & both tit inlo the 
keyboard case 6 month board warranty 

FREEDOM OPTION $245 

MEMORY EXPANSION OPTION $295 
TRANSLATOR $ 22 

•TRANSLATOR s a DOS compiler that provides a 
universal character translation for the printer II 
solves the alter character problem 

Send Check or Money Order to: 

(MASS RESIDEh TS PLEASE INCLUDE 5°» TAX] 

F.E.C. ltd. „mi 

P.O. Box 2368, Woburn, Mass. 01888 
(617)944-5329 



STAT-BALL 
Baseball Simulation 




% STAl-BAll % io not an arcade lype gamp txil a 
tonipienensive J pan stalislcal baseball simulator 
package Trial uses real lite pitcher and baiter statistics to 
simulate game play 

During me game 12 performance categories are 
computed and displayed lor batters 10 tor pitchers These 
slats fetteel the player s game performance and will follow 
closely a player s actual ability Stats may be viewed on a 
per game basis or kepi tor many games 

Agonize when your best power hitler drops a routine 
fly leel the thrill of victory when he hit's a deep fly over the 
wall AH action rs descrfced as it happens to add tension and 
encitement to this engrossing game 

YOU HI: THE MANAGER 1 Select your own lineup 
make an lypes ol substitutions call youi own strategy and 

iivi- w-|ii M" l".iy mudei'i -ilil limt'i. or ruined li-anv. 

This package consists of 3 programs: 

111 UAML 

U) HbCOHUS (Sorts up to 'bO players 

into 1 4 categor ies based 

on relative performance 
(3) WOHKUP/fcDlT (Establish edit or mi» 
playersl 

features include 

• Soiitare or head to head competition 

• batters ability ratings include bunting 

running and errors 

• Richer firing tactor 

• '5 offensive and defensive strategy 

Options 

• r-uli 26 man rosters 

• Printer option I3«? chr/ln or rnorej 

• lop quality tape 

• Detailed inslructions 

• "-HLL r"S Pirates and Orioles loi series 

replay 

Mm prompt 1st class delivery send 
J2S 00 check or money order to 

J L S SOFTWARE ^ 315 
POBoi 10385 
CJiicago Illinois 60610 

(We pay shipping and handling) 

I • T rademark TANDY CORP I 



SOFTWARE CPU" 11 

IF you're learning an instruction set. or analyz- 
ing an alien machine code program, or creating 
your own super software structures, then you are 
keeping instructional effects of CPU architecture 
and RAM all together in your head in a comple« 
running menial map Whew! Instrument your 
imagination' TBUG linking SOFTWARE CPU'** 1 
series ol microprocessor simulations on the Level 
ll 16K TRS-80'm display a complete parallel 
before/after set of Processor Programming 
Models with scrolling disassembler, CPU 
Registers, flags and stack, plus an intelligent 
RAM Window reacting selectively to RAM 
interactive instructions It's your entire 
imaginative overhead, clicking away in Single-step 
or variable speed TRACE modes under your 
dynamic control Plus a slug of debugging 
features you'd never imagine would be available in 
such low cost development software Reify 
program flow with a SOFTWARE CPU tm 
Supar STEP: Animated Z80 Programming 
Models, Disassembler, Single steprT RACE modes 
with Intelligent RAM Window, S user-selectable 
Windows, single and cumulative Instruction times 
in microseconds, Reference Space, much more 
Big booklet, a 280 Software CPU. 16K Level II 
TRS-80. TBUG required No . BL-O $19 95 

EMU 02: Animated 6502 Programming Models. 
Disassembles to 6502 mnemonics. Single 
step/TRACE modes. 6502 counterparts to »B. fJ. 
»fl. «F and «G commands, last Cross interpreter, 
keyboard acan port with p. instructions DB. EB 
control, paging in virtual address space, more Big 
booklet & SYNERTEK card, its a 6502 Software 
CPU. 
16K Level II TRS«0 TBUG required No BL 1 $24 95 

ACCEL: from Southern Software of England, is 
a COMPILER for Level II TRS-80 INTEGER BASIC 
Properly structured (no dynamic redefinitions, 
correctly nested loops etc) error-free BASIC 
programs are compiled by ACCEL to fast Z80 
machine code for potentially spectacular 
speedups 
ACC E L Com pi ler f or 1 6K Leve 1 1 1 T RS-80 $44 95 

IKH SOHYVARf 
Mam Post Office 
SCO CA 94101 



include rS each 
postage CA acw 6°. 



L All IN GEl 
Bo. 11721 
San France 



THS 80 TBUG tm Badio Shack/Tandy Corp 
Software CPU tm Alien GeWer Software 



Omikron's Mapper + NEWDOS/80 
8 Drives for the TRS-80 



NEVTDOS/80 is Apparafs latest upgrade to 
NEW DOS. Features include variable length 
records, chaining, and drivers specifically con- 
figured for Omikron's MAPPER II. $150. 

MAI-PER II adapts the TRS-80 to run both 5" 
and 8" drives. With NEWDOS/80, storage is 
incr -ased to 300 K per 8" drive. $99 plus $10 
per able connector. 

MAPPER I adapts the TRS-80 to run the vast 
library of CP/M software as well as the TRS-80 
software. All Lifeboat Software may be ordered 
for the MAPPER I. All MAPPER I CP M soft 
wire is compatible with the CP/M for the Model 
II. With MAPPER II and 8" drives, the Model 
I becomes disk compatible with the Model II. 



Standard features include lower case support, 
serial and parallel printer drivers, and an ad 
dressable cursor. MAPPER 1 is supplied with 
complete utilities including a memory test, a 
disk test, a copy program, and a proprietary 
program for converting TRS- DOS files to CP/M 
files. $199. 

WORD PROCESSING- MAPPER I supports 
professional word processors like the Magic 
Wand and Word Star (see reviews in June 80 
Kilobaud). Omikron's implementation includes 
a blinking cursor, auto repeat, shift lock, de- 
bouncing, and an input buffer that eliminates 
missed characters. Magic Wand super discount 
price $299. 



FIELD PROVEN DESIGNS- After one year of 
MAPPER production. Omikron has established 
an impeccable reputation for reliability, integrity, 
and user support. Omikron's customers include 
the IIS Government, major corporations, uni 
versities, medical doctors, and professionals in 
all fields. 

SYSTEMS — Omikron sells complete systems 
featuring Model II compatible Shugart disk 
drives. Call for prices and delivery 

FOREIGN ORDERS must include full payment in 
l ! S funds plus $25 for air shipping and handling. 



See reviews in July 80 and August 80 BYTE By Jerry Poumelle. 




•CT M 11 a I >l .1 I Initial Krsranh I KsWh. .1 I'M uf land) Corj 

- Reader Service - see page 226 



80 Microcomputing, September 1980 • 53 



How much can you PRINT in one instruc- 
tion? Try it! Type 20 PRINT " and then 

type as many words as you like. You'll find that 
the words don't run off the edge of the video 
screen, but form new lines of text on the moni- 
tor. The video monitor accepts only 64 charac- 
ters/line, while the computer allows up to 250 
characters/line. The computer no longer re- 
sponds to keyboard input when the 250 charac- 
ter limit is reached. 

PRINT Plus Spaces 

Now try the one-liner below: 



10 PRINT- 



SPACED ALONG" 



Because we've labeled this line as line 10, it 
has wiped out the old line 10. Notice that the 



space between the first set of quote marks and 
the first letter of the word affects the way it 
prints. This is one way of adding spaces. 

Another way is by indicating tabs. Tab means 
the same as it does on a typewriter, tabulation. 
The width of the video screen is divided into 64 
starting points, numbered from to 63. Using 
TAB( ) selects one of these as a starting point 
for what you print. 

10 PRINT TAB(25) , 'IN THE CENTER" 

Notice the syntax — parentheses after TAB 
enclose the number, between and 63. The 
quote marks surround the words to be printed. 

If you had put the first set of quote marks be- 
tween PRINT and TAB, you would have print- 
ed, at the left-hand side of the screen, the phrase 



'A trademark of tha Tandy Corporation 




A year ago, when nobody had ever 
heard of me, I said these disks could turn 
aTRS-80*into a serious computer. 

Now they tell me I'm "the standard 
of the industry." 



I'm Irwin Taranto, and times have changed. 

In the first twelve months, almost a thou- 
sand businesses put me to the test. 

You can buy my TRS-80 systems all over the 
country —dozens of companies sell them. Some 
are my dealers, some aren't. And this creates 
a new set of problems. 

You sea, learning to use a computer — any 
computer — is like learning anything else. It 
takes some getting used to. If you sit down 
with a computer program and the manual and 
try to figure it out all by yourself, you'll prob- 
ably just give up and feel you've been had. 

You have to hang in there for a month, 
make a few phone calls, and have somebody 
who really understands the system help you 
work it out. 

That's why I still answer the phone. And 
why, I guess, people say all those nice things. 

The Model I systems 

So far, I have six systems for the Model I, at 
$99.95 each, plus $20 each for the books where 
required. For the Cash Journal option on the 
General Ledger, add another $50. 

Accounts Payable 

Accounts Receivable 

Invoicing 

General Ledger (Cash Journal optional) 

Payroll 

Inventory Control 



And the Model II programs 
Some brand new, highly-sophisticated 
programs for the TRS-80 Model II. at $249.95 
each, plus $20 for the book where required. 

General Ledger/Cash Journal 

Accounts Payable/Purchase Order 

Accounts Receivable/Invoicing 

Payroll/Job Costing 

For the Model I programs, you can tell us 
what you need in a letter or by phone. You get 
the disk and all the Instructions you need. Any 
problems, just call me. 

For the Model II programs, I ask you to fill 
out a questionnaire before I send you any 
materials. The systems have so much flexibil- 
ity we tailor them to your needs. 

That way, I make sure you get a system that 
works. If you have any doubts about that, I'll 
give you the names of some people in your area 
who've already been through the process. 

Let them tell you whether I really deserve 
that fancy new reputation. 



^45 



Taranto 



& ASSOCIATES, INC 
121 Paul Drive, San Rafael CA 94903 • (415) 472 2670 
Add $4 00 per order (ui handling 6% sales tax in 
California only Master Charge, Visa, COO. 



TAB(25) IN THE CENTER, which isn't exactly 
what we wanted. 

Why TAB(25)? Well, I counted the letters 
and spaces in IN THE CENTER and made it 13 
characters. I rounded that to an even number, 
14, then subtracted from 64, leaving 50. Half of 
50 is 25, and that's the tab number. Why? Well, 
the number of letters and spaces gives the num- 
ber of positions on the line which are used to 
print. If we want these words to be centered, 
then there has to be an equal number of spaces 
on each side, and we find this by dividing the 
number of unused places, 50 in this example, by 
two. 

Try printing your own name centered on the 
screen. 

Notice, by the way, that we're still entering 
each one-line program as line 10, deleting the 
previous program in line 10. Later on, we'll 
look at other ways of removing old programs, 
getting rid of unwanted lines or running only 
the lines we want. 

TAB is one of the BASIC commands or func- 
tions that not all small computers have, but it's 
only the start of the options which are available 
to the TRS-80 owner. Type the next line very 
carefully. 

10 PRINT •SPACE", "THE", "WORDS", "OUT" 

See the commas? Each comma lies outside 
the quote marks that set off the words, because 
we don't want the commas printed. If we type: 

10 PRINT "SPACE, THIi, WORDS, OUT" 

hit ENTER, type RUN and hit ENTER again, 
the printout on the video screen would be: 

SPACE. THE, WORDS. OUT 

As it is written, the effect is quite different, as 
you will see. The commas have commanded the 
computer to space the four words across the 
width of the screen. Each comma instructs the 
computer to start printing the next word at the 
next print zone. There are four print zones, each 
of which can take up to sixteen characters (let- 
ters, numbers or spaces). If you PRINT more 
than sixteen characters in a zone, the comma 
causes a skip to the next zone. Try the following 
program. 



10 PRINT-SEE THE EFFECT": 
20 PRlNT"OF A SEMICOLON"; 
30 PRINT"ON THE PRINTOUT" 



Example I 



10 PRINT "SPACE"TAB(POS<0) + J)"THE"TAB 
(POS<0) + 3)"WORDS";TAB(POS(0) * 5) 
"EVENLY" 



Example 2 



10CLS 

20 PRINT TAB<28)"HEADINC" 

30 PRINT 

40 PRINT TAB(5,"TH1S IS A 

NEATER WAY OF PRINTING" 



Example 3 



10 PRINT "THt- ZONES WILL TAKE". "SIXTEEN 
CHARACTERS EACH" 

The comma is used as a print delimiter. We 
can also use the semicolon as a delimiter, but 
with a very different action. Try entering the 
program in Example 1 . With more than one line 
of program, you must remember to push 
ENTER at the end of each typed program line. 
When you run the program (type RUN and hit 
ENTER), what happens? 

The semicolon is another signal to the com- 
puter when it's used in this way. Typed after a 
printed quantity, the semicolon means: use the 
same line and keep printing, so that the words 
we typed in three separate instruction lines end 
up on one single line of type. This would hap- 
pen, incidentally, even if we had several other 
lines of instructions between these PRINT in- 
structions, so watch carefully for these semi- 
colons if you are entering a program which has 
been written in BASIC by someone else. All 
small computers use this form of instruction. 

What happens if you leave out the semi- 
colons? Try it! Each PRINT command causes 
the video to start on a new line. This is one way 
you can space out your printing vertically. 

Meanwhile, look at Example 2 for a very 
powerful command which few small computers 
have in their BASIC. It's the POS function. 
POS means position, and it means the position 
of the cursor mark, that short line which shows 
where the next letter will appear on the screen 
when you type a program line. 

As a result of the POS instruction, the com- 
puter makes a note of how far along a line you 
have printed. Add five to that place number, as 
we've done in Example 2 and the result is five 
spaces between each word. 

When you type line 10, by the way, don't hit 
ENTER until the end of the instruction after the 
last set of quote marks. If you hit ENTER 
before then, you're indicating that you want to 
start another numbered instruction line. The 
other point is that you should type DELETE 
20-30, and hit ENTER before running the pro- 
gram. If you don't, you'll print the words in 
lines 20 and 30 of the previous program, unless, 
of course, you have switched off between work- 
ing Examples I and 2. 

By this time, your video screen must be look- 



I0CLS 

20 PRINT047VGREET1NGS" 
30 PRINT0">O4,"THIS USES THE PRINT© 
COMMAND TO SPACE LINES" 



Example 4 



iocls 

20 PRINT USINC "SIM. if 'ill. 41 1 



Example 5 



10 CIS 

20 PRINT VJSING-H ir-;2TJ6 



Example 6 



ing a bit cluttered, so let's look at another useful 
function that helps clear things up. Example 3 
shows a four-line program (we're getting more 
adventurous) which makes your video printouts 
look better. The new instruction, CLS, means, 
simply, clear the screen. 

When the program is run, the screen clears, 
removing the program lines. After the CLS 
instruction has been used, the next PRIN I in- 
struction will place the words in quote marks on 
the top line. 

In line 30. I've used the word PRINT by 
itself. What does that do? Try leaving it out by 
typing DELETE 30 and hitting ENTER. Then 
type RUN and hit ENTER again. See the differ- 
ence? The PRINT command in line 30 causes a 
one-line space between HEADING and the 
words in line 40. Want a two-line space? Then 
type 30 PRINT, hit ENTER, type 40 PRINT 
and hit ENTER again. Now run this one and 
watch the larger gap appear between the head- 
ing and the line of words. 

Time to take a look at the program. Type 
LIST and hit ENTER. Your program appears 
under the last lot of printing, with the lines in 
correct order. That's just one example of why 
the BASIC language uses these line numbers. 
We can place any line number against a line, 
and the computer sorts them into order. If we 
use the same number for two different lines, 
then the last one typed and entered wins, the 
older one is deleted. We can also delete lines by 
typing DELETE, then the line number and hit- 
ting ENTER. 

Can we delete more than one line at a time? 
Sure we can. Just type DELETE 10-40, and 
every line of the program in Example 3 will be 
rubbed out. The other way we can remove a 
whole program, but this time without needing 
to know how many lines it has or what their 
numbers are, is to type NEW and then hit 
ENTER. 

More Spaces 

Suppose we want to print a word at the center 
of the screen. There are sixteen lines of print on 
a full screen, so we could print on line eight. We 
could type seven lines with PRINT, but no 
words, to make the print position move down 
one line at a time. We could then use the com- 
mands PRINT TAB( ) to space the word to 
the center of line eight. 

There's a much easier way of doing this sort 
of thing with a TRS-80. by using the PRINT® 
command. It must be entered correctly, with no 
space between the T of PRINT and the @ sign, 
and a comma immediately after the @. If you 
put an unwanted space in, you'll get the SN er- 
ror message when you try to run it. A much less 
obvious error is typing @ with the SHIFT key 
depressed. If you hit SHIFT and ® at the same 
time, the @ appears as usual on the video 
screen, but the code number which is fed into 
the computer is NOT the correct one. You'll get 
the SN error report when you try to run it, but 
the line will look good on the screen. 

With these warnings in mind, try the program 
in Example 4. Remove the previous programs 
by typing NEW and entering. Now type in the 
three lines of the new program and run it. In- 
teresting? The word GREETINGS appears 
around the center of the screen, and the next 



line of print is four lines under that. 

Take a look at page El at (he back of your 
Level II manual. Turn the page so that the num- 
bers are all correct way up, and you can read off 
the PRINT® numbers and the TAB numbers. 
The numbers in heavy type at the top are the 
TAB numbers for each line, and also the 
PRINT® numbers for the first line, the top 
line. For the second line of PRINT® the num- 
bers start at 64 (see the columns down the left 
and right-hand sides), for the third line. 128. 
and so on. 

To find a PRINT® starting number for any 
position on the screen, pick your spot, locate 
the TAB number at the top of the page and the 
PRINT® number for the start (at the left or 
right-hand side), then add the two. For exam- 
ple, if you want to start around the center, try 
TAB(3I) on the line starting at 448. That gives 
us a PRINT® on the number 448 + 31 = 479, so 
we type PRINT@479, then add the quote 
marks and the message. Remember the syntax: 
PRINT, no space, @, no space, comma, then 
quote marks for the message, and keep your 
fingers off that shift key when you are typing 
the @. 

Using More 

The TRS-80's big, big BASIC allows us yet 
another way of printing which isn't available to 
people with other types of machines. The new 
instruction this time is PRINT USING, and it 
instructs the computer to arrange the printing to 
suit some definite pattern which must be speci- 
fied in the PRINT USING command. PRINT 
USING is most useful when you have to print 
out a number in standard form, such as a price 
or a sum on a check. It's also useful when you 
want to round off a fraction. 

Since the number of times you are likely to 
want to use this command in your own pro- 
grams is limited, compared to the everyday ones 
such as TAB and PRINT®, we'll look at only a 
few of the PRINT USING commands. 

Example 5 shows PRINT USING applied to 
rounding off a fraction. Enter the program and 
run it to see how the number is printed. This is a 
smart way of making sure that your printout 
doesn't contain lots of figures after the decimal 
point. After all, you wouldn't like to think that 
you had just printed a check for SS6.2357. 

Another useful feature of the PRINT USING 
command is that it can insert a floating dollar 
sign. Now, if you thought that the dollar was 
sinking rather than floating these days, let me 
explain that phrase. You might want to print 
out something like amounts of SI. SO, 526.40, 
$147.30 and so on. What the floating dollar sign 
does is position itself ahead of the first figure of 
the number, so that you don't print 1527.50 and 
$02.40. Try it out with the program in Example 
6. 

The Level II manual has a large number of ex- 
amples of PRINT USING, so we'll leave this 
one, which is a more specialized command than 
most of the ones we shall be using in this series. 

BBug BBreak 

Depending on the age of your 80, you may 
already have met the dreaded kkeybbounce. 
You type PRINT, and it appears on the video 
screen as PPRINT or PRIINT or some other 



80 Microcomputing, September 1980 • 55 



I I'lIKi: 165V. 2^ ( 1 I AR;IOK N ■ I64K0 1(> 16492 Kl M> K I'Okl N,K;M A I I OK V 
4.t?:READ k I'Okl N.KNI X! '-.POKE 16405.0: DLLLrL 12 
: DA I A 205.227.ji.liO. 200. 14,40.16,254, 1 3, 32.25 1. 201, IW.'to.M 



Listing I 



IW1MDII- 



weird combination of repeated letters. 

When you try to run a program with an un- 
wanted double letter in a command word, you'll 
get a SN error message, meaning that the inter- 
nal circuits of your computer simply don't 
recognize the word. Of course, if you have an 
unwanted double letter in a message which is en- 
closed in quote marks, then it will simply be 
printed out that way. 

Keybounce is a problem that plagues any 
mechanical switch, like keyboard switches. You 
press a key, and the electrical contacts close. 
But, because they're made from springy mate- 
rial, they bounce open again before finally clos- 
ing and staying closed. Each time the switch 
closes, it completes an electrical connection, 
and if that happens to be the electrical connec- 
tion which prints the letter P on the video 
screen, then you get two of them. 

Every manufacturer of computers gets 
around this by using a time delay each time a 
key is pressed. The computer takes no notice of 
the key until the time delay is over. Only a small 
time delay of about a thousandth of one second 
(one millisecond) is needed. 

Radio Shack seems to have given short 
measure to this problem on the older TRS-80s. 
On some models, keybounce can be fixed by 



pulling off the keycaps and cleaning the con- 
tacts. That's what Radio Shack says, anyway, 
but my own TRS-80 has fixed keycaps that 
don't come off easily, and it bounces very bad- 
ly. The keybounce is so bad, in fact, that if there 
were no cure for it, I would have scrapped the 
whole thing months ago. 

Yes, there is a cure, and it works. Radio 
Shack supplies a program on a machine code 
tape entitled KBFIX. Enter this one, and your 
keybounce troubles are over until the next time 
you switch on. Incidentally, more recent 
TRS-80s have no trace of keybounce. 

Sometimes keybounce is just a nuisance. 
Other times it can cause a complete hangup of 
your computer, and one of these other times is 
when you type LIST and get LLIST. LLIST is a 
command word which was unfortunately 
chosen for printing a list on the Radio Shack 
line printer. Run LLIST and the result is — noth- 
ing. No keys have any effect, nothing appears 
on the screen, and the computer appears to have 
died on you, with just that accusing word 
LLIST staring at you from the screen. 

What's happened is that you have command- 
ed the computer to print a list on the printer, 
and because there's no printer connected, it's 



waiting for you to connect one. Don't rush out 
with a fistful of dollars, because you can re- 
cover from this stall in two ways. 

One is to switch off completely, but that way 
you'll lose any program you had in the comput- 
er. The easier way is to push the RESET button 
at the back of the computer, at the opposite end 
from the ON/OFF switch. On my 80, this is 
under a small flap which also houses the con- 
nector for expanding memory. Pushing and re- 
leasing this switch removes the hangup, and the 
computer is ready to run again. Whatever your 
manual says, you don't lose your BASIC pro- 
gram when you use RESET unless the Radio 
Shack expansion interface is connected. 

The keybounce problem can also be avoided 
by using a short BASIC program, shown in 
Listing 1. It's a sight longer than the others 
we've used in this part, and you have to be sure 
that you've typed each character correctly. Run 
it, and it sorts out the keybounce and then 
deletes itself! 

At this stage, it's not easy to explain how it 
works, because it makes use of parts of memory 
we don't normally use, the reserved RAM. The 
purpose of these memory parts is kept a close 
secret, and it's only when someone with a bit of 
time to spare investigates them that we even get 
to know about them. 

Keybounce is just one example of what folks 
in the computing business call a bug — a flaw in 
a system. A bug may be in the operating system, 
or it may be in a program. Wherever it is, these 
articles will show you how to stamp out some of 
the most active bugs. ■ 



•ttfc 



lucts ^6/a ^iff 

ilue and '£* Ck ^^ 



Kffa 



r *A 



»* 

7*?* 



<** 



SOFTSTUFF, established by Heath Company, offers you a selec- 
tion of software tools at affordable prices. All SOFTSTUFF programs 
have been checked and confirmed on the hardware indicated. Documen- 
tation, though not as extensive as standard Heath Company documentation, 
has been completely reviewed and judged acceptable. All SOFTSTUFF prod 
come on a 5 1 /4-inch diskette and all initial offerings require HDOS. For valu 
performance... SOFTSTUFF is good stuff. 

Full Screen Editor: The SOFTSTUFF text editor uses H89 or H1 9 screen as a window into a file. 
Cursor motion keys position the cursor so changes can be typed anywhere on the screen. Function 
keys perform character and line insert and delete, string search, move and copy single and multiple 
lines, and scrolling of text in the window. For H89 and H8+H19. HDOS Model #SF-9000: $49.95 V 

Text Formatter: Performs fill and justification (straight right margins) of text previously prepared by your editor. 

Page numbering, headers and footers, indents, hanging indents, centering and underlining. INCLUSION feature 

allows automatic insertion of up to 26 user defined strings and merging of documents. HDOS/H19/H89. HDOS Model w 

#SF-9001: $54.95 

Microsoft Macro 80: 8060/Z80 MACRO Assembler. Intel and Zilog Mnemonics supported. Relocatable linkable output. Package 

includes LINK 80 and Cross Reference List utilities. Complete documentation and HDOS common deck MACRO included. For 

H8 and H89. HDOS Model #SF-8002: $69.95 

TELINK: A utility which provides file transfer between the H89 or H8/H19/H17 and Information Services (MicroNET). Features 

include user defined keys which provide for auto-login, mail check, etc. Full error checking and elapsed time clock on screen. 

Very easy to use. Use on other time sharing systems too. HDOS Model #SF-9003: $39.95 

SORT: An extremely fast assembly language routine that sorts records up to 255 characters in length with user defined sort 
fields. Could be called by MBASIC or stand-alone. Source code provided. HDOS Model #SF-8004: $29.95 

To order: 

1 . Send check or money order to Heath Company, Dept. 351-698 Benton Harbor, Ml 49022. Michigan residents add 4% sales tax. 
Write model numbers clearly. 

2. Call toll-free 800-253-0570 and use VISA or Master Card. In Michigan, Alaska, & Hawaii, call (616) 982-3411. 

3. Visit your Heathkit Electronic Center where SOFTSTUFF is on display. See your telephone white pages for the location 
nearest you. 



SOFTSTUFF is a trademark of Heath Company. •" » 3 



SF-101 



56 • 80 Microcomputing, September 1980 



SIMPLE AS BASIC 
BUT VERY FAST— BALCODE 



You can now program your Model I TRS-80 using Op codes based on IBM 370 BAL Why 
devote your time to BASIC or to Z-80 assembly language when the BALCODE editor/assem 
bier is now available for only $79' We mail you a monthly Newsletter covering all the fine 
points of assembly language programming. This package comes with a Programming's 
Manual and a Demo program to walk you through all the BALCODE commands 

Our EDITOR is tops Includes COPY. MOVE. FIND and CHANGE Commands with stop at CRT 
till-up 

Our BALCODE MACRO Assembler assembles floating point numbers. 

Our System all resides in memory at the same time You edit, assemble and run without 
reloading Origin is at 7000H and object code is 12,000 bytes 



BALCODE 80A $79. CHECK, MO, VISA OR MASTER CHARGE. 



Write for free listings or send $10 for Programmer's Manual Applies towards pun base 

BALCODE SOFTWARE, INC. 
12 LEEDS LANE, N. BABYLON, NY. 11703 (516)-242-1665 EVES. •*» 





M@ftV(2 



60 Cycle 

Sine Wave 

U.P.S. 

(Uninterruptibe Power Supply) 

» • • •for those systems that need 
60 cycle sine wave keeps 
computer & disk systems 
on when the power goes 
out For less than $500.00* 

• •••Rated 250 Watt 
continuous operation 

• •••will provide 400 Watts 
for 5 minutes 
(Model II TRS-80 
with 4 disk drives) 

• Standard MAYDAYS available 
starting at $195.00 for 150 Watt 



from. 



■>■' 



*» 151 

ff'un > j fte±e<ircji, Jfnc. 

Box 210 New Durham. NH 03855 
(603) 859 7110 TWX 510 297 4444 



'Reader Service- see page 226 



80 Microcomputing, September 1980 • 57 



GENERAL 



Blow by blow accounts. 



A Bout with the I.R.S 



Fred Blechman 
7217 Bernadine A ve. 
Canoga Park, CA 91307 



In one corner, weighing 29 pounds, in black 
with gray trim, we have the $750 Radio 
Shack TRS-80 Level II 16K Microcomputer. In 
the other corner, weighing tons, in red, white 
and blue, we have the multi-million dollar IRS 
worldwide computer network. Come out fight- 
ing, and may the better machine win! 

Round 1: Getting it together 

It wasn't a referee who introduced me to the 
IRS. It was a plain brown envelope advising me 
of an office audit appointment and detailing 
the items I should bring. Needless to say, that 
bit of mail destroyed my day — and most of the 
next few weeks! 

I have had a small business with no employ- 
ees for 15 years and always wondered when the 
day of reckoning would come. My tax preparer 
told me many times that my records were com- 
plete and accurate and that I would coast 
through an audit. 

Still, there were always gnawing doubts 
about whether I could provide satisfactory 
verification for various expenses. Like 
everyone, I had heard IRS audit horror stories, 
and my impression was that no one comes 
through unscathed. Furthermore, I assumed 
the auditor would be nasty, intimidating and 
threatening. 

The audit was for 1977. In the three-year in- 
terim, we had moved and still had not un- 
packed cardboard boxes with business records 
going back 15 years! To further complicate the 
picture, my wife, Ev, had her own retail busi- 
ness before we married in 1977, so we had filed 
a joint return, with separate Schedule C's for 
each business. 

The auditor's letter specified that we furnish, 



to my surprise, not only our business records 
and checking account statements, but ail per- 
sonal checking account statements and checks 
and all savings account passbooks! 

Yes, a//! That meant every statement and 
savings passbook from December 1976 to Jan- 
uary 1978! 

For many people this might only amount to a 
few accounts, but for Ev and me this meant 
eight checking accounts and four savings ac- 
counts that showed activity in that time period. 
It took considerable time and effort to get 
everything together, especially since Ev had 
closed her business at a considerable loss (that's 
what triggered the audit!) and delegated, in 
disgust, a lot of records to the round file! 

Finally it looked like we were ready to face 
the almost infinite resources behind the IRS 
paper tiger. 

Round 2: The $45,000 Punch 

The auditor, Edward, was very congenial, as 
he led us to his cubical on the third floor of the 
imposing local Federal Building. Edward spent 
the first half-hour or so interviewing us about 
our individual businesses and establishing 
background information. 

"Any inheritances received in 1977? Gifts? 
How much cash do you keep around the 
house? Why so many checking and savings ac- 
counts? Any loans?" 

I suppose if I were cheating, or more 
paranoid than I had already become, 1 would 
have objected to some of the questions as being 
too personal (practically the only thing he 
didn't cover was our sex life!) 

Instead, I was fascinated by his thorough- 
ness. I did not realize he was slowly but surely 
peeling away my defenses, preparing for a blow 
to the solar plexus! 

During this time, he was furiously making 
notes of our replies to his questions. Reading 
upside down, I saw "T/P claims" in various 
places. "T/P" means taxpayer. 

Asking for our bank statements, he proceed- 



ed to list every monthly deposit total on a sheet 
of lined paper! He did this with every bank 
statement for every month in 1977! Then he did 
the same thing with the savings passbooks, 
listing every single deposit by date! 

He used eight sheets of paper and took 
almost three hours— into his lunch hour— and 
came up with a grand total of $141,531.86 
deposited in all our accounts in 1977. 

Then he checked our 1977 Federal Income 
Tax Return and added the gross income: 
$96,091. 

"Mr. Blechman," Edward said, "We have a 
difference of $45,440.86 between your deposits 
and your reported income. Some of this dif- 
ference may be transfers between accounts or 
non-reportable income we may not have cov- 
ered in our initial discussion — loans, social 
security, gifts, unemployment insurance and so 
forth. Any of this $45,000 plus you can't iden- 
tify and verify will have to be considered non- 
reported taxable income. Our next appoint- 
ment is " 

The fact that it rained that day, that my rain- 
coat had a big hole in it, and that I lost my 
rainhat, only added to the feeling that 1 was 
down for the count! 

Round 3: The Pussycat's Claws 

Wondering what I'd look like in stripes and 
how the food was in Leavenworth, I carefully 
assessed my situation. I knew we moved money 
around to pay bills, kept balances equalized 
and made major purchases through the check- 
ing accounts. I had a policy of keeping small 
balances in the checking accounts, since they 
earn no interest . Sometimes cash -flow needs re- 
quired transfers from my savings accounts. But 
$45,000 worth of transfers? That much? It 
didn't seem possible. 

I looked for errors in the auditor's figures 
and couldn't find any. Still over $45,000 unac- 
counted for. I felt helpless and overwhelmed, 
so I picked up my February copy of 80 Micro- 
computing to escape and let my subconscious 



58 • 80 Microcomputing, September 1980 



BUSINESS CONTROL PROGRAMS 



PAYROLL ~] GENERAL LEDGER ACCOUNTS PAYABLE ACCOUNTS RECEIVABLE 



These business systems are designed with the business man 
ager m mind Major changes m your current bookkeeping meth- 
ods are not necessary to make these programs work (or you. 
Data may be entered into any one of the systems either directly 
or through subprograms, so that duplicate data entry is not re- 



quired mis avoids mistakes 

Accurate reports of financial activity may be obtained on a 
scheduled basis or at irregular intervals 

The systems require CP M and CBASIC Customization, mstal- 
at'on and training are available at additional cost WRITF FOR 
SAMPLE REPORT AND TRIAL DISK — S25 00 (credited toward 
purchase price) 



A Totally Linked Single Entry 
Accounting System 
Completely Screen Oriented Systems 
Provide User Prompting tor Each Entry 
User Assignable Account Numbers 
Flexible. Reliable and Efficient 
Installation and Training Available 



AS LOW AS 



CP M 2.2 Control Program for Microcomputers 
Enabling You to Run Software Published for 
CP M 1.4 on the TRS-80 Model II .*»*.,— 





CP M is considered the industry standard disk operating systerr De 



cause it gives you the hardware-independent interface you neec ro 
make your computer work for you FM6J CORPORATION MOW OFFERS 
THE CP M 2 2 FOR THE TRS-80 MODEL M The latest m f>e evomtofi 
ot a reiaDie and efficient software system CR M 2.2 futures an en 
hanced upward compatible tile system and powerfu' new random ac- 
cess capabilities From minidisks and floppy disks a I the way to high- 
capacity hard disks (when available), the flexibility of CP M 2.2 main 
it a truly universal operating system The package includes an 6' sys- 
tem disk ed tor assembler, debugger and communication software for 
me TRS-80 Model ll Special utilities not available with other CP M sys- 
tems are also included m FMG's CP M 2 2 

<CP M is a reoater«J trademark of 
Digita Restart* Corp TRS-80 >s a 
ret siered :tademafk ot RarM) Snack) 



$« TRS-80 PROJECT 




THE PASCAL/MTg~$250.00 

PASCAL MT • a native code PASCAL compiler designed for 6060 8085 
and 280 microcomputer systems provides an efficient development 
cyde as well as efficient execution of object programs. 



CORPORATION 



P.O. BOI 16020 

Ft. Worth. Texas 76133 
Phone (817) 294-2510 



.-13 



Send for FREE CATALOG 




i Ooap •• *'*< jte* u-vlt' t*e CP M 

operating system in as little at 32 

K bytes ot RAM 

i irteracbve SymtxMC Deb u gger smjen 
1 to e*emme 
m and trace 

procedure cant interactively at run 

tme 
< Compete et the fete oi eOO knee per 

Twnae on a ? MMZ 8080 
•Program* Eaecute up to to TIMES 

TASTER thin popier rterprttivt 

Raaeafti 

• The code generaled « 8000 object 

code wven ■* ROMebie eitn a mini- 
mum run one overhead ol i 5Kbyte* 

• Interrupt procedure* tHom tht pro 



grammar to eiree ■nterrupt driver* tor 
rO ana other real erne leaks in Pas- 
cat MT 

• Bft menoulaaons of vantPtet may be 
pe''ormed with the buill-m proce- 
dure* Sf TilT. CLRBIT. T8TBIT, 
SMI SHR SWAP, lO HI 

• Aseenfy language subroutines may 
w cased tfomPascaMT 

• Bu t *tea* anthmeec vendor of Pascal 
MTsato pinfjpn 

• Pascal data structures supported era 
ENUMERATION AND SUBRANGE 
TYPES RECORD ARRAY, REAL 
INTEGER CHAR, and BOOLEAN 

• Not lamented art SETS. GO T 
GET PUT 



ASCAL MT ' includes compiler and a rei' time symbolic debugger 
ne system requires 32K minimum and 2 mini disks or one 8" disk. 



BO Microcomputing. Sapfambav 1960 • 59 



To add siring function to "Household 
Accountant," change the following 
program lines: 



540 


Change 


C to CS 


550 


Change 


- 1 to END 


950 


Change 


CtoCS 


%0 


Change 


- 1 to END 


1000 


Change 


CtoCS 


20000 


Change 


- 1 to END 




Example 2. 



mind look for a solution. 

Fate smiled on me, as ! turned to page 1 14 
and saw David C. Andreasen's "Household 
Accountant" with the kicker "Keep track of 
how much, to whom and when— up to 32,767 
accounts." 

Well, I didn't have that many accounts, so I 
looked closer. 1 got excited— this could do it. 
This could sort out and add transfers between 
accounts! 

I sprang into action. 1 keyed the program on 
page 116 into my 16K Level II TRS-80 pussy- 
cat. She almost purred as I ran and tested the 
program, using dummy DATA. It worked! 

Then, I realized, I was limited to check 
number entries only, so I made a few program 
changes (Example 1) to accommodate strings 
(loan, cash, etc.). 

I started with one checking account and 
entered each check that transferred money to 
another account. I assigned a category number 
to each "path" (Bank one to Bank two was 
category one. Bank one to Savings one was 
category two, and so on). I ended up with 18 
different paths, or categories, between ac- 
counts! 



I made some additional changes to the pro- 
gram (Example 2) to accommodate my printer. 
The program added and printed the totals for 
all categories, for each month and for the year, 
listed all transfers individually, printed and 
added each category— fourteen pages on my 
printer! 

With the help of this program, I was able to 
account for almost $43,000 of the $45,000 plus 
"unexplained income"! 

Round 4: The Technical K.O. 

Armed with my computer printouts, plus six 
cardboard boxes full of records, wheeled in on 
my dolly, we faced Edward a second time. 
Once he understood what I was showing him, 
he was delighted. He said it saved him hours of 
work! 

However, just to make sure I was correct 
(after all, how can a $750 computer do any- 
thing but play games?), he spent two hours go- 
ing over the figures, asking me for checks, 
deposit books, etc., to verify the printout. It 
was not one penny off! Personal computing 
had scored a technical knockout! 

You may wonder about the other $2,000 plus 
that was not accounted for in my analysis. We 
explained that it was probably garage sale cash 
and checks deposited in checking accounts, 
since Ev sold a lot of her furniture and 
housewares before we got married that year. 
No problem. You usually sell things at garage 
sales for less than you paid, so this is usually not 
taxable income. 

Round 5: The Next Match 

Forewarned is forearmed! Keep good 
records. The burden of proof is on the tax- 
payer, not the IRS. Despite the fantastic help 



(he "Household Accountant" provided, it is 
useless without correct data. 

Fortunately for me, I have a habit of jotting 
remarks next to every deposit or withdrawal in 
my savings passbooks, so 1 can identify the pur- 
pose of each transaction. Without these re- 
marks I doubt if 1 would have been able to dis- 
cover a lot of transfers, and that would have 
been more unreported income on which tax 
would be due, plus penalty and 12 percent in- 
terest for two years! 

An auditor told me that the majority of tax- 
payers end up paying extra taxes as the result of 
an audit simply because they can't identify, 
document or verify deductible or non-taxable 
income. 

While an IRS audit is about as pleasant as 
swimming with a bleeding leg in shark-infested 
waters, it can be a real challenge and a learning 
experience. ■ 



To add primer ouipui lor "Household Accountant" 


add the following program lines: 


105 


CLS:PRINT:INPUT"PRINTER(YES=I, 




NO = 0)";PR 


790 


IEPR-1 GOSUB2000 


1025 


IF PR- 1 GOSUU2000 


2000 


FORT = 0TO 15 


2010 


SS(T) = " " 


2020 


POKE VARPTR(S$(T)),64 


2030 


POKE VARPTR(SS(T))» 1, (T'64 +15360) 




AND 255 


2040 


POKE VARPTR(SS(T))*2. (T'64 + 15360)/ 




256 


2050 


NEXTT 


2100 


K>RT = 0TO 15:LPRINTS$(T):NEXT 


2110 


RETURN 


In line 470. i-hange - 1 to END 




Example I. 



For Canadian^ 
* Owners T^ 

Lower Case Modification . . $65.00 
Cassette Load Modification . $20.00 
Radio Shack Numeric Keyboard 

Installation $50.00 

(You supply numeric pad) 

RS232C Serial 1/0 Port for Printer 
etc. (Complete with connectors) 
For Use With or Without Expansion 
Box $169.95 

For a complete catalog and credit 
vouchers worth $25.00 on future 
purchases send $5.00 to: 

•AM Quotms in Canadian Funds 

ORTHON £°™H?i R 



^108 



12411 Stony Plain Rd., 
Edmonton, Alta, T5N 3N3 




Tegt your mind— not 

your reflexes— with 

SQUADRON LEADER Games 

Command o Fighter Squadron 
in any of six of ihe decisive 
campaigns of Woiid War II 
■At iiw Sam* <n unom 



- .-- ■ : 



r ov*. C~x) 'OJ7 im? 



Squadron leader games are not lust shoot em up arcade 
games, out detailed historical simulations Each of these 
gomes gives you a choice of dozens of combinations of 
friendly aircraft (controlled by you) and enemy aircraft (con- 
trolled by the computer) Eoch is carefully researched and 
simulated for factors of speed, monueveratxi'ty firepower, 
sturdiness and rale of chfnD Success or failure depends on 
your ability to learn ana exploit the advantages and 
weaknesses of every aircraft 

Eoch gome includes an audiotape cassette tor 16K TBS80 
Level ll. Apple ll (16K or larger), and the new 16K PET. loading 
instructions, a tactics reference card, and plover's manual, in 
an atlroclive bookshelf box Price is S 19 95 ,^412 

Q.,cov«ry G«m«, . 938 W H„, 36 • Si P«ul . MN55H3 




eal 
World 
nterface 



Affm4+k 4'Oandli'A Ik* *i*ti m H*\h 

Real World (Analog) to Digital Conversion lot in* in 
your BASIC programs with better than 0.5% accuracy 
Digital to Analog real worid audio, test, and control 
tokages generated with tame accuracy by your prograrm 

L*ul> incorporated into your preterit BASIC programs 
Support software frees !R"s *r» 10 run other prograrm 
concurrently, updating o«l> when vokage change* <xviu 

t-«panuon interface not requited BASIC or Machine 
language with Level II L vahk wiih I <->H UK and TBUC. 
tMactune I anguage only) 

Ready to connect and use Include* interface hardware. 
software documentation, and complete instruction* 

assembled and icMr.i 

Florida residents add * r » »alo i*« 



Rand Laboratories 
pxx box 552 

melbourne, f lorida 



32901 



MaaaH < org tradtiart. 



60 • 80 Microcomputing, September 1980 



c?\t Last! 
Orchestra-80 

A TRS-80™ MUSIC SYNTHESIS SYSTEM 

WRITTEN BY JON BOKELMAN 



Turns Any 16K Level II TRS-80 Into A High Quality Musical Instrument 

3$e Sirftware-' 

A five part machine language program consisting of: 

2 Digital synthesizer— produces up to four simultaneous voices in a six-octave range. For 
example, you could have a trumpet, oboe, clarinet, and organ playing in four-part 
harmony or alter any of the voices to imitate other instruments. 

2 Music language compiler —a simple and easy to use language allows you to enter your 
favorite written music in any key or time signature. Plays all note values from whole notes 
to sixty-fourth notes which may be single, double, or triple-dotted and/or played as triplets. 
Supports single and double accidentals, stacatto, pizicatto, two forms of articulation, 
repeats, second endings (with or without retard), and modulation. 

3 Full screen editor— a full function text editor with blinking cursor is provided for easy 
entering and modifying of music programs. Functions include insert/delete characters, 
insert/delete line and global character string search, and automatic error detection/display 

4 File manager— provides the orderly storing and retrieval of named program files on tape 
or disk. You can even sequence several songs for automatic loading and playing. 
5 Initialization— this set-up routine allows you to alter the voices, select the standard 
four-voice synthesizer or a special high resolution, three-voice version and choose the 
standard (1.77 MHz) or the enhanced (2.66 MHz) clock rate. 

3$e Hardware^ 

A single 1 Vi" by 2" PC board plugs into the expansion connector on the TRS-80 keyboard or the 
screen printer connector on the expansion interface. This board contains the electronics 
required to convert the computer output into a high fidelity audio signal. Just plug in the 
board and connect to the aux/tape/tuner input of any audio amplifier. No external power 
supply is required. 



Includes: 

• Tape and disk versions on cassette 

• Completely assembled and tested 
PC board 

• Detailed and complete instruction 
manual 

• Sample music programs 



SEND CHECK OR MONEY ORDER TO: 



Orchestra-80 
$79.95 

PLUS $2.00 POSTAGE AND HANDLING 
CALIFORNIA RESIDENTS ADD 6% SALES TAX 



Software Affair 

4/3 SAPENA COURT SUITE 1 SANTA CI AIM. CALIFORNIA s>5051 



,' \'>b 



SPECIAL DEMO LINE! HEAR ORCHESTRA-80 ON (408)727-8194 



"TRS-80 IS A TRADEMARK OF TANDY CORPORATION 



^Reader Service— see page 226 



80 Microcomputing, September 1980 • 61 



TUTORIAL 



Manipulate your world. 



Pulling Strings Together 



John D. Adams 
13126 Tripoli A ve. 
Sylmar, CA 91342 



Computers differ from calculators in a 
number of ways. One of the most signifi- 
cant differences is in the computer's ability to 
process alphanumeric data (data containing let- 
ters, signs and symbols as well as numbers) and 
to handle "strings." 

In computerese, a string is a group of alpha- 
numeric data which is regarded as a single unit. 
A "prompt line," such as ENTER YOUR 
NAME, in a program is entered and stored as a 
string. In a program which must stop to allow 
manual input of data, the line PRESS ENTER 
TO CONTINUE might be added to continue 
execution, after needed data has been typed. 
Again the line is treated as a string. 

A Giant Leap 

As with arrays, the distance from Level I to 
Level II is a giant leap. Level I allows two 
strings, A$ and B$, each of which can be up to 
16 characters long. Now we suddenly have hun- 
dreds of string locations available, each of 
which may contain up to 255 characters. 

An extensive set of string handling instruc- 
tions has also become available, allowing us to 
make some pretty classy moves. We will deal 
with those instructions in detail in part two. As 
a beginning we will discuss some basic facts 
about strings and how computers "recognize" 
them. 

String and non-string data are handled dif- 
ferently by the TRS-80. Because of this differ- 
ence we must tell the computer how we want in- 
formation stored. One way to do this is to use a 
declaration sign in the variable name. In many 



dialects of BASIC, the dollar sign is used for 
this purpose. 

With this sign we can use the names A$, 
A(l)$, Al$ and AA$, and these variables will 
all be designated as different string variable 
names. This is a simple way to indicate string 
input, if you have only one or two strings, and 
they will not be referred to very often in the 
program. An example of this might read: 

10 DS « "DISTRICT* l M 

A second and more efficient method involves 
the DEFSTR instruction. Inserting the line 10 
DEFSTR A - D at the beginning of a program 
causes the computer to automatically regard 
any variable starting with A, B, C or D as a 
string variable, and the dollar sign may be omit- 
ted. Combinations such as B(l), DW, A7 or 
single letters such as C are now valid string loca- 
tions. 

Using these methods makes getting strings 
into and out of the computer quite easy. We 
can simply put the string into a program line, 
such as 10 AS = "JANUARY". Note that the 
data must be enclosed in quotation marks. If 
you omit the quotes, when the RUN starts the 
computer responds with a ?TM (type mis- 
match) error message. Even though the dollar 
sign is there, the computer does not "see" the 
word JANUARY as proper input. We must 
remember that a computer uses complex pro- 
cedures to convert those letters into numbers, 
after which it proceeds with operations. 

Strings may also be entered using the INPUT 
instruction. Very often this is done with a 
prompt line, such as: 10 INPUT"ENTER 
MONTH";A$. Inputting strings this way does 
not r equire quotation marks, unless the string 
contains commas, colons or leading spaces. If 
any of these conditions exist, quotes must be 
used. 

When you enter a lot of string information, 



perhaps the best method is to utilize the READ 
and DATA pair. The line, 10 READ Al$: 
DATA JANUARY" loads the name of the 
month into string location Al$. Once again, 
quotes must be used if commas, colons or 
leading spaces are part of the string. 

The following lines illustrate three ways of 
loading strings: 

10 AS = "JANUARY" 

20 INPUT-ENTER SECOND MONTH";B$ 

30 READ CS 

40 DATA MARCH 

SO PRINT. AS.BS.CS 

Line 10 loads the string manually through in- 
sertion in a program line, line 20 by using the 
INPUT instruction, and lines 30 and 40 by 
using the READ/DATA pair. Output is shown 
in line 50. The comma after the PRINT instruc- 
tion places the three strings in zones two, three 
and four on the monitor screen. 

Loading large numbers of strings may be 
done quickly and efficiently by using the 
READ/ DATA instructions along with a FOR- 
NEXT loop. The following lines load the days 
of the week into an array: 

10 DEFSTR N 

20 FOR A = I TO 7 

30 READ N(A) 

40 NEXT 

50 DATA SUNDAY.MONDAY.TUESDAY. 

WEDNESDAY.THURSDAY.FRIDAY. 

SATURDAY 

The commas in line 50 separate the data into 
individual "portions" which are picked up in 
order as the loop cycles. As each portion is 
stored, the computer marks it off so that it will 
not be used again without a RESTORE state- 
ment. When the loop finishes, the word SUN- 
DAY will be stored in N(l), MONDAY in N(2), 
etc. through SATURDAY in N(7). Outputting 
these strings is also accomplished with a loop. 
Add the following lines and RUN them: 



62 • 80 Micmcomautina. Seotember 1980 



at last, a 

***PROGRAM EDITOR 
FOR TRS-80 BASIC*** 

IirMl or one line .it a time program editing' Now 
Wittl the help m THf SOUTHEASTERN TEXTAN vou 
i an i-ntcr you) HAMC programs in a video oriented 
t.'>t eiiitur SimpK Mart typing To make a change iu»t 
move the non-destructive cursor over the character 
and type on top ol It! 

1 his editor was written tor TRS-80 BASIC not 
adapted to it THE SOUTHEASTERN TEXTAN is totalis 
in machine code lor speed and (ompai tries'. 

FEATURES INCLUDE: 

Hi-.irl- tapes written in BASIC 
Returns In BASIC with program ready 
One kev entry o( key words like PRINt 
Selectable aulo line numbering 
Idit any line while in invert mode 
Append programs 
Block delete 
Search and replace 

Auto repeat any key 

Requires Level II and 16K or more 
REPEAT KEY 

Repeats any key held down tor more than one second 
until kev is released Requires Level II BASK WBI 

work with almost am amount ol memory- 

lill SOUTHEASTERN TEXTAN $4000 

SOUTHEAST I RN TEXTAN MAN ..$ 7 50 
AUlORFPFAl KEY... J 7 50 

liotli are tape only 
Disk to be released soon 

Southeastern Software*' 316 
1604-9th Ave. S., Apt. 9B 
Birmingham, AL 35205 

Allen: |eff Lyons, DEPT M 



MWSWgR] 



SPECIAL 
PRICE 

TRS-80* -I or -II 

MEMORY EXPANSION 

CHIPSET: $59!! 

we ve done it again 8 low power. 250 
ns 16K dynamic rams at a trend setting 
price. Expands memory in TRS-80', Apple. 
Heath H89, Exldy Sorcerer, newer pets, 

etc. Don t be impressed with fancy packag- 
ing or four color ads; our chip set gives all 
the performance you want at a price you 
can afford. Offer good while supplies last. 
Add S3 for TRS-80' compatible dip shunts 
and complete installation instructions. 



i may carpm id ■" 



(41 Si S62-0636 COO OK with street address tor 

Prices suriiPct to change witnout notice 



WE ALSO MAN0FACTURE AN EXTENSIVE 

LINE OF S-100 PRODUCTS; SEE COMPUPRO 

S-100 BOARDS IN PERSON AT FINER 

COMPUTER STORES WORLD-WIDE. 



^75 



fr ° m - ElECTRON.es 

Bldo. 725, Oakland Airport, CA 94614 



ASSISTANT 



Get Control of Your Level II 

Add 8 new and 3 user definable 
commands. Break key control 
(on/off) - enable/disable all monitor 
printing - 245 computer speeds and 
more. Use as programming tool and 
under software control . . . includes 
debounce routine. 
Special Introductory V% Price Offer 
until September. Basic listing $5.00. 
Tape $7.50. Complete documenta- 
tion and sample applications. Spec- 
ify 4, 16, 32, 48k, 449 byte utility. 



The GREAT CRANE 
GAME MACHINE- 



"ACTION GRAPHICS" — mach i ne 
language speed. In this construction 
skill game you pick up beams and col- 
umns with the crane, then lower 
them into position . . . but be careful if 
not properly supported — 

DESTRUCTION! 
Watch out for the trolls. $7.50. 16k 
tape. Add $1.50 tape orders. 
Where proven software is still affordable 

FREE CATALOG 



The Berg Works 

BOX 742 A " 351 

JANltSVILLE. Wl 53545 




makes your TR§-S0 
a whole new 
animal. 



LYNX isn't just a telephone coupler. 

LYNX is a one-piece total telephone linkage 

system for TRS-80 Level I and II computers. It 

contains all the functions you need to tap The 

Source. Engage your business computer. Play 

games with a computer friend. Or do nearly 

anything you wish. 

Best of all . . . LYNX costs only $239.95*. A mere 

fraction of what you used to have to pay for 

equipment to do the same job. 

LYNX. To get your paws on one, call or write: 



EMTROL 
SYSTEMS, INC. ^s 

1262 LOOP ROAD LANCASTER, PENNSYLVANIA 17601 

Phone 717/291-1116 

VISA or Master Card Welcome 

•Add $2 » tar shfpng M runang 

on -rsdrts xu 6*. ate ID 

moute Inmmr program on caartte ranuoonmou* 





• Reader Service— see page 226 



80 Microcomputing, September 1980 • 63 



60CL&FOR A- I TO 7 

70 PRINT N(A) 
80 NEXT 



String Handling 

Now that we have had a look at inputting 
and outputting strings, we can stop to discuss 
some idiosyncracies of string handling. Earlier, 
I mentioned that string and non-string data are 
handled differently. What is this all about? As 
a visual aid to our discussion of "string 
literals," enter and RUN the following lines: 

10 A - 5 

20AJ = "?'■ 

30 PRINT A ♦ A 

40 PRINT AS + AS 

Hmmmmm. I'm pretty certain that 5 + 5 = 
10, but look what line 40 has produced! What 
happened? When a number is introduced into a 
string it is thereafter regarded as a symbol and 
not as a value. No computation may be done 
with that number as it exists in memory. You 
may recall the figure 5, but not the value 5. 
Level II does give us a way to get around this 
problem and it will be dealt with later. 

Line 40 illustrates an operation called "con- 
catenation," a fancy word for joining or link- 
ing strings together. In line 30, the computer 
took the value 5, added it to the value 5 and 
returned the value 10. Line 40, however, took 
the symbol 5 and linked it with the symbol 5 to 
produce a new string which reads 55. We could 
change line 40 to read: B$ = AS + AS and the 
new string (55) would then be stored in B$. 

This brings us back to the string/ non-string 
matter. You will recall that we could not load 
AS = "JANUARY" without using quote 
marks. Trying to load A = "5" results in the 
same mismatch error message. The dollar sign 
and quote marks must be used in conjunction 
with each other. 

In the JANUARY case we had specified a 
string location by using a dollar sign with A. 
The quotes said, in effect, "We contain the 
string to be stored, not the values." The quotes 
around the 5 say the same thing, but using A 
without the dollar sign indicates that the loca- 
tion is set aside for a value and not a string, so 
the line is rejected. The computer does not 
know the difference; you must tell it. We must 
be constantly aware that string data cannot be 
loaded into a non-string location and vice 
versa. 

String operation is also quirky about spaces. 
Enter and RUN the following lines: 

10 READ AS.BS.C5 

20 DATA JANUARY. FEBRUARY. MARCH 

10 PRINT A$;BS;CS 

Hey wait a minute! I put semicolons in line 
30 like I was supposed to for spaces between the 
words. Why are they all run together? When 
using strings, the computer neither assumes nor 
furnishes spaces, unless you put them in. There 
are good reasons for this. As an example, enter 
and RUN these lines: 



10 AS = -GROSS RECEIPTS FOR 1979 ARE $" 
20 INPUT-ENTER CROSS RECEIPTS FOR 1979";R 
30 PRINT AS;R 

Why is there a space between the dollar sign 
and the amount? I didn't want it there. How 
can I get rid of it? When the TRS-80 prints a 
number, it allows a space for the sign of the 
number. Numbers without signs are assumed to 
be positive, and we use a sign only if the 
number is negative. 

The computer follows the same rules. Our 
unwanted space was provided for a sign that we 
didn't need. To get rid of it, edit lines 20 and 30 
to read RS instead of R. Now we get the first 
digit snuggled up to the dollar sign like we 
wanted. Putting the number in a string elimi- 
nates the space for the sign, because the number 
is now regarded as a symbol and not a value. 

Of course, now we cannot do any computa- 
tion with the number, but we'll get around to 
that. By not furnishing spaces, we are allowed 
more flexibility in building strings. Here is a 
simple example of the potential acquired by 
using concatenation and space allotment: 

10 READ AS.BS.CS.DS.ES.FS 

20 DATA rRS,-,80,C OM.PUT.INO 

W PRINT AS ♦ BS 4 C$ « " " » DS I IS t FS 

Notice the " " in line 30. That space is the 
only one I wanted in the string. 

We are ready to get our JANUARY, 
FEBRUARY, MARCH problem unraveled. 
Remember how they were all run together? 
There are two ways to fix this. The first is to in- 
clude the spaces as part of the string so that line 
20 reads: 

20 DATA JANUARY. " FEBRUARY". " MARCH" 

February and March need quotes and not 
January, because of the leading spaces. An 
alternate method to handle this, instead of 
quote marks, is with concatenation. Change 
line 30 to read: 

30 PRINT AS ♦ " " + BS ♦ " " ♦ CS 

We have accomplished the same goal. This 
short example merely scratches the surface of 
what can be done with the various string han- 
dling instructions and routines furnished by 
Level II. 

No Arguments 

There is one last thing that should be cleared 
up before moving on. The CLEAR instruction 
has two uses. Used without an argument (with 
no number following it) it zaps all data out of 
variable locations and sets all strings to null 
(erases them). 

Used with an argument, as in CLEAR 1000, 
it still zeros all memory locations containing 
data, but in addition it sets aside 1000 bytes of 
space for strings in memory. When the TRS-80 
is powered up, it automatically reserves 50 
bytes for strings, and if you attempt to enter 
more than that you will get an ?OS (out of 
string space) error message. 



When you need more than 50 bytes you must 
reserve such space with the CLEAR(n) instruc- 
tion, preferably at the very beginning of the 
program. Should the computer encounter a 
CLEAR after data has been entered, all such 
data will be lost. And that can get irritat- 
ing—fast. 

Strings may be tested or compared, just as 
numbers can in Level II. This makes possible 
such operations as alphabetizing or searching 
files for a particular name. This process nor- 
mally involves using the IF-THEN instruction 
and what are called the "relational operators." 
There are six of these operators: equal to, not 
equal to, greater than, less than, greater than or 
equal to and less than or equal to. 

In string comparisons, these operators work 
exactly as they do for numerical operations. 
This brings up an interesting question. We 
know that the TRS-80 operates on numerical 
data and that before numbers can be operated 
on, they must be converted to base 2 or binary 
numbers. So, how can it tell the difference be- 
tween A and B or know that the name Brown 
should come before the name Williams? For an 
answer we must digress for a moment and take 
a quick look at what are called the ASCII 
codes. 

The letters ASCII stand for American 
Standard Code for Information Interchange. 
Looking at pages C/l and C/2 of your Level II 
manual, you see that certain control operations 
(page C/l) and all signs, symbols, letters and 
digits (page C/2) are assigned a code number. 
The dollar sign, for instance, is assigned code # 
36, uppercase letters numbers 65 through 90, 
lowercase letters numbers % through 127, 
digits through 9 numbers 48 through 57, and 
the graphics characters numbers 129 through 
191. 

These code numbers were assigned to assist 
in transferring information between various 
pieces of equipment, but they also carry some 
fringe benefits. The computer cannot tell the 
difference between G and M, but it can dif- 
ferentiate between 71 and 77. The ASCII code 
numbers are compared when working with 
alphanumeric information. 

To compare the letters G and M for 
alphabetical precedence, the BASIC language 
looks at the ASCII codes and not the letters 
themselves. Since the letters' codes are in 
ascending numerical order it simply finds the 
lower number. The computer then sends, on 
the basis of some test, execution to a specified 
location or address. 

If the strings to be compared contain more 
than one character each, the computer begins 
by comparing the first character in the strings, 
then the second, third and so on, until a match 
is either found or not. By using multiple IF- 
THEN tests, very intricate directions can be 
given; for example, if the first letter precedes 
the second, go to location A, if the letters are 
the same, go to location B, and if the second 
precedes the first, go to location C. Let me 
stress that strings must be identical to be 



64 • 80 Microcomputing, September 1980 



from PROGRAMMA 

HI-RESOLUTION GRAPHICS FOR THE TRS-80 




LOWER CASE 

The 80-GRAFIX board includes 

two sets of lower case characters 

at no additional cost. 




DEMONSTRATION PROGRAMS 

The 80-GR AF IX board is supplied 
with a Character Generator software 

and several demonstration programs. 




REAL TIME GRAPHIC GAMES 

With the 80 GRAFIX board you can 

write exciting real-time games using 

BASIC 




FINALLY. AT LAST. . . 

HI RESOLUTION GRAPHICS is available for your 
TRS80 computer system The 80 GRAFIX board from 
PROGRAMMA International. Inc. gives your TRS80 high 
resolution capability that is greater than the Commodore 
CBM/PET or even the revered APPLE II 

80-GRAFIX gives the TRS-80 an effective screen of 
384X192 pixels, versus the normal 127X192 for the 
TRS-80. 80X50 for the CBM/PET. or the 280X192 of an 
APPLE II. As an added feature. 80 GRAFIX offers you 
lower case characters at no additional cost. Of course, you 
;an also create your own set of up to 64 original characters 
using the supplied Character Generator software. 

The 80-GRAFIX board is simple to install (note that this 
voids your Radio Shack warranty), and programming is 
done through BASIC. 80-GRAFIX opens up a whole new 
realm of software development and excitement never 
dreamed of for the TRS-80! 



^» tP^^^^" 




EASY INSTALLATION 

The 80 GRAFIX board is simple to 

install and fits inside the TRS-80 case 




INVERSE VIDEO 

The 80 GRAFIX board allows you to 

do inverse video to high-light your 

screen displays. 




CHARACTER GENERATOR 

The supplied character generator 

software allows you to create your 

own character set of up to 

64 original characters. 



, I, i|«|>, M'l'l**" 
■niii. 



•I 1 *! 11 ,"l"' " f ""M 



SUA IMOl 

ammn 
•srmm 



GRAPHICS GALORE 

The 80-GRAFIX board and 

the supplied Character Generator 

allow you to become an artist. 



a nun 

n IS (MUM* 



im mjrr in smp * 



ELECTRONIC DESIGN 

The 80 GRAF IX board has unlimited 

application in Electronic design 

and Education 




80-GRAFIX HI RESOLUTION 

Finally, the only means to protect 

your computer investment is to order 

an 80-GRAFIX board TODAY! 




EXCITEMENTS FUN 

Open up a new realm of software 

development with the 80-GRAFIX 

board. 



Available exclusively through PROGRAMMA at the cost of $149.95 

Please check with us for availability prior to ordering 

VISA and MASTERCHARGE accepted 

TRS-80 is a registered trademark of the Tandy Corp. ^21 



PROGRAMMA 
INTERNATIONAL, INC. 

3400 Wilshire Blvd. 

Los Angeles, CA 90010 

(213) 384-0579 • 384-1116 ' 384-1117 



10 


DEFSTR 


A,B:DEFINT I 


j 






20 


FOR J=l 


TO 7:READ A(J) 


NEXT 




30 


DATA B, 


2,A,D,G,C,F 








40 


F-0 










50 


FOR I«] 


TO 6 








60 


IF A(I) 


<» A(I+1) THEN 


90 




70 


B-A(I) : 


A(I)-A(I+1):A(I+1)-B 




80 


P-l 










90 


NEXT 










100 IF F-] 


THEM 40 








110 CLS: PRINT-HERE ARE 


THE LET: Li 




IN ORDER:" 








120 F ■!■: I 


1 TO 7: PRINT 


A(I) + 


:NE 




XT 


Listing 1 









matched, down to the last space or period. In a 
long ring one character can prevent a match- 
up. 

Appli -lions 

Program listing 1 illustrates a very simple 
sort routine that takes seven letters and alpha- 
betizes them. In computer jargon a sort is a 
program which can put data into some speci- 
fied order. There are numerous sorting rou- 
tines, including Shell sorts, bubble sorts, ripple 
sorts, quicksorts and binary search sorts. All 
depend on string comparisons and branch in- 
structions. 

Line 10 of the routine designates A and B as 
string locations and I and J as integer locations. 
Sorts run a little faster if the loop counters are 
defined as integers, as this eliminates some of 
the comr ^tion necessary for single precision 
numbers. ' ines 20 and 30 read data into the 
computer using an array loop. 

lines 40 and 80 have to do with setting and 
resetting a flag in the variable location F. This 
flag defines an escape route from the loop when 
all of the data is in alphabetical order. 

The heart of the program is the loop in lines 
50 through 90. After the flag is set to zero in line 



40, line 50 establishes the loop and sets I to 1 . 
Line 60 compares the letter in A(l) with the let- 
ter in A(2). Remember, the letters are not being 
compared, but rather their ASCII numbers. If 
the letters are in the right order, execution 
branches to line 90, then to line 50, which in- 
crements 1 by one and then tests to see if the let- 
ters in A(2) and A(3) are in the right order. 

If all of the letters had been in the right order 
originally, this process would continue until I 
had been incremented to seven, dropping ex- 
ecution to line 100. Since the flag is still set at 
zero, the test fails, and lines 1 10 and 1 20 are ex- 
ecuted to print the results. 

If, however, line 60 uncovers two letters 
which are not in order, execution proceeds to 
line 70. Let's say that the letters in A(3) and 
A(4) were not in proper order. The computer 
then puts the letter in A(3) into a temporary 
location named B, transfers the letter in A(4) to 
A(3), and then puts the original letter which is 
stored in B into A(4). The two letters are now 
reversed in position. The letter which was in 
A(3) is still in B, but will either be written over 
or ignored. 

After line 70 has completed the exchange, 
line 80 sets the flag to 1 , and line 90 returns ex- 
ecution to line 50, which increments I and starts 
the loop cycling again. The I in location F told 
the computer that a change had been made and 
that it was not finished. This continues until all 
letters are in order, at which time line 60 sends 
execution to line 90, until the loop completes 
and line 100 sends execution to line 40, resetting 
the flag. 

On the next pass the computer escapes to 
lines 110 and 120 for printout. One of the 
disadvantages of this routine is operating time. 
With only seven letters it loads, sorts, and 
prints out rather quickly. It takes more time 
relative to the elements increasing in number 
and/or complexity. 



The ability to compare strings is very handy 
in locating a particular name or file stored in an 
array. Program I isting 2 shows an elementary 
example. Line 10 defines variables by type. 
Lines 20 to 40 load five names into an array 
named N. Line 60 allows you to enter the name 
to be found and stores that name into location 
A($) Lines 70 thiough 90 set up a loop and 
compare what is in A to each member of the ar- 
rays. If it cannot find the name, line 100 sets up 
a default instruction and returns you to line 60 
for another try. 11 the name is found in line 80, 
execution branches to line 1 10 to return the file 
number. Any other information that was in 
that file could, of course, be retrieved at this 
point. 

Try adapting or changing these routines to 
accomplish a specific task . A good exercise is to 
combine I isting 1 with I isting 2 to allow you to 
enter names in any order. Then have the com- 
puter alphabetize them and search for a par- 
ticular name. As you gain fluency in handling 
strings, you will be amazed at what this little 
machine can do.B 



10 DBF INT I: DEFSTR A,N 

20 FOR 1-1 TO 5 

JO READ N(I) 

4 DATA BROWN T. , CARVER J ., FRANK J., 

MILLER J., WILLIAMS B. 
50 NEXT 
60 INPUT'ENTER NAME YOU WANT FOUND" 

:A 

70 FOR 1=1 TO 5 

80 IF A=I1(I) THEN 110 

90 NEXT 

100 CLS:PRINT*TIIE NAME YOU SPKCIFIE 

D IS MOT LISTED* :GOTO 60 
110 CLS:PRINT"THE NAME YOU SPECIF IE 

D IS IN FILE l";I 



Listing 2 



CnrapuCauEfv 




COVER YOUR INVESTMENT 



•Ctoth Bached N*oy*' , :•■ . 
•Improved M«.i(Mfii'» 
•LOAQ* l>fe 



• W etc* proof 4 Out I proof 



*•«« chetf oi nvine* flrtH' to 

include Si 00 lor peiuqt inrj handling 

Overtoil orMn mcludo 13 00 poiloqo 

DEALER INQUIRES INVITE0 



CoowCoutft ^100 

P Boa 374 (Dtp) Ci 
M*ry Esltiar I i 37*60 
PnofW HOD ?43 Sm - 



9 TRS-80* 

SOFTWARE AT 

DISCOUNT 

TRS-80 is a trademark of Tandy Corp 



2 % 



: Li 

is,, 

• 24 

: 14 

:,4 
: 19 
: 14 



o s 

Price 

$ 



S ! 

95 Temple of Apshi *19 96 

95 Morloc's Tower 11.96 

95 System Savers 11.96 

95 Disk Ut ih t y (Acorn) 16 96 

1 1 96 
r) 



95 P i n b a I I 

nd check or M O dIus SI. 00 p&h( p er order 
'- 25C.4 sase for complete list to. 

® 

Discount Software ^424 

PO Box 9985 
Washington DC 20015 



SYSTEM 




Your TRS-80™ Mod 

Normal household and 
commercial electrical 
power (AC) can vary as 
much as 200% and can 
VANISH lor a halt second 01 
more 1 The TRS-80" Pow- 
er Supply was not de- 
signed to cope with 
this typical AC condition! 

P & L BUSINESS/COMPUTER SYSTEMS 

Power modification stabilizes system voltages al- 
lowing up to 2 seconds' uninterrupted operation with 
AC OFF! (Depending on power supply you use ) 
Detailed Instructions tor Processor & Expansion Interface 
(w/parts list & pwr supp selection data) S9 95 
Level 1 Kit For Processor Only 
(instructions, parts, cables & power supply 

selection data) $31.95 

Level 2 Kit For Processor and Expansion Interface 
(instructions, parts, cables & power supply 

selection data) S49.95 

Send check or money order to 

P & L BUSINESS/COMPUTER SYSTEMS 
P.O. Box 333. Ramona. Calif. 92065 ^354 
California Residents please add 6% sales tax 



66 • 80 Microcomputing, September 1980 



FILL IN THE BLANKS!! 




Crt i*1 <il thriw umlnwmr l\Pl ■ I \mement\ jnrl lill m the 

bUnk\ MMn Of Irmrn du»n im the \, teen nt yout IRS-HCI 

inter tlju more quit 1 I, with tewer er 

tM*f MbpUblltOlt* te^el II HASH in.j«fjm frw ptrlnge 
■KftoaVi * mjKhtne ijnginge prognm lot rurwt (rtntrnl *nd a 
Imfrlnin* '■"■l prrnetlure tot reading data from the l\ M -eer 
Ihetorn j"».» krvsKivft tantaUn nlitmgpowet Uake\en 
term* data Inn Vnri II manner hent tou e\er did without «•' 
\4a» hine Unguage ( ode n telex Jtjhle ton I '\e it w ttt- 
merrtnr\ and/or Other mtfhfie language program without 

ni afifil i».i n 

Radkqa; T— Com p Wr wntten dm umentalmn msitur turns 
etampies tmi program listings t ts» ws 

jnmtf *l -rnnutes i t imping i.'4 **i 

P.ifl.iKr I Vioir.ispjfl.itf. - , it,. (>.,. 

;;s i inrfMASfJfff »M»( / .,. , epted Phone nrdersweUome 

ACR Consultants +m 

1000 North Bilner Road 

New Palestine, IN 4616.1 117-861-6119 



ANNOUNCING THE FIRST 

TRUE ELECTRONIC MUSIC 

SYNTHESIZER FOR THE 

TRS-80* 

NOT A SIMPLE SOUND EFFECTS 
GENERATOR BUT A COMPLETE 

MUSIC SYSTEM! 

TRS-80* Synthesizer 

• 3 SIMULTANEOUS NOTES PEB BOARD 

• PLUGS INTO ANY STEREO SYSTEM 

• NO EXPANSION INTERFACE NEEDED 

• DEMO CASSETTE INCLUDED 

$130 KIT $100 ASSEMBLED 

DfUOCASSenE taOOMPARATfl » 

MUSIC EDITOR 

ENTER SHEET MUSIC VIA WELL TESTED ENTRY SYSTEM 
$10 CASSETTE $15 DISK 

TRS-80 Hardware: 

2 Pluo in Game Paddles . . 74.96 

Lowercue Modification IMS 

Light Pen 19.96 

Beeper 26.00 

I 

NEW WAVE ELECTRONICS. INC. 



• 323 



TRS-80*TRS-80*TRS-80*TRS-80 

Model I system owners 
SYSTEM TOO SMALL? 

We lake trade-ins on Mode) II 
We also buy used systems outnghi 

Call or write for quotation 

USED TRS-80 SYSTEMS 

We sell used keyboards, exp.int . 

disk drives, nc. 

C all or write for quotes 

NEW HARDWARE IN STOCK 

I6K Level II $749.00 

Radio Shack disk drives $449.00 

I6K Memory- Lifetime warranty $89.00 

Centronics 730-1 1749.00 

IDS 440 Paper Tiger $949.00 

SOFTWARE 

Data Management System-Mod I or II 

An excellent design -it -yourself 

software package- $99.00 

Utilizes and requires Racet Computes 

GSF and COMPROC 

PENCILFIX 

Save your warranty. Use Pencilfix to avoid custom con- 
trol key on your keyboard. Uses Radio Shack lowercase 
mod with electric pencil— $14.95 



Completely integrated automatic 

letter writer for Model II 

Consists of WORDSCRIBE. WORDMAIl . 

MAII I IST-S2S0.00 

PRINTER SPOOLER FOR MODEL I 

Increases ihrupui ot printer operations Fully relocatable 

Buffer sire user defined Executes as a BASK profram 

A must when using Radio Shack printers 

$14 95 



VERN STREET PRODUCTS 

IMWTafi Sapulpa, OK 
74066 (918)224-4260 



*-111 

Wehandkatulllincol 
Radio Shack product*. 



TrRMSCODWrtCOMc.CASH. CHECK. OR MONEY ORDER 
ADD ''. 1 1 ik MASTER CHARGE AND VISA 



sM 1 



%!*• 



,c/ 



.# 







««* 



.A* 



Electrolabs 

Announces ^369 



User Friendly, Big Software for your Micro; 
THIRD GENERATION SOFTWARE for your 

S-100, Multi-Bus, TRS-80, Zilog, Mostek or Prolog 



NEW^ii Operating System 



for 

Z-BD 



os-i 



OS-1 is truly a breakthrough in the micro 
world 1 OS-1 is NOT a "control program for micros" 
but is. instead a large, orofessional operating system 
designed to lower the cost and improve the quality 
ol programming efforts. OS-1 provides a "friendly" 
human interface for both system programmers and 
users. Finally, with OS 1, the capability of a Z 80 
system is vastly expanded. 

OS 1 appears exactly like UNIX to the uset. 
and includes virtual t/o, "set tty" and "login" comm- 
ands, a shell, a hierarchical "tree" type file structure 
with 16Mby file size and an unlimited no. of files 
and devices. OS-1 allows the extremely useful "pipes" 
and "filters" to be implemented. OS-1 also provides 
for up to 1024 users and 64 groups and security 
foi usets, groups, files and devices. OS-1 occupies 
12Kby and comes with a 4Kby "enhanced" cp/m 
adapter which runs ALL cp/m and most CDOS pro 
grams. Source code is supplied with adapter. 



0S-1 (Including Debugger. "UNIX-type" 
editor. Linker Loader & 1 Yr. update) 

S249 
"C" Compiler (Whitesmiths') $600 

Microsoft Compiler Interface (interfaces 

MS Fortran & Cobal compilers directly 
to OS-1. This allows compiler output 
to "Command" OS-1 Routines. The 
Electrolabs' Software Group considers 
this interface indispensable. Contains 
over 100 separate routines) $49 



Manuals: 

(r3nce applies to OS-1 purchase) 

Introduction to 0S-1 (60pg) $15 

0S-1 Users' Guide (150pg) $35 

Sys-Gen Manual for 0S-1 (40pg) $10 

SET $45 



EXTRA! 

8" Dual Floppy Add-On for TRS-80 Now Available! 
Runs CP/M Programs! Includes. Dual/Single Density 
(Up to 1 mBy), RS232 Port. All for $2495.00 



Now Available Exclusively Through: 



SOFTWARE LABS 

735 Loma Verde, Palo Alto. Ca. 94303 
Phone: 415 493-8186, TLX. 345567 



Name Property of Digital Research "Name Property of Western Electric 
'Reader Service — see page 226 



80 Microcomputing, September 1980 • 67 
Scanned by Ira Goldklang - www.lrs-80.com 



UTILITY 



Use your input buffer to beat the SYSTEM. 



Free Space 



David Cornell 
335 Parkside Rd. 
Harrington Park, NJ 07640 



Sooner or later you'll get an 
out of memory message 
from your computer. Then what? 
The simplest way to increase 
space is to use a utility program 
that deletes spaces, line feeds 
and remarks. There is, however, 
an interesting catch: When the 
utility is most needed, there is 



no place to put it. Having it per- 
manently reside in memory only 
contributes to the problem and 
may be the cause of the OM ER- 
ROR in the first place. 

The solution is to load this 
utility into the input buffer, as 
this part of RAM is always avail- 
able. The program can be load- 
ed and run after an out of memo- 
ry message is received without 
disturbing the BASIC program. 

This also means that this utili- 
ty program must be executed 
immediately after it has been 
loaded and can be used only 
once per load. 

As a practical matter, this pre- 
sents no problem. A utility of 
this type is not needed continu- 
ally. It can be loaded and run 



when needed and will take up no 
memory when it is not. 

Clever Idea 

Using part of the buffer in this 
manner is such a clever idea 
that the SYSTEM command 
uses it for its stack area during 
system loads — so much for 
originality. The utility, therefore, 
must straddle the SYSTEM 
stack to avoid being wiped out 
by it. 

When the tape has loaded, its 
execution follows directly. 
There is no prompt for a / or en- 
try point. 

The program offers one user 
option: Remarks may be re- 
tained or deleted. Before the 
program executes, a prompt is 



Source Program 

ADDRESS RAM 



Decision 



Object Program 

RAM 



42E8 

42E9 
42EA 

42EB 
42EC 
42ED 
42EE 
42EF 
42 FO 
42F1 
42F2 
42F3 
42F4 

42F5 
42F6 
42F7 
42F8- 



END OF LINE 
NEXT LINE AT 
42F7 

LINE NUMBER 
10 

PRINT 

SPACE — 

SPACE 



00 
F7 
42 
OA 
(X) 
B2 
20 
20 
22 
48 
20 
49 
22 



00 END OF LINE 

00 END OF BASIC 



SAVE- 
SAVE- 



SAVE- 



DEC. 



00 




+- END OF LINE 

► POINTER WILL BE 
CALCULATED 

► LINE NUMBER 
10 DEC 
PRINT 



ENDOFLINE 

END OF BASIC 
PROGRAM 



00 



0A 
00 
B2 
22 
48 
20 
49 
22 
00 

00 

00 



ADDRESS 

42E8 
42E9 
42EA 

42EB 
42EC 
42ED 
42EE 
42EF 
42F0 
42F1 
42F2 
42F3 

42F4 
42F5 

42F6 



PROGRAM 
BEGINNING OF THE VARIABLE TABLE(S) - 



Example 1. 



displayed and the option is se- 
lected. For purposes of debug- 
ging or documentation, it may 
be desirable to retain remarks; 
in some programs a remark may 
be the target of a GOTO or a 
GOSUB. 

Upon completion, the number 
of bytes deleted from the BASIC 
program will be displayed at the 
upper left of the screen. 

The discussion has been di- 
rected toward a Level II system. 
But it applies as well to a disk- 
based system, with the excep- 
tion that there are other areas of 
RAM available in disk systems. 

BASIC 

Basic Commands are stored 
in RAM as one-byte tokens. 
When a BASIC program line is 
keyed, it is first written in the in- 
put buffer. Then, routines in 
ROM rewrite the line, substitut- 
ing one-byte tokens for each 
reserved word found. Numbers 
80H and above are used. These 
will be greater than the ASCII 
character set, and when the 
BASIC interpreter encounters a 
number in this range, it knows 
that it has found a command. 

The end of line marker is 0. 
Zeros never appear in the text. 
When the interpreter encoun- 
ters 0, it knows it has reached 
the end of the line. (A may, 
however, be part of a line num- 
ber or line pointer.) 

While you can find the end of 
the current line by advancing un- 
til is encountered, you cannot 
back up to find the end of the 
previous line as the encoun- 
tered could be part of a line num- 



68 • 80 Microcomputing, September 1980 



ber or pointer. 

The first two bytes of a line 
point to the address of the next 
line. The next two bytes of the 
line are the number of the line. A 
line pointer of 0000 indicates the 
end of the BASIC program. 

The Z-80 stores two-byte num- 
bers, least significant byte first. 
40A4 would appear in RAM, or in 
the assembler program listing, 
as A4 40. All bytes which have 
no program function will be 
deleted. The BASIC program is 
altered as described in the fol- 
lowing text. 

Formatting Commands 

Any byte in the range 1 to 32 
decimal is deleted. These are 
usually a space (ASCII 32) or a 
line feed (ASCI1 10, entered from 
the keyboard or by the down ar- 
row). The tab (right arrow), en- 
tered when the line is initially 
keyed, also writes spaces (ASCII 
32s) in the line which will be de- 
leted. 

Formatting bytes preceded 
by a DATA token or a comma 
will be deleted, not saved. All 
other bytes will be unaffected, 
or protected. 

Remarks can be deleted or 
saved depending upon user op- 
tion. The remark begins with the 
REM or ' command and preced- 



ing bytes may be deleted. 

There are some special 
cases. A legal BASIC line with 
no text will be deleted. For ex- 
ample: 100 :. This would be ac- 
cepted by BASIC, but does noth- 
ing. Superfluous colons will also 
be deleted, as in the example 
below: 



100 FOR I ■ 1 TO 6:: 



How it Works 

The original BASIC program 
is treated as a source program 
and is used to write an object 
program. Each source byte is ex- 
amined and is either saved or 
not saved in the object program. 

HL is the source program 
pointer for the byte of the source 
program which is being exam- 
ined. DE is the object program 
pointer that points to the loca- 
tion where the next byte of the 
object program will be written. 

A byte is saved by writing it in 
the address indicated by the ob- 
ject program pointer and incre- 
menting both the source and ob- 
ject program pointers. A byte is 
deleted by incrementing the 
source pointer without writing 
the byte to the object program. 

The BASIC source program, 



1 " 

THIS IS A 


TEST FOR THE UTILITY PROGRAM 'SPACE' 


ii 

10 PRINT "H E L 


L O": H E L L O 


20 PRINT "HELLO 


: GOOD-BYE 


3 DATA 1, 2, 5: DATA 1,2,3 


»»0 DATA 1, 2, 3, 


":":data "test": test 


50 REM TEST 




60 'TEST 




70 'TEST 




80 A: 'TEST 




90 B: 'TEST 




100 AA: 'TEST 




110 BB: 'TEST 




120 : 




130 : 




mo A:REM TEST 




150 B: REM TEST 




160 AA:REM TEST 




170 BB: REM TEST 




180 DATA MONDAY, TUESDAY, WEDNESDAY, 


THURSDAY, 


FRIDAY, SATURDAY, 


SUNDAY 




190 X$=" 




MONDAY 




TUESDAY 




WEDNESDAY 




THURSDAY 




FRIDAY 




SATURDAY 




SUNDAY" 




15360 r'TEST 




20000 END 






Source program. 



10 PRINT "H I", produces the ob- 
ject program. Example 1 illus- 
trates the pointers. 

The main program is con- 
trolled by TEXT. TEXT sets itself 
as the return address by push- 
ing its address into the stack. 
On RET, the top of the stack is 
popped into the Z-80 program 



counter. This allows the program 
to be arranged into small callable 
blocks and it always returns con- 
trol to the same point after 
whatever branching takes place. 
TEXT then checks for the 
cases which will be handled by 
special processing routines: the 
end of the source program line 



BASIC PROGRAM APPEARS IN RAM AS 



REM 


93 




3C 93 FB 


10:' 


0A 00 3C 3C 93 FB 


10' 


0A 00 3C 93 FB 


15360 REM 


00 3C93 


15360' 


00 3C 3C 93 FB 


15360:' 


00 3C 3C 3C 93 FB 


15538 REM 


B2 3C 93 


PRINT:REM 


B2 3C 93 


PRINT: - 


B2 3C 3C 93 FB 



Table 1. 



AUTO Auto execute 

START Start the program 

DISPR Display prompt 

DISSTR Display string (pomteo to by HLi 

SCAN Scan the keyboard 

REMOPT Remark option chosen (save remarks) 

NOREM No remarks to be saved 

TEXT Text of BASIC line 

SAVE Save byte in Object Program 

NOSAVE Do not save byte m Objecl Program 

ENDLINE End ol the line (in Source Program) 

NOTEND Not the end ot the BASIC program 

FIRST First byte ot the text 

BEGSMT Beginning ot the BASIC statement 

EXITSP Exit the SPACE program (sorry 1 ) 

QUOTE Quote found in Source Program 

REMDEL Remarks to be deleted 

REMSAV Remarks to be saved 

DATA DATA statement found in BASIC program 

PROMPT Prompt 

Table 2. Assembler Mnemonics and Derivations. 



1 " 












THIS IS A TEST FOR 


THE UTILITY 


PROGRAM 


SPACE' } 


10 


PRINT"H ELL 0" : HELLO 








20 


PRINT"HELLO : GOOD-BYE 








30 


)ATA1,2,3:DATA1 ,2 ,3 








<t0 


QATA1,2,3,":":DATA"T E S 


T":TEST 






80 


A 








90 


B 








100 


AA 








110 


BB 








1*»0 


A 








150 


8 








160 


AA 








170 


BB 








180 


DATAMONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY 


SAT 




URDAY, SUNDAY 








190 


X$=" 

MONOAY 

TUESDAY 

WEDNESDAY 

THURSDAY 

FRIDAY 

SATURDAY 

SUNDAY" 








20000 END 










Object 


program. 







80 Microcomputing, September 1980 • 69 



OURS 
WORK! 

ACCOUNTING 
PROGRAMS 

from the company with 

years of experience 

on small computers 

and thousands of customers 

prices resulting from 
volume sales 



PACKAGE OF 
5 PRODUCTS 

PRODUCTS 
EACH 

MANUALS 
EACH 



$395. 
$95. 
$20. 




V 



TRS-80 Owners: 
Turn Your Typewriter Into A Printer 

...With the KGS~80 Keyboard Actuator 

• Plug-in compatibility with the TRS-80 . . . attrac- 
tive enclosure contains actuator and interface. 

• Least expensive way to get letter quality printing. 

• No mechanical modifications to the typewriter 
are necessary. 

• Rests firmly above the typewriter keyboard. Can 
be installed or removed in 5 seconds. 

• Does not require any software to operate . . . 
works with Pencil. Scripsit and other word pro- 
cessing programs. 

• Solenoids with soft plastic tips strike typewriter 
keys with the same force a typist would exert. 

KGS1 KOGYOSHA CO., LTD. 

Dealer Inquiries Invited. \ ' 179 Riveredge Rd.Tenafly. N.J. 07670(201)568-8769 




GENERA L LEDGER 

PA YROLL 

ACCOUNTS RECEIVABLE 

A CCOUNTS PA YABLE 

DEPRECIA TION 

for 

TRS-80* 

MODEL I with TRSDOS* 
MODEL II with CP/M + 

OTHER CP/Mt SYSTEMS 



Product Info & 
License /Order 
Form. 



MANAGEMENT SYSTEMS SOFTWARE 

ANNOUNCES 
TWO NEW BUSINESS PROGRAMS FOR THE SMALL BUSINESSMAN 

BY 

|EROME S. OSTERYOUNC. PH.D. 

RENOWNED BUSINESS EDUCATOR AND AUTHOR OF 5 BUSINESS TEXTS 

PROFORMA CASH-FLOW PROGRAM * LEASE-PURCHASE PROGRAM 

FORECASTS CASH NEEDS AND LIQUIDITY EVALUATES LEASE VS PURCHASE DECISION 

FOR UP TO 12 PERIODS INCORPORATES LATEST TAX IMPLICATIONS 

$125.00 NEW LOW PRICE $50.00 

EXTENSIVE DOCUMENTATION WITH EACH PROGRAM 

CASSETTE OR DISK 

WRITE FOR BROCHURE 

MANAGEMENT SYSTEMS SOFTWARE 

5200 BRITTANY DRIVE. #1006 ST PETERSBURG FL 33715 

^87 




COMPUTE X 17710 HERITAGE Ct. WEBSTER TEXAS 

-"' maxim 7759B 



This Month Only 
LNW KITs 

80ILD TOUR OWN TIISIO* 
EIPINSION INK RfiCE 
COMPLETE KIT LESS RIM 
CASSETTE m»Y I C»SE 

$229" 

ASSEMBLED- - S299." 

Custom Cabinets 

FOB II* SYSTEM E IP1HSI0N 
CABINET ■! I SUSS 

HOI S INW B AR t POHII 

SUPPLIES 

CAB IfeE T ■■ 2 S»9 J5 

llOltS LIB. POWEI SUPPLIES) 

tOP TO 2 DISK DRIVES 



TRS80 DISK DRIVES 
*$325* 

Your : Tandon , MPI 
Choice : or Shugart 
INCLUDES CASE & SUPPLY 
DISK DRIVE CABLES S21 95 



NEW!! mpi- 

PRINTER MODEL 88T 

• ADJUSTABLE TRACTOR FEED 

• 100cpi UPPER-LOWERCASE 

• BIDIRECTIONAL PRINTING 

• RS232 * PARALLEL l/F 

• FRICTION FEED 

• PLUS MORE FOR 



$749 



COMPONENTS O Q 

FOR LNW SYSTEM EXPANSION 

.■moo S .33 I4S04 S JS 

MISII 33 74S32 SO 

TUSH 10S 14 JO 40 

7US30 33 7402 40 

T4LST4- SO 7403 40 

MIS13J 1.00 7I0S 99 

74LSISS 100 7112 99 

74LS101 100 H\l <9 

74LSI7S 100 7S4S2 JS 

7415240 I JS 1411 JJ 

7415241 1 OS 1410 J J 
74LS244 225 74LS307 (( 
FD1771B-01 OISK (Till 2 3.9 S 
TR 1602 Oil I 3*5 
MP J 131 00 

10,000 if lllll CAPAC I TOI 3 IS 



• ORDERING INFORMATION 

• VISA * MASTFRCHARGE 

• ORDERS ADD 4% 



PERSONAL CHECKS 
TAKE 2 WEEKS TO 
CLEAR 



COD. REQUIRE 10% DOWN 
TEXAS RESIDENTS ADD 4% TAX 







PHONE 

(503) 476-1467 

840 N.W. 6th STREET, SUITE 3 
GRANTS PASS, OREGON 97526 

'Trademark Radio Shack, Div. Tandy Corp. 
* Product Digital Research, Inc. 



THE MICRO CLINIC 



• 214 



SYSTEM DIAGNOSTICS FOR THE MODEL I TRS-80* 



THE FLOPPY DOCTOR 2.2 

• Complete write/read testing lor 35 or 40 
track drives 

• Tests all controller functions and status 
bits 

• Tests drive motor speed and allows 
adiustmeni 

• Complete error logging and summary for 
I to 4 drives 



MEMORY DIAGNOSTIC 2.1 

• Wnte'Read section tests each address 260 
times per pass 

• Checks for correct refresh operation and 
address uniqueness 

• "Ml Worm'' test executes machine code 
from each address 

• Complete error analysis is performed when 
errors occur 



70 • 80 Microcomputing, September 1980 



Both diagnostics are written in Z-80 machine code and can be run continuously 
to verify long-term system reliability. Complete instruction manual includes 
hints to troubleshooting. Supplied on diskette for a minimum 16K single disk 
system. -trskis a registered trademark of tandy corporation 

PRICE $1 9.95 CA residents add 6% Sales Tax. Add $1 .00 P/H. 
•THE MICRO CLINIC • 17375 Brookhurst • No. 1 14 • Fountain Valley CA 92708- 



or a quote. If neither is encoun- 
tered, a check is made for a for- 
matting command. 

If the byte is a formatting 
command, there is a jump to 
NOSAVE in the object program. 
If the byte is not, it is considered 
necessary to the BASIC pro- 
gram and is saved. 

RET returns to TEXT to begin 
the process all over again for the 
next byte. Note that SAVE and 
NOSAVE also update the point- 
ers, return the source byte in the 



accumulator and set the Z flag if 
the end of the source line has 
been reached. 

Endline 

This module is entered if the 
end of the source line has been 
reached. On entry A = 0; HL 
points to the end of the source 
line; and DE points to the ad- 
dress where the end of the ob- 
ject program line will be written. 

A check is also made to deter- 
mine if this is also the end of the 



EXAMPLES OF REMARKS WITH POINTERS 

On entry to the remark pro^ essing routine, the pointers will be as follows: 
Example 15360 REM 



IX points here DE points here 

in Op] ect_ Prog ram . in Qbiect Prog ram 



0O3C3C 



Line Number 



HL points here in Source Program 



REM Token 



Example: 



10 PRINT:' 



IX points Mere DE points here 

in Ob|§a Program in Object program 

0A00B2 3C3C93FB 



Line Number 



77 1 / 



HL points here in Source Program 



'End of Statement 
PRINT Token 



Example 2. Remarks with pointers 



42D1 53 S 15600 

42D2 41 A 

42D3 56 V 

42D4 45 E 

42D5 20 

42D6 52 R 

42D7 45 E 

42D8 4D M 

42D9 41 A 

42DA 52 R 

42DB 4B K 

42DC 53 S 

42DD20 

42DE 20 

42DF 59 Y 

42E0 2F / 

42E1 4E N 

42E1 20 

42E3 3F ? 

42E4 00 15700 

00 00 TOTAL ERRORS 



DEFM SAVE REMARKS Y.'N ? 



DEFB 



.END OF MESSAGE MARKER 



Example 3. Hexadecimal Representation of ASCII Charac- 
ters. 



BASIC program. If this is the 
case, a jump is made to the exit 
routine, EXITSP. 

In the first byte of a statement 
a number of unique situations 
may occur. These are treated as 
special cases and handled by 
BEGSMT. A check is made for 
DATA and REMark commands, 
which occur only at the begin- 
ning of a statement. Also, a 
statement may have no text, as 
mentioned earlier. In this case, it 
is treated as a remark and is de- 
leted by the remark delete rou- 
tine. Extra colons may have 
been entered through user error 
or keyboard bounce and are not 
saved. A RET is used again to re- 
turn to TEXT. 

Remarks present a problem. 
Processing remarks is made 
complicated by the fact that 
there are two different remark 
formats. REM is stored in RAM 

as 93H (REM token). is stored 

in RAM as 3C 93 FB ( : REM FB ). 
The colon may also indicate the 
end of a statement which in turn 
may precede a REM token. 

Things are further compli- 



cated by the need to know 
whether the remark is at the be- 
ginning of a line or at the begin- 
ning of a statement in a multiple 
statement line. Once all this has 
been figured out. the source and 
object program pointers are ad- 
justed accordingly. Table 1 
shows several example remarks 
as they appear in RAM. 

Table 1 also shows the prob- 
lems of backing up. One solu- 
tion is to save the address of the 
first byte of the object text in 
register pair IX. If, on entry to 
the remark processing routine, 
DE = IX, then the remark pro- 
cessing routine, DE = IX, then 
the remark is at the beginning of 
the line. If DE is not equal to IX, 
then the remark is in - a state- 
ment in a multiple statement 
line. Note that the colons as the 
first character of the text will not 
be saved. Example 2 shows re- 
marks with pointers. 

In addition to containing the 
display message SAVE RE- 
MARKS Y/N ?, the prompt string 
contains a number of ASCII con- 
trol codes. When the prompt is 



Our new program 
package for the 

TRS-80 
sounds terrific. 



So does the price* 

There are lots of programs with sound that 
are worth about a dollar. Trouble is, thev cost a 
lot more. 

But at Basics &. Beyond we've just developed 
Microcosm III, 20 programs with sound— each 
lust as good as our competition's $15 and $20 pro 
grams— for $24.95. That's a 20-program package 
for $24.95. 

It includes "Pinball," replete with ringing 
bonuses, spinners, buzzers and flippers; torpedo- 
firing "Submarine" that explodes with underwater 
excitement; and the right/wrong buzzer in "Long 
Division" teaches step by step. 

At Basics &. Beyond we underscored our 
point that most other program packages are over- 
priced with Microcosm I and Microcosm II, $19.95 
each. Now a lot of people will start hearing about 
our third package and stop listening to high prices. 

You see, it's not that our program packages 
for the TRS-80™ microcomputer are so cheap. 
It's just that theirs are so expensive. 

BASICS & BEYOND, INC, 

Box lO'Amawalk.N.Y 10501 •OrcaIl9U.962.2s5S ^41 
Maatercharge and Visa accepted. 
So charge for postage of handling. NY residents add V*. tale* tax 
TRS-JtO is a trademark of the Radio Shack division of'Tandv Corp 



*■ Reader Service — see page 226 



80 Microcomputing, September 1980 • 71 













Program Listing 




"♦OA"* 




00500 


BPRPTR 


EQU 


40A4H ; 


BASIC 


PROGRAM POINTER 


0093 




00600 


REMTOK 


EQU 


93H i 


REMARK 


TOKEN 


0088 




00700 


DATTOK 


EQU 


88H | 


DATA TOKEN 


40F9 




00800 


SCLRPT 


EQU 


40F9H ; 


POINTER TO VARIABLE TABLE (SCALARS) 


0021 




00900 


FORMAT 


EQU 


• •♦! ; 


ASCII 


CONTROL CODE C SPACE, 1 TO 32 DEC. 


01C9 




01000 


CLS 


EQU 


01C9H ; 


CLS ROUTINE IN ROM 


28A7 




01100 


DISSTR 


EQU 


28A7H ; 


DISPLAYS STRING AT HL UNTIL BYTE=0 


OFAF 




01200 


DISNUM 


EQU 


OFAFH ; 


DISPLAYS DECIMAL REPRESENTATION OF NUMBER 






01300 












41E2 




01400 




ORG 


41E2H 






41E2 


C3E641 


01500 
01600 




JP 


AUTO 






(*1E6 




01700 
01800 




ORG 


41E6H 






41E6 


3EC9 


01900 


AUTO 


LD 


A,0C9H 




;' RETURN* COMMAND 


41E8 


32E241 


02000 




LD 


(41E2H),* 




; TO RAM 


41EB 


21CB42 


02100 


DISPR 


LD 


HL, PROMPT 




; POINT TO MESSAGE 


<»1EE 


CDA728 


02200 




CALL 


DISSTR 




jDISPLAY MESSAGE J 


41G1 


CD49Q0 


02300 


SCAN 


CALL 


0049H 




;SCAN UNTIL KEYBOARD INPUT 


41F4 


FE4E 


02400 




CP 


•N' 




;="N" ? 


41F6 


2809 


02500 




JR 


Z, NOREM 




J YES, DELETE REMARKS 


41F8 


FE59 


02600 




CP 


lyl 




}="V 7 


MFA 


20F5 


02700 




JR 


NZ.5CAN 




;NO, UNACCEPTABLE INPUT 


MFC 


3E52 


02800 




LD 


A,REMSAV- 


REMJP- 


2 ;JR OFFSET 


41FE 


324742 


02900 


REMOPT 


LD 


cremjp+i: 


,A 


; MODI FY PROGRAM 


1*201 


CDC901 


03000 


NOREM 


CALL 


CLS 




; CLEAR SCREEN 


4704 


2AA440 


03100 




LD 


HL, (BPRPTR) 


j POINT TO BASIC PROGRAM 


•♦207 


2B 


03200 




DEC 


HL 




1 


4208 


E5 


03300 




PUSH 


HL 




f 


4209 


Dl 


03400 




POP 


DE 




;HL AND DE POINT BEG. PROG. -1 


420A 


AF 


03500 
03600 




XOR 


A 




;SET AS FOR END OF LINE 


420B 


E5 


03700 


TEXT 


PUSH 


HL 




; SET 'TEXT' 


420C 


210B42 


03800 




LD 


HL,TEXT 




; AS 


420F 


E3 


03900 




EX 


CSP),HL 




| RETURN ADDRESS 


4210 


B7 


04000 




OR 


A 




;A = ? 


<*21 1 


2817 


04100 




JR 


Z, ENDLNE 




;YES, END OF LINE 


"♦213 


FE3A 


04200 




CP 


i • t 




;= •:• t 


1*215 


2005 


04300 




JR 


NZ,TEXT1 




;NO, NOT END OF STATEMENT 


«*217 


CD2442 


04400 




CALL 


SAVE 




;SAVE END OF STATEMENT MARKER 


421A 


1822 


04500 




JR 


BEGSMT 




; CHECK FIRST BYTE OF TEXT 


421C 


FE21 


04600 


TEXT1 


CP 


FORMAT 




; SPACE OR LINE FEED ? 


1 421E 


3806 


04700 




JR 


C, NOSAVE 




;YES, DO NOT SAVE 


«»220 


FE22 


04800 




CP 


tn i 




; QUOTE T 


4222 


283F 


04900 
05000 




JR 


Z, QUOTE 




;YES, JUMP TO QUOTE ROUTINE 


4224 


12 


05100 


SAVE 


LD 


CDE),A 




;BYTE TO OBJECT PROGRAM 


4225 


13 


05200 




INC 


DE 




J INC. OBJ. PROG. POINTER 


4226 


23 


05300 


NOSAVE 


INC 


HL 




;INC. SOURCE PROG. POINTER 


4227 


7E 


05400 




LD 


A,(HL) 




; SOURCE BYTE TO A 


4228 


B7 


05500 




OR 


A 




;RETURNS Z FLAG IF END OF LINE 


4229 


C9 


05600 
05700 




RET 






; RETURN 


422A 


E5 


05800 


ENDLNE 


PUSH 


HL 




;END 


422B 


23 


05900 




INC 


HL 




; of 


422C 


7E 


06000 




LD 


A,CHL) 




; BASIC 


422D 


23 


06100 




INC 


HL 




; LINE 


422E 


B6 


06200 




OR 


(HL) 




; ? 


422F 


El 


06300 


NOTEND 


POP 


ML 




;. FIVE BYTES 


4230 


010500 


06400 




LD 


BC,05 




;. TO 


"♦233 


EDBO 


06500 




LDIR 






j. OBJECT PROGRAM 


4235 


281A 


06600 




JR 


Z, EXITSP 




;END OF PROGRAM, EXIT 


4237 


D5 


06700 




PUSH 


DE 




;SAVE ADDRESS OF 


"♦238 


DDE1 


06800 




POP 


IX 




; OBJECT PROG. TEXT 


423A 


2B 


06900 




DEC 


HL 




; FUDGE FACTOR 


423B 


CD2642 


07000 


FIRST 


CALL 


NOSAVE 




;INC SOURCE PROGRAM POINTER 


423F 


2849 


07100 


BEGSMT 


JR 


Z,REMDEL 




;NO TEXT, DELETE LINE 


4240 


FE3A 


07200 




CP 


i . i 




;= •:• ? 


4242 


28F7 


07300 




JR 


Z, FIRST 




;YES, DO NOT SAVE 


4244 


FE93 


07400 




CP 


REMTOK 




;IS IT A REMARK ? 


4246 


2841 


07500 


REMJP 


JR 


Z,REMDEL 




;YES, JUMP TO REMARK PROCESSING 
ROUTINE 


4248 


FE21 


07600 




CP 


FORMAT 




; SPACE OR LINE FEED 7 


424A 


38EF 


07700 




JR 


C, FIRST 




;YES, DO NOT SAVE IN OBJ. PROGRAM 1 


424C 


FE88 


07800 




CP 


DATTOK 




;DATA STATEMENT ? 


424E 


2859 


07900 




JR 


Z,DATA 




;YES, JUMP TO PROCESSING ROUTINE 


4250 


C9 


08000 
08100 




RET 






;RETURN 


4251 


IB 


08200 


EXITSP 


DEC 


DE 




; POINT DE TO NEW 


4252 


IB 


08300 




DEC 


DE 




; VARIABLE (SCALAR) POINTER 


4253 


D5 


08400 




PUSH 


DE 




;SAVE ADDRESS OF NEW SCLRPTR 


*«25«* 


2AF940 


08500 




LD 


HL,CSCLRPT) 


;OLD POINTER TO HL 


4257 


ED52 


08600 




SBC 


HL,DE 




;COMPUTE DIFFERENCE 


"♦259 


COAFOF 


08700 




CALL 


DISNUM 




;DISPLAY NUMBER 


425C 


COFE20 


08800 




CALL 


20FEH 




;CURSOR TO NEXT LINE 


425F 


El 


08900 




POP 


HL 




; NEW POINTER TO HL 


4260 


C3772C 


09000 
09100 




JP 


2C77H 




; INITIALIZE FOR BASIC 


426J 


CD2442 


09200 


QUOTE 


CALL 


SAVE 




;SAVE COPENING "" ON ENTRY) 


4266 


C8 


09300 




RET 


Z 




;RETURN IF END OF LINE 


4267 


FE22 


09400 




CP 


in i 




; CLOSING »"•? 


4269 


20F8 


09500 




JR 


NZ, QUOTE 




;NO, SAVE BYTE 1 


426B 


C32442 


09600 




JP 


SAVE 




;SAVE CLOSING "" | 
Program continues 



printed by routines in BASIC 
ROM, these are recognized as 
control codes and the appropri- 
ate function is performed. 

The first six bytes of the 
prompt would be duplicated in 
BASIC by: 



PRINT CHR$(28);CHR$(31);: 

PRINT CHR$(13);CHR$(13)iCHR$(13);: 

(or PRINT:PRINT:PRINT) 
PRINT TAB(16); 



The ASCII control codes are 
described on page C/1 of the 
TRS-80 Level II Manual. 

Auto Execute 

After the tape has been load- 
ed, control goes directly to the 
program. The system command 
calls 42E2. BASIC initializes this 
as a RET. Using a new ORG, the 
system tape changes this to a 
jump to assembler routine 
AUTO. AUTO restores the return 
command so that system will 
not attempt a disasterous jump 
to this program the next time it 
is invoked. 

For those interested in under- 
standing the program in more 
depth, the assembler listing is 
commented and, in addition to 
the usual flow charts, an "organ- 
ization" chart has been pro- 
vided. 

The program uses a number 
of routines in BASIC ROM. For 
the purposes of this article, they 
are treated as "black boxes." 
However, by reading the com- 
ments and seeing how they have 
been used their function and ap- 
plication may be understood. 

T-BUG and Space 

Although the assembler list- 
ing uses multiple origins and the 



«M41E2C9C3 


41 E3 00 E6 


41E4 00 41 


41 E5 3A 3A 


41 E6 B3 3E 


41 E7 48 C9 


41E8 00 32 


41 E9 19 E2 


41 EA 80 41 


41EB44 21 


41ECC3CB 


41 ED 63 42 


! 41 EE OB ETC 


Example 4. 



72 • 80 Microcomputina. September 1980 



t J UTILITIES — RACET computet - RACET SORTS - RACET UTILITIES - RACET computes - RACET SORTS - RACET UTILITIES 

8 THE LEADER IN UTILITY SOFTWARE FOR TRS * COMPUTERS 

" INFINITE BASIC $49.95 (Mod I Tape or Disk) § 

«» Extends Level II BASIC with complete MATRIX functions and 50 more string functions. § 

§ Includes RACET machine language sorts! Sort 1000 elements in 9 seconds!! Select only functions 1 

J2 you want to optimize memory usage. ~ 

| INFINITE BUSINESS $29.95 (Requires Infinite BASIC) I 

" Complete printer pagination controls - auto headers, footers, page numbers. Packed decimal 2 

• arithmetic - 127 digit accuracy + , -,*,/. Binary search of sorted and unsorted arrays. Hash codes. « 

1 REMODEL + PROLOAD $34.95 (Mod I Tape or Disk -Specify Memory Size) § 

2 The cadillac of renumbering programs! Renumber all or any part of program (partial renumbering " 

1 in middle of program) Move any block of lines to new locations. Partial or complete tape merges • J 

< with renumbering on the way in! Save partial programs (common subroutines or data) to tape! £ 

i COPSYS $14.95 (Mod I Tape only) 5 

| Copy and verify your machine language (SYSTEM) tapes written in standard format. If you buy a ', 

j machine language program, you deserve to be able to make a backup! ™ 

| TIMSER $14.95 (Mod I Tape or Disk) • 

§ Time Series Analysis (regression analysis). Nine different 1st, 2nd, & 3rd order curve fits. Screen * 

2 curve and variance plots. Projections, R-squared, Durbin Watson, correction factors and functions. J 
w Powerful business forecasting tool! | 

I MDA $109.00 (Mod 1 16K1-disk minimum) I 

t Mini-Disk Alignment Program. This program and a dual trace scope allows complete disk drive * 

« alignment on Shugart, Pertec, MPI, and Wanco (Seimens) disk drives. Includes alignment diskette! » 

" COMPROC $19.95 (Mod I -Disk only) S 

5 Command Processor. Auto your disk to perform any sequence of instructions that you can give « 

I from the keyboard. DIR. FREE, pause, wait for user input, BASIC, No. of FILES and MEM SIZE, 3 

I RUN program, respond to input statements, BREAK, return to DOS, etc. Includes lowercase driver ? 

t software, debounce and screenprint! » 

< GSF $24.95 Mod I, $50.00 Mod II. (Mod I Tape or Disk - Specify Memory Size) § 
Generalized Subroutine Facilities. The STANDARD against which all other sorts are compared! 5 

3 Machine language - fast and powerful! Multi-key multi-variable and multi-key character string. Zero c 
= and move arrays. Mod II includes USR PEEKS and POKES. Includes sample programs. S 

«? DOSORT $34.95 (Mod I Min 32K2-drive system. Specify Memory Size) » 

Sequential file disk sort merge. Includes GSF. > 

"> m 

£ DSM $75.00 Mod I, $150.00 Mod II. (Mod I Min 32K 2-drive system. Mod II 64K 1-drive) ? 

< Disk Sort/Merge for RANDOM files. All machine language stand-alone package for sorting speed. I 
Establish sort specification in simple BASIC command File. Execute from DOS. Only operator I 

. action to sort is to change diskettes when requested! Handles multiple diskette files! Super fast " 

1 sort times - improved disk I/O times make this the fastest Disk Sort/Merge available on Mod I or Mod II. » 

I UTILITY PACKAGE $150.00 (Mod II 64K) § 

k Important enhancements to the Mod II. The file recovery capabilities alone will pay for the package g 

£ in even one application! Fully documented in 124 page manual! XHIT, XGAT, XCOPY and SUPERZAP 3 

I are used to reconstruct or recover data from bad diskettes! XCOPY provides multi-file copies, " 

<2 'wild-card' mask select, absolute sector mode and other features. SUPERZAP allows examine/change * 

E any sector on diskette include track-0, and absolute disk backup/copy with I/O recovery. DCS builds £ 

I consolidated directories from multiple diskettes into a single display or listing sorted by disk name c 

h or file name plus more. Change Disk ID with DISKID. XCREATE preallocates files and sets 'LOF' f 

^ to end to speed disk accesses. DEBUGII adds single step, trace, subroutine calling, program looping, =■ 

■ dynamic disassembly and more!! * 

£ BASIC CROSS REFERENCE UTILITY $50.00 (Mod II 64K) J 

SEEK and FIND functions for Variables, Line Numbers, Strings, Keywords. 'AH' options available m 
k for line numbers and variables. Load from BASIC - Call with 'CTRL'R. Output to screen or printer! g 

< DEVELOPMENT PACKAGE $125.00 (Mod II 64K) | 

i Includes RACET machine language SUPERZAP, Apparat Disassembler, and Model II interface to $ 

5 the Microsoft 'Editor Assembler Plus' software package including uploading services and patches ^ 

1 for Disk I/O. Purchase price includes complete copy of Editor Assembler + and documentation for & 

1 Mod I Assemble directly into memory, MACRO facility, save all or portions of source to disk, dynamic 2 
^ debug facility (ZBUG). extended editor commands. 8 

< PREMIUM QUALITY RACET C-20 CASSETTES $14.95 for 10, $119.95 for 100 | 

i The same specially formulated tape we use for distributing our machine language software. Broad • 

2 range for better transfer from machine to machine. Also check our special prices on 5V* and 8" £ 

t diskettes!!! DEALER INQUIRIES INVITED *TRS 80 isa registered irademark or CHECK. VIS*. M/C. C D , PURCHASE ORDER S 

— Tandy Corporation Tilipltom Oifliti Acctpltd 1 7 14) 637 5016 ~* 

3 RACET SORTS - RACET UTILITIES - RACET computet - RACET SORTS - RACET UTILITIES - RACET computes - RACET SORTS - RACET UTILITIES - RACET SORTS 
^■Reader Service-see page 226 80 Microcomputing, September 1980 • 73 







09700 














09800 /NEW 


ORG IF LOADED INTO 


BUFFER AREA 






09900 /SYSTEM COMMAND 


USES 4287 TO 


426E FOR STACK 






10000 /ON 


ENTRY TO 'SYSTEM', 


5P SET 


TO 4288 






10100 










4289 




10200 
10300 


ORG 


4289H 






4289 


DDES 


10400 REMDEL PUSH 


IX 




;IX TO HL 


428B 


E3 


10500 


EX 


CSP),HL 




; HL TO STACK 


428C 


OF 


10600 


RST 


18H 




;HL = DE ? 


428D 


El 


10700 


POP 


HL 




/ RESTORE HL 


428E 


IB 


10800 


DEC 


DE 




/DEC OBJ PROG POINTER 


428F 


2004 


10900 


JR 


NZ,REM1 




/REM IS NOT AT BEGINNING OF LINE 


4291 


IB 


11000 


DEC 


DE 




/REM IS AT BEGINNING OF LINE 


4292 


IB 


11100 


DEC 


DE 




/ DEC OBJECT PROG- POINTER 


4293 


IB 


11200 


DEC 


DE 




; TO END OF 


4294 


IB 


11300 


DEC 


DE 




; PREVIOUS LINE 


4295 


AF 


11400 REM1 


XOR 


A 




/COMPARISON BYTE FOR SEARCH 


4296 


EDB1 


11500 


CPIR 






/SEARCH 


4298 


2B 


11600 


DEC 


HL 




/POINT TO END OF LINE 


4299 


C9 


11700 
11800 


RET 






/RETURN 


429A 


23 


11900 REMSAV INC 


HL 




/WHICH 


429B 


7E 


12000 


LD 


A,(HL> 




/ FORM 


429C 


2B 


12100 


DEC 


HL 




/ OF 


4290 


FEFB 


12200 


CP 


OFBH 




; REMARK ? 


429F 


2001 


12300 


JR 


NZ, REMSAO 


/SIMPLE 'REM', NOT " ' " 


42A1 


2B 


12400 


DEC 


HL 




/POINT TO PRECEEDING ':' 


42A2 


7E 


12500 REMSAO LD 


A,CHL) 




/BYTE TO A 


42A3 


C02442 


12600 


CALL 


SAVE 




/SAVE UNTIL 


42A6 


20FA 


12700 


JR 


NZ, REMSAO 


/ END OF LINE 


42A8 


ci 


12800 
12900 


RET 






/RETURN 


42A9 


062C 


13000 DATA 


LD 


•#V 




/SET FOR "OK TO DELETE FORMAT" 


42AB 


CD2442 


13100 DATAl CALL 


SAVE 




/SAVE DATA TOKEN 


42AE 


CI 


13200 DATA2 RET 


Z 




/END OF LINE 


42AF 


FE22 


13300 


CP 


in i 




is"" 


42B1 


CC6342 


13400 


CALL 


Z, QUOTE 




/YES, PROCESS QUOTE 


42B4 


B7 


13500 


OR 


A 




/END OF LINE ? 


42B5 


C8 


13600 


RET 


Z 




/YES, RETURN 


42B6 


FE3A 


13700 


CP 


' : • 




/END OF STATEMENT 7 


42B8 


C8 


13800 


RET 


Z 




/YES, RETURN 


42B9 


FE21 


13900 


CP 


FORMAT 




/SPACE OR LINE FEED 1 


42BB 


300B 


14000 


JR 


NC,DATA4 


/NO, SAVE BYTE 


42B0 


78 


14100 


LD 


A/B 




/PREVIOUS OBJECT 


42BE 


FE2C 


14200 


CP 


• i 




/ BYTE A •,• ? 


42C0 


2005 


14300 


JR 


NZ, DATAJ 


/NO, SAVE BYTE 


42C2 


CC2642 


14400 


CALL 


Z, NOSAVE 


/YES, OK TO DELETE 


42C5 


18E7 


14500 


JR 


OATA2 




/NEXT DATA BYTE 


42C7 


7E 


14600 0ATA3 LD 


A,(HL) 




/RESTORE CURRENT BYTE 


42C8 


47 


14700 DATA4 LD 


B,A 




/SAVE FOR COMPARISON 


42C9 


18E0 


14800 
14900 


JR 


DATAl 




/NEXT BYTE 


42CB 


1C 


15000 PROMPT OEFB 


28 




/HOME CURSOR 


42CC 


IF 


15100 


DEFB 


31 




/CLEAR TO END OF FRAME 


4 2 CD 


OD 


15200 


OEFB 


13 




/CURSOR TO NEXT LINE 


42CE 


OD 


15300 


DEFB 


13 






42CF 


OD 


15400 


DEFB 


13 






4200 


DO 


15500 


DEFB 


208 




/TAB<16) 


42D1 


53 


15600 


DEFM 


•SAVE REMARKS 


Y/N ?• 


42E4 


00 


15700 
15800 


DEFB 







/END OF MESSAGE MARKER 


0000 




15900 

AUTO 

BECSMT 

BPRPTR 

CLS 

DATA 

DATAl 

DATA 2 

DATAJ 

DATA4 

DATTOK 

DISNUM 

DISPR 

DISSTR 

ENDLNE 

EXITSP 


END 

41E6 01500 
423D 06600 
40A4 00600 
01C9 01100 
42A9 12500 
42AB 12600 
42AE 12700 
42C7 14100 
42C8 14200 
0088 00800 
OFAF 01300 
41EB 01700 
28A7 01200 
422A 05400 
4250 07700 


00200 
04100 
02700 
02600 
07400 
14300 
14000 
13800 
13500 
07300 
08200 

01800 
03700 
06100 










FIRST 


423A 06500 


06800 


07200 








FORMAT 


0021 01000 


04200 


07100 


13400 






NOR EM 


4201 02600 


02100 










NOSAVE 


4226 04900 


04300 


06500 


13900 






NOTEND 


422E 05800 












PROMPT 


42CB 14500 


01700 










QUOTE 


4262 08700 


04500 


09000 


12900 






REM1 


4295 10900 


10400 










REMDEL 


4289 09900 


06600 


07000 








REMJP 


4245 07000 


02400 


02500 








REMOPT 


41FE 02500 












REMSAO 


42A2 12000 


11800 


12200 








REMSAV 


429A 11400 


02400 










REMTOK 


0093 00700 


06900 










SAVE 


4224 04700 


04000 


08700 


09100 12100 12600 






SCAN 


41F1 01900 


02300 










SCLRPT 


40F9 00900 


08000 










TEXT 
TEXT1 


4208 03300 
421C 04200 


03400 
03900 







program lies in noncontiguous 
memory, it may be entered by 
T-BUG or another monitor pro- 
gram. 

At the time when the byte 
read from the tape is written into 
RAM, the stack is at its highest 
position, and therefore no dam- 
age will be done. Bytes will be 
loaded into the stack area, but 
will immediately be overwritten 
by the stack operations of the 
system load. 

The assembler does not print 
out the ASCII values for DEFM 
commands. These values are 
given in Example 3. 

After the program has been 
entered, punch a tape with P 
41E2 42E4 OOOO SPACE (enter). 
Any value may be entered for the 
entry point as it is never used. 

If all of this is still a little new 
to you, compare Example 4 with 
the assembler listing. This will 
show how the two relate and 
how to enter the listing with 
T-BUG. 

Be careful that 41 E5 is not 
changed. The column on the 
right is the program from the as- 
sembler listing. The column in 
the middle is whatever was in 
the input buffer. 

Disk BASIC and Space 

This program is intended pri- 
marily for the Level II user. It is, 
however, currently being used 
with a recently acquired disk op- 
erating system with no notice- 
able ill effects. 

However, 41 E6 to 42E7 is no 
longer the input buffer area. I 
have no idea what it becomes. 
The buffer may be found by look- 
ing in 40A7 and 40A8. These two 
bytes hold the address of the in- 
put buffer. 

Three bytes of RAM will be 
changed. In Level II, 41 E2 is a 
RET (c9). In NEWDOS. it is a 
jump to another address which 
is a RET. Changing 41 E2 to RET, 
obviously, performs the same 
function from a different ad- 
dress. This change has yet to 
cause trouble. 

With an input buffer, an over- 
lay area and a number of disk in- 
put buffers to play with, other 
areas of RAM could be called in- 
to use for this utility; and, the 
auto execute feature could be 
removed. ■ 



74 • 80 Microcomputing, September 1980 



RS-SO intprfctci 
alternatives... 

Featuring the Quality Engineering and 
Manufacturing of THE MICRO MINT 




FULL 8-BIT PARALLEL PORT 

RS-232-C SERIAL PORT (up to 19,200 baud) 

UP TO 16 UNITS CAN BE CHAINED TOGETHER 

TRS-BUS CONNECTOR FOR FUTURE EXPANSION 

CONNECTS TO KEYBOARD OR E.I. 

INCLUDES TERMINAL SOFTWARE 

ONLY $179.95 



HATTER BOX 



FULL 8-BIT PARALLEL PORT 

RS-232-C SERIAL PORT (up to 19,200 baud) 

ACOUSTIC MODEM - 300 BAUD 

TRS-BUS CONNECTOR FOR FUTURE EXPANSION 

CONNECTS TO KEYBOARD OR E.I. 

CAN BE CHAINED TOGETHER WITH COMM-80 

INCLUDES TERMINAL SOFTWARE 

ONLY $259.95 

• DISK CONTROLLER (up to 4 drives) 

• DATA SEPARATOR INCLUDED 

• INCLUDES 16K OF RAM 

• PROVISION FOR AN ADDITIONAL 16K RAM 

• TRS-BUS CONNECTOR FOR FUTURE EXPANSION 
ONLY $299.95 



BUSY BOX 



ALLOWS TRS-80 TO CONTROL AC APPLIANCES 
CABLE AND CONNECTOR FOR TRS-80 KEYBOARD OR E. 
WORKS WITH THE POPULAR BSR X-10 SYSTEM 
INCLUDES BASIC LISTING FOR CONTROL ROUTINE 
LEVEL II MINIMUM SYSTEM 
ONLY $109.95 



ALL INTERFACES ARE RADIO SHACK HARDWARE AND SOFTWARE COMPATIBLE. 



MAIL ORDER OR INFORMATION 
WRITE OR CALL: (516) 374-6793 

The MicroMmt Inc. 
917 Midway 
Woodmere. NY 11598 
Dealer inquiries invited. 



CALLOUR QUICK 
TOLL FREE NUMBER: 

1-800-258-1790 

•TRS 80 is • trademark of Tandy Corp 



9o*der Service— see page 226 



80 Microcomputing, September 1980 • 75 



UTILITY 



Single stroke entry of BASIC keywords. 



Uni-key 



Rowland Archer Jr. 
Flint Ridge Apt. 59 
Hillsborough, NC 27278 



One night while I was trying 
to massage some life into 
my tired fingers after a couple of 
hours at the keyboard, it oc- 
curred to me that typing pro- 
grams is the sort of drudgery a 



computer is supposed to take 
out of life, not put into it. Typing 
a BASIC program repeats many 
of the same BASIC keywords 
over and over again. 

To pass some of this work off 
on the TRS-80, 1 needed a way to 
let it know which keyword I 
wanted with a single-key abbre- 
viation. Using computerized 
keywords would also cut down 
on syntax errors and tedious 
editing. 



Input 


ASCII Value 


Output 


Special characters 


0-25 


Same as input 


SHIFT/Down Arrow 


26 


Substitute user-defined 
string (up to 64 chars) 


Special characters 


27-30 


Same as input 


SHIFT/CLEAR 


31 & Shift* 


None (Start/end user strin 
definition) 


Special characters 


32-64 


Same as input 


and numbers 






Uppercase letters 


65-90 


Same as input 


Special characters 


91-96 


Same as input 


Lowercase letters 


97-122 


Substitute a BASIC 
keyword 


Special characters 


123-127 


Same as input 



'Since the keyboard driver returns 31 for both SHIFT/CLEAR and CLEAR, we 
must test for the Shift key separately. 

Table 1. Function of keyboard filter routine. 



Input ASCII Value Output 

Special characters 0-25 Same as input 

Shift-Down Arrow 26 Substitute user-defined 

string (up to 64 chars) 
Special characters 27-30 Same as input 

Shift-Clear 31 & Shift* None (Start/end user string 

definition) 
Same as input 



Special characters 32-64 



RAM Size 
16K 

32 K 
48K 



ORG of Program 
7E58H 
BE58H 
FE58H 



Answer MEMORY SIZE? 
32361 
48745 
65129 



Table 2. Origin of program and MEMORY SIZE for different 
RAM sizes. 



Lowercase ASCII Code 

Even though BASIC is upper- 
case only on the TRS-80, the 
keyboard will generate lower- 
case ASCII character codes. Try 
this short BASIC program and 
see what happens: 

10 CLS: 

20 AS-"" 

30 A$ =. INKEYS: IF A$ = "" THEN GOTO 30 

40 PRINT®0.ASC(AS);: GOTO 20 

Run the program and press 
any alphabetic key, say "A." The 
ASCII code for uppercase A, 65, 
should appear on the screen. 
Now press SHIFT A; the code 
printed should be 97, which is 
lowercase a. 

To get lowercase letters on a 
TRS-80, you press the SHIFT 
key. Although it may seem back- 
wards to shift for lowercase, 
would you rather have to shift 
for uppercase? You would have 
to hold down the SHIFT key to 
enter every BASIC keyword. A 
SHIFT-lock key would get 
around this problem, but ap- 
parently Radio Shack didn't feel 
the need for one. This article, 
however, will relate a software 
fix. 

A routine, which examines 
every pressed key before the 
character value is returned to 
the BASIC interpreter program, 
is necessary. When the TRS-80 
appears to be doing nothing, it 
is actually reading the keyboard 
over and over, waiting for a key 
to be pressed. 

Assuming it is possible to 
intercept characters from the 
keyboard and look them over 
before they reach BASIC; then it 



is possible to decide whether to 
send the character on to BASIC 
as is, send back some other 
character instead, or even send 
BASIC a stream of two or more 
characters in its place. 

To accomplish this, it is nec- 
essary to install a filter between 
the keyboard and the BASIC 
Interpreter. This would be a 
device whose action filters input 
data streams to produce output 
data. 

We need a filter which trans- 
lates some input characters to 
BASIC keywords, and leaves 
others alone. If the character we 
intercept from the keyboard is 
an uppercase letter, a number or 
a special symbol (@,<, +,etc), 
our program should pass the 
character on to the caller un- 
changed. 

However, if it is a lowercase 
letter (a-z), which is transmitted 
when the user hits the SHIFT 
key and a letter, the filter should 



SHIFT for Keywords: 


A PRINT® 


N 


NEXT 


B ELSE 


O 


POKE 


C CHR$< 


P 


PEEK( 


D DATA 


G 


LEFTK 


E RIGHT* 


R 


RETURN 


F FOR 


S 


GOSUB 


G GOTO 


T 


TAB) 


H RND( 


U 


USING 


I INPUT" 


V 


STRINGS) 


J READ 


W 


MIDS: 


K INKEYS 


X 


SET( 


L LEN( 


Y 


THEN 


M ASC( 


Z 


RESET( 


CLEAR— START/END Definition 


Down Arrow- 


-User String 


Table 3. Reference chart 


to tape on 


your monitor. 



76 • 80 Microcomputing, September 1980 



Scanned by Ira Goldklang - www.trs-80.com 











Program Listing 






00010 


ONESTR - ONE 


STROKE KEYWORD ENTRY PROGRAM. INTERCEPTS 






00020 




LOWER- 


CASE CHARACTERS AND REPLACES THEM WITH 






00030 




KEYWORD STRINGS. ALSO ALLOWS THE USER TO ASSIGN A 






00040 




STRING OF UP TO 64 BYTES TO 'SHIFT-DOWN ARROW'. 






00050 




DEFINITION OF THIS STRING IS INITIATED AND 






00060 




TERMINATED BY 'SHIFT-CLEAR'. 






00070 












00080 




REV 2 


2 2/9/79 






00090 












00100 




BY ROWLAND ARCHER 






00110 




FLINT RIDGE 59 






00120 




HILLSBOROUGH, NC 27278 






00130 








4016 




00140 KEYDRV 


EQU 


4016H .-ADDRESS IN KEYBOARD DCB 






00150 






; OF DRIVER ROUTINE 


3880 




00160 
00170 


SHIFT 


EQU 


3880H ;(3880H) IS 1 IF 'SHIFT' 
; KEY IS PRESSED 


033A 




00180 


PUTC 


EQU 


033AH .-PUT CHAR IN A ON SCREEN 


00CD 




00190 


2ALL 


EQU 


0CDH .-'CALL' OPCODE VALUE 


001F 




00200 


DEFKEY 


EQU 


31 ; 'SHIFT-CLEAR' KEY 


001A 




00210 
00220 


JDSKEY 


EQU 


26 ; 'RETURN USER-DEF STRING 1 
; KEY ■ 'SHIFT-DOWN ARROW' 


0040 




00230 
00240 


JSTLEN 


EQU 


64 ; USER-DEFINED STRING LENGTH 






00250 


THE FOLLOWING INITIALIZATION CODE IS PERFORMED ONLY 






00260 


•WHEN THIS ROUTINE IS LOADED AND RUN THE FIRST TIME. 






00270 








7E58 




00280 




ORG 


07E58H ;ORG FOR 16K SYSTEM 


7E58 


2A1640 


00290 


INIT 


LD 


HL, (KEYDRV) .-GET ADDR OF KEYBRD DRIVER 


7E5B 


224E7F 


00300 




LD 


(KEYDRl).HL ; ROUTINE AND BUILD TWO 


7E5E 


22B07F 


00310 
00320 




LD 


(KEYDR2),HL ; CALL INSTRUCTIONS IN 
; THIS CODE WITH IT 


7E61 


21477F 


00330 




LD 


HL, ONESTR ; NOW PUT THE ADDRESS OF THE 


7E64 


221640 


00340 
00350 




LD 


(KEYDRV) ,HL ; ENTRY PT TO THIS ROUTINE 
; INTO THE KEYBOARD DCB 






00360 


•ft******************************************************* 






00370 


;YOU MUST CHOOSE ONLY ONE OF THE FOLLOWING TWO JUMP 






00380 


; INSTRUCTIONS 


TO EXIT THIS INITIALIZATION CODE. 






00390 


;IF YOU 


ARE GOING TO LOAD THIS PROGRAM FROM DISK WHILE 






00400 


;IN DOS 


, USE 








00410 


; 


JP 


402DH ; TO RETURN TO DOS 






00420 


;IF YOU 


ARE GOING TO LOAD FROM TAPE WHILE IN BASIC. USE 


7E67 


C3191A 


00430 




JP 


1A19H ; TO RETURN TO BASIC 






00440 


. ******************************************************** 






00450 


; 










00460 


; ABOVE 


CODE 


IS ONLY USED ONCE AND CAN BE OVERWRITTEN 






00470 


; AFTER 


IT RUNS - SO 'MEMORY SIZE?' PROTECTIONS STARTS 






00480 


; WITH 


THE FOLLOWING DATA STRUCTURES: 






00490 


; 






7E6A 


52 


00500 


USTR 


DEFM 


'RUN' ;USER STRING; INITIALLY 


7E6D 


0D 


00510 




DEFB 


0DH ; 'RUN <ENTER>' 


7E6E 


00 


00520 




DEFB 


;END OF STRING 


0005 




00530 


USED 


EQU 


$-USTR .'SIZE OF PREDEFINED STRING 


003B 




00540 
00550 


REST 


DEFS 


USTLEN-USED ; ALLOCATE SPACE FOR REST 
; OF USER-DEFINED STRING 


7EAA 


00 


00560 




DEFB 


; FORCE END OF STRING 


7EAB 


00 


00570 
00580 
00590 


OSFLAG 


DEFB 


; ONE-STROKE FLAG: = 1 WHILE 
; WE ARE SUBSTITUTING FOR A 
; LOWER-CASE CHARACTER 


7EAC 


0000 


00600 
00610 
00620 


DSPTR 


DEFW 


; ADDRESS OF CURRENT CHAR 
; IN SUBSTITUTE STRING 






00630 


; TABLE 


OF STRINGS TO SUBSTITUTE FOR LOWER-CASE CHARS. 






00640 


; STRINGS ARE 


I-ERMINATED BY NULL (0) BYTES. STRING 






00650 


.•LABELLED 'LA 


' IS SUBSTITUTED FOR 'SHIFT-A* , 'LB' 






00660 


;FOR 'SHIFT-B 


' , ETC. EXCEPT FOR 'LA', LABELS 






00670 


;ARE NOT REQUIRED, AND ARE ONLY INCLUDED FOR EASE IN 






00680 


.•DETERMINING 


rHE STRING TO BE SUBSTITUTED FOR EACH LETTER. 






006 90 


1 






7EAE 


50 


00700 


LA 


DEFM 


'PRINT?' 


7EB4 


00 


00710 




DEFB 


.-ZERO BYTE END OF STRING 


7EB5 


45 


00720 


LB 


DEFM 


• ELSE ' 


7EB9 


00 


00730 




DEFB 





7EBA 


43 


007 40 


LC 


DEFM 


•CBRSC 


7EBF 


00 


00750 




DEFB 





7EC0 


44 


00760 


LD 


DEFM 


' DATA ' 


7EC4 


00 


00770 




DEFB 





7EC5 


52 


007 80 


LE 


DEFM 


'RIGHT$(' 


7ECC 


00 


007 90 




DEFB 





7ECD 


46 


00800 


LF 


DEFM 


•FOR' 


7ED0 


00 


00810 




DEFB 





7 EDI 


47 


00820 


LG 


DEFM 


'GOTO' 


7ED5 


00 


00830 




DEFB 





7ED6 


52 


00840 


LH 


DEFM 


'RND(' 


7 EDA 


00 


00850 




DEFB 





7EDB 


49 


00860 


LI 


DEFM 


'INPUT"' 


7EE1 


00 


00870 




DEFB 





7EE2 


52 


00880 


LJ 


DEFM 


'READ' 


7EE6 


00 


00890 




DEFB 


Program continues 



replace that letter in the input 
stream with a BASIC keyword. 

To do this, when a lowercase 
letter is read from the keyboard 
set a substitution flag in the rou- 
tine, indicating that keyword 
substitution has begun. Use the 
ASCII value of the letter as an in- 
dex to a table of BASIC key- 
words. Pass BASIC the first let- 
ter of the indexed keyword in- 
stead of the lowercase letter 
read from the keyboard. 

When BASIC calls for input 
from the keyboard again, the 
routine will note that the 
substitution flag is set and will 
send back the next character of 
the keyword, without bothering 
to look at the keyboard to see if 
any keys are pressed. This con- 
tinues until the entire keyword is 
sent. Then the flag is reset to 
normal operation until the next 
lowercase letter code is re- 
ceived. All this happens so 
quickly that the keyword seems 
to appear on the screen the in- 
stant the key is pressed. 

Note that only 26 keywords 
can be handled with this meth- 
od. However, it is possible to 
select a group of keywords 
which are either frequently 
used, difficult to type or both. 
You can experiment by includ- 
ing different keywords until you 
find the best subset for your 
needs. I have found the set of 26 
chosen here to be very useful. 

Intercepting Input 

Since the routine will be used 
while editing BASIC programs, 
the easiest approach is to write 
an assembly language routine 
to look at characters before the 
BASIC editor scans them. 

Take a iook at the memory 
map in the back of your Level II 
BASIC manual. At location 
4015H (hexadecimal) in the 
BASIC Reserved RAM area, 
there is a device control block 
for the keyboard. 

Location 401 6H is initialized 
by BASIC with the address of 
the keyboard driver routine. A 
call to this routine returns with 
in the A register if no key is 
pressed, or the ASCII value of 
the key if one is pressed (like an 
assembly language INKEYS 
routine). 

Load the routine into high 



80 Microcomputing, September 1980 • 77 











memory, where it can be pro- 


7EE7 49 


00900 LK 


DEFM 


•INKEY$' 


tected from BASIC by answer- 


7EED 00 
7EEE 4C 


00910 
00920 LL 


DEFB 
DEFM 




'LENC 


ing the MEMORY SIZE? prompt 


7EF2 00 


00930 


DEFB 





appropriately on startup. When 


7EF3 41 
7EF7 00 


00940 LM 
00950 


DEFM 
DEFB 


•ASCC 



it is first run, it will grab the ad- 


7EF8 4E 


00960 LN 


DEFM 


'NEXT' 


dress of the keyboard driver rou- 


7EFC 00 


00970 


DEFB 





tine from location 4016H and 


7EFD 50 


00980 LO 


DEFM 


'POKE' 




7F01 00 


00990 


DEFB 





save It for later use. It then 


7F02 50 


01000 LP 


DEFM 


'PEEKC 


stores the address of its own en- 


7F07 00 
7F08 4C 


01010 
01020 LQ 


DEFB 
DEFM 




1 LEFT$ ( ' 


try point at 4016H, so that every 


7F0E 00 


01030 


DEFB 





routine (in ROM or elsewhere) 


7F0F 52 
7F15 00 


01040 LR 
01050 


DEFM 
DEFB 


* RETURN ' 



which used to call the keyboard 


7F16 47 


01060 LS 


DEFM 


1 GOSUB ' 


driver directly will now call this 


7F1B 00 
7F1C 54 


01070 
01080 LT 


DEFB 
DEFM 




' TAB < ' 


routine instead. 


7F20 00 


01090 


DEFB 





The normal keyboard driver is 


7F21 55 


01100 LU 


DEFM 


'USING' 


called as a subroutine to read 


7F26 00 


01110 


DEFB 







7F27 53 


01120 LV 


DEFM 


' STRINGS (' 


from the keyboard. If no key is 


7F2F 00 


01130 


DEFB 





pressed, the subroutine will 


7F30 4D 
7F35 00 


01140 LW 
01150 


DEFM 
DEFB 


•MID$C 



return a zero to the accumulator 


7F36 53 


01160 LX 


DEFM 


'SETC 


(register A); in this case we re- 


7F3A 00 
7F3B 54 


01170 
01180 LY 


DEFB 
DEFM 



'THEN* 


turn to the caller without chang- 


7F3F 00 


01190 


DEFB 





ing a thing. 


7F40 52 


01200 LZ 


DEFM 


' RESET (' 




7F46 00 


01210 


DEFB 









01220 ; 

01230 ;MAIN ROUTINE 

01240 ; 


ENTRY POINT: 








7F47 3AAB7E 


01250 ONESTR 


LD 


A, (OSFLAG) 


IF FLAGO0 WE ARE IN THE 


7F4A B7 


01260 


OR 


A 


MIDDLE OF A SUBSTITUTION 


7F4B 2038 


01270 
01280 ; 


JR 


NZ,SUBST 


CONTINUE SUBSTITUTION 




01290 ;CALL NORMAL 


ROUTINE TO GET CHARACTER FROM KEYBOARD 




01300 ; 








7F4D CD 


01310 


DEFB 


CALL 


', BECOMES 'CALL GET-CHAR' 


7F4E 0000 


01320 KEYDRl 

01330 

01340 


DEFW 





; WHEN INITIALIZATION CODE 
; PUTS ADDRESS OF KEYBOARD 
; DRIVER ROUTINE HERE 


7F50 B7 


01350 


OR 


A 


.•CHARACTER RETURNED IN A 


7F51 C8 


01360 
01370 
01380 ; 


RET 


Z 


;0 MEANS NO KEY PRESSED, 
;SO JUST RETURN TO CALLER 




01390 ;A KEY 


HAS BEEN PRESSED, HANDLE 


IT IF IT IS 'DEFKEY' , 




01400 ; 'UDSKEY' OR 


LOWER-CASE LETTER; 


ELSE JUST RETURN IT. 




01410 ; 








7F52 FE1F 


01420 


CP 


DEFKEY 


; DEFINE USER STRING? 


7F54 2840 


01430 


JR 


Z, DEFINE 


;YES, GO DO IT 


7F56 FE1A 


01440 


CP 


UDSKEY 


.•REQUESTING USER STRING? 


7F58 2808 


01450 


JR 


Z , SUBMOD 


;YES, START SUBSTITUTION 


7F5A FE61 


01460 


CP 


97 


;KEY < LOWER-CASE A? 


7F5C D8 


01470 


RET 


C 


;YES, RETURN UNCHANGED 


7F5D FE7B 


01480 


CP 


123 


;KEY < LOWER-CASE Z + 1? 


7F5F 3801 


01490 


JR 


C, SUBMOD 


;YES, SUBSTITUTE 


7F61 C9 


01500 
01510 ; 


RET 




j NO, RETURN UNCHANGED 




01520 ; START 


NEW SUBSTITUTION - SET OS 


FLAG = 1, 




01530 ;SET POINTER 


TO STRING TO SUBSTI 


TUTE 




01540 ; 








7F62 E5 


01550 SUBMOD 


PUSH 


HL 




7F63 FE1A 


01560 


CP 


UDSKEY 


; USER-DEFINED STRING? 


7F65 2005 


01570 


JR 


NZ, KEYWRD 


;NO, IT'S KEYWORD 


7F67 216A7E 


01580 


LD 


HL,USTR 


;YES, GO SAVE POINTER TO 


7F6A 1810 


01590 
01600 ; 


JR 


SRCHDN 


; STRING AND SET MODE FLAG 




01610 ;KEY PRESSED 


WAS A LOWER-CASE LE 


TTER. SET POINTER TO FIRST 




01620 ; CHARACTER OF KEYWORD TO SUBSTI1 


UTE FOR IT. 




01630 ; 








7F6C 21AE7E 


01640 KEYWRD 


LD 


HL,LA 


;BASE OF SUBST-STRING TABLE 


7F6F D661 


01650 
01660 


SUB 


97 


; SUBTRACT ASCI I ( LOWER-CASE 
; A) FROM KEY PRESSED 


7F71 B7 


01670 


OR 


A- 


;ZERO => LOWER-CASE A 


7F72 2808 


01680 


JR 


Z, SRCHDN 


; PRESSED, END SEARCH 


7F74 47 


01690 


LD 


B,A 


;ELSE A HOLDS NUMBER OF 


7F75 7E 


01700 NXTC 


LD 


A, (HL) 


; KEYWORDS TO SKIP OVER TO 


7F76 23 


01710 


INC 


HL 


; FIND STRING TO SUBSTITUTE 


7F77 B7 


01720 


OR 


A 




7F78 20FB 


01730 
017 40 


JR 


NZ,NXTC 


; INNER LOOP FINDS NULL 
; END-OF-STRING BYTES 


7F7A 10F9 


017 50 
01760 ; 


DJNZ 


NXTC 


; OUTER LOOP COUNTS KEYWORDS 




01770 ;END SEARCH 


- HL HAS POINTER TO 


DESIRED STRING 




017 80 ; 








7F7C 22AC7E 


017 90 SRCHDN 


LD 


(OSPTR) ,HL 


;SAVE POINTER TO STRING 


7F7F 3E01 


01800 SETMD 


LD 


A,l 


; SUBSTITUTION MODE STARTS 

Program continues 



If a key has been pressed, it is 
examined as discussed above, 
and if it is a lowercase alpha- 
betic code, the keyword substi- 
tution routine begins. 

A User Defined Key 

The above technique allows 
entry of 26 BASIC keywords with 
a single keystroke, and by itself 
will save a lot of typing. But 
many BASIC programs use the 
same expression over and over 
again; It would be convenient to 
enter a phrase once and then re- 
call it with a single keystroke. 

To do this, a key must be 
defined whose substitution 
value can be changed dynami- 
cally, without having to reas- 
semble and reload the assembly 
language routine. This feature is 
easily added by declaring one 
key as the "define user string" 
key. This routine uses SHIFT/ 
CLEAR. The "substitute user de- 
fined string" key is the shifted 
down arrow. 

These keys can be located in 
the input stream In the same 
way shifted alphabetic charac- 
ters are intercepted. When 
SHIFT/CLEAR is pressed, a 
START DEFINITION prompt is 
printed on the screen. Each 
character typed, up to 64 char- 
acters, Is saved In memory until 
SHIFT/CLEAR is hit again. This 
terminates the definition of the 
string. END DEFINITION is writ- 
ten on the screen. 

Now when SHIFT plus the 
down arrow are pressed, the 
defined string is returned. Table 
1 gives a summary of the ac- 
tions the filter routines will per- 
form for the range of possible 
keyboard inputs. 

The origin shown in the Pro- 
gram Listing of ONESTR is for a 
16K machine. Table 2 gives the 
ORG value to substitute, as well 
as the appropriate answers to 
the MEMORY SIZE? prompt, for 
32K and 48K machines. 

At label INIT you will find the 
initialization code, which must 
be executed once when ONE- 
STR is loaded. This code re- 
trieves the address of the cur- 
rent keyboard driver routine 
from the keyboard device con- 
trol block and stores it after the 
CALL opcodes at labels KEY- 
DRl and KEYDR2. 



78 • 80 Microcomputing, September 1980 



7F81 32AB7E 
7F84 El 



7F85 E5 
7F86 2AAC7E 
7F89 7E 
7F8A B7 
7F8B 2003 
7F8D 32AB7E 
7F90 23 
7F91 22AC7E 
7F94 El 
7F95 C9 



7F96 3A8038 
7F99 B7 
7F9A 2004 
7F9C 3E1F 
7F9E B7 
7F9F C9 



7 FAB 
7FA1 
7FA2 
7FA5 
7FA8 
7 FAB 
7 FAD 
7FAE 
7FAF 
7FB0 
7FB2 
7FB3 
7FB4 
7FB5 
7FB7 
7FB9 
7FBB 
7FBE 
7FBF 
7FC1 
7FC3 
7FC4 
7FC5 
7FC8 



C5 

E5 

21DE7F 

CDD57F 

216A7E 

0640 

E5 

C5 

CD 

0000 

CI 

El 

B7 

28F6 

FE1F 

2008 

3A8038 

B7 

2009 

3E1F 

77 

23 

CD3A03 

10E3 



7FCA AF 
7FCB 77 
7FCC 21EF7F 
7FCF CDD57F 
7FD2 El 
7FD3 CI 
7FD4 C9 



7FD5 7E 
7FD6 B7 
7FD7 C8 
7FD8 CD3A03 
7FDB 23 
7FDC 18F7 



7FDE 0D 
7FDF 44 
7FED 0D 
7FEE 00 
7FEF 0D 
7FF0 45 
7FFE 0D 
7FFF 00 
7E58 
00000 TOTAL 



01810 
01820 
01830 
01840 
01850 
01860 
01870 
01880 
01890 
01900 
01910 
01920 
01930 
01940 
01950 
01960 
01970 
01980 
01990 
02000 
02010 
02020 
02030 
02040 
02050 
02060 
02070 
02080 
02090 
02100 
02110 
02120 
02130 
02140 
02150 
02160 
02170 
02180 
02190 
02200 
02210 
02220 
02230 
02240 
02250 
02260 
02270 
02280 
02290 
02300 
02310 
02320 
02330 
02340 
02350 
02360 
02370 
02380 
02390 
02400 
02410 
02420 
02430 
02440 
02450 
02460 
02470 
02480 
02490 
02500 
02510 
02520 
02530 
02540 
02550 
02560 
02570 
02580 
ERRORS 



LD 
POP 



(OSFLAG) ,A 
HL 



; RESTORE HL 
BRANCH HERE WHEN WE ARE DOING A SUBSTITUTION 



SUB ST 



NOTEND 



PUSH 

LD 

LD 

OR 

JR 

LD 

INC 

LD 

POP 

RET 



HL 

HL, (OSPTR) 

A, (HL) 

A 

NZ, NOTEND 

(OSFLAG) ,A 

HL 

(OSPTR) ,HL 

HL 



DEFINITION OF USER STRING 



CALL 00CD 00190 

DEF 7FA0 02060 

DEFINE 7F96 01990 

DEFKEY 001F 00200 

ENDDEF 7FCA 02310 

ENDMSG 7FEF 02540 

GETC 7 FAD 02120 

1N1T 7E58 80290 

KEYDR1 7F4E 01320 

KEYDR2 7FB0 02150 



GETC 



KEYDR2 



DEFINE LD 
OR 
JR 
LD 
OR 
RET 



PUSH 

PUSH 

LD 

CALL 

LD 

LD 

PUSH 

PUSH 

DEFB 

DEFW 

POP 

POP 

OR 

JR 

CP 

JR 

LD 

OR 

JR 

LD 

LD 

INC 

CALL 

DJNZ 

XOR 

LD 

LD 

CALL 

POP 

POP 

RET 



NTENDF 



ENDDEF 



A, (SHIFT) 
A 

NZ,DEF 
A, DEFKEY 
A 



BC 
HL 

HL , STRTDF 
PUTSTR 
HL,USTR 
B,USTLEN 
HL 
BC 

CALL 


BC 
HL 
A 

Z,GETC 
DEFKEY 
NZ, NTENDF 
A, (SHIFT) 
A 

NZ, ENDDEF 
A, DEFKEY 
(HL) , A 
HL 
PUTC 
GETC 

A 

(HL) ,A 
HL, ENDMSG 
PUTSTR 
HL 
BC 



SAVE HL 

GET CURRENT' CHARACTER 

OF SUBSTITUTION STRING 
NULL END-OF-STRING? 
NO, MORE TO GO 
YES, END SUBSTITUTION 
BUMP POINTER TO NEXT 

CHARACTER AND SAVE IT 
RESTORE HL 
RETURN CHARACTER IN A 



SHIFT DEPRESSED? 

(DEFINE ON 'SHIFT-CLEAR') 
YES, DEFINE IT 
NO, RETURN 'CLEAR' 
SET FLAGS FOR CALLER 
RETURN CHAR IN A 

SAVE CALLER'S BC 
SAVE CALLER'S HL 
PUT PROMPT FOR START OF 

USER STRING DEFINITION 
POINTER TO USER STRING AREA 
MAX SIZE OF USER STRING 
SAVE OUR HL 
SAVE OUR BC 

BECOMES 'CALL GET-CHAR' 
ADDR OF KEY DRIVER HERE 
RESTORE OUR BC 
RESTORE OUR HL 
IS A NON-ZERO? 
LOOP UNTIL KEY PRESSED 
END DEFINITION? 
NOT END DEFINITION CHAR 
SHIFT KEY PRESSED? 
NOT ZERO IF IT IS 
YES, END DEFINITION 
RESTORE A 

ADD CHAR TO USER STRING 
BUMP POINTER TO USER STRING 
ECHO KEY PRESSED 
REPEAT IF MAX STRING 

LENGTH NOT YET EXCEEDED 
PUT NULL END-OF-STRING 

MARKER AFTER USER STRING 
PUT OUT 'END OF DEF' MSG 
ALSO LEAVES IN A 
RESTORE CALLER'S HL 
RESTORE CALLER'S BC 
AND RETURN TO CALLER 



PUTSTR: PUT STRING AT (HL) ON SCREEN. 
TERMINATED BY A BYTE. 



STRING IS 



PUTSTR 



LD 

OR 

RET 

CALL 

INC 

JR 



A, (HL) 

A 

Z 

PUTC 

HL 

PUTSTR 



GET CHARACTER FROM STRING 
IF CHARACTER IS NULL (0) 
THEN FINISHED 
ELSE PUT CHAR ON SCREEN 
POINT AT NEXT CHARACTER 
AND GO GET IT 



; PROMPT MESSAGES: 

STRTDF DEFB 0DH ; CARRIAGE RETURN 

DEFM 'DEFINE STRING:' 

DEFB 0DH 

DEFB ;END OF STRTDF 

ENDMSG DEFB 0DH ; CARRIAGE RETURN 

DEFM 'END DEFINITION' 

DEFB 0DH 

DEFB ;END OF ENDMSG 

END I NIT 



01310 02140 

02010 

01430 

01420 02020 02200 02250 

02240 

02330 

02190 02290 



02580 
00300 
00310 



Program continues 



The solution to your 
hardware dilemma: 



• li; in 



You could spend a lol ol money (or 
TRS-80* peripherals — OR — spend a 
lot ol lime developing your own — 
BUT here s a better choice The Ulf8f 
parallel input port costs little more I nan 
you would pay lor parts alone AND lets 
you locus your design time on applica- 
tions^ 

Hook up sensors, switches, joy- 
sticks. Ilghtpens. keyboards . . with- 
out modifying the computer or tying up 
the cassette port. Plugs into card edge 
at back ol keyboard or on expansion 
interlace . 

Features 8 bit. TTl/CMOS compati- 
ble input Jumper address program- 
ming Can be powered by inexpensive 
AC adapter available trom Radio Shack 
and elsewhere 

Includes all IC's sockets, resistors 
capacitors, voltage regulator. |ack 
instructions/documentation, etc. plus 
tree joystick plans As you would 
expect of a good solution, all parti in 
guaranteed. For Lii 

Kit |one evening) S35.00 ppd 

Assembled & tested $45.00 ppd 

"a landy Corp trademark 



GRAPHICS 
UTILITIES 



PCTWOO (Picture Window) allows 
yuu to create, edit display, save on 
cassette, and recall last action graph- 
ics The powerful machine code sub- 
routines are easily accessed Horn 
BASIC or assembler Scan images larg- 
er than the screen, display multiple 
images, create animations and more 
Includes: system code BASIC image 
editor. 5 demo animations and source 
code (for assembler programmers) on 
cassette, and complete instructions/ 
documentation 

Add exciting visuals to your next 
education game or business program 
Lois ol graphics power ai a low price 
For 16K LII S12 00 ppd 



WWI 

Aviation 

Game 

FRANK LUKE is a simulation based 
on the exploits ol the American Ace 
Frank Luke Jr Take your S P A on 
a solo mission behind enemy lines Fly 
through the menacing skies, dodging 
the flak, in search of observation bal- 
loons Will you survive to experience a 
wall earned trip to Paris (created by 
PCTWDO)? Sign up now to fly in 
France. 
.For 16K LII. SID 00 ppd 



Order PCTWDO FRANK LUKE 



. Ul' 



IfroiTi 



\NIVERSAL 



^292 



NTERFACB 



P.O. BOX 1077 

GLENDALE HEIGHTS. 



We 

accept cnm 

VISA&MC It- 60137 

(312) 469-6921 



iiL residents add 5' 



• Reader Service—see page 226 



80 Microcomputing, September 1980 • 79 



SOFTWARE- TRS-80 - SOFTWARE 




PACKAGE ONE INCLUDES: GRAPHIC 
TREK "2000" This lull graphics, teal 

lime game is lull of last, exciting action' 
Exploding photon torpedoes and phase's 
fill the screen! You must actually navigate 
the enterprise to dock with the giant space 
stations as well as to avoid klingon 
torpedoes! Has shields, galactic memory 
readout, damage reports, long range 
sensors, etc! Has 3 levels tor beginning 
average, or expert players' * INVASION 
WORG Time: 3099. Place: taith's Solar 
System Mission: As general of Earth's 
forces, your job is to stop the Worg 
Invasion and destroy their outposts on 
Mars, Venus, Saturn, Neptune, etc! Earth's 
Forces: Androids Space Fighters 

Lazer Cannon - Neutrino Blasters! Worg 
Forces: Robots - Saucers Disintegrators 
- Proton Destroyers! Multi level game lets 
you advance to a more complicated game 
as you get better 1 * STAR WARS 
Manuevei youi space fighter deep into the 
nucleus of the Death Star! Drop your 
bomb, then escape via the only e».t riUi 
graphics game is really 'uii' May the Force 
be with you' * SPACE TARGET 
Shout at enemy Ships with your missiles, 
it they eject in a parachute, capture them 
— or if you're cruel, destroy them! Full 
graphics, real time game! * SAUCERS 
This last action graphics game has a time 
limit' Can you be the commander to win 
the distinguished cross! Requires split 
second timing to win! Watch out' 

ONLY 14.95 




PACKAGE TWO INCLUDES: CHECK- 
ERS 2.1 Finally! A checkers program 
that will challenge everyone' Expert as 
well as amateur! Uses 3-ply tree search to 
find best possible move. Picks randomly 
between equal moves to assure you of 
never having identical games. * POKER 
FACE - The computer uses psychology as 
well as logic to try and beat you at poker. 
Cards are displayed using TRS-80's full 
graphics. Computer raises, calls, and 
sometimes even folds! Great practice for 
your Saturday night poker match! (Plays 5 
card draw). * PSYCHIC - Tell the 
computer a little about yourself and he'll 
predict things about you, you won't 
believe' A real mind bender! Great 
amusement tor parties. * TANGLE MAN- 
IA Tty and force your opponent into an 
immobile position. But watch out, they're 
doing the same to you' This graphics game 
Is for 2 people and has been used to end 
stupid arguments. (And occasionally starts 
them') • WORD SCRAMBLE - This 
game is for two or more people. One 
person inputs a word to the computer 
while the others look away. The computer 
scrambles the word, then keeps track of 
wrong guesses. 

ONLY 14.95 




PACKAGE THREE INCLUDES: POE- 
TRY — This program lets you choose the 
subiect as well as the mood of the poem 
you want. You give TRS-80 certain nouns 
or names, then the mood, and it does the 
rev 1 It has a 1000-word • vocabulary of 
nouns, verbs, adjectives and adverbs 1 * 
ELECTRIC ARTIST Manual: draw, 

erase, move as well as. Auto: draw, erase 
and move. Uses graphics bits not bytes. 
Saves drawing on tape or disk! • GALAC- 
TIC BATTLE - The Swmeus enemy have 
long range phasers but cannot travel at 
warp speed! You can, but only have short 
range phasers! Can you blitzkrieg the 
enemy without getting destroyed' Full 
graphics - real time' • WORD MANIA 
Can you guess the computer's words using 
your human intuitive and logical abilities' 
You'll need to, to beat the computer! * 
AIR COMMAND Battle the Kamikaze 
pilots. Requires split second timing. This is 
a FAST action arcade game. 



ONLY 14.95 




PACKAGE FOUR INCLUDES: LIFE 
This Z-80 machine language program uses 
full graphics' Over 100 generations per 
minute make it truly animated' You make 
your starting pattern, the computer does 
the rest! Program can be stopped and 
changes made! Watch It grow' * SPACE 
LANDER This lull graphics simulator 

lets you pick what planet, asteroid or 
moon you wish to land on' Has 3 skill 
levels that make it fun for everyone. * 
GREED II Multilevel game is fun and 

challenging! Beat the computer at this dice 
game using your knowledge of odds and 
luck i Computer keep; track of his 
winnings and yours. Quick last action. 
This game is not easy" * THE PHARAOH 
— Rule the ancient city of Alexandria' 
Buy or sell land. Keep your people from 
revolting! Stop the rampaging rats. Re- 
quires a true political personality to 
become good' • ROBOT HUNTER A 

group of renegade robots nave escaped and 
are spotted in an old ghost town on Mars' 
Your job as "Robot Hunter" is to destroy 
the Pirate machines before they kill any 
more settlers! Exciting! Challenging! Full 
graphics! 



ONLY 14.95 



41 I I » W* IrCTDMlICrW. IKOHi 



HARDWARE TRS-80 HARDWARE 



■ y <* 

£■:[*' w 
KOHom wroisr. 
attf JOT'S 

W man 



OK WHI TO | 
OK X3JB TO t 
OK 5.WS TO I 
OK laUU TO i 
IK M«» TO I 
OK 1.8*15 TO I 
OK iH» TO I 
~~ 5.KS TO 1 



:>t. ;w i » wa n r. caw wwns i.a. 



PACKAGE FIVE INCLUDES: SUPER 
HORSERACE - Make your bets just like 
at the real racetrack! 8 horses race in this 
spectacular graphic display' UP to 9 
people can play! Uses real odds but has 
that element of chance you see in real life! 
Keeps track of everyone's winnings and 
losses. This is one of the few computer 
simulations that can actually get a room of 
people cheering! * MAZE MOUSE The 
mouse with a mind' The computer 
generates random mazes of whatever size 
you specify, then searches for a way out! 
The sacond time, he'll always go fastast 
route! A true display of artificial intelli- 
gence' Full graphics, mazes & mouses 1 * 
AMOEBA KILLER - You command a 
one man submarine that has Oeen 
shrunken to the size of bacteria in this 
exciting graphic adventure! Injected into 
the president's bloodstream, your mission 
is to destroy the deadly amoeba infection 
ravaging his body 1 * LOGIC — This 
popular game is based on Mastermind but 
utilizes tactics that make it more exciting 
and challenging has 2 levels of play to 
make it fun for everyone. * SUBMARIN- 
ER Shoot torpedoes at the enemy ships 
to get points. Fast action graphics, arcade 
type game is exciting and fun for 
everybody! 



ONLY 14.95 



MICRO 
SPEED 

Upgiade your "slow" TRS-80 to a 
SUPER FAST MACHINE!! (2.66 
MHZ) over 50% FASTER! Some of 
the features: 

Auto turn-off during cassette or 
disk access. (This means NO lost 
programs EVER!) (Turns back on 
automatically too!) MANUAL con- 
trol. (Unit may be turned on or off 
at any time. Yes even during 
program execution!) Keyboard 
indicator light "blinks" when mi- 
cro speed is on. Stops blinking 
when off! Don't wait for SARGON 
II or any other program!!! Comes 
with easy to follow instructions. 
(Some soldering required.) OR take 
to your local computer store or 
TV Appliance Center for quick 
installation. (5 10 minutes 11 ) Works 
with any model, TRS-80. 

ONLY 29.95 complete 



MICRO 
BEEP 

Simple hook up: Just plug cassette 
remote jack into unit 



EASILY CONTROLLED FROM 
BASIC: 

OUT 255,4 = on 
OUT 255.0 ■ off 

MICRO-BEEP make games more 
fun as well as provide useful sound 
output for professional applica- 
tions! 

Works with Any Model I TRS-80 




PACKAGE SEVEN INCLUDES: BACK- 
GAMMON S.O — 2 different skill levels 
make this game a challenge to average or 
advanced players FAST (15 second avg) 
Looks for best possible move to beat you! 
FANTASTIC GRAPHICS. Plays doubles 
and uses international rules * SPEED 
READING - Increases your reading 
speed. Also checks for comprehension of 
material- Great for teenagers and adults to 
improve reading skills * pt 109 ~ Drop 
depth charges on moving subs. Lower 
depths get higher points in this last action 
graphics game. * YAHTZEE - Play Yaht 
zee with thfi computer. This popular game 
is even more fun and challenging against a 
TRS-80' * WALL STREET — Can you 
turn your $50,000 into a million dollars' 
That's the object of this great game 
Simulates an actual stock market! 

ONLY 14.95 



ONLY 15.95 complete 



PACKAGE SIX INCLUDES 20 HOME 
FINANCIAL PROGRAMS F igures am- 
ortization, annuities, description rates, 
interest tables, earned interest on savings 
and much, much more. These programs 
will get used again and again. A must for 
the conscientious, inflation minded per- 
son. 

ONLY 14.95 




^19 



Master 
Charge 



Exceptional Products through Research & Imagination 
Send Check, Money Order or Bank Card No. orders to: 



SIMUTEK 
P.O. Box A 3687 
Tucson. AZ 85732 



FREE Postage and Handling 



24 HOUR (7 days) HOTLINE 

(602) 886-5880 Visa 

(C.O.D. $3 extra) 

Same Day Shipment on Bank Cards, 
Money Orders & C.O.D. 

All Tape Programs Require a Minimum of 16K Level 2 
Packages Available on Diskette (32K System) $4.25 Extra 

3 or More Packages Get 10% Discount 

Dealer Inquiries Invited 
TRS-80 IS A REGISTERED TRADEMARK OF TANDY CORP. 



80 • 80 Microcomputing, September 1980 



KEYDRV 


4016 


00140 


00290 


00340 


KEYWRD 


7F6C 


01640 


01570 




LA 


7EAE 


00700 


01640 




LB 


7EB5 


00720 






LC 


7EBA 


007 40 






LD 


7ECB 


00760 






LB 


7 ECS 


007 80 






LF 


7ECD 


00800 






LG 


7 EDI 


00820 






LB 


7ED6 


00840 






LI 


7EDB 


00860 






LJ 


7EE2 


00880 






LK 


7EE7 


00900 






LL 


7EEE 


00920 






LM 


7EF3 


00940 






LN 


7EF8 


00960 






LO 


7EFD 


00980 






LP 


7F02 


01000 






LQ 


7F08 


01020 






LR 


7F0F 


01040 






LS 


7F16 


01060 






LT 


7F1C 


01080 






LU 


7F21 


01100 






LV 


7F27 


01120 






LW 


7F30 


01140 






LX 


7F36 


01160 






LY 


7F3B 


01180 






LZ 


7F40 


01200 






NOTEND 


7F90 


01920 


01900 




NTENDF 


7FC3 


02260 


02210 




NXTC 


7F75 


01700 


01730 


017 50 


ONESTR 


7F47 


01250 


00330 




OSPLAG 


7EAB 


00570 


01250 


01810 01910 


OSPTR 


7EAC 


00600 


017 90 


01870 01930 


PUTC 


033A 


00180 


02280 


02450 


PUTSTR 


7FD5 


02420 


02090 


02340 02470 


REST 


7E6F 


00540 






SETHD 


7F7F 


01800 






SHIFT 


3880 


00160 


01990 


02220 


SRCHDN 


7F7C 


017 90 


01590 


01680 


STRTDF 


7FDE 


02500 


02080 




SUBMOD 


7F62 


01550 


01450 


01490 


SUB ST 


7F85 


01860 


01270 




UDSKEY 


001A 


00210 


01440 


01560 


USED 


0005 


00530 


00540 




USTLEN 


0040 


00230 


00540 


02110 


USTR 


7E6A 


00500 


00530 


01580 02100 



Level II BASIC, TRSDOS 2.1, 
2.2 and NEWDOS all use differ- 
ent keyboard drivers. By picking 
up the address they have al- 
ready put in the device control 
block, it is possible to reap the 
benefits (debounce, etc.) of 
these drivers and the benefits of 
ONESTR at the same time. The 
address of label ONESTR is in- 
stalled in the device control 
block so that it is called in the 
future for keyboard input. 

Choose an Instruction 

Choose one of two instruc- 
tions, depending on whether 
you will be loading ONESTR 
from tape or disk. If you will load 
ONESTR from disk, you must 
use JP 402DH to return to TRS- 
DOS or NEWDOS. If you will be 
loading from tape with the SYS- 
TEM command in BASIC, use a 
JP 1A19H to return to BASIC. 

Note that the space taken up 
by this Initialization code can be 
reused after it is run, since the 

*■ Reader Service— see page 226 



code is no longer needed. The 
answers to the MEMORY SIZE? 
prompt are given in Table 2 and 
reflect this reuse of space. 

At label USTR allocate 64 
bytes for the user-defined string 
and give it an initial value of 
RUN. Until redefined, this will 
run a BASIC program by typing 
SHIFT/down arrow. This may be 
changed to any other initial 
value you like, and the code at 
label REST will allocate the re- 
mainder of the 64-byte buffer. A 
zero byte after the string serves 
as the string terminator. 

Beginning at label LA the 
table of strings to be substitut- 
ed for the lowercase letters are 
listed. Except for LA, the labels 
are included strictly for conve- 
nience in determining which 
keyword gets substituted for 
which letter; they are not needed 
by the code. 

This is where you would sub- 
stitute assembly language mne- 
monics, Pascal keywords or 



anything else you would like to 
type with one key stroke. If you 
do make substitutions which 
cause the length of the program 
to change, be sure to change the 
program origin so it will fit in 
your machine! Adjust your an- 
swer to the MEMORY SIZE? 
prompt in this case to protect 
the new size of the program. 
Again, a zero byte at the end of 
each string in the table serves 
as a terminator. 

Selecting Keywords 

I chose not to include an entry 
for PRINT, which is certainly a 
commonly used BASIC key- 
word. The Level II BASIC hand- 
book explains that a question 
mark is a built-in abbreviation 
for PRINT. 

I did choose to include 
PRINT® as a keyword, even 
though typing ?@ works as well 
and is almost as easy. The 
reasoning behind this is that @ 
and SHIFT @ appear the same 
on the screen, but SHIFT ® 
doesn't work as a PRINT quali- 
fier. It's a nasty bug to catch 



since a listing appears normal. 
Including PRINT® as a one- 
stroke entry avoids the problem. 

ONESTR is the main entry 
point to the program, and this is 
where control is transferred 
whenever keyboard entry is re- 
quested. The OS FLAG is tested 
to see if the routine is in the mid- 
dle of a keyword substitution. If 
so, it branches to SUBST and 
continues with the substitution. 
Otherwise, the routine whose 
address was in the keyboard 
device control block before 
ONESTR was loaded is called 
for keyboard input. If no key has 
been pressed, it returns to the 
caller. If a key has been pressed, 
a decision is made about the 
next action to take, based on the 
key's ASCII value (as shown in 
Table 1). 

If the keyboard input is a 
lowercase letter, the OS flag is 
set on. Search the keyword table 
sequentially to find the start of 
the keyword to substitute. 

The number of keywords to 
skip is calculated from the 
ASCII value of the lowercase let- 




• Iwnke* power up prot<oW secuotw jccett andconttol* powf to all component \ The CPU and all at 
tathmentx prmer up together read*- for procnt*ng 

9 BuiH-m coolmg Ian keeps d-sk dme\ e ipans-on interlace *"dC*l fce»DO*rd <n optima 1 temperature up 
e<at>ng 'angr 

• Burft m power itutlet st'ipt HI grounded outlets UL Jpprcned) fftfvft room for complete «p*"Wjno' fne 
TR ISO computet One At power cord I W leet I external to desk power* all i omponents 

• Solid *■• wood construction throughout with beautiful valnutgtam laminate resists burns mars ei> 
while blending periecllv into an* otlice or home decor 

• All cabin, power cordv and connection* are completely hidden hom vie* and in ate essable to tampei 



• Recessed and lowered kevboatd lactilates more re'*»mn land thereiore r 

* Holds the lull complement of fffVOO Mode' I components 

- up to* mmt^trik dr> *es 

- etpamnn interface 

- keyboard 
C*r<MpJj» 



-2 

-almost anvprmm 
• Bu.lt in and receded MSI ' r»<mu 
your \*\1rm set does AOl <*••.»<<< tO * 
9 Absolutely no niod*fi<4tmn rt t...|. 



■ e»lenvion eliminate' 

«i tftsm many wa 

ever (0 }K\»>hatd> 



tumbling mtft'g 



• act urate) data entry 



'f penc il\ t 



r warrant* htHliiitt IAI14 1 

• Iwo lull size drawers pros-de plenty ot storage space lop draper >\ 5'--, high tor easy setUc at storage ot 
minidiskette* and bottom drawer r\ perfect 'o* lutpemion Mint tvtfwn 

9 form* ma* be led thru printer horn bottom ot de*k lampte Mot* ate pros -ded! or teat ol printer It printer rs 
not u*ed a matching tiller n provided for slot m rop- of desk 
9 Dmsen**jn\ same as normal detk 60 I • fc • \\ ■ > H 
9 Removable top allow* access to etectt-eal connec torn and tables 
9PRICI -ItWOO 



^312 



MS4 




COMPUTER BUSINESS SYSTEMS 



329 S Highland Avenue 
Lombard. Illinois (312) 932-1344 



80 Microcomputing, September 1980 • 81 



ter read from the keyboard, 
minus the ASCII value of lower- 
case a. Since each keyword is 
terminated by a zero byte, start 
at the head of the table and 
check each character. Continue 
until you pass as many zero 
bytes as the number of key- 
words you are supposed to skip. 

Don't moan and groan about 
the inefficiency of a sequential 
search— it's easy to build an in- 
dex for the address table and to 
put it into the routine so that the 
appropriate address may be 
computed. 

To do this, use a DEFW 
pseudo-op instruction for each 
label whose address is included 
in the following table: 



ADTABL DEFW LA 
DEFW LB 



DEFW LZ 



The offset into the table for a 
lowercase letter, say b, is 2 • 
(ASCII(b)-ASCII(a)). The factor of 
2 Is used because of the two 



bytes each entry takes. Load the 
HL register pair with the con- 
tents of this location and you've 
got the address of the first letter 
of the keyword. 

Why not use this technique, 
then, instead of the sequential 
search? Because the address 
table takes up space. And al- 
though it does give faster re- 
sults, the difference isn't notice- 
able at the keyboard. 



Test the Shift Key 

The code at the label DEFINE 
is executed when the CLEAR 
key is pressed. Since the key- 
board driver routine returns the 
same value whether CLEAR is 
pressed alone or shifted, a test 
must be done to verify that the 
SHIFT key is indicated. Location 
3880H contains a 1 if SHIFT is 
pressed, and a otherwise. 
Checking 3880H determines 
whether to start user string 
definition, which is triggered by 
SHIFT/CLEAR. 

Assuming SHIFT/CLEAR was 
pressed, the program types 



DEFINE STRING: on the screen 
and waits for input. Each key 
pressed is tested to see if it is 
SHIFT/CLEAR, which ends the 
definition. If not, it is added to 
the user string buffer at USTR. 

If 64 characters are typed 
without a SHIFT/CLEAR, then 
definition mode is automatically 
terminated. User string defini- 
tion ends by returning a zero to 
the caller, indicating that no key 
was pressed. Thus the entire 
process is invisible to the calls. 
This process can be used with 
any program (BASIC, etc.) re- 
questing keyboard input. 

Note that most of the Level II 
BASIC string input editing is not 
implemented. The back arrow 
will delete a character, but 
SHIFT plus the back arrow will 
not delete the whole line. 

Another design trade-off is re- 
flected here. The ROM routines 
for string input editing could 
have been used, but they termi- 
nate input when BREAK or 
ENTER are pressed. The ap- 
proach taken allows entire com- 
mands to be typed with one key- 



stroke, including ENTER at the 
end of the command. 

Running ONESTR 

If you are loading from disk, 
run ONESTR from the DOS 
READY prompt. You can test it 
at this point by typing shifted 
letters; keywords should ap- 
pear 

With either disk or tape, bring 
BASIC up, answering MEMORY 
SIZE? as shown in Table 2. Disk 
users should be in business at 
this point. 

Tape users should enter the 
SYSTEM command, and load 
the object tape. Once loaded, 
run the program by hitting 
ENTER. 

Table 3 is a handy listing of 
the keys to press for each key- 
word. Cut it out and tape it to 
your monitor for quick reference 
while you are getting used to the 
system. 

Now it's time to find those 
back issues of 80 Microcomput 
ing and start enjoying all the 
programs that you were too lazy 
to type.B 



EXPAND 



YOUR 
TRS-80* 




INTRODUCING THE XTD-TRS INTERFACE CARD 
FOR THE STD BUS 

This card permits direct connection between the TRS-80' and the STD BUS system The 
TRS-80' can even be used as a development system for Z-80 STD BUS QC Microsystems 
distributes a full line of STD BUS products from a number of manufacturers including 
Mostek, Xitex, Intelligence Systems and Spurrier 



DDT-80 
ROM 




$260 Includes: DDT-80 ROM 

'TRS-80 and CP/M are registered trademarks ol Tandy Corp and Digital Resea 



— OFF THE SHI 


:LF S 


TD BUS PRODUCTS — 


AVAILABLE NOW: 






MDX-CPU1 


$260 


Z80 CPU/RAM/PROM 


MDX-CPU2 


$295 


280 CPU/RAM/PROM 


MDX-DRAM 8/32 




Dynamic RAM 


MDX-PIO 


$250 


Parallel I/O 


MDX-A/D 8.10.12 




A/D Converter 


MDX-DA8.12 




D/A Converter 


SYS-CPM- 




CP/M 2 2 Disk SW 


MDX-MATH 


$699 


Floating Point Math 


MDX-SIO 


$260 


Serial I/O 


MOX-SV1 1 


$235 
$165 


Video Interface 


PROM-I 


PROM Programmer 


MDX-EPROM/UART 


$225 


Combination PROM/UART 


CARD CAGES 




8-22 Slot with MotherBoard 


POWER SUPPLY 


$135 




•Contact QC tor Pricing Options 



— 200 NS MEMORY!! — 

High speed 4116 RAMS for Maximum 
Reliability from your TRS-80*. 

SET OF 8 FOR $57 



OTHER RAMS 

2114 UCB 1K X4 450NS 
4118N-4 1K x 8 250NS 
4104N-4 4K x 1 250 NS 

PROMS 

2716T-12 2K x 8 650 NS 
2716T-8 2K x 8 450 NS 



Z80 PARTS 

Z80-CPU 

Z80-PIO 

Z80-CTC 

Z80-DMA 

Z80-SIO 

MISC 

12" Video Monitor B&W 



2.5 MHZ 

$1(1-9) 

11.00 

850 

850 

29 00 

37 50 



$(1-9) 

5.00 

24.00 

1050 

24.50 
27.00 

4.0 MHZ 

$(1-9) 
15.00 
11.00 
11.00 
37.00 
4500 

$149.00 



Micro Computer Systems. 
Components and Service 

MasterCharge. Visa. American Express Check COD accepted 
Add S3 00 for U S Shipping & Handling Allow two weeks tor 
shipment Mm order of $10 00 All products covered by a 90 day 
OEM warrenty Prices subject to change without notice 



Dealer Inquiries Welcome! 

Micro " 39b 

Systems P.O. box 401326 

GARLAND, TEXAS 75040 
(214) 343-1282 

Ask for our complete catalogue! 




82 • 80 Microcomputing, September 1980 



G 



RONDURE COMPANY -2X5 

?14> 631>4d7I 



the computer room 



SPECIAL 

Printer for your 
Microcomputer 




GETERMINET 
300 PRINTER 

Pin teed — 9* paper 



• SO Ptmt portions 

• ••€»■•• orhr 

• .oo» 

• «S 73. 

• 30CPS 

■ UPpat A Ww nw 

Mwppma ; co"/imr\m% » 1 MX) 
(UMd| 

(good working condition) 



Will run on serial RS232 port of 
most micros including TRS-80. 



$450 00 



WE HAVE FLAT-PACK 
ACOUSTIC 



pickup 




$19 



Si 



USFD FANS 




Muffin -B 00 
Sprite -4 00 




NEW 

POWER 

SUPPLY 

$25.00 

5V at 3 Amp 
l?v *: b Amp 
i #j J Amp 




USED 

POWER 

SUPPLY 

$15.00 

W «t 12 Amp 
l&V Jl 6 Amp 
6V at 2 Amp 




NEW 
POWER SUPPLY 

(AC DC Brand) 
Mud* 1 22V hi 1 9a $2000 
Model 2 15V «r 2 4a $30 00 



MICRO SWITCH KEYBOARD 

i i ■ . i 

■1 




ASCII 



$40.00 

■ w.rr. Pilni) 




USED 
OMNITEK 

MODEM 
OMONATt 

- 

$90.00 Sale 



ORDERING <N* OHM" 

<AN*r«piiia ^arm<U, *ei»i«i<»ju *rii|.«dcr«ac»o«mon*r order l«ui wndimi 
add 6*. <•**«•, u. VN« lot our CATALOG ol nwny parts Mnmnaie. prtniam He 
AA nam* Mttajact to avaiiabdMy You> raonay retomad it *a ana out o« stock. Mail 
order hours t-4 Mo e fl a y dm* Thursday fctaaad Friday) 



SHIPPING INFORMATION: 

Modame: 1300 aacn. Kay Boarct U 00. Powai S.'i 
Larga Rami A Parts Spanf, M«gN « Air HraqN Co*.- I 

.o Oraari: Add appropriata traignt or posua*. 
Wa no* taka Matter Charge arid Vita ordarv Specify lull numoat, 
Dank numbi' and aspiration data 



SimpleSort— DBM 

: TRS-80*SORT UTILITY 

DATA BASE 
I MANAGEMENT SYSTEM 

iSon A rruiiM'ne code M»t- 

cAfliapnic aon .ill, designed lor 

IRSDOS and NEWDOS to #1l.c*mliv 

order fikps created by ibe BASIC fiaid 

••' DOS statement 

f - ■ ■ - - 



?». 



■ i I Mil 



n « M ■ at SASH. * ,t m*. r, .,» , , »r paogram '"Jl 

■ 

UfnarM r<« iHwv pi • wa» 1 

••CMS* 






Mai ft- . aj g **r • ■.:<*. ■•• 



MiOC 



SimpleSort— DBMI 

« ^ 413 

« LAV.H "« r i- -'I •■ ■ • ■ .;. 

•>:•:••:••:••:••:•:• :■ 



NOBODY CAN MATCH OUR 
DOLLAR/QUALITY RATIO! 

MS-204 PRINTER 

INTRODUCTORY PRICE: 



.' M 




CABLE: $34.50 



Compatible with TRS-80, Apple, Pet 
or any other Centronics-type system 

Features 

• 132/80 Columns S3 LPM Bi- Direction* Nominal Trtrupot 

• 100% Heavy Oily Cycle High Reliability, ion Million Character 
Print Heed life 

• Sprocket Teed variable rorms WidVv 2 5' - 9 v 

• Double WMttb Characters 40.66 CharactefS per Itne 

• 9 * 7 Dot Main* Character Tor* 

• 6 Channel Electronic Werl«el formal Unit 

• Documentation Included 

Ask about our 8-inch Drives & Software 



18444 S Broadway 
Gardena, CA 90248 
(213) 327-1010 

• i960 Matchless Syaiama A Market-Plan 




•Awadar Irwct *mp*g*2a 



90 Mtcrocompuhng. September 1980 • 83 



HARDWARE 



More versatile than a line printer. 



Teletype Interface 



Jake Commander 
Shadow Lane, Apt. 2 
Peterborough, NH 03458 



This article describes how to 
build and use a simple tele- 
type (TTY) interface to work with 
a TRS-80 (Level II and up). By in- 
terrupting the normal TRS-80 in- 
put/output driver software, we 
can: output line print commands 
(including LLISTS) to the TTY, 
have a keyed option to direct 
screen print commands simul- 
taneously to the video and TTY, 
input characters to the comput- 
er from the TTY. 



The following is a 110 baud 
version, but a few simple ad- 
justments will allow I/O at other 
speeds. 

Cheap Hard Copy 

This design provides cheap, 
high quality hard copy. 

In this interface, hardware 
and software work in conjunc- 
tion; however, the bulk of the 
work rests with the software, al- 
lowing a greater degree of flexi- 
bility. 

The hardware consists of a 
556 dual timer I.C. and one 
medium gain NPN transistor, 
which draw their minimal power 
from the TRS-80 video socket, 
pin 1. The circuit is shown in Fig. 
1, and a suitable layout on 



0.1-inch matrix board in Fig. 2. 

To avoid opening up the 
TRS-80, all signals are carried to 
the unit via DIN plugs from the 
video and cassette sockets. 
These signals are tapped off in 
the interface and made avail- 
able again through DIN sockets 
at the rear. Fig. 3 shows this ar- 
rangement. 

The only difficulty is that the 
TRS-80 cassette DIN plug is a 
non-standard plastic type and 
will not mate with the standard 
DIN socket in the interface. The 
simplest expedient is to remove 
this plug and replace it with a 
normal DIN type. The I/O to the 
TTY is via only three contacts of 
a 25-way socket. This provides a 
tidy, compact unit which may be 



CASS O/P 

FROM TRS-80> j\ 

( PIN 5) 




TO TRS-80 CASS l/P 
PIN 4) 



Fig. 1. 



left hooked-up to the computer, 
even when the TTY is not in use. 

Input to the TTY driver section 
comes from the cassette output 
port. This part of the circuit 
receives pulses determined by 
the software, then stretches 
them to the required pulse 
width, which in a 110 baud sys- 
tem is 9.09 ms. 

A description of an ASCII 
character output shows how 
things happen. Suppose we 
wish to output to the TTY the let- 
ter J, which is 0100 1010 in 
binary. This is odd parity, so to 
make it even, the software adds 
a bit, and it now appears as 1 100 
1010. Before this is output, we 
need a zero start bit which indi- 
cates to the TTY that a byte fol- 
lows. Now bits 0-7 of the byte 
are output, followed by two stop 
bits. The final output is a string 
of bits as follows: 

01010011 11 

start bit J stop bits 

All the timing, data bits and 
start/stop bits are manipulated 
by the software (Program List- 
ing), which receives characters 
by interrupting the normal flow 
of I/O. This I/O in the TRS-80 is 
handled by ROM driver routines 
which are pointed to by vectors 
in RAM. By placing our own rou- 
tine addresses in these vectors 
we can handle I/O as we like. 
The vectors are at these loca- 
tions: 



84 • 80 Microcomputing, September 1980 



v 



•: c • 


• 3 :• 


•: c . 


:A C : 


• ] :• 


•] c • 




TTY 25 WAY SOCKET 



Fig. 2. 



16406 + 7 - Keyboard driver 
16414 +• 5 -video driver 
16422 + 3- line print driver 



The heart of the TTY output 
software is the routine called 
OUT, which is called every time 
a zero bit is to be output. This 
issues a positive-going pulse of 
about 0.1 ms. to transistor Q1, 
inverting the pulse to trigger the 
pulse-stretcher half of the 556. 

This, in turn, switches high for 



9.09 ms. (determined by time- 
constant R5/VR1/C3) satisfying 
the requirement of the TTY. To 
output a one, the routine is 
merely ignored for 9.09 ms., as 
the 556 reverts from a zero after 
its time-constant has expired. 
The rest of the routine shifts the 
character and tests each bit to 
see if a zero or one is required. 

Adjusting VR1 

When the software is loaded 



VIDEO 

COID3 



CASSETTE 




CASS IN 
CASS OUT 



VI0E0 PIN 
OUTLET 




^ 



CASSETTE 
PIN OUTLET 



25 WAY TTY SOCKET 



Fig. 3. 



and the TTY hooked up, the 
simplest way to adjust preset 
VR1 is to line print an unbroken 
string of U*. These two charac- 
ters have bit patterns of 
01010101 and 10101010, which 
are ideal for testing. 

VR1 should then be adjusted 
for a mid position that prints the 
string with no errors. To in- 
crease the baud rate to 300, the 
time constants at NBIT and WT 
are altered to 218 and 652, re- 
spectively. VR1 is then adjusted 
as above to give a 3.33 ms. 
pulse. Other baud rates can be 
accommodated in the same 
way. 

To perform LPRINTS and 
LLISTS, the line print vector at 
16422 is replaced with the ad- 
dress of the TTY driver routine 
described above. To get the op- 
tion of screen print to TTY, the 
vector at 16414 is then pointed 
at the routine SPRINT. This rou- 
tine always prints on the screen 
first, and, before outputting to 



the TTY, checks to see if the 
character is either an up arrow 
or a shift @. If it is a shift @, the 
routine disables itself from any 
further screen-to-TTY output; if 
it is an up arrow, the output is 
enabled. Keying or printing 
these characters allows this op- 
tion to be switched on or off. 

The keyboard input from the 
TTY is handled by the other half 
of the 556, which triggers an 
unstable pulse. When the TTY 
outputs zero bits, the 556 chops 
the voltage into pulses that can 
be detected when input through 
the cassette port. 

If the voltage wasn't chopped, 
then there would be no way of 
knowing whether consecutive 
bits were zeros or ones. The cas- 



1 i I I 1 



Mvn 



TTY OUTPUT 



556 OUTPUT 



I | | | 1 | 1 



Fig. 4. 



Program Listing. 




00320 


RET 


Z 


DON'T PRNT IF TTY 


CHR 








00330 


CP 


14 






00050 


ORG 


7E00H 


00340 


JR 


C, LPRINT 


;C/R L/F ETC 




00060 SETU 


LD 


HL, SPRINT 


00350 


CP 


16 






00070 


LD 


(16414) ,HL;SCRN PRNT DR ADDR 


00360 


RET 


C 


•CSRSR ON/OFF 




00060 


LD 


HL, LPRINT 


00370 


CP 


28 






00090 


LD 


(16422) ,HL;LINE PRNT DR ADDR 


00380 


JR 


C, LPRINT 


;CRSR MOVES 




00100 


LD 


HL, START 


00390 


CP 


32 






00110 


LD 


(16406) ,HL;KBD DR ADDR 


00400 


JR 


CCRLF 


; SCREEN CNTROLS 




00120 


JP 


6CCH ;TO TRSDOS DO A 'RET' 


00410 LPRINT 


LD 


A,C 


;LINE PRINT ENTRY 




00130 






00420 


CP 


10 






00140 SPRINT 


CALL 


1112 ; PRINT ON SCREEN 


00430 


JR 


C , NOLF 






00150 


PUSH 


AF 


00440 


CP 


14 






00160 


CALL 


CHKIT ; CHECK TTY PRNT 


00450 


JR 


C,CRLF 






00170 


POP 


AF 


00460 NOLF 


LD 


A,C 






00180 


RET 




00470 


AND 


0C0H 


;TAB? 




00190 ;***ENTERS WITH 


CHAR. IN C*** 


00480 


CP 


0C0H 






00200 CHKIT 


LD 


A,C 


00490 


LD 


A,C 






00210 


LD 


HL,LP 


00500 


JR 


NZ,TBC 


;NO 




00220 


CP 


96 .'SHIFT £ - DISABLE 


00510 


PUSH 


BC 






00230 


JR 


NZ,CHK27 


00520 


LD 


A,3FH 


;MASK 




00240 


LD 


(HL),201 ;RET 


00530 


AND 


C 


;■> • TAB SPACES 




00250 CHK27 


CP 


91 ; UP- ARROW - ENABLE 


00540 


LD 


B,A 






00260 


JR 


NZ,LP 


00550 


LD 


C,20H 






00270 


LD 


(HL) ,183 ;OR A 


00560 TAB 


CALL 


LPRINT 






00280 LP 


RET 


.•INITIALLY DISENGAGED 


00570 


DJNZ 


TAB 






00290 


LD 


HL,CHAR 


00580 


POP 


BC 






00300 


CP 


(HL) 












00310 


LD 


(HL),0 ;TURN OFF TTY FLAG 








Program continues 



80 Microcomputing, September 1980 • 85 



(202) 337-4691 



4200 Wisconsin AweN'A PQBox96C° Washington DC. 20CR6 



Iftll programs for TRS-80 
16k, Level II computer. 



SUPER 
NOVA 



by Bill Hogue from Big Five » 
This arcade game of shooting 
asteroids and alien ships is 
written in machine language and is 
the best we have seen on any 
computer. There are five different 
types of alien ships including the 
very deadly Flagship. You shoot 
from your ship, rotate it, use your 
thrust key to move, and in 
emergencies you go into hyperspace. 
Level 1 or 2 - $14.95 




i w m ne hmo w the ulice m. 

i SIGN VAN 



DISK SCOPE 



canw? 



Scenp from QUEST 



5TM CHI5EI 



SHIP 



^aVSsTnShmhtim; tumtttt* 



amni (-> 



'CUtWKDE 1 



(0 

(ffl 

• sara _ _ 

m% 

• SWPSTHTUS. 
FIOflEBl » 
SOUtlEBt m 
»SVST0£i 1 

WUNMBEi ffORH 



<"i BSL- 

J«) (BET/I 



Star Cruiser 

from Computer Simulations 
You are on the side of the bad 
guys, the Empire. Program includes 
fighter combat, ground action, 
hyperdrive, garrisoning, retaking 
the 10 system capitals and avoiding 
the Rebel Star Fighter groups. The 
Star Cruiser is your last hope. 
$14.95 



sm sns *■ mm. 

Advent 

with GRAPHICS & SOUND 

by Robert Nicholas from Mad Hatter 
These two adventures are similar to 
most others where you use two word 
sentences to explore. But these 
also show you the 'rooms' and have 
sound effects 1 

In QUEST you travel in search of 
fame, fortune, treasures, monsters 
and more. Three levels of play 
with a random set up of each game. 

As the detective in SLEUTH you 
try to solve a murder. The victim, 
weaoon and murderer will be 
different each game. 
On cassette $14.95 each. 
On disk $24.9? for both. 



Checker 




by Michael Marks from Personal 
Play checkers against the computer 
in one of eight levels of skill. 
Features include saving board 
positions, switching sides, going 
back a move and letting it play 
against itself. Also includes 
three checker puzzles. Level 1 or 
2 - $19.95 



from Strategic Simulations 
The historic war game that 
accurately simulates the epic 
battle between the German 
battleship and the British Home 
Fleet. Features a computer 
controlled mapboard of the North 
Atlantic, hidden movement, ship 
vrs. ship combat and shadowing, 
firepower and damage, historic 
setup of the ships, and both 
two-player and solitaire 
scenarios . 

Cassette $49.95 Disk $59.95 
Coming soon Computer Ambush 







Microco: 



Pigskin 



by JcJBT Laurence, Rick So then and 
Walter Gavenda from Acorn 
In this football gare you call the 
plays, watch the thirty-second 
clock, and get called for penalties 
if you aren't careful. There are 
eleven offensive and seven 
defensive plays. Features graphic 
display of field, the ball, and 
statistics on the scoreboard. You 
can play against the program, 
against a friend, or watch the play 
in the spectator mode. 
Protected cassette $14.95 
Protected diskette $20.95 

86 • 80 Microcomputing, September 1980 



from Basics & Beyond 

Combined these two packages 
contain fifty solid programs. 

MICROCOSM I contains 16k-Memory 
Test, Atlantis, Biorhythms, 
Calories Food, Calories 
Ingredients, Challenge Match-em, 
Checkbook Balancing, Country Guess, 
Day Of The Week, Divisor Game, 
Driver, Eliminate, Factorials, 
Fakeout, Flowering Houseplants, 
Home Insurance, Instruction Test, 
Magic Squares, Match-em, Math 
Tables Drill, Metric Conversion, 
Morse Code, Mortgage, Music 
Transposition, News Photographer, 
Remainder, South Pole, Spelling 
Drill, Spelling Review, Wipe-out. 

MICROCOSM II contains Algebraic 
Factoring, Base Conversion, Blank 
Slate, Decipher, Doodle Art 1, 
Electrical Use, Explore, Fish, 
Foliage Houseplants, Isolation, 
Perspective Racer, Planet Finder, 
Prefix Study and Ouiz, Roman 
Numerals, Shooting Gallery, 
Spelling Bee, Stains, State Guess, 
Suffix Study and Quiz, Trivia 
Quiz. 

Each available on two cassettes 
for $19.95 



from Instant 
This diskette contains three programs to 
•check out your disks. You can find the 
tracks and sectors where a file is 
stored with FILELOCK. With COISK you 
can read the ASCII and hex 
representation of any sector. PASSWORD 
will qive you the password for any file 
or any disk. $19.95 



from Instant 

Access to any byte on a diskette is 
possible with the machine lancuage 
utility. You just give either the track 
and sector or the filename in order to 
alter, add, delete, or view 
information. 

You can also search a diskette for 
string of characters. And the data can 
be dumped to a printer. Both the 35 and 
40 track versions are on the same 
diskette. $39.95 



by mlnGelder 



by 

Single-step/TRACE/Disassembler for TBUG. 
Variable speed TRACE mode lets you run 
any Z80 machine language program under 
total control. Includes intelligent RAM 
window, foreground background 
breakpoint inq, and more. TBUG required. 
$19.95 




ay Peter Chariton 
You can literally translate BASIC 
programs into Fortran with this program 
which assumes that you know Disk BASIC 
and Fortran. It will not do a complete 
translation because of the differences 
between the languages. For example, 
subroutines, 'THEN,' string handling and 
disk operations are different. But for 
a programmer this utility is a good 
start. Requires Microsoft FORTRAN. 
$24.95 on disk. 
FORTRAN available for $95.00 

BaoooaauoauQOQQOcaaoGoaoooaaaaaaoaaaasaci 



THE PROGRAM STORE 
4200 Wisconsin Ave NW 
P.O. Box 9609 Dept. K 3 
Washington DC 20007 



VISA AND 

MASTERCARD 



TO ORDER 
FREE 



800- 



For program Information call 
(202) 337-4691 



Mail orders ; Send check or 
money order for total purchase 
price, plus $1.00 for shipping 
t handling. Charge card cus- 
tomers, please include card 
number, expiration date, and 
your name as it appears on the 
card. 



00598 




RET 






00600 


TBC 


CALL 


PRNT 




00610 




LD 


A,0 


;WILL BE CHR CNT 


00620 


CRCNT 


EQU 


$-1 




00630 




DEC 


A 




00640 




LD 


(CRCNT) , 


A 


00650 




RET 


NZ 




00660 


CRLF 


LD 


A, 13 


;C/R 


00670 




CALL 


PRNT 




00680 




LD 


HL,5000 


;TIME FOR 


00690 




CALL 


WAIT 


; CARRIAGE RETURN 


00700 




LD 


A, 10 


;LINE FEED 


00710 




CALL 


PRNT 




00720 


LLEN 


LD 


A, 64 


;CHRS PER LINE 


00730 




LD 


(CRCNT) , 


A 


00740 




RET 






00750 


PRNT 


DI 






00760 




OR 


A 


;CHK PARITY 


00770 




JP 


PE,P1 


;NO PRTY BIT NEEDED 


00760 




OR 


128 


;IF ODD PARITY 


00790 


PI 


LD 


D,A 




00800 




CALL 


OUT 


;0 START BIT 


00810 




LD 


B r 8 




00820 


NBIT 


LD 


HL,625 


;110 BAUD DLY 


00830 




CALL 


WAIT 




00840 




LD 


A,D 




00850 




AND 


1 


;0 BIT TO BE O/P? 


00860 




JR 


NZ, SHIFT; IF NOT 


00870 




CALL 


OUT 


;0/P BIT 


00880 


SHIFT 


SRL 


D 




00890 




DEC 


E 




00900 




JR 


NZ.NBIT 




00910 




EI 






00922 


WT 


LD 


HL,2300 


;TIME FOR STOP BITS 


00930 


WAIT 


DEC 


HL 


. * 


00940 




LD 


A,L 


;* DELAY 


00950 




OR 


H 


;* LOOP 


00960 




JR 


NZ,WAIT 


. * 


00970 




RET 




. * 


00980 


OUT 


LD 


A,l 




00990 




OUT 


(255), A 


•PULSE LOW 


01000 




LD 


A, 14 


; PULSE 


01010 


PLSE 


DEC 


A 


; WIDTH 


01020 




JR 


NZ,PLSE 


; DELAY 


01030 




LD 


A, 2 




01040 




OUT 


(255), A 


; PULSE HIGH 


01050 




RET 






01060 










01070 


START 


DI 






01080 




IN 


A, (255) 




01090 




AND 


80H 


;TEST, AND.. 


01100 




JR 


NZ,GBIT 


;GOT A START BIT 


01110 




EI 






01120 




JP 


995 


;TRY TRS-80 KBD 


01130 


GBIT 


LD 


B,8 




01140 


NXBIT 


CALL 


INBT 


;GET I/P BIT 


01150 




LD 


HL,CHAR 


;ADDR OF CHR 


01160 




SRL 


(HL) 


;SHFT RDY FOR 


01170 




OR 


(HL) 


;NEXT BIT 


01180 




LD 


(HL) ,A 


; RE -STORE 


01190 




DJNZ 


NXBIT 


;IF MORE BITS 


01200 




PUSH 


AF 




01210 




CALL 


INBT 


;1ST STOP BIT 


01220 




CALL 


INBT 


;2ND STOP BIT 


01230 




EI 






01240 




JR 


NZ,STOP 


;MUST BE NZ 


01250 




POP 


AF 


; ASSUME BREAK 


01260 




LD 


A,l 


;LIKE ROM 


01270 




PUSH 


AF 




01280 




JR 


LF 




01290 


STOP 


POP 


AF 




01300 




INC 


A 


;TEST CHR 


01310 




JR 


Z , START 


; IGNORE IF DEL 


01320 




DEC 


A 


;TEST CHR 


01330 




JR 


Z , START 


.•IGNORE IF NUL 


01340 




AND 


7FH 


;CHOP PARITY BIT 


01350 




LD 


(CHAR) ,A 


; STORE WITH NO PARITY 


01360 




PUSH 


AF 




01370 




CP 


13 


JC/R? 


01380 




JR 


NZ,FINI 




01390 


LF 


CALL 


CRLF 




01400 


FINI 


POP 


AF 




01410 




RET 






01420 


INBT 


PUSH 


HL 




01430 




LD 


HL,15AH 


;WAIT FOR RESET 


01440 




CALL 


WAIT 




01450 




OUT 


(255), A 


; RESET LATCH 


01460 




LD 


HL,12DH 


;WAIT FOR I/P 


01470 




CALL 


WAIT 




01480 




IN 


A, (255) 


; GET LATCH STATE 


01490 




CPL 




;GET RIGHT WAY RND 


01500 




AND 


80H 


;ELIM OTHER BITS 


01510 




POP 


HL 




01520 




RET 






01530 


CHAR 


DEFB 





;TTY CHR STORE 


01540 




END 


SETU 





sette input latch is only set 
when a pulse is input to it. If a 
steady voltage caused by a se- 
quence of zeros or ones is input, 
then it just remains in its last 
latched state. Fig. 4 shows how 
this is overcome. 

Fig. 4 shows that the cassette 
input latch will be set/reset dur- 
ing a zero and reset during a 
one. This is detected by the soft- 
ware and merged into a byte. 

If the software does not de- 
tect a start byte during its scan, 
then the TRS-80 keyboard is 
strobed, allowing either key- 
board to be used. The timing of 
this part of the circuit (VR2) 
must be set up with care. If the 
frequency from the 556 is too 
high, an extra transition is 
possible, which gives a false 
zero; if it is too low, then the 
software is likely to detect a 
pulse hanging over from the pre- 
vious one. 

Break Detection 

A simple break detection may 
be employed by connecting a 
390K resistor in series with a 



250K preset between the posi- 
tive rail and the junction of R6 
and R7. This causes the 556 to 
free-run if the TTY is discon- 
nected, and the frequency can 
be set to represent a train of 
zeros, which can then be detect- 
ed by software. 

One useful bonus from using 
cassette pulses to drive the TTY 
is an off-line print facility. By 
recording the driver pulses on 
cassette and replaying them 
through the record jack, a print- 
out can be stored on cassette 
and output from cassette player 
to TTY as often as required with- 
out re-running the original pro- 
gram. 

This gives you a unit which is 
even more versatile than a nor- 
mal printer and can be used with 
or without an expansion inter- 
face. ■ 



Cl .005 M F 
C2 150 pF 
C3 68 uF 
C4, C6.1 uF 
C5 .01 M F 
VR1 I0K 
VR2 47K 



Parts List 
R1 330K 
R2 560 K 
R3. R5 4K7 
R4, R6 22K 
R7 150K 

Qi medium gam NPN 
IC1 556 dual timer 




What microcomputing magajine has the most pages of articles every month? Right 
Kilobaud MICROCOMPUTING II you're interested in learning more about computer- 
and what is going on with the Apple. PET. and all the other popular systems, you 
should have KM. Remembei that your monthly magazines are your best compulrr 
library. Subscribe no* 



□ New subscription 
n Payment enclosed $ 
D VISA [ I MC 

Card* 



□ Renewal 



Signature 

Name , 

Address 
City 



D 12 issues (or $25.00 

! I 24 issues (or S38.00 

J AE D Bill me 'J 36 issues for $53.00 



Interbank # 
Exp. date 



State 



Zip 



— tor even faster ordering service can toll tree (800/ 258-5*73 
Canadian: $27. one year only, U.S. funds. Other foreign: 
$35. one year only. U.S. funds. Please allow 6-8 weeks for 309B8 

^deliver*/. J 

MICROCOMPUTING • POB 997 • Farmingdale NY 1 1 737, 



80 Microcomputing, September 1980 • 87 



UTILITY 



A hardworking utility that saves time and space. 



Document 
Those Variables 



William Noel 
15 Kings wood Ct. 
Columbus, GA 31907 



You've just received some- 
one's advanced Star Trek 
game and want to soup it up a 
little or maybe update it to the 
movie version. Now comes the 
tedious part. You must sift 
through the program trying to 
figure out how and what variable 
names are used. 

One long night I sat peering at 
the screen with bloodshot eyes 
trying to shift @ the program 



list, while trying to remember 
what had disappeared ten lines 
ago. Either inspiration or 
desperation hit me: Why not get 
my TRS-80 to help with this 
lengthy effort? 

Program Text Area 

First, I had to figure how the 
information was coded In the 
BASIC text area. Program List- 
ing 1 helps examine this area of 
memory. It begins at location 
17129, where the memory con- 
tents are PEEKed and printed. If 
the memory byte contains a nor- 
mal screen character, this sym- 



239 




66 


3 


1 









132 




■ 




250 




66 


B 


5 









73 


1 


32 




213 




73 


1 


205 




49 


1 







14 




67 


c 


10 









72 


B 


32 




213 




32 




229 




4 


( 


49 


1 


55 


7 


49 


1 


50 


2 


57 


9 


205 




71 


G 


71 


G 


41 


) 







26 




67 


C 


20 









71 


G 


71 


G 


213 




71 


c; 


71 


G 


205 




49 


1 







40 


( 


67 


C 


30 









178 




32 




72 


H 


59 

•5 


; 


34 


" 


32 




32 




34 


- 


59 




i 




76 


L 


67 


c 


4 


{ 







143 




32 




72 


H 


212 




51 


3 


49 


) 


32 




210 


• 


32 




72 • 


u 


214 




57 


9 


49 


1 


32 




202 




32 




17 8 




32 




247 




41 


( 


72 


H 


41 


) 


44 


, 


32 




5B 


t 


149 




32 




17 8 




34 


■ 


34 


" 


44 


, 







96 




67 


c 


SI 


2 







143 




32 




7 3 


I 


213 




54 


6 


48 


1 


32 




137 




32 




Bl 


Q 


58 




32 




73 


I 


213 




4S 





1 




104 




? 
















67 


c 


60 


< 







141 




32 




53 


5 







• 









4 




e 




73 


I 






Fig. 1. Out of Memory Display. 







bol is also shown. 

After much trial and error in 
analyzing memory displays I 
have discovered that the first 
two positions of each line point 
to the memory location begin- 
ning the next line. The BASIC in- 
terpreter can use this, for exam- 



ple, to avoid the delay of trying 
to decode remark lines during a 
program run. 

The third and fourth locations 
represent the line number itself. 
Table 1 shows this coding for 
the first two lines of our memory 
display program. 



65000 AS L M N AS C 
65005 D T D T D E T 
D I 8 6 

u u z s s 
z z 



65010 
65012 
65015 
65020 
65030 W 
65040 W 
65050 W 
65060 Z 
65080 Z 
65090 J 
65100 Z 



TEJTSFEE 



65110 YS Z S S S S S 

65120 YS Y$ S T YS Y$ T 

65140 YS F A 

65150 AS A YS 

65160 AS A YS 

65170 B C A 

65180 ASBASBLBLBMBMBNBNBB 

65190 C C C 

65200 ASAYSLAEMAENA 

65210 MAEMAENANA 

65220 A 

65230 A 

65240 A C 

65250 ASALAMANAKKKRK 

65260 A 

65270 

65280 T U U U 



Fig. 2. Variable Hunt. 



1 CLS 
5 I -1+1 

10 H = PEEK(17129+GG) 

20 GG=GG+1 

30 PRINT H;" "; 

40 IF H>31 AND H<91 THEN PRINT CHRS(H), ELSE PRINT* 

50 IF 1=60 INPUT Q: 1=0 

60 GOTO 5 



Listing 1. 



88 • 80 Microcomputing, September 1980 



Listing 2. 



65000 



5010 



"RESET BEGINNING OF TEXT i DEFINE TABLE' 

POKE 16548, 233:POKE 16549,66 :CLEAR 200:CLS:DIM AS ( 
100), LU00), M(100), N(100) :AS(1)="[*:C=1:S»1 

'GET NEXT LINE, THIS LINE, PRINT, AND CHECK IF THROUGH' 
GOSUB 65 280:D-T:GOSUB 65280 :D-T*256+D:GOSUB 65280: 
E-T:GOSUB 65280 : £-T*256+E: PRINT"" : PRINT E;:J-0: 
T»1:S-1:F-0:IF E-65000 GOTO 65240 

'FINISH LAST CHARACTER OF TEXT LINE' 

IF D-17129+U THEN Z«S: S-l :U»U+1 :GOTO 65015 



5012 'CHECK IF LINE HAS ENDED; OTHERWISE GET NEXT LOCATION' 
IF D=17128+0 THEN U=U-l:GOTO 65005:ELSE Z-S:S-T: 
GOSUB65280 



5015 'IF LONG VARIABLE NAME, SKIP REST' 

IF F-l AND Z>64 AND Z<91 GOTO 65010 

5020 'WHEN A REMARK COMMAND, JUMP TO NEXT LINE' 
F«0:IF Z-147 THEN U-D-17 1 29 :GOTO 65005 

5030 'BEGIN SKIP OF CHARACTERS FOLLOWING A " ' 
IF W-0 AND Z-34 THEN W-l:GOTO 65010 

5040 'END SKIP WHEN THE 2ND " IS REACHED* 

IF W-l AND 2=34 THEN W-0:GOTO 65010 

5050 'SKIP CHARACTERS BETWEEN' 
IF W-l GOTO 65010 

5060 'WHEN : IS REACHED, RESET THE DATA COMMAND SKIP' 
IF Z = 58 THEN J»0 

5080 'SET TO SKIP IF A DATA COMMAND' 
IF Z-136 THEN J-l 

5090 'DATA COMMAND SKIP' 

IF J-l GOTO 65010 

65100 'ALLOW ONLY LETTERS IN 1ST CHARACTER' 
IF Z<65 OR Z>90 GOTO 65010 

5110 'BUILD 1ST LETTER, CHECK IF VALID 2ND CHARACTER' 

YS-CHRS(Z) iIF(S<48 OR S>57) AND (S<65 OR S>90) AND 
S<>36 GOTO 65140 

5120 'ADD 2ND CHARACTER, ADD 3RD CHARACTER IF $ ' 
Y$«Y$+CHR$(S> :IF T-36 THEN YS-YS+CHRS (T) 

5140 'PRINT VARIABLE AND BEGIN TABLE SEARCH' 
PRINT YS;" "j:F-l:FOR A-l TO 100 

5150 'TRY AGAIN IF VARIABLE NOT YET REACHED' 
IP A$(A)<Y$ GOTO 65230 

5160 'FIND THE MATCHING VARIABLE' 
IF A$(A)-YS GOTO 65210 



'BEGIN SHIFT TO MAKE ROOM FOR NEW VARIABLE' 
FOR B-C TO A STEP-1 

'SHIFT OVER 1 WORKING RIGHT TO LEFT' 

AS(B+1)-AS(B) : L(B+1)=L(B): M(B+1)=M(B): N(B+1)=N(B) 
:NEXT B 

'INCREASE TABLE ENTRY COUNT AND CHECK IF OUT OF ROOM' 
C-C+1:IF C-100 STOP 



'INSERT NEW VARIABLE' 

ASIA)»YS: L(A)=E: M(A)-E: N(A)=1: GOTO 65220 



'WHEN THE SAME VARIABLE, UPDATE FOR THIS LINE' 
IF M(A)OE THEN M(A)-E: N(A)»N(A)+1 



65220 'CAUSE AN EARLY END TO THE TABLE SEARCH' 
A-100 



65230 

5240 

65250 

5260 

5270 
65280 



'CONTINUE TABLE SEARCH OR GET NEXT TEXT POSITION' 
NEXT AsGOTO 65010 

'BEGIN DISPLAY OF VARIABLE SUMMARY' 
PRINT"": FOR A*l TO C-l 

'PRINT SUMMARY AND WAIT IF A FULL SCREEN' 

PRINT AS(A) ,L(A) ,M(A) ,N(A) , : K=K+1:IF K=15 THEN 
INPUT R:CLS:K=0 

'PRINT THE NEXT LINE' 
NEXT A 



•GET THE CURRENT POSITION OF TEXT i MOVE COUNTER TO NEXT' 
T-PEEK(17129+U) : U-U+l: RETURN 



Note: Up arrow appears as left bracket in listings. 
Note: Line 65005 allows the program to run independently. 



As you can see, the line num- 
ber code has the least signifi- 
cant value first. This seemingly 
backwards way of coding is the 
manner the TRS-80's micropro- 
cessor handles two-byte num- 
bers. 

Look a little closer at the next 
line pointer which also has this 
reverse sequence. 

A byte, of course, has eight 
bits that can be turned either off 
or on representing either zero or 
some numeric value. A code of 
two bytes gives a total of 16 bits 
to represent a memory address 
in the next line pointer's case. 

Each of these 16 bits are num- 
bered 0-15 and represent, when 
on, a value based upon their lo- 
cation number. Beginning with 
bit having a value of 1(2° = 1), 
two is multiplied times the prior 
bit value. These values are 
shown in Table 2. 

Looking at byte 1, you can 
create total values from to 255 
by adding different bit combina- 
tions. This matches the range of 
values generated by PEEKS into 
memory. After looking at both 
bytes together in this manner, it 
is easy to see why the first byte 
should represent the low order 
value. 

Adding all 16 of these bit 
values together results roughly 
in the largest memory value and 
line number that can be repre- 
sented in two bytes. This figure 
totals to 65535. 

When I say it is a rough max- 
imum, I am referring to the line 
number. For some reason that I 
have yet to find, we are restrict- 
ed to an upper line number limit 
of 65529, although the coding 
possibilities will allow six more. 
But who's going to need them 
with over 65000 available? 

Of course, in BASIC we must 
deal with one byte at a time 
while using the PEEK state- 
ment. It is possible to convert 
the second byte to its proper 
value by multiplying it by 256. 

Convert line one's next line 
pointer: 



239 + (66-256) = 17135 

This result matches the first 
memory byte of line five. 



Text Coding 

Fig. 1 shows the complete 
text area for the memory display 
program. The variables I, H, GG, 
and Q are kept in normal screen 
and keyboard coding. 

But the statements and func- 
tions CLS, PEEK, PRINT, IF, 
AND, ELSE, INPUT, GOTO, =, 
+ ,>,<, CHR$ have all been con- 
verted to a one-character 
special code. 

This conversion in addition to 
saving memory also makes it 
easier to identify program vari- 
able names. PEEK won't be con- 
fused with the variable name PE. 
The same is true of other state- 
ments and variables. 

Listing 2 shows a program 
that picks out variables. At the 
same time the program saves 
the first line number, last line 
number, and number of total line 
occurrences for each variable. 

When a program line contains 
a remark, everything following it 
will be ignored by Level II ma- 
chines. When you enter these 
program lines, either leave out 
the remarks or enter them at dif- 
ferent line numbers. 

Figs. 2 and 3 show the screen 
results of this program analyz- 
ing itself. Fig. 2 shows the pro- 
gram as it progresses through 
the text Identifying each line 
and the variables found in that 
line. Fig. 3 shows the screen 
summary displayed when that 
run is finished. 

Table 3 defines each variable 
used in the variable documenta- 
tion program. 

Now that we have a program 
that documents variables, an- 
other bothersome detail crops 
up. This program must be in the 
same text area as the program It 
will analyze. 

The July, 1979, issue of Radio 
Shack's Microcomputer News- 
letter, includes a method for 
adding a BASIC program by key- 
ing it in at the end of existing 
text contents. The flowchart in 
Fig. 4 shows the steps involved. 

After trying it a few times. I 
looked for an easier way. What 
was this PEEKing and POKEing 
really accomplishing? 

With our knowledge of the 
coding technique for current 
line number and next line loca- 
tion, let's convert the last two 



80 Microcomputing, September 1980 • 89 



WE MEAN BUSINESS! 

BUSINESS SOFTWARE. THAT IS 



TRS-80 



USE YOUR 
FOR MORE 
THAN FUN AND GAMES 



THE DATA DOBBER S49.95 

Duplicates any program tape (o TRS-80 quality Recon 
struct* date pulses to ensure accurate CLOADs Permits 
easy loading ol even poor quality commercial tapes with 
out constant volume adjusting Money back guarantee if 
not satisfied 



THE ELECTRIC SECRETARY $75.00 

A powerful word processor to turn your TRS 80 into an 
automatic typewriter Features page numbering, movable 
margins, headers variable page length, and title centenng 
Enter text, revise, correct and output to pnntet page lor 
matted lusulied. even hyphenated as required Cross 
< oupling files permits individuals addressed form letters 
Complete with upper, lower case conversion information 
on diskette Specify if RS 232 adapter is installed in 
mterta< e 

MAILROOM PLUS $75.00 

A versatile and powerful mailing program to pnnl labels 
by sequential coding up city, state customer ID code, 
even last IHUne Sorts by any code in minutes and stores 
sequentially in a single stnnq (appron 1500 rei Olds pel 
dbkene) Includes AUTOPRtfl Suppked on dbtane 

MIMIMAIL $50.00 

* < (impact version ol MAH.ROOM PLUS hut without 
customer coding Features alpha lookahead for dupli 
cates Supplied on (fat 

FORMLET $35.00 

Generates form letters from MINIMAIL records Prepare 
you lettei bulletin notn e advertisement etc then load 
the MINI/VWIl tiles You. pnnlei will pnnl the KttKfe 

address lettfi and repeal tei each name m Ihe IHc .hi 
property spaced and |usUfled Suppked on cassette 

AUTOBOOT $ 1 5.00 

Simplifies .mi. imatx BASK program loading from you 

DOS Permits sequencing through your choice of DOS 
commands selects files and memory sue you spec ify. and 
loads or runs selected program Allows user to see direc 
tory and free space before program runs automatically 
Supplied on < assette 

SIR ECHO $10.00 

A handy program to make your pnntei work like an 
elect™ typewriter Use alone or merge with your programs 
to make what appears on the s- KCn echo 10 the pnntei 
Supplied on I assette 

TELEFOP1 $20.00 

Make youi I RS 80 a smart terminal tommunu ate with 
time share and other computers bulletin boards et< 
Translei programs over the phone For disk systems with 
modem 

UPPER/LOWER CASE CONVERSION $20.00 

Repnnt of KILOBAUD article explaining how to modify the 
TRS80 to display both upper and lower case characters Kit 
contains stet»by step instructions parts, and necessary soft 
ware on cassette for case reversal, echo, and automatic l»ie 
feed mobiles 



User group discounts available 
Dealer inquiries invited 



'TRS-80 is a trademark ol me Tandy Corp 



TERMS Check money or 
der Visa Masteicharge 
Washington residents add 
S 3% 'or tax 



THE PERIPHERAL PEOPLE 

PO. Box524,Dep't.M 
Mercer Island, WA 98040 

' *-43 (206)232-4505 



LOWER CASE & GRAPHIC 

SYMBOLS GENERATOR KIT 

FOR TRS-80" CG 16 $94.50 



!»*.«.' < >•♦,-. ^OI23456?S9i • <•>■> 
i>w8i.' DEFGM I JKl Ml tOPOPSTUVUXY? t » » • _ 

»*«••— us, 1 1 fa 

• • ■ ■ 1 ^"^^^™^ • • ■ 1 1 1 1 rri^^^r^r^rw 

r-.T, • ©o- 1 1+ -.-♦♦♦» 

^~~~-^J A W r H 1 rV ". ."jiOI 



TRUE ? LINE DECENDER LOWER CASE ELECTRON 

IC SYMBOLS THIN LINE GRAPHICS GAME SYM 

BOLS TEXTURED BACKGROUNDS AND MANY 

MORE DEMO CASSETTE IS INCLUDED 

FULLY ASSEMBLED WITH DETAIL INSTRUCTION 

FOR EASY INSTALLATION 

REOUIRES ELECT PENCIL TYPE LC MOD OR 

OROER MEMORY AND SWITCH KIT SMK FOR $18 50 



SYNCHRONOUS DATA 
SEPARATOR FOR DISK USERS. 
SDS $34.50 

THE SYNCHRONOUS DATA SEPARATOR WILL 
ELIMINATE 100% OF THE SOFT READ ERRORS 
AND SPEED UP DISK ACCESS TIME BY ELIMIN- 
ATING RETRIES BY THE DISK CONTROLLER 

THE SDS PLUGS INTO THE DISK CONTROL- 
LERS SOCKET AND HAS ONLY TWO WIRES TO 
CONNECT NO TRACES HAVE TO BE CUT IT IS 
THE MOST RELIABLE AND ACCURATE DATA 
SEPARATOR AVAILABLE 



AODS2 50FORS JM CALIF RES ADD6SSALE TAX 
SEND CHECK OR MONEY ORDER TO 

G.P. ASSOCIATES *** 
P.O. BOX 22822, SACRAMENTO, 
CA 95822 (916)3920257 

TRS 80 IS A TRADE MARK OF TANDY CORP 



TRS-80 
MODEL II 






$ 3,499°° 

IIS 1 ONLY <449 

I6K Level II (INI Y *TV\ 
L ,st$849 unLT (J3 

Also BELOW LIST PRICES on disk drives, 
printers software, peripherals 



SEIDEL'S ELECTRONICS 

r fl 94 & Vail St , Blairstown. N J 07825 

(201) 362-6191 *m 

Radio /hack- - 



CASIO 

Calculator Watch 

Tim* - Calendar Display 
8 Digit Calculator 
Stopwatch 

$42.95 
F80 Alarm Chronograph $26.95 




TELEPHONE ANSWERING 

SANYO M139N $99 

SANYO 9918 Remote $239 

RECORD A CALL 80A $199 

RECORD A CALL 90A NEW! WRITE 

fH73 FLIP-PHONE 

S36.95 



Mattel Intellivision 
$239.95 




ALSO Atari Sharp Cobra JVC 
SONY Panasonic 



Master Card VISA 

SYNAPSE VIDEO "™ 

P.O. BOX 962 

NEW YOnK,N.Y.10009 



THE BOOKKEEPERS 



FOR INFO CALL (603)-447-2745 



Full Charge Bookkeeper-48K, 3 DRIVE, w/ALPHA $199.95 

Intermediate Bookkeeper-48K, 2DRIVE & Printer $189.95 

Cheap Bookkeeper— 32K, 2DRIVE & Printer $175.00 

All Above Are Daily journal— G/L Systems 

Hex Code Converter, Loan Payment Finder, & 

Amortization Table, 16K, 1DRIVE & Printer-ALL 3 $29.95 

STURDIVANT & DUNN, INC. ^82 

BOX 277, 124 WASHINGTON ST., CONWAY, NH, 03818 



90 • 80 Microcomputing, September 1980 



A 


65140 


65260 


11 


AS 


65000 


65250 


6 


B 


65170 


65180 


2 


C 


65000 


65240 


4 


D 


65005 


65020 


4 


E 


65005 


65210 


3 


F 


65005 


65140 


4 


J 


65005 


65090 


4 


K 


65250 


65250 


1 


L 


65000 


65250 


4 


M 


65000 


65250 


5 


N 


65000 


65250 


5 


R 


65250 


65250 


1 


S 


65000 


65120 


6 


T 


65005 


65280 


4 


U 


65010 


65280 


4 


N 


65030 


65050 


3 


Y$ 


65110 


65200 


6 


1 


65010 


65110 


10 




Fig. 3. Variable Summary. 





Lin* 

Number 

1 Memory 
Location: 
Value: 

Character: 



Next Line Current Line Program Statements Trailing 
Pointer Line Number Character 



17129 30 

239 66 

B 



Memory 

Location: 17135 36 

Value: 250 66 

Character. B 



31 32 
1 



37 38 
5 



33 

132 



39 40 41 42 43 44 
73 32 213 73 205 49 
I Space I t 



45 



Table 1 First two lines of Memory Display Program. 



Byte 

1: Bit No. 
Value i 



64 



7 
128 



Bit No. 9 10 11 12 13 14 15 

Value 256 512 1.024 2.040 4,096 8.192 16.364 32.768 

Table 2. Two Byte Numbers. 



A Counter for table search 

A$ Table for variable name 

6 Preseni location during table shift 

C Pointer for last table entry 

Next line beginning memory address 

E Current line number 

f- Switch to skip rest of long variable name 

J Switch to skip after DATA statement 

K Line count for screen summary 

L Table for first line occurrence 

M Table for last line occurrence 

N Table for number of total line occurrences 

R Fake input variable 

S Next to oldest text character (1 ago) 

T Current text character 

U Counter for current position in text 

W Switch to skip from first "to 2nd" 

Y$ Current variable name 

Z Oldest text character (2 ago) 

Table 3. Variable List. 



Line number 
65000 
65010 
65012 
65020 
65280 



Change 
delete the two POKEs 
change 17129 to 26302 
change 17128 to 26301 
change 17129 to 26302 
change 17129 to 26302 



Then type SAVE VAROOC. A 

Table 4. Program Changes for Disk BASIC. 



• ^ ^* ^. ^p». ^i ^fc ^^^^p> ^fc ^*. ^. ^p«, ^. ^^ 



6*' 



TBS 



80 



«4 



*YO' 



***** 



^•401 



* 
* 
* 
* 
* 
* 
* 
* 
* 
* 
* 

* 



THE 

GREEN 

SCREEN 



• IMPROVE IMAGE CONTRAST 

• REDUCE EYE FATIGUE 

• ENHANCE SCREEN LEGIBILITY 

• PROVIDE A MORE PLEASING 
DISPLAY 

• GIVE A DISTINCTIVE PROFESSIONAL 
LOOK TO YOUR SYSTEM 

The GREEN SCREEN is custom molded to 

fit nicely over the picture tube. 

It ingeniously mounts in seconds without 

any tools. 

* * * * * * 

CALL: (212) 286-5916 
or send 612.50+ 82 8&H 

ALPHA product co. 



* 

* 
* 

* 

* 

* 

* 



85-71, 70th St., Woodhavan, N.Y. 11421 



T-MJ// 

BUS EXTENDER FOR TRS80* 
LIKE HAVING 5 EDGE connectors 



TO 
KEYBOARD 

OR 
EXPANSION INT 
(screen printer port) 



TO 
ACCESSORIES 



* 

* 
* 

-K- $80 

+$2s«h 

±L ALL GOLD PLATED CONTACTS 

" ************************************* 

l-flflflLOG 80 $ 14 <> 




7/7 



%m^Xy 



stock 



* 
* 
* 

* 

* 

* 
* 

* 
* 
* 

* 



w 8 channel ANALOG TO DIGITAL converter. Anything w 

"7T that can be electrically measured can be interfaced to ^* 

w. your TRS-80 - voltage, current, temperature, pres- ^. 

~ sure, light level No assembly language needed. 4 '^ 

7T mm "¥" 

* a i nun [Z12] MM91B *■* * 

* ALPHA product co. * 

^ 85-71, 78th St., Woodhavan, N.Y. 11421 s*™ ^ 
!3*v jac jac 3JC 5eC 381 38C 38C 58C ?PC 381 381 



^Reader Service— see page 226 



80 Microcomputing, September 1980 • 91 







! 


•-1I. 66!'. 

PEEK (1**341 










/°*\ YfS 

/ '6*31 >> 

\ 8J y 


POKE I634», 
PEEK'166331 2 

POKE 16349. 
PEEK 11*634) 










POKE i6S4«. 

PEEK(i66S3>»234 
POKE .4549, 

PEEK1I6634I-I 






1 






2nd CLO»0 










1 




POKE 16348. 1 J J 
POKE 16349.66 





Flow Chart. 



POKEs to 



233 ■* (66.2561 ■ 17129 



Voila! That is the beginning 
text memory location we have 
been using. Therefore, locations 
16548 and 16549 must be where 
Level II BASIC keeps this point- 
er. 

The comparison of location 
16633 to 2 and the two POKEs 
on either route afterwards, are 
going to be a little more difficult 
to decipher. 

If you have the two-byte num- 
ber 1 67 and want to subtract 2 
from it, you run into trouble right 
away. One minus 2 gives -1, 
which isn't within the 0-255 code 
range. So borrow 1 from the sec- 
ond byte making it 66 and add 
its multiplied value 1 «256 to the 
first byte. This manipulation 
gives you the number 257 66. 
Now subtract 2, giving 255 66. 

If the first byte were 2 or 
larger, you wouldn't have to bor- 
row from the second. Two minus 
2 gives which is a valid result. 

Suppose, somewhere in mem- 
ory, Level II BASIC keeps track 
of the memory location that fol- 
lows the last program line. It 
could then point two bytes be- 
yond the final program line. 

Double VOILA!! The begin- 
ning of text pointer (locations 
16548 and 9) is replaced with the 
position new text should begin 
(locations 16633 and 4 minus 2). 
When this is done, Level II 
BASIC is tricked into loading a 
new program after the current 



text program. Finally, the begin- 
ning text pointer must be reset 
back to the correct value of 
17129. 

Assembler Help 

Program Listing 4 shows an 
assembler program which re- 
places the beginning text point- 
er. The decision-element (DE) 
register pair is loaded with the 
value 2 while the HL register pair 
is loaded with the hexadecimal 
address of the end of text point- 
er. 

The DE pair is subtracted 
from this address, and any bor- 
rowing is automatic. It then 
stores this adjusted value in the 
hexadecimal address of the be- 
ginning text pointer and jumps 
to the Level II READY message. 

This program loads just 
below Radio Shack's debounce 
routine on a 16K system. 

The beginning text pointer is 
then reset to its correct value by 
the two POKEs in line 65000 as 
shown in Program Listing 2. 

The steps to run variable 
documentation are: 

1. CLOAD the program to be 
analyzed. 

2. Enter SYSTEM. ADDTXT 
and / (or follow the steps in Fig. 
4). 

3. CLOAD the variable docu- 
mentation program in Program 
Listing 2. 

4. Enter RUN 65000. 

If the screen becomes com- 
pletely full during the summary 
display, hit ENTER to continue. 

To run variable documenta- 
tion with Disk BASIC, make the 
program changes shown in 
Table 4. 

The execution steps are 1) 
LOAD the program to be ana- 
lyzed; 2) enter MERGE "VAR- 
DOC"; and 3) enter RUN 65000. 

There are several things that 
could cause complications in 
running the variable documen- 



tation program. Remember that 
the program to be analyzed 
should not have lines numbered 
65000 or greater. 

Program tables allow only 99 
entries. They must be increased 
to record more variable names. 
Also the CLEAR must be in- 
creased correspondingly. These 
changes will naturally use more 
memory. 

If there is not enough memory 
to do the run, delete the follow- 
ing from the program to be ana- 
lyzed: 

• REM lines 

• Lines that don't have vari- 
ables 

• DATA statements 

• Characters between dou- 
ble quotes 

If you want a printout of the 
summary, insert the following 
program line: 



65255 LPRINT A»A). L(A|. M(A). N(A| 



Saving Memory 

Understanding how program 
lines are coded in the text area 
makes it easier to see what to 
avoid for programs tight on 
memory. Remember that 
spaces in the text line use one 
byte each; each program line 
adds five bytes (VS one byte for 
a :); and REM lines use a full byte 
for each comment character. It 
is better to choose single-letter 
variable names than two charac- 
ter names. 

Now that you have a program 
and an understanding of how to 
document variables, how about 
a challenge? Who out there can 
develop a program to effectively 
document GOTOs. GOSUBs. 
and RETURNs?B 



6 5000 POKE16548,23 3:POKE16549,66:CLEAR200:CLS:DIMAS(100 

) ,L(100) ,H(100) ,N(100) :A$ (1 )="[": C=1:S=1 
6 5005 GOSL'B65 28 0:D=T:GOSHB6 5 280:D=T*256+D:GOSUB65 28 0:E = 

T:GOSUB6 5 28 0:E=T»2 56*E:LPRINT"":J=0:T=1:S=1 :F»0: IF 

E=6 5 30OGOTO6 5 240ELSELPRINTE; 
6 5010 IFD=17129+UTHENZ=S:S=1:U=U+1:GOTO65015 
65012 IFD=17128+UTHENU=U-1:GOTO65005:ELSEZ=S:S=T:GOSUB6 

5280 
6 5015 IFF=1ANDZ>64ANDZ<91GOTO6S010 
65 020 F=0:IFZ=14 7THENU=D-17129:GOTO65 00 5 
65030 IFW=0ANDZ=34THENW=1 :GOTO65010 
65 040 IFW=1ANDZ=34THENW=0:GOTO65010 
65050 IFW=1GOTO65010 
65060 IFZ = 58TI!ENJ = 
65080 IFZ = 136TIIENJ = 1 
65090 IFJ=1GOTO65010 
65100 IFZ<65ORZ>90GOTO65010 
65110 Y$ = CHRS(Z) :IF(S<4 8ORS>57)AND(S<65ORS>90)ANDSO36G 

OTO65140 
65120 Y$=Y$+CHR?(S) :IFT=36THENY$=Y$+CHR$(T) 
65140 LPRINTYS;" " ; : F=l : FORA=1TO100 
65150 IFA$(A)<Y$GOTO65230 
65160 IFA$(A)=Y$GOTO65210 
6 517 FORB=CTOASTEP-l 
6 5180 A$(B+1)=A$(B) : L (B+l ) = L (B) :M (B+l ) =M (B) :N (B+l ) = N (B) 

:NEXTB 
65190 C=C+1: 1FC=100STOP 

6 5200 AS(A)=Y$:L(A)=E:H(A)=E:N(A)=1:GOTO65 220 
6 5210 IFM(A) OET!IENM(A)=E:N(A)=N(A)+l 
65220 A=100 
65230 NEXTA:GOTO65010 
65240 STOP:LPRINT"" :F0RA=1T0C-1 

65250 LPRINTA$(A) ,L{A) ,M(A) ,N(A) : K=K+1 : IFK=15THENINPUTR 
: LPRINT"?": LPRINT" ":LPRINT" ":LPRINT" ":LPRINT" " 
:CLS:K=0 
65260 NEXTA 
65270 END 

65280 T=PEEK(17129+U) : U=U+1 :RETURN 
65300 REM 

Listing 3. 



7FBA 


00100 


ORG 


7FBAM 


;BEGIN AT 32698 


7FBA 110200 


00105 BEGIN 


LD 


DE, 2 


;LOAD IN 2 


7FBD 2AF940 


00110 


LD 


HL, (40F9H) 


;LOAD CONTENTS OF 16633 & 4 


7FC0 ED52 


00120 


SBC 


HL.DE 


; SUBTRACT 2 


7FC2 22A440 


00130 


LD 


(40A4M) ,HL 


;LOAD RESULT IN 16548 & 9 


7FC5 C3191A 


00140 


JP 


1A19H 


;JUMP TO READY MESSAGE 


7FBA 


00150 


END 


BEGIN 




00000 TOTAL 


ERRORS 




Listing 4. 





92 • 80 Microcomputing, September 1980 



UTILITY PACK 



CPU: Compress Program Utility. Removes all unnecessaryspaces and remarks 
from a Basic program, and will compress lines if specified Complete regard 
for unclosed strings and unusual commands. Fast Z-80 speed!Level II or DOS. 
$19. 9 5/$ 2 1.95 

SEARCH: Lists any Basic program lines containing any occurance you select 
Break at any time to make changes, or continue Option allows for LPRINTed 
listing Written in Z-80! Level II or DOS $19.95/$21.95 

SPECIAL DOS OFFER: All of these utilities, on one diskette, can be purchased 
for |U St $49.95! THAT'S HALF PRICE! 



BTRACE: Makes the TRON command easier to utilize by placing the current 
line being executed in one convenient location Preserves your screen display 
Level II or DOS Written in Z-80 $19.9S/$21.95 

CHANGES: Generates a screen or printed listing of differences between vers- 
ions of programs you are developing DOS only $14.95/$16.95 
REPLACE: Allows you to search and replace occurances in your Basic pro- 
grams (saved in ASCII format) DOS ONLY $14 95$16.95 

SPECIAL LEVEL II OFFER: CPU. SEARCH, and BTRACE. together on one 
cassette, can be purchased for just $29.95 THAT'S HALF PRICE' 



NEWEST PRODUCTS! 

IRV $24.95 

BOSS $29.95 

TUNNEL OF FAHAD $9.95 

JOIN THE "SOURCE" $100.00 

RESCUE AT RIGEL $14.95 



BOOKS 

The Book. Vol 1 $14.95 

Supermap 8.9S 

Disk & Other Mysteries 19.95 

Disassembled Handbook. Vol 1 10.00 

Disassembled Handbook. Vol 2 15.00 

Inside Level II 15.95 



MEDIA 

Nashua diskettes 

Verbatim diskettes 

C- 10 Agfa cassettes (5 screw) 
Storage boxes 



$24.95/10 

26.50/10 

10.95/13 

... 3.00/ 1 



BEST SELLING GAMES 

MENTAL LAPSE — by Brandon Rigney III. A 
graphic lovers delight, with action to tax your 
abilities to the limit' $12.95. $15.95 

JUNGLE — by Brandon Rigney III Getting back 
to camp may not be as easy as you think! Six 
different levels of complexity make this a game 
for the entire family. $9.95/$12.95 

CURTAINS — by Brandon Rigney III. A con- 
centration game with several unique twists; great 
graphics, too' $9.95/$12.95 

GOMOKU — by Peter Lewis Can you beat the 
computer at this one'' Similar to tic-tac-toe. only 
you need five in a row to win The rules are simple, 
but there is a strategy 1 $9.95, $1 2.95 

OTHELLO — by Jack Decker An excellent 
implementation of the popular board game. One 
or two players, different skill levels. Option for 
keeping score thru the game $9.95/$l2 95 

CRIBBAGE — by Richard Vossel Plays by Hoyle. 
Fast response times. Guaranteed debugged 
Excellent for learning (use the HELP function). 
or for the expert Satisfaction guaranteed' 
$16.95 $19.95 (versions are different) 
Specify Level II or DOS. 




-Tot •* 



Know what the three T's ot computing 
are? Tips, Tutorials, and Techniques. 
That's what The Alternate Source News 
is all about. Teaching you to become a 
better programmer, both in Basic and 
Assembly Language. Published bi-monthly, 
six issues are /ust $9.00. 

TBS-80 >• • uadwnan ol in* RMa Sn*c« Dmuon oi T«n<jy Co>poraiion 



VARKEEP 

VARKEEP is a new memory manage- 
ment utility which adds the following 
powerful commands to Level II or Disk 
Basic: NAME SAVE. NAME RESTORE. 
NAME DELETE and NAME CLEAR. Us- 
ing these commands will allow the Ba- 
sic programmer to protect the values 
of all variables from erasure by LOAD. 
RUN, NEW and clear. You'll be able to 
restore to a program all variables used 
by a previous program (easily simulate 
the powerful CHAIN command found 
in other Basics), delete variables no 
longer needed in order to reclaim 
valuable memory space, redimension 
arrays, &change amount the of string 
space available to a program while it is 
running. Written in machine language 
to work with Level II or Disk Basic. 
VARKEEP is now available for just 
$14.95 on cassette. $16.95 on diskette. 



ABSOLUTELY FREE! 



For every single item over $1 5 00 that you order, select one of the FREE programs 
below' (Available separately for $5 95 each ) 



SYSLOAD: A patch to DOS to allow 
CMD file execution via the Basic 
SYSTEM command By Jesse Bob 
Overholt 

RAMTEST: Level II or DOS In Z-80 
using reliable techniques. By Allan 
Moluf 

SUPERKEY: A graphics typewriter 
like you've never seen before' By 
Brandon Rigney III 

BILLBOARD: Generate posters for 
social occasions and friends By 
Brandon Rigney III 

WORKING: Never have you seen a 
program work so hard and get so 
little done! By Bill Brown. 



KILLER: A DOS utility that allows 
you to KILL more than one file at a 
time' By Allan Moluf 
PEN RAM : A utility which allows RAM 
manipulation never before possible! 
By Roxton Baker. 

FILEFIX: Direct statement in file? Fix 
it the easy way. with this short pro- 
gram! By Ken Edwards 

PERSONAL PAYABLES: A DOS 

personal finance management system, 
using random files By Charles Butler 
CONVERT: Basic programs to Pencil 
files and back. Basic remark state- 
ments to either Pencil or EDTASM for- 
mat and back. And more. By Bruce 
Hansen. 



Level-so Basic: First there was Level I, then came Level II, and there's even 
some Level Ill's. But you've never seen anything like Level-80! You'll be amazed 
(that we would even give this program away!!). By KJ Software. 

Space-Out Will remove spaces from your Basic programs. Not all the features 
of the more expensive versions, but it'll get the job done! Written in Z-80 for fast 
execution. By Jack Decker. 

EDTASM Mods: Four programs to provide various enhancements to your 
EDTASM. Replace spaces with tabs and remove comments to save room. Con- 
vert any block of RAM into EDTASM DEFB statements. Convert Apparat 
EDTASM files to MACRO-80 files. By Roxton Baker. 



ORDER BLANK 



Please send 



Ship UPS 



D Ship First Class Mail 



Address 

City 

State Zip 



SIMPLE SORT 

What are the best qualities of a sorting utility? The sort must be fast. (Simple 
Sort is written in Z-80!) The sort must be efficient. (Simple Sort occupies less than 
3K of machine code and requires less than 1 K for buffers!) The sort must be kind to 
the diskette. (Simple Sort does all its sorting in memory, with a minimum of reads 
and writes!) The sort must not use any extra storage space. (Simple Sort does not 
require any intermediate files!) The sort must be easy to use. (Simple Sort only 
needs to know the bare particulars!) Simple Sort —it's easy, it's fast and it's 
efficient! The perfect answer for single drive owners, and great for dual drive 
owners who prefer to use formatted-only diskettes! 

$79.95 on diskette with manual. 



Mail To: 



Shipping 
Total 



S?00 



Master Charge/VISA 
517-485-0344 
517-487-3358 



We will ship C.O.D. 
(add $1.25 please) 

TRS-80 is a trademark ol the Tandy Corporation 



D Check here lor FREE issue ol The Alternate Source \ 
D Enclosed is $9.00 Begin my subscription with issue 



ith any order 



The Alternate Source 

1906 Ada Street 

Lansing. Ml 48910 



Michigan residenis add 4«* sales ia» Foreign pleas 
welcome but please include additional postage 



send U S lunds Foreign orders 



s Reader Service— see page 226 



80 Microcomputing, September 1980 • 93 



UTILITY 



Get perfectly aligned printouts every time. 



Printer Calibration 



L. O. Rexrode 
35026-A Turtle Trail 
Willoughby, OH 44094 



If you use more than one type 
of paper with your printer, this 
simple modification makes a lot 
of sense. 

At the office my TRS-80 and 
Centronics 779 with tractor feed 
are used primarily for handling 
advertising mail inquiries and 
our normal operation uses five 
different types of forms. 

In the interest of saving time 
and improving efficiency, the 
need for a method that starts 
every print routine exactly where 
it is intended, regardless of who 
is operating the sytem, was ap- 
parent. 

Three Variables 

With the Centronics 779, 
three variables are of primary 
importance in printing a profes- 
sional looking form: left margin 
setting, top-of-form setting and 
the "density" setting. Any, or all 
of these, may require different 



settings for various print rou- 
tines or form sizes. The length of 
form (number of lines) is not in- 
cluded, since a program is usu- 
ally written with this factor as a 
constant. 

The simplest variable is the 
left margin setting. The printer's 
roller/tear-bar assembly has an 
engraved scale in one-eighth- 
inch increments from -15 on 
the left to 90 on the right. This 
scale should be used to set the 
left edge of the form to be 
printed. The value is determined 
by a trial run. 

To set the top-of-form re- 
quires the addition of a scale to 
the 779. This is done quite easily 
if you use the hold down clamp 
on the left pin feed assembly. As 
shown in Photo 1, use a three 
and one-half-inch peel-off label 
and type a column of numbers, 
say, from 1 to 21 . Trim off the ex- 
cess margins and place the la- 
bel right along the edge of the 
hold down clamp. The resultant 
scale now allows you to set the 
top-of-form to a specified posi- 
tion. 

The third variable is the print 



density control. This sets the 
number of characters-per-inch 
printed. For maximum legibility 
you usually want this set as 
wide as the form will allow. The 
control, located on the rear of 
the printer, is not only difficult to 
reach but requires several lines 
of print, with trial and error ad- 
justments, to get the optimum 
settings. A calibrated dial knob 
solves this problem easily. 

The dial knob I used is Radio 
Shack's part no. 274-413. How- 
ever, on some printers, the shaft 
may not protrude quite far 
enough to get a good bite when 
the set screw is tightened. If so, 
use a coarse file on the rear face 
of the knob, removing about 1/32 
of an inch to 1/16 of an inch. 

Cut a sliver from the adhesive- 
backed label to make a pointer 
for the dial and place it approx- 
imately as shown (Photo 2). Ro- 
tate the adjustment shaft fully 
counterclockwise (lowest den- 
sity setting) and push the knob 
onto the shaft, setting the num- 
ber one mark to the arrow. Tight- 
en the set screw and you're 
through. 



Find Your Values 

Run each of your print rou- 
tines and determine the opti- 
mum value of the three vari- 
ables: left margin, top-of-form 
and density. Note these values 
for use with the routines. The 
best place to note them is in 
your program, immediately pre- 
ceding the first LPRINT state- 
ment. If you are new to program- 
ming, here is the statement I use 
to get the results shown in 
Photo 3 (your line number, title 
and values will relate to your 
own program, of course): 

1000 CLS:PRINT@320, "READY TO PRINT 
MAILING LABELS DIRECTLY FROM 
DISC":PRINT:PRINT"SET TOP-OF- 
FORM TO 20":PRINT"SET LEFT 
EDGE OF FORM TO -4":PRINT 
"SET DENSITY CONTROL TO 4": 
INPUT" 'ENTER' TO CONTINUE"* 

When LLISTing a program in 
BASIC, it is not possible to use 
such a prompting message, and 
I am constantly LLISTing with 
the density set too low, which re- 
sults in my losing the ends of 
long program statements. As a 
reminder to myself to set the 
density before starting a LLIST, I 




<■■[ 




K J 






W/ 



Photo 1 
94 • 80 Microcomputing, September 1980 




Photo 2 



shut to ran hulk uels idetiy nw use 

so top-of-fgw to a 

an UFT EH DP F» TO -4 
SET D6ITY COHTROL TO 4 

'ENTER' ToaMnm?. 



Photo 3 



used another label, placed 
prominently on the top front of 
the printer that almost shouts, 
"For Listings Set the Density to 
7 inches. It works. 

We have been using this 
method for several months now, 
and it is quite gratifying to see 
the results. No matter who is op- 
erating the system, and regard- 
less of how often we change 
forms or paper, the first line of 
print goes down exactly where 
we want it to. 



A couple of other time savers 
we have added to our program 
are worth the time and the slight 
additional memory required. 
The first one resulted from our 
operator having spent over an 
hour trying to figure out why the 
computer wouldn't run and fi- 
nally realizing that the "out of 
paper switch was off, due to a 
small tear in the form which 
wasn't readily apparent. 

To prevent this from happen- 
ing again, I added a GOSUB in 



front of every LPRINT state- 
ment. The subroutine checks 
the status of both the "out of 
paper switch and the print 
switch. If either is off, a prompt- 
ing message is displayed telling 
the operator what is wrong and 
allowing him to correct before 
continuing. My subroutine reads 
as follows: 



750 IFPEEK(14312K128 RETURN ELSE 751 

751 CLS:PRINT@468,"PRINTER NOT 
READY": PRINT® 583, "R'-RETURN 
TO MENU O— OK TO CONTINUE" 

752 Q$ = INKEYS :IF Q$ = 'R'THEN 51 1 

753 IFQ$ = '0 THEN RETURN 



This simple solution has saved 
us hours. 

Add Top-of-f orm 

Since the 779 doesn't have 
front panel controls that allow 
either a line feed or a top-of- 
form, I added these as a part of 
my program. Since each pro- 
gram has a menu, this was the 
obvious place to access these 
routines. 

The menu uses the INKEYS 
function, so it was just a matter 



of adding the up arrow as the 
selection to advance one line 
and adding the letter "T" to go 
to top-of-form. I did not include 
these two symbols in the menu 
table to prevent clutter. They are 
blind selections. Here are the 
routines: 



620 IFQ$= ■t"THEN800 
625 IFQ$ = "T"THEN810 



800 IF PEEK(14312K128 GOTO 805 ELSE 

511 
805 POKE 16424. 1;POKE 16425.0 LPRINT 

CHRS<11): GOTO 511 
810 IFPEEK(14312K128GOT0815ELSE 

511 
815 POKE 16424.51 :POKE 16425.0;LPRINT 

CHR$<11):GOT0511 



In either of these routines, if 
the printer is not ready, nothing 
happens except returning you to 
the menu. The t advances the 
paper one line. The T advances 
the paper 51 lines, then you are 
returned to the menu. 

In all the examples given, my 
menu routine begins at line 
511. ■ 



CP/M® 1 - based Business Software for TRS-80® 2 computers on 
... the fastest Mod-ll CP/M with the most features!!! 



Over 610,000 bytes/disk 
Downloading package included 
1,200 baud operation of serial 
printers without data loss 
Single drive backup 



Mixed single/double density on any 
of 4 drives (even a 1 -drive system) 

Ultra-fast disk operation 

Emulation of cursor addressing for 
any of several "dumb" CRTs 



Auto-LF printer support & ASCII 
top-of-form software (LPIII) 

Supplemental document describing 
our implementation 

User-settable function keys 



MOD-IICP/M $250.00 MODI CP/M $150.00 CBASIC2* 3 (Mod I or II) $110.00 

The following software for Mod-ll CP/M only unless otherwise stated (*-requires CBASIC2): 



RM/COBOL' 4 - Only COBOL for CP/M with alternate keys (multi- 
key ISAM). CRT screen handling, interactive debug. Z80 code, and 
the most useful Level 2 features Compatible with Tandy's 

COBOL-but runs faster! $495.00 

PMS (Property Management System) - Interactive, menu-driven 
system includes full G/L. budgeting, cash journal, delinquency 
list, tenant activity/rent roll, complete audit trail and reports 

on vacancies, lost rent, and vendors $650.00* 

demo disk & manual 75.00* 

APH (Automated Patient History) - General-purpose question- 
asking, answer-printing system furnished as self-administered 
review-of-systems general patient history (Mod-I also) . . . $1 75.00* 



MAGIC WAND' 5 - Full-feature word processing, true proportional 
spacing, file merging, and use of full-screen editor for source 

programs or data $400.00 

RPA( Residential Properly Analysis) -Analyzes income and expense, 
financing, taxes, inflation and depreciation on home, condo. or 
apartments over a user-selectable time. Shows payoff in terms of 
ROI, Cap rate, cash-on-cash. Amortization schedules and 
worksheet $300 00* 

demo disk & manual 35.00* 

RBC (Rent/Buy Comparison) - Sales or investment tool to compare 
renting and savings account investment vs. purchasing a particular 
property $250.00* 

demo disk & manual 35.00' 



Osborne & Assoc. CBASIC source programs (Mod-I also): 

Payroll w/Cost Accounting $250.00* General Ledger w/Cash Journal $250.00* 

Accts. Payable/ Accts. Receivable $250.00* O&A CBASIC Books (ea.) $ 20.00 

\ferbaiim® 6 media: (Qty. 100 prices) 

5V single density $2.50 ea. 

8" certified double density $4.00 ea. 



8" single density $ 3.00 ea 

450' tape cartridges $20.00 ea 




•55- «» 



8041 Newman Ave.. Suite 208 c 
Huntington Beach. CA 92647 
(714)848-1922 



Registered trademark of. 

"' Digital Research 

' 2 Tandy Corp. 

" 3 Compller Systems. Inc. 

,4 Ryan-McFarland Corp. 

' 5 Small Business Applications. Inc. 

' 6 Verbatim Corp. 



Distributed in U.K. by: 

Microcomputer Applications Ltd 

11. Riverside Court. 

Caversham. Reading, England 

TEL: (0734) 470425 



80 Microcomputing, September 1980 • 95 



ThelXUA-TRANSlOOO 



A completely refurbished 
IBM Selectric Terminal with 
built-in ASCII Interface . ^ 

*FOR YOUR TRS-80 WITH OR WITHOUT 
EXPANSION INTERFACE. 



Features: 

• 300 Baud 

• 14.9 characters per second 
printout 

• Reliable heavy duty Selectric 
mechanism 

• RS-232C Interface 

• Documentation included 

• 60 day warranty - parts and 
labor 

• High quality Selectric printing 
Off-line use as typewriter 

• Optional tractor feed available 

• 15 inch carriage width 



Also works with Ex- 
atroiTs Stringy Floppy, 
for fast loading of pro- 
grams. 

HOW TO ORDER 
DATA-TRANS 1000 

1. We accept Visa, Master 
Charge. Make cashiers checks or 
personal check payable to: 

DATA-TRANS 

2. All orders are shipped 
F.O.B. San Jose, CA 

3. Deliveries are immediate 




Desk and table top models also available. 
For orders and information 

DATA-TRANS 

2154 OToole St. +m 

UnitE 

San Jose, CA 95131 

Phone: . 14083 448-0800 




MALL 
YSTEM 



PRODUCTS H TRS-80* fiwj 



MALL 

'AL3B 
k-JYSTEM 



NEW! 



PfNHOO - $19.95. Adapts Disk-P^cil to Radio Shack loner case modif ication. 
Also adds single page printing and several other new features. 

SCRIPNOD - $14.95. Add TRS232 print driver, or add handshake/ 1 inefeed 
control to RS-232-C driver in Radio Shack's SCRIPSIT (disk version only). 

WHISTLE*: HONE CONTROLLER INTERFACE - $34.95. Hex hardware product that 
controls lights, appliances, computer peripherals, darkroom timers and other 
115 volt devices anywhere in your house! Software controlled by cassette 
cable. Use mi th Sears or BSR Home Control System with ultrasonic option. 
Assembled, tested, self-contained, and includes Basic software. 

UTILITIES 

RSN-2: PMCHINE LANGUAGE PKMITM FOB 16* TRS-80'S - $26.95 
RSR-2D: IMtlt VERSIONS Of RS»W FOR DISS SYSTEMS - 29.95 
tSH-2 RELXATOR: PUT RSN-2/2D ANYWHERE IN MEMORY - 9.95 

Machine Language monitors with ISO disassembler ! HEX and ASCII memory 
dumps; EDIT, WOVE, EICHANGE, VERIFY, FILL, ZERO, TEST, or SEARCH memory, 
read/write SYSTEM tapes, enter BREAKPOINTS, PRINT with TRS2S2 or Centronics, 
read/write disk sectors directly! RSH-2 tape loads at top of 16K LEVEL I or 
II; RSH-20 disk includes 3 versions for 16K, S2K and 48K. 

KM: CONVERT SYSTEM PROGRAMS TO DISK FILES -»9.95. E.ecute Adventure, 
Air Raid, RSL-1, ESP-1, T-8UG, etc. fro" disk, even if they interfere with 
TRSDOS! New version works with TRSOOS 3.3. 

BASIC-IP: LEVEL-1 BASIC KITH PRINTING! - 119.95. Run any LEVEL-I BASIC 
program on your 16K Level-2. PLUS LPRINT and LLIST with our TRS232 or 
Centronics. Furnished on tape; can be used from disk. 

MACHINE LANGUAGE GAMES 

AIR RAID, BARRICADE or RSL-1: - $10.00 each, all 5 for $25.00 

AIR RAID: A super shooting gallery; our most popular game. Ground based 
•issile launcher shoots high speed aircraft! Hours of fun! 

BARRICADE: "BREAKOUT" for the TRS-80 1 Break through 5 walls with 
high-speed ball and keyboard controlled paddle' 96 different options' 

RSL-1: Enter patterns with repeating keyboard' Save patterns on tape (4 
furnished). Play John Conway's LIFE. FAST - about 1 second per generation! 



SMALL SYSTEM SOFTWARE 



NEWBURY PARK, CA 91320 



PROFESSIONAL SOFTWARE 

NEW! ELECTRIC PENCIL-IIB FOR HOBEL-II. Super Pencil version runs under 
TRSOOS or CP/N. Automatic centering, dynamic print formatting, s'ngle-page 
print ing, etc. Buffered keyboard eliminates missed characters at line ends! 
Diablo, NEC, Ouoe versions include bold face print, variable pitch, I more! 
TRSDOS PENCIL: Standard printer - $325; Diablo, NEC, Oume (specify) - $350 
CP/N PENCIL: Standard printer - 1275; Diablo, NEC, Oume (specify) - $300 

ELECTRIC PMCIL FOR NODEL-I: TAPE-$99.95, D I SK-11 50.00. Popular video 
editor for creating and saving teit files. Prints formatted copy with right 
Justification, page titling I numbering, etc. Upper case only, or lower 
case with modification. Reauires at least 16K. 

RSHII: ENHANCED RSN MONITOR FOR THE HODEL-II - $39.95. Relocatable version 
of RSN-2D plus screen editor for modifying either memory or disk sectors in 
both Hen and ASCII, split screen scrolling, and formatted serial or parallel 
printing. Sold on self-booting disk; directions to save as TRSDOS file. 

CP/N 0PCRATIM6 STSTEN: NODEL-I - $145.00; HODEL-II - $1/0.00. The 

8060/280 "Software Bus" for TRS-80's. Model* I includes TRS232 and RS-232-C 
software. Model-II supports single and double density disks, and '-ads 
TRSDOS files. Many unique utilities included in both versions' 

PRINTER SUPPORT 

TRS232 PRINTER INTERFACE - $59.95 Assembled * tested printer interface for 
RS232 or 20-mil current loop printers. Expansion interface not required. 
Print from level-II BASIC, CP/M, BASK-1P, ELECTRIC PENCIL, etc. Standard 
cassette software included. Add $2.00 tor shipping. 

TRS232 "FORMATTER" SOFTWARE PACKAGE - $14.95. Adds page and line length 
control, printer pause, "smart" line termination, etc. to TRS232. 

RSM232: Adds RS-232-C capability to RSM-2/2D monitors - $9.95 
PEN232: RS-232-C for cassette version Electric Pencil - 9.95 
EDT232: TRS232 and RS-232-C for tape version of EDTASN - 9.95 



OTHER PRODUCTS FOR THE TRS-80 



ESP-1: $29.95. Assembler, Editor, Monitor (8080 mnemonics) 
LST-1: 8.00. Listing of Level-1 BASIC with some comments 



CP/N tm Digital Research, Inc 
See your dealer or order direct 

SMALL SYSTEM SOFTWARE B P.O. BOX 366 



TRS-80 tm Tandy Corp. 
<f. Residents add 6X ta> 



^30 



96 • 80 Microcomputing, September 1980 




Puts sophisticated business strategies at the 
fingertips of all TRS-80 Level II owners! FIN- 
PLAN: A Financial Planning Program for 
Small Businesses is the most complete financial 
planning program available. 

Here's why . . . Developed by an expert: The 
author, Robert Montgomery, is president of a 
management consulting firm and a recognized 
authority on new product planning. Easy to use: 
Data can be entered from normal balance sheet 
statements. Within seconds, FINPLAN will pro- 
vide financial projections for up to 5 years. Ver- 
satility: Are you thinking about modernizing 
equipment, expanding into a new product line, or 
starting a new business from scratch? Will your 
plans run you out of business, out of cash, or on to 
the Fortune 500 list? FINPLAN will answer these 
and other financial questions before you invest a 
dime. Extensive documentation: You don't have 
to be a financial wizard to use FINPLAN be- 
cause it comes with 80 pages of documentation. 



Presented in a step-by-step format, the documen- 
tation is a great learning tool for those who need it 
or a dynamic applications tool for getting the most 
out of FINPLAN. And, FINPLAN is reasonably 
priced. #05103, TRS-80 Level II cassette, $69.95; 
#05108, TRS-80 Level II Disk, $74.95. 

Amiable at four 
local computer store! 

or Call Toll Free, 24 hours a day, 
(1-800-827-3777, ext. 302)* TO CHARGE 
YOUR ORDER TO Master-Charge or Visa! 
Minimum order is $10.00; Customer pays 
postage and handling. 

'From Missouri, call 1-800-892-7655, ext. 302 

Hayden Book Company, Inc. 

50 Essex Street 

Rochelle Park NJ 07662 " 419 



^Reader Service— see page 226 



80 Microcomputing, September 1980 • 97 



UTILITY 



Useful software for easy data input. 



Versatile Input 



Tim Wilde 

Box 8775 

Universal City, CA 91608 



I don't know about you, but for 
me the greatest joy from my 
computer comes during the 
development of some useful 
software. Each time I write a 
new program I try to be more 
creative, using lessons learned 
from past programs plus new 
techniques and subroutines 
that I've run across in the many 
magazines and club newsletters 
that I read. 

Advancing from SET (X,Y) 
graphics to POKE and then 
string-packing techniques, you 
also advance in the artful use of 
BASIC. It's a very satisfying ex- 
perience. 

More Elegant INPUT 

So with this noble goal in 
mind I decided to come up with 
an alternative to the INPUT 
statement. What originally 
prompted me to do this was my 
desire to have the majority of 
the screen "painted" white, with 
only a block of darkness in the 
center where input questions or 
prompts would appear. 

With the INPUT statement, 
after typing in the data, you 
would hit ENTER, at which time 
the rest of the line (which I 
wanted to keep white) would be 
erased. Not only that, but I 
wanted a blinking cursor along 



with other automatic features 
I'll describe later. 

Another negative aspect of 
the INPUT statement is that you 
can't enter commas and other 
string delimiters. Disk BASIC 
gives the LINE INPUT statement 
which solves that problem, but 
it's still basically the old in- 
elegant INPUT statement 

The resulting input subrou- 
tine was developed and its first 
application was in a program for 
recording customer sales data 
for my own company. 

The overall scheme uses an 
input subroutine to enter data 
into a temporary array l(EC). Dur- 
ing the course of a single pass 
through the subroutine, I use 14 
variables in array l(EC). I'll call 
these variables INPUT LINES 
KEL). 

After completing a pass 
through the input subroutine, 
the contents of l(EC) will be 
transferred to a master array for 
later output to tape or disk. 
Following this transfer, all the 
elements of l(EC) will be nulled 
(l(EC) = "") and the program will 
return to the beginning of the IN- 
PUT subroutine for new custom- 
er data. 

After initialization, I run a pro- 
gram called Screen that creates 
and stores various graphic 
forms that will be recalled in the 
subroutine as well as other 
parts of Customer Sales Pro- 
gram, using the GSF Package by 
Racet Computes. One of GSF's 
many features is the ability to 
store a display in protected 
memory, so that it can be re- 
called by a simple BASIC state- 



ment. 

At the end of Screen program 
I have the statement RUN 
SALES/BAS, which loads and 
runs the Customer Sales Pro- 
gram. This is where the INPUT 
subroutine comes in. 

For purposes of this article 
I've added lines 1000 to 1020 to 
create a simple version of the 
graphic display used during 
data input. 

The Subroutine 

Line 20 clears 1000 bytes of 
string space and predefines the 
variables used as string or in- 
teger. Array l(EL) is dimensioned 
to hold 14 data items, and array 
S(N,X) is dimensioned for 20 
customers. 

Line 30 calls or creates a 
screen print routine. You can 
paint your screen however you 
like. For demonstration pur- 
poses, I'll use the subroutine at 
line 1000 for screen painting. 

In line 100 PC% stands for the 
blinking cursor. Initially it's set 
equal to 32, which when inserted 
into a PRINT CHR$( PC%) state- 
ment prints a blank space. I'll 
discuss the cursor further at line 
130. EL is the subscript for array 
l(EL) and is initially set for IN- 
PUT LINE #1 [EL(1)]. 

Line 110 is the FOR-NEXT 
loop that makes the whole thing 
work. Each l(EL) has a number, 1 
to 14. The first time through the 
program, EL = 1. Therefore, the 
FOR-NEXT loop reads EP(EP = 
"print @ location" where I want 
the cursor to begin) and ES (ES 
= maximum number of charac- 
ters allowed for an input line). 



As the program progresses 
EL increments, or decrements. 
The FOR-NEXT loop rereads 
DATA lines 270-275 ending up 
with EP and ES equal to the cor- 
rect data for l(EL). 

RESTORE enables you to 
start from the beginning of the 
DATA line for each READ ses- 
sion EZ counts the number of 
spaces over from the original 
position (EP). Initially it's set to 
zero. 

The PRINT® EP statement 
prints a string of blanks equal to 
the maximum number of charac- 
ters (ES) allowed for that line. 
This is my way of clearing the 
line without erasing any of the 
white boundary. 

Each l(EL) is defined below: 

1(1) -customer number (3 characters) 

1(2)- cusiome: name (?0 char.) 

1(3) - customer business name (20 char ) 

1(4) -address line 1 (20 char.) 

1(5) -address line 2 (20 char.) 

1(6) - address line 3 (20 char.) 

The remaining lines are for 
customer phone numbers. 



1(7) and K11) H ' tor home or "W tor work 
(1 char ) 

l(8) and 1(12) area code (3 char ) 
l(9)and 1(13)- 3-digit prefix (3 char.) 
1(10) and 1(14) 4 digit number (4 char ) 

As you can see, each phone 
number is made up of four sepa- 
rate variables. The reason for 
this is to allow for punctuation 
during data input, and yet end 
up with a single variable for 
each phone number containing 
no punctuation (or at least 
limited to 11 characters). 

Later, in line 290 each set of 



98 • 80 Microcomputing, September 1980 



four variables is added together 
to create these two phone num- 
ber variables [1(7) and 1(11)]. 

In line 120 when EL is equal 
to, or greater than 7, this state- 
ment POKEs the necessary 
punctuation to the screen for 
the phone numbers. Since line 
120 Is within the main FOR- 
NEXT loop this punctuation will 
remain on the screen for the 
duration of the telephone num- 
ber input. 

The INKEYS Loop 

Line 130 is very important. It 
starts the INKEYS loop. PC% = 
175 - PC% creates a blinking 
cursor. 

You'll recall that in line 100 
PC% was set equal to 32. During 
the first pass of the INKEYS 
loop, PC% becomes equal to 143. 
This is a graphic block when us- 
ed in a PRINT CHRS(PC%) state- 
ment. The next time line 130 is 
executed, PC% equals 32 again, 
resulting in a blank and so on. 
Voila-a blinking cursor! 

The statement PRINT® EP + 
EZ, CHRS(PC%) therefore prints 
the cursor at (EP + zero) the 
first time, then EZ increments or 
decrements as characters are 
entered. 

Lastly there's the statement I 
= INKEYS which scans the key- 
board setting string variable I 
equal to whatever the keyboard 
sees. 

In line 140, PEEK (14400) and 
(14464) check to see if both the 
shift key and — are pressed. If 
they're both down, the program 
branches to LINE 280. 

If both keys are down the cur- 
sor will move backward erasing 
characters from the screen and 
memory. If you continue to hold 
the keys down, they act like a re- 
peat key. 

This is the only occasion 
where I PEEK the keyboard 
memory for control keys. For the 
remaining control keys I test the 
ASCII value of I (ASC(I)]. for 
reasons you'll see later. 

Line 150, as with any INKEYS 
statement, tests for no key be- 
ing depressed, in which case the 
INKEYS loop is repeated. This 
no- key test must come before 
you test tor the ASCII value of 
string variable I, because if I is 
null, you'll get an FC ERROR. On 



the other hand, it must come 
after the statement in line 140 in 
order to get the repeat back- 
space. 

Line 160 checks the cursor 
character. If it's the graphic 
block, a blank gets printed in its 
place. This eliminates a possi- 
ble stray cursor after hitting 
ENTER, CLEAR, -, etc. 

Lines 170 to 230 check to see 
if the key being depressed is a 
control key. These keys are 
SHIFT/E, SHIFT/S, CLEAR, -, t 
and ENTER. I test for the ASCII 
value, since it gives a single 
discrete value for individual 
keys or any combination of 
keys. 



While writing this program I 
used a subroutine in line 9000: 
l$ = INKEY$:IF l$ = '"THEN 
9000 ELSE PRINT® 0, 
IS.ASC(IS);: GOTO9000. Every 
time I wanted to find out the 
ASCII value of a key or combina- 
tion of keys, I'd run line 9000. 

In line 170 if EL is greater than 
6, we must be in the telephone 
number segment of the pro- 
gram. At that point, if SHIFT and 
the S key are held down, the pro- 
gram won't enter that particular 
set of four phone number vari- 
ables. Instead it goes to the next 
phone number, or, if it happens 
to be skipping the second and 
last phone number entry, it 



branches to line 290, where the 
phone numbers are assembled. 

Starting Over 

At line 180 if ASQI) = 32, 
you've hit the CLEAR key, indi- 
cating that you want to erase 
the line and start over. A string 
of blanks is printed at the cursor 
starting position (EP) for that 
time. The number of blanks is 
the same as the maximum num- 
ber of characters allowed (ES). 
EZ is set to zero, and the tem- 
porary input, l(EL), is nulled. 
Note that EL stays the same. 

At line 190 if ASC(I) = 8, 
you've hit the — causing the cur- 
sor to backspace one step and 



20 CLEAR (1000) : DEFINT E.N : DEFSTR I.P.Q.S.T : CLS : DIM 1(15), S{?0.8) 

30 CLS : G0SU8 1000 : REM ••• CREATE OR RECALL SCREEN DISPLAY "ERE •*• 

100 PCX • 32 : EL ■ '. 

110 RESTORE : FOR EC ■ 1 TO EL : READ EP.ES : NEXT : EZ ■ : PRINT ? EP, STRINGSfES .32) , 

120 IF EL > 6 POKE 1S833.62 : POKE 15837.45 : POKE 15841.45 : POKE 15897.6? : 
POKE 15901,45 : POKE 15905,45 : PRINT (8 599, " » HOME OR WORK"; 

130 PCX • 175 - PCX : I ■ INKEYS : PRINT 9 FP ♦ EZ, CHRS(PCI); 

140 IF PEEK( 14400) ■ 32 AND PEEK( 14464) ■ 1 GOTO 280 
REM *** SHIFT/LEFT ARROW ■ REPEAT BACKSPACE *** 

150 IF I ■ " M GOTO 130 

160 IF PCX ■ 143 PRINT 9 EP * EZ. CHRS(32); 

170 IF (EL> 6) AND {ASC(!) - 115) THEN IF EL -7 THEN El ■ EL 
REM •♦* SHIFT/S TO SKIP PHONE NUMBER *** 

180 IF ASC(I) ■ 31 PRINT 9 EP, STRINGSfES. 3?). : !(EL) ■ "" . I 
REM ••• CLEAR KEY ■ ERASE AND START OVER *** 



GOTO 110 ELSE GOTO 290: 



GOTO! 30 



190 IF ASCC! ■ 8 GOTO 280 : REM 



200 IF ASCC) ■ 91 THEN EL ■ EL - 1 : I (EL) 
REM **• UP ARROW • REDO LINE ABOVE * 



LEFT ARROW ■ SINGLE BACKSPACE *•* 

: PRINT « FP, STRING$;FS,32); 



El - EL + 1 : 



210 IF ASC(I) ■ 13 THEN PRINT 9 EP. I(EL) ♦ STRINGS( ES - LEN(MEL)) + 1. 32); 
IF EL < 15 GOTO 110 ELSE 290 : REM *•• ENTER KEY - SAVE ENTRY *** 

220 IF ASC(I) < 32 GOTO 130 

230 REM •** RESERVED FOR SHIFT/E ■ EDIT M00E ROUTINE ••* 

240 IF EZ <ES THEN I(EL) - I ( EL) ♦ I : EZ ■ EZ ♦ 1 : PRINT 9 EP. I(EL); : GOTO 130 

250 IF EL < 7 THEN 130 ELSE IF EL < 14 THEN PRINT • EP, I (EL); : EL - El ♦ 1 : GOTO 110 

260 GOTO 290 

270 DATA 88,3.152,20.216.20.280.20,344.20.408,20.472.1,474,3.478 

275 DATA 3,482.4,536,1,538,3.542,3,546.4 

280 IF EZ> THEN I f EL) ■ LEFTS! I(EL). EZ - I) : PRINT 9 EP ♦ EZ - 1. STRINGS! ES - EZ ♦ 2. 32) 
EZ ■ EZ - 1 : GOTO 130 : ELSE GOTO 130 

290 1(7) ■ 1(7) + 1(B) h [(9) ♦ i(io) : 1(11) - 1(11) ♦ 1(12) ♦ 1(13) ♦ 1(14) 

300 FOR X ■ 1 TO 7 : S(N,X) - I(X) : NEXT : S(N,X) • 1(11) : CLS : 
FOR X ■ 1 TO 15 : !(X) - "" : NEXT : N ■ N ♦ 1 : 
CLS : PRINT 9 320, "TO CONTINUE ENTERING DATA [ENTER C 1 " : 
INPUT "TO PRINT IT OUT [ENTER P]" ; : IF - "C" GOTO 30 

305 FOR X - TO N - 1 : FOR E ■ 1 TO 8 : PRINT "ENTRY:"; X * 1, "ITEM: - ; E, S(X,E) : NEXT E : 
PRINT STRINGS!60.42) : NEXT X : END 

1000 Tl - STRINGS (72. 19-.) : ^2 - STRINGS! 24 , 128) : T3 ■ STRINGS! 18, 191 ) 

1010 PRINT STRINGS (64, 191); : r 0" X ■ 1 TO 9 : PRINT Tl + '2 -» T3; : NEXT 
PRINT STRINGS (64. 191 ); : NEX* 

1020 RETURN 

Program Listing 



FOR X • 1 TO 5 



80 Microcomputing, September 1980 • 99 



erase the last character. The 
erasing is done by a branch to 
line 280. 

At line 200 if ASC(I) = 91 you 
hit t. This means you want to 
erase the line above. I put this in 
the program in the event you 
prematurely hit ENTER. 

Line 210 responds to ENTER 
by processing the data con- 
tained in l(EL). First, l(EL) plus 
some cleanup blanks are print- 
ed at the proper location (EP). 
Subscript EL is incremented by 
one in preparation for entering 
the next INPUT line [l(EL+ 1)]. 

If EL is less than 15 then the 
program branches to line 110 to 
begin entering the new l(EL). 
However, if EL is greater than 
15, then all l(EL) have been 
entered and we branch to line 
290 to complete data process- 
ing. 

Line 220 acts as a protection 
against entering certain TRS-80 
control characters. Refer to 
page C1 of the Level II manual. 

Line 230 is reserved for my 
SHIFT/E, edit/correction sub- 



routine. Normally, it would say 
"IF ASC(I)=101 GOTO... the 
editing subroutine." 

At line 240 if the number of 
characters in E(EL) is less than 
the maximum number allowed 
(ES), then the new character (I) is 
concatenated to the tail of l(EL). 
Since l(EL) is now longer by one 
character, EZ is incremented by 
one. Then l{EL) is printed at EP. 
This completes the INKEY$ loop 
so the program returns to line 
130. 

If, in the above line EZ equals 
ES, then the program drops to 
line 250. You won't be able to 
add any more characters to 
l(EL). However, If you're working 
on INPUT lines 7 through 13, the 
second half of line 250 comes in- 
to play. Basically, whatever you 
type after each of the four ele- 
ments of the phone number will 
trigger an advance to the next 
input line. 

Line 260 lets you jump over 
line 280. 

Lines 270 and 275 are the 
DATA statements for reading in 
line 110. 



Testing the Cursor 

The first instruction in line 280 
tests whether the cursor can 
move any further to the left. 
You'll recall that EZ increments 
every time the cursor moves to 
the right of the original starting 
position. As long as EZ is great- 
er than zero, there's room to 
move backwards or left. If EZ is 
greater than zero then the back- 
spacing and erasing occurs. 

This is accomplished by the 
statement l(EL) = LEFTKKEL), 
EZ-1) which chops off the last 
character in string l(EL). The 
new value of l(EL) is printed, fol- 
lowed by a string of blanks 
equal to the maximum string 
length (defined by ES), minus 
the length of l(EL). The blanks 
are for erasing the rest of the 
line. 

The new cursor position be- 
comes EZ minus one, then the 
program returns to line 130. 

Line 290 combines the four 
telephone number variables into 
two master variables (l(7) and 
1(11)1. 



Lines 300, 305 and 1000 
through 1020 are included in 
order to make the program work 
for demonstration purposes. 

Data is processed in line 300. 
The contents of the eight tem- 
porary storage variables (1(1) 
through l(7) and 1(11)] are trans- 
ferred to permanent storage in 
two-dimensional array S(N,X). 

Line 305 prints out the con- 
tents of array S(N,X). 

Lines 1000 through 1020 sim- 
ply create a screen image. 

In my Customer Sales Pro- 
gram line 300 is the beginning of 
the error correction and editing 
subroutine mentioned in line 
200. Following that, I enter the 
remaining sales data and then 
store ft all on disk. 

All of these later program seg- 
ments draw from the input sub- 
routine. ■ 



Addendum 

Since writing this article, 
Wilde has written a machine lan- 
guage version of the program. It 
is available from the author. 



GOO-GOO, GAA-GAA, REA-DEE... 




So your new TRS-80 just said its first word. REA — DEE. Now 
what? Are you thinking of its future? About its education? 

Before you run out and get an ANSI standard FORTRAN or a 

CODASYL data base management system, think back to when 

you were less than a year old. How would you have handled the 

bewondering plethoria of data you are possibly thinking of 

handing to your computer? No, you have to CLOAD 

before you can RUN — we all know that So put 

away all those COBOL routines and Pascal texts, 

and get a subscription to CLOAD MAGAZINE 

CLOAD has just the right mix of nutritious 

programs for a healthy, happy new computer. Once 

a month, a new cassette will arrive at your door by 

First Class Mail, full of software that will provide a 

solid learning foundation for both you and your 

computer. 



The Fine Print: 

CXerseas rates a tad higher — please write for them. 

Back issues available— ask for our list. 

TRS-80 is a trademark ol Tandy Corporation 

Calif orny residents add 6% to single copies and anthologies 

Programs are for Lvl I 4K and Lvl II I6K. After Oct I, Lvl II 16K only. 



PRICES Now 

l year subscription $36.00 

6 month subscription $20. 00 

Single copies $ 3.50 

Anthology-volume I $10.00 

Anthoiogy-volume 2 $1 5.00 



Oct 1 

$42.00 
$23.00 
$ 4.50 
$10.00 
$15.00 



Copyright CLOAD MAGAZINE 1980 



Mastercharge Visa Welcome. 
Also Cash E> Gold. 



- CLOAD 

MAGAZINE, inc. 

P. O. Box 1267»Goleta. CA 93017 
(805)964 2761 



100 • 80 Microcomputing, September 1980 



SPOOLER FOR THE TRS-80* 

A proven TRSDOS* / NEWDOS* / NEWDOS80* extension which greatly 
improves the system performance when running typical business 
applications. Many applications have been benchmarked to run nearly 
twice as fast with the Spooler installed. Installs in minutes. No changes to 
your programs. 

Specify: Mod I (TRSDOS/NEWDOS) or Mod I (NEWDOS80) or Mod II 
(TRSDOS 1.2). $100. 



Modelll XBASIC 

The best of Apparat's ideas for enhancing 
Microsoft Basic, with some of our own. 
Ten one-letter abbreviations for commonly 
used commands, six single-key (immediate) 
commands, and an extremely powerful 
cross-reference facility. $50. 

HOST II /TERM II 

Allows "remote control" of one Model II 
from another, which may be miles away. 
Designed for remote software support at 
customer locations from our office. $50. 

DUMP 

Shows every active variable in the 
resident Basic program, along with its 
current value. Indispensible for the tough 
de-bugging tasks. Requires XBASIC. $60. 

FRIEND 

A CP/M* like set of shorthand notation 
utilities which stretch the power of 
TRSDOS. Copy, kill, print, display a group 
of files based on generic and wildcard 
selection. Example: move */BAS:1 to 
=/OLD:2 will copy all the 7BAS' files on 
Drive 1 to Drive 2, renaming them to 
70LD. 1 $75. 

SKRUNCH 

Compress your Basic programs to an 
absolute minimum. Typically saves 30-40% 
memory, and 7-10% run time. Very, very 
quick. $35. 

SAVE 

Retrieve the resident Basic program 
following a system crash. Don't be without 
this one, when you need it! $35. 



AND NOW UNDER DEVELOPMENT: 
SUPERCOBOL: A high level, structured 

language preprocessor designed to work 
with Radio Shack's new COBOL compiler 
(RSCOBOL). Greatly improves the usability 
of the world's most popular business 
computer language. 

MASTER / SLAVE 

Used for transferring files from one Mod II 
to another. All formats, and baud rates to 
9600 are supported. "Slave" system can be 
unattended! More convenient when used 
with Host ll/Term II. $150. 

BUGZAP 

A powerful machine language utility 
modify / print memory, disk sectors. An 
invaluable part of the programmer's 
toolkit. $50. 

SBASIC (Model I or Model II) 

From Ultimate Computer Systems. A high- 
level structured pre-processor for Basic. 
Perform named subroutines. Conditional case 
structure. While loops. Until loops. And 
much more! Just forget about line 
numbers! Model II version is compiled, and 
super fast. Model I $50. 

Model II $75. 

D0SFIX 

A collection of patches to TRSDOS and 
Basil to enhance their usability and 
functions. Includes our well-known 
BREAK7E patches to keep the break key 
from being used by mistake. 
Free with any Model II software purchase. 



TERMS: Shipments normally 
made same day. Terms: Visa, 
MC add 4%. C.O.D. orders add 
$5.00. Ohio residents add 

4 1/2%. 



^232 



ORDER NOW! 
Snapp, Inc. 

8160 Corporate Park Drive 

Cincinnati, Ohio 45242 

513-891-4496 



•TRS-80 and TRSDOS are trademarks of 
The Radio Shack division of Tandy Corp. 

•NEWDOS and NEWDOS/80 are trade- 
marks of Apparat, Inc. 

*CP/M is a trademark of Digital Research. 



* Reader Sen/ice— see page 226 



80 Microcomputing, September 1980 • 101 



HARDWARE 



A high quality alternative. 



Selectric Hard Copy 



Michael W. Bickerton, M.D. 
2631 Wharton St. 
Philadelphia, PA 19146 



It didn't take long after buying 
my TRS-80 for me to realize 
that I needed hard copy. 

As a surgical intern. I didn't 
have $700 for a quality printer. 
But I did have $75 for a broken- 



down, used input-output IBM 
Selectric. 

Although the typewriter was 
in bad shape, it had the electro- 
magnets and contacts for use 
with a computer. All I had to do 
was figure out how to interface 
the two. 

The only information I could 
find was Emerson Brooks' arti- 
cle, "Taming the I/O Selectric" 
(Kilobaud. June-July 1978). But 




Brook's method has several 
drawbacks. 

First, he relies on software to 
perform all decoding and timing 
functions. Every carriage return 
uses 500 ms, even from mid- 
page. 

Also, the software must be 
loaded every time you want to 
use the printer. I wanted a driver 
that would allow the Selectric to 
operate at its maximum speed 
of 15 characters per second. I 
also wanted to be able to simply 
turn on my TRS-80 and go to 
work. 

My driver solves both prob- 
lems. It will work with BASIC'S 
LLIST and LPRINT commands 
without any software patches. It 
will also decode both upper and 
lowercase characters, and will 
work well with such programs 
as the Electric Pencil. You can 
even write your own word pro- 
cessor in BASIC, since the 
TRS-80 will output upper and 
lowercase strings. 

If you don't have a TRS-80, an 
interface circuit will still let you 
use this driver. 

The Selectric Typewriter 

The Selectric mechanism has 
been used in computer termi- 
nals for years. 

The models 731 (Photo 1) and 
735 are available on the surplus 
market. The only difference is 
the 735's wider fifteen-inch 
mechanism. 

The basic Selectric mecha- 
nism is sturdy and well de- 



signed. A type element the size 
of a golf ball rotates as you hit 
each key and types the charac- 
ters. The printing quality is sec- 
ond to none and is suitable for 
everything from business letters 
to hardcopy memory dumps. 
Also, a number of different type- 
faces are available. 

The Selectric uses a series of 
electromagnets to activate the 
proper mechanical clutches. A 
seven-bit Selectric code directly 
represents units of ball rotation 
(R1, R2, R2a and R5) and ball tilt 
(T1 and T2). The seventh bit is a 
shift that is actually a 180 de- 
gree rotate operation. 

For example, the character 
"s" is represented by 0010001 
(the format is shift/T2/T1/R5/R2a 
/R2/R1, zeros being active in all 
but shift and R5). To print an "s" 
the ball tilts two units (T2) and 
rotates four units (R2 + R2a). 
The character "S" is represent- 
ed by 1010001, which is shift, tilt 
two and rotate four. 

The standard Selectric code 
is called correspondence code, 
but many Selectrics use BCD 
(Binary Code Decimal) coding. 
These codes are not inter- 
changeable, and use different 
balls. For example, the char- 
acter "S" is represented by 
01001 10 in BCD. Also, BCD type 
balls have only upper case let- 
ters, numbers and special sym- 
bols. 

To tell which kind your Selec- 
tric is, buy a standard type ball 
(correspondence). If your type- 











MEMORY 
MAPPED 
0EC0DER 
FIG 6 








RO. * = 


















08 - 07 












OTHER 
COMPUTERS 




A0 - A15 










OB - 07 






IN. OUT 




PORT 
DECODER 

FIG 7 


































DRIVER 
FIG 2 
FIG 3 

FIG 4 


a 


SELECTRIC 












STROBE 












BUSY 




EXPANSION 
INTERFACE 




\ 










\ 
















At- AI5 






FEEDBACK 












TRS-80 








oe-07 

RD*. WR * 






37E6 
DECODER 
FIG 5 














Fig. 1. Overall block diagram for the 








Select ric interface. 



writer prints characters differ- 
ent from those on the keys, you 
have a BCD machine. 

If you use the typewriter as an 
output device only, a BCD ma- 
chine works fine. But if you wish 
to type from the keyboard, you 
must convert to correspon- 
dence. (See Robert M. Weil's 
'"Converting Selectric Key- 
boards to Correspondence 
Code." Kilobaud, Dec. 1979 and 
Jan. 1980.) 

The Selectric code is shown 
in Table 1. Note that the charac- 
ters "<," ">", and "t" are not 
available on standard type balls. 
My interface substitutes "I" for 
"less than," "g" for "greater 
than" and "E" for "exponentia- 
tion." 



Photo 2 shows the undersur- 
face of the Selectric mechanism 
and Photo 3 shows a close up of 
the printing (T1, T2, R5, R2a, R2 
and R1) electromagnets. Input- 
output Selectrics also contain a 
bank of switch contacts, which 
are directly above the printing 
electromagnets (Photo 2). These 
input data from the Selectric to 
a computer. Since most micro- 
computers have their own key- 
boards, you can disconnect the 
switch bank. 

Driver Circuitry 

Fig. 2 is a block diagram and 
Fig. 3 is a schematic of the driv- 
er circuit. IC1 and IC2 form the 
heart of the driver. They are bi- 
polar read-only memories that 



convert ASCII into correspon- 
dence code. A clever arrange- 
ment decodes control com- 
mands. If a control function is 
input D07 goes high. This is fed 
back to the input through R1 and 
C2. This serves to re-configure 
the read-only memories for de- 
coding control commands. 

When a strobe pulse is re- 
ceived, the decoded data is 
latched into eight-bit latch IC3 
and IC4. Flip-flop IC11a is also 
set, providing a busy signal. 
The strobe pulse propagates 
through a series of monostable 
multivibrators. If a control com- 
mand (carriage return, space, 
backspace, tab and index) is 
decoded, pin 2 of IC15 is high 
and the pulse from IC9a triggers 
IC10a. IC10a in turn strobes the 



control command to the proper 
relay through IC7 and half of 
IC6. 

If a printing command is re- 
ceived, the situation is more 
complex. This time pin 4 of IC15 
is high and the pulse from IC9a 
passes through IC12a to trigger 
IC9b. (IC10b is also triggered but 
has no effect.) IC9b activates 
IC5 and half of IC6 and prints the 
character. It also provides a 
strobe out to the strobe electro- 
magnet. 

If the typewriter is in the incor- 
rect case the pulse triggers only 
IC10b and shifts up or down. 
IC12b detects the shift. IC9b 
then prints the character. 

Any print or control operation 
activates one of five contacts in 
the typewriter. This is de- 
bounced by IC11b and clears 
ICHa, resetting the busy signal. 

The 14 electromagnet drivers 
(Fig. 4) are identical, and use 
MJE6043 darlington transistors. 
The diodes in parallel with the 
relays protect the transistor 
from the high voltage induced 
when the electromagnet is 
turned off. Since the duty cycle 
is low, the transistors do not re- 
quire heat sinking. 

The power supply is a conven- 
tional full-wave rectifier with a 
regulated +5 V supply for the 
TTL integrated circuits. My Se- 
lectric had 48 V electromagnets 
that measure 475 ohms. If your 
electromagnets measure 125 
ohms, then use the alternate 24 
V supply. 



Photo 2. Bottom view of the Selectric showing keyboard contacts 
(left), printing electromagnets (left lower) and control elec- 
tromagnets (right). 



Photo 3. Closeup view of printing electromagnets. From left to right 
they are 12, Strobe, T1, R2a, Ft1, R2 and R5. 




Keyboard 
Contacts 
(Unused) 



Prtnling 
Electro- 
magnets 



80 Microcomputing, September 1980 • 103 




* 

5 



c 
o 
o 

co o 

o -c 

oj «o 

$ w 

o "> 

ii 

§■ £ 

Q O 
ft Q) 

5 

I! 

c CD 



0) 



Q) 



it 

2 q> 

°>£ 
co — 

1 ■£ 

B q> 

Eco 
. o 

Q> O 

O Q) 

00 s 

ci) o 
£ 2 



104 • 80 Microcomputing, September 1980 



• * * A PERCOM BULLETIN * * * 

Adapter for TRS-80* computer eliminates disk read errors 



Garland, Texas — Harold 
Mauch, president of Percom 
Data Company, announced 
that the company is marketing 
a simple plug-in adapter for 
TRS-80* computers that cor- 
rects a design deficiency in 
the disk controller circuit. 

The problem, which 
causes disk read errors, has 
been traced to Tandy's re- 
liance on a circuit internal to 
the FD1771 controller IC to 
perform the function of 
separating clock and data 
pulses. 

As explained in the 
Backgrounder, use of the in- 
ternal chip circuit for reliable 
data-clock separation is a de- 
sign shortcut which the man- 
ufacturer of the controller IC 
warns against. 

The Percom solution, a 
PC card adapter called the 
SEPARATOR™, eliminates 
the problem by substituting an 
explicit data separator circuit 










PIN 


A 





575K DATA SEPARATOR 
INC. 



Percom adapter fixes TRS-80* computer disk controller. 

— one which has been used The SEPARATOR™ is 

reliably in Percom disk con- installed without modifying the 

trollers since 1977 — for the host system. The user merely 

internal IC separator circuit. removes the FD1771 IC from 



the host controller, installs the 
IC in the DIP socket on the 
SEPARATOR™ card, and 
plugs the adapter into the va- 
cated socket of the host con- 
troller. 

Percom cautions that 
opening the Expansion Inter- 
face of the TRS-80* comput- 
er, which is required to install 
the SEPARATOR™, may void 
the computer's limited 90-day 
warranty. 

The SEPARATOR™, 
which sells for $29.95, may 
be purchased from Percom 
dealers or ordered direct from 
the factory. The Percom toll- 
free order number is 1- 
800-527-1592. 

Payment for mail orders 
may be made by certified 
check, cashier's check or 
money order, or charged to a 
Master Card or VISA account. 
Texas residents must add 5% 
sales tax. 



Percom Mini-Disk Drives 
Store More, Cost Less. 

Percom mini-disk drives store more data, are 
more reliable, yet a 40-track Percom drive 
costs $100.00 less than a 35- track Tandy 
drive. 

You can store over 1 02 Kbytes per side 

on Percom TFD-100™ 40-track drives; 197 

Kbytes on one side of a TFD-200™ 77-track 

drive. A patch — supplied free on minidiskette — upgrades 

TRSDOS * for operation with the newer 40- and 77-track drives. 

Both TFD-100™ and TFD-200™ models are available in 

one-, two- and three-drive configurations. 

Prices start at $399 for a single-drive TFD-1 00™, $675 for a 
single-drive TFD-200™. Drives are supplied with heavy-duty 
power supplies. Metal enclosure is finished in compatible silver 
enamel. 

See your nearby Percom dealer or order direct by calling 
toll-free 1-800-527-1592. 




Five-Inch Disks Store More 
Than Eight-Inch Disks! 



Garland, Texas — June 25, 
1980 — Percom Data Company 
has begun production of a 
double-density disk controller 
adapter for TRs-80* Model I com- 
puters. 

Harold Mauch, president of 
Percom, made that announcement 
here today, saying that data stor- 
age capacity using the adapter and 
double-density disk operating sys- 
tem — which is included — can be 
increased to as much as 294 
Kbytes per minidiskette. 

By comparison, the maximum 
storage for larger eight-inch disk 
systems used with the TRS-80* 



Model I computer is about 290 
Kbytes. 

Mauch said the PC card adap- 
ter, which plugs into the controller 
chip socket of the computer Ex- 
pansion Interface, works equally 
well for either single-density or 
double-density storage, and users 
may continue to run programs 
under TRSDOS*, OS-80™ and 
other single-density operating sys- 
tems with the adapter installed. 

Price, for the plug-in adapter, 
the TRSDOS*-like double-density 
DOS and a utility for converting 
files and programs from single- to 
double-density format is expected 
to be $21 9.95. 



BACKGROUNDER 
CRC ERROR! TRACK LOCKED OUT! 

by the Technical Staff 
Percom Data Company 



This problem started while 
we were studying an annoying 
problem with the TRS-80* com- 
puter. Disk drives sold by Percom 
are realigned and tested before 
shipment. We noticed, however, 
that some disk drives would pass 
the Percom inspection but just 
would not work reliably on the 
inner tracks with a TRS-80* com- 
puter. These drives were within 
the manufacturer's specifications, 
and would function perfectly on 
other disk systems Percom man- 
ufactures — "perfectly" here 
meaning more than 50 million 
bytes read without error! 

The disk read data separa- 
tion arrangement in the TRS-80* 
computer Expansion Interface 
uses an internal data separator of 
the FD1771 disk formatter/con- 
troller IC. Use of the FD1771 in- 
ternal data separator is not 
recommended by Western Digital, 
the IC manufacturer. The follow- 
ing note appears on page 17 of 
theFD1771 datasheet: 

Internal data separation 
may work for some appli- 
cations. However, for ap- 
plications requiring high 
data recovery reliability, 
WDC recommends exter- 
nal data separation be 
used. 



We suspected the data 
separator because the problem 
was most severe on disk inner 
tracks where storage density is 
highest and data separation is 
most critical. 

To prove our point, a techni- 
cian breadboarded a standard 
Percom data separator circuit, 
and configured it to plug directly 
into the PD1771 IC socket of the 
TRS-80* computer controller. 

When connected to the 
TRS-80* computer, a trouble- 
some drive functioned perfectly! 
We ran a BACKUP utility many 
times and never got a track lock- 
out. Before we added the external 
data separator circuit to the com- 
puter, this same drive would al- 
ways lock out tracks, and would 
have difficulty reading from the 
inner (higher number) tracks. 

The Percom data separator 
circuit fixes the mini-disk control- 
ler of the TRS-80* computer. The 

type of drives being used is ir- 
relevant; the circuit eliminates 

disk read errors resulting from the 
inability of the Tandy controller 

design to reliably separate clock 
and data signals when reading 
high density inner tracks. 



PRICES AND SPECIFICATIONS SUBJECT TO CHANGE WfTHOUT NOTICE. 



" 2M PERCOM DATA COMPANY INC. 211 N. Kirby Street Qarland, Texas 75042 (214) 272-3421 

,M trademark of Percom Data Company. Inc. 'trademark of Tandy Radio Shack Corporation which has no relationship to Percom Data Company 



^Reader Service— see page 226 



80 Microcomputing, September 1980 • 105 



READ ONLY 
MEMORY 

DECODING 

• ICI 00 » 

1 IC2 DOI 

2 002 
S DOS 

4 004 

5 009 

e 006 

T DOT 



00* 
8 BIT 001 

LATCH 002 

003 
004 
DOS 



009 
DOI 



00 4 
005 

Doe 

DOT 



IC3 

IC4 006 



PRINTING 

RELAY 

GATE 

1C5 
IC7 



CONTROL 
RELAY GATE 



TRANSISTOR 
DRIVERS 



•R2 
•R2A 



TRANSISTOR 
DRIVERS 



•SPACE 

• CARRIAGE RETURN 
■INDEX 

•TAB 
•BACKSPACE 

• SPARE 



-CONTROL/ 
PRINTING 



MONOSTABLE 
ICIOa 



MONOSTABLE 

IC9b 



TRANSISTOR 
ORIVER 



TIMING 
1C8 

IC9a 



--SLL 



UPPER /LOWER CASE 



GATE 
ICI5 



Lr 



SHIFT 

DECODING 

ICIOb. ICI2a, 
ICI2b. IC 1 3. 
ICI4. ICI5 
AND IC 16 



STROBE 
OUT 



•SHIFT 
DOWN 



BUSY FLIP FLOPS 



SHIFT FEED8ACK CONTACTS 



CONTROL AND PRINTING FEEDBACK CONTACTS 



Fig. 2. Block diagram of the driver circuitry. With the exception of the feedback connections, all outputs 
on the right side of the diagram go to the Selectric electromagnets. 



Interface Circuitry 

The driver connects directly 
to the TRS-80 expansion inter- 
face. If you don't own the inter- 
face, Fig. 5 presents a suitable 
one. 

Radio Shack Level II BASIC 
reserves memory position 14312 
decimal (37E8 hexadecimal) for 
the line printer. IC20, IC21 and 
IC22 decode this signal, and pin 

POWER SUPPLY 



6 of IC22 goes low when memory 
position 14312 is addressed. 

Any time the TRS-80 outputs 
to the line printer, it places the 
ASCII code on the data bus, out- 
puts 14312 to the address lines 
and pulses the WR* line low. 
("*" denotes a signal that is nor- 
mally high and goes low when 
active. Thus, WR = WR*.) When 
this happens pin 1 of IC23 goes 
high, latching the data into 



TRANSISTOR DRIVERS 



RELAY J i \ IN4004 




Fig. 4. The transistor drivers are all identical and use MJE6043 tran- 
sistors. There are 14 transistor drivers; six for T1, T2, R1, R2, R2a and 
R5, one for the strobe electromagnet, five for the carriage return, 
space, backspace, tab and index electromagnets and one each for 
shift up and shift down electromagnets. 



eight-bit buffer IC18 and IC19 
and triggering the monostable 
IC24 to produce a strobe signal. 

Then Level II Basic looks at 
memory position 14312 by puls- 
ing the RD* line low, and waits 
until D7 (the busy signal) goes 
low before outputting another 
character. 

To use another computer, you 
need to know if your language 
uses memory mapping or port 
addressing. Either of the cir- 
cuits in Figs. 6 or 7 should be 
suitable. 

Fig. 6 is a memory-mapped in- 
terface that uses four cascaded 
74LS85 four-bit magnitude com- 
parators. When the input ad- 
dress lines A0-A15 are equal to 
the address programmed on the 
dip switches SW1 and SW2, the 
cascade output (pin 6 of IC25) 
goes high. If the write line WR* 
goes low, then the data lines DO 
to D7 are latched into eight-bit 
latch IC18 and IC19. 

At the same time, IC24, a 
monostable multivibrator, gives 
a strobe signal. If the read line 
RD* goes low, the busy signal is 
input to the computer. On the 
TRS-80, D7 inputs the busy sta- 
tus, and D6, D5 and D4 input oth 
er status information (which I 
defeated by tying the lines to the 
appropriate logic levels). If your 



CHAR. 


ASCII CORR. 


CR-LF 


10-13 128 


BS 


24 128 


INDEX 


26 128 


SPACE 


32 128 


! 


33 127 




34 85 


# 


35 128 


S 


36 121 


% 


37 117 


& 


38 125 


• 


39 21 


( 


40 112 


) 


41 113 


* 


42 124 


+ 


43 70 




44 12 




45 




46 22 


/ 


47 9 





48 49 


1 


49 63 


2 


50 54 


3 


51 62 


4 


52 57 


5 


53 53 


6 


54 52 


7 


55 61 


8 


56 60 


9 


57 48 




58 77 


: 


59 13 


<d) 


60 41 


= 


61 6 


>(g) 


62 15 


? 


63 73 


@ 


64 118 


A 


65 92 


B 


66 96 


c 


67 108 


D 


68 109 


E 


69 101 


F 


70 78 


G 


71 79 


H 


72 97 


I 


73 84 


J 


74 71 


K 


75 100 


L 


76 105 


M 


77 95 


N 


78 102 


o 


79 89 


P 


80 69 


Table 1. ASCII and corre- 


spondence codes. All values 


are decimal. 


When decoded 


into binary 


the correspon- 


dence code represents 


(MSB)Control Character/ 


Shift/T2VT1 


'/R5/R2a'/R2'/ 


RV(LSB). 





language uses another arrange- 
ment, connect pins 3, 5, 7 and 9 
of IC17 to the appropriate data 
lines. 

Fig. 7 shows a port-based in- 
terface circuit. 74LS85 magni- 
tude comparators are again 
used to compare AO through A7, 
with the programmed port ad- 
dress on dip SW1. Instead of 
RD* and WR* signals, the port 
interface uses IN* and OUT* 
lines. Restrictions on status in- 
formation are the same as for 
the memory-mapped interface. 



106 • 80 Microcomputing, September 1980 




::::=£> — |>Hi> 

«M) »5 (10) HP*-' 



Fig. 5. The interface for the TRS-80. If you have the expansion inter- 
face, this circuit is not needed since the signals, D1 to D7, busy and 
strobe, are available from the expansion interface. Numbers in pa- 
rentheses correspond to the TRS-80 expansion port edge connector. 



Construction 

Use any convenient method. 
The layout isn't critical, so 
printed circuitry or perfboard is 
suitable. I used wire-wrap sock- 
ets and a slit-n-wrap tool (Pho- 
tos 4 and 5). 

I brought all logic signals out 
through a 44-pin edge connector 
for use in a homemade card 
cage. The transistor drivers, In- 
terface circuit and power supply 
were constructed on separate 
perf boards. 

I had some difficulty locating 
a 40-pin connector to plug into 
the TRS-80 expansion port. I fi- 
nally used an AP edge connec- 
tor (part number APP924065-36) 
with a 36-inch ribbon cable per- 
manently attached. 

Fig. 8 shows the TRS-80 ex- 
pansion port pin designations. 
The TRS-80 uses odd pin num- 



bering, which is printed on the 
circuit board. 

Be especially careful when 
wiring the 40-conductor ribbon 
cable. I used an ohmmeter to 
trace each wire and engraved 
the word "top" on the upper sur- 
face of the 40-pin connector to 
ensure that I would not insert it 
upside down. 

I used 25-pin D plugs and 
sockets with a 25-conductor rib- 
bon cable to connect the Selec- 
tric. Fig. 8 shows my pin desig- 
nations for the D connectors. 
My Selectric had a 50-pin plug 
attached to a heavy metal brack- 
et. I substituted the 25-pin D 
socket and hooked up the cable. 

i wanted to build the complete 
circuitry into the Selectric type- 
writer cabinet, but didn't have 
enough room. If you have the 
space, you might consider this 
option. 





Photo 4 and Photo 5. The driver circuit board. Wire wrap sockets and 
a slit-n-wrap tool were used. The 44-pin edge connector is for use in a 
home made card cage. 



THE LOWEST 

prices on this high-quality software. Buy direct and save 50%. Now, also 
available for CBASIC on CP/M and MBASIC on HEATH HDOS. 
DATA BASE MANAGER Modi 189 Mod-ll $199 

You can use it to maintain a data base & produce reports without any user 
programming. Define file parameters & report formats on-line. Key 
random access, fast multi-key sort, field arith., label, audit log. No time- 
consuming overlays. 500 happy users in a year. Mod-ll version with over 
50 enhancements. 

A/R Modi $69 Mod-ll $149 

Invoices, statements, aging, sales analysis, credit checking, form input, 
order entry. As opposed to most other A/R, ours can be used by doctors, 
store managers, etc. 

WORD PROCESSOR Modi $49 Mod-ll $49 

Center, justification, page numbering . . Used for letters, manuals, and 
reports. Mod-I version features upper/ lower case without hardware 
change! 

MAILING LIST Modi $59 Mod-ll $99 

The best! Compare and be selective. Form input, 5-digit selection code, zip 
code ext., sort any field, multiple labels. Who else offers a report writer? 

INVENTORY Mod-I $99 Mod-ll $149 

Fast, key random access. Reports include order info, performance 

summary, E.O.Q., and user-specified reports. Many converted their 

inventory to ours! 

PAYROLL. A/R, A/P. and GL available for the Mod-ll DOS and CP/M 

L216, a cassette package of 10 business programs for Level II 16K 

systems, $59. 

All programs are on-line, interactive, random access, virtually bua free. 

documented and delivered on disks. Mod-I programs require 32K TRSD0S, 

and credit is allowed when you upgrade to Mod-ll. We challenge all 

software vendors to offer low cost manuals so you can compare and 

avoid those high-priced, undocumented, on-memory' programs. 

Manuals alone $5 for Mod-I, $10 for Mod-ll. Don't let our low prices fool 

you! 

Mod-ll programs are extensively modified, guaranteed to run with 1 year 

newsletter and updates. 10% off for ordering more than 1 Mod-ll program. 

MICRO ARCHITECT. INC.. "» 

96 Dothan St.. Arlington, MA 02174 



-Reader SfWC t W > page 226 



80 Microcomputing, September 1980 • 107 



AI5 
AI4 

All 

a 1 2 



2 4 3 



1 



M^T~^ J5L 




07 -NOT USEO 



Fig. 6. This circuit will operate 
with computers that use a 
memory mapped output to the 
line printer. The memory loca- 
tion is programmed on SW1 and 
SW2. 



FROM COMPUTER 



TO DRIVER 



Fig. 7. This circuit will operate 
with computers that use a port 
addressing scheme to output to 
the line printer. The port address 
is programmed on SW1. 



MAY CONNECT 
TO DIFFERENT 
DATA LINES ON 
OTHER COMPUTERS 




D7-N0T USED 



108 • 80 Microcomputing, September 1980 




AUTHORIZED 

TRS-80®.. 



RA301 



10% 

DISCOUNT 

Off 

List 

26 4002 

64K 1 Drive 

$3499.00 



COMPUTER SPECIALISTS 

26-1056 16K Level II System with Keypad $688.00 

26 1145 RS 232 Board 84.00 

26 1140 O K Interface 249 00 

26 1141 16 K Interface 365 00 

26 1142 32 K Interface 476 00 

26 1 160 Mm. Disk Drive O 424 00 

26 1161 Mini Disk Additional 424 00 

26 1154 lineprinter II 720 00 

26 1156 lineprinter III 1799.00 

26 I 180 Voice Synthesiser. 339.00 

26 1181 VOXBOX 145 00 
26 1104 Factory Upper Lower 

Case AAodifaction Installed 70 00 

26 1506 Scnpsit Tape 60 00 

26 1563 Scrips. I Disk 85 00 




15% 

DISCOUNT 

Off 

List 

26-1054 
4K Level II 

$552.00 




CERTRDniCS 

Fast 100 CPS Centronics 
730 Printer - $675.00 
Text Quality Centronics 
737 Printer - $850.00 



ALL OTHER RS SOFTWARE 

FURNITURE. STANDS, CABLES 

AND ACCESSORIES DEDUCT 

10°o FROM CATALOG PRICE 



Model II Cobol Compi 


ler 


$360.00 




Cobol Run Time Packc 


9 e 


1 $36.00 





Novation Cat Modem $149.00 
CCA Data Management 

System 72.00 

Adventure Games 

Games 1 -9 each 14.00 



Model I Basic Compiler $180 00 

Model II Basic Compiler 360 00 



E3 

o 



BASF 



10 5 1 • Diskettes 
10 8 Diskettes 



S45 00 
47 00 



□Acorn 
Software 
Products. Inc. 

GAMES 

Alien Invasion $9 00 

Stock Market 9 00 

Stai Irek 9 00 

Block Em 9 00 

TingTong 9 00 

UTILITIES 

System Savers 14 00 

EDUCATION 

Language Teacher 18 00 



1-800-841-0860 Toll Free Order Entry 

MICRO MANAGEMENT SYSTEMS, INCf 



No Taxes on Out Of 

State Shipments 

Immediate Shipment 
From Stock. 



DOWNTOWN PLAZA SHOPPING CENTER 

115CSECONDAVE. S.W. 

CAIRO, GEORGIA31728 

(912) 377-7120 Go. Phone No. 

'»S SO i» ■ rvgltterad trademark of th« Tandy Corp 



Full Factory Warranty 
on All Items Sold. 

Largest Inventory 
In the S.E. U.S.A. 



■Header Service— sea page 226 



80 Microcomputing, September 1980 • 109 



PIGSKIN 



by John Laurence, 

Rick Sothen, 

Walter Gavenda 




Don't Get Enough on Sunday? 

With Pigskin you work on your offense and de- 
fense any day you choose. This football game for 
the TRS-80* has most of the elements of the games 
you watch every weekend. But in Pigskin you call 
the plays, watch the thirty-second clock, and get 
called for penalties, if you aren't careful. Featuring a 
graphic display of the field, the ball, and statistics on 
the scoreboard, Pigskin has eleven offensive plays 
and seven defensive formations. 

You compete against a friend or battle against the 
program in Pigskin. If you go against the program, 
there are five levels of difficulty. And they aren't 
easy. You can even save a game if you need to go out 
for beer! 

Acorn produces several games for the TRS-80.* 
These include Pinball, a graphic arcade-like game; 
Invaders from Space, a fast action program with 
sound; Quad, a three-dimensional strategy game; 
and Gammon Challenger, the popular backgam- 
mon program. Each is available at only $14.95 on 
tape and $20.95 on disk for a 16k, Level II TRS-80.* 
Ask for these and other quality Acorn programs at 
your local computer store. 

* TRS-80 is a trademark of Tandy Corp 



DEALER INQUIRIES INVITED 



IMP Software Products, Inc. 

634 North Carolina Avenue. S.E., Washington, DC 20003 



Acorn 



^3* 




ix Feedback 
Contact 



Space/Backspace 
Feedback Contact 



Tab Feedback Contact 

(partially hidden from view) 

the two wires are going 



Photo 6. Rear view of the Selectric showing location of the index, 
space/backspace and tab feedback contacts. 



.arriage 
Return 
eedback 
lontacts 




Photo 7. Right side view of the Selectric showing shift feedback con- 
tacts, shift electromagnets and carriage return feedback contacts. 



My Selectric had a maze of 
wiring to feedback contacts, 
electromagnets and keyboard 
contacts, which I removed or 
disconnected. I brought the 
common connection to the elec- 
tromagnets out to pin 1 on the D 
socket. My Selectric already has 
suppression diodes. Check the 
polarity of these diodes since it 
might be connected differently. 
If you have any questions, use 
suppression diodes on the tran- 
sistor driver board instead. 

Locate the printing and oper- 
ational electromagnets and wire 
them to the D socket. Fig. 9 
shows the location of these 
electromagnets. Next, locate all 
five of the feedback contacts 
and the two shift feedback con- 
tacts, and wire them according 
to the schematic diagram (Fig. 
3). See Photos 6, 7 and 8 and Fig. 
10 to locate these contacts. 

The final connection is the 
ground. Attach it directly to the 



frame. I used the connector 
bracket screw. 

You can program the read- 
only memories with the data in 
Table 5. If you don't have the fa- 
cilities, I will sell prepro- 
grammed 74S387 ROMs. I'll also 
consider programming these 
memories for special features. 

Operation 

This interface can be used di- 
rectly with Basic's LLIST and 
LPRINT commands. Therefore, 
programs that use the TRS-80 
line printer will work without 
modification. 

If you have a program with a 
large number of PRINT state- 
ments that you wish to output to 
the Selectric, you can retype all 
PRINT statements, substituting 
LPRINT. 

Here's a neat trick that will ac- 
complish the same thing: 

POKE 16414. 141. POKE 16415,5 



110 • 80 Microcomputing, September 1980 



mama 


°««* 115 


137 


1 t2 


200 116 


146 


13 


200 117 


131 


14 


200 120 


105 


15 


200 121 


104 


30 


200 122 


135 


32 


200 123 


121 


I *° 


200 124 


147 


41 


177 125 


156 


42 


125 126 


136 


43 


176 127 


120 


44 


171 130 


157 


45 


165 131 


101 


46 


176 132 


167 


47 


025 133 


145 I 


50 


160 136 


200 


51 


161 137 


100 


52 


174 140 


066 


53 


106 141 


034 


54 


014 142 


040 


55 


000 143 


064 


56 


026 144 


055 


57 


011 145 


045 


60 


06 t 146 


016 


61 


077 147 


017 


62 


066 150 


041 


63 


076 151 


024 


64 


071 152 


007 


65 


065 153 


044 


66 


064 154 


051 


67 


075 155 


037 


I 70 


074 156 


046 


71 


060 157 


031 


72 


115 160 


005 


73 


015 161 


004 


74 


051 162 


035 


75 


006 163 


021 


78 


017 164 


047 


77 


111 165 


056 


100 


166 166 


036 


101 


134 167 


020 


102 


140 170 


057 


103 


154 171 


001 


104 


156 172 


067 


106 


146 212 


202 


106 


116 213 


202 


107 


117 214 


202 


110 


141 215 


202 


111 


124 230 


220 


112 


107 232 


204 


113 


144 240 


201 


114 


151 336 


210 


Table 5. Programmable read only memory (PROM) program- 


ming data. A 1 702 


or 2708 ultraviolet erasable PROM could be 


used, but 1 recommend a more permanent bipolar PROM such 


as the 74S387. All values in this table are octal for easy decod- 


ing into binary. 








Photo 8. Left side view of the Selectric. The set of contacts in the 
middle of the photo operate off of the bilobed cam. The inner con- 
tacts and cam are used tor the print feedback contacts. 



This Weekend: 

STIK 
IT.... 

••to your 



That's right 1 Esmark's VIOIET-STIK light pen has the TRS-60 CONNECTION 
for LEVEL 1411 Your 4K to 46K TRS-60 System will come alive under your 
VI 01 ET-ST I K within mi nutes of its arrival That's because there are no wi res to 
solder or traces to cut. You're up and running as fast as you can plug the 
interlace into your system's cassette EAR-jack. CLOAD our custom LIGHT- 
WAVE demonstration software and RUN. And because the interface has a 
plug for your recorder, you won't have to unplug it again when loading your 
other software tapes. The interlace allows them to pass right thru whenever 
you're not using the pen. It's exclusive "switched tip'' design means the pen's 
electrically isolated from your system when it's not in use. Just point & press 1 
It's that simple Plug. CLOAD and RUN And have we got the software for you 
to RUN with! Our demonstration tape includes a calibration program (used to 
adjust the CRT's brightness and contrast) plus STIK- TAC- TOE. AWARl and 
TOWERS Two challenging games and a puzzle that will keep grownups and 
children Stik'ing it to your TRS-60 for hours And there are instructions 
provided so you can begin writing your own light pen programs (light ware) 
for fun or profit (Level II). Or. |ust Sit back and enjoy Our LIGHT- WAVE tapes 
each month Esmark's unmatched commitment to lightwarecan bring you up 
to five new games, puzzles, drills & educational Quizes or simulations each 
month. Our current LIGHT-WAVE releases are: 



T 

R 

S 
i 

8 
O 



LIGHT-PAK2 - LIGHTPEG (4 peg-jump puzzles) 
ENORUN (Othello with a twist) 
LIFE9 (Conway's LIFE with mutations) 
Price: 119 95 (including postage & handling) 
LITEGAMMON (Backgammon you'll Stik with) 
STIKWUMPUS (Caves with a little lite) 
MA2EMASTER (Maze after maze to poke thru) 
PRICE $19.95 (including postage 6 handling) 



(LEVEL 



LIGHT-PAK 3 
(LEVEL II) 



Order yours now and well include a free copy of FLASHBACK. Esmark's 
newsletter dedicated to the latest news in light ware applications And. don't 
forget to tell your friends. The VIDIET-STIK can also be ordered for use on 
most other micro systems using the following processor chips: 



B060 



Z80 



6800 



6502 



All that's required is a standard cassette jack leading lo Ground and a 
readable single bit input port Driver software is provided along with 
instructions for writing lightware applications And tell your local Dealer that 
Esmark's got a Dealer package he won't want to miss Out on Delivery is 3 to 6 
weeks from receipt of your order. CTO.D.'s are $3.00 extra but will be shipped 
within two weeks All prices are FOB Mishawaka. Indiana Indiana residents 
add 4% state sales tax 



ALSO COMING FROM ESMARK: 

[ ] TRS-60 Printer Interface (Cassette AUX-jack interface for all RS232 
printers. Includes LLIST6 LPRINT software) 



[ ] 



TRS-60 RS232 Communications Interlace (Makes your TRS-60 a full 
I/O terminal to timesharing systems the world over Gives you 
intelligent or dumb terminal capabilities at 110 or 300 BAUD. Also 
includes Printer Interface above with 20 mA current loop 4 TTL level 
I/O options.) 

— TRS-60 is a trademark of the Tandy Corporation — 



* *^40 
INCORPORATED 

507v* s. Mckinley hwy. mishawaka, in 45544 

(219) 255-3035 



$62.95 



PLU8 $1.50 
•ELECTRONIC SYSTEMS MARKETING POSTAGE & 

HANDLINO 



• Reader Service— see page 226 



80 Microcomputing, September 1980 • 111 




Don't be misled by more expensive imitations! 

This is the original Photo point light pen pre- 
ferred and supported by some of the leading 
software sources like, "Quality Software'*— "In- 
stant Software"— "Level IV "products and soon, 

Just imagine . . 

In playing backgammon, (included) when you 
want to move a man, you just point at where you 
want to move from, then point at where you 
want to move to, and your man moves!!! No 
more fumbling with keyboards— YEA! 

Your Photo Point package comes complete; 

• 1 Photo point light pen (of course) 

• Info sheets on how to connect the pen and 
how to write your own programs 

ALL IN BASIC 

• Two apertures 

• AND two sensitivity settings 

• A cassette tape with 4 informative programs 
and games 

• Ready to connect to your TRS-80 System. 
(DOS too!) 

• Does not void any Radio Shack warranties 

Requirements: 

• Level II basic 

• And a little imagination" 

For fast real time programming it is your lowest 
cost peripheral at Jig. 95 



Announcing 



< 

00 
o9 

CC 

LU 

> 

</> 



I com- ^ 



NEW PEN BASIC by Steve Bjork 

Steve is one of the Best Assembly Lang, pro- 
grammers around, and he has come up with PEN 
BASIC. This low memory routine will add 10 more 
mands to Level II such as PENGET which searches the 
entire screen for the pen and returns a number between 
0-1024 in about 1 sec. Plus « other commands. Perfect for 
you hghtware authors and NEW light pen owners 
too' only '14. 95 



(COUPON) 

Micro Matrix ^w 

P.O. Box 938 • Pacificu. CA 94044 

Send for yours NOW: (41 5) 355-4635 



Name 




Photopoint 


Address 




$19.95 


filly 


St 


Pen Basic 
[ $1495 


Zip 






Card# 




Money 


Ex. 
Date 


CK 


Order Visa MC 









-POWER. TAPE »N0 
VIDEO CONNECTORS 



IS IS iT I* 2 IS IS 2T 2» Jl 3J M >' »• 



10 12 2« 2k 28 5C S2 34 S* SI 40 



TRS-00 EXPANSION POUT CONNECTOR 
HE AH VIEW 



l* 10 21 22 25 



ti PIN CONNECTOR 



Fig. 8. Pin numbering for the TRS-80 expansion port edge connector 
and the 25-pin D connector used to connect the driver to the Selec- 
tric typewriter. 




tOTTOU VIEW 



Fig. 9. Location of the printing and control electromagnets viewed 
from the bottom of the typewriter. 



Now, all output ordinarily dis- 
played on the video screen is 
typed by the Selectrlc. 

If you type these POKE state- 
ments while in the command 
mode in BASIC, be sure to type 
them together with a colon sep- 
arating them. Otherwise, after 
entering the first POKE, you will 
lose the video display. 

If this happens, correctly type 
the second POKE statement 
(with the video screen blank) 
and the Selectrlc will respond 
with the familiar READY. Now, 
anything typed on the TRS-80 
keyboard will be echoed by the 
Selectrlc. 

A better way to use this fea- 
ture is to place the POKE com- 
mands as the first statement in 
the BASIC program you wish to 



alter. This will change all 
PRINTS to LPRINTs. If you wish 
to disable this feature (PRINT = 
PRINT) then use the following 
command: 

POKE 16414,SB:POKE 15415,4 



This can be used anytime in a 
program, in the command mode, 
or in the final statement to rec > 
tivate the video before terminat- 
ing the program. 

In addition, these POKE com- 
mands can be used to change 
LPRINTs to PRINT by using: 



POKE 16414,88:POKE 16415,4 



To revert back to normal 



112 • 80 Microcomputing, September 1980 



-Pf»INT FEEDBACK 
-UNUSED 



SHIFT FEEDBACK 



CARRIAGE RETURN 
FCEOBACK 



INDEX FEEDBACK- 



ft 



SPACE AND 
BACKSPACE 

FEEDBACK 



TAB FEEDBACK 
(DIFFICULT TO 
LOCATE ) 




CARRIAGE RETURN 
FEEDBACK 



Uf 



,'SMIFT FEEDBACK 



RIGHT SIDE 



Fig. 10. Location of the feedback contacts. 



(LPRINT = LPRINT)use: 



POKE 16414.14HPOKE 15415.5 



Another way to output to the 
Select ric is by POKEing to mem- 
ory location 14312. Program 
Listing 1 causes the Selectric to 
type all printable characters. 



This program outputs ASCII 
values 33 to 91 and 97 to 122. 
After POKEing each number to 
location 14312, the program 
must wait until D7, the busy 
signal, is cleared. This is done 
by the PEEK command in line 
50, which causes an endless 
loop to line 50 until the busy 
signal goes low. 

You can also tell the Selectric 



to carriage return and line feed: 
POKE 14312,10, back space: 
POKE 14312,24, index: POKE 
14312,26, space: POKE 14312,32 
and tab: POKE 14312,94. These 
features may be valuable if you 
are writing a word processor in 
BASIC. 

To demonstrate upper and 
lowercase characters, try the 
following program: 



10 INPUT ST$:LPRINT ST$ 

When you run this program you 
will be asked to input any string. 
Suppose you respond by typing 
"Kilobaud Microcomputing," 
pressing the shift button for "K" 
and "M," as you would on a nor- 
mal typewriter. The Selectric will 
respond by typing "klLOBAUD 
mICROCOMPUTING." 

The TRS-80 will invariably 
switch cases. To correct this 
you must write your own input 
routine. 

To display and output upper 
and lowercase characters prop- 
erly, you'll need to modify the 
TRS-80's hardware and soft- 



ware. A number of modification 
kits are on the market. The one I 
have been using is KVP by 
Lance Micklus. 

Conclusion 

I've been using the Selectric 
with my interface and driver for 
several months and it has per- 
formed flawlessly. 

At first, an occasional mis- 
typed character, or an extra 
space or dash inserted itself at 
random, but these mistakes re- 
sulted from a misaligned type- 
writer. I carefully realigned my 
Selectric and, other than a 
broken rotate tape. I have had 
no further problems. 

Excellent references for this 
project include IBM's Service 
Manual (part no. 241-5257-0), 
Parts Manual (241-5990-0) and 
their Price List (241-5158-3). 

The Service Manual is particu- 
larly well written and well illu- 
strated, and is almost a neces- 
sity if your machine needs ad- 
justing. Since IBM will not ser- 
vice machines that do not bear 
the IBM decal, you may have to 
make your own adjustments. ■ 



10 


FORI 


; 33 TO 910OSUB 40NEXT II - 


10 GOSUB 40 


20 


FORI 


= 97 TO 122GOSUB 40NEXT II 


= 10GOSUB 40 


30 


END 






40 


POKE 14312.1 




50 IF PEEK (14312) g100 GOTO 50 ELSE RETURN 






Program Listing 1. 





EDUCATIONAL 

SOFTWARE 

TRS-80* 

80 *f Programs In: 



ELEMENTARY 

SCIENCE 

GEOGRAPHY 

ECONOMICS 

FOREIGN LANG. 

GAMES 



MATH 
BIOLOGY 
HISTORY 
ACCOUNTING 
BUSINESS ED. 
FARM RECORDS 



| Programs arc grouped Into packages of 
4 to 7 programs priced at $ 1 4.9S per 
j package Including shipping and ban- 
| dllng. Available on disk or tape. 

Write for catalog: ^ 89 

MICRO LEARNING WARE, BOX 2 1 34, 
«. MANKATO MN 56001, 507 625 220! 
)"TRS-80 It • registered trademark ol TANDY CORP."! 



{ MAXELL* o* ODysm 1 

P A 

P j^j^i ■HgMa^jkJH IgJBM 

I mmmmmmm. 

T ■ tmOLI MOB N 

R DOUBUl DENSITY Bo. o» 10 lo. JSO E 

S B DOUBLE SIM R 

8 DOUBLB DRMMTV So. of 10 for » 70 A 

3- MINI SM of tOfor IN ^ 

1 DY8A1C DISKS I 
B SV MINI Bo. of 5 lo, S25 M 

M (Specify 8" Soft or Hard Sector/S* Sort or Hard Sector) A 

I MM \ 

A COO hoc AddHlonel fj 

G 



^121 



%C 



238 EXCHANGE STREET 
CrMCOFEE. MA. 01013 

413.592-4781 

— taet um a two 
I ATARI RBJgBBBBB TI/W4 1 



PET I 



f 



f 



SECURITY CONTROL CENTER • • • • • 

You con control light when you're not ol horn*, ot rondom 
timet, Turn video or recording equipment. oppUonce. toll. 
loud olorm device on ond off at piesei timet, even months 
odvonce. * Comei with progrom. control module and oc 
odoptor' '(129.30)* 

• • • AUTOMATIC TELEPHONE DIALER • • * 

You con dial telephone outomoticoily 300 or more. Evan if 
you forgot telephone number rf you remember port of N 
you con find the number through taorch command. 
* CofM! with program, control module ond oc odoptor 

•( 129.30)* 



60-DEEP 

To be used to ngnol the and of long tort ond tignoi you in 

cote of toodtng error It olio leu you know with one beep 

two beeps etc. Exoctly whot port of the program you ore m. 

* Comet with instruction control module ond oc odoptor 

•(129.30)* 

^271 

• • S-C COMPUTER TECHNOLOGY • • 

P.O. Oox 1246. Covlno CA 91722 

Phone) (213) 302-2216 or 966-9660 

k — Visa and Mastercharge accepted — A 



■ Reader Service— see page 226 



80 Microcomputing, September 1980 • 113 






FOR TRS— 80* 

"FLIPPY"— 250K bytes/disc 

FAST— 5ms Track to Track Access 



•DOUBLE 
SIDCD 



•access 

TIMI 



REAL VALUE 

AEROCOMP offers the best value in 
microcomputer disc drives on the morket today! 
Reliability, feature* and cost tough to beat. We 
deliver... ond we stand behind our products, as 
evidenced by the only FREE TRIAL OFFER in the in- 
dustry. Examine your systems needs and order to- 

MYSTERY REMOVED 

There appears to be some confusion in the 
terminology used to describe disc drives and their 
features. Here's what we mean: 

•PUPPY Allows the use of both sides of 

a diskette with a single- 
headed drive by simply turning 
the diskette over (Model 
40-1). 
'TRACK specified in tracks per inch 

DENSITY ( T P I ) . 

Refers to the number of trocks 
per radial inch on the diskette. 
Typically 48 TPI = 40 usable 
trocks and 96 TPI = 80 useable 
tracks. 
*DOUBLE refers to recording density in 

DiNSITT bits per inch (bpi). Typically 

single density means data con 
be recorded up to 2.938 bpi; 
double density means data can 
be recorded up to 5,876 bpi. 

COMPARE AND 



refers to number of read/write 
heads. Single-sided is one 
head read/write one side on- 
ly: double-sided is dual heads 
allowing read/write opera- 
tions on both sides of the 
diskette. A double sided drive 
appears as two separate 
drives to the controller. 
• CAPACITY unformated capocity is the 
total amount of storage space 
available on a diskette. 
Typically 1 25 K bytes on a 40 
track 5.25in. diskette. For- 
mated capacity is the totol 
USABLE storage space on a 
diskette. Typically 102K bytes 
on a 40 track 5.2Sin. diskette, 
the time required for the head 
to move from one trock to the 
next. Typically 5 to 40 
milliseconds (ms). 

FREE TRIAL OFFER 

Order your AEROCOMP Disc Drive and use it 
with your system for up to 14 days. If you are not 
satisfied for ANY REASON (except misuse or im- 
proper handling}, return it, pocked in the original 
shipping container, for a FULL REFUND. We have 
complete confidence in our products ond we know 
you will be satisfied! ORDER TODAY! 

WARRANTY 

We offer you a 90 day unconditional warranty 
on parts and labor against any defect In materials 
ana workmanship. In the event service, for any 
reason, becomes necessary, our service depart- 
ment is fast, friendly ond cooperative. 

100% TESTED 

AEROCOMP Disc Drives are completely 
assembled at the factory and ready to plug in 
when you receive them. Each drive is 100% bench 
tested prior to shipment. We even enclose a copy 
of the test checklist, signed by the test technician, 
with every drive. AEROCOMP MEANS RELIABILITY ! 

ORDER NOW 

• MODEL 4)0-1 DISC DRIVE »339.93ea. 

Single-sided, "Flippy". 48TPI. 
(40 track: single density unfor- 
mated 125K bytes/side; double 
density unformated 250K 
bytes/side). 

• MOOCL SO- 2 DISC DftlVI »439.93ea. 

Double-sided. 48TPI. 
(80 track/40 per side; 
density unformated 
bytes: double density 
mated 500K bytes). 



single 
250K 
unfor- 



BUY AEROCOMP! 





"fUPPT" 


Aonss 

TIMI 

(Irock lo 

trock) 


HtAD 

LOAD 

SOilNOtD 


one 

uicto* 


CAPACITY 

( unfor moled 
tingle 

dentity) 


IA1T- 

INTIY 

oooe 


Fill 
TRIAL 


AieocoMp 


TIS 


Sm. 


TI* 


TI* 


1MK bylet 
(both ilen) 


TI* 


TI* 


■AMO 
SMACK* 


NO 


40mt 


YES 


NO 


109K bytei 


NO 


NO 


PfftCOM 


YES 


Mm. 


YES 


NO 


2MK bylet 

(both tidet) 


YIS 


NO 


MM 


NO 


5m* 


YES 


YES 


125X bytei 


YES 


NO 


MUOART 


NO 


40mt 


YES 


NO 


I09K bylet 


NO 


NO 


SIIMINJ 


NO 


2Smt 


YES 


NO 


1 J5K bylet 


YES 


NO 


TANOOM 


NO 


5mt 


NO 


NO 


12SK bylet 


NO 


NO 


pi-rric 


YSS 


2Smt 


YES 


NO 


2SOK bylet 

(both tidet) 


NO 


NO 


•AW 


NO 


l?mt 


YES 


NO 


\OK bytei 


NO 


NO 



• MOOfl SO-1 DISC DtlVI »43«.t5e>a. 

Single-sided. "Flippy", 96TPI. 
(80 trock: single density unfor- 
mated 250K bytes side: double 
density unformated 500K 
bytes/side). 

• MODEL DISC DRIVE *393.93ea. 

160-2 Double-sided, 96TPI. 

(160 track/80 per side: single 
density unformated 500K 
bytes: double density unfor- 
mated 1 megabyte). 

All models ore capable of single or double density 
ond ore complete with power supply and silver 
enclosure. Send for information on AEROCOMP 2 
and 3-drive systems availoble in 40 and 80 trock. 

• SELECT EITHER A 2-DRIVE OR 4-DftlV! CABLE 
FOfl USE WITH YOUI MIVI(S): 

2-DRIVE CABLE (for use with 

) or 2-drive systems) 

1 24. 95m. 

4- DRIVE CABLE (for use with 

I-, 2-. 3-or 4- drive systems) 

BJ4.99M 

Add $1 25 shipping and hand 

ling 

• MINI DISKETTES IS 25 in), Box of 10 *29.9S 

add $1 .25 shipping and hand 
ling 

• DISC OPMATINO SYSTEMS 

NEWDOS + (40 TRACK) » 109.00 

NEWDOS/BO (BO TRACK) »149.00 

* SPECIAL COMBINATION OFFER* 

• Model 40 1 Disc Drive $339.95 

• 2 Drive Cable 24.95 

• Disc Operating System (NEWDOS+) 109.00 

• Freight 5^25 

Reg. $479.15 
Special »399.93 

SPECIAL COMBO EXCEPT WITH NEWDOS/B0 
Reg. $519.15 Speclol »429.93 

To order by mail, specify Model Number(s) of 
Drive, cable, etc. (above), enclose check, money 
order. VISA or MASTERCHAROE card number ond 
expiration date, or request COD shipment. Texas 
residents add 5% soles tax. ADO $4.00 per drive 
for shipping and handling. Please allow 2 weeks 
for personal checks to clear our bank. No personal 
checks will be accepted on COD shipments-cash, 
money orders or certifed checks only. You will 
receive a card showing the exact COD amount 
before your shipment arrives. Be sure to include 
your name ond shipping address WE SHIP PROMP 
TLY! In the event there is a slight delay, you will 
be notified of the shipping date and we will NOT 
deposit your money order or charge your 
bankcard until the day we ship! 



CALL TOLL FREE FOR FAST SERVICE 
(800) 824-78M. OPERATOR 24 

KM VISA /mASTERCHARGE/C.O.D. ORDERS 
California dial (800) 852-7777, Operator 24. Alaska 
and Hawoii dial (800) 824-7919. Operator 24. 
TOLL FREE LINES WILL ACCEPT ORDERS ONLYl 
For Applications and Technical information, call 
(214) 337-4346 or drop us a card. 



Dealers inqiries invited 



Focluol molertoi from current mot 
Model 40 t lo timilor modelt 

The TtS W ..pa". .on mieri 



lufocturer t dolo theett it believed reliable but cannot be ovoranteed compormg Aerocomp 
ice limitt the trock to trock occeti MM to lira 'Trodemork ol Tondy Rodto Shock 



AE^CCGfilP 

Redbird Airport, Bldg. 8 

P.O. Box 24829 

Dallas. TX 75224 ^w 



114 • 80 Microcomputing, September 1980 



FOR TRS-80* MODEL I USERS ONLY 




ID Times 
Normal Speed 



'TRS80 is a trftdemai.-. I I 



High speed load TRS-80* Level II cassettes 
Input 15K byte Level II program in 15 seconds 
Search BASIC or SYSTEM programs by name 



Unlike other high speed tape input de- 
vices, FASTLOAD uses standard format 
cassettes. Therefore, there is no need to 
re-record on other media. At 8000 baud, 
FASTLOAD is faster than disk for short 
programs. FASTLOAD reads tapes at the 
fast-forward speed of the CTR-41 cassette 
recorder. The recorder can also be used 
for CSAVE at the normal speed. 



FASTLOAD connects to the 40 pin I/O or 
to the Expansion box. The control program 
does not use computer memory because 
it is in a built-in PROM. Other valuable 
features are keyboard debounce program, 
automatic key repeat routine and key- 
beep via cassette speaker. Price is $188.00 
for FASTLOAD and $95.00 for the modi- 
fied CTR-41 recorder. 



v- 112 



Personal Micro Computers Inc. 

475 Ellis Street, Mountain View, CA 94043 (415) 968-1604 



80 Microcomputing, September 1980 • 115 
Scanned by Ira Goldklang wwwlrs-80.com 



HARDWARE 



An interface to the outside world. 



Build Your Own Port 



James S. Hawkes, Ph.D. and 
Grady Reese 



A computer port is similar to 
a sailing port, because both 
serve as points of exchange. At 
a port a ship unloads its cargo 
onto the dock where it is stored 
and later shipped to its main- 



INPUT 1 


INPUT 2 


OUTPUT 


LOW 


LOW 


LOW 


LOW 


HIGH 


HIGH 


HIGH 


LOW 


HIGH 


HIGH 


HIGH 

Table 1 

Table 2 


LOW 


Port Select 


on 


TRS-80 


8255 


Address Lines 


Port 


A1 


AO Selection 








A 





1 


B 


1 

1 




1 


c 
Control 


Table 2 


Port Selection. 



land destination. 

Similarly, the computer port 
receives information from an ex- 
ternal device and holds it until it 
is called by the controlling ma- 
chine. It also stores information 
sent by the controlling machine, 
which it can later send to an ex- 
ternal device. 

A port that only transmits in- 
formation is an output port; 
while a port that can only re- 
ceive information is an input 
port. Certain bi-direction ports 
can both receive and transmit. 

The Parallel Port 

A port permits you to commu- 
nicate with external devices. 
Frequently, ports are used In 
conjunction with other equip- 
ment to monitor environmental 
conditions such as temperature, 



wind velocity, voltage, and pres- 
sure. 

Ports can also be used to con- 
trol simple on-off functions for 
hot water heaters, televisions 
and lights. Through a parallel 
port eight bits of information 
(in most microcomputers) are 
transmitted simultaneously. In 
some ports data transmission 
can reach speeds of over 
100,000 bytes per second. Be- 
cause of these high speeds con- 
trol signals are necessary be- 
tween the computer and the ex- 
ternal device. These are called 
handshaking signals. 

There are two types of parallel 
I/O. One is called "accumulator 
I/O" because the byte to be han- 
dled by the port must be loaded 
into the accumulator before it 
can be transmitted to the port. 



The second is called "memory 
mapped I/O" because a memory 
read or write instruction is used 
to access the peripheral. The 
TRS-80 parallel printer port on 
the expansion interface is a 
memory mapped port. 

With a small investment of 
time and money you can build 
your own port, which can be di- 
rectly attached to the TRS-80 ex- 
pansion bus located at the rear 
of the keyboard, or to the screen 
printer bus on the expansion in- 
terface. 

The simple application is 
made possible by a large scale 
integrated circuit called a pro- 
grammable peripheral interface 
(PPI). The PPI used in this design 
is the Intel 8255. 

The 8255 PPI Chip 

The 8255 PPI, originally cre- 



10 REM *** TESTING AND DEMO PROGRAM FOR THE PPI-fld 



**• OPS - RECEIVING PORT 
- PORT NUMBER 
-- NUMBER TRANSMITTED 
E VALUE RECEIVED 



20 REM 

30 REM *** P 

40 REM *** N 

50 REM 

10 REM ********************************* 

70 OUT 131,137:REM *** INITIALIZE PORT *** 

80 CLS:N=0:OPS=* ":P=0:E-n : REM *** INITIALIZE VARIABLES *** 

90 INPUT "ENTER NUMBER TO BE TR ANSM ITTED" ; N 

100 IF N>255 OR N<0 THEN 90 

110 INPUT "SELECT OUTPUT PORT (A OR Bt";OPS 

120 IF 0PS'"A" THEN P-128: REM ••« SET PORT NUMBER •*• 

130 IF OPS=»"3" THEN P=129: REM *** SET PORT NUMBER ••• 

140 IF P0128 AND P0129 THEN 110: REM **« TESTS FOR ILLEGAL ENTRY 

ISO OUT P,N: REM *** SEND NUMBER TO SELECTED OUTPUT PORT *** 

160 E=INP(130) : REM *** READ PORT C *** 

170 PRINT 9 120, E 

180 FOR I=lTO1000:NEXTI : REM *** DELAY LOOP *** 

190 GOTO 80 



Program Listing. 



116 • 80 Microcomputing, September 1980 



ated to be used with the 8080A 
microprocessor, can be used 
with most of the current micro- 
computer chips including the 
Z-80. 

By sending the appropriate 
control word in BASIC or ma- 
chine language to the 8255s 
control port, you configure the 
chip's 24 I/O pins in one of three 
ways: as three independent uni- 
directional input or output ports; 
as two uni-directional input or 
output ports with handshaking 
signals; or as one uni-direction- 
al input or output port plus one 
bi-directional port with com- 
plete handshaking signals on 
both. 

The three major parts of the 
8255 (see Fig. 1), are the comput- 
er interface, the peripheral inter- 
face and the internal control 
logic. 

The computer interface con- 
sists of eight data lines, six con- 
trol lines, and two power supply 
lines. The data lines D0-D7 are 
connected to the computer's da- 
ta lines and are used to transfer 



data to and from the computer's 
data bus. 

Next there are the address 
lines AO and A1 . These two lines 
use their four possible binary 
combinations (00,01,10,1 1) to se- 
lect one of the four ports within 
the 8255. 

A fundamental requirement 
for the parallel port is that it 
must reside at a specific ad- 
dress or addresses. The address 
chosen is a function of the type 
of parallel I/O you select. The 
chip select active low line 
makes use of the decoded ad- 
dress to select the PPI for an I/O 
operation. 

This brings us to the read (ac- 
tive low) and the write (active 
low) lines. These two lines are 
used to tell the chip whether to 
read or write. They are con- 
nected to the computer's memo- 
ry read (RD) and memory write 
(WR) lines for memory mapped 
I/O or to the IN and OUT lines for 
accumulator I/O. The RESET (ac- 
tive high) will set all ports to 
their input mode. This initializes 
the chip and allows it to be 



reconfigured. 

The next group of pins sup- 
ports the peripheral interface. 
Data is transferred to and from 
external I/O devices through 24 
pins which constitute three 
eight-bit ports. These are called 
port A (PA0-PA7), port B (PB0- 
PB7), and port C (PC0-PC7). The 
user is able to control the func- 
tion of the I/O lines by sending a 
control word to the chip's pro- 
grammable control port. 

As stated above, the control 
word determines for each port 
one of three operating modes: 

(1) Mode 0— Simple input and 
output. In this mode the 
8255 provides two eight-bit 
I/O ports (A and B) and two 
four-bit ports which can op- 
erate as one eight-bit port 
(C). Each port is latched in 
its output configuration and 
unlatched in its input con- 
figuration. Additionally, 
each port can be individual- 
ly defined as input or out- 
put. 

(2) Mode 1— Strobed input and 
output. This mode provides 




Fig. 1 



two uni-directional 8-bit in- 
put or output ports (A and B) 
with port C providing the 
necessary handshaking sig- 
nals. Data is latched for 
both input and output at 
ports A and B. 
(3) Mode 2— Strobed bi-direc- 
tional I/O. In this mode there 
are two usable ports: one bi- 
directional I/O port (A) and 
one uni-directional I/O port 
(B), both with full handshak- 
ing provided by port C. 

PPI-80 Port Design 

The port contains four funda- 
mental parts: the decoder logic, 
the 8255 PPI, the reset logic, and 
the power supply. 

Because the port is designed 
to be used with accumulator I/O, 
only eight address lines A0-A7 
must be decoded. Normally, ad- 
dresses are decoded by using 
inverters and eight input NANDs 
(see Rod Hallen's article in Kilo- 
baud Microcomputing, January, 
1980). While this technique is 
both straightforward and inex- 
pensive, there is one drawback; 
the port address cannot be 
changed without physically re- 
wiring the circuit. 

To be able to use the port for a 
number of different applica- 
tions, and because of other pe- 
ripherals which could conflict 
with some of the four addresses 
needed to implement the port, it 
would be advantageous to make 
it easy to change the port's ad- 
dress. 

A simple and Inexpensive way 
to do this uses a DIP switch (S1), 
a small resistor network (R1- 
R6), and two exclusive-OR (XOR) 
ICs, U3 and U4, instead of the 
traditional inverter. (See Fig. 1.) 

The decoding circuit utilizes 
two 74LS86 integrated circuits, 
which are quad-two input XOR 
gates. Remember that the XOR 
gate produces 1 (high) if the two 
input signals are of the opposite 
type, and (low) otherwise. See 
Table 1, XOR truth table. 

If one of the inputs is high, 
then the other Input must be low 
to obtain a high as an output. 
Setting the DIP switch (S1) 
changes the input to one side of 
XOR gate and causes it to func- 
tion as an inverting or non- 
inverting buffer with respect to 



80 Microcomputing, September 1980 • 117 



DISK ORIVE WOES? PRINTER INTERACTION? 

MEMORY LOSS? ERRATIC OPERATION? 

DON'T BLAME THE SOFTWARE! 



m 




ISO-1 



ISO-2 



Power Line Spikes, Surges & Hash could be the culprit! 
Floppies, printers, memory & processor often interact! 
Our unique ISOLATORS eliminate equipment interaction 
AND curb damaging Power Line Spikes, Surges and Hash. 
'ISOLATOR (ISO-1 A) 3 filter isolated 3-prong sockets; 
integral Surga/Spika Suppression; 1875 W Maximum load, 

1 KW load any socket $56.96 

'ISOLATOR (ISO-2) 2 filter isolated 3-prong socket banks; 

(6 sockets total); integral Spike/Surge Suppression ; 

1875 W Max load, 1 KW either bank $56.95 

•SUPER ISOLATOR (ISO-3), similar to ISO-1 A 

except double filtering & Suppression .... $85.95 
'ISOLATOR (ISO-4), similar to ISO-1 A except 

unit has 6 individually filtered sockets .... $96.95 
'ISOLATOR (ISO-5), similar to ISO-2 except 

unit has 3 socket banks, 9 sockets total . . . $79.95 
•CIRCUIT BREAKER, any model (add-CB) Add $ 7.00 
*CKT BRKR/SWITCH/PILOT any modal 

(■CBS) Add $14.00 

N£ PHONE ORDERS 1617 655 1532 

iSS Electronic Specialists, Inc. 



171 South Main Street. Natick. Mass 01760 



Dept.8M 



ADVANCED BUSINESS 
SOFTWARE FOR THE TRS-80 

(New Available Far Mae's! II Also) 
'FORECASTING * RISK ANALYSIS 'U.S. MACRO MODEL 

If you're serious about improving your business 
with a computer, why not use the best business planning software 
available 7 Or Oavid M. Chereb has made the most powerful and 
successful business analytical techniques available to micro 
computer users 

All programs listed below are in Basic, lor 32K (or more) disk 
based TRS 80 systems 

BUSINESS PLANNING PACKAGE lor FORE- 
CASTING An integrated set of forecasting programs 
to handle a variety of business forecasting needs 
from Trend Analysis to Advanced Multiple Regres- 
sion (100 pg User Manual) $99 
INVESTMENT RISK ANALYSIS The maior ingred- 

ient in any investment is uncertainty This 
program accounts for cost changes, shifting 
revenue streams and interest rate fluctuations 
Now you can manage risk (35 pg User Manual) 
$99 
U.S. SIMULATION MODEL Knowing where the 

economy is going and how it reacts to government 
fiscal and monetary actions can save you a lot of 
money This is a user onented economic situation 
model constructed to professional standards (50 
pg User Manual) $199 
NOTICE TO CUSTOMERS: 
Because of the tremendous increase in recent 
orders, our shipping response time has slowed. We 
are expanding in order to correct this situation But 
for the next month our shipping date will average one 
week alter receipt of your order 

To order CALL 213/424-3652. or write to APPLIED ECONOMIC 
ANALYSIS. 4005 Locust Ave. Long Beach. CA 90807. 



• 47 














(-12 VAC 

I 


us 

7805 

♦5V 

V/R 


*3V OUT 




BRI 


. 




• 


, t 












-CJ 

I.F 










;cz 

iOOO„F 


_ 


lO.F 








Fig- 


4» 

1a. 











the other input presented at the 
gate. 

To invert an address line, set 
the appropriate switch on S1 so 
that the input line to the XOR 
gate is pulled high (one). Then if 
one is presented on the other in- 
put, an address line, the gate 
will output at 0, and if a low is 
presented, it will output a 1. In 
this state the XOR is functioning 
as an inverter. Similarly, by set- 
ting S1 so that one of the inputs 
to the gate is low, it acts as a 
noninverting buffer. By setting 
S1 switch to invert or not to in- 
vert, you can select the address 
at which you wish to locate your 
port. 

Since the TRS-80 is continu- 
ously selecting ROM and RAM 
addresses, the address lines are 
always changing. It is likely that 
the address you select with S1 
will be decoded, since the port 
decodes the lower eight lines 
only. For this reason we XOR'd 
the input (IN active low) and Out 
(OUT active low) signals and 
used the resulting output as an 
input to the 8-input NAND. 

For the correct address to be 
decoded and supplied to the 
8255 as the CS (active low), it 
must be present, and either the 
IN or OUT lines must be low. 
When the port is properly ad- 
dressed by the TRS-80, all of the 
inputs at U2 will be high, and the 
resulting output will enable the 
PPI. 

After the 8255 is enabled, it 
must be told what function to 
perform. That is, if the TRS-80 
should read information from 
the PPI, the IN line must be low. 
When the CS and IN go low, all 
that is left to be done is to speci- 
fy whether I/O port PA, PB, PC or 
the control port is involved. 

The address lines A0 and A1 
define which of these ports will 
be selected. (See Table 2.) 



In order to affect an input to 
the TRS-80 from port C; IN, CS, 
and A0 must be low while A1 Is 
high. When this condition oc- 
curs, the 8255 latches the con- 
tents of port C on the data lines, 
D0-D7, until IN goes high. Amaz- 
ingly, all this can be done with 
one BASIC statement. 

Sending data to the PPI from 
the TRS-80 is accomplished in 
much the same fashion except 
the OUT (active low) is used in- 
stead of the IN. 

If you are wondering whether 
the PPI will be able to receive the 
data as fast as it can be sent by 
the CPU, rest your fears. All 8255 
input and output can be done in 
less than 500 nanoseconds. 
Moreover, all of the 8255's in- 
puts and outputs are TTL com- 
patible. 

But, the output drive capabili- 
ty of any port line is limited to 
one milliamp. This will not even 
light an LED. Consequently, if 
you plan to drive more than one 
TTL load you must provide the 
proper buffer and/or level shift. 

The reset logic utilizes an 
XOR gate in a very unique way. 
TRS-80 reset (active low) is tied 
to one of the inputs of the gate 
while the other input is tied to an 
RC network consisting of C1 
and R7 (see Fig. 1). This second 
input of the XOR is also con- 
nected to system ground 
through S2. 

During normal operations, the 
system reset line is held high 
and the input from the RC net- 
work will normally be held high. 
Thus, the resulting output from 
the XOR gate will be low. The 
output of the XOR gate is then 
fed to pin 35 (reset active high) 
of the 8255, enabling normal op- 
eration of the chip. 

This design allows the PPI-80 
to be reset in several ways. First, 
by pressing the TRS-80 reset 



118 • 80 Microcomputing, September 1980 



button, driving the system reset 
line low, you cause the XOR out- 
put to go high, resetting the 
8255. The same condition will 
occur on power up of the 
TRS-80. 

During power up the RC time 
constant, formed by C1 and R7, 
is sufficiently long to insure that 
the RC input to the XOR gate will 
remain low longer than the 
system reset. This causes the 
8255 to reset. Thus, the PPI-80 
will be reset whenever it is 
powered up. S2 can also be used 
to manually reset the PPI-80 by 
forcing the output of the RC net- 
work low. 

The remaining part of the 
PPI-80 is the power supply. Re- 
fer to Fig. 1b. The construction 
is simple because of a 7805 IC. 
This is a single-package, three- 
terminal voltage regulator. It 
contains all the electronics to 
implement tight voltage regula- 
tion plus over voltage and ther- 
mal-shutdown protection. The 
remainder of the circuitry con- 
sists of a full-wave bridge recti- 
fier (BR1) and filter capacitors 
(C2-C4). 

Software Considerations 

The primary purpose of a port 
is to communicate with the out- 
side world. The 8255 can do this 
in one of its three modes. 

Mode represents simple I/O. 
That is, each of the ports in Fig. 
1 can perform input or output, 



but not both. In this mode the 
data to be transmitted is latched 
to the ports. 

In other words, if you write a 
byte to Port A, that bit pattern 
would stay on the pins PA0-PA7 
until another was transmitted. 
When the TRS-80 reads port C, 
whatever is latched to pins 
PC0-PC7 is transferred to the 
TRS-80. 

This type of I/O is used pri- 
marily for controlling devices 
that can be turned on or off. An 
input port can sense the condi- 
tion of an on-off switch, and an 
output port can close or open 
the switch. This mode is the sim- 
plest of the three. 

Mode 1 offers one important 
additional feature— handshak- 
ing. In this mode port A and port 
B can be assigned to input or 
output data. Port C provides the 
handshaking signals that syn- 
chronize the dialog between two 
machines. (The handshaking 
signals present on the 8255 in 
Modes 1 or 2 are given in Table 
3.) 

Suppose Port A is an output 
port. When writing data to an 
output port, previously transmit- 
ted information may not have 
been read by the external de- 
vice, causing an overwrite. To 
prevent overwriting, the 8255 
produces a standard handshak- 
ing signal, output buffer full 
(OBF) which is active low. This 
signal is produced on PC1 for 



Resislors 








R1-R7 


4700 ohm, 'A watt. 5°o 


RS# 271 1330 




Capacitors 








C1 


100 ul, 25V electrolytic 


RS» 272-1028 




C2 


1000 ul. 35V electrolytic 


RS# 272-1032 




C3 


1 uf, 50V ceramic disc 


RS# 272-135 




C4 


10 ul, 16V tantalum cap 


RS# 272-1071 




Semiconductors 








BR1 


1A. 50PIV full wave bridge 


RS» 276-1 161 




U1 


8255 PPi 


Jameco Electronics 




U2 


74LS30 8-mput NAND gate 


RS# 276-1914 




U3-U4 


74LS86 Exclusive OR gate 


Jameco Electronics 




U5 


7805 voltage regulator 


RS» 276-1770 




Misceilanous 








S1 


6-position DIP switch 


RS» 275-1301 




S2 


SPST momentary switch 


RS« 275-1547 




IC sockets 


3 14-pm IC sockets 


RS# 276-1999 






3 16-pin IC sockets 


RS* 276-1996 






i 40-pin IC socket 


RS# 276-1996 




Transformer 


1 modular wall plug type 


RS# 60-3053 




Cable 


1 40 conductor cable 


AP» 924065-36- R 




Board 


1 suitable pert board 


RS# 276-152 




NOTE A drilled and etched board is available f 


om Quant Systems. P O 


Box 628. 


Charleston. SC 29402 








Parts List. 








TRS-80*— CONDENSE 

The Ultimate in BASIC 
Compression Utilities Al. 

" Riitisi 1.3 New Available "' ^P 



Write BASIC programs using single statement lines lor ease 
of maintenance 

Write BASIC programs with unlimited remarks and comments 
to improve program readability and documentation 

— AND STILL GET — 
OPTIMUM USE OF MEMORY — FASTER PROGRAM 
EXECUTION 

Compresses programs up to 70% of original size 

Improves execution time by as much as 30% 

Creates multiple-statement program lines 

Blank compression 

Remark and comment deletion 

Renumbers GOTO, GOSUB, THEN, ELSE, and RESUME 

statements which reference deleted line numbers 

PLUS THESE NEW USER REQUESTED OPTIONS 

- Retention of low numbered remark statements 
■ Checkpoint / Restart Facilities 

- Phase 1 work file 



Model I $21.95 

(Diskette) 



Model II $24.95 

(Diskette) 



INTERNATIONAL SOFTWARE ASSOCIATES 

P.O. Box 14805 

Omaha. Ne. 68124 



>^187 



Tandy Corporation" 



Memory Chips For Your TRS-80! 



$59.95! 



Don't spend $150.00 at Radio Shack when you can install these 

prime, tested, guaranteed, ram chips yourself for less than half that 

price' 

Feofures: 

1) We guarantee all our ram chips! 

2) Comes with clear, easy to understand, instructions' 

3) Chips will work in keyboard or expansion interface! 

Catalog **: 

2701 16K K.1-V, Chips for the TRS 80 Keyboard 59 95 

2702 16K Ram Chips lor TRS 80 Expansion Int 59.95 

2708 Dip Shunts for Keyboard (required) 2.00 



Simutek's Sensational Best Sellers: 

MICRO-BEEP 

Micro Beep is a simple sound device thai operates oft your aux plug from your cassette 
cable. Now you can have inexpensive, easy to use, sound for an excellent price' 
Mk ro Beep works with Basic using simple commands' 
OUT255.4 ON OCT255.0 OFF 

Requires No Extra Software! Requires Level II Basic or Disk Basic Will work with 4K 

48K' Comes completely assembled 1 (Requires transistor radio batferv) 

Catalog « 

2001 Micro Beep Sound only 15.95 



Ml 



i Beep is being used bv TRS 80 Ou.ners all over the u-orld' 



$29.95 



• FREF POSTAGE AND HANDLING • ^ 19 

Oder »2000 Mxrro Speed Mod Makes Computer 5". Faster 

WeacceptVISA Master Charge Money Orders Checks or (C O D $3 OOextralSend 
orders to Simutek, P.O. Box 13687-Z. Tucson. AZ 85732 

Name 

Address 

City 



State 



Zip 



Phone orders welcome 24 hours' (602) 886-5880. Simutek offers a number ol other fine 
products especially for TRS 80s 1 Send lor FREF" iatak>g TRS 80 is a T.M ul Radio 
Shaik. A Tand*. Corp Arizona residents add 4".. sales lav 



^fluWt Service— see page 226 



80 Microcomputing, September 1980 • 119 



r~ 



-\ 



KC i 

Sort_mor 



SOK'.A«f a 



>• SOFTWARE 

Yes! Quality Software for the TRS-80 is now 
written & available. BCC is pleased to be able to 
present some very fine software now with even 
more available in the very near future. Also we 
develop custom designed software for your 
every need. Write us for a FREE price quote. 

k* Dlv. of Ima4y Corp. 



tl»i-60 la a trad* ufk i.f eh* «., 

For Software Think 



o Mail Base 80 



•WD I (R«qulr*< -« 
MOD IKfurqulraa UK 

» HAS DOM ACCESS program which acrpa track of 
It allow, diract scent of Information In any 

hav« outstanding bills a tomorrow produce a 1 



I drlvas) 5*9. 9S 
1 dnv«a)S129.»5 

unlimited number of antrles. Plu 
-■•■< Today. Hat all people who 
In alp-coo. order. EXCELLENT'' 



prlc 



o Oil Delivery *>e u (requires ««« a « in«ii » r 

A ay at em for the 80a. Thla ay at em hand lea everything for an* - .- . , , 

O VOflClOr *» I (R.qutraa 4SK a 2 drlvea) 539.95 

Thla program heepe track of an unlimited number (»*i0 per dlak) of vendora. Allows 
direct acceaa of coded Information by vendor number, a alao permit a access by 
various other fields. 

&^ For Supplies Think BCC -^O/ 

O DlSkS & TaD6S .. -'. 'n."h *l>V>n« II »<■>-> S«».»5 HO in plas. case) 

8 Inch diskettes 1M trend $64.95 ito, f io) iV'Verballm 5)9.95 (Box of 10) 

Caaaettea Very High Quality 516/doi C20'a. _ ADD "n STAC stackable caaaette 
holdera. Each holda 8 caasettes. S3. 49. a 

D PnntBrS Th. fabulous BASE 1 PRINTER 96 .her ASCII with Tractor Feed a H. 
Suffer Thla printer Just can't be beat!!! 5649.00 (2 lor 51200.00) 
RECONDITIONED CENTRONICS 102A (1)0 charefaer'") 51500.00 



Mister Cturg* E «P O-" 
Vim Signature 



ORLiER NOW All program* come on niahly cassettes Program* are available on diskette for an 

additional charge of 17 00 per order NYS residents add 7°* Check boses of items being ordered 

I of items ordered Toul amount enclosed • All items must be prepaid i 

Bourrut Consulting Corporation 

c 81 Friendly W Sm.trHouxi.nv 11787 sbl J 



MICRO SPEED 

IKS SO SPFF.l") IT MODIFICATION 

I HI HI SI ON I HI MAHhl ■/' 

Sirnufi'/t s Mm rn-Spcci/ m< m-ciki's < iiinjiuli'i 
oprrii/iMi) s/>*'C(/ l>( r >(l ",. 



3) 



Speed! up your TRS 80 from 1.77MZ to a hefty 2.66 MZ! 
Shuts down during disk or cassette I/O to end lost pro 
grams, then turns back on automatically when disk or 
cassette I is finished (Provided, of course, it was on to 
begin with) 

Connects to keyboard LED ,md blinks when unit is 
operating Stops blinking when turned off! 

4) Comes with illustrated instructions (Some soldering 
required I 

5) Average person can install in 10-20 minutes! 

6) All work is done in hardware! Absolutely no software 
dnvers needed! 

7 1 Operates with any TRS 80, (except Model II) works with 
TRSDOS, NEWDOS or any other operating system or 
software Works with RS 232 and telephone modems' 
Comes completely assembled and ready to install 
All wires are stripped, switch installed! 

There are no hidden extra costs to you! 
9) May be turned on or off at any time! Even during program 

execution! 
10) Money back guarantee!! 



8, 



a^19 



order »2000 Micro Speed Mod. 29.95 

We accept Visa Master Charge Money Order Check 
(CO D $3.00 extra) Send orders to: 
Simutek, P.O. Box 13687-Z, Tucson, AZ 85732 

Name . 

Address . 

City 



State 



Zip 



Phone orders welcome 24 hour*' (602) 886-5880 Simuiek offers a number of olher 

line products especially ior TRS 80s' Send lor FRF.F" catalog TRS 80 i* a TMof 

Radio Shock A Tandy Corp Arizona residents add 4 .. sales tax 

NO CHARGE FOR SHIPPING 



port B and PC7 for port A in 
Mode 1. 

The user must know when the 
external device has received the 
byte sent from the TRS-80; the 
acknowledge (ACK), which is ac- 
tive low, provides this informa- 
tion. The logic for this signal 
must be available on the exter- 
nal device. 

The remaining signal usually 
found on an input port is inter- 
rupt (INTR), which is active high. 
This signal goes high when the 
TRS-80 outputs a byte to the 
8255 and remains In this state 
until the ACK is received from 
the external device. 

When functioning in Mode 1 
as an input port, the roles of the 
handshaking signals are re- 
versed. The 8255 must be sig- 
naled when a device is ready to 
transmit information. This is 
done by the strobe (STB), which 
is active low. Upon receiving a 
strobe, the 8255 stores the byte 
and sets the input buffer full 
(IBF) at active high. 

The IBF is monitored by the 
sending device to determine 
when it can transmit the next 
byte. As long as this signal re- 
mains high, it must wait; but 
once the TRS-80 reads a byte, 
this signal is driven low. 

By now you must be wonder- 
ing how the TRS-80 becomes 
aware of data waiting at the 
port. Polling techniques can be 
used for software while the ac- 
tive high interrupt request signal 
(INTR) is used for hardware. Af- 
ter data is received the INTR is 
set high (logic 1), but just like the 
IBF, the INTR is reset by the 
8255 after a read. 

The most sophisticated form 



of parallel I/O is bi-directional, 
which is provided by the 8255 in 
Mode 2. Bi-directional I/O is 
used with an intelligent external 
device, such as another comput- 
er. The 8255 permits port A to 
function as the data port, while 
port C provides all the hand- 
shaking signals discussed 
earlier: OBF, IBF, STB, ACK, and 
INTR. They function in exactly 
the same manner as in Mode 1 
except they are bi-directional. 

Using the Port 

To read the contents of a port 
in BASIC you must use INP(port 
number). This statement is used 
like a function, such as ABS(X) 
or SQR(124). It must be used in 
conjunction with another state- 
ment. 

In the following example 



10 G = INP(127) 

the variable G would be as- 
signed the value of the contents 
of the port 127. 

To send a value to the port 
use the statement OUT port 
number, value. Any value that is 
sent must be between and 255. 
The OUT statement is a com- 
plete BASIC statement and re- 
quires only a line number to be 
included in a program. See line 
70 in Fig. 2. 

Four port addresses must be 
reserved. The two low-order ad- 
dress lines, AO and A1, define 
which port is being addressed. 
The remaining address lines can 
be configured to suit your own 
needs, if they do not conflict 
with other port definitions. 



Mode 1 


Mode 2 


INPUT 


OUTPUT 


INPUT/OUTPUT 


Bit Function 


Function 


Function 


° INTR . PORT 
2 STB f B 


ACK ) B 


Unused 1 
Unused > 
Unused / 


3 INTR1 „__ 

4 STB > roRT 

5 IBF J A 


INTR \ 

Unused 1 __„ 
. . . I PORT 
Unused > 


INTR 

STB" ] 

IBF f «*" 


6 Unused 


JCR ( A 


ACK \ 


7 Unused 


SBF ; 


o"6T ' 


Depend on 






Port B 






definition 






Table 3. Port C Functions in Modes 1 and 2. 



120 • 80 Microcomputing, September 1980 



For example, look at address- 
es 128, 129, 130, and 131. The 
decimal address 128 is equiva- 
lent to 10000000 binary. Notice 
that the two least significant 
bits are 0. Table 2 reveals that if 
the two low-order bits, corre- 
sponding to A0 and A1, are 
then port A is selected. Ports B, 
C, and the control port are se- 
lected by 129, 130, and 131 re- 
spectively. 

The 8255 is a programmable 
port. That is, before using it you 
must define the mode of opera- 
tion for each of the ports. By 
sending the control port the ap- 
propriate message, you select 
the mode of operation for each 
port. 

Table 4 contains control-word 
bit definitions for the three 
modes. This is the beauty of the 
8255. With a simple software 
command you can configure the 
ports as you need to use them. 

The software you develop will 
depend upon the port's applica- 
tion. In Mode the principal op- 
eration will be sensing and oper- 
ating switches. BASIC permits 
this to be done with relative 
ease with the INP and OUT in- 
structions discussed earlier. 

In Mode 1, however, hand- 
shaking signals are required. 

Polling Handshake Signals 

One technique for handling 
the handshaking signals is 
called polling. This requires the 
controlling program to periodi- 
cally read the handshaking 
signals at port C and act on 
them. The INP command de- 
scribed earlier retrieves the stat- 
us byte located at port C. 

After the TRS-80 sends a byte 



to port A, it must not send anoth- 
er until the receiving device re- 
trieves that byte. This can be 
monitored by scanning the OBF 
bit in port C. If the OBF bit for 
port A is low (logic 0), then the 
TRS-80 should not send a byte 
because the previous byte has 
not been read yet. A program 
can perform some other task 
and check the status of the bit 
periodically or can check it con- 
tinuously. 

When the external device re- 
ceives the byte, it must return 
the ACK signal to the 6255 
which drives the OBF high. 

To use port B as an input port, 
the TRS-80 must know when the 
external device, has sent a byte. 
This can be determined by 
checking the IBF signal associ- 
ated with port B. 

Since the IBF is an active high 
signal, the TRS-80 must scan 
port C until IBF goes high, which 
means port B has received a 
new byte from the external 
device. Reading the contents of 
port B will cause the 8255 to 
drive the IBF low. The sending 
device must have sufficient 
logic to send data only when IBF 
is low. 

In Mode 2 operation, port A 
becomes a bi-directional I/O 
port. Handshaking signals on 
port C must be monitored in ex- 
actly the same fashion as Mode 
1, checking the status of the IBF 
and OBF signals. 

One of the most exciting pos- 
sibilities of the port is the rapid 
exchange of information be- 
tween two computers. The soft- 
ware required is very simple and 
even BASIC software can create 
transmission speeds so fast 



Ml 


Definition 





Port C Lower PC0-PC3. used In Mode or 1 




1= INPUT 2 = OUTPUT 


1 


PORT B Definition PB0-PB7, used in all modes 




= OUTPUT, 1 = INPUT 


2 


Mode Select for Group B: PC0-PC3 and PB0-PB7 




0=MODE0. 1=MODE1 


3 


Port C Upper PC4-PC7. used in Mode or 1 




= OUTPUT, 1 = INPUT 


4 


Port A Delinition PA0-PA7, used in Mode and 1 




= OUTPUT, 1 = INPUT 


5-6 


Mode select for Group A. PC4-PC7 and PA0-PA7 




00 = Mode 0, 01 = Mode 1. 10 = Mode 2, 11 - Mode 2 


7 


Operation CODE 




1 = Mode Set (write control word) 




= Bit SET/RESET (used to generate clock signals) 




7ao/e 4. Control Port Bit Definition. 




COMPUTER 

PIRATES 

-OflTfl 
THIEVE 

ARE HERE... 

Don't let computer pirates: DIVINE your DATA 

FILCHE your FILES" 
PERUSE your PROGRAMS 

Protect them all with CRYPTEXT, the hardware 
encryption module that brings ultra-high level 
security to the small computer user. Once 
encrypted, your files can be stored or trans- 
mitted in strictest privacy. A single CRYPTEXT 
unit will differentially control the medical, 
legal or financial records, mailing lists, and 
design data for an entire firm. 

Breaking CRYPTEXT encrypted data is like un- 
scrambling an egg. We don't say its impossible 
but we have 3 oz. of fine gold waiting for the 
first person who succeeds in breaking our test 
message . 
SECURITY SYSTEMS FOR USE WITH : 

NORTHSTAR 



TRS-80 



APPLE II 



SUPERBRAIN 




OKJDATA PRINTER 

The Best Printer in the World for the TRS-80! 
We 7/ Stake Our Reputation On It! 



Look af the Features! 

1) 200 million character head 
warranty! Better ihan any 
competitor! 

2) Works under the most demanding 
business applications' 

3) A •Real" 9x7 DOT Matrix Impact 
Printer! 

4) 80 characters per second' 
: <> Full uppei and owet c ase' 

6) Double width characters! 

7) Supports TRS 80 Graphics.' See 
Illustration (These graphics are 
exactly the same graphic codes as 
the TRSSO's. No special software 
required) 

8) Connects directly to TRS 80 with 
standard cable! 

9) Friction & pinfeed, use roll paper, 
stationary or regular data paper' 

10) 6 or 8 lines per inch 

11) 80 and 132 columns 

12) Quiet operation. 




Actual photo of printout from Okidata 
Printer' From Stmutek's Electric Artist 
Program' 

This is the finest printer you can buy 

■■ -.- . pru r fc n ,-out rRS 80 

Regular List Price 

$850.00' 

Tractor Feed Option 

$150 00' 

Special Simutek 

Customer Price Only — 

$638.00! 

(Tractor Feed $125 00 Extra) 



Catalog ■ 

90001 Okidata Mioroltne 80 

40002 Ink lor Feed Option 

914 1 ] Cable For TRS 80 Keyboard 

'11401 Cable Foi FxpansKm Interlace 
*J40I Cable Foi M.xlel II TRS 80 



638 00 

125 00 

55 00 

WOO 

19 00 



We Accept VISA Ma»lerc hirqe Checks Money Order* 

or (COD $3 00 Extra) 

NO TAX ON OUT OF STATF ORDERS' ^ 1 » 

Free Shipping In U S 

Send Orders To SIMUTF.K. P.O. Box 13687-Z. Tucson. \l 85732 



City _ 



Zxp 



Phone Order* Accepted 24 Hour* 1602) 886 5880 Simutek offers other line prodm » 
for TRS 80s Send for free catalog' Amona residents odd 4i sales fax 

TKS-aOU * TM o( K* i.. -:■,.. * i •>•!> Corp 



■ Reader Service— see page 226 



80 Microcomputing, September 1980 • 121 



iks so c oMp.Aimn disk drivfs jab 

AT (.Rl VI DISC (H MS" <* 



These MPI drives arc completely compatible with Radio Shack's and 

may be mixed and matched' (i e you may use Radio Shack drives and 

MPl's ogether with no problems' They are totally compatible with 

TRSl >S, NEVVDOS. or any other TRS 80 software') 

Thet 4PI 's Ivive doors that close and keep dust out 1 

Thes. MPTs have auto diskette eject' 

These drives are one o( the fastest on the market 5 mdiseconds 

wrsus Radio Sha. k's 40 miitsei onds' 

rhese drives come con plete with power si. pj v ,unl i ,i« ind are readv, 

to use immediately They are compatible with Radio Shack's disk cable 

or you may purchase our cable 

Dual drive is same as two drives but uses only one diskette' Save money 

on expensive diskettes' It may be used as drive and 1. land2or2and3' 

This is a fantastic buy 1 

SAVE $1 16 (Single drive) or $451 iDual drivel 

Over Radio Shack's single drive prices' 

WE SHIP FAST! ORDER YOUR DRIVE TODAY!!! 



Order' 




MIKI 


MPI Single Drive 




800] 


MPI Dual Drive 


549.00 














8005 


TRSIXW Manual and TRSDOS 2. 3 


19.95 


8006 


NEWDO& (in. ludea editor assembler that 
works with tape or disk, disassembler, super/ap. 
bask variable reference, renumber, disk commands 
from basic, screen to printer command. 








. 99 95 


8016 


NEVVDOS 80 ..nd NEVVDOS* (NEW NEVVDOS* 








149 95 


8007 


TRS-80 Disk and other mysteries by 

H C Pennington gives explicit descriptions 






of TRSDOS. NEWDOS. SUPERZAP. DEBUG etc . . 


22.00 


8008 


Ten pack diskettes 


. 29.95 


8009 


Single diskettes 


2 99 


WHO 


Disk holders (hold ten eachl 


2.99 



Please add $5 00 per drive for shipping & handling 

No i.u on out or Male orders" 
We accept Visa Mailer Charge Money Orders Checks IC O D 13 00 extra) 
Send orders lo SirawteV P O Box I3M7-Z. Isx son AZ HS732 

Name 



State 



Zip 



City 

Phone orders accepted 24 hours (602) 886-5880 Forergji orders add $20 postage 
and handling per drive TRS-80 is a TM of Radio Shack A Tandy Corp 
Arizona residents add 4"<. sales lax 



TRS-60 is a ragittarad trademark of TANDY CORP. 




SYSTEM 
EXPANSION 



FOR THE 



,TM 



515; ':.:»:::': 



t 




* 



TRS-80 

AT 

A/-Q95 I PC BOARD A 1 

yO-7 [USER MANUAL J 

• SERIAL RS232C 20 mA I O 

• FLOPPY CONTROLLER 

• 32K BYTES MEMORY 

• PARALLEL PRINTER PORT 

• DUAL CASSETTE PORT 

• REAL-TIME CLOCK 

• SCREEN PRINTER BUS 

• ONBOARD POWER SUPPLY 
» SOFTWARE COMPATIBLE 
» SOLDFR MASK, SILK SCREEN 

LNW 
RESEARCH .- 

B HollowgUn Si. Irvina CA 
714-552-8946 92714 

TO ORDER 

O. Box 162)6 Irvina CA 92713 
Add S3 for pottoga and handling . 
CA residants odd 6% lalai lax 



that the two machines appear to 
function as one. 

Construct ton 

The prototype circuit for this 
article (Fig. 1) was built on a Ra- 
dio Shack board (part #276-152). 
However, since the operation of 
the circuit is not critical, a good 
pert board or vectorboard, with 
either point-to-point wiring or 
wire wrap should produce good 
results. It is also possible to pur- 
chase an etched and drilled cir- 
cuit board from Quant Systems, 
Charleston, SC. IC sockets are 
recommended regardless of the 
construction method you use. 

Begin assembly by installing 
the IC sockets for U1-U4 and S1, 
then solder the resistors in 
place. Next, mount C2 and wire 
it into the circuit as indicated in 
Fig. 1. 

Choose connectors for the 
three 8-bit ports then mount 
them to the board and wire them 
to the peripheral interface pins 
of the 8255. Sixteen-pin IC sock- 
ets make convenient connec- 
tors for the three I/O ports. 

In addition to the eight I/O 
lines, you may want two power 
supply lines to provide power to 
a satellite board. Depending on 
software definition, you may re- 
quire as many as three hand- 
shaking signals. 

Since 13 of the 16 available 
lines may be utilized, connec- 
tion to an external device will re- 
quire a 16-line jumper cable. 
This method of connection 
should always yield several 
spare lines for those oversights 
that always come up at the last 
minute. 

The circuit requires a + 5 volt 
power supply. While this is avail- 
able on the TRS-80 bus, it is not 
recommended for the source be- 
cause of its limited current 
capability. Build your own by 
following the schematic in Fig. 
1b, or purchase a suitable plug- 
in modular supply. Use a +5 
volt regulator chip as a safety 
feature for the ICs. 

Switch S2 Is used to reset the 
PPI-80 at the project board. If 
this capability is not desired, S2 
may be omitted. The same reset 
function is accomplished at 
power up of either the TRS-80 or 
the PPI-80 and can also be ac- 



complished by pushing the 
TRS-80 reset button. 

Connecting the board to the 
TRS-80 is straightforward (see 
Fig. 1). First you need a 40-pin 
edge connector with cable. 
These cables were as scarce as 
dinosaurs, but now are available 
from several sources, including 
Hobby World, 19511 Business 
Center Drive, Northridge, CA 
91324. 

After making the connections 
to your board, double-check 
your work. The TRS-80 edge con- 
nector is numbered with even 
numbers on the bottom, starting 
at the edge nearest the center of 
the keyboard. Check the edge 
connector to the associated IC 
socket using an ohmmeter. 

Testing 

Determine if the PPI-80 is 
working properly by using one of 
the ports to send data to anoth- 
er. All you need to do is connect 
the corresponding port lines. 
(For example, connect PC0-PC7 
to PA0-PA7.) Make sure the dip 
switch is set for port A, to be 
located at port 128, and enter 
Program Listing 1. 

Note that line 70 writes the 
control word 137 to the 8255's 
control port at address 131. This 
specifies Mode for all ports 
and defines port C as an input 
port and ports A and B as output 
ports. 

The remainder of the program 
permits selection of a number 
between and 255 to be sent to 
either port A or B and then to be 
read by port C. The number re- 
ceived by port C will be dis- 
played and should be equal to 
the number entered. 

Applications 

Applications for the PPI-80 
are numerous. It can be used to 
create real time computer 
games. It can be used for analog 
to digital conversion to monitor 
and control a home heating sys- 
tem. Connected to a Sears or 
Radio Shack remote home con- 
troller, it can switch lights and 
appliances on and off in an emp- 
ty house. The authors are using 
their PPI-80 to construct a music 
synthesizer. 

The possibilities are up to 
you. ■ 



122 • SO Microcomputing, September 1980 



WE WILL NOT BE UNDERSOLD 




16K MEMORY UPGRADE KITS $49 

for TRS-80*. Apple II. (specify): Jumpers $2.50 

PRINTERS NEC Spinwriter 

Letter Quality High Speed Printer 

Includes TRS-80" interface software, quick 
change print fonts, 55 cps, bidirectional, 
high resolution plotting, graphing, propor- 
tional spacing: R.O $2689 
R.O. with Tractor Feed $2789 KSR with Tractor Feed $3200 
779 CENTRONICS TRACTOR FEED PRINTER $969 

Same as Radio Shack line printer I 

737 CENTRONICS FRICTION & PIN FEED PRINTER $839 

9x7 matrix 

730 CENTRONICS FRICTION & PIN FEED PRINTER $639 

7x7 matrix Same as Radio Shack line printer II 

P1 CENTRONICS PRINTER $269 

Same as Radio Shack quick printer 

PAPER TIGER (IP440) $939 

Includes 2K buffer and graphics option 
TI-810 Faster than Radio Shack line printer III 

Parallel and serial w/TRS-80' interface software $1575 

with upper and lower case and paper tray $1665 

OKIDATA Microline 80 Friction and pin feed $559 

Tractor Feed, friction, and pin feed $679 

EATON LRC 7000 + 64 columns, plain paper $349 

ANADEX DP-9500 $1389 DP-8000 $869 

DISK OPERATING SYSTEMS 

PATCHPAK #4 by Percom Data $ 8.95 

CP/M for Model I, Zenith $145 • for Model II. Altos $169.00 

NEWDOS Plus — with over 200 modifications 35track $89.00 

and corrections to TRS-DOS 40 or 70 Track $ 99.00 



SOFTWARE FOR THE TRS-80* SKE,/r,!r 



CO-INVESTMENT PORTFOLIO MANAGER: This is 
what investors have been waiting for' This powerful 
program was developed by secunty analysts working 
with software designers It comes on one cassette - 
16K LEVEL II BASIC on one side 32K DISK BASIC on 
the other Store and report data. Review your por Hoho. 
Produce detailed status, value, gam. and security 
analysis: Compare alternatives $4*.9S/$10 

INTELLIGENT TERMINAL SYSTEM ST80-IM BY 
LANCE MIKLUS: Enables a TRS BO' lo acl as a dial 
up terminal on any standard time sharing network 
Provides a TRS-80' with control key. ESC Key, 
Repeat Key. Rub Out Key. Break Key. full upper and 
lower case support, selectable printer output and 
program selectable t ransmission rates $139/$10 

CCA0ATA MANAGEMENT SYSTEM. Automate your 
information processing tasks You can create a file o! 
customer information, quickly and easily add, delete 
or update records; search a file: keep a file in order ol 
the value in any field; and print records and labels in 
any desired sequence or from |ust a pari ol a file 
Requires 32K TRS HO and one drive t74.»5VS10 

CSA-MAMJST SYSTEM: Creates, maintains and etti 
ciently utilizes a name, address and telephone 
number file. 400 individual name/address entries can 
be maintained on a single density mini floppy, and are 
manipulated directly by record number (direct access 
tile method) Sorts can be performed, name + address 
combinations can be coded. Listing directories and 
labels can be printed A conversion facility is provided 
to convert most sequential name address lile formats 
into direct Requires 32K TRS 80 and one drive 

S49.9S/SM) 



SIM SYSTEMS 

INSEQ-80" Indexed Sequential Access Method 
I ISAM) lor the TRS 80 Model I A must lor anyone writ 
ing business programs Eliminate wasted disk space 
from direct record processing Spin second access to 
any record Access data records instantly via alpha/ 
numeric "key" eg Pari NR, Up code or sequentially in 
ascending key sequence. Add/modify records in any 
order Access up lo lire* liles per program Files 
may be spread over multiple disks. Machine language 
processing tram your basic program. Utility program 
to convert direct files lo INSEQ-80 format. t49.9S/$10 

FULLY INTERACTIVE ACCOUNTING PACKAGE: 

ISAM (INSEQ-80) baaed Includes General Ledger. 
Accounts Payable. Accounts Receivable and Payroll 
System runs "stand alone" or "co-ordinated G/L" al 
users option Based on Osborne accounting method 
Requires 32K TRS 80 2 or 3 drives N/A CA 

General Ledger S887S10 

Accounts Receivable $99/110 

Accounts Payable $99/ $10 

Payroll SM/S10 

Osborne books. Req'd as additional documentation 
$20 ea 

INVENTORY Requires 32K. TRS-80. t dnve S12S/S10 
INSORT-BO Callable form BASIC via USR. Sorts "Ran- 
dom" Disk Files Disk" to "Disk" sort limes — 360 
records in 35 sees. 1000 records in 6 minutes. 3500 
records in 12 minutes Machine language processing 
Up to 35 sorl keys ascending/descending Utility lo 
build BASIC program Runs under NEWDOS 

MMMtt 



n 



DISK DRIVES $314 

More capacity than Radio Shack 35 Track (80 K 
Bytes) drives. Fully assembled and tested. 
Ready to plug-in and run the moment you 
receive it. Can be intermixed with each other 
and Radio Shack drive on same cable. TRS-80* 
compatible silver enclosure. External card edge 
^^^ included. 

90 DAY WARRANTY. ONE YEAR ON POWER SUPPLY. 
FOR TRS-80* 

5'V, 40 Track (102K Bytes) for Model I $314 

5V 4 ". 77 Track (197K Bytes) for Model I $549 

8" Drive for Model II (Va Meg Bytes) $795 



CCI-100 
CCI-200 
CCI-800 
For Zenith Z89 

CCI-189 
Z-87 



5'/«", 40 Track (102K Bytes) add-on drive $394 

Dual 5'/ 4 " addon drive system $995 

DISKETTES— Box of 10(5V4")- with plastic library case $24.95 

8 " double density for Model II (box of 10) $36.49 

COMPLETE SYSTEMS 

TRS-80* LEVEL II-16K with keypad $709 

TRS-80' Expansion Interface $269 

HEWLETT PACKARD HP-85 $3199 

ZENITH Z89, 48K all-in-one computer $2595 

ZENITH Z19 $740 

TELEVIDEO 912B $745 920B $769 

ATARI 400 $489 ATARI 800 $799 

MATTEL INTELLIVISION $249 
Software available for the above systems 



CAT MODEM Originate and answer same as 

Radio Shack Telephone Interface II 
LEEDEX MONITOR Video 100 



$148 
$119 



CP/M BASED SOFTWARE for 
Zenith, Altos, Radio Shack, Apple SK,/!!: 



MICROSOFT 

BASIC BO: Disk Extended BASIC ANSI compatible 
with long variable names. WHILE/WENO. chaining, 
variable length lile records $32 5/ $2 5 

BASK COMPILER: Language compatible with BASIC 
80 and 3- K) times faster execution Produces standard 
Microsoft relocatable binary output Includes MACRO 
80 Also linkable lo FORTRAN 80 or COBOL 80 code 
modules $3S0/$25 

F0BTRANB0: ANSI 66 (except lor COMPLEX) plus 
many extensions. Includes relocatable object com- 
piler, linking loader, library with manager. Also 
includes M ACRO-80 (see below) $425/ $25 

COBAL etc Level 1 ANSI 74 standard COBAL plus 
most of Level 2. Full sequential, relative and indexed 
file support with variable file names. STRING. UN 
STRING. COMPUTE. VARYING/UNTIL. EXTEND 
CALL COPY. SEARCH. 3 dimensional arrays, com- 
pound and abbreviated conditions, nested IF Power 
ful interactive screen handling extensions Includes 
compatible assembler, linking loader and relocatable 
library manager as described under MACRO 80 

$700/925 
Z-K SOFTCAR0 FOR APPLE: Youi key lo future soli 
ware expansion Get the best of both worlds. Apple s 
6502 and CP/M Z 80 Rug in the card and get a 280 
Supports Apple language card and all Apple peripher 
als Comes with set of three manuals. $339/$75 

CO-TELNET VERSION & A communication Package 
which enables microcomputer users to communicate 
both with Large Mainframes and other microcom 
puters Extensive commands make il useful in many 
applications where communication between com- 
puters is necessary Powerful terminal mode enabling 



user lo save all data Irom a session on disk Com 
pletely CP'M compatible Multiple communication 
protocols supported Able to transfer files in both 
directions without protocol where the other machine 
does not support any protocol Extensive ON 
SCREEN help Source code provided $149<$15 

MICROPRO-WORDSTAR. Menu driven visual word 
processing system tor use with standard terminals 
Text formatting performed on screen Facilities for lext 
paginate, page number, justify, center and underscore 
User can print one document while simultaneously 
editing a second. Edit facilities include global search 
and replace. Read Write to other text files, block 
move, etc. Requires CRT terminal with addressable 
cursor positioning $399 '$40 

BDS C COMPILER: Supports most features of Ian 

Siuage, including structures, arrays, pointers, recursive 
jnction evaluation, and overlays Package contains 
compiler, linker, library manager, sample source files 
include games, a terminal emulator with disk I/O plus 
Ihe source lor many standard library lunctions. BOS C 
User's Guide; Book The C Programming Language by 
Dennis Ritchie and Brian Kernigharn Requires at least 
24 K of RAM S12S/S20 

CONFIGURABLE BUSINESS SYSTEM BY DMA: CBS 
is a data management system that allows true trans- 
action processing The system features a screen 
menu generator and a comprehensive report genera 
lor which can be used lo produce invoices, purchase 
orders, re order reports, mailing labels or other special 
reports specific to Ihe application Good documenta 
lion and a demonstralion inventory system supplied 
Requues al least 48K memory Does not require any 
support language $295 



ACCESSORIES 

HEAD CLEANING DISKETTE: Cleans drive Read/ 
Write head in 30 seconds. Diskette absorbs loose oxide 
particles, fingerprints, and other foreign particles that 
might hinder the performance of the drive head Lasts 
at feast 3 months with daily use Specify S'/l" or 8". 
$20 ea/$45 lor 3 



FLOPPY SAVER Protection tor center holes of 5''." 
floppy disks Only I n e ed e d per diskette Kit contains 
centering post, pressure tool, tough 7-mil mylar rein- 
lorcing rings. Installation tools and rings for 25 
diskettes $ii.9s 

Reorders Of rings Only: $ 7.96 



ACCESSORIES 

EXTERNAL DATA SEPARATOR: Eliminates data 
separation problems(crci. Improves reliability This 
plug in unit comes lulfy assembled and tested $29.95 
PS 232 $89.00 

DISK DRIVE EXTENDER CABLES: Fits all mini-disk 
drives $15.95 



AC LINE CORD FILTER A 8 PRONG POWER STRIP 
$39.00 
DISK DRIVE CABLES: 2 drive $29.00 4 drive $35.00 
DUST COVERS: TRS 80/Apple. S 7.95 

TRS 80 t OTHER MYSTERIES $1 9.95 

RF MOOU L ATOR: Adapts video to TV $35.00 



dealer (national/international) inquiries invited Send for FREE Catalogue 



The CPU SHOP 

TO ORDER CALL TOLL FREE 1-800-343-6522 

Massachusetts residents call (617)242-3361 

For detailed technical information, call 617/242-3361 

Hours: 10AM-6PM (EST) M-F(Sat. till 5) 

*TRS-80 is a Tandy Corporation Trademark 



^298 



5 Dexter Row, Dept. K9M 
Charlestown, Massachusetts 02129 

Massachusetts residents add 
5% sales tax 

Quantities on some items are limited 




^Reader Service— see page 226 



80 Microcomputing, September 1980 • 123 



EDUCATION 



Children associating with a computer? 



Kidstuff 



Dan Keen 

Dave Dischart 

RD 1, Box 432 

State Highway 83 

Cape May Ct. House, NJ 08210 



Small kids can be hard on 
things. But with proper su- 
pervision, a microcomputer can 



be a powerful teaching aid. 

This program, for example, 
will help your preschooler asso- 
ciate objects with sounds. It's a 
crucial skill, if he is to learn how 
to read. The program also 
makes the child pick out letter 
shapes on the keyboard. 

He'll have fun, too; many of 
the objects are animated. A car 
travels down the highway, an 




airplane takes off, a train chugs 
down the tracks, and a dragon 
breathes fire. 

Kid Testing 

We designed the program for 
kindergarten children. But "kid 
testing" proved that even 2- and 
3-year-olds like it. They may not 
know the letters, but with paren- 
tal supervision they quickly 
learn to associate the shapes 
with names. In fact, they soon 
learn the sequence and will fre- 
quently tell you what object will 
be displayed before it is even 
drawn. 

Since most children in this 
age bracket can't read, the com- 



puter has trouble communicat- 
ing with them. An adult must 
show the child how to respond. 

Once into the program, opera- 
tion is simple. The program uses 
INKEY$ so that the child never 
has to hit the enter key. When he 
sees a flashing question mark, 
he types the letter that the ob- 
ject displayed begins with. If he 
is right, the word RIGHT and a 
smiling face appear. 

If he's not, the screen prints 
WRONG— TRY AGAIN and 
draws a sad face. The computer 
then waits for him to type anoth- 
er letter. He can make any num- 
ber of guesses. 

Before an object is shown, a 
dummy INKEYS picks up any 



Fig. 1. Sample Shapes 



OBJECT 


ACCEPTABLE LETTERS 


plane 


Airplane, Plane. Jet 


boat 


Boat. Choo-choo 


heart 


Heart, Valentine 


tree 


Tree. Christmas tree 


cowboy 


Cowboy, Bandit, Man, Outlaw 


house 


House, Building 


car 


Car, Automobile 


castle 


Castle, Building 


Santa 


Santa 


dragon 


Dragon, Monster 


steps 


Stairs 


clock 


Clock, Watch 


letter 


Letter. Mail. Postcard 


toothbrush 


Toothbrush, Brush ; 


Table 1. Objects and Their Answers 



124 • 80 Microcomputing, September 1980 



stray keyboard input. Thus, if 
the child accidentally leans on a 
key during animation, the letter 
won't register as a bad guess 
when the next object appears. 

Most objects have several ac- 
ceptable answers. Table 1 gives 
a list of subjects and answers. 

Consonants are emphasized, 



since beginning vowel sounds 
are more difficult. We didn't try 
to check every letter in the al- 
phabet. 

You'll need 16K Level II or 32K 
Disk BASIC to run the program. 
You must put the exact number 
of Xs inside the quotes on 
strings. Otherwise, the entire 



program will bomb. Also be sure 
to include the second question 
mark. 



One Caution 

Because of its string packing 
routines, this program will not 
run with Apparat's NEWDOS + 
unless you put all the strings 



at the beginning of the program. 
Otherwise, all the string loca- 
tions in later lines would be out 
in the interface RAM, causing 
VARPTR to return an error. 

Don't be alarmed at the weird 
screen scrolling when you list 
after running the program. This 
is caused by the string packing 
routines. ■ 



5 cLEflRieee.s=e.GosuB5eeee 

188 rtt^'XXXXX" 

181 l£ST0K:K=Vf«PTR(Al$):flD=PEEK(K«2)*2S£«PEEK(K4l) 

182 MYTR13& 148. 148. 157. 132 

183 F0fip38TD4:REflDK:PHEflD*P,X:IEXTP 
104 f&z'KOOOHOOOOOr 

185 K=VflRPTR(R2$):fiD=f£EK(K+2)*256+PEEK(K+i) 
IBS DOTR128. 144. 128. 168. 26. 8, a & 131.131.139. 131 

187 FORP=8T011:REflDX.Pt«ErtHP,X;f£XTP 

188 fl3*s'K0OOOOOOOr 

189 K=VRRPTR(fl3l):flW , m((K*2)*2564PEB(<K*l) 
118 DflTM88,176. 184,176. 26.a&& 128,138 

111 FORP=8T09:REflDX:PCKE«HP,X:«XTP 

112 fl8»='»00«" 

113 K=VflRPTR<fiB$):flD=fEEK(K+2)*256^EEK(K+l) 

114 MTR128,128,128,128,128 

128 CLSJ0W^0i:&m:PO&KM,X)€WJQRL=ttim5:mHl&,fG$, . G0SUB199 . fCXT 

138 FOH.=915T0264STEP-6e:PRIMT8L-Lfl8f, PRIKNUAB; :GfJ9B198:PRlHT8LCHRI<38), ;PRINTtLRlfc : G0SlBi98: PRINTS, CHR$<38), PR1KT8L-64.R 

2$) . (3008198. NEXTL 

158 OS:PRINTM88.Rl$:G09fi6Be88: IF(f^"P^OR(^"fl')()R(RMM")T>CNrjfJSUB62eB8:GOT028e 

168 G0SUB618BB:G0Sfi6ee88:fflTO15e 

198F0(»=lT01B:«XT:PRIKnL-2,' % :PRIHTH*64, ' 'i :PRINT«.-64, " "RETURN 

288 Fl$='XX»00000000000000000000«XXXXX»00000000000000000( a 

282 K-VflRPTR<Fl$).flD=PE£K(K+2)*256+PEEK(K+i) 

284 DATR176. 176, 176, 176, 176, 128, 26, 24, 24, 24, 24, 24, 24, 24, 24, 184. 191, 179, 191 191, 191, 191, 189, 184, 149, 128, 26, 24, 24, 24, 24, 24, 24, 24, 24, 24 
, 24, 24, 138, 143, 185, 191, 191, 191, 191, 135, 138, 133, 128 

286 F0RP^T048.tt»X.PfJ(ErlMf,X.f€XTP 

218 F2*=*xxxxx«&uoKttxxxxxxxxxxxxxxxxx 

212 K=WRPTR(F2$);flD=PEEK(K*2)*2564fEEK(K*i) 

214 0AT8176, 176, 176, 176, 176, 128, 26, 24, 24, 24, 24, 24, 24, 24, 24, 184, 191 179, 191 191, 191, 191, 189, 184, 134, 128, 26, 24, 24, 24, 24, 24, 24, 24, 24, 24 

,24, 24, 13a 143, 185. 191 191 191 191 135, 13a 137, 128 

216 FORP«8T048 . REflDX . POKEHHP, X : NEXTP 

228 F3l^"X»K«&tfCCCCCCC«C0Ce300C^^ 

222 K=^RPTR(F3*).flD=PEEK(K*2)*256+PEEK(K*l) 

224 MTftl76, 176, 176, 176, 176, 128, 26, 24, 24, 24, 24, 24, 24, 24, 24, 184, 191, 179, 191 191 191 191 189, 176, 148, 128, 26, 24, 24. 24, 24, 24, 24, 24, 24, 24 

,24, 24, 13a 143, 185, 191 191 191 191 135, 12a 131 128 

226 FfJRP=8T048:REflDX:P0XEfllW,X;«XTP 

238 F4l= a XXX»00C0M00000000000M00000000000»000»00000{XX" 

232 K=VflRPTR(F4*):f»=fED«K*2)*256+PEEK(J(*l) 

234 MTftt76. 176, 176, 176, 176, 128, 26, 24, 24, 24, 24, 24, 24, 24, 24, 184, 191, 191, 191, 191, 191, 191, 189, 184, 149, 128, 26, 24, 24, 24, 24, 24, 24, 24, 24, 24 

,24, 24, 138, 143, 185, 191, 191. 191, 191, 135, 128, 133, 128 

236 F(KP=8T048:REH)X:PQKEHHP,X:rEXTP 

295 BO*='XXXXXXXXXXX" 

268 K-VflRPTR(B0l):flD=PEEK(K+2)*256+f€EK(K*l) 

265 DOTR128, 176, 176, 188, 188, 191, 188, 188, 176, 176, 176 

278 FORP=9T01B : REflDX . POKEHHP. X . NEXTP : CLS . P0=512 

275 PRINTIPQ,BO$; :FfJ»E=lT028:NDaDE:PO=Wl:IFRK^62TrEN275 

288 rxS:PRIKTM58,B0$.G0SJB68eee:IF(fl*^ 

285 G09fi6iee8:G0SUB68B88:(j0T0288 

386 TR*='XXXXX«C4H0OOOttCCCC»OCOOO^^ 

385 K=VflRPTR(TR$):FC=PEEK(K+2)*256+fffi((K+l) 

318 DflTftl28, 188, 18a 14a 148, 14a 16a 17L 151, 26, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 128, 168, 191, 191, 191, 191, 19L 191, 191, 191, 144, 26, 24, 24, 24 

Program continues 



80 Microcomputing, September 1980 • 125 



, 24, 24, 24, 24, 24, 24, 24, 128, 138, 135, 128, 128, 128, 128, 138, 135 

315 F0RPO=8T058 . REflDX . POKEflD+PO, X . NEXTPO 

328 aS.L0=458.F()RPO=€48T0783STEP2.PRINT?P0,CHR$(151), :PRINT0PO+i,CHRS<13i), ;«XT:PRINT8784,STRING$<64,13i>, 

325PRINT6L0,TR*, G0SUB375 

338 PRIKTCLa TR$, .PRINT0LO-57, '*", G0SUB375 

335 PRINT6L0, TR$, PRINTH.0-58, " ", PRINT0LO-123, ■*'. GOSUB375 

348 PRIHT0LO,TR$, PRIWT6L0-124," ', GOSUB375 

145 IFU£58eTHEN48OEL2GOT0325 

375 FCRDE=8TO10.NEXT[£.UKCi+l. RETURN 

488 aS.PRINT8488,TRi.G0SUB68886 

418 IFft$="T'0Rft$="C"'nCNG0SUB628ee.G0T0i88e 

428 G0SUB61888.G0SUB68888.G0T0418 

1888 CLS.L0=582.SW=8 

1818 PRINTtKLFll, G0SUB1188 

1828 PRINT810.F2*, G0SUBU88 

1838 PRINT«L0,F3I. G05UBU88 

1835 IFUK452TOK158B 

1848 9t=SU+l . IF9K2T>CMiei8ELSEPRINT«.0, F4S, : G0SUB1188 : SH=8 : G0T01628 

1168 FORO=1T015.«XTQ.L(R8-1: RETURN 

1588 OS.PRINT*48&Fll, G0SUB66888 

1688 IFfl$="F , T»CNG0SUB628ee.G0T02e8e 

1788 G0SUB61888.G0SUB68888 G0T01688 

2888 HE*='XX£OOOOOOOOOOOCOO»0OCO0OOOOOOOOOOKO<" 

2818 K=VflRPTR<HE$):flD=PE£K(K+2)*256+PEEK<K+i) 

2828 DflTftl68, 131, 131 137, 152, 131, 131, 169, 26, 24, 24, 24, 24, 24, 24, 24, 137, 144, 128, 128, 128, 152, 129, 26, 24, 24, 24, 24, 24, 24, 138, 164, 168, 134, 26 

,24,24,129 

2838 F0RP=8T037 . REflDX . POKEflD+P, X . NEXTP 

2848 aS.PRINT8488,HEI.G0SU86888e 

2858 IF(fll="H")OR<R^ , V")T*NGOSUB620e0.GOTO384e 

2868 GOSU661886.GOSUB68880.GOTO285e 

3846 TEf^'XXXXXXXXXXXXXXXX" 

3858 K=VflRPTRCTEI) flD=PEEK(K+2)*256+PEEK(K+l> 

3860 DflTR12S, 166, 198, 1S8, 26, 24, 24, 24, 24, 24, 128, 136, 143, 175, 143, 141 

3876 FORP^)T0i5 . REflDX . POKEflD+P, X . NEXT 

3888 CLS.PRINT8400,TE; GOSUB68800 

:898 IF(R$='C)OR(fl^"T")Tf€NGOSUB620e6.GOTOil86 

3895 G0SUB61888 GOSUB6888e.GOTO:090 

3180 CO^'XXXXXX/CCCCaXXJCCSK^^ 

:il0 K^VflRPTR(COJ,' .flD^PEEK(K+2)+256+PEEK<K+i) 

3128 DATA176, 188, 188, 188, 176, 176, 26, 24, 24, 24, 24, 24, 24, 24, 176, 176, 191, 19L 191 179, 176, 26, 24, 24, 24, 24, 24, 24, 24, 24, 19L 32, 32, 191, 191, 19 

1,32,32,191 

3138 WTR26, 24, 24, 24, 24, 24, 24, 24, 24, 24, 143, 176, 32, 191, 191 191 32, 176, 143, 26, 24, 24, 24, 24, 24, 24, 24, 24, 24, 176, 188, 143, 131, 131, 131, 143, 1 

88,176 

3140 FORP=*T076 . REflDX . POKEflD+P, X . «XTP 

3174 aS.PRIMTM88,CO$.G0SUB68888 

3176 IF(f^T , )OR(R$='H^OR(fl$='B")OR(fl^ , O")T}£NGOSUB6288e:GOT()480e 

3188 G05UB61888.GOSUB68888 G0T03176 

4888HK^"X»0000000000»0000000CO000CO00000000««C«OC«000 

XXOOOOOOOOOOOOOOWOOOOOOOOOOK" 

4010 K=VflRPTR(JW).flD=F€EK(K+2)*256+PEEK(K+l) 

4828 MTR12& 176, 128, 168, 176, 176, 144, 26, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 128, 176, 18a 131 191 191, 188, 191 191, 26, 24, 24, 24, 24, 24, 24, 24, 24 

, 24, 24, 24, 24, 128, 176, 188, 191 191 191 191 191 191 191, 191, 191, 188, 176, 26, 24, 24, 24, 24, 24, 24, 24. 24, 24, 24, 24, 24. 24, 24, 24 

4838 DflTR128, 191 191 143, 143, 191 191 191 191 191 191 191 143, 143. 191 191 26, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 128 

4835 DRTR191 191 176, 176, 191 191 131 131 131 191 191 176, 176, 191 191 26, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 128, 191 191 

191191191191128,128,128,191191191191191191 

4858 FORP=8T0151 REflDX POKEflD+P, X:«XT 

4668 OS PRIMT0336,HW:QOSUB68880 

4878 IF(R»= , B")OR(R$="H , )TJCNGOSUB626e0:6OTO4100 

4686 60SUB6166B:00SU86666B:(]0T04676 

4166 CCI="X»OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOCO< a 

(118 K=VflRPTR(CCI) :flD=PEEK(K+2)*256+PEEK(K+l) 

4126 0676156, 146, 146, 146, 146, 146, 172, 26, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 176, 188, 188, 188, 188, 189, 188, 18a 18a 18a 188, 19a 18a 188, 

18a 14a 26 

1136 MTR24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 138, 133, 18a 188, 13a 143, 143, 143, 143, 143, 143, 133, 18a 18a 138, 141 

♦148 FORP*T()68:I^X:POKEflD+P,X:NEXT 

Program continues 



126 • 80 Microcomputing, September 1980 



PROGRAMMING TOOLS FOR YOUR 

TRS-80 



INSIDE LEVEL II 

The Programmers Guide to the TRS-80 ROMS 
INSIDE LEVEL II is a comprehensive reference guide to the Level 
II ROMs which allows the machine language or Basic programmer 
to easily utilize the sophisticated routines they contain. Concisely 
explains set-ups, calling sequences, and variable passage for 
number conversion, arithmetic operations, and mathematical func- 
tions, as well as keyboard, tape, and video routines. Part II pre- 
sents an entirely new composite program structure which loads 
under the SYSTEM command and executes in both Basic and 
machine code with the speed and efficiency of a compiler. In 
addition, the 18 chapters include a large body of other information 
useful to the programmer including tape formats. RAM useage, 
relocation of Basic programs. USR call expansion, creating SYS- 
TEM tapes of your own programs, interfacing of Basic variables 
directly with machine code, a method of greatly increasing the 
speed at which data elements are stored on tape, and special 
precautions for disk systems. INSIDE LEVEL II is a clearly or- 
ganized reference manual. It is fully typeset and packed with 
nothing but useful information. It does not contain questions and 
answers. ROM dumps, or cartoons. INSIDE LEVEL II 15.95 

TELECOMMUNICATIONS PROGRAM 

This program allows reliable high speed file transfers between two 
disk-based computers over modems or direct wire. It is menu 
driven and extremely simple to use. Functions include real-time 
terminal mode, save RAM buffer on disk, transmit disk file, receive 
binary files, examine and modify UART parameters, program 8 
custom log-on messages, automatic 16-bit checksum verification 
of accurate transmission and reception, and many more user 
conveniences. Supports line printers and lowercase characters. 
With this program you will no longer need to convert machine 
language programs to ASCII for transmission, and you will know 
immediately if the transmission was accurate. TELCOM $29.95 

PROGRAM INDEX FOR DISK BASIC 

Assemble an alphabetized index of your entire program library 
from disk directories. Program names and free space are read 
automatically (need not be typed in) and may be alphabetized with 
a fast Shell/Metzner sort by disk or program. The list may also be 
searched for any disk, program, or extension; disks or programs 
added or deleted; and the whole list or any part sent to the printer. 
Finally, the list itself may be stored on disk for future access and 
update. The best thing since sliced bread" (January issue of 80 
Microcomputing). One drive and 32K required. INDEX $19.95 

SINGLE STEP THROUGH RAM OR ROM 

STEP80 allows you to step through any Basic or machine lan- 
guage program one instruction at a time, and see the address, 
hexadecimal value, Zilog mnemonic, register contents, and step 
count for each instruction. The top 14 lines of the video screen are 
left unaltered so that the "target program" may perform its display 
functions unobstructed. STEP80 will follow program flow right into 
the ROMs, and is an invaluable aid in learning how the ROM 
routines function. Commands include step (trace), disassemble, 
run in step mode at variable step rate, display or alter memory or 
CPU registers, jump to memory location, execute a CALL, set 
breakpoints in RAM or ROM. and relocate to any page in RAM. The 
display may also be routed to your line printer through the device 
control block so custom print drivers are automatically supported. 
STEP80 $16.95 



4 SPEED OPTIONS FOR YOUR TRS-80! 

The SK-2 is the most versatile clock modification available for the 
TRS-80. Speeds may be switched between normal, an increase of 
50%, or a 50% reduction; selectable at any time without interrupt- 
ing execution or crashing the program. Instructions are also given 
for a 100% increase to 3.54 MHz, though the TRS-80 is not reliable 
at this speed. The SK-2 may be configured by the user to change 
speed with a toggle switch or on software command. It will au- 
tomatically return to normal speed any time a disk is active, re- 
quires no change to the operating system, and has provisions for 
adding an LED to indicate when the computer is not at normal 
speed. It mounts inside the keyboard unit with only 4 necessary 
connections for the switch option (switch not included), and is 
easily removed if the computer ever needs service. The SK-2 
comes fully assembled with socketed IC's and illustrated instruc- 
tions. SK-2 $24.95 

RAM SPOOLER AND PRINT FORMATTER 

This program is a full feature print formatting package featuring 
user defineable line and page length (with line feeds inserted 
between words or after punctuation), screen dump, and printer 
pause control. The serial version allows baud rate selection from 
the keyboard. In addition, printing is done from a 4K expandable 
buffer area so that the LPRINT or LLIST command returns control 
to the user while printing is being done. Ideal for Selectric or other 
slow printers. Allows printing and processing to run concurrently. 
Please specify PARALLEL or SERIAL (RS-232 interface) version. 
SPOOLER $16.95 

DUPLICATE SYSTEM TAPES WITH CLONE 

Make duplicate copies of ANY tape written for Level II. They may 
be SYSTEM tapes (continuous or not) or data lists. The file name, 
load address, entry point, and every byte (in ASCII format) are 
displayed on the video screen. CLONE $16.95 

MACHINE CODE FAST FOURIER TRANSFORM 

This complete package includes 3 versions of the machine lan- 
guage FFTASM routine assembled for 16. 32, and 48K machines. 
a short sample Basic program to access them, a 10K Basic pro- 
gram which includes sophisticated interactive graphing and data 
manipulation, and a manual of instructions and examples The 
machine language subroutines use variables defined by a support- 
ing Basic program to make data entry and retrieval extremely fast 
and easy for custom implementation. They perform 20 to 40 times 
faster than their Basic equivalent (256 points in 12.5 seconds), and 
require less than 1550 bytes of memory FFTASM 49.95 



FOR THE MODEL II 
LYNC 

from Midnight Software 

High level data communication Tor the Model II with CP/M. LYNC 
will send and receive any file with automatic error checking and 
retries. Either end may initiate file transfers, and multiple files may 
be sent with wildcard filenames. Remote or local directories may 
be called from within the program Allows full protocol, non- 
protocol, and real-time conversation modes. May be used over 
phone lines at 300 baud or direct to another computer at up to 9600 
baud. Also available for other CP/M computers LYNC $95.00 



MUMFORD 
MICRO < 
SYSTEMS 



ORDERING: Complete satisfaction is guaranteed or a full refund will be made. All Model I 
programs are shipped on cassette unless $5 is included for a formatted (no system) disk. 
Include $1 postage and handling. California residents add 6% sales tax. Visa. Master- 
charge and COD orders accepted. 

Box 435-E Summerland, California 93067 (805) 969-4557 



• Reader Service— see page 22t> 



80 Microcomputing, September 1980 • 127 



(158 asPRiMrweftcciGoaBtteee 

1168 IF(R$= a R ( )OR(M= a C a )THENQ06UB62888:(iOT058B8 

4178 GOSUB61888:G09fi688e8:G0TO4168 

3888 CLS:PRINT87e4,STRING$(64,13i) 

3188 POM55:SK=8 

3118 PRINT8695, '*', :PRINTK3S. " '; ;G0T05138 

5128 PRINT8695,* ■; :PRINT8635,'»"; 

5138 PRIKT«TO.TE$i :PRINT8554,CC$; :KH>0+i 

3146 IFP0583THEN5168 

3158 SM=SH*1:1FS»D1T»B6M=8:(i0T05118ELSE5128 

3168 PRINT858&CH*<38); :PRINT8564,CHR$<38); ;PR1NT862&CHR«<38); :PRIMT8692,CHR$(38)i 

5288 PO=338:SH=8 

5218 PR1MT8695, '«•; .PRINT863fi ' 'j :G0T05238 

5228 PRINT8695. ■ \ PRINT8635, •*'; 

5238 PRINTH>aHH*; :PR1KT«54,CC*; :PO=PO+i 

5248 IFPO>378THEN538e 

5258 SR=SJM:IF9OlTHEN3W:(OT052i8ELSE522e 

5388 CLS:F0RX=88TO127:F(3RV=21TO4?:Sn(X,V):«XTV,X 

5382 FORX=98T091:FORV=28T022:RESET(JCV):NEXTY,X 

5384 F0RX=94TO95 : F0RV=21T022 : RESETCX, V) : NEXTY, X 

5386 F0RX=98T8117 : F0RV=21TQ28 : RESETCX, V) : NEXTY, X 

5388 F0RX=128T0121.F0W=2iT()22:R£SCTCX,Y):NEXTY,X 

5318 FCRX=124T0125:FORV=21T022:RESCT(X,V):»CXTV,X 

5312 FORX=98T099:FORV=34T035:RESCT(JCV):KXTV,X 

5314 FCRX=U6TOU7:F0RV=39TO48:RESET<X,V):fCXTV,X 

5316 FORX=118T0122:FORV=15T016:SET(X,V):«XTV,X 

5318 F0RV=17TO28:SET(122,V):«XT 

5338 S=l G0SUB68888 IF(^"C")0R<fll="B")0R(ft»="F")TI€NGOSUB6288e.GOT05488 

5348 GOSUB6ie88:GOSUB68888.G0T05338 

5488 aS.SET<50,0).SETC5L0):FORX^O49. SETCX, 1): NEXT :OT^ 

,3). NEXT 

5416 SET(56,3).FORA^7TO40.SETa4).HEXT.SET(56,4):SET<57,4) 

5428 FORX^4T036:SET<X,5):NEXT.SET(58,5):SET<53,5);FORX=31T033.SET(X,6):MEXT 

5438SCT<68»6).SCT<6L6).F0RX*28T038.SETa7>:NF^ 

5448 F0RX=68T066 . 5ETCX, 8) . NEXT . SETC2L 9) ; F0RX=25TO42 . SETCX, 9) : NEXT . F0RX=52T059 . SETCX, 9) . NEXT . F0RX=67T071 . SETCX, 9) : NEXT 

5458 SETC28.10) : SETC27, 18) :F0RV=18T014 . SETC38, V) : NEXT . F0RX=49T051 : SETCX, 18) :NEXT;SET(55, 18):SETC72,ie):SETC73,18);SET<i9,ll);SETC28, 

li):SETC26,li) 

5468 F0RX=46TO48 : SETCX, 11) : NEXT . SETC74, 11) : F0RX=28T025 : SETCX, 12) : NEXT : F0RX=42T045 : SETCX, 12) ; NEXT . F0RX=63T065 : SETCX, 12) : NEXT 

5478 SETC72, 12) :SETC74, 12) :SETC2Z 13) SETC41, i3):FORX=55T057:SETCX, 13):NEXT;SET(68,13):SET(6Z13):FORX=65T067:SET(X,13):NEXT 

5488 SETC71, 13) : SETC73, 13) : F0RX=37TO48 : SETCX, 14) : NEXT : SETC47,14) ; SETC53, 14) : SETC54, 14) : F0RX=57T059;SET(X,14):NEXT:SET(6L14) 

54S8FOX=68T(W.SET<&i4):NECT.SCT<7ai4):S^^ 

ETC72,15).SET(73,15) 

5588 SETC38, 16) : SETC45, 16) . SETC58, 16) . SET<66,16) : SETC67, 16) : SETC74, 16) : SETC75, 16) : SETC82, 12) : SET(8L13):SET(8L14):F0RV=13T016:SET(8 

3,Y):NEXT 

5518 SET(79,15) :SETC88, 15) :SET<78, 16) :F0RX=35T037; SETCX, 17).NEXT:SETC44, 17) SETC64, 17) :SET<65,17) :F0RX=49T05i:SCTai7):NEXT:F0RX=68 

T078.SET<X,17):NEXT.SETC76,17):SETC77,17) 

5528 SETC82, 17) :SETC42, 18) SETC43,18):SETC54, 18) :FORX=71T075. SETCX, 18) :NEXT:SETC88, 18).SETC8L18):SETC36, 19) :SET<37, 19) :SET(4L 19) :F 

ORX=45T048. SETCX, 19). NEXT. SETC54, 19) 

5538 F0RX=57T068 . SETCX, 19) . NEXT . F0RX=63T078 . SETCX, 19) : NEXT . SET<78, 19) : SET(79,19) : SET<36,28):SETC48,28):F0RXM4T049.SETCX,28):NEXT.SE 

T( 53, 26) . SETC56, 20) : SETC61, 28) . SETC62, 28) 

5548 F0RX^75T077 . SETCX, 28) .NEXT . SETC80, 28) . F0RX^38T048 . SETCX, 21) .NEXT . SETC56, 21) . SETC68, 21) . SET(6L 21) : F0RX=72TO74 . SETCX, 21) .NEXT . SE 

T<81,2i).SET<33,22).SETC4L22) 

5550 F0RX=53TO55. SETCX, 22). NEXT. F0f^57T()59.SETCX^^ 

RX=50TO52 . SETtti 23) . NEXT . SETC66, 23) . SETC68, 23) 

5568 SETC82, 23) . SETC34, 24) ; F0RX=36T039 : SETOfc 24) : NEXT . SETC42, 24) : F0RX=45T049 : SETCX, 24) : NEXT : F0RX=61T065 : SETCX, 24) . NEXT . SETC68, 24) : FO 

RY=24T026.SETC83,V).NEXT 

5570 SETC35, 25) . SETC36, 25) . F0RX=48T043 . SETCX, 25) . NEXT . SETC57, 25) . SETC58, 25) ; SET<60,25).SET(66,25):SET(67,25):FORX=37TO41:Sna26):N 

EXT 

5580 FCRX^46T056. SETCX, 26) : NEXT . F0RX=61T065. SETCX, 26) NEXT F0RX=42T045: SETCX, 27) . NEXT :FORY^27T033 . SETC84, V) : NEXT : SETC43, 28) : SETC44, 2 

9) . SETC45, 38) ;SET(46, 31) :SETC47, 31) 

5596 SETC47, 32) . SETC48, 32) . SETC82, 33) . F0RV^34T042 : SETC88, Y) : NEXT . SETC82, 36) . SETC8L 35) ; F0RV=34T036:SETC83,V):NEXT.SETC8L38):SnC52, 

31) . SETC5L 32) . SETC52, 32) : F0RX=49T051 . SETCX, 33) . NEXT . SETC53, 33) 

5594 SETC5L 34) .SETC54, 34) SETC55, 35) SETC56, 36) .SETC57, 37) SETC58, 37) .F0RX^59T06i. SETCX, 38) .NEXT F0RX^2T064. SETCX, 39) NEXT.F0RX^64 

T067. SETCX, 40), NEXT 

Program continues 



128 • 80 Microcomputing, September 1980 



5596 F0RX^68T07i . SETtiw 41) . NEXT . F0RX-72T075 . SEKXi 42) .NEXT . F0RX^76T088 . SET(X, 43) . NEXT . SET (81, 44) 

5660 &OSUeb0000.IFfl^ ,, £"THENGOSUBb2000.GOTO5806 

5700 GOSUB61000.GOTO5400 

5800 HGI<HRI<188)*CHRI<iai)*CHR*(189)KH»<188)*STRlNGI(2i i48>+CHR*(26)*STRING*(&24) 

5810 MG^MG*+CHR*<176)+STRINGIG, 191)*CHR$(135HSTRIN6*(2, i31)+CHR*<26)+STRING*(12, 24) 

5820 HG$^KHR*U60)KHR$(i84)KHR*(188)*STRlNG*(4, 191)+CHR*<i59>+CHR*(129)+CHR$(26)+STRING*<:i3, 24) 

5838 NBI=flG$+C«W(176)>CHRI(i88)*a«$(190)+5TRIN(il(7, m)+CHR$(135)+CHR*(26)+STRING*(13,24) 

5840 MGI=HG*+CHR»(i76)+CHR$(190)*STRINGI(10, 191HSTRING*(3, 188)+CHR$(lI2)+CHR$<26)+5TRIMG$(i9, 24) 

5850 NGI=HG*+CHRI( 176)+CHR*<188) +STRINGK10. 19i)+CHR*(135)+STRING*<5, 131HCHR$(129)+CHR$(26)+STRING*(22, 24) 

5868 MG*=HG*+C«$<176)+CHR*(188)+STRIM(il<il, 191 ) +CHR* ( 159 )+CHR$< 129 )+CHR*< 26 HSTR I NG$(18, 24) 

5878 HG$=HG$+CHR$<176)+CHRI(188)*STRING$(13il91)+CH»(135) 

5880 Mi$<HR*(i6e)KHR*(i84)KHR$(i98)*STRING$(6, 143)«CHR$(i91)+CHR*(159)+STRING*(5, 143)+CHR*(191)+CHR*(159)*CHR$(133)+CHR*(26)+STRI 

NG*(25,24> 

5890 ^llWtt$4STRINGI(i J 176)+C}«$<184)•K}«$(190)+al»(143)+CHR$(131)+• ■♦CH»<i91)*CHR*(18i)*" "4CHR*(19i>+CHR$<18i) 

5988 OS : PRINT8416, N6I; : PRINT898X Hlli 

5910 RESn(67,19):X=422 

5928 W=IW(EV$:IFRI= , D , ORfl$= , H , BCNGO9JB62000:GOTO6e00 

5925 IFMO""THENGOSUB61808:QOTO5980 

5938 PRINTM48, '?'; PRIMTfX, "*"; : FORDE^lTOia : »CXT : PRlMTf44& " "i :PRIKTW \ :F0RDE=iTOie:NEXT 

5940M+1 

5958 IFX>434THENX=422 

5968G0T05928 

6888 a5.X=86.FORQ=}a099:SET(a28):SET<Q,21):NEXT 

6818 X=XH:F0RQ=XT099:SET(Q,22):SET(e,23):NEXT 

6828 X=X^:FOI»=XT099. SET (0,24): SET (0,25). NEXT 

6838 X=X-4:F0RQ=:XTO99.Sn(Q. 26): SET (0,27) :NEXT 

6835 X=X-4:F0RQ=XT099:S£T(Q > 28):SET(Q,29):NEXT 

6848 GOSU868880:IFR$= l S < THENGOSlJe62e00:GOTO6108 

6858 GOSUB61880GOTO6040 

6180 aS:PRINTW65, "l"; PRINT0232, Ti ;PRINT«61, T» :PRINTM8B, 'A'i PRHfTKBB, '5"; :PRlMTI«e6, Vi 

6118 PRINT8535, Ti PRINTW68, "8"; PRINTI339, "9"; :PRlMT82i2, "18"; :fRIMTW51 "ii'i PRIMTI94, '12 m > : 

6120 F0RX=61T075 : SET(X, 16) : NEXT : F0RV=6T015 : SEK6L V) : (EXT 

613esn(68,7):SET(59,8):SET(6i7):SET(618):SET(7114):SET(74,15):Sn(74,i7):SET<73 < 18) 

6140 FORX=26T086 : SET(X, 2) : SETOt 38) : NEXT ; FORV=38T02STEP-i : SETG4, V) : SET(35, V) : SET(86, V) : SEK87, V) :NEXT 

6158 GOSUB60006:IFR»="C*ClRft$="W"TfCNGOSie62000:GOTO6200 

6168 GOSUB61880.GOTO6150 

6280 as : F0RX=48T0127 : SETOt 11 ) : SET(X, 33) : NEXT : F0RY=33T011STEP-i : 50(48, V) : SET(49, V) : SET(126. V) : SET(127, V) :NEXT 

6216 F0RX=ii5TO122 . 5EKX. 13) : SET(X> 18> : NEXT . F0RV=14T017 : SET<115. V) : SET<122, V) : NEXT 

6228 PRINT0378, ». 15", :PRINT0282, "OARK KEW'i :PRINTK46, "DRILV PLANET", :PRINTMia ftTROPttlS'; :PRINTW87. "SANTA CLAUS"; PRINTR5L ■ 

RD1 B0X1", :PRINT0615, "NORTH POLE", 

6238 GOSLB60ee0:IFR$- , P"OW='L"MW="M , THENGOSlJB62000:GOTO6300 

6248 GOSUB610B0 : F0RX=48TO127:SET<X, 33) :NEXT : G0T06238 

6380 as . V*=STR1 NG*(16. 176)+STRING*<5, 186)+CHRt(144) : PRIHTH60, VI 

6318 G0SUB68888:IFR$= > B l 0Rf^'T a THEM»Slfi62888:G0T0648B 

6320 GOSUB6i888:GOT063ie 

6488 END: ' DELETE THIS LINE IF VOU MRNT RN ENDLESS LOOP 

6418 GOTO180 

50000 DEFINTfl-Z: CL5. PRINTCHR$(23) : PRINT" BOH* DAD:" 

58810 PRINT PRINT" INSTRUCT CHILD TO HIT THE'PRINT'flPPROPRIflTE KEY. IF A" 

58828 PRINT'TRAIN APPEARS HE SHOULD HIT" :PRINT"THE LETTER T HHENVPRINT'A QUESTION HARK FLASHES. " 

58838 PRINT. PRINT'HIT ENTER WEN CHILD IS READY. ' 

58040 fl»=INKEVI IFR$=""THEN50048aSEaS. RETURN 

54088 BREAK 

60000 DUHMY^INKEYJ 

68885 fl$=INKEV*:PRINTM48i Ti :F0RX=lT0i88:NEXT 

60010 PRINT0448," ", .FGRX=1TO100.NEXT.IFA$=""THEN60005RSERETURN 

61000 SET(16, 41) . SET(17, 40) . SET<26, 40) : SET<27, 41) F0RX=18TO25 : SETOX, 39) .NEXTX 

61005 SET(21,37).SET(17,35):SET(18,35):SET(24,35).Sn(25,35):PRINT0904,"HRONG!", :PRINT0967,"TRY AGAIN", 

61000 IFS=1THENS=0:FORX=0TO30.FORV=35TO42.RESET(X,V).NEXTV,X. RETURN 

61010 FORDE=0TO800 NEXT . PRINT0704, CHRK38) . PRINT0768, CHRK30) . PRINTK32, CHRK38) . PRINT8896, CHRK38) . PRINT0960, CHRK30); 

61020 RETURN 

62000 F0RX=18T025 . SET(X» 40) . NEXT . SETQ7, 39) : SETQ6, 38) . SET(26, 39) . SET<27, 38) 

62005 SET<21, 37) . SETQ7, 35) . SET(18, 35) . SET(25, 35) : SEK26, 35) 

62010 reiNT0904, "RIGHT!", FORDE=1TO808. NEXT: I^INT0704,CHRI(30):PRINT076& 

62028 RETURN 



80 Microcomputing, September 1980 • 129 



THE ORIGINAL MAGAZINE FOR 
OWNERS OF THE TRS-80 ™* MICROCOMPUTER 



SOFTWARE 

EOR TRS-80 ' 

OWNERS 



H 



CQMPLITRQNICS 

MONTHLY NEWSMAGAZINE 

Practical Support For Model I & II 



MONTHLY 

NEWSMAGAZINE 

FOR TRS-M" 

OWNERS 



• PRACTICAL APPLICATIONS 

• BUSINESS 

• GAMBLING • GAMES 

• EDUCATION 

• PERSONAL FINANCE 

• BEGINNERS CORNER 

• NEW PRODUCTS 

• SOFTWARE EXCHANGE 

• MARKET PLACE 

• QUESTIONS AND ANSWERS 

• PROGRAM PRINTOUTS 
AND MORE 



* * wi 



PROGRAMS AND ARTICLES PUBLISHED IN OUR FIRST 12 ISSUES 
INCLUDE THE FOLLOWING 

• A COMPLETE INCOME TAX PROGRAM (I ONG AND SHORT FORM I 

• INVENTORY CONTROL 

• STOCK MARKET ANALYSIS 

• WORD PROCESSING PROGRAM (FOR DISK OR CASSETTE) 

• I OWER CASE MODIFICATION FOR YOUR VIDEO MONITOR OR PRINTER 

• PAYROI I (FEDF.RAI TAX WITHHOl DING PROGRAM) 

• EXTEND 16 DIGIT ACCURACY TO TRS 80" FUNCTIONS (SUCH AS 
SQUARE ROOTS AND TRIGONOMETRIC FUNCTIONS) 

• NEW DISK DRIVES FOR YOUR TRS 80" 

• PRINTER OPTIONS AVAILABLE FOR YOUR TRS 80" 

• A HORSE SELECTION SYSTEM"*ARITHMET1C TEACHER 

• COMPLETE MAILING LIST PROGRAMS (BOTH FOR DISK OR CASSETTE 
SEQUENTIAL AND RANDOM ACCESS) 

• RANDOM SAMPLING***RAR GRAPH 

• CHECKBOOK MAINTENANCE PROGRAM 

• LF.VF.l II UPDATES***! FVFi II INDEX 

• CREDIT CARD INFORMATION STORAGI fill 

• BEGINNER'S GUIDE TO MACHINE I ANGUAGI AND ASSEMBI Y 
I ANGUAGE 

• I INF RENUMBERING 

• AND CASSETTE TIPS. PROGRAM HINTS. LATEST PRODUCTS 

COMING SOON (GENERAI LEDGER. ACCOUNTS PAYABLE AND 
RECEIVABLE. FORTRAN 80. FINANCIAI APPI ICATIONS PACKAGE. 
PROGRAMS FOR HOMEOWNERS. MERGE TWO PROGRAMS. 
STATISTICAL AND MATHEMATICAI PROGRAMS (BOTH 
ELEMENTARY AND ADVANCED) AND 



WORD PROCESSING PROGRAM (Cassette or Disk) For writing letters, text, mailing lists, etc . with each new subscriptions or renewal 

LEVEL II RAM TEST (Cassette or Disk) Checks random access memory to ensure that all memory locations are working properly 

DATA MANAGEMENT SYSTEM (Cassette or Disk) Complete die management lor your TRS 80" 

CLEANUP (Cassette or Disk) Fast action Maze Game 

ADVEN rLJRE (Cassette or Disk) Adventure »0 by S< ott Adams (From Adventureland International) 



F f££ 



TKs*v|y.\ 'K.VXVAKK ii( MNDYIcW 



SEND FOR OUR NEW 48 PAGE SOFTWARE CATALOG (INCLUDING LISTINGS OF HUNDREDS OF TRS 80" PROGRAMS AVAILABLE ON 
I CASSETTE AND DISKETTE) $2 OR FREE WITH EACH SUBSC RIPTIONS OR SAM PLE ISSUE _ ! 



•CQinRJTHQWICSi 



50 N. PASCACK ROAD 
SPRING VALLEY. NEW YORK 10977 




HK\ ~ m HOUR 
QP\ 24 ORDER 

LINE 



(914) 425-1535 



ONE YEAR SUBSCRIPTION $24 

TWO YEAR SUBSCRIPTION $48 

SAMPLE OF LATEST ISSUE $4 

START MY SUBSCRIPTION WITH ISSUE 

(#1 July 1978 • #7 - January 1979 • »12 - June 1979 • »18 - January 1980) 




NEW TOLL-FREE 

ORDER LINE 

(OUTSIDE OF N.Y. STATE) 

(800) 431-2818 



NEW SUBSCRIPTION 

CREDIT CARD NUMBER 

SIGNATURE 

NAME 

ADDRESS 



PENEWAl 



NEW!!! 

MOD-II NEWSLETTER 
$lZ/ycar Cor 11 1— n— ) 



EXP DATE 



CITY. 



STATE . 



^IP 



ADD M YEAR (CANADA, MEXICO) ADD JI2 YEAR AIR MAIL OUTSIDE OE U 5 A . CANADA St MEXICO ■ 



130 • 80 Microcomputing, September 1980 



H 



CQMPUTRQNICS 



N 



• • • EVERYTHING FOR YOUR TRS-80 . • • 

TRS-80 Is a trademark of lh«- Kadlo Shack Division of Tandy <or|x>r.illon 

* All Orders processed within 24-Hour s 

* 30-Day Money Back Guarantee on all Software (less a $3 penalty for handling) 
•k 10-Day Money Back Guarantee on Disk Drives and Printers PLUS 120-Days Free Service 



FROM RACET COMPUTES 

• REMO0EL-PROL0AD - Renumbers program 
lines, combines programs The only renumber 
program that will renumber the middle of a 
program Specify 16K. 32K or 48K Works with 
Cassette or Disk $34.95 

• GSF • Use in your Basic Programs lor Instant 
Sorting (will sort 1000 items in 9 seconds) Other 
commands include Compress and Uncompress 
Data Duplicate Memory. Display Screen Controls 
and Fast Graphic Controls $24.95 
(For Cassette or Disk, specify 16K. 32K or 48K) 

• DOSORT - All G S F commands plus special 
Multiple Disk Sorting Routines $34.9$ 
(Specify 32K or 48K) 

• INFINITE BASIC - Adds 70 commands lo your 
TRS-80'" including Instant Sort. Matrix 
Commands. String Commands. Left and Right 
Justification. String Centering. Simultaneous 
Equations. Upper and Lower Case Reverse and 
more (For Cassette or Disk) $49.95 

• INFINITE BUSINESS (Requires Infinite Basic) 
Eliminate Round-off error 127-Digit Calculation 
Accuracy. Insert New Elements in Sorted Arrays 
Automatic Page Headings. Footings and 
Pagination. Multiple Precision Arithmetic and 
more (For Cassette or Disk) $29.95 

• COPSYS - Copy Machine Language Programs 
(For Cassette Only) $14.95 

• OSM (Disk Sort Merge) $75.00 



• LEARNING LEVEL II By David Lien 

The Original Author Of The Level Manual 
A Step By Step approach to Learning Level II 
especially geared to new TRS-80'" Owners 

$15.95} 



• TRS-80" DISK AND OTHER MYSTERIES 

Over 100 pages of indespensible information for 
disk owners Learn to recover information from 
bad disks, how to make Basic programs unlistable 
and 12 more chapters of never published tips and 
information Written by H C Pennington 
(For all Disk Owners) $22.50 



NEW SBSQ BUSINESS SYSTEM FOR MODEL I 
OR MODEL II • IN STOCK 

- General Ledger 

- Accounts Receivable ', 

- Accounts Payable \ 

- Payroll 

- Inventory Control with Invoicing 

• Each module can be operated individually or as a 
coordinated SYSTEM. Turn-Key error catching 
operation lor beginners 

• Complete manual and documentation 
accompany each program 

• Minimum System requirements 2-Disk Drives 
for Model I 1-Disk Drive lor Model II 

• Each module can be formatted to span data 
on up to 4-Disk Drives 

• Free 30-Day telephone consultation 

• Call for complete specifications 

• Model I Version $125.00 Per Module 

$495.00 Per System 

• Model II Version $225.00 Per Module 

$MS.OO Per System 



DATA MANAGEMENT SYSTEMS 

- DMS replace index cards or any data requiring 
long lists of information 

• TBS In-Memory Information System 

(For Cassette Systems) $39.95 

• TBS Disk Data Manager (Requires 1 or more disk 
drives) Set up fast random access, files in 
minutes Stores up to 320K of information on 4 
Drives Up to 10 fields and 255 characters per 
record. Supports upper and lower case RS-232 or 
TRS-232 Features complete editing $49.50 

• Personal Software CCA Data Management 
System Completely user oriented, menu drive, 
130 page Step By Step Manual Capable of 
inventory control, sorting data, reporting data in 
nearly any form (for reports and mailing labels) 
Sorts data by up to 10 fields lor zip code, balance 
due. geographic location or whatever Prints 
reports with subtotals and totals automatically 
calculated. Fast random access $75.00 



FROM SMALL SYSTEM SOFTWARE 

• RSM-2 Machine Language Monitor $26.95 

• RSM-2D Disk Version ol RSM-2 $29.95 

• DCV-1 Converts Machine Language Programs 
from tape to disk $9.95 

• AIR RAIO - The ultimate TRS-80" game converts 
your TRS-80'" into a real time shooting gallery 

$14.95 

• BARRICADE - A fast pong style game $14.95 

• CPM - (For Disk Only) $150.00 

• TRS-232 INTERFACE - Interface with Software 
driver RS-232 printers to your TRS-80'" $49.95 

• TRS-232 FORMATTER - Additional (optional) 
Software lor TRS-232 owners Adds many printer 
commands to your TRS-80" $14.95 
(With purchase of TRS-232) $9.95 

• PENMOD - Use the Electric Pencil with RS's lower 
case modification $19.95 



FROM GALACTIC SOFTWARE 

• MAIL PAC - For Model I Disk Systems 

only $99.95 

Quick-sorting full user control over mailing list 
from Galactic Software 

• STOCK MARKET PAC $99.95 



ICQiriRJTHQWICSi 



»T>^M«rc*i »»«M.A'r»*, •jir.-n - 




SO N. PASCACK ROAD 
SPRING VALLEY. NEW YORK 10977 

HOURS: 9-5 

Monday thro Saturday 

48-Page Catalog $2 FREE With Any Order 

Order By Phone Or Mail 
Add $1 Per Order For Shipping Within UPS Areas 

Add $3 For COD. 

Add $3 For All Foreign And Non-UPS Shipments 

Add $3 For UPS Blue Label 




HOUR 
24 ORDER 
LINE 

(914) 425-1535 



NEW TOLL-FREE 

ORDER LINE 

(OUTSIDE OF NY. STATE) 

(800) 431-2818 



FROM APPARAT NEW DOS • $99 95 

35 40 and 77 Track Versions available 

NEW DOS/10 (With variable record length files 

chainings and many other features $149 95 



FROM THE BOTTOM SHELF 

CHECKBOOK II (For Cassette or Disk) $39 95 

SYSTEM DOCTOR (A complete diagnosis of youi 

TRS-80" Checks memory video cassette disk 

ROM. and all other parts of your system) 

For Cassette or Disk $26.50 

CHECKBOOK REGISTER ACCOUNTING 

SYSTEM (Requires 2 disk drives) $75.00 
LIBRARY 100- 100 established business game 
and educational programs plus FREE Tiny Pildl 
all lor $49.50 

BASIC TOOL KIT - List 8 all variables GOTO s 
and GOSUB's in your program $19.80 



SOUNDWARE - Adds sound to your TRS-80" 
Just plus it in $29 95 

Sample programs included 

TING TONG - Can be used with Soundware for a 
Sound version ot pong $9.95 



• VIC - The Carta Visual Instructional 

Computer Program $19.95 

The Level II 16K Cassette is designed to teach 
beginners the Basics ot Machine Language and 
Assembly Language Programming See every 
Machine Language Instruction Display on your 
video VIC includes Step By Step 55 page manual 



VISTA V80 OISK DRIVE - 

110K ol Storage $395 00 

Add $29 95 for Cable (Free with purchase ol 
?-Disk Drives) 10 day money back guarantee 



FROM HOWE SOFTWARE 

• MON-3 - Machine I anguage Programming for 
beginners MON-3 is a complete System Monitor 
with Users Manual $39.95 

• MON-4 - Disk Version of MON-3 $49 95 



FROM MICROSOFT 

• LEVEL III BASIC $49.95 

Now Cassette owners can add Disk Commands 
to their TRS-80" without owning a Disk Drive 

• MICROSOFT DISK ADVENTURE $29.95 

• TRSDOS BASIC COMPILER $195 00 

Run Basic Programs up to 15 times faster 



• NEC BUSINESS QUALITY PRINTERS 

(For MOD I or MOD II) $2.995 00 



THE ELECTRIC PENCIL 

Cassette 

Disk 

MOD-II Version 



$99 95 
$150.00 
$325.00 



HORSE SELECTOR II By Dr Hal Davis 

The TRS-80" version updated for the TRS-80" 
and originally reviewed in Systems and 
Methods $50 00 



• •^VERYflilN^# • • 
FOR MOD-II OWNERS 



NEW MOD-II NEWSLETTER 

MOD-II Catalog Free w subscription $12/y ear 

MAIL PAC $199.95 

MICROSOFT BASIC COMPILER 

$395.00 

MICROSOFT BASIC $325.00 

GSF SORT ROUTINE $50.00 

CP/M $170.00 
PEACHTREE BUSINESS 

SOFTWARE Call 

WORD STAR $495.00 



^Header Service- see page 226 



80 Microcomputing, September 1980 • 131 



CQMPJTRQNICS 



N 
C. 



• ••EVERYTHING FOR YOUR TRS-80 ••• 



TRS-no In a iradrmark of ihr Hactlo Shack INvlnlc 



if Tandy C°.<ir|M>rallon 




COORDINATED BUSINESS SYSTEMS 



SMALL BUSINESS 
SYSTEMS GROUP 



• EACH MODULE CAN BE OPERATED INDIVIDUALLY OR AS A COORDINATED SYSTEM. 

• TURN-KEY ERROR CATCHING OPERATION FOR BEGINNERS 

• FREE 30-DAY TELEPHONE CONSULTATION WITH SBSG 

• EACH MODULE CAN BE FORMATTED TO SPAN DATA ON UPTO 4 DISK DRIVES 

• COMPLETE MANUAL AND DOCUMENTATION ACCOMPANY EACH MANUAL 

• MINIMUM SYSTEM REQUIREMENTS - 2 DISK DRIVES FOR MODEL I ...1-DISK DRIVE FOR MODEL II 



ACCOUNTS PAYABLE 

The accounts payable system receives data concerning purchases from 
suppliers and produces checks in payment of outstanding invoices. In 
addition, it produces cash management reports. This system aids in tight 
financial control over all cash disbursements of the business Several 
reports are available and supply information needed for the analysis of 
payments, expenses, purchases and cash requirements All A/P data feeds 
General Ledger so that data is entered into the system just once. These 
programs were developed 5 years ago for the Wang micro-computer and 
have been tested in many environments since then. The package has been 
converted to the TRS-80'" and is now a well documented, on-line, inter- 
active micro-computer system with the capabilities of (or exceeding many 
larger systems. 



CAPABILITIES 



ACCOUNTS RECEIVABLE 

The objective of a computerized A/R system is to prepare accurate and 
timeley monthly statements to credit customers. Management can gener- 
ate information required to control the amount of credit extended and the 
collection of money owed in order to maximize profitable credit sales 
while minimizing losses from bad debts. The programs composing this 
system were developed 5 years ago, especially for small businesses using 
the Wang Microcomputer They have been tested in many environments 
since then. Each module can be used stand alone or can feed General 
Ledger for a fully integrated system. 



PAYROLL 



Payroll invoices many complex calculations and the production of reports 
and documents, many of which are required by government agencies. It is 
an ideal candidate for the computer. With this Payroll system in-house. 
you can promptly and accurately pay your employees and generate 
accruate documents/reports to management, employees, and appropriate 
government agencies concerning earnings, taxes, and other deductions. 
The package has been converted to the TRS-80'" and is now a well 
documented, on-line, interactive micro-computer system with the capa- 
bilities of (or exceeding) many larger systems 



CAPABILITIES: 



* performs all necessary payroll tasks including: 

• file maintenance, pay data entry and verification 

• computation of pay and deduction amounts 

• printing of reports and checks 

* can handle salaried and hourly employees 

* employees can receive. 

• hourly or salary wage 

• vacation pay 

• holiday pay 

• piecework pay 

• overtime pay 

(Continued on next page) 



* menu driven; easy to use; full screen prompting and cursor control 

* invoice oriented: everything revolves around the invoice; handles new 
invoice or credit memo or debit memo 

* invoice information recorded, invoice #, description, buyer, check 
register #, invoice date, age date, amount of invoice, discount (in %), 
freight, tax ($), total payable 

* transaction print and file maintenance procedures insure accuracy 

* flexible check calculation procedure; allows checks to be calculated for a 
set of vendors - or - for specific vendors 

* program prints your checks; contiguous computer checks with your 
company letterhead can be purchased from SBSG 

* reports include (samples on back) 

• open item listing/closed item listing - both detail and summary 

• debit memo listing/credit memo listing 

• aging 

• check register report (to give an audit trail of checks printed) 

• vendor listing and vendor activity (activity of the whole year) 

* fully linked to GENERAL LEDGER; each invoice can be distributed to as 
many as five (5) different GL accounts; sysem automatically posts to cash 
and A/P accounts 



CAPABILITIES 



* menu driven; easy to use; full screen prompting and cursor control 

* invoice oriented; invoices can be entered before ready for billing, when 
ready for billing, after billing or after paid 

* allows entry of new invoice, credit memo, debit memo, or change/delete 
invoice 

* allows for progress payment 

* transaction information includes: 

• type of A/R transaction 

• customer P.O. » 

• description of P.O. 

• billing date 

• general ledger account number 

• invoice amount 

• shipping/transportation charges 

• tax charges 

• payment 

• progress payment information 

• transaction print and file maintenance procedures insure accuracy 

* customer statements printed; computer statements with your company 
letterhead can be purchased from SBSG 

* reports include; (samples on back) 

• listing of invoices not yet billed 

• open items (unpaid invoices) 

• closed items (paid invoices) 

• aging 

* fully linked to General Ledger; will post to applicable accounts: debits A/R. 
credits account you specify 



132 • 80 Microcomputing, September 1980 



(PAYROLL CAPABILITIES CONTINUED) 

* employees can be paid using any combination of pay types (except, hourly 
cannot receive salary & salary cannot receive hourly) 

* special non-taxable or taxable lumpsums can be paid regularly or one time 
(bonus, reimbursements, etc) 

* health & welfare deductions can be automatically calculated for each 
employee 

* earnmgs-to-date are accumulated and added to permanent records; taxes 
are computed and deducted US income tax. Social Security tax, state 
income tax, other deductions (regular or one time) 

* paychecks are printed; computer checks with your company letterhead 
can be purchased from SBSG 

* calculations are accumulated for. employee pay history. 941A report. W-2 
report, insurance report, absentee report 

* fully linked to General Ledger Each employee's payroll information can be 
distributed to as many as (12) twelve different GL accounts, system 
automatically posts to cash account 



INVENTORY/CONTROL INVOICING 

• OVER 1000 ITEMS ON MODEL I 

• OVER 3000 ITEMS ON MODEL II 

• LOW STOCK ALARM 

• INVOICING DEDUCTS FROM INVENTORY 

• COMPLETE INVENTORY REPORTS 

• REORDER POINT REPORT 

• QUICK ITEM ACCESS 



CLIENT BILLING. STOCK CONTROL. DENTAL BILLING. COMMODITIES 
Medicare Medicaid billing also available 



MODEL I 
MODEL II 



$125 Per Module 
$495 Complete System 
$225 Per Module 
$995 Complete System 



WE ARE THE ONLY SOFTWARE COMPANY THAT OFFERS A REFUND 
WITHIN 30 DAYS ON ALL SOFTWARE (H & E COMPUTRONICS 
MONTHLY NEWSMAGAZINE SUBSCRIBERS ONLY).. WE DO 
CHARGE A $3 PENALTY TO COVER POSTAGE AND HANDLING 



GENERAL LEDGER 

The General Ledger accounting system consolidates financial data from 
other accounting subsystems (A/R, A/P, Payroll, direct posting) in an 
accurate and timely manner Mapr reports include the Income Statement 
and Balance Sheet and a "special'' report designed by management The 
beauty of this General Ledger system is that it is completely user formatted 
You "customize" the account numbers, descriptions, and report formats to 
suit your particular business requirements These programs were de- 
veloped 5 years ago for the Wang micro-computer and have been tested in 
many environments since then. The package has been converted to the 
TRS-80™ and is njw a well documented, on-line, interactive micro- 
computer system with the capabilities of (or exceeding) many larger 
systems 



CAPABILITIES 

* more than 200 chart of accounts can be handled 

* account number structure is user defined and controlled 

* more than 1.750 transactions may be entered via 

• direct posting, done by hand; validated against the account file 
before acceptance 

• external posting, generated by A/R. A/P, Payroll or any other user 
source 

* data is maintained and reported by: 

• month 

• quarter 

• year 

• previous three quarters 

* reports (samples on back) include 

• trial balances 

• income statement 

• balance sheet 

• special accounts reports and more 

* user formats reports with the following designed as you wish 

• titles 

• headings 

• account numbers 

• descriptions 

• subtotals 

• totals 

• skip lines 

• skip pages 

* up to eight levels of totals - fully user designated 

* menu driven; easy to use; full screen prompting and cursor control 



iCQKIMBQMCS: 

50 N. PASCACK ROAD 
SPRING VALLEY. NEW YORK 10977 




HOUR 
24 ORDER 

LINE 
(914) 425-1535 




PLEASE SEND ME: 

MODEL I $125 PER MODULE 



$495 COMPLETE SYSTEM 

MODEL II $225 PER MODULE 

$995 COMPLETE SYSTEM 



NEW TOLL-FREE 

ORDER LINE 

(OUTSIOE OF N.Y. STATE) 

(800) 431-2818 



CREDIT CARD NUMBER 
SIGNATURE 



EXP DATE. 



NAME 



ADDRESS 



.CITY. 



.STATE^ 



ADD 16 YEAR (CANADA MEXICO! • ADD 112'YEAR AIR MAIL - OUTSIOE Of U S A CANADA I MEXICO - " 



-Z\P- 



^ Reader Service— see page 226 



80 Microcomputing, September 1980 • 133 



CQIYIPLJTHQMICS 



N 
C. 



• • • EVERYTHING FOR YOUR TRS-80 • • • 

TRS-SO la a trademark of the Radio Shack Division of Tandy Corporation 

100 sure* MASTER PAC 100 

ttHOGH^^ | «nd EDITION CCOMPLETELY REVISED) 

FOR YOUR TRS-80™ LEVEL II MICROCOMPUTER 



ALL ON CASSETTE OR DISKETTE 



BUSINESS AND PERSONAL FINANCE 
1. CHECKBOOK MAINTENANCE 

2 TIME FOR MONEY TO DOUBLE 

3 FEDERAL FICA & WITHHOLDING TAX 
3. COMPUTATIONS 

4 HOME BUDGET ANALYSIS _ — 
ANNUITY COMPUTATION ..elWCSS 
UNIT PRICING ttljain*' 
CHANGE FROM PURCHASE "* 
NEBS CHECK PRINTER 
DAYS BETWEEN DATES 
MORTGAGE AMORTIZATION TABLE 

11. INVENTORY CONTROL 

12. PORTFOLIO VALUE COMPUTATIONS 
13 VALUE OF A SHARE OF STOCK 

14. SALES RECORD KEEPING SYSTEM 

15. FUTURE VALUE OF AN INVESTMENT 
16 EFFECTIVE INTEREST RATE (LOAN) 

17. PRESENT VALUE OF A FUTURE AMOUNT 
18 RATE OF RETURN VARIABLE INFLOW 

19. RATE OF RETURN CONSTANT INFLOW 

20. REGULAR WITHDRAWAL FROM INVESTMENT 

21. STRAIGHT LINE DEPRECIATION 

22. SUM OF DIGITS DEPRECIATION 

23. DECLINING BALANCE DEPRECIATION 
24 BREAK EVEN ANALYSIS 

25. SALVAGE VALUE OF INVESTMENT 

26. PAYMENT ON A LOAN 

27. FUTURE SALES PROJECTIONS 

28. CREDIT CARD FILE 

29 ECONOMIC ORDER QUANTITY (EOQ) 

INVENTORY MODEL 
30. VALUE OF HOUSE CONTENTS 

31 TEXT EDITOR 

32 MONTHLY CALENDAR 

33. DAY OF WEEK 

34. CASH FLOW VS. DEPRECIATION 

35. COMPLETE MAIL SYSTEM 

36. INTEREST RATE ON A LEASE 



STX 



XlSTlCS 



FINANCE 



STATISTICS AND MATHEMATICS 

37 RANDOM SAMPLE SELECTION 
38. ANGLO METIC CONVERSION 

39 MEAN, STANDARD DEVIATION. 
MAXIMUM AND MINIMUM 

40 SIMPLE LINEAR REGRESSION 
41. MULTIPLE REGRESSION ANALYSIS 

42 GEOMETRIC REGRESSION 

43 EXPONENTIAL REGRESSION 

44 SIMPLE MOVING AVERAGE 
45. SIMPLE T TEST 
46 CHI SQUARE TEST 

47. NORMAL PROBABILITIES 

48. BINOMIAL PROBABILITY 

49 POISSON PROBABILITY 

50 MATRIX ADDITION AND SUBTRACTION 

51 MATRIX TRANSPOSE 
52. MATRIX INVERSE 

53 MATRIX MULTIPLICATION 

54. SOLUTION OF SIMULTANEOUS EQUATIONS 

55. QUADRATIC FORMULA 

56. LINEAR EQUATION SOLUTIONS 

57. ROOT HALF INTERVAL SEARCH 
58 ROOTS OF POLYNOMIALS 

59. ROOTS NEWTON'S METHODS 

60. PRIME FACTORS OF INTEGER 

61 LEAST COMMON DENOMINATOR 
62. RADIAN DEGREE CONVERSION 

63 NUMERICAL INTEGRATION 

UTILITIES 

64 QUICK SORT ROUTINE 

65 PROGRAM STORAGE INDEX 
66. MULTIPLE CHOICE QUIZ BUILDER 
67 FORM LETTER WRITER 

68. SHELL SORT 

69. CASSETTE LABEL MAKER 

70. CODES MESSAGES 

71 MERGE TWO FILES 

72 SORT WITH REPLACEMENT 



MATH 



GRAPHICS 

73. DRAWS BAR GRAPH 

74 DRAWS HISTOGRAM 

75 MOVING BANNER DISPLAY 

GAMBLING AND GAMES 

76 RANDOM SPORTS QUIZ 
77. GOVERNMENT QUIZ 

78 HORSE RACE 

79 MAGIC SQUARE 

80 ARITHMETIC TEACHER 
81. HIGH LOW GAMBLE 
82 UNSCRAMBLE LETTERS 

83. HANGMAN 

84. GAME OF NIM 

85. RUSSIAN ROULETTE 

86 ROULETTE GAME 

87 ONE ARMED BANDIT 
88. HIT THE TARGET 

89 WALKING DRUNK 

90 STATE CAPITAL QUIZ 

91 TICTACTOE 

92. DICE GAME 

93. LUNAR LANDAR GAME 

94. BIORHYTHM 

95. HORSE SELECTOR (CLASS CALCULATOR) 
%. RANDOM DICE ROLL 

97 RANDOM ROULETTE ROl.l 

98 RANDOM CARD DEALER 

99 GUESS THE NUMBER 
100 WHITE OUT SCREEN 



m*bU*° 



USE* 



«--=SSi 



GUARANTEED SATISFACTION 

WE ARE THE ONLY SOFTWARE COMPANY THAT OFFERS A REFUND WITHIN 30 DAYS ON ALL SOFTWARE (H & E COMPU 
TRONICS INC. MONTHLY NEWSMAGAZINE SUBSCRIBERS ONLY). WE DO CHARGE A $3 PENALTY TO COVER POSTAGE 
AND HANDLING. 



•CQMPLrmQNXCS? 

SO N. PASCACK ROAD 
SPRING VALLEY, NEW YORK 10977 

PLEASE SEND ME: 

□ MASTER PAC 100 CASSETTE VERSION $59.95 

D MASTER PAC 100 DISKETTE VERSION $59.95 

□ MASTER PAC 100 (MODEL II DISKETTE VERSION) $99.95 




HOUR 

ORDER 

LINE 



& 24 

(914) 425-1535 




NEW TOLL-FREE 

ORDER LINE 

(OUTSIDE OF N.Y. STATE) 

(800) 431-2818 

* All order* processed within 24-Houra 
•k 30-Day money back guaranty* on aO Software 
(?••• a $3 penalty for handling) 



CREDIT CARD NUMBER EXP. DATE. 



SIGNATURE. 



NAME 



ADDRESS . . . 



CITY STATE . . . 

*** ADD 12 FOR POSTAGE AND HANDLING ($4 OUTSIDE OF THE U.S.A.) 



ZIP 



4*A m On U,V.,»/. nn1ni ,linn Cnn«nm*>«r 1 0OH 



iCQMPUTRQNICS: 

EVERYTHING FOR YOUR TRS-80 

TRS-SO Is • trademark of the Radio Shack Division of Tandy Corporation 



MICROSOFT BASK COMPILER 

With TRS80"" BASIC Compiler, your Level II programs will run at record speeds! 
Compiled programs execute an average of 3- 1 times faster than programs run under 
Level IL Make extensive use of integer operations, and get speeds 20-30 times faster 
than the interpreter. 

Best of all. BASIC Compiler does it with BASIC, the language you already know. 
By compiling the same source code that your current BASIC interprets, BASIC 
Compiler adds speed with a minimum of effort 

And you get more BASIC features to program with, since features of Micro- 
soft's Version 5.0 BASIC interpreter are included in the package. Features like the 
WHILE. WEND statement long variable names, variable length records, and the CALL 
statement make programming easier. An exclusive BASIC Compiler feature lets you 
call FORTRAN and machine language subroutines much more easily than in Level II. 

Simply type in and debug your program as usual, using the BASIC interpreter. 
Then enter a command line telling the computer what to compile and what options 
to use. 

Voila! Highly optimized, Z-80 machine code that your computer executes in a 
flash! Run it now or save it for later. Your compiled program can be saved on disk for 
direct execution every time. 

Want to market your programs? Compiled versions are ideal for distribution. 
You distribute only the object code, not the source, so your genius stays fully protected. 

BASIC Compiler runs on your TRS80" Model I with 48K and disk drive. The 
package includes BASIC Compiler, linking loader and BASIC library with complete 
documentation $193.00 



1980 INCOME TAX PAC 

Completely Revised - Latest Tax Tables ■ Fully Tested ■ Complete Manual and Docu- 
mentation. The new version of the Income Tax Pacs are full of error catching codes 
making it impossible to make an error. Follow the simple Step By Step procedure that 
makes tax preparation simple. 

INCOME TAX PAC A {•19.95.. .Cassette) 

For Level II 16K Cassette Only 
Does Form 1040 and 1040A 

- Schedule A itemized deductions 

- Schedule B interest and dividends 

- Output to video display 

- Schedule TC tax computation 

INCOME TAX PAC B M9.95...Cassette or Diskette) 

For Level II 1 6K with or without printer.. .cassette or disk has all features of Income Tax 
Pac A Plus works with or without line printer. 

■ Formats Form 1040 and 1040A for standard tax forms 

- Schedule C income from a personally owned business 

- Form 2106 employee business expense 

PROFESSIONAL INCOME TAX PAC C 199.95.. .Diskette 

For Level II 32K with disk and printer (optional) 

Has all features of Income Tax Pac B Plus automatic memory storage for Income tax 

preparers. 

- 22 additional schedules and forms 

■ Formats forms for individual or tractor feed printing 

MOD II CPA VERSION $199.95 



WINS 



AVERAGE PROFIT 



dOARAW™ 80 pROr 91% PLACES 32% AT ALL TRACKS- 197S 

SHOWS 

THE HORSE SELECTOR 11 (FLATS) (By Dr. Hal Davis $30.00 

New simplified version of the original Horse Selector. The first Horse Selection System 

to actually calculate the estimated odds of each horse. 

HIGHER PROFTTS (OVER 100%) POSSIBLE THROUGH SELECTIVE BETTING ON: 

• Rates each horse in 10 seconds. 

• Easy to follow rules. 

• Can be used with any Apple D Computer. 

• 100% money back guarantee (returned for any reason). 

• Uses 4 factors (speed rating, track variant distance of the present race, distance of 
the last race). 

• Using the above factors, the Horse Selector calculates the estimated odds. BET 
on horses whose actual payoff (from the Tote Board or Morning Lines) is higher 
than payoff based on estimated odds. 

• Using the above factors, the Horse Selector calculates the estimated odds. BET 
on any selected horse with an estimated payoff (based on Tote Board or Morning 
Lines) higher than calculated payoff (based on Horse Selector II). 

• Source listing for the TRS*P. TJ-59. HP-67, HP-4 1 . Apple and BASIC Computers. 

• No computer or calculator necessary (although a calculator would be helpful for 
the simple division used to calculate estimated odds). 

! DutcNng Tables allows betting on 2 or more horses with a guaranteed profit 



NEWDO8/80 

A New enhanced NEWDOS for TRS80™ Model I for the 1960s 

Apparat Inc., announces the most powerful Disk Operating System for the 
TRS80"\ It has been designed for the sophisticated user and professional programmer 
who demands the ultimate in disk operating systems. 

NEWDOS/80 is not meant to replace the present version of NEWDOS 2. 1 
which satisfies most users, but is a carefully planned upward enhancement which 
significantly extends NEWDOS 2. l's capabilities. This new member to the Apparat 
NEWDOS' family is upward compatible with present NEWDOS 2. 1 and is supplied on 
Diskette, complete with enhanced NEWDOS + utility programs and documentation. 
Some of the NEWDOS/80 features are: 

• New BASIC commands that supports with variable record lengths up to 4095 
Bytes long. 

• New BASIC commands that supports with variable record lengths up to 4095 
Bytes long. 

• Mix or match disk drives. Supports any track count from 18 to 80. Use 35. 40 or 
77 track 5" mini disk drives or 8" disk drives, or any combination. 

• A security boot-up for BASIC or machine code application programs. User never 
sees "DOSREADY*" or "READY' and is unable to BREAK", clear screen, or 
issue any direct BASIC statement including LIST " 

s New editing commands that allow program lines to be deleted from one location 
and moved to another or to allow the duplication of a program line with the 
deletion of the original. 

• Enhanced and improved RENUMBER that allows relocation of subroutines, 
a Powerful program chaining. 

a Device hanging for routing to display and printer simultaneously. 

a CDE function; simultaneous striking of the C. D and E keys will allow user to 

enter a mini-DOS to perform some DOS commands without disturbing the 

resident program, 
a Upward compatible with NEWDOS 2. 1 and TRSDOS 2.3. 
a Includes Superzap 3.0 and all Apparat 2. 1 utilities. 

$149.00 

STOCK MARKET MONITOR 

Galactic Software Ltd. 

CASSETTE VERSION $89.00 

DISK VERSION $99.00 

1 . The system is designed for the active "trader" not the "long term' investor, as 
the system is "technically'' oriented. 

2. For the TRS-80" 1 Model I. Level H. 1 6K or more. Available in both disk and tape 
versions. 

3. Tracks user selected issues, in a technical system that reflects the issue's 
performance against the overall market. 

4. Set up data is input by the user from the Standard and Poors stock guide or 
Value Line. 

5. Dairy issue data. "high", "low", "close" and "volume" are input from any news 
paper containing this information. 

6. Dairy overall market, "volume'' and "closing Dow" are also provided from a 
newspaper. 

7. Volume and price changes of an issue, as they compare to volume an price 
changes of the overall market are the basis of this system's analysis of the given 
issue. 

8. Comparisons of the issue against itself are also done. This may allow the user 
to spot "unusual" activity on this issue. 

9. Clear indications are given as to whether the issue is "out performing", "under 
performing" or "performing" with the market. 

10. Complete video and printed output is provided. 

1 1 . This program is intended to be a guide to indications, and is not to be used as a 
sole recommendation to buy, sell or hold an issue. These decisions are the 
responsibility of the user and his brokerage. 



iCQMRJTRQWXCSJ 



^ g SO N. PASCACK ROAD 

SPRING VALLEY, NEW YORK 10977 

$£ 24 ojjy 

*— — (914) 425-1535 

ADD *2.00 FOR SHIPPING IN UPS AREAS 
ADD 4 3.00 FOR COD. OR NON-UPS AREAS 
ADD $4.00 OUTSDE U.SA.. CANADA & MEXICO 




NEW TOLL-FREE 
ORDER LINE 

(OUTSIDE OF N.Y. STATE) 

(800) 431-2818 

♦ AH order. proc«»»ad 

uiirhin 2 4 - Hour, hflck guarantee 

* 40-Day money dock s» 

penalty for hanaW 



H 



CQIY1PUTRQNICS 



N 
C. 



• • • EVERYTHING FOR YOUR TRS-80 "• • • 

TRS-ao Is a trademark of the Radio Shark Division of Tandy Corporation 

BUSINESS PAC 100 

100 Ready-To-Run 
Business Programs 




Software ««»» 



(ON CASSETTE OR DISKETTE) Includes 110 Page Users Manual 5 Cassettes (Or Diskettes) 

Inventory Control Payroll. ....Bookkeeping System Stock Calculations 

Checkbook Maintenance.. ...Accounts Receivable.... .Ac counts Payable 



BUSINESS 100 PROGRAM LIST 



1 RULE78 Interest Apportionment by Rule of the 78 s 

2 ANNU 1 Annuity computation program 

3 DATE Time between dates 

4 DAYYEAR Day of year a particular date falls on 

5 LEASEJNT Interest rate on lease 

6 BREAKEVN Breakeven analysis 

7 DEPRSL Straightline depreciation 

8 DEPRSY Sum of the digits depreciation 

9 DEPRD8 Declining balance depreciation 

10 DEPRDDB Double declining balance depreciation 

! 1 TAXDEP Cash flow vs depreciation tables 

12 CHECK2 Pnnts NEBS checks along with daily register 

13 CHECKBK1 Checkbook maintenance program 

14 MORTGAGE/ A Mortgage amortization table 

15 MULTMON Computes time needed for money to double, triple. 

16 SALVAGE Determines salvage value of an investment 

1 7 RRVARIN Rate of return on investment with variable inflows 

1 8 RRCONST Rate of return on investment with constant inflows 

1 9 EFFECT Effective interest rate of a loan 

20 FVAL Future value of an investment (compound interest) 

21 FVAL Present value of a future amount 

22 LOANPAY Amount of payment on a loan 

23 REGWTTH Equal withdrawals from investment to leave over 

24 SIMPDISK Simple discount analysis 

25 DATEVAL Equivalent & nonequivalent dated values for oblig 

26 ANNUDEF Present value of deferred annuities 

27 MARKUP X Markup analysis for items 

28 SINKFUND Sinking fund amortization program 

29 BOMDVAL Value of a bond 

30 DEPLETE Depletion analysis 

31 BLACK SH Black Scholes options analysis 

32 STOCVALI Expected return on stock via discounts dividends 

33 WARVAL Value of a warrant 

34 BONDVAL2 Value of a bond 

35 EPSEST Estimate of future earnings per share for company 

36 BETAALPH Computes alpha and beta variables for stock 

37 SHARPE1 Portfolio selection model-i.e. what stocks to hold 

38 OPTWRfTE Option writing computations 

39 RTVAL Value of a nght 

40 EXPVAL Expected value analysis 

4 1 BAYES Bayesian decisions 

42 VALPRINF Value of perfect information 

43 VALADINF Value of additional information 

44 imLTTY Derives utility function 

45 SIMPLEX Linear programming solution by simplex method 

46 TRAMS Transportation method for linear programming 

47 EOQ Economic order quantity inventory model 

48 QUEUE 1 Single server queueing (waiting line) model 

49 CVP Cost-volume-profit analysis 

50 CONDPROF Conditional profit tables 

51 OPT LOSS Opportunity loss tables 

52 FQUOQ Fixed quantity economic order quantity model 

NAME DESCRIPTION 

53 FQEOWSH As above but with shortages permitted 

54 FQEOQPB As above but with quantity price breaks 

55 QUEUECB Cost-benefit waiting line analysis 

56 NCFANAL Net cash -flow analysis for simple investment 

57 PROF1ND Profitability index of a project 

56 CAP1 Cap. Asset Pr Model analysis of project 



136 • 80 Microcomputing, September 1980 



59 WACC Weighted average cost of capital 

60 COMPBAL True rate on loan with compensating bal. required 

6 1 DISCBAL True rate on discounted loan 

62 MERGANAL Merger analysis computations 

63 FIN RAT Financial ratios for a firm 

64 NPV Net present value of project 

65 PRJNDLAS Laspeyres price index 

66 PRINDPA Paasche price index 

67 SEASIND Constructs seasonal quantity indices for company 

68 TIMETR Time series analysis linear trend 

69 T1MEMOV Time series analysis moving average trend 

70 FUPRINF Future price estimation with inflation 

71 MAILPAC Mailing list system 

72 LETWRT Letter writing system links with MAILPAC 

73 SORT3 Sorts list of names 

74 LABEL 1 Shipping label maker 

75 LABEL2 Name label maker 

76 BUSBUD DOME business bookkeeping system 

77 TIMECLCK Computes weeks total hours from bmeclock info. 

78 ACCTPAY In memory accounts payable system storage permitted 

79 INVOICE Generate invoice on screen and print on printer 

80 INVENT2 In memory inventory control system 

8 1 TELDIR Computerized telephone directory 

82 TIMUSAN Time use analysis 

83 ASSIGN Use of assignment algorithm for optimal job assign 

84 ACCTREC In memory accounts receivable system-storage ok 

85 TERMSPAY Compares 3 methods of repayment of loans 

86 PAYNET Computes gross pay required for given net 

87 SELLPR Computes selling price for given after tax amount 

88 ARBCOMP Arbitrage computations 

89 DEPRSF Sinking fund depreciation 

90 UPSZONE Finds UPS zones from zip code 

91 ENVELOPE Types envelope including return address 

92 AUTOEXP Automobile expense analysis 

93 INSF1LE Insurance policy file 

94 PAYROLL2 In memory payroll system 

95 DILANAL Dilution analysis 

96 LOANAFFD Loan amount a borrower can afford 

97 RENTPRCH Purchase price for rental property 

98 SALELEAS Sale-leaseback analysis 

99 RRCONVBD Investor's rate of return on convertable bond 
100 PORTVAL9 Stock market portfolio storage-valuation program 



□ CASSETTE VERSION $ 99.95 
D DISKETTE VERSION $ 99.95 
D MODEL II VERSION $149.95 

ADD $2.00 FOR SHIPPING IN UPS AREAS 
ADO $3.00 FOR C.O.D. OR NON-UPS AREAS 
ADO $4.00 OUTSIDE U.S.A, CANADA & MEXICO 

•CQMRITRQNXCS": 



f**ATWBKA*T«UkL «/«\X>TD>4 



50 N. PASCACK ROAD 
SPRING VALLEY, NEW YORK 10977 




HOUB 
OA OBOEB 
C * LINE 

425-1535 




•CQMPLITRQNICSi Announces ...MOD-II 

WMJIMTA. APPV.CATONS SERVCE" 

running V° 
.nnouncem 



The Newsletter For Owners Of The 
TRS-M™* MODEL II MICROCOMPUTER 



1°\ for running v ° ur _ n d uP<*a teS SPECIAL CHARTER SUBSCRIPTION RATE $12.00 □ GFor 1% Issues] 

# Tips j« _. if , r cm« nIS 
9 Latest 

MOD-II PROGRAMS CURRENTLY AVAILABLE 

(1) ELECTRIC PENCIL (Michael Shrayer Software). ..Complete word processor with extensive editing and printer formatting features $275 

(STANDARD CP/M VERSION) $300 (DIABLO, NEC OR QUME CP/M VERSION) $325 (STANDARD TRSDOS VERSION) $350 

(DIABLO. NEC OR QUME TRSDOS VERSION). 

(2) GENERAL LEDGER, ACCOUNTS RECEIVABLE, ACCOUNTS PAYABLE, INVENTORY CONTROL AND PAYROLL (Small Business 
Systems Group). . works under TRSDOS ..can be used one module at a time or as a coordinated system $225 per module $995 for 
the complete system. 

(3) GENERAL LEDGER, ACCOUNTS RECEIVABLE. ACCOUNTS PAYABLE, INVENTORY CONTROL AND PAYROLL (Peachtree Software) 

requires CP/M and MICROSOFT BASIC, professional business systems turn key operation discounts available $1000 per module 
... $5000 for the complete system 

(4) SELECTOR III (Micro-Ap) complete data management system user defined fields and codes . manages any list defined by the user 

includes additional modules for simplified inventory control, accounts receivable and accounts payable requires CBASIC-2 and CP-'M 

$295 

(5) GLECTOR (Micro-Ap). add on package to the SELECTOR III general ledger that allows the user to define a customized chart of ac- 
counts . $250 

(6) GSF (Racet Computers) Generalized Subroutine Facility a series of super fast machine language utilities that can be called from a 

BASIC program (no machine language knowledge required) sorts 1000 items in under 5 seconds allows PEEK and POKE statements 

move data blocks compress and uncompress data... works under TRSDOS.. ..$50 

(7) DSM (Racet Computes) ... Disk Sort Merge sorts and merges large multiple diskette files on a 1 to 4 drive system NOT AN IN MEMORY 

SORT can actually alphabetize (or any other type or sort) 4 disk drives worth of data sorts one complete disk of information in 10 

minutes information is provided to use DSM with the RS MAILING PROGRAM works under TRSDOS $150 

(8) RSM (Small Systems Soft ware) a machine language monitor and disassembler can be used to see and modify memory or disk sectors 

contains all the commands found on the Model- 1 version plus some additional commands for the MOD-II works under TRSDOS $39 95 

(9) CP/M (Lifeboat Associates) an alternative operating system to TRSDOS that allows users to use hundreds of programs currently available 
to CP/M owners This is the only version of CP/M for the MOD-II that comes with an elementary CP M guide written especially for MOD-II 
owners $170 

(10) MICROSOFT BASIC (Microsoft) an enhanced version of the MICROSOFT BASIC found on TRSDOS . works under CP M adds 
commands such as chaining (allows the user to LOAD and RUN a new program without losing the variables currently in memory)., long 
variable length file records, WHILE/WEND and others ... can be used with the BASIC COMPILER to speed up programs (3-10 times faster 
execution) $350 

(11) CBASIC-2 a non-interactive BASIC used for many programs that run under CP M requires CP/M allows user to make more efficient 

use of disk files eliminates the use of the most line number references required for programs such as SELECTOR and GLECTOR $120 

(12) MAILING ADDRESS (Peachtree Software) requires CP/M. keeps track of name and address information and allows the selective 

printing of the information in the form of mailing lists or address labels unique key structure and formatting structure allows for a multitude 
of retrieval alternatives. ..$790. 

(13) PROPERTY MANAGEMENT (Peachtree Software) requires CP/M keeps track of all financial records related to property management 

$1500. 

(14) FORTRAN-80 (Microsoft) ANSI 66 (except for COMPLEX) plus many extensions requires CP/M $425 

(15) H A E COMPUTRONICS, INC. SHARE-A-PROGRAM DISKETTE #1 works under TRSDOS a collection of programs written by MOD-II 

owners programs include data base management ...a word processor mail system mortgage calculations checkbook register 

and many others $8 (add $3 postage outside of the United States, Canada and Mexico) FREE if you send us a diskette containing a 

program that can be added to the SHARE-A-PROGRAM DISKETTE 

(16) MEMOREX OR WABASH CERTIFIED DISKETTES $49 95 (per box of 10) 

(17) FLEXI-MATIC DISKETTE STORAGE TRAY Stores 110 diskettes comes complete with index-dividers, dust cover, tilt plates and 
adjustable spacing $55.00 

(18) WORD-STAR The ultimate word processor a menu driven word processing system that can be used with any printer All standard word 

processing commands are included plus many unique commands only found on WORD STAR requires CP/M $495 

(19) MAIL LIST MERGE An add on package that allows the user to send form letters (created on WORD-STAR) to any compiled mailing list 

(using any CP/M based MAIL program such as the PEACHTREE MAIL PROGRAM). ..requires CP/M, WORD STAR and any CP/M based 
mail program. ...$150. 

(20) EDITOR ASSEMBLER from Galactic Software Ltd. is the first user oriented Editor Assembler for the MODEL II and was designed to utilize all 
the features of the MODEL II. It includes innovative features for ease of coding and debugging and complete documentation (over 1 20 pages) 
works under TRSDOS. ..$229 

(21) MAIL/FILE SYSTEM from Galactic Software Ltd. stores 2,500 names per disk No sorting time is required since the file is automatically 
sorted by first and last name plus Zip Code on input Retrieve by any combination of 19 user codes Supports an 11 digit alphanumenca Zip 
Supports a message line Comes complete with user-oriented documentation (100-page manual) Allows for company name and individual 
of a company and complete phone number (and extensions) works under TRSDOS $199 



i" IS A TRADfMARk Of TANDY CORPORATION 

iCQMPmRQNICSi ^o do H ° u E R R <*» 1 E I™ 

~~ — ——•»* — \Q«BP\^q order «J%^ ORDER LINE 

50 N. PASCACK ROAD L-— —"""^ 
SPRING VALLEY, NEW YORK 10977 



LINE ^^W (OUTSIDE OF N.Y. STATE) 



(914) 425-1535 (800) 431-2818 

■ Reader Service-seepage 226 80 Microcomputing. September 1980 • 137 



TUTORIAL 



Self help routines for frustrated programmers, 



My Way 



Robert V. Meushaw 
4188 Brittany Dr. 
Ellicott City, MD 21043 



I'm sure that many of you have 
been faced with situations in 
which the program you were 
writing Just wouldn't perform to 
your expectations because of 
limitations which seemed be- 
yond your control. In some 
cases, processor speed or inef- 
ficient data storage techniques 
may limit your capabilities; but 
in almost every hopeless situa- 
tion I work on, I find that, with 
perseverance, there is always a 
better way. 

One of the most important 
lessons I have learned while pro- 
gramming is that you should 
use your computer to help you 
analyze and resolve your pro- 
gramming problems. 

I would like to describe sev- 
eral programming applications I 
have faced with my Level I 
TRS-80 and the approaches that 
I used to investigate such limita- 
tions. 

Problem One 

Computing vector magni- 
tudes when given the X and 
Y-coordinates (Fig. 1) requires a 



square root function that is un- 
fortunately not built-in to the 
Level I. Fortunately, the appen- 
dix of the Level I manual in- 
cludes a square root function 
(Listing I), but it performs much 
slower than I would have liked. 
Watching the results being 
printed, I can almost feel the 
burden of the routine. After this I 
begin to investigate how to im- 
prove the speed of my program. 

Looking at Listing 1, you can 
see that the routine makes suc- 
cessive approximations to the 
square root of X which even- 
tually converge (within the 
limits of the computer's ac- 
curacy) to the square root of X. 
The first approximation, Y, is 
taken as X/2. 

The value of W keeps track of 
the error in the approximation 
and whenever the error is zero 
or is the same as the previous 
iteration, the subroutine re- 
turns with Y as the square root 
of X. 

This seems fairly straightfor- 
ward, but, as you can see, there 
is really quite a lot going on in 
one iteration, which is reason 
enough for its lack of speed. 

Wondering how many itera- 
tions of such a routine are nec- 
essary to compute a square 
root, I decided to make some 
tests. 

The test program is shown in 
Listing 2. It generates random 



numbers to be input to the 
square root subroutine. Each 
time a new number is generat- 
ed, a counter is set to zero. 
Then the square root subroutine 
is called, and modified to incre- 
ment the counter with each 
iteration. 

When the subroutine returns, 
C contains the number of itera- 
tions necessary to compute the 
square root of X. The value of C 
is used to increment the array 
element A(C). 

Using this technique, the ar- 
ray element A(i) keeps count of 
the number of values of X which 
require iterations in the square 
root subroutine to return an an- 
swer. 

The first three lines in the 
program initialize the array 
elements to zero. Line 50 deter- 




mines the value of X. 

This line is not fully specified 
in the listing because I ran the 
program a number of times 
with different expressions for 
X. In each case the program ex- 
amines 15,000-20,000 values of 
X. This often requires several 
hours of run time. (On several 
occasions I let the test run over- 
night.) 

Usually, when a reasonable 
number of samples has been ex- 
amined, I interrupt the program 
and execute the routine begin- 
ning on line 2000 which displays 
the percentage of samples re- 
quiring iteration counts of one 
to one hundred. 

Some Interesting Results 

The program is first run with 
X = RND(0). This sets X equal to 



vector magnitude = \l a' + b' 



iaSTi 



Fig. 1 



138 • 80 Microcomputing, September 1980 



a random number between 
and 1. The resulting iterations 
are shown in Table 1. Beside 
each iteration value is its per- 
centage. 

We can see that 34.6 percent 
of the numbers require six itera- 
tions, 48 percent require seven 
iterations, and so on. The high- 



est number of iterations record- 
ed is fourteen, and no number 
requires five or less. 

Table 2 shows the results us- 
ing X = 1/RND(30000). The range 
of iterations is between seven 
and fourteen, with the largest 
percentage of the numbers re- 
quiring more than twelve 



30010 REN 'SQUARE ROOT* INPUT X, OUTPUT Y 

30020 REM ALSO USES « AND Z INTERNALLY 

30030 IF X«0 THEN Y«0: RET. 

30040 If X>0 THEN 300b0 

30050 PRINT "ROOT Of NEGATIVE NUMBER?": STOP 

30060 Y*X*.5l ZaO 

30070 •«CX/Y-Y)».5 

30080 IF (w=0) ♦ (HaZ) THEN RETURN 

30090 Ysttw: Z=w: GuTO 30070 

Listing 1. TRS-80 Level I manual square root subroutine 
(shorthand notation has been expanded). 



Table 3 shows the results of 
X = RND(30000). These results 
appear similar to those of Table 
2 except that the range of itera- 
tions is offset slightly. 

The last set of results, shown 
in Table 4, is the result of using 
X = RND(0)* 1 E10. 1 chose this to 
give some very large values for 
X. Again, the results appear 
similar to those in Table 2 with a 
larger offset than in Table 3. 

The Search Begins 

Now that I have a reasonable 
understanding of how the 
square root subroutine is work- 
ing, and why it is consuming so 
much time, the problem remains 
to find a technique to reduce the 
time. 



10 

20 

30 

40 

50 

60 

70 

80 

90 

100 

110 

120 

1000 
1010 
1020 
1030 
1040 

2000 
2010 
2020 
2030 
2040 
2050 
2060 



FUR 
All 
NEX 
J»l 
X«( 
C*0 
GOS 
ACC 
PHI 
J=J 
GUT 
END 



1=1 TU 100 
J=0 
T 1 

...one of several statements...) 

ub UOO 

)«ACCm 

NT J;" VALUES HAVE BEEN USEE" 

♦ 1 

SO 



Y*X».b: 2*0 
■«(X/t-f >'.5 

C*Ol 

IF l«a0) ♦ la=Z) THEN RET, 

Y=YtH: Za«| GOTO 1010 

T*0 

FUR 1=1 TU 100 

T*T+A(I) 

NEXT 1 

FOR K=l TU 100 

PRINT K, 10U»A(K)/T 

NcXl H. 



INITIALIZE ARRAY xHICh 

COUNTS NUMBER OF SAMPLE.*) 
FOP EACH ITERATION LOUNI 

J COUNTS NUMBER OF SAMPLEi 

PICK HANCUM VALUE FOR X 

INITIALIZE NUMBER OF ITERATIONS 

COMPUTE SQUARE KCU7 

UPDATE PROPER COUNTER 

PRINT NUMBER OF SAMPLES USED 

UPDATE SAMPLE COUNT 

KEEP GOING 



compute apphox. to so. rout 
compute error 
update iteration count 
if done, return 
elst ccmpute ne« approx. 

set tutal tu zero 

compute the sum 

of the number of samples 
fur all iteration counts 

set loop to print all 
iteration counts in 
percentage uf total 



Listing 2. Program used to investigate the operation of the square root subroutine. The program 
was run with the value of X in line 50 given asX = RND(0), X = 1IRND(300O0), X = RND(30OO0), and 
X = RND(0)'1E10. The program starting at line 2000, run after a sufficient number of samples 
were taken, prints the percentage of numbers for each iteration count. 



10 


FOR 1=1 TO 100 


20 


MJ)aU 


30 


NEXT 1 


40 


J>1 


50 


A>( .. .various expressions...) 


51 


Ba( ,. .various expressions...) 


60 


X»A»A*B»B 


70 


C»0 


80 


GOSUB 1000 


90 


A(C)«A(C)*1 


100 


PRINT J|" VALUES HAVE BEEN USED 


no 


J*J + 1 


120 


GUTO 50 


130 


END 


1000 


Y»A»B: Z»0 


1010 


N«(X/Y-Y)",5 


1020 


CaC»l 


1030 


IF C"=0) ♦ (W»Z) THEN RET. 


1040 


YsY + al 1-*'. G01U 1010 



INITIALIZE ARRAY WHICH COUNTS 
NUMBER OF SAMPLES FUR EACH 
ITERATION COUNT 

J COUNTS NUMBER OF ITERATIONS 

PICK RANDOM VALUES 
FOR A AND B 

COMPUTE SQUARE OF VECTOR NAG. 

INIT. NUMBER OF ITERATIONS 

COMPUTE SQUARE ROUT 

UPDATE PROPER COUNTER 

PRINT MESSAGE 

UPDATE SAMPLE COUNT 

KEEP GOING 



COMPUTE FIRST APPROX. 
COMPUTE ERROR 
UPDATE ITERATION COUNT 
IF DONE, RETURN 

ELSE MAKE NtN APPROX, 



Listing 3. Program used to compute the square root of X using the first approximation Y = A + B. 



My first thought is to investi- 
gate other methods of comput- 
ing the square root. One tech- 
nique, which often yields good 
results, is a power series ap- 
proximation. These approxima- 
tions are used in calculating 
many functions including sine, 
cosine, natural log and other 
functions. The advantage of 
such a technique is the elimina- 
tion of the numerous iterations 
the computation requires— thus 
saving time. 

Since it has been many years 
since I encountered such ap- 
proximation techniques, I find 
myself digging out college 
books, which I had hoped never 
to see again. Though it was not 
as clear to me now how a Taylor 
Series or Maclaurin Series 
approximation works, I even- 
tually convinced myself that 
there is no simple expansion 
which I can use. 

As is clear from Tables 1-4, 
larger numbers require more 
iterations to compute the 
square root. Part of the reason 
for this is that the first ap- 
proximation to the square root 
is taken as X/2, which becomes 
a worse approximation as X in- 
creases or decreases. Again, I 
consider a power series approx- 
imation such as: 

IF(X< = 10)THEN Y = X/2 

IF (X>10) AND (X< = 100) THEN Y = XM 

IF (X>100) AND (X< = 1000) THEN Y = X/20 

I experiment with several vari- 
ations of this form, but none 
yield a significant reduction in 
the number of iterations. 

A Glimmer of Light 

Finally, I realize that I need to 
look for a solution to my specific 
application and not a general 
one. 

Looking back at Fig. 1, I 
notice that I am not trying to find 
the square root of just any num- 
ber, I am trying to find the length 
of the hypotenuse of a right tri- 
angle—knowing the length of 
each side! 

Eureka! ! I have found the first 
approximation— the sum of the 
lengths of the sides of the tri- 
angle (i.e., A + B). 

My next task is to determine 
how good my approximation 
method really is. Listing 3 
shows the program which I used 



80 Microcomputing, September 1980 • 139 




Foster Rnd More efficient Than: 

• TRSDOS 

• NOUDOS + 

• VTOS 

DOSPLUS Uses less memory and still offers all the com- 
mands of the other major operating systems. AND some 
innovative and useful features of our own design. 
DOSPLUS is now available for the TRS - 80*Model I. II, and III 

UBRRAY OF COMMANDS: 



APPEND 


RTTRIB 


AUTO 


eoor 


BUILD 


CieFlR 


CLOCK 


COPV 


CAEflTC 


DRT€ 


D€BUG 


Device 


DIR 


DO 


DUMP 


FORMS 


Ffl€€ 


KILL 


LIB 


LIST 


LORD 


PRUS€ 


PROT 


R€NflM€ 


RS232 


TIM€ 


TRRCC 


V€RIFV 






BUILT IN KRTURCS: 


UTUITICS: 







AUTOMATIC LOW€RCAS€ 
SCR€€N PRINT€fl 
K€VBOARD D€BOUNC€ 
fl€P€ATING K€VBOARD 



COPV 1 

R€STOR€ >rXAD Rl€S 

DISK DUMP, CMD 

FORMAT 



rRANSKFi 

PUflGC 

Cl€AflAL€ 

B«CK UP 



N€UJ FROM 
MICRO-SVSTCMSM 

Master Diskette Directory Ver 1 .0 - 

This program will read the directories of up to 160 disk- 
ettes or 5000 files! Insert your diskette in the drive, press 
enter, and it works automatically to reod, store, and 
cotegorize your files. No more looking through box after box 
of diskettes looking for those favorite programs that ore 
"Around Here Somewhere". Vou con get a listing of oil the 
files on oil the diskettes. In addition, you con list them by file 
extension, diskette number, or program category. With mas- 
ter directory, you need never again worry about the frustra- 
tion of not being able to locate a particular program. Master 
directory will search for a particular file name and give you 
every occurence of that file, its size, and the diskette number 
that contains it. 

fl totally self contained, machine language program on a 
self-booting diskette; master directory will work equally 
well on single or multiple drive systems. 



DOSPLUS— $99.95 



MASTER DIRECTORY— $29.95 



Pleose Contact: 
Micro Systems Software Inc. 
5846Funston Street 
Hollywood, Florida 33023 
1 (305)983 3390 



• 384 



CSSjjj i^wSn 



Coming Soon: Dosplus 4.0 for 10 - Megabyte TRS 80s* 



rfls 8C v 



NUMBER OF ITERATIONS % OF NUMBERS TESTED 



<=5 





6 


346 


7 


48 


B 


13 


e 


3.3 


10 


87 


11 


16 


12 


C56 


13 


01 


M 


004 


> = 15 






Table 1. Distribution of square root iteration counts for 
X = RND(0). 



NUMBER OF ITERATIONS 



% OF NUMBERS TESTED 



<=6 





7 


03 


8 


.04 


■i 


.33 


10 


1.2 


11 


5.4 


12 


19.3 


13 


47 8 


14 


25 9 


= 15 






Table 2. Distribution of square root iteration counts for 
X = 1IRND(30000). 



NUMBER OF ITERATIONS % OF NUMBERS TESTED 



< = 3 





4 


.004 


5 


.02 


6 


.076 


7 


.3 


■" 


1.15 


B 


485 


1IJ 


19 


11 


47 4 


12 


27.2 


> = 13 






Table 3. Distribution of square root iteration counts for 
X = RND(30000). 



NUMBER OF ITERATIONS 



% OF NUMBERS TESTED 



< = 14 





15 


.05 


18 


.17 


17 


95 


18 


3.51 


19 


14.12 


m 


47 1 


21 


34.1 


^ = 22 






Table 4. Distribution of square root iteration counts for 
X = RND(0)'1E10. 



: ITERATIOh 


S % OF NUMBERS TESTEO 


< = 2 





3 


1.1 


4 


13 


S 


52 3 


t> 


33.6 


> = 7 






Table 5. Distribution of square root iteration counts using 
A = RND(0) and B = RND(0) and modified first approxima- 
tion. 



to generate the lengths of each 
side of the right triangle and the 
number whose square root I 
needed. As in the previous set of 
test cases, program statements 
50 and 51 are incomplete be- 
cause I used four sets of values 
to test the same conditions as 
before. 

The program is first run using 
A = RND(0) and B = RND(0). The 
value of X is computed as (A*A 
+ B*B). Table 5 shows the re- 
sult of using the new first ap- 
proximation for the square root. 

Compared with Table 1, the 
number of iterations is signifi- 
cantly reduced. In this case, 
most numbers require five or 
fewer iterations whereas Table 1 
shows that most numbers re- 
quire seven or more iterations. 

Table 6 shows the results of 
the new approximation when 
A = RND(3000) and B = RND 
(30000). Notice that the results 
are remarkably similar to those 
obtained in Table 5. 

Table 7 shows the results ob- 
tained using A = 1/RND(30000) 
and B = 1/RND(30000), and 
Table 8 shows the results ob- 
tained using A = RND(0)*1E10 
and B = RND(0)*1E10. 

I am astounded that the re- 
sults obtained using the new ap- 
proximation are almost identi- 
cal in the four cases that I 
tested. I noticed two other Im- 
portant facts. Most of the num- 



bers required five or six itera- 
tions, and also no numbers 
more than six iterations. 

This second fact is most im- 
portant since it tells me that I 
can construct a new square root 
routine eliminating the logical 
tests necessary to determine 
completion of the routine. 

Referring to Listing 1, 1 can re- 
move line 30080 by changing the 
basic structure of the routine to 

"The savings in 

storage 

amounts to 

about 25 bytes, 

which is 
enough to give 

me the 
breathing room 

I need." 

a FOR-NEXT loop using six 
iterations. Listing 4 gives the re- 
sulting square root routine, a 
faster version. 

It seems wasteful to perform 
six iterations when some num- 
bers require less, but looking at 
the statistics of Tables 5-8 you 
can see that 85 percent of the 
numbers require five or six itera- 
tions. Therefore, the instances 
of inefficiency are small. 



NUMBER OF ITERATIONS 



% OF NUMBERS TESTED 



2 





3 


1 i 


4 


12.7 


5 


52 1 


6 


34.1 


7 






Table 6. Distribution of square root iteration counts using 
A = RND(30000) and B = RND(30000) and modified first ap- 
proximation. 



NUMBER OF ITERATIONS % OF NUMBERS TESTED 



1 





2 


01 


3 


.96 


4 


13.16 


5 


51 6 


6 


34.27 


> = 7 






Table 7. Distribution of square root iteration counts using 
A = 1/RND(3000) and B = RND(30000) and modified first ap- 
proximation. 



MARK GORDON 

COMPUTERS 

DIVISION OF MARK GORDON ASSOCIATES, INC. ^™> 
16 KENWOOD ST. CAMBRIDGE, MASSACHUSETTS 021 N 
(61 7) 242-274* (617) 491 7505 

COMPUTERS 

Level-ll 4K System 529.00 

Level-ll 1 6K System 659. OO 

Model-ll 64K System 3499.00 

DISK DRIVES 

40 Track 5'/» Inch drive J 19.00 

77 Track 5'/* Inch drive 549.00 

4 Disk Drive Cable 39.00 

PRINTERS 

Centronics 730 899.00 

Centronics 779-2 999.00 

Comprint 9 1 2p 599.00 

Integral Data 440C 999.00 

NEC 5510 w-tractor 2679.00 

Tl 810 Basic 1895.00 

MISC HARDWARE 

Expansion int. TRS-80(Ok) 249.00 

Novation Cat modem 1 59.00 

1 6K Memory Kit 49.00 

Leedex Monitor 109.00 

Printer Cable for above 49.00 

ISO-2 Isolator 54.00 

AC LINE FILTER 24.00 

STORAGE MEDIA 

Verbatim-box 1 0- 5 '/« 25.00 

Memorex-box IO-5'/« 22.00 

Plastic Storage Box 5.00 

OPERATING SYSTEMS 

NEWDOS by APPARAT INC 49.00 

NEWDOS ♦ by APPARAT INC 99.00 

MMS FORTH DISKETTE-PRIMER 64.95 

DISKETTE TRS-80* 
BUSINESS SOFTWARE BY SBSG 

Free enhancements and upgrades to registered owners for 
the cost of media and mailing. 30 day free telephone sup- 
port. User reference on request. 
Fully Interactive Accounting Package. General Ledger. 

Accounts Payable. Accounts Receivable and Payroll. 

Report Generating. 

Complete Package (requires 3 or 4 drives) $475.00 

Individual Modules (requires 2 or 3 drives) $125.00 

Inventory II: (requires 2 or 3 drives) | 99.00 

Mailing List Name &. Address II 

(requires 2 drives) $129.00 

Intelligent Terminal System ST 80 III: $ 1 50.00 

The Electric Pencil from Michael Shrayer $ 1 50.00 

File Management System-. $ 49.00 



FINE PRINT 

TRS-SO is • Tandy Corporation trademark. Um ol above operating ays- 
terns may require tha use ol Radio Shack TRS-DOS. Radio Shack 
equipment subject to the will and whim of Radio Shack 

ORDERING INFORMATION 

We accept Visa and Masiercharge We will ship COD certified check 
or money orders only Massachusetts residents add 5 percent sales 
tax. 

The Company cannot be labia tor ptctortel or typographical toaccuradee. 



^Reader Service— see page 22G 



80 Microcomputing, September 1980 • 141 



Now that I am over the major 
hurdle, I want to make my com- 
putations even more efficient. 
My primary target is the paren- 
theses which appear in line 120 
of Listing 4. 

I first experiment with alter- 
nate methods of writing the ap- 
proximation equations. Fig. 2 
shows some of the equation de- 
rivations. The first equation 
shows the value of the second 
approximation to the square 
root of X. In this equation, Y2 is 
the second approximation and 
Y1 is the first. As you can see, Y2 
can be simply computed from 
Y1. 

Continuing to the next ap- 
proximation, Y3 is simply ex- 
pressed in terms of Y2. In equa- 
tion 3, the substitution is made 
for Y2. This equation reveals 
something very interesting. If 



we assign the value of (Y1 + 
X/Y1) to Z, then two successive 
approximations can be simply 
computed using the equations 
Shown in Fig. 3. 

The fact that we have con- 
densed two approximations into 
this set of equations allows us 
to rewrite the square root rou- 
tine as shown in Listing 5. 
Notice that only 3 iterations of 
the FOR-NEXT loop are required 
and that the parentheses are no 
longer included. 

My final modification to in- 
crease the speed of the routine 
is shown in Listing 6. Here, the 
FOR-NEXT loop is replaced with 
three sets of equations which 
compute six approximations. 
This straight line coding re- 
quires more bytes of storage 
than the previous routine, but is 
slightly faster. 



Listing 7 is a test of the 
various modifications which I 
have developed. It times them. 
Five subroutines are used for 
the various tests. The first sub- 
routine is an immediate RE- 
TURN. I use this to determine 
how much time the main routine 
requires. 

The four other routines are 
the normal square root routines 
from the Level I manual: the nor- 
mal routine, using a modified 



first approximation and a FOR- 
NEXT loop, the routine using the 
modified approximation equa- 
tion, and the routine using the 
straight line coding of the ap- 



Z = Y -i X/Y 
Y = 2/4 + X/Z 

Fig. 3. Equations which com- 
bine two successive approx- 
imations to the square root of 
X. 



I U- Y -)-M=*") 



Y3 = Y2 + 



2 * Y2 



1 ( * -Y2) = 1 ( * + Y2) 

1 [ " -( " * Y1 )] 

2 1 ( X ♦ Yl) 2 V Y1 ,J 



2 Yl 

x 1 / .- 



(:*") 



Y1 * Y1 



Yl 



Fig. 2. Equations for the second and third approximations to 
the square root of X. 



too 


YsA + B 


110 


FOR Ml TO 6 


120 


W=CX/Y-X ) ». b 


130 


YsY+W 


140 


NEXT K 


150 


RET. 



COMPUTE APPKOX. TO SO. HI, 
SfcT LOCP FOR SIX ITERATIONS 
COMPUTE ERROR 
COMPUTE Nfc* APPR0X. 
LOOP 



Listing 4. Modified square root routine using first approx- 
imation and FOR-NEXT loop. 



COMPUTF APPROX. TO SO. RT. 
SET LOCP FCR THREE ITERATIONS 
COMPUTF TuC APPROXIMATIONS 
USING MUD1F1EU EQUATIONS 
LOOP 



Listing 5. Revised square root routine using new first ap- 
proximation and combined approximation equations. Note 
that only three loop iterations are required. 



100 


Y=A*R 


no 


FOR K*l TO 3 


120 


Z*Y*X/Y 


130 


Y»Z/4 ♦ X/Z 


140 


NEXT K 


150 


RET. 



100 


Y = A + B 


no 


Z«Y*X/Y 


120 


ysz/4 ♦ 


no 


Z«Y*X/Y 


140 


Y«Z/4 ♦ 


ISO 


Z«Y*X/Y 


160 


Y«Z/4 ♦ 


170 


RET. 



X/Z 



X/Z 



X/Z 



CGMPU1* APPKOX. TO SO. RT, 
USING THREE SETS OF 
M0DIF1EU E0UATI0NS TO 
COMPUTE SIX 
APPRCXIMATIONS 



Listing 6. Final square root routine which eliminates FOR- 
NEXT loop to maximize speed. 



WHAT IS "THE PATCH"? 



We asked ourselves; WHY should our 
computer be as bland as everybody else's? 
Why not unlock the unused and wasted abili- 
ties available within each and every TRS-80 
Model 1. These abilities allow the display to 
be dressed up and the computer to be effec- 
tively easier to use. 

Now we have developed the means for get- 
ting the most from our computers and we 
know you need it too. With "THE PATCH", 
a new age of simplicity and convenience has 
arrived. You don't want to be left out, so 
don't kid yourself, you need the enhance- 
ments which "THE PATCH" provides. 

• Doei your keylxiard bounce? 

Some say, "I have n software fix for 
that!" 

• Does vour display still have that stand- 
ard, dull, underline cursor? 

Some brag, "We have a program which 
will give you a Block cursor, and it even 
blinks!!" 

• Does your Dualcase printer make you 
look foolish when you tell it to print lower- 
case because you could only see UPPERcase 
on the display? 



Most cry, "We have a kit you can in- 
stall . . . and a program to run it!!!" 

• Don't you have better uses for protected 
memory than to waste it on programs which 
are TOTALLY UNNECESSARY? 

You sob, "I need all those advantages but 
they are just too much trouble to have all at 
once so I'll make do with what I have. 

FORGET ALL THAT . . . make your 
life easier 

What we are trying to tell you is: 

1. You CAN have Keyboard delwmnce if 
you need it! 

2. You CAN have Block cursor with NO 
distracting blinking! 

3. You CAN have FULL TIME Dualcase 
display! 

4. You CAN have typewriter style key- 
board operation! 

5. You CAN have faster cassette data 
files, up to four and one-half times 
faster! 

6. You CAN have even more features as 
we make them available. 



•THE PATCH", S69 97 plus V 'j0 ship and kind 
Optmns Block cursor N/C. Denounce N/C 

Cassette File $10 00 
VISA or Mjster Cud accepted 



..I .t T.in.K ( ,., 
1 1 t.I. i,i irk <.t < i;< 



All this from THE INSTANT you power 
up your computer, without making your 
other programs unusable because some un- 
nccessary driver program is eating that mem- 
ory. 

"THE PATCH" is not a ROM. "THE 
PATCH" is not a PROM. "THE PATCH" 
is a microprocessor which modifies the 
Level II ROM to repair changes made 
by TANDY when they designed your compu- 
ter. This state-of-the-art technology makes 
these changes possible without using ANY 
of your computer's memory, That means, 
any program you use on your computer 
now, will still work after you install "THE 
PATCH", including word processors. 

"THE PATCH" fits easily into the Level 
II ROM sockets inside your computer, no 
tahles or switches to install. 

Sound too good to be true?? Call us. Tell 
us your innermost fears. Let us answer your 
questions. Do not cheat yourself out of using 
ALL of your computer's abilities ALL of 
the time. 



( A 1. 1 2<i.H-K.H:'s-(>o| 1 

WRITE <K< 1>\I "THE l\K II 

R<>\ HWi 

\1..s,ow II) SJM ! 



COMPUTER PAPER 

AND LABELS 



9% x 11 
(8%x11 Detached) 



$21.95 



1 PART BLANK 
3,000 to Box 

(Add $2.00 Shipping) 



14 7/8 x 11 
(Same Detached) 



$26.95 




VISA 



6S5 
MESCALERO 



15/16 X 3% 

1 Across $9.95/5M - 2 Across $19.95/10M 

^ 293 ST. LOUIS. MO 
63031 

TOLL FREE 600 325-6907 IN MISSOURI: 314-831-3535 



■ M.r.m-jHf.rei 




UTILITY SOFTWARE 1 ^MARIGOtHsSOCIATES^ 

■ P. 0. BOX 20822 ^156 

FuR iR^-^J USERS ■ HOUSTON, TEXAS 77025 

NOW AVAILABLE FOR THE TRS-80 . BASIC SEARCH AND REPLACE 
NEWCMD adds FOUR new command words to your LEVEL II BASIC Language: 

CHANGE Changes BASIC line numbers from one number to another, and reorders BASIC 

text accordingly. 
DUPLICATE. . . Duplicates a BASIC line at another location without retyping. 
SEARCH Searches the resident BASIC program for every occurrence of a specified 

ASCII character string from to 240 characters long, and screenprlnts each 

line containing those characters. 
REPLACE Searches the entire BASIC program as above, then replaces the specified 

ASCII string with another string of your choice which can be from to 24.0 

characters long. Replace all PRINT'S with LPRINT's, remove blank spaces, 

etc.. Changes take place on the screen and In the program while you watch. 
IN ADDITION the command "LIST" Is modified to allow variable speed forward and backward 

scrolling. 

NEWCMD is a 1200 byte machine language program. Available on cassette tape for LEVEL II, lhK 
TRS-80 machines at $14.95 plus SI. 50 postage and handling (foreign orders SI. 00 P4H). Texas resi- 
dents please add 90c tax. Sorry, no credit cards. 



TRS-80* SOFTWARE! THE BEST 



THE DATA ORGANIZER 



"Variable length records *Max 20 field per record 

64 K Mod II $250.00 32 K Mod I $150.00 

MAGAZINE DISTRIBUTION PROGRAM 

• 500 titles • Invoices • 200 Vendors • Reports 

64 K Mod II $750.00 
AMBULANCE BILLING SYSTEM 

• 100 Calls/month • Reports unpaid, medicare • Tracks cars/drivers 

64 K Mod II $750.00 

DEALER OF TARANTO & ASSOCIATES MODEL II SOFTWARE 

A/RG/LP/R each $249.00 

All programs error free and fully documented. User tested. 

Client list available. Custom programming/consulting for TRS-80*. 

CMS, INC. 31 32 N. BROADWAY, CHICAGO, IL 60657 
(312)327-7550 ^393 

_TA trademark of Tandy ^"t 



."Wiisn'f kuiit (K a day 1 . 




IUTK Main*, dut, inltia 
-ompaie two block! or eearc* 
Punch, load, verify, 01 ■>•» 
lump. Dlaplay and modify rag 
tltil tap* (in a bonua proqran 



DUIlt a 1 
MSKMOO 



I/O 



3lBaaseM;le 7B1 



■•, an') i^odify data in "»ii 
1 24 byt. nrx or ASCII etr 
I tapee. Sat breeVpoints 
Output to printar If dam , 
1 i*e>rovrea EDTASHII. 1 or 
BASIC without loaa of eource fill. Al,o 
llow d«hounce, aenat drivara, etc. (U-48M 



teva.1 II t/C Mock, 
DOS required) 



• ■ 



o video, pt 

■ ,1 . . . 

Uy. 



• n . 



alio 



"AC80 diak tarn. (i;> 
MORE BOOKS 

and complete 




Fuller Software 

_. 630 E SprraUe — 

•ml Pre»» I)f ?5(J5 ' M 



•»AMCtor S9n/tce—se» page 226 



in Both -.ASIC 

chine lanquage. Pre 

inq POM f 

are ahown and aolved, Ekpa 

;'SP, relocate BASIC program 

re BASIC variabl 



and 



-Ji— N* 



■ ... 



Ji«.»5 plul SI, 00 poi 



1 >| 



A computer game that has drawn 

the attention of the national 

news media. 

A computer game that has people 
around the world clamoring for it. 

A computer game that turns your 

love life into a menage a trois... 
you, your mate, and your computer! 



That's Interlude-the hottest new 
software program for personal 
computers. 

But it's more than just a game. 
It's an experience that will tantalize 
you . . . romanticize you . . . fantasize 
you. ..and often surprise you. 

Interlude begins with a unique 
computer interview of the partici- 
pants to determine their mood. 
Then it searches its memory to 
select the best Interlude for the 
occasion. You may be referred to 
the instruction manual which de- 
scribes most of the 106 Interludes, 
or your instructions may appear 
on your screen if you've chanced 
to hit upon one of the many sur- 
prise Interludes buried within the 
program. (When you discover 
secret Interlude #99, your love life 
may never be the same again!) 

Interlude... it's fun. ..it's fanciful... 
it's fantastic. It's the computer game 
for adults. Are you ready for it? 

Interlude 

The Ultimate Experience . 



INTERLUDE Dept 80 10428 Westpark. Hous- 
ton. TX 77042. Rush me my copy of Interlude. 



Name 



Address 

City 

: ] Apple 



State 



Age 



Zip 



I6K) ; TRS-80" (Level II- 
16K) n s 14.95 'or cassette [ ; $ 17.93 for 
diskette Add (1.50 for shipping. Texas 
residents add 6% sales tax. 

i * My check (payable to Interlude) is enclosed. 

Charge my [ ] Mastercharge Q Visa 

Account No 

Expiration Date 

MasterCharge Bank Code 

Signature- 



(Charge customers must sign.) 

CHARGE CUSTOMERS: Order by phone toll- 
free! 1-800-327-9009 Ext. 306 (FLA: 
1 -800-432-7999. Ext. 306) 287 

•Registered trademark ot Apple Computers, Inc 
"Registered trademark ot Radio Shack, a Tandy Co 

AVAILABLE FOR IMMEDIATE DELIVERY. 



80 Microcomputing, September 1980 • 143 



proximation equations. 

The results of the test are 
shown in Table 9. After subtract- 
ing the five second time of the 
main routine from the individual 
test times, the subroutine times 
can be compared. Execution 
speed is cut by a factor of more 
than eleven in going from the 
normal square root routine to 
my final specialized version. An 
improvement of this magnitude 
makes the work involved seem 



well worth the trouble. 

Problem 2 

The second example I want to 
discuss involves an application 
in which my primary concern is 
program space and accuracy. 
Because of the limits of the 
TRS-80 to slightly more than 
3500 bytes of usable storage, 
some programs can become 
pretty cramped. 

My problem is to construct an 



array which contains values of 
sin(X) over a range of to n/2 (i.e., 
0°-90°). As in the case of the 
square root function, Level I 
BASIC does not contain the sine 
function. So, again I turn to the 
Level I manual's sine function 
subroutine. This routine is 
shown in Listing 8. 

The basic sine routine calcu- 
lation Is performed using a 
power series approximation. 
Many mathematics text books 



10 FOR I«l TO 100 

20 A=RND( 30000 ) ; BsRND ( 30000 ) 

JO X«A*A * B*B 

40 G05UB 100 

SO NEXT I 

60 PRINT "TIMING TEST COMPLETED' 

70 END 



SET LOOP FOR 100 ITERATIONS 

PICK VALUES TOR A AND B 

COMPUTE SQUARE OF VECTOR MAC, 

COMPUTE SQUARE ROOT 

LOOP 

PRINT MSG. WHEN DONE 



Listing 7. Program used to test the efficiency of the various square root subroutines. 



30370 REM »SIN* INPUT X IN DEGREES, CUTPUT I 

30371 REM ALSO USES Z INTERNALLY 
30376 Z*AbS(X)/A: X*Z*X 

30380 IF X>360 THEN X=X/3o0: X« ( X-INI (X) )»360 

30390 IF A>90 THEN X«X/90« Y«INT(X)1 X»(X-Y)»90l ON Y COT0 

30410, 30420, 30430 

30400 X«X/57.29S78l IF ABS(X}<2 .4861E-4 THEN Y»0l RET. 

30405 GOTO 30440 

30410 X«90-X| GOTO 30400 

30420 X'-Xi GOTO 30400 

30430 XsX-90: GOTO 30400 

30440 Y*X-X»X»X/6*X»X«X*X»X/120-X»X»X»X»X»X«X/5040 

30450 Y«Y*X»X»X»X»X»X»X»X*X/362B80l IF Z«-l THEN Y»-Y 

30460 RET. 

Listing 8. TRS-80 Level I manual sine function subroutine. 



IS SET TO FIRST TERM IN P»R. SERIES 

Y 18 SUM OF PO«ER SERIES TERMS 

SET LOCP 10 USE TERNS UP TO X**9 

CONFUTE NEXT PWR . SERIES TERM 

ADD 1ERM TO SUM 

LOOf 



Listing 9. Modified sine routine. The statements of this routine could be used to replace the 
power series expression on lines 30440 and 30450 of Listing 8. 



100 


o=x 


no 


Y«X 


liO 


FUR J=3 10 V :>TtP 2 


130 


Q«-U » X/J •X/(J-1) 


140 


YsY*0 


150 


NEX1 J 


160 


RETURN 



10 


FOR lsO TO J2 


SET LOOP FOR 32 SINE VALUES 


20 


X=1.570/9o3 • 1/32 


X IS INPUT (0<«X<= /2) 


30 


T = X 


SAVE X 


40 


n=9: GuSuB loOu 


COMPUTE SUUARE ROOT 


50 


AU)»I 


SAVE ANSWER 


60 


X«l 


RESIORF. X 


70 


Mill GO*Ub 1000 


CUMPUTE NEW SQUARE ROOT 


80 


A(2)*l 


SAVE ANSWER 


90 


PKINT A(1),A(2) 


PRINT RESULTS 


100 


1* A(l)OA(2) P. "DIFFERENT"^ 


. PKINT MSG. IF VALUES DIFFERENT 


110 


NEXT I 


LOOP 


120 


END 




1000 


= X 


COMPUTE SINE OF X 


1010 


Y»X 


USING THE HIGHEST 


10 20 


FOR Js3 TO N STEP 2 


POWER TERM SPECIFIED 


1030 


Qs-0 * X/J ♦XZ(J-l) 


BY THE CALLING 


1040 


Y*Y*0 


ROUTINE 


1050 


NEXT J 




1060 


RET. 





Listing 10. Program used to test the effect upon SIN(X) of different power series approxima- 
tions. 



will show that sin(X) can be ex- 
pressed as the infinite series: 

Sio(X) = X - (X"3>/6! + (X"5y5! - 
(X**7V7! ♦ (X"9V9! 

In the case of listing 8, the 
power series is computed using 
terms up toX**9. 

The Approach 

When it becomes apparent 
that I need a few more bytes of 
storage for data, I examine the 
sine subroutine to see how 
many bytes I can squeeze out. 

Computing the terms of the 
power series seems fairly repeti- 
tive and they seem to lend them- 
selves to a FOR-NEXT loop. 
After several tries, I arrive at the 
routine shown in Listing 9. 

The variable Q generates the 
terms of the power series. Each 
successive value of Q is com- 
puted by multiplying the pre- 
vious value by -X** 2 and divid- 
ing by the product of O, the loop 
index and (J-1). The variable Y 
keeps a running sum of the 
power series terms. 

The savings in terms of 
storage amounts to about 25 
bytes, which is enough to give 
me the breathing room I need. In 
fact, more savings are possible 
if unnecessary lines in the re- 
sulting sine routine are elimi- 
nated. 

There is an added benefit to 
the modified sine routine. It is 
very simple and costs nothing in 
terms of storage, to obtain more 
accuracy. All that is necessary 
is to replace the nine in line 120 
of Listing 9 with the value of the 
highest power term desired in 
the approximation. For exam- 
ple, 15 can be used. 

The Final Test 

Just to satisfy my curiosity, I 
decide to try the routine with 
more terms. I first try using 1 1 as 
the highest power term. The test 
routine is shown in Listing 10. It 
uses the parameter N to specify 
for the sine routine the highest 
power term in the approxima- 
tion. 

For each value of X, the sine 
routine is called twice — once 
using terms up to X * * 9 and once 
using terms up to X**11. The 
values obtained using each ap- 
proximation are printed, and In 



144 • 80 Microcomputing, September 1980 



NUMBER OF ITERATIONS 

< = 2 

3 
4 
5 
6 
> = 7 



% OF NUMBERS TESTED 



1 

13.5 
51.3 
34.2 





Table 8. Distribution of square root iteration counts using 
A = RND(0)'1E10 and B = RND(0)'1E10 and modified first 
approximation. 



SUBROUTINE USED 


TOTAL TIME 


TOTAL ! 


UBROUT 


Immediate RETURN 


5 sec. 




— 


Normal square root 


107 sec. 




102 sec. 


Listing 4 routine 


26 sec. 




21 sec. 


Listing 5 routine 


16 sec. 




11 sec. 


Listing 6 routine 


14 sec. 




9 sec. 



Table 9. Execution times of the various square root routines. 



addition the two values are com- 
pared and a message is printed 
when the values are different. 

The results of this test are 
both interesting and confusing. 
The approximation using the 
X**11 term is more accurate, as 
I had hoped. However, some re- 
sults which appear to be the 
same when printed, produce a 
message which says that they 
are different. 

I took this to mean that the in- 
ternal binary representations of 
the values are slightly different. 
A portion of the results of the 
test is shown in Table 10. The 
confusing part of the results ap- 
pears in the last computed 
value. The printed value dis- 
plays 1.0000008, which contains 
more digits than I have ever 
been able to print for a number 
(the normal number of digits is 
six). 

Next, I try adding another 
term to the power series ap- 
proximation (i.e., (X**13)/13!) 



but it produces no further im- 
provement in accuracy. 

Aside from these few puzzling 
occurrences, which I have yet to 
fully resolve, the results of my 
experiments are successful. I 
have achieved a savings in pro- 
gram space and an increase in 
accuracy. 

The Moral 

I hope that the two examples 
that I have presented will 
encourage you to find new and 
better ways to program routines 
in your applications. Don't as- 
sume that the method someone 
else uses is necessarily the best 
way for you. I'm sure that you 
too will discover that finding a 
better way is perhaps one of the 
most rewarding aspects of pro- 
gramming. 

Most important of all, how- 
ever, remember to make use of 
all your resources— including 
your computer— to improve 
your work. ■ 



for the TRS-80 from Micro -IVlega 



VALUE OF SIN(X) 


VALUE OF SIN(X) 


TEST 


USING X"9 TERM 


USING X"11 TERM 


RESULT 


.903989 


.903898 


different 


.92388 


.92388 


different 


.941544 


.941544 


different 


.956941 


.956941 


different 


.970032 


.970031 


different 


.980786 


.980785 


different 


.995186 


.995185 


different 


.998798 


.998795 


different 


1 


1.0000008 


different 


Table 10. Partial 


isting of results from test program shown 


In Listing 10. Note that some values are not equal in a logical 


equivalence test 


even though the printed values are the 


samB. 







CASSETTE CONTROL UNIT 



• Speed up your cassette tap* handling • Pinpoint program locations on tap* with an audi 

Dia monitor • Q»t protection from recording and playback glitches resulting from ground 

loop* 9 Eliminate the tadioua plugging and unplugging ot recorder cables 

The Micro Mega Cassette Control Unit does all th,s and more You get instant manual con 

tro'oi the recorder at the Hick ot a switch Want to tmd the beginning or end ot a program' 1 

Flic* another switch end you'll hear it All cables remain plugged m an trie time 

The MicroMege Cassette Control Unit does a lot to improve the appearance ot your TRS 80 

system, too As shown, it's m a 2"/ ' x 5" bou which snug gies between the keyboard and 

your recorder There is no need to move the recorder, end all cables come neatly into the 

unit. The Cassette Control Unit is tailored to the CTR-at recorder, but may be used with moi 

other recorders as wen 



CASSETTE CONTROL UNIT. 

Add $1.00 for postage and handling 




$37.95 



CPU MONITOR 



recorder volume setting It you 



Ever find yourself with a blank screen wondering what your computer is up fo' The MicroMege Monitor can tell you. tor example 
e> It your CPU ia in a loop with not exit. • When a long sort is nearmg completion, or 9 it a key bounces during keyboard input The 
CPU Monitor lets you listen to all CSAVEs and CLOADs and will help you quickly lind the cor 
have an expansion interface, you will always know whether the realtime dock is on or oft 
because you can hemr it 

The Micro Vega CPU Monitor grves a voice to the Z-80 microprocessor m your TRS80 by us- 
ing AM radio circuitry to pK* up the computational rhythms of the CPU. which are amplified 
and played through a loudspeaker The pickup unit ot the CPU Monitor, shown at left in the 
photo, goes under your TRS-80 keyboard it it connected by a 36" cable to the speaker and 
control unit, which includes an on/otl volume control and an LED "power-on'' indicator The 
Monitor is powered by an AC adapter, shown at right m the photo No batteries are needed and 
TRS40 are required 

By listening to the CPU Monitor, you will soon become femitier with the personeiit>es of the programs you 
are executing in a normal way iSee "Qammg Environment' below , 




n and whether they 



CPU MONITOR 

Add $2.00 lor postage and handling 



$47.95 



THE ORIGINAL GREEN-SCREEN 




$73.95 



The eyepieaung Green Screen fits over the CRT ot your TRS-80 Video Display end gives you 
improved contrast with reduced glare You get bright, luminous green characters and 
graphics like those featured by very expensive CRT unrtt 

The Qreen Screen is closely matched to the color and texture of the TRS-80 Video Display 
and improves the overall appearance ot your system It is attached with adhesive strips. 
which do not mar your display unit in any way The Micro Mega Qreen Screen gives improved 
video display visibility tor all applications and is espciaily effective in creating dramatic. 
high impact displays tor computer games /See "Qammg Environment" below i 

THE GREEN-SCREEN 

Add $1.00 for postage and handling 



THE ULTIMATE STAR TREK PACKAGE 



Tired ol trivial computer gemei 7 This complete Star Tr** package wilt provide you with endless fascination and challenge in addi- 
tion to the program cassette, it includes comprehensive instructions, a pad of "Voyage Log" record sheets, and e tree-standing 
"Torpedo and Maneuvering Chart " 

The peckage is built around the latest version ot Lance Mickius ' incomparable Star Trek ill. a 
13.000 byte program with a host ot subtle and imaginative features which include numerous 
dynamic and spectacular graphic displays Star Tree ill puts you m command o> the Enterprise 
cruising m a galaxy of 192 quadrants tilled with uncharted hazards, including hostile Klmgons. 
pulsars, and black holes You have at your disposal scanners, various weapons and defense 



systems, onboard computers, and a loyal crew lYou will need them an to survive the 

Klmgons I 

Your mission is io rid the region of Klmgons and to locate five inhabitable planets, an within 

300 sterdays. before returning to Star Fleet Headquarters where your overall effectiveness as a 

starship commander will be scored High scroes are possible only with ceretui planning and et 

lectne battle tectics The Voyage Log sheets will guide your strategy, and the Torpedo and Maneuvering Chart' will give you a 

vital edge m combat iWhen you engage three Klmgon ships you can't afford to miss I 

STAR TREK PACKAGE (for Level II. 16Konly) $22.95 

Add $1.00 for postage and handling 

CREATE YOUR OWN SPECTACULAR 
GAMING ENVIRONMENT (and save S5.00) 

The Enterprise is m battle trim with deflector shields at full power As her captain, you are raxing her into combat The battle- 
stations siren rings m your ears and CONDITION RED "fleshes on your monitor screen You call for warp drive and key in the coor 
dinates ot the quadrant where your scanners have detected Klmgon ships As you select the warp factor, you hear the reassuring 
clicking ol your navagational gear as it activates the warp drive 

Suddenly, you break outot hyperspece and your monitor displays the chilling sight ot three Klmgon Battle Cruisers floating on your 
screen' Their evil shapes glow m luminous green against the bfac* void ot space Moments later, you haer the characteristic raso- 
mg sound of Klmgon laser weapons, and. as you watch, n^h energy beams come *mling toward the Enterprise in succession trom 
each of the Klmgon ships 

You have been hit' You hear the dismal sound ol the damage control alarm as "DAMAGE TO WARP DRIVE" and "DAMAGE TO 
PHASERS " flash on your screen The Klmgons have slopped tiring' The Enterprise is crippled, but your best weapon is still intact. 
and it's your turn now' You key in the command lor photon torpedoes As your screen again displays the position of the Klmgon 
ships you select a tiring vector irom your torpedo chert and key it m Now you heer the buzz of your photon torpedo as you see it 
speeding toward a Klmgon ship it strikes him doad<eoter' As you watch, the Klmgon Battle Cruiser disintegrates, accompanied 
by a satisfying crackling sound 

Does the above scenario sound tar fetched' 1 Not at all it's a small sample ot what you will experience with Micro Mega 's Gaming 
Environment, which consists ot • The STAR TREK PACKAGE • The GREEN SCREEN and • The CPU MONITOR The test paced 
and dynamic action reflects the superb Star Trek III program together with the Voyage log ' and "Torpedo Chart" of the Star Trek 
Package Ail of the unique graphic displays are greatly enhanced by the Green Screen Finally, the uncanny sound effects are pro- 
duced by the CPU Monitor, which taithtuiry pKks up the FOR NEXT loops and other CPU patterns, which create the distinctive 
siren sounds that accompany the ALERT end DAMAGE messages along with the hersher notes of the weapons salvos Once 
you've tried it, you won't any longer be satisfied with silent computer games 

Remember that with the Gaming Environment you also get all of the other excellent features ot the CPU Monitor and the Green 
Screen tor non gaming applications You also save 15 00 oft the combined cost ot the individual items 



GAMING ENVIRONMENT. 

Add $3.50 for postage and handling 



$79.85 



Terms: Check or money order, no CODs or credit cards, please Add amount 
shown lor postage and handling to price of the item. All items shipped within 48 
hours by first class or priority mail. Virginia residents, add 4% sales tax. 
^29 



Micro -Mega • P.O. Box 6265 ■ Arlington, Va 22206 



*■ Reader Service— see page 226 



80 Microcomputing, September 1980 • 145 



UTILITY 



Article storage and retrieval made easy. 



Reference Library Index 



James P. Morgan 
238&B Ash Creek 
Scott A FB, I L 62225 



Tired of wading through a 
foot-high stack of computer 
publications looking for a speci- 
fic article? Why not let your 
computer do it for you? 

Better yet, put your micro to 
work building a cross-index of 
your entire inventory of comput- 
er publications— past, present 
and future. 

The following program pro- 
vides a system of cataloging, 



storing and retrieving specific 
articles from your library. It is 
designed for the TRS-80 Level II 
with 16K. 

Program Details 

The program begins with a 
menu. They are as follows: A— 
instructions, B— retrieve list 
from internal data, C— read tape 
file and list and D— create data 
file on tape. Selection is made 
from the keyboard using IN- 
KEY$ (lines 1 10 to 150). An error 
trap is located at line 150. 

The instructions provide gen- 
eral information about the pro- 
gram. 

The retrieve list from internal 
data option first prints the in- 
dexing format (Table 1) called 



SYSTEM CATEGORY 

1 . HARDWARE 2. SOFTWARE 



3. LANGUAGE 



1. TRS-80 1. INTERFACE 1. BUSINESS 1. BASIC 

2 KIM 2. CASSETTE 2. HOME 2. MACHINE 

3. PET 3. DISK 3. GAMES 3. FORTRAN 

4. APPLE 4. PRINTERS 4. GRAPHICS 4. PASCAL 

5. HEATH 5. DISPLAYS 5. EDUCATIONAL 5. GENERAL 
6.SWTP 6. I/O 6. GENERAL 

7. ALTAIR 7. KEYBOAROS 

8. ELF 8. SYNTHESIZERS 

9. GENERAL 9. GENERAL 

The user first enters the system number, then one of the three categories, and 
finally the specific topic from the category selected. If a complete listing of all ar- 
ticles lor a given system is required, enter a when asked to input the category. 

Table 1 



from subroutine 1000. 

Next, the program asks for 
three inputs, used to retrieve se- 
lected articles from an internal 
data source beginning at line 
3000. Enter the system number, 
the category number and the 
topic number in turn. These 
three codes are compared to 
each READ execution at line 250 
for a positive match. If all three 
match the data provided, the ar- 
ticle is printed by line 260. 

By entering a at line 190, the 
user can select all the articles 
pertaining to a specific system. 
This is accomplished at line 245 
which branches directly to the 
PRINT line at 260. 

A paging routine using the 
variable D as a counter is provid- 
ed by lines 220, 260 and 270 
through 300. The advantage of 
retrieving data from internal 
storage is speed; its disadvan- 
tage is the memory overhead re- 
quired. I have listed a sample 
block of data starting at line 
3000 which pertains to my own 
particular interests. A more 
comprehensive, although appre- 
ciably slower, option is dis- 
cussed in the next paragraph. 

The C option, "read tape file 
and list," allows the user to se- 
lect and list articles from tape 
storage. The listing begins at 
line 440 and runs through line 
660. This routine is essentially 



the same as the internal option, 
but uses a tape file to provide 
data. 

Once again, the indexing 
scheme is presented via subrou- 
tine 1000. The user enters the 
system, category and topic 
numbers that select articles at 
line 540. 

If the user selects in re- 
sponse to the category input, 
the program provides a com- 
plete listing of all articles filed 
under a specific system. Paging 
is provided at lines 560-580. An 
escape option is found at line 
585 which allows the user to re- 
turn to the menu during the pag- 
ing routine. 

Although this method of data 
storage is not as fast as an inter- 
nal data bank, it is fast enough 
to scan an entire file of Micro- 
computing articles for a year's 
period in about 20 minutes. I've 
spent about twice that time dig- 
ging out an article of interest 
from past issues, so the pro- 
gram results in definite time sav- 
ings. 

The final option is the routine 
that creates a tape data file. As 
with the rest of the program, it is 
self prompting. This segment 
begins at line 2000 and ends at 
line 2160. The indexing scheme 
is presented prior to input so 
you can assign index values to a 
given article. 



146 • 80 Microcomputing, September 1980 



I found it very easy to load 
data using the table of contents 
of most magazines. Once I had 
loaded my entire library of publi- 
cations, It only required about 
ten minutes to write each new 
issue's articles to tape storage. 



Other modifications could be 
made to include disk storage in 
place of cassettes and line or 
screen printer options. As writ- 
ten, it should prove a more than 
adequate method of cross-in- 
dexing for the TRS-80 owner. ■ 



22! 

231 



Program Listing 

10 REM **• ARTICLE INDEXER *** 
20 REM *** BY JAMES p. »ORGAN SEP 79 •** 
30 REM *** POR TRS-80 LEVEL ii , 16K ••• 
40 CLS:CLEAR 200 

50 REM **• POKE STATEMENT FOR REVISION G, TRS-80 *«* 

60 POKE 16553,255 

70 PRINT020, "COMPUTER ARTICLE CROSS INDEXER" : PRINT 

80 PRINT'SELECT YOUR OPTION FROM THE FOLLOWING LIST. JU 

ST 
90 PRINT" PRESS THE KEY CORRESPONDING TO YOUR CHOICE. ":P 

RINT 
100 PRINT"A»INSTRUCTIONS","B-RETRIVE LIST FROM INTERNAL 

DATA" 
105 PRINT"C-READ TAPE FILE AND LIST" , "D-CREATE DATA FIL 

E ON TAPE" 
110 BS-INKEY$:IF BS-"" THEN 110 
120 IF B$«"A" THEN 1200 
130 IF BS-"B" THEN 170 
140 IF BS-"C" THEN 440 
145 IF BS-"D" THEN 160 
150 CLS:PRINT"i DON'T UNDERSTAND. SELECT A,B,C,OR D.":G 

OTO 80 
160 GOTO 2000 

170 RESTORE :CLS:GOSUB 1000 
180 PRINT: INPUT'ENTER SYSTEM »";A1 
190 INPUT"ENTER CATEGORY I. ENTER ' ' TO SEE ALL SYSTEM 

ARTICLES." »B1 
195 IF Bl-0 THEN 220 
200 INPUT'ENTER TOPIC I"|C1 
210 REM *** READ AND PRINT DATA **• 

D-0sCLS: PRINT020, "SELECTED ARTICLES" : PRINT 
READ A,B,C,A$ 
240 IF A-0 THEN 310 
245 IF A-Al AND Bl-0 THEN 260 

250 IF A-Al AND B-Bl AND C-Cl THEN 260 ELSE 230 
260 PRINTA$:D*D+1 
270 IF D-12 THEN 280 ELSE 230 

280 PRINT'PRESS ANY KEY WHEN FINISHED WITH THIS PAGE." 
290 BS-INKEYS: IF B$»"" THEN 290 
300 GOTO 220 
310 RESTORE: PRINT: PRINT "OUT OF DATA. TYPE 'A' FOR NEW L 

1ST, 'B 1 TO INPUT ADDITIONAL 
320 PRINT'DATA FROM TAPE, OR 'C TO EXIT PROGRAM." 
330 B$-INKEY$:IF BS-"" THEN 330 
340 IF B$-"A" THEN 170 
350 IF B$-"B" THEN 450 
360 IF BS-"C" THEN 1500 

370 CLS:PRINT"I DON'T UNDERSTAND. TRY AGAIN. ":GOTO 310 
440 PRINT"PREPARE RECORDER FOR DATA INPUT. ": FORX-1TO150 

0:NEXT 
450 CLStGOSUB 1000 

460 PRINT: INPUT'ENTER SYSTEM »";A1 
470 INPUT "ENTER CATEGORY ♦. ENTER 

M ARTICLES" >B1 
475 IF Bl-0 THEN 510 
480 INPUT "ENTER TOPIC «">C1 
490 CLS 

510 CLS :D-0:PRINTe20, "SELECTED ARTICLES" : PRINT 
520 INPUTI-1, A,B,C,A$ 
530 IF A-0 THEN 600 
535 IF Bl-0 AND Al-A THEN 550 

540 IF A-Al AND B-Bl AND C-Cl THEN 550 ELSE 520 
550 PRINTAS :D-D+1 
560 IF D-ll THEN 570 ELSE 520 
570 PRINT: PRINT "HIT 'E' TO ESCAPE. HIT ANY KEY WHEN FIN 

ISHED WITH THIS PAGE." 
580 BS-INKEYS: IFB$-"" THEN 580 
585 IF B$-"E" THEN 40 
590 GOTO 510 
600 PRINT'OUT OF DATA. TYPE 'A' FOR NEW LIST, 'B' TO IN 

PUT ADDITIONAL 
610 PRINT'DATA FROM ANOTHER TAPE, OR 'C TO EXIT PROGRA 

M." 
620 B$-INKEY$:IF BS-"" THEN 620 
630 IF B$-"A" THEN 450 
640 IF B$-"B" THEN 500 
650 IF BS-"C" THEN 1500 
660 CLS: PRINT'i DON'T 
1000 CLS: PRINT "SYSTEM 

T 
1010 PRINTTAB(16) "1. HARDWARE" , "2 . SOFTWARE" , "3 . LANGUA 

GE" 
1020 PRINT STRINGS(60,"-") 
1030 PRINT'l. TRS-80", "1. INTERFACE" , "1 . BUSINESS" , "1 . 

BASIC" 



'0' TO SEE ALL SYSTE 



UNDERSTAND, TRY AGAIN." :GOTO 60 
CATEGORY ":PRIN 



1040 
1050 
1060 

1070 

1080 
1090 
1100 
1110 
1120 
1200 
1210 

1220 

1230 

1240 

1250 

1260 

1270 

1280 

1290 

1300 

1310 
1320 
1330 
1340 
1500 
2000 
2010 
2020 
2040 

2050 

2055 
2060 

2061 

2062 
2064 
2068 
2070 
2080 
2090 

2100 

2110 
2120 
2130 

2140 
2150 
2160 
3000 
3010 
3020 
3030 

3040 

3050 

3060 

307 

3080 

3090 

3100 

3110 
3120 

3130 

3140 

3150 
3160 
3170 
3180 
3190 
3200 

3210 

3220 
3230 



PRINT"2. KIM", "2. CASSETTE" , "2. HOME", "2. MACHINE" 

PRINT"3. PET", "3. DISC", "3. GAMES", "3. FORTRAN" 

PRINT"4. APPLE", "4. PRINTERS" , "4 . GRAPHICS' , '4 . PA 

SCAL" 

PRINT'S. HEATH", "5. DISPLAYS" , "5 . EDUCATIONAL" , "5 . 

GENERAL" 
PRINT"6. SWPT","6. i/o","6. GENERAL" 
PRINT"7. ALTAIR","7. KEYBOARDS' 
PRINT'8. ELF", "8. SYNTHESIZERS" 
PRINT"9. GENERAL", "9. GENERAL" 
RETURN 

REM *** INSTRUCTIONS ••* 

CLS: PRINT "THIS PROGRAM PROVIDES YOU WITH H METHOD 
OF STORING AND 

PRINT'RETRIVING SELECTED ARTICLES FROM YOUR REFERE 
NCE LIBRARY. 
PRINT'YOU CAN STORE DATA INTERNALLY, CREATE A TAPE 

DATA FILE, AND 
PRINT'SEARCH A TAPE FILE FOR SPECIFIC ARTICLES. TH 
E KEY TO THE 

PRINT'PROGRAM KS AN INDEXING SYSTEM WHICH CATEGORI 
ZES THE ARTICLES 

PRINT'SYSTEMATICALLY. iOTERNAL DATA CAN BE STORED 
FROM LINE 

PRINT'3000 ON. IT IS LIMITED ONLY BY THE MEMORY AV 
AILABLE. THE 

PRINT'TAPE STORAGE METHOD IS UNLIMITED IN SPACE, B 
UT IS A SLOWER 

PRINT "METHOD OF EXTRACTING DATA. THE PROGRAM IS SE 
LF-PROMPTING 

PRINT'THROUGHOUT. JUST POLLOW THE DIRECTIONS AND Y 
OU SHOULD HAVE 

PRINT'NO TROUBLE CATELOGING YOUR ENTIRE LIBRARY." 
PRINT:PRINT"PRESS ANY KEY TO RETURN TO THE MENU." 
B$-INKEYS:IF BS-"THEN 1330 
CLS:GOTO70 
CLS : END 

REM **« CASSETTE DATA WRITE *** 
CLS: PRINT "CASSETTE DATA WRITE": PRINT 
PRINT"PREPARE CASSETTE AND TAPE FOR RECORDING." 
PRINT :PRINT"ENTER SYSTEM I, CATEGORY #, TOPIC #, A 
ND ARTICLE TITLE, 

PRINT "PUBLICATION, DATE, AND PAGE. THE ENTIRE ARTI 
CLE MUST BE 
PRINT "ENCLOSED IN QUO 

PRINT'MARK THE END OF A TAPE WITH A SERIES OF ZERO 
S.* 

PRINT"TYPE AN 'E' TO LEAVE THE WRITE ROUTINE. HIT 
ANY KEY TO CONTINUE." 
BS-INKEYS: IFBS«""THEN 2062 
IF BS-"E" THEN 2130 
CLS:GOSUB 1000 
PRINT: INPUT'SYSTEM l"jA 
IF A-0 THEN 2130 

INPUT'CATEGORY, TOPIC ♦. SEPARATE WITH A COMMA" ;B, 
C 
INPUT'TITLE, PUBLICATION, ISSUE, AND PAGE4--ALL IN 

QUOTES" J AS 
PRINTI-1, A,B,C,A$ 
CLS: GOTO 2068 

CLS: PR I NT "DATA WRITE COMPLETE. NOTE TAPE COUNTER A 
ND LOG IN." 

PRINT'HIT ANY KEY TO RETURN TO THE MENU." 
BS-INKEY$: IF B$-""THEN 2150 
CLS:GOT0 70 

DATA 1,2,1, "INVENTORY, TRS-80, KB; FEB 79, P 64" 
DATA 9, 2, 2, "SIMPLER INTEREST, KB, FEB 7 9, P 116" 
DATA 9,2,1, "SIMPLER INTEREST, KB, FEB 79, P 116" 
DATA 1,2,3, "KEYBOARD INTERRUPT-TRS 80, KB, MAR 7 9, 

P. 128" 
DATA 1,1, 9, "A LOOK AT 80 PERIPHERALS, KB, APR 79. 
P. 22" 

DATA 1,2,3, "FREE SPEACH LESSONS, 80, KB, APR 79, P. 
66" 

DATA 1,1,2, "TWIN CASSETTES FOR 80, KB, APR 79. P. 
84" 



KB, APR 79, P. 1 



P. 



P. 



DATA 1,2,6, "A LOOK INSIDE THE 8 

20" 

DATA 1,2,1, "A TRS-80 CROSS INDEX, KB, MAY 79, 

4" 

DATA 1,2, 4, "GRAPHING WITH THE 80, KB, MAY 79, 

00" 

DATA 1,1, 4, '80 SELECTRIC WORD PROCESSOR, KB, JUN 7 

9, P. 32" 

DATA 1,2,3, "S ARGON MEETS 80, KB, JUL 79, P. 58" 

DATA 1,2,4, "GETTING THE MOST OUT OF 80, KB, JUL 7 9 

, P. 112" 

DATA 1,1, 2, "TELEPRINTER OUTPUT FOR 80, KB, AUG 79, 

P. 38" 
DATA 1,3,2, "MACHINE LANG MONITOR FOR 80, KB, AUG 79 
,P.114" 

DATA 1,1,9,"TRS SPEED UP, KB, SEP 79, P. 138" 
DATA 9,2,3, "SUPER MASTER MIND, KB, FEB 79, P. 100" 
DATA 9,2,3, "CHESS PAWN, KB, MAR 79, P. 76" 
DATA 9,2,3, "TWO DIAMONDS, KB, APR 79, P. 115" 
DATA 9, 2, 3, "A GAME OF DARTS, KB, MAY 79, P. 78" 
DATA 9 , 2 , 4 , "VECTOR GRAPHING TECH. KB, JUN 79, P. 6 
4" 

DATA 9, 2, 4, 'A CIRCULAR HANDLE ON GRAPHICS, KB, JUL 
79, P. 76" 

DATA 9, 2, 3, "NERVES, KB, AUG 79, P. 100" 
DATA 0,0,0,*0" 



80 Microcomputing, September 1980 "147 

Scanned by Ira Goldklang - www.trs80.com 



CAI/E / add-ons for TRS-80® 
^rW t/ Soffwore and Hardwc 






ncwuuoou 

A new enhonced NEWDOS for the TRS-60. 

The most powerful Disk Operating. System for the Tr\S-60 
designed for the sophisticated user and professional program- 
mer who demands the ultimate 

NEVDOS/80 is the plonned upgrade from NEWDOS 2 1 
Some of the features are 

• New DASIC commands for files with variable record 
lengths up to 4095 

• Mix or match drives Use 35. 40 or 80 track 5" disk 
drives or 8" disk dnves. or combo. 

• Security boot up for BASIC or mochine code applica- 
tion programs 

• New editing commands 

• Enhanced RENUMber that ollows relocation 

• Commond chaining 

• Device handling for routing to display ond printer 
simultaneously 

• DFG function, striking of D Fond G keys allows user to 
enter a mini-DOS without disturbing program 

• Compatible with NEV/DOS G TRSDOS 

• Morhme languoge Superzap/80 2 1 $A yf Q 

nd enhonced debug ond copy 

NEW 
TF-8 60 TfUCK DISK DRIVE %jl oa 

Double Ycur Copociry OO/ 

TF-9 DUAL 60 TRACK DISK DRIVE $7QO 

Quadruple ^our Copociry / ww 



Disk Drive Sale! 

Complete with power vjppV ond chassis 

TF-3 Shugorr SA400 $359 

Pertec FD200 40 trock S369 

F5MPI051 40rrod< $379 

TF 7 Mict opohs 7 7 track $ 5 9 5 

TDH- 1 Duol Sided drive 35 frock $499 

NEWDOS* 

40 frock >1 10 35 frock $99 

MicroconducTor Dato Dose Mgr 

Modi $249 Mod H $399 

AJA rjusiness Pgk $209 

Disk Head Cleaner $16.95 

Disk Alignment Rg $ 1 09 



Drives for any Microcomputer 

Does not include power supply & cabinet. 
Pertec FD200 $282 FD250 1399 

Shugorr SA400 $279 SA800/801 $479 

MP! 051 $279 052 $349 



Printers 

Centronic 779 $1,069 

Dose 2 $599 

Centronic 737 $899 

Cenrrania 702 9 $1,695 

Anadex950l $1,595 

McJto $2 495 




jpinwriter 



$2,549 



Apparatlnc. 



(303) 741-177* 
/3I0 fc Pr»nc«ton Av • D«nv«. CO »0237 • (303) 7&i-7275 

AM prices cash dbcounted/F 







FACTORY 

CLEARANCE 



Demo single or duol heod MPI disc 
drive complete with Power Supply 
ond Chassis Full warranty 

TF5D40TK *279 

TDH-1DDuoI35TK *41 9 
limited quantities 



[Announcing 
8" Floppy Disk Drive System 



for Model I 




• One 5A801 Floppy 

• NEWDOS 80 

• Coble (j Adopter 

M095 

Disk Expansion System 




• 2 Shugorr SA400 TF-3 

• 1 Two- Drive Coble 

• 1 Expansion Interface 32K 

• 1 3>rracK DOS+ 
TOTAL LIST PRICE 



S718 
$ 25 
S489 
$ 99 
S1331 



SPECIAL PRICE ONLY 



$1,199 



Some os above bur 

includes TRS-80 * „ , _ _ „ 

Duol II $1984 

MOD II 6" Disk System 

• 1 Dnve Sysrem $899 

• 2 Drive Exponsion S. )l,OW 

More Savings 

-» ^ Introductory Offer— 

Sove 1250 TRS-oO 
Graphics Okidoro 
Microlme 80 . . 
List W49 

Our Price 



-J 



$ 699 



Memory Kir (16K) 


$64.00 


AC Isoloror (6 socker) 


$47.95 


Modem 


$164.00 


Diskettes (10) 


$30.00 



«t 



/MCROCOW0TB? — 

TECHNOLOGY nsM 

NCOBPO&ATED '» Kt2 



TX67&40 
TAD-INN 



• Santa Ana. CA 92704 • [714} 979 9923 

Ask for our free catalog. 




Apparat. Inc., announces the most 
powerful Disk Operating System for the 
TRS-80®. It has been designed for the 
sophisticated user and professional 
programmer who demands the ultimate 
in disk operating systems. 

NEWDOS/80 is not meant to replace 
the present version of NEWDOS 2.1 
which satisfies most users, but is a 
carefully planned upward enhance- 
ment, which significantly extends 
NEWDOS 2.1*8 capabilities. This new 
member to the Apparat NEWDOS' 
family is upward compatible with 
present NEWDOS 2.1 and is supplied 
on Diskette, complete with enhanced 
NEWDOS + utility programs and 
documentation. Some of the 
NEWDOS/80 features are: 

• New BASIC commands that 
supports files with variable record 
lengths up to 4095 Bytes long. 

• Mix or match disk drives. Supports 
any track count from 18 to 80. Use 



35, 40 or 77 track 5" mini disks drives 
or 8" disk drives, oranycombination. 

• A security boot-up for BASIC or 
machine code application programs. 
User never sees "DOS READY" or 
">READY" and is unable to 
"BREAK", clear screen, or issue 
any direct BASIC statement 
including "LIST". 

• New editing commands that allow 
program lines to bedeleted from one 
location and moved to another or to 
allow the duplication of a program 
line with the deletion of the original. 

• Enhanced and improved 
RENUMBER that allows relocation 
of subroutines. 

• Powerful chaining commands. 

• Print Spooler. 

• DFG function; simultaneousstriking 
of the D, F and G keys will allow 
the user to enter a mini-DOS 

to perform some DOS commands 
without disturbing the resident 
program, (e.g. dir while in scripsit.) 



• Upward compatible with NEWDOS 
2.1 and TRSDOS 2.3. 

• Includes machine language 
Superzap/80 and all Apparat 2.1 
utilities. 

• Enter debug any time by pressing 
123 keys. Also allows disk I/O. 

• Diskette "Purge" command. 

• Specifiable system options (limited 
sysgen type commands). 

• Increased directory capacity. 

• Copy by file commands. 

NEWDOS/80 with all of the 
NEWDOS * utility programs, many of 
which have been enhanced, is priced at 
just $149.00 and is available at most 
TRS-80 dealers. 

As with 2.1, NEWDOS/80 relies on 
the TRSDOS and Disk Basic Reference 
Manual published by Radio Shack. 
NEWDOS/80 documentation supports 
its enhancements and upgrades only. 



^264 





Apparat, Inc. 



EA 



/MlCROCQr41PUrER 

TECHNOLOGY 
INCORPORATED ^ 



TO PURCHASE NEWDOS/80, COMPLETE AND MAIL TO: 

Apparat, Inc. Microcomputer Technology, I nc. 



4401 S. Tamarac Parkway 
Denver, CO 80237 
303/758-7275 303/741-1778 

D Money Order 



3304 W. MacArthur Blvd. 
Santa Ana, CA 92704 
714/979-9923 



□ Master Charge □ Visa 
Expiration Date 
Cal residents add 6% sales tax 



a Check 

Card No 

Colo residents add 6 5% sales ta> 

Add S 10 00 postage and handling 

Please rush NEWDOS/80 (o> $149 EACH TO 



Name 




*- Reader Service— see page 226 



80 Microcomputing, September 1980 • 149 



UTILITY 



Professionalize your program titles. 



Position Display 



Jerry Frost 

3398 Sir Henry Street 

East Point, GA 30344 



Taking the lead from James J. 
Brennan, whose "Digital 
Time Clock" program appeared 
in the "Little Bits" column of 
Kilobaud in the January 1979 
issue, I have written a subrou- 



Program Listing 



SUBROUTINE - VERSION 1.3 



30000 
30010 
30020 
30030 
30040 
30050 



30060 " 
30070 ' 
30080 REM ** SUBROUTINE LINES TO LEFT AND RIGHT JUSTIFY 



30090 REM 



<AS> AT 13 DIFFERENT SCREEN POSITIONS 



30100 ' 

30110 ' 

30120 ' JUSTIFY <AS> AND DISPLAY AT SCREEN POSITION 64 

30130 ' 

30140 P=32-LEN(AS)/2+64:TH=0:BH=8:LV-32-LEN(AS)/2:RV»32 

+LEN ( A$ )/ 2+6 4 :GOSUB30900:PRINT5P,A$;: RETURN 
30150 ' 

30160 ' JUSTIFY <AS> AND DISPLAY AT SCREEN POSITION 128 
30170 • 
30180 P«32-LEN(A$)/2+128:TH=3:BH=ll:LV=32-LEN(AS)/2:RV= 

32+LEN(AS)/2+6 4:GOSUB3090 0:PRINT0P,AS; : RETURN 
30190 ' 

30200 ' JUSTIFY <AS> AND DISPLAY AT SCREEN POSITION 192 
30210 ' 
30 220 P-32-LEN (A3 1/2 + 192 :TH»6:BH-14: LV=32-LEN(A$ 1/2: RV« 

3 2+LEN (AS)/ 2+64 :GOSUB30900:PRINT0P,A$;: RETURN 
30230 ' 

30240 ' JUSTIFY <A$> AND DISPLAY AT SCREEN POSITION 256 
30250 ' 
30 26 P=32-LEN(A$)/2+256:TH=9:BH=17:LV=32-LEN(AS)/2:RV= 

32 + LEN( AS 1/2+64 :GOSUB30900:PRINTPP, AS;: RETURN 
30270 ' 

30280 ' JUSTIFY <AS> AND DISPLAY AT SCREEN POSITION 320 
30290 ' 
30300 P-32-LEN(A$)/2+320:TH=12:BH«20:LV=32-LEN(AS)/2:RV 

= 32 + LEN ( AS 1/2 + 6 4 :GOSUB3090 : PRINTPP, AS;: RETURN 
30310 ' 

30320 ' JUSTIFY <AS> AND DISPLAY AT SCREEN POSITION 384 
30330 ' 
30 340 P=32-LEN(A$)/2+3 84:TH=15:BH=23:LV=32-LEN(A$)/2:RV 

=32+LEN (A$)/2+6 4:GOSUB30900:PRINT@P,A$; : RETURN 
30350 ' 
30360 ' JUSTIFY <AS> AND DISPLAY AT SCREEN POSITION 448 

(SCREEN CENTER) 
30370 ■ 

30 3 80 P-32-LEN(AS)/2+44 8:TH-18:BH-26:LV-32-LEN(AS)/2:RV 
-32+LEN(AS)/2+6 4:GOSUB3090 0:PRINT0P,AS;:RETURN 



tine for the TRS-80. I call it 
POSDIS, an acronym for Posi- 
tion Display. It is useful and 
saves time. 

POSDIS will let you: display a 
title in your program or have a 
message stand out from the rest 
of the text; to left and right 
justify the title; to position it on 
the screen by a PRINT® state- 
ment; and finally, to graphically 
draw a border around it. 

Type the Program 

To show you the advantages 
of POSDIS, and to let the sub- 
routine speak for itself, type in 
the routine (see Program Listing 
1), SAVE it, and type the follow- 
ing program: 



10 CLS 

20 A$ = "THISIS WHERE YOUR 

MESSAGE GOES" 
30 GOSUB 30380 
40 GOTO 40 



Now, RUN the program. 
Notice that your message is 
automatically left and right 
justified, a graphic border is 
drawn around it for a stand-out 
effect, and the whole thing is 
displayed at the center of the 
screen. In a couple of seconds 
you have a nice looking display 
heading. 

Here is what happened. First, 
you defined GOSUB A$ as "This 
is where your message goes." 
Then you decided you wanted 
the message to appear at the 
center of the screen, so you 
entered GOSUB 30380, which is 
the routine that transported the 



message, justified it, sent it to 
line 30900 to calculate the 
graphic border and drew it 
before returning to the next line 
in your program (in this case line 
40). 

Suppose you want the mes- 
sage at the top of the screen. 
Just retype line 30 GOSUB 
30140. If you want the message 
at the bottom of the screen, re- 
type line 30 GOSUB 30620. Try it 
and see what happens. 

The subroutine at lines 30140 
through 30620 will print your 
message at 13 different screen 
display positions and must fol- 
low your A$ message as shown 
in the sample program. 

Three Subroutines 

Three other subroutines have 
been added. Two timing loop 
series for an automatic effect, 
and a routine, which will hold 
the display until the keyboard 
operator presses ENTER. 

For example, retype line 40 
GOSUB 30680. Run the program 
and notice that the message ap- 
pears with "PRESS ENTER TO 
CONTINUE" added to the bot- 
tom of the screen. 

If you want an automatic ef- 
fect, retype line 40 GOSUB 
30820 and add line 50 A$ = 
"THIS IS WHERE A SECOND 
MESSAGE GOES" : GOSUB 
30380 : GOSUB 30680. 

By using various screen dis- 
play positions, timing loops, 
and PRESS ENTER TO CON- 
TINUE your next program will 
have a professional look, ease 
of operation and simplicity.! 



150 • 80 Microcomputing, September 1980 



36396 
36466 
36416 
30426 

36430 
30440 
30450 
30466 

30470 
30480 
30490 
30S00 

30510 
30520 
30530 
30540 

30550 
30560 
30570 
30580 

1 

30590 
30606 
30610 
30620 



1 JUSTIFY <AS> AND DISPLAY AT SCREEN POSITION 512 

P=32-LEN(A$)/2+512:TH«21:BH«29:LV=32-LEN(AS)/2:RV 
32 + LEN(AS)/2 + 6 4:GOSUB3090 0: PRINTS, AS;: RETURN 

* JUSTIFY <AS> AND DISPLAY AT SCREEN POSITION 576 

P«32-LEN(AS)/2+576:TH=24:BH=32:LV-32-LEN(AS)/2:RV 
32 + LF.N(AS)/2+6 4:GOSUB36960:PRINT9P,AS; : RETURN 

' JUSTIFY <A$> AND DISPLAY AT SCREEN POSITION 640 

P-32-LEN(AS)/2+6 40:TH-27:BH-35:LV-32-LEN(AS)/2:RV 
02+LEN ( AS)/ 2+64 :GOSUB30900 : PRINTPP, AS;: RETURN 

' JUSTIFY <AS> AND DISPLAY AT SCREEN POSITION 764 

P-32-LEN(AS)/2+764:TH=30:BH=38:LV«32-LEN(AS)/2:RV 
'32+LEN (AS)/ 2+64 : GOSUB30900 : PRINT9P, AS;: RETURN 

' JUSTIFY <A$> AND DISPLAY AT SCREEN POSITION 768 

P-32-LEH(AS)/2+76 8:TH-33:BH-41:LV-32-LEN(AS)/2:RV 
■32+LEN ( AS )/2+6 4 :GOSUB30980 : PRINT3P, AS;: RETURN 

1 JUSTIFY <AS> AND DISPLAY AT SCREEN POSITION 832 

P-32-LEN(A$)/2+832:TH»36:BH-44:LV-32-LEN(AS)/2:RV 
32+LEN(A$)/2+64:GOSUB3090 0:PRINT@P,A$;:RETURN 



30630 ' 
30640 ' 
30650 ' 
30660 REM ** ROUTINE TO HALT DISPLAY UNTIL OPERATOR INP 

UT ** 
30670 ' 
30680 PRINT032-25/2+960, "PRESS <ENTER> TO CONTINUE" ;: IN 

PUTAS:CLS: RETURN 
30690 ' 
30700 ' 
30710 ' 

30720 REM ** TIMING LOOP ** 
30730 ' 

307 40 FOR X-l TO 500: NEXT X: RETURN 
307 50 FOR X-l TO 1000: NEXT X: RETURN 
30766 FOR X-l TO 1500: NEXT X: RETURN 
30770 FOR X-l TO 2000: NEXT X: RETURN 
30780 " 

307 90 REM ** TIMING LOOP THEN CLOSE SCREEN <CLS> •• 
30800 ' 

30810 FOR X-l TO 500: NEXT X: CLS : RETURN 
30820 FOR X-l TO 1000: NEXT X: CLS: RETURN 
30830 FOR X-l TO 1500: NEXT X: CLS: RETURN 
30846 FOR X-l TO 2666: NEXT X: CLS: RETURN 
36856 ' 
30860 ' 
30870 ' 

30880 REM *« SUBROUTINE TO DRAW BORDER AROUND <AS> ** 
30890 ' 
30900 FOR X-LV TO RV: SET (X ,TH) : SET (X , BH) :: NEXT X : FOR Y= 

TH TO BH:SET(LV,Y) :SET(RV,Y) :NEXT Y:RETURN 



this publication 
is available in 
micr o form 




wmr 



Please send me additional Information 

University Microfilms International 

300 North Zeeb Road 18 Bedford Row 

Dept PR Oepf P R 

Ann Arbor. Ml 48106 London, WC1R 4E J 

USA England 




16K MEMORY 

EXPANSION KIT 

FOR YOUR TRS-80, 

APPLE, AND S-100 

COMPUTER 



on 



ly$59 



200 Nsec Access. 375 

Nsec Cycle 

Burned-in and Fully 

Tested 

1 yr. Parts Replacement 

Guarantee 

Qty. Discounts Available 



COMPUTER OfJViCB 

mo uj couins av/e. 

OnonGE. CO 92668 
(714)633-7260 



Energy 
Conservation 
Module 
IRS-80 

TrttiH up lit Wt of ihr < mi <<l ) «i,r I niiie Sitlftn 

icmperaturc measurement at up to four 

indoor or outdoor locations. Controls up to 
tour remote devices F.xpandable to 255. 

BASIC and Machine Language software 
documentation supplied Runs in either with 
I e\el II. Levd I and TBUG machine lan- 
guage only 

Support software trees system to run other 
programs concurrently, updating only when 
changes occur 

Ready to connect and use. Includes inter- 
face hardware, software documentation, and 
complete instruct ions Assembled and tested. 
Under S200.00 

Think Tank Labs ^376 

p.o. box 552 

melbourne, f lorida 32901 



(j|j Business /Accounting fife 
i * Software * " 



Flexible cttenl write-up/general ledger system designed by 
a C'PA and developed by a computer specialist for CPA's, 
accountants and general businessmen provides large-scale 
computer features at micro-computer software costs: 

* designed for use by present employees 
' allows for up to S00 accounts 

* departmental financial statements including 
budgets 

* retains standard journal entries 

* automatic balancing of transactions 

* fast entry A posting of transactions 

* easy to follow audit trail 

' conventional accounting symbols used 

For 9-program package on diskette with user manual 
*:nd VMS to: 

Task Comfiter Applications 

Dayton, Ohio PO Box 24001 
45424 

(513)233-5515 " 147 



"EASY-WORD" 

A WORD PROCESSOR 
for only $21 .95 

Required: TRS-80. 16K. TAPE. PRINTER 



Some of "EASY WORD" many features 

JUSTIFY • STANDARD KEYBOARD 
UPPER CASE INDICATOR • VISUAL TABS 
LINE. CNAN6E. DELETE. INSERT. APPEND 

i WORD. CHANGE. DELETE. INSERT. APPENO 
• CENTER. SORT. AND MORE 



CONN. RCSNM NTS AM 7% 



HANSON HOUSE 
55 HANSON PLACE 

STRATFORD. CT 06497 • si? 



3! 



MODEL II SOFTWARE 

HOST 

HOST allows you complete control of your Model II 
system 'rom a '•emote location HOST wil' allow you 
to perform any Model II function as though you were 
actually sitting at the Keyboard yet still allows the 
Model II to operate normally With HOST you can 
send and receive programs data tiles access disk 
and printer Just connect your Model II via telephone 
or direct Ime. to any standard terminal You can even 
use a second Mode II or a Model I as terminal' HOST 
gives you the power of a second computer system 
for only $139°° 

SPRINT 

SPRINT adds a screen print command to your 
Model II The contents of the screen will be sent to 
your printer at the press of a key or by software con- 
trol SPRINT is loaded >n via DOS and remans m 
the system, letting you print Out m DOS or BASIC 
SPRINT requires no modification to your programs 
0nly$19« 

Order no* from COMPU-SERVICES 

P Bo> 324 
Somerset MA 02725 
• 363 
TEOMS Cash or Money Orde r Personal checks reduce 
3 *eeks Drocessinq time fldo $2 00 »or postage and 
shipping Mass residents add 5 i Sales Ta> 



■ Reader Service— see page 226 



80 Microcomputing, September 1980 • 151 



TUTORIAL 



A case for string packing. 



Stringy Machine Code 



David D. Grimes 
12949 W. Montana Dr. 
Lakewood, CO 80228 



The string packing technique 
for embedding machine lan- 
guage code in BASIC programs 
offers exciting possibilities and 
convenience to TRS-80 users. 



For BASIC programs with ma- 
chine language routines you no 
longer need to load a separate 
SYSTEM tape, specify a power 
up MEMORY SIZE or modify pro- 
grams for different RAM sizes. 

String packing takes care of 
these problems, making it possi- 
ble to wed BASIC and machine 
languages. 

Eliminates SYSTEM Tape 

For example, printing game 
instructions on the screen in 
machine language is difficult 
and tedious, but in BASIC it's 



10 POKE 16553,255 'FIXES ROM DATA READ BUG 

20 S$""TH1S STRING LENGTH TS 24" 
30 I-VARPTF(SS) 
40 JJ«PEEK(I+2)*256+PEEK(I+l) 
50 IF JJ>32767 THEN JJ»-1* (65536-JJ ) 
60 FOR P-JJ TO JJ+23 
70 READ D:POKE P,D:NEXT 
80 DATA 205,127,10,14,60,65,62,01, 
211,255,16,254,65,60, 
211,255,16,254,43,124,181,32,238,201 
90 POKE 16526, PEEKU + 1) :POKE 16527 , PEEK ( 1 + 2) 

100 ' 

110 ' 

120 CLS 

130 PRINT00, "ENTER 'Y' OR 'N' ?" 

140 IF DE<100 GOTO 170 

150 X-USR(100) 'I BEEP HERE 

160 DE-0 

170 ZS=INKEYS 

180 IF ZS-"" THEN DE-DE+1:G0T0 130 

190 PRINTZS 

200 IF Z$<>"Y" AND Z$<>"N" THEN 150 

210 PRINT"THANK YOU I" 

220 FOR DE»1 TO 500:NEXT 

300 PRINT'I AM SIMULATING BEING HARD AT WORK ON A PROGR 

AM. 

310 PRINT"I WILL TELL YOU WHEN I HAVE FINISHED BY 'BEEP 

ING' . 

320 PRINT'YOU CAN STOP THE BEEP AND RETURN TO THE LEVEL 
II 

330 PRINT" >READY BY PRESSING ANY KEY. 

340 FOR DE«1 TO 5000: NEXT 



350 X-USR(200) 

360 FOR DE-1 TO 500 

370 AS-INKEYS 

380 IF A$<>"" THEN 410 

390 NEXT 

400 GOTO 350 

410 END 



'I BEEP HERE 



Program Listing 1 



easy. Computing generations in 
the game of Life can take thirty 
seconds or more in BASIC, while 
it takes only fractions of a sec- 
ond in machine language. 

Having both languages in one 
program eliminates the need for 
SYSTEM tapes, because all data 
formerly on the SYSTEM tape 
can be CSAVEd as part of the 
BASIC program, and the BASIC 
program knows exactly where to 
find the machine language in 
RAM, via the USR command. 

Furthermore, since the ma- 
chine language is stored as part 
of the BASIC program, it isn't go- 
ing to overlay itself, so no upper 
RAM need be saved at power-up 
time. 

Let's examine a practical ap- 
plication using string packing - 
an audible prompt. The audible 
prompt (beep) is used when a 
program needs keyboard input, 
when an error is detected, or 
when a program has come to the 
end of its job, etc. 

Listing 1 is a listing of a short 
BASIC program that packs a 24 
byte machine language pro- 



gram into S$. The BASIC portion 
of the program controls the flow 
and execution, the machine lan- 
guage contributes only the 
beep. The audio signal is output 
to the plug, which normally goes 
to the AUX jack in the cassette 
recorder. This plug must con- 
nect with an audio amplifier, 
such as a Radio Shack Micro- 
sonic Speaker Amplifier (277- 
1008). 

Table 1 gives a detailed de- 
scription of the packing of the 
machine language routine. Note 
that it is executed only once, not 
each time that a prompt is 
sounded. 

The Program 

Lines 120-210 (Listing 1) set 
up a prompt for keyboard Input. 
If no entry is made, a prompt 
sounds every four seconds, if an 
incorrect entry is made, the 
prompt sounds instantly. 

Line 150 jumps to the packed 
subroutine, which generates the 
sound and then returns to 
BASIC at the next line. If the cor- 
rect entry is made, the program 



Lin* Description 

10 Fixes ROM Dug for reading DATA statements 

20 Defines string of sufficient length into which machine language will be 

packed 
30 Finds address of S$ information block 
40 Computes decimal address of location of SS 
50 Adjustment for RAM sizes up to 16K 
60 Sets up loop 
70 POKEs DATA into string 
80 Machine language code In decimal 
90 POKEs address of SS into USR area, so that BASIC program can find il 

when USR call Is made 

Table 1. Subroutine Initializer 



152 • 80 Microcomputing, September 1980 



continues to line 210. 

Lines 300-410 could, as in 
this case, be put at the end of 
any program to announce an 
audible end of job. The beep 
continues every few seconds 
until any key is depressed. 

Once the program is working, 
any attempt to LIST it causes 
the screen to roll and looks 
somewhat like a bad load from 
tape. This is because BASIC is 
attempting to print something 
which it does not normally see, 
namely machine language in S$. 

At this point, you should 
CSAVE the program, because 
we are going to delete part of it 
to save RAM. After the program 
has run successfully, the DATA 
in line 80 are obviously packed 
into S$ as a working machine 
language subroutine, so lines 40 
through 80 are redundant and 
can be deleted. 

When we CLOAD the program 
again, the subroutine will be in 
S$, just as it is now and needn't 
be packed again. After deleting 
lines 40 through 80, CSAVE the 
program again (see Restric- 



tions). 

The argument in the USR 
command determines the 
length of the tone. Larger values 
(up to 32767) cause longer 
beeps. A value of more than 
1000 or so causes a very long 
tone. 

The pitch is controlled by the 
fifth DATA element in line 80. In 
the example it is 60. Larger 
values give a lower pitch. The 
value must not exceed 255. 

Restrictions 

1. DATA elements to be 
packed must not have the value 
or 34. Either terminates the 
string when packed. 

2. If lines 40 through 80 are 
deleted after the string is 
packed, certain conditions can 
cause the program to bomb; if 
you modify the BASIC program, 
for example. This can be avoid- 
ed by not deleting the string 
packing code until a final ver- 
sion of the program is produced, 
or by not deleting the lines at all, 
if RAM use is not a considera- 
tion. ■ 




The world's most popular microcomputer, with 16K of memory 
and Level II BASIC for only $685.00 complete with full 90-day 
Radio Shack warranty. 

We accept check, money order or phone orders with 
Visa or Master Charge. (Shipping costs added to 
charge orders). 

Disk drives, printers, peripherals, software & games. . . 
you name it, we've got it 
(both Radio Shack & other 
brands). Write or call for 
our complete price list. 



ELECTRONICS 
MART, LTD. 




AUTHORIZED 
DEALERSHIP 



Radio /hack 



32 EAST MAIN • MILAN. MICHIGAN 48160 • (313) 439-1508 



PRINTERS & CRT'S From Oronge micro 




ba/e^ if 



IMPACT PRINTER 



s 649. 



00 



(LIST $699.00) 

"The BASE 2 outperforms every printer in 
its price range. Do a comparison and see for 
yourself . . ." 
• GRAPHICS • TRACTORS/ FRICTION FEED 

• 2K Input Buffer • RS-232 Serial, Centronics® Parallel, 
IEEE-488, 20 ma • TRS-80 Cable option • 60 LPM - 100 
CPS • Fast form feed • User programmable character 
set • 64, 72, 80, 96, 120, 132 Columns/ line • Expanded 
characters • 9.5" wide paper • Automatic skip-over- 
perforation • Horizontal & Vertical tabs • Programmable 
vertical line spacing • Intel 8085 Microprocessor — over 
40 software commands • Self test • 15 Baud rates to 
9600 Baud • Optional foreign character sets 

Interfaces to TRS-80, Apple, Atari, PET, Northstar, and most 
other computers. 




TELEVIDEO CRT'S 

PRICES SLASHED! 



TVI912C 
TVI 920C 



} 



Please Call Toll Free 
Prices are too low to 
advertise 



PRINTERS 

OKIDATA 



CENTRONICS 

779 w/tractors $ Call 

730 SCall 

737 849 

COMPRINT 

912 Parallel 499 

912 Serial 535 



Microline80 639 

w/tractors 739 

PAPER TIGER 

w/graphics 948 

QUME 

Lette, Quality 5/45 2499 

w/tractors 2684 



TOLL FREE (800) 854-8275 



CALIF. (714)630-3322 



Call lor FREE CATALOG 



Phone orders WELCOME Same day 
shipment (or VISA. MASTER 
CHARGE, and AMERICAN EX- 
PRESS Personal checks require 2 
weeks to clear Add 3% lor ship- 
ping and handling. California resi- 
dents add 6% Manufacturer's 
warranty included Prices subject to 



J 



Orange 
(Tlfcro 




^296 

3148 E. La Palma, Suite E 
Anaheim, CA 92806 



'>**&*^! 



REVIEW 



A look at Tandy's talker. 



Eloquent Eighties 



TRS-80 Voice Synthesizer 
Radio Shack 
Tandy Corporation 
Ft. Worth, TX 76102 
$399 

Jim Wright 

10140 N. W. 43rd St. 

Coral Springs, FL 33065 



It's magic, absolute magic! A 
12" x 6" x 4" box of capac- 
itors, resistors, transistors and 
integrated circuits is talking to 
me in plain English. Not only is it 
talking, but it says anything that 
I ask it to, including some very 
funny sound effects. 

I suppose my engineering 
background and our nation's 
ability to put men on the moon 
should have prepared me for 
this. Nonetheless, I am still 
amazed at the marvels in our 
growing level of consumer tech- 
nology. 

Loading the Demo Tape 

I picked up one of Radio 
Shack's Voice Synthesizers, in 
spite of its $399 price tag. 

The Voice Synthesizer is a 
completely self-contained unit. 



Like its host, the TRS-80, it uses 
a separate in-line step-down 
transformer. The synthesizer 
can be used on any Level I or II 
TRS-80 and attaches by a ribbon 
cable and 40-pin connector ex- 
pansion port. 

For those of you who have the 
expansion interface, the synthe- 
sizer connects to your parallel 
interface port on the left side of 
the unit. Once connected, you 
turn on the synthesizer, adjust 
the volume and begin program- 
ming. 

Radio Shack was thoughtful 
enough to include a demonstra- 
tion cassette tape with the syn- 
thesizer. Unfortunately, the 
manual I received made no men- 
tion of the cassette! However, 
by increasing the tape player's 
volume level to about 6.5, the 
cassette finally loaded. 

After typing RUN, the TRS-80 
started talking! The program 
takes several minutes, during 
which time you get a good idea 
of what synthesized speech 
sounds like, as well as how it is 
structured in a program. While 
the audio output is quite intel- 
ligible, the synthesizer produces 
a stereotype computer sound 
much like the Battle Star Galac- 
tica's Cylons. 

Using the Synthesizer 

While the manual that accom- 
panies the synthesizer contains 



only 13 pages, it provides ade- 
quate information for anyone 
who can program in BASIC to be 
able to use the synthesizer. 
Radio Shack's approach to pro- 
gramming their synthesizer is 
interesting. 

First of all, they do all the pro- 
gramming in BASIC. Although 
this may not be the most effi- 
cient method, it certainly makes 
using the synthesizer very sim- 
ple. 

Secondly, they used 32 bytes 
of the video monitor's memory 
map to store the synthesized 
voice message. The storage is 
only temporary, in that the syn- 
thesizer contains a 32-byte buf- 
fer that is filled from the lower 
portion of the video monitor's 
memory. Once the synthesizer's 
buffer is loaded, the memory 
can be erased or written over. 
This is done so rapidly that you 
can't even see what is happen- 
ing on the monitor. 

After the voice programming 
has been transferred to the syn- 
thesizer, the TRS-80 continues 
with its program, while the syn- 
thesizer is speaking. This allows 
for some very exciting graphics. 
For example, the rockets may 
fizzle as your Lunar Lander is in 
motion. Or a spelling program 
can draw a word as the synthe- 
sizer pronounces it. Business 
programs can verbally explain 



sales, as the computer draws a 
graph. 

How does the synthesizer 
know when it has a message to 
relate? Based on the program 
description, it appears that the 
voice synthesizer acts as a 
32-byte block of memory paral- 
lelling the video monitor loca- 
tions 16352D to 16383D. This 
block, referred to as a "window" 
in the instruction manual, is 
opened and closed by the con- 
trol character, ?. 

When a ? appears in memory 
locations 16352D to 16383D, the 
synthesizer opens or closes its 
window. An LED on the synthe- 
sizer lets you know if the win- 
dow is open or closed. 

Once the window is opened, 
any character or characters ap- 
pearing between the window 
locations is copied into the syn- 
thesizer's buffer, and the syn- 
thesizer produces the charac- 
ter's phonetic sounds. 

Maximum message length is 
32 characters at a time. Depend- 
ing on the words used, 32 
characters produces from one 
to five seconds of speech. If you 
desire a longer message, you 
can string together several 
groups of characters, separated 
by a software time delay, allow- 
ing the first segment of speech 
to be completed before the sec- 
ond begins. 

This sequencing can be done 



154 • 80 Microcomputing, September 1980 



S REM *** SET UP PROMPTING PHRHSE "PLERSE ENTER VES OR NO" 


♦♦*> 


IB ft» - "PL.EZ 3NTR V43SS Cv NBOU" 




IS REM ♦♦* PLACE PHRfiSE IN SYNTHESIZER *** 




26 PRINT«992. "? "lft»J" ?"i 




29 REN *** CLEflR SCREEN "UINDOM" **■* 




30 PRINT«992. " "» 




Program Listing 1. 





indefinitely to produce as long a 
message as your memory al- 
lows. Based on an average of 
three seconds for each group of 
32 characters, 1K of memory 
produces approximately one 
and a half minutes of speech. 
This can be increased substan- 
tially by using a "dictionary ar- 
ray" of commonly used words. 

Add Sound to Your Character 

In printed text, a single sym- 
bol is called an ASCII character. 
The "characters" used in the 
spoken message are called pho- 
nemes (ffl-nems). A phoneme is 
a single unit of sound. It is the 
combination of phonemes that 
produces the words the voice 
synthesizer pronounces. 

The TRS-80 Voice Synthesizer 
contains 62 phonemes that can 
be combined to pronounce vir- 
tually any word in the English 
language, as well as some 
foreign words and phrases. 

The correct programming 
method for the synthesizer is to 
type the ASCII character that 
represents the phonetic sound 
desired, for example: TEE 
;8R3SS @*&DY V085&SS SIN 
= 85;&Z/ is TRS-80 Voice Syn- 
thesizer. 

The manual includes a table 
that cross references the 
phoneme symbol and its ASCII 
character. The manual suggests 
that you sound out the word you 
are trying to program and then 
select the correct phonemes to 
use. I have found that this works 
quite well but still requires some 
trial and error experimentation. 



While the manual does provide 
a dictionary, with correct 
phoneme constructions, it in- 
cludes only 34 words. 

You can also cross-reference 
any dictionary's phonetic sym- 
bols with the manual's phoneme 
symbols/ASCII characters. 

Using a Dictionary 

I found some phonetic sym- 
bols that could not be refer- 
enced as single phonemes. 
These sounds, such as the long 
I, are represented as diph- 
thongs, a combination of vowel 
phonemes. With a little experi- 
mentation, you soon find that by 
changing or adding a single 
phoneme you can also create 
different inflections, such as the 
word beer, which can be coded 
BEER or BEIR. 

BASIC Programming 

Program Listing 1 demon- 
strates how simple it is to add 
verbal responses to a BASIC 
program. It prompts you to enter 
yes or no. To change the mes- 
sage, it is necessary to change 
only the A$. Lines 20 and 30 can 
be a called subroutine using 
various A$ messages. 

Program Listing 2 can be 
used to experiment with dif- 
ferent phoneme structures. Be 
careful to keep the number of 
phonemes to less than 28. 

If you should type more than 
28, the LED on the synthesizer 
stays lit. This is because the 
second ? was truncated from 
the buffer, and the synthesizer's 
window was not closed. 

If this happens, just press the 



10 CLS 




28 PRINT«4e4, "ENTER PHONETIC PHRRSE" 








40 PRINT4464. 1 




30 INPUT fl« 




69 GOSUB 100 




79 GOTO 10 




100 PRINT0992. "? "Jft»l- 7"l 




110 PRINT0992. " 


-i 


120 RETURN 




Program Listing 2. 





TRS-8QT Compatible 



.. 



cai 



ill ^\ 



,M 



Continuous Statements 




small 
quantities, 
low prices, 
fast delivery 

Order as few as 500 
statements imprinted with 
your firm name and address. 

Only $0795 

NEBS 9062 Statements are 
software compatible with 
the TRS-80, Model 1, Level 
II, Accounts Receivable 
package #26-1555. 



TRS-SO it a Trad* Mark of ihs Radio Snack 
Co.. Subsidiary ol Ih* Tandy Corp. 



■—, 





) 


■ 


I ac ] 


[ nnrr 





SPEED COLLECTIONS 
Product 772 DU-O-VUE - 

(3Vx 6%') eliminates 
0tiv0lope addressing. 



Envelope 



Product 9062 — Size 6'x 8%' detached. Prices include your firm 
name, address and phone in top section, plus your name only in 
lower section. Printed in black ink. Available in single (white) or 
duplicate (white, canary) continuous sets. 





SINGLE 


DUPLICATE 


Product 772 


QUANTITY 


Product 


Product 


DU-O-VUE* 




9062-1 


9062-2 


Envelopes 


10,000 


$192.00 


$355.00 


$138.00 


6,000 


128.00 


228.00 


92.00 


4,000 


99.00 


169.00 


64.50 


2,000 


59.00 


99.00 


36.25 


1,000 


38.75 


61.00 


20.75 


500 


27.95 


39.95 


12.25 



ORDER TODAYI MONEY-BACK GUARANTEE. 
FAST SERVICE BY MAIL or PHONE TOLL FREE 1 +800-225-9550 
(Mass. residents 1 + 800-922-8560). It is our policy to ship within 
6 working days following our receipt of your order. 



Please ship: 



Date. 



.19. 



CODE 460 



.9062-1 STATEMENTS (Single) 

.9062-2 STATEMENTS (Duplicate) 

.772 DU-O-VUE* Envelopes 

.Information on continuous checks and other 
computer forma. 



HEADING TO BE PRINTED ON FORMS: (Plena 

STREET 


type or print) 


CITY and STATE 


ZIP 


PHONE 


If you wish us to BILL and SHIP diflerantly from above ptaasa Indicate. 
AUTHONOCO SIGNATURE 



1^— — — — Computer Forms - J 



78 HoUisStnxL Groton,Mass. 01450 

A dmaion ol Na* England Oiainm Ssmca. mc 



^Rmadtr S#rv/c#— s## peg* 226 



80 Microcomputing, September 1980 ■ 155 



INTEGRATED 
EYPLUS UTILITY 

PACKAGE 




o 



Keyplus is a collection of utilities that can be enabled directly 
from the keyboard of a Level II TRS-80. Seven different keyboard 
entry modes include BASIC shorthand (2 modes), direct graphic 
character input (3 modes), typewriter style input and standard 
TRS-80 entry. 

Keyplus supports auto-repeat, lowercase video (optional hard- 
ware modification required), restoration of lost programs, key- 
board debounce, single key stroke user definable strings and more! 

Designed for ease of use, Keyplus routines may be enabled or 
disenabled in two key strokes. 

The Level II version of Keyplus is available for $14.95 and a more 
powerful disk version (32 or 48K) sells for $19.95. Pennsylvania 
residents add 6*Io sales tax. 

TRS-80 is a registered trademark of TANDY CORP. 



SJW, INC. 

P.O. BOX 438 -*« 
HUNTINGDON VALLEY, 
PA 19006 
215-947-2057 





? key and ENTER, and the win- 
dow closes. The reason for this 
is that the open window sees the 
? as a toggle off-control char- 
acter. Remember that the first ? 
toggles the window open and a 
second toggles the window 
closed. There are several other 
examples of useful subroutines 
included in the synthesizer's 
manual. 

A list of potential applica- 
tions is included in the manual. 
These include: 

Computer-Aided Instruction 

Intrusion - Fire Alarm 

Games 

Talking Clock 

Blind User's Terminal 

Verbally Impaired Prosthetic 
Aid 

Home Environment Audio 
Response (I programmed 
mine to ask for a beer!) 

Computer - Phone Voice 
Interface 
But once you've used the Syn- 
thesizer, you're going to be in- 
trigued with its other possi- 
bilities. How about a verbal 
calculator? Or a typing instruc- 
tion program? 



Finding fault with the TRS-80 
synthesizer is like telling Henry 
Ford that his first automobile 
rode rough. True, it is a mar- 
velous invention, but several 
areas can be improved. The first 
is the monotone computer 
sound. It would be nice to have 
an option for changing the pitch. 

Secondly, some control is 
needed over the speed. I can en- 
vision a version of the synthe- 
sizer that will be able to sing, as 
well as speak. 

Several phonemes do not 
really sound as one would ex- 
pect. The g sounds almost 
identical to the d and causes 
words like gig to sound more 
like deed. The L has what I call 
an Elmer Fudd sound, that is, a 
soft type L, rather than a hard L. 
The K also has a tendency to 
sound a little soft. 

While some of these sounds 
are not perfect, the synthesized 
voice for the most part is very in- 
telligible. I'd recommend the 
synthesizer for most any appli- 
cation where an audible prompt 
is desired. ■ 



^59 



MAGNETIC MEDIA DISTRIBUTORS 

596 Taylor Way Belmont, California 94002 (415)595-0684 

FLOPPY DISKS FOR ALL COMPUTERS 



Flip Sort 

DISK STORAGE SYSTEM 



Keeps dust 
off of disks 



Built-in 
plastic file 
separators 




h'ormt'd from 
transparent 
SMOke colored 
acrylic 



50 to 60 Disk 
capacity 



For Mini-Disks S 34 9S 
For 8" Disks $ 44' 5 

plus $3.00 shipping for each 
Flip Sort™ 

DEALER INQUIRIES INVITED 



SV DISKETTES 

Diskettes available in Soft Sector. 10 or 16 hole Hard Sector 



Single Side Single Density (Certified 35 tracks) 
Single Side Double Density (Certified 10 tracks) 
Double Side Double Density (Quad Density) 
Single Side Double Density (Certified 77 tracks) 

8" DISKS 

Single Side Single Density (Soft Sectored) 
Single Side Double Density (Soft Sectored) 
Double Side Single Density (Soft Sectored) 
Double Side Double Density (Soft 'Sectored) 



1 99 
5 2.85 
$ 3. 75 
$ 4. 50 
$ 1. 00 



100 UP 
$ 2.60 
$ 3. 55 
$ 4. 30 
$ 3. HO 



$3.40 $ 3. 20 

$4.60 $ 4. 40 

$ 4. 95 J 4. 75 

J 5. 10 $ 4. 90 



Single Side Single Density (Hard Sector 32 hole) S 3.60 $ 3.40 

Single Side Double Density (Hard Sector 32 hole) S 4.00 $ 3.80 

Single Side Single Density (Hard Sector 32 hole) J 4. 65 $ 4.50 
(MRX 651 compatible OD holes) 

We stock VERBATIM. WABASH. KYBE. KEYLISE i ATl.ASTIS 
Disks and Diskettes at LOW. LOW. prices. Write for our mini 
catalogue. 

VINYL DISK SLEEVES for 5 1/Mand 8" Disks $ 9.00 lOpak 

PLASTIC LIBRARY CASES 8" $4.50 5 1 /«" $3.50 
FLOPPY SAVER (Hub Reinforcing Rings 
5 1 /«" with applying tool J 14.95 pk of 25 Refills $ 7. 95 
8" with applying tool $ 16. 95 pk of 25 Refills $ 8. 95 



CALL TOLL FREE TO ORDER 

800 227-7362 

IN CALIFORNIA 415 595-0685 




156 • 80 Microcomputing, September 1980 




PROFESSIONAL HALF A million tax returns cant be wrong! 

(OR THEY HAD BETTER NOT BE) 

INCOME TAX SYSTEM 

FOR TRS-80* MODEL I OR II 

Our system, which prepared 500,000 1979 returns, features the following: 

1. Full interactive user control, in tax-form language only, line-by-line. 

2. Screen display of full 1040 and all schedules, prior to printout. 

3. Change of a single amount item automatically changes and re-computes entire 
return. 

4. All printout formats IRS and state approved. 

5. Stores Preparer's Identification for automatic printing at bottom of page 2. 

6. Built-in Validation Check tests entire system, hardware and software. 

7. Special Printer Adjustment routines, Line Length, etc. 

8. Selection of closed or open output formats — for standard Form 1040 or open 
name-box types. 

9. Software control of text position on page. Makes forms-alignment simple. Permits 
use with non-adjustable printers. 

10. Fills in pre-printed Forms or you can use overlays. Your choice. 

11. Automatically computes: Tax - SDI Overpayment - Wages Total from W-2's - 
Earned Income Credit - Income Averaging - Maximum/Minimum Tax - Least 
Tax Method - All Percentage of Income Limitations - All Fixed Limitations - many, 
many more. 

12. Full support through the tax season — no charge. 

13. Inexpensive yearly updates in accordance with tax-law changes. 

14. Modular construction — lets you order only the type and size system you need. 

PRICING STARTS AT $189.95 (1040 & SCHEDULE A) 

25-PAGE DESCRIPTIVE MANUAL $7.50 (Refunded on Order) 

MINIMUM SYSTEM REQUIRED: MODEL I, 32K, 1 DISK DRIVE 

•TRS-80 IS A TRADEMARK OF TANDY CORP. 

CONTRACT SERVICES ASSOCIATES .« 

706 SOUTH EUCLID ANAHEIM, CA 92802 

TELEPHONE (714) 635-4055 
• • • 20 YEARS OF SERVICE • • * 



-Reader s»mce— see page 226 80 Microcomputing, September 1980 • 157 



TUTORIAL 



A tutorial trip through addition and subtraction. 



Math Flash 



Jim Barbarello 
RD #f, Box 241H 
Tennent Rd. 
Englishtown, NJ 07726 



Traditional math flash cards 
have always been a very 
useful tool for young students in 
learning math fundamentals. 
The math flash card program 
here helps the student practice 
and learn on his own without a 
tutor. The program creates all 
the requisites of a conventional 
math drill: random addition or 
subtraction problems presented 
with bold, easily readable nu- 
merals; a set response time 
limit; positive reinforcement for 
correct answers, and a chance 
to redo an incorrectly answered 
problem. 

For each problem, two vari- 
ables between and 49 are se- 
lected. These variables are 
either added or subtracted on a 
random basis and then present- 
ed as the problem. The vari- 
ables' upper limit of 49 restricts 
the answer to a two digit value. 

After each set of nine prob- 



lems is completed, an interim 
score is presented. If the stu- 
dent chooses to continue, the 
next set of nine problems is pre- 
sented. If the student chooses 
not to continue, a total score for 
all problems attempted is pro- 
vided. 

The variables are selected so 
as to minimize repetition of 
problems and to maximize ex- 
posure to all possibilities. If, for 
example, the student is encoun- 
tering specific difficulties, the 
program can be easily modified 
to present a specific set of prob- 
lems. The program presents up 
to 81 different problems per run. 

A Typical RUN 

When the program is RUN, 
the message "GET READY- 
HERE WE GO!" appears as the 
random variables are selected. 
The screen then clears, and the 
first problem is displayed (ex: 
14 + 23= ) in two-inch high nu- 
merals. The student has approx- 
imately four seconds to enter an 
answer. The entered answer is 
displayed to the right of the 
equals sign in normal height (V* 
inch) numerals. Since the an- 
swer is entered via the INKEY$ 
function, the student need only 
press the appropriate numeric 



keys to input an answer. 

A correct answer causes the 
reinforcement message "** 
VERY GOOD**" to appear 
above the problem. If the stu- 
dent's answer is incorrect, it is 
removed from the screen and 
the message "XX IS WRONG. 
THE RIGHT ANSWER IS:" is dis- 
played in the upper left hand 
corner of the screen. 

At the same time, the correct 
answer is displayed to the right 
of the equals sign in bold (two- 
inch high) numerals. In either 
event, the problem remains on 
the screen for an additional 
three seconds. A correct answer 
allows a new problem to be dis- 
played. For an incorrect answer, 
the same problem is repeated, 
giving the student another 
chance to answer correctly. 

If the student does not re- 
spond to any problem in the al- 
lotted four seconds, the mes- 
sage "TIME'S UP" appears in the 
upper left hand corner of the 
screen and the correct answer is 
displayed in bold numerals. A 
"TIME'S UP" situation is treated 
as an incorrect answer. 

If the student does not pro- 
vide the correct answer in two 
tries, an incorrect response is 
scored. At the end of nine prob- 



lems, the screen clears and the 
message "YOU GOT X RIGHT 
OUT OF 9 TRIES THIS TIME. 
WANT TO TRY AGAIN (YES OR 
NO)" is displayed. 

If the student responds with 
lems, the screen clears and the 
message "YOU GOT X RIGHT 
OUT OF 9 TRIES THIS TIME. 
WANT TO TRY AGAIN (YES OR 
NO)" is displayed. 

About The Program 

Fully half of the program con- 
sists of subroutines to create 
the bold numerals, plus, minus 
and equals signs (Lines 1000 
through 2200). These subrou- 
tines use the variable S to posi- 
tion the numerals on the screen. 
S is initially set to 15682 in Line 
65 and is continually readjusted 
during the program to allow the 
problem to be serially presented 
(one character after another). 
The program automatically ad- 
justs for single or double digit 
variables/answers so that gaps 
are not left in the presentation. 

The program can be easily 
customized to a specific stu- 
dent's needs in a number of 
areas. For the very young stu- 
dent, the variables can be limit- 
ed to a single digit (0 to 9) by 
changing the statement A(K) = 



158 • 80 Microcomputing, September 1980 



RND(49) in line 10 to A(K) = RND 
(9) and B(K) = RND<49) in line 30 
toB(K) = RND(9). 

The response time allowed for 
each problem can be adjusted 
by varying the FOR-NEXT loop in 
line 140. As shown, the keyboard 
is scanned for a response 
25 times (FOR M = 1 TO 25). In- 
creasing the loop increases the 
allowable response time — de- 
creasing it shortens the time al- 
lowed. 

If a specific set of problems 
is desired instead of the pres- 
ently available random selec- 
tion, lines 10 through 40 can be 
deleted and replaced with: 

10 DATA A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P. 

Q.R 
20 FOR I = 1 TO 9. READ A(l) READ B<l): 

NEXT I 
(with A through R being numbers you 
select) 



With this modification, 
A,C,E,G,l,K,M,0 and Q will be 
the numerals of the first variable 
and B,D,F,H,J,L,N,P and R will 
be the numerals of the second 
variable. For example, if A = 19 
would be 19 + 43 (or 43-19 if 
subtraction was randomly se- 
lected). If only addition or only 
subtraction is desired, lines 60 
and 70 may be deleted and re- 
placed with 60 C = A + B (for ad- 
dition, or) 60 C = A - B (for sub- 
traction). 

It is possible to multiply 
and/or divide. However, special 
care must be taken such that 
the variable produce an integer 
answer that is no larger than 99. 
In addition, appropriate subrou- 
tines for the times ( x ) and 
divide (-) signs would need to 
be added. ■ 



Program Listing. 



1 REM* 

2 REM* 
1 REM* 

4 REM' 

5 REM* 

6 REM" 

7 REM* 

8 REM' 



MATH FLASH CARDS 



A PROGRAM BY 
JIM BARBARELLO 



IIS 
128 

12' 

: il 

140 

r,.« 
1CI 
re 
1M 
:»e 
.0? 



2 10 
.'48 
250 
21.0 
211 
275 
2H0 
28'. 
2911 
111 II 
11B 
128 
Sid 

140 
3S0 



171 

:.v 
It] 

1*2 

103 



CLS:PRINT"GET READY - - HERE WE GO 1 ": RANDOM : FOR K-l TO 9:A(K) 
RND (49) 

FOR J-0 TO K-liIF A(K)-A(J) THEN K-K-1:NEXT K ELSE NEXT J,K 

FOR K-l TO 9lB(K) -RND149) 

FOR J-0 TO K-1:1F B(K)-B(J) THEN K-K-liNEXT K ELSE NEXT J,K 

FOR K-l TO 9 

FOR J-l TO 9: IF CT-0 THEN D-RND12) 

AS-"":BS-"*:S-15682:CLS:A-A(K) : B-B( J ) :C-0 : F-0 

IF D-l THEN C«A*B ELSE C-A-B 

IF C<l THEN A-B(J) :B-A(K) :C«A-B 

IF A>9 THEN W- INT (A/18) :Y-A-WMB ELSE Y-A-.S-S-8 

ON W GOSUB 1888,1188,1288,1388,1488,1580,1680,1788,1888 

S«S*8 

ON Y GOSUB 1888,1188 '.!•? ' ,n " '488,1188,1688,1708,1888 
| IF Y-B THEN GOSUB 1 80 
> ON D GOSUB 2888, 210*1 1 ' .. ■ 

i S-S*16:IF B>9 THEN W- INT ( ll/l 8 ) :ON W GOSUI1 1888,1108,1288,138 

.1480,1508,1608,1780,1888 
) IF B>9 THEN Y-B-WM8 ELSE Y-B:S-S-8 
I S-S*8:ON Y GOSUB 1888,1100,1288,1388,1480,1588,1688,1788,18 



IF Y-B THEN GOSUB 19BB 

S-S-17 :COSUB 22BB : S-S-l :W-0 : Y-B : AS* INKEYS 

FOR M-l TO 25 

AS-INKEYS 

IF AS""" THEN 178 ELSE 200 

FOR L-l TO 50:NEXT L,H 

PRINT? 498,' "i:PRINT0 0, "TIME'S UP" 

CT • CT*l:GOTO 240 

IF C>9 AND BS-"" THEN BS-AS : M-5 : PRINT? 498,BSi:NEXT M:ELSE PR 

INT? 499, AS; 
G-VAL(AS)*VAL(BS)*1B:IF G-C THEN CT-0:PR1NT? 84,"** VERY GOOD 

•*"::GOTO 290 
IF GOC THEN PRINTl ^,G;" IS WRONG. THE RIGHT ANSWER IS":CT-C 

T*1:PRINT?498," ";:GOTO 240 
CT-0 
S-S*36 

IF C-fl THEN GOSUB 1900:COTO 29B 

IF C>9 THEN W-INT(C/10) :Y-C-W«10 ELSE Y-C:S-S-8 
ON W GOSUB 1888,1188,1288,1388,1488,1588,1688,1700,1800 
S-S*8 

ON Y GOSUB 1000,1100,1208,1300,1400,1508,1688,1788,1880 
IF Y-8 THEN GOSUB 1900 
FOR N-l TO 750iNEXT N 

IF CT-0 THEN TTL-TTI.*1:NEXT J : GOTO 138 
IF CT-2 THEN J-J-liNEXT J : GOTO 3 30 
CT-0:NEXT JrGOTO 330 
CLS:PRINT"YOU GOT";TTL;" RIGHT OUT OF 9 TRIES THIS TIME":TL-T 

L*TTL:TTL-B 
PRINT: INPUT'WANT TO TRY AGAIN (YES OR NO)";BLS 
IF LEFTS (BLS, 1) -"Y" THEN NEXT It 
IF LEFTS (BLS, 1)-"N" THEN CLS : PRINT'YOUR TOTAL IS'jTL;" RIGHT 

OUT OF* ;K* 9; "TRIES. BYE'.'-.END 
GOTO 340 
REM** ONE 

FOR 1-0 TO 4 
POKE 5*1*64,191: POKE S* 1 ♦ I *64 , 191 :NEXT 

POKE S«62,191:FOR 1-1 TO 6:POKE S* 253 ♦ I , 191 :NEXT 



104B 


RETURN 


1100 


REM** TWO 


1110 


FOR I --2 TO 3 


1128 


POKE S*I,191:POKE S« 128*1 , 191 : POKE S*256*I , 191 :NEXT 


1130 


POKE S*67, 191: POKE S*190,191 


1140 


RETURN 


1200 


REM** THREE 


1210 


FOR 1 — 2 TO 3 


1220 


POKE S*I,191:POKE S*128*I , 191 : POKE S* 256*1 , 191 :NEX7 


1230 


POKE S*67,191:POKE S*195,191 


1240 


RETURN 


1300 


REM** FOUR 


1310 


POKE S*128,191:POKE S*129,191 


1320 


FOR 1-0 TO 4-.POKE S*2*I *64 , 191 : POKE S* 3*1 *64 , 191 :NEXT 


1330 


FOR 1-0 TO 2:POKE S-2* I *64 , 191 : POKE S-l* I *64 , 191 :NEXT 


1340 


RETURN 


1400 


REM** FIVE 


1410 


FOR 1 — 2 TO 3 


1420 


POKE S*I,191:POKE S*128+I , 191 : POKE S*256 ♦ I , 191 :NEXT 


1430 


POKE S*62,191 :POKE b*195,191 


1440 


RETURN 


1500 


REM** SIX 


1510 


FOR I--2 TO 3 


1520 


POKE S+I,191:POKE S*128*I , 191 : POKE S+256+I , 191 :NEXT 


1530 


POKE S*62,191:POKE S+190 , 191 : POKE S*195,191 


1540 


RETURN 


1600 


REM** SEVEN 


1610 


FOR I--2 TO 3:POKE S»I,191:NEXT 


1620 


FOR 1-0 TO 4:POKE S+2+I *64 , 191 : POKE S* 3*1 *64 , 191 :NEXT 


1638 


RETURN 


1788 


REM** EIGHT 


1710 


FOR 1 — 2 TO 3 


1720 


POKE S*I,191:POKE S« 128 ♦ I , 1 91 : POKE S*256 *I , 191 :NEXT 


17 30 


POKE S*62,191 :POKE S*67 , 191 : POKE S* 1 90 , 1 91 : POKE S*195,191 


1740 


RETURN 


1800 


REM** NINE 


1810 


FOR 1 — 2 TO 3 


1820 


POKE S*I,191:POKE S*128*I , 191 : POKE S*256*I , 191 :NEXT 


1830 


FOR 1-0 TO 4:POKE S* 3*1 *64 , 191 : NEXT 


1840 


POKE S*62,191 


1850 


RETURN 


1908 


REM** ZERO 


1918 


FOR 1 — 2 TO 3 


1928 


POKE S*I,191:POKE S* 256 *I , 191 :NEXT 


193B 


FOR 1-0 TO 4:POKE S-2* I *64 , 191 : POKE S* 3*1 *64 , 191 :NEXT 


1948 


RETURN 


2888 


REM** PLUS SIGN 


2818 


FOR 1-1 TO 3 


2B2B 


POKE S*8*I*64,191:POKE S*9*I *64 ,191 : NEXT 


2830 


FOR 1-0 TO 5:POKE S*134*I , 191 : NEXT 


2840 


RETURN 


2100 


REM** MINUS SIGN 


2110 


FOR 1-0 TO 5:POKE S+134+I , 191 :NEXT 


2120 


RETURN 


2200 


REM** EQUALS SIGN 


2210 


FOR 1-0 TO 5:POKE S*8B+I , 191 : POKE S* 216 ♦ I , 191 :NEXT 


2220 


RETURN 



MULLEN Computer Products 



**TRS 



80* CONTROL BOX 



8 read relay OUTPUTS 
8 opto isolated INPUTS 
Selectable port address 



,io4° ct0 ' M80OCTOPORT 



A: 



ver supply 

embled cable & connectors 




Use your TRS 80 and our M-80 control box to program control 
energy savings devices 81 home or in your business Send f 
free application notes today 




MULLEN COMPUTER PRODUCTS BOX 6214. HAYWARD C A 94544 

OR PHONE (4 15' 783 2866 VISA MASTERCHARGE ACCEPTED 
INCLUDE $1 50 FOR SHIPPING tt HANDLING CALIFORNIA RESIDENTS ADD TAX 

^285 

Ord-r Dimct or Contact voui Local Compute Stoi 



^Reader Service —see page 226 



80 Microcomputing, September 1980 • 159 



MORE FOR YOUR 

RADIO SHACK TRS-80 

MODEL I ! 

• MORE SPEED 

10-20 times faster than Level II BASIC 

• MORE ROOM 

Compiled code plus VIRTUAL 
MEMORY makes your RAM act larger. 

• MORE INSTRUCTIONS 

Add YOUR commands to its large in- 
struction set! 

Far more complete than most Forths: 
single & double precision, arrays, 
string-handling, more. 

• MORE EASE 

Excellent fullscreen Editor, structured 
& modular programming 
Optimized for your TRS-80 with 
keyboard repeats, upper/lower case 
display driver, single- & double-width 
graphics, etc. 

• MORE POWER 

Forth operating system 

Interpreter AND compiler 

Internal 8060 Assembler 

(Z80 Assembler also available) 

VIRTUAL I/O for video and printer. 

disk and tape 

(10-Megabyte hard disk available) 




FORTH 



THE PROFESSIONAL FORTH 
FOR TRS-80 

Prices: 

MMSFORTH Disk System V1.9 (requires 1 

disk drive & 16K RAM) just $79.95* 

MMSFORTH Cassette System V1.8 (requires 
Level II BASIC & 16K RAM) $59.95* 

AND MMS GIVES IT 
PROFESSIONAL SUPPORT 

Source code provided 
MMSFORTH Newsletter 
Programming staff available 
Many demo programs aboard 
MMSFORTH User Groups 

FLOATING POINT MATH (L.2 BASIC ROM 
routines plus Complex numbers, 
Rectangular-Polar coordinate conversions, 
Degrees mode, more), plus a full Z80 
ASSEMBLER; all on one diskette . . . $29.95* 

THE DATAHANDLER, a very sophisticated 
database management system operable by 
non-programmers (requires 1 drive and 32K 
RAM); with manuals $59.95* 

Other packages under development 

FORTH BOOKS AVAILABLE 

MICROFORTH PRIMER — comes with 

MMSFORTH; separately $15.00* 

USING FORTH — more detailed and advanc- 
ed than above $25.00* 

URTH TUTORIAL MANUAL - very readable 

intro. to U/Rochester Forth $19.95* 

CALTECH FORTH MANUAL — good on 
Forth internal structure, etc $6.95* 

* — Software prices are for single-system 
user license and include manuals. Add $2.00 
S/H plus $1.00 per additional book; Mass. 
orders add 5% tax. Foreign orders add 15%. 
UPS COD. VISA & M/C accepted; no unpaid 
purchase orders, please. 

Send SASE for tree MMSFORTH information 
Good dealers sought 

MMSFORTH is available from your 
computer dealer or 

MILLER MICROCOMPUTER 
SERVICES (B1) -na 

61 Lake Shore Road. Natick. MA 01760 
(617)653-6136 



Micro Computers 

and 
dull Engineering 



The machine can do it — but you need 
the application package to make it work 
for you. 

We have brought together the most pow- 
erful civil engineering tools available, USA- 
COGO (Civil Engineering Coordinate Ge- 
ometry), USA-EARTH (Earthwork De- 
sign Quantities), and USA-STRESS (Struc- 
tural Engineering System Solver). Each 
system provides a complete data entry and 
change system in addition to the powerful 
problem analyzer tied together through a 
common menu driver. 

It's available to you now on your choice 
of CP/M or TRSDOS in source code 
BASIC or FORTRAN. For additional in- 
formation, call us at (314) 878-1277, 
or write: 



V/j 



HttWMt 



l&efti 



fftfi tr 



^//t/t/ir/e/i/JHJ, S/nr. 

13001 Cannes Drive 
St. Louis. Missouri 63141 

Lr.i.n., -.. ',,<<.!• "n/ii Ktu'itu 



^301 



PLRLZZAP 

is a machine language, highly ad- 
vanced disk sector modifier. Incor- 
porating 4 additional utilities most 
desired by users. 35 or 40 track. 1 or 2 
drives. 

•Zero out all unallocated sectors. 

•Zero out all killed directory entries. 

• Hash code displayed upon entering 
any filespec. 

• Instantly kill format, copy, basic 
and all system files except boot and 
dir. 

•PUREZZAP reads, modifies and 

writes any sector. 

•Lightning fast cursor movements in 

4 directions whether modify mode or 

not. 

• Instant toggle between drives. 
•Continues sector compare of any 
two locations. 

•Continues search for the occur- 
rence of any byte. 

•Automatic single or multiple dupli- 
cation of a modified byte. 

• Forward or backward 1 to 9 sectors 
at a time »instantly«. 

• Fantastic, easy to read, visual dis- 
play with the relative byte position 
displayed and updated continuously 
during any function. 

•A super menu and more with easy to 
understand documentation. 
Shipped within 24 hours on a diskette 
for only $12.95. Add $1.00 for han- 
dling in USA— $3.00 outsidn 

Make check or money order payable to: 

«£ COMPUTER CONSULTANTS ♦ 



9411 Otdarfertt Rd. 
Downey, California 80840 



►^220 



Versatile 
Information 

Manager 

thinking ot buying specialized programs 
tor applications such as mailing lists, inven- 
tory, or maintaining personnel records' VIM 
can perform these and many other tasks, and 
the best part of it is that you only pay tor it 
once' 

Simplify the task of maintaining your data 
by putting VIM to work on your system VIM 
is very easy to use and its flexibility will per- 
mit you to perform a great variety of data 
processing |obs with no extra programming 
It runs on the TRS BO' Model I. UK (or more) 
disk based system 



Mootnt i (database mangel 

itltahlMI lielmilion *ilh up I 
lei ir<u«l> and Ml tield< 

alphanumeru and RUAMflf held' 
add. update, and deleie record* 

.eanhonaOytieldUM 
uiing I logical and 10 eel 

mndilv. unload, or delt 
bv a trail h 
MOOUII 2 (sod utilityl 



.'411 1 ha' a< 



ombu 

OCH-ti 



npi-i, 



am ending iri de\t ending older 
MOOUII llrepoll generalo'l 

user detrned rei Old and page 101 

optional lummir* tor numeric In 

VIM mo.i.Jt-- 1 i and 100* page r 

Vid .!* shipping and handling 



FOB MORE INFORMATION WRITE: l ^ 307 

MICROCOSM 

PO Box 2034 Dearborn. Mi 48123 

'Trademark ot Tandy CO'P 



SURVEYORS: 



We have a fantastic package for the 
TRS-80! All of the programs perform cal- 
culations to full double precision accuracy. 
Here are some of the manv features: 



•FIELD ANCI.E TRAVERSK (with stadia re- 
duction, inverse, etc.) store a traverse, with ele- 
vations, on disk 
•STADIA REDUCTION 
•UNIVERSAL TRIANCLE SOLUTIONS 
•VOLUME BY AVERACE END AREA 
'CIRCUI.AR CURVE SOLUTIONS 
' HORIZONTAL CURVE LAYOUT (with tan 
» nt offsets) 

'UNIVERSAL INTERSECTIONS 
'VERTICAL CURVES AND GRADES 
•BORROW PIT VOLUME 
•C(K)RDINATE TRANSFORMATION 
•AREA FROM POINT COORDINATES 
•INVERSE FROM COORDINATES 
•RADIAL TRAVERSE (coming soon) 



Disk version (32K with Disk) $275 

Cassette version ( 16K Level II) $225 

Manual ( refunded with purchase) $5 



♦ 



^309 



Judson D. McClendon 
844 Sun Valley Road 
Birmingham, AL 35215 



160 • 80 Microcomputing, September 1980 



SURPLUS TRS-80* 
EXPANSION INTERFACES 

WITH 32K RAM 






Due lo changes in Product Structure 
American Business Computers is offering 
14 Expansion Interfaces (All W/32K RAM) 
al closeoul prices. 



$450 



American Business Computers guarantee-, 
expansion Interfaces to be Brand Se» 
still in original boxes with original Jimi 
mentation and in perfect working condition 



AMERICAN BUSINESS COMPUTERS sw M 

•TM TANDY CORP. M, 

118 S. MILL ST. - PRYOR, OK 74361 - 918-825-4844 



Please note Our CRT SCREENS have been purchased by thousands 
of individuals, the Department of the Navy, several government agen- 
cies, and dozens of the country's top corporations and universities 

• Give your CRT the luminous green characters found on the very expensive 
computer systems 

• Add a professional look to your system and your programs 

• Dramatically improved contrast (or easier reading and improved graphics 

We manufacture an optically correct. 1/8" plexiglas" screen that mounts easily 
over the CRT on your video monitor This is a quality accessory that enables your 
TRS 80* monitor to produce the luminous green characters identical to those 
found on expensive terminals r or business applications this means enhanced 
appearance and reduced eye strain for the hobbyist graphics are brighter and 
bolder The screen may be easily removed no modificatio" to monitor 

Screen for Model I . $19 95 

A Screen for Model II $24.95 

142 VISA • Mastercharge 

National Tncor. I nc / 3335 Greenleaf Blvd Kalamazoo Ml 49008/ 61 6 375-7519 



We ship within 
24 hours 
30-day money 
back guarantee 




THE BLINKING CURSOR 

MACHINE LANGUAGE ROUTINE 

FOR TRS-ao'lQK LEVEL I' 
LOADS IN SECONDS f- ROM UASSETTE 
INTO LESS THAN 1f3K BYTES OF PROTECTED 
MEMORY AND TIES INTO RDM KEY SCANo 

Customize Your Cursors 

SELECT ANY CHARACTER OR GRAPHICS BLOCK 

AND WATCH IT BLINK 

CHANQE AS OFTEN AS YOU ..IKE. 

I EATURES: 



OFAST REPEATING «£- KEY AND SPACE BAR 

e INSTANT SWAP WITH RESIDENT CuRSOH 
OUNAFFECTED BY NEW OR RESET 

e WORKS IN COMMAND- EDIT- EXECUTE MODES 
o KEY DEBOUNCE 



A System V as sett e from Semi soft 



TRS-80 



HELP ? 



flOU did I ye! along without \X y is the usual reaction to tins advanced disk indexing proyram 

AUTOMATICALLY create, sort print, search a Mastei Index of all disk files 

All I OMAITCALLY read file names, disk nuniheis mo hand i-fiin. • 

AUTOMATICALLY print disk labels (optmnal) 

AUTOMATICALLY update Index from revised disks 

AUT< )M ATIC ALLY add optional file descriptions 

AUTOMATICALLY label disks as DOS or DATA NEW 

AUTOMATICALLY purge disks of unwanted files NEW 

• FINDISK-II (on disk or tope 32K min - now works with RS I c modi 520 .00 

Other powerful programs from Documan available on tape or disk 

• STRUCT-I beam design and moment transfer w graphics I16K) $15 (X) 

• SOLAR-I essential calculations for passive solar design (3'2Kl $30 00 

• RIA-I complex analysis of real estate investments (32KI $30 00 

• DEPRECIATE-I calculate, print 12 facts on depreciable items [32K] $15 (K) 
^M VISA MASTERCHARGE Shipping >1 (K) each (Mich addsalestaxl 

DOC UMAN SOI IWAKI BOX 187 A KAl AMAZOO. Ml 49005 (61b) 144-0805 



Let Your TRS-80* 

Teach You 

ASSEMBLY LANGUAGE 

Tired ot buying book after book on assembly 
language programming and still not knowing your 
POP from you- PUSH 7 

HEMsorr proudly announces a more e'ti 
cient way. using your own TRS-80"* . to learn the 
fundamentals of assembly language programming 

at YOUR pace and at YOUR convenience 
Our unique package INTRODUCTION TO TRS-80" 
ASSEMBLY PROGRAMMING will provide you with 
the following 

• Ten 45-muiute lessons on audio cassettes 

• A driver program to make your TRS-80"' video 
monitor serve as a blackboard for the instructor 

• A display program lor each lesson to provide 
frustration and reinforcement 'or what you are 
hearing 

• A textbook on TRS-80" Assembly language 
Programming 

• Step-by-step dissection of complete and useful 
routines to test memory and to gam direct control 
over the keyboard, video monitor and printer 

• How to access and use powerful routines in your 
Level H ROM 

This course was developed and recorded by 
Joseph E Willis and is based on the successful 
series ot courses he has taught al Veta Technologies 
Corporation the Radio Shack Computer Center and 
other .'ocations in Northern Ohio The minimum 
system 'equired is a Level II, 16K RAM 

REMASSEM-1 only $69.95 



REMsdft, Inc 
b7i E 185 st 

Fuclid Ohio 44119 
(216)531-1338 





►wo 



include $1 50 lo< snipping and handling 
Ohio residents add 5'/,% sales tai 

TRS 80* is a trademark ot the "andy Corp 



S N 

.SPIDER MOUNTAIN ADVENTURE. 
/ ' • \ 

Be. ■••■... dip i..,!ti«t« o" GRAYLOCKLANO lies the <•» o' 

lie HMMi SmKOB Once a wizards cavernous lorltess SPIDER 
WOUNTA N if n<>* a deadly trap trom avhich only Ihe most skilled 
adventurers c">eige Treasure awaits the'orlunale OEATH slarksthe 
loolish 

Can YOU solve tnenddieol the SPIDER MOUNTAIN ADVENTURE 
and come back alive 7 



$14 95. 



(IMSondiM 



J 



LOST DUTCHMAN'S COLD 



Deep >n Ari/o"d s Supe'SMion mountains. unde» the watthtui «yt 
u. Apache Indians th* laWed LOST DUTCHMAN s GOLDMINE awaits 
in* adventure' bold enough to chaiiange the 'ates With only a mule 
and a Winchester and tne ghost ot an o*d goid p»ospecte* named 
BACKPACK SAM to guide rOu do you da»e To venture into the mist, 
mountains, where it *s said thai the Devil himsell p*otects the LOST 
DUTCHMAN S GOLD' 
S14 95 ■ 'at* Si»»5 " J.s* 



DEAT H DREADNAUGHT ADVEN TURE 

This m ncl ch'llmg thnl e- wil r-ee/e Ihe blood in you' veins You are 
lapped aboard an ancient alien batuecruiser whose entire cew was 
Tiuido-ed brutaly Too are the scout team s only survive Vou' ships 
been smashed, bul one alien shuttlecralt remains intact As you move 
about the wreck the dange' increases You musl secure an 'ood. luel 
I Da1tenes Now as presoous seconds ot your hie lick away you 
suddenly realize YOU ARE NOT ALONE' The creature that r.pped Ih.s 
sh,p apart is ALIVE and wailing lor you lo make a mistake CAN YOU 
SCAPE ' Or will YOU be the crealure s ne«l victim 

JM.95 ii lap* HMSondrat 

WARNING OEATH DHEADNAUGHT IS RATED R due lo 
t- rHtME descriptions ol VIOLENCE 






END CHECK OR M.O iSHlPMf NT WITHIN FIVE DAYS OF RECEIPT! 



SPECIAL 

TRIPLE ADVENTURE DISKETTE 

S35 00 

DOUBLE TAPS OR DISKETTE 

lADVENTURES OF YOUR CHOICE 

J24 9S 

DEALER INOUIRYS INVITED *• 364 



The 

I Programmers 

I Guild 



PC Box 66 

PeterDoro. NH 03458 

PH (603) 924*065 J 



^Reader Service- see page 226 



80 Microcomputing, September 1980 • 161 



APPLICATION 



An M.D.'s bookkeeping system. 



Doctor Your Records 



Wilbur A. Muehlig, M.D. 
726 N. 91 Plaza, #305 
Omaha, NE 68114 



When I was practicing medi- 
cine, my secretary kept a 
"daybook," entering each pay- 
ment made by a patient, adding 
totals for the day, the month 
and, finally, the year. 

When I left private practice, I 
continued the same general 



method of keeping track of in- 
come checks, but my usual 
practice was to let the arithme- 
tic go until the end of the year 
when my tax was due. At this 
time totaling my income was a 
rather discouraging job, but 
ideally suited to a computer. 

This bookkeeping program 
should be of interest to anyone 
owning a few stocks and bonds. 
It was written with the retired 
person in mind, and therefore in- 
cludes Social Security income, 
and annuity payments. 

The program, which handles 
up to 35 entries a month, ac- 
cepts eight types of entries: 
earned income, dividends, in- 



WH AT DO YOU WANT TO DO? 

1- DISK OPERATIONS 

2 -COMPUTATIONS 

3 -MAKE A FILE ENTRY 

4 -CORRECT AN ENTRY 

5- DELETE AN ENTRY 

6 -SEE A PRINTOUT ON VIDEO 

7 -MAKE A HARD COPY 

8- LEAVE THE PROGRAM 

CHOOSE? _1 



WHAT DO YOU WANT TO DO? 

1 - SAVE MONTHS FILE TO OISK 
2 -LOAD MONTH'S FILE FROM DISK 
3 -SAVE YEARLY TOTALS TO DATE 
4 - LOAD YEARLY TOTALS 
5-RETURNTOMENU 

CHOOSE? 1_ 



Table 1 



terest, annuity funds, tax-free in- 
terest, Social Security, life in- 
surance dividends, and miscel- 
laneous items. The first four are 
taxable, the next three untax- 
able and the last is for your 
records only. 

The program is written in Lev- 
el II BASIC for a TRS-80 with 32K 
and a single disk drive. But it 
can be easily modified to use a 
cassette. The printer has a line 
length of 61 characters, but can 
be compressed to fit into 40 col- 
umns. Though the program can 
be used without a printer, much 
of its benefit is lost. 



First Steps 

Choose MAKE A FILE ENTRY 
(number three in Table 1) when 
first using the program. Enter 
the day, the month and the 
source of the income; choose 
the type of entry, the amount 
(Table 2), and press enter. 

When you have finished mak- 
ing your entries, save them to 
disk using the first menu option 
and the disk option -SAVE 
MONTH'S FILE TO DISK (one in 
Table 1). Before adding more en- 
tries, load the previous ones 
with disk option two. 

You can use menu options 



i 

TO END FILE ENTRIES. TYPE 99 

DAY OF MONTH? 5 

SOURCE OF INCOME (NOT OVER 24 SPACES) 

? AT&T 

WHAT TYPE OF ENTRY? 

1-EARNED INCOME 5— TAX FREE INTEREST 

2-DIVIDEND 6-SOCIAL SECURITY 

3-INTEREST 7-LIFE INSURANCE DIVIDEND 

4-ANNUITY 8-MISCELLANEOUSITEM 

CHOOSE? 2 

AMOUNT OF DIVIDEND? 345.67 

1 DATE 5 AT & T DIVIDEND $ 345.67 

IF THE ABOVE IS INCORRECT, TYPE 1 . IF THE PART THEN DISPLAYED IS COR 
RECT. PRESS ENTER, OTHERWISE TYPE THE CORRECTION. 

NOTE: IF THE ERROR IS IN THE TYPE OF INCOME, DELETE THE WHOLE ITEM 
AND REENTER. 

IF THE ABOVE IS CORRECT. TYPE 2 TO GO ON? 

Table 2 



162 • 80 Microcomputing, September 1980 



Program Listing 



1 REM * PERSONAL INCOME LEDGER PROGRAM * 

2 REM * WILBUR A. MUEHLIG, M.D. * 

3 REM * 726 N. 91 PLAZA, APT. 305, 

4 REM * OMAHA, NE 68114 

11 REM * OCT. 1979. 

12 CLS 

13 PR INT: PR I NT: PRINT: PRINT: PRINT: PRINT: PRINT 

15 PRINTTAFM 23) 'INCOME LEDGER PROGRAM* : PRINT: PRINT: PRIN 

T 

20 INPUT "DO YOC WANT INSTRUCTIONS FOR USE (Y/N)"jZS 

30 If ZS-"Y" GOTO 4000 

40 CLEAR 500:DEFDBL E, D, I , A, T,G, L,C, F , R,Q: DEFINT B,J,K, 

H,X,Z,P:P1-1 

45 DEFSTR S,M,V,Y,U 

50 DIM S(35) ,E(25) ,DA(35) ,D(25) ,1(25) ,A(25) ,T<25) ,G(25) 

,L(35) ,C(25) ,F(35) ,R<35) ,M(12) 

52 DATA JAN, FEB, MAR, APR, MAY, JUN, JUL , AUG, SEP, OCT, NOV, DEC 

5 3 FOR H«l TO 12: READ M$(H):NEXT 
55 CLS: PR I NT: PRIST: PRINT: PRINT 

60 INPUT"YEAR OF THIS REPORT (MM) ";YS 

80 PRINT: INPVT"NUMBER OF THIS MONTH (1 TO 12) " jH 

100 CLS: PR I NT 

110 PRINT'WHAT DO YOU WANT TO DO? 

1-DISK OPERATIONS 
2-COMPUTATIONS" 

112 PRINT" 3-MAKE A FILE ENTRY 

4 -CORRECT AN ENTRY 

5 -DELETE AN ENTRY 

6-SLE A PRINTOUT ON VIDEO" 

113 PRINT" 7 -MAKE A HARD COPY 

8-LEAVE THE PROGRAM" 

114 PRINT: INPUT" CHOOSE", -J 

120 ON J GOTO 200,1262,600,800,1000,1225,1400,1600 

200 CLS: PRINT: PRINT: PRINT: PRINT: PRINT'WHAT DO YOU WANT 

TO DO? 

1-SAVE MONTH'S FILE TO DISK 
2-LOAD MONTH'S FILE FROM DISK 
3 -SAVE YEARLY TOTALS TO DATE" 

210 PRINT" 4-LOAD YEARLY TOTALS 

5-RETURN TO MENU" 

220 PRINT: INPUT" CHOOSE", -J 

230 ON J GOTO 240,270,299,349,235 

235 GOTO100 

240 IF S(l)-"" THEN PRINT'FILE EMPTY. ": INPUT" PRESS ENTE 
R";Z$:GOTO200 

241 OPEN"0",l,M(H) 

242 PRINT'SAVING MONTHLY FILE TO DISK " 

245 PRINT»1,P1 

250 FOR X=l TO Pl-1 

2 55 PRINT#1,S(X) : PRINT* 1 ,X;DA(X) ; E(X) j D{X) j I (X) ; A(X) ; T( 

X) ;G(X) ;F(X) ;C(X) 

260 NEXT:CLOSE 

265 PRINT: PRINT" MONTHLY FILE SAVED TO DISK":FOR Z-l TO 

500:NEXT:GOTO 100 

27 ON ERROR GOTO 180 

27 2 OPEN"l",l,M(H) 

275 INPUT#1,P1 

280 FOR X«l TO Pl-1 

285 INPUT»1,S(X) :INPUT*1,X,DA(X) , E(X) ,D (X) , I (X) , A(X) ,T( 

X) ,G(X) ,F(X) ,C(X) 

287 PRINTX;S(X) 

290 NEXT: CLOSE 

291 FOR X-l TO P1-1:L(X)-E(X)+D(X)+I(X)-*A(X) :R(X)-T(X) + 
G(X)+F(X)+C(X) :NEXT 

295 PRINT: PRINT"MONTHLY FILE LOADED. ";: INPUT" PRESS 
ENTER" ;Z$: GOTO 100 

299 IF ES-0 AND DS-0 AND IS=0 AND AS-0 AND TS-0 AND GS«= 
AND FS-0 AND CS-0 THEN INPUT'FILE EMPTY. PRESS ENTER 
."jZ$:GOTO200X 

300 V$-M{H)+Y$:OPEN"0",2,V$ 

305 PRINT: PRINT'SAVING YEARLY TOTALS TO DISK..." 

320 PRINT«2,ES;DS;IS;AS;TS!GS;FS:CLOSE 

330 GOTO 100 

349 ON ERROR GOTO 180 

359 V$»M(H-1)*Y$ 
355 OPEN'I",2,V$ 

360 PRINT: PRINT" LOADING YEARLY TOTALS...." 
370 INPUT#2,ES,DS,IS,AS,TS,GS,FS:CLOSE 
380 GOTO 100 

599 REM * TO MAKE A FILE ENTRY * 

600 CLS: PRINT: PRINT: PRINT 
602 FOR X - PI TO 50 

610 CLS:PRINT:PRINT:PRINT 

612 PRINTX 

613 PRINT: PRINT'TO END FILE ENTRIES, TYPE 99" 
615 PRINT: IF DA(X) <> PRINT DA(X);" "| 

620 INPUT'DAY OF MONTH" >DA(X) 

622 IF DA(X)-99 THEN Pl-X:GOTO 100 

630 IF S(X)<>" PRINTS(X))" "j 

640 PRINT: PRINT" SOURCE OF INCOME (NOT OVER 24 SPACES)": 

INPUT S(X) 

645 IF LEN(S(X)) > 24 PRINT"TOO LONG. TRY AGAIN. " :GOT06 

40 

660 PRINT'WHAT TYPE OF ENTRY? 

1 -EARNED INCOME 5-TAX FREE INTEREST 



2-DIVIDEND 6-SOCIAL SECURITY 

3-INTEREST 7-LIFE INSURANCE DIVIDEND 

4 -ANNUITY B-MISCELLANEOUS ITEM 

662 ON ERROR GOTO 17 00 

665 PRINT: INPUT"CHOOSE" jB 

670 ON B GOTO 6100,6200,6300,6400,6500,6600,6700,6800 

680 CLS: PRINT: PRINT 

690 PRINT: PRINTX ; " DATE" ;DA(X) ; " ";S(X)" "; 

691 IF E(X)>0 PRINT'EARNED INCOME " ; : PRINTUSING'SM* , 
M.M";E(X) 

692 IF D(X)>0 PRINT'DIVIDEND " ; : PRINTUSING'SM* , M . 1 1 
";D(X) 

693 IF I(X)>0 PRINT" INTEREST " ; : PRI NTUSI NC" S»M , »* . M 
•;KX) 

694 IF A(X)>0 PRINT'ANNUITY " ; : PRI NTUS ING" SM» , M . M " 
;A(X) 

695 IF T(X)>0 PRINT'TAX FREE INTEREST " ; : PRINTUSING"? 
Mt,M.M";T(X) 

696 IF G(X)>0 PRINT'SOCIAL SECURITY " j : PRINTUSING'SM 
♦ ,M.M";G(X) 

697 IF F(X)>0 PRINT"LIFE INS. DIV. ";: PRINTUSING'SM* 
,M.M";F(X) 

698 IF C(X)>0 PRINT"MISC. DEPOSIT " ; : PRINTUSING'SM* , 
M.M";C(X) 

7 00 PRINT: PRINT* IF THE ABOVE IS INCORRECT, TYPE 1. IF 

THE PART THEN DISPLAYED" 

705 PRINT" IS CORRECT, PRESS ENTER, OTHERWISE TYPE THE C 

ORRECTION." 

707 PRINT: PRI NT" NOTE: IF THE ERROR IS IN THE TYPE OF IN 
COME, DELETE THE WHOLE" 

708 PRINT" ITEM AND REENTER." 

709 REM * INCOME TYPE ERROR CAN CAI'SF. CONFUSION IK NOT 
DELETED * 

710 PRINT: INPUT"IF THE ABOVE l.S CORRECT, TYPK 2 TO CO O 
N";Z 

720 IF Z«l GOTO 610 
7 30 IF Z<>2 GOTO 710 
740 NEXT:GOTO10O 

799 REM * USES SAME CORRECTION SECTION AS FILE ENTRY * 

800 CLS: PRINT: PRINTsPRINT: PRINT 

810 PRINT'WHICH NUMBER DO YOU WISH TO CORRECT" 

815 PRINT:PRINT" (0 TO RETURN TO MENU) 

";: INPUT K 

817 IF K=0 GOTO 100 

820 FOR X«l TO Pl-1 

830 IFK=X GOTO 680 

840 NEXT 

850 GOTO 100 

999 REM * DELETES ENTRY AND RENUMBERS * 

1000 PRINT'WHICH NUMBER DO YOU WANT TO DELK.TE?" 

1002 PRINT" (0 TO RETURN TO MENU) ";:INP 

UT X 

1005 IF X=0 GOTO100 

1010 DA(X)=0:S(X)«"":E(X)«0:D(X)=0: I (X) «0 : A( X) =0 : T( X ) =0 

:G(X)-0:F(X)=0:C(X)=O:L(X) =0:P.(X) =0 

1020 FOR X=X+1 TO P1:DA(X-1)=DAIX) :S(X-1)«S(X) :E(X-1)«E 

(X) :D(X-1)-D(X) :I (X-l)-I(X) :A(X-1)-A!X) :T(X-1 ) -T(X) :G(X 

-l)-G(X) :F(X-1)«F(X) :C(X-1)=C(X) :L(X-1)=L(X) :R(X-1)=R(X 

) 

1025 NEXT 

1030 Pl-Pl-1 

1040 PRINT: PRINT'ENTRY DELETED. ": FOR Z=l TO 700:NEXT:GO 

TO 100 

1200 CLS :PRINTTAB( 16) "INCOME LEDGER FOR ";M(ID;" ";YS:P 

RINT 

1210 PRINT"** DAY SOURCE OF INCOME TAXABLE 

NONTAX . " 
1220 PRINT STR1NG$(54,45) : RETURN 
1225 GOSUB 1200 REM * ALLOWS REPRINTING OF HEADING ON 

EACH 
PAGE OF VIDEO * 
1230 FOR X = 1 TO Pl-1 

1235 IF X/11-INT(X/11) PRINT: INPUT'PRESS ENTER TO CONTI 
NUE";Z$:CLS:PRINT:GOSUB 1200 
1240 IF R(X)»0 PRINT USING"** »* % 

« $***,*(. »(";X;DA(X) ;S(X) ;L(X) 
1250 IF L(X)=0 PRINT USING"** M % 

% SM«,M.M":X}DA(X) ;S(X) ;R(X) 

126 NEXT: PRINT: INPUT" ENTER 1 TO RETURN TO MENU, 2 TO S 
EE YEARLY TOTALS ."; Z : IF Z«l GOTO 100 ELSE 1279 

1262 CLS:PRINT:PRINT:PRINT:PRINT"THE FOLLOWING COMPUTES 
INCOME TOTALS FOR THE MONTH AND FOR" 

1263 PRINT"THE YEAR. THE MONTH'S ENTRIES SHOULD BE COM 
PLETE, YOUR PRINTER" 

1264 PRINT"READY, AND THE YEARLY TOTALS INPUT FROM DISK 
BEFORE CONTINUING." 

1265 PRINT: PRI NT"TO RETURN TO MENU, TYPE 1, TO CONTINUE 
WITH THE COMPUTATION," 

1266 PRINT'TYPE 2 . " tPRINT: INPUT Z 

1267 IF Z-l GOTO 100 

1268 IF Z<>2 GOTO 1262 
1270 GOSUB 70 00 

127 9 CLS 

1280 PRINT" TOTALS FOR *;M(H);" ">Y$j" MONTH 

YEAR TO DATE" 
1282 PRINT 

1285 PRINT"TOTAL EARNED INCOME " i : PRINTUSING'SM 
It, Mt.M S»»M,M».M";ET,ES 

Program continues 



80 Microcomputing, September 1980 • 163 



PRINTUSING'SII 



PRINTUSING'SII 
PRINTUSING'SII 



PRINTUSING'SII 
PRINTUSING'SII 



PRINTUSING'SII 



' j : PRIN 



";:PRIN 
";:PRIN 



It % 

:L(X) 



1290 PRINT'TOTAL DIVIDENDS 
It, llt.lt Still, Mt.M";DT,DS 
1300 PRINT"TOTAL INTEREST 
lt.lt*. II Still, III. If; IT, IS 
1310 PRINT'TOTAL ANNUITY FUNDS 
11,111.11 $ttlt,ltl.tl';AT,AS 
1320 PRINT'TOTAL TAX FREE INTEREST 
It, III. It $lltt,ttt.tt";TT,TS 
1330 PRINT'SOCIAL SECURITY 
11,(11.11 Still, tit. tt";GT,GS 
1340 PRINT'TOTAL LIFE INS. DIV. 
It, til. II $1111, III. II";FT,FS 
1355 PRINT:U$-"$IHI,lll.lt" 
1360 PRINT'TOTAL TAXABLE INCOME TO DATE 
TUSINGU$;LS 

1370 PRINT'TOTAL NONTAX. INCOME TO DATE 
TUSINGU$;RS 

13B0 PRINT'TOTAL INCOME TO DATE 
TUSINGU$;Q 

1390 PRINT: INPUT'PRESS ENTER TO CONTINUE" ; ZS :GOTO 100 
1400 CLS:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT"IF YOUR PR 
INTER ISN'T READY, ENTER 1 TO RETURN TO MENU," 
1402 PRINT: INPUT" OTHERWISE ENTER 2.";Z:IF Z-l 

GOTO 100 

1405 CLS:LPRINTTAB( 32) "INCOME LEDGER FOR ";M(H);" ";YS: 
LPRINT"" 

1410 LPRINTTABU9) "II DAY SOURCE OF INCOME 
TAXABLE NONTAX." 

1420 LPRINTTABI19) STRINGS ( 54 , 45) 
1430 FOR X-l TO Pl-1 

1440 IF R(X)=0 LPRINTTAB(19) USING"** 
% SIII,lt.tt";X;DA(X) ;S(X) ; 
1450 IF L(X)=0 LPRINTTAB(19) USING"II II % 

% $tll,ll.ll";X;DA(X);S(X);R(X) 

1460 NEXT:LPRINTTAB(19) STRINGS ( 54 , 45 ): LPRINT" " 
1480 LPRINTTAB(19) " TOTALS FOR ";M(H);" ";YS;" 

MONTH YEAR TO DATE" 
1482 LPRINT'" 

1485 LPRINTTAB(19) "TOTAL EARNED INCOME ' 
TAB (19) USING" Silt I, III. 1 1 S 1 1 1 1 , 1 1 1 . 1 1" ; ET, ES 
1490 LPRINTTAB( 19) "TOTAL DIVIDENDS ' 

TAB(19)USING"$lttt,ttl.tt $*»»*, **».**";DT,DS 
1500 LPRINTTAB(19) "TOTAL INTEREST ' 

TAB( 19) USING" SHI 1,1*1.11 $•••(,)**.**"; IT, IS 
1510 LPRINTTAB( 19) "TOTAL ANNUITY FUNDS ";:LPRINT 
TAB(19)USING "$**•*, ft*. II Still, III. It"; AT, AS 
1520 LPRINTTAB(19) "TOTAL TAX FREE INTEREST " 
TAB (19) USING" $•••*, IM.lt $•••• , Ml . II" }TT, TS 
1530 LPRINTTAB( 19) "SOCIAL SECURITY ' 

TAB( 19) USING" Sit* I, ttt.lt S I I I I , I I I . t I " ; GT, GS 

1540 LPRINTTAB( 19) "TOTAL LIFE INS. DIV. 

TAB (19) USING" Stilt, III. II St 1 1 1 , 1 1 1 . 1 1 " ; FT, FS 

1555 U$-'$MM, *•*.•*" 

1557 LPRINT" 

1560 LPRINTTAB( 19) "TOTAL TAXABLE INCOME TO DATE 

"; :LPRINTTAB(19)USINGUS;LS 
1570 LPRINTTAB( 19) "TOTAL NONTAX. INCOME TO DATE 

"; :LPRINTTAB(19)USINGUS;RS 
1580 LPRINTTAB( 19) "TOTAL INCOME TO DATE 

"; :LPRINTTAB(19)USINGUS;0 
1590 PRINT: INPUT'PRESS ENTER TO CONTINUE" ; ZS :GOTO10O 
1600 CLS: PRINT: PRINT: PRINT: PRINT: PRINT: PRINT: PRINT: INPU 
T'HAVE YOU SAVED FILES TO DISK (Y/N)";ZS 
1610 IF 2$""N" GOTO 100 
1620 PRINT: PRINT'OK. SO LONG!":END 

1700 PRINT: INPUT" ENTRY ERROR. PRESS ENTER AND TRY AGAI 
N.";ZS:GOTO 665 

1800 PRINT: INPUT'NO FILE ON DISK. PRESS ENTER. "; ZS : GOT 
0100 

4000 CLS:PRINT:PRINT 

4010 PRINT" PERSONAL INCOME LEDGER" :P 

RINT 

4020 PRINT'l) DISK FILES ARE NAMED AUTOMATICALLY. THE 
MONTHLY FILES ARE" 

4030 PRINT'JAN, FEB, ETC. THE YEARLY TOTAL FILES ARE J 
AN1979, FEB1979," 

4040 PRINT'ETC., AND ACCUMULATE THE FIGURES FOR THE YEA 
R TO DATE." 
4060 PRINT 
4090 PRINT"2) MAKE ENTRIES FOR THE MONTH. SAVE TO DISK 

WITH DISK OPTION" 
4100 PRINT"*1. BEFORE ADDING ENTRIES FOR THE SAME MONT 
H, USE DISK OPTION" 

4110 PRINT"*2 TO LOAD THE PREVIOUS ENTRIES." 
4130 PRINT: INPUT'PRESS ENTER" ; ZS :CLS : PRINT: PRINT: PRINT 
4140 PRINT"3) UNDER TYPES OF INCOME, THE FIRST FOUR ARE 

TAXABLE, THE LAST" 
4150 PRINT'FOUR NONTAXABLE AND ARE SO RECORDED BY THE P 
ROGRAM." 

4160 PRINT'MISCELLANEOUS TYPES SHOULD INCLUDE SUCH THIN 
GS AS LOAN" 

4170 PRINT'REPAYMENTS, GIFTS, REFUNDS, ETC. MISCELLANE 
OUS ITEMS ARE NOT" 

418B PRINT'TOTALED INTO NONTAXABLE INCOME SINCE THEY DO 
N'T REPRESENT" 
4190 PRINT"INCOME.*:PRINT 

4200 PRINT"4) MENU CHOICES 4, 5 AND 6 MAY BE USED DURIN 
G PREPARATION OF" 
4210 PRINT'MONTHLY FILES." 
4220 PRINT: INPUT'PRESS ENTER" ; ZS :CLS 

4230 PRINT: PRINT" 5) WHEN A MONTHLY FILE IS COMPLETE, U 
SE DISK OPTION" 



: LPRINT 



LPRINT 



: LPRINT 



: LPRINT 



: LPRINT 



: LPRINT 



four (CORRECT AN ENTRY), five 
(DELETE AN ENTRY), or six (SEE 
A PRINTOUT ON VIDEO) at any- 
time while making these entries. 
Option four is also useful for 
checking the income type you 
have chosen, since it is not 
printed by either the video or 
hard copy printouts. 

After the month's entries are 
on disk, disk option four loads 
the yearly totals from the pre- 
vious month. Menu option two 
totals each type of income for 
the month and the year and 
displays the results. You can 
use disk option three to save the 
totals, menu option six for a 
complete video printout, and 
seven for hard copy (see Table 3 
for sample). 

Changes 

Change to cassette data files 



will require alterations between 
lines 240 and 370. Sequential 
disk files, which are used, are 
quite similar to cassette files, 
and use of the Level II Basic 
Reference Manual should make 
this change simple. 

Taxable items can be changed 
to nontaxable or vice versa in 
lines 7000-7070 and 6099-6820. 
Note that L( ) and R( ) collect the 
taxable and nontaxable items 
for printing in columns. Refer to 
the list of variables (Table 4) as 
necessary. 

Miscellaneous entries in- 
clude loan repayments, refunds, 
and money from the sale of 
stocks and bonds. The program 
doesn't handle capital gains be- 
cause of their special require- 
ments, but you can type the data 
on the back of the monthly 
pages. 



4240 PRINT'll TO SAVE IT TO DISK. NEXT, GET YOUR PRINT 

ER READY. IF THIS" 

4245 PRINT'RESULTS IN LOSS OF THE PROGRAM AND/OR MONTIII. 

Y FILE, RELOAD" 

4250 PRINT'THEM. THEN USE DISK OPTION 14 TO LOAD THE Y 

EARLY TOTAL FILE" 

4255 PRINT"AND MENU OPTION 12 FOR COMPUTATIONS. AT TH I 

S TIME, THE RESULTS* 

4260 PRINT'MAY BE CHECKED ON VIDEO (MENU OPTION 16) OR 

HARD COPY MADE* 

4270 PRINT"(OPTION 17). THE YEARLY TOTAL SHOULD BE SAV 

ED TO DISK BEFORE" 

4280 PRINT'LEAVING THE PROGRAM." 

4290 PRINT 

4310 PRINT"6) IT IS DESIRABLE TO KEEP A SET OF FILES ON 

A SECOND DISK" 
4320 PRINT'FOR BACKUP." 

4330 PRINT:PRINT"7) REENTRY TO THE PROGRAM, IF NEEDED, 
IS AT LINE 100." 

4340 PRINT: INPUT'PRESS ENTER" ; ZS : CLS : GOTO 40 
6000 END 

6099 REM * CLASSIFY INCOME AND SEPARATE INTO TAXABLE, L 
(X) , 

AND NONTAXABLE, R(X) * 

6100 IF E(X)<>0 PRINT E(X)> 

6110 PRINT: INPUT'AMOUNT OF EARNED INCOME" ; E (X ) 

6120 L(X) = E(X) :GOTO 680 

6200 IF D(X)O0 PRINT D(X); 

6210 PRINT: INPUT'AMOUNT OF DIVIDEND" ; D (X) 

6220 L(X) -- D(X) :GOTO 680 

6300 IF I(X)<>0 PRINT I(X); 

6310 PRINT: INPUT'AMOUNT OF INTEREST" ; I (X) 

6320 L(X) = I(X):GOTO 680 

6400 IF A(X)<>0 PRINT A(X); 

6410 PRINT: INPUT'AMOUNT OF ANNUITY" ; A(X) 

6420 L(X)=A(X) :GOTO 680 

6500 IF T(X)O0 PRINT T(X); 

6510 PRINT: INPUT'AMOUNT OF TAX FREE INTEREST" ; T ( X ) 

6520 R(X) -T(X) :GOTO 680 

6600 IF G(X)O0 PRINT G(X); 

6610 PRINT: INPUT'AMOUNT OF SOCIAL SECUR ITY " ;G (X) 

6620 R(X) =G(X) :GOTO 68e 

6700 IF F(X)<>0 PRINT F(X); 

6710 PRINT: INPUT'AMOUNT OF LIFE INSURENCE DIVIDEND" ; F (X 

) 

6720 R(X)=F(X) .-GOTO 680 

6800 IF C(X)<>0 PRINTC(X); 

6810 PRINT: INPUT'AMOUNT OF MISCELLANEOUS ITEM';C(X) 

6820 R(X)-C(X) :GOTO 680 

7000 REM * COMPUTATIONS » 

7B85 FOR X-l TO Pl-1 

7 010 ET=ET+E(X) :DT-DT+D(X) : IT-IT+I (X) :AT»AT+A(X) 

7020 TT-TT+T(X) :GT=GT+C (X) :FT=FT*F(X) 

7025 NEXT 

7030 ES=ES+ET:DS«DS+DT: I S- IS+ IT : AS-AS+AT 

7040 TS=TS+TT:GS=GS+GT:FS-FS+FT 

7050 LS-ES-t-DS+IS+AS 

7060 RS=TS*GS+FS 

7070 Q=LS+RS 

7 07 5 RETURN 



164 • 80 Microcomputing, September 1980 



Games from BIG FIVE will 
turn your computer into a 



SUPER NOVA 



© 




"Huge ASTEROIDS have invaded the 
galaxy! Your mission is to destroy them 
and the alien saucers before they de- 
stroy you!" Our #7 top selling game! 

$14.95 16K Livil I ir II 



TRS-80 
HOME ARCADE 

METEOR MISSION 9 BAUXY INVASION 




"The second Big Bang has occurred 
and the galaxy is full of stray meteors 
and asteroids. Can you survive to dock 
your ship with the space station?" 

$9.95 4K Livtl I or II 



■ OS 



The newest and most exciting Invaders- 
type game yet! Smooth sound effects, 
sharp graphics, and the "Flagship" alien 
from Super Nova combine to make this 
our finest TRS-80 game! 

(.95 16KUvillirll 



$14. 



BIG FIVE SOFTWARE CO. 

P.O. Box 9078-185 • Van Nuys, CA 91409 ^357 



All games © 1980 by Bill Hogue & Jeft Konyu 
TRS-80 is a trademark ot Tandy Corp 
When ordering specify Level I or II 
Please add S1 00 for handling, Calif res add I 
10% discount for two games, All 3 for $34 00. 
Dealer inquiries invited 




TRS-80's 



DISCOUNTS of 10% , 15% and More 
available. 

WE PAY Domestic UPS. shipping and 
insurance on minimum orders. 

NO TAXES are collected on out-of-state 
shipments. 

TOLL FREE Order Number 800 531-7466. 

OPEN 8:00a.m. to6:00 p.m., Central 
Time, Monday through Friday; 
9:00a.m. to6:00p.m.. Saturday. 



Pan American Electronics 



Incorporated 

a Radio /haek 

AUTHORIZED SALES CENTER 

1117 CONWAY MISSION, TEXAS 78572 

TOLL FREE ORDER NUMBER 800/531-7466 mmm 

TEXAS AND PRINCIPAL TELEPHONE NUMBER 512/581 2765 l^SU 



• Reaaer Service— see page 226 



80 Microcomputing, September 1980 • 165 



NEW FROM 




AUDEX 

SOUND EXPERIMENTER 

For TRS-80 Level II, I6K 



Gives you complete access to sounds, 
using multiple indexed routines. Jump 
to any of them instantly. Each sets up 
the parameters for a specific sound cat- 
egory. You input a few codes-hear the 
result immediately. Write the created 
sounds into your own programs, or add 
them to existing software. 

Needs RS 277-1008 ($10.95 from Radio 
Shack) or equivalent mini speaker /amp. 
tasy instructions are part ot AUDEX. 

CASSETTE, S9.95 

Florida residents add 4% sales ta\ 
ORDER TODAY FROM 




Suite 406, 537 S. Sequoia Drive 
West Palm Beach, FL 33409 ^ 217 



80SHROUD 




handling with check or money 
order. NYS residents add 7% tax. 

SYRACUSE R&D CENTER 

Box 125, DeWitt, N.Y. 13214 

"our 10th year in R&D' ^3be 






Disk Based 
Word Processor 






> 






'."1 1 **»"" 



-i : • •« • , , . 



Available Now! 



7 



so 



Mailing List Option 



7 



50 



■ffimTi 



^207 



444-] West First Ave. 

Vancouver, B.C. 

VBR 4H9 

6Q.4-22<4-3ia-7 




N E WDOS-80 — By Apparat Mix drives, chain commands, enhanced 
Disk BASIC. SUPERZAP in machine language, editor/assembler, 
printer spooling, etc. Excellent documentation 
#201007 (D) $149 95 

N EWDOS - This is TRSDOS with over 200 fixes and enhancements. 

35 track #201 002 (D) $49.95 

40 track. . . . #201001 (D)$59.95 
77 track. . . . #201005 (0) $59.95 

NEWDOS+ — Same as NEWDOS. but includes some mdispensible 

utilities such as SUPERZAP. editor/assembler, etc. 

35 track #201 004(D) $99 95 

40 track #201 003 (D) $1 1 

77 track #201 006(D) $1 10. 




BASIC COMPILER — By Microsoft. Develop your program in Disk 
BASIC, then compile it for up to 30 times the speed! 
#201207 (D) $195 

mmsFORTH — By Miller Microcomputer Services. Unconventional 
yet powerful, this language is recursive, interactive, and fast. 
#206000 (D) $79.95 

AIDS-3 — By Meta Technologies. In our opinion the best DBMS for 
the money. In fact we use it in our office Suitable for personal as well 
as business uses. Performs operations on multiple conditions Multi- 
key sort is machine-language assisted (it's f««t). MAPS-3 (included) 
lets you generate reports in standard or user-defined formats. 
#201 300 (D) $69.95 

LEVEL IV PRODUCTS INC, Dept 1 D9 

32238 SCHOOLCRAFT, SUITE F4 
LIVONIA MICHIGAN 48150 

1(800)521-3305 • in Michigan 



^14 



#201 301 (D) $24.95 

CORVUSTEN MEGABYTE DISK DRIVE- Imag.n. 95 

40-track drives all on line at once 1 Max Me seek time (searching all 95 
directories) is six seconds. Includes TRSDOS-compatible DOS. 
#105000 (call toll-free for price) 

THE CONSTELLATION - By Corvus. Each Constellation allows 
up to 8 TRS-80 - s (up to 64 TRS-80's with 8 Constellations) to share up 
to four Corvus drives simultaneously The standard Corvus DOS 
supports full communication between host processors. 
#105001 (call toll-free for price) 

MICROLINE-80 PRINTER - By Ok.data. Designed especially 
for the TRS-80, this printer supports true TRS-80 graphics, upper/lower 
case, software-selectable 40/80/1 32 columns, pin-feed, roll paper, or 

typing paper. Relatively quiet and portable #100002 $699 

TRACTOR (use for narrower forms) #100001 $1 10 

INVADERS+with sound #200140(C) $19 95 #200141 (D) $24.95 
PINBALL with sound #205111 (C) $14 95 #205122 (D) 20 95 

CYLON RAIDER #200104 (C) $7.95 

MEAN CHECKERS MACHINE -By Lance M.cklus 
#200123 (C) $19.95 

#200122 (D) $24 95 

from $19 95 

#200105 (C) $9.95 

Please add $2.50 for shipping and handling. 
COD add another $1.25 plus 25% deposit, balance 
certified check or cash. 
(313)525-6200 • Source:TCF541 



DUNJONQUEST FANTASIES 
ANIMATED HANGMAN with sound 



PRODUCTS FOR PEOPLE WHO CARE ABOUTTHEIRTRS-80-S^tfjl 

CALCS — Adds arithmetic manipulation to your reports ^ 




166 • 80 Microcomputing, September 1980 



This program considers life 
insurance dividends as nontax- 
able income, although they are 
actually premium refunds. You 
can change this by omitting 
" + FS" from line 7060. 

Annuity payments can also 
be modified to record a second 
earned income by changing the 
entry name im lines 660, 694, 
1310, 1510 and 6410. 

The printout is for five and 
one-half by eight and one-half- 
inch paper at 12 characters per 
inch. The printout itself is 54 
characters wide with a seven 
character margin. 

You can narrow the printout 
by as much as 14 characters by 
reducing the Source of Income 
heading from 24 to 10 and re- 
moving the same number of 
spaces from between the per- 
centage signs in lines 1440 and 
1450. Abbreviate other terms 
such as Total Earned Income 
(line 1485), and decrease the 
first number in STRING$(54,45) 
(lines 1420 and 1460). 

To use a 40 column printer, 
get rid of the margin by remov- 
ing TAB(7) after each LPRINT. 

If you decrease the hard copy 
width and want your video print- 
out to match, make the same 



changes in lines 1200 to 1390. 

About the Program 

The program asks for the year 
and month and automatically 
generates data files. In any 
month but January, the yearly 
total file will be from the preced- 
ing month. 

The program will allow you to 
return to the menu if you choose 
a wrong number. If you press the 
break key and get into BASIC, 
type GOTO 100 to get back to 
the menu without loosing data 
files. 

Line 240 saves the original file 
if you accidentally choose SAVE 
MONTH'S FILE TO DISK instead 
of LOAD MONTH'S FILE FROM 
DISK. Without some such safe- 
guard the program could file a 
string of zeros and erase the 
original file. Line 299 gives a 
similar safeguard for SAVE 
YEARLY TOTALS TO DATE. 

An ON ERROR GOTO pre- 
vents data loss if you choose 
LOAD MONTH'S FILE FROM 
DISK when there is no such file 
or pick LOAD YEARLY TOTALS. 

Using TRSDOS 2.2 or 2.3 in- 
stead of NEWDOS and without 
the ON ERROR protection, the 
above causes the program to be 



M 


DAY 


SOURCE OF INCOME 




TAXABLE 


NONTAX. 


1 


1 


TIAA 




S 


22568 




2 


1 


IA PS 




s 


153 00 




3 


3 


NWPS 




$ 


21250 




4 


3 


SS (PD TO BANKi 








S 418 10 


5 


3 


MASS MUT DIV 








$ 3315 


6 


S 


GAS SERV 




s 


160 00 




7 


'0 


NE INV TRUST 




s 


178 52 




8 


10 


TEXACO 




s 


50 00 




9 


15 


OMAHO NAT "L CORP 




s 


225 00 




10 


15 


MUNI INV TRUST 








$ 58 10 


11 


15 


TESORO 




s 


108 00 




12 


17 


CORP INC FUND 




s 


35.05 




13 


21 


KCP&L 




s 


256 00 




14 


29 


JAPAN FUND 




s 


15.00 




TOTALS FOR MAR 1979 


MONTH 


YEAR TO DATE 


TOTAL EARNED INCOME 


S 


000 




$ 0.00 


TOTAL DIVIDENDS 


t 


1.393.07 




$ 1.740 12 


TOTAL INTEREST 


s 


0.00 




S 000 


TOTAL ANNUITY FUNDS 


s 


225 68 




S 67704 


TOTAL TAX FREE INTEREST 


s 


58 10 




S 495 10 


SOCIAL SECURITY 


$ 


418.10 




$ 1.254 30 


TOTAL LIFE INS. OIV 


$ 


33 15 




S 99.67 


TOTAL TAXABLE INCOME TO DATE 






S 2,417.16 


TOTAL NONTAX INCOME TO DATE 






$ 1.84907 


TOTAL INCOME TO DATE 






$ 426623 






Table 3. Income Ledger for Mar 1979 



YS 


Year 


vs 


Yearly file name 


M() 


String, name of month 


H 


Number of month 


0A<> 


Day of month 


SO 


String, source of income 


E( I.ET.ES 


Earned income, monthly total, yearly total 


D( l.DT.DS 


Dividends, monthly total, yearly total 


KI.IT.IS 


Interest 


A| l.AT.AS 


Annuity 


T( I.TT.TS 


Tax tree interest 


CK l.GT.GS 


Social Security 


F( ).FT.FS 


Life insurance dividend 


C() 


Miscellaneous items 


L(> 


All taxable items 


LS 


Total taxable income to date 


R() 


All nontaxable items 


RS 


Total nontaxable income to date 


Q 


Total income to dale 


US 


Formatter 


X 


File counter 


B,J.K,2 


Counters and null 


P1 


Number of items plus one (99 to end entries) 


Table 4. Variables for Ledger Program 



booted out to BASIC rather than 
to DOS. If that should happen, 
the files can easily be saved by 
typing GOTO 100. The protec- 
tion, however, works the same 
with TRSDOS as with NEWDOS. 
In regard to disk space, none 
of my summary data has taken 



up more than one gran. Since 
the program requires nine 
grans, the total disk space, in- 
cluding the program, for a year 
comes to 32 grans and fits nice- 
ly onto one disk. Using hard 
copy, the same disk can be used 
year after year. ■ 



MORE FROM MANHATTAN 

APPLICATIONS 

CALCULATOR PLUS makes your TRS-80 a printing calculator, or 
an excellent on-screen calculator without a printer Chain and 
mixed calculations, memories for answer storage or calcula- 
tions with constants On-screen or printed review of long add- 
and-subtract operations Optional dollar format MPC-1 $9 95 

CHECKBOOK PLUS solves the problem of monthly bank state- 
ment reconciliation without cumbersome tape record-keep- 
ing just do your checkbook once a month and let Checkbook 
Pius handle all the details and find the errors MCB-1 $9 95 

CALCULATOR & CHECKBOOK PLUS on one cassette MC 2 $14 95 

THE LISTMAKER Powerful, versatile program allows entry of 
400 names or items, with codes, in 16K Lists by code onscreen 
or to printer Sorts, provides editing of entry or code, dump- 
ing, loading lists. Pull any category from list in seconds 

MLM-1 $9,95 

DIVERSIONS 

CIN RUMMY 2.0 plays a strong game, good enough to challenge 
an expert player Plays a full regulation game keeps score to 
game and changes strategy to counter opponent's play A pro- 
gram you'll enjoy playing against and trying to beat 

MCR-1 $14 95 

LABYRINTH run A fast action game, racing through sharp 
turns, slaloms and narrowing passages Set a record time -or 
hit a wall and you're out Each labyrinth has Sprint and Pull 
courses with three levels of skill A fascinating test of coordi- 
nation and skill High speed graphics MLR-1 $995 

E.S.P. LAB Based on the famous Duke university experiments. 
The computer selects symbols at random to display on the 
screen for ESP trials. Analyzes trial results for direct telepathy, 
precognition, postcognition. special tests for precognition and 
telekinesis Machine-language graphics MTL-1 S9 95 

MANHATTAN SOFTWARE. Inc. ^90 
P.O. box 5200 Grand Central station 
New York City, New York 10017 



■ Reader Service— see page 226 



80 Microcomputing, September 1980 • 167 



UTILITY 



A real time waster. 



Delay Loop 



Allans. Joffe 
1005 Twining Road 
Dresner, PA 19025 



If you've ventured into the 
'world of assembly program- 
ming you'll eventually need a 
delay or timing loop. Though 
there is no "best way" to delay a 
program, we can explore various 
methods. 

Basically a time delay loads a 
value into a register (or values 
into a pair of registers) and then 
decrements this value to zero. 
This means we also need a 
mechanism that tells the com- 
puter when it has decremented 
the initial value to zero, so that it 
can continue the program. 



The Zero Flag 

Consider Listing 1, loaded us- 
ing T-BUG. 

The C2 instruction in memory 
location is a JPNZ,NN which 
signals the computer that if the 
comparison of the contents of 
the D and A registers is not zero 
that it should go back to the 
location specified by the NN 
which in our case is 4A02. This is 
the location of the decrement in- 
struction. 

One thing that this routine 
does not take into account is 
that when decrementing a 
single register, the zero flag is 
operative. (This is not true when 
we come to the case of 
decrementing a pair of 
registers.) 

You notice that to continue 
the decrementing process, we 
had to tell the program to go 
back to a specific location. This 
means that if you did not load 
the program into the memory 
locations specified, you would 
have had to change the return 



4A00 


16 


4A01 


FF 


4A02 


15 


4A03 


3E 


4AQ4 


oc 


4A05 


BA 


4A06 


C2 


4A07 


02 


4A06 


4A 


4A09 


C3 


4A0A 


BO 


4A0B 


43 



Load register D with N (value to decrement) 
Hex lor 255 

Decrement value in D register 
Load the A register with zero this is 
the test value to show loop is done 
Compare value in D with value in A 
It this test shows A and D both zero the 
loop is finished If not pgm goes to 4A02 
and continues decrementing value in D 
When decrement is finished the program 
returns to " BUG which is at 4380 



Listing 1. 



FF 




■1 


FE 




2 


FD 




3 


FC 




■4 


FB 




5 


FA 




-6 


F9 




7 


F8 




•8 


F7 




9 


F6 




•10 


F5 




11 


F4 




■12 


F3 




•13 


F2 




•14 


F1 




15 


F0 


Table 1 


•16 


Minus Relative Ju 


mp Values 


(twos complement form) 



locations in 4A07 and 4A08. 

In Listing 2 we will use a 
relative jump instruction that 
obviates the need for such 
changes. This allows the pro- 
gram to relocate, for with the 
relative jump, the computer 
knows where it should go even if 
you change the origin of the 
routine. 

In this listing I've introduced 
the mnemonic form of the in- 
struction. 

This listing is considerably 
shorter than the first one for 



4A00 


16 


LDD.N 


4A01 


FF 




4A02 


15 


DECD 


4A03 


2C 


JRNZ 


4A04 


FD 




4A05 


C3 




4A06 


30 




4A07 


43 

Listing 2. 





several reasons. One is that the 
first example is used to il- 
lustrate the idea of comparing 
the contents of one register with 
another to determine when the 
zero condition is reached. The 
first listing tells the program 
where to go if the zero condition 
has not been reached. This 
takes three locations, while the 
new method uses but two loca- 
tions in memory. 

The jump relative instruction 
in location 4A03 works in con- 
junction with the FD information 
in location 4A04. We know that 
to make the loop decrement we 
have to keep returning to loca- 
tion 4A02. Location 4A02 is 
three steps back from location 
4A04, counting location 4A04 as 
step one. You have signaled the 
computer that this is what you 
want by inserting FD. 

What is the significance of 
FD? It is a minus three in twos 
complement form. If you had 
needed a relative jump of minus 
seven, then the FD would have 
become F9. Table 1 shows the 
relative jump values from minus 
one to minus 16. 

The absolute delays pro- 
duced by the simple timing loop 
using a single register is just 
about maximum when the 
register initial value is FF (255 
decimal). I say "just about" 
because if the initial value in the 
register is 00. then you have 256 
iterations of the loop, because 
the first decrement takes you 
from 00 to FF. 

This is a bone for the nit- 
pickers in the group. 



168 • 80 Microcomputing, September 1980 



Longer Delays 

If we need longer delays, we 
can insert another identical loop 
after the first one, but there is 
another route to travel. This 
method decrements a pair of 
registers. If one register can be 
packed with FF, then two regi- 
sters can be packed with FFFF. 

Remember, if we use a pair of 
registers we will have to resort 
to some sort of a compare 
operation as with Listing 1, 
because when you decrement a 
pair of registers, the zero flag is 
not automatically working in 
your behalf. Thus we need some 
program steps to get the zero 
flag back from vacation. 

Since the idea of the jump 
relative code seems to have 
merit we will go that route as 
well. When possible, I like to use 
the BC register pair for 
decrementing. BC seems to 
shout out "byte counter" and is, 
for me, a memory jogger. 

Running Listing 3, you notice 
that it takes more time before 
the program returns to T-BUG. 



4 A Of 


01 


LDBCNN 


4A01 


ff 




4A02 


FF 




4A03 


OB 


DEC BC 


4A04 


7ft 


LDA.B 


4A05 


BO 


ORB 


4A06 


B1 


ORC 


4A07 


20 


JRNZ 


4A08 


FA 




4A09 


Oil 




4A0A 


HO 




4A0B 


43 




Listing 


3. Decrementing 


the BC 


register 


pair. 



This tells us that we have 
achieved a much longer delay 
than when decrementing the 
contents of a single register. 
The delay is in the neighborhood 
of 1.1 seconds. 

The listing also uses the OR 
function, which is why we had to 
do what we did in memory loca- 
tion 4A04. 

To operate any of the logic 
functions, you have to call on 
the services of the A register. 

The jump relative figure in 
location 4A08 is equal to minus 
six (see Table 1), the proper 



value to get back to location 
4A03, which contains the DEC 
BC instruction. 

The above is but one viable 
routine, not the only one. 

The Interrupt 

Now let us get down to the 
business of combining a single 
register decrement and the 
register pair decrement to 
achieve significantly longer 
time delays. The game plan is to 
interrupt the decrement of the 
register pair while a single 
register decrements to zero. BC 
is the register pair in Listing 4 
and the D register is used as the 
interrupt register. 

When you load Listing 4 and 
RUN, be prepared to sit back for 
two minutes and 32 seconds 
before it returns you to T-BUG. 
The key element of the time 
delay is the value in location 
4A05, the value being 
decremented in the D register. 

If you change this value from 
FF to AA, then the delay time 
becomes one minute and 43 
seconds. If it is changed to 64, 



then the time delay is one 
minute and one second. Chang- 
ing this value to OA is going to 
give you a total time delay of 
about eight seconds. Thus this 
delay routine is quite flexible 
and should satisfy all but the 
most unusual needs. 

You will get the most good 
out of this exercise if you use 
the Breakpoint of T-BUG to ex- 
amine the program at various 
points. ■ 



4A00 


01 


LD BC.NN 


4A01 


FF 




4A02 


FF 




4A03 


OB 


DECBC 


4A04 


16 


LD0.N 


4A06 


FF 




4A06 


15 


DECD 


4A07 


20 


JRNZ 


4A08 


FD 




4A09 


78 


LDA.B 


4A0A 


BO 


ORB 


4A0B 


Bi 


ORC 


4A0C 


20 


JRNZ 


4A0D 


F5 




4A0E 


C3 




4A0F 


80 




4A10 


43 






Listing 


4. 




CetData Systems Presents 



^2»4 



WordMagic II 

Complete WORD PROCESSING 

designed specifically for 

The Radio Shack TRS 80 Model II Computer 

Wo'dMagic H" is a Word Processor designed speoti 
cally tot the Radio ShacK TRS 80 Model II Computet " 

FEATURES INCLUDE: 

•Mailing List/Labels Generation 

•Automatic Merging of Mailing Data 
with Text Files to created "PER- 
SONALIZED" Form Letters 

•Automatic wrap-around in text entry 

•Margination, Paging, Complete Cur- 
sor Movement 

•Complete Editing Commands— Inser- 
tion, Global Substitution, Overwrite, 
etc. 

•Centering, Smooth Right, Left Justify 

•Table of Contents Generation 

•Automatic Page Numbering 

•Variable Form Lengths 

•Underlining 

•Line Numbering 



•WWII UK te — l H. rUSDOS * BASIC inol ?,o..<M «.!» «DrdM >9 :C) 
(nKodxcloo- »"tii7j 1795 00 ttmfumi tio iCti *•• ten Mil 



CalData Sy ilirns ', S>* ) P.O. Box 178446 
Ssn Di«BO. CA 92117 (714)2722661 




■ Reader Service— see page 226 



80 Microcomputing, September 1980 • 169 



MATH 



A graphics generator with emphasis on aesthetics. 



Divine Proportions 



David ft Cecil 
Texas A&l University 
Kingsville, TX 78363 



Have you ever wondered 
about the size and shape of 
things, why paintings, books 
and cards have the dimensions 
they do? 

The programs included with 
this article are designed to help 



readers explore aesthetics. The 
programs generate rectangles, 
ellipses and boxes. Decide 
which ratio of adjacent sides- 
minor to major axis— presents 
the most pleasing figure to you. 

Diminishing Ratios 

The programs generate fig- 
ures of any size within bounds 
of the video display. The figures 
will then sequentially shorten 
one or more sides. Using the 
square as an example, it be- 
comes a rectangle, then a small- 
er rectangle and so on with the 
ratio of width to length going 
from 1:1 to 0:1. As the video 
pauses between changes, any 



key can be pressed to read the 
current width to length ratio 
from the screen. 

If preferences for this ratio 
were randomly distributed, 
there wouldn't be much point to 
this experiment. The interesting 
and remarkable fact is that most 
people prefer the same width to 
length ratio. This preference 
falls into a fairly narrow range 
centered at 0.618. 

Studies as far back as 1876 by 
G. T. Fechner in Germany con- 
firm this attraction. He found a 
definite preference at 0.62 and 
most results in the range 0.57 to 
0.67. 



An aesthetic preference for 
0.618 (actually 2/(1 +v/5) was 
known even before the time of 
Pythagoras. Its reciprocal is of 
fundamental importance. 

Called the golden ratio or di- 
vine proportion, it appears in 
many and diverse ways through- 
out mathematics, nature, art 
and architecture. This golden 
ratio is an irrational number 
1.61803398 and is often ex- 
pressed algebraically as a:b = b: 
(a + b). The number is also 
known as <t>, taken from the first 
letter of the name of Phidios, the 
Greek sculptor and planner 
under Pericles, who utilized the 
golden ratio in his work. 



REM PROGRAM TO DRAW SUCESSIVELY SMALLER RECTANGLES 

1 REM BY DAVID R. CECIL 

2 REM A SQUARE IS FORMED FIRST 

3 REM IF THE SCALE FACTOR IS ONE THEN THE SQUARE 

4 REM IS APPROX. 14.4 CM. PER SIDE 

10 INPUT" SCALE FACTOR BETWEEN AND 1";N 

20 INPUT" T (FOR TOP) OR L (FOR LEFT) " ;VS :CLS 

21 REM T DENOTES THAT THE TOP IS APPROACHING THE BOTTOM 

22 REM (THE HORIZONTAL DIM. IS DECREASING), WHILE 

23 REM L DENOTES THE LEFT APPROACHING THE RIGHT (THE 

24 REM VERTICAL DIM. IS DECREASING) 
30 X1«20+90*N:Y1=41-40*N 

35 REM FORM THE TOP LINE FROM (20, Yl) TO (XI, Yl) 

40 FOR X-20 TO XI 

50 SET(X,Y1) :NEXT X 

55 REM FORM THE RIGHT SIDE FROM (XI, Yl) TO (XI, 40) 

60 FOR Y-Yl TO 40 

70 SET(X1,Y) :NEXT Y 

7 5 REM FORM THE BOTTOM FROM (XI, 40) TO (20,40) 

80 FOR X-Xl TO 20 STEP -1 

90 SET(X,40) :NEXT X 

95 REM FORM THE LEFT SIDE FROM (20,40) TO (20,Y1) 

100 FOR Y-40 TO Yl STEP -1 

110 SET(20,Y) :NEXT Y 

120 GOSUB 300 

125 REM LINES 140 TO 210 RE USED FOR CHANGING THE TOP, 

126 REM WHILE LINES 220 TO 290 ARE FOR CHANGING THE LEF 

T SIDE 
130 IF V$-"L" THEN 220 
135 REM ERASE TOP LINE 
140 FOR Y-Yl TO 40 



150 FOR X-20 TO XI 

160 RESET(X,Y) :NEXT X 

165 REM FORM NEW TOP LINE 1 LINE BELOW OLD TOP LINE 

170 FOR X=20 TO XI 

180 SET(X,Y+1) :NEXT X 

190 GOSUB 300 

200 NEXT Y 

210 END 

215 REM ERASE LEFT LINE 

220 FOR X-20 TO XI 

230 FOR Y«Y1 TO 41 

240 RESET(X,Y) : NEXT Y 

245 REM FORM NEW LEFT LINE 1 LINE TO RIGHT OF OLD LEFT 

LINE 
250 FOR Y=Y1 TO 40 
260 SET(X+1,Y) :NEXT Y 
270 GOSUB 300 
280 NEXT X 

290 END 

291 REM SUBROUTINE 300 PRODUCES A PAUSE AND ALLOWS YOU 

292 REM TO READ, BY PRESSING ANY KEY, THE RATIO OF 

293 REM SHORTER SIDE TO LONGER SIDE 
300 FOR Z-l TO 300 

310 IF INKEYS-"" THEN 340 

320 IF V$»"L" THEN PRINT#950,(X1-X)/(90*N) ;:GOTO 340 

330 PRINT8950, (40-Y)/(40*N) ; 

340 NEXT Z 

350 RETURN 



Program Listing 1. The Square 



170 • 80 Microcomputing, September 1980 



The Divine Proportion by H. E. 
Huntley and The Geometry of 
Art and Life by M. Ghyka have 
numerous examples of the oc- 
currence of the golden ratio; 
such as multiple reflections of 
light, arrangement of leaves on 
plants, the musical chromatic 
scale, the great pyramid, the 
human figure, dynamic sym- 
metry, and on and on. (Both 
books are published by Dover 
Books.) 

Take a look at the computer 
programs. The first one gener- 
ates a square of any desired 
size. Then, having asked wheth- 



er to shorten the vertical or the 
horizontal dimension, it pro- 
ceeds to do so. 

Note that the ratios given on 
the screen are approximations. 
Pixels are not square and scale 
factors are used in evaluating 
each ratio. If the lengths of lines 
are measured directly on the vid- 
eo screen, the ratios obtained 
may differ slightly from those of 
the program. 

The second program gener- 
ates nine ellipses, pausing after 
each one. The major axis stays 
constant and may be desig- 
nated horizontal or vertical. Use 



10 INPUT"ENTER SCALE FACTOR BETWEEN AND . 865";N 




20 Xl-20+90*N:X2-(Xl-20)/3 




30 Yl=41-40*N:Y2-(40-Yl)*(4/21) :CLS 




35 REM DRAW FRONT TOP LINE 1 




40 FOR X=20 TO XI 




50 SET(X,Y1) :NEXT X 




55 REM DRAW FRONT RIGHT SIDE 2 




60 FOR Y«Y1 TO 40 




70 SET(X1,Y) :NEXT Y 




7 5 REM DRAW FRONT BOTTOM LINE 3 




80 FOR X=X1 TO 20 STEP -1 




90 SET(X,40) :NEXT X 




95 REM DRAW FRONT LEFT SIDE 4 




100 


FOR Y=40 TO Yl STEP -1 




110 


SET{20,Y) :NEXT Y 




115 


REM DRAW RIGHT TOP LINE 5 




120 


FOR X=X1 TO X1+X2 




130 


SET(X,Y1-(Y2/X2)*(X-X1) ) :NEXT X 




135 


REM DRAW RIGHT BACK VERTICAL LINE 6 




140 


FOR Y=Y1-Y2 TO 40-Y2 




150 


SET(X1+X2,Y):NEXT Y 

REM DRAW RIGHT BOTTOM LINE 7 




155 




160 


FOR X=X1+X2 TO XI STEP -1 




17 


SET(X,40-(Y2/X2)*(X-X1) ) :NEXT X 




17 5 


REM DRAW LEFT TOP LINE 8 




180 


FOR X»20 TO 20+X2 




190 


SET(X,Y1-(Y2/X2) *(X-20) ) :NEXT X 




195 


REM DRAW BACK TOP LINE 9 




200 


FOR X-20+X2 TO X1+X2 




210 


SET(X,Y1-Y2) :NEXT X 




215 


REM DRAW LEFT BACK VERTICAL LINE 10 




220 


FOR Y-Y1-Y2 TO 40-Y2 STEP 2 




230 


SET(20+X2,Y) :NEXT Y 




235 


REM DRAW BACK BOTTOM LINE 11 




240 


FOR X-20+X2 TO X1+X2 STEP 2 




250 


SET(X,40-Y2) :NEXT X 




255 


REM DRAW LEFT BOTTOM LINE 12 




260 


FOR X=20 TO 20+X2 STEP 2 




27 


SET(X,40-(Y2/X2)*(X-20)) :NEXT X 




27 2 


FOR Z=l TO 300:NEXT Z 




27 5 


REM LOWER THE FRONT TOP LINE 1 




280 


FOR X=20 TO XI 




290 


RESET(X,Y1) :SET(X,Y1+1) :NEXT X 




295 


REM LOWER RIGHT TOP LINE 5 




300 


FOR X-Xl TO X1+X2 




310 


RESET(X,Y1-(Y2/X2)*(X-X1)) 




320 


SET(X,1+Y1-(Y2/X2)*(X-X1) ) :NEXT X 




325 


REM LOWER BACK TOP LINE 9 




330 


FOR X=X1+X2 TO 20+X2 STEP -1 




340 


RESET(X,Y1-Y2) : SET (X , Y1-Y2+1 ) :NEXT X 




345 


REM LOWER LEFT TOP LINE 8 




350 


FOR X»20+X2 TO 20 STEP -1 




360 


RESET(X,Yl-(Y2/X2)*(X-20) ) 




37 


SET(X,l+Yl-(Y2/X2)*(X-20) ) :NEXT X 




37 5 


REM REDRAW TOP PART OF LEFT BACK VERTICAL LINE 10 




380 


FOR Y-Yl TO Y1-Y2+2 STEP -1 




390 


RESET ( 20+X2,Y) : NEXT Y 




400 


FOR Y"Y1 TO Y1-Y2+1 STEP -2 




410 


SET(20+X2,Y) :NEXT Y 




415 


REM ROUTINE TO PRINT RATIOS IF DESIRED 




420 


FOR Z-l TO 300 




430 


IF INKEY$="" THEN 450 




440 


PRINT0950, (40-Yl)/(40*N) ;SQR(X2 [ 2+Y2 [ 2)/ ( 40-Y1) /l . 

5; 
NEXT Z 


9 


450 




460 


Y1=Y1+1 




470 


IF YK40-V2 THEN 280 ELSE STOP 

Program Listing 2. The Ellipse 





the break key to terminate this 
program. 

Most people prefer an ellipse 
with a minor to major ratio in the 
range .57 to .67. The 5.4 value 
used in line 90 can be changed 
to something a bit smaller (such 
as 5.1) to shorten the horizontal 
width. If it is made higher (such 
as 5.6), the horizontal dimension 
is lengthened. Keep this in mind 
if you find that the ratios are not 
quite true in the video represen- 
tation. 

Changing the 90 in step 60 to 
a smaller value will display few- 
er points (try 45), while more 
points will be displayed for val- 
ues larger than 90 (such as 180). 
The program will only display 
one ellipse at a time, if 60 is 
changed to 50 in line 170. 

To generate other ellipses, 
change line 190. Be sure all data 
values are less than 10 so that 
the ellipse does not exceed the 
size of the video screen. 

The Parallelepiped 

The last program generates a 



box (rectangular parallelepiped) 
with square front and back. The 
top is gradually lowered. Ratios 
of vertical to horizontal and 
slant (depth) to the vertical 
dimension are given. 

Fig. 1 should be used in con- 
junction with Program Listing 3. 
The numbers in the program's 
REM statements refer to lines of 
the box represented in the fig- 
ure. 

Preferences for box sizes are 
not nearly as pronounced as for 
the rectangle, but four of the 
more interesting box dimen- 
sions are: 

• 1,0,4> — used for the Golden 
Chamber containing the tomb of 
Rameses IV. 

• 1,1, <t>— found for the vol- 
ume of a stool of Tutankha- 
men's tomb. 

• 1,<M> 2 — called the "Golden 
Solid" and often used for Egyp- 
tian tombs. 

• 1 ,<J> 2 ,<t> 3 — found to be the 
volume in many pieces of furni- 
ture of the Queen Anne and 
Chippendale styles. ■ 



<20*X2,YI-Y2)i 



(20.YI ) 




XI* X2, YI-Y2) 



( XI+ X2. 40-YZ) 



Fig. 1 



ON ERROR GOTO 200 

10 PRINT'CHOOSE SCALE FACTOR BETWEEN AND 1": INPUT N 

20 W-10*N:A-W:B-W 

30 PI-3.14159:WW=10 

40 PRINT" INPUT H FOR CONSTANT LENGTH MAJOR AXIS TO BE H 

ORIZONTAL.V FOR CONSTANT LENGTH VERTICAL MAJOR AXI 

S": INPUT D$ 
50 CLS 

60 FOR 1=0 TO 2*PI STEP 2*PI/90 
70 IF D$«"V" THEN A=W ELSE B=W 
80 Xl»A*COS(I) :Y1-B*SIN(I) 
90 X-65+5.4*Xl 
100 Y»23-2.3*Y1 
110 SET(X,Y) 
120 NEXT I 
130 FOR P-l TO 300 
140 IF INKEYS-"" THEN 160 
150 PRINT859, WW/10; 
160 NEXT P 

17 READ WW:W-WW*N:GOTO 60 
180 GOTO 180 

190 DATA 8.3,8,7.5,6.7,6.2,5.7,5,4 
200 RESUME 180 

Program Listing 3. The Box 



80 Microcomputing, September 1980 • 171 



The Micromatic 80, a step 

ahead for your TRS-80™ 
and other microprocessors. 





The Micromatic 80 is a TTL based interface unit designed to 
grate the popular Radio Shack TRS-80®, and many other processors 
with parallel Centronics™ compatible output, to the IBM manufactured 
Selectrlc'" terminal. 

• used IBM selectrlc terminals are cleaned and functionally cnecked before shipping. 

• 90 day warranty on Interface only. • Mail or pnone orders accepted. 

• No software required. • Certified Check, Money Order. 

• $795. plus $25. for shipping and handling. f^^Kl P*™"! 

• TRS-80 to Centronics cable $29.00. WK 

Write or call for Free Brochure (317) 299-8614 

Thc ffll§j§ffllffl€ Gofp«*lon 

5747 w. 85th Street • Indianapolis, Indiana 46278 



• 425 



C TR5 arj > 



TRS-80 Model I 



fTlDDEL 3 

call tadaLjt 




699 



Model II 



Level II 16K. 26-1056 



3499 




We accept check, money order or phone 
orders with Visa or Master Charge. 
(Shipping costs added to charge orders). 



64K, 1-Disk TRS-80 
Model II System 

CHARGE IT 



Cam p UtEfS Unlimited 



1524 OAK HARBOR ROAD PREMONT OHIO «342(. 



us-aaE-usBi 

" " 32 ' Collect 




"fn|" LEVEL II 

SOUND STX 

REALTIME DISPLAY 
OF SOUND INPUT WITH 
RECORDER MIKE 
MACHINE LANGUAGE 
PROGRAM LISTING OF 
LESS THAN 100 BYTES 
FULL LOUDNESS DEPTH 
FROM UNMODIFIED '80 
WITH CTR-41 RECORDER 
DISPLAY MOVES TO 
MUSIC OR VOICE 
FOR EXPERIMENTS OR 
LAZY VIEWING SEND 
6.00 CK OR MO WITH 
STAMPED SELF AD- 
DRESSED ENVELOPE TO 

EDF ^359 

BOX 3054 

BRANFORDCT. 

06405 




Tv-l .|- 



A 

Income 

with your TRS 80 

Everyone is feeling the bite of inflation 
but some TRS-80 owners have found a 
way to ease tbe pain. Some are making a 
few hundred extra dollars and a few are 
making thousands of dollars in their spare 
time. Our booklet "Money Making Ideas 
lor the TRS-80" is a collection of these 
money making methods, along with pro- 
gram sources, program hints, getting 

stai ted suggestions and pit-falls to avoid. 
Send $9.95 to: 

JSlR Electronics 

P.O. Box 492 ^398 
Crystal City, MO 63019 

TRS-tO ii a iredwrwfe of trie Ratj*o Sftech Ovts*on of Tandy Corpofalion 



172 • 80 Microcomputing, September 1980 



UTILITY 



Write a moving story. 



Walking Words 



Hubert C. Borrmann 
2840 South Circle Dr. H209 
Colorado Springs, CO 80906 



The subroutine described 
■ here moves several instruc- 
tions, or a message, across the 
TRS-80 screen from right to left, 
and repeats until any key is 
pressed. It shortens messages 
to 58 positions and inserts one 
period in front of the message 
and two periods at the end to 
show messages as unbroken 
bands. 

To use the subroutine, a 
message is placed in variable 
S1$. The variable is linked to the 
subroutine as follows: 



100 S1$= 'TYPE SPACE' WHEN 
READY'' 

110GOSUB 10000 



This will move your message 
on the bottom line from right to 
left and repeat it. Should you 
desire to have the message 
move on another line, place the 
beginning address of this line in- 
to variable SA and link to entry 
point 10100, as follows: 



100 SU='TYPE 'SPACE WHEN 
READY" 

110 SA = 512 
120GOSUB 10100. 



The value of whatever key has 
been pressed will be returned to 
the main program in S6S; and 
S 1 $ will not be destroyed at exit. 

Pressed for Space 

There are several comments 
in the subroutine which you may 
leave out if pressed for space, 
but the comments are in fact 
very handy in any subroutine. 
The subroutine will shorten 
messages to 58 positions and 
will insert one period in front of 
the message, and two periods at 
the end. This will make it appear 
as an unbroken band. The time 
delay after each execution of 
the print instruction may be 
changed in line 10180. 

Entry point 10000 will print 
the message on the bottom 
line, while entry point 10100 or 
101 10 bypasses loading the SA. 
These lines assume that SA was 
loaded in the main program with 
the starting address. 

Line 10110 fills the "back- 
ground" with periods. The next 
three lines adjust the length, 
determine the highest print posi- 
tion on the line for centering and 
insert the periods in the mes- 
sage variable. 

Line 10150 resets several 
variables so that S4$ extracts 
the characters to be printed out 
of S1$ until S4$ is equal to S1$. 
On every pass the effective print 
position is advanced by one. 

S3, which points to position 1 
in S1$, remains one. S2 in- 
dicates the number of positions 
to be extracted and is increased 



by one on each pass. 

After the complete message 
appears on the screen (S7 = S9), 
the length of S4$ is reduced by 
one on each pass, controlled by 
S2. 

S3 is increased by one each 
pass, so that S4$ extracts the 
second to the last character out 
of S1$. Then the third to the last 
is extracted etc., until its length 
is zero. The effective print posi- 
tion remains unchanged. 



The program then branches 
to 10150 and the process is re- 
peated until the test of S6$ indi- 
cates a key or space is de- 
pressed. The print line is reset to 
spaces and the periods are re- 
moved from S1$. This allows a 
subsequent GOSUB without re- 
loading S1$. 

At this point the subroutine 
then returns to the main pro- 
gram. I find this routine quite 
handy, and you might, too. ■ 



le CLEAR 200 : CLS 
20 PRINTS 128, "INSTRUCTIONS I 1" 
30 Sl$-"PRESS 'SPACE' WHEN READY" 
40 GOSUB 10000 

PRINTS 512, "INSTRUCTIONS 



t 2" 



50 CLS 

60 SA-640 

70 GOSUB 10100 

80 CLS : PRINTS 0,"AND MORE INSTRUCTIONS" 

90 S1S-"TYPE 'SPACE'-BAR TO CONTINUE^ 'E' TO END" 

100 GOSUB 10000 

110 IF S6$«"E" THEN END ELSE 20 ff 

10000 SA-960:GOTO 10110 ' MOVING-BA1TO-SUBROUTINE 

10010 ' AT ENTRY SIS CONTAINS THE MESSAGE, UP TO 58 CHA 

RACTERS 
10020 * AT EXIT S6S CONTAINS VALUE OF DEPRESSED KEY 



S2 

S3 
S4 5 
S5 

SI 
S8 
S9 
SA 



10030 ' OTHER 

AY ED 
10040 ' VARIABLES 
10050 ' 
10060 ' 

N 
10070 ' 
10080 ' 
10090 ' 
10100 ' 

N 
10110 PRINTS SA,STRING$(63,".") ; 
10120 S2»LEN(S1S) : IF S2 > 58 THEN S2-58 
10130 S5-INT(SA+(64-S2)/2)+S2 
10140 S4$-MID$(S1S,1,S2) : Sl$=". 
10150 S7-0 : S9-LEN(S1S) : S2-S9 
10160 IF S2-> S7 THEN S2 - S7+1 
10170 S4$«MID$(S1$,S3,S2) 
10180 PRINTSS5-S7,S4Sj : FOR S8-1 TO 15 
10190 S6S-INKEYS : IF S6S <> "" THEN 10230 
10200 IF S7-S9 THEN 10220 
10210 S7-S7+1 : IF S7 < S9 THEN 10160 
10220 S2-S2-1 : S3 - S3+1 : IF S2 <0 THEN 10150 ELSE 10 

160 
10230 PRINTS SA, STRINGS (6 3," "); : SlS-MIDS (SIS, 2, LEN (S 

lS)-3) 
10240 RETURN ' END OF THIS SUBROUTINE 



LENGTH OF MESSAGE TO BE DISPL 

STARTING POSITION IN STRING 

WORKING STRING 

HIGHEST PRINT ADRESS ON SCREE 

WORK VARIABLE 

LENGTH OF SIS 

START ADRESS OF LINE ON SCREE 



'+S4S+* 
: S3-1 



NEXT S8 



Program Listing 



80 Microcomputing, September 1980 • 173 



APPLICATION 



A supermarketing program for creatures of impulse. 



Mind Your A's & P's 



Lois L. Leonard 

12733 Sione Canyon Rd. 

Poway, CA 92064 



Ah, the joys of grocery shop- 
ping! Your delight at find- 
ing the local social club is meet- 
ing in the aisles of your store. 
The rapture when you realize the 
next item on your list is on the 
other side of the market. The 
treasure hunt to locate where 
they hide capers. 



© 



If that's how you feel about 
grocery shopping, maybe this 
article is not for you. This pro- 
gram produces a grocery list 
that leads you past aisles that 
contain nothing you need -pre- 
venting your buying all those nif- 
ty impulse items — and gets you 
to the check-out counter quick- 
ly, saving both time, steps and 
money. 

Groceries Are Data 

The program, written on a 16K 
TRS-80, loads in 7K and runs in 
over 10K. It requires a printer 
and a light pen, but can be easily 



CLE** SCREEN 
SET END 

IN P»IN' 




"HE* 

MIN 






re-written for keyboard input. 
The light pen is a simple device 
that plugs into the tape recorder 
input port in the back of the key- 
board. My pen is from Oasis Sys- 
tem and the routine in this pro- 
gram is taken from their instruc- 
tion manual. 

The DATA statements are gro- 
ceries listed by aisle number. 
Unless you have the same store 
layout, a trip to the store with 
pen and paper is in order. On the 
same trip study how you shop. 
Do you like to start at one end or 
the other? 

List each aisle and beneath 
these headings list the items 



you normally use. Leave a blank 
for novelty foods and rarely pur- 
chased items. 

If there are a large assortment 
of items normally purchased on 
one aisle, make each side a sub- 
category. For example, see Ai- 
sle 11 in the program. 

The data for each heading is 
laid out beginning with an as- 
terisk. The second and third 
characters are the number of 
items in the aisle. The remaining 
characters name the aisle. If an 
item is dropped or added, the 
number of items in the list must 
be changed. Also, an "end" must 
be used, and it must be counted 




PRINT ON SCREEN 



r 



STORE -EM 
fOUNO 
SCREMES' 



Fig. 1. Printer Routine 



Fig. 2. Grocery List by Light Pen 



174 • 80 Microcomputing, September 1980 



as an item. 

The program is set up with a 
maximum of 20 items per aisle. 
More than 20 slows down the 
light pen search. If the program 
is to be rewritten tor keyboard 
input, items would be limited on- 
ly by your screen space. 

On items that need further ex- 
planation put " " in front of 

them. Examples of this are 

" Jello", " spices", 

" jelly". There are too many 



varieties of spices to list sepa- 
rately. When " spice" is 

chosen, the printer skips a line 
before the item and leaves you 
room to write the name of the 
spice. 

Some of the benefits of this 
program surprised me. On my 
first test trip, I was able to do my 
ordinary shopping minus one- 
half hour of time. After using it 
for a month, I found I was buying 
fewer impulse items. ■ 



10 REM 



PEN 



Program Listing 



GROCERY LIST USING THE LIGHT 



WRITTEN BY LOIS L. LEONARD 
SEPTEMBER 1979 



PRINT ARRAYS AND TEST FOR 



20 REM 

30 REM 

40 REN 

50 DIM LT(25),LT$(350),ST$(3S0),LST(40),LST$(40) 

55 REM 

60 REM READ DATA STATEMENTS INTO 

ARRAYS 
7 REM 

7 5 CLS: PRINT* 468, "LOADING DATA" 
76 FOR Y = 1 TO 20:READ LT(Y):NEXT Y 
80 FOR X = 1 TO 350 
100 READ LTS(X) 

105 IF LT$(X)-"*END" THEN GOTO 130 
110 NEXT X 
130 X=0:A«1:FG»1:B-1 
140 REM 
150 REM 

HEADING 
160 REM 
165 CLS 

170 X-X+1:Y=Y+1 

180 IF LEFT$(LT$(X) ,1)-"*" THEN GOTO 260 
190 PRINT* LT(Y)+4,LT$(X) ; 
195 LST(B)=LT(Y) :LST$(B)«LTS(X) :B«B+1 
200 GOTO 170 
220 REM 

230 REM HEADING ROUTINE 

240 REM 

260 IF FG=2 THEN COTO 360 
265 OLEN(LT$(X) ) :Y=0 
270 PRINT* 20, RIGHTS (LTS (X) ,C-3) 
280 J1$=MID$(LT$(X) ,2,2) 
282 LST(0)»VAL<J1$) 
285 B-l 

290 ST$(A)-LTS(X) 
300 A=A+1 
310 FG-2 
320 GOTO 170 
330 REM 

340 REM LIGHT PEN SEARCH 

350 REM 

360 GOSUB 9100 

370 IF LST$(SCAN)0"END"GOTO 430 
375 IF LTS(X)""*END" THEN GOTO 490 
380 FG=1 
385 CLS 
390 GOTO 180 
400 REM 

<10 REM STORE ITEM FOUND 

420 REM 

430 ST$(A)»LST$(SCAN) 
440 A=A+1 
450 GOTO 360 
460 REM 

470 REM PRINT OUT GROCERY LIST 

480 REM 
490 CLS 

495 ST$(A)«"*END" 
500 PRINT "READY PRINTER" 
510 PRINT" HIT ENTER WHEN READY" 
520 AS-INKEY$: IF AS-"" THEN 520 
530 A-PEEK(14312) : 'PRINTER CHECK OUT ROU 

TINE 
540 IP A«63 GOTO 600 
550 IF A»255 PRINT'PRINTER IS TURNED OFF":GOTO500 

IF A>223 PRINT'YOU HAVE A PAPER PROBLEM" :GOTO 500 

A-l 

IF ST$(A)«"*END" THEN PRINT "END OF LIST": END 
620 IF LEFTS(ST$(A) ,1)="*" GOTO 660 
625 IF LEFT$(ST$(A),1)-"-" THEN LPRINT 

TO WRITE 
630 LPRINT STS(A) 
640 A=A+1 



560 
600 

610 



": "ALLOWS SPACE 



MAGIC LIGHT PEN S 



650 GOTO 610 

660 IF LEFT$(ST$(A+1),1)="*» GOTO 700 

670 C-LEN(ST$(A) ) 

680 LPRINT TAB(5) RIGHTS (STS (A) ,C-3) 

7 00 A=A+1 

710 GOTO 610 

9000 OUT 255,0 

9010 FOR Z=0 TO 6:NEXT Z 

9020 LP-(INP(255) AND 128) 

9030 RETURN 

9100 REM 

UBROUTINE 
9110 L-LST(0) 
9120 C$»CHR$(140) 
9130 FOR 1-1 TO L 
9140 PRINT* LST(I),C$; 
9150 NEXT I 
9160 GOSUB 9000 
9170 IF LP»0 GOTO 9160 
9180 SCAN-1 

9190 PRINT* LST(SCAN)," "j 
9200 GOSUB 9000 
9210 IF LP=0 GOTO 9260 
9220 PRINT* LST(SCAN) ,C$; 
9230 SCAN=SCAN+1 
9240 IF SCAN<= L GOTO 9190 
9250 GOTO 9160 
9260 PRINT* LST(SCAN) ,C$; 
927 GOSUB 9000 
9280 IF LP=0 GOTO 9160 
9290 CNT-2 

9300 PRINT* LST(SCAN), " "; 
9310 GOSUB 9000 
9320 PRINT* LST(SCAN) ,C$j 
9330 IF LPO GOTO 9180 
9340 GOSUB 9000 
9350 IF LP -0 GOTO9160 
9360 CNT-CNT-1 
9370 IF CNTO GOTO 9300 
9380 PRINT* LST(SCAN)-2,"=>"; 
9390 PRINT* LST(SCAN)+1,"<="; 
9400 GOSUB 9000 
9410 IF LPO 0GOTO9400 
9420 RETURN 

GROCERY STORE ITEMS 
ALL ITEMS ARE IN GROUPS AS THEY APPEAR 



BEFORE 



WIL 



STORE. ALL HEADINGS HAVE A 
HEADINGS. THE NUMBER AFTER THE 



BE THE NUMBER OF ITEMS IN THE LIST. IF 
ADD OR DELETE AN ITEM, REMEMBER TO CHAN 
NUMBER. 



10000 REM 
10010 REM 

IN THE 
10020 REM 

THE 
10030 REM 

L 
10040 REM 
YOU 
10050 REM 

GE THE 
10060 REM 
10070 REM 

10080 DATA 138,202,266,330,394,458,522,586,650,714 
10090 DATA 168,232,296,360,424,488,552,616,680,744 
10100 DATA "20AISLE 13 - PRODUCE 

10110 DATA CANTALOUPES, MUSHROOMS, APPLES, CELERY 
10120 DATA CARROTS, PEARS, LETTUCE, CUCUMBERS 
10130 DATA TOMATOES, AVOCADOES, SQUASH 
10140 DATA BAN AN AS, POTATOES, CORN, CABBAGE 

10150 DATA ON IONS, GRAPEFRUIT, GRAPES, 

10160 DATA END 

1017 DATA *07 BAKERY - REAR OF STORE 

10180 DATA BREAD, COFFEE CAKE, WIENER BUNS 

10190 DATA HAMBURGER BUNS, BAGELS, 

10195 DATA END 

10200 DATA *11AISLE 13 - DRY FRUIT AND NUTS AND WINES 

10210 DATA RAISINS, DATES, PEANUTS, PRUNES 

10230 DATA BURGUNDY, CABERNET SAVIGNON.ROSE 

10240 DATA LAMBRUSCO,CHABLIS, 

10250 DATA END 

10260 DATA *18AISLE 12 -SOFT DRINKS - DRESSINGS AND SAU 

CES 
10270 DATA DIET ROOT BEER, DIET COLA, GINGER ALE 
10280 DATA 7 -UP, DR. PEPPER 

10300 DATA ITALIAN DRESSING, FRENCH DRESSING 
10311 DATA GOOD SEASON MIX, MUSTARD, MAYONNAISE 
10315 DATA SPAGHETTI SAUCE, TOMATO SAUCE 
19320 DATA TOMATO PASTE, CATSUP 
10330 DATA BAR-B-Q SAUCE, A-l STEAK SAUCE 

10340 DATA ,END 

10350 DATA *18AISLE 11 - GELATIN AND BAKING SUPPLIES 

10360 DATA JELLO, PUDDING MIX 

10370 DATA FLOUR, WHOLE WHEAT FLOUR, PANCAKE MIX 

10380 DATA YEAST, CAKE MIX, FROSTING 

10390 DATA DATE NUT BREAD MIX, BANANA BREAD MIX, MAPLE SY 

RUP 
10400 DATA CORN STARCH, BAKING POWDER, BAKING SODA 

10410 DATA CHOC. CHIPS, CORN SYRUP, 

10420 DATA END 

10430 DATA "13AISLE 11 - SALAD OIL PASTAS SPICES 

10440 DATA STOVE TOP STUFFING MIX. RICE 

10450 DATA MACARONI AND CHEESE, NOODLES, SPAGHETTI 

10460 DATA PARMESAN CHEESE, SPICE 

10470 DATA SALAD OIL, SHAKE N BAKE, VINEGAR 

Program continues 



80 Microcomputing. September 1980 • 175 



for the TRS-80 from Micro- Mega 



The Original GREEN-SCREEN 




The eye-pleasing Green-Screen fits over the front of your 
TRS-80 Video Display and gives you improved contrast with 
reduced glare. You get bright luminous green characters and 
graphics like those featured by more expensive CRT units. 

Don't confuse the Original Green-Screen with a piece of thin 
film stuck to the face of your video tube, such as that adver- 
tised by others. The Original Green-Screen is mounted in a full 
frame perfectly matched to the color and texture of the 
TRS-80 Video Display. It is attached with adhesive strips 
which do not mar your unit in any way. 

The full frame design of the Original Green-Screen "squares 
off" the face of your video display and greatly improves the 
overall appearance of your system. 



THE GREEN-SCREEN 

Add $1.00 for postage and handling. 



.$13.95 



Terms: Chick or money order, no CODs or credit cards, please. Add amount 
shown tor post aga and handling to price of the item. All Items shipped within 48 
hours by first class or priority mail Virginia residents, add 4% sales tax. 

^29 



Micro- Mega -P.O.Box 6265Arkngton,Va 222Q6 



Stop fiddling with your 
cassette cables! install our 
TBEEP and forget 
it forever! 

TBEEP™ 1 

For Level II and Disk Users — A self-contained audio 
alert beeper with a pager-like tone Plugs in-line with 
"AUX" cable from your TRS-80 (Requires 9V Battery). 

$ 19.95 



TBEEP™ 2 




A TBEEP kit you install inside 
your TRS-80 keyboard. 







Completely assembled and tested. 

Attach to keyboard's PC board with double-sided 
foam tape (included) and solder three wires to easily 
located points on keyboard unit. Installs in minutes. 

Uses power from your TRS-80. No battery required 

DEALERS! Install when modifying your customer's 
TRS-80. and include TBEEP's simple four word 
BASIC command in your off the shelf Software. 

TBEEP 2 Kit (with complete instructions) $ 12.95 



Se°3 Check or Money Oder | 
Phone Orders 



1714)494-2869 

Dealer Inquiries invited 
UPS COD - Add $3 00 

V^ SEND FOR FULL LINE CATALOG 



WEB ASSOCIATES ^2? 

New Mail Order Address 

P.O Box 96QI 

Co'ona Dei Mar CA 92625 

(Calrl Residents add 6% tax) 



10488 
10498 


DATA 
DATA 




•13AISLE 10 - TEA - COFFEE - SOUP - CEREALS 


10580 


DATA 


GROUND COFFEE, INSTANT COFFEE, TEA BAGS 


10518 


DATA 


INSTANT TEA, TOMATO SOUP, VEGETABLE SOUP 


18528 
10558 


DATA 
DATA 




RAISIN BRAN, SUGAR, BROWN SUGAR 


10560 


DATA 


,END 


10570 


DATA 


* 15 AISLE 9 PAPER PRODUCTS 


18588 


DATA 


KOTEX, TOILET PAPER, TISSUES 


18605 


DATA 


PAPER TOWELS 


18610 


DATA 


PAPER NAPKINS, PAPER CUPS, PAPER PLATES 


10620 


DATA 


ALUMINUM FOIL, LARGE TRASH BAGS 


10630 


DATA 


SMALL TRASH BAGS, PLASTIC WRAP 


10640 


DATA 


SANDWICH BAGS, CIGARETTES 


10650 


DATA 


END 


10660 


DATA 


*12AISLE 8 - TOILETRIES 


10670 


DATA 


TOOTH PASTE, BUFFERIN, RUBBING ALCOHOL 


10680 


DATA 


TOOTH BRUSH, HAND LOTION , SHAMPOO 


10690 


DATA 


CREAM RINSE, DEODORANT, SHAVING CREAM 


10700 


DATA 
DATA 




10710 


•13AISLE 8 - FROZEN VEGETABLES 


18720 


DATA 


SOY SAUCE, SQUASH, BROCCOLI 


10730 


DATA 


PEAS , CARROTS , CORN , SPI NACH 


10740 


DATA 


BEANS, MIXED VEGETABLES , CUP OF NOODLES 


10750 
10760 


DATA 
DATA 




END 


10770 


DATA 


* 09 BACK OF STORE - DAIRY 


10780 


DATA 


BEER, MILK, LOWF AT MILK, BUTTER MILK 


107 90 


DATA 


YOGURT, SOUR CREAM, COTTAGE CHEESE 


18800 


DATA 






10810 


DATA 


•15AISLE 7 - FROZEN FOOD & JUICES - PICKLES 


10820 


DATA 


TV DINNER, CHICKEN PIE, PIZZA 


10838 


DATA 


BEEF PIE.LASAGNA 


18868 


DATA 


ORANGE JUICE, LEMON AD E,COOI. WHIP 


18878 


DATA 


FROZEN WAFFLES, GREEN 01. IVES, BLACK OLIVES 


18880 


DATA 


HTT.I.S HPRKTKI^ pwn 




10890 


DATA 


*16AISLE 6 FROZEN PIES CANDY PRESERVES 


10900 


DATA 






10910 


DATA 


SACCHARIN 


10930 


DATA 


POP CORN, CANNED MIXED NUTS, WALNUTS 


10948 


DATA 


ALMONDS , MABSHMALLOWS , PEANUT BUTTER 


10950 


DATA 






10960 


DATA 


BATTERI ES , L IGHT BULBS ■ 


10970 


DATA 


END 


10980 


DATA 


•10BACK OF STORE - DELECATESSEN 


10990 


DATA 


EGGS , MAR GAR I NE , BUTTER 


11000 


DATA 


CHEESE, DINNER ROLLS , BISCU ITS 


11010 


DATA 


CREAM CHEESE, SLICED AMERICAN CHEESE 


11020 


DATA 






11030 


DATA 


•08AISLE 5 - PET FOOD AND HARDWARE 


11040 


DATA 


CANNED CAT FOOD, DRY CAT FOOD, KITTY LITTER 


11050 


DATA 


DOG BISCUITS, SULFODENE, COFFEE FILTERS 


11060 


DATA 


,END 


11070 


DATA 


M3AISLE 4 - WAX - BLEACH 


11080 


DATA 


BLEACH, SOFTENER - SHEETS 


11090 


DATA 


SOFTENER - LIQUID,RAID,S. .S PADS 


11100 


DATA 


LYSOL, PLEDGE, SILVER POLISH 


11110 


DATA 


LIQUID GOLD, SHOE POLISH 


11120 


DATA 


RUBBER GLOVES, , END 


11130 


DATA 


*11AISLE 4 - DETERGENT 


11140 


DATA 


HAND SOAP, DISH WASHING LIQUID 


11150 


DATA 


DISHWASHER DETERGENT, DETERGENT 


11160 


DATA 


FANTASTIC, TOILET BOWL CLEANER 


11170 


DATA 


COMET CLEANER, PINE SOL 


11180 
11190 


DATA 
DATA 




♦11AISLE 3 - JUICE - CANNED MILK 


11200 


DATA 


NYLONS, TOMATO JUICE, TANG 


11210 


DATA 


APPLE JUICE, LEMON JUICE, LIME JUICE 


11220 


DATA 


CIDER 


11240 


DATA 


EVAPORATED MILK, DRY MILK 


11250 
11260 


DATA 
DATA 


r*un 


♦13AISLE 2 - CANNED FRUIT - CANNED FISH 


11270 


DATA 


PINEAPPLE, PEACHES, PEARS 


11288 


DATA 


FRUIT COCK TAIL, GRAPES, APPLE SAUCE 


11290 


DATA 


PUMPK I N , TUNA, SARDI NES , SALMON 


11300 


DATA 


CHILI CON CARNE, , END 


11310 


DATA 


M2AISLE 2 - CANNED VEGETABLES 


11320 


DATA 


WHOLE MUSHROOMS, SLICED MUSHROOMS 


11330 


DATA 


TOMATOES, GREEN BEANS 


11340 


DATA 


PEAS, BEETS, CORN, KIDNEY BEANS 


11350 


DATA 




11360 


DATA 


END 


11370 


DATA 


* 17 AISLE 1 - MEATS 


11360 


DATA 


HAM, TONGUE, CORNED BEEF, PORK CHOPS 


11390 


DATA 


LAMB CHOPS, PORK LINKS, ROAST, NY STEAK 


11400 


DATA 


RIB EYE STEAK, ROUND STEAK, BEEF CHUCK 


11410 


DATA 






11420 


DATA 




11430 


DATA 


END 


11440 


DATA 


•08AISLE 1 - CRACKERS 


11450 


DATA 


WHEAT THINS, BREAD CRUMBS, CROUTONS 


11460 


DATA 


RITZ CRACKERS, SALTINES, GRAHAM CRACKERS 


11470 


DATA 




11480 


DATA 


•08FRONT OF STORE - COLD CUTS - FROZEN FISH 


11490 


DATA 


BACON, BOLOGNA, SLICED HAM 


11500 


DATA 




11510 

20000 


DATA 
DATA 




•END 


DONE 







176 • 80 Microcomputing, September 1980 



MANAGEMENT SCIENCE 
OPERATIONS RESEARCH 



IRS 80™ MATHEMATICAL 
PROGRAMMING SYSTEM. 

A collection ot programs which imple 
ment the simplei algorithm Ihe transput 
laiio'i algorithm and a network How opli 
mi/alioi 

$25.00 

HMO™ DECISION SYSTEM. 

A collection ot p' 

I I 
"tiering and game 
|l>tfu'y (Comet *>IN iIul urnentatiOfl I 

$25.00 

TRS80™ SIMULATION SYSTEM. 

A program which laciiiiates the simulation 

ol continuous dynamic systems described 

Dy differential or difference equations Pro 

' integration printing and plotting 

IpUl OD »ii!«j or printer (Comes 

imenlation) $25.00 

-qOFTWARE 

d/qNGINEERING 
^^rOYSTEMS 







1214 TSi Sftwl 
UMMk. ten 7103 M«7f2.ntlj 

"Conauflemj at Soffweue 



r$t Computers 
It Gambling 

PRESENTS: \ ^ MO«0*i«« 

PROBABILITY 
HANDICAPPING 
DEVICE I 

A 16K BASIC PROGRAM FOR 

HOUSE RACE HANDICAPPING! 

Trn$ ama/ing program was written Dy a professional software 
-•to TRW Space Systems and rs bemg introduced Dy me 
pubkshers ol Computers and Gambling Magazine ?•<- 
'.a-ge comple» basic prograrr requiring a tu« v.- 
lunar lactored lor easy use PHD 1 is a comprehensive horse 
racings. ' 'uughhred sprint races 

(less than t rmiei vou simply s<t down with your computer and 
the Racmg form the night bdore the 'ace and answer S or 6 
queslions about each horse s past performance Vou' compute' 
pw£Cf! lie win probability inO odds-line lor 
each noise allowing you to spot overlaid horses while hi It 
r he users manual contains a complete e»plana:ion ol ovenay bet 
. 
Statistics lea "asanas ot norses were usee to oe.' 

. ;»ng system The appendm ol the manual contains a 
Mb run of a 100 consecutive race system workout show 
amarmg 45% peafinre return 4'* lor each $1 00 
wagered) * graph >s also included showing PHD 1 s close lit to 
Dredicted probability vs actual win percentage curve 
. agram features Win probaoiriry and odds 'or each 
horse verification display ol each horse s parameters prior to 
.'•ectmn Bobbie sort -outme tor tinat 
. lor hr* printer output Cassette ■'•■ 
routine to store "HD I s output tor later analysis Complete 
mual 
The user s manual may be ordered seperatety tor your purus* 
• and *iii oe ceased it you purchase PHD-t 
PHO-I User s Manual ina 16K Cassette lor 
Apple II Applesoft Challenger I Specify Type! 
thS 80- level II Pel IMJi 

c— ct» tmUe IP Ca 'es add f S 
^ 193 jot COMPUTER 
77713 Ventura Btvfl SuAe f WeedUnd HMs CA 913M 
*Bt A vV'NNlP- (jet or me Computers and Gambling Products 

iDiebac" ssues 




HERE'S HOW 1 Input data to secretary 
? Into computer 3 Pmtout back to me 

PRESTO Subdivision cats n 1/2 the Ine 
ol a programmable calculator 

OUR MCROCOMPUTER SOFTWARE DOES 

■ TRAVERSE GEOMETRY 

■ COORDINATE GEOMETRY 

■ PROFLE GRADES 

■ RADIAL STAKEOUT 

M CIRCULAR CURVE GEOMETRY 

■ CIRCULAR CURVE STAKEOUT 

DEVELOPED ANli 

mai '* N HEG6TERED G/Vl ENGM ' I 

Complete Program Package J<| i , p> . 
Wrth Instruction Manual WJw^r 




l90FTWABESYSTB« 
^96 



CtVL ENGWEERteQ 



«r*> lor FREE HFORMATCN PACKET (M4) 758-4033 
143c So CEDHOS SOLANA BEACH CA W07S 




In the beginning your computer was to make life 

easy. Then you found that you had to become a 
programmer to make your computer do the tasks you 
want it to do. 

Now. you can relax' The CREATOR is here This 
program will create BASIC, error free program text for 
you. All you need to do is answer the questions The 
Creator even checks for errors. 

■ ■ ^ 37 

■ ■ . IJG COMPUTER SERVICES 

IBB s . 



The Creator will generate reports, perform calculations, 
and even interface with other program routines. No 
need to become a professional computer programmer. 
The Creator, under your command, will create custom 
programs for you. 

The CREATOR is available on disk for the TRS-80 
model One and Two. Also available for the Apple II 
and CP/M. Complete with an easy to read, well 
documented bound manual 



• Header Service— see page 22b 



80 Microcomputing, September 1980 • 177 



TUTORIAL 



A cryptic look at coding. 



An Article 
Called Intrepid 



Buzz Gorsky 

2449 Derbyshire Rd. 

Cleveland, OH 44106 



If I got 55515255545663877991 
90564273364539897981 4471 7 
042623356408587926282585037 
667841 58428988596451 3482664 
245605446486568837350595244 
56623893368354 as a message, I 
would probably say "Yes that's 
true." Of course I would have the 
benefit of knowing that the 
message decodes to "80 Micro- 
computing contains many inter- 
esting programming articles." 

How did I know that? 

In his book A Man Called In- 
trepid (Ballantine Books, New 
York, 1976), William Stevenson 
describes some of the effort dur- 
ing World War II by the British to 
decode German military trans- 
missions. The German code 
changed with the transmission 
of each character of a message. 
Another complicating factor 
was that a single code machine 
might send different codes to 
different recipients. 

I have written a series of three 



programs which provide the 
same type of coding and decod- 
ing. The first program will gener- 
ate an original code; the second 
will encode a message, chang- 
ing the code for each character 
of the message: and the third 
will decode an encoded mes- 
sage. 

Simple Principles 

The principles of the code are 
quite simple. A list called C(l) is 



als at random and using the 
ASCII representation of each. 

Three of these six carry no 
significance and exist to con- 
fuse things. However, the value 
of the encoded digit correspond- 
ing to the second pair, the third 
pair and the fifth pair are used 
by the program. 

The value obtained from the 
sixth pair tells the program how 
many times to adjust the code in 
a given direction. Direction im- 



"The German Code changed 

with the transmission 

of each character of a message. " 



maintained in memory. It has a 
code value for each ASCII value 
used by the TRS-80. This repre- 
sents the initial code at the start 
of a message. 

Each message consists of a 
string of numerals that may be 
considered as pairs, each pair 
representing an encoded ASCII 
value. The first six pairs are 
special. These six are chosen by 
selecting six single-digit numer- 



plies that the code can be 
changed by adding or subtract- 
ing a fixed amount from each 
C(l). The value of the second pair 
is the amount which will be add- 
ed to Ql). The value of the fifth 
pair is the amount which will be 
subtracted. 

As the message is generated 
values are either added or sub- 
tracted from C(l) each time a 
character is encoded. Thus the 



code changes with each letter. 
Further, the way the code 
changes depends on three of 
the first six data pairs sent. 

In Program Listing 1, (lines 
1-90). line 5 prints a big question 
mark on the screen as a symbol 
for the encoding program. In line 
20 string space is set aside, vari- 
ables are typed and C is dimen- 
sioned. 

Line 30 generates a random 
number between 32 and 95, that 
is, between the limits for the 
ASCII set. The first value chosen 
is assigned to C(1), and each 
subsequent new value will be 
assigned to each subsequent 
Ql) until all values from 32 to 95 
are represented. 

In line 40, if a new random 
number (N) is the same as any of 
the C(l) already in memory, then 
that N is discarded and a new 
random number is picked. J 
counts the number of C(l) exist- 
ing and when J equals 63 the 
task is done. Line 50 prints J on 
the screen so that you can 
follow the progress of the pro- 
gram. 

In line 60 the C(l) are repre- 
sented as a string Y. This string 
consists of the concatonated 
strings of the numerical values 



178 • 80 Microcomputing, September 1980 



Scanned by Ira Goldklang www.trs-80.com 



of each C(l). Then, in lines 70 and 
80, Y is saved on tape. The C(l) 
could be saved on tape directly, 
but this method is much faster. 

Saving to Tape 

The second program, shown 
in Listing 2, (lines 100-410), ac- 
quires the message, encodes it 
and provides for saving the 
message on tape and saving the 
final code on tape. Line 110 
takes care of the housekeeping. 
It retrieves the code from tape 
and separates Y into the CO) 
again. 

Line 120 tells the operator 
that the message can be typed 
and must not exceed 100 char- 
acters. This is a somewhat arbi- 
trary figure, but the message 
will be stored as a single string 
and that cannot exceed 255 
characters. Since each charac- 
ter of the message is coded as a 
two-character string represent- 
ing an encoded ASCII value, the 
message length can actually 
reach 127 characters. 

The operator is also told that 
hitting * will erase a character 
just typed and that hitting / will 
terminate the message. As the 
message is entered, the count 
will change, and the screen will 
show how many characters are 
left. The message will appear on 
the screen in its text and ASCII 
forms. 

In line 130, 1 is set equal to 94 
which is the number of charac- 
ters remaining. Remember that 
the first six characters are 
generated by the program. Line 
140 generates the start of the 
string. A value K is generated 
randomly as an integer between 
zero and nine, and a string is 
made. The string will include a 
space and a numeral, since the 
space was saved for the symbol 
K. Only the right character is 
taken to get a single character 
string. 

The ASCII value of the string 
is found, and then a string of the 
ASCII value is formed. All of that 
is done by X = RIGHT$(STR$ 
(ASC(RIGHT$(STR$0<),1))),2). It 
may seem like a lot of work, but 
this results in a two-character 
string that represents the ASCII 
value of K. 

While each of the six Ks is 
randomly generated, Y is set 



equal to Y + X. Y is an ever grow- 
ing string of all the Xs. In line 150 
each character of the message 
is entered using the INKEYS 
function. 

If an • is hit, I is increased so 
that the previous character will 
be replaced by the next charac- 
ter entered. When / is hit, or 
when I is zero, the message is 
ended. 

In line 180 the encoding pro- 
cess begins. Y is the uncoded 
message represented as a 
string of ASCII values. Since 
each element of Y is two 
characters long, J, which equals 
one-half the length of Y, indi- 
cates how many ASCII pairs 
there are. 

In lines 190 to 225 the second, 
third and fifth ASCII pairs are 
evaluated to see what numerals 
they represent. 11, 12 and 13 are 
set equal to these numerals. 11 
will eventually be added to CO) 
values when the code is 
changed, and 12 will be sub- 
tracted. 13 will tell how many ad- 
dition functions to do before 
switching to subtraction, or vice 
versa. 

In line 230 the construction of 
Z begins. Z will be a character 
string representing the encoded 
ASCII values, and the final 
message in code. It begins as 
the first 12 characters of Y, then 
the rest is the encoded values 
obtained from the message. 

In line 240. X is set equal to 
two-character string taken from 
the middle of Y. As I moves 
along, X will be set sequentially 
to be each ASCII pair in Y, begin- 
ning with the seventh pair, 
which is where the text of the 
message actually begins. K is 
set equal to the value of X minus 
32, and then equal to C(K), which 
is the coded value correspond- 
ing to K. For example, X = 32, 
the value of X would be 32 and K 
would first be set equal to and 
then to C(0). That would be the 
coded ASCII value for the space 
character. 

Lines 270 to 350 check how 
many times the code has been 
shifted in a given direction and 
then make the appropriate shift. 
K0 is a variable which keeps 
track of whether the code is be- 
ing shifted by addition or sub- 
traction. When K0 is the code 



is being shifted by addition, 
when it's 1, the code is being 
shifted by subtraction. 

K1 keeps track of how many 
shifts have been made. This 
number is compared with 13 and 
when it equals 13 it is then reset 
to 0.K0 receives a new value and 
the opposite shift begins. In 290 
to 320 the code is adjusted by 
adding 11 to each CO). If any CO) 
is then larger than 95 the value is 
adjusted by subtracting 64. In 
this way the complete set is 
maintained. 

In lines 330 to 360 the code is 
adjusted by subtracting 12 from 
each CO) value and adding 64 to 
any which would be less than 32 
otherwise. In line 370, 1 is printed 
on the screen so that you can 
see the progress as each char- 
acter of the code is generated. 
Following line 380 the coded 
message and the new code can 
be saved on tape. 

Decoding 

Program Listing 3 begins on 
line 500. This program reads in 
the original code and the coded 



message and then decodes the 
message. It is analogous to 
many parts of the second pro- 
gram. First it looks at the first 
six ASCII pairs and from the sec- 
ond, third and sixth pairs, ob- 
tains the values of 11 , 12 and 13. It 
will know how the code is 
shifted during decoding. 

Next it decodes each ASCII 
pair beginning with the seventh 
pair. This is done by finding 
which CO) equals the value of 
the particular ASCII pair. 

I =32 is the decoded ASCII 
value and CHR$(K = 32) on line 
650 finds the decoded charac- 
ter. The string Y is built up of 
these characters, so that Y will 
be the decoded message. 

K0 and K1 are used, as in the 
encoding routine, to keep track 
of how the code is changed. It is 
changed with the decoding of 
each character, so that there is 
a correct code for decoding the 
next character. 

Finally in line 770 the decoded 
message is displayed. The code 
is prepared and stored on tape 
as a single string again. ■ 



,2) :Y«Y+X:NEXT 

ll 



Program listing 

1 REM ' ENIGMIZER' --CRYPTOGRAPHIC PROGRAM BY BUZZ GORSKY 

2 REM FOR B0 MICROCOMPUTING 

5 CLS:Y-l:FOR X-35 TO 80 :SET(X, Y) : NEXT: FOR Y-1TO20:SET( 
X,Y) :NEXT:Y-20:FOR X-80 TO 48 STEP -1 : SET(X, Y) : NEX 
T:X»48:FOR Y-20 TO 35 : SET(X, Y) :NEXT: SET (X , Y+l ) :SET 
(X,Y+2):FOR I=1TO5000 : NEXT 
10 CLS:REM ROUTINE TO GENERATE ORIGINAL CODE 
20 CLEAR450:DEFINT C,I,J:DEFSTR X,Y,Z:DIM C(63):RANDOM 
30 N=RND(95):IF N<32 THEN 30 
40 FOR 1-0 TO J: IF N-C ( I ) THEN 30 

50 NEXT I:C(J)-N:IF J-"63 THEN J-J + l : PP.INT0540 , J :GOTO30 
60 FOR 1-0 TO 63:X-RIGHTS(STRS(C(I)1 
70 INPUT" PREPARE TAPE TO SAVE CODE", 
80 PRINT»-1,Y 
90 END 
100 REM ROUTINE TO ENCODE MESSAGE THEN SAVE MESSAGE, EN 

CODED MESSAGE, AND NEW CODE 
110 CLEAR 1000:DEFINT C, I , J, K :DEFSTR X,Y,Z:DIM C(63):RA 
NDOM:INPUT"TAPE READY TO INPUT CODE" ;X0 : INPUTt-1 , Y 
:FOR 1-0 TO 63:C(I)=VAL(MID$(Y,I*2+1,2) ) :NEXT:Y="" 
120 CLS: PRINT "ENTER MESSAGE. DO NOT EXCEED 100 CHARACT 
ERS.": PRINT "END WITH'/'; USE '*' TO DELETE LAST L 
ETTER" 
130 PRINT "CHARACTERS REMAINING — ": PRINT: 1-94 
140 FOR J-1T06:K-RND(9) :X«RIGHT$ (STRS (ASC (RIGHTS (STRS (K 

) ,1) )) ,2) :Y-Y+X:NEXT J 
145 PRINTei52,I:IF 1=0 THEN 170 
150 X«INKEY$:IF X-"*" THEN 155 ELSE IF X-"/" THEN 170 E 

LSE IF X-"" THEN 150 ELSE 160 
155 Y-LEFTS(Y,LEN(Y)-2) : Z-LEFTS (Z , LEN ( Z ) -1 ) : 1=1+1 :GOT01 

45 
160 Z=Z+X:Y-Y+RIGHT$(STRS(ASC(X) ) ,2) : PRI NT0512 , Y : I-I-l : 

PRINTP768,Z:GOT0145 
17 CLS 

180 J-LEN(Y)/2:FOR 1-2 TO 5: IF 1=4 THEN NEXT I 
190 X-MID$(Y,2*I-1,2) 

200 IF 1-2 THEN Il-VALICHRS (VAL(X) ) ) 
210 IF 1-3 THEN I2=VAL (CHRS (VAL (X) ) ) 
220 IF 1-5 THEN I3=VAL (CHRS (VAL (X) ) ) 
225 NEXT I 

230 Z=LEFTS(Y,12) : FOR 1-7 TO J 
240 X-MIDS(Y, 2*1-1,2) 
250 K-VAL(X)-32:K1=K1+1 

Program Continued 



80 Microcomputing, September 1980 • 179 



260 
27 • 

280 
290 
300 
310 
320 
330 
348 
350 
360 
370 
380 



390 
400 

410 
500 
510 
520 

530 
540 

550 
560 

570 



K-C(K) :Z-Z+RIGHTS(STRS(K) ,2) 

IF K0O0 THEN 280 ELSE IF KKI3 THEN 290 ELSE Kl-0: 
K0-1:GOTO330 
IF KKI3 THEN 330 ELSE Kl>0:K0-0 
FOR Jl-0 TO 63 

IF C(J1)+I1>95 THEN C(Jl)-C(Jl)-64 
C(J1)-C(J1)+I1 
NEXT J1:GOTO370 
FOR Jl-0 TO 63 

IF C(J1)-I1<32 THEN C(Jl)-C(Jl)+64 
C(J1)«C(J1)-I2 
NEXT Jl 

PRINT0500,I:NEXT I 
CLS: PRINT "ENCODING COMPLETE* : INPUT'TAPE READY TO SA 

VE CODED MESSAGE" ; (X0: PRINTI-1 , Z : INPUT'LINEPRINT OF 
CODED MSG";X0:IF X0»"Y" THEN LPRINT Z 
FOR 1-0 TO 63:¥0-Y0+RIGHT$(STR5(C(I) ) ,2) : NEXT 
INPUT'TAPE READY TO SAVE NEW CODE" ; Z : PRINT#-1 , Y0 
END 

REM ROUTINE TO DECODE MESSAGE AND SAVE NEW CODE 
CLEAR 1000:DEFINT C, I , J, K :DEFSTR X,Y,Z:DIM C(63) 
INPUT'TAPE READY TO ENTER CODED MESSAGE" ;X: INPUTI-1 

,Z:INPUT"TAPE READY TO INPUT CODE* ;X0 : INPUT#-1 , Y0 
FOR 1-0 TO 63 

C( I) -VAL(MIDS(Y0, 2*1+1,2) ) :NEXT 
J-LEN(Z)/2:FOR 1-2 TO 5: IF 1-4 THEN NEXT I 
X-MID$(Z, 2*1-1,2) 
IF 1=2 THEN I1-VAL(CHRS(VAL(X) ) ) 



580 IF 1-3 THEN I2-VAL (CHRS (VAL (X) ) ) 

590 IF 1-5 THEN I3-VAL (CHRS (VAL (X) ) ) 

600 NEXT I 

610 FOR 1-7 TO J 

620 X-MIDS(Z, 2*1-1,2) 

630 K2-VAL(X) :K1-K1+1 

640 FOR K-0 TO 63: IF C(K)OK2 THEN NEXT K 

650 Y-Y+CHRS(K+32) 

660 IF K0O0 THEN 670 ELSE IF KKI3 THEN 680 ELSE K1 = 0: 

K0-1:GOTO720 
670 IF Kl<13 THEN 720 ELSE Kl-0:K0-0 
680 FOR J1-0TO63 

690 IF C(Jl)*Il>95 THEN C (Jl ) -C (Jl ) -64 
700 C(J1)-C(J1)+I1 
710 NEXT Jl:GOTO 7 60 
7 20 FOR Jl-0 TO 63 

730 IF C(Jl)-IK32 THEN C ( Jl ) -C ( Jl ) +64 
740 C(J1)-C(J1)-I2 
750 NEXT Jl 

760 PRINTe564,I:NEXT I 

770 CLS:PRINT"DECODED MESSAGE: ": PRINT: PR I NTY 
780 Y0-"":FOR I-0TO63 : Y0-Y0+RIGHTS (STRS (C ( I ) ) , 2) : NEXT 
790 INPUT'IS TAPE READY TO RECORD NEW CODE" ;X0 : PRINT«-1 
»Y0 



DONE 



— Professional — 

Real Estate Soft war* 

for Appl» or TRS 80 

Property Management System 

(32 K, 1 Disk Sy«t»m») 



FtHurtt: 

• Tenant lntirnuMn 

• Liti flinl Rtporti 

• YTO * Honlhly Incomi 

• Hind It* - 

Plflijl Piynwttl 
Mlurntd Cktcki 
Mmiki P rf— 

• PnMi lUcoati 



5 Oi|ii Eipwni Accouali 

Building Eipirm Rtporl 
Vtndlr E»«tn<i Rtporl 
Incomt T»i Rtport 
»« Atptrti Cm It frlnlid 

Ci m iiM D w in n uim 
tm tm f «ky 4 Un 

2M UN* ttr FUt 



Price $225.00 
Real Estate Analysis Modules: 

<Ci»»«tt» or Dlak) 
1 1 H c mi hit chin »ni l» i! i 

2) TM Dttorttd EiChtAf* 

3) Conjunction Ctlt/rttNt 

4) iKtm Prtttrty CatMtmr 

5) AM Iwn Anilyjlj 
C) Proptrty Silt J Antlyin 



fl 



loftwi 



7] Lmk Amwtuittit 

$35 Per Module 



oftware 



I]I»!»1WI 



eaity I lompany »" 372 



Otpt M 



2045 MMfttHM Avt., Harmon latch. CA 90254 



WHY PAY CUSTOM PRICES? 

SMALL QUANTITY 

STOCK CONTINUOUS 



FORMS 



• STATEMENTS 
• INVOICES 
• CHECKS 

• BILL OF LADING 
• SPEED-O-GRAM 

IMPRINTING AVAILABLE 

STOCK PRINTOUT PAPER 
STOCK CONTINUOUS LABELS 

Call or Write for Prices & Samples 



©®f 



^366 
407 BSEDHOUIER LflfTE SOUTH 

lorrtantb Lunos ftoua 

(312) 629-6850 



■ GENEALOGY 

Compiling Roots and Branches 
An extensive family tree system 

for the Radio Shack TRS-80 

64K 1-disk Model II 

STORES AND REVIEWS 1000 FAMILY MEMBERS' 
names, dates, places, marital statuses (2), relation 
ships (father, mother, spouses (2), children (16)), and 
footnotes (2) 

OUTPUTS complete Family Books of Into for yoursell 
and others, new and revised pages for Family Book 
recipients, indices to names and their ID numbers, in 
dented format (^generation pedigree and descendent 
charts, lists of dates and footnotes, and blank and 
filled-in forms to solicit info. Includes comprehen sive 
i ndexed 70 + page m anual. 

Diskette with manual S2S0.00 

Manual 4 9-progrtm 81 K BASIC listings tSO.OO' 
Manual alone $25.00' 

'applicable toward diskette purchase 

Briel description with example printouts WOO 

Send check or money order or call lor more details. 

John J. Armstrong a* 

3700 Whispering Pine Rd. #47B ' 414 ■ 

Mobile, AL 36608 ■ 

I Phone evenings 205/342-76421 



From the original author of Roofs and Branches 

Personal Computing magazine September 1979 

"TRS-80 la a registered trademark of Tandy Corp. 



UCSD* System for TRS-80 Model II+ 

The most portable operatic system now supports FORTRAN. Pascal and/or FORTRAN modules are compiled in universal P-code, so they 
can run on most microprocesvjrs. often without recompiling. Programs execute up to If) times taster than comparable BASIC programs, and 
use much less memorv Reach to run on IRS-MO Model II (MM 

FEATURES PLUS, from PCD Systems 



i Interactive operating system— dynamk 
trlays, disk tile handling, run-time sup- 
port and block I/O routines 

I Fast, one pass compilers 

i Two Editors-one sc reen oriented lor pro- 
gramming and text editing, one character 
oriented for hard cop\ t e r minate 

i file handler to manipulate disk tiles 

i Mai ro .issembler thai produf Bl I odi fof 
linking with Past ,il 01 lorn. in program, 

i Linker lor link-editing ot objed dnd as- 
sembly code modules. 

i Library ot program modules and utilities 



Disk formatting program to initialize dis- 

ketles in single CM double density lomi.ils. 

■ ( oniiguratiofl program for serial i 1 1 

■ Disk-set program lo permit separate as- 
signment of density and lormat charac- 
teristics tor eac h disk drive 

DOCUMENTATION 

• i CSD System Manual (480 page*). 

■ Beginner^ Guide to UCSD Pascal 

il User Manual | Report. 

■ Fortran User's Manual with rortran 
•a stems 



PCD Systems, Inc. 



**9t 



PO Box 14* PennYan, NY 14527 31 5- r > ib-3734 



PRICES 

■ UCSD S\stcm with Pascal < o.npil.r $»50 
with Pascal and Fortran Compilers $500 

■ Fortran Compiler alone 

(requires Version 110) $200 

■ P-Code Interpreter alone 

(either I SI- II or /-80) $ 85 
Optional Utility Programs 

■ C'P/M' io Pascal til*- < onversron $ 50 

■ ntSOt >v io Past .ii We conversion $ 50 

■ 7 -HO Disassemble* Dump program $ 50 

ALSO AVAILABLE 

■ UCSD system lor MIND or PDT«. 

■ Z-80 Adaptable System (>ou write BIOS). 

■ UCSD System lor ( "P.'M emironments. 

I'( I ) Systems is a lie ensed distributor of the 
UCSD System for Past al and Fortran. Dealer 
Inquiries arc inyiled 



Mr.t<Vf'uik .ii ill. K. genb .it i'w aSumla ' rradrmark .it Ijndv < orpurjluin 

180 • 80 Microcomputing, September 1980 



■trademark o4 I )i«ilal R«»*Mfch Mra<Vm*ik o« l>Riial Equipment (orprxation 



PRIAM 

Hard Disks 
Now Available 
from SIRIUS 
SYSTEMS! 




I '•!,' , '., , I 



■ .Se-np» jmMH , arte r 



H aeikQjtaii mi i i n i n i u 

BBltO ("parafe Uw» Pa* — i«Hh 

a. a an n "yy sc j % ■» m 

■ SDffltMHMWIlAaMOnrv )rr* 



r 

1 

i > i 


: v- •-.-- 
■ t ■ i 

■•4V 
1 



THE PRIAM LINEUP 

aparrr, tea 



*tA>4M 

'MIMt 

tttabjam 48? 

UtftKB 46? 

S3 



836 
ISfi 



H 
20 



w 

331* 

JJ*J* 

nut 

701 



83740 



8374A 



-OSMya fcppv«* 

[ • tot* oat of ' oo MBn«Sic 
»8jr|lJC 



:: ::=: 



f«i<" IV 1 ( 

onc-no, 



VT^ Mt c ^ i t M M inei«wc>o«M4Miyi» Pn i»MHi>BDwiiOH><» Aa u Wwwi 
Imourtr <m 14 Standard Cm* T-»8 W W»i i»«m« n *» r «> .»i amya 
r tnc t Ji*i »ve oas* A»SIRlUSSvSTU>4SW m ch > g>ir l »^<a < ^«x»ji»Po»»»y 
ktrr^cjDk'y •"-*?*•» ton »o>* AC ouael (no* »Mc/*o tMVatdinopoMtMXO 

•MttOM Qnw afldrawiy .» ikjia ur tNt, Tfci u* ff» Cata arid t-ut u- lh» Jrn»a «a*af 

eaaascduaodurawapataann A* wt*>*STFRr*.iv-FC*»a» .*« W.a>-*r*aa bjU 
mo « at* tttndard omaftiac* cotot tenant* CcrmMiMtun*mrti,mta tt *, ana 



Remex rfd oooo -oooi 
8" Floppy Disc Drives 
Double sided . . . 
Double density!' 



549 



95 




KFD4M1 $569.95 

Offers quahty and tenures tound m df-ves cos»v>q much 
trow' ■ Stngto or Oout* Oantiy ■ OouM-SkIM Omt ■ Door Lo<* tiClUOEO 
■ Writt-ProtKt iNCLUO€D ■ 180 Day Warranty ■ Compete* et«i Shu-jarr 
850/851 ■ ln*Po*wOf3tfjtiontPsurMl(>NGFRtirE' l B Mod* BFD 4001 crfteej 
Data and Sector Separator 

f"D 4000,4001 Taovnt Mam* 196 

Connector Sal #3 .AC 0C t*«a tdgr KUf W04000C«CjB«i(iorii»««» 

ConmciorSetaaiACandOO 2.95 *«otIJo**»i 29 95 



Ramti 10001 tf you've beejn k>c*ing 
for a lajss expevwlve ftoppy disc drive 
but not wanting to sacrifice quafttv — 
IMS mil 



*419 95 




SIRIUS 8 DISK 
POWER MODULES 

kj jojo M0H am J 3*w » Mmuat are 

0a*»«nec is provide 0C and twa-nadi AC 

•Mr lor cm if» Say* Owe Potae Mod 

.* Orkn rW Mooter 



Oard 180 day WAWWlTr m Opar framr 
Supply •artarty « tor 2 yearn A» 



Kraft- MorAAtft •••on. arTi erfa* t» WC 
4000C.9 Of P» 10008 CM (color 1 

mafcfttfMl 

UuatOnM 



Sh? 00PM jS V^VVm UR) 4000» or Potter MOflu* irjDPMl 

Single 0n»e 
VamttommiXmt 



4O0Ui 8 Roppy 0h» Onm Many futww 

at* indudW lor sate and rata** ooera»or 

' «w- lAoOutat ami mto ear aton- 



s i it pj 



IIMf 



SIRIUS 80+ MPI 51/52 



Perfect Add-Ons for Your 
Computer System! 




'•* SaHUS SYSTEMS H <*> « i«x», 
una ade-oni «f dwoow to vwot j- 
rTUfjcfUd iparsjaaay and MrtoniMnca lor |4m# 
iBmpMpj Conwfcng at fa «*awwt «dav—t 



VougflOOOVnifianjnwi 10008' hxor*,W1 IKvo* 
at «*« vol OK ■ 8 'toco* On* ■ 5*y» or 3oud* Oma«v 
■ Hardoi SonSacaomdM Madai^otKiior rnurtB SmottOan 
Oau Separator ■ 180 0a» *«**wy *■»'•*> 

i'»« pJaMl Mflp »»*»'■• •••■'-• ajj , tun 

tmartacaAiiaimr Oa w o x i u r Sr * hk; iooob gas* iior u*» 

^MEXW-SKwr SMJS ;*C DC 4CarOlOQi. $M » •«. Poaw I 



thar»B*80. Sanaa HapnOa* to <*mt aaar 
naad MM- Stww Roppy Daa art .u >al>ii 
*«r inc tus go- and come raaoy «> oM) " 

coa*aaoN CMAHACTuwsncs 

■ 5 to a-ata a>*a« acoau ama 

m^Xhtm.! 

m laoamWAHMm-rr 

mimm*on*i*mf%*D*y 

mSnpmiinmlttWioiaouOmmnytt.ltni 

m UBra hah rafcjp«ry 

■ 2 p* Pom* Sim* *am*f 

m Maanirorafao- Sanaa or ft* urn* caO* 

■ MKAatoB uav acoaaavaw pkjoeoaro' ay dr>* 
AnraMunnp 



40 trxk 



ftoppy 0«a add or OHarng S 
mow tr acta fan r» Haoaj f 



nail 

MjMj 

i*^Ot tTKaXS •UJO fftt RihtD ShKk ffVkW. R CO$! 

1140 km' formaoad data atoragc i 

oytoa aaagto'douBki danaay 

StFttUSM-t MM 



•t» 



80»? ■•■ « M 



pn mm i higMk MTwtat Raa Daft aaa a 
appaart to tie TtiS »• aa T¥iO » oaok dMaaa 
rtt COST LfSS THAN riAL' T« ««a f^ 
graatar uwmas iu* matmmmmmmm 
oofi »d)aa or Ha madia tactoM a> aray a aaajja 
ud* Dung Via phjg Board « na> at ma 
Aaaaaal tor oBfr mrwpaaai aaajaaa 
aptrakm as r)r«* and m* it flu oftar avat 
aaakaaaaa loan tie tanaard aaatai Saaot Cattti 
c- as jr> or tour dnwts laaft M SS StoaaaM 
r^flad aau atorapa • 80 W. 



MB. r, W! | 






v SJRHJSao-l'SisngxscM 80»acfc 
Quad danaay nopov 0a» uM Oflamg 2S 

tanas tit atonaja of i Stondvd Hadn 9tac» 

DM Bay m+% a 



carnapondraay 
Mfjuaa at t» atotawd atoraaa aad taatoi 
tnttio-irackaccaBaina) tw 80 ■ 3 alows ta 
mandouaa. ncTaaaiOtawajatM tor daft oaaad 
proorjrns r ' The 80. j NC..JCX3 SMU5 « 
TRAKS<HTO on iMtajnt fon latoX data 
atorafi > TOaxam DytH iaig«dou0k> 

Sp*US80-3 $489.95 

Tit SWAM 80«4 rtw Da* add or * i 
doubto aatod t«o track 180 par salt i V . 
fflCMaaar' Tha utmalt n ftaknittn-art Sto 
rtxcy Oft* *chnc«ooj to 80 • 4 a sstn o, me 
T%80- aa fae amala tdad da* dr%ea mc» 
aaft 80 tracts Tkajt as tarwa ol cafacav one 
SO • 4 « aavMaM to 4^ staodaM Rafto Sliack 
an«as isavinototow "3*. '-tttornanaon 
liiiaaai" I ivifr a douMt dansav u awartai 
Ilia I Itotli mamory • hugf) Tnt 80 4 n 
•majr to t» 80 • 2 « taji a amm conAgurad 
aa Onaa and awy ot tie of mraa a ddn a aai 
la* tvt standard (tada) Shack Caen car. 
or tour drwatlaaftMSS Standard CaOta i "ta 
80 • 4 aeauOtS '«AnS PATOi an Oaftatft 
(Tha paaj koard a. atoa ncasaM I fonvattad 
data ftoraaa • 408K aaajk danaay or 8M» 
bytosaovM danaay 
SWIU680-4 S624.95 



AA80- Senw npapy Qua add Ions operate « S 
■ark h> track acceie a»» 'aajnt 
ftan 8to SA 4O0i out an DtawMT 



fflfletaKhyids trtcfc ik> trick aicc ft > Mt 
■r far 8a) SA 400) out an Left) 
i*mm to 1? ma aaconoa tor M 



I8BM9* 

•TrtS^aX^t'TarxJyCorp 



SIRIUS 
SYSTEMS 

7528 OftK PidOt H»/»«rary 
Knoarwaay Tnnnnqranr 37921 



^ 



70 ORDER CALL (615) 693-6553 

Phone Orders Accepted 9AM-/PM iESOT) 

We accept UC. VISA. AE. COO ; 



or Cash) and Checks (pArsonal cr*sete ntqut* I4dayi 

AMD M ANOUNG $ 7 00 c«r Rca 



ajaMC8a<JM Caalta *8aJltoaT'8 ShaiO 
* SHIPPING 
I pa* Floppy Dh* Dnvo or 80 Mcx)u«815*< tor other 
ita)m»ianya>xC4tMiafl«beraAjnc>ediB lOS, lor Shappang 

& HayxJana PaMrsent m u S curranr^M Taiaieaaae reaarlnnanarirtt)Ab8aaaB 
Ta> ■ VC4.U8J8E 08SCOUMTS AVAIl ABI F 



A Great (tellable Mini Drive! 

■ Vts fr«c# to tracA acews 
81 tMCtusiitoPumyBaiKlOtSign 

■ RdftaMs ih% SoaerfSfaoiWy 

■ Sinote/Oouba* Den$n> (toe»a«0» 

■ Industry; AMU Satmm imfix* 

MPI 51 

iSmga ratal 40tlC«» ).'.■.,-• _„_„__ 
S2b9 Mb 

MPI 52 

< Ju« Head. " two k 3S«J* 

Jf.^- »««-»>- $349.95 




MPI 91/92... new 
STATE-OF-THE-ART 
DISK DRIVE! 



MP191 

'•toto 80 tracks 2a0k.'480K 




«. ajjajaj 

. . n - 



k- 



S389.95 



S499.95 



Introducing the 
Versatile, Low-Cost 
OMEGA Series 
Controller 



.*«.'' o*vooa>d ")«.'op>uc*«ao> 'i 

rnaea8a dab tandai to a aada eanato at 

,r. ■ „■„ . - . < I ..I 

coaapater ayaJaana iMtotowraaaaBNeaa' ■tad 

mc ur jp to e^nt 8 riooov Oae bnwaa i«% M 
•n woa at ona oano. Most tytfama •ite*earaj 
• Kcoeaaaaneri *u a oataaa n « aarw >ntar. 
torn y«»a«aaaanctaParMriaay/a>jayit 
te 0MWA Senas Conrndar laodkaa m okroctto 



many pc 
--re " I • 



pule* i | i n t n imonQ mam the TftS 80*. 
Aoow Haatn andcanarai r-toMatrernaselor 
r^jddakorotasoa»r*w»3taoeafT^ arse 

S^CCBrX riA^OWAIM 
rfATiftef s eeci uoc 

■ .- 

• I AMiorSS OaaOnitJatoAerr 

• S*e» >'¥■ or Ooutm imu jarjay daa 



a rAv« v Son tactfir-w esaany usaae 

eiMajaeonor Q lM >. 
TaeOoias 

■ Cdntoi or if to aw ayaaCnf'Vr- •,.. 
«?jAV0iSACsa*»0r« 

ad or '4 riMt *tajrm» o^ me sarnt ^ac# 
a AorynnooaAu 8 ana>or V aVnei ol 

t 3 8Ato >i tc •Maro.rts 
a UaytHwaati transAvs 

■ t atr-aaaay 8cata> now conltorasr ifiiartaoftf 

SP€CaFlC SOFTWARE 
FEATURES MeCLUOC 

■ -■U T •> j" " 0lt> '■■ • -li 

r*"ii* ** ri*****rj* **" 
81 taaaf aMrajom to sta-aaM oparabnG an 

laaaafnBOOS- CPV-- ale) 
e •- gat-pal aecu' '^adt u' 

■ Pe to iroat M aar a wafft i -nay 8a cnanpad to 
tPttOM ■aptatatwera or Dynammic Rapro- 

Paaaa | 

P88kBM r * ■ ■" •-" i' •> 

arnaad oasis V me STTJ BUS era) o» S -00 
Triejacarairusyriirtamriiaaicryaiw-aoaai 
aotaen iiiirtootai « too** to fit -ague* 
OMEGA Sara* CinTiaaii Madaa) tak>ks Con 



sat SIPAUS SVTfMS tor oanara anoi and 

aiiiaaMMk tor Bw enwe hne of OMKA Serar. 

Mm '. M I I .-«r tr-. ,»*~i rtQ « 






imputing, September 1980 • 181 



EDUCATION 



Bach to BASIC! 



Music Note Recognition 



J. David McClung 
P.O. Box 1590 
Dallas, TX 75221 



My wife and I bought our 
TRS-80 partly to help with 
our children's educations. We 
didn't realize then how very little 
educational software was avail- 
able. I turned, therefore, to writ- 
ing my own. 

Music Note Recognition is a 
program I wrote to teach my two 
oldest children how to read 
music. The program displays 
either a treble clef or a bass clef 
with a single whole note. The 
child is asked to name the note 
within a previously selected 
time. After 20 notes, the re- 
sponses are evaluated and the 
incorrect ones reviewed. 

Six Steps 

I follow six steps when debug- 
ging a program. Step one clearly 
defines the lesson. Children 
learn more quickly when les- 
sons are simple. For example, in 
Music Note Recognition I could 
have included sharps, flats or 
fractional notes. Instead, I 



limited the lesson to whole 
natural notes. 

Step two presents the lesson 
facts. Most educational pro- 
grams I have seen fail by asking 
questions before the student 
has a chance to study the mate- 
rial. My children quickly lose in- 
terest in a program, if it asks 
them several questions in a row 
that they cannot answer. Pro- 
grams are more effective if the 
lesson is presented before test- 
ing begins. 

In Music Note Recognition, 
line 240 lets the child review the 
lesson. In the subroutine begin- 
ning at line 1400, each note is 
presented with its name. The 
child can study as long as nec- 
essary before beginning the 
test. 

Step three tests the child's 
knowledge. The test is the heart 
of any educational program. The 
student should be allowed to 
demonstrate his knowledge of 
the material. 

I try to make the test ques- 
tions active, varied and inter- 
esting. My children lose interest, 
if the program repeats the same 
questions in the same sequence 



each time the program is run. I 
use the TRS-80 random genera- 
tor to vary the order of the ques- 
tions. I also include protection 
to prevent repeating the same 
question too often. 

In Music Note Recognition, 
lines 420-440 select the se- 
quency of questions. Each ques- 
tion is compared to previously 
selected questions to prevent 
duplication. Thus, 20 of the 33 
possible questions are pre- 
sented each time the program is 
run, but in different sequences. 

Children respond best to pro- 
grams that have a lot of action 
on the CRT. For example, this 
music program redraws the en- 
tire staff for each test question 
rather than merely moving the 
note. The extra action helps 
hold the child's attention. 

Include Challenges 

If the program is going to be 
useful for more than a few runs, 
the test must become more diffi- 
cult as the student masters the 
lesson. You can challenge the 
student by limiting the time al- 
lowed for each answer. 

The value of H selected in line 



320 determines the time al- 
lowed. In my computer. I must 
multiply the number of seconds 
selected by 40. If the program is 
used without a keyboard de- 
bounce routine, the 40 must be 
increased. The correct value can 
be established by experimenta- 
tion. 

The program responds to 
each answer immediately, cor- 
recting a child's responses. This 
feature makes the computer 
especially valuable as a teach- 
ing tool. Lines 560-580 confirm 
the answer given or tell the 
child what the correct answer 
was. 

Step four evaluates the re- 
sults. An evaluation should en- 
courage the student to study. 
An effective educational pro- 
gram will evaluate how well the 
child has learned the lesson and 
encourage the child to perform 
better. I try to present the evalu- 
ation in a positive manner. 

For my older children, I use 
their school's grading scale. 
They are shown the percentage 
correct and a letter grade. For 
younger children, I use "Great," 
"Good," "Fair" or "Need more 



182 • 80 Microcomputing, September 1980 



the electric pencil II 

^* T 1980 Michael Shrayer 

for the TRS-80 Model II* Computer 




The Electric Pencil is a Character Oriented Word Processing 
System. This means that text is entered as a continuous string 
of characters and is manipulated as such. This allows the user 
enormous freedom and ease in the movement and handling of 
text. Since lines are not delineated, any number of char- 
acters, words, lines or paragraphs may be inserted or deleted 
anywhere in the text. The entirety of the text shifts and 
opens up or closes as needed in full view of the user. Car- 
riage returns as well as word hyphenation are not required 
since each line of text is formatted automatically. 

As text is typed and the end of a screen line is reached, a 
partially completed word is shifted to the beginning of the 
following line. Whenever text is inserted or deleted, existing 
text is pushed down or pulled up in a wrap around fashion. 
Everything appears on the video display screen as it occurs 
thereby eliminating any guesswork. Text may be reviewed at 
will by variable speed or page-at-a-time scrolling both in the 
forward and reverse directions. By using the search or the 
search and replace function, any string of characters may be 
located and/or reploced with any other string of characters as 
desired. Specific sets of characters within encoded strings 
may also be located. 

When text is printed, The Electric Pencil automatically 
inserts carriage returns where they are needed. Numerous 
combinations of Line Length, Page Length, Character Spacing, 
Line Spacing and Page Spacing allow for any form to be 
handled. Right justification gives right-hand margins that 
are even. Pages may be numbered as well as titled. 



the electric pencil 

-a Proven Word Processing System 

The TRSDOS versions of The Electric Pencil II are our best 
ever! You can now type as fast as you like without losing any 
characters. New TRSDOS features include word left, word right, 
word delete, bottom of page numbering as well as extended 
cursor controls for greater user flexibility. BASIC files may 
also be written and simply edited without additional software. 

Our CP/M versions are the same as we have been distributing 
for several years and allow the CP/M user to edit CP/M files 
with the oddition of our CONVERT utility for an additional 
$35.00. CONVERT is not required if only quick and easy word 
processing is required. A keyboard buffer permits fast typing 
without character loss. 

CP/M TRSDOS 
Serial Diablo, NEC, Qume $ 300.00 $ 350.00 
All other printers $ 275.00 $ 325.00 

The Electric Pencil I is still available for TRS-80 Model I 
users. Although not as sophisticated as Electric Pencil II, it 
is still an extremely easy to use and powerful word processing 
system. The software has been designed to be used with both 
Level I (I6K system) and Level II models of the TRS-80. Two 
versions, one for use with cassette, and one for use with disk, 
are available on cassette. The TRS-80 disk version is easily 
transferred to disk and is fully interactive with the READ, 
WRITE, DIR, and KILL routines of TRSDOS. 




Features 

TRSDOS or CP/M Compatible * Supports Four Disk 
Drives * Dynamic Print Formatting * Diablo, NEC & 
Qume Print Packages * Multi-Column Printing * Print 
Value Chaining * Page-at-a-time Scrolling • 
Bidirectional Multispeed Scrolling * Subsystem with 
Print Value Scoreboard * Automatic Word & Record 
Number Tally * Global Search & Replace * Full Margin 
Control * End of Poge Control * Non Printing Text 
Commenting * Line & Paragraph Indentation ♦ 
Centering * Underlining * Boldface 



master charge 




'TRS40 is a registered trade mark of Radio Shack, a division of Tandy Corp. 



TRC Cassette $ 100.00 

TRD Disk $ 150.00 



• 255 




MICHAEL SHRAYER SOFTWARE, INC. 

1198 Los RoblesDr. 

Palm Springs, CA. 92262 

(714)323-1400 



■ Reader Service— see page 226 



80 Microcomputing, September 1980 • 183 



practice." For pre-schoolers I 
use a smiling face or a sad face. 

Reviews end Invitations 

Step five reviews incorrect 
answers. When the child an- 
swers a test question incor- 
rectly, the computer provides 
the correct one. In addition, the 



questions answered incorrectly 
are reviewed following the 
evaluation. Line 800 repeats 
each missed question, until an- 
swered correctly. 

Step six concludes with an in- 
vitation to try again. I try to end 
every educational program this 
way. The student should be 



praised for good work, but en- 
couraged to achieve higher 
scores or shorter response 
times. Such challenges keep the 
program interesting. 

My children have enjoyed 
learning by computer so much 
that my 12-year-old daughter. 
LeEtta, and my 10-year-old son. 



Denny, are beginning to write 
their own simple programs. The 
educational usefulness of the 
TRS-80 is limited only by the 
availability of software. With a 
little practice any computer 
owner can write programs that 
challenge and teach the stu- 
dent! 



Program Listing 



40 CLEAR 15 i GOTO 210: 'SKIP INPUT ROUTINE 

100 'INPUT ROUTINE AND TIMING LOOP 

110 FOR L-l TOH: IS-INKEYS 

120 IF IS>-"A" AND IS<""G"PRINT IS;:RETURN 

130 IF ISO"" PRINT 90, "ANSWER A,B,C,D,E,F OR G 



1000 
1010 



140 

200 
210 

220 

230 



240 
250 
300 
310 
320 

330 

340 

400 

410 

420 
430 

440 
500 
510 
520 
530 
540 

550 

560 

570 

580 

590 
600 

610 

620 
630 
640 
650 

660 
670 
680 
690 
700 
710 
720 
800 
810 

820 
830 

640 
B50 

860 



NEXT : RETURN 

'BEGIN PROGRAM 

CLS: MS-STRINGS (63,"-") :DIMA(20) :DIME(20) :R»0:W-0:KS 

-STRINGS ( 3, CHRS( 191) ) 
CLS :PRINT920, "MUSIC NOTE RECOGNITION" : PRINT: PRINT§7 

4, "(C) 1980 BY DAVE MCCLUNG, RICHARDSON, TX" 
PRINT: PRINT" THIS PROGRAM IS DESIGNED TO TEACH MUSIC 
STUDENTS THE NAMES" : PRINT"OF EACH LINE AND SPACE. 

": PRINT: PRINT"THE QUIZ WILL CONSIST OF 20 QUESTION 

S.": PRINT: PRINT 
PRINT: INPUT "DO YOU WANT TO REVIEW ";ZS 
IF LEFTS(ZS,1)-"Y" GOTO 1400 
'GET INFORMATION 

CLS: INPUT "WHAT IS YOUR NAME ";NS 
PRINT: INPUT "HOW MANY SECONDS FOR EACH QUESTION *;H 

:H-H*40 
'59 SECONDS MAXIMUM 
IF H>2360 PRINT'YOU CAN'T HAVE THAT LONG" : PRINT: GOT 

320 
'SELECT TEST QUESTIONS — NO REPEATS 
PRINT: PRINT"STANDBY — THE COMPUTER IS SELECTING TH 

E QUESTIONS" 
FOR X-l TO 20 
A(X)-RND(23) :FOR Y=0 TO (X-1):IF A(Y)-A(X) GOTO 430 

ELSE NEXT Y 
NEXT X 
'TEST 

FOR G-l TO 20:N-A(G) 
GOSUB 1000:GOSUB 1110 
IF C«l GOSUB 1210 ELSE GOSUB 1310 
IF S-924 OR S-156 PRINT0S," — "+KS+" — "; ELSE PRINT? 

S,KS; 
PRINTM,"«";G;" ";"WHAT IS THE NAME OF THIS NOTE"; 

: GOSUB 110 
PRINT30, STRINGS (63," "):IF IS-QS R-R+l :PRINT$0, "COR 

RECT":GOTO 590 
IF ISOQS AND IS<>""PRINTP0,"WRONG! 

QS;:P-P+1:E(P)«A(G) 
IF IS-"" PRINTG0,"YOUR TIME IS UPI 

S;:P-P+1:E(P)-A(G) 
GOSUB 1600:NEXT 
'EVALUATE TEST RESULTS 
CLS:PRINTCHRS(23) -PRINT'TEST RESULT" : PRINT: PRINTNS; 

" ,YOUR TEST RESULT IS:" 
PRINT: PRINT "NUMBER CORRECT - *;R 
W-20-R 

PRINT'NUMBER MISSED - ";W 
PRINT'SCORE - ";:U-((R/20)*100) :PRINTUSING 

"###%";U 
PRINT'GRADE - "; 

IF U<60PRINT"F" 
IF U>59 AND U<70 PRINT'D" 
IF U >69 AND U<8( 
IF U>79 AND U<90 
IF U>89 PRINT"A" 

PRINT: IF U-100 PRINT'YOU DID GREATI":GOTO 900 
■REVIEW THE QUESTIONS MISSED 
PRINT: PRINT"TO RECHECK THE ONES YOU MISSED — HIT E 

NTER";: INPUT ZS 
CLS: FOR 0-1 TO (20-R) 
N-E(0):GOSUB 1000:GOSUB 1110 
IF C-l GOSUB 1210 ELSE GOSUB 1310 
IF S-924 OR S-156 PRINTPS," — "+KS+" — "ELSEPRINT£S,K 

S; 
PRINT#0,"TRY THIS ONE AGAIN ";:GOSUB 110 : PRINT00 , ST 

RINGS(63," "):IF IS-QS PRINTP0 , "CORRECT I ":GCTO 88 



THE NOTE IS 



THE NOTE IS ";Q 



PRINT'C 
PRINT'B" 



870 PRINT30, "WRONG! * :GOSUB1600 :GOT0 860 

880 GOSUB1600:NEXT 

890 CLS:PR1NTCHRS(23) : PRINT'CONGRATULATIONS, ";NS:PRINT 

: PRINT: PRINT'YOU GOT THEM ALL'iGOSUB 1600 :: PRINT: P 

RINT"FINALLY":PRINT:GOSUB 1600: PRINT" AFTER MUCH EF 

FORT" 
900 PRINT: PRINT'TO TAKE THE TEST AGAIN — HIT ENTER" : IN 

PUT Z$:RUN 



QS-"F" 

QS-"E": 

QS-"D": 

QS-"C" : 

QS-"B": 



QS-"B": 
QS-"A": 
Q$-"G"! 
QS-"F": 
QS-"E": 
QS-"D": 
QS-"C": 
QS-"B"; 



'SELECT NOTE 

ON N GOTO 1020,1021,1022,1023,1024,1025,1026,1027, 

1028,1029,1030,1031,1032,1033,1034,1035,1036,10 37, 

1038,1039,1040,1041,1042,1043 

Q$-"G":S-222: C-l: RETURN 

S-286: C-l: RETURN 

S-350:C-1:RETURN 

S»414:C-1:RETURN 

S-478:C-1:RETURN 

S-54 2: C-l: RETURN 

QS-"A":S=606:C=1:RETURN 

QS-"G":S=670: C-l: RETURN 

QS-"F" :S=7 34 : C-l : RETURN 

QS-"E":S-7 98: C-l: RETURN 

QS-*D":S-862: C-l: RETURN 

Q$-"C": S-924: C-l: RETURN 

QS-"C" : S-156 :C-2: RETURN 

S-222:C-2:RETURN 

S-2B6:C-2:RETURN 

S-350:C»2:RETURN 

S-414:C-2:RETURN 

S=47 8 :C«2: RETURN 

S-54 2 :C-2: RETURN 

S-606:C-2: RETURN 

S-670:C-2:RETURN 

QS- " A" :S-734:C-2: RETURN 

QS-"G":S-798:C-2:RETURN 

QS-"F*:S-862:C-2:RETURN 

'PRINT STAFF 

CLS : PRINTi256, MS : PRINT :PRINTMS:PRI NT :PRINTMS: PRINT 
:PRINTMS:PRINT:PRINTMS 
RETURN 

'DRAW TREBLE CLEF 
FOR D=9 TO 40:SET(21,D) : NEXT D 
RESTORE 

FOR D«l TO 61:READ A,B: SET( A,B) : NEXT D 
DATA 10,30,10,31,11,29,10,32,10,33,11,34,12,28,12, 
35,13,27,13,36,14,26,14,36,15,25,15,31,15,32,15,37 
,16,24,16,30,16,37,17,23,17,29,17,37,18,22,18,28,1 
8,37,19,21,19,27,19,37,20,20,20,26,20,37 
DATA 22,9,22,19,22,26,22,37,23,10,23,18,23,26,23,3 
6,23,37,24,11,24,17,24,27,24,35,24,36,25,12,25,16, 
25,27,25,28,25,34,25,35,26,13,26,14,26,15,26,28,26 
, 29 , 27 , 30 , 27 , 3 1 , 27 , 32 , 26 , 3 3 , 26 , 34 
RETURN 
'BASS CLEF 

RESTORE:FOR X-1T061 :READA,B:NEXTX: FOR X-l TO 92 : RE 
AD V, K: SET (V, K) : NEXT X : RESTORE: RETURN 
DATA9, IB, 9, 19,10, 17, 10, 18, 10, 19,11, 16, 11, 17, 11, 19, 
11,20,12,15,12,16,12,19,12,20,13,15,13,19,13,20,14 
,14,15,13,15,14,15,38,15,39,16,13,16,37,16,3 8,17,1 
3,17,36,17,37,18,13,18,35,18,36 

DATA19, 13, 19, 35, 19, 34, 20, 13, 20, 34, 20, 33, 21, 13, 21, 3 
3,21,32,22,14,22,32,22,31,23,14,23, 15,23,31,23,30, 
24 , 15 , 24 , 16 , 24 , 30 , 24 , 29 , 25 , 16 , 25 , 17 , 25 , 28 ,25 , 29 , 26 
, 17 , 26 , 18 , 26 , 27 , 26 , 28 , 27 , 1 8 , 27 , 19 , 27 , 26 , 27 , 27 
DATA28 ,19 , 28 , 20 , 28 , 21 , 28 , 22 , 28 , 23 , 28 , 24 , 28 , 25 , 28 , 2 
6,29,20,29,21,29,22,29,23,29,24,29,25,30,21,30,22, 
30,23,30,24,32,15,32,16,32,17,32,21,32,22,32,23,33 
,15,33,16,33,17,33,21,33,22,33,23 
1400 'REVIEW TREBLE 
1410 CLS :PRINTe0, "TREBLE CLEF" 
1420 GOSUB 1110 
1430 GOSUB 1210 

1440 FOR N-l TO 12:GOSUB 1000: 
1450 IF N/2-INT(N/2) S-S+10 
1460 IF S-934 OR S-166 PRINT0S," — "+KS+" — "♦" "+QS; ELS 

E PRINT es,KS+" "+QS; 
1470 NEXT N: PRINT0988," TO REVIEW BASS CLEF - HIT ENTE 

R ";: INPUT ZS 
1480 CLS 
14 90 GOSUB 1110 
1500 GOSUB 1310 
1510 PRINT§0,"BASS CLEF" 
1520 FOR N-13 TO 24:GOSUB 1000 
1530 IF N/2-INT(N/2) S-S+10 
1540 IF S-924 OR S-156 PRINT %S, * — "-fKS*"-- "♦" "+QS; EL 

SE PRINT GS,KS+" "+QS; 
1550 NEXT N:PRINTe988,"TO PROCEED WITH QUIZ - HIT ENTER 

";: INPUT ZS 
1560 GOTO 310 
1600 'PAUSE 

1610 FOR Y-l TO 1000:NEXT:RETURN 
17 00 END 



1020 
1021 
1022 
1023 
1024 
1025 
1026 
1027 
1028 
1029 
1030 
1031 
1032 
1033 
1034 
1035 
1036 
1037 
1038 
1039 
1040 
1041 
1042 
1043 
1100 
1110 

1120 
1200 
1210 
1220 
1230 
1240 



1250 



1260 
1300 
1310 

1320 



1340 



184 • 80 Microcomputing, September 1980 



PROPERTY 

MANAGEMENT 

SOFTWARE 

This professional software designed! to meet the exacting 
requirements of the Institute of Real Estate Management This 
software is user engineered and has been thoroughly de- 
veloped m actual nationwide use managing all types of in- 
come properties The software is written m CBASIC requiring 
dual drives and 48K of memory (also TRS-80 Apple compati- 
ble) We feel this is the most extensive? property management 
software written for a microcomputer The system includes 



• Full General Ledger • Vacancy List 

• Checkwnter • Leas^ Expiration Report 

manual check can • Lost ftent Report 

also be used • Vendbr Report 

• Budgeting • Full Audit Trail 

• Tenant Information • Real Estate Support 

• Rent Roll • Plus much, much more 

• Delinquency List 

Demonstration diskettes with manual! is $35 00 and can be 
applied toward full software price of $650 00 MasterCharge. 
Visa and COD orders welcome Dealer inquiries invited 



A-T Enterprises . 

221 No. Lois. La Habra, CA 90631 
(213) 947-2762 



TRS 80 is a registered trademark Ol TANDY CORP. 

Call about our iMttaMk price on 
4 cklvr complete wMrm 
Ievelll4k WW 10 

IrvrlllW.k S/JO.OO 

[■pension Interlace 1269. OO 

t sponsion Interlace I 6K 140 1 10 

Itpantlon Interlace )2K $524.00 

I6K Memory Kit lor TRS 80 or Apple 

$79.95 
TRS-80 & NORTH STAR ADD-ON DRIVES 




CUSTOM 
ENCLOSURE 




CABLE 
INCLUDED 



Single- drive iyiiem in cuMom enclosure .4400.00 

imgle drive system in metal enclosure $375.00 

Double drive system in custom enclosure $006.00 



MM $275 00 

MPI 052. duol heoded 1349.00 

Shugort SA400 $275 00 

Snugort SA800 1479.00 

random single sided $279.00 

Tandom double sided . $425.00 

Hoxeltine 1000 $450.00 

Single tier walnut enclosure tor Shugori ... I 35.00 

Double tier walnut enclosure lor Shugcrt $ 32 00 

Aton 400 $546 49 

Aton 800 1795.00 

Hozelnne 141C . $749 00 

Centronics PI Printer (TH.S 60 odd on) $398.95 

Cennonics 779 2 irocior (TRS 80 odd on) $1049.95 

Tl Printer $1599.00 

Oose 2 $649 00 

Horizon 1 32K $2290.00 

1elev,deo9t2 $775 00 

SPECIAL! MINI FLOPPY DISKS, bo* ol 10 (wilh plastic box) only 
$28.00 (without plastic box) only $26.50 Box ol 10. 8" disks (in plastic 
box $30. 001 Centronic 779 ribbons $3.50 each. 



xy/tem/ 



•«*■ Aimm<A»o vim w«i 



29 02 23rrt Ave , Aslona. NY 11105 

rWX /105822107 (212) 728-5262 

(800)221 1340 




Find the best price you can in this magazine on a box of 10, 
Verbatim 5 'A inch Floppies and subtract $.50; THAT'S OUR 
PRICE We include the shipping (please figure the com- 
petitor's shipping and handling charges in your 
computation).* Compare our prices on other equipment; if 
we're not the least expensive, give us a call. 

THIS MONTHS SPfCIAlS 





SPECIAL #1 




II you purchase the TRS-80 DISK 


AND OTHER MYSTERIES Book tor 


the 


egulor price ol 


$22 50 




can buy 10 VERBATIM 


MSKET 


TES 


AND o plaitic library 


caie 


lor 




$2200 




TOTAl 


$44.50 





SPECIAL #2 




It 


you purchase APPARAT 


NEWDOS ♦ 


or the regular price 


ol 






$99 95 


you 


con buy 


10 VERBATIM DISKET 


TES 


AND o 


plostic library cote 


lot 






500 






TOTAl 


$104 95 



Blent. Diskettes 
Verbotim 5'. 
Verbatim 8 

Verbatim 8 Double Density 
Aid* 

Flippy Kit 

I6K Ram Kit (200ns) 
Whittle Switch 
BSR System X 10 
BSR Modules 
Floppy Saver 

relillt (25) 
Hard Hole Tool 

refills (50) 
Photo Point Light Pen 
Plostic Storage Bo« 8 
Plastic Storoge Box 5 '-4 
Web T Beep 
Diskette Frames 
Plastic Diskette Sheets (10) 
Software 

Apparat Newdos I 

35lr 

40lr 
WEB TSHORT 
Electric Pencil 
Dungonquest 
'OFFER good os supply lasts. 



PRICE 



$26.50 
30.00 
44.00 

11.95 
69 00 
23 95 
74.95 
13.95 
11.95 
6.95 

- (X 
9.95 

19.95 
3.00 
2.50 

1995 
400 
II ■)■■ 



88 00 
98 00 
9 45 
CALL 
CAll 



LIST 

Fosl Gammon 

Securities Graphics 

Job Costing Pockage 

Complete accounting 
pockoge tor MODEL I 

MODEL II 
Haidwore 

Tl 99 4 

SOROC IQI20 

SOROC IQ140 

CENTRONIX 730 

ANADEX DP 8000 

PAPER TIGER 

OUME 5 45 5 55 

LEEDEX VIDEO 100 12* 

SHUGART SA 400 (35 
trock same os Tandy) 
Books 

TRS 80 Disk ond Other 

Mysteries 
Suaalles 

9Vs" ir II Paper. 1 1 " « 14 

Poper, labels. Forms. Print 

wheels, print thimbles ond 

ribbons lor DIABLO QUME 

NEC Tl ond others 
Send for FRII catalogue 
Free shipping for orders over s 20.00. 



CALL 
29.95 

74.95 



CALL 

880.00 

775 00 

1125 00 

750 00 

85500 

CAll 

CAll 

124 95 

349 00 



22 50 



CALl 




flll!!.!" . -K 

IJLlH 4636 Park Granada 139 

■,,"" Calabatat, California 

"III I'll, ! 91302 (213) 883-8594 



■ Reader Service— see page 22b 



80 Microcomputing, September 1980 • 185 



-Jg^— -KRELL SOFTWARE^ 
Kjw presents for the TRS-80 T 
" PET, Apple II, and Apple II Plus 



ELECTORAL COLLEGE 1980 



The Tool (or forecasting the outcome of the 1980 presidential Election 
Will it be CARTER'' REAGAN? ANDERSON? or will the election be forced 
into the House of Representatives 7 This program, developed by a pro 
lessor of Political Science is built to be used in two ways 

1 During the political campaign prior to the election and. 

2 On Election Night, as the partial returns roll in on network news 
Using the state by state data on previous elections that the program pro 
vides. simulated elections are run and the probability of outcomes caicu 
lated $14 95 



COLLEGE BOARDS 



The best way to sharpen your skills for the College Board SAT Exams is 
to work on actual examinations Each ol these 4 programs conlronts the 
user with a virtually limitless series of questions and answers Each pro- 
gram is based on past SAT exams and presents material of the same level 
of difficulty and in the same form as used in the verbal and mathematical 
portions of the College Board Examinations. Scoring on each exam is pro- 
vided m accordance with the formula used by College Boards 
COLLEGE BOARD - VOCABULARY 19 95 

COLLEGE BOARD - WORD RELATIONSHIPS 19 95 

COLLEGE BOARD -MATH PART A 19 95 

COLLEGE BOARD -MATH PART B 19 95 

COMPLETE SET 59 95 



TIME TRAVELER 



The besl of the adventure games Confronts player with complex deci- 
sion situations and at limes, the demand for real time action Using the 
lime machine, players must lace a challenging series of environments 
that include: the Athens of Pericles. Imperial Rome. Nebuchadnezzar's 
Babylon. Ikhnaton's Egypt. Jerusalem at the time of the crucifixion, the 
Crusades. Machiavelli's Italy, the French Revolution, the American 
Revolution and the English Civil War Deal with Hitlers Third Reich, the 
Vikings, etc Involve yourself with historical military and government 
operations, markets, etc in fascinating game situations Each game is 
unique 1 $24 95 



THE SWORD OF ZEDEK 



Fight to overthrow Ra, the Master of Evil In this incredible adventure 
game you must confront a host of creatures, natural and supernatural. To 
liberate the Kingdom, alliances must be forged and treasures sought 
Treachery, deceit and witchcraft must be faced in your struggle as you en- 
counter wolves, dwarves, elves, dragons, bears, owl. ores, giant bats, 
trolls, etc Each game is unique in this spectacular and complex world of 
fantasy $24 95 



REALTIME SUPER STAR BASEBALL 



Performance is based on the interaction ol actual batting and pitching 
data. Players select rosters and lineups and exercise strategic choices in- 
cluding base stealing, pinch hitting, bunting, intentional walks, hit and run 
plays, etc Games include double plays, wild pitches, infield errors, hit 
batsmen and pick offs $14.00. 
ALSO AVAILABLE ALL TIME SUPER STAR BASEBALL $14 95 



PRIME TIME 



Players compete as network executives Each selects T V shows tor com- 
peting time slots Choose from a range ol programs including sitcoms, 
dramas, soaps, westerns, sci-fi, news and documentary shows, etc. Up to 
three players compete for ratings and advertising revenue. Program 
simulates fan loyalties and industry events including FCC rulings and 
criticism from civic groups. Exciting and realistic In game package #3. 



HOSTAGE 



Negotiate andtor stage military raids in this contest between the 
Authorities and the Terrorists. 

Terrorists select then target; choosing to seize hostages at loreign em 
bassies, the U.N Building, Airliners, Hospitals, School Buses, or even 
Nuclear reactors. 

As in real life, public opinion counts and shapes the players actions. 
Players have a dramatic and realistically wide range of tactical options 
This game accurately reflects the intricacies of threat, promise and all 
facets of negotiations In game package #1 



»CK GOIO PRII 



GAMt PACKAGi »2 

BANZAI BANZAI II SUPER BANZAI 
THE BLACK DEATH 



I.AME PACKAGE »J 

PRIME IIME SIAR CLIPPER 

BOLLSANDBEARS III 

GAME PACKAGE M 

WORDSWORTH HARDSCRABBLE. BIBLE OUODE 

SHAKESPEARE OUODE. BILL OF RIGHTS 

OUOOE 1995 



'All programs '»qui'« 16* • TAS fO Programs rtquirfs Lmwtl II Bssic • Ap0M p€oqr*n*A i9Qutrt Microsoft Basic 

* TRS-80 is a trademark of the Radio Shack Division of Tandy Corporation 

Send check or money order to Krell Software •" 37S 
:21 Millbrook Drive, Stony Brook. NY 11790 (516) 751-5139' 




BY THE 

TIME 

YOU 

READ 

THIS 

AD, 

dial (617) 373-1599 and order Insort-80, 
your TRS-80* microcomputer would 
have sorted 1,200 names and addresses, 
10,000 numbers, or any other Random 
Disk File from your Basic program... for 
only $49.95! 

"Let us sort things out for youl" 

SBmsYSTEms, inc. 

P.O. Box 1225 

2 Washington Street 

Haverhill, Massachusetts 01830 

Approximate Sort Tim* lor Insort 80 is eight minutes 
TRS 80 is a registered trademark of the Tandy Corporation 




♦ fix 

THE MOST 
POWERFUL 
BASIC ^ 

SHORTHAND 1 
EVER ! 

TRS 80 Keyboard w/fft aecal^ 

• 11 SAVEABLE KUSTOMkeys Ten 10-character andone 
64-character 

• 41 preprogrammed LV II and DOS statement keys 

• Complete decal set (see picture) included for both LV II 
and DOS systems 

• Includes DEBOUNCE and ALTO REPEAT 

• Hold SHIFT or CLEAR and press desired key entire 
statement is typed on screen 

• Includes LOWER CASE DRIVER @" key substitutes lor 

SHIFT " 

• Less than 1 K bytes machine language, relocatable in hi or 
low memory 

• Features self-entering commands I E CONT. GOTO10, 
KUSTOM 

• Includes comprehensive instruction manual 

TSHORT • (one cassette includes Level II & single drive 
DOS) S 19.95 

TSHORT • on formatted diskette (DOS only, reguires 2 or 
more drives) $ 24.95 



Send Check or Money Order to 
Phone Orders 



(714)494 2869 

i invited 

C3/COD Add S3 00 
SEND FOR FULL LINE CATALOG 



WEB ASSOCIATES 

New Mail Order Address "* ' 

PO. Box 9601 
Corona Del Mar CA 92625 
(Calif Residents add 6% tax) 



186 • 80 Microcomputing, September 1980 



GENERAL 



Deep in the heart of ROM. 



BINAX KIBUFF 



John T. Blair 
122 Dumont Ave. 
Nortork VA 23505 



In an attempt to break Micro- 
soft's BASIC for the TRS-80, 
several of our club members 
have spent many sleepless 
nights tearing through the list- 
ings of the Level II ROM's. What 
follows is some of the fruits of 
their labors and we hope that 
some of the newer machine lan- 
guage programmers can save 
some time by calling on the fol- 
lowing information. 

DELAY is used for time de- 
lays. Load the BC registers with 
a number between one and FFFF 
Hex (H). When DELAY is called, 
a return will occur approximate- 
ly 

(28-(N - 1) + 31)-563.67 Nanoseconds 

later. This routine is located at 
0060H. 

LD BC.XXXX ;where XXX = delay time 
CALL 0060H 

CLS is used to clear the 
screen and home the cursor. It is 
located at 01 C9H. 

KIBUFF reads the keyboard 
into a buffer until a carriage re- 
turn (CR) is entered, then it re- 
turns to the calling routine. The 
starting address of the buffer is 
contained in 40A7H, noted by 
programmers as (40A7H) and is 
initialized to 41E8H. This can be 
changed by the user it desired. 
This routine resides at 0361 H. 

CALL 036 1H 



BINAX is used to convert a bi- 
nary number in the HL register 
to its ASCII equivalent. The 
ASCII value is in a buffer begin- 
ning at 4130H. The contents of 
4130H, (4130H), is always equal 
to 20H. 

The contents of 4131 H to 
4135H will have the decimal 
ASCII characters. (4136H) will 
always be 00H. 

CALL OFAFH 

AXBIN converts from ASCII to 
binary. Load the HL register pair 
with the address of the first 
ASCII character to be converted. 
On return the DE register con- 
tains the binary equivalent. The 
maximum number which can be 
converted is 65529. This routine 
is located at 1E5AH. 

LD HL.XXXH ;XXXX is address of 

char to be converted 
CALL IE5AH ;call convert routine 

LD A.(DE) Act. contains the 

.binary value 

OUTSTR will output a string 
of characters from memory to 
the CRT. Load the HL register 
with the address of the first 
character. Characters are out- 
putted until either a OOH or 22H 
is found. OUTSTR is located at 
28A7H. (Note: Since the addition 
of a disk I have found this 
routine may or may not work. It 
will work if the system is 
brought up in BASIC2, non disk 
based BASIC.) 

VIDEO displays any character 
in the A' on the CRT. You must 
push the DE register onto the 
stack before calling this routine. 
It is located at 0033H. 

PUSH DE .save DE 

CALL 0033H ;display character 



POP DE restore DE 

PRNTR, the printer driver rou- 
tine, located at 058DH, is 
CALLed from 003BH. This rou- 
tine locates the printer at 37E8H, 
and checks its ready status by 
reading 37E8H for a 30H. 

This routine is very poor be- 
cause it is not useful with many 
printers other than Centronic's. 
(Radio Shack has assumed that 
a smart printer will be used.) 

You can capture the routine 
and use your own by changing 
the address stored at 4026H and 
4027H to the address of your 
printer driver. (Note: Be sure to 
PROTECT your printer driver 
program by answering the 
MEMORY SIZE question). 

SCANKE scans the keyboard 
for an entry (key closure) and re- 
turns the ASCII value of the key 
in the 'A' register. SKANKE is 
located at 002BH, you must ex- 
change registers before calling 
this routine. 

EXX .save registers 

CALL 002BH ;scan the keyboard 
EXX .restore registers 

AND 7FH ;masK out bit 8 

Cursor control table is lo- 
cated from 0506H to 0540H. 

1. Backspace and delete character — 
04CEH 

2 Delete last character— (MCE. HL point 
to video memory of character. 

3 Cursor on— 04B8H 

4 Cursor off -04BDH 

5 Convert to expanded characters— 
04F6H 

6. Backspace cursor — 04DAH 
6a. Advance cursor— 04ECH 

7. Down feed cursor— 04E7H 
8 Up feed cursor— 04F1H 

9. Cursor home— 04C0H 
10. Cursor to beginning of line— 04A1H 
11 Erase from cursor to end of line— 
0573H 



12 Clear all after cursor — 057CH 

Relocated to RAM on power 
up: 

1 Vectors tor interrupts— 06D2 to 06E6H 

2 Keyboard device control block— 06E7- 
06EE 

3 Video DCB—06EF to 06F6H 

4 Printer DCB-06F7 to 06FEH 

5 4080 to 191CH (uncertain) 

Basic command table— 1650 
to181FH 

(Note: This is ASCII text, 
however, the first character in a 

word has the most significant 
bit (8) set to indicate new word.) 

Jump table— 1820H to 
18C9H. These are two word ad- 
dress, i.e., AE 1 D means that the 
routine is located at 1DAEH. 
This table is a one for cor- 
respondence for the BASIC 
command table. 

Error messages — 18C9 to 
18F6H. The data here is ASCII 
code and two words each, i.e., 
4E 46 is the ASCII for the NF 
code. 

If any of you readers have un- 
covered any more of the secrets 
and would like to share them, 
then please send addresses of 
the routines and any other infor- 
mation you have. 

One last note, Radio Shack's 
RS-232 card has several loca- 
tions for its addressing. The 
control of the Baud rate, parity, 
number of bits to be sent, etc.. 
are a combination of both hard- 
ware and software selection. Its 
data port is located at port EBH. 

I wish to express my thanks to 
Bob Coble, Dwane Saylor and 
Geogre Higson for their assis- 
tance in locating and defining 
the routines.! 



80 Microcomputing, September 1980 • 187 



STYLE 



The intricacies of PRINT statements. 



Variations On A Theme 



George ft Bullitt 

Route 82 

East Haddam, CT 06423 



Since becoming hooked on 
the TRS-80 in July 1978, it 
has been my singular objective 
to collect all the available 
reference material I could find 
on programming that wonderful 
machine. At best the collected 
works cover the more obvious 
routines, ignoring what I con- 
sider to be the fundamentals 
that can change a good program 
into a better one. 

Printing a Line 

One of those fundamentals is 
the printing of a line. Have you 
ever found in a book even one 
paragraph on the printing of a 
simple line? 

Well, turn on your set, be- 
cause here it is! Get yourself in- 
to BASIC, type and RUN the 
following: 



10 CLEAR 100 

20 PRINT STRINGS<63.-") 



How about that! 

Let's analyze the code. Line 
10 clears string space. (Delete 
line 10 and see what happens.) 
Line 20 utilizes strings which 



print almost anything, as many 
times as you want. In this in- 
stance it printed 63 dashes ( — ) 
which is the maximum for the 
TRS-80 screen. Just remember 
that the number is placed left of 
the comma, and the character 
you want printed is on the right 
side, enclosed in quotes (except 
for control codes). 

Type and RUN this mini pro- 
gram: 



10 CLEAR 100 

20 PRINT STRINGS<21,"X');STRING$<2r 

•■):STRING$(21, ) 



See what I mean about the 
STRINGS function? 

In case you have forgotten, 
the semicolon between state- 
ments prints everything on the 
same line and eliminates the 
need to repeat the PRINT state- 
ment for each command. On the 
other hand, typing a colon be- 
tween statements, followed by 
PRINT, prints each statement 
on a different line. If you are a 
skeptic try it by retyping line 20 
to read: 

20:PRINT STRING$<21."X"):PRINT 
STRINGV21." '"). PRINT STRINGS 
121. ) 

Okay, now that you know how 
to print a line, let's get more 
specific and print a line at the 



top of the screen then another 
one 1/2 inch below it. Type and 
RUN: 

10 CLEAR 100 

20 LS = STRING$<63, ") 

30 PRINT L$ 

40 PRINT CHR$(138) 

50 PRINT LS 

In spite of those funny look- 
ing bar graph lines, it works! 
CHR$(138) is the ASCII code in- 
structing the computer to print 
three blank lines. It also hap- 
pens to be the graphics code to 
print that up and down bar on 
the screen. However, when that 
code is sent to a printer it prints 
only the three blank lines. 

If you write a program strictly 
for the video display use the 
PRINT statement to print blank 
lines instead of CHR$(138). If 
you include a routine that also 
writes to a printer, then use it in 
that part of the program to save 
time and memory. 

Notice in line 20 that 
STRING$(63,"-") is made equal 
to a smaller string character (L$) 
again saving time and memory. 

It was stated earlier that the 
STRINGS function prints almost 
anything, so why not a control 
code such as CHR$(138)? 
Retype line 40 to read: 

40 PRINT STRINGS(1.CHR$<138)) 



Remember, since we are us- 
ing a control code, the quotes 
are not used to the right ofthe 
comma. Run the program and 
you will find that it does the 
same job, printing three blank 
lines. Each additional increase 
in the number to the left of the 
comma will print one more line 
and add 5/32 of an inch between 
the printed lines. 

Changing the number to two 
will print four lines or 5/8 of an 
inch and changing it to four will 
print six lines or approximately 1 
inch between lines and so on. 

More Sophistication 

To expand the theme and 
make our program more sophis- 
ticated, type and run: 



10 CLEAR 100 

20 LS - STRINGS(63." ") 

30 INPUT "NO OF LINES 

TO PRINT"; L 

40 FOR X = 1 TO L 

50 PRINT LS 

60 NEXT X 



Lines 40 through 60 set up 
the FOR-NEXT loop, ending It 
when the number of lines you 
entered have been printed. 
Entering 14 fills up the screen. 
Seven fills half the screen. This 
type of program is especially 
useful for making up ruled lines 
on a page with your printer. If 



188 • 80 Microcomputing, September 1980 



OMEGA 

SALES 
CO. 






INTF.RTFC SUPTRBRAIN 



VK RAM $2449.00 
64K RAM *; 



"WHOLESALE COMPUTER PRICES" 
DIRECT TO THE PUBLIC 

1 2 Meeting St.. Cumberland. R.l. 02864 



PRODUCT SPECIAL 

OF THE MONTH!! 



ililiililHWiiiirv 



\\\\\\\ww\\\\\\\\\\\\\\\ 








Products are 

NOW 

IN 

STOCK 

AT 

JIMEGA 

Sales 

Co. 



Atari 800 
$749.00 





NEC Spinwriter 
5510 5530 $2449 




Soroc 1 20 $699 



CALL TOLL FREE FOR OMEGA'S PRICE! 



OMEGA OFFERS THE BEST DELIVERY AMD PRICE Oh: 
APPLE • ATARI • TRS-80 MODEL II • INTERTEC • 
T.I. 810 • HEWLETT-PACKARD-85 • SOROC • 
COMMODORE • NEC * QGME • CENTRONICS 
(1MEGA sells only factory fresh, top quality merchandise I our jstomers. 
HMEGA will try to match any current advertised price with similar purchase conditions. 

Before you buy anywhere else - be sure to call HMEGA Sales Co. 
1401 722-1027 or 



1-800-556-7586 



2MEGA ships via GPS, truck, or air. COD's. VISA. Mastercharge accepted. 



VISA 



you want to double space the 
lines change line 50 to read: 

50 PRINT LS PRINT 

An easier way, however, is to 
increase the number in line 20 
from 63 to 64. Increasing the 
number adds a dash (-), which 
pushes the invisible cursor 
around the corner to the head of 
the next line, completing the 
command. Then it moves to the 
line below, creating the double 
space, to wait for another com- 
mand, which in this case is to 
print 64 dashes. 

Now, how about printing a 
line at the top of the screen and 
then another one two inches 
below it with a message in be- 
tween. Type and RUN: 



10 CLEAR 100 

20 IS = STRING$(63. ■■■■ ') 

30 NS = STRING*4.CHRS 

(138» 

40 PRINT LS 

50 PRINT N$ 

60 PRINT TAB 

(22). REPORT TO THE 

BOARD 



70 PRINT NS 
80 PRINT LS 



Not bad! But what if I want to 
vary the report heading? In that 
case, add the following: 



35 INPUT TYPE IN YOUR REPORT 
HEADING ,R$ 



Since the number of letters in 
the report heading will vary, a 
formula has to be built into the 
program so that the computer 
can figure the correct tab posi- 
tion, regardless of the number of 
letters. 

The way we arrived at the tab 
position (22) in line 60 was to 
subtract the number of letters in 
our heading (19) from the total 
number of spaces (63) dividing 
the answer by two. Translating 
that into a formula the computer 
will understand is relatively 
easy. Simply stated the formula 
is: 63 minus the length (LEN) of 
the heading (R$) divided by two 
(12). 

In computerese it is written 



63-LEN(R$)/2. Since the com- 
puter has to calculate the value 
of 63-LEN(R$), before it can 
divide the answer by two, it must 
be enclosed in brackets. 

Now the formula looks like 
this: (63-LEN(R$)/2. It follows 
that the answer will be our final 
tab position. The formula itself 
will have to be enclosed in 
brackets. Retype line 60 and 
RUN: 



60 PRINT TAB ((63-LEN(RS))/2).RS 

For the finale, use the same 
formula to print a line across the 
screen with the report heading 
embedded in the middle. Type 
and RUN (clear the previous pro- 
gram by typing NEW and press 
ENTER): 

10 CLEAR 100 

20 INPUT TYPE IN YOUR 

REPORT HEADING ,R$ 

30 LS = STRINGS((63 LEN 

(RS)V2 i 

40 PRINT LS.RS.LS 

Simple but effective! 



Note that the formula is 
placed to the left of the comma 
in line 30, giving the computer 
the same information as in line 
60. However, instead of printing 
blank spaces to reach the tab 
position, it prints dashes (-). 

To leave a blank space on 
either side of the report heading 
change lines 30 and 40 adding 
line 35: 



30 LS = STHINGS(|63LFN 

(R$IV2H."-'l 

35 BS = STRINGS*!. I 

40 PRINT LS.BS.RS.BS.LS 



In order to leave room for a 
blank space, one dash is sub- 
tracted from the formula in line 
30, and STRING$(1," ") is added 
to print that blank space on 
either side of the heading 

If you would like to do the ex- 
ercises in this article on your 
printer change all PRINT 
statements to LPRINT. Also, 
you can change the number 63 
to the number of characters (col- 
umns) your printer is capable of 
printing across the page. ■ 



PROFESSIONAL 



TRS-80 Business Software 49 



00 



TRS-80 MODEL II 

All of our Model II Software Requires CP/M and 
CBASIC. This allows you to take full advantage of 
your Model II. 

CP/M $250 

CBASIC $100 

OSBORNE WITH OUR ENHANCEMENTS 

GENERAL LEDGER $125.00 

Handles up to 8000 transactions to as many as 750 operator defined accounts 
Formal report formatting at report print time It stores a full years of posting by 
Month Year and Quarter. Handles Departmentalization integrates with 
Accounts Receivable and Accounts Payable 

PAYROLL $125.00 

Computes pay. Taxes. Handles Multiple Pay Types, keeps Employee Records, 
handles Multiple Reoccuring Deductions. Prints Checks, Prints Payroll 
Journal. W-2s. 94ia. Complete Job Cost with Overhead Distribution 

ACCTS REC & PAY $125.00 

Accounts Payable has complete Purchases Journal which creates Purchase 
Orders that post to Payables when goods are received Calculates checks by 
due date or by demand. Aged Ledger Accounts Receivable has a complete 
Sales Ledger and handles open items with Balance Forward lype payments 
allowed Gives true aging plus more 



OUR PROGRAMS 

INVENTORY $350.00 

CPA CLIENT WRITE UP $650.00 



TRS-80 MODEL I 

All these programs run with TRSDOS and Radio 
Shacks Level II Disk Basic. 

Osborne 

General Ledger, Payroll. Accts Rec & Payable Each 

$49.00 or $129.00 for all three 

Manuals for the Osborne programs and ours 
$20 each 



These programs are already running and can be working for you now Just f an 
or write and we will answer your questions as to now it can work for you 

Full Service Accounting & Processing 



5423 Crows Nest, Fairfax, Va 22030 

VISA/MASTER CHARGE ^133 

(703) 573-7300 

N RM Cobol with Mult i Key ISAM 
$ A95.OO Manual $ 39-00 






We deduct 2.00 from phone orders 
to cover your call for you! 



190 • 80 Microcomputing, September 1980 



Build your own microcomputer 

as you learn 
computer technology at home. 



New from NRI! 

The First Interdisciplinary 

Home Study Course Ever Offered 

As the microprocessor revolutionizes 
the computer world and microcomputers appear 
almost everywhere, NRI brings you a new, con- 
venient, and effective way to keep up with this 
expanding technology. It's NRI's courses in 
Microcomputers and Microprocessors, created 
and designed exclusively for learning at home 
in your spare time. 

Designed for the New Breed 
of Computer Technician 

It's no longer enough to be just a pro- 
grammer or technician. With microcomputers 
moving into the fabric of our lives as low-cost, 
easily available tools for business and home, 
both the programmer and technician must 
become total professionals. With practical 
knowledge of hardware, the programmer can 
design simpler, more effective programs. And 
with advanced programming skills, the tech- 
nician can test and debug systems quickly and 
easily. The NRI course gives you simultaneous 
training in both skills . . makes you one of this 
rare new breed. 

Build Microcomputer, 
Test Instruments 

NRI goes far beyond book learning to give 
you practical, "hands-on*' experience. As you 
ieam, you actually assemble NRI's designed- 
for-leaming microcomputer It performs like 
the finest of its kind, and features both assembly 
and basic language capabilities. 

Every assembly step's a learning step. 
Using the NRI Discovery Lab® plus the NRI 
transistorized volt-ohm meter and CMOS digital 
frequency counter you also build, you perform 
meaningful experiments throughout your 
course . trace circuitry, interface components. 





introduce and correct problems, design your 
own programs, and more. 

The Proven way to Learn 
at Home 

You don't have to worry with travel, classes, 
or time lost from work when you learn the NRI 
way. As they have for more than 60 years of teach- 
ing technical subjects, NRI brings the material 
to you. You study in your spare time, at your 
convenience, using "bite-size" lessons that 
program material into logical segments for easier 
assimilation. You perform experiments and build 
equipment using kits we supply. And your per- 
sonal NRI instructor is always available for con- 
sultation should you have questions or problems. 
Over a million students have already shown 
the effectiveness of NRI |— — — — — ■ 
training. 

Choice of 
Courses 

Several courses 
are available, depending 
upon your needs and 
background. NRI's 
Master Course in Micro- 
computers and Micro- 
processors starts with 
the fundamentals, 
explores basic electronics 
and digital theory, the 
total computer world, 
and the microcomputer 
The Advanced Course, 
for students alreadv 



versed in digital electronics, concentrates on 
software and the world of the microprocessor 
and microcomputer. In both courses, you build 
all instruments and your own computer. 

Send for Free Catalog. . . 
No Salesman Will Call 

Get the details on these exciting new 
courses in NRI's free, WO-page catalog. Shows 
all kits and equipment, lesson outlines, and full 
information, including facts on other electronics 
courses. Mail the coupon today and we'll rush 
your catalog. No salesman will ever call. Keep up 
with the latest technology as you learn on your 
own computer. If coupon has been removed, 
write to NRI Schools, Computer Department, 
3939 Wisconsin Ave., Washington, DC 20016. 




Nil School* 

McCraw Hill Continuing 

Education Center 
WJ9 Wsconsin **nue 
Uashingloi 

NO SALESMAN WILL CALL 

Please check for one free catalog onh 

D Computer Electronics Including 

Microcomputers 
□ TV Audio-Video Systems Servicing 
O Complete Communications Electronics 

with CB • FCC Licenses • Aircraft 

Mobile. Marine Electronics 
D CB SpeaauRs Course 
D Amateur Radio • Baste and Advanced 




All career courses 
approved under (il Bill 
D Check for details 



D Digital Electronics • Electronic 

Technology • Basic Electronics 
I i Small Engine Repair 
D Electrical Appliance Servian* 
D Automotive Mechanics 
D Auto Atf (jxxhtioninc 
D Ar rjjrdoortraj. Mnaeratiori & Heating 

Indudmr Solar fehnoiogy 



(rVacPmi) 



Soeel 



City/ Siur, Zip 

Accredited b> the Accrediting Commission of the National Home Study Council 



179 030 



■Reader Service— see page 22Q 



80 Microcomputing, September 1980 • 191 



UTILITY 



A sort program with options plus. 



Beyond Shell Metzner 



Doug Walker 

3485 Mock Orange Ct. S. 

Salem, OR 97302 



I needed a BASIC sort utility for 
my TRS-80, and not wanting to 
reinvent the wheel, I reviewed 
available literature in the hopes 
of finding a printed utility that 
met my business needs. I went 



looking— without success— for 
a utility that could perform user- 
specified major to minor field 
sorts in ascending or descend- 
ing order on alphanumeric or nu- 
meric fields. 

I did learn that the Shell- 
Metzner sort algorithm provides 
the fastest average BASIC sort- 
ing benchmarks. 

Also, records can be rear- 
ranged by swapping or by using 
record pointers in a separate ar- 
ray or within a field of a multiple 
dimension array that is being 
sorted. In general, pointers 



allow faster BASIC sort speeds 
than record swapping, but more 
computer memory is needed to 
hold them and the expanded 
BASIC coding. 

Both alphanumeric and nu- 
meric sorts can be readily ac- 
commodated, if a character 
string array holds the file to be 
sorted. The BASIC VAL function 
is used for numeric field sorts. 

If the record swapping meth- 
od is used, it is much faster to 
use the BASIC VARPTR func- 
tion to swap character string 
field addresses than to ex- 



ENTER AMOUNT 


OF 


STRING SPACE TO RESERVE? 


2000 








ENTER NUMBER 


OF 


RECORDS TO GENERATE? 5 










BNBQMOQ 




82 M 




97055 






NT 




18 F 




97052 






OD 




69 F 




97054 






TMOGGZS 




51 M 




97051 






QTFMRZTX 




61 F 




97054 






ENTER NAME SORT 


FIELD 1 ( 'NAME' , 'AGE' , 


'SEX' , 


OR 'ZIP 


CODE' 


OR 


ENTER "STOP 


? 


SEX 










IS THE FIELD 


NUMERIC (Y/N)?N 










ASCENDING OR 


DESCENDING SORT (A/D) ?A 










ENTER NAME SORT 


FIELD 2 ( 'NAME' , 'AGE' , 


'SEX' , 


OR 'ZIP 


CODE' 


OR 


ENTER ' STOP 


? 


AGE 










IS THE FIELD 


NUMERIC <Y/N)?Y 










ASCENDING OR 


DESCENDING SORT (A/D)?D 










ENTER NAME SORT 


FIELD 3 ( 'NAME' , 'AGE' , 


'SEX 1 , 


OR 'ZIP 


CODK' 


OR 


ENTER 'STOP 


? 


STOP 










DD 




69 F 




97054 






QTFMRZTX 




61 F 




97054 






NT 




18 F 




97052 






BNBQMOQ 




82 M 




97055 






TMOGGZS 




51 M 




97051 










Example 1. A Sample Run 









change field values. This ap- 
proach minimizes time consum- 
ing string space reallocations. 

Develop Your Own Sort 

Armed with these ideas, I de- 
veloped a Level II, BASIC sort 
utility of my own. 

Within a two-dimensional ar- 
ray, it allows you to specify an 
unlimited number of sort fields 
in major to minor sort sequence. 
You can also specify whether 
the sort on each field is to be as- 
cending or descending, and 
whether numeric or alphanu- 
meric. 

The user specifies the sort pa- 
rameters through INPUT and IN- 
KEY$ statements; but the pro- 
gram can be modified easily to 
assign the parameters for your 
business application program 
and then branch to the BASIC 
sort utility. 

Program Listing 1 contains 
the BASIC program. Lines 140 
through 250 are not part of the 
sort utility, but generate random 
character string data that is in- 
put for demonstration sorts. 

Lines 260 through 480 prompt 
the user to input the sort param- 
eters. Notice that the single di- 
mension array A$( ) contains the 
data field names. Lines 500 
through 660 contain the coding 



192 • 80 Microcomputing, September 1980 

Scanned by Ira Goldklang - www.trs-80.com 



BRING YOUR TRS-80 
KEYBOARD TO LIFE! 

Mora Itw a ,ao» afO -a i^ad •>•• naoolina «o inwodW* AOtW ond 

QfCM I •» - ..boa. d KWi(M> and quKk »dV „ •»» lo< I ..»l II (ASK 

Ihay .» bH> «a»y aoaula. BW> «• !•* • «aw« ia»t «n 'h— ■ o.a« 
anyway « rataonia io (mww « n aa» »«i "i fh> •■«»>■ 'HTWI. o in' 
I, — cv« AUICW Of CUT ood a '.« *.no. mo.. 

•Mil an*M ond *aat la.ai « a» 0-«* BASIC »t»'»"" »<~ •>' 

• Dakoanona. No <M -o MO *«*. «•> I ••»! ■ ' 

• Aa'cxapaa- •» »-••. ka, **•' "aM " k»» do-" "X "••* • "•* 
tscond 4a>or "<• <no»ac«a> 'isMh abovl »-o>i p« •acond 

• s."oW k»y.i'o*. k<rM>< •"•»» Mold daion Sw" M o 

and on mui BASK taywora' n laa k lp d sv> •• aw* »Vi »o>. <on at 
\>qr any ktywwd ia a*» I 

• «a>aoofd nam laobtv Any naojianH, >„»<i nw «an ba dalmad 
a~i tola. a~a»ad - a .<a> kayMraka Vaa .at) M - *a Man*, 
l ok.. Mm- a>wdaar, owi al iiaHHM karat* 



• k'W oraMtiad aO-'-n* MM t can*. ii Mtn •»»«•»*<* •<» a d-tatar 
•a* p*«aa" '•*••"* *or •»*•••• -ma<<a<t and daayajoat *kn n-heto 
tiaiamantt <an b* coeaad <o adtat pa-n at ma aiegram o> coiaaxnad >o 
lorn, longa. anrt •_«•*>,< •**19>*% ** •*•' Mahal BAVC t lOti Kan 
»*>n oh talt 'a' 

• lot, toad** HM 'oodt bant <«**».« wnj ClOAD ,'a.an l » G.a> 

n mo.h-na lonowaaa, ond may b* tavad on d-tkFaatwrat 
ion b* Balaton 1 »a4an.»aly |t»' or datai-na, Hna» 0~»»UN IMMTp-.- 
wh ,Hall m mantoi v n- «»>« •> u«ob"uv.el» 

• Iho.ooo»> docantanNM-on I a. r. loohx* •. «.ala.n.d ■" d»ta.l alon« «n*i 

••t lo* *•»•• m>1 I 

WIIOII -ill to.e you howit ol aMoii m BASK pfogion. d*»*iopn>ani So 
*h, ~oi>» or^.»>». Mai U * •••"9 yav k«»aoe»d la Ma loss* «..» 

MM 



©DISCOVERY BAY 
SOFTWARE OQ 
P O Box 4«4 Port Townseod, WA 96368 



CPT 



EXPANSION 

I NTERFACE's 



FOR 

TRS 8 0'- 



FROM 

COMPUTEX 




FEATURES 

•PROVEN INW SrSTfK EXPANSION BOARD 

• RS23?/70i"A SE8IAI INTEPfACE 

• MEMORY EXPANSION 10 J?K BYTES 
a CUSTOM TiNiSHfO WOOD CABINET 

a REMOVE ABIE TRONT PANEL AllOWS 
E ASY DISK DRI VI AODI HO NS 

• BUIIT IN MU'IIN MN MD DISK DRIVE 

SUPPl I E S 
a IS DIMERENT CONf I GURAT I ONS FROM 
S? 4 9 KIT Io SDOOIor 7-D0UBIE DRIVE 
UK ASSEMBIEO SYSTEM 

^392 

OMPUTEX (713)332-439f 
I 7 MO Hf tili|t CI Webtlti T • 7 7 598 



@ 




SUPERIOR SOFTWARE PACKAGES 
DISK BASED TRS- 8 * 

SMARTTERM •$79.95 

UNQUESTIONABLY THE BEST 

SMART TERMINAL PACKAGE 

FOR THE TRS 80 

•True Break Key 

•Auto Repeal (Typomatic) keys 

•Programmable soft' keys 

• Forward/Reverse Scrolling 

Multipage Display 
•Transmit from Disk File. Screen 

or Buffer 
•Receive to Disk File, Buffer or printer 

• Multi Protocol Capability 

SPOOI.-80 • $39.95 

A TRUE DISK TO PRINT DESPOOLER 
FOR THE TRS-80 

• Print Disk Files While Running 

Other Programs 

• Prints Compressed Basic Files 
•Includes RS-232 Driver for 

Serial Printers 

CALL US FOR YOUR CUSTOM 
SOFTWARE REQUIREMENTS 

MICRON, INC. Modem 

10045 Waterford Drive Versions 

Ellicott City, MD 21043 Available 

(301)461-2721 Soon 

• TRS-80 is a Trademark of Tandy Corp. 



— TRS-&0 MODEL II USERS — 
Preserve — Protect — Display) 

your equipment with 

CRYSTAL CLEAR 
PLASTIC COVERS 




• Kayboo.dorxJCM l24 9Jao 

• Una Prima* M HaOSeo 

pAn 1 1 50 poMoaa acx* 
lindane latidanii odd 4% tokn 101J 

Intioducioiy ONat, Buy both cova«j 6 ion 



Convblnotion price 134.93 
Including postog* 

MODEL I covers olso available 
DEALER INQUIRIES INVITED. 

Crown Plastic Co. ^ 119 
3746 N. College 3 1 7-925-5566 
Indianapolis. IN 46225 



4* 



HISPED 

TAPE OPERATION 

2K Baud PLUS 
for the TRS-80'* 

• Saw, verify and /<W programs up to 

4 time. t.tMo ih.in normal 

• Save, verify fend load arra\ duta upto 
M tkasa la-u-i than PRINT* 

• l sei wiriablc hardcopj loiinainni; ( ' 

output roatina work «ith most 

printcrv) 

• "HISPED" in a machine lan^uatc 

program (not i hardware add-on) 

• 2 copies plu- a frrr bask (est pr<>v;r-m 
supplied on high quality cassette— tor 
level 2. I6K, I2K or 4hk 

Unie lor full specif nation* or send 
$24.95 Ick or mo) * $1.00 P rl(CaU1 

residents add 6 B 'o sales tax) 

24 Hour OnlentiK I ine 1415) f66-SS44) 



99 



PALOMAR 
SOFTWARE 

170 S. Palomar Dr. 



W Sp v 



Redwood City, Ca. 94062 

^228 



-TRS-80 11 ■ ragista.ad Iradamark of TANDY CORP 



Turn your Micro Into an 

electronic and security 

controller with our new 

TRS-80 INTERFACE 




$59 95 



To Order 

Send $59 95 

plus S2 05 for 

shipping and 

handling 

Illinois 
Rrndenls 

TBS BO Soft 

ware (Specify 

T.ipe or Disk i 
$10 with 

purchase of 

Micro 

Commander 



90 Day Warranty 
Assembled & Tested: 



COMPUTiR CONTPiOUED REM0T! C0NTR01 
No* m inciptmiM wd *Kttl carrwr carrtM inicrlact Hitmen Mm 
TSflSDMdlhtBSnl IOit«M(C*MroliMdul« ThrtnlCP.0 
COMMANOfR I lOitullulr^ tnt ,nu- i.-impulr' i jn conliol »bui 
iiqnii ipphMcct mtofs TV slrreo htHert iiarmi Ian pumpi He 

COMPUTER C0NTR0LIE0 SECURITY 

Add i nea dMatmwa la yaur security lytlcm Place your hane under 
control al year cawaa l tr real lime deck aikile yaa are on mcalien Add 
»n max pari la yam caatamer mi i nl e l li«a a ce laaan Wilktortchetan 
daanaiitina^aiOTyaMrc a aaaiiioawakaawa^i tt arkiqn^ 

EASY TO USE NO WIRES TO RUN 

Total conliol ol all I 10 moduli* UMi/e ill ?S6 kaau and a*M code 
caaakiaaliont Direct imeriwt i« AC pawn line Nacaaimaadcantaiela 
purchase Ho sonic link Pkjat rlireclly nlo IRS MMaaYi I llfwrlllni 
Oiskl castettt lick or my I M atpul aad I bit aakaal Til port 
MANUAL INCIU0ES All SOf TWARE LISTINGS 
Ihe I4K basic 4 « I pregrar. dees Ike loiiowia- 

loads niKwae laafaagi dr-wir 

Simuliies comaiand cansal* 

Provides sequeniKi operation 

Utilises real lime clock lor control 

Complete documentjiion includes 8080 sm 

INTERFACE TECHNOLOGY ,.w 

IT. po Box 383 De$ Plaines II 60017 
Phone 1312) 297 2265 



- Reader Service see page 226 



80 Microcomputing, September 1980 • 193 



for the sorts. 

The Shell-Metzner sort algo- 
rithm 1 has been used with a sub- 
routine in lines 930 through 
1010. Using the VARPTR, this 
subroutine compares sort field 
values (that switch record ad- 
dress pointers) in line 1030 
through 1090. 1 Notice in the sort 
field value comparison that VAL 
is used to perform numeric 
sorts. The relational operators 
">" and "<" are used for as- 
cending and descending sorts. 

Lines 680 through 690 check 
to see if there is another sort 
field. If not, the sort is com- 
pleted and lines 850 through 870 
display the sorted records. 



If there is another sort field, 
lines 710 through 830 identify 
ranges of records in the prior 
sort which are equal to those in 
the second field. The beginning 
and ending record numbers of 
the previous sort field ranges, 
which equal the ranges in the 
second field, are input to the 
Shell-Metzner algorithm. These 
records are then re-sorted to the 
current field specifications. 

Line 560 ignores record com- 
parisons that are outside the 
current range of interest. This 
process is repeated until all 
records are processed. 

A Sample Run 

Example 1 is a sample run of 



Sort Sequence 


Field Name Sort Order 


Data Type 


Major 


Sex Ascending 


Alphanumeric 


Minor 


Age Descending 

Program Listing 1 


Numeric 



five records generated by ran- 
dom field values. Next, a sort is 
specified in the order shown in 
Table 1. 

Finally, the sorted records are 
displayed. Note that all "F" sex 
field records are ordered before 

all "M" sex field records (as- 
cending sort sequence on major 
sort field). Within "F" and "M" 
ages are ordered from oldest to 
youngest (descending sort order 



on the minor sort field). 

This BASIC sort has proved 
reliable and a real time-saver 
when writing business pro- 
grams. Hopefully, you will be 
able to put it to good use with 
your system. ■ 

1. Thomas E Doyle. Kilobaud Micocom 

puling. "5 Minutes Or 5 Hours- Sorting 

Routines Compared.' May 1978. pages 

100-102 

2 T, R. Dettman, 80-US Journal. Super 

Sorting. ' November/December 1979. pages 

28 and 62. 



10 


REM 


20 


REM 


30 


REM 


40 


REM 


50 


REM 


60 


REM 


7 


REM 


H0 


REM 


90 


REM 



USER DEFINED MULTIPLE FIELD SORTS * 

* * ASCENDING OR DESCENDING * 

* * ALPHANUMERIC OR NUMERIC * 

* * MAJOR TO MINOR * 
DOUG WALKER 

34 85 MOCK ORANGE COURT SOUTH 
SALEM, OREGON 97303 
(503) 393-2685 

HOUSEKEEPING * 
100 CLS:DEFINT A-Z 

110 INPUT" ENTER AMOUNT OF STRING SPACE TO RESERVE" 
120 CLEAR D 

130 REM * GENERATE RANDOM SORT RECORDS * 
140 INPUT"ENTER NUMBER OF RECORDS TO GENERATE" ;A 
150 DIM CS(A,4) ,AS(4) : AS (1 ) ="NAME" : AS ( 2) ="AGE" : AS ( 

EX":AS(4)="ZIP CODE" 
160 FOR 1=1 TO A 
170 B=RND(8) 
180 FOR C=l TO B 

190 CS(I,l)»C$(I,l)+CHRS(RND(26)+64) 
200 NEXT C 

210 E=RND(85) :CS ( I , 2 ) =STR$ (E) 

220 IF RND(2)=1 THEN C$(I,3)="M" ELSE C$(I,3)="F" 
230 E=97050 + RND(5) : CS ( I , 4 ) =STR$ (E) 
240 PRINT CS(I,1),C$(I,2) ,CS(I,3) ,CS(I,4) 
250 NEXT I 

260 REM * USER SPECIFIES SORT PARAMETERS * 
270 FOR C=l TO 4:C1(C)=-1:C2(C)=0:D(C)=0:NEXT C 
280 R=1:J=A:K=1 
290 PRINT'ENTER NAME SORT FIELD" ; R; : INPUT" (' NAME ' , 

', 'SEX', OR 'ZIP CODE') OR ENTER 'STOP'";SS 
300 IF S$="STOP" AND R=l GOTO290 
310 IF SS="STOP" GOTO480 
32 FOR C=l TO 4 
330 IF S$=AS(C) GOTO360 
340 NEXT C 
35 GOTO29 
360 CKR)=C 

370 PRINT"IS THE FIELD NUMERIC (Y/N)?"; 
380 GOSUB1100 
390 S1$=CH$ 

400 IF S1$»"Y" THEN C2 (R) -1 :GOTO420 
410 C2(R)=2 
420 PRINT'ASCENDING OR DESCENDING SORT 



430 KS=INKEYS:IF K$=' 



(A/D)?"; 



440 


IF K$="A" THEN D 


450 


IF KS="D" THEN D 


460 


IF R»4 GOTO480 


470 


R=R+1:GOTO290 


480 


Z6=l 


490 


REM * SORTS US 


500 


Z3-J 



" GOTO43 ELSE PRINT KS 

R)»1:GOTO460 

R) =2 ELSE GOTO420 



SORTS USING SHELL METZNER ALGORITHM "* 



510 Z3=INT(Z3/2) 

520 IF Z3-0 THEN 650 

530 Z4»K:Z5-J-Z3 

540 Z7-Z4 

550 Z8-Z7+Z3 

560 IF Z6>1 AND (Z7<K OR Z7 >J OR Z8<K OR Z8>J) THEN 620 

570 GOSUB920 

580 IF Fl-2 GOTO620 ELSE GOSUB1020 

590 Z7-Z7-Z3 

600 IF Z7<1 THEN620 



610 GOTO550 
620 Z4=Z4+1 
630 IF Z4>Z5 THEN 510 
640 GOTO540 
650 IF Z6=l THEN 680 

660 IF Z6>1 AND M=A THEN 680 ELSE 720 

670 REM * SEE IF THERE IS ANOTHER FIELD TO SORT * 
680 Z6=Z6+1 

690 IF C1(Z6)=-1 THEN 840 

700 REM * SORT SEGMENT COMPUTATION ON INTERMEDIATE Til 
;D RU MINOR FIELD SORTS * 

710 M=l 

720 Z7=M:Z8=M+1:J=1:L=0 
730 IF C2(Z6-1)=1 THEN 760 
3)="S 740 IF CS(Z7,C1(Z6-1) ) =CS (Z8 ,C1 (Z6-1 ) ) THEN J=J+1 ELSE 
L=l 
7 50 GOTO770 
760 IF VAL(C$(Z7,C1(Z6-1)))=VAL(C$(Z8,C1(Z6-1))) THEN J 

=J+1 ELSE L-l 
770 IF L=0 THEN 800 

780 IF L=l AND J>1 THEN K=M : J=Z7 : M=Z8 : GOTO500 
790 I.=0:M-Z8 
800 Z7=Z7+1:Z8=Z8+1 

810 IF Z7<A THEN 7 30 

820 IF L=0 THEN K=M: M=Z7 : J=Z7 :GOTO500 

830 GOTO6 80 

840 REM * DISPLAY SORTED RECORDS * 

850 FOR 1=1 TO A 

860 PRINT CS(I,1) ,C$(I,2) ,CS(I,3) ,C$(I,4) 
•AGE 870 NEXT I 

880 REM * CONTINUATION CHECK * 

890 PRINT"DO YOU WANT TO SORT THESE RECORDS AGAIN (Y/N) 
?"> 

900 GOSUB1100 

910 IF CH$="Y" THEN 270 ELSE END 

920 REM * RECORD ADDRESS POINTER SWITCH CHECK * 

930 IF D(Z6)=2 GOTO970 

940 IF C2(Z6)=1 GOTO960 

950 IF C$(Z7,C1(Z6) )<C$(Z8,C1(Z6) ) THEN U 

960 IF VAL(CS(Z7,C1(Z6)))<VAL(C$(Z8,C1(Z6) 
ELSE 1010 

970 IF C2(Z6) =1 THEN 990 

980 IF CS(Z7,C1 (Z6) ) >CS (Z8,C1 (Z6 ) ) THEN 1000 ELSE 1010 

990 IF VAL(CS(Z7,C1 (Z6) ) ) >VAL(C$(Z8,C1 (Z6) ) ) THEN 1000 
ELSE 1010 

1000 F1=2:RETURN 

1010 Flail RETURN 

1020 REM * RECORD ADDRESS POINTER SWITCH * 

1030 FOR C=l TO 4 

1040 Il»PEEK(VARPTR(CS(Z7,C)) ) : I 2=PEEK (VARPTR (C$ (Z7 ,C) ) 
+1) : I 3=PEEK( VARPTR (CS(Z7,C) )+2) 

1050 J1=PEEK (VARPTR (C$ (Z 8, C) ) ) :J2=PEEK (VARPTR (CS (Z8 ,C) ) 
+1) :J3=PEEK ( VARPTR (C$(Z 8, C) )+2) 

106 POKE ( VARPTR (CS(Z7,C) ) ) , Jl : POKE (VARPTR (CS ( Z7 ,C) )+l) 
,J2:POKE(VARPTR(CS(Z7,C))+2),J3 

107 POKE ( VARPTR (CS(Z 8, C) ) ) , 1 1 : POKE (VARPTR (CS (Z8,C) )+l) 
, 12: POKE (VARPTR (C$(Z8,C ) )+2) ,13 

1080 NEXT C 
1090 RETURN 

1100 REM * Y/N INPUT CHECK * 
1110 CHS-INKEY$:IF CH$="" THEN 1110 

1120 IF CH$="N" OR CHS="Y" THEN PRINT CH$:RETURN ELSE 1 
110 



ELSE II 
THEN II 



Table 1 



194 • 80 Microcomputing, September 1980 



TUBE 

The Ultimate Buffered Editor 
for TftS-80 Disk Systems 

TECO like, 21 edit commands, direct 
cursor control, block move, multiple In- 
put lines, file size limited only by 
available disk space. This is A FULL 
SCREEN EDITOR UTILIZING CURSOR 
CONTROL. 



•On TRS-80 Disk with Manual 
Also available for TRS-80 



$40.00 



SBASIC Structured Basic Pre- 
processor $50.00 

•BASOPT Basic program optimization 
program $20.00 

313 Meadow Lane 
Hastings, Michigan 49058 

(616) 945-5334 
(Dealer inquiries invited) 

VISA * MASTERCHARQE ACCEPTED 

■ TRS-80 is a trademark ol Tandy Corp 



TRS-80™ SOFTWARE 



MACHINE LANGUAGE 

MONITOR *3 $39.95 

Disassembler, memory displays, memory move, search verify 
and modily. read and write ooiect lapes he»adecimai 
anlhmelic. obiecl code relocator: unload programs lor dish, 
symbolic oulpul tapes HI page instruction manual 

MONITOR «4 $49 96 

Same as Monitor *3 bul adds save and read disfc files, direct in 
put and output ol disk sectors, send, receive, or talk to another 
compute! via RS232C interlace, symbolic disassembly on 
disk 

SMART TERMINAL ... $40.95 

Enables your TRS-80 to be used as a remote terminal to a lime 
sharing system Supports lowercase and lull range ol control 
keys Automatic Transmission between memory and host com 
puter Much more 

FASTSORT $9 95 

Machine-language sorting program lor use by Basic programs 
Many times faster than other methods' 

GAME OF LIFE . $5.95 

John Conway s game ol lile shows patterns evolving and 
changing swi'tly belorc your eyes A dazzling demonstration 
program' 

BASIC SOFTWARE 

MAILING LIST $6995 

Maintains mailing list liles ol over 1000 names per diskette 
Add. delete, change, find name, machine language sort, print 
Id* 

SMALL BUSINESS ACCOUNTING $49 95 

Based on Dome Bookkeeping Journal f612. keeps track ol in- 
come, expenditures, and payroll lor a small business ol up to 16 
employees Daily, monthly, yearto-oale summane* 

HOME BUDGET $4995 

Checkbook maintenance combined with records ol income 
and monthly bills Monthly and year to-date summaries show 
mg tan deductions 

DATABASE MANAGEMENT $29 95 

Delines dies ol any description and maintain on cassette or 
disk Add. change, delete. Iind. sort, justily print, line print, 
total lields, write 



HOWE SOFTWARE ^ioa 

14 Lexington Road 

New City. New York 10956 

O TRS-80 is a rtgistwid trademark ol Tandy corp 



NEW INTERACTIVE 

DISASSEMBLER 

INTER-DISflO 

A Z-80 disassembler designed specifically 
for the TRS-80* Model I. With it you can 
obtain the original mnemonics from Z-80 
machine code. You can also follow the logic 
of machine language programs like the rou- 
tines in your ROM, and unravel the secrets 
of the BASIC interpreter. 

Features: 

— F.nablo you to follow jumps and sub- 
routine calls. 

—Continuous or one line al a lime disas- 
sembly . 

—Outputs to screen or to printer, at user's 
option. 

— You can insert your own comments dur- 
ing disassembly. 

— Completely relocatable. Relocator pro- 
gram included. 

INTER — DISflO requires a 16K machine with 
Level II BASIC. Disassembler and reloca- 
tor supplied on cassette only. 
Price: S14.95. Cheques or money orders ac- 
cepted. (Quebec residents add 8°7o sales 
tax.) 



OKTOLOGIK 



^426 



574 NANTEL. LONGUEWL 
QUEOEC. CANADA J4L-1Z9 

Dealer Inquiries welcome. 

'TRS-80 Is a trademark of Tandy ( orpuratio 



W% COTTAGE 4»^ 

y% SOFTWARE #^B 

Y% FOR TRS-80™ Micro Computers # ^ 

PACKER: Automatically edits all or part of your 
Basic program to ease editing, run taster, or save 
memory. Has 5 sections: UNPACK -unpacks multi 
pie statement lines into single statements maintain- 
ing program logic, inserts spaces and renumbers 
lines for easier editing. SHORT— shortens your pro- 
gram by editing out all REM statements, un 
necessary words and spaces. PACK -executes UN 
PACK and SHORT, then packs lines into multiple 
statement lines; maintains program logic 
RENUM- renumbers program lines including all 
GOTO's. etc. You specify increment. MOVE - moves 
any line or block of lines to any new location in the 
program and renumbers lines. Written in machine 
language; supplied on tape in 3 versions for 16K, 
32K. & *8K. For Level II or Disk Basic S29.95 

DISASSEMBLER: Read, write, and copy system 
tapes. Display and modify memory contents 
Disassemble ROM, DOS, and system tapes into Z-80 
mnemonics. Search for strings in memory. Much 
more!! Includes 32 pages of documentation and in 
formation. 

For 16K Level II 119.95 

SYSTEM TAPE DUPLICATOR: Copy your system for 
mat tapes. Includes verify routine. 
For any Level II S14.9S 

CHESDISK: Transfers your copy of Microchess lo 
disk for quick and easy access 
For any Level II Disk system S8.95 

CASSETTE LABEL MAKER: A mint-word processor 
to print cassette labels on a line printer. Includes 
manual and 50 peal-and-stick labels on tractor feed 
paper. 

For 16K Level II and printer S15.9S 

INSTRUCTION MANUALS for any Cottage Software 
original programs available for 20% of program list 

fnce. Refundable when program purchased. 
RS-80" repairs and modifications. Call or write for 
info. MANY MORE items available. Call or write for 
catalog. DEALER inquiries invited. 
Kansas residents add 3% sales tax. Foreign orders 
in US Currency only 
Call our 24-hour phone: 316-683-481 1 or write 

••TRS-80 it a registered trademark ol TANDY CORP." 

COTTAGE SOFTWARE 

614 N.Harding ,^233 
Wichita. KS 67208 



INTELLIGENT 
TERMINAL 

Use your TRS-80* os a dial-up terminal on any 
standard timeshare system. Includes control 
keys. Print command lists data on printer. 
Store command writes data to disk file. Write 
command reads disk file and outputs to RS232 
Interface $4?.»5 

ADDITIONAL SOFTWARE AVAILABLE: 

ACCOUNTS RECEIVABLE $495 

Maximum 9000 customers with up to 3000 trans- 
actions per customer per billing period. In- 
cludes customer status reports, past due 
billings, mail list, etc. Reports may be run at 
any time as often as desired. Hloh-ouality, pro- 
fessional software. 

GENERAL LEDGER $495 

For medium sized business. Designed and 
proven impossible to unbolonce books. IRS au- 
dltable. Up to 9 departments. High-quality, pro- 
fessional software. 

PAYROLL $495 

For up to 120 people per year. Same high-qual- 
ity, professional software. 

MAR. LIST $9.95 

Basic, no-frills program. Easy to use. Lists all 
(or range of) addresses. Prints 4 lines by 30 
chars on standard 3'/j" x 15/16" label. 



UNILOGIC ^423 

P.O. Box 160 

PARIS, KY 40361 

(606) 987-2678 

(606) 987-4310 

(32K TRS-80" with disk drive required.) 

•TRS-80 Is a trade mark of Tandy Corp. 



SO YOU WANT TO USE 
YOUR TRS-80 TO: 

Ret tarn French. Help your children with 
their reading. Teach your entire family to 
program. But Interaction Is So Awkward 
In BASIC. 

BPILOT IS THE LANGUAGE 
FOR YOU 
BPILOT Is a version of PILOT written 
especially for the TRS-80 with either Level II 
or Disk BASIC. PILOT was developed by 
teachers for Computer Aided Instruction. 
PILOT allows you to concentrate on the 
Instructional goals, not the computer. 

BPILOT HAS 3 VERY 
IMPORTANT FEATURES: 

1. BPILOT Is a complete PILOT. It includes 
the execute Indirect command, a complete 
Match instruction, and long labels. 

2. You create BPILOT programs using the 
TRS-80 commands you are familiar with 
(AUTO, EDIT, LIST, TRON . . .). There are no 
new (and confusing) system commands. 

3. BPILOT allows you to use both PILOT and 
BASIC Instructions In your programs. 
Besides increasing the power of PILOT, this 
makes It easy to Team PILOT If you know 
BASIC, and easy to teach your children 
BASIC once they know PILOT. 

BPILOT Is a concise assembly language 
program making extensive use of the Level II 
ROMs. On a 4K system, the Level II version 
of BPILOT leaves 2K for programs. On a 16K 
system, the Disk version leaves 4K for 

ftrograms. At $24.05 for either version, 
ncludlng a reference manual and 3 
demonstration programs, BPILOT Is a true 
bargain. For more information or to order, 
contact: ^^ Computer A | ded and 

/*—' ,AjH_ A ( Managed Instruction 
\^7T/WllP.O. Box 2030 

Goleta, CA 93018 



• Reader Service— see page 2X 



80 Microcomputing, September 1980 • 195 



UTILITY 



Access forbidden memory locations in your Model //. 



Deflower Your Debug 



Donnal C. Walter, M.D., Ph.D. 
Departments of 
Pediatrics & Pharmacology 
Univ. of Kansas Medical Center 
Rainbow Boulevard 
Kansas City, KS 66103 



Unlike ROM-based operating 
systems, the TRS-80 Model 
II operating system (TRSDOS 
version 1.2) is loaded from disk 
into internal memory on power 
up. Since the supervisor pro- 
gram and input/output drivers 
always reside in the lower 7K of 
RAM, this software should be 
easily accessible for inspection 
or temporary modification. 

The TRSDOS Debug Monitor, 
however, is programmed to con- 
ceal memory locations below 
hexadecimal 2800. It also pro- 



tects RAM above hexadecimal 
F300, its own starting address. 
The Debug Monitor displays and 
modifies the user area between 
hexadecimal 2800 and F2FF on- 
ly- 

In order to gain access to the 
entire RAM. one must either 
write an independent debug pro- 
gram or disable the memory pro- 
tection system of the TRSDOS 
Debug Monitor. The latter may 
be accomplished with the pro- 
cedure described in this com- 
munication. 

Memory Protection System 

Five debug commands (ra(M), 
(B)rk, (J)ump, (L)oad and (F)ind 
share an address-entry 
subroutine from hexadecimal 
F9C0 to FA19 which contains a 
protection segment (Table 1). 
The simplest way to disable this 
segment is to load 00 (NOP) into 
hexadecimal addresses FA01 to 
FA06 and 80FF into FA09 -FAOA. 



Address 


Object Code 


Instruction 


Coiwents 


F9FF 


AF 


X0R 


A 


CLEAR ACCUMULATOR 


FAOT 


21 FF 27 


LC 


HL.27FF 


LOWER LIMIT OF USER AREA 


FA03 


ED 52 


SBC 


HL.DE 


DE CONTAINS THE SELECTED ADDS. 


FADS 


30 CD 


J« 


NC.dlsp 


IF DE<HL DO NOT CONTINUE 


FA07 


AF 


XOR 


A 


CLEAR ACCUMULATOR 


FA08 


21 FF F2 


ID 


HL.F2FF 


UPPER LIMIT OF USER AREA 


FA0B 


ED 52 


SEC 


HL.DE 


DE STILL CONTAINS SELECTED ADDR. 


FA0D 


38 C5 


JR 


C.dlsp 

Table l 


IF DE>HL 00 NOT CONTINUE 



Address 


Object Code 


Instruction 


Coments 


2807 


21 01 28 


LO 


ML. 2801 




2893 


E5 


PUSH 


HL 


LOAD STACK FOR RETURN 


2604 


3E 0? 


LC 


A.0" 


CLEAR ACCUMULATOR 


2606 


21 £1 FA 


LC 


HL.FA01 


ADDRESS OF PROTECT IN DEBUC- 


2809 


77 


LC 


(HL).A 


CLEAR MEMORY 'FA01' 


288A 


23 


INC 


HL 




280B 


77 


LD 


(HL).A 


CLEAR MEMORY 'FA02' 


28 BC 


23 


INC 


HL 




2S0D 


77 


LD 


(HL).A 


CLEAR MEMORY 'FA03' 


260E 


23 


rue 


HL 




280F 


77 


LC 


(HL).A 


CLEAR MEMORY 'FA»«' 


2810 


23 


INC 


HL 




2811 


77 


L" 


(HL).A 


CLEAR MEMORY 'FA05' 


2812 


23 


I'.C 


HL 




2813 


77 


LD 


(HL).A 


CLEAR MEMORY 'FA06' 


2814 


23 


INC 


HL 




2815 


23 


INC 


HL 




2816 


23 


I.NC 


HL 




2817 


36 80 


LD 


(HL),80 


PUT "80" IN ' FAB9 ' 


2819 


23 


INC 


HI 




281 A 


36 FF 


LD 


(HL).FF 


PUT "FF" IN "FAOA' 


281C 


21 A5 F6 


LC 


HL.F6A5 


STEPMOOE PROTECTION ADDR. 


281 F 


36 FF 


LD 


(HL).FF 


PUT "FF" IN 'F6A5' i 


2821 


C3 77F3 


JP 


F377 

Table 2 


ENTER DEBUG MONITOR 



The step-mode loader (ra(M)) 
has a protection segment at 
hexadecimal F6A3 to F6AC 
which may be disabled by 
loading FF into address F6A5. 

There are two protection 
segments which should not be 
disabled. These are at F4A0 for 
(L)oad (TOP) and F930 - F93D for 
(U)pload. 

The program in Table 2 makes 
the proper changes to disable 
the protection segments. It is 
written in linear fashion for 
simplicity, but a loop may be 
substituted for the repetitive se- 
quence. Implement it as follows: 

1. In TRSDOS READY mode, 



type DEBUG ON and press 
ENTER. 

2. TRSDOS READY will return. 
Then type DEBUG and press 
ENTER. 

3. RAM from 2800 will be 
displayed. To enter ra(M) com- 
mand, press M. 

4. The prompt A = will appear. 
To modify RAM, press the F1 
key. 

5. Now enter the object code 
program from Table 2. 

6.To effect this change in 
memory, press the F2 key. 

7. To execute the program 
press C. 
The monitor will then access 



196 • 80 Microcomputing, September 1980 



any area of RAM desired. The 
modified debug program may be 
saved on disk with the following 
steps. 

8. To return to TRSDOS press 
S. 

9. In TRSDOS READY mode 
type DUMP BUGGY {START- 
F300, END = FF80, TRA = 3000} 
and press ENTER. 

Now the command BUGGY 
may be used in place of DEBUG 
after DEBUG ON. The command 
DEBUG ON sets the proper call- 
ing parameters in the supervisor 
area, and the command BUGGY 
loads the modified program in 
high RAM. BUGGY will not run if 
DEBUG is OFF. 

With BUGGY the entire RAM 
is available for inspection. The 
user who wants to study the 
architecture of TRDOS should 
first become familiar with the 
Debug Monitor. The debug pro- 
gram is a good introduction to 
supervisor calls (SVCs) and in- 
teraction with the operating 
system. Important addresses 
are listed in Table 3. 

TRSDOS consists of a set of 



supervisor functions which 
reside in RAM and an overlay 
system which loads auxiliary 
code into a specified area as 
needed. Many of the supervisor 
functions can be called from 
user programs using RST 8 
(SVCs). 

The SVC calling segment is 
located between hexadecimal 
0145 and 018A. Because the 
Debug Monitor uses an SVC to 
set breakpoints, the monitor 
command (B)rk cannot be ex- 
ecuted in the SVC calling 
routine itself. The address table 
for the SVCs starts at hex- 
adecimal 01 A2 (Table 4). The 
stack pointer starts at 1 F00, and 
the overlay area is above 2000. 

Conclusion 

Model II TRSDOS (version 1.2) 
is a versatile and powerful disk 
operating system which 
appears to be relatively free of 
errors. Since the system is user- 
oriented, most users (such as 
businesses and schools) will not 
require direct access to the 
operating system itself. 



Computer hobbyists and sys- 
tems' programmers, however, 
will benefit from easy access to 
the TRSDOS machine code (es- 
pecially the supervisor func- 



tions). Until independent debug- 
gers and disassemblers become 
available for the Model II, the 
TRSDOS Debug Monitor can be 
used. ■ 



START 




■ TART 






A OOP 


^UNCTION or iffRA'ICS 


a oca 


FUNCTION or 


OPERATION 


F300 


InltllHzition 


•'it 7 


!Doad 


Comwnd Routine 


F377 


Proqran Entry Sercnet 


F4B7 


(P)r1nt 


Conrand Routine 


F3B6 


**j1r Zotmani Mode Routine 


F4C2 


(EH>t, 


Command Routine 


m; 


(D)ecim*l ConmanS Routine 


F4EE 


!F)ind 


Comrand Routine 


F429 


he(x) Command Routine 


F562 


(B)rk 


Command Routine 


F430 


(J)upid Command Routine 


F5Cf 


(C)ontinue 


Command Routine 


F43F 


(0)ut Command Routine 


F7C7 


raC-I) 


Command Routine 


F445 


(H)elp Coxriand Routine 


F8A5 


(P)eijiiter 


Command Routine 


F457 


(S)ystem Command Routine 


F8A5 


(U)pload 


Command Routine 




Table 3 







SVC SAKE 


START 


SVC NAME START 


SVC \A"( 


START 


SVC 


SAME 


START 




ADOR 


ADOR 




ADDR 






ADOR 


INITIO 


02A2 


11 VDREAD 084B 


25 TIMER 


0342 


41 


Kill 


13EF 


1 KBIN1T 


(T37A 


12 VIDKEY 094D 


?6 CURSOR 


060T) 


42 


CLOSE 


13F5 


2 SETUSR 


0S18 


15 DISKIO 0EA3 


27 SCROLL 


09AA 


41 


WRHM 


1809 


3 SETBRK 


04E6 


17 PPINIT 0EEA 


33 LOCATE 


IB9S 


44 


DIRUP 


182C 


4 KBCHAR 


B39A 


18 PRCHAR 0F44 


34 READNK 


172F 


4: 


DATE 


1C09 


5 KBLINE 


0306 


19 PRUNE 0F25 


35 DIRRD 


1746 


4 C 


PARSER 


1201 


6 DELAY 


0BB7 


20 RANDOM 09E6 


36 JP2D0S 


:?j; 


IS 


STSCAN 


1CC6 


7 VDINIT 


8560 


21 BINDEC 0A35 


37 D0SCMD 


1383 


52 


ERRMS r , 


139C 


8 VOCHAR 


0630 


22 STCMP 09D3 


38 RETCMD 


1380 


Sb 


RS232C 


1408 


9 VDLINE 


092C 


23 MFYDIV 0ABD 


39 ERROR 


13AC 








10 YDGRAF 


B799 


24 B1NHEX 080? 


40 OPEN 


13E9 












Table 4 











brizzerk| presents 



Package #1 $9.95 
BOXING 

It's you against Bruiser in the fight of the century! 
you control one boxer on the screen and your 
TRS-80* controls Bruiser. But watch out! Bruiser 

GETS BETTER AS THE FIGHT PROGRESSES AND YOU MAY GET 
KNOCKED out! With SOUND EFFECTS 

RUSSIAN ROULETTE 



WITH INCREDIBLE 



an animated cartoon program 
graphics. You'll love it! 

PLUS A BONUS PROGRAM 



PACKAGE #3 $18.95 

(Both Packages #1 and #2) 



USE THE HANDY COUPON OR CALL (24 HOURS) 

(415) 538-3784 

BRIZZERK ^ 

P. O. BOX 373 
San Lorenzo, CA 94580 



•TM of Tanoy Corp 



^ Q£ 



Package #2 $9.95 
THE BATHROOM KEY 

a tough battle of quick thinking! you and your 
opponent test your knowledge and intelligence in 
this game of dueling questions. the goal? to get the 
coveted bathroom key. why? you'll find out! tricks, 
trivia. general knowledge. tv — just about every 
subject imaginable! 

An interactive quiz program for two persons 
16K Level II or 32K Disk Required 



BRIZZERK POBox 373 S»N Lorenzo CA 943SO 

QUICK! Send Me The Following 

D Pkg. #1 at $9.95 (S10.60 for CA Res.) 

□ Pkg. #2 at $9.95 ($10.60 for CA Res.) 
D Pkg. #3 at $ 1 8.95 ($20. 1 8 for CA Res.) 

□ Enclosed is my check or money order. 
D Charge My □ VISA D Mastercharge 

Name_ 

Address 

City 



State 



.Zip. 



Expiration Date. 



PLEASE INCLUDE CREDIT CARD EXPIRATION DATE 



*■ /l eader Service — see pege 226 



80 Microcomputing, September 1980 • 197 



New Releases for the TRS-80 



Oracle-80 

Oracle-80 will provide you with busi- 
ness analysis and forecasting capabili- 
ties previously available only in large 
computer and time-sharing systems. 
Oracle-80 is a flexible, professional time 
series analysis and forecasting package 
that can be used in sales analysis and 
forecasting, product planning, business 
planning, etc. Investors can analyze 
stocks, company trends and growth 
rates. Financial managers and econo- 
mists can analyze the general economic 
climate and investigate business cycles. 
Even families will find Oracle-80 useful 
in analyzing spending or energy con- 
sumption trends. Oracle-80 should be 
used by anyone who needs to analyze 
and forecast monthly, quarterly or an- 
nual data. 

Even though this package uses ad- 
vanced statistical analysis, you don't 
have to understand statistics to use it. 
Oracle-80 was designed to be used and 
understood by the typical business per- 
son. While Oracle-80 is designed for 
ease of use, its powerful analytical ca- 
pabilities will satisfy even the profes- 
sional forecaster. All input and output 
are written in plain English and the pack- 
age documentation carefully explains 
all the functions of the program. 

Adding, deleting and modifying your 
data is accomplished with a very flexible 
editor program, integral to Oracle-80. 
Automatic scaling of inputted numbers, 



the ability to choose from several output 
formats, a calendar format that iden- 
tifies all your data by month/quarter/ 
year, and the ability to add and subtract 
values while inputting from the key- 
board provide added user flexibility. You 
can use moving average, rate of change, 
seasonal indices or cycle indices 
methods to analyze your data. The 
unique graphing capability of Oracle-80 
lets you visualize your historic data or 
any of the modified data series you cal- 
culate. Additionally, you can direct any 
chart or graph to your printer. 

Oracle-80 will forecast future data val- 
ues using trend, moving average or sea- 
sonal methods. You may choose either a 
constant unit trend or a constant per- 
centage growth trend forecast for even 
more flexibility. 

Oracle-80 is one of the most powerful 
and useful business tools you will ever 
use. It puts the future in your hands. 

This package requires the following 
minimum system: 

1. A TRS-80 Level II with 16K RAM. 

2. An Expansion Interface with 16K 
RAM. 

3. One or more disk drives. 

4. Any compatible Disk Operating 
System. 

5. An optional line printer. 



Order No. 0152RD 
(disk-based version) 
$99.95. 



Order No. 01 40R 

(cassette-based 

version) $75.00 



Bowling League Secretary 

Instant Software answers the prayers 
of harried bowling league scorekeepers 
everywhere by presenting the Bowling 
League Secretary package, a com- 
prehensive system that lets you use 
your TRS-80 to maintain a computer- 
based statistics system for any bowling 
league. 

The package is simple to operate and 
provides a dynamic reference to all the 
names of individual bowlers, their team 
numbers, scores, team names, league 
data, and all necessary statistics. 

The system puts at your fingertips all 
individual weekly scores, team 
cumulative scores, bowler cumulative 
scores, and individual leaders in the 
following categories: high average, high 
series, high game and high points. 

You can even start your own bowling 
league scorekeeping business. Bowling 
leagues will be happy to secure your ser- 
vices if you can provide a detailed print- 
out of their league statistics. Speed, 
convenience and profitability are the by- 
words for the Bowling League Secretary 
package. 

This package requires the following 
minimum system: 

1. A TRS-80 with 16K of memory. 

2. An Expansion Interface with 16K or 
more of memory. 

3. One minidisk drive, two drives 
recommended. 

4. Any compatible DOS. 

5. A tractor-feed line printer. 

Order No.0095RD disk-based $49.95. 



Other Programs Available from Instant Software 



0001 R 
0002R 
0004R 
0007R 
0006R 
0009R 
001 7R 
0019R 
0023R 
0033R 
0043R 
0046R 
0050R 
0057R 
0099R 



0O28R 
0034R 
0047R 
0049R 
0051 R 
0055R 
0056R 
0058R 
0063R 
0065R 
0066R 
0068R 
0069R 
0070R 
0072R 
0076R 



TRS-80* LEVEL I & II 

Basic and Intermediate Lunar Lander $7.95 

Space Trek II $7.95 

Beginner's Backgammon/Keno $7.95 

Ham Package I $7.95 

Electronics I $7.95 

Golf/Cross-Out $7.95 

Air Flight Simulation $7.95 

Business Package IV $9.95 

OH Tycoon $7 95 

Bowling $7.95 

Santa Paravia and Fiumaccio $7.95 

Othello $9.95 

Grade Book $9.95 

Chessmate-80 $19.95 

Typing Teacher $9.95 

TRS-80* LEVEL II 

Ramrom Patrol/Tie Figher/Klingon Capture... $7 95 

Space Trek IV $7.95 

Who- Dun-It? $7.95 

Demo II $7.95 

Ball Turret Gunner $9.95 

Demo III $7.95 

Bowling League Statistics System $24.95 

Programmer's Converter $9.95 

Cards $7.95 

Teacher $9.95 

Mimic $7.95 

Your Cribbage and Checkers Partner $9.95 

Household Accountant $7.95 

SkirmisrvSO $9.95 

Financial Assistant $7.95 

TRSS0* Utility II $7.95 



0077R Enhanced BASIC $24.95 

0081R TRS-80" Utility I $7.95 

0082R Daredevil $9.95 

0084R Music Master $7.95 

0089R Energy Audit $49.95 

0092R Archimedes Apprentice $9.95 

0100R Video Speed-Reading Trainer $9.95 

0103R Personal Bill Paying $7.95 

0106R Airmail Pilot $7.95 

0111R Wordwatch $7.95 

0117R Night Flight $9.95 

0125R Investor's Paradise $9.95 

0127R Surveyors Apprentice $9.95 

0129R The Wordslinger $29.95 

0132R Energy Consumption $9.95 

0135R Executive Expense Report Generator $9.95 

0136R Beginner's Russian $9.95 

0137R Everyday Russian. „ $995 

0156R Money Madness $9.95 

0171R Flight Path $9.95 

0250R IRV $24.95 



TRS-80* DISKS 

0052RO Energy Audit $75.00 

0075RD Accounts Payable/Receivable $199.95 

0095RD Bowling League Secretary $49.95 

0123RD The One-D Mailing List $24.95 

0139RO Disk-Scope $19.95 

0147RD Check Management System $39.95 

0180RD Disk Editor $39.95 

0212RD The Russian Disk $24.95 



Instant Software 



PROGRAMS IN GERMAN: 

The programs listed here can be purchased through: 
MicroShop Bodensee 
Markstrasse 3. 
7778 Markdorf, West Germany 

6004R Beginner's Backgammon/Keno 

6O07R Ham Package I 

6O08R Electronics I 

6009R Golf /Cross-Out 

601 7R Air Flight Simulation 

6028R RamRom Patrol 

6031 R Space Trek III 

6034R Space Trek IV 

6043R Santa Paravia and Fiumaccio 

6065R Teacher 

6069R Household Accountant 

6072R Financial Assistant 

6076R Utility II 

6081 R Utility I 

TO ORDER: Look for these programs at the 
dealer nearest you (see list of dealers on page 
199). If your store doesn't stock Instant 
Software send your order with payment to: 
Instant Software 
Order Dept. 
Peterborough, N.H. 03458 
(Add $1.00 for handling) or call toll-free 
1-800-258-5473 (VISA, MC and AMEX ac- 
cepted). 

"A trademark ol Tandy Corporation 



PETERBOROUGH, N.H. 03458 
603-924-7296 



^2 



198 • 80 Microcomputing, September 1980 



Ask for Instant Software at a computer store near you. 



Alabama 

Anderson Computer* 
3156 University 0- Huntsville 
Compute-iancl ot Huntsville 
3020 Uni««t»n, 0> . Huntsville 

Ol»1J«y B'0» 

3763 Airport Blvd Mobile 

Arizona 

Professional Data Systems 
4506 A N i6tn St . Phoenu 
Millets TV & Radio 
621 East Broadway Mesa 

California 

AMCO Elect Supply 

635 E Arrow Mwy . Aiusa 

Byte Snop 

8036 CUirmoot Mesa Bi«0 

San Diego 

Byte SHOO 

123 E Vorbe Lino*. Pujeemuj 

Byte Snot Ol Mt View 

1415 West Ei Cammo Real. Ml View 

Byte Snop o! Sacramento 

6041 Greenback In Citrus Heights 

Capital Compute* Systems 

3396 El Camino Ave . Sacramento 

Computers Made Easy 

619 East Ave Q 9 Paimdaie 

Computer Store ot San leandro 

701 MacArthur Blvd San Leandro 

Computer World 

6791 Westminster Ave . Westminster 

Computeriand 

16720 S Hawthorne, lawndale 

Comcure- land o 1 W I A 

6840 La Oenega Blvd Ingiewood 

Coast Electronics 

31 18 No Mam St Morro Bay 

Computeriand 

24001 via Fabricante No 904. 

Mission Vieio 

Computer Mart o' California 

315 Diamond Bar Blvd.. Diamond Bar 

Hobbi Ironies 

1378 So Bascom Ave . San Jose 

HobBy World 

1951 1 Business Ctr Or . Unit 6 

Borthridoe 

Huntington Computing 

2020 Charles St . Corcoran 

ICE House Inc 

398 North E St San Bernardino 

Jade Computer Products 

4901 W Rosecrans. Hawthorne 

Malibu Microcomputing 

23910A Devilie Way. Malibu 

Marlam Co 

6351 Almaden Rd . San Jose 

Opamp/Tecnn>cai Books 

1033 N Sycamore Ave . Los Angeles 

PC Computers 

10166 San Pablo Ave . El Cernto 

Q I Computers Inc 

15818 Hawthorne Blvd lawndale 

Radio Snack Dealer 

8250 Mira Mesa Blvd . San Diego 

Radio Shack Dealer 

50 N Cabrillo Hwy . Hall Moon Bay 

Santa Rosa Computer Center 

604 7th St . Santa Rosa 

Silver Spur Elect Comm 

13552 Central Ave Chmo 

The Computer Store 

820 Broadway Santa Monica 

Colorado 

Colorado Computer Systems 

311 W 74th Ave Westminster 

Computeriand ol North Denver 

8749 Wedsworth Blvd Ar.ada 

Computer Shack 

1635 South Prairie Pueblo 

The Computer Store 

2300 Welton St Denver 

Connecticut 

American Business Computers 

454 Thames St Oroton 

Computertab 
i»Je"erson New London 

Computeriand 

1700 Post Rd f airfield 

Computeriand 

60 BJsM SI Hemoen 

Computer Works 

1439 Post Rd E Liberty Piua 

West port 

Instructional Systems Computers 

807 Harllord Rd Manchester 

o.c. 

The Program Store 

4200 Wisconsin Ave N W 
Washington DC 

Florida 

Ai Personal Computer 
178 Okldd Rd Fern Park 

^Reader Service— see page 226 



AMF Electromcs 

11146 N 30th St . Tampa 

Boyd E Den Corporation 

1328 West 15th St . Panama City 

Computer Center 

6578 Central Ave . St Petersburg 

Computer Junction 

5450 So State Rd 7 Ft Lauderdale 

Computeriand 

7374 S Tamiami Trait Sarasota 

Computeriand ol Ft Lauderdale 

3963 N Federal Hwy Ft Lauderdale 

Computeriand ot Jacksonville 

2777-6 University Blvd W 

Jacksonville 

Computeriand ol Tampa 

1S20 E Fowler Ave . Temp* 

Computeriand ol West Palm Beach 

4J7S Okeechobee Blvd West Palm 

Beach 

Computer Shack 

3336 Beach Blvd Jacksonville 

Computer System Resources Inc 

3222 S W 35th Blvd Gainesville 

Curtis Waters Enterprises 

236 Talbot Ave . Melbourne 

Heath Kit Electronic 

4705 W 16th Ave Center. Hialeah 

HIS Computermation 

1295 Cypress Ave Melbourne 

Ukatan Computer Store 

Airport Rd . Destm 

Williams Radio 8 TV Inc 

2062 Liberty St . Jacksonville 

rour Basic Computer Store 

971 Seaway Dr.. Ft Pierce 

Georgia 

Atlanta Computer Man 

Atlanta 

Computeriand of Atlanta 

2423 Cobb Parkway Smyrna 

Micro Computer Systems 

3104 E Shadowlawn N E . Atlanta 

Hawaii 

Computeriand ol Hawaii 
567 N Federal Hwy . Honolulu 
Radio Shack Assoc Store 
1 712 S King St . Honolulu 

Idaho 

Electronic Specialists 
8411 Fairview Ave . Boise 

Illinois 

Computeriand 

4507 North Sterling, Peoria 

Computeriand 

9511 N Milwaukee Ave . Niles 

Computer Station 

3659 Nameoki Rd . Granite City 

Garcia 6 Associates 

203 No Wabash Ave Suite 1510 Crvcago 

Midwest Micro Computers. Inc 

706 S Main St Lombard 

Indiana 

Computer Center ol South Bend 
51591 US 31 North. South Bend 
Data Domain 

221 W Dodds. Bloominglon 
Fall Creek Electronics Store 
732 Center St . Pendleton 

Iowa 

Memory Bank 

1721 Grant St Bettenbor* 

Kansas 

Central Kansas Computers 
6 S Broadway Hermgton 

Main* 

Mam Computronics 

intown Plaza Bangor 

Radio Shack 

315 Ma.n Ma" Rd So Portland 

Maryland 

jack Fives Electronics 

4606 Debilen Circle PikesviHe 

The Comm Center 

9624 Ft Meade Rd . a -■» 

Massachusetts 

ComputerCity 

175 Mam Si . Chertestown 

ComputerCity 

50 Worcester Rd Fremingnam 

Computeriand ol Boston 
214 Worcester Rd Weiiesiey 
Computer Packages Unlimited 
342 Boston Turnpike Shrewsbury 
Lighthouse Computer Soltware 

14 Fall River Ave . RehoDain 
Mark Gordon Computers 

15 Kenwood St Cambridge 

New England Electronics Co 

679 Highland Ave Needham 

Small Business System Group 

Mam St Dunstable 

The Computer Store 

120 Cambridge St Burlington 



TuHs Radio 6 Electronics 
206 Mystic Ave Medlord 

Michigan 

Computer Center 

26251 Ford Rd . Garden Cny 

Computer Connections 

36437 Grand River. Farmmgion Hills 

Computeriand ol Grand Rapids 

2927 28th St S E . Kentwood 

Computeriand ol Southlield 

29673 Northwestern Hwy . Southlield 

Computer Mart 

560 W 14 Mile Rd Clawson 

Computer Room 

455 E Michigan Ave Kalamazoo 

Compulronn Corp 

423 S Sagmaw Ro Midland 

Hobby House 

1035 W Territorial Rd Battle Cree* 

Mam Systems inc 

1161 No Ba »■ ■;*■ Hwy , Fhnt 

The Alternate Source 

1806 Ada Lansing 

Tne Eight Bit Corns* 

722 Evanston Ave Muskegon 

Ye Olde Teacher Shoppe 

1823 Witmyre St . Vpsilanti 

Minnasota 

Computeriand ol Hopkins 
1 1319 Hwy F Hopkins 

Digital Den 

Burmvnlle Center 

Minnesota Soltware Inc 

5422 Fisher Si White Bear Lake 

2«n Computers 

5717 xenes Ave . N Brooklm Center 

Mississippi 

Dyer s. Inc 

200 E Mam Si Wesl Point 

Soltwarehouse 

816 Foley St . Jackson 

W Vernon Foster Inc 

816 Foley St Jackson 
Missouri 

Century Ne>t Computers 

1001 E Walnut. Columbia 

Comp-U Trs Software Center 

51 Florissant Oaks Shopping Center 

Florissant 

Soltware Shack 

16501 Greenwald Court. Belton 

Montana 

Intermountaln Computer 
529 So 9th SI . Livingston 

Personal Computer 

121 Red Oak Dt . Carl Junction 

The Computer Store 

1216 16th SI W «35 Billings 

Nebraska 

Computeriand of Omaha 
1 1031 Elm St Omaha 
Midwest Computer Co Inc 
8625 1 St Omaha 
Midwest Computer Co Inc 
4442 S 84th St . Omaha 
Midwest Computer Co Inc 
4403 S 87th St Omaha 

ScottsDlulf Typewriters Inc 
1824 Broadway Scoltsbiull 

Nevada 

Century 23 

4566 Sprmg Mountain Rd Las Vegas 

New Hampshire 

B'tsnbytes Computer Center 

568 Pleasant St Concord 

CompuierCny 

1525 S Willow Manchester 

Paul s TV 
Mam St . Fremont 
Portsmouth Computer Center 
31 Raynes Ave Portsmouth 
Radio Shack Assoc Store 
Fairbanks Piaza Keene 

New Jarsay 

Computer Corner ol NJ 

439 Rte e23 Pompton Plains 

Computer Encounter 

2 Nassau St Princeton 

Computeriand 

3SPta*aRte " w Paramui 
Computer Mart o' NJ 
501 Rie 27 iselm 

Crowley s 

Rd « Whitehouse Station 

Dave s Electronics 

Pennsville Shopping Ctr PennsviHe 

GHB Enterpriseelnc 

Rte 38 Rudderaw Ave Mapieshade 

Lashen Electronics Inc 

2i Broadway Oenviile 

Personal Computing Inc 

51 Central So Lmwood 

Radio Snack/JU Electronic 

Rt 57 Alien Rd Hackettstowi 



The Bargain Brothers 
Glen Roc Shopping Center 
216 Scotch Road Trenton 
The Computer Emporium 
Bidg 103 Avenues ol Commerce 
2428 Rte 38 Cherry Hill 

New Mexico 

Autel Electronics Co 

232 Wisconsin N E Albuquerque 

South West Computer Center 

121 Wyall Drive. Suite 7. Las duces 

Thomas E Carr Jeweler 

1300A Tenth St Alamogordo 

New York 

AnstO Crall 

314 Fifth Ave . NVC 

Berliner Computer Center 

102 JeriChO Tumpk New Hyde Park 

Biis & Bytes 

2800 Straight Rd . Fredonm 

Computer Corner 

200 Hamilton Ave . White Piams 

Computer Era Corp 

1570 3rd Ave . New York 

Computet Factory 

485 Lenngton Ave . NYC 

Computer House. Inc 

721 Atlantic Ave . Rochester 

Computeriand ol Nassau 

79 Westbury Ave Cane Place 

Computeriand ol New York C'ty 

58 W 44tn St . New York 

Computer World 

519 Boston Post Rd Port Chester 

Comtek Electronics. Inc 

2666 Coney island Ave Brooklyn 

Comtek Electronics. Inc 

Staten island Man 

Store 220A. Staten island 

Digibyte Systems Corp 

31E 31sl St . New York 

80-Microcomputer Services 

IISMaslenAve Conoes 

Home Computer Center 

671 Monroe Ave . Rochester 

Mr Computer 

Imp Plaza. Rte 9 Wappmgers Falls 

Soltron Systems 

308 Columbia Turnpike. Rensselaer 

The Computer Tree Inc 
409 Hooper Rd Endweli 
Upstate Computer Shop 
629 French Rd . Campus Plaza 
New Hartford 

North Carolina 

Byte Shop of Raleigh 

1213 Hillsborough St . Raleigh 

Sound Mill 

Siocum Shopping Ctr . Haveiock 

Ohio 

Aitair Business Systems inc 
5252 North Dme Or Dayton 
Astro Video Electronics 
504 E Mam St . Lancaster 
Cincinnati Computer Store 
4816 Interstate Dr Cincinnati 
Computeriand 
4579 Great Northern Blvd 
N Olmstead 
Computeriand 

6429 Busch Blvd Columbus 
Computeriand 

1288 Som Rd . MaylieK) Heights 
Computer Store ol Toledo 
18 M.i.wvck Dr Toledo 
Forme s Microsystems Inc 
35 N Broad Fairbom 
Microcomputer Center 
7900 Paragon Ro Dayton 
M.cro Mm' Computer World 
74 Robmwood Columbus 
2ist Century Shop 
16 Convention Way. Cincinnati 
Universal Amateur Radio mc 
1280 Aide Or Columbus 

Oklahoma 

Sounds Etc 
Hyw 33 Watonga 
Vern Street Products 

Radio Shack Dealer 
new Tan St Saouipa 
Oregon 

Computeriand ol Portland 
12020 SW Mam St . Tigerd 
Computer Pathways Unlimited. Inc 
2151 Davcor St S.E . Salem 
TRS-80 Products Ltd 
3520 S E Vineyard Rd Portland 

Pennsylvania 
Artco Elect 

302 Wyoming Ave Kingston 

Artco Elect 

Back Mountain Shop Ctr 

Shavertown 



Audio Mart 

518 Filth Ave New Brighton 

Computer Workshoppe 

3848 William Penn Hwy Monroeviiie 

Computeriand o' Har-isburg 

4644 Carlisle Pike Mechanic sburg 

Computeriand ol Pittsburgh 

5499 William Frynn Hwy Gibsoma 

Erie Computer Co 

2127 West 8th St Ene 

Mighty Byte Computer Center 

537 Easton Rd . Horsham 

Personal Computer Corp 

24.28 West Lancaster Ave Paoii 

Personal Computer Corp 

F'Aser Man Lancaster Ave . Frazer 

Rhode Island 

ComputerCity 

165 Angeii St Providen c e 

Digital World Inc 

329 BaH) Hill Rd Warwick 

South Dakota 

C8 Radio Shack 

21 SI and Broadway Yankton 

Tennessee 

ACS 

1 100 8th Ave So . Nashville 

Computeriab 

671 S Menden Hall Rd Memphis 

H t H Electronics Inc 

500 N Jackson St Tullahoma 

Texas 

Computer Port 
2142 N Collins. Arlington 
Houston Computer Tech 
53i3Bisaonet Beltane 

Interactive Computer 

7620 Oashwood. Houston 

K A Elect 

9090 Slemmons Frwy . Dallas 

Pan American Elect Inc 

1117 Conway. Mission 

Radio Shack Dealer 

21989 Kaly Freeway. Kaly 

The Compute Shop 

6353 Camp Bow* Blvd . Ft Worth 

Waghaiter Books Inc 

3 Greenway Plaza E Houston 

Utah 

DC Computer Co 

1911 Wesl 70 South. Provo 

Quality Technology 

470 E 2nd So. Salt Lake City 

Virginia 

Computer Works 

Rte 6, Bo. 65A. Harrisonburg 

Home Computer Center 

2927 Virginia Beach Blvd 

Virginia Beach 

Southside Radio Comm 

135 Pickwick Ave Colonial Heights 

Washington 

American Mercantile Co Inc 

2418 let Ave S . Seattle 

Byte Shop ol Beilevue 

14701 N E 20th St Beilevue 

Compute! Connection inc 

3100 NW Bucklin Hill Rd.. Siiverdale 

Computeriand of South King Co 

1500 S 338 SI . Suite 12 

Federal Way 

Personal Computers 

S 104 Freva Spokane 

Ye Old Computer Shop 

1X1 G Washington Richland 

West Virginia 

The Computer Corner Inc 

22 Beechurst Ave Morgantown 
The Computer Store 

Municipal Parking B>dg Charleston 

Wisconsin 

Byte Snop Of Milwaukee 

6019 West Layton Ave . Greenlieid 

Computeriand 

690 S Wh.tney Way Madison 

Computerworld 

3015 W Wisconsin Ave Appieton 

Meg -c Lantern Computed 

3313 University Ave MadiSon 

Petted Microsystems 

4265 W Loomis Rd Milwaukee 

Wyoming 

Computer Concepts 

1 104 Logan Ave . Cheyenne 

Puerto Rico 

The Microcomputer Slore 
1568 Ave Jesus T Pinero 
Caparra Terrace 

Canada 

CANADIAN DISTRIBUTORS 
Micron Distributing 
409 Queen St W Toronto Ont 
M5V 2A5 



80 Microcomputing, September 1980 • 199 



YOU'VE LOVED OUR WAR GAMES AND OUR FANTASY GAMES, x , 

5 ..AND NOW YOU'LL GO CRAZY FOR OUR .:>•;, .^.. 

neuu 

COITIPUTER EflOlK 

AVALON HILL'S new Microcomputer Games Division lets 
you square off against the computer as your opponent in 
five new cassette games, each with a complete set of instruc- 
tions and software for use with TRS-80 Level II, 16K; Apple 
II APPLESOFT Basic, 16K; or PET, 16K. 

MIDWAY CAMPAIGN- You command the US Naval forces 
a* the computer commands the invading Japanese. 
NORTH ATLANTIC CONVOY RAIDER-Can you cripple 
the British Home Fleet and force a surrender, or will the com- 
puter sink the Bismarck? 

NUKEWAR-Strategic conflict from 'cold war' to 'hot '...and 
your foe is controlled by a cold and calculating computer. 
B-1 NUCLEAR BOMBER- Be the Captain of a B-1 bomber 
in this tactical-level operation, as the computer springs Soviet 
defenses on your mission. 

PLANET MINERS— Four giant corporations engage in inten- 
sive exploration and political maneuvering to exploit the re- 
sources of space. For one to four players, with the computer 
playing the pert of the other competitors. 
All these titles are available for only $15.00 each, plus $1.00 
for shipping and our complete listing of computer games. 

OVER 35 TITLES AVAILABLE 

ASK ABOUT OUR 180-DAY GUARANTEED-SALES POLICY 
DEALER & DISTRIBUTOR INFORMATION 
AVAILABLE ON REQUEST 
MAIL ORDERS WELCOME! 



►^355 




Distributors 



01956 Pass Road 

Gulfport, MS. 39531 

(601)896-8600 





BEST SELLING INFORMATION 

MANAGEMENT SYSTEM IN 

MOOS TODAY!! 



SELECTOR III-C2 

■Powerful 

■Creates and Maintains Multi- key data 

bases 
■Prints FORMATED, SORTED REPORTS with 

numerical summaries 
■Source code supplied 
■Prints MAILING LABELS - and more 1 
■Comes with APPLICATIONS PROGRAMS 

including 

■Sales Activity BExpense Register 

■Inventory ■Checks Register 

■Payables BCiient/Patient Record 

■Receivables ■Appointments 

■NAD BLibrary 

File management and report writing modules 
contain linkage to user subroutines to add 
virtually any special purpose application 

STATE OF THE ART in intormation manage- 
ment systems 1 

NEW — Ready-to-run" version lor the 
TRS-80" Model I, only from Business 
Microproducts Also available for Model II 

Requires CP/M operating system or 
derivative and CBASIC2 

Offered on 5 V*" or 8" all versions $295.* 
CBASIC2 with Selector Purchase $75.* 



TRSDOS-»CP/M 

F I LI /THAN 



BRIDGES THE GAP' 



■Machine ungjjge COM FILE 
direcliy compjdB.e *iin you' 
CP/M syslem 

■Automated terminal Con 
kgufitOf 

IMemo'y OiSOiiyefl n OOtn HEX 

ano ASCII 
■Any ais« Secioi Seiecieo tm 

displayed m Bom HEX anc 

ASCII 
■ T'ansie's ooln daia and pro 

gram tiles Dy Me name Dyle Dy 

MM 



■Newiy nealed lues scanned 
loi potential e"ais oelween 
•eve II BASIC • MBASIC 5 
11 iter 

IC»/M lues scanned to' any 
selected su-ng 

ISea-cnes any program try a>i 
rxcu'ences o' any stung 

lOeneiaies a wa'iaoie cross 
reference m»aiuaoie teature 
'o» any system level conver 
sion and deOuggmg 

■Displays ootn CP/M I 
TP.S00S di'ectories 



From CP/M: TRSDOS now available for TRS-80 Model I 
Both directions $149.00 



FILETRAN Disk jnrj Manual 

Manual alone imanual price credited lo syslemi 



$99 
SZO 



BUSINESS - M2 

UWUq@»RODUCTS 

a division of the ready corporation 

livermore financial center 

1838 Catahna Court • Livermore CA 94b50 

(415) 449 4412 

VISA M/C 



QUALITY TRS-80 SOFTWARE 



KEYWORD Indexing System 

A «rlt« hi' program* mal will trtak I d«u ilk mi dt*. Mid an 

Imki oi all ikcarrvniu i4 "keyword*" In Ike k»l oi Ike daU ilk 

and alkm Imialrk* or wareke* inm the ill.- using Ike Inde.ed 

keyword*. Hn aHMal feature ». 

•fkxlbk reiord kngth> »ltfc location polnkr* 

•dekllon of mm keyword* from Index by *y*km 

•"and" "m" "not" ktgk fur Intinlrk* 

•Inkrfaee for nir wrltkn ln«|vlrie« 

Kl.^»()KUi>Db\-:dlK UkDOSvokm $19.95 

SORTS for HOME and BUSINESS 

*-o wiiinpiitvr iiMir should he without a »er*allk xts\ lo uk Mirt 
program Tke Nortfcea*! Mkroware In mimnn *ort program* are 
-nil. ii In Level II BASIC and ka«e me following kalare*. 
•Sort ALPHA or H NEK data 

•Sirfl mi up hi 5 field* .imuluim.usk 

•In amending or defending wiiKnee 

•Support* kb. -life,, or lap. I (I 

•Sapporo at* dl.k and primer I O tMHtl 110 1 

•Support* uvr I tl routine* 

•Uf ttll. (SOOT III) nil l< > 

MIKT II Ibk U>cl II In m>rmin tori $ 1 9.95 

SOOT III) )2k DOS m memory *orl $29.95 

rot ihe SUKNIS GAMBLE! 
BLACKJACK SIMLLATOK. Ml,,-, >.,„ u, *imalak Ike playing nj 
momand* oi kand* oi HI and analyre Ike re*ult* on tape In Le»el 
MBASIC. $19.95 

Manual, (or all programs atallahk for $ J.(K) ea. 

(prkc ikdiKllhk on pureka*e oi program) 

"TRS-80 it a registered trademark ot TANDY CORP " 

t < T^rthea8t c 7VIICROWARll 
BOX 2133, ^74 
BOSTON, MA. 02106 




$?/ NEVADA 
COBOL 



- A POWERFUL subset ot ANSI 74 

- A PRICE that's UNBEATABLE- $99 

• EXTENDEO arithmetic & I/O teatures 
' FAST compilation and execution 

' EASY to use - Generates small executable 
oDject modules 

• UNIQUE Easily understood error 
messages 

•CP/M compatible 

' Also available ON TRS-80 

• REQUIRES only 16K-RAM 

- Designed tor PORTABILITY 

STANDARD FEATURES 

I Random access tile structure 

I Sequential tiles - Fixed and variable length 

I Debugging capability 

I Copy statement 

I Data types & character string. 16 Bit Binary 

and packed decimal (Comp-3) 
I 1 8- Digit accuracy 
I Hexidecimai non-numeric literals 
I Powertul editing 
I interactive accept/display 



Ottered on both 5% 
versions 



and 8" 



diskette, ail 
S99* 



'CA residents add 6% sales lax 
continental shipping S3 00 Allow 2 weeks 
delivery 

TRS-80 is a trademark ot the Tandy Corp 
CP/M is a trademark ot Digital Research 



200 • 80 Microcomputing, September 1980 



MARK GORDON COMPUTERS 

A DIVISION OF MARK GORDON ASSOCIATES, INC. 
15 Kenwood Street, Cambridge, Massachusetts 02139, (617) 491-7505 ^210 



SORT-80 

Produced exclusively for 

Mark Gordon Computers by SBSG 

TRS-80* disk files may be sorted and merged using 
SORT-80. the general purpose, machine language, 
sort program. Written in assembly language for 
the Z-80 microprocessor, it can: 

— Sort files one disk in length 

— Sort Direct Access. Sequential Access and 
Basic Sequential Access files 

— Reblock and print records 

— Recontrol files from disk 

— Be executed from DOS 

— Be executed from BASIC 

— Be inserted in the job stream 

— Allow parameter specification 

• input/output file specification 

• input/ output record size 

• lower upper record limit 

• print contents of output file 

• input/output file key specifiers 

The minimum requirement is a 32K TRS-80* Level II 
computer with one disk drive or a single drive 
Model II computer. It will operate on 35.40 and 77 
track drives, and has been tested on TRSDOS 2.1. 
2.2. 2.3. NEWDOS 2.1. 3.0. and VTOS 3.0.1. It is 
compatible with most machine language printer 
drivers. Sort time is fast: for example, a 32K file will 
sort in approximately 40 seconds. $59. 

PCS 

Program Catalog System from SBSG 

This menu driven system provides the TRS-80* user 
with a computerized method to keep track of all 
programs and data files. The idea is to build 
and maintain on a file a disk detailing each 
program including program name. size, creation 
date, and a brief narrative as to function. Programs 
are provided to: 

— create, update, or display 

— print in disk number order 

— print in alphabetical order 

— print file listing 

— create a file automatically 

With a 3 2K system you can catalog 150 programs: 
with a 48K system you can catalog 300 programs; or 
you can catalog 650 programs without sort. S29 

'TRS-80 is a registered trademark ol Radio Shack a division ol Tandy Corp 



InfoBox 

The information manager 

InfoBox is the easiest-to-use information manager 
available for the TRS-80*. Its ideal for keeping track 
of notes to yourself, phone numbers, birthdays, 
inventories, bibliographies, computer programs, 
music tapes, and much more. This fast assembly 
language program lets you enter free-format data, 
variable length items and lets you look up items by 
specifiying a string of characters or words that you 
want to find. You can also edit and delete items. 
Items entered into InfoBox can be written to and 
read from cassette and disk files. All or selected 
items can be printed on a parallel or serial printer. 
InfoBox occupies 3K. Specify cassette or disk 
version. Special introductory price $24.95 until 
|une 15: $29.95 after. 

DBUG+ 

The ultimate monitor/disassembler 

Compare the features and price of DBUG*- with 
other monitor/disassembler programs. It offers nine 
true, single-byte breakpoints, single step program 
execution, hex and decimal arithmetic including 
multiply and divide and conversions. ASCII dump 
that distinguishes all 256 codes, disassembly to 
screen and printer in full Zilog mnemonics, 
and register set command. It also has 
the usual port I/O. hex and decimal memory dump, 
change, move, copy and exchange memory features 
offered by others. Ideal for the user who wants to 
experiement with assembly language or to write 
subroutines to call from BASIC: essential for the 
serious programmer. Special introductory price 
$24.95 to |une 15: $29.95 after. 

FMS 

File Management System by SBSG 

This menu driven program allows you to define and 
create files for your own use. You can: 

— sort these files in: 

• ascending order 

• descending order 

• on up to 3 seperate fields 

— scan the files 

— summarize any numeric or dollar data fields 

— print the field records 

— create, add to or delete field records 
$49.00 



Model II versions of 5B5G software available. Dealer inquiries invited. 



^Reader Same*— see page 226 



80 Microcomputing, September 1980 • 201 



UTILITY 



A video driver mod for those 

whose hands are no quicker than their eyes. 

Slow Scroll 



Peter A. Lewis 

5850 Belt Line Road *1811 

Dallas, TX 75240 



LJ aving converted from Level 
' ' I to Level II, I am extremely 
pleased with all the new fea- 
tures of the more advanced lan- 
guage. One wrinkle that I don't 
appreciate, however, is the way 
the program flies by on the 



screen when you list it. In this 
regard, Level I has a superior 
system by stopping the list 
when the screen is almost full 
and allowing you to hit the up ar- 
row key to move the display up 
the screen. 

I know you can press Shift @ 
to freeze the display, but I am in- 
variably fumble-fingered and 
find that the part of the program 
that I wanted to see has some- 
how whisked by before I could 
stop it. 

Another thing that bothers me 







Program Listing 


1. Source Code 






■•in 

11121 


1 SCREEN CONTROL - 11/15/79 - PETER A. LEWIS 






■ •141 


( SET UP DCB DRIVER ADDRESS 






11161 


1 






7PA7 




II1BI 




ORG 


32679 


7PA7 


COIBII 


11211 


INIT 


CALL 


I11BH iPOT LOCH IN BL 


7FAA 


111AII 


■■221 




LD 


DE,SCREEN-I 


7 FAD 


If 


••241 




ADD 


BL.DE 


7FAE 


221E41 


11261 




LD 


(411EH),HL (ENTRY ADDR TO DCB 


7FB1 


C3CCM 


■•281 
■•311 


I 


JP 


MCCH , RETURN TO READY 






••321 


; CHECK FOR FLAG CHARACTER (11H • OFF. I1H - ON) 






•1341 


1 






7FB4 


PS 


• 1361 


SCREEN 


POSH 


AF j SAVE FLAGS 


7 PBS 


CD1B11 


■ 1381 




CALL 


II1BB (PUT LOCH IN HL 


7PBB 


1801 


(•411 




JR 


BYPFLG (BYPASS FLAG 


7FBA 


■ ■ 


• 142( 




DEFB 


• (ON/OFF FLAG 


7FBB 


23 


11441 


BYPFLG 


INC 


HL (HL POINTS TO FLAG 


7FBC 


23 


■ 1461 




INC 


HL 


7FBD 


79 


• 1481 




LD 


A,C (CHARACTER TO A 


7PBE 


E<FE 


•IStl 




AND 


■ FED (LOW BIT OFF 


7FCI 


2113 


■1S2I 
11541 


1 


JR 


NI.NOFLAC (NOT A FLAG 






11561 


1 SAVE 


MEN FLAG 








11581 


1 






7PC2 


71 


■Mil 




LD 


(HL),C (STORE NEW FLAG 


7PC3 


182D 


11621 
11641 


; 


JR 


BYPDRV (BYPASS DRIVER 






■•661 


J TEST 


FLAG 








■ 1681 


1 






7PC5 


7E 


■ 1711 


NOFLAG 


LD 


A, (HL) (FLAG TO A 


7PC6 


B7 


• 17 21 




OH 


A (TEST FOR XERO 


7PC7 


282B 


11741 
11761 


; 


JR 


I.RSTRA llERO - BYPASS ROUTINE 
Program continues. 



about automatic scrolling is 
that whenever I write a program 
that displays more than one 
screen full of data, I need a 
"Press Enter to Continue" rou- 
tine to stop the display. 

There are three things I don't 
like about that procedure. First, 
you have to keep track of the 
lines that your program is dis- 
playing so you know where to in- 
sert the pauses. Second, you 
cannot use the bottom line of 
the screen because It is needed 
for the "PRESS ENTER..." 
message. Third, if the user has 
the option to output to the 
printer, your program has to by- 
pass the pause messages in 
that case. 

A small modification to the 
Level II video driver solves all of 
the above. With this modifica- 
tion installed, any line that ends 
with a new line character (ASCII 
13), normally causing the screen 
to scroll, now has the following 
effect: 

• The display freezes after 
that line is printed. 

• Pressing the up arrow 
allows normal printing to con- 
tinue until the next new line 
character (just like Level I LIST). 

• Pressing CLEAR clears the 
screen and a new screen of data 
is displayed. 

• Pressing Break stops the 
program or the list and the ready 



message is displayed. 

• Any other key is ignored. 

The modification is not active 
when the cursor is turned on. 
This allows the screen to scroll 
normally when you are inputting 
a long program. You can also 
use this feature to temporarily 
turn off the modification within 
a program. By executing a 
PRINT CHR$(14) the cursor is 
turned on and normal scrolling 
is in effect until you turn it off 
with a PRINT CHR$(15). 

The cursor will also be turned 
off after an INPUT statement or 
if the program is restarted from 
Ready. 

Three Methods 

You can load the modification 
in three ways. With any method, 
the program is completely relo- 
catable. My version ends at the 
top of a 16K