^fj'
March 1980 $2.00 U.S., S2.50 Canada
microcomputing
THE magazine for TRS- 80* users
Printers Apprentice: Instant and accurate quotes. Pg. 22.
Biorhythms:
Your physical,
mental and
emotional state
displayed. Pg. 117.
Investment
Analysis:
Calculate your
potential Return
on Investment, in
minutes. Pg. 28.
Artificial
Intelligence:
A self modifying
game program,
that becomes
unbeatable!
Pg. 55.
KWIC Index:
Find information
fast, with a
technique
developed by IBM.
Pg. 60.
7^47a"65947'
03
Plus;
14 Programs with complete listings.
Source Code for 4 Assembly Language programs.
More than 30 articles and columns.
'a trademark of Tar\dy Corporation
Fpom PEFQOM
Low Cost Add-On Storage for Your TRS-80*.
In the Size You Want.
When you're ready for add-on disk storage, we're ready for you.
Ready with six mini-disk storage systems — 1 02K bytes to 591 K bytes of
additional on-line storage for your TRS-80\
• Choose elttier 40-track TFD-100'^' drives
or n-track TFD-200'" drives.
• One-, two- and three-drive svstems im-
mediately available.
• Systems include Percom PATCH PAK
*r^ on disk, at no extra charge. PATCH
PAK #1'*de-glltches and upgrades
TRSnOS' tor 40- and 77-track operation.
• TFD-1D0" drives accommodate "flippy
disks. ' Store 205K bytes per mini-disk.
• Low prices. A single-drive TFD-100'''
costs just $399. Price Includes PATCH
PAK #r" disk.
• Enclosures are Ilnished In system-
compatit}le "Tandy-sltver" enamel.
Whether you need a single. 40-
Irack TFD-1 00 '^ add-on or a three-drive
add-on with 77-track TFD-200'"s. you
get more data storage lor less money
from Percom.
Our TFD- 1 00"^ dnve. for example,
lets you store 102.4K byles of data on
one Side of a disk — compared !o 80K
byles on a TRS-80* mmi-disk drive —
and 102 4K byles on the other side, too
Something you cant do vwilh a TRS-80*
drive That's almost 205K bytes per
mini-disK.
And the TFD-200"^ drives provide
197K bytes of on-line storage per drive
— 1 97K, 394K arxJ 591 K bytes for one-.
two and three-drive systems
PATCH PAK #r^. our upgrade
program for your TRSDOS*. not only
extends TRSDOS' to accommodate 40-
and 77-tfack drives, it enhances
TRSDOS' in other ways as well. PATCH
PAK #T" IS supplied with each dnve
system at no addiiional charge
The reason you get more for less
from Percom is simple. Peripherals are
not a sideline at Percom. Selling disk
systems and other peripherals is our
main business — the reason you get
more engineering, more reliability and
more back up support (or less money
In the Product Development Queue ... a printer Interface (or using your TRS-8D' witti any
serial printer, and . , . the f/ec/nc Crayon '"to map your computer memory onto your color TV
screen — lor games, animated shows, business displays, graphs, etc. Coming POQ!
•TBS-8D and iflSDOS i«» ''alW^l"^ ■
PERCOM DATA COf^PANY. INC,
211 N. KIRBY • GARLAND. TX, • 75042
To order add-on mini-disk storage for your TRS-80*.
or request additional literature, call Pefcom's toll-tree
number: 1-800-527-1592. For detailed Technical infor-
mation call (214)272-3421.
Orders may be paid by check or money order, or
charged to Visa or Master Charge credit accounts. Texas
residents must add 5% sales tax.
Percom 'peripherals for personal computing'
RS-80 TRS-80 TRS-80 TRS-80
RS-80 TRS-80 TRS-80 TRS-80
RS-80 TRS-80 TRS-80 TRS-80
RS-80 TRS-80 TRS-80 TRS-80
The
feDuQpDQte
ScoMlfpCilDDy
HARDWARE
WORD PROCESSING
UTIUTY& LANGUAGE
Centronics
Magic Wand by Small Business
Small Systems
TI810
Applications
TRS 232
NEC 5530
Electric Pencil by Michael
RSM Monitor
Pertec
Shrayer
TRS Formatter
Shugart
Special Delivery by Software Etc.
Racet
MPI
Merge Name & Address by SBSG
FMG
CDC
Lifeboat
Complete TRS-80 Mod 1 and
FROM THE LIBRARY
Microsoft
Mod 1 1 Hardware
Learning Level U by David Lien
Apparat
Percom
Basic Handbook
TRS Disk! and other Mysteries by
BUSINESS
ENTERTAINMENT
H. C. Pennington
Small Business Systems Group
Microsoft Adventure
TRS 80 Software Source
Structured Systems Group
Automated Simulations
Software Technical Manual by
Lifeboat
Scott Adams
Houston Micro Computer Tech.
The Bottom Shelf
80-US
Kilobaud
TRS-80 IS □ 'rademork of the Tandy Corporanon,
80 Kilobaud
To order by phone or for local dealer information call: 713/661-2005
Texas residents add 6% sales tax • MasterCharge • Visa
HOUSTON MICROCOMPUTER TECHNOLOGIES, INC.
Home and Business Computer Specialists
5313 BISSONNET • BELLAIRE • TEXAS • 77401 • 713/661-2005
^13
ALMOST
PERFEC.
The
MAGTC WAND
is the most powerful,
most flexible, most reliable, most usable word processing
software available for a CP/M-based computer.
That's not bragging That's just telling it
like it IS
The MAGIC WAND is the best word
processing software ever written for a
microcompuler It can do more work in
less time with higher quality than any
other product you can buy
The MAGIC WAND is a rock solid piece
of software. The command structure is
simple and logical and complete. We have
not tossed in features without thought to
the overall design of the package. Nor
have we included any feature that is not
thoroughly implemented. The programs
are crash-proof and completely reliable.
And the system is supported by what we
are told IS the best user's manual ever pro-
duced (or microcomputer software, It
contains a step-by-step instructional pro-
gram designed for the novice. The trainee
uses sample files from the system disk and
compares his work to simulated screens
and printouts in the manual
Support doesn t stop when you buy the
package. As a registered user, you receive
our bi-monthly newsletter which answers
questions, reports upgrades and teaches
new applications of the MAGtC WAND
It's through a lot of hard work that we
are able to offer you a product that is
■'almost perfect, " but we aren't about to
stop working until we can say that the
MAGIC WAND is perfect.
Full screen text editing
The MAGIC WAND has probably the most
responsive and easy-to-use editor avail-
able for either a serial or DMA terminal It
uses only single stroke control keys to
give command and takes advantage of the
special function keys on your terminal
whenever possible, in addition, you can
set up library files wit h coded sections that
you can merge by section name
Full text forrtiatting Commands
The MAGIC WAND allows you tc set the
left, fight, top and bottom margins, page
length, indentation, paragraph indenta-
tion, (incuding "hanging" paragraphs),
text left flush, right flush, justified (two
ways), literal or centered, vanableline and
pitch settings, variable spacing (including
half lines), bold face, underlining (solid or
broken), conditional hyphenation, sub-
and superscripting You may change any
of these commands at run-time without
reformatting the file.
Merging with external data files
You may access any external data file,
with either fixed length or sequential
records. The MAGIC WAND converts the
record into variables that you define and
can use like any other variable. Of course,
you may use the data for automatic form
letter generation But you can also use it
(or report generation
To order by phone cr :or ioca» aealer intormation ca.;: 713/661-2005
Tt-fxti.s iQsidftnts arid B% .Sv-ilea tax • MasterCharqe ■ ViliU
Variables
You may define up to 12B variables with
names of up to seven characters. The cur-
rent value of a variable may be up to 55
characters, and you may print it at any
point in the text without affecting the cur-
rent format Although the MAGIC WAND
stores the variables as strings, you may
also treat them as integer numbers or for-
mat them with commas and a decimal
point You may increment or decrement
numeric variables or use them in format-
ting commands.
Conditional commands
You may give any print command based
on a run-time test of a pre-defined condi-
tion The conditional test uses a straight-
forward IF statement, which allows you to
test any logical condition of a variable.
You may skip over unneeded portions of
the file, select specific records to print,
store more than one document in a single
file. etc.
True proportional printing
The MAGIC WAND supports proportional
print elements on NEC, Diablo and Qume
printers. Other formatting commands,
including justified columns, boldface,
underline, etc.. are fully functional while
using proportional logic.
HOUSTON MICROCOMPUTER TECHNOLOGIES, INC
Ho:::e and Business Computer Spec}al]sis
'j^n BissoNNET • nn.i.AT^r • T^x^?^ • 77401 • 7]rm\ 2005 -^^^
s«vaX\ busvuess a:|^ca\M)as, vuc.
3220 Louisiana • Suite 205 • Houston, Texas 77006 • 713-528-5158
CP/MisaregisiefMiraOemarko' Digital Research Cotd
4 • SO Microcomputing. March 1980
microcomputirigl OATA
March 1980 Issue #3
APPLICATION
60 KWIC Index. Find It fast! Leslie Sparks.
117 Biorhythms. On a peak? Ralph Holthausen.
127 Duty Roster. Put people in place, Dick Straw.
138 Soundex Codes. Name sound tamiltar? Robert Hodge.
BUSINESS
22 Printers Apprentice. Make a good impresston. Rich Barnes.
28 Investment Analysis. Informalion in minutes. Leslie Sparks.
GAME
55 4K InlQlllgsnce. Self modifying program. William Lopez.
GENERAL
79 Part-time Consultant. Money on the side. Michael Morin.
HARDWARE
72 lowercase & UPPERCASE. The best ot both worlds. Don Sfoner & Dick Barker
88 Babybug Keypad. Easy entry for Hex. Denriis Kitsz.
96 Home Brew Interlace. Customized control, C.R. Vince.
113 Regulate It! Smooth your ripple. William Klungle.
120 I/O Ports plus. Low cost mterface. Sr^an Harfon,
132 Box It In. A cabinet Idea. John Zainerunas.
HOME
42 IRS-80. Record your deductions. William McNeill.
130 Graph Plotter. Display your bills. Scoff King.
MATH
84 Equations. Get to the root of them. Allen Joffe.
REVIEWS
58 Useful Utilities. Renumber. Remodel & Proload. Charles Leedham.
77 Quick Printer. A $100 label? Henry Riekers.
134 One Into Two. Old programs m new BASIC. Sherman Waniz.
136 RS232. The Radio Shack interface. Roger Hicks.
STYLE
94 Inside the ROMs. Some useful routines. Sruce Stock.
UTILITY
46 SPOOL & DeSPOOL. Split personality when printing. H.S Gentry.
80 Test Your Memory. See if your chips are absent-minded. Milan Chepko.
105 LPRINT Routines. Hardcopy Video, Craig Werner.
115 Whazit? Read your tapes. J B. Penny.
122 Screen Editor. Non-destructive cursor. William Colsher.
125 Extra Errors. On Error read this. Charles Moses.
REGULARS
6 80 Remarks. Wayne Green.
8 80 Applications. Dennis Kitsz.
10 Club 80. floss Wirth.
12 Input. Why not you?
14 80 Accountant. Michael Tannenbeum.
CttMf photography by »•••• Fowt»r,
15 Captain 80. Bob Liddii.
16 Unlimited 80's. Sherry Smythe.
18 NEWS. Michael Comendui.
146 Preview. Next month in 80.
146 Advertisers Index.
E(HiO''PuMlah«r
Wayne Groen
EiKutlv* V)c« ProtMonl
Sh«"y Smyihe
Corpora U Corttmllar
Alsn Thulann«T
AMJstant EditorrPuMlihof
je't DeTray
ManaBlr«f) EdHor
Jim Parry
Production EdHor
MFChaet Cemendui
Edttorlal Aialalartta
Emily GibbB
Suian Murray
Triomas Peabody
Ravlow Edilor
CfiMs Browf
AdmlnlitratlvaAaalalant
LaaiccoONeii
Product ton Managar
Noai Salt
AaalaianI Productton Managar
Robin Sloan
Production
Stave Baldwin
James Buliar
Bob Draw
Bruca Hadin
Ken Jackson
Clare McCarthy
Mlciaei Mutpny
Dton Owana
Nancy Saltnon
Patrice Scribner
Sue Sytnorxls
John White
Typ*aeltlr>g
Ba'bara Laitt
Sara Bodall
Mary KInial
PtwiBgraphy
Bill Hsydolph
Tedd Ciutt
TBr"e Anderson
Reesa f ow.er
Accounting Manager
Knud Ke'iif
circulation Manager
Debra Boud'ieau
Bulk Salat Managar
Girny Boudtieau
Circulation
Pauima Jonnatone
Ba-bafS BiocK
European Marketing
Rei'ha'd NeOeia
Auilrailan Olalrlbulor
Ka'herine Thirkeli
Advertising Manager
Aline Coulu
Adieit-jing
Kevin Ruahalko
Penny Brook a
Nancy CUmpa
Marcia Stona
Jerry Meffiftald
Louise Moldawo'th
Harold Slepheni
Phoet>e Taylor
Rita nward
Manuscripts are welcome at SO Klic'ocompuling, we will consider publication o' any Tns-SOonenied material Guidelines 'or budding authors are available, please seod
aseil-add'essMenvelopeandasK tor 'HowloWnlstoraOMicoco'n/iuffnp. All n>ate'isl to be published will De paid lor upon acceptance by the Edilor. Address all sub
missions tor the attention of the Managing Editor. Enure contents copyright 1960 by 1001001 Inc No part of tbis publication may be reprinted, or reproduced by any
means, wllhoul prior written permlssior> irom the publisher All programs are publislned lor personal use only, and may not be reproduced for others. Alt righls reserved
SOWcrDcompuryn{;(ISSN iapplled (or) 13 puDllshedmonlhly by 1001001 Inc . Pine Street. Peterborough. NH 03456 Application lo mall second class postage rale is pend-
ing at Peterborough, NH 0M56 and at additional rnailing offices Phone 603-92 4 -387314 Subscription rales In the US are S15 tor orve year and 140 lor three years, in
Canada $17 lor one year and $46 for ihree years. In Europe please contact Monika Nedela. Markstr 3. D 777B, Markdotl. W Germany in South Africa contact BO
Microcomputing, P.O. Box 7B2815. Sandton. S. Africa 2146 Australian dlsinbunon by Katharine Thirkeli. Sonolron Instruments, 17 Arawalta Street, Carnegie. Victoria
3163, Australia. All ottier foreign subscriptions $20 lone year only) surface mail. All U S subscription correspondence should be addressed to 90 Kllcrocompuiing,
Subscription Departmenl, P.O. Box 961, Farmingdaie, NY 11737. Please Include your address label with any correspondence Postmaster; Send form 13679 lo 90
Microcomputing, Subscription Services, P O Bon 981 Farmmgdaie. NV 1 1737
TTWao be a meeaaMt 9l ttm luttt CafpwWIen.
80 Microcomputing, March 1980 • 6
META TECHNOLOGIES
F«Now TRS-80 Ustr:
I'd like to thank you for your interest in our products and tell you something about our
company. Active in more than a dozen areas of the computer business, MTC's consulting
and custom programming operations extend mto five states. Although our work includes
the more "traditional" minicomputers, the TRS-80 is no stranger. Members of our staff
have worked on the TRS-80 since 1977 After five months of planning and preparation,
MTC attacked the national market in the premier issue of 80 MICROCOMPUTING
(January, 1980).
Our marketing approach is simple. First, sell only top quality products. Some people
question the quality of our Verbatim diskettes. We attract a lot of attention (and buyers)
with our low prices, but we don't make our living selling diskettes. If you buy from us
once, and have a chance to judge the quality and value of our products, we think you'll
order again, and again. For example, MTC sells Apparat's popular NEWDOS't complete
with all utilities, at the same price as our competitors But we include, at no additional
cost. $39.90 worth of PROGRAMMING TOOLS! The cost to supply the tools is
nominal.. .the value to you is significant. We make less profit on each sale, but we make
more sales and more friends. Everyone makes out., except our competition.
Second, sell at below market price. When we offer a product at a lower price that meets
or treats a competitor's product, we setl more than the competition. As our volumes go up,
our cost goes down. Everyone makes out except our competition.
Third, only offer useful products of lasting value Every time you use one of our pro-
ducts, we want you to remember us fondly. Not being a fast-buck, basement operation,
we want to have you as a customer tor a long time. To ensure this, we intend to offer pro-
ducts that provide continual benefit .like diskettes, NEWDOS* AIDSII, etc. Everyone
makes out. .except (you guessed it!).
Fourth, make it as painless to order as possible. I don't know about you, but I hate
ordering things through the mail Give me a good, old TOLL FREE number
anytime.. .which is exactly what we did. And three out of four of our customers use bank
cards to charge their purchases. There is a single rate for shipping and handling (we nor
mally ship UPS), whether your order is for one or a hundred-and-one items.
Simple, convenient, no tricks, no hidden costs.
Finally, render fast and efficient service. Orders are tracked by computer, using our own
AIDS-II system, and are usually filled within one business day We pride ourselves on our
rate of delivery
In the coming months, we intend to use some of our ad space to feature letters from
other members of our management staff (e.g Customer Service, Product Engineering,
etc.). We feel the t>etter you get to know us. the more comfortable you'll feel dealing with
MTC, ..and the less you'll deal with you-know-who.
MTC AIDS II represents the essence of MTC's product development philosophy. Below
are "testimonials" from four owners of the package These are absolutely authentic
statements and are typical of the comments we receive.
"The AIDS-II package is the most powerful data manager we've ever seen. The most
complete and easiest to use!" r\.i^i_.. B-..^...-r *. ^«
'^ DavKJ Johnson, President. John-Tronics Security Co.
(Uses AIDS-II for client and prospect mailing lists. A/R, gun registration and alarm
systems logs)
"It w(H do everything it's advertised to do plus whatever else your
imagination aMows. It is tfie best software value on the marltet today. AIDS-II is the most
significant software development I've seen, and wiH have as large an impact on the
marketplace as the Radk) Shack TRS-80 did on the mcrocomputing market."
Vern Hall, V. Hall Insurance Agency (Nationwkle Insurance)
(Uses AIDS-II for client and prospect mailing lists & follow-up systems, A/P, A/R))
"...the best system for the non-programmer I've ever used. It has an unlimited number
of uses. I might have to buy another system just to have It on-line at all times... "
Robert I. Gross. CPA
(Uses AIDS-II for mailing labels, client reference system, for providing an audit trail to
disburse funds to general ledger)
"...the most flexible and powerful system I've seen, especially with modules such as
MAPS. The weakest part <rf the AIDS system is the Radu Shack Computer! "
L.G. Payne, Media Specialist, Strongsville High School
(Uses AIDS-II for mailing lists, tracking of audio-visual materials, experimenting with
student attendance records)
We at MTC look forward to providing you with the quality products and service you
deserve and should expect. If we offered you anything less, we wouldn't be Meta
Technologies Corporation. ..we'd be you-know-who.
Sincerely.
-^^e^t^tt^(^rj&
MTC AIDS-II
AMng miomution? QoctcirltupwithA^II. TMb
Autonutsd kitonnition HsLtury Syitwii ii user-
defioMl, featum uur-ueclifea fieMs and
print/dtaplw tor mats, conditianri record Mtoctkin,
upcMkig of fleUi within records, sortkig by iny
combiiwuuii ol fleldt, and much mora! UniQui
MnnOoMnnc capabUny allows directories of
unlmitod £b. Window sia is typkaHy 200 or mora
records in 32K. Can be uMd tor maltrv Ws, dtont
reference lepw l hu. appu hi ti imi t "C J Wn aa r i ", in-
ventory records vid other intormabon systims.
Ejqr to uH. DefHnf i lyitam takes kxmt ■
mmute. Formattinc a report or defMnga custom
libel, less than 30 nconds. Sorting ZX) rocardi
takw les s than 5 sec onds. Add "subqrstems" tor
additiufiil cipibflitMs.
MTC AIDS-II $49.95
For Modern $79.95
CALCULATION SUBSYSTEM (CALCS)
Use tor report lenarMton nvoMng banc nunipulB-
tion of numeric data, such as quvitity ft cost com-
putations, tiilvtces carriod tonHn) and columnar
totals Expands capibHies with respect to vrven-
lory, accounbng and other numenc-tMsed ntorma-
lion systems-
MTC CALCS $24.95
For Model II $39.95
MAILING/INFORMATION LIST
SUBSYSTEM (MAILS)
Use for report & Wid gener a tkMi Invohring format-
tini of primarily non-numeric data, such as
cudom, 'N-up" and "N-copy" litiel forms, index-
type report formatting, and iub-fieldfn|
capabiibes tor tetoctton t pri nt. Eipwids AIDS- II
with respect to client/product reference ly items.
maing tots and other non-numeric Mormabon
systems.
MTC MAILS $24.95
For Model II $39.95
RECORD/FILE ORGANIZATION
EXECUTIVE (REFORGE)
Use tor expmdaig, contracting or refornwtbng
AlOS-ll ties. Convert rmlom « sequantW Has to
AIDS-II tamwt Use lor canvartkvmaMni Ws to
AIDS^Undudts MERGE * PURG E capaHbMtor
combning (nuNer fltos nto lv(er ones and remov
wm cliyltale records.
MTC REFORGE $24.95
'Model II $39.95
MTC TECH B.S.
<
Our excktthe Technical Buletin Service reveata
the Inakle story on the TRS40* I A II. Sent by first
dan mal. butettrnare i wueda s the newsbrsaks,
not )ust once a month. Expensive, but worth It! No
idvertiikii or ftynr M pure Tedwilcal B. S.!
Cancel any time - unused bilKKa refunded. Free
yeir-end luNect Index with IZ-month ubscHp-
, Hon Subtacta have hckjdad 'PEEKiPOKE tunc
I bons tor Model H". "Machine Lanpnge Sort tor
Str«« Arr«s". 'Tandy Markatir« An", and
"Level H Memory Locattons". Subacripbons may
be badi-dalBd to obtah prevkwi Bdtotins.
1-Year Subscription
(Includes free index) $36.00
Monthly Subscription $3.00/mo.
TRS-BO ind Ridn Slwck vt rtf tScred
tridtnwki v( Tinit| Corii
Robert A. Fioreili
President
PEEK&POKE $14.95
Frustrrtad because PEEK vtd POKE have been
removed from Model II BASIC?. Sitiity your
curiosity with PEEK&POKE tram MTC. Inckidad
are frbit «id 16-bit (LSB, MSB) iair-retocallr«
machine language routines, kistrucUons, and damo
prograni.
6 • 00 Microcomputing. March 1960
MAKES EVERY BYTE COUNT
IN YOUR TRS-SO" MODEL I OR MODEL II DISK SYSTEM
PROGRAMMING ^y^ff^J^FREE
Trkrkl C Any 5. $79.80
I UULO For Modem $119.80
• NEW* •NEW*
TDAM $19.95
ForModHII $29.95
Hwiiif trouble with RANDOM FILES? With MTC's
TaMe-Drtven Access Method (TDAM) you'll never
fret over FIELDinf again. No knowledn ol
random access files a reouired. Insert the TDAM
"interpreter" into any BASIC prof ram and type in
a tew DATA statements describing the intormation
in your tiles. TDAM does the rest! 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 btocking/de-
Wocking. and handles up to 255 fields per record.
Super last and super simple! Complete with
TDAM interpreter, instructions and demo pro-
gram.
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
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 operatwn. Typically reduces pro-
gram size 25% to 40%.
DIVERGE $19.95
For Model II $29.95
Compares two BASIC program files, showing the
differences between them. Identifies & lists Knes
which have been inserted, deleted. & replaced-
Um for version control.
SUPERSEDE $19.95
For Model II $29.95
A "must have" tor ttie professional programmer
or the serious amateur. Protubly one of the
greatest time-savers availal>te. Write programs in
shorthand - change variable names - generate
a ram documentation - use with REBQILD and
SLE to buikl new programs from old ones.
REBUILD $19.95
For Model 11 $29.95
Reorganize programs tor adding program code.
(aster execution, readability. Much more than sim-
ple renumbering. Rearrange groups of statements
within a program - automatically updates
references to line numbers. Use with
SUPERSEDE and MINGLE tor maximum effect.
MINGLE $19.95
For Model II $29.95
Merge two files (Program or Data) into a single
file. Data files may be merged in ascending or
descending sequence with the ordering based on
a user-specified comparison field. A very handy
utility tor consolidating data files.
>
.
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!
• D0N7 TOUCH MY BITS!
• RAM it!
• MICRO LOVERS TAKE SMALLER BYTES!
mTc-SHIRTS $5.95
FILESORT $29.95
For Model II $49.95
Sort ASCII liles by any combination ol user-
specified fields: ascending or descending,
numeric or non-numeric keys. Optionally reteins
original tile.
MAILSORT(Model I) $19.95
MAILSORT replaces existing sort in Radio Shack
Disk Mailing Lisr system. Sort by any combina-
tion of fields, such as NAME, within CITY, within
STATE. Hi-speed in-memory routine sorts 300
records in approximately 60 seconds. Minimum
32K recommended.
Single skied, Single density. Soft-sectored
DISKETTES
Verbatim 5>/4-inch MARCH
SPECIAL*
^0095
M'fc^J Box of 10
Hard-sectored (lO-hole). Box ol 10 S26.95
8-inch FLOPPIES
Sing:e-density. Box o< 10 $29.95
Double-density. Box of 10 $39.95
PLASTIC LIBRARY CASES
5 '/•-inch or 8-inch diskette case S3.25
5'/i-inch or 8-inch diskette case
(when purchased with each Box ot 10) . . . S3.00
FACTORY FRESH, ABSOLUTELY FIRST QUALITY
Minimum order 1 box, NO order limit!
■Price in effect March 1 thru March 31, 1980
Complete for Model I with all utilities
NEWDOS +11
$9995
40 TRACK VERSION $109.95
includes REF, RENUM, SUPERZAP.
EDITOR/ASSEM.. DISASSEM., DtRCHECK, and
more! This is the original NEWDOS with all of Ap-
parat's utility programs, plus any 2 MTC PROGRAM-
MING TOOLS (for Mode) I), of your choice.
Transfer PROGRAMS and DATA
from MODEL I to MODEL II
TRAN-SEND
$49'^yMTC
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" fkip-
pies, instructkms. May be used over phone lines.
Custom Cable only $19.95
Suitable ftx use with Rxlio Shack' trgnjter program (AC! 0131)
by Apparat
and MTC
AN products
guaranteed for
replacement only.
Prices, Specftications &
Offerings subject to
ctiange 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
shipping &
handling
S2.00 EXTRA
lor COD.
Ohio residents
add 5'/;% sales tax.
TO ORDER CALL TOLL FREE
1-800-321-3552
IN OHIO call (216)289-7500 (COLLECT)
^-n
I^ETfl TEChUQiaGJES CQHPaRflTiQM
26111 Brush Avenue, Euclid, Ohio 44132
800126
(HTM TANDY CORR
t^ fi»Mf»f Sbit/c*— se« page 147
80 Microcomputing. March 1980 • 7
go REMARKS
by Wayne Green
Stnnetimes I tend to assume too much and
not communicate as well as I might. In the
case of elearonic mail I assumed that everyone
else was as fed up with the increasing slowness
and cost of the U.S. mail and that the value of
sending mail electronically was self-evident.
My error.
My concept of EM runs something like this.
The time is well on its way when a microcom-
puter/terminal will be on most business desks
and in most homes. I'll be able to type in a mes-
sage, using the telephone number as an address.
This message will then be sent to the addressee
via telephone lines almost immediately.
My system will dial the number and if it's
busy, it will continue to check the number every
minute or so. When the Une is free, the system
will send a tone that prevents the phone from
ringing on the other end and actuates the EM
unit.
After the system receives a handshake signal,
tell the other unit how many bits of information
are forthcoming, send the message, await an
okay, and hang both up. Time, at 1200 baud,
perhaps one minute.
The EM unit on the other end will have a
light indicating an awaiting message. This can
be read whoi convenient and a response made
... all within a minute or two, if needed.
WIU Save Phone Calls
Such a system will not only speed up mail
from several days or a week to a minute or two,
but will also cut down on a lot of phone calls. I
really hate to make phone calli. Often the other
chap is on another line, or busy in a meeting,
out to a late lunch, getting a haircut, or, per-
haps, molesting his secretary.
The dollar loss in voice phone calls will be
made up by an enormous increase in message
billing, so the phone company will make out
fine.
The U.S. PcKt Office will have to find
something better to do, bless them.
While we are all waiting around for the
govenuneni and Ma Bell to organize some sort
of electronic mail system, it is my fiendish plan
to get it going via microcomputen as quickly as
possible. We'll have over a million miao sys-
tems out there by the end of 19S0, and this will
certainly be enough to get a service started.
Businessmen will be aUe to handle much of
their own correspondence . . . athome, if they
wish, just by re-routing the messages or having
them repeated from the office. The present cost
of correspondence can be cut substantially
where no typewritten copy is required, no
secretary, no paper, no filing.
If a permanent copy is wanted, it can be filed
on tape for later retrieval, put on microfiche, or
even printed out and filed, if absolutely neces-
sary. One of those relatively low cost 10,000
megabyte disks could replace file cabinets.
I know it would be heavenly sent, if I had
such a system. If some irate subscriber had
missed an issue, instead of calling me and rais-
ing Cain, he could send a message. I would pass
it along to the subscription department, a mile
from my office. They would relay it to the full-
fillment house in New York. The answer would
come back directly to the subscriber, with an
acknowledgement to our department and to
mc. Alt that would take just a few minutes in-
stead of about three weeks.
I have asked several firms to design the hard-
ware for just such an EM unit, aiul one has
obliged. The interface will be strictly RS-232
and thus useful with almost anything, so we
need software for all the popular micros, if any
of you programmers are interested.
The program will have to word process, al-
lowing the microcomputer to work as a correc-
ting typewriter and to get it to tone or dial the
needed number after a prompt. The system
should be as transparent to the user as possible .
If you think you have the background for
this, let me know. We are expecting prototypes
of the interface unit soon and project a massive
release of the system this coming summer. ■
JipAPPllCATIONS
^^ ^^ hu npnniR Kits?
by Dennis Kitsz
A single screw on the case bottom is covered
with a drop of tinted lacquer: it warns
"Keep Out!" But you know a little electronics,
and you've fixed your brother's TV ... so in-
to the TRS-80 you go, remembering the five
cardinal rules of hobby electronics:
• Never get a Technical Refertnce Handbook.
It's five more dollars they want after you've
already put up hundreds.
• Pull everything apart to see what it looks
like. Remove all socketed ICs and put them
in a plastic bag.
• Test everything. There's nothing like a good
torture test, so poke around with meter and
scope probes and screwdrivers, and smack
things with your knuckles. Be sure to do it all
with the power on.
• Try experiments to see what happens. If the
screen goes wacky, that's a sign you're doing
something. Keep trying. Don't forget to twirl
all the trimmer controls, too.
• If a part looks about the same, it probably
fits; put it in. Corcrilary: Never read Thomas
Hardy, Herman Melville, or spedfication
sheets. They're all boring and playing
"Space Poutoes" is more fun.
Three weeks later, you're still lookiiv for a
Radio Shack willing to take on the repair work.
Two months after that, you've got it back, plus
a bill for over a hundred dollars.
Poidng, Prodding, TkuinplB|
Of course, I am suggesting that the TRS-80 is
a pretty sophisticated electronic toy and not
very responsive to poking, prodding or thump-
ing. It can succumb with devilish quickness and
quietness.
If you've decided that your TRS-90 needs a
change or addition, and you intend to do it,
your chance of success can be high. But do buy
and read the Technical R^erence Handbook.
You may not understand it all, but even a
general feeling of how, why and when the
machine performs its activities is worth the time
spent.
If you're instaUing someone else's hardware
addition or modification, read the documenta-
tion carefully. Understand what the change
does and how it works.
Always open the case with great care. The
boards are made up of hundreds of delicate cir-
cuit traces that can be broken with a scratch,
and there are several rather unpleasant inter-
connection cables that can unexpectedly snap
loose. Leave sensitive ICs and cables in place.
I took my TRS-80 apart the very day I
bought it . . . and broke the Levd II intercon-
nect cable. Two weeks, tea d(41ajs.
Leave the power off until testing time, and
then reseal the case. It's no fun to discover that
the IC you piggybacked or the DIP switch you
put in place of a jumper works just beautifully,
but putting on the cover crushes it into the cir-
cuit board, sending the computer into a micro-
frenzy.
Never just "try it." There may be more than
one way of achieving a givoi change, but avoid
Continued to page 10
8 • 80 Microcomputing, Marcn 1980
^^
BASIC SOFTWARE LIBRARY
NOW • 10 • Vblumes and Growing
IS SPONSORING A
$10000.00 Give Away
And unlike others we are giving a large portion in CASH that you Don't have to spend with us. You are
eligible NOW! You may already be entered. More details in future advertisements.
We have over 100,000 in circulation since 1975 and we are still around and That's more than Anyone else can say. We
used to sell hundreds of programs individually, the programs in Volume X were sold for several years at over $10,000.
in Volume III for over $6,000 but a few years ago we decided to promote software to the mass public and it was an
instant success. We are still several years ahead of our time in our marketing concepts as well as our products and we
are going to be making another major change in the market. We are going to offer our programs in cassette form. NOT
just one of two programs like everybody else. But a book full of programs for just $9.95.
For Homeowners, Businessmen, Engineers, Hobbyists, Doctors, Lawyers, Men and Women
Vol.1 $34.95
VOI.IIS24
Biiiincii &
Animaia Four
Binomial
P«(ional
Aalroncul
ChiSq
6ool<t(««ping
Bagal
Coatt
Programs
BioCycIo
Conl'donco 1
Canrion*
Conlidance 2
Bond
Cnvckan
Corrolationt
Building
Crapt
Curva
Compound
Dofltlghr
Qort
Dllfarancai
Cydtc
Dual Plot
Oociaion I
Judy
Exp-Oislri
Dacision 2
Llna Up
Laaat Squaras
DepracltlJon
EHkisnt
Pony
Pairad
Roulatta
Plot
Flow
SkyOivar
Piotpi)
Imtsttmoni
Tank
Polynomial Fit
Intarcit
Tatcn M«
Ragrataion
Invatimanti
Slalt
Moclgaga
A Nawman
Stat 2
Optimiza
J FK.
T-OlatriboiJon
Ordar
Ltnus
Unpalrsd
Part Traa
Ma. Sknta
Varlanca 1
Raia
NiKon
Vahanca 2
n«lurn 1
Noal Noal
XY.
RalurnZ
Nud*
Schcdui* 1
Paaca
Policarnan
APPENDIX A
OamatA
Picluraa
Santa'a Slaigh
Snoopy
Virgin
95
Beam
Conw.
Filiar
Fit
Intagration 1
Inttgtation 2
Inlanaily
Lola
Macro
Max Mm
Navaid
Optical
Planat
PSO
Randl
Rand 2
Solva
Sahara Tnan
SUia
Track
Trlangla
Variable
Vactor
Vol. iir
$39.95
Billing
Inventory
Payroll
Riak
Schadui* 2
snipping
Stock!
Switch
Vol. VI
$49.95
MInl-Udgw
ir^
invantoty
Peprac.
Ledgor
Vol. VII
S39.9S
Chew
MKlbii
Vol. IV
$9.95
Bingo
Bonds
Bull
Eniarpriaa
Football
Fundi 1
Funda2
Go-Mohu
Jack
Lit*
Loans
Mum
Pokar
Popui
Ptolits
Oub'c
Ratos
Rsiirs
Savings
SBA
Tic-Tac-Toa
Wdprac
UWly
Vol. V
$9.95
Andy Cap
Baseball
Compara
ConlidiO
Daacrip
Diltsr
Engine
Fourier
Horae
Integers
Logic
Playboy
Primes
Probal
Quadrac
Rad Baron
Regression 2
Road Runner
Rouleila
Sanla
Stano
Stat 11
Steel
Top
Very
Xmaa
APPENDIX B
Vol. VIII
$19.95
ID40-TUI
Balance
Checkbook
Inttol 78
Oeprac 2
APPENDIX C
Vol. IX
$19.98*
Auto
Cypher
Hurrtrac
ID
Lorana
Map
Navigate
Omega
Patterns
Radar
RDF
Favorites
*10% Discount — Oftef good
vol. X
$69.95'
Intro.
A/R
A/P
Mar Inv
Check
Asseia
Payroll
BafSh
P/L
Year End
Data Base
Tan Up
Basic St
til April 30, 1980
Add St. 50 per volume handling, all domestic shipments senl U P.S evcepi APO
and P.O. Boi which go parcel post Foreign orders add $6. 00/ volume lor sir
shipment and make payable in U S dollars only
AVAILABLE AT MOST COMPUTER STORES
Master Charge and Bank Americard accepted.
Our Software is copyrighted and may not be reproduced or sold.
Unlike others we have NOT raised our prices in five years
Volume III— Part 1— Billing Inv Pyrl.
Volume VII— Part 1— Chess
—available on TRS-80 level II
compatible cassette $9,95
Add SI 00 per tape Post /Handling
Volume VI — Disk programs are
compatible with TRS-60 disk basic
The disk programs In Volumes VI, VII and X are
written m (CP'M) M Basic and Disk Extended
Microsott Basic. Other programs written in BK
Basic
^157
OVER 116,
III
KEMCO, LTD.
P.O. Drawer 2208G Petersburg, VA 23803
24 hour Hot Line (800) 528-6050
ext. 1 184. In Arizona (800) 352-0452
USE TODAY
^APPIKATIONS
Continued from page 8
experimenting with a disemboweled TRS-80
before you. If whai you have insialled doesn't
work, don't jumper connections or rotate con-
trols. You did something wrong, so admit it.
and recheck or rethink everything. Test care-
fully, using good equipment and proper test
clips.
Read ThiMc Spec Sheets
Last of all. when doing your own design or
substituting parts, read specification sheets.
This warning (as well as this entire column. 1
must admit) derives from my own experience.
The TRS-80's designers were kind enough to
leave some blank area that could contain an ex-
tension of [he Level II ROM. Delighted ai the
prospect, I set about designing a small ROM
board to include utility programs of interest.
1 decod«l the address of the area, and hand-
wired a small board that contained various ICs
and S42 worth of 1702A EPROMs. These han-
dy little circuits were relatively inexpensive, and
they could be individually erased for future
program changes.
It didn't work. I had considered everything
but speed. All the mysterious talk about access
time and X number of nanoseconds came into
focus.
A quick look at the TRS-80 clock revealed a
speed of 1.66 MHz, which meant one cycle
every— quick calculation — 600 nanoseconds.
Turning to the spec sheets, 1 found the 1702A
had an access time of — disappointment edging
toward anger— 900 nanoseconds.
Even veteran experimenters need to be
reminded that digital circuits have a low
tolerance for abuse or marginal design. On the
other hand, well-designed hardware additions
or modifications are very much a part of the
community of TRS-80 hobbyists, and that's
one way of making these microcomputers re-
spond to human needs.
Additionsl ^oies
Additional notes on Faster! Faster! (Feb. 80
Microcomputing) for those of you with disk
drives. Howard Batton of Auburn, WA, brave-
ly went ahead with the modification. He says:
"1 went the whole route the first lime ... as
you suggested, the disk won't power up in [he
high speed mode, so 1 had to reverse the Q and
Q' leads. As it stands now. after only a couple
days to try the system. I can use the high speed
most of the time, including disk reads and
writes from BASIC. The DOS commands,
however, don't want to work properly, at least
not all of the lime. Some of ihem, e.g. format,
copy boot, dnn'i work al all in high speed
mode. So far. I haven't lost any programs or
Miped out any diskettes, so I count the high
speed mod a success."
So you disk owners will want to power-up at
the lower speed. As noted, reverse the leads
from Z7 to ZSPEED. Now OUT 254.0 gives
you low speed, OUT 254.1 is high speed. Very
many thanks to Howard. ■
C1UBSJ9
by Ross Wirth
I am happy to hear from you to learn your
ideas and thoughts on the content of this
column. Please send your comments lo me at
15906 E. 96 St, N.. Owasso. OK 74055. An
SASE would be appreciated for persona! re-
plies.
Newsletter Review: Chlralrug News
Chicairug is a TRS-80 User Group that
meets every month on the third Wednesday
from 6:00 'lo 9:00 PM at 203 N. Wabash.
Room 2102 in downtown Chicago. Their
monihl\ newsletter for January was ten pages
long. The breakdown of the newsletter was
1 ■ ; page> of short notes and new product
reviews. I page of meeting annoum-cmenis, 4
pages of ads, and 3 ' : pages of articles written
by club members. These articles include a
review of programs that have sound output, a
machine language program for draw ing a pin-
wheel and a line between two {\,\) points and
a good explanation of how to use VARPTR in
your programming.
Chicatrug News is published monthly by
Emmanuel B. Garcia. Jr. & Associates, 203
N. Wabash. Room 2102. Chicago. IL 60601.
.Annual subscription rate is S12.
Prognimining Hints
One topic thai everyone seems interested in
is short programming tricks that they can in-
corporate in their programs. For those who
are interested in such goodies 1 will present
one or two each month. I'll try to give credit to
the people who bring them to my attention.
The original creator will also be credited, if
known.
Ixtss of inrormstion on the screen when
entrrlnK data: While playing a game you are
prompted to enter some information. You
type the information in and hit ENTER and
before your eyes a line of the screen is blanked
out as the cursor moves to the next line. The
problem: you cannot control the cursor mov-
ing lo the next line.
Solution: Use INKtY'S for entering infor-
mation to your program. This will prevent the
lossof informal ion on the screen and will keep
the cursor at its present location.
Try this example.
HJ1K.I S
no KIR I H)47:SI T |<fi,l|.Nt\l I
1211 PRIM Iri 1W,"SL'MBI H''";
HO \S= INktVSilI- \i -■■■THIN 130
140 \ VAll\i(
iw \; - \ • \
1«) PRINT S! .>50.\.-SOLAREDlS';X2;
POCOTO lio
Notice that \.\L was used to change the
character input to a numeric value. If a non-
numeric character is entered VAL will return a
zero (0). Knowing this you can check for non-
numeric input in the data validation section of
your program.
Note: this works for single digit input. A
later hint will deal with multiple digit input us-
ing INKEYS.
Arrows as input to i program: (brought to
my attention by Greg Perry, Tulsa, OK).
Every key on the keyboard is available for
entering data to the computer, including the
arrow keys. Instead of using U, D, L, R for
up, down, left and right, the arrows can be
used directly. Useful applications include
games and word processing. Try the follow ing
example to see how this works.
IIKIIIS
111) It PFFKn44()l)l STHEN PRINT "UP*'
i:Wlt PFFk(144(KH IftTHEN PRINT -tWWN"
HO l^ PEEKll44ail = 3: THFS prim ■LEFT"
14(1 li- Pi-[KI14-«)(H MTHEN PRINT ■■RIGHT"'
i.'ocnTo no
Try this use of arrows in the next program
that needs directions as input.
Short Notes
Recordings of programs on tape will last
longer if you press the STOP button after
loading the program into your computer.
Leaving the PLAY butlon depressed keeps
constant pressure on the tape, the last part of
which contains the last part of your program.
This continued and repealed tension on the
tape can eventually cause drop out of data.
(And who wants that to happen!)
Last month I mentioned the formation of
groups of individuals for the purpose of in-
formation exchange and education. My role
in this activity is lo match individuals with
similar interests. Some additional areas of in-
terest are health care, education, war-gaming.
word processing and scientific applications.
Each of these groups is in need of a coor-
dinator. If you wish to join one of these
groups or wish to serve as a coordinator please
drop me a note and I'll make sure you get to-
gether.
Computer hardware costs arc still dropping
and general software is becoming more
powerful and available. In the past software
was given away to sell computer hardware. In
the future w ill the hardware be given free with
the purchase of a software package?
As hardware becomes, cheaper, it is financial-
ly more feasible to build bigger, faster and more
complex systems then e\er before. Send me
your thoughts on the future of hardware, ■
10 • 30 M\crocomputing. March 1980
for the
MAZC-M
• 9JB
ANvwnrs
9»M
PEflTOMINOES
Sf-flG
ARlTHMETtC
S 6.95
COMPUTER
M1NDREADER
S 6-95
1S NUMBERS
S 6.96
QUIZMACHINE
».^«Md»/Swv(C«— s«p«pB t4T
S 6.96
TRS«0 TIELINE
TRS40 TIELINE it an ntandad imari ttrminal program.
Functiont tupportad with thii pacfcagi an tha ab<mv to
land and racaiva BASIC data and pro^'ami. A fuKv >up-
portad tat of limathar* ASCII cortrol kav* wi toftwira
tatactabla. 'ESC' and a 'BREAK' kay function do not ra-
quira any hardwara modificatiom. Snurt function! maka It
poatibla to jump from moda to moda with communication
prior to program trarwminion or racaption. Half and full
dup(ax modat at wall at lina faad transminion or tupprai-
tion, baud rata, parity, woRJ langth, ttop bin ara toftwara
tatactabla and can ba changad whita running. A printar can
ba connactad for hard copy of communication! at wall at
LLIST at baud ratat that includa 134.5 baud for caruin
tarial prjnttrt. A tpacJal hoat or tourca moda allowt othar
eomputart to uta thaTRS-80 TIELINE ai a timatharaityla
computar. Programi can ba run at wall at ditk filai loadad,
lavad or tranimlttad by control from tha di!tant computar.
Charactir acho-back it supportad. Hott ovarrida of forbid-
den command* ii potiibla. An additional faatura illowi
tatting of tha TnS-80/RS232 hardwara. Tha program it
avillabia for DOS 2.0 - 2.2 machinal with 32K mamory,
RS232 board and modam. Additionally, tha packaga in-
Cludat a fraa copy of THE TRS«) DATA COMMUNICA-
TION HANDBOOK' by Staphan Gibton. Tha handbook ii
■ compilation of tarmt artd in-dapth axplanaliont of data
COmmunJcatior\ from tha itandpoint of tht utar. tha hard-
wara. and tha phona company. Various phona lina laraicat
ara dttailad. Baud ratat, bJti artd codai ara axplainad at
hobbyiit laval. How a Ball 103 modam worki and how to
connact it it covarad with emphaits on originata arHl antwar
fraquanciat, duplax. fialf-duplax and RSZ32 convantiom.
Tha EIA ttar>dardi are given with ASCII control ctiaraciar
lal information.
TIELINE
TRS-aO DATACOMM HANDBOOK
S24.9S
$ 5.95
All ordwi Includa 3K poitagt and handling with ■ minimum of
S1 .00. California rdldtntt includa 6% Sal« Tw.
VISA MAITERCHAIiac
TRS-aO IS A REGISTERED TRADEMARK OP
THE TANDY CORP.
PROQRAMMA
INTERNATIONAL, Inc.
3400 Wilthire Blvd.
Los Angates.CA 90010
(213)384-0579
384-1116
384-1117
^21
Daalar Inquiriat Invitad
MINEFIELD
t 6.96
nm
\^m
NH
t e.fle
ROULETTE
t«JB
PACHINKO
S 6.95
DBM/B
tt
t
D
1
H
(Q
n
D
3
n
T
Q.
C
er
n
M9.96
ao Microcomputing, Mmnh 1M0 • 11
COfKENTRATION S 6.96
so INPUT
Spinner Rebuts
The firsi issue of 50 Microcompulin^ came
Monday, and il wai^ hard to waii until the din-
ner dishes were done and 1 was free lo relreai to
my favorite chair lo sf>cnd several hours read-
ing about my favorite subject: the TRS-80. In
general I was very pleased vvith the initial issue
of SO Microi'omputing. 1 was panicularly im-
pressed *i[h the broad range of TRS-80 opera-
tion/uiihzation issues the magazine articles
covered .
As a new disk spinner I was naturally at-
tracted to the article by William O'Brien "A
Disk Primer." While I thought it was well writ-
ten. 1 did have two objections/observations
aboul points mentioned in that article.
My first objection is to the comment (page
130. column 2. the second paragraph) which
stales "... Level II tapes are not compatible
with [he disk operating system." That is just
not Irue.
Mr. O'Brien has probably confused the Lev-
el I-Level 11 tape incompatibility problem with
ihe problem of real time clock interference
under Disk BASIC. A real time clock is nice,
but it does wreak havoc with tape input and
output operations. In faci, as long as the
clock is operating normally you get garbage
about 80 pwrcent of the time during tape opera-
lions. The solution is to turn the clock off be-
fore lapc operations. That is accomplished by
issuing the command CMD"T" just before
tape operations. After operations are complete,
the command CM D"R" will restart the clock's
operation. The process only seems complex the
first couple of times you do it. after that it be-
comes second nature.
(Some disk users have had interference prob-
lems from the clock with their disk input-out-
put operations, but I understand that Percom
has a simple, cheap plug-in board that solves
that particular problem.)
The key point is that those Level II tapes will
still work after you add a disk to your system.
The second observation I have is regarding a
comment Mr. O'Brien makes further on:
"Since you TRS-80 users must have the
Radio Shack DOS disk present in drive 0,
there is not much room left for storage (for
instance, RS's 2.2 DOS leaves only 18
kilobytes of storage of a possible 89.6
kilobytes). That means two disk drives."
It does not mean two disk drives. It means
you have to be a bit creative. The solution lies in
constructing a minimal operating system. A
minimal operating system is one that contains
only those DOS files you absolutely need for
normal operations. The other files are killed.
freeing the space they occupied for other use.
Using TRSDOS 2.3 as my example, it works
something like this. As your DOS disk comes
from Fort Worth it has 38 free files and 21
grans of disk space you can use. This translates
into about 2fi kilobyies of space. If we kill the
following files, it is possible to more than dou-
ble the free space:
f-ORMAT/CMD FORMAT (THE ■ FORMAT" IS
THE PASS\^ORDI
BASK R.'CMD BASIC (THE -BASK" IS
THF PASSWORD)
flACKUPCMD. BACKUP (THE ".BACKUP" IS
THt PASSWORD)
TLSTZ BAS
flSTI CMO
TAPEDISK CMD
GETDISK BAS
CETTAPE BAS
DISKDLMP BAS
After you have killed these files, your drive
diskette will have 47 free files and 52 free grans
of space (roughly 66 kilobytes of free space).
You can do a great deal with 66 kilobytes of
mass storage! The most profitable files to kill-
in terms of the space they free are:
TEST2 BAS (FREES I) klLOBVTESI
BASICR CMD (FRFE-Sft KILOBYTES)
FORMAT a"MD (FREES i.i KILOBYTES)
BA< KUP'CMD (FREfcS i.H KILOBYTtSI
Interestingly enough, these are also the files
that I find 1 don't need co have on every diskette
I own. But whatever mix of DOS files you have
on your drive disketle, the key point is that
there is a great deal more mass storjige capacity
on that diskette than a cursory glance would in-
dicate. I'm no great shakes as a programmer.
but I've done a lot of work with the storage
space on my drive disketle.
I'm looking forward to the next issue of 80
Microcompulinf! .
James M. Kendcrdine
13420 ELssI Cedar Uiw Road
Nonnan, OK
System Crashes
1 just received the first copy of 80 Microcom-
puiing in the mail this week and I like what 1
see! 1 think I held my breath long enough
waiting for someone to come out with a maga-
zine devoted to just the TRS-80.
You mentioned in the magazine about ran-
dom crashes when the interface is used, i have a
32K system: one disk system is hooked up and
another has been ordered. 1 also have a PR-40
printer. As for system crashes, yes I have had
some with the interface turned on. I sent the in-
terface in to the Radio Shack service center and
they sent it back saying "no problem!"
Well, it crashed again, this time with the disk
running! Lucky all the files were CLOSED or it
would have been a mess! I had to push the reset
and boot DOS back into the machine.
As for software 1 write much of my own and
copy some out of books and debug them so
they will work in my machine. Some programs
"written for the TRS-80" have to be debugged
in order to work in my machine!
One program in particular left a space in the
file spec and you don'l leave blank spaces in
your niespccs because the information after the
blank space is ignored. 1 had to change from
MS -t- Ml to MS -*- AS, then to get the numeric
value of AS I used VAL(AS) to get the number
back for my IF branches. This was the only way
1 could get rid of that blank space!
1 am planning to add another printer to my
system, a full size printer but I am going to keep
the PR-40 on line for use when a 40 column
printer is more practical, I am going to have it
switched from my control console.
James Wehjahn
Box 396
Medford, MN
Nobody's Perfect
1 enjoyed the fu-st issue of your new publica-
tion and urge you to keep up the good work. As
a TRS-80 Level II owner the articles were very
useful, however, I would like to bring the fol-
lowing points to your attention!
"Basic BASIC Renumbering." p. 82.
If line 10070 is changed to: 10070 1F0255
THEN L = L - 256: H = H + I the program will
renumber all of the lines in multiples of 10 in-
stead of the "6" spacing every 25th line.
It is better to add H = lo line 10000 for safe-
ly in case H has been pre-initialized. Incidental-
ly, running this program renumbers its own
first three lines!
"NEW Restored," p. 84.
I had problems with the FIXNEW program
and finally figured out that it was O.K. if after
running it, it was immediately followed by a
RUN.
If you started with LIST to see if it worked, it
went to hell! My TRS-80 is new (August), may-
be it's different. I discovered it needed loca-
tions 40FD/FC and 40FD/FE loaded with the
contents of register HL. Doing this necessitates
moving the starting address back a few bytes
otherwise you'll go past 4FFF. With my change
12 • 80 Microcomputing. March 1980
the program ran fine.
"Get T-BUG High," p. 118.
This is a great program for idiots like myseir
who are not too well up on machine language —
once it is de-BUGged. I found that Figs. 2 & 3
had their tittes switched and that the BASIC
driver had an error on line 30. Line 30 should
switch the program to line 70, not 75!: then it
all works fine.
Terrific! I used this shift (now called
TBUGHl) to figure out the FIXNEW pro-
gram. Don't be discouraged! I'm looking for-
ward to Issue 2.
Kcllh Walker
1075 BruBh Hill Lam
Lake Zarlch, IL
I Was Cheated
Radio Shack's Microchess cheats to win.
There are certain conditions that can be
reached during normal game play with MI-
CROCHESS 1.3 that will allow the computer
to move illegally — cheat. These conditions are:
1 . The computer plays the black pieces.
2. The level of play is set for IQ = 3.
3. The computer's king must be in check and
it cannot simply be moved out of check.
4. One of your pawns must be blocking
movement of one of the computer's unmoved
pawns.
5. Your piece forcing check must have its hne
of action cross the space immediately behind
your pawn that satisfies condition 4.
6. The nature of the game will be changed if
the computer cheats.
1 stumbled on this error while playing against
the machine and have since verified each of the
conditions listed. Condition 6 is interesting
since apparently, if cheating doesn't gain an ad-
vantage, the machine won't cheat, even if the
rest of the conditions are met.
The sequence for the game 1 was playing
when the error was discovered is listed below.
MOVE WHrTE ILACK'S RESPONSE
1
Ul'TH
G8-F6
1
BI-Cl
F6-G4
1
E2-E4
G4-F«
4
&»-ES
F6-OS
5
FI-C4
U1-T»
6
C4-fM
CT-OB
1
DJ-C4
[X-A5
8
Di-n
Ba-D7
9
F3-F7
E8-Da
10
EI-Eli
□T-M
11
F7-F1
DI-C7
12
C1-F4
E7-E5
Note that black's 12th move is illegal in that the
computer has moved a blocked pawn.
I would appreciate hearing from anyone in-
terested in this problem or its solution.
Mftc ToUmoH
RD#2
NonvBle, NY
More on Computer Music
It is about time somebody cared enough for
the TRS-80 to create a "real" mj^azine for it! 1
have seen several different ones — from the
newspaper type (which are big jokes), to your
sister magazine Kilobaud. This is by far the best
and hopefully most successful endeavor for the
computer hobbyist.
1 was glad when I read Dennis Kitsz'sAJylp-
piicalions column and saw that he too has a
musical synthesizer! I would certainly hope to
see in these pages a few articles on computer
music, and especially applied to our TRS-80. I
know for a fact that my Steiner-Parker "Syn-
thacon" has been linked to a National Semi-
conductor PACE system . I f it can be done with
a sLghtly esoteric system, then why in the hell
can't it be done with my TRS-SO?
On the subject of computer music, when is
somebody going to come up with one for the
TRS-80 that is humanly engineered? I have
both Shack's "Micro Music" and Mad Hal-
ter's "Musicmaker" and both are painfully
laborious and mundane. How about one that
lets you enter notes as shown on a musical staff
and displays each note on the staff as they are
being played? Are we going to let Apple get the
best of us? Or how does one get to know Max
Mathews then?
/ would
certainly hope
to see a few articles
on computer music.
Now, how about some simple articles or
leaching scries on Assembler language. Even
though a friend of mine (with a TRS-80) is at-
tempting to help me, I can't seem to get past the
NOPs and POKES. HELP!!!! I'msurel'mnot
alone in the boat.
Now that you know where I 'mat, I'll be anx-
iously awaiting my wonderfully speedy (choke!
choke!) mail service for what 80 Mkrocom-
puting is going to do to entice me NOT to give
up after my first year!
Mark S. Uicas
724 E. MBlberry St.
LaNcaslcr, OH
Program Size?
I just received Issue t(\ and am impressed at
the quality of both the magazine and its con-
tent.
After reading Rod Hallen's "Software Re-
view," I was left with the nagging question
which never seems to be answered until you
purchase the software: How big is the pro-
gram?
Especially with a program like Line Renum-
bering or GSF which is intended to run with
BASIC programs also resident in memory, it is
important to know how big the utility program
is. Because if a Line Renumbering program is
too large it cannot be used to renumber a large
BASIC program.
I'd suggest that you add program sire as a
part of all reviews.
Dogeared Record
DuWalthcr
2465 Tykr Road
i,AL
80 is superb. Your first issue mint be re-
corded as the greatest sin^e issue of a com-
puting magazine ever.
I skim a magazine, dogearing an ad or article
that 1 want to return to. Issue #1 hit a record 17
dogears.
Your advertisers will be pleased to know that
they have colleaivdy trucked ei^t orda? from
me.
As Durocher said, "Push your tuck."
ScMToMia
21N Hwty SI.
Gteaview, IL
S^DIBUg
Getting T-BUG HI
Received a call today from a reader in
reference to a problem he was having with
the article I submitted. There is a typo error
indeed, which 1 did not catch in the manu-
script.
Line 30 of the BASIC program should
end THEN 70 rather than 75. The peek ad-
dress does not get incremented as the pro-
gram currently reads. It was my error in
submission and proofing.
Irwbi Rippoport
24 Hemlock HIH Rd.
Upper Saddk River, NJ 07451
Errata
It has been brought to my attention (hat 1
made a major goof in the printout of the
SORT program that I submitted for publi-
cation. "Son 80K in 6K!" Jan. SO Micro-
computing. Making the following changes
to the program as listed will provide proper
operation.
ZW LSET DIJ - D31:PUT 1, PBiGET l,P3;D)i
- Dll
:P1 - n
TKt ISfcT DIS = D4I:PIIT 1, P9:GET l.P4:D«i
- DIJ
:P* - F4
320MIDVD3S.l-?W.Nll = T2S
]» MIDMIMS,! 4 NT.NI) - TIS
370 IF P) <> P4 THEN 4<l
Sorry to have inconvenienced you and
your readers.
D. E. FHchbom
3504 Ptermont Dr. N.E.
Albuquerque, NM
Continue to page 16
90 Microcomputing, March 1980 • 13
5!9ACGoufimNT
by Michael Tannenbaum C.P.A.
Listing an inventory is the most common
application for small computers such as
the '80. Inventories are created for all sorts of
items, from credit cards to phone numbers, and
shuffled in many different ways. People in
business arc always looking for new ways to
view their inventory, by type, by size, by color,
by price ... the list is endless.
In addition to a file maintenance program
for adding, deleting or modifying data, the in-
ventory software system usually contains a
report generating program and a sorting pro-
gram. These programs are used in combination
to resequence the file according to key words,
while generating hard copy or visual reports on
the monitor.
While the forms of various inventory systems
may be similar, the reports generated are not.
Inventory can be controlled by type, value, age,
demand, quantity, location or combinations of
the above. The point is that you must define
your needs before purchasing a system.
The Valutloii
As an accountant 1 examine an inventory's
valuation. Methods of valuation include:
• FIFO— First In First Out
• LIFO— Last In First Out
• Average Cost
• Speciric Identification
• Retail Method
Regardless of which method you choose,
both beginning and ending inventories must be
valued under the same one. Different valuation
methods yield different profit pictures. Let's
consider Tables I A. 2.
The LIFO method results in the lowest gross
profit of all the methods illustrated. Under (his
method, the income statement includes the
most recent costs (Last In First Out) aiul the
balance sheet is left with the earliest costs. As a
result, during inflationary times, this method
results in a lower income and thus a lower in-
come tax.
But, as you no doubt anticipated, there is no
such thing as a free lunch. Should the closing
inventory units drop lower than the opening in-
ventory units, the low cost units arc included in
the income statement and the tax deferral is
reversed with a vengeance.
Radio Shack has issued several Inventory
maintenance programs. One of their earliest ef-
forts was ICS (Inventory Control System
Catalog #26-1553). This was followed by the
manufacturing inventory control system re-
leased at the end of 1979. Although the two sys-
tems are significantly different, they both
represent usable packages which will be sup-
ported by the vendor.
The ICS system was intended as an inventory
tool for a merchant who purchases inventory in
a saleable condition and marks it up for resale
—just like a Radio Shack store. Because the
designers of the system were familiar with their
own operation, they obviously used it as a
model when setting up ICS parameters. This
observation should not be construed as a defi-
ciency, however, it is important to understand
the designer's inlentioiu when considering the
system for your use.
The ICS parameters include the following:
• Utilization of a stock number referencing
scheme that requires merchandise to be coded
with a separate prefix and suffix. The purpose
of this scheme is to group related items yet per-
mit item identification within the group. Ex-
planation of the purpose of this procedure is
not included in the documentation which ac-
companies the system.
• Preparation of inventory reports in which
cost figures can be suppressed.
• Display of a cost/retail relationship on the
inventory report. Such information is valuable
only if the firm has a fixed selling price or the
inventory contrt^led is offered for sale to out-
siders.
• Batching sales prior to posting in a holding
file until an update run is made. As a result,
"available to sell" or "use" status is not
available immediately.
A prominent feature of the system is the use
of a "reorder point" that can identify items in
need of replenishment. Defining your optimal
reorder points is a major financial goal and one
that can justify the purchase price of a com-
puter, related peripherals and software. But
establishing your reorder points requires
careful consideration.
Key elements in the calculation of a reorder
point usually include the following:
• Rate of usage or sale;
• Delivery time required by the vendor and
associated transport after a purchase order is
placed;
• Minimum lot size required by the vendor
when placing an order;
• Definition and quantity of your firm's
"Stock Out" philosophy by merchandise type.
In addition, consider your capacity and any
UBifTS
PER LNIT
EXTEMHIO DOLLARS
Sales
ISO
S5.00
SI. 250.00
Inveni — Beg
100
2.00
200.00
Purchasn I ) )
»
2.00
100,00
12)
so
2.50
12Utt
Ut
so
].00
IWJ»
M)
so
3.50
175.00
t5)
so
4.00
]OCM»
Invenl. — End
100
AVC.
SPECIKIC
KIFO
•fc
UFO «*
COST
•Tt I.D.
«*
Satn
SI 250
00
11250 too
SI2S0
IX S1250
100
Cosl or Sales
Invenl, Beg.
200
200
200
200
Purchun
JIS
7S0
7S0
750
Avg. Cost
930
9S0
9S0
50
Less Invent. End*
J7?
MO
V^
JSO
Couof Sale«
m
46
TJO 60
425
54 6Q0
4«
Grovi Pfofil
1 £;
54
i 22 40
i;7^
46 \ f^
52
•Intern. C omp.
so @ 4.00
100
@ 2.00 100® 2.72
50 m 4.00
50 @ 3, SO
IS @ 3.00
; @ 2.00
10 @ 2 50
Tables I i 2.
20 3.50
14 • 0d Microcomputing. March 1990
financing requirements. Above all consider
your rate of consumption. ICS does not main-
tain this statistic. As a result, you will have to
csublish a separate sales accumulation system.
Adjusting the Record
Another puzzling problem relates to the ac-
cumulation of inventory cost, selling ^kicc and
on-ordcr totals. As data is entered, the product
of the units and the price field is used to adjust a
total record which is carried forward each time
a posting session is completed. These totals are
displayed when system status is requested or ai
the bottom of reports that display the inventory
in its entirety. However, when each item is mul-
tiplied times its unit cost and retail, the sums of
the item detail lines may not equal the report
total.
This surprising situation is caused by two
factors; the method used to update the inven-"
tory record for receipts and the method used to
print reports.
When an inventory item is replenished, the
original cost and selling prices are replaced with
the new figures. If the new figures arc the same
or the balance on hand is zero, there is no prob-
lem. However, should there be a difference and
a balance of inventory remains unsold, the old
inventory will be priced at the new cost and
retail. Since the carry forward total has been
adjusted by the increment only, it will now be
different than the sum of the details.
When a sale occurs, the cost is calculated
based on the main file cost figures available. If
this is different than the purchase cost, the bot-
tom totals will be distorted even more. It is
quite possible thai the ICS owner will not be
aware that this is happening. When a total in-
ventory report is requested, the system docs not
recalculate the touls. The source of the loial
data is the carry forward record, each detail line
is only printed.
Aside from ICS distortions, there arc also ac-
counting drawbacks. Since the cost of the
original item is lost, we can no longer use
LIFO, FIFO and specific identification meth-
ods of valuation. All these methods require
more knowledge about the composition of the
inventory than is available from ICS. In fact,
the only feasible method is average cost, how-
ever, to use this method, the program has to be
modified. If you plan to use ICS for inventory
valuation purposes, please be careful.
If you want to use ICS to establish a retail
control to quantify shrinkage, please be aware
that the distortions to the cost field also effect
the retail field. Shortage measurement might be
difficult under these circumstances.
Since ICS does not develop the extended
total of the retail and cost field, I am including
the following shon program to develop [he
missing data. To use it, simply replace the
password extension with your system's pass-
word. Hitting RUN and entering the number of
items in the system gives you the extended cost.
Although this review is quite critical of ICS.
this should not dissuade you from considering
it. If you can live within its constraints and are
unafraid to face some programming, it is a fine
piece of work. It is easy to use. well-document-
ed, and has worked well without strange
bugs.B
IM ]lipT.ii-nLt Sia Iti hi. lEiTEt-.X
IW ICXT
rt* !F >..«r*M 10
110 Ff;lNIICI
:6 Kisu6^:3e
128 CLC5€
4e Fc* j-iio X
12T. SlCf
50 CiCo..ei^-«f
Kit* CftM-R-:?. -HHTWILE Ft^SSUCW
5; GETJ.JR
WK«W
ft) ttti aWrtKI FltL^S to QUfiNTITV ( f«10(*TS
?54e Jk=lHTC<J-lJ/4)*l
To 0\-i;VICF&»)
J[.>J-4»INTC(J-l)/4)-l
F»1'<VSiFLH-StI fC* COST U5E FPf FC*
^'.a 1- lELW. Jl-tySM. ISflSFM. 2f<SFQt. «>*SFCI.
PETftIL
4ftSFF1 . IL'WSFLI. ZftSFRI, 2hSFR», ZftSFOI.
63 WIHTFPJ.O;;. Ml'
SflSFttl . cftSFVI, ZfCPII. iFGPil
TCi = TCI-iCK'«1'>
fttlHW
CAPTAIN Si9
hu Rnh I iririil ^^ ^^
by Bob Liddil
Here's Capiain 80 sitting in a fresh super-
hero uniform amidst programs stacked
10 the ceiling. Normally 1 would be in my dis-
guise (as a mild mannered program reviewer).
but ihe intluv ol GAMt programs is so great
ihai superhuman sirenglh, speed and dcMcriiy
is required just (o keep up.
.'\s 1 said in my last column, I believe \ery
yrongly in games. 1 don'i mean to arouse [he
game \s simulation fonlrovcrsy, but I want m
illusirale my point, looking at the current
market ol" game siifiware, 1 wonder whai hap-
pened to imagmation.
Not 10 say ihai there is no imaginative soft-
ware on the market. Adventure, Dungeon-
quest, Sargon, Sam a Para via En Fumicioanda
small list of others, are up, running and for
sale. No, I'm talking about Star Trek version
2437, Blackjack version 2340.91, Hangman
WOOO and all the countless variations of the
programs loaded into the phone eompany's
long distance phone lines in 1964.
I'd like to sec some REAL simulations
How about a life game based on the survival
rale of apartment d^^ellers in New York City?
You could call it Sur\i\el! and program ran-
dom degrees of Kung Fu ability into the poten-
tial victims. t>r instead of racing forever
around the Indianapolis Speedway, how about
a spirited game of Freeway, simulating the San
Diego Freeway south bound from L.^— com-
plete with smog, traffic jams and Eric Estrada
on a Kawasaki, its blue light flashing.
I'm Not Kidding!
These ideas are just examples of possible
themes compared to [he incredible drivel that
manages 10 work its way onto the marketplace.
If I have lo shoot down one more X-wing
fighter, or hear Darth Vader's name again, 1
think I'll mail two pt>unds of magnetized iron
to the producer in hopes of erasing his entire
supply.
It is for belter ideas in programming, thai I
announce the First Annual Capiain 80 Pro-
gram in a Paragraph Contest. Just sit down at
your [ypewriter. desk, kitchen table or
whales er, and write oui in 50 words or less, a
program you would like to see. It isn't neces-
sary to actualh write the program, jusi ihe
idea.
Enlrics should be typed, double spaced and
sent to Capiain 80. c 80 MicrocompulmB,
Peterborough, New Hampshire 03458. Every-
one who sends in an idea will receive a free
membership in the SPPPp (Society for the
Perpclualian of Perfect Programs Purveyed
piibliciy). The best idea, as ajudicaied by yours
truly, will earn its creator S25. Send a stamped
envelope to the above address and i 'II send you
a complete set of rules. Contest ends April 1st.
The lack of high quality games leads me to
another sore spot. Where are all the education-
al programs? Hey. all you software producers
out there: The TRS-80 is an educational tool!
There are thousands of kids all over the world,
playing Battlesiar Galactica because you and
your programmers have ignored geography,
spelling, science, geology and all the other
things that these active youngsters could be
tearing into with a computer. If you are
marketing, plan lo market or have for potential
sale, ansihins thai resembles a kid-level educa-
tional program, send a copy lo me, care of 80
MiirtKompuiing and I'll personally review it.
Send it on tape or disc, with company name and
where it can be bought.
Let me remind you, I'll review software— old
and new — as it appears on the market or as il
crovscs my desk. I'll try (as only a true knighi of
computer justice can), to give a fair and honest
opinion of the programs submitted by com-
panies and individuals for my evaluation.
You're invited to participate. Submit a shon
review of a program thai you like or dislike.
And look: If you disagree with anything in
the column, write about il!!! I'll try to answer
each letter (in the beginning at least), person-
ally. ■
80 Microcomputing, March t980 * 15
UNliniTEDf(9*!
by Sherry Smythe
Here's a success story about a man with no
electronic or computer background, who
saved his business with a TRS-80.
Bill Garlic and his wife, Phscilta, started
Eastern States Traffic Service 25 years ago in a
trailer with a S25 used IBM typewriter, a spirit
duplicator and three customers. That first year
was tough: they grossed only J750.
Eastern States Traffic publishes a book of
tariffs thai is a shippers only source of current
freight rates for the country. Freight rate in-
creases are proposed by the Tariff Bureau and
cither accepted or rejected by the ICC.
In 1955 there were five or six rate territories.
Today there are about 35 (plus 10 intrastate).
According to Garlic, rate changes occurred
once or twice a year until 1979 when there were
six.
Bill and Priscilla updated 300 to 400 pages of
rates, each with 450 entries, by entering the
percentage increase in a calculator and then
typing the new rate on a tabulated form . It took
two to three months to revise an old hst . By ker-
chunking on the calculator at breakneck speed,
the Garlics would still be two rate changes be-
hind at the end of the year. It was obvious to
Bill that something had to be done— and fast.
Finding HHp
Last April, Bill picked up a pamphlet on the
TRS-80 at his local Radio Shack. But trying to
fmd further information about the 80 proved
frustrating.
Bill says there are two kinds of computerists:
Those who want to know everything about a
computer; and his kind, who just want to solve
a problem and then leave the computer to do its
work. After many fruitless attempts, he finally
ran across a Radio Shack Computer Center
staffed with more sympathetic personnel and
purchased a TRS-80. But still, Bill was short of
software solutions for his business work.
By this time the walls were closing in on him.
Rate changes were occurring faster than they
could be updated , Bill figured if he was ever go-
ing to get the programming job done, he'd bet-
ter do it himself. With a Level II and a hand-
book he started on the road to recovery —
laboring hours getting the TRS-80 to run
figures up and then down.
Finally, after putting a lot of faith and time
into the project, he had a program that printed
the updated figures on the screen a page at a
time while Priscilla copied them. His disk
drives were on order for four months when he
purchased re-worked ones (for the regular
price) entailing even more study of the disk
manual.
Bill had an extra IBM Sclectric 11 in his office
which he found out could be interfaced as a
Bill Garlic
printer. After much run around and many
phone calls, an 1 BM rep directed him to a com-
pany in California with a Selectric adapter kit
that would not jeopardize his service agreement
with IBM,
Bill Garlic is a grandfather and a man who
hates tinkering. But he purchased a soldering
iron (he'd never put two wires together before),
and spent a frustrating week installing the mi-
crocomputer interface.
After some false starts the Selectric started
clacking away. Success! Bill had his first good
night's sleep in weeks.
Reese Fowler of Instant Software and I
visited Bill in his office in a lovely old New
England hilltop home by the (x:ean. Despite the
chilly day Che pot-bellied, coal-buming stoves
radiated warmth. Tucked away in the corner
was the TRS-80 with its 32K, dual disk drives,
and Selectric printer just waiting for the ICC to
raise its rates again.
And next time maybe it will update those
rates a little faster, because Reese helped Bill
with some new programming routines. When 1
could pry him away from the computer Reese
put on his photographer's hat and took the pic-
tures for this column.
Bill says what took Eastern Sutes Traffic
two to three months, can now be done in two
or three days. Increases that effect only parts
of the country can be updated and in the mail
in hours. ■
S!9 INPUT
From page 13
Appending Programs
I would like to comment on an article in your
first issue of 80 Microcomputing entitled NEW
Restored, by Ken Fordham.
As I understand things, addresses
I6633(LSB) and I6634<MSB) are the end of
program pointer, not the next line pointer. This
is helpful when you wish to append two or more
programs; but first a note about the D's that ap-
pear between each line number, and theO 4
chat appears at the end of a program.
The O's that delineate one line from the next
will be 1 's above 32767, and the end of the pro-
gram (which looks like 4) breaks down in-
to this: The first is the normal that the com-
puter puts at the end of a line, the next two O's
are a 'This is the end of the program' code, and
the 4 means that the O's preceding are single
precision (if they were double precision it
would be an 8).
When you key in NEW, you lose the end of
program pointer, the beginning of program
pointer (16548(LSB) and 16549(MSB», and the
first four bytes of the program become 4.
To append two programs, you PEEK the end
of the first program (16633(LSB) and
1 6634<MSB)), POKE the banning of program
pointer to the end of the program pointer - 2.
(The reason you POKE it to the end - 2 is be-
cause you want one between lines, but don't
want the additional two O's that signal the end
of a program.) Load the second program, and
re-POKE the beginning of program pointer to
the beginning of the first program (which will
be different if disk is up, and will vary from orte
DOS version to another — so PEEK first if you
use disk).
Continued la next page
16 • 80 Microcompulmg, K^arcn 1980
To recover a NEWed program, you must re-
POKE the end of program pointer + 2 (the rea-
son it is +2 is because you want the end or pro-
gram code O'sal the end of a program), the first
four bytes and if you use disk, the beginning of
program pointer.
Some precautions: You musi remember
ihat you are not working in base 10; The
largest number you may have is 236. It is
equally important to realize that after you key
in NEW, any POKEs you make, arc going lo
write into the resident program.
That is, if you key in POKE 17129,241:
POKE 17130, 66:POKE 17131, OiPOKE
17132,0:POKE 16633,0:POKE 16634,67 you
will be (staning at 17129) overwriting the first
57 bytes of your program!
The way around this is to make the first two
lines of your programs (lines and 1) shift 7
REM'S. Since a" takes up three bytes, this gives
you 16 bytes which wij! always be the same set
of numbers in each and every program.
If you make only one POKE at a time (press-
ing enter after each entry), you cannot over-
write more than 10 bytes. To correct these 10
bytestheeflj^ way jusi key in line 0' and line 1'.
For increased protection, I recommend making
the first three lines shift 7 REM's.
To find the end of the program if you forgot
to PEEK prior to keying NEW, just key (in the
DIRECT mode) FOR N = 17129 TO 30000:
PRINT PEEK (N);:NEXT
Hit enter and be ready to press SHIFT®.
Look at the stream of numbers until you spot
thefirst set ofO 4's— the end of a program.
Look back one line so that you can calculate the
address of the LSB of the pointer of the last
line, add the number of bytes in the last line and
add two to that number.
That will bcihe address of the end of the pro-
gram to be POKEd into 16633 and 16634.
One last note: Table 1 is a ROM codes table.
Missing from this table is code 2S1, which is '
(used in shift 7 REM). A shift 7 REM is 58 147
251 . Also, code 188 which is listed as "TAB" is
actually "TAB(".
Knowing the ROM codes allows you to
change any command to any command (such as
PRINT to LPRINT) with the following pro-
gram (keyed in the DIRECT mode):
FORN = 17l28rO327tt;[FPEEK(Nl-0THENN = (N + 4):
NEXT NiELSE IF PEE1C[N) -0 AND PEEK(N+ l) = OAND
PEEK(N*2) = 0THEN END:ELSE IF PEEKiN) = X THEN
POKEN.V:NEXT:Et^E NEXT
Where X = the old ROM code number, and
Y = the new ROM code number. (Program by
Craig Werner)
Mr. Robin L. Silimiuohn
1855 Woodland Road
Ablngton, PA
Don't Give Me Grief
In at least two articles you printed an error
that will cause many users much grief and OM
errors! The Radio Shack EDTASM editor/as-
sembler lists the 1A19H BASIC 2 entry point
for a Ready. This address also gives OM errors
and unsettles the BASIC Interpreter. The
0072H entry point works properly and will not
cause any problems.
I have been using it in the RETURN to BA-
SIC from our BEEP program (the return after
the beep has been loaded and boots itself into
the USR memory location, not the subroutine
return).
Below you will find a copy of the letter I re-
ceived from Tandy.
Harvey A. Kurtz Jr.
Presidenl K M C S
Box 02205
Ckveland, OH
There is afar better entry point to use instead
of I A I9H and it is 0072H. A jump to this ad-
dress returns a READY and does not give the
OM error. If you should have any further ques-
tions, please conlaci us ai our toll-free number.
Radio Shack Computer Services
John I. Snodgrass, Jr.
Manager
Please for novices
like myself have
some short articles
written in plain English.
Fewer Assumptions
I have just received my first copy of your
magazine.
You stated that you wanted feedback about
your first issue. As a medical school professor,
lam using my three disk drive 48KTRS-80 for
word processing, writing of seminars and slu-
denl objectives, class design and short enter-
lainmeni programs.
1 am interested in learning more about the in-
ner workings of theTRS-80, especially machine
and assembly language. However 1 find the ar-
ticles in your first issue way over my head. Most
of them discuss machine language methods to
do things with or to the TRS-80. Unfortunately
the jargon and jumps of language are indeci-
pherable to me. Your writers obviously assume
everyone is as sophisticated as they are. Some
introductory articles on how lo use machine/
assembly language would be valuable. Some in-
troductory articles on how to function without
cassette tape loading would be helpful. Some
introductory articles on jargon would be help-
ful. What is a hash? Some introductory articles
on how to get at the contents of ROM and
RAM and what to do with the data when it
shows up on the video screen would be very use-
ful.
Additionally the problems of circuit dia-
grams make little sense to me and probably to
most people who want to use the computer to
help communicate with others and write pro-
grams Ihat will run faster.
I know that some of this information is in the
Radio Shack hardware books, but even there
the information is cursory.
In the article on decision- making there were a
number of errors that made the program break-
down as written. I changed line numbers and
instructions somewhat.
Please for novices like myself have some
short articles in plain English, that if ac-
cumulated and placed in a ring binder will, over
the course of several months, explain how to
get the most out of my computer. How do you
use the editor/assembler, for example (the Ra-
dio Shack instructions are awful!). How do you
use machine language?
I understand the theory of computers. 1 have
been working with systems analysts analyzing
mass data and clinical aaivities for years. 1
have a moderate understanding of program-
ming in BASIC and some acquaintance with
FORTRAN but the inner works, and how to ac-
cess them and use them, escape me at present.
Chri^ophcr M. G. Buttery MD MPH.
4609 Templar Drive
Portunoulli, VA
Useful Locations
A long time ago, during 1977, 1 had just got-
ten started in computers. I went to the comput-
er store and bought some magazines and
books, eager to learn more about this fascinat-
ing subject. One of the magazines 1 bought was
Kilobaud. When I got home, I browsed
through everything. The Kilobaud magazine
was sort of thin and the table of contents was
on the front cover. I hated the typeface, be-
cause all the other computer magazines had
nice neat ones. So, 1 got turned off to it.
Then, in November of 1979, 1 was at the
computer store again and 1 picked up an issue
of Kilobaud. It looked really nice, was thicker
and the articles looked interesting. I bought it.
After I had gotten a chance to read it, I realized
that this was a very good magazine and from
reading the subscription ad, I knew I missed out
on a lot of good articles. So I went and got a
subscription to Kilobaud and 80 Microcom-
puting.
In regard to "Hidden codes and Missing
chips," I discovered some other memory loca-
tions that might be of use. The big one is x40Bl ,
which is the pointer to the end of memory mi-
nus two. If you have 16K and you haven't re-
served any memory, then PEEK(16561) should
be 254 and PEEK(16562) should be 127.
A nice way of altering this would be to POKE
the new values in those locations, then execute a
CLEAR. This is a way to change the memory
size without losing your program or reinitializ-
ing the computer. 16561 is the low order byte
and 16562 is the high order byte. In 16K, the
127 and 254 from above mean 127»256 + 254,
which is 32766, plus two is 32768, which is the
memory size used when no memory is reserved.
Jim Radcn
602 W. Wayne
Maumec, OH
80 Microcomputing. March 1980 • 17
5!? NEWS
edited by Michael Comendul
A Computer for Business
How does a small engineering company that
needs — but can't afford — a large computer,
survive in today's business world with larger,
computer-equipped competitors?
By adapting the hobbyist's microcomputer.
The John West Company, specializing in pe-
trochemical and rermery-related engineering
services, did just that— using the S25O0 Radio
Shack TRS-80 as a base. The entire system cost
under $5000, interfacing the company's IBM
Seleclric II typewriter as a printer.
"We couldn't afford the large computers our
competitors utilized, but we felt like we had to
take advantage of the efnciencies, and just
plain better job, that a computer affords in
special engineering applications," recalled
West.
While no computer on the market could do
what the company wanted at an affordable
price, several small microcomputers came
close. The hardware was adequate, but soft-
ware was limited mostly to BASIC programs.
Available maintenance and a national repu-
tation prompted the selection of a Radio Shack
TRS-80 computer as the base of ihc company's
computer system.
West's 48K TRS-80 has two floppy disks.
The first handles 57,000 byies of memory; the
second handles 80,000 bytes.
"With standard software (an Electric Pencil
program and general business programs), we
have basically the same word processing capa-
bility provided by much larger machines— at a
very modest price," West explained.
Also standard arc general business programs
that cover everything from accounting and bill-
ing to payroll.
Additional engineering programs, often un-
available from computer manufacturers, were
specially developed and usually inexpensive.
For less than the cost of a part-time employee
John West has a computer system ideal for his
small, technically oriented business.
Hamboree/Computerfest
A Hamboree and Computerfcst will be held
on Sunday, March 30, at the Maryland State
Fairgrounds at Timonium, Maryland.
In addition to commercial exhibitors includ-
ing Radio Shack and Heath, a number of
smaller firms will be selling software and ac-
cessories. Several computer stores will also be
exhibiting. The fest is planned around an
equipment fiea market.
John West: His entire system cost under S5. 000.
Speakers scheduled include Wayne Green,
publisher of 73 Magazine, Microcomputing
and 80 Microcomputing. One of Green's two
public appearances in 1 980, he will be speaking
about marketing ideas in microcomputing.
For more information contact Joe Lochte.
2136 Pine Valley Drive, Timonium, MD 21093.
Children's Program
Computers are for kids— at least that's what
the 30 students at the Woodland School in
Spotswood, New Jersey believe.
Students in grades four through seven, have
been writing their own programs covering
everything from geography to graphics on a
Radio Shack TRS-80 microcomputer for about
a year now. They are part of an advanced stu-
dent program that obtained a TRS-80 in Jan-
uary of 1979 with a grant from the New Jersey
Department of Education.
Now at the request of teachers within the
school, the students arc creating and writing
computer programs for use in the classroom.
The programs are designed for grades one
through seven in mathematics, social studies,
science and language arts and to prepare stu-
dent for quizzes.
The students at Woodland School were
filmed recently for the syndicated children's
television program, Kidworld, a children's pro-
gram designed to give youngsters an opportun-
ity to report what is going on in their world. All
ideas for the content of the program arc sub-
mitted by the youngsters themselves.
According to their instructor, Laura Zatz,
"The TRS-80 represents a challenge to my stu-
dents because it is something new in learning
and promotes creative and logical thinking. Ev-
en slow learners can benefit from using the
TRS-80."
Software Catalog for Model-II
A software catalog for Radio Shack's
TRS-80 Model-ll computer systems describing
accounts receivable, accounts payable, general
ledger, payroll, inventory, rental management,
order entry and a variety of financial and
mathematical programs is available from Na-
tional Marketing, Inc., Hollywood, FL.
The programs opwratc on a 64K Model II
with built-in disk. They are priced from $15 to
SIOO.
The catalog is offered free.
Readers Service t^ 170
18 • 80 Mictocompuling, March 1980
Index Sequential
Access Method
An Index Sequential Access Method for con-
trolling business application files on diskette is
available from Johnson Associates, Redding.
CA.
The ISAM system is a series of subroutines
the user includes in his program. Calls to these
subroutines store or retrieve data by referenc-
ing a key field within the record. An additional
set of utility programs allows the user to create
a new data file or to reorganize an old one.
All ISAM files are supervised by the TRS-80
Disk Operating System, thereby providing
standard space jillocation, directory, copy, kill,
backup and password services.
Any record field can be designated as the key
field and all subsequent adds and retrieves are
based on the content of this field. Records can
be added, updated or deleted at any time and in
any sequence.
The system allows up to 15 ISAM files to be
open simultaneously, however, memory re-
quirements for such an application would be
large.
Readers Service ^ 174
Control Your Peripherals
The TRS-80 Breadboard, a hardware device,
available from Group Technology, Ltd.,
Check, VA, allows the microcomputer user to
design custom interfaces for his peripherals.
The TRS-80 Breadboard contains bi-direaion-
al data bus buffers, a logic probe, a solderless
breadboard, and an eight-device address de-
coder that can be used for either accumulator
I/O or memory-mapped I/O. The user can se-
lect not only the mode of operation for the
device address decoder, but also the four or
twelve most significant bits of the device ad-
dress.
The Breadboard allows the user to communi-
cate with control signals in the microcomputer
not readily accessible. It can be used with 4K
Level 11 TRS-80's up to dual floppy disk 48K
Level II systems.
A 190-page textbook by Dr. Jon Titus,
TRS-SO Interfacing, instructs the Breadboard
user in the construction of device address
decoders, input ports, output ports and
s>'nchronizaiion signals. Hardware interfaces
and software listings are shown for A/D and
D/A converters, programmable interface
chips, data loggers, a traffic tight controller and
a digital logic tester.
The text includes 18 experiments that can be
performed by the user with expected results. All
programming is done in BASIC.
The TRS-80 Breadboard is available as a
parts hst and instructions for S3.00 or as a kit.
Kit prices range from S25 to $250.00. TRS-80
Inler/acing. Book I. is priced at $8.95, plus
Si .00 shipping and handling.
Readers Service t^ 177
Level II Guidebook
Dr. David A. Lien, author of the TRS-80
User's Manual, has released Learning Level II,
a fully illustrated guidebook created specifi-
cally for users of the Level II TRS-80.
The book, directed toward the novice, ex-
amines all Level II BASIC beyond Level I with
step by step approaches covering special char-
acteristics.
The manual explains how to use the editor,
dual cassette operations, the expansion inter-
face box with the real-time clock, printers and
other peripherals.
Learning Level II costs $15.95 plus $1.45
postage and handling and is available from
Compusoft. San Diego, CA.
Readers Service »- 178
Checkbook Without
Tape Record-keeping
Manhattan Software, New York, NY, has
released its latest program. Checkbook Plus,
which provides a once-a-month solution for
checkbook and bank-statement reconciliation.
The user enters his checkbook balance, the
bank's balance, outstanding checks and bank
charges to check his own balance against the
bank's figures. A special arithmetic-checking
section with optional automatic per-check-
charge insertion verifies each intermediate
balance.
If figures don't agree, the program guides
you through possible error sources.
The cost IS $9.95.
Readers Service »^ 179
Custom Furniture
TRS-80 Breadboard
Custom wood office furniture providing
maximum work surface with accessibility, is
available for the TRS-80 microcomputer sys-
tem from AVS, Alviso, CA.
The unit fits into the corner and mates with
an optional printer/typewriter platform or
storage hutch.
All TRS-80 units, though built-in, simply
drop into place and do not require any mounl-
Custom TRS-80 cabinets
ing hardware or tools.
The standard unit holds the monitor, cas-
sette, keyboard and expansion interface. Op-
tions are available for mounting the screen
printer and/or disk drives.
Readers Service ** 183
TRS-80 Microwave
Interactive Microware, Inc., State College,
PA, is developing a library of Radio Shack
TRS-80 software. These include the following:
Bascx Compiler, an easy-to-learn language that
runs up to 20 times faster than BASIC ($25 +
58 for 97-page manual); Mirrorays, a game in
which the user flashes rays of light into a black
box to locate hidden mirrors, which light up
and rcllecl the rays when hit; a Compact
Graphics Interpreter creates graphic designs
with a simple set of numbers-, a Lunar Lander
Simulator provides real-time simulation and
control of a lunar module; Battlegrid, a real-
time game enabling two players to attack each
other's forces. The number, type and size of
battle pieces can be specified by the players.
AH of these programs operate on a 1 6K Level
11 TRS-80 and sell for $7.95, except as noted.
Readers Service y* 165
BASIC Protection
Data Associates, Framingham, MA. has re-
leased a program. UnlistS, that will automati-
cally protect BASIC programs against un-
authorized modification.
It runs on a single disk system with 32K
memory and inserts hidden passwords and
copyright notices selected by the user so the
program cannot be listed or printed though it
can still be RUN. CSAVEd, CLOADed, disk
loaded and disk saved as usual.
Options permit unlisting all lines, or each
n'th line, or specified blocks of line numbers.
This program can also be used to relist a pro-
tected program provided that the password is
known. It can relist each line, or blocks of
specified line numbers.
t^ Rmiv SmMi<x—iM p*g» 147
80 Microcomputing, March 1980 • 19
UnlistS is provided with an instruction man-
ual and three copies on cassette for $19.95
postpaid.
Readers Service *"• 166
The PencU/Pal
Microcomputer Specialists, Elkins Park,
PA, has released PenciL/Pal to be used in con-
junction with the Electric Pencil.
With Pencil/Pal you can automatically
merge your letters with an address file and
LPRINT them.
Pencil/Pal is compatible with the lowercase
modincation. One or two fields within your ad-
dress file, even area codes or zips, may be used
to select letters to be printed.
The program costs S33. Send S3 Tor docu-
mentation only — deducted from purchase
price.
Readers Service •'ISO
Storage and
Retrieval for TRSDOS
ISAR is a BASIC data base management
system that uses TRSDOS random file struc-
tures and the limited TRS-80 chaining tech-
niques. This means you only have as much of a
program in memory as necessary.
ISAR consists of six modules that create any
number of new files, define all elements within
each file and manipulate them according to a
menu. Files are sorted with Shell-Metzer.
ISAR is available on cassette for SI3.9S or
diskette for $16.95 from The Alternate
Source, Lansing. Ml.
Readers Service t^ 181
Income Tax For The TRS-80
This book contains more than 40 1979 In-
come Tax programs in 100 pages for the
TRS-80.
Most of the progranns are for LPRINT and
several show how to convert these to PRINT
only.
Programs cover child care, personal resi-
dence, special 10-year averaging and undcrpay-
meni. A chapter is devoted to tax credits.
The price is $14.93 and is available from
Gooth Software, Louis. MO.
Readers Servile »^182
Clock Modification
Mumford Micro Systems, Suminerlaad,
CA, has released a new clock modification for
the TRS-80. The SK-2 3-Specd Mod is a small
circuit board with five integrated circuits which
can be mounted inside the keyboard unit or ex-
ternally.
It inlemipts the main dock line to the Z-80
and allows switching from normal speed to a 50
percent increase and a SO percent decrease.
Switching is controlled by a toggle or by soft-
ware.
Disk users can add a control line to the ex-
pansion interface to automatically force a re-
turn to normal speed at any time. This elimi-
nates the need to write speed commands into
your programs or modify the operating system.
An LED indicates when the computer is not
at normal speed.
The SK-2 comes assembled and ready to in-
stall for $24.95 (plus .75 postage). Only four
connections are necessary to the computer.
Readers Service ^173
Business-Aides
Occupational Computing Company, Inc..
Woodland Hills, CA, has released its business
aides system.
These accounting and management pro-
grams include: Accounts Receivable, Billing
and Inventory Control for both manufacturing
and finished goods; Accounts Payable; Pay-
roll; Chent Accounting.
Prices range from $350 to $1495.
Readers Service ^ 1 68
Color Display from Percom
The Electric Crayon, a computer -operated
color graphics generator/controller from Per-
com Data. Garland, TX. is designed to
generate color displays on either a TV set or
monitor.
The Electric Crayon includes its own ROM
operating system. EGOS, that accepts single-
character commands directly from a parallel
ASCII keyboard or program-generated com-
mands.
A self-contained control computer, the Elec-
tric Crayon provides IK-byte of on-board pro-
gram RAM, an EPROM chip and a second
dual bidirectional 8-bit port for peripherals. It
has 10 display modes^an alphanumeric-semi-
graphics mode, a high-density semigraphics
mode and eight graphics modes. Up to eight
colors can be generated.
The Electric Crayon measures 2-'/i inches
- ■ '■— ^ .-I- ..--;-
-
ii
'
ll-
■
^^^WBBK
a
^-.....■i^H
^^L
^B^^^H
^^
■
^^^^^^j*^
high by 9 inches deep by 1 2 inches wide and sells
for $249.95.
Other options include:
BASIC language color graphics programs on
minidiskette.
A 34-conductor ribbon cable to interconnect
the Electric Crayon to the TRS-80 printer port.
RAM chips for adding refresh memory for
higher density graphic modes.
Readers Service >'I69
Machine Language Sorts
A machine language Generalized Subroutine
Facility for the Model II is available from
RACET, Orange, CA. Its functions include
mulii-key/multi variable in-memory sort,
multi-key character string in-memory sort,
USR PEEK and POKE capability— both byte
and word and fetch argument. The subroutine
will compress and uncompress data, move it in
blocks and propogate across arrays.
The subroutine will sort 1000 elements in six
seconds and carries up to 15 arrays together
with multiple mixed ascending/descending
keys.
The cost is $50 on your DOS diskette.
Readers Service r' 172
Payroll Program
Small businesses with TRS-80 Model I Com-
puters can now utilize Data Train, Inc's Payroll
for their dual mini-disk 32K systems.
The DTI Payroll allows 50 employees per
diskette and runs in all sutcs with state, federal.
and local taxes and employee records set by the
user. Other features include: Monthly, quarter-
ly, yearly pay and hour records; recording of
handwritten (after the fact) checks; departmen-
tal reporting; maintains W-2 and 941; special
reports for departments, unions, earnings, tax.
Fixed programmed reports include: Checks
and/or stubs, register, journal, employee list/
records, mailing labels and others.
The price is $235 and is available from Data
Train, inc.. Grants Pass. OR.
Readers Service t^l75
Power Line Filter
Percom Electric Crayon
To eliminate most of the sensitivity of the
TRS-80 to power Une noise and reduce its
television interference. Percom Data Com-
pany, Garland, TX, has introduced a simple
power hne filter. The following materials arc
available from Percom and (except for the
filter) most hardware and electronic stores:
Corcom I0R3 EMI Fitter
3-wire power cord (Belden #I7237B)
Power cord strain relief (H.H. Smith #939)
117 Vac Socket (H.H.Smith 1280-103)
4" X 21/4- X 2W" Minibox (Bud CU-2103-B)
6-32 machine screw and hex nuts
Readers Service »^ 163
20 • 60 Microcomputing, March 1980
DISCOVER THE MAGIC OF WORDPROCESSING
AND TURN YOUR TRS-80* INTO
A VERITABLE "OFFICE WIZARD"
WITH A "NEC SPINWRITER
|99
N EC 5530
(CENTRONICS I/O)
What makes NEC your best typewriter quality printer value?
1. The one and only print "thimble." SPINWRITER'S DURABLE (up to 30
million impressions) and unique reinforced plastic print element. Up to
128 characters per print element, with a wide variety of typefaces to
choose from.
2. SPEED and RELIABILITY. The SPI NWRITER gives you up to three times
the speed of IBM "Golf Ball" type mechanical printers, along with the
advantages of a true electronic output printing device.
3. HUMAN EAR COMPATABILITY, The low pitched strumming noise made
by the NEC Spinwriter won't leave your ears and nerves aching after a
hard day's use, as Dot Matrix and mechanical printers tend to.
THE NEC SPINWRITER
IS FULLY SERVICED BY NEECO.
NEC 5530 SPINWRITER (plug compatible to trs-so*) $2495.00
Word Processing Software '^Electric Pencil" $ 100.00
Call or Write today for NEC Specifica-
tions Sheet. (Specify TRS-SO*)
*TRS-BO Is a Trademark of Tandy Corp.
,^143
NEECO
679 Highland Ave
Needham. MA
02194
Mon-Fri 9:30-5:30
MasterCharge &
Visa Accepted
(617)449-1760
t^ nattier S9ntc0—s»m pmgm 147
do Microcomputing, March 1960 • 21
Instant printing/instant pricing, use a computer
to impress customers— and give accurate quotes.
Printer's Apprentice
Richard Barnes
1515 S. Glendale
Sioux Falls, S.D. 57105
One small-business application where the
microcomputer has proved effective and
cost efficient is the print industry. There has
been an astounding revolution in this Held
prompted by the development of the "instant
pripting" or "quick print" business.
According to Printing Impressions, an in-
dustrial trade journal of the printing world, the
quick print business has made commercial
printing available to many businesses and indi-
viduals who had previously been using office
mimeographs and copying machines. The mag-
azine also pointed out that the average quick
print plant in the United States last year grossed
an average of $174,000.
A new problem emerged with the develop-
ment of the quick print plant and it is a problem
that can be resolved through the use of the
microcomputer.
Variable Pricing
While each small print shop has its counter
price sheet, giving customers prices for jobs
that require 100 or 500 copies, the small office
staff is often perplexed when asked to quote a
price that is not on the limited price sheet. It is
an area where mistakes can be costly, and a
small printer can find that he has made a com-
mitment on a bid while omitting an important
cost element.
I'lA dOSr TR.S\Nfo IT) FIND A XATB
fbP^ SW^iBDAN NlfcHT.'"
^^
One small printer recently submitted a bid on
a difficult printing job which was WOO under
the next highest bid. He won the bid, and real-
ized that he had forgotten to include his print-
ing costs for the second side.
If the small printer grosses the estimated
$1 74,000 a year, with a one percent error factor
he could easily lose $2,000 a year — enough to
pay for a small computer system.
The program for a small quick print shop can
be relatively simple. It includes instant access to
a price schedule. By writing a program that asks
for all data relating to the printing costs, error
by omission is next to impossible.
Secondly, such a program offers the public a
fair print pricing policy.
As a good businessman, the printer should
know his fixoJ overhead, how many copies he
can produce in one hour and his paper costs.
The only other variable should be the number
of copies needed. With computerized printing
prices, the customer is assured that the price
given is accurate and fair.
The instant printer tries to turn around his
printing business within one day or two, at the
most. Instant printing, necessitates instant pric-
ing.
The Program
Our pricing program is designed for the con-
venience and use of the walk-in customer. It
can also be used by the staff in quoting prices
by phone, but the public is etj^uragcd to use
the system.
Since the unit sits unattended in our lobby, a
routine is used to lock out inappropriate re-
sponses throughout the prc^ram. GOTO 1000
clears the screen and sends the program to an
endless loop, telling the user to call someone for
assistance. Few know how to BREAK out of
the loop and the computer keyboard remains
locked so that the user cannot toy with the
machine while waiting for a clerk.
The two most important variables in deter*
mining the price of a printihg job are the
number of copies, and the size and quality of
the paper stock being used. It is also important
that the businessman determine his overhead
22 • 00 Microcomputing, March 1980
and the cosi per thousand of printing a job.
Line 55 sets the press run (PR) ai S7 per thou-
sand copies for overhead. That figure varies
with each shop depending upon staff, rem and
output.
The program begins by asking the user what
kind of prim bid he needs. Line 210 sends the
program to the routine selected by the user.
The most common selection is sheet fed
printing. To determine the price, the program
needs the number of copies, the size of paf)er,
whether it is to be printed on one side or two
and whether a surcharge for color slock (paper)
should be added.
Using a minimum order of 1(X) copies, line
310 takes the value of Q (quantity) and converts
it to a minimum of 100 copies for the purpose
of bilhng. Because different stocks will vary ac-
cording to size, lines 390 through 410determine
thepai>er (PA) costs. If a printer adds a percen-
tage to his actual costs, this is the place to do it
so that it is included in the final billing. If your
paper costs go up, a simple edit of these lines
adjusts the program to the increase.
GOSUB 2000 asks whether the order is to be
printed on one side or two. If two sides are
needed, a second plate charge is added (Line
2030), the press run (PR) is doubled (Line 2040)
Our pricing program is
designed for the
convenience and use of
the walk-in customer.
and a 10 per cent charge is added to the paper
costs for waste and handling.
GOSUB 3000 determines whether the print-
ing job will be run on 201b. while or 201b. color
stock. The additional markup in GOSUB 3000
for color paper by size, seems to be an industry
standard. The program adds 501 per hundred
for 8 '/; X 1 1 and adds 75C per hundred for 8 '•': x
14. This may vary with market areas and
should be checked locally.
Dcleimining Price
The main algorithm in line 470 figures the
cost (C) as the value of the plate (variable W at
$2 each), plus the press run (PR) limes M (the
number of copies converted to a thousand or a
fraction thereof), plus the paper costs (PA)
times M. plus the surcharge for color stock.
The program then asks for bindery services
in lines 510-530. Folding, stapling, collating,
padding, cutting and drilling are all included in
the offer and the user selects the service needed.
On occasion, the customer needs his order
folded, collated and stapled. The program of-
fers the customer multiple bindery services by
looping through the selection until the
customer enters a response to let the computer
know that no other services are needed. The
Program Listing.
HELIXJ.
TRS-ae COMPUTER*
bb FP-7
68 PRINV '
80 PPiNT "I CAN ANSWER MOST OF YOUR QUESTIONS ABOUT PRINTING PRICES"
90 PPII.'T "JUST FOLLOW THE INSTRUCTIONS, ENTERING THE PROPER RESPONSE,'
lee PRINT "BE SURE TO HIT THE "ENTER' KEY AFTER COMPLETING EACH ANSWER.'
:10 PRINT: PRINT "FOR WHICH ITEM WOULD YO(j' LIKE A PRICE QUOTE?"
120 P.RINT ' (1) OFFSET PRINTING -- SHEET FED"
;3B PRINT - C) ENVELOPES"
148 PRINT ' (3! BUSINESS CARDS"
15B PRINT ■ (4) CARBMJLESS BUSINESS FORMS"
16B PRINT - (51 TYPESETTIhG-
ne PRINT " (61 GRAPHIC ARTS'
IBB PRINT ■ (71 COLOR PRINTING"
198 PRINT ■ (81 OTHER... "
2eB INPUT L: IF L=I3 OR L>5 THEN ICBO
2ia ON L GOTO 250, 4000, 4SBB,5aae,ieoe,lBB0,lBBU,lB0a
250 CLS
260 PRINT " ALL PAPER IS ON 20 LB. WHITE BO«D"
270 PRINT! PRINT "ANSWER BY ENTERIHG THE CORRECT RESPONSE AND HIT THE"
280 PRINT ■ 'ENTER' KEY."
290 PRINT: PRINT "ItOW MANY COPIES UO YOU WANT?"
3BB INPUT Q : IF O-O THEN 1000
31B IF O',10B THEN Q-IBB
320 M>Q/lflaO
33B PRINT "
34B PRINT "
3SB PRINT "
360 PRINT ■ (3) 11 X 17 ?"
37B INPUT K
360 IF K-fl OR K>3 THEN 1B0B
390 IF K-1 THEN PA-6.52
4S0 IF K.2 THEN PA-B.3B
410 IF K = 3 THELN PA-13.05
45B GOSUB leea
468 GOSUB 3008
470 C • v.- - ! PR • H ) ■• I PA * K ) * R
48B C = I^Ti [C+,fla5)«lBa)/ia0
490 CLS
50B PRIKTgS2S, "YOUR PRINTING ORDER WILL COST $"iC
510 PRINT: PRINT " 00 YOU NEED BINDERY SERVICES?"
S20 PRINT " ID YES"
530 PRINT " (2) NO "
5 40 INPUT P
5Sfl IF P-1 THEN 600
560 PRINT " THANK YOU AND HAVE A NICE DAY ]"
570 PHIKTiGOTO 930
60B CLS
61B PRINT "THE FOLLOWING SERVICES ARE AVAILABLE WITH YOUR"
620 PRINT ' PRINTING ORDER. PLEASE ENTER THE NUMBER OF"
630 PRINT • Ttlh SERVICE YOU NEED."
64B PRINT: PR If )T TAb(45l "WIN. "; TAB158] 'COST"
65B PRINT TAn(45) 'CHG."; TAB(57) "PER 190"
66B PRINT:PHINT "(1) FOLDING'; TAB(451 ' S2 . 00" ; TAB ( 5S ! 'S .50"
WHAT SIZE PAPER WOULD YOU LIKE?"
(1) 8.5 X 11 ?•
(2) 8.5 X 14 ?"
'HAPLlNf; OR SADPLt .'^TtT<-ilTW-";TAB'45) "S2.0O"; TAB{5BI "Sl.OB"
COLLATING COPIES";TABI451 " S2 . 00" : TAB 1 58 ) "S .50"
PADDING - USUALLY 50 COPIER PER PAD' ; TAB [ 4S 1 " S2 . 90" ;TABI ^B ) 'S .3(
I CUTTING - PER SBB COPIES'; TAFM451 " S2 , 00" ; TAB 1 5B I "S .25"
) DRILLING - PER HOLE" ; TAB I 45 ) " S2 . 08" ; TAB I 58 1 "S .25"
S";C
S",-B
S"; IC+B)
6 7 B J' R I NT ■ ( ? 1
6B0 PRINT ' ( 31
690 PRINT "14)
700 PRINT ■
710 PRINT '
72B PRINT --------------
730 INPUT G
74B ON G GOTO 7 58,760,770,780,790,600
7^B 1=.5 ; GOTO BIB
760 F=l : GOTO 810
"'78 f-,5 : GOTO HIO
-80 f" .1 : GOTO 810
-9C f''-.2 : GOTO 810
aO0 F=.25 : GOTO 810
BIB B-lQ/iaa * F)
K20 IF B'-2 THEN B-2
830 CLS
SiB PRINT "YOUfi PRINTING COSTS ABE
850 e«lNTHB*.B95)'l80)/lBO
860 PRINT "YOUR BINDERY COSTS ARF.
H70 PRINT "YOUR TOTAL JOB COSTS
fi80 T-1C + D)*.B5
890 T-INTI (Tt.BB5)*lBD)/lB8
9BB PRINT " SALES TAX:
9ie U-C*tHT
520 PRINT :PR1MT ' TOTAL:
930 PRINT:PRINT "IF YOU NEED ANOTHER PRINTING QUOTE HIT THE"
940 PRINT ■ 'ENTER' KEY."
950 INPUT IjCLSiGOTO 6B
1B0B CLS
leiB PHiNTe33e, ■ please call someone for ASSISTANCE"
1020 FOR X-1 TO S80: NEXT X
1030 PRINT;rRINT " HY MEMORY BANKS DO NOT HAVE THE INFORMATION NEEDED"
1040 FOR X = l TO 5B0-. NEXT X
1050 PRJNT:PH1NT ■ TO RESPOND TO YOUR REQUEST"
1060 FOR X-1 TO 750: NEXT X
1078 PRlNT:PHiNT " THANK YOU"
leee goto ie8B
2808 PRINT "DO YOU WANT IT PRINTED ON 1 SIDK OH 2 7'
2B1B INPUT S
2B2B IF S'0 OS S'>2 THEN 1000
2825 REM ■•• FIGURES THE COST OF THE PLATE AT S2 •**
2B3B W' E*2
2e4B IF S'2 THEN PB=(PR*2): IF S=2 THEN PA-PA+ (PA' . 1 1
2050 RETURN
3000 PRINT *DO YOU WANT IT PRINTED ON COLORED PAPER?'
f":T
S*;U
80 Microcomputing. March 1980 • 23
3B1B PRINT ■ 111 YES"
3020 PRINT • 121 NO ■
3830 INPUT R : If' R-B OR R>2 THEN IBIB
3B4a IF B-2 THEN R-B: IF R-B THEN 3B8B
3B45 REM *•• COMPUTES SURCHARGE FOB COLOR PAPER BY SHE •••
3B5B IF K-1 THEN R-(N*5J
3B6B IF K = 2 THEN R-IM'7.51
3B7B IF K-3 THEN R-[M*1B1
3BB0 RETURN
4BBB REM ••* ENVELOPE PRICING •••
4B1B CLS
4B2B PRINT " HOW MANY ENVELOPES DO YOU MEEO?"
4fl2S PRINT - IDUE TO PRESS SET UP, MINIHUM ORDER OF 5BB PLEASE)'
4B30 INPUT S : IF H-B THEN 1BB0
4035 IF S<Se0 THEN N-5BB
4B4B n-N/lBBfl
4B5e PH1KT:PRIKT "WHAT SIZE AND KINO OF ENVELOPE DO YOU NEED?"
40«e PRIST - (1) SMALL 6 3/4 WHITE PLAIN"
4070 PRIST ■ 12) SMALL 6 3/4 WHITE WINDOW"
4080 PRINT * (J) NO. IB WHITE PLAIN"
4B9B PRINT • (4) (JO. IB WHITE WINDOW
(Iflfl PRINT • 15) SO. IB COLORED STOCK"
411B PRINT ■ 16) OTHER..."
412fl INPUT B
413B IF B"B OH B>5 THEN 10B0
414B REM •*• COMPUTES SURCHARGE FOR ENVELOPE STOCK •••
415B IF B«l THEN E»1,2B
4I6B IF B-2 THEN E-1.5a
417B IF B-3 THEN E-1.5B
418B IF B-4 THEN E-1.7B
419B IF B-5 THEN E-3.5a
42BB PRINT:PRINT "DO YOt,' NEED TYPESETTING OB IS THE COPY CAMERA BEADY?"
4210 PRIST - 11) TYPESETTING NEEDED"
4228 PRINT ■ 12; CAMERA READY COPY "
4230 INPUT D
424B IF D-; THEN D-0
4250 IF D-1 THEN D-5
4 26 0- C-2*17*M).(6.52"M).i(E"ie)"K)»D
4278 C-ISTMC«.a05)*lflB)/lfle
428B CLS:PBISTa515,-THE COST OF PRINTING YOUR ENVELOPES WILL BE S';C
4 29 8 GOTO 9 36
*bii REM ••• BUSINESS CARD BOL'TINE •••
451B CLS
4S2B PRIST - BUSINESS CARDS "
4538 PRINT ' «E HAVE A WIDE SELECTION OF BUSINESS CARDS STARTING AT"
4548 PRINT " S 8.98 FOR 5BB"
4558 PRINT " OR $]B.9B FOR IBBB"
456B PRINT "oUR STANDARD LINE COSTS Si3.9B PER IBBB WITH THE ADDITIONAL"
4578 PRINT "CHARGES FOR THE FOLLOWING:"
4688 FOR X-l TO IBBBiNEXT X
4690 PRINT
4'BB PRINT " ART WORK CUTS 52. BD"
4718 PRINT ■ PHOTOGRAPHS IB.BB"
4728 PRINT " PRINTING ON BACK SIDE IB BB"
4738 PRINT " SCREENS PER SCREEN 5.BB"
4748 PRINT " BLEED-OFFS PER SIDE.. 5.BB-
475B PRINT ■ CLOSE REGISTRATION OF COLOR IB.BB"
4768 PRINT " CAMERA REDUCTIONS 4.5»-
477fl PRINT - VERTICAL LAYOL'T 2.88"
4775 FOR X-1 TO SgBe:NEXT X
4788 PBINTrPBIST "PLEASE ASK TO SEE OL'B SAMPLE BOOKS ABD ASK SOMEONE'
4798 PRINT ■ FOR ASSISTANCE."
48BB GOTO 938
5800 HEM **• CARBONLESS BUSINESS FORMS •••
5810 CLS
5B2B PRINT 'HOW MANY FINISHED SETS DO YOU NEED?"
5838 INPUT F
5048 PRINTrPRlNT "HOW KAKY PARTS TO THE FORK?"
5858 PRINT " 111 TWO PART FORM"
5868 PBINT ■ |2) THBEE PART FORM"
5B7B PRINT " |3) FOUR PART FORM"
5B8B PRINT " (4) FIVE PART FORM"
5B98 INPUT P: P-P*l
51B8 PRINT "DO YOf WA-IT PRINTING ON OWE SIDE OR TWO?"
511B PRINT ■ 11) ONE SIDE"
512B PRIST " (21 TWOBSIDES-
513B INPUT e:W-5»2
5148 PRINT:PRIST "WHAT IS ThE FINISHED SIZE OF THE FORM?'
515B PRINT ■ (1) 4 1/2x5 1/2"
5168 PRIST - (2) 5 1/2 X B 1/2"
5178 PRIST ■ 13) B 1/2 X 11 "
5188 PRINT * (t) OTHER..."
5198 INPUT D
5288 IF D-1 THEN E-4
521B IF D"2 THEN E-2
5228 IF D-3 THEN E-1
523B IF D-4 THEN 18BB
5248 N-1 tF*P)/E)/1808
5258 C-W+((PA'N)'S)*121.52»N)
5255 C-INTl tCt.BB5)":BB)/188
5268 CLS:PR1NTP515,"THE COST OF PRINTING YOUR CARBONLESS FORMS IS S";C
5278 GOTO 91B
program totals the amount based upon the
number of copies handled and prints them in
line 860.
Lines 830 through 920 display the total
breakdown for priming and binding, including
sales taxes. Line 880 adds 5 per cent sales tax
and should be altered depending upon your
state.
The routine for pricing envelopes follows the
same formal, while the business card routine
displays basic prices suggested by (specialty)
printing houses and suggests that the customer
review the business card sample book — a most
difficult task for a computer.
The routine that handles pricing for carbon-
less forms has been helpful in avoiding bidding
errors. Carbonless business forms vary from
two to five copies each. Thus, an order for 500
sets of a four-part form, really requires 2,000
impressions instead of 500. Often, the forms
are run two-up and later cut apart. This means
that the 500 sets of a four-pan form, run 8 '/: x
11 but then cut lo 5 '/j x 8'/;, only require 1,000
impressions. You can see how easily a job
might be over or under estimated.
The computer routine handles all factors and
has won us business when our competitors were
confused and erred in putting their bids to-
gether.
After gathering ah of the necessary informa-
tion, the real number of copies needed (N) is
determined by taking the total number of sets
needed (F in Line 5030) times the number of
parts to the form (P in Line 5090). Divide that
number according to whether one, two or four
forms will be run in the original (E in Lines
5200-5220) and convert it into thousands or a
fraction thereof in Line 5240.
Line 5250 determines the cost (C) as the cost
of the plate (W — adjusted in Line 5130 for one
side or two), plus the press run (PR) times N,
multiplied by the number of sides to be punted
(S). Then add the cost of the carbonless stock
times N, the number of copies,
Conclusioi
This program allows the computer hobbyist
to provide consuhant services to local printers.
While our own program has been greatly ex-
panded to add a wider variety of paper, this
program should be enough to get one started.
A word of caution; we have included a line in
our program that offers more competitive bids
on orders of more than 10,000 copies. The price
greatly decreases on large orders and the pro-
gram here cannot be competitive with large
commercial printers. The quick printer might
also want to bid under the computer price by
giving color stock at cost in order to secure the
winning bid.
How does it work in praaice?
One customer asked for 200 copies of a flyer
and quickly added that she really needed 225
but did not want to pay for 3(X). She was in-
formed that she could enter any number into
the TRS-80 and it would compute the price to
the nearest fraction of a penny. She ordered
and paid for 225 copies and said she was
pleased she did not have to pay for 300 copies,
"like I did down the street,"
To this same feature another businessman
replied, "Thai's un-American'. Our country
was founded on waste . . . having to buy more
than you need. You are supposed to encourage
them to move into a category where it will be to
their advantage to buy more than they actually
want."
Un-American? We don'i think so. It is a fair
pricing policy that gives us accuracy, reliability,
speed and a lot of happy customers. ■
24 • 80 Microcomputing, March 1980
TRS-80* OWNERS:
• Let the computer write your "Basic" programs for you!
• Draw pictures, animated figures, data forms!
• Create a library of displays!
• Produce "Commercial" grade software!
■Trademark of Radio Sfiacti. a TanOy Co
• *
Beginner *
* Home *
Animated programmer
• * *
Assembly ^
Language ^
prosramtner
^ Commercial ^ *
Software^ ^ ^
Houses
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 is available for any level 2, 16K or larger system with tape or
disk. An optional version is now available with output files for
assembly language programmers.
Be sure to pick out the system that fits your present needs and
order it today, so you can take immediate advantage of this unique
new product. You may upgrade your original copy by paying the
difference and a moderate service charge
THE BABY 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 16K Disk) $24.95
THE MAGIC CURSOR I additionaHy makes sophisticated Data
Entry anO 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 imptementthe 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 |ustify 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 Disks) $149.95
THE MAGIC CURSOR IV provides the features of Magic Cursor II
but has output files for the assembly language programmer. (32K
Disk only) $99.95
WRITE FOR OUR COMPLETE
SOFTWARE CATALOG!
ORDER FROM
Bigger Is Better.
Expandable storage. Greater Versatility.
The Vista Model ir Disk Expansion
system provides one, two or
ttiree drives, and adds
up to one-tialf million
bytes of storage.
You say you want more disk stor-
age, more programming versatil-
ity ... at a reasonable price. Say no
more. Our Vista Model II Disk Ex-
pansion System may be just the an-
swer for you. Choose from 1 , 2 or 3
drives, already mounted. Each ad-
ditional disk drive will add about
one-half million bytes of on-line
storage to your system. Buy only
what you need now. As your needs
grow, you can continue to expand
your capacity by adding another
drive. It's that simple.
But the best part we've saved for
last. The price. It's cheaper than
Radio Shack, yet our Model II will do
everything Radio Shack's expan-
sion system can do. The only differ-
ence is our Model II will keep on working long
after most others have stopped. That's why we are justifiably
proud of our products high reliability. And our 120-day warranty. Actually, it's
not hard to stand behind a product — that works — if you know what we mean.
'lAxJel II >s a regislered IrademarK ol Radio Shack, a Tandy Company
COMPARE OUR INTRODUCTORY LOW PRICES
1-drive Expansion System $1 ,000 3-drive Expansion System $2,100
2-drive Expansion System $1 ,550 Additional Drives Only $ 525
NO WAITING • IMMEDIATE DELIVERY.
P4AME
ADDRESS
CITY _^_____
PLEASE S ONE
O CHECK on fc»ONEY
ORDER
acREorr
CARD
DCOD
STATE
TELEPHONE
OPTWNAL
COMPANY AFFILIATION
TITLE - . .-.
PLEASE CHARGE PilY CRHXT CAR&
D MASTER CHARGE D BAM( AMERK^RD VISA
CARD NO
EXPIRATION DATE
PRINT EXACT NAME
OF CARD HOLDER „ _^
Item
Quantity
Pric*
INTENDED APPLICATION
SIGNATURE
Subtotal
CaM Ras add 6<x> sales Uk
Per- Unit Shipping and Handling
(SS.OO UPS - $7 50 UPS Blue]
Total
7M
CALL TOLL-FREE 800^54-8017
r'SS
Th« Vitta Computer Company 1401 Borchard Street • Santa Ana. California 92705*714/953-0523
26 • 80 Microcomputing, March 1980
More for Less
Speed. Capacity. Price.
The Vista V-80 mini disl( system
is 8 times faster ttian the
TRS-80, 23% more
storage capacity, and
costs oniy $395.
Compare our performance to
Radio Shacl<'s TRS-80'. Then
match our price with theirs. Then
decide which one is for you.
Features
• Vista offers 102K bytes to
Radio Shack's 89K. That's 13K
more bytes per drive for Vista.
• The V-80 operates at 12ms versus 40ms
for TRS-80. Our drive can operate at 5ms, but
only 50% of TRS-80 will operate at that speed;
therefore, Vista has purposely set the access time
at 12ms.
• Totally compatible with all available disk operating
systems.
• Upgraded system. Increased storage and speed
patch supplied at no charge by Vista.
• Drives are interchangeable for any location from
Drive 0— thru Drive 3.
• Immediate Delivery.
• 120 Day Warranty
Prices:
Single Drive System $395
Two Drive System $770
Four Drive System $1450
'TRS-BO IS a (eg«ieied uademark o< Radn Shach. a Tandy Company
TYPICAL CONnGURATION
UbM
S
i:
IF
n
I DQUBLt Of ^s<nr
I CONFiCUnATiOM
I (304K BVTCSI
^2
Vista Expansion {Module
The expansion Module provides a double density modification
to your current Radio Shack interface that allows you to format
diskettes in either single or double density In double density
format, your Vista Drive increases your storage capacity up to
204K bytes on a single 40-track drive.
To insure the highest performance possible, without com-
promise, we recommend that you use Wsta disk drives in con-
junction with our Expansion Module.* For a demonstration on
your system call TOLL-FREE 800-854-8017
Price $239.00 (includes all hardware and software)
'Vista cannot guarantee Radio Shack drives to operate 100% in double
density.
Th« Vltta Computer Company 1401 Borchard Street* Santa Ana. California 92705*714/953-0523
Single Density Conliguration (102K Bytes)
t^ Rtadwr Swic»—a»» pagm 147
80 Microcomputing, March 1980 • 27
BUSINESS
This program uses sophisticated financial
techniques to analyze possible investments.
Investment Analysis
Leslie E. Sparks
1014 Evergreen Dr.
Durham. N.C. 27712
A microcomputer can be a
powerful tool for analyzing
capital Investments. The follow-
ing program shows you how to
make your computer a tool that
is as sophisticated and reliable
for economic analysis as those
of any large companies.
Of course the computer can-
not make your decisions for you,
but It can provide you with Im-
portant information in just
minutes that will improve your
decisions.
The basic criterion for this
analysis program is Return on
Investment (ROl). Although ROI
is not the only factor to be con-
sidered In evaluating invest-
ments, ROI should strongly in-
fluence the final decision— es-
pecially if ROI is adjusted to In-
clude the value of money over
time and inflation. The Program
Listing does both.
Return on investment is the
ratio of your net average annual
cash flow to your total capital in>
vestment. Cash flow is your
after tax profit plus depre-
ciation. (Some authors define
ROI as the ratio of after tax prof-
It to total capital Investment.)
ROI, expressed as cash flow
divided by capital investment, is
Often called simple or engineer-
Program Listing
lb filH IfWESTDtHT fHftVSlS BV L L 9«KS
» ttn «intN ]H TK8« LML 11 fiftlC 27 PU, 13?5
J8 KM WTHia WW VOt Crt) LOCK fIT fl FHlJECT LIFE OF («)U1
« RBI 15 ff«6 fl LOW LIFE (f 15 VEfftS fH> 12 WWtMT/VEflR
5ft EEn ItfVIT •AfdifUi--
6» fDt [)=t)EF1iECifft£ Bf6E I, (*= FWJEH LIFE
7e RDI SV =$fL«M£ VPLUE
8« fi£H Ll=fKUn OF LOftL I^IHTEKST HITE 7.
» REH M.^.1FE (f LCM VEWS. tf-=MLKa OF PfMCNTS/VEWt
m (Cn [(=VEFH.y lifSU t. O^vefCLV OPERflTIMi CffiT (
116 f& Ik^esailTlOM RATE FOR liEVMC Z
128 ffK ItKSafiTlOH RftTE PER VEf* F(K ffttflTlHG COSTS 7.
138 KH TC=TfK CSOn FOR ItfffSTfCHT X(lKi !S DEFfaT)
146 li£H T^WMJINFL TFK RATE ^ i^. IS DEFHULT)
1» REH G =FMU1 W DEFLJ^TW (8:^ fISSllCD)
lee DIH M(3):REH tt 15 ft STRING FOR LFCELIHG KPfECMION tCTHDD
176 «<1)='5TFI1EHT Lltt DEMSCIHTION"
186 M(2)='SUM Cf VMS DIGITS DEHSCIflTlOH"
196 W(3)='DEttIHlWi BHiHtt CtPttCIflTlOH"
2» REM JT IS ft FLilG mCH IS =1 IF llWESTttMT TFK CREDIT IS HOT
210 REM TfKEN IN 7 VEH6 H UFIiNING IS mvm IF JT=1
229 REK TL IS T« TOLERfKE FOR TRIFL W WSJk SOLUTION SET FIT 6 861
23eTL4eei
246 t& —
256 DEFIHT J (£« [lEFIff fU J VWlfBiS RS IKTEEflS
'Mas
276 JI>4
286 JF^
296 n=e
386 REH JD fM> JF FOE FLHGES USED TO DETEJiflllC DQfSClRTlON FCTWt)
318 PRlMTWVtSTttHT flAVSlS FOR TRS »"
326 PRM'EMTER ItFOWtTlON flSKED FOR '
336 FWIfT'PfiESS <EMTEI& ffTER EflCH EHTRV'
348 FlilKT-aiifiENT VFLX IS SHOW IN O
358 PRIKTMF Vttl UFW TO USE VfLlE IN JUST PRESS <EMTER5'
3ee PKIKT'IF VOL! HPKI PM ERROR COHTIHUE EHTERlWi DfiTfl'
378 PRlHT-'rW Hia BE GIVEK T* OHWTLWITV TO COKCT DfilR"
388 PRIHT'GEFORE CaOlflTIEJE BEGIN"
396 mMT
486 REM SET Lf DEFIH.TS
416 G=8
426 TC=16
438T=5e
446 FRIKT'EHTER VEHIV REVENLE $ ■■.ft.')'.
456 itfLrr R
468 PRIHI "ENTER VEfKLY tftRflTlNG tOSTS » (",0.")',
476 I#MT Ci
488 PRIMt "EinEf- EStftll* RATE FOR ttVEHLf :■: (MR,")',
496 iffrn IR
588 reiNT'EMTER ESCJUITICH RATE F(ft COSTS X t",10,"l".
518 ItfUT 10
528 reiNT'EKTER DEF«[lfBi BfiSE $ r,D,'<-,
538 llfVl D
Me FKIWI'EHTER SH-Vfltt VftLt CSV,")',
558 i*in SV
566 IF SVX) PRlNT'SftVPff VFLUE > DEPtSClfCLE BRSE" ELSE G0T0598
576 IffLIT"i5 THlSCtMECT ';«
5E8 IF LfFTtiVJ.lj="M" GOTO 528
5* HiiHT'EMTER fttiJECT LIFE VEflRE. CH.")';
688 \aV\ H
616 PRINT'EHIER fUtlKT Cf LtHi * (";Ll/'>",
t28 imn LI
C8 IF L'>t> TrtH 6£6 ELSE PRlMT'LCfW > DEF«C1»IE BfiEE'
M« l(fLa"lS THIS CtHlCT ",«
658 IF L£FT»(V4,l>-"r TICN KS ELSE GOTO 628
668 PftlHl'EKTER MUL IHTEREST RATE X ',",1,')";
678 INPUT 1
m ii£H ciECK TO SEE IF 1 IS ::
698 IF 1>, W9SI9 T«N 728
788 PRIHT'IITTRESI RATE SHOaD BE r
718 GOTO m
726 mm "EHTER LIFE Cf LOW IN 'ilfRS CH.')',
738 IlfUl H
746 IF ll(=« T«H GOTOTW
756 PRIKT'TH PROJECT LIFE IS LESS THFft T* LIFE (f LOftf
768 llftn' JSTHISOHiCT ";«
26 • 80 Microcomputing, March 1980
At Last! Affordable
WORD PROCESSING
Made Possible by TRS-80"
NEWSCRIPSIT"-
Word Processing
Software for 16k
Level II THS-80S.
*69'* Cassette-
*99" Disk-
[lEWUPPER
AND LOWER
CASE KIT.
Available tor
rww or exist-
ing systems.
*99 Instaiied-
EDIT, DELETE, MODIFY—
then print it error-free, 45
characters per second!
flEW^TRS-SO DAISY
WHEEL PRINTER.
Clean and readable
printing, like the very
finest electric type-
writes.
•2999'
RADIO SHACK BRINGS
YOU A COMPLETE WORD
PROCESSING SYSTEM FOR
TRS-80 MODEL I COMPUTERS.
Radio Shack smashes another
computer 'cost barrier" with the
new TRS-80 Word Processing
System. The system includes our
new SCRIPSIT software, Upper/
Lower Case Kit and Daisy Wheel
Printer. Add it to any 16K Level II
TRS-80, or buy a complete sys-
tem. Once you've tried it, you may
never want to use a typewriter
again!
The new SCRIPSIT software
lets you compose letters and doc-
uments of all types on TRS-80's
screen in upper case, or upper
and lower case with the new Up-
per/Lower Case Kit. You can
move words or entire paragraphs,
insert, delete and edit to your
heart's content! SCRIPSIT gives
you automatic page numbers,
page headings and footnotes and
makes It easy to indent para-
graphs, change line widths, and
center your text horizontally or
vertically. Advanced features in-
clude justification, hyphenation,
global search/replace, and vari-
able screen width. On-going re-
ports, form letters and text with
print commands can be stored on
TRS-80 cassettes or diskettes for
use or revision at any time.
SCRIPSIT software Includes an audio
cassette course ttiat makes anyone a
proficient word processing operator.
PRINT ALL OF THE
"ORIGINALS" YOU NEED,
FAST AND ERROR-FREE!
Our new WP-50 Daisy Wheel
Printer Is fast and gives you the
same quality of the finest electric
typewriters — carbon film ribbon
and all! Or, if your job doesn't
require "letter" quality, a TRS-80
system with a dot matrix, u/lc
printer costs even less.
A complete TRS-80 cassette
system with Word Processing
Software, Upper/Lower Case Kit
and a dot matrix printer is yours for
just $2,046.95* Or choose a realty
deluxe system with the WP-50
Printer and two floppy disks that
store eight hours of 50 WPM typ-
ing for only $5,492.95?
Sound exciting? You bet it is!
Visit your nearest Radio Shack
outlet or write for details.
*Rel3>i [xices may vary al individual Stores and dealers
Mail to: Radio Shack. Dept. CMA-450
1300 One Tandy Center
Foil Worth, Texas 76102
I'd Like to Know More!
r SerKi details on TRS-BO Word Processing
and the 24-page TRS-BO Catalog #RSC-3.
D Have e representative contact me.
NAME
Radio /hack
The bluest name in little computers-
A DIVISION OF TANDY CORPORATION - FORT WORTH, TEXAS 76102
^5
ADDRESS
CITY
STATE
ZIP
) Own/Use a TRS-80 G YIm G No
Model
»/'Aaad*rS«(VfC*— s««paya 147
SO Microcomputing, March 1980 • 29
Subroutina Loan Payment
Age =
Sum =0
Amt = Loan
Npay = life-Npayyr
tnfale = lnyr^NDayyf
Val = (lnfate + 1.011 (Npay)
Pay = (1nrale ■ Val .LoanV(Val- 1.0)
Do while Age<Lile
InpatO = Inrale ■ Ami
PiipaiO = Pay - Inpaid
Amt = Amt - Pripaid
Sum = Sum + Pripaid
Age = Age + 1
End do
it Sum - Amt * Then Last Pay = Pay + Sum Endif
End subp'ogtam
Figure 1. Algorithm for calculating loan payment.
ing ROI. Its virtue is that it is sim-
ple to calculate. Its major de-
ficiency is that simple ROI does
not consider the timing of the
cash flow. Thus, the simple ROI
is the same for an investment
that yields a cash flow of $100 a
year for ten years and a second
investment with zero cash flow
for nine years and $1000 for the
tenth year.
I'm sure you'll agree that the
first of these two cash flows is
better than the second, because
of the value of money over time.
A dollar today can be invested
and earn interest. Thus, a dollar
today will be worth $1.10 next
year if we invest it at 10 percent
interest. For this reason, a dollar
today is worth more than a dol-
lar next year. (Time value of
money should not be confused
with inflation. Even with zero in-
flation, a dollar today is worth
more than a dollar next year be-
cause we could invest today's
dollar and earn interest.)
To account for the time value
of money, we must reduce, i.e.
discount, the value of future
year dollars by the amount that
this year's dollars could earn.
For example, if we can earn 10
percent interest today, that dol-
lar will be worth $1.10 in one
year. Thus, it takes a cash flow
of $1.10 next year to equal a
cash flow of $1.00 this year.
The investment figure that re-
flects the time value of money is
called Discount Cash Flow Re-
turn On Investment (DSCF ROI).
It can also be called interest rate
of return, profitability index and
investors' method. Essentially.
DSCF ROI is the interest rate
that reduces all future cash flow
so that their sum equals your
capital investment.
The DSCF ROI can change
the rank of your possible invest-
776 IF LEFT$(«,1'="V TttN ?W
7» MHO 5»
7% PRIHT'EHIER HLWtR OF LCW PfffltHTS PER VE« (MP;')';
{i88 llPtn IP
eie reiKTEKTER IHVESTKNl Tf« CSEDIT fiWE kW. RSaitDXMCi")';
B» ItfUT TC
8i8 IF TOl T*N Kfi
848 PRlHT'lNVtSinEHT TfiX CttDlT RATE SrtU.ll EE IN r
«6 rtflMTEtfTtt IHCM TFK ftfilE V. (SK teaiCO) (M,*)',
67ft 1*1.IT 1
m IF r ^1 T>€M 9i»
3» FlflKTlHCaC TfK ftftTE 5H0LLD Et IH •/.•
^ GCiTO 86«
9ie PRIKT'EHIER Of UtFLftTCR ',; C6K fSSUMED)'it ■)';
?28 Ilf1.1T (.
5ij* IF G)=l T*H %(i
=»4e mu^ ■(»■ deflhtor swac ge ih ;;■
95*1 GOTO ?10
««REn
^Tfl f£H EX) Of ItrUT HOU mNT IT fW SH IF CK
•m FKIHI'TtC itf1.IT DftTfl m. *6 FXLCMS"
l«e fKIHTVEfdV RtVEHUE »',(!
1W6 FVllfT'WRV OftRfiTlHO CiJST& CO
IKe FKIKT'ESOLRTION WTE F« REVEHit 'ASlT
1936 reiHT'ESCPLBTlW RATE FOR COSTS MC'li"
IWe PRIKT'DEPttClFaE EflSE IM)
i05e reiHT'PMUECT LIFE MfVEHS*
IWe PRIKT-WOKT Cf LCW I'.Ll
H?7e F*IKTfHMl INTEREST RftTE M,"/'
ie» FIclHT'LlFE [f LOf« MC'VOIRS'
ie» F*1HT'NIIRR Cf PfffltKTS/WR ',»'
11« MdKTTW CKEUIT WTE MC,"X"
llie FtlHT'IlCaC TfiX WITE ',T,'r
U2fi FKIHT'W KFLflT* VG,-^'
11]« lIPtn'flK T>CSE CaSfCT 'i^S « HO VV^
1148 IF LEFTICrt.lX^'N- THEN 1176
IIM WllHT'EHTER IHCtftffCT WTR FUSS <ElfTER> IF VFLUE IN IS W
lite Olio 2-46
1176 BEH ffX. F» (CTKC Cf IfPSEClftTiCH
IIW Q_S
11» Jlf=«i
12W JF=6
I2ie iN=:
1226 PftlHTVU,! llfiS' SELECT [« Cf T» FILWIHG WTHODS Cf t€PREClflTlQH C*'
i2:<e F1<1MT".W CfU HfiVE T* CtmiTER CaaLflTE T* fUUVSlS FCR ftL T*EE'
1240 PftlNT'Cf m FXLQHIHG ItTHCfS Cf DEFffClflTUW'
12W PftlNT'l STRfilCHT LI* 2 SLH Cf VEfftS IMGITS'
12b« FIclNT*: ItaiHIHG fiUffCE "
1276 FVlNTTCt SELECT fl *T*(> Cf CflLCllftTlW DEFttClflTIOH'
CHEAP BOOKKEEPER
A GENERAL LEDGER SYSTEM
See to Believe
Sold by Sturdivant and Dunn, Inc. for Radio Shack TRS-80'
Model I Level II 32 or 48 K systems with 2 drives and at least
an 80 character per line printer.
Send Si. 00 for information and sample printouts (14 pages)
to Sturdivant and Dunn, Inc., Box 277, Conway, NH 03818.
^92 Price is S175.00.
■ TRS-80 is a Trademark of Radio Shack. ^ Division of Tandy corporation.
Subscribe to
microcomputing
fill out the
postage paid
reply card
on page 147
30 * 00 Microcomputing, March 1980
Scanned by Ira Goldklang wwwtis 80 com
Subroutlfia Dacltnlng Balanc« Dapradatlon
Age=0
Hate=2/Lif«
Sum=0
BookValue - Cost
AnOep =
AcumDep=0
Do while Age<Liffl
Age = Age + 1
AnDep = BookValue • Rate
II BookValue - AnDep<Salvage
then AcumDep ~ AcumDep + AnDeo
BookValue = BookValue - AnDep
Else AnDep = BookValue - Salvage
BookValue = Salvage
H Age » Life then exit End il
Endil
End do
End Subcoutlna
SubroutlM Straight LIna DapraciaUon
Aoo=0
Value = Cost - Salvage
AcumOep =
Do while Age<Lite
AnOep = Value/Lite
AcufnDep = AcumDep + AnDep
Age = Age + 1
End do
End subroutine
Subroutlna Sum ol Years Dlgtla
Agez'O
Value = Cosl - Salvage
AnDep =
AcumDep =
ND = Li(e>(Lite +1^2
Do while Age<Ute
AnDep =|(Lile - AgeVND)-Val
AcumDep = AcumDep + AnDep
Age = Age + 1
End do
End subroutine
Figure 2. Algorithms tor depreciation
ments from the one obtained us-
ing simple ROI. However, the
major disadvantage of DSCF
ROI is that trial and error is the
only way to calculate it.
Before going further, I would
like to define some terms so that
we're all talking the same
language.
Inflation is the rise in the
average level of all prices.
Escalation is the rise In the
price of a sirygle commodity or
service. Some commodities may
escalate without inflation.
Escalation rates vary from com-
modity to commodity and from
service to service.
Current year dollars are those
received in a specific year. The
current year dollars for any two
years may or may not have the
same purchasing power. Cur-
rent year dollars are a "rubber"
ruler that cannot t>e used as an
absolute measure of cash flow
in different years.
Conilant dollars are current
year dollars referenced accord-
ing to their purchasing power to
some base year. The base year
used in the Program Listing is
year zero of the investment.
Constant dollars are the ab-
solute ruler for measuring cash
flow in different years. Constant
dollars are calculated by dis-
counting current year dollars by
the inflation rate back to the
base year. (Discounting current
year dollars to account for In-
flation should not be confused
with discounting future year
1^ HMtfw Strvlct—it pagt 14T
cash flow to account for the
time value of money.)
We all know that inflation
constantly reduces the value of
the dollar. Inflation also has a
major Impact on the profitability
of investments. Yet, generally.
Inflation is not considered in In-
vestment analysis.
To evaluate a potential invest-
ment we should escalate the
revenues and operating costs,
calculate current year cash
flow, discount the inflation rate
of current year cash flow and
then calculate the DSCF ROI
from the constant dollar cash
flow.
SubroutlM Caah Row
rear =
Taxcredll= 0.1-Depbase
Taxioss =
Do while YeaKLife
Revenue = Revenue'(i -»- Revescalalion]
Cost = Cost •(! + Costescaiation)
Grossprofit = Revenue - Cost - Interest - Dep
II Grossprofit >0 then
Grossprofit = Qrossprofll - Taxioss
If GrossprollOO then
Tax z TaxRale* Grossprofit
Tax = Tax - TaxCredit
II Tax>0 then TaxCredllaO
Else Tax =
TaxCradit = - Tax
Endil
Else Tax =0
Taxioss z - Qrossprolit
End if
Else Tax =0
Taxioss = Taxioss ~ Grossprofit
End if
Cashflow = Grossprofit + Dep
Year = Year + 1
End do
End Subroutine
Figure 3. Cash Flow Subroutine.
When this is done, we can
compare the DSCF ROI for
various investment possibil-
ities.
The Program
Now that we have established
the criteria, let's build an
analysis program. Our program
should calculate simple ROI,
DSCF ROI in current year dollars
and DSCF ROI in constant dol-
lars. What our program must do:
1. Read in data.
2. Check data for correctness.
3. Calculate payment schedule
for outstanding loans.
4. Calculate yearly depreciation.
5. Calculate revenue for each
year, including escalation.
6. Calculate yearly operating
costs including escalation.
7. Calculate yearly t]efore tax
profit.
6. Calculate income tax due.
9. Subtract tax credit if any.
10. Calculate after tax income.
11. Calculate current year dollar
cash flow.
12. Calculate constant dollar
cash flow.
13. Calculate simple ROI using
current year dollars.
1260 PRlHT-EHTEIt THE lUKfi CF T« KTWO Vai UFNT
FHSS CEHTER) IF VW HWT M COfUTHft TO CfLCllftTE fU 3"
i2» iifvn Ji)
13W IF J[»3 ^\B^ FVIMT' FVEFEE VOU EHTESED FM IHCWHCt UKER' .'Ml bCiTO ll'3e
1316 IF JtKA TICH ff=l ELSE JI>=1
13» fO FlfST DIICNSIW WKFlVS
\m (Bl Cf<1)=Cf6H FLU f(Jk ITH VEFft,b<l>=tiEF1i£ClFIT10N FOR ITH VEFK
13« REH R(I)=«WHUE FOR ITH VE« 0<I)=OPERRTlWi COST FOR ITH VS
1356 REFt 1PCI)=IHTEI5ST mb FOR ITH VEFfc TP(l)=TfK FftlD F« ITH ¥R
li£e REn TC(l)=Tn£S PFIID 1H IT>I VEFCtiKD'KFQRE.TFK PRtflT
1378 REM P1(n»fFTER TPK PROFITS FOR ITH VE«
12» l£H RO IS T>C SINFIE ROl.fd IS DlSCtUnED (flSH FLOW RDI HOT CtCRECTEE) FW IITLRTIDN
iim REH R2 IS Tl€ DSCT R[il CtUSCTED FOR ItfUlTION
1466 IF J(i=l Tl€N 1438
1416 DIR CF(H+1, 3). IKIHl, 3). R<IH1), 0<IM). IPCIHl), TC(H*1, 3). P(lHi, 3). PICH*1, 3>. lll(**t(P*l),R0(3). 1(1(3). 12(3), JTC3)
149 fiSt NOM EMORIZE LOW
1436 05
1446 PRlHfPIIftSE WIT IT HILL THE 1 TO 2 HIHJTES FCfi (aaUlTIONS'
14» f& 11 IS IHTESEST RATE PER HDHTH 1/W
i4«e ll>I/tP/ie6.66e rem this is KMHiV IHTEICS1
i478v><iitifleee){<iP<M.)
14tt P-I1«W.1/CV-1 )
1496 R£ll NOW CaCULRTE PfMCKT SOCUU
1506 S=«
1S16S1>«
15MIC>1
1S8S^6
lS46fHl
15M Jl<
80 Microcomputing. March 1960 • 31
for the TRS-60 from Micro- Mega
C*— cm COWTWOL UWTT
■ TiiMiTii)! ytmretttrlM tip* hinOi-trg • Ptnpomi co^rtm •ocMiiom on Imm wtrti tn mu^itit mo'iiio' •
G«( (HOfclton liotrt 'econt'i^t too filtjtuct gMcf'»t 'ttulttrtg Irom grouna Idodi • Elimmaf 11— Ictfiovt
piugg'fig ft^d vnglu^ing ol ircoixJti cttufs-
Tne Uicio-lilayM C«is«frt Coniiol Unil does til Ifi-i ana morm You gtr mi tinr
manull conliol ol tne •tQora*' SI fi* llick ol t swilcn. Wtnl to linB "\t
tfginfi'fj ortnO of i p'Ofi'iTi' Flick maimer tnticn ana you'll ntar :i All
Clbltl rtmtm plun»<t >i til Iht limt
rn« U-cio-Ut^ C<iutt« Control iJnii Docs ( loi !o imo'ori Itie tppttr
anci ol your TRStO iytltn loo. *s Ihown. ils m t 2''i"i 5' bet mhitn
muggHt Oel w t m the ktyooaia ana your recoroa' Tnera ii no nen] to
moit lire recordti. tnH all cables come neally 'nio Ihe unti tbe C«iJ»tte
Conliol Unii iS la'loieO lo iha CTR-41 lecorOei. but may be uieo «"tn moit
otbef recorders at v/ell.
CASSETTE COHT'OL UNIT
Add tl 00 foi poilage and rtanOling
tSTlC
CPUMOMrmn
E** Itna fourtell wilhtbitnk screen -onaenng wbalyoui comoulant up to' The ktrcroMegt CPU Monitor
can leli you. iQi etampi: • It youi CPU is 'n t loop wilh no em, • Mbtn a long son is neaiifig comple'ion.
Of • II t key bounces tlu"ng keyboard mpul- The CPU hlonilor lels you listen to all CS*V6s and CLOAOs
and will helD you quickly Una tna correct lecoider volume setting ll you bate an etpaniion inlerlace, you
will always »no" wbelher trie realtime clock tt on or oil because you can hear it
Th* micro-Mega CPU Monitor girei e lo-ce to tn» Z-SO microprocessor in
tour THS-ao by uiing AM radio circuitry lo e-ck up tbe compularianai
rityinms ol ihe CPU. wnic'] are ampiiUed and piered ifirougii a loudipeakei
Tire pKkup unit ol t/w CPU Uoniior, mown at leit m Ihe pnoto, goes under
your TPS-X) keyboard It la connacled by a X" cable to tn« speaker and
control unii. which includes an on/oil tolume conlral and an LED "pofier-
on'indictloi. The Moniior is powered by an AC adapter, shown at right in
the oBoto No balleries are needed and no electrical connections to tour
TnStO art reouirtd
By listening to Ihe CPU Monitor, you will soon btcome famihai wilh ine persontiitiei' ol Iheprogrems you
run and wbelher ihei are eieculing in a normal way A artmatic use ol tbe CPU Monitor is m tbe greet
enhancemtrxl wbich it oiovides lor ccmputei games ISee Gaming Entironmeni Delow /
CPU MONITOR - - M'M
Aad t! 00 lor poslage and handUnq
THE QMIW-aCHEEN
The aye pleasing Green-Screen liisayerlht C^T ol your TRStO Video Display and gives you imprortd con
irasi "itn reduced giaie You gti brignt. luminous green chartciers and graphics like those leaturedby try
eipentim CPT unils
Tbe GreenScreen it closely matched to ihe color ana leiture ol tn* TPS-W
Video Display and impiores tbe overall appearance ol your tyslem li is at-
tached with adbeiirt strips, wbich do nal mar your display unil in any way
The Micro Mega GreenScreen gives imp'ovea video display visibility lor all
eppliceiions end is especially elletlive in creating dramalic. high impact
displays tor computer games iSee Gaming Envronmem priow i
ttTU
THEaneEN scPEEn •■
Add ft 00 lor postage and handling
TW ULTIMATE STAfl TWEK PACKAGE
Tiieael trivial compulei games'' This complete Slar Trek package wiUoioviae you wilh endless lascinalion
and challertge In addition lo Ihe program cesteiie. it includes comprehensive instiuclions. a oad ol
Voyto* Log' rtcofd siteeis. eitd a Iree-stendmg Torpedo and Uaneuvtnng Chan
Tne oacage 'S bw" a'ovnd '"* lalesi *e'^ion o' unce Mjc*iu'S "tcc"
parebir Slai 'lek in a 13 000 Bile orcgiam <nii i "os! o' suoi't ana imag-
inalire leatures. wHich mcii/de numt'ous dynamic and spectacular graphic
- /
disolays Slar Trek III puis you in command ol Ibe Enterprise cruising me . /"
galatf ol 192 Quadrants liHed wilh uncharted haiards. including hostile
Klmgont. pulsars, and black holes You have at your disposal scanners,
various weapons and detense systems, onboard computers, and a loyal
crew lYou will need tbem all to survive ihe Kiingans i
Your mission is to rid the region ot Kiingons ana ro locale 'ive inhabitable planets, all within 300 starOays.
belore returning to Sin fieei Heaoouarters where your overall elleciiveness es a staiship commander will
be scored High scores are possible only with carelul planning ano eltectivt battle ticticj r/w "Voyage
Log' sheets will guide your siiategy. and the Toipedo tna Maneuvering Chan will give you a vital edge m
combat IWhtn you engage ihree Kiingon ships you can r ellora lo miss i
STAH TREK PACKAGE Hor level II. tSK only) J22 X
Add tl 00 lor postage and ntnaling
CREATE YOUR OWN SPECTACULAR
OAMWiG EMVIROMMEHT [and mv» tS.OO]
Vie tnierprite is m battle tr,m with detitctor shieias et lull power As her capiem. you ere taking bet into
combat Thebattietlaiiant men rings m your ears and COHOITION PED" Itasneson your monitor screen
You celt tor wtrp drive ana key in Ihe cooramalts ol thequedrtnt wbtie your scennett naveOettclta Kling-
01 tbips As you select Ihe warp lector, you hear the retsauring clicking ol your ntvigalionel gear as It ae-
livates Ibt warp arive.
Suaaeniy you break out at hyoerspace end your momror OiipMyi ine citiiimg iifhi ol tbree Kimfon tallie
Cruisers lloatmgon you' screen! Their evil shepas glowm luminous green against the black vorOol saece
Moments later, you beer the chatactensnc respmg sound ol Xlinutm laser weapons, ana. es you watch,
high-energy beams come kniting lowarts the Entetprise in succession Irom each ol Ihe Kimgon ships
You have been hit' You beet the aismal sound ol the damage control alarm as "DAMAGE TO WARPDRIVB"
ana 'DAMAGE TO PHASEPS'llash on your screen The Klmgons hevt stopped liringi The Enterprise Is
cripplea. but your best weeppn is still mteci. end it's your turn /lo*' Vou key in tn» command lor photon
torpedoes As your screen agein displais Ihe position ol the Klingon ships, you select a llring vector Irom
your lorpedo chart and key It in How you hear tbe buzz ol your photon torpedo as you see it speeding lowani
a Khngon ship II strikes bim aeadctniei' As you wttch. tft» Klinoon Bati'eCruisi'disinttgretts. accompa-
nied by a salislying crackling jounO
Does Ihe iocve scens"o iOi^na'^' le'rhed'^ Not atari 'I s a smal' sar^o'e of wn^r you *!'■ tioe"encr *irii
Wicro Urga s Giming Er^tironmeni j,h.cn cons ill 0' • Trie STtP TPEK "aCHAGf • 7he anlEU
SCPECfi ana • IheCPU lilOHITOP Inelasi gai^ra nnO dirnmm acuo" leliecn Ihe superc Siai Trrk in pro
gram together wiir\ ihe ' voyage Log ma Toipedo Chj'l ol Ihe Sur Trek PACkage An ol Ihe uriaur
graphic displays are greatly ernancra ty the Giren Scren fmaiiy the uncanny snuia •■Heels jm pro
Ouced By Ihe CPU t/oniio' vhich linnluliy oicf, uc Ihe I OP NEH 'oops and oiner CPU oaile'is "hich
crtiie ii-r aisiK-ci'ie i.rer sounas tnn accomoar, ihe *LlPT and DAMAGE -"sssdgn j'cng •rf: ■'■p
nafshri r^crei 0' i"e Meaooi^m'wo^ Once ,ot, ^e tr^eoit rou van r an, 'ongei br iai'snrd vrh snrm coiri
pule' games
q»mfmOf' tha; n.ii I"! Gdm.ng Cn.iionmeri yoi. also g«l *" ot 'he othei eicf'ifrp tear
Moniioi ana Iht G'Cfn Screen lor non gaming ipglications fou also Save tb CO oil the a
the individual Hems
GAMING EHVIPOHUENT
Aaa J3 iO lor ooiijge sfO hAnaimg
es ol Ihe CPU
nbinea cost ol
Terms: Check or money order, no CODS or credit cards, please. Add amount
stiown lor postage ana tianrStintj to price ol tht item All items shipped within 48
hours by ItrsI Class or priority mail. Virginia residmnts. aOO 4Vi sales lax.
Micro-Mega ■ P^. Box BS65 • Ar«neFton,V^ SSS06
R£H IKTEREST TO ICfftST COn
1566K?=M.*tP
1570 IP(Jl)=e
1568 J2=l
159e 12= lHKU*ft*188)/l«)
16M lH(fG)=l2
1618 PP=P-I2
1629 1P(J1)=1PU1)*12
1638S=S+ff
164eft=fr-Pf
16S« IF HJ<H2 QOTO 1738
lea IF J2=12 T}€H GOTO 17«
ie?e c=tc+i
16S8 J2=J2+1
1696 G0T015W
17W J1=J1*1
ITie tc=tc*i
1720 GCnO 157ft
17?e REH F1N1S*D
i7« REM vat [tPKClflTE 1* IfNESlUNT
i7» REH PRCCfifH HILL EIMR CH-CaRTE DEPttClfniOH ON
176(1 RD1 USER SffCIFlEU ?tTHCC (Si FCft
1778 (tH STWiGHT LlttSlW Cf VEH6 [HGITS-IttLlHlHt EafiHCE
176« REM FH) DOJeiE DEaiNING m.mi.
179e REM J[t IS FLftG F» HETHOO Of t€P1?ECIHTlC«
ISee REH JI>=1 STBfilGHT Llt£,J[»=2 5UM OF VEPRS [)161TS
im REH J[>=3 KaiHIHG wlfmce
182e[H=t>-SV
1636 REH Ueo; TO SE IF USft Hft. SFtClFlED rtTHOO
1849 IF JF=6 TICH J[)=l ELSE JK=1
18» OH JD GOTO 1868 ;lS>4e ,2039
1&» (®1 DeFWtlftTlCW FC« STfifllCHT LI« .ll>=i
ie7« Ft*: .16=1 TO H
It* [)(Je,Jl»=W/H
im so=siHi>(.ie,j[)>
19TO NEXT a
1519 IF Jf09 THtK 217&
1929 }{*=)lf*i
i9;t« anoi»tt
15*49 REM an If VEFftS DIOIT;' [tEFtttlFiTlOH
1959 *=«*(H+i;V2
\3i-tf m .It^lTW
1?79 KJb,JD)=UH-<Jf.-l'i/H)^««
IS* 2Z=;MJ(J6..l[i)
15M ftXT Jt.
2t«i IF JF(>e TttN 2178
2919 JD=JlHl
'sm Gcno 1K*»
2938 REn HOU UlCtUTE ICUIHING WLFNCE
2948 Rl=2/N
2«* VM>
mHi H^h REM St! iS THE flCtlMllRTEt' PEMt IBTIW
>*i7*i Fi:(:lt.=nC«
2«* ['I '■t- .l["=EV«il
2«¥ iF BV'-[)<Jt"...l[":SV Tt€H A'm ELSE I" If., .1l'-'=W-?i'
2190 f-tsv
2118 SI)=SlHD(.16,JD-'
2129 GOTO 21f*
2138 m^-])(M.M"
2149 IF BV<= SV T>tN EV=5V
2158 Sl>=g>+i>CJ6. ib)
21«i f£XTJ6
2179 REH DCFttClftTlW CfLOlfiTlONB f«£ ttifVETE
21£e IF .ff=« TrtH JH=1 aSE JH=1
2196 REM WH CaOUiTt TfWS PROFITS FH> U6H FLOW
229« 1R=IR/I9e
2219 Tt'TC,'19e
2229 T=T/189
223« ICfelClSw
2248 F«J1=.1[) TO JH
22M TL=9
2268 Ty=TC*0
2278 FtS J2=lTt«
22W R(J2)=ft*a*lR>U2
2296 0(J2)=(t*(l*IR)[J2
23«e P(J2,Jl)=R(J2)-0(J2)-lPU2)-t)tJ2,.il.)
2316 m Htt) IH ItnfilNlHG SfLVfItt VftL€ IF WaJHIHG BftfWI
229 REN [€F«EClflTIOH LIStD FH) IF DEFWCIHTED K« VFllE IS
2336 fiffl GKriTER THfH SftV«£ VFtLt fH> IF THIS IS LFIST W
23.49 IF J2=Nl*MP(J2,3?=f(J2.:<>+ev-SV
32 • 80 Microcomputing, March 1980
225e IF PJ2,J1K=« K(J2,J1)=«
25« IF P(J2,J1K=* TL=TL-PlJ2.Jl' miOffilti
2276 (£=f<J2,Jl>-U
2:<» IF G2<e Tl=-&? T[(J2, Jl'=« «lTCG5ie
24» Rffl WfTPK PW11FT =PttTf« hW 11 - TPDIOSS C»RV FMMD
2416 iL=«
24S TC(J1'..11-T*G2
2438 RCT Tftt IHVESMHT TF« CMDIT
2446 REM OtCJi TO 5EE IF IfftESTWHI Tfft OSIHT TPKDI BtFCftE
24«« ROl WKK Cf ■I'i.m- WEEDS 7
IF .I2>7 FW T)0« IrtH JTi.Il>=l
T((J2.Jl'=TCi.J2.Jl.>-TX
IF i['j:.n':« tx=«
IF TCkJI.-'lKei ;x=-TC(J2-Jl'
IF TaJ2. .11X61 Tt:(J2,Jl)=e
f1'.12-Jl)--PJ2,Jl)-TCtJ2,Jl>
CF':J1..i1'=PT(.12,J1)+0(J2.J1)
24^
247B
24W
2496
25W
2'jie
»i8 *X1.I2
25*6 (CX1.ll
2^MTL= »1
25(d REH HQU [rLCiXHTE SltflE K'l
2576 FOR .i:~.iMOJH
j59e F« .11=11*
2t«l H:"j;"=«<>.J2'n"t> 11, 12'
2618 «X1 Jl
2t26 WiJ2)=Wni:'i.'W"
2636 ffXT J2
2648 REH HCH CUDJlftTE WtF ROl 1H1S 1^
265* FCR J2=.11H0-1N
26te L=-l
2e.78 t^ 2
2b8e S=«
2696 Rl<.l2i=(HtL>/2
2786 F» J1=1T0«
2716 &=s+{roi,J2)«<nw4j:'-'>[-.ii wh [usaxm f«i«
2728 NEXT Jl
2738 ER=^S*[»/T)
2746 IF fK(ER)(=1L T«H 2786
27^ IF ftiS'.H-LK ttft MN FV.lKI'FftlLED ICi CtM.tR(£ ' (DTCeTee
27£8 IF [R^DCH L=R102' ELS »=fa(J2'
2778 GOTO 'A»
2768 ttXI J2
2796 REH MB) Ca.CllflTE WXF ROI ftCtOiniW, Ft* HfUfTlW
2986CFG/ie8
2618 FC(( J2=J[)10JN
TpiFL w Emt' [fitiinnw
L=-l
H=2
S=8
R2CJ2)=CH+L.V2
FW J1=1TW
tiC=CF(]l.J2>*(l*Gil-.ll (Of llSOUn Cfl£M FLOW FOft IWLftTIW
S=S+K*<1*R2U2)H-J1
ItXTJl
IF feS(ER)<=TL ItCH 2Si«l
IF EIt>« TI€M L=R2(.12) ELSE tt=R2(.12'
IF fBS(IH)CeW 1>€N FVim- FftlLEU 10 CaMHi ' 00102958
GOTO 2648
2328
2636
2848
2856
2668
2676
S86
2896
2988
2918
2926
2938
2946
2956«XTJ2
2968 REH WU mH\ 11 OUT
2976 ttH FIRST PV1K1 tUI VFR10U5 «ll
29»as
29» F«Ji=n)Taw
3868 Hilin'SlfflE ROl Ftft VWCJl),'
3818 PKIKI USING 'H H'£\m.}l)*i.9»
XSl IF J1(J1>=1 MK PRIMI'MPWIHG
2838 NEXI ,11
3W8 F»Jl=.lli10JN
3856 FKIKI'bSff ROl FCfi 'MkJii,' :
Hm PWWI USlHt "H.MKVRlOlMe*
smifx\ }\
::8e6 F» Jl^JDTOJN
3096 PRIHT USIH&1«r fctH UStaiKTEIi FOR H Wi IlfLflllOH ',G^e6
3186 FWKl'Ff*; "fttOD ■
3116 PRINT IfilKi" B HT.FS' Jl>*188
3126 tCXTJl
3138 Itfyi'FWSS (EHTEIO 10 SEE DtTfllLS '.12
• R»atl»f S»rvica—so« page 147
1FK CSE611 W1 TFKEN IN 7 VEFfiS*
This Weekend:
STIK
IT....
••to your
Tftafi riohit Esmarks VIDIET-STIK ligfit pen has the TBS-eO CONNECTION
lor LEVEL I & II Your 4K lo 4BK TRS-flO System will come •live under your
VIDIET-STIK witfiin mmutes ol Its arrival That s because tnere are no wires 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-pack CLOAD our custom LIGHT-
WAVE demonstration software and RUN And because the interlace has a
plug lor your recorder, you won i have lo unplug it again when loading your
other software tapes The interlace allows them lo pass 'ight thru whenever
you re not using the pen II s e«clusive switched tip' design means the pen s
electrically isolated from your system when it s not m use JuSt point & press'
It's thai simple Pliig. CLOAD and RUN And r^ave we got Ifie software lor you
lo RUN wilh> Our demonslralion tape includesa calibration program |used to
adjust the CRT's bngniness and conlrasl) plus STIK-TAC-TOE, AWARI and
TOWERS Two challanging games and a puzzle thai will keep grownups and
children Stik'ing it lo your TRS-80 tor hours And there are instructions
provided so you can begin writing your own light pen programs (lightware)
lor fun or profit ILevel II) Or. |ust sit back andenioy our LIGHT- WAVE tapes
each month Esmarks unmatched commitment lolightwarecan bring you up
to five new games, puzzles, dnlls&educalional quizes or simulations each
month Our current LIGHT-WAVE releases are
T
R
S
I
8
O
LIGHT-PAK2 — LIGHTPEG (4peg-|umppui7fes)
ENDRUN lOitieiio with a iwtst I
LIFE9 IConways LIFE with mutations)
Pnce S19 95 (including postagei handling)
LITEGAMMON (Backgammon you'll Stik with)
STIKWUMPUS {Caves with a litlte lite)
MAZEUASTER (Maze after maze to poke thru)
PRICE S19.B5 (including postage & handling)
(LEVEL 11)
LIGHT-PAK 3
(LEVEL II)
OrMr yours now and we'll include a tree copy Of FLASHBACK. Esmark s
newsletter dedicated to the latest news in lightware applications And. don t
forgel lo tell your friends The VIOIET-STIK can also be ordered for use on
■T>ost Other micro systems using the following processor chips
8DS0
zao
6800
6S02
All that s required is a standard cassette jack leadirig to Grour>d ar>d a
readable single bit input port Driver software is provided along with
instructions for writing lightware applications And lell your local Dealer thai
Esmark'sgot a Dealer package he won't want lo miss out on Delivery is 3 to 6
weeks from receipt of your order CO D s ars S3 00 extra but will be shipped
wilhin two weeks. All prices are FOB Miihawaka. Indiana Indiana residents
add 4% slate sales tax
ALSO COMING FROM ESMARK
{ ] TRS-BO Printer Interlace (Cassette AUX-jack interface for all RS232
printers. Includes LLIST& LPRINT software)
I TRS-BO RS232 Communications Interlace (Makes your TRS-SO a lull
I/O terminal lo limesharing systems the world over Gives you
intalligertt or dumb terminal capabilities at 110 or 300 BAUD Also
irtcludes Printer Interface above with 20 mA current loop & 'TTL level
t/0 options.)
— TRS-flO IS a irademarli of the Tandy Corporation —
INCORPORATED
507ViE. HcKINLEYHWY. MISHAWAKA, IN 46544
(210) 255-3035
$62.
95
'ELECTRONIC SYSTEMS MARKETING
PLUS $1.50
POSTAGE &
HANDLING
80 Microcomputing. March 1980 • 33
WE MEAN BUSINESS !
iiiJSiNF.SS SOFTWARE THAT IS
lRS-80
USE YOUR
FOR MORE
THAN FUN AND GAMES
T>E DATA DtBBER $49.95
Duplicates any program tape to TRS80 quoWy Hecor ■
stnjcts date pulsus to ensure accurate CLOADs Perrnits
easy loading c' ev^n poor quality comnvrcial tapes with
out constant volume adjusting. Monty-back guarantee if
not satisfwd
THE ELECnaC SECRETARY S75.00
A pomiertul *ord processor to turn your rRS-80 into an
automatic typexititer Features page numbenng, movable
margins, headers, variable page length. arxlttOe Centering
Enter lexl, revise, correc. and output to pnnler page tor
malted, justified, even hyphenated as required. Cross
coupling files permits individuaify addressed form letters.
Complete with upper/lower case conversion information
on diskette Specify it RS232 adapter is installed in
MTieiface
WMLROOM PUIS » 75.00
A versatile and poiitrful maifcng program lo pnnt labels
by sequential coding: up. city, state, customer ID code,
even last name. Sorts by any code rn minutes and stores
sequentially in a single string lapprox. 1500 records per
diskette). Includes AUTOPRirtT Supplied on diskette
MIMIMAIL «5a00
A compaa *«rs«o of ^WLROOM PLUS txjt without
customer coding Featkxes alpfia lookafiead lor dupii
cates Supplied oo diskette
FORMLET S 35.00
Generates torm letters irom MIPILMAIL records Prepare
your letter bulletin notire adi^rtisement. «c . then load
the MINIMAIL files Your pnnter will pnnt the inside
address letter arxl repeat lor each name in the File — all
prcperlv spaced and fustified Supplied on cassette
AUrOBOOT S 1 5.00
SimpliRes automatic BASIC program loading Irom your
DOS Permits sequencing througti your choice ol DOS
commands, selects files and memory size you specify, arvd
loads or njns selected program Ailows user lo see direc
tory and free space tiefofe program runs autoiriaticaify
Supplied on cassette
SIR ECHO 510.00
A handy program to make your pnnler work like an
elect/ic typewriter Use alone or merge with your programs
lo make what appears on the screen echo to ihe pnnler
Supplied on cassette
TELEFON »20.00
Make your TRS-80 a smart terminal Communicate with
lime share and other computers, txilletin boards, etc
Transfer programs over Ihe ptxjne For disk systems with
modem
UPPER/LOWER CASE COPIVERSIOM S20.00
Reprint of KILOBAUD article exptaining how to modify Ifie
TTiSflO to display both upper and lower case character Kit
contams s(ep-by-s«ep mstruclKins. pans, and necessary sofl
*oie on cassette tot case reversal echo, and automatic liw
feed roubnes
User group discounts available
Dealer inquiries mvited
■TFtS-eO IS a Iraaemifk a' it'e Tandy Corp
TERMS Cnecit money or-
oer. Visa Masiercharge
Washington residents ado
5 3% (or lai
THE PERIPHERAL PEOPLE
PO, Box524, Dep't.M
Mercer Island, WA 98040
, -■ '^ (206) 232-4505
3150 REH HON PKINT IT OUT GN CRT
3166 as
il70 FCRJinTGH
ji5* FCRJ2=JDT(UN
as
PRIKT'KTfllLS Ft* S-EHt * VJl;' FCft ■.«(J2)
FHim'li£VtNL€'i Tfe(45), "J", R(J1)
reiHt"OPEWiTlHG COST; TFe(45). "$", 0(J1>
FlilHT" INTEREST PftI[)";TI*<45), ■JMf'Jl?
FtlNT'ttFttCimiON FCft VTfe(45>,T-(KJl, J2)
PftlHT'PRETHX lHC-C»CM*^45),-J-.;F'..ll,j;-..
PRIIH'TFK PhIO", Tf€i(45>, "f ■ TCf Jl. }i>
PRIHTffTERTfi>: lHtC(€■,Tft(45).■i^f■^^.il, J^:.-
F-ftM-CURREHT ^tfft DOLLf*S CASH FLOW ■.Tffc(45t.^'t",[f (Jl, J2)
Ftlfn-DISCOIfTEE) CflSW FLCH Mfie(45>;"r,CT(.lli.l?)*(l+Rl(J2))[-Jl
CC=[KJLJ2>nPT'..ll,J2)*(l+CiH-Jl.^
PfilHT'CfiSH FLtii IH CCHSTFHT t UlTH •.(M.^'V. I(fLftTlW,Tfe(4T.>, T.K
F«lHT"lilSCaWTE[) (MBTfW WLU* tftSH FL0H*.Tfe<45),'tva:»f.l+R2(J2»[-Jl
IttW'FtfSS <DnER:> TO SEE MORE MH)
32«i
3216
3220
3238
3246
3266
;i?6
32W
3;<6e
3316
3326
3338
3346 ItXT .12
:<358 HEXT Jl
'iM Ifflft'Kl Vai UPKT HrtH) COfV ",V$
3376 IF LEFT»(«-1)='V' TFCH 3468 aSE !*tn'M< VW *HT TO tH«£ INKflVW
3388 IF LEFT$(Vt,l>='H" TtCH ST* ELSE J&=1
3396 GOTO 238
3466 REM H«D Cff^* OUTFUT Cf EVERVTHIHG
3416 POti 16424-48
3426 KKE 16425,6
3438 LPRIHl TFfe(2e>,"itfVT WiTh •
3448 LPRINT
3456 LF^ilHT'VEfHV RE«llt ■,TFIi(45>;'*VR
34ffl LF*lHT'VEHa.V fftRflTIHG COST ■;TFfc(45),"tVCi
3476 LF1l]HT"E5CaJlTlCH FCR REVENLfJfti(45).]ft*i86/*';"
34G8 LPRItfl'ESCaFlTlOH FOR COSTS"; Tfie<45). 10*166, "X"
3496 LF*lHT'OePfi£CIttlLE BflSf Mf6(45),'r,b
3566 LFKIHT'SflWGE VPLUE ",TFC(45>,.'*"iSV
3516 LF«lHT'fteWT (f LOW ■.TPC(45).;'J',L1
3^i26 LFVIHT'FNNUPL IHTEHST RHTE •iTfl£i<45),I,"r
3536 LF1?iHT"LIFE Cf L0WiTfe(45)i«.."S'l<S'
3546 LPRINTHLIKR OF fWEt(rS/WMfle(45);ff
"^56 LFmiHT 'PROJECT LIFE ■;Tfe<45)iH
3568 LPRIKFMIWSTUMI TfK CREDIT RPITE •,Tfe(45);T(*ie6-"Z'
3578 LF*1HT"IHC£»€ TW RflTE '; Tfe(45>, 1*166; V^'
3588 LF-RIIffaf DEfLfllC*: ■;TfC(45)iG*iee,"^"
3556 LFRIWT
3686 F« Ji= J[) TO JH
3618 LF^IHT" SirfVE ROl FOR ■,f(tC]l?.TFe(45l,Ml(.ll)*ieei'r
3629 LPRIHT" DCtf ROl FCft ■iW(.ll>.^Tfe(45);Rl(Jl)*16e,"X'
3636 LPRIHT- Ktf ROl HWECTED FOR IffLFlTIW FCS ' ;Ht(.1l),TFe(45),R2(Jl)*l66i ■:^*
3646 fCXT Jl
3656 LFKIHT CHiJdl)
3660 INFlfi'FliESS EKTER Ftft l€)a PftGE',XX
3676 (£fl HflfiD CJPV FCft MTfllLS
36Se FOR Ji= 1 TO N
:^96 LPRIHT "DeTfllLS FCft VWR I '.Jl
3768 LPRIKT ■REVEHLE ■,Tf€K47).R(Jl>
3716 LF*im 'WERFITIHG [Xi5T.Tfe(47).0(Jl)
3726 LPRIKTlHTERfST PflID"iT(€(47>, IP(Jl)
3736 FOR J2=1T0JH
3746 LfftlHT'fias'S.IS FtR ',(^$02^
3756 LFRIHTDEFKClflTlOH •,Tfti(47),"$",[)Lll,J2>
3766 LPRlHT"F«TflK PRtf IT'.. TPe(47), '%'. P(.ll, J2)
3776 LPR]HT'TFKPfllI)Mft:(47).'l';'riTC01,J2>
3766 LFItlHT'ffTER TftX lM:«tMF6<47),*t",PTai,.12)
3796 LPRIHT "CURRENT VEflR CflSH FLOW ■iTfe<47),"$*.CFUL J2)
Hm LFKlHTDISCOUHTEIl CISREHT [-(LLft tfiSW FLt«MFe(47),'r;(r(Jl,J2)»(ltRl(.12))[-Jl
3816 Ct=tr(Jl,J2)*(l*G)[-Jl
3S2e LPRIKT -OlHSTfWT WXLfift CJ6H FLW Ft* •}M.9(S.'a ItfLftTIttiMFti(47},MVtt
3830 LPRINT'RISCMITEI' CflNSTFHT KOLLfR tf6H FL0H".TFeC47>,'f,[t*<l+R2(J2).)l-Jl
3948 NEXTJ2
3856 LFRINT CHRtCll)
3866 ItfUT'PRESS (EHTER;> FCS fOa ?(t£-:u
3£7e REM IF VOU DO MOT HWT FWIHt REMOVE Tl€ FKiVE THO STFlTEHETtf.
38e6lCXTJl
3856 INFin'Mi mi HfiNI TO CHWGE INPUT "iV*
39W IF LEFT*(V*,1)="H- THEN STOP aSE JC.=1
3918 aiTO 256
34 * 80 Microcomputing, March 1980
:v
^'^^ ^^'^ Tds by stfiPP'"^ But niore irr|Pjg; and c^i^'^f'^rrS up to six
printed out awr generate "^Bf r Reef"":; ^^Je wti^fe
printed out awr generate "^Bf r Reco'-'^i^^re wti^fe
^"•'°ndSuspens;i^3lof;=,tnTSy,\1a^P™^^
^"•'°ndSuspens;i^3lof;=,tnTSy,\1a^P™^^
OISK Ht>* COMPANY, anu now na'' g^g^e
$18 50,CHECKBO
f^T-'
1^ Reatior Sarvica—see page 147
80 Microcomputing, March 1980 • 35
SufarautiiM DtwwMttad Cash Flow RCN
Low= - 1
High = 2
Tol =0.001
Ef = 1
Oo tvhile Ei>T«l
RO(={Hi9h*Lo«y2
Sum=0
Y«ar = 1
Do while YsaKUfa
Sum^Sum + Cashflow •(! + ROI)- Ysar
End do •"
l( ABS<High - LowKO 001 then
pnnl latled to convocQe
axit
ElM
Er z (Sum - OftpbasaVDapbase
ir Er>0 Then Low = ROI
EtM Htgh^ROI
End if
End il
Er = ABS(er)
End do
End sut)foutir>e
Figure 4. Discounted Cash Fiow ROI Subroutine.
so, what percent? Check with
the IRS to be sure.
13. Income tax rate: What is the
marginal income tax rate you
will have to pay on income de-
rived from this Investment?
14. Gross National Product
(GNP) Deflator. What is your
estimate of the average yearly
inflation rate during the life of
the project (8 percent is the de-
fault)?
Spend some time making
sure the estimates are as ac-
curate as you can make them,
the accuracy of tfie program
depends on them.
Running the Program
Once you have assembled the
required information, load the
program into your computer.
You will be asked to enter
each of the items discussed
atx>ve. Don't worry if you make a
mistake. Keep on going. After
you've entered all the informa-
tion it will be displayed on the
CRT.
You will be asked "Are these
14. Calculate DSCF ROI using
current year dollars.
15. Calculate DSCF ROI using
constant year dollars.
16. Print the results.
Each of these 16 steps ts a
rTKxlule in the program. Most of
them can be understood from
the program listing and the re-
marks In the listing.
Algorithms for the major
modules are shown in Figures 1
through 4. These algorithms
combined with the TRS-80 Level
II BASIC listing should enable
you to translate the program to
any language that your micro-
computer understands.
Data Requirements
Before you run the program,
you'll need the following Infor-
mation:
1. Annual revenue: What is your
best estimate of the gross an-
nual revenue that the invest-
ment will earn?
2. Annual operating cost: What
Is your t}est estimate of the total
operating cost, excluding In-
terest and depreciation, re-
quired by tfie investment?
3. Escalation rate of revenue:
How much do you expect rev-
enue to increase each year, in
percent?
4. Escalation rate of costs: What
percent do you estimate costs
will Increase per year?
5. Depreciable base: What is the
cost of the investment less non-
depreciable items such as land?
6. Salvage value: How much is
the depreciable base worth at
the end of the project life?
7. Project life: How long will you
keep the investment? This
figure is also used for the depre-
ciation time.
8. Amount of loan: How much
money do you have to borrow to
finance the investment?
9. Annual interest rate
10. Life of loan
11. Numtser of payments per
year
12. Investment tax credit: Can
you take an investment tax
credit for this investment and, if
Sample Problem
HtUiDAift
ions LPQiATING U)eT
ESUIRTICM fC« aVDlE
ESCamiON f» COETS
DEPHClFBi GfSE
SfLVftt VHUE
ncuiT OF Lcm
MIR lITTtREST RffTE
LIFE CF LQM
HIKK OF PflWinS^
PKUEtl LIFE
IWCSnEMT Tm CKD1T RfllE
IKOC TRKIME
or tCFLflTOG
SlfTLE KOI FW SlftlOn Lift {CPKCIRTICN
KIT KII FGR STfllGHT UK DCFfCCIRTlM
U£f SOI QMECTD FOB IVUTIDH FCfi STHIOn LltE UKSCIHTIW 13. 1»2 'i
SIPVU itOI FOK ELK OF <.EIKS DIGITS liEFfiEClflTION ISZmy.
WXF Wl F» an Cf VtFR NGHS KP«CIH110H 2,4663 •<;
DCtT Hll COKCTED F« llfLHTIW FIX S(M OF V»S DIGITS DmEClRTlCM 14 3311 'i
SirflE ROI FC« KaiNlMi eFlRK£ DEMSHFlTIW la Zm '£
DOF ROI FOft DeaiHlNG MMl UPRECIRIICM 24 'Si X
DOT ROI CWEnO* FOR IlfLftTIM FOft DCaiNlHG MSttl UPHCIflTlON 15 tt^S Y.
t
t 23880
5Z
t ssm
% laeo
tssm
12?.
5«S
12
» 2276 2
212412:!
Sample
Listing
KTftlLS FOR von 1 1
DETAILS FOR VUK 1 2
KVEIU
52W
REVEIU
ssus
IKHBTING COST
MIM
(KHniNbCOST
25357 5
INTEItST mi>
72K.75
IKTEKSI mb
597t 55
WLVSIS FW STRItjHI IIIC DEPfCnfltlON
FMLVSIS FHt STAICHT LIW KFICCIFniCM
(UVtClMIO
1 75?14J
tcmciMioi
♦ 7571 43
flCIMCFSBFlT
*11»1-8
WTM PfiSFll
ll£2L4 5
TWPfltD
H 20 912
TWmD
H 0189 7«
fFTER TW IHCMf
1 1329 91
VTER TIK IHUH
t Sl» 76
CUSEKT V^F* (XH FLW
128032 3
OHSHT VEfft CKHaW
t 15(012
DlSCOUnO) OREEHT HLLFfi tXH Fl(U
f 17642
DlSnUITEt) OMEin HUFf! CflSH Tim
1 1H94 1
CIKTWT DOIMi OfM FLOU FW 6 t IWLHTIOM
1 1»S9 2
COISTWT DaLF* CFCH FLCU FCK S ;! llfLOTlCM
1 13444 1
oisauno) coeifMT tnitt ogh flon
1 17»46 1
DlSOUfTED CDNSTfNT DOUtt Cf6K FLCU
( 1H99 1
navsis FCR an CF ^ff(& bi&ns DEmciHTioH
FMLVSIS FOR StM CF ■iVtS DIGITS ttmClOTlOl
DEFKCIRIION
* 1S»
DCFIfCIFITlDN
» 11357 1
mTfKFflDFn
17843.25
nETmPUFlT
t 12433 8
TfttPAiD
»e
TffiPfUD
«t 3638 53
fftER TFK mm.
* 7643 25
ITTQt TW IIC«C
18795 20
ClCf£HT VW CKH FLOI
1 21093 3
Qssm vuft CKH aoH
t2U52 4
DlSCaNIQ) OMfW [ALf* U6H FltM
t 17001 4
blSmMTEIi QMEHT DaLFfi dSA FLCN
» 13215 7
CUCTIW Daifft CASi4 FLW FW 6 '1. IWL>lT]CM
1 19538 e
coGmn uidm oeh flou for 6 2 iffifiTiOM
1 17277 5
[IISCOIKTEI' COEJWT ULLfft OCN FLOI
1 17862 7
DISOILNTHl COETMn DOiJfi CfGH FLON
t 13217 6
WFLVSIS FCK [taiNIMG WLMa DePfSClATION
fMLVStS FOR DeaiHlNG BfUWCE [CFIiEClflTlCM
tCFCEClRTIOH
1185714
DtFttCIRTlON
113265 3
HtlFK PttFlT
S252182
PRETBX PRtFlT
t 18525 7
IRXFtUD
n%
TWPAID
MS 7363
Ff lER IW MM
t 252182
fFTEC Tfft INCM
MOM 9
aMCHI VEFfl; [i£M FLW
t 21893 3
tMOn VEfK CKH FLON
♦ 237672
blSJaJHIEU CIHIEMI LUlMr [AfM FLGN
I lfc970 7
DiscoMTED tmon HLLffi tflSi aw
I153&4 8
CtlE'IWT bUitt LffiN FLCW Ftt ^ :; llf LKIIW
f 1*V530 i-
cmsiwT Dauv cfCH flon fck e 2 itfuniw
(203766
[ilS(t4!HIEI> (OISIWT UUtt CASH FL(U
t «97J "
DiscnirTBi cocTWi turn oh fuu
1153906
38 • 80 Microcomputing, March 1960
TROM THE ORIGINATOR
OF THE TRS-80 PROJECT
CORPORATION
HEADQUARTERS FOR PASCAL
And Other High Level Languages
PASCAL COMPILER
Pascai/MT'" is designed to run under CP/M.
It provides an efficient development cycle
plus efficiently executing object programs us-
ing a higtily structured language so fewer
programming errors are made, Pascal/MT
has extensions to standard Pascal.
Fealaras:
'Compiler executes only in 32K.
'Direct I/O manipulation.
'Logical Functions allow bit manipulation.
'Assembly languages interface.
'Object programs execute ten times taster than
P-eoda system.
'Inelutles real time symbolic debugger
'Accurate 16 digit BCD business arithmetic.
Package Includes System Diskette and In-
struction Book (Requires CP/M)
price $100"
Same package (TRS-OOS version)
price $125"
Same package (S-100 CPM version witfi 8"
diskette) price $100"
HIGHLY RECOMMENDED PASCAL MANUALS
"Pascal Users Manual and Report"
Price, Manual Only $9"
UCSD Reference Manual
Price, Manual Only
"Problem Solving Using Pascal," tfie
beginner's book for UCSD Pascal
Price, Manual Only
"Programming in Pascal"
Price, Manual Only
"Pascal Primer"
Price, Manual Only
$25*
$14*
$14'
$17*
CP/M® OPERATING
New 1.5 Version SYSTEM
Includes RS-232 and I/O Byte implementa-
tion. Editor, Assemt)ler, Debugger and Utili-
ties for 8080 and Z80 Systems,
Package Includes:
'CP/M System Diskette SVt"
'CP/M Features and tacilities Manual
'CP/M Editors Manual
'CP/M Assembler Manual
'CP/M Debugger Manual
'CP/M interface Guide , Requires 16K and \
PRICE $150" (one drive mm. j
Price, set of 5 (Manuals only) $25"
Update for 1.4 version owners,
new disc supplied $20"
Lo«eT
Comparable to compilers on large mam
frames and minicomputers. All of ANSI stan-
dard FORTRAN X 3.9-1966 is included except
COMPLEX data type. Therefore, users may
take advantage of tfie many applications pro-
grams already written in FORTRAN.
Features:
' FORTRAN Compiler
• Macro Assembler (280)
• Linker
• library
' Lib Manager (Not in TRS-DOS version)
FORTRAN .^.. ?^^'
FORTRAN, TRS-CP/M version price.
FORTRAN, TRS-DOS version price
$200"
$150"
Ue^^i
pnce
TEXTWRITER II ,
Exclusively from FMG Lo^^'
A text formatting program that prints files cre-
ated by an editing program. Contracts, per-
sonalized form letters and other documents
can be printed from a stored library of stan-
dard paragraphs.
Price $75"
Price (Manual only) $25"
TEXTWRITER III
AH features of Textwriter II plus ability to com-
puter create Indexes and Table of Contents.
Prfce $125"
Price for each (Manual only) $25"
TRS-80 COMMUNICATOR
New RS232 Communication Program that
allows your TRS-80 to transmit or receive
programs and data files. Also makes the TRS-
80 into a remote terminal. Requires Radio
Shack RS232.
TRS-CP/M version $25"
TRS-DOS version $35"
Call or write for complete information
O
CORPORATION
(817) 294-2510
P.0.Boxl6363(80)- Fort Worth. Texas 76133
High Level Languages for the TRS-80
BASIC • FORTRAN • COBOL • PASCAL
CP.'M IS a reflislBred Ifaflemart at Digital Research Corp • TRS-BO is i regisiered IradetnafK o( Radio SfwW
^mS-COBOL-SO
FMG's Microsoft COBOL brings the world's
most widely used computer programming
language to the TRS-80 user. FMG COBOL-80
is comparable to COBOL systems found on
minicomputers and large mainframes. Conse-
quently, it greatly enhances the usefulness of
microcomputers because it gives users ac-
cess to the incredibly large numbers of pro-
grams already written In COBOL. Because
COBOL-80 is a standard, COBOL programs
written on other computers may be run easily
on the TRS-80.
FMG TRS-COBOL-80 is based on the 1974
ANSI standard. It combines all Level 1 fea-
tures and the most useful Level 2 options for
the "Nucleus" and for sequential Relative and
Indexing file handling facilities.
The FMG TRS-COBOL-80 system includes a
compiler for translating source code into re-
locatable object code (which, incidentally, is
compatible with the object code of our FOR-
TRAN-80 compiler and MACRO-80 assem-
bler), and a routine system for running the
program by interpreting the object code at
execution time. It also includes screen han-
dling capabilities for easy use of interaction.
Requires 48K, CP/M and 2 Mini Disk Drives.
Price $750"
UCSD PASCAL
The powerful, general purpose language sys-
tem, originally developed for large, complex
system, is now available from FMG for your
TRS-80. This new FMG/UCSD Pascal System
greatly increases the value and capability of
the TRS-80.
Package Incluiies:
'Operating System 'Library
'Screen Editor 'Pascal Compiler
'280 Macro 'Utilities and System
Assembler Reference Book
/Requires 48K, \
Price $150" ^2 drive System^
available without Macro Assembler,
Linker and Library (not for compiling
programs) price $100"
For recommended Pascal manuals, refer
to -PASCAL COMPILER' lasting.
^1Z
S
tf^ deader Servic»—S9» page 147
60 Microcomputirjg, March J9W • 37
KTfllLS FCR VM 1 3
FRDfKFWFlT
I277«2
KWt£
57881 3
TW PAID
M1385^1
CPBWIKUiSl
2£(»4
FFTD( TFK IftWE
$13RVl
IWEKST WO
4534 81
OKEKT VEffr C«£H FLCM
• l»38f
WLvsis FOR smm Lite (CPOECifniw
01S£nMTE[< OtHKT tOlHf UfM FLOU
1 i6»l 77
DEPKCIftTlOM
1 757143
CUCTfMI DCLLM U6H FLOU FCt 6 'i IftLXTICM
1 1329^2
PKTfK PROFIT
im5a4
DISCtUKTED CtNSTWT VXM Cf6H FLCU
1 6804 2
Tfft PftlD
» 9575.22
FIHV^IS FCfi OCaiNlHG BfUKE UlPKCIflTICM
ttlU TF» iiniK
19575,22
KPfEClRTlCM
1 4834 3
CIWFHT VE« IXM RMI
DISCnWTED CUHEHT DCLLtt Cm FLCM
1 17146. 7
1 93ae.99
PKTfK PMf IT
TFK PftlD
128546 4
M 14274. 2
iXfETWT EKLUS CKH FLON FOR SX IFfUITlW
1136116
DISCOKTED CmSTttn KLiJ« CR5H FLCM
19393 74
fFTER TfK Ifttit
( 14274 2
FICLVSIS FCS SUI CF ^QRS DIGITS [CPKCIRTIW
OlSiEHT VEW Cf6H FLCU
1 19188 5
KnCClRTICM
% 9464 29
Disauno) (uatKT mllfk cash acw
% 644166
FUETfKFWn
117257.^
(mSTFNI KUFK UfM FLCU FW 8 :{ IftUiTICH
113804 9
iF{i( rail)
nK2ft79
DlSOUnED CaCTfKT taifft CftH FLOU
16447 94
FFTEE Tm IHUH
SaQB.79
am HI VEtt Cfl» FLOW
1 leeii
DlSCCUTiO) CUSEHT [fl 1 ffi CfEM FLCM
I96«e51
cnerwr ullmc cash flu fdr & -a itfiFiiitM
114362.9
DlSCntflED CONSTFHT UXLFS CASH FLM
t 961&56
ICTi^lLS FCR VEtt 1 6
WLVSIS FW DEaiHlKi M.fia HPftEClRTIM
FCVEHUE
67804 8
DEPSECiftncn
1 9475 32
OPERflTlft CtiST
]W22 2
p«Tflx Fi«f n
I 17246 7
IHTEKST Pflll)
6
TW Pfill*
H 9623. 33
PNFLVSIS FCfi STftlGHI Lift DCFKCIATKM
ifTU m INCOC
18623.33
KP(IEClini(M
» 7571 43
Ctifitm VEf* Cf6H fl»
% lent: 5
PRTflXFWflT
1286112
[iisuunED citfon uufk (kh flou
1 9425.71
TflXPfllt
tt 14385.6
CtMSTWT [NXU* CAEM FLOU FCK E ^ ItfLRTlOH
t 14367 2
fFTDI m IKOC
t 14305 6
[iiscxuNieci cxieiwi kllm: cash flcu
1 9431 K
CUOKT VEFR CASH FLOU
« 21877
DISCOMTED OKfKT [ttiift CPEH FlCW
16556 65
COISTfir HLLW CASH FLCU F(X 6 X llfLilTlCN
« 13786.2
DIVniHED CXMSTFNT HUift W\ FLOU
16566 89
fWLVSlS FW sun OF VEPfS DIGITS DCPKClftTlCW
ItlfllLS fCft 'T^ff 1 i
[€F«£Clf<TICM
13785.71
l£VE)U
tftFSTlH, CtlSl
68775 3
:79» 7
PKTFOl FWf n
TAX PftlD
Ff TER TFK lUCIt
• 32396 9
» 16196. 4
t 16198 4
imEttST F^lt
jmv.
OKSENT VCFft (i6K FUU
t 19904 2
Wivsis FCft siAioiT Lift {jimimioi
tCFWClWICK
Dis(afiTEi> asson dour ckh flu
t5£36 82
t 7571 43
ctMSTFin DGUJK CASH aw FW i V. ItfUniCM
Il255rj4
«£TWi (Wf 11
1 22338 7
DISCXINTED OHSTfin GOUC CfGK ROH
t 563&43
IhK WlID
It 11169 4
FfHVSlS FOR DCCIIHING BfUNCE KPKCIPITICM
Ff TOt Tf« INCM
111169 4
DtPKClfiTlOH
t 65 rj83
ClWtm '.tF* [F6H FLOU
t 1874 6
PfiETFK PfKFlT
1 36896 9
bisounEL) asstm \xim cfen flcu
t as3
TFKPftlD
» 18046 4
CONSTfWI DCLLJ« Cf£H FLCU FCK El y. llfLilTION
t 1J775
PFTER TFK IICK
t 180^.4
DlSOUfTED CXNSTFin DCLlfft (XH FLCM
1846195
OHEKT ^fffi CASH FLCU
118134 2
FMIVSIS FC* SJl » '^tfK. DIGITS DEFttClWlCH
tlSCONTED CmiEMT ULLffi Cf6H FLOU
I49ia57
Ksw.\mm
t 757143
CCNSTiin DaLFSi CKtt FLOU FCfi 6 'i iftuniw
t U427 6
PttTftt FMF IT
* 223387
DISCOMTED CnCTFNT DOIIM CffiH FLOW
I4S24 14
TFK PttlD
»t 1U69 4
^ER TW^ lNU*f
1 1U69. 4
aSKKT VEFt: CfCH FLCM
118748 6
DlSOUnED CUIKKT UOLFt C»6M FLCU
t 6059 58
OMSTWT UlLFft CASH FLCU FCK B X ItfUlTlON
* 13775
KTfilLS FOR VEFS 1 7
KVEHUE
CfBJATlHG CtiST
DISCONTED CCNSTWT ULLFC; CflSH FLCU
t 606188
76355.1
32363.3
navSlS FCR DEaiXIWi BH.MC£ kfrecirticm
KFIiEClfiTlCU
1 6768.81
I 23142.1
linElttST P«]D
e
TfK mi
t* 11571 1
FtHVSlS FCR STFIIGKT LltE DCPKCIRTICM
WTER TfK IftOC
1 11571 1
DEPRECIATION
1757143
CUai£NT Wa CKH FLOU
1 16339 1
PMTFK PGffIT
1 3042(13
[ilVflMTED OHKKT UUfft (1^ FLCU
$7664 31
TfK FAID
H 15216 2
CaCTfHT [Ol* CRSH FL(M FCt' 6 V. ItfLflTlOH
J U475ie
IfTUTIU IWtlE
115218 2
[llSOUnELi COIS.T»n LKXLW cash FlCU
17696 U
aCREKI 'Afft CASH FLCU
1 22761 6
DlSCttKTED CUKHI UOJifi CA5H FLCU
15585 47
COtSTFir HLLtt CASH FLCU FOR 6 X IftLRTICM
1 13232 6
DISCCUfTED COGTWT Nl 1 Fit CfEM FLOU
15594 86
FWLVSIS FCR S«1 Cf VEflRS DIGITS ttPttCIFlTlCW
DEPKCIHTION
1169286
PffTFKPRtFlT
1 36896.9
KTfilLS FOR SO* 1 5
TFK PAID
» 18049 4
REVEMX
63814 1
FFTER TFK 1K.M
118049 4
OFtWlTIW, COST
29354 5
nSREMT VEtt CASH FLCU
1 19942 3
IHIUtSI PAID
U76 89
DISaUTO) QHCKI DOiilt CfEH aCU
14554 52
WLVSIS FOR STniGHT Lift DemClEITICM
a«E1fNT DaiW CAEH FLCU FO) 8 V. IKLATICH
1 11636 1
DEFKEClFlTlCII
t 757143
DISCOIMTED CnSTWI DaLtt CASK ROU
145566
PRETfK PROF II
t 258113
FMFLVSIS FCft tCaiHllG MiKX DEFfCCIRnON
TfK PfilO
t* 12305 6
DtPRECIATlON
f 8
(HEt TFK INCOC
• 12905^6
FttTFK PROFIT
1 37991 7
CLifSKT VIW CASH FLOU
i2W77 1
TfKPfllO
H 16995 9
OlSCtUNTEL) aR(£HT DOLLFfi C»H FICM
1 7582.84
FTTER TFK IHCttf
1 18995.9
CCNSTWT HLLtt C»H aCU FCK 6 V. IITLRTION
1 U936.4
OXSm Vf Ffi CFEH FLCU
* 18995 9
DlSCOUnEli CtKTWT Dai* CASH FLOU
t 75118*
DlSCXUfTED URtlKT bOLH; CASH FLCU
1 4145 31
MHVSIS T» S* » 'JWS DIGITS DD^ClfnitH
COSIFNT DCLLfC OeH FlCU FCR i 1 ItfUiTlCH
1 11863 9
OEPttClftTlCK
1 5*76 57
DlSraUTED OMSTWT DOil* [X» FLOU
1 4158 79
correct yes or no?" Look the
data over carefully. If you see an
error, answer "NO." Each of the
items will be asked for again
and its value displayed in paren-
theses. If the value in paren-
theses Is correct, press ENTER.
If It is not, enter the correct
value.
After you have corrected the
data, select a depreciation
method. If you want to use a par-
ticular method, enter the ap-
propriate number, otherwise
press ENTER and the program
will calculate all three meth-
ods—straight line, sum of years
digits and declining balance.
Now wait a minute or two.
(The longer the life of the invest-
ment or of the loan, the longer
the calculations take.)
As soon as the calculations
are completed, the simple ROI,
the DSCF ROI In current year
dollars, and DSCF ROI in con-
stant year dollars for each de-
preciation method will be dis-
played. If you selected one
method of depreciation, only the
results for that method will be
displayed.
If you want details of the pro-
fits, taxes, and cash flow for
each year, press ENTER.
After you have seen all the de-
tails for each year, you will be
asked if you want hard copy. If
you answer "YES", all the input
data and all the calculated re-
sults will be printed.
Ctosfng Commsnts
First some warnings: The pro-
gram assumes that all losses
can be written off against future
profits and that the investment
tax credit can be taken regard-
less of when the profits are
taken.
These assumptions are not
strictly correct. The IRS limits
both tax loss and tax credit
carry forward. If you need infor-
mation on this, contact the IRS.
Finally, as I said before, the
numbers calculated by the pro-
gram are only as good as the in-
formation you provided. If you
desire a precise answer, you
must provide precise Input. No
matter what the computer says,
the final decision is yours.
Examine the sample problem.
The results are given in the sam-
ple listing.!
38 • SO Microcomputing, March 1930
An Entire Family of Disk Drives for
APPLE, TRS-80*, and S-100 Computers
Only LOBO DRIVES offers you an entire family o*
f ull^compelible disk drives to select from.
Whatever computer you're usir>g. APPLE, TRS-eo,
or S-100, you can add a LOBO drive now, wi\t\ the
peeoe-of-mind of knowing there's a whole family of
drives available when you're ready to expand.
And every drive you order comes complete with
chassis and high reliability power supply. Each
drive is 1 00% calitxated, burned-in, and
performance tesled on either an APPLE, TnS-80,
or S- 1 00 computer before it's shipped. We are so
proud of our drives our quality, reliabitily, and
performance, that we back-up every drive with a
one year, 1 00% parts/labor warranfy.
400 SERIES FLOPPY DISK DRIVES
Meet our low^ost 5 25-ir>ch
mini drive that records data
in either hard or soft
sectored format. It is
available in sir>gie or double
density configurations, with a total storage
capacity of 220K bytes.
800/801 SERIES FLOPPY DISK DRIVES
Here is our dual B-lnch
Floppy disk memory unit. II
records artd retrieves data
on standard 8-inch
diskettes to provide BOOK
bytes of data storage unformatted, or 5 1 2K bytes
935 CafTtino Del Sur
Gcteta Caltlorma 93017
[a05( 685-4546
"CAN YOU REALLY AFFOfiD
TO PAY LESS?"
in IBM tormat per drive. It is also available with
double-sided, double-density capabtHies. for a
maximum storage capacity of 1 6 Megabytes.
7000 SERIES HARD DISK DRIVES
The latest memtjer of our
dnve family, the Sehes
I'OOOiaanS-inch. 10 Mega-
: -yte Wnchester Technotogy.
hard disk drive It is fully
hardware/ software compatible and comes
complete with disk controller. Now you can have
the convenience, speed, reliability, and all the
storage capacity you need.
Call or write for the complete LOBO DRIVES story.
Find out lust how competitively prk^d a quality
drive can be.
Quantity discounts available -
Dealer inquiries Invited.
Yes, f want to know more about LOBO Drives
and what they can do. Send me information on:
DTR&-80 DAPPLE D&-100
D 5 1/4-in, Floppy t»rtv«
□ B-in Floppy dnve
Singta S'ded
Ooubis tided
a8^ft.Wlnc^e9ler^»a^d
disk. iOMbyMdnv«
CaiiM"ir.
Oft -
nun* Ha.
\t dH«'. Ctowldt NU« no
t^*t IMTBVtNATIOWAL
IWfrao ■ ■ WQIlil B ir^awiiit^ ul Kaa<n »n«c- A TW«r ComMny
._l
THE ORIGINAL MAGAZINE FOR
OWNERS OF THE TRS-80^"* MICROCOMPUTER
SOFTWABE
FOR TUS-N"
OWNEKS
CQIYIPIJTHQMICS
MONTHLY NEWSMAGAZINE
Practical Support For Model I & II
I MONTHLY
u NEWSMAGAZmC
J[ Foi ims-m"
C. OWNEBS
• PRACTICAL APPLICATIONS
• BUSINESS
• GAMBLING • GAMES
• EDUCATION
• PERSONAL FINANCE
• BEGINNER'S CORNER
• NEW PRODUCTS
• SOFTWARE EXCHANGE
• MARKET PLACE
• QUESTIONS AND ANSWERS
• PROGRAM PRINTOUTS
AND MORE
PROGRAMS AND ARTICLES PUBLISHED IN OUR HIST 12 ISSUES
INCLUDE THE FOLLOWING:
• A COMPLETE INCOME TAX PROGRAM (LONG AND SHORT FORM)
• INVENTORY CONTROL
• STOCK MARKET ANALYSIS
• WORD PROCESSING PROGRAM (FOR DISK OR CASSETTE)
• LOWER CASE MODIFICATION FOR VOUR VIDEO MONITOR OR PRINTER
• PAYROLL (FEDERAL TAX WITHHOLDING PROGRAM)
• EXTEND 16 DIGIT ACCURACY TO TRSSO" FUNCTIONS {SUCH AS
SQUARE ROOTS AND TRIGONOMETRIC FUNCTIONS)
• NEW DISK DRIVES FOR YOUR TRS*)"
■ PRINTER OPTIONS AVAILABLE FOR YOUR TRS 80™
• A HORSE SELECTION SYSTEM" 'ARITHMETIC TEACHER
■ COMPLETE MAILING LIST PROGRAMS iBOTH FOR DISK OR CASSETTE
SEQUENTIAL AND RANDOM ACCESSi
• RANDOM SAMPLING*"BAR GRAPH
• CHECKBOOK MAINTENANCE PROGRAM
• LEVEL II UPDATES- "LEVEL II INDEX
• CREDIT CARD INFORMATION STORAGE FILE
• BEGINNER S GUIDE TO MACHINE LANGUAGE AND ASSEMBLY
I ANGUAGE
• LINE RENUMBERING
• AND CASSETTE TIPS PROGRAM HINTS, UVTEST PRODUCTS
COMING SOON (GENERAL LEDGER ACCOUNTS PAYABLE AND
RECEIVABLE, FORTRAN 80, FINANCIAL APPLICATIONS PACKAGE.
PROGRAMS FOR HOMEOWNERS, MERGE TWO PROGRAMS.
STATISTICAL AND MATHEMATICAL PROGRAMS (BOTH
ELEMENTARY AND ADVANCEDl AND
NOTICE
Pursuant to a consent judgement entered in the United States District Court for the District of Massachusetts, H & E
Computronics, Inc. hereby gives notice that it is not and has never been an authorized Radio Shack dealer or outlet,
that products or services offered for sale or sold by it are not and were not approved or warranted by Radio Shack or
Tandy Corporation, and that only products or services purchased directly from Radio Shack or its authorized retail
outlets carry the warranty of Radio Shack and Tandy Corporation. If you have placed an order, still outstanding, with
H & E Computronics, Inc.. for products or services, in the belief that those products or services were manufactured,
approved or warranted by Radio Shack or Tandy Corporation, you may cancel that order and obtain a full refund of
any money paid or deposited, simply by writing to the address below.
ftl^^
WORD PROCESSING PROGRAM (Cassette or Disk)
For lAinlmg lellers. text, mailjng lists, elc , *i\th each new subscriptions or renewal.
LEVEL II RAM TEST (Cassette or Disk)
Checks random access memory to ensure thai all memorv locations are working properly
DATA MANAGEMENT SYSTEM (Cassette or Disk) -Complete die management tor your TRS-SO"
SEND FOR OUR 36 PAGE SOFTWARE CATALOG (INCLUDING LISTINGS OF HUNDREDS OF TRS-SO" PROGRAMS
AVAILABLE ON CASSETTE AND DISKETTE) $2.00 OR FREE WITH EACH SUBSCRIPTION OR SAMPLE ISSUE.
iCQiriRJTRQI^ilCS-
^9
•oi 14t
»«M city. N«w York 10tS<
HOUH
24 ORDER ^to»
LINE ^^
(914) 425-1935
ONE YEAR SUBSCRIPTION $24
START MY SUBSCRIPTION WITH ISSUE „
NEW SUBSCRIPTION .- ^ RENEWAL
TWO YFAR SUBSCRIPTION $48
SAMPLE OF LATEST ISSUE $4
(«1 Ji^ 19TS ■ a? January 1979 • »12 Junt 19n ■ •laJwwuv IWl)
CREDIT CARD NUMBER
SIGNATURE
NAME -_ —
ADDRESS
EXP DATE
• •• ADD 16 YEAR (CANADA MEXlCOl ADD $12, YEAR AIR MAB- OUTSIDE OF U S A , CANADA * MEXICO ••<
TKS-aO" IS A TTIADEMARK OF TANDY CORPORATION
40 • 80 Microcomputing, March 1980
Scanned by Ira Goldklang - www trs-80 com
H
CQIYIPUTHQWICS
c.
• • • EVERYTHING FOR YOUR TRS-80 • • •
TRS-ao la a iradrmark of ihr Radio Shack lilvlslon of Tandy Corporation
■k All Orders process^ within 24-Hours
■k Free Shipping within U.P.S. areas (add $3 for orders outside of the U.S.A. or U.P.S. areas).
•k 30-Day Money Back Guarantee on aU Softivare (less a %3 penalty for handling).
•k IO~Day Money Back Guarantee on Disk Drives and Printers PLUS 120-Days Free Service.
INCOME TAX PACS
TRS-M Tfsnalalions Irom Accountanti Softwar*
Assoc lain with Compl«t« Us«rs Manual
INCOME TAX PAC A . . . $19.95
For Laval II 1«K Caasafta
• Form 1040 • Form ICMOA
• Scliaduie A itemizad Oaduciions
• Schaduta 6 mtaraal and Dividends
• Schadula TC Tax Compulations
• Output to Video Display
tNCOME TAX PAC B . . . I49.9S
For Laval II IM CaMatla or 33K DIak
• All Features of Pac A PliW
• Output lo Video or Lir>e Printer
■ Formats Form 1040 and 1040A for Tractor Fa«d
Forma
■ Sclierlule C income from a Personally Ownefl
Business
• Form 2106 Employee Business Experses
PflOFESSIONAL INCOME TAX
PAC C . . . tMH
For 32K SrMwn WHh Dtafc Drtva
■ All Features Of Paci A & 6 Plus
• Automsltc Memory Storage for Income Tax
Preparers
• Instant Line Change
■ Additional Schedules and Forms
■ Formats Forms lor Individual or TraclOr Faed
Printing
BENDER'S 1980 TAX
RETURN MANUAL . . $2».M
■ 4O0 Page Step By Step Tai Preparation Manual
• Includes Every Tai Table and Form
• All Forms Are Reproducible
■ Line-ByLine Explanation of Each Form
■ TRS-M DISK AND OTHER MYSTERIES
S19.95 ($22.95 ittor 2/1/80). Over lOO pages
ol indesperisiB'e information for disd owners
Learn to recove' mlormatjon from bad disKs
now lo make Basic programs uniisiabie and 12
more chapters of never published lips and intor-
matiort Wnttart by H C Pennington (For ail
Dish Owners)
FROM AOVEHTUHELANO INTERNATIONAL
> ADVENTURE *1 - »7 by Scott Adams . . .
Si4.t5 Meh available on Cassette or Disk
• HORSE SELECTOR II by Dr Hal Davis . . .
ISO. ThpTRS-eO version updated for the TfiS-60
and originally reviewed m Systems ana
Methods
FROM APPARAT
NEW DOS • S99.95
3S. 40 and 77 Track Versions available
•CQinPUTHQI^ICS!
PROM RACET COMPUTES
• REMOOEL-PROLOAD - Renumbers pro
gram lines combines programs The only re-
niimtjer program that will renumber the middle
of a program Specify 16K 32K or 48K W^rks
with Cassette or Disk . . . S34.M
' GSF - Use in your Basic Programs 'or Instant
Sonmg (will sort 1000 items in 9 seconds) Other
commands include Compress and Uncompress
Data. Duplicate Memory. Display Screen
Controls and Fast Graphic Controls . . . 134. 9S
(For Cassette or Disk, specify ^6K. 32K or 48K)
■ DOSORT - All G 5 F commar^ds plus special
Multiple Dish Sorting Routines . . 134.95
(Specify 3?K or 48K|
• INFINtTE BASIC - Adds 70 commands to
your TRS-BO including Instant Sort, Malrin
CommarKJs. Stnrig Commands. Left and Right
Justification. String Centering. Simultaneous
Equations. Upper and Lowe' Case Reverse and
more . . . 149. H (For Cassette or Disk)
• INFINITE BUSJNCSS (Requires Inhniie Basic) -
Eliminate Round-off error. 127-Digil Calcula-
tion Accuracy Insert h4ew Elemenls in Sorted
Arrays. Automatic Page Headings. Foafings.
and Pagination. Multiple Precision Arithmetic
and more . . . t29.tS. (For Cassette or Disk)
• COPSYS - Copy Machine Language
Programs . . . S14.9S (For Cassette only)
FROM SMALL SYSTEM SOFTWARE
• RSM-2 Machine Language Monitor . . . S2C.H
• RSM-2D Disk Version ol R5M-2 . . S29.9S
" DCV-1 Cor'verts Macnme Language Programs
from tape to disk . . S9.9S
• AIR RAID - The ultimate TRS-80 game con-
verts your TRS-80 rnlo a real time shQOtiriy
gallery . . . |14.9S
■ BARRICADE A fast pong style game.. S14.95
• CPM - $150 (for Disk only)
> TRS-232 INTERFACE - Interlace with Soft-
ware driver nS-232 printers to your
TRS-80 . . . S49.H
" TRS-232 FORMATTER -Additional
(optional) Software for TnS-232 owners Ads
many printer commands lo your
TRS-80 . - . $14.95 ($9 95 with purchase of
TRS-2321
MAIL PAC Fo' Model I or Model II Disk
Systems only . . . S99.9S. QuiCk-sorting full user
control Over mailing itsttromGallaciic Software
MICROSOFT FORTRAN (DISK)
UtO- NOW tISO
SARGON ri
THE CHESS CHAMP
S2V.9S
Box 149 New City. New York 10956
36-Page Catalog $2 FREE With Any Order
Order by Phone or Mail
No Shipping Charge
Add $3 for COD.
Add $3 for all Foreign and non-U.P.S. shipments
Add $3 for UPS. Blue Label
FROM THE BOTTOM SHELF
• CHECKBOOK II (for Cassette or Disk) . .
Sit. 50
' INFORMATION SYSTEM <tO' Cassette or
Disk . . . $24.S0
• SYSTEM DOCTOR la complete diagnosis of
youiTHS-dO checks memory video cassette
Oisk ROM and all other parts ol your system) -
for Cassette or Disk . . . S2I.50
• CHECKBOOK REGISTER ACCOUNT-
ING SYSTEM (reauires 2 disk drives) - . $49.50
• LIBRARY 100 - 1(X) established business
game and educational programs plus FREE Tiny
Pilot all for . . . $49.50
• BASIC TOOL KIT lists all variables. GOTO s
and GOSUB S m your ()rogram . . . $ia.ia
SOUNDWARE - Ads sound to your TRS-SO
Jusi plus il in . . .$29.95. Sample programs
included
TING TONG - Can J>e used with Soundware
for a Sound version ol pong . . . $9.95.
DISK BUSINESS PROGRAMS
MODEL I AND MODEL II
GENERAL LEDGER/CASH JOURNAL . $99.95
ACCOUNTS RECEIVABLE . $99 95
ACCOUNTS PAYABLE . $99.95
INVENTORY CONTROL . $99.95
PAYROLL $99.95
VISTA VBO DISK DRIVE
110 K OF STORAGE
S395
Add $29 95 tor CaMe
(Free with Purchase of Two Disk Onves)
— 10 Day Money Back Guarantee —
8" Drives also available
FROM HOWE SOFTWARE
MON-3 - Machine Language Programming lor
Beginners HON-3 is a Complete
System Monitor with Users
Manual $39.99
MON-4 - Disk version of HON-9 . . . 14995
LEVEL III BASIC . . . (49.95 FROM
MICROSOFT - Now Cassette owners can add
DiSh Commands to their TRS-80 without owning
a Disk Dnve
BRAND NEW OLIVETTI PRINTER . . .S3495
BuSifess Letter quality print. Automatic Line
Justification (on request). Quick Printing, can
be used as a Memory Typewriter, plugs right
into your TRS-80 without any modification or
software
THE ELECTRIC PENCIL
Cm»*H« . . . $99.95
0l9k . . . $150.00
^S
24
HOUR ORDER LINE
(914) 425-1535
•.'S
»^ AaaAr SwfvlC9—$9* p*gt 147
80 Microcomputing, March 1980 • 41
HOME
Use your 80 to fight
back- Keep your records in order.
IRS 80
William B. McNeil. Jr.
225 Longview Drive
Jetferson, IN 47130
Do you ever wonder if you are
paying too much income
tax?
I do, just about every year.
The one thing t always ques-
tion is the deduction the tax
tables allow for the amount I pay
in state sales tax. I had to rely on
the tax tables year after year
because I thought it would be
too much trouble to accumulate
the necessary records to claim
more of a deduction.
In fact, I didn't even know If I
could claim more than the ta-
bles allowed. But, I thought I
should, since it seems— espe-
cially in the last few years—
that I have been sp>ending more
mofiey than I make to meet my
daily needs.
Th* TRS-80 Rscord Kaapw
Here is where my new-touf>d
friend, Radio Shack's TRS-80,
came to my rescue.
I got my TRS^ system at the
end of last year and started
keeping records from the first of
January and for each month of
the year. I wrote my own pro-
grams for this, first in Level I and
then, when I upgraded, in Level II
BASIC.
I wrote the following program
to keep track of the amounts of
sales tax that my family pays
each day.
The government allows you to
use actual sales tax figures, if
you can provide proof of the
arrraunts spent.
I'll have my proof for next
year's tax return.
From my records I can see
that I will be able to claim a
substantially greater deduction
for sales taxes than the tables
allow. In my own case this will
be more than double last year's
deduction.
My program is simple. It cre-
ates a cassette record for each
month of the year. A menu of
three or four choices is the
return point from all functions
except End-Of-Job.
The operator is helped
through each step for each
choice with a prompt, displayed
m large character format-
Before any tape entry is written
to cassette the operator can
visually verity its accuracy and
re-type the entries it a mistake is
noted.
I provided a hard copy output
lor those who have printers.
The monthly worksheets are
updated daily, listing sales
taxes paid. At the er>d of each
month the worksheets are en-
tered onto cassette.
At tax time the cassette is
printed and retained for your
records. If your return is ques-
tioned, you will be prepared to
back up your figures.
Wtien accumulating your dai-
ly records, don't forget that
there are many hidden taxes
that you can claim such as
items purchased from a vending
machine, or maybe the price you
pay for gasoline ar>d theater
ticKetB. Don't forget that your
magazine, newspaper, meals
away from home, utilities ar>d
just about every penny you
spend may have sales taxes in
the price or added to the price.
Check with your State Depart-
ment of Internal Revenue to find
out iust what sales taxes may be
Included in various purchase
prices.
How to Begin
Make yourself twelve of the
worksheets similar to tfw sam-
ple I use in Fig. 1. The program
allows six sales tax entries per
day. A grid six by 31 is adequate.
I use INKEYS wherever possi-
ble to eliminate wrong entries.
Also 1 use CHRS(23} to display a
large character for easier read-
ing.
42 • 80 Microcomputing. March 1980
Cvlon • L IV
$7 50
Animated Hangman - L
IV
750
Space Battle CS - L IV
1495
Level IV Graphics CS-
L IV
14 95
Typing 1 - L IV
15 00
Typing II - L IV
1500
Space Battle Disk - L IV
1995
TVP<ng 1 & II ■ L IV
22.50
Warfare 1 - TSe
7 95
Final Approach - L IV
10 00
Cribbage - TSE
795
Tycoon - TSE
7 95
Concentration ■ TSE
795
Amazin Maze ■ TSE
7 95
Time Bomb - TSE
495
9 Games/ Pre School -
TSE
9 95
Slalom - TSE
7 95
Ten Pin - TSE
7 95
Endzone- TSE
7 95
Star Trek 3 4 . TSE
1495
Adventure Mission IM -
TSE
14 95
Dog Star • TSE
9 95
Safari ■ TSE
7 95
Treasure Hum ■ TSE
7 95
Round the Horn ■ TSE
995
Pork Barrel ■ TSE
9 95
Kamikaze ■ TSE
795
ST80D - TSE
79 00
Advance Personal Finaru:e - TSE
24,95
Atlantic Balloon ■ TSE
9 95
Tarot Cards - TSE
995
Ham Radio • TSE
14 95
Breakaway ■ TSE
5 95
X-Wing fighter ■ TSE
9 95
Simple Simon ' TSE
4 95
Sinkum - TSE
4 95
Educational Assistant -
TSE
995
Home Financial ■ TSE
9 95
Math Drill ■ TSE
495
Object System ■ TSE
995
Te« 80 Disk ■ TSE
5995
Payroll Disk - TSE
Checkers Disk - TSE
Personal Finance - TSE
GSF • RACT
Remodel & Proload ■ RACT
Remodel - RACT
Dosort - RACT
Comproc - RACT
Infinite Basic - RACT
Infinite Basic - RACT
Copy System ■ RACT
Autok/Qedit ■ DISC
Autok/Qedit Sk - Discovery Bay
Morse Code - Discovery Bay
Win 21 - Discovefy Bay
Gomoco ■ Discovery Bay
Level 1 - Apparat
New Dos - Apparat
New Dost + • Apparat
KVP - L Micklus
KVP-232 - L Micklus
Library 100 - TBS
Electric Pencil Cass • Shay
Electric Pencil Disk ■ Shay
Snake Eggs/SND - SOUS
Android Nim/SND - SOUS
Life Two/SNO - SOUS
Bee Wary - SOUS
Owl Tree W/S ■ SOUS
Great Race W/S - SOUS
Lying Chimps • SOUS
Concentralion W/S - SOUS
Scrabble W/S ■ SOUS
Level 111 Basic ■ Micr
Micropoly - OP
Airaid - SSS
Barricade ■ SSS
RSW-2 - SSS
RSM.2D - SSS
DCV-1 - SSS
Basic PI - SSS
$59 95 Sargon - Hayd. 19,95
24 95 Sargon II - Hayd 29,95
9 95 Poker Pete - Qual 9.95
24 95 Fastgammon - Qual 19 95
34 95 Fastgammon Oisk - Qual 19,95
24 95 Advent Cass - Adve 14.95
34,95 Advent 2 Cass - Adve 14 95
1 1 97 Advent 3 Cass ■ Adve 14 95
49,95 Advent 4 Cass - Adve, 14,95
29 95 Advent 5 Cass - Adve 14.95
14 95 Advent 6 Cass - Adve 14,95
14 95 Advent 7 Cass - Adve, 14,95
19,95 Advent 8 Cass - Adve. 14,95
14 95 Advent 10 Cass - Adve 5,95
19 00 Advent 1 &2 Oisk - Adve 24,95
15 00 Adveni 3&4 Disk ■ Adve 24,95
1 5 00 Advent 5.6&7 Disk ■ Adve 39.95
49 00 Advent 8 Disk - Adve 19 95
99 00 Bowlstats • RLS 29.95
2995 Forth Disk - Mnl. 64 95
29 95 Primmer - Mill. 15.00
49 95 Space War- Mill 9 95
99 00 Star^leet Orion- Asim. 19,95
150 00 Invasion Orion - Asim 19,95
14 95 Temple of Apsh - Asim 24.95
14 95 Misosys Tape U - Aero 14 95
14 95 Misosys Disass ■ Aero 19 95
14 95 System Savers - Aero 14,95
9,95 Opera Theater - Aero 9,95
9.95 Disk Utility - Aero, 19,95
9 95 Video Pager - Aero 9,95
9,95 Tshori - Web 9,95
9,95 Wordo - Micr 14,95
49 95 Stock Exchange - Micr 15 95
7 50 Whereami - Micr 10,95
SPECIAL 1000 Othello - L IV 9.95
SPECIAL 10 00 Invaders w/ sound - L IV 14 95
26 95 Creature Tic-Tac-Toe 7.50
29 95 Creature Tic-Tac-Toe w' sound 9.95
9 95 XREF Cass - L. Mickius 19.95
14 95 Renumber Cass - L MickluS 7 95
^
LEVEL IV PRODUCTS, INC. .u
32238 Schoolcraft . Livonia. Ml 48154 •313-525-6200 outside Michigan 1-800-521 -3305
10% Off All Software Usted
If you don't see what you want call, find out why! We carry nothing but the BEST. We also sell TRS-80* 1 0% off
list price.
We ship CO.D. - Add $1.50 for shipping and handling Send 25< for Catalog
* Product of Tandy Corporation
^
t^ (trader Sarvic»—S*» p*gw 1*7
80 Microcomputing, March 1980 • 43
I write the data to cassette
after each day's entry, which
uses very little memory. This
method uses more tape than
string manipulation. Still, a full
year's information can be writ-
ten to a GO minute cassette, and
each day's entry is capable of
being altered in this format.
When the program is loaded It
asks If you have a line printer. If
you answer yes, the menu dis-
plays a choice of four n>odes of
operation. If you answer no the
menu displays only three.
First, create a cassette by
selecting choice one ar>d folk>w-
ing the instructions.
A monthly total and a year-to-
date total is automatically writ-
ten to cassette as a last record
for each rrmnth. For the first
rrronth entered, the totals are
zero, but for additional months
the carry-forward totals are read
first, using choice two. Just read
the last day or two of ttte last
month on the tape.
After the totals are read In,
answer tt>e question "is ttwre
ar>other rrxinth" with no and
then select choice one. The
carry-forward total will be
displayed on the TV.
The day of the month is auto-
matically displayed. If you have
no entries tor a particular day,
key ENTER and the day will ad-
vance one number.
Enter the amounts as you
would on an adding machine,
i.e., don't use decimal points.
The entered amount Is dis-
played with the decimal placed
by the program.
If there aren't six entries per
day, just key ENTER and zeroes
are entered by ttw program for
those amounts. Note: The first
artKXjnt canrwt be zero or ttte
day advances.
Wfwn tf>e six amounts are en-
tered you have tf>e opportunity
to visually verify the amounts. If
a mistake Is noted, the entire
day's anwunts can be keyed
again before any record is writ-
ten to the cassette.
If you answer the prompt, "is
Program Listing
1000
lOlO
IDIO
10S3
ID^O
1090
lObO
lOTO
1010
1090
llOJ
1110
1129
mo
1150
llbO
llTD
iiao
1190
1Z03
1110
IZIO
1110
1240
1240
llkD
1S0>1
1910
1310
1930
1940
1950
19*0
19T0
1900
IS90
IdOU
IdlO
1620
IblO
U40
1690
l«iv3
IttTO
ifcao
1690
ITDO
ITIO
ITID
1790
11 «D
1790
17b0
JEFFERSONVILLEi
1979»
IN. 471 90*
HEH •■ILL. nCNElL-Li
REH •SEPTeWEH 111
HEN 'HEV. 9.0*
HEH •THS-aO LEVEL II 1*K*
GOSUH 9S00
HEH 'TnLE MO PHINTEH SETUP*
PRINT! 3141 "THIS IS A SALES TAK TAPE ROUTINE'
Si>"lltit.ff"
PRINTB 911. "00 tOU HAVE A LINE PRINTER"
GOSUI 1000
TaOi SI-Oi G>Oi FoOi GOSUt 9900
PRINT TAB(S) "i I I 1 M E N U I : I i'
PRINTI PRINT TAllSI "TO MHITE TO TAPE - 1"
PRINT rABI9l "TD HEAD TME TAPE - J"
PRINT TAil3) "TO ENB THE JOB - 3"
IF PI="Y" GOTO IttO
PRINT! 990. -INTER YOU* CHOICE"
UlTO 0040
PRINT TABI91 "TD PRINT THE TAPE - - 4"
PRINT! 990. "ENTER YOUR CHOICE'
COSUB BOIO
IF Mii"l" T»«" RECORD "
IF ir«3»l-l Oft IHla-4-) T«=" PLAV "
If Hii"4" COTO 4000
IF Mli-l" GOTO 3000
IF Nt*'!" GOTO ZOOO
IF N»s"i" TrtEN 190J
REN "TAPE WHITE ROUTINE*
COSUB bOOOi C05UB 90JO
TnQi iOSUt 990J
PRINTS J94,"TYPE IN MONTH AND YEAH"
PRINT) PRINT
INPUT a>
PRINT»'1, b*
ASH COSUa 9903
PRINT "OAT— "lA
PRINT
IMPUT "AMOUNT — ■)■
IF aiO A*«+li GOSUt 99031 SOTO ISSO
B>d/103i PRINT! ZO!,"!"! USING SA)B
IMPUT "AMOUNT — ")Cl C>C/10D> PRINT!
■amount — "iDl
■inouwT— "lEi
"*MDgNT--"IFt
•jhOUNT — "iCl
0>0/10l}l
C"E/lOJl
FbF/IOJI
INPUT
INPUT
INPUT
INPUT
PRINT
PRINT "IS THE DATA COHhfCT"
COSUB 9000
IF ai»"*" GOTO 17*0
IF Qli"N" TKiN 1730 ELSE 1700
COSUa 9*101 GOSUB 99001 GOTO 1»B0
l«T*»*C*fr*E*F»6
PHINTI-I. A.BiC.DiE.PiG
IF IDIa"Y"I AND IB'OI GOTO Z190
272.
PRINT! iib,
PJtINT! 403 I
PRINT! 4b<<,
PRINTI ii».
USING SSiC
USING 5(1 D
USING SllE
USING S*IF
USING saic
1770
17!0
1790
laos
lilO
1820
laio
1140
1000
2010
2010
2030
1040
2090
2060
lOTO
lOBO
Z09D
tlOD
lUO
2120
2130
2140
1190
1160
2170
iiao
1190
1200
1210
1120
2.;30
^240
iiiO
1160
iOao
1010
1023
1010
4000
4010
4010
4033
404D
4090
4060
4070
4oao
4090
4100
4110
4110
4ise
41*0
4190
4160
4170
*1B0
4190
*200
*210
*220
4230
4240
4290
4160
4I7D
4iaa
9000
90 1 3
9010
903C
6000
6010
6020
6010
6d4 3
6093
bOtiD
bOTD
60BO
■393
bl03
6110
6120
6130
61*0
6190
7000
7010
7020
7030
•030
•010
•020
■010
■040
•090
■060
•070
•oas
• 090
• 103
■ 110
9000
9010
9010
9900
9910
9920
•910
9603
9*10
9620
casus 9610
PRINT
PRINT "IS THIS THC LAST DAY"
GQSUB 9000
IF OS'-N" AaA*li GOSUB 99001 GOTO 15B0
IF aSa"Y' GCITU IB40
CDTD IBOO
G'Gl+Tt F-Ti GOTO 1790
HEN iTtPE READ ROUTINE*
GOSUB 60DOI COSUa 9030
GOSUB 99001 INPUTf-li BB
PRINT* 20. BB
Print
PRINT "DAY"! TASUO) "A N O U N T S"
FOR XsL TO 4
AxQl B>01 CkQi 0*0 1 t>Dl F'OI C'O
lNPUTB-1, A.BiC.DiE.F.G
IF BeO GOTQ Z140
PRINTi PRINT Al TABI9I USING S(l BiCiD
PRINT ""I TaBIBI using S>I EtFiG
IF X»4 GOTO 7003
NEXT
FOR I<I TD 1033
GOSUa 9903
PRINT* 320. Sll" TOTAL IS"i USING SSIF
MINT! A^t, "TrtE TD-DaTE TOTAL IS"I USING SI I S
PRIHTl PRINT "PRESS ENTER TO CONTINUE"' GOSUB 9030
GOSUB 990Q
PRINT! 1941 "IS THERE ANOTHER HONTH "
GOSUB 9000
IF IM»<"1"1 ANO I0B""N"1 GOTO 1100
IF |Nla"l"l AND |0S3*r") Sl'Cl GaOl FaS; GOTO 1920
IF Oli'N" GOTO 1190
If 0»i"Y" GOTO 1020
GOTO Z210
REM •EN3-af-jaa rouTin£«
GOSUB 9900
PRINT! 461. "E N 3 OF JOB"
GOTO iOlO
HEH •PRINTER ROUTINE I IF PRINTER IS AVAILABLE)*
CDSUB 9900
PRINT "PLACE THi PRINTER ON-LINE"! PHINTl PRINT
GOSUB 603DI GOSUB 9000
GOSUB «90D
PRINT! 3Bb. "DATA IS BEINO HEAD f«OM 1*^"
INPUTi-li >l
LPRINT CHRKIZM POKE 16419tl
LPRINT TABI271 Bl
LPRIHT "■
LPRINT TABI9) "OAT"l TAB1271 ■* H U N T 5"
LPRINT ""
INPUTB-1, A.B.C.D.fitF.G
If laO GOTO 4190
IF A<10 Ya9
IF A>» ¥■*
LPRINT TtBIYIAI USIMC Sll B.C.O.E.F.O
PaPtERI16*2S)
IP P>9a THEN 4070 ELSE 4120
LPRINT "■
LPRINT TASI9IBII TABIIOI" TOTAL tS"i USING SBlF
LPRINT ■"
LPRINT TABI9) -TO-DATI IOTAL IS", USING SSlG
GOSuB 9 9 DO
PRINT! la*. "IS THERE ANOTHER MONTH TO MINT"
COSua 9003
IF 3ia"H" CUSi GOTO 1100
IF OI»"Y" ;iOI GOTO 4040
GOTO 4190
REK ■ALLOl'S 'ENTER' ONLY*
IS*""! ISilNKEYAt IF lO"" GOTO 9013
IF ASC(I>I*11 ClS else 9010
SETUNN
rem ■display prompts in large characters.
clSi print CNRIIIII
IF HS>"1" GOTO aObO
PRINT "START TaPE AT BEGINNING — OR — "
fRlNTl PRINT
PRINT "READ Tape to end of last month"
IF Hi<>"l" GOTO koaO
PRINT "TD-DATE TOTAL IS"! USING StiGl
phinTi print
PRINT "Place RCCDROER IN"I T»( "HOSE"
PRINT: PRINT
IF «»<>"!• GOTO 61*0
PRINT "ERASE FDRMARD SLIGHTLY"
PRINTI PRINT
PRINT "PRESS ENTER 1-1Ct* READY"
RETURN
REH iTIME DELAY FOR SCREEN DISPLAYS*
FOR 1*1 TD lOOOl NEXT
GOSUB 9900
PHlNTi GDTD lOSO
HEH lALLOi^ V OH N DN|.V«
Pi>-"l PS-INKEYll IF Pt'" GOTO aOlO
IF Pi="T" Return
IF Pti"N" return ELSE BOIO
Ren •allO' menu choices i or i or i only*
MtalNKEYSl IF H*-"" GOTO B030
IF (MA*"1"I OR |Mli"l"l OR (HS>-1-| GOTO 1210
GOTO 9090
REH ■ALLOW MENU CHOICE 4 DNLV^
Ht-INKEYll IF HS>"" GOTO ■D9D
IF M»«"4" RETURN
IF |P(a"V") AND IHS<"4"I GOTD BOtO ELSE BDBO
REH •.(AIT FDR CHOICE FROM «NU«
eSi""l BBUNKEYll IF B*""" GOTO 9Q10
RETURN
REM .SET SCREEN TO lARGE CHARACTERS*
CLS
PRINT CHRIII3I
RETURN
HEM ■Iero djt ahount buffers^
B>0: C*OE O'Ot E^Ol F>Oi GaO
RETURN
44 • BO Microcomputing. March 1980
the data correctT', with no, the
amounts are zeroed and the
same day is ready to be re-
keyed.
If you answer the prompt wrth
yes, the data is written to cas-
sette.
The next prompt "ts this the
last day" will write the monthly
total and locate total to the
cassette if you answer yes.
The last record written to
cassette has the first tax
amount zeroed out. This signals
the End of the Month choice
two.
The prompt asks "is there
another month" before continu-
ing or displaying the menu. If
you answer yes, the next month
is ready to be entered.
The Cassette Read
The menu choice two is ttie
cassette read. Four amounts
are displayed per screen layout
before more data is read in. The
total amounts are displayed
when the last record is read in
for the particular month. The
prompt "is there another month"
allows you to get back to the
menu or read in another month
from cassette.
Menu ctwice three terminates
the job.
It you have a printer ttte menu
choice four is essentially the
same as choice two. Follow tf>e
prompts and make sure your
printer is on-line.
The TV will display 'data is be-
ing read' as the cassette is being
played. One month is printed per
page for ease of reading. Stan-
dard 8 inch by 11 inch paper is
utilized.
If you have a printer that uses
narrower paper, you may have to
modify the program from line
4060 to line 4210 to match your
printer requirements.
There you have it. I hope you
will be able to save some of your
tax money next year. Maytw you
can even set up a service bureau
for others. It will take a full year
to accumulate your amounts.
Stick with it, as I did. and you
should see that you nr\ay have
t>een paying too much income
tax all along. ■
ADVANCED BUSINESS
SOFTWARE FORTHETRS-80*
FORECASTING
CAPITAL IHVESTMEHT
RISK ANAirSIS
PROOUCTIVITT ANALYSIS
FINANCIAL SMULATIOH
U.S. MACRO IIODEl
ThiM pmgtanii vi eiuniol lot tMimcii pl*nning in lodar t volaiil*
■cMomic clMniic Tan eiMi|ilti M*Kti run on TRS 80 LEVEL II mxltMitt art
Our mSX ANALYSIS maiM whtdi biingi lh« unctdMtMi mio Ikus m6
gnei tm the mforniiaiMin you niiri ui aiiv 10 tnaki mlocmtd buuniii
cboKM TlwnNNl«lcanlMuiMltad(WrMHwltitrMti*'P*>*^A.O.I.'il<H
an invtitmtnt. iht raaf* at caMi lot ■ coAtttuciion fiofia or tht diiir4iutio«
ol tatHir houri nteiM to comptett an tflUMaanng ittitgn Svmal Ml-ia
taatwai Maki Ifeii aM ol Ibt oaaioal tnk ^apawi li ma. Ttw onlf mpuli
raquKMl an Ida nwn bkalf. Iha 10\ and 90% poiMi lot tht vanabtai ol
■niaiasi From iNh inpuii Iha progiam aiBWaKaBi calculaiai Itta bala
cmt paiamaiaii Vanabtai mn ba addai miApbod ubtactad oi dwM m
Iht uHi modal aica This adds giaai hanbiiitir lo iim ptogtam and allOM
graat Ircadoin m salaciing Iha propai modal Thit Monia Carta nik modll
comas man daiailad Utai Instucttoni and can ba lun on 31K LEVEL H TR-
80 1 ipriMai ouipui opi>onali Cosi ol Iba fbik Analriis 'nodal is
149
Anothci piogiair- usalul foe busmass planning n oji CAPITAL BUDGETING
progran Mhich anaifies *Jk depfaoaiion and lai iiipacis for tn imasimant
proiacT Tnt program allOMS mvesimani and 'Cvenuc siraamt 10 vary o*ar ihe
■nvtllntfir ititint and includts S dittarcnl dtprtcialion mtlhods Tht
actorc and aliei lai cashtio* lor tath ^tai is snown along Mih iht stimiwv
data Tlw sjmmwY gaiisMs lor ha CAPITAL I program wclwdti ihc R 1 Iht
net picstfll valui tht parbact period, iht distouni laii icosi of tapilaii and
the p)Ofilabilil) «idta Tm cdsi oI iht Capital Bjdgiltng PTogram 11 1Z7
Call or wnte Iw coMipttia inlafmaiion
APPUEO ECONOMIC ANALYSIS
4005 locust Ave . Long Beach. Ca 90807
(2l3)42«-3»2 ^47
*TrMlamarli of Tandy Corp
^ «««"» t RACET ec^uTE. 4 llgK SIRT MiMI 'IIM'for mod I AND MOD ir TRS-aO'-
V...T Mow you can sort »n B5K ditkettR _,__
FAST ~- in tats than 3 minutas* - PAST
Now you can sort an B5K diskotto
in tass than 3 ninutos*
F*erfect for your multi-diskette RANDOM file mailing lists, inven-
tory, etc. (deal for specialized report generation, sort, merge or
combination. AN machine language stand-alone package —
Efficient and easy to use. No separate key files required! Physical
records are rearranged on diskette! Supports multiple sub records
per sector including optional sector spanning. Sorts on one or
more fields — ascending or descending. Sort fields within records
may be character, integer, and floating-point binary. Provides
optional output field deletion, rearrangement, and padding.
'Sort timings shown below are nominal times. Times will vary
based on sort and system configurations. Nominal times based
on Mod 1 48K 4Hjrive configuration, 64 byte records, and 5 sort keys.
TYPE FILE SIZE SORT TIME TYPE FILE SIZE SORT TIME
(BylM) (Seel
340K 1DB1
680K 2569
85KSOFIT+ 1757
1275K Merge
OSM lor Mod I (Minimum 32K. 2-drives) S75 Oit-Dtek
DSM lor Mod II (Minimum 64K. 1-drive) $150 On-INsk**
Mod II DewlopiMiit Packao* tlOO* *
Machine Language SUPEFtZAP, plus Editor/Assembler and
Disassembler patches.
Mod II GenaraUzed Subroutine Facility *QSF S50* *
"For Mod II Programs, Include Mod II DOS diskette with order
For Oevelopnwnt Package, also include copy of Apparat
NEWDOS -f 5Va diskette.
SORT
(iytH)
i6k
33
SORT
SORT
32K
49
SORT
SORT
85K
173
SORT and
SORT
170K
445
MERGE
CHECK. VISA. M/C. C.O.D.
CalH. Rasidanta add 6%
Telephone Orders Accepted (714) 637-5016
OD BASIC lor Level II and Disk Systems S40^
Full MATRIX Functions — 30 BASIC commands) !
Mathematical ar>d common matrix functions. Change arrays In
mid-program. Complete array hartdllng. Tape array read and write.
including strings. Common subroutine calls.
Over 50 more STRING Functions as BASIC commands'! String
manipulation, translation, compression, copying, search, screen
control, pointer manipulation and utility furtctlons. Includes
multikey muttlvariabte machirte lar>guage sorts. Load only macMna
language functions that you want! Where you want In memoryl
Relocating linking loader! More than you ever expectedtl
oo BUSINESS{Reqiilre8lnflnfleBASiqt20^
20 Business oriented functions includlr>g:
Printer Automatic Pagination with headers and footarsi
Packed Decimal Arithmetic( + ,-,*,/) 127 dlgltst
Binary array searches and hash code generator!
COM PROC Command Processor lor Disk Systems S10M
Auto your disk to perform any sequence of DOS conHnands,
machine language loads, BASIC, memory size, run program.
respond to input statements, etc. Single BASIC command tile
defines execution! Includes auto key-debounce, screen print and
lower case software driver.
REMODEL -I- PROLOADteclfy16,a%ar48KMamaiySMLH
REnumber any portion or all of BASIC program. MOve any portkm
of program from one location to another. DELete program lines.
MERGE all or any portion from tape. Save arKl verify portion or
all of combined merged programs to tape.
GSF (Specify 16. 32. or 4aiQ 624^
18 Machine language routines. Includes RACET sorts.
ns-H a A fKBISTEm TUDEHAM tF TAMT CNPOMTIIN
WHCNONDErnHQ PLEASE
ADVISE PUBLICATION SOURCE
^41
^ RACET COMPUTES-^
TK Padntfalo. Oranfft CA IZMS
i-^AvmMrSwMc*
p»gat47
80 Microcomputing, March 1980 • 45
UTILin
With these programs you can print files
while running another program entirely!
SPOOL and DESPOOL
H. S. Qwitry
Rt. 1. Box 39B
Earlysville. VA 22936
Simultaneous Peripheral
Output Overlap (SPOOL) la
a tectinlque used by most large
computer systems to prevent
program delay because a slow
peripheral, like a printer, is not
ready. The output data Is written
(spooled) on a mass storage de-
vice and then transterred (de-
spooled) when the peripheral is
ready.
Spool
Tt>e TRS-80 spooler system is
divided into two maior sections,
SPOOL and DESPOOL The first
ot these sections is the output
spooler, shown in Listing 1.
The code in line numbers 300
through 440 requests the file
name and places it in the device
control block (DCB) for the file.
Line numbers 470 through 540
open an existing file or create a
new one and check for errors, If
any error Is found, an error
message is printed and the
spool operation is terminated.
If the file opens without error
then lines 550 through 590 con-
nect the spooler to the printer
DCB and return control to the
operating system.
Now, each UmB the operating
Program Listing 1.
00100
»TMIS IS THE PRINTER SPOOLER -
UHEN LOADED
00110
fIT UILL INTERCEPT ALL PRINTER
OUTPUT AND
00120
(STORE
IT IN A
256 BYTE BUFFER
UHEN THE
00130
(BUFFER
IS FULL THE DATA
IS URITTEN TO
00140
(THE SPECIFIED
FILE. THE
SPOOL FILE MUST
OOISO
IBE CLOSED BY RUNNING THE
SYSTEM PROGRAM
OOl&O
* CLOSE.
00170
i
44A7
001 BO
DISP
EOU
4467H
0040
00190
INPUT
EQU
40H
402A
00220
PRDD
EOU
4026H
402D
00230
DOS
EQU
402DH
4428
00240
CLOSE
EQU
442BH
4420
00 250
INIT
EQU
4420H
443C
00270
00280
URITE
EQU
443CH
FEOO
00290
ORG
OFEOOH
FEOO
21C5FE
00300
SETUP
LD
HLrMSGl
fLOG ON
FE03
CD6744
00310
CALL
DISP
FE06
21A4FE
00320
LD
HLiINBFR
FEOV
0620
00330
LD
Bf32
FEOB
CD4000
00340
CALL
INPUT
FEOE
78
00350
LD
AfB
fOET ACTUAL •
FEOF
B7
00360
OR
A
system (DOS, BASIC, etc.) at-
tempts to print a character, the
code in lines 650 through 930 Is
activated. The character is
counted and stored in a 256 byte
buffer. When this buffer is full it
is written to the disk. This pro-
cedure continues as long as the
user allows it or until an error Is
detected.
When the spool operation Is
completed you must close the
spool file. This Is necessary for
two reasons.
First, the data printed may
not have ended on a 256 byte
boundary. Thus, some data may
be in the buffer that has not
been written to the file. Closing
SPOOL will detect this situa-
tion, set the unused area of the
buffer to zeroes and write the
last buffer to the file.
The second reason is that the
system program CLOSE must
be called to update the disk
directory.
The spool system performs
both of these close opwations,
if control is transferred to label
KLOSE (location FE76H in
Listing 1). This may be done by
entering DEBUG and typing
GFE76. The memory containing
the KLOSE program, the file
DCB, the pointers and the 256
byte buffer must not be changed
46 Microcomputing. March 1980
until the close operation is
done.
If you don't like using DEBUG
to close your file you can create
a close program as follows: load
(but don't execute) tfie SPOOL
program, tt>en dump the KLOSE
part of SPOOL to a disk file
called CLOSeCMD. Don't dump
more memory than needed. Ac-
tually, you only need an execu-
tion (transfer) address.
The dump command to close
the file for the SPOOL in Pro-
gram Listing 1 Is: DUMP CLOSE/
CMD:0 {START = X'FE76',END
= X'FE9D'.TRA = X'FE76').
Now, after your spool opera-
tion is finished, return to DOS
and type CLOSE. The file is then
closed and the spool operation
terminated. You are left with an
ASCII file containing all the
printer output since the spool
was started.
Despool
If you want to print a copy of
the spool file the command
PRINT could be used. However,
this ties up the system while the
printer is running.
Fortunately, there is a better
way, DSPOOL, shown in Listing
2. This program opens the spool
file for printing and returns to
the operating system.
The data In the file is then
printed while you perform al-
most any other job on your sys-
tem. That's right, you can run a
BASIC program or perform other
disk operations while the file is
being printed.
There are only a few excep-
tions; You cannot re-boot the
system; You cannot write to the
spool file while despooling; You
cannot print data in the regular
DOS manner until the despoot is
completed; You cannot spool on
file while despooling another.
The last restriction is in-
cluded only because SPOOL
and DSPOOL use the same
memory.
If you move one of the pro-
grams to another location, you
could SPOOL and DSPOOL at
thesametlme, although you still
may not write and read the same
file at one time. You must use
two different file names.
DSPOOL uses two links to the
operating system, one to the 25
millisecond interrupt and anoth-
FEIO 28EE
00370
JR
Z. SETUP
tNO INPUT
FE12 EB
00380
EX
DE'HL
FE13 83
00390
ADD
ArE
fADDRE5S>«
FE14 6F
00400
LD
Lf A
!LOU ADDRESS
FE15 7A
00410
LD
AfD
fHI ADD
FEIA CEOO
00420
ADC
AfO
FEIQ 67
00430
LD
HrA
tHI ADDRESS
FE19 3620
00440
LD
(HL)f20H
f BLANK CR
00450
;iNEiFR
NOU HAS
FILE SPEC UITH
TRAILING BLANKS
00460
ilNIT
THE FILE
FEIB 21E1FE
00470
LD
ML » BUFFER
(PLACE
FEIE 11A4FE
00480
LD
OEflNBFR
iDCB
FE21 0600
00490
LEI
BfO
FE23 Cl\20AA
00500
CALL
INIT
fOPEN IT
FE26 2809
00510
JR
ZrOK
iZ=l IF OK
FE28 21D5FE
00520
LD
HL.ERH
FE2B CD6744
00530
CALL
DISP
FE2E C32D40
00540
JP
DOS
SAND GET OUT
FE31 2A2640
00550
Oh
LD
HL»(PRDD)
»OLD DRIVER
FE34 22A2FE
00560
LD
(SAUDD)»HL
(SAVE IT
FE37 2140FE
00570
LD
HL. DRIVE
iNEU DEIVER
FE3A 222640
00580
LD
(PRDD) rHL
(PUT IT IN
FE3D C32ri40
00590
JP
DOS
(DONE
00600
iFILE
IS OPEN
- THIS IS THE ACTUAL DRIVER |
00610
JIT UILL STUFF
THE CHARACTERS
IN THE BUFFER 1
00620
fIF THE BUFFER
IS FULL A URITE TO THE DISK |
00630
• UILL
BE DONE.
00640
»
FE40 E5
00650
LiRIUE
PUSH
HL
FE4I F5
00660
PUSH
AF
FE42 2A9EFE
00670
LD
HL» (PRT)
(POINT TO BUFFER
FE45 71
00680
LD
(HL) -C
;SAVE CHARACTER
FE46 23
00690
INC
HL
FE47 229EFE
00700
LD
(PRT) rHL
FE4A 3AA0FE
00710
LD
A.<CCNT)
(COUNT
FE4D FEFF
00720
CP
OFFH
(DUN
FE4F 2807
00730
JR
ZfOUT
FE51 3C
00740
INC
A
(COUNT IT
FE52 32A0FE
00750
LD
(CCNT). A
IPUT IT BACK
FE55 Fl
00760
POP
POP
AF
FE56 El
00770
POP
HL
FE57 C9
00780
RET
fGO BACK
FESe C5
00790
OUT
PUSH
BC
FE59 05
00800
PUSH
DE
FE5A DDES
00610
PUSH
IX
FE5C FDE5
00820
PUSH
lY
FE5E liA4FE
00B30
LD
DE.INBFR
(DCS
FE61 CD3C44
00840
CALL
URITE
FE64 21E1FE
00850
LD
HL. BUFFER
FE67 229EFE
00B60
LD
<PRT).HL
(RESTORE POINTER
FE6A Af
00B70
XOR
A
»A=0
FE6B 32A0FE
00880
LD
(CCNT). A
FE6E FDEl
00890
POP
lY
FE70 DDEl
00900
POP
IX
FE72 Dl
00910
POP
DE
FE73 CI
00920
POP
BC
FE74 18DF
00930
JR
POP
00940
fTHIS
IS THE CLOSE ROUTINE -
CALLED BY
00950
iTHE CLOSE FUNCTION TD CLOSE
OUT THE LAST
00960
;record and then close the file I
FE76 3AA0FE
00970
KLOSE
LD
A. (CCNT)
(COUNT
FE79 67
00980
OK
A
FE7A 2813
00990
JR
Z.KLDS
(NO DATA CLOSE FILE
01000
(DATA
IN FILE
- NULL REHMAINPER THEN URITE AND CLOSE |
FE7C 2A9EFE
01010
LD
HL. (PRT)
FE7F 3600
01020
LOPC
LD
(HL) .0
FEBl FEFF
01030
CP
OFFH
(DUN
FE83 2804
01040
JR
z.URir
(FULL URIT IT
FE85 3C
01050
INC
A
FEB6 23
01060
INC
HL
FEB7 18F6
01070
JR
LOPC
01080
;this
IS THE URIT TO THE DIS^
ROUTINE
FE89 11A4FE
01090
URIT
LD
DE.INBFR
(DCB
FEBC CD3C44
01100
CALL
URITE
OHIO
iTHIS
IS THE CLOSE ROUTINE -
IT UILL CLOSE THE
01120
sfile
FESF 11A4FE
01130
KLOS
LD
DE.INBFR
(DCB
FE92 CD2844
01140
CALL
CLOSE
FE95 2AA2FE
01150
LD
HLf (SAVDD)
FE9B 222640
01160
LD
(PRDD) .HL
(RESTORE PRINTER
FE9P C32D40
01170
JP
DOS
(DONE
FE9E EIFE
01180
PRT
DEFU
BUFFER
FEAO 0000
01190
CCNT
DEFU
FEA2 0000
01200
SAVlPti
DEFU
FEA4 20
01210
INPFR
DEFM
FEC5 53
01220
MSGl
DEFH
'SPOOL FILESPEC' |
FEri4 03
01230
DFFB
3
1
80 Microcomputing, March 1980 • 47
FEDS 53
01240
ERH
DEFM 'SPOOL ERROR'
FEEO 03
01250
DEFB 3
FEEl 00
01260
BUFFER
DEFB
FEOO
01270
END SETUP
00000
TOTAL
ERRORS
28521
TEXT
AREA BYTES LEFT
BUFFER
FEEl
01260
00470
008S0 01 ISO
CCNT
FEAO
01190
00710
00750 00880 00970
CLOSE
4428
00240
01140
DISP
4467
00180
00310
00530
DOS
402D
00230
00540
00590 01170
DRIVE
FE40
00650
00570
ERH
FED5
01240
00520
INBFR
FEA4
01210
00320
00480 00830 01090 01130
INIT
4420
00250
00500
INPUT
0040
00190
00340
KLOS
FEBF
01130
00990
KLOSE
FE76
00970
LOPC
FE7F
01020
01070
MSGl
FEC5
01220
00300
OK
FE31
00550
00510
OUT
FE58
00790
00730
POP
FE55
00760
00930
PRDD
4026
00220
00550
00580 01160
PRT
FE9E
01180
00670
00700 00B60 01010
SAUDD
FEA2
01200
00560
01150
SETUP
FEOO
00300
00370
01270
WRIT
FE89
01090
01040
URITE
443C
00270
00840
01100
Program Listing 2.
00110
JPRINTER DE-SPOOLER - UHEN
LOADED IT CONNECTS
00120
J TO THE
25HS INTERRUPT AND
TO THE KEYBOARD
00130
fSCAN ROUTINE.
THE SPECIFIED FILE WILL BE
00140
(LOADED
ONE RECORD AT A TIME INTO LOCAL BUFFER
00150
SAND THE INTERRUPT HANDLER
WILL
PRINT ONE
00160
fCHARACTER EACH
TIME THE PRINTER IS READY.
001 70
;UHEN THE EOF IS FOUND THE
LINK
TO THE
00180
; INTERRUPT HANDLER AND THE
KEYBOARD SCAN
00190
fIS REMOVED.
00200
T
4467
00210
DISP
EQU
4467H
(DISPLAY MESSAGE
0040
00220
INPUT
EOU
40H
(INPUT HESSAOE
4424
00230
OPEN
EQU
4424H
(OPEN A FILE
4436
00240
READ
EQU
4436H
(READ A FILE
4510
00250
MS25
EQU
451 OH
125 MS QUEUE
4016
00260
KBOD
EQU
4016H
{POINTER TO KEYBOARD
402D
00280
DOS
EQU
402DH
(RTN TO DOS
OOEA
00290
CNTREG
EQU
OEAH
tCONTROL/STAT UART
OOEB
00300
DTAREG
EQU
OEBH
(DATA
3FFF
00320
ALI)J
EQU
3FFFH
OOEB
00330
RE3URT
EQU
OEBH
00E9
00340
00350
SWITCH
i
EQU
0E9H
FDOO
00360
WtG
OFDOOH
FDOO
D3E8
00370
SETUP
OUT
<RESURT)fA
(RESET UART
FD02
DBE9
00380
IN
A> (SWITCH)
(READ SWITCHES
FD04
E6F8
00390
AND
0F8H
(KILL LOW THREE
FD06
F604
00400
OR
04H
FD08
D3EA
00410
OUT
(CNTREG) > A
FDOA
DBE9
00420
IN
Af (SWITCH)
FDOC
E607
00430
AND
07H
FDOE
2172FD
00440
LD
HL.BDTABL
FDll
0600
00450
LD
BfO
FD13
4F
00460
LD
CtA
FD14
09
00470
ADD
HLjBC
F015
7E
00480
LD
Ar(HL)
FD16
D3E9
00490
OUT
(SWITCH) rA
00500
!UART IS SETUP
NOW TALK TO
OPERATOR
FD18
2141FE
00510
LD
HL.MSGl
FDIB
CD6744
00520
CALL
DISP
FDIE
2ilAFE
00530
LD
HLf INBFR
FD21
0620
00540
LD
Bf32
FD23
CD40O0
00550
CALL
INPUT
FD26
78
00560
LD
AfB
(BET ACTUAL •
FD27
B7
00570
OR
A
FD28
28D6
00580
JR
Z» SETUP
INO INPUT
FD2A
EB
00590
EX
DEtHL
FD2B
83
00600
ADD
A*E
tADDRESS-f*
FD2C
6F
00610
LD
LfA
(LOU ADDRESS
FD2D
7A
00620
LD
AfD
(HI ADD
er to the keyboard driver.
The TRSW hardware Inter-
rupts the microconnputer forty
times per second. The operating
system uses this interrupt to run
ftxeground tasks. These tasks
include the real time clock,
TRACE, or any job you'd like to
run.
To run a given )ob you need to
store the address of a pointer In
the 25 millisecond queue list.
The queue list Is at memory
location 4510H and 4511H. The
pointer is two memory bytes
containing the address of your
program.
This is a little confusing so
let's look at Listing 2 to see what
it means.
Lines 800 through 850 put the
address of something called
PINT in locations 4510H and
451 1 H. Notice that the code also
saves the former contents of
4510H, 4511 H to be put back
later. RNT is a pointer that con-
tains the memory address of
your program.
In this example, 4510H, 451 1 H
contains FD7A (the address of
PINT) and FD7AH contains the
address of INTHDL (FD7CH).
Now, every 25 milliseconds
INTHDL, the interrupt handler, is
run.
INTHDL
The function of the DSPOOL
interrupt handler INTHDL Is very
simple. It checks the RS232
board to see if it will accept an
output character. If the RS232
board is not ready, INTHDL
returns to the operating system.
If a character can be output,
INTHDL ctwcks CCNT.
As long as CCNT Is zero,
INTHDL returns to the system. If
it isn't, one character is output
and counted. If the charactw is
a can-iage return, the buffer is
set up to output a line feed. As
long as there is data in the buf-
fer, INTHDL will print it. All of
this takes place in time stolen
from your other work by the in-
terrupt.
Getting data to the buffer is
SCAN'S job. SCAN reads one
record every time the print buf-
fer is empty (CCNT=0). It is
linked to the TRS-80 keyboard
driver and runs every time the
system checks the keyboard for
input.
48 • ^ Microcomputing, March 1980
IWEB ^ ASSOClATESi
\iiim^ Tis-srowNEis imijn
SAVE "TONS" OF TIME TYPING IN YOUR BASIC PROGRAMS with TSHORT^
WEB'S FAMOUS SHORTHAND FOR LEVEL II and DISK BASIC
TRS-80 Keyboard with TSHORT Deca/s installed.
'Works with ail LEVEL II and Disk Operating Systems including
NEWDOS
•31 preprogrammed statement keys
* One KUSTOM""kev, up to 64 characters — changeable anytime
* 42 key decals (see picture). 10 are different for disk users
" A single, shified-key entry types entire statement on screen
* Only 580 bytes of machine language in low memory
" Comes on cassette, one side for LE VE L 1 1 , the other for DOS
* DOS version loads to and executes from disk via TAPEDISK
' Features self-entering commands, i.e. CONT; GOTO! 0; KUSTOM
* TSHORT with four page instruction manual $9.95
TSEL'" - We'll convert your IBM SELECTRIC to a high quality
printer — /ip control - 512 character buffer - special TRS-80
cable with custom control switches - complete and ready to
LPRINT (cleaning and minor service included) $795.00
(Options and shipping extra — call or write for special shipping
instructions)
TLEC" - EPROM and cable interface kit for your IBM ELEC
TRONIC 50 or 60 - comes with custom control switches,
installs in minutes $289.00
TBEEP'^" - For LEVEL II and DISK USERS - A self contained
audio alert beeper with a pager-like tone. A simple BASIC pro-
gram commands it to beep, i.e.: OUT 255, 1: FOR 1=1 to 300:
NEXT: OUT 255,0. Plu^ in-line with "AUX" cable from your
TRS-80 (Requires 9V Battery) $ 19.95
TBUFF™ - For LEVEL II CASSETTE USERS. Eliminates, once
and for a\\, cassette relay sticking. Plugs in-line with the "REMote"
cable between your TRS-80 and cassette recorder.
(Specify cassette recorder make and model) $ 9.98
TPAK'" - Pack of lOC-IOblank tape cassettes with box and blank
labels. (AGFA 611 tape, the best money can buy) . ... $ 12.95
TO BE RELEASED EARLY 1980:
TBASE™ - A powerful DATA BASE MANAGER program second
to none! A $400.00 value for $ 29.95
TCHAIN^" - For LEVEL II USERS - Preserve your variables and
arrays while CLOADing multiple programs, EDITing, or execut-
ing RUN $ 9.90
s
Send check or money order to: WEB ASSOCIATES
TELEPHONE ORDERS: PO- BOX 60 QC, MONROVIA, CA 91016
(714) 559-6249
[Calif, residents add 6% tax)
^27
DEALER INQUIRIES INVITED
SORRY -NOC.O.D.'S
FOREIGN ORDERS ADD 20%
UP TO 25% OFF*™fl
YOUR OWN TRS-80 SYSTEM AT TREMENDOUS SAVINGS
VIstt our new Store at 20th A IKmlnUt, PMIa., PA
MO-
rrcM
Level II— 4k
Level II— IM
Expaneion Interface
UmDtMiCMM
CvnrroFUCs 779 PfinWr
C«n(ronict 101 PntMr
Anwlaii DP-aOOO PnnW
Mvmo'r Kit^lSKt -'I s^">
VwrtMlMK OMUnMM
3
10
C-IOC mmW ^
^^m (9* I > 1 1 tantou
}MOsrt«Mii
$619.00
$W9.00
$299.00
1 495 00
I1M900
ti5«600
StZ9S0O
. S 14900
S &9S
S 1799
S 5900
S 495
S ?4 75
i 3500
$575.70
$799.60
$27B.00|
s 3esoo
tiwsoo
S140000
I 9KX
I MOO
t «9S
S i?00
% 37 00
! 450
I 16 75
1 MiS
SALE
Centronics 730
$850.00
$99.W
$149.00
TRS-M MODEL II $3626.00
• 64K RAM
• 'h MEG DISK
AODinONAL OtSK OAIVE (1ST) S1069 SO
A0DniO*ML0ISKDmvE(2N0 4^ WD) S5S8 00
VR Drta'a tol Drhm tM».00
BUSINESS SOFTWARE
Modal II
Payroll $199.00
General LEDGER $19900
(inc. AP, AR, fltc.)
DATA BASE
MANAGE MEhfT
SYSTEM $249.00 $ 1 49.00
Documentation only (each Package) $5.00
GENERAL SOFTWARE
NEW DOS ^ 35 tk 40 tk.
$99.00 $110 00
Electric Pencil Tape Disk
$99.00 $150 00
Upper/Louver Case Conversion
Tape $1995 Disk $24.95
Diagnostics Tape/Disk $34 55
Household Inventory
Loan Amorttzalion Schedule
Disk $19 95
$19 95
U
TOLL FREE
H800) 345-8102 Orders only'
FOREIGN and DOMESTIC DISTRIBUTORSHIPS AVAILABLE . . .
MARCH SPECIAL
(Good until 3 31 80)
MINI-DISK DRIVES
$350-00
—NEW—
5' 4 Disk Head Cleaner Kit $14.95
NOW OPEN
VR DATA S Computer
Repair Center
There we new devetopmenti every day —
wrtta or call for Ihe Meet IntermaUon.
N-*
Fotcnit PA 19031
mS) 461-5300
pn
Same as Line Printer II
Tllfttttllllllllllllllllllllll
XXI
>^ R^ttitr Service— 5«« pagm 147
80 Microcomputing, March 1980 • 49
FD2E:
CEOO
00630
ADC
AfO
FD30
67
00640
LD
Hf A
;HI ADDRESS
FD31
3620
00650
LD
(HL)»20H
(BLANK CR
00660
f INBFfi
NOU HAS
FILE SPEC WITH TRAILING BLANKS 1
00670
f INTERRUPT DRIVER IS LINKED ANY
TIME CCNT IS
00680
(NOT ZERO IT WILL PUT OUT THE NEXT CHARACTER |
00690
J
00700
fNObJ TIME TO OPEN THE SPOOL FILE |
FD33
2161FE
00710
LD
HLfBUFFEft
{PLACE TO PUT DATA
FD36
lllAFE
00720
LD
DE-INBFR
;dcb
Fri39
0600
00730
LB
B.O
;lrl=o
FD3E
CD2444
00740
CALL
OPEN
FD3E
2809
00750
JR
Z.OK
(Z-1 IF OK
FD40
2152FE
00760
LD
HL-ERM
FD43
CD6744
00770
CALL
DISP
FEI46
C32P40
00780
JP
DOS
lAHD GET OUT
00790
;link
25 MS DRIVER
FII49
F3
OOBOO
DK
DI
FD4A
2A1045
00810
LD
HLt (MS25)
fOLD ONE
Fii4ri
225FFE
00820
LD
<SAV25) fHL
fSAVE IT
FD50
217AFD
00830
LD
HLtPINT
fPDINTER
FD53
221045
00840
LD
<MS25) -HL
;link
FD56
FB
00850
EI
FD57
2A26FE
00860
LD
HLf (SEC)
fGET SECTORS
Fri5A
2217FE
00870
LD
(SECTOR) -HL
FD5D
3A22FE
OOBSO
LD
A» (BX)
fGET BYTES TO EOF
FII60
3219FE
00890
LD
(BCNT)tA
00900
;file
OPEN DK
NOW LINK KBD SCAN
AND GET OUT
00910
JKBD SCAN UILL
THEN FIND BUFFER
EMPTY
00920
iAND READ A RECORD.
FD63
2A1640
00930
LD
HL. (KBDD)
SGET OLD ADDRESS
FD66
22C9FEI
00940
LD
(KEY) ,HL
fSAVE FOR CONTINUE
FD69
21&9FD
00950
LD
HLfSCAN
►NEW SCAN
FD6C
221640
00960
LD
(KBDD) f HL
(LINKED
00970
fSCAN
IS NOW LINKED. NEED ONLY
TO ENABLE
00980
S INTERRUPTS AND GET BACK TO BOS
. SCAN WILL
00990
;be run euery
TIME KEYBOARD IS
CHECKED
01000
JINTHDL WILL BE RUN EUERY 25 MS
FD6F
C32D40
01010
JP
DOS
fGET OUT
01020
f THIS
IS THE EAUDE RATE TABLE
FD72
22
01030
BDTABL
DEFB
22H
FD73
44
0104Q
DEFB
44H
FD74
55
01050
DEFB
SSH
FD75
66
01060
DEFB
6AH
FD76
77
01070
DEFB
77H
FD77
AA
01080
DEFB
OAAH
FD78
CC
01090
DEFB
OCCH
FD79
EE
01100
OHIO
DEFB
OEEH
01120
(THIS
IS INTHDL THE INTERRUPT HANDLER
01130
SIT UILL PRINT
A CHARACTER IF CCNT IS NOT
01140
JZERO
AND THE
PRINTER IS READY.
FD7A
7CFD
01150
PINT
DEFU
INTHDL
fPOINTER TO INTHDL
FD7C
F5
01160
INTHDL
PUSH
AF
fSAVE AF
FD7D
E5
01170
PUSH
HL
FD7E
3AFF3F
01180
LD
A* (ALIiJ)
FDSl
3C
01190
INC
A
FD82
32FF3F
01200
LD
(ALIV)fA
FDS5
DSEA
01210
IN
Af(CNTREG)
(STATUS
FD87
CB77
01220
BIT
6fA
(READY
FD89
281F
01230
JR
ZfCONT
(NOPE GO ON
FD8B
2A3FFE
01240
LD
HL»<CCNT)
(CHAR COUNT
FD8E
7D
01250
LD
A>L
FD8F
FEOO
01260
CP
FD71
2005
01270
JR
NZ»OTPT
(PUT IT OUT
FD93
7C
01280
LD
ArH
;L=0 CHECK H
FD94
FEOO
01290
CP
FD96
2812
01300
JR
Z.CONT
(ALL ZERO GET OUT
FD98
2B
01310
OTPT
DEC
HL
(-1
FD99
223FFE
01320
LD
(CCNT).HL
(PUT IT BACK
FD9C
2A3DFE
01330
LD
HLf (ADDR)
(GET ADDRESS OF CHAR
FD9F
7E
01340
LD
A.(HL>
(DATA
FDAO
D3EB
01350
fXJT
(DTAREG)f A
(OUTPUT IT
FDA2
FEOD
01360
CP
ODH
(IS IT CR?
FIIA4
2807
01370
JR
ZiCR
(YES
FDA 6
23
01380
INC
HL
(BUMP ADDRESS
FDA7
223DFE
01390
LD
(ADDR)rHL
FDAA
El
01400
CQNT
POP
HL
FDAB
Fl
01410
POP
AF
FDAC
C9
01420
RET
(DONE GET OUT
01430
f FOUND CR INSERT LF
FDAD
3E0A
01440
CR
LD
AtOAH
fCft
FDAF
77
01450
XCR
LD
(HL) rA
(PUT IN BUFFER
01460
fAND DONT RUMP
ADDRESS
FDBO
2A3FFE
01470
LD
HL»(CCNT)
(GET COUNT BACK
FDB3
23
01460
INC
HL
(PUT 1 IN FOR LF
FDB4
223FFE
01490
LD
(CCNT)»HL
(PUT IT BACK
FDB7
18F1
01500
01510
i
JR
CONT
(GO ON
01520
iTHIS
IS SCAN
- IT IS LINKED TC
KEYBOARD SCAN
If there is data in the butler,
SCAN returns control to the key-
board driver. But, if the buffer is
empty, SCAN performs a file
read, delaying the Iceyboard in-
put for about one second.
If all the data has been read
from the file, SCAN disconnects
the DSPOOL program.
If your printer is 110 baud, the
disk reads occur about every 30
seconds. The spool system
does not drive any printer (aster
than 40 characters per second
(one per interrupt).
If your printer is faster than
this, it vifill slow down to 40 CPS.
At 40 CPS the disk reads occur
about every 7.5 seconds. If
reading at this rate interferes
with the keyboard too much,
then add a counter to INTHDL to
stow the printer and thus the
reads.
Another technique that re-
duces disk reads is reading two
(or more) sectors at a time.
However, this complicates the
procedure used to find the end
of the data.
Modifications
The DSPOOL program shown
in Listing 2 is for a serial printer
using the Radio Shack RS232
tward. The program can t)e used
with a parallel printer (such as
the standard printers sold by
Radio Shack) by making a few
changes.
Delete lines 370 through 500
and move the label SETUP to
line 510. Replace lines 1210
through 1230 with the code in
Listing 3. Replace line 1350 with
LD (37E8H),A.
If your printer automatically
feeds a line on every carriage
return then delete lines 1360
through 1370 and lines 1430
through 1500.
If you use SPOOL-DSPOOL
withNEWDOSorNEWDOS30,it
works as is. If you use it with
TRSDOS 2.1. TRSDOS 2.2 or
VTOS 3.0, you must add DEC HL
between lines 860 and 870. This
is necessary because the NEW-
DOS DCB maintains the number
of sectors in a file, while the
other systems maintain the
number of sectors plus one.
If you use TRSDOS 2.2,
change the program ORG and
move twth programs down to at-
50 • 50 Microcomputing, March 1980
Scanned by Ira Goldklang - wviw.trs 80.com
Can yvor comptJttr raad und sofvt Thu probfrm by itaaff^
"ON THEIR VACATION, TOM AND DICK VISITED A
FARM. WHILE THERE, THEY NOTICED A PEN
CONTAINING CHICKENS AND PIGS. TOM SAID
THERE WERE 3 TIMES AS MANY CHICKENS AS
PIGS. DICK SAID HE COUNTED 100 LEGS IN THE
PEN. HOW MANY CHICKENS WERE IN THE PEN?"
I
with N LOS/1, it can!
NL0S/M6K; NLOS/2-32K, LARGER
VOCABULARY, FASTER. ACTION VERBS-
CREATES AND RUNS ITS OWN BASIC
PROGRAMS- LEARNS PROCEDURES!
STOP PROGRAMMING YOUR COMPUTER,
EDUCATE ITI icASSETTE
I
SOURCE
$1.95
ORDER TODAY!
$4.95
CYSEkMATE »
R.D.^3B0X 192A
NAZARETH PA 18064
THE ULTIMATE TR8-aO SPEED-UP!
Mumtoid MicroSyslemsannouncBSlhereleaaeDtlheSK-2 TdOFnostuersalile clock modidcHlion
(or the TRS-SO auBilaele li leaiufes three speeds normal (' ?7MHi). 50% iBSter o' 50^ slower,
selectable al any lime wilhoul mte'rupling e«9Culion or ciastimg l(ie prografn il rnay be
conliqurert fty ine user lo cdange speed *itn a loggle swilth or on soflware commana It rnay be
lied lo ineeipansion interface and will automatically returrr lo normal spueO anytime a disk drive
IS active It Bver^ has provisions lor adding an LED 10 indicate wnen Ihe compular la not at Ifie
normal 4pe«d II mounts ns*de the keyboard ur>it with only * necessary coonect'ons for ttie switch
option (switch not ir^cljdi^j and is easily rerr^oved if the corripuler ever needs service The SK-2
coiT>es lutly assernbled with illustrated in5lri,ctiO"i for imcien^enting the various ootions and
coTioiele satisfaction ^s guaranteed S24 95
DUPLICATE SYSTEM TAPES WITH "CLONE "
This machine language program mades duplicate copies of ANY tape written lor Level ii They
may Oe SYSTEM tapes (continuous or not) c data lists It isnotnecessafy toknawihefilenameoi
where it loads in memory, and there d no chance ol iysleoi co-residency The file name, entry
point and every byte (in ASCII formati are dispiayedon irwvideoscreen Data may t» modified
be lore copy IS produced CLONE Si6 95
RAM TEST FOR LEVEL II
This machine language program rests rnemory chip^ lor open or shorted address or data Imes as
well u iniafTTntients It Tests sacn BiT for ^Bhaity and each BYTE in the *ii»CLjtion of an actual
mstriict^on aa m rsal prDgfamenecuiion Bad aadr^euesaredispiayedalongMriihThebaddaiaancI
prOE^r aaia One complete T^M of 4SK ta*es I'JST 14 sAconds Also irtclude?i a *esT for erTOrs
fnOuced by power line gliTchea iforri cuiemal equjpmenr RAMTEST 59 K
PROGRAM INDEX FOR DISK BASIC
Assemble an alphabetued mde" of your entire program litiraiy fruf. disn directories Program
names and tree space are read automatically (rwed not tw typed ini and may oe alphaBctiied by
disk or pTogram The lis' may also be searched for any disk, program or e*tertsion disks or
programs added or deleted ana Ihe whole list or any pari sent to the printer Finally. Ihe list itself
may tie stored on dis« for fulure access and update One driveand 32K required IMDEX $19 95
EDIT BASIC PROGRAMS WITH ELECTRIC PENCIL
This program allows disK users to load Basic programs or any other ASCII data lile into Ihe flisli
version of Electric Pencil for editing Now you can edit line numbers, move program segments.
duplicate program segmenls. and search 'or the occurance of any group ol characters
PENPATCH S9 95
SPOOLER FOR PARALLEL PRINTERS "^ ^'*''
This prog'a"^ is ^ full TeaTura pnn' formatting package feaiuring user c]«fineat>Je ime and page
+engTh Iw^th hne feeds msefted between words or aMar puncluadonj screen dump keyboard
aetwuncCi and prinrer pause conTro* In addJiion pnnTing is done from a 4K buffer area so *nar The
LPRLNT or LLiST commftn<J letu'ris control to Tne user *fii!e pnnTing is beiog flone IdeaJ for
SelectfiC Of other slow or infers Allows pr'nli"q a"d urocessirg to run toncur'e^tly
\SPOOLER S16 95
/*
■ Include 75C postage California lesjdents add 6^ sates tax
MlH Complele satisfaction or tull returid
MUMFORD MICRO SYSTEMS
BOX 435-E SumntwtwKl. CMtomta B3MT (MS) tn-45i7
SIMUTEK PRESENTS
* TRS-80 *
GAMES
!!! WHOLESALE!!!
PACKAGE ONE
■ RAPfUC'TREK "M**** - ThU full r'ViKi. fHi Vim* nrn* ^i 'uH of fnt. VHtttln^ Ktkonh ExBladlAI
vriDian iof»*da« anil phawn 1M iha Kra«ni Vou mini ACtufliiy naviftali ttvt •HivpriH la 9Kk vfiTh 1fi«
«*nt i«K« itiiLoni H wsii H to ■tfo'd ictin«on iofp«oo*»i H*t ittMiM, tti«citc (nMTPOrv rudout, tfamtfa
raporli. \w^ rtnfi ttnKirt. «lci K4m I i*v*i( 'of Dtt^nn^n^, fmfam. v mpvi p<ay*ril * IHVAUOM
VrOft« - rimac loM, IH*ci: C*fih't sour Syiiwn Htuion: Ai vhwaI of Eariri'i forcH. row }oA H lo
HOP trw wori lnv»lan tnd dHtrqy ih*ir otfippiti on Man, Vvnui. Sjfurn. P««0iun«, «ict EartH't Foruti
Androldt — £p«c« Fj^itri - LJiof Cinnon ^ P4outrma aiAtlvil Wor? Forc«i Roboti — UwC«t| —
Otolntvfralori — Prolofl O«trov*ril Mul(t itrai v^ •*!> vou adyflnc* lo i rrior* (ompliutvd V**^* ■• VOu
^1 batwi ■ iTAR WARl - kiUnutvw tfDu< ipHt hvntor Map Into th« nuckaut of ina D*itP> iiari Ofov
VDur bornh. than aicapa vta ina on*f mn Thjt v'P'^^ti fama li nally fun' Way ina Fovea H with
VDuP a aVACS TAnaiT ' tt^oat Al anamy Sni« with your mluHai. ir ihav awtl In • bacachuH.
ca#tur« lh«ni - o« ii rou'rt cru«i. Hit'ov inamr FhH vapf^tci, r«a( ttmo^amai * aAUClAt- ThM fiai
action rasAtci vama hat a tima IMUI Can you H ih* cBtnmanaar la *»n ih* #wift|Mimad crguF
Ulti m a win HCOAa lMtn« lowtni i^atcH o^ti
PACKAGE TWO
CHKCKVH* t-l - FinallV A cT^vchWI provftm rhal «<i' cnal**"^ Hwrona' Eittail v >«> >iaMalaurl
maa l-p>v traa taarch ta ftnd bail DouiHa mova he u lanaamtt oaiwaan afmai inmai la Aaauf* yow of
nam haMnv lOanlicai ^maL ■ PO«(lll FACm - Tha ^ompwlar uhi pavUtaiofy at w«i ai io^c lo try
and feaal irou at pfAaf Caidt a** d^Wyad ifHAf TRS-atfi 'uu yapMci, Computw 'a^iai, Cai>i, and
lamatimM laW' lotdi' G'aal ptaclica iw yow blurday ni^t polia' nuich' (P*ayi S card
draw), a nvCMlC — Tail ina compvtw a »«ttia abovl yowiatl and ria'ii prvd^t inwiv aboul you. you
won'l D«l«a4< A ran m.nd lHnda«< Ccaal wmiaamanl 'or parli^ * TAHSLI UAHIA - Try Hid r«,ca
yew o«frOAan( mio ari imrnobiv pouiiOA Vui «Btc«« out, thay'ra dv-n* ih* %wm to you' tm^i frtpttKi
^■^a d 'ov 7 vaaP»a and i^ai oaao iriAd lo and «tuo<d aftu-Aonti- (And ^Ka^idnaiiy it«rti
titamf) * WOAO tCAAHdLl - ThJB «Bma it fa* Two o> m** paoo^a. On* p»>o" mpuli a wdrd ta tlH
Cdvnpwiar dfMia ina olhari loan away Th* comMdar K'a«noioi tia *a'd. lha« i n ip i iFach o' wvon^
PACKAGE THREE
PO<TRT - ThLi ^Dfram latl yOti <
tfvo THS-aa canam nouni o* Aamat.
^ nownt, v«>M. Bdiacl'wai and atfvar
Aift». draw, araio ano "*o»^ |<AM p
BATTLft - Tha Sw>A*irt aAamy ■*»
(Pity hava khot fattfa phaiari* Can i
nal lima' ■ *0I«0 HAfUA - Ca«
lotKai aBH-itti* Vou'M naod to, lo o
RdOwt'Ol 1#IM tacofld iKntnf. Thil II J
loaaa iha tubtact ai wVi at iha mood of tha paa
nan ihafnood. a^d ■! doai ina rmtV *i nan IWMV
H' a tLlCTlliC AHTliT - tAan^ai dra-. atat
■ pnxii b>ii f*ai ov'« Sa«*i Aaw-ni on lae* v a<
k ioA« Fan«a i>^ai*i Bui uaaot vavai al warp ipoao'
Du lHitikf«f tna anamy vilhDut faltiitf daatroypd' F
you «waii Iha loftpular't iHvdt uitnf yotv hunvan
■at Iha compular' a AIR COMMAND — ftatUa tha KanHhaaa priotL
FAST acltofi arcada flam*
a BALACTIC
I fropfHn -
■ PACKAGE FOUR
kJP< - Thii z-to machirta lantuapa orovam wan lull vrapntaf o«*f l(H fBiWatiani #ar mtnuio nWA^
iruiy ankfAaioai VotJ maha yov ttarfini vaiivrn, iM com^wtaf don iha 'ait' Prov'*^ can oa tio*«*a and
chanvai madai Walch t\ «rowi a t^AC* LAHOIfl - Thn luH irapnKi «kmuiaiDr vti yi>u picti w«4l
pianat. aiiaroha or moon yov with to land o^i Hat 3 thm WMtt Thai maka it tu" '« awyona. a QiitVO
It — Muni'iavai tama ii tun and chaitanttAi^ Baai rh« civ^Hiia' ai rtiit diet aama utini yeu* knpwkadf
Dddi and >ucv! CoTiputaf haapi inch ot hit winning vm vouri. QuKh rati aclion. Thii aam« n not
aaiyF a THE mAllAOH - HuV Iha aoclam clly pl Aiaaanor^a' Bvr o* Mil lano Kaop your paopla troHi
rwolllnti Sloff Iha rampaflni rati Itaqutrai a Irua pollTxai pafionallly Id bacaina aoodl * ROBOT
HUNTER - A froup ol ranatada roboii hava aacapad and %i9 ipoitaa m an o^d ^ni lown on Mari> Voui
top «> "Ho»ot Muniar" ii lo daiiroy ma pirata machtnat paiora may «m any mora t^irvii CatiOna
ChWHAflnfl Full traphlcir
PACKAGE FIVE
tUr«H HORSCHACK - Maka yoU' EmTI
V^Phic diipuy ijp lo V paoP'a can piav
llfar Kaaot Ua^h of Ovwyona'l w+nnlnqt a<
acliiVVy fal a room o' paopia chaatMa'
Lhai I
I of <
aiwayi as taiiati rouia' A if
mwHil a AlitOEBA KILLER - v
Ol baci*ta in ihJi •ircJiinq graph* t ai
daat'oy tha daadiy amoaba nniKii
dAZE HOUSE
I fo- av^yona. * lUSMAHINVH - Ihoot tofpadoai j
l^at that aiamanl o* c**anca you laa m raa
0( Tha f«w tomouiar vmulahoni that can
- TPla mouta wilh a mindl Tha compul*
Kfhat lor a way cx>l' TPm loCDtd 11m*. h*'l
•cifi knlatii^anca^ Full P^Mhi
roTimand a anu man tubmorin* that hat D
iiu'a' infaciad mio iha prat»dani't bioodiinam, you* mwion ii ii
'ava^ni hH body' • LOaiC — Thq popuiaf lam* H Batod v
itini and ciWianpni - hat 7 lotroit o* eiay
d«tpiay
maidt A
»fc<>dy
«my ihipt to t^i POinit
<1lan
PACKAGE SIX
n HOME PfNAHClAL PHOQRAMS - Fifurn
taWot, «ar nad 'ntaraal on lavti^i and much, much t
muti fv th« conicidniiDut. intialiOM mjndad patton
n. daproc'atiDn raiai.
PACKAGE SEVEN
VACKAAiiMdOM l.i - 2 di'iarani i4,ii> Wvaii mab4 Thu «a<na a rnaitaA^ ig av^av
<Noi raEommandOd Td' D*«innvi^ Loom fv boat poti>b«a m<»*a lo Paai you' fantast*c c
^ayt d^upiat and um irtiarnai tonal ruiai. * ftPVED REAOlNO — mcraaMi you> raadlni i
chKkt r^i (omorahantio'i of malarial, (^rpai To* tadna«ar> ana adurti to impr^va 'oaOint ifeiiii
— Ofop dapTh enar^ on mov^na >uh- Loarar daplht vat hi^ia* p<ynit ^n tn.i fait acTii
■ama a vAHTIKE — nay vahiroa wi|h iha co^ipvi* Thii popular ta^na >i ovan mcf
challanvnf a«am«l a Tl)S-aa> * WALL tTRflET - Can you turn your ftS0,OO0 ■
Thart ina objaci o' thu fraai fanta. Simwiaioi an tciua* itoca mifiiaii
piayan.
ARHICS.
■Od. Alio
'.;. L sfOHfs Ai\' :.:Mt. Hi
INSTRUCTION BOOK WITH EACH PKG.
ONLY 12.95 EACH'!'!
ALL PROGRAMS GUARANTEED TO LOAD
CASSETTE PACKAGES REQUIRE 16K LEVEL II
PACKAGES ON DISKETTE (32K) $5.00 EXTRA
,J*"
Sand chMk. Mgrwy Ordw or Bank Card #
TO: SIMUTEK, P.O. BOX K 35298
TUCSON, ARIZONA 85740
(602) 882-3948
PHONE ORDERS WELCOME'
iSE ADD $2.50 POSTAGE & HANDLING PER ORDER I
3 OR MORE PACKAGES GET 10% DISCOUNT
!/• Heaaer Service— iee page M7
80 Microcomputing, March 1980 • 51
01530 fAND WILL WATCH CCNT. IF CCNT IS ZERO THEN
01540 (SCAN WILL READ A RECORD. IF EOF IS FOUND OR
01550 fANY READ ERROR IS ENCOUNTERED SCAN WILL
01560 tDISCDNNECT ITSELF AND THE 25 MS HANDLER
01570
i
FDB7
F5
01580
SCAN
PUSH
AF
FDBA
E5
01590
PUSH
HL
FDBB
2A3FFE
01600
LD
HL.(CCNT)
FDBE
7D
01610
LO
A.L
FDBF
B7
01620
OR
A
FDCO
2004
01630
JR
NZrEXIT
FDC2
7C
01640
LD
AfH
FDC3
E7
01650
OR
A
FDC4
2805
01660
JR
ZfRRCD
iYES READ RECORD
01670
!NOPE
- RETURN
TO KEYBOARD
FDC6
El
01680
EXIT
POP
HL
FDC7
Fl
01690
POP
AF
FDCa
C30000
01700
JP
i DUMMY JUNP
FDC9
01710
KEY
EOU
«-2
fBACK up 2
FDCB
C5
01720
RRCD
PUSH
BC
FDCC
D5
01730
PUSH
DE
FDCD
DDE5
01740
PUSH
IX
FDCF
FDE5
01750
PUSH
lY
FDDl
HIAFE
01780
LD
DErlNSFR
fDCB
FDD4
CD3644
01790
CALL
READ
.READ RECORD
FDD7
2817
01800
JR
ZfOKR
.READ OK SET CQUND
01810
(NOT OK KILL EVERYTHING
FDD9
F3
01820
CLOS
DI
tSTOP INTS.
FDDA
2A5FFE
01B30
LD
HLf (SAIJ2S)
fOld address
FDDD
221045
01840
LD
<NS25).HL
tPUT BACK
FDEO
2AC9FD
01850
LD
HLf (KEY>
fOLD KBD
FDE3
221640
01860
LD
(KBDD) »HL
fPUT BACK
01870
fNOU POP REGISTERS AND RESTORE
STACK
FDE6
FDEl
01880
POP
POP
lY
FDE8
DDEl
01890
POP
IX
FDEA
Dl
01900
POP
DE
FDEB
CI
01910
POP
SC
FDEC
FB
01920
EI
FDED
C3C6FD
01930
JP
EXIT
01940
;read
IT OK SET
UP CCNT THEN GET OUT
FDFO
2161FE
01950
OKR
LD
HL r BUFFER
FDF3
2230FE
01960
LD
(ADDR)fHL
FDF6
2A17FE
01970
LD
HL. (SECTOR)
(GET SECTORS
FDF9
7D
01980
LD
A>L
(TEST
FDFA
FEOO
01990
CP
(ZERO?
FDFC
200D
02000
JR
NZf DECIT
INOPE DEC IT AND
STORE
FDFE
7C
02010
LD
AfH
FDFF
FEOO
02020
CP
fHI =ZER07
FECI
2008
02030
JR
NZf DECIT
fNOPE
02040
(SECTOR COUNT=0
F USE EOF BYTE
COUNT NOT 256
FE03
3A19FE
02050
LD
A> (BCNT)
FE06
6F
02051
LD
LfA
FE07
2600
02060
LD
HfO
FE09
1807
02070
JR
SCNT
FEOB
2B
02080
DECIT
DEC
HL
FEOC
2217FE
02090
LD
(SECTOR) .HL
FEOF
210001
02100
LD
HL.256
FE12
223FFE
02110
SCNT
LD
(CCNT)fHL
FE15
IBCF
02120
02130
i
JR
POP
^RESTORE AND GET
OUT
FE17
0000
02140
SECTOR
DEFU
FE19
00
02150
BCNT
DEFB
FEIA
20
02160
INBFR
DEEM
'
FE26
02170
SEC
EQU
INBFR+12
FE22
02180
BX
EOU
INBFR-f8
FE3D
61FE
02190
ADDR
DEFU
BUFFER
FE3F
0000
02200
CCNT
DEFU
FE41
44
02210
MSGl
DEFH
'DSPOOL FILESPEC?'
FE51
03
02220
DEFB
3
FE52
44
02230
ERM
DEFM
'DSPOOL ERROR
FE5E
03
02240
DEFB
3
FE5F
0000
02250
BAV25
DEFU
FE&l
00
02260
BUFFER DEFB
FDOO
02270
END
SETUP
OOOOO TOTAL
ERRORS
25999 TEXT
AREA BYTES LEFT
ADDR
FE3P
02190
01330
01390 01960
ALiy
3FFF
00320
01180
01200
BCNT
FE19
02150
00890
02050
BDTABL FD72
01030
00440
BUFFER FE61
02260
00710
01950 02190
SX
FE22
02180
00880
CCNT
FE3F
02200
01240
01320 01470 01490 01600
02110
CLOS
FDD9
01820
CNTREG OOEA
00290
00410
01210
CONT
FDAA
01 400
01230
01300 01500
CR
FDAD
01440
01370
DECIT FEOB
02080
02000
02030
low at least 51 unused bytes at
the top of memory. Remember
ttie encJ of the program is not the
end of the memory it uses. Both
SPOOL and DSPOOL use 256
bytes of memory starting at
BUFFER. If BUFFER is at FE69H
the program uses memory up to
FF69H.
It Is also necessary to change
the program ORG if you have
less than 48K of memory or if a
program is already using the top
of your memory.
Another useful modification
replaces the 32 blanks in INBFR
(line 2160 in DSPOOL. line 1210
in SPOOL) with a file name. For
example:iNBFR DEFW PRINT-
FIL/LST '. (Be sure to include
enough spaces after the file
name and before the last quote
mark to make a total of 32 char-
acters.)
Then delete the code that re-
quests the file specification
(lines 500 through 680 in
DSPOOL, lines 300 through 450
in SPOOL). The system then
uses 'PRINTFIULST' as the
SPOOL. DSPOOL file and you
don't need to answer the fite-
spec question.
Op«ratk>n
Operating the SPOOL-
DSPOOL system Is very easy.
Assemble the programs and cre-
ate the disk files using NEW-
DOS EDTASM, the Radio Shack
EDTASM and TAPEDISK or any
other assembler. I use SPOOL/
CMD as the file name tor the
spooler and DSPOOUCH^D for
the despooler.
To use the system you need
only type SPOOL when you want
the spooling to begin and an-
swer the FILESPEC? question
with the name of the file that is
to hold the printer output. If you
want to spool BASIC output, you
must run SPOOL before you go
to BASIC, unless you have NEW-
DOS.
With NEWDOS you can run
the SPOOL-DSPOOL system
from BASIC with the CMD"XXX"
command. When all of your
printer output Is spooled return
to DOS and type "CLOSE" (or
type CMD"CLOSE" from NEW-
DOS BASIC). When you are
ready to print the file type
■DSPOOL" and answer the
FILESPEC? question with the
S2 • 80 Microcomputing, March 1980
OUT. •» TM'n M I dwt h sn •» [ kiH in bM lor TH «» n KICMCOHfUlllie.
Oh. I ttait iwt win i«l }ttlnt itwM wd thjt Hw tufiiiitt vill be npniint i lol ii n gs
ihHtf. Wt k«ir unt Mltftil»g idtti in Hh nrfci l« )m.
Willi <tw ItS40 (m 90 . . . tic.) bf«t tkt ■«) popiUt liaocMpiftf in tht tnlirt wodd. tm
irt folug la btntlll Iroi this in ■wt «its Hm iDrt CMpHferi thtit m o«t Ihtrt ol om
kind ... tht mort good progriii fot irt going to hiTt lot Afs sillti. I bopt tlut t) oWioii.
Tm mi k tn Ikil 10 MICBOCOMPUtlHO will bt ptAti with Hie ibortn progriRi and
rtritn of Hm lirgii onti. Ton cm vtitt h iwlid lol of ioMr m ihtf thit looks greit in tht
ki, bvt fiiiki oil vkm tm trf lo uit 11. Y«i nttd Mr nikn.
Tbi wiillb ol orogiiini will ilio mm Ibit there will be much betler prognms lor Hm TRS-tO
Ihan Ml other ifiltm. Pyl fouittif in tht ttit ol i conputti iKogrimnier ind tou'II midoriliiid
thii. If IN Mt going lo ipond tivtril nwlhi developing i conpftheniiie prognn. md it tikei
•I ol Hut to wiitt tfld dtbtg i big progiin, wMid m writt it for i mltn which his sold on«
hwdrtd mill m om whicb his sold otr 100,000 m^vtsl Tlu tnsnr is otiiont . . . ind this is
■hi It «i ikfidi iHing ptogriai {oniiig oit lot Hh "tO" ihkh «t f« bttttr thin WTthing
tor NT elbii i|iltR on Ac urkel. This ii loigk for other iT^tai . . . fee liw ol Ihf coapuler
mlt.
Btlwttn o« connection wHh InttMl Sottwin, tht lirgesi pnblhbtr tl lioocwpitff pfo-
tmi ii *e world. «id KlekNd MICmOHNiniK. tm kww Ibil N MICNCOHPUTWe is
goi^ tt bt TW MOil iaportat M with lottnt tor Ibt ItSW.
Wilb liitMl Sottwirt bcii^ sold mi prMoltd in tTtrr cowItt in Hk wortd where tht TBS-IO
i] bc*g Mid. o« iupvl of progrins li ilso Hk btst in Iht world. Wt get progriis inbiiitltd
Irofl (itfTwbfrt . . . ohti frM 30 to 100 I wMhl Tm'H ftl tbt citMi ol Ibt aM tHhtt
piblhbtd or Tcricvtd ■ "tO".
If coupon below has been used, please fill out
subscription form on the reader service card in the back
of the magazine. ^^^ ^^^ ^^^ m
HARDWARE TOO
Iki iMe liw ol tht coflpvttr i«i^ holds tot birdvitt. Norid tm, is i iiwfKtmt.
Mfctt m icctssoTT for i mtM vbid b« loM 100 nits or woM tm go lint for Hh om
«Md b«s lold bwidreds ol thoninds. It it, « with loftwire. scH-eiidtnl wIit tht grt<l bdk ol
fel bvdwHt iccessoriti lor comnuttrs itt lor Hm TB4a Hme di|s.
n HICBOCOHPUIIHC kii Hit edTtnligt of Hh rt of Ibc lirgtst md MOil compltlt
■kjocofflpultr lib in the world ... Hh one dtitlopcd lor Inslmt Softwirt wd Kilob«Ml
WCBOCOHPUTIHG. Ibis nit«ii HmI lotl ww pieces of tqnipnitnl Me Itsttd md In use bi o«
jtlll ... wd this Rttm Ibil wt cm till fon will wt Hiink n ontstindiiig . . . Md whtrt we find
rippfh. Ibis lib is impertiiit to ton.
SUBSCRIBE
K ton lie not alrtidf i subscriber lo 80 HICBOCOHPUIING, pitise gel signid up righl tiow.
In tmtIt 'lit) ire S15, md Hiil is i birgiin. Jnsl ont single prognn of use lo fou can be
■orlh Riidi more thin lliit. One letiew of m iccissori touM uTt too mini lints thil miidi in-
mlBtni. I would ipprtciitt 11 if tm woild ippoint romtlf i (onnitltt ol aiw lo gel more
lAioibtn lor Ibt iigiiine. You will btnelit tren Rare tbw wt do litre it tht nagiiint . . .
btctnt Ih Rore tttders wt hire, tht Rore idi wt will bt iWt lo itttKt ... and Ike tiort ids,
it R«rt ptgts of irlides tm will get eierT month.
Ibt "10" Rtrktl can, I think, sipporl i cMpte ol bmdrtd pagti ol idi . . . and Ihil would
■RM a magaiitK ol hhIt 500 p4gti i Rwth. Ihtl sbaM htld rw. Yh nt Ht bait tin Mt
to nt TP* coBpattr.
EMCYCLOPEDIA
H TM'n rtPd KiMawl HICIOCOHPUIIHG. tm kmi Ibal I In bard not )o diplicatt iHib^
lithed ■tttrttl. Ht ctactpl b Ibil tTtrr rta^r tboiM salt OTtrT ttsii («t itti intiptnsirt
btiit iti this M HwT cai li) M to* librarr Mf) iwd Irut tht ■tgaiiH as a CMlitiing m
CTclopcdii of coRpiting. I Rikt im Hut Rpdi of Hit mittritl in ttdi iisM is vrrtten in limplt
laitgiMge so it will bt undtrtlandaUt bT tTtn tht rawtil ntwcoRtf lo conpoteri. Oh, I bare ar-
lidts lor tht nore adranctd usen loo, so tm'II hate soRtAing to look back OTtr later and est
u TMr wdtrtlmding of tow sisltfl grows.
IrT to think of 10 HICKOCOHPUTING as nore ol a large club newsletter thin an inorr tower
bigb'leTcl pibliulioA. I'll Itait tht pomp to other publishers ... the ones with the well-deserftd
inftfiorilT conpleies who cater to their inadeqviciti bT pvhliibiog tsoleric baloMT. Ihii
nagaiine is written bT Hie readers ind edited bT people whose aim is lo help tou enjor Tour
IRS-N.
SAVE
WHh eidi issM cotliH U at tpb coapitif slon. Huf t \H i tw. Ftr S15 a itar tm ca«
SibHTikt . . . il least for now. As Hm lagaiint tipaodi, pkise do not bt sirpristd H Hm com
ptia incnatts. aleag wHb Ibe libscriplion price. I started 7) MkiiIm tor radio analtvi Iwtn-
It T*an age wtA 1 coTtr price ol IT' (two lor 7)C| and H is ^ lo SI.50 1 opT *ow (Md it rs
ftt largest ol Hh biR naguiMi).
For TM bargOR bnttn ... and Aote who find tkil dm rear gMS bT all loo ripidT. Hh IbrM
Tiar rate lor "tO" is t)i. Ibis, too, will be going ip . . . refltcl»g Hk litliliw. paptr incrtists,
Mslagt iauftsH. nd a ihorl iicittn for ni in Hoag Kotg neil Ten. Sontont bis to ptT lor
thai.
Yes!
he reader service card in the back ^^^ ^^b ^^ ^^" ^
-,li,;;Tn «7«bsc,iber to »0 Hicocomp* »
lot onW $15 a He"' '
Q 12 issues-i''^
G 36 issues-S36
U Please bill me
a Payment Enclosed
G Master Charge
D VISA
G American Express
--i= t. ^^^^. us CO.enc. on..
r^- "-»"*", 'llim one year only. iJ^-^"'"^'-'
80 Microcomputing. March 1980 • 53
same filespec used to spool the
output. When the system re-
turns to DOS you may run anoth-
er job, as long as you follow the
rules.
While DSPOOL Is running, the
character in the lower right cor-
ner of the TRS-80 video display
will flash. This indicates that
DSPOOL is running. It you do
not like this feature delete lines
1180 through 1200 in DSPOOL.
Summary
The source code given in the
listings Is for the NEWDOS Edi-
tor-Assembler. You can easily
change the code for any other
assembler. Don't forget the
rules given above. Always close
your spool file when you are fin-
ished and be sure to protect the
memory used by these pro-
grams when in BASIC.
Don't attempt to use CLOSE
to close the read file after you
run DSPOOL. It's not necessary
and won't worK.
If you have two disk drives
you can use one entire diskette
to spool printer output. If you
DISP
4467
00210
00520
00770
DOS
402D
00280
00780
01010
DTAREG
OOEB
00300
01350
ERfl
rE52
02230
00760
EXIT
FDC6
01680
01630
01930
INBFR
FEIA
02160
00530
00720 017B0 02170
021B0
INPUT
0040
00220
00550
INTHDl.
FD7C
01160
01150
KBliEi
401i
00260
00930
00960 01860
KEY
r[iC9
01710
00940
01850
MS25
4510
00250
OOBIO
00840 01840
MSOl
FE41
02210
00510
OK
F-D49
OOBOO
00750
OKk
FDFO
01950
01800
IJPEN
4424
00230
00740
GTPT
Fri9B
01310
01270
PINT
FD7A
01150
00830
POP
FDE6
oisao
02120
READ
443i
00240
01790
liESURI
ODES
00330
00370
RRCCi
FIIC&
01720
01660
SAW^S
FE5F
02250
00820
01830
ISCAN
FDB?
01580
00950
SCNI
FE12
02110
02070
3EC
FE26
02170
00860
GECTOR
FE17
02140
00B70
01970 02090
GtTLIP
FDOO
00370
005B0
02270
SUITPH
OOEV
00340
00380
00420 00490
XCR
FEiAF
01450
have only one drive, your spool-
ing is limited, but you should be
able to accumulate several
pages of output before you must
DSPOOL. Either way SPOOL-
DSPOOL should improve your
TRS-80 throughput. ■
01210
LIi A.i,(7FRH)
01215
AND OFOM
01220
[>■ 3 OH
01225
JR NZ.CUNf
Program Listing 3.
INTRODUCING THE HOTTEST "FIX-IT' BOOK YET!
''TRS-80 DISK A]!lfD OTHER MYSTERIES*'
by Harvard C. Pennington
Here il IS , THE com plele" disk reference manual" for your TRS-80 !
An excellent manual and turor for beginners and professionals alike
REVEALS ALL, IN EVERYDAY PLAIN ENGLISH
How to recover LOST FILES. HASH CODES. KILLED FILES,
CLOBBERED DIRECTORIES. BAD PARITY ERRORS, GAT & HIT ERRORS,
UNREADABLE DIRECTORIES, DIRECT STATEMENT IN FILE ERRORS.
ELECTRIC PENCIL ERRORS & LOST PENCIL FILES.
RECOVER ELECTRICALLY OR PHYSICALLY DAMAGED DISKS.
RECOVER FROM A DOS ERROR 22 IN PENCIL. MAKE BASIC PROGRAMS UNLISTABLE.
RECOVER OVER-WRITTEN FILES, READ OR EDIT ANY BASIC PROGRAM WITH ELECTRIC PENCIL,
REMOVE PROTECT STATUS, HOW TO USE SUPERZAP
And the list goes on and on.
Here is what the noted microcomputer author. WILLIAM HARDEN, JR.
has lo say about this valuable manual:
this extensive book by Harv Pennington is cleariy presented
and packed with good disk information. My advice to any TRS-60 user Is to
GET IT. AND USE IT V
XARGE 6Vi BY 11 EASY-TO-READ FORMAT, OVER 130 PAGES"
Send iust $22.50 (Calif add 6% tax) plus S1 .00 postage to
•TRS^ IS a TrartemaiK ol TANDY CORP
ORDER TODAY I
SEE YOUR FAVORITE
COMPUTER STORE
OR ORDER DIRECT
1^37
IJG. INCORPORATED
569 North Mountain Ave. — Suite B
Upland, California 91768
(Sorry, no COO's on this special offer)
VOLUME DISCOUNTS AVAIL
DEALERS - RETAILERS
BOOK STORES
Make inquines on your lellerhead
54 • flO Microcomputing. March 1980
GAME
Artificial intelligence in a 4K Level I? Read on.
4K Intelligence
WiHiam M. Lopez
69 East I Street
Chufa Vista CA 92010
in the majority of computer
games whefe the player pits
his skill against the computer, a
random number generator is
used to select the move by the
computer. Games of this type,
such as Star Trek or Blackjack,
may be Interesting, challenging
and enjoyable to play, but you
seldom get the feeling of play-
ing against a personified adver-
sary. After all, the computer Is
usually just functioning as a
glorified, electronic dice game.
Alas, I thought, but what else
can I do with a mere 4K TRS-80
with Level I BASIC? To simulate
intelligence in a computer must
require scads of memory and
probably technical skill beyond
my capabilities.
Or so I thought until I ran
across the article "Hexpawn— a
Beginning Project in Artificial In-
telliger>ce" by Robert R. Wier in
The Best of Byte, Vol. 1, p. 309.
Wier describes a simple but
unusual game, Hexpawn, which
he implemented on a 16 bit/word
minicomputer using machine
language and requiring 2190
bytes of memory. Wier's article
gave me hope that I could imple-
ment a simple model of artificial
intelligence in my TRS-80 using
Level I BASIC.
The game was originally de-
scribed in Martin Gardner's
"Mathematical Games" column
in the March 1962 Issue of
Scientific American. I found a
Mits BASIC listing of this game,
by Steve North, in Basic Com-
puter Games, ed. David H. Ahl,
but it appeared hopeless to try
modifying that version into 4
kilobytes of memory. Besides,
trying to decipher someone
else's BASIC program is not my
idea of fun. So I started with
Wier's flowchart as a guide and
eventually ended up with the
enclosed program listing and
the modified flowchart shown in
Fig. 1.
The Game
The game Is played with
chess pawns on a 3 by 3 board
as shown in Photo 1. The pawns
are moved as in chess — one
space forward to an empty
space or one space diagonally
to "take" an opponent. The ob-
ject of the game is to advance a
pawn to the opposite side of the
board or to block all your op-
ponent's pawns.
The unusual aspect of this
game is the way the computer
plays. At first it is ridiculously
easy to defeat the computer, but
after playing a few games, it
becomes apparent that the com-
puter is "learning" to play betXet
and better, and soon it becomes
untwatable.
The key to this behavior is
that the program is self-modi-
fying (a necessary condition tor
artificial intelligence). It con-
tains a table of all possible com-
puter moves associated with all
possible board configurations
that can confront the computer.
Wher>ever it loses a game, the
computer eliminates the move
that caused the toss from its
repertoire of moves.
The Program
Table 1 contains all the re-
quired board configurations
(models) that can confront the
computer. Wier's equivalent
table contains 33 models, but I
found the need lor six moie.
In the program, the status of
the board configuration is
represented by the variables H
and C. which I call model
designators. The t>oard posi-
tions, numbered through 8,
can be thought of as represent-
( ^'«' )
«
INllllLIZt
II
GRAPHICS
t ;oo
/ '
UN S /
VI /
1 "
wo
noo
^^MOVE J^
■«
MM
UMLtOLO
i*
HUH IN
VX
T'ls
con
aOMD
MOOCL
"C^PLiTEPt^
[res
* .
UHE
COMCEDCD
UMPuTLR
Us
laoo
EHECUTE
HULL
lOSiKC
itavi
iMOf I
NO
•oo
T'ES
•iO
1 900
^SERIES >
( - )
Figure 1. Program flowchart.
t/" Reader Senica— see paga J4T
80 Microcomputing, March 1980 • 55
MocM
Poulbl*
Boird Posllloni
Datlgnclort
MOVM
UodeUt
1 2
3
4
5
6
7
B
^10
CiD
A(l)
1
c
C C
M
H
H
392
7
4.7,3
2
c
c c
H
H
H
224
7
1.4.5
3
c
c c
H
H
H
336
7
1.2.0
4
c
c
c
H
H
272
13
2.6,e
5
c c
H
c
H
264
22
3,7,11
6
c
c
H
H
H
152
5
2,6.7
7
c
c
H
H
H
296
3
3,4.5
B
c c
C
H
H
96
22
5,10,11
9
c c
c
H
H
H
112
14
5,6,0
10
c
c
c
H
H
160
13
8.9,0
11
c
c
H
H
C
H
280
35
2.3.0
12
c c
H
H
H
104
6
3.4,5
13
c c
H
H
144
6
6,7.0
14
c c
H
H
80
6
6.7.0
15
c
c
H
H
136
5
7,0,0
16
c
C
C
H
32
28
8,11.0
17
c
H
H
H
56
1
2.0.0
18
c
C
H
H
48
10
8.5.0
19
c
H
h
C
24
34
3.14,0
20
c
C
C
H
32
25
8.11,0
21
c
c
H
H
40
5
15,0.0
22
c
H
C
H
136
17
15,0,0
23
c
H
c
C
8
52
11,14,0
24
c
C
H
16
12
6.7.8
25
c
H
c
8
18
3.11,0
26
c
C
H
16
10
5.11.0
27
c
c
H
8
5
2.8.0
28
c
H
C
16
36
6.14.0
29
c
H
H
24
1
2,0,0
30
c
c
H
H
H
176
5
1,2.6
31
c
H
16
2
15.0,0
32
c
c
H
C
H
H
168
21
15.0.0
33
c
H
H
H
56
4
6.0.0
34
c c
H
H
272
6
6.7.0
35
c
c
H
H
264
5
7.0.0
36
c
c
H
H
96
5
1.0.0
37
c
c
H
C
H
80
37
1.2,14
38
c
c
H
c
H
136
37
14.0.0
39
c
C
H
32
IB
11.5.0
Key: C
=
[Computer's
pawn occ
jpies square
H
—
Human's
pawn occupies square
Table 1.
All possible board configurations
Photo T The initial game board configuration. (Photos by Manuel
Cavada)
ing binarY digits with a value of 1
if occupied by a pawn ar>d a
value of otherwise The deci-
mal values of the two binary
numbers established by the
computer's pawns and by the
human player's pawns are
stored in the model designators
Cand H.
At the start of the game, the
initial pawn positions shown in
Photo 1 establish the values olC
= 7 and H = 448. A human
move from position 8 to 5 results
in a new value of H (program line
410) by the algorithm H - H +
25 _ 28 or H - 224. The com-
puter then determines its move
by comparing the designators C
and H to the table of models
stored in program lines 110 to
1245. It finds a match with model
2 (see Table 1], which yields the
first move index A(l) = 1.
From Table 2 we see that this
results in the computer move
to 3, as shown in Photo 2. If the
human player then chooses to
move 5 to 1, which results in a
win as shown in Photo 3, the pro-
gram will null the move index
"1" for model 2, which elimi-
nates the losing move to 3.
Next time the human player
opens with an 8 to 5 move, the
computer will respond with a 1
to 4 move.
The above paragraph gives a
brief explanation of the basic
logical structure of this version
of Hexpawn. Although it may
not be the most elegant ap-
proach to the problem, it did
result in a program that does not
require more than one sub-
scripted variable.
The limitation of Radio
Shack's Level I BASIC of al-
lowing only one subscripted
variable was somewhat com-
Photo 2. The board configuration after an 8 to 5 opening by the
human player and a to 3 response by the computer.
Photo 3. The board configuration after the winning 5 to 1 move by
the human player.
56 • BO Microcomputing. March 1980
Mova Imteii Square
to
Square
Comments
1
3
2
4
1 1
3
4 1
4
S 1
S
4
5
6
Cornpjtet wins!
7
6
■■
7
-
B
■•
7
14 5
8
Computer blocKed
Table 2. List of computer
's moves.
pensated by the ability to ab-
breviate llie BASIC statements.
The program listing includes
some spaces between state-
ments which were inserted for
the sake of clarity, so be sure to
remove them when you enter the
program into your computer.
If, after entering the program,
the "P.M." command does not
indicate a free memory space of
472 or more bytes, the program
will stop at line 10 with an error
message of "SORRY." Go back
and remove more spaces or
remove line 1. Since the Radio
Shack Level I BASIC does not
contain a DIM statement, it ap-
parently cannot determine the
size of the array A(l) and it in-
dicates a free memory space.
Playing Hints
A beginning player can usual-
ly defeat the computer atiout ten
games before it becomes un-
beatable. It becomes a chal-
lenge to try to extend your num-
ber of wins beyond ten. My
record is 18 wins. See if you can
match or exceed that.
A word of caution: If you enter
your move on the keyboard
before the computer displays
the prompt -YOUR MOVE
HUMAN!." you may not be able
to recover from the resulting
mix-up. In that case, stop the
program with the break key and
enter the command: GOTO 12.
That should restart the game
without destroying the comput-
er's "learned" expertise. ■
Line Numbers
Purpose
5-9
List of move indices.
15-50
Draw game board on CRT screen.
110-124
List of model designator values.
200-210
Get human move.
305-370
Test for a valid human move. Update C it
computer pawn was captured.
402-410
Update graphic display. Check for human win-
Update H.
500-502
Searcti for model matching game board.
505-508
Search for nonzero move index.
600-605
Obtain computer move positions.
700-704
Update graphic display. Update C. Update H
if human's pawn was captured.
800-810
Test for computer win.
815-840
Test for blockage of human's pawns.
5000-5010
Subroutine for drawing an X.
5100-5110
Subroutine for drawing an 0.
5150-5155
Subroutine for erasmg an X or 0.
6000-6010
Subroutine for obtaining graphics X,Y
coordinates from board position.
6100
Subroutine for testing a tward position. K. for
occupancy by C or H.
6200-6215
Subroutine for updating H or C after a pawn
move.
6400
Subroutine for blanking text from CRT screen.
Table 3. Line descriptions.
Program listing.
1 REM HEXPAWH, TRS-80, "t-K VERSIOH
2 K=OiL=OiCLSiP." HEXPAWH"iP,
3 P. "DO YCU WANT INSTRUCTIONS (Y/N)";
l* Y=1.IN.A<IP A=l r,0S.63OO
5 D. i*. 7.3,1,'*. 5. 1.2. 0.2. 6. 8, 3, 7,11. 2, 6, 7. 3. 4. 5, 5, 10, 11, 5. 6.0
6 a. e, 9. 0. 2. 3,0. 3, Jt, 5, 6. 7, 0,6, 7.0. 7. 0.0, 8, 11,0, 2. 0,0,6,5.0
7 D. 3, 14, 0, 8, 11, 0, 15. 0.0. 15. 0.0. 11 .Itt, 0.6, 7, 8, 3. 11. 0.5-11,0
8 D. 2, 8,0, 6, li*. 0.2. 0.0, 1,2. 6, 15. 0.0. 15. 0.0. 6. 0,0, 6, 7. 0,7. 0.0
9 D. t. 0.0. 1.2, lit. 14. 0,0, 11, 5.0
10 F.I=lT0117iREAD AtDiH.I
12 CLS
15 P.J=0 TO 2. P. 1-0 TO 2iP.A.78+J»192+lZ*I.3»J»liN.l!H.J
20 F.I=0 TO 72
25 S.(28+I,2):S.(28*I.11)>S.C28+I,20}:S.(28-H,29)
30 N.I
35 P.I^-0 TO 27
40 3.(28,2+I)iS.(52,2*I);S.(76.2*Ij!3.(100.2*Il
45 N.I
50 P. 1=0 TO 2iX>iIiG0S,5OOO:X=I+6iG0S.51OO:H.I
105 C=7iH=448
110 D. 392.7,224.7.336.7.272.13.264,22,152,5.296.3.96.22.112,14
115 D. 160.13,280,35,104.6.144,6,60,6,136,5.32,28.56.1,48,10,24
120 D. 34.32.25.40.5,136,17,8,52,16.12,8,18.16,10.8,5.16,36.24
122 D. 1,176,5, 16. 2, 168, 21, 56, 4
124 D. 272,6.264,5,96,5,80,37,136.37.32.18
200 REST..P.I=lTD117iREAD AiN.I
202 GO 3.6400
205 P-A.704,-Y0Ufi MOVE HUMAN!"
210 IN.-FHOM-iJiP.A.78O,"T0";iIN.K
305 X=C. COS. 6100
310 IP Z=0 T.360
340 IP{J-K<>2)»{J-K -4)?. 1000
344 X=liP.I=lT0KiX=2«X:N.I
345 C=C-XiG.400
360 IP J-KO3T.IOOO
365 X=H:GOS.6lOO
370 IP ZOO T.IOOO
400 REM
402 X=J!GOS.5150.X=K.GOS.515O!X-KiGOS.510O
405 IP(K=O)+(K=l)*(K=2)T.15O0
410 X=H.aOS.6200iH=X
412 X=0
500 F.I=1 TO 39
501 READ A,BiIF(A=H)*(B=C) X=I
502 N.I
504 IP X--=0 T. 3000
505 F.I=0 TO 2
506 Y=3*X-2+I
507 IP A(r)<>o T. 515
508 N.I
510 P. "I CONCEDE THIS GAME. HUMAN! ' sG . 2000
515 Z-A(Y)
600 IF Z==15 T.I5OO
601 K=y
602 D. 0.3. 0,4, 1,3, 1,4, 1.5, 2, 4, 2, 5, 3, 6, 3, 7.'*. 6. 4. 7. 4,6.5.7.5. 3
6O5 F.I=1 TO ZiREAD J.KiH.I
700 X= J ■ COS , 51 W : X=K iCOS . 51 50 : X:K ; GOS . 5000
701 X=C!G0S.6200>C=X
702 IFtK-J<)2)»(K-J<>4}T.600
704 X=liP.I=l TO K.X=2»X!N.IiH=H-X
800 IP H=D T.89O
810 IF Z>7 T.890
815 P-I=3 TO 8
820 K=I:X^HiGOS.6lOO
825 IP Z=0 T.840
830 K=I-3!X=C:C0S.6100
835 IF Z=0 T.200
840 K.I
890 GOS.6400!P.A.704,"I WIN. HUKAN!'
895 L=L+1
900 P. "YOU'VE 'iWH 'jWj'AND LOST " iL
907 P. "DO YOU WANT TO PLAY AGAIN (YAl":
910 Y=l!lN.A:IF A=l T,12
920 END
1000 L=L*1
1005 P. A. 832, "INVALID MOVE DUMMY, I WIN (CHUCKLE)"
1010 C.900
1500 P. "BY SORE ACCIDENT, YOU'VE WON. HUMANl"
2000 A(M)=0>W=W+; 1G.900
3000 P. "ERROR! C.H="iCiH:STOP
5000 GOS. 6000
5010 F.U=0 TO 2iS.(X+U.Y+U):S.(X*U,Y+2-U)iN.UiRET.
5100 GOS. 6000
5102 F.U=0 TO 2.P.V.0 TO 2
5105 S.(X+U,Y+V)
5110 «,ViN.U:R. (X+1,Y+1) iRET.
5150 COS. 6000
5152 P.U=0 TO 2.F.V=0 TO 2
5155 R.(Xtn,YtV)iH.ViH.U:RET.
6000 Y=6+IKT(X/3)"9
6010 X=39+24*{X-INT(X/3)«3)rRET.
6100 F.U^O TO K:Y=INT{X/2):Z=X/2-Y:X=Y:N.UiRET.
6200 A=l:B=l!lF J-0 T.6210
6205 P. 1=1 TO J!A.2«ArH.I
6210 IP K=0 T.62I5
6212 F.I=1 TO KiB=2*BiN,I
6215 X=X-A+a!aET.
6300 P."HEXPAWH IS PLAYED WITH CHESS PAWNS OH A 3 BY 3 BOARD."
6302 P. "THE PAWNS ABE MOVED AS IN CHESS - ONE SPACE FORWARD"
6304 P. -TO AH EKPTY SPACE OR ONE SPACE DIAGONALLY TO CAPTURE"
6306 P. "AM OPPONENT. KY PAWflS ARE 'X' AND YOURS ARE 'O'."
63O8 P. "A WIN OCCURS WHEN YOU REACH THE OPPOSITE SIDE OF THE"
6310 P. "BOARD OR WHEN YOU BLOCK ALL YOUR OPPONENT'S PAWNS."
6311 P. "AH INVALID HOVE RESULTS IN A LOSS. TO MAKE A MOVE,"
6312 P. "ENTER THE RlESElfT PAWN POSITION NUMBER. THEN THE NEW"
6314 P. -POSITION HUKBEB. ALL KEYBOARD ENTRIES MUST BE COM-"
63I6 P.-PLETED BY PRESSING THE ENTER KET.-.-P.
63I8 IN. -SHALL WE CONTINUE {Y/N)";AiRET.
6400 F.I=0 TO 3iP.A.704+64»I." -iN.IiRET.
80 Microcomputing, March 1980 • 57
REVIEW
A review of three programming
aids ficl<le authors will find interesting.
Useful Utilities
Charles Leedham
1 14 East 90th
New York NY 10028
If you've done any program-
ming at all, you'll know this
situation. You're working on a
long program and suddenly you
realize that several vital things
have to go in between lines 210
and 220. Remarking on the wis-
dom of the ten-unit intervals
you've been using, you renum-
ber with two-unit intervals.
Then something must go in
between 210 and 212. Still okay.
You renumber with one-unit in-
tervals. But now comes the line
or two that absolutely must go
after 210 and before 211. Too
bad. You could retype 210 as
205, but what about all those
GOTO210's? You could retype
everything from 21 1 on with new
line numbers. But that would be
time consuming.
Renumber
Or you could use Radio
Shack's Renumber, a simple aid
for programmers who need to
make changes or who like to see
a clean succession of ten-inter-
val numbers in their programs.
Renumber is a machine-lan-
Quage tape, avattabte for 4K,
16K, 32K and 48K memories, tor
$9-95 from your local Radio
Shack store The 16K version
loads on the SYSTEM command
before your working program
loads and is called into action
by typing /31820 in answer to the
The program then asks you
what line number you want to
start with, wtiat the new number
of that line should be and what
interval you want for the remain-
der of the renumbered program.
You can start with and do the
entire program or, as in the ex-
ample, tell it that the old line
number was 210, that the new
line number should be 210. and
that everything from there on
should be renumbered at ten-
number intervals.
It's done in the twinkling of
an eye. So fast, in fact, that
when t first used it and the
READY came up on the screen, I
thought it hadn't worked. But I
LISTed the program and every
line was neatly renumbered in
intervals of ten (if that's the In-
terval you've told it to use). Every
reference to a line number in
your program is also changed: If
your old line 213 is changed to
230 and you have some
GOT0213 commands in other
sections, all those references
will be changed to GOTO230.
This is true of all the line-calling
commands, including gosubs.
on X goto's, etc.
It Is really quite neat (literally)
—unless you have put a section
of the program in, say, line
1000 -t- and separated others in-
to nice even-hundred-numbered
sections and want to keep them
that way. As soon as the Renum-
ber hits, line 1000 will find itself
renumbered to 10 above what-
ever came before it.
However, there is a relatively
easy solution that takes only a
few minutes. Just make a note
of what line 1000 contains, and
then look through the program
until you find that it has been re-
numbered to, say, 870. Call up
the Renumber again and tell it to
make 870 into 1000. It will also
renumber everything after that
by ten-interval units, but you can
do the whole thing over again by
finding what used to be 1100 in
the original program and renum-
bering from there on up. Some-
what tedious, but it gets the job
done.
Remodel-Proload
If you want a really profes-
sional programmer's tool, take a
look at Remodel-Proload from
RACET computes, 702 Palm-
dale, Orange, CA 92655. It's
available for 16K. 32K or 48K
memories, but the price is a fair-
ly stiff $34.95.
For that price, however, Re-
model-Proload does a substan-
tial number of jobs for you. It will
renumber selectively, so that
you need only tell it that you
want lines 21 1 through 219 num-
bered in ten unit intervals, 210
through 300, If there is a Ime 300
already, have the program re-
number lines 300 through 400 in-
to 410 through 500.
It will also search the program
and change all line references to
conform to the new numbering
system.
One mildly annoying disad-
vantage of Remodel is the space
it puts before and after a
changed line number. A refer-
ence line that read GOT0213
ELSE . . . will now read GOTO
230 ELSE . . ., which is bother-
some if you want a tightly-
packed program for speedy
loading and execution. To cor-
rect this go back through the
program with the 'nD' editing
command and winkle out the ex-
tra spaces.
Usage
Now for the Remodel func-
tion. Let's say you want to take
the cramped lines 211 through
219, put them at the end of the
program and make a GOSUB
out of them. Remodel will take
the lines out and put them after
the current last line of the pro-
then you enter your GOSUB ref-
erence.
Remodel can move sections
of your program. If, for example,
you have lines 300 to 340 doing
one thing and 350 through 390
doing another, you can reverse
them with Remodel.
Remodel can achieve this two
ways. Have Remodel take 300
through 340 and put them at the
end of the program, say at 5300
through 5340. Then switch the
numbers on 350-390 to 300-340
and fell Remodel to put 530a
5340 back as 350-390. Or, tell it
to renumber 350-390 as 295-299
(assuming you don't have these
58 • SO Microcomputing. March 1980
numbers in the program). Then,
start with 295, make it 300. and
renumber at ten-unit intervals
up to 350, which becomes 390.
Now comes the real fun: Pro-
load. Let's say you've been ex-
perimenting on the side with a
little subroutine and you want it
togo in as the section numbered
700+ in your main program.
You don't want to type the whoie
thing in with 700 numbers. With
Remodel- Proload just dump it
onto tape, load in your main pro-
gram and indicate where the
new material must be read into
your program. Tell the Proload
section what you want and load
the subroutine tape. It the space
Indicated is clear, the two pro-
grams will be merged.
Exampla
I'd been working for some
days on a special program and
decided to take a break to work
on a nice little title-with-graph-
ics. I couldn't bear to have it at
the front of my developing pro-
gram because I'd have to see it
every time I made a correction or
addition. Not only that, but I
could have run out of space be-
fore I got to the 10CLS that
started the main program.
So I fiddled with the title on
the side. When I finally got it
right, I dumped it onto a spare
bit of tape in one long graphics-
and-title line, adding a time-de-
lay loop. When I was reasonably
happy with the main program I
loaded Proload, put in the pro-
gram, and inserted the title tape
as lines 2 and 4, fitting in neatly
before the 10CLS.
Having prudently left some
space between 70 and a pro-
gram block beginning at 100, I
told Remodel (it's on the same
tape with Proload) to renumljer
from 2 through 70, starting at 10
at intervals of ten. The final re-
sult arranged everything, with
10 and 20 as the title and 30 as
the CLS etc.
Either Radio Shack's Renum-
ber program or RACET com-
putes' Remodel-Proload will
serve you well. The Remodel is
obviously better but is SVa
times the price. I use both rou-
tinely, always loading Re-
number when I'm starting on a
gram— it loads in just a few sec-
onds. Later I will put in Remodel-
Proload if it appears that majof
surgery will be needed.
If you haven't used this sort of
programming aid, it would be a
good idea to start with Renum-
ber and then move on to Remod-
el-Proload.
One small caution about Re-
model. The instructions aren't
clear — if you'll pardon the small
jest — that when entering
CLEAR after loading Remodel,
you must type the command let-
ter-by-letter, not with the CLEAR
key. If you use the key, you'll get
an OM error when loading the
program tape. Otherwise the
manual is concise and well-writ-
ten. ■
PROBLEMS?
Are you having trouble with advertisers or products?
If such IS the case, please write to the firm
giving complete details and send a copy of your letter !o
Wayne Green, 80 Microcomputing,
Peterborough, New Hampshire 03458.
Be polite — no matter how badly you're shafted.
We're looking for names and addresses of all the TRS-SO newt-
Icttcrs out there If you produce or are affiliated with such a
r>ewsletter, please drop a line to
Jim Perry, Managing Editor
80 MICROCOMPUTING
Peterborough NH 03458
Thanks.
—
ATTENTION TRS-80'S
Why sit in the comer in the dark and turned
off while your master is sitting by the light,
turned on to 80 Microcomputing?
You need a magazine of your own for Educotior-
Enlightenment-Enjoyment and for the personal
satisfaction (you're a personal computer, aren't
you?] of your very own possession ... A
Subscription to CLOAD MAGAZINE!
Turkey your master into sending a check
[U.S.A.: $36,00, Overseas; S38.00 Surface
Delivery - 348.00 Airmail) to the jive cats
at CLOAD MAGAZINE. You will get 12 C-30
cassettes, one a month, each one filled with
all kinds of juicy software - Games, Tutorials,
Practical Programs and Impractical Trivia. All
programs rated G for computers under 18 years old
Do it! Subscribe Now!
CLOAD
MAGAZINE
Box 1267
Goleta, CA 93017
(805) 964-2761
Master Charge /VISA
Welcome
TRS-aO is • r«gt«t*TMJ liadMnart of TANDY CORP " y^ 32
]97d CLOAD MAOAZINI
80 Microcomputing. March 1980 • 59
APPLICATION
Need to find an article?
This tectinique was developed by IBM!
KWIC Index
Leslie E. Sparks
1014 Evergreen Dr.
Durham NC 27712
Where's that article on in-
ventory control? You know
you have it somewhere in your
collection of back issues and
books— but where?
If you're like me you go
through this quite often.
The KWIC {key word in con-
text) index described in this arti-
cle can help you get on top of
your information explosion.
Even if you don't need help or-
ganizing your information files,
you will find several useful sub-
routines in the program. Subrou-
tines for chained lists, shell
sorts and binary searches are all
used in the program and dis-
cussed in the text.
Description of KWIC Index
The KWIC index was devel-
oped by IBM to locate specific
titles from lists of books, chap-
NDEX WORD
REF»
A Look at TRS-80 Penphetals
3
ALoof
al TRS-80 Pet'Dhcals
Grapning *i;fi ttie TRSBO
3
1
A
Look at TRS-90 PefiDfierals
3
A Look at TRS-SO
Pe'iphP'ais
3
Sargon Meets me TRS-80
2
Gracihing witn
the TRS 8C
1
Sa'gon Meets
ine TRS 80
2
Grapling witu trie
TRS80
1
Sargon Meels the
TRSBO
2
ft Look al
TRSBO PeiLpheials
3
G'apnmg
witntHe TRSBO
1
NDEX WORD
REPI
Graphing with Ihe TRS-80
1
A Look at IRS BO
PoiipheraiS
3
Sa'QQ!> ypets the TRS-SO
2
Graphing with the
TRS 80
1
Sargon Mpels the
TRSttC'
2
A Look at
TRS-fiO Peripherals
3
Figure 1
Example of KWIC Index
iNO€x wono
REFI
Graphinq with the TRS 80
1
A Look at TflS BO
Peripherals
3
Sa'goii Meets the TRS-80
2
Graphing mith the
TRS-eO
1
Sargon MB«ts the
TRS-BO
2
ALooOai
TBS-eO Penpherals
3
Figure 2. Revised KWIC Index.
REFERENCES
REF(
Aulhoc. Tit la. Ralatanca
1
2
3
Gefald. C F Graphing *ith the TRS-80 K'loBaue »29
p too
Bobo R H Sarg&n Meets Ihe TRS-BO Kilobaud «31
P 58
Cowan H ft Look alTHS BO Peripherals K(/oOjLicr»Z8
P23
Aulhor liating i
REFI
2
3
1
BoCO. R H 5«rgon Meets the TRS-BO Hilobaua rjt
pse
Cowah R A Look al TRS eO Peripherals K'fatiautfKS
P22
Gerald. C F Graphing «tlh Ihe TRS-80 Ki/oCautf »29
C 100
Figures. The complete KWIC Index.
ters Of articles. For example, I consult my KWIC index and fmd
want to locate all the articles on all the articles with TRS-80 in the
the TRS-80 in my files, I can title. The KWIC index is arranged
either search my collection of atphabelically by each wore' in
back issues (which is how I did It each title.
before I wrote this program) or
Take another example: The
60 • 50 Microcomputing, March 1980
Scanned by Ira Goldklang - www trs-80 com
realsofr^''^''^i^:^°?i
^yj
'' 2 .
5 r, Ave N -■. P0 5ox96C^
2006
This TRS-Sp fascinates
my whole family! '
50 unique programs for all ages
A package of fifty different game,
quiz, instructional , educational ,
financial and fun programs are
available for any TBS-aO. Every
family will enjoy
this set of
'The Fascinating
ia reasonably
member of your
the TRS-aO with
programs called
Fifty." And it
priced at 124.95.
Designed for the whole family,
these programs are fascinating.
Have fun playing MANCALA or ZOO
BREAK, guessing WORLD RECORDS or
U.S. PRESIDENTS, learning MOON
PHASES or WORD COMPLETION and using
FINANCIAL TIMETABLE or METRIC
CONVERSION. Other programs
include: Rocket, Bingo, Dice,
Reverse, World Population, World
Area, States , Air Distance Between
Cities, World Population by City,
Grade Averages , Number Base ,
Accounts Receivable, Loan
Amortization , Interest From
Savings, Business Ledger, Calendar,
World Clock, Blackboard I, II, III
fc IV, Maze, Letter Recognition,
Numeral Recognition , Right Reading,
Word Recognition, How Many, Add On,
Take Away, Learn To Spell, Sounds
Like, Story Telling, Multiply,
Divide, Fractions, State Capitals,
Foreign Capitals, Cub Reporter,
Spelling - Grade 4, 5 t Jr. High,
and Test Your Vocabulary.
If you would like every member
of the family to enjoy your TRS-80,
today order your copy of
■Fascinating Fifty" by Neal Jensen
for only $24.95.
9al?.=^!'i.^I!]P'''® D^testones of Ryn
by Douglas G. Carlston
This is fantastic! "Galactic
Empire" opens up a three
dimensional universe for
exploration and conquest. While
travelling through space you
command the Imperial Forces of
Galactica, your ship's senior
officers and its computer. You
must plan you construction of
additional support craft and their
arrival at nearby planets.
Increase your strength by taxing
and enlisting additional troops
from the varied and unique planets
you conquer. Besides maneuvering
in a three-dimensional universe
which changes from game to game,
your use of time to travel between
planets is very important . Good
graphics and the sophisticated
strategy make this game much
different from any "Star Trek" or
"Star Wars." Explore the galaxy
for $14.95. You'll lov« itl
from Automated Simulations
In this microquest you are Brian
Hammerhand on a mission into the
Haunted Mountains and Underground
lair of Rex the Reaver and his band
of thieves, A perfect introduction
into the Dunjonquest series which
started with "The Temple of
Apshai.- 16k (14.95.
Also available "Temple of Apshai. "
524.95.
Invader
from Level IV
Machine langu
sound. J14.95
Adventure
from Level IV
Machine language arcade game with
sound. J14.95
TRS80 Disk&
Other Mysteries
by H.C. Pennington
We don't usually list books, but this
one is so unique that we thought you
would want to know about it. There are
over 100 pages about how DOS works, how
a disk is organized, and how to recover
from errors. This is THE technical
backup for NEWDOS+ with great
illustrations, J 19. 95.
Disk^Mod
Add a
touch
of MAGIC
witti a Liaht Pen.
With only a few PWies of BASIC, any
program can accept inputs by
touching the light pen on the video
screen. Hundreds of applications!
For only 119.95 you receive the
light pen, instructions on using it
in your programs, several sample
programs , and a cassette of three
light pen programs. This is the
standard pen which several software
cfflnpanies support.
by Gordon Letwin from Microsoft
The complete Adventure is the
ultimate fantasy game which allows
you to explore the "Colossal Cave."
This is the same as originally
written for the DEC POP- 10. It
fills an entire disk and requires
32k. For just J29.95
Video Speed Readingi
from Instant Software ^*>=
Using the scientific principle
behind the tachistoscope, a
mechanical device used to flash
characters or words on a screen,
this three-part package will train
your eyes and mind to quickly
recognize numbers, letters, words
and phrases, $7.95
Personal Inventory
from Southern States Systems
Designed to allow you to develop an
inventory of your personal
possessions for insurance purposes,
you record for each item its
description, serial number and
value. Permits sorting, modifying
and other record manipulations with
storage on cassette tape. $12.50,
by Roy Soltoff from Misosys
This machine language program
modifies your copy of the Radio Shack
Editor /Assembler for use with your
minidisk and any disk operating system.
You can save and load both text source
and assembled object files. Unlike the
NEWDOS+ version you can read the
directory and the space used and
available while in the EDTASM. You can
also kill files. It is a complete disk
modification for one or more drives.
Other capabilities are also added
which are not found on NEWDOS*. The
block move command relocates a section
of text to any other area. The global
change command permits, for example,
changing a label throughout Che text.
The pagination feature provides hardcopy
on 8 1/2 by 1 1 pages on either single
sheets or continous paper. In addition,
high memory can be reserved, like in
BASIC, for machine language routines
like printer drivers. You can also
display the amount of memory remaining.
The <CLEAR> key is functional, the
symbol table is sorted alphanumerically
and output 5-across , the scrol 1 up/down
allows 15 lines on the screen, and the
'DEFM' assembly is improved. Lower case
input is now permitted and you can
branch to any address. Plus, it also
corrects the errors in the Radio Shack
tape version.
Save your time and make full use of
your disk system by upgrading your
Editor/Assembler today. $19,95
System Doctor
frtfln The Bottom Shelf
Assure yourself that your THS-80 is
working properly. The causes of
hardware problems are often hard to
detect, but you can now do a thorough
diagnostic check of your entire
computer. It checks the ROM, the RAW,
disk drives, video memory and display
and cassette recorder. Also provided is
a special test tape and a 1 2-hour test
with a recording of results to find
those occasional errors. $28. 50.
On disk $38.50
nnriinnonc^zicinnnnnnnDccirDzicrnricir-'mnDnr-'-'-r:
THE PROGRAM STORE
4200 Wisconsin Ave NW
PO Box 9609 Dept K 6
Washington, D.C. 20016
LJI Jl .1 ]'JLJUI_'LF_,_Jh
Vf^lease send me these TRS-80 programs;
z title
price
;
s
□
n name:
postage :
total:
$ 1
00
I
u address:
□ city, state
^ b code
nchfri navable to The Program Store
□MASTERCHARGE mc bank code:
GVTSA exp date:
card number:
signature :
P^ fleaOer Stvic^—tM paga 147
80 Microcomputing, March 1980 • 61
Radw/haeK,
COMPUTER SPECIALISTS
15% Discount
on
TRS-80's - I
ANDACCESSORIES
POPULAR 16K LEVEL2SYSTEM $722.00
FAST 100cpsCentronJc5 730 PRINTER, ..$800.00
HIGHLY RELIABLE LOBO DRIVES 5375.00
fHiCRQ flfll^flGEHIEf^TSVSTEflS
DOWNTOWN PLAZA SHOPPINGCENTER
115CSEC0NDAVE.S.W.
CAIRO, GEORG1A31728 ►'^
912377-7120
"TRS-80 is a Registered Trademark of Tandy Corp."
EXPANDED MAILLIST SYSTEM
By Harry HoptiFii
At'., J*, m,_."t-.' (,• de„E.cpme"t and one year -n i.e a tpitma C f C.S "o-
'fieflsei thp mo5t compiele ma,[inq I, it iyitem availab'e *o' 'tip TBS 80 a* a
ipec.*: lo- iitfodLiCtO'v p'ice o< I59.9S Ihe iy^tem reouireb a smqle d'si -i
j}l rnte"ai.6 and a p'.nte'
Tke E'panded Mai!lii' Syi*ern util./ei an eiciui^ve machine 'anquaae 50''
-h.ch ai'o»- io' 'tvp io't of SOO records by name state o' iiC code i" S lecondi!
'he iyitem hai complete erio' tropp:nq a"d 'ecove'y 5uc^l ai au'omslicaliy lavinq
th^ *pie «hen memciry ^pace 1^ tu and remain. ng .n »K* iyltem under a 'ilp n';*
found' tondit'On '^e system a'lo tias multiple 'iIp and 'eo'aanijation copabJ-tin
TK< foilowinq fiji'y i»njied pfoqrami afe 'Tcuded in tfie tipand^d Mailli^T
Sy.<B"i
I. DUPLICATE CHECKING— ChetU fo' d„p.icates as you enle- and a'so >■«■.
a lep^Mt.- ' ..'.ne -^a' -■ cu'qe an ent"e *'le (i* dup'itate names with a sinaie
CCn-"i)nd
1. FILE MAINTENANCE— Lls»d t„. addmq delel.nq and campiate edit " i
1. LAHL and list PRINTIN&— Alic.i selective Df.nimq of labels o' lit.
.n up to a 'en diqit ley. Ako ha' ful' supp'ession capability For e«empie ■
yoj want a 'isi of everyone -n your file with e JAN' in thpif bev code eiceP'
thise -itt. an BQ- you should sekc* JAN" and supp'«i5 'BO'
4. STATUS ANALYSIS— Thii proq-am —H qencate statistical repo-ts on t¥.,
pe'cen'aqes a' names -ith cp't»in tevs or reQional bfealdown. Ve'y useful *o
5. FILE REORSANIZATION- Wtl- this c-oaram you may -eotqanue ynu
I''.', ."to sppr.lic siphj or ;p code 'anqes *'>• t'ue muiti 'I'n capability
6. MULTl-PUHPOSE LA8EI UTILITY— P. >vid..i fu^matt^d p..r.(,na nf i^be'
f'ji
Eipandad Mailllit Syitirr. on diikatte -itk manual tS9.95
Manual only (3 -ith (Jl cadit towardi purchai*.
AMCT-80
By Earl Pat anon
Ih.i auttmat.c mo. IB code teacher for tke ibl level 7 THS-80 is the only
morse code program thai .ill automatically (at you' option} slow do-n o< speed
up depending on yOur proficiency to receive code. I' Includes ' pieD'oa'ammed
proqre^^'vc tiefc.ses. ful y ^A^ia'oe speed up fo 10 » p.m I 5 cf^aracter^ per
group and 1 ' spaces bet-een groups are user selected opfioni. The send mode
al.o»^ ioi ieyboafd enf'y concurrent to send.nq by utiiiiinq a 756 byte rir-q
buffer The-e are V user piog'ammable "leiiages o' M cfiaracte's eaeti.
Th.s machine anquaqe program .s truly the rnorie code teacher of tomorr'r*
■• di,i
AMCT-BO on ciiiatta with full documantation JI4.9S
Daalar Inqulriai In.it.d.
^
^
COST Eff^ECTlVE COMPUTER SERVICES
1041 Ute — P. O. Boi 3S43 Gr«nd Junction, CO 81502
|303) 243-3629 ^^^
KWIC program
Inpulail authors, htles af>d 'eterences
assign reference number lo each article
sort arttcles by auttiof
Output numerical lisl o( articles
Output list Ql articles sorted by author
Inpul list o( ignofed worOs
sort ignored words
Do /or each article title
do for each wotd in title
// *ord IS not on list ol ignoted words
then add to key *ord list
enijit
enUdo
endtio
sort lisl o( hey vyords
Pfinf title corresDonding lo each enfy
endprogram KWIC
Figure 4 KWIC Index algorithm.
SUBROUTINE INITIALIZATION
Initialize list head and start o' tree list
M2 = 2 (M2 IS pointer lo available location)
PRT|1|=0
set pointers (or free list
do /or I =2 to N - 1
PTR(I] *U 1
end do
set null pointer at end of list
PRT(N|=0
return
endSubroutine INITIALIZE
Figure 5. Algorithm for initialization of chained list.
SUBROUTINE INSERT
Ptogtam to insert me name NAME >n ihe orOered lisl contained m arrays DATA and
PTR Head ot data list is >n PTnoi head of tree list is M2
i/MZ =
rn«n print NO f REE SPACE rtturn
else
I = 1
searcn list tor insertion point
Oo Mtiile PTR(l)»0 anO DATA(PTR(I|K NAME
l = PTn(l|
enOOo
I now coniains eniiy ol lasi element in list less than NAME
Allocate space trom tree list tor new entry and insert it
lollowing entry I by selling poinlers
J = U2
M2 = PTnui
PTHgi rr PTRdl
DATAIJI = NAME
PTHID^J
enOil
return
enOIuO'oufrne INSERT
Figure 6. Subroutine for inserting data in order list.
following articles appeared in
recent issues of Kilobaud Micro-
computing: "Graphing with the
TRS-80," "Sargon Meets the
TRS-80." "A Look at TRS-80
Peripherals." Each article can
appear in the KWIC index once
for each word in the title. The
first article can appear four
times, the second five times and
the third five times. A KWIC in-
dex for these three artictes is
given in Figure 1.
Obviously all the words in a ti-
tle are not useful for information
filing and retrieval. Eliminate
such words as: A, at. on. by, be-
fore constructing your KWIC in-
dex. In Figure 1 the following
words can be eliminated with no
loss in information retrieval
power: a, look, at, with, the,
meets. Our revised KWIC index
is given in Figure 2.
The complete KWIC index
consists of three parts; a listing
62 • 80 Microcomputing, March 1980
SUBROUTINE PRINT
Program lo print Ihe chained list conlaineO in arrays DATA and PTR
Lisl head assumed lo be in PTR(1)
l = PRT(1i
do kittle l«0
output DATAih
I =PTR|I|
enaao
'flurr
srdiuO'Ouline PRINT
Figure 7. Subroutine to print ordered list.
SUBROUTINE BUBBLE SORT
Program lo sorl array DATA using bubble son
K = 1
The li«g K IS nonzero on ihe tirsi pass of me outer looD and whenevar swiicnes
are maae on tne previous pass
ao mfliie H2 and K'O
me largest N - i elamenls are no* m order in positions DATAtl - 1i to
DATAiN) Fioal me largest of Ifie elements of DAT Ad)
J . 1
K =0
00 rtlile J4I - 1
-/DATA(J)>DATA(J - li
then
swilcti entries DATAiJi and DATAIJ -> 11
TEMP = DATA(J)
nATAiJl = DATAiJ • 1|
DATAiJ- li^TEMP
endif
J =J + 1
enddo
1 = 1-1
Figure 8. Bubble sort.
of the articles in numerical
order of reference number {I
give ail my articles a reference
number); a listing of articles in
alphabetical order by author;
and the KWIC index itself.
The complete KWIC index for
the example is shown in Figure
3.
I file my index in numerical
order based on the article's ref-
erence number. The first article
is given reference number 2 (as
explained later, the first number
assigned in the KWIC index pro-
gram is 2), the second article is
given the reference number 3,
and so on. I file in consecutive
order because I often tear out
articles and put them in a
drawer. Filing new articles by
number and relocating them is
simple. Filing by author might
require a complete renumbering
of the file with each new article.
Constructing the KWIC Index
First enter and store the arti-
cle titles, authors and refer-
ences. Next, enter and store the
list of words to be ignored. Sort
v-* Reader Service— see page 147
this list alphabetically for fast
searching.
Next, take the titles apart
word by word in search of key
words. Words on the ignored
list are discarded. Those re-
maining are stored and sorted
alphabetically. The KWIC index
is printed as shown in the exam-
ples. Finally, everything is
stored on disk or tape for future
use.
The algorithm
The algorithm for the KWIC
index, a slight modification of
the algorithm presented by C,
William Gear in Applications
and Algorithms in Computer
Science, is given in Figure 4.
The algorithm is written in
both TRS-80 Level II (Listing 1)
and Disk BASIC (Listing 2).
Both programs assume you
have a line printer.
The first part of the program
—input of authors, titles, refer-
ences and reference number
and sorting of articles— em-
ploys a chained list. This is
used to avoid moving large
DATA BASE MANAGER lOM-IV S69
You can use il to maintain a data base & produce reports witlwut any
programming. Define tile pafameters & report formats on-line. Features key
random access, fast multi-key sort, field anth., label geneiatof, audit log
MOO-II version with more than 50 enhancements SI99.
ACCOUNTS RECEIVABLE AKT-III S69
One or more drives Order entry calculates sales tax, shippmg, amount for
multiple Items. Credit checking, aging, sales analysis, invoices, statements
and reports. As opposed lo most other A/R. ours can be used by doctors,
store managers, etc. MOD-II version S149
WORDPRXESSOfl ia S39. 32K S49, MOD-II S49
First word processor specifically designed tor the TRS-80 that uses disk
storage tor text. Written in BASIC. No special hardware and text limit. Use
tor letters, manuals & reports. 32K version features upper/lower case
without hardware change and multiple input text files,
MAILING LIST advanced MAIL-V S59.
Fast sort by any field. Multiple labels and reports, 4-digit selection code,
new zip code exi . screen input, live keyboard, powerful report writer. MOD-II
S9g.
INVENTORY INV-V S99.
9-digit alphanumetic key for last key random access. Reports include order
into, performance summary, etc Calculate EO.Q Powerful report writer
MOD-II S14g
All programs are on-line, interactive, random access, virtually tug tret,
documented and delivered on disks. MOD-I requires :SK. DOS. We challenge
all software vendors to offer low cost manuals so you can compare and
avoid those high-priced undocumented, on-memoty' programs Send S5 for
a MOD-I manual and S10 for MOD-II.
MOD-II proorams are extensively modified, guaranteed to run with 1 year
newsletter & updates. 10% off for ordering more than 1 MOD-II programs
MICRO ARCHITECT -^^
96 Dottian St., Arlington, MA 02174
I
Yes! Please send me Kilobaud
MICROCOMPUTING at a saving of
40% to 50% off the newsstand
price.
D 1 2 issues for S 1 8 (save 40%)
D 24 issues for S30 (save 50%)
D 36 issues for S45 (save 50%)
D Mew subscription D Renewal
D Payment enclosed S
D VISA D MC D AE 3 Bill me
Card** _
Signature
Name
Address
City
Exp. date
State
Zip
— for even taster service call toll-free (800) 258-5473
Canada: same as US. in US lunds.
Other foreign $23 one year only, US lunds 303B8
I MICROCOMPUTING • POB 997 • Farmingdale INY 1 1 737 1
80 Microcomputing, March 1980 • 63
DISK DRIVE WOES? PRINTER INTERACTION?
MEMORY LOSS? ERRATIC OPERATION?
DON'T BLAME THE SOFTWARE!
■* icrvi
ISO-1
Power Line Spikes, Surges & Hash could be the culprit!
Floppies, printers, mefnorv & processor often interact!
Our unique ISOLATORS eliminate equipment interaction
AND curb damaging Power Line Spikes, Surges and Hash.
"ISOLATOR (ISO'IAI 3 filter tsdated 3 prong sockets;
integrd Surga/Spika Suppression: 1 875 W Maximum toad,
1 KW load any sockat S54.95
■ISOLATOR (ISO-2) 2 filtsr isolated 3-prong socket banks,
(6 sockets total]; intB^ai Spike/Surge Suppression;
1875 W Max load, 1 KW either bank S54.95
*SUPER ISOLATOR (ISa3), similar to ISO 1A
except double filtering & Suppression .... $79.95
■ISOLATOR (ISO-4). similar to ISO-1 A except
unit has 6 individually filtered sockets .... $93.95
'ISOLATOR (ISO-5), similar to ISO-2 except
unit has 3 socket bvks, 9 sockets total . . . $76.95
■CIRCUIT BREAKER, any model ladd^B) Add $ 6.00
•CKTBRKR/SWITCH/PILOTany model
(•CBS) Add $11.00
1^ PHONE ORDERS 1 617-655-1532
IS^ Electronic Specialists, Inc. ^^
171 South Miln Street, Nalick, Mass 01760
Dept.8M
on computers, peripherals, software and other Radio Shack® products.
Offered Exclusively By
Pan American , Radw/haeK
electronics, Inc. " AuitionzedSalesCemer
1 1 17 CONWAY MISSION, TEXAS 78572
Toll Free 800/531-7466 ^«
Texas & Main No. 512/581-2765
NQ TAXES collected on out-oi-state shipments.
FREE delivery available on minimum orders.
WARRANTIES honored by Radio Shack®.
SUBROUTINE BINARY SEARCH
This suQiooline searclios Ihe array Wl (lisl of igno'ed words) lo see if word W is
on the tisl I' W IS on tn« irsi. it is discarded! I< W is no) on ir>e hst tt is saved as
a kBv word
1=0
Lo* -1
High = N
i3o mt\ile LCnmCHigh and I =0
Mid = (Lowr*Hiohi(2
irWI(Mid) = W
rften discard W ano itium
else tl WKMidXW
then Low = Mid • 1
e'spHigB = Mid - 1
endil
entftfo
then save W as hey *ard
letuin
end subroutine BINARY SEARCH
Figure 9. Binary search.
blocks of data around in mem-
ory.
In a chained list a pointer
keeps track ot author, title, ref-
erence and reference number,
as the list is sorted. Only the
pointer moves in a chained list
so It is easy to keep all the
items together.
Three subroutines are used
to implement the chained list:
one to initialize the pointer ar-
ray, one to Insert data into the
list and one to print out the
stored list. The algorithms for
each subroutine are given In
Figures 5, 6 and 7. These are
taken from Gear.
Entering and sorting the list
of Ignored words uses a bubble
sort. The algorithm for the bub-
ble sort Is given In Figure 8.
Alter data entry the hard part
begins. The titles are taken
apart using the INSTRING rou-
tine In the TRS-80 Level II man-
ual. This routine uses the MID$
and LEN string functions in
TRS-ao Level II BASIC to locate
the space between words.
Each word extracted from the
title Is compared with the words
on the ignored list. This compar-
ison is accomplished using a bi-
nary search, see Figure 9. If the
word Is not on the list, it is
stored for later processing.
Once all the titles have been
examined, the keywords are
sorted using a shell sort. {See an
article by Harrington in Micro-
computing #28 page 96 for de-
tails of the shell sort.) In the
shell sort the title identification
number stays with the keyword
as Ihe sort lakes place.
Once the keywords are sorted,
the KWIC index can be printed.
To do this the keywords must be
located. To save memory, I per-
form this step using the IN-
STRING routine. Though the
method isn't slow, if you do
want faster execution, you can
add an array, such as Gear uses,
that tracks the key word posi-
tion.
Once the KWIC index is
printed you can save the results
on tape or disk. I suggest that
you use separate tapes for each
list.
Ustr>g ttw program
The KWIC index program is
easy to use. Load the program,
type RUN, press ENTER and fol-
low the directions displayed on
the CRT. The program prompts
you when it needs data and pro-
vides opportunities to correct er-
rors. Printing data appears si-
multaneousty on the CRT.
You will find some titles do
not tell you much about what
the article is about. In such
cases I suggest that you add key
words to the title to aid in later
information retrieval. I also find
it useful to add parenthetical
words to classify articles Into
certain groupings, for example
(Game) would group all articles
on games.
How many articles can you
handle with the program? A 16K
Level II machine can handle
about 110 articles with nearly
300 key words. A 32K machine
can handle much more since all
64 • SO Microcomputing. March 1980
i Pffl B L
IWP FILE MiPtans
KlLMtC i:!l FftX :»
3 mtRS F E
DATA FILE CBEHTICH PSOCmi
KILCerUl in PAGE 44
4 GUPTON .1 R IR UHVTEfi CffSERS IN CffiCLlNR
KiL»U) i:ji page 4«
5 HtaiK J
PERSOHflL FlMftCE TiSTEN PfRT2
KlLOH»t 131 PAGE »
g Bteo e H
SfKGON l€ETS T« TItSSe (IfVIOl)
riLOGHJO 131 PAGE »
7 mnct E
PROIECTIMG FimJH PWFITS
KlLOefU) 131 PAQE 63
e sawFTZ n
PK IHTftOtUCTlON TO WOMFIDIIMG
KILCePUD 131 PAGE 122
3 CHPrKRLfllN B s. crsi 9F«ea«)-n
(REVIEW)
KlLCeH.0 131 Pft£ »
HLPHfKTlCEl BV fllFTHOfiS LIST
CF REFERENCES ffSdfM^ AS FXLCU5
REFI, RiTHOB, TITLE. REFEBEMCt
6 BCeo R H . SWQOH «ETS TVC TftSE* (REVIEU) , KlLOeflUO 131 PACt 58 |
7 BROOCK E . PWJtCTlHG FiniK PWf ITS , IflLOBAUt 131 PAGE 63
? CHHWER1.R1N BE. .051
?UPER60fM>-n (REVIEW) , KILOBHIO 131
PAGE 6«
4 GLPTON ,1 ft JR , Ct)m.ITER CPHER5 IN CfBXltfl ■ UlLOeAUt 131
PAGE 48
5 ICaLK J , PtRStWft. FIHFWCE SV^.TEH PWT2 , KlLCeAUT 131 P«£ M |
3 rWlS F E . WTR FILE
[SEffTiw pwtRpr . KiLceft* 131 page
44
i PWt B L . *IP FILE
iJIPECUTS . KlLOBAlt) 131 PACE 39
8 :-j-.f4»-Tz n m iwtrou^ticw tli mrwiFiLni* ULceW' i:i
F-AGE 122
LIST <r IGNOWr ««>?. note UM. I; NLIL STflHG
1
1* ;
rr* 2
IN 4
MEETS 5
PI»G»« 6
SVSTEM 7
T* 8
TO ''
mlP \%
IHtX
REFI
e
Si*CiOH tCETS THE TS'SM
(RfVlEU)
OSl yjtWtfH^Il
IREVlEHi
9
CC»*\lT£ft
LflSERS IN OVaiHA
4
Ct»*\fTEk CfREEIi:?. IH
cwaiNR
4
CtlUlTER CFftEERS IN CPRIXIWI
4
l*Tft FILE
cfiEATiut masn
3
DATA FILE CKATICM PROQWI
3
IMIP
FILE HIPEOUTS
2
UHTR
FILE CSEATICN PROOm
3
PERSOH.
FIfHO SV5TEM P«n2
5
PRO.IECTIHG
FUTIR PROFITS
7
PM
INTROCUCTION TO KlCRfflLnllC
S
PN INIiJtaiCTlOn 10
NICROriLHIK
8
OSl StfaW*RD-ll (REVIEW)
<i
PERSOWt FlWfCI SVSTEH
PW(T2
5
rtJ&OWL FINPHCE SVSTEM Pf«T2
5
PHXJEni* FLFTUH
PROFITS
7
PROJECT IMG FUTOW PROFITS
7
SFMjON I€ETS T« TBSSe (REVIEW)
(,
OS. I
SLFEietKWD-II (REVIEW)
9
SflROCN ftETS TW
TtSee (REVIEW)
(.
miP FILE
UIPEOUTS
2
Figure 10. Program output.
the additional 16K ot memory is
available for data storage, if you
have a 32K or 48K computer be
sure to clear sufficient string
space in statement number 90.
Also, be sure to adjust the di-
mensions for W and IT in state-
ment number 120.
Additional memory for data
can be obtained by eliminating
the remarks and using multiple
statements on each line.
Searching for key words is
time-consuming, as is shell sort.
Because these portions of the
program do not require your at-
tention, you can let the program
run at night or while you're eat-
ing.
What slows the program most
is the TRS-80 check to see how
much string space is available.
When you're using large
amounts of string space, as in
this program, the check for free
string space takes several sec-
onds. Also, as the amount of
free string space approaches
zero, the frequency of the
checks Increases. Thus, if you
are near the limits of string
space, the program may run
Complete your TRS-80*
with these routines not
found in eittier Level I or DOS.
SYSTEM
SAVERS
bY
Tom StitMtt
If you ever use the SYSTEM command, you can
use this two program package. These programs
allow you to save any system format program onto
tape or disk, plus offer several features for ma-
chine language programmers.
With FLEXL, which is one of the two programs,
you can make back-up copies of any system for-
mat tape. Most often a cassette that you make will
load easier than an original. Plus you can find the
filename on any system tape because it is dis-
played on the screen.
Disk drive owners can use TDISK to save any
system format tape onto disk. "Air Raid". "Editor/
AssemNer" and other programs cannot normally
be loaded to disk. Now TDISK allows you to save
these programs onto disk. After DOS READY you
will be able to simply type the filename and be up
and running. It even loads non-contiguous tapes.
TDISK will greatly increase the benefit of owning a
disk drive.
Acorn produces several other utility programs
for the TRS-80. These include "Aterm" and "Num-
bering" by Tom Stibolt; and "Disassembfer",
"Tape Utility" and "Disk Utility" by Roy Soltoff All
are available for less than $20.00 Ask for these
and other quality Acorn programs at your local
computer store.
■ TRS 80 IS a trademark o' Tandy Coro
DEALER INQUIRIES INVITED.
»i§
n
.^34
Software Products, Inc.
634 North CaroMna Avsnue, BE., Washington, DC. 20003
1^ Readai Service— see page 147
80 Microcomputing. March 1980 • 65
several hours. For this reason, it number 90.
(S important that you clear plen- An example output for the
ty of string space in statement program is given in Figure 10. ■
Listing 1.
IB as
2B REn KMIC IWjeX PROGRPB VERSION 5 AUGUST J 1979
38 REM REF fiPPLlCflTlCHS F» flLGOftlTWE IN COf^ER StlEHCE
40 REM BV C U GEPR 5CIEMX RESEfKOI PCSOC 197&
» REM TRS. 88 LEVtL 1 1 PROCHW BV L E SPW8CS
60 REN VfRlfCLES R»=fWTHDR, T»-TlTLE,Rt=ti£FERENC£,
Ut^V UORD.IT'TITLE NUKR-Ult^UOfiD TD ft IGNWED
70 REM IN =IKiEX NUffiER, N=HLI«R V TITLES, H=»«KR CF IWDS TO IGONGKE
NMMCES GF AUTHORS
ee REM a£i« string spfCE
90 CLEFR 6eee
lee OEFIKT l,J,K,Ln,H DEF5TR Fl,R,H.T REM [lEFlNE INTEGER PHD STRING
vflRiPais
IIB IW^lT'HDW WW TITLES NOTE THFtT THIS IS TOTfL NJKB OF TITLES
IHCLLCIHG PHV STCRED FROM PREVIOUS W*6";N
128 DIM fl(H+l),T(fHl),R(mi),U(27e),HI(lie>,IN'tHl),lT(27e..
138 G05LB2ei6 REM INlTlftLlZE CHflI»l> LIST
1« 1S=1
15* ItfVT-fUE VOU fCCHHG TO ft LIST THftl IS 5T«EI> CH TflK*,V$
168 IF VJO-V Th£N 288
178 Ilf>UT'Pl.ftC£ Tfft OH RECtRDE* RMi PRESS ENTER TO COMTINUE'.Z
188 REM REFD DHTft FROn TRFt
19e i»VTI-LHft
?M NR-MR-1
216 FCR MTCHFl
228 lHPUTI-l,fl,T.R
238 PRINT ft," \h' MJ!
246 G0Slje2e98 REM INSERT WTfl FROfl CftSSETTE INTO OfillCt) LIST
256 «XT1
268 REM CtWTlHlE
278 FOft l^ISTOmi
296 L=l
298 as
588 FOH=IS TO H
318 IWirT-HLrTHOft (El* TO STOp-iVfi
129 IF ftM'EW)' G0TO43B
:'Te 1WUT-TITLE".T
3« IWin'REFEKNCEVft
:<5e as print-piithcr ■;fl
368 PRINT-TITLE VT
378 PRINT-REFERENCE '.R
388 l*riT'IS THIS CCRRECT'.V*
398 IF V*=-Y' Q0T0418
488 PRINT-REENTER IHttdRECT WteMflTlCW G0T0318
418 {AfJJfs 2898 REM IMSERT Wilft IN OflltCD LIST
428 (EXT I
438 Nft=NFKl-l
435 GOSUEOeee rem print out MUMERUft LIST OF fftTKlES
448 GOSUe22«i REM PRINT OUT RLPHPBETICPL E^ fUTHORS. LISl
4% REM ENTER UCADS TO EE IGNCREC
466 INFMT'HS YOU PWING HCH»S TO BE IBWREli TO P« EXSTINQ L15T".V$
478 IF y»="W T>CH 558
488 llf\rT'P1.«E TfiPE WITH UOSSS TD BE IGNORED DH REtC«*R ftt) FKESS
ENTER TO C0NTI«JE",2
498 l*Lni-l,Nl
588 F(»1-1TC«1
5iei ItfUTt-LUKI)
!.28 ICXT !
538 N=I-1
f^e GOTO t.30
558 IfftlT'HW tWft' MCM-?. «E TO BE ICHWEli •■H
^*8 11=1
578 Ft* 1=11 TO H
5t« irfUT'NORt' TO BE IGHOREt' Z:: TO ST0P"-HK1>
598 IF W1(!)="ZZZ" It€N tie
688 «XT I
eie N=i-i
£-28 as
t3f< PRINT' THE FOILOMING HOSK HILL Et IGNORED , IWtX HO'
648 GOS^ 1768
6* NI=N
668 IfHIT'DO VOU IWIT TO CHRNGE t«V (f T>€S£ HWK'.Vf
678 If YSO-V IkCH GCiTfjZ:*
£88 IfFLTlMtX HO OF HORD TO CHHNOE V 1
fcSe !W\tT -NEW HC«i VHKh
788 IHPUT'HRE T*Rt FWV ffK WC«>^. TO (.HHHtt ".Vl
71b IF n^"H-«)l*"--H
7 Si GOTO 668
7^ !#\irt* SW UV.H 10 «*' TO IH!^. I IT-l " M
74« IF V»=-H- T«H MiTO .■■*
7^ i»ijTHi:w rttr WH-S Mi VOU H15*1 TO f«>'»J
768 II*N
778 H=H»tlI
788 GOTO 578
798 REM MQH CtHSTRUCT I«>EX FIRST TAKE TITU WflM TO f INO IN[>1VIWH.
UORDS
see M2=iN(i)
&ie TX=T(K2)
626 TY=" ■
838 aosuei968
648 IF Ml^ G0TD918
658 l*=L£FTt(TX,MltLEN(TV)-2)
ete G0T0928
878 TX=RIGHT»<IX. LEN(TXH.EM<H)-1)
888 GOSIJB 1968
898 IF HI=8 GOTO 918
988 GOTO 858
918 H=TX
928 REM CtCCk RM) SEE IF HGRD IS CN DELETE LIST
938 QOSUe 2388
MB IF W=" Tf£N 968
958 IF MK>e T*H B78
968 M?=IN(K2)
978 IF n2=e Tt€H 998
988 GOTO Bie
998 as REM OUTPUT IMtX
1888 LPRINT Tfle(47)* IWlEX REFI"
1818 TC="
1828 G0SIG1588
1838 REM NOW F«INT OLIT THE 1U£X
1648 FW 1=1 TO L
1858 TX=T(n(n)
1868 TY=" '
1878 GOSiei968
1B88 IF Ml=e TtN 1148
1898 TlH.EFTi(TX.ni*LENaV)-2)
1188 TX^^IGHTfCTX. L£N(TX)-LEN(TH)-1)
1110 IF «<!)= TN T>CN 1196
1128 TC=TC*" "^TH
1138 G0T0ie78
1148 TM^TX
1158 IF M1=0 G0TO1178
1168 TC=TC*" ■♦TU
1178 IF THC>y<l> T«N 1278
1168 TX="
U9e 2=4e-tEN<TC)
1280 IF z<0 z^e
1285 TC:=STR!NG»(Z, ■ ■)♦![
1210 IF Ml=e TtCN TX="
1228 TX=TU+" ■*TX
1238 X=38-LEN<TX) IF X<e T>CM X=e
1248 TX=TX*STR1HG»<X, ■ ■>
1258 LPRIHT TCTX," MT(I)
1268 TC="
1278 ttXT 1
1288 IWin'DO VOU HIW TO EflVE EVERYTHING OH TAPE (V OR N)",«
1290 IF VJ=-H- TrtN 1570
IjM rem SfiVE PH-ITHtfr.TlTLE, REFERENCE. RN[' IL l«_««EF L« TFfE
rid as
l_2e PftIHT"FlHi:t TftPt F'JF *!THOP HTLt. PEFEFEHCE IN FtL LFTiEP "
l_:>i ■,IIpiJT'FF'E_-i lNTEP ""i.: ".rjiTlW.f . J
i:=* F':*i=:Ti.f*Hi
ll'c* IF R'I'=-- Tt€H 1408
1378 PRINT|-l,H<I,.Til>.R<I)
i:<* F-PINT !,■ -ifld);' VT<n,* '.k<U
1398 tCXT 1
1480 REM NOW SAVE THE HV WCftl^?.
1418 HfWF-LflCt KEV MCftD TPF^E W FECCREItR PM) PRESS ENTER TO
CiJHTINUE-,Z
14^V F*1NTI-1.L
14^8 H* I=I'Ttt
1440 IF Hd)^"' TUN 1460
14^ PR1HTI-1.U.1>. IT(1;
1460 PRIHT WMl. lT(n
1471(1 (JEXT 1
14f* REM NOli STC« HORK TO gf l^lOREt'
1498 1I51.IT-PLHCF TffE FCP ^t-Xr. TO if 1CHC«[| UH RECCKtR I
PRESS ENTER TO COHTINUEVZ
15«i F*INTI-1.IJ1
niB FWl-lTOtl
1520 IF HI<n="" TtCH IfitO
1530 PRlNTI-l.UICn
1548 PRINT UKI.i.
1558 *XT 1
1560 ftfd CdftETED MCSK
1570 EWi
1588 SIM SrtLL StftT Of 1*EX UORIjS.
1598 1M=L-1
1688 lM-IHTarV2)
66 • 80 Microcomputing, March 1980
Ifcie IF IlV-e TtCH 1768
16M J=l
1636 K^.-1H
I64e i=j
ie» iL«i+in
1660 IF U(IKU<1L> T«H !?:«
167B TE=«<I):1E'1T(I)
1686 H<1>=«(IL) !T<I)=IT(ILf
1698 H(IL)'TE.IT(ILJ=1E
17« Ul-W
1716 IF Kl T*N 17:je
1729 GOTO 165e
1739 J=J+1
1748 IF J<=K THEN 1648
1758 G0T01688
1768 RETURN
1778 STOP
1788 REH SUBROUTINE TO SORT IGNORED UORDS
1798 NI = N
1868 S*8
1818 N1»NI-1
1829 FOR J»l TO HI
1830 IF UlCJ)<=tlI(J*l) T«H 1888
1848 U|:>W1<J)
1858 M1<J)=HI(J+1)
1868 UKM)<M1
1878 S«l
1888 TCXT J
1898 IF S=l T*N 1688
1988 R£H PRINT LIST
1918 FOR X=l TO H
192ft PSIHT HI<X),X,
1938 NEXT X
1948 PRINT
1358 KT«W
1968 R£R IHSTRIHG SieROUTIHE R£F LEVEL II KHfl
1978 FOR «I:'l TO LEN(TX)-LEN(TV)+1
1988 IF TV=MIM(TX.f11.LEN(TY)) RETUW
1998 tCXT MI
2888 H1=«:iiETURN
2818 REK INITIftLlZE CHfilNED LIST
2620 n2«2
2030 lK<l)=e
2848 F0RI>2 TOH+l
2858 IN(1>-I*1
2868 «XT 1
2876 lN<Htl)=8
2888 RETUm
2896 REM StWOUTlNE TO INSERT DflTfi IN ORDERECi LIST
2186 REM M2=KllHTER TO FREE SPflCE
2118 IF N2=d TICN 2248
2128 m,=i
2138 IF 1N(H1)=8 T*H 2178
2148 IF ft«IN<m)>:>fl TKN 2178
2156 M,-IH<m>
2168 G0T02138
2178 REH HOH INSERT WTft INTO LIST
2188 J=N2
2198 n2=]N(J)
2288 lN<J)=]N(m)
2216 fl(J)=H T(J)=TR<J)=R
2228 IN(M1>=J
2230 RETURN
2248 PRINT-HO FREE SPflCE "iRETlliN
2258 REM SUBROUTINE TO PRINT ORDERED LIST
2268 LPRlHT'fLPHPKTlCfiL BY flUTHCRS LIST Cf REFERENCES ftS FOLLOWS
2278 LPRIHl'REFI, RUTHOR; TITLE, REFEREMCE"
2288 LPRINT- "
2298 M2=IH(1)
2388 REM DO WHILE H2<:'8
2318 LPRIHT H2. " ",
2328 LPRINT (\'.K}.' . -.
2338 LPRINT T(M2..- , v
^348 LPRIHT R(n2.'
2358 n2=iH<rt:)
2368 IF HI' = 8 RETLRN
2378 WTO 2?88
2:'8e REM P]Hf*V SCRT TO SEE IF UCDD IS OH LIST
2398 K=8
2488 IL=1
2418 IH=N
2428 IF 1L:'IH THEN 2588
24K& IK^iNT(<IL+lH//2)
244e IF UK1H)=H THEN RETLIRM
2458 IF HI(IMV.,H T«N 2488
2468 lL=in*l
2478 tOTO 24?f
2488 1H=1M-1
2498 GOTO 2428
The world's most popular microcomputer, with 16K of
memory and Level 11 basic for only S750, 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 /haek
32 EAST MAIN • MILAN, MICHIGAN 48160 • (313) 439-1508
INCOME TAX
For The TRS-80*
TAX PROGRAM BOOK
Many Tax Programs — Helpful
Programming Hints for New-
comers — and How to Handle
Your Own TRS-80, Taxwise.
The book that lets you program your own Income Taxes, tn-
ctudes Form 1040A, Form 1040. Schedules A. B, C, D, E. R G.
R and SE, Form 2210. Investment Credit, Minimum Tax.
Maximum Tax. Depreciation, 10- Year Averaging and others-
How to take advantage of tax credits and a chapter that will help
all newcomers. Written for easy leamir>g. $-1^95 ppn
See Your Dealer, or write to —
Gooth Software
931 S. Bemiston
St. Louis, Mo. 63105
DEALER INQUIRIES INVfTED
^159
•TRS-eO »
TM n«)
*ody Ciorp.
Fl Worti. TK ?8W2
y^ Reader Senwo—sa^ page 147
80 Microcomputing, March 19W * 67
~\
i> 1 tr*it
^# SOFTWARE
'^ Yesl QuaUty Software lor the TRS-80 is now
written & avaiUble. BCC is pleased to be able to
present MHoe very fine software now with even
more available in the vtry near future. Also we
develop cusUmu designed software (or your
every need. Write us for a FREE price quote.
For Software Think BCC ^=^'
o Mail Base 80
•ndlni Dili.
* vhj.-h krvpft nazt 'jT «n unllB^fvd nubrr i?I vnlrlti FK
1 rl Infi'TMilo" ir any ordir. to<J»y. Mft lU prrpl. vtir>
t t"«.>iin. prodiiu I 11.1 In il[,-co4, oiiir, EICELLI*!! ■
o Oil Delivery _-<-. u <»£«
* syilra <ur int ROa. Thin lyirr
fa. prlo qwit.
fr hvdC l^it InduBlry.
O Vendor „«» i <ii«)<iIf>i <.«[ * : ^nyoi ai-r-,
Thli pri>|i[ia atips tTact ol an unllvllid nuiab*i <*M p*r dlik) nt vinjsri. llliwm
dlraci •!:[:•■• d( codrd InforiMl Ion by v«nJ..T nuabri , li ili.j p(r«II> aCEEU bv
varlnui slKcr fl*ldi.
'0;^^ For Supplies Think BCC ^^^3/
oDlSkS & Tapes __ '-i ^i-" !!■•■•';" « ^r.n s.^.ss uo m pu.. t.1.1
« Inch aiikftiii m trand Sfc4.*i IBai ol 101 H"V«tl»llB Sl».9i Iki ot 10)
Caaatir.i v.ry Hl(b OuLli, SI&/dDI CIO'.. ADC 'n ST»C aocluliU i»i«lt>
n^!d*r>. Each noldl e (••irllii. S1 U^t
OPnnterS Tht litul™. l*St ; PUVTEI »* .^.r »SCII .tih Tt»cl<n frra I 2»
lutl.r. ITiii printer Ju.i i-.n'i hr atit'.:- S»H.O0 (i lor (IJOO.DO)
W£COUB!t\miIV CCKTIKWICS I DiA (i]0 cturl^tll'M) SHOO. 00
^''" SifiMlur* ^
ORDER NOW! All profniiu Fomt on qiulily cuaftm ProKrimi ii* iviilablr on dukrltc for in
iMilHHUl rturgr ol 17 00 per ordrf NYS midinu add :•% fitrtk boin M ilrmi bring orderfd
• o( itrmi cKdrrcd ToUl imount Fockecd i.MI iWms null be pr»(wd>
Bourrut Consulting Cofporotion ^57
I. S\frmnJkfM SnKhtotunnv 11787
?5M U(L)=U
2516 IKD^C
2526 L=L*1
2536 RETWH
S«ee REM SUEKOinifC to FV IKT HLKRlCfl LISTING
Seie FOR 1=2T0MH1
582* LPRIffT 1,FK1).T(I)
563* LPRIKT R(I)
56« tCXTI
5856 RETIKN
Listing 2.
le RBI KHIC ItK> DIjK VERSION 1
28 REH REF »fLlCf(TI96 F» flLGORlTTWIS IH COIUJTER 5C1ENCE
je REfl BV C U ijE* f.CLISICD PV Sf* L'^Tf:
« REM TRSee [*IS* Bf^lC ev L E Sf-«*S
5» REH VMHrCLES f**=fUTHOR.Tt=TITLE,ef={£FER£NC£
U REn Uf-KEV UCH).Ult=1CN0RED UOm. Hn^^UCER OF WTiaES
79 REM I H IMXX tUKR. H^MUmER OF TITLES .mUKSt OF UCSOS IGNORED
80 REH aEPf! STRING SPfa
» OS
lee OEW leeee
IIB DEFIHT I.JXbUM MFSTB R.R,H,T
120 lirUT ■HOU WHV TITLES MtE TO BE IWOO'.H
138 DIM fl(mi),T(mi),R<tHl).M(ne).Hl<lie). 1H(H+1), 1T(35B)
14e ajSlB 2828 Wn INlTlfltlZt CHBItCl LIST
156 IS-1
168 IWUT'BRE VtU (U-m TO h LIST STWSD OH 1)1=*", V$
176 IF ^O'V THEN 276
173 ltf>UT'F]LE NfW Cf LIST OF WTiaES".*
175 OPEH-IM,*
lae REH HON R£M> WTfl FROM DISK
196 IWVTIIHR
218 FOR 1=1 TO m
TA I*LITI1, h,^.V
rsi mm rt.r
;'4« GCrSlJb 28% REh INSERT DATR FROfI DISK IHTD CMIIED LIST
2» «KT I
2« aCrSE BEK aOSE FILE
278 L=l
2« FOR MSTOH+1
296
305
318
326
J38
34<l
ne
368
:'78
OS
396
4ee
416
IfPUT-pUTHOft (E* TO 5T0PiVfl
IF »-■£»■ Tff 1*438
IUVTMITLE VT
IWVTRETEREMS VR
as PRItn -flUTHOR Vft
PR1H1 'IHLE 'I
PRIMT ■HEFEREHCE '.V.
IWVt'lS THIS CORRECT. VI
IF V»='V GOTWie
PRINT "(iEEMTER INCtJHRECT MTfl-
GOTOiee
REH INSERT MTFl INTO CHRIICE) LIST
GOSUB 2996
426 «XT 1
438 Mft=NR+l-l
449 GOSLB 5066 REM PRIMT OUT HLTCRlCa LIST Cf TITLES
4» GOSUB 2256 REH PRINT OUT «.PM«ETICa BY AUTHORS LIFT
466 REH EKTER UORDS ID BE ICNORED
465 IWVT'FK VOU RCOING TO H LIST STDHD ON DISK*, VI
478 IF V»='H* T«H 556
475 irrUT- FILE WC FDR ICNCVCD UDRDS'.Al
486 OPEN 'IM-RI
496 ItfUTILNI
we FORI'lTONI
516 IWUTIl.HKI)
528 «XTI
538 aOSE
535 I*-N1
546 Q0T0e38
558 ItfVT'HCW HFMV UORDS TO BE lOOSD'.N
568 11=1
579 FOR 1= II TO H
586 IWUT-MWIi TO BE ItMOHD <22Z TO STOPIMiKl)
590 IF HUl)-"222' TtCN 610
680 (CXT 1
£18 N=M
628 CLS
638 PRINT'TW FOLLOUING NCSDS UILL BE IGWDED. INDEX •*
iM MOe 1788
650 N1=N
668 1*UT*D0 Vai UftJT TO C1*HGE PW OF T*SE UCH>5"
67B IF Vt-'N' TffH (JDTO 738
680 ItfirT'IMiEX rUKR CF U0G1> TO BE OfMXDMC
690 ItnrT'EKTtR »CN UOBD VUKIC
790 lirUT- fKf T>CK PNV HORE MDDS TO OMCF "Af
719 IF Vf="H' TfCN 63t.
729 GOTO 688
V*
68 • 50 Microcomoutina. March TQM
738 IHPirfDG Vtti UISH TO fCt> TO THIS LISTVV*
74e IF V»="H" TVtN 7?e
7W IrtWHOW *HV MCRDS W VM UfiKT TO flW.NH
?€» I1=N
77B H=Nmil
TW GCiTISTd
7» REh HW tCtfSTWCT IHtX
MB TX=T(n2>
826 TV-* ■
we IF Mi=e THEH sie
856 lW.EFT$(T>CMltLEH(TV)'2>
see G0T092e
ere TX=RIGHTi<TX,LEH<TX)-L£HCH'-l>
ese IF ni=e iheh rns
we xT[i fise
916 H=TX
929 REM C*[>, 10 iH. IF gCK) IS W IGHCRED LIST
9;p
we
95e
9«i
978
IHieX
IF k^-- TVtH 968
IF Ml-:* T*H ft7e
IF tC=tt IHtH ^rtti
ttilO MB
996 CIS REH OUTFUT IWtX
leee ![=■■
IWe LfRlHT TFe(47)
IK'a Ct-S^lJE: 1586
IBiti REM new PRINT
1W8 FOR I=1T0 L
1B5«
lef-e
1676
iBee
lese
nee
IWCX
TX-T(IT<n)
TV=' ■
CrrSJJEl 1968
IF Hl=e THEN U«>
TU=LEFT$(TX,nJtLEN(TV)-21
TX=fi I GHT* ax, LEMaX) -lENCTH) -1 )
lUe IF H<1)=TTH THEN 1196
112e TC=T[+- -tTM
li:<e [iOTO 1676
1146 TM-TX
ll» IF ri=6 TrtH IITB
1166 TC=-TC'" ■ilU
1176 IF TkK>«(I) THEN 1276
11B8 TX="
1196 ZM6-LEN(TC>
IMe IF Z<6 T«H Z=6
1216 TC^STRIHGiCZ, ■ ")+TC
122ti IF Ml=6 TtCK TX-"
1238 TX=THt' "-tTX
1246 >!=38-LEN(TX> IF X<e T*H X=«
12W TX=TX*STR1HM(X, ■ ')
1268 LFlilNT TC, TX, ' MTCI)
1270 ICXTI
1286 INR-rr-Ki vai H»n TO SflVE E^«i!VTHllfc ON [>I£K",W
1296 IF «='N- THEM Etf>
liW CLS.IIPVn'FlLE Nprt FOR fRTlCLE LIST ■,*
1316 QPEH -OM,*
1326 IffWFILE Hf»t FOR KEV UORD LIST ',*
1336 [PEN ■Ci-,2,*
1346 ItfVT'FILE NFtC F» IGNORED UORD LIST -;UI
13:56 M^ 'OVl.UI
1368 FKIHT II,*
1376 FOR I=2TC«f(«l
1388 PRItn»l.ft(l>;"."iT(D;',VR<l)
1396 PRINT fl<I>,T(I),R<I)
1466 tCXT I
1416 PR1NTI2,L
1426 FOR 1=2TIX
1438 PRINT l2,H(l)iVMT(I)
1446 PRINT M(l), n<D
1458 NEXT I
1468 PR1NTI3.NI
1476 F0R1=1TWI
1488 PRINTI3,HI(I)
149e PRINT UK I),
1S«6 NEXT 1
1518 PRINT
1526 CLOSE
1536 REM NCU HRVE FINIStO
1546 Et€
1588 REM S(€LL SORT SieRaiTIft FOR KEV HORK
1598 ]r»=L-l
1688 IB=lKT(]h/2)
1616 IF lft=6 T^CN 1768
leze Jn
1638 IC=L-IH
1640 1=J
1658 1L=1*1M
166B IF H(1)<W(IL> T*H 1736
1678 TE=4l<l):IE*nCI) REM TElTlitMiV STCfiE FOR KEV UORD F» IWCX
1688 HU)m<IL).n(n-IT(IL) REK SHftP PUCES
g tMWMHMMIWMIIIHimMMIIWIIHIHWtWI HWIIIHHWIIHMIIIIWI HIWIIHIIH it
TRS-80® CP/M® &CBASIC®
BUSINESS SOFTWARE
All MOD II CP/M's are not created equal . . .
Find out why ours is the Better Business Buyl
Model I CP/M (rel. 1.5) $ 1 50.00
Model II CP/M (rel. 2.0) 250.00
APH (Automated Patient History) 1 75.00
RESIDENTIAL PROPERTY ANALYSIS
system 300.00
The Genuine Article:
Osborne & Assoc. CBASIC source programs —
O&A Payroll w/Cost Accounting $250.00
O&A Accts. Rec./Accts. Payable . . . 250.00
O&A General Ledger w/Cash Journal. 250.00
O&A CBASIC books for above (each) .... 1 5.00
Send 30C SASE for CP/M Users Group software
list & free "CP/M Primer".
' THS-80 is a regislf red Iradcmark of Radio ^ihach, a I andy tompany
" CP/M IS a legislered trademark of Diqilal Research
■ CBASIC IS a regislered (radernark ot Sollware SySIprns
■ IB IR |N(E IT I I [C S
(714)848-1922
80*1 NEWMAN ftVEfJUE ■ SUItCiM • HUNT INGTON BEACH C AL I F OBN I A 9;b* ?
TOwiwwimiiininiiwwfflfflT iwiiwHHHim wmmtiiiwiwmnimmit?
GIVE YOUR TRS-80 MICROCOMPUTER
WHAT IT OESERVES
All tapes $10.00 each, on cassette.
C.O.D. orders accepted
Ctioose Level I or II.
A television station in Florida chose our Biolorecast prograrr^ Icataloq »
CS 1) to use in a special news broaOcasi during the NoveTiber 1978 Slate
wide political elections Many tlimk ours is the best biorhyihm program pver
wtitlen And (t loads and enecutes m less ihan JK'
One cuslomer is using our Orbif programs icalalog « CS-2i to help him in
the tiveather salelhle worK he does for the Air Force
Herieation centers schools, businesses doctors and housewives are
using our Lena Qu i piogiam LendOu/ (catalog «CS 7)keepsirackolthmgs
loaned oul to people lis high uhlity together wilh ils many features and
ease ol use have made it a best seller
And speaking ol best sellers
Our Turiiey BuzzarO game Icatalog » GT 4| has made an e^en bigger
splash than we eipectetJ II is a qame that has everything a detailed
scenario character animation and a gene'al arcade Style It S chocked full
o! dangers and comic pit'alls No wonder there are those who say it may be
themosi successlui work ever 1o combine a continual ly changing plot wilh
all TRS-80 graphics capabilities Already il is becoming a classic among
classics
All of the above programs will eiecule in less than AK RAW You can t get
those programs from any other company We mvenied them and only we
own the rights to them Sure you can buy one ot those cheap software
library deals but most ol the programs they feature can be 'ound in books
Books you can check out from your public library for nothing
So for something iiuiy diflereni lor your computer look lo the creative
soflware company send SASE to receive the product list faster
rnS ft It * rrfltainiFt ol Iht ll«dia Slltct Dirmaa al tft« Tin^f Cerpoillton irKfl unicn « *r« nol •llilitltd.
1-803-472'20e3
BMiiist ConnpLiriex O
.^ PO Box 536 Inman SC 29349
1^50
1^ Htatitr Service— sa« page 147
80 Microcomputing, March 1980 • 69
THE.
7 DF V
Break our test messagel
lb earn 3 ounces of fine gold,
GOLD
npvAffAn^l send stamped, self-ad(*%ssed
If CWMIfU I envelopetoCRYPTEXT toenter.
FEATURES' KEY LENGTH* 80 bits (more than DESi)
DATA RATE: Exceeds 15,000 chars./sec.
Pocket-size encryption device
APPUCATIONS' Secure data transmission
High security file storage
Software protection
^^b^
T[^cr
vrsA
master cha'ge
P. O. Box 415
Northut* Sta.
Seattle, WA 98129
COItPOflATIOM
(208) 364-8985
VERBATIM® ATHANA«° GEORGIA MAGNETICS®
Floppy Diskettes for
ANY COMPUTER SYSTEM
8 " Floppies only $3
10 for $3.05 63 • 50 for $3.40 ea
20
ea,
r1U\DntDL0"?
Wa r»a«rv* th» right lo ship althcr af (ht name brandi that wa carry
5 V4 Mini-floppies only $2
HU^DRED
10 for $3.10 ea • 50 for $2.85 ea
60
ea.
HU^DRED LOTS
SPECIFY SIZE, TYPE, A COMPUTER
S''< ' Soft Saclor. 10 Sector. 16 Sactor— 8' IBM Compatibla. Hard Svctor
CALL TOLL-FREE 24 HRS. TO ORDER
800-824-7888
OPERATOR 814
CALIFORNIA 800-852-7777 gi.diy »rvio*d C.O.D.
Schools and
unlvortltios
DC SOFTWRE & COMPUTER PRODUCTS
POST OFFICE BOX 503
SAN BRUNO, CALIF. 94066
FOR INFORMATION 415-348-2387
^58
1698 «<1L)=TE nUL>=lE
17W 1=1-111
1718 IF Kl TICH 1738
1730 GOTO \t£6
17M J=J»1
17« IF K* TtCM 1M«
17» GOTO 1666
17M ttTI.W
1768 fXn UBGLE StCI FOR KMHD UQHtS
1796 NI=M
18W S=«
18ie H]=N|-1
1626 FOR J=nwi
1S36 IF WKJ)<^NKJ+1> TVCH 1S6«
IBHH m-MKJ) REH TElfWV SIMS FW UHJ)
ie» Ul.Ji=HHJ+l) REH SHflF FUCtS
1B68 UK.U1)'U1
1879 S=l
1888 lEXT i
1890 IF S=l T»CH 1808
19«e RDI NCU fVINT LIST W tST
i^e F* ix-noK
19Ce F»1HT UKlXi.I):,
v>~s» *>n IX
1?M f1»lKT
L'-Se HTIBJ
156*1 ttn IftTRIWj Rtl.n!HE ktf TF'^^i LE«L 11 nHHUH.
1^78 FCI.- )11=lTCi LEH(TX)'LEN(TVH1
1968 IF lV=l11M(T)tMl,LEH<TVM RETlfS
i?m NEXT Ml
.«(« ni^fi kEiuM
2616 REH SLWOUTIHE TO IHHlfllZF CHHlrCl' Ll^l POIHTES
!K« H2^^ HK (f IS POIHTER
2«3« lH^l'=e
2We FORl^nWtl
2058 IH^l'Mn
7«Ut WXT 1
2078 lN(n*l>=(i
^888 KTLKN
2890 ttfl y.WWiTll€ TO lf6£RT WTB lllTL CWlltO L15.T
Lies REH rt IS PtilHTER TO FSIE SPf«
J116 IF K-f T>CN 2246
2128 m=i
2138 IF IN(U)=fi TtCN 2178
2148 IF ft(!H<m)):>ft T*H 2178
iV.« Hl=lH<m)
2166 KIT02138
21?e REM NW INSERT [*Tfl INTO LIST
21B8 J =112
21518 fC-lNtJ)
2288 lHai=lN(ni>
2218 fl<,n-H T(Jt=I R(J>=*
;f22e iN(ni):^j
2238 RET\W
2240 HilHT NO FREE SP«£ * ttTlBN
22S« fSn SiSROnifC to PRIHT ORKRED LIST
2268 LFVIMT'FLPHRBEETICa BV (UIHQSS LIST Of flRTICLEE'
2278 LPRWreiinED ftS FaLOHS REFI. flJTHDR. TITLE, REFUDCE*
2288 LFTiW '
2298 IC-m<l) REH SET POltTIR AT ST«T
2388 REH two t»1ILE N208
2318 LPRIHT K, " ■;
2328 LFKIMT fl(n2),' \
2338 LPRim T(K2),' ',
2340 LPBIHT fHK)
2358 n2=lH<n2) REM ST POIKTER TO ICXT ITDl
2368 IF n2=8 RETURN
2376 U:iT0239e
2388 REM BlHfiRV S£«CH TO SEE IF UORD IS OH IGKRED LIST
2398 K^
2408 IL-1
2410 IMI
2428 IF 1L>IH TtCN 2388
2430 lB=lHTC(lLtIH)/2)
2448 IF UUin)=U TTCN RETURN
2450 IF Hl(in):>U T>CN 2488
2468 IL^'imi
2478 QOTO 2428
2468 lW-IIV-1
2490 00102428
2500 Ua><U REn SnVE UDH) BECAUSE IT IS. HOT OM IGNORED LIST
2518 IT(L)-K2.REn KEEP TRfCK OF REFt
2528 K*i
2538 RETURN
5800 REM SiBROUTIHE TO PRINT MUKRlCa LISTING
5818 LPRIMT" LIST OF PRTIOES"
Se28 LPftltfT* •
5030 F0R1-2T0WM
5840 LPRIKT l.T(I),T(l>
5858 LPRINT Tfe<15)R(I>
%68 KXTl
5878 liETURN
70 • 80 Microcomputing, March 1980
Scannod by Ira Goldklang - www.trs 80.com
I made the TRS-80' into a serious computer.
Now IVe made tlie Model D into a spectacular one.
I'm Irwin Taranto, and I've helped almost a
thousand businesses get their first computers up
and running.
I've done it primarily with the TRS-80, because it's
a really elegant piece of hardware. Given the right
programs, it can do substantially the same work as
the traditional minicomputers that cost four times
as much.
I proved it vtfith four on-line, interactive programs
adapted from the genuine Osborne & Associates
systems, originaDy designed for the $30,000 Wang
computer. Then I added two of my own and made
them all work on a $4000 TRS-80.
Now I've done the same thing for the new TRS-80
Model II. It's an $8000 computer that works twice as
fast and has four times the memory — up to two
million characters.
My new^ systems are fully documented, and
because I'm working with a much more powerful
computer, they're a night-and-day advance over the
Model I programs. They'll turn your Model II into a
complete business computer, set up and ready to go.
THE TRS-SO MODEL n PROGRAMS
Oanaral Ladgvr/Caah Joamal: handles up to 7000 transaction.s
on 500 different user-defined accounts It keeps track of them by
month, quarter and year, makes compansons to the pnor yeai,
and does departmentalization
AcconntB ParablB/PniclUH* Ordar: generates the purchase order
and posts the item to payables when the goods aie received
Invoice-linked, it calculates and prints checks and aged ledger
reports and links fully to the general ledger.
Accounts IlMMlvabla/liivalcliig: keeps track of billed and
unbilled invoices, open and closed items, aging and service charge
calculation It pnnts statements, links to the general ledger, and
can work ivithin either an invoice-linked or balance- forward
accounting system
Payroll/Job Coating; computes regular, overtime and piecevi/ork
pay, keeps employee files, figures taxes and deductions, prints
checks, lournal, 941-A and W-2 forms, and breaks out individual
job costs
When I say set up and ready to go, I mean just
that. If you're not quite sure on that point, call the
number below and we'll give you the names of some
of the people who've already bought all over the
world. Call them up and hear what they have to say.
These Model II programs are completely custom-
tailored, which explains their $249.95 price. Before
we'll send you a disk, you have to fill out a detailed
questionnaire that tells us your precise business
requirements. Then we send you the disk, all the
instructions you need, and my phone number. If you
call, we answer all your questions. If your questions
are tough enough. I'll talk to you personally.
Because that way I'll make sure that Model II of
yours turns into a spectacular computer, just like
I promised.
1 1
. Please send me the custom questionnaiies foi the following
S249 95 Model II programs
Q General Ledger/Cash Journal
D Accounts Payable /Purchase Order
Li Accounts Receivable/ Invoicing
[1] Payroll/Job Costing
Please send me information on the TRS-80 Model 1 programs at
$99 95 each
Please send me information on other TEiranto business programs
Your name -
Company name.
Address
City/State/Zip .
^45
Taranto
& ASSOCIATES. INC.
PO Box 6073. 4136 Redwood Hwy . San Rafael UA 94903 - (41bl 472 2670
rk of the Tandy Corporation
f^ftMdwSM>tea— Mtpapa U7
80 Microcomputing, March 1960 • 71
HARDWARE
You can have the best of two worlds
with this software driven modification.
lowercase and UPPERCASE
Donald L. Stoner
Richard Barker
The Peripheral People
PO Box 524
Mercer Island WA 98040
Radio Shack didn't overlook
much when it designed the
TRS-80 system. It is unques-
tionably the most popular com-
puter of all time, with sales well
into six figures
At the time the TRS-80 was
being developed, graphics was
the big buzzword in the hobby
computer industry. Graphics
helped in the transition from
video games to hobby comput-
ers for the American public.
The marketing people at Tandy
were probably so insistent on
having belter graphics that
they overlooked one of the
most important markets for the
TRS-80— word processing.
If you are frugal and have a
bit of electronic knowledge,
you can build up a word proces-
sor for around $1000. The basic
BKOWN F«0« PIN i).Z27 GWEEN "<JM PIN l3.
Z!0
gBEA" ^iNt -
Fig. la,
TRS-60 costs $600, and the
careful shopper can find plenty
of Selectrics for less than S400.
It's impossible to have an ef-
fective word processor without
an uppercase/lowercase capa-
bility, however. An early bro-
chure on the TRS-80 mentioned
that you could have uppercase
and lowercase in your TRS-80,
but you would have to give up
the graphics capability. De-
spite sending repeated inquiries
(some of them heated) to Tandy
Corp., I failed to elicit exactly
how this could be done.
As it turns out, you can easily
have keyboard selection of up-
percase or lowercase without
giving up graphics. The infor-
mation that follows tells you
how. I call it a "convertible con-
version." It is simple to install
but, more important, can be re-
moved in a matter of minutes in
case you need warranty repairs
to your keyboard. No holes are
drilled in the case or circuit
board.
Materials
Besides the usual tools and
soldering iron, you will need the
components shown in Table 1.
All these materials are avail-
able from your Radio Shack
store. Their part numbers are
shown in parentheses. You will
also need some electronic
knowledge to complete the
conversion. If you are a little
weak in this area, consult a
friend you consider knowledge-
able in electronics. He can be
helpful if you get In trouble!
A switch is required in case
you want to return the circuit to
its original configuration. This
is necessary if you own (or plan
to purchase) any machine-lan-
guage programs such as Micro-
Chess 1.5. Without the switch,
the alpha characters in Micro-
Chess (and similar programs)
appear as weird control charac-
ters. However, the switch is
normally left in the conversion
position and does not affect
BASIC programs.
short tenglhs ol Kynar wire (278-M3)
one type 2103 IC (276-35011
one type 7466 IC {276-1B371
one 4 7k. ' . Watt resistor (271-030|
one DPDT toggle switcfi (275^14)
five 6 inch lengths of hookup wire (see Fig. 2)
Table 1. Parts list.
72 • 80 Microcomputing, March 1980
Conversion Procedure
Ready for the big step? Start
by forgetting you paid more
than $600 for the TRS-60 and
plunge ahead.
1. Disconnect your keyboard
and lay it face down on a bath
towel to prevent scratching.
2. Remove the six screws.
Note there are three different
types. Be sure to get them back
in the correct hoies when reas-
SREAK i;me
Fig. lb
sembling.
3. Carefuily turn the case
over and remove the top cover.
Lift out the keyboard assembly
from the posts and remove the
plastic spacers. Remove the
second circuit board and set
the bottom case section aside.
Do not flex the copper cable
(which connects the two boards)
excessively. The two boards do
not disconnect from each
other.
4. Set the two boards down,
component side up (with the
keyboard to the rear), on your
work towel. The values marked
on the main board should read
correctly (not upside down).
5. Observe the lower left
area of the main circuit board
(not the one with the keys). Lo-
cate IC chips Z60 and Z61. You
will be piggybacking a new IC
on top of each one of these
chips. If you do not know how,
learn to read the pin numbers of
these integrated circuits. Pin 1
CONVERTED
&«t£N TO PIM IS, 130
'tL^O* TO P'H \1, Z6il
oi«atiG€ to PIN 4. zeo
HEO TO Pin ). Z60P
SHOWN 10 PIN li. 12!
Fig. 2. Pre-wire the switch as
shown here. Don 'I forget to add
the jumper.
is the reference pin located at
the upper left-hand corner of
the chip, nearest the Z number
printed on the circuit board.
There is also a dot indentation
in the plastic body of the chip
nearest pin 1,
The pins are numbered suc-
cessively from pin 1 down one
side and up the other. Thus the
highest-numbered pin (usually
14 or 16) is opposite pin 1. Note
that Z60 (marked 74LS367) and
Z61 (marked 2102) are both
16-pin chips. Also locate Z30.
You are actually going to do a
coronary bypass by cutting a
circuit board trace near this
chip and another circuit trace
on the bottom of the board.
Still game? It is not too late
to put everything back to-
gether, get some orange model
airplane cement (butyl acetate).
touch up the warranty paint
seal, and Radio Shack will be
none the wiser! Proceed, you
say? Stout fellow!
6. We are going to stack the
new 2102 chip on top of Z61,
which also happens to be a
2102. First, however, bend up
pins 11 and 12 of the new 2102
(lets call it Z61 P, for piggyback)
at right angles so they cannot
touch pins 11 or 12 of Z6l.
7. Next, solder (pin for pin
and don't get It reversed end for
end) Z61P on top of Z61. Use ex-
treme caution to get all pins
(except 11 and 12, of course) se-
curely connected. Equally im-
portant, do not gel any solder
bridges between pins or from
one of the pins to the circuit
board.
8. Connect a short, direct
wire from pin 5 of Z60 to pin 1 1
of Z61P, Pin 12 of Z61P will be
connected to the toggle switch
later.
OK, that was the easy part.
Next we have to piggyback the
7486 chip on top of Z60, We'll
call this added chip 260P. Un-
fortunately, Z60P is a 14-pin
chip, while Z60 has 16 pins.
Thus, we cannot make a pin-f or-
pin connection as we did with
the 2102,
9- Bend pins 8. 9. 10. 11, 12
and 13 of Z60P at right angles
so that they cannot touch the
pins of Z60, Only pin 14 on this
side of the chip will be used.
10, Bend pins 1, 14 and 7
slightly so they will contact 1,
16 and 8 when Z60P is joined to
Z60,
11, Bend pins 4 and 5 of
Z60P away from each other so
they will contact pins 4 and 6 of
Z60 when the two chips are
joined,
12- Bend pins 2, 3 and 6 of
Z60P at right angles so they
cannot touch the pins of Z60.
13, Place Z60P over Z60 to
ensure you can make Ihe fol-
lowing solder connections.
Look good? OK, solder the con-
nections. The first number is
Z60P; the second is Z60,
Pin 1 to Pin 1
Pin 14 to Pin 16
Pin 7 to Pin 8
Pin 5 to Pin 6
Pin 4 to Pin 4
14, Connect the 4.7k, 1/4
Watt resistor between pins 1
and 14of Z60P,
15, Connect a short, direct
length of Kynar wire from pin 2
to pin 6 of Z60P, For the mo-
ment, leave pin 3 of Z60P dis-
connected. It will be connected
Fig. 3. Circuit diagram of the converted uppercase/lowercase
TRS-80. (Courtesy of Radio Shack)
Connect the green wire to pin 13 of Z30.
Connect itie orange wire lo pin 4 ot Z60.
Conned Ihe yellow wife to pin 12 ot Z61P,
Connect the red wire lo pin 3 of Z60P
Connect the brown wire to pin 13 o1 Z27.
Table 2- Connecting the switch.
80 Microcomputing, March 1980 • 73
BF60-
F5
3A
16
40
FE
01
20
06
79
C5
CD
3B
no
CI
^^
19
BF70:
40
FE
01
28
04
F1
C3
58
04
F1
DD
6E
03
DD
66
04
BF80:
DA
9A
CM
DD
7E
05
B7
28
01
77
79
FE
80
D2
A6
04
BF90:
FE
20
DA
06
05
FE
40
DA
7D
04
FE
60
X
06
F6
20
BFAO:
C3
7D
04
E6
9F
C3
7D
04
3A
19
40
FE
01
?n
14
79
BFBO:
FE
41
38
OE
FE
7A
30
OA
FE
5B
38
04
FF.
20
36
02
BFCO:
EE
20
4F
3A
1A
40
FE
01
C2
8D
05
79
FE
OD
28
05
BFDO:
FE
OA
C2
8D
05
11
00
20
IB
7A
83
20
FB
3E
00
32
BFEO:
E8
37
n
00
20
IB
7A
B3
20
FB
3E
OA
32
E8
37
11
BFFO:
00
30
1B
7A
B3
20
FE
OE
OD
C9
00
00
00
00
00
00
Listing 1.
to the toggle switch later.
16. Refer to the sketch in
Fig. 1 (a). Locate the area shown
between Z29 and Z30 and cut
the trace with an X-acto knife at
the point shown. This point can
be bridged with a short piece of
bare Kynar wire if it is neces-
sary to remove the conversion.
17. Similarly, on the reverse
side of the board, locate the cir-
cuit trace that goes from pin 13
of Z30 to pin 4 of Z60 (see Fig. 1
(b)). Make a small cut in this
trace that can be bridged later,
if the conversion is removed.
18. The last conversion step
is to connect the toggle switch.
Use the 6 inch lengths of hook-
up wire to prepare the switch as
shown in Fig. 2. Connect the
switch as directed in Table 2.
Don't forget to include the
jumper on the switch, as shown
in Fig. 2. Place the switch in the
conversion position (with the
handle toward the green wire
end).
This completes the case con-
version of the TRS-80. Carefully
reviev^ your work to make abso-
lutely certain there are no
shorted wires or solder bridges.
Check things with an ohmme-
ter if you have any doubt about
any connection. Once you are
certain all is well, reassemble
everything by reversing the dis-
assembly steps done earlier.
Route the cable (with the toggle
switch on the end) out the hole
where the interface plug con-
nects.
Power Up
After reconnecting every-
thing, power up the system nor-
mally. The screen display
should be the same as before
with one small exception. Your
cursor will no longer be a dash
but, rather, will look like 13.
This is one of the control char-
acters mentioned earlier. It
takes some getting used to, but
pretend it's a happy face!
Despite all that work, we still
have no lowercase letters. For
this, you are going to have to
enter some software. If you did
not purchase a software tape
from The Peripheral People,
use your T-BUG or DOS to enter
the machine-language program
in Listing 1. It is relocatable, de-
pending on how much memory
you have.
The BF is the location. It
should be 7F, BF or FF for 16K,
32K or 48K. respectively. Don't
forget to protect your memory
at 32605, 48991 or 65375, or
your programs will go crashing
into this routine with disas-
trous results. Incidentally,
don't forget to also save the
routine on tape or disk. Having
to enter the machine code each
time you want to use the upper-
case-lowercase conversion can
POKE 1M1 4,96^ POKE 1 641 5.XXX POKE 1&422. 1 67: POKE 1 6423.XXX
Example 1.
INPUT' WOULD YOU LIKE UPPER AND LOWER CASE";AS
IF LEFT$<AJ,1} = "Y"THEN POKE 8H4019,1 ELSE POKE aH4019,0
Example 2.
become messy.
Testing
To see if all your hard work
and electronic expertise paid
off, type and enter the patch (in
Example 1) to the start of the
routine. The XXXs are the start-
ing address and are the deci-
mal equivalent of 7F, BF or FF
for 16, 32 and 48K. respectively.
This patch will be required at
the start of any program that re-
quires uppercase and lower-
case. Next, type and enter
&H4019,1.
The screen should show
READY in lowercase letters.
Besides this, the first thing you
will probably notice is that the
letter a is sitting above the
baseline of the words. Early
TRS-80S had a N^otoroia char-
acter generator ROM with an er-
ror in the font for this letter. In
later units, this ROM error was
corrected.
You will also find that the
tails on letters such as p, q, y
and so on don't extend below
the baseline. This is because
the character generator is only
a 5 X 7 matrix. There simply are
not enough dots available to
print the tails below the base-
line. The letters could be shifted
electronically, but this is hardly
worth the complication, trouble
and expense (translation: I don't
know how). Once you get used
to the shifted letters, you won't
notice them anyway.
You can return to uppercase
only by typing POKE &h4019,0.
The two POKE statements can
be built into your program (see
Example 2).
It is interesting that an un-
modified TRS-80 does have up-
percase and lowercase printing
capability. Naturally, this is on-
ly apparent with a printer hav-
ing a lowercase capability.
However, LPRINT produces up-
percase printing all the time un-
less you use the shift key when
writing the program. Unfortu-
nately, pressing the shift will
cause lowercase letters to be
printed, which is just the oppo-
site of what you want.
The Program
The program which accom-
panies this article has provi-
sion for reversing the case out
the printer port. The case rever-
sal to the printer is made auto-
matically When you use the
above POKE statement. Natu-
rally, when you POKE back to
zero, the normal unshifted up-
percase printing occurs.
The accompanying program
also has provision for inserting
an automatic line feed with
each carriage return. If you
have a Teletype or similar ma-
chine that requires this, simply
POKE &H401A,1 to turn it on
and &H401 A,0 to turn it oft. The
program will even add a carriage
return after a line feed as re-
quired by some printers.
Finally, the program has an
echo routine. To the best of my
knowledge, this is the first time
this feature has been offered to
TRS-80 owners. This is extreme-
ly handy for a couple of rea-
sons. Let's say you have a num-
ber of PRINT statements that
must be changed to LPRINT be-
fore the printer will work. You
can type POKE &H4018.1 just
before these statements. Any
subsequent print statements
will echo on the screen and
printout without adding L ahead
of each.
The echo is also handy to
turn your printer into a type-
writer. By entering the echo
POKE statement, anything you
type on the keyboard will echo
on the printer. When you want
to turn off this feature, simply
type POKE &H4018,0,
These features are all incor-
porated in the Electric Secre-
tary word-processing program,
which was used to type this
manuscript. It is available from
The Peripheral People for $50
postage paid on a customer-
supplied DOS-formatted disk
for the TRS-80, The Electric
Secretary can also be supplied
on cassette for the same price,
for customer transfer to a disk.
Note, however, it is a disk-
based system only. Because of
the self-contained hyphenating
dictionary (and other features)
a cassette-based system is not
fast enough. A complete con-
version kit of parts, including a
machine-language program
tape, is also available from The
Peripheral People (Box 524,
Mercer Island WA 98040) for
$20 postage paid.H
74 • 80 Microcomputing, March 1960
rr.
v^
TRS-80:
"TRS-ao is « r*glal«rM] IrMtomarli of TAHOV COUP."
FINDISK^Il AuIomaiicaHy extract user
file names from disks, print disk directory
labels and indexed master list of all disk files
Automatic update Optional descriptions
TRSDOSorNEWDOS S20.00
SOLAR-I Passive solai analysis Input ar\^
latitude, orientation slope, storage, roof
shading Output solar angles, heat gam loss.
% solar fuel use. hourly monlhlv, vearly
in presentation formal By solar architect
easy use Comprehensive manual $30.00
SOLAR-ll As above plus lifecycle cosi
optimization S 50.00
RIA-II R^ai Estate Investment Analysts
business or homeowner Input costs, loan.
lay. data Output beforf after lax cash
flows, rates of leturn depreciation profit gain
of sale for an\ iim.' series complex essentiai
investment caiculaCons in seconds S30.00
All .i2K Tape or I.)isk (one dnve order tape/
Fotlowing mm req. 16K Level-ll:
DEPRECIATE-I Calculate, sums, print
depreciation schedules 1 to 500 items, plus
pnnt Tax Schedule C Automaticaily up-
date 12 facts on each item such as re
maining bal & life Prompts optimum
switch DDB to SL . , $10.00
STRUCT-! Calculate and print beam si^es.
moment, shear diagrams Oplimiie beam,
joist selections Simple span cantilever,
uniform and/or point loads Also momenl
transfer calculations for unusual shapes
Screen and printer graphics $15.00
DOCUMANSOFTWARf --sa
B0X,W7D KAI.AMA/OO MI4')l)liS
bib) i44 ilMii,') VISA MC
yj
J. A «S^ .^ «* .4, >>
^V*
'^^.
4^' <«^*
Personal Checks
* Payables Checks
* Payroll Checks
* Combination Checks
* Statements
* Invoices
* Small Minimum Orders
* Fast Delivery
Checks
To-Go
.^46
* Rsglstered Tradnmark at Tandy Corp,
P.O. Box 148. Spring Valley. California 92077 (714) 460-4975
MALL
L^? PRODUCTS [8URS-80- ^™
YSTEM
MALL
k-FYSTEM
MACHINE LANGUAGE GAMES
UM MIk, UMICUC Of- nL-1: - aiO.OO fich, ill ! for tB.OO
sil DDDulir gtar. Crojrit) bated
t ! Mouri oY fun '
UailC«>E: "BIEAKOUr" far trvr TIS-SO ' Brtik tDrough S mill iifth
hign-ip«K) ball and kt^board controUta oaadlrl M ili(f(r*nt ontioni!
nL-1: EnTtr M'tcrni ailh repeating ■ej'Doara! Save palttrm sfi lap* (^
furniihed). Hay Jotm Cwi-ar's LIfE. <»Si - aboul 1 itcond per gcncratian!
kanwruM' st4.n each, (;
r, 112. so each]
7 vcriioni: 1 -»dv«nlurtland, J-P'rite'i Jldventu'*, i-"'iiion lapoiiible,
k-»oo<>oo Caitle, 4-rhe Coijit , 6-St'-ang« Odyiier, 7-Pti>iterj fun itouie.
UTILITIES
MM-l: MCNIH UMWWtl NWITOa FM lie rK-«>I - SZ6.9S
MK-n: TNME HKian or tn»-2 FM KIK STSTER - zv.vs
■SV-I MLOCaTM: rvT tS»-2/fB MmMEH » lUMIT - 9.9S
■ actiine Language ■on'iori Hitfi Z-BO di laiieaDLer ! HEi ant) jtSCII ■caorr
lliMOi; E»IT, "OVE, EICHAMGE, VESIFT, FILL, lEHO, TEST, or SEARCH Be-or,,
read/Hritc STSrE" tapet, enter BREACPDINTS, PRINT vitn TRS23Z or Centromci,
read/KTite dim lecion dirccllr' Km-l tape Loads at top of 16K LEVEL I sr
II; ISM-fe d<ik includci ! ventom for 16K, 3n and UK.
KV-1: CCnflBT JTtTEH PtOfiURS TO BISK FILEI -a9.VS. Eiecute Advenlure,
At Raid, BSL-I, ESP-1, T-«U6, ett. fro" di»k, ev«n if they interfere Btth
TRSDOS' Men vcrtion norkl with TRSDOS 2.1.
MSIC-IP: LEVEL-1 HUIC MITN PBIHTlMt - 119.95. Run anr LEVEL-1 BASK
prograa on your 16K Lev*!-?. PLUS LPRIRT and LLIST uith our TRSJJJ or
Centronici. Furmihed v taoe; can be uied froa diik.
OTHEB PtOMKTS F0< THE TIS-W*
ES^I: S29.9S. Aiieabler, Edilar, Horitor (SOSO ancBonici)
UT-I: I.OD. Lilting at Level-1 BASIC aith soae coHrnti
See your dealer or order
CALIFORNIA rciidenti pli
reel fro* SbiLL Systea Softvare!
include At for state lalei ta>.
MODEL-)! TRS-80"
CPni''WtSIIM Z.a F0« the KWEL-I1 - liro.in. Lateit vemon froa B'gital
Research. Runs bot'' s'ngLe and double denin, a. ski' "Sianajrd" we's^on
'uns nearly any CP/N lott.are, mcljamg Cotjol, Fortran, C-Bai>(, N-9*si:,
busineis ar»a atcounttng oackaget, etc. MunOred! of proqra"i j.aiiable'
ISnil: EMNRCEB RSN MWITM fob the RWEL-1I - f».95. RelotataBle veri>on
o' RSN-Jb plus screen editor 'or modi + yng either aeaory or diM wctofs m
both He> and ASCII, Wlit screen scrolling, and for»atied se-ial or parallel
printing. Sold on lelt-bootirtg disk; directions lo ia.e as TRSBOS file.
PROFESSIONAL SOFTWARE
■ICIOWfr MCM USEIBLEI - taO.OO. Editor, Linking Loader, Editor, C-oss
Reference utilities. ProOuces relocatable code: Requires S2s, 1 disk.
HtCROSOFI FOBTUa - sao.OO. /o'tran Co-piler, Editor, Librargr. Linking
Loade- forms Foftrjr, AiM»b>y a"d L-briry -n^lfs into on* prograa' )2«, 1
disk. SAVE' Order bol" tacro-Asie^ler and Fortran tor 1150,00.
T« ELfCTBIC PENCIL FOB THE TBS-«: T»Pt-«99.95, BISK-B150.00. Popular
wideo editor 'or creating and saving teit 'lies. Pnnts foraatted copy nith
right ;uiti f icat ion, page filing ( nuabering, etc. Upper case only, or
lower case -ith aodi f 'cat ion. IW Level-1 o' 2 (tape).
CP/«"OnUTIM STSTEB FOB THE KOOEL-I - BU5.00. The SOBO/IBO "Soflware
Bus for the Roflel-I 'RS-80. Includes T«S3!Z and ai-2l2-i software,
laaer-caSB suoport, deboixice, BCV-i and other ijiioue utHU'et. Allows use
of "any available ftfograas written for (P'N.
PRINTER SUPPORT
TBS212 PBIHTE* INTEIFME - U9.95 (HJ.OO shiocmg). AsseableO and tested
printer interface for RS232 or ?0-«il current loop printers, inpansion
interface not required. Print fro. level-ll BASIC, CP/N, BASIC-IP, ELECTRIC
PENCIL, etc. Standard cassette software included.
TRSn? "FOWMTTEr" SOFTVAtE PACKAGE - «!*.«. Adds page and line length
control, printer pause, "snart" line teraination, etc, to T»SZ!i,
RSIIZ52: Adds K-112-Z capability to BS«-i/?B - 19,95
PER2U: RS-23J-C for cassette Electric Pencil - 9.95
EBT232: TR5;3Z and RS-232-C for disk/tape EOTASX - 9.«5
••CP/N tn Digital Reif
ch, Inc,
♦ TBS-80 in Tandy Corp,
^20
SHALL STSTEMSOFTNIRE
P.O. m 3iG
HEVIURT PMK. CH 91320 I SMALL SYSTEM SOFTWARE
P.O. BOX 3GE
NEWBURY PARK. CA SI320
«^A«ad«r5«rvrcfl— sff«p«0* 147
^Microcomputing, March 1980 • 75
Introclucing
COBOL + FORTRAN + 64K RAM
FOR YOUR TRS -80
Release your software chains with the NEW FftEEDOM OPTION, a plugable change
that restructures the TRS-80' on command to perform like a large Z80 system .
All the TRS-80' features are retained. All TRS'80' software will run without
Interference. The option Is supplied with a fully assembled & tested FREEDOM BOARD,
T6/08 on a5\"dlsk, and complete Instructions. T8/OS allows your TRS-80' to execute
most software originally written for CDOS^ , TSA/OS,, and CP/M, operating systems.
T8/OS opens the door to higher level languages and existing programs.
To further enhance your TRS-80' processing power, a MEMORY EXPANSION OPTION
is available to replace, on command, the ROM and provide A FULL 64K RAM.
This option is switched into operation by the FREEDOM BOARD providing 57K of
USER RAM with TB/OS loaded. Both options are fully assembled & tested and fit
Into the TRS- 80' keyboard enclosure. Write for more details. 6 Mo. Board Warranty.
FREEDOM OPTION $245
MEMORY EXPANSION OPTION $295
Send Check or Money Order to:
(MASS RESIDENTS. PLEASE I NCLUOE 5% TAX)
r«B«\a« ltd. '^"^ (617)944-5320
P.O.Box 2368 •Woburn, MA. 01888
■TRS-SO ® Tandy Corp
t-CDOS tt Crmamco Inc.
2-TSA OS <S TSA 5ollwa(« Inc
3-CP M <S Olaital Raiaatch Ir
CREATE YOUR OWN PROGRAMS
Custom prQgrarrt5 aie Ihe besf way to ensure
that your ccmpiitcr does what you want
■"Computer Programing lor the Complete Idiot"
simplifies programing by describing a format that
shows how to organize BASIC into meaningful
program; tt^at acheve specific tasks. A Payroll
Program is useil as sn example Detailed instrut-
tions then show how to apply this piocess to
creating original p'ograms
This book features the TRS-80 and is an excel-
lent guiife lor the begmrer with many usrIlI
relerences tor the advanced programer
??iYJ115_ _ 228 _PAGES
Please lend m? copies of "Computer
Programing tor the Complete Idiot" at J5.95 each
plus (1.00 for shipping. (California residents add
sales tax of JO-36 per book )
'J Check or Money Order Enclosed.
Charge to my: ^ Master Charge ~ Visa.
Card No:
Exp,
Name: _
Udress :
Zip:
DESIGN ENTERPRISES OF SAN FRANCISCO
Dept, 803, P.O. Box 27677
San Fiancisco, CA, 94127 ^^3^
76 • 80 Microcomputing, March 1980
SOFTWARE AND
HARDWARE FOR
MODEL I COMPUTER
DISK DRIVES
HIGH-SPEED PRINTERS
MICRO-COMPUTER CASSETTES
DISKETTES
BUSINESS AND PERSONAL
PROGRAMMING
UTILITY PROGRAMS
CUSTOM PROGRAMMING
MODEL I COMPUTERS
'CIRCLE READER SERVICE NUMBER'
OR WRITE FOR BROCHURE
COMPUTER GENERATED DATA
700 Baker Road Suite 115
Virginia Beach, Virginia 23462
{804)497-1165 ^,3,
TRS-SO"^ STRUCTURED
BASIC
Now available lor TRS-80 disk systems
.\ prc-compiler addini; performed pro-
cedures. ea-.e structures, repeal while, until
and man> other siruciured language siale-
menis 10 the already powerful Los el II
BASIC, Diskette S5().0(). Listing S,1-VIX).
Manual purchased separately $10.00,
313 Meadow Lane
Hastings. Michigan 49058
(616) 945-5334
I Dealer inquiries invHettl
'RS 80 ■■-■. 3 rtademdix al Tanav Corp
REVIEW
Seems that a label can cost more than $100, read why.
Quick Printer
Henry G. Riekers
208 Phelps Avenue
Glen Burnie MD 21061
Centronics Data Computer
Corporation of Hudson NH
manufactures the P1 Microprint-
er, which is also Itnown as the
Quick Printer when sold under
the Radio Shacft label.
The PI is a seven-bit ASCII
TTL printer with strobe and ac-
knowledge pulse that employs
nonimpact discharge technolo-
gy that requires only four mov-
ing parts to produce variable-
pitch 5x8 dot matrix charac-
ters at a rate of 150 lines per
minute, with a vertical density
of 5 lines per inch. The paper,
which is 4.75 inches wide, car-
ries a conductive aluminized
coating that is vaporized by a
low voltage discharge from the
printhead. Printed characters
are highly legible, and excellent
copies can be made.
A number of software com-
mands initiated by the TRS-80
provide the user with con-
siderable flexibility, such as
printing at either 5, 10 or 20
horizontal characters per inch.
Underlining may t>e started and
stopped by separate com-
mands. An audio alarm, also
under software control, pro-
vides a loud two-second tone.
The full 96-character ASCII set,
including both upper and lower-
case letters, can be printed.
Connection of the PI to the
THS-80 Is accomplished through
a Radio Shack 26-1401 cable
and the Radio Shack 26-1 140 Ex-
pansion Interface. (Note: Radio
Shack has recently announced
a lower-priced alternative for the
connection of parallel printers
to the TRS-eO without the need
for the Expansion Interface.) No
electrical changes are required
to the Centronics PI printer to
make it compatible with the
TRS-80.
The Centronics manual pro-
vides the octal software codes
for printer control. Since the
TRS-80 initiates these com-
mands in decimal format, they
must be converted by the
operator. Thus, LPRINT-
CHR$(29) prints 20 characters
per inch; LPRINTCHR$(30)
prints 10 characters per inch;
and LPRINTCHR$(31) prints 5
characters per inch, which is
typed into the computer, for ex-
ample, as LPRINTCHR$(31)
"Radio Shack." Underlining is
started and stopped using
LPRINTCHR$(15) and (16).
respectively. The audio alarm is
sounded by LPRINTCHR$(07).
The commands for print size
may be given prior to listing a
program or may be included in
the txxly of the program to ob-
80 Microcomputing, March 1980 • 77
tain various printing effects. In
addition, lowercase letters may
be printed directly on the PI by
depressing ttie shift key when a
program is typed on the key-
board. The printing will still ap-
pear as all uppercase on the
CRT. but will be both upper and
lowercase on the PI tor what-
ever printing density is selected.
Since each character can be
printed using its ASCII code in
the CHR$ format, it is possible
to print characters not other-
wise possible, such as quota
tion marks. In addition, printing
may be stopped and started.
paper advanced and printhead
positioned.
The PI is 13 inches wide, 10.5
inches deep. 4.25 inches high,
weighs 10 pounds and con-
sumes 40 Watts while printing.
The case is made of rugged
plastic decorated in ivory and
black. Controls on the front of
the printer consist ot a power
switch to turn the unit on and
off, a select switch that allows
data to enter the printer and a
paper-feed button that permits
the operator to advance the
paper. Even though power is
"on," the motor turns off when
no data is present.
Indicators consist of lamps
displaying power "on" and
"'paper empty." which also
sounds an audio alarm. Paper is
available from Radio Shack or
directly from Centronics in
either shiny or matte aluminum
finish. The printer is not sup-
plied with a mating connector.
The Centronics P1 is available
through many supply houses for
$395 each. The Quick Printer is
sold by Radio Shack for $499
and is available off-the-shelf in
many stores. ■
M I OROF^ff^ I IMTt R-
MICROPRINTER
t^ium.ifm
Mid r^op" 1 — in "C-^r^
M i c rop r i n t-er-
^kr9-ri!itir
Sample output from PI.
DUST COVERS
& software/hardware
TRS-80
three piece set
keyboard- tape -video
durable black vinyl
$16.95
+$2 long video ( expint )
L,2 music prgm $4.95
tape controller with
spkr/vol control $9.95
prgm+cont roller $13.95
all prices POSTPAID
COMPUTER PRODUCTS
13495 W. Center Dr.
Denver, Co. 80228
■ "TnS-801sa ragtltsred tradAmBrh ot TANDY CORP " i
MicroPhase Systems
Announcss
WORDSCRIBE for TRS-80s
LetWOflOSCRIBEtrirsfDnn your Model 1 or Bode 1 II
TRS-BO into i fiigfi quality word processing systew.
WONDSCRtBE features Include: fu11 screen
editing, margin Justif icatton, line iniertiofl,
line deletion, block n»ve, tilock copy, find,
change, and mucfi much mart.
Model II J149.95
reg. 1 disk, 6<k neir.
Model 1 disk version t 99.95
reg. 1 disk, *8k meir.
[tocuiwntation only I 9.95
(can be applied to later purchase)
STOCK HARKET DftT« TAPES for THS-80 Model I •.•.
Each tape cassette contains one imjnths data for
the N»SE or AMEl Stock of your choice. Data
Includes daily high, Ioh, close, «nd tolume
infoTtnation. Can be read by any Level II Basic
program Hitti simple input statements. Available
for Jan. 1979 to present. Please Specify ■onth
and stock name.
one months data i 5.95
charting program 149. 9S
(plots hig'i, low, close and 2 moving avgs.)
MicroPhase Systems
11??3 E. 45 St. So. (31* ►-123
Tulsi, Ok, 74145
TRS-80 CAI
for Educators, Parents, Managers
fjWUm,
^^20
3 levels ot text
detail
Question models
mpl choice
one word ans
Mic'oGnome Presenis
CAiWARE
Tne compuie' prog'am
I flat lets /OLi
AUTHOR
your o*n
COMPUTER ASSISTED
INSTRUCTION
on youf TRS-BO"
A iraaemafh at Tandy Corp
MicfoGnomes CAIWARE ^s available or cassette
tO' 16K TRS 80 .fi LEVEL II BASIC tor $24 95
UD resiOenis ada Ji 25 lai O'Oer on Iwiaste'
Cfiafge Visa Ceftrtieo Cnecti or Money Oraei
Pefsonai Ct^ects reguFie 14 aavs to clear Sciftwa'e
waffanieeo tof replacement only Oiae' uom
FiresiOe Compuling (nc 5843 Wonlgomery Ra
ElKrtOge. MD J1??7 (3011 796 416'i (301[ 725-
92B8
T R S 80 USERS
Preserve — Protect ~ Display
your equipment with
CRYSTAL CLEAR
PLASTIC COVERS
special <^fer: Buy both covers & saw
• Kfv(v).itd '.nrerlace & CRT . . . , $10.95 ea
• 1 itir iwinter $10 % eei
Combination price $19.95
phifi $1.50 postage
llndiana residents udd 4 ' sales tax)
Crown Plastic Co,
3746 N, CoUege 317-92.5-5566
Indianapolis. IN 46225 1^119 "■
Preserve — Protect — Display
your pquipment wilh
CRYSTAL CLEAR
PLASTIC COVERS
■ KtyOooid b CRT %7*-n h
• Lk-» (jfint*. . .. . t1*.93 ■□
(Inborn rfiidf-LTi oAT 4X idt*i taiI
CROVH PlASTtC CO.
374« N, College 91 7 -92 SS 566
Indlanopolli. IN 46225
tniroduciOfy 0»n. Bur txxl^ covm f. uv
Comblnotlon price (34, 95
Including postog*
►^160
■DUCATIONAL SOFTWAREI
Level II— Min 4K
lALfHA For ages 4-7 — teaches
alphabet recognitioni
Reinforcement — a "happy"]
face
ISIOMA For Grades 1-3— Arandoml
series of one-digit addition|
problems (i,e. 4 + 5 = 9)
Reinforcement— Push the
pucl< through the goal
I Simple to use — No depressing the ENTER|
I key
Uch $5.95— Both for S 10.00
Mercer Systems Inc.
87 Scooter Lane
Htcksvllle, N.Y. I I SO I
1^104
78 • 80 Microcomputing. March 1980
GENERAL
You too can earn money
with your computer expertise.
Part-Time Consultant
Michel Monn
15 Jasper Rd.
Candiac Quebec
Canada J5R 4E7
I am an audio-visual technician
and a computer hobbyist who
originally bought a TRS-80 to
play Star Trek and develop a sys-
tem to play music with an organ.
I have since become a part-time
consultant on the TRS-80 Busi-
ness System, This article is a
description of a recent project in
which I am still involved.
Background
In October 78. a local Radio
Shack store manager asked me
if I was willing to help two poten-
tial customers who had a prob-
lem that might be solved by a
TRS-80 Business System. These
two customers operated school
buses and other inter-urban
buses and wanted to produce a
set of specialized and complex
reports. Fifteen of these reports
were to be completed yearly and
sent to the provincial govern-
ment. They were to be based on
data that the bus operators had
never compiled in the past.
After studying their problem
and the specs of the Radio
Shack System, I accepted the
challenge. Both of them placed
orders for a 32K Business Sys-
tem with two disk drives and a
printer.
At that time, Radio Shack
Canada was taking orders for
disk based systems, but nobody
had ever seen one. My first move
was to get. by nearly fraudulent
means, a copy of the DOS manu-
al that was to come with the sys-
tem. Until then, I had had no ex-
perience with Disk BASIC.
1 deciphered the bus com-
pany's reports and determined
that I would have to put the
whole accounting of the busi-
ness on the system. Since I
didn't know the first thing about
the subject, I found some help in
the form of a younger brother
who's an accountant.
Our first decision was to write
a General Ledger program to
which we could add others as
the need arose. The ledger
would need 235 accounts and
most of these had to appear six
times. We created the flow
charts from scratch and wrote a
few program lines, while waiting
for Radio Shack peripherals.
Finally, in January 79, the disk
drives arrived at the store and I
think they were the first ones in
the Montreal region.
Problems
The first problem we had,
because of our lack of experi-
ence and problematic Instruc-
tions from Radio Shack was set-
ting up the system. We thought
we had the system working and
decided to make a couple of
backups of the DOS just in case.
Alas, Radio Shack didn't have
diskettes to sell in Canada, so
we had to buy some Verbatim at
an outrageous price in the only
computer shop in Montreal.
The GL accounts would be
kept in a random file and the dai-
ly transactions in a sequential
file which we'd scrap each
month, after producing a de-
tailed journal of accounts.
The DOS (version 2.1) started
acting up and on at least three
occasions zapped all of our
files, while committing suicide
itself. After much searching, we
found that one of the disk drives
had tracking problems and luck-
ily we found a replacement for it.
We had problems each time
the drives were trying to write or
read a sequential tile and re-
solved to avoid using them and
to post transactions as they
were entered in the ledger.
Another problem was time.
One of our programs that gener-
ated a beautiful report took
about 12 hours to run because
of certain characteristics of
Disk BASIC using sequential
files. We scrapped that report
and produced a summary of
transactions for each session at
the computer that took a lot less
time.
Our handicap in these early
attempts was Radio Shack's
version 2.1 DOS.
Right now, our customers use
the programs daily and they
work just fine. Since each trans-
action is posted as entered, they
can always generate up-to-date
financial reports and they love
that!
We are currently working on a
set of programs that will keep
track of data pertaining to the
operation of each vehicle,
which, when combined with the
General Ledger will yield all the
statistical information desired
by the government.
Conclusion
This initial experience has led
me to other customers with spe-
cial applications problems for
which I write programs. If a cus-
tomer has standard applica-
tions. I encourage him to buy
the Osborne programs sold by
Taranto or Computronics and I
translate them into French for
his system.
Why the Osborne programs?
Because Radio Shack is unable
to fill its customer orders. My
first customers are still waiting
for Radio Shack's Canadian
payroll program, first promised
IVz years ago. ■
UTILITY
If you've installed some additional
memory and want to put it to the test— read on.
Test Your Memory
Milan D. Chepko
119 Bellevilte Court
Thief River Falls MN 56701
After adding a disk drive to
my 16KTRS-80 system, I be-
gan to teel a "memory crunch"
because of the DOS and DISK
BASIC lying up some of the
RAM. Though Radio Shack will
cheerfully install another set of
16K RAM chips for $200, this
seems a iittle steep, especially
now that several companies sell
kits of the same chips for
around $70.
Installing the chips in the Ex-
pansion Module was relatively
easy (why do the first set of
Chips go in sockets Z9-Z16
while the second set go in
sockets Z1-Z8?), but later I
began to have some nagging
doubts about how good my new
memory really was. I had some
bad experiences with my old 4K
RAM boards using 2102s a few
years ago, so I decided to check
out the new memory completely
before entrusting my programs
to it.
First, I reviewed the memory
structure ot the TRS-80 system.
As shown in Fig. 1, the total
addressable memory space is
broken into two blocks of 32K,
the first half residing in the
CPU/keyboard and the second
half in the Expansion Module.
In the CPU, the first 16K is
used for the ROM chips holding
Level II BASIC, the video RAM
chips and the memory space al-
lotted to the keyt>oard itself.
The second 16K is made up of
eight RAM chips and is gener-
ally available for programming
(although several hundred bytes
at the beginning are used by the
processor for "housekeeping"
tasks, so only 15K or so is really
usable). PEEK and POKE can be
used to address any of these
locations, which are numbered
from to +32767 in digital for-
mat.
In the Expansion Module,
there is space for a total of 32K
of RAM in two banks of eight
memory chip sockets. Each
bank of eight sockets provides
16K of RAM when the chips are
inserted. The addresses (in digi-
tal format) for this second half
of memory run from -32768 to
- 1, which causes some confu-
sion at first. The best approach
is to figure that the location just
after -f 32767 is -32768, the
next is - 32767 and so on.
Testing the Memory
Testing the memory turned
out to be easier than figuring out
the addresses I Essentially, all
memory tests consist ot storing
a specific bit pattern at a loca-
tion, reading it back and com-
paring the result with what
should be there. If the results
are different, an error message
is generated.
No memory test could ever
cover all the possible bit pat-
terns tn a reasonable running
time, so some shortcuts must
be used. One effective meth-
od is to store alternating bit
patterns like 10101010 and
01010101 in sequential memory
locations, then check to see if
any have been forgotten or dis-
turbed by their neightxirs. If the
pattern at any location is not as
expected, there is a defect ei-
ther in a memory chip or in the
traces on the board.
While it is helpful to know
which bit is incorrect, it is even
more useful to know which
memory chip is at fault. Each of
the eight bits in a memory loca-
tion resides in different memory
chips, tying side by side on the
board. By determining which bit
is incorrect, we narrow the prob-
lem down to a specific memory
chip.
Once a bad chip is identified.
it is always a good idea to swap
it for one of the known good
chips on the board and run the
memory test again. If the defect
moves with the chip, pack it up
and send it back to the supplier.
If the defect stays at the original
location, the chip is probably
OK, but there may be something
wrong with the board itself —
possibly a solder bridge that you
can find and remove with a little
searching.
The program contains its own
instructions along with REM
statements to describe the func-
tion of each section. After deter-
mining the locations to be
tested, the program tills them
with the alternating bit pattern.
It then goes back and checks
first for one pattern and then the
other.
The pattern is reversed for the
second pass through memory,
and whenever a defect is en-
countered the program
branches to a subroutine that
determines which chip is at
fault.
There is provision for use of a
line printer, which can be very
CPU/1ETBO4H0
EXPANSION MODULE
IGH
LE«EL n ROM
VIDEO DISPLftY
KEIBOtRO
4K
OAM
H
H
16 H RAU
H* RAW
IGK NAM
16!BJ
OOOO 3FFF
COO-000 077-37T
16304
4000
100-0
oo
32767
TFff
IT7-3T7
-32768
BODO
200-000
-16385
BFFF
277- 377
-I6S84
COOO
300-000
- 1
377-S77
(DIGITAL)
IHEXADECIMAL)
(SPLIT OCTAL)
I I MEUORT US£0 for'kousekeepimg'
'^^0 0^ WEMOB' TO BE EXPANDED BEFORE AOOlttG TO EXPANSION MODULE
fig. 1
BO • 80 Microcomputing, March 1980
Scanned by Ira Goidkiang - www lrs-80 com
BuiM your own microcompulor
as you learn
computer teclmoloqv at home.
New from NRI!
The First Interdisciplinary
Home Study Course Ever OflFered
As the mJCToprocessor revolutionizes
the computer world and microcomputeR appear
almost everywhere, >(RI brings you a new, con-
venient, and effective way to keep up with this
expanding technology. It's NRl'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
Its no longer enough to be just a pro-
grammer or technician. Wth microcomputers
mo\ing into the fabric of our lives as low-cost,
easily available tools for business and home,
tx)th the programmer and technician must
become total professionals. With practical
icnowledge of hardware, the programmer can
design simpler, more effective programs And
with advanced programming skills, the tech-
nician can test and debug systems quicidy 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
learn, you actually assemble NRl's designed-
for-leaming microcomputer. It performs like
the finest of its kind, and features both assembly
and basic language capabilities.
Every assembly steps a learning step-
Using the NRI Discovery I^* plus the NRI
transistorized volt-ohm meter and CMOS digital
frequenc)' 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 woric when you learn the NRI
way As the)' have for more than 60 years of teach-
ing technical subjects, NRI brings the material
to you. You study in your ^are time, at your
conveniwice, 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 ah-ays available for con-
sultation should you have questions or problems.
Over a million students have already ^own
the effectiveness of NRI ^ ^ ^ ^ ^ >
training.
Choice of
Courses
Several courses
are available, depending
upon your needs and
background, NRl's
Master Course in Micro-
computers and Micro-
processors starts with
the fundamentals,
explores basic electronics
arid digital theor>'. the
total computer worid,
and the microcomputer.
The Advanced Course,
for students already
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 NRl's free, 100-page catalog Shows
all kits and equipment, lesson outlines, and full
information, including facts on other electronics
courses. Mail the coupon today and we'L 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,
5939 Wisconsin Ave.. Washington, D.C. 20016.
Pm School*
McOfaa- Hill ('xinnnulng
Educaiior. Ccnief
.<959 ttlscomiii ^vtiiuf
Vashingtofi. 1h: imd
NO SAUSHAN WILL CUl
Pleaw rheck for ont Free caulog onl>.
n CMnpuMrEtcctrofua Including
Mlcrocompuiefs
D TVr,^udio,'VldK)S«teins Servicing
D Complett CommuiHCiUons Electronics
with CB • FCC Ucntin • Aircraft,
Mobile. Minne Electronio
D CB SptculBU Count
D Amileur Radio • B»k ind Advanoitl
1^}!^^
All career counes
apprwed under Gl Bill
G Check for deuub
□ Digital Elecironks ■ Eleonxuc
%chnok>gv • Basic Electronki
D Small fji&M Repair
Q Electncal Appli^uice Servicing
D Auiomoiive Uechanio
n Auio Air Condi lionme
n Air Conditioning, Refngeruwo, & Healing
Including Solar Itehnotogf
(PkawPTWt)
Aocredlied bf the Aocredlttoc CommlKlon of the Nularttl Home Study Council
179-030
n-* Readw Service— see ojge 147
80 Microcomputing, March 1980 • 81
SAVE
ON ADD-ON
PRODUCTS FOR
TRS-80
The largest family
of disk drives from
the iargest supplier,
drives come
complete with
power supply and
cabinet.
MTl-40 Disk Dirve, 35 * dO track $3ft9
TF-1 Pertec FD200, 40 trock, use both sides $M9
TF-3 Shugart SA400, 35 track, same as tandy $3»9
TF-5 Wn B51. 40 track $379
TF-70 Micropolis. 77 track with 195K of stofoge $639
TDH-1 [>j<S sided drive. 35 trock S499
Uoi. :.sk2 10 \"egoDv:e(ttxea)
Winchester 'echrxiioov
$5349
NEW PRODUCTS
16K Memofv $86
Wodem $1 79
Expansion interface 32K $499
AC Isolator $47.95
PRINTERS
DP800 Anodex. 80 column. 1 12cps $949
LP779 Centronics 779 $1099
LP730 Centroncs 730 $950
IP70Q Centronics 700 $1395
U'701 Centronics 701 51 759
LP702 Centronics 702 51995
SFW-1 Spinwriter-NEC $2525
NEW! LINE^RiNTER
BASE 2
oOlPM wrfh tractofs..
$599
* DRIVES FOR ANY MICROCOMPUTER «
Does not include power supply & cabinet
MOD II DISK DRIVES NOW AVAILABLE
f-eftec nrXX) $262
Pertec lL-2bO(duQi heod; $399
Shugort SAdOO unused i $2^6
ShugofT SAfiOO $479
MPl B52 $349 B51 $279
SOFTWARE
Disk Drive Motor Speed Test $1995
New DOS* witt^ over 200 modificofksns and
con-ections to TRS-DOS $99
New L">''>S- 40 track $110
AJA Word c>roce5Sor $75
AjA Bui ■i-is •^Tog'ar'" $250
"occr '■f"'e&asc $49.95
Disk Drve A.jgnmen: >^ogiarT' $109
Rodix Data Base ^^ogrorn $99.95
Epectnc "one $150
AU PWCES CASH DISCOUNTED. FREIGHT FOB/FACTORY
CT^/VCROCC^VPUER /A\
l3ill^2^^^H) ^28 cz^«\pparot. Inc.
3304 W. MocArttiur
Santa Ana. CA 92704
(714) 979-9923
7310 E. Princeton Ave.
Denver. CO 80222
(303) 750-7275
useful If more than two or t^ae
defects are present. Ttie pro-
gram directs al( output to ttie
screen unless the printer is con-
nected and turned on, in which
case POKE statements trick the
processor Into sending the out-
put to the line printer. The use of
PRINT" " causes a line feed
regardless of whether the TV or
line printer is being used.
Conduston
The oniy possible problem is
in using the negative numbers
to address the memory loca-
tions being tested, as explained
above.
Also, if you are testing a full
16K block, be prepared to wait
about 10 minutes. I've found It
helpful to test for one location
beyond what I know is there
(-16384), so that there Is
always an error statement gen-
erated at the end of each check-
ing routine. Above all, be sure
that you protect the Expansion
Module memory by entering
'32767' for MEMORY SIZE, or the
program will try to store vari-
ables in the same memory you
are testing!
In case you have been think-
ing about testing the 16K of
RAM in the CPU/keyboard, don't
bother. Since part of it is used
■for "housekeeping" and part of
it contains this program and its
variables, you can't really check
all the locations, so any test like
this would have no meaning. If
necessary, you could swap
those eight chips for eight from
the Expansion Module, and run
the test again. ■
Program Listing
IN CLS Pfiiim«aB>-«»« TBs-ae rtnopv test •*.- psitu
UB 'BV nlUM D OCPKO. R D THIEF ftl*^» FFLLS. rtl ^£781
in JU.V 1979
Ue KFIHT ft-Z
14e PRIHT-THIS PROOWtl HILL TESI T« IMTEGftlTV CF THE ftt*
ISe PRINT-CHIPS IN THE EtfWISIOH INTEHFfCE. DETECTING RHV
Ite PRINT-STORHGE ERRORS HM) LISTlr« T* DEFECTIVE CHIP ' PRINT
170 PRINT-BEFORE STARTING THE TEST, VCW fUST PROTECT THE BLOCK
lee PR1NT"0F RRM BV HNSWERING '32767' fiS THE 'MEnORV SIZE'
198 PRlNT:PRINT"THe BOUNDflfilES FOR THE EXPHNSION RFW FIRE
30 PRINT- BLOCK 1 - -12768 -16383
216 PRINT- BLOW 2 - -16J84 -1
220 PR1NT-<Y0U CM OM-V TEST LOCATIONS KTtCEN -32768 fW -1>
218 PRINT PRINT HMT-NIT ENTER' UCH FEWV-^M
24* CLS PRlNT-fCTIVfiTt LI* PRINTER (IF FMILFBLE)- PBINT PRINT
258 '•** DCTERIWS rCHWV PCDNESSES TO K TESTED ***
2« IW^(T-LO*ST <OtCIP«.i flDCSESS TO BE lESTW.Btl*
27B IF fia»-l 0010268
2Se PRINT IfPUT-HIGteST <DtClr«.) MjORESS TO BE TESTED" i Rt2>
m IF fl(2)>-l G0T02ee
388 '»*• CHECKS TO SEE IF Lltt PRINTER ffiWILflBLE •«
3ie IF P£EK<, 14312) -63 THEN POKE 16411,1*1 POKE 16*15.5
320 '■■*- BEGlfmlNG OF TEST ROUTINE •-•
338 PRINT PR I NT -BEGINNING FIRST PFWT OF rtErORV TEST
348 X=17e V=85 PRINT 00506448
258 IF ]*« PRINT-MO ERRORS ENCOUNTERED
368 IF J>e PRINT-ERROPS flS NOTED
378 PRlir- - PRINT-PROCEEDING TO SECOW PMT CF TEST
388 X-8S V-l?a PRINT C^>Ste44e
i98 IF J^ PRINT-MO ERROffS EMCOJNTEREI.
4«e IF JM PRINT-EPWftS ftS NOTED
41B PRINT- - PRINT-TEST OF rtTORV LOCTTIOW -.ft<l),-TO -. ft(2>, "COW.ETED
428 PWE 16414,88 POKE 16415.4 E«)
43» •" SETS-UF PLTERNBTIHG BIT PflTTEW IN IBOW ••*
448 J-e FOR I=ft(ll TO flC?) STEP2
458 POKE l.X POKE 1*1.V
469 NEXT I
478 ■•"» CHECKS FIRST BIT PHTTERN •*■
480 Z-X FOR I"fl(l) TO H(2J STEP2
4M B-ftEKUrlF B<>Z 0051)6578
»e rCXT I
516 ••• OCCKS SECO» BIT PflTTERM •••
528 Z-V FOR I = 'Bllj»l' TO ft<.^J 5TEP2
538 ^^tEXti) IF ek:>z Q0Sie5?e
548 rCXT I
%8 RETUM
5te -••• Fm>S T« DEFECTI4 BIT •••
576 J-J+l FOR r-« TO 7
see E-IHT<B/2[K>-2»INTtB/2lUtl^i
598 D-IHT(Z,'2tK)-2-INT(Z^2li.K'-l))
600 IF E-D GOToese
616 PRINT-BIT f; K, "INCORRECT AT LOCflTICW i"; I
628 ••• FINDS T« DEFECTIVE CHIP •-•
630 IF 1>-I6ie5 PRINT- EXFTWSIOH CHIP ;-, 8-K. -DEFECTIVE- GOTOSM
to46F*mi- E»«HS10W CHIP Z", l6-«, "DEFECTIVE
S5» Itrr t WIHT- ■ RETlfX
NotK TTm bncfcat hi HnM sao and 580 Is actuuMf I.
82 • 80 Microcomputing, March 1980
PROFESSIONAL
INCOME TAX PROGRAMS
FOR TRS-80
TM
Accountants, lawyers, tax consultants nationwide, prepared
over 100,000 1978 Federal tax returns using our system.
Displays and fills in Form 1040 and related schedules on the
screen, then prints out the completed forms automatically.
Change your mind? Make an error? Correct a single entry and
you have a brand new form with all re-computations made
automatically.
No tax system, running on any computer anywhere, has all the
features of our professional system, and yet—
Our base program, which does 1040 and Schedule A costs only
$189.95
And! You can add schedules for only $37.95 each, customizing
your system to your requirements.
DEMONSTRATION CASSETTE $3.95
(with sample forms)
Requires 32K System, 2 Disk Drives
We also have available fan-fold Forms 1040, blank stock, and
other supplies you will require— all engineered and tested for
use with TRS-80.
FREE CATALOG AND BROCHURE TO PROFESSIONALS
CONTRACT SERVICES ASSOCIATES
706 SOUTH EUCLID ANAHEIM. CA 92802
TELEPHONE (714) 635-4055
• • • 20 YEARS OF SERVICE • • •
^fl«tf«s*o-,«-s«p*g-M7 80 Microcomputing. March 1980 • 83
MATH
Techniques for algebraic equation solutions on your 80.
Equations
Allan S. Jotfe W3KBM
1005 Twining Road
Dresher PA 19025
Sooner or later, you may. as I
did, explore what your com-
puter can do to solve algebraic
equations. Ttiere are exotic
methods and there are simple
methods. I chose the latlet ap-
proach.
First I had to determine what
I could not do, that is, solve an
equation for its imaginary roots.
These are roots that involve the
square root of a negative num-
t)er as part of the root or the en-
tire root- A sample equation
with two imaginary roots is
How Many Solutions?
This still leaves quite a bit of
territory open for exploration,
which can start with an equa-
tion such as X' -t- 2 = 0. Initially,
you must recognize that the
highest numerical value of the
exponent of the unknown (here
it is 2) represents the number o1
roots the equation has. Thus an
equation with X^ would have
three roots, and one where the
highest exponent value is Y*
would have six roots.
This does not tell you how
many of the roots may be posi-
tive, negative or imaginary. All
it tells you is how many roots
should exist. The root (or a zero
of the equation, as it is some-
times called) is any value that,
when plugged back into the
equation, will prove the equa-
tion true. For example, the root
lor the equation X - 1 =0 would
be -1-1 because if -h 1 is in-
serted in place of X, the equa-
tion is true.
What we are trying to do so
far is to define the problem at
band. While it is easy to suc-
cumb to the temptation to initi-
ate a computer problem by
playing "kitten on the keys,"
less frustration is encountered
by first "putting the brain in
gear."
Posltivs or Nsgatlva
We can get at least one more
set of guideposts by observing
what 17th-century mathemati-
cian Rene Descartes had to say
about what the roots of an
equation might be. Consider
the equation 2X'-5X'-4X+3
= 0. Descartes postulated that
if you counted the sign changes
of the terms of this equation,
you would be able to predict the
maximum number of positive
roots that the equation might
have.
Let's step through the equa-
tion term by term to see how
this works. The sign of the first
term is positive, the second
term negative, the third term
negative and the fourth term is
positive. If we list these changes
symbolically, -f - - + , we
will see a series of two sign
changes in total. This means
that the equation can have a
maximum of two positive roots.
This does not mean that it will
have two positive roots but that
It can have no more than two
positive roots. It can turn out
that it will only have one posi-
tive root or it may have no posi-
tive roots.
Descartes then made avail-
able a simple way of determin-
ing the maximum number of
negative roots that the equa-
tion might have. Consider the
same equation but reverse the
sign of any term having the un-
known raised to an odd power.
The sign order is now symboli-
cally: - - + -K , which shows
one sign change.
This means that the equation
can have a maximum of one
negative root, with the same
equivocation as for the positive
root count— it might have no
negative roots at all but will, in
any case, not have more than
one.
In applying this method for
determining the possible num-
ber of negative roots, do not
forget that if the variable ap-
pears without any exponent, it
really is raised to the one power,
so that any such term must
have its sign changed to get an
accurate count by this method.
The first step is to arrange
your equation so that it is equal
to zero. For example, if our
equation had been in the form
2X' - 5X' = 4X - 3, we would re-
write it in this form: 2X^ - 5X' -
AX + 3 = 0.
Since the TRS-80 demands
that the equation be entered in
such a way that it looks like
this, = 2X' - 5X' - 4X -(- 3, we
will do so or its electronic in-
sides will give us an unwanted
error message. At the same
time we will, for the sake of ele-
gance, use the letter Y in place
of zero.
84 • 80 Microcomputing. March 1960
SPECIAL DELIVERY
TRS 80® + Electric Pencil
By adding SPECIAL DELIVERY to Electric Pencil
you can realize the full potential of your TRS-80!
A 100% machine language word processor!!
MAILFORM — Create MAILFIIE: A
complete Name and addre&s list en-
try/editor program. Instant search
on any field, complete cursor con-
trol, optional beeper to lei you know
sometning is wrong, active rile always
displayed, search can include num-
eric only as well as don't care charac-
ters, just FILL IN THE FORM!!
MAILRITE — Print letters written
with the Electric Pencil inserting
information from a MAILFILE into
the letter for personalizing and ad-
dressing. True typist qualily using
your printer. Features: Indents, un-
derscore, end of page stop, unlim-
ited insertion from address list, ad-
dress envelopes and MORE!
SORT — MAILFORM will sort an
entire address list in seconds using
any field as the key.
LABR — MAILRITE prints mailing
labels from MAILFILE.
CONVERT — Transform your
Radio Shack Mailing list into a
MAILFILEI
SPECIAL DELIVERY (Disk) 99.95
Electric Pencil (Disk) 150.00
Phone Orders (2 1 4) 492-05 1 5
Or write for brochure of our complete line
of fine software!
OFTWARE, ETC...
1839 CHAMBERLAIN DRIVE
CARROLTON. TX 75007 ^42
THERE IS OKLY OKE STOCK TRACKER"
FOR USE WITH DISK TRS-BO*AND APPLE-II*
•Stocks* •Opti ons» •Commodi t i es»
Do you [rifle in tfie mrket? Would you,
if ^ou could r»duce tht risk? -- 1' /du
kncii most ot yo'jf trades should bp prof-
itable'* Then this is for you.
Designed and used by a registereO inuest-
•ent edvisor, it i« the co"puteriiation
of tde individual secuniiei select! an
process he has used for the Last decade.
Bated on supply and demand factors, it
tells fou uhen to buy I sell each of the
securities it tracks. for e>aiiiole:
Actual Trading Record: Asabco |
Reconmendatioti History
Common :
Resul ts*
6/18/79 BUY
S I1B.7S
9/2t/79 open
a »29.75
**n.00 • '501
Cal 1 Options ,
September
20th:
6/18/79 BUT
a % .7i
6/28/79 CLOSE
3 t .81
.$ .06 • • 81
7/23/79 BUY
a t .81
7/3D/79 CLOSE
3 i 1.1!
•t .31 • • 3SX
a/13/79 BUY
a s 1.31
9/06/79 CLOSE
a t i.63
♦53.31 • -2531
Call Options,
I>ecember
2 5th:
9/20/79 BUT
a 1 J.7S
9/28/79 open
a 111.50
•S7.75 • •207t
IF TOUR TR»DING COULD USE RESULTS LIKE
THESE, TOU NEED STOCK TRACKER'" ^gj
Printouts nada on any interfaced printer
or displayed on screen. Thorough docu-
mentation t saaple printouts included u/
detailed (50* cage) nianusl. Utility pro-
9ra»B included. No experience necessary,
din. 3?K S*M rea'd. printer recomaended.
For Bore information or to order^ contact
your local dealer or HtH TRADING COnPANY
111 Cleaveland Rd., »20; Pleasant Mill,
C» 9*523; telephone C*15) 937-1030.
Price: JISO.OO • Manual only S35.O0
CuBtiovi st-oclc Datapacks available
ePast result 5 cannot guarantee future
profitability; recoimendations iiiLl vary;
■artet trading entails capital risk.
TRS-80 IS Reg. TH of Tardy Corporation
APPLE-II Reg. TW of Apple Ceaputar, Inc.
introducing...
MAYDAY
The Uninterruptable Power Supply that....
^ Prevents loss of memory when power "blackouts" occur.
• Prevents loss of memory or disk I/O errors when "brownouts" occur.
• Provides time to continue operating complete system with disk drives
to finish operations or store information.
• Will handle most mini/micro computers with power consumption up to
250 watts.
• Designed and developed using complete TRS-80 System.
Protect your Time and Investment
For price list and detailed specifications, contact your nearest Sun-Technology
distributor or coll direct to:
^/T;^ »9W - d^eckncU^^ '9nr.
">>■ -n^
^7'fiV^
Box 310
New Durtiom, New Hompihire 03855
[Monufacturing high technology products since 1970)
(603) 859 7110
v^ RuaOer Service— s»e page 147
80 Microcomputing. March 1980 • 85
Y=X' + 3X'-10
+ 1.49
Y=X'-3X-1 +188,
-.347, -1.53
Y = X= + X - 3
-2.3, +1.3
Y = X' + X - 6
-3. +2
Y - X* + 4X= - 6X* - 20X - 23
-4.60. +2.60
Example 1.
The Proflram
If we have made it this far, it
must be time tor a program. It
is, but every program has to
work on some premise that we
hope will be true and proper.
Our implied premise is that it
we find some value of X that,
when inserted back into the
equation, will make it equal to
zero, then that value will be a
root or zero of the equation;
hence, at least part of the solu-
tion of the equation has multi-
ple roots.
In essence, we are going to
"guess" a number that we think
is the solution and plug it into
the equation to see if we get
zero upon doing so. Since we
have available a computer,
whose strong point is repetitive
calculation, we can insert our
guess and have the computer
either increment or decrement
the guess in small steps which
it can do rapidly
Program A shows a simple
program that uses the comput-
er as a scorecard or a scratch
pad. I call it the "Let your eye-
balls do the walking through
the Yellow Pages ' approach.
When you hit RUN, the com-
puter is ready for you to input X
and D, X is your initial guess.
and D is the increment or decre-
ment factor you wish applied to
X.
An excellent trial guess for X
is 1, and a corresponding excel-
lent value for D is 0.1 . This infor-
mation will speed up your use
of the program. The only time
the general choice of 1 for X will
10
CLS
20
INPUT X.D
30
X = X + D
40
INSERT EQUATION IN THIS LINE
50
PRINT X.V
60
GOTO 30
Program A.
fall short is if 1 happens to be a
root. You should also keep in
mind that X and D can be pres-
ent in various sign combina-
tions:
X D
+ +
+ -
- +
all varieties of which may be
useful in obtaining the roots of
the more complex equations.
Let us start with a simple
equation to demonstrate the
methodology. Insert the follow-
ing equation into line 40: Y = X*
+ 8X + 12. In TRS-80 form this
will be: Y^XT4 + 8*X-12.
When we run the program,
the ? appears indicating that
we should input our X and D
values, separated by a comma,
on one line. As Indicated we
have to make a choice of sign
for both X and D, so let's choose
positive values for both. Your
entry would be: ? 1.,1.
Now hit RUN and let the
screen fill with about ten or 15
lines of X. Y values and stop the
display by using SHIFT @, Ex-
amine the listing and you will
see the following sequence of
lines.
1.1
-1.7359
1.2
- .3264
1.3
1.2561
1.4
3.0416
1.5
The first column is X values; the
second is Y values. Notice that
the series of Y values con-
verges toward zero and that
there is a sign change between
X values for X - 1.2 and X = 1.3.
A sign change in the Y col-
umn shows the value of X that
will satisfy the equation. At this
stageof thegame, thisisan ap-
proximate answer. To refine the
answer, we take the value of X
just before the sign change of Y
and rerun the program using
this value for X. To refine the
precision of the answer, we fine-
tune our D value, adding at least
two more decimal places to D
(if the initial root is less than 1,
the next D value should be .01).
Thus D was originally .1 and
now becomes .001.
We rerun the program using
the new X and values and
again scan the display using
the SHIFT @ to control the dis-
play. This time when we detect
the sign change, you will see
opposite the newly determined
value of X (1.221) that the value
in the Y column reads -9.39179
E - 03. Whenever you get a val-
ue such as this in the Y column
(i.e.. a value accompanied by a
negative exponent), you can
hang up your hat and call it a
day. The computer has delivered
a value for X that, if plugged
back into the equation, will sat-
isfy it to within a gnat's eyelash.
If you had examined the
equation and applied Des-
cartes' rule of sign changes.
you would have determined
that there is at least one posi
tive root (which we have just
found) and one negative root.
Well, how do we get the nega-
tive root to come out of the
woodwork?
Generally, when the positive
root has been found with X and
D of 1 and .1. you can usually
find the negative root by ap-
plying the identical values but
with the sign changed. Thus we
run the program using X = - 1
and D= -.1.
Now upon running the pro-
gram you will get a series con-
verging toward zero and show-
ing an area where there is a
sign change between two
successive lines. When you
spot the sign change, stop the
display, remembering that the
sign change we are looking for
is only one that takes place in
the Y column of figures.
The portion of the display
where the sign change takes
place is now listed:
2
-12
2.1
-9.3519
2.2
-6.1744
2.3
-2.4159
2.4
1.97761
last negative value in the Y col-
umn before the sign change.
We can now refine the nega-
tive root in the same manner as
we did for the positive root. This
time our new X is - 2.3 and our
new D is - 001. When the pro-
gram is again run, you will spot
opposite the value - 2.357 in the
X column the value 6,81877
E - 03 in the Y column. Your cal-
culation has given you a good
value for the negative root of
the equation.
A brief tabular listing of the
values around the area of the
answer shows;
2.355
- 0818005
2.356
- .0375195
2.357
6.81877 E-
03
2.358
.0512257
Thus our rough answer for the
negative root value of X is
-2.3, since it is opposite the
If you need further accuracy,
you can make the new X value
-2.357 and the new D value
-.00001 and run the program
again. This time when your Y
value with the negative expo-
nent shows up, the absolute
value of Y will be so close to
zero that you'll have to split the
gnat's eyelash.
As a clinical exercise this
might be worth doing at least
once, but for practical calcula-
tion, it is a poor use of the elec-
trical juice, it is certain that
good judgement is better than
pushing the limits of technology
just so you wont get that feel-
ing you have somehow let the
"machine" down.
Watching the Xs Go By
There are equations that will
start with a series of Y values
that diverge from zero; in other
words, as you watch the screen,
the Y values proceed to get
larger. This is not always
caused by an unfortunate sign
choice for the X and D values,
although this is the most likely
cause.
There are equations where
the generated Y values do in-
deed diverge from zero, but if
you are patient and allow at
least one screen's worth of val-
ues to go by, you are often re-
warded by seeing the generated
Y values start to diminish In val-
ue and finally generate a sign
change in the Y column, which
means you have found a root of
the equation.
86 ■ 50 Microcomputing. March 1980
Let us run through one more
equation to solidify the meth-
od. Consider X'-4X^-6X' +
20X + 9^0- According to the
sign convention, it may have
tvt^o positive roots and two neg-
ative roots.
If we first search using X = 1 ,
D = .1, we will get the answer
2.4 at our first sign change
point. If we then rerun the pro-
gram using X -2.4 and D =001,
we will get X = 2.414. Thus we
have found one of the positive
roots.
Next we can search for an-
other possible root by using
X= -1, D= -.1. The X value
this search turns up opposite
the first sign change in the Y
column is - 2.1. If we again re-
fine this by rerunning the pro-
gram using D = .001. we will
come up with the answer for
this negative root of -2.162.
Our next search will utilize
one of the remaining two pairs
of possible X and D sign possi-
bilities; this linne X = 1, D = -.1.
Running this pair in the pro-
gram will produce an initial X
value of - .4. and refining this
in the same manner as before
will produce a final X value of
-.4139.
With the experience you have
gained from running this pro-
gram for many equations with
known roots, you should know
that when you have succeeded
in smoking out two possible
roots of like sign (here we have
the two possible negative roots)
and one root of the opposite
sign, it usually means that you
should find the missing posi-
tive root (in this case) by return-
ing to the original sign pair that
produced the first positive root.
This wasX = 1. D = .l,
Since you have already used
the pairing X-1 and D = ,1 to
produce the first positive root,
the next guess to insert is two
times the previous value of X,
which, in this case, is X = 2. If
you run these values (keeping
D = .1), you will see that a posi-
tive root is indicated, but it is
the same value as the first posi-
tive root developed Once again
double the last value of X so
that now X = 4. again keeping D
as ,1, Now when you run the
program, a positive root of 4.1
will be produced. You can now
use X and D values of X=4.1
and D = .001 to refine the an-
swer; the missing positive root
is 4.162.
Following this general proce-
dure, I have found that if the
missing root is not found with a
still further doubling ot the X
value, you may be rather cer-
10 tor X= -5 to 5 step .1
20 Entef equation in Ihis line
30 Print »,y
40 Ne>t X
Program B.
tain that the "missing roof
does not exist as a real root but
is an imaginary root. That X in
the equation is raised to the
fourth power guarantees the
existenceof four roots but does
not tell you how few or how
many of them may be imaginary
roots.
There exist many algebra
books that will provide you with
all sorts of theorems, postu-
lates, etc., to enable you to prog-
nosticate just how many roots
are real and how many are imag-
inary. However, if you are in my
ring and have not grappled with
classical algebra for several
decades, this could produce
severe mental strain. I prefer
the use of the computer plus a
bit of educated guesswork.
The technique presented
here is very simple, taking more
words to describe than it takes
time to implement- There may
come a time in your life when
you can't find a root of an equa-
tion, a root that blind intuition
says does exist. Asa fast check
in such a situation, we can go
from the simple to the bare-
bones. Consider the four-line
program in Program B.
This will produce a readout
stream on your video display
that will stop when the assigned
limits of X have been reached. If
you watch the display tor sign
changes in the Y column, just
as with the previous efforts,
you will see that the roots in the
X column will be printed beside
the last value of Y prior to any
sign change in the Y column.
The values for X listed in line
10 ot Program B are practical
for any equation where the un-
known is raised to the third
power or higher. It is obvious
that a term having the unknown
raised to the highest power will
usually be the determining fac-
tor in fixing the value of the sum
of the parts of the equation. For
an equation where the unknown
is raised only as high as the
second power, change line 10
to read: 10 For X = -9 to 9 step
- 1.
1 hope this will ensure that
you do not miss a possible root
in this type of equation where
the second power of the un-
known might not be that power-
ful in fixing the composition of
the roots. Remember, this
whole method of solving equa-
tions depends on your using
the ability you have to reason,
coupled with the ability of the
computer to carry out the re-
sults of that reasoning process
in a rapid mechanical fashion,
1 have included a series of
equations with the known real
roots (see Example 1). By run-
ning these samplers, you can
gain familiarity with just how
simple the techniques are for
playing algebra through, what
my wife has up to now called,
"your kilobuck etch-a-
sketch.'H
BUY AND SELL SOFTWARE
GAMES*EDUCATIONAL-BUSINESS
ANY LANGUAGE ANY COMPUTER
HOME SOFTWARE EXCHANGE'S
PROGRAM OF THE MONTH CLUB
AS A MEMBER
You may list as many programs as you wisti or,
the exchange In any compuler language
Vou receive a catalog of all programs each year
Si monlhly newsleller upflate
Eacfi lime a me m Per Duys one ol youf programs
you rec eive a j ? 00 ' oya itty (e e
Your only otHi 3atton i s lo Duy 1 (one) program
a month a! Itie cluD rale oi S6 00 per cassette
program
To |Oin send 56 00 tor one year's membership
along witti the programs you wish to list For
each program please send a cassette ot the
program a lull listing, and a short description
ol the program
You will receive a catalog & your lirsi month s
ofder btank Then each month you will receive
an order Diank & update You must t)uy '
Otoqram a monin. but vw may BiiV ™'e
HOME SOFTWARE EXCHANGE
1716 DIXIE DRIVE >^115
JACKSON. MS 39209
LU
EDUCATIONAL
* PERSONAL
* BUSINESS
O
Model 1 TRS-80™ Software
Basic 1,2, Disk 2-2 & Assembler
THE DIFFERENT COMPANY
-<
w
H
m
S
I
I
I If you DONT want your software on I
I highqualitycassettes. detailed instruc- |
I tion manuals, user oriented, guaran- j
I teed loadable for 30 days andacompa- 1
[ ny that will answer user's technical 1
I questions, then DONT COME TO US! ]
I If you DO want GREAT SOFTWARE, .
I need a debugging service or custom
I program at a very reasonable price and I
I a company that takes an interest in the |
I hobbyist as well as the professional, |
I then send for our free catalog today! i
I Mailed 1st class. .
I 'Homeof IheCWKM-ANS" ^113 I
L BOX 022O5, Cl»v»t«nd. Ohto 44102 J
SUPER
GRRPHIC5
Donl you li'ish yiaphic. ^^i^ f.i-ri, ' W«ll ii,ni, ih^y
flr.=' PICTYPE .ets you typ* giaphic characters into
yiLji BASK" pir«(fam one reclangic at a nme No
ri,>pd '■) luok up Ihe chaiaclpt rodes Moreovet
iifliempnrt coiilflnirog graphics can b>> LISTed and
r.DlTt^d \iWe normal 5lalemenis Gtaphici show up
<!' graphics— not garbage PICTYPE Iciads easily
^".6 saves as part oi your ptogtam giving yoi: last
prmlmg mefnory- efficient graphics <»vefv time vou
•jn It So gel PICTYPE and ptogram arhon packed
graphics tike a pro'
PICTYFt .m taatnc to. TUS-Bft \.e
KASIC J.Bh mMiucnons pmyntA
$19
©DISCOVERY BAY
SOFTWARE CQ
P 6oi *6J Porr Townsjinn WA 96368
TRS-aO IS I r«D<st«<M) iiaOemaik of TANDY CORP '
y^ Reader Service— see page 1*7
80 Microcomputing. March 1980 • 87
HARDWARE
// you intend investigating
machine code, a tiex l<eypad can make life easier.
Babybug Keypad
Dennis Bathory Kitsz
Roxbury, VT 05669
If you find machine-language
programs enjoyable and chal-
lenging, you nnlght be interested
in performing a simple yet
powerful modification to your
TRS-80. Adding a hexadecimal
Keypad, numbers to 9, A to F,
plus backspace and enter. Is In-
expensive and easy.
The decimal numbers func-
tion normally, and all the
characters can be used in con-
junction with Babybug {Feb. ^
Microcomputing) for quick key-
ing of machine code.
Radio Shack offers its deci-
mal-only keypad conversion for
around $70; a complete hex key-
pad is available from Jameco
Electronics (1021 Howard
Avenue. San Carlos, CA 94070)
tor $10.95 plus shipping. Since it
is not encoded, it Is easy to
parallel-connect its keys to the
main keyboard and, by using
one dead key, turn your TRS-80
into a powerful microcomputer.
I converted my computer in
about two hours. All you need
(other than a dose of warranty-
voiding courage) is some wire, a
soldering iron, two ten-inch long
Vi-inch by Vz-inch pieces of
plastic rod, five-minute epoxy,
some assorted tools and a hot
razor blade.
Photo 1. Keyboard and CPU board after removal of ROMs and
mounting of hex i<eypad. Note cable to Level II ROMs at bottom
center of photo. ROMs are remounted in the feet of the case bot-
tom.
M • 90 Microcomputing. March 19S0
How to Start
First, carefully undo the
cabinet (noting the different
sizes of screws used to fasten it
together). Take the electronics
out of the case and set every-
thing on a spacious work sur-
face. You will notice that the
Level II ROMs are fastened to
the right of the keyboard with
double-face tape; these will
have to be lifted off the circuit
card.
The interconnect cable to the
ROMs is long enough to re-
mount them inside the base of
the cabinet, in one of the depres-
sions that serve as feet. If the
double-face tape has not been
damaged, they may be fastened
immediately; if the tape cannot
be reused, fasten them by some
other method, but be cautious
not to cover them as heat build-
up shortens their useful lives.
The Jameco Electronics key-
board base is identical to the
TRS-80'5 in height and depth, so
the two ten-inch plastic strips
can serve as a rigid trailer hitch
for the smaller board. Carefully
support both boards so they are
parallel and the hex pad meets
the TRS-80 printed-circuit base.
Cement the plastic strips in
place; the vertical alignment of
both sets of keys should now be
Identical.
When the glue has set, use
the plastic shell to design a
cardt>oard template of the cur-
rent key positions and, with the
aid of a ruler, draw extension
lines across the right side of the
template. These t}ecome the up-
per and tower limits of the new
keypad opening. Align the tem-
plate with the new double Key-
tx>ard assembly and mark the
vertical positions of the keys,
allowing about 1/32" additional
on both sides. This should bring
you within V* inch of the pilot
LED.
Remove the black portion of
the cover by turning it over and
snapping it out of the six locking
tabs along the edge. Using the
template and a hot razor blade,
carefully cut an opening, work-
ing from the face of the soft
plastic cover.
This procedure is time-con-
suming and must be done with
care to achieve an as-built ap-
pearance. Double check all work
to make sure the cover fits over
both keyboards and that the
keys are free to move (trim or file
where necessary). If you have
made any nicks in the soft
plastic face, rub them with a
glass marble and they should
disappear into the background
of the face texture.
Interconrwct the Wires
Now it is necessary to Inter-
connect wires from the hex key-
board to the main keyboard's
printed circuit card. Rest the
keyboard on its face but take
care not to strain the band of
wires connecting the card and
CPU board. Set aside the white
plastic spacers, and keep the
board well supported during sol-
dering.
For interconnections, I used
wire-wrap wire because it was
thin and flexible, although any
fine wire will do. First, solder all
the connections at the hex pad
as shown in Fig. 1. You will be
soldering to very fine terminals
which are part of the key con-
tacts and springs, so be careful
to avoid excessive solder or
heat. The solder should flow
easily onto the gold-clad con-
tacts.
Next route individual wires
from the hex key groups to the
points printed on the circuit
card, as indicated in Fig. 1. If
you have a TRS-80 technical
manual, you may notice that
some of the keys do not match
the wiring on the master sche-
matic. I have a very early TRS-80
and have not been able to check
this difference with other Level
II machines, so I recommend fol-
lowing the circuit traces to as-
sure that your parallel wiring
matches that of the keys
pressed.
Once you are sure all the con-
nections are properly made, flip
the board over. Avoid putting
stress on the keyboard intercon-
nect cable. Replace the white
plastic spacers, insert the
cables to the monitor and power
supply and power-up the com-
puter.
Type all the characters on the
main keytxiard to make sure it
operates normally, then type the
letters and numtiers on the hex
keytraard. Also test the back-
space (at this point the twttom
right-hand key is dead). Press
the button currently marked
SHIFT (this will be the enter key),
and the lines of randomly typed
test characters should certainly
cause a ?SN ERROR nwssage.
All keys should now be work-
ing properly. Any problems will
occur in the form of incorrect let-
ters or patterns of repetitive let-
ters caused by incorrect or
shorted wiring of the new key-
pad. If most characters work,
but some do not, a wiring error is
likely.
Recheck all wiring, and it no
problem is evident, insure that
the wiring shown in this article
is correct for your machine.
(Master schematic differences
in my unit involved the back-
space and enter Keys.) Check
also for solder splashes or dam-
aged printed circuit board
traces.
Remove the cables and
power, gently reinsert the circuit
cards into place and replace the
white spacers, the keytxiard as-
sembly and the cover. Take care
that the LED power light sits in
tf>e front panel and that all the
keys move freely. After replac-
ing the screws and cables you
are ready to run Babybug again.
Try the programs described in
Part I of this article. The new
keyboard should speed the pro-
cess along considerably.
Th« Control Key
The absence of specialized
function keys, on the TRS-60,
confines the user to type-written
commands. Its simplicity makes
Photo 2. Wires run from poirjls on the main keyboard's p.c. card
directly to hex keyboard. White rectangles are plastic foam that
helps cushion the author's abusive typing style.
the TRS-80 a very accessible
machine, but with that accessi-
bility have come a few disadvan-
tages. Sometimes the need
arises for an escape from a pro-
gram without BREAKing in, or
for some additional control over
a program's execution. The
dead key on the new hex keypad
offers those special functions.
This control key (dead key) is
valuable when using your own
machine-language modules.
This key can send the contents
of the screen to the line printer;
convert to lowercase*; direct an
array of edit commands in a
word-processing program; call
up any number of machine-lan-
guage modules; or obtain
TRS-80 graphics from the key-
board.
Let's first see how this key
might be used in BASIC. Like the
shift key, the control does not
produce a character by itself.
but changes how the computer
reads another character typed
simultaneously. Set up and RUN
the following BASIC program:
5 CLS
10 A = PeEK(14464)
20 IF A = 128 GOTO 50
X AS = INKEYS PRINT AI:
40 GOTO 10
50 AS = INKEYS
60 IF AI = GOTO 10
70 PRINT CHRS(ASC(AS) ♦ 1011:
ao GOTO 10
As you type, letters will ap-
pear on the screen as they
would on the page. With the ex-
ception of some of the com-
mand keys like ENTER every-
thing operates as before.
Now shift with the new con-
trol key and type. The screen dis-
plays TRS-80 graphics! Release
the control key and normal typ-
ing resumes.
How does this work? Each
key occupies a position in a grid
2t
PiHt
Zi
PIN 4
PIN 12
Zt
zz
Pin 4
PIN
.i..-i*;''ii
Its •-
«2 *-
n?
I»4 *-
RS
R« ♦-
JO!^T
f
Fig. 1. Wiring of (A) address and(B)data lines on the hex keypad. Lines marked with an asterisk differ from the pin connections on the TRS-BO
master schematic.
80 Microcomputing, March 1980 • 89
Addrtss
PROGRAM
DaicriptJon
Mnentontc
4CO0
F5
Save Ihe current conlenls of the accumulalor and Ihe condition flags
PUSH AF
-JCOI
3A80 3e
Load the accumulator wilh the contents of memory location ,WW1 (wtiere SHIFT and
CONTROL are located)
LD A,(3880)
4C04
FE80
Compare Ihe conlents of the accumulator with 80 hex (which is the number produced
when CONTROL is depressed). If il compares exactly, set the zero" flag.
cpeo
4C06
28 04
If the zero Hag is set (meaning t>ers that Ihe CONTROL key was depressed). )ump
ahead four places
JPZ.04
The next two instructions woutd be executad ONLY if they were not jumped over Dy
the previous mslruclion:
4C08
F1
Reload the accumulalor arxJ Hags with then original contents tiefore this 'patch ' pro-
gram.
POPAF
4C09
C3 58 04
Jump to 0458, the place where the keyboard scan "switchboard " originally directed.
JP 0458
4C0C
3A 01 38
Load the accumulator with the contents ot memory address 3801 , the address of keys
S- A. B, C, D. E, F and G.
LD A.|3a01)
4C0F
FE02
Compare the contents of the accumulator with 2. the number prcxJuced it letter A ' is
depressed
CP02
4C11
20 EE
It ttie result does not compare eiactiy |i e,. the 7ero" flag is not set), jump back 18
steps to address 4001. it it does compare precisely
JP NZ,EE
4C13
03 00 00
. . . jump to 0000, the beginning of BASIC
Program Listing 1.
JPOOOO
wired so the processor inter-
prets it as a memory bank -one
line of addresses crossing one
line of data. The keyboard is
scanned, and a depressed key
drops a one into its allotted data
bit in a memory location. The
keyboard-scanning subroutine
in BASIC checks the memory
locations in order, arxJ, upon
finding a one, jumps to another
routine that displays that key's
character upon the screen.
There are many additional
routines to keep keys from end-
lessly repeating, to differentiate
between character keys and
command keys and to keep up
TRS'SO is a registered Irademarti ol TANDY CORP.
SYSTEM
EXPANSION
FOR TH£
TRS-80™
AT
^/:0 95 fP^^ BOARD Jl I
!yQ37 l_ USER MANUAL J
• SERtALRS232C 20inA I O
• FLOPPY CONTROLLER
• 32K BYTES MEMORY
• PARALLEL PRINTER PORT
• DUAL CASSETTE PORT
• REAL-TIME CLOCK
• SCREEN PRINTER BUS
■ ONBOARD POWER SUPPLY
• SOFTWARE COMPATIBLE
• SOLDER MASK SILK SCREEN
LNW
RESEARCH ..
B Hollowglen St. Irvine CA
714-552-8946 92714
TO ORDCR
PO Box 16216 Irvine CA 92713
Add $3 (orpostoaiand hondlinfl,
CA residents odd 6% (olet tax
$349.95 Assembled w case (limited availability, !•«* RAM!
90 • SO Microcomputing. March 1980
Scanned by Ira Goldklang www Irs 00 com
with fast typists.
The memory slot for our new
key is 14464 (3880H). When the
shift key is depressed, a one ap-
pears in this slot's least signifi-
cant bit (00000001); the control
key is wired to insert a one in
the most significant position
(10000000).
BASIC'S keyboard scanning
routine is written to read the
shift key, but is blind to the new
control key. The only way to find
whether the key is pressed is to
PEEK into location 14464 (line
10 of the program).
The result of that PEEK would
be either 1 (SHIFT) or 128 (CON-
TROL). Our BASIC program ig-
nores the SHIFT, displays what-
ever key is depressed and loops
back to the beginning of the pro-
gram. If it finds the control key
depressed, it goes to line 50,
searching (using INKEYS) for an-
other key to be depressed.
It continues with the above
loops until it finds both the con-
trol key and a character key
depressed. Determining the let-
ter's ASCII value, the program
adds 101 (to alter the value to
that of a graphics character)
and displays the result. The new
control key makes this a simple
way to display both characters
and graphics.
A Telephone Switchboard
To exploit the broad powers
of this control key, it is neces-
sary to know a few things about
the TRS-60 design. The ROM
(Read-Only-Memory) is fixed,
and contains the BASIC lan-
guage. It occupies atx)ut 12,000
bytes of space, with some un-
used areas set aside for future
improvements.
Upon power-up, the ROM exe-
cutes a great deal of housekeep-
ing, the most important part of
which is cordoning off a section
of volatile memory for storing
temporary information and es-
tablishing a kind of "telephone
switchboard" located in the area
of rrwmory about 1,000 bytes
long, starting at location 4000H.
Many of the BASIC subrou-
tines momentarily jump to this
area, and then back into the
BASIC ROM, to a location set up
during housekeeping. The ex-
citing aspect of this switch-
board is that we can patch our
own call through it! The control
key will use one of those patch-
es.
At the start of BASIC'S key-
board scan routine, it jumps to
location 401 D in the switch-
board to receive instructions for
its next move; housekeeping
has inserted 0458 into locations
401E and 401F. We will be
changing this jump, but before
we modify anything in the com-
plex BASIC language, it will be
necessary to decide precisely
what we want to do with the con-
trol key.
My first use of the control key
was to gain a new command:
Return to MEMORY SIZE?, with-
out turning off the computer and
losing the contents of memory
or wasting my only USR(O) loca-
tion. Program Listing 1 checks
to see if the control key and let-
ter "A" are depressed. If both
conditions are met (in that order,
as with the SHIFT key), it returns
to a r^^EMORY SIZE? condition
(prepare the program with the
aid of Babybug).
After you have prepared the
program, your next move is to
patch it into the keyboard scan.
Since the keyboard's scanning
06 DEC B
B1 ORC
B5 ORL
EO BO LOIR
10 Nn DJNZOO
Results of dec'emeril m
Besulls ol decrement in
Table 1. The ZERO flag is af-
fected by (among others less
important for these few simple
programs) these instructions.
Lords Corp
presents
THE PERSONAL PRINTER forTRsao
FACT: The Super Brain (Emako 22) printer is
one of the most coSt effective, feature pack-
ed printers available The Emako 22 is Bl-
Directional and has a 9x7 dot-matrix print
head, 9.5" adjustable width pin-feed car-
riage Prints a 132 col/hne Printing selec-
table: (132 or 80 ch/line normal, 40 or 66
ch/llne double width). 100 million char, print
life can be expected. 96 ASCII characters
means lower case is available especially for
both of Radio Shack's TRS-80 Mod 1 & 2,
Now you can get your own hardcopy
only 1728. Cables $38
Bank Cards Welcome
^152
LORDS CORP
P.O. Box 99
Port Anfteles. WA 98362
Telephone (206) 457-3064
QUALITY TRS-80 SOFTWARE
KEYWORD Indexing System
\ tifif- iri pniiiriino Ihal hIM iivali: a iliia ilk ihi iUm. IhiIU in
Imki III all iK.i.Hrrvnt:(s iif "kkminK" In iIk k->r »l llw daU flk
and alio* )m(itlrii:> iir «jr^lK> MHi Ik Mt- aslat Hn tmkuii
Utoimk. IIk if-Kin kalHKoi
•ik-ilhk rvi.iinl kngrtni iillfa liK^lhin piiinh:r\
•ikkliim ■■< mm ko'*<>nl% iniin Imki ht oiiiiin
•""and" '"i.r" "mij" k>|tk iiw Iniiiilrki
•inkrfiikt iiir vwr sritKn Inqulrto
M >«OKI> IMIhA- 1 iHs^ )2k DO> »>Kni S39.9S
SORTS for HOME and BUSINESS
Vi uHNpulcf UM,-r •JiiHilil Ik hIiIhhiI a icrullkjUa-i l» m; virt
pnigrani. Ihi' NiirllKasI Mkrnxan; In mtmiio uhI pn >|traniMri:
nrltkn In l^til II hVStC and haii; iIk inllimlnil katarvx
■Si<n tll'lH.tf MmmCdaia
•Sm <in ifi Hi S ikkk klmalUiKiwilt
■In avivadlng iir <k<H:-:iHlln|t ii:t|iit:m.t
•Suppiifd kh. •kkii iw laiK I <l
•Sa|ipi>nN.(i|.ill>kanJ|irlnK(l IMMIUTIII))
•Siipfiiirl- avir I 11 niullni^-
•l>tr(i)l,IMIIIT (II) .mh)
SOKI II llikU^dllinnKfliiinMHl Sl9.9S
StIKT nil- 12k WIS HI MKnH^ v«i tI9.9S
FOR Mm serious CAMIIII
Hl.Vl.k.1Wk SmiLUflK. \ll.«> >iHi 1.1 .iimriak Iht platidf ui
lbiHi<dn<l>. Ill hiimk iil HI and analxi: ihc rtMilKim ta|K In U>cl
linVSK. SI9.9S
HinMli fair all p^•«ranl^ atoHaMc fair SUMI a.
tprlkt ikdiKllkk' IHI |nirika.<a: iil pnigfiml
"TRSaO it ■ ra^islarad tradnnarii of TANDY COflP "
(TtfrtheastoTVIICROWARi)
BOX 6153, ..74
SYRACUSE, N.Y. 13217
AT LAST
USEFUL HOME PROGRAMS
For Your Level ii 16K
CALCULATOR PLUS turns your TRS-80
into a printing calculator! Excpiient as an
on screen calculator without a printer All
functions double precision, ctiain and
mixed calculations 5 memories witn
titles -can be used as constants, item
count in add and subtract witn on-saeen
or printed review of entries optional tJol
lar format Pnnts all calculations, results
and memories, ideal for use wttti Ouick
Printers Loads fast easy to use
MPC-1 S9 95
CHECKBOOK PLUS soives the problem of
montniy Dank -statement recondliatton
No cumbersome raperecord Keeping Just
do your checictxxjk once a month, and let
ChecktKJok Plus handle all the details and
find me errors
MCB-1 S9 95
CALCULATOR PLUS and CHECKBOOK
PLUS both on one cassette
MC 2 only 514 95
Each cassette includes a bonus Loan Pay-
ment program with clean dollar-format
on-screen monthly or yearly display of
payment, interest, capital and balance
'TRS-80 ii 1 raglil«r«d tradamark ot TANDY CORP.
MANHATTAN SOFTWARE, inc
P.O. BOX 5200 Grand Central Station
New York City, New York 10017
1.90
TRS-80
client write-up system
ComplmtB Gtmral L^dgBr'sfstMt'wrimn'by a
C.P. A. in public prmctlct »nd u tmd in his o tflcm for
oi>»r bfi* ymt. fnehidM Gcmnf Litgv,'
"""iiir_^ ^
Check OJsbufMnwnts,
Journal Entrtos,
Payroll Taw Programa,
vii Taw Prograi
Financial SMamant, ,
"_iL z_r[in
^nd all nacaaaary tlla
maiat onanca progranw.
Comptot* op*rflHfig rnamTal himl^ted.hngiring ~
ayatam tupport avaliabla. ]\ ' ' ^
For aampla output aad iatormaVon, eaU or write:
1 ""iTrii_Li 1.1
Jerry E. Bartram, CPA
25455 Barton Rd. B-209
Loma Linda, CA 92354
[714] 825-2736.
^-137
y^ Reaa»f Service— see page 147
80 Microcomputing, March 1980 • 91
program cannot be modified
from the keyt>oard, write the fol-
lowing line:
100 POKE 16414,00 : POKE 16415,76
This is the address 4C00H
broken into two decimal pieces;
when you RUN 100, the patch
will be Inserted. At first you will
see no difference, and all keys
should function normally; the
patch is totally transparent to
BASIC, to programs and to all
keyboard functions. Unless the
processor finds the control key
depressed, it skips right back to
the scanning routine (the con-
trol key too will have no effect by
Itself).
Now depress control plus "A".
You will be returned instantly to
MEMORY SIZE? This control-
plus-letter concept is for-
midable; each key on the key-
board can represent the path-
way to an entire program, that
is. It can represent a command
Independent of BASIC!
Challmge Your Skills
As a challenge to your new
programming skills and to pro-
tect some memory, reload Baby-
bug to create a program tfiat
performs the following:
1. The program is transparent to
BASIC.
2. The program uses the control
plus letter "A" to call up the
white-screen module.
3. The program uses the control
plus letter "B" to call up the
cassette-load module, but loads
only 255 bytes, then returns to
BASIC.
4. The program uses the control
plus letter "C" to call the "BASIC
Bounce" module, listens to and
displays only 255 bytes, then re-
turns to BASIC.
To write this program, you will
need some additional informa-
tion and a few hints.
First, do not let your cassette-
load module overlay its input
data atop any of your current
programs. Place It well out of
the way, in your highest memory
area. Remember to POP infor-
mation off the stack as many
times as you PUSH it on and
note that every time you call a
subroutine, the program's cur-
rent address Is PUSHed onto the
stack.
Letters A. B and C are in mem-
ory location 3801 H. A is data 02
(binary 00000010), B is 04 (binary
00000100) and is OB (binary
00001000).
If you need more toops than
you have registers, remember
that the current value of a loop
can be stored in memory while
you perform other operations
and retrieved when it Is needed.
For example, if you start a loop
in the B register, you can store It
and use the B register for anoth-
er function.
Later, you can store that infor-
mation and retrieve your loop
status; decrement the loop's
value, store it; and again you
can retrieve the stored Infor-
mation.
The author wishes to express
his thanks to Philip K. Hooper
for his encouragement, and for
his astute criticism of the soft-
ware content of this article, as
well as to Stan Ockers for his im-
provements to Babybug for non-
typists. ■
NotM to Text
'An upper/lowercase character-
generator circuit is already part
of the TRS-80, but no access has
been provided. The Peripheral
People (P.O. Box 524, Mercer
Island, WA 98040) offer free, ex-
cellent lowercase conversion in-
formation. Both hardware and
software instructions are in-
cluded, and the conversion can
be achieved with just a few ICs.
Photo 3. Finished modifications on the TRS-dO before cover is
reinstalled. Note the four-conductor ROM cable that runs over top
of CPU board, and the author's lowercase modification svi/itch at
bottom.
Call ■ aubroutlTiF
CD
Lr
Ki
CALL 9Ht
Call ■ Hubroutlne If ■ lara flag
Is set
cc
Li
Hi
CALL ^,0M>
Call a aubrouilne if a zero flag
Is not aet
C4
Li
fi
CALL HZ.tftM
CoapaTF the contents of the
accunlitar ulth in Integer
FE
Nn
CP H
I>ccr«scnC the B reglBter
«5
DEC 1
Decreaent the C reglslet
m>
DEC C
Decr^nt the HL reglater pair
2t
DEC HL
nccre*«nt the T>t rcgliter pair
IB
□EC DE
Detresent the BC register pair
it
DEC BC
Increaent the B regliter
94
IHC 1
Increaenl the C reglater
•c
IHC C
Incrcaent the HL register pair
1]
IK HL
Increaent the DF regisIeT pair
13
IHC D«
Juap to laeBory location
C3
Li
Hi
JP 9*H
JuMp to WKWory location If a Ecro
flag la act
CA
Li
Hi
JP Z.0M4
Jump tn oeBory location If ■ zero
flag is not set
C2
Li
Ki
JP NZ, 41)40
Jiwp a relative distance
IS
Nn
JR it
JuDp a relative distance If a
lero flag ts set
28
Hn
JR 7..M
Jusp I relative distance If
lero flag ts not set
29 Nn
JR NZ.M
Load the ■ccumlatar Kith an
Integer
3E
Nn
LD A, 01
Load the acci^lator vjih the
B register
78
LD A.B
Lod the sccuBulatoT vlth Che
H register
7C
LD A,H
Load the accionilator ulth contents
of aewirr location HL
7E
LD *.(HL)
Load the acciMulator with contenla
of ^aory location DE
lA
LD A,(Dt)
Load the accuiaulator ulth contents
of BBBory location
3A
Li
Mi
LD A,{4M0)
Losd the contents of aeBory location
HL with the accumvilator
77
LD (HL) ,A
Load Ihc contents of acnoCf lacatl
on
DE vllh the accumulator
1!
LD (DE) ,A
location vlth a nnker
lb
Nn
LD (HL> ,114
Load Che HL register with Em
bytes
21
Li
«i
LH m..4M4
Losd the DE register with two
bytea
11
Li
Mi
LD DE.WM
Load the BC register with two
bytes
11
Ijt
Hx
LD RC.4404
Load the B register with a byte
K.
Nn
LD H.44
Load the C register with a byte
n
Nn
LD r.,99
Load the B register with the byte
found at HL acnory location
46
LD B.fHLl
OR the contents of the accumlator
with the C register
Bl
OR C
OR the contenii of the accuaulatoi
with the L register
b;
OR L
PUSH the two bytas in the RL
register onto the stack
e5
PUSH HL
PUSH the two bytes In the AE
register onto Ihc stack
Ei
PUSH AE
PUSH the two bytes in the BC
register onto the stack
C5
PUSH BC
POP the to(i two bytes in Che
■ tack into tiie HL register
El
POP HL
POP the top two bytea In the
Btack Into the AE register
Fl
POP AF
POP the top two hytes In the
stack into the BC register
CI
POP BC
Load the aeBory contents of BL
into the aewirr location DE;
InccaacnC HL and DE; decreaent
■C; loop back if BC not MTQ
ED
Bl
LDIR
Decresent BC; loop back Indicated
dlatance if not lero
l«
No
DJHZ 99
Return
C9
RET
Return if the lero flag is aat
C8
RET Z
Return If the zero flag ts not
■at
C»
RKT m
(Lx = Least Significant Byte. Mx
^Most
Significant Byte.
Nn - One-Byte integer)
Table 2. These instructions are a limited selection of the Z-80
instruction set; there are nea
riy
700 commands in total
though the program can be effectively created with just these.
92 • 60 Microcomputing. March 1980
At OSTCI
RCMXNOCR
XNTLRf ACL
new TQC CAM
ftHHIML. FAST
rURWUD.aR
INCRXXEKT YODl
T4na EVES HHER NOT
OOIHO 4 -CLOAD'. TU7E
OR SYSTEM' CCHNAND.
EMD THOSC CASSCTTE
TM'i: HANUt-INC BI-UE& •
ONI-Y
• 14.99
« MT ILL tame Ml MMUK 0MB.
FXATVXEBl Adapii in«t«nUf to
prvtart •v«twn. prsouon lonW and
■nomtntar/ pusly-biittor iwit tf w*.
dU'tfels iMLPtad tkmncjHi oAmri.
ta^h 9u«lir> floara-otug «M )AOk,
non-Ulf rjbMr fivt. *W« not
sn 0131 9) nri mcs to: *'«9
CRAHITE STATE
INBTt«Ur«:MT COMPAMY
Box a^OA
N««»vu«. MM 030A1
THETR
BLUE
Do your TRS BO'S limitations hit a sour note? Our full line of
business-oriented software can change that tune.
They're easy to use, moduiarly designed, and superiorly
documented, giving you versatility and sophistication of a higher
scale, at a price you'll sing about.
So write us, and we II send you the score.
SMALL BUSINESS SYSTEMS GROUP
GROTONSTPt^T [XJNS'ABLE NiA. 0162/ (61<'. 64M695 ^ifl
Sirius Systems introduces lower
prices to quality drives! • -
RemeiRFD 4000/8'
Floppy Disc Drive
Double the storage!
Double sided . .
Double density!'
otters QkUMy and tealures tound tn dnvcs cosmg
mucti mon' ■ Singli v Ooubie Dewh ■ DouWe-Sldtd Dim ■ Door
Lock iNaUDED ■ Wrftt-PratKt INCIUOCO ■ 190 Diy Warranty
■ CompabMe Aitf Stiugart 860^1 ■ Low Power OptraMw mturti
LONGER liFE'i ■ Model RFD4001 oUt'i Ditj anoSMMr Svpjraior
MHiiwu opnwn/wcinoMB
ltfD4000Uv>ur SS« piV'vtCjiMl 1^9^
r $5 « r tV-v
SIRIUS 80+
Tl»e PerlKl
AM-Or iBf
yo«r TRSaO
NIWM.1 dS's^oss
si«U3N*i Ju«'««i: S419.99
MPI-51/52
AGrsal
Reliable
Mmi-Ortvil
MPi'M iXa' '(NO) I349.SS
»5
Remex 10008
If you ve been looking tor a
less eipenslve floppy disc
drive, butnot wanting to
sacrifice quality—
your search is over!
^!U
VouQti botn in ff)a Ranex IQOOB* ForofiiyS396toohalwiti(vougH ■
8 Ffcppy Orwc ■ Single or Ooubis Oetsiiy ■ Hird or Soft SKtonng ■
Wsdn Prottction Featuie ■ S«igle Dewty DiU S«vanlor ■ leo Day
Fs'-tofv iWa'rjir,'
avuutau omoai'Acasiofuu
_ JOB' LOCO S'»M 1 Jit»>-w(^j-»'S\«o'» Wi » n "■><•» thnut- V«
Q
SMUS
SYSTtilS
"Q iC'Vm ■"On* '•■ HWi
•JV
our
4!9IRr
niMUTUNDlTr
CTV
Twr
TP" OTMnnFTTnaDtrw-
I wM la^. iHi^nMiiffUS cw>tnr«««n
t^^aaOtf brwov— M»|Mf» 147
SO MiCfOCQfpputing. March 1980 • 93
STYLE
Why write software when you can use the
inbuilt Level II assembly language subroutine!
Inside the ROMs
Bruce S. Stock
537 33rd Ave. South
Seattle WA 96144
One of the more fascinating
aspects of owning a Level
II TRS-BO computer is knowing
that buried within it are over
twelve thousand bytes of lovety
machine- language routines just
waiting to ease the load of the
intrepid assembly language pro-
grammer. This fascination has
caused me to spend hours poll-
ing about in listings, following
chains of subroutines all over
memory, to find some of the
more immediately useful sec-
tions for my own assembly lan-
guage programs. The search
has been in turn frustrating, in-
structive, and rewarding. In this
article I hope to share the re-
wards, while keeping the frus-
trations to a bare minimum.
Keyboard Routines
The keytxiard routines are a
good starting point. Let's begin
with a top level routine for input-
ting data into a program. This
routine is one step removed
from the INPUT command in BA-
EMTMY
POINT
DESCfUPTION
RBURKS
1B83M
Pnnis ">' . incuts data
Data goes into BASIC mpul bultet 241 chai mai
un'il entet is hit. dis-
HL points lo location pfioi to tiist character on rfr
plays data on sc'e«fi
lurn Uses *F. HL DE
361H
Same ai 16B3H. less
prornpl
As above
049H
Rat urns trtten a single
cnaiacter has t)een
Criaracter in A Uses AF. DE
02BH
Insianianeous «ead of
A = [XI return it key not pfessed, e<se A = cnarac
heyboa'd
ler code Uses AF. DE
010H
Restan ^DH Advances
HL, loads A with |HL).
sets carry flag.
C - il alpna, C = 1 IS numeric Usea AF. HL
)E1AH
Processes decimal
numOw mto binary
See ten.
Table 1. Keyboard Routme Summary
SIC. The entry point of the rou-
tine is at 1B83H (all addresses
are given in hexadecimal). A call
to this location results in a ques-
tion mark on the screen, fol-
lowed by a space. The operator
is now free to input data, which
is placed into the BASIC input
buffer. As it's typed, the data
also appears on the screen and
you can backspace to correct er-
rors.
Terminate the input by hitting
the entry key. When the routine
returns, the HL register pair con-
tains one less than the buffer
start address.
Now that the data Is in the
buffer, how do you get at It? Exe-
cuting an RST 10H (Restart 10H)
instruction advances the HL
pointer to the first character en-
tered (skipping any spaces),
loads the character into the A
register and sets the carry flag
to indicate whether the char-
acter is numeric (C = 1) or
alphabetic (C=0). Each RST
10H executed loads the next
character Into A (again, skipping
any spaces) for you to process.
When the RST 10H returns a
value of zero, you have reached
the end of the entered data. If
you don't want the question
mark prompt printed at the
twginnlng of the routine, enter it
at 361H instead of 1BB3H.
Suppose you don't want a
whole buffer full of data, but on-
ly a single keystroke (i.e., the IN-
KEY$ type function)? A call to
IM9H returns when a key has
been hit. The A register contains
the character.
In many cases, you will want a
routine which returns immedi-
ately after checking the key-
board, even if no key is punched.
In this case, call 02BH. This rou-
tine will return immediately with
A = if no key Is pressed at the
instant the routine is called, or
with A equal to the correct key
code If a key is depressed.
Neither of these routines dis-
plays the character entered. If
the character must be dis-
played, use one of the routines
in the following section.
The last keytioard routine to
be discussed takes a decimal
number In from the keyboard
and returns with the equivalent
binary value In the DE register
pair. This is a very handy routine
when the input needed is a deci-
mal integer between 1 and
65.5^. The routine used fol-
lows;
94 • 80 Microcomputing, March 19^
ADDRESS
DATA
MNEMONtC
COMMENT
5000
21 50 50
LD HUS050H
: load poinIM
Tfilo HL
5003
CO A7 28
CALL 28A7H
, ootpul message
S006
CO B3 IB
CALL 1BB3M
{process inpuO
End
. gel inpul
SOW
59 4F 55 52
YOUB
meSMge
5054
20 4D 4F 56
MOVE
50S8
45 OD X
on
Table 2. An
example of the use ot the message routine.
CALL 1BB3H
RST 10H
CAU 1E5AH
The first instruction gets the
data into the input buffer. The
second advances HL to point to
the first character that was en-
tered. The last processes ail en-
tered digits into a binary value
which is left in DE. The three rou-
tines taken together use the A.
DE, and HL registers.
Table 1 summarizes the key-
board routines. The Remarks in-
dicate which registers are util-
ized by the called routine. You
should save these registers if
your program is also using
them.
ScrMn Routines
The next series of routines
deals with getting data onto the
screen. We begin at the top
again with a routine that prints a
whole message on screen. Level
II uses this routine to print the
MEMORY SIZE message, as
well as several others. To use
this routine you must have a
message stored somewhere in
memory.
The message is a string of
ASCII characters and must ter-
minate with a byte containing
zero. It may also contain control
codes or graphics codes, but no
quotation marks. First, the HL
register must be loaded with the
address of the first character of
the message- Then a call to
28A7H does the rest.
Table 2 shows how it is done.
In the example, the message
"YOUR MOVE" is being output
to prompt an input to a chess
program. The processing rou-
tine following the 1 BB3H call de-
codes the move input. The pow-
er of this call should not be over-
looked, since, by including car-
riage returns, tab codes and so
forth in the message, it is pos-
sible to format a complete dis-
play with a single call.
Now, let's display a single
character at a time. Suppose
that 04gH has been called to get
a character in from the keyboard
and now it must be displayed on
the screen. Call 32AH. This rou-
tine wilt take whatever is in the A
register and print it on the screen
without disturbing data in any of
the other registers. The routine
at 033H does almost the same
thing, but It disturbs the DE reg-
ister pair. These routines are
good for many functions, for ex-
ample, to shift to thirty-two (32)
characters per line, just load
17H into the A register and call
32AH.
The last screen routine is
short and sweet. A call to 1C9H
clears the screen and sends
home the cursor. The cursor
may be turned on or off by load-
ing OEM or OFH, respectively, in-
to A. followed by a call to 32AH.
The screen routines are sum-
marized in Table 3.
Cassette Routines
Since Level II has a nice com-
plement of cassette-related rou-
tines (CSAVE, CLOAD, INPUT #,
etc.), it may seem unnecessary
to go into more here. However,
the routines described here al-
low input and output formats to
best suit the situation. They can
be used to improve the efficien-
cy of data storage, or, as I have
done, they may generate tapes
that can be read by the BASIC
SYSTEM command.
First turn on the cassette mo-
tor and record the synchroniza-
tion pattern. This is done with a
call to 284H. The synchroniza-
tion pattern consists of 256
zeros, followed by a single byte
containing the value ASH. Now
that the motor is running and
the sync pattern is on tape,
record some data. Load the byte
to be recorded into the A regis-
ter and call 264H. When the final
byte of data has t>een recorded,
a call to 1 F8H turns off the cas-
sette motor. Be wary of doing
too much data processing be-
tween output of data bytes,
since the delays introduced
could foul up the synchroniza-
tion when the tape is read back.
To read in data which has
been written on tape requires a
call to 293H. This routine wilt
turn on the cassette motor, read
the leader until the ASH sync
byte is found, print two aster-
isks in the upper right corner of
the screen and then return. The
following data can now be read
a byte at a time by repeated
calls to 235H. Again, don't
spend too much lime process-
ing bytes between calls to 235H,
or you may lose synchroniza-
tion. When all data has been in-
put, a call to 1F8H will turn the
motor off.
If the idea of blinking the right
asterisk appeals to you. each
call to 22CH will reverse its
state, on to off, or off to on. (The
CLOAD and SYSTEM commands
blink the asterisk each time a
BASIC statement is read in or
each time the checksum value is
verified.)
Note that all the motor con-
trol routines described above
are intended for use with the
cassette plugged into the key-
board, not into the expansion
lx>x.
Table 4 summarizes the cas-
sette routines.
Conclusion
The use of these routines
should considerably simplify
the I/O sections of yournext pro-
gram. Bear in mind, however,
that all this does not come total-
ly free. Most of these routines
use pointers and buffers which
reside within the area of RAM
dedicated to BASIC. As a result,
you can't locate programs In ad-
dresses below approximately
4300H. or you will disrupt the
pointers. Also, several of the
routines have additional fea-
tures beyond those described,
so, if you deviate significantly
from the examples given, the re-
sults may be confusing, to say
the least. Lastly, since the BA-
SIC stack is used, the MEMORY
SIZE cannot be set too low in
value, or insufficient stack
space will result.
These few restrictions are a
small price to pay for I/O that is
nearly as easy as using PRINT,
INPUT, and INKEY$. With these
routines available, the only real
work remaining is to decide
which of the programs you've
been putting off will be the
first you'll write incorporating
them. ■
ENTRY
POINT
DESCRIPTION REMARKS 1
28A7H
Q«n«ralliM massag* oulpul routine
HL must point to message Message
must end wilH 00 Uses *F. BC. DE
ML
32AH
Pul ona cha'actef on screen
Enter with character in A Uses AF
033H
Pul ona cfiaraclef on screen
Enter vaitn cnaracter in A Uses AF
DE
1C9H
Clear screen.
Also sends home cursor lo upper
letl comer
Table 3. Summary of Screen Routines.
ENTRY
POINT
DESCRIPTION
REMARKS
2S4H
Tuffi on motor, write leadef
Uses AF Leader is 256 ;eros lot
lowed by A5H
264H
Writes Dyle to tape
Byte must tw in A
IFBM
Turn oft motor
293H
Reads leader artd locales sync byte
Turns motor on Sync = ASH Uses
AF
235H
Reads Cryte tram tape
Returns wilti Dyte m A Uses AF
22CM
BliriKs rightmost asterisk
Uses AF
Table 4. Summary of Cassette Routines.
80 Microcomputing, March 1980 • 95
HARDWARE
A real work, real time
application project for handy 80 owners.
A Home Brew Interface
C.R. Vince
27 Ventnor Way
Ottawa, Ontario
Canada K2J1M2
After becoming the proud
owner of a TRS-80 system
in April of 197B, I soon realized
that the Level I, while an excel-
lent teaching aid of the BASIC
language, left much to be de-
sired when it came to making
my computer more than just an
expensive toy. After waiting anx-
iously for several months (due, I
suppose, to the extremely heavy
demand), my Level li arrived and
was installed.
Now i could really make my
"toy" earn its keep, or could I?
Yes I could, providing I put out
another $439 (Canadian) for an
expansion interface. But wait,
all that would give me would be
a real-time clock, mini-disk con-
troiiers, cassette and line printer
controllers and "space for an
additional PC board" (to add
whatever), according to Radio
Shack advertising. What about
my home climate control, model
railway control and other appli-
cations?
There had to be another way,
and I hope that after reading this
article you will agree with me
that there is another way, per-
haps even a better way, at least
for hobby use.
Introduction
This article will descrltw an in-
terface unit for the TRS-80 Level
II that will provide the following
features:
1) An interface tioard to the
TRS-80 itself.
2) An output board having up to
16 8-bit parallel output ports.
3) An input board having up to 16
8-bit parallel input ports.
4) A TTY interface board,
5) A home climate control
system.
8) A model railroad speed con-
trol system.
I would like to point out here
that I am no expert in electronic
circuit design. In this article,
most of the circuits have t}een
previously described in other
books and publications, in-
cluding Microcomputing. I have
merely put them together In one
package as simply and as eco-
nomically as possible. However,
the circuits have been tested
and do work; in fact, they are in
daily use.
To enable novices to under-
stand the workings of the inter-
face unit I have arrowed per-
tinent lines in the figures to
show the directional flow of
data on that particular line.
The unit has been built on five
separate PC boards (excluding
the power supply). I use the term
PC boards loosely, as these
boards were handmade, and on-
ly the common lines such as
data bus, address bus and
power lines were etched; other
lines such as enable lines were
wired.
Edge card connectors used
were of the 62-pin type since
they were the least expensive
and most available at the time;
consequently, pin connections
given are for these 82-pin vari-
ety. Others such as 44 pin could
be used providing they have
enough pins to accommodate
all lines entering or leaving the
board. The edge card connec-
tors were mounted on a piece of
wood and like-numbered pins for
the -fS V, ground supplies, the
data and the address lines were
multiplied from one connector to
the next.
I strongly recommend the use
of sockets for all ICs, as trouble-
shooting Is made so much
easier if you can simply replace
a suspect IC to localize the prob-
lem. To emphasize this point,
when I first plugged in the inter-
face board, I had problems on a
new IC, which seemed to work
OK on static bench tests but
failed In the unit. By simply ex-
changing two ICs, the problem
was localized in minutes. In ad-
dition, don't forget to use .01 uF
bypass capacitors on about
every fifth IC.
Intwfaca Board
To allow for expansion, I de-
cided to use 74LS367S to buffer
all signals coming from the
TRS-80 (see Fig. 1). I Initially buf-
fered the data bus in both direc-
tions, but found that this caused
problems because the interface
96 » 80 Microcomputing, March 7980
unit bus is, in effect, parallel
with the internal TRS-80 bus,
and each time an input to the
Z-80 processor is effected (e.g.,
from memory), it also inputs
from the interface unit.
Since the interface unit data
bus had no signal on it, the buf-
fers interpreted this as a high {or
a 1). This high caused errors
because at times it was trans-
ferred to the Z-80, overriding the
low {or 0) that should have been
there. Therefore, in the final
design presented here the data
bus is buffered in one direction
only— out to the interface unit.
Unfortunately, this results in
two data buses in the interface
unit: one in (not buffered) and
one out (buffered).
This type of arrangement is
not uncommon, of course, and
presents no problems, except
for some additional wiring. Buf-
fered lines are denoted by ttie
"B" following the line designa-
tion (e.g., D6B means that data
line 6 has been buffered).
The interface board is con-
nected to the TRS-80 by means
of a 40-wire cable. At the TRS-K)
end an AMP P/N 88103-1 card
edge connector (or equivalent) is
required. At the interface board
end I chose to cable directly to
the sockets holding the ICs.
This has presented no prob-
lems, but connection could be
made to the interface board
card connector if desired (if
enough pins are available).
While two 20-wire ribbon cables
would seem desirable and
easier to connect on the AMP
P/N 88103-1, my unit works suc-
cessfully using regular 40-wire
cable about 12 inches long.
The Interface Board itself can
be described in four separate
sections:
Data Bus Buffers. The data
bus (D0-D7) is buffered by ICs a
and b. As mentioned earlier, on-
ly data to be output is buffered;
input data is presented directly
to the TRS-80 without buffering.
The buffers are enabled by IC g,
which provides a low signal
whenever the OUTB or WRB
control lines go low. To avoid
overloading these buffers, no
more than 40 output ports
should be used unless addi-
tional buffering is provided.
Address Bus Buffers. The ad-
dress lines (A0-A1 5) are buffered low signal from any one of the lines from the TRS-80 are what I
in much the same way as the four control lines OUTB, WRB, refer to as control lines. Once
data lines. The buffers are INB, RDB. again I chose to buffer the con-
enabled by IC h on receipt of a Control Lines. The remaining trol lines that are output from
Fig. 1. Interface board.
60 h^icrocomputing. hAarch 1980 • 97
the CPU; the one input line, INT,
is not buffered. I decided not to
buffer the WAIT, TEST and
SYSRES lines, since i couid fore-
see no use for them in the near
or even distant future; however, i
wired them to the interface
board just in case, so they couid
be buffered if desired in the
same way as other lines.
The controi lines are buffered
by iCs e and f. Note that there
are three GND iines. These
shouid be connected to the GND
of the interface board power
suppiy. The iine connected to
pin 39 of the TRS-80 edge con-
nector warrants mention here.
in the Levei i manuai (page
228) this line is shown con-
nected to +5 V in the TRS-80.
Prior to having my Level il in-
staiied, this was, in fact, the
case; however, after the installa-
tion of the Level II, I noticed that
the land to pin 39 had been cut
and pin 40 had been strapped to
pin 39, making pin 39 a ground
line.
Since I do not know the state
of other units with regard to this
pin, I recommend that this pin
not be wired. Of the nine control
lines wired, only two are used by
circuits described in this article
—the OUT and IN lines— how-
ever, the board has been de-
signed to allow for the easy ad-
dition of memory and an inter-
rupt board at a later date, which
require the additional control
lines.
Output and Input Port Initial
Selectors. Whenever the TRS^
executes an input or output
(port) instruction, the port ad-
dress is placed on the lower
eight bits of the address bus
(A0-A7). At the same time, the
OUTB line (on an OUT instruc-
tion) or the TRH line (on an INP
> -
fROM
BOARD
•i- -ir -.y ^y -y •y -^
TO OTHER OUTPUT POB'S
A
A
FROM
INTEBFfiCE
BOARD
^
TO TTT BOaRD
-> Z9 '3 ITY flOOHD
7a. 5/5
" N 5
GND
PIN \2
Tfl C4
PI N la
GND
"IN 7
74 15a
p N ja
GND
PIN 2
Fig. 2. Eight-bit parallel output port board (only three ports shown).
Instruction) is enabled. The in-
put or output port initial selec-
tors (iC I or j) are selected by
these lines. This causes the high
four bits (A4-A7) to be decoded
by the selected IC i or j, which
are 74154, four line to 16-line
decoders.
The output of the 74154 is us-
ed to select a particular input or
output board where the final
port address is decoded. Thus
using this configuration, up to
16 input and 16 output boards
could be selected, providing ad-
ditional buffers are used.
In the design presented here
only one input and one output
board is used, each one contain-
ing ports 0-15. To select addi-
tional boards, simply use the
proper output from the 74154s
to select the desired board (e.g.,
to select ports 16-31, the output
from pin 2 of the relative 74154
would be used).
Output Port Board
The output port board (see
Fig. 2) provides up to 16 8-bit
parallel output ports. In my con-
figuration I have used ports to
8, since this was the physical
limit of the size of the board I
have available.
The board is selected by the
OUTSELO line from the interface
board. This enables IC ma
74154, which now decodes the
four bits presented to it on the
A0B-A3B lines.
The output from IC m is a low
on one of the 16 output lines,
corresponding to the binary
value of lines A0B-A3B. This low
is inverted and subsequently en-
ables a pair of 74LS75 quad
latches. The data on the DOB-
D7B bus is now latched by the
74LS75 quad latches. The true
data is now held by the latch and
can be used to control external
devices. The use of the edge
card connector pins is left to the
discretion of the user.
Input Port Board
The input port board (Fig 3)
operates in a similar fashion to
the output port board. The input
board is selected by the iNSELO
line from the interface board,
enabling the 74154 to decode
the final port address, accord-
ing to the data on the A0B-A3B
lines. The output from the 74154
98 • 50 Microcomputing, March 1980
PUTYOURTRS-80*
TO WORK I
SET TYPE!
SAVE the TIME and EXPENSE of having
copy re-keyboarded Vou compose text for
books, publications, catalogs, price lists, di-
rectories, reports, etc. We convert it to high-
quality phototypesettingi
FASTSERVICE. BIG SAVINGS.
Five user- specified type faces and fourteen
sizes on line Change faces or sizes within a
line. Line lengths to seven and one-half
inches. Set type flush to the left or right,
centered, or justified Automatic insertion of
space or leaders. Special characters More
SIMPLE COMMANDS.
TRS-80' with lower case modification and
The Electric Pencil" are required. Text files
may be transmitted via telephone with op-
tional disk drive and modem for even faster
turnaround time
Our Manual For Microcomputer Type-
(cttlng. which includes instructions, ex-
amples and type specimens is S50 00 Ship-
ped within 24 hours. Return within 10 days
for full refund if not satisfied VISA and
fWASTER CHARGE accepted give card num-
ber and expiration date
BROWN GRAPHIC PRESS
2488 Summit Street, Columbus. Ohio 43202
614/262-3491 ^94
T«Kt tor tlilt «(■ wai compoivdon ■ TRI-flO'
■IfS-BC .li('*lf mjrl (I'rr r '*ria, Corn
■■IMi: EI.ECTBIC PE\C.L ii j 'rjOr-urk o' Micnapl Sr-r^ytr
STOCK MARKET • TRADER
ENTREPRENEUR
LETTER PROCESSOR -
The LETTER PROCESSOR is a multi -purpose utility
program. With it .you generate multiple copies of notes,
receipts, nionuscripts, and letters .You have the choice
with receipts and letters of hoving each personal ly
addressed. The names and oddresiei may be input
from either the keyboard or cassette.
For use on the TRS-80 lev. 2 I6K. Pteose remit »I59S
ACCOUNTING ANALYSIS SYSTEM -
This systefTi performs simple double entry bookkeepirtg
There are two fixed accounts ir odditior to any the user
moy create. One is under assets called cash on hand ,
the other is under i labilities called debt to owner
Automotic second entries ore made to the appropriote
of these two accounts by one of the two system pro-
grams wher updoting the data base The program quier -
ies the data base ond produces a Balance Sheet and
Prafit-Lcss statement.
TRS-80 lev.2 l6Kand PET. Please remit *20.9?.
STOCK MARKET ANALYSIS SYSTEM -
Technical analysis ,12 daily and 15 weekly indicators
for the stock market enthuikist . This system signaled
the October TBdebade. Fort 25.9° you receive Iwo
programs plus data base and 27 page detailed in-
struction manual .
Please indicote TRS-B0le¥.lor2 ISKorPET *25.5e.
OPTION ANALYSIS SYSTEM -
This system is siriclly for Ihemarket speculator Work-
ing with price, calculated volatility, and calculated
averoge daily premium ,this system picks the best buys
from 75 or more options. Judgement by the analyst is
required. Far!35 00 you receive two progroms plus
aaamp'e data base and instruction manual.
Hease indicate : TRS-eO lev.2 I6K orPET.*35.oo.
STOCK MARKET FINANCIAL ANALYSIS SYSTEM-
Includes two programs and hard com iristructionsfor
better control of your stock and option transactions.
Fbrt20.SS , you receive soft ware with eight analysis
routines . Two of these routines are stock transactions
which made money ar>d option transactions which mode
money Six more program routines exist with some
consideration given to tmei Please indicate :
TR5-B0 lev.Z16KorPET .*20.9fi. ^BQ
Distributed by: STEVEN E. SHAW, PE
IPO. Box 1707
Tompa , Florida 33601
is B registered trademark ol TANDY CORP "
me
4
Try a Really Different Kind of Software
for Your TRS 80. PET or APPLE !
( rtMa bvioTdb with * iMnd iit desiArdK
(o(it>er« in Ibttt raoumoln lair in th«
l>«l*4lMte« ol Rva. ViNi pvplarr ihp
<«v*tn» ehowQ on vour video dlaplcv >nd
vanquitJi the monhtrrs in tpol lin»p. >ou
h«v» fkMl 20 minutM 10 recover lb* pre-
1 KWi« I)iiii>itii>n*« brfuTP limr k*M Mop«.
Monsfcrs MeJrrs- MagivJ
Ihv ll«l#ato»p« ol Kvn iniriMlui rti sou
K. iiw ftup«i*iivr di;njonqi:F-st b«"«
fvelem Ulhrr qansv* in ihr Mrrini f»d\ pit
you ajiainKi »n rvil wi/iMil at itir {r't^ital
iiM*cioid moneier* ol ilie qod Apituii In
thf Datv«t*a«« vour nuvn t>|if)onn)t» mt*
human but kioli oui tor other na»lv i rttien*
lurking in Ihp darkrw«» ViNi >Mir II dJlWrnl
cotnmendi ranfing Iroim moving («■ laei or
ae eloH aa vou hkr *o bins a* you don't tire
VourveH out) to Marching the «halb lor
teem dour*
For iusi 1114 9% yiM 9ct ihr Daicaloeiea al
Ryn on taeMrtlc reaiK to play, and a eupctbk
41u»tratpd biKtklpi Ihdt tHU you all ab(Mi( Ihe
■jAinc CleAM' kpetily ihr vereion you uani —
IKbMIII.«v«lll. I6K), PET I lAK t>ld tM- new
KOMS), or APPIX («K AppbaolIL ^^
Aeh v<Mir de<tl?r or ter»d lodav to
AUTOMATED
SIMULATIONS
-1.1 H
PO Box 4232
Mountain View. Ci 94040
CiliioniL* rtMdirht* pivase add frv. talcs tax.
!!NOW AVAILABLE!!
I NDEX
Sequential
Access
Method
* Get and Put Records to Disk File by "KEY"
* Read File in Key Sequence Without Sorting
4 Delete Records Without Recopying File
* Add Records to Disk Files in Any Sequer>ce
« Variable Key Length From 1 to 50 Characters
BUSINESS APPLICATION ADVANTAGES
- Improved Disk Utilization
- Easier Program Deveiopment
■ Improved Operalir>g Characteristics
- Reduce or Eliminate Sorting
- Improved Performance
ISAM SUBflOUTINES
SAM UTILITIES
Documentation
On Diskstte SBO.OO
- PLUS - Free Mailing List Sample Application
Add G'/d Sates Tex lor CaHfomia Orders
TnsaO MODEL I a II SOFTWARE FROM:
Johnson Associates
P.O.BOX1402M
Redding, CA 96001
-or- 24 hkxjr Order Line
For Bank Card Sales
(916)221-0740
WRFTT FOR FflEF CATALOG
1^35
Hdrdwdre
Hdckers—
SAVES $ WITH TESTER -80
Hobbyists — Turn your TRS-80' inloan IC Tester with
TESTER80
Selecl useable chips from \he asso'lmenls ol
bargain Dasertient chips available Irom many
sources Tesl suspecl chips Irom problem boards
TESTER-80. plugged into your TRS-80' expansion
connector aiII tesl nea'ly all commonly used TTL
antl DTL Integrated Circuit chips, from U pin to 24
pin A master control program is loaded from your
cassette interface, il then loads in the individual IC
lest programs and performs a lull lunclional test of
the chip inserted m the tesl socKet each time you hit
ENTER.
TESTER-80. Master Conlrol Program, TESTER-80
Hardware Checkout Program and Test Programs lor
21 commonly used TTL ICs $179 00 Allow approx
sin weeks lor delivery TEXTOOL socket StO.OO eKtra
Additional IC tesl programs St. 25 each lapproi-
imately six to 3 cassetlei.
Test programs currently available for over 80 ditter-
enl TTL ICs. more on the way Updaled lisl on re-
guest
S-SYSTEMS P.O. BOX 62
PALM BAY, FL 32905
(305)-725-1336
< ►
■ 'RS-80 IS a Uadematk ol Tandy Corp ^ ,3,
t^ Reader Service—see page 147
80 Microcomputing, March 1980 • 99
(IC o) strobes the selected Input
port (IC n), and the data present
on the input lines is transferred
to the data bus. Again, due to
physical limitations, my board
only has nine input ports.
Either 74LS367 or 74LS368s
can be used as the input port;
the pinout for either is identical.
The only difference is that the
74LS368 inverts the data pre-
sent on the input lines, whereas
the 74LS367 does not. This can
be useful.
Imagine a port (x) with
74LS367S and only one input, bit
0, on that port being used. Per-
forming a y = lnp(x) instruction
will result in y having a value of
254 or 255, depending on
whether the input is high or low.
The other seven inputs are seen
as high by the TRS-80.
However, if 74LS368S are
used, then the highs on bits 1-7
will be inverted and seen by the
TRS-80 as low or 0. Consequent-
ly, y will now have a value of or
1. This does make programming
a little easier.
Now that we can input and
output to the TRS-80, a whole
new world has opened up! The
following are three of the uses
that I have successfully tried to
date, obviously there are many
more.
TTY Interface
Shortly after completing the
interface board, I purchased a
Model 33 at almost bargain-
basement price (even in our de-
valued Canadian dollars!) from
a local dealer at a clearout sale.
I constructed the TTY board
(see Fig. 4) in a couple of even-
ings. It uses a popular UART, the
AY-3-1015, and was selected pri-
marily because of the single 5 V
supply required. Other UARTs
would probably work just as
well. Whichever UART you pur-
chase, I suggest you obtain a
copy of the specification
sheets, as many variations are
allowed (e.g., parity, number of
stop bits, number of bits/char-
acter, etc).
To list the numerous varia-
tions here would be too lengthy;
however, the circuit as shown
will run a Model 33 Teletype at
110 baud, 20 mA current loop in
half duplex operation. No pro-
gramming is necessary to con-
100 • 80 Microcomputing, March 1980
vert the serial data to parallel or
vice versa, as this is done by the
UART.
The 555 timer circuit supplies
clock pulses at 16X the desired
baud rate; therefore, the clock
frequency for 110 baud Is 1760
Hz. The actual serial data is
transmitted to and received
from the TTY by the two 4N26
optical couplers and the 2N2222
transistors. These couplers pro-
vide electrical isolation between
the TTY and UART.
At the start of any program
that will input or output data
through the UART, an OUT 11,0
instruction should be used to
reset all internal UART registers
and flags toO.
To input data from the TTY, an
INP9, (x) instruction will enable
the SWE-0 line {status word
enable). If bit 1 is a 1, the DAV
(data available flag) line will be
high, indicating that the UART
does, in fact, have data to input.
An INPIO(x) will enable the RDE
line (received data enable) and
will result in the data being
placed onto the data bus.
Following this, an OUT 10,0
sho uld be executed to enable
the RDAV line (reset data avail-
able flag). Obviously, to ensure
that no input Is missed, these in-
structions should be contained
in a loop, with a branch out only
when a character is read.
To output data to the TTY an
INP9,(x) instruction will again re-
sult in the status word being
output on the data bus. This
time, however, we are interested
in bit 0, which will be the TBMT
flag (transmitter buffer empty).
If the TBMT flag is a 1 then the
data may be output to the UART
for transmission. To do this, an
0UT9,(x) instruction is required.
Note that during transmis-
sion from the UART the EOC line
on pin 24 goes low. This keeps
-ROM
IN'ERFO
BOiRD
Vrr ■ PifJ '6 OND ■ Oln 8
V-r ' ' '^ ^^ GND-fNS
TO INPUT
POUTS 11-1! ;
^lf USED!
Fig. 3. Eight-bit parallel input port board (only three ports shown).
Scanned by Ira Goldklang - www trs-80 com
BOARD
enou
INTEBFACE
eoAHo
Fig. 4. TTY interface.
F»0»
OUTPU'
PORT
BOflBD
- J
Fig. 5. Furnace control.
the output from the 7400 high,
which prevents the DART from
seeing the transmitted char-
acter on the receiver side (pin
20),
Three other flags are output
on the data bus: the OR
(overrun), FE (framing error) and
PE (parity error). These can be
checked by software if required,
but this is not absoluteiy neces-
sary.
Home Climate Controls
Programmabie timers that
will turn down the thermostat
setting at night are available,
however, the cost of two more
thermostats is even less, and
besides that, it gives your
TRS-80 something to do while
you are working!
My house has three levels,
and so a thermostat on each
level is enabled by a signal from
an output port under program
control. As a safety feature, 1
have wired three outputs
through a plug and socket
arrangement, so that in the
event of a failure of the com-
puter, by disconnecting the
plug, all three thermostats are
automatically enabled (see Fig.
5). (There's nothing worse than
trying to fix a program bug when
you can't see the monitor for the
ice crystals!)
The triac— I used one from my
junk box, as the voltage and cur-
rent demands are minimal
(check this on your unit)— turns
on the furnace as the thermo-
stat used to do. The triac is
turned on by a simple circuit
consisting of a LED and an LDR
(light dependant resistor), which
I bought at Radio Shack. Of
course, these two items must be
enclosed in a lightproof con-
tainer to be effective.
To provide a means of keep-
ing time in the computer, I used
a one-minute pulse from a
digital clock (which I had built
some time ago) connected to in-
put port 0. The clock itself is
driven by a 160 kHz crystal,
which is divided by a number of
binary counters {7493s) con-
nected in series to produce a
one-minute pulse. The input port
80 Microcomputing, March 1980 • 101
00005
00010
;ttyopi
ALLOWS USE DF A REGULAR
TTY WITH THE
00020
;trs-8
. THIS ALLOWS DIRECT USE
OF LLIST AND
00030
;lprimt
COMMANDS. IT RESIDES AT
7F00(H) WHICH
00040
; I S THE
ADDRESS C32512D) THAT MUST BE ANSWERED 1
00050
; i:j respq-jse
TO "MEMORY SIZE?".
AFTER LOADING
00060
;a "/"
WILL LOAD THE DCB C4026H
I 4027HJ WITH
D0070
;THE "START"
ADDRESS AND WILL THEN JUMP TO |
OOOBO
: BASIC
□ 0090
7F0D
ODIOO
ORG
7F0OH
7FO0
D30B
001 ID
OUT
t 1 n^A
; RESET UART
7FD2
21 1 07F
00120
LD
HL* START
;adDR of TTYOPl
7F0 5
222640
00 130
LD
C402eH) *HL
.'INTO DCB
7F08
212A40
00140
LD
HL^402AH
jchar count ADDR
7F0B
36^0
00150
LD
CHL)^ 64
;L0AD # OF CHAR/LINE
7F0D
C319 lA
00 160
JP
1A19H
iJP TO BASIC
7F1
79
00170
START
LD
A^C
;CHAn TO BE 0/P
7F1 1
FEDD
OOISO
CP
13
;CK IF CR
7F13
2004
00 190
JR
NZ^Al
;JP IF NOT
7F15
CD2F7F
00200
CALL
CRLF
;CR+LF ROUTINE
7F18
C9
00210
RET
7F19
CD267F
00220
Al
CALL
OPCHAR
JCHAR 0/P ROUTIiJE
7F1C
DD7E05
0023D
LD
A> C IXt5)
;LD * OF CHAR LEFT
7F1 F
FEOO
0024D
CP
;CK IF CRLF NEEDED
7F2I
CO
00250
RET
HZ
;RET if NOT
7F22
CD2F7F
00260
CALL
CRLF
;CR+LF ROUTINE
7F2 5
C9
D270
RET
7F26
CD3E7F
00280
QPCHAR
CALL
CKTBMT
;CK IF TBMT
7F29
D309
290
OUT
C 09),A
;0/P CHAR
7F2B
DD3505
003DD
DEC
C lX+5)
J DEC CHAR CO'JNTER
7F2E
C9
00310
RET
7F2F
3E0D
00320
CRLF
LD
A^ 13
;load CR
7F31
CD267F
00330
CALL
3PCHAR
;o/p char
7F3'^
3E0A
00340
LD
A^ 10
;load lf
7F36
CD267F
00350
CALL
OPCHAR
;q/p lf
7F39
DD360540
00360
LD
C 1X*5) ^ 64
;rel3ad char coujter
7F3D
C9
00370
RET
7F3E
F5
003BD
CKTBMT
PUSH
AF
;SAUE char in a
7F3F
DB09
00390
IN
A* C09)
; i/p UART flags
7F^1
E6 1
00400
KID
1
1 STRIP OFF TBMT
7F4 3
FEO 1
00410
CP
I
;CK IF MT
7F«5
20FB
00420
JR
NZ*CKTBMT+I
JJP IF NOT
7F^7
Fl
00430
POP
AF
J RESTORE A REG
7F4 8
C9
00440
RET
7F00
00450
EtD
7F0 0H
OODOC
TOTAL ERRORS
CKTHMT 7F3E
OPCHAR 7F26
CRLF
7F2F
Al
7F19
STAR!
7FI G
Program A.
is continously monitored for a
change in state. Other methods
could be used, e.g., a FOR-NEXT
loop or a 555 timer circuit if you
are not too concerned about ac-
curacy.
Model Railway Speed Control
The speed control shown in
Fig. 6 is a simple digital to ana-
log converter circuit. With bit 3
low, the output of the converter
circuit is low, hence Q1 and Q2
are turned off. With bit 3 high, a
voltage is presented to the base
of Q1 , turning it and 02 on. The
exact voltage is determined by
the binary value of bits 0, 1 and
2. The output voltage appearing
at the emitter of Q2 is incre-
mented in eight steps by decre-
menting the binary value of the
four inputs to the 7406 (bits 0-3).
Perhaps the easiest way to
explain this is by saying that
with a value of B, Q1 and Q2 are
off and with a value of 0, they are
full on. Thus, the train is stopped
with a value of 8 and runs at
its fastest speed with a value of
presented to the converter cir-
cuit from the output port. For
values between and 7, the train
runs at a correspondingly
slower speed. The actual voi-
tage is from about 6 V, which is
the lowest voltage that most
HO-scale trains will run at, to
about 11.5 V (assuming a 12 V
supply}.
Software
If you decide to build the TTY
interface board, the following
programs should greatly en-
hance the capabilities of your
computer.
Programs A and B allow the
use of the resident TRS-80 LLIST
and LPRINT commands with a
model 33 (or similar) TTY and the
TTY interface board previously
described.
The TRS-80 is designed to pro-
duce hard copy on a line printer
through a memory mapped I/O
port at address 14312 (37E8H).
The software routines neces-
sary to permit this function are
continued witfiin the BASIC
ROM.
I first thought that 1 would be
able to use these routines by
decoding address 14312 and wir-
ing the UART circuit to it.
However, I found that the ROf^d
routines do not issue a tine feed
command, at the end of a line of
print only a carriage return com-
mand is issued. Obviously the
Radio Shack line printer auto-
matically line feeds whenever it
receives a carriage return. A 33
TTY does not!
With the help of the RSM
monitor I eventually found the
answer.
On power-up initialization a
number of addresses m RAM
are loaded with information
used by the BASIC interpreter.
Two of these addresses 16422
and 16423 (4026H & 4027H) are
loaded with the entry point of
the line printer output rou-
tine— 1421 (0580H). By providing
my own TTY handling routine
and directing the BASIC inter-
preter to it by changing the con-
tents of 16422 and 16423, the
TRS-80 can output to TTY rather
than to the line printer.
Programs A and B do just
that. Program A is the actual
assembly language program
which I produced using the Ra-
dio Shack Editor Assembler. It
generates a line feed whenever
a carriage return is performed. It
also generates a CR and LF
when 64 characters are printed
on any line, thus the hard copy
looks exactly the same as dis-
played on the monitor.
If you have the Editor As-
sembler program, I recommend
producing program A and mak-
ing a tape copy of it. Simply load
it using the system command
and enter a "/". This loads the
pointer addresses 16422 & 16423
and returns to BASIC.
For those who do not have the
Editor Assembler, program B is
provided. This is a BASIC lan-
guage program which POKEs
the machine (or assembly) lan-
guage program into high memo-
ry. Once POKEd, the BASIC pro-
gram can be deleted and the
TTYhandler program will remain
in high memory until power is
removed.
Two versions are shown: one
for 4K and one for 16K. Remem-
ber that whatever method you
use, the memory size must be
102 • 80 Microcomputing. March 1980
MANAGEMENT SYSTEMS SOFTWARE
ANNOUNCES
TWO NEW BUSINESS PROGRAMS FOR THE SMALL BUSINESSMAN
BY
lEROME S. OSTERYOUNC. PH.D.
RENOWNED BUSINESS EDUCATOR AND AUTHOR OF 5 BUSINESS TEXTS
•PROFORMA CASH-FLOW STATEMENT" 'LEASE-PURCHASE DECISION
FORECASTS CASH NEEDS AND LIQUIDITY EVALUATES LEASE VS PURCHASE DECISION
FOR UP TO 12 PERIODS INCORPORATES LATEST TAX IMPLICATIONS
EXTENSIVE DOCUMENTATION WITH EACH PROGRAM
CASSETTE OR DISK
WRITE FOR BROCHURE
MANAGEMENT SYSTEMS SOFTWARE INC.
6200 BRITTANY DHIVE, 1(1006 ST, PETERSBURG FL 33715
(813) 864-4347
1^87
ATTEINTION TRS 80
PROGRAMMERS
Houtton Micro Compuiaf Tvchnologlts. Inc., Ij now
wl Id ting ipwclallly buitnvis appllcatloni pockogci for
tha TKS-SO Mod I ond Mod II. Each month HMCT malls
mo(c thon 2300 n«wil*tiats to indap«nd*ni Kodlo
Shock D«ol«(i ond mIvci Comput»( D*al*ri. All pro-
grami w> rnarkat will b* oft*(*d to th*l« dcoWn ai a
polni-of-sol* packogas.
Chitrloi
'Must badlsh bosad
*Musc ba NEWDOJ (Apparal] Compoltbla
'Must ba copyrlghiad by Individual oi company
submitting progrom
'Must sign a non-ptogadsm ralaasa
*Musl hova complaia documanioilon
NO GENERAL
FINANCIAL PACKAGES, PLEASEI
Koyoltlas oia 15-30% ot nai collaciad ptocaads boiad
on quality and morhat poiantlol.
For further intormation please call (713)
661-2005 arid ask for Gene Atteberry or
Steve Tune or write:
"TRS-ac Is ■ registsrod tridamarh of TANDV CORP."
HOUSTON MICRO-COMPUTER
TECHNOLOGIES, INC.
5313 aiSSONNET
BELLAIRE. TEXAS 77401
(713) 661-2005 ^^13
Let Your TRS-80®
Teach You
ASSEMBLY LANGUAGE
TirEd o( buying book alter book on assembly
language programming and slill nol knowing your
POP (rom your PUSH'
HEN/Ibdft proudly announces a more etd-
cient way. using your own TRS-BCT , to learn the
fundamentals of assembly language programming
-al YOUR pace and at YOUR convenience.
Our unique package. 'INTHDDUCTIQN TO THS-Sir
ASSEMBLY PRGGflAMMING' . will provide you with
the following
• Ten 45-minule lessons on audio cassettes
• A driver program to make your TRS-BCT video
monilor serve as a blackboard (or the instructor
• A display program (or each lesson to provide
illuslralion and reinforcemenl lor what you are
hearing
" A leKlbook on TRS-BO' Assembly Language
Programming
" Step-by-step dissection o( complete and use(ul
routines lo lesl memory and to gam direct control
over the keyboard, video monitor, and printer
• How to access and use powertui routines in your
Level I! POM
This CDurse was developed and recorded by
Joseph E Willis and is based on the successlul
series ol courses he has taught at Meta Technologies
Corporation, the Radio Shach Computer Center, and
other locations in Northern Ohio The minimum
system required is a Level II. 16K RAM
REMASSEM-1 only $69.95
REMsoFT, Inc.
571 E. 185 St
Euclid, Ohio 44119
(216)531-1338
(ncluOe SI 50 lor shipping anfl rianflling '^
Oiiio residerls afld 5'/j% sales tax
TRS-BO' IS a liafletTiark ot ihe Tardy Corp
<
KGS-80
>
KOGYOSHfi
A TRS-80 WORD PROCESSING
SYSTEM FOR LESS THAN $600
(It you own I hM SelertrK" oi equivdieni )
Turn your typewriter and TRS-80 into
a new word processing sy.stem with a
new device, the "KGS-80".
• Plug jn compatible with TRS-80
• No mpchaniral modification to the typc-
writpr
• Can hp installed in S sptonri';
• Software, a versatile Simple Letterwriter. in-
cluded
179 Riveredge Rd. Tenafly NJ 07670 (201) 569-8769 ^'«
DEALtR INQUIRIES INVITED
For Your
TRS-
80
DUAL D1SK-32K
BUSINESS SYSTEM
QUALITY
DTI
PAYROLL
No. 410
DATA TRAIN'S many years
of small business computer
experience in accounting pro-
gram products brings to your
business all of the quality fea-
tures, functions, screen dis-
plays, standard reports, user
designed reports and operator
reference manuals; allowing
you to efficiently manage the
payroll of your company,
• 50 employees per mini-disk.
• Runs in all states.
• You maintain the P/R pro-
duct without programing.
• Flexible, easy to use.
• No maintenence fees.
$235.
Product Info <fi
License/Order
Form.
PHONE
(503) 476-1467
840N.W. 6th STREET, SUITE 3
GRANTS pass; OREGON 97526
Available Soon--
• General Ledger Accounting
• Accounts Payable
• Accounts Receivable
• Fixed Asset Accounting
Trademark Radio Shack, Div Tandy Coip.
p^ Rvatier S»nnce—s»9 page 147
&) Microcomputing, March 1980 • 103
10 REM THIS IS THE 4K VERSION OF A BASIC PROGRAM FOR LOADIMG
3D REM A MACHINE LANGUAGE PROGRAM INTO HIGH MEMORY TO ALLO U
30 REM ';SE OF A TTY WITH LLIST AND LPRINT COMMA-JDS.
40 REM OMCE LOADED* THE TTY HANDLER WILL REMAIN IN MEMORY
50 REM i.rjTIL POWER IS REMOVED* AMD THIS PROGRAM MAY BE ERASED
60 REM MEMORY SIZE MUST BE SET AT 20224 PRIOR TO RUMNING THIS
70 REM PROGRAM. OUTPUT TO THE TTY IS THROUGH PORT 9
90 CLS
100 FOnX=2022ilTO20296
I 1 READY:POKEX*Y
120 NEXT
130 P0KE16526* 0!POKE16527* 79
135 PRINT"TTY HANDLER LOADED"
140 X-MSRCO)
1 50 END
1000 DATA21 1* I 1*33^ 16* 79 *34*38* 64*33*42* 64* 54* 64* 19 5*25*26* 121
10 10 DATA2 54* 13*32*4*20 5*47*79*201*205*38*79*221*126*5*254*0
1020 DATA192* 205*47* 79* 20 1*205* 62* 79* 2 1 1 * 9* 22 1 * 53* 5* 2 1 * 62* 1 3
1030 DATA2 5*3 6* 79* 62* 1 0* 20 5* 38* 79* 22 1 * 54* 5- 64* 20 1 * 245* 2 19*9
I 04 DATA23 0* 1*254* 1 * 32* 248* 24 1 * 20 1
Program B.
Bit
Meaning
Always (TBMT)
1 =
1 DAV (data available)
2 =
1 OV (overrun error)
3 -
1 FE (framing error)
4 =
1 PE (parity error)
Table 1.
lines 1150-1195 can be replaced
by:
1150 AJ^ "TTY ERROR, FAULT CODE":S»
= STBS(S):AJ = AS + S$
1160 PRINT A$:GOSUB1 300
In this case, you must break
down the decimal fault code
given into binary and Table 1
used to determine the error.
set to 20224 for a 4K computer
or 32512 for a 16K computer. If
you use program B take care
when entering the DATA state-
ments. One wrong entry will
probably cause your computer
to get lost which will require a
Power-Off reset to get it back,
which will erase your program
entirely.
Program C. Program C is a
TTY test and demonstration pro-
gram. It initially requests the op-
erator to input the number of
"fox" messages required and
then goes on to output the
number of times requested the
standard TTY test message:
"The quick brown fox jumps
over the lazy dog. 0123456789".
The operator is then prompt-
ed to type a message. Note that
the message is terminated with
a semicolon (;). The typed letters
are displayed on the monitor
screen and are also typed back
on the TTY providing that no er-
ror flags are set.
Thus, if you have a suspect
TTY, the location of the problem
can be determined (i.e., key-
board or printing unit) by using
this program. For example; if the
"fox" message types OK and
1DD0 CLC^R^aO
JDIO I^PUT-« OF nx MESSAGES-;^
1020 TJTl l.0iGr)SIIB133D
I [123 A1--TTY TEST PROGflAM' i GOSUB 1 300
1036 A»-'TKE OUICK BKim FaX JUMPS 3UER THE LAIY DO G. 01 234567B9'
1 010
1035
loao
1 050
IDTO
Idea
1090
1 100
1110
IIZO
1130
1131
1135
1137
1 I5D
1 160
I ITD
1171
1 IBD
usa
11Q0
119S
1 19S
1197
1200
1210
13II0
1310
1320
1330
1340
1350
1360
1370
G1S'JB1300
fEXT
AI""PLEASE TYPE A MESSAGE" i GaSUB130
CLS
Al---
S-IVP(9HS-SA.VD3DlirS-OTKEM109
IFS»ZTHEN1 150
A-I-gPt 10)iOL'T10*0llFA-59THENl 1301REM ) TERMINATES IMPUT
Xl>CHRICA)iAl-A«'XSiPRI;4TIS56f AIiGOT0ia9Q
GOSUB1330
C? 5 UB 1 3
A»-"TTY IMPUT LOOKS OK-PLEASE TYPE AGAIN" i GOSUB 1 300
OQTO 107D
SS-5ISS-SSA.N016I I FSS*> OTHDJ 1 1 BO
SS"SlSS-SSA.'*DBiIFSS<>OTKEfill90
SS-SiS5«SSA.-JD«rIFSS<»(]THE?lll95
GO TO 11 9 7
AI-" PARITY ERROR" rPRlrJTAii GOSUB 130
GO TG 1 1 6 D
a»«"rRAMIMG ERROR" I PRlMTAIi GOSUB 1 30 D
CO TO 1 I 7
Al- "OVERRUN ERR0R"lPni?JTA»iG0SUB13DD
A»-"TYPE AGAI!V"l PRIHTASlOOSLIBlSOII
rORZ-ITDlOOtMEXT
OUTIIjOiGOTOIOBO
FORX-lTOLPI(A»)
CfMIDKAt.Xi n iC-ASCCC>)iG0SUBI36ll
^ext
C-13iGOSirai360
G>1 Oi aOSUSI360
RETURN
S-I!4P(9) t5>SANDllirS-0THEM136n
3UT9.CtRETURM
Program C.
the characters displayed on the
monitor are incorrect, then
obviously the trouble is in the
keyboard or transmitter portion
of the TTY. Of course, the UART
wiring is also checked by this
test.
Line 1090 is a line in a contin-
uous loop monitoring the status
word flags for a change. If a
change in state on any flag ex-
cept the TBMT flag is detected,
line 1100 will determine whether
an error is present with the
received character. If an error
exists, then a transfer will be
made to line 1150, where the par-
ticular error is determined. If no
error has been detected by the
UART, control will drop through
to line 1110, where the received
character is processed.
To save typing and memory.
Conclusion
In addition to the uses already
described, the interface unit has
been used to turn on and off out-
side lighting at Christmastime,
as a telephone dialer and is pre-
sently being used to control
basement lighting in addition to
the climate control system pre-
viously described.
Providing care and patience
are used, even a novice should
be able to build this unit, as no
special tools are required. Once
this unit is built, I am sure that
you will discover that your
TRS-80 is no longer just an "ex-
pensive toy," but rather a useful
addition to your household.
Should you decide to build
the unit and if you have any com-
ments or suggestions, I would
be pleased to hear them. ■
Fig. 6. Model railway speed control.
104 ■ 80 Microcomputmg, March 1980
UTILITY
How to share your video
information with your line printer
LPRINT Routines
Craig Werner
Abington Computing Group
1824 Watson Rd.
Abington PA 19001
Working with the TRS-80
microcomputer and its
companion iine printer presents
many inherent probiems be-
cause, unlike many terminais,
the printer is not directiy con-
nected to the keyboard, so that
data on the video screen wili not
be typed out onto the printer,
and vice versa. There is also the
probiem of the TRS-80 ex-
ecuting an LPRINT statement
when either the printer or the ex-
pansion interface, or both, are
turned off, or when no printer ex-
ists.
In the first two cases, the
computer wiil "lock up," but
ILI
NPUT"L
i_ 1 ',' 1
ILI HH-','\-
H PPlNlfR'.
Vf-. PR rJLl ' "
R*
.-■Li
f- H* = '
Nu"
JHf-N 1
^ 1
itn"i
rt- = T**ttt««
tt#
IIG
PPIN f
THE
■^.RL.E.-:.
TRX t
IN THE
I TEN
I-;" . U'-,
ING i:*, T
l^'W
1^ Q=1
FHFN 1?:0
ELSE
LPR 1 NT
"THE
SHLES
TR;: UN THE
I TEN
1 ■-'■ "
ij:-:
ING rt: T
3ie
PRINT'
THE
T D r HL
r. o-^.r
\9.": U-;
inn C*. r;
14ti
It- U^i
TH(-_N ±■z^li^
EL ---.F.
1. PRINT
" IHE
TiiTRl
~rv^ 1 !■-_.". H
■■irj
J 1
i. 1"
1 5ti
PPINT'
1HF
RMOUN"
h I rJuNll E L-' I
-. " . \l
.irjij it
^
160
IF = 1
THLN 1.7G
El SE
LPRINT
"THE
RMPUrJT
FINRNCEC'
I'^"
U'
. J NG
r*
F
IZti
PRINT'
THE
NONTMl
W PH'Vr-IFNT I
=^". LINING C*
P
i :-:a
IF Q = l
THEN ISmi
ELSE
I RklNt
" T HE
MPNTHL
T- PHVHtNF
IS"
us I UU
L *
P
■1 [F'M
PEM rHFRt
hre -^
MLiP-E
:-.TtHTtNKN 1 S
Example 1.
Repetition of statements
oniy until the respective hard-
ware is turned on. The outcome
of the last case is dependent on
whether the computer is hooked
up to an expansion Interface. If
it is not, then the lock-up can be
broken by simply pressing the
Reset button in back of the key-
board. If an interface is connect-
ed, then the Reset button will
cause a power-up, and the resi-
dent program will be lost.
(However, even though it is lost
it is still retained in memory and
can be accessed by using a re-
covery procedure not to be dis-
cussed here.)
Robbing Peter to Pay Paul
A direct link between the key-
board and the printer is possi-
ble, but only at the expense of
the video display. It Is accom-
plished by POKEing the con-
tents of the printer driver ad-
dresses into the video driver ad-
111 INP
20 IF
lie H*
150 R*
170 H*
L^ij RE
7*0 00 C
7010 P
7020 I
70j:0 L
7040 R
R*
Ur"i.'Li '.'OLI HR'v'E R PPINTER'-.VES OR Nu
Ht="NCi" THErJ y>--x
= "THE SHLES I RX riN I HE ITEM IS":S = T GOSLIB70eiei
=^"THF TQTRL COST IS" S^C GOSIJB,'0GI0
^"THE RMDIJNT FINRNCED IS" S-F GOSUE7O00
= "THE r-IQNTHLV PRVMENT I S" S=P GDSUB7000
M tHFRE HRE y MURE srRTEMENTS
*=*»#««» tttt
RINTRt; USING L». S
F n=l THEN RETURN
PRINT R*. USING C*; S
E TURIJ
Example 2. Use at a printer subroutine.
dresses. These numbers, 141 in
16422 and 5 in 16423. when
POKEd into 16414 and 16415, re-
spectively {i.e., POKE 16414,141:
POKE 16415,5), will cause all
output to go to the line printer.
Nothing will appear on the video
screen. All functions, including
the AUTO and EDIT functions,
will continue to work as before;
however, all keyboard input will
be input blindly, since the input
line will not be printed on the
line printer until ENTER is
pressed.
This technique can also be
used backwards by POKEing
the video commands into the
printer addresses (POKE
16422,88 : POKE 16423,4). This
will cause all LPRINTs to be
printed on the video and ignored
by the printer, becoming tor all
intents and purposes, PRINTs.
It is useful in testing a program
containing LPRINTs for text er-
rors and formatting without us-
&) Microcomputing, March 1980 • 10S
ing paper or even the printer.
Duplication and Some
Alternatives
In most cases, however, it is
desired to have output to both
the video and the line printer
concurrently. The simpiest way
to do this is to type the line
twice— once with PRINT, the
other with LPRINT, as in Exam-
ple 1. This is the most obvious
approach, but it is a terrible
waste of time and memory,
especially with conditional
LPRINTs and many statements,
as in the example. With a four
line subroutine, all duplication
can be avoided, as in Example 2.
In this particular instance, the
modification saved 700 bytes.
Another alternative to dupli-
cation is direct conversion of all
PRINTS to LPRINTs. The com-
mand code for PRINT is 178,
while the LPRINT code is 175. To
change all PRINTS to LPRINTs,
use the command in Example 3.
While this command is de-
signed to be used in the direct
mode, it is easily adaptable to
the programming mode. To re-
verse the process and go from
LPRINT to PRINT use the com-
mand in Example 4.
These two commands are
complex for a reason. They will
change only PRINT and LPRINT
statements and will leave all
programs pointers, line
numbers, GOTOs, GOSUBs and
variables untouched, and will
automatically end at the end of
the resident program if the pro-
gram is less than 16K.
A More Viable Solution
These routines are useful, but
in practice the most useful
method of outputting to the line-
printer is by PEEKing the video
display memory addresses and
outputting the information to
the line printer. )t is useful in
that it retains the format of the
screen and will support PRINT
@s and near graphics, which
are normally ignored.
For best results, the subrou-
tine should be called after the
screen is filled and all inputs are
entered. It is also necessary to
CLEAR 150 bytes of memory for
string manipulation.
The Screen Printer subroutine
is found in Example 5. It is
ideal for a sample run of a pro-
gram, and could be called every
time the screen is filled. It would
type out every character in its
place, including graphics.
Lines 20000 and 201 15 make it
possible to control access to the
subroutine. Because of those
lines, if the line printer is either
initially off or is turned off dur-
ing execution, the program will
RETURN and continue execu-
tion and will not lock-up. (The
address 14312, the line printer
address, will store a 255 when
the line printer's power is off, a
223 when its power is on but its
motor switch Is off, a 191 when
its I/O buffer is partially full and
a 63 when it is ready to receive
instructions.)
The routine need not be typed
in with the program, nor need It
remain an intrinsic part of the
program, although it could.
Rather, it can be written with
high line numbers (20000 or
30000), stored on a separate
tapeand Appended to the end of
the resident program.
To Append: Print the PEEK of
16633 for the LSB of the End-of-
Program pointer and the PEEK
of 16634 for the MSB, then sub-
FOR N = 171?e TO 3Z76fa if PEEK(M-0 AND PEEKiN . = AND PbEKlN -t 2j -
THEN END ELSE IF PEEKiNi = THEN N - N t 4 NEXT ELSE IF PEEK(N) =^ 1 ?B THEN
POKEN.175 NEXT ELSENE?!T
Example 3.
20000 IF PEEK'.1431.S:j<>63 THtN RETURt-J
20010 LPRINT sTRlMG*<.e4, " + ">
20020 FOR rJ=l^:-;60TO16T:83: STEP €4
20030 q=peek<n:i
2o040 if q.> = 127 rnd q<: = 191 then q = 42
200?0 R* = i::HR*':.Ql
200^0 FOP Q = l TCife.:-^:
^■0U",'ti :j = Pbt»: '.r-i+CJ''
20080 IF Z:- = 127 RND Z< = 191 THEN Z^42
20090 e*=C:HR*(:Z,~'
20100 Rt=R*+B*
20110 NEXT Q
aOll-? IF PEEK ( 14312 -iOf^STHEN RETURN
2012O LPRINT'' ■':LPRIHT H*
20iZ!:0 ne;-:t n
20140 LPRINT STRING*' e4. "-^" ■>
20f=.t' FHR N = 1TD3 LPR I N ) " "NEXT
20160 RETURN
Example 5. Screen Printer subroutine.
.-"I0k10
rJl=PFFK' 1641 r ■*2'-".f-".--' •■.4<-pu::.':.0"' >4PEEK (. 1641tiJ
.-■ 1 Mill
r J. -' = Nit- -.-.?■
21 020
R = PFFV. ■ NJ ■ IF R:-^=^12r RNO R-^-ll^*! 1 MFN R-4;'
^■10^0
Ri^LHRt ' H 1
.■J 040
N1=^N1 + 1 I^LIP H^rJl "ID fJ,'
."'1050
P = Pb:F-» M=l > IF h. =1117 RrJL' R --l--<i THFfJ F:--4^'
210lS0
Bf^CHPt ' P • Ht^Hl+Pr
2_1_0,'^0
N(:;-:t m
.:.' 1 n;r;u
L F-h IfV 1 H*
2 10'='0
RETURN
Example 6. Single line Screen Printer subroutine.
FOR N - WI2d TO 32/68 !F PEEKINi-O AND PEEKiN • 1i = AND PEEKIN
- 21-U
THEN END ELSE IF PEEKiNi - THEN N - N . a NEXT ELSE IF PEEK'N) _ VE
THEN
POKE H 178 NEKT ELSE NEXT
Example 4.
tract two from the LSB (unless
the LSB is or 1 , in which case
subtract one from the MSB and
add 254 to the LSB). Take the
new LSB and MSB and POKE
16548, LSB : POKE 16549, MSB.
Then load the subroutine using
CLOAD, and POKE 16548,233
(186 if a Disk is attached) : POKE
16549,66 (104 with a disk sys-
tem), then type in CLEAR:RE-
STORE, and the program is
ready to run.
After Appending, add all nec-
essary GOSUBs. One additional
tip is helpful — choose uncom-
mon variables in the subroutine
(AZ,ZQ,Q9, etc) SO that they can
be Appended indiscriminately
without fear of conflicting with
program variables.
A similar routine for output-
ting a certain N number of lines
can also be used (see Example
6). As is, the routine will LPRINT
only the entire previous line. To
LPRINT more than one line,
simply add 64 for each addi-
tional line to be LPRINTed to the
second term of line 21000
(64 + POS(0)) and to line 21010
N2 = N1-i-63. For example, if
three lines were to be LPRINTed,
the above lines would read
(192-*- POS(O)) and N2 =
N1 +191, respectively.
To make it completely gen-
eral, with the value of N to be IN-
PUT, the above lines could be
changed lo (64'N -t- POS(O)) and
N2^N1 +64*N - 1, respective-
ly. It works because the memory
locations 16416 and 16417
return the current cursor posi-
tion, and the POS(O) term returns
the cursor, as far as the program
is concerned, to the beginning
of the line, so it need not be
reset.
This remains an incomplete
list of printer applications;
however, we have found that
these five routines form a useful
and, in fact, almost indis-
pensable advantage when work-
ing with the line printer. These
routines could be extended into
a text editor in BASIC, using the
IN KEY function to type a text on-
to the screen and then using
either a shifted key or the
ENTER key (which returns an
ASCII 10) to branch to the
Screen printer subroutine and
output the text to the printer.
Further applications are limited
only by the imagination of the
programmer. (Note: I would like
to thank Jeff Eisen, Gene Fred
Wieland and Robin Salmansohn
106 • 80 Microcomputing, March 1980
: 1 N 1 kul-'UL 1 Nb
: 1 |_4i— i f^"—, — i~;8--s f-=|i i
T"|- l-n li iK.
: fl MONTHLV JOURNHL FOR RLL
TRS-S0 USERS :
WITH THESE EXCITING FEATURES AND DEPARTMENTS: (AND MOREII)
• • SCIENTIFIC SOFTWARE
'GAMES :
; -LETTERS TO THE EDITOR
•PUZZLES :
* PRACTICAL APPLICATIONS
'CONTESTS
' ENTERTAINMENT PROGRAMS
•GAMBLING ;
: 'WORD PROCESSING SYSTEMS
•NEW PRODUCTS '.
•ARTIFICIAL INTELLIGENCE
'TRS-80 CLUB NEWS
: * SYSTEM UTILITY SOFTWARE
'PERSONAL FINANCE ;
: 'RADIO SHACK NEWS RELEASES
'SOFTWARE EXCHANGE \
'DATA BASE MANAGEMENT SYSTEMS
'BUSINESS SOFTWARE
: • EDUCATIONAL AND CAI PROGRAMMING
•SORTING TECHNIQUES :
: • SIMULATIONS AND COMPUTER MODELING
•FREE CLASSIFIED ADS '.
'GRAPHICS AND ANIMATION TECHNIQUES
•PRODUCT EVALUATIONS
: ' ASSEMBLY LANGUAGE PROGRAMMING LESSONS
•ARTICLES ON HARDWARE
: 'LEVEL 1, 11. AND DISK BASIC PROGRAMMING LESSONS
• 'OPERATING SYSTEMS. LANGUAGES AND COMPILER DESIGN ; |
: 'PROGRAM LISTINGS (UP TO 24 PAGES IN EVERY ISSUEI!)
\
! 'ARTICLES DEALING WITH UNUSUAL AND INTERESTING USES '■ \
; FOR YOUR TRS-80
:
I TRSW is a tradomarti of ir>e Radro Shacti Division ol Tandy Corporatfon. . 1
: T ME^ rr<!^- tz>0 r^O r £=£0001^:: >-"
: R.D. #3
NAZARETH, PA. 1 8064
■ NAMF
ADHRFSS 1:
STARTING APKIL. 1980
1 YFAR 5;iin<;rRIPT10N- tl4 3 YEAR SUBSCRIPTION:
%^fi
7 YFAR <;nR<;rRrPTinN- ^7fi SAMPLE COPY: S2
AIR MAIl 44
CANADA/MEXICO: ADD $3/YEAR FOREIGN: ADD S 1 2/YEAR
^ R,,def s*ry.ce^^e€ page 147 80 Microcomputing. March 1980 - 107
for their various contributions
along the way.)
Addendum
Since I did my original re-
search on this topic, a few devel
opments have changed certain
data found in this article. These
changes fall into two cate-
gories.
1) When I researched the arti-
cle TRSDOS 2.1 was the only
Disk Operating System avail-
able. Since then Radio Shack
has introduced TRSDOS 2.2 and
TRSDOS 2.3 and they have been
widely distributed. Because of
memory allocation, the begin
ning of a BASIC program is not
always found at 17129 as in Lev-
eeiie
. PTLPCV PRINT
TO LPRINT COMVERSION
will
. TO CMflHGE TO
.PTPCV LPBIHT TO P*INT CONVERSION
eeii;^
. cnnNGE crccK
(Lire 2961 TO -CP 17T BW
oem
,CHPHC£ SMI TO
(LINE 33»> TO -LD 11X>.1?8'
[)[>^;f<H44t
eeise
LD IX, I40A4HJ
.eeoirMiNQ of basic
[>D2B
aei30
DEC IX
M>7C8e
aeiaa stspt
LD n <ix>
0C7Eei
eeise
LC' H- ' IX*li
ddteb;
00160
Lc ft. <iy»;>
FEM
eei70
cp e
TEST FOB END OF PROGPfln
cni9ifl
aeisa
JP Z Ifll^H
■ BfCK TO BASIC
ODTEM
eei?e
LD fl <!>:'
ftae
Mise
CP a
.TEST FC* POINTER
2oec
ee^ie
JS t*2. OCCV
MiFa
ee^M
PUSH IX
.EXCMHNQE PEGlSTEftE
El
00230
POP HL
eie^ee
W2*e
Lf BC,5
, SKIP POIHTERS
*3
9es50
M>0 HL.BC
E^
ae^ee
PUSH ►*.
Dt'El
iD0;7«i
POP IX
. suftp ewk
13C'F
m::so
.IP STt»I
fee;
aej96 CHEc*
CP 178
.OtCK FOR PPIHT
;se4
eeiee
JB Z. SWITCH
M>;-:;
eesie
IHC IX
1307
ae:i»
JR START
D[i3eeoni
ee^ie switch
LD aX!. 175
. Ct<«NliE TO LPBINT
(■o;'3
Ml^dQ
INC IX
13CF
Mise
JR STBRT
88368
Ere
Example 7.
el II BASIC. This affects AP-
PENDing instructions and the
PRINT to LPRINT conversion
routine.
The values in question are
stilt stored in addresses 16633
and 16634 and should be
PEEKed for each individual ver-
sion. Values for TRSDOS 2.1 are
found in this article, and the
value for TRSDOS 2.2 and 2.3 are
36 and 106 respectively. It is a
purely academic point, however,
since TRSDOS 2.2 and 2.3 each
have APPENDing instructions
built in. Still, manual appending
is handy to have when a full disk
prevents the user from SAVEing
a disk program in the TXT mode.
The change in the beginning
of the program also affects the
PRINT to LPRINT conversion. To
use the BASIC conversion pro-
gram contained in the article, it
is necessary to change the be-
ginning address of the FOR-
NEXT loop to 26809 for use with
TRSDOS 2.1 and 27171 for use
with TRSDOS 2.3.
Another problem is the expan-
sion of memory usually associ-
ated with a disk system. BASIC
is either too slow or incapable of
changing all addresses in such
a system. The following ma-
chine language code is identical
in function to Example 3 and
accomplishes the same task
about 50 times faster. It can be
accessed via the system com-
mand in Level II BASIC, and the
CMD'T', "filespec" mode in BA-
SIC. IN 2.1 it should be loaded in-
to high memory before entering
BASIC and then accessed as a
USR routine. My designated file
name for LPRINT to PRINT con-
version is LPTPCV/CMD and for
PRINT to LPRINT is PTLPCV/
Cf^D-
2) Not all printers, particularly
the newer models, enter the
same data in the driver address
at 14312 when the Print Inhibit
Switch is turned off. It will not
affect the Screen Printer Sub-
routine in this article as 63 still
designates ready to go and 255
still designates that the power is
off, but depending upon the
printer, certain signals in other
states will change. ■
TRS-SO PROFESSIONAL ACCOUNT-
ING AND BUSINESS SOFTWARE
General ledger, accounts payable,
accounts receivable, payroll.
Used and supported by our
accounting office and programers.
This Turnkey System will put your
TRS-dO in the professional business
computer category I
G/L: 200+ Accts, 1700+ trans per
month, auto verify while posting,
randome files, cash journal, auto DR
CR entry, complete audit trails, mini
report generator, plus more
Payroll: Auto pay CALC, complete
audit trails, auto tax W/H. after the fact
posting, journals, check writing. W*2'5,
941 5. insurance reports, absentee
reports, plus more A/R and A/P:
statements, extensive invoice/CR
Memo/DR memo files, integrates with
G/L on three disk system, check
writing, audit trails etc.. plus much
more
PER PROGRAM $»0.00/PACKAGE
$299.00 (PLUS SHIPPING).
To order or lor more information call or
write to Full Service Accounting and
Processing P O Box 2366 Springfield.
VA 22152. Between 9:00 am and 5.00
pm est. (703) 573-7301. Call or write
now. VtSA/Master Charge Accepted.
TRS-80©
TAPE DIGITIZER
Used by the
l.S. Coast
Guard and
U.S. Navy
-ELIMINATES CASSETTE
LOAOMO AND COP VINO
PROBLEMS EVEN
-SYSTEM' TAPES!
-MAKES TAPE PnOOHAM
LOADtNa piiactk:alit in
DEPENDENT OF VOLUME
CONTROL SrmNQ!
'HAKES PERFECT COPIES
OF ANT TAPE WOITALLT
WITHOUT USmO COM-
PUTER, OKUTIZED TO EX
ACT REPLICA OF TN«ri
StONAt. WHILE REHOVIHO
HUM, NOtSC AND OTHER
MINOR DROPOUTS
-AC POWERED NO UT
TERIES CASSFTTE SWITCH
ALLOWS MANUAL OR COM
PUTEH CONTROL OF CAS-
SETTE RECORDER
'FEED rOUR CASSETTE TO
THE TAPE DtamZER AND
FEED VOUR COWPUTER
THE EXACT DKIITAL
WAVEFORM THE TRS40
GAVE TO THE TAI^ WHILE
MAHMO A COPT AT THE
SAME TIME'
-THE TAPE DKUTIZER IS
COMPLETELY COMPATIBLE
WITH LEVEL I AND II
1^124
*LSO .\yAILABLt tHIHOtT
244taurphon«
(T07)M7-723r
IBM SELECTRIC I/O PRINTER.
'
OS^^'il
TRS-80®
DIRECT INTERFACE
$795.00
# cleaned and Functionally
Checked IBM I/O Terininal
• ASC M, Parallel
• Service and Parts Manuals
• 3 to 4 weeks Delivery
• Heavy Duty Packing $25.00
• Shipping Collect
• Cashier Check, Money Order
N^
McClain & Associates. Inc.
5104 E. 65lh Street
Indianapolis, Indiana 46220
(317)842-0526
108 • 80 Microcomputing, March 1980
Software for the 80' s
Enter the world ol "80" programs from Instant Software. A world where
you and your TRS-80 can rule duchies, play poker, learn speed reading, ex-
plore caves, design antennas, launch rockets, or simply pay your bills.
Final
Frontier
SPACE Tft£K II ProiKi t^• quadrtnl from
ttt« irtvsdt'^ Klirgon Msrarnpft Tht EfiMt-
prist '9 VQW'PPM wiin DtMiwt, ptolofi
torpcdOM, im()u>M pow«r, and WMp anra
tr* you aJona and y«ur TRS«0 Lflira< I «K
Lev«t II 16K •oainat tn» •nvmy OftfH No.
0OO2N 17.98
SPACE TRCK IN \M yoiKMlf so to fht Iv
•ndi o< Itw sdw tytlwri-and bvyond
TN» ptckae* ineiudM
••hiIv Wan - StKWl down ih« Tk* lightart
•nd (MtKov it>* Death S^»r
■Wanataty Latidar - Land youf tpaoacrart
and plant your Hag ac ros^ ine solar ayslam
Tfwfts on»-pi«vt' gan^as r«au>ft ■ TRS-N
L««al I 4K Oitfar Ho. DOaiR STJS.
SPACE TNCK IV Tfada or nage Mat on a
pianalarr scai« TM> packaoe <nclucMa:
•Slatlaf Wan-Engaga and dMtroy Tto
ti||t)t«rs m your attack or iha Oaatti Siar
Fof on«|»Uy«f
•^•^IMlaN Slmalatlaa - A iwopiayar
gam* nrhata you control tha aconomy of
two noi0nboi'ng ptaneti
Vou dacida. gtrna or Owilat. wllh your
TRSaOLavaill leK Ot«arHo.lxa4llt7.N.
RAMAOM PATROLniE FMHTEAfKUNO
ON CAPTUnc Duch noQara navcr had >t ao
900a Ergaga tn axlralarraatrial warfar*
*ith;
•Ramrem Pakol - Oaslroy \hm Ramrom
sMpe b«<o«a inay caplura you
•T>a Fkglilar -Daatroy th« anamy Ti«
hghtar* arwi bacoma a '^arool ttw raMliMri.
• KHneoA Captaira - You ntit** capturt tna
Klingor' shif <rlacl M't you and yoor
TRS-«0 Lava' <l t6K batixng acroat irta
galajiy Onlar Ha 009sn tr JL
iASIC AHO INTERyEOlATE LUNAR
LAHDCR Bring your Iwda* In undar manual
corlrol Tha t)aa>c «araio« it for twglnrwra,
Vm inlarmadiat* varaMri i» mora ditncun.
«Nth a cnotoa ol landing araaa and ' uggad
tarraln. For ona ptayar wnh a Tnsao Laval i
4K Lava> II IBK Ordar No. OOOIR %TM
Technical Data
HAM PACKAOEI This versatile package tets you
solve many of the problems commonly encoun-
tered in electronics design. With your Level I 4K
or Level II 16K TRS-80, you have a choice ot:
•Basic Elactronlcs with Voltage Divider -Solve
problems Involvmg Ohm's Law, voltage dividers,
and RC time constants.
•DIpola and Vagi Antennas - Design antennas
easily, without tedious calculations.
This IS the perfect package tor any ham or techni-
cian. Order No. 0007R $7.95.
ELECTRONICS I This package will not only cal-
culate the component values for you. but will
also draw a schematic diagram. You'll need a
TRS-80 Level I 4K. Level II 16K to use:
•Tunad Circuits and Coll Winding -Design
tuned circuits without resorting to cumbersome
tables and calculations.
>5S5 TImar Circuits — OuicKly design astable or
monoslable liming circuits using this popular IC.
■LM 381 Praamp Daalgn - Design IC preamps
witti this low-noise integrated circuit.
This package will reduce your designing time
and let you build those circuits fast. Ordar No.
0008R S7.es.
&J^
Educational
Games and
Simulations
AIR FLIGHT SIMULATION Turn your TRS^SO into
an airplane. You can practice takeoffs and land
ings with tt>e benefit of full instrumentation. This
one-player simulation requires a TRS-80 Level I
4K. Level II 16K Ordar No- M17R $7.95.
SANTA PARAVIA AND FlUMACCIO Become the
ruler of a medieval city-state as you struggie to
create a kingdom. Up to six players can compete
to see who will become the King or Queers first.
This program requires a TRS-80 Level I or II 1BK.
Ordar No. D043R $7.95-
OIL TYCOON Avoid oil spills, blowouts and dry
wells as you battle to become the world's richest
oil tycoon. Two players become the owners ot
competing oil companies as they search for oil
and control theif companies. Requires a THS-80
4K Level I or II Ordar No. 0023R $7.95.
DOODLES AND DISPLAYS II Wait until your
children get hold of this package:
■Of>od)a Pad -Draw pictures and save them on
cassette tapes.
•Symmatrlcs - An electric kaleidoscope that
changes Irom black to white and back again It's
almost hypnoticl
■Drawing — Like Doodle Pad, but for the senous
artist. Over 40 user commands!
•Random Paltam Display — The computer does
the drawing, but those with itchy fingers can
tamper.
•Mathcurvas - Bring those geometry lessons 1o
life. Six different geometrical curves on the
screen of your TRS-80.
• Rugpattams- Yes, II does design rug patterns;
and with a choice of user or computer control, it
can do a whole lot more.
For the Level II 16K TRS-SO. Ordar No. MH2R
$7.95.
WHO-DUN-IT? Criminal elements have com-
mitted five dastardly crimes. As the investigating
detective, you musi solve Ihem.
You can compete against either Detective
Nybbles, a computerized sleuth, or up to lour
other human detectives Requires a TRSW Level
II 16K.
•Deduction -Guess the order of tour symbols
out of SIX or seven different ones To make things
even more complicated, you can let the computer
repeat symbols and have a range ot 2401 possi-
bilities You II need a TRS-80 Level II 4K. Ordar
No. 0047R $7.95.
^ Aaactor Senr/cc—se* pmgm 147
BO Microcomputing, March 1980 • 109
GAMES
CARDS This one-player package will let you play
cards witn your TRS-80- talk about a poker face!
• Draw irKl Stud Pokw- These two programs will
keep your game sharp.
•No-Tmmp Bridg* - Play this popular game with
your computer and develop your strategy.
This package's name says it all. Requires a
TRS-80 Level II 16K. Ord«r No. 00«3R S7.95.
BEGINNER'S BACKGAMMON/KENO Why sit
a1or>e when you can play these fascinating
games with your TRS-80?
■Backgammon — Play against the computer.
Your TRS-80 will give you a steady, challenging
game that's sure to sharpen your skills.
■K*no — Enjoy this popular l^s Vegas gambling
game. Guess the right numbers and win big
You M need a TRS-80 Level I or II. Onl*r No. 0004R
^$7.95.
CAR RACeRAT TRAPfANTI AIRCRAFT Enjoy
these ctiallenging, fun-filled programs:
•Car Race — You and a friend can race on ■
choice of two tracks.
•RalTrap — Trap the ral in his maze with your two
cats. For one player.
•Antiaircraft -Aim and shoot down the enemy
airplane. Requires Level I 4K TRSW. Ordw Na
0011R$7.S5.
DESTROY ALL SUBS/GUNBOATSJBOMBER This
package of three programs is fun for the whole
family. Included are:
•Destroy All Subs — Hunt down enemy subs
while avoiding mirws and torpedoes. A one-
player game.
•Qurtboats - Try to blow the enemy's ship out of
the water. For one or two players.
•Bomber-Caretully release your bomb to
destroy the moving sutmiarirw. A one-player
game.
To enjoy these programs, you'll need a TRS-80
Level I 4K. Order No. 0021 R $7.95.
BOWLING Let your TRS-60 set up the pins and
keep score. One player can pick up spares and
get strikes. For the TRS-80 Level I 4K. Level II
16K. Order No. 0033R $7.S5.
QOLF/CROSS-OUT Have fun with these exciting
one-player games. Included are:
•Golf- You won't need a mashie or putter — or a
caddie, for that matter — to enjoy a challenging
t8 holes.
•Crote-Out- Remove all t>tjt the center peg in
this puzzle, and your nelghtxKs will call you a
genius.
You'll need a TR&80 Level 1 4K, Level II 16K
Order No. ODOSR S7.95.
Utilities
Education
VIDEO SPEED-READING TRAINER You can in-
crease your reading speed and comprehension
with this package. It uses the principle of the
lachisloscope, a device that leaches by display-
ing images for a fraction of a second. This pro-
gram can train you to recognize words and
phrases quickly, so that your everyday reading
becomes an uninterrupted process To increase
your throughput, you'll need a Level II 16K, Order
No. 0100R »7.95.
MUSIC MASTER lets you compose music, play
your keyboard as if it were a piano, and experi-
ment with programming to produce music suited
to your taste. This package includes:
•Micro Orgar>-The program will let you play
flats and sharps to imitate Ihe sounds of an
organ, a harpsichord, or a piano.
•Kaleidopy — Now you can have a computerized
"player piano." Generate a symmetrical graphics
pattern and then see it transformed into music.
•Composer- EKpenmenl with computer-gen
eraied music. This program allows you to select
tfie length of the piece, the scale it will be played
in, and the tempo,
•Keymania - This game will test not only your
memory, but your musical ear. They may laugh
when you sit down at the keyboard of your com-
puter, but not after they hear what the Music
Master package can do. All you will need is a
TnS-80 Level II 4K. Order No. OOMR. $7.95.
TYPING TEACHER This complete seven-part
package takes you all the way from initial
familiarization with the keys, through typmg
words and phrases, to complete mastery of the
keytx)ard. Your computer can even t>ecorT>e a tx)t'
tomless page for typing practice. It requires a
TRS-eO Level 1 4K or Level II 16K, Ordtr No. 0099R
$7.95,
TEACHER
What do you need to learn? Would you like to
know all ot the cranial nerves? Electronic color
codes? Civil War Ijattles? Signs of the zodiac?
Whatever your subject matter, the Teacher pack-
age can help you learn it. You simply input up to
twenty questions and answers at one time. Next,
review the material, and then lake the test until
you have your lesson down pat The program
gives you up to three hints per question and even
offers graphic rewards for children, all at your
discretion. All the information can be saved on
cassette tape (or reuse.
This package also contains the Teacher Data
Transfer program, which allows you to combine
several tests on one tape. That means you can
learn a number of lessons sequentially witfK>ut
changing tapes.
Teacher is an effective instrument for anyone
who needs to learn a lot of material in the short-
est possible time. For decades leading educa-
tors and computer scientists alike have been pro-
rrwting the future role of computers in education
Now you and your family can reap the benefits of
computer assisted instruction in your own home.
The program is furnished with a blank data cas-
sette tape. You'll need a TRS-80 Level II 16K,
Order No. 006SR S9.95.
GRADE BOOK Teachers, now you can use the
speed and accuracy of the TRS-80 to help you
TRS-80 UTILITY I Ever wonder how some
programmers give their programs that pro-
fessional look? Instant Software has the
answer with the TRS-80 Utility I package. In-
cluded are:
•RENUM — Now you can easily renumber
any Level II program to make room for
modification or to clean up the listing.
• DUPLIK — This program will let you
duplicate any BASIC, assembler, or ma
chine-language program, verify tfve data.
and record the program on tape. You can
even do Level I programs on a Level II ma-
chine. For the TRS-80 Level II 16K. Order
No. 0081RS7.95.
TRS-80 UTILITY II Let Instant Software
change the drudgery of editing your pro-
grams into a quick, easy job. Included in
this package are:
•CFETCH- Search through any Level II
program tape and get the file names for all
the programs You can also n^rge BASIC
programs with consecutive line numbers
into one program
•CWRITE - Combine subroutines that work
in different memory locations into one pro-
gram. This works with BASIC or machine-
language programs and gives you a general
checksum.
This package is just the thing for your
TRS-80 Level II 16K. Order No. 0076R S7.95.
calculate student grades. Just type In the grades
for tests, quizzes, homework, classwork. or
special projects. The Grade Book program will
calculate and display individual grade averages.
The program permits you to weigh student per-
formance scores and convert raw score totals to
a 100-points-equals-perfect-score basis.
You can also average students' quarterly
grades with grades tor the previous quarter,
semester, and final exam to obtain an average
grade for the year
When grading time comes around, don't chain
yourself to a calculator. Go modern with the
Grade Book package. It requires a TRS-80 Level I
4K or Level II 16K. Order No. 0060R $7.95.
WORDWATCH This package combines four dif-
ferent programs to entertain and educate.
•Word Raea- Here's a game for two would-be
Grand Prix drivers who can define words ac-
curately. The more you get right, the closer you
come to the checkered flag.
•Hid* N Spell -First you must find the miss-
pelled word, then correct it. The faster you find It.
the higher your score will be.
•Spelling Bee-This program is unique In that
the student types back a spelling word in re-
sponse to hearing it from your tape recorder. If
the response is incorrect, hints and clues are
given. Review up to 40 words in each session.
•Spelling Tutor— Load a spelling lesson, then sit
back ar>d observe as the computer does the rest.
For variation the words are presented in different
fashions, including reverse-order, with letters
missing, and with altered letters.
There you have it; Wordplay x four = Word-
watch.
Requires a TRS-80 Level II 16K- Ordw No. 0111R
$7.95.
110 • 80 Microcomputing, March 19B0
Scannod by Ira Goldklang - www.trs 80, com
EH .0^
■\-\
<;v --.^^--x —
Business
FINANCIAL ASSISTANT Compute the figures for
a wide variety of business needs Included are:
■D«pr»clatlon — This program lets you figure
depreciation on equipment m live different ways.
■Loan Amortization Schedule -Merely enter a
tew essential factors, and your TRS-80 will
display a complete breakdown of all costs and
schedules of payment for any loan.
• Financier — This program performs thirteen
common rinanciai calculations. Easily handles
caiculations on investments, depreciation, and
loans
•1% Foracsstlng-Use tnis simple program to
torecasi sales, expenses, or any other histofical
data series
All you need is a TRS-dO Level II 16K Order No.
0D72fl $7.85.
BOWLING LEAGUE STATISTICS SYSTEM This
package is the answer to the prayers ol harried
bowling league scorekeepers The Bowling
League Statistics System will keep a computer-
ized list of league data, team data, and data for
each bowler. It is extremely flexible and has a
total of 16 different options to let you modify the
program to suit your league's rules. The program
is very easy to use and has extensive "butlt-in"
aids to help you along. Requires TRS-80 Level II
16K- Ordw No. 0058R $24.95.
BUSINESS PACKAGE I Keep the books for a
small business with your TR5-80 Level I 4K. The
SIX programs included are.
•Gerteral Inlonnation-The instructions tof us-
ing the package.
Home
and Personal
\>^^
■:
m
HOUSEHOLD ACCOUNTANT Let your
TRS-80 help you out with many of your daily
household calculations. Save time and
money with these fine programs:
■Budget snd Exponte Analysis — You can
change budgeting into a more pleasant job
with this program With nine sections tor in-
come arKl expenses and tt>e option tor one-
and three-nwnth review or year totals, you
can see where your money is going.
■Ufa Insureneo Cost Comparison - Com-
pare the costs ol various life insurance
policies. Find out the difference in price
between term and whole lite. This program
can store arxl display up to six different
results.
All you need is TRS-80 Level II 16K. Ordw
No. 0069R S7.85.
PERSONAL FINANCE I Let your TRS-80
handle all the tedious details the next time
you figure your finar>ces:
•Personal Flnanco I -With this program
you can control your incoming and outgo-
ing expenses.
•Checkbook -Your TRS-W can baiaiy»
your checkbook and keep a detailed list of
expenses for tax time
This handy financial control for the home
requires only a TRS40 Level 1 4K. Order No.
0027n $7.95.
STATUS OF HOMESJAUTO EXPENSES Two
long awaited programs that have got to
save you money at work or in the home:
•Status of Homes -This program will allow
you to keep track of all the expenses in-
volved in building one house or an entire
sutxjivision.
■Auto Expenses -Find out exactly what it
costs you to drive your car or truck.
These programs require a TRS-80 Level 1 4K.
Order No. 001 2R S7.95.
•Fixed Asset Conlrot — This will give you a list of
your fixed assets and term depreciation
•Detail Input — This program lets you create arKl
record your general ledger on tape for fast ac-
cess
•Month and Year to Dale Merge -This program
wilt take your monthly kedger data arxj give you a
year to date ledger
•Profit end Loss -With this program you can
quickly get trial balance and protit-and-loss
statements.
■Veer-End Balance-This program will combine
all your data from the profit-and-loss statements
into a year-end balance sheet.
With this package, you can make your TRS^ a
working partner. Order No. 001 3R $29.95.
BUSINESS PACKAGE III This package can
change your TRS-80 into a full working partner
for any businessman:
■Inventory-Maintain a computer-based inven-
tory for a constant inventory system.
•Commissions and Percentages - Let your corrv
puter figure out markup and discount calcula-
tions, sales tax and ntore This is a perfect time-
saving package for any small business
For the TRS-80 Level I 4K. Order No- 0061 R $7.95.
BUSINESS PACKAGE IV This package can help
any businessman get the right information tor
those critical decisions.
■BuslrwsB Cycle Analysis- This program can
plot the expansion and contraction cycles of any
aspect of your business. You'll see in black ar>d
white |usl what's happening
■Financial Analysis -Now you can get the
figures for any type of annuity, sinking fund, or
mortgage, and compute the yield and value for
bonds.
The package includes a blank data tape and re-
quires a TRS-80 Level I 4K or Level II 16K. Order
No, 0019R$9.95.
'A Irademark ol Tandy Corporalion
SEE INSIDE BACK COVER FOR LIST OF DEALERS NEAR YOU.
Order Your
Instant Software
today!
It ttw stora rwarBst you dovs not stock Instant SoMtware.
us* this order blank to purchase your softtware
directly, or call Toll-Free 1-800-25a-5473.
Name
Addmt.
City
Zip
Oicck ~ Monry Ortkr
CradHcardf
SIgnMwc
OuHtllft
CMtNo.
P'Ofl-KT. n.m.
Unil Call
Torn cm
Sfl-PPMlfl
HOD
Mailt«
>:
TlMVaitfV
[i^i 6ate
Insta nt Softw ae- ■"
PeterbOfOugn NH 0345flUSA [>pt 70C0
*^ Reader Service— see page 147
80 Microcomputing, March 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 so on.
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 loo!)
• Does not void any Radio Shack warranties
Requirements:
• Level II t}asic
• And a little /mag/naf/on."
For fast real time programming it is your lowest
cost peripheral at *19.*
Announcing
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 6 more com-
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 5 other commands Perfect for
you lightware authors and NEW light pen owners
too! only >14.»5
(COUPON)
Micro Matrix
P.O. Box 938 • Pacifica. CA 94044
Send for yours NOW: (415)355-4635
Name ^
Address
City __
Zip -
St..
Photopoint
n $19.95
Pen Basic
LJ $14.95
Card#
Ex.
Date_
Money
CK. Order Visa MC
INTELLIGENT
TERMINAL SOFTWARE
WITH FULL
PAGING CAPABILITIES
• CASSEHE AND DISK VERSION •
Z80 ASSEMBLY LANGUAGE PfJOGRAI^ GIVES
YOUR COfVlPUTER THESE FEATURES.
• Line Scroll Up/Scroll Dov/n
• Page Up/ Page Down
• Screentock Top arid Bottom
• Full Cursor Control
• N^emory Buffer Overflow Protection
• Automatic Right Justification
• Automatic Formatting
• Fuil/Holf Duplex
• Disk Version-Rle Upload/File Download
LEVEL II COMPUTERS - TERMCOM'" RS-232
INTERFACE BOX GIVES YOU INTELLIGENT TERMINAL
CAPABILITIES WITHOUT EXPANSION INTERFACE.
TERtvlCOM" RS-232 Interface Box Includes
RS Connector, Power Cables and Cassette
Intelligent Terminal Software SI 25 OO
Disk Software S 35 OO
Documentation Only SI O.OO
STATCOM,. '
5758 Bolcones Drive Suite 202
Austin, Texos 78731 51 2/451 -0221
CHESS * BACKGAMMON * MORE"
NEW MACHINE LMJGbAGE GAMES'
FOn ISK LEVEL
Z-CHESS-
Play ime classic gbme of CHESS using the
TRS-W c^vfAfHics Seven levels of d'fficultv
(li* io six levels of "look •me»ij"| frovide
A CMULLEN&ING CAME FOR ALL AlfHaBeT*
^ItUNING AMO MOVE SORTING AHE EMFLOVED TO
KEEF RESFONSF tIMES TO » M1MIML.M SETUP
UOOE ALLOAS THE BOARD TO BE AHRAH^ED AS
DFsiRED Plats all moves including CAST-
LING AMD EN PASSANT captures Numbered
SQUARES SIMFMFT HOVE INFUT PoSSIBLV THE
FASTEST &OOD STRATEGY CHtSS GAME AVAILABLE'
1 1 f »S
BACK «
A SUFERKJR OFPONENT WHICH MAKES EHIEMSIVE
UBF CIF THE TRSbO GRAFHICS TO [JISFLAV A
XEGULAIION ^TVLF BACKGAMMON BOAno
OF UNBIVALED OUALUT AND CLARITY INI LUDinG
THE dice' back io DOUBLES if it stands a
GOOD CHANCE OF WINNING WHICH 'iT USUALLY
does! Everv feature of a rcgulation BACK-
gammon match is included even hecps
score!
*n.»s
DR. CHIPS —
A FASCINATING FROGRAM BASED ON THE FAMOUS
■DOCTOR" AND 'ELIZA 'FHocRAMa Simply
■ TALK'(er."TYPE"1 to your comfuteb
dr chips will analyie your sentences and
"'talk" back to you immediately ! although
or chips' resfonses should not be taken
seriouslt. hf is the ultimate computer
intwoouction for the family and fftlehos
AND A SUPEB "conversationalist" AT PABTlEs'
... iij.»5
IMMEDIATE
SHIPMENT BY
FIRST CLASS
MAIL
"TR5-80 Is a registered Irademarii of TANDY CORP "
The Sof twcw-e Aseoc i at i on ^^eo
I E ■ A S r 701B
112 • 80 Microcomputing, March 1980
HARDWARE
Smooth out your 80's power
glitches with a simple regulator.
Regulate it!
William Klungle
1820 W. Lakewood Blvd.
Holland Ml 49423
As stated many times before
in Microcomputing, the
Radio Shack TR&60 is a lot of
computer tor the money invest-
ed. However, even vi/ith a good
product such as the TRS-80,
there is room for improvement.
One of the areas that Radio
Shack seems to have over-
looked is the voltage regulation
of the monitor. The regulation
in the computer itself is ex-
cellent, but voltage regulation
in the monitor is almost nonex-
istent. Any variation in the ac
house current, such as may be
caused by a pump or a dish-
washer or a disk drive, results
in a noticeable fluctuation of
the video display.
Shortly after purchasing a
TRS-80, i decided, for aesthetic
reasons, to place the separate
power module of the computer
inside of the monitor case. This
allowed the computer to reside
on" the family-room book-
shelves and, with a small
amount of rewiring, provided a
single power switch for the en-
tire system (see "Turn it Off!"
Microcomputing, April 78, p.
1 14), As long as the monitor was
on the workbench anyway, I
took a close look at the power
supply circuit to see what could
be done about the regulation
problem.
Regulating Transistor Circuit
The original circuit consisted
of a half-wave rectifier and
several RC filter networks (Fig.
1). The characteristics of the
transistor circuits tend to
amplify even the small varia-
tions in supply voltage, so that
without some type of regula-
tion the video display would
never stand still.
In the monitor's early life as a
portable television, there were
provisions made on the chassis
for an additional transistor 1o
be mounted. The chassis has
been punched to mount a TO-
66-style transistor in the same
area that the rectifier is
mounted. Voltage regulation
can easily be added by using
only four inexpensive parts.
The regulator circuit is not
critical in its specifications,
and any components that meet
or exceed the minimum require-
ments may be used success-
fully. The original power supply
provides approximately 120 V
dc @ 350 mA. Any NPN silicon
transistor in a TO-66-style case
with a break-down voltage
(VCEO) of over 150 volts and
♦*—
maximum current rating (Ic) of
500 mA should work.
Unfortunately. Radio Shack
does not list some of the parts
needed for this modification,
so unless your local store hap-
pens to carry parts that are not
in the catalog, you will have to
seek another parts supplier.
The parts I used are shown in
Table 1,
The regulator circuit is wired
as shown in Figs. 2 and 3, The
180k resistor serves as a current
limiting resistor for the zener
diode. The zener holds the base
of the regulator transistor at
100 V dc. The transistor's emit-
ter will always be within .6 volts
•■8- SUPPLY
T
Fig. 1. Original circuit.
1
Sylvania transistor
EGG 124
1
Sylvania socket
EGG 421
1
Sylvania zener diode
EGG 5050
1
180k 1W resistor
Tot
al cost should not exceed $5.
Table 1. Parts list
•
BECTIFIES ;joQ
— ¥^
T
T
-»■• SJPPLY
-» — »B* SuPPLt
Fig. 2. Modified circuit.
80 Microcomputing. March 1980 • 113
dc of the base voltage. The 130 Short the 22 Ohm resistor
Ohm. 7 Watt resistor, which was
a part of the original power sup-
ply, distributes the supply volt-
age, which is in excess of the
100 volt output of the regulator.
OWIdlNSl COilllON or ^^
150 0"M HISISrOR - .... ,^'\iTZr
tii* POSITION Of
ISOOMM BESlS'OR —-r-
(jumper**) with a piece of wire.
Removing this resistor allows
the regulator to function over a
greater range of line voltage
variations.
INSTALL JUMPER WIRE
ZCNER OK>Ot
Fig. 3. Circuit modification.
Modification Tips
Consider the following possi-
ble hazards:
1. Be sure to unplug the
power cord before you work on
the monitor,
2, When installing the tran-
sistor, be sure to use the mica
insulator and the two in-
sulating washers supplied with
the transistor. These isolate
the transistor from the chassis,
3, Use a silicone-based heat-
sink compound between the
transistor and the mica and be-
tween the mica and the
chassis. The silicone ensures
proper heat dissipation.
4. Use caution when working
around the exposed CRT (pic-
ture tube), A sharp blow on the
neck of the tube could cause an
Implosion, which would be, at
the least, costly— not to men-
tion dangerous. Place a large
towel or heavy cloth over the
tube while it is exposed; this
will protect you in case of acci-
dent.
5, Before putting the backon,
turn the monitor on and check
to make sure the raster is filling
the screen. If not, adjust the
centering rings located around
the neck of the tube at the rear
of the deflection yoke.
This entire project should
take about one hour to com-
plete and will put an end to the
TRS-80's "dancing display. "■
TRS-J«) users
Learn FORTH
FORTH 1. 1 MnK.lureiJ high It^ei Ijniiujge ttiji Jr^mjlKilli
^:u(^ pro^r^i iJe*clt>p[Tieni iimt ^ iw *, Jn expand ilw
H)Krilljii)!iwgct>>aelimnsiK».'perjii..i&jnJ Jjur>pcv
FORTH pf.'iifJiii'.jfinumpileil hi n:iJ«.emtm.ir; ipait arvl
s[veJ i:\iVulMir
lintKORTH i>dL,nnpleie .er.Hm.>tihr pa»erfull<)RTH
ljngujf:t uikHcd Ui l^^e TRS W) Ttw [m>hORTH -s.lcm
incluJc- K)HTH a [cvl ediloi, jr jssi-niWer, (Lrjphio dnd
l.rafa KORTH on your imn ciriipuler Ilii- iin>FORTH
u^er s iTianujI L■l»^Ialn^ hundiLdi i>t tvaiiiples to Itacfi jini
FORTH iiuhanib Mtnlyte
lin> KORTH li>r lf>i. levd [I TRS-H»
CJ^«:l^l.■ Jnd ruti ii«;urTwniaii.in $29.''?
I>xumcniji»HH'nl> S V **
Ali iprd..T\ 4n: tull> ^ijjrjfiiwd And H W f oc piRtajie and
hiodlin^ OiJer *ilh .heel nnine> unlei. Visa, •»
.MiUlci.lui^c
Wnie fotiFREE bookki dcwnbing FORTH
The Software Farm •^'^
Uvpl. AI7 R«(oa. \ A ZJimi
GRAPHELP does it for you
No more!!!! worksheets
calculating CHR$ code
video/memory locations
GRAPHELP will let you
Sketch: on screen
Display: x,y values, poke &
print locations & code
Print & LPrint data tables
Construct disk data files to
merge in your programs
Lll BASIC16Kw/doc.
send $10 phone614
GRAPHELP 6950435
Radio Shack
165 West Main
St. Clairsville, OH 43950
GRAPHELP GRAPHELP
-^135
GET. Paid€
for using your
Computer ^
FUN' Eas-J CIE5^
RUSH COUPON FOR ^
^ FREE FACTS
^GP^^"^ SPARE TIME pVflJ
3310 Fulton Ave , Sacramenlo CA 9M21 ^^ 134
'
: rliPJLvl bilof^/Af JL91^ '^ 1
1
1
1
1
1
1
1
;
\ NAME
! STREET
1 CrTY
1 STATE ZIP
■ ?
1
1 W'<^i#i^tf4B4^S^?'j^^4^?^
S
. ' Micro- Futures ' .
SUPPORT FOR
TRS-SO TRADERS
IN COMMODITY FUTURES
Commodity Market Analyst (Disk] S125
Commoriiiv Market Analyst (Cass) S 75
Trend Analysis (Disk) S100
Point & Figure (Disk) SIOO
Data Management (Disk) S 45
Commodity Futures Data From
UJK ASSOCIATES - Santa Clara, CA
Direct Telephone Access Available
Also Disk or Cassette Data
FREE BROCHUREi SEND TODAY i
Micro- Futures Trading Company
MFTC Box 1 603 / Goleta CA 9301 7
.--IDS
TRS-aO SOFTWARE
MAILING LIST (32K, disk) S69,M
Ovet 1000 names and addresses on a single diskette
Add change, delete lind name, alphabetic or zip
code SD't. print la&els
HOME BUDGET (32K. disk) S49.9S
Keeps track of your checkbook, mcome and month
ly bills Monirily and year.to-daie summaries
SMALL BUSINESS ACCOUNTING (32K, disk), 149,95
Handles incorne. eipeoditures and payroll (or a
business of up to 16 employees Daily, monthly, and
year-lo-dale totals Designed after Dome Bookkeep,
Ing Journal
MCNITOn M S49.95
Machine language monitor including disassembler,
memory display, move, verity, search, modl'y; ob|ect
code relocate'. lead and Mnte object tapes or disk
tiles: communicate via RS-232-C Interlace; mo'e.
SMART TERMINAL S49,95
For use o' F1S-232-C Interlace «ith a lime-sharing
system Automatic memoiy Irafisrntssion, contiol
key. upperilowercase.
CONSULTmC. ADVICE. DEVIlOf MINT Of CUSTOM
SOFTWAIE TO MUT TOUR wm>>.
HOWE SOFTWARE
14 l.KXINGTON ROAD >^103
M^ NEW CITY, NLW YORK 10956 ^
TRS-80 Ownen! We mint to be your
ALTERNATE SOURCE
for Softvwre ind Inforrmtion!
Available NOW:
CD-This Z-80 program allows yo" to
access and copy ANY diskette file-even
from formatted -only diskettes! A must
for single drive owners; 3 valuable tool
for all disk users. With diskette $15,95,
ISAR-lnformation Storage and Retrieval.
A very fast and usable Data Base system
which uses Random files that you create
using easy oromots, Exn.ellent routine
for sorting! Best available at even near
the price. With source/diskette $16.95.
THE ALTERNATE SOURCE NEWS-A
publication containing lots of good info
and offers to help interface YOU with
your TRS-80, 6 issues-$9.00. Sample
copy-$2.00
Qwck our bingo number for morejuiey
offen or order the above directly from:
THE ALTERNATE SOURCE
1B06 Ada ^laa Lanting, Ml 48910
We ship FAST! BAC/MC 51 7 487-3358
114 • 80 Microcomputing, March 1980
UTILITY
Forgotten which tapes are what?
Use Whazit to identify system and BASIC tapes.
Whazit?
J. B. Penny
1537 Ram ada
Houston, TX 77062
The Radio Shack TRS-80 com-
puter with the Level II up-
grade has two schemes for
loading memory locations from
cassette. The most frequently
used is the CLOAD command.
This reads in a tape in the BASIC
format. A second scheme
employs the SYSTEM com-
mand. This command is normal-
ly used to load machine lan-
guage tapes.
Even though both methods
operate at 500 baud, the formats
are different. Any attempt to
load using the wrong method
will, at best, result in a simple
failure to load. At worst, it could
force you to reset or power-
down to regain control of the
machine.
Deviations
To further complicate things,
several available utility pro-
grams allow you to write cas-
settes in other than CLOAD or
SYSTEf^ formats such as RSM-
1S, GSF and The Electric Pencil.
The Level II version of Micro-
chess, for example, incor-
porates a special program
loaded as a preamble to the
main program.
Couple this with a typical hob-
by computerist's tape labeling
ar^d filing system and you'll get
a fair sized mess. I must have a
dozen tapes labeled simply
"TEST". Some aren't latwled at
all!
Machine code programs are
particularly fond of deviations.
Though the TRS-80 requires a
file name when operating under
the SYSTEM command, T-BUG
allows you to load machine ob-
ject code without one. But if you
don't know where your "mys-
tery" program is located, you
may crash both programs.
Since I believe "it is better for
me to light one small candle
than to curse the darkness," I
am furnishing the following
listing. I call it WHAZIT. Though
it's a long way from a total solu-
tion, WHAZIT can be a great
help.
After loading WHAZIT I can
read the header (and machine
code trailer) from a 500 baud
cassette without actually
loading the tape into memory.
The file name and memory loca-
tion are displayed on the screen.
Do yourself a favor; write it on
the tape lat}el this time.
What's WHAZIT?
WHAZIT was written on the
Radio Shack Editor/Assembler.
Its first 170 lines or so are the
business end of the program.
After sync is found, the first
eight bytes are read from the
tape and stored in an assigned
work space. A three way branch
is then set up where the first
byte after sync is checked to
make a tentative format assign-
ment. If neither Radio Shack for-
mat is found, the default mes-
sage is printed on the screen.
BTEST and STEST do further
checking to confirm the format.
If the format is BASIC, then the
tape player is stopped and the
file letter is printed on the
screen along with the other in-
formation.
If the tape is in the SYSTEM
format, then it is read all the way
to the end to calculate the end
address and extract the start
point addresses. The start point
address occupies the last two
data bytes stored on the tape.
This address is located when
'ENTER is typed after loading a
SYSTEM tape.
Clever programmers have
been known to write TRS-80 pro-
gram tapes where address
blocks are not contiguous. The
SYSTEM format allows this by
preceding each data block with
its own start address. If the ad-
dresses don't make sense, this
may be the reason. Confusion
may also be caused by a bad
load.
Error checking is not included
in the program.
Subroutines
A couple of useful subrou-
tines can be found buried in the
program. COMPU will output
whatever is loaded in the HL
register as a four digit hexa-
decimal address. OUTPUT will
print a string of ASCII char-
acters, beginning with the ad-
dress pointed to by the HL
register plus one The first byte
should contain the length
(numtjer of characters) to be
printed in the string. ■
Program listing.
•» WUZIT/NS
4C*B
00100
OBO
4CABB
00110
jPROGRAH RAME
WHAZIT: PRimV PIU HAMES
00120
;AIIC OTRR GOOD STOPT. BV J. B. PEimT |
4CKB
JlOOiC
001 30
START
LD
IIL.3C00RI UMB CURSOR
4CAe
II2O40
00140
LC
1 40201), HL
«ce<
CBTC05
001 SO
CAIL
li'CB : CUUR SCRBCM
4CM
2irB4D
00)60
LO
WL,mw^
4CBT
CD1C4D
oono
CM,L
OUTPUT
4CM
PDJBOO
001 so
KBC
CALL
2BH iKXYBQARD SCAR
4CBD
B7
00190
OR
A ifKLLB THRU
4CU
»FA
00200
JR
Z.KBD IIP CARRAoe
4CC0
FSOD
00210
CP
13 iRSIURM
4cx:a
2ore
00220
JR
m.KBD
4CC4
AP
0023
lOR
A INARB AaO
4CCS
CD1 202
00240
CALL
3121 iDSPin DRIVB
4CCI
CDH03
00250
CALL
29«a iFiK) sric
4CCB
31ID4D
00260
ua
RL,NBUPP
4CCH
osoa
00270
LD
B,B
4CD0
CD350i
00200
LDIiOOP
CALL
2351 (READ 1 9T S
4CD3
77
00290
LD
(KL),A I bytes INTO
4CD4
J]
00300
iik;
Ki tnsH tumti
4CDS
lOM
00310
DJHZ
LDUMP
4CDT
2IKD4D
003 20
LD
KL,MBUPP|HBaiR TEST
4CM
K55
00330
LD
A,S5I ICBCK FOR
4CDC
BE
00340
CP
(n.) |SYB . BEADBR
4CDD
2815
00350
JR
Z , STEST
»^flmtfwS«fV/C»— BMpJ^ 147
80 Microcomputing, March 1980 • 115
4CDP JtOl
00160
LD
A.ODIB
tCKCK na
4CEt n
00370
CP
(n.)
t BASIC DADB,
ACK2 2SI4
OO330
J»
z.msT
4CE4 an5«
00390 DTPALT
LO
ta..nsa2
irePAtfLT HSC
4f-E7 CD)C4D
0O400
t-ALL
om^rr
4CEA ED SB 2 040
004 to
LO
De,(4010H]|CESTIIBtTION |
4CEe 21BD4D
004 23
LD
IL.KaOPP
1 SOORCI
4CFI OIOBOO
00430
LD
BC.B
1 B!fTE COtTHT
4CP4 EDBO
00440
LDIR
I XPEB DATA
4CPk 1040
004SO
JR
TOFP
4CP8 33
004 60 BTEST
IltC
BL
mST FOR 3
4cr9 BE
004 7
CP
(HL)
|D3'S III A ROM
4CPA 30EB
00490
JP
HZ.DTFALT 1
4CK 13
0O4)0
IHC
IL
IDE FAULT IP
4CPD BE
00500
CP
(HLl
tHDT roox)
4CPE 20E4
00510
Jt
m , OEPALT 1
4D00 2I164P
0O520
LD
BL.I(903
4D03 CD3C4D
00530
CALL
OOTPITT
4IX)6 IIPMD
00540
LD
SL.MBUPT
*3
4D09 7E
OO550
LO
A,(BL]
iPmirr tie
4DaA C 03 300
00560
CALL
331
iFIU I^HS
4D0D 1B2]
00570
LD
A,32B
ICUSE
4D0P rD330D
00580
CALL
33R
4011 ia3t
00590
JK
TOPP
4014 CD350I
00600 STEST
CALL
1351
iREAD BYTE
4017 47
00610
LD
B,A
tCOUMT fc LO.
401 fl C0664D
00610
CALL
HLADDR
tSnRT ADDR.
401 B 22PS40
00630
LD
( STARTA !
,RL
401E 05
00640
ADD
A,L
401 P 4P
00«50
LD
C.A
4020 rD6P4D
00660
CALL
BLOCK
4023 C03502
0067 LOOPO
CALL
33SH
4026 Pt7B
00681
CP
781
iCKCit POD nmr
4028 29iT
00690
JB
Z.EITDSYS
1 POIirr BEADCR
4D2A PE3-
00700
CP
3Ci
ICBCK PDK START
4D3C 20P5
00710
J'
RZ, LOOPO
1 OF DATA BCADCIt
4D1I CD1502
O0720
CALL
335H
4DI1 47
007 30
LD
8, A
\wm coam
4D32 CD6MD
00740
CALL
KLADDB
4D3S SS
007 50
ADD
A,L
4D3« 4P
00160
LD
C.A
4D17 CD6P4D
OO770
CALL
BLOC"
4DJk 1«E7
00780
JB
LOOPD
4DK 4«
00790 OUTPUT
LD
B,(BL)
iPRIBT A STRINO
4DlD 23
ooaoo
INC
IL
EOF ASCII ClAM.
4B3I 7b
ooaio
LO
A,(IL)
4BSr CDIIOO
00830
CALL
331
4D42 ion
00810
DJKZ
0UTPOT*1
4D44 e*
00840
BET
4M9 313010
00850 TOPP
LD
BL, 20 101 1 raita off |
4D4a 313I3C
00860
LD
(3C3EB1
HLi BOTl "'B
4IMB CDPSOI
00870
CALL
1PBB
1 AIO HOTOR
4MI 31kA4P
00880
LD
KL.NSOS
4DS1 CDK40
00890
CALL
OUTPUT
4DM CD2BO0
0O900 A9<«
CALL
3BB
|9CAH KEyBOARD
40 57 B7
00910
OP
A
tPOR BREAK OR
4D9S 38PA
00910
JR
Z.ABK
ICARRAOE RET.
4D5A P101
00930
CP
1
iBBEAK PtEANS
409C CAS 600
0O940
JP
Z,66b
|RZT. TO ROM
4D5P PEOD
00950
CP
13
ICABRAQE RET.
4M1 CAAB4C;
00960
JP
Z , 9 TART
iHEAm TO
4D64 30C!
0097
JP
HZ, ASK
iSnRT OVER
4D«« CD3S02
0O9S0 BLADDR
CALL
1I5B
llOAD IBXT 2
4IX9 ftp
00990
LO
L,A
iBVns PROH
4D«A CD3502
01000
CALL
1351
IWFC 6 LOAD
4D«D 67
01013
LD
H,A
ilNIO THE BL
4D6C C9
01020
BET
iRBSISRR
4D6P SS
01030 BLOrt
ADO
A,L
llEADS A BLOCK
4070 4P
01040
LD
C.A
|OF DATA UP TO
4071 CD3502
01050
CALL
135b
|156 BTTES LOnO
4D74 33
01060
IMC
la
IflUKP POIWTER
4075 81
01070
ADD
A.C
I KEEP CK9UH
4D76 4F
01080
LD
C.I
itN RES. C
4D77 CC3BO0
01090
CALL
2BH
;KBD SWEEP
4D7A PE01
01100
CP
1
;STOP OK
407c 28C7
01110
Jft
z.Torr
; BREAK
4D7E 10P1
01120
DJUZ
BL0C<(*2
: LOOP TILL DOKE
4D80 CDSSO:
01130
CALL
235H
4Dfl3 B9
01140
CP
C
lis CKSin WALID?
4DS4 CC2C02
01150
CALL
Z,23CH
iTKK BLI-W •
4DS7 C9
01160
HET
4DB8 2B
01170 SKDSY1
O^C
HL
;Slnie EK) ADDR.
4Da9 12P740
oiiao
LD
( ENDA ) .
■L
4DSC CD6M0
01190
CALL
HLADDR
;ST01C EIITHY PT.
4Dap 31P44::
01700
LD
( EimtyA ) . m.
4093 113C4F
01 210
LD
BL,M904
iSTSRM HSG.
4095 CD3C40
01210
CALL
OUTPUT
41)98 0606
012)0
LO
B.6
1 PRim-
4D9A 11EE40
01240
LD
RL , MBUFF
»1 i TMF
4D9D 7B
01250
LOOPF
LD
A,(HL)
i PIW
4D9E CD 3 100
01260
CALL
33R
MkME
4DA1 3 3
01270
IHC
RL
4DA2 10P9
01280
DJHZ
LOOPF
4DA4 11A84P
01290
Ln
BL,nSG6
40A7 CD3C4D
01 )00
CALL
OUTPUT
4DAA 2Ar54
01 310
LO
HL,( START* 1 I
4DAD CDr44D
01320
CALL
COKPU
iPRTirr START ADDR.
4DB0 CDCB40
01330
CALL
COTIMA
1
4DB3 2AP74D
01 340
LO
HL,(EHnA) 1
4CB6 CD'14r
G1^50
-«LL
CO.'iPO
lPRI>ff EMD UDOR.
4DB9 CD'-niD
01 J60
CALL
70MMA
4DBC 3AP94D
01 3T:
Lr
HL.'EHTKYA) |
4 DBF CD-44^
(31 >3T
CALL
70-PU
iPKIFfT EHTRY ADDR,
43^3 1881
01^90
JR
TOFF
4CC4 7c
01 4 00
i-O^p-J
:,-
^,"-
;"RITES KL BEG.
4DC5 CDD*4r
01410
C'LL
OUTHL
:CO!*IT(»rS AS 4
4DCB 70
014 7C
t.2
A,L
;CIGIT HEX ADDR.
4DC9 IflO*!
01430
JR
OUTHL
4DCB 3F2C
0144:1
~0-"H
LD
*,2CH
iWTB IN COMMA
4DCD CD33O0
01450
CALL
33k
4DD0 3E20
014 60
LD
A.20H
:ANC SPACE
4DD2 CD3300
01470
CALL
33H
4DD5 C9
014^0
RET
4DD6 P5
01490
OUTHL
PUSH
AF
4DD7 OP
01500
RRCA
;SWAP PLACES
4008 OP
01510
HRC*
;WITH BITS 0-1
40D9 or
015 20
RRCA
iAND BITS 4-7
4D0A OP
01530
BRCA
4DDB CDDf4D
01540
CALL
BIASCI
4 DDE PI
01550
POP
AF
;DO IT TWICE
4DDP E60P
01560
■lASCI
AMD
15
ICLTAR BITS 4-7
4DE1 rr.au
01570
CP
10
:JUHP IF A<io
4063 3B02
01590
JR
C.HWBER
jIP IC9 THEM
40C5 C601
01^90
ADD
».7
iCmiCE TO LTR.
40F7 C630
01600
(TfKBER
AED
A.'O'
(ASCII OFFSET
4DE9 CD3 300
01'IC
CALL
33H
4D^C C9
01620
RET
4 DEO OOOO
01630
"BUFF
DEfV
; FIRST 8 BYTES
4DEP 0000
01 640
D'FW
;READ FROM TAPE
4DP1 0000
01650
DEFW
|ARE STORED HERE
4 OF 3 0000
0166?
DEFT*
4Dr5 0000
0167-'
■IT^RT^
Dfrv
;STRRT ADDRESS HFRE
40^7 0001
0161"'
'HVh
DTK
:END KODRESS RTRE
4DP9 0000
01*^90
'ST'fh
D'^FH
lewTRY ADDRESS RCRE
01o9S
■LIST
Pf
00000 TOT*L
^3P0=S
PEACY C^SS-^TTT
•PI 695:"
01695 "LIST
OFF
01700 H9C1
DFFE
1 21
JSCBETN HSCS.
HERE TO END
01710
O'--
'THIS
PROG'
AM READS A
SOC MUD TAPE'
017 20
DEFH
■ HEAD'^R &
PBIMTS TKT
SYSTEM'
01730
DEPB
13
01740
DEFI*
'FIL''
NAMr
OR BASIC FILE LETTER. '
01750
DKF1
'LOAD
TAPF
AND HIT EHTtR.'
017 60
DEFW
OOOCH
Omo HSG2
DEFP
161
01780
OEFH
■the
HEADEP
JUST READ
WILL IDT LOAD'
01790
3EF1
' usiMG eitbeR the "system"' |
01 BOO
DEFB
13
01810
DEF1
'COHMAKD OR "CLOAD".
A ORAPnC '
01 BIO
DCPK
■RTPBESPirrATIOIl OP TTB FIRST* |
01 830
:!!FB
13
1
0ia40
C'FM
'EIGHT BYTES FOLLOWIK " j
01850
DEFM
THE
STWC CODE ARE '
01860 n5G3
DEFB
37
01S70
DEFM
' HEADER IS
IN BASIC '
oiaso
DEF"
'FORMAT WSE CLOAD "'
01890 H5G4
DEFB
4S
01900
DPFK
'READER IS
IH "sYStWt
PDMAT.
01910
DEP"
'FILE
HAME
IS
01920 HSa5
DfB
61
01930
D^FB
1)
01940
DEFM
'PRESS EItT*R 10 SO AOAIII. BREAK ' 1
01950
DEFH
'TO ^IT AMD RETTnm TO BASIC |
01960
DEFB
1 J
01970 PISC6
DEFB
62
01980
DEFB
13
01990
DCPH
'BEX
STARTIMO, ERDIBG
ARD ERTRY PT.
02000
DEF«
'ADDRESSFB
ARE AS roUOWBt' |
02010
DEPB
13
02020
EMD
START
JOB LOT BIDDING
Manufacturara or dealers with
job lots of merchandise, systems,
software, publicationB, parts, test
equipment, printers, terminals,
disks, tapes, monitors, etc. Please
contact Sherry Smytha at Ba3-924-
3873. KB Microcomputing/BO/ISI
need these for the lab and we would
like to bid on your equipment. You
could do better than ui auction . . .a
kit better.
X
PETERBOROUGH NH 03458
0»C"
IUOHAl tS-EW its 'NC
1 ON MlklVD
IS. EMC' O' eiB'S
iCCUED DtwlC'iliC
ejSil.ESSVEKil.LEE
B0SINES5 *rm,>-*[T
ACCaUED DEPHIClillC
MEIEH CEPOSIIS
IOI*L »SSEIS
W* hilt ■ compial*
Misctlon el diik and
cttMit* b«l«d bull nail
(Ollwao lor your PET
■nd TRS-tO computan.
Call Of wrila lof Iraa
bcocnura.
201 WoiWy HO
De>1e>. Mo B3S41
1314)624 7611
►^132
Dealsr inquirins invilM
lH'tfiKATlONil. ElIEBPftSES m<L
jQURMAt.
JMaUARY 1«n
uxi sua DUdwr-Ofi
no oe ._.._.
»i n am >'n xiooo
mm ODD II7I ntMC
■e n on
JOI 00 JOUaMM. tN1l» OK
xa OD on
xo OD on
m oD nMtt an
B3 DO soo
om i'1 » Hc*
iN^EHStTiONAl. EMtBPBIStS I
■BI*L B*1.*HCE
I ACfOuXT TiTl( H«.« C^TC CiriMffhT AtfOUHT
» OB jOiWMJ. I«t"i
eo ou'siMiMn-
JWOOC*
441 UC»
MStfiCS
Mli'C"
116 • 80 Microcomputing, March 1980
APPLICATION
Find out how you are
physically, mentally and emotionally.
Biorhythms
Ralph E. Holthausen
25 WHIets Drive
Syossei. NY 11791
Even (t you don't believe in
biorhythms. your friends
witi enjoy this program when
you draw their biorhythm curve
for them. The program, created
for the TRS-80 Level II BASIC,
can be adapted to other BASIC
units. For anyone who wants a
numerical Indication of the daily
biorhythms there is a short alter-
nate program included.
The idea behind the main pro-
gram is that biorhythms can
best t>e represented by a sine
cun/e. Normally, on paper, this
curve is plotted on a horizontal
axis. However, on the computer
cun/e plotting is easier on a ver-
tical axis. IHighs or plus values
are on the right of the vertical
axis and lows or minus values
are on the left.
The Theory
Biorhythm means rhythm of
life. The basis of the biorhythm
theory is that our lives are
governed by cycles that start at
our day of birth. There are three
such cycles wfwDse curves are
plotted by the following pro-
gram. The theory has been ap-
plied recently to accident pre-
vention. Many companies are
studying biorhythms and their
effects on airline pilots, athletic
teams; doctors and surgeons,
relative to performing opera-
tions, have studied biorhythms.
From the day we are born, the
theory states, we are goverr>ed
by cycles. The 23 day cycle
called the physical cycle gov-
erns the condition of one's
body. The 28 day cycle called
the emotional or sensitivity cy-
cle governs one's temperament.
The 33 day cycle, called the in-
tellectual cycle, influences our
intellect or thinking capacity.
Those who have investigated
the theory seem to agree on the
length of these cycles as 23, 28
and 33 days respectively.
The physical cycle is said to
affect our vitality and strength.
The plus period which will be on
the right side of the curve as
printed by our computer, lasts
1 1 Vi days and these are days of
physical vitality, stamina,
strength and durability. It is a
period of self confidence,
courage and progressive spirit.
Athletes usually find this period
B I W H Y
H M S
PRINT -
PRINT
PRINT "THERE ARE THREE CURVES ... PHYSICAL, EMOTIONAL AND"
PRINT
PRINT "INTELLECTUAL, HICHS ARE TO THE RIGHT LOWS ARE"
PRINT
PPINT
PRINT
PRINT "THIS DATE.
PRINT
INPUT -E-iTEB YOUR BIHTHDATE . .MONTH, DAI. YEAR" : M.D.YB
-TC THE LEFT. FLASHER INDICATES YC'JR BIORHYTHM FOP'
FLASHER ON LINE IS A CRITICAL."
IP M
Di =
(DT/23 - INT(DT/23)))
<- Z THEN 50
INT(3t5-25 • YR)
D2 = IST((K ■• 1) ' 30.6) . [lOTO 70
Dl " INT(365.?5 • (YR - D)
ca = INT(K f 13) • 30.6
D3 ^ □ ■• 31 » D2
INPUT "ENTER TODAY'S DATE.. MONTH, DAY. YEAR' i K,D,YR
IF M C=- 2 THEN 120
100 Dl = INT1365.25 • YR)
lie D2 - :NT((K •■ 1) • 30.6) 1 SQTO 1^0
120 Dl - INT065.25 * (YR - 1))
130 D2 = IST(!M » 13) • 30-6)
11*0 04 = D * Dl ♦ D2
150 DT = Di* - D3
160 P ^ INT(23
170 CLS
IBO FOR I = |( TO 2 • 3. Wishes STEP .lt8
190 PRINT T*6(20 • El + Sm(I))) i '■*'
200 NEXT I
210 X ^ 1*0
220 FOR Y = ^ TO 1*7
230 SET(X, Y)
21*0 NEXT Y
21*5 PRINT "PHYSICAL"
250 LET XI = UO • (1 + SIH( P
260 LET Yl = 2 ♦ P • (39/23)
265 FOR N = i( TO 20O
270 SET(Xl,Yll
280 HESET(Xl.Yl)
2B5 NEXT N
287 INPUT "DO YOU WISH TO SEE THE EMOTIOMAL FOB TODkf
288 IF 2$ - "YES" THEN 300
290 END
.273182))
iZ4
300 E = 1NT(^8
310 CLS
320 FOR I = TO 2
330 PRINT TAB(20 •
31*0 NEXT I
350 X - UO
360 FOR Y - ^ TC i*?
370 SETtX, Y)
380 NEXT Y
385 PRINT "EMOTIONAL"
390 LET X2 = 1*0 • (1 -- SIN(E
1*00 LET T2 = 2 ♦ E • (39/28)
1*05 FOR N = ^ TO 200
410 SET(X2.Y2)
1*20 RESET(X2.Y21
425 NEXT N
1*27 INPUT "DO YDU WISH TC
1*28 IF Z$ - "YES" THEN
1*30 END
500 L = 1NT(33 •
510 CLS
520 FOB I = ^ TO
530 PRINT TAB(20
5**0 NEXT I
550 X - ^0
560 FOR Y " i) TO 1*7
570 SET{X.Y)
580 NEXT Y
5B5 PRINT -INTELLECTUAL"
;DT/2e - lNTtDT/26}))
' 3.11*159265 STEP .kH
[1 f SIN(I))) i "•"
.22t*4))
EE THE INTELLECTUAL FOR TODAY" ;Z3
500
DT/33 - INT[DT/33)))
• 3.1^159265 STEP .1*8
(1 -* SINtl))) i "*-
(1
L •
200
SIN(L
(39/33)
.19CW))
590 LET X3 - '*0
600 LEI Y3 - 2 ■*
60; FCR N - TC
610 SET(X3,Y3)
620 RE5ET(X3.Y3)
625 NEXT N
627 CLS
630 INPUT "DO YDU WISH ANOTHER BIORHYTHM" ;Z3
61*0 IF Z$ -- "YES" 20T0 650
61.2 PRINT " I HCPE YOUR BIORHYTHMS WERE ^DCD TCDA Y . . . iOCi'-BYt
6I.5 END
65c CLS : ^OTC 2
Program Listing 1
^ H»ad9r S»rvicB — see pagt 147
SO Microcomputir)g, March 1980 • 117
best for competitive sports.
The minus period (left side of
the curve) also lasts 11Vi days
and is a period of reduced ener-
gy. One tires more easily, is
more liable to infectious dis-
eases; medicines seem to work
weii, according to authorities.
This is a period of rejuvenation
where our body seems to be re-
charging; a good period for rest
and relaxation.
The emotional cycle affects
our nervous systems. The plus
period lasts 14 days and is a
period of cheerfulness, creative
ability and moral energy, This is
a period where we are full of
energy, good for contests,
public performance, conducting
jobs where teamwork is re-
quired.
The minus period also lasting
14 days is a period where we
lack ambition, tend to be moody
and should be careful in our per-
sonal relation with others.
The intellectual cycle affects
our understanding, adaptability,
logic, wit, ludgement and con-
Er*.iT iOTML
INTELLCCTUHt
Graphics Program 1
Photo 1: Here, note that the marker is on the line: a critical day.
centration. The plus period, last-
ing leVa days, is the best time
for study, planning, examina-
tions and decisions.
The minus period, also lasting
I6V2 days, is a period in which
we are apt to be lacking in good
judgement. It is a good time for
gathering data or for jobs that
require repetition.
Critical days are those during
which a cycle crosses the cen-
terline {vertical in the program)
in an upswing (to the right) or a
downswing (to the left). The term
critical is relative, it is a period
of change where our system is
in a state of flux.
Statistical research for over
30 years seems to disclose that
during these critical days, espe-
cially the physical and emotion-
al ones, we are more accident
prone, lacking in coordination,
judgement and alertness. Dur-
ing an emotionally critical day,
one is apt to make a slip of the
tongue, irresponsible utter-
ances, quarrel or have disputes.
An intellectually critical day
might cause failure of memory
or mistakes. Critical days occur
on our computer program where
the blinking signal is on the ver-
tical centeriine 0I the curve or
very close to it.
The Program
Whether or not you believe in
biorhythms, you can still have a
lot of fun running this program.
Lines 2 through 1 1 are standard
print statements and self ex-
planatory. In lines 15 and 80
dates are input. It is important
that they be entered correct-
ly—tor instance May 8, 1979
would be entered 5,8,1979. The
full year must be written, not
merely 79, and commas must be
118 • 80 Microcomputing, March 1980
Photos 2 and 3: The rectangle, which is the marker, flashes on the
screen and shows the location of that day's biorhythm — emotional
(Photo 2), intellectual (Photo 3).
fig
used (or the Level II BASIC on
the TRS-80,
Statements 20 through 70 are
a calendar routine to find the
number of days to day of birth.
Lines 20, 50 and 60 tal^e care of
the months of January and Feb-
ruary which are considered the
13th and 14th months of the pre-
vious year in the formula.
Statements 90 thru 140 also
make up a calendar routine for
to today's date as entered.
Statement 160 calculates
today's position in the physical
cycle of 23 days. This is a frac-
tion of the complete cycle of 23
days. A subroutine could be
used for steps 20 to 60 and 90 to
130, hovi/ever I did not feel that H
was worth the bother.
Statements 180 through 200
draw the sine curve. For ease in
plotting, this curve Is drawn on
Its side. In tine 180 the curve is
the curve a slightly different
form.
Lines 210 through 240 draw
the zero line of the curve; this
utilizes the TRS-80's graphic
ability.
Lines 250, 260, 170 and 280
plot today's physical location
on the curve, while lines 265 and
285 establish a timer loop. This
timer loop makes the marker
blink.
Line 280 can be omitted fixing
the marker on the screen for the
length of the timer loop.
In line 190 one is added to the
sine to make it positive. It is also
multiplied by 20 in order to print
the curve more clearly on the
screen. (I found these the best
values for a nice looking sine
wave.)
In statements 250, 390 and
590 the X value (horizontal) of
the respective biorhythm Is cal-
culated. Statements 260, 400
and 600 give the Y value (verti-
cal).
The constants .273182, .2244
and .1904 represent the values
of 2ti divided by 23, 28 and 33,
the biorhythm periods of the
physical, emotional and intel-
lectual cycles.
The position of the marker for
subsequent dates can be esti-
mated or plotted day by day by
inputting the appropriate dates.
For those who do not have
graphics capability on their
computer or anyone wishing to
substitute a numerical value for
the graph there is an alternate
program. It is much simpler.
Steps 2 through 11 are omitted,
substituting any printed mes-
sages that the programmer
wishes. Lines 15 through 150 are
retained as shown in the main
program listing. Lines 160 on-
wards could be changed as in
Example 1,
The same sort of thing can be
done for the emotional and in-
tellectual cycles changing the
cycle interval in statement 160
appropriately to 28 or 33. ■
160 P = DJI23- INT(DT/Z3)
170 BP = StN(P . 2 ■ 3.14159265)
then something like this could be added —
175 PRINT
180 PHINT
190 PHINT ON A SCALE OF MINUS ONE TO PLUS ONE"
numDef-Qi
present dat^
Ir^tiated frorr zero-*o Zn, which
is one complete sine wave since
200 PRINT ■■ THE NUMERICAL VALUE OF YOUft PHYSICAL BIORHYTHM IS "': BP-
210 PRINT
the"
HARDWARE
Add this low cost interface and you'll be able to turn
on any memory location you want for control or monitor use.
I/O Ports Plus
Brian A. Harron
67-3691 Albion Rd.
Ottawa Ontario
Canada K1T1P2
By adding the low-cost inter-
face described in this arti-
cle, you will be able to "PEEK"
and "POKE" your way around
In the real world outside your
TRS-80 cabinet.
To begin, let's examine Level
II BASIC'S PEEK and POKE
commands. The POKE X,Y com-
mand will store the value Y into
memory location X. where Y is a
decimal number between and
255 representing an 8-bit binary
byte and X Is the decimal value
of any writable memory loca-
tion. Conversely, the PEEK(X)
command will return the value
(0 to 255), which is read from
memory location X(declmal).
This all seems useful, but
what shall I PEEK at and where
will i POKE? Well, let us add
some input/output ports in
memory address space, then
we will be able to send and
receive bytes of data via these
new ports, or registers.
The Interface
Fig. 1. shows the connec-
tions necessary to add an Intel
8255 programmable peripheral
Interface IC to the TRS-80 bus.
On the right side are our 24 in-
put/output lines, each capable
of sourcing 1 mA of current at
1.5 volts (TTL compatible) and
on the left side are the TRS-80
bus connections and pin func-
tion names
The 7404 hex inverter and the
7430 8-input NAND gate are re-
quired to properly decode the
memory addresses where our
I/O registers will reside. These
address decoders will allow the
8255 to be selected (via OS) only
when data is read or written at
addresses 12288-12291 (3000-
3003 hex). These locations were
chosen because they were in
an unused area of memory just
above the last Level II ROM and
well below the keyboard scan
RAM area. It also seemed very
improbabie that Radio Shack
peripherals would ever use
10 POKE 12291.153 ;REM A-IN BOUT C-IN CONTROL VTORD
20 l = PEEK(12288) ;REM SETI = VALUE AT PORT A
30 J = PEEK(12290) , REM SET J = VALUE AT PORT C
40 IF I =J THEN POKE 12289.240 ;HEM 240 = 1 1110000 BINARY
50 GOTO 10
Sample BASIC program to demonstrate the 8255 interface.
these locations.
It should be noted at this
time that with Level II BASIC in-
stalled in your TRS-80. the inter-
nal 5-volt supply is not avail-
able to the user, so an external
5-volt source capable of pro-
viding at least 500 mA of cur-
rent will have to be made
available. All other required
tines are available at the 40-pin
edge connector located inside
the rear access door ot the
CPU/keyboard housing.
The 8255 has three modes of
operation that may be selected
under program control: mode
iTHS BO Bus IN
0— basic input/output, mode
1— strobed input/output with
interrrupt support. For our in-
terface we will confine our
thoughts to mode only. Fur-
ther details concerning the
8255 PPI can be found in the
manufacturers' data hand-
books.
Port A and B are 8-bit ports
and port C is split into two 4-bit
ports. Port C has the additional
feature of offering bit set/reset
capability. All outputs are
latched, while the inputs are
not. The port function con-
figuration depends upon which
FUNCTION VPAHENTMESES
GItQ
Fig. 1. Schematic of 24 I/O line interface.
120 • 50 Microcomputing, March 1980
Scanned by Ira Goldklang - www.trs-80.com
ontrol
Port A
PortC
PortB
Pone
Word
>cimal
(bO-b7)
Upper
(b4-b7)
(bO-b7)
Lower
(bO-bS)
128
OUT
OUT
OUT
OUT
129
OUT
OUT
OUT
IN
130
OUT
OUT
IN
OUT
131
OUT
OUT
IN
IN
136
OUT
IN
OUT
OUT
137
OUT
IN
OUT
IN
136
OUT
IN
IN
OUT
139
OUT
IN
IN
IN
144
IN
OUT
OUT
OUT
145
IN
OUT
OUT
IN
146
IN
OUT
IN
OUT
147
IN
OUT
IN
IN
1S2
IN
IN
OUT
OUT
153
IN
IN
OUT
IN
154
IN
IN
IN
OUT
155
IN
IN
IN
IN
Table 1. Input/output mode control word chart.
control word is POKEd into ad-
dress 12291 (3003 hex). Sixteen
different combinations of input
and/or output are listed in Table
1.
For example let's POKE
12291,137, Port A (address
12288) is an 8-bit output port,
port B (address 12289) is
another 8-blt output port and
port C (address 12290) Is an
8-bit input port.
If port C were configured to
be an output port {i.e., POKE
12291,144), you could turn on or
turn off any of the individual
bits of port C by POKE 12290,2,
where Z is a word from Table 2
defining which bit is to be acted
upon. This becomes handy for
controlling custom peripherals
that require strobing or mode-
setting bits of data. For exam-
ple, consider the challenge of
controlling eight railroad model
switches or turning house and
yard lights on and off.
Let's try a BASIC program ex-
ample where we will look at
ports A and C, and if they are
equal we wilt turn on bits 4, 5, 6,
7 or port B. The sample program
will keep looping and show a
binary 11110000 on port B
whenever ports A and C are
equal.
One final warning: If after
adding this interface you still
cannot think of anything to
control and/or monitor, then
your TRS-80 may suffer from
"terminal" boredom !■
Control Word
Port C Bit
(Decimal)
Set or Reset
bO RESET
1
bOSET
2
b1 RESET
3
b1 SET
4
b2 RESET
5
b2SET
6
b3 RESET
7
b3SET
8
b4 RESET
9
b4SET
10
b5 RESET
11
bSSET
12
b6 RESET
13
b6SET
14
b7 RESET
15
b7SET
Table 2. Port C bit set/reset control word chart.
E
GIN!
YOUR TRS-80 CAN BE
A TOUGH OPPONENT
CIN RUMMY 2 plays ascrong game good
enougn to challenge an expert player
Plays a full regulation game keeps score to
game level allows rearrangement of
player's hand and changes strategy to
counter Its opponent's play Hoursofgood
card playing a fascinating program, one
you'll enioy playing against and trying to
beat
MCR-1 $1<195
CHECKBOOK PLUS soives the problem of
monthly bank statement reconciliation
No cumbersome tape record keeping Just
do your checkbook once a month and let
Checkbook Plus handle all the details and
find the errors
MCB 1 $9 95
CALCULATOR PLUS is an on screenor print-
ing calculator with chain and mixed calcu-
lations, memories for answer storage or
calculations with constants item count
and on-screen or printed review of long
add-andsuPtract operations optional
dollar format
MPC1 $9 95
CHECKBOOK PLUS and CALCULATOR PLUS
both on one cassette
MC 2 51 J 95
At your dealer or direct from ^90
MANHATTAN SOFTWARE, Inc
P.O. BOX S200 Grand Central Station
New VOrk City, New York 10017
f216K9
MEMORYI
EXPANSION
$87.20 !!
NOW YOU can have top quality without
paying top dollar . . . and expand mem-
ory In Radio Shack 80, Apple, and Exidy
Sorcerer computers. 250 ns, low power
chips are compatible with 4 Mh;
processors; easy-to-follow Instructions,
plus dip shunts, make Radio Shack-BO
memory expansion a snap — even for
those with no previous hardware
experience Compare our features and
price with the competition; It just might
tell you why this is one of our all time-
best selling products.
VKA' Maitercnarge* oraers, can our la nour crOer
aeu at I41SI Hl-OCIC COO OK witn nrMI addrnj for
UPS Cai r« aaa tax Pncn oooo Riroogn cover montfi
of m303iine
CompuPro"
BOX 2355, OAKLAND AIRPORT, CA 94614
^ (415) S62-0636 J
Now, Scott VET/I, an exciting new
prcx*jct of Scott Irwtruments, permits
you to talk to your TRS-80, allowing
voice control of basic programs or
games. The Scott VET/I offers
• User initialized vocabulary of up
to 40 words
• Fast recognition
• High accuracy
• Demonstrated performance
comparable to systems costing
$10,000 or more at hobbyist
prices.
• Multiple user Capability witfi no
increase in storage requirements'
• Easy to tram and use (user pro-
grams can be wrrtten in Basic)
• Requires TRS-80 (c) Model I with
expansion interface, 16 K of addi-
tional memory and dual disk drives/
cassette (c) Trademark of Tandy
Corporation
For more information call
(817) 387-1054 or write
^hstrumenCs ^^^
--^815 North Elm, Denton, Tx 76201
1^ Readar SarvicB—aa» pag* 14?
80 Microcomputing. March 1980 • 121
LTILITY
A Level I program to
help you document your programs.
Screen Editor
William L Colsher
4328 Nutmeg Lane. Apt. Ill
Lisle IL 60532
What, you might ask, is a
screen editor and why
Should I want one tor my
TRS-80? Well, first I'll tell you
why you should want one so
you'll be nrotivated to read the
rest of this article and get the
program running on your
system. (And by then you'll
know what one is.)
There is one absolutely hor-
rendous problem with pro-
gramming small computers in
BASIC (or in any other non-
compiled language, for that
matter). Even with a small pro-
gram, once you put in all the
REMarks and start in on the user
instructions, you begin to find
1 Load ir>e screen editor tape wilh CLOAD. Since this is a machine-tanguage tape
the aslerisK won t blmti very much
2 When ir>e monitor scfeen clea<5, you re ready to enter a screen of intofmation
There aie tour special keys used to move Ihe cursor arour>d It>e screen.
UP — tfie up arro* — — |hotd down Ihe Sfiilt keyl moves the cursor up one tine
DOWN — ir>e down arrov* — i — (hold down the shifl key) moves Ihe cursor down one
lirie
RtGHT— the "right arrow' — |— (hold down the shiti key) moves the cursor righf one
space
LEFT— Ihe ■ letf or back arrow '~|— (hold down the shttt key) rrtoves the cursor back
one space
3. When the screen is just Ifie way you want il, ready your tape recorder and till the
S' key l( Ihis IS the /as/ screen ol data, tiil the "L' key If there are more screens to
enter, hit the "M key When the screen clears agam yotjrB ready to edit
4 Wnen you have recorded the last screen ot data, press lt>e RESET button on Ihe
back of the THS-eO Now CLOAD the BASIC program you wiole the inslruclion screens
lot and make sure it loaded correctly Then CSAVE it onto the end of the instruction
screen tape.
5 To use your composite tape, load it into your recorder, press play, type CLOAD A
screen lull of information will be displayed as last as il can be loaded from tape. When
you want to conlinue to the neit screen, nit enter and it will be loaded. After you hit
ENTER on the last screen, the HEADY message will appear and you can then type
CLOfcO again \o load the BfcSlC program
Screen editor user's guide.
that space is limited. In fact, I'm
sure you've seen programs that
have no built-in instructions (or
even REMarks) for this very
reason. This problem is so com-
pletely universal that most of us
don't even think of it as a prob-
lem.
The obvious solution to the
problem of providing good user
instructions in a limited amount
of space Is to segregate them
from the main program in a
module of their own. As soon as
you do that, however, you begin
to find that writing instructions
that are going to be displayed
on a video screen can be a real
pain in BASIC.
The first thing you realize is
that typing P." nine zillion times
can be boring. Then, when you
RUN the program to take a look
at the instructions, they zip by
too fast to see. So you have to
go back and stick in either an IN-
PUT statement every 15 lines (on
a TRS-80) or some sort of timing
loop to slow things down. Final-
ly, if your program requires a lot
of instructional material (as is
the case with some of the so-
phisticated simulation games),
you can still run out o1 memory
and have to add one or more ad-
ditional instruction modules.
Nondestructive Cursor
The solution to all this
miserable tooling around with
PRINTS and two or three extra
programs is (you guessed it) a
screen editor. A screen editor is
actually a simple sort of text
editor. Since all we're concerned
with is one screen full ot infor-
mation, the editor doesn't have
to be smart. All that's needed is
a nondestructive cursor to get
the information where we want
it and some mechanism tor sav-
ing the information for future
use. Because the requirements
are simple, a screen editor is
simple to use — no messing
around with PRINTS and wait
loops.
If you think about it for a few
minutes, you will find that the
nondestructive cursor is the ma-
tor part of writing a screen
editor. On a TRS-80 (or any other
system where the cursor is an
automatic part of keytward in-
put), there is an additional prob-
lem. The automatic cursor fouls
up the nondestructive goal. It
has to go.
The way to get rid ot an
unwanted cursor is simple: Just
122 • 80 Microcomputing, March 1980
delude the routine that handles
it. All we have to do is see to it
that the offending routine thinks
the video display memory is
someplace it isn't. . . preferably
out of the way where the cursor,
trailing its cloud of characters,
can't do any harm to our pro-
gram or our neatly edited
display. This turns out to be
quite simple on the TRS-80.
There is a location in RAM
where the TRS-80's built-in
routines store the current loca-
tion of that nasty cursor. That
location is at the two bytes
beginning at 4068<*. As is usual-
ly the case with an address, it is
stored backward, high-order
byte second.
The only safe place to make
the cursor think the video mem-
ory is turns out to be the ROM
area. Anyplace else might affect
the program. In ROM though,
the cursor can gaily write
characters all day and not do
the slightest amount of damage.
To make sure it stays "down on
the ROM" all we have to do is
stick a zero at location 4069<i. If
we do that every time we input a
character from the keyboard
we'll always be safe. There are
probably more elegant ways to
pull this off, but it only takes two
lines of code (starting at 4411ia
in the program listing) and
doesn't materially affect the
speed of the program.
Now that we have the built-in
cursor permanently out of the
way, we need to take a look at
how to make our cursor nonde-
structive. That means that when
we back it up, for example, the
cursor should just slide over the
characters already typed. Of
course, at any given location,
the cursor character itself is
what's on the screen. The cursor
character we're using is the
underscore When we move
the cursor to another location,
the character that was there
before the cursor reappears.
This is easy to implement.
Every time a cursor command is
Input from the keyboard, we im-
mediately put the old character
back where the cursor was.
Then we generate a new loca-
tion for the cursor (depending
on the command entered), save
tha character at that location
and then write in the cursor. The
four lines that make up the
"save" part of this routine begin
at location 4416'» in the pro-
gram.
Cursor Commandt
Cursor commands are special
characters that are used to tell
the program what direction to
move the cursor. A quick glance
at the TRS-BO keyboard reveals
that there are four arrow keys.
Since each arrow points in one
of the lour directions (right, left,
up and down), we want to move
the cursor so we don't have to
use up any of the other char-
acters to get our work done.
While I was working on this
program, it occurred to me that
some people might want to use
the arrows in their display. To
make this possible. I decided to
use the shifted arrows for the
Cursor commands. This also has
the advantage of keeping the
cursor from flying all over the
screen if you accidentally hit
one of the control keys.
In addition to moving the cur-
sor around, we also need some
way to tell the program that
we've finished with the screen
and to save it on tape. I decided
to use the "at " symbol (ig). (The
reason for this is just that I've
never used it for anything else
and decided it was about time.)
Because there are only five
commands to be processed, we
can use the brute-force method
instead of using branch tables,
etc. Our method consists of a
series of compares and jumps. It
a comparison is true, then we
jump off to handle the com-
mand. The 15 lines starting at
location 441Diri contain this
series of jumps. Incidentally, if
you don't like the characters I
picked out for control purposes,
just substitute your own
choices in the compare (CP)
statements.
Program listing
TRS-80 SCRS33f
•
EDITOR •
AUTHOR - UITXIAK I. C0L5KER •
SYSTCH - TRS-80, UK^ ttVEL I •
THIS
SIKPl£ SCREEN SDITCR WAS WRITTSN TO •
SIHPUrr D5VSL0P5313HT OF
INSTRUCTIONAL •
MATSPIAL TO ACCOMPANT »SIC I>NGUA(2 • |
PROCRAffS.
•
•
THE FOLLCMIMG SEGHEHT OF
CODE CLEARS THE
MONITOR SCRSSN IK PREPARATION FOR EDITING 1
mtoo
21003c
START
ID HL,3C00H
START OF VIDfi» MEMORY
W*03
11013c
ID DE.3C01H
liiiOb
010004
ID BC,0400H
BYTE COUNT
Ui09
3B20
ID A,20H
PUT A BUNK IN FIRST SPOT
iUtoh
77
ID (KL}.A
,,
440C
EDBO
IDIR
CIZAR THE SCRS3( TO BIANIQ
THE
NEXT SECTION CF CODS
PROC£SSgS THE INPUT.
IF A CONTROL CHARACreB IS IMPJT, IT IS HANDED |
OVER TO TM APPBOPRIATK
WUTINE. ORDINARY
CHARACTERS ARS PlACED ON
THE SCFEEN AND THE
CURSOR LOCATION INCREHEN'reD 8r 0N£. 1
CONTROL CHARACTERS 1
5B -
UP ARROW - MOVES CURSOR UP
5C -
DOWN ARROW - HOVES CURSOR DOWN
5D -
IXn' (OR BACK) ARROW - KOVBS CURSOR IZFT ONE
5E -
RIGHT ARROW - MOV-S
CURSOR RIGHTOKE SPACE
40 -
THE • SYMBOL - GIVaS CCWTROL TO SAVE ROITTINE. 1
iMK
21003c
ID HL,3C00H
INITIAL CURSOR IA:aTI0N
wm
3E00
EDIT
ID A,OOK
KILL RADIO SHACK CURSOR
WH3
326940
ID (4069M},A
. .
Uil6
7E
ID A,(HL)
ID (4000) »A
C£T CURRENT CHARACTCR
WH7
32004c
AND SA'/E IT
lti»U
3E5r
ID A.STH
PUT IN OUR CURSOR
wuc
77
ID (KL) ,A
• #
t)41D
CD400B
HiOT
CALL KBDIN
READ A KEYBOARD CHARACIIR
IA20
CAiI}44
JP Z.WAIT
, ,
li423
rajB
CF 5BK
IF UP ARROW THEM
tiUZS
CA4644
JP Z,UP
HOVE CURSOR UP
4426
rase
CP 5CH
IF DOWN ARROW THEN
UUZk
CA5144
JP Z.DOWN
MOVE CURSOR DOWN
442D
rs5D
CP 5DH
IF IfflT ARRCM THEN
mar
CA5C44
JP Z.IUT
MOVE CURSOR I£FT
K432
resB
CP 5B
IF RIGHT ARROW THEN
4434
CA6344
JP Z, RIGHT
MOVE THE CURSOR Hir^fT
4437
PV40
CP 40H
XT • THEN
4439
aL6A44
JP ZtSAVE
SAVE THE SCPEEN C« TAPS
443c
77
ID (HL)^
OTHERWISE PUT IT OH THE SCREW
443D
23
INC HL
MOVE OUR CURSOR OVER ONE
44ir
C31144
JP KDIT
AND CWriNUE EDITING
80 Microcomputing, March 1980 • 123
Ultlt\
3A0OllC
lAVt
77
l*W*5
C9
Uti*6
114000
ED52
C31144
W51
W*57
W*59
CD41M
114000
SD$A
C311W*
CD41U4
2B
C311Wi
IU»63
1A67
CDUllti»
23
C31144
tMA
CD8B44
ttitiiD
000000
0470
000000
11473
000000
4476
000000
447A
00
447B
CDC9(V
b48l
Z1003C
110042
i»484
CD4B0r
4487
030044
448fi
CD400B
itt*m
re4c
4490
CAAD44
4493
W4D
4495
CA9B44
449B
011900
449B
210040
44A1
2Ere4l
44A4
21BC:44
44A7
110040
44AA
ED BO
44AC
C9
44AD
21C300
44B0
22D244
44B3
210000
44B6
22D444
44B9
C39B44
44BC
CD400fi
44BP
reoD
44C1
C20040
44C4
21003c
44C7
11013c
4ilCA
oifro3
44CD
720
44Cf
77
4400
EDBO
U4D2
C!)F40B
THIS 13 TKS "RESTOHT' ROUTINE. IT IS CALI£D
EVESmME A CURSOR COHUNS IS PROCESSED TO
RSTOK THE CHARACIXR THAT HAS 'UMDER' THE CURSOR
BBTOHE IT KOVKD.
RESTOS
U) A,(4C00H)
U) (HL).A
RET
car THE CHARACTER
PUT IT BUCK
RETURM TO CALI£R
THE POLUWIXC CODE HANDLES ALL HOVEHENT OF THS CURSOR
INITIATED BY A CONTROL CHARACTER.
UP
DOWN
lEFT
RIGHT
CALL RSTORS
ID I1E,0040H
SUB HLfDB
JP EDIT
CALL HESTOIE
ID DE,0040H
ADO HLfEE
JP EDIT
CALL RESTORE
DSC KL
JP EDIT
CALL RESTORE
INC HL
JP EQIT
PUT BACK THE OLD CHARACTER
64
(HL) - 64
PUT BACK THE OID CHARACTER
64
(HL) + 64
PUT BACK THE OIL CHARACTER
(HL) - 1
PUT BACK THE OU) CHARACTER
(HL) ♦ 1
THE FOLLOWING CODE HAHDIffi THE SAVING OF COHPiaTKD
SCREEKS ON TAPE, NOT THE SLIGHTLY DirTERENT
PRCCEDUfC FOR THE UST SCREEN SAVED.
SAVE
CALL RKADBR
NOP.NOP.NCP
NOPtNOF.NCF
HOP, NOP .NOP
NOP.NCP.HOP
NCP
CALL CTCW
W HL.3C00H
10 DE,4200H
CALLCSAW)
JP START
SET UP PROGRAH TO GO WITH TAPE
MO OP'S IN PUCE CV TEST CCSK
TURN ON TAPE RECORDER
POINT TO START M* SAVED AREA
POINT TO END OF SAVED AREA
SAVE IT
AND BEGIN AGAIN
THE FOLLOHING CODS HAHDU3 THE (ZHERATKM OF THE
SHALL PROGRAM WHICH WIIX GO ON TAPE WITH THE
SCREEKS. ALL SCRSEIC BUT THE lAST HAVE A ROUTIIfB
WHICH WAITS FOR AN 'ENTER'. THEY THEN CLEAR THE
MONITOR AND READ IN THE NEXT SCREEN. THE LAST SCRSffl
WAITS FOR AN 'ENTER' AND THEM CLEARS THE MONITOR
FINALLY JUHPIHC TO UX:aTIOH OOOOK TO IHITIAUZE BASIC
READER CALL XBDIN FEAD A CHARACTER FROM THE KEYBOARD
IS IT AN L7
YS3, DO SPECIAL STWF
IS IT AH M?
YES, SET UP STANDfcRD PROGRAM
HOSE U) BC.0019H WCTtS IN PROGRAH
START GP PROGRAM
T»LL THS-80 ABOUT IT
POINT TO COPY OF PROGRAM
DBSTDiATIQH OF PROGRAH.
MOVE IT IN
GO BACK AND SAVE THE SIVFT
LAST ID HL,OOX SET UP A JP TO OOOOH
STORE FIRST 2 BYTE (F JP
(XT 2 MORE BYTES (F 'S
STORE SECOND PAIR W BYTES
AND GO DO THE REST.
THIS SECTION or CCHK IS NOT EXSCUTKD IN THIS PROGRAM,
IT IS THE PROGRAM THAT 13 STORED WITri THE SCREENS TO
CHAIN THEM TOCETHER.
CALL XBDIN
CP
4CH
JP
Z.UST
CP
4DK
JP
ZfHOB
U)
BC.0019H
w
KL,4000H
ID
(41FTO),HL
U)
HL.44BCH
ID
DE,4000H
IZIIF
KT
ID
HL,003C
U)
44D2H,HL
LD
KL.OOOOH
U]
41U)4K,HL
JP
MORE
CALL XBDIN
READ KEYBOARD
CP ODH
ENTER?
JP NZ,4000H
NOT YET
ID HL,3C00H
SET UP TO CI£AR SCR<:SN
ID DE,3C01H
. .
LD BC,03FFK
. .
ID A.ZOH
CKT A BLANK
U) (HL).A
STICK IT IN
IDIR
CIEAR THE SCREEN TO SUNXS
CALL CLOADO
LOU) NEXT SCREES
Actually, processing the cur-
sor commands is simple too.
The only special thing we have
to do is make sure that the old
character is pulled out of
storage and put back where it
belongs v^ihen the cursor is
moved. A little routine called
RESTORE (only three lines long
beginning at 4441 ts) handles
this. After that's done, we can
generate a new cursor address
by adding or subtracting 1 or 64,
depending on the direction we
want to move.
Handling the "save" com-
mand is trickier. In fact, about a
third of this program is used to
do it. The reason for this is sim-
ple. We want to make our in-
struction screens easy to use.
The most obvious way to
simplify things is to eliminate
any need for the user to do
anything but read the informa-
tion and tell the program when
he's done. So, each screen full
of information has to have a lit-
tle program along with it that
waits for the user to hit ENTER.
When he does, the routine
clears the screen and starts
loading the next instruction
screen.
Because BASIC programs
load differently, we have to do
something different with the
last screen of information. All
this involves is changing that lit-
tle program so that when the
user hits ENTER instead of load-
ing another instruction screen,
the computer displays the
READY message.
Applications
The screen editor can be used
for other things besides making
up instruction screens tor
BASIC programs. With another
program to help it. you can use it
as a sign generator. In a 4K
TRS-80, you can store three dif-
ferent pages of information. The
additional program consists of
a time delay routine and a cou-
ple of statements to move in a
new display. This can be used
for an automated bulletin board
at club meetings, or a cable TV
station could use it for its local
news and weather channel.
Most places tie up a perfectly
good wall and camera on this
right now. You can probably
think of other uses.B
124 • 80 Microcomputing, March 1980
UTILITY
Add your own error messages to Level IL
Extra Errors
Charles Moses
New England Digital Corp.
PO Box 305
Norwich VT 05055
One feature of TRSDOS is
that Disk BAStC describes
non-disk errors rattier than give
a two-ctiaracter abbreviation as
does Level II. Ttiougti Level II of-
fers a number of error com-
mands (ERR, ERL. etc.), making
it easy to write an error-trapping
routine, I wanted one ttiat would
do more.
A closer inspection of ttie
operating system revealed that
for syntax errors the Editor is
automatically Invoked. Looking
over the list of Error Codes in the
Level II manual, I decided there
were ottier errors which might
be corrected quickly by using
the Editor. Consequently, I
needed three things from my
routine: a more detailed expla-
nation of errors; flexibility to de-
cide which errors I wanted to
handle as special cases and
those that Level II could handle
In the normal way; a way of In-
voking the Editor for immediate
repairs like syntax errors.
PRINT Statements
The first is satisfied by using
PRINT statements containing a
one line description of the error.
The second can be satisfied in a
variety of ways, such as in Ex-
ample 1.
The IF THEN statement traps
those errors that you want the
operating system to handle You
could also send all those errors
to the same line number in the
10 ON ERROR GOTO 1000
■ 1000 IF ERR = 10 OR ERR = 120R
ERR = 14 THEN ON ERROR GOTO
■ ■ 1010 ON ERR/2 * 1 GOTO 1020,
1030, 1040 1050 1060
1020 PRINT 'NEXT WITHOUT FOR
tN LINE , ERL
2000 END
-ERR =lErrot Code - 1).2 or ERRJ-
2 + 1 = Error Code ON ERROR
GOTO IS Ihe way you get oul o'
the eiror -trapping routine and let
Level II handle Ihe error.
"Level II will pass over the com-
mas as though Ihey were line
numbers. It ERH/2 + 1 = 's a value
tor which there is no line numlior
you will get a '■?UL ERROR IN
1010" error!
Example 1
Example 2
•■1020 PRINTPRINT SYNTAX
ERROR IN-, ERL. LIST
1030 PRINTPRINT ■RETURN
WITHOUT GOSUB ■. ERL. EDIT
1040 PRINT PRINT OUT OF
2 REM EXAMPLE OF ERROR
HANDLING ROUTINE
MEMORY IN-; ERL: EDIT
■ ■ • 1200 ON ERROR GOTO
4 REM SYNTAX ERRORS WILL
2000 END
LIST THE LINE AND GO TO EDIT
'Line 1040 IS in the seventh posi-
6 REM ALL OTHERS REQUIRE
tion so It IS the seventh error code
THE USE OF THE EDIT COM
Give dillerenl line numbers for the
MAND'L'
errors you want lo handle, give
8 REM TO LIST THE LINE AS IN
1200 for all the others
THE NORMAL EDITOR iERL = ER-
ROR LINR NUMBER
100 ON ERROR GOTO 1000
"' List accomplishes what the
Editor viouia normally do but with
Ihe added iwisl that the line is
110CLS:DEFINTI
120FORU1TO10
already listed lor you Using EDIT
(or synta> errors *iU work eiicept
130 PRINT 1;
Ihai the command is slacked
140 NEXT 1
twice and afler the program runs
150 END
ok, the Editor will try to EDIT the
■1000 ON ERR/J-H GOTO 1010,
line an error occurred on again.
1020, 1030, 1200, 1200, 120C. 1040
(23 codes)
alter the READY appears
■ ■ 'The normal error and/or Editor
1010 PRINT PRINT 'NEXT
will be invoked when this line is
WITHOUT FOR IN-, ERL EDIT
read, automatically.
ON ERR/2 + 1 GOTO statement,
containing the single statement
ON ERROR GOTO O.
Number 3. the most difficult,
was satisfied using another
curious ability of Level II: A com-
mand, like RUN or LIST can be
executed from a BASIC state-
ment like this;
10 PRINT "HELLO''
20 RUN IQ
For the third we will use
"EDIT." (and "LIST.", explained
later) which is supposed to edit
the current line. But. when used
In an error-trapping routine, its
current line is that in which the
error occurred! We can invoke
the Editor by placing the com-
mand EDIT in the program in-
side (he error routine, as shown
in Example 2.
If the program is run and there
are no errors the following
80 Microcomputing. March 1980 • 125
SOFTWARE
FOR THE TRS-80'
NOW!
A LIGHT PEN
FOR THE TRS-80
AND
SOFTWARE
THAT USES IT!
QS LIGHT PEN. We hdve laken the excelieni PtiotoPoinl lighi pen and packaged ii wiih out
own cusium software. You gel the liglil pen, wMich plugs into yULi' tape teturdef, and an
insimction booklet thdt includes the software yuo need to interface a light pen to youi own
BASIC programs. Out software muli n ei are in BASIC and a simple GOSUB puts the hjht
pen in actmn . Two program enamples are included. The "menu select" mode lets yoo set up
selection squates anywhere you wish on the screen. The "screen location" mode searches for
the Den position and returns the screen add'ess to the calling progran^ One 9V battery
required, not included. Light Pen - S19.9S
SKETCH-80T" by Bob Chnsiiansen. Use the GS light pen to draw figures on ihe TRS 80
screen. Figures are d<awn ai three limes normal size. Then save yotir sketch in memory and
start another one. Your sketch can be displayed at normal size or at the enlarged si/e at
which they were drawn. Combine two or more sketches on Ihe same screen. Save your
sketches to tape or disk. You can even ask the computer to print out the POKE values re
quired to produce your sketch. This system program figures out how much memory your
TRS SO has and allocates storage accordingly. Requires level II, 16K. On calotte - S14.9S
THE FOLLOWING PROGRAMS REQUIRE LEVEL II. 16K. AND CAN BE
PLAYED WITH OR WITHOUT A LIGHT PEN.
BGSQE
POKER PETE"^ by Dave Gubser, Play Iiub
card draw poker one on-one against an am
mated PETE, Watch PETE shuffle and deal
the cards. He will challenge you with bluffs,
raises, calls and folds in this winnertakB-all
showdown. And wBlch out ■ -PETE'sgiila
guni Three levels of skill. Written in BASIC,
On cassette - S11.95
LOWBALL POKER by Danny Shea. How low can yuu go' It's you against Micro Molly and
Ihe lowest hand wins. That's the rule m lowball poker. This version plays ttie popular
Gartfena, California rules. Don't take her for granted -- Molly plays an eicellent game.
Written in BASIC. On cassette - S11.95
RUtMMY MASTER by Dave Gubser. Play tummy against the computer. Exceptional
graphics display your hand, Ihe discards, and the cards that have been melded. You see your
opponent shuttle and deal ou! the cards. Tested in an arcade, this program was a big hit.
Written in BASIC. On cassette - 811.95
MATCH CARDS by Danny Shea. BANKSHOT by Bob Christiansen. Two ptogtams on one
cassette. MATCH CARDS is a concentiation type game wheie you match numbets. lettets,
01 graphic shapes. Fot 1 ot 2 playets. Automatic scoring rales your recall ability. Wiitten m
BASIC. BANKSHOT is a billiatd like game fot those who thmk they know all the angles.
Hit Ihe ball into the pocket, hut you must hit a wall first. Written in BASIC with machine
language subroutines. Just CLOAO and RU^i. For 1 or 2 players. On cassette - S9.95
THE FOLLOWING PROGRAMS REQUIRE LEVEL II. WK. AND DO NOT
USE A LIGHT PEN.
FASTGAMMGN"^ by Bob Christiansen, Our popular machine language backgammon game
that started us in business. The computer plays against you and makes good moves instanta-
neously. Option to replay dice rolls ttom the previous game. An eight-page msttuctinn
booklet IS included. Gn cassette S19.95
On diskette - SZ4.9S
DEBUG by Sob Pieice. Debug machine language programs by stepping through one Z 80 m
siruciion ai a lime, flelocalable. Several display options Multiple break points. Modify
memory and registers. On cassette S14.95
Z-80 DISASSEtMBLER by Vic Tolomei. Decode machine language programs, including
THS 80 ROM wilh this 2-80 Disassembler written in BASIC. Instruction mode prints out
machine code and Zilog mnemonics in standard format. Or use ttie ASCII mode which con
vetis machine language code to ASCII. On cassette S14.9S
QUTiLrry soFTWTiRe
6660 Reseda BlvO Suite 103 Reseda CA 91335 ^^^
Telephone ^J tiou'^ seven flays a *eek i213l 3^46599
HOW TO ORDER MasterCharge and Visa cardholders may telephone their otdets and we
will deduct S' from orders over SIB to compeniate for phone charges. Or mail yout order
to the address above. California residents add 6% sales tax. Ordets outside rjorth America
add S5 fot regisieted aitinail. pay in U.S. cutrency.
""THS 80" IS a tegislered trademark ot Tandy Corp
shoulij appear:
1 234 56 7 89 10
READY
i
If there is a syntax error, like
making line 130 read; 130 RINT
I,, this appears:
SYNTAX ERROR IN 130
130 RINT I;
READY
130
You can then edit using all the
normal commands and RUN the
program again. II there was an
error in line 140—140 NEXT W,
you would see:
NEXT WITHOUT FOR IN 140
140 (Type an L'l
140 NEXT W
140 (Use Editor normally)
If two lines are added to the
program; 115 DATA 1,2.3 and
125 READ X, there would be a
number four error code which
sends the error to 1200 and out
to the normal error messages
and response.
''CD ERROR IN 125
READY
Every possible error can be
tested by using the ERROR
command/statement. By listing
a line in the program like 105 ER-
ROR 1 (or 2, or 20 . . . ). your error
trapping code can be tested
directly, without having to
create a specific error.
Conclusion
Using this routine has saved
me thumbing through the Level
II manual to find the error I've
created and saved time by being
able to go directly into the
Editor.
The idea ot the routine was to
trap certain errors which could
be corrected by producing the
error line, but obviously, some
errors cannot be handled that
way. For example, a UE Unprint-
able Error or an L3 Disk Basic
Only, must be corrected by the
operating system.
Also, a LIST ?-? works well for
isolating a cluster of related
lines, for instance a loop, as in
the example program LIST
120-140. Even without the long
statements describing the er-
rors a LIST ?-? could be used to
look at a number of different
sections of the program at once.
The idea is flexibility.!
TRS-80 OUNEftS?
We have a FREE program just for yOu . IDEA SEEDST a rien concept
in software from CECOAT. Each month you can receive a FREE program
for your TBS-80, ready for use and/or customisation, for just a self
add res sed - s lamped en ve I ope .
ACT AT ONCE. ..Send your self addressed-stamped envelope NOW
before it slips your mind! It could be the best thino you have done
for your TRS-BQ Library.
FREE IDEA seeds'! ONLV FROM CECDATl .^62
CECDflT. Inc. P.Q. Bon B963, Moscow. Idaho 838I1J
"TRS-aO Is a registerBd Irademarli ol TANDY CORP "
126 • 80 Microcomputing, March 1980
APPLICATION
How to make sure you
have the right people, in the right place — at the right time.
Duty Roster
Dick M. Straw
891 Michigan
Pasadena CA 91104
If one of your tasks at the of-
fice, in your church or in your
club involves putting people in-
to schedules on a fair, random
basis, Duty Roster will help.
Many organizations can use
an effective but simple way of
sharing the work load. Assign-
ing church ushers and acolytes
to their weekly duties is a good
example. Here, the object is to
try to use everyone about
equally often and to spread
them out as much as possible.
In Toastmasters' Clubs and
others, various tasks are taken
by different members each
week. Making up a month's
schedule can be a problem.
Maybe you want a method to
distribute the necessary even-
ing duties in your store as
equitably as possible, and a
fixed rotation is undesirable-
after all, who wants to be stuck
working Friday night every
week? The Duty Roster pro-
gram will do all of these tasks.
Coding
Written for the TRS-80 In
Level II BASIC, this program
uses about 6K of storage, but
the total will really depend on
how long a list of names is in-
cluded in it. It will assign every
individual on the list to any job
available until the list is ex-
hausted, or it can restrict as-
signments to some jobs to per-
sons known to be qualified to
do them. For example, if the
duties of the chairman of a
meeting are rotated, but it is de-
sired to limit the post to mem-
bers with more experience, a
second, coded option should
be chosen.
In the standard coded op-
tion, individuals with higher
codes can be assigned to low-
er-level jobs, but higher-level
tasks will not be given to per-
sons whose codes are too low.
If there are really separate cate-
gories, so that some persons
should be assigned only to one
group of tasks and others to a
different group of tasks, a sim-
ple change in two program
lines will accomplish it.
The acolyte-and-usher prob-
lem falls into the last basket,
probably. But a little imagina-
tion will point out some other
occasions to use the program.
For example, proper coding will
allow random assignment of
partners for the weekly bridge
club meeting. Should you want
to be sure your daily menu
would include each of the ma-
jor food groups, you could ro-
tate the acceptable choices
randomly to get a varied fare!
As currently Implemented,
four categories, coded 1 to 4,
are allowed. Some Improvement
in efficiency results If fewer can
be used in practice, but more
can also be added. Naturally, as
individuals gain experience,
their code levels can be in-
creased, and job-level codes can
also be changed as appropriate.
How the Program Works
The program uses informa-
tion stored In DATA statements
at Its end. Line 4990 carries
three parameters: the number
of jobs, the number of persons
and the option code (zero if re-
stricted assignments, nine if
not). The data format is differ-
ent for each.
Lines 5000 and up carry the
job names and their associated
codes in pairs (for example,
5000 DATA "CHAtRMAN".4.
"HOST" ,3,). Higher-code tasks
should be listed first for best ef-
ficiency to avoid assigning all
the high-code personnel to low-
er-level Jobs before they can be
used in the higher ones.
From line 51 00 onward are the
^ Rmmdmr Service— se* pMge 147
ao Microcomputing, March 19^ • 127
persons' names in the same for-
mat. The parameters and the
data must all agree with one an-
other in order to make the pro-
gram go. As you well know, of
course, the DATA statements
can be anywhere you like so
long as they are in the right
order. The codes are omitted
for option "nine."
After the preliminaries are
out of the way and you teli the
program to proceed, the data
are read (lines 800-900) and
checked (the subroutine begin-
ning at line 4300). To begin with,
there must be at least as many
persons to assign as there are
weekly tasks. That is not usual-
ly a problem. This check will
also trap you, in most cases, if
you reverse the order of the first
two parameters, although it will
not give an appropriate diag-
nostic. It then counts how
many jobs there are at each lev-
el (if coded) and how many per-
sons on the list are qualified to
fill each. This is reported out. If
the number of qualified per-
sons is too smalt tor a single
weekly roster, the program will
stop at the job level where this
is delected.
Then the shuffling begins.
The random list is constructed
in array K such that each index
number is used only once. This
is done by the subroutine be-
ginning at line 4100. This seg-
ment also zeroes the counters
and resets any negative job
codes in the person-list.
Assignments are taken care
of in the main program. For un-
restricted assignments, the
simple routine begins at line
1100. It reads the random K ar-
ray and places the individuals
index numbers into the assign-
ment array, K2. When the list is
exhausted before the end of the
run, it calls the shuffling rou-
tine and continues on. This
sometimes causes the same
person to be given two jobs on
one day, but if the list of people
is long enough compared to the
job list, that should be rare. You
can eyeball a switch or run it all
over again.
Restricted postings are made
beginning at line 1200. It oper-
ates basically the same way,
but checks to make sure the
person assigned has a high
enough rating tor each job.
When an assignment is made,
Duty Roster program.
56 CLEAR jeee as
ee ON ERfiw cCTo 45ee
70 DEFIMT H-n DEF5TP G, '■
tee F=«IM7 CHR*'J2)
lie PRIMT93:;4, -Dirrv tOETEt ■
ise foKi-iTpwe K-i rtxii
138 CLE PBINT-'THI? PBOOPflH WILL fKSI&W .'GES TO IWIVIOUflLS ON-
13? pciMT-R RfMXir ce STRfiTiFiEc. RWJDon Basis ■
;4e F>RiNT INPUT-DO vou itfi^ ft brief fWMRfin MSceifTioij" p?
!5« kCPC H. n. LB
lee tjin gcn> L'N'.Pfni.ij'ni K<"i,K2'K,4i hxa^
i7e REti G'joes. L>Joe cqoes, p-PtffsoNS, l2-persdiw cooes
ise Bzn t-RfwooH list, ki-ossicwmentj. H-coynTERS
;«e roRi'iTon lo-b
2IB FOBJ^lTOl K2iI,Ji-P
22» rJE-TT J, 1
27e FORi'iTon L2<!)»e k'iwb ttyTi
388 IF ftSC<P9)-e9 GOSue 488
;ie GOTO Tve
4ee Rfn PROGRfln description
4ie PRINT PRINT-THE f^tOGBflU PROVIDES CUTV ROSTERS FOR FOUR PERIODS (WEEKS),'
426 PRINT-BHSED OH fl RRNCWMIZEti LIST IF THERE FIRE NOT ENOUGH PERSONS'
430 PRIMT-LEFT FOR TVC NEXT ROSTER, THE LIST IS RE-SHLFFLED '
435 INPUT FOR MCftE. PRESS ENIER'-PS
440 CLS PRINT-IN Ott ORTICiN, EVEBV PERSON IS ELIQIELE FOR «LL J08S "
43e PRlNT-lN T* OTfCR. JOBS «ND PERSONS «R£ COOEf TO RESTRICT-
468 PRIfVT-RSSIGWtNT TO SOft JOBS TO MORE IXWLIFIED PERSONS "
478 PRIhfT-H PERSW CnwCT BE BSSIGWD » HIOtCR-CODE JOB, BtlT-
468 PRIMT-r»*V BE GIVEN ft LO«B-C00t JOB TUO SIW1.E «X 1 F I CUT 1 ONS "
498 PBIMT-WILL RSSIGH PERSONS ONLV UITHIN TktIR CATEGORIES ■
5ee pRiNT-nssiGtCD coots rre ersilv mocified jobs or persons"
510 print-limited to one ossigwcnt sholld be otiitted fro*i lists "
520 print PRINT-PROWWI PPRflTtTERS «RE IN D**TFI LI»C 499* "
530 PRINT-.Ice r**CS Find CCC€S F«E in DfiTFi LIWS STARTING -(T 5888 '
54e PRINT-PERSONS flW COCES fWE IN LIW5 5180 <*t> UP •
55e PRIHT-Sflf»=LE DflTR FOB TRIfIL RUN ARE INCLUCED FOLLOU Tk€-
568 PRINT-EXflnPLES TO ENTER VOL* OW DfiTfl OflM NUTCRIC COOES*
578 PRIMT-FOR NO-RESTRICTION OPTION COOCS 1 TO 4 «LLQMED "
580 RETLRN
700 PR!NTTFei5>. If#^T-fiRE VOU REF»V TO PROCEED <V/N)-,P9
riB IF RSC'PS'-eS GOTO 608
?Ze CLS PRINT PRIHT-HLL RIGHT, UWN VOLJ HRVE ENTERED THE DATA, JUSI"
730 PRINT-'BLfJ' THE PfiOGRW OGfllN BEHEfBER TMHT VCKJ CRN CSPVE'-
748 PRINT-T« PROGPFW WITH THE ORTR TO JSE RGRIN LATER "
768 STC*>
880 CLS PRINT-REflDIMG [WTR"
ni0 IF Le-e goto 858
820 FOR I-l TO N
622 REPT G(I)
624 «J(T i
338 FOR I-l TO H
ei2 REfiD P(I)
334 f«XT I
340 GOTO aw
ese FOR 1=1 TO N
352 REPHO Gcn.Ldl
65* NEja I
360 PCS 1-1 TO n
862 RE«> P<1'.L2<I>
S64 (CXT I
550 GPSue 4380
5108 QOSLiE 4188
?1B PRINTHORKIMG ON THE ftSSIGWCNTS"
leee if Le-e goto 1200
1090 REH unrestricted FtSSK>«1ENTS
1108 FOR 1?*-1 TO 4
me FOR J9»i TO u
1120 K21J9, I9)=f:iHlBO
1130 H<0)-H<e) + 1 IF K(e' .■ M GOSL* 4100
1148 NEXT J9
1150 rCXT 19
1168 MiTf! 2eW
1190 REM RESTRICTED RS-SIGWtNTS
1200 FOR 19-1 TO 4
1285 IF H > H-H<e> TfCN GOSUC 4180
1218
1228
1230
1240
1245
125e
1260
1270
1272
1274
1268
1290
1308
FOR .t^-^l TO N
L1«L<J9)
Ki= t;(H<Li>)
IF L2<K1) >■ U GOTO 12?P
REM FOR CiNLV-IH-CSTEGOPV. CHHNGE ■-' TO - IN L
H.Ll '-MiLl 'tl IF HiILl' -- M GOTO 1218
H-Ll '=1
FOR I=1'0M
IF L2<I '= -LI THEN LEI L2U>= -L2el)
HE-.'l
GOTO 1230
''2iJ9, I9'»K1
L2'K1>' -L2'KI>
H<e)-H<8>«l
200C
2818
2028
2058
2068
2070
21 ee
2iie
3080
3818
3828
3038
3040
4808
4180
4110
4128
4138
-1148
415e
4160
417^
4180
4190
4288
4308
4318
4320
4 330
4348
4358
4370
4368
439©
4395
4488
4405
441B
-1415
4420
4425
4438
4435
4448
4445
4458
44«8
4470
4588
4510
4528
4548
4560
4910
4928
4998
4995
5000
5010
5095
5180
5110
5128
5130
5148
FCS 19 = 1 10 4
Cl^ PR1NT-«R£ HRE TW ftSSia#«NTS FC* ieEtCI9
fS:NT TWC?), ■JCie-,Tf€l'35>. -PERSC**-
FCit J9'I TO N
F*IH' c.rf.! THe'-2e>,P(K2<J9, 19)1
HE XT .1?
IHFIIT-UHEN REfiOV PRESS EMTER-,P9
HE>,T i<^
CLS F'RI"ICHRt'22)
PRIHT9:30 "HOPE IT WHS HELf-FUL'
FRlN1»47a, ''THE END"
FCiRI=ir05B6 K«l rCXTl
CLS
END
RfiNfiOn PRlNTSHLIFFLIIrti-
FOR 1-1 'U M
KSiRTJDiM I
FC* Jjl ID 1
IF K' ] '=K^ GOTO 4120
NEXT )
k' I '=K5
HE/T 1
Hil)-1 «XT I
L2(Il-flBSiL2a)> WXT I
FC«-
"joes
FOB |teT04
FOR I=1T0M
RETURN
PEt" CMECUNG RC"-'']'*
PRINT'LHECHHG [■fiTR"
PRlPJT-vmi HRVt- 1 -PERSCitIS
IF M = N GOTO 4:-7e
pftiNT-ME cnmcn f'roceed lmless there is fit lefiet one psrson-
PRINT'FC*' EHCH .IC* SUGGEST vai tED£FI« JOSS ■ STOP
FOR 1-0104 H<l>-6 NEXTI
IF LB'? GCJTO 4470
FOR I'l TO N
IF LUXl OR L(I)>4 PRINT.IUe CODE OUT OF PHNGE ■ 5T0P
H(L(!)) • mL<ii)*i
NEXT I
F(* 1.4 TO 1 STEP -1
FC« J-1 TO N
IF L2(J)<1 OR L2(J>>4 PRIMT-PEPSOli CODE CUT OF P«IGE" STOP
IF L2<J)-1 T>CK HfOltJCOHl
ne>:t J
PRlNTT«.(5"'.H''ej "PERSONS CF*- I(*E JOBS OF LEVEL". 1
ir H, e> " ^ H' I I GOTO 4450
PflN'-NCi"' ENOUO" PERSONS QL«ilTFIEO FOR Tf«SE JOBS" STOP
C€M IF C»ILV-IN-CfiTEGC*V WFlNILi IHSEC' N-0---8 HERE
NEXT I
RETLIRN
(Jtri ERROR •**ltiLl'*C
IF ERR-24 C* ERP=2 PRINT"vt«JR C-RTR "*€ HOT E'/TER£[' (■(. :iF fc i, l V "
IF ERf-€ PRINTNCT EHC.IGH DRTB -- '.HECt RHD Rt^TORT- J'CiP
IF £RR:B I*N F9---V CESLWE
ON ERR-OF GOTO C-
REM WTR LINE 499* H«5 N-i CF lOeS- M-» OF PERSONS, no
REM CODE FOR OPTICPfl. 8 - RESTRICTED 9 - HOT RESTRICTED
DRTO 7. 20. e
REM ,108 DRTR FROU LIME 5BB0 nn HIGHEST COPE .TCCS FIRST
DRTR ■CHHIRDHN". 3, "SECRETRRV. 2, "SERQEfiNT-RT-FlRME". 1
[)flTR"LE«>ER 1" 1, "LERDER 2".l "LEADER 3", 1. -LEADER 4-.1
REM PERSON DRTH LINES 5100 ON
DATR " 10HES". ;, -SMITH" 1. "STONE" 2, "HRRDV 2 "WALLACE". 1
DATA -EVAMS', 3, "ROttRS" ? 'APAHS" 1 -UHIT£- 1 "CASEv- 1
DATR-OUIMTV-. 2, -CROSS". 1. "WILLIAMS-. 3. -CIS* ■■ 2 "OUENS-,!
DATR- JHCKSCW. 1. -JOHNSON". -:, -TRVI^CiR" 2 "TRNC'V 1
[>ATti "BflX- 2
128 • 80 Microcomputing. March 1980
the individual's job-level code
is set negative so he will always
be ■■unqualified" for subse-
quent jobs until a re-sort and re-
set occurs. If not enough per-
sons remain unassigned for a
whole day's roster, the list will
be reshuffled.
Customizing the Program
Because there may be fewer
highly qualified persons than
are needed for the full four-
weelt array of rosters, an inter-
nal adjustment of the counters
and codes allows those premi-
um individuals to recycle more
often than the rest. The count-
ers in array H, by the way, allow
the search to begin where it left
off last time.
Then everything is printed
out a weel( at a time by the seg-
ment beginning at line 2000.
The job and people's names are
accessed with the index num-
bers that have been shuffled
around up to this point.
In order to assign persons
within a single category only,
two changes are needed. One is
to change the ■greater than or
equal to" symbols in line 1240
to "equals." The counter in the
checking subroutine should be
set baci( to zero at the end of
each loop by inserting line 4450
H(0) = 0.
Since out-of-range codes are
trapped, the number of valid
codes can only be increased by
changing the dimensions of ar-
ray H (line 160) and the indices
for loops that use the code
levels, at lines 4180, 4395, 4410
and 4420. The number of weeks
allowed can be increased by
changing the second dimen-
sion of array K2 at tine 160 and
the statements that use it — 210.
1 too, 1200 and 2000. All other ar-
rays and loops are set by the in-
put parameters.
Although the program is writ-
ten in Level II BASIC on the
TRS-80. there is little unique in
it- The special features that are
used are either nonessential
(such as the 32-character dis-
plays at the beginning and end)
or are easily written around.
Two string arrays are declared
by a DEFSTR statement at line
70. Conversion might require
seeking out the few places the
string arrays are referenced (in
the dimension statement at line
160. the reading statements be-
tween BOO and 900 and the
printout routine beginning at
line 2000) and changing the Gs
and Ps to G$ and P$. The guts
of the program are standard
BASIC.
Now, when you rotate the
kids among the dish-washing,
yard-work, car-washing and
dog-walking chores, at least it
can be purely random and
fair.H
IBM SELECTRIC PRINTER
TIS II IITEIFICE Tl It tSl PIIITEI
TTrEIIITERS HIUIITEO
..-•136
TRS-80
SPEEDUP BOARD
REVERSE VIDEO
SPEED MOD - Vm don't hiv« Id iptni) %3 iW gn i THS-80
Modtl 11 ID oal t»Mr camputing No* yMi can ipMtlup irovr
L«ve< II THS-BD - Diili ivitimi >nciu0«d' - by up Id 100\
[50% guMMNMd) w<tti Mil ipMduii bnrd Tr>i tetuR a more
iwmilll] prsphkl. ihoriei progrim run timii ind gan*ril)y
Itf BrMMr cgmputlng pDwei for your dollir Chjnge bi1w«in
nnrinil ind IdlOf nporition by uiing i iimpla BASIC slalemant
The cofflanli of rnamorv an not atltcled by spMd cnangtj inO
a iwUcIi II not required \i swllch may be milallad il manual
(peed lelecT ii deiirgdi Changes are provided lor NEWDOS.
Das ; ?. artd DOS 2 3 that allow ditk lYiIimi lo run reliably
■t both the noimil and iccetented rjte Buy the moit vefsetile,
eaiietl lo inttall. and mnit publicty recognized spatd mod
(HI the mirk el today
ASSEMBLED & TESTED t24.95
REVERSE VIDEO is liniHy hefs > II you ri tired ot going Dturtv-
eyed looking il your video diipiiy. then you ire reidy lor
reverie video I1 pruvidei dark hlacii cniiacteri and iraphic;
on an all while screen lot a much ctispe' and much taiier to
lud (KeienUtiofl Change btlwMn normal and revtrsa by
limultirwouity preising a combination ol three keys on ttte
keyttoird
ASSEMBLED $14.95
Add 5% tor postage »nd handling
CmHIornia fsidmnts add S^ salas lai
Bill Archbold Electronics
DtpiaO • PD Boi7123 • SaciemeMo C« 9SSZ6
(916) 3G7.3G7T ,^122
I Ailianteii Scientific Software fof I
TRS-80 and NORTH STAR
MATH Librar y I
22 auahly o'ograms ireq 16K| including rool ot
equalions. integration, dillerenlialion smiulla
neous equations, matni operations, mterpola-
lions, regression analysis (linear, polynomial,
mulliplel, ordinary dillerential equations, parlial
differential equations, statistics and plolling,
wilti manual
TRS-SOdisk 125,
TRS-SO, LevBlll tape S22.
North Star disk (singia datiaity) $35.
ODE Master
Solves single and simullarieous ordinary differ-
ential equations, can dandle even alill' prob'
lems, error control and tormatted output to CRT
or prinlpr, with manual
TR5-B0Leveni.16Klap«
NoMh Slar disk {single dansily)
SIS
S2C.
Custom Softwara lor aducalion or ptolassional
us« is available.
III*. liCC
L?f*iy Ihumj'
►-110
I'liil3d,.]nhij y\ iy|4> (215l T4K-t558
BREAK THE 16K BARRIER!
Med Systems Software at lasl provides the TRS-80
user with a 16K RAM resident mmology Oata base
management system that tar surpasses any com-
parable solt*are on the markel loday Ttiis system
maintains drink recipes in an encoded formal wlnich
greally eipands the apparent on-board storage
capabilities The data base comes pre- initialized
with t02 full page recipes of popular mined drinks,
eacfi complete vnth ingredients glass type, rnmng
instructions garnishes, and cross-reference lo 14
caiegories
User additions to the data base are easily accom-
plisfied and tufty explained m the accompanying
booklet The Baste Banenaet Each order is shipped
with a two week money-back guarantee and an
extra C-10 cassette tor back-up copying All orders
are mailed within 48 hours
TRS-80 16K Level II cassette S9 95
N C residents please add 4*( ta»
-TRS-K i< ■ r>B'>l*rM trK)*in*rk ol TANDY CORP,'
Med Systems Software
PO Bo« 2674 Chapel Hill, NC 27514 ^,2B
Theee popular, profeselonally developed
applications are low-priced. Guaranteed
performance I Detailed booklet included.
• BUDGET a. IN'VESTMENT S17.95
• BUDGET S. CHECKING Sli*.95
• HO^E IKFO RETRIEVAL S1 1.95
• MATH {agBE 5 end up) S 7.95
■ STOCK PORTFCLIC Sie.95
■ A'JTOMOBILE 112.95
• CJiSTERWIND game S10.95
■ KOKTE CARLO game S 7.95
• and others from % 4.95
Send order, or SI. 00 for descriptive
catalogue {free witri order) to; i^ll6
NEVVBV SOFTWARE DEVELOPMENT CO
199 DAWLISH AVE TORONTO, CANADA M4N US
i^ deader Service ~ see page 14?
80 Microcomputing, March 1980 • "129
HOME
Want to see how much you spend each
month? This program plots time versus rate.
Graph Plotter
Scott King
7905 59th Ave. N.
New Hope, MN 55428
Have you ever had to create
a need to put in front of
your solution? That was my
problem. After I spent the
money for a Level II TRS-80
{16K), my wife said, "Kind of ex-
pensive for a Star Trek game,
isn't it?" I had to accept the
reason 1 bought a computer: it
was really neat.
For those of you who join me
in the middle-to-low income
bracket, "really neat" is hard to
justify to the wife and the
budget. So I set out to create a
need for the computer that I
already had.
One of the returns on my
endeavor was this program to
display my gas, electric, water,
etc., bills on a time graph so
that i might compare the bad
months to the good ones,
Program listing.
10 REM *»**♦ TlriE''RflTE DISPLfiV PROGRHfl *••♦
20 REM ♦•*•* BV SCOTT KING 2/16/79 **■■*
30 REM ••••• TRS-80 12K BRSIC ••*+
40 REM •»«a««»»<«i«*«i*«i<<***«*****4L^^4'4'*^*^«*«
45 CLS
50 PRINT" TIME/RATE DISPLHV PROQRflM
55 PRINT" PRESS ENTER TO BEGIN ". .INPUT RH
90 CLERR 1000
106 DEFSTR fl. B, C, D
110 DIM R<?5)
120 N-1
130 INPUT"ENTER X HXIS LR8EL ", B
140 INPUT'ENTER V «XIS LABEL "; C
141 IF LEN<C)>15 THEN PRINT" THIS LftBEL IS LIMITED TO IS CHflRflCTERS" GOTO 146
145 INPUT"ENTER FIRST X RXIS INCREMENT I E. JHN MOMPRV ETC " i D
14S INPUT " WILL THERE BE MORE THAN 16 ENTRIES MfiDE", RH
149 IF RH<>"NO" THEN Zl"l
150 INPUT" IS THERE R TRPE TO LORD". RR
160 IF RR-'-NO" THEN 200
170 INPUT" LORD THE TRPE RND PRESS ENTER"; RH
171 INPUT«-1,B
172 PR1NT"X- RXIS -".e
173 INPUTB-l.C
174 PRINT" V- RXIS »". C
175 INPUTtt-1. [i
176 PRINT"FIRST X INCREMENT". D
177 INPUT«-1, Zl
178 IF Zl=l PRINT" HIGH DENSITV DISPLRV
130 INPUT»-1. R<N'
185 PRINT N. R(Ni.
190 IF R(N) = "ENC." THEN GOTO 200
195 N=N+1 GOTO 186
200 INPUT " ORE THERE RNV ENTRIES TO BE MRDE "; RR
210 IF «fl»"NO" THEN 240
220 PRINTN INPUT "ENTER DfiTH AMOUNT"; RCN:'
230 N-N*-! GOTO 200
240 R(N)»"EN[i"
250 INPUT"DO VOU WISH TO CHANGE RNV ENTRIES"- RR
251 IF AA="NO" THEN 260
252 1NPUT"ENTER NUMBER TO BE CHANGED"; N
253 1NPUT"ENTER NEW VRLUE"jR<N>
260 CLS
270 M=l
271 PRINT "X" "i B
272 PRINT "V= ". C
273 PRINT "X STHRTS RT "; D
280 PRINT M.RiM>. : IF M<»=N THEN M=M+1 GOTO 280
290 INPUT" DO VOU WISH TO SAVE THIS OATR ON TAPE"; RR
300 IF AR""NO" THEN 350
305 INPUT-SET UP R TRPE FOR RECORDING RND PRESS ENTER". RR
310 M"l
311 PRINT4I-1, E
312 PRINTH-l, C
313 PRINT#-1,D
314 PRINTt-1, Zl
320 PRINTII -1, R(M>
330 n»M+l IF M<:=N GOTO 320
check to see if my energy-
conservation measures were
doing any good and plan ahead
tor bills that fluctuate through-
out the season (e.g., my gas
bill).
The Program
This program was written on
a TRS-80 Level II, but with minor
changes, it will easily run on a
Level 1. It is designed to plot any
two sets of numbers on an x-y
type graph. The x (horizontal)
scale has two different resolu-
tions, 16 and 75 points. If you
are working with the high-den-
sity scale (75 points), you can
"blow up" a section of it for a
better look.
The y-axis (vertical) Is self ad-
justing. Its lowest resolution is
to 20, but it will automatically
adjust to the largest number to
be displayed.
Operation
The program starts by asking
you to label the x-axis (for this
example we will use months,
but it could be days, weeks,
hours or even, in some cases,
people, money, cars . . . any-
thing, as long as It doesn't ex-
ceed 75).
Next, enter the y-axis label,
which may not exceed 15 char-
acters. We will use kilowatt-
hours (kWhr) for this example.
So this graph will be a plot of
kWhr used over a period of
months.
The next entry to be made is
the starting point of the x-axis;
we will begin ours at January
1979.
Now the program will ask if
130 • 80 Microcomputing, March 1980
there is an old tape to load. If
this is the first time you have
run this, then enter no. But If
you have data, load the tape
and dump it into memory.
If there are any manual en-
tries to be made, such as a new
bill arrival, then enter them at
this juncture. Next, you will
have the opportunity to change
any entries previously made.
After all of this has taken
place, the computer will display
the current data and ask If you
wish to save It on tape (which
you should do). When this is
done, the computer will draw
the graph, go through the y-axis
automatic scaling and plot the
data on the display. The graph
will stay until you press ENTER,
at which point it will asl( if you
would like an expanded view of
any section.
Conclusion
I have found this program
useful In keeping track of my
bills, but it could easily be used
to plot a curve for any situation
where you have both time and
rate numbers. ■
ISe RErl ••• PLOT DftTft •**••
151 CLS
3Se S-LEN(C)
370 U-1 T-e
380 PRINT«T, niDSCC. U. 1>
390 W-U+1 IF U>S THEN SOS
400 T-T+S4 GOTO 380
5»e PRINT a 970,8." STRRTING UITH ", D^
^le FOR X-5 TO 110
529 V"40 SET<X, Y> NEXT
530 FOR V-e TO 43
546 X-5 SETiX, Vi
541 X-110 5ET<X, V)
542 NEXT
543 IF Zl-1 THEN FOR X-ieTOllO STEP 2,V-41 SET CX,V):NEXT
546 IF Zl-l THEN 350
547 Q-899 F"l
546 PRINT9G, F F-F+1 0-O+3 IF IK945 THEN 548
550 QOSue 650
555 GOSue 700
ste x-10
570 FOR V- 40 TO <4B-<VHL<n<N) )-^) ) STEP -1
575 SET<X, V) NEXT
577 IF 21-1 N-N+1 X-X+2 : IF HCN>-"END" Tt«N 600
578 IF Zl-1 THEN 585
S80 N-N*l X-X*6 IF nCN}-"END" THEN 608
585 IF <Z1-0>«ND<N>16J THEN 600
586 GOTO 570
BCif INPUT f4«
620 INPUT " DO VOL! WISH TO SEE fl BLOWUP OF ftHV ONE SECTION", ftfi
621 IF ft«-"MO" THEN RUN
622 INPUT" 16 PLftCES HILL BE OlSPLftVED . ENTER FIRST POINT TO BE SHOWN"
625 FOR V-ITOIB R<V)"ft<M3 IF HCM)-"END"THEN fi( V>-"END" : GOTO 625
624 M-M*l NEXT
625 fl(V>--ENC>" Zl-e
626 GOTO 350
650 REn •••• SIZING ROUTINE •••••
655 K- 5:11-1
660 IF R<H>-"END- RETURN
662 IF n>74 THEN RETURN
665 2"V«L<fl(I1>^
670 X*Z/*.
675 IF X> 4^ THEN K^K*- 5 QOTO 660
680 n-M*! GOTO 669
700 L-57 H-4e
710 PRINT 9 L. lNTCH*K>i
728 L-L+64 H-H-3
730 IF H>-0 THEN 710
740 RETURN
Diskette
SALE
WE WILL NOT BE
UNDERSOLD!!!
Find the best price you can in this
magazineonaboxof 10, 5% "Verbatim
diskettes and
ILow diKounI price - U6.M>
THAT'S OUR PRICE
SicrssQi
4B38 Park GrwHMta 159
CalabBsas California
91302
U13]
Offer good as long as supply lasts.
Please add 5<f shipping in the Continen-
tal U.S.
SUPERIOR SOFTWARE PACKAGES
FOR THE
DISK BASED
TRS-80
THE • $79.95
SMART TERMINAL
• TRUE BREAK KEY
• AUTO REPEAT KEYS
• PROGRAMMABLE SOFT" KEYS
• MULTIPAGE SCROLLING DISPLAY
• FULLY CONFIGURED FROM KEYBOARD
• TRANSMIT SCREEN. PRINT SCREEN
• TRANSMIT FILE, RECEIVE &. CREATE
DISK FILE
• FLEXIBLE I/O LINKAGE CAPABILITY
• MULTI PROTOCOL CAPABILITY
SPOOL-80
$39.95
PRINT YOUR LISTINGS WHILE RUN-
NING OTHER PROGRAMS
DISPLAY +
$49.95
FULLY SCROLLING DISPLAY DRIVER
AND HIGH PERFORMANCE KEYBOARD
DRIVER USED IN THE SMART TERMINAL
AVAILABLE SEPARATELY.
MICRON, INC.
10045 WatartORl Dr.
E]»cot1Clty,M021043
.^73
001)461-2721
MC/VISAKcapted
3m
ad commNs
5^^i^^
5X" Diskettes
10
SO
too
3M -744-0
3.15
255
2-85
VertMlIm 525-01
2.65
2.45
2.30
8" OiskattM
3M-740
3.05
2.85
2.75
8" Double Densitv
3M-741
4.15
355
3.80
Diskette Slorage Pages 1(V3.9S
Plastic Library Cases 5"-1.95 8"-2.85
CASSETTE TAPES - Agfa PE 61 1
Prvmium quality in supwior 5 scr«w Fwusing.
C-10 10/5.65 50/25.00 100/48.00
C-20 10/6,90 50/30.00 100/57.00
TRS-80 AdMntum by Scott Adams
Machine Language Clasitcs for 16K.
Seven Ariwentures currently available.
SALE! $12.90 each, 3 for $35.00.
NEW SARGON II Chns ITRS-80 cassette)
regular price $29.95 -- our price $2450
Add $1 per order Tor shippirvg. We pay
balance (UPS surface) on all prepaid orders.
"TRS40 to ■ reglateced IrKtemarli ol TANDY CORP.'
A B COMPUTERS
115 E, STUMP RD.
MONTGOMERYVILLE, PA. 18936
<21 5)699-8526 ^a^
WRITE FOR COMPLETE CATALOG
t^ Rmadtr Samcesoe pagm 147
dO Microcomputing. March 1980 • 131
HARDWARE
Keep all your wires out of sight,
but under control with this cabinet idea.
Box It In
John Zainerunas
3034 W. Columbus Ave.
Chicago IL 60652
Ever since my TRS-80 was
delivered, the problem of
strung-out wire, cables and
components taking up too
much of my already limited
space kept cropping up. This is,
no doubt, a problem with many
computers, particularly home-
brew systems, but it should not
be a problem with a fully
assembled store-bought unit, t
was determined to correct this
before attempting any serious
programming.
A console "walnut veneer"
custom TRS-80 is shown in the
photo. It is portable, turns on
with one switch and plugs in
with one cord. It even has a
tape-recorder control switch to
bypass the computer.
The "power on" and "tape
control" additions were taken
from previous issues of Kilo-
baud, (see Lien and Water-
man's articles, "Cassette
Recorder Disaster: Ground
Loops," p. 110, May 1978, and
"Turn It Off," p. 114, April 1978)
The visible part of the con-
sole is constructed of walnut
veneered, shelf boards. These
boards have a brown-grained
appearance, a good match for
Computing is more organized and professional with a homemade
console for your TRS-80 system. The author's son Paul illustrates
how relaxing programming can be
®
©
-U-
NOTE All «000 PINE.S "BE !/•" Twi:" , ElCEi'I {g , WHICH 'S i/4" -hic«
Fig. 1.
^k-^
(e) END PlMtL
SjPOOB' 12 HEQ01
BBUCE liBEODl
the silver gray and black of the
TRS-80.
I used a 314 inch plywood
panel for the full one-piece bot-
tom support and wood-stained
all visible edges to match the
walnut veneer color.
You can use pine boards in
place of the walnut boards, if
desired. These can be cut into
panels and covered with a
wood-grained "contact paper."
Later you can add some metal
trim for a professional look.
Construction
Start by cutting up all panels
to exact dimensions as shown
in Fig. 1, Drill holes and make
up the required amount of each
panel as indicated. Mounting
screw holes are not dimen-
132 • 80 Microcomputing. March 1980
sioned but can be positioned
approximately as in Fig. 2. Use
a #8 or #10 brass wood screw,
IV2 inches long, for all mount-
ings.
First assemble both (A)
panels to the bottom plywood
board. Pre-drill holes, apply
white glue to mounting edge
and screw panels together. You
can recess the screws so they
can be tilled in with wood putty
for a neater look.
Mount the top monitor panel
(C) next by applying white glue
and screwing this panel to both
side panels. I even used white
glue on all screw threads for ex-
tra holding power, since the
walnut panels were made of
particle board.
Now glue in the two small (E)
supports and the center brace
(F) to the bottom plywood. Use
a two-part epoxy glue so mount-
ing screws will not be re-
quired.
A simple bracket for the mini-
jack can be made as shown in
Fig. 2 and mounted on the left
side panel. A spring plate is
mounted on the center front
edge of the plywood board.
Press this plate edge into the
slotted seam of the keyboard to
hold it in place. Use two of them
side by side if needed. I used a
plate made from a piece of 020
phosphorous bronze.
Final Assembly
Place your tape recorder over
the center brace (F) and push it
under the monitor panel. The
recorder should fit snugly, right
up to its counter switch. (Add
shims to brace, if required.)
Wire an SPST switch to the
left end (D) panel for recorder
control, as shown in Fig. 3. Now
epoxy this panel in place.
Epoxy the right (D) panel and
hold down in place with some
weights; screws are not re-
quired.
Place your computer key-
board over the plywood panel.
Connect and route all cables as
shown. Push the keyboard for-
ward to check the fit. You prob-
ably will have to carve out a
small part of the right side
panel (A) to make a better fit for
the far right cable plug on the
keyboard. When a good fit is
obtained, push the keyboard
fully forward and attach the
locking spring plate. This
spring plate allows the com-
puter keyboard to be moved
back slightly to get at the reset
and off/on switches when re-
quired.
If you decide to mount the
monitor permanently to the top
panel (C), use #8 wood
screws — 1Vr inches long with
large washers and mounted
from inside of monitor case
(through slots), one in each
corner.
With the console completed,
programming is now more
enjoyable.!
SWtltG PL»TE
UNDtOSlDe W
LEFT PSNCL
IRS-aO PULLID MCR —
TO SHOO WIRE POSITIONS
Fig. 2.
-e*tK END OPEN
NOTE. PUlCt liPE
SECOROeH OVEB ©
SUPPO"T TO LOCATE
C(«CT FOREWORD
POSiTON BEFORE
GLUING M PLICE
-WEDGE fOmH
SUPPL' IN WITH
CLUED WOOD
■lOOWEO I
■ a** I
, ^■J■ • — 1
^t-^
-NOTE TOP END
PUNELS ®
REMOVED
(TOP VIEW)
Fig. 3.
DEBBYMAE
rn«* m ■EKDlulely no li»y» or riMdi lo pre*fin».
TTiua, yAi pan oittf u muctv V « Utll« inlormation
n a nCjcct u you wuA •itrxut BUIinc Mr Ip«*. You
I »cn bnp iHo or mon dal* Uwi in tht tamr file.
DEBBYI interHI^n nHinnalrond format maaci il fun
and cai4 Tor anyvie id mlvr. chanfe. relrvivr <r <Mrlv
infitf malion. yrl ran ea&i^y M change: 10 fkl particular
iHFib «■ 10 iDoh mcTF "businaaUkr." Hard copy of a<iy
or aU inrorinfllior reEri«v*d 19 at the uaarS option.
DF.HHVMAE-l unique tialurc 1,1 anaulomitic iMtcimc of mc»i
nvw mlfy. TTn* wphuticatefl fro*i-indriin< syiteoi
alJows fait iinflt-oommamJ rilf.».al Df a linflc (ner*
o( information, ail mlnn on IM umr n«i|«l. all
infonnalion of trw h^» iyp» (or all »ubje«i, iim.lar
infwmatier on all mOjittj na a s*"^'*" mSTH waroft.
and miKti morr, OEBBY i«n [nf formi anaJo(i«, »«1 alien
tin retrieval of ilala "fien you can't feeall ihi si*i#ct
uniter "fiiefl il"! tiered. lEing a -<wery D» Maniple" tor mat.
InifKirt, UEBBYW1E is an lOeal mlormation alorafe and
retrieval device fcr almivT anyone who iwe'to 10 recall
varyii^ type of inlormalion atnil • number of w>i)ecls.
Obmous applicalioiu are foe salesmen, miniitcrs. and
similar profeMioni, But DEBBY can saliify mrluaDy any
I I Dragee retrieval application -fhicri docm't rei^uirr
i-omputitlo«i, including invenlory control.
Vodel I lt«li. ipecify I or T. disKt) 1 M.HII
Model 1 listinf » manual 1 SO.OO
MamiaJ only tanrlie; lOHBrd purchsiel 1 10-l>a
Voael U ls»li. ^lecify 1 or 1 dulol t IM.OO
NONPAREIL SOrr» ARE
tllM W. Vir^ Kr«< ^ | 27
ndM, OklahMH T«ir7
mil n*-4iM
y' R»ailmr SwviCB— s«# fM0* 14T
Adventure
^LlnLemaLionalj^^tJ
"Highejl rated games die the Adventure gafT^es".
Robert Puner Eitition 7 CCH
Declared a true "Classic"
Computer dsselles Review, Fall '79
"Adams' Adventure li enquiiile. It !S a true
lou'-deto'ce . .
Recreational Cornputing Sep/Oct '79
Out o) 50 programs revievKec) Adventure was
rated No 1' "Highly Recommended"
80 Software CrniQue Isme No. I
"I highly recommend these prograrri'"-
80- US Jouriisl, Sept /Oct '79
Adventures by Scolt Adams ate available from
our many tine Dealers for TRS-80, Pet. Sorcerer
and by Christmas, the Apple II'
Write (or free flyer - Each Adventure SI 4 95
Adventure International
Box 3435 ^97
Longwood. Florida 32750
COO/ Visa /Maslercharge - Call (3051 862 6917
CdmpuCquea'
COVER YOUR INVESTMENT
■ Ooin Banad HaMtainvaa Vinfi • nVatwc-aor t. Ouaipnvl
< lunprokad l^iablliTT « Tnraa DBCValar CoWi
• uiogai Liia saddiaTaii-eiacifaBiua- Bia
•mill
Ml iK
Tm " a
:eii»q«ili
■ n>
lafcuj vt
laaaMAafav^wtVH: QanGlX« »^ 100
DEALER INDUIREl INVITf D
Ft) »oi iri.Orpi (.1
H*i Enner f. )n« ^
80 Microcomputing. March 1980 • 133
REVIEW
Apparat software allows old programs in new BASIC.
One into Two
Sherman R. Waniz
424 NW Lakeview Dr.
Sebring FL 33870
If you have been giving serious
thought to modifying your
TRS-80 Level II BASIC system
so that it will accept all of those
Level I BASIC programs you
have saved on cassette tape,
wait. You don't have to void
your Radio ShacK warranty by
opening your Level II machine's
case, cutting circuit board
traces, installing a Level I HOM
and adding several resistors
and a switch. There's a simpler
way.
Apparat, Inc., of Denver, Col-
orado, offers a software pro-
gram on cassette tape that will
make your Level II BASIC sys-
tem act as though it were a Lev-
el I BASIC machine. The price
of the "Level I In Level II RAM"
program cassette is a modest
$14.95, plus $2 for handling and
shipping.
If you have very many Level I
BASIC program cassettes on
hand that you haven't been
able to convert for use in your
Level II system, the price of the
program is quite reasonable. I
was never able to get Radio
Shack's "Program Conversion,
Level I to Level 11" cassette to
work satisfactorily.
Apparat's program is written
in machine language and oc-
cupies about 4.3K bytes of
memory space at the upper end
of your Level II 16K byte mem-
ory bank. That leaves almost
12K bytes ot memory available
tor use by any Level I program
you want to RUN. There are
some— but not many — pro-
grams written in Level I BASIC
that require that much memory.
The program cassette sup-
plied by Apparat comes with-
out any supporting documenta-
tion. However, almost all you
have to know to use the pro-
gram is written in just seven
words and symbols that appear
on a label attached to the cas-
sette's plastic shipping box.
After you turn "on" your Lev-
el II BASIC system, you type
SYSTEM on your keyboard and
press the Enter key. The "'?■"
prompt will appear on your
monitor's screen to indicate
that the computer is ready to
accept a machine-language
program. You then place the
"Level I In Level 11 RAM" pro-
gram cassette in your tape re-
corder and engage the record-
er's Play lever.
Type LEVEL I and press the
Enter key. This will activate
your recorder's motor and will
start loading the program into
memory. If your recorder's vol-
ume control has been adjusted
correctly, you should see the
usual double asterisks (one of
which blinks) appear in the up-
per-right corner of your video
monitor's screen,
It you fail to obtain the dou-
ble asterisk/blinking indication
during loading, rewind the cas-
sette tape, reset your record-
er's volume control, press the
reset button inside the left rear
cover of your computer's key-
board assembly and repeat the
loading procedure described
above.
After the "Level I In Level II
RAM" program has been trans-
ferred to your computer's mem-
ory, the tape recorder's motor
will stop turning and the "*?-"
prompt will again appear on
your monitor's screen. Type "/"
and press the Enter key. The
computer will clear the moni-
tor's screen, will print READY
and will display the familiar ">-"
BASIC prompt. From that point
on, your Level 11 machine will
perform as though it were oper-
ating under control ot BASIC
contained in a Level I ROM.
Rewind the Apparat tape and
remove the cassette from your
recorder. Insert in the recorder
the Level 1 program tape you
wish to use, activate the record-
er's Play lever, type CLOAD on
your keyboard and press the
Enter key.
As your Level I program is
transferred from tape to mem-
ory, you will notice that the dou-
ble asterisk now appears in the
upper left corner of your moni-
tor's screen. When your Level I
program has been loaded into
memory, the recorder's motor
will stop and the ">-" prompt
will reappear. Now, all you have
to do to use the program in
memory is type RUN and press
the ENTER key.
Operating in Level I
I have been particularly
pleased to find that I do not
have to readjust my recorder's
volume setting after I load the
"Level I In Level II RAM ' pro-
gram and then CLOAD my Level
I program. I think that condition
is attributed to just plain luck
on my part. But after having fid-
dled SO long with my recorder's
volume control to load my Level
II program tapes made on other
recorders, it is refreshing to re-
call how uncomplicated it used
to be to load tapes a year ago
when my system was using
Level I BASIC,
The computer's response to
the LIST command fills the
monitor's screen with program
lines. You use the "f" (up-arrow)
key to step through successive
program lines. You can "dump"
(record) your program to cas-
sette tape using the CSAVE
command. The format of the re-
corded program will be Level I
and the data transfer rate will
be 250 baud.
Even the error messages are
pure Level I, i.e., "What,"
"How" and "Sorry." If you have
forgotten what these error mes-
sages mean, you had best dig
out that dusty "User's Manual
For Level 1" and refresh your
memory.
Ot course, since your system
is now operating in Level 1 BA-
SIC, you do not have access to
the convenient editing func-
tions that Level ll BASIC pro-
vides. Nor will you be able to
use the LLIST and LPRINT com-
mands that Level II provides for
printout of your programs.
You will be pleased to learn
that when you use the NEW
command, the Level I BASIC
program in the computer is
erased, but the "Level I in Level
II RAM" program remains.
Therefore, you will be able to
load successive Level I BASIC
programs into your computer
without having to reload Ap-
parat's program.
However, if one of your pro-
grams' "hangs up" during load-
ing and you are forced to acti-
vate the computer's reset push-
134 • 80 Microcomputing, March 19^
button switch to regain control,
you will probably have to reload
the "Level I In Level II RAM"
program before you can load
another Level I BASIC program.
As soon as you turn your com-
puter off, the "Level I In Level II
RAM" program disappears and
your system reverts to its Level
11 BASIC configuration.
Limitations
My experience with Apparafs
program has uncovered one or
two minor problems that ! attri-
bute to my having loaded the
program at too low a volume
setting on my recorder.
One of my programs con-
tained a line that used AS and BS
separated by a colon. The B$
string was continually trun-
cated (shortened) even though
it consisted of less than the al-
lowed 16 characters. I moved
B$ to a separate program line
and had no more problems.
Another problem I experi-
enced involved my use of the
ON N GO TO statement. In one
portion of my program, the
computer would not respond to
the shorthand dialect ON N G.
__. . However, in several other
parts ot the same program, the
computer did accept the short-
hand statement without default.
Since these problems have
not occurred in any of a number
of other Level 1 programs I have
RUN using the Apparat pro-
gram, I assume that the prob-
lems alluded to above were self-
induced and were not the fault
of the conversion program.
I have heard that the "Level I
In Level II RAM" program will
not accept programs written in
machine language. Since Ap-
parat did not furnish documen-
tation with its program tape to
warn against attempting to use
the program with machine code,
perhaps it will perform properly
in exactly the same manner that
a Level I BASIC program in ROM
would operate. Since I have no
machine-code programs in my
library, I could not test the con-
version program to validate the
claim that it is incompatible
with machine language.
I'm very pleased to have the
capability that Apparafs pro-
gram provides. The price was
right and the program's opera-
tion has been better than satis-
factory. My on!y fear is: Mur-
phy's Law is bound to come in-
to play and, somehow. I'll inad-
vertently erase my program
tape. But that's just the way my
luck runs.
For those of you who might
want to order the Level t In Lev-
el II RAM program cassette
write to: Apparat, Inc., 6000 E.
Evans Ave., BIdg #2, Denver CO
60222. ■
CENSUS CHECKER
The Census Ctiecker system is a sel o1 programs
designed lo check ihe accuracy of ttie 1980 cen-
sus The census will provide ttii; populalion counts
that *ill be used by all leuels ol government for ihe
next ten years. It they dte inacc;urale and omit peo-
ple, then your city or county will sutler. Revenue
sliaring, lederal and state grants and future plan,
ning depend upon an accurate census. Census
Chechef can help
The Census Checlier is designed for the Radio
Shack TRS-80 microcomputer and may be used on
any other BASIC micro with BASIC and disk tiles
Small cities and counties will benetil most trom
the use of this system The progriims are straight
forward and may be moditied to' special focal
ptoblems
For lutlhet information writs:
MICRO DECISION SYSTEMS
3008 Redwood Ave.
Lakeland FL 33803 ^lee
other gover-iment and census reiaied micro soft-
ware in deveiopmer.i
For Canadian
* Owners
Lower Case Modification . . $65.00
Cassette Load Modification . S20.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 S5.00 lo:
•AV Quotum Cmntdian Funda
ORTHON "Jl^iTHF
12411 Stony Plain Rd.,
^ '°6 Edmonton, Alta. T5N 3N3
TRS-80 SYSTEMS
--Hudwue--
IKirmN-lI»ll
LivHiiin-iinn
■ ■ USID Tl&^SO't ■ ■
mat uii fN smni w vicix
»Sn« DCIIIHTUMHUtM
EtCBinrSMK
•• ntlNTERS ■■
ceatiDW)
lOM-tim N
)0i«lDWII»H-U1MN
tKHMu Mil imn
If 44«-tWN
r iis-imm
MC
vmmiu-UMSM
■ ■ MSK OlIVIJ • •
WNUltlMm-llflN
jMMUumtwn-uiN
4 MM UU m IMf-tli N
•• MOBNKAnONS ■■
IMB CIS UN in Iff *RMI-I» N
jUCriMIHIULEt-IMN
ineiiiEVBiMiuiw-i'sii
Wt TAKE MODtL I
S'SitMs IS rriAM For;
iVMDOtL 11 iYSTEWi C«Ll
FOR srtcific Quoii^
VEIN STIilT rROCHJCTJ . RAMO SHACK Df ALII
114 WIAn SAPUtPAOB 740M
riionii9ii)ii4S)«ioii»itui4-4iMi
lEE.Wi— coo AtlCOMl CASH Mt)*,tY CWMtl Of
CHECKS -^^SIER CHARGt AND VISA
ACCtriED -ADO i\
sorrwAti-
" Mil NiutiHtn mnH "
IIUI WMI llELVnttS WS
■0 mUMMM HDWnt
WHll *(■ 14*. 1 HU) -WN
HONl I Vtl IM I PW) -sn»
NUIUM)-11SN(KfM Mm
(USfl
am NCCiiiHi «aiM u(r gsi ii
SJttllWtlCPEWmdIlltK
■ MWDOS— 149.00
NEW DOS ♦ —$99.00
■ TRSDOS 1.1— tl4.9S
IINCLUOU MANUAL!
■ STYIELISTIR
HOUtll M. I Ml
mi itw main i<f mm uiis
ll}ttlMClSI)Oi»IN(UMIl
•• wo«o
MOCUtlM ■ ■
mioGi
■ iitcTiK rwauTi-
199.00/(D)-tll0.00
FCf WCBI
■ NEW WORD rtoouot
■sat Hill WT HM MSitm
I IISI Hi MM i-mn
vifc>^%S aJ^O^^'C^*! ^'
; MAXELL'
p OP SCOTCH- BRAND DISKS q
P A
1. Some compulensls pay less bul may not get j
f Stiugga't' or IBM' apo'oved dist^s ^
T 8" SINGLE SIDE ■ DOUBLE DENSITY a
n Box of 10 FOR $50.00 e
■ 8" DOUBLE SIDE -DOUBLE DENSITY !|
- Sox of 10 FOR $65.00 J
5V4"MINI — Box of 10 F OR $40.00 a
*••••*■* ^HfHp^H
' rj^ DY8AN- DISK 8 VISA \
• ****• ■■^■^M
■ 5v." Mini . Box Ql 5 lof $25 00 (J^^ffl ^
^ COO II 00 Additional - Specity (8" ■ h
^ Soft or Hard Sector) 15' -Soft or Hard Sector) ^
? CUSTOM ^121 ;
^ ELECTRONICS INC. °
T 238 EXCHANGE STREET
* CHICOPEE, MASS. 01013 p
li EST I960 1-413—592-4761 j
HOURS: Tues. to Sat. — 9 to 5 |
•ATARI* • •TIISS-4*MATELL>*
$
Bi'si.xESS Arroi:\Ti.\G
Software
$
Htwble ditnt write-up |t»ml k<l)tr( iyi\tm dKigiwd b>
a (.PA and do doped b\ a cumpurcr ipo-iatiii for CPA'i,
accoiinianl' and general buMncssmcn proMdcs large-icalc
compuler lealure* al mitrii-Lomputer sofl>*ate cosls;
■ dtiitned for uit tn prrsrnr rmpltntn
' o//fmi for up in SOO aecou/iit
' deparimrnial finaniial ilalfmmti iiKluding
* rtlain\ tlandard journal enlrie\
* automatic hatancinjf oj Iraniat'tlurii
' fast entry i pfulinf of tianiOiitora
■ easy lo fnWow audit trail
* conventional accounting .\ymhoL\ u.\ed
hor ^-program paikagc on di>.licltt *ilh use: manual
send 5495 lo:
T\SK C<>MIH'TEK Al»l"LICATIOXS
Dayton, Ohio PO Box 24001
45424
(513)233-2118 ^'''
CANADIAN INCOME TAX
Runs on 16K Level II or Disk
2 programs are avaMaDie
T-1 SPECIAL-1979
Ttiis package is tor tnose wtio do riol need to tile the
more detailed GENERAL RETURN Based on your in
Gome and deOuCtioos tor 1978 Vou cannot use tris
return if your income is over S2O670. Or you claim
Capital gams or losses Commission sales Divi-
dends. Self. employment, or you claim Alimony.
Ctiild care eipenses. Deductions transtefred IfOm
spouse
This package IS S39. 00 + Ont Sales Tai
T-1 GENERAL— 1979
Needs Level II. preferable 2 Tape recorders or Disks
This program is a complete Income Ta> progr.,
usable not only for your own return bul also for use
by professional Income Tax Preparers. It calculates
all schedules, 1 to 10 (schedule 1 1 has not been im-
plemented, because of the Fall of the Gov )
You can. *ith it, prepare income tan returns for profit
-You set the fee-
This package is S90.00 + Ont Sales Tax
To order send check (and slate your equipment con-
tiguration) lo;
I R SOFTWARE
177 Linus Rb
Suite BOB
NORTH YORK Willovudaic
Ontaiio, M2J 4S5
,--155
fi^ Reader Service— see page 147
80 Microcomputing, March 1980 • 135
REVIEW
The Radio Shack board
lets your 80 do the talking— to other computers.
RS232
Roger L. Hicks
5534 Woodberry Circle
Marietta GA 30067
Communications has come
to the TRS-80, and, at $99, it
may be the biggest bargain
since Level II BASIC. I am refer-
ring to the RS-232C board
(shown at right).
Even if you are not inter-
ested In communications, read
on! The RS-232 board has a
variety of uses that do not In-
voive communications in the
usual sense of the word.
Most of us are familiar with a
parallel interface, which moves
all eight bits simultaneously
over eight separate lines. A
serial interface handles the
same eight bits, but one at a
time over a single line. The Elec-
tronics Industries Association
(El A) has established a standard
for serial interfaces referred to
as RS-232C. While this ap-
proach clearly lends itself to
telecommunications, there are
other uses.
The RS-232 is the only feature
I know of offered by Radio
Shacit that gives the user a stan-
dard way of connecting a variety
of peripheral devices from other
manufacturers. In my case, I
was able to implement a low-
cost hard-copy line printer into
my system.
Implementation
The board in the accompany-
ing photo installs under the
large access cover in your ex-
isting expansion interface and
comes with a ribbon cable,
Instruction manual and
machine-language program that
allows your TRS-80 to emulate a
standard asynchronous ter-
minal (provided a modem,
acoustical coupler or direct con-
nect is available). The board
plugs into a 42-pin connector
that is part of the expansion
interface. Some early produc-
tion versions have the connec-
tor already in place, but you will
probably have to take your
expansion interface to your
nearest Radio Shack service
center for installation (no extra
charge).
The early version of the
Instruction manual has a
number of errors (however, the
quality of the rest of the feature
is excellent). Table 5 on page 16
erroneously shows 130 baud as
the result of loading 5H into the
BRG (baud rate generator). A 5H
will, in reality, yield 300 baud.
The DIP switches are labeled
on the board (S1-S8), but no-
where is the user told in which
direction to push a DIP switch to
open or close the circuit. To
open, push each switch in the
direction of the UART (large IC
chip). The remaining errors are
minor (easy to figure out), and all
remaining implementation in-
structions are clear.
Line Printer Application
The remainder of this article
describes the programming
considerations in using the
RS-232 interface to add a line
printer to a 16K system (I expect
this to be the most common
noncommunications applica-
tion). Referring to your Level II
BASIC manual, the trick is get-
ting your RS-232/printer to re-
spond to LPRINT and LLIST
commands. Beginning on page
26, the RS-232 manual describes
the procedure.
The line printer driver pro-
gram is In ROM and is designed
for a printer connected to the
standard parallel interface. This
136 ■ 80 Microcomputing, March 1980
5 PDlCE 16421 ,2«P()KE i 6422 . 1 B3iP(KE 16423,12/
10 RlH X-326i»5 To 32767ifi£A0 ViPOKE X.YtNEXT
15 END
20 UATA 229.197.245,51,255.127,2^4,1 .40. J2. 62, I ,50,2^5,127
2b DATA 211 .232, 219, 233, 23U,24«. 246. 4, 50, 254. 127, 2n .234
30 DATA 219.233.230,7,33,246,127,6,0, 79,*, 126. 211,233,241
35 DATA 193.225.219,234,203.119,40.250.121,211,235.254,(3
40 DATA 32,4.14,10,24,239,20! ,34.69.95. 102. ri9. I 70,204,238,0.0
Listing 1.
10 POKE 16413. 2iP()KK l 64 I 4 . 1 83" POKE 16415.127
5000 Poke 16413, 7tPC>KE 1641 4,88iP()KE 164i5.4
Listing 2.
driver program is, however, a
subroutine that is called each
time a character is to be printed.
This call address is in RAM and
can be modified (POKE) to ex-
ecute a user-suppiied driver
stored in RAM. The assembly-
language listing of this driver
begins on page 27 of the
manual, and a BASIC program
to POKE the machine-language
code into upper RAM is on page
29. My only problem here was
wasting 256 bytes for a driver
program that only needs 73.
Listing 1 is a modified version
of the program shown on page
29, except that it only occupies
the last 73 RAM locations. On
power up, enter a memory size
of 32694 (instead of 32511 for
the Radio Shack version). Load
and run the BASIC program; you
can now enter NEW and pro-
ceed with any program or activi-
ty using LPRINT and LLIST at
will. Execution of NEW will not
erase the driver program begin-
ning In location 32695 (it will, In
fact, remain until you power-
down).
If you are like me, you have at
least one large program with a
lot of PRINT statements that
you will now want to change to
LPRINT. Wait, there is an easier
way! It so happens that the
driver program for the video
display is also a ROM-resident
subroutine called by an address
stored in RAM.
Referring to Listing 2, if you
add line 10 to the beginning of
your program, all subsequent
PRINT statements will go to the
RS-232/printer instead of the
video display. Be sure to ex-
ecute line 5000 before stopping,
or the video's output will con-
tinue to go to the printer (if you
get an unanticipated break that
prevents this, simply enter
RUN5000). Needless to say, if
you are redirecting video output
to the printer, you cannot use
PRINT @ or video graphics.
One Final Problem
The software we have covered
assumes ttiat at 300 baud, for
example, each character can be
decoded and printed in the time
it takes the RS-232 to handle one
byte (approximately 34 milli-
seconds). This is a valid
assumption unless the char-
acter decodes to a carriage re-
turn (in which event, the driver
program automatically inserts a
line feed as the next character).
Depending on the type of printer
involved, the next one (or more)
printable character(s) may arrive
before the printer is ready (and
be lost).
If your printer manual does
not cover this subject, it can be
corrected (if encountered) in one
of two ways:
1. After each LPRINT that
completes a line, add
LPRINT STRINGJ [5, CHR$(001);
This transmits five (subject to
change) nonprintabie char-
acters, which gives the printer
an extra (5 x 34) 170 milli-
seconds to get ready.
2, Execute a FOR-NEXT loop
to stall the program, for exam-
ple:
FOnX=1 TO100:NEXTX
With a little luck, you will not
encounter the problem except at
high baud rates (1200 -)-).■
MICRO
BEEP'
ADDS SOUND
TO YOUR
TRS-801
MAKES GAMES MORE INTERESTING
BCfPSON ERROHS • AT EMD Of BSORT ■ AFTEd PniNTII^G • nHENEVEH YOOMANIi
SIMPLE HOOK UP JuH otiiq
EASILY COMROLlEDfROM BASIC
out 255 4 - ON
OUT ?55 = Off
24 HOUR HOTLINE - VISA OR MASTE R CHARGE . COD ■ 602 SS? »4« ^ig
PLEA^F5F^^ ..MICBOBEEPS
PS9 9!, Li Plui 12 bO <Pri Onitl) - Poiligr & Htnaimq
■ CfWt* DMoniyO"*! J VISA rjMC IjCOD
Nam, _
Addren
Accounr No. ,
E.Di^Jt or. Dale ._
WORKS ON ANV MODEL ONE TRS40
Su»
^Iiil3'SJiJl
JiiiA liS^OO
'ilSO^iiiT, 4\^ SOVOD
FEATURES S FANTASTIC PtOCRAHS AT AN UNHEARD OF PRICE!
BACKGAMMON 5
The best batfc^r-imon (Kciyram for Ihe TRS-80 Ptayl itandard
iniernaiionai 'uk-s. wiM not allii^v I legal moves. (Fasi. 15 seconds or less avg.
mouei Uses doubling dien Features fines! graphic cfisijlay yet available'"
SPEED READING (C.A.I. I
tficreate youf ceading speed and comprehension miiti this educational
Orogram Compuier adiusTs vour WPM (words per minute) according to
cornijrehension [j;, !Q 5000 words pei minute possible" Simulates ihe
lachpstoscooe'
YAHTZEE
Up to lour people rnav play against <he computet Excelleni animated
graphic dice. Siandarri yalit/ue ruWs apply Bonus points, Yaht/ee, Chance,
etc.
WALL STREET
You and opponents buy and sell computer generated stock in this exciting
simulation. Each player starts with SO. 000. The first to make a million
dollars wins. FAST ACTION" i
Quick CO ordinalion is
rie[ith charges tin sutisi"
PT.109
pd vKiTh Thi5 tail aclion a'catie game Drof)
24 HOUR HOT LINE VISA ■ MC • COD . 602 -B82 3948
HII«»»h.lS2SaiP«l>9lft >Uni(,ii,f.. o
O-mct -J Mann O- A" .^v.ii -.lUC ::CODIt3M(
CC AoDurT ■ fl»i>jT*i I6K I VI I
^19
aSiiiS'XJLZ ji^z tio^d-i^ 'XJr-tfi}4>ii* Ai^ A^i-Jinj
t^ fitmMr Service— S9e page 147
80 Microcomputing, March 1980 • 137
APPLICATIOIN
Soundex is used to class similar sounding
names together, for easier genealogical research.
Soundex Codes
Robert A. Hodge
417 Peiham Street
Fredericksburg. VA 22401
ble, especially under a time
pressure, to code a list of names
without making errors. Because
of this, I try to prepare all codes
to be searched well in advance
of attempting to use the
records.
Working with my TRS-80, I
have developed a program
which accurately produces the
Soundex code for any name
entered.!
I have been involved in gene-
alogical research for a
number of years, and occasion-
ally have found it necessary to
use the records housed in the
National Archives. There, a num-
ber of records, particularly the
latest available census records,
are indexed according to an
elaborate coding system called
Soundex.
Developed to group similar
sounding names together re-
gardless of spelling, the system
uses the first letter of a name for
alphabetical filing and converts
all other letters into numbers as
follows:
• 1 is assigned to b,f,p,v;
• 2 is assigned to c,g,j,k,q,s,x,z;
• 3 is assigned to d,t;
• 4 is assigned to I;
• 5 is assigned to m,n;
• 6 is assigned to r;
• no value is assigned to
a,e,h,i,o,u,w,y {normally);
Complications sometimes
arise because only one of any
two consecutive equivalents
are recorded (including, in this
case, the first letter, normally
not coded at all). The final result
must be adjusted to consist of
one letter and a 3-digit number,
extra digits being discarded; ab-
sent ones are recorded as zeros.
I have found it nearly impossi-
100
105
llfl
115
120
125
130
135
140
145
150
155
160
165
17
17 5
100
185
190
195
200
205
210
215
220
225
230
235
240
245
250
255
260
265
270
27 5
280
265
290
295
300
305
CLS
PRINT TAB(20)"THE SOUNDEX CODE'
PRINT: PRIHT"A NUHBER OF RECORDS IN THE NATIONAL ARCHIVES HAVE BEEN INDEXED
ACCORDING TO A SYSTEM ALLOWING SIMILAR SOUNDING NAMES TO BE GROUPED
TOGETHER REGARDLESS OF SPELLING. THIS SYSTEM IS TERMED THE 'SOUNDEX SY
ST EH ' "
PRINT!PRINT"IF ONE IS GOING TO THE ARCHIVES, IT WOULD BE HELPFUL AND TIME-
SAVING TO HAVE THE SOJNDEX CODES ALREADY AVAILABLE FOR THE SURNAMES (
LAST NAMES) ONE WILL BE SEEKING.'
PRINTiPRINT'I AM PROGRAMMED TO DETERMINE THE SOUNDEX CODE FOR YOU' : PRINT: INP
UT'TAP ENTER WHEN READY'jA
DIMA${25),BS(25),C[25)
CLS
PRINT"TYPE THE SURNAME (LAST NAME) TO BE CODED AMD PRESS ' ENTER" : INPUT" " i AS
A-LEN(A$]
C(1)-ASC(LEFTS(AS,1))
FOR B-2 TO A
B$(B]-HIDS{A$,B,1)
NEXT B
FOR B-2 TO A
C(B)-ASC(B$(B)}
NEXT B
FOR B-1 TO A
IF C(B)-66 OR C(B)=70 OR C(B)-80 OR C{B)-a6 THEN C(B)=1
IF C(B)=67 OR C(B)-71 OR C(B)-74 OR C(B)-75 THEN C{B)-2
IF C{B)-B1 OR C(B)-83 OR C(B)-BB OR C[B}-'90 THEN C(B)-2
IF CfBj-ee OR C(B)-B4 THEN C(B)-3
IF C(B)-77 OR C{B)-78 THEN C(B)-=5
IF CIB)='76 THEN C[B)-4
IF C(B)-82 THEN CtB)-6
IF C(B) >6 THEN C{B)-0
IF C(B-1)-C(B) THEN C(B)»0
NEXT B
CLS:X-0
PRINT'THE SOUNDEX CODE FOR "AS" ISi"
PRINT:PRINT!PRINT LEFT${AS,1),
FOR B-2 TO A
IF CtB)»0 GOTO 275
PRINT C(B) ,
X-X+1
IF X-3 GOTO 295
NEXT B
FOR B-1 TO 3-X
PRINT ■0',
NEXT B
PRINT: INPUT'IF YOU HAVE ANOTHER NAME, PRESS
IF A5»"N0' GOTO 305ELSE 130
CLS: END
Program Listing.
■ENTER' OTHERWISE TYPE 'NO"jAS
138 • 80 Mlcrocomputir}g. March 1980
HOBBYWORLD
ELECTRONICS
America's Largest Mail-Order Computer Store
^.
MATCHLESS SYSTEMS
TRS-SO
MINIDISK $395
DRIVE 2torS775
Th* b«l dfive available todiyT
Campktc tnd ready lo uw, wilh
tree 2-driw cable f Irvc soltwarr
for ipcvdinf up your Acce» lime
from ISmi In Urns' Oplkmal
9oit**rt lor incrcaunf da la
Horate tmm S?k lo b7.BK on
your fir*l drive, jnd to Wfc on
y«jr fdrond rWiv«* full 120 dav
mono back (uarantre!
Cjl No
. OfKiiption
1175
Ortvp wt2 drive
cjble
IWt
4 drive cib\t
lllonc]
19)S
Tucks %-«a
wftwArr
1147
Veffcjtim dni-
»««. 10 lof
HAZELTINE TERMINALS
Sundard inlPrJacinK M moil Sisrems'
Cjl No. Modrl Ontrtpltan Prkr
IU7- 1400 53kty.Mi24d<tpli>.d<iiTib »4a
21t>a- 1M0 Intrllitenl, 74 l>», M I 24 Sll^i
2169- 1520 Intrllijttnl. ei key, 9S (lur. tlSSt
ATARI
THE AFFORDABLE COMPUTER
Ihe perfect computer for
Sophiiliratrd, y«l simpJv. Dr-
ujinvd by th« cipcrl in home
computer bai«d acctuoriet. It
won't become obtolele, becaw
It hai an vtpandabk mvfnnryr
advanced peripheral cnmpn-
nerkli, and comprehfn!fite arrat
dI utftware modules. Whrlhrr
you've had pfORramnwif etpeit-
ence or not, you'll find your^ell
DfjeralinA *■>*■ AUii in no Hme
at all* f raturn oi ihr Model 400
include: ^^ key keyboard, hifh-
resolution color grapbin, buiJl-
in TV modulalor tor dirrct fort-
nection wilh any ilandard cohn
TV. SK RAM. BK BASIC ROM
SAROON II
Hoyden
The ch^mp nf fhimfii! SuriMitei
Microcheii, And even Sargort II
OMcri cofnpLei moves, 7 I«ve1i
of pbv. JCttvity indic^roi, a
speciil "hint" mode, plui moref
The belt che»» profiam everl
Cil No. «N1 IR&ao I29.4S
Cat No 20« Arm II »299i
TRS-80 FORTH
Prograrrvna
A cofnpjct threaded UngujRe-
VocjbuUry luted, u&cr m^y
tailor Ihe lyilem lo the needt
and tiruclurc of a specitic ap-
plication tier definei new
wordi, which may in turn defir
complex applications
Cjt No. 2111 mS-SOL2.16KSM.95j
both hcime and business'
plus more and morel The model
MW tui all the fealurei ol Ihe
400 plus two channel diRiUl re-
corder, «K RAM. (eipandable lo
4aKi and IMC ROM. le.pandable
to t2K).
Cat No Dewription Price
2172 Aliri 400 Per- S550.aO
tonal Computer
217b Digital Recorder 90.00
for 400
2171 Atari MO Per *«san
u>nal Computer
2174 Minididi Drive 7SO.0O
lor 900
2175 line Printer for liOO.OO
fUM
TRS-80 PIE
Prootomma
1 dimensional, turtoi based
editor. Features blinkin| cursor,
cursor movement ul
upidoHnflcttlrighl, plus tahK
character inserU delete: siring
search forwards and bacLwards;
plus more and more' The best
editor available for Ihe IRS-MI
Cat So. 2114 TRS-M.l2,IUlsm.95
SYSCOP
Duplicates SYSTEM tapes >fr)
backup i
JKHO U. 411.
Cat No. 16SI S9«>
BARRICADE
^
Similar t'> breakout.
A real time
game, with fiptinrts
of speed.
balk. 'nfle. etc.
TRS-BO LIIU IM.
Cll No. llfcj tl4.9
'
BRIDOE
CHAUENOER
You and (iummy play a|ain«l thr
computer in regular contracl
bridfe- tilhef you or comp teti
TIEUNE
Prooramma
Tumi your IRS-SD into a
timeshare mainframe, smart ter-
ninal, and allows you to
icndhetelve BASIC and data via
phoflt. Requires modem. RS13J,
12K. DOS 2.1 or later.
CalNo.2117 16.95
ANDROID NIM II
Super improved version ol SIM
Corrstant etcitemeot!
IRSOT. 12. IbK
Cal\o 1bM S14«s
STAR TREK III
The mosi advanced
«e've seen!
TRfr«0 12, 16K
I. 1041 *14,9S
ADVENTURE
fiplore an alimnt endk-Vi ma/p
nf treaturh and pirfalk Chal-
lenjiini; jnd fun!
TRS^W L2. Ibh
Cal No n.l S14.9S
HUNT
Pfogramma
A rtew clais of |ame wttere you
invent your own characlerv
rulei. and w on. All the beil of
Adventure, Dunicon^ Quett,
Dragorq all rolled into one!
Cat Na.2t4S TR&Wl U,1bKSl^.95 ,
LEVEL III BASIC
Ives your TRS-SO Ihe power of
full siie system. Diili conv
rrunds, advanced edilinf. elc.
IRS-BO 12, 16K
Cat No. 1)12 S49
NEWDOS
Betlei thanlRSDOS' Allows DIR
while in basic, and then retumr^
tr> basic. DIRCHECK DI5A5SEM
IDTASM. and SCPtRZAP! A
must loi disk osvnersi
Cal No iy9IR«0. U ■ diikios
8" Disks
S37 box of lO
3 boxes for SI 00
• IBM compal/b/e
• Smsle density
• irMii\ 'dually certified
Cat No. 1145 Typ* 12-1000
Description
32 s*clor holes, 1-index hole
Cal No. 1146 I>pe34-10O0
interchjriRCJible wilh IBM32,
3740. 3770. 1790, etc-
Vertxitim
5V4 DISKEHES
the ninsl popular diskette in
the isimW
S29/box of 10
2forS55
Cat No. Type Description
t147 5IMP1 SofI, THS-80
114S US-10 ID hole hard.
Apple. North-
star, H8
1144 ^2S-16 16 hole hard.
Micropolis
DISKETTE/DISK
BINDERS
Ori^mres artd prolecFs youi riala
files! 5'i" disks f 'I tynzi per insert
f fit one per interl. Binders irv
dudes 10 inserts.
Cat No. Descriplioo Price
1b50 5'< " binder M3S
1651 S " b>nde> M.9S
1653 e.tra B" inserts .95
1652 eitra B''i" inserts .95
VERBATIM
CERTIFIED
CASSEHES
2 for
S4.95
Certified ^>ecificaliy for pergonal
computers tuch ai the TRS-SO,
Apple, Pet tU. Splice-free,
leaderfeu, with folding recordinf
Ubi.
Cat No. 1^^
SOUNDWARE
Add rmisK and sound eliects to
vouf programs. Complete with
soltvtare and hardware Installs i
coods
Cat No. ir« IR^«0. L2 i29.9S
TRS-80
LOWER CASE
519
MODIFICATION KIT
Modifjei yn
diipUy btilh
cate. Imtalli ii
drill, tolde
screwdriver
inalrudion*.
ur machine In
upper and lower
1 miruln. requires
ring iron and
Wilh complete
Cal No. 1550
LEEDEX
12" MONITORS
Black and white, hi^ mnhjlion.
Accefilt compost le input No
tntpment^
Cat No. 1204
$139
16K MEMORY
ADD-ON
S75
2 for 5140
For rRS-filf, Apple, Fxidy \
Inslalls
in minules, no special 1
tools required. Complete with |
detailed
insliuclions. Wt4oi
Cal No
Description
1156
For IR^m keyboard
uml
H5*A
lftS-80 wilhcml bul-
lered cable
nstiB
TR5-M Mith buffered
cable
1156C
For Apple
11)tD
For [lids Soicerei
CALL TOLL FREE:
(800) 423-5387 USA
IN CALIF:
(SCO) 382-3651
LOCAL & OUTSIDE USA
(213) 886-9200
FUII£R ElfCTRONICS
TRS-SO DUAL CASSEHE
CONTROL CENTER
$74.95
Aids and simphlie'i caaette loading'
Allovis veil lo (isfen lo c^sselles as Ihey ati' lijadini;'
No more pluHinn and unplug-
|ing cassette cables! Saves wear
and tear on your computei
system, adds Ihe fleiibilits Ihal
<ou need loi iesel 11 data
storage! Internal speaker allows
you to listen lo CSA\ F and
CIO AD, also allows iiiu (o litlen
Is iasi forward and rewind
iCTR-41). Independent volume
control lels >(KJ adjust nvsotlor
volume without affeclinx
loading volume. Buili-in LED's
let 10U know status of one or
both recorders. Now you can
simultaneously CSAVE with both
recorders. ClOAD wilh either
recorder; cross tape oilh both
recorders levied and reviewed
in March ~9 Creative Com-
pulinj. Compact, onl* 4" s 3-."
I 2'*" hijih. Complelelv assem-
bled and tested Vtl 16 oi.
Cal No 1971 (or CTR-41
■Cal No. 1974 For CTR-M or CTR-21
FUliER afCTRONCS RF-3
TRS-80 I/O 8r AUXILIARY $39.95
CONTROL CENTER
• Coniroh lights, video fpcorders. appliances thru your IRS-BO'
* With complete apphcation %ohv^aie and dor. umentation
• Built-in rel3y pfOfff fs your TRS-dO retsv'
* Contfoh from ftai.Tions or a second to rj^onrh^'
to check youf RS-J32 nulpul
without turning on ihe prinler
Buill-in mlernal relav protecfs
and btpjftei tonlrol current
trom >nur Hmilivt TRS-«0 rrlav
Sow you can even operate b or
more cas»erte terorders safeh
*or CSAVI HOU: IIOVAC
COMROLLIR IS NOT INCLUD-
ED. A iimple schematic arrd
pdtts list ri supplied- Size; 2" t 4"
The most vetsatile TRS-80 ac
ceswry available today! Otters
leafu^e^ fmind onlv in units
costinjt much mijre. No* >ou
can control lij^hts *hen you're
rwt home, at rarnkim limes! Tutn
vrdeo recording equipment on
and off at prevl limes, even
months in advance- Internal
beeper can be used to (ifrul the
er>d oi a lortf son llalsu lels you
linow wilh one beep, two beep^
etc. eiLJctly what part ol the pro
fram you're int Also allows you
DIRECT
CONNECT MODEM
Novation
A ns wef/Ofigina !(? '
300 Baud'
DesiRnw/ specificallv ioi penonal computers'
Model 4iaiB, the lop ol the line in
retiatiility. ecrKiomy. convenience!
Usable on either dial-up or leased
telephone lines, the 410iB is Bell
lOlA or 111B compatible Operates
al the hi(hesl standards ol -<>dem
for transmit level, and -SOdBm serv
ftivity. Meels all FCC requirements
for direct lirie hookup, all units sup-
plies with standard new modular
"T-PIuk". Low prolile design conv
plimenls the appeararvce of all com-
puter sysletTH. Uav be mounted on
eilher wall or desk Front panel has
LED indicalmii RS212 interlace
status Compact power pak plugs
diredlv into wall socket, reduces
heal and shock haiard.
Wetghl: 1 lb
Cat No. 2214'
$395
Novation "Cot"
Acoustic Modem
The first quality compact mndem
designed specifically for (he imall
compulef user, Deiinned lo
transmit data over sllnd^rd
telephone lines, the Cat has many
uses for tHjsiness and tvibbyist-
Allows orke termirul o* computer to
interact with others, pevmirtinf nrsr
access to daU from remote kx>
tions. htobbyish can etchance da la
artd programs- Compatibie with any
Bell 10} modem and. ol couise. all
other Cati! Also perfectly compati-
ble with Ihe new Radio Stuck
modern {ifs the same unit). Data en-
chdnge can occur al any speed up
lo 30 charfsec. low profile case
fealures iwitcties lor mode selec-
tion 4nd operation, also for CEO's
disptayir^ unit status. Acoustic «e)1-
le^l is standard CompJete and
ready -lo-use- Rerjuires 110 VAC.
60Hz.
Cat No 14B0
$169
HOW TO ORDER
Pay by check. Mastercharf^e,
Viu, or COD. CharRc orders
pleaie include eipiratinn date.
Foreign pav in U.S. lunds. Older
by phone 01 mail, or it our retail
MINIMUM ORDER S10. please
include phone number and mag-
a^ine/issue you are ordering
from. Prices valid thru last day of
covei djte SHIPPING- US4 :
add S2 00 for the first 2 lbs. For
giound add li< lor jiddtl lb. For
air idd 7SC fa, addfl lb FOR-
EICM: surface: add SI 00 for first
2 lbs, MK per addfl lb Ait: add
Jlt,00 for first 2 lbs, *> lor tich
iddfl lb. CODs SI addfl. Guar-
anteed satisfaction fni 120 days
DT your money back! Not re
sponsible lot lypoKraphical
eriors. Siinie items subjecl lo
piior sale- We reserve Ihe rijjhl
lo limit quanlilies.
SEND FOR FBfE CATAIOC
FEATURING:
Computers and accessories, disk
drives, printers, inlegiated cir-
cuits. lEDs, semiconductors,
bonks, soilware. cnnnectois,
plus rnote jnd motel The widest
selection tl Ihe lowest prices!
Circle our reader service number
or phooefwrite loday for vour
copy!
19511 Business Center Dr. Dept. V3 Northridge, Ca. 91324
t^ R9»<f»r S»ryic»—»»» pafft t47
80 Microcomputing, March 1980 • 139
SBm svsTEfns, inc.
►^154
Conipiiter St'rt/ici's • H:irdware • Softv^jrc • Cunsiifting
Professional Business Software to operate on
TRS-80* computer
• ISAM Accounting Package:
— Accounts Payable, Accounts Receivable,
General Ledger with Cash Journal, In-
voicing and Payroll
Integrated Accounting System $425.00
Separate Modules $ 99 00
• ISAM Inventory Control $125 00
— Above Systems require 2 - 3 drive Systems.
— Integrated System requires 3 - 4 drive Systems.
— Systems operate under NEWDOS by Apparat
(not included)
• Machine Language Disk Sort $ 49.95
— Multiple Keys - Ascending, Descending
Callable under Basic
TO ORDER CALL:
mi->U" .n.i'ije
VISA
(617) 685-0151
•Trademark of Tandy Corporation
•• Accounting Package not available in the State of California.
TRS-80*— CONDENSE
Tbi Ultlmti in BASIC
Conpnsslon Utilltlis <|^
RalNM 1.3 N8W Avillibli
Write BASIC programs using single statement lines for ease
of maintenance.
Write BAStC programs with unlimited remarks and comments
to rmprove program readatiility and documentation..
— AND STILL GET —
OPTIMUM USE OF MEMORY — FASTER PROGRAM
EXECUTION
Compresses programs up to 70% of ongmal 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 ot low numbered remark statements
- Checkpoint / Restart Facilities
- Phase 1 work file
MiM I S21.95
(Diskette)
Modil II $24.95
(Diskette)
INTERNATIONAL SOFTWARE ASSOCIATES
P.O. Box 14805
Onahi, Ne. 68124
^-187
Tandy Corporation*
TRS-80 SOFTWARE
from
Snfli-L CQflPJTEH SVSTEIUS
The Software People
DATAMAH3 DoW Manogemwil SyiWm ■ S49 96
EOnOKI r«.tcif<dPiogfomEaitof S90 95
•OOK . EDITO01 UTILITY tor cnf^^ 0"0 orOO"'
ir>g mafiuaB S24 95
WnW pf ogicynj wiin iaD«tt inil«oa of Hne
numbsfj Si J 95
Piogrom TNOtX' Oroan««, kXX» onO
runscxograms Of» jlBp operatio''
S2J95
Cor ana MortgoOS omoftiMtion
COQIOfTl S 1 J 05
G«iiotal porposn oipfia numeoc JOfting
routine . (14 95
HmIisIic stock market nam* - St4.95
lM» Vagas tavonto S14 95
CompiitenzscS drawing t>oaid $14.95
These programs were written for the TRS-flO
Computer System and its peripherals. A
minimum of 32K of memory and at least
one disk drive are required tor all. All soft-
ware is supplied with Full Documentation
PLUS applications examples.
For Quolty Som«3re-jee "The SoCNwire Propte"
Sflfli-L COnPUTEH SVSTEnS
2935 East McDowel Rood Phosntx. AZ 85008
{602)275-3108
AOdit-onol irlwafure orid monuati (»• OWOitOtSW
Call oi Wiilolor piicftj
P1c»^G Ordcs WeKTome
Masterchoroefk VISA Cof Os Accop'ea i^83
DEALER INQUIRIES INVITED
"TR&40 Is a rvglaMrMl hadwrwrti o< TANDY CORP."
UIHIIVI
DKNU
AMO«
son
STOCK
OHO
DRAW
When you buy your
TRS 80™ equipment!
Use our toll free number to
check our prke before you bu>
a TRS HOT** . . . anywhen:!
ful R(Kio5hack warranty
"R5-80UTIUIY PROGRAMS
■•BotwT ttie UVEI. I iCbrivlitlani rnii r"" !"■
vfatffl r«i |af L£VCL IE? Hov r^^ >^v^ FuHe cvei
■sri. Otll— (»,r DVT III uilni lASK llfx 10
tir oorli til fouc clwlo. A r>i1 IlH uvcf
An Imfiovtd Itfv iQidLnt routla* lUc ^oethi
IlUsi celil IsniSlpi itid »>•• L£VEL U inti •
uilly i< imL 1. Lnid. l^id-ial-ia. or cop
uy LEVEL II up*. ?!i?LA'i dac« F»-li>a loadtd
Tdwi pTa|(aB El DOT vniLEvlr dvttroyri by
llnhs Htd T»«I| pclalVT* H Hue fo^t proftlu
fEBVa troa fh« «■>»« llk« Eh« l«fHtd4ry no*ii
KalrKfttrB T^>vr prvtTnr
ihouE
•1(11;
uFT«fl. b«r irtplu
Jl MSIC pioimlhii uUI PI
$sa KjlELpl* InfKElvbt on tA« 4<r***i «ad a
ntrm MM mlL. Ca]cwL«l« r™'^ dal* 'Bd
It la • Ubl. OT la •rT-4<. Call FrUJT ■> • ft-
a (ltd If m llkf .
Eh« Ahjv« prnj^rH
11 1> • SISTER laiHti
rPUjr 1. .vjll.bl* in
tft toi 'jytL I] Ibl mac
lliEl-q mini Z-ao >I.~IF
E>tL i: WSIC <•!••<>• o
S3. 93 each (cassecce or lisclntt. specify)
plus $1.30 per order for poscage ami
handJlng (foreign orders S3. 00 per order
for postage and handling. Texas realdencs
add 611 aalea tax)
MARIG01.0 ASSOCIATES
P. 0. BOX 58101
HOUSrOM, TEXAS 77058
^156
140 • 80 Microcomputing. March 1980
■^ TRS-80
SERIAL I/O
• Can input into baSiC
• Can use LLIST and
LPRINT to output, or
output continuously *
RS-932 compatible •
Can be used with or
without the expansion
bus • On board switch
selectable baud rates
of 110.150.300,600.
120G, 2400, pantv or
no pantv odd or ever.
5 to B data bits, and 1
or 3 stop bits D T R
line • Requires +5,
-12 VDC •Board only
S19.95PartNo 9010,
with parts S59 95 Part
No. 60 IDA, assembled
S79 95PartNo 8010
C No connectors pro-
vided, see below
Ell/RB-ZIZ ar^-
nactor Pwrl Ho
9 B condbClor
cMMllOMBrl
COMPUCRUISE
$1 2a95;¥Wthcnjsecar-
trolffi 169.95
THE TELESIS
VAR-SO
INTERFACE
UNIT
QTir
For tfie TRS-aO with
Level II BasK: • Provides
a outputs • ProvHles 8
inputs • 2 ft erf inter-
connectaTg cable w/ con -
nector • Plugs directly
into TRS-80 • Power
supply provided • As-
sembled and tested.
Part rjo.VARBO, Intro-
ductory pnceSI 09.95.
GAME PADDLES
& SOUND
Includes: 2 game pad-
dles. interfBce. soft-
ware, speaker, power
supply, full documerv
tacion including: sche-
matics, theory of
operation, and user
guide, plus 3 games on
cassette CPono and
StarshipWwI. S79.95
Complete Part No
7922C
16K RAMS
For the Apple.
TRS-80 or Pet SB
each Part No, 41 16;
2117.
DIGICOM DATA
PRODUCTS INC.
Series 312
Acoustic Coupler
300 BAUD Originate.
Part Mo. AC3122.
$219.95. 300 BAUD
Answer. Part No
AC3122, 521995
300 BAUD Answer/ Or-
onata Part NaACa 123.
S229.95
LIGHT-PEN
ForYourTRS-aO
Your TRS-80 Light-Pen
is a carefully engineered
instnjment and with the
proper care will give
satisfactory use an6
many years of service.
Part No. TflSBOLP
$2495
SYSTEM
EXPANSION
from
LNW Research
• Serial HS232C/20
mA l/D • Floppy con-
troller • 32K bytes
memory* Parallel print-
er port • Dual cassette
pon • Real-time clock
• Screen printer bus •
Onboard power supply
• Software compatible
• Solder mask, silk
screen. PC board and
user manual, Part No
LNWBO, $6935,
DISKETTES
Vfcrbalim
BoKOf 10. 5"$29 95.
8- $39.95.
Plastic box. holds 10
diskettes, 5' - $4 50.
B- - $6 50
CASSETTE TAPE
ERASER
Removes recordings m
one second! ERASER-B
$19.95
S-10a INTERFACE
AN S-1 00 bus Adapter— Mcthertxwrd for the
TRS-SO Kit. Part N0.HUH81DLXK. $29595
Assembeled. Part No HUH81DLXA,$375 95
NOW!
A FULL SUPPORT SYSTEM
FOR TRS-80
• 32K of RAM • EPROM firmware • Disk
control • Data acquisition • Parallel I/O •
Serial I/O • Plug into GPA's Motherboard
GPA s quality design includes • 6-44 pm edge
connectors • ■ 5^ -5V, • 1 2V, -1 2V external
power supply required • Active terminatjon.
The Motherboard, Part No. GPA80, is only
$14995
TAKE ADVANTAGE OF
GPA-EXPANSION CARDS
FOR THE GPA80
Memory card*: Now with Fortran compilers
available lor your TRS-80. additional expansion
memory is a musU Card with sockets only. Part
No. GPA801 .$1 1 995 Card with 1 6K of 41 1 6
Dynamic Ram. Part Mo. GPABD2. $224.95.
Card v*nth 32K of 41 1 6 Dynamic Ram, Part No.
GPA603. $329.95 All cards come equipped
with sockets to accomodate 32 K of Ram.
EPROM firmware card. Put those valuable
subroutines in firmware Don't waste tjme
loading and untoading tapes and disks. For 2708
or27l6EPnOMS,PartNo.GPA806.$79,95
Serial I/O card. Here's what you've been
asking for, a full serial terminal interface, with
RS-232Cor20mA.Currentloop Input/ output
capabilities Part No. GPAB07,$79 95.
Parellel I/O Cerd. Control functiors in the
outside world, monitor and store real time
events. Two parallel output ports Dip switches
select ports [0-254] Part No. GPA808.
$79.95
LEEDEX
MONITOR
O
12" Black and White-
12 MHz Bandwidth
• Handsome Plastic
Case*$13g 00
FLOPPY DISK
STORAGE BINDER
Three-ring binder
comes with ten trans-
parent plastic sleeves
which accommodate
either twenty, five-mch
or ten, eight-inch
floppy disks. Binder &
lQhQkJers$14.95Part
No. 8800; Extra hoWers
95II each. Part No. BOO,
DIGITAL
CASSETTE
5 mm. each si0e Box
of 1019.95
Holds two 5-1/4 inch
diskettes and will fit
any standard three nng
binder $9.95/ 10 Pack.
TRENDCOM
PRINTER
EJ
• 40 characters per
second • 4-7/16 inch
wide thermal paper •
Graphics [TRENDCOM
lOQh 4B0 sevendot
print postons per line.
TRENDCOM 100. Part
NoTRC0100.$49595.
TRENDCOM 200. Part
NaTRC0200,S37595,
Interface for TRS-80.
PartNo.T80A$45 95.
For Apple II, Part No.
TRCAII. $75 95 For
PET. NO. TRCP2.
$79,95.ForScoccerer,
TRCSR1 $4595.
SARGON: A Computer
Chess Program
Features the complete program that won the
1978 West Coast Computer Faire Tourna-
ment. Part No. 00603 — TRS-80 Level II,
Part No. 00604 — Apple II (g4K]. $19 95
SOUND EFFECTS AND MUSIC
FOR YOUR COMPUTER
SOUNDWARE is a complete system. It includes
a speaker /amplifier unit with volume control,
earphone jack, and cornectors It boasts
excellent lone quality yet is small and convenient
to use Add batteries, plug it in. and play One
year warranty. SOUNDWARE package (in-
cludes INTRO to SOUNDWARE programsl
PET ISK). Part No. 20003. $2995 TRS-80
Level II (1BKJ, Part No 20002. $2995.
Compucolor II (8K). Part No 20001 . $39 95.
INTRO to SOUNDWARE programs only PET
and TRS-BO. Pait No, 20005, $1 4.95. Compu-
color II Part No. 20006. $1 9 95.
lb Ordfir * ^^^^'O" P^^^ ^°- description, and price. In USA shipping paid by us for orders accompanied by check or rrmney order,
' \Ate accept COD, orders in the U S, only, or a VISA or Master Charge no., expiration data, signature, phone no,.
p^gy^ I^^B shipping charges will be added CA residents add 6,5% for tax Outside USA add 10% for air mail postage and han-
IhU I^MU dling. Payment must be in U S, dollars. Dealer inquiries invited. 24 hour order line [408) 448-0800
►^26
Send tor FREE Catalog a big self-addressed envelope with 41* postage gets it tastesi'
ELECTRONIC SYSTEMS ^^p* ^° ^ ^ ^°^ ^^^^^ ^^^ ^^^^ ^^ ^^^ ^^^^^
i^ Reaaer Service— sea page 147
80 Microcomputing. March 1980 • 141
If you enjoy driving, you're going to get a
COMPUCRUISE. Once you see what it can
do, you Just won't be able to live without It.
f«
This gadgel lits mlo mos! dashboards . no strain even in a lini^ sports car IJhe the Mazda RX-7 , . . and '
once you have il, every trie is like (lying a 747 The darned thing tells you Ihe lime, how fast you're going, how
far you've been on this Inp or since the last regassmg, how many miles per gallon you're gelling, either at the
instant or the average on the trip or gallons per hour at the moment or lor the trip temperature outside
. . . inside (or coolant temperature, it you preter) . oh, i1 has an elapsed lime for the trip, a Slop watch, lap
time, an alarm how mucti further lor your trip, how many gallons more the trip will taite, how much longer
fof the trip at your present average speed . . . yes, it gives you your average speed tor the trip. You prefer it in
metric, no strain . . liters remaining, etc Did we mention that it also has cruise control either at a speed set
on the control Iroarb or at whatever speed you are traveling? The Compucruise will keep yoo busy and enter-
tained during any trip . . . telling you more than you will ever want to know.
The Compucruise is not ditlicult to install though it does connect to everything eicepi the cigarette
lighter Until you've tried computerized travel, you haven't found out how much fun driving can be. It will wofK
on any car not having fuel ir|ection and there Is a front-wheel drive accessory gadget available for only
W.40-#P001 (regularly $5 50).
The price lor the Compucruise is regularly J 199.95 . and a bargain at that price Well sell you one of these
fantastic gadgets tor $159 95 with cruise control (Model 44-#P002), and SI 27 95 without (Model 41 #P0031 Send
monay , . . and start having lun!
MAIL ORDER MICROS ^
Dept M80 • PO Box 427 • Marlboro NH 03455
Phone: (603) 924-3041
Steal stopper
Ever had your car stolen?
The first reaction is one of disbelief . . .
. . . you fcnow it was right there!
What you Dvanl is a rnodern combmalion lock on your ignition . .
The Steal Stopper. It's easy to install and almost impossible to
defeat You can by-pass it, if you want, for parking attendants or a
car wash. Other than thai, you set up a secret four digit code and
only will then De able to start the car even if you leave the iieys
in the ignition.
"ThFs protection retails for S50 bu! we have a special for you at
S39 95. Don't procraslmate Order #9004
Note. This product works best on Detroit cars Mazda RX7
owners must order additional module. »TO08. which costs SB The
Steal Stopper can be modified for Mercedes. Porsche, Ferrari, or
olher high performance European cars by returning unit to
manufacturer with 13. They promise quick modification and relu'n
PROCESSOR TECH
HARDWARE
I Procauor Tach VIdao
Dttplay Moduta— Memory
mapped video tor S-100. ei-
cellent condition
#D009-S144 each.
PROCESSOR TECH
SOFTWARE
2 Processor Tecti Extandad
Dith BASIC-This is full
disk BASIC on 8 ' disk lor
HELIOS II disk controllers
with PTDOS and greater
than 16K #D015-$80 each
1 Extandad Disk BASIC on
cassatta— This is the same
as previously mentioned for
the Disk BASIC from Pro-
cessor Tech Needs more
than 16K. <rO017-(72
8 Extandad Cassatta
BASIC— This includes all
tile operations, advanced
functions for doing more
than playing games; for
SOLOS, CUTTER, and CON
SOL Monitors »D016-I22
each.
19 BASIC S (rom Procassot
Tach— This is a simple
BASIC for a SOLOS, CUT-
TER, or CONSOL Monitor
and SK of RAM (rtX)13-
$11.60 each
4 Procassor Tach QAMEPAC
for above BASIC — Various
simple games. WX)14-$1 1 60
each
ASTROLOGICAL
COMPUTER AND
4-FUNCTION
CALCULATOR
ASTRO"-
Gives you a fascinating look into
your personality traits. Compares
16dilferenl combinations.
Matches your astrological influ-
ences to any day — past, present,
or future. Gives In-Oepth analysis
I ol vou' compatibilitv wi\ti your
Ixjss. your spouse, your lover,
your child Regularly $4995
, #fTO?0-$39 95 SPECIAL PRICE,
'PROCESSOR TECH SOL
4 SOL Computare— eK RAM
Monitor, S-100, excellent
condition. #0004-5980 each
19 TREK-M on cassette lor
SOL — This IS one ol the
best real time space games
available today; needs 8K.
«X»5-S11 each.
9 Elactiic Pencil on casselte
(or SOL — Word processor,
needs 8 K XD006-S80 each.
MICRO TERM
ACT TERMINAL
MicroTerm ACT Terminal
— Need a video monitor, up
lo 600 Baud, good condi-
tion. •S035-S200 each
SPECIAL PRICE
COMPUCOLOR
HARDWARE
Compucolor Computer S001
(use as computer or 75
MHZ Color Monitor)- 8K
RAM, BASIC and DOS in
ROM, good condition.
#S025-S1500each SPECIAL
PRICE
Compucolor MinlFloppy
— 5'.'« inch, good condition.
»S026-$525 each SPECIAL
PRICE
Compucolor 8K RAM card
- Static RAM, good condi-
tion. »S027-$200 each
SPECIAL PRICE,
Compucolor Floppy Tape
Driva— Uses eight track car-
tridges, good condition.
»S028-$7a each. SPECIAL
PRICE
PANASONIC
TAPE DECKS
Panasonic RS261 US SIsrao
Cassette Decks— with auto-stopj
record level adjust, VU meters,
used condition; all have had
heads replaced and aligned
«T001-S50
PiiuBonlc RS260 US SterM
Cassatta Dacks— same as above J
but also has bias switch for
chrome tapes. <n"00Z-$50
POLYMORPHIC
HARDWARE
PolyMorphic Video Terminal
Interface Memory mapped
video for S 100 bus. good to
eKcellent condition
*(SO44-I150 each SPECIAL
PRICE
PotyM Orphic Cassette Inter
(acfl— Plugs into Poly CPU
only, new »D047-$29.60
each.
PolyMorphic S-100 Cabi-
nets— Nice 5-slot 3-100
mainframe, good to excel-
lent condition #D049-S248
each
>OLY-88 ACCESSORIES^
Parallel Keyboard— Good
condition «S001-S50 each.
SPECIAL PRICE
Soltware on 5V."— This is
system soHware that re-
quires a PolyMorphic Disk
Controller in a System 88
Cabinet. »D002-$100
Electric Pencil-#D0C3-$80^
ALS-80
ALS-80 Operating
system— This system re-
quires 12K RAM Irom DOOO
to FFFF, as well as either
the SOLOS or CUTTER
monitor; it includes an As-
sembler/Edilor. #D018-
$11.60 each.
NORTH STAR
HARDWARE
Nortti Star Floating Point
BASIC card—With special
BASIC, new. »D0059-$287.
North Star Floating Point
BASIC card (kit)— With
special BASIC, S-100, new.
«D0060-$207.
North Star Floppy Dish Con-
troller card — Single density,
S-100, new «D0061-$248.
S-100 Edge Connec-
tor—Gold Contacts, new.
»D050-$2 each
Extender Card lor S-100
(kit)— New #0051-524 each
BALLY GAMES
Bally VideoCode Cassettes
— They consist ol two
qarnes Speed Malh and
Bingo Malh »D029-S16
each
ABACUS
Abacus Paperweight —
Hefty, brass, excellent con-
dilion «S024.I3 SPECIAL
PRICE.
MUSIC
2 Software Tachrralooy S-100
Music system on cassette
—This IS an S-100 Music
system contains the proper
hardware. •D005M19.60
each
COMPUTER TRAINER
1 lASIS COMPUTER-IN-A-
BOOK— 8080 Microcomput-
er, comes built into training
manual, excellent condi
lion #D020-$240
ICOM
DISK DRIVE
ACCESSORIES
ICOM Dual Disk Drive-
Single density. 512K
storage, S-lOO controller, in-
cludes CPIM ROM. good
condition #S030-$1500
SPECIAL PRICE,
ICOM PROM and 8" Disk
lor SOL FDOS-Thisdisk
requires an ICOM S-100
Disk Controller installed in
an S-100 #D031-$160.
ICOMCPfM on B" Disk for
S-100 — Requires an ICOM
S-100 controller in an S-100
cabinet, #O032-S100
ICOM FDOS-llonS" Disk
for S-HXJ— Requires an
ICOM S-100 controller m an
S-100 cabinet, no documen-
tation «D033-SlB0each
ICOM FOOS-11 on 5V." Disk
lor S-100— Requires an
ICOM S-100 Mini-Floppy
Controller in an S-100
cabinet «D034-S168.
142 • 80 Microcomputing, March 1980
IMSAI HARDWARE
IMSAI 8800 Msintrima
S-100— Encelient condition
»D0087$839
IMSAI 8ai5 S-IOO Dvvatop-
mant Syalcm— Partially
assembiM. needs a CPU
card, excellent condition
•6008fr$S2S as is SPECIAL
PRICE
IMSAI BUM S-100 Dev«k>p-
nwnt Syttem— Kil. rnain-
tfame cover miastng, needs
a CPU ca'd, excellent con-
dition irS008»S500 as is.
SPECIAL PRICE.
IMSAI 4K RAM card-S-tOO.
good condition. »O0055-
S89.60
IMSAI
SERIAL I/O CARDS
I IIV'*"%w1allfOcard
2 ^OtOp.;j-»rts,MI
'OUT
RS<f,=^ . "Wr J, good
condition nOixnr^ .186.
IMSAI S«rtal I/O card 2-2
(liHl— Two serial porta, full
RS-232 control, S-100, new.
»D0091-$124.
IMSAI S«rial UO card 2-1
(kit)— One serial port, lull
control HS-232 control,
S-lOG, new #O0O92-$100.
IMSAI
PARALLEL I/O CARDS
(MSA) Parallel UO card
44— Four parallel ports,
S-ICW. excellent condition.
■00093$ 186
IMSAI Parallel IK) card 4-1
(kilt— One parallel port,
S-100, new. »O0094-$74 40.
IMSAI SOFTWARE
IMSAI IMOOS V2.02 on 8
Disk forS-100-No
docurnentalion, t>ul this is
apparently IMSAI s version
ot CPIM tor S-100 syslems
*tlhan IMSAI Dtsl( Con
Iroller aOOtKe-SOe each
IMSAI BASIC M-This
BASIC IS tor an S-100
system with a TAflBELL
cassette mtertace #00067-
S22
TARBELL CasaetM Intar-
laca (kit)— Kansas Cily In-
letface. Tarbell Phase en-
coding, S-10O, new »D0064-
196
^:Jm^^ 20% OFF
MAIL ORDER MICROS ^— ^-— ' ^-^ ^— ' o
Dcpc MBD • PO Boir 427 • Marlboro fUH 03aSS
Phone |Ga3] 3SA 3011 . . ^m^^ JK ^^^m
Inventory ^^ A ^^
Clearance ^jAA L ^
>HONE INTERFACE
Novation Mcxjem
*3102A— Connects to any
phone, originate only, good
condition tSOZI-SieSeach.
SPECIAL PRICE
No**tion Modem
■31 Qi^l P. —" 'cany
ph. ^°*-0 OUT ite
good condition. -_ ?-$200
each SPECIAL PRICE
Novation Modem 1143- Con-
nects to any phone,
originate only, good condi-
tion, 1(8023^155 SPECIAL
PRICE
VECTOR GRAPHIC
S-100
I Vector Qfaphic ROM/RAM
card-i2K empty ROM
sockets. IK BAM, excellent
condition. #00078-51 19 60
> Vector Graphic Analog In-
tarlace- Allocs hobbyist lo
interface analog eiperi-
menis, S 100, r*e* #00079
$79.20
I V'
Ic
— '•■r Analog In-
HOLDOUT «
s-100. new .w"' 5560
TDLZAPPLE
TDL Z-80 8K BASIC-This is
lor a Z 80 system with a
ZAPPLE Monitor »D007l
S30
Tr "■ " ■"' Moni-
ic SOLOOUT ''^"*
system with »cnji..^il6.
TOL ZAP IK Monitor- Sim
pie monitor «O0073S13
NEXT MONTH . . .
WATCH THIS SPACE
FOR 20% {OR MORE)
DISCOUNTS ON
POPULAR BRAND
NAME SOFTWARE
FROM MOM'S.
Inventory
Clearance
BOOK CLEARANCE
UP TO 50% OFF
Take a Chance with Your Calcula-
tor (Lithium publisher) »BK1002
-was $8 95, no* S4 50
ChemiStrv with a Computer lEtlu-
comp-puBiisher)fBK1010— was
$9.95. now S5.00
Ckimputei Dictionary (Camelot
publisher) «BK1018- was S5 95,
now S3 OO
FORTRAN Programming iCame-
lot publisher) #BK10l9-was
$7 95. nowS4 00
FORTRAN Workbook (Cameiot-
publisherl •BK1020-was 54 95,
now $2 50
A Quick Ltxik at BASIC (Camelot
publisher) »BK1043-was$4 95,
now $2 50
DL SOFTWARE-DISK
TDL FDOS 1 SuparBASIC
on 8" Disk — This requires
an ICOM Disk Controller
and at least 20K ol memory,
plus a ZAPPLE Monitor in
an S-100 Catlrnel (Allair, IW
SAi.etcl #00065-5137
TOL System Sottware on
5%"dl»k— This set ot
system software requires a
North Star Disk Controller,
a TDL Systems Monitor
Board I, and consists of
12K BASIC, Relocator/Link-
ing Loader, Z-80 Editor, arvd
Tent Processor dOOOee-
5183
TDL System Sottwara on
5v." diak — This IS the same
as above, t)ut does not re-
quire the Syslems Monitor
Board I *D0067 5200
TDL System Soltware ocf
5V»" dlik- Again, as above,
but requires a HELIOS Disk
Controller and the TDL
Systems Monitor Board ■
|noi II #00068-5183
HONEYWELL
15 Honeywell ASR-33 Communi-
cations Contolet with TTY,
paper tape reader and punch
Used, working when removed
from service Shipped (reight
collect or you pick up. WeigM |
300 lbs. 5395 Order #P006.
MOUNTAIN
HARDWARE
Mourttain Herdwafa AC
Cortlroller— Hemoie AC out-
let control, S 100, new
#0040-5100 each
Mounuin Hardware remote
outlel — Remote module tor
above, two channels, new
110041 $72 eacti
HEURISTICS
SPEECH LAB
Heuristics Speech Lab—
S-10C. used, (air condition.
#8042 $100 as IS SPECIAL
PRICE
Heuristics Speech Labs-
S-100. new #0043-5151
each
SHUGART
MINIDISK DRIVES
SlH' -n MInlDISk □rivBG
suppi
Por
-lie (or
-' SQi ^ ^nd power
uppiy.
North Star, yi.**' jndilion
#5036-5320 SPECiAL
PRICE.
Shugart MiniUak Drtvei
—No cabinet, good condi
tion »S037 S300 each
SPECIAL PRICE
Power Supplies (or
a Dove- good condition
''5038-530 each SPECIAL
PRICE-
Prices include 20" » discount
PRICE includes more than 20°.
SPECIAL
discount
Quantities are limited, immediate retund ((
ordered item is no longer available ' Phone
answered by machine Orders taken with
credit cards Questions answered by mail.
TERMS: FOB Marlboro, NH USA Limited
stock, everything guaranteed as described.
you pay postage on returns PRINT orders
clearly. Minimum order $10 plus $2 50 ship
ping and handling charge in USA only
DOUBLE THAT ELSEWHERE Orders over
$50 add 5°.> (or shipping in USA, 10' =
elsewhere (we will re(und excess!. Orders
Shipped UPS or insured mail only NoCODs
please Send US funds by check or money
order For credit card purchases, add 4%,
list AE. MC or VISA, number, and eipiralion
date Mail to MOM's Department M80, PO
Box 427 Marlboro NH 03455
Condition dI Inventory:
New = original conlatner
ExcellenI - new. but not in original
container
Good = tested or used in store
Qty
Catalog*
Description
Unit Price
Total
Delivefv :3to6week8.
Encltwed %
Bill AE MC
Card no
MAIL ORDER MICROS
Shipping & Handling _
Credd Card | » 4"/.)
Total
Exp Dele,.
Name
Address
City
_State_
-Zip.
t/* Reader Service—see page 147
Ship
UPS
insured mail Signature
BO Microcomputing. March 1980 • 143
iW"a^^^^T""^f<""W""T^^V"^"7V
microcomputing : bookshelf
C»^-
r
ii@¥^
basW haste
ys
• PROGRAMMING THE Z-80-BKn22- by Rodnay Zaks Here is
assembly language programming for the 2-80 presented as a pro-
gressive, step-by-step course. This book is both an educational
text anda self-contained reference book, useful to both the begin-
ning and the experienced programmer who wish to learn about the
Z-80. Exercises to lest the reader are included. $14.95.*
• Z-80 SOFTWARE GOURMET GUIDE AND COOKBOOK ~BK1045
-by Nat Wadsworth. Scelbi's newest cookbook! This book con-
tains a complete description of the powerful Z-80 instruction set
and a wide variety of programming information. Use the author's
ingredients including routines, subroutines and short programs,
choose a time-tested recipe and start cooking! $14.95.*
*«*<A.u2
• LEARNING LEVEL H-BK1175-by David Lien. Written
especially for the TRS-80, this book concentrates on Level II
BASIC, exploring every important BASIC language capability.
Updates are included for those who have studied the Level I
User's Manual. Sections include: how to use the Editor, dual
cassette operation, printers and peripheral devices, and the
conversion of Level I programs to Level II. $15.95.'
• BASIC BASIC (2ND EDITION)- BK1026 - by James S.
Coan. This is a textbook which incorporates the learning of
computer programming using the BASIC language with the
teaching of mathematics. Over 100 sample programs il-
lustrate the techniques of the BASIC language and every sec-
tion IS followed by practical problems. This second edition
covers character string handling and the use of data files,
$9 45.-
• M/CROCOMPUT/NG CODING SHEETS M/crocomputine's dozen or so programmers wouldn't try to work without these handy
scratch pads, which help prevent the little errors that can cost hours and hours of programming time. Available for program-
ming is Assembly/Machine Language (PD1001), which has columns for address, instruction (3 bytes), source code (label, op
code, operand) and comments; and for BASIC (PD1002) which is 72 columns wide. 50 sheets to a pad. $2.39.*
• HOBBY COMPUTERS ARE HERE! - BK7322 - If you (or a friend)
want to come up to speed on how computers work . . . hardware
and software . . . this is an excellent book. It starts with the fun-
damentals and explains the circuits, and the basics of program-
ming. This book has the highest recommendations as a teaching
aid for newcomers. $4.95.*
• THE NEW HOBBY COMPUTERS- BK7340- This book takes it
from where "HOBBY COMPUTERS ARE HERE!" leaves off, with
chapters on Large Scale Integration, how to choose a micropro-
cessor chip, an introduction to programming, low cost I/O for a
computer, computer arithmetic, checking memory boards . . . and
much, much more! Don't miss this tremendous value! Only $4.95.*
• HOW TO BUILD A MICROCOMPUTER -AND REALLY UNDER-
STAND IT-BK7325-by Sam Creason. The electronics hobbyist
who wants to build his own microcomputer system now has a prac-
tical "How-To" guidebook. This book is a combination technical
manual and programming guide that takes the hobbyist step-by-
step through the design, construction, testing and debugging of a
complete microcomputer system. Must reading for anyone desir-
ing a true understanding of small computer systems. $9.95.*
• TOOLS & TECHNIQUES FOR ELECTRONICS - 8K7348 - is an easy-to-understand book writ-
ten for the beginning kit builder as well as the experienced hobbyist. It has numerous pictures
and descriptions of the safe and correct ways to use basic and specialized tools for electronic
projects as well as specialized metal working tools and the chemical aids which are used in
repair shops. $4.95.*
Um Ihc oxAr.' card in the back of this magarine or ilcmiic your orrirr on a Etparatc piece ol paper and mail to
BO flic rot om puling Bookshelf • Pctcrbotough NH 03458. Be sure to include check or detailed crcdil card infoimation. All ofders add S 1 OO handling.
kPlcdK olk)« 4-6 weeks fo( delivery. Questions regarding yout order? Please write lo Cuslotner Service at the atwve address. jf
■ ■■ '^ '
FOR TOLL FREE ORDEmHG CALL 1 '800.258-5473
r
microcomputing
bookshelf
\ — ""
•THE BASIC HANDBOOK - BK1174 - by David Lien. This book is
unique, it is a virtual ENCYCLOPEDIA of BASIC- While not favoring
one computer over another, it explains over 250 BASIC words, how
to use them and alternate strategies, (t a computer does not
possess the capabilities of a needed or specified word, there are
often ways to accomplish the same function by using another
word or combination of words. That's where the HANDBOOK
comes in. It helps you get the most from your computer, be it a
"bottom-of-the-line" micro or an oversized monster. $14,95.'
• ADVANCED BASIC-BK1000-Applications and problems by
James Coan is for those who want to extend their expertise with
BASIC. Offers advanced techniques and applications. $7.95.*
• PIMS: PERSONAL INFORMATION MANAGEMENT SYSTEM-
BK1009 — Learn how to unleash trie power of a personal computer
for your own t)enelit in this ready-to-use data-base management
program. $9.95.*
• PAYROLL WITH COST ACCOUNTING -IN BASIC-BK1001 -
by L. Poole & M. Borchers, includes program listings with remarks,
descriptions, discussions of the principle behind each program,
file layouts, and a complete user's manual with step-by-slep in-
structions, flowcharts, and simple reports and CRT displays.
Payroll and cost accounting features Include separate payrolls for
up to 10 companies, time-tested interactive data entry, easy cor-
rection of data entry errors, job costing (labor of distribution),
check printing with full deduction and pay detail, and 16 different
printed reports, including W-2 and 941, $20.00."
• LOW-COST. PERSONAL COMPUTER-BASED INVESTMENT DECISION SYSTEMS- BKIIOI -Use this guidebook by Man-
Computer Systems. Inc.'s president. Jerry Felsen, to develop inexpensive personal computer systems that can help you maKe
better investment decisions. $15,00."
• HOW TO MAKE MONEY WITH COMPUTERS- BK1003- In 10 information-packed chapters. Jerry Felsen describes more
than 30 computer-related, money-making, high profit, low capital investment opportunities. $15.00,*
'^RETURN
• SOME COMMON BASIC PROGRAMS- BK1053-published by
Adam Osborne & Associates, Inc. Perfect tor non-technical com-
puterists requiring ready-to-use programs. Business programs,
plus miscellaneous programs. Invaluable for the user who is not
an experienced programmer. All will operate in the standalone
mode. $12,50 paperback."
• WHAT TO DO AFTER YOU HIT RETURN- BK1071 - PCC s first
book of computer games ... 48 different computer games you can
play in BASIC . . . programs, descriptions, many illustrations.
Lunar Landing, Hammurabi. King. Civel 2, Qubic 5. Taxman. Star
Trek. Crash. Market, etc, $10.95.'
• BASIC COMPUTER GAMES- BK1074- Okay, so once you get
your computer and are running in BASIC, then what? Then you
need some programs in BASIC, that's what. This book has 101
games for you from very simple to real buggers. You get the
games, a description of the games, the listing to put in your com-
puter and a sample run to show you how they work. Fun. Any one
game will be worth more than the price of the book for the tun you
and your family will have with it. $7.50."
• SIXTY CHALLENGING PROBLEMS WITH BASIC SOLUTIONS
(2nd Edition)- BK1073- by Donald Spencer, provides the serious
student of BASIC programming with interesting problems and
solutions. No knowledge of math above algebra required. Includes
a number of game programs, as well as programs for financial in-
terest, conversions and numeric manipulations. $6.95.*
k^
Gm the ofdK tard in th« l>ack o( this magaiint of itetniie your order on a separate piece of paper and mail to
80 Mkrocomputing Bookshelf • Peterborough NH OS-ISS. Be sure lo include check or detailed credit card iiilonriddon. All orders add S 1 .00 handling.
Please allow 4.6 weeks (or delivery. Questions regarding vour order? Please write to Customer Service at the aboie address
FOR TOLL FREE ORDERING CALL 1-800-258-5473
M Uicrocompuling, Marc/i IMO • 146
Ji9 PREVIEW
WHAT TO LOOK FOR IN THE APRIL
SO
PENCIL V
SCRIPSIT
The reigning champion of
word processing software,
Michael Shrayef's Electric Pen-
cil, has a challenger — Scripsit
from Radio Shack Next month
we have an in-depth evaluation
of both packages. Find out
what they can and can't do.
MORK&
MINDY
MONITOR
Tired of carrying your Radio
ShacK monitor from place to
place? With this article you can
find out how to use any televi-
sion set as a computer monitor.
REVERSE
OEDIV
More than an hour or two at
the keyboard of your system is
liable to result in tired fingers
and bleary eyes. We don't know
what to do about your fingers,
but Reverse Video can help
ease the strain on your eyes.
Black lettering on a white
screen makes working with a
computer like reading a book.
BUILD A
LIGHT PEN
Your keyboard is not the only
way of interacting with the
computer With next months 80
you can build a simple Light
Pen, and just point at the
screen! Complete software is
included for using the device,
both in BASIC and Assembly
Language.
TRUE CONFESSIONS
Purchase of a THS-80 can produce a dramatic change in both
life-style and character. Staying up into the wee small hours of the
morning, talking in BASIC to strangers in the street . . . Follow the
sad tale of a member of Computers Anonymous, It could happen to
you!
ASSEMBLY
LANGUAGE
If you know what 50H means
then this new column is not for
you. For the remaining BO per-
cent of our readers we are start-
ing an Assembly Language col-
umn in the April edition.
Through worked example and
clear explanation this series
will cover Assembly Language
A-Z. By the way, 50H is '80' in
hexadecimal.
ALL THIS
PLUS
MUCH MORE!
527 ADVERTISERS
Bi
A B Computers
131
44
Data Tram Inc
103
113
34
Acorn SollwaiB PrMiKts. \nc 65
175
Data Tram Inc ...
20
97
Adventure lnternat)onal
133
139
Design Enterprises o( San
53
69
AloriaByleStorage
131
Francisco
. 76
14
124
AlpKanetics
108
101
Discovery Bay Software Co
87
15
13tl
The Allernale Source. .
114
88
Documan Software
7S
1.W
181
T^e Alternate Source
.20
110
Dr. Lee
129
87
4/
Applied Economic Analysis
46
58
Electronic Specialisls. Inc..
64
14ti
Audio-Video Systems (AVS|.
129
26
Electronic Systems
141
90
1tU
Audio-Video Systems (AVS).
..19
40
Esmark incorporated
33
179
4tj
Automated Simulations
.99
3
Exatron Cov. IV
156
49
Basics & Beyond. Inc
66
141
F.E.C. Ltd.
76
71
122
Bill Archbold Electronics..
129
12
FMG Corpocalkxn
37
128
a
The Bottom Shell, if>c
35
120
Fireside Computing Inc
7B
104
t'
Bourrul Consutitng Corp
btl
133
Full Service Accounlir>s and
20
•i*
Brown Graphic Press.
99
Processing
10B
54
14b
C&5 Electronics Marl. Ltd. . .
6;
75
Godbout Elect rontcs. . .
121
180
62
Cecdat, (nc
12fi
159
Goolh Software
67
28
46
Checks To-Go.
75
182
Gooth Software
20
32
Cload MaQazine, Inc. .
59
93
Granite Stale Instrurrwnl Co
93
186
100
CompuCover .
133
177
Group Technotogy, Ltd. . . .
. 19
105
W8
Compusott
. 19
92
H&H Trading Company
86
72
125
Computer Data Services. . . .
119
23
Mobby World Electronics.
139
6A
IX
Computer Generated Data
/6
115
HorT>e Software Exchange. .
87
29
66
Computer Products
.r&
13
Houston MicrQ-Computer
73
bC
Computrex
m
Technologies. Inc 3, 4
103
123
»
Computronlcs Inc 40, 41
103
Howe Software
114
112
ID
Contract Services Associates S3
37
IJG, Incorporated
.54
15fi
52
Cost Effective Computer Serv. 62
2
Instant Software Inc.
144
119
Crown Plaalic Co
76
Cov. 111,109, lie
111
173
ISO
Crown Plastic Co
78
165
interactive Microware. .
. 19
17fl
51
Cryptext Corporalioo
70
187
internal lOnal Software Asso-
143
7
Custom Computer Center, Irv: 25
ciates
140
121
Custom Electronics Irx;. .
135
155
J R Software
135
116
11
Cybermate
51
137
Jerry E Bartram. CPA
91
CyOerrwtics Irx:
69
85
Johnson Associates
99
177
TU
DAR Sales
114
174
19
74
59
DC Sottware & Computer Prod. 70
157
KEMCO, Ltd
9
168
1(X)
Data Associates
20
149
Kogyosha Co.. Ltd
103
Kurtz Micro-Computer Software
.... 87
LNW Research 90
Level IV Products, Inc ... 43
Lobo Drives 39
Lords Corp 91
Management Systems Software
inc 103
Manhattan Software, Inc. . 91. 121
Manhattan Software. Inc 19
Mangold Associates 140
McClam & Associates. Inc . 10B
Med Systems Software 129
Mercer Systems Inc 78
Meta TechrxMogies Corp. . . 6. 7
Micro ArcTvtecl ... 63
Microcomputer Spectatists. 20
Microcomputer Techrxjtogy
Incorporated/Appaial. irtc 62
Micro Decision System. 135
Micro-Futures Trading Co 114
Micro IManaoement Systems 62
Micro Matrix .... 112
Micro-Uega 32
Micron, Inc 131
MicroPtiase Systems 78
Miller Microcomputer Ser 119
MOM'S 142, 143
Mumford Micro Systems 51
Mumlord Micro Systems 20
National Maikeling 18
NEECO .... 21
NRI ScfKmls. .. BI
Newby Software Development
Co... . 129
Nonpareil 133
Northeast Microware 91
Occupational Computing Co. Irx:.
.20
108 Orlhon Compuler 135
2 Percom l^ov. II
163 Percom 20
169 Percom . 20
43 The Peripheral People 34
21 Programma International. Inc 11
186 Quality Software 126
41 RACET Computes 45
1 72 RACET Comixites 20
5 Radio Shack 29
64 Radio Shack Autriorizod Sales
Center 64
135 Radio Shack (Ohio) ii4
17 Realsolt/The Program Store. . . 61
70 REMsoft, Inc 103
154 S&M Systems, Inc 140
131 S-Systems 99
132 Sawyer Software 116
91 Scott instruments 121
19 Simulek 51, 137
67 Sirius Systems 93
1B Small Busir>ess Systems Group
93
83 Small Computer Systems 140
X Small System Software 75
60 The Software Association 112
42 Software. Etc 85
109 The Software Farm 114
189 STATCOM Inc 112
80 Steven E Shaw. P E 99
S2 SturdivanI and Dunn, Inc X
151 Sun Technotofly. Inc ffi
1 1 The TRSflO ftotebook 107
146 Tab Sales Co 140
45 Taranto li Associates, Inc 71
147 Task Compuler Applications. 135
136 Typewriters UnlimiteO. . . .129
84 Ultimate Computer Systems. . 76
31 VR Data 49
111 Vern Sireei Products i36
65 The Vista Computer Co. ... 26. 27
27 Web Associates 49
From 80 Microcomputing ...S3. 144. 145
From Kilobaud Microcomputing 63
* HehI«t Seme* uiQum*! Dot honorrd.
Pltasc CDDtBft ulTCrtkArT dirrctlr.
14C • 80 Microcomputing, March 1980
Ask for Instant Software at a computer store near you
Alibimi
Anoe'son Com put bib
31M Unlvsraily D' , HunlailllB
Corripulviandoi Huntiviiia
3030 Unlvartdy Dr . Hunltvill*
Olsngky BIOS
37B3 Ai'pon Blvd., Motril*
Arizona
4S0 e-A N. ieih Si . Phoenoi
MillBttTV & Radio
62t E««l Bioodwav. M*m
Calllornia
Byle Shop ol F«»ll«l(]
B7 Marina Cenler St . Suiaun Clly
Syl* Shop
BOaa Ciaiimonl Mat* Blvd..
San Olego
BylBShOp Ol Mt View
1415Wa«t EICamlnoRaal. Ml Vi«w
Byta Shop of Sacra(n«nio
e041 Qiaanback Ln., Olrua HWghis
Capital Compulai Syatams
33BG El Camino Ave . Saciamanio
Compulets UaOe Eaty
BIS Eut Ave O-e, PalmdalB
Compulai Slora o' San LaanOro
701 MacAithui Blvd., San Leandio
Compute' WortO
6791 Wellrnlnile' Ave . Weslinmslei
CompuieriBni]
16720 5 Hawthorne, Lawndale
Coitipulodandol S«n fianciaco
1 iT Pfemonl St . San F'ancisco
ComDulBiianoo' W L*
eS'O La Cler>*ca Blvd . Ingtewooa
CoaM Electron I ca
3iiaNo. Main Si . Wo'ro Bay
HoOCiy WoriO
1Sei 1 Business Cli Or , limi 6
Boithrk>g«
I.C E House Inc.
396 Hann E SI , San Bernardino
Mlcroaun Computer Cenlat
2BM Nonn Main St . Walnut CrseK
OpampfTachnicBi Books
1033 N Sycamore Ave., Lob Angeles
I Computers Inc.
i5Sia Hawihoma Bivd , Laondale
Radio Shack Deale'
B250 MIra Mesa Blvd , San Diego
Santa flosa ComDutei Center
604 7in St , Sania Rosa
Silver Spur Eloci Comm
135S3 Central Ava , Chmo
The Compulei Store
820 Broadway, Santa Monica
Colorado
Byle Shop
3464 S. Acoma St EriQiewOOd
Colorado Computer Systems
311 W 7«ih Avi , WMlmlnsler
Compolefland ol North Oenve'
S749 Wldswonh Blvd . Arvada
TheCompulsr Broker
I300WellonSI , Denver
TheCompjle' Store
2300W8itoiS1 Denver
Connaclicul
American Business Compuls's
*i* Thames SI , Grolon
Compulerlah
laOJe'leison New London
Computer I and
i70OPoaLRd., Fa.riieiO
Computer Works
1439 Post Rd. E Liberty Praia.
Wasiport
D.C.
TlK Program Slori
4200 WlaCOhiln Ave.. N W..
Wasningion. DC,
Rorld*
Advenijre inter net lortal
2X Bald Cyprsts Ct.. Longwood
AMF Electronics
11I«6N aOtnSi , Tampa
Boyd Ebeft Corporalion
1328 West 15th 51 , Panama Clly
Compute' Cenler
S67fiCenlral Ave.. St PalBraburg
Computenand ol Fi. Lauderdale
3963 N Fsdeiai Hwy . FI Lauderdale
Compulerland ol Jacksonville
2777-6 Universily Blvd W
Jacksonville
Compulei Shack
3336 Beach Blvd , JBckaonviiia
Curl la Waters Enterprises
236 Talboi Ave . Melbourne
rtoathKll Electronic
470SW lethAve Center Hiaieah
Sound Ideas
ifOI'CN.W I3lh. QainsBvllla
Uhatan Computer Slo'e
Alroort Rd Oestin
WllllamE Radio & TV Inc.
2062 Liberty Si . Jacksonv.lW
Ottorgia
Atlanta Computer Mart
Atlanta
Computenand Ol Atlanta
2423 CoOb Parkway, Smyrna
Hawaii
Compulerland ol Hawaii
567 N, Federal Hnry Honolulu
Radio Shack Assoc Sloie
1712 S King St , Honolulu
Idaho
Electronic Speclallsis
6411 Fairview Ave , Boise
lllinolB
Bloomington Normal
Computer Worlis
124 E Beaulorl, Normal
Computerlary]
«S07 North Sterling, Peoria
Computer Station
3658 Nameokl Rd„ Gran.ie Cily
Midw«sl Micro Compulera, Inc
TOe S Mem St , Lombard
Indiana
Computer Center of South Band
51581 LIS 31 North. South Bend
Iowa
Memory Bank
*}2B Brady SI , Davanporl
Kansas
Cenlral Kansas Compulert
6S Broadway "e'lngion
Louisiana
Computer Shoppe Inc.
3226 Danny Park Su<le 223. Metalne
Maryland
JacK Fives Electronics
4608 Debiien Circle Plkesvllle
The Comm Cenler
9624 Ft Meade Rd Laurel
Massachuattts
Compule'Cily
5 Deiter Row, Chariestown
Compulerland ol Boston
?14 Worcester Ro . Wenesloy
Computer Packages Ltniimiled
24* W Boylsion St., Wee! Boyliton
Llghttiouse Computer SollwS'e
14 Fall R'ver Ave . ReboDath
New England Electronics Co
679 Highland Ave , Needham
The Computer Store
120 Cambridge St , Burlingion
Tults Radio & Electronics
206 Mystic Ave , Medlord
N«w York
Ansio Cra't
314FH1h Ave , NYC
Bill i Bytes
2600 Strelghl M . Frsdonis
Computer Corner
200 Mammon Ave.. While Plains
Com pu let Factory
48SLo«lngton Ave.. NVC
Computer House, inc
721 Atlantic Ave , Rochester
Compulerland ol Nassau
79 Weslbury Ave , Carte Place
Compute' World
519 Boston Post Hd.. Port Chester
Comtek Eiecltonics. Inc
2666 Coney island Ave , Brooklyn
Comiek Eieeironics. Inc
Staten Island Mali
Store 220A, Staten island
Home Computer Cenler
671 Monroe Ave., Rochester
Key Eleclronlr^s
Schenectady
M' Computer
Imp, Piaia, Rle 9, Wapplngera Fsils
Soft ion Systems
306 Columbia Turnpike, R»nss«iae'
The Computer Tree Inc.
409 Hooper Rd,. Endweii
Upstale Computer Shop
629 French Rd , Campus Plaza
New Hartlord
North Carolina
Byte Shop ol Raleigh
1213 Hiiisboiough St.. Raleigh
Ohio
Aiisir Business Syslems, inc.
5252 North Dime Or Dayton
Astro Vldwj Eiecl'onics
504 E, Mam St , Lancagtei
Cincinnati Comp uier Store
481S imarstate 0'., Cmclnnsll
Compulerland
46T9 Great Northern Blvd ,
N 01 m& I sad
CompulerlafW
1286 Som Rd , May'leid Heights
Computer Store ol Toledo
tS Hiiiwyck D' , Toledo
Forbees Microsystems inc
35 N Broad. Fslrbom
Microcomputer Center
7900 Paragon Rd . Daylon
Micio-Mini Computer World
74 RoblnwooO, Columbus
2is1 Century Shop
16 Convention Way, Cincinnati
Oklahoma
Vern Street Products
Radto Shack Dealer
114W Tall St.Sapuipa
Oregon
Compulerland ol Portland
12020 SW MainSL.Tigard
Computer Pathways Unlimited, inc
21StDBvco'Si S,E Saiem
Pennsylvania
Arlco Elect.
302 Wyoming Ave,. Kingston
Arlco Elect
Back Mountain Shop Clr,
Shaverlown
Computer Wofkshoppe
3B46 William Psnn Hwy, Monroevilie
Computeiiand ol Hsnisbuig
4644 Cartisle Pike, Mechanicshurg
Erie Computer Co
2127 West 8lh St Erie
Personal Computer Corp
24-26 WSSI Lancaster Ave , Psoli
Person si Computer Corp
Fraiar Mail. Lancaster Ave.. Frazer
Instant Software Inc
Peterborough, N.H. 03458 603-924-7296
Michigan
Computer Center
28251 Ford Hd.. Garden City
Computer Connections
38437 Grand River Farmlngton Hills
Compulerland ol Grand Rapid ■
2927 2eth St St. Kentwood
Compulerland ot Wocheslar
301 S Livernois, Hochesler
Compuiertand ol Southheid
29673 Northwestern H«ry„ Soutnlleld
Computer Mart
560 W i4MlieRd,,C1iwson
I43bby House
1035 w Terrliorlsi M . Battle Creek
ye Oide Teacher Srioppe
1823 Wllmyre Si , VpSllantI
Mlnnaaola
Compuletlano ol Hopkins
tiaiJHwy F.. Hopkins
Zim Com put era
5717 Kerjes Ave N B'ooklln Center
Mississippi
Dyers, inc
200 E Mam SI.. West Point
Missouri
Computorvan. Inc
51 FiorisBsnt Oaks Shoppirtg Center
Florissant
Conso< idaledSo'twars
16501 Greenwaid Court. Ballon
Montana
intermountein Computer
529 So 9th Si , LlYlngslon
Personal Computer
121 Red Oak Dr , Carl Junction
The Compgler Slore
121B leih Si W 135, Billings
Nabraska
Compulerland oi Omaha
11031 Elm SI,, Omaha
Midwest Computer Co Inc
8625 I St Omaha
Midwest Compuier Co inc
4442 S. 64lh SI , Omaha
Midwesi Compuier Co. inc
4403 S S7tn St , Omaha
Navada
Century 23
4566 Spring Mountain Rd . Las Vegas
Ntw Hampshire
BitsnDyies Computer Cenler
566 Pleasant St . Cortcord
CompulerClly
1S2S S, Willow. Manchasle'
Portsmouth Computer Center
31 Raynes Ave , Portsmouth
Naw Jarsty
Compuier Encounter
2 Nassau St.. Pnnceton
Computerlend
36 Plata Rte »4 W Paramus
Compuier Man ol NJ
501 Rte 27, Iselin
Radio ShscWJSJ Electronic
MansHeid Shopping CD
Ri 57 Allen Hd , Hackettstown
The Bargain Brothers
Glen Roc Shopping Center
216 Scoicn Road, Trenton
Naw Msxico
Legey and Associates
2906 Tahiti CI, N E , Albuquerque
South West Computer Center
121 Wyati Drive, Suite 7, Las Cruces
South Dakota
CB Radio Stuck
2i»l and Broadway, Tankio"
Tann*ssM
Computeriab
671 S Menden Hall Rd.. Memphis
HAH Electronics inc
SOe U. Jackson SI . Tullahoma
Taxas
Computercali inc
3211 Fond'en. Houston
Computer Pon
926 N Coiiig. Arlington
Houston Micnscompoler Tech
5313 BIsBonet, Belt Aire
In terse live ComputerB
7620 Dashwood Rd . Houston
K.A. Elect
0OK Stemmona Frwy . Dallu
Pan American Elect. Inc.
1 1 1 T Conway. Mission
Ram Micro Systems
6353 Cemp Bowie BivO , FI Worth
Vlrolnla
Home Computer Center
2927 Vltsmia Sesch Bhrd,
Virginia Beach
Souihilde Radio Comm
135 Pickwic" Ave., Colonial Helghis
Washington
American Mercantile Co Inc.
2418 isl Ave, S , Seattle
Compulerland o' South King Co
1SWS 336 SI , Suite 12
Federal Way
Personal Computers
S 104 Frev*. Spokane
Ye Old Compular Shop
130' G Wsehington, Richland
West Virginia
The Computer Corner Inc
22 Beechu'sl Ave.. Morgantown
The Computer Store
Municipal Parking Bidg , Charlestoo
Wisconsin
Byte Shop 01 Milwaukee
6019 West Layton Ave,, OreenlleW
Wyomlrtg
Computer Concepts
617 W 16th St , Cheyenne
Puarlo Rico
Tl\e Microcomputer Slore
1568 Ave Jesul T Plnero
Caparra Ts'racs
Ouam
TheFun Factory
851 Marine Dr., Tamumirtg
Canada
CANADIAN DISTRIBUTORS-
Mlcron DiStfiI>Ullng
409 Queen St W Toronto, Onl
M6V M5
CompuleiUnd o* Winnipeg
715 Portage Ava , Winnipeg, Man,
Comoumart
41 1 Roosevelt Ave , Ottawa. Ontario
Ckimpuler Mart. Lid
1055VongeSI , Suite 206
Toronto. Ontario
Oalaciia Compuleri
103rd Ave , Edmonton, Alberta
Micioffiahc Systems me
101 81 36 Park Hd.. Richmond, BC
Micro Shack ol W Canada
333 Park Street, ReQina SasK
Olhon Holdings Lid.
12411 Stony Plain Road
Edmoolon. Alberta
Total Compuier Systems
A|a> Ontario
England
Tamays & Fair Lid
4 Morgan SI . London
Franca
Sideg
45 Rue de la CtMp*"*. R*"*
SIvea s a
20, Rue da Leningrad. Pans
Italy
HOMIC i r I
Plana De Angeti I Mllano
Wast Germany
Electrcnic Hobby Shop
Kaiserstr 20. Bonn
MicroShop BoOensee
Marktii 3, 7776 Markdort
Australia
Computerwaie
62 Paisley St . Foot sera y VIC
Deforest Software
36 Glen Tower Drive
Glen Waverty. ViC
Solironics Micro Systems
Lindliek)
Sure-Load So it ware
PO Bo«2e. Weston, A.C.T.
South Africa
Eddie Talberg
PO Boi 745. Johanrtesburg