Micro_Cornucopia_#27_Dec85 Micro Cornucopia #27 Dec85

Micro_Cornucopia_#27_Dec85 Micro_Cornucopia_%2327_Dec85

User Manual: Micro_Cornucopia_#27_Dec85

Open the PDF directly: View PDF PDF.
Page Count: 108

DownloadMicro_Cornucopia_#27_Dec85 Micro Cornucopia #27 Dec85
Open PDF In BrowserView PDF
$3.00

Dec - Jan 1986

The Fast & Cheap Issue
Build a PC Clone For Less Than $800! ................... 52
In under an hour you can assemble a PC, XT, or AT and really save!

Home Care For the Invalid Computer (Part One) ......... 49
Tired of paying big bucks every time a 20-Cent part dies?

The New NEC Microprocessors -_ 8080, 8088, Or 8086? .... 4
NEC has used 80286 technology to make 8088 and 8086 compatible chips that run
8086 and 8080 code (and do it faster).

Intel's Speed Trip - Or Why The New Processors? ...... 58
If you were wondering about the hoopla over the new processors, this will help.

Plus
Private Domain, An Alternative To Public Domain ................ 16
Freeware isn't the only way for programmers to get compensation.

Inside The Small C Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. 23
Ever wonder what makes a compiler work?

Speech Generation With Radio Shack's SPO 256 ............... . .. 33
Now your computer can reply to all those nasty things you say about it.

NSWEEP And The 32032/MS-DOS Interface. . . . . . . . . . . . . . . . . . .. . .. 65
Dave Rand expounds.

'

High Resolution Graphics Using The NEC 7220 ................... 70
How to write software drivers for smart graphics controllers.

How Borland's Three New Holiday
Packs Will Fill Your Stocking Without
Emp
Your Piggybank.
TURBO GAMEWORKS

Three special packs with dazzling discounts that will help get
you into a Holiday mood You can get some of Turbo, most of
Turbo, or all of Turbo-including the two newest
members of the Turbo family, Turbo GameWorksTi' and
Turbo Editor Toolbox~" You also get our unmatched 60day money-back guarantee, quality products
that aren't copy-p1'?tected.

TURBO NEW PACK

$95.00.

You get the two exciting new members of the
Turbo Pascal family,
• TIJRBO GAMEWORKS, Chess, Bridge, and GoMoku, complete with source code and a 200page manual.
• TIJRBO EDITOR TOOLBOX, all the building
blocks to make your own editors and word
processors, complete with source code and a
ZOO-page manual.

TURBO HOLIDAY PACK

$69.95.

Our new Turbo GameWorks offers games you can play and replay
without Turbo Pascal or revise and rewrite with Turbo
pascal 3.0. We 'give you the source code, the
manual, the diskettes and the competi~
tiVe edge. Chess, Bridge and Go-Moku.
State-of-the-art games that let you be player,referee, and rules committee all at once
because you have the Turbo Pascal source
code. Learn exactly how the games are
made-so you can go off and make your
own. And Turbo GameWorks is the only quality
game you Can buy that is not copy-protected.
Sold separately, only $69.95. (Just $47.50 if you
buy the Turbo Ne:w Pack.)

TURBO EDITOR
TOOLBOX
$69.95.
Build your own word processor-for only $69.95!
You get ready-to-compile source code, a fullfeaturedword processor that looks and actsIike
WordStarT~< and a ZOO-page manual that tellsyou
how to integrate the editor procedures and functio,n,s
into your programs, With Turbo Editor Toolbox you
canbave the bestof allword processors. You can make
WordStar behave like Multi-Mate. supponwin~oViS
justlikeMicrosoft's Word, And do it as fast as
WordPerfect does ii. [ncorporate your new
"hybrids" into your programs to achieve incredible
control and power. Sold separately, only $69:95,
(If you buy the Turbo New Pack, the price dropsto
jllst$47.5O.)

$125.00.

You get all three of the Turbo family classics
for only $125.00 (about a 30% discount). Turbo
Pascal 3.0 and Turbo Tutor and Turbo DataBase Toolbox-all for just $125.00.
• WRBO PASCAL combines the fastest pascal
compiler with an integrated develop-:
ment environment
• WRBO nrrOR teaches you step-by-step
how to use Turbo Pascal with commented
source code for all program examples on diskette.
• TIJRBO DATABASE T()()I.BOXoffers three problem~
solving modules for your Turbo Pascal. programs:nubo
Access, Turbo Sort. andGINST, which generates aready~
to-run installation
lets:-,

.. " . '.

.',

<2((
ILLUMINATEDTECHNOLOGIES
.U
·3005 N.May • Oklahoma City. Oklahoma 73107

Discover What 10 Software Insiders Already Know!
"... a little companl. that has succeeded over the last 6• The
Software Toolworks CIBO compiler is " '.' . the best
1
• five years in giving Its customers a lot of value for
software buy in America ... " - Microsystems
their money ... " - Richard O'Reilly, computer columnist

"It would be the best of all possible worlds if some
7
"All the firm's programs are graced with features that
• magic diskette could be made that would transform
2
any hardware in such a way as to receive The Software
• the entire industry should be required to provide.
Their manuals are the most honest in the industry."
Toolworks' numinous software." - Wm. F. Buckley, Jr.

- T.R. Reid, syndicated computer columnist
the two most important attributes of Software
• Toolworks' programs~ they're priced low, and they
work well." - The Washington Post
"Unlike the software of many publishers these days,
• none of The Software Toolworks programs are
hobbled by copy protection, nor does tlie company try to
tie up its customers with mumbo-jumbo licensingagreements ... " - The Los Angeles Times "Computer File"
"I don't know how The Software Toolworks stays in
• business chargin~ such low prices for such nifty
products ... " - DaVId Gerrold, computer columnist and
noted science fiction author

3 "...

4

5

Media Master Plus - Now you can run most CP/M programs on
your IBM PC or compatible without additional hardware. Media
Mastertm lets you read, write and format over 70 different double
density CP/M formats. ZP/EMtm (included) emulates an 8080
processor to execute CP/M software at machine language level
giving you the equivalent of a 1 MHz 8-bit computer. Also includes
terminal emulation for Osborne, Kaypro, Health/Zenith and DEC
VT52 displays. Requires 192K RAM. For IBM PC and compatibles.
- $59.95

TO ORDER CALL: 1-800-223-8665; in CA 1-800-228-8665

CJ7te Software c:rooJwor~·
14478 Glorietta Drive, Sherman Oaks, CA 91423

u.s. and Canada add $2.00 per order s/h. Overseas orders add $5.00 per order.
CA residents add 6.5% sales tax. Orders shipped UPS. Dealer inquiries invited.

Micro Cornucopia, Number 27, December-January 1986

"The Software Toolworks has a whole raft of
8
• programs that work, and (the company) sells them for
reasonable prices. strongly recommend that you get their
I

catal0r,'" - Dr. Jerry Pournelle, computer columnist
"Byte' and noted science fiction author
"One of the original pioneers in low cost, high quality
• software, The Software Toolworks publishes over 50
solid products in MS-DOS and CPIM for under $60."
- Walt Bilofsky, chairman of The Software Toolworks
"All products are shipped within 24 hours, come
• with a money back guarantee, and free technical
support is available (though you'll hardly need it)."
- Joseph Abrams, president of The Software Toolworks

9

10

Mychess - Award-winning world class chess program, featuring
nine skill levels and over 850 opening moves. Prints moves and
saves games in progress. Outstanding graphics display board on
IBM PC and most popular CP/M computers. - $34.95
Toolworks C - Full featured C compiler and run time library. One
of the fastest on the market! New MS-DOS version produces
relocatable object files (.obj). MATHPAK provides true 32-bit
floating point and signed integer data types. CP/M and MS-DOS.
Toolworks C Compiler - $49.95
Toolworks C Mathpak - $29.95
Airport - You are an air traffic controller with radar screen filled
with aircraft under your guidance. See how long you can last
without cracking. Tougher than the real thing! CP/M and MS-DOS.
- $19.95
LISP/80 - Experiment with artificial intelligence programming!
Over 75 LISP functions. Includes source for an edItor written in
LISP and several demonstration programs. CP/M and MS-DOS.
- $39.95

17

C'ing Clearly
By Ron Miller

Has programming left you out of
sorts? Are you being bombarded by
disorderly information? Don't get left
out in the shuffle. Ron is here to help
you get your sorted affairs in order.

1157 Ellison Drive
Pensacola FL 32503

,you can see, the bubble sort algorithm
is so brief that it can easily be retyped
when the comparison is not a matter
of integers but of strings. The first
"if" statement would simply become:
{ it(strcmp(s1 ,s2»0){. ••

An amateur programmer confronting a set of numbers to arrange or a
herd of names to alphabetize faces an
embarrassment of riches. There are
shell sorts, insertion sorts, quicksorts,
merge sorts, selection sorts, and who
knows how many others. Which algorithm is the fastest? Which most compact? And perhaps most important of
all: Which can be translated from
BASIC (the sample at hand almost
always turns out to be in pidgin
BASIC) into an honest language?
It's One Sort Or Another
The speed and flexibility of C make
it possible to get by with two sorts one from each end of the spectrum,
stretching from the simplest to the
most sophisticated. If either bubble
sort or quicksort won't do the job, you
probably didn't need to sort it after all.
Bubble Sort
For quick and dirty efforts, I reach
first for bubble sort because it's so
straightforward that even the absentminded among us don't have to look
it up while hacking away. The idea is
simplicity and inefficiency itself: Zero
a flag and run through the array,
exchanging adjacent pairs when they
are out of order. Set the flag whenever
an exchange takes place. Rezero the
flag and keep looping until the flag
isn't set. For an array of integers of
LENGTH items beginning at BASE,
bubble sort written in C is shown in
Figure 1.
A swap routine with a temporary
variable can be fashioned anew for the
type variable being swapped. Or better, as shown here, you can create a
more general swap function by passing the addresses and the length of
variables.
Figure 4 contains a speedy Z80 assembly language routine that keeps
the bytes on the registers and thus
avoids all temporary storage areas. As

18

}

Bubble sort remains my choice
whenever I'm not playing fancy games
with structures (see below) and not
sorting more than about SO items. I
wanted to see just how long it takes to
bubble sort a set of random integers,
so I made repeated runs on my SMHz
Kaypro, using Software Toolworks' CI
SO. Sorting 10 items averaged 0.0123
seconds per sort. With 100 items, the
average time rose to 1.S4 seconds. I
can live with that.
If I were using BASIC, the choice
would be different. In MicroSoft BASIC at SMHz the rates were 1.1 sec-

onds (as opposed to .012 seconds) for
sets of ten, and 106 seconds (as opposed to 1.S seconds) for sets of 100.
One minute and 46 seconds is quite a
pause while waiting for somebody to
shuffle. Interestingly enough, it
doesn't seem to matter whether the
integers are stored as ordinary numbers (Le., floats) by default or as twobyte elements by invoking DEFINT.
The speed remains the same.
Quicksort
Even with the speed of C, the
situation becomes absurd when a bubble sort takes on an array of much
more than a hundred. I tried sorting
800 hex (2048 decimal) random integers and found that an average of 11
minutes and lS seconds elapsed before
my timing circuit was triggered. If you
think that's bad, consider the result
for a 800H array of numbers in BASIC:

Figure 1 - Bubble Sort in C
main( )
{

,........,

bsort(BASE,LENGTH);

}

bsort(in1t,count)
int .in1t,count;
int j;
char nag;
tor(j=nag=0,count-=2;;){ '.keeping down subtractions: see test below·'
it(in1t[j]>in1t[j+1]){
swap(&in1t[j],&1n1t[j+1],2); ,. see below on swap tormats .,
tlag=1;
}'.it all pairs compared and nag not set, quit. Otherwise, repeat.·'
it(j++ == count) it(ltlag) break; else j=nag=o;
}

Figure 2 - The Quicksort Version
qsort(in1t,count)
int .in1t,count;
int

j,k,pivot;

it(count>2){
j

= 0;

,. It three or more, must be subdivided ••,

k = count - 1;
pivot = in1t[(count-1)'2]; ,. Choose the value ot the midmost element.·'
dol
,. Any member would do, however. .,
wh1le(in1t[j)pivot) k =(k>O) ? --k : 0; ,. To prevent index overrun .,
it( j<=k ){
swap(&in1t[k],&in1t[j),2);
j =(jO)
}

}wh1le(j<=k);
qsort(&in1t[0),k+1);
,. reoursion .,
qsort(&in1t[k+1],count-(k+1»;
}

else ,. It length=one, leave it alone. It two, flip it necessary. .,
it( count==2 && (in1t[0]>in1t[1]) ) swap(&in1t[0),&in1t[1),2);

Micro Cornucopia, Number 27, December-January 1986

13 hours and 29 minutes. Over a DAY,
if my. Kaypro still ran at 2.SMHz!
That's one result I didn't replicate: I
suffered a mild case of computer withdrawal while waiting for BASIC.
With C and quicksort, that same
SOOH integers took 4.25 seconds.
The general idea of quicksort is
slightly more complicated than that of
bubble sort: Choose a "pivot" value
and divide the array into an "upper"
section in which all values are above
the pivot, and a "lower" section in
which everything is below. Then apply
the process recursively upon the resultant sections. Continue until the portions are reduced to single-member
cells.
Unfortunately, this process requires
some complex looping and indexing
which makes it difficult to write off the
top of your head. You also need a
recursive language, which ends our
comparisons with BASIC.' Figure 2
shows the quicksort version.
You can see that quicksort is faster
than bubble sort for large arrays, not
because the algorithm itself takes less
time to execute, but because the binary
divide-and-conquer method leads to
far fewer calls. Thus, for small arrays,
bubble sort is actually faster. But how
small? For ten random integers, quick-

sort wins the race: 0.0084 seconds
versus 0.012 seconds. But for five
integers, quicksort averages 0.0032 seconds to bubble sort's 0.0025. With
these times, convenience and code size
are the only considerations.
Generalizing The Algorithm
The relative complexity of the quicksort algorithm suggests that you will
want to summon the code from a
library, rather than rewrite it each
time. That, however, complicates matters further, because the code in Figure 2 works only for integers. You're
going to add some extra code to
handle string pivots and string comparisons. Complex data types require a
total redesign.
In Pascal, these difficulties are crippling. Quicksort must be recoded each
time it's employed. But not in C. The
ability of C to pass function addresses
to other functions, plus the ability to
calculate pointers, permits the construction of an all-purpose algorithm
that works with any type of element,
from single characters to complex
structures. All you have to know is:
(a) how you wish to compare the
items in the array and (b) where
within the items the fields to be
compared are located.

Figure 3 - strcmp() function
qsortCinit, offset, size, count, compare)
char .init;
'.arbitrary: char makes pointer arithmetic Simplest ••,
int size,count,offset,C.compare)C); ,. function address .,
int j,k,u,v;
char .pivot;
ifCcount>2){

= 0;

j

k = count - 1;
pivot = init+size.CCcount-1)'2);
,. pivot item begins at size.C Ccount-1)'2) .,
dol
whileC (u=(·compare)(init + offset + j.size,Pivot + offset » < 0)
j =(j 0)
k =Ck>O)
? --k : 0;
itC j<=k )(
swap(init + k.size, init + j.size,size);
if(lu) pivot = init + k.size; '*moved the test item if u or v ==
if(lv) pivot = init + j.size;
j =(jO)
? --k : 0;
}

}while(j<=k) ;
qsort(init,offset,size,k+1,compare);
qsort(init + size.(k+1),offset,size,count-(k+1),compare);
}

else
it( count==2 && (.compare)Cinit+offset,init+size+oftset) > 0
swap(init,init+size,size);

Micro Cornucopia, Number 27, December-January 1986

0·,

In the version below, "offset" is the'
offset of the comparison field within
the array element, and "compare" is
the address of a comparison function
wh'ich takes two' addresses for' its
arguments and returns -1 if the element at the first address is smaller
than the element at the second,
if
they are identical, and + 1 if they are
out of order. To compare integers, for
instance, you would need to write:

°

intcomp(s1,s2)
int .s1,.s2;
if(.s1<.s2) return(-1);
. else it(.s1==·s2) return(O);
else return(1);
,. or, more succinctly,
it not more lucidly, return (a==b)
? 0: ( (aAF': flags restored
LOOP: LDAX D
;(DE) into A
DB
OEDH,OAOH ;Z80 LDI
DCX
H
;LDI increments HL as well as DE, so back up
HOV
H,A
;A into (HL)
lUX
H
;now catchup
JPE
LOOP
;loop until BC=O
;I'm curious: Can anyone do this loop in fewer machine cycles? On the
;8088 you can use an extra index via -HOVSB- and the
;back-and-forth can be aVOided.
RET
lendasm
}

RETURN TO 19,200 BA UD ...
The following ''set-serial'' routines for the Kaypro and COM1
on an IBM or compatible were inadvertently omitted from Ron's
last article in Issue 26.

• ••
int fdesl

1***************************1

_putc (b)
int b!

1*

I*resp.t control port--IIS*I
1* 19200 baud-- baud port"'"0 *1
I*bit set control*1
I*one stop bit, 16K clock*1
I*receiver logic control*1
1* bits read, no auto*1
I*sender logic control*1
I*S bits send, assert dtr*1
I*interrupt control*1
I*interrupts disabled*1

*1

buffer-) cell [buffer-) indeK++l=b!
if ( ! (buffer-) i ndeK & 0x7f»
if(buffer-) index & 0Kl(0) puts("\r
\1"") I
else putsl"\rXXX\r")!
1* I like it to blink whp.n it's running. Every sector flashes on 01" off. *1
if(buffer-) index "'.. FFSIZEH
I*if the buffer fills *1
wri tel fdes, &buffer-) cell [01, FFSIZE) I
buffer-) index=01

1* KAYPRO VERSION *1
outb(0)(lS,S) ;
outb«(/))(f,0) I
outb(0)(4, S) I
outb(0)(44, S) I
outb(0)(03, 6) I
outb(0H1 10)(c0, 6) I
out b (0)(45,6) !
outb(0)(SI0KS010xS0,S) I
outb(0K01,6) I
outb(0x00,6) I

1* 40K version of standard putc ()

}

return b;

1***************************/
1* 40 K version of standard !tetc () *1

_getc ()
{

int b!
if(buffer-)index != buffer-)limitH

1* then it's neither EOF nor time to refresh buffer *1
i f(! (buffer->indeK & 0)(7f»
if(buffer-) indeK & O)(100) puts("\r
\1"") I
return (buffer-) celHbuffer->index++] & 0x7f) I

IBM compatible version for COMHI

else puts("\rXXX\r");
1* no si gn eKtension *1

}

outw(0x310)(B0, 1(19) I
I*S bits, no parity, one stop bit, no shake *1
outw(0)(S,101S) I
1*19,200 baud, in spite of what Peter Norton says*1
outw(0x0,1017) !
outw(0)(3, 1(19)!
I*dtr low *1
outw(0x0, 1017);
outW(0K0, 1(20);
1* no interrupts *1

i f (buffer-) index != IlFSIZE-J) return(EOF);

1* If it's not A000H, I've reached the end of file *1
b=buffer-) cell [BFSIZE-11;
buffer-) 1 irni t=read (fdes, buffer-) cell, BFSI ZE)-ll
buffer-) index=0;
return(b & 0)(7f);
1* no sign eKtension *1

}

1***************************1
kbhit (
1* boolean for character waiting at keyboard *1
1* Used to get out of endless loop. It's interrupt 21H,
service 11 in MSDOS. *1

(
-----------------F I GURE XX X-------------------------------------------------lIinclude (command. c)
I*C/S0 handles command line eMpansion this way *1.
Idefine TRUE 1
IIdefi ne FALSE 0
Idefi nil' S_PORT 4
IHhe s9rial port of Kaypro; lOIS fol" IBM *1
IIdefine BFSIZE 0xa000
Idefine SHAKE 0xbb
1* 01" some other unlikely character *1
IIdefine EOF -1
1* -Tradition---", as Teyve sings *1
Idefi ne EOT 0d4
1* ditto *1
char inbO, filename[151 I
struct {
unsigned indeK, limit!
char cell [BFSI ZE] I
} *buffer!

20

1* To provide a global buffer without *1
1* having 40K worth of fill in the COM file *1

return bdos(J1,0),
}

1***************************1

set_serial ()
{

See listings above.

1***************************1
char byte_i n ()
(
1* S is the Kaypro control port I 1021 for IBM;
1 is character-waiting on BOTH machines *1
while( ! (inb(S) & J) ) iflkbhit () exit (0) I
returnlinb(S_PORTl );

Micro Cornucopia, Number 27, December-January 1986

Sidekick for CP/M!

Eco-CRelease
Compiler
3.4

Write-Hand-Man
Desk Accessories for CP/M
NEW! Now with automatic screen
refresh!

We think ReI. 3.4 of the Eco-C Compiler is the
fastest full C available for the Z80 environment. Consider the evidence:

Suspend CP/M applications such as WordStar,
dBase, and SuperCalc, with a single keystroke and
look up phone numbers, edit a notepad, make
appointments, view files and directories, communicate with other computers, and do simple
arithmetic. Return to undisturbed application! All
made possible by Write-Hand-Man. Ready to run
after a simple terminal configuration! No
installation required.

Benchmarks*
(Seconds)

Don't be put down by 16 bit computer owners.
Now any CP/M 22 machine can have the power
of Sidekick.

*Times courtesy of Dr. David Clark
CNC - Could Not Compile
NIA - Does not support floating point

Bonus! User extendable! Add your own
applications.

We've expanded the library to 120 functions,
improved the manual and added new compiletime switches. The price is $149.95 and
includes the SLR Systems Assembler-Linker.
A savings of $145.00 over the old price!

$49.95 plus tax (California residents), shipping
included! Volume and dealer discounts.
Available on IBM 8 inch and Northstar 5 inch disks.
Other 5 inch formats available with a $5.00 handling
charge. CP/M 22 required; CP/M 3 not supported.
COD or checks ok, no credit cards

Call today
1-800-952-0472 (orders only)
1-317 -255-6476 (information)

Poor Person Software
3721 Starr King Circle
Palo Alto, CA 94306
tel 415-493-3735
Write-~nd-Man trademark of Poor Penon

•

1...1i

Softw;ve.

CPIM trademark of Digital Research, Sidelcidc trademark of
Borland International. dBase trademark of Ashton-Tate.
WordStar trademark of Micropro, SuperCalc a trademark
ofSoram.

1***************************1

~Ijl"
6220

if I (*charptr" byte_outlbyte_lnO»:z=EOn exitl0)1 I*EOT means over */
if(!*charptr) break I
I*if null, end of name *1
1 f I*charptr) 32 II *charptr (127) charptr++1 I- Just an extra precaution *1

byte_out Ib)
char bl

{

1* character-can-be-sent is 4 on Kaypro, 0x20 on IBM

(317) 255-6476

6413 N. College Ave. • Indianapolis.

}

*1

puts Cfi lename) I
putsl" ==) \nU) I
if ( ! Ifdes=fopen Ifi lename, "wb"»){
putsl"\nFILE ERROR.\n");
edt (0);

whilel ! Cinb(6) 14» iflkbhitO) exitl0)1
outblb, S_PORTI;
return bl

1***************************1
putsls)
1* the poor man's printfO *1

)

buffer-) index=0;
forlendct=0Iendct(BI){ I*receive until B EDT's in a row *1
if I I byte=_putclbyte_inO)
== EOn IPndct++1
iflendct II CbytlP!=EOn ) Rndct=01
byte_out ISHAKE) ;

char *5
{

while 1*5) *S++I
)

I *************************** I

}

sendl)

buffer-lindex -= 8; 1* Those EOT'!i weren't part of the file *1
wri te I fdes, Ibuffer-) cell [0],
0xB0* Ibuffer-) index/0xB0 + !! CbufflPr-) indell"0x80» ) I
fc lose I fdes) ;
putcharl' \n') I
putslfilename) •
putsC" CLOSED. \7\7\7\7\n");

{

int by tel
char *charptr;
if( ! Cfdes=fopen Cfil ename, "rb"» ){
putsC"\nFILE ERROR. \n") I
exit () I
)

}

buffer-) index=0;
I*reading up to 0A000H bytes into the buffer *1
buffer-) I imi t=read Ifdes, buffer-) cell, BFSIZE) -I;
1* Since arrays in C start with 0 *1
putsl"\nSENDING -- ")1 1* I didn't want to use printf and get *1
putslfilename) I
I*all that extra code *1
putsC" ==) \n");
charptr=filenarne;
do{
byte_inlbyte_out C*charptr» I I*Here's the file name. *1
}while I*charptr++) I
I*unt i l null *1
while I Ibyte=_getcO) ! .. EOF) byte_inCbyte_outCbyte»1
1* See the handshaking? Exchange goes on until index goes past EOF *1
forlbyte=0Ibyte(B;byte++) byte_inlbyte_out (EOn);
I*Eight EDT's sent out at EOF*I
fcloseCfdes) ;
put char I' \n' ) ;
putsCfilename) ;
putsl" CLOSED. \7\7\7\7\n"),

I *************************** I
mainlargc, argyl
int argcl
char -*argvI
{

int il
command I&argc, &argv) ;
I*EICpanding command I ine in C/B0. MSDOS 2.0 does it for you. *1
set_serial II I
I*initialize ports */
buffer=alloc IBFSIZE) I
I*allocate buffer *1
iflargc==I){
1* If no arguments, then go to receive mode *1
putsl"READY ••• \n");
whilelbyte_inO != SHAKE) iflkbhltll) exit(0)1
1* waiting for the other computer to come on line *1
whilelTRUE) receive 0 I 1* program exit is frOM receiveO routine *1
)

byte_out (SHAKE) ;

I *************************** I
receiveO

1*"1' m here," the donor says *1

forli=0;i (B000;i++); 1* A little delay to let receiver get there first -I
for 1i=11 i (argcl i++){
strcpylfi lename, argv[iJ);
send 0;

{

i nt byt e, endct I
char *charph'j

}

putsC"RECEIVINB -- ") I
for Icharptr=fi lename; i) {

byte_inlbyte_out lEOn) I

1* filling in file narne *1

Micro Cornucopia, Number 27, December-January 1986

1* T-t-t-that's all, f-f-f-folks!! -I

)

21

Dr. Dobb's C Tools On Disk
To complement The Toolbook Dr. Dobb's also qlfers the following
programs on diskfor only $19.95 each. Full source code is included and, except where indicated, both
CP/M and MS or PC DOS versions are available.

Small·C Compiler (Item 007)
Jim Hendrix's Small-C Compiler is the most popular piece of software published in Dr. Dobb's lO-year history.
Like a home study course in compiler design, the Small-C Compiler and The Small-C Handbook provide all
you need to learn how compilers are constructed, as well as teaching the C language at its most fundamental level. The Small-C Handbook provides documentation for both versions; however, an addendum is recommended
in addition to The Handbook for MS or PC DOS-specific documentation. The addendum is available for $4.95.
(ltemOOB)
Small Tools: Programs for Text Processing (Item 009)
This package consists of programs designed to perform specific functions on text files, including; editing;
formatting; sorting; merging, listing; printing; searching; changing; transliterating; copying and concatenating;
encrypting and decrypting; replacing spaces with tabs and tabs with spaces; counting characters, words, or lines;
and selecting printer fonts. This package includes only source code. Docum.entation available for $9.95. (Item DID)
Small·Mac: An Assembler for Small·C (Item OIl)
Small-Mac is a macro assembler designed to stress simplicity, portability, adaptability, and educational value.
The package features simplified macro facility, C-language expression operators, descriptive error messages,
object file visibility, and an externally defined machine instruction table. Included programs are: macro
assembler, linkage editor, load-and-go loader, library manager, CPU configuration utility, and dump relocatable
files. This program is available for CP/M systems only. Documentation available for $9.95. (Item 012)

To order by credit card, call toll free; 1-800-528-6050 ext. 4001. Refer to the number of each product or send this
order to: Dr. Dobb's Journal, 2464 Embarcadero Way, Palo Alto, CA 94303
C Books
Disks

Manuals

For CP/M system disks only, please specify one
of the following formats:

$29.95
$17.95

Dr. Dobb's Toolbook
Small-C Handbook

o Kaypro

Check Format
CP/M I MS or PC DOS
$19.95
Small-C Compiler
I
$19.95
Small Tools
I
'$19.95
Small Mac (for CP/M onlv)
Small-C Compiler MS or PC DOS addendum to

App!e 0 Osborne 0 Zenith Z-1 00 DS/DD
Inquire about other formats.

PAYMENT MUST ACCOMPANY YOUR ORDER.
_ Check Enclosed
_ Please charge my 0 VISA 0 M/C 0 Amer. Exp.

Jr~~d~sn;'u~I~-c2u~:~~~~?o~ b~~~:v!~~!~all-C Handbook 1$

4.95
1$ 9.95
Small Tools
Small Mac
1$ 9.95
Subtotal
Tax _ _ _ %
California residents add applicable sales tax
Add $1.75 per item for shipping in U.S., $4.25 outside U.S. Shipping
TOTAL

0

o 8" SS/SD

Card # _ _ _ _ _ _ _ _ _ _ _ Exp. _ _ _ __
Signature _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
_ _ __

_ _ __
_ _ __
_ _ __

Name _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _- - - Address -:---:---:-:---:-_ _ _ _ _ _ _ _ _ _ _ __
(Please use street address)
City _ _ _ _ _ _ _ _ _ _ State _ _ Zip _ __
4008·

Inside The Slllall C COlllpiler
By F .A. ScacchiHi
Small C has been bouncing around
the public domain community for
several years now. It has been the root
of many of the commercial Cs, and
there's no doubt that the public domain has been improved by its presence. This is truly a cook's tour of a
very famous compiler.
Any programmer can tell you compilers are a mystery fit for the
talents of a Holmes, a Wolfe, or a
Marlowe.
A programmer might wonder why
the minimum program size is 12K or
where the stack is located. If he's
lucky, his questions regarding compiler operation are answered in the
documentation. If he's not, he might
wonder why he became a programmer.
In order to clear up some of the
mystery of Small C, I'll discuss the
steps which occur between the start of
compilation through the production of
the COM file. In the process we'll
move from CP/M into the program
and back to CP/M, outlining the sequences a compiler takes to translate a
source file of ASCII text into something a processor will understand.
I hope this discussion of my version
of the Small C compiler will be helpful, and you can use this general
information for your specific application. (Small C is available in the public
domain for the 8080, 8088, and the
OSI-32.)
C Function Library
One of the most important components of the C compiler is the C
function library and its runtime modules - CUB.REL and the module
ULINK.REL. Its structure and contents
determine how the program will move
from the CP/M environment, through
the program activities, and back to CP/
M.
Let's assume we're dealing with a
source file called SOURCE.C. The distribution disks (Micro C K35 and K36)
contain information on running the
compiler and on instruction syntax.
The disks also include example programs and submit files for producing
.MAC, .REL, or .COM files.
(Editor's note: Disks K7 & K8 con-

25 Glenview Lane
Rochester NY 14604

tain a version of the Small C compiler
whose output can be assembled with
the ASM assembler. If you can't afford
MicroSoft's M80, then this is a good
option, but the assembly times are
longer and the resulting programs are
larger. The version of Small C on K35
and K36 is much nicer to use and is
the one discussed in this article. The
8088 and OSI-32 versions should be
very similar.)

Listing 1 - Sample Mixed Program
;/.

; •• test.c

Test C Program

,•••
,•••
,•••

Written in Small-C
Version 2.10 or later

,•••
;./

JHP CC1
;

;char data[10], dummy;
DATA::
DS 10
DUHMI::

What The Compiler Does
The CP/M version of the Small C
compiler produces an output file of
8080 assembly language mnemonics
formatted for use with MicroSoft's
M80 Macro Assembler.
The first statement generated by the
compiler is JMP CC1 followed by static
variable defines (OW, DB, OS). Next
comes the program code which starts
at label CC1: and continues until all
code is generated. After the program
code, external defines are generated
for calls not found within the program. If the program contains a
mainO, UUNK is declared as an external define and the variable ZZZCCP is
generated. Listing 1 shows a mixed
listing output example of the compiler.
Compilation creates a .MAC file.
This file is then assembled with M80
to produce a .REL file. The .REL file
contains a table of undefined externals
which will have to be satisfied by the
loader for proper operation.
Finally, SOURCE.REL is loaded
using L80, and the CUB.REL library is
searched for modules to satisfy the
external defines. As they're found the
code is added to the "almost .COM
file" and the entry addresses established. If any entry point isn't satisfied, LBO displays the error. Since LBO
searches only once and in the forward
direction, the library must be constructed with all modules forward referencing. Check LIB80, the Small C
DOC files, and the LBO manuals for
more details.
Neither the compiler nor M80 produces any module with a program
starting point recognized by LBO. The
only module in the library that has
one is ULINK. If the C source file

Micro Cornucopia, Number 27, December-January 1986

DS
;int counter, sum;
COUNTER::
DS 2
SUM::

DS

2

;

;ma1n(argc,argv) int argc, argv[]; {
CC1:
MAIN::
counter = 1000;
LXI H,1000
SHLD COUNTER
sum = counter • 10;
LHLD COUNTER
ICHG; ;
LXI H,10
CALL CCHUL Til
SHLD SUM
printt(ftTbis is a test program\n-);
LXI H,CC2+O
PUSH H
MYI A,1
CALL PRINTF
POP B
delay( 100) ;
LXIH,100
PUSH H
MYI A,1
CALL DELAY
POP B
puts(ftlt doesnt do much at all\n-);
LXI H,CC2+24
PUSH H
MYI A,1
CALL' PUTS
POP B

CC2:

RET
DB 84,104,105,115,32,105,115
DB 32,97,32,116,101,115,116
DB 32,112,114,111,103,114
DB 97,109,13,0,73,116,32,100
DB 111,101,115,110,116,32,100
DB 111,32,109,117,99,104,32,97
DB 116,32,97,108,108,13,0
EXTRN PRINTF
EXTRN PUTS
EXTRN DELAY
EXTRN ULINK
ZZZCCP:: DB 0
END

End of Listing
(continued next page)

23

INSIDE THE SMALL C COMPILER
(continued from page 23)

Listing 2 - Source for the Module ULINK

ul1nk
Small-C

contains a mainO function, DUNK will
automatically be defined as an external
entry point and loaded by L80 when
searching the CUB.REL library. This
forces L80 to generate a jump to the
start of the DUNK module as its first
three bytes of code. DUNK defines
three additional externals, MAIN,
ZZBDF, and ZZZCCP.
The Three Externals
MAIN (entry point for the compiled
program) is CALLed after DUNK performs all the preliminary operations.
ZZBDF is physically and logically the
last module in the library (therefore
always loaded last), and consists simply of a NOP instruction that marks
the beginning of memory storage outside of the program. ZZZCCP is a byte
generated by the compiler and used to
determine both the stack placement
and return path to CP/M.
If ZZZCCP is true, the stack moves
to the base of the CCP and returns to
CP /M via a RET instruction (having
left the CCP intact). This allows for
much faster operation of programs at a
cost of 800 bytes of stack space. If
ZZZCCP is false, the stack moves to
the base of the BDOS, the return is
performed via a JMP 0, and CP/M is
warm booted. Dse the -n switch during compilation to make ZZZCCP true.
Listing #2 is the commented source
for the module DUNK. It provides the
details of program entry, CP/M environment retension, buffer establishment, argument passing, link to user
code, and return to CP/M.
Compiled, DUNK is less than 256
bytes so COM files can be quite small.
If redirectable 110 were added the
minimum file size would increase by
as much as SK.
What ZZBUF Does
Although small, the variable ZZBDF
serves an important purpose. It's the
last module in the library, and is
always loaded last. It's always loaded
if DUNK is loaded (remember DUNK
defines ZZBDF as external) and marks
the physical end of the program file.
DUNK uses this point to set up a new

System Library

Version 1.0

by
Fred A. Scacchitti
25 Glenview Lane
Roch., NY 14609
11 - 24 - 84
This module is a derivative of RUNTIME.HAC by Glen Fisher
and Bill Randle. It contains a minimal implementation of
CP/M hooks to allow proper linking of Small-C programs
compiled by Version 2.08 (and later) of the Small-C compiler.
This module contains the following routines:
-ULINK entry point just like J. E. Hendrix Verso 2.1
-Initialization of stack, memory buffers, and argument
passing (argy, argc).
call to main()
links to main in user program
-Cleans house and returns to CP/M

Now then here's the starting code

1st - Save CPM's stack pointer, establish file i/o constructs set
new detault bufter and establish start ot available memory.
2nd - Get the default disk and ~et stack at base of BDOS or CCP
depending on the status ZZZCCP. 0 = bdos 1 = ccp'
3rd - Parse the CPH input line and modify it so that we can pass
the C program in the argc, argy form that it expects.
HL = pointer to next argy entry
DE = pointer to next character in command line
B· = number of characters left in line
C = argument count (argc)
4th - Call HAIN to commence operation of the user program
5th - Work, work, work and then return to here via exit(), abort()
or normal return from program.
6th - Close any open f11es (buffers are not flushed)
7th - Restore ,CP/M's stack pointer, select the disk you entered
with, reset the default buffer and return to CP/M either
via a JMP 0 (ZZZCCP = 0) or RET (ZZZCCP = 1).
j
CBDOS
CPKARG
HAXARG
STDIN
STDOUT
STDERR
STDLST
CBDOS
CLOSE
j
FCBSIZE
BUFFER
UNGOT
FLAG
FREEFLG
BUFSIZ
NBUFS
TBUFSZ

EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU

5
128
211
0
1
2

EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU

36
6
5
33
128
1024
8
128

j/. bdos entry point ./
j/. CP/M command line ./
j/. Maximum number of input args ./

"

5
16
jsize, in bytes, of an FCB
joffset to disk sector buf. in I/O struct.
joffset to char ungotten by ungetc()
jflle-type nag byte (in unused part of FCB)
jThis I/O structure is available
jhov long the sector buffer is
jnumber of I/O buffers
jsize of default disk buffer

j

(continued on page 27)

24

EXTRN

HAlH, ZZBUF, ZZZCCP

Micro Cornucopia, Number 27, December-January 1986

;

OLIHlt: :

LXI
DAD
SBLD

MYI
LXI
CALL

H,O
SP
ZZSTAI

HOV
MYI

H,A
L,O

LDA
ORA
JZ
HOV
SUI
HOV

ZZZCCP
A
SETSTK
A,H
8
H,A

get CPH's stack pointer
save it tor later

C,26
D,ZZBOP
CBDOS

Set the detaul t bufter out there

;

; save page in HL
; where do we put the stack
let's check
just below the BOOS
just below the CCP

;

SETSTI:

SETIO:
MYI
LXI
LXI

MYI
SETI02: HOV
DAD
DCR
JNZ
SBLD

B,NBOPS
H,ZZBOP+TBOPSZ+FLAG
D,FCBSIZE+BOPFER+BOPSIZ
A,FREEFLG
H,A
;set all butters to tree
D
jon to next butter
B

SETI02

j1t there is one •••
jput it where it belongs

ZZHEH

MYI
LXI

LXI

bo

~

y
y

LDAX
HOV

~

NXTSP:

y
y

LXI

Prepare to scan for open files
B,NBOPS
C,CLOSE
H,ZZBOP+TBOPSZ+FLAG
D,FCBSIZE+BOPFER+BOPSIZ

SCABEH:
HOV
CPI
JZ
PUSH
PUSH
PUSH
LXI

DAD
ICHG

A,H
FREEFLG
NO PEN
B
D
H
D,-FLAG
D

POP
POP
POP

CBDOS
H
D
B

DAD
DCR
JNZ

D
B
SCAHEH

MYI
CALL

C,26
D,80H
CBDOS

LBLD

ZZSTAI

CALL

NOPEI:

LXI

SPBL
LDA
ORA
RBZ

Get tree nag
Is it tree ?
Yes - not open, go get next
No - prepare to close

DB -> Start ot FCB
Close the tile
Restore scan setup

NXTCB:

j Load stack pointer

INX

DCR
JH
LDAX
CPI
JNZ
MYI
STU
JHP
EHDWRD: MYI
STAX
ERDCHD: MYI
PUSH

D,CPHARG
D
B,A
D
B
EHDCHD
D

' ,

j
SVAHG:

0

HOV
INI

this way .to CCP

' ,

CALL
JHP
HOV

INR

this way

to

warm boot

LDA
HOY
DCR
MYI
CALL
MYI
CALL
INR
STA

ZZDFLT
E,A
E
C,llI
CBDOS
C,25
CBDOS
A
ZZDFU

save it

LDA

CBOOS+2

get base of BOOS

Grab orig. logged-in disk
(cvt. back to
and log it in
(mod to cbdos
get logged-in

O-n)
again
(fas»
disk

Micro Cornucopia, Number 27, December-January 1986

END

Look tor start of next arg
Zero B (BC now is 16 bit argo)
First arg to main procedure
Point to argv array
Second argument to main procedure
Load up the argument count
Tranater

HAIN

to

the C world ••••

Save pointer to start ot string

H,E
H
H,D
H
C

j Increment argo

DB

,e, ,0

DS

MAIARoe2

DB

0

detaul t disk

DW

0

CP/H's stack

DW

0

useable memory pointer

DW

0

available to anyone

RET

PGH:
j
ABGY:
j
ZZDFLT: :
j
ZZSTAI: :
j
ZZMEH: :
j
ZZTEHP: :

Point to next character
Decrement charaoter count
End ot cmd line, but need to end arg
Load next oharaoter in line
Space?
Nope ••• keep looking
Yes, replace it with a zero byte

D
B
ENDWRD
D

PUSH
MYI

LXI

How do we get back ?

or

j Pointer to CPH arg line
Load , character in line
Save it in B
POint to next character
Decrement character count
End ot cmd line
Load next character in line
Space?
Yes ••• continue searching
Nope, save starting point ot this ar

NXTSP
SVABG

NXTCH
A,O
D
NITSP
A,O
D
B,O
B
H,AHOV
H
A,2

INI

ZZZCCP
A

D,PGH; Pointer to 'pgzm&.llle' string
SVAHG
j Save next argument

Loop looking tor e1 ther end of line ot a spac.

Point to next nag
Last one?
No. - keep scanning until done

Reaet the cietaul t butter

INI

DCR
JH
LDAX
CPI
JZ
CALL

j
EXIT::
LXI

lnit argo
POinter to tirst entry ot argv array

Ok, now tor the real stuft. Set DE pair to point to
CPH command line and start searching tor arguments

away [sic]
my

MYI
MYI

C,O
H,AHGY

CPH does not tell us what the tirst word of the command
line was (the name ot pgm), 80 we take it by pointing it
to an ascii string with' e, in i t
CALL

anchors

j set stack pointer

SPBL

OLINK

25

NEW LOWER PRICES!

NEW LOWER PRICES!

NEW LOWER PRICES!

"BIG BOARD II"
4 MHz Z80·A SINGLE BOARD COMPUTER WITH "SASI"
HARD·DISK INTERFACE

$145 PC BOARD WITH 16 PARTS

$545 ASSEMBLED & TESTED
Jim Ferguson, the designer of the "Big Board" distributed by Digital
Research Computers, has produced a stunning new computer that
Cal-Tex Computers has been shipping for a year. Called "Big Board II", it
has the following features:

.4 MHz Z80-A CPU and Peripheral Chips
The new Ferguson computer runs at 4 MHz. Its Monitor code is lean, uses Mode 2
interrupts. and makes good use of the Z80-A DMA chip.

• 64K Dynamic RAM + 4K Static CRT RAM +
24K E(E)PROM or Static RAM
"Big Board II" has three memory banks. The first memory bank has eight 4164 DRAMs
that provide 60K of user space and 4K of monitor space. The second memory bank has
two 2Kx8 SRAMs for the memory-mapped CRT display and space for six 2732As. 2Kx8
static RAMs, or pin-compatible EEPROMS. The third memory bank is for RAM or ROM
added to the board via the STD bus. Whether bought as a bare board
or
assembled and tested, it comes with a 2732 EPROM containing Russell Smith's superb
Monitor.

• Multiple-Density Controller for
SS/DS Floppy Disks
The new Cal-Tex single-board computer has a multiple-density disk controller. It can
use 1793 or 8877 controller chips since it generates the side signal with TTL parts. The
board has two connectors for disk signals, one with 34 pins for 5.25" drives, the other
with 50 pins for 8" drives.

• Vastly Improved CRT Display
The new Ferguson SBC uses a 6845 CRT controller and SMC 8002 video attributes
controller to produce a display rivaling the display of quality terminals. There are three
display modes: Character, block-graphics, and line-graphics. The board emulates an
ADM-31 with 24 lines of 80 characters formed by a 7x9 dot matrix.

• STD Bus

SIZE: 8.75" x 15.5"
POWER: +5V @ 3A, +-12V @ O.1A
• "SASI" Interface for Winchester Disks
Our "Big Board II" implements the Host portion of the "Shugart Associates Systems
Interface." Adding a Winchester disk drive is no harder than attaching a floppy-disk
drive. A user simply 1) runs a fifty-conductor ribbon cable from a header on the board to
a Xebec controller that costs only $295 and implements the controller portion of the
SASI interface, 2) cables the controller to a Seagate Technology ST-S06 hard disk or
one compatible with it. and 3) provides power for the controller-card and drive. Since
our CBIOS contains code for communicating with hard-disks, that's all a user has to do
to add a Winchester to a system!

• Two Synchronous/Asynchronous Serial Ports
With a Z80-A SIOIO and a Z80-A CTC as a baud-rate generator, the new Ferguson
computer has two full RS232-C ports. It autobauds on both.

• A Parallel Keyboard Port + Four Other Parallel
Ports for User I/O
The new Cal-Tex single-board computer has one parallel port for an ASCII keyboard
and four others for user-defined 1/0.

• Two Z80-A CTCs

=Eight Programmable Counters/Timers

The new Ferguson computer has two Z80-A CTCs. One is used to clock data into and
out of the Z80-A SIOIO, while the other is for systems and applications use.

• PROM Programming Circuitry
The new Cal-Tex SBC has circuitry for programming 2716s, 2732(A)s. or pincompatible EEPROMs.

• CP/M 2.2**
CPIM with Russell Smith's CBIOS for the new Cal-Tex computer is available for $150.
The CBIOS is available separately for $25.

The new Ferguson computer has an STD Bus port for easy system expansion .

• DMA
The new Ferguson computer has a Z80-A DMA chip that will allow byte-wise data
transfers at 500 KBytes per second and bit-serial transfers via the Z80-A SID at 880 Kbits
per second with minimal processer overhead. When a hard-disc subsystem is added,
the DMA chip makes impressive disk performance possible.

CAL·TEX
COMPUTERS, INC.
12788 HWY. 9 • BOULDER CREEK, CA 95006 • (408) 338-2572
26

"CP/M is

a registered trademark of Digital Research.

Terms: Orders paid for with a cashier's check or bank card will be shipped within three
working days. Orders paid for with a personal check will be shipped within three weeks.
Add $5 for packing & shipping in North America.

Micro Cornucopia, Number 27, December-January 1986

INSIDE THE SMALL C COMPILER _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
(can tinued from page 24)

FCB 12
36 bytes
File Construot
6 bytes
File Buffer 12 1024 bytes

Figure 7 - Memory Map

Address

Code

.

100

JHP

103

User program - Statio Variable Storage
followed by
User program oode
followed by

OLINK:

FCB #8
36 bytes
File Construot
6 bytes
File Buffer 18 1024 bytes
Allooatable Memory

ULINK:

followed by
Library Modules
ending with ZZZBUF
ZZZBUF: marks the physioal end of program

D400

CCP
Staok at base of CCP if ZZZCCP

Dc06

BDOS
Staok at base of BDOS if ZZZCCP

128 byte new CPM default buffer

EA03

BIOS

FCB 11
36 bytes
File Construot
6 bytes
File Buffer #1 1024 bytes

FOOO

Monitor

FFFF

End of Memory

What follows is generated by the runtime module
and exists outside of program oode

default CP/M file buffer. (We want to
preserve the original which may contain arguments passed to the program.)
The new default buffer is followed
by eight 1K file buffers along with
their FCBs and table info. Since none
of this is set up until runtime, the
program doesn't contain a lot of excess
buffer space, which not only occupies
valuable disk space, but also increases
program loading time. I chose the
number of file buffers and their size to
suit my needs.
Following the file buffers lies a
pointer used by the dynamic memory
allocation/deallocation functions - callocO, mallocO, freeO, cfreeO. The

scheme employed for memory management must be handled with extreme caution. As blocks of memory
are allocated, stack collision is
checked, and if safe, a pointer is
placed at the end of the block. When a
block is deallocated, its memory (and
all memory above it) is returned to the
system.
A word of caution: be sure to use a
first in last out scheme with these
functions. A more sophisticated
scheme could track all allocated and
free memory, but usually at a significant code overhead.
The Memory Map (Figure 1) depicts
how a typical C program would go
together for a Xerox 820-11. Actual

CP/EMTM
CP /MTM 80 Emulation for MS-DOSTM
• Z80 Emulation
• CP/M Version 2.2 Compatible

~I

=1

=0

addresses for CCP, BDOS, BIOS, and
Monitor vary with different systems.
One final comment: if you are compiling a function which doesn't contain a mainO, none of the runtime
code or variables are defined, and no
external buffers are established.

Editor's note: If you're interested in learning more about the insides of Small C (or
are interested in creating your own compiler) check out "The Small-C Handbook"
by James E. Hendrix (we had trouble
finding copies because it's almost out of
print). It's clearly written and fun to read
as well as a real education.

•••

th}\ccelerator™
Advanced CPU for the IBM PC

• Accelerator Compatible
• Extended Instruction Set

• Serial Program Utilities Included

• 8 Bit and 16 Bit Bus Versions
Available

• FAST-Written in Assembly Language

$79.95
Intelligent

The Intelligent Computer Users Group
P.O. Box 10118. Rochester, NY 14610

users

*5 MHZ for the IBM PC

(716) 425-2519

computer
group

$49.95*

IBM is a trademark of International Business Machines.
MS-DOS is a trademark of Microsoft Corporation.
CP / M is a trademark of Digital Research Incorporated.

Micro Cornucopia, Number 27, December-January 1986

Dealer inquiries welcome.

27

NEW I

J.B. FERGUSON, INC.

•

817-640-0207

NEW I
•

ONE MEGABYTE RAM DISK FOR 820-1 &. BIGBOARD-l
• THIS IS THE FASTEST RAM DISK THAT YOU CAN BUY
This product comes with complete machi ne• EASY INSTALLATION WITHOUT ETCH CUTS, CABLES, ETC.
drawn schematics, and a full theory of op.
• USES NONE OF YOUR PRECIOUS I/O OR THE CPU SOCKET
Assembl y, installation and test procedures are
• THIS RAM UPGRADE WORKS BEYOND 4 Mhz.
thoroughl y documented. PAL code is i ncl uded,
• ADDS ONLY 1/2 I NCH TO THE OVERALL HEIGHT OF THE BOARD
and extra PALs are available. A PAL is shi pped
• CONVENIENT PLUG-IN DESIGN
with each system. RAM disk software is i ncl• ALL 1 MILLION BYTES ARE MEMORY-MAPPED
uded with source on disk. Please specify 5 or 8
• COMPATI BLE WITH SWP DOUBLE DENSITY
inch disk, and 820-1 or BIGBOARD-1.
• SUPPORTED BY MICROCode CONSULTING PLUS2 ROM SET
P.C. boa rd, i nte rco nnect ha rdwa re, doc'u me ntati 0 n, PA Land softwa re ........................................................... $ 75.00
Kit w/o RAM (all TTL, Bypass capacitors,sockets, plus all of above) ............................................................. 125.00
SPECIAL!! I 150 nS 256K dynamic RAMs when ordered with the kit ............................................................ ea 3.25
....
...;
00

.

.. .

.....---------------.

CLOSEOUT

~~

820-2 B SIZE SCHEM AT ICS, ETCH 1 OR ETCH 2 ............ $15.00
820-1 B SIZE SCHEMATICS ......................................... 15.00
820 RESET SW ITCH...................................................... 3.00
820 VIDEO CABLE ,CONNECTS 820 TO SEP AR ATE-SYNC
MON IT OR ,W /PROV IS IONS FOR BR IGHTNESS POT ......... 10.00
820 CBIOS AND ROM SOURCE, 5t" OR 8" DiSK ........... 35.00
820 5
DUAL DRIVE DISK CABLE W/POWER CONN..... 20.00 These computer boards have all the
820 NINE PIN POWER CONNECTOR (PLUGS INTO 820)..... 4.00 TTL, capaci tors, resi stors, connec820 NINE PIN PC CONNECTOR (SOLDERS ONTO 820)....... 4.00 tors,
peri pheral devi ces, and the
820-2 FLOPPY DISK CONTROLLER SCHEMATiC ............... 10.00
generator_
Only the CPU,
CP/M PRIMER (XEROX CP/M HANDBOOK) ...................... 7.50 .baud
. . .rate
.. ~
. . . . .II
XEROX WORDST AR HANDBOOK ........................................ 4.50 the ROMs and the di sic contro II er is

820 -1 ................. $ 45 .00
820-2 . . . . . . . . . . . . . . . . . 45.00

t"

zao

not i ncl uded_ Schemat i cs i ncl uded_

ASTEC POWER SUPPLIES
These poyer supplies are ne.., 65 WATT off-line
syitchers_ Four independent outputs rated at:
+ 5v 6A6 + 1 2Y 1 -2A6 + 1 2Y 2_ 1A6 - 1 2Y _25A

I1mc::::ll fl

INDUSTRIAL CONTROLLER
designed to be a building block for Z80
SIZE: 7 _7-W X 2_0-H X 4_2-D
based control s~stems.
This supply yill comfortably poyer an 820 y/
2_5. 4. -or- 6 Mhz
CRT _ leeuboard _ & dual 5- floppies_
BIGBOARD-1 style 510 with current loop option
4J.
.00
DUAL BIGBOARD-1 STYLE PIO (32 BITS)
~
CTC and "rI ATCHDOG TIMER
~~~~~~~~~~~~~~~~~~~~SUPPORTSMODE2 INTERRUPTS ON ALL I/O
2300 PLATED-THRU-HOLE PROTOTYPING AREA
82 0-1 COMPOSITE VIDEO ADAPTER 16K
M IX OF R AM6 ROM -or- EEPROM
Assembled and tested_ Pl ug-i n design_ Produces
BARE BOARD & DOC ____________________________ $75_00
very high-quality video_ RCA phono jacle output_ ROM MONITOR A-ND SOURCE________________ 35_00
A & T 4MHz ____________________________________ 250_00
This board

NEW

35

••

J_B_ Ferguson, Inc_
P _0_ Box 300085
Arlington,Texas 76010
(817) 640-0207

28

'VI as

I I

TERMS: MasterCard/VISA, money order certi fi ed c hec Ie, UPS cas h CO D_ All o'tt' 2 'tt'e~ les
for personal or company checles to clear _ Add
$5 for shi ppi ng/handli ng_ Texas add 5_125~
state sal es tax ~
Micro Cornucopia, Number 27, December-January 1986

The Xerox 820 Colullln
By Mitchell Mlinar

Figure 1 - Connecting the Signal Set to COMM and PRINTER

Signal

The ZBO SID is smarter than the
ZBO, and in many ways it's more
difficult to deal with. In this issue
Mitch programs the SID to send and
receive just about any type of asynchronous character ever devised. Next
issue Mitch looks at the BOBB-based
PC clones that Xerox has begun
unloading.
Xerox has been very quiet lately.
The only interesting thing I've heard
since the last column is that Xerox has
expanded its support of 16-bit machines; there are several IBM clones
that now offer full Xerox Americare
service.
Service contracts on computer equipment are offered on all systems sold
by Xerox and many that are not. My
RQP/M (an 820-1) has suffered through
some troubled hardware times with its
8" disk drives. I had them in Xerox
service a few times, but neither Xerox
nor I could find the problem. Finally, a
replacement logic board did the trick.
Considering what it could have cost
me without the service contract, and
the excellent turn-around (within 48
hours every time), I did not hesitate to
renew my contract.
Z80-SIO
In previous segments, I examined
the Z80 interrupt mechanism and CTC
chip. This time, I will plunge into the
most complicated support chip of the
set - the Z80 SIO.
The SIO (Serial Input/Output) chip
is a two-channel peripheral which is
almost too versatile; the manual for
this chip is a mere 48 pages long. Not
only does the SIO support "simple"
asynchronous communication, it also
handles synchronous protocols such as
the IBM bi-synchronous mode, HDLC,
and IBM SDLC. (If you are versed in
the last three terms, skip the rest of
the article as you know more than I
do.)
Most serial communication is asynchronous, although a notable exception are the packet radio users who
employ HDLC. (I would encourage
anyone who uses the 820 in packet
radio to write an article about it.) I will
only discuss asynchronous in this column.

zeo

Name

Direotion

Transmit
Receive
Clear-to-send
Request-to-send
Data-TerminalHeady
Data-CarrlerDeteot
Ground

Tx
Rx

CTS
RTS
DTR
DCD
GND

Pln Number tor Port
COHK
PRINTER

Output
Input
Input
Output
Output

20

3
2
4
5
8

Input

8

20

7

7

2
3
5
4

Figure 2 - Three Write Registers

Blt 7 6
o 1 7-blt Hz:
1 1 B-blt Hz:
Blt 7 6

o1

x16 clock

Wrlte Register 3 (Hecelve)
54321 0
x set to 1 tor
0 0 0 0 1
auto-enables
Wrlte Register 4 (Mode)
5 4
3 2
o 0 0 1 1-stop bit
1 1 2-stop bits

1 0
DO parity
odd parl ty
1 1 even parl ty

x

0

o1

Wri te Register 5 (Transll1 t)
6 5
432 1
x set to 1 to
o 1 7-blt Tx 0 1 0 x set to 1 to
enable DTR
1 1 B-bit Tx
enable RTS

Blt 7

The architecture of the SIO offers a
nearly full asynchronous signal set
(often called Modem control) which
are connected to the COMM (port A of
the SIO) and PRINTER (port B) as
shown in Figure 1.
DTE Vs. DeE

The COMMunications port is configured for DTE (Data Terminal Equipment) whereas the PRINTER port is
configured as DCE (Data Communications Equipment). Notice the duality
between the pins (2-3, 4-5, 8-20),
which is why a straight-through cable
to your modem (which is DCE) works
fine from your COMM port but not
from your PRINTER port. DTE must
always connect to DCE (unless you
swap wires in the cable). It is possible
to change jumpers on the 820 board to
make the COMM port DCE (the
PRINTER port is fixed).
Part of the Z80's task upon powerup in the 820 is to initialize the serial
port's baud rate, frame type, and
mode. It is not complicated, merely
confusing.
BAUD RATE - the speed of transfer
in PBS (Bits-Per-Second) ranging from
110 to 19200. The baud rate is determined by a clock signal supplied by
the COM 8116 chip; I'll cover that
later.
FRAME TYPE - bit width (5-8), stop
bit (1, 1.5, or 2), and parity (none,
even, odd). Nearly all applications use
either 7- or 8-bit transfer, 1 stop bit,

Micro Cornucopia, Number 27, December-January 1986

o
o

and no or odd parity. Two types used
on the the Xerox are:
8-bit l-stop no-parity - nearly always used with modems (COMM). 7bit l-stop odd-parity - Diablo printer
default (PRINTER).
MODE - the clock slice rate, set to
x16 for all asynchronous applications.
Programming the Z80 SIO can be
confusing as there are (gulp!) ten
separate control registers inside the
chip (3 input, 7 output) done through
two ports. However, only a few need
concern us. Z80 programming ports
(in decimal) are as follows:
COHH

Data
Control

4
6

Baud

0

PRINTBll
5

7
12

By now, you might be wondering
how 10 registers can be accessed using
a single control port (I did). The SIO
sneaks around this by requiring 2bytes to program each register: the
first is the register number, and the
second the programming byte. After
the second byte is sent, register 0 is
automatically selected. (Hence, ye be
properly warn'd to Disable Interrupts
while initializing the SIO.) To change
the mode and frame type you must
write to three registers (a 6-byte transfer to the SIO control port). These
registers are partially described in Figure 2 with bit 7 the high bit (or MSB)
and bit 0 the low bit (or LSB).
. (continued next page)

29

XEROX 820 COLUMN _ __
(continued from page 29)

Figure 3 - Programming the COMM and PRINTER Ports

See, I said it was confusing! For
example, you may notice that it is
possible to set different bit widths for
transmit and receive. In a word,
DON'T! Two items need further explanation:
PARITY - the number of Is (or Os)
in the byte. Even parity, for instance,
means that the total number of Is in
the character (plus parity) will be
even. If the character contains an odd
number of Is then the parity bit is set
to 1 (to make the total even). If the
character contains an even number of
Is then the parity bit is set to O. If an
error changes one bit in a character
then the other end will detect the
problem. In an error changes two bits
then the problem won't be detected.
AUTO-ENABLE - a nice feature of
the SIO which is often ignored, but
can handle hardware handshake automatically. On transmit, the SIO checks
the CTS line and will not transmit the
character until CTS is true. Similarly,
the SIO will not accept any character
until DCD is also active. Thus, the

LITTLE BOARDTM/Plus
8 BIT

::I

ow

Byte ,

Description
Write register 5
8-bit Tx with DTR and RTS set
Write register"
x16 clock, 1-stop bit, no parity
Write register 3
8-bitRx

Value (hex/binary)
05 I 00000101
BA I 11101010
0_ I 00000100
4_ I 01000100
03 I 00000011
C1 I 11000001

1
2

3
4

5
6

PRINTER port (1): 1-bit 1-stop bit odd-parity
Byte ,

Description
Write register 5
7-bit Tx with DTR and RTS set
Write register II
x16 clock, 1-stop bit, odd parity
Write register 3
8-bit Rx auto-enables

Value (hex/binary)
05 I 00000101
I I I 10101010
04 I 00000100
115 I 01000101
03 I 00000011
61 I 01100001

1
2

3
4

5
6

usual (and simple) method of checking
xmit/recv buffer status can still be used
instead of having to check DCD and
CTS in software.
Figure 3 gives a quick example (or
two) which may help - namely pro. gramming the COMM and PRINTER
ports for the default configurations in
the Xerox 820. Each group of six bytes
is sent in succession to the designated
port.

THE LITTLE BOARD

I Z80A FOR CP/M 2.21
~
III
W

COMM port (6): 8-bit 1-stop bit no-parity

Next Time
As you can see, I ran out of room.
again, so I'll finish the SIO next time.
Looking ahead, I see several hardware/software projects for the 820 including a CHEAP parallel port EPROM
programmer (software will be free off
the RQP/M) and a hard disk adaptor.
If you have any suggestions for
columns, comments, gripes, or some
useful information, please write or call
the RQP/M at (213) 320-9309.

•••

™

liNTEL 80186 FOR PC-DOS]

NEW! TWO BOARDS TO CHOOSE FROM!
THIRD GENERATION SINGLE BOARD COMPUTERS!

LITTLE BOARD TM/186
16 BIT

a:
Z

COMMON FEATURES
OF BOTH BOARDS:

oQ.
::I

>

o

*

w
w
a:

*

Q.

U

I&..

~
z

MOUNTS DIRECTLY TO 5114 IN.
DISK DRIVE
DD FLOPPY CONTROLLER
ON BOARD

*
*

~

a:

;

*

c

.-w

*

:E
:::i

~
c

BY AMPRO!

g

FEATURES:

a:

* 4 MHZ Z80A CPU
* 64K RAM
* COMES WITH CP/M 2.2 DISKETTE + ZCPR3

::I

o
I&..
o

III

a:

* READS OR WRITES TO DOZENS OF POPULAR

~

* 2732 BOOT EPROM
* USE +5VDC @ .95A AND +12VDC SOMA
* WORKS WITH 40 OR 80 TRACK DRIVES
00

:E

.-ww
.-l:
.-.-o
u

5114 IN. FLOPPY FORMATS

$299

III

::I

III
III

TWO RS232 SERIAL PORTS
CENTRONICS PRINTER PORT
SCSI HARD DISK INTERFACE.
ASSEMBLED,TESTED,READY
TO USE

(A & T WITH CP M 2.2)

NOTE: BOTH OF THESE NEW
LITTLE BOARDS™ WORK FINE
WITH OUR POPULAR ZRT -80
TERMINAL BOARD KIT FOR

$89.95.
DISK DRIVE SPECIAL!
1/2 HT. DS-DD 40 TRACKS
PERFECT FOR LITTLE BOARD ™
$79.95 ea. FOR $139.00

2

FEATURES:

* 8 MHZ INTEL 80186 FOR TRUE 16 BIT
* 128K OR 512K RAM
* WILL BOOT STANDARD PC DOS
* 3 TIMES COMPUTING POWER OF A P.C.
* RUNS THOUSANDS OF "MS-DOS" GENERIC
*
*

*

PROGRAMS
COMES WITH MS-DOS COMPATIBLE ROMBIOS AND UTILITIES
PC-SUPPORT SOFTWARE AND SOURCE
AVAILABLE FOR $89.00
MULTI-LAYER PC BOARD FOR LOW NOISE

$419 00 (A&T,128K)$499 00 (A&T,512K)

~~----------------------------------------------r-----------------------------------------------"

~

Digital Research Computers

'"

(OF TEXAS)
P.O. BOX 381450 • DUNCANVILLE, TX 75138. (214) 225-2309
Z80 TM OF ZILOG.

30

TERMS: Shipments will be made approximately two weeks after we
receive your order. VISA, MC, cash accepted. We will accept COD's with
a $75 deposit. Balance UPS COD. Add $4.00 shipping.
USA AND CANADA ONLY

CP/M TM OF D.R.I. LITTLE BOARD TM OF AMPRO.

PC-DOS TM OF IBM.

MS-DOS TM OF MICROSOFT.

Micro Cornucopia, Number 27, December-January 1986

~-------~~-'~~=-F==-==""r-----,

AUTOMATIC
TIME/DATE

HiSpeed C Library
• A complete and accurate REFERENCE MANUAL for your
desktop. Matching library FUNCTIONS for Software
Toolworks C/80 in Microsoft M80/L80 REL format. Disk
SOURCE CODE to all functions and utilities. Works under
Digital Research CP/M 2.2.
• Develop portable applications using Bell Labs Unix V7
conventions. Designed from Kernighan & Ritchie, Harbison & Steele, Banahan & Rutter, Sidebottom & Wortman
and Donald Knuth's three-volume set.
• Settable dynamic buffers. Full stream 110. Transcendentals. Strings. Math. Searching & sorting. Timing.
Compact code (K&R HELLO. COM is 254 bytes). Up to
255 files. Direct-disk. Directory. Memory management.
High-speed seek. Fastest block reads. System access.
Speed and code size optimization. Automated compile,
assemble and link. Ideal incremental development.
• Useful C Utilities: Xref, Beauty, Calls, BoldList, Archive,
Portable Source Generator, Jump-on-error Monitor.
• Sample Programs: Learn or teach C style using source
code' from textbooks, scholarly periodicals and popular
magazines.
• No royalties. No copy protection. No limitations on
educational use. No extra charges.
• Reference Manual with library object code on disk •••••
$29.95
• Source code archives and utility sources on disk •••••••
$19.95

• Phone orders shipped immediatie or Can today
for free brochure.
Viking C Systems
2243 South Belaire Drive
Salt Lake City, UT 84109
1-801-466-6820/Grant

.3

--

-.-

STAMPING

--- ~~~
...
,........
~
OF FILES
WITH

-~

~.

•

•
•
•
••
•
•
••
•

•• ~•

(

",

.

by ./C.DCode

'.

ONE PACKAGE FOR ALL CP/M SYSTEMS!
100% compatible with CP/M7:7"and resides In same space
Uses your computer's hardware/software clock
10-15% faster disk read/write
User-selectable default drive/user area
Automatic disk re-!ogging
Full Access to ALL 31 user areas
Completely replaces BDOS and CCP
Efficient backup utility
ReqUires QBIOS or CP/M 2.x
9 new transient commands. 5 new system calls

A UTOMA TIC INSTALLA TION TO
ANY CPIM SYSTEM
QP/M is automatiCaii'Y written to your system tracks. using
QINSTALL and your SYSGEN program.

KayprolXeroxlBB-1 BIOS Available
MICROCode offers a custom BIOS for Kaypro and Xerox/Big
Board owners on a bootable QP/M disk.
COMPLETE QPIM PACKAGE with Documentation Includes
Sorted DIRectory program. Displays time/date,
system files. and .LBR directOries.
Copies and ver1fies only new or updated files
QBACKUP
Installs QP/M on system tracks.
QINSTALL
All PIP functions. plus copies files with current or
QPIP
eXisting time/date.
All STAT functions. plus shows or changes file
QSTAT
date(s), archive bit, and MORE.
Replaces SUBMIT and XSUB. Has nesting capability,
QSUB
internal command set (including conditionals),
embedded XSUB. and more.
Creates time/date initialization module (supports
TDCNFG
software clock. Z- Time or Optronlcs clock).
QBIOS: Available for the Kaypro, Xerox 820-11. Xerox 820-1 and
Big Board-I with Emerald Microware or SWP Dual DenSity (820IIBB-I). QP/M bootable disk will be shipped If QBIOS IS ordered
with QP/M. (No installation required!)
** *NEW PRODUCTS FROM MICROCODE***
KEYMAP: Not just another keyboard configuration program!
Written exclusively for the Xerox 820/820-11. FuIION-SCREEN
keyboard image while editing. Create your own function keys!
Multiple custom keyboards can be created. and any 2 can be
instantly toggled.

D

\ J.

vlkltK

~

/CJ~£.

OUTSTANDING PROGRAMS
For Your CP/M 2.2 System ...

~r1CO

$39.95

Bring the power of a mainframe spooler to your CP 1M 2.2
system. AutoSpool/80 features:
• Nearly unlimited storage capacity
• Multiple copies
• Printer controls, including pause for next page, resume print
from middle of job, and presettable configuration of pitch
and lines per inch.
• Smart file handling, including control of printing order, wild
cards in file names, and individual cancelling

$15.00

CHAIN2

At last! Run all your .COM files from menus, arranged any way
you like, nested to any level! No modifications to .COM files required. CHAIN2 chains to your .COM file, then causes it to
chain back to the menu when it exits. Menu program supplied.

$15.00

DUMPREL

Displays the contents of your .REL relocatable files. These files
are the output ()f many assemblers and compilers, used for
linking into .COM files.

$15.00

BANNER

SMARTROMS: Add 820-11 features to your 820-IIBlgBoard-1.
Provides real-time clock. screen dump. screen/program pause.
dumb terminal mode. reset with CTRLlESC. CRT blanking after
11 minutes of idle time. 7 or 8-bit keyboard mode. 820-11 (4.0x)
compatible vectors, and MUCH MORE! Replaces your socketed
ROMs (no soldering!).
PRICES
QP/M ....••......•...•.•..•.•..............••...........•....•••.••••..•.•......••....560.00
QBIOS FOR QP/M .........•....•........•..•.••....•.•.•...••.••..•.••.••..... 520.00
KEY MAP .•...••.••...................•.••.................•.•.......•.••..•..••....520.00
SMARTROM SET.......... (single density) ........................S30.00
For SWP ............. 540.00 ............ PLUS 2 (Emerald) •...••.•. 550.00

Prints your message sideways in big block letters. Variable size
characters. Requires no special printer. Composes characters
with a second message.

When orderin5:}. please specify your computer system and media
preference (8' IBM 3740 or any popular 5.25" format).

ALL OF THE ABOVE: $59.95 ~

Please add $3.00 shipping/handling (U.S. & Canada) for UPS
shipment. or S8.00 for foreign air mad. CA residents please add
local sales tax (6% or 6.5%), VISA and MasterCard are accepted
(add 3%). FREE information packet available upon request.

----~-

30-DAY MONEY BACK GUARANTEE \ ••••

ANAHEIM SOFTWARE
13814 Hawes St., Dept. M
Whittier, CA 90605
(714) 863-9044

!C!~:....

E':E

Un2i§~m2'
MasterCard

-----.;;;;---~~

Micro Cornucopia, Number 27, December-January 1986

(II

MICROCode Consulting
Department M5
VIS4'.
Box 9001
.
Torrance. CA 90508-9001
(213) MICROCD (24- hour recorder)
=

c

:

. ••

31

ATTENTION KAYPRO AND XEROX 820 OWNERS
EMERALD MICROWARE BRINGS YOU THE HARDWARE AND SOFTWARE THAT YOU NEED TO GET THE BEST
VERSATILITY AND EFFICIENCY FROM YOUR SINGLE BOARD MICROCOMPUTER, WITH GOOD PRICES AND SUPPORT.
X120 DOUBLE DENSITY CONTROLLER BOARD
Unsurpassed double density operation, designed for easy mounting on the Xerox 820-1 (or BBI). Uses the 2793 double density
disk controller.
• Runs any combination of 5 %" or 8" disk drives, up to four at
a time
• Standard 34 and 50 pin Shugart compatible disk drive connectors on board, as well as returning signals to connector on
main board
• On board circuitry handles clock and data separator switching
from drive select
• Composite video adaptor on X120 board
• 3 1/2" X 4 1/2" high quality, solder masked, double sided board
with manual and schematic
• Designed to work with XPRO or PLUS2 rom sets.
Bare board ...................................... $ 26.00
Board assembled and tested ....................... $120.00
Board with full kit ........................... , .... $ 95.00
WD2793 controller chip ............................ $ 24.00
Hard to find parts set ............................. $ 12.00
See below for board with rom packages
XPRO ROM SET by Micro Cornucopia
Turns your Xerox 820-1 into a Kaypro compatible with superior
speed and versatility.
• Runs 63K system for more available TPA
• Fast video and parallel keyboard drivers
• Auto-boot capability, boots from 8" or 5 %"
• Rom monitor functions with menu of options
• Centronics and serial printer drivers included, selectable using
10BYTE
• 98% software compatible with both Xerox 820 and Kaypro
• Automatically selects disk formats for:
Kaypro 11- 191K, SSDD, 48TPI, 5 %"
Kaypro 4 - 390K, DSDD, 48 TPI, 5 %"
Kaypro 8 - 784K, DSQD, 96 TPI, 5 %"
Xerox 820-1 - 82K, SSSD, 48TPI, 5 %"
IBM 3740 - 241K, SSSD, 8" (standard Xerox 8")
8"SSDD - 596K (same as BB II)
8" DSDD - 1.212M
• True double sided operation
• Can be operated with a terminal for cobsole device
• Includes disk format program, sysgens, CBIOS source, easy
install files, manual, and 2716 roms
• Works with X120 board for double density
XPRO Rom Set .................................. $ 49.95
PLUS2 ROM SET by MICROCode Consulting
Turns your Xerox 820-1 or BBI into Kaypro compatible with
superior speed and versatility.
• Boots from 820-1 disk or our advanced BIOS
• Bank selected for efficient use of program memory
• Automatically logs on to 8 and 5 %" disks
• Adds inverse and low intensity video capability
• Logical to physical drive mapping
• Has advanced error handling and recovery
• Includes real time clock using existing eTC
• Has Xerox rE>m monitor commands
• Supports multiple disk formats' with utility program'
• Includes disk format program, CBIOS source, utility programs,
manual, and 2716 roms
• Works with the X120 board for double density
PLUS2 Rom Set ................................. $ 49.95
Board and Rom Set Package Prices:
X120 Board A&T with rom set (specify) ............... $160.00
X120 Bare Board with rom set ...................... $ 72.00
X120 Full Kit with rom set ......................... $139.95
Call for other package prices
Include $3.00 for Shipping and Handling (under 2 pounds); $6.00
for COD; 3% for Bankcards. Add $3.00 for each disk drive or cabinet.
Phone hours - 8:30am to 5:00pm weekdays; 10:00pm to 7:00am by
modem (503-642-1860) seven days a week.

32

UNIFORM by Micro Solutions
The solution to the diskette incompatibility problem. This program allows files to be run or transferred back and forth between close to one hundred different computer formats, including
96 TPI-5 %", and 8" diskettes. Lists computers by name, with
no special technical knowledge required. Transfers between
CP/M, MS-DOS, PC-DOS, and TRS-DOS formats.
Versions available from stock for Kaypro, Xerox 820-11, Morrow
Micro Decision, Xerox 820-1 with XPRO rom set, IBM-PC.
Uniform ........................................ $ 64.95
QP/M by MICROCode Consulting
At last an inexpensive replacement for CP/M, with full CP/M
compatibility, and many enhancements. Includes 5 new system
calls, and 9 new transient c;:ommands including time/date stamping of files, backup utility, and menu driven configure program.
Runs on Z80 systems, in the same space as CP/M 2.2.
Available as bootable disk (does not require CP/M!) for the
Xerox 820-1, 820-11, or the Xerox 820-1 with XPRO rom set.
QP/M with BIOS for PLUS2 or XPRO rom ............ $ 64.95
QP/M with BIOS for Xerox 820-1 or 820-11 ............. $ 80.00
QP/M without BIOS (not bootable) ................... $ 60.00
SMART ROMS by MICROCode Consulting
Add many Xerox 820-2 features to your single density 820-1.
Real-time clock, screen dump, automatic crt blanking printer
routines. No soldering required .................... $ 30.00
SEMIDISK 2 MBYTE DISK EMULATOR by Semi Disk Systems
Tired of waiting? The Semi Disk ram based disk emulator board
is the single, most significant speed improvement that you can
make to your system. And it's BIG enough to get both your program AND your working files on the Semi Disk at the same time,
no waiting for one or the other to be accessed from a disk drive.
Print buffer software included. Low power consumption - picks
up its power directly from your system, with an optional battery
backup package available. Works on Xerox 820, Kaypro, or any
other Z80 based system.
2MB SemiDisk Board-assembled .................... $995.00
Optional battery backup unit ....................... $150.00
PANASONIC HALF HEIGHT DISK DRIVES
The finest new half height,S V4" disk drives - Fast, reliable, with
lower power consumption. Include $3.00 each for shipping
Panasonic JA551 - DSDD, 48 TPI ................... $ 99.00
Panasonic JA561 - DSQD, 96 TPI ................... $114.00
WD1002 HARD DISK CONTROLLER BOARD
Western Digital's popular 1002-05 controller board for 5%" hard
disks. Has the same profile as drive, and can be used with most
host boards (40 pin bus) ........................... $185.00
XEROX ACCESSORIES
Our stock changes frequently due to quantities and availability
of these items, please call to check stock and get shipping
charges before ordering.
Xerox 5 %" disk drive cable ........................ $ 12.00
Power connectors for 820 board (pc) or PS (cable) ..... $ 2.50
Switching power supply for 8" drives ................ $ 69.00
Xerox 820 (1 and 2) boards, working ................. $ 95.00
Parallel ASCII keyboard (not Xerox) made by
Keytronic, typewriter keys only .................... $ 25.00

(EMERRLD ~~
(MICROWRREj
P.O. BOX 6118 ALOHA, OR 97007 (503) 642-1860
Micro Cornucopia, Number 27, December-January 1986

Speech Generation With Radio Shack's SP0256
By David C. Alford

111 Glenbrook Rd.
Rochester NY 14616

This is a simple, inexpensive way to
cure any computer's laryngitis.
Can your computer talk? Well, it
can if you add Radio Shack's SP0256
Speech Processor. The SP0256 uses
parts of words strung together to form
complete words. The words aren't
great, but still it's speech, and this is
an easy hardware/software project.
Hardware
The information provided by Radio
Shack with the SP0256 is not totally
correct. For example, their description
of the LRQ-NOT signal is backwards,
so I inverted the signal before using it
as a strobe for my Centronics port.
You can use any IC containing four
inverting OR gates (e.g., 74LS02) for
this inverter as well as for the one-shot
we discuss shortly.
ALD-NOT is the input strobe that
tells the talker that valid data is available from the computer. A1 through
A6 (pins 18 - 13) supp~y the data.
We'll use A7 to fire a one-shot that
resets the speech processor after we've
finished talking. This insures that it
will remain silent after each speech.
See Figure 1 (schematic). Radio
Shack's schematic shows a rather com-

plex reset circuit but mine is simpler
because we're driving the talker with a
TTL signal.
The op-amps form an active filter
which makes the speech more intelligible. If you don't want to build such a
complex filter, you can build the simple filter shown on Radio Shack's data
sheet. In either case, the filter connects
to the 256' s speech output, pin 24.
The LM386 power op-amp doesn't
really like to run at 5 volts, so I highly
recommend using 12 volts to run it
(but no more!).
The recommended 3.12MHz crystal
is hard to find, so I use the standard
color burst crystal at a frequency of
3.58MHz. I've heard both and it
doesn't make much difference.
I added a pullup resistor to data
lines DO-D6. (Editor'S note: 1K ohms
1/4 watt connected between + 5V and
each data line should be fine.) The
. pullups absorb stray signals that might
otherwise cause the 256 to speak in
tongues.
I mounted my completed circuit
board inside my computer box (a
modified Xerox) with a small speaker
in one of the air holes (there are
plenty to spare). Using the 386 power
op-amp at 12V,. I get a pretty good

+5V

27

sound. If you need more volume you
could run a connector out the back for
audio. The op-amp filter should have
no trouble driving an amplifier.
Interrupts
When the Z80 sees an interrupt it
takes the contents of its I register
(initialized to FF in our system DON'T change this), and uses this as
the high byte for the interrupt table
address. It takes the lower byte of the
address from the PIa. The result contains a jump to the interrupt service
routine for the PIO.
The service routine must end with a
RETI (NOT RET) opcode, or you'll
leave the other peripherals (like disk
drives) shut down.
I changed the definition of WB to
fool the RETI instruction into popping
0000 off the stack and into the program counter instead of popping off
the actual point the interrupt happened (sending us back into the program we're trying to leave). This took
care of both problems. I got the warm
boot back to the system, and the
system got its RETI code. See Figure 2.

(continued next page)

Figure 7 - Driving the Talker With a TTL Signal

D"5~
22pf

.05
20K
24

AcK

10K

All Capacitors, unless otherwise
marked, in uF
All Op-Amps are General Purpose
(LM324, LM 7458, etc.)

Micro Cornucopia, Number 27, December-January 1986

'33

SPEECHGENERATOR _____________________________________________________
(continued from page 33)

The equates at .the beginning are set
for port B, but note the comments.
You need to change these only if you
want port A.
GENVEC is the location in the interrupt table for the general purpose
port. INVEC is the lower byte address
code contained in the port control
section. PPIO is the data location in
the port. PCTL is the control register.

RETI Macro
After the ORG statement, we initialize the port with the mode 0 control .
word and then give it a unique vector.
Next we prepare the interrupt table
and then set the port to send interrupts.
Using Your Assembler
Typing in all those allophones is

tedious, but after you're finished you
don't have to translate each new
speech. You can let the assembler do
the work! Just make sure that when
you make up a new word you use the
allophones as listed.
Radio Shack's data sheet has a small
dictionary that doesn't always jive
with the allophone listing in the back.
Also, MAC won't let you use some

Figure 2 - Service Routine Using RET! Code

GEHVEC
IHVEC
PPIO
PCTL

•

STOP

EQU
EQU
EQU
EQU
EQU
IQU

OFF1EB ;OFF1CB FOR PORT A
;01CB FOR PORT A
01EB
;08 FOR PORT A
018
PPIO + 1
; PIO CONTRL REG
;CODE USED TO BESET CHIP
OIlOB
;CODE USED TO STOP TALXING
OBFB

;

$-HACRO
HACRO
BETI
DB
DDK

;TUD OFF EIPAHSIONS (WHATEVER THAT DOES)

OEDB,OIlDB

ORG

100B

A,OFB
PCTL
A,IHVEC
PCTL

ALLOPBONE EQU

OI

AY
EB
n3
PP
JB

Hl1
IS
TT2

Hl1
AX

MH

TT1
DB1
II
II

DD1
OW1
AO
II

II2
J.E

BB1
881
TB

UB

34

EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU

ZB
RR2
FF
n1

LXI B,PPOUT
SBLD GEHVEC
MYI A,83B
OUT PCTL

PA1
PA2
PA3
PA_
PA5

vv

G01

sa

zz

NG

;PIO TO MODE 0
;PIO IlTERRUPT VECTOR

OOB
01B
02B
03B
OIlB
05B
O6B
07B
08B
09B
018
OBB
OCB
ODB
OEB
OFB
10B
11B
12B
13B
1liB
15B
16B
17B
18B
19B
118
1BB
1CB
1DB
1EB

LL
W
II

WH
II1
CB

ER1

IlTERUPT VECTOR I1IT

;

DD2
003

U2

IIIT PIO
MYI
OUT
MYI
OUT

OW2
1W

BL COJITAINS INTERRUPT ROUTINE ADDRESS
STORE IN INTERRUPT TABLI
01: TO IlTEBRUPT US NOW PIO

ER2

CJI
DB2

ss

NR2

BB2

OR1
AI
IR

G02
EL
BB2

;.

EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU

1FB
20B
21B
22B
23B
2_B
25B
26B
27B
28B
29B
218
2BB
2CB
2DB
2EB
2FB
30B
31B
32B
33B
3liB
35B
36B
37B
38B
39B
318
3BB
3CB
3DB
3EB
3FB

PROGJWI BODI
LXI B,SAY1
CALL PPOUT

VAIT:

EI
JHP VAIT

; BL POIITS TO FIRST 'PBONE'
;SAI FIRST 'PBONE' AID FORCE
; FIRST INTERRUPT
;BOOI: SAYS VE SBOULD EH1BLB
; IRTERBUPTS EVERY TIME

;

PPOUT: HO' A,K
CPI STOP
JZ VB
OUT PPIO
INXB
RETI
;

VB,

LXI B,OO
ITBL
RETI

;

SAY 1

;GET 'PBONE' IN A
;AFFECT FLAGS
;LEA'E IF STOP CBJ.R1CTER
;ELSE OUTPUT CHARACTER
; POINT TO NEXT CHARACTER
;SEE TEXT
;BL TO 0000
;EXCHANGE BL VITH TOP OF STACE
;SEI TEXT

DB
DB
DB

PA5,PA5,PA5,PA5
BB1,EB,LL
AX,CJI,PA5,PA5,PA5

DB

PA5,PA5,PA5,',STOP

; ADD ALLOPBOIES HERE
;DON'T BE SRI
;VITH SPACES

BID

Micro Cornucopia, Number 27, December-January 1986

Corvatek

THE KEYBOARD INTERFACE

names like "OR", so I called it
"OR1".
Expansions
This program was written to be
expanded. The WAIT routine doesn't
do much other than loop a lot. You
could expand it so your computer does
something else while it talks (like print
what it's saying). This is what this
type of interrupt structure was intended to do.
To add your own speech to the
program simply add the necessary DB
statements followed by the "phones"
(limit five to the line). Don't be afraid
to add pauses liberally throughout
(particularly at the beginning and
end). They help intelligibility.

KEY-UP

g::>u~ent~:

USE AN IBM STYLE KEYBOARD ON ANY· COMPUTER!
Plug an IBM stlyle keyboard into CORVATEK'S KEY-UP interface, plug the interface into
your computer, and you are ready to type.

KEY-UP PRICES

o DM-1 for Blgboard's $129.00
o DM-2 for Xerox 820 $129.00
o DM-3 for Kaypro
$129.00
o DM-4 for Franklin
$129.00
o DM-5 ASCII Unlversalt $129.00

FEATURES
•
•
•
•

Key Click Option
Beeper
Type Ahead Buffer
Reprogrammable Keys
(EEPROM)

KEYBOARDS

o
o

KEYTRONICS KEYBOARDS
KB 5150:1:
$112.00
KB 5151§
$164.00

III

(E]

+S&H

(503) 752-4833

*

SAVE $10.00

*

Buy both Key-up interface and Keyboard and save $10.00 on the total price

Start Talking
Just assemble your creation with
MAC, LOAD it to get the .COM file,
and off you go!!

•••

Duie'l. dVow 9'l.Om:
CORVATEK 1100 N.W. VAN BUREN ST. (503) 752-4833
CORVALLIS, OR 97330
• KEY·UP Is used on any computer with a parallel Input ASCII keyboard port.
:\: Same key placement as IBM keyboard.
§ Familiar typewriter key placement with separate cursor pad .

t The UNIVERSAL has all of the signals necessary for the user to adapt to any ASCII keyboard port. TIL signals on a
OB·25 connector. Requires the user to build his own cable.

Key·up Is a trademark of CORVATEK. Blgboard I. Blgboard II, Xerox. Keytronlcs, and IBM are trademarks of Digital Research Computer•• CaI·Tex
Computers Inc., Xerox, Keytronlcl Corp. and International Business Machines.

DRIVE ENCLOSURES
FLOPPY-WI NCHESTER-TAPE
FROM $8000
(Includes Power Supply)
• Desktop & Rack
• Heavy Duty All Metal Cabinet
~ Fan & Dust Filter·
• Hefty Power Supplies
• Full or Slim Drives
• Power Harness From Supply To
Drives
• Line Fuse, EMI Filter·,
Detachable Line Cord
• Cabinets & Supplies Available
Separately
• :: Most Models

(Disk drives not Included)

=I~II{~~~I~II~
RESEARCH CORPORATION

Write or call for our brochure which includes our application note:
"Making micros, better than any 01' box computer"

Micro Cornucopia, Number 27, December-January 1986

8620 Roosevelt Ave./Vlsalla, CA 93291
209/651·1203

32 Page FreeFakt Pakt Catalog

35

MICRothe
~k1~~~~

advantage.

~

fBSANVO
MBC 550 Series
MS-DOS Computer
Complete with over $1000 of FREE Software!
• MS·DOS 2.11 • MS·DOS 1.25
• Wordstar • Spellstar • Mailmerge • Calcstar
• Infostar • Easywriter I • BASIC

Disk Drive
Options
A • (2) SS/DD 160K Drives
• Mounting Hardware

$99
B • (2) DSIDD 360K Drives
• Mounting Hardware

$199

C • (2) DS/DD 96tpi

BOOK Drives
• Mounting Hardware
• BOOK Operating System

t

ONLY

$599
(Driveless)

OWL version 10 meg. internal

+ aOOK

Floppy

$1399

$249

Single Floppy Disk Drives

TEAC FD-55A 160K $59
TEAC FD-55B 360K $99
TEAC FD-55F SOOK $109

FREE INSTALLATION of disk
drives with purchase of
SANYO 550.

The OWL

$799

SANYO internal 10MB Drive
Complete with all manuals, software, and cables.

Accounting Software
GIL, AIR, AlP, for small businesses with under 20 employees. Designed
for the MBC 550 in color.
Entire package only $149

Accessories
•
•
•
•
•

PA·5000 15 cps LOP· $279
DM-3112 12" Monitor· $89
DMC-6113 13" Hi·Aes AGB Color· $299
16K Printer Buffer - $84.95
.512K Multi Function
V; length IBM compatible card.
Fits ALL compatibles· $199

TeleVideo Portable
Computers
FREE software included with the TPC·1:
•
•
•
•
•
•
•
•
•
•
•
•
•
•

36

FILEBASE - Data Base Program
TELEWRITE - Work Processing Software
TELECALC - Spreadsheet
TELECHART - Integrated Business Graphics
CP/M-SO v_ 2.2
2-36SKI Drives Formatted
ONLY
64K RAM, Expandable to 12SK
32K Graphics RAM
640 x 240 Bit Mapped Display
9" Yellow Non-Glare Screen
Serial Port, Printer Port, Mouse Port
IBM Style Keyboard
Easily Connected to Televideo Network Systems
Read Dozens of CP/M Disk Formats with Mycroft Lab's COM PAT.
Only $59 with purchase of MBC 1250

$649

• CRX 1100 Terminal
8 PF Keys, Menu Setup, 4 different emulations,
Printer Port· $299
(3 or more)
• Volks Modem 1200 Baud with Cable - $174

At these prices you can enjoy the convenience of owning
more than one computer!

CHOOSE THE SYSTEM THAT'S RIGHT FOR YOU!

805/393-2247

•

All systems carry full 90 day warranty. Check in advance. Add 3% for VISA/MC.
Shipping & handling charges will be added to each order.

CASH PRICE ONLY For our catalog with complete
details and prices, send $1.00 to: Micro Supply Organization, Inc_
4909 Stockdale Hwy. #1S0
Bakersfield. CA 93309

Micro Cornucopia, Number 27, December-January 1986

the
~!;J~~bN~ alternative.
MICRO

The SANYO complete
word processing system

The alternative for WANG, Xerox or
any dedicated word processing
system.
At Micro Supply Organization we
offer the lowest prices on Sanyo
computers and software. With
prices like these you can afford the
convenience of owning and
operating more than one computer.
We also offer the User Support
Hotline for questions concerning
your computer or about software
availability. Whether you need one
or a dozen computers, Micro Supply
Organization is the place to get
them!
The MBC 1250 Accounting Software
We carry a complete line of ADS
accounting business software. GIL,
AIR, AlP, Inventory and Payroll
modules are available. The current
retail price is $398. per module. Now
from MSO you pay only $99 per
module.

COM PAT
Read, write, and format over 50 different
CP/M ann MS·DOS disks on your MBC 1250
CP/M computer. $79
$59 with purchase of MBC 1250

USER SUPPORT
HOT LINE

805/393-2247
All systems carry full 90 day warranty.

CASH PRICE ON L Y
Check in advance. Add 3% for VISA/MC. Shipping

& handling charges will be added to each order.

For our catalog with complete details and
prices. send $1.00 to:
Micro Supply Organization, Inc.
4909 Stockdale Hwy. #180
Bakersfield. CA 93309

Get more for your
money!
~

fBSANVO MBC1250

a·Bit Integrated Computer with
High·Resolution Display
• Two Z·80A CPUs (main and secondary)
with no·wait mode and large 64KB
RAM/4KB ROM memory capacity for
fast execution.
• High·resolution 640 x 400·dot matrix
display with full graphics functions.
• Choice of 33·line or 40·line text mode.
• CP/M operating system with editor,
assembler and all standard utilities.
• Easy·to·use Sanyo Graphic BASIC.
• Two (MBC 1250) internal double·sided.
double·density, double·track, 5114"
slim·type mini floppy disk drives with
640KB formatted capacity.
• Specially·designed detachable
keyboard with coiled cable for easier
operation.
• Interfaces for one Centronics printer
one RS·232 port.

'InClUding this FREE software:

• Wordstar • Spellstar
• Mailmerge • Calcstar
• Infostar • BASIC

-'.

PR 5000
Letter quality Daisy Wheel Printer
• Letter·quality printer with 96·character
daiSy wheel printing element.
• Accepts paper up to 13 inches in width.
• 14 cps bidirectional printing.
• 10. 12 and 15 cpi printing pitches.
• Centronics parallel interface.
• Optional form tractor.
Includes printer cable & full warranty.

This complete package lists for $3194.00
NOW ONLY
VISA
l_
__

Micro Cornucopia, Number 27, December-January 1986

,I ·

..

$899
37

SLICER. • • Growing to meet your needs!
The Slicer

The New 1- Megabyte
System Expansion Boardl

REAL 16-BIT POWER ON A SINGLE BOARD
Featuring the Intel 80186 (C) Step CPU
• Complete 8 MHz 16-bit microprocessor on
6"x12" board
• 256K RAM, plus up to 64K EPROM
• SASI port for hard disk controller
• Two full function RS232C serial ports with
individually programmed transmission rates
50 to 38.4K baud
• Software compatibility with the 8086 and 8088
• 8K of EPROM contains drivers for peripherals,
commands for hardware checkout and software
testing
• Software supports most types and sizes of
disk drives
• Source for monitor included on disk
• Bios supports Xebec 1410 and Western Digital
WD 1002 SH D controller for hard disks
Fully assembled and tested only ......... ~ $945

The Slicer
PC Expansion Board

GIVES YOUR SLICER HIGH PERFORMANCE
VIDEO CAPABILITY
•
•

I BM compatible monochrome video
Video memory provides 4 pages of text or special
graphics capability
• 2 I BM type card slots for color video, I/O
expansion, etc.
• I BM type keyboard port
Fully assembled and tested only . . . . . . . . . • . . . $600

SLICERT.M

SLICER COMPUTERS INC.
2543 Marshall Street N.E.
Minneapolis, MN 55418
(612) 788-9481

FOR EXPANDED MEMORY, ADDITIONAL
PORTS, AND REAL TIME CLOCK
• 1- MB additional dynamic RAM
• 2 RS232C asynchronous ports with baud rates
to 38.4K for serial communication
• 2 additional serial ports for asynchronous
RS232C or synchronous communication
(Zilog 8530 SCC)
• Real Time Clock (with battery backup) for
continuous timekeeping
• Centronics type parallel printer port
Fully assembled and tested only .............. $800

SLICER/1 MEG EXPANSION COMBO
The Slicer (without RAM or RAM controller parts)
with full 1M B system expansion
Kit form only .............................. $1395
CONCURRENT CP/M- with manuals ......... $250
without manuals ...... $200
The SLICER DOS Kit. ........................
includes Bare Board, CPU and choice of
MS-DOS or CP/M-86
The SLICER Enclosure System
alone ...•..................................
with 135W Power Supply ....................
with 135W Power Supply and
2-80 track 5-1/4" Disk Drives ...............
PC Compatible Keyboard .....................
PC Compatible Amber Monitor ................
10MB (formatted) 5-1/4" Half-Height
Hard Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
Western Digital 1002-SHD Hard Disk
Controller. . . . . • . . . . . . . . . . . . . . . . . . . . . . . . . . ..
, assembled and tested

$295

$125
$245
$695
$150
$175
$700
$200

8087 Math Co-Processor Board. . . . . . . . . . . . . . .. $300
bare kit form
8 MHz Intel 80186 (C) Step CPU ............. $100
Check the SLICER Bulletin Board (300/1200 baud) at
612/788-5909 for complete set of manuals and access
to Slicer's design team.

All products are available in several kit forms:
Operating Systems are:
CP/M-86 by Digital Research, Inc. . . . . . . . . . . .• $85
MS-DOS by Microsoft Corporation . . . . . . . . . . . $175
Runs MS-DOS generic software; PC-DOS program
operation not guaranteed

MasterCard, Visa, Check, Money Order or C.O.D. Allow four weeks for delivery. Prices subject to change without notice.

86 World
By Laine Stump

If you like a good story told by a very
good teller of stories then sit back,
kick off your shoes, and read on.
Laine is on the kind of adventure that
few will ever have, and he's sharing
it with us. This is a "don't miss"
part of Micro C (and you might even
pick up something about Concurrent
CP/M and 8088 assembly language
interfaces to MSDOS in the process).
Merhaba Efendim! (Hello Everyone!) Welcome to the Micro C Turkish
Bureau. I arrived in Turkey on August
24 and spent the next month learning
Turkish, wandering around Istanbul
(where the Turkish language classes
were), traveling to Ankara and back
on the train several times, and waiting
anxiously for news of my hapless
Slicer (he was imprisoned at Turkish
customs when I arrived at the Istanbul
airport).
I am now at work in Ankara (at The
Development Foundation of Turkey,
for those of you who just tuned in)
and I finally got my beloved out of
"the pound" just two days ago. You
may scoff, but getting electronic equipment out of customs is a very complicated process, especially when you
speak no Turkish.
To get my Slicer back by my side I
had to travel to Ankara by train (only
$4 each way, but 400 miles and 9
hours!!), sign multiple copies of several forms, and have another man from
DFT travel to Istanbul as my representative to give the customs officials all
the forms with my passport and residence papers.
Worst of all though, I had to live for
an ENTIRE MONTH (that's 30 days,
720 hours, 43,200 minutes ... ) without
touching a computer. It is all over
now, though, and it was a good
experience to deal with a government
bureaucracy as an outsider; now I
know what foreigners entering the
U.S. feel like.
Power Struggle
My problems were not over when
the boxes containing the Slicer arrived
at DFT's offices. All of the power
supplies were configured for 110 volts,
60 Hz. Turkey, like the rest of Europe

Development Foundation of Turkey
Tunali Hilmi Cad. 22
Ankara Turkey

(and most of the rest of the world),
runs on 220 volts, 50 Hz. I had
checked into this before I left and
found that my main power supply (an
IBM PC-type) had a little jumper for
using 110 or 220. "No problem," I
thought to myself as I changed the
jumper over and plugged in the AC
cord. I flicked the switch and was
greeted with a sickening metallic
"click click" sound from the winchester. Not good (iyi degil).
I immediately turned the switch back
off and disconnected the drive, then
tried again while monitoring the power supply output voltages. Nothing. 5,
12 and -12 all registered a fluttering O.
My first reaction was anger, then
disappointment, and, a bit later, disgust. Finally I started looking at the
supply and found two adjustable pots.
With a couple of tweaks I had everything going just fine. (Yayy!!, Cok
guzel!)
The Wini Still Works
The most wonderful moment of all
was when I put the "01' binder" to
the ultimate test - booting from the
winchester. I just knew that traveling
12,000 miles by airplane and taxi and
baggage handler would ruin it, but it
worked first try. I ran FINDBAD (User
disk #1) and it did not report a single
bad sector out of 611 tracks! Wini has
passed the final examination; may it
live forever.
Warranty Restrictions
Before you all rush out to buy boxes
for taking your computers with you on
vacation to the Riviera, I should warn
you about some complications. The
first has to do with 8" disk drives.
Although 5" floppies, winchesters,
and new half-height 8" drives are
totally DC, most older 8" drives spin
the disk with synchronous AC motors.
This means that you must purchase a
different motor AND a different pulley
for the drive. If you catch Cascade
Electronics at the proper moment, they
can supply you with both (they receive
many 220V, 50Hz drives and convert
them to 110).
Another thing you should realize is
that not all power supplies have the

Micro Cornucopia, Number 27, December-January 1986

110-220 jumper like mine did. If you
have a switching supply it probably
will have the jumper; otherwise it
probably won't.
The last major point to beware of is
that some video monitors use the line
frequency to determine their scan rate.
Unless they are very adjustable, these
monitors will not work when changing
to 50Hz (mine is fortunately all DC).
The major advice I can give is to
look before you leave. It is easy to
purchase new equipment in the States,
but in many countries you would have
to order from somewhere else and
wait for weeks or even months for a
simple transformer, or even an IC or
connector. I brought along a box of
spare ICs and another box of connectors and ribbon cable. I am already
very grateful for my foresight (pronounced: luck).
Computing In Turkey
The state of the art of computing in
Turkey is at about the stage it was in
the U.S. 8 or 9 years ago. Most people
don't know what a computer is. And
most of those who do, think that a
computer is a very large, expensive,
magic machine (mostly expensive).
While I was at language school in
Istanbul I saw a proposal from a
Turkish computer dealer for an 8 user
networked system of Acorn BBC computers (2MHz 6502, 8K of memory
upgrade able to 32K) for primary
schools. The system, including two
400 Kbyte floppy drives, was about 8
million Turkish Lira ($15,000 US).
It was sold as a network instead of
as eight independent users because
they wanted to save money by using
only two disk drives for the entire
system; apparently they don't realize
that it would cost only $600 more to
have a disk drive for each user. And
8K of memory!!! 64K is now selling for
well under $10.
While there are some more advanced
systems here (IBM and Wang), I am
almost certain that I have the first
Slicer in the country (unless someone
at one of the NATO bases has one). I
feel like a carrier of good tidings and a
(continued next page)

39

86WORLD ______________________________________________________________
(continued from page 39)

side show freak at the same time.
Before my system arrived in Ankara,
the people at work were referring to it
as "your jalopy" and questioning
whether it would work. It is working,
I am happy to say, and others will
soon be converted.
At any rate, technology is swarming
into the country at an alarming rate.
The magnitude of the current changes
in Turkish computer usage could be
compared to that of changes in the
U.S. during the '60s and '70s.
Within a few years all the banks and
most of the larger companies will be
computerized. It may take a while for
home computers to become extremely
popular because the foreign exchange
rate and tariffs, coupled with a low
median income, make a small computer a BIG investment for a Turkish
family.
Back To Business
Now that I've gotten a few things
off my mind, I'll talk about the kinds
of things I'm supposed to talk about
here: 8086 based computers and software.
First is an announcement of new
hardware, not the kind that most of
you would run right out and put on
your Visa card, but still interesting.
Wang computers has just announced
the Wang APC, a new multiuser system based on the 80286 processor
running Xenix or Unix (also MS-DOS
in single user mode). Its price is
comparable to the mM-AT, but its
performance is much better (as Wang
tells it, anyway).
The processor is running at 8MHz
instead of 6MHz, while the memory is
operating with 0 wait states instead of
1. Some tests run twice as fast on the
Wang APC as they do on the AT.
The big problem, as always, is the
price. A four-user APC system logs in
at just about $18,000 while a similar
system based on a Slicer is under
$6000 (and nearly as powerful).
CCP/M
Speaking of multi-using the Slicer, I
have been seriously playing with CCPI
M for the last week and have had a
delightful time. We are currently examining options for putting several
four-user accounting systems in DFT's

40

field offices and have been experimenting to see if a Slicer with CCP1M
could do t"e job.
One of the things necessary for a
customized job like this is that the
hardware and software be extremely
configurable. Slicer's hardware flexibility is obvious, but what about the
software? First, Slicer CCP/M comes
with an EH Productions program
called 'SU' that allows you to change
almost all of, the normal system parameters without even running
GENCCPM. Second, if you really
want to get esoteric and use some
strange custom hardware or have special functions built into the operating
system, Slicer has included all the
source code to the XIOS (eXtended 10
System). Wow!
Even if you don't absolutely need a
multiuser system at home, you should
seriously consider getting CCP/M just
so you can learn about file locking,
mutual exclusion, queues, etc., and

study a very good implementation of
the CCP/M XIOS. This is code written
the way it should be written, not just
some kludge put together by a terminal-eyed freak who eats only the heads
of chocolate bunnies and sleeps in his
clothes. (Editor's note: See what I
mean.)
MS-DOS Assembly Language
I have been promising this for several months now, but other important
things kept coming up. Since I gave
an example of CP/M-86 assembly language a few issues ago, I feel it is only
fair that I give some time to MS-DOS,
especially since it is more sophisticated
in some ways (and much more popular). I would still rather use CCP/M
where I can exploit multitasking capabilities, but MS-DOS does have a few
niceties that bear mentioning.
I will explain some function calls in
the text and include a short program
at the end to show how to fit all this

j************************************************************************
j*
j*
j*
j*

,.*

HORE.ASH - print a file to the console 1 page at a time
similar to UNIX's more.

Assembled with AZTEC macro assembler (inc. with Aztec C)

j*
j*
j*
j*

A>as more
A>ln more.o
HSDOS version

*
*
*
*

*
*
*
*

Laine Stump 9/30/85

*

j************************************************************************
j
LINES
CR

equ
equ
equ
EOF
equ
STDIN equ
STDOUT equ
STDERR equ

24
'H'-64
'J'-64
'Z'-64
0

OPENHANDLE
READ equ
WRITE equ
RandW equ
READHANDLE
WRITEHANDLE
ENDF

equ
0

LF

j lines per page
jcarriage return
jlinefeed
jend of file character

1

2

1

2
equ
equ
equ

3Dh
jopen file or device
;read access only
jwrite access only
jread/write access
3Fh
jread from file or device
40b
jwrite to file or device
4Cb
jexit to DOS

j

j**********************************************************
a 'DOS' instruction
j

DOS

HACRO
HOV
INT
ENDH

FTNNUH
AH,FTNNUH
21h
JDOS interrupt

INPUT and OUTPUT macros to make life easier
j

INPUT

HACRO
HOV
HOV
HOV
DOS
ENDH

HANDLE, ADDRESS, BYTES
BI,HANDLE
CI,BYTES
DI,offset ADDRESS
READHANDLE

OUTPUT HACRO
HOV

HANDLE, ADDRESS, BYTES
BX,HANDLE

Micro Cornucopia, Number 27, December-January 1986

gibberish together into something you
can run.
I will warn you before I start that I
didn't use MicroSoft MASM to assemble the sample program. I used AS,
the assembler included with Aztec C. I
don't have MASM yet, and now that
I'm nine time zones away I can't just
call an 800 number and have it
shipped next day air. Anyway, it will
probably assemble with MASM, but I
can't say for sure.

With a single DOS call you can write a
single character, or you can write 641<.
You also do not have to worry about
parsing the filename into an FCB or
making sure you are logged into the
correct user number. To open a file
with MS-DOS, just put the address of
a 'a' terminated string containing the
filename into the DX register, access
code (read/write/read & write) into the
AL register, and give the "open handle" function call:
FILE
DB -d:\sub\fllename.ext-,O
FILEHANDLE DW 1

Getting A Handle On MS-DOS
MS-DOS's file system is much nicer
than standard single user CP/M. The
first difference you will notice when
programming in assembly language is
that MS-DOS allows reading and writing any number of bytes to a file or
device. This means you no longer
have to construct silly little loops to
write large buffers to disk, or keep
track of "partial records" when you
don't have exactly 128 bytes to write.

;

HOV
HOV
DOS
ENDH

HOV
HOV
DOS
HOV

DI, offset FILE
AL,READ
OPENHANDLE
FILEHANDLE,AX

DOS is a macro defined in the listing
at the end of the article, READ is just
the number a (read access only), and
OPENHANDLE is the function number 3Eh.
When control returns to your pro-

CI,BYTES
DI,orfset ADDRESS
WRITEHANDLE

..........................................................
CODESEG SEGMENT PARA PUBLIC 'CODE'
ASSUME CS:CODESEG, DS:CODESEG

HAIN

;

PROC
PUSH
POP
JMP

NEAR
CS
DS
HORE

;f1x segment reg1ster
; for data 1n code segment

..........................................................
see text for explanat10n of why th1s 1s here

;

LINECT
DHA
HORHSG
HORLEN
;

DB
DB
DB
equ

LINES-1

INPUT
JZ
CALL
JHP

STDIN, DHA,
DMA,EOF
DONE
OUTCH
HORE

DOS
HAIN

ENDF
ENDP

CMP

DONE:

;read 1 char from standard 1nput
;see 1f EOF yet (0 chars read)
;IF not, THEN type thi;:s char.
;and go get another
;f1n1shed, return to shell

..........................................................
send 1 character @DMA to console, keeping track of 11nes

;

OUTCH

PROe
OUTPUT
CMP
JNZ

DEC
JNZ
OUTPUT
INPUT
HOV
OUTEND: RET
OUTCH
ENDP

HOV
HOV
HOV
DOS

BX,FILEHANDLE
DX, offset BUFFER
CI, BYTES
READHANDLE

On return, if the Carry flag is set,
AX contains an error code; otherwise
AX contains the number of bytes actually read. Use this information to tell
when you have reached the end of the
file (bytes read will be less than bytes
requested). See the DOS programmer's manual (if you can decipher it)
for details on specific error codes.
Writing to a file is similar, except the
file must be opened for write or read/
write access.
Getting A Handle On Devices
MS-DOS, like UNIX, treats I/O devices just as it treats files. Any device
can be opened as a file if you know
the device's name, but there are also
five pre-opened handles to help make
life a little easier:

o - standard 1nput (std1n)

1 - standard output (stdout)
2 - standard error (stderr)
3 - Auxiliary
4 - Printer

CR,'-- Hore --'

11
.........................................................
.

HORE:

;

1,1

gram from the openhandle call, a file
"handle number" will be in the AX
register. The handle number will be
used instead of an FCB address when
you read or write to the file. To read
from the file you have opened, just
put the handle number in BX, the
address to read to in DX, and the
number of bytes to read in CX, then
issue the "Read Handle" DOS call:

NEAR
STDOUT, DMA, 1
DHA,LF
OUTEND

;character to console

LINECT
OUTEND
STDERR, HORHSG, HORLEN
STDERR, DHA, 2
LINECT, LINES-1

;end of line
jend of page

CODESEG ENDS
END

Micro Cornucopia, Number 27, December-January 1986

The beauty of treating devices as
files is that you can develop general
purpose programs that get their input
either from the console or from a file
with no change in structure of the
code. High level languages usually do
I/O this way, but MS-DOS does it
even in assembly language. To read a
character from the console, use the
following:
HOV
HOV
HOV
DOS

BX, std1n
DX, offset INCHAR
ex, 1
READHANDLE

The character will be returned in
memory at the address INCHAR. The
only problem with this is that input
through function 3F (Read Handle)
buffers up an entire line before it
(continued next page)

41

86WORLD ____________________________________________________________
(continued from page 47)

returns a character. If you want to edit
the input you'll have to use the normal console input functions (1, 6, 7,
and 8).
A Direction In Life
Another nice feature of MS-DOS is
1/0 redirection. Placing a less than
symbol «) in front of a file name on
the command line when calling a
program causes the program to get its
console input from the named file
instead of the screen, totally transparent to the program. If we take advantage of this, we don't have to open
files. Just read a character from stdin
and write characters to stdout.
Misguided Direction
Redirection can cause problems,
though. In my sample program I
wanted to print 24 lines of standard
input, wait for a key to be typed at the
keyboard, and print 24 lines more.
True to the documentation, the keyboard input requested at the end of
each page was read not from the

<\l)l~fl

component supply. Inc.

VVVV

keyboard, but from the file being used
as stdin. When input is redirected, it is
all redirected.
I tried all of the console input commands (there are at least five DOS
functions for console input: 1, 6, 7, 8,
as well as 3Fh) and all of them were
redirected. I began to think that I
would have to resort to using a monitor call (naughty practice), but then I
remembered the "standard error" device.
Stderr cannot be redirected; its output always goes to the console. "S0,"
I thought to myself, " w hy shouldn't I
be able to input from it too?" I tried
and was delighted to see that it
worked. Even this had a problem,
though. When reading from devices
using READHANDLE, DOS buffers
the input until you type a carriage
return, then it returns the first character.
I was hoping to be able to do
different things depending on a single
keystroke, but this was not possible. I
think that I may be able to solve this

1771 Junction Ave. • San Jose, CA 95112· (408) 295-7171

problem by setting a different 1/0
mode or something. I'll get back to
you.
Another problem with redirection:
When I discovered that the regular
console routines (0, 1, 6,7, 8, 9, etc.)
were also redirected, I thought I
would save some space and speed
things up by using function 6 instead
of 3Fh to get characters from stdin.
That worked fine until I got to the end
of the file. Then the system hung up
waiting for a control-Z and I had to hit
the reset button to get out.
DOS does not put a control-Z at the
end of a redirected file for you unless
you are using function 3Fh, so if you
are planning on using redirection with
a program, don't use the low numbered console functions. Matter of fact,
use as few of the functions numbered
below 2Ah as possible. Most of the
low numbered functions have more
flexible counterparts in the new functions. For best results use functions
39h-4Dh as these are the only ones
compatible with MicroSoft's XENIX.

Hours: 10:00 am - 5:00 pm / MON-FRI

Shipping charged on all orders. Minimum order: $15.00. Please call on all orders as items are limited to quantities on hand.
Prices subject to change without notice. C.O.D., Prepaid or Master Card or Visa orders only.
NO OPEN ACCOUNTS / NO FOREIGN ORDERS, PLEASE!

POWER SUPPLIES:

DISK DRIVE BONANZA:

DISK DRIVES: (continued)

ACOC OEM 5N17-1, 5V@17A,
$45.00
10"x5"x5", 141bs.
Trygon LBS6-24-0V, 4.B-6.BV@24A,
6"x17"xB",36Ibs.
$60.00
Lambda LXS-0-5-0V, 5V@27.5A
7%"x7%x9%",22lbs.
$60.00
Sorenson SS09-50, 9V@50A switcher,
7%"x5%"x12%",13Ibs.
$175.00
Standard Power 200 B 12, 12V@5A
unregulated 4 %"xBW'x5 %", 121bs.
$20.00
ACOC 15N5-1, 15V@5A, 10"x4"x5",6Ibs. $75.00
Standard Power 200 B 16, 16V@12.5A
unregulated4%"xBW'x5%",12Ibs.
$15.00
Sorenson SLC20-5, 20V@5A,
5%"x3%"xB%",4Ibs.
$40.00
Sorenson SS024-B.5, 24V@B.5A
5%"x3%"x10",5Ibs.
$90.00
Astec AA11261, 5V@6A 2BV@1A,
unregulated switcher, 7 %"x4 %"x2"
$50.00
130W power supply, IBM PC compatible $140.00
HB5-3, 5V@3A Linear, 4"x5"x2"
$15.00
CP411,5V@BA, -5V@3A, + 12V@1.2A,
-12V@1A, +24V@2.5A, 5A(surge)
16%"x5"x3" Linear, (Good for 8" Hard
$35.00
Disks, and 5 % " Floppies)
CP417, 5V@4A, 12V@2.5A(Avg.)
7.5A(Surge) Linear, B%,'x5"x3"
(Good for 5 % " Hard Disks)
$50.00
ACOC, 551-111, 5V@8A, ± 12V@1.7A
Linear, 11"x5"x3" (Good for 5%"
Floppies, or L ow Current Hard Disks)
$35.00
Osborne Power Supply + 5V@2.5A,
+ 12V@2.02A, -12V@.1A Switcher,
6%"x4"x2" (Goodfor5%" Flopies)
$18.00

DISK DRIVES:

NEW

SURPlUS Tandon TM501-full ht.,5 megabyte formatted.
One platter, two heads, access: 85 msec.,
612 tracks, 306 cylinders, + 12V@1.5A
typical, 5max.,5V@.8A
$119.00
SURPlUS Tandon TM502-full ht.,10 megabyte formatted.
Two platters, four heads, access: 85 msec.,
1,224 tracks, 306 cylinders
$225.00
SURPlUS TM 503-full ht., 15 megabyte formatted.
Three platters, six heads, access: 85 msec.
1,836 tracks, 306 cylinders
$340.00

42

$96.00
$200.00

HARD DISK CONTROLLER CARDS:
NEW

DTC 5150 BX, for IBM PCWithout Data Cables
With Data Cables

$185.00
$195.00

NEW

SURPlUS Tandon TM 603SE-full ht., 11 megabyte formatted.
Three platter, six head, access: 137 msec.
1,380tracks, 230 cylinders
$225.00

DTC 5250-will run two 5 y.." floppies and two
5 v.." hard disks. For example two TEAC FD55B,
one Microscience HH725 20 megabyte fixed
hard disk, and one Syquest S0306R
$360.00
5 megabyte removable hard disk.

NEW

DTC 5290-For IBM PC~AT, will run
5 y.." floppies and hard disks

NEW

Tulin TL226-half ht. 20 megabyte

NEW

NEW

Tulin TL240-half ht., 32 megabyte

Western Digital WD1002-WX2-for IBM PC
Without Data Cables
$170.00
With Data Cables
$180.00

NEW

WD Wl002-WA2-for IBM PC-AT
Will run 5 y.." floppies and hard disks

SURPlUS TM 602S-full ht.,5 ""\)"t'')yte formatted.
Twe platter SO\.O 0 ~, dccess: 99 msec.
612 tracks, 1 ~ "yllnders
$ 95.00

$500.00
$800.00

NEW

Microscience H H725-hlf. ht., 20 megabyte $512.00

NEW

Microscience HH612-hlf. ht., 10 megabyte $380.00

NEW

TEAC SD510, half ht., 10 megabyte,
requires 130WpowersypplyforP.C.

$380.00

NEW

Shugart SA455/Panasonic JA55112N5 y..", half height, 48TPI, 40 track,
6 msec. double sided

$ 99.00

NEW

TEAC FD55BV-48 TPI, 40 track,
6 msec., half height, double sided

$109.00

NEW

TEAC FD55FV-5y..", half height, 96TPI,
$149.00
80track, 3msec., double sided

NEW

TEAC FD55 GFV-AT -5 W', 1.2 megabyte
floppy for IBM PC-AT
$175.00

NEW

TEAC FD35F-3 W', 80 track, 135 TPI,
double sided

CASES WITH POWER SUPPLIES:
For one full ht., or two half ht. 5 y.." floppies.
For one full ht. or two low pwr. half ht. hard disks.

TEAC FD35E-3 Y2", 80 track, 135 TPI,
$168.00
single sided,
SURPlUS Shugart SA450-5 y..", full height, 48 TPI,
40 track, 25 msec. track to track,
$ 75.00
double sided

$180.00

$325.00

$299.00

* All drives with asterisk are compatible with the IBM PCTM as
360K or 380K drives. Half height drives may required mounting
brackets or filler plates not supplied with the drive.
When ordering controller cards please indicate the model of
drive you will be using, and the number of heads. cylinders and
formatted capacity of the drive.
All drives carry a gO-day g'J8rantee.
GAVILAN PARTS:
32K RAM Capsules
64K RAM Capsules (no plastic)
Thermal Paper
Boot Rom Board with 56K Ram Drive
Printer Battery Packs

20.00
40.00
3/100.00
3.50
65.00
13.00

Micro Cornucopia, Number 27, December-January 1986

Handling Redirection
Using Redirection for this simple
program turns it into a useful tool.
Besides paging a file to the screen with
this:
more my. bat

will let you enter lines of text into a
file called my .bat" ,
II

more >>my.bat

will tack new lines onto the end of the
already existing "my.bat",
more thatf11e

will copy the contents of "thisfile" to
"thatfile" (with a pause every 24 lines,
but it works). AND:
more [ITIj E
'
,
pro~§!~I~~~!~g
"

Micro Cornucopia, Number 27, December-January 19B6

2200

BUSiness

Way,

SUIt('

$74.95

~ ~~
~07 •

~ -~

RIVC'rSICIf',

CA 92501 • (714) 781-0252 ~

47

..,-,.'!
. ",-,_ . -

- _........,- -- -"]I.
.- s .
-

-- - - _.

y~~ .....
._~=s_

..... •

••

•

J

--

,..,.~~~~

.

_~

......

.

-]I

U~'':' &JA~~':' &J&J~
Electronic RAM Disk and Printer Buffer Combination

- the ultimate add-on for Kaypro I, II, 4, 4-84, 2-84 and 2X Computers. Incredible speed and efficiency are offered using
MicroSphere's dual operation Electronic RAM disk and printer buffer. No longer will you need to wait for your Kaypro
to slowly finish mundane tasks such as running a printer or waiting for floppy drives to turn when you have better things
to do.

Features:

*

*

*

$99

C-8UNDLE

VIEW: CRT Based Disk Diagnostic
EZZAP: ROM Burning Utility
includes schematic

C-PACK: Utilities in C
C-Games: User Modifiable Maze Game
All are written in C, include Source Code,
and available separately.

I

$89
$89

CPIMTM~I4IR_",h
MSDOS 1M M",<*>It

~ WeJem~'W::
303-327-4898
Box C • Norwood, CO 81423

*

*

*

*

*

*

*

For Kaypro 10 without internal modem .......................................................... $ 50.00
Adapter board will restore either internal clock or modem in Kaypro 4-84 or can add additional decoded parallel ports on
all Kaypros.

¢-esr:~ ~~i!?~~!~~~efM~~i~;:. ~~~. ~ .~~~~.~~~~ .~~. ~.~~ ~~ ~~~~~.~ .~~~~~ .~~~f.~o

256 RAM Disk .............................................................................. $370.00
512 RAM Disk .............................................................................. $445.00
768 RAM Disk .............................................................................. $520.00
1 MB RAM Disk ............................................................................. $595.00
When ordering, specify computer model and printer buffer size!Adapter board free with purchase of a 1 MB RAM Disk.
4MHz Kaypro 4
Floppy Disk MicroSphere
Drive
RAM Disk
Recalc 14K Perfect Calc 9:31.25
1:17.78
9.38*
2.12*
Load LADDER.COM ...
Load Printer Buffer
20K file, 11 pages, 2586
words using PIP to the
LST device
24.61 *

lex: ISIS to CP/M or MS-DOS exchanger
each

*

*

NEW: Kaypro 10 RAM Disk Adapter Board

lex TOOLKIT
for MOS and iPDS
ISE: ISIS Emulator for CP/M

*

Can be powered externally
255 directory entries
Fully buffered data transfer using ZOO PIa
Compatible
Choice of drive A or E
RAM disk memory not lost on cold
with Pro 8 and Plu-Perfect or 5 Mhz speed up kits
boot or reset of Kaypro
Printer buffer sizes: 4K, 32K, 64K
Printer buffer runs independently of RAM disk
10 Mhz microprocessor speed
Micro Cornucopia Pro 8 Version 3 ROM includes RAM Disk Code
operation
Installation Kit for Kaypro 1, 2-84 and 2X without clock or modem included at no charge if required
On 4-84 the
standard installation disables either internal modem or real time clock unless you install the adapter board
All
installation materials included in listed price except for Kaypro 10 Adapter Board

MicroSphere
RAM Disk

The Word Plus
90K file search for 1st misspelled

word (note: programs may run different speeds due to a variety of
disk access protocols and computer speeds)
*Time in seconds

32.00*

MiCToSphere also makes Color Graphics Boards and video adapters for Kaypro CP1M computers
MicroSphere, Inc.
P.O. Box 1221
Bend, Oregon 97709
503-388-1194
9-5 Pacific Time

CATALOG &
COMPLETE DESCRIPTIONS
AVAILABLE

-

.-.sA. i

Dealer inquiries invited.

MULTICOPY
Save hours of time on your Kaypro with this powerful utility!
•
•
•
•

Format, copy and verify 96 tpi disks in under 4 minutes (exact speed depends
on type of drives and year of Kaypro)
Format, copy and verify Kaypro double and single-sided disks in approximately
1 minute and 2 minutes respectively
Format, copy and verify any soft-sector, single or double-sided 5%" disk
format on your Kaypro at comparable speeds (e.g. Osborne SSDD in under a
minute). Large library of formats supplied
Use any combination of Drives A, B, C or D as source or destination drives

(Not currently available for the Kaypro 10)
Please send MULTICOPY to:
Name
Address _______________________________________

For further information on MULTICOPY
and other Kaypro and CP 1M software, please
write or call:

Enclosed is $39 plus $3 shipping

(California residents add 6% sales tax)
Check or money order D
VISA D
MasterCard D
______________________________ Exp. ______
Number
Signature

($5 shipping charge for orders outside N. America)

[Plu*Perfect Systems]
BOX 1494 • IDYLLWILD, CA 92349 • (714) 659-4432

CP!M is a registered trademark of Digital Research, Inc.

48

Micro Cornucopia, Number 27, December-January 1986

Hom.e Care For The Invalid Com.puter (Part 1)
By David Thompson, RN (Register Nanny)
You learn a lot of things in this life
because you have to, not because you
want to. 5eroicing a recalcitrant system is one of those necessities.
So, I'm setting up this series as a
reference work. You don't have to
read it now (though if you like
misery, you'll love this), and maybe
you'll never even have to use it. But,
if the technical calls we take are any
indication, this series could well be
the most requested set of issues we've
printed.
It was only a couple of weeks ago.
I was in my office trying to make some
sense out of the editorial (definitely
not a trivial pursuit) when I heard a
groan from the other room.
"I've had it with this #&%'#Z@
system!"
I detected a note of distress in
Bruce's voice.
His favorite system (modified to the
point of anonymity) had been twitchy
lately, occasionally refusing to accept
characters from the keyboard (especially after idling for an hour or two),
sometimes having trouble booting up.
But we were busy and the problems
didn't occur very often so we let it
slide. This day, however, the system
refused .to run more than a few minutes at a time and Bruce was getting a
bit aggravated. (I'd be more descriptive, but this is a G rated publication.)
Diagnostic Options
The reason we let things slide was
that troubleshooting a problem down
to the chip level can be a royal pain.
You can put in a lot of time and a lot
of money and still have nothing to
show for it. It's much easier for me to
write about diagnostic procedures than
to actually diagnose some problems.
So on that optimistic note, let's look
at the options in order: from the
easiest to the most difficult.
Board Swapping
The easiest diagnostic method is the
most common method - board swapping. If the system is made up of three
boards, five cables, power supply,
keyboard, and monitor, then all you
need are a matching (and running) set
of three boards, five cables, power

supply, keyboard, and monitor, and
you can find the problem. You just
substitute the good for the bad until
the system works.
The reason board swapping is so
common is that dealers have found it
to be much easier and more profitable
than servicing to the component level.
A new motherboard for an IBM XT
retails for $720 (though the defective
part on the original board might retail
for only 25 cents). Dealers can make
more by charging $720 for the board
plus $50 for service time (30 minutes
max) than they can by charging 25
cents for the part and $300 for service
time (maybe a day or two of putzing).
The customer would also be more
likely to complain about the $300 service charge than he would about the
$770 total for the new board and
installation.
You don't have to know much to
swap boards, just how to open the
case and how to avoid static-zapping
the units. Plus, board swapping practically guarantees success. There is no
such guarantee when you get down to
the component level. (What caused the
component to fail? Will the same problem destroy the new part?)
About the only thing you have to
watch for when swapping boards is a
bad power supply. Bad power supplies can destroy some or all of the
boards in the system. It's best to check
the power outputs for correct voltages
before trying new boards in a dead
system.

little equipment (a couple of small
insulated probes such as a toothpick
and a small screwdriver handle, a
plastic bag containing a couple of ice
cubes, and a small blow dryer). This is
the procedure many experienced
technicians use first when they receive
an intermittent system.

Temperature And Stress
"Temperature and stress" (T&S) is
the second easiest method of diagnosing problems. Unlike board swapping,
it's not a good strategy for all types of
problems, and unlike board swapping,
the diagnosis and the fix are two
separate steps.
However, T&S is an ideal way to
start if you have a system that's
running at least part of the time and
you don't have spare boards.
The T&S method is just like it
sounds. You use temperature (heating
and cooling) and stress (pressure) to
locate heat or position sensitive parts
or connections. T&S requires little or
no knowledge of the system and very

Subtle Timing Detection
This is the most sophisticated type
of servicing and is used to detect those
problems that absolutely defy other
methods.
It requires a thorough understanding
of the timing relationships between
signals and the ICs they are controlling (often called setup and hold
times). You need to be able to read the
timing diagrams published in IC
books, understand where propagation
delay (the time it takes for a signal to
get through an IC) is important, and
how signals can mysteriously appear
where they aren't wanted (through

Micro Cornucopia, Number 27, December-January 1986

Wiggling Lines
Unlike the previous two methods,
"wiggling lines" (WL) requires some
knowledge of the system you're servicing. This kind of diagnostic is particularly good at locating dead parts or
open signal paths, but you have to
know which lines should be high, low,
or moving up and down (wiggling).
You'll also need to know which pins
on an IC are the supply pins, and
you'll need to know the proper supply
voltages.
For this kind of diagnostics you'll
need: a schematic diagram of the
system, a voltmeter/ohmmeter (preferably digital), and a logic probe (available from Radio Shack). It would also
help to have a good selection of ICs (at
least the ones that are socketed) and
access to an oscilloscope.
Wiggling Lines is a good way to dig
into a dead system, or a system that
you can force into oblivion (not stack
crashes or other software lock-ups this is real oblivion). It is not a
particularly good method for bringing
up a new design or trying a new
modification where subtle timing problems can send a system to lunch.

(continued next page)

49

INVALID COMPUTER
(continued from page 49)

capacitive coupling). You also need a
thorough understanding of the circuit
under test.
I was on the design team for Tektronix's signature analyzer, and we went
bats trying to detect significant
changes in signal patterns without
being thrown off by insignificant
shifts.
A signature analyzer is supposed to
display a number (signature) based on
the precise timing of a signal. If a pin
goes high and low at precisely the
right times (with respect to some standard signal such as the system clock)
then the analyzer should display the
correct (the same) number each time
you place your probe on the pin.
Take a working system, check each
pin on each IC, and write down the
number. Then if the system dies, you
just check each pin on each IC until
you find a signature that has changed.
The change points you to the problem.
Unfortunately, if a signature analyzer is too sensitive to slight timing
changes, then simple aging of parts (or
replacement of parts) will change the
signature (though the signal is correct). Conversely, if the analyzer is not
sensitive enough to changes, then significant timing changes aren't caught.
Anyway, this whole problem of timing is very serious but very subtle. It
takes experience (and usually an EE
degree) plus a deep understanding of
the system you're diagnosing before
this method works.
It even takes a fair amount of knowledge to use the test equipment required for this kind of servicing. You'll
need a two-channel, 60MHz (minimum) oscilloscope with X10 probes,
plus schematics and IC data books. An
in-circuit emulator (ICE) and a logic
analyzer are also very, very handy
(and sometimes very necessary).
Fortunately, the "Subtle Timing Detection" (SID) is not often required
when diagnosing a once-working system. Sometimes heat and age will
slow down a part to the point that it
refuses to work in a circuit, but that
kind of defect will usually show itself
if you use the T&S (temperature and
stress) method while the system is still
relatively functional.

50

History Of Problem Important
We had been watching Bruce's system slowly get flakier and flakier.
Resets had always brought the system
back to life and there wasn't a predictable time frame for the lock ups, so we
guessed that the problem wasn't heat
related.
How To Tell If It's Heat
ICs slow down as they warm up, so
timing between parts changes when
the. system is turned on. Thus, a
change in the input level on the input
of a simple inverter (turns a high on
its input into a low on its output and
vice versa) takes longer to show up as
a change in the output. Sometimes the
slower reaction improves the system
timing and you'll see problems when
the system is first turned on, but
within 30 minutes, it becomes as solid
as a rock.
Usually, though, the slow-down of
parts creates problems rather than
solves them. Often within 30 minutes
(sometimes it's as long as three or four
hours and is most likely to happen
when the room is warm) the system
gets strange, and it happens nearly
every time you tum on the computer.
It's this predictability that makes heat
related problems easy to spot.
Sometimes the heating of the parts
can cause a socket contact to become
intermittent or a cold solder joint to
open up, but usually heating problems
are IC related.
Is It Mechanical?
We suspected that Bruce's system
had a mechanical problem. It's about
three years old, all the parts are
socketed, and there didn't seem to be
a relationship between the failures and
the length of time the system had
been on (or the room temperature).
In fact, once Bruce found that he
could kill the system by lifting slightly
on one comer of the processor board
we knew we could probably pressure
the system into revealing the problem.
I took a tiny screwdriver and used
its plastic handle to press on the
circuit board. Firm pressure anywhere
on the board would send the system
into oblivion. Hitting reset always

brought it back, so I figured I was
dealing with the movement between
two parts (probably legs in a socket or
a plug-in connector).
Even while I held the pressure that
had zapped the system, Bruce was
able to bring the system back. I wasn't
opening up a circuit (at least not
completely) with my pressure (dam
it).
Once I knew that firm pressure
anywhere on the board would shut it
down, I reduced the pressure. I usually pressed on soldered-in parts or on
the board itself because I didn't want
to fix the problem by reseating a chip
and then not know what I had done.
Pretty soon I found that the system
was most sensitive right around the
processor socket. In fact, just the
weight of that tiny screwdriver on one
end of the processor chip was enough
to send the system out for daisies. The
other end of the processor was much
less sensitive.
Close inspection revealed that the
sensitive end of the processor wasn't
completely down in its socket. A very
firm push and it popped solidly into
place. We haven't had trouble with
the system since.
Board Swapping
Just two weeks after we figured out
the problem with Bruce's system, another system went down. This time,
the system was working perfectly until
a pair of pliers accidentally shorted
across the contacts on the AC power
switch. Sparks flew, the fan in the
power supply began to tum, then
quit. A puff of white smoke drifted
upward from the system. The system
had been off, but was connected to the
wall (obviously).
I disconnected· the system from the
power supply and then turned on the
supply. No smoke, but the supply's
fan didn't budge. I checked the output
pins for + 5V. No luck.
I opened up the supply, looking for
a fuse. There was a fuse all right, but
it wasn't blown. A number of systems
manufacturers hide fuses inside their
power supplies and don't even tell
their dealers about them. The service
procedure for any dead power supply

Micro Cornucopia, Number 27, December-January 1986

is replacement. When the manufacturer gets the supply back he can usually
just replace the fuse and ship it out as
a replacement unit.
I probed around inside the supply to
see where the problem was. It turned
out that the oscillator and the big
drivers were no longer turning the 200
Vdc into nice, high frequency square
waves for the little torroid transformer.
(If this sounds like Greek, it's okay; I
don't recommend that anyone try to
fix a switching power supply if the fix
isn't a simple fuse replacement.) Unplug the supply before getting into it
and don't plug it back in until it's
buttoned up. Period. 200 Vdc isn't
fun.

t

Okay, I Need A Power Supply
I dug up another supply and hooked
it up to the main board (this is an XT
clone). Before turning on the power I
removed all the other boards, I/O,
video, floppy driver, winchester driver. Then I turned on the power,
waiting to hear the little "beep beep"
that says the board is happy. No
"beep beep."
I turned off the supply. As I turned
it on again I watched to be sure the
fan started to tum the instant the
switch clicked. If it hadn't, I would
shut it off immediately, suspecting a
short on the main board. I also
checked the voltmeter I had connected
between the 5V supply and ground. It
was 5V.
Visible Damage
I looked closely at the main board.
No visible damage, but on the multi 1/
o board, one of the heavy supply line
traces had burned through. The trace
had obviously acted as a fuse. I looked
closely at the ICs.
The ICs at one end of the board
weren't as shiny at their centers as at
their edges. Obviously a power supply
spike had cooked these parts. One, in
fact, had a tiny pin hole in its top,
probably the source of that white
(death) wisp of smoke.

voltage surge. They'll short out and
reduce the bus voltage before parts
farther into the board are damaged.
Unfortunately, even parts that work
fine after such an episode may fail a
short time later. I've heard tales of
people connecting 110Vac to the 5V
line on a system, and then after
replacing a chip or two have the
system running again.
"Of course it isn't very dependable, " an owner of one such system
mentioned to me. "It runs okay, but it
takes 8 or 10 resets to get it started in
the morning and I have to reset it
every hour or so as it locks up."
Anyway, we wound up replacing
the processor board and the I/O board.
That was all. I did a little "wiggling
lines" checking around the dead processor and found that it was receiving
clock and power, but it wasn't doing
anything else. (We'll discuss "wiggling lines" procedures in a future
issue.)

Gary even pulled the RAM off the
defective processor board and stuck it
in his system. It worked fine. At least
so far.
The rest of the boards (winchester
controller and video graphics) look
unscathed and work fine. The floppy
drives are happy, also.
Next Time
This series will take at least one
more installment. We've got to look a
little more closely at using temperature
as a tool, and we'll at least start on the
wiggling lines procedures.
"Wiggling lines" will require some
theory of operation discussions, so if
you don't have a schematic and theory
of operation of your system try to get
them. The material we'll cover will be
Greek otherwise.

•••

FOR THE SERIOUS
KA YPRO® USER
THE NEW PRO/FILE
SERIES OF WINCHESTER
DISK DRIVES FROM SPC

Whether you have a KAYPRO 2, 4, 10, or even a K·16, the new low PRO/FILE
hard disk drives from SPC are cost·effective and easy to install. A screwdriver
is all you need. With up to 34 Megabytes available in a small 2 inch-high
cabinet, you can say goodbye to floppy problems forever.
SPC provides next day delivery on MODEL
PRICE
all products, a one year warranty, and
5 Meg. Removable
$1095
a friendly approach that says we ap- 10 Meg. Removable
$1495
preciate your business. Customer 10 Meg. Fixed
$1095
references are provided upon re- 22 Meg. Fixed
$1595
quest. Larger system capacities up l4 Meg. Fixed
$1995
to 120Mb. are also available, including combination fixed/removable cartridge
systems.
Some of the prices above are limited to current stock on hand and are subject to change, so call SPC now and let's discuss your application. Ask about
our trade-up policy and controller exchange program. Call now ... ask for
Shelly or Bob.

Hidden Damage
It's not unusual for the parts closest
to the supply to take the brunt of a
Micro Cornucopia, Number 27, December-January 1986

SYSTEMS PERIPHERALS CONSULTANTS
9747 Business Park Avenue
San Diego, CA 92131
(619) 693·8611

Build A PC For Less Than $800
By Gary Entsminger
1

Here's how, and I promise it
won't strain your brain, wilt your
wallet, or break your fingernails.
Let's get down to basics.
What's A PC, Anyway?
Since August 12, 1981, "PC" hasn't
stood for "personal computer"; it's
stood for "IBM personal computer."
And lately, PC's definition has expanded again - to "IBM compatible
personal computer." I think that's too
many words for two letters, so let's
say that "PC" stands for "personal
clone." It's a reasonable image, and it
won't date us.
A basic PC (not to be confused with
a PC running BASIC) consists of Cabinet
Power Supply
Mainboard
2 Floppy Disk Drives & Controller
Serial & Parallel Port
Keyboard
Video Board
Monitor
Miscellaneous Cables and Control
Cards

The keyboard is accessed from the
main board, but we'll need controllers
for the floppies, printer, clock, modem, joystick, and monitor.
To simplify matters, one multi 1/0
card can handle 2 floppies, 1 parallel
printer port, an RS-232, a real-time
clock, and a game port. A video card
will control the monitor, allowing us
to run RGB or composite color, or
composite B&W. In short, we take a
main board, add two plug-in boards,
power and peripherals and we're on
our way.
To see how these parts fit into a PC,
study Figure 1, a standard PC-XT case
opened to reveal its insides. Notice the
roominess - 8 expansion slots, 2
taken by the multi I/O card and the
graphics card. One more is used by
the (short) winchester controller.
The beauty of the PC is in its
willingness to be expanded. If you
want to add something, just plug it in.
If you want to speed it up, just - but
I'm getting ahead of myself. First, let's
get a basic PC together.

Video and Multi-/ /0 Cards

Expansion Slots

Power Supply

How Much Is It Going To Cost?
I went shopping, letting my fingers
do the walking, so to speak, and
here's the bottom line this week.
Mainboard - a MEGA/XT 4-1ayer
with 4.77MHz 8088 CPU, 8 slots, and
256K RAM $183 ($165 + $18 for
RAM). There is a 2-1ayer board for
$120, but they recommend the 4-1ayer
and so do I.
135 watt power supply and case $125. (The IBM PC comes with a 63
watt power supply, which just isn't
enough to handle a hard disk and
expansion. So·· if you think you might
add a hard disk, buy the larger power
supply. I'll include the larger supply
in the personal clone, assuming I'll be
adding things.)
IBM style keyboard - $55 (not great,
too spongy for me, but it works).
Two Mitsubishi 5.25" DSDD 360K
drives - $100 each. You can cut costs
here by buying TEACs or Shugarts
(some as low as $85 each), but the
Mitsubishis are so nice, I'd pay the
extra. (By now you should be getting
the idea that this cheap PC isn't
cutting all the comers. At these prices,
let's be extravagant.)
Amber monochrome monitor - $80.
Multi I/O card - $125.
Video (graphics) card - $65.
Grand total - $803 (including cables). A less extravagant system, if you
really cut corners (cheaper drives, 65
watt power supply, 2-1ayer board)
goes as low as $677, but the $803
system is XT compatible, expandable,
rarin' to go, and so far, dependable.
If you can't wait to find where you
can purchase the parts to build your
own PC, see Figure 2. But come back
after you've ordered, and I'll talk
about faster boards, more memory,
and putting the system· together.
Careful- System Under Construction
The PC's forte isn't speed (in the
beginning, anyway), it's the ea~e with
which everything fits together. And
the roominess lets all those warm
circuits breathe easily. So let's lay
parts on the table and get started.
First, stuff RAM into the main
board. It might have arrived with the
RAM already in place.

52

Micro Cornucopia, Number 27, December-January 1986

If so, congratulations; you can skip
this part unless you're planning on
adding more memory. If you need to
stuff, look over Figure 3 first. The
RAM sockets on the MEGA/XT board
are in the opposite corner from the
8088 and power supply connector.
There are 64 RAM sockets, so you
can't miss them.
The best way to stuff 'em is to set a
RAM chip over the socket with one set
of legs slightly started down into the
socket. Then (using your thumbs)
slightly press the set of legs nearest
you toward the other until it, too, just
starts down into the socket. Then,
using your thumb on top, firmly press
straight down on the chip. It should
slide in easily and snugly. The only
"gotcha" is BENT PIN, but you can
avoid it by making sure each pin is
started into the socket before you
press in. Look carefully at each leg
before you press down.
Figure 2 - Where to Buy Parts

Mega/IT II81n boards 4-1ayel" -- .165.
2-1ay81" -- .120.
Multi I/O oard
-- • 95.
Caae/135 Watt POW81" Supp1J -- .125.
Video o&1"d (oolol"/grapbioa) -- • 65.
Hitaubisb1 Dl"ives
-- .100.
SaJlaung 12" bbel" Honitol" --. 80.
Seagate 20 Meg Hd diskloontr-- .550.
Co
1461 Univ81"sitJ Ave.
Berke1eJ CA 94702
415-549-3472

SIq High

Turbo Board (7.5MHz 8088)
Monitors

-- .365.
-- • 75.

SaJlaung 12"

LoUr Leotronios
13933 R. Central Expressway
Suite 212
Dallas TI 75243
214-234-8032
AT Ha1nboard

Mounting The Boards
After you've carefully installed RAM
(it'll take a few minutes), screw down
the mainboard. It goes in the left half
of the box on the nine pegs. You'll
need to buy nine screws (Phillips
head) if your board didn't come with
them.
The next steps can be taken in any
order, and each has an advantage. If
you put the power supply in first, you
can check out the mainboard before
you get too far along (worried?). If you
put the drives in before the power
supply, it's easier to connect the drive
cables (but it's not really bad either
way).
If you're going to install a hard disk
you can do that before the power
supply goes in. Either way you go,
however, it's easy.
Power
Let's go power supply first and
fumble with the drives later. The supply sits in the right rear of the box,
cables toward the mainboard, fan up.
It screws in from the back (the screw
holes are already there for you), and
you can reach the holes easily if you
lower the lid. It's a snap!
If you want to test your mainboard,
now's the time. Plug the cable with 11
colored wires coming from the power
supply into the mainboard at the rear
right, near the 8088 (see Figure 4).
Then plug the small, 2-wire cable from
the speaker into the front right of the
board, (the speaker cable fits over the
4-pin socket labeled "speaker"). Hook
up the speaker so the board can talk to
you.

Reset & Speaker
While you're at it, connect the reset
cable (my reset button came on the
front of the case) to the mainboard. It
fits in the R8 socket (near the speaker
socket on my system and looks just
like it). If your reset button is somewhere else, you'll need to figure out
where R8 is. Once you find it, the
cable just snaps in.
To check out the mainboard, plug in
your power supply and fire up. If the
beeper beeps, it's working. Congratulations. You've got a mainboard. If it
doesn't beep, check your connections
and make sure all the chips are firmly
in their sockets. If everything seems
secure and still no beep, something's
not working. It's probably best to call
the vendor.
If you can, try to buy as many parts
as possible from one distributor; it'll
make solving a malfunction problem a
lot easier. But don't worry - chances
are your board will come up just fine.
If you don't have a speaker, then just
proceed along; we'll test the whole
system shortly.
(continued next page)
Figure 4 - Block Diagram of Power Supply

POWER

~~

-CJ-

-c:r-

II)fi'IT'
(1):

0:

:

:

(1)'

Figure 3 - Stuffing the RAM into the Main Board

-- .1250.

C.J. Computers
2424 W. Ball Rd. Suite B
Anaheim CA 92804
714-821-8922
PC (6.67HHz 8088)
(includes mainbo&1"d, oase,
6401 RAM, 1 drive, keJboard,
power supply)
Turbo

$795.

PC'S L1II1ted
7801 H. Lamar, 1£-200
Austin TI 78752
800-426-5150

Micro Cornucopia, Number 27, December-January 1986

53

BUILD A PC FOR LESS THAN $800 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
(continued from page 53)

Drive Installation
Next, install the drives. They slide
into the cutaways up front and screw
into the metal plates inside the cabinet. Screwing is a little awkward you come in from the sides - so work
up from the bottom.
If you're adding a hard disk now,
put it in first, and connect cables as
you go.
Connecting the cables correctly is a
little tricky. You'll need to connect two
at the rear of each drive - one from
the power supply and one from the
multi 110 card (or whatever your disk
controller card is).
The power cables connect only one
way. The drive data cable has two
connectors for two drives. In the IBM
world, you jumper both drives as
drive 1. The data cable determines
which one is A and which is B. Also,
the red edge of the ribbon cable is pin
1. Just look for pin 1 (or pin 2)
marking on the data connector at the
back of the drive.
Now you're just two cards and a
few more connections from a clone.
1/0

Next, plug in the 110 card. It fits
into any of the slots on your mainboard. Take your pick of any except
slot 1. Slot 1 (the closest to the 8088) is
reserved for a ROM board (usually
BASIC), so we don't use it. Then
remove one of the metal card plugs
from the back of the cabinet, and slide
the card down into the slot, making
certain the pins on the card and the
slot line up. Next, screw the card
down (one screw at the rear of the
cabinet).
Then connect the other end of the
cable you just connected to the floppies to the 34 pins marked "disk" on
the 110 card, using pin 1 again for
reference. It's generally marked on the
card (on the board we used, pin 1 was
toward the front of the computer).
The printer port is mounted at the
rear of the card, so you won't need
cables. But the serial port 022 on the
MEGA/XT) needs a cable and a connectar. There's a punchout for a db25
at the rear of the cabinet - you'll need
two screws to attach it.

54

Next, plug in the video card. It
plugs into any empty slot (except #1);
its sockets are mounted on the back
panel.
Now, close the box and plug the
keyboard into its connector at the back
of the mother board. Also plug the
monitor into the video board.
Now, ladies and gentlemen, start
your engines.
Faster PCs, XTs, X16s, And ATs
Once you've got a PC and you want
to jazz it up, there are several routes
you can take, depending on your
emphasis - more speed, number
crunching, more storage, more dynamic memory, or co-processing. What did
you want a PC for, anyway?
The cheapest way to add a little
more speed is to swap your 8088 CPU
for an NEC V-Series 8088 compatible
processor. It's about a $20 investment
and will speed things up a little (see
Randy Davis' article this issue).
The next cheapest route, from
4.77MHz to 7.5MHz, is to buy a Turbo
XT board instead of an XT board.
That'll up our no-corner-cutting PC's
price from $803 to $1003. The Turbo
board will act just like the XT board,
only a little faster. I don't have any
benchmarks to show you, but I'll
guess about 50 percent faster. Noticeable.
A more elegant speed-up would be
an X16, 80186 board. Buy it instead of
the PC board. It's spendier, but it's at
least 3 times faster than the PC (one
benchmarking organization says 4.2
times). That switch would up the
system cost to $1470.

The best price I could find for an AT
mainboard was $1250, which set that
system at about $1900. See Figure 5 for
a table comparing systems.
If number crunching is your bag, an
8087 on any of these systems will
quicken your calculations significantly.
The cheapest route again starts at the
PC and raises your investment approximately $150. Still, you're under a
thousand dollars for very fast crunching.
If you want faster screen output and
generally faster computing in addition
to number crunching, the X16 will run
very fast (with the 8087) for $1620.
Since the AT running an 80287 coprocessor is slower (or at least no
faster than the 8087), you'd probably
forego the AT. Use what you save for
a printer, a hard disk, or a co-processor board.
If you need more memory you can
add up to a megabyte by changing the
64K RAM to a 256K RAM (costs about
$2.70 per chip, or under $90 for a
Meg) and adding a jumper at E2. See
Figure 6. If you need storage, skip the
second floppy (save a hundred) and
buy a 20 Meg hard disk (with controller, it'll cost you $550).
Figure 6 - Adding a Jumper at E2

.~0§J~OO0
~~0

0

j

Front of Board

Figure 5 - Cost and Memory Comparisons of Different Systems

SISTEK

COST
(with 2
noppiea)

MEMORY

803
1003
1115
1470
1599
1875
1900

256[
256[
640[
512K
256[
256[
256[

4499

256K"
640K"- 625_

PC (4.77MHz 8088)
TURBO(7.5MHz 8088)
TURBO(6.67MHz 8088)
I16(8MHz 80186)
LEJDING EDGE(8MHz 8088)
COMPAQ (8HHz 8086)
AT(6MHz 80286)
286i(6MHz 80286)
COMPAQ AT(8HHz 80286)

6~[

COST
(1 noppy, &
20 Meg Harddisk)
1253
1453
1565
1920
2049
23692350
2795

COST
(1 floppy, 20
Meg Harddisk,
& DSI-32)
2403
2603
2715
3070
3199
3514
3500
3945
7409

-(factory equ1ped hard disk)
--(list with 1 1.2 Meg floppy and color monitor)
---(list with 30 Meg Hard disk and tape backup)

Micro Cornucopia, Number 27, December-January 1986

t

PROGRAMME
If you need multi-tasking on top of
everything else, add the Definicon
DSI-32032 board to any of the above
for another $995 with 256K RAM
($1150 for a megabyte if you stuff your
own RAM) and Concurrent DOS. The
X16/DSI-32/multi-tasking work station
equipped with a 20 Meg hard disk
would run $3070 sans operating system and would be very powerful.

Movin' On
Obviously, the strength of the Intel
processors/IBM PC standard is upward
compatibility and flexibility. You can
have just about what you want, and at
a reasonable price, if you're willing to
shop around, stuff a little RAM, tum a
few screws, slide in your drives, and
plug in a few cables.
Our basic PC isn't all that fast (I still
like my Kaypro), but it's supported by
neat and useful graphics, a wide variety of software, and most importantly,
it's expandable.
If you're waiting for the perfect
sound and graphics computer and you
want the eloquence of a 68000 CPU,
then by all means wait for the Amiga
or one of its compatibles. But if you're
looking for the quick fix now, build
yourself a personal clone. It's compatible. (And who knows, with co-processor boards popping up all over, you
could put together a system that
would make a Cyber flinch.)

•••
EPROM
PROGRAMMER
APROTEK 1000
ONLY

$265.°0
COMPLETE WITH
PERSONALITY
MODULE
117 VOLT AC POWER-RS232
-6 BAUD RATES - HANDSHAKE TO HOST

ALLOWS READ, WRITE, VERIFY. COpy
Comes complete with a CPM, IBM-PC or Apple
Driver Program on Disc.
Programs the following 5 Volt 24 or 28 pin
devices: 2716 series through 27256, 25xx series,
68764 plus others. Please Specify Personality
Module desired with order. Additional Personality
Modules only $15.00 ea. Full 1 year warranty.
TO ORDER CALL 1 800 962 5800 OR WRITE
APROTEK
1071 AAVENIDAACASO
Add
CAMARILLO CA 93010
$400 Sh'pp,ny USA
Info 18051987 2454
VISA or MC Add 3'Y<.

Micro Cornucopia, Number 27, December-January 1986

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.
PROGRAMMER 4+ WITH OWNERS MANUAL AND DISK. $199.95
MS-DOS DISK ONLY $15.00
Order from

cPperipfico
~~ .~;I) 1659 Scott Blvd., Suite 1
~I

V

Santa Clara, CA 95050
(408) 354-5084

VISA and MASTERCARD telephone orders welcome.
Please specify Disk format
CP/M 8" IBM format, KA YPRO II, XEROX 820, OSBORNE I, others.
Please specify method of shipment, UPS or Postal Service.
California residents add 6'}o Sales Tax. Dealer Inquiries invited.

55

Byte Magazine called it,

"CIARCIA'S
SUPE.R
SYSTE.M"

WHY WASTE YOUR VALUABLE TIME with a slow, clumsy, limited editor when
you could TAKE THE EXPRESS!

With EXPRESS 2.0 you can • ••

The S8180
Computer/Controller
Featured on the cover of Byte, Sept. 1985,
the SB180 lets CP/M users upgrade to a
fast, 4" x lW'single board system.

• 6MHz 64180 CPU
(Z80 instruction superset), 256K RAM,
8K Monitor ROM with device test, disk
format, read/write.
• Mini/Micro Floppy Controller
(1-4 drives, Single/Double Density,
1-2 sided, 40/77/80 track 3Y2'; 5Y."
and 8" drives).
• Measures 4" x 7%': with mounting holes
• One Centronics Printer Port
• Two RS232C Serial Ports
(75-19,200 baud with console port
auto-baud rate select).
• Power Supply Requirements
+5V +1-5% @500 mA
+12V +/- 20% @40mA
• ZCPR3 (CP/M 2.2/3 compatible)
• Multiple disk formats supported
• Menu-based system customization
S8180-1
SB 180 computer board w/256K
bytes RAM and ROM monitor
....................................... $369.00
SB180-1-20
same as above w/ZCPR3, ZRDOS
and BIOS source ............. $499.00
-Quantity discounts available-

~COMM1BO-M-S
optional peripheral board adds
1200 bps modem and SCSI
hard disk interface.

TELEX

1-800-635-3355

643331

For technical assistance or
to request a data sheet, call:

56

MACRO'S!
• TOTALLY RECONFIGURE THE KEYBOARD to look like another editor if you desire so
you -don't have to learn new control keys!
• Use one of the FASTEST SEARCHES EVER WRITTEN. We take advantage of the powerful
l-80 string handling instructions. (Sorry 8080 owners, this one's too fast for you!)
• INSTANTLY configure EXPRESS for your terminal or computer using the included
terminal data base. (Over 50 predefined terminals.)

• Edit FILES LARGER THAN MEMORY with EASE!
• Easily enter and edit "CONTROL" and "HIGH BIT" CHARACTERS!

Other EXPRESS 2.0 features • .•
•
•
•
•
•

DYNAMIC word WRAP/UNWRAP • Full Cursor control (and then some!)
EASY to SET TABS • GLOBAL/SELECTIVE/LiTERAL/IGNORE CASE REPLACE
FULL BLOCK INSTRUCTIONS including BLOCK PRINT, BLOCK SAVE, & II"CLUDE
VARIABLE SPEED (FAST!) BI-DIRECTIONAL AUTO-SCROLL • GOTO PAGE N / LINE N
COMPACT - Only 24K on disk, 19K in RAM for program

EXPRESS VERSION 1.0 SAMPLER
• Version 1.0 is a sample copy available FREE on your local Bulletin board or for only
$10.00 from us. Version 1.0 was a very preliminary version of EXPRESS and did not yet
have all functions implemented. However, we feel it is a good way to allow you to see for
yourself the power of EXPRESS before you buy. Version 1.0 has the following limitations:
Only 16 user areas
Copy, Rename, Erase not available
limited Keyboard MACRO's
Dynamic word wrap unavailable
literal Search mode only
Definable "Block" size limited to 1K
Manual not included
File size limited to memory size

Gentlemen .... Please rush me the following:
_ _ _ Copies of EXPRESS 2.0 at $29.95 + $5.00 postage and handling (includes manual)
_ _ _ Copies of EXPRESS 2.0 manual only at $12.00 + $3.00 postage and handling
_ _ _ Copies of EXPRESS sampler (Version 1.0) at $10.00 + $2.00 postage and handling
I have enclosed my check or money order for $
payable to:

TCI

Note: Washington residents must include

17733 205th Ave. NE
Woodinville, Washington 98072

Note: For C.O.D. add $3.50

1-203-871-6170

Address
City __________________________________ State _ _ _ lIP _ __
Phone ____________________________________________________
My l-80 based computer running CP/M-80 v2.2 is: _______________________
Disk size (5"/8")

~~

7.8% sales tax

My shipping address is:
Name _________________________________________________________

TO ORDER
CAll TOll FREE

P

• Fully Access ALL 32 USER AREAS with any editor command!
(Hey Winchester owners, check this out!)
• Execute CP/M COMMANDS without leaving the editor!
(Rename, Copy, Erase, Type, Directory, log)
• Set up, use, and save on disk an UNLIMITED NUMBER of POWERFUL KEYBOARD

Micromint, Inc.

25 Terrace Drive
Vernon, CT 06066

Disk Density (S/D) ____ Single/Double sided _ __

TOMORROW'S COMPUTING INNOVATIONS
Micro Cornucopia, Number 27, December-January 1986

Up to 4 users, 3 printers, electronic mail. Now with up to 1 MegaByte of hi-speed Cache for the most
cost-effective, hi-performance CP/M Network ever.
WestWind's integrated family of products is designed to grow with your needs. WestWind Products include
all necessary hardware, easy-to-read complete documentation and powerful, user-friendly software.
,
Yes! D Send me the new, FREE West Wind Fall Catalog.
My computer is a
Yes!

D

I want my very own CP/M LIVES! T-Shirt!
Size S M L XL (Circle one)

I
I
I

To learn more about our NEXT GENERATION products and to get all the de~ails
of our great DOUBLEUP Sale including complete CP/M and PC-DOS compaclble
systems, Call or Write NOW for our New FREE Fall Catalog.
j

Save! Get your CP/M LIVES! T-shirt FREE with any order over $100! OR, oker
your T-Shirt now for only '$9.95 and we'll give you FULL CREDIT on any fut~re
purchase of $100 or more.

Name

State_ _ Zip _ _ __

Enclose $9.95 plus $2.00 Shipping and Handling for each
T-shirt. CA residents add 6.5% Sales Tax.

D

D

D

Payment:
Check
Visa
MasterCard
Card No.
Exp. Date _ _I __
WestWind Computer 1690 65th St., Emeryville, CA 94608
MICa

.

'WestWind

Address _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
City

:

: For Information or To Order:
CALL TOLL FREE
COM
PUT
E
R
US 800152616500
1690 65th Street, Emeryville, CA 94608, (415) 652-3222
CA 800183113144
Telex: 756329 (DRIVE CUD), WU EASYLINK 62533500

I
I

I
I
I

For Technical Support:
CALL 415 652 3222
1

1

Trademarks: West Wind Computer-BackPac. OrlveC. Trantor. TUTOOPac. TurOOTrantor.
Web/Digital Research-CP/M/Computer Associates Sorcim/IUS-SupcrCaIc2lOCCOsOOrne/Kavpro Corp.- KayPro/Morrow- MorrowlTdeV.deo - TeleV,deo/Xerox Corp.
-Xerox/International Business Machines Corp~IBM. PC.OOS/MicroSofr-MS-OOS

57

Intel's Speed Trip

Or Why The N e"W Processors?

By Dean Klein

Only Apple owners seem to be unaware that processor speed affects how
quickly things get done. (Otherwise
why would they own Apples?) Dean
definitely knows how processors can
hold us back or make us go. Herein he
discusses the going.
The semiconductor manufacturers
are making a lot of claims, each touting the speed of their microprocessors.
They even show benchmarks support. ing their claims. But even among
similar chips, such as the 8086/8088,
manufacturers are often blowing
smoke. What does, in fact, make processors faster? Let's examine one family (the 8086) and see.
Inside The 8086
Intel introduced its first 16-bit CPU,
the 8086, in 1978. In some ways the
8086 is really an expanded 8-bit microprocessor (Motorola fans would definitely agree!), incorporating several innovative concepts 1. Separation of instruction fetch and
instruction execution, thus dividing
the chip into two parts: the Bus Interface Unit (BIU) and the Execution Unit
(EU)
2. Queues
3. Wider Internal Data Bus
4. Increased Clock Speed
BIU And EU
As you might expect, the BIU is
responsible for operations on the bus,
including fetching instructions, reading or writing to memory, and reading
or writing to 110.
The EU decodes and executes instructions, and some instructions take
longer to execute than others. For
instance:
AND
AX,BX
Logical operation
on two registers
ROL

AX,CL

Rotate AX left
CL times

Each of these instructions is coded in
two bytes, but the execution times can
be much greater for the second. In the
8086 the first instruction requires three
clock cycles to execute while the second instruction could take 2056 clock
cycles. We'll return to these instruc-

58

PC Tech
904 N. 6th St.
Lake City MN 55041

tions later when we examine some
newer processors.
Queues
The designers at Intel (and Motorola,
National Semiconductor, Zilog, and
God knows who else) figured all that
silicon shouldn't sit idling while the
EU was working, so they added an
instruction queue to keep the BIU
busy.
The 8086 BIU will fetch up to 6 bytes
of instructions to fill its queue and will
fetch another instruction whenever
there are two empty bytes in the
queue. This allows Intel to use slower
memories without significantly degrading processor performance.
For Instance
A normal memory access cycle takes
four clock cycles with no wait states. If
a typical instruction takes five cycles,
adding a wait state (access takes 5
cycles) won't slow the processor unless it gets a string of short instructions. And if the current instruction
asks for a memory read or write, the
processor doesn't have to wait to fetch
another instruction. So it's faster, but
not without drawbacks.
So What's Wrong Now?
Imagine you're trying to debug a
new system by watching the instructions as they come down the bus.
Since the processor may branch on an
instruction (and dump the rest of the
instructions already in the queue)
some of the instructions in the queue
won't be executed. A waste!
Also, you have to be careful about
modifying instructions with Debug.
After all, if the next instruction takes
fewer than six bytes, it will already be
in the queue and won't be modified.
(Of course, this little drawback encourages good programming techniques;
maybe CPU manufacturers should design a 1 megabyte queue!)
Data Bus Width
You might assume that a 16-bit
microprocessor would require a 16-bitwide data bus. It ought to, but it
doesn't.
Following the introduction of the

8086, Intel released the 8088, an 8-bit
version of the 8086. The 8088 has the
same EU as the 8086 and a different
BIU and is, of course, the microprocessor used in the PC.
Bus width affects microprocessor
performance most in applications that
move or evaluate large amounts of
data, such as a database program.
Since the data bus width of the 8088
BIU is only 8 bits, it takes twice as
long as the 8086 to move 16 bits. If
you look at STRING MOVE, STRING
SCAN, and other instructions, you can
see the difference.
Of course, if the processor EU is
executing a series of short instructions,
the BIU may not be able to keep the
queue filled, which also hurts performance.
Now, you might shout, "Increase
the queue size!" But it won't work.
Remember the EU often uses the bus
for operations such as reading and
writing memory. It turns out that the
queue must be shortened to keep the
BIU from monopolizing the bus with
instruction fetches. So the queue
length is only 4 bytes in the 8088.
(Note: this means you could write selfmodifying code that would run on an
8088 but not on an 8086. Don't do it!).
Address Generation
Today's processors offer a variety of
addressing modes, some quite involved. Base indexed addressing, for
example, adds the contents of a base
register to a pointer register and an
offset in order to compute the data
address. This address, in turn, must
be added to a segment register to
locate the final physical address.
Whew! Of course, this takes a bit of
time.
The times for many 8086 (and 8088)
instructions have "+ EA" appended.
The total is the time an instruction
takes for "effective address" calculation. In the 8086 and 8088 these address calculations are performed by
the same hardware that does arithmetic instructions.
The newer processors - 80186,
80188, 80286, and the new NEC parts
- have dedicated addressing hardware so there is no penalty for effec-

Micro Cornucopia, Number 27, December-January 1986

CROSS ASSEMBLERS
6502,6800/6801,6805,8048.8051
8080/8085,8086/8088,9900/9995

tive address calculations.
Execution Unit Speedup
One obvious way to improve processor performance is to reduce the number of clock cycles required for each
instruction. Usually, a designer reduces this number by adding hardware to the chip, thus increasing processor complexity.
The 80186, for example, uses this
approach to greatly improve performance on some instructions. For example ROL

AX.CL

Rotate AX
left CL times

DIV

BX

Divide AX by BX

In the 8086 and 8088, the "ROL. .. "
took eight clock cycles plus four additional clock cycles per bit rotated. The
80186, 80188, V23, and V30 require
only five clock cycles plus one additional cycle per bit rotated.
In addition, these newer processors
limit the maximum value of the CL
register to 31. This eliminates the
possibility of tying up the processor
with a bunch of meaningless shifts.
The newer processors do even better
with the "DN ... " instruction. In the
8086 "DN" takes from 144 to 162
clock cycles. In the 80186 it takes 38,
thanks to an improved shifter. Another device, a barrel shifter, can shift
multiple bits in a single clock cycle; it's
included in Intel's new 80386.
Since other instructions such as multiplies and divides use a lot of shifts,
the increase in shift speed improves
the overall speed of the processor.
Clock Speed
Clock speed is also significant in
processor performance and some of
the new ICs are running significantly
faster than their earlier cousins. Of
course there are also limits imposed by
memory and I/O devices.
In Sum
All the features I've mentioned can
affect speed, and many manufacturers
are working diligently to improve their
devices.

It's easy to design machines that run
faster, but productivity improvements
don't always keep up with increased
processor speed. I/O device speed and
software quality are major bottlenecks.
Now if we could just get faster software writers ...

Features:

Include Files
Listing Control
Cross Referencing
Nested Conditionals
Sorted Symbol Table

Disk & Manual •....••••••••••• $100.00

Write or call for Information on these and
other products.

HAWTHORNE TECHNOLOGY

•••

8836 S.E. Stark
Portland, OR 97216
(503) 254·2005

BIG BOARD
HARD DISK

$395. 00
For a limited time only, buy the Advanced Concepts "Mini-Winnie"
Controller package for the Big Board" and 820, and receive a 5
megabyte hard disk drive"" for only $60.0011 This is an introductory offer
and will not last for long, so don't delay!
Package Contents·
- 5 mb hard disk drive
- Controller board, assembled & tested
- Disk drive cables (length 1')
- 8" floppy with formatter, diagnostic, autopatch BIOS source
- Technical documentation & users manual
- 90 day full refund guarantee
Available Options·
- Extended disk drive cables (length 3') .....................
- Extended controller to host cable (length 1') ..............
- DC power supply, for disk drive only .......................
- DC power cable for disk drive .............................
- Enclosure for disk drive and supply ........................

$ 8.00
$ 6.00
$59.00
$ 4.50
$35.00

The "Mini-Winnie" board measures just 3.75 x 4.90 x 0.5 inches, and
installs directly into the Z-80 socket of your computer. Based on the
popular WD1 01 0 controller chip, it is fully ST-506 compatible and
supports advanced features such as true CRC error detection, multiblock transfer, implied seek and more. With the use of the on-board
sector buffer, sectors of 128, 256, 512 or 1024 bytes are easily transferred
using direct I/O. Shipped ready to install for the Big Board or 820, this
package delivers hard disk performance at floppy prices. Order yours
today!

C

oc
l

Advanced Concepts
Engineering • Consulting
8926 S.W. 17th Street
Boca Raton, Florida 33433

TO ORDER: can (305) 482·7302 Terms: UPS Cash COD, Check or
Money Order. Please allow 4 weeks for delivery. Florida residents add 5%
Sales Tax. Dealer and OEM inquiries invited.
·Trademark of Digital Research Computers ofTexas

Micro Cornucopia, Number 27, December-January 1986

• ·SA-604 orequivalent hard disk drive, while quqntities last

59

With the MRS/OS Source Code,
you can see the light.

SPECIAL FREE OFFER TO
8" DISK USERS!

If you own a CP/M compatible operating system,
you've had to put up with the mistakes and quirks
of someone else's programming. Until now. Now
you can see the light with MRS/OS. In fact, MRS is
a full operating system designed to replace CP/M
2.2 or COOS and it comes with complete source
code. MRS is designed for Z80 processors, runs
CP/M software, and can interface directly to a
CP/M BIOS, saving you a lot of sysgen time.
With MRS, you get more than what you pay
for. For under forty dollars you receive fully
commented source code for standard and
extended BOOS functions, a sample, BIOS, our allin-one utility package and a 130 page manual.
So if you're tired of being in the dark with some
other guy's program, here's the answer to your
prayers.

ACT NOW and receive our ultra-fast, flexible disk
format program, FREE! FORMAT can format a 77
track 8" disk in just 25 seconds and provides you
with four of the most common disk formats
used with CP/M based systems:
• 8" SSSO 128 byte sectors, 26 sectors/track,
76 tracks
• 8" SSOO 256 byte sectors, 26 sectors/track,
76 tracks
• 5.25" SSOO 256 byte sectors, 18 sectors/track,
40 tracks
• 5.25" SSOD 512 byte sectors, 10 sectors/track,
40 tracks

.----------------------

I
I
I YF.S! Please send me _ _ MRS/OS Source
I
for just $39.9'5 each on 0 8" SSSD disk or
I Code(s)
I
(indudes shipping & handling in
o '5 1A" Kaypro format disk. If I act right now, I'll
N. America; overseao; add S 12 )
I
I
receive a FREE FORMAT program included on the
•
Ma'i.<;. onlers include ,)'X, sales tax
I disk
I
(8" disk users ONlY).
Order by phone 24 hours a day!
I
II 0 VISA/Mastercard
expo date - - - - I
(617) 478-3102
~ I
(circle one)
I
Tech. inqUiries: 7:3Opm-1O:30pm EST (Wed. ONLY)
I 0 Check
I
~=-::::::=(T=e:::c:::h.:::::I:::::in.........
e closed August 7 & 14)
I 0 Please send more information
I
I Nar.ne _____________________________________
•
I Address _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
I City _ _ _ _ _ State _ _ _ __ Zip _ __
I Phone ________________________________
I
I Send to: OCCO, Inc.
•
28 Claflin St., Milford, MA 01757
•
I
--J_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ . .

$39

95

# ____

Inc.

•I•
•

CP/M is a regislered lrademark of Digilal Rt:search Corp.
_ _ _ _ _C_'D<_)S_i_Sa_r_egt_·sl_ere_d_lra_d_e_mark_o_f(_:rt_)m_t."_m~_·()_c_()rp.;..._ _ _ _ _

60

Micro Cornucopia, Number 27, December-January 1986

Pascal Procedures
By John P. Jones

Even the cheapest dot matrix printer
is capable of creating very high quality characters. If you understand the
graphics modes for these printers and
a little Pascal you can create your
own character sets and type faces. In
this issue John covers the theory and
practice of making a great impression.
Many of the newer dot matrix
printers provide a Near Letter Quality
(NLQ) print mode in addition to the
normal draft quality. Since I have an
occasional need for higher quality
printing, but can't justify a new printer, I decided to emulate NLQ printing
with a Pascal program. The idea is
certainly not an original one - there
are several fancy print programs on
the market. Written for a Star Micronics Delta 10 printer, the program can
be easily modified for any printer
which has bit mapped graphics capabilities.
Printer Problems
The problem with draft mode printing on inexpensive printers is that
they print a minimum number of dots
per character. The standard arrangement for a 9 wire print head is a
character 9 dots high by 12 half dots
wide. In practice, however, characters
are usually only 7 dots high (either the
top 7 wires in the printhead or the
bottom 7). Also, horizontal dots are
spaced quite far apart.
Bit graphics are handled quite differently. Every dot must be specified.
The standard method for this involves
a command to enter the graphics
mode followed by the number of dot
columns to be printed in the current
pass, and finally the string of dot data
bytes. Normally 8 dots can be defined
for each dot column.· It will depend on
the model of the printer whether the
top dot of the print head is the high or
low order bit of the data byte.
The Delta 10 has three horizontal
densities for bit graphics. I chose 120
DPI because this is the same dot
density as standard 10 pitch print - 12
half-dot widths per character. In
graphics mode adjacent dots can be
printed at half-dot spacing. The printer
can also do fractional line feeds, as

6245 Columbia Ave.
St. Louis MO 63139
(314) 645-1596

small as 1/144 inch (approximately half
a dot).
On the Delta, two print passes is
sufficient. A half-dot line feed between
the passes interleaves the dots vertically. The net result is a character formed
from a matrix 12 half-dots wide by 16
half-dots high with no restriction on
adjacent dots. This roughly quadruples
the total number of dots that can be
printed per character.
Designing The Characters
Here's the real work in this project.
Designing the characters is tedious,
and it's easy to make mistakes converting dot patterns to numeric values.
Plan on using lots of graph paper. I
designed my characters manually (actually I borrowed most of them from
another printer) and used a quick and
dirty program to enter the data into a
file. A good project would be to write
a screen oriented input program that
would show the dot patterns as they
were entered.

Listing 1 is the program for printing
a text file in NLQ mode, and Figure 1
shows normal draft mode, print pass
1, print pass 2, and full NLQ print.
The program is straightforward and
explained in the comments. Modifying
it for other printers should not be too
difficult as long as you use the same
basic method for bit image graphics.
The places where changes may be
needed are in the procedures PREFIX,
HALFDOTLF, and in the body of
procedure PRINTNLQ.
Expect the printer to take at least 3
or 4 times as long to print your text. I
have a parallel interface to my printer
so data transfer doesn't take long, but
with a serial printer (and no buffer)
you'll notice a big delay between passes of the print head. The way the
program is set up, as many as 964
bytes have to be sent for each print
pass. At 9600 baud that's about a
second just to get the data to the
printer.
(continued next page)

Figure 1 - Examples of Printing
This is an example of draft mode print, 10 CPl.
This is one pass of NLQ print. pass # 1.
Til...
CHII' ... d·.·. III" Nl.f.1 ","Inl., .... 1' ••• II .:.!.
This is an example of full NLQ print, both passes.

Listing 1 - Printing a Text File in NLQ Mode
program print-ftear-letter_quality;
{

Written for Turbo Pasoal V3.00 for CP/M-80 and designed to
be run as a COM file. To run in memory mode, make the ohanges
as oommented for running with Turbo version 2. Uses printer
oodes for Star Hioronios Delta 10 printer but oan be modified
for use with other bit mode graphios printers.
type
pass

= array [0 •• 11]
ohardeso = reoord

of byte; { dot oolumns for 1 pass of 1 ohar }
{ file storage reoord of ohar dot data }

oh : ohar;
pass1
pass;
pass2 : pass;
end;

passes = reoord
pass1
pass;
pass2 : pass;
end;
anystr

{ array element for memory dot patterns }

= string[255];

var
desofile : file of ohardeso; {dot pattern file}
infile : text;
{ text to print }
infilename : string[16];
{ text file name }
inpdesc : ohardeso;
{ temporary for reading dot data file }
passdat : array[' •••• -.] of passes; {memory dot patterns
line : anystr;
{ text line to be printed }

Micro Cornucopia, Number 27, December-January 1986

61

PASCAL PROCEDURES _ __
(continued from page 61)

Listing continued from page 61

PROCEDURE printnlq(s:anystr);

Augmenting Your Program
There are many ways this concept
can be expanded as has been done in
the commercial programs. You could
develop many different type styles
(Gothic, futuristic, etc.), set it up for
different character pitches, set up for
more than 2 print passes to extend the
characters vertically, or use more than
12 columns to define a character and
thus extend it horizontally. The font
data file could also be expanded to
define as many as 256 unique characters. (Actually, if the input is a text file
you could never print the character
associated with ctrl-Z, since that
would be seen as end of file.)
Without the font file, this program is
not of much value, so I have sent that
file and associated maintenance programs to Micro C's bulletin board.
Briefly, the files are:
HOW2NLQ.DOC - BRIEF documentation for this set of files.
MAKENLQ.PAS - creates an empty
font file for data entry/update.
EDITNLQ.PAS - font data entry/
update program.
DUMPNLQ.PAS - prints the entire
font file, each char as a 12 X 16 char
matrix. Pass 1 dots are printed as '*'
and pass 2 dots as ' + '. Simple modification to dump to screen.
PRNTNLQ.PAS - the same program as Listing 1.
ASCII2.NLQ - my current ASCII
font file.
All are pretty much "bare bones,"
but they get the job done and provide
a starting point for the real fancy stuff.
For those of you without a modem,
if you send me a blank, formatted disk
(either 5 1/4" Kaypro CP/M-80 format
or 8" SSSD CP/M-80) in a REUSEABLE mailer and $5 to cover return
postage and refreshments, I'll copy the
files for you.

•••

{ This procedure prints each line of input text as two passes of
graphics dot patterns with a half dot line feed between each.
var
i : integer;
PROCEDURE prefix(nchars:integer);
Send graphics mode command string to printer. For Delta 10
 'L' selects 120 DPI then the two binary bytes that are
the total number of dot columns to be printed, low byte first
begin
nchars := nchars * 12;
{12 half dot columns / char
write(lst,A[,'L',chr(lo(nchars»,chr(hi(ncbars»);
end;
PROCEDURE printpass(p:pass);
Send data for one pass of one character to the printer. The
calling routine has done the table lookup and passes the
data as a parameter }
At this point you could prompt for alternate font file
or pull an alternate font filename from the command line.
There should probably be a check for font file present here.
assign(descfile, 'ascii2.nlq');
reset(descfile);
repeat
{ Read dot patterns from font file, store in data array }
read(descfile,inpdesc);
passdat[inpdesc.ch].pass1 := inpdesc.pass1;
passdat[inpdesc.ch].pass2 := inpdesc.pass2;
until eof(descfile);
close(descfile) ;
{$i- turn off I/O checking so don't get runtime error if no text file}
infilename := paramstr(1);

comment out this line for version 2

assign(infile,infilename);
reset(infile) ;

try to open input file }

if ioresult <> 0 tben
if file open unsuccessful, scream }
begin
writeln('Input file empty I ',AG);
halt;
end;
{$i+ turn I/O checking back on
repeat
readln(infile,line);
printnlq (line) ;
until eof(infile);
end.

var i : integer;
begin
for i := 0 to 11 do write(lst,chr(p[i]»;
end;

PROCEDURE balfdotlf;
Tell printer to advance paper 1/144". For Delta 10 the
command string is  'J' followed by the binary # of
144ths to advance }
begin
write(lst,A[,'J',A a );
end;

begin

PROCEDURE printnlq

if lengtb(s) > 0 tben
begin
s := copy(s,1,80);

62

{ read and print each line from input file

anything to print?
not real fancy, truncate at max allowed chars

Micro Cornucopia, Number 27, December-January 1986

for i := 1 to length(s) do {remove all char codes for which no patterns}
i f not(s[i] in [' ' •• '-'1) then sCi] := , ' j
halfdotlf;
prefix(length(s»;

{ vertical registration is better if you do this }
{120 DPI graphics mode command}
{ now print the first pass of dots }
for i := 1 to length(s) do printpass(passdat[s[i]].pass1);
halfdotlf;
{ advance paper for second pass }
prefix(length(s»;
{print the second pass of dots}
for i := 1 to length(s) do printpass(passdat[s[i]].pass2);
write(lst,A[,'J',chr(22»;

finally, do 11 half dot line feed
to prepare for next line }

fffffHfflfHH

MICRO-LAB: ASINGLE BOARD COMPUTER
Iflffffffffff!ffflflffffffffflffffffff
f

f

end
else writeln(lst);

null string, just do line feed }

f

f

PROCEDURE printnlq }

end;
-

begin

f
f

{ Main program

f

PARAHCOUNT and PARAHSTR are features of Turbo V3. If you are using
version 2, comment out the follOWing 5 lines and use the marked code
instead }
if paramcount < 1 then
begin
writeln('No text filel',AQ);
halt;
end;

fffffffffffffffffffffffffffffffffffff

MICRO-LAB A/T-$179

KIT-$139

fffffffffffffffffffffffffffffffffffff

••••••• Use these lines for version 2 ••••••••••
write('Text file: ');
readln(infilename);
End of Listing

i.

$75 Complete*
HALF-OFF!

*Includes S/H u.s. &Canada.
Overseas add $20.00 S/H

Special Holiday Sale ends
December 31, 1985.
KAMAS is available for most zao, CP/M
Computers. Ask about your system!
VISA/MC Call: 503 - 649-3765, or Write:

KAMASOFT, Inc.

2525 S.W. 224th Ave., Dept. 211
Aloha, Oregon 97001
zeo

I

CPU-BOBS-3HHZ RAN-alS6 EPROH-a755
HEMORY- 4K EPROM/256 BYTES RAM/EXPAN
I/O PORTS- 32 PARALLEL LINES/SID-SOD
INTERRUPTS- 4 VECTORED INTERRUPTS
HEX SYSTEM- KEYBOARD AND DISPLAY
EPROM PR06RAHHER- PROGRAHS 8155
CASSETTE LOAD AND DUHP
INTERFACE-(40 PIN) BUS AND PORTS
SUBROUTINES- KEYS/DISP/INT/DEBU6
MANUAL WITH DRAWING

KAMAS,
&CP/M are trademarks of KAMASOFT,
Inc., Zilog, Inc., & Digital Research Inc., respectively.

ORR CORP.
P.O. BOX 9433, CINCINNATI, OH 45209
CHECKS, VISA/HCI
EXP. DATE
ADD 13 SHIPPING OH RES. ADD 5.5% TAX

Outline Processing
and More for CP/M!
As an idea craftsman, you use your mind
like a skilled pair of hands. You take hold of
concepts, then manipulate them to
discover, refine, convey dynamic new
thoughts.
Now, the tool that can strengthen your
creative grasp is well within your reach.
KAMASTM, a revolutionary outline processor
from KAMASOFT,· supports your thinking
process and keeps you in touch with your
ideas. That's because KAMAS is designed
to work the way your mind worksnaturally.
Begin by brainstorming. KAMAS enables
you to jot down ideas quickly, as you think
of them. If you want to elaborate, you can
add text with full screen editing.
Then develop your ideas using a familiar
outline format. Change the structure as
easily as you change your mind. Move an
idea and all attached text moves with it.
KAMAS puts full control at your fingertips.
You can keep track of your main line of

Micro Cornucopia, Number 27, December-January 1986

thought by collapsing the details from view.
Then, expand the outline to develop the
specifics when you need to. By collapsing
and expanding portions of the outline, you
can maintain an overview and literally see
how your ideas fit together.
And KAMAS is fast. Your ideas remain at
your fingertips. KAMAS can locate and
retrieve by keyword - even a misspelled
one - in less than a second per topic file.
Use as much of the power as you feel
comfortable with. KAMAS is menU-driven
with over 100 on-line help screens. But you
can also open the hood to find a high
performance programming environment
with the additional horsepower you may
need to get the job done. An active user
community and the KAMAS Report newsletter keep you in touch with the latest
KAMAS applications.
Bring your ideas
to life with. . .

"'IJMall
fti
~

TM

63

Toll Free Order Line

EPIC SALES

Order Line: 1-800-223-EPIC
9AM-8PM CST

132 Walnut-Plano Center
Garland, Texas 75042

EPIC SALES WINCHESTER SUB SYSTEMS
Featuring Drives By Seaga te
XEROX 820,820-II,BIGBOARD I,KAYPRO III IV

8-1 00,Z-1 00

•

Supports CPM 2.2 operating system

•

Supports CPM 2.2 operating system

•

Host board plugs Into Z-80 socket

•

Host board plugs Into S-100 BUSS
XEBEC S-1410 controller board external In cabinet

•

WD 1002 controller board external In cabinet

•

•

Boot CPM from 8" or 5 114" floppy

•

Boot CPM from floppy (8")

•

Easy Installation

•

Easy Installation

Fast & Efficient Servlcel

Complete documentation package Is available for $35.00.
This package Includes all manuals and software on a diskette (If required).

All orders are expedited as a matter of our regular polley.

The $35.00 Is refundable with the purchase of a Winchester sub-system

We are proud to have achieved our goal of shipping most orders

from EPIC SALES.

within 24 hrs. of receipt•
S.agat. ST-212

•• agat. 8T-225

1/2 High (Low Pow.r)

112 High

Erwin 110
Tap • • ackup

Typ. of
Sy.t.m

10 MEG
Int.rnal

10 MEG
Ext.rnal

Dual10 MEG
Ext.rnal

20 IIEG
Int.rnal

20 IIEG
Ext.rnal

IBM-PC a
~OMPATIBLES
TI PC a
COLUMBIA

$599
$699

$799
$899
$949

$1199
$1299
$1349

$699
$799

$899
$999

$1399
$1599

APPLE

NIA

XEROX 820a
" KAYPRO

NIA

S-100

NIA

Int.rn.1

Ext.rn.1

$595
$595

$695
$695

N/A

N/A

N/A

$899
$999
$1049
$999

N/A

N/A

N/A

N/A

N/A

N/A

N/A

TECH SERVICE HOTLINE

1-YEAR FULL WARRANTY

SATISFACTION GUARANTEED:
Order your EPIC Winchester System now -

•

Every unit Is throughly tested before shipping and our

•

Call our service techniCians.

warranty Includes both parts and labor.

test It for 30 days, If not satisfied, return for

If you have a Question or a problem

Immediate refund!

5 1/4" HALF HIGH DRIVES

EPIC SALES SPECIAL

8" FLOPPY DRIVES

For IBM PC, TI PC, X.rox 820,

5 1/4" SEAGATE

SI.m.n. FD200-S
DSDD 8"FloPPJ Drly ••

and oth.r.

Epson SO-521

WINCHESTER DRIVES

(Shugart 850 Compatlbl.)

ST-212 10 MEG 1/2 HIGH

$185 NEW

ST-225 20 MEG 1/2 HIGH

$399
$499

8" DRIVE SUB-SYSTEM

40 Track, 48 TPI

DSDD

$119 NEW
Ca . .

Includ •• : (2) FDD - 200-8

a

PIS for (2) 5 1/4"

Half High Drly •••

DSDD Drly •• , V.rtlcal

WINCHESTER CONTROLLER & HOST BOARDS

Ca •• and Pow.r Suppl,

$569 NEW

DTC 5150BX IBM Wlnch ••t.r Controll.r •••••••••

$249

ZOBEX TI PC Wlnch ••t.r Controller ••••••••••••• $350
XEBEC 1410 Controll.r ........................

$249

Appl. Ho.t (X.b.c) .............................. $125

XEROX 820-1 & II

S-100 Ho.t (X.b.c) ............................. $150

DI.k Drly •• Cabl •• 5 1/4·•••••••••• $20

Multlbu. Ho.t (X.b.c) ........................... $ 185

DI.k Drly. Cabl. 8· ••••••••••••••••• $30

Software •••••••••••••••••••••••••••••••••••••••••• $35

8/5 Multlpl.x.r Box ••••••••••••••• $ 148
(Run 8· a 5 1/4· drly • • • lmultan.ou.I,)

X.rox a Blgboard Ho.t (Epic).... ••••••••• .... .... $85

Tech. Info. (214)272-6724 ~
TERMS:

(SA-455 Compatlbl.)

$72

POWER SUPPLIES
IBM-PC Replacam.nt 135 Watt

$135
Bo.h.rt XL81-5830R
81 Watt. Maximum
• 5/8A,+12/5A, -12/1A

W •• t.rn Digital 1002-o5HDO .................... $295

TOLL FREE ORDER LINEI

1-800-223-3742

Master Card, Visa, American Express add 3'1(, service charge. Allow 10 days for

$39
Store Hours:
9-8 M-F•••9-1 Sat.

checks. $4.00 Minimum UPS charge. $1.65 for COD. Texas Residents 6 118'1(, Sales Tax.

64

Micro Cornucopia, Number 27, December-January 1986

NSWEEP And The 32032/MS-DOS Interface
Excerpts From Talks By Dave Rand At SOG IV

Dave Rand is well known to the
public domain community for creating
NSWEEP, a file transferring and
handling utility that is at least as
famous as Turbo Pascal. Dave's work
on the DSI-32 has kept him in the
computer community's spotlight, so
we were doubly delighted to have him
speak at this summer's Get-together.

I developed NSWEEP because
wasn't satisfied with SWEEP. The
original SWEEP was written in PL1,
the different research compiler, and it
was really good. In fact, I thought it
was one of the best programs I'd ever
seen. The only problem was it took up
38K on my disk, and I couldn't afford
that much space. But since I really
liked its features, I decided to build an
assembly language equivalent. That
was the origin of NSWEEP.
NSWEEP In The Public Domain
The first public domain release of
NSWEEP was version 1.41, and thank
goodness no one still has it. Version 2
was the first one with the SQUEEZE
algorithm added.
People have asked me why I didn't
sell it. Good question and easy answer.
Because NSWEEP is in the public
domain, I've received a lot of positive
feedback from people who use the
program. If it were commercial, I don't
think I would have had that kind of
response. I would have been a lot
richer, but I'm not in it for the money.
The other reason I work through the
public domain is that when I first got
into CP/M programming I was lost. I
had no idea what CP/M was all about.
I started to fumble my way through
CP/M, and it was pretty tough. When
I found out about public domain and
bulletin boards, I thought, "This guy
is obviously insane. He's put up his
computer as a remote access system.
People are just calling in and taking
his software."
I couldn't understand the concept,
but as I used it I found I was actually
learning from other people and from
the way they were doing things. The
original SWEEP program was a perfect

example. I learned enough from that
program to enable me to develop the
NSWEEP program. But more than
that, I learned how to deal with CP/M.
So that was the other reason I contributed NSWEEP back to the public domain.
Q: What's the history of the
4KWASH program?
A: The 4KWASH program was a
precursor of SWEEP. The very first of
these file programs was called
CLEAN, and was developed by someone at Cal Tech. It ran only on Z80s,
not on 8080s. Its sole purpose was to
scan down files and collectively erase
them. Hence the name CLEAN, for
keeping the disk clean.
The author lost the source code. I
gave a copy of the COM file to Mike
~arras, who thought it was a great
idea, but terrible implementation. At
that point, he only had an 8080 so he
wrote the first version of WASH. In
the process of doing that he decided
that deleting files was real nice, but
there were a few other things he
wanted, too. So he added the LIST
option.
He needed a name for the program
and since the original name was
CLEAN, he called his WASH. SWEEP
came next, because if you're not doing
your wash, you're sweeping it.
Disk 77 came just before NSWEEP. I
had originally intended to modify Disk
77 to have all the features of SWEEP. I
went through the source code (typical
assembly language programming) and
I said, "I can do a better job than
this." So I started from a blank screen
and added the file delete, then the
login, then the space, etc., and built
up the command set from that point.
Inside NSWEEP
Q: What are the undocumented flags
in NSWEEP?
A: The most common question I get.
I was called at 4 in the morning by a
person who had set his files to system
in read only, and he couldn't unset
them.
The Y command is an extension of
the Mass commands, (M and the Q).
First you tag the files (with the wild
card W or the T), then you hit Y, and

Micro Cornucopia, Number 27, December-January 1986

Definicon Systems, Inc.
21042 Vintage St.
Chatsworth CA 91311
818-341-5654

it asks which flags you want - either
1 through 4, R, S, or A (R is read
only; S is system; A is archive).
A lot of people have asked me what
the 1 through 4 are for. They're referred to in the MP/M documentation
as "compatibility attributes." They determine how MP/M responds to a
COM file. If you have a COM file
which opens the same file more than
once, MP/M normally blows up on
that error, because you're trying to
open a file that's already open. By
. setting the compatibility attributes,·
you can say, Look, I know that this
program does that, but it's okay."
That's what they're used for in the
MP/M sense. If you aren't running
MPM, you can use them for highlighting files.
Let's say, you have a disk that
contains your normal working software, and you like to give your public
domain software to people. You want
to set up a disk so you can just copy
that disk. Compatibility attributes let
you do that.
If you have the reverse video enhancement patched into your version
of NSWEEP, you can see the attributes
on the filenames as reverse video
characters! u~derlined characters, or
blinking characters. Then you run
down your file list, tag the files you
want with the 1 through 4, which are
the first four characters of the filename, and then give those away as a
common set.
There really aren't any undocumented flags. You can't have any more bits
than those in the file name, because
that's all CP/M knows about. You can
set files that are currently Read Only
or System back to directory status.
You can use a D for any character that
isn't - R, S, A, 1, 2, 3, 4.
Q: It can reset all the bits?
A: It resets all the bits except the
ones you've specified, unlike other
programs that only set certain bits, like
STAT.
Q: Does any capability exist to tag
all the files that have one of those bits
on?
A: No. About 20 people have asked
me for that. If you had an operating
II

(continued next page)

65

NSWEEP ________________________________________________________________
(continued from page 65)

system that resets the archive bit, you
could tell it to tag all the entries that
aren't archived and then back them
up. You'd then have a better means of
dealing with your files.
Q: I still don't fully understand
archiving.
A: In NSWEEP, if you tag files and
then do a mass operation on them,
they get marked with a # sign instead
of a star. That indicates that they used
to be tagged but aren't anymore. The
Again command retags those files that
have a # sign beside them. So you
would say Again, which would retag
those files, Y, to go into set status,

Z

and then 8 to reset the archive bit on
those files which you backed up.
Q: How do you deal with programs
like WordStar that reset those bits?
A: WS doesn't reset them directly only when you modify a file.
Q: SO if you go in and edit a file, the
backup file will have the bits set, but
the new file won't.
A: That's correct. Now, believe or
not, that's a feature because it allows
you to use this archive bit feature of
CP/M if your BDOS supports it. If it
copied all the attributes of the old file,
obviously you'd have problems.
Q: Why isn't there a feature to move
a file from one user area to another
user area without copying it?
A: That feature bent my head so
much you can't imagine. The original
version of NSWEEP had it, but I had

SETSYOU

FREEl

Z Operating System, an 8-bit OS that flies I Optimized HD64180/Z80 assembly language
code - full software development system with proven linkable libraries of productive
subroutines - relocating (ROM and RAMI macro assembler, linker, librarian, crossreference table generator, debuggers, translators and disassemblers - ready to free
youl
High performance and flexibility! Productivity results from dynamically customized
ments., matching operator, tasks and machine.

as environ-

Real-time control kernel option allows quick software development for industrial control
applications, other tools and utilities for office desk-top personal computing functions, local area
networks to Ethernet AppleTalk, Omninet ArcNet PC-Net (Sytek)- from micro to mainframe
command, control and communications. Distributed processing application programs are easily
developed.

to pull it out because I had to make
direct file calls to do it, and it didn't
work on CP/M 3.0, MP/M, or Turbo
DOS. I could see no way of actually
resetting that user number without
going through a BIOS call.
Then Jim (a friend of mine who's
written lots of good public domain
programs, including the SQUEEZE
section of the current NSWEEP)
showed me up again. We were talking
and he says to me, "Why don't you
set the reserved bit and issue a close?"
I said, "What?!" And he repeats, "All
you have to do is set this undocumented bit here, and issue a close,
and it works."
You can do it in one of two ways.
The rename function has two modes.
The first one is renamed on a file
basis. So if you say R, it asks for a
new name. Let's say you're in drive B:
user 0 and you've got the file
NSWEEP.COM. You want to change
that to user 14. You say
"14:NSWEEP.COM", and it moves

NEW ••• FLOPPY DISK
CONTROLLER BOARD
FOR THE

XEROX 820-11
Direct replacement for
the standard 820-11 Floppy
Daughter Board. Uses the
FDC1793/9229B for reliable
operation. Perfect for
surplus 820-11 boards.

• Extreme organizational flexibility, each directory another environment
• Multiple Commands per line
• Aliases (complex series of commands known by simple names) with variable passing
• Named Directories with absolute password security
• Full-screen command line editing with previous command recall and execution
• Shells and Menu Generators, with shell variables
• Command-file search Paths, dynamically alterable

Assembled/tested ................ $109.95
Complete Kit.. .......................... $79.95
Bare Board w/9229B ............ SS9.95
Bare Board w/DOC ................ $39.95
Indude $3.00 Shipping
VlSA/MC
COD Add $1.50

• Screen-oriented file manipulation and automatic archiving and backup
• 512 megabyte file sizes, 8 gigabyte disks handled
• Auto disk reset when changing floppies
• TCAP database handles characteristics of over 50 computers and terminals,
more easily added
• Tree-structured online help and documentation subsystem

REPAIR SERVICE

• 76 syntax-compatible support utilities

XEROX 820 1/11

Your miSSing link has been found - ZI Now fly with eaglesl Fast response, efficient
resource utilization, link to rest of computing world - shop floor to executive suite,
micro to corporate mainframe. Call 415/948-3820 for literature.

~

E.!J Echelon, Inc.
66

BIG BOARD I

THE DATA MILL
12 Crescent Court
Montgomery. IL 60538

312-892-6573
101 First Street • Suite 427 • Los Altos, Q\ 94022 • 415/948-3820

Micro Cornucopia, Number 27, December-January 1986

the file from user 0 to user 14 in an
operating system independent manner.
The second way is the wildcard
mode. Let's say you want to take all
the files in user 0 and move them up
to user 14. You say "Rename[carriage
return]." It says, "Old name." You
say, "BO:*. *". It says, "New name."
You say, "14:*. *[carriage return]".
And it moves all the files from user 0
to user 14 with no interruption on
your part, and it doesn't copy them.
Q: There are a couple of us who
have non-video Kaypros. Is there any
provision to patch NSWEEP so it can
let us know about the bits?
A: A user group in Vancouver wrote
me about how they did that. They
made the "reverse video on" attribute
be a left bracket. The "reverse video
off" is a right bracket. It screws up the
display a little bit, but it works.
Q: I've been using the Verify func. tion, and it works great on mass copy,
but I'm having trouble using it on

CPM-80 LIVES
ON YOUR PC
CP/Mulator puts a 4mhz 8 bit
CPM-80 emulator in your IBM-PC
for only $99.
• Execute 8 bit CP/M programs at
4 mhz. Stop waiting around for
those slow software emulators
at twice the price of this speed
demon!
• CP/Mulator makes a fantastic
CP/M development environment
and allows you to use all your
CPM-80 tools, and the IBM-PC
tools too!
• Why write off that expensive
package that you bought for
CPM-80 just because you upgrade to a IBM-PC? Apply the
$99 solution and keep it working.
No retraining or conversion
blues!
• CP/Mulator includes the NEC
uPD70108 processor which increases the speed of your
IBM-PC by at least 10%. 100%
compatible with existing IBM-PC
software and 8087 compatible.
PURCHASE THE SOFTWARE
ALONE FOR ONLY $69!!
Source Information
P.O. Box 2974
Warminster, PA 18974
Phone (215) 628-4719

You type CO V, and NSWEEP says,
"I'm smarter than he is, so I'll copy it
to a file called CO on the current
drive."
Here's how to get around it. You
put in a colon which tells NSWEEP it's
a drive user specification. Don't forget
the space; it has to go in there. And
that solves the problem, although it's
not an ultimate solution. In the new
version, there's an installable option
that lets you chose whether you want
to verify all the time or not.
Until Dave McCrady, a bulletin
board operator in Edmonton, thumped
on me for a month, I didn't put the

individual files.
A: Real common problem. I had to
make a decision on how I was going
to implement that.
You're sitting on NSWEEP and you
issue a C. It asks you for a new file
spec. Now that differs from the move
which asks you only for a drive and a
user number. I was trying to accommodate people who are just copying in
between drives with the copy command by allowing these forms: C, CO,
CO:, and other similar forms. And you
can even type things like 14, which
means "Current drive, user 14." You
don't have to put the colon; it just
figures it out.

(continued on page 69)

FOR 820, BIG BOARD OR
OTHER SINGLE BOARD COMPUTER
High Res 12" Motorola Monitor
Big 200 Watt Power Supply
All Wired Up & Ready To Slide in Your SBC

$169.00

A BEST BUY
Beautiful· Keytronics full paraliel ASCII (hooks right up to
820 or BB) Keyboard with numeric keypad/function keys.
$ 39.00
A Best Buy
Extra for Keyboard Enclosure
$ 15.00
MONITOR ONLY .•............... _.••.... _•... $ 59.00
BIG POWER SUPPLY ONLY... " .•.....•.. _•.• $ 35.00
MATRIX KEYBOARDS ......... " . _.... , ...•... $ lS.00

8" Disk Drive Shugart 810 Half Height ...•. _... $ 99.00
2 8" Disk Drives in Enclosure with power .....• $299.00
2 SV." Disk Drives in Enclosure ................ $149.00

ENTIRE 820-1 SYSTEM IN ENCLOSURE
WITH KEYTRONICS KEYBOARD
with 2 8" Drives ...•....•....•......... ; ... $699.00
with 2 5'14" Drives ................•........ $599.00
with Diablo 630 Printer add ................ $899.00
(Diablo soid only with complete system)

DIGITAL RESEARCH CP/M WITH BIOS FOR 820·1 OR
820-11 INCLUDING LICENSE AND ALL MANUALS
100 AVAILABLE ................................. $35.00
ENCHANCED MICRO-CODE OPM BOOTABLE DISC
SPECIAL WITH COMPUTER ONLy .............. $45.00
CENTRONICS PARALLEL PRINTER CABLE
820-1 or 820-11 ................................ $35.00
PARALLEL DRIVER(COM FILE) .................. $15.00

SPECIAL ON CP/M
SOFTWARE
CLOSEOUT
NEW LICENSED DISK
WORDSTAR 3.3 or 3.01 ......................... $99.00
CBASIC ........ _............................... $40.00
DATASTAR ...................................... $50.00
SUPERSORT ............. __ .. _. _............... $50.00
SPELLSTAR .................................... $45.00
MAILMERGE ................................... $50.00
CALCSTAR OR SUPERSORT
FOR APPLE CP/M .............................. $50.00
*New AUTO LETTER for Dbase 11*
Write form letters or normal letters automatically
to your clients, customers or anyone in your database
without typing names and addresses!
Also does single or multiple envelopes or labels.
Add your own forms or letters ................... $99.00

C R A IG ' S
COMPUTERS

Micro Cornucopia, Number 27, December-January 1986

(213) 379-1342
67

Do it yourself ...

A new magazine for publishers, graphic artists, editors,
writers and others interested in using personal computers
to publish information electronically or on paper.

IJhis is the magazine you've
been waiting for. Issues contain
tutorials on using page make-up
software, techniques for
integrating text and graphics, tips
on producing mbre appealing
graphics and typography, and
helpful information about data
communications and electronic
publishing.
The bi-monthly magazine covers
the latest products for the
newly-emerging desktop
publishing market, including
laser printers, scanning
equipment, page make-up
software, archival storage
devices, and topics of interest to
people who do their own
electronic or paper publishing.

r

*

File

Edit

Style

Font

Layout

Rrrange

Fill

Lines

Pen

A new magazine for publishers, graphic artists, editors,
writers and others interested in using personal computers ...... :
to publish information electronically or on paper.

~isi~them~g6Zine:YOu've~

:

~

:

~

~:

:contei n tutorials on using:

.

:

.:

:.

.......... ~~.~~. r:t.Eli.tit:1.!1.~9.r, .. I.~~.l!~.~ .. :........ :........ :........ :........ : ................ :........ :..... .

:page m:eke-ull:90ftwere.:
:techniques for. int

.

ling:

:

:

: :

t--r--t=i=1~

D
D
D

The cover price is $5, but you can save $11
by ordering a subscription for $24 and paying
with your order. You'll get seven issues
for the price of six! And there's no risk -- you
can cancel after the fIrst issue for a full refund!

DESKTOl PU~If\.n

$24

USER'SGUIDETOCPiM

$22

PCUSER

$22

~----------------------Address ____________________

City--_ _ _ _ _ _ __
State, Zip ___________

We also publish User's Guide to CP/M,
devoted entirely to CP/M computer users, and
PC USER, a new magazine for users of
PC-compatible computers and MS-DOS
software. Each magazine is $22 for a
six-issue subscription. Send payment now
and get seven issues for the price of six!

MCNisa _ _ _ _ _ _ _ _ _ __
Exp.Dme _ _ _ _ _ _ _ __

Me

!

2055 Woodside Rd. #180,
Redwood City, CA 94061
415-364-0108 BBS: 415-367-1029

Mel Mail: Tony Bove
CompuServe: 70105,722
The Well: t-c

DESKTOP PUBLISHING: for anyone who publishes Information using computers.

68

Micro Cornucopia, Number 27, December-January 1986

NSWEEP _______________________________________

256K
RAMDISK
KIT
Now Only

$69. 00
• dynaDlskmakesyourspelling
checker,. assembler, or compiler
programs run 35-300 percent
faster.

• dynaDlsk is a 256k ram board
that uses 5V at 1hA and plugs into
BB1 's parallel interlace (J5). It
comes with auto-patching software that makes it look like an 8"
SS SO disk drive to CP/M. It uses
4164 ram chips. regular TTL. and
transfers data 8-10 times faster
than a regular floppy. See Micro
C #9 for a description and MC #11
for a review of dynaDlsk.

For $69. 00 You Get:
8~" by 6%" bare PC board
Software on 8" SS SD floppy
(SOURCE INCLUDED)
Assembly & Operation Manual

Bare Board Only: $39 95

820 OWNERS
820~11 OWNERS
• Your hardware will work with
minor modifications. Software
patches are included in the manual for 820-11 owners. See MC #17
for info on adapting Dyna to the
Xerox 820.
ALL ORDERS: Please add 55.00 for
postage and handling. All orders shipped
first class. Satisfaction guaranteed.
Please, no COD's, PO's, or plastic money.
QUANTITY PURCHASES: Buy five of
one item at one time and get one free! Buy
ten, get two free, etc.
Send check or money order to:
P.O. Box 5246
Bend, Oregon

L.A. Software :~~9-3452

(continued from page 67)

verify command in. When I design an
operating system, it does verification
on the sector level where you have an
opportunity to retry and correct your
mistake.
At the BDOS level and at the application program level, you have no
opportunity to retry. All you know is
something's gone wrong. Most BDOSs
today are not as adequate as they
could be. I've allowed you to install it
to verify all the time, so if you're
running on a BDOS that doesn't have
a built-in verification feature, NSWEEP
will do it for you.
32032 MS-DOS Interface On The DSI32
I was responsible for porting all the
compilers and interfacing the 32032
operating system to MS-DOS (the
8088/8086 operating system) on Definicon's DSI-32.
There are two parts to the software
interface - the 32032 operating system
which is resident on the DSI-32 card
and handles all the requests of the
32032, and MS-DOS which is resident
on the PC.
lf you want to open a file, for
example, you set up a few registers
and issue a service call to open the
file. We hand off the 110 processing to
the 8088 or 8086 (which works well as
an 110 processor since it has substantial memory for buffering).
The interface between the two operating systems is handled through a
dual port memory arrangement (both
the 32032 and the 8088 can access the
32' s memory) and through the segmentation architecture. It was the only
way we could interface the PC architecture to the 32032' s wide addressing
range. The PC can address only 1
megabyte at a time.
Through this interface we've defined
a small section of RAM at the bottom
of the 1 or 2 megabytes in our card for
handling I/O requests.
When the 32032 wants to open a file,
for instance, it puts the request in this
special part of memory and interrupts
the 8088. The 8088 then processes the
request and resets a flag to tell the
32032 that it's finished.
The operatir.g system kernel on the

CP/ M is a trademark of Digital Research

Micro Cornucopia, Number 27, December-January 1986

32032 is much like a small UNIX
kernel (it has the standard OPEN/
CLOSE/CREATE/READ/WRITE type of
interface common to most operating
systems). All software (including compilers) works through this interface to
talk to the devices on the PC. The
compilers, for example, transfer
through data this interface at 256K
bytes per second - the limit of the
PC.
Q: Is the DSI-32 operating system in
ROM?
A: No, a PAL tells the 32032 to stop
(it executes a DIAG instruction - a
branch to itself) which prevents the
processor from executing code while
you're loading RAM from the 8088
side. When the operating system and
the program you intend to run is in t
memory, the 8088 flips a bit, which
tells the 32032 to start executing. No
ROMS, and no need for ROMS.
Q: How much space does the operating system on the DSI-32 occupy?
A: The local operating system takes
about 2K to 4K of memory, but we use
a bit more than that for module tables
and the C library. 32K is reserved, but
you could reduce that to 16K if you
needed those last few bytes.
Q: And if you want to use the PC
for multi-tasking with the DSI-32?
A: You'll need Concurrent DOS for
that.
Q: Can the 32032 read any segment
of memory on the PC?
A: Dual porting is uni-directional.
The card can't get control of the PC
bus. The 8088 always retains control of
the bus, an architectural limitation of
the PC. But that's not the case in the
AT.
The PC is the master of the bus, if
you will, and can move anything
within the PC address space to anywhere in the 32032 address space. But
the 32032 must ask the PC to move
memory. A full system call interface
on the DSI-32 handles that, so you can
do full screen updates, for instance, at
256K/sec (2.5 Megabaud).

• ••
69

High Resolution Graphics Using The NEe 7220
By N. T. Carnevale
High resolution graphics has come
into its own as smart graphics controllers have hit the scene. The 7220
does so much all by itself that designing new graphics circuits has become
almost trivial and 1024 by 1024 by 4
colors almost commonplace. Hitachi
has recently released the 63484 which
has many times the resolution as well
as a faster display time but the same
ease of use. These are the chips that
are leading the graphics revolution. If
you're thinking of writing software
drivers for a smart graphics board,
stay tuned.
Sophisticated graphics capabilities
are becoming increasingly common on
microcomputers, and most of the credit for this can be given to graphics
controller ICs. These devices perform
tasks that used to require dozens of
Ies - drawing characters, points,
lines, and geometric figures, and generating the video signals needed to
display the image on a monitor. By
handling line and figure drawing, a
graphics controller can free the microcomputer's CPU for other tasks.
The NEC uPD7220 Graphics Device
Controller or its equivalent, the INTEL
82720 GDC,is appearing in more and
more equipment with high resolution
bitmapped graphics. Some of these
products come with software, but
there are several "OEM-style" boards
that are essentially "code-it-yourself."
This article presents the low level
routines I use to run an S-100 graphics
board with the 7220.
It should take only minor changes to
make the graphics routines in this
article to make them run on all the
boards which contain the 7220.
Background
I set up an on-line data acquisition
system in my lab about three years
ago. The heart of the system was an II
o Technology AIDIA board (8 channels of 12 bit AID and DIA conversion)
mounted in a NorthStar Horizon.
This board performed both the data
capture and the data display functions.
The AID conversion was fast, but the
short-persistence oscilloscope I was
using for a display had an annoying
flicker. Also, the oscilloscope went

70

State University of New York
Neurology Dept.
Stony Brook NY 11794

blank each time the system sampled
data.
As soon as low cost, high resolution
graphics boards appeared for the S-100
bus, I decided to get one. The board I
chose used the NEC 7220.
The Chip
The 7220 has two basic functions.
First, it acts as an interface between
the system bus and the graphics memory (the image to be displayed). Just a
few bytes from the CPU are enough to
make the 7220 write data to or read
data from the display memory, or
draw points, lines, rectangles, circles,
arcs, or graphicS characters.
The 7220 is also· responsible for
translating the contents of display
memory into a video signal, complete
with sync and blanking pulses. You
control the screen format and sync
pulses via software. You can even
partition, zoom, pan, and scroll the
screen on command.
Hardware Requirements
As versatile as it is, the 7220 needs a
fair number of support devices including: clock, graphics RAM with refresh,
data buffers, address decoders, and
drivers for the monitor. Light pen,
display zoom, and DMA transfer between graphics and system memory
require additional hardware.
After considering several alternatives, I decided on the Pixeltronics
696GC96K. This S-100 board uses the
NEC 7220 to display up to three
planes of 32K bytes each for eightcolor displays, or a single 32 to 96K
plane of monochrome graphics. It provides all basic support circuitry. Its
lack of a DMA controller is not a
serious drawback for most applications.
Programming The NEC 7220
The Pixeltronics board came with full
schematics and timing diagrams, theory of operation and application notes,
and an NEC 7220 manual. There was
also an 8" CPIM disk with Microsoft
BASIC programs to put the board
through its paces. The software supported several different monitors and
sizes of graphics memory. It also included routines for monochrome, col-

or, interlaced displays, and non-interlaced displays.
Unfortunately, I don~t have Microsoft BASIC. Furthermore, my data
acquisition software was written in
Pascal.
Although the BASIC programs were
reasonably modular, it seemed easier
to rewrite the low-level graphics routines in Pascal from scratch than to
attempt to translate from BASIC. It
turned out to be more difficult than I
expected because the NEC manual was
rather obscure.
Later releases of the Pixeltronics
board came with a set of pseudocode
listings that would have made the job
much easier. As it was, I found someone who was using a different 7220based graphics board. He gave me a
listing of C functions that answered
many of my questions.
The low-level Pascal routines
presented in this article are based
partly on those C routines and partly
on examples in the NEC literature.
Choice Of Language
I chose Pascal rather than C for two
major reasons. First, all of our data
acquisition software is written in Pascal, and I didn't want to rewrite it just
to incorporate graphics. Second, Pascal
tends to be more legible than C.
A C programmer with some knowledge of Pascal should be able to
translate these routines with little difficulty, and may be able to generate
more efficient code by careful use of
C's special features.
I used Turbo Pascal because of its
convenient editor, speed of compilation, and fast integer arithmetic. I have
tried to avoid features peculiar to
Turbo so these programs should compile under other Pascals with little
change.
Low-level Routines
Unlike C80 or Pascal MT +, Turbo
Pascal produces Z80 code directly,
without generating relocatable files.
Therefore it is not possible to build a
library of routines that can be selectively searched by a linkage editor.
Instead, all routines must be in the
source file, or included at compile time
with the $1 directive.

Micro Cornucopia, Number 27, December-January 1986

I could have put all the low-level
routines in a single giant file, but the
COM files would have been larger
than necessary. Instead, I grouped the
routines into multiple "include" files,
each of which contains closely related
procedures. Then, by keeping track of
"external" references, I was able to
optimize code size by including only
those source files which were necessary.
(Editor's note: Because of the length
of the listings, we are not able to
publish all of them. Therefore, only
listings 1, 2, 3, and 18 appear here.
The rest are available on the Micro
Cornucopia bulletin board, 503-3827643.)
listing 1 contains board and monitor-specific constants. This file also
includes the commands and mask
bytes used to control and test the
status of the 7220.
GDCTYPE.lNC (listing 2) contains
TYPE declarations that simplify the
coding of some procedures. Although
I could have made this short file part
of GDCCONST or GDCIO (listing 3),
I felt it was best to keep TYPE declarations separate as a kind of reminder.
Low Level Routines
Most of the low-level routines are
straightforward, but some deserve special comment. The lowest-level functions and procedures are all in
GDCIO.PAS. Users of other Pascals
may find it necessary to replace Turbo
Pascal's ported input/output statements -

of bytes, and use pointer arithmetic to
facilitate transferring any number of
bytes between system memory and
display memory. This application of
pointers is a common practice in C,
which is more hardware oriented than
Pascal. The unusual construction pointer_variable: =
PTR(ORD(pointer_variable)+l);

is a dodge to increment a pointer,
circumventing Turbo Pascal's inability
to handle pointer arithmetic directly.
Other Pascals may require some other
trick, or none at all.
The 7220 reads or writes data at the
location in the display memory indicated by the cursor. The cursor address is
specified by 18 bits that indicate the
location of the target word in graphics
memory, and a "dot address" that
denotes which of the target word's 16
bits is to be tested or modified.
Procedure "curd" returns the cursor
position.
Procedure "initialize" sets up monitor-specific parameters such as the
timing of sync pulses, interlace/noninterlaced, lines per frame, and when
display memory can be accessed. I set
the DRAW ACTIVE bit so display
memory can be accessed at any time (I
prefer to see the monitor flicker so I
know something is happening.)

You can calculate the monitor related
parameters from specifications of the
monitor and algorithms from the
7220' s manual. Because the Amdek
310A manual didn't provide the relevant specifications, I had to work
these out by trial and error.
SETMON.PAS (listing 18) makes
sync mods easier for those of you who
also have to use the trial and error
method.
Other parameters set by this procedure include the starting address of
display memory, whether or not to
show the cursor, and what zoom
factors to use for graphics display or
write operations. This procedure ends
by telling the 7220 to use a solid
pattern for drawing lines, and to perform logical ORs when writing to
display memory (SET mode).
Demonstration Programs
_ The first program I ran to test the
Pixeltronics board was the simple
point plotter POINTEST (listing 17 on
bulletin board). This reassured me that
data was being written to display
memory, but the sync parameters
were incorrect so the display was
scrambled.
(continued on page 76)

Figure 7 - Computer Generated Graphics (see reference on page 76)

1IL.datum: =port[input...,port_number];
{get a byte}
port[output...,port_number]:=ou~datum;

{send a byte}

with syntax appropriate to their compiler. The functions '10' and 'hi' return
the bottom or top byte of a 16-bit
integer. The operators AND, OR, etc.,
perform bitwise operations on bytes or
words. If necessary, SHR (shift right)
and SHL (shift left) can be replaced by
DIV and multiplication.
The only serious violations of Pascal
style are in the procedures "wdat"
and "rdat." These procedures take
advantage of the representation of an
array in memory as an adjacent block
Micro Cornucopia, Number 27, December-January 1986

71

Listing 7 - GDCCONST.I NC

Uttle Board™/186 ••••

$495

High Performance, Low Cost PC·DOS Engine
Boots IBM PC-DOS

(not included)

( GDCCONST.INC--flle of various constanta
for NEC7ZZ0 chip on Plzeltronlcs board )
CONST

(*****************************************
board- and aonitor-specUlc deflnitlona
***************************************** )
I/o port asslgnaents
CMD-SIIJ
PARAM-.IOJ
FIFO-UOJ
GDCRD-.IIJ
aonltor constants--Incl resolutlon. sync paraas etc. )
MONHRES-576J
( horizontal resolutlon
MONVRES-43ZJ
(vertical resolution)
MONHS-4J
( horizontal sync width)
MONVS-6J
( "ertlcal sync width)
KONHFP-3J
( horizontal front porch width
MONHBP-6 J
( hor i z back porch )
MONVFP-5J
( "ert front porch)
MONVBP-UJ
( vert back porch)
line type de flni t Ions
SOLID-'FFFF.
DOTTED-n999J
DASHED-'C3C3.
HIXED-UIB7.

• Three times the COMPUTING POWER of
aPC
• Data and File Compatible with IBM PC,
runs "MS-DOS generic" programs
• 8 MHz 80186 CPU, DMA,
Counter/Timers, 128/512K RAM/zero
wait states, 16-128K EPROM

• Software Included:
• PC-DOS compatible ROM-BIOS boots
DOS 2.xand3.x
• Hard Disk support
• OPTIONS:
• Expansion board with:
• 128 or 512K additional RAM
• 2 Sync/Async RS232/422
serial ports
• Battery backed Real Time Clock
• 8087 Math Co-Processor
• Buffered I/O Bus

• Mini/Micro Floppy Controller
(1-4 Drives, Single/Double Density,
1-2 sided, 40/80 track)
• 2 RS232C Serial Ports (50 -38,400
baud), 1 Centronics Printer Port
• Only 5.75 x 7.75 inches, mounts
directly to a 5-1/4w disk drive

• STD Bus Adapter
• Utilities source code

• Power Requirement: +5VDC at 1.25A;
+12VDC at .05A; On board -12V
converter

• TurboDOS / Networking

BOOKSHELFTM ~'=;~~ 200
Fast, compact, high quality, versatile PC·DOS system
Three times the COMPUTING POWER of a PC

Priced from
$1295.00
10MB System
Only $1945.00
• Data and File compatible with IBM
PC-DOS 2.x and 3.x
• Runs "MS-DOS generic" programs
(Dbase II, Multiplan, Wordstar,
Supercalc 2, Turbo Pascal, Fortran 77,
Microsoft C, lattice C, IBM Macro
Assembler, Intel compilers & tools,
GW Basic, etc...... )

Software Included:
• PC-DOS Compatible ROM-BIOS boots
DOS 2.xand3.x
• Hard Disk Support
• T/Maker 111- Word proceSSing,
spreadsheet, relational database,
spelling checker, and data
encrypt/decrypt

• Works with any RS232C ASCII terminal .
(not included)

Expandable:

• Compact 7.3 x 6.5 x 10.5 inches,
12.5 pounds, all metal construction

• Floppy expansion to four drives
• Hard disk and tape expansion

• Based on Uttle Board/186
• 512K RAM,no wait states
• Two RS232 serial ports
• One Centronics printer port

• SCSI/PLUS'· multi-master I/O
expansion bus

• One or two 360 Kb floppy drives
• 1OMS internal hard disk drive option

DISTRIBUTORS
ARGENTINA: FACTORIAL, SA, (1) 41-0018,
rue 22408 BELGIUM: CENTRE
ELECTRONIQUE LEMPEREUR, (041) 23-4541,
rue 42621 CANADA: DYNACOMP
COMPUTER SYSTEMS lID., (604) 872-7737
ENGLAND: QUANT SYSTEMS,
(01) 253-8423, rue 946240 REF:19003131
FRANa: EGAl+, (1) 502-1800, rue 620893
SPAIN: XENIOS INFORMATICA, 593-0822,
rue 50364 AUST1W.IA: ASP

~FI=u::I

COMPUTERS. INCORPORATED

MICROCOMPUTERS, (613) 500-0628
BRAZIL: CNC-DATA LEADER IIDA,
(41) 262-2262, rue 041-6364 DENMARK:
DANBIT, (03) 66-20-20, rue 43558
FINLAND: SYMMETRIC OY, (0) 585-322,
rue 121394 ISRAEl: ALPHA TERMINALS,
lID., (3) 49-16-95, rue 341667 SWEDEN:
AS AKTA, (08) 54-20-20, rue 13702 USA:
CONTACT AMPRO COMPUTERS INC.,
TEL: (415) 962-0230 TELEX: 4940302
IBM®, IBM Corp.; 80186®, Intel, Corp,;
TurboDOS®, Software 2000, Inc., Dbase II@,
Ashton-Tate; Wordstar®, Micropro, Inc.;
Supercalc 2®, Sorcim,lnc.; Turbo Pascal®,
Borland, Inti., Inc.; Microsoft C®, CNI Basic®,
Multiplan®, Microsoft, Inc.; Lattice C®,
Lattice,lnc.

size of display
PARTLHTH-' 3rr.
WPL-U4J

length of display partltlon I In llnes )
length of a line In 16 bit words.
I.e. ·pltch---thls Is just HO.NHRES DIY 16)

(coaaands.
*****************************************
aaaks and bit deflnltlons for
the NEC 7220

***************************************** )
status register bits
DATAREADY-.Ol.
P'IFOFULL-.OZ.
FIFOMPTY-'04.
DRAWING-.OB.
DMAEXEC-UO.
(does not apply to PIlI8ltronlcs board)
VERTSYNC-UO.
HORIZBLANK-' 40.
LIGHTPEN-. . O.
coaaand bytes
RESETC-Ol
VSYNCC-"El
CCHARC-UBJ
STARTC-"BJ
ZOOMC-'46J
CURSC-U91
PRAMC-.,OJ
PITCHC-'47J
WDATC-UOJ
HASKC-.4A.
FIGSC-UCJ
FIGDC-"Cl
GCHRDC-"B.
RDATC-UOJ
CURDC-'EOJ
LPRDC-.CO.
DHARC-U4.
DHAWC-U41

reset to Idle state )
lab has aaster/slave definition)
specUy cursor" character row heights
end Idle aode " unblank display )
specUy zoo. factora )
set cursor position)
define start address" dlaplay area lengths
speclty pitch)
write data bytes Into display .e.ory )
set . . ak register )
specify para.etera for drawing controller
draw figure )
draw graphics character)
read data bytes )
read cursor posltlon )
read light pen address )
DHA read" write operatlons )
DHA not laple.ented on Plaeltronlcs board)

reset .ode definitions
GRAFHOD-'OZ.
CHARMOD-UO.
HIXHOD-O.
ILACE-'09'
Interlaced)
ILRPT-.OBJ
Interlaced repeat fleld for character displays )
NILACE-O.
STATIC-OJ
DYNAMIC-'04.
DRAWACTIVE-O.
(draw during display tl.e " retrace blanking
DRAWRETRACE-.10. ( drav onl y during retrace blank ing )
vsync aode definitions)
VSSLAVE-OJ
( accept ellternal "ideo sync input
VSMASTER-I.
( generate and output v ideo sync )
vdat coaaand aodlficatlon definitions
REPLACE-O.
COHPLEHENT-I.
RRESET-Zl
SSET-3J
data transfer type fleld definitions)
WWORD-.OOI
( low. then hi byte )
LOWBYTE.UOJ
(low byte only)
flgs coaaand paraaeter bits)
CHARACTER-OJ
line or vector )
LUIE-'OB'
GRAFCHAR-.IO.
graphics character
ARC-UOJ
arc/circle )
RECTANGLE-UO.
SLANTED-nO.
slanted graphics character

Listing 2 - GDCTYPE.INC
( GDCTYPE.INC--type definitions used for NEC 7Z20 routines )
TYPE
byteptr-"byte I
bytearray-array [0 •• 151 of byte. (used In procedure praa)
Intarray-array [0 •• 51 of Integer. (used In procedure flgs)
eatadr-array [0 •• 21 of byte; (used for first arg to curd and lprd)
(end of GDCTYPE.INC)

67 EastEveIynAve .• MountainView,CA94041 • (415)962-0230. TELEX 4940302

Micro Cornucopia, Number 27, December-January 1986

Listing 3 - GDCIO.PAS

Little Board™•••• $149

GDCIO.PAS contains the .ost ele.entary co ••ands needeci
to run the NEC 7220 on the Plultronlcs board.
Contain. the fo110.ln\l routine.:

The World's Least Expensive CP/M Engine

PROCEDURE tlfordy' (.alta untll 7220·s fifo I. not full
PROCEDURE tlfoe.pty'
( •• Its untll tlto Is e.pty )
PROCEDURE outc.d(co.:byte)J (send • • byte to the 7220·.
co ••• nd port)
PROCEDURE outpar(par:byte), (send. a byte to 7220·s data port )
PROCEDURE gre.et(r.ode •••• h •• v •• hfp.hbp. Vfp:byte,
al: Inte\ler' vbplbyte), (re.et. 7220.
All p.r••eters are pa.sed a. argu.ents )
PROCEDURE vaync(v.ode:byte); (sets up .a.ter or al.ve .ode
PROCEDURE cch.r( lr.dc.ctop. sc.br.cbot:byte),
( sets up cursor .. character characterlatlcs
PROCEDURE start. (ezlta the Idle .ode )
PROCEDURE :oo.(gchr.dlsp:byte)J
( :00. factors for graphlca cb.ractera " dlspl.y )
PROCEDURE curs(ead.plane.dad: Integer)J (specltles cursor position
PROCEDURE pr •• (s •• n:bytel 1 lst:byte.rray) , (loada para.eter RAK )
PROCEDURE pi tchCp:byte) I (seta harz .e.ory .Idth )
PROCEDURE .datC.ode.typ:byte; n: Integer; 1Ist:byteptr)J
( vrltes data Into display .e.ory )
PROCEDURE ••• k(.a.kv: Integer); (loads ••• k register
PROCEDURE sendpar( I: Integer);
( uaed by fig. to send Integer par••eters
PROCEDURE tlgs(ftype:byte; dllst: Intarr.yU
( specifies dra.lng par••eters )
Not Included: d.ar. d ••• (use DHA feature vhlch Is
not I.ple.ented on the Plzel tronlcs board)

CP/M 2.2

~I

INCLUDED

/

\

~

*)

PROCEDURE flfordy;
(walta untll 7220·s tlfo Is not full )
VAR st.tus:byte;
.
BEGIN
REPEAT st.tus:-porUFIFOI UNTIL (status AND FIFOFULL).O;
ENOl

• 4 MHz Z80A CPU, 64K
CTC, 4-32K EPROM

• Mini/Micro Floppy Controller
(1-4 Drives, Single/Double DenSity,
1-2 sided 40/80 track)

PROCEDURE t I foe.ptyl
(v.1 ta until fifo Is e.pty )
VAR status:bytel
BEGIN
REPEAT status:-porUFIFOI UNTIL (status AND FIFOHPTY)()OI

• 2 RS232C Serial Ports (75-9600 baud
& 75-38,400 baud), 1 Centronics
Printer Port

END;

• Power Requirement: +5VDC at .75A;
+12VDC at .05A / On board -12V
converter

PROCEDURE outc.d(co.:byte) I
(sends. byte to co ••• nd port )
BEGIN
flford,;
( w.lt for fifo)
port(CHDI :-co.'
END.
::r:DURE outpar(p.r:byteU

RM\ Z80A

• Only 5.75 x 7.75 inches, mounts
directly to a 5-1/4" disk drive

(sends. byte, to data port)

• Comprehensive Software Included:
• Enhanced CP/M 2.2 operating

flfordyl
port(PARAHI :-parl
ENOl

system with ZCPR3
• Read/write/format dozens of
floppy formats (IBM PC-DOS,
KAYPRO, OSBORNE, MORROW ... )
• Menu-based system customization
• Operator-friendly MENU shell
• OPTIONS:
• Source Code
• TurboDOS
• ZRDOS
• Hard disk expansion to 60
megabytes
• SCSI/PLUS'· multi-master I/O
expansion bus
• Local Area Network
• STD Bus Adapter

BOOKSHELFTM ~fltifl~ 100

( resets 7220. All p.ra.eters are passed as argu.ents )
PROCEDURE greset(r.ode.aw.hs.vs.hfp.hbp.vtp:bytel
al: Integerl vbp:byte)1
.ode for 7220 (graphics. char.cter • • Ized)
active words per line
horl: sync width
vert sync .Idtb
vs
horlz tront porCh
hfp
hbp
horlz back porch
vfp
vert tront porCh
act! we linea per tleld
al
vbp
vert Ical back porch

Fast, Compact, High Quality, Easy-to-use CP/M System

Priced from
$895.00
10MB System
Only $1645.00

)

BEGIN
outc.d(RESETC) I
outpar(r.ode AND '3t) I
outpar(a.U
outpar( (h. AND Ut> OR

( send. reset co ••and
(.ode .ord )
( act I ve .orda/llne )
«va AIID 7) SHL !U );
( haync .Idth .. 10. blta of vaync
outpar( utc AND (hfp SHL 2» OR (3 AND (va SHL 3» U
( va hi bl ta .. h front porcb )
outpar(hbp AND I3t»
(h back porch )
outpar(vfp AND '3t) I
(vert front porch )
outpar(lo(aU)J
( 10. byte of acti ve llnealf leld
outpar( (3 AIID hUal» OR Ufc AND (vbp SHL 2» )J
( hi bits of al a. v back porch )
END.

.Id~h

)

PROCEDURE vsync( •• ode:byte)J (sets up _ster or sla.e sode )
BEGIN
outc.d(VSYNCC OR (vaode AND '01»)
ENOl

( sets up cursor .. character characteristics )
PROCEDURE cchar( lr.dc.ctop.ac.br.cbot :byte) I
(lr
llnea/char.cter row (I If graphics ro.)
cic
dc-I -) display curaor
ctop
cur.or top line • In row
sc
ac-I -) .teady cursor. 0 -) bllnIClng
br
blink rate and attributes
cbot
cursor bottoa line II In row
BEGIN
outc.d(CCHARC) I
outpar«lr AND un OR U80 AND (dc SHL 7»);
( llnes/ro. a. dlspl cura )
outpar«ctop AND un OR (UO AND (sc SHL !I»
OR ('cO AND (br SHL 6»);
( curaor top. ateady corsor. 10. bit. of bllnIC r.te
outpar«7 AIID (br SHR 2» OR Ufa AND (cbot SHL 3»);
( opper bits of bllnIC rate. corsor bottoa )
!liD;

• Ready-to-use professional CP/M
computer system
• Works with any RS232C ASCII
terminal (not included)
• Network available
• Compact 7.3 x 6.5 x 10.5 inches,
12.5 pounds, all-metal construction
• Powerful and Versatile:
• Based on Uttle Board
single-board computer
• One or two 400 or 800 KB floppy
drives
• 1Q-MB internal hard disk drive
option

DISTRIBUTORS
ARGENTINA: FACTORIAL, SA, (1) 41-0018,
TlX 22408 BELGIUM: CENTRE
ELECTRONIQUE LEMPEREUR, (041) 23-4541,
TlX 42621 CANADA: DYNACOMP
COMPUTER SYSTEMS lID., (604) 872-7737
ENGlAND: QUANT SYSTEMS,
(01) 253-8423, TlX 946240 REF:19OO3131
FRANCE: EGAL+, (1) 502-1800, TlX 620893
SPAIN: XENIOS INFORMATICA, 593-0822,
TlX 50364 AUSTRALIA: ASP

(continued next page)

M1CROCOMPUlERS, (613) 500-0628
BRAZIL: CNC-DATA LEADER IIDA,
(41) 262-2262, TlX 041-6364 DENMARK:
DANBIT, (03) 66-20-20, TlX 43558
FINlAND: SYMMETRIC OY, (0) 585-322,
TlX 121394 ISRAEL: ALPHA TERMINALS,
lID., (3) 49-10-95, TlX 341667 SWEDEN:
ABAKTA, (08) 54-20-20, TlX 13702 USA:
CONTACT AMPRO COMPUlERS INC.,
TEL: (415) 962-0230 TELEX: 4940302
IBM", IBM Corp.; Z80A"', Zilos, Inc.; CP/M~',
Digital Research; ZCPR3'· & ZRDOS'·,
Echelon, Inc.; Turbo DOS"', Software 2000,
Inc.; T/MAKER III'·, T/Maker Co.

PROCEDURE atart; ( ezlt. the Idle aode (oppo.lte of gre.et) )
BEGIN
outcad(STARTC) ;
END;

• Comprehensive Software Included:
• Enhanced CP/M operating system
with ZCPR3
• Word proceSSing, spreadsheet,
relational database, spelling
checker, and data encrypt/
decrypt (T/MAKER III'·)
• Operator-friendly shells; Menu,
Friendly'·
• Read/write and format dozens of
floppy formats (IBM PC-DOS,
KAYPRO, OSBORNE, MORROW ... )
• Menu-based system customization

COMPUTERS. INCORPORATEO

67 EastEveIynAve .• MountainView,CA94041 • (415)962-0230. TELEX4940302

Micro Cornucopia, Number 27, December-January 1986

TOTALCONTROL
with LMI FORTHTM

HIGH RESOLUTION GRAPHICS
(Listing 3 continued from page 73)
( speCifies zoo a factors for writing graphic characters
" for display )
PROCEDURE zooa(gchr.dlsp:byte>J (zooa factors)
BEGIN
Olltcad(ZOOHC) J
olltpar«gchr AND 'Of) OR UfO AND (dl.p SHL 4»»
ENDJ
PROCEDURE cllr.(ead.plane.dad:lnteger)J (.peclfle. cllrsor position)
(ead
IInslgned 16-blt Integer holds low part of word adcSre.s
plane
IIpper two bits of word addre ••
dad
dot addres. of plKel within the word adcSress
(graphic. aode only)
)

BEGIN
outcad(CURSC)J
olltpar(lo(ead») (adcSr low byte)
olltpar(hI(ead»J (addr hi byte)
olltpar«plane AND 'O;!) OR UfO AND (dad SHL 4»)J
( addr top bits" dot addr )
ENDJ

For Programming Professionals:
an expanding family of
compatible, high-performance,
Forth-83 Standard compilers
for microcomputers
For Development:
Interactive Forth-S3 Interpreter/Compilers
•
•
•
•
•

16-bit and 32-bit implementations
Full screen editor and assembler
Uses standard operating system files
400 page manual written in plain English
Options include software floating point, arithmetic
coprocessor support, symbolic debugger, native code
compilers, and graphics support

For Applications: Forth-S3 Metacompiler
•
•
•
•

Unique table-driven multi-pass Forth compiler
Compiles compact ROMabie or disk-based applications
Excellent error handling
Produces headerless code, compiles from intermediate
states, and performs conditional compilation
• Cross-compiles to 8080, Z-80, 8086, 68000, and 6502
• No license fee or royalty for compiled applications

Support Services for registered users:
• Technical Assistance Hotline
• Periodic newsletters and low-cost updates
• Bulletin Board System

Call or write for detailed product Information
and prices. Consulting and Educational Services
available by special arrangement.

01-

Laboratory Mlcrosystems Incorporated

rlpos t Office Box 10430, Marina del Rey, CA 90295
~~hone credit card orders to: (213) 306-7412

Overseas Distributors.
Germany: Forth-Systeme Angelika Flesch, D-7820 Titisee-Neustadt
UK: System Science Ltd., London EC1A 9JX
France: Micro-Sigma S.A.R.L., 75008 Paris
Japan: Southern Pacific Ltd., Yokohama 220
Australia: Wave-onic Associates, 61.07 Wilson, W.A.

74

PROCEDURE praa(sa.n:byteJ llst:byuarray) J (loads paraaeter RAH )
(sa
starting address In paraaeter RAH (O-IS)
n
how aany para . . ter bytes (1 to 16-sa)
list
pointer to string of n bytes to be loaded
)

VAR I: Integer,

BE~!~cad(PRAHC OR (.a AND 'Of»' (.ends coa.and .. start addr )
FOR I: -0 TO n-I DO olltpar( llst[ I J).
END,
PROCEDURE pitch( p : byte )J (se ts horz ae aory wi d th )
BEGIN
olltcad(PITCHC) •
outpar(p)'
( send width )
END.
( writes data Into display aeaory )
PROCEDURE vdat(aode, typ:byte. n: Integer, 1lst:byteptrH
(aode
aodlflcatlon operation:
O--replace
I--coapleaent
Z--reset to 0
3--set to I

XEROX 820-1
FOR 5- DRIVE SYSTEMS:
/. SUPER BIOS
Allow~ III~ U~tI of BO TRACK OS drlvtl •.
Aprox. 350K .'orogtl on BOTOS. Compofobltl
wllh original 40Tdlsks. Supporl.80TDS,
80TSS, 40TDS, 40TSS - NO HARDWARE MOOS.
Includtl • • ourctl,formaf,'y'gtln, .Ingltl driw copy.
parOl/til and .tlrlol prlnftlr 61Jppor t - $34.95

2. MRS/OS DISK OPERATING SYSTEM
Compltlftlly CPM compaflbltl dIsk op~raflng systtlm.
with SUPER 810S In.'al/tld. WtI.hlpboofabltl dl.k.
In 40Tand 80Tformats. Includ~.Uflllfltl. and
ustlr. manual. If you cant find lJ- CPM forYOIIr
820-1 flltlnfhl.,.fht! an.wtlr. - $59.96
3. COMPOSITE VIDEO ADAPTER
Plugs dlrtlctly IntoXtlrox vldtlo outpuf porf fJnd
provldtls composiltl vldtlo signal for monllors
fhrough an RCA Jack. Rtlqulrtl. minor sold tiring
on Ihtl 820. - $17.95
CPM Is a trademark of DIGITAL RESEARCH, MRS/OS of OCCO,INC.

VISA

EUGENE M. TONER
P.O. BOX 69
FOUNTAINVILLE. PA 18923
215 -249-0240

MASTER
CARD

Micro Cornucopia, Number 27, December-January 1986

. type of data lIf.r-'OO--word, low byte then hi
'08--lnvalld
I10--10w byte only
U8--hl byte only
nuaber of bytes C2*nua words) to be sent
po In t.r to .trlng of n byt •• to be .ent

typ

n
list

FUNCTION IntpraptCpraaptutrng80 • • In, . . . : Intell.r): Integer:
VAR nil.: Integerl
BEGIN
vr I te Cproapt).
REPEAT readlnCnlla) UNTIL Cnll.).aln) AND Cnll.<-a•• )'
In tpr.pt: -nua I
ENOl

)

BEGIN
outcadCWDATC OR Ctyp AND Us) OR Caod. AND .03»1
( •• nd cad" aod. a. typ par.a.)
WHILE n)O DO BEGIN
outp.rC ll.t I ( •• nd llat of data )
ll.t: -PTRCORD(l1 at)+ I) I
n:-n-II
ENOl
ENOl
A

)

PROCEDURE a •• kCaa.kv: Integ.rH (load. aa.k regl.ter )
BEGIN
outcadCHASKC) I
outp.rCloCaa.kv»I
a •• k'. low byte )
outp.rChICa•• kv»1
a •• k's hi byte )
ENOl
( us.d by figs to send Integer paraa.ters )
PROCEDURE sendp.rC I: Int.g.r)l
BEGIN
olltparCloC I»J
( low byte of paraa.ter )
outparU3f AND hlCI)1 (hi byte of p.r.a.ter )
ENOl

( speclfles drawing paraaeters
PROCEDURE tlgsCftype:bytel dllst:lntarray)J
)
(
ftype
CHARACTER-byte or Indlvldllal dot
LINE-lin.
GRAFCHAR-gr.ph Ie. byte • area fill
ARC-.rc a. circle
RECTANGLE-r.ct.ngle
SLANTED-slant.d graphics byte
dllst
po Ints to .n array of Int.ger par••eters:
.l.aent
na.e
function
dlisUOI

dlr

dllsU II
dllsU21
dllsU31
dll.tl41
dllsU!51

de
d
d2
dl
d.

drawing dlr.ctlon CO-7) :
!5 4 3
6 X 2
7 0 I
drawing cOllnt para.
nee~.d ~y a~ 1 n~ept char aade
needed by line, .rc, rectangle
n.eded by .rc, r.ctangle

)

BEGIN
autcadCFIGSC) I
olltparCftype OR Cdll.tlOI AND .07»1
type" dlrect.lon )
s.ndparCdllstl 1I)J
de }
IF (ftype<)CHARACTER) THEN BEGIN
sendparCdll.U2J);
d }
.endparCdllaU31)J
( d2 )
IF CCftypeOGRAFCHAR) AND CftypeOSLANTED» THEN BEGIN
sendparCdll.U41);
( d1 )
IF CftypeOLINI!:> THEN s.endparCdll.U!5I)1 (da
ENOl
ENOl
ENOl
(end of GDCIO.PAS)

Listing 18 - SETMON.PAS
PROGRAH setaonl (lIs.d to adjll.t .o.nltor-speclflc para.eters )
( N.T.Carneval. !5I18/84 )
UI GDCCONST.INC)
U I GDCTYPE. INC)
TYPE .trng80-lItrlngI80Jl (lIl1ed for praapta)
VAR
I: Integerl
hllnc,hfrp,hbkp, Vllnc, vfrp. vbkp:byt. J
anll: Integers
ptch: Int.g.rl
UI GDCIO.PAS)
UI LGCHRD.PAS)
U I LSETCURS. PAS}
(tl LHODNPAT.PAS)
UI LCLRPLAN.PAS}
(tl LDRAWLIN.PAS)

PROCEDURE chngpar •• I
BEGIN
vrl t.lne 'HORIZONTAL--I. syncs' ,hsnc: 3,'
2. frntprch-' ,hfrp: 3,
,
3. bkprch-' ,hbkp:3);
wrltelnC' VERTICAL--4. syncs' ,vsnc:3,'
!5. frntprch-' ,vfrp:3,
6. bkprch-' ,vbkp:3);
ans:-IntprsptC
'Nuaber of lte. to change CO to go ah.ad, -I to qlllt): '
-1,6) I

CASE ana OF
0: vrlteln('No change')I
I: hsnc:-IntprapU'h lIync: ',1,100);
2: hfrp:-IntprapU'h front porch: ',1.100)1
3: hbkp:-IntpraptC'h back porch: ',1, 100)J
4: vllnc:-lntprsptC'v sync: ',1,100)1
!5: vfrp:-Intpr.pU'v front parch: ',1,100)1
,: vbkp: -lntpraptC' v back parch: ',1,100)1
ELSE wrl telnC '77') I
ENOl
ENOl
PROCEDURE I n I to
VAR
raode ,aw,hs, vlI,hfp,hbp, vfp,vbp:byte I
al: Integ.rl
bllf:bytearray'
sad, l.n,vd: Integ.rl
lr.dc,ctap,lIc.br,cbot:bytel
zfw, zfd :byte I
BEGIN
raode: -CGRAnOD OR NILACE) OR CDRAWACTIVE OR DYNAHIC).
aw: -WPL-21
hll: -h.nc-I I
v.:-v.ncl
hfp: -hfrp-I I
hbp:-hbkp-lJ
vfp:-vfrpJ
al: -HONVRESI
vbp:-vbkpI
gr••• tCr.od., .... hll,v.,hfp,hbp,vfp,.l ,vbp) I
{ se t v Id.o sync aode }
vllyncCVSHASTER) I
{ se1; pitch}
ptch:-WPLJ
pltchCptch)J
( set lip dillplay partition I )
lIad:-OI
( start address of display partition I
hn:-PARTLNTHI
( . lines In dillplay partition I )
vd:-Ol
( for standard display cycle vldth ),
but I 01: -loCsad).
but I I J: -hi Cllad) I
bllf[21:-len SHL 41
bufl31 :-Cvd SHL 7) OR CUf AND Clen SHR 4»1
pra.CO. 4,bllf) I
( set cllrsor characterlstlca
lr:-Ol
(In graphics aode, • llnes/row:-O )
dc:-Ol
(don't display cursor)
ctap:-Ol ( these para as don't aatter If cursor I.n't shown)
SC:-Ol
br:-Ol
cbot:-Ol
ccharClr, dc,ctop. sc.br,cbat) J
( lie t zoos f.ctar. )
zf.:-Ol (for vrltlng )
zfd:-Ol
(and for display
zoo.Czlw, zld) I
IItartJ
drawaod.CSSET);
(select RHW operation)
s. tpatternCSOLID) I
( for solid line )
ENOl
PROCEDURE draw fraae I
BEGIN
dra.llneCO,O.O,HONVRES-1 )J
dravlln. CO.HONVRES-I.HONHRES-I ,HONVRES-I) I
dra.llneCHONHRES-1 ,HONVRES-I ,HONHRES-I ,0)'
dr •• lln.CHONHRES-I.O.O,O) I
ENOl
BEGIN
setparaa.,
ans: -OJ

PROCEDURE s.tparaaa;
BEGIN
{ values d.t.r.lned eaplrlca11y }
hllnc:-41
hfrp: -31
hbkp: -61
vllnc: -61
vfrp:-!51
vbkp:-121
ENOl

Micro Cornucopia, Number 27, December-January 1986

REPEAT
Inltl

(a copy of Initialize.
aad I fled to allow para.eter changes)
clrplaneCO) I
dravfras.'
REPEAT chngp.r •• UNTIL an.<-O.
UNTIL ans?t~ABCDEFG
HI J KL 1t...J 0 P Q RS T IJ \.' V-.I >~

t. .

"abc:clefghijkl

'y'Z[\]A

rfl n 0 p q r

5

t u V Y./ X !r-' Z {

: } .....

!Utt$%&'O*+, - ./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVHXYZ[\]A
• Clbcdef ghijklm nopqrsluvwxyz{I}"

76

~erred to another graphics device (hl
this case a dot matrix printer) to
produce a hard copy. This program
prints a 7-dot high swath with per
each pass of the head. I used it to
generate the printouts of the character
set in Figure 2 and the display from
SHEAF (Figure 1).
The Panasonic KX-P1091 which I
used is similar to the Epson dot matrix
printers, but you may need to change
SCRNDUMP if yours is different. (The
printer related code is near the top of
the program.) Procedure printit will
also need to be changed if your printer
addresses the needles differently than
mine (usually it's a matter of whether
the top or bottom needle is bit 0).
SAVSCRN generates a data file that
holds the contents of one 32K page of
display memory. FILSCRN reads these
files from disk into the display.
I haven't tried to do any data compression, but preliminary tests with
SQ and USQ indicate that a 32K
screen can be reduced to 4K or less. I
recommend that someone add Huffman encoding and decoding to the
SAVSCRN and FILSCRN programs
(and send them in).

How It All Turned Out
I have added these graphics routines
to my data acquisition and analysis
programs and the results have been
excellent. I've added special functions
to: set up markers along the time axis
to mark the start and end times for
measuring peaks or averages; superimpose multiple waveforms so that latency and amplitude differences are obvious; and print out selected
waveforms.
I use keyboard control for cursor
positioning, but it would not be difficult to adapt these programs to use
some other input device such as a
trackball, joystick, or graphics tablet.
Color
The three planes of the Pixeltronics
board can be used to generate eight
colors, counting black and white.
Planes 0, 1, and 2 correspond to red,
green, and blue, respectively, so drawing a dot at the same address in all
three planes produces a white point

Micro Cornucopia, Number 27, December-January 1986

SO Software, Inc., maker of the original
on the monitor. Drawing to planes 0
and 1 results in a yellow dot.
Drawing in colors other than the
primaries requires drawing the figure
repeatedly in several planes. Therefore, the cursor must be placed at the
same starting position in each plane. If
starting position is not an explicit
argument to your drawing procedures,
it must be a global variable.
Finally
The Pixeltronics board has worked
without a hitch for more than two
years. Because of its excellent performance, I ordered the expansion set that
brings it up to full 96K monochrome
or 3x32K color capacity. Now that the
ICs have arrived, I have a difficult
choice to make - leave the board in
monochrome configuration, or buy a
color monitor. I've never seen a nerve
cell produce eight-colored waveforms,
at least not yet.
Reference
1. NEC manual for uPD7220/GDC,
1982.

•••
Disk Sale

tJ DY§UrlJ·
TYPE

BOX OF 10

5" -SS/00-48 TPI
5" -OS/00-48 TPI
5" -SS/00-96 TPI
5" -OS/00-96 TPI
5"-OS/OD-IBM/AT
8" -SS/SO-48 TPI
8" -SS/00-48 TPI
8" -OS/00-48 TPI
3.5" -SS/OS

19.50
25.50
29.50
37.50
52.95
23.95
25.50
29.95
32.95

Available Soft or Hard Sector
For Plastic Case Add 1.25/80x
Plus Tax & Shipping
- Cash, Visa, Mastercard, COD -

CP/M-80 CLanguage Development
System, knows

Time is precious
So the compilation, linkage and execution
speeds of BOS Care the fastest available, even
(especially!) on floppy-based systems. Just ask
any user! With 15,000 + packages sold since
1979, there are lots of users ...
New! Ed Ream's RED text editor has been
integrated into the package, making BDS Ca
truly complete, self-contained Cdevelopment
system.

Powerful original features: COB symbolic
source-level debugger, fully customizable
library and run-time package (for convenient
ROM-ing of code), XMODEM-compatible
telecommunications package, and other sample
applications .
National CUser's Group provides direct access
to the wealth of public-domain software written
in BOS C, including text editors and formatters,
BBS's, assemblers, Ccompliers, games and
much more.
Complete package price: $150.
All soft-sectored disk formats, plus Apple
CP/M, available off-the-shelf. Shipping: free, by
UPS, within USA for prepaid orders. Canada: $5.
Other: $25. VISA, MC, COD, rush orders accepted.

BO Software, Inc.
POBox 2368
Cambridge MA 02238
617 • 576 • 3828

Integral Systems Corp.
2900-H longmire Drive
College Station, TX 77840
(409) 764-8017
Micro Cornucopia, Number 27, December-January 1986

77

EXTRA ... EXTRA ...

EXTRA ... EXTRA ...

FACTORY SLASHED PRICES
Everyone has heard it already, BIG BLUE is still there; just cheaper! Due to the competitiveness of the current computer
industry and Japanese influence, GEMINI has found it necessary to rethink its buying and marketing strategies. Now with
new purchasing agreements in hand and added buying power GEMINI is proud to announce the ZORBA at a New Lower
than Low Price. The heat is on for MS DOS! CPIM is still alive, and now more affordable!

THE PUBLICS LEARNING WHY THE ZORBA IS STILL AND ALWAYS HAS BEEN
THE EXPERTS CHOICE.

FEATURES:
• 9" GREEN OR AMBER CRT

ZORBA
PORTABLE COMPUTER

• 19 INDEPENDENT, 55 PROGRAM-

OPTIONS:
• 16 BIT 256K RAM UPGRADE
(8088 CPU) $600.00

ABLE FUNCTION KEYS

• aOOK DSaD 96TPI DRIVES

• TWO 400K DSDD DRIVES
• 64K BYTES 150 NS RAM

-

...- -

~r--'""-""

-

~~L<~~:~~

• C BASIC COMPILER

• COMPOSITE VIDEO OUTPUT
$100.00

r--"-"-,-",

-

• IEEE 488 BUS MASTER PORT

"""""

-

-

-

--- . _¥

• 24.6 LBS
• CPM 2.2 OPERATING SYSTEM

• SOFT VINYL CASE $25.00
• TUTOR KIT; $15.00
(CPM, WORDSTAR, CALCSTAR)

• M80 (L80, LlB80, CREF80)

• SCHEMATIC SET $10.00

• SOURCE CODE OF THE BIOS
PLUS UTILITIES
• DATA COMMUNICATIONS
SETUP PACKAGE
• SERIAL & PARALLEL
PRINTER PORT

BUNDLED WITH
WORDSTAR, MAILMERGE, SPELLSTAR,
DATASTAR,REPORTSTAR,CALCSTAR

• DATA COMMUNICATION PORT

$699.00
with two 400k or SOOk Drives

with 400K/SOOK & 10MB Drive

Keyboard
General Specifications
ZORBA is the lowest cost full featured
portable computer. This light weight computer is ruggedly packaged in a convenient carrying case. The case surrounds
a strong inner chassis which further protects the Z80A based computer with its
two double sided double density disk
400K drives, large easy to read 9"
display screen and well designed
detachable keyboard.

ZORBA uses CP/M. the industry standard
operating system, which means that a
wide range of existing software is readily
available to the user.

Keyboard communicates serially with CPU
Detachable with 2 foot coiled cord
95 keys in standard QWERTY format
13 Key Numeric pad
Independent Caps Lock and Shift Lock
55 Software programmable function keys
All keys auto-repeat after 1 second delay
All Standarci cursor and terminal control
keys

Disk

~ystem

Controller:
Drives:

WD1793
5.25 Double Sided.
Double Density. 400K
48 TPI

Built-in disk interchange formats: Xerox
820 (SO. ~O). Kaycomp (~O). DEC
VT-180 (SO). Osborne (SD) and IBM-PC
(eg. CPM/86) and Televideo 802
IReadlWnte and Format compatibility)
(Expandable to 82 Formats)

The ZORBA users manual covers operation of the unit, all suppllied software and
all interface and internal information. A
system diskette is supplied with all
system files and utilities. A second
diskette contains the sources for all ZORBA software including BIOS, SETUP,
FORMAT, and PATCH.

78

$1399.00

Specifications
General Mechanical
and Electrical
Width
Height
Depth
Weight
Power

-17.5 inches (44.45 cm)
- 9.0 inches (22.86 cm)
-16.0 inches (40.64 cm)
-24.6 pounds (11.1 Kg)
-80-130 VAC or 190-245 VAC
50/60 Hz
170 watts max

Display
Display Tube:
9" diagonal. Green or Amber
High resolution display circuitry
60 Hz refresh rate
Display Format:
25 lines x 80 columns
5x7 Character Font with full descenders
'28 ASCII Characters
8x9 32 Characters Graphic Font
2K Memory Mapped Display Buffer

Manufactured By:

IUUlU
I l l "lUDJlIIlHt .!IltUt.

130 Baywood Avenue, Longwood. Florida 32750
305-830-8886
800-327-7182

CPU Board
Z80A CPU running at 4 Mhz with
no wait states
64K bytes of 150 ns RAM (58K after
CP/M loaded)
16K bytes of EPROM (2732)
can be switched in and out by software
12K available for user EPROMS
8275 CRT controller, DMA driven
1793 Floppy disk controller, SMC data
separator
Bipolar proms configure 10 addresses
Fully structured interrupts prioritized by
bipolar proms

Interfaces
• Full asynchronous RS232 port with
modem control. Baud rates and data
translation and protocol programmable
• Full asynchronous full duplex RS232
port with hardware handshake (for
printers). Baud rates and protocol
programmable. (Serial Printer Port)
• One 8 Bit parallel port with independent strobe and ready lines. Supports
Centronics interface with an available
adaptor cable.
• IEEE 488 Bus Master Port (ie: General
Purpose Instrumentation Bus) not Software Supported.
• 21 Standard Software Programmable
Baud Rates: 45.5 to 19,200 BPS

Micro Cornucopia, Number 27, December-January 1986

On Your Own
By David Thompson
This column has been a sort of
"Travels with Charlie" as I've written about my experiences starting
Micro C. This time it's a "Conversation with Lewis." Please forgive the
rambling, as we touch on several
subjects more than once, but it's the
way the morning went and I think
you'll enjoy it.
Lewis Sternberg is a senior in
electrical engineering at Oregon State
University, but he spent the summer
writing a fancy genealogy program in
Turbo Pascal. (It charts the ancestral
theory of relativity.) He called and
asked if he could come to Bend and
find out how to sell his program.
Smelling a potential "On Your Own"
column, I said, "Sure."
He did a lot of things correctly. First,
he asked for help. Second, he made
up a list of questions ahead of time
and sent me a copy. Third, he laid out
exactly what he was doing and why. I
didn't have to waste my time or his
playing 20 Questions.
The following is a lightly edited
version of the discussion. (I only edited me enough to make me sound
good.)
NOTE: In the first part of this article, Lewis'
comments and questions appear in boldface.
Later in the article, they are in quotes.

First, what is your audience?
Mostly people who have their computers sitting in their closets.
It's going to be fun to reach them. In
fact, the first thing I consider when
I'm looking at a new product idea is
whether I can reach the audience at a
reasonable cost (I don't know of a
magazine targeted at closet computerists). Then I look at the competition
(can I do better for less?). Finally, I
look at demand.
If I can reach the audience, beat the
competition, and I see a strong demand (those currently in that market
are doing well), then I'll look at development costs (a new system? a new
employee? no sleep for three months?)
and development time (will the market
still be there when I'm finished?).
If it still looks good, I'll add up the
costs of manufacturing, advertising,

development, documentation, support,
and shipping and handling. The rule
of thumb is that you at least triple this
total (we've been running under this,
but I don't recommend it). Many large
(and sometimes profitable) companies
will not manufacture a product if they
can't charge at least 5 times their
manufacturmg ,cost, and they prefer to
work in the 8 to 10 times range.
You calculatE7 the advertising cost by
dividing the total advertising budget
by the number of units you expect to
sell (your guess on this one). Obviously, if your product sells very well or is
very expensive (or both), then advertising may only be 1/10 to 1/3 of the
total cost. On the other hand, it's not
unusual for advertising cost per item
to be 10 times the retail price!
How do I find out how much advertising costs?
It's easy. Call or write to the publications that look like good prospects and
ask for rate cards. Rates are generally
determined by the circulation (paid
subscribers + newsstand sales + free
copies), competition, and the desirability of the audience.
A general, low-income, low-tech audience will be the cheapest to reach
(per person). A specifiC, high-income,
high-tech audience, in a small-circulation magazine will be the most expensive to reach (per person). Paid subscribers are the most desirable,
newsstand sales are second best, and
free distribution (often called controlled circulation) is definitely at the
bottom. A lot of free issues see the
world from the inside of a round file.
If the publication doesn't break down
circulation by type, call them and find
out.
Media kits are a good way to get a
lot of information about a publication,
but don't ask for any you don't really
need, as they are very expensive to
produce and mail.
The rate card will tell you whether
or not advertising in that publication is
even vaguely feasible. If the rates look
good, then ask' for the kit. Advertising
rates run from about $560 per full page
in Micro C to almost $10,000 per full
page in Byte. You have to have the ad
designed, typeset, and laid out, so
figure those costs, too. (Freelance

Micro Cornucopia, Number 27, December-January 1986

graphic designers or typesetting companies are a lot cheaper than advertising agencies.)
What's a good response?
Boy, that's a good question. I guess
you could say that a good response is
one that makes money. Lots of things
affect the response - price of the
item, customer need, quality of the ad,
size of the ad,' location of the ad in
magazine (important in catalogs like
Byte or Computer Shopper), and the
publication itself.
But to give you some round figures,
you're very fortunate to get between
1/4 percent and 2 percent of your
target audience per insertion (that may
be only a small part of the whole
readership), with the third ad (in a
row) drawing about twice as well as
the first. Most advertisers don't test a
magazine with fewer than three insertions. Usually, skipping an issue sets
you back almost to square one in
terms of response.
How do I know if an ad is working?
Assuming you have ads in more
than one publication, mark each coupon (use coupons if at all possible,
since they improve response) with a
special code, or add a department
number to the address. You can ask
anyone who calls where they heard
about you (we do that), or you can do
like Borland and have customers specify an extension number.
As a rule of thumb, an ad is effective
about three times as long as the
magazine's frequency; i.e., Micro C
comes out every two months, so a
Micro C ad should generate responses
for six months. In Micro C, ads often
work longer because people keep their
issues for reference (and, of course,
we sell back issues). Anyway, an ad in
a monthly magazine will work about
three months, and an ad in InfoWorld
will work about three weeks.
People are interesting people. (You
heard it here first.) Some people will
purchase your item the instant they
hear about it. They will call up immediately and insist that Federal Express
simply isn't fast enough. But many
folks won't even notice you until
(continued on page 87)

79

ERAC co.

KAYPRO EQUIPMENT

9" Green Monitor ............ $35.00
12" Green Monitor ............ 45.00
81 Series ROM's ............... 7.00
Keyboard (new Kaypro) ......... 75.00
Keyboard Siemens w/case ...... 65.00
Wiring Harness ................ 7.50

KAYPRO MAINBOARDS
K2 With Sockets ............. $39.00
K2 Populated - Tested ......... 129.00
K2 with PR08-3 Mod .......... 239.00
This one runs at 2,4 & 5 MHz, up to 4
drives SS, OS, or Quad drives. New ROM
has screen dump and step speed select.
With manual & software, tested and
guaranteed 30 days.

K2 PR08-2 Mod. EXCHANGE ... 149.00
We will update your K3 or K4 as above.
Mail working Main board.

We can install double or quad drives
and check complete package ..... CALL
K10 Populated - Tested ........ 250.00

CABINETS
K10orK2X ................. $45.00

*SPECIALS*
CPU/SUPPORT

MC68000-8 CPU ............. $12.50
Z80 CPU ..................... 1.00
Z80 PIO ............. : ........ 3.50
Z80 SIO ...................... 5.50
Z80A CPU .................... 2.50
Z80A PIO ..................... 3.50
Z80A SIO ..................... 7.00
Z80A DMA ................... 10.00
8088 ....................... 10.00
08742 CPU/EPROM 12 MHz ..... 20.00
D8284A ...................... 3.00
08288 ....................... 9.00
4164-15 ....................... 90

MODEM/DIALER
TMS 99532 (Modem) ......... $12.00
TMS 99531 (Dialer) ............. 8.00

FLOPPY CONTROLLER
WD 1791 .................... $9.00
WD 1793 ..................... 9.00
WD 1797 .................... 16.00

Bottom portion with front and back only.

CRT Bezel ................... 12.00
SUBSTITUTE CABINET
This cabinet has a 12" green monitor on top
that swivels left to right with a 3'position
vertical movement. The base is 16"x18"x5"
and contains a switching power supply. It
has room for the main board, two drives, a
modem and whatever else you want to stuff
in it. It comes with a Siemens keyboard with
case and is programmed like the Kaypro
keyboard with many extra Wordstar and
CP/M commands. The whole. cabinet is
color·coordinated and sharp looking. Nobody
will ever suspect this is a Kaypro. Now you
can build the classiest Kaypro computer
ever for less than $550.00. The
complete cabinet is a steal at
$179.00

MISC. CABLES
9" 50 Pin - 50 Pin Header ...... $2.50
14" 40 Pin - 40 Pin Header ...... 2.25
9" Hard Disk - 20 Pin Header ..... 2.00
14" Duallnline 16 Pin Male (2) ... 2.00
I/O Connector for Keyboard ...... 2.25
Coiled Keyboard Cable ........... 1.50

FLOPPY DISK CABLE
19" 2x5114 " to 34 Pin Header .... $5.00
RS232 CABLE
36" M-M,'M-F ............... 15.00

5%

DISCOUNT

ON ORDERS OVER $100.001

).
8280 CLAIREMONT MESA BLVD .• SUITE 117
SAN DIEGO. CA 92111
(619) 569-1864

STORE HOURS
Mon .. Fri. 9:00·6:00 - Sat. 10:00·4:00
TERMS: VISA, MasterCard, Certified
Checks, Money Order, NO COD. Visa
and MasterCard add 3%. Personal
checks must clear BEFORE we ship.
Include shipping charges. California residents add 6% Sales Tax.
Call for our Test Equipment Mailer!

8280 Clairemont Mesa Blvd., Suite 117
San Diego, California 92111
(619) 569-1864

BAUD GENERATOR
WD 8116 .................... $5.90

MISCELLANEOUS
WD9216 Synch - Sep ........... $7.50
WD1010 ..................... 20.00
WD1014 ..................... 28.00
WD1 015 ..................... 28.00
MM58167A Clock Chip .......... 5.50
CA301 Op Amp ............ . . .. .35
CA083 Op Amp . . . . . . . . . . . . . . .. .45
2N3055 ...................... 1.00
Voltage Regulators
LM323K + 5V - 3A .......... 4.50
LM78H12 +12V-5A ........ 5.00
6116 2Kx8 Static Ram ........... 3.00

VIDEO CONTROLLER
6545 ....................... $7.00
6545A-1 ..................... 8.00
6845 ........................ 6.00

EPROMS
2716 ....................... $3.50
2732 ........................ 3.75
2764 ........................ 4.00
2764-25 ...................... 5.00

74LS SERIES

PRINTERS
Centronics 703 ............. $395.00
Centronics 588 .............. 225.00
Centronics P1 ............... 105.00
Teletype 43KSR .............. 300.00
NEC 2000 with Single Bin
Cut Sheet Feeder .......... 1500.00
Transtar 315 Color ........... 375.00

S100
CCS 2200 12 slot MF ........ $375.00
CCS 2810A CPU ............. 210.00
2065 64K RAM .............. 250.00
2422 FDC 5114" & 8" ......... 325.00
27181/02 Ser., 2 Par ......... 225.00

POWER SUPPLIES
- WALL PLUG-IN TYPE 13.5VDC - .5A Regulated ....... $4.25
9VDC - .3A ................... 2.15
6VAC - .95A .................. 1.35
- LINEAR Condor Model CP731 DC Power Supply
+ 14V-4A, + 5V-7A, ± 15V-.5A .. 16.00
Condor Model CP573 DC Power Supply
+ 5V-6A, ± 25V-3A ............ 7.50
14KV DC/DC TV Power Supply .... 4.50
+5V/1A, -5V/.2A, +12V/1A,
-12V/.2A, - 24V/.05A
Regulated 2112x4x5" -......... 15.00

SWITCHERS
5V-9.5A, 12V-3.8A, -12V-.8A .. $49.00
5V-5A, 12-3A, 12-2A, -12-.5A ... 45.00
5V - 6A ..................... 20.00
5V - 10A .................... 25.00
28V - 1.3A ................... 25.00

FLOPPY DISK DRIVES
- 112 HEIGHT Mitsubishi M4851 DSDD ....... $99.00
Mitsubishi M4853 OS Quad ..... 99.00
Qume Trak 142 5114" DSDD ..... 99.00
Tandon TM 848-1 8" SSDD .... 149.00
Tandon TM848-2 8" DSDD ..... 229.00
- STANDARD HEIGHT Pertec FD200 5114" OS DO ...... $49.00
Shugart SA850 8" DSDD ...... 199.00
Remax RFD4000 ............. 199.00
Persci 277 2x8" ., ........... 399.00
All Instruction Manuals ......... 10.00

TERMINALS

LS 125 ...................... $ .40
LS 373 ........................ 95
LS 375 ....... ' ................. 60
4073 ......................... 35
7406 ........................ .40

InterTube II Smart (B&W) ..... $225.00
InteColor 3602 Smart (Color) ... 329.00

We Carry Standard TTL, LS, S, ECL

Lead Acid 0 Cell 2V - 2.5A ...... $1.50
Soldering Irons - 30W ........... 5.95
5 Blade Muffin Fans ............ 7.50
Joystick 4 Switches 1" Knob ..... 5.50
Part Boxes - 6 Compartments ..... 2.00
Elgar 400W Unint. Power Sup ... 425.00
Handheld 3112 Digit DMM LCD
KD55C· .................... 50.00
KD615 ..................... 56.00
ZM-11 U LCR Bridge ........... 79.00

LOW PROFILE IC SOCKETS
8 Pin
14 Pin
16 Pin
18 Pin
20 Pin
24 Pin
28 Pin
40 Pin

50 per Tube
25 per Tube
25 per Tube
25 per Tube
20 per Tube
20 per Tube
10 per Tube
10 per Tube

........... $2.50
............ 1.50
.......... : .2.25
............ 2.50
............ 2.00
............ 2.50
......... ~ .. 2.00
............ 1.60

X·Y PLOTTERS
11 x 17 ............... from $300.00

MISCELLANEOUS

ON YOUR OWN _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
(continued from page 79)

they've seen you three times. Ads
reinforce themselves.
What about VISA and MasterCard?
This is a tuffy. Chances are about 1
in a googolplex (a bunch) that you can
become a VISA merchant without a
storefront. Period. Too many ripoffs
going around for them to trust anyone, so they make a blanket rule (and
there are still ripoffs).

About your only hope is to tie up
with a computer dealer in your community who is already a merchant. Set
it up so you both make money. But
first, make sure he (she) is someone
you can live with, since this is going
to be a long-term relationship. You
may even get more than just access to
VISA: you might be able to use his
phone number, his order desk, and
his address. He has to be there from 9

4 MHZ ON YOUR zao IS LIKE DRIVING 40 ON THE FREEWAY,

GO 60 INSTEAD!

to 5 anyway.
If you're selling software, maybe
you could also sell it bundled with
hardware (the dealer gets the hardware sale). The software is $300 per
copy, for instance, but complete with a
Commodore and a printer the total
might be only $325. What's the customer going to buy? Even if he already
has a computer he'll buy the package
and give the Commodore to his kid.
That way the dealer shouldn't mind
handling details like taking orders and
shipping the product. Plus, he gets
national exposure.
What about mail order sales?
If you decide to go it alone you can
force your customers to mail in orders
with checks enclosed. Just give a post
office box number or street address.
That way you don't have to deal with
phones or VISA cards.
However, this may not work. Unless
(continued next page)

SERVO 8 HIGH PERFORMANCE 6 MHZ SINGLE BOARD COMPUTER
•
•
•
•
•

•
•
•
•
•
•
•
•

6 MHZZ80BCPU - RUNS AT FULLSPEEDWITH NO WAIT STATES
FOUR LAYER BOARD (5.75" x 8") CAN MOUNT DIRECTLY TO MINIFLOPPY
POWER REQUIRED 5 VOLTS AT 1.4 AMPS. NO OTHER VOLTAGES NEEDED
UNIQUE FLOPPY CONTROLLER WITH AUTOMATIC SELF-ADJUSTMENT (NO POTS)
FOR; 3.5" DRIVES, 5.25" DRIVES, 8" DRIVES, 1.6 MB 5.25" DRIVES
CONFIGURATION MANAGEMENT UTILITY INCLUDED ALLOWS EASY MENU-DRIVEN
SELECTION OF OVER 50 DIFFERENT FLOPPY AND WINCHESTER FORMATS AS
WELLAS BAUD RATES, PRINTER PORT SELECTION AND TURN-KEY AUTOLOAD
S.A.S.1. (SCSI) BUS FOR WINCHESTER CONTROLLER (XEBEC 1410)
TWO RS232 PORTS WITH SOFTWARE SELECTABLE RATES 300 TO 153.6K BAUD
STANDARD CENTRONICS TYPE PARALLEL PRINTER PORT
2K EPROM WITH AUTO SELECTION FOR BOOTSTRAP ( FLOPPY OR WINCHESTER)
64K 150NS DYNAMIC RAM WITH 128K EXPANSION AVAILABLE
50 PIN SYSTEM EXPANSION BUS WITH Z80 TERMS PLUS ADDITIONAL TERMS
REAL TIME CLOCK, TENTHS OF SECONDS, SECONDS, MINUTES, DAYS, WEEKS
NOT A TOY, SERVO USES MIL-SPEC OR INDUSTRIAL GRADE PREMIUM PARTS

• A &T SERVO 8 COMPUTER - $389 FOR CP/M ADD $70
VISA M/C COD
• CP/M V2.2 CBIOS SOURCES - $50; INCLUDES WINCHESTER FORMATIER,
EPROM, CBIOS (Z80 CODE), CONFIGURATION UTILITY (TURBO PASCAL CODE)

Attention Okldata J.lllne
92/93 owners ••• Announcing
FEDIT
a font editor for your
Okldata printer.
FEDIT is a complete system for designing and defining
characters for the downloadable character graphics
generator (DLCG) in Okidata IJline 92/93 printers. The
designed fonts are kept in individual files on disk available
for editing and/or sending to the printer; all by FEDIT
utilities.
FEDIT features include:
• fast. menu-driven execution, easy to learn and
use.
• full-screen control of the character grids using
single-stroke control codes like the popular word
processor.
• complete, transparent font file handling,
including backup files.
• includes a predefined file of greek and scientific
characters for immediate use.
• complete documentation including design tips
and a sample layout sheet.

• SERVO EXPANSION BOARD WITH 128K ADDITIONAL RAM, CLOCK/CALENDAR
WITH BATIERY BACKUP, TWO ADDITIONAL SERIAL PORTS, - $266
• SERVO CONTROL INTERFACE WITH 24 ANALOG INPUTS AND 8 ANALOG OUTPUTS
(12 BIT ADC, DAC) PLUS 16 DIGITAL INPUTS, 64 DIGITAL OUTPUTS - $495

• separate Send utility for finished fonts.
• complete, mature system available now.
FEDIT is currently available on 8" SSSD CP/M~ v2.2 for
Big Board I (using the on-board video) and Xerox 820.
FEDIT is also available on 5W' CP/M for Kaypro (2. 4. 10).
Cost is $19.95 US / $25.95 CAN. For information and
orders contact:

Brooke Computer Systems Ltd
494 15th street W_t
OWen Sound. Ont.r'o
CANADA N4K 3K4

SERVO COMPUTER CORPORATION
360B N. ELLENSBURG ST. BOX 566
GOLD BEACH, OREGON 97444
(503) 247-2021

Micro Cornucopia, Number 27, December-January 1986

Shipping and Handling please add $2.50 (U.S. and CAN).
Check or money order only, no C.O.D.'s OntariO residents
add 7% sales tax.
CP/M~ is a trademark of Digital Researr.h Inc.

81

ON YOUR OWN _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
(continued from page 81)

you're doing something that they can't
get somewhere else, or your price is
substantially better, then chances are
they're going to purchase from someone who takes calls and cards.
You start out with no reputation and
no recognition. People's first impression of you is the one your ad makes.
That helps readers decide, first, if
they're interested in your product, and
subsequently, the ease with which
they can get that product, and how
well they think they'll be supported.
People like to be able to call you,
even if they'll be ordering by mail. If
they need support they don't want to
wait for the mail; they want to know
that they can talk to someone.
What are the costs of doing business?
If you can tie in with someone
selling a product to the same market
(preferably something that's not directly competitive), it's possible that
they'll mail your flyer along with
theirs, or they might even sell your
product for you.
If you're having them send something out for you, you could offer
them something like 10 percent to 30
percent of every order they generate.
The customer contacts you directly,
you handle the order, you do the
shipping, all that stuff.
A mailing to 1,000 people will proba-

bly generate between 20 and 50 orders
(2 percent to 5 percent), but the costs
can be substantial. That is, buying the
label (10 cents), putting the label on (2
cents), providing return postage (permit fee and 35 cents per piece returned), printing, graphic design,
typesetting, illustrating, writing, envelope: all add up quickly. In fact, it
would be very easy to spend $2000 or
$3000 for your first 1000 pieces (between $40 and $100 per order).
Of course, as you increase the size
of the mailing, the cost per contact
drops, but even a huge mailing will
cost you 40 cents per mailed piece,
minimum.
Makes Magazine Advertising Look
Good
As I mentioned earlier, a rule of
thumb is that between 1/4 percent and
2 percent of your real audience will
order from each ad. If you pay 3 cents
per subscriber for a half-page ad (certainly cheaper than direct mail) then
it'll cost you between $1.50 and $12
per order for space. To that you have
to add production (another 25 cents to
two dollars per order).
Choice of magazine is just as important as choice of mailing list. If you are
selling genealogical software then you
probably want to be in a genealogical
magazine.

Ever Wondered What Makes CP/M

®

TIck?

Source Code Generators
by C. C. Software can
give you the answer.
liThe darndest thing
I ever did see ••• "
at
" .•. if you're
all interested in
what's going on in
your system,
it's
worth it."
Jerry Pournelle,
BYTE, Sept 183

The S.C.G. programs produce
fully commented and labeled
source code for your CP/M
system
(the CCP and BOOS
areas).
To modify the system to your liking,
just edit and assemble with ASM.
CP/M 2.2 $45,
CP/M+ $75, + $1.50 postage (in Calif add 6.5%).
C. C. Software, 1907 Alvarado Ave.
Walnut Creek, CA 94596 (415)939-8153

How much should I figure for distribution costs?
Once orders come in, you're going
to have a new set of costs. There is the
time involved in taking the order
(phone or mail) and packaging it up.
Then there's the disk, box, label, and
postage.
You'll get some of the packages back
because: the customers refused them
(COD orders), a postal truck drove
over them (the boxes looked like a
challenge), the disk wouldn't boot
(you didn't include a $150 copy of CPI
M or a $60 copy of MS-DOS with your
$30 product, shame on you!), or the
address they gave you wasn't correct.
If you send out orders before the
checks clear, you'll have to eat some
bad checks (catsup helps). Some people won't like your software and will
insist on returning it for a refund (after
making a copy or two).
Should I include a manual?
It's very tempting to put the manual
on the disk (it's what we're planning
for Private Domain). You save on
printing, packaging, and postage.
However, a large printed manual discourages mass duplication. No one
wants to stand in front of a Xerox
machine for 25 hours.
You don't have to typeset the manual - a letter quality printer is just
fine. One of those quick print places is
great for small runs of small manuals,
but for larger pieces (20 pages and up)
and larger runs (5,000 and up) it may
be cheaper to work with a medium
size print shop. Whichever route you
choose, check with them in advance
for tips on how to prepare your original.
Printed manuals are also easier to
use than the disk version. The user
can refer to the manual while working
on the program. You can add an
index, quick reference section, and
graphics to a printed piece. The manual and the packaging also suggest
something about the quality of the
software (rightly or otherwise). That's
why Ashton-Tate spends huge
amounts on fancy boxes and bindings.
It makes their software look good and
if you are charging a bunch, you owe
the buyer a manual.

CP/M is a registered trademark of Digital Research, Inc.

82

Micro Cornucopia, Number 27, December-January 1986

Is it okay to include the source?
It depends. If the user is a neophyte
or if the program is a real breakthrough, I wouldn't release source.
But if you've written yet another keyboard translator or spreadsheet, then
I'd say release the source, especially if
you are selling to a sophisticated user.
Providing the source gives you a sales
edge, and it might be enough of an
advantage to increase your sales by a
bunch.
Of course, purchasers could add a
few bells and whistles to your program and then jump into the market
faster than if they had to write from
scratch, but they would still be faced
with all the rest of the startup costs
that you faced. Plus, you would have
the advantage if they didn't release
source.
How do I research the market?
Have you looked at the whole market? How many other people are already selling this kind of package?
(Lewis) "I put out 50 requests for
information and wound up getting
almost half of them back. Which is
good, since the list was pretty old.
Some were charging quite a bit for a
crummy product. I think if I have
something sufficiently better, then
people will switch over."
What are the prices running?
"The cheapest was $25, the most
expensive was $300. The difference
between the actual products was not
that substantial."
How did you find out about them?
"I got this reference book on genealogy, and in it was a chapter on what
software is available. I wrote to everyone on that list."
I assume there are a couple of
genealogical magazines.
"Yes, but I haven't really done my
research. "
You would want to see how many
are still advertising. The key is how
many people have advertised continuously for the last year. Those are the
people who are at least breaking even.
Then you should get a media kit
from these magazines to see how
much the advertisers are spending and
see if it looks feasible to advertise your
product.

Complete Packages
You might even consider selling a
complete package. Of course, that
takes it out of the arena of a struggling
student with no phone. But, as we
discussed earlier, this might be a great
enticement for a dealer to work with
you.
Another advantage of a complete
package is that you know exactly what
customers have. You can tell them
which disk to put into drive A (label
up), what keys to press to bring up
the menu (if it doesn't come up automatically), and which selections to
make. The printer comes with all the
cables, the system knows how to talk
to the printer, and so on.
(Lewis) "I've never heard of people
selling a system to go along with their
software. "
People are buying computers not for
the sake of buying computers but
because they want to do something.
Sure, you could sell your software by
itself, but it wouldn't hurt to let them
know you offer a complete system.
" All of a sudden I can see porting it
over to the Commodore 64."
Or whatever. The Commodore if
you want to be (and look) cheap. Or
even cheaper, the Adam for $69. The
system might include enough software
so that they could also do word
processing and spread sheets.

Differentiation
We haven't dealt with a very important aspect, though we've been thrashing around it. That is, what's really
unique about your product? What do
you have that will make the customer
sit up and take notice?
If you can't explain the difference in
under six words you have a problem.
"It has better graphics."
Great. Let people see your graphics.
Tell them enough about your package
so they are really convinced that it has
better graphics.
"Could I distribute my software via
bulletin board?"
No. Not unless you really limited
access to the board. If the board were
open, you wouldn't get paid for your
software. Plus, only a small part of
your audience would have the equipment or the sophistication to use a
bulletin board.
Overhead
"I can see that I don't have to worry
so much about the labor. It's the
advertising and support that are going
to kill me."
Yeah. Getting the word out. Letting
people know how special it is, setting
the price properly. All those are reasons why large software outfits spend
$1,000,000 to introduce a new software
product.

•••

L ___

20 Pin

to host
adapter

Shugart 1610
controller

to drive

34 pin

50 pin

-----------SASI to 5T506/412

51/4" HARD DISK CONTROLLERS
These new factory sealed Shugart controllers come with all documentation.
They will control up to two 5%" hard disk drives with up to 8 heads each. These
unique controllers will mount directly on the drive. By the change of an
EPROM they change their instruction set to emulate other popular controllers.
*Shugart 1610-3 emulates Xebec S1410
1610-1 emUlates DTC 510
1610-4 SLSI version similar
to ADAPTEC 4000
Using standard host adapters they work with:
* Wavemate Bullet
* Apple II, 11+, liE
* MAC (see Sept. Dr. Dobbs)
* All AMPRO boards (little board, etc.)
* TRS 80 model III, IV
* And other systems with SASI Ports
* lSI 5160 (PC clone)
or host adapters
1 for $138. ea. 2 for $125. ea. 100 for $85. ea. Quantity priCing available.
• Computer Surplus Store (408) 248-0134 •
Other controllers also available for 8" and 14" drives including Shugart SA1000, 4000 SERIES and
Quantum 2000 SERIES OTC 1404, 14040, 1403, 14030,14081,1420-1).

Solderless CAS/MUX Mod
I devised a solderless method of
doing the CAS/MUX modification (Micro C, issue 24, page 35).
A 14-pin wirewrap socket is the only
part required. I removed pin 5 of the
wirewrap socket with diagonal cutters,
then bent pins 3 and 4 with longnosed pliers so they line up with holes
4 and 5 of the socket on the motherboard. (See Mortensen Figure 1.) All
the pins of the socket were then
shortened. I then tapered the pins
with a file to make it easy to insert the
socket into the main board. (See Mortensen Figure 2.)
To complete the job I removed U66
from its socket, inserted it into the
modified wirewrap socket, and replaced the combination in the motherboard, being sure that pins 3 and 4
went into holes 4 and 5. (See Mortensen Figure 3.) The wirewrap socket of
necessity stands above the original
socket but its stiff pins make it quite
solid.

NOW FOR XEROX 820
BB & BBII
LOW COST
DISK CONTROLLER
SAVE WEAR AND TEAR ON YOUR DISK DRIVES
AND FLOPPIES WITH THE MODEL 3831 ALL
SOLID STATE RELAY. SMALL ENOUGH TO FIT
EASILY INSIDE YOUR DISK DRIVE, THE 3831
CAN BE INSTALLED IN MINUTES.
YOUR BIG
BOARD WILL THEN TURN YOUR DRIVES ON AND
OFF AUTOMATICALLY AS THEY ARE NEEDED.

*
*
*

*
*
*
*
*

- FEATURES SMALL SIZE - 1.75 X 1.4e x
0.35
FAST INSTALLATION - DIAGRAM
INCLUDED
ZERO
CROSSING - ELIMINATES
ALL SWITCHING NOISE
TRIAC OUTPUT - NO MECHANICAL
PARTS
DVDT FILTER - INCLUDED
LOW COST - ONLY $8.83 EACH
1 YEAR WARRANTY
33 DAY MONEY BACK GUARANTEE

".-_-.
COMPANY OF CALIFORNIA
1619 SOUTH MINNIE STREET
SANTA ANA. CALIFORNIA 92i07

(714) 547-4316
CALIF. RES. ADD 6% SALES TAX
ADD $1.33 EA. POSTAGE & HANDLING
PLEASE SPECIFY BBI, BBII OR XEROX

84

Figure 7 - Cutting and Bending
14-pin wirewrap socket

mw
234567

'
1. Cut off pin 5
2. Bend pins 3 and 4 as shown

Figure 2 - Tapering the Ends of Pins

~
-t+~~~ tt-

3. c,,' off .11 P'"' ""m.',",,"
4_ Taper pin ends with file

Figure 3 - Piggy-backing U66
U66
5. Piggy-back the U66 chip onto
the wirewrap socket

14-pin wirewrap socket
6. Insert wirewrap socket in original U66 socket on the motherboard, making sure pins 3 and
4 go into holes 4 and 5
Original U66 socket

I also used a wirewrap socket to take
care of the U86 modifications for the
speed-up. I bent up pins 4 and 5 on a
14-pin socket and soldered the leads
from the speed switch to them. Then
(as above) I shortened and filed all the
pins, put U86 into the new socket, and
put the assembly back into the original
U86 socket.
The only soldering needed on the
board was to the front end of R26
which I could do even with my big,
clumsy hands. This method relieves
one of the worry of frying a microchip
with a soldering iron.
Joseph I. Mortensen
4214 Chelsea Ct.
Midland MI 48640

5MHz Without Surgery
Here's an adaptation of Trevor Marshall's excellent 5MHz modification for
the BBI (Micro C, issue 11, page 4).
You'll need to buy three 14 header
plugs (part# 14pinHP @ $.65 each) and
three header covers (part# 14pinHC @
$.15 each) from JAMECO Electronics,
1355 Shoreway Rd., Belmont, CA
94002.
First, carefully solder a 3K 1/4 watt
resistor between pins 3 and 7 of a
header plug, placing the resistor snugly against the pins and in the center
part of the plug. Next, solder a small

length of wirewrap wire on one end of
a 33 ohm resistor. Place this resistor
beside the 3K resistor in the center
and solder the other end to header
plug pin 8. Now take a 74S04, bend
pin 8 up, and solder all pins (except
pin 8) to the header plug. You may
now solder the wirewrap wire to pin 8
of the IC. If you've been careful with
your soldering, the header cover will
snap nicely on top of the assembly
making a neat little module to insert in
place of U77 (74LS04).
Remove U96 and bend pin 4 up.
Bend pin 5 out just slightly. Solder all
pins of U96 (except pins 4 and 5) to
the corresponding pins on a second
header plug. Now bend pin 5 slightly
on the left so it rests on header plug
pin 4 and solder it there. You may
now snap the cover and put this
module in socket U96.
Remove U76 (74164) and bend pin 5
completely upwards. Bend pins 3 and
4 slightly out. Solder all pins of the
74164 (except 3,4, and 5) to the corresponding pins on the third header
plug. Now bend pin 4 slightly to the
right so that it rests on header plug
pin 5. The same with pin 3 so that it
rests on top of header plug pin 4 and
solder both in place. Snap the cover
and plug module in socket U76.
All that's left to do is change transistor Q2 to an MPS 3640 inserting a 33
ohm resistor in series with the collector lead.
This modification has been in operation for several hundred hours in my
system with 100 percent reliability. I
use B types for all Z80 chips and
memory is 200 ns. 4116s.
Christian Phaneuf
972 Guillaume Boisset
Cap-Rouge GIY 3E4 P.Q. Canada

Xerox Formatter Fix
If you have a Xerox 820-1, you may
have experienced the same problem I
did with the format programs from
user's disk #1. They didn't work! To
make matters worse, a pre-formatted
disk would shortly become un-preformatted. But since the user's disk
also includes the formatter source
code, a fix is a relatively simple mat-

Micro Cornucopia, Number 27, December-January 1986

ter. Just insert a short loop after the
write track procedure that will test the
1771' s busy status bit until it is ready
for the next seek command. Xerox
uses the same routine in its system
monitor for all disk reads and writes.
HXTBIT: HALT

OOTI
JR
DEC
JR

HZ,HXTBYT
D
HZ,HXTBIT

: Insert Loop
; here

BOSY:

Ilf
BIT

JR

Some Like It Hot
My Kaypro 4 (1983 version with
sockets for all the ICs) refused to boot
properly for the first minute after turn
on. It would give the A> prompt but
would then respond to DIR with a
question mark.
Replacing the 1793 and 9216 did
practically no good. Replacing the A
drive did no good, either.
I noticed that the time wait for
correct action was worse with the
cover off, and the only source of heat

A, (WDSTAT)
O,A
HZ, BOSY

NOW AT THE SBC MART
POWER SUPPL V

; PRINT TRACT' AND •••••••

Now you just reassemble and go,
right? Well, maybe. If you are using
the Crowe assembler from user's disk
#1 you still have a little work to do.
Although Croweasm has been fairly
well discussed in several early issues
of Micro C, here's what it needs in
order to assemble the formatter programs:
1. The long ASCII strings near the
end of the program must be broken
down into multiple strings no greater
than 32 characters and redefined using
the pseudo-op DEFM instead of DEFB.
Sometimes you might just want to
shorten the message, but in some
cases you'll need to define a long
display (such as the track header and
the track number display) with two or
three sequential DEFMs.
2. The multi-byte definitions used in
the programs must also be broken
down. DEFB CR,LF,LF has to be divided into three separate statements for
Croweasm.
3. Croweasm has a problem with
relative addressing when it encounters
decimal numbers greater than 2559 as
it does in this formatter program. But
Croweasm doesn't mind hexadecimal
numbers, so that's how we'll get
around it.
Old:

-

Now you can reassemble and go.
Les Garrenton
3305 Scott St.
Portsmouth V A 23707

*

135 Watts
side switch
top quality
'Ii;:
one year warranty
standard cables for 4 disk drives
Model PS-135 power supply regularly
$129, now only $95

•

*'
•

*

'

HARDWARE SPECIALS
keyboard 5150 style regularly $125,
Model KB-3 only $90
keyboard 5151 style regularly $195,
Model KB-3 only $129
memory nine 150ns DRAMs Set 10-64
64K reg $8, now $5; Set 10-264 264K
reg $55, now $39
no better OSIOO drives anywhere,
Sanyo 48tpi F-4 $99; F-9 96tpi $129

CASES

_
.,. .,,,,, """""

-

high quality

~

side- switch

-

flip-top

~
• reg $95, now $69

-

HARD DISKS
-

complete
10MB Kit
special,
only $450

• complete internal 112-high 10MB kit, inc!.
controller and cables, special $450
• complete 10MB kit with low-power 3- 112 /I
half-high drive, fits 5-114 /I slots, $485
20MB half-high drive HD-2 now $445

*

-

full IBM PC/XT
compatibility
8 I/O slots
runs IBM's PCDOS 3.1
BASIC interpreter available
great foundation
for business or
personal system
1 year warranty

*
*

Model MB-1 256K motherboard with OK
regularly $295, now $220
Model MB-3 640K motherboard with
OK regularly $399 now $290
• Model MB-2 640K motherboard,
4.77 and 6.67MHz clock, w/256K Reg
$449, now $399; wlOK Reg $409, now
$369, this is a fast board

LAST "INUTE SPECIALS
GMTI hard disk controller, up to 2 drives, with cables, super fast~
- floppy disk controller, any lix 1 to 4 reg 4Btpi or 96tpi quad drives
* Hercules equiv lonochrole graphics card, runs 123, etc w/printer port
- Multifunction 384K RAM, elk/cal ~ S, P, gale ports w/OK $145, w/384K
f

$175
$74
$145
$170

f

256K RA", keyboird, 4B/96 floppy controller, 360K floppy, lono or color
cird, ciie, power supply, w/IB" PC DOS 3.1 t839 w/o IB" PC-DOS ONLY t799

CO"PLETE 18" PC CO"PATI8LE SYSTE"

LD SBCT1+4836

Change to: LD SECT1+12E4H

was the CRT. With the unit warmed
up and operating correctly, I sprayed
the eight 4164 250 ns. RAM chips with
freeze spray and did a DIR. The
problem was back. Then I warmed the
RAM chips with a lamp. The problem
was gone!
Replacing the RAM chips with 200
ns. devices has resulted in perfect
operation.
John C. Reis
Box 874
Bensenville IL 60106

VisalMCIAmEx ORDERS: (619) 375-5744
The SBC Mart, 821 Commercial St., P.O. Box 1296, Ridgecrest, CA 93555
Shipping and handling: drives/mother
boards/cases/power supplies $4.50 ea,
software $2.50 ea, cards $2 ea, keyboards
$4. CA residents add 6% sales tax.

SBC PLEDGE
- service after sale
- low prices

- technical support
- one-year warranty

EDITORIAL
(continued from page 7)

Finally I remembered the outfit selling replacement IBM compatible keyboards at the West Coast Computer
Faire. I had bought a replacement for
my K16 keyboard from them. It was
cheap, it was Taiwanese, and it
worked.
Sandy dug up the receipt (Sky High
Company), and I called them. Sure
enough, they had Taiwanese everything. Did I want to buy an assembled
system?
No, I wanted boards, cabinet, power
supply, keyboard, monitor. Pieces. So
they sent me their literature. When I
saw the prices I knew I had found the
source. See the "Dirt Cheap Clone
Anyone Can Build" article for details.
Why All The Fuss?
So why all the excitement now?
When the Kaypro 16 arrived (our very
first clone) we were all curious about
it. It introduced us to the peculiarities
of MS-DOS (it's not very different
from CP/M, so moving back and forth
is easy). But the 16 was too expensive,

too inscrutable, too much like a black
box. (I'm not going to mess with
anything that expensive and that poorly documented.)
You take it out of the box, tum it
on, and hope it runs. H it doesn't you
send it back.
That's no fun. H you open it up, you
probably won't know which boards do
what, and you can't operate the K16
with the boards exposed.
Anyway, it's a lot easier to futz with
a system if zapping a board won't cost
you the better part of a grand. (mM
wants $720 for an XT processor board.)
PC Resistance
I resisted moving into the PC environment for several reasons. First, PC
software was more expensive than the
equivalent CP/M software. Second, the
clones offered no speed advantage
over a 4MHz Z80 (sometimes, depending on the software, they were a
disadvantage). Third, I resented mM's
loud proclamations that their "16-bit"
8088 was much more powerful than

IBMPC/MSDOS/CPM SOFTWARE
MBACOUNT/$89.00: Small business double entry accounting. Up to 40 asset. 40 liabilities, 40

income, 80 expense & 20 capital accounts user assignable. Prints checks, P & L, balance sheet,
chart of accounts, single account details, check ledger, etc. Generates a printable detail journal for
audit trail.
AIR, AlP, PAYROLL INVENTORY: These programs are available as either stand alone software
or MBACOUNT integrated modules. Stand alone $79.00
Integrated $50.00
PROFBILU$149.00: Time keeping and billing for all professional people who bill at various hourly
rates. Handles 400 clients, 10 partners/employees. Prints billings, statements, aged billings,
partner/employee hours, etc. May be used stand alone or integrated with MBACOUNT.
SBACOUNT/$79.00: Small business single entry system. Up to 99 income and 99 expense
categories, user assignable. Prints checks, P & L (month, quarter, YTD), single account details,
check ledger. Generates a printable income/expense journal for audit trail.
MAILLIST/$89.00: Mailing list/filing program. 10 fields per record and up to 900 records per file,
files limited only by disk space. Sort/ print all or partial list by most fields on 1,2, or 3 across labels on
80 col. printer. Search, add to, delete or edit by most fields.
MBADATAI$89.00: A data/base-filing system usable without learning any special language or
control codes. Up to 253 characters, 24 fields, 900 records per file. Sort, print, display any fields in
any location in any order desired. Menu driven with step by step promptsl
STANFORM/$79.00: Need to fill out pre-printed forms? Then this program was made for youl
Generates programs for printing data in the proper location on any pre-printed form that will fit into
your printer. Each form need be generated only once as it is saved on disk.
$FINANCE/$79.00: Personal finance, prints checks, posts to as many as 120 user assignable
expense categories, posts checks & deposits, reconciles multiple checking accounts, etc. Similar
program for up to 9 charge cards. Extracts/prints listings for various categories.
TOUCHTYP/$49.00: Parallels high school/college level touchtyping course. Displays typos, final
score. Timed speed drill mode. Electronic typewriter mode converts your printer to a one line
memory electronic typewriter with settable margins, tabs, line spacing, etc.
MSBCHART/$49.00: Prints alphabetized list of all variables & line numbers referonced in any
program written in basic cross referenced to the line number where used. A godsend when writing or
modifying basic programs.
Place your order or request FREE catalog by mail or If using COD or credit card, telephone anytime
of the night or day. Add $3.00 shipping &$3.00 additional for COD. Shipment will be no later than next
working day by 1st class mail. Californians must add 6% tax to prices.

.a.

1\'
1 t!1::1
- - ••• -

1111
86

.a.

Micro-Art Programmers
173 Birch Avenue, Cayucos, California 93430

Phone: (805) 995-2329

the "outdated" 8-bit machines. Well,
the 8088 looks a lot more like a Z80
with bank select than a 68000. Fourth,
I felt that Intel's convoluted segmented addressing scheme was a pain I
didn't need.
There had to be some very good
reasons before I would get excited
about the clonal market. I finally
found some.
First, clones are finally cheap, about
half the price of the cheapest Kaypro
Z80 system if you already have a
couple of drives.
Second, you can put a clone together, futz with it, and add additional
boards (there are lots available), all by
yourself.
Third, the software is coming way
down in price and going way up in
function. The compilers are getting
better and some folks are even writing
in assembly language.
Fourth, unlike bank switching, you
can really use the additional memory.
A Pascal program that requires five or
six overlays in CP/M will compile
straight (and run faster) under MSDOS.
Fifth, MS-DOS has some advantages
over CP/M such as: named directories,
redirection, built-in port drivers, and
room in memory to add new features.
The Z system (ZCPR3) has some of
these features but it's larger than CP/
M, and that is a definite penalty when
you're confined to 641<.
Cheap Winchesters
The size of the PC environment and
the surplus of imported hardware
have cut sharply into the cost of
winchestering a PC. For instance,
you'll pay $1100 to $1200 for a 20 meg
hard disk package for your Kaypro,
but for about $1300 you can put
together a complete XT with two floppies, 20 meg winchester, 640K, color
and B/W graphics - the works.
D81-32

Another reason that I started the
search for a really cheap (and easy)
clone is that the biggest cost of running a DSI board is the system it runs
on (if you don't have one already). So,
if you can put together a clone for
$600, borrow the drives out of your
Kaypro for $0, and then add a DSI

Micro Cornucopia, Number 27, December-January 1986

board for $1000, you'd have a 6MHz
32032 screamer (just change the crystal
for 8MHz) for the power-hungry stuff
for $1600. Plus you'd still have a
reasonable machine for the mundane
stuff like editing (I do it all the time).
The Key To PC Comfort
If you are thinking about building
up a cheap PC, but aren't sure you
can handle the transition to another
operating system, here are a couple of
tips.
The transition will be easiest if you
get MS-DOS versions of the software
you are already using. For instance, if
you do a lot of word processing and
are comfortable with WordStar, then
get an MS-DOS copy of WordStar (or
one of the cheaper look-alikes). If you
are working in Z80 dBASE II, then get
MS-DOS dBASE II (or III). You'll be
right at home because they kept the
bugs and the same slow speed.
The Manual Gets Easier
I felt pretty spastic when I first
started using the operating system. I
couldn't move about among the
named directories very dependably.
(The manual seemed particularly inscrutible at first, but now that I don't
need it, it seems much clearer.) The
exact syntax of the commands is just
different enough to keep an experienced CP/Mer off balance for a while.
You'll get up to speed fastest if you
have an experienced MS-DOSer peeking over your shoulder for an hour or
two.
However, as an experienced CP/M
user, you have some decided advantages over computer illiterates. There
are so many strong similarities between the two systems that once
you're over a few hurdles (e.g., use
COpy SOURCE.FIL DESTINAT.FIL
instead
of
PIP
DESTINAT.FIL-SOURCE.FIL), you're on
your way.
Voting With Your Wallet
A week ago I was speaking at the
Eugene Oregon Kaypro group meeting. There were 12 attendees (down
from 30 + two years earlier). The talk
was pretty much a freeform question
and answer session.
At the beginning we talked about 83

Kaypros vs. the 84 series. This kind of
discussion is home ground for me.
Then the discussion turned to the MSDOS world. I talked about the way
that CP/M had become the standard
operating system for the 8080/Z80
world (rather than such proprietary
notables as Heath-DOS or TRS-DOS),
and the advantages of having a standard.
Then I mentioned that the PC had
become another standard (with MSDOS riding along on its coattails).
Actually, it's an even better standard
than CP/M because it defines an upward path (more memory, faster processors, older whiskey ... ), it supports
graphics (all the way to 1024 by 1024),
it supports sound (not fancy, but
sound), and it has a larger installed
base.
We thought we could survive quite a
while in the Z80 arena and then
leapfrog most of the 8088/86 PC environment. After all, there are bunches
of PC rags out there and very few
(approaching 0) publications dedicated
to CP/M.

THE BESTZBO
ASSEMBLER ON
THE MARKET JUST
GOT BETTER!

But CP/M is really going away, fast.
I'm beginning to worry about where
people are going to hang their coats as
closets fill with Kaypros and Morrows.
Even Ciarcia's new board hasn't lit
much of a fire under CP/M.
Ciarcia's 64180 Board
Hooray, I thought. Faster than a
speeding Z80, leaps half a megabyte in
a single JMP, the 64180 deserves a red
S and a private phone booth. After all,
when you have a fast processor which
can directly access 512K of RAM you
can run large programs, three or four
memory resident helpers (like Sidekick), and a zingy operating operating
system, simultaneously (and schedule
Lois Lane, too).
I was disappointed when Byte hit
the streets. Ciarcia provided no support for a larger program area (I knew
it wouldn't be easy, but I was still
hoping). There was no support for
multi-tasking, and the rest of the on(continued next page)

180A511
~~~$49~5

DON'T ASK HOW OURS CAN BE SO FAST .••
ASK WHY THEIRS ARE SO SLOW!
".. a breath of fresh air .."
Computer Language, Feb. 85
".. in two words, I'd say speed &
flexibility",
Edward Joyce, User's Guide #15

Now fully compatible with M80
in .Z80 mode with manyextensions. Time & date in listing, 16
char. externals, plus many other
features.
To order, or to find out more
about our complete family of
development tools, call or write:

.....s-LR..Systems
1622 N. Main St., Butler, PA 16001
(800) 833-3061, (412) 282-0864
Telex 559215 SLR SYS

I_I
. . ..

min:sec 1:173:26 5:25 6:13

Micro Cornucopia, Number 27, December-January 1986

2Mhz

8" SS/SD

~ C.O.D., Check or
. . Money Order Accepted

:06 :22 :49 1:00

8Mhz
Ram Disk

SHIPPING: USA/CANADA + $3 • OTHER AREAS + $10
zao CP/M compatibility required.

87

EDITORIAL
(continued from page 87)

board 256K was restricted to RAM disk'
service.
It would be difficult to tell the 6MHz
64180 from a 5MHz Kaypro in terms of
system operation (in fact, for very
large assemblies or compilations, the
Kaypro with a 1 meg RAM disk might
well outperform the 64180).
Plus, you'd have to work very hard
to build up a 256K 64180 system for
less than you could put together a
640K XT clone. (And what about serial
port drivers, winchester drivers,
graphics software?) If you want to
build up a CP/M system and write
your own drivers for it, then do it. It's
a heck of an education. However,
don't expect to have the most cost
effective system around.
Back To The DSI-32 Board
Speaking of cost effective," munch
on the following: Yesterday I was
sitting at the Micro C booth at the
Oregon State University computer
expo. Two booths down, Stride Micro
was showing its $12,000 68000 based
super system. No, it didn't have color
II

graphics, no it didn't run PC software,
but it did crunch numbers very well.
At our booth was a system that had
a 20 meg winchester, ran all PC software, and because of the 10MHz DSI32 board, it out crunched the Stride by
a factor that wasn't funny (at least not
to Stride). Our complete box cost only
$3,000 including the $1,500 DSI-32.
In fact, a number of researchers at
the school stopped by our booth to
peek at the DSI-32. One had an economic model of U.S. agriculture (when
weather squalls, then com prices pop
and hog prices squeal) written in FORTRAN (of course). The program took
80 minutes of CPU time to run on a
Cyber (they ran it between 2 a.m. and
6 a.m. because that was the only time
they could afford).
He figured that a 2 megabyte version
of the 32032 board and the Green Hills
FORTRAN compiler running on a
cheap clone could not only handle the
project but would cost less than what
he'd budgeted for a year's Cyber time.
It's been five years since I used a
Cyber (no, Micro C has never fired up

PROGRAMMING SYSTEM

EPROM PROGRAMMER
interfaces to the BBI (XEROX 820) parallel port
Requires +5v. I .3A, +25v. 4!1 .lA, interface cable

1. Software and schematic
2. Bareboard and schematic
3. Software and bareboard
4. Software and kit (less ZIFs)
5. SofLware and full kit
6. Programmer A + T

15.00
15.00
25.00
60.00
75.00
75.00

Big Board II sofLware and source (uses BB II sockeLs for programming)

15.00

Utility Disk 1

-

SOPTWARS AVAILABLS POR CP/M-8~" CP/M-86 AND MS-DOS SYST8MS
STAND ALONG BOARD - 6LSCTROI~IC SWITCHING OP SPROM TYPBS
USBS 24 VOLT XPMR POR POWBR - ALL SUPPLIBS/TIMING ON BOARD
NO PBRSONALITY MODUL8S TO BUY - LARG8 COMPRGHSNSIV8 MANUAL

* * PARALLEL PRINTER INTERFACE * *

PEG - Universal Object File Translator. FormaLs supported ...
8/16 bit Intel and Motorola hex
BHLF
.COM
BPNF
ASCII
Merge and split of 16 bit daLa also supported.
HEXED - A full screen hex file editor (simultaneous editing of boLh hex and ascii)
Full source and documentation on disk
15.00

CONNSCTS TO ANY PARALLBL PRINTBR INTBRPACS - US8S 8 OUTPUT
DATA BITS AND ONBINPUT DATA BIT (BUSY LINE). BUSY LING IS A
HIGH SPBBD SSRIAL INPUT. PULL SPROM RBADING AND PROGRAMMING.
UNIT MAY ALSO B8 CONNBCTBD TO ON8 8 BIT INPlfI'/OUTPUT PORT.

* * CONTROL P.ROGRAM COMMANDS * *

WADE-I
256k byLes of RAM with DMA capability
4 fully buffered 8 bit parallel porLs
configurable EPROM sockeL (2716 thru 27256)
4 fully buffered 8 bit parallel ports
2 configurable RS232C serial ports
CompleLe documenLation

1. Bareboard

-

2. PrinLer buffer EPROM
3. Printer buffer source

include $3.00 for S/H

Biegun and Associates
P.O. Box 4071, Stn IIB" Winnipeg, Manitoba
CANADA R2W 5K8

PROGRAM BPROM(S) PROM DISK
- SAYS BPROMCS) TO DISK
RBAD DISK PILB INTO RAM
- PROGRAM BP~OM(S) PROM RAM
RSAD BPROM(S) INTO RAM
- COMPARS 8PROM WITH RAM
V8RIPY BPROM IS BRASSD
- COPY BPROM
DISPLAY /MODIPY RAM - (MONITOR MODS) WITH 11 SUB COMMANDS
PILL-DUMP-XPBR-BXAMINB-MODIPY-BIAS-PROGRAM-VBRIPY, STe.)

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

39.00
10.00
15.00
*u. S. FUNDS*

2732A
2764A
27128
27128A
27256
27CXX

2708
2758
2516
2716
2732
2764

Program, Verify, Load and Erase check
2716, 2816A, 2516, 2732(A), 2532, 2764, 2564, 27128

Specify S" SSSD or 5.25 Kaypro diskeLtes

Turn In Your Friendly Neighborhood
Dealer
If you know of a bookstore, parts
house, or computer store that should
be carrying Micro C, send us their
name and address, and we'll send
them a copy and some information.
If they sign up and you were the
first person to turn them in, then we'll
send you a certificate good for a free
public domain disk. If you send in two

CP/M, MS-DOS EPROM

INVENTORY CLEARANCE

-

its Cyber, what with electricity costs
and all). If memory serves me correctly, it is extremely powerful (a 64-bit
wide processor), extremely unfriendly
(the Cyber's text editor almost made
me give up writing), and extremely
impressive. You can tell just by looking at a Cyber that the numbers it
spits out are going to be as correct as
numbers can get.
The fact that the obviously intelligent person standing in front of me
was considering using the homely little clone on the table in place of a
Cyber was pretty impressive. Pretty
impressive.

~5~~~~fA4IJr~~W stt~t~l~M 8~6I~Ws~T8

--->$199

PARTS KIT WITH SOPTWARS AND OOC-)$179 PCB,SOPTWARB ci DOC->$69
SOPTWARB ON 8 ci 5 1/4 DISK POR KAYPRO, OSBORNS, IBM ci OTHBR PMTS

--------------------------------------------------------TO ORDBR SaND CHECK, MONGY ORD8R, WRITS OR CALL
ANDRATECH
P.O. BOX 222
MILFORD, OHIO 45150
(513) 752-7218
CALL OR WRITS POR MORS INPORMATION -- ADD $4.00 POR SHIPPING
OHIO RSS. ADD 5.5% TAX -- VISA/M.C. ACCBPTBD -- $300 POR COD

winners you get two certificates. (If
you show them Micro C they'll probably tell you if they are interested.)
So far, all but two stores that have
carried Micro C have sold out of every
issue (we've had a total of five returned), and some are now ordering
and displaying back issues.
The shops which should be most
successful carrying Micro C are the
ones with a good selection of really
technical computer books (compiler
design, hardware design ... ).
Send names and addresses to:
Tum In A Dealer Department
Micro Cornucopia
PO Box 223
Bend OR 97709

In This Issue
How to build a really cheap XT or
AT is the feature article this issue.
After several other magazines ran similar articles for high priced versions, I
figured they could be beat for cheap

(after all, that's the main reason we've
been building all along).
We're including a short overview at
the beginning of each article and column, these overviews should give you
a good feeling for what the pieces
cover and why we selected them for
publication.
Coming Up In Micro C
The Turbo Pascal contest deadline
has come and gone, and we'll be
making February "National Turbo
Month." We received more than 100
entries, much of them containing really good stuff! All the Pascal you ever
thought possible and more will be in
this special February Turbo issue
(great for those cold winter days).
April (no foolin' - we're having
another April issue) will be our 68000
issue. This means a close look at
Amiga (its lack of appearance hasn't
stopped anyone else from pretending
it's real), plus an answer to the burning question: Do real programmers
prefer doing it on the 68000? (If you
want a clue to the answer, check out

~~
CALENDAR/CLOCK
$69

KIT

D~~~S~/ATMHPING!
FILE
• Works with any Z-80 based computer.
• Currently being used in Ampro, Kaypro
2, 4 & 10, Morrow, Northstar, Osborne,
Xerox Zorba and many other computers.
• Piggybacks in Z80 socket.
• Uses National MM58167 clock chip, as
featured in May '82 Byte.
• Battery backup keeps time with CPU
power off!
• Optional software is available for file
date stamping, screen time displays,
etc.
• Specify computer type when ordering.
• Packages available:
Fully assemble.d and tested
$99.
Complete kit
$69.
Bare board and software
$29.
UPS ground shipping
$ 3.
I

MASTERCARD, VISA, PERSONAL CHECKS,
MONEY ORDERS & C.O.D.'S ACCEPTED.
N. Y. STATE RESIDENTS ADD 8% SALES TAX
KENMORE
COMPUTER
TECHNOLOGIES
P.O. Box 635, Kenmore, ~e", York 1-1217 (716) ~77·()617

the instruction set on the 8086/8088.)
If you have any ideas for articles on
Turbo, 68000, Amiga (or ST), XTs,
ATs, an 8088 instruction set primer,
32000, you name it, then let us hear
from you. If it's new and you're
excited about it, then let us know.
Back Issues, Half Price
Over the first four and a half years
we've kept all the issues of Micro C in
print. But now, as we make our move
to new systems and processors we're
going to clear those back issues out of
the basement. (This is going to shake
up some very settled spiders.)
If you order six copies or more you
pay only $1.50 each if you're a U.S.
resident, $2 each if you live anywhere
outside the U.S. (surface shipping). If
you've been working with a partial
deck and have considered filling out
your collection of Micro Cs, this is
definitely the time to do it. We currently have copies of all our back
issues, but once they're gone, they're
gone.

•••

GRAPHICS FROM YOUR
DOT MATRIX PRINTER

/

i /
1'1
:I

~

HPLDT V)/

:>

::0

'"
!!!
o

"lI

"

:I

/

§

A PLOTTER EMULATION PROGRAM
FOR YOUR OKIDATA, PROWRITER,
GEMINI, OR EPSON PRINTER.

~

-I

:I>

r

::0

*

Iri
1'1

PO~ERFUL HP-GL PLOTTER SYNTAX:
SCALING, LINETYPES, WINDOWS,
ETC; LABELS ANY S I Z E , .5L/9#T,
OR ~OIT0371Ia.
FAST! GRAPHS IN FOUR MINUTES.
HI-RES MODE: UP TO 136x144 DPI.
PLOT SIZES 11"x14" TO 7"x48".
80+ PAGE ILLUSTRATED MANUAL.
SOURCE CODE IN C FORe ~
PROGRAMS THAT USE
HPLOT TO MAKE PIE
CHARTS, GRAPHS, ETC.
REQUIRES 54K Z80 CP/M 2.2.
OTHER PRINTERS AND OS'S SOON!
AVAILABLE IN 8" SSSD AND MOST
5.25" 48 TPI FORMATS.
PLUS $4 SHIPPING
$ 49. 95 SPECIFY PRINTER, DISK

:>

::0

o
:x:

*
*
*
*
*

:x:

"lI
I
Cl

r

:x:

1'1

I:

r

1'1
-I
-I
I
"lI

:>

o

":>

*
*

~

N

r

8
/

q

.PLE/9SE AOTE ClVR hEAt' /9.o.oRES.s:'

/

~----------------------~

ORDINATE
SOLUTIONS
505 W. SPRINGFIELD
CHAMPAIGN,

IL

61820

--

MAKE YOUR KA YPRO SPECIAL!
The Kaypro
Disk Library
37 Disks of Selected
Public Domain Software
KAYPRO DISK K1
Modem software
KAYPRO DISK K2
Utilities
KAYPRO DISK K3
Games
KAYPRO DISK K4
Adventure
KAYPRO DISK K5
MX·80 Graphics
KAYPRO DISK K6
Word Processing Utilities
KAYPRO DISK K7
Small C Version 2 Compiler
KAYPRO DISK K8
Small C Version 2 Source
KAYPRO DISK K9
ZCPR
KAYPRO DISK K10
Assemblers
KAYPRO DISK Kll
Library & Checkbook Programs
KAYPRO DISK K12
FORTH
KAYPRO DISK K13
Source of fig·FORTH
KAYPRO DISK K14
Smartmodem Program
KAYPRO DISK K15
Hard Disk Utilities
KAYPRO DISK K16
Pascal Compiler
KAYPRO DISK K17
ZSOTools
KAYPRO DISK K18
System Diagnosis
KAYPRO DISK K19
Prowriter Graphics
KAYPRO DISK K20
Color Graphics Routines
KAYPRO DISK K21
SBASIC Routines & Screen Dump
KAYPRO DISK K22
ZCPR (Again)
KAYPRO DISK K23
Fast Terminal Software & New BYE
KAYPRO DISK K24
MBASIC Games & Keyboard Translater
KAYPRO DISK K25
Z80 Macro Assembler
KAYPRO DISK K26
EPROM Programmer & Character Editor
KAYPRO DISK K27
Typing Tutor
KAYPRO DISK K28
Modem 730
KAYPRO DISK K29
Turbo Pascal Games 1 With Source
KAYPRO DKSK K30
Turbo Pascal Games II With Source
KAYPRO DISK K31
Turbo Bulletin Board
KAYPRO DISK K32
Forth·S3 Much Fancier Forth
KAYPRO DISK K33
A super utilities disk
KAYPRO DISK K34
Five games plus source (mosUy Turbo)
KAYPRO DISK K35
Small C Compiler & Source· Vers 2.1
KAYPRO DISK K36
Small C Library of 100 functions

ROMS

Kaypro Add-Ons

Pro-8 Version 3 for Kaypro 4-83

Eight Inch Adaptor Board

Features include:
1. Screen dump with selectable dump
character.
2. Select slow or fast step rate for each
drive.
3. Automatically figures out what type of
drive you are using.
Plus: User selectable cursor (blinking or
not), ignores nulls, and your choice of 1-4
drives of the 191K, 390K, and 784K
variety. (Use of 3 or 4 drives requires
decoder.)
Installation requires no cuts or jumpers. The ROM simply plugs into a Kaypro
4-83 (or 11-83 with a Kaypro 4 processor
board). If you have a Kaypro· II with the
original II processor board then you must
do the II to 4 upgrade. See issue #21 for
details. Your Kaypro II has the original
II board if the monitor ROM (a 20-pin
chip with paper stuck to its top) is
marked 81-149. The 4 ROM is marked 81232.

OK, you asked for it: the 8 inch adapter
board for the Kaypro. Now you can have:
1. 4 drives 2. Up to 1.3 meg of storage per
disk. 3. Access to SIGM and CPMug
software. 4. Super fast data access. The
circuit board, ROM, and disk in this
package will let your Kaypro run up to
four drives. A and B have to be 5" drives,
C and D can be either 8" or 5". The eight
inch drives can read and write single
density, double density, or double-sided
double density. Plus, if you have an 84 2
or 4 you get all the Pro-884 MAX
features.
The 8" adapter board plugs right in (no
cuts, jumpers, or soldering - unless you
have a Kaypro II, then you have to do a
II to 4 upgrade.) You supply the drives,
cabinet, and power.
8" Adapter Board ............... $190.00

Schematic Packages

~

~\".

for84KayPros

Pro-884
This ROM lets you run any mix of quad
density (784K) drives and double-sided
double density drives as A: and B: on you
84 Kaypro. Plus, if you plug-in the
decoder board, you can run up to four
drives.

Pr0-884MAX
The MAX gives you all the advantages of
the Pro-884, plus faster screen scrolling,
ZCPR in ROM (you 'warm boot' on any
disk, whether it has system tracks or
not), screen dump, ctrl-p type printer
output, and VT52H/19 terminal emulation in addition to the original ADM3, to
name a few. (We worked on this hummer
for nearly a year.) If you need more
information on the Pro-884s or our '83
compatible ROMS, call, write, or yell for
our Kay Pro Users Catalog

Pro-Monitor ROMS
Pr0-8 Ver 3 ................ $49.95
Pr0-884 ................... $59.95
Pr0-884 MAX ............. $79.95
Decoder Board ............. $39.95

Disks .......... $12.00 each

Order Number 9-5 PST (503) 382·5060 • Tecbnical Information 9-Noon PST Only (503) 382-8048

Finally, a schematic of your processor
board, logically laid out on a single 24'~
by 36" sheet, plus a very complete,
illustrated, Theory of Operation that's
keyed to the schematic. You'll get information that's available nowhere else.

Kay Pro Schematic PacIiages
Kaypro II & 4 (pre-84) ............. $20
Kaypro 10 (pre-84) ................ $20
Kaypro 84 series (II, 4 & 10) ........ $20

SPECIAL PRO-884 NOTE:
(And for 8" Adaptor Board)
The Pro-884s are sensitive to the version of
CP/M you are running.
1. Neither the Pro-884 nor the Pro-884 Max
will run on CP/M 2.2U. However, if you can
locate a CP/M 2.2F or 2.2G system disk (your
dealer should have a copy) you should be able to
run our 884 monitors. (Don't try to boot For G
before you change monitors.)
2. There are two distinct versions of CP/M
2.2G. Only the Pro-884 Max is sensitive to the
version of 2.2G you have - it's the ZCPR in
ROM that's the problem. (If you have CP/M
2.2F then you have a Normal CP/M.) So, before
ordering the Max, boot up your original system
disk and read the sign-on. If it's CP/M 2.2G
then we need to know whether it is the high
(normal) version or the low (minus) version.
To determine your G version (you'll become a
G Whiz!):

A>DDT
L6 

(ddt's response)
The first line of the response will be a JMP
D600 or a JMP D800. The JMP D600 means
that you have a low (minus) version, and the
JMP D800 means that it's a normal version.
When you order your Pro-884 Max, be sure to
specify whether you want the normal Max or
the minus Max. Otherwise, we'll just guess that
you need the normal Max.

WE'RE CLEARING THEM OUT!
BACK ISSUES OF MICRO C
Only $1.50 each when you order 6 or more
All Foreign $2.00 each for 6 or more
(includes surface postage)

ISSUE NO. 14 (10183)
BBII Installation
The Perfect Terminal
Interface To Electronic Typewriter
BBI Video Size
Video Jitter Fix
Slicer Column Begins
Kaypro Color Graphics Review
48 pages

ISSUE NO.1 (8/81)
Power Supply
RAM Protection
Video Wiggle
1/2PFM, PRN
16 pages
ISSUE NO.2 (10/81)
Parallel Print Driver
Drive Motor Control
Shugart Jumpers
Program Storage Above PFM
1I2PFM, PRN
16 pages
ISSUE NO.3 (12/81)
4MHzMods
Configuring Modem 7
Safer Formatter
Reverse Video Cursor
FORTHwords Begins
16 pages
ISSUE NO.4 (2/82)
Keyboard Translation
More 4MHz Mods
Modems, Lync, and SIOs
Undoing CP/M ERASE
Keyboard Encoder
20 pages
ISSUE NO.5 (4182)
Word Processing
Two Great Spells
Two Text Editors
Double Density Review
Scribble, A Formatter
20 pages
ISSUE NO.6 (6/82)
BBI EPROM Programmer
Customize Your Chars
Double Density Update
Self·Loading ROM
Terminal In FORTH
24 pages
ISSUE NO.7 (8/82)
6 Reviews Of C
Adding 6K of RAM
Viewing 50 Hz
On Your Own Begins
24 pages

ISSUE NO.8 (10/82)
Drive Maintenance
Interfacing Drives
Installing A New BIOS
Flippy Floppies
C'ing Clearly Begins
Xerox 820 Begins
28 pages

ISSUE NO. 15 (12/83)
Screen Dump Listing
Fixing Serial Ports
Playing Adventure
SBASIC Columns Begins
Upgrading Kaypro II To 4
Upgrading Kaypro 4 To 8
48 pages

ISSUE NO.9 (12/82)
BBII EPROM Program
Relocating Your CP/M
Serial Print Driver
Big Board I Fixes
Bringing Up WordStar
Cheap RAM Disk
32 pages

ISSUE NO. 16 (12/84)
Xerox 820 Column Restarts
BBI Double Density
BBII 5"/8" Interface Fix
Kaypro ZCPR Patch
Adding Joystick To Color Graphics
Recovering Text From Memory
52 pages

ISSUE NO. 10 (2/83)
Saving A Flakey Disk
Hooking Wini To BBII
The Disk Inspector
JRTFix
Serial Keyboard Interface
Pascal Procedures Begins
36 pages
ISSUE NO.ll (4183)
BBI Expansions
BBII Details
Dyna, RAM Disk Review
Easier Reverse Video Cursor
PlannerCalc Review
Kaypro Column Begins
36 pages
ISSUE NO. 12 (6/83)
256K ForBBI
Bringing Up BBII
dBASE II
Look At WordStar
Double Sided Drives For BBI
Packet Radio
5MHz For Kaypro
40 pages
ISSUE NO. 13 (8/83)
CP/M Disk Directory
More 256K For BBI
Mini Front Panel
Cheap Fast Modem
Nevada COBOL Review
BBI Printer Interface
Kaypro Reverse Video Mod
44 pages

ISSUE NO. 17 (4184)
Voice Synthesizer
820 RAM Disk
Kaypro Morse Code Interface
680()()'Based System Review
Inside CP/M 86
56 pages
ISSUE NO. 18 (6/84)
Kaypro EPROM Programmer
I/O Byte: A Primer
Kaypro Joystick
Serial To Parallel Interface
Business COBOL
60 pages
ISSUE NO. 19 (8/84)
Adding Winchester To BBII
6MHz On The BBI
Bulletin Boards
Track Buffering On Slicer
4MHz For The 82()'1
64 pages

ISSUE NO. 20 (10/84)
HSC 68000 Co-Processor
DynaDisk For The BBII
Serial Printer On BBI Sans SIO
Cheap & Dirty Talker For Kaypro
Extended 8" Single Density
72 pages
ISSUE NO. 21 (12/84)
Analog To Digital Interface
Installing Turbo Pascal
Low Intensity BBI Video
Turbo Pascal, The Early Days
80 pages
ISSUE NO. 22 (2/85)
Xerox 82()'II To A Kaypro-8
Sound Generator For The STD Bus
Reviews Of 256K RAM Expansion
In The Public Domain Begins
88 pages
ISSUE NO. 23 (4185)
Automatic Disk Relogging
Interrupt Driven Serial Printer
Low Cost EPROM Eraser
Smart Video Controller
Review: MicroSphere RAM Disk
Future Tense Begins
88 pages
ISSUE NO. 24 (6/85)
C'ing Into Turbo Pascal
8" Drives On The Kaypro
48 Lines On A BBI
68000 Vs. 80X86
Soldering: The First Steps
88 pages
ISSUE NO. 25 (8/85)
Why I Wrote A Debugger
The 32·Bit Super Chips
Programming The 32032
Modulall
RS-232C: The Interface
104 pages
ISSUE NO. 26 (10/85)
Inside ZCPR3
Two Megabytes On DSI-32
SOGIV
The Future Of Computing
MS-DOS In The Public Domain
Graphics In Turbo Pascal
104 pages

BACK ISUES
u.s. Regular Price ......................... $3.00 each
6 or more 1/2 price .......................... $1.50 each
Regular Foreign Price (air mail) .............. $5.00 each
6 or more (including Canada) ................ $2.00 each
Surface Postage Included

P.O. Box 223 • Bend, Oregon 97709

•

Order Number 9-5 PST (503) 382-5060 • Technical Information 9-Noon PST Only (503) 382-8048

==

Introducing

GRAF 3.0
CP/M-80

the complete BUSINESS and SCIENTIFIC printer graphics program

MS-DOS / PC-DOS
SQUARE WAVE APPRO X IMATIoN

SALES by DIVISION

I.~~--------------------------------~----------'

y

o

10

~

t:8J)

Dlvls10n A

OJ

Div1.ion 8

Ii:)

-1.~'4-~~~~~~~~~~~~~~~~-r~~~~~
4.7124
b.2832
l.14tb
1.5708
0.0000

D,v,.,on C

BUSINESS APPLlCA TIONS

SCIENTIFIC APPLlC ATIONS

* display floating point data directly from spreadsheets,

* simple interface allows plotting floating-point data

data bases, and word processors (or the keyboard) in a
wide variety of bar, pie, line, and scatter plots

obtained from all popular programming languages

*

* plot and group up to 6 different variables on a single
graph, distinguished by up to 14 different "fill-in"
patterns and 8 different point-plotting symbols

*

menu driven operation supporting automatic graph
scaling, labeling, and legend creation

*

program default values may be set once and for all

plot any number of curves (e.g. experimental data vs.
theoretical values) on the same graph, choosing from
8 different plotting symbols.

* automatically created legends distinquish variables

*

add up to 5 different-density grid lines, and choose
from a wide variety of numerical labeling options

*

high/low graphs are supported directly
S.mple Htqh/Lc.. GrAph

~ 500.00

~

t 400.00
y

lOO.OO

:ZOO. 00

100.00

0.00

:ZOO. 00

400.00

1000.00

800.00

tlme

..

1000.00
(s.cond~)

Theo,..ti c .. l

TERMS: We ship via first class mail. The above prices include $5.00 for s/h. (Orders outside USA require additional $5.00
for postage. NY residents add 7V2.",tax.) When ordering you MUST state your computer and printer make and model. We
support MS-DOS (PC-DOS) version 2.0 or later on computers with at least 192k R AM, and C P/M-80 version 2.2 or later on
Z80 computers (other than Apple) supporting a TPA of at least 54k (requires 64k of RAM). Most soft-sector disk formats
are available. (If you can read several formats, please send us a list.) G R AF 3.0 works with any printer fully compatible
with one of the following: Epson FX, RX, LX, MX (with GRAFTRAX), or LQ-1500; C. Itoh Pro writer; NEC 8023A, Star
Mlcronics Gemini lOX, 15X, SG-10, SG-15, IBM Graphics Printer, Okidata 192, and earlier Okidata models equipped with the
'1BM Plug 'n' Play" chips. (If you have an Okidata printer, other than the 192, the Plug 'n' Play chips are reguired!)
GRAF 2.0 Update Polley:

Returning your original GRAF 2.0 disk to MSC entitles you to $20.00 off the above prices.

MSC
27 Forest Avenue

92

Microcomputer
Systems
Consultants

Port Jefferson Station

New York

11776-1820

Micro Cornucopia, Number 27, December-January 1986

CULTURE
C

o

AllElllll!

R

N

DDT, SID and
ZSID USERS!

E

Why are you wasting your time
with outdated debugging tools
when you could be using DSD80
by Soft Advances?
DSD80 is unmatched in the
CP/M-80 world and even makes
most 16 bit PC programmers
green with envy.
I Full Screen Display I
DDT Command Compatibility I
I Software In-Circuit Emulator I
I Superior Symbol Support I
I Intel and Zilog Mnemonics I
I 8080 and Z80 Support I
I Single Step Subroutines I
I ASCII and Binary String Searching I
I Port Input and Output I
I View Disk Files I
I Uses only 16k of TPA I
I Stack Display I
I Highlighted Memory Display I
I Dual Monitor Support I
I User Writeable Display I
130 Day Money Back Guarantee I
I

You can experience the power
of DSD80 for only $125. Our
money back guarantee will
protect you from overloads.

Soft Advances
P.O. Box 49473
Austin, Texas 78765
512·478·4763
Programming for Productivity and Proflf
Please Include $4 for shipping. DSD IS a
trademark of Soft Advances CP M. SID &
ZSID are trademarks of Digital Research
Dealer Inquires Invited Ask us about
DSD86 for the IBM PC

A Programmer's Christntas
F

Gaily

1~~1j J, ~) I1
~....i- )
~

J

j\

On the twelfth day of Christ - mas my

~F•••••

I:p p

true love gave to me

C7

)1 J'

P JI

:11

headaches
Twelve
splitting
Chapter
eleven
filing
Ten
pigeons
bombing
Nine
programs crashing
Eight
RAMs aflaking
SevenUp
For Drinking

~

F...•.

II: p

Six

p

)1 J\
BASICs

CT

Bdim

F

P JI

:111

f' jt~

II

Five useless

plodding

GmP
;,
JI
J
I
I~q 0F J

ROMs

F

Four

C7

Tandon drives Three bad

I~v t a J Jl J) J

I.

;;1

F

PI F

Two folded disks And a bug

J II
bits

Bb

C2!
in a

C7

Flo

Jl

J'

binary

j

F

IJ
tree

Fin#.

II

Ian aDS
The following folks are reaching you for only 20 cents
per word. If you would like to reach the same audience,
send your words and 20 cents for each to Micro
Cornucopia.

Slicer Board For Sale. 8MHz Slicer system board. Includes
MS-DOS operating system, BIOS/monitor disk, Slicer
manual, disk drive cable, and two header to DB-25 cables
for serial I/O. Works perfectly, need mM compatible. $500
or best offer. Jim (505) 299-1255 (NM). 27DA

Disk Drive Sales &: Service. For Sale - Shugart SA 800-2,
$79; SA SSO, $129; SA 85O/SS1R,$139; MPI 52S 5.25"
DSDD, $55; New TEC FB 501 5.25" SSDD, $59; Case w/
power supply for two half-hgt. drives, $59. SERVICE SA BOO/SOl, $25; SA 850/851, $35; 5.25" SS, $30; 5.25"
DS, $40; 8" SS, $40; 8" DS, $50. All drives and service
gruaranteed for 60 days. Prices do not include parts or
shipping. LDL ELECTRONICS, 13392 158th St. N., Jupiter, FL 33458 (305) 747-7384. 28LY

Keyboards for computer builders - 83 keys, full ASCII;
upperllower case, all control characters, numeric pad,
caps-lock, repeat, self-test! Brand new, hundreds sold
already to builders of Apples, Big Boards, Xerox 820s.
Parallel output, positive TTL logic, strobe. Uses only
l06mA of +5 volts. Custom case available. 90 day
warranty unmodified. Keyboard $35. Documentation (21
pgs.)/cable package $5. Spare custom CPU/ROM $4. UPS
included. Call/SASE for detailed spec sheet. Electrovalue
Industrial Inc., Box 376-MC, Morris Plains, NJ 07950. (201)
267-1117.

All types of PROMs, EPROMs and PALs programmed.
Very reasonable rates. Send $1.00 (refundable with purchase) for price list and instructions. Programming, 10663
Maple St., Cypress, CA 90630. 27V0
Hardware for the Kaypro Computer voice synthesizer
unlimited speech $70. EPROM programmers 2516, 2716,
2532, 2732, 2764 $110. General purpose power supply
used with EPROM programmers, $30. All hardware comes
in kit or bareboard form with software and schematics.
Call or write Busch Computer, 395 Totoket Rd., Northford, cr 06472, (203) 484-0320. 29BU
IS" Green Monitors. New separated sync 15.7KHz for
Xerox or 18.6KHz for mM, $30. Cases extra. Also, new
green CRTs 12", $15; IS", $20. 8" disk drives cheap!! Call
evenings R. Breinlinger, Hampstead, NH (603) 329-5838.
27BR
For Sale - Billings Computer system, 4MHz, 641(, 2
DSDD 8" disk drives, Oasis O/S, COBOL, FORTRAN,
BASIC, $650. TI 810 printer,. $550. BBII bare board with
extra parts, $120. Two FDD-100-8 disk drives, $95 each or
both for $175. Will pay shipping on all above items.
Duane Uhlenkott, 866 Olympic, Medford, OR 97504, (503)
773-5403. 27UH
For Sale: CompuPro CPU-Z 6MHz, $125. Disk 1A and
CP/M-SO, $475. 641( static RAM, $97. ALL equipment is in
new condition. James Walker, 1205 N. Main, O'Fallon,
MO 63366. 27WA
Public Domain UG Software Rental: CP/M UG Vol 1-92
on 46 8' flippies, $45, SIG/M UG Vol 1-216 on 108 8'
flippies, $125. PICONET Vol 1-34 on 17 8' flippies, $25,
Pascal-Z UG Vol 1-25 13 8' flippies, $25, KUG (Charlottesville) 39 disks, $25, mM-PC SIG 1-300 PC-DOS, $325, PCBlue 1-110 MS-DOS, $125, directory disks $5 PP. Also
available on 209 5.25' formats. Rental is for 7 days after
receipt with 3 more days grace for return. Credit cards
accepted (preferred). Downloading-disk format conversions. Call. User Group Software Automatic Update
Service, $7.50 per 2 volume set PP. 619-727-1015 24 hrs.
619-941-0925 info. 9-5. National Public Domain Software
Center, 1533 Avohill, Vista, CA 92083.
TBKUG/Data COM Network supports CP/M-SO, CP/M86, Kaypro, S-l00, mM, and compatible users with public
domain software via modem. We have three on-line
databases holding over 40mby of CP/M and PC/MS-DOS
programs available 24 hours at either 300 or 1200 baud.
We specialize in CP/M disk utilities, ZCPR2 &: 3, MEX,
DOS utilities, Turbo Pascal, word processing, RCP/M
utilities, BBS software, library utilities, catalog utilities,
and much more. The Florida systems will soon be
merging into one large multi-user system with many
incoming lines. The TBKUG has 63 specific user disk
volumes for Kaypro owners and over 5,000 files available
by mail. We sponsor a monthly magazine that is distributed electronically by various national bulletin boards called
the $R/O Read Only. It has many product reviews, public
domain update information, Turbo Pascal column, and
others of interest to CP/M and DOS users. The TBKUG
has been in existence for over two years and has more
than 600 members worldwide. We have been mentioned
in numerous Profiles' articles and proudly support the
CP/M users of the world with high quality software. An
application may be downloaded via modem by calling
(813) 937-3608, or send a SASE to: TBKUG/DataCOM
Network, 14 Cypress Drive, Palm Harbor, FL 33563.
Annual dues are $30.00.

94

At last!

20 Meg. CP/M hard disk computer TeleVideo 802H-20 for
sale. CP/M 2.2, plus hardware specific backup, function
key &: keyboard buffer, programs. Other software including WordStar 3.3. Reduced to $1500. J.G. Eckmann, 16463
S.W. Boones Ferry Rd., Lake Oswego, OR 97034, (503)
636-8155 M-TH 9-4. 27EC
Mitsubishi M48S3 5.25" half-height floppy drive. Double-sided quad denSity, 96tpi, $79 each. Seagate ST225 25
megabyte hard disk. New. $475. Limited quantities. B.W.
Systems, P.O. Box 9791, Austin, TX 78766, (512) 255-8350.
27BA
Big Board II, keyboard, monitor, printer, software, 5
floppy drives, extras, $600. (503) 640-5367. 28MU

• ••

Fast, On-screen

FLOWCHARTS
And Organization Charts

Finally! An on-screen flowchart processor that knows about flowcharts and
organization charts - not just another
"screen draw" program that makes you
do most of the work.
Interactive EasyFlow is a powerful

full-screen graphics program dedicated
to flowcharts and organization charts.
This program allows you to easily
compose charts on the screen.
Features: eText is automatically centered, character by character, within
shapes as you type it. e Lines are created by specifying the starting and
ending points - the program automatically generates the route. e Powerful editing facilities allow shapes and
even entire rows and columns of
shapes to be inserted or deleted; lines

are automatically re-routed as necessary. eLarge chart size (up to 16
shapes wide by 16 shapes high) allows very large flowcharts and organization charts to be handled with ease.
e Charts can be larger than the screen
- the window into the chart scrolls both
horizontally and vertically as necessary .• Flexible printer interface allows
it to work with all printers, not just dot
matrix printers. Wide charts can be
printed in strips. e Eighteen standard
flowcharting shapes included .• User
defined shapes can easily be added.
• The manual is extensive and includes many examples .• On-line
"help" facility provides immediate
assistance at any time .• Any number
of titles can be placed on a chart.
• Commentary text blocks can be
placed anywhere in the chart .• Plus

STATUS BAR (not to be confused with a
wet bar) tells you what Interactive EasyFlow is doing at all times.

many more features than we can men
tion here.
Requires an MSDOS I PC DOS machine equipped with an IBM compatible graphics adapter and at least
256K of memory. Runs under DOS 1;
contains full support for DOS 2.
Only $149.95 + $2.00 S&H (USA!
Canada), $10.00 (foreign).
Payment by check, M.O., VISA, COD
or Company PO.
The sample screen display shown below is typical of what you see while
editing a chart. Other screen displays
are provided for entering titles, changing options, getting "help" and so on.

CHART WINDOW gives an overview of
your chart; this example shows the "normal"
view. "Close-up" view shows a smaller part
of the chart in more detail. "Wide-angle"
view shows a larger part of the chart at re-

-:-~~~:-::--------~-----------------

TEXT/MESSAGE WINDOW used to enter
user text and to display messages from
Interactive EasyFlow.

CURRENT SHAPE WINDOW - shows the
content of the current flowchart shape in
complete detail.

HavenTree Software Limited
P.o. Box 1093-1
Thousand Island Park, NY
(613) 542-7270 Ext 4

13692

SHAPE CURSOR shows where you are in
the chart. Cursor keys move it around;
chart window scrolls if you run oil the edge
of the window.

Micro Cornucopia, Number 27, December-January 1986

Tidbits

'~~~~~.~
. -. ~\\~

-B-y-G-ary---E-n-t-s-m-i-n-g-er---......~:;;;;;.Vedit Plus For MS-DOS & CP/M
CompuView has released two new
Vedits - one for CP/M computers and
one for PC compatibles. They're bigger
(24K and 31K, respectively), a little
flashier (although Vedit's never been
known for flash), and just as easy to
use. They're appropriately titled "Ve_
dit Plus."
The full screen editing mode in
Vedit Plus is identical to Vedit, plus
includes a lot more registers for storing text or files (0-9 and A-Z), multiple
file editing, a calculator for integer
arithmetic, operating system commands from within Plus (DIR, DELETE), an optional menu (on the CP/
M "Plus"), online help, a much improved installation program (on the
MS-DOS version), and an extensive
macro programming mode.
Several macros come ready to use on
the CP/M version - a menu, a file
comparison, and a mailing list sort and the Vedit Plus manual details how
you can write your own. (My MS-DOS
copy is a Beta Test version and doesn't
currently come with ready-to-run macros, but does support the full macro
programming mode.)
You can edit files of unlimited size
concurrently (very handy for reusing
some of the text in a file, editing book
chapters, or outlining).
I've been using Vedit (for a year)
and Vedit Plus (for 2 months) on a
Kaypro, a PC (personal clone), and an
AT. I like it. It's a fast, dependable
editor with thorough manuals. Costs
$225.
For more info:
CompuView
1955 Pauline Blvd.
Ann Arbor MI 48103
Exploring Pascal By Disk, By Book
If you're just starting to learn Pascal
or if you want to dig deeper, a book
on disk, "Fast Track To Pascal," and a
book, "Complete Turbo Pascal," will
be helpful.
"Fast Track To Pascal" requires MSDOS and has the advantage of onscreen graphics (but doesn't take full
advantage of them). You can page
backward and forward, jump to any
subject area (procedures, arrays,

records, graphics, etc.), run demonstration programs, and take quizzes.
But be careful, you can't abort a quiz
once you start it.
I found the prose a little stiff but
tolerable (lighten up, you sound like a
committee of educators!), but the
idea's good, and you'll learn a lot by
playing with the demonstration programs.
"Complete Turbo Pascal," on the
other hand, is just a book, but a very
good one, aimed specifically at teaching Pascal via a useful, available compiler - Borland's Turbo Pascal.
Author Jeff Duntemann (technical
editor at PC Tech Journal) argues that
standards are fine, but in this case,
Standard Pascal can't do anything.
"That includes frills like graphics
along with nonfrills like disk 110. The
people who developed the ISO Standard definition for Pascal weighed
language utility against portability and
decided that portability was more important. I disagree strongly; the purpose of a computer is to get a job
done, whatever it takes."
Examples are written for MS-DOS
and CP/M, so no one gets slighted.
The prose isn't light here either programmers are such serious types but it's clear and informative.
If you're learning Pascal with Turbo,
it's a good tutorial, and for $10 extra
you can get the example programs on
disk.
If you've already gotten your feet
wet, "The Complete Turbo Pascal"
makes a good reference.
$19.95 buys the book from your local
bookstore.
$10.00 buys the program disk from
Jeff Duntemann
805 Seaword Road
Towson MD 21204
For more info about "Fast Track To
Pascal" (costs $39.95) contact Congenial Software
203 W. 16th St.
Lumberton NC
919-739-3733
DSI-32 Comer
Lots happening at Definicon (makers

Micro Cornucopia, Number 27, December-January 1986

Future Tense Editor

of the DSI-32 32032 plug-in board for
the PC) this month.
Trevor Marshall, DSI-32 hardware
designer, says they intend to release a
Virtual Memory Unit and Unix System
5 by early December.
The Virtual Memory Unit will handle
16 megabytes. It requires some added
hardware (a Memory Management
Unit and possibly an Interrupt Control
Unit) and new software (a systems
upgrade). The additional memory will
especially benefit FORTRAN programmers using the Green Hills compiler.
Green Hills FORTRAN currently requires 2 megabytes of memory because
the compiler optimizes more highly
than the Green Hills Pascal and C
compilers and uses huge modules.
Green Hills is working on a version of
FORTRAN which will require less
memory (both the Pascal and C compilers will run in 1 megabyte and in a
limited way in 256K).
Unix System 5 will also require a
hardware and software upgrade - an
MMU, Interrupt Control Unit, and
systems software. No price has been
set yet for Unix System 5 or the
Virtual Memory Unit.
Also, Definicon has upgraded their
symbolic debugger - now it disassembles global symbols. Costs $95.
Miscellaneous DSI Users Notes There's a free hardware fix for boards
with serial numbers below 20. Stops
the CPU from overheating. And (also
free) a new loader with full MS-DOS
parse and subdirectory capability.
For more info contact Definicon Systems, Inc.
21042 Vintage St.
Chatsworth CA 91311
818-341-5654
Inside The PC
If you already know more than a
little about computers, and you want
to read one book about the inner
workings of the PC, then "The IBM
Personal Computer From The Inside
Out" by Sargent and Shoemaker is
the one. I began reading it two weeks
ago and still haven't finished; it's
packed with information.
(continued next page)

95

TIDBITS _________________________________________________________________
(continued from page 95)

Starting from an overview/history of
the PC, it covers beginning and advanced assembly language programming, digital circuitry - and such
necessary subjects as handling 110
ports, a real-time clock interrupt
scheme, data synchronization techniques, keyboard 110, video display,
controlling devices, monitoring devices, data communications, and building your own interfaces.
A useful example from one of the
first chapters is a model layout for a
simple assembly language program,
setting up the segment registers, for
the IBM Macro Assembler. See Figure

1.
To use this model for your own
programs, replace the three lines of
code beginning with "MOV
DX,OFFSET MSG" with your own
program, and replace the "MSGDB"
with the variables and data you need.
"Inside Out" contains many good
programming examples and numerous
detailed drawings and explanations of
PC hardware. In short, if you want to
learn a lot about the PC, buy it (and
read it patiently).
Have your bookstore order it from
Addison-Wesley Publishing. It's
$16.95.
TASM
If you're just starting to learn assembly language programming on the PC,
purchasing EDITASM, a macro assembler from Speedware, will make learning a lot easier (I wouldn't want to
learn without it).
EDITASM (or TASM) has a built-in
editor (which is not easy to distinguish
from Turbo Pascal's), and signs on
with a similar-looking menu of options
(shown in Figure 2).
From the options menu you can
choose whether to display the assembly to screen or printer, assemble to
memory, wait if error, create a .OBJ or
.COM file, and more.
The wait if error option is great for
initial debugging. The assembler stops
at the error, and after you key in an
"escape," it places you in the editor at
your mistake. Sounds like Turbo,
doesn't it?
TASM purports to be MASM-compatible. I can't yet verify the claim, but

96

I've assembled short programs quickly
and successfully (it's fun and speedy!).
Bruce found one bug - TASM wasn't
handling NESTED IF THEN ELSE
STATEMENTS correctly - which
Speedware promptly fixed. Uriah Barnett, vice president at Speedware, says
they fix bugs as soon as they're reported. (Hooray for fixed bugs - keeps
them from littering your system with
buglets.)
TASM is an amazing product, essential for introductory programming, and
assuming MASM compatibility, a major step forward for professionals. The
built-in editor for interaction is the
only way to fly.
TASM without .OBJ capability
(won't let you assemble to .EXE files)
costs $49.95. Full macro assembler
costs $99.95.

For more info contact Speedware
118 Buck Circle
Folsom CA 95630
916-988-7426
Modula 2/86
Logitech's Modula 2 is out in an
updated version (1.1) and remains
microcomputer Modula state-of-the-art
despite rumors of a Borland Modula.
Modula 2/86 is complete (albeit expensive and large) and easy to use. It
features a native code compiler, an
extensive library of standard modules,
support for the 8087, support for
REAL emulation, support for 1 megabyte of address space, access to underlying hardware and DOS functions,
support for overlays, and a symbolic
debugger.

Figure 7 - Minimal Assembly Program
DSEG

HSG
DSEG

SEGHEHT
DB 'hello world.'
ERDS

SSEG

SEGHEHT STACI:
DW
80 DUP (?)

SSEG

ENDS

CSEG

SEGHEHT
ASSUME CS:CSEG,DS:DSEG

FAR

SUB

PUSH
HOV

AI, AI
AI
AX, DSEG

HOV
HOV

DX,OFFSBT MSG

;here's the main progr811 bodf

21H

;it's only 3 lines

DS

AH,Og

;push start address of program
;prefix segment on the stack
; then point DS AT DATA SEGHEHT

ja far return gets back to DOS

RET

CSEG

;DOS will automatically set up
;a stack in the stack segment

PROC
PUSH

nrr

MAIN

;usua1ly all variables go in the
;data segment

ERDP
ERDS
END

( (end listing»
Figure 2 - Menu of Options

Assft Source

Edit Source

Get Source Write Source

Run Codefile

Bemump File fill File

List File

S)'JIbol List

!refer List

Directory

Hev Drive -- Dir

Ass Options

Value

QUit

Figure from Last Page - CONF/G.SYS COMMANDS

BBEAI:
BUFFERS
COUNTRY
DEVICE
FCBS
Fn.ES

LASTDRIVE

;allows fOU to set BBEAI::OH or OFF
;a1lows you to set I of buffers
;lets you set country for date/time format
jlets you install device drivers
ilets you set I file control blocks that can be
open concurrently
;lets you specify the max I of files that can be
open concurrently
;sets the maximum number of drives you can access

Micro Cornucopia, Number 27, December-January 1986

BACK UP YOUR BIG BOX

It requires PC compatibility with at
least 256K RAM, 2 drives, and MSDOS or CP/M 86 (sorry, CP/M 80
guys, you'll still have to wait for
Borland).
Unlike Turbo Pascal, Modula 2/86
doesn't have a built-in editor, so editing, compiling, linking, and executing
require separate steps. And Modula 2/
86 doesn't automatically generate a
.COM file. You need to execute your
creation with a program called 1m2"
or use LOD2EXE, a utility which pIOduces a sunple .EXE file, that comes
with version 1.1.
If you need the flexibility of Modula
2 and need to write large Pascal-like
programs, Logitech's Modula 2/86 is
the compiler of choice. It's dependable, standard, and the manual and
support (at Logitech) are excellent.
But if you're writing smaller programs and have been spoiled by Turbo's built-in editor and non-standard
functions, you might want to stay with
Pascal a little longer. It's cheaper and
easier to use. Modula 2/86 costs a
whopping $495.

For more info contact Logitech
805 Veterans Blvd.
Redwood City CA 94063
FORTH Interest Group
FIG has moved, but you can reach
them atP.O. Box 8231
San Jose CA 95155
ICO And LAT Users' Group
If you're using Southern Pacific's
single board computer (not the railroad), you might want to contact a
usets' group that's just organizing ICO-LAT-UG
C/O Andrew P. Porter
774 Joyce Street
Livermore CA 94550
415-443-4041

CP/M 2.2 COMPUTER A&T Computer •.••.••.• $450
Z·80, 765 FOC, 256K RAM (192K RAM DISK), centronics
parallel, (2) RS·232, 51,4 SSDD drive, DR's CP/M 2.2 in ROM,
120VAC supply 3~ x 7 x 13 in.
Substitute DSDD Drive in above .••..•..••.•• $525
NEW COMPANION II A&T Computer •...•..•.• $750
64180 (2.. 80 superchip), 765 superchip, 256K RAM,
centronics parallel, (2) RS·232, 51,4 DSDD drive, as designed
by Steve Ciarcia (Sept BYTE) with BIOS.
CIARCIA'S SBC-1SO board only A&T ••.•.•.... $370
SBC-1SO A&T with BIOS. • • • . . . . . . . . . . . . . . .. $500
METAL CABINETS with 120VAC supply, mounting space for
drive, SBC·180 and modem.
PORTABLE BOX for 3~ drive ..••.••.••....•• $140
12V 1.5A, 5V 1.5A, ·12V .lA, 3 x 5 x 8 in.
COMPANION BOX for 51,4 drive. • . • . . • • • • • . . .. $120
12V 1.8A, 5V 2.5A, ·12V .lA, 3~ x 6 x 10 in.
WIDE BOX for (4) 51,4 drives .....•.• , . •. •• . •• $160
12 V 3.6A, 5V 5A, ·12V .lA, 9 x 6 x 10 in.
TALL BOX for (2) 8, (2) 51,4, (2) 3~ drives
no supply ...•....•...•.•.....•........ $160

INTERCONNECT WITH A.NETTO' HARDWARE
RS·232 based *.node T. , features channels for easy
application. Uses existing serial read/write capabilities.
Enhance with communications programs.
A.NET EVALUATION KIT •..••..•......•....• $150
minimum A.NET purchase includes (3) *.nodes, 120VAC
supply and tele·modular cables. Mix or Match.
A.NODE DB·25 male ••....•..•••••.•..••.... $50
PC.NODE DB·25 female .•..•..••.....•...•.. $50
Mac.NODE DB·9 male . • • . . • • . • . • . . . . . • . . • . .. $50

~
COMPANION COMPUTER

And That's Tidbits!

192 Deerfield Rd. Apex, NC 27502
Call: 919·362·6655

• ••

ZENEr NETWORK though twist pair,'

MSC~

• .:~

--gpl

i

• 6Mhz HD64B180 (l80 upward compatible 1)512K
• Seria/;RS23?CX 2 and TTL X 1
byte on board (256K installed, 384K RAM DISK) ,
• Pararell: centronics type, 16 bit TTL, 718
• LAN:lENETport 800K baud CSMA CD tWist pair bus ,bit keyboard port (32 characters FIFO)
type upto 500 meters
,,'
" : i , : ; " '.0.5.: Turbo Dos, MPIM (multiuser)
• Floppy: 3.5,5 and 8 inch, piS density, pis sided and
banked CPIM plus (single user)
dis track automatic desitylformatchecking"
,
• Size: 10 X 6 inch 4 layered
• Hard disk: SCSI interface on board": '
• Assembled and tested
• Video c'80X ?4 characters (color) and 640 X 200, ,. BIOS source code available
pixies colorgraphic)28K byte video RAM character' ..'. Complete faster than other l80SBC
set is dowloadedfrom disk
.
':"MSC==::...·-=--PC-=-X=:-_~--:-:-=:-__--:';'-;-;;. Timer: battery back up calendar
.. 8088 expansion card for LAn soon available

~

i

woRLD SMALLisr;(CoMPUTER

• Full personal CPIMsysterrr. ;n,pa/m1ijlh~Z80 256K,' • 0.5.: CPIM plus baf]~
RAM (128K RAM DISK)
.i} ( / , ;
• BIOS source code available
• Serial: RS232C X 2 aut?matrqbaudrate checking
• Complete faster than ()ther l80S8C
• Pararell: centronicstype'pdnter port
"< "'.
• Floppy: 3.5 inch micro floppy disk drive 800K byte
t MSC.MTClP' \ ,d;
(option 5, 3.5 i()c;/ldrive dis sided dis track. automatiC
: Full assembled pcb of MTC
density checking)
..•.....•..•..••..... ; . . • ,' ' . . ,.Under$189 in OEM quantity

MSC-

G>

Full
futured CPhf{;plust;wstem
• l80 4mhz 128K Byte RAM.. .: floppy: 3.5, Sand
• BIOS source code available

8 inch dis density, ,d/s sit;f.ed fJnd/dls.tr4~k upto 4 disk
drives Autorp~ticpensitY1 then d:=c.1E-11 else d:=1E-11;
{ This sets our error tolerance. If c > 1, d = c.1e-11
instead of d = 1e-11 because if c is large enough, then
Turbo Pascal can not calculate an accuracy close enough
to 1e-11 to stop our loop below. For example, if we want
the cbrt(1e21), Turbo Pascal will yield 10000000.000
(11 digit accuracy) which, when plugged back into our
function, cannot yield an accuracy approaching 1e-11. }
a:=0.5·(b+sqrt(b»;
repeat
b:=f(a,c) ;
a:=a-b/df(a) ;
until abs(b)>> P.O. Box 21294, Columbus. OH 43221-0294
Call (301) 552-9590 for new number

««(--- NEW

Micro Cornucopia, Number 27, December-January 1986

8" CP/M 80 Disks from Micro Cornucopia
USERS DISK 12
l-Two single disk drive copy programs, both with
source
2-Crowe Z80 Assembler source
3-New Crowe.COM file, debugged version
4-New CBIOS with parallel print driver & other
extensions for CP/M 1.4 & 2.2
5·Disk mapper with source
USERS DISK 13
l-EPROM burning software for BB 1
2-Reset bit 7 (unWordStar a file)
3·Disk file CRC checker
4-New fast copy program & source
5-DU77, disk inspector/editor
6-FINDBAD, isolates bad disk sectors
7-Print fancy page headings
USERS DISK 14
1-CBIOS, custom bios for Tandon drives
2-ZCPR, dynamite CCP checks drive A for missing
.COM files; improved commands
3-ZCPRBLOC, identifies CCP location
USERS DISK 15
l-CAT, disk cataloging routines
2-Modem 7 for Port A
3-Modem 7 for Port B
4-PACMAN, the arcade game
5-FAST, buffers the disk to speed up assemblies
6-NOLOCK, removes BB 1 shift lock
7-VERIFY, cleanup & verify a flaky disk
8-DUMPX, enhanced for BB 1
9-UNLOAD, create .HEX file from .COM file
USERS DISK 16
l-REZ, 8080/Z80 disassembler, TDL mnemonics
2-PRINTPRN, prints Crowe listings
3-RUNPAC, run·time utility package for 8080 assem·
bly language programs. Has 51 functions. Includes
source which assembles under ASM
USERS DISK 17
l-CHNGPFM, PFM monitor mods
2-TERM, terminal routines let you set up BB as simple
terminal, as a file receiver, or as a file sender
3-Checkbook balancing package
4-Disk Utilities· copy to memory, from memory, and
dump
USERS DISK 18
l-BDSCIO, custom BDSC I/O for BB 1 (both .h and .c)
2-YAM, Yet Another Modem program in source &
COM form. Turns BB into paging intelligent terminal,
complete with printer interface, baud rates to 9600
3-ROFF, text formatter
4-SIGNS, prints large block letters
USERS DISK 19
l-ADVENTURE, expanded 550 pt version
2-Keyboard translation program
3-CBIOS, serial & parallel printer interface
4-EPROM programmimg package for BB II, for 2732s
only
USERS DISK 110 • Lots of Disk Utilities
l-REBOOT, sets up the CP/M auto load
2-SWEEP, directory/file transfer routine
3-A, Lets BB I recognize a double sided drive as one
drive with 494K of usable space
4-FIX, super disk utility, does everything, much easier
to use than DU77
5-Compare files routine
6-UNERA, retrieve erased files
7-FIND, check all drives on system for a file
8-MENU, menu program for CP/M
9-NEWCAT, enhanced disk catalog program
10·Single drive copy program that does track by track
copies rather than file by file

USERS DISK Ill· Printer Utilities
l-Microline 92 printer routine
2-Graphics display package for MX-80 with Graftrax,
very fancy
3-Epson MX80 setup for BB I with 59.5K CP/M
USERS DISK 112 • Games for BB I
l-ALIENS, a fast, exciting arcade game
2-ZCHESS, chess with a 1-6 level look ahead
3-MASTERMIND, match wits with the computer
4-BIO, Biorhythm charts complete with graphics on
the BB I
5-LIFE, so fast it's real animation I
6-CRAPS, see how much you'd lose in Vegas
7-WUMPUS, a caver's delight, kill the Wumpus or be
killed
8-PRESSUP, similar to Othello
9-Games, 7 games in one program, includes blackjack,
maze and animal
USERS DISK 113
1-ZZS0URCE, disassembles to real Zilog mnemonics
2-EX14, superset of submit or supersub
3-MOVPATCH, lets you use MOVECPM on other
copies of CP/M
4-XMON, 3K expanded BB I monitor, use in ROM or
as overlay
5-CURSOR, prompts you for cursor char you want
6-UMPIRE, very fancy RAM test
7-ZSIDFIX, display improvement for ZSID
8-PIPPAT, modify PIP so you can reset system from
within PIP
9-@, Lets you use the BB as a calculator, including
HEX
10-S0RT, sort package written in C80
USERS DISK 114 • BB II Software
1-PR032,latest 2732 reader & programmer
2-SMODEM2, lets BB II talk to Hayes smartmodem
3-GRAFDEMO, demonstrates BB II graphics (in
BASIC)
4-ATTRTEST, demonstrates BB II graphics (in JRT
Pascal)
5-INITSIO, initializes port B for 300 or 1200 baud
6-MENU, displays menu of .COM files, enter number
to run file
7-SETCLK, sets realtime clock built into BB II
8-PRINT2, modified print which accesses BB II clock
9-BOX, draws a thin line box on screen
10-ALIENS, space invaders arcade game
ll·LlSTSET, printer interface, aut<>-enables RTS, ig·
noresDCD
USERS DISK 115- Word Processing
l-EDIT, very fancy line editor similar to EX (Unix)
2-TED, simple minded line editor
3-TTYPE, typing training program written in BASIC
4-TINYPLAN, very simple-minded spreadsheet.
5-C80 Text Utilities
6-CHOP, cuts off file after N bytes
7-ENTAB, replace spaces with tabs where possible
8-MS, double or triple spaces a file to output
9-RTW, removes trailing spaces from file
10-TRUNC, truncates each line to specified length
ll·WRAP, wraps at column 80, plus pretty pretty
printing, page lis ...
USERS DISK 116- BB I Modem Software
1-RCPM27,list of U.S. bulletin boards
2-SMODEM, interfaces BB I with Hayes Smartmodem
3-PLlNK66, easy to use with non-CP/M host
4-BBPAT, menu selection of BAUD rate, bits/char,
parity, & stop bits
5-MODEM 7 +, Modem 7 plus BBPAT,lets you talk to
anything from port A

We Also Have 8" Disks For CP/M 86
Ask For Catalog

8"Users Disks ..... $12.00 each
USERS DISK 117- Small C Version 2
SMALLC2, this substantially expanded version of
Small C now includes for, goto, label, switch (case);
external declarations; new preprocessor commands;
expanded I/O includes redirection; initializers; plus 12
new expressions. The I/O and runtime libraries have
been greatly expanded (including printf). Source &
documentation on one disk.
USERS DISK 118- FORTH
IFORTH, this is Idaho FORTH which can be burned
into ROM or loaded from disk. It replaces the PFM
monitor & handles all the monitor functions.
USERS DISK 119- BB I Double Density
New BB I Monitor, BIOS, character ROM, Winchester
Interface, ZCPR, and formatter from Trevor Marshall.
See BB I expansion article in Issue Ill.
USERS DISK 120- Assemblers
CROWEASM: This is the Crowe assembler modified so
that it runs on any CP/M system (including the BB I,
BB II, Xerox... ). LASM: This assembler is similar to
the ASM that comes with CP/M except that it can link
files at assembly time. PRINTPRN: Print routine for
CROWEASM.PRN files. LIBRARY: Utilities which let
you combine many files into one, then you can run,
type, or extrace any file within the larger system.
USERS DISK 121 • Winchester Utilities
BACKUP: Helps you back up the winchester onto
multiple floppies. FLOPCOPY: Lets you make floppy
copies (with only one floppy drive). BIGBURST: Backs
up a very large winchester file onto multiple floppies.
MULTCOPY: Use this like PIP but it prompts you to
change disks. Accepts ambiguous file names. MDIR:
Displays files in all user areas on selected drive.
USERS DISK 122- Pascal Compiler
This is a real Pascal compiler. It supports only a subset
of the language (no records, pointers, booleans, reals or
complex) but it generates a real .COM file. Everything
is on this disk: the compiler, its source, example
programs and documentation.
USERS DISK 123 • Xerox Utilities
This disk contains Xerox specific utilities including a
screen drump from Wayne Suga (with source); modifi·
cations for the SWP package including ZCPR, a new
monitor, and a clock/calendar from Mitch Mlinar; and
Jim Mayhugh's new monitor (see issue 19). A very
special disk for Xeroxers.
USERS DISK 124 • Prowriter Graphics
This is a complete Prowriter printer graphics package
written by the same Micro C subscriber who wrote the
MX-80 graphics package. Plot points, lines, circles,
boxes, and more. Examples, documentation.
USERS DISK 125 • Z80 Macro Assembler
This is a real Z80 macro assembler I Syntax closely
follows RMAC and MAC. Also includes pseudo-ops to
support conditional assembly etc. No phase or relocata·
ble code.
USERS DISK 126 • BB II CP/M 3.0 Banked BIOS/
Winchester
Support CP/M 3.0 Banked BIOS implementation for
the BB I. Roy Epperson's software to support the
Adaptec ACB-4000 SCSI and the Rodime R204 5'
Winchester on the BB II (see issue 119). Plus more
Winchester programs.
USERS DISK 127 • BYE Remote CP/M System
BYE programs to run your BB I, BB II, OR XEROX
820-1 as a remote CP/M system using a Hayes
Smartmodem compatible modem. Includes programs to
allow restricted access.
USERS DISK 128 • VFILER and Extended Single
Density
VFILER is a screen-oriented file manipulation utility,
similar to SWEEP, CLEAN, and DISK. Also, Larry
Blunk's documentation and software for implementing
extended single density (334K) on eight inch disks.
USERS DISK 129- MODEM740
The latest incarnation of the immortal MODEM7
program. Too many features to list. Versions for both
ports of BB I (Xerox 820) & BB II.

Order Number 9-5 PST (503) 382-5060 • Technical Information 9-Noon PST Only (503) 382-8048

BOOKS, MAGAZINES, AND T-SHIRTS
FROMMICROC
Inside CP/M
By David Cortesi
$27.95 US, Can, Mex
$37.95 (Other Foreign)
This is one of the best
books on CP/M for everyone, users and programmers. It's our reference
here at Micro C.

ORDER YOUR MICRO C
T-SHIRT TODAYI

These two-color tan shirts are the
perfect software. Sizes S, M, L,
and XL.
Only $6.95 ppd. ($8.50 all foreign).

Your Fortune in the
Micro computer Business
By Victor Wild
$26.45 (US, Can, Mex)
$36.45 (Other Foreign)
This is the best, most
complete collection of
working for yourself information We've found.

MICRO CORNUCOPIA MAGAZINE
Subscription Rates
1 yr US ............ $16.00
2 yrs US ........... $30.00
3 yrs US ........... $42.00
1 yr Can & Mex ..... $22.00
1 yr Other Foreign ... $30.00

The Small C Handbook
By James Hendrix
$17.95 (US, Can, Mex)
$22.95 (Other Foreign)
If you really want to
solve the mysteries of the
Small C compiler (or compilers in general) you'll
want this book.

Inside information on the latest
processors and languages.

MICRO CORNUCOPIA ORDER FORM

--------------------------------------PRICE EACH

QUANT.

DESCRIPTION

U.S.

CAN&MEX

OTHER

lyr.Sl6 0
2 yr. $30 0
3 yr. $42 0

0$22

0$30

$12

$12

$12

KAYPRO SCHEMATIC PACKAGES
please specify I'a

$20

$20

$20

BACK ISSUES: please specify
/'a

$3

$3

$5

T-SHIRT (specify 8,M,L,XL)

$6.95

$8.50

$8.50

SUBSCRIPI'ION (6 issues per year)
o New 0 Renewal
USERS DISKS: please specify
I'a

TOTAL

NAME _______________________
COMPANY ___________________

ADDRESS _ _ _ _ _ _ _ _ _ __
CITY _______________________
STATE _ _ _ _ _ _ _ _.......ZIP _ _

Are you a current subscriber to
Micro Cornucopia? 0 yes 0 no

o Check or money order enclosed
(U.S. funds only drawn on a U.S. bankl
Prices include postage (Air Mail for Other foreign)

FREE CATALOG

Make checks payable to:
MICRO CORNUCOPIA

OTHER ITEMS:

What kind of computer do you
own/operate? _ _ _ _ _ _ _ _ _ _ _ __
TOTAL

ENCLOSED

Card No. _ _ __
o Visa 0 MasterCard

________ Exp. ____ _____________________________________
~

Signature

_ _ ·_ _ _ ·_ _ _ _ _:IiIi, _ _ _ _ _ _ _ _ _ _ _ _ ·_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Order Number 9-5 PST (503) 382-5060 • Technical Information 9-Noon PST Only (503) 382-8048

The Micro C MS-DOS Library
MS-1 Essential Utilities
SWEEP, LU86403, DSKRTN, LDIR103, WHEREIS,
SQUEEZE, UNSQUEEZE, WASH

MS-2 Cheap Assembler & Disassembler
CHASM, ASMGEN, MEMBRAIN, UNWORDSTAR,
FSPOOL, RAMDISK, SDIR, SDIR SOURCE

MS-3 Adventure
The original and most cussed adventure in C, with source.

MS-4 Single User RBBS
A decent bulletin board with source.

MS-5 File & Directory Utilities
UTIL, Z, VTYPE, ST, PROTECT, UNPROTECT

MS-6 fig FORTH
We combined fig FORTH source (MS-7) with this disk so you
get both on one disk for $12.00.

MS-8 Super Games
CASTLE, a graphic and conversational adventure, TREKRUN
Star Trek Command adventure, and BOUNCING BABY (a
finger exercise).

MS-9 PC Musician, Pascal Games, Calculator
You might call this an educational disk. PC MUSICIAN teaches
you music while you're writing songs. They play right on the
PC. 15 PASCAL GAMES with source. The games aren't
memorable but they are good examples of Turbo code.
PORGRAMMER'S CALCULATOR shows the internal workings of a stack, memory, and registers.

MS-10 Modems
QMODEM and KERMIT

MS-11 Multi-User RBBS 12.3
Multi-user Remote Bulletin Board System with source disk (MS12) included free.

MS-13 Editor & Formatter
ROFF4, PC-WRITE, and manuals on disk. Very popular
freeware.

MS-14 FORTH 83
All disks are PC Standard DS/DD 360K - $12.00 each, ppd.

Order Number 9-5 PST (503) 382-5060 • Technical Information 9-Noon PST Only (503) 382-8048

ADVERTISER'S INDEX
Adevco, Inc .............•............ 98
Advanced Concepts Engineering ..... 59
Ampro Computers ............... 72, 73
Anaheim Software ................... 31
Andratech .......•................... 88
Aprotek ............................. 55
BD Software ..................••.... 77
BV Engineering ..................... 47
Biegun & Associates ................. 88
Borland International ... Inside Front Cover
Brooke Computer ................... 81
Cal-Tex ............................. 26
Cascade Electronics ................. 11
C.C. Software ....................... 82
Colonial Data ...................... 8,9
Companion Computer ............... 97
Computer Helper Industries ......... 100
Computer Surplus Store ............. 83
Computing Technology .............. 85
Corvatek ............................ 35
Craig's Computers .................. 67
The Data Mill ........................ 66
Desktop Publishing .................. 68
Digital Dynamics ..•................ 100
Digital Research ..................... 30
Dr. Dobb's .......................... 22
Earth Computers .................... 12
Echelon, Inc ..................... 14,66
EcoSoft ............................. 21
Emerald Microware .................. 32
Epic Sales .......•................... 64
ERAC Co ............................ 80
Ferguson Engineering ............... 28
Forbes Engineering .................. 98
Gemini Electronics .................. 78
Haventree Software .................. 94
Hawthorne Technology .............. 59
The ICU Group ...................... 27
Illuminated Technologies ............ 17
Integral Systems .................... 77
Integrand ........................... 35
Kamasoft .......•................... 63
Kenmore Computer Technologies .... 89
L.A. Software ........................ 69
Laboratory Microsystems ............ 74
L-Band Systems ...................... 7
Manx Software .............. Back Cover
Micro-Art Programmers .............. 86
MicroCode .......................... 31
Microcomputer Systems ..•.•..•..... 92
Micro Cornucopia .. 90,91,101,102,103
MicroGlyph Systems ......... Back Cover
Micromint ........................... 56
Microprocessors Unlimited ... Back Cover
MicroSphere ........................ 48
Micro Supply ..................•. 36, 37
Mitek .............................. ·.. 7
Occo ..........•.................... 60
Ordinate Solutions .................. 89
Orr Corp ............................ 63
PC Tech ............... Inside Back Cover
Periphco ............................ 55
Phenix Co ....•.•.................... 84
PluPerfect Systems ............ ~ ..... 48
Poor Person Software ............... 21
Qua Tech .......................... ~ 98
Rolland Management ................ 43
SLR Systems ........................ 87
Servo Computers .................... 81
Slicer Computers .................... 38
Soft Advances ....................... 93
Software Toolworks ................. 17
Source Information .................. 67
Southern Pacific USA ................ 97
Spectre Technologies ................ 44
Systems Peripherals Consultants ..... 51
Tomorrow's Computing .............. 56
Toner, Eugene M .................... 74
Unified Software ................... 100
Viking C Systems .................... 31
Western Wares ...................... 48
Westwind Computers ................ 57
WW Components .................... 42

The Last Page
By Gary Entsminger
If you know how to use BATCH
(or SUBMIT) files, you can avoid redundancy and eschew obfuscation.
(Let me repeat that ... )
BAT And SUB
Both MS-DOS and CP/M allow you
to execute programs from special files
that have the extensions .BAT (in MSDOS) or .SUB (in CP/M). You create
these BATCH or SUBMIT files with
your editor or (in MS-DOS) at the
command line.
For example (in DOS), you can link
an assembled source file (a .OB} file)
into a .EXE file and then use EXE2BIN
to convert it from an .EXE to a .COM
file by writing a batch file, EXAMPLE.BAT LINK ASMFILE
EXE2BIN ASMFILE
Then to execute EXAMPLE.BAT enter EXAMPLE at the DOS command
line. MS-DOS has its batch (submit)
function built in, so you run a .BAT
file just as though it were a .COM or
.EXE file.
Note: .EXE files are the default type
and can be very large .. COM files are
limited to 64K total but load and
execute faster than .EXE files. So for
smaller programs, it's an advantage to
convert them into .COM files.
In both MS-DOS and CP/M you can
add parameter substitution within the
batch (submit) files. To substitute the
first parameter on the command line
into the file, you use %1 in MS-DOS
and $1 in CP/M. (Curiously, under
MS-DOS, $0 is the name of the .BAT
file itself.)
Thus, if CPYBAK.BAT contained:
COpy %1.ASM %1.BAK
TYPE %O.BAT
and you entered on the MS-DOS
command line:

Micro C Staff

$3, and so on. Each parameter is the
next entry on the command line when
you call the .BAT or .SUB file.
AUTOEXEC.BAT And CONFIG.SYS
If you need to execute the same
batch of files every time you boot, you
can have DOS and CP/M do it automatically - with an AUTOEXEC.BAT.
It's similar to other .BAT files, except
the command processor searches for it
at boot time. And if it finds it, executes it before giving you the green
light, the A> .
For example, in MS-DOS I use AUTOEXEC.BAT and CONFIG.SYS to
autoinstall SideKick, Uniform, and to
partition off part of memory as a
RAMdisk.
CONFIG.SYS contains the commands MS-DOS uses to configure
your system at boot time. If you don't
write your own CONFIG.SYS file,
DOS will assign default values for the
configuration commands. (See "Tidbits" for a list of CONFIG.SYS commands. DEVICE, FCBS, COUNTRy,
and LASTDRIVE are new commands
in 3.0.)
When you boot DOS, it looks for a
CONFIG.SYS file just before it looks
for an AUTOEXEC.BAT.
In 3.0 we can use DEVICE, one of
the CONFIG.SYS commands, in a
CONFIG.SYS file to add SideKick,
Uniform, and a RAMdisk at bootup
(who says man won't use all that
RAM?) SK
DEVICE .... UNIFORM.SYS AT + DR-1
FC-1INDEVICE - MEMBRAIN.SYS

CRC *.* f
RENAME CRCKLIST.CRC L.CRC
CRC creates a unique code (X1\16 +
XI\15 + XI\13 + XI\7 + XA4 + XI\2 +
X + 1) for each file on the disk and
writes the code into a file named
CRCKLIST.CRC. Unlike the CP/M
public domain program, CRC, M!:?DOS's public domain version doesn't
compare the files on a disk with the
CRCs in the CRCKLIST.CRC file.
But we can rename CRCKLIST.CRC
to L.CRC so it won't be overwritten
when
CRC
creates
another
CRCKLIST.CRC. Then you can compare the new CRC file with the one
we created. We put CRC2.BAT on
each disk to handle this. It contains:
CRC *.* f
COMP CRCKLIST .CRC - L.CRC

Summing, Not Slumming
This is by no means all there is to
BATCH processing. But it should whet
your appetite. With IF, GOTO, FOR,
ECHO, PAUSE, and REM subcommands, BATCH is very powerful.
Nearly anything that you repeat over
and over (e.g., compile/assemble/link)
can be combined into a .BAT or ,.SUB
file. Now if only we could run the
following .BAT file:
FOR ARTICLES - GOOD EDIT
IF NO COLUMNS CALL COLUMNISTS
GOTO TYPESEmNG
REPEAT FOREVER

By using several disks and several
different AUTOEXEC.BAT and CONFIG.SYS files you could vary your
system from task to task, improving
your efficiency while preserving your
fingertips.

CPYBAK ASMFILE
then MS-DOS would do the following:
COpy ASMFILE.ASM ASMFILE.BAK
TYPE CPYBAK.BAT
Of course, there are %2, %3, and $2,

104

CRCAndCOMP
At Micro C we use a BATCH file,
CRC1.BAT, to verify the programs on
the public domain disks we distribute.
First, we create a file called
CRCKLIST.CRC and rename it to
L.CRC.

•••

Micro Cornucopia, Number 27, December-January 1986

PLUS PC COMPATABILITY!
Features:
• 8 MHz 80186 microprocessor with true
16-bit data bus.
• True PC compatability with our own custom
ROM BIOS and PC cardslots for the video
of your choice.
• Standard 512K zero wait DRAM, 640K or
~
1M options.
~€ • 8087 numeric coprocessor port.

~

• On-board floppy disk controller for up to
four 5 %" drives.
• On-board SASI hard disk controller port.

FOR MORE INFORMATION CONTACT:

PCIECH

P.O. Box 128
904 North 6th Street
Lake City, M N 55041
(612) 345-4555

COD, VISA, MASTER CARD, CERTIFIED FUNDS

Kits
•
•
•
•
•
•
•
•

NEW LOWER
PRICES

Not So Bare Board .............. $
Quick Kit ....................... $
Full Kit. ........................ $
Assembled and Tested ........... $
128K Add-On .................... $
% MEG Add-On ................. $
XT Style, Flip Top Enclosure ...... $
150 Watt Power Supply .......... $

250.00
625.00
795.00
895.00
90.00
240.00
85.00
135.00

• 5%" 48 TPI DS
112 Height Floppy Disk Drive .... $ 125.00

~

~~~
Total Solutions:
Assembled and Tested Systems

• Mono-Chrome System ............ $1,865.00
Includes: 640K, Power Supply,
Enclosure, Keyboard, Monitor,
Two Drives, and Printer Port.
• Color System ............................ Call
• Quantity Discounts Upon Request
• Call For Info on Add-Ons, Hard Disks, Etc.

ICs

PROMPT DELIVERY!!!

MicroGlyph/SciPlottm graphics
library provides FORTRAN
routines for scientific and
engineering applications.

CPU JJPD70108D-8
Math Coprocessors

8087-2

DYNAMIC RAM
64Kx4 150 ns
256K
256K
256Kx1 120 ns
256K
256Kx1 150 ns
128K
128Kx1 120 ns
64K
16Kx4 ·150ns
64Kx1 150 ns
64K
EPROM
27C256 32Kx8 250 ns
32Kx8 250 ns
27256
27C64 , 8Kx8 150 ns
2764
8Kx8 250 ns
STATIC RAM
6264LP-15 8Kx8 150ns

$8.45
3.25
2.47
5.20
2.75
1.00
$9.99
4.75
3.99
2.25

MasterCardNISA or UPS CASH COD

Factory New, Prime Parts

--Fr:P-One

MICROPROCESSORS UNLIMITED. INC.
24,000 S. Peoria Ave.,
BEGGS, OK. 74421

• Presentation quality high
resolution graphics with
240 by 216 dots/inch.
• Software generated text
fonts, data centered
symbols, uniform or
proportional spacing.
string plotting with
rotation and size scaling capability. 14 sets.

A

B

• Multiple plot frame
processing.

1\

A

A

~

B

B

1.0

• Linear or log scaled axes.
• Vector graphics, point
to point plotting with
user selectable origin
and data scaling.

A
B

--.

.5

0

..

0.0

0

c:

til

-.5
-1.0

L.......L...............J.......&..o..L...............J......L......L....J

-5-4-3-2-1 0 1 2 3
Time (ma)

ORDERS BY
Th: Std Air
NO EXTRA
COSTON
,F-EX SAT
DELIVERY

FORTRAN GRAPHICS

SAME DAY SHIPPING (USUALLY)

JJPOO

(918) 267-4961

SYSTEM REQUIREMENTS:
IBM PC/XT / AT 256k RAM,
DOS 2.0, MS FORTRAN-77
V3.2 or IBM Professional
FORTRAN, and graphics
printer or color card.
Trademarks: IBM of IBM,
MS of Microsoft.

TERMS: $59.95 plus
$3.00 shipping.
Mass. residents add
5% sales tax.

~iCroGIYPh
Systems
P.O. Box 1066

~

M

East Arlington, MA 02174

Prices shown above are for Nov. 18, 1985

P1ease call for current prices. Prices subject to change. Please expect higher or lower prices on
some parts due to supply & demand and our changing costs. Shipping & insurance extra Cash
discount prices shown. Orders received by 6 PM CST can usually be delivered to you by the next
morning, via Federal Express Standard Air @ $6.00, or Priority One @ $13.001

MICRO CORNUCOPII
The Micro Technicaljournal

3
97709

Full implementation of "C" with standard floating
point, library, and I/O subroutines. UNIX VER 7
compatible. Produces relocatable BOBO (optional OZBO)
assembler code. Relocating assembler and linker
supplied with package or use Microsoft MBO and LBO,
SID/ZSID debugger interface. FAST COMPILATION
AN 0 EXECUTION.

AZTEC CII FOR CP/M

VISA

$199

(Special price for Micro C subscribers $149)

MJ\NX
software

systems

Box 55, Shrewsbury, N.J. 07701
(201) 780-4004

Also available for Apple DOS, HDOS, CP/M-86, PC-DOS

4 5



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37
Create Date                     : 2011:06:14 08:31:10-08:00
Modify Date                     : 2011:06:14 11:42:02-07:00
Metadata Date                   : 2011:06:14 11:42:02-07:00
Producer                        : Adobe Acrobat 9.43 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:4845398f-a186-4df2-9ff1-02d4cfa7a403
Instance ID                     : uuid:4de0038c-7f15-4fde-91e3-8c486bc022b3
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 108
EXIF Metadata provided by EXIF.tools

Navigation menu