Micro_Cornucopia_#21_Dec84 Micro Cornucopia #21 Dec84
Micro_Cornucopia_#21_Dec84 Micro_Cornucopia_%2321_Dec84
User Manual: Micro_Cornucopia_#21_Dec84
Open the PDF directly: View PDF .
Page Count: 84
$3.00
December-January 1985
No. 21
TABLE OF CONTENTS
Analog to Digital Interface.............................................
4
Communication Between High..Level and Asse~bly Language ..... 10
Pascal Procedures ....................................................... 14
Installing Turbo Pascal ................................................. 16
Xerox 820 Column ...................................................... 20
C'ing Clearly ............................................................ 24
Low Intensity BB I Video .............................................. 26
Slicer Column .......................................................... 31
Saving Money on Quad Density Disks ............................... 34
Three Keyboard Translators ........................................... 36
Kaypro Column ........................................................ 40
KAMAS, An Outline Processor ....................................... 47
FORTI-Iwords .................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 48
SBASIC Column ......................................................... 52
Cooling a Hot Computer .............................................. 55
No Fault Power ......................................................... 61
On Your Own: Turbo Pascal, the Early Days ........................ 63
Technical Tips .......................................................... 76
"THE ORIGINAL BIG BOARD"
OEM - INDUSTRIAL - BUSINESS - SCIENTIFIC
SINGLE BOARD COMPUTER KIT!
Z-80 CPU!
64K RAM!
(DO NOT CONFUSE WITH ANY OF OUR FLATTERING IMITATORS!)
tiw
::J
ow
a:
z
o
>
Q.
o
o
w
w
a:
IL
>=
IZ
~
a:
a:
~
~
c
w
!::
:E
::l
~
c
o
en
a:
::J
o
IL
o
rn
:E
a:
w
Iw
THE BIG BOARD PROJECT: With thousands sold worldwide and over two years of field experience, the Big
Board may just be one of the most reliable single board computers available today. This is the same design that
was licensed by Xerox Corp. as the basis for their 820 computer.
The Big Board gives you the right mix of most needed computing features all on one board. The Big Board was
designed from scratch to run the latest version of CP/M·. Just imagine all the off-the-shelf software that can be
run on the Big Board without any modifications needed.
FULLY SOCKETED!
FEATURES: (Remember, all this on one board!)
(64K KIT
BASIC I/O)
SIZE: 8'12 x 13'/. IN.
SAME AS AN 8 IN. DRIVE.
REQUIRES: +5V @ 3 AMPS
+ - 12V @.5 AMPS.
64K RAM
24 x 80 CHARACTER VIDEO
Uses Industry standard 4116 RAM's. AII64K Is available to the user, our VIDEO
and EPROM sections do not make holes In system RAM. Also, very special care
was taken In the RAM array PC layout to eliminate potential noise and glitches.
With a crisp, flicker-free display that looks extremely sharp even on small
monitors. Hardware scroll and full cursor control. Composite video or split video
and sync. Character set Is supplied on a 2716 style ROM, making customized
fonts easy. Sync pulses can be any desired length or polarity. Video may be
Inverted or true. 5 x 7 Matrix - Upper & Lower Case.
~
Z-80 CPU
o
Running at 2.5 MHZ. Handles all 4116 RAM refresh and supports Mode 2
INTERUPTS. Fully buffered and runs 8080 software.
FLOPPY DISC CONTROLLER
SERIAL I/O (OPTIONAL)
Uses WD1771 controller chip with a TTL Data Separator for enhanced reliability.
IBM 3740 compatible. Supports up to four 8 Inch disc drives. Directly compatible
with standard Shugart drives such as the SA800 or SA801. Drives can be
configured for remote AC off-on. Runs CP/M" 2.2.
Il-
t>
..,w
III
::J
rn
w
c
~
:E
rn
w
Full 2 channels using the Z80 SIO andtheSMC 8116 Baud Rate Generator. FULL
RS232! For synchronous or asynchronous communication. In synchronous
mode, the clocks can be transmitted or received by a modem. Both channels can
be set up for either data-communication or data-terminals. Supports mode 21nl
Price for all parts and connectors: $39.95
BASIC I/O
Consists of separate parallel port (Z80 PIO) for use wlth.an ASCII encoded
keyboard for Input. Output would be on the 80 x 24 Video Display.
TWO PORT PARALLEL I/O (OPTIONAL)
Uses Z-80 PIO. Full 16 bits, fully buffered, bl-dlrectlonal. Uses selectable hand
shake polarity. Set of all parts and connectors for parallel I/O: $19.95
I
REAL TIME CLOCK (OPTIONAL)
Uses Z-80 CTC. Can be configured as a Counter on Real Time Clock. Set of all
parts: $9.95
..J
~
rn
..J
..J
~
BLANK PC BOARD - $89.95
The blank Big Board PC Board comes complete with full
documentation (including schematics), the character ROM,
the PFM 3.3 MONITOR ROM, and a diskette with the source
of our BIOS, BOOT, and PFM 3.3 MONITOR.
CP/M* 2.2 FOR BIG BOARD
The popular CP/M' D.O.S. to run on Big Board is available for $139.00.
DOUBLE DENSITY ADAPTER BOARD - $149.95 (A&T~
Requires no cuts or MODS to an existing Big Board. Gives up to 670K storage on
a Single sided 8 In. diskette. With software to patch your CP/M" 2.2.
PFM 3.3 2K SYSTEM MONITOR
The real power of the Big Board lies In Its PFM 3.3 on board monitor. PFM commands Include: Dump Memory, Boot CP/M", Copy, Examine, Fill Memory, Test Memory, Go To,
Read and Write I/O Ports, Disc Read (Drive, Track, Sector), and Search PFM occupies one of the four 2716 EPROM locations provided. Z-80 Is a Trademark of Zilog.
Digital Research Computers
(OF TEXAS)
P.O. BOX 461565 • GARLAND, TEXAS 75046 • (214) 225-2309.
TERMS: Shipments will be made approximately 3 to 6 weeks after we
receive your order. VISA, MC, cash accepted. We will accept COD's (for the
Big Board only) with a $75 deposit. Balance UPS COD. Add $4.00 shipping.
USA AND CANADA ONLY
*TRADEMARK OF DIGITAL RESEARCH. NOT ASSOCIATED WITH DIGITAL RESEARCH OF CALIFORNIA, THE ORIGINATORS OF CPM SOFTWARE
**1 TO 4 PIECE DOMESTIC USA PRICE.
MICRO CORNUCOPIA
P.O. Box 223
Bend, Oregon 97709
503-382-8048
IICIO CDIRVCDrll
December-January 1985
Editor & Publisher
David J. Thompson
Operations Manager
Myron Pogue
Assistant Editor
Rebecca Ozrelic
I See
Spots
Graphic Design
Barbara Smiley
Technical Department
Dana Cotant
Eric Roby
Tony Ozrelic Laine Stump
Advertising Director
Alice Holbrow
Staff Assistants
Dorcas Dsenis Tracey Braas
Carla Miller
Cary Gatton
Secretary
Christina Donaldson
MICRO CORNUCOPIA is the systems journal supporting systems programming languages and builders of single board and 5-100
systems.
MICRO CORNUCOPIA is published six
times a year by Micro Cornucopia Inc. P.O.
Box 223, Bend, Oregon 97709.
SUBSCRIPTION RATES:
$16.00
1 yr. (bulk rate)
1 yr. (first class)
$22.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 you old
label and new address.
SOFTWARE, HARDWARE, AND BOOK
VENDORS: We would very much like to review your software, Single Board, and 5-100
products. Send materials to the Review Department, Micro Cornucopia.
CP/M is a trademark of Digital Research, Inc.
Copyright © 1984 by Micro Cornucopia
All rights reserved
Putting Ink On Paper
Those of you who have been with Micro C over the years and those of you
who have waded through most of the
back issues have followed the growth of
Micro C from a 16-page light-weight to
this 70+ page catalog. (At least they feel
like catalogs when we're hauling more
than 3,000 pounds of them to the post
office.)
Well, we're still going and growing
thanks to a strong core of contributors
and a very responsive group of Kaypro
owners who are just as excited about the
technical details of their system as us
"old" timers. Well, as you will see, there
will soon be another new group of Micro
C subscribers. Many of these, however,
are already "old" hands.
Microsystems
Microsystems magazine, begun in 1979
by Sol Libes, has had the same kind of
supportive readership that we have had.
Originally the magazine was called 5-100
Microsystems and it helped guide the 5100 system through its infancy and toward its current maturity. In the process,
5-100 Microsystems attracted a loyal following of very technical people.
As the computer market moved away
from the 5-100 bus, Sol dropped the 5100 prefix and began shifting the emphasis from hardware to operating systems
(CP/M 80, CP/M 86, MSDOS, and UNIX) and systems software. He was hoping to expand the audience (there are only a limited number of really technical
folks) and remain viable in this rapidly
No.21
changing marketplace.
During this period along came ZiffDavis, a giant publisher looking for ways
to make inroads into the burgeoning
computer market. Microsystems seemed
just the ticket, and Sol, well, he was
much more interested in writing and
teaching than in publishing, anyway, so
he sold the magazine. (We magazine
types don't need offspring; we have our
publications which are just as ornery and
spiteful and fun as kids ever dreamed of
being.)
Ziff-Davis installed some new (expensive) talent and made Microsystems a
real high-class operation complete with
salesmen, bingo cards, and special subscription deals. Its goal was a total circulation of 100,000 (newsstands and subscribers).
It turns out that per-copy printing
costs drop dramatically when you run
100,000 copies. At that number, a fourcolor, 120-page magazine costs about 60
cents per copy. That's less than it costs
us per copy to print a 72-page black and
white Micro C.
Anyway, Microsystems' circulation
peaked at about 50,000 (which may be
two copies for every 5-100 system in the
country), so the December issue will be
the last. (Sol was devastated when they
told him.)
The Wall Street Journal just reported
that Ziff-Davis has put 25 of its business
and consumer magazines up for saleincluding: Car and Driver, Popular Photography, Travel Weekly and Stereo Review. The article indicated that Ziff was
not selling any of its computer magazines (what's left of them).
So Ziff-Davis appears to be putting its
corporate house in order and in the process the computer community is losing an
institution. I'm very sorry to see it go.
But:
New Columns In Micro C
Just when you thought that Micro C
was already chock-full of columns
(nuts), we announce two new ones. Sol
Libes has agreed to do a column for us.
He will be writing about public domain
software, and he should certainly know
(continued on page 70)
1
LITTIRS
D_ear Editor,
We want to thank you for the mention
in Issue 20, "On Your Own." We're sorry
you don't approve of the name of our
company (BEE. MaR Enterprises). Our
name is our names: Linda Bee and Gary
Morris, and fortunately we didn't shell
out $40,000 to name our company
BEE.MOR. We have been marketing peripheral products and systems for Kaypros, and operate a disk drive service
center. Fortunately, our business is
MaR, not less, than last year because we
ship a good product.
We are avid readers of Micro C and appreciate the wealth of knowledge you
provide.
Linda Bee
Gary Morris
BEE.MOR Enterprises
22182nd Ave. E.
Sumner WA 98390
Editor's note:
Thanks for the letter, Linda and Gary. The
response to that "On Your Own" column
was immediate and very interesting. Some
people loved it, some had mixed feelings, and
others thought I was off base (I won't repeat
how far off).
Picking on someone's business name is
about as bad as picking on his personal name
(perhaps worse since he didn't have any
choice over his own name).
Before I wrote the column, I told the outfit
that distributes Dulmonts what I thought
about the name (to their face). The distributor
indicated that it too had tried to get the name
changed but that the Dulmont company insisted: "That's always been our name, we're
successful, and we're not going to change
it!!!!!!!!!!" The Dulmont company was definitely not interested in a new name.
The Integrand folks responded immediately with a beautifully written reply. Their
name was derived from the mathematical
term "integration," and at the time, they
thought it was appropriate for a small cabinet
company (and from what I've heard they are
not all that small any longer). And, to answer
Integrand's question, "If you make pianos
like you make your cabinets, yes , I'd definitely
be interested in a piano."
Jim Tanner also called to say that according
to his recollection, the name "Big Board" was
his idea. One afternoon while going over
prices for producing the Big Board circuit
2
board someone commented that the run
would be expensive because it was such a "big
board." No too long afterwards he was tuned
to the stock market report while driving
home. They announced the number of shares
traded on the "Big Board" and bingo.
Dear Editor,
I have enjoyed your magazine very
much and I have found the articles to be
very informative. I own a KayPro 10 and
I would love to see more on what makes
it tick and how to improve upon it.
I work for a KayPro dealer and I have
had fun speeding up the II's and the 4's
to run at 5mhz.
By the way, I have found that with a
standard II or 4, I could only go up to
2400 baud when using MODEM7 between a slow Kaypro and a different
brand 4 MHz machine. After speeding
up the Kaypro, 9600 baud was no problem.
And now I have the same problem
with my 10. I can only go up to 2400 baud
before I start getting errors. I wrote a letter to KayPro about this and they called
me back to get further information, but
as of yet there has been no solution.
There is so much out there in the way
of add-on's for the II and 4 but nothing
for the 10. I would like to ask everybody
out there if they have heard of any way
to do the following.
1. Add a clock (with software) onto a 10.
2. How about a 6mhz upgrade? (I have
the Z80-B's)
3. Adding an 8088 board and MSDOS
andCP/M86.
4. RAM disk (might use 8088 board
memory).
5. ZCPR type modifications to CCP.
6. Add an 8" drive. This I would like a
lot. I already have UNIFORM for my 5";
with an 8" I wouldn't have to use MODEM7 to transfer my programs.
7. A 30011200 modem card.
8. Screen dump routine, one that could
dump the graphics as well would be
nice. (I have Prowriter 8510).
9. I have just read the article on how to
turn your KayPro II or 4 into an 8. How
about this mod for the 10?
I want the world, but why not?
David R. Meyers
6390 Rancho Mission Rd. #208
San Diego, CA 92108
Dear Editor,
Back in August I sent a check for $20
for your new Kaypro 4-84 schematics.
My check hasn't been cashed yet, so I'm
not angry, but I sure would like to have
those schematics. Did the check get
washed down the river when you were
shooting the rapids? Just write a note on
some toilet paper and let me know.
Chuck Weingart
2152 W. Iowa
Chicago IL 60622
Staff reply:
You're right. It did get washed down the
river but we finally fished it out. We decided to
wait until it dried out before we sent it,
though, so that's why it took so long. As for
toilet paper, we ran out last week.
Actually, we finally got the darn things
finished and shipped, so if you haven't received yours by now, please let us know.
Editor's note (to the staff):
A shortage of toilet paper could be disastrous (not even the software press releases
work very well for this purpose).
Dear Editor,
I could not let J. Wytsma's comments
in Micro C issue 19 about the dearth of
BBII articles go without rebuttal. One of
things I" enjoy most about Micro C is its
informal approach coupled with varied
information. I also enjoy the occasional
minor errors. The whole format of Micro
C makes it more personal and, for me,
more readable than many of the "biggies" I no longer subscribe to. While
Wytsma's point is well taken, I don't
know how Micro C will continue to offer
so much information on so many subjects for so little without changing a lot.
It's a rotten shame that progress is a reality rather than just a theory.
Dick Schaffer
5138 W. Olive Ave.
Glendale AZ 85302
Editor's note:
Thanks, Dick. I have really been struggling with idea of Micro C and change and
it's been one of the most difficult parts of being
editor. Other publications are facing the same
changes and it doesn't look like very many
have found any real direction. Some are just
floundering better than others.
Micro Cornucopia, Number 21, December-January 1985
LITTIRS
Dear Editor,
I see all of the interesting things that
some people are doing with the Big
Boards and start getting the urge to try
some of them.
Would it be possible to get one of the
Big Boards, and by using your improved
PROM, generate a system that would
use the Kaypro software and read the
same disks in the same format?
The Big Boards might have the advantage that I would be able to have more II
o and the possibility of having an 8" disk
to access some of the CP/M software.
Some time ago I put together a SWTP
6800 system and have had some limited
experience in assembly language programming. I do not have much spare
time and am somewhat afraid that I
might be getting into a lot more than I
can cope with.
Can the disk controller on the Digital
Research Computers be changed to one
that will controlS" floppies?
Would the BB II be a better choice as an
answer to this problem?
Albert P. Van der Klott
Wahl-Henius Institute, Inc.
4206 N. Broadway
Chicago 1160613
Editor's note:
We're working on that Kaypro/BB modification but it could be as much as six months
down the road. Even then, you will need to
perform some non-trivial details to use the
software.
To date we haven't completed the modification that would allow the DRC controller to
run 5" but SWP has a package. However this
package will only allow you to run 8" or 5",
not both.
The BB II will run both 5" and 8" with
Andy Bakker's software but lack of support
and documentation (as well as installed base)
for that system make it a difficult project for
all but heavy-weight engineering types.
Dear Editor,
I received my blank PCB for the BB I
about a year ago along with a sample
page from Micro C. So I sent for a subscription and have enjoyed every issue.
After admiring my blank board for a
couple of weeks, I finally started soldering sockets.
I could only go for about 2 hours at a
sitting before those neat rows of pins
turned into a sea of waving spears. But I
finally got them all in.
The caps and resistors were added; the
connectors, crystals, etc., were soldered
in; and then the long careful job of inserting the IC's was done. I went over the
board with a magnifying glass a million
times it seems and everything looked
good.
I built a box, a 24-volt power supply,
bought a Shugart from Cascade and a
solid state switch from Phenix, wired it
all together, flipped the switch on, hit return on the keyboard, opened my eyes,
and beheld a glorious spectacle of every
character in the English and Greek character alphabets flashing on and off.
Going over the board I found 4 IC's
with bent out pins and the display
changed to alternate zero's and colons.
So I got out my stack of Micro C's and
found a good article which discussed a
similar problem.
Trying everything the article suggested made things no better or worse, so I
began to substitute IC's and found a
flaky 74LS123.
The monitor went blank when I
turned it on and PFM signed on, my wife
thought I had been electrocuted from all
the jumping and hollering that went on.
To make a long letter longer, I'd like to
say it's all been fun and to thank you for a
good magazine and thanks to the many
suppliers that advertise in it. They have
all been prompt and their products excellent.
I have three Kaypro II's at work and
have ordered disks and ROM's for them
from Micro C. Being at a government
agency, I have been amazed at the speed
in which you have delivered the items. I
hope you have received payment at least
in a reasonable time. Many companies
will not accept a government purchase
order at all.
Now stop laughing and get my subscription renewed.
Stuart Eason
3 Cotswold Rd.
Benton AR 72015
Editor's note:
The tears weren't from laughing, they
really weren't!
Micro Cornucopia, Number 21, December-January 1985
Dear Editor,
Your magazine is full of ecstatic reports from people who apply power to
their BB II and two seconds later hear the
bleep which means all is okay.
Let the record show it is not always so
fast. I first applied power to my BB II on
19 Dec., 1983, but the "two seconds"
ended 24 Feb.,1984.
Only a fraction of those "two seconds"
were used fixing solid errors; solder is
quicker that the eye.
One short took a bit longer. It measured 0 ohms pin to pin on the IC's, but
disappeared as soon as I turned the
board over to check it. It came back again
only under power. Eventually, this
problem just went away.
But the real hassle was a poor IC socket contact. Evidently the pressure of ohm
meter probe was enough to make it look
good on the static test, but it wasn't making contact otherwise. I found that one
only after borrowing a logic analyzer.
Before I could make any sense of that,
however, I had to find someone to list
out the EPROM and disassemble some
of it by hand. Thus I got by with a lot of
help from my friends, but the ecstatic
items in Micro C were no help at all.
Couldn't you have a department
"What to do while waiting for the
bleep"? Among other things you could
print listings of EPROM's.
Now I start scraping up money for a
keyboard and disk drives. But looking
ahead, I see things I don't understand.
CAL TEX sent me a disk which I hope I
can still find, but I didn't (yet) buy CP/M.
Are the User Disks which you sell
"stand alone," or do they assume CP/M?
If the latter, is there no way to proceed
without spending $1S0? I mean legally,
of course.
R.W. Hartung
408 Orchard
East Lansing MI 48823
Editor's note:
All of our disks assume CP /M. I mean, either we have·to spend the $150 or you have
the spend the $150. At $12 to $15 per disk, it
wouldn't make much sense for us to spend
$150 each to put CP/M on them.
(continued on page 72)
3
Analog To Digital Interface
By Don Fletcher
I developed an incubator data acquisition system this summer using my Big
Board as a bed for testing different analog to digital convertors (ADCs). I'm the
designer, technician, assembler, janitor,
and everything else for a hatchery equipment company (called Egg-tronics, of
course). (Editor's note: probably owned
by a very gentle holding company.)
I hate to waste any effort, so I've taken
the results of my design research and
written this article. I've tried to include
enough information on analog to digital
conversion so you can come up with
something which will work with your
own system.
The circuit and driver provided should
work on either the Big Board or the Xerox
820-1, since development work in our
shop was done on both computers. (A
slight change would, no doubt, make
this work on a Kaypro or any other system with similar port hardware.)
Background
Analog to digital conversion, as the
name suggests, is a process of converting analog signals (from detectors or other instruments) into the digital1s and Os
that computers can understand.
Some examples of things you could
monitor include: voltage, current, heat,
humidity, light, sound, velocity, force,
etc. Since ADCs can only convert an
electrical signal into its digital equivalent, all inputs must first be converted into voltages.
Conversion Speed: The time required
to convert an analog input to a digital
number. Faster is better but more expensive.
Resolution: The number of binary
states an analog voltage range can be reduced to. For example, if an 8 bit ADC is
used, there are 256 different binary numbers that it can output (00 to FF Hex). If
the desired input range is 0 to 2.55 volts
the voltage per step would be 2.55V/255
steps (zero doesn't count here), or 0.01
volt per step. The more bits you have,
the smaller the steps will be.
Accuracy: A measure of how closely
the calculated binary output of the ADC
matches the voltage input. Usually
measured as .+1- some fraction of the
least significant bit (LSB).
'
4
Rt 1 Box 216
Pleasant Hill MO 64080
816-869-3472
SACs And DSICs
There are two major families of
ADCs-the successive approximation
convertor (SAC) and the dual slope integration convertor (DSIC), each suited to
different applications. When speed is
important, the choice is the SAC, which
can complete a conversion in 100 microseconds. In contrast, the DSIC requires
100 milli-seconds, which is 1000 times
longer. The SAC is sensitive to noise, requiring good bypassing and board layout. In contrast, the DSIC is virtually immune to noise. If you need a lot of steps
(increased resolution) the DSIC is best
because it can give you up to 41/2 digits
(19999 steps) resolution. The SAC is limited to 12 bits (4096 steps). Both types of
convertors are in the same price range.
I used the ADC0804 SAC from National Semiconductor. It has a conversion
time of 100 micro-seconds and 8-bit (256
step) resolution.
ADCs differ in the available accuracy
and cost; the higher the accuracy, the
higher the cost. The ADC0804 has an accuracy of + 1- 1 LSB. There are 10 and 12
bit convertors available that are pin for
pin compatible with the ADC0804 (the
extra bits are handled in software), but
they are expensive and hard to get at this
time.
If you would rather use an integrator
ADC, Intersil has several types available
(best buy is the 12 bit ICL7109). Intersil
data books and parts are available from
JAMECO and several other suppliers. A
good second choice is the Motorola
MCl4433 31/2 digit ADC.
Theory Of Operation
ICI-CA4051: Eight channel analog
MUX used for input scaling. (See Figure
2.) An analog voltage is supplied to the
negative input (Vin-) of the ADC. PIO A
bits 3-5 determine which input (0-7) on
IC1 is passed through to Vin-. The 1K
scaling resistors should be as close to the
saine value as possible. Use either a resistor pack, or 1 % parts.
This circuit increases the resolution of
the ADC, providing 256 steps for each of
the 8 voltage ranges. This yields the
equivalent of an ll-bit ADC. If you don't
need this much resolution, leave this circuit off and connect the negative input of
the ADC (pin 7) to ground or whatever
minimum voltage you require.
Since under worst case conditions, 8
conversions must be made to develop
the ll-bit binary output, the conversion
time required will increase to 800 microseconds. If this is too slow, use an ADC
with increased resolution.
IC2-CA4051: Eight channel analog
MUX used to provide 8 analog input
channels to the ADC. Each channel is selected the same way that reference volt-
Figure 1 - Display Routine In BASIC
05 REM
INIT-SETS UP THE PORTS INPT-INPUTS DATA
10 INIT=&HFA80
20 INPT=&HFAAB
25 REM
FIRST SET UP PORTS, RESET CHANNEL COUNTER
30 CALL INIT
40 CHAN%=O
50 A%=CHAN%
55 REM
GET DATA FOR CHANNEL NUMBER A%
60 CALL INPT(A%)
65 REM
PRINT IT WITH SEPERATION SPACES
70 PRINT A%;" ";
75 REM
DO IT AGAIN WITH THE NEXT CHANNEL
80 CHAN%=CHAN%+1
85 REM
UNTIL THE 8TH, THEN GO TO NEXT LINE
90 IF CHAN%=8 THEN GOTO 200
100 GOTO 50
200 PRINT
205 z=o
206 REM
DELAY, WAIT FOR A WHILE
210 FOR 1=1 TO 300
220 Z=Z+1
230 NEXT I
240 GOTO 30
250 END
Micro Cornucopia, Number 21, December-January 1985
ages are passed through ICI. If you only
need a single channel, leave out IC2.
Each input channel is tied high
through a pull up resistor for noise reduction. Be sure to include these since
CMOS ICs get strange when their inputs
float.
IC3-LM336-(2.5V): This is a precision
voltage reference, so don't use a Zener
diode, a resistive voltage divider, two
chipmunks in series or any other substitute. The accuracy of this reference determines the accuracy of the whole circuit.
IC4-ADCOB04: An 8 bit ADC. The analog inputs are provided by ICI and IC2
as described above. The binary outputs
are connected to PIO Port B. The start
conversion (WR-, pin 3) input is connected to Port A bit 6. The conversion
starts on the rising edge of this input.
Since the ADC is isolated from the micro processor by the PIO, the read and
chip select inputs (pins 2 and 1) are
grounded. This means that data is immediately available at the end of the conversion cycle.
The end of conversion is signaled by a
negative transition of INTR-. This line is
connected to the B Strobe input, which
triggers a processor interrupt. The INTR
output is reset after a read. (A read occurs automatically at the end of each
conversion cycle since the read input is
grounded.)
Rl and Cl determine the clock frequency. Analog and digital grounds
(pins 8 and 10) are connected to a common point.
Vref/2, developed from IC3, determines the voltage range of the ADC.
This voltage should be adjusted to one
hqIf of the required voltage span.
Keep the analog inputs as far away
from the digital outputs as possible.
Connect the ADC bypass capacitor as
close to the chip as possible. The
ADC0804 is accurate only to the LSB so
this bit may twitch randomly.
The resistor and ca-pacitor on the input
line are there to reduce noise. Additional
noise reduction is possible by increasing
the value of either part. If the parts get
too large, it will take too long to charge or
discharge the capacitor and you will lose
information.
If you are sampling each input as rap-
36K
I C3
lM336
(2.SV)
10K (I 0 TU R N )
+5V
I·IUF
>-----'
PIO A4 > - - - - - - '
PIO A3 >-_ _ _ _ _.-1
PIOAS
9
~CONV
~
STARTS
20
Vee
ClKR
19
PIOA6>--------------~--------___~
10K
ClK 4
IN
IC4
ADC
PIO
150 pf
I
~804
B2>------------------------~
BSTB>-------------~--------~~
-:-1
SENSOR
4 7
0--______2
=-1 6
~_.....;5~ 5
o---~I 4
0--_"";""'"1
2
15 3
0---~2
14 I
t
I C2
6 VIN+
10K
3
VOuTF
------NlI'--_------'
CA·
4~51
I
8
7
*
.~0IuF
CONNECT
2.4K PUll-UPS
TO ALL 8 INPUTS
idly as possible, leave the values as they
are. If you are sampling each channel at a
slower rate, try increasing either R or C if
you have a noise problem.
Connect input sensors with either
shielded or twisted pair wire. If the sensor is high impedance, additional input
filtering may be required. Sometimes
this problem can be reduced by the
choice of sensors. For example, if meas-
Micro Cornucopia, Number 21, December-January 1985
r:-
CONV ~ L...-..J~ AFTER
FINISHED
DATA IS
READ
16
uring temperature, two sensor choices
are:
1) A thermistor (high impedance)
2) An LM335 (low impedance)
The proper choice is the LM335.
(continued next page)
5
ANALOG TO DIGITAL INTERFACE (continued)
Software
I've provided an example driver for
my ADC card, and a simple program in
BASIC to print out the value of the 8 inputs on the console at periodic intervals.
The driver must be loaded first since it
resides in high memory. After loading
the driver, load BASIC (or the language
of your choice) and program away.
If you develop a good application for
my ADC circuit, take a few moments and
send it to Micro Cornucopia. It's funtry it.
•••
HIGH PERFORMANCE VIDEO
MONITOR
Figure 3 - A DC Driver Routine
Big Board - Xerox 820-1 ADC0804 driver
Board is connected to the General Purpose PIO, port A as output
controlling the scaling MUX, the channel select MUX, and the
start of conversion input into the ADC0804. Port B is set to
read the binary data output from the ADC. Port B's strobe is
also used as the end of conversion interrupt out of the ADC.
Connect the following jumpers on JB3 on the Big Board
, the Xerox) - (3-4), (9-10), and (17-18).
MONITOR ONLy .•.••....•.... $62.50
PLASTIC ENCLOSURE
as pictured above. Size 17x14x12". Room inside for
mounting above monitor, power supply, & S.B.C.
• PERFECT FIT FOR XEROX 820-1 BOARD!
NEW, SHIPPING WEIGHT 12 LBS
ENCLOSURE ONLY ....••....• $40.00
KEYBOARD & ENCLOSURE
80-key x-v scanned microprocessor controlled ASC II
encoder kit. ROM source code supplied. 17x8.5x3".
New, with schematics, weight 8 Ibs
KEYBOARD, ENCODER KIT, ENCLOSURE ......$60.00
Regulated power supply; 6 outputs: 5v @ 4 A, +/- 12 v
@ 0.2 A, +24v @ 1.2 A, -24v @ 0.2A, +15v @ 2.6 A.
14x4x3", 10 Ibs, New.
REGULATED POWER SUPPLY ............... $35.00
ARKON ENGINEERING
PO Box 1390, Palm Bay, FL 32905
(305) 676-5153
TERMS: Prepaid or UPS COD (CASH OR CERTIFIED
CHECKS ONLY.)
6
on
.Z80
ADATA
AOCNTRL
BODATA
BOCNTRL
MODOO
MOD01
MOD03
AOINTR
BOINTR
ITOCTL
LOAD
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
8
9
10
11
OFH
4FH
OCFH
1CH
1EH
87H
OFA80H
BDOS
EQU
5
ASEG
ORG
100H
///
BALL BeX-2DD HP Monitor
(J11
This routine requires M80 to assemble.
~t:t/
12", P31 Green, Non Composite, Separate Sync Required, 27 MHz Video Bandwidth, 12 VDC @ 1.5 A.
• Vertical Sync: 47-82 Hz
• Horizontal Sync (Jumper Selectable):
• PERFECT FOR BIG BOARD II
WHEN USING 9x11 CHARACTER SET
NEW with schematic shipping weight 10 Ibs
('
ADC:
LD
LD
LD
LDIR
RET
jLoad the program above the monitor
DE,LOAD
HL,ADC
BC,ADCEND-ADC-1
.PHASE
LOAD
jReturn to CPM
jFIRST SET UP INTERRUPT HANDLER
SETUP:
LD
LD
LD
LD
LD
HL,INTR
(OFF1CH),HL
(OFF1EH),HL
A,O
(LSTRDY) ,A
;SET LIST READY FLAG
jTHEN SET UP PORTS
LD
OUT
LD
OUT
LD
OUT
A,MODOO
(AOCNTRL),A
A,O
(AOCNTRL),A
A,07
(AOCNTRL),A
jSET A TO OUTPUT MODE 3
LD
OUT
LD
OUT
LD
OUT
A,MOD01
(BOCNTRL),A
A,BOINTR
(BOCNTRL),A
A,ITOCTL
(BOCNTRL),A
jSET B TO INPUT MODE 1
Micro Cornucopia, Number 21, December-January 1985
EZPROMMER
EPROM PROGRAMMER
FOR THE BIG BOARD
AND XEROX 820
LD
A,40H
(ADATA) ,A
jGET CHANNEL NUMBER
jSAVE POINTER FOR LATER STORAGE
FEATURES:
• Supports 2716, 2732, 2732A,
2764, 27128, 27256
• Easily installed with only two
connections
• No external supply needed, all
power derived from +5 Volts
ADCIN3: OUT
07H
B,A
(ADATA),A
jOUTPUT CHANNEL NUMBER, STROBE LOW
• All power controlled by
software
OR
OUT
40H
(ADATA),A
jSTROBE HIGH
CALL
CP
JP
ADCIN1
OFFH
NZ,ADCIN2
LD
A,B
A,OBH
B,A
3BH
Z,ADCIN2
A,B
ADCIN3
OUT
jSET STROBE HIGH
RET
SUBROUTINE TO INPUT DATA FROM ADC, CHANNEL NUMBER IS POINTED TO
BY HL. NUMBER IS RETURNED TO MEMORY POINTED TO BY HL AND HL+1
(MSB IN HL+ 1)
ADCIN:
LD
PUSH
A, (HL)
HL
AND
LD
ADD
LD
AND
JP
LD
JP
ADCIN2: POP
LD
LD
RRA
RRA
RRA
AND
INC
LD
HL
(HL) ,A
A,B
07H
HL
(HL) ,A
• Extensive MENU driven software to Read, Program, Save,
Load, Verify CRC check,
Dump, Erase check complete
with source code
• Over one year of troublefree
use.
jTRY NEXT SCALE
jCHECK FOR OUT OF RANGE
jRECOVER POINTER
jSTORE LSB
APL
CHARACTER GENERATOR
FOR XEROX 820-ll
jRECOVER MSB
jSTORE MSB
RET
ADCIN1: LD
OR
JP
A, (LSTRDY)
A
Z,ADCIN1
jWAIT FOR INTERRUPT
LD
LD
A,O
(LSTRDY) ,A
jRESET READY FLAG
IN
RET
A, (BODATA)
jGET DATA
LD
LD
EI
RET I
716-377-0369
A,OFFH
(LSTRDY),A
r
JDATA STORAGE
LSTRDY: DB
0
.DEPHASE
ADCEND: END
Micro Cornucopia, Number 21, December-January 1985
Upgrade kit allows the 820-II to
display all the standard characters and attributes while permitting the display of all APL characters. Kit includes ROM and
software.
APL UPGRADE KIT ... $49.95
NY RES. ADD LOCAL TAX. POSTAGE
AND HANDLING $2.00
VISA, MC, CHECK or COD
jINTERRUPT HANDLER-SETS READY FLAG
INTR:
EZPROMMER
A&TwlHarness, Disk .... $125
Kit with Disk ............ $90
End of Listing
JOPTRONICS
TECHNOLOGY
P.O. BOX 81
PITTSFORD, NY 14534
7
IJ
Colonial Data
58-80- II
The "Better Board" Gets BETTER!
Standard Features Include:
•
•
•
•
•
For the past 4 years, Colonial Data has been supplying
thousands of its original SB80 "Better Board" computers to the
O.E.M. market. Now, the "Better Board" is even BETIER with the
introduction of the SB80-1I. More Standard Features at a NEW
LOWER PRICE!
SIZE: 1 2" x 13"
POWER: +12V, -12V, +SV
WARRANTY: 90 days Parts and Labor
• ZSOA PIO PARALLEL PRINTER INTERFACE
• 4MHz ZSOA CPU WITH NO WAIT STATES
Centronics compatible printer interface is Standard!
Enhanced BIOS uses mode 2 interrupts.
• SASI HARD DISK INTERFACE CIRCUITRY
ON-BOARD!
• 64K MEMORY STANDARD (EXPAND TO 128K)
Parity checked RAM utilizes 4164
Up to 8K of EPROM (4K is standard)
Accepts Pin-compatible EPROMS from 2716 thru 2764
SASI interface provides access to hard disk.
Compatible with XEBEC and other controllers.
Just populate with TIL and add connector.
• NUMEROUS FLOPPY DISK STORAGE OPTIONS
• 4 CHANNEL COUNTER TIMER-STANDARD!
Uses the advanced NEC765A controller chip
Supports 8" and 5%" drives simultaneously
Automatic Density Selection (Single/Double/Quad)
Allows custom software applications.
User accessible 125Hz interrupt.
Provides system date/time clock.
4th Channel used for the NEC 765 interrupt.
• 4 SERIAL I/O PORTS (2 STANDARD)
Software selectable baud rates to 19,200
Uses Z80 SIO/O and SMC 8116 baud rate generator.
SBSO-II SYSTEM OPTIONS:
PRICE
ADDITIONAL 2 SERIAL PORT (INSTALLED)
ADDITIONAL 64K MEMORY (INSTALLED)
SASI INTERFACE OPTION (INSTALLED)
XEBEC HARD DISK CONTROLLER
CP/M 2.2 OPERATING SYS W/MANUAL
$ 60.00
$ 60.00
$ 35.00
$290.00
$ 75.00
$275.00
CP/M 3.0 OPERATING SYS W/MANUAL
4M Hz Z80A Processor
64K Memory (Expands to 128K)
Supports 8" and S1/4" drives simultaneously
Auto Density Selection (single/double/quad)
2 Serial Ports/1 Centronics Parallel Port
• CP/M 2.2 BIOS ENHANCEMENTS
Allows flexible device assignments, baud rate selection,automatic density detection, a system date and time clock and hard
disk support.
• OPTIONAL CP/M 3.0 (CP/M PLUS)
Extensive disk buffering speeds system throughout.
II
Z80'· - ZILOG
, . . . . - - - - - - - - - - - - - II
CP/M'· -
DIGITAL RESEARCH (Calif.)
Colonial Data Services Corp.
HOW TO ORDER:
Call or Write Colonial Data-Orders paid with bank
card or cashier's check are shipped within 3 working
days. Allow 3 weeks for Personal Checks.
Shipping: Add $5.00 for UPS Shipping (Brown)
Within the United States.
8
lffiJ
j_ W]
VISA'
80 Pickett District Road,
New Milford, Conn. 06776
Telephone (203) 355·3178
Micro Cornucopia, Number 21, December-January 1985
11-:1 Colonial Data
S8-80-11
Dimensions
13'/l"W x 53fs"H x 17" D
FULL 90 DAY PARTS & LABOR WARRANTY
MODEL IIA-2/380K DSDD DRIVES
MODEL lIB - 2/780K DSQD DRIVES
MODEL lIe -10 Meg H/Disk w/380K Floppy
MODEL lID - 10 Meg H/Disk w/780K Floppy
*
$ 895.00
$ 995.00
$1895.00
$1995.00
$ 298.00
SBSO-II (Board Only) Wired and Tested
SBSO-II SYSTEM OPTIONS
All Models:
PRICE
Additional 2 Serial Ports (installed)
Additional 64K Memory (installed)
CP/M 2.2 Operating System w/Manual
CP/M 3.0 Operating System w/Manual
$ 60.00
$ 60.00
$ 75.00
$275.00
Models IIA and lIB only
SASI Interface Option (installed)
XEBEC Hard Disk Controller
$ 35.00
$290.00
Colonial Data
Cabinet Kits (Build Your Own Systems!)
PICK YOUR SYSTEM!
CHOOSE YOUR
OPTIONS!
The Original "Better Board" SB80 from
Coloni~1 Data has just gotten BETTER YET!
More on-board features like SASI interface
circuitry,4 Channel CounterTimer, Memory
Expansion to 128K and MORE! All made to
run the most popular programs under the
CP/M Operating System.
zao'· - ZILOG
CP/M'· - DIGITAL RESEARCH (Calif.)
Shugart
5%" Disk Drives
MODELCKPI
Metal Cabinet will accept Single Boards up to 12"x16"
complete with fan, RFI filter with power switch, front panel
and mounting for two 5%" half-height floppies. Pre-punched
for 4 DB25 and 1-50 pin. Ineludes 60 watt power supply
with ±12V, + 5V.
MODEL 455
DSDD Floppy
Over 380K Capacity
$225.00
MODELCKX
Cabinet only with fan, RFI filter,
power switch, pre punched connector holes. No Power Supply.
$195.00
$370.00
MODEL 465
MODELCKP2
Same as Model CKP1, but includes 90 Watt Power Supply to
power half-height Winchester
5%" hard disk and single 5%"
half-height floppy.
2 For
DSQD Floppy
Over 780K Capacity
$425 00
$225.00
2 For $430.00
•
$139.00
·-----------1••III
HOW TO ORDER:
Call or Write Colonial Data-Orders paid with bank
card or cashier's check are shipped within 3 working
days. Allow 3 weeks for Personal Checks.
Shipping: Add 2%(uptoa maximum of $20.00) for UPS
(Brown) shipping within the United States.
Micro Cornucopia, Number 21, December-January 1985
IAIJ]
Zi
Colonial Data Services Corp.
80 Pickett District Road,
New Milford, Conn. 06776
Telephone (203) 355·3178
9
Communication Between High-Level
And Assembly Language
By Christian Phaneuf
P.O. Box 1107
972 Guillaume Boisset
Cap-Rouge Quebec Canada GIY 3E4
How many times have you wished
you could write complex assembly language programs as easily as you write
programs in C, Pascal, or PLII. After all,
you need the control or speed of assembly language, but writing floating point
(or even fixed point) routines in assembly language is a royal pain.
Perhaps, instead, you should be writing in a high level language and then,
where necessary, calling assembly language subroutines.
This article includes two simple PLlI80 programs, each with an assembly language subroutine. Both programs pass
an ASCII character (*) to a subroutine
which outputs the character to the console using CP/M's CONOUT function.
The subroutine then reads a character
from the console (using CP/M's CONIN)
and passes it back to the main program.
High Level Languages Differ
Though there are differences at the detail level, the principles discussed here
apply to most high level languages that
let you include low-level routines.
However, no matter which compiler
you use, the variables will always be
passed through either the stack, the registers, the memory, or a combination of
these. Therefore, the concepts illustrated in the PLlI-80 programs that follow
can be adapted to any high level language compiler capable of generating relocatable code.
Passing Data Back And Forth
In the first program (Figure 1),
DEM01 illustrates one way that parameters can be passed from the main program to the called routine. It also shows
the implicit "returning" of values from
the subroutine to the calling program.
Note that the assembly subroutine
(CONSOLE1) is declared with entry and
character(l). This tells the compiler that
whenever the subroutine is called, a single ASCII parameter of length '1' will be
passed to the called program. If several
different parameters were to be passed,
the type of each would be listed separately in the declaration of the procedure. For example:
dcl entry
(c~ar(3),fix~d
1st par
10
(1S),
2nd par
~
•• ),
etc •••
The instruction "call CONSOLE1
(PARAM1);" tells the compiler that the
variable PARAM1 is the actual parameter that will be passed. PARAM1 must be
of the same data type (character(l» as
that declared in the entry procedure.
Thus, an ASCII string of length 1 (the '*'
remember) will be passed to CONSOLE1.
PL/I Details
PLlI-80 passes parameters to a subroutine by leaving the address of a pointer in register pair HL. The pointer contains the real address of the first
parameter. If several parameters are
passed, they must occupy successive
memory locations.
The number of parameters and length
of each parameter must be determined
implicitly by agreement between the
calling program and the called subroutine. Sound complicated? Well, if you
can understand the man who saw the
man who saw the bear, you should have
no problem with this.
Returning Data To PLII
Since the locations of the passed variables are known, CONSOLE1 can alter
the contents of these locations, thereby
returning data to the calling program.
Figure 1 demonstrates this.
CONSOLE1 first prints the '*', then
CONIN is used to read a character from
the console. Finally, the subroutine places the new character into the memory location called PARAM1 (by PLlI) and returns control to the calling program.
Figure 3 shows the results of running
DEMOl.
An alternate method, used to return
data to the calling program, is very useful for simple routines when there is no
entry variable or when you don't want
the subroutine tampering with the main
program's data.
As shown in Figure 2, assembly language subroutine CONSOLE2 is declared with both entryO and returnO attributes. This double declaration tells the
compiler that instead of the general parameter passing protocol used in
DEM01, the alternate method will be
used. Here, PLlI-80 stipulates that the
subroutine must place data on top of the
stack and the length of the data must be
left in the accumulator before control is
returned to the calling program. Note in
the execution of DEM02 that the variable PARAM1 has not been altered by
CONSOLE2.
The type of data to be returned will determine which method you use. For instance, fixed binary numbers with precision 1-7 are returned in the accumulator,
while precision 8-15 are returned in HL.
Bit string data is returned the same way
but fixed decimal data is returned on the
stack as a 16-decimal digit value in nine's
complement form (8 bytes are used).
No matter which method you use, parameter passing can be an easy way to
have the advantages of high-level language productivity and low-level language control and speed in the same
program.
• ••
Figure 1 - Returning Data Via Globals
DEM01:
procedure options (main);
declare
CONSOLE1
PARAM1
entry ( cbaracter (1) ),
cbaracter (1);
PARAM1 = '.';
put skip list
put
list
put skiPi
call CONSOLE1
put skip list
put
list
end DEM01i
('Before calling: ')i
('PARAM1 =', PARAM1)i
(PARAM1);
('After calling: ');
('PARAM1 =', PARAM1)i
CONSOLE1 :
.zao
iZaO mnemonics used
PUBLIC CONSOLE1 ;Program will be reco;gnised by LINK
BDOS EQU OSb
CONIN EQU 01 b
CONOUT EQU 02h
PUSH HL
;Original HL saved
LD
E, (HL)
,
INC
HL
iAdress of Parameter in
LD
D,(HL)
;register pair DE
EX
DE,HL
iSave parameter adress
PUSH
HL
ion stack
LD
E,(HL)
;Parameter must be in E
LD
C,CONOUT ibefore calling CP/M
CALL
BDOS
;console output funct.
LD
CALL
C,CONIN
BDOS
i
iRead a character using
iCP/M console input fn.
;
iThe cbaracter read from the console
;will now replace the parameter from
itbe calling procedure in memory
POP
LD
HL
(HL),A
POP
RET
END
HL
i
iParameter adress in HL
;New parameter now in
imemory
iOriginal HL restored
iReturn to calling
i procedure
Micro Cornucopia, Number 21, December-January 1985
PROGRAMMER/4+
Figure 2 - Returning Data VIA Stack
DEM02:
procedure options (main)j
declare
CONSOLE2 entry
returns
PARAH1, PARAM2 )
character(l) )
character(l) ),
character(l)j
PARAH1 = '-'j
put skip list ('Before calling: ')j
put
list ('PARAH1 =', PARAH1)j
put skipj
/- here, subroutine is called by -/
/- invocation, "CALL" keyword not -/
/- required. -/
PARAM2 = CONSOLE2 (PARAH1)j
put skip list ('After calling: ')j
put
list ('PARAH1 =',PARAH1)j
put
list ('PARAM2 =',PARAM2)j
end DEM02j
CONSOLE2:
.zao
jZaO mnemonics used
PUBLIC CONSOLE2 jProgram will be recojgnised by LINK
BDOS
EQU 05h
CONIN EQU 01 h
CONOUT EQU 02h
PUSH
HL
jOriginal HL saved
LD
E,(HL)
HL
D, (HL)
j
EX
LD
LD
CALL
jAdress of Parameter in
jregister pair DE
DE,HL
jexchange registers
E, (HL)
jParameter must be in E
C,CONOUT jbefore calling CP/M
BDOS
jconsole output funct.
LD
CALL
C,CONIN
BDOS
jRead a character using
jCP/M console input fn.
POP
POP
HL
BC
LD
PUSH
LD
E,A
DE
A,Olh
PUSH
BC
jOriginal HL restored
jReturn adress in BC
jAs per PL/I parameter
ipassing convention
jplace char on stack
jand string lenght in
jaccumulator
jReturn adress back on
jtop of stack
jReturn to calling
jprocedure
INC
LD
j
j
RET
END
Figure 3 - Results Of Running DEM07
A LOW COST ALTERNATIVE
TO EPROM PROGRAMMING
Reads and programs 2716, 2732, 2764, and 27128 EPROMS.
Reads 2·16K ROMS.
Direct connect to any RS232C terminal or computer.
Plug selectable as either a data set or data terminal.
All voltages made on board, (no power supplies needed).
(User supplies power Xformer, 25.2 to 30 VAC C.T.1 Amp.).
Power electronically switched, (can't damage EPROMS).
Zero insertion force socket for EPROM.
Programs, verifies, and dumps in both ASCII and hex.
Edit buffer (like DDT).
Saves hex and/or image files to and from disk.
Saves or loads all or partial buffer.
Completely menu driven for ease of operation.
Commands of Test, Read, Display, Save, Load, Program and more.
Check sum calculation.
All software on disk including well commented source code.
Detailed owners manual including schematic
All chips socketed.
Not a kit! Completely built and tested.
48 hour dynamic burn·in and test before shipment.
90 day limited warranty on parts and workmanship.
24 hour return policy on repairs.
Delivery from stock.
NOTICE TO PREVIOUS CUSTOMERS: Send us your old disk and a
suitable S.A.S.E. for your free copy of our new software, ver. 1.6.
PROGRAMMER 4+ WITH OWNERS MANUAL AND DISK. $199.95
A>demo1
Order from
Before calling: PARAH1 = -0
After calling: PARAH1 = 0
End of Execution
Rperipfico
~i
.~~ 1659 Scott Blvd., Suite 1
~I ~V Santa Clara, CA 95050
V
(408) 244·5214
VISA and MASTERCARD telephone orders welcome.
A>dem02
Please specify Disk format
CP/M 8" IBM format, KAYPRO II, XEROX 820, OSBORNE I, others.
Before calling: PARAH1 = -
-9
After calling: PARAH1 = - PARAM2
End of Execution
9
Micro Cornucopia, Number 21, December-January 1985
Please specify method of shipment, UPS or Postal Service.
California residents'add 6"" Sales Tax. Dealer Inquiries invited.
11
BORLAND
INTERNATIONAL
GIFI'PACK
ONLY
$999S
A SAVINGS OF $301
What a gift for you and your friends! The extraordinary TURBO
PASCAL compiler. together with the exciting new TURBO TOOLBOX
and new TURBO TUTOR. All 3 manuals with disks for $99.95.
TURBO PASCAL Version 2.0 (reg. $49.95). The now classic program
development environment still includes the FREE MICROCALC
SPREAD SHEET. Commented source code on disk
• Optional 8087 support available for a small additional charge
NEWf TURBO TOOLBOX (reg. $49.95). A set of three fundamental utilities that work in conjunction with TURBO PASCAL.
Includes:
• TURBO-ISAM FILES USING B+ TREES. Commented source code
on disk
• QUIKSORT ON DISK. Commented source code on disk
• GINST (General Installation Program)
Provides those programs written in TURBO PASCAL with a terminal
installation module just like TURBO'S!
• NOW INCLUDES FREE SAMPLE DATABASE
NEWf TURBO TUTOR (reg. $29.95). Teaches step by, step how to
use the TURBO PASCAL development environment-an ideal
introduction for basic programmers. Commented source code for all
program examples on disk.
30 DAY MONEY BACK GUARANTEE
These offers good through Feb. 1. 1985
For VISA and MASTERCARD order call toll free:
1-(800)-255-8008 1-(800)-742-1133
(Lines open 24 hrs .. 7 days a week)
Dealer and Distributor inquiries welcome (408) 438-8400
CHOOSE ONE (please add $5.00 for handling and shipping U.S. orders)
_ _ All Three-Gift Pack
$ 99.95 + 5.00 SPECIAL!
_ _ All Three & 8087
139.95 + 5.00 SPECIAL!
_ _ Thrbo Pascal 2.0
49.95 + 5.00
_ _ Thrbo Toolbox
49.95 + 5.00
_ _ Thrbo Thtor
29.95 + 5.00
_ _ Thrbo 8087
89.95 + 5.00
Check _ _ _ Money Order _ _ _ VISA _ _ _ MasterCard _ __
Card #:
Exp. date:
Shipped UPS
My system is: 8 bit _ _ 16 bit __
Operating System: CP/M 80 __ CP/M 86 __ MS DOS __ PC DOS
Computer:
DIsk Format
Please be sure model number & format are correct
NAME: _________________________________
ADDRESS _____________________________
CITY/STATE/ZIP: _____________________
California reSidents add 6% sales tax. OutSide U.S.A. add $15.00
(if outSide of U.S.A. payment must be by bank draft payable in
the U.S. and in U.S. dollars). Sorry. no C.O.D. or Purchase Orders .
• » BORlAnD
INTERNATIONAL
.»
4113 Scotts Valley Drive
Scotts Valley, CA 9S066
TELEX: 172373
12
Micro Cornucopia, Number 21, December-January 1985
THE LITTLE BOARD®
OEM -
INDUSTRIAL -
SCIENTIFIC
SECOND GENERATION SINGLE BOARD COMPUTER KIT!
4 MHZ Z80* CPU!
64K RAM!
DOUBLE DENSITY!
FREE CP/M* 2.2111
A $139 VALUEI A FREE
5-1/4 IN. CP/M 2.2
DISKETTE IS INCLUDED
WITH EACH KIT.
~~/
•
$25 9 ~~OMPLETE
KIT)
MINI-SIZE:
ONLY
5-3/4 x 7-3/4 INCHES
A. & T. UNITS
$319
FULLY SOCKETED! PERFECT MATE TO OUR ZRT-80 TERMINAL BOARD. THROUGH SPECIAL ARRANGEMENT
WITH AM PRO COMPUTERS, WE ARE PLEASED TO OFFER THEIR LITTLE BOARD® IN KIT FORM.
FEATURES:
4 MHZ
I
IDOUBLE DENSITY (5-1/4 IN.) FLOPPY CONTROLLER I
zao CPU!
USES +5VDC @ .75 A. AND +12VDC @ SOMA.
CENTRONICS STYLE PARALLEL PRINTER PORT
TWO RS232 SERIAL PORTS
I
64K DYNAMIC RAM!
SAME SIZE AS A MINI FLOPPY
- -t aI R esearc h C ompu t ers
D 191
2732 BOOT EPROM
(OF TEXAS)
TERMS: Shipments will be made approximately 3 to 5 weeks after we
receiveyourorder.VISA,MC, cash accepted.Wewili accept COD's witha
$75 deposit. Balance UPS COD. Add $4.00 shipping.
P.O. BOX 461565 • GARLAND, TEXAS 75046 • (214) 225-2309
USA AND CANADA ONLY
LITTLE BOARD® -
Mini Z80B
AMPRO
Z80'M -
•
•
•
•
•
•
•
•
•
•
•
•
•
SERVO 8
HIGH PERFORMANCE
SINGLE BOARD COMPUTER
•
•
ZILOG
CP/M'M DIGITAL RESEARCH (CA.)
6 MEGAHERTZ Z80B CPU - No Wait States
5.75" x 8" mounts directly to Minifloppy
5 Volts only @ 1.4 Amps
On Board Advanced Floppy Disc Controller Controls, four 5.25" or
31h" & four 8" or 1.6 Megabyte Minifloppy Drives.
Compatible with Kaypro II Format for Software Exchange
2K Eprom Debugger/Monitor - Examine and change Memory
I/O Ports, CPU Registers; Set Breakpoint, Control Disk Selection
64K 150 NS DRAM; Expandable
SASI Bus Controls 10 Meg Winchester
Expansion Bus-Z80 Terms Plus Additional Signals
2 RS232 Ports - 150 Baud to 153.6K Baud, Software Selectible
Standard Centronics Parallel Port
Disk I/O Buffers Timed for Flushing with Real Time Clock
Clock Counts Available to Programmer
CP/M V2.2 BIOS Sources Available - $50; includes
ROM Bootstrap & Automatic Disk Selection
In Stock - $495
CP/M add $70
Visa M/C COD
Piggy-Back Expansion Board Available;
128K RAM, Two Serial Ports, Real/Time Clock Calendar with
Battery Backup, $384
SERVO COMPUTER CORPORATION
360B N. ELLENSBURG ST. BOX 566
GOLD BEACH, OREGON 97444
(503) 247·2021
Micro Cornucopia, Number 21, December-January 1985
13
Pascal Procedures
By John P. Jones
By the time you read this, advertisements for Borland's Turbo Toolbox
should be in the magazines. The package
consists of three utilities-an indexed
file system, a sort utility, and a general
installation program.
GINST.COM generates an installation
program and the associated files necessary to customize a Turbo Pascal generated COM file to the end user's terminal.
Without this utility, applications written
in Turbo would either have to be written
for each specific terminal or be distributed as source so the user could customize
it. The Toolbox licensing agreement permits distribution of the generated installation files and even lets you include relevant sections of the Turbo Pascal
manual with your programs without
copyright problems.
The other portions of the package are
of more general interest. Both the sort
and indexed file routines are distributed
as source for $Inclusion in application
programs.
Turbosort
The sort utility, which uses the quicksort algorithm, can be used for most sorting applications. Because the routine is
written to be general purpose, and sorts
are extremely dependent on the structure of the data, the user must write
three routines to interface to Turbosort.
These are forward declared in th~ sort
module and must match these declarations.
INP is called once by Turbosort and it
must acquire successive data items. INP
then calls SORTRELEASE (in the sort
module) for each item. OUTP, which is
also called only once, must call SORTRETURN to retrieve the sorted data items
for output. The function SORTEOS is
provided to let OUTP know when all records have been accessed. Since the user
writes these routines, the data can be
from any source.
Though it's most likely that you'd input from a file and output to another file,
you might also, for instance, input from
the keyboard and output to a file.
The third user-provided routine,
which is called repeatedly by turbosort,
is the boolean"function LESS. It is in "this
routine that you determine sort order
(ascending or descending), and whether
14
6245 Columbia Ave.
St. Louis MO 63130
314-645-1596
your program will check single or multiple fields. LESS receives two parameters, X and Y, which are the addresses of
the variables to be compared. The routine must declare two variables of the
type being sorted on top of the actual
variables in memory by declaring them
absolute at locations X and Y.
var
variable1 :
variable2 :
dat~type
dat~type
absolute X;
absolute y;
Turbosort can be used to sort data files
that are too large to fit into memory,
since it can automatically set up temporary disk files as virtual memory. I tested
the sort routines by generating a file of
1000 records, each 82 bytes long, with a
20 character random sort field. I sorted
various parts of the file and output the
results to the screen. Timing was from
the Run command to the time the first
sorted record was output to the screen. I
used a 4 MHz Big Board with SWP dual
density 8" disk controller using 1024
byte sectors.
# Records sorted
100
200
250
300
400
1000
Time min: sec
00:05.6
00: 10.9
00:38.8
02:30.8
03:59.2
20: 13.4
The times are quite respectable until
you start using disk space. I did not have
any other sorting utility for comparison
but the results seem to be reasonable.
The sort is easy to use and flexible
enough for any application.
Turbo Access
Turbo Access is the B-tree indexed file
handler. It is NOT a database manager
like dBase II, but it provides the file interface to allow you to write your own database handler. Using Turbo Access is not
a trivial task since you need to understand B-tree structured indexes. The
manual contains enough information
about B-trees for the intermediate or advanced programmer.
Turbo Access uses separate index and
data files. The data file is a standard sequential file, with the first record reserved for Turbo Access use. The index
file(s) contains the B-tree structure along
with pointers to records in the data file.
Index and data files are updated by independent routines within the Turbo Access system. This makes the system flexible but you have to make sure that all the
relevant files get updated as the data files
are changed. Basically, however, the
Turbo Access routines can maintain a data file and the index file or files associated
with it.
First, a record is added to the data file.
Then the index file is updated based on
the contents of the key. Although the
key does not need to be part of the data
record, it is a lot easier to reconstruct a
trashed index if it is.
Updates and deletions are performed
in the opposite sequence. You access the
index in order to locate the record. Then
you can retrieve the data. It is never necessary to access the data file more than
once to get a record. And depending on
the memory available and the application, you might not have to access at all
when you are searching the index.
I did not construct a large test database
for performance testing but did set up a
program for maintaining a club's membership records. I had been maintaining
those records using the key-index facili~es of JRT Pascal V 3.0. The Turbo Access
system is slightly slower than the JRT
system but significantly more flexible.
Turbo Access allows for duplicate keys
and multiple-index files.
This way, you can construct "a very
complex database. For instance, a magazine article database could be cross referenced using indexes for subject, author,
source language, processor, and the like.
The example program BTREE is, by itself, worth the price of the package. If
you are at all familiar with programming, I highly recommend that you take
a close look at the source for this program.
The program is well written and you
can learn a lot about Pascal programming by spending some time analyzing
the techniques the Turbo folks used. I
was able to set up the club database by
making minor modifications to this program. (And it only took one evening.)
In a future column I'll spend some
time on pointers, linked lists, and trees.
After that we can take a closer look at
Micro Cornucopia, Number 21, December-January 1985
how Turbo Access works.
The Toolbox manual is of the same
high quality as the Turbo Pascal manual.
You get all the information you need to
effectively use the utilities.
Turbo Toolbox is available from
Borland International, 4113 Scotts Valley
Dr., Scotts Valley, CA 95066. It is $49.94.
Turbo Tips
Input filters are used to insure that input data falls within a specific range. The
example program, included with Turbo
Toolbox, uses a particularly good method to filter character input from the console. (See Figure 1.)
By defining a set type that includes the
ASCII character set, it is then possible to
pass a subset as a procedure or function
parameter. So you can define exactly the
range of values that can be returned by
the procedure or function.
It is this type of capability which gives
Pascal much of its power.
Soap Box
If you are familiar with Jerry
Pournelle's column in Byte, you know
his opinions about software prices and
piracy. I agree with most of what he
says, and would like to add a few
thoughts.
In order to be successful, a software
house has to have at least four factors
working in its favor. First, there must be
a large market. This means that the
product must have general appeal and
run on a lot of machines. Next, the product has to be good. Poorly written, "buggy" software has little chance for success.
Third, the program has to be marketed
at a reasonable price. The best word
processor ever written for microcomputers would sell poorly at $1000 a shot.
What is a reasonable price? That, of
course, depends on the product. Any
software of direct utility in a business application will command a higher price
than something like a game since the
business can expect to profit from using
the product.
Finally, the software publisher has to
be able to fill orders There are many cases
in this young industry of companies
with good products that have failed because they have been unable to keep up
with demand.
As the number of small computers expands, the price of software should continue to fall. However, the software publisher can still expect to make a
reasonable profit.
Borland International may be the first
company to fit all of the above criteria.
Their products are all well written, reasonably priced, promptly shipped and
run on a broad base of computers. I ex-_
pect Borland to be around for some time
with a growing line of products.
Regarding piracy, quality software offered at a reasonable price should be
purchased, not stolen. Only through
sales of its products can a company be
successful, and every company that fails
is a loss to us all. I won't strain my own
credibility by telling you that I've never
gotten an unauthorized copy of a program. On the other hand, anything I've
looked at and have felt was necessary or
useful, I've purchased. The copy of
dBase II someone gave me has not been
used since I tried it out. For what I'm doing, I can't justify the price.
For those of you on a tight budget,
there are megabytes of public domain
software available for minimal copying
fees. Much of it is poor, but there are a lot
of excellent programs available, some
better than the equivalent commercial
product.
•••
XEROX 820 USERS
NEED MORE I/O??
2 PIO'S
1 SIO
SASI INTERFACE
SOUND GENERATOR
REAL TIME CLOCK
USES THE NATIONAL 58167
REAL TIME CLOCK
Figure 1 - Pascal Input Data Test Function
tl'pe
charset
= set
of char;
function get_Char (allowed
charset)
char;
var
ch : char;
begin
repeat
read (kbd, ch);
{ input from kbd needs no }
until ch in allowed;
get_Char := ch;
end;
TI 76496 COMPLEX SOUND
GENERATOR
BARE BOARD $54.95
++++++++++++++++
COMPOSIT VIDEO INTERFACE
BARE BOARD $19.95
CHECK
WE ACCEPT
MONEY ORDER
MASTER CHARGE
select := get_Char ( ['N', 'Y', 'n', 'yl] );
VISA
GRO TECHNIQUES
PO BOX 6383
BRIDGEPORT CT 06606
203-374-3660
Micro Cornucopia, Number 21, December-January 1985
15
Installing Turbo Pascal
By Laine Stump
Turbo Pascal is one of the most innovative packages to hit the market in a
long time. With its built-in, full-screen
editor and the ability to automatically
find runtime errors in the source, you
can have debugging sessions that rival
the speed of an interpretive language
like MBASIC (yuck!).
And, because it compiles to machine
code, you can have execution speed that
is as fast as C or any other 'systems' language and nearly as fast as the same program written in assembly language.
However, the full potential of TURBO
can only be realized if you use the internal editor for your debugging.
Terminal Condition
Before using the TURBO editor, it is
necessary to configure it for your terminal. This is trivial if your terminal is in
the list given in TINST's (S) option; as a
matter of fact, almost anybody reading
this can choose'ADM3A' and the editor
will work.
However, if you want it to work as efficiently as possible, you should create
your own definition. This is done by selecting the CREATE NEW DEFINITION
option and answering approximately 20
questions about your terminal. This is
covered in appendix K; I will briefly go
over what is given there adding more detail on the subtle (but important!) points
that aren't explained well enough in the
manual.
The Inquisition
There are three types of questions
asked by TINST. The simplest asks for a
YIN response; just type a 'Y' for yes or
'N' for no and DO NOT follow it with a
CR> carriage return. The second type of
question asks for a single number. You
can enter this number either as decimal
by just typing the number, or as hexadecimal by preceding the number with '$.'
When entering a number, you can edit
your entry with the (BS) or (DEL) key. To
end entry of the number, type (CR).
The third type of question asks for a
command string to perform some function such as clearing the screen. TINST is
more convenient than many other installation programs because you can enter
the command string directly rather than
having to enter a list of decimal or hexadecimal numbers.
16
Micro C Staff
If a command sequence is '(ESC)=,'
you can type the escape key followed by
the '=' key and a (CR) carriage return
(ODh) to indicate the end of the sequence. Any control characters typed
this way are echoed as 'ctrl-cc' with the
exception of (BS)-(ctrl-H), (DEL)(7Fh), (CR)-(ctrl-M), and (ESC)-(ctrl0, which are echoed as shown here. All
other characters are echoed normally.
One of the most difficult things, about
entering command strings is that there is
no such thing as backspace-once a key
has been hit there is no return. If you forget and type a (BS) or (DEL) it will be
taken as part of the command you are
entering.
So, it is a very good idea to get out the
reference guide for your terminal and go
through the list of questions given on
pp. 231-233 of the manual (for terminal
installation) and pp. 11-13 (for editing
command installation). Write down the
answer to each question on a sheet of paper so that you will be ready and make
no mistakes; if you slip up just once, you
have to do the entire installation over
again.
It is also helpful to STOP after each
prompt and read the question. Some
questions aren't asked if others are left
blank, so you can't count on being able to
type in your prepared answers exactly as
you have written them down.
Some characters must be entered as
strings of numbers (see p. 230 of the Turbo manual). The most obvious example
of this is (CR). TINST interprets (CR) as
its 'end of line' command, just like CPI
M. To get around this, you must type
'$OD' (OD hex) or '13' (decimal) instead.
Note: if you enter part of a command
in decimal, you must enter all of it the
same way! For instance, the Kaypro 10
and the new II-84 and 4-84 have a bug in
the terminal driver that causes the 'insert
line' command to behave strangely.
When the command is given, the current
line is broken into two lines at the cursor
position. TURBO expects the entire line
to be moved down by one positi<:m and a
new line to be inserted above it.
This difference of opinion means that
the file and the screen won't necessarily
agree. To cure this problem, you must
tell TINST that the command to insert a
line is '(CR)(ESC)E' instead of a simple
'(ESC)E.' Since you can't directly type a
(CR), the way to do it is to reply to
TINST's query for an insert line command with the following:
INSERT LINE command: $OD $lB
$4S(CR)
or 13 27 69(CR)
(Notice the spaces between the numbers.)
When entering numbers for commands, you are allowed a backspace of
sorts. If you type a wrong digit you can
start the current number over again by
typing another '$.' It doesn't work, however, if you have already typed the terminating space. Also, you can't enter a ', (for 'none') after doing this.
One last thing about entering commands before we start talking about specific questions: you can change an existing definition by selecting its number
and answering 'Y' when asked "Do you
want to change this definition?" You are
then asked the same questions used
when creating a new definition, except
the old answer to every question is displayed. If you just type (CR), the answer
is left unchanged. If you want to change
it, type in the new command as described before. If a command isn't supported by your terminal, type a '-' (minus sign) and the answer will be
changed to 'Nothing.' This will only
work if it is the first character on the line,
so be careful what you type.
Terminal Commands
The only command that must be defined for the editor to work properly is
the CURSOR POSITIONING command. The screen lines and columns
must also be defined, but the other commands simply make it run faster and
more efficiently. The questions asked
follow a general order of most to least
important, with the exception of STARTI
END HIGHLIGHTING. Without these
commands, you cannot see what block
of text the block commands are going to
affect, most inconvenient but still passable.
If your terminal cannot highlight characters, then you can substitute the command for entering and leaving any other
'alternate video' mode, just be aware
Micro Cornucopia, Number 21, December-January 1985
that normal text is printed in 'highlighted' mode and special things (like marked
blocks of text) are shown as 'normal.'
This means that if you have a terminal
with reverse video, you should give the
command to return to 'normal' video for
START HIGHLIGHTING and the command to enter reverse video as the END
HIGHLIGHTING command. This
seems a bit backwards, but if you do it
the other way, the entire program you
are working on will be displayed in reverse video, except for the marked block
of text and any special characters that
happen to be in the file. See Figure 1 for
more help.
Figure 2 - Kaypro 1/-84 Video
Command Worksheet
Terminal Type: Kaypro II-84
(4-84, 10)
Send Initialization String? N
Send a Reset String? N
CURSOR LEAD-IN command: =
CURSOR POSITIONING COMMAND
between row and column: Nothing
CURSOR POSITIONING COMMAND
after line and column: Nothing
Column first? N
OFFSET to add to LINE:
$20
(32)
OFFSET to add to COLUMN: $20
(32)
Binary address? Y
CLEAR SCREEN command: ctrl-Z
Does CLEAR SCREEN also HOME cursor? Y
Figure 1 - What It Really Means
They Say
means
END HIGHLIGHTING
START HIGHLIGHTING
Set Alternate Video Mode
Return to Normal Video
The DELETE and INSERT LINE commands speed things up by making it
possible to add and delete lines and
scroll through the file without repainting
the entire screen every time. The effect of
adding these commands is especially obvious when scrolling toward the beginning of the file one line at a time. ERASE
TO END OF LINE also cuts down the
time needed to update the screen by
eliminating the need to type spaces all
the way out to the end of a line that
doesn't fill the entire width of the screen.
Example
The following is a worksheet that has
been filled in for a Kaypro II-84. If you
, have a Kaypro then you should use this
definition rather than the one given in
the terminal menu of TIN ST. If you have
an older Kaypro, you should enter nothing (-) for the START HIGHLIGHTING
command (the END HIGHLIGHTING
command will then automatically be assumed to not exist). The definition supplied for Kaypros will not work totally
correctly for any of the Kaypros, because
it has highlighting commands not supported by the older models and it doesn't
handle INSERT LINE correctly in the
newer models, as mentioned before. '
DELETE LINE command: R
INSERT LINE command: $OD $1B $45
«CR> E)
ERASE TO END OF LINE command: ctrl-X
START HIGHLIGHTING command: C 1
< Nothing for older Kaypros
END HIGHLIGHTING command:
B 1
number of line on your screen: 24
number of columns on your screen: 80
Delay
Delay
Delay
and
after CURSOR ADDRESS: 0
after CLEAR, DELETE, and INSERT: 0
after ERASE TO END OF LINE
HIGHLIGHT On/Off: 0
Is this definition correct? Y
(I certainly hope so •• )
Operating frequency of your
microprocessor ill MHZ: 4
Editing Command Installation
If you happen to use WordStar, you
can ignore this section. If you are used to
some other set up of editing commands
then you can save yourself a lot of grief
by changing Turbo's editing commands
to match the ones of your normal editor.
To do this, select the C> option on the
main menu of TINST and answer the 40
or so questions that follow. All these
questions are of the same type as the
'command string' questions in the
screen installation section and the same
rules should be followed for en tering
them.
You should make up a work sheet for
answers to these commands, too. If you
want to, you can use the one on pp. 1113 of the Turbo manual (along with the
Micro Cornucopia, Number 21, December-January 1985
update for vrs. 2.0 if you have it). The
questions asked are sometimes confusing and inconsistent; for instance, did
you know that Paging down takes you
the same direction in the file as Scrolling
up? To help overcome the confusion, see
Figure 3.
Figure 3 - WordS tar Worksheet
They Say
means
---->
------>
---->
Scroll up
to end
Scroll down --> to beginning
Page up
to beginning
Page down
to end
Other than this, the only confusing
part of installing editing commands is
that you cannot have two commands
that are the same (if you do, you have to
do the ENTIRE installation procedure
over again), and you cannot have ambiguous commands. For instance, if you
have said that the Page up command will
be '(ESC)F', you can't define the End Edit command as '(ESC)'.
The Bottom Line
Turbo Pascal is the greatest thing I
have found since root beer floats. (Editor's note: Actually, root beer doesn't
float, ice cream floats.) Its capabilities for
addressing absolute memory and I/O
ports directly make it indispensible for
trying out new ideas. With a little work,
its built-in editor can be customized to
run efficiently and appear almost identical to your usual editor.
•••
17
MODEL 2000
4 MHz Z80-A COMPUTER WITH HARD DISK INTERFACE
AND UP TO A MEGABYTE OF RAM
ASSEMBLED
AND TESTED
BOARD WITH
64Kof RAM
o
o
o
o
o
o
o
o
o
PROCESSOR:
A Z80-A cpu running at 4 MHz with no added wait states and supporting
mode 2 interrupts. Sockets are included for the optional DMA controller and
a 9511 or 9512 arithmetic co-processor.
MEMORY:
Up to 1 megabyte of main memory may be plugged in to give the Z80-A
phenomenal performance (4 banks of 64K or 256K rams). Bank selecting is
in16K segments so that there is no wasted memory. Any 16K segment may
be placed into anyone or more of the four 16K banks that the Z80 directly addresses. A 65th segment contains the 4K video ram and 8K 2764 eprom.
Any 16K segment may be write protected.
DISK DRIVE INTERFACE:
The floppy disk controller is a WD 2797 and will run four 5.25" or 8" drives,
single or double sided, single or double density and up to 255 tracks per
side.
The HARD DISK port is designed to accept a Western Digital hard disk
controller.
VIDEO:
A high quality 80 x 24 character display is produced by an SMC 5037 and
8002A video chip set using 7 x 9 dot character in a 9 x 12 field. Video attributes include: reverse, blink, blank, underline and strike-thru. Two graphics
modes are supported and may be displayed along with text. The final output
is composite video for easy connection to most monitors.
KEYBOARD PORT:
I
An interrupt driven serial port for the keyboard provides a true type ahead
buffer and allows for a simple coiled cord connection to a detached
keyboard.
INPUT.OUTPUT:
The RS232-C serial port comes complete with a D-SUB connector and
will communicate at 110 to 19.2K baud. The parallel printer port uses full
handshaking and has a Centronics style connector. Optional ports include
two additional RS232-C serial ports or a 800Kbit networking port and one
RS232-C port.
POWER REQUIREMENTS:
5Vat 1.5 amp and + 12V at 0.1 amp
SIZE:
8.5" x 13"
SOFTWARE:
ETOS II operating system (CP/M 2.2 compatible)
BIOS for 5.25" drives (Kaypro II & 4 format) and a HARD DISK.
CP/M is a registered trademark of Digital Research
TERMS: We ship C.O.D. inside the U.S.A. Prepaid Orders: inside California
add 6% sales tax, freight extra, company and personal checks, please allow
3 weeks to clear. Mastercard and Visa accepted.
18
PRICES
Assembled and tested board with 64K ram ..................... 498.00
Keyboard ........................................................................... 75.00
Main case ... ........................................ ............................. 100.00
Keyboard case ..................-....................... .......................... 25.00
Drives single sided ................... ........................................ 150.00
Drives double sided .................................. ........... ............ 175.00
Video display, green ........................................................ 100.00
5V 3 amp power supply ...................................................... 30.00
12V 2 amp power supply ...................................... ............. 30.00
Quiet fan ...... ........................................................... ........... 16.00
Cable-floppy disk 5.25" .................................................... 16.00
Cable-5 & 12V power ........................................................ 8.00
10MB half high drive ....................................................... 575.00
Hard disk controller .................. .................... .............. ...... 250.00
Hard disk cable kit .............................................. ............... 50.00
Networking port ............................................................... 100.ob
2 extra serial ports .......................................................... ;.. 50.00
-W::==:·
8161 BROADWAY
LEMON GROVE, CA 92045
(619) 466-1671
Micro Cornucopia, Number 21, December-January 1985
Micro Cornucopia, Number 21, December-January 1985
19
Xerox 820 Colutnn
By Mitchell Mlinar
Although most of my mail (2 out of
the 3 letters) poses questions regarding
the Xerox 820-1, there was some interest
by the Xerox 820-11 user. The last time an
820-11 was even mentioned in Micro C
was WAY back in December of 1982 (you
do save your back issues, don't you?). At
that time, John Marlin presented a cursory tour of the 820-11 system (sort of a
quick test drive). But being an engineer,
instead of "driving" it, I tore it apart to
see what makes it tick. (At the end of this
column there is information on a very
deluxe, but inexpensive operating system so that you don't need to purchase
CP/M.)
1013 W. 210th St.
Torrance CA 90502
1982. The monitor code started with version 4.00 and is now up to 4.04. For only
6k of code, it is packed with features.
Upon startup, a RAM test and ROM
Hardware
I hate to use a cliche, but "where's the
CRC test are performed followed by the
beef?" Oh sure, you now have a hot 4
high memory monitor portion move
MHz machine with 6k of ROM (up to 8k
from ROM to FOOO-FEFF. The upper
available) and a new fangled disk conmonitor entry (at FC55H in v4.01) checks
for the type of disk controller and, if floptroller capable of double density. There
is also a cute piezoelectric crystal which
py, the type of disk drives; this informacan produce a wide frequency range at
tion is used to configure the disk I/O
one volume - annoying. But since one
drivers.
evening and $100 will get you all of the
The monitor in the -II offers 18 comabove on a 820-1, there must be more.
mands as shown in table 1 out of which
There is.
three or four are truly useful. Unlike the
-I monitor which loads itself into high
For a start, extra video hardware permits four screen attributes: flashing, inmemory never to return, the -II makes
A Little History
verse video, low-intensity and graphics.
extensive use of the ROMs during norThe 820-11 was born BEFORE the first
Although the graphics are nice, no commal execution. All of the 18 commands
820-I was ever commercially sold (1980
mercial programs make use of them. The
are located in ROM and overlayed into
inverse video "sea of light" requires
memory (at FC55H again) before executimeframe) since Xerox knew that time,
tide, and computer technology wait for
tion. (In contrast, all of the user CALLawelding goggles, and flashing characters
no" man (or company). When the 820-11
send my dog into convulsions.
ble monitor routines are present in high
was finally introduced to the public early
I like the low intensity mode so I am
memory with the exception of the video
driver. It remains in ROM and is called
in 1982, few eyebrows were raised; after
currently modifying my 820-1 to switch
between £lashing and low-intensity.
all, it wasn't that different from the -I.
directly.)
Couple the ho-hum greeting with Xe(More on that in a later issue.) Besides
This approach saves space since only
rox's public information policy (read:
the usual four ports on the back, there is
the command being executed needs to
be moved into memory. Although most
___n-,ot:l_~)_,!!"!d t~~ 8~-=!I guickly enteredoba connector for the disk controller
scurity.
------- ---------daughter--board -anaa:-separate Dlls-[or--- '-of the command -routines were loca.tion
Most of you -II owners know Xerox
future expansion (the 16/8 upgrade
independent (only JRs and CALLs to
"fixed" routines from FOOO-FC54), some
does not sell a technical manual for the
board plugs here).
820-11, so I recommend purchasing the
A choice of disk controllers was availof them are self-modifying so they have
to run in RAM. Of course, the overlay
manual for the 820-1, as there are many
able for the -II: floppy or hard. The floparea can be used for disk I/O after system
characteristics which the -I and -II share.
py controller is a FD1793 capable of double density operation; the hard disk
boot. See Figure 1 for monitor cominterface is merely another PIO which
mands.
Contact:
BOOT SYSTEM: This can be accom.operates as a SASI interface. Although
Xerox Corporation
plished by A or L or LA for loading thethis seemed like a nice approach, it was
1341 West Mockingbird Lane
system from drive A. To boot drive B,
limited. A floppy controller could run eiDallas TX 75247
type LB etc.
ther 5.25 or 8 inch drives, but no hard
COpy MEMORY: Copies memory
disk. The hard disk interface worked
Order:
block at (start address to end address) to
with a SA1403 which only operates hard
820 Information Processor
destination address.
Software Development Guide
disks or 8 inch floppies. (Compare that to
DISPLAY COMMANDS: Gives a
Reorder # 9R80368
the BBII which offers all three capabiliquickie help menu.
ties.) Since I don't have a hard disk (yet),
Cost was $35 in 1982
DISPLAY MEMORY: Dumps memory
my discussion will focus on the floppy
in standard DDT format from start adThe only other source of information is
configured -II.
dress to end address. Just like DDT, the
the reference section in the CP/M 2.2
start and end values are optional and
Software
documentation that Xerox provides to
successive segments can be dumped by
buyers. However, since the 820-11 is no
Compared to the -II, the -I software
just typing D.
longer made except for limited internal
looks like the stuff I hand-coded for a
FILL MEMORY: Same as DDT: start
production, and bare boards do not have
PDP-8 ten years ago! All of the 820-11
address, end address, and value all rethis documentation, I will assume many
specific software (Monitor, BIOS, CONof you do not have that either. (Editor's
quired.
FIGURCOM, SWAP.COM, INIT.COM,
GOTO: Calls subroutine at address;
and SYSGEN. COM) was written by
note: I received a call from Xerox marketup to three values can follow the addre~s
Balcones Computer during 1981 and
ing about a month ago and they say that
20
the 820-11 and the 16/8 are still being
manufactured and actively marketed.)
Micro Cornucopia, Number 21, December-January 1985
I
which are loaded into HL, DE, and BC in
order. Any registers not set contain nonsense values.
HOST TERMINAL: Dumb terminal
that stores screen lines into memory.
These can be accessed by scrolling with
the CTRL + up/down arrow keys. Other
commands include:
Toggle local echo CTRL + DEL
Toggle local line feed CTRL + LINE
FEED
Toggle remote echo CTRL + 1 (keypad)
Transmit break CTRL + . (keypad)
(Break will end when any char is
pressed)
Abort CTRL + ESC
INPUT: Display value of input port.
After display, press SPACE BAR to display same port again, RETURN to display the next port, or ,_, to display the
previous port. Any other key exits.
MEMORY TEST: Extended memory
test with 256 possible patterns.
MODIFY MEMORY: Modify memory.
After display, touching the RETURN
will leave the contents alone and advance the address, ,_, does the same except backs up the address, any hex value
entered replaces the current value, and
typing a quote "' accepts the next char
ASCII value as the location's new value.
Any other key exits.
OUTPUT PORT: Same is input port
except writing to it. Note that the Reference documentation errs here - the scroll
register reads its data from the normal
data lines, NOT the high address lines.
PRINTER PROTOCOL: Xon/Xoff is a
flag: 1 = enabled, 0 = disabled. Status
mask is mask to read register 0 of the
printer (SIO-B). Status value is value after masking to see if printer is available
for output (not busy). Next to useless
unless you change printers as often as
you change disks.
SET BAUD RATE: Sets the baud rate
on channel B (unless channel is A) codes
include: 05 = 300 baud, 07 = 1200 baud,
and OE = 9600 baud. Codes are sent to
port 0 for channel A or port OC for channel B. All values are in Hex.
TYPEWRITER: Worthless.
READ SECTOR: Disk drive is 0
through F (corresponding to drives A
through P). Reads one physical sector re-
gardless of size.
VERIFY MEMORY: Gives a display of
all locations that do not match.
WRITE SECTOR: The first time you
execute this after turn-on or cold boot,
just type W This will give you a nifty copyright message from Balcones. The next
time (and thereafter), the write command will work normally. Use caution
with this command!
Next time, I will discuss all the monitor entry points-especially those that
Xerox told us to avoid.
QP/M
QP/M, a replacement for CP/M 2.x, is
now available. QP/M is fully compatible
with CP/M but is much more powerful.
Like ZCPR you can setup a common user
area (where the system searches for unfound programs).
Overlay files (such as those used by
Wordstar, SuperCalc, etc.) can be accessed from ANY user area, provided
they exist in the common user area. QP/
Muses Z-80 code and optimized disk
routines for increased speed. Several
utilities are supplied, including IN-
STQPM, PIPQ and STATQ. Also supplied is a compatible copy of ZCPR (a
public domain program), complete with
source code.
The primary benefit of QP/M is automatic time/date stamping of files. By using the built-in real-time clock in your
820, BB, or Kaypro, QP/M will stamp
each file with the current date and time
whenever written. The BACKUP utility
backs up ONLY those files which have
been modified or created since the last
BACKUP. Also supplied is a 2k DIR program which can be toggled to display
time/date information and .LBR directories.
The complete package, including documentation which describes all aspects
of each QDOS call, is available for only
$40.001 Send a current address label from
Micro C, and get a $5.00 discount. Specify disk format when you contact:
MicroCode Consulting
1013 W. 210th
Torrance CA 90502
•••
Figure 1 - 820-1/ Monitor Commands
Command
Boot drive A
Boot system
Copy memory
Display commands
Display memory
Fill memory
Goto location
Host terminal
Input port
Memory test
Modify memory
Output port
Printer protocol
Set baud rate
Typewriter
Read sector
Verify memory
Write sector
Format
A
L
C
@
D[start addr] [end addr]
F
G [HL DE BC registers]
H[channel]
I
X
M
O
P [status mask] [status value]
B [channel]
T[baud rate code]
R