Micro_Cornucopia_23_Apr85.pdf

(9869 KB) Pobierz
$3.00
April...May,
1985
TABLE OF CONTENTS
Automatic Disk Re..logging With CP/M 2.2 ........................
Interrupt Driven Serial Print Driver..................................
Review: Microsphere RAM Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Do It Yourself Smart Video Controller..............................
In..line Object Code In Turbo Pascal.................................
An Inspired Turbo Tutor.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
New Strokes for KSTROKES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A Low Cost EPROM Eraser .................................... . . . . . .
Pascal and C Compilers Benchmarked
~..............................
Running CP/M's TPA .................................................
Ready To Use Files .. _...........
:t~,-
........ ; ..
<' .. :.: ...... : ..............
Regular Features
4
18
41
43
51
60
63
63
65
67
81
The S.. 100 Bus...............
In The Public Domain.......
The Xerox Column..........
C'ing Clearly.................
The Slicer Column..........
The Kaypro Column. . . . . . . .
Pascal Procedures............
FORTHwords ...............
9
13
21
25
32
35
52
58
On Your Own............... 72
Technical Tips............... 74
Culture Corner ........ .. .. .. 82
Future Tense
Tidbits ..........-. . . . . . . . . . . . . . 83
Review: Epson PX..8 ........ 84
The Last Page .. .. .. .. .. .. .. .. 88
They
said
it
couldn't
be done.
Borland
Did
It.Turbo
Pascal
ao
The industry standard
With more than 250,00Q users worldwide Turbo
Pascal is the industry's de facto standard. Turbo
Pascal is praised by more engineers, hobbyists,
students and.professional programmers than any
other development environment in the history of
microcomputing. And yet, Turbo Pascal is
simple and fun to use!
TURBO
3.0
TURBO
2.0
The best just got better:
, PASCAL
Introducing Turbo Pascal 3.0
We just added a'whole range of exciting new
features to Turbo Pascal:
• First, the world's fastest Pascal compiler just got
faster. Turbo Pascal 3.0 compiles twice as fast as
Turbo PascaI2.0! No kidding.
• Then, we totally rewrote the file
110
system, and .
.we also now support
110
redirection.
• For the IBM PC versions, we've even added
'turtle graphics" and full tree directory support.
• For all 16 Bit versions, we now offer two addi-
tional options: 8087 math coprocessor support
for intensive calculations and Binary Coded
Decimals (BCD) for business applications.
• And much much more.
MS
COMPILATION SPEED
EXECUTION SPEED
CODE SIZE
BUILT-IN INTERACTIVE EDITOR
ONE STEP COMPILE
(NO LINKING NECESSARY)
,,:"
The Critics' Choice.
Jeff Duntemann, PC Magazine:
"Language
deal of the century .
..
Turbo Pascal: It
introduces a new programming environment and
runs like marjic."
Dave Garland, Popular Computing:
"Most
Pascal compilers barely fit on a disk, but Turbo
Pascal packs an editor, compiler, linker, and run-
time library into just 29K bytes ofJandom-
access memory."
'Jerry Pournelle, BYTE:
'What I think the
computer industry is headed for: well
documented, standard, plenty of good features,
and a reasonable price."
COMPILER SIZE
TURTLE GRAPHICS
BCD OPTION
PRICE
Portability
Turbo Pascal is available today for most computers
running PC DOS, MS DOS. CPIM 80 or CPIM 86. A
XENIX
version ofTurbo Pascal will soon be announced.
and before the end of the year, Turbo Pascal will be
running on most 68000 based microcomputers.
(*)
Benchmark run on an IBM PC using MS Pascal version 3,2 and
the DOS linker version
2.6.
The 179 line program used is the "Gauss-
Seidel" program out of Alan
R.
Miller's book:
Pascal programs for
scientists and engineers
(Sybex. page 128) with a 3 dimensional
non·singular matrix and a relaxation coefficient of
1.0.
An Oller You Can't Reluse
Until Jl:me 1st, 1985, you can get Turbo Pascal 3.0 for
only $69.95. Turbo Pascal 3.0, equipped with either the
BCD or 8087 options, is available for an additional
$39.95 or Turbo Pascal' 3.0 with both optiotls for only
$124.95.
As
a matter of fact, if you own a 1"6 Bit
computer and are serious about programming, you
might as well get both options right away and save
almost $25.
Update policy
As
always,
our first commitment is to our customers.
You built Borland and we
will
always honor your
support.
50,'to make your upgrade tathe fl)«;iting new version of
Turbo Pascal 3.0 easy, ,we will accept your original Turbo
Pascal
disk
(ina bend-proof container) for a
trade-i!'""~
c .
credit of $39.95 and your Turbo87 original
disk
for
$59.95. This trade-in credit
may
only ,be applied
toward
the purchase of Turbo Pascal 3.0 and its additional BCD
and 8087 options (trade-inoffer isonly vand directly
through Borland and until Juneist, 1985),
',' ,
I
I.
BORlAnD
INTERNATIONAL
_
Software's Newest Direction
4113 ScottsValleyDnve
Scotts Valley, Califorma 95066
TELEX,' 172373
MICRO CORNUCOPIA
P.O. Box 223
Bend, Oregon 97709
503-382-5060 Orders Only
503-382-8048 Tech. 9 - Noon
Editor
&
Publisher
David J. Thompson
Operations Manager
David Pogue
Assistant Editors
Rebecca Ozrelic Gary Entsminger
Accounting
Sandra Thompson
Graphic Design
Craig Lannes
Michael Odell
Technical Department
Dana Cotant
Eric Roby
Bruce Berryhill
Laine Stump
Advertising Director
Alice Holbrow
Staff Assistants
Dorcas Dsenis
Tracey Braas
Cary Gatton
Carla Miller
Laura Pendley
Secretary
Christina Donaldson
Typography
Patti Morris
&
Martin White
Irish Setter
MICRO CORNUCOPIA supports systems
programming languages and builders of single
board and 5-100 systems.
Application to mail at second class postage
rates is pending at Bend, OR 97701. Published
bimonthly by Micro Cornucopia Inc., 155 NW
Hawthorne, Bend, OR 97701. Postmaster:
Send address change to Micro Cornucopia
Inc., PO Box 223, Bend, OR 97709.
SUBSCRIPTION RATES:
1 yr. (2nd Class)
$16.00
1 yr. (Canada
&
Mexico)
$22.00
1 yr. (Other foreign)
$30.00
Make all orders payable in U.S. funds on a
U.S. bank, please.
ADVERTISING RATES: Available on request
(call Alice Holbrow).
CHANGE OF ADDRESS: Please send your
old label and new address.
SOFTWARE, HARDWARE, AND BOOK
VENDORS: We would very much like to re-
view your software, Single Board, and 5-100
products. Send materials to the Review De-
partment, Micro Cornucopia.
Copyright 1985 by Micro Cornucopia Inc.
All
rights reserved
111110 1101111110.11
April-May 1985
The Micro Technical Journal
No. 23
April
Fool
SOGIV
If
you saw the list of folks who have
already signed up for the SaG this year,
you'd be surprised (we're certainly sur-
prised).
Ezra Shapiro, West Coast technical ed-
itor for Byte, will be our keynote speak-
er. His talk will be titled "The Demise of
Innovation." Ezra will be sharing with us
his very definite ideas about the 'me-too'
designs.
Slicer will be having a board construc-
tion party again (they'll throw in a bare
expansion board free if you build one
this year), plus they'll be bringing all the
rest of their new products to demon-
strate and selL Call them to reserve a
board.
The Ampro folks will be bringing up
their Little Board and they are going to
be holding a construction class (at special
prices). In fact, you'll be able to put to-
gether a complete Little Board system
complete with Integrand cabinet and
drives, right at the SaG. they'll have
something new to demonstrate. The lit-
tle Board folks will also be giving a talk
on designing with the Z80. (Actually the
Ampro folks think they are giving
it.)
Integrand will be here displaying their
Little Board cabinet (if you're surprised,
go back and reread the previous para-
graph). They'll also be doing a presenta-
tion on cabinet design and system cool-
ing.
We've invited Philippe Kahn back,
this time to talk about Modula-2 (Turbo
style), and to toot his own horn (he plays
a mean sax). We're still waiting to hear if
he can come.
Speaking Of Music
In fact, we have a very musical group
working at Micro C. Gary and Craig play
guitar (semi-professionally); Bruce plays
the flute; Jean (his other half) plays fid-
dle, and I have one of those fancy Yama-
ha synthesizers (the DX7), so I can pre-
tend to be just about anything (even an
editor).
My little MSX computer also contains
a pretty decent synthesizer (rhythm any-
one?), so we should be be able to come
up with something interesting.
In fact, we will have a jam session
Thursday evening after the Kickoff
Cookout. You are all encouraged to bring
your woodwinds, bongos, strings,
horns, synthesizers, kazoos, speech
generators, Integrands, tin ears, every-
thing ....
If
we come up with something
that even approximates music, maybe
we'll have a lunch-time performance on
Saturday.
White Water Rafting
This year we'll have the 21/2 hour raft
trip (just like last year), plus an all-new,
all-day affair. The all-day white water
trip will feature a total of
41/2
hours on
the McKenzie River (not counting the
one-hour lunch on the bank). There will
be an incredibly beautiful P/2 hour van
ride to the starting point through some
of the most beautiful alpine terrain in the
Northwest.
Reservations
There are limitations on the number of
people we can accommodate in the dorm
(there are only 25 double rooms). The
rafting trips shouldn't be any problem
because the guides will run as many
groups as necessary. But please call us to
verify space if you want to stay in the
dorm.
Trenton
The 10th annual Trenton Computer
Festival will be held April 20 and 21 at
Trenton State College, Trenton NJ. They
say it's the oldest computer fair in the
country. I've also heard they have one of
the best flea markets going (a whole
parking lot full of tables and tractor trail-
ers). When I mentioned that I would be
attending, Sol Libes suggested that I
come in a truck.
(Continued on Page 77)
ISSN 0747·587X
LETTERS
Go Winnie!
I have enjoyed your publication very
much during the past year. In fact, I re-
cently changed my subscription to first
class and submitted two gift subscrip-
tions.
I have a comment on the closing para-
graph of your Kaypro column for Octo-
ber.
We have had three Kaypro lOs with
this same 'status 02' error over the last six
months. Each time the error occurred,
the hard disk was not up to speed when
the Kaypro 10 tried to read it. In all three
cases the problem stemmed from the
hard disk controller board. After the
boards were replaced, the 'status 02' er-
ror problem was resolved.
StanleyD. Watson
4745 Convention Street
Baton Rouge LA 70806
sion of ZCHESS out there somewhere
without the bug?
The other thing I wonder about is that
the version of ZCPR on your second re-
lease of it (haven't tried the first) puts a
/I'
at the end of each comment it makes, in-
cluding each listing in a directory. Minor
little mark, and it's so damned useful
that it's certainly overlookable. But what
the heck is it doing there? And can the
thing be exorcised? (By the way, rm run-
ning it on an '83 II.)
Whitney Blauvelt
505 E. Denny Way #507
Seattle WA 98122
not sold in Radio Shack or in most
elec~
tronic supply houses. Nor could I find it
in most computer stores which claim to
have a service department.
The Micro C Plus-4 Decoder Board
does not go on the obvious way. The
numbers on the decoder board must cor-
respond with those on the main board,
which means that the decoder board will
cantilever out over the drive enclosure.
When the cover is put back on, every-
thing shorts out. This probably never
happens to the Micro C folks who never
put their covers back on. The problem
can be fixed up with some electrical tape
and cardboard, but it would be better
if
the designer went back to the drawing
board.
Neither the problems nor their solu-
tions were very profound, but resolving
them took about three quarters of the
time needed for the entire installation.
Everything is working nicely now.
WalterB. Whitcher
319 E. 24th Street
New York NY 10010
Editor's note:
I
also got a call from a local dealer about this
problem. He had contacted two of the drive
manufacturers and found out that some of the
drives Kaypro is using are the low current
versions which start very slowly. (In fact,
they often won't start at all if the head gets
left somewhere other than in the safety posi-
tion and is resting on the disk.)
He has found that if he lubricates the win-
chester's stepper arm with a little silicon
spray, the head will return to the safety posi-
tion between data fetches and the drive will
start properly the next time the system is
turned on.
ZCHESS
&
Ticks
I certainly wouldn't begin to complain
about the value of your users disks. But I
would like to point out a bug or two.
First, on ZCHESS from K3 there have
been several occasions when the com-
puter playing black thinks it's entitled to
move two pawns two spaces at once
from other than the second rank. This
wouldn't bother me so much except that
it won't let me cheat in the same way.
Now, there's certainly twelve bucks
worth of other stuff on that disk, but it
would be nice
if
the main attraction for
, me didn't have that bug. (The CRC
checks out, by the way, although I guess
there could be some obscure memory
problem in my machine causing this
slip.) Anyway, I wonder if there's a ver-
Editor's note:
Due to papular demand we changed ZCPR
to display special characters (the normal CCP
doesn't let them reach the screen, but people
wanted to display them and
so
we
... ).
Any-
way, that little tick you see on the screen is
what the Kaypro displays when it sees a null
(0) byte. Every other system I've seen simply
discards the null, but not the Kaypro (there
are a number of situations where the null can
be very irritating).
So
it is not without malice
of forethought that our Pro-Monitor ROMs
throwaway nulls.
Pro-8 Installation
Someone once said that the devil
dwells in the details. I found this to be
true when I recently did the Pro-8/Plus-4
upgrade on my Kaypro II, installing two
Mitsubishi half-height, quad density
drives (4853) in place of the original 'A'
drive. I would like to pass along what I
learned about some of the details of this
upgrade.
The existing screws holding the Tan-
don drives require a
7/64"
allen wrench.
This is a size not found in most of the
common allen wrench sets.
The screws from the Tandon do not fit
the Mitsubishis. You need 3m x 1m sock-
et head cap screws which are not avail-
able in most hardware stores.
To install two half-height drives in
place of one full-height drive the entire
drive enclosure must be removed from
the computer case and new holes drilled
in it. This is not particularly difficult, but
laying out the new holes is tedious. This
wouldn't even need to be done
if
only
one new drive were being installed.
The power connector for the drives is
Editor's note:
You are right about our covers. They come
off when the machine comes out of the box and
they usually stay off. Forever. Now, we are
using a new low profile connector (the part
that hangs out over the drives)
so
folks' cir-
cuits shouldn't be
so
short any longer.
Xerox 820 Info
I've recently 'discovered' Micro Cor-
nucopia and I am enjoying it. It's nice to
see a magazine that gets down to the
basics. I wrote the Apple Cart column in
Creative Computing for three years
when an author could still do some of the
things you do in your publication. Now,
if
you aren't reviewing someone else's
software, no one wants your articles.
The parts of Micro C that I am most
interested in are those about the original
820 CPU. I was the senior electrical man-
ufacturing engineer on the program
from its beginning. From that perspec-
tive I'd like to make a few comments.
A technical reference manual called
/lSoftware Development Guide" was
published to complete the only detailed
source of 820 documentation. The book
includes all the software and hardware
information available for the 820 board.
2
Micro Cornucopia, Number 23, April-May 1985
LITTIRS
All the schematics for PWA etches 1 and
2 are there, as are the listings for versions
1.0 and 2.0 of the monitor ROMs. There
is a wealth of other information includ-
ing programming data for the SIOs,
PIOs, the CTC and the FDC chips. Per-
haps you could get permission to reprint
this as a project for Micro C magazine.
About disk drives, software, and other
things. Most people know that the 820
'was designed for single-sided 51/4"
drives. Later, the double-sided drives
were added and so were single-sided 8"
drives. With the etch 1 CPU, it was not
directly possible to use DS 8" drives. For
DS 51/4" drives, version 3.0 of the
CP/M
operation system was issued. This al-
lowed the user to initialize and copy on
two-sided media.
In the process of developing test pro-
cedures and equipment for the two-sid-
ed drives, I discovered that the software
was really looking at four separate sin-
gle-sided drives. Once a diskette was
initialized with the 3.0 INIT program, I
used my DS system as four drives in the
sequence A,C and B,D; worked fine, too.
I could get the equivalent of four single-
sided drives in a two-drive package.
Otherwise, the original system was ca-
pable of four single-sided drives any-
way. The user would only need to prop-
erly wire and encode the drive block on
the individual drives. Shugart's SA400
manuals show how to do this.
Chuck Carpenter
3714 Bishop Hill Dr.
Carrollton TX 75007
Fixing The SBASIC Sorts
In Jack Rodenhi's SBASIC column (Is-
sue 19) there seems to be some confusion
about SBASIC's rules governing recur-
sion. Rodenhi states, "In the manual's
example program on recursion, X2
seems equivalent to our variable List-
Size. In the discussion of their program,
they claim that X2 would not be duplicat-
ed when P3 is called from P4." Jack is
correct that ListSize is equivalent to X2
and that it is indeed duplicated. Howev-
er, he is incorrect in saying that this cor-
responds to P4's calling P3 on line 20 of
the manual's example program.
In SSSORT (Jack's procedure which
contains ListSize), it is SSSORT itself
which calls its nested procedure READ-
RECORDS (causing ListSize to be treat-
ed recursively). The corresponding call
is on line 26 of the manual's example
program, where P2 calls P3. There it
clearly shows that X2 will be duplicated.
Although the example program cor-
rectly indicates how SBASIC's recursion
occurs, the manual does not. (So what
else is new?) Recursion occurs when a
procedure calls itself or when one nested
procedure calls another nested proce-
dure (including the situation where a
nested procedure calls the unnested pro-
cedure which contains it). Recursion will
also occur when a nested procedure is
called by the procedure which contains
it. (Anyone for Peter Piper?)
Also, arrays are treated differently
than variables in recursive calls because
arrays are not duplicated.
(If
the call
causes the DIM statement to re-execute,
however, the array may be reinitialized.)
This provides at least four ways for
Jack to fix his program:
1. Procedures (such as READ-
RECORDS) which change one of the
variables he ,describes as "global in the
procedure SSSORT" could be rewritten
as subroutines.
2. Those same procedures could in-
stead be rewritten as functions which re-
turn the value of the changed variable (in
use this might look like "ListSize
=
READRECORDS (ListSize(O)").
3. The variables in question (such as
ListSize) could instead be declared as
one-element integer arrays (e.g., List-
Size (0)).
4. Those same variables could be
made global to SSORT by moving their
declaration outside of the procedure (of
course, that would make them global to
the rest of the program as well).
Richard Levine
3105 Meadow Grove Dr.
San Diego CA 92110
Run CP/M On An IBM?
I need your help with a
CP/M
prob-
lem. I haven't been able to locate any
products that will do what I want.
I am writing software in Turbo Pascal
under MS-DOS. I want to port over fin-
ished software to run on CP/M ma-
chines. For this conversion, are there co-
processor boards I can add to my
PC-compatible system so it will look like
a CP/M system to a CP
1M
Turbo Pascal
compiler? Are there any products for the
PC that emulate the Z80 or 8080 to do
what I want?
Please supply the names and address-
es of any suppliers of suitable boards and
emulators. Many thanks for your help.
, Frank
J.
Mihm
Box 622
Aptos CA 95001
Editor's note:
What a refreshing request. For
a
while
there,
I
thought everyone was going in the
other direction.
OK,
there are several clones
(or semi-clones) that say they can run both:
Rainbow, Chameleon, and,
I
believe, one of
the Heath systems. However,
I
am not aware
of any plug-in boards that will handle this.
Any suggestions, anyone?
The obvious option would be to get a Kay-
pro and transfer the software over serially.
Kaypro also has a utility that is supposed to be
able to read MS-DOS disks and transfer files
to
CP
1M.
So
far, we haven't been able to get it
to work. What are you working on, by the
way?
Speed-Up Problem
I purchased a Pro-Set II so I could up-
grade my 1983 Kaypro II to 5MHz (and
then do a program for the Palm Beach
KUG). In the process, I learned a few
things.
First, my Kaypro II is really a 4 inside
so I had to exchange the Pro-Monitor II '
for a Pro-Monitor 4. Second, the Z80B
costs between $12 and $45 depending on
where you buy. Third, I'm still having a
problem because at 5MHz the system
runs for about a minute and a half and
then locks up.
Gene Klein
12775 Builford Circle
West Palm Beach FL 33414
Editor's note:
You are not the only person who has a
II
with the heart of a
4.
Anyone with an older
Kaypro
II
(pre-84-which means it has the
standard full-width Tandon drives and no
graphics) should take the top off his or her
Kaypro
II
and read the paper stuck to the top
of the monitor ROM (there are two chips
with paper on top-the one nearest the front
(Continued on Page
64)
Micro Cornucopia, Number 23, April-May 1985
3
Zgłoś jeśli naruszono regulamin