10
74470°19388 "3
0
Soes5,
v4 f Fen
“October November 1986
World’s Cheapest Unix System
Public Domain 32000: The Hardware.................002.
How to put together a UNIX co-processor system (complete with UNIX V) for under $1,000.
Public Domain 32000: The Software.............eeeeeeee The software end of this UNIX compatible.
PALs — What They Are And When To Use Them Side Sans Why the 32000 UNIX system was designed with PALs
Special Features
Controlling The Real World With Your PC: An Introduction To Microcomputer Electronics ...... eelhas A fun series that will take you from zero to an understanding of computer hardware.
RFI/EMI Protection For Your Computer ae eeeaa le. nee
Is your computer interfering with more serious things?
Writing A Printer Driver For MS-DOS ......... essences Excellent. introduction to MS-DOS drivers and assembly language.
Recover A Directory By Reading & Write Disk Sectors ic acorns ve 8465 ca eh Seah a Maes
Recovering your files and your sanity.
a nee
bf
THE PC 8700 AT-STYLE KEYBOARD INCORPORATES EVERY IMPROVEMENT IBM DESIGNED INTO THEIR ADVANCED “AT” KEYBOARD. QUALITY SO GOOD, IT’S BACKED BY AN UNPRECEDENTED TWO-YEAR WARRANTY!
Advanced design features include:
e Separate Numeric Keypad simplifies data entry
e Status Lights for Cap, Num and Scroll Lock helps eliminate typing errors
e Extra-wide Control and Return Keys for ease of use
e Return Key placed in “standard typewriter” position for touch typists
Selectric layout for Office Standardization
¢ Positive Tactile Feedback
e Keyswitches rated for 50 million keystrokes
e Made in USA
e 2Year Warranty
BORLAND’S AWARD-WINNING SUPERKEY INCLUDED! GET THIS BEST- SELLING KEYBOARD ENHANCER SOFTWARE — VALUED AT $69.95 — AS PART OF THIS AMAZING OFFER AND CAPTURE THE POWER OF MACROS!
SuperKey’s macro capability is remarkable. It literally turns a thousand keystrokes into one.
e Exclusive screen data Cut & Paste © Screen Privacy and Protection
¢ Time & Data Stamping
¢ ProKey Compatibility
e Data Encryption
e Keyboard Lock
¢ Keyboard layout customization
e Integration with SideKick
e Pull-Down Menus
¢ On-Line Help and much, much more!
ORDER NOW — CALL TOLL FREE 800-826-5398; IN CA 800-592-9602
_______ KEYBOARD/SUPERKEY BUNDLES AT # $99.95 EACH. PLUS $10 SHIPPING AND HANDLING IN THE U.S.A.*
C1 ENCLOSED IS MY CHECK FOR $109.99 FOR EACH BUNDLE ($116.45 FOR CA RES. — SALES TAX INCL.)
PLEASE RUSH ME
OVISA OMC O NUMBER
EXP. DATE ________ SIGNATURE NAME
ADDRESS
CITY 4. STATE TELEPHONE
_ ®
COMPUTER TYPE & MODEL
PC Jr, AT&T and Corona computers require adaptors available at a nominal fee. Call for pricing.
ZIP
BLES * c, XT, Al ara, PC Jr. AND COMPAT|
FAR”
BARGAIN OF THE YEN
Bath Hardware & Software
INCLUDES BORLAND’S SUPERKEY AWARDED “BEST OF 1985” BY PC MAGAZINE
RETAILS ALONE FOR $69.95
CRITICS’ CHOICE
“Who Can Pass Up a Deal Dept?” John C. Dvorak, Infoworld, 3-10-86
“The best part of the keyboard is the feel. It is ideal!’ PC Productivity Digest, 5-86
“The keyboard's construction is solid .. . also quick and responsive to the touch. It is ideal for anyone who wants to or has to replace their PC keyboard ... At $129.95 DataDesk’s keyboard is a bargain. The PC 8700 keyboard with SuperKey for that price is a steal.”
Computer Shop Talk, 3-3-86
“DataDesk International has designed a sturdy and hand-
some keyboard that has a tactile response... and bundled
with SuperKey is the PC hardware bargain of the year.” Charles Humble—Computer Editor, The Oregonian
“DataDesk’s is genuinely a nice keyboard... It feels nice ... ican type much faster and much more accurately on it than most others ... and it’s inexpensive. It costs only $129, compared to around $300 for the Keytronics 5151.” Harry Newton, Publisher, Teleconnect, 5-86
Ss L4]SeOnrcanp cONNer The DataDesk CG 1-800-826-5398
PC8700 Keyboard 1-800-592-9602
inside Calif.
dataciesk
INTERNATIONAL
7650 Haskell Ave. (iiamamamant Van Nuys, CA 91406 818-780-1673 vst
The KeyTronics 5151 Keyboard
PLUG INTO SAVINGS!
HARD DRIVES
3 mw (5 mw Fallouts) with instructions may have cosmetic defects but are fully operational
$8995
LIMITED SUPPLY ON HAND
Name: — Model: Megs: — Size: Price: . POWER SUPPLY KITS Tandon (New) ae 26. pn - $ 399.95 ‘(suitable for above)
Rodime (New) 202E 2% 5.25 Full 399.95 $6995 (includes P.C. Board)
CMI (Used Tested) = 6426 26 0 5.25 Full 299.95 WARNING: Improper use of these items can be dangerous
CMI (Used Tested) 6640 40 5.25 Full 489.95
Quantum (New) 540 45 5.25 Full 699.95
Atasi (Used Tested) 3046. 46 _ 5.25 Full 649.95
Maxtor (Used Tested) ‘1050. 50 5.25 Full 649.95
Micropolis (New) ae 85 5.25 Full 1,194.95 BARE FRAME) "Seagate . ST419 15 5.25 Full 359.95
Ball Brothers TV-120 (shown) !6mhz, Xerox 820 compatible, 12” B/W, P-4 phosphor.
$4995
SWITCHING POWER SUPPLY a
CONTROLLER CARDS
Audiotronic 964-04 Hitachi MD 1431 Fd TTUXY Xerox 820 compatible TTUXY Xerox 820 compatible D.T.C. 1403-D (shown with optional software and adaptor) Real Power From a Famous Manufacturer delivers: 12 VDC..79 amp 12 VDC 1.5 amp 1 8” 851, DSDD and 8” 1000 hard drives 10 amps at SV, 8 amps at |2V, measures only 8.5 73 ; ‘i contro! two ‘ two type hard drives. by 4.5” and is only 2.25” thick . ; 9” Green 13” Green $ 249 with pinouts 39 (limited supply on hand) 3 9 $49 ype ‘ NEC 140 ANB4 Composite video or $ 95 + SV (@ 8amp TTUXY Xerox 820 compatible TTUXY , o ; - 24V (@ Samp 12 VDC .8 amp 12VDC HOST ADAPTER FOR ABOVE CONTROLLERS . ey ee is isi Sc een (for most popular Z-80 computers) x 49 4 9 The Winif Adapter and software + 24V (@ Samp $ ; $ +
$3995
BUILDING A ROBOT? WE CAN HELP!
STEPPER MOTORS
$5QO95
Xebec Controller, auto boot with your software (advanced diagnostic disk) for XT PC clones with up to 33 meg.
SI995
SA 450 FLOPPY DRIVES
DSDD (Brand new in boxes) 48 T.P.I. Full Height; 5.25
Sages
BUSINESS | TELEPHONES
BRAND NEW 6 button business
telephones all the standard features including buzzers and ringers looks the same as picture. Color, choc. brown.
Superior model #M061-FD02 Superior model #M092-FT-402 ‘A" shaft, 200 steps per rev. 35” 0z.0f 4" shaft, 200 steps per rev., 200” oz. of TH E SE N Sl BLE torque 5V (| amp torque, 3.0 V. (4 4.0 amps. 51/4’ DISK DRIVE i a 4 Copal model #SP-57 Airpax model #LA82120-MI 1/16” Shaft, : A" shaft, 7.5° steps 12V, 36 OHM 1S° steps, 5V, 65 OHM
$695 $495
UNIVERSAL STEPPER MOTOR DRIVER KITS
FOR DIRECT CONTROL = Til Ki— GNIVERSAL STEPPER MOTOR ‘
FROM YOUR COMPUTER = PERFECT FOR ROBOTICS AND MANY |
CABINET KIT
. MIE.MLL Filter, 6 AMP (Surge Protection Power Switch (Power Supply Shield @WConnector and Fan Cutouts
Constructed of heavy gauge aluminum, this utility disk drive case will accommodate: 5/4" hard disks, floppy drives, half heights, full heights, % heights, controller card and single board computer. Overall dimensions 10%" x 10" x 7”
Color is TAN
on SHO SALE 56995
Without Power Supply
= ON LINE WITH | UNITED PRODUCTS
Take advantage of the many items that space does not allow us to advertise. Use your computer to down load our weekly specials and hard to find items.
On line 24 hours a day. 7 days a week.
300 or 1200 baud, even parity, 8 bits with one stop bit. :
The phone number is: (206) 682-5593
New items are added weekly. Don’t miss out, call each week.
Model #23 Medel #77
$13599 42995 DC FANS
12 Volts @ 6W, 4.5” S i 995
di) united products, inc.
@ Control almost any stepper motor, forward/REVERSE and step sequence.
@ For stepper motors rated 1.7 VDC — 12.0 VDC
@ Uses a power supply with an output between 3.0 VDC and 12.0 VDC
®@ Modifications included for motors rated above 12.0 VDC
@ Inputs/outputs are ona standard 22 pin edge card connector (.156 spacing) 4'2 x 64 card, G-10 epox.
TECHNA-KIT TECHNA-KIT
cat# U.S.M.D.-C SAME SPECS. ASU.S.M.D.-C cat.# U.S.M.D. except a stand-alone driver
$99 95 @ On board clock (user optional) $ | 995
@ No edge connector
1123 Valley Hours: 9-6 Seattle, WA 98109 Sat. 9-5 PHONE (206) 682-5025
Terms: All orders are shipped F.O.B. Seattle, Wash. C.0.D’s are OK with cash or certified check
MasterCard and Visa accepted
On orders over $50.00 in the continental U.S. we pay the freight. All advertised items are subject to prior sale
MICRO CORNUCOPIA, #32, Oct-Nov 1986
B AROUNDTHEBEND———™
By David Thompson
Hi Pops!
-I’m not really ““Dad”’
“Y’d like to introduce David Thompson, father of us all. aun Z
Boy, that introduction Bol my attention. Not that I don’t like being a father, but when ‘‘all’’ means the more than 400 computer fanatics attending SOG V, it’s more . than your classic scene where the little girl runs up, flings her arms around you, and wails, ‘‘Daddy.”’
In fact, I’ve sometimes wondered what I’d do if I were waifed that way. If the child were absolutely adorable, I’d probably confess my lack of self-control and start adoption proceedings. (Erin would love a younger sib- ling.)
But I’m not sure how. one goes about adopting some 400-odd people (some of them old ‘enough, and odd enough, to be my parents), and I’m not sure how I’d explain that many indiscretions to Sandy.
““You see, sweety, it was a dark and stormy night. The moon was full, the bats making their rounds. I was alone in the computer room when a harried looking little man in a musty white lab coat scurried by looking for raw material to use in a cloning experiment and...’’
Sandy’s smarter than that.
Gary set up the introductions this year, so I’m betting he’s behind this. There’s no question in my mind that he needs to speak next year, and I need to introduce him.
Speaking Of Gary ©
. Gary Entsminger got married the end of August (so by the time you read this it'll be too late to save him). He’s now living in Davis, California where Alison, his new bride, is attending UC Davis. Gary will still be editing and writing for Micro C (hooray, hooray).
Hard Drives
I’ve gotten some very ‘good feedback on my hard drive article in issue #31. One person has written to say that his 20 Meg CMI drive has been working fine, for a whole month. Another noted that Siemens has been putting out shoddy drives so long, they couldn’t be Japanese.
One thing I forgot to mention in that article. Many drives, including the Seagate 225s (20 Meg) run quite warm. If you put anything directly above them, they get hot enough to generate read errors (the platter expands as it heats). Put your winnies on top of the drive stack so they'll stay cooler; the floppies won’t
Mike Maurice, member of a large. Portland, ~Oregon PC group, called me the other day with the following winnie info:
About six months ago, the Portland market was flooded with Micropolis 20
_Meg drives (Tektronix had shut down a product line). Some of those drives have
(continued on page 78)
October-November 1986 Issue No. 32
Features
6
18
22
30
36
38
60
Dave Rand & George scolaro Public Domain [~ ih. 32000:
The Hardware
A $400 build-it-yourself 32000 co-processor system that plugs into clones or 280 systems and runs UNIX!
Dave Rand & George Scolaro Public Domain 32000: The Software
Theory behind the software eee between the 32000 and the host.
Dave Rand & George Scolaro PALS-What They Are | And When To Use Them
Programmable array logic (PALs), What do they do? How can you design with them?
Bruce Eckel Controlling
the Real World with your PC: An Introduction to Microcomputer Electronics
Like to understand hardware but can't
~ get past go? Join Bruce as he starts
from zero and moves quickly into some really interesting projects. Exciting series.
Rex Buddenberg RFI/EMI Protection For Your Computer
Is your computer’ $ power cord putting the kabosh on prime time TV? This’ll raise your popularity with the rest is the family.
Dave Thompson
The SOG Report Join us for a look at the SOG that was
Don Fletcher
Writing A Printer Driver For MS-DOS |
A printer driver? MS-DOS has a printer driver! But, it’s not like this one. Excellent tutorial on writing 8088 assembly language and on writing drivers.
66
70
88
CONTENTS
Gary Entsminger Recover A Directory By Reading & Writing Disk Sectors
Using MS-DOS interrupts for practical purposes.
Leroy Searle Computers And Education In Central America
Know where your closet computers could go and really get used?
Sigi Kluger 2 Megabytes On the 68020
Sigi piggy-backs another meg of RAM on the DSI-020 board.
Columns
26 C’ing Clearly Creating memory resident programs in C. 44 86 World . SOG V, Taiwanese miscues, and MS-DOS environments 52 Kaypro Redefining the CP/M Kaypro’s key pad in Modula II 56 Pascal Procedures Low level futzing from a high level language. 72 The S-100 Bus — Is 20¢ on the dollar a bargain? Not necessarily. 74 In The Public Domain | -SIG/M changes direction: the latest from New Jersey. — 85. Culture Corner 86 On Your Own : | . Dave found a really good book on consulting. 82 Technical Tips
Future Tense
92
96
By Gary Entsminger
Tidbits A computer learns to heel (and gets a new leash on life).
The Last Page Help your program figure out the type of video board.
MICRO CORNUCOPIA, #32, Oct-Nov 1986 3
i
Free Software Catalog
At Dave Rand’s public domain for- um at SOG V, I promised to find you the name and publisher of a book that one of the attendees was asking about. The book is called ‘‘The Free Software Catalog and Directory.”” Written by Robert A. Froehlich, it’s published by Crown Publishers, Inc., One Park Ave., New York NY 10016.
It’s a cross-referenced listing of pub- lic domain files available for the CP/M
operating system. I’ve found it very
_useful for quickly finding stuff in the SIG/M and CPMUG collections. It also provides a brief description of each file or collection. I don’t hesitate to recom- mend it to other SYSOPs or anyone needing this kind of information.
I had a- ball at SOG and enjoyed very much meeting Dave Thompson and the others there. I especially en- joyed those late night sessions at the dorm. The trip was worth making for those alone!
Dave McCrady 13324-138 Street Edmonton Alberta Canada T5L 2B4
PC Speedup I just finished Larry Fogg’s PC
speedup described in issue #31. Over- .
all, it went well. Only one call to your tech support line with questions. My machine is a K16. It ain’t fun to work on.
I had to remove some slow memory. There was one solder bridge and one wire soldered to the wrong place. Since the Speedset program didn’t work with this machine, I installed a switch at your suggestion. Now every- thing goes like hell. .
The graphics routines are much fast- er too. I’d be glad to help out anyone in the Spokane area who’s having problems with this conversion.
John van Veen
E. 2230 11th Spokane WA 99202 (509) 535-5131
More On Hard Disks I have been building 8MHz V20 XT
clones lately, and having researched.
boards, suppliers, and prices, I have a
few words about hard disks.
The Tandon 3 1/2” drives are OK. They are shock mounted, which makes them particularly good for port- ables, but they seem very slow com- pared to others I’ve used. The rumors that these drives are self-parking are false (the same is true with the Ro- dimes that came with the Compacs). My understanding is that only the more expensive voice-coil drives that use much less juice to position the heads can be made to sense when the power goes off and quickly park the heads on the last track while there is still a bit of juice left in the circuits.
The Seagate ST-225 is still the old standby, but it’s not shock mounted, and must be carefully bolted in from underneath. (Four #8 very short bolts
‘hold them to the chassis, accessed by
holes in the bottom of the clone cases. You must place washers in between the drives and the chassis and torque them down evenly and carefully. I usually cut an edge off the washer with wire cutters so it fits flat against the side of the chassis.) Otherwise, it won’t boot up all the time, or will get senile when looking for data.
The newest technology is the Adap- tek controller card which compresses data before it is stored on the drive, and expands it after it is read. Thus, a 20 Meg drive can store 30 Meg and I/O speeds up about 33 percent.
Seagate has come out with their ST- 238 for use with this card, and West- ern Digital is about to release their own version of this controller technol- ogy. .
However, I’ve had problems using Concurrent PC-DOS with this system. It works on the CP/M partition, but you must format the PC-DOS partition under Concurrent, and then files writ- ten by Concurrent cannot be accessed under PC-DOS and vice versa.
All of which brings up a few ques- tions: Why is Digital Research Concur- rent never fully compatible with the standards set by Microsoft and IBM, why don’t they seem to care, why are they such a pain in the ass to deal with, and why doesn’t anyone else come out with a fully compatible mul- ti-tasking DOS so I wouldn’t have to use Digital Research’s program and
put up with their lousy attitude?
Everex/Western Digital cards come with a disk containing Fmtdrive.Exe which does the physical format (rather than using DEBUG and having the controller do it). This program seems to work fine on all of the drives and controllers I’ve used. I’ve been warned that the shipdisk program on the same disk (which allows you to park more than one hard disk, one at a time, and gives you an OK message so you know the heads are really safely parked) will not work correctly with other cards.
If you haven’t mapped bad tracks during Fmtdrive (drives usually come with a list of bad tracks), use Norton Utilities disktest (DT) to lock out bad tracks before entering any data. It’s a good idea to run this program regular- ly as well as Chkdsk/f from your MS- DOS disk. | _ Finally, for clones or parts, check out Ishvar Technology (formerly Avatar
. Systems). They have the best quality
and prices that I’ve found, and Jim is very knowledgeable and honest. Look for his add in Computer Shopper, or call or write at 43571 Sierra Drive, Three Rivers CA 93271, (209) 561-3139. Harv Koplo
AVROM Systems
(formerly Slipped Disk Computers) RR 11 Box 217
Springfield IL 62707
More On Mix C
In response to R.W. Odlin’s letter about Mix C that appeared in Micro C Issue 29:
Mr. Odlin wrote to me after reading my review of Mix C in the MAXIMUL newsletter (the Lobo Max-80 newslet- ter edited by Glen Guyer, 120-C3 North Pacific, San Marcos, CA 92069) concerning a discrepancy in our tim- ings of the string.c benchmark. (He reported 54 seconds, while I measured 880 seconds without running the ob- ject code through a Mix-supplied speedup utility and 465 seconds after speedup.)
Mr. Odlin discovered that instead of coding the for-loop in the string- length function:
4 MICRO CORNUCOPIA, #32, Oct-Nov 1986
QC88s C Compiler . Concurrent C .
Coder’s Prolog in C
| Fi Op, Ge me ra
YACC & PREP
Small-C compiler for 8088 tiny-c interpreter & shell . Xlisp 1.5a & tiny-Prolog C Tools
(512) 258-0785
Free shipping on prepaid orders
t] return (s - p); he wrote the following:
for (p = s; *s I= '\O's s++) return (s ~- p);
This will definitely have an effect on the execution of the loop! (It would execute just once.)
In his letter, Mr. Odlin also noted that he could not get the register version of this function to compile. I have found a work-around for this problem. Mix C will not let you code the following sequence:
string(s) register char *s;
but will allow you to code it if you create a dummy function argument and declare that first:
string(s, j) int j; register char *s;
However, all of this is: academic
| C CODE FOR THE PC source code, of course
GraphiC 3.0 hi-res color plots
a ae eel
The Austin Code Works 11100 Leafwood Lane Austin, Texas 78750-8409
No credit cards
$90 $45 $45 $25 $25 $20 $20 $20
because Mix C doesn’t actually use a
register for this variable. The timings .
are the same with or without the register declaration,
All in all, I am quite happy with Mix C. Its complete implementation allows me to try just about anything appear- ing in the magazines and numerous C books. Although its execution speed is quite slow, its compile and link times are fast, and for beginners like me, that’s important.
Spencer R. Lepley 1655 Capital Circle SE, Lot 12 Tallahassee FL 32301
Editor’s note:
Thanks for all the great information, John, Dave, Harv, and Spencer. This is one of the top rated columns in Micro C because of you.
However, I must complain: —
You guys are falling down a bit. In all
these letters, there’s not a single reason for
me to drag out my apple box and expound. What am I going to do, write a longer editorial?
I spent one whole afternoon trying to
contact other editors to see how they were
DSD86, The PC-DOS Debugger DSD87, The PC-DOS Debugger with 8087 Support. 99.95 DSD80, The CP/M Debugger
P.O. Box 49473 e Austin, Texas 78765 © (512) 478-4763
1-800-232-8088
faring: three had disappeared, six had taken the afternoon for lunch, and the last had fallen asleep reading old listings.
Wake up! You guys can do better than this! So, I’m declaring November ‘‘Harass An Editor Month.’’
Get out there and harass an editor. (Editors need to make a living too.) Take your choice: a city desk editor, a newsletter editor, a political editor, a full-screen editor, a serious editor, even me.
(And if your letters are particularly good (bad?) and particularly short they'll get printed.)
Write: Harass An Editor Micro Cornucopia PO Box 223 Bend, OR 97709
Clone Report
I recently bought an AT clone from a company in Austin TX called Com- puadd. The machine’s an 8MHz with 640K RAM, a 20 Meg. CMI disk, a 1.2 Meg. floppy, an Amdek monitor, and a Hercules clone monographics board.
(continued on page 95)
MICRO CORNUCOPIA, #32, Oct-Nov 1986 5
Public Domain 32000:
The Hardware
This is for all of you who want to put a computer in your clone or CP/ M machine. (Sorry, that was a cheap shot.) Actually, this is the cheapest way known to hacker or human to build a truly powerful system (UNIX System V if you wish).
With hardware floating point that outruns DEC 11-70s, 2 Meg of DRAM, DMA, and a memory man- agement chip, this $400 system is an incredible hardware bargain. See the SOG V article in this issue for information on a public domain oper- ating system for this machine.
ur primary goal in designing () 32000 based system was
to come up with a low cost system without compromising per- formance. One of the unique aspects of the design (which was first present- ed at SOG V) is that it has been released to the public; schematics, PAL equations, interface software, and the PCB artwork. For this reason, we named our design PD32. (We are, however, restricting commercial copy- ing of the system, see the note at the end.)
We chose the National Semiconduc- tor 32000 chip set (second-sourced by Texas Instruments) because it’s inex- pensive, is a mature product, and was designed to support high level lan- guages. The total cost of both the hardware and UNIX System V, with which the system runs, should be under $1000.
The version of UNIX ‘available for.
this board is the full AT&T UNIX System V release 2. The port was performed by ZAIAZ Communications and is AT&T and National Semicon- ductor approved.
About The 32000 The 32000 series includes the timing control unit (TCU), the central process-
ing unit (CPU), the memory manage-
ment unit (MMU), the floating point -
unit (FPU), and the interrupt control unit (ICU). Currently four CPUs are available in the 32000 series; they are the 32008, 32016, 32032, and 32332.
The 32000 series is unique in the microprocessor world in that it is the only family that maintains 100 percent upward and downward software com- patibility at the binary level. This compatiblity means the end user doesn’t need to change software when changing CPUs.
Of the four CPUs, we chose the —
32016 for its price and ease of board routing (the board has only two lay- ers). The 32016 still has a full 32-bit internal architecture but has a 16-bit external data. path. To reduce pin count both the CPU and MMU multi- plex their data and address buses. In other words, data and address infor- mation are put on the same set of pins.
Hardware Design.
Now that we’ve covered some of the background, let’s take a close look at the design. From Figure 1 we can see that the TCU, CPU, MMU, and FPU literally bolt together. To understand how the rest of the system interfaces to these four devices, we need to
_ understand the timing of a bus cycle.
Addressing The CPU places the logical address onto the data/address bus during T1
and pulses its address strobe (ADS)
pin. If an MMU is in the system (as in this design) ADS from the. CPU con- nects to ADS of the MMU. The MMU then performs any necessary page ta- ble lookups and translations, places the physical address onto the data/ address bus, and pulses the physical
address valid (PAV) pin. This is per- |
formed in the TMMU state. This pin becomes the system-wide address strobe pin and also connects
By Dave Rand and George Scolaro
72 Longfellow St. Thousand Oaks CA 91360 (805) 493-1987
into the TCU. The TCU, on receiving the ADS signal, generates either a read (RD) or write (WR) signal during
‘T2 and T3. During T2 and T3 the bus
becomes a data bus with data either being read or written by the CPU or MMU. The final T4 state is used internally by the CPU to prepare for entering an idle bus condition (if the 8- byte prefetch queue is full) or for
. starting a new T1 state.
| Wait States
Since the TCU generates the RD and WR signals, wait states may be re- quested by asserting either the CWAIT, PER, or WAITn signals. The TCU. generates READY, which the CPU and MMU sample and wait on as
necessary. The CWAIT is a continuous
wait signal. WAIT1, WAIT2, WAIT4, WAITS... allow from 1 to 15 wait states to be digitally selected. -
We did. not use the PER signal in this design. It modifies the bus cycle so the 32000 can talk to slow peripher- als such as UARTs.
The TCU generates several other useful signals: data bus enable (DBE) which is used to enable data bus transceivers (which don’t exist in this design), timing state output (TSO) which is a signal that comes out very early in T2 and lasts through T3 (used by the DRAM controller), CTTL (TTL buffered PHI1), and FCLK Sa es fre-
quency).
. Latching And Decoding
Since the data and address buses are multiplexed together we need to sepa- rate them into two buses for the EPROMS, the ICU, and address de- coder PAL (U3 DEC32). Figure 2 shows U14 and U15 which latch the 16 least significant address lines using the inverted system address strobe signal
(ADS). The high order address lines
Al6 to A23 are latched by the CPU/
(continued on page 8)
a em mm Ne Tn mer
6 MICRO CORNUCOPIA, #32, Oct-Nov 1986
Or...
Mae
‘Mo at its absolute best. It’s a fully integrated development environment that takes into account what you need asa programmer. Without leaving the Editor, you can call the compiler, linker and utilities.
“With Logitech’s Modula-2, you'll have the ability to edit several files at once, “comparing, window to. window,. various code modules. You can even move from -Window-to:- window compiling, linking, debugging and running.
The compiler has the kind of power and room to breathe that you really need in today’s complex applications. It is as easy to use as Turbo Pascal, without your
programs being limited to 64K of code.
At your command will be the libraries of modules that make Modula-2 a programmer’s dream. It has essentially the same structure as Pascal with the major addition of a library organization of code modules that allow you to put together programs on a solid, block-by-block, foundation of proven code.
Whether you’re working with a module of your own making, or one of the many in our library, you'll find the system by which each module is identified, described and stored an organizational masterpiece. And that’s at the heart of Modula-2.
Underneath the sophisticated system is a Modula-2 compiler that is the result of years of development and proven use in industry. We run on the Vax’, and we run on the IBM PC. And the code is portable-from one to the other.
Best of all... you can have it right now!
Logitech Modula-2/86 Complete with Editor, $ Run Time System, Linker, Cursor-posi- 89 tioning debugger, 8087 Software Emula- tion, BCD module, Logitech's extended library, Utility to generate standard .EXE files, Turbo Pascal (and standard Pascal, too) to Modula-2 translator (included without charge until 8/1/86), and much, much more! Logitech Modula-2/86 with 8087 support Even if $129 you haven’t yet gotten an 8087 co-pro- cessor, you can still use this version.
Logitech Modula-2/86 Plus For machines with $ 512K or more. Takes advantage of the 189 larger memory to increase compilation speed by 50%! Supports 80186 and 80286 as well as 8086 and 8088. Includes 8087
and 80287 support, too.
Window Package Now you can build true win- $ 49 dowing into your Modula-2/86 code with
ease, too. Very powerful and very full, yet only 15K in size. Features virtual screens, color support, overlapping windows and a variety of borders.
Run Time Debugger (source level) Much more
5 69 powerful than just a symbolic RTD.
Display source code, data, procedure call
chain and raw memory. Set break points,
assign values to variables, pinpoint and
__ identify bugs in your source. The ultimate professional’s tool!
Utilities Package Features a post-mortem de-
5 49 bugger for static debugging. If a program you've written crashes at run time, the situation is frozen, and you can pinpoint, in source, the cause of the error and the data at that moment. Also includes a disassembler, a cross reference utility and a “version” utility that allows conditional
‘ compilation.
Make Utility Automatically selects modules af- fected by code changes for quick and minimal re-compilation and _ relinking. Even figures out dependencies for you.
Library Sources Source code for our major library
$99 modules is now available-for customiza- tion or exemplification.
ROM Package If you need to produce rommable code, call our 800 number for further
To place an order call our special toll free number
800-231-7717
in California
800-552-8885
Special offer until 8/1/86!
includes Free! $49.95 value Turbo Pascal translator! Now, you can take your library with you!
$39
COHOSCSTOHCHOHSHSHESEHHESHEHEOHESEHEHHE HEHEHE H OBER H EES
Y I'd like to take the next Cs, logical step in programming.
Please send my copy of Logitech Modula-2/86 to the following address:
OVISA OMasterCard O Check Enclosed
Card Number Expiration Date
Signature Name Address City State Here's the configuration I'd like:
O Logitech Modula-2/86 $89
O Logitech Modula-2/86 $129 O Run Time Debugger $69 with 8087 support (source level)
O Logitech Modula-2/86 Plus $189 O Utilities Package $49
Please add $6.50 for shipping O Make Utility $29
and handling. O Library Sources $99
Totalenclosed$___ {California residents, please add applicable sales tax)
LOGITECH
LOGITECH, Inc.
805 Veterans Boulevard Redwood City, California 94063 Telephone (415) 365-9852 For European pricing, please contact: LOGITECH SA Box 32, CH-1143 Apples, Switzerland Telephone 41 (21) 774545
Zip____ Phone ( )
0 Window Package $49
And include the indicated items:
FeSO SHAS SESSHOSEHHSHHSSSHSHSHSHSSHSHHSHSHEHSHEHEHHHEHHEOSHEESEEHHE SESH HSHHCHEOHHEE
; a information on this package. SCHRSSCHOSHHEHCHEHRSESESHHCSEEESH SHH HOEHEHE GEESE SCHHHHOHHE Please call our 800 line for: GO Information on our *VAX version Ci Site License and University Discounts O Dealer and Distributor information
“Turbo Pascal is a registered trademark of Borland international
MICRO CORNUCOPIA, #32, Oct-Nov 1986 7
PD32: THE HARDWARE
. (continued from page 6)
_ MMU for the full bus cycle, so at this _ point we have a separate 16-bit wide ‘ data bus and 24-bit wide address bus. The DEC32 PAL takes several of the -address lines and generates the PPORT, INT86, EPROM, ICU, and _ RAMS signals. PPORT is the select for -the parallel port which forms the - PD32-to-host data interface. INT86 is a signal used to interrupt the host or set a flag that the host can sample to see - if the PD32 has a request waiting for service. EPROM is the select line for the two EPROMS (remember the 32016 has a 16-bit wide data bus). ICU is the chip select for the ICU, and RAMS is the chip select for the dynamic memo-
DEC32 also generates a_ software reset signal that is combined with -TRESET (the power-on reset signal from the host) which connects to the “input reset pin of the TCU. DEC32 _also takes several of the host signals (ISEL, IA1, IA2, IOR, and IOW) and generates a signal to clear the flip flop . U2 (via pin 13). This half of the flip flop is set whenever the PD32 at- tempts to interrupt the host. Thus the host may honor the interrupt (the Z80 host design does not use interrupts), or it can poll the interrupt status via a status read.
Parallel control PAL U1 takes the
- output of the interrupt status flip flop .
and makes it available on IDO. U1 also generates the signals to clock data into the data latch when either the PD32 or the host performs a data write cycle, and the data enable output signal when either the PD32 or host performs a data read cycle. _ The data latch is a 74AS646, a very handy chip. It has two back-to-back
transparent latches (in a glass case).
with tristate capability. Thus it acts somewhat like a one-byte FIFO.
The other half of U2 is used to keep track of whether the data latch, U5, is full or empty. The PAL U1 and the flip flop form the control circuit for manag- _ing the data latch, U5. This design ' forces wait states on both the PD32 -and the host to synchronize data transactions. Wait states are asserted if either the PD32 or host attempts to write to the data latch if it is already full, or if either attempts to read the
data latch if it is empty.
We designed the software protocol so that in all situations the PD32 rather than the host will be placed in wait states. Plus, we designed the PD32 so that the DRAM continues to be re- freshed even if the CPU is forced to indefinitely wait (this cannot be as- sumed of the host and certainly not the IBM PC/AT).
Parallel Port Vs. Dual Port
In case you’re wondering why we - ‘chose a parallel port interface rather
than a dual port approach, the parallel port approach has many advantages in this design, some of which are listed below: .
— very simple interface requirements on the host. The IBM PC/AT or Z80 or Slicer make ideal hosts for the PD32.
— very fast data transfer rate.
250Kbytes/sec on a 4MHz Z80, and up to 500Kbytes/second on an IBM AT or PC with a V20 or V30.
— easy to debug the interface via the host by output commands with a
| _ debugger while monitoring the signals
on the PD32.
— data from the host is read by a.
software loop on the PD32: This means that the CPU can read the data
and transfer it to the logical address .
with the MMU actually mapping the address to the physical address. Thus, data from the host does not have to be double buffered. .
The last point is very important. since UNIX requires that the data be
transferred to the logical address. In a dual port system the host would move the data directly to the physical ad- dress. Since the UNIX System V on the PD32 supports demand paged vir- tual memory, logical. pages are not necessarily stored contiguously in physical memory. This complicates the software in a dual port system since
the host would have to read the MMU translation table entries for every 512°
byte block of data it was transferring.
The ICU’s Function
The ICU performs several tasks in this design. First, it generates both real time interrupts (60Hz time slicing for UNIX) and software interrupts inside
UNIX, and also accepts interrupts from the host on IR13. Second, since
in this design the ICU is programmed
to have eight general purpose outputs, - GO/IRO to G7/IR14, we use these to perform the following:
— When the GI1/IR2 output goes low, U7’s /1Q output latches low causing the DEC32 PAL to switch out _ the EPROMs in low memory and select the DRAM. (On reset, the 32000 starts execution at memory location 0.
_ Thus we want the EPROMs at 0 | _ “initially, but once the PD32 is up and running, we want RAM at location 0.)
— G2/IR4 if low causes the EPROM software to perform a full memory test every time the host resets the PD32. This helps you debug the memory circuit.
— G3/IR6 may be Siunitoned with a meter, and if low indicates that the self-test performed by the EPROM has_ failed. This information is also output
to the data latch so that the host can
check the status of the PD32 after the reset command.
The DRAM and EPROM are fairly self-explanatory (Figure 4). Both EPROMs are selected’ whether the CPU performs a byte or word access
.since_ the EPROM can be read only.
The DRAM, on the other hand, is
- organized as four banks of 512K bytes each. (A total of 2 megabytes is sup-
ported and automatically sized by the EPROM software.) There are upper and lower bytes (to create the 16-bit word).
The 32000 series has no alignment
Testrictions on data read/writes or in-
struction fetches. Thus the memory has to be organized so reads and,
More importantly, writes to individual
bytes are supported. The 32016 signals the data bus width (whether the read or write is 8 or 16 bits) using the AO and HBE signals. If AO is low, the low byte is active (assuming HBE is high).
If HBE is low then the high byte is_— -
active. These signals are shown on the DRAM controller schematic (Figure 3).
DRAM Control
Explaining the interaction between
the DP84412 (U18) and the DP8409AN-
2 (U20) is beyond the scope of this
article, so we'll just treat them as a single unit (refer to the series 32000 hardware databook). This design al- lows a wait state to be inserted into a
(continued on page 14)
STL SSP I Pa SR SS SSR SS 5 2 EICRE 8 MICRO CORNUCOPIA, #32, Oct-Nov 1986
9861 AON-PO ‘ZE# ‘VIAODNNYOD OUIN
Pa
700IN +E “7/408 /ASTO -ADY PHI4 PHI2 eTTL
FoLK}S
7Ro |} 7WA
CTTL FCLUK /RAO /WR
ADoO — AD45 AiG - A23.
OL
9861 AON-39O ‘Ze# “VICODNNUOD OUIN
Ui4 : 74ALS573
RD JQ) Jd [OR 1 INI 1D [to
U6 4caALsoo
u6B t Z4AL.S00
* USE 32202-6 {6 MHZ) WITH THIS DESIGN WHETHER A 32016-6 OR 32016-10 IS USED
IND JOD |S JOR {OV INI | FLO
U15 74ALS573
/PPORT ODIN /Tso
/OBE
ZISEL IAt IAe2 ZIOR IOW
LA2s LA2e bLA2ai LAoB LAOS RSTO ISEt ITAi TAé ZIOR /IOW IRESET
U5 74LS646
PARALLEL PORT CONTROL PAL
/PPORT /JINT32
OD FO INS Jon Foot > [te [ry foe
986L AON-O ‘ZE# ‘VIACOODNNUOD OUWIN
IL
/WAITWA /WAITRO
RESi DAPACS&
ooh 3
14
18
RES2 DAPACS
rai
9861 AON-9O ‘Ze# “VITCODNNUOD OWDIN
9861 AON-190 ‘ZE# ‘VIAODNNYOD OUDIN
€L
Ua ZBOCPU
* ALL PINS THAT STAAT WITH THE LETTER °C‘ EG C23 REFER TO THE ORIGINAL CONNECTIONS THAT THE zB80 CPU MADE TO THE PCB SOCKET
U2 74.9245
‘PD32: THE HARDWARE
(continued from page 8)
DRAM read cycle by jumpering J7. -Even using 150ns DRAM, you need this wait state if you’re using a 10MHz ~PD32 and a DP8409AN-2 (slow ver- sion). If you have a DP8419 (fast part) in the system you won't need the wait.
U20 multiplexes address lines for the DRAMs and generates the RAS, CAS, and WE signals. All the outputs of U20 that connect to the DRAMs are designed to drive high capacitance loads (typical of large DRAM arrays).
The series resistors reduce under- shoot voltages caused by fast signals from U20, PCB trace inductance, and DRAM capacitive input loads. U20 and
U18 also generate refresh cycles for the DRAMs with period RFCK (16 usec square wave from one of the internal 16-bit counters in the ICU).
The refresh cycles and CPU/MMU cycles are arbitrated by U18. Once a refresh cycle is started, U18 keeps asserting wait states until it’s com-
‘plete. The circuitry that generates the CASL and CASH signals for the DRAMs is necessary, first to support
the byte read/write capability of the CPU, and second, the word read/write requests from the MMU when it’s performing translation table upaates or fetches.
The FLT signal trom’ the MMU caus- es the CPU to release the bus. In this design FLT is used as the equivalent to HBE from the CPU. The MMU will always assert AO low since it accesses word aligned data only. — |
One final point regarding chip select:
for the DP8409AN-2 (U20). In order to use the slow (cheap) DP8409AN-2 in systems with fast clocks (such as the 10MHz PD32) and still not violate its specifications, we keep it enabled. Because it’s always enabled it will constantly generate RAS/CAS cycles for all CPU bus cycles (including ac- cesses to EPROM, etc.). Then we use the RAMS signal to gate off the CAS signal from U20 unless we’re really accessing DRAM. Thus the DRAMs will see only a RAS cycle (a refresh cycle) when DRAM is not selected. The final part of the schematic is the
decode circuitry in Figure 3 which is used to qualify the address from the | IBM PC/AT. If a Z80 is being used as
the host, this decode circuitry is by-
passed via J1, with the decoding being accomplished on a daughter board.
CONN2 in Figure 5 is used to connect
to a daughter board via a 26-line ribbon cable. The schematic of the Z80 daughter board in Figure 6 shows how to interface a non-IBM PC/AT host to the PD32. _
For more information regarding con- struction, debugging, software
sources, and latest schematics, as well
as the PD32 user’s group, contact:
Dan Efron 8910 Westmoreland Lane
~ Minneapolis MN 55426
(503) 382-7643 (Micro C RBBS)
Note: George Scolaro is maintaining the copyright on the hardware design and is restricting copying to small-quantity, non- commercial users. Any commercial produc- tion of this system must be by license through George.
VEDIT PLUS
MULTIPLE WINDOWS
POP-UP MENUS
KEYSTROKE MACROS
WINDOW 1
VEDIT PLUS is an advanced editor that makes your program development and word processing as efficient and
easy as possible. VEDIT PLUS is simple enough to learn and use for the novice, fet has the speed, flexibility and power to satisfy the for (i:0; istermlim: i++) {
most demanding computer professional. ptr = malloc ( NODESIZE ): VEDIT PLUS is particularly suited for if (4)
writing all types of programs and head : tail = ptr: lengthy documents such as reports or else {
manuscripts. tail - next:ptr;
é . : tail:ptr: This shows how VEDIT PLUS can perform i windowing. One window is used for word processing, a second for program development, and the third for commands.
register 1. struct node “ptr:
tail- next = NULL: load _str( &(tail- header),
i return ( termiim |
WINDOW $
VPLUSPC .COM INSTALL .EXE LIHARD .BAT T -BAT LIGHT .COM ENVI .COM *.NUM DISK -DIC VEDIT INI RAM2 DIC BM THES DIC
a LIGHT — .HLP RAM3 .DIC PRINT -.EXC INSTALL .INI
For over six years VEDIT has been the choice of professionals who demand the most powerful edit- ing software available. CompuView has once again enhanced this power with the latest VEDIT PLUS - you can now open windows to simultaneously edit several files, access editing functions with pop-up menus, use keystroke macros to speed editing and run other programs within VEDIT PLUS.
Whether your needs are program development, technical writing or word processing, VEDIT PLUS is your answer. VEDIT PLUS is simple enough to learn for the novice, yet has the speed, flexibility and power to satisfy the most demanding computer pro- fessional. Its powerful macro programming lan- guage helps you eliminate repetitive editing tasks.
If you take your editing seriously, you need VEDIT PLUS. With over 40,000 users, you can depend on VEDIT PLUS to perform consistently and reliably. As have GE, EDS, U.S. Navy, GM, Sperry and many others. VEDIT PLUS supports color windows on the IBM CGA & EGA and even windows on most CRT terminals. Available for MS-DOS, PCDOS, CP/M-86 and CP/M-80. List price $185.
‘To sum things up, VEDIT PLUS is a small, fast, sophisticated editor with a wealth of features and a good macro language. It offers many rewards for the dedicated programmer.” .
Computer Language, Chris Wolf, Scott Lewis,
Mark Gayman 6/86
‘“VEDIT PLUS is a wholly remarkable program: blindingly fast, extremely powerful, and highly flexible.”’
Profiles Magazine, Robert Lavenda 4/86
VEDIT and CompuView are registered trademarks of CompuView Products, Inc. MS- DOS is a registered trademark of Microsoft. CP/M is a registered trademark of Digital Research. WordStar is a registered trademark of MicroPro.
EXECUTE DOS PROGRAMS
VEDIT PLUS FEATURES
e Simultaneously edit up to 37 files of unlimited size.
e Split the screen into variable sized windows.
e ‘Virtual’ disk buffering simplifies editing of large files.
e Memory management supports up to 640K.
e Execute DOS commands or other programs.
e MS-DOS pathname and CP/M user number support.
e Horizontal scrolling - edit long lines. '
e Flexible ‘cut and paste’ with 36 text registers.
e Customization - determine your own keyboard layout, create your own editing functions, support any screen size, any CRT.
e Optimized for IBM PC/XT/AT. Also 132 column & up to 70 lines.
EASY TO USE
e Interactive on-line help is user changeable and expandable. e On-line integer calculator (also algebraic expressions).
e Single key search and global or selective replace.
e Pop-up menus for easy access to many editing functions.
e Keystroke macros speed editing, ‘hot keys’ for menu functions.
FOR PROGRAMMERS
e Automatic Indent/Undent for ‘C’, PL/I or PASCAL.
e Match/check nested parentheses, i.e. ‘{’ and ‘}’ for ‘C’.
e Automatic conversion to upper case for assembly language labels, opcodes, operands with comments unchanged.
e Optional 8080 to 8086 source code translator.
FOR WRITERS
e Word Wrap and paragraph formatting at adjustable margins. e Right margin justification.
e Support foreign, graphic and special characters.
e Convert WordStar and mainframe files.
e Print any portion of file; separate printer margins.
MACRO PROGRAMMING LANGUAGE
e ‘If-then-else’, looping, testing, branching, user prompts key- board input, 17 bit algebraic expressions, variables.
e CRT emulation within windows, Forms entry.
e Simplifies complex text processing, formatting, conversions and translations.
e Complete TECO capability.
e Free macros: © Full screen file compare/merge e Sort mailing lists e Print Formatter e Main menu
CompuView
1955 Pauline Bivd., Ann Arbor, Ml 48103 (313) 996-1299, TELEX 701821
SANYO |
Prices don’t get any lower.
MBC 1200 SPECIFICATIONS:
* Two 2-80A (main and subsidiary) CPUs with no- wait mode for fast execution, substantial memory capacity (RAM 64KB, ROM 4KB).
© High-resolution full graphic function with 640 x 400 dot matrix display.
® Choice of 33 or 40 line text mode.
¢ CP/M operating system complete with assembler, editor and all utilities.
* Easy-to-use Sanyo graphic BASIC.
¢ One (MBC 1200) or two (MBC 1250) internal double-sided, double-density, double-track, 51/4" slim-type 640KB formatted mini floppy disk drives.
® Keyboard with 15 user-programmable function keys.
Interfaces for Centronics printer and one RS- 232C port provided.
© Free software from Micropro: Wordstar, Mailmerge, Spellstar, Infostar, Calcstar & Basic.
@® SANYO MBC 4000
FREE SOFTWARE FROM MICROPRO
MBC 4000 SPECIFICATIONS: e MS DOS - CP/M 86 operating system with
a SANYO M BC 1 200 editor, assembler and all standard utilities.
¢ 128KB RAM memory capacity, expandable to
2 R E E sO FIWA R | | e race for one Centronics printer and one FRO M M | [e- se) | sie) e 12" aoee een monitor display screen for
easy viewing.
© One (MBC 4000) or two (MBC 4050) internal double-sided, double-density, double-track, 5%" slim-type mini floppy disk drives with ° 640KB formatted capacity.
® Keyboard with 15 user-programmable function keys.
e Thousands of FREE public domain software available ¢ COMPAT disk utility for over 50
e 8086 Microprocesser e Runs MS DOS & CP/M 86 e Floppy disk drive with 640K
CP/M formats—only $39 © Free software from Micropro: Wordstar, — Capacity :
e Professional accounting soft- ea a e RAM expansion to 640K ware available available.
e 20 meg hardrive optional : EDUC ATIONAL e Utility pack including BIOS &
schematics option
$499
Special pricing for printers
DISCOUNTS
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.
‘399
Special pricing for printers
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.
_For our catalog with compiete pas Na a details and prices, send $2 to:
_ Micro Supply Organization, inc. : ; i “4909 Stockdale Hwy. #180 é 4 - Bakersfield, CA 93309 emer: ioe
ORGANIZATION INC. 15% Restocking on Returned Orders
MAXIMUM P
Don’t be fooled.
No hidden cost!
In keeping with industry trends MSO is bringing our customers high performance P.C. compatibles and accessories. The GEM-ST™ features the V20-8 chip which runs at three times the speed of the IBM- PC XT* and also runs CPM 8080 software.
FREE 5 module intergrated software
22 meg sub-system with tape back-up $599 w/purchase
GEM-ST Specifications:
CPU - V20-8 Chip & Run CPM
Software
RAM - 640K
Clock Rate - 4.77 or 8 MHZ
Disk Interface and Drives -
(2) - 5-1/4" floppy drives 360K
ROM BIOS - Legal BIOS
Keyboard - AT Style Keyboard
Expansion Slots - 8 IBM* compatible slots Power Supply - DC Voltage and Max Current + 5V @ 15A- -5V@ 5A
+ 12V @ 6A-12V @ 5A
Imput Voltage 115/230V
Meets UL/FCC Standards
Standard Interface - (1) - Serial RS-232-Port (1) - Game Port
(1) - Parallel Printer Port
Clock - Clock calendar battery backed up Video - TTL Hi-Res Monographics Card and TTL Monitor
Operating System - MS-DOS
Warranty: 1 year all parts.
90 day labor.
GEN-AT Specifications:
CPU - 80286
RAM - 1 Meg
Clock Rate - 8 MHZ
Disk Interface and Drives -
(1) - 5-1/4” floppy drive 1.2 Meg
ROM BIOS - Legal BIOS
Keyboard - AT Style Keyboard
Expansion Slots - 8 IBM* compatible slots Power Supply - 200 Watt
Meets UL/FCC Standards
Standard Interface - (1) - Serial RS-232-Port (1) - Parallel Printer Port
Clock - Clock calendar battery backed up Video - TTL Hi-Res Monographics Card and TTL Monitor
Operating System - MS-DOS
Warranty: 1 year all parts.
90 day labor.
m > 0lo7 Wale], 7.8 DISCOUNTS
At Micro Supply Organization we offer the lowest prices on GEM computers.
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 GEM com- puters. Whether you need one or a dozen computers, Micro Supply Organization is the place to get them.
For our catalog with complete details and prices, send $2 to:
Micro Supply Organization, Inc. 4909 Stockdale Hwy. #180 Bakersfield, CA 93309
15% Restocking on Returned Orders AMERICA
ORGANIZATION INC.
MADE IN
Performance for the power user.
The GEM-AT™ runs eight times as fast as an IBM-XT"™, for your multi- tasking and multi-user needs.
Including MS-DOS 3.2
with G.W. Basic. The GEM-AT™ is a complete turnkey system with everything to plug and go!
te Intergrated software
32 meg sub system. with tape backup $799 w/purchase
805/393-2247
MICRO CORNUCOPIA, #32, Oct-Nov. 1986
17
Public Domain 32000:
The Software
There are two tricks to integrating two systems: hardware and software. Interestingly, the best trick is the software. This is the software part of the PD32 series.
ne of our challenges in de- signing the PD32 software
“was to support UNIX(tm) and still make it portable enough to be |
moved to a number of different oper- ating environments. Thus, the soft- ware implements a multi-channel in- terface to consoles, disks, printers, and the like, while using only the single
500K/second I/O channel available on
the PD32.
Since the PD32 cannot be. talking and listening at the same time, a protocol must be used. PD32 employs two different protocols; both will be discussed below.
Getting Started
When the PD32 first powers up, the PROM is bank switched into the PD32 memory space at physical address 0. The PROM code tests the CPU reg- isters, initializes the Interrupt Control
Unit (ICU), and waits a few microse-.
conds for the RAM refresh to start.
Then it tests to see if that’s the first _ power-on of the day. If it is, the PROM does 256 write cycles to the RAM, just to make sure the RAM is awake. A hard memory test follows, to check memory size and ensure that the memory is good.
If the memory fails, a Ox5a (5A hex) is output to the PD32 data port. If the memory is good, then a 0x00 is out- put, and the PC I/O processor knows
everything’s OK. Subsequent resets of
the PD32 do not repeat the full self- test, but instead do a quick test of the RAM, unless you install the ‘always test’ jumper.
Protocol #1 After the PROM completes the self- test, it drops into the first protocol.
This simple protocol puts the host system in control of the PD32 and
supports only three functions: reading
PD32 memory, writing PD32 memory, and starting program execution. This is handled with a 6-byte packet. Request type (1 byte)
Length (2 bytes)
Address of data (3 bytes)
By Dave Rand and George Scolaro
72 Longfellow St. Thousand Oaks CA 91360
The request type must be (R)ead, (W)rite, or (E)xecute. The length field tells the PD32 how much data to read or write. The address field tells the PD32 where in memory to get or put the data. With this simple protocol, it’s easy to do diagnostic programs from the PC side since the PC is the master and the PD32 is the slave. Figure 1 shows a sample of this proto- col. .
To let the other side know that data will be coming, the transmitting side ‘always asserts the other system’s
Figure 1 - Host-PD32 Communications Protocol #1
PC PD32
<reset> <intPC> 0x00
<int32>
*R*,1000,0
<int32>
[data]
<int32>
*R*,1000, 1000
<int32>
{data]
<int32>
<W>,100,4000 <intPC> {data]
<int32>
<E>,0,0
Comments
PC issues a reset (hardware signal) PD32 issues an interrupt
and sends the ‘all ok’ signal
PC issues an interrupt
and tells the PD32 to read 1000 bytes
into address zero PC issues an interrupt and tells the PD32 to read 1000 setes
into address 1000
PC issues and interrupt |
and tells the PD32 to write 1000 bytes PD32 issues and interrupt
and writes the data back to the PC
PC issues and interrupt
and tells PD32 to execute the program
straddr a “Hello, world! \r\n"
PC —séBD32- | <intPC>.
<int32> <R>,0,sarc,dst, 15 <intPC>
[Hello, world! \r\n]
. <int32> <C>,20
‘W',20,straddr,0,15
Comments.
PD32 issues interrupt
PD32 sends RPB to PC
PC issues interrupt
PC asks for data from straddr PD32 issues interrupt
PD32 sends data across
PC prints the string
PC issues interrupt
PC sends completion code
18
MICRO CORNUCOPIA, #32, Oct-Nov 1986 -
hardware interrupt line. This gives the
receiving computer plenty of time to load up registers and drop into the appropriate loops. This protocol as- ‘sumes nothing but memory, and fur- ther assumes that the PC is always the master. For these reasons (plus a few ‘more), once UNIX is running, we switch toa different proteol
Protocol #2 The multi-channel protocol (MCP) “was designed to give UNIX the best possible interface. Because it’s an op- erating system, UNIX expects to see , disks, printers, and consoles. It does . NOT expect to see a single 500K/ second channel! Therefore, we gave UNIX an interface with a very straight-
forward protocol designed to have low overhead and still provide maximum |
flexibility.
To initiate a request, a 20-byte Re- _ quest Parameter Block (RPB) is passed, _ the format of which is below:
Offset Contents 0 Request type (R/W/T)
1 Device ID (0-255) 2-5 Source address
6-9 Destination address 10-13 Block count
44217 Data 1 18-19 Data 2
The RPB supplies enough informa- tion to allow a channel to be set up for a Read or Write operation. The Device _ ID specifies the channel and is as- signed in the following way:
Device ID Use 0
Memory only 149 Logical disk drives 10-19 - Physioal disk drives 20-29 Console drivers 30-49 Reserved 50-59 printer drivers 60-127 Available 128 IOCTL on device | 129-254 Reserved for system use 255 Terminate
| The grouping of like devices alkowis _ UNIX to use a single code fragment in
(continued next page)
speeds of BDS C; are the fastest avail ble, even
(especially!) on floppy- -based systems lust ask
any user! With 15,000 +: package
fo 1979, there are lots of users ...
New! Ed Reams s RED text editor has been’. -. \jntegrated into the package, making. BDS ca a * truly complete, self- contained: C development system.
Powerful original features: CDB symbolic
:DSofiiware, line. :
BD Software, Inc.
P.0 Box 2368 Cambridge MA 02238. 617 * 576 ¢ 3828
MICRO CORNUCOPIA, #32, Oct-Nov 1986
PD32: THE SOFTWARE
x i
(continued from page 19)
. a device driver to service many, physi- "cal devices.
There must also be a way of telling when an operation is complete, since
“ transmitting the RPB does not com- prise the whole transaction! The Com- pletion Parameter Block (CPB) sent by the PC accomplishes this. Below is the
20 -
MICRO CORNUCOPIA, #32, Oct-Nov 1986
_ format of the CPB: : rt=W id= 20 src= 3278 dst= _ % 2 rt=W id= 20 src= 3278 dst= Offset Contents : rt=I id= 1 src= 2de90 dst= 0. Completion type (C) . : rt=I id= 2 sre= 2defl dst= ‘ raciians oe : ot id= 1 src= 00 dst= eb % s rt=R id= 1 sre= 00 dst= 47400 Mise. MEE : rtsR id= 1 src= 800 dst= 47400 14-17 Data 1 : rt=R id= 1 sre= 14000 dst= 47400 18~19 Completion status : rt=R id= 1 sre= 3400 dst= 47400 (0-ok, nz-failed) 3: rt=R id= 1 sre=20cc00 dst= 47400 . : rt=R id= 1 sre= 1800 dst= 47400 To write to the console, for example, : rtsR id= 1 heal tono dst= 47400 | st the request pe to the D1 Barteria _ 20, the’ source address to the address : rtsR id= 1 sres126c00 dst= 47400 “. of the string we want to print, and the : rt=R id= 1 sre=127000 dst= 47400 . length to the length of the string. At : rt=R id= 1 sre=127400 dst= 47400 « - this point, transmitting the RPB to the : rt=R id= 1 sre=12c800 dst= 47400 PC will cause the string to be printed, 2 rt=R id= 1 sre=12cc00 dst= 47400 -- then a CPB to be transmitted back to : rt=R id= 1 sre=12d000 dst= 47400 "the PD32. See Figure 2. : rt=R id= 1 sre=12d400 dst= 47400 A similar méthod is used for all : ae a eros lennon date ae s rts = = = other devices, including disk 1/0. rteR id= 1 sre=t2b000 dste 47400 Watching UNIX come up via this : rt=R id= 1 sre=12b400 dst= 47400 protocol is interesting, however. The : rtsR id= 1 src=12b800 dst= 47400 first 52 lines (of anything interesting) s rt=R id= 1 sre=12be00 dst= 47400 are reproduced in Figure 3. The whole 2 rt=R id= 1 sre=127800 dst= 47400 thing is available on the Micro C * rtsR id= 1 sre=127c00 dst= 47400 bulletin board (503) 382-7643. : rt=R id= 1 src=128000 dst= 47400 ' : rt=R id= 1 sre=128400 dst= 47400 re : rtsR id= 1 sro=12a800 dst= 47400 Note: Dave Rand is maintaining the s rt=R id= 1 src=12a400 dst= 47400 copyright on the software and is restricting : rt=R id= 1 sre= c00 dst= 47400 - copying to small-quantity, non-commercial s rt=R id= 1 srce=129800 dst= 47400 ~. use. Any commercial production of this : a ve sane ia ane aie mush Derby. Heenee through: Dave : rtsR id= 1 sre=12cl00 dst= 47400 s rt=sR id= 1 sre=37f400 dst= 47400 : rt=R id= 1 sre=128800 dst= 47400 : rt=R id= 1 sre=129000 dst= 47400 = | : : rtsR id= 1 src=129400 dst= 47400 = . RPB: rt=R id= 1 sre=12c000 dst= 47400 = oo... , SE | 2 rt=R id= 1 srce=386c00 dst= 47400 = a ; a? : rt=R id= 1 sre= 1c00 dst= 47400 = cae | ee Be i s rt=R id= 1 src=20b000 dst= 47400 = oe Oe ie A . : rt=R id= 1 sre=20c400 dst= 47400 = ; oe : rt=W id= 20 src= 20136 dst= 0 = 8 | . : rt=W id= 20 src= 20136 dst= 0 = 18 .. . ‘i — : rt=R id= 1 src= 14c00 dst= 47400 - - a4 ne : rt=R id= 1 srce=10a400 dst= 47400 cnt= 1024 a a eee : rt=R id= 1 src= 4c00 dst= 47400 = : a
— MONITORS —
15” ELECTROHOME HI-RES ~—COMPOSITE INPUT
—1000 LINE RESOLUTION —GREEN PHOSPHOR —ATTRACTIVE CASE
15”” WELLS GARDENER —24 VDC
—3 LINE TTL INPUT —GREEN PHOSPHOR —OPEN FRAME
12” SAMPO
—AMBER, 3 LINE TTL INPUT
—ATTRACTIVE WHITE CASE
—WORKS ON IBM FOR TEXT APPLICATIONS! —HIGH CONTRAST
9”” AUDIOTRONICS —3 LINE TTL INPUT —OPEN FRAME
5” ZENITH
—3 LINE TTL INPUT —GREEN PHOSPHOR —OPEN FRAME
5’”” MOTOROLA —3 LINE TTL INPUT —BLACK & WHITE —OPEN FRAME
SYNC-SEPARATOR KIT USE WITH ANY 3 LINE TTL MONITOR ALLOWS YOU TO RUN 3 LINE MONITOR FROM A COMPOSITE VIDEO SOURCE!
$12.95
— POWER SUPPLIES —
VARIABLE 0-10 VOLTS DC $375.00 -—0-200 AMPS _ .
—VOLTAGE AND CURRENT METERS
—SINGLE PHASE AC INPUT
—MADE BY SCR
MEMOREX MULTI VOLTAGE. +5v6.5A -5.2v4A t15v5A
LAMBDA LXS SERIES +5v 27.5A +5v 90A
— FLOPPY DISK DRIVES —
3.5 EPSON SMD 100 —DOUBLE SIDED —IBM LAPTOP COMPATIBLE —AMIGA COMPATIBLE
— 1 MB UNFORMATTED
5%"? OKIDATA % HEIGHT —DOUBLE SIDED, 48TPI —IBM PC/XT COMPATIBLE
5%” TEC FB503 —DOUBLE SIDED 48TPI —IBM PC/XT COMPATIBLE —QUIET!
5%"? TEC FB504 —DOUBLE SIDED 96TPI —720 KB FORMATTED!
—RUNS ON IBM PC/XT WITH J FORMAT. SOFT-
SPECIAL OF THE MONTH!
EPROM PROGRAMMER FOR IBM PC
$109.00
¢ INTERNAL CARD WITH EXTERNAL ZIF POD
¢ PROGRAMS 2716 UP TO 27512 :
¢ SOFTWARE INCLUDED
WARE OR DOS 3.2 (NOT SUPPLIED)
SHUGART SA801R na —SINGLE SIDED, DOUBLED DENSITY —600 KB FORMATTED CAPACITY —NEW, NOT RECONDITIONED!
J FORMAT SOFTWARE PACKAGE. . $43.95 ALLOWS USE OF 96TPi DRIVE ON IBM PC/XT 720 KB CAPACITY
. $179.00
— HARD DISK DRIVES —
3.5 MMI 10 MB $249.95 —10 MB HALF HEIGHT
—ST 212/412 COMPATIBLE
—SHOCK MOUNTED IN 5%" FRAME
—1 YEAR GUARANTEE
—GREAT FOR PORTABLE!
HIGHER CAPACITY DRIVES AVAILABLE CALL!!
— HARD DISK CONTROLLERS —
XEBEC S1410A REQUIRES HOST ADAPTOR
OMT! 5510 PC/XT CONTROLLER. .
—SHORT SLOT, LOW POWER CARD
—COMES WITH CONFIGURABLE BIOS AND SOFTWARE TO HANDLE ANY 5%" HARD DISK
—COMES WITH CABLES
PACKAGE DEAL FOR IBM PC/XT: MMI OMTI CONTROLLER, CABLES $375.00
MAXWELL DESOLDERING STATION e SELF-CONTAINED (INTERNAL VACUUM PUMP) e FOOTSWITCH ¢ VARIABLE TEMP/VAC LEVEL ¢ 10 SPARE TIPS (Extra tips not available)
$149.95
OF IBM COMPATIBLE PRODUCTS PLEASE CALL FOR LATEST PRICES
1 YEAR GUARANTEE ON IBM COMPATIBLES
. $139.95
HALTED SPECIALTIES co., inc.
MA
" TERMS: Minimum order $10.00. California residents add
827 E. EVELYN AVE., SUNNYVALE, CA 94086
IL ORDERS CALL: (408) 732-1573
3 CONVENIENT LOCATIONS “tia shart HSC Electronic Supply of Santa Rosa HSC Electronic Supply — saturday 9:00-5:00 6819 S. Santa Rosa Ave. 5549 Hemlock Street Cotati, CA Sacramento, CA WE SHIP (707) 792-2357 (916) 338-2545 C.0.D.
7% sales tax. Prepaid orders sent freight C.0.D. or call for charges, shipping will be added to credit card and C.0.D.
orders. Prepaid orders over $100.00 use money order or certified check. Please do not send cash. Some items limited to stock on hand. Prices subject to change.
PALs — What They Are And When To Use Them
My experience with PALs, so far, has been mixed. They are the answer to a designer’s prayers and the bane of every independent repairman.
Dave and George used PALs in the design of the PD32. The following is — as intelligible a look at PALs and GALs (this is now a family magazine) as any we've seen. And, for those of you waiting for me to say, “I never met a PAL I didn’t like, ’ hae | oe you're satisfied.
AL (Programmable Array Logic) is a term used to-describe a -
family of devices first introduced
by MMI and now second-sourced by
several companies including Texas In- . struments, National Semiconductor, and Advanced Micro Devices. PALs are a blessing for the hardware design-
er and at the same time a possible: curse for the purchaser of a system.
that has PALs in it.
Drawbacks Of PALs
— If a manufacturer goes out of business and does not release the PAL equations, then replacing faulty PALs may be impossible.
— PALs have security fuses that, once blown, make it very difficult to find out how the PAL was =PEO- grammed.
- — PALs tend to hide certain sections
of a design that if not documented. make it very difficult to understand
the design.
— PALs are difficult to program if you don’t have access to relatively expensive programmers.
On The Positive Side
— PALs are a cheap, yet moderately secure, way to customize circuitry so it’s not easily duplicated by a competi- tor.
-— PALs help speed design and help reduce parts count.
PAL compiler.
-— PALs provide speed for critical circuit areas. PALs are currently avail- able with a maximum of 12nsec from
‘input to output (propagation delay).
PALs (at least bipolar PALs) are
programmed by ‘‘blowing’’ fuses in a
fixed array. You can select which fuses to blow to implement a logical func- tion by studying the switching array,
_or.by using a PAL language.
Languages such as PALASM (from MMI) and ABEL (from Data I/O) let
‘you specify logic functions in a high level language. The PAL language is
then translated to a fuse buffer by the There are also PAL steillatore which let you test the de-
‘sign. |
You sively the test vectors (a list of
expected outputs for specified inputs)
to test the software equation. The test vectors can also be used to test a
. programmed PAL. upeteware can have
bugs too).
Which PAL Should You Use?
Some programmers have PALASM.
built in, such as the Storey Systems PAL programmer (one. of the more. inexpensive units around). Choosing the PAL type is initially a difficult step for an inexperienced designer to take, so here are a few hints: a
— Determine how many output sig- nals you will need. Most PALs can have output pins reassigned as a so this is the first step. _
— Determine the number of output
pins that need to be latched.. i Determine the number: of output pins. that must also be used as terms within the PAL. Some PALs do not allow all euipae pins to. be Meee: as feedback terms. .
— Determine if outputs must be tristate.. Not all PALs suppor. tristate outputs.
—-Determine the number of init pins that are required ote feed- back terms).
.— Finally, based on a PAL that has
By Dave Rand and George Scolaro
72 Longfellow St. Thousand Oaks CA 91360
satisfied the above requirements, com- mence writing the equations. PALs allow only so many “OR’ed terms, so the equations will. also help in decid- ing which PAL to use.
Of course, it’s ‘normal. to have a requirement that cannot be solved with a single PAL. Also, certain types of problems cannot inherently be
_ solved by PALs. PALs implement sum
of products logic by using a pro- grammable AND array whose outputs feed a fixed OR array. Therefore, PALs can be used only when the problem can be fit into the size of the OR array (which is fixed for different PAL types). 7
Certain designs require the use’ ot bipolar PROMs, especially when ..the number of OR terms is relatively large (more than about eight). On the other hand, PALs can be used in : many situations where PROMs cannot, such as where a device with programmable tae or registers is eeduireds
How To Use Your PAL
Because there are so many types of PALs, .an example that shows all the uses is impossible. Instead, let’s look at a simple but typical use of a PAL — the PALI6L8. It has eight outputs, tristating on all outputs, speed-from 12nsec: to 35nsec, and various power ratings (dependent on speed). Our example (shown in Figure 1) is written in PALASM since. that’s one of the most common PAL languages. A
This example shows most . ofthe features of a typical PAL file. The equations may be entered :in any ‘ot- der. PALASM uses the pin list (in order from pin 1 to pin 20) on lines 5 and 6:to assign mnemonic names ‘to physical pins. Line 1 specifies the PAL type so that PALASM can check the validity of pin assignments ae ue tion syntax.
In line 8 the IF (SEL) syntax epectes that this output is to be in tristate if SEL is not valid (high): The ‘*’ sepa-
22 MICRO CORNUCOPIA, #32, Oct-Nov 1986
rating terms in line 8 indicates logical ‘AND’ ing (product term), and the ‘/’ indicates negation of the term. Thus if SEL is true (low on the /SEL pin), then DO will be true (low) if FLAG1 is true (high) or if FLAG2 is true (low).
The ‘+’ on line 9 indicates logical ‘OR’ ing of the product terms. The SEL term on line 8 shows an output being used as an input term. The IF (VCC) syntax on line 11 means that the output, SEL in this case, is never to be tristated.
Line 16 shows that the tristate con- trol may be a product term (never a
sum of products). Since only a single . product term may be used to control |
tristate signal, complicated tristate equations must be constructed as in line 8 and then used as a term.
The rest of the lines (up to 31) should be studied based on the infor- mation presented above. Lines 31 to 37 are the test vectors for both simulation and functional testing of the PAL equations. The pin names that are to be tested start after line 31 and may extend to several lines as necessary. -The ‘L’ means low, ‘H’ means high, and ‘X’ means don’t care. Any input that has an ‘X’ will be cycled low and high during the simulation and func- tional test to insure that the output signal is not influenced. Output sig- nals with an ‘X’ will be ignored.
After line 38, everything is treated as comment and is typically used by the PAL designer as notes.
Any pin on a PAL (input or output) that is not required may be labeled ‘NC.’ Note that in this example we assigned an input pin the mnemonic AEN but didn’t use it in the equa- tions. PALASM ignores this pin as it ignores NC pins. The spare pins on a PAL may either be left floating or connected to signals that may later be incorporated into the PAL equations. —
Needless to say, PALs are only the beginning of user programmable logic. With gate arrays, silicon compilers,
Figure 1 - Using The PALI6L8 With PALASM
PAL16L8
OW ONAU FWP =
IF (SEL) DO = FLAG1 * /A0 ' « FLAG2 ® AO 10
2ND LINE IS USUALLY THE USER'S PART NUMBER, NAME AND DATE 3RD LINE IS THE DEVICE APPLICATION NAME
4TH LINE IS THE USER'S COMPANY NAME, CITY AND STATE
/RD /WR AO Ai A2 A3 AEN FLAG1 /FLAG2 GND
/D0 /OUT1 /OUT2 /OUT3 /OUT4 /OUT5 /SEL NC NC VCC
11 IF (VCC) SEL = /A0 © 7a # /A2 * /A3 * RD 12
+ AO * /A1 * /A2 * /A3 * RD
19 + /AO * /A1 20 21
IF (VCC) OUT4 * /A1
* /A1
3 . IF (VCC) OUTS Al
FUNCTION TABLE |
RD) OUT2 = VCC
# a2 ® /A3 ® RD * A2 * /A3 * WR
# ao # /A3 ® RD A2 * /A3 * WR
A2 ® /A3 ® RD A2 ® /A3 * WR A2 * /A3 * RD A2 * /A3 * WR ;COMMENTS HAVE 3 SEMICOLONS
AO Al A2 A3 /RD /WR /DO /SEL FLAG1 /FLAG2
LLLL UL Xx Xx LLLL UL XxX Lb
38 DESCRIPTION
L x x L H
39 JUST ABOUT ANYTHING YOU WANT TO SAY ABOUT
40 THE PAL GOES HERE
and standard cell technology, design- ers already can produce many compact custom devices.
Make Way For GALs
Recently Lattice Semiconductor in- troduced a new family of PALs called GALs (generic array logic). GALs offer the same features of PALs with the advantage of being electrically erasa- ble. (Editor’s note: I asked Sandy about this and she said GALs have more advantages than that.)
The other feature of GALs, the ge- neric part, is that most of the PAL family may be replaced by either a GAL16V8 or GAL20V8 (20- and 24-pin
respectively). GALs have a user pro- grammable architecture word that specifies which PAL they’re supposed to emulate.
A designer can use GALs to develop a working design without spending a small fortune on one-time-only PALs. The current pricing of GALs is very competitive with PALs, and since they
are functionally interchangeable, either
may be used in the final design.
MICRO CORNUCOPIA, #32, Oct-Nov 1986 23
WHO WE ARE
Echelon is a unique company, oriented exclusively toward your CP/M-compatible computer. Echelon offers top quality software at extremely low prices; our customers are overwhelmed at the amount of software they receive when buying our products. For example, the Z-Com product comes with approximately 80 utility programs; and our TERM Il communications package runs to a full megabyte of files. This is real value for your software dollar.
ZCPR3
Echelon is famous for our operating systems products. ZCPR3, our CP/M enhancement, was written by a software professional who wanted to add features normally found in minicomputer and mainframe operating systems to his home computer. He succeeded wonderfully, and ZCPR3 has become the environment of choice for "power" CP/M users.
Multiple Commands per Line
You can easily use multiple commands per line under ZCPR3. Simply separate the individual commands with semicolons. For example, "PIP B:=A:*.TXT;STAT B:”*.*" will copy files and then show you the STAT results.
User-Programmed menu systems ZCPR3 comes with three different menu systems that you can use to create custom menu-driven "front ends” for your computer. This is especially useful for setting up menus for your spouse or co-workers to use the computer, as they never have to see the A> prompt. All they have to do is press a single key to run any single or multiple CP/M programs, and when the task is done, control is automatically returned to the menu (ordinary CP/M menu programs cannot do this).
Extended Command Processing When you type a command under CP/M, it will only look for the program in the current drive . and user area. ZCPR3 gives you more flexibility by additionally searching other disks and user . areas when resolving commands. You have full control of this function, called the PATH. This is ' probably the one element of ZCPR3 that is missed most if you return to "ordinary" CP/M.
Also, ZCPR3 supports the capability of grouping all your commonly used utility programs into a library file (*.LBR). This is great for systems with a small number of directory entries per disk, as the library file only uses one entry. It also has the advantage of reducing disk space requirements for a given set of programs, allowing you to put more programs on a disk. And the programs in the library file are invokable from the commandline just like any other program notin the library.
eeicisn: Inc.
885 N. San Antonio Road, Los Altos, CA 94022 USA 415/948-3820 (order line and tech support)
NAME ADDRESS
TELEPHONE [1] REQUESTING LITERATURE
DISK FORMAT
Other Features
There's much more to ZCPR3, like named directories, online help system, etc., but it can't be described on one page. If you would like more information, consider the books shown below.
Z-SYSTEM
Perhaps the only shortcoming of ZCPR3 is that itis not a complete replacement for CP/M. This is what the Z-System does. The Z-System. contains ZCPR3 and an additional module, ZRDOS, and is a complete replacement for CP/M. ZRDOS adds even more utility programs, and has the nice feature of no need to warm boot (C) after changing a disk. Hard disk users can take advantage of ZRDOS “archive” status file handling to make incremental backup fast and easy. Because ZRDOS is written to take full advantage of the Z80, it executes faster than ordinary CP/M and can improve your system's performance by up to 10%.
INSTALLING ZCPR3/Z-SYSTEM
Echelon offers ZCPR3/Z-System in many different forms. For $44 you get the complete source code to ZCPR3 and the installation files. However, this takes some experience with assembly language programming to get running, as you must perform the installation yourself.
For users who are not qualified in assembly language programming, Echelon offers our “auto-install" products. Z-Com is our 100% complete Z-System which even a monkey can install, because it installs itself. Z-Com includes many interesting utility programs, like UNERASE, MENU, VFILER, and much more.
Echelon also offers “bootable” disks for some CP/M computers, which require absolutely no installation, and are capable of reconfiguration to change ZCPR3's memory requirements. At present, only Kaypro conver have this option available.
BOOKS We sometimes joke around the office that we are really in the business of publishing, not selling software. We have books. Lots of books. We have to have lots of books, considering how powerful our software is and the large quantity of different packages we offer. Here are our best sellers:
ZCPR3: The Manual
This is the "bible" for the ZCPR3 user. An exhaustive technical reference, bound softcover, 350 pages. Contains descriptions of each ZCPR3 utility program, a detailed discussion about the innards of ZCPR3, anda full installation manual for those doing their own installation. You could order it from B. Dalton, but why? Get it from us.
ORDER FORM
Payment to be made by: O Cash -
O Check
O Money Order
O UPS COD
0 Mastercard/Visa:
# |.
Exp. Date
California residents add 7% sales tax. Add $4.00 shipping/handling.
24 MICRO CORNUCOPIA, #32, Oct-Nov 1986
Z sets you free!
The Z-System User's Guide
For those who are not technically inclined. This is an excellent tutorial-style manual filled with examples of how to use the power of ZCPR3/ Z-System most effectively, written by two highly experienced Z users. (One useris a lawyer, the other a writer; this proves that anyone can use Z and benefit from it.)
2ZCPR3:.The Libraries
The extensive documentation for the libraries of ZCPR3, SYSLIB, Z3LIB, and VLIB. A must for any serious user of these programming tools. Loose-leaf notebook style; easy to work with as it will lay flat on your desk.
THERE'S MORE
We couldn't fit all Echelon has to offer ona single page (you see how small this type is). We haven't begun to talk about the many additional software packages and publications we offer. Send in the order form below and just check the "Requesting Literature" box for more information.
Item Name Price 1. ZCPR3 Core Installation Package $44.00 (3 disks)* 2 ZCPR3 Utilities Package $89.00 (9 disks) 3 2Z3-Dot-Com (Auto-Install ZCPR3) $99.00 (6 disks)* 4 2Z3-Dot-Com "Bare Minimum” $49.95 (1 disk) 5 2Z-Com (Auto-Instal! Z-System) $119.00 (7 disks)* 6 Z-Com "Bare Minimum” $69.95 (2 disks) 12 PUBLIC ZRDOS Plus (by itself) $59.50 (1 disk) 13 Kaypro Z-System :
Bootable Disk $69.95 (3 disks) 20 ZAS/ZLINK Macro Assembler .
and Linker $69.00 (1 disk) 21 ZDM Debugger for 8080/Z80/HD64180
CPU's $50.00 (1 disk) 22 Translators for Assembler
Source Code ; $51.00 (1 disk) 23 REVAS3/4 Disassembler - $90.00 (1 disk) 24 Special —
Items 20 through 23 $150.00 (4 disks) © 25 DSD-80 Full Screen
Debugger $129.95 (1 disk) 27 The Libraries. SYSLIB, Z3LIB,
and VLIB $69.00 (8 disks) 28 Graphics and Windows
Libraries $49.00 (1 disk) 29 Special —
items 27, 28, and 82 40 Input/Output Recorder
$129.00 (9 disks)
IOP (I/OR) $39.95 (1 disk) 41 Background Printer IOP
(BPrinter) $39.95 (1 disk) 42 Programmable Key lOP. (PKey) $39.95 (1 disk) 43 Special - :
ll ey through 42 $89.95 (3 disks) 60 DISCA :
Disk easton Sion. $39.99 (1 disk) 61 TER
Eonineaics System $99.00 (6 disks) 64 Z-Msg Message Handling :
System $99.00 (1 disk) 81 ZCPR3: The Manual
bound, 350 pages $19.95 82 ZCPR3: The Libraries
310 pages _ $29.95 83 Z-NEWS Newsletter,
1 yr subsciption $24.00 84 ZCPR3 and IOPs 50 pages $9.95 85 ZRDOS Programmers's
Manual 35 pages. $8.95 88 Z-System User's Guide - 80 page tutorial. - $14.95
“Includes ZCPR3: The Manual ITEM PRICE
Subtotal
Sales Tax Shipping/Handling Total
nf ‘DD /N/
A 5 > LL IDLY
transportable box for
It even has a 30 day money back guarantee!
More Hardware,
Less Money!
2 double density disk drives
64K memory
80 CPS dot matrix printer
80 character x 25 line amber screen 300 Baud modem
4 expansion ports (2 @ RS 232, 1 @ parallel, 1 @ IEEE 488)
Phone toll free .
out of CA 800-222-5401 inCA 800-222-5403 right now to order your Actrix.
More Software, No More Money
CP/M 2.2 operating system
C Basic and M Basic
Perfect Writer word processor Perfect Speller spelling checker Perfect Calc spread sheet Perfect Filer
P Font
Telecommunications program
160 B Great Oaks Blvd.
San Jose,CA95119 ggg (SC VISA ‘MasterCard
‘MICRO CORNUCOPIA, #32, Oct-Nov 1986 25
Taking C Into Assembly Language’s Domain
Ron takes on resident programs (or temporary shell programs) this time. It’s amazing what he can do with a C compiler and a couple of library func- tions.
ast fall the ‘‘in thing’’ was resi- Le programs. The MS/PC-
DOS community had just discovered the joys of tinkering with the operating system, especially using Turbo Pascal .COM files, and legions of how-to code marched across the pages of PC magazines. (Oh, the vir- tues of interrupt-snatching.)
Recently, I found myself stumbling back to residency to solve some very practical problems. Since the tech- niques involve potentials of C that are seldom discussed, perhaps a reminder or two might speed up some of your programming.
Beyond The Batch File
I’ve been hacking out some business software recently, mostly (I'll admit) in Pascal. Despite all its virtues, C doesn’t handle random files very easi- ly, and the El] Cheapo C I own doesn’t offer a genuine ‘‘double’’ float type. Even for government work, I need something better than 32 bits.
Anyhow, when it came time to tie programs together — my own efforts and those of the Lotus Development Corporation — I first turned to batch files.
To someone used to the limitations of CP/M’s .SUB files, the MS-DOS batch utilities are like a dream. For automating dull and repetitive com- ' mand line entries, such as those need- ed to run a C compiler and linker, they’re perfect. For a salable package, however, they have problems:
- 1. Since .BAT files are just text files, they’re open to ‘‘improvements’’ from folks who think they know what they’re doing. I have better things to
do than troubleshoot batch files for businessmen who shouldn’t fiddle with PCs. Also, to justify our fees we computer types need to preserve what the sixteenth and seventeenth century Englishmen would have termed our “‘mystery.’’ What they can’t see must be impressive.
2. The functions available for con- trolling program flow are very limited and agonizingly slow. Batch file ‘‘for’’ and “‘if’’ utilities make one think fond- ly of BASIC.
3. Batch files offer little or no control over the operating environment for the programs they call. The conditions you start with will be the conditions throughout. .
4. Batch files cannot call other batch files and then recover control of the program flow. Turn the corner and there’s no going back.
Homegrown C-Shells
Several weeks of frustration drove me to dig out two C library functions, ‘“‘system()’’ and ‘‘exec().’’ Though
their exact configurations may vary
RGNGEN
By Ron Miller
1157 Ellison Dr. Pensacola FL 32503
from this compiler to that, they are available in every package I’ve seen.
On MS-DOS machines they seem to
be domesticated versions of the DOS 2.0+ 4BH function call, which lets one program execute another by a sort of stack-the-pancakes effect: the subpro- gram is loaded (for-system calls, that subprogram is COMMAND.COM) in the first free memory space above the calling program. Control is then pass- ed to the subprogram, which does its thing and then returns control to the calling program. - (While retyping this column I finally opened up Micro C’s issue #31 and saw Laine Stump’s discussion thereon. Is that what they mean by parallel processing? For what it’s worth, I too think Turkey is the Land of heart’s desire. Are there still red pears at the Yalava market, Mr. Stump? How about the Doner kebab in Bursa?)
If all this reminds you of the discus- sions of resident programs you read last fall, it should. All that’s different with a DOS 4BH call is that control passes directly back to the “‘lower’’ or
system("copy c:\budget\taxes.wk c:\lotus");
system("cd \lotus"); exec("123.exe","");
system("copy c:\lotus\taxes.wk c:\budget");
system("del c:\lotus\taxes.wk");
Figure 2 - Copy Routine For Invalid Filenames
filesend(source, target ) char *source. *target; int fout, fin; char buffer[BUFSIZE];
/* set BUFSIZE as big as you'd like, for speed */
if( (foutzopen(source,0)) == -1) error(); /#or however you wish to #/
if( (finscreat(target,0) == -1) error();
/*® handle errors */
while( write(fin, buffer, read(fout, buffer, BUFSIZE)) == BUFSIZE);
sli mimi iimdeaia ceinmerseeioioeliedagiceeinitiimeereeemeemmniceeions 26 MICRO CORNUCOPIA, #32, Oct-Nov 1986
resident program after the ‘‘higher’’ program has finished, and the resident program removes itself from memory with an interrupt 20H call when it’s finished. No need to reboot the system to get rid of an unwanted patch to the operating system. Function 4BH is a shell utility, and the shell goes away when it’s no longer needed.
At the simplest level, a C-shell mere- ly offers a memory-expensive substi- tute for a batch file. For example, if you wanted to copy a file on the “C:\budget’’ directory to your Lotus directory and then call up the spread sheet (your own version 1A that can’t use subdirectories), and then transfer the file back home, you could just ' write the code shown in Figure 1.
Still, who would bother his compiler with such trivia? A sane person would use a batch file. But while you are in C you have all the power of the lan- guage. .
Suppose you wanted to keep other folks’ hands off your ‘‘taxes’’ file. If you owned Lotus 2, you could encode it with a password to keep your mother-in-law out of your records. Even without that, however, you could make your secrets hard to get to by storing them as ‘tax es.wk1’’ in the ‘‘budget’’ directory. Try typing that into a ‘‘copy’’ command.
Though no MS-DOS resident com- mand can handle the blank space in
“tax es.wk1,’’ both C and assembly language can. handle it without a blink. For the two copy routines above, let’s substitute calls to a file read and write function (see Figure 2). _ Just include a filesend(‘‘c:\bud- get\tax es.wks’’, ‘‘c:\budget\tax- es.wks’’) and a filesend(‘‘c: \lotus\ tax- es.wks’’,’‘c:\budget\tax es.wks’’) in your C program, and you're safe. Well, safe from your mother-in-law, but not from a hot-shot kid who knows DEBUG. As we used to say back in Texas, ‘‘There haint no hoss that kaint be rode, and there haint no code that kaint be busted.’’ But the casual snooper can enter ‘‘copy tax es.wks...’’ or ‘‘/fstax es’’ all day with no success.
Nor need one stop with name changes and transfers. Once launched
(continued next page)
Figure 3 - An On Screen Clock
3 Module for masm. DeSmet fans could go in-line with this. CODE — SEGMENT PUBLIC BYTE ASSUME CS:CODE ,DS:DATA PUBLIC —ourint,_putds savds DW ? ;storage for DS —puts: MOV CS:savds,DS ;storing DS in code segment RET —ourint: PUSH AX sheck=-save everything in sight PUSH BX sbut let's use. the subprogram's stack PUSH cx PUSH DX PUSH DI PUSH SI PUSH ES PUSH DS PUSH BP MOV DS, CS:savds MOV ES, CS:savds CALL _procss 3; calling C-code POP BP POP ' DS srestore everything again POP ES POP sI POP DI POP Dx POP cx POP BX POP AX
IRET sand back to subprogram VALLI a
/* the C module #/
finclude <regs.h > /* header for interrupt structures */ #define clkint Ox1c /* clock interrupt %/ #define timeaddr 0x46C /* ticks past midnight */ #define scrseg 0xb800 /* video ram segment--you could test for this &/ #define offset 3840 /* position on screen = lower left corner */ extern unsigned _code,_data; /* obvious segment addresses */ unsigned us[2],them[2], hand, index, tick, hour, minute, second; char time[]=:
® \160 \160 \160:\160 \160 \160:\160 \160 \160 \160"; /#reverse video */ long midtick; WTITTIT UT
procss() = /# interrupt handler itself: called by assembly code*/ {
-if(tick++%9) return; else tick=0; /* look every half second */ peek(0,timeaddr, &midtick,4); /* get tick count from low memory */ hoursmidtick/65543; /* 65543 ticks/hour #/
midtick %= 65543;
minute = midtick/1092;
midtick $= 1092;
second = midtick/18;
time[2]=0x30+hour/10; /* stuffing array for poking into video ram.*/ time[4]=0x30+hour% 10; ; : time[8]=0x30+minute/10;
time[10]=0x30+minute%10;
time[14]=0x30+second/10;
time[ 16 ]=0x30+second%10;
poke(serseg, offset, time, 18); /# Who needs an operating system, anyway? #/
/HHKELERRESHRSHKRERE/
main(arge,argy) /# put compound command line in quotes as argument */ int arge; char *#argv;
int ourint(); /* declaring assembly language routine */ if(arge != 2){
puts(*USE: clock \"command_line\"\n"); exit(0);.
MICRO CORNUCOPIA, #32, Oct-Nov 1986 27
C'ING CLEARLY
pene from page 20
into this C- shell business, I ee that I could alter and restore Lotus configuration files to ensure that my files were treated as I jolly well want- ed them to be, while letting my client have his own setups before and after. Memory could be altered, flags set, ports written and read, files hidden _and unhidden, screen modes changed, resident modules called and erased.
If you can do it in C — and just what CAN'T you do in C? — it can be used to control the flow and access of a larger program. Only ethics and the haunting possibility that the power may go off in the middle of your best subversion, stands between you and total mastery of your (and everyone ‘else’s) programs.
Semi-Resident C
And then there are the interrupts. By altering and restoring the interrupt table down in low memory, your shell can control the operating system in ‘which commercial software works. This is, of course, the traditional prov- ince of resident programs. If the inter- rupt vectors are redirected toward part -of a shell program, you too have patched. the operating system, albeit ‘only temporarily, if. you restore the original interrupt table when you are finished.
The old game of grab-hold-of-the- keyboard-interrupt is of course an ob- vious choice. The possibilities are de- lightful. Suppose you wanted to let somebody examine a file in a commer-
main(arge, argv) int arge; char *#argy;
int ourint(); char *malloc();
cial word processor but not alter it. A
‘bit of judicious interrupt 16H filtration,
and the ‘‘write file’’ commands are not available. And all without patching the word processor itself.
When that routine’s over, give them back their old interrupt 16H. Or seize the printer interrupt. I’ve used this trick to capture Lotus graphs in a binary file which can in turn be sent to the printer from my Kaypro (attached to my sole dot matrix printer). Anoth- er cable might have been simpler, but it was fun to see the Great Grey Lunchbox doing graphics.
To illustrate the technique, I’ll do something less mundane. I'll take over the clock interrupt and use the ticks to update an on-screen clock display ev- ery half second or so. Maybe you’d like to see a clock on the screen while running Word Perfect. Though this will require a smidgen of assembly language to save some registers, if we are careful with stack variables (i.e., avoid them like the plague) we can do
the real work in C. The whole pro-—
gram is given in Figure 3. Find a batch
_ file that can do that.
A Few Elaborations
1. It’s unnecessary to pass the clock interrupt beyond my program, because interrupt 1CH is a cul-de-sac. Things would be more complicated if I had captured the keyboard or printer inter- rupt.
2. A more elegant run of resident C code could set up a short stack in the data segment of the C module, so we wouldn’t have to declare all the varia-
unsigned topseg /* bottom of freeable memory #/
_. struct regs rr;
putds();
us[OJ=ourint; us[1]=_code; poke(0,clkint#4,us,4); topseg = rr. ax=0x3100; rr.dx=topseg + data - interrupt (0x21, érr);
1+ (unsigned)malloc(0)/0x10 ; /*get paragraph beundaiy*/ /* terminate but stay resident */
_code; /*program size, in paragraphs #
/* bye bye */
bles as statics. Unfortunately, some Cs — mine, for instance — use the DS register to address stack locations, too. It’s usually simpler to use the other guy’s stack. |
3. Since DOS is not reentrant, you're likely to freeze things up if you call a DOS or BIOS function from an interrupt. So I’m writing directly to the screen. In multitasking circles mine is what is called a ‘badly behaved program.”’ Frankly, I think lockups are even worse.
4, In some implementations, this
| program will gobble up 64K+ for one
little 7K semi-resident program. You can trim things down considerably if you’re willing to free up the extra memory with a DOS 4Ah call before the system() call. Just remember that if
-you chop off the data segment, pre-
vious stack variables — argv and argc, for example — are sent into the great beyond. There’s a reason why .COM files, which have no. stack segment, are almost always used for resident programs.
Fully Resident C But it doesn’t have to be that way. The code in Figure 3 can easily be
‘made permanently resident if the end- © ing of main() is changed just a tad.
Things are actually simpler. No need to save the old interrupt vector. Since malloc() returns the top of the static heap, I'll locate the first paragraph
‘boundary above my variables with a
fake allocation call and then terminate and stay resident.
Figure 4 shows the new version of main(). Just don’t try this if you plan to use automatic variables in your resident C code.
You can, of course, preserve the old stack segment in the code segment, leave room for a short stack, store the new stack registers... Oh well, you get the idea. Take it from me. Switching stacks isn’t much fun. I did it, but. only after some know-it-all told me that .EXE files wouldn’t work as resi- dent programs. (And if I can write resident programs in C, why not de- vice drivers in C?. I'll let you know.)
28 MICRO CORNUCOPIA, #32, Oct-Nov 1986
Nothing can improve your computer's productivity like a hard disk. HARD DISK SYSTEMS by Emerald Microware |
If you have been thinking about moving up toa hard drive, why wait any longer? We have everything you need from the host board to acomplete turn-key system. Runs on the Xerox, Kaypro, or almost ANY Z80 system.
HDS Host Board — The hardware you need to connect your computer to your hard disk controller board.
e Interfaces to the WD1002 controller board
¢ Plugs into the Z80 socket, no other wiring required
e Switch selectable I/O addressing
¢ Comes fully assembled and tested
THE WINCHESTER CONNECTION by MICROCode Consulting The most comprehensive hard disk software package that you can buy. e Works with one or two hard disks — 5 to 64 meg
¢ Menu operated install, no software to assemble
¢ Complete testing and error handling
e Warm boot from hard drive
¢ BIOS drivers install above or below CP/M, your option
e Allows custom partitioning and mixed drives types
¢ Includes manual, format, test, park, backup, and swap utilities
WD1002-05 HARD DISK CONTROLLER BOARD by Western Digital © 5 %" profile with standard power connector (+5 only required)
e 40 pin host interface
© Connects to ST506 compatible drives
© WD2797 floppy disk controller and interface on board
e Can control up to three hard drives and four 5 %” floppies
COMPLETE HARD DISK SUBSYSTEMS by Emerald Microware
e Hard disk subsystems with host, cables, software, hard drive, and cabi- nets with power supply. Fully tested and ready to go.
e Internal hard disk kits availble for Kaypro computers
© 10 and 20 meg units in stock, others by order
e Available for Kaypro, Xerox, Morrow, and others
10 Meg Hard Drive Subsystem ............ 0.0... c eee eee $745.00 20 Meg Hard Drive Subsystem ................0 eee eee $940.00 . Host board with software ......... 0... cece eee eee $ 89.00 WD1002-05 Controller Board ............. 0. cece ee eee $185.00
20 Meg Kaypro Internal kit w/KayPLUS rom ....... vee + $995.00
ACCESSORIES FOR THE KAYPRO AND THE XEROX 820
Xerox 820-2 Main Computer Board ..................-. $ 95.00 Xerox 820-2 Floppy Controller board .................4. $ 75.00 Xerox 820-2 Main board w/Floppy Controller.............. $150.00 Xerox 5 ¥%4" Drive cabinet weable.................-00-- $. 25.00 Xerox internal video cable ............ 0.02 cee eee eee $ 800 Board mount power connector.....:...... 00s eee ee eee $ 2.50 Paralle! ASCII keyboard (not standard Xerox sly Grasitans, atten $ 15.00 Dual 5 4” Disk Drives — DSDD 48 TPI, in cabinet
with standard Xerox cable........ any Ud acthausnsteteun aoits &
UNIFOIM . ooo c ec ccc ccc cecceccccuucuccecceeuuecees $ 6495 UniDOS for IBM............. Ree ean ee a: $ 64.95
We guarantee satisfaction on all of our products or your money back. Include $4.00 shipping and handling, $7.00 for COD, call for Blue Label charges. Phone hours: 8:30am to 5:00 pm weekdays; check our bulletin board — RQP/M, 5:30pm to 8:00am seven days a week, for our latest stock and prices.
EXPAND YOUR KAYPRO OR XEROX
Most versatile. Easiest to use. Finest quality. Claims are one thing, but the proof is in our products. We guarantee satisfaction.
INTRODUCING THE KayPLUS ROM PACKAGE by MICROCode Consulting
The most important element in the performance of your Kaypro computer is its monitor rom. With KayPLUS you get ail of the advantages of a Kaypro 10, even on your Kaypro 2.
¢ Install up to four floppies and two hard drives © Boots from floppy or hard disk
© 32 character keyboard buffer
e Automatic screen blanking
© 12 disk formats built in
© Full automatic disk relogging
e Internal real-time clock and ram card support
e Can use 96 TPI and 3 ¥2” disk drives
¢ Includes manual, format, configuration, diagnostics, sysgen, i and hard disk utilities
© No software assembly required
¢ Available for ’83 and ’84 series Kaypros — Specify Model
KayPLUuS ROM Set vc idxse se seed pees te aey deat ewes $ 69.95
KayPLUS ROM Set with QP/M .............. 02-0 ee eee $125.00
Need to keep better track of your files? Date stamp them with QP/M.
QP/M by MICROCode Consulting
Full CP/M 2.2 compatability with many more features. You've seen the replacements that eat up memory and need auxillary programs to run. Not QP/M. Fifteen internal commands, automatic disk relogging (no more control C), user area selection from colon, 31 user areas, drive search path, archive bit maintenance, and transparent time/date stamping, all in the same space as CP/M 2.2. Installs from a convenient customization menu, without any software to assemble.
QP/M Operating System, complete bootable copy ......... $ 80.00 QP/M without BIOS ......... 0... eee eee eee $ 60.00
Still running single density on your 820-1?
PLUS2 ROM by MICROCode Consulting X120 DOUBLE DENSITY BOARD by Emerald Microware
Clearly the most versatile double density package for the Xerox 820-1. Run up to four floppy disk drives at once, both 8” and 5 %" at the same time. Software compatable with Kaypro and Xerox 820. Supports all standard printers, and most add ons like the Ferguson Ram Board. You get mini- monitor functions, autoboot capability, 19 builtin disk formats, and bank mode operation for more space in your TPA. Lets you run 48 TPI disks on 96 track drives. Works with UniForm and QP/M.
PLUS2 ROM Set and X120 Board A&T ..............05. $ 135.00 PLUS2 ROM Set and X120 Bare Board ...........:....$ 62.00 PLUS2 ROM Setonly......... 0.0... ce cece ee eens $ 49.95 120 Bare Boardonly ........... 0... eee es $ 22.00
Other kits, parts, and packages available
EMERALD MICROWARE
PO. Box 6118
(503) 642-1860
Controlling The Real World.
With Your PC
By Bruce Eckel c/o John Fluke Mfg. Co.
P.O. Box C9090 M/S 266D Everett WA 98206
An Introduction To Microcomputer Electronics
This is for all of you who wrote: ‘I don’t understand half of what you put in Micro C’’ on your renewal forms. Bruce goes back to the beginning with this series but he'll have us doing _ some interesting projects before he’s done. .
radio club. They tried to teach us
how transistors worked by saying, “Well, you put a little current in here, and it controls the current flowing from here to there, except you have to understand these funny curves, and...’’ They lost me.
What I REALLY learned from that _ experience was that if you connected a transistor the wrong way, you could touch it and it would feel hot, but by the time it felt hot, it was already gone.
I’m now older and wiser. I under- stand the funny curves. I also think I understand what the radio club did wrong when they tried to teach me about transistors. They gave me too much all at once, and I couldn’t do anything simple with it. Instead of experimenting a little at a time, I was expected to design an entire amplifier.
|: junior high school I joined the
Switch First, Amplify Later
If the transistor had first been
presented to me as a switch, I would
have understood it. A switch is some- thing we use every day. Once I got comfortable with the idea of a transis- tor, and had used it to turn some lights or something on and off, I could have been introduced to the idea that, under certain conditions, the transistor also works as an amplifier.
In this. series of two articles, I'll show you how to hook a stepper motor up to the parallel port of your computer, and how to make it move. We'll learn how the stepper motor
works, how to use transistors as
. eight ‘‘on-off’’
switches, how to use optocouplers, and we'll talk a bit about pve supplies.
Starting Out I wanted to know about stepper motors, so I tore one out of an old
disk drive and used a nine volt battery
to make it move a step at a time, so I could figure out the pattern. Then I wondered: ‘How can I hook this up to my computer so it can do nifty things?”’
This question led to the problem of making sure that the 24 volt supply (powering the stepper motor) could not possibly damage the five volt system (computer) that was controlling the motor.
In this article, we'll solve the prob- lem of setting up a microcomputer,
which uses five volt DC power, to
control other voltages.
Next issue, I’ll finish the project by describing a stepper motor, connecting it to this month’s circuit, and program-
_ ming the computer to make it turn.
Streams Of Bits In Parallel
We'll be using the parallel port in- stead of the serial port on your com- puter because the serial port sends out a stream of bits through a single wire, while the parallel port has a wire for each bit (and then some). Since we want to control several lines (there are four on a typical stepper motor), the parallel port is a natural.
The parallel port is like a bank of eight switches, each of which can be on or off independent of the others. By writing to this port, you can change one line while leaving the others untouched, or change several lines, or all of them at once. Thus the parallel port can be used to control events in the world (we could multiplex and control more, but let’s keep it simple). .
But there’s a problem: these contol lines are always somewhere between 0
and 5 volts and can handle only a small amount of current; their value is in the information they contain and not the power they can handle. If we hook a higher voltage to them, or demand a higher current, they'll be damaged. .
We could solve this problem a num- ber of ways, but the simplest, most foolproof way.is to use optocouplers (also known as optoisolators).
Optocouplers ' From the outside, these look like ordinary integrated circuit (IC) chips; inside, they have a light-emitting diode (LED) at one end and a photo- transistor at the other. There’s no electrical connection between the LED and the photo-transistor; they're ‘‘con- nected”’ by light. | The optocoupler works like the light communication system I made when I was a boy. Each of us held a light bulb inside a foil-lined can. The light was controlled by a. telegraph key made from another can. In the dark. we could ‘‘talk’’ as far away as 1/2 mile. The only way to keep an optocou- pler from doing its job (ie., getting information across without letting the voltages across) is to exceed its ‘breakdown voltage.’’ It’s possible to have such a tremendous voltage be-
_ tween the LED side and the photo-
transistor side that current arcs from one side to the other, and everything, including the optocoupler, is de- stroyed.
Fortunately, the breakdown ssteae of optocouplers is generally in the hundreds or thousands of volts. The greater the distance between the LED and the photo-transistor, the greater the breakdown voltage. But be careful — if you’re controlling very high vol- tages, be sure the coupler was de- signed for it.
So, we have an optocoupler}: we have 5 volts on one side (from. the computer) and. 24 volts on the other
30 MICRO CORNUCOPIA, #32, Oct-Nov 1986
(for the stepper motor or whatever). How do we connect it?
LEDs Let’s start with 1/2 of the optocou- pler: the light-emitting diode (LED). The voltage across an LED is the
same all the time (about 1.4 volts since
it’s a gallium arsenide junction). So, it’s CURRENT which is important.
Any diode (an LED is really just a diode) works this way; the voltage drop across the device depends on what the junction is made of (silicon, for example, is 0.7 volts) — sometimes you'll hear people talk about ‘‘diode drops.’’ If you don’t want to burn it out, you'll need to limit the current passing through it. For the garden- variety LED, that’s about 20mA. But 10mA will work fine. (mA stands for milliampere or 1/1000 of an amp.)
To control the current when we have a fixed voltage, we insert a resistor in the circuit. We can determine the size of the resistor by using Ohm’s Law (V = I times R. The voltage across a
6 TRGKE wet Megheard frigger YATE mag Pea dete an
@ Dismay bate Graphic form
9 Stat Conte 6 1M Te pate ina Fi
1 GRO Sere BIT: 2 Sat Tal SET? NORTE
| CPamemmenur ne —
device is the current through the de- vice times the resistance of the device).
-We want to find R, so we rearrange
the equation: R = V/I. Pretend the diode isn’t important; we have 5 volts and we want 10mA, so 5V/10mA = 500 ohms.
If you’re a pragmatist, the above calculation is fine. You know they don’t make 500 ohm resistors (the closest you can get is 470 ohms) and resistors and diodes will have errors in them anyway. We’re in the ball park so we won’t hurt anything, and if it doesn’t quite work we can try differ- ent values.
In our little circuit, three variables affect the voltage — the computer, which outputs about 5 volts; the LED, which has a voltage across it of 1.4 volts; and the resistor, which must cause the rest of the drop (5 - 1.4 = 3.6 volts).
Once the LED is on, the flow of current is controlled by the resistor. So we apply Ohm’s Law again, assuming we want about 10mA, and get: R = V/
I = 3.6 volts/l0mA = 360 ohms.
But when we try to buy a 360 ohm resistor, we find they don’t make one of these either (resistors are a lot like shoes in this respect). We compro- mise, try a 470 ohm resistor, and, sure enough, it works. (The wattage rating of the resistor isn’t important here. 1/ 8, 1/4 and 1/2 watt are standard rat- ings.)
So we’ve taken the signal from the computer and made an LED turn on or off inside this little black box. What do we do with the signal at the other end — the one caused by the light hitting the base of the photo-transis- tor, causing it to turn on and off?
My first impulse was to connect the collector and emitter like two ends of a switch into the stepper motor circuit. Unfortunately, the optocoupler is good for only one job: keeping voltages apart. Its output still can’t control anything significant.
Thus, once you get the signal across,
(continued next page)
MODULAR DATA ACQUISITION SYSTEM
We Bring Engineers, Scientists And The IBM-PC Together. Our unique high-performance modular data acquisition system allows you to purchase the configuration that exactly meets your requirements. All of Qua Tech’s data acquisition products include LABSTAR, powerful software designed to give BASIC programmers total con-
trol of their application.
8 BIT A/D SYSTEM
QUA TECH, INC.
478 E. Exchange St. Akron, OH 44304
12 BIT A/D SYSTEM
CALL NOW (216) 434-3154
MICRO CORNUCOPIA, #32, Oct-Nov 1986 31
CONTROLLING THE REAL WORLD
(continued from page 31)
you still have the problem of passing enough current to move the stepper, close your relay, activate the solenoid, light the lamp, or whatever. The opto- coupler won't handle enough current to do what we want, and even if it did, the light hitting it from the LED isn’t enough to turn it on all the way. Here’s why:
A Little About Transistors
The transistor can be used two ways: as a switch, or as an amplifier.
We're using it as a switch, so we must turn it on all the way (Wham!) or turn it off all the way (Slam!). In between Wham and Slam is the “‘lin- ear region’”’ (or, as I came to know it, the ‘‘region of funny curves’’). This is where we use it as an amplifier. If you’re trying to use it as a switch and get caught in this region, it doesn’t ' work very well because it isn’t turned on all the way.
So we need to take this signal, which is ‘‘Really Off’’ and ‘“‘Sort of _ On” and turn it into ‘Really Off’’ and “‘Really On.’’ Fortunately, there’s a device designed for this (the Darling- ton transistor) which comes in its own package with a heat sink.
A Darlington transistor (or Darling- ton pair) is actually two transistors hooked up one right after the other to look like one transistor which requires only a very little signal (like the output
of an optocoupler) to turn itself all the —
way on or off (see Figure 1). . The first transistor is good at turning on, while the second is good at pass- ing lots of current (but not as good at turning on), so together they make one transistor which is good at turning on and good at passing current. Per- fect for what we want. The signal comes out one of the lines of our computer’s parallel port through a resistor to control the cur-
rent and through an LED, which is’
one-half of the optocoupler. The signal turns into light (for a one), or no light (for a zero), travels through the opto- coupler, strikes the base of the photo- transistor, and turns it on.
The photo-transistor drives the base of the Darlington pair, and Voila! We've isolated the computer from the 24 volt system it’s going to control.
(Actually, by selecting the right Dar- lington and optocoupler you could control much higher voltages.) The collector and emitter of the Darlington
are like the two wires of a switch.
The Circuit
Let’s walk through the circuit I built (see Figure 2). We’ll put some LEDs on the outputs and use the computer
to turn them on and off, and that will
be the end of this article. If you simply must hook a stepper motor into your circuit before next issue, make sure you put some diodes in the circuit to prevent the stepper coil inductance from punching holes in the Darling- tons. I'll explain that completely in the next article, but I thought I’d warn you. cee
A circuit diagram doesn’t show ev- erything. For example, it doesn’t show
how to get the signals from your
computer to the circuit, and what the circuit is built on. .
'. To get the signals from your com-
puter to the circuit, you have to find a connector that mates to your comput- er’s Centronics port. I found this no easy task, because some people don’t know what a “standard, usual kind of Centronics connector’ is, and other people don’t know what a ‘’36-line micro-ribbon connector”’ is (they’re the same thing).
And, just to be different, a lot of IBM parallel connectors are the ‘“DB”’ types, but not DB-25s (25-pin connec- tors) like the RS-232C connectors. In-
32 MICRO CORNUCOPIA, #32, Oct-Nov 1986
stead, they're DB-36s. Fortunately, the
Radio Shack deities generally smile upon connector problems for comput- ers, and you can find them there. (Editor’s note: Most of the clones are now using female DB-25s as parallel connectors. All you need is the male DB-25 and a guide to which PIO output lines are connected to which
_DB-25 pins, although a simple voltme-
ter will tell you pretty quickly which lines are active.)
Can You Slice Bread Around Here? Once you get the connector and solder the wires on all the pins of the connector, and then figure out what the wires mean (more about that in a minute), what do you do with them? Well, the early pioneers would (al-
- legedly) go down into the kitchen and
steal one of Mom’s breadboards, stick little nails, wires, and blobs of solder on the board, and try out their experi- ments (thus the term ‘“‘breadboard- ing’’). (Also the term ‘‘disinherit- ance.”’ a te
Mothers were no doubt responsible for the development of these neat chunks of plastic with lots of little holes in them that you can push wires into. They’re still called breadboards, of course.
Breadboards now come in strips about two inches wide and eight
inches long. Don’t be fooled by the
people who want to sell you a bunch of these strips glued down on a metal board for a lot of money. They’re the
a a aE TA RE EY I I TI A a TO OE
same strips; buy your own and glue them on a board.
Also don’t get fooled by the expen- sive boxes filled with carefully stripped wire of all sizes, lengths, and colors. Those are only for professionals; defi- nitely out of our league. Buy your own wire and strip it yourself, but make sure it’s solid wire, not stranded — ask the salesman or look at the profes- sional box of wire for the gauge (thick- ness of the wire — a bigger number means a smaller wire).
With a breadboard you can try out circuits without soldering. Just figure
out which holes are connected to.
which other holes, push the wires into the holes, and presto! — you’re an electrical engineer! (Perhaps you should memorize a few equations in case there’s a test.)
If parts don’t work, or you hook it up wrong, you don’t have to desolder or snip or anything — just pull stuff out of one hole and push it into another. This way you can very quick- ly try out ideas. (A lot like FORTH.) Only after the design works do you get out the soldering iron, or printed- circuit etching kit.
Centronics Port Wires
Usually, you can find the numbering of the wires on one of the connectors, but it’s printed small and is easy to miss. The Centronics port wires 2-9 represent bits 0-8. The rest of the lines are either grounds or handshaking lines. You want at. least one ground,
but we'll ignore the handshaking lines.
If your connector has a different configuration, you'll have to look up its pin configuration in one of your manuals, or figure it out by tracing the wires with an ohmmeter or continuity tester. Your printer manual will have the wiring of its connector.
About Power Supplies
One more problem: we have effec- tively isolated our computer from the part we’re controlling. So effectively, in fact, that we left all the power on the computer side! We need some power on the ‘outside’ too.
We can solve the problem with batteries or a power supply. Batteries are okay, but you can get frustrated when they run down in the middle of the night. It’s nice to have a power supply.
I found a good switching power supply with several different voltages for around $30. Astec makes it, and you can get it by mail from several outlets. I got mine from American Design Components, 62 Joseph St., Moonachie, NJ 07074. JOR Microdev- ices, a reliable mail-order firm, also carries them. (Note: stepper motors taken from 5 1/4” drives run on 12V rather than 24V. There are many more supplies to choose from if you don’t need 24V.)
This power supply doesn’t come in a metal box — you just look at its guts. For decency’s sake I recommend you
put it in a box. (There’s 110V AC on the input side of that little beastie — not a good thing for fingers, little or
big.)
So Now You Have A Lab
Almost. You have a power supply, a breadboard, and a connection to your computer so you can quickly generate digital control signals with software (this is really nice, since otherwise, you might spend a lot of time making circuits to do the same thing). But you still need a meter.
I work for Fluke, so recommending a meter from them probably sounds like hype. But I use the meters, and have talked to people who have designed them, and have seen what else is out there. In addition, customer service is very good about fixing/replacing bro- ken meters. I recommend one of the LCD ‘’70-series’’ meters, which you can get for around $100. If you’re not ready to spend that much, get an inexpensive one at Radio Shack. They aren’t as nice and won’t last as long, but I got a lot of use out of them as a boy.
Back To The Circuit
I connected an LED and resistor to the emitter of the Darlington transistor (the emitter always has the arrow on it, and the arrow points in the direc- tion of ‘‘conventional’’ current flow; i.e., flow of positive charge, or holes). (Again see Figure 1.)
(continued next page)
CONTROLLING THE REAL WORLD
(continued from page 33)
The trons, are going the other way. This is
an NPN transistor. I remember it by ©
saying ‘‘No PiNpoint’’ — the pin isn’t pointing at the flat spot of the transis- ~ tor. When it is, that’s a ‘“PiNPoint’’ — PNP.
For now, this LED and resistor will ©
be our output circuit. Next issue, we'll
replace it with one of the stepper motor coils and a diode (there'll be three other circuits for the other three coils). The resistor is there, as before, - to prevent too much current from going through the. LED (these LEDs have no self-control).
The collector is connected to the source voltage, which will be 24 volts next issue (or whatever your stepper ‘needs), but can be anything now.
When the Darlington is off, no vol-
“tage appears on its emitter pin. When -
it’s on, it has a voltage drop between its collector and emitter of about .2 volts. So the voltage appearing on the emitter is 24 - .2 = 23.8 (24 volts if _ you're a pragmatist).
We need to choose a resistor which will keep the current. down to about 10mA and not fry our LED. (The magic words ‘‘volts,’’ ‘‘current,’’ and “‘resistor’’ mean bring out Ohm’s
- Law! — 24V/10mA = 2400 ohms, or
2.4K ohms.) Yes, you guessed it — there isn’t a 2.4K ohm resistor! (Unless you want
to pay more, and go from the El -
_ Cheapo 10 percent tolerance to the more expensive 5 percent tolerance.) We need to go up a little, to 2.7K, or down a little, to 2.2K. It doesn’t really matter, but let’s go down.
And that’s the circuit (you'll proba-
bly want to duplicate it for each of the eight parallel port lines). All that’s left _ is to turn the LEDs on and off. »
Are We Having Software Yet?
You probably thought you could just PIP a file to the parallel port and watch the LEDs flash, right? Well, so did I. But it doesn’t work that way. “Some LEDs will turn on and the -whole thing just sits there. _ The port is waiting for a handshake
(remember, this is a business ma-_
chine). When you send something through the operating system, it uses
“‘real’’ charge carriers, the elec-
10 * Random output at random intervals
20 K$ = "*" : WHILE K$ = "* ; K$ =
INKEY$ :'Press any key to quit:
30 OUT &H19, INT(255 ® RND) :*Send out a random Number between 0-255
4O FOR I = 1 TO INT(300 # RND) 50 WEND
NEXT ;:'*Wait a random period
' Bouncing up and down; delays adjusted to look like a
— yveal bouncing ball.
K$ = "";WHILE K$="" :K$ = FOR I= 0 T07 FOR J = 1 TO 115 +5 FOR I FOR J WEND
1 TO I#15 +53: NEXT :
a device driver, a little piece of soft- ware which knows how to work the buffer and knows exactly where the parallel port is (not just a device name, like PRN:, but the location in the memory or the input/output address). It takes a byte out of the bag, sticks it in the port (our LEDs just came on) and waits. Waits for what? Waits for the special ‘‘handshake’’ line to go high and low which tells the computer that it got that first byte. and it’s ready for another. The MS-DOS device driv-
er is watching that line, so as long as ©
we go through the device driver, we either learn to be courteous or we wait.
The solution is to go AROUND the device driver, by addressing the port directly. Here’s where you get to do detective work.
I have a Kaypro 2X, and I know where its parallel port lives (19 hex). For XTs and other clones the common parallel port addresses are 3BC hex and 378 hex.
Look first in your computer man- uals; find the most technical looking
- part with lots of tables, strange words,
and numbers, and look for the port
location. Call someone who has a... computer like yours. Call the dealer. _
Call the manufacturer. Persist.
Once you have the port address, use
the command in your programming language which will put a byte directly to a port (assuming your ports aren’t
memory-mapped, in which case you _
would simply stick things in that
34. MICRO CORNUCOPIA, #32, Oct-Nov 1986
INKEY$ : OUT &H19, 2°I : NEXT ; 7 TO 0 STEP -1 : OUT &H19, 2°I:"Bounce back down
:*Selects I-th bit NEXT
NEXT
~ memory location). ’* -T’ll use BASIC and the OUT PORT
and BYTE commands in my examples. (See Figure 3.) In Turbo Pascal, you’d use the ‘“’port array’’ like this: Port[PORT] := BYTE;
You may need to tweak the timing constants on these examples, since your machine may run faster or slower
than mine.
Now Do Something
You now have switches to the out- side world anda programming exam- ple. You can use these switches to drive relays to handle more current and bigger voltages.
Next issue, we’ll see how a stepper motor works and how to. hook it into our system and program it. |
Don
- 800/1600 BPI ASCII/EBCDIC %'"~9 Track Data Transfer to Microcomputer Magnetic Media’
* PC DOS Diskettes Raw Data Dump to one Diskette Batch Service Setup Fee: ‘ Each Diskette: e Alternative Media 8” or 5%” Diskette, Hard Disk or Cassette Tape: Inquire | Informational Brochure Available
MICRO LOGIC SYSTEMS , 207 Kent Avenue 41, Kentfield, CA 94904 -(415) 461-8077
$ 5Q09
KAYPRO EQUIPMENT
9’’ Amber CRT .............. $39.00 9’’ Green Monitor ............. 35.00 12’’ Green Monitor ............ 45.00 81 Series ROM’s........ ip actos 7.00 Keyboard (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 PRO8-3 Mod. ......... 239.00
This one runs at 2,4 & 5 MHz, up to 4 drives SS, DS, or Quad drives. New ROM has screen dump and step speed select. With manual & software, tested and guaranteed 30 days.
K2 PRO8-3 Mod. EXCHANGE ...149.00 We will update your K2 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
WD1002-5 Hard Disk Controller . 200.00
Host Interface Board ......... .. 15.00 CABINETS
Bottom portion with front and back only. CRY B@Zel <2. sacred G05 mane tly 12.00 : MISC. CABLES 9’’ 50 Pin - 50 Pin Header ..... $2.50 14°’ 40 Pin- 40 Pin Header ...... 2.29 9°’ Hard Disk - 20 Pin Header... .2.00 14’ Dual Inline 16 Pin Male (2) ...2.00
FLOPPY DISK DRIVES
— 3 HEIGHT — Okidata DSDD ............... $99.00 Supplied w/sub-panel to make ¥% ht. — %2 HEIGHT —
Mitsubishi M4851 DSDD 40 Tr .$139.00 Mitsubishi M4853 DSDD 80 Tr . . 139.00 Qume Trak 1425%4"’ DSDD ..... 99.00 Tandon TM 848-1 8’’ SSDD .... 149.00 Shugart 475 DS Quad 1.2Mb ...159.00
Sweda Cash Registers Models 303, 2640 & 2650
arom ere?
8280 CLAIREMONT MESA BLVD., SUITE 117° (619) 569-1864
SAN DIEGO, CA 92111 HOURS: Mon..- Fri.9-6 — Sat. 10 -4 MINIMUM ORDER — $15.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. For more info please call — DON’T WRITE! We don’t have time to answer your letters.
ERAC CO.
From major supermarket . . .$99 ea.
Mainboard, 8 Slot, Case, Power Supply............ $225 To make this a complete system, add A) Memory 8B) Floppy Controller C) Drive D) Keyboard E&) Video Card F) Video Monitor G) Multifunction Card
A) MEMORY 200K “ISO NS: cette ees $25 DIZK TOONS = caaeisaw sv ass 50 640K: 150 NS oc cane4 yada 68 B) FLOPPY DISK CONTROLLER Card for 2 Floppy Drives ....... $36 Card for 4 Floppy Drives ....... 42
C) 5%4’’ FLOPPY DISK DRIVES MIUSIABS 1.2 cstcd ons eet,
D) KEYBOARDS Cherry Keyboard (no case) ..... $38
AT Style Keyboard............ 69 E) VIDEO CARDS Tomcat with Parallel and Lightpen Port.............. $53 Hercules compatible Video Board 75
Color Graphics Adapter........ 69 Enhanced Graphics Adapter
F) VIDEO MONITORS Roland MB-122G, 12’’ (no case) $39 Samsung MD-1254G, 12°’ Green 72 Samsung MD-1254G, 12’’ Amber 78 Goldstar MBM-2015, 12°’ Amber 106 Mitsi AT-1332A 13°’ RGB TTL ..295 Goldstar MCH-4015 13”' RGB 30 MHz.............. 420 NEC Multisync 30 MHz SO0*560°EGA: inant bea 935 G) MULTI FUNCTION CARD
Parallel & Serial Port, Game Port Floppy Controller, Clock & Cal. $96
CPU/SUPPORT MC68000-8 CPU.............. $9.99 GB0TGG=S 3 sc eie neque os ae 27.00 CO018626 2h coesog tog ees eon 9.00 280 CPU! 3 Ges erage nite Beeo cules 1.00 Z80A CPU ..... oS iti a tak nee 2.90 5014/29) (0 pene a era rer iS hiew OU Z80A SIO...... NN oda piats Oe See 9.00
PRINTERS Centronics 703 ............. $395.00 Centronics 588- Asis ........ 125.00
NEC2000 w/Single Sheet Feed . .999.00
8280 Clairemont Mesa Blvd., Suite 117 San Diego, California 92111 (61 9) 969-1864 Call for our Test Equipment Mailer!
IBM/PC COMPATIBLES
SYSTEM EXAMPLE #1 For the Hacker (Cheap)
Mainboard, Case, Power Supply ..$225 256K Memory 150NS......... 25
Floppy Controller (2 Drives) ...... 36 Floppy Drive Ye Ht DSDD...... 99 Keyboard Cherry (no case) ..... 38 Video Board with Parallel and
LIGHIDEN PON a cacu seeded p ees 53 Roland MB-122G, 12’’ Green
Monitor (no case) ............ 39
SYSTEM EXAMPLE #2 FCC Approved (Not Cheap)
Mainboard, Case, Power Supply . .$225
640K Memory 150NS......... 68 Multi !/0, Parallel, Serial, Floppy, Clock/Cal. ........... 96
2 DSDD Floppy Drives (minimum) . 198 Enhanced Graphic Adapter (EGA). . 275 NEC Multisync Color Monitor
CINE BOS Dee cane Bears oe Meena 535 AT Style Keyboard ............. 69
Oh, you wanted a turbo board .... 20 and a 20M Hard Drive & Controller. 410 Now how much would you pay?
JUST $1896
HARD DISK DRIVES 10M Rodin RO-252............. $230 ON GT-2 12s. cc nadeteoeseens: 185 20M ST-225 oo... eee ee ee 385 19M ST-419 00a, 230
20M Half Height with Controller... 410 32M Half Height with Controller... 667 60M with Controller ............ 1150 70M Vertex V170 .............. 725
WD-1027 with Cable............ $156 Omni-5510 .......... la SoG aia 150 Adaptec 2770A
(Get 15M on 10M Drive) .......
POWER SUPPLIES Elgar 400W Unint. Power Sup. .$375.00 +5V/1A, —5V/.2A, +12V/1A,
—12V/.2A, —24V/.05A ....... 15.00 H2AV/ 2.2K sn sie ted cae de day BOD
_ SWITCHERS
5V/9.5A, 12V/3.8A, —12V/.8A $39.00 DV/3A, 12V/2A, —12V/.4A..... 29.00
OV/75A, +12V/8A, +12V/8A . 55.00
DV COR Rass Sa eared oe bad 35.00 _ MISCELLANEOUS Headset/Boom Microphone...... $3.95 Nicad Pack 12V/.5AH ........... 6.50 5 Blade Muffin Fans ............ 7.50
Joystick 4 Switches 1°’ Knob..... 5.50
MICRO CORNUCOPIA, #32, Oct-Nov 1986 35 .
RFI/EMI Protection. For Your Computer
- . There are lots of ways that comput- ers can be noisy. In this case, Rex isn’t talking about fans or hard drives — he’s talking about turning on the system and destroying Cheers. Sti- fling electrical radiation is a popular black art right now because the FCC is cracking down on manufacturers whose products radiate noise. Here are some quick and cheap ideas that just _ might make your system less prone to disconnection during prime time.
sors suggested ways to eliminate
some of the radio frequency inter- ference (RFI) and electromagnetic in- terference (EMI) between my computer and other electronic devices in the neighborhood.
The tips aren’t guaranteed to make everything quiet, but like chicken soup, they can’t hurt. These practices apparently aren’t well known — I found about half my equipment wired incorrectly.
| n.a recent class, one of my profes-
Some Theory
‘Just look inside your computer, ter- minal, printer, etc. There’s a clock circuit in the system that puts a square
wave pulse onto the clock line (a
copper trace).
A true square wave is “about the noisiest kind of wave known: those nearly vertical rising and falling edges are combinations of odd harmonics. A IMHz square wave for instance, would contain 1, 3, 5, 7, 9, 11, 13, 15... MHz components. If the rise time for that IMHz signal is 10ns, then the highest component would be at least 100MHz.
(Editor’s note: The clock trace is only one of many lines.that carry signals. One of my systems generates a hashy noise right on top of my favorite FM
- station. If I select a blinking cursor,
the noise blinks on and off with me cursor.)
Tacking a terminating resistor onto a signal line sometimes reduces its radia-
tion a bit. Four-layer circuit boards
usually radiate less than two-layer boards, but the most common means of limiting interference is to enclose the board in a metal box. Unfortunate- ly, the power leads usually compro- mise the box. The biggest culprit is the ground wire in the power cable.
If your equipment is wired like Fig- |
ure 1, the ground wire acts as an antenna. It receives all those RF noises running around inside the box and transmits them outside. (Take a porta-
By Rex Buddenberg
3425 Elmwood Dr. Alexandria VA 22303
ble FM radio and pass it around the cord. What do you hear?)
Reverse Engineering?
Since the ground wire acts as a receiving antenna as well as a trans- mitting one, the reverse situation is also possible — external equipment can dump noise into your computer.
By rewiring the ground wire as in Figure 2, you preserve the electrical grounding characteristics (this is im- portant to avoid smoke-tested hacker), but you interrupt the RF circuit. In other words, you're keeping the ‘‘in- nies’’ in and the ‘‘outies”’ out.
Make sure you use husky bolts on this job (3/8’’), and don’t try it on a plastic case!
If you have a socketed power lead, see Figures 3 and 4.
The same principles apply. Don’t use the ground tab supplied on the EMI filter or appliance socket; instead, take the inside ground to the socket mounting screws. Make sure the.sock- et is mounted from the ‘outside in’”’ and that it makes clean electrical con- tact with the cabinet wall.
One More Thing You can also quiet things down by adding a strong external bond from
Suc
Srna aon
TOOLS FOR
The MasterFORTH pro- gramming system gets your application running in the least amount of time. How? With a built-in user interface. With an interactive de- bugger. With ares- ident assembler-linkage is instantaneous.
MasterFORTH's target application generation system (TAGS) can produce a ROM-able image in seconds. Its unique symbol table identifies seldorm-used code so you can pack the most power in the least amount of memory.
Choose your development system. We support the IBM PC family, Apple’s Macintosh, CP/M systems and others. Need to program a controller from your IBM PC? No prob- lem. We have cross-development sources for most popular microprocessors. You can even generate a MasterFORTH system for yourtarget application, addaterminalandrunit there. Forth is widely used in industry and aerospace for robotics and machine control.
Call or write us for details. MICROMOTION
8726 S. Sepulveda BI., #A174. (213) 821-4340 Los sia iv CA 90045 ;
your equipment cabinet to a solid ground such as a water pipe.
And An Afterthought
While you’re inside the cabinet and monkeying around with the wiring, install three metal oxide varistors (MOVs): across the power leads as shown below. (These little guys con- duct whenever the voltage across their leads exceeds their rating — usually 130V.)
BLACK -HOT
WHITE-NEUTRAL
GREEN OR BARE- GROUND
My batch of MOVs = say “"V130LA20A’’ (130 volt, 20 amp). 10A sizes are adequate for most computers and environments. The MOVs should - be around $1 each and are available at most parts houses (including many Radio Shacks).
PROGRAMMER /4+
Reads and programs 2716 through Power electronically switched. Can’t 27128 including CMOS types. damage EPROMS.
Reads 2-16K ROMS
Menu-driven, user-friendly. Software on Disk including source code.
Manual includes full schematic. ©
Direct connect to any RS232 terminal or computer.
Save/Program to and from disk files.
Not a kit, completely built and tested.
48 hour burn-in and test <.05% field failures over the last three years.
QpPE riopfco Programmer/4+ with manual and
one disk $169.95 1659 Scott Bivd., #1 Additional disk format add $15.00
ance = Visa and MasterCard, Telephone orders welcome.
Please specify disk format, i.e., CP/M, MS-DOS & computer type. California residents add 6% sales tax.
The SOG Report: Exciting New Systems
It was Saturday evening. I had just _ finished dinner when I glanced up at my companions, all 256 of them (the - fire marshall’s limit). They had the faces of marathoners — deep lines, sunken eyes, heads propped on hands. ‘But they and I shared the exhilaration of a task well chosen and well done. We had run another SOG.
OG V included: 29 formal talks,
a half dozen informal sessions,
recreation (rafting, horseback riding, chair lifts to a mountain top), babysitting, meals, and products from all over the world. But that was the normal part, the easy part. The mara- thon began after supper and continued into the wee hours, sometimes until breakfast (7 a.m.).
Reminiscing: At the first SOG we’d had none of the formal talks, displays, babysitting,
_or recreation, yet the SOG I faces had. shown the same excitement, the same
feeling of being somewhere special, of helping create something that might someday make a difference to a lot of people.
At SOG I the common interest was the Big Board I, the first compact, low
power, single-board Z80 system on the
market.
It was cheap ($650 for an empty board and a bag of parts), and it was small enough to fit on the side of a disk drive (OK, OK, so it was an 8” drive). It supported the most popular operating system, CP/M.
At SOGs II, Ill, and IV, the scope
expanded to include Big Board II,.
By David Thompson
Xerox 820, and Kaypro, all Z80, CP/M machines. Then came Slicer, Defini- con, and finally the clones.
This year, we cussed and discussed nearly every processor from the 4004 to the Transputer. (George Morrow had the audacity to suggest that the 8008 was the first real processor, so we discussed the 4004.) We talked lan- guages and operating systems, a Unix.
Most of the informal discussions this year centered around ways of building up systems around the latest, greatest technology (and where to find operat- ing system support). ;
It’s curious that we were having those same discussions at SOG I. .
Many of the Big Board folks have since built clones, but they complain that the feeling isn’t the same. Fifteen
1986
Ochoco
Jack Dennon
The-V20, V30 &
Hall Room 104 CP/M Emulation
aes cui Taine Stump International
De ve ak Computing
~ G Pence David Thompson vs) Hall An Inside Look pS N Room 28 At Micra C ~ — - eid Ochoco Don Latham George Watts ee Hall Goat Oriented Pitfalts of Small ee) Room 231 ‘Program Building Business Ventures
Larry Fogg Jatro to Turbo Pascal: Novice Programming
32-Bit UNIX On A Shoestring
Ease Instruction Set CPUs
Dave Rand
in The Public Domain
Andy Bakkers The Transputer: Life After : The Microprocessor (New Life for 250s) ea P|
This is the SOG that was. We hope to see you next year.
SOG SPEAKERS SCHEDULE cena! Oregon Community College - Bend oregon Se TE a a Teo
esi ini Michael Frieling Developing Tools parry ie For Expert Systems Trevor Marshall Designer's View Of The 68020 Joseph Bartel 68000 Multi-User System: Alternative To LAN
George Scolaro
Dean Klein The V Series &
In Pence 28:
The 80386: Dual "SOFTWARE FOR UM
Dave Rand Earl Hinrichs
Michael Frieling George Scolaro
In the Pinckney Center:
Allyn Franklin’s Drive Workshop McTek PC Workshop
Jim Tanaka
Artificial Intelligence & Human Cognition
In the Pinckney Center:
In Pence 28:
Don Fletcher intro To 8088 : Assembly Language Room 104 Programming Pence Doug Anderson Peter Casey Hall Poor Man's Unique Features Room 28 Networking ofc
| George meee HARDWARE FORUM
Don Fletcher _ Dean Klein
Chris Jones :
CAD (and more} On The 68020
Joseph Bartel
New Directions In Trevor Marshall
Computing = Dente John Kirk John Kirk ~ |
Math & Graphics Reon 231 For Geometric Models Languages
QOchoco Chris Brock Hall Hardware & Software Roo Considerations For m 5 A Multl-User System
38 MICRO CORNUCOPIA, #32, Oct-Nov 1986
Source Code Translation Between
In the Pinckney Center: Allyn Franklin’s Drive Workshop McTek PC Workshop
Sigi Kluger
Programming The 68020
minutes worth of plugging boards to- gether is different than gluing chips on a board. Also, MS-DOS supports serial and parallel interfaces, and so many utilities come with it that there’s a lot less reason to hack. (See Don Fletch- er’s MS-DOS driver article in this issue if you’re still interested in hack-
ing.)
PD32
Thanks to SOG, we’ve got two spectacular projects coming up for you. The first, the Public Domain Project — 32000 (PD32), is in this issue.
The PD32 is a 32016 system designed by Dave Rand and George Scolaro. They came up with the system after National started selling a 32016 starter kit for a paltry $69 (6MHz). The kit includes the processor, memory man- agement unit, clock, floating point processor (the same one Definicon is using), and an interrupt handler. But that’s just the beginning. They also include a pair of monitor ROMs, serial transfer software, books, instructions, etc., etc., etc.
Kits are available from any parts house that handles National. Jameco Electronics is selling the 32016 Design- er Kit for $59.95 (no doubt the 6MHz chips). The 10 Meg parts should be about $120 a set (but the 6MHz parts will often run 8 or 9MHz).
Jameco Electronics 1355 Shoreway Rd Belmont CA 94002 (415) 592-8097
The PD32 is a public domain system because Dave and George are releas- ing the board, artwork, circuit design, and software drivers to the public.
It’s also public domain because a number of SOG attendees got together to form a users group to promote the system and produce hard-to-get items. The group will be making boards,
When the artwork
i,
‘a
burning PALs and ROMs, and making them available at cost. Micro C will be the information center.
Dan Efron volunteered to head the distribution of boards and parts for the system (while attending college). You can contact him via his parents’ ad- dress (he says it'll be a day delay at best).
Dan Efron
8910 Westmoreland Lane Minneapolis MN 55426
(503) 382-7643 (Micro C RBBS)
Dan says he will be a regular partici-
Bn gs ae
AY Z| a
pant on the Micro C bulletin board so °
you can reach him that way. Be sure to check out the PD32 area on ane board.
I talked to Dan three weeks see SOG and he told me that Ken Berry will be helping in the project. Ken will be putting together kits of peripheral parts (including RAM sticks). Dan says he’s getting some very good quotes from board houses.
Meanwhile, George Scolaro said he
was expecting to get the test run of -
boards back from the prototype shop by early September. If there weren’t too many cuts and jumpers, he’s prob- ably already shipped those boards to the dozen folks who were on the list. is finalized, George’ll be sending it along to Dan so the production run can get started. They’re hoping to have shippable
boards and kits a short time after you ©
read this.
Host System The PD32 will take some ideas from
the Definicon board. All I/O will come |
and go through a host system.
‘‘Aha!’’ you say. ‘‘Another PC leach.’’
Well, yes and no. Yes, it will plug quite happily into a clone. However, it will also run on a Z80 CP/M machine. They’ve written software interfaces (in
y p
BY toad R iy
“if, My ply et/= Ay
te
VERA RYE ‘
LTD en G7 % " My Ly a Ly rs «a C) for bak types of machines.
Plus, there is full Unix Version V for the system at only $500. (Only $500 for an operating system?! Has this guy
pg
‘been hanging out with Digital Re-
search?)
However, the price includes compi- lers, editors, 31 disks worth of utilities — and all multi-user. You could put together a complete Unix system with | 2 Meg of RAM for under $1,000, including the operating system. (You'll need at least 10 Meg of winnie on. the base system to run Unix properly.)
Even considering the cost of the host system, this has to be the cheapest way known to man or hacker to get into a full-blown, multi-user Unix sys- tem. .
On The Other Hand
Maybe you don’t want a full-blown Unix system and just maybe you don’t have a winnie on your Z80 system. (Unix alone requires 10 Meg.)
“Aha, I’ve finally got you,’ you say. ‘‘This won’t plug into my stock Big Board and single handedly support all the programmers on Michigan’s upper peninsula. I’ve got to add a winnie.”’
Neil Koozer attended SOG V and also got excited about the PD32. He’s been working with National chips for some time now. He dropped me a letter a couple of weeks after SOG:
‘‘When I started coding for the 32000
‘I thought I had died and gone to
heaven. If you do assembly coding for an 8-bit machine or for one of those
. segmented things, you know that you
spend most of your energy working around obstacles. It took me five days to write a disassembler for the 32000. “IT have no interest in Unix or in a hard disk; all I want is an assembler and enough of an operating system to run the assembler. (So he has a basic
foundation to build on.)
(continued next page)
MICRO CORNUCOPIA, #32, Oct-Nov 1986
39
THE SOG REPORT —
- (continued from page 39)
“In the interest of promoting a 32000 users group, I will be donating all the 32000 stuff that I write. I’m in the middle of. writing a high/low level language and a debug monitor.’
Neil Koozer
Kellogg Star Route, Box 125 Oakland OR 97462 | (503) 459-3709
Allyn Franklin teaches disk drive alignment and re- pair to a sitting room only crowd. In the background, vendors display their wares. A PC workshop and a hard- ware forum were running concurrently with this work- shop.
68000
The 68000 system which follows is a different kind of project. It isn’t as close to reality as the 32000 board because it saw first light at the SOG, but it has lots of potential.
This is the generic 68000 system, and its claim to fame is that Hawthorne Technology will be providing a com- plete, single-user operating system for $50 per copy.
(There’s also a second 68000 sicject that’s. in the ‘waiting for more infor- mation”’ stage, but we’ll deal with that as Andy Bakkers gets more details from Germany.)
The Generic 68000
Motorola fans also showed up in force at SOG V, and, as usual, discus- sions centered on the lack of a cheap, standard operating system for the pro-
‘cessor. Sure, there are proprietary sys-
tems for the Macintosh, Amiga, and ST. There are also expensive ones like CP/M 68K and OS-9.
In fact, there isn’t much incentive to design new 68000 hardware because the operating systems are so expen-
sive. Just the operating system, two
compilers, and a few utilities total over $1,000 in OS-9/68000. And that’s what each user pays. System designers also have to fork over significant sheckles to get the source of the BIOS.
Well, at the SOG we discussed the 68000’s operating system problem, cussed it, and then changed it. Maybe permanently.
Joe Bartel of Hawthorne Technology offered to sell a single user version of his operating system for $50 per copy. It would include source, have built -in hooks so you could add drivers for nearly anything, an assembler, and a simple mid-level language of his own design. (It’s best described as FORTH with added IF/THEN/ELSE type struc- tures.) The operating system a MS-DOS disk formats.
If that project comes together in time (hardware, software, assembler...) we'll have a full-blown 68000 issue around the first (or second) of the year. I’m guessing it’ll happen.
Guide demonstrates spe- cialized equipment (paddle) as rafters prepare to drift off on the annual Tour de Splashe. The placid Des- chutes takes a dive about half a mile downstream.
40 MICRO CORNUCOPIA, #32, Oct-Nov 1986
Of course, one of the projects would be porting the operating system over to a number of 68000 computers. Any- one already running a 68000 or think- ing of designing a new hardware package (hooray, hooray) should talk to Joe.
Joe Bartel
8836 SE Stark Portland OR 97216 (503) 254-2005
Joe mentioned a number of options for the hardware:
1. Plug-in board for the PC
2. 4 Meg 68000 replacement board for the Kaypro
3. Same size board as the mother- board in an XT, so it could use cheap cabinets, power supplies, etc.
Joe also noted that there’s a Pascal compiler in the PC-SIG library, written in Pascal, and he’s writing a database handler.
Educational 68000
In his talk this year, George Morrow mentioned that there’s still that great divide — hardware folks do hardware, software folks do software — and it’s the in between places where low level software and hardware meet that most folks don’t understand.
How do you create a system from scratch, from just a pile of parts connected together? Where does the system monitor come from? Who cre- ates the first assembler? What does the assembler run on if there’s no operat- ing system, and how do you write an operating system without an assem- bler?
Of course, if you just want to build the hardware and purchase an operat- ing system complete with basic (not BASIC) tools rather than tangle with a Chinese computer puzzle, you'll be able to do that too.
Andy Bakkers came by the office before heading back to Holland. He suggested that folks start at absolute zero with the 68000. What he meant was that the user should build the system (wirewrap or PC board), create a simple monitor, and then bootstrap the system.
Bootstrapping would mean creating
C SOURCE CODE
XLT MACRO PROCESSOR . ee
XLT can be used as a preprocessor, text translator, or simple cross-assembler, . depending on your macro definitions. Comes with manual, C source and macro
files.
Q/C 4. 0 CP/M C COMPILER w/source .
ONLY 95.00
Save $70.00. Fast, full featured compiler from the Code Works includes nes
single- -precision floats, excellent manual.
QC88 C COMPILER FOR PC’s w/source ONLY 125.00 Save $70.00. As above but no floats or longs. Runs on PC clones.
Runs on PC, generates code fit to run on Z80 CP/M or ROM base controller
system.
® Tony Ozrelic’s L.A. Software is now KYSO Technology ®
TO ORDER: Add $5.00 to total for shipping and handling. Personal check or M.O. are OK. Sorry, no COD’s, PO's, or plastic money. 30-day money-back guarantee. Most order shipped Ist class within 5 working
days.
KNOCK YOUR SOCKS OFF
KYS8SoO
TE CA ONO OGY © P.O. Box 5246 © Bend, Oregon 97708 © (503) 389-3452 @
an assembler and then a high level language. Other languages and tools could then be written either in assem- bly or the high level language.
He suggested that the assembler and
‘some simple debugging tools be in-
cluded in the monitor. Then, once the monitor was finished, builders could
move on to C or Pascal.
He mentioned that a company in Germany is selling a 68000 board (and parts) along with such a monitor. (The package is aimed at educational use.) The assembler built into the monitor is complete enough that users can con- struct a complete compiler, working with Wirth’s Pascal book.
Andy will be gathering some addi- tional information about this ayelem for us.
The Rest Of SOG
We'll include excerpts from many of the talks in Micro C over the next year, so you won’t miss out entirely.
We started the schedule with the idea that there would be only two things happening at a time (and folks could remain in the room for the following hour if they wanted to con-
tinue the discussion). We weren’t en- tirely successful. Oh well, maybe next year we'll try for three at a time, or expand the formal talks into Sunday, or...
The all-day white water rafters (60 people) wanted a two or three day raft trip next year. We'll see about setting up one of those.
The last dorm room was assigned on May 1 (almost three full months before SOG). So if you have a hankering to stay in the dorm next year, plan to get your reservation in early. Fortunately, there are lots of motels within a couple of miles, and there’s plenty of parking for campers and trailers next to the dorm.
MICRO CORNUCOPIA, #32, Oct-Nov 1986 41
ALL SALES ARE MADE SUBJECT TO THE TERMS OF OUR 90 DAY LIMITED WARRANTY. A COPY OF THIS WARRANTY IS AVAILABLE FREE, ON REQUEST.
DIGITAL RESEARCH COMPUTERS
CAF 8 MHZ AT COMPATIBLE - $1399
* PRODUCED BY CAF: A $500 MILLION/YEAR TAIWANESE CONGLOMERATE.
* BURNED IN FOR 48 HRS. * INCLUDES DOS 3.1 AND MANUALS.
* 512K RAM, EXPANDABLE TO 1MEG ON M.B. * 1.2 MEG FLOPPY INCLUDED.
* 80286 WITH OPTIONAL 80287 * ON BOARD REAL TIME CLOCK.
* AT STYLE KEYBOARD WITH ENLARGED ENTER AND SHIFT.
* 195W POWER SUPPLY x COMPLETE SERVICE MANUAL AVAILABLE: $40.
* COMPLETE SYSTEM DOCUMENTATION INCLUDED, PLUS DOS MANUALS. : * FLOPPY AND HARD DISK CONTROLLER CARD INCLUDED.
* ERSO BIOS FOR MAXIMUM AT SOFTWARE COMPATIBILITY.
* LIMITED 1-YEAR FACTORY WARRANTY. * FCC CERTIFIED!
* 1.2 MEG FLOPPY CAN READ AND WRITE 360K DISKETTES. ADD $15 UPS.
CMI 6640 33 MB. HARD DISK 39 MS - AT COMPATIBLE.
VERY LIMITED STOCK — $325
MEX-PC MODEM } SOFTWARE PACKAGE 969.95
A FANTASTIC COMMUNICATIONS PACKAGE WITH FEATURES TOO NUMEROUS TO LIST. SEE MAY/JUNE ’86 MICRO SYSTEMS JOURNAL FOR FULL REVIEW OR CALL FOR BROCHURE. SUPPORTS COLOR, KERMIT PROTOCOL, Y MODEM BATCH, VT100 EMULATION, REMOTE OPERATION, ON LINE HELP, ETC. RUNS UNDER PC/MS DOS. 180 PAGE MANUAL & BINDER.
MEX-PACK LIST IS $99.95 — SPECIAL $69.95
NEW!
PC/XT EPROM
PROGRAMMER $199
* LATEST DESIGN * PROGRAMS UP TO 4 DEVICES AT ONE TIME * FEATURES EASY TO USE MENU DRIVEN SOFTWARE THAT RUNS UNDER PC OR MS-DOS. * USES AN INTELLIGENT PROGRAMMING ALGORITHM FOR SUPER FAST (8X) EPROM BURNING. * THIS PLUG-IN BOARD ATTACHES TO AN EXTERNAL MINI CHASSIS CONTAINING 4 TEXTOOL Z.I.F. SOCKETS. * NO PERSONALITY MODULES REQUIRED * AUTOMATIC VPP SELECTION: 12.5V, 21V, OR 25V. * EPROM DATA CAN ALSO BE LOADED FROM OR SAVED TO A DISKETTE. * PROGRAMMING SOFTWARE SUPPORTS: 2716, 2732, 2732A, 2764, 2764A, 27128, 27128A, 27256, 27256A, 27512, AND 27512A. * ASSEMBLED AND TESTED, BURNED. IN WITH MANUAL. $199 WITH SOFTWARE.
MICROTEK 2 M.B. EXPANDED MEMORY BOARD $195 (0. K) MEETS LOTUS/INTEL/MICROSOFT SPEC. FOR EXPANDED MEMORY. FOR.USE AS EXPANDED MEMORY (EMS), ELECTRONIC DISK, OR PRINT SPOOLER. WITH A SUPERB MANUAL AND INSTALLATION SOFTWARE. FOR PC/XT OR MOST COMPATIBLES. FOR 2 MEGABYTES OF 150 NS RAM (72 DEVICES) INSTALLED AND BURNED IN ADD $225.
ZRT-80 CRT TERMINAL BOARD!
- A LOW COST 2-80 BASED SINGLE BOARD THAT ONLY NEEDS AN ASCII KEYBOARD, POWER SUPPLY, AND VIDEO MONITOR TO MAKEA COMPLETE CRT TERMINAL. USE AS A COMPUTER CONSOLE, OR WITH A MODEM FOR USE WITH ANY OF THE PHONE-LINE COMPUTER SERVICES.
FEATURES:
» Uses a Z80A and 6845 CRT Controller for powerful video capabilities.
RS232 at 16 BAUD Rates from 75 to 19,200.
24 x 80 standard format (60 Hz). Optional formats from 24 x 80
(50 Hz) to 64 lines x 96 characters (60 Hz).
Higher density formats require up to 3 additional 2K x 8 6116 RAMS. Uses N.S. INS 8250 BAUD Rate Gen. and USART combo IC.
3 Terminal Emulation Modes which are Dip Switch selectable. These include the LSI-ADM3A, the Heath H-19, and the Beehive.
Composite or Split Video.
Any polarity of video or sync. Inverse Video Capability.
Small Size: 6.5 x 9 inches.
Upper & lower case with descenders.
7 x 9 Character Matrix.
Requires Par. ASCII keyboard.
FOR 8 IN. SOURCE DISK (CP/M COMPATIBLE) ADD $10
Digital Research Computers
P.O. BOX 381450 « DUNCANVILLE, TX 75138 + (214) 225-2309
A&T
ADD
$50 (COMPLETE KIT, 2K VIDEO RAM)
BLANK PCB WITH 2716 CHAR. ROM. 2732 MON. ROM
sages SOURCE DISKETTE - ADD $10 SET OF 2 CRYSTALS - ADD $7.50
*TM OF DIGITAL RESEARCH INC. (CALIF.) *IBM TM OF INT. BUS. MACHINES.
(214) 225-2309. STANFORD TURBO XT - $399
4.77 OR 8 MHZ x FCC CERTIFIED * 640K MOTHER BOARD (0 K) * .135 WATT P.S. * XT-AT 5160 KEYBOARD « FLIP TOP CASE * 8 EXPANSION SLOTS x ASSEMBLED AND TESTED * WITH BIOS * FLOPPY CONTROLLER CARD & CABLES * WITH DOCUMEN-
TATION. ADD $12 UPS.. A.R.C. XT TURBO - $529
4.77 OR 7.4 MHZ * 8 EXPANSION SLOTS * SLIDE OUT PC CASE * 5160 XT-AT KEYBOARD « MS DOS 3.1 + BASIC DISKETTE * 256K RAM, EXPANDABLE TO 640K * 4 LAYER JAPANESE MOTHER BOARD x FULLY TESTED AND BURNED IN. * SUPERIOR, CLEAN BIOS. * 135 WATT P.S. x SUPERB DOCUMENTATION * FCC CERTIFIED. ADD $15 UPS.
XT OPTIONS:
* V20.8 MHZ NEC PROCESSOR. REPLACES 8088. - $12.95 * TWO 1/2 HT. D.S. DD. FLOPPIES INSTALLED: $175/Palr * 256K DRAM. 150 NS. INSTALLED AND TESTED: $28/9
* 64K DRAM. 150 NS. INSTALLED AND TESTED: $10/9
* HARD DISK: ST225 WITH CONTROLLER CABLES & FORMATTED: $425 * ZUCKER COLOR CARD WITH PARALLEL PRINTER PORT: $86
* MONOCHROME/GRAPHICS VIDEO CARD WITH PRINTER PORT: $89 * PLEASE CALL FOR MONITOR PRICING
SCHEMA: Schematic Capture and Drawing Package
WORKS WITH PC'S AND COMPATIBLES. EASY TO USE WITH OFF THE SHELF PRINTERS, MOUSES, VIDEO CARDS, ETC. COMES COMPLETE WITH A HUGE COMPONENT DATABASE. SUPPORTS MONOCHROME, COLOR, OR EVEN EGA. FREE BROCHURE AND DEMO DISKETTE ON REQUEST. LIST $500 — SPECIAL $396.15
$100 BUSS LIVES! WE STILL SELL S100 PRO- DUCTS AND CP/M SINGLE BOARDS. FREE CATALOG.
* 3 CARDS IN ONE!
* 100% IBM COMPATIBLE.
* COMPATIBLE WITH IBM EGA, COLOR GRAPHICS ADAPTER, OR MONOCHROME ADAPTER.
* 256K VIDEO RAM! (4 TIMES MORE THAN IBM!)
* DUAL FREQUENCY OUTPUT FOR EITHER EGA OR STANDARD RGB COLOR MONITORS.
.. * PERFECT MATE FOR NEC MULTISYNC COLOR MONITOR!
.* LIGHT PEN INPUT.
* FULL 16 COLORS.
* MFG. BY D.F.I., THE PREMIER FAR-EAST ADD-ON BOARD MAKER.
* A SUPERIOR BOARD AT ABOUT 1/3 THE COST OF IBM EGA!
* ASSEMBLED, TESTED, AND BURNED IN. WITH MANUAL.
* USES CHIPS & TECH. VLSI! 4 CHIP SET.
* FIELD PROVEN BIOS.
THE NEW 65/9028 VT
ANSI VIDEO TERMINAL BOARD! * FROM LINGER ENTERPRISES *
A second generation, low cost, high performance, mini sized, single board for making your own RS232 Video Terminal. Use as a computer console or with a MODEM for hook up to any of the telephone-line computer services.
pen tvere: MICRO SIZE!
Uses the new SMC 9028 Video Controller Chip coupled with a 6502A CPU.
RS-232 at 16 Baud Rates from 50 to 19,200
On board printer port!
24 X 80 format (50/60 Hz).
For 15,750 Hz (Horiz.) monitors. 3 Terminal Modes: H-19, ADM3A, and ANSI X 3.64-1979
Wide and thin-line graphics. — White characters on black back- ground or reversed.
Character Attributes: De-Inten, Inverse, Underline and Blank. Low Power: 5VDC @.7A, + 12VDC @ 20MA.
Mini size: 6.5 X 5 inches. Composite or split video.
5 X 8 Dot Matrix characters
(U/L case) with descenders. Answer back capability.
Battery backed up status memory. For ASCII parailel keyboard.
(Full Kit) ADD $40 FOR A&T
SOURCE DISKETTE: PC/XT FORMAT 5¥% IN. $15
NEW OPTION . PC/XT keyboard ROM. Allows use of IBM style keyboard. $15
_ TERMS: Add $3.00 postage. Orders under $15add 75¢ handling. NoC.O.D.
‘We accept Visa and MasterCharge. Tex. Res. add 5-1/8% Tax. Foreign
orders (except Canada) add 20% P & H. Orders over $50 add 85¢ for insurance. Prices subject to change without notice.
~ WE ARE NOT ASSOCIATED WITH DIGITAL RESEARCH INC. (CALIF.) THE SUPPLIERS OF CPM SOFTWARE
LEAP INTO A NEW DIMENSION
CALENDARICLOCK No 569 KIT At @ Works with any Z-80 based tipi e Currently being used in Ampro, Kaypro ' 2, 4& 10, Morrow, Northstar, Osborne, NL 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! Full implementation of ‘’C’’ with standard floating Optional software is available for file point, library, and I/O subroutines. UNIX VER 7 date stamping, screen time displays, compatible. Produces relocatable 8080 (optional 0Z80) etc. assembler code. Relocating assembler and_ linker Specify computer type when ordering. supplied with package or use Microsoft M80 and L80 Packages available: : : Fully assembled and tested $99. SID/ZSID debugger interface. FAST COMPILATION Complete kit $69. AND EXECUTION. Bare board and software $29.
AZTEC Cll FOR CP/M $199 DES dreund: shipping $ 3.
Special price for Micro C subscrib 149 MASTERCARD, VISA, PERSONAL CHECKS, Ee nee tae eae MONEY ORDERS §&§ C.O.D.'S ACCEPTED. i {AX N X N.Y. STATE RESIDENTS ADD 8% SALES TAX software systems Es , KENMORE
Box 55, Shrewsbury, N.J. 07701 COMPUTER (201) 780-4004 : TECHNOLOGIES
Also available for Apple DOS, HDOS, CP/M-86, PC-DOS P.O. Box 635, Kenmore, New York 14217 (716) 877-0617
WITH AZTEC Cll
PERFORMANCE : P 0 o with Mitek’s — - Relocatable Z80_
Relocatable Z80 Macro Assembler Only $49.95 plus shipping. @ Phase/dephase. 8080 to Z80 Source Code Converter. Cross-reference generation. Generates Microsoft compatible Full Zilog mnemonics. REL files or INTEL compatible hex INCLUDE and MACLIB FILES. files. . Separate data, program, common, Compatible with Digital Research and absolute program spaces. macro assemblers MAC & RMAC. e Supports Hitachi HD64180. Generates Digital Research compat- @ Z80 Linker and Library Manager for ible SYM files. Microsoft compatible REL files avail- Conditional assembly. - _ able as an add-on to Assembler.
ATTENTION Turbo Pascal Users:
Assembler will generate Turbo Pascal in-line machine code include files.
“MICRO CORNUCOPIA, #32, Oct-Nov 1986 43
En —
Laine Heads Home After The SOG,
And Makes It
_« In. his own one-track way, Laine
' talks about Yugoslavia, militia, Tai- wan, clones, floppy driver boards, SOG V, the X-16, the Slicer, and environments in MS-DOS. (Actually, he really covers more, I just forgot what it was.) This column is obvious- ly just another Micro C attempt at blatant sensationalism.
. e’re sitting in central Yugo- slavia waiting for a police roadblock to filter back to
us. We would have been down the highway to Belgrade long ago, but our bus driver was caught passing the line of cars now ahead of us and the militia confiscated his passport.
We had to turn around and drive the 10 kilometers back to the militia post. The other lane was solid cars the entire way. And only one militia car with three officers to sift through them.
The line extended an hour beyond the militia station when the officers realized the fruitlessness of their situa- tion and with one wave of the hand, overheated cars, sweating bodies, and screaming beasties were dispersed into the Yugoslavian afternoon. ©
The militiamen have now returned to their post and are arguing with our bus driver over the merits of his driving style, politics, and most likely, religion. It’s cooler now, sitting on the grass next to the militia house, waiting for our driver to come back. He'll no doubt: tell us that the bus has been confiscated along with everything and everyone on board and we’ll all be relocated to the Adriatic Coast where we will be’ pressed into service as latrine technicians and goat herders.
The bus will probably be used to decoy other Turkish busses across the border. Our belongings, including my “little Toshiba portable and the ribbon re-inkers I brought to sneak across the border into Turkey, will be donated to
. the People’s Work Training Center
where they will be used for practice in the Advanced Sledge Pounding Class.
And How Was YOUR Trip Home From SOG ???
Later: Well, we ended up waiting at the militia post for about two and a half hours before we could go, and by then the line of cars was backed up again. (We lost six hours in all.)
SOG V
Yes, I did make it to SOG. Had a GREAT time, too. Since everyone else will be talking about it this issue anyway, I'll just take a quick, surreal dip through the highlights:
Grey boat slamming into white waves - Tom into the water by acci- dent - water fights - Tom into the water on purpose - volleyball in a dust storm with the gang - ‘’Watch how fast this scrolls!’’ - ‘‘Hey, come over and look at my 68000.”’ - bi-window visual translation - ‘‘But ours works with a mouse.”’ - Clone Wars - ‘Why don’t you give me a copy of that?” - ‘‘Where’s the beer in this place, any- way?’ - dinner at The Pine Tavern - “‘So I’m taking back two rocks from Mount Bachelor for the kids’ pres- ents.’’ - ‘‘We’ll get some chips and be right over.’’ - ‘‘When you hit the print screen. key, you generate a: keyboard hardware interrupt which generates a print screen interrupt which is inter- cepted by the GRAPHICS program which generates a video interrupt which is intercepted by the EGA card and then you generate a printer inter- rupt which is intercepted by the MODE program which generates a serial COM interrupt, which ...”’ - “Let me know how your project goes.”’ - ‘‘Has anyone seen my beer cooler?’’
A brief list of my favorites at SOG: PC-Tech’s X16 and 4 Meg ‘‘Above- Board”’ card (for 850 bucks!), Logitech Modula, Shawn’s Megabyte Slicer, new (finally!) monitor ROMs from
By Laine Stump
Development Foundation of Turkey Tunali Hilmi Cad. 22 Ankara Turkey
Slicer, and EXPRESS 2.2 in flaming, instantaneous Hawaiian color on Dean’s EGA card on the X16.
Update On Taiwan
Thirty-five PCs arrived from Taipei while I was away, along with 35 3’ disk drives to mount in them. Nothing is really together yet, and already I have problems.
Flakey Flakey Flakey
The motherboards we got are 8MHz turbo boards from Auto Computer (doesn’t really matter, you’d get the same board no matter where you ordered from). Unlike most Taiwan junk, they actually WILL run at 8MHz. Almost. All is well until there’s a disk error and then, instead of printing out a nice error message, the machines just lock up and die. Totally.
This isn’t the only time they die, either. At random times during the day they simply decide to go home early and don’t even have the decency to mark their names ‘‘OUT’’ on the office bulletin board. So I guess we just use them at 4.77 until I discover the culprit or find some 20MHz crys- tals (6.67MHz).
And Still More Flakes
We actually had fairly decent luck with DOAs this time — only one bad power supply, one video card (caused by the power supply), one winchester faceplate fallen off, and one color monitor power supply shish kebabed. Of course, that’s only if you don’t count the stripped screw holes, wrong sized nuts, poorly mounted drives, and the floppy controller cards.
Loss Of Control
Three months ago, when I connect- ed a 3’’ drive to one of the sample Taiwan units to make sure they were compatible, everything worked fine. The new machines and drives work fine together too — until you try
a a] . 44 _ MICRO CORNUCOPIA, #32, Oct-Nov 1986
writing to the disk. Then your entire disk gets trashed!
When I replaced the new controller with an earlier version I had no prob- lem. The two cards used nearly the same parts; the new one just had a different layout to conserve space. Then I noticed that someone had cut costs by removing all but four of the “fingers” for ground connections on the card edge connector which hooks up to the data cable! The pinout is cleverly designed so that every other wire is ground, helping to reduce crosstalk between channels. But a ground which is connected only at one end does absolutely NO GOOD. Oh, Ataturk! What have our neighbors done now?!?
Not so fast, though. I had seen these symptoms before when I installed a single 5’’ drive with no terminating resistors, so I checked the OEM man- ual. On this drive the termination is built in; all the drives have terminator packs. Each signal has 1K ohm of pullup (providing about 5 milliamperes of pull-up current). They say it’s enough. It should be. Every other ‘machine I have, including the X16 and my Toshiba portable AND my Slicer, can handle the little buggers just fine.
Well, perhaps a grounding problem can cause the same symptoms. I tried tying all the grounds on the floppy cable together, but it didn’t help. Must be the termination after all.
All right, let’s try it with a terminat- ed 5’ drive together with the 3’, AOK. How about with two of the little guys? Sure thing.
Now I know. These $%@%%!*! flop- py cards don’t have as much ‘‘drive’’ as the old card, and they need 500 ohms of termination on the cable. Wonderful! Where am I going to put it? The built-in termination on the drive is in a cute little SIP resistor network. Cute little SIP resistor net- works aren’t available in Turkey. Looks like I'll have to solder eight tiny 1K ohm resistors onto 35 floppy disk drives. That makes 560 solder connec- tions! Why can life never be simple?
Postscript: I have decided instead to have a “‘terminator plug’’ manufac- tured to be plugged into the unused cable plug. I also rechecked the parts on both controllers and discovered the
sole difference is that the old controller .
NEW LOWER 16 BIT PRICE SPEED — POWER — VERSATILITY
(al =o 4
FULL SCREEN EDITOR ONLY $29.95
Most EXPRESS users are converts from the GIANTS of WORD PROCESSING....... wand you couldn't pay them to go back... HERE'S WHY
NAMED DIRECTORIES su
POWERFUL KEYBOARD MACRO’ FAST, FAST, FAST SEARCH! FILES LARGER THAN MEMORY handled wi
FULL BLOCK INSTRUCTIONS includin VARIABLE SPEED (FAST!) BI-DIRE
NOT COPY ee
EXPRESS 1.0S GENTLEMEN ..
FULL ACCESS TO CP/M USERS AREAS (up to 32) with any editor command! ported on MSDOS VERSION!
MEMORY MAPPED VIDEO AVAILABLE FOR IBM PC and PC clones!
BUILT-IN CP/M LIKE COMMANDS (RENAME, COPY, ERASE, TYPE, DIR, LOG)!
as many as you want)!
FULLY RECONFIGURABLE COMMAND KEYS (emulate be other editor if you like)!
TERMINAL DATA BASE...INSTANTLY configure is over 50 predefined terminals!
CONTROL and HIGH BIT CHARACTERS may be ae and edited!
DYNAMIC WORD WRAP/UNWRAP FULL CURSOR CONTROL (and then
EASY to SET TAB STOPS - GLOBAU/SELECTIVE/LITERAL/IGNORE CASE I REF LACE PRINT, SAVE, INCLUDE, MOVE, COPY, DELETE IONAL AUTO SCROLL+ GOTO PAGE N/ LINEN COMPACT on disk and in RAM. (even the 16-bit versions are only 25k bytes)!
AFFORDABLE... I ral ata fair price is our motto R available FREE on your Local Bulletin Board or for $10.00 from TCI
. I'm ready to step up to EXPRESS... please send:
copies EXPRESS 2.2 at $29.95 + $5.00 shipping and handling copies EXPRESS 1.0 at $10.00 + $2.00 shipping and handling
My computer uses: PCDOS — MSDOS — CPM-86 — CCPM-86 — CPM-80 Kaypro Il — Kaypro 2X,4,10 — Osborne 1 SSDD — EPSON QX-10 Morrow MD2 — Morrow MD3 — MS-PCDOS STD 5" DSDD — XEROX 5" DSDD
Disk format: (Circle One)
(Cirle One)
IBM CPN-86 5" SSDD — Zenith Z90 — 8" SSSD — Apple 35 TRK CPM
Other 5" Computer Send Check or Money Order to: Name
TCI Address 17733 205th Ave. NE Woodinville, WA 98072 Washington residents must add 8.1% Sales Tax
MASTER CARD
‘Tomorrow's
Phone Day
uses 7438 NAND gates to drive the outputs (as suggested in the drive manual) while the new controller uses 74LS38s. Is this enough difference to cause what is happening? Somebody clue me in....
Editor’s note: Low power Schottky parts (74LS38s in this case) have relatively weak outputs (which isn’t a problem as long as they are talking to other LS parts). Stan- dard TTL parts (7438s) generally have much stronger outputs and that’s obvious- ly important in this application.
Mastercard/Visa
Sides Den
Ciy___s SiC‘ State ___. Zip
PHONE ORDERS 1-206-644-3133 Computine
| NNOVATIONS
The Lesson
The great deals found in Taiwan are
not all peaches and cream (or straw-
berries and sugar). You never know
exactly what you'll get. In fact, you
can’t even guarantee that the screws holding your winchester drive in the
~ cabinet will be the right size. Most of
the time they aren’t. Either they’re too
‘big and the threads are stripped or
they’re too small and held in with
_ (continued next page)
: MICRO CORNUCOPIA, #32, Oct-Nov 1986 45
66 WORLD
(continued from page.45)
fingernail polish. I no longer have ANY respect or trust AT ALL for Taiwanese computer manufacturers. At least none of them we’ve dealt with so far (and they were the best out of the 30 or so we met with when we went to Taipei). Oh, yeah. Except Multitech. But they couldn’t sell to us anyway. _ By the way, the 3’’ drives we pur- chased are Panasonic (Matsushita, Na- tional) ‘‘super thin’’ 363s, and they are wonderful little units indeed. Small, light, low power, quiet. I only wish we had such good luck at the other end of the cable.
On The Pleasant Side
We didn’t buy the monitors for our clones from Taiwan. We bought them from a local junk dealer who had yanked them out of an old IBM main- frame before he melted it down for scrap (what a lovely sight that must have been). Of course we tried one before we bought, and it worked.
The price was right (about $15 each) but they all had 110 volt transformers and no cabinets. Ergun (my compan- ion on the Taiwan trip) is handling the reconditioning. He’s getting the cabi- _nets made by a friend who usually builds speaker cabinets. The trans- formers will be hefty 220 volt affairs custom made by a local manufacturer (oh, the strange and wonderful things that can be had in this country).
In the meantime I’ve sacrificed the monitor from my Slicer so Ron can use it on the X16 over at the main office. This has forced me to hook my Slicer up to a serial terminal (a Wyse 50) for the first time in several months. I can’t BELIEVE how fast it is! On the clones you can actually see the cursor moving across the screen; on the Slicer/Wyse you can barely even see the screen scroll! Typing the ‘‘next page’’ key in the editor brings up the entire next page long before I can even start to say “‘one thousand one’’ (somewhat faster than memory mapping on a clone with a color card, although slightly slower than a monochrome card). I’m talking running MS-DOS and going all the way through the operating system for each and every character here!
Clones may be trendy right now, but for sheer word-chopping speed I still couldn’t do without my Slicer. Espe- cially since somebody took away all my 40-track drives, and the Slicer is the only system I have which knows how to double-track a 40-track MS- DOS format on an 80-track drive.
in the last episode of ‘’86 World’’ we learned how to call one program from within another program by using the DOS “’Exec’’ function call. It’s a useful tool to have tucked off in your \tur- bo\lib and \asm\lib directories some- where.
Very useful, but limited in an incon- venient way. The problem with the Exec procedure given last issue (for Turbo Pascal, Assembly Language, and Microsoft BasCom) is that it as-
Our EXTERNAL systems install in seconds! Includes an attractive vertical cabinet with integral P/S and fan, 3 foot cables. Everything necessary to plug in and go!
$465. 5mb External
Kaypro (4,2,4,10)
Big Board Ill
Xerox 820-11!
Micro Mint SB-180
Gemini Zorba
Osborne
Sanyo MBC-41150/ 4460/4200
AVL Eagle (with mods)
Alspa I!
Epson QXx-410
Morrow MD-2,3
2-80 S-100 Computers
aeons CA i SO
262626 66 £62668 66
SOURCE files. No programming required.
desired floppy format.
46 MICRO CORNUCOPIA, #32, Oct-Nov 1986
Advanced Concepts “Mini-Winnie’,
HARD DISK SYSTEMS
For your 2-80 Computer!
COMPLETE SUBSYSTEMS
Plug in and run! Includes software, documents, cables, brackets as req'd.
$665. 40mb External
You may buy our controller, software, cables & P/S enclosure for $395. Add your own ST-506 family disk drive (up to 26mb) to complete your system!
Compatible with most other add-ons, Including Microsphere & Advent RAM disks, SWP CoPower/RAM disk, Pro-8 Family, Advent Turbo ROM, all soeedup and double/ quad density upgrades ZCPR3, Microshell, Plu’ Perfect 2.2E.
The key to the Mini-Winnie system is the INSTALL program, which links your drive and your computer, the way. YOU want it. Extensive menu options allow selection of any ST-506 Compatible drive, as 1 to 4 logical drives within CP/M at any drive letter. Diagnostic and format capability provided to match the installation. Distributed with
We have club, user group, OEM/Dealer programs. Call for quantity schedule. If for any reason you are not satisfied, return for full refund within 30 days. All systems warranteed for 90 days. Info and manual $8.00 credited with your system purchase.
ORDER INFO: Call (305) 482-7302. Terms: UPS cash COD, check or M.O. Please allow 4 weeks for delivery. Fla. add 5% tax. Shipping extra. Please specify
Advanced Concepts Engineering & Consulting 8926 SW. 17th Street Boca Raton, Florida 33433
Our INTERNAL systems do not displace a floppy drive, do not require a power supply upgrade, use the highest technology winchesters available. No compromises.
$790. $740. $845.
20mb 40mb 20mb External Internal — Internal v v v v v v v v v % (You may delete $90 v for external systems v less P/S enclosure. v Add $6.00 for extra Vv long cables.)
sumes COMMAND.COM (the com- mand processor) is in the root directo- ry of the currently selected drive.
However, this isn’t always the case. If you (or the person you sold your slick new text editor to) happen to boot from drive C: and be working on a ‘‘data only” disk on drive A: and then try to execute an external com- mand, then what happens?
Exec will croak (not even ribbet or sneeze), that’s what. The Exec func-
Figure 1 - GetEnvironment For Pascal
CONST string128 = string[l128];
tion call doesn’t know a thing about PATH or any of that good stuff.
Enter COMSPEC
Fortunately somebody at Microsoft foresaw this problem and put a varia- ble in the MS-DOS ‘“‘Environment’’ called COMSPEC. COMSPEC is set at boot time to the proper drive/path/ filename to find COMMAND.COM. All we have to do is call the program described by COMSPEC instead of just
{---------~-~-~---~~~--- GetEnvironment ------=----------~--~---} { return the value of the Environment Variable 'EnvVar' }
a ea
—---}
FUNCTION GetEnvironment (EnvVar : String128) : String128;
CONST NULL = “@;
EnvPtr EnvSeg EnvOfs : INTEGER; Found BOOLEAN}; TmpStr, MatchStr
“CHAR;
: String128;
begin TmpStr : EnvOfs ; EnvPtr
; r(EnvSeg, EnvOfs); Found ;
FALSE;
: INTEGER ABSOLUTE CSEG:$2C;
WHILE (EnvPtr* <> NULL) AND (NOT Found) DO
{ check for match of current variable name }
begin MatchStr := ''; WHILE (EnvPtr* <> NULL) DO
{ extract an environment variable name and its value }
begin
MatchStr := MatchStr + EnvPtr*;
EnvOfs := EnvOfs+1;
end;
EnvPtr := Ptr(EnvSeg, EnvOfs);
IF (EnvVar = Copy (MatchStr, 1, POS('=',MatchStr)-1)) THEN { Found the variable, get its value to return }
begin
TmpStr := COPY(MatchStr, POS('=',MatchStr)+1, Length(MatchStr) );
Found := TRUE; end { if variable found } ELSE
{ Not Found, move past NULL to next variable }
begin
EnvOfs := EnvOfse1;
EnvPtr := Ptr(EnvSeg,EnvOfs); { variable not found }
end;
end; { while not found and not end of environment }
GetEnvironment := TmpStr; end; { GetEnvironment }
COMMAND.COM. Simple!
WHOA! Hold It!
Slow down here! First of all, what is the ‘Environment’? anyway? And how do we find this ‘“COMSPEC’’? Good questions.
Environment
First, the Environment is a collection of strings of the form “‘NAME =string’’ stored somewhere down in the depths of low memory. You can view and change them from the user level with the SET command (try it now — just type SET at the A> prompt and see what it shows).
From a program, the environment can be scoped out by following the clue of the ‘Environment Segment’ pointer stored at location 2Ch ($2C for all you Turbo-ers) in the Program Segment Prefix (simply the bottom of the code segment for .COM pro- grams). The environment variables are stored starting at location 0 in the segment indicated by ‘‘Environment Segment.’’ They consist of a series of C-style (0 terminated) strings followed by a final 0. In Assembly Language DB statements the environment would look something like this:
DB *M2LIB=C: \M2\LIB*,0 DB *PATH=C: \3C:\BIN;\',0 DB 'CLUB=Sierra',0
DB *NEIGHBORHOOD=Watts! DB
So, how do we find COMSPEC? Just scan through the environment looking for the word COMSPEC and then use everything from the = to the next 0 as the filename of our command proces- sor. But let’s not hardcode this thing. Let’s be really neat and make a gener- al purpose function called ‘’GetEnvi- ronment’ that will return the value of ANY environment variable.
GetEnvironment In Pascal
Armed with only the above informa- tion, my roommate Ron set out to do exactly that, and in a few hours (prob- ably less, but I wasn’t there so I don’t know) he came up with the routine in Figure 1 for Turbo Pascal.
(continued next page)
MICRO CORNUCOPIA, #32, Oct-Nov 1986 47
86 WORLD
(continued from page 47)
There really isn’t much to explain about it. Just notice how he declared the EnvSeg variable to be at “‘CSeg:$2C”’ with the absolute direc- tive. CSeg is a standard function in the MS-DOS version of Turbo Pascal.
CSeg. returns the address of the beginning of the Code Segment. The ““$2C’’ after the colon is the offset,
i.e., the exact location within the Code .
Segment of the environment.
Editor’s note: For more on Code Seg- ments and offsets, see Don Fletcher’s “Writing A Printer Driver For MS-DOS” in this issue of Micro C.
After that he just put the value at EnvSeg into the segment of a pointer variable (with the PTR procedure), and from then on it was turned into simple character crunching.
Since we started talking about this in terms of COMSPEC and Exec, let’s make the patch to Exec (see Micro C, issue #31, page 41) so that it uses
GetEnvironment. First Copy the rou- _
tine GetEnvironment into the begin- ning of the same INCLUDE file as Exec. Then replace the line:
ComFile := '\command.com'+chr(0); with:
ComFile := GetEnvironment( '*COMSPEC') +chr(0);
Now your programs will always be able to find COMMAND ~— as long as there is a system disk in the drive you booted. (Some feats are beyond the reach of mere specks of dust like us.):
And In Assembly The Assembly Language version ac- complishes the same results although in a slightly different manner. Ron copied entire ‘“VAR=VALUE” strings into a local variable and then com- pared VAR, returning a newly con- structed string containing the desired VALUE. For Assembly Language we'll simplify things by directly scanning through the environment (no _ local variables) and just returning a pointer to the proper VALUE in EnvSeg (in- stead of making a copy to return). This method may require a few extra steps for some uses, but in many (if not most) it will provide the necessary
Figure 2 - GetEnvironment For Assembly Language
EXIT:
we we We we We we we we
ENVSEG equ
GetEnvironment PROC Near PUSH AX PUSH cx . PUSH ‘SI
MOV ES, ENVSEG XOR DI,DI XOR AX, AX - CMP ES:[DI], AL JZ GetEnv9 GetEnv1: ; POP SI PUSH st MOV CL, {SI] XOR CH, CH Inc = SI REPE CMPSB JNZ GetEnv2
JZ GetEnv3 GetEnv2: — oa MOV CX, OFFFFh REPNZ SCASB CMP ES:(DI],AL JZ GetEnv9 JMP GetEnv1 GetEnv3: INC
;FOUND
GetEnvironment- return-a pointer to the value of a string in the MSDOS "Environment"
ENTRY: DS:SI -—> a string (in Pascal Format) containing var. name
IF (NC) ES:DI --> the value of said variable IF (C) nothing (not found)
word ptr cs:2Ch ;ptr to environment in base page
ssee if no environment at all
sretrieve string address
stry to match
’ sNOT FOUND sscan until 0
3if double 0 then end of environment selse try next one
DI. ;point past t=t
STC sindicate FOUND
GetEnv9: POP SI POP CX POP AX CMC RET GetEnvironment ENDP
information without wasting time or
space; that’s the beauty of Assembly Language. .
Figure 2 shows GetEnvironment for Assembly Language. To find the value of an environment variable, just put the address of a Pascal string (length byte followed by string) containing an environment variable name in DS:SI and call GetEnvironment. On return, if the Z flag is set, ES:DI will point to
‘the value of the variable. If Z is not set
then the variable wasn’t found.
To upgrade the Assembly version of Exec (Micro C, issue #31, pages 42-43), add the GetEnvironment procedure into the source file, then change the FINDCOMSPEC procedure (bottom of
page 43) to the new one defined in Figure 3.
- Disclaimers
Our newly-made GetEnvironment has one big problem. It will work only in COM files. In an EXE file the ‘Program Segment Prefix’’ isn’t in the code segment. Details, details. Use the TESTEXEC program in Figure 4 to test the new Exec. .
In Turbo this is no problem, since the Turbo compiler can only generate COM files anyway. Be serious now — you aren’t actually working on any- thing in Assembly big enough that it has to be an EXE, are you? At any rate, leaving this limitation for now
48 MICRO CORNUCOPIA, #32, Oct-Nov 1986
Figure 3 - New FINDCOMAPEC For Assembly Language EXEC
COMSPECSTR DB 7, *COMSPEC®
FINDCOMSPEC: PUSH SI
MOV PATHOFS, offset DEFPATH
MOV PATHSEG, DS
MOV SI,offset COMSPECSTR
CALL GetEnvironment Jc FINDCOMSPEC9
MOV PATHOFS, DI
MOV PATHSEG, ES FINDCOMSPEC9:
POP SI
RET
3set up default
3 found
Figure 4- New TESTEXEC To Test Modified EXEC
masm testexec; exe2bin testexec
erase testexec.exe
EXTRN Exec:NEAR
Code segment byte public ‘CODE! assume cs:;code,ds:code org 100h TESTEXEC:
MOV SP,8000h
TESTEXEC.ASM = test the new exec procedure
This program MUST be made into a .COM file:
link testexec+asmexec;
ren testexec.bin testexec. com
MOV BX,800h ;request 32k even though we'll never need it
MOV AH, 4Ah INT 21h
MOV SI, 80h CALL EXEC
MOV AH, 4Ch INT 2th ENDS
end TESTEXEC
gives me something to talk about later.
Other Neat Uses
You aren’t limited to using existing variables in the environment. You can . put in your own with the SET com- mand. Here’s one I’ve been thinking about lately: ‘“LANGUAGE = Turk- ish’’. Just retrieve this variable when your program starts and then load up the appropriate message file. An inter- esting idea when you work in a multil- ingual environment like we do.
Just watch out when and where you set the environment. Unfortunately, MS-DOS makes a copy of the environ- ment for a ‘‘child’’ type of program, i.e., you can EXEC the SET command
sactually we are 'freeing' all but 32k
sexecute the command trailer sin the base page (CS:80h)
3(since this is a COM, CS<=DS)
from within your program to change the environment, but since you’re just changing a copy and not the original, the environment will appear un- changed. For now you'll just have to make do with using SET from com- mand level or batch files.
Coming Up
Come on now! You think I’m simple minded enough to try and tell you what I'll write about next time? That never works and you know it! You can at least be sure that it will have nothing to do with the Statue of Liberty or migration patterns of the club-footed wildebeest. Well, at least nothing about the statue... a6 8
VAX power In your
PC
FREE BOOKLET
© 10MHz 32032 CPU no-wait- states
e Floating Si point processor — ig
e 1MB to 8MB RAM
e Virtual memory with Cte MS-DOS and UNIX™ iia?
ese eae a SYSTEMS
31324 Via Colinas, Suite 108. Westlake Village, CA 91362 USA (818) 889-1646 Telex: 272849 DS! UR
(818) 889-1646
__ MICRO CORNUCOPIA, #32, Oct-Nov 1986 49
Disk Variables gins gereen POF 39°? \e Co ne Re sor Pipes
Memory Managemen
jo Reareeh™ Function Keys sve ent vans ee : sxe
Ove Virtual Disk lay sg,
™ archin,
Memory Files
ey dea
Ql Perfected User Wo |
If you've tried some of the earlier CP/M-80 add-ons such as Microshell™ and ZCPR™, then you know it’s possible to add new features to CP/M. Now you'can have much more. without all the trade-offs when you use ConlX, the latest and greatest upgrade for CP/M! —
“This system has all of its competitors beat.” Computer Language, June 1985.
$ ConlX Operating System: List $4965 Low. 9 981
A complete upgrade for 48K+ CP/M 2.2/3.0 and equivalent systems. Provides professional capabilities with blinding speed, as often found on more expensive MS-DOS™ and UNIX™ machines. Installs easily in 1 minute to add over 100 new commands and features. Eliminates many points of user frustration with CP/M. Uses only 1/2K TPA, 0-27K disk minimum.
ConIX is the greatest, most powerful 8-bit upgrade, with speed and capabilities that are so incredible it’s bringing users back to CP/M!
ConIX Pull-Down Menu: List $395 EREE OFFER!
A user-friendly interface to ConIX that is fully menu- driven, with. helpful prompts and easily understood explanations of all menu functions. Loads with a single keystroke at the prompt level. Source code included!
ConIX Library |- XCC Utilities: List $49@5 as
“A superb product... ConlX is a bargain.” Mole yetenis Journal, May 1986.
| } ConlX Programming System: List $4965 Now only
A full programming language for ConIX extends CP/M
- SUBMIT capability. Features conditionals, loops,
subroutines, labels, nesting, interrupt processing, error — traps, and debugging facilities. Design intricate menu
_ systems. Includes a special “compiler” that provides
string and numeric variables, an integer math package, . a relocatable assembly code generator, and much more. : A must for CP/M power-users and developers!
w AS $10.00! Over 25 utilities written in the ConlX shell language, including hierarchical directories with overlay - adds pathname capability to existing software, interactive debugger, move/copy/link multiple files, print files with pagination, review disk files for deletion, unerase disk with . stats, full-screen TYPE, and more. Source code included! ! Does not require Programming System.
Special Distribution Versions of the Conlx Operating System
NEW! ConIX Shareware Version:
Introducing a new Shareware version of our best seller, the ConlX Operating System. Included is our regular . distribution software less the Archiver, On-Line Manual, Menu source code, and some satellite utilities.
Con!IX Shareware is available through CHI for just the cost of the diskette and shipping, or on-line via many popular bulletin board systems. Users who wish to register their copy pay regular advertised prices and receive the complete software package as well as full- service customer support with upgrade notifications.
NEW! Conix Disk Manual Version:
To reduce the cost for those who want to purchase only the ConlX Operating System, we are offering the
complete software package without the printed manual. Instead, complete documentation is provided on oe with . each chapter stored i in individual files.
The disk manual does not include the Chapter Summary, Chapter Reference, and Index sections that come standard in our regular typeset manuals. Copies of the - printed manual are available separately should you wish to obtain one at a later date.
Product Trademarks - CP/M: Digital Research, ConIX: Computer Helper Industries, Microshell: New Generation Systems, ZCPR: R. Conn/Echelon, MS-DOS: Microsoft, UNIX: AT&T Bell Labs
CHI is celebrating the 100th birthday of one of our nation's most beloved landmarks, the Statue of Liberty on Ellis Island, with our Liberty Centennial Sweepstakes. We're simply saying thank you for being our customer by giving you a chance to win back the entire paid price of your order! Every 100 Sweepstakes entries will be placed into a separate drawing, thus making your odds of winning an incredible? in 100! To enter, read, fill out, detach, and return the entry form below with your order.
FREE! Pull-Down Menu System:
As a special offer, the ConlX Pull-Down Menu System is included FREE with all Operating System purchases. That's a savings of $24.95 off the regular list price!
SPECIAL! Buy ‘Em All Discount Offer:
As a special incentive, when you buy all three ConlX packages, you get the Library for only $10. That's right, for $69.95 you'll get the ConIX Operating System,
. Programming System, Library |, and three instructional manuals. In addition, we'll throw in the Pull-Down Menu at no extra cost. Act now and secure your copy of the complete line of ConIX products at our lowest price, ever!
Sweepstakes Entry Form
Name: Address: City: State: _. Zip:
Dear Computer Helper Industries:
I
1
|
|
I
|
|
I
{
1
1
I
|
Please enter my name in your Liberty Centennial Sweepstakes in
, which | am eligible to win a cash prize equal to the amount | am paying | for the enclosed order. | understand that my Sweepstakes entry will be placed into a drawing of no more than 100 entries as soon as they ! are gathered by you, and that | will be notified by mail if | should win, at which time | will have up to ninety (90) days to claim my prize or
| forfeit same. | also understand that | will only be eligible to enter after you ship my order if it has been prepaid, or after payment is
1 received if shipped COD, and | am not eligible if ordering PY PO or
! if I've entered this Sweepstakes before.
I
|
|
Signature:
Void where prohibited by law. May be cancelled without notice after first drawing
DT: O#: - C#: PP $:
Specials,
lee eee Se eee eee
Celebration Sweepstakes, New Price Reductions,
and Free Offers
Name:
Company (if any): Address:
City, State, Zip: Tel. #, Hours:
_— ConIX Operating System: $ 29.95 $ — Disk Manual Version $ 19.95 $ __._ Limited Shareware Version $ 0.00 $ — Printed Manual Only $ 9.95 $ — ConlX Pull-Down Menu System $ 0.00 $-
__. Con!lX Programming System: $ 29.95 $
__. Printed Manual Only $ 9.95 $ _— ConlX Library | XCC Utilities: $ 24.95 $ __. Printed Manual Only $ 9.95 $
___ All Con!IX Packages Above $ 69.95 $ Computer Brand:
Disk Format Information: »
— 8" SSSD Standard $ 5.00 $ _ 5%" DSDD 48 TPI Soft Sector $ 5.00 $ — 5% SSDD 48 TPI Soft Sector $ 6.00 $ — 5%" S$ D__TPI___ Sector $ 10.00 $
Format Brand:
Shipping Information:
O UPS Ground USA $ 4.50 $ 0. Air Mail Canada. $ 9.50 $ ©) Air Mail Foreign $ 12.50 $ Subtotal: $ Tax (N.Y. Residents Only): | $ Total (Thank You)): $
POs and UPS CODs accepted by phone only. Sorry, credit card payment unavailable. Personal checks require 10 days to clear. Non-USA orders must be prepaid by bank draft in US dollars.
Computer Helper Industries Inc. Post Office Box 680 ; ~ Parkchester Station, N.Y. 10462 (212) 652-1786 9AM-5PM M-F
MICRO CORNUCOPIA, #32, Oct-Nov 1986
By Mark J. Boyd Computer Science Department
University of North Carolina at Asheville Asheville NC 28804
Customizing The FTL Modula-2. Editor For The a
If you’ve been looking for Modula-2 | for your Kaypro or a customizable text . editor which will let you customize
your keypad, this is your column.
be years I’ve wanted a text editor which could use the numeric keypad and cursor keys on my Kaypro II. These keys send out unique codes, but the Kaypro BIOS translates them to codes that can be generated by other keys on the keyboard.
For example, the seven key on the _keypad (let’s call it KP7) sends the non-ASCII code Elh, but the BIOS translates it to ASCII 37h, the same as i” | | _the seven key on the main keyboard | DOWN SCREEN {| UP (let’s call it 7). Now if I want to . | . |
Figure 1 - Custom Keypad For The Kaypro FTL Modula-2 Editor
| GO TO BOL} MOVE {.GO TO EOL! | OR | BY | oR =f | UP LINE | WORD {| DN LINE |
INSERT
UD OF ES VOSS OTS OC PSS SSS see ee SSeS wesw
associated with 7. I’ve gained a func- tion, but lost a digit!
Any program that intakes CP/M BDOS or BIOS calls to read a character from the keyboard gets the same char- acter from CP/M whether KP7 or 7 is pushed. For an editor to distinguish between those keys, it must directly read the keyboard serial port. But no editor designed for a CP/M system would do that because, if it did, the editor could work only on the Kaypro.
Possible Solutions
That meant I either had to write my own. editor, or get an editor with source code that I could modify. I wasn’t dedicated enough to write my own, and, until recently, the source code wasn’t available for any editor I might have wanted to customize.
But there’s a third possibility, and probably some of you are using it; I could redirect the BDOS calls through a filter program in high memory (above the BDOS). I don’t like doing this because the filter program has to be loaded separately from the editor. It also requires moving CP/M, a non- trivial procedure that reduces the TPA available to all programs.
My Choice
Well, now I have a custom editor. It’s based on the FTL Modula-2 editor from Frank Hogg Labs (818-791-7979). What's more, I was able to modify and recompile that editor, which is quite powerful, in less than a day. Both the power of the editor and the ease of its modification are a direct result of the Modula-2 language and the FTL com- piler. I’m impressed with both.
The FTL editor, which comes with
the FTL Modula-2 compiler package (about $50), has a WordStar-like user interface, but has several advantages over WordStar as a program editor.
The most important is that you can have up to three windows open into
different parts of the same file or into different files. You can move easily
between the windows and copy/move
sections from file to file. But that’s not all: proper move by
word, automatic restarting at the posi-_
tion you left off when you last edited a
file, and nice user-definable macros —
(automatically saved to disk and re-
loaded for you). For an extra charge (about $30) you can get the source code for the editor, along with some useful utility programs.
My custom version adds. several
' commands, remaps the cursor keys to
work properly (try that with Word- Star!), and provides 14 single-key com- mands from the keypad. These com- mands allow me to do most of my editing without control keys. Figure 1 shows the definition of my keypad commands, .
How I Did It
In order to do this customization, I had to create a new assembly language module (KEYPORT.ASM) that reads a character from the keyboard port and translates the special codes. The ‘FTL system comes with an assembler for
just this kind of thing. I also modified
three of the main modules in_ the editor: the one that handles terminal I/ O (TERMINAL.MOD), the one that interprets keyboard entries (KEY-
-BOARD.MOD), and the one that im-
52 MICRO CORNUCOPIA, #32, Oct-Nov 1986
t
4
Figure 2- New Assembly Language Module For Editor
DEFINITION MODULE Keyport;
(* Used to directly read the Kaypro
keyboard codes and
#) FROM System IMPORT WORD;
PROCEDURE GetKey() :WORD;
END Keyboard.
we we we we
label : in a,O7h 01 Z,out a,05h hl,keymap be,mapout-keymap
nz,out de, keymap a
hl,de
de, mapout hl,de
a, (hl)
hil
de
@,a
d,0O
de
(hl)
ld
pop pop ld ld push Jp
s;mapping tables
mapin: db db db db
Ofth, Of2h, Of4h, Of3h Ob1h, 0cOh, 0o1h, 0c2h OdOh, 0dth, 0d2h, 0e1h 0e2h, 0e3h, 0d3h, Oeth Ob2h, 0c3h,0ffh
00h
005h,018h,004n,013h
003h, 010h, 06h, 01 fh
007h,019h,01eh,01ch
01dh,00ch,014h,00fh - 012h,016h
plements 1 most of the cOnmanHts (ED- ITCONT.MOD).
The first is required to use the new . keyboard access routine. The second allowed me to replace some two-key commands with single-key commands (for example 4Q “F to FIND a string).
This is the assembly language implementation module Keyport - read keyboard code directly
sModula-2 reference point scheck for keyboard input
sdone if none waiting, ret 0000h sget key value ssearch for match using cpir
sdone if not a special key
;clear the carry sget index of char inl
;point to output table
s;get corresponding value in a
sget return address _
sremove allocation for return value 3put return value in de
;put de on stack jreturn
used to convert Kaypro II special key codes
p, down, right,left 91,2,3 5,6,7 295"s rotat
'
-', ENTER, end of table
we we we we we -—@fFros ~
3;offset, saves code sup, down, right, left 30,1,2,3
34955657
$8,9,',! tat
stot, ENTER
The third was to change two existing commands into a more useful form. The code for the Assembly Language module is given in Figure 2.
(continued next page)
: oe See bd ; : * F :
MICRO CORNUCOPIA, #32, Oct-Nov 1986
A-OK CompuTERsS
2005 S.E. 82nd Ave. Portland, OR 97216 (503)771-6758, 771-6862
| DELUXE 1 MEG MCKNIGHT-XT-TURBO
w/30 Meg Seagate HD, full bundle of software (spreadsht, databse, grphcs, tutorial, more), multifunction w/disk controller & 2 Teac Drives, monitor adapter(your choice) ASSEMBLED - $1,450
BARE BONES MCKNIGHT-XT
Includes slide on case, enhanced PC style keyboard, Deluxe 135 watt P/S, 256K of Ram, Turbo, w/manuels, 100% FCC Approved. KIT - $479
SOG SPECIAL!!! Includes Televideo Telecat-286 Meg, 8 MHZ, 7+ x faster than IBM PC!!! AT compatible, w/20 Meg HD & 1 tloppy(needs video crd & mmntr). $2,400
PCKG. OPTIONS OR SEPARATELY FLIP-TOP CASE(not FCC apprvd)Add $20 FLOPPY DSK CNTRLLR upto 4 OR,Add $39.95 CGA(IBM Compatible Color Grphcs Adptr w/Composite Video Port)$79.95 CGA CARD w/Prntr Port(no video,only RGB)$99 TTL IBM Mono. Adptr w/Prntr Port)$89 MGA(Hercules Styl Grphes w/Prntr Port- »inclds sftwr)$109.95 .
20 MEG SEAGATE HD w/OTC CNTRLLR $425
20 MEG * " HO w/WO CNTRLLR $425
30 MEG * * HD w/ADAPTEC,RLL CNTRLLRS$550 2ND 20 MEG OR(sme order)w/CABLES $295 2ND 30 MEG OR(sme order)w/CABLES $385 SET OF WO CABLES $10
MULTIFUNCTION CARD w/DSK CNTRLLA $99
AT STYLE KEYBOARD FOR XT $30,or $99 w/O McKnight-XxT.
5151(KEYTRONICS STYLE)KEYSRD FOR XT, Add $30,or $99
AT STYLE KEYBRD FOR XT or AT Add $40,0r $110
5S1St(KEYTRONICS STYLE)KEYBRD or AT Add $40,or $110
135 WT POWER SUPPLY "IBM" SIDE SWITCH- (Cheap) $75
135 WT POWER SUPPLY "IBM" SIDE SWITCH, DELUXE $85
MULTIFUNCTION, UPTO 1 1/2" MB,256K/64K MEM. CARD(w/nice sftwr)$175
(All mitfnctn. cards incld. clcek/clndr- »stl,parall,& game ports)
TEAC DRIVE-SSBV(None Better)$99
TOSHIBA 1.2 MB OR(New Televideo take outssthey bought TEACS)$125
PRINCETON MAX 12 MONITOR-AMBER(CGA & TTL3US Bank likes this one)$163 TAXXAN-KX1212 MNTR-GREEN ONLY (Amber Flickers)$179
100 MB HD(70 MB Formatted w/Adaptec,RLL becomes MB)$1,250
SHARP RGB MNTR/TV DELUXE(Very Nice;- inclds IBM Cable)$375 NEC-MULTISYNC MNTR(Our better than our price)$575 WARRANTY: Over the counter while you wait service at our Portland store, or same day turn around UPS, Greyhound, Trailways;90 Days warranty on options, 6 months on McKnight-XT.
$2,400! !
coaposite
FOR XT
service is
TELEVIDEO - TELECAT 286 MEG AT COMPATIBLE - ONLY $2,400!!
PRINTERS PANASONIC $269 LEGEND WIDE CARRIAGE 1385 $375 OKIOATA $549 OKIDATA 293 ' $699
Call for others.
Prices are cash;US dollars. Next day shipping. on 1st Inter. or U.S. Nat. Bank. All others allow 2. wks.
Add 10% for CO0,3% for. shipping costs, -' or we charge you actual weight,which- ever is cheapest.
We have happy customers world-wide. Hope to serve you soon! REMEMBER: : The Mcknight-xT is compatible w/the IBM PCI!! :
FREE SOFTWARE WITH EVERY PURCHASE eBob McKnight eLinda Parker ¢Patty May
53
SOG SPECIAL!!!
100%
KAYPRO
(continued from page 53)
The modifications to the other mod-
ules are given (in DIF format) in -
Figure 3 and Figure 4. Finally I recom- piled and linked all the. modules to create the new editor. A submit file for this purpose is given in Figure 5.
~ Modula-2 makes modifying the pro- grams very straightforward because the modules are independent except for the parameters passed back and forth in procedure calls. As James Albert pointed out in ‘‘Practical Pro- gramming in Modula-2’’ (Micro C, issue # 31), this is an easy language for doing complicated programs. The com- bination of strong structure and the ease of integrating really low level modules (directly reading a port is
about as low a level as yew can get) is |
unique to Modula-2.
I’ve worked extensively in various ‘assemblers, as well as Pascal, C, and FORTRAN, and I think Modula-2 is the best general purpose language I’ve ever used. With the FTL compiler, it’s also a fast enviromnent for program development. Turbo Pascal is nice, but FTL Modula-2 is much better for any- thing complex.
The FTL Modula-2 system doesn’t compile as fast as Turbo Pascal be- cause the various parts are not memo- ry resident at all times. However, Modula-2 provides a much more so- phisticated and flexible programming environment than Turbo. Its parts are still nicely linked together, e.g., the compiler loads the editor and points to the error when a syntax error is detect- ed.
Using a RAM disk, my edit-compile- edit cycle time was about one minute on a 10K source file. The time to recompile and link the entire editor _ (see Listing 4) was ten minutes. These times are for a 5MHz Kaypro 8.
Here’s an algorithm for modifying ‘and recompiling the FTL Modula-2 editor:
1. Enter and compile the KEYPORT definition module.
2. Enter and assemble the KEYPORT implementation module. . _ 3, Extract TERMINAL.MOD, STOR-
AGE.MOD, and COMMAND.MOD ‘from MODFILES.LBR.
4, Extract TERMINAL.DEF, STOR-
enemenee Line +++4+4+4+4+4+ Line +FROM KEYPORT IMPORT GetKey;
wwnennnwe Line a i:=BDOS(diofe, 255);
+++4+4+4+4+4+ Line + i:=GetKey();
9 of 'C:TERMINAL.MOD! ---- 9 of 'A:TERMINAL.MOD! 444+ (* added import of GetKey *)
50 of 'CsTERMINAL.MOD! ----
51 of tAsTERMINAL.MOD! +4++4 (* replaced BDOS call with GetKey #)
EDITCONT.MOD CHANGES FROM STANDARD
wwe----= Line 504 of 'C:EDITCONT.MOD' -—--
---PROCEDURE FarLeft; ~=-~BEGIN
one IF CurrentLeftMargin>0 THEN
--- ChangeMargin(-INTEGER(CurrentLeftMargin)) _
++++4+4+4+4+ Line 504 of *AsEDITCONT.MOD! ++++ +PROCEDURE FarLeft; (* Modifed to act like DEC move by line, backward *)
+BEGIN IF LinePos=0 THEN Up; ELSE
END; SetLinePos( 0); : LinePos:=0; ChangePos; END; END FarLeft;
t+eeeeeeteet
IF CurrentLeftMargin>0O THEN ChangeMargin(~INTEGER( GarrentisttNargia) )
+PROCEDURE FarRight; (# Modifed to act like DEC move by line, forward #)
+BEGIN + IF LinePos=LineLen THEN + Down;
wenn---- Line 510 of 'C:EDITCONT.MOD*? --—~
os LinePos: =0; won ChangePos; pues END FarLeft; ---PROCEDURE FarRight; ~~-~-BEGIN Soe SetLinePos(0);
++++44+4+ Line 522 of 'AsEDITCONT.MOD! +4+++
-AGE.DEF, and COMMAND.DEF from
DEFFILES.LBR. 5. Modify KEYBOARD.MOD, EDIT-
‘CONT.MOD, and TERMINAL.MOD.
6. Modify the submit file to fit your drive assignments. You will have to break it up into parts if you have only two double sided drives. I’m not sure that the editor can be recompiled with
a stock Kaypro II, because of the limited disk storage. It would require a lot of disk swapping.
7. Enter the modified submit file(s) and SUBMIT them to generate the new version of the editor.
ET I ER I EI I I TG I OTN I I EIS IO COTE LEE EEG ETE TES IE IIIA ELIE OES EEL CELE LEASE TOSI SCIONS IA ETL
54 MICRO CORNUCOPIA, #32, Oct-Nov 1986
Figure 4 - Changes From Standard KEYBOARD.MOD
wweenwon= Line 294 of 'C:KEYBOARD.MOD' --—~
MainTable[13x]:=Left; MainTable[ 18x]: =Down; MainTable[04x]:=Right; MainTable[05x]:=Up;
(# Other control keys*)
MainTable[07x]:=DelOneChar; MainTable[19x]:=DelFullLine; MainTable[16x]:=FlipInsert; MainTable[0ex]:=BreakLine;
++++++++ Line 294 of '"AsKEYBOARD.MOD! MainTable[13x]:=Left; MainTable[18x]:=Down; MainTable[04x];=Right; MainTable[05x]:=Up;
MainTable[10x]:=FarLeft; MainTable[1cx]:=Find; MainTable[1dx]:=Replace; MainTable[1ex]:=DelToEOL; MainTable[1fx]}:=FarRight;
MainTable[07x]:=Del0OneChar; MainTable[19x]:=DelFullLine; MainTable[ 16x]:=FlipInsert; MainTable[0ex]:=BreakLine;
wneannee Line 307 of "CsKEYBOARD.MOD'
--- MainTable[03x] :=DownScreen;
<< MainTable[ 12x]:=UpScreen; MainTable[14x]:=DelWord;
++++++++ Line 315 of *'A:KEYBOARD.MOD! + MainTable[03x]:=DownScreen;
+ MainTable[ 12x]: =UpScreen;
+ MainTable[ 14x]:=DelWord;
oweneee= Line 316 of 'C:KEYBOARD.MOD' == MainTable[0bx]:=DefLabel;
-<- MainTable[7fx]:=DelBack;
o—= MainTable[0cx]: =DoFind;
“<< MainTable[ 1fx]:=DelBack;
++++4+4+++ Line 324 of 'AsKEYBOARD.MOD' + MainTable[0bx]:=DefLabel;
+ MainTable[7fx]:=DelBack;
+: MainTable[0cx]:=DoFind;
wwennne= Line. 326 of 'C:KEYBOARD.MOD'
noe MainTable[0fx]:=Endinterpret;
++++4+++4+ Line 333 of 'A:KEYBOARD.MOD! + MainTable[0fx]:=Endinterpret;
(#Ctrl G#) (#Ctrl Y#) (#Ctr1 V#) (#Ctr1 N#)
+++
(# Kaypro <= #)
(* Kaypro dn arrow *) (# Kaypro -—> #)A
(# Kaypro up arrow *)
(# ~ Added for remapped Kaypro Keypad *)
(* kp1 *) (# kp7 *) (* kp8 *) (# kp6 #) (* kp3 *)
(*#Ctr1 G or (*Ctrl Y or (#Ctrl V or (#Ctr1 N #)
(#Ctr1 C#) (#Ctrl R#®) (*Ctr1 T#)
+++ (*Ctr1 C or (#Ctr1 R or (®Ctr1 T or
"(8Ctri K#) (#Del *#) (#Ctri L*)
(# Other control keys ~ some remapped to keypad *)
kp4 #) kp5 *) kpENTER *)
(#*. on Osborne
e+ (#Ctrl K or (*Del #) (#Ctr1 L or
(#Ctr1 O#)
+++ (*Ctr1 O or
kp2
kp9
kp-
HiSpeed C Library
The HiSpeed replacement library for CP/M Tool- works C/80 uses either Microsoft Macro-80/Link-80 or SLR Systems SLRMAC/SLRNK.
Compile HELLO.C into a 254-byte HELLO.COM in 10 seconds with a single command line.
Features: Fast K&R incremental development. Full STDIO stream library: fseek, fwrite, etc. Function calls match major MS-DOS, CP/M-68K and UNIX compilers. Painless portable code. Full math, strings, searching, sorting, timing. One function per page documentation with examples that work (410 pages, 310+ functions). Utilities to archive, bold-print, beautify, cross- reference, function map, .. . (27 in all).
Printed reference manual and object code
One megabyte of source code on disk
Free brochure. Phone orders shipped immediately. All Media Master formats and 8” sssd.
Viking C Systems 2243 South Belaire Drive
Salt Lake City, UT 84109 1-801-466-6820 ask for Grant
Figure 5 - Submit File For Recompiling Modified Editor
md terminal.def m2 terminal.mod md storage.def m2 storage.mod md command.def m2 command.mod md files.def m2 files.mod md screenio.def ' m2 screenio.mod md makeedit.def md editstat.def , md setupcal.def. m2 makeedit.mod md editcont.def md macros.def md domenu.def md menu. def _Md editdisp.def md editcont.def md keyboard.def m2 menu.mod m2 editstat.mod m2 macros.mod m2 domenu.mod m2 editdisp.mod m2 editcont.mod m2 me.mod m2 keyboard.mod m2 setupcal.mod m2 macros,mod ml me/d
MICRO CORNUCOPIA, #32, Oct-Nov 1986 55
By John P. Jones
Diddling With The Operating St Louis MO G1
System From Pascal
Sometimes you need to deal with the operating system, especially when the language you're working in doesn’t do what you need to do. Herein John shows you how to give your programs direct access to MS- DOS (and CP/M) so they can, for instance, do directory searches.
ithin an application program there’s a hierarchy of pre- ferred service use. The tools
and facilities which the language. pro- vides, or which can be written in the language, should always be used first. In some cases, even with a language as complete as Turbo Pascal, there may be a need for services at a lower level. .
The first step below the language is the operating system. High level lan- guages that are intended to operate on a variety of computers will use operat- ing system calls to perform virtually all of their input/output functions. The operating system itself will be relative- ly hardware independent if it relies on calls to the system BIOS (Basic Input Output System).
In some cases there may be BIOS facilities which cannot be reached through normal operating system calls so applications may then need to do direct BIOS calls.
At the lowest level is direct hard- ware I/O. If you use this method in your programs, yott cannot expect them to run on more than the most compatible machines.
Operating System Services
Turbo Pascal provides facilities to use all four levels of this hierarchy. This time I'll give some examples of the second level — Operatine synem calls.
For CP/M, the most likely services you might need which aren’t provided by Turbo are: reset disk i allow a
(314) 645-1596
Figure 1 - Search And Display Program For MS-DOS ©
Program get_directory; { MS-DOS version 2 or above }
const get_dta = $2f00; { get DTA address fxn } srch_first = $4e00; { search first matching file } srch_next = $4f00; { search next matching file } srch_attr = $0000; { don't use file attributes in search }
type
regset = record { image of processor registers } ax, bx, cx,dx,bp,si,di,ds,es,flags ;: integer; end;
dtatype = record { image of Disk Transfer Area } null : array [0..20] of byte; { used by DOS } attr : byte; ' { file attribute spec } time : integer; { coded time of day } date : integer; { coded date } fsiz : array [0..1] of integer; { file size in bytes } fname : array[0..12] of char; { filename, punctuated } end;
dtaptr = “dtatype;
var regs ;: regset; curnt_dta : dtaptr; searchname : string[64]; { room for a complete path } i: integer;
begin regs.ax := get_dta; { request code to proper place } msdos(regs) ; { get and assign DTA address } curnt_dta := ptr(regs.es,regssbx) } searchname ;:= 'DATAK®. JNK'+*@; { what files are we searching? } regs.cx := srch_attr; { search attributes } regs.ax := srch_first;{ request code } regseds :: seg(searchnamel1]); { let DOS know where the string is } regs.dx := ofs(searchname[1]); msdos(regs); { find first occurence } if regs.ax = 18 then { unsuccessful? } writeln('No matching files") { what went wrong? } else while regs.ax <> 18 do { while we're successful } begin writeln; { for demo, just ship to screen } i := 0; { character array pointer } while (curnt_dta*.fname[i] <> *@) and (i <= 12) do begin write(curnt_dta*. fname[i]J); i := suce(i);
end.
56 ee CORNUCOPIA, #32, Oct-Nov 1986
user to change a disk and write to the new one), the directory search calls, get/set user code to change to another user area, and the set file attribute function. The CP/M manuals (you should have received them with the operating system) detail them all.
The services MS-DOS provides which are not available in Turbo in- clude file search, system clock access, file attribute get/set, and the like. They are NOT detailed in the manuals you get with MS-DOS, but in a separate, extra cost manual. An excellent alter- native is Peter Norton’s Programmer's Guide to the IBM PC, published by Microsoft Press.
A Concrete Example (Heavy Stuff) You have written a program that can use any of several data files. To be consistent, these all have names in the range DATA4JAN.JNK to DATA4DEC.JNK. Also, the program is designed for a turnkey (NOT turkey) system, with many users not even knowing what a filename is, much less how it is structured. Within Turbo itself you can prompt for a filename, attempt to open the file, and, if unsuc- cessful, re-prompt or abort. Not too neat for the naive user. Alternatively, you could input the filename on the command line, but this has the same objections for the beginning user... Both MS-DOS and CP/M provide system calls to search a disk’s directo- ry for files matching an ambiguous name. Turbo, in turn, provides a built- in procedure for making operating
system calls, though they are less -
convenient to use than the higher level procedures.
To use system calls your program >
has to do all the preliminary setup, and to write this setup code you have to know quite a bit about what the operating system expects.
Figure 1 is a program to search and display all files matching an ambigu- ous file specification for MS-DOS, and
Figure 2 - Search And Display Program For CP/M
Program get_cpm_dir;
const set_dma = $1a; srch_first = $11; srch_next = $12;
type
feb = record drive : byte; fname : array[0..10] of char; extent ;: byte; 81,82 : byte; ro : byte; map : array [0..15] of byte; curr_rec : byte; rndmyrec :‘array[0..2] of byte;
ends .
var result, i: integer; dma : array[0..127] of byte; our_fob : fcb;
begin bdos(set_dma, addr(dma)); our_feb.drive := 0; our_fcb.fname := "DATA??2JNK'; our_fcb.s2 := 0; our_fcb.extent := 0;
result := bdos(srch_first, addr(our_feb)); { gotcha? } { yeah, loop til not gotcha }
if result <> 255 then while result <> 255 do begin
{ won't use default DMA buffer for CP/M } { request codes as above }
{ image of what CP/M expects } { drive spec }
{ filename }
{ extent (16K block) number }
{ record count for file }
{ disk allocation blocks used } { current record for read/write }
{ random I/0 record }
{ make CP/M put it where we want } { default drive } { this is what we want }
{ is anybody home? }
result := result shl 5; { result * 32 = filename address offset in DMA }
writeln;
for i := result + 1 to result + 11 do { 8 char name, 3 char extension }
begin write(chr(dma[{i]));
if i ~ result = 8 then write('.'); { proper punctuation }
end; result := bdos(srch_next); end
else writeln('No matching files found.');
end.
Figure 2 is the equivalent program for CP/M.
First the DOS. All DOS calls are made through software interrupts. Software interrupts can be thought of as two-byte ‘‘long calls’’ (a long CALL is normally five bytes). The Turbo procedure MSDOS(registers) performs an INT 21 instruction after loading the processor registers from the record variable specified in the parameter.
MS-DOS Program .
The constants declared in the pro- gram define three service requests and one DOS parameter. The service re- quested is normally specified in the AH register, the high order byte of the 16-bit AX register. The requests we'll need are: get DTA (data transfer area)
{ sorry about that }
address, search for first matching file, and search next match. The search attribute constant could be used to qualify the search based on file attrib- utes (hidden, system, or archive). — The type REGSET is an image of the internal processor registers and is used to set up all the information DOS will need, DTATYPE defines what a DTA looks like and will allow us to retrieve the information DOS returns. (Not all system calls return data in the DTA, but the ones we use in this program do.) As you can see, we get back a lot | more information than we use. We’re interested in the last field, the filen- ame. Don’t mess with the first field of
the record; it’s not really null. It’s
(continued next page)
MICRO CORNUCOPIA, #32, Oct-Nov 1986 57
PASCAL PROCEDURES ©
(continued fram page. 57) ..
used by DOS for repeated calls for get next match.
The final type is a pointer to a DTA, so we can get at it no matter where in memory DOS has put it.
The first system call we make is to get the address of the current DTA, which has been set up by DOS. This address is returned in registers ES (segment) and BX (offset) and is: as- signed to the pointer crnt_dta. DOS
expects the ambiguous filename. to be © in the form of an ASCIIZ string, i.e.,.a
character string terminated by a binary zero. a
By assigning our name to a “‘stan- dard’’ Pascal string, appending a zero (4@), and letting DOS know where to find the first character (segment in DS and offset in DX) we keep everyone happy. DOS will parse a file specifier including path, drive specification, and wildcard characters, which makes things easier.
For the search first operation, we also need to put the attributes in the CX register. DOS returns a completion code in AL with the code 18 meaning ‘‘no more matches found.’’ The matching filename can be found in the DTA as an ASCIIZ string.
CP/M eosin
The CP/M system calls are’ set up much the same, but the data is a bit harder to retrieve after: the call. The
procedure/function BDOS(func, par- -—
am) will put the function # in C and the parameter (if supplied) into the DE register pair of the Z80. When called as a function, the result returned in the A register is the function return value. For calls expecting a 16-bit
return value, there is a related func-
tion BDOSHL. ' Rather than use the default DMA
buffer which CP/M sets up, the pro-_ gram’ declares a variable for the re-
turned data and'then calls the operat- ing system to set it as the DMA area. CP/M also requires that an FCB (file
control block) be set up before any
related file calls are made.
The first byte of an FCB is the drive _-: |
specifier; zero means the currently
logged’ drive, and 1..15 represent’
drives A..P. The filename is next,
without the period between name and
extension. In. addition all asterisks .
must be expanded to strings of ques- tion marks. The extent number must
be set to zero in order to find the first
directory entry for each file.
The file search functions can return’.
several values. Values 0, 1, 2, or 3 represent a successful search, with the
filename to be found in the current ::
DMA buffer at position (result * 32).
The filename returned has a drive . specifier prefix, which the program ignores, followed by the filename and
extension without punctuation, =
Back To The Beanpies
Each of these programs, with a little massage, can be turned into a proce-
dure to search a specific drive’s direc-
tory. The calling program could then
, display a menu of choices for the user "— much less error prone than expect-
ing the user to remember what the
’’. filename should be.
é
BARGAIN 68000 OPERATING SYSTEM $50
Now “you. can put K-OS ONE, a on your 68000. use and has all of the features you would
' operating system,
‘simply’ great It is simple to expect
from an operating system in the class of MS-DOS or
CP/M. It's source code for command processor.
easy to
They. are written in HTPL, You don't have HTPL? No problem, included. The
language hybrid.
the HTPL compiler is operating. system is' small.
the operating
customize because you get
system and the
a powerful, high level,
K-OS ONE You can edit and =sre- :
: compile the whole operating system.in only 64K of
RAM.
With K-OS ONE,
tools you will hardware.
a 68000
you can read and write ASCII files on MS-DOS format diskettes. need to port K-OS ONE to:
-This gives you the your
CP/M is a Trademark of Digital Research MS-DOS is a Trademark of Microsoft Corporation K-OS ONE and HTPL are Trademarks of Hawthorne Technology
To order, call:
(503) 254-2005
“XN > foe
58. MICRO CORNUCOPIA, #32, Oct-Nov 1986
Hawthorne Technology
8836 SE Stark . Portland, Or 97216
Graphics for the Rest of Us
If you own an. '84, '85 or '86 Kaypro CP/M computer, you can quickly and easily ~ draw diagrams = /- sz Yess
and illustrations _ "A great way to fly... the power of this like those shown here. All you need is the program is unlimited." |
"A fabulous program... SCS-Draw permits you to draw to the best of your abilities -- and your computer's."
_- Profiles, March 1986
right software: SCS-Draw. a ; - Cornerstone Magazine, June 1986 SCS-Draw turns your mild-mannered Kaypro "Extremely easy to use... excellent for
into a powerful drawing machine, with creating logos, bulletins and newlsetters." features like: . . - . = Clergy KUG, July 1986
* True pixel-by-pixel drawing
"The documentation is among and editing capability.
the best I've seen."
| 2 oe is -lae 353 - MicroTimes, August 1986 * Multi-screen drawings, for a
total resolution of over
"Best use I have seen of the 120,000 pixels. (336x362)
screen graphics."
. - $CS-Draw user, Australia
* Powerful printing options like rotation, enlargement, and
"The best piece of commercial mirror image.
software I have bought... the quality is 4.0." —
* Block move and file merge. - SCS-Draw user, Idaho
* Context-sensitive help, pop-up menus and a 96-page user's guide. (Illustrated, of course.)
"A pleasure to use... user- friendly, fun, well put
together." 2 - $CS-Draw user, Michigan
Get in on the excitement — get your SCS-Draw supports most
copy of SCS-Draw today. dot-matrix printers, . including Okidata,
[] Send me SCS-Draw immediately Epson, Star Gemini, by UPS 2nd-Day Air. Payment C. Itoh, and IBM.
Daisywheel printers from Juki, Diablo and Brother are also supported, and a [] I have to see it to believe it -- custom installation program is provided send me a copy of the SCS-Draw for printers not listed here. Demo. Program. I have enclosed | $5.00 for shipping and handling.
of $59.95 is enclosed.
Second City Software | 312-577-7680 — _ Mount Prospect, IL 60056
(Specify Kaypro model when ordering.) _
This’ page was created and. printed using only SCS-Draw and WordStar.
“MICRO CORNUCOPIA, #32, Oct-Nov 1986. 59
Writing A Printer Driver
For MS- DOS
‘Don Fletcher has, in a. very short time, become a household word in the Micro C community. After making his name with the. logic analyzer series, his ‘Intro To 8088 Assembly | Language Programming’’ at the SOG V was well attended. (Well attended by everyone, that is, but Don. He
- wound up grounded by an ear infec- tion.) |
Herein, he more than makes up for his ears by covering not only Assem- bly Language programming but device drivers as well (in his own infectious style). If you're confused by segments or Assembly Language or drivers, you
. should hear him out.
oy, that sure was a good deal on B: parallel printer, but then a
street-corner van doesn’t have much overhead. No documentation with it, but after so many printers, no problem — I'll figure it out.
Okay, cable all hooked up, here goes. Hmmm, it won’t print. Well, when. all else fails, read the manual. Oops, let’s see, where’s my emergen- cy. documentation kit? (A. Japanese- English dictionary.) I’ve never seen a printer that strobes data in a nibble at a time. Well, first time for everything. Time to find the BIOS listing, the Assembly PeOneneee: reference, and get to work.
Sound familiar? That was the good old days of working with CP/M and external devices. Want. a RAM disk, stepper motor driver, simple RS-232 channel with XON/XOFF protocol? Lotsa luck. (Or more E sealietically, lotsa wore)
MS-DOS Device Drivers
‘Life improved with the introduction of MS-DOS (or PC-DOS) version 2 or later because the Microsoft program- mers borrowed a page from the UNIX manual and supported external device
drivers. So in MS-DOS if you don’t like an existing driver (such as CON, PRT, AUX, CLOCK, or a disk drive), or if you want to create a driver for a
‘new device (such as a stepper motor
controller, or RAM disk), you can write the code, and at boot, tell MS-
-DOS to use it.
The only difficulty is 5 that you must write the driver in Assembly Lan- guage. But if you can modify a device driver in CP/M’s BIOS, there’s no reason you can’t do it in MS-DOS.
This is a two-part tutorial on device drivers. I’ll cover a simple character driver (a parallel printer routine) in this installment, and stepper motor and RAM disk drivers (block mode drivers) in the next issue.
Assembly Language (Quick And Easy) First of all, we'll cover Assembly
"Language so you won't be totally lost
when we start looking at code.
By Don Fletcher
University of Missouri at Columbia t. 7 Box 120
Columbia MO 65202
(314) 443-7294
Segments
When Intel developed the 8088, it made the address space one megabyte (20 bits of address bus), but it made
the address register (usually called the
offset register) only 16 bits (64K). So
they added four additional 16-bit reg-
isters called ‘‘segment’’ registers. Any one of these segment registers can be added to the offset register to create the full 20-bit address (bits 0 through 19).
The address register holds bits 0 through 15; a segment register holds bits 4 through 19. So the segment register addresses memory in a mini- mum of 16-byte chunks (called a para- graph), while the offset register can address memory in 1-byte minimums. Again, the 20-bit physical address is formed by adding the 16-bit segment address to the 16-bit offset address. The result is the 20-bit physical ad- dress (see Figure 1).
16-bit offset address 16=bit segment address
20-bit physical address
1000 0000 0001 0000 0001
0000 0000 1000 0001 81H + 1000 0000 0000 1000
80080H
80101H
Figure 2 - Example Of Segment Definition In Assembly Language
Segment Para Stack 'Stack'
DB 1024 Dup (OFFH)
Ends
31K of stack space
Segment Para Public ‘Data!
DB 'This is a memory test'
Ends
‘Segment Para Public ‘Code? .
3Code follows
SS:Stack, DS:Data, CS:Code-
60 © MICRO CORNUCOPIA, #32, Oct-Nov 1986
The four Segment registers have specific uses. The CS (Code Segment) register normally points to program instructions (code), DS (Data Segment) register points to general data, SS (Stack Segment) register is used for stack operations, and ES (Extra Seg- ment) is used as a general purpose segment. The segment registers can point anywhere in memory.
If all four segment registers contain the same value (or point to the same . general area), thus limiting the pro- gram space to 64K, you have the makings of a COM file if the origin (offset) is 100H, or a device driver if the origin is 0.
The segments are defined within an Assembly Language program using the ‘‘Segment’’ and ‘’Ends’’ com- mands, and then referenced using the “‘Assume’’ command (see Figure 2).
- The command “Para” tells the as- sembler to start the segment on the
Figure 3 - 8086 Addressing Modes
Register
next 16-byte boundary. Each segment is named in the label field (‘’Stack’’ “‘Data,’’ and ‘’Code’’) in case there is more than one segment in your pro- gram. The Assume command loads the addresses of the labels (Stack, Data, Code) into the segment registers (SS, DS, CS).
In the case of our device driver, I’ve named the segment ‘‘Code”’ and refer- enced all segment registers (except the stack) to the same segment location.
This establishes a 64K (maximum)
block of memory for our driver code and data.
Procedures
The pseudo-ops ‘’Proc’’ and “Endp”’ along with -‘’Near’’ and “‘Far’’ divide your program into logical blocks known as procedures. If your procedure is within the present seg- ment, it’s a ‘‘Near’’ procedure (the segment register is unchanged). If it’s
DESCRIPTION
Put the contents of memory location Test into AX
not within the present segment, it’s a “Far’’ procedure. ‘’Proc’’ defines the start of the procedure; “Endp™ i is the end.
You don’t know how the segment registers will be set when DOS calls your device driver, so the driver must be a ‘‘Far’’ procedure.. Therefore, the printer driver example is defined as Far procedure ‘‘Device.’’ The driver procedure itself calls several Near and Far procedures.
Addressing Modes
As you will see in Figure 3, the addressing modes within the 8088 are similar to the 8085. .
In almost all cases, when referencing memory in an operand, the segment register used is DS (data segment). If you need to reference any other seg- ment register, simply place it in front of the operand. For example:
Mov AX,CS:{BX]
This would use the Code Segment register for the segment address in- stead of the Data Segment register. In this case you’d be copying the 16 bits of data from memory to the AX reg- ister. The memory location is calculat- ed by adding the contents of the CS segment register to the contents of the BX register. (In this example, the BX register is the offset register.)
(Note: The processor’s general pur- pose 16-bit registers are called AX, BX,
CX, and DX. If you want to deal with just the high byte (8 bits) of AX you’d call it AH, and the low byte is AL. The same goes for B, C,andD.)
Indirect Mov AX,([BX] © Put the contents of the memory location pointed to by BX into AX
Base + Mov AX, [BX+3] Put the contents of the memory location
Displacement pointed to by BX+3 into AX .
Mov AX, {BX+SI+5]
Data Structures .
Data structures can help you pass blocks of data between routines. Sim- ply define a base location, then refer- ence the structure from that-base using the ‘Struc’ and ‘Ends’ commands.. You
Put the contents of the memory location pointed to by BX+SI+5 into AX
‘Base + Index + . Displacement
. (continued next page)
: MICRO CORNUCOPIA, #32, Oct-Nov 1986 61
WRITING A PRINTER DRIVER
(continued from page 61)
move data into or out of the structure
: R : ° — by using the [base.offset] format (see equest equ . ES [Dr] ;Base address is ES segment and DI register
Figure 4). Reqhdr Struc ;Start the structure Then within your program, if you ; want to move the contents of AX into Numb DB Numb is a byte with no particular value : Unit DB s;Same for Unit Stat, and Numb into BL, the .code Stat DW ;Stat is a word (16 bits) would look something like Figure 5. Address DD. . sAddress is a double word (Segment+offset) Since data is transferred in blocks to ; and from a device driver, the above. Reqhdr Ends
structure format makes the code much more understandable.
PC Printer Information The parallel printer driver must com- municate with two output ports (data
Figure 5 - Using A Data Structure To Pass Data
: Mov [ Request. Stat], AX ;Move contents of AX into memory and control out) and one input port sat Request. Stat (control in). I’ve assumed in the code | Mov BL, (Request. Numb] ;Move contents of memory loction example, that the base address of your . ;Request.Numb into the lower 8 bits
parallel printer port is 378H (if you _30f BX have a Parallel Printer Adapter). If you ~ aie
have a Monochrome Display Adapter, you should change the base aderess to 3BCH.
Figure 6 - Definition Of Device Header Block For Device Drivers The Port addressing is:
: Offset Size | Description Base address. =-> Output Data
‘Base address + 1 ==> Input status 00 4 byte Link used by DOS to locate the driver within the chain. Bene evareen oe. Ser Qubparncontrot Should be loaded with OFFFFFFFFH (-1,-1) on entry. And the contents of the output 04 2 byte Device attribute word, tells DOS the type of driver and control and input status ports are: its capabilities. Its f orast is:
= Bit Meani Qutput Control. : oF
Pte . 15 1 if character device, 0 if a block device 6. Unused 7 14 1 if I/0 Control (IOCTL) is supported 5 Unused _ - - 1 if non-IBM format (block devices) 4 Enable Int - 0 Int Disabled 41 Pe until busy (character devices) 1 Int Enabled se o zero 3 Select - 1 (Always) ‘1 if open/close/RM supported (DOS 3 or above) 2 Init = 1 neg pulse inits prtr Undefined set to 0 1 Auto Feed - 0 no LF after CR 1 if current clock device 1 LF after CR ne 1 if current NUL device ' 0 Strobe - 0 pos pulse sends data : Ot 1 if current standard output device
CRT usually " 1 if current standard input device input Status: Keyboard usually
Bit Use
Strategy entry point offset. Should be set to the 7 Busy - 0 Printer busy strategy routine starting location within your driver. 1 Printer not busy t= 6 ACK ~ 1 Normal input ; Interrupt entry point offset. Should be set to the . 0 Acknowledge pulse _ interrupt routine starting location within your driver. 5 Paper - 0 Printer has paper we 1 Printer ate the paper Name of device padded with spaces if a character device 4 Select - 0 Printer off line (example: 'PRN '), or number of units (1 byte) followed 1 Printer on line . by 7 bytes of reserved space if a block device. 3 Error ~- 0 Printer error d 1 Printer normal (This order never varies, and cannot be changed.) 2 Unused 1 Unused O Unused
62 . MICRO CORNUCOPIA, #32, Oct-Nov 1986
The program sends a byte to the Output Data port, then watches the . Busy input (Bit 7) until the printer says it’s ready for data. The program then raises and lowers (pulses) the strobe output (bit 0). Meanwhile, Init (bit 2),
Select (bit 3) are kept high, and Auto
Feed (bit 1) is kept high or low depending on your pleasure.
Device Drivers
When MS-DOS bale. it looks for a config.sys file to tell it if you want to make any changes to the operating system.
If a device is added or changed (with DEVICE = [D:][PATH]FILEN- AME.EXT), DOS adds the driver in FILENAME.EXT into the driver chain
after the NUL device but before any
Figure 7- Device Driver Request Header Format
Unit
Media
Count
NN FHV ONnNa
other system character devices (CON, AUX, PRN, CLOCK). The user de- fined block mode device drivers are added after the system character driv- ers, but before any system block de- vice drivers.
When a call is processed to a device
. driver, DOS scans the chain of drivers
until it finds a match. Since user
drivers are always first, they override
the default MS-DOS drivers (unless it is a block mode driver — then you can only supplement, not supersede, the DOS driver). This allows you to change the printer, console, or supple- ment the disk drives to suit yourself. You pay two penalties for using a device driver. First, there may be a slight increase in the size of MS-DOS, and second, there may be a slight
' Meaning
Numb Number of bytes in request header Unit number of this request
Cmmd Request headers command code Stat Returned status
DOS Reserved by DOS
Media Descripter
Address Data transfer address
byte or sector count
Sect starting sector value
Wondered What Males TURBOPASCAL Tick?
Source Code Generators by C. C. Software can
give you the answer.
“The darndest thing I ever did see..." ",.. if you're at all interested in what's going on in your system, it's
worth it." The
Jerry Pournelle, BYTE, Sept '83
just edit and assemble.
fully commented and source code for your Pascal Version 3.00A (280) is $45.
“The Code Busters"
SCG-TP program produces labeled TURBO-
system. To modify,
SCG's available for CP/M 2.2 ($45) and CP/M+ ($75). Please include $1.50 postage (in Calif add 6.5%).
C. C. Software,
1907 Alvarado Ave.
Walnut Creek, CA 94596 (415) 939-8153
CP/M is a registered trademark of Digital Research, Inc. TURBO Pascal is a trademark of Borland International
increase in program execution time. Therefore, if speed is important (A/D conversion for example), and you can- not convert the driver to buffered interrupt or block mode control you should leave the code within your calling program, and access the device directly.
However, if you find vette in- cluding the same sequence of code in several. programs, or using different devices (printers for example) and hav- ing to re-configure your word proces- sor to match, then it’s probably time to write a device driver for each printer.
Three Sections
Device drivers have tities major sec- tions: the Device Header Block used to communicate with the driver, the Strategy routine, and the Interrupt routines.
Device Header Block
The Device Header Block must start at offset 0 within the driver, and has a strictly defined order shown in Figure 6.
Strategy Routine
The Strategy routine has a very simple task. It must save a pointer to the MS-DOS request header. When DOS calls a driver, it calls Strategy first. Strategy receives and stores the pointer to the data, and DOS then calls Interrupt to perform the task. All Strategy does is transfer four address bytes from the ES and BX registers into memory so they can be used by the Intenupe procedure.
Interrupt Procedure
The work is done by the Interrupt procedure (actually a series of com- mand processors), which uses the pointer passed to the Strategy proce- dure to locate the Request Header passed by MS-DOS. Figure 7 shows the format of the Request Header.
The character device Cmmd (com- mand) codes are described below. I'll go into the block mode commands in the next issue. Be sure to include some type of command procedure for all the commands in your jump table (even if it’s only an exit routine) in case an
(continued next page)
+ MICRO CORNUCOPIA, #32, Oct-Nov 1986 © 63
WRITING A PRINTER DRIVER |
(continued from page 63)
unexpected command arrives. (See Figure 8.)
. Still with me? Good, we're almost done.
Look over the example code for a parallel printer driver to see how all of the above comes together. If you. want to try your own, here are some hints:
1. MS-DOS is not reentrant (cannot
call itself), and since the driver be- comes a part of DOS you cannot use any DOS calls within your code. The only exception is command 0 (Initiali- zation) wherein you may use calls 1 through 0CH and 30H. 2. For the same reason, DEBUG won’t work on device drivers unless you write a short program to set up the necessary work areas and call the - driver from it. If the driver is installed in DOS, you cannot use DEBUG.
3. You can use BIOS calls, which I’ve found to be the easiest way to get a driver on its feet. Output a chatacter or data to printer or screen to see if the process made it to the Init code, and so forth. —
After you have written the driver, assemble it, then link it. Next convert it to a .BIN file using EXE2BIN. Using an. extra DOS boot disk (please don’t debug a driver using your hard disk), transfer your driver.bin file ahd a config.sys file that contains the com- mand line: |
DEVICE=driver. bin
(or whatever the driver is called), Then boot the system on that disk. if you get the DOS prompt your driver should be installed. To find out, try transferring some appropriate data (don’t use inappropriate data — it makes too much of a mess) to the driver from the console or a file. The example driver is named SAMPLE sO if you install it you should be able to dump a text file to the printer using it like so:
A>Dcopy test.txt sample
Get the idea? You can now treat your driver just like a system driver, so have fun. .
Next time — RAM disk and exotic driver (stepper motor controller).
(DRIVER.ASM is on the Micro C RBBS.)
ZB . :
Figure 8 - Character Device Command Codes
Code # Name 1-2, 13+15 0 Init
Description Not supported with character devices
Driver Initialization -- This procedure should do whatever initialization is required of the device. Sign on message handlers would be placed here. The procedure must return the last address of the driver code to MS-DOS (in offset
_ 14 Address above), since the Init procedure is called only
once. It is normally overwritten by placing it at the end of the driver and returning the address of the starting point of the routine. Error status must also be returned.
Uses the IOCTL byte to configure itself, return status in
Stat, byte (or bytes) in buffer pointed to by Address,
Write W/Verif
Output Status
Flush Output Buffer
12 IOCTL Write
16 Output Until Busy
STATUS WORD BIT BIT
15 12=14 9
8 0-7
BITS 0-7 MEANING
VALUE
WONAU SEWN Oo
64 MICRO CORNUCOPIA, #32, Oct-Nov 1986
and actual number of bytes transferred in Count. Same as IOctl Read, but doesn't use IOCTL byte.
Used to read the input buffer without transferring it. Returns status in Stat and Character in Media.
Returns the status of the input device in Stat busy bit (see status word below). If busy = 1 device is ready for input, if busy = 0 device not ready.
Discard any data in the input buffer, return status in Stat.
Transfer the number of bytes in Count located at Address to the output device. Return status in Stat, and the number of bytes transfered in Count.
Same as function 8, but perform a read-after-write to. confirm the data was written correctly.
Check status of output device, return in Stat busy bit if busy bit = 1 , device is busy, if 0 device is not busy.
Empty the output buffer and discard any pending output requests. Return status in Stat
Same as function 8 but configure the output device according to the IOCTL byte.
Supported in DOS version 3 and above. Same as 8 above but return when device is busy. Unlike 8, a return with fewer bytes output than transferred isn't an error.
FLAGS (1 = TRUE) SIGNIFICANCE Error
Reserved
Busy
Done Error code if bit 15 is = 1
4
MEANING Write protect violation
’ Unknown unit
Drive not ready
Unknown command
Data error (CRC)
Bad drive request structure length Seek error .
Unknown medium
Sector not found
Printer out of paper
Write fault
Read fault
General failure
Reserved
Invalid disk change (MS-DOS ver 3 only)
TOTAL CONTROL with LMi FORTH™
an expanding family of compatible, high-performance, Forth-83 Standard compilers for microcomputers
For 'Development: Interactive Forth-83 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-83 Metacompiler
e Unique table-driven multi-pass Forth compiler
¢ Compiles compact ROMable or disk-based applications
e Excellent error handling
e Produces headerless code, compiles from intermediate states, and performs conditional compilation
* Cross-compiles to 8080, Z-80, 8086, 68000, 6502, 8051, 8096, 1802, and 6303
¢ No license fee or royalty for compiled applications
For Speed: CForth Application Compiler
¢ Translates ‘‘high-level’”’ Forth into in-line, optimized machine code _ © Can generate ROMable code
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.
ss Laboratory Microsystems Incorporated [I Post Office Box 10430, Marina del Rey, CA 90295 Phone credit card orders to: (213) 306-7412
Overseas Distributors.
Germany: Forth-Systeme Angelika Flesch, Titisee-Neustadt, 7651-1665 UK: System Science Ltd., London, 01-248 0962
France: Micro-Sigma S.A.R.L., Paris, (1) 42.65.95.16
Japan: Southern Pacific Ltd., Yokohama, 045-314-9514
Australia: Wave-onic Associates, Wilson, W.A., (09) 451-2946
Up To Your Ears In Alligators?
If that sounds familiar, you need Write-Hand-Man™, the mullti-
function pop-up desktop
organizer that works
neatly with existing soft-
ware for CP/M™ 2.2 and
3.0 systems. Write-Hand-
Man eliminates that
swamped feeling with
tools that will get you
organized. Write-Hand-
Man comes with a
4-function, floating-point,
14 digit Calculator — Notepad
— Two-week Appointment
Book, File and Directory viewing — Phonebook with dialing — Cut and Paste — Key Redefinition — ASC II table. Even add your own applications.
Clear the swamp from your desktop. Order Write-Hand-Man today. $49.95 CA residents add 6.5% tax. Sorry, no credit cards or purchase orders. Poor PerSon Specify: 8" or which 5" format — Software CP/M 2.2 or 3.0 format
9 30 day guarantee Dept. 206
: 3721 Starr King Circle ™ Write-Hand-Man — Poor Person Palo Alto, CA 94306
Software (415) 493-3735 “CP/M - Digital Research
SERVO INDUSTRIAL PROCESS CONTROL BOARD
14 Bit Lab Accuracy Industrial Durability
The Features of 5 Boards in One. -cacasinninianesriGp a aa «sf Mic se
The Servo Process Contro! Board Is a general purpose multi-channel analog and digital input/output controller which can communicate with and control most medium-scale industrial processes. Designed to work with the Servo Industrial Microcomputer, (or other computers which support the SASI interface), it offers great accuracy at prices starting as low as $495.
American made @ MILSPEC components @ 1 year warranty
Maximum configuration includes: HM 192 analog inputs B 64 analog outputs Hf 128 digital inputs BH 512digital outputs
@ Based on the INTERSIL 14 Bit A to Dconverter BCommunicates with any micro or mainframecomputer Easily programmed in high level languages (Turbo Pascal, Microsoft Basic, Forth) & PID, FFT, Thermo- couple linearization and laboratory DAS software supplied. i Custom software and hardware engineering assistance available.
360-B N. Ellensburg St. ——] — i al Box 566 Gold Beach, OR. 97444
SERVO COMPUTER CORPORATION (503) 247-2021
MICRO CORNUCOPIA, #32, Oct-Nov 1986 65
Recover A Directory By Reading .
& Writing Disk Sectors —
A Little Fun With DOS Interrupt 19 (13H)
If you've been using a computer for any length of time then you've no doubt run up against one of those nasty ‘‘BAD SECTOR’’ statements on your screen.
This is one of those frustrating occurences where the more you know, the more frustrated. you get. You've got a bad bit somewhere and you're going to lose a day’s or week's or month’s worth of labor because of that teeny little bit.
In fact, I lost the second-best edito-
rial ever written (we're talking major loss here) to just such a bit. Anyway, this is probably as good an introduc- tion to MS-DOS disk operations and recovering lost data (whether in the directory or elsewhere) as any I’ve seen. Another winner from Gary Entsminger.
| sually, when we access a disk
we're trying to get at files, a
chore better left to the high- level control of DOS. But sometimes we need more control — say, we want to copy protect a disk or recover information lost in a. bad sector. We
can gain control via the ROM-BIOS
diskette services, invoked with inter-
rupt 19 (13 hex).
Into The ROM-BIOS . The PC ROM-BIOS offers six stan-
dard services (additional services have ©
been added for the AT, but we won’t _ go into them here), numbered from 0 to 5.
_ These services are —
0 Reset diskette system 1 Get diskette status
' 2 Read a sector
3 Write a sector
- 4 Verify a sector
5 Format a track
:_ To invoke a service (or function) put _its number in register AH (the high
byte of the AX register) and call the
ROM-BIOS with interrupt 19 (13H). For example, to reset the diskette
. controller and drive in Assembly Lan-
guage — MOV AH,O INT 13H
will do the trick.
Resetting the drive this way recali- brates the read/write head (positioning the head on a specific track). This function is important during read sec- tor operations since, often, an error
_ Status is returned the first time a read -is attempted.
This read error occurs because the disk drive motor takes about a half
By Gary Entsminger 1912 Haussler St. Davis CA 95617
second to reach usable (full) speed, and the ROM-BIOS doesn’t wait for it. To compensate, repeat (or retry) any read function at least three times be- fore accepting an error. .
. The ROM-BIOS does wait, however, for the motor to speed up on write operations, so retries aren’t necessary
. for writes.
Reading & Writing Sectors
To illustrate the use of interrupt 19 (13H), let’s consider the all too fre- quently occurring problem — BDOS ERROR BAD SECTOR.
When DOS, SWEEP, XTREE, or whatever program you're using re-
Figure 1-PC-DU: A Program to Read & Write Disk Sectors
; PC-DU, a program to read and write disk sectors Illustrates disk I/0 using ROM-BIOS interrupt 13h
STACK
STACK
e 2
ENDS:
? DATA BUFFER DB ERRMSG DB SUCCES DB DATA ENDS 3
3 CODE START
*Something is
PROC FAR
ASSUME CS:CODE PUSH DS
MOV ‘AX,0 PUSH = AX
MOV AX, DATA MOV DS, AX ASSUME DS:DATA MOV ES, AX ASSUME ES:;DATA-
SEGMENT PARA STACK 'STACK* | DB 256 DUP (0) ; 256 bytes for the stack
SEGMENT PARA PUBLIC 'DATA* 2048 DUP (0); Enough buffer space for 4 sectors
"Something isn't working ! '
working ! '
SEGMENT PARA PUBLIC 'CODE!
Save PSP Seg Addr ; Save Ret Addr offset (PSP + 0) Setup Data Seg
; Setup Extra Seg
Read sectors from disk into memory ; In this example we'll read the 4 directory tracks -= Side 0, Track 0, Sectors 4,5,6,7
66 MICRO CORNUCOPIA, #32, Oct-Nov 1986
(continued)
PC-DU Program (continued)
. MOV CX,3 3; Retry 3 times if necessary : RETRY: PUSH cx 3; Save retry count ports a bad sector, it usually means MOV BX, OFFSET BUFFER; We'll read the sectors into it’s unable to access the information 3 a buffer on that sector. The sector could be MOV DL, 3; DL gets the drive (0xA;12B) trashed (magnetic interference or the oe : ’ ; Po as ie mare 5). : : | ; gets the tra like) and totally unusable, or just MOV c ; CL gets the sector(1~-8) slightly garbled. I’ll explain. MOV ; No. of sectors to read DOS keeps track of the information MOV ; Service call 2 = read it’s written to a disk via a CRC. When ats ; ad disk mal 0 Sire ; : . ; Restore retry coun beam ee ae writes a nia NC ; Branok to. write, 4¢ veed-ok of data onto the disk, it appends a MOV ; Otherwise, reset number at the end of the sector. That INT number. is called the CRC (cyclic re- LOOP ; Try again (up to 3 times) dundancy check). The controller cre- ERROR: MOV BX, OFFSET ERRMSG
CALL DISPLAY ; Display the error message
: 1 ? ates the number by summing. all bytes RET - Retunn eontrol to DOS
in the sector (in a cyclic-redundant way) and then keeps only 16 bits of ; the total. Write sectors back out to disk
Later, when the floppy controller ;
téads the: Sector it creates. anew CRC RITSEC:MOV BX, OFFSET BUFFER; Here's the buffer where the
read sectors are
number and compares it with the one MOV DL gets the drive (0=A;1=B) appended during the write. If the ; Change this to 1 for a copy (see text) numbers match, then there is only 1 MOV ; DH gets the side(0 or 1) chance in 65,000 that the data isn’t i ri teers aia mar perfect. If they don’t match, the flop- MOV = Ho. of sector's to write py controller returns an error message MOV ; Service call 3 = write (along with the data). INT ; BIOS disk I/O routine Sometimes the sector we want to INC ; Branch to ok message, if ok read has been only slightly garbled — ome p Rhee Drench to .ehror mesnnee a byte or two has gone bananas. If we Go get the message we want and display it could look at that sector, we might be able to reconstruct the bad bytes, UCCESS : MOV BX,OFFSET SUCCES; Here's where the good message particularly if those bytes were text. ids
. : ‘ CALL DISPLAY ; Display the good message (There are certainly times when I’d RET ; Return control to DOS
accept one or two bad characters in _order to save a page of material.)
By using the ROM-BIOS to read and write sectors directly, we can ignore
Subroutine (or procedure) to set up display
ISPLAY PROC NEAR
MOV CX,26 ; Display 26 characters
the CRC and take our chances. If DIsP: MOV AL, [BX] } Get next char to display
you’re an old CP/M hand, you might CALL DISPCHAR; Display char
know about DU (on Micro C’s Kaypro INC BX ; Point to next char
disk #2) — a program that reads a LOOP DISP ; Loop 26 times (value of CX reg)
sector into memory (ignoring the CRC eee sa hc in carriage return status error) and writes the sector back MOV AL,OAH ; line feed
to disk. The program I'll describe now CALL DISPCHAR
(PC-DU) will work similarly. RET ; Return control to caller of DISPLAY
There are disk problems that prevent DISHLAY -ENDE ; the controller from reading anything at ; : asa ” Reon ; Subroutine to actually display messages
all (missing disk, disk inserted back- : Dre, =
wards, completely erased disk, erased DISPCHAR PROC NEAR - sector header, emulsion scraped off ie =o i ; rales na + ;
: : . ’ ; Select display page
the disk...). peisinee F ba eer of MOV AH.14 ; Function code for write
errors are unrecoverable, but, fortun- INT _ 10H ; Video interrupt
ately, most of the errors are the CRC . POP BX ; Restore BX
variety. _ RET ; Return control to caller of DISPCHAR . DISPCHAR ENDP
PC-DU :
PC-DU (see Figure 1) is an Assembly START ENDP
Language shell for reading and writing CODE ENDS
END (continued next page)
MICRO CORNUCOPIA, #32, Oct-Nov 1986 67
RECOVERING A DIRECTORY
(continued from page 67)
sectors. It’s divided roughly into five parts — .
1. Standard 8088 Assembly Language prologue
2. Data, stack, and buffer setup
3. Sector read (including ree
4, Sector write
5. Message display & return
In my example, I’ve chosen to read and rewrite the directory, located on Track 0, Side 0, Sectors 4,5,6, and 7.
Long note: You could sharpen up this program by permitting a user to interac- tively input Drive, Track, Side, and Sector at runtime. One obvious (and simple) way to handle this is to set up the user interface in Turbo Pascal and pass the Drive, Track, Side, and Sector parameters to an external assembly language subrou- tine.
Figure 2 shows the Turbo Pascal shell and write sector portion of such a pro- gram. It doesn’t include read retries or the interactive details. If anyone's interested,
I'll put the complete program on the Micro C bulletin board. Note, in particular, how to pass the. parameters from Turbo to the assembly language subroutine. BP is the caller’s saved base pointer; BP + 2 is the return address, offset, and segment; BP +
4 is the first parameter (Drive) if you're calling a NEAR procedure (required by Turbo Pascal); BP + 6 is the second (Track), and so on.
The parameters are passed to the stack in the order they appear when the procedure is called. Naturally, the Assembly Lan- guage subroutine must remove these para- meters from the stack in the proper order. If you're calling a FAR procedure (Micro-
soft Pascal, for example) add 2 for each -
parameter.
Briefly, note a few points in PC-DU.
Each sector requires 512 bytes worth of buffer in memory. If you’re going to read one sector at a time (see Figure 2), an array of 512 bytes will handle it. To read the entire directory (see Figure 1) of four sectors we need a buffer of
2048 bytes.
Also, note the use of service 0 (reset) and the three-time allowance for re- tries during the read sector part of the program. If the read is unsuccessful after three retries, we’ll assume some- thing is really wrong (an unrecovera- ble error) and write an error message.
If all is well, we’ll go on and write the sectors back out. If that’s success- ful, we'll write a success message; if not, we'll again report an error.
Reading and writing sectors are identical with two exceptions —
Read uses ROM-BIOS service 2;
Write uses service 3. And we don’t retry writes.
Sum Up & Get Out
I’ve documented each line of code in Figure 1, so read through it for the details. |
Note also that you could copy an entire disk of sectors from one disk to another by changing the drive specifi- cation on the read or write. For exam- ple, put 0 (for Drive A) in DL during the read, and 1 (for Drive B) in DL during the write to copy whatever’s in the sector of choice on Drive A to Drive B. :
Just for fun, I used the program in Figure 1 to copy the directory in Drive A to Drive B. Sure enough, when I checked the disk in Drive B, its direc- tory (and nothing else!) was identical to the disk’s in Drive A. Surely you innovative guys (and gals) out there can make some totally bizarre use of this capability. (A disk copier that ignores CRC errors?)
- That’s it; I’m out of here.
SAAR Pay OS ga ere * ‘~ i . si = ea)
US
rales
POD EDIT
o CREATE DOUBLE SIDED BOARDS ON YOUR PC OR XT -- FAST --
MOUSE SUPPORT — CUT AND
Lary fy | by FAs | ary CT | ba
WIDTHS -- 10 MIL TRACE
SEPERATION -- BLOCK PAD _ OR TRACE DELETE.
OUTPUT TO DOT MATRIX
PRINTER “PLOTTER DRIVER DUE SEPT 86).
RESPTOPLSES is)
o MUCH MORE — CALL FOR INFO
PASTE -- UNLIMITED TRACE.
a
see Pre rp : ° | :
ity ut
hi
0 oO DON FLETCHER o RT 7 BOX 120 COLUMBIA, MO 65202 5 (314) 443-7294
| ANALOGIC
o 32 CHANNEL LOGIC ANAL
FOR THE PC’XT CSTAND re ALONE CPM-80 VERSION = READY JANUARY 1987> i
L i6 BIT TRIGGER WORD, 5 4 CLOCK QUALIFIERS 5
TIMING DIAGRAM, HEX, OR §& DEBUG‘DDT DISPLAY
BARE BOARD WITH SOFTNARE
AND SCEMATICS - $75.00 5 ONLY $389. 95 :
68
MICRO CORNUCOPIA, #32, Oct-Nov 1986 .
Figure 2 - Turbo Pascal and External Assembler Shell
program PC_DU;
TYPE
{ Turbo Pascal & assembler shell: for interactive PC-DU; does not include retries for reads or interactive details } Size_of_Sector = ARRAY[0..511] of BYTE; { set up buffer to hold 1 sector }
Buffer : Size_of_Sector;
Drive, Track, Side, Sector : integer;
function SECREAD(
VAR B : Size_of_ Sector; Drive : integer; Track : integer; Side : integer; Sector ;: integer)
: BYTE;
external { Secread is an external assembly
language subroutine }
*secread.com'®;
function SECWRIT(
BEGIN
VAR B ; Size_of_ Sector; Drive : integer; Track : integer; Side : integer; Sector : integer)
: BYTE;
external 'seewrit.com!; language subroutine }
IF SECREAD( Buffer, Drive, Track,Side,Sector)= 0 {If no error} THEN
END.
_ SECWRIT. ASM
IF SECWRIT(Buffer, Drive, Track, Side, Sector) =0 {IF no error! THEN Writeln('success is ours! ') ELSE write('Unable to read Track', Track, — 'Side',Side, 'Sector',Sector);
{ Seewrite is an external assembly
Byte Magazine called it.
“CIARCIA’S SUPER SYSTEM”
Featured on the cover of Byte, Sept. 1985, the SB180 lets CP/M users upgrade to a fast, 4’ x 74” single board system.
e 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 3%'; 5%" 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 +/-5% @500 mA +12V +/- 20% @40mA
© ZCPR3 (CP/M 2.2/3 compatible)
© Multiple disk formats supported
e@ Menu-based system customization
$B180-1 $B180 computer board w/256K bytes RAM and ROM monitor du dos aesossee teaeastionsteseiacsss $369.00
S$B180-1-20 code segment 'codet same as above w/ZCPR3, ZRDOS assume cs:code and BIOS source............. $499.00 3 -Quantity discounts available- SECWRIT proc near push BP Ww MOV BP, SP Nev PUSH DS. COMM180-M-S POP ES optional peripheral board adds 1200 bps modem and SCS! ss a tae 3 hard disk interface. MOV CH, [BP+8] MOV DH, [BP+6] TO ORDER MOV CL, {BP+4] CALL TOLL FREE TELEX MOV 1-800-635-3355 643331 MOV INT For technical assistance or MOV to request a data sheet, call: POP 1-203-871-6170 RET SECREAD ENDP RS. code ends end SS iS Micromint, Inc. 25 Terrace Drive Vernon, CT 06066 MICRO CORNUCOPIA, #32, Oct-Nov 1986 69
Computers And Education In Central America
When Leroy flagged me down at SOG and told me what was going on in Central America I was really floored. I've heard of some dumb moves, but emaciating your university system is a pretty quick way to destroy the dreams of your brightest . youth. This is especially true for the technical types who, outside of a university, have little or no hope of getting hands-on experience with com-. puters.
ar in Central America has ; not been kind to the univer- sities there. In 1980, the Uni-
versity of El Salvador was invaded and sacked by the Salvadoran military. During the next four years, nearly all the university’s equipment and books were sold and many of the facilities destroyed. Although the military with- drew from the campus in 1984, recon- structing the facilities has been greatly hindered by the government’s refusal to allot the university its full budget as provided for in the constitution (they are receiving only 20 percent). That 20 _ percent barely covers faculty salaries.
Until June 1986, the university had one microcomputer serving 6000 engi- neering students. That computer was a cassette based Commodore 128. As- sembly Language, BASIC, and FOR- TRAN were all taught on that one Commodore.
In June 1986, Michael Hardt (prime -mover in the project) and Andrea Stoutland (a graduate student at Uni- versity of Washington) delivered and installed a Kaypro II and a Morrow
Micro Decision. These donated ma- -
chines were installed in the ‘‘computer center’ changed to cover Z80 and CP/M. We've arranged to send another mi- -crocomputer and a printer, and hope to keep sending equipment until the computing center is adequately fur- nished.
and classes were immediately _ .
Nicaragua Also Suffers The 1972 earthquake and the more recent strife in war-torn Central Amer-
ica both have devastated Nicaragua’s _ National Engineering University. Its
three-computer laboratory serves 4000 students. (Virtually none of the com- puters donated to Nicaragua are avail-
able for educational use, since they’ve
been donated with the stipulation that they not be moved from the agency to which they were given.) To make matters worse for the university, pri- mary schools get first crack at any education funds. Therefore, the uni- versity must rely on donations from sources outside the country.
INTEGRATED BIOS FOR BIGBOARD Ii
This BIOS adds special features to your Bigboard II floppydisk and/or Winchester system.
Read, write and format any 5” and/or 8” disk formats. 40 formats included. Use any type of 5” and/or 8” drive. New SYSGEN works between 5” and 8”.
INCLUDES:
e CONFiGuration program that lets you install any new floppy disk format INTERACTIVELY.
e FORMATTER allows you to format almost any diskformat.
e PC-COPY reads and writes PC disk- ettes on your Bigboard II.;
e MONITOR EPROM with serial keyboard and translate table.
e 300 page ZCPR2 manual.
e 60 page BIGBOARD II tech manual.
e BOOTABLE DISK contains free ZCPR2 and P2D0S system. With TIME and DATE stamping. BIOS also has provisions for 256K RAM disk, Centronics, system — in ROM.
e WINCHESTER FORMATTER and SYSGEN Supports XEBEC, W-D and ADAPTEC type controllers. Subdivides into any specified number of drives.
Price: $99.95 (specify disk}
ANDY BAKKERS de Gervelink 12 e 7591 DT Denekamp The Netherlands e Tel: 31-5413-2488 ‘Please pay with US$ Money Order. MC or VISA welcome.
70 MICRO CORNUCOPIA, #32, Oct-Nov 1986
By Leroy Searle
Delphi Development, Inc. 6273 19th Ave. NE Seattle WA 98115
The universities in both Nicaragua
and El Salvador desperately need used
microcomputers, printers, disk drives, hard disks, books, software, and dis- kettes. These donations are tax deduct- ible and do not violate the embargo on trade. (The Seattle Council of Churches is a sponsor of the project.) For more information contact:
Michael Hardt
611 10th Ave. E Seattle WA 98102
(206) 328-4534 (evenings)
16 BIT SINGLE . BOARD COMPUTER.
The Micro-86 SBC runs PC DOS versions 2.1 or 3.1, and hosts these features:
© 8 MHz 8086 16 bit CPU, can
be replaced with V30 proces- sor. |
© 128k/512k on board RAM
. © 2 asynchronous serial I/O . ports, 1 for system console, - 1 general purpose.
® Centronics printer port.
© Floppy disk controller will handle up to 4 drives, 5 or 8 inch, SD or DD.
e Standard EPROM contains © BIOS, disk formatting pro- | gram and setup program for disk drive and serial terminal set up.
e Small size, 5.75 x 8.5 in. Mounts on a 5% inch drive.
$3490 + 300 shipping
_ (128k)
NOW AT THE SBC MART COMPUTING SALE-A-THON
THE BEST OF BOTH WORLDS
Run your CP/M programs on any IBM PC or compatible. RUN/CPM transforms your PC’s floppy drives into CP/M drives able to directly read, write and format over 100 CP/M disks. RUN/CPM directly executes your CP/M programs. Kaypro, Morrow, Osborne, Cromemco, Heath, many more. Because this is a hardware solution, your programs run up to 30% faster. *x RUN/CPM only $79 (Requires NEC V20 chip below)
PC SPEEDUP KITS x NEC's V20 chip will increase the throughput of your system up to 90%.
That's almost double your present processing speed. 5MHz kit $24. 8MHz $29.
ADD-ON CARDS
multifunction card 384K, clk/cal w/bat- tey, serial, parallel, and game ports, with OK save $50 Model MFC-4 $135
monochrome graphics card runs 1-2-3 graphics, w/printer port, 720x348, MGC-1 now $135 (Hercules equiv.)
floppy controller for 1-4 48tpi or 96tpi drives, w/cable save $25 Model FDC-2 now only $74
color adapter wilight pen port, RGB and composite outputs reg $140 Model CC-1 now just $116
better than the Super 7: floppy disk controller, clk/calendar, serial, parallel & game ports, spooler & RAMDISK s/w Sale $145 ideal mate for 640K mother- boards
clock/calendar card reg $58, CL-1 $149
OMTI hard disk controller card (this card is super fast) reg $220, Model HDC-1 now $175, w/cables
high quality IBM PC look alike w/side- switch, flip-top or slide chassis
any-combo disk drive brackets heavy steel, 8-cutout style
Model CA-8 reg $95, now $69
SBC PLEDGE
* service after sale * technical support * low prices * one year warranty
MOTHERBOARDS
= full IBM PC/XT compatibility
— 8 I/O slots
= runs IBM’s PC- DOS 3.1
—- BASIC inter- preter available
{ =— great foundation
for business or personal system
— 1 year warranty
Mode! MB-1 256K motherboard with OK regularly $295, now $199
Model MB-3 640K motherboard with OK regularly $399, now $250
Model MB-2 640K motherboard, 4.77 and 7+ MHz clock, w/256K Reg $399,
now $297, this is a fast board: SSS OT EE
ABOUT OUR MOTHERBOARDS
— the most IBM PC compatible mother- boards available
each runs ali commercially available software
each works with. all available add-on cards
These FOUNDATION motherboards are the most compatible you can buy. All work with V20 chips, have parity checked memory, an 8087 socket, 8 adapter slots, four empty ROM sockets. Super manual includes com- plete data on how to put together a com- plete PC system. It even includes schematics.
commercially
_ HARD DISKS
= complete 10MB Kit
* — special, only $398
complete internal /2-high 10MB kit, incl. controller and cables, special $398. complete 10MB kit with low power 3-42” half-high drive, fits 5-%4” slots, $469,
3-42” 10MB Winchester drive alone HD-3 just $380. 20MB half-high drive HD-2 now $395.
HARDWARE SPECIALS
keyboard 5150 style regularly $125, Model KB-3 only $85
keyboard 5151 style regularly $175, ! Model KB-3 only $99
memory nine 150ns DRAMs Set ID-256 256K reg $55, now $34
no better DS/DD drives anywhere, 48tpi F-4 $99; F-9 96tpi $129
Smarteam modem (fully ‘Hayes equivalent) 300/1200 baud auto ans/dial, reg $399, now just $249
135 Watts
side switch
top quality
one year warranty
standard cables for 4 disk drives
Model PS-135 power supply regularly $129, now only $85
LAST MINUTE SPECIALS
x RUN/CPN only $79--see details in upper left corner of this ad
e IBN PC-DOS 3.1 $85. a $45 with motherboard); Ellis PASUAL, COBOL, FORTRAN, BASIC a tap only $34 ea; MS mouse w/PC Paintbrush $145
& CONPLETE 100% IBM PC eqiv syst $987 * Hl drive package! over 800K
on a single floppy, complete kit with 9tpi drive, software $149
Shipping and handling: drives/motherboards/cases/power supplies $4.50 ea, cards $2 ea, software $2.50 ea, keyboards/modems $4 ea, speedup. kits $2 ea, memory $1/set, COMPUTERFACTS $3 os set then $1/set. CA residents add 6% sales tax.
‘The SBC MART, P.O. Box 1296, Ridgecrest, CA 93555
AMERICAN EXPRESS
The SBC Mart is part of Computing Fechialoay 821-B Commercial Street, Ridgecrest, CA 93555
MICRO CORNUCOPIA, #32, Oct-Nov 1986 _
71
S-100 BUS
Bargains In The Surplus Market
As the prices plummet in the PC arena, the movement in that direction . has turned into a stampede. Mean- while, yesterday’s major players, in- cluding S-100, are showing up in unexpected places at unexpected prices. Dave helps you weed the gems from the relics.
ne of the few good things to () m= from the inundation of
IBM PC compatible hardware is that it has driven a lot of S-100 equipment onto the surplus market. S- 100 machines, which are potentially more powerful than their PC brothers, are becoming available for incredibly low prices on the used market.
Many who have “‘upgraded’’ to the PC are selling their old S-100 hardware for peanuts, just to get it out of the way. It’s sad that these people don’t realize the abilities of their S-100 equipment, but, at the same time, it’s a great opportunity for die-hard S-100 users to upgrade and expand their S- 100 systems without selling the family car.
Good Deals
Which brings us to the subject of the “‘Good Deal.’’ Having just seen a one-year-old three-user (TurboDos) S- 100 system, complete with a Paradyn- amics frame, Intercontinental Micro- Systems master and slave processors, and lots of other goodies, sold by a local medium sized company for less than $1000, I can definitely say that the deals are out there. The trick, of course, is to find them, and to be able to tell the good deals from the ele- phant food.
Finding used S-100 equipment, espe- cially IEEE-696-compatible hardware that can be used in modern S-100 frames, can be difficult, but newspaper ads, local computerized bulletin boards, and especially auctions and
liquidation sales are often good places to start.
Once you find it, you have to be able to use it, so the following is a brief checklist I’ve developed (after spending more than a few dollars on some really awful S-100 stuff). If you really do want a boat anchor or a doorstop then ignore my comments.
Things To Watch Out For
COST — It’s surprising how many people, especially at auctions, will pay too much money for electronic equip- ment, including S-100 systems and boards. Unless the equipment is still new (maybe even under warranty), it isn’t a good deal unless you can buy it for less than about 25 percent of the new equivalent.
For example, a functional S-100- based Alpha Micro system that was purchased for $20,000 in 1980 (back when Alpha Micro systems WERE S- 100) wouldn’t be worth much more than $1000 as a ‘’good deal,’’ because it can be replaced today for about $4000 with an S-100-based TurboDos system.
However, a six-month-old Compu- Pro system with all IEEE-696 boards that originally sold for $4000 still might be a good deal at more than $2000 because all the boards are still usable in modern (that is, IEEE-696) frames.
HARDWARE — The hardware should be functional or easily repaira- ble. Check the equipment for special parts which are available only from the original manufacturer or some other exotic source. S-100 boards using parts which can no longer be obtained, or can be obtained only from a single source, are virtually worthless on the used market. Even established $-100 vendors have destroyed the value of many of their boards by discontinuing special parts (PROMs, personality modules, etc.).
Also, beware of ‘‘REV-itis,’’ where
something looks like a great buy until
By Dave Hardy 736 Notre Dame Grosse Pointe MI 48203
the manufacturer’s revision number reveals that it’s an older version which doesn’t work or doesn’t have all of the bells and whistles. Some boards may require the dreaded ‘‘Factory Modifica- tion’’ to do anything at all.
SOFTWARE — If the S-100 product requires special software make sure you get it at purchase time. This is especially true if the product is a complex SBC (single board computer) or sophisticated I/O device, like a high-resolution graphics display board.
Nothing is more useless than a great piece of hardware for which you can’t get software (remember the Sphere 6800?). And even if you can get soft- ware, you may pay $500 for the BIOS for your $100 SBC.
DOCUMENTATION — A good deal doesn’t have to come with complete documentation, as long as complete documentation is available some- where. After all, most good deals show up because the seller doesn’t realize what he has. If he had all the information, he’d probably be asking a lot more money. Just be sure you can get the information you need to use the equipment.
Good documentation should include full schematics, even if you are not a technically oriented S-100 user (your technician will need them sooner or later), complete set-up and operations guides, and at least a basic theory of operation. If the equipment has
_ PROMs, then a listing of the contents
would be nice, although most manu- facturers don’t make source listings available even to original owners.
CAN YOU USE IT? — The most important question to ask when pur- chasing used S-100 equipment is: ‘Do I really need it?’’ (Not to be confused with ‘’Do I really want it?’’ to which the answer is always ‘’Yes.’’) Even an incredibly good deal is a waste of money if you can’t use it.
It is usually a good idea not to buy used equipment in the hope of re-
72 MICRO CORNUCOPIA, #32, Oct-Nov 1986 |
selling it to make a profit, unless you have a GUARANTEED buyer. Base- ments all over America are full of good deals which were purchased with the idea of being resold for a hefty profit.
Bad News For Interfacers
Sol Libes, co-author of the S-100 hardware design reference Interfacing to IEEE-696 S-100 Microcomputers, in- forms me that MicroSystems Journal (of which Sol is the editor/publisher) purchased the last 300 or so copies of that definitive S-100 manual, and that, as of this writing, only eight copies are still available. Osborne-McGraw Hill, the publisher of the book, has no plans for a second edition.
The good news is that future ‘’S-100 Bus’’ columns will cover all of the major topics of S-100 bus design. Also, the IEEE-696 specification is still avail- able from the IEEE directly, for a small fee, from their main office deep in the heart of Piscataway, New Jersey.
Next Time
Some notes about PC-compatible 5S- 100 machines, S-100 mice, and a mini- construction project for your S-100 frame!
Future columns will also include more S-100 mini-reviews and compari- sons. If you would like to see a mini- review of a certain S-100 product, please let me know, and I’ll be happy to give it the once-over.
Of course, we’ll also have more letters, including feedback, S-100 tips, and hints.
As always, I encourage reader feed- back, and welcome questions, sugges- tions, comments, and ideas for future ““S-100 Bus’’ columns. You can contact me here at Micro C, on CIS 70150,102, Source TCH054, or via GEnie mail at DJHARDY.
HO
XT CLONE COMPLETE SYSTEMS " MOTHERBOARD WITH 640K INSTALLED (TURBO)
150 WATT POWER SUPPLY AT STYLE KEYBOARD
FLIP TOP CASE
COLOR GRAPHICS VIDEO
SERIAL PORT PARALLEL PORT REAL TIME CLOCK FLOPPY DISK CONTROLLER
TWO FLOPPY DISKS
$699.00
ABOVE WITH ONE FLOPPY AND 20 MEG HARD DRIVE
$1049.00
TESTED AND ASSEMBLED WITH ONE YEAR GUARANTEE
KEYBOARD (MICROSWITCH) 113 KEYS 8 BIT ASCII PARALLEL OUTPUT WITH CASE
AND COMPLETE DOCUMENTATION $40.00 SA800-2 DISK DRIVE CLEAN —- USED $39.00 SA850 DISK DRIVE CLEAN —- USED $69.00
STANDARD MOUNTING -— GUARANTEED 60 DAYS
CABINET FOR ABOVE HOLDS TWO DRIVES POWER WIRING COMPLETED (AC AND DC) FAN AND INPUT AC WIRING DONE
20 X 9 1/2 X 17 DEEP
ALL MOUNTING HARDWARE POWER SUPPLY FOR TWO DRIVES (SWITCHING) WILL POWER DRIVES AND SBC 6 X8X21/2 5VDC @ 8 AMPS, +12VDC, -12VDC, -5VDC @ .5 AMPS EA AND 24VDC @ 2 AMPS CABINET AND POWER SUPPLY ‘TOGETHER $100.00
ORDER CABINET WITH POWER SUPPLY AND
2 SA850 DRIVE
20 MBG HARD DRIVE
$200.00
$299.00
XT CLONE PARTS ONE YEAR GUARANTEE “MOTHERBOARD TURBO (4.77 AND 8.00 MHz) $145.00 MONOCHROME GRAPHICS CARD WITH PRINTER S$ 75.00
COLOR GRAPHICS CARD $ 65.00 FLOPPY DISK CONTROLLER . S 40.00 HARD DISK CONTROLLER $100.00
DISK I/O CARD - FLOPPY DISK CONTROLLER RS-232 CLOCK PARALLEL GAME ADAPTER $ 95.00
CASE FLIP TOP STYLE $ 45.00 POWER SUPPLY 150 WATT $ 75.00 KEYBOARD AT STYLE S$ 65.00 HALF-HEIGHT FLOPPY DRIVE - CALL FOR MAKE
IBM COMPATIBLE (LIMITED SUPPLY) $ 89.00
COD ADD $3 LIMITED TO STOCK ON HAND
CASCADE ELECTRONICS ROUTE 1 BOX 8 RANDOLPH MN 55065 507-645-7997
PLEASE ADD SHIPPING FROM MN ON ALL ORDERS CREDIT CARD ADD 5%
MICRO CORNUCOPIA, #32, Oct-Nov 1986
MN ADD 6% PRICES SUBJECT TO CHANGE
73
SIG/M Takes On New Line
He may be the late Stephen Leon, but he wasn’t too late. The blockbus- | ter this time is that SIG/M, that bastion of CP/Mism, is now co-min- gling volumes of MS-DOS. Steve also takes on one of those fancy extended
_ graphics adapter (EGA) cards and wins (sort of).
with copy for this column. Usually,
I’m way ahead of schedule, but this time when the material was due, I was so tied up with Project Turbo that I just plum forgot about it.
I had seen the NEC Multisyne moni- tor and decided I had to have one. Once it arrived, I needed an EGA card. One of the members of the users group had a clone EGA card, so I tried it. It turns out the people on Taiwan don’t know that Microsoft’s Word rec- ognizes an EGA card by looking for
[e the unpardonable. I was late
the IBM copyright notice. (Using DE- -
BUG enter ‘‘D C000:0’’. If you don’t see the letters ‘‘IBM,’’ Word will not know you have an EGA.) .
Since we occasionally use Word, I wound up buying an Everex EGA card after they assured me on the phone that it was fully compatible. Everex makes a real nice card — BUT! I have some UCSD P Systems software, i.e., Charles Schwab’s Equalizer which lets me lose money in the market without even talking to a broker. I therefore have to boot up in CGA mode because the Pascal program can’t be centered for the EGA.
Everex And Quadram Don’t Mix | Would you believe it. If you boot up the Everex EGA card in CGA mode and have a Quadram multifunction card in the system, the screen goes into double vision. I wound up taking out the calculator and determining that with the equipment I had in the house, I could put together another
system with a turbo board for about $200 — and I did just that.
Building a turbo clone is a tale in itself. Suffice it to say, I went through three boards (including one fried by a power supply) before I was satisfied with the results. Even then, every BIOS I tried gave up something to go turbo. I finally wound up with a real IBM ROM and a hardware switch, but even then, I have yet to get the JRAM 3 to work in turbo mode. That extra speed is handy for compiling, but I ran into trouble a few times with Newword.
I have been promised a chance to test an AT board that fits inside an XT. That should be interesting.
Why tell this story? In the first place,
74 MICRO CORNUCOPIA, #32, Oct-Nov 1986 -
Eco-C C Compiler
7. ‘This is the only package we reviewed that we ~ gq _ would be willing to call a professional tool.”
When the review mentioned above was written,
a the Eco-C C Compiler was priced at $250.00. Now "you can have the same compiler fora mere $59.95. And that price is complete, including a library of 120 functions, all operators (except bit fields), structures, unions, long, floats, doubles, plus user's _ manual. We've even included a special version of the SLR Systems assembler and linker.
“Times eourleey of Dr. David Clark CNC - Could Not Compile N/A ~ Does not support floating point
Eco-C requires 56K of free memory, 240K disk space (one or two disk drives or hard disk), Z80 ~
CPU and CP/M 2.2 or later. We also have an -
MSDOS version at the same low price. Call today!
EG (317) 255-6476
6413 N. College Ave. @ Indianapolis, Indiana 46220
INMD TIER UISIDLORDLO\UTLUIN |
By Stephen M. Leon
~ 200 Winston Drive Cliffside Park NJ 07010
without the people in the users group, I never could have resolved some of the problems that came up. Second, a lot of this kind of information is in the public domain libraries and on the BBS systems. Last, the extra PC is now a part of the Amateur Computer Group of New Jersey bulletin board system. You can download any of the SIG/M or PC/Blue software we discuss in Micro C by calling (201) 886-8041 with- out having to go through any prelimi- nary registration papceeune
What’s New At SIGIM.
While the SIG/M library has tradi- tionally featured CP/M and related software, some of the foreign libraries, such as the Australian, UK, and Japa-
Computer Language, Feb., 1985
Benchmarks* ‘ (Seconds)
1-800-952-0472 (orders only) 1-317-255-6476 (information)
Ny! i cS
nese, have tended to mix CP/M and MS/PC-DOS. We recently advised that the SIG/M library was being made available in a variety of 5’’ formats as well as the standard 8’’. Now that we are making 5’’ formats available, we decided to take the next step and include some MS-DOS and PC-DOS material.
Editor’s note: This is a real break with tradition for SIG/M, but it’s obviously a matter of survival. Don’t forget that Micro C is also releasing new software into the public domain arena, so keep us in mind. However, we are pickier about program quality and usability than PC/Blue or SIG/ M. But we don’t exclude software Het because it's shareware.
Micro C readers who would like to donate PC/MS-DOS software to the public domain are welcome to send it to SIG/M. We will not publish share- ware or any software that asks for a contribution of any sort. Demo pro- grams for commercial software are
definitely thumbs down. We also pre- _
fer that source code be included. With these standards, we don’t see any
Hi-RES MONO « 14” Uae Monitor! * TEXT _ 732x44!
* Hercules Compatible! -| * Parallel Port!
Only $295!
200W PS - Clock/Bat AT-Style KB 1 MEG RAM — 1.22 MEG FDD
CGA COLOR 14" Swivel RGB! 640x200 Color! FineLine Text! — IBM Compatible! Parallel Port!
Only $595!
overlapping with the PC/Blue library, which contains mostly ‘‘send-me-mon- ey software.’’ We are also looking for software that works in the MS-DOS orphans.
Browse For Clipper
Last issue (Micro C #31), our es- teemed editor Dave Thompson ex- plained how he discovered the won- ders of Clipper. At the same time he bemoaned the lack of a Clipper equiv- alent of the dBASE Browse. Well Dave, the first of the SIG/M PC-DOS releases (SIG/M 284 and 185) contain the ACGNJ Mailing List program in dBASE3+ and on the disk is a Clipper compiled version. It contains a full- featured Clipper Browse.
This version does just about every- thing you might want a mailing list program to do. (A much simpler dBASE 2 version is available on SIG/M 110.)
I wrote the mail program, Harry Van Tassel wrote the Browse, and the disk contains both the source and the exe- cutable program. Harry’s Browse does
Parallel
8 Slots ; DOS 31
* NewWord2 WordStar Commands!
* SuperCalc2 Superb Spreadsheet!
* SuperFile Free-form Text Filing!
[21 MEG Only $2295! T 45 mec Only $2695!
NEW!!!
1 Year Warranty!
"15 Day MoneyBack - Guarantee!
c 9o M P u iT E R * 1690 65th Street, Emeryville, CA 94608
Prices and specifications subject to change without notice.
everything the real Browse does except APPEND. | The same disks tell how to add the Clipper SAVE SCREEN to dBASE3, how to have more than 20 open files in dBASE, and include an automatic -CLP and .LNK file maker for Clipper. If you’re addicted to BRIEF as a code editor (as I am), Harry has also written a how-to-add-a-Time-Date-stamp to BRIEF and how-to-add-line-graphics- code to your programs using BRIEF.
Irv Hoff’s IMP
Irv Hoff and Harry Van Tassel are probably two of the most prolific con- tributors to the public domain. While Harry always makes the source code available, Irv does not. We think Irv is wrong on that score, but we under- stand why he wants only one “‘offi- cial’’ version of his software.
We have now released Irv’s Im- proved Modem Program for CP/M as a three volume set (SIG/M 272 to 274). Included on the disks are overlays for just about any computer or modem you can think of. Also in the set is Irv’s version of XMODEM, called KDM17.
Another three volume set (SIG/M 275 to 277).is from the Tesseract RCPM+, Dural, New South Wales, Australia. Included in the set is a smart archive backup utility, a full screen C text editor, a volume of ZCPR3 utilities, a Z80 assembler, and a program to read MS-DOS disks in CP/M and CP/M Plus.
SIG/M Volume 280 contains some interesting Turbo Pascal programs from Jon Dart. Volume 279 has anoth- er Irv Hoff program — XIZI — a Z80 to 8080 and 8080 to Z80 translator. Also featured on 279 is a disk catalog program, a Z80 disassembler, a file dump/patch utility, and an RPN calcu- lator.
Speaking of calculators, the Summer 86 issue of the Nantucket News (Nan- tucket is the publisher of Clipper) contains a program by Guenther Dau- bach called Das Calc. Using a function © key, you can call up a calculator during a Clipper program and output the result into your program. Harry Van Tassel rewrote it and improved the graphics. It will be out with the
(continued next page)
MICRO CORNUCOPIA, #32, Oct-Nov 1986 75
IN THE PUBLIC DOMAIN —
(continued from page 75)
next batch of SIG/M | PC-DOS “soft ware,
- Volume 278 contains Z80DIS, a Z80 disassembler written in Turbo Pascal by Kenneth Gielow. Unfortunately, he has not released the source code, but we have released the program because
of its value. The major feature of the |
program is an extensive analysis of the memory usage by the program being disassembled. Z80DIS produces a break table based upon this memory usage analysis.
It also gives you an address listing which itemizes all addresses refer- enced by the code, distinguishes types of label references, marks subroutines and jumps, and produces a fully anno- tated cross-reference table. —
More From PC/Blue
The updated RBBS-PC (version 14.1b) is out on PC/Blue volumes 221 and 222. The Capital PC User Group deserves much credit for their mainte- nance of this program. It’s an excellent BBS system that installs with a mini- mum of effort. (You can even run two BBS systems on a single 640K PC using RBBS-PC and DESQ.) |
Volume 223 contains a unique how- to-do-it program’ — a Cantonese tutor from Louis Crew of the Chinese Uni- versity in Hong Kong. For those of you with limited. spreadsheet needs who cannot justify the purchase of Lotus 123, Freecalc on PC/Blue 224 may help.
I never could understand why any- one would want to do software en- cryption. It would seem to me that the danger of messing up your data is greater than the value of the encryp- tion. However, if it interests you, take a look at PC-CODE on PC/Blue 225.
A general ledger program called PC- BOOKS is on .226.. Volume 227 con- tains a single entry accounting system. Volume 228 has a double entry ac- counting system. Volume 231 contains a general ledger, accounts receivable, and payroll program. How good or bad these programs are I can’t say. I do know that unless you know what you’re doing, one of these programs can really cause trouble for a small business. All my accountant friends tell me they still find a substantial void
in current micro accounting software. So, user beware.
A Must Mortgage Program. Every banker, lawyer, accountant, or
real estate broker with a PC should:
pick up a copy of PC/Blue 226. Ronald C. Pakanowski has written Ml-Ana- lyst, a mortgage investors’ forecasting tool. Some of it is dated because of the
new tax law, but it has the best
display of a mortgage amortization schedule I have ever seen. It does a lot more than that, and it does ask for money — but in a nice way.
Not being an engineer type, I didn’t quite understand PC/Blue 229. It con- tains a program called D’SCOPE, which at first I thought made your PC into an oscilloscope. It doesn’t. In- stead, it converts the PC into a power line monitor, if you add some hard- ware.
Volume 230 has a Lotus learning adventure, a spline calculator, and a graph program. Templates of Doom is stated to be an interactive adventure game tutorial for 123 versions 1a and 2. Unfortunately, this is nothing more
than a demo of a commercial game » which you are told you can purchase ~
for $39.95. The spline and graph pro- gram look good.
Church Management User Group ACGNJ is contemplating setting up a Church Management User Group to help religious institutions with their computer hardware and _ software problems. Both the PC/Blue and the
SIG/M libraries already have some — church management software, but as. far as we know this would be the first major effort to unite this group. .
much more.
A Book For SERIOUS Programmers 7
Turbo Pascal - Advanced Applications
Written by the experts. Includes using interrupts, bit mapped graphics, optimization techniques, utilities, low level system tools, how to call DOS functions from within your application, using data compression to save disk storage and transmission time, how to build your own subset compiler, using in-line code, and -
NOT ANOTHER BEGINNER TUTORIAL
Anyone using Pascal or Turbo Pascal-will appreciate the advanced and thorough discussions of program- ming topics. Complete source code in the book and also on MS DOS disk.
Order Turbo Pascal - Advanced Applications for $16.95; with MS DOS disk—$29.95. Add $1.50 shipping in US and Canada. Overseas surface, add $3.50. Air rates on request. Order from Rockland Publishing, 190 Sullivan Crossroad, Suite 108, Columbia Falls, MT 59912. Visa and Master Card accepted. Phone or- ders: (406) 257 9119. Further information upon request. Dealer inquiries welcomed.
As part of this proposal, a BBS-
- system would be set up as a clearing
house for information and software. The group would probably try to de- velop or seek some specialized soft-
ware which could also go out on SIG/.
M and or PC/Blue.
If you’re interested in this program, or know someone who might be inter- ested, please have them contact Burke Mawby at (201) 566-7445.
How To Order SIG/M volumes are available on 8’’
“SSSD disks for $6 each ($9 foreign)
directly from SIG/M, Box 97, Iselin, NJ 08830. They are also available in most 5’’ formats. The charge for 5’’ disks is $7 per volume. However, for SSSD formats, or any format which requires more than one disk, please add anoth- er $2 per volume. Printed catalogs are $3 each ($4 foreign). PC/Blue volumes are $7 each ($10 foreign). The printed catalog is $5. Both are available from the New York Amateur Computer Club, Box 100, Church Street Station, New York, NY 10008. Both groups have a disk catalog (Volume 0) avail- able at the price of a standard disk volume. This catalog volume is usually more current and more readily avail- able than the printed catalog.
ew
76 | MICRO CORNUCOPIA, #32, Oct-Nov 1986
Assembled & Tested
$70.00
XEROX’820-1 & 2
820-1 $50.00 820-2 CP/M (8") 35.00 CP/M (8") 35.00 820-1 w/CP/M 70.00 820-2 w/CP/M — 90.00
Xerox is a trademark of Xerox Corporation. CP/M is a trademark of Digital Research.
OEM HOBBYIST
Sips Inductors Pots 7400 Dips Sockets Regulators Caps 74LS chips Linears Resistors Some ECL and more..
POOR MAN'S NETWORK
Now you can implement networking on your own CP/M computers and share resources whenever you want. Each user can access files and printers on the other computer directly, without expensive hardware or switches, and without a communications pro- gram. Share floppies, RAM-disk, hard disks, and printers between two users. Works with most standard CP/M programs, like Wordstar,. PIP, dBase II, etc.
Poor Man’s Network works best with bidirectional parallel ports, or standard serial ports at 9600 baud or greater. Present version supports two computers only, and requires CP/M 2.2 on each computer. Uses only 6K of memory. Does not require a hard disk; runs on 8080, 8085, 2-80, HD-64180.
Poor Man’s Network comes ready to run on BigBoard | and I!, Xerox 820, NorthStar Horizon, NorthStar Advantage, Televideo TPC |, Kaypro (not 2000), Apple II (Super Serial required), S-100 with Compupro Interfacer 4. Can be installed on other computers by altering one of the assembler overlay files provided. Each disk contains drivers for all
the specified computers. Best of all is the price: only $69!
Specify disk format: 8” SSSD, NorthStar, Kaypro, or Apple CP/M. Phone orders accepted; sorry, no CODs or Purchase Orders. Payment may be by certified cheque, money order, Visa, or Mastercard. Personal cheques from outside Canada require up to 6 weeks to clear. Canadian - orders please pay in Canadian dollars; others in US dollars. Price includes diskette, manual and postage. Ontario residents please add provincial sales tax.
Note: If you use another operating system, such as CP/M 3 or PC-DOS, send us your name and address, but no money, and we will notify you when it is available for your system.
ANDERSON TECHNO-PRODUCTS INC. 947 Richmond Road, Dept C Ottawa, Ontario K2B 6R1, Canada Telephone 613-722-0690 for more information or to order.
CP/M is a trademark of Digital Research; 2-80 is a trademark of Zilog; Wordstar is a trademark of MicroPro; dBase; \l is a trademark of Ashton-Tate. Poor Man's Network is a trademark of Doug Anderson Techno-Products Inc.
$100.00 Z00-B 6MHz $4.50 3P+N POWER SUPPLY
Single board power supply kit with 2 positive fixed voltages. +1 and -1
variable. KIT $54.95 E*| COMPUTER PRODUCTS
2273 American Ave. #8 - Hayward, CA 94545 (415) 786-9203
Sapricot
TERMS: All orders are F.O.B. Hayward California - Prepayment or C.0.D. - California residents
add sales tax - Prices subject to change without notice - Quantities limited to siock on hand. Real 16 Bit Power on a Single Board —
SLICER... THE 1 ies Featuring the Intel 80186 (C) Step CPU = Complete 8 MHz 16-bit micro- TRUE LOW COST processor on a 6” x 12” board mw 256K RAM, plus up to 64K EPROM
mw SASI port for hard disk controller
THE SLICER SLICER/1MByte EXPANSION COMBO The Slicer (without RAM or RAM W controllers) with Full 1-MByte WE Memory Expansion
CCP/M (Digital Research) _ $950
THE SLICER PC EXPANSION BOARD Gives your Slicer high performance
AULT -USER ™ Two full function RS232C serial ports | video capability i with individually programmed = IBM compatible monochrome video m Software compatibility with the 8086 text or special graphics capability and 8088. = 21BM type card slots for color video, @ 8K of EPROM contains drivers for 1/O expansion, etc.
peripherals, commands for hardware ™ IBM type keyboard port
checkout and software testing m= Software supports most types and sizes of disk drives @ Source for monitor included on disk ™ Bios supports Xebec 1410 and - Western Digital WD 1002 SHD controller for hard disks Fully assembled and tested only $445 THE SLICER 1-MByte AN EXPANSION BOARD WE For expanded memory, additional ports, and real time clock @ 1-MByte additional dynamic RAM ® 2 RS232C asychronous ports with baud rates to 38.4K for serial communication . @ 2 additional serial ports for asynch - (RS 232) or synch (Zilog 8530 SCC) communication § Real Time Clock with battery backup @ Centronics type parallel printer port Fully assembled and tested only $450
Fully assembled and tested only $495
All boards avaitable in kit forms
The SLICER Bulletin Board (300/1200 baud) 612/788-5909
Runs MS DOS generic software; PC DOS program operation not guaranteed
Also available: The ,Slicer 188 $400;
8087 Math Co-Processor Bd. (call); 10 MB Hard Disk $465; W.D. 1002-SHD H.D.C. Bd. $200; Enclosures, Power Supply, and Support Hardware.
CP/M 86 $85, CCP/M $250 (Digital Research, Inc.); MS DOS $175
(Microsoft Corp.)
MasterCard, Visa, Check, Money Order, or C.O.D.
Allow four weeks for delivery. Prices ater to change
without notice.
QUALIFIED DEALER INQUIRIES INVITED»
Slicer Computers Inc. SS —$-_—sw¥"'e2?543. Maarrhaaill St. N.E. SLICER: Minneapolis, MN 55418 612/788-9481 =—=—————___ Telex 501357 | SLICER UD
MICRO CORNUCOPIA, #32, Oct-Nov 1986
77
CP/M 2.2 INCLUDED
eS O
@ 4 MHz Z80A CPU, 64K RAM, Z80A CTC, 4-32K EPROM
@ Mini/Micro Floppy Controller (1-4 Drives, Single/Double Density, 1-2 sided 40/80 track)
@ 2RS232C Serial Ports (75-9600 baud
& 75-38, 400 baud), 1 Centronics Printer Port
@ Power Requirement: +5VDC at .75A; +12VDC at .05A / On board -12V converter
@ Only 5.75 x 7.75 inches, mounts directly to a 5-1/4” disk drive
@ Comprehensive Software Included: @ Enhanced CP/M 2.2 operating
OPTIONS:
@ Source Code
®@ TurooDOS
@ ZRDOS
® Hard disk expansion to 60 megabytes
@ SCSI/PLUS™ multi-master I/O expansion bus
®@ Loca! Area Network
e@ STD Bus Adapter |
BOOKSHELF™ <..:25 100
Fast, Compact, High Quality, Easy-to-use CP/M System
@ Compact 7.3 x 6.5 x 10.5 inches, 12.5 pounds, all-metal construction © Powerful and Versatile: @ Based on Little Board single-board computer
@ One or two 400 or 800 KB floppy
drives @ 10-MB internal hard disk drive option
Priced from $895.00 10MB System Only $1645.00
-@ 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
DISTRIBUTORS
ARGENTINA: FACTORIAL, S.A., 41-0018
TLX 22408 AUSTRALIA; ASP MICROCOMPUTERS, (613) 500-0628,
TLX 36587 BELGIUM: CENTRE ELECTRONIQUE LEMPEREUR, (041) 23-45-41, TLX 42621 BRAZIL: COMPULEADER COMPUTADORES LTDA, (41) 269-1939, TLX 416132 CANADA: TREM, (604) 438-9012 DENMARK: DANBIT,
ATA
COMPUTERS. INCORPORATED
(03) 66 20 20, TLX 43558 UK: AMBAR SYSTEMS LTD., 0296 35511, TLX 837427 FINLAND: SYMMETRIC OY, 358-0-585-329, TLX 121394 FRANCE: EGAL PLUS,
(1) 4502-1800, TLX 620893 ISRAEL: ALPHA TERMINALS, LTD,, (03) 49-16-95, TLX 341667 SWEDEN: AB AKTA, (08) 54-20-20, TLX 13702 USA: CONTACT AMPRO COMPUTERS INC,.
IBM®, IBM Corp.; Z80A®, Zilog, Inc.; CP/M®, Digital Research; ZCPR3™ & ZRDOS™, Echelon, Inc.; Turbo DOS®, Software 2000, Inc.; T/MAKER Ili™, T/Maker Co.
67 East Evelyn Ave. e Mountain View, CA94041 « (415) 962-0230 « TELEX 4940302 78 MICRO CORNUCOPIA, #32, Oct-Nov 1986
AROUND THE BEND
a (continued from page 2)
already seen substantial use (and abuse) and they’ve been great. Mike suspects that they have plated media. Last issue we reported that the Micropolis 85 Meg was probably the most reliable drive on the market with its MTBF (mean time between failures) of 50,000 hours. No one has put 50,000 hours on one of the 20s yet (there haven’t been 50,000 hours to put), but Portland folks are expecting them to make it.
Unfortunately, Micropolis drives haven't been generally available on the user market because the company prefers to deal with OEMs. .
Mike also reported that his group likes the Adaptec 2010A controller. He says it’s very fast (2 to 1 interleave with an XT) and will format anything with platters. The group was using the DTC before they discovered the Adaptec. (They’ve spent the past few months checking out keyboards, and the two which haven’t worked with some of their clones are Cherry and Microswitch. They'll let us know if they find a keyboard that works with everything.) _ . 7
By the way, for those of you in the Portland area, the group meets the second Wednesday, 7 p.m., in the Multnomah Art Center (an ex-grade school in Multno- mah).
See the letters column for more information on hard drives.
QEX
The American Radio Relay League has recently begun publishing QEX, a journal for radio experimenters. At 20 pages it’s not large, but it has quite a bit of information for those of you interested in packet radio, amateur satellites, and other new communications technologies. The June issue of this monthly magazine included the first of a series of articles on the Xerox 820-1. They are covering the 820 because it’s used as a packet controller.
QEX
225 Main St.. Newington CT 06111 $12 per year, 12 issues ($6 for ARRL members)
Power Supplies .
I’ve been working, on and off, on the next servicing article. The next is to be about power supplies, those low tech versions of high tech that can wipe out a complete system, drives and all, in mere milliseconds.
The current supplies (pun intended) are all switchers. They all take AC, rectify it and filter it into a reasonable facsimile of DC (about 300V), run it through high speed switching transistors, a toroidal transformer, and then through regulators to the system. |
That’s a very simplified look, but it gives you an idea.
Neo ge eel
The problem with most power supplies is that there is no protection for the computer should the supplies fail. All the supplies I’ve seen have spike arresters built in (same as the ones in those expensive power line filters), but spikes account for only a small percentage of the problem. Most of the damage to supplies and most system crashes are caused by dropouts (or holes) where the power goes away or sags for a few milliseconds.
Also, the input (300V) side of these switchers will occasionally self- destruct without any help from outside.
Anyway, the ICs on the main board are literally at the
mercy of the power supply. They get fried by voltages that are 20 percent or more over spec. So when Dean Klein mentioned that PC-Tech had found a better power supply, I was very interested (we've had two fail so far, and both caused significant damage to the computer system). The company is Phihong, and it’s been making power supplies for Japanese manufacturers for many years. Dean was im- pressed with the quality of the parts and the fact that the supplies had over voltage protection built in. (Hooray, no more sizzled parts.)
I just purchased one of the 135 watt supplies. It was nearly $90 (including shipping), but it has the best quality assembly I’ve seen, and the fan is very, very quiet. If you purchase in quantity, prices get very competitive, so this may be a good group purchase.
‘Phihong USA ©
204 Los Gatos Blvd Los Gatos CA 95030 (408) 395-9222
Automatic Transmission
Micro C has been called the Hot Rod magazine of the computer world. OK, we’ll match our speedups with anyone in the industry. We’ll also match fuel economy with the slow pokes.
However, we’re still crystal controlled. We can’t speed up a system until it dies, and then back off 10 percent or 15 percent so it’ll keep running. At least not without 25 or 30 crystals.
However, a small outfit in Beaverton, Oregon called Data Environment has designed and produced a variable speed clock which replaced the 8284 clock chip in the XT. Thad Young, the designer, took a VCO ‘voltage con- trolled oscillator) chip and hooked a potentiometer to its input. The VCO outputs anything from 4MHz to well over 10MHz. | 3 |
The output of the VCO goes to the 8284 on their daughter board. The daughter board plugs into the 8284 socket on the XT.
(continued next page)
SCSI ENGINES Little Board/ 186™.... $495
High Performance, Low Cost PC-DOS Engine
Boots IBM PC-DOS (not included)
BG
@ Three times the COMPUTING POWER of ®@ Only 5.75 x 7.75 inches, mounts aPC directly to a 5-1/4” disk drive
@ Data and File Compatible with IBM PC, @ Power Requirement: +5VDC at 1.25A;
runs “MS-DOS generic” programs +12VDC at .05A; On board -12V
@ 8 MHz 80186 CPU, DMA, converter Counter/Timers, 128/512K RAM zero @ SCSI/PLUS™ multi-master I/O wait states, 16-128K EPROM expansion bus
@ Mini/Micro Floppy Controller ® Software Included: (1-4 Drives, Single/Double Density, @ PC-DOS compatible ROM-BIOS boots 1-2 sided, 40/80 track) DOS 2.x and 3.x
@ 2 RS239C Serial Ports (50 -38,400 ® Hard Disk support
baud), 1 Centronics Printer Port OPTIONS
PROJECT BOARD/186™ - adds 25 square inches of wire wrap
prototype area with buffered and & pre-decoded 80186 bus interface for Little Board/186
EXPANSION/186™ - acids five key
options to Little Board/186
@ 512K RAM
® 8087 co-processor
© Battery-backed Real Time Clock
@ 2RS232/422 sync/async serial ports
@ 1/0 expansion bus
VIDEO RAM EMULATOR™ -allows use of software that writes to display controller “VIDEO RAM”
SCSI/IOP™ - permits connection of off-the-shelf STD bus industrial t/O interfaces (analog, digital, seriat, display, power control, etc.)
DISTRIBUTORS (03) 66 20 20, TLX 43558 UK: AMBAR
ARGENTINA: FACTORIAL, S.A, 41-0018 TLX 22408 AUSTRALIA: ASP SYSTEMS LTD., 0296 35511, TLX 837427 MICROCOMPUTERS, (613) 500-0628, FINLAND: SYMMETRIC OY, 358-0-585-329, TLX 36587 BELGIUM: CENTRE ELECTRONIQUE —«TLX 121394 FRANCE: EGAL PLUS, LEMPEREUR, (041) 23-45-41, TLX 42621 (1) 4502-1800, TLX 620893 ISRAEL: ALPHA BRAZIL: COMPULEADER COMPUTADORES TERMINALS, LTD., (03) 49-16-95, TLX 341667 LIDA., (41) 269-1939, TLX 416132 CANADA: | SWEDEN: ABAKTA, (08) 54-20-90, TLX 13702 TREM, (604) 438-9012 DENMARK: DANBIT, USA: CONTACT AMPRO COMPUTERS INC,,
IBM®, IBM Corp.; 80186, Intel, Corp,.
COMPUTERS, INCORPORATED
67 East Evelyn Ave, ¢ Mountain View, CA 94041 ¢ (415) 962-0230 TELEX 4940302 © FAX (415) 962-1042
MICRO CORNUCOPIA, #32, Oct-Nov 1986 79
Electronic RAM DISK /Printer Buffer
Combination
For your CP/M Kaypro... all boards shipped assembled and tested.
Choose from 4K, 32K, or 64K printer buffer options.
RAM Disk without RAM Chips 256K RAM Disk 512K RAM Disk 768K RAM Disk 1 MB RAM Disk $495.06 $445. 00 *Prices include all installation materials except for PIO Adapter Board required for Kaypro 10 w/out an internal modem and optional on 1, 2-84, 2X, and 4-84.
aed a
NOW INCLUDED WITH RAM DISK: FREE! Instruc- tions, Parts Layout, Schematic to build a BATTERY BACK- UP POWER SUPPLY for the RAM Disk.
KAYPRO II TO IV UPGRADE includes 2.5 Mhz to 5 Mhz speed up, two 390K disk drives (DSDD) to replace the single sided drives; price includes our labor to do install-
$395.00
ALL CP/M HARDWARE ADD-ONS STILL AVAILABLE — CALL OR WRITE FOR CATALOG AND COMPLETE DESCRIPTIONS.
ke EK
NEw MS DOS ENHANCEMENTS
1. PC Speed-Up Kit: Dual speed 6.67mhz, 6.0mhz, 4.77mhz options. Includes 8 mhz V20, crystals and instruc- tions $37.50 2. NEC V-20 Improved 8088 Microprocessor (8 Mhz); 10-45% increase in speed; just plug it in
3. Kaypro 16 256K-512K
Memory Expansion .
4. Kaypro PC 256K-640K Memory Expansion
Both memory expansions are simple plug-in installations; includes public domain RAM Disk software and other utility programs.
MicroSphere, Inc. P.O. Box 1221 Bend, Oregon 97709 (503) 388-1194
80 MICRO CORNUCOPIA, #32, Oct-Nov 1986
AROUND THE BEND
(continued from page 79)
They brought out a switch (high speed, low speed) and a reset button on a phone cable so you can switch speeds externally. The pot is mounted on the daughter board inside the computer.
Data Environment includes a really nice software routine with the board. The software shows the current speed as well as a rectangle for each 64K bank of RAM on the board (four banks per 256K set). If one of the RAM chips fails while you’re increasing the speed, its rectangle begins to blink.
The program crashes when the processor dies and
when the program’s bank of RAM goes to lunch. I fired up several Sky High clones and found that the floppy controller quit between 7.5 and 7.8MHz. The processor (or kernel related ICs) died at 8.2 to 8.7MHz. The winchester interfaces were working when the kernel died. In that mix there was an 8088 (not -2) that went to 8.4MHz, a 5MHz V20 that went to 8.2MHz, and several 8MHz V20s that died at 8.2 to 8.7MHz (120ns RAM).
At 8.36MHz, the V20 gave me a Norton speed index of 3.2 (4.77MHz 8088s have an index of 1.0).
This is a fun little product. And it would be ideal for a group or shop. You could speed up a system until it died and then install a crystal that’s slightly slower. You could also use this system to test boards or RAM chips.
The package is $199 retail (dealer orders are encour- aged).
Data Environment Box 5191
Beaverton OR 97006 (503) 627-9626
Cal-Tex
We no longer have any Big Board IIs at Micro C. It’s not that we didn’t purchase any; we had five as recently as June. It’s just that we’ve been getting calls from desperate corporation types looking for BBIIs.
The calls began in early spring and went something like:
“‘Do you know what happened to Cal-Tex? We’ve been calling them and writing to them and no one answers. Are they out of business?”
Our five boards have gone out to those businesses which had designed products around the BBII and now have no source of boards.
I talked to Jim Ferguson, designer of the board, and he told me that Bill Siegmund (head honcho, chief techni- cian, marketing director, and sole Cal-Tex employee) had gone to Hawaii. Temporarily.
I understand that Bill is now back in the San Jose area, the Cal-Tex office is still there, mail still arrives at the door, hundreds of populated boards gather dust on the shelves, but no one goes to the office.
They Don’t Write Right
I attended a writers’ conference last weekend and rubbed shoulders with some major league novelists, technical writers, romance writers, play writers, and crime writers (romance writers who love violence).
All of the technical writers used word processors. Very, very few of the other writers used computers at all (maybe 10 percent).
An Apple dealer conducted a forum on desk top publishing and demonstrated his Macintosh and Apple laser printer package (complete with software) for a mere $10,000. Later, Computerland showed up with their clone package for $2,000 (two floppies). The average profes- sional writer makes $8,000 per year, working full time.
Anyway, these poor writers were being told that they should invest anywhere from $2,000 to $10,000, and, of course, most of them couldn’t afford it. But even those who could were put off by the treatment they received from computer salesmen.
One attendee mentioned that he had found a store in the Portland area (after trying over a dozen) where the salesperson worked with him for more than an hour figuring out what he wanted to do and how she could help him do it. This guy is no dummy — he’s a well- known film and TV commercial producer, but he was most impressed with the fact that she didn’t make him feel like a dummy. That salesperson talked to him in writers’ language, and carefully defined computer terms (byte, memory, RAM, drives, word processor) before using them.
He wound up purchasing a Leading Edge system with Word Perfect from the gal, and is delighted with the package.
“TI don’t know why I waited so long. If someone offered to trade a new Porsche for this computer, and stipulated that I couldn’t buy another system, I’d turn him down. I can’t go back. But if I hadn’t found that computer store (Abacus) I’d still be scribbling on parch- ment.’
One attendee who was knowledgeable about computers had set himself up as a computer consultant. For $20 per hour he’d work with prospective computer owners helping them decide what they needed and where to get it. He’s writing his experiences for an ‘‘On Your Own.”
Need your Kaypro”™ at home and at work?
Let UniForm and UniDOS help you cut down on the carrying. UniForm by MicroSolutions
Don’t carry your computer, just take the diskette.
The solution to the diskette and computer incompatibility problem. UniForm allows you to transfer diskette files between almost two hundred formats including CP/M, TRSDOS, and MSDOS. Lists computers by name—so you don't have to be a technical expertto use it. Read, write, and format diskettes for the target computer, even on 96 TPI drives.
UniFormis available from our stock forthe Kaypro, Xerox 820-2, Morrow MD2 & MD3, IBM, and 100% compatibles. —
UNIFONMN ses shces ct ccincs atin ae ads eee eee Mes ab aie sats $ 64.95
UniDOS by MicroSolutions Turn your IBM into a Kaypro*. UniDOS allows you to actually RUN most of your CP/M programs on your IBM com- patible, almost as fast as on their native system. Use UniDOS in conjunction with UniForm and you don't even need to copy your files, just run them as the are, right on your Kaypro“ diskette. 8080 code programs run using the NEC V20 chip which replaces your 8088. Z80 programs may be run in emulation mode. The V20 chip speeds up many standard DOS operations as well as maintaining 100% compatibility with your existing DOS programs.
**UniDOS emulates eleven computers or terminals including the Kaypro, Osborne, Northstar Advantage, and Apple Softcard CP/M.
UniDOS is available for IBM and 100% compatibles.
UNIDOS o's disc ecient bases Seth aiden Re dieg wegiews uote eee Bea's $ 64.95 UniDOS and UniForm with V20 chip ...........-..-0 000 eee #4 $139.95 «+0 See our full page ad for our other products. Add $4.00 for shipping and handling, $7.00 for COD. Bankcards welcome.
EMERALD MICROWARE,
ALOHA, OR 97007
P.O. BOX 6118
CP/M, MS-DOS EPROM PROGRAMMING SYSTEM
(503) 642-1860
*ADAPTER SOCKET REQUIRED
~- STAND ALONB BOARD USES NO BACKPLANS SLOT — FAST ALGORITHM - NO Senne MODULES — INSTALL PROGRAM FOR SOPTWARB - USES 24 VOLT XFMR FOR POWER — LARGE COMPREHENSIVE MANUAL - PROGRAMS 26,25,21 & 125V B/EEPROMS — ALL SUPPLIES ON BOARD - NOT A SERIAL PROGRAMMER, NO FILB DOWNLOADING REQUIRED
** PARALLEL PRINTER INTERFACE * *
CONNECTS TO ANY PARALLEL PRINTER INTERFACE — USES 8 OUTPUT DATA BITS AND ONE BIT (THE BUSY LING) FOR DATA INPUT.
* * CONTROL PROGRAM COMMANDS * #
— PROGRAM FLBINTO RA Bw DISK - SAVE AN EPROM TO DISK
- CAN DISK FILE | — PROGRA\ Ue Hap BN Via BAD EP INTO RAM - cone
- - VERY EPROM
D Y EPROM. — DISPLAY/MODIFY RAM — ee MOD) wl ITH 11 SUB COMMANDS PILL—DUMP—XFER-BXAM-MODIFY-BIAS-PRGM-VBRIFY-CKSUM, BTC.)
ASSEMBLED @ TESTED UNIT WITH COMPLETB ——> $199 eer RS AND Sa tae ON DISKBTT!
KIT WITH SOPTWARB AND DOC->$179 PCB SOFTWARE & DOC->$69 SOPTWARE ON 8 @ 5 1/4 DISK FOR KAYPRO, AMPRO, IBM & OTHER FMTS
TO ORDER SEND CHECK, MONBY BCH. WRITB OR CALL
P.O. BOX 222 MILFORD, OHIO 45150 (513) 752-7218
CALL OR WRITE FOR MORE INFORMATION —~ ADD $4.00 FOR SHIPPING OHIO RES. ADD 5.5% TAX -- MSAIMG ACCEPTED ~~ $3.00 FOR COD
- MICRO CORNUCOPIA, #32, Oct-Nov 1986 81
256K Fix |
We've had a few calls recently from - frustrated folks attempting the 256K Kaypro upgrade from issue #30. After all that work, they would end up with only 16K of memory.
Dr. Liddle (the author of the up- grade) called from England the other day with the answer to the 16K blues. Refer to figure 1 of that article and make the following changes. On the 74LS393, pin 2 should be grounded. Jumper it to pin 7. On the 74LS153, connect pins 10 and 11 to Al4b and pin 12 to PIO1.
Ray Rizzuto came up with the same answers and added another warning. He was picking up noise at the input to U3 which was dependent on the position of the board. Ray stifled the noise by connecting up three 4.7K pullup resistors: one between plus 5V and each of PIO1, PIO2, and PIO3. |
Check the Micro C bulletin board for
_ Dr. Liddle’s software. It’s in the KAY-
PRO area under ‘the. name - Q56KAY.LBR. — : - Portable EPROM Eraser
Have you’ve been out camping and suddenly realized that you needed to erase an EPROM? If so, here’s your project. This EPROM eraser came about because I couldn’t find a stan- dard fixture for a 6 watt (9’’) ultra violet fluorescent tube. (For erasing EPROMs.) - ;
I tried all the local hardware and home centers with no luck. Finally, I read the back of the package of a standard 6 watt fluorescent tube. It said: ‘’For use in battery powered lanterns.”’
I now have an EPROM eraser and a
1 Mbit 4464 41256 41256 41256 41128 4164
27128 27C64 2764
640 Kbyte MOTHERBOARD KITS: Zenith 150: $77.74 IBM PC/XT, Compag Portable & Plus; hp Vectra
SAT DELIVERY
INCLUDED ON — FED-EX ORDERS . RECEIVED BY:
Fr: P-One $13/2 lbs
PROMPT DELIVERY!!! G SAME DAY SHIPPING (USUALLY) . QUANTITY ONE PRICES SHOWN for AUGUST 24, 1986
OUTSIDE OKLAHOMA: NO SALES TAX
27512 27C256 27256
1000Kx1 100ns $69.50
64Kx4 150 ns 4.20 256Kx1 100 ns 5.10 Bae 256Kx1 120 ns 3.10 Hes 256Kx1 150ns 2.93 2° 128Kx1 150 ns 4.99 Bee
64Kx1 150 ns 1.45 EPROM | o° 64Kx8 250ns $24.00 Biss 32kx8 250ns _—s«= 7.00 [egy
32Kx8 250 ns 5.46 Be
16Kx8 250 ns 4.15 Be: 8Kx8 200 ns 5.15 Bar 8Kx8 250 ns 3.75 co STATIC RAM nbs 43256L-12 32kx8 120ns $33.00 HRs
6264LP-15 skxs8 150 ns
OPEN 61 DAYS 7AM-9PM: SHIP VIA FED-EX ON SAT.
MasterCard/VISA or UPS CASH.COD Factory New, Prime Parts uPoo MICROPROCESSORS UNLIMITED, INC.
Th: Std Air $6/4 Ibs 24,000 8. fay Ave. (918) 267-4961
Please call for current prices because prices are subject to change. Shipping & insurance extra. Cash discount prices shown. Orders received by next moming, via Federal Express Standard Alr (@ $6.00, or Priority One @ $13.00!
cM
camping lantern. Lanterns cost from $10 to $15 and are available at any department store with an automotive or camping section. The 6-watt ultra violet light costs about the same. A good source for the lights is:
Ultra Violet Products 5100 Walnut Grove San Gabriel CA 91778 (818) 285-3123
It takes about 15 minutes to erase an EPROM under the ultra violet. Be sure not to look at the tube any longer than ‘Necessary — severe eye damage can result. (Black lights or bug lights are totally useless on EPROMs.)
‘Robert R. Carroll 19860 Kingswood Lane Huntington Beach CA 92646
DYNAMIC RAM
$12.00 $14.00
9 PM CST can usually be delivered to you the
PC Speedup Tips
A couple of potential technical prob- lems which your readers might en- counter when attempting to install Larry Fogg’s PC speedup which ap- peared in Micro C issue #31:
1. Thermal problems: The 8284A is a very high power device, dissipating as much as 1 watt under normal operat- ing conditions. The stacked mounting scheme shown in the article does not provide adequate air flow and can cause device failure.
2. Hardware incompatibilities: Some expansion hardware such as Quad- ram’s Quadboard expect the 14.318MHz oscillator signal to be speeded up to match the Pioce e S clock.
3. Boot problems: While the author’s system boots properly at high speed, many won't. Also, the high speed boot up will not allow users to run either IBM’s standard or extended di- agnostics.
4. Installation: The installation neces- sitates tacking wires on the mother- board and mounting the 74LS04. If
‘removal is necessary, the wires will need to be removed. ' Also, a minor note regarding RAM speed. In the article the readers are -advised to check RAM for “’150 micro- ,second parts or faster’’ The correct
IBM-PC COMPUTERS
COMMODORE 64
IBM-PC SIG 454 Disksides ....... PC-Blue 187 Disksides .......... Capitol-PC 35 Disksides ........ ‘ Author’s Showcase 25 Disksides
- PC Gold 102 Disksides .......... _C-64 28 Disksides ............... . Amiga 25 Disksides ............. APPLE (Also CP/M Format Available) Best of DOS 120 Disksides ....:.. Macintosh 74 Disksides .......... Call (619) 727-1015 for 3 minute info recording. Call (619) 941-0925 for technical info. Call 1(800) 621-5640, wait for tone, then dial “PUBLIC” for orders only. Send large $.39¢ stamped envelope for free catalog.
NATIONAL PUBLIC DOMAIN SOFTWARE LIBRARY, 1533-A AVOHILL, VISTA, CA 92084
access time specifications for RAM devices are in nanoseconds.
Many systems will run fine at 7.37MHz with 200ns devices. There is never any need to use the more expensive 120ns devices; 150ns devices meet all worst case timing specifica- tions at 7.37MHz. Alternatively, users with 200ns RAM and memory timing problems can spare themselves the chore and expense of RAM replace- ment by replacing the 22.11MHz crys- tal on the high speed oscillator with a 20.0MHz crystal which will run the system at 6.67MHz.
John K. Martinelli Director of Engineering Microspeed, Inc.
5307 Randall Pl. Fremont CA 94538
Editor’s note:
First: we haven't had any heat problems with 8284s and yours is the first report.
An unscientific test for overheating is to lay your hand firmly on top of the suspected chip. If the chip is hot enough to burn your hand, the chip's probably too hot. Since we have two chips stacked, you'll have to deduce the temperature of the lower. (Touch the power supply first to discharge any static.)
Second: the boot problem .shows up around 7.5 MHz. It’s a limitation of the
PUBLIC DOMAIN SOFTWARE
FOR *ALL* COMPUTERS FROM THE LARGEST LIBRARY IN THE WORLD! Rent or buy complete user group libraries! (Or select individual disk: ONLY $4.00 each.)
Since it's not copyrighted, PD software may be freely distributed. Get accounting, dbase, Games, Word Processors, Educational, Communications, Utilities, Spread Sheets and hundreds more! User Group libraries are expanding every month as new software is ; contributed, get the latest info: a directory disk and catalog — only $5.00 postpaid! (Specify computer). . Browse through a rental library — copying out programs of interest to build your very own special interest library!
CP/M COMPUTERS - 300 Formats Available Rent Buy siataswi Care crave Snoaeweet $175 $600 ee TT $ 45 $249 sheaesa/giekelscaisre aie) s:etelawie, 0 $ 25 $100
acta ated chSteiara Salas Wieraa $ 70 $230 oi atayea a die ertiard' ele G.oidiereinia $ 70 $220
Rent . Buy
susieseeyaieial batt $460 $845 SIG/M UG 260 Disksides
sree eNotes $190 $375 CP/M UG 92 Disksides
avechseieee siete $ 40 $105 CP/M 86 25 Disksides Sijeorbeet eats $ 50. $100 Kaypro UG 60 Disksides
Epson UG 58 Disksides
were.et eintehas $100 $200 ATARI ST ;
saradsrar'ardromess $ 25 $ 65 STD PD 25 Disksides
wialeteiape axeieese $ 50 $100
Nodes Phe $120 $200
iba winters e scete $ 80 $225
siahetaeadslaneveeihi aida aes $ 50 $100 Disk downloading service — $10.00 first disk, $5.00 thereafter. No label disk sales $.69¢ with PD order. Rentals are for 7 days, 3 more days grace for return. We use UPS.
floppy controller board (see the Editorial in this issue).
Third: as for wires on the board, I guess I've been playing with hardware too long to see that as anything less than a sign of maturity. A system that’s reached its potential will have more than a few grey hairs. (And that goes for people too.)
Fourth, I didn’t catch the ns/us error during proofreading. My fault.
As for the 120ns vs. 150ns vs. 200ns parts, a conservative rule of thumb is: Memory access time should not be longer than 1 clock cycle (though processors often leave extra time during memory access). Anyway:
8 MHz times 120ns = .960 cycle 6.67 MHz times 150 ns = 1.00 cycle
Since 200ns parts will often pass 150ns or 120ns tests, it’s not too unusual to find them working fine in fast machines.
Finally, most commercial speedup prod- ucts and turbo boards add wait states to memory and I/O accesses, so a system will run dependably with cheap memory. For that reason, the ‘8 MHz’ super systems we've seen have benchmarked out at about 6.6 MHz.
MICRO CORNUCOPIA, #32, Oct-Nov 1986 83
BUILD YOUR OWN PC XT/XT TURBO
EXPANDABILITY
8 IBM Compatible I/O Slot bus. Works with all Hardware
for IBM PC/XT
VIDEO CARD
Monochrome graphic card or color graphic card
CUSTOM LANGUAGES
EPROM & ROM sockets, accepts 2764-27128 chips
for custom BIOS applications.
RANDOM ACCESS MEMORY
640K RAM on board. Utilizes 41256-150 N.S. RAM chips. 250% higher reliability factor based on‘2 5ths amount of memory chips required with IBM PC/XT for 640K RAM using 64K RAM chips. Memory versatility, single 256K or 640K RAM on board selectable jumper.
OPTIONAL PROCESSOR
INTEL 8087 Math CPU socket for volume numerical calculations.
ENCLOSURE
Convenient flip-top style or slide-in style metal case. Scratch resistant enamel surface.
POWER SUPPLY
150 Watt output, 110 or 220 volt operation. Quiet cooling fan. Ample current for high wattage consumption accessories.
FLOPPY DRIVES Model Teac-55BV 5%” 1% Height, Double Sided, Double
' Density, 48 TPI, 360K Storage, Direct Drive, Quiet
mechanism, low power consumption.
HARD DRIVE UPGRADES
Room for two optional half height accessories. Auxiliary cooling fan mounting capability.
PC/XT COMPATIBLE ADD ON & ACCESSORIES
MONITORS RGB Color/amber/green (TVM) TTL Monochrome amber/soft white (Mctek)
SYSTEM COMPONENTS
XT Motherboard 0-640K (2 layers) 4.77 mhz
XT Motherboard 0-640K (4 layers) 4.77 mhz _ XT Turbo-motherboard (4 layers) 8 mhz
XT Case (flip-top)
XT Case (slide-in)
XT 150W power supply
XT 5160 keyboard (AT style) FCC approved
Floppy controller w/cable
Multi 1/O card ;
384K Multifunction card (OK)
I/O Plus Il
Color graphic card
Monochrome graphic w/printer port |!
Teac 55BV Floppy drive
Assembly & Test
HARD DISK SYSTEMS:
Internal SEAGATE ST-215 10MB hard disk drive A
with controller
$359.00 109.00
119.00
_ 149.00
179.00 45.00 49.00 89.00 85.00 39.00 89.00
10.00
Internal SEAGATE ST-225 20 MB hard disk drive por
with controller
Internal 30MB hard disk drive with controller
V20-8 . EasyData 1200H (half size internal modem)
655.00 25.00 149.00
half size internal modem card for IBM Portable and PC/XT/AT and compatibles, same features as 1200L
but without the additional serial port. XT Assembly Manual
9.00
HARDWARE FOR IBM AT
a. AT compatibie motherboard $650.00 8 slots 1 MB memory on board, expandable to 1M ©
b. Combined floppy/hard disk controller 239.00
c. Printer port/serial port card 115.00
d. 200 watt power supply , 139.00
e. 1.2MB floppy disk drive 155.00
f. 2MB multifunction — 239.00
OK expandable to 2M, parallel port, 2 serial ports, game port
g. 3MB multifunction — , 259.00 OK expandable to 3M, parallel port, 2 serial ports, game port
h. AT type case | ; 89.00 i. AT compatible keyboard 89.00 j. 20MB hard disk, SEAGATE 4026 595.00 k. 30MB hard disk, SEAGATE 4038 739.00 — |. 40MB hard disk, SEAGATE 4051 899. 00 - ACCESSORIES . - Surge Suppressed outlet strip Ps 9.50 Surge Suppressed outlet strip (UL approved) ~~ 15.95 Parallel printer cable/serial cable -. 12.95 Disk storage w/lock (holds 100 pcs) 14.50 Disk storage w/lock (holds 50 pcs) 10.95 Roll Top Disk Storage (holds 100 pcs) 29.50
McTEK SYSTEMS, INC.
2316 FOURTH STREET BERKELEY, CA 94710 (415) 549-3472
DEALERS: Identify yourself as a dealer and we'll send you dealer information. We're reliable, efficient, and price competitive.
84 MICRO CORNUCOPIA, #32, Oct-Nov 1986
Turbo Pascal, An Almost Complete Language
By Mortimer Nerd
ll you Pascal, and non-Pascal, programmers
A should note that there’s a super bargain in the
computer language field. It’s Turbo Pascal. Turbo Pascal is the really neat brainchild. of Philippe Borland, an old prospector who comes down from the mountains to visit computer shows.
I’d recommend that you all program in BASIC except that it’s expensive, at least for a compiler and compilers make your code run faster, but faster isn’t always better. I’ve found that the compiled Pascal code is taking as long to run as the BASIC interpreter.
Pascal
Pascal is a computer language like no other, except that it’s somewhat like C and Modula II. It’s also like RATFOR, which is similar to C and Modula II, too.
I learned structured programming in BASIC, and I’ve found that Pascal gives me everything I need to write structured code except GOSUBs. It’s hard to be really structured without GOSUBs. If you don’t use GOSUBs you're missing something.
A Letter
Anyway, I wrote to Mr. Borland and told him that if he were going to pretend to be structured then he had to add GOSUBs. I won’t read you the letter he sent me, but it’s obvious that he’s been to too many computer shows (or his bear has a foul mouth). Outside of the language, ‘his letter was pretty interesting; you should read it someday.
THE CULTURE
Fortunately, I did figure out how to add line numbers. Because of this I was able to translate my favorite BASIC program into Pascal in only two weeks. The Pascal program follows.
Program hiworld;
label: 1,2,3,4;
1: begin
2: writeln(‘hello world’); 3: goto 2;
4: end.
This program compiled very quickly, but it’s taking as long to run as the BASIC version. I checked the computer just last week and the program was still running. The BASIC version is running on my other computer. It has tied up that computer for over two months. I may have to speed up both computers to get them to finish. 1’ll let you know which one wins.
Next I think I’ll learn another language, but I'll have to save up for another computer first. (Maybe I need hardware floating point.)
P.S. I’d like to thank the following people for helping me translate my program: Peter Casey, Larry Fogg (those Micro C people are great), Sheila Silverman, Jim Warren, Captain Crunch (unfortunately he doesn’t have a phone), Mike Weisert, George Morrow, the entire staff of the Dead Pines Computer Center and Tanning Salon in Tucson, and my mother. (Hi mom.)
Solution to last issue’s Technical Torture puzzle.
S{TIAIC]K MMe Als] i [CHINE |wimfolols) MIATCIH] I INIETLTAINIG)UJAIGIE BG/ Al ATR T] (/S]7 MO MH BB 2 Bo BR) TS) L|O MMP S MME GIRIALPIHI LIC|s| TIE; AIM LIVIR {EM | BR FO [HM 2 WH HLEIXJAJDTEICH I MAIL ID/AIMIe MM Alt TE FALOJAMM RI €|N BME Mc |O|WHORM Sela RIO|MMA BM o}KIR|A MMB E [RMB E IND, on IS] i |M/O}N | THE ToIR IY {olr Joie BY) € MMM S Ajsie| Tle |N MM S|O[M
mi
[AIR | IN oli RIE|GIRI LIN) L[SMMol i io} iitialuiairii [Pie iR| ESS woo RIE |P JE MM E|O|S MB ABENIHE BIR felF EPR MMR] AlOT ATI 1 OTN! PlAMB VME Be) BK ML i siojs ele EIR{S {ol 8] 1 ols! [O]K MB S| 1 Jo} SfolojRie|U[N] i [o[N]s|
MICRO CORNUCOPIA, #32, Oct-Nov 1986
AmAnOO
85
BONO ROL |
The Secrets Of Consulting
There are lots of books for consul- tants, serious books, funny books, readable books, and useful books. I found a book recently that was all the above and I thought you should know. about it.
for this issue’s ‘On Your Own”
when I heard about a book titled The Secrets of Consulting written by Gerald Weinberg, author of such tech- nical tomes as The Psychology of Com- puter Programming and An Introduction to General Systems Thinking. - “He should have a computer per- spective, and secrets too,’”’ I thought, and ordered it. (The bookstores here
[= digging around for a subject
Relocating Macro Assemblers
e Z80 e NSC800 © 8085 © HD64180
What is your turnaround time? Eliminate this dilemma with the fastest
have lots of books, but the interesting ones I have to order.) I have a natural curiosity about secrets, especially pub- lished secrets.
First Three Chapters
Anyway, I climbed into the book, and an hour later found myself three chapters in and fascinated.
What I had started out hoping to find were the secrets, those hard facts everyone else had missed, key infor- mation that would mean automatic success in the consulting field. Then I’d distill those secrets into this col- umn and make you all rich and fa- mous consultants.
I didn’t find many secrets in that first hour, but Weinberg did show me
By Dave Thompson
a philosophy I hadn't encountered before.
I'd. already heard that Gasinensee don’t succeed or fail because of their products; they succeed or fail because of their people. Generally, I agree with that (after leaving space for a few short-term hi-tech exceptions).
Anyway, Weinberg says that busi- ness problems are really people prob- lems. Businesses call in consultants to solve software problems, or hardware problems, or accounting problems, or financial problems, or whatever. But. deep down, those problems are really people problems, and in the first three chapters Gerald Weinberg made it clear that he’s at home dealing with
people.
‘CP/M©2.2 compatible
IBM PC
1. Remove the 8088
2. Install the NEC »PD70108 (V20) 3. Boot PC RP/M2 The »PD70108 chip is a fast 8088 that “ig executes 8080 machine code. PC RP/M2 is an operating system. Either standalone or with MSDOS present, PC RP/M2 provides the solid base of a genuine operating system reliably distinct from the facade created by an MSDOS interface. All 2.2 features are supported with 56.5k TPA, plus file date and time stamping, fast virtual disk, iobyte redirection, terminal cursor positioning, color console display. DOSDISK acces- ’ ses MSDOS drives; MODEMPC transfers files via serial port; SETDISK redefines a drive to any of over 80 formats, allow- ing PC RP/M2 to directly process existing CP/M files in their native form. Two system disks plus 105 page user and techni- — cal manual $129.Shipping $5 ($10 nonUS) Ezy @Q
A | 118 SW First St. - Box G
7 Mstic ‘Warrenton, OR 97146 m4 ethods, inc. (503)861-1765
most powerful assemblers \, on the market.
@ 32 significant chars. on externals | |
@ math on externals |
e T-states in listing
e local labels
@ full drive/user support
Requires: Z80 W/40 K TPA, CP/M 2.2 or greater
——SLR_Systems
1622 N. Main St., Butler, PA 16001
(800) 833-3061 (412) 282-0864
86 MICRO CORNUCOPIA, #32, Oct-Nov 1986
Next Six Chapters
I read three more chapters; then a fourth, fifth, sixth. It was fun. I was fascinated by this guy’s ideas. Gerald was speaking to me, as though I were sitting in on one of his lectures. It was easy listening, punctuated by stories of his own life, and curious principles:
“Clients always know how to solve their problems, and always tell the solution in the first five minutes.’’
“‘The chances of solving a problem decline the closer you get to finding out who was the cause of the prob- lem.”’ ;
“Repeatedly curing a system that can cure itself will eventually create a system that can’t.’’
“If what they’ve been doing hasn't
‘solved the problem, tell them to do
something else.’’
“‘Most of the time, for most of the world, no matter how hard people work at it, nothing of any significance happens.”’
‘The best way to lose something is to struggle to keep it.’’
Hey, just a crummy minute. If some-
Angular Frequency (w)
w.A_ versus US
thing isn’t working then people should do something else? Seems a bit obvious. And what about curing a system, or making significant change, or find the person who’s causing a problem? If consultants can’t (or shouldn’t) do that, it doesn’t leave much.
Plus, if clients tell their consultants the solutions to the problems in the first five minutes, what are consultants going to do with all their free time? And, what does any of this have to do with secrets and computers and suc- cess and the universe?
A lot.
And the further I got into the book, the more I understood why he’d been playing hardball with my assumptions.
Those off the wall comments had .
stretched my thinking so I could han- die it when the game really warmed
up.
Chapter 11
In Chapter 11 he talks about market- ing your services. If any chapter con- tains secrets, this one does. A few
starting at 49%
(M/UZ = X) yyBua|anny
SCI-GRAF: Produces line. scatter, and high/low plots on Epson or 1BM com-
patible dot-matrix graphics printers.
Supports images up to 1680x1712 dots
(over 3 million pixels!), log & linear .
scales, graphs in 7 colors (on a JX-80),
’ batch processing.
Requires MS-DOS 2 or 3, 256k . ..$99°5
FONTEDIT: Easy-to-use full screen font editor allows you to create and modify fonts for our SCI-GRAF program. Create Greek, math, and custom symbols in 3 sizes. Supports SCI-GRAF's. propor-
tional spacing. Requires IBM compati- :
ble 320x200 pixel on-screen graphics & 1BM compatible keyboard ....... $3995
GRAF 3.0: Produces bar, pie, line, scatter, and highMow plots on Epson, IBM, C.ltoh, or NEC compatible dot-matrix graphics printers. Supports 14 fill-in patt- erns, 8 point-plotting symbols, automatic scaling, labeling, and legend creation.
MS-DOS 2 or 3, 192k .........065 569% CP/M-80: Requires 64k (54k TPA) $495
32 West Anapamu Suite 190 Santa Barbara CA 93101 (805) 963-3412
secrets:
“A consultant can exist in one of two states: Idle or Busy.’’ (There is no in-between.)
“The best way to get clients is to have clients.’’
“Spend at least one day a week getting exposure.’’ (While you’re busy!)
‘Clients are more important to you than you can ever be to them.”’
“Never let a single client have more than one-fourth of your business.’
‘“‘Give away your best ideas.’’
Really interesting stuff, and it really makes sense when you follow his reasoning all the way through.
In this chapter he also states that you should spend at least a quarter of your time doing nothing. This means not marketing yourself, not bookkeep- ing, not smiling at the folks in the office — nothing. This is how you keep your mind fresh, how you have a little margin if an emergency arises (personal or otherwise), and how you avoid burnout.
So you’re only going to spend half your time doing billable work, even when you're busiest. There are also those times when you’re not working,
‘so he figures that you should be
charging five times what you need to make. For example, if you need $10 per hour, then charge $50. If you need $100 per day charge $500. If you need $1,000 a day, find another profession.
Finally
Can I recommend this book? Yes. Especially if you are a consultant or are thinking about becoming a consul- tant. It really does contain those little secrets that I had expected, but it also has something much more important: a way of understanding your role as consultant that should make you far more effective for your clients, and far more comfortable with yourself.
The Secrets of Consulting By Gerald Weinberg Dorset House Publishing | 353 W 12th St
New York NY 10014
ISBN 0-932633-01-3. .
228 pages, about $25
MICRO CORNUCOPIA, #32, Oct-Nov 1986 87
2 Megabytes On The 68020
The Definicon folks have always . kept us abreast of their latest boards and the latest of mods to their latest | boards. The latest board is the 68020, the latest mod is the following memo- ry upgrade. (Sort of a two-for-one special.)
hen we designed the DSI-32 (a 32032 co-processor for the PC) we figured it should
support up to 2 Meg of RAM, but because of the limited space available on a PC main board, 256K RAM chips had to be piggybacked in order to get those 2 megabytes. . That board had traces and pin holes for the ‘‘upper’’ RAS signal already in place, so you could simply install a wire leading from the RAS pin of the upper chip to the hole directly beneath the pin. (Incidentally, two customers insisted on getting 4 Meg of RAM that way. While it worked at first, it wasn’t reliable. So please refrain from ex-
panding memory past two meg using -
piggybacking.)
On To The DSI-020
Definicon’s latest project, the DSI- 020 (a 68020 controlled board), was designed with low cost in mind. Al- though intended to run at 12.5 MHz, it’s worked reliably at 16.67MHz. (If you use 120ns RAM chips, an NS8419 DRAM controller instead of the 8409, and the higher speed CU/FPU.) I’ve even cranked one up to 20MHz and am using it for software development.
As far as memory space is con- cerned, however, the DSI-020 was NOT designed to be expanded past one meg.
Despite that, I figured it must be possible to piggyback chips the saiie way it’s done on the DSI-32.
Checking the schematics, I noticed that the DRAM controller has four RAS outputs. Only the first one is
used by the DSI-020; it’s connected to all RAS pins via a 220 ohm resistor. So what’s to keep us from using the second RAS output for the second megabyte? Nothing!
About Those Warranties
At this point, let me warn you that “following along’’ will make all war- ranties on the DSI-020 NULL AND VOID. This procedure is not recom- mended by Definicon Systems, Inc. So, if you want to play it safe, restrain your memory hungry programs. But if you’re the hardware hacker I know you are, then let’s get started!
You'll need the following:
— 1 DSI-020 co-processor board (see your local hardware store)
— 1 220 ohm resistor, 1/8 watt
— 1 ft. wire-wrap wire (30 gauge)
— 40 (36 plus 4 spare) 256K dynamic RAM chips (150ns for 12.5MHz, 120ns for 16.67MHz)
— a 20-30 watt soldering iron
— solder
— screwdriver
— wire cutters
Start by removing the DSI-020 from your computer. (Remember to turn the power off first.)
Now follow these instructions: 1. Remove all RAM chips from the
DSI-020. There’ll be 36 chips if you
have parity, 32 if you don’t.
2. Take one of the RAM chips you bought and stick it on top of one of those you removed from the board. You may have to devise some means of holding them together for a while. (Make doubly sure the pin 1s are together.)
3. CAREFULLY solder all leads to- gether, EXCEPT FOR PIN 4. Do NOT allow any excess solder to remain on the pins.
4, Carefully bend pin 4 of the top chip (the only one that’s not soldered
By Sigi Kluger Definicon Systems, Inc. 21042 Vintage St. Chatsworth CA 91311 (818) 341-5654
to the bottom chip) all the way up. Note that if you bend the pin back down, it WILL break!
5. Insert the piggybacked chip into the DSI-020.
6. Repeat steps 2 through 5 for all remaining RAM chips.
7. Cut the leads on both sides of the 220 ohm resistor to about 1/8 inch.
8. Solder one end of the resistor to pin 29 of the DRAM controller. The DRAM controller is the large 48-pin chip to the right of the RAM array. The resistor goes on the component side, sticking straight up in the air.
9. Now run a wire from the other end of the resistor to every pin 4 sticking up from the RAM array. Use your own ingenuity, but be sure the wire doesn’t short out anything, and use as little wire as possible.
10. Plug the board into the computer and smoketest it (i.e., turn it on).
Troubleshooting
Not much can go wrong if you work carefully. You will, of course, have observed all static electricity precau- tions, so it’s unlikely you’ll have zapped a chip. Nevertheless, it is possible that a chip or two won’t work,
If the card doesn’t work, but you’ve run a memory test on the 8086 side (see below) and the card passed, you might try moving the delay line tap.
The delay line, located just below the clock crystal, has a set of four jumper pairs located to its left. There’s one jumper installed, which you can move left or right until you’ve found a satisfactory setting. When the jumper is set correctly the board should run.
You can now run the 68020 memory test, MEMTEST.HEX, to see if the
RAM can be accessed by the 68020.
MEMTEST should indicate that it’s testing memory up to 1FFFO0 or some such. When you load the monitor it should come up with a message say- ing it’s loaded at 001F0000.
88 MICRO CORNUCOPIA, #32, Oct-Nov 1986
More Disclaimers
Let me remind you again that up- grading your DSI-020 to 2 Meg, or attempting to do so, will void warran- ties. The procedure isn’t approved by Definicon. Forget about the fact that this was written by a DSI employee. As far as you’re concerned, the in- structions herein were written by an anonymous hardware hacker.
And, again, be careful. Don’t break the board beyond repair. Don’t modify your board without being able to thor- oughly test and troubleshoot it! Write (if you need to) memory test routines BEFORE touching the board.
I would consider RANTEST.A86 es- sential for testing RAM on the PC side. RANTEST is available in source and object form on Trevor Marshall’s BBS (805-492-5472 or 805-493-1495, di- rectory path is 68020\dsi020) and in source only in the ‘‘dsi.32bit’’ confer- ence on BIX and on the Micro C bulletin board (503-382-7643).
Finally, be aware that you can mini- mize trouble by buying your RAM chips from a reputable source. I don’t wish to publicly endorse anyone, but if you write to me I'll tell you a good source.
Good luck!
noo
Peek inside your mailbox and
Whats new
at Micro C.
Sample of disks in the upcoming Fall catalog
MS-DOS Disks-5%”’ or 3%”
MS-24 Superior Games
Core Wars, SPACE WAR, Dun- geons & Dragons, and (TRONLC includes Source.)
MS-25 Ultra Utilities
U-ZAP, U-FORMAT, and U-FILE; Map diskettes, unerase files, format non-standard disks, interrogate sec- tors & much more!
MS-26 Expert System Genera- tor & Tutorial . Introductory expert system builder (ESIE), example expert systems, and detailed tutorial.
MS-27 System Primer
Device drivers and utility tutorials with source and DIAGS-the super system snooper.
gp, SON ae ee ‘MasterCard |:
eS |
All Disks $8.00 each
9-5 Weekdays Order 503-382-5060
KAYPRO CP/M Disks-5%4”’
K-44 Pascal Runoff-Printer . Utilities
Print sideways, on both sides, or
design your own character font.
Source included.
K-45 Pascal Runoff-Utilities File manipulation and encryption, sorting routines, and much more with source. K-46 Pascal Runoff-Turbo N, Utilities _ £, , Kaypro graphics routines (84 mod- els), inline machine code generator, menu generator, and.run time pack-
age for .CHN files. . Technical Calls:
9am-noon, M-F 503-382-8048
P.O. Box 223 Bend, OR 97709
aes VISA’. a
MICRO CORNUCOPIA, #32, Oct-Nov 1986
CAN ‘s é ZW re ‘ae Zui Ny) ie SS . Say a.
ISSUE #2 (10/81)
Parallel Print Driver
Drive Motor Control
Shugart Jumpers
Program Storage Above PFM 1/2 PFM.PRN
16 pages
ISSUE #3 (12/81)
*, 4 MHz Mods -
:. Configuring Modem 7 Safer Formatter Reverse Video Cursor __ FORTHwords Begins 16 pages ?
_ ISSUE #4 (2/82) Keyboard Translation More 4 MHz Mods .Modems, Lync, and SIOs Undoing CP/M ERASE Keyboard Encoder 20 pages
- ISSUE #5 (4/82) Word Processing Two Great Spells Two Text Editors - Double Density Review | Scribble, A Formatter 20 pages
ISSUE #6 (6/82) BBI EPROM Programmer Customize Your Chars Double Density Update
' Self-Loading ROM Terminal In FORTH 24 pages
“ISSUE #7 (8/82)
6 Reviews Of C .
“ Adding 6K of RAM ‘Viewing 50 Hz
. On Your Own Begins ' 24 pages
PRIMI ete lier “it APN
ayn +, BINS
See risiieS
Ww
URUS URL
iy U
ISSUE #8 (10/82)
Drive Maintenance Interfacing Drives Installing A New BIOS Flippy Floppies
C’ing Clearly Begins Xerox 820 Begins
28 pages
ISSUE #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 #10 (2/83) _ Saving A Flake isk
Hooking Wis) "SBI The Disk Jy O-ctor JRT Fix 4)
Serial ¢ SVooard Interface Pas.~rocedures Begins 36 pages
ISSUE #11 (4/83)
BBI papansions
BBII Details
Dyna, RAM. ™sk Review Easier R-. De Video Cursor Planrg ac Review
Kaypi Column Begins 36 pages
ISSUE #12 (6/83)
256K For BBI
Bringing UP BBII
dBase II
Look At WordStar
Double Sided Drives For BBI Packet Radio
5 MHz For Kaypro
40 pages
ISSUE #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:
Complete Your Education
ISSUE #14 (10/83)
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 #15 (12/83)
Screen Dump Listing Fixing Serial Ports Playing Adventrue SBASIC Column Begins Upgrading Kaypro II to 4 Upgrading Kaypro 4 to 8 48 pages
ISSUE #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 #17 (4/84)
Voice Synthesizer
820 RAM Disk
Kaypro Morse Code Interface 68000-Based System Review Inside CP/M 86
56 pages
ISSUE #18 (6/84)
Kaypro EPROM Programmer I/O Byte: A Primer
Kaypro Joystick
Serial To Parallel Interface Business COBOL
60 pages
ISSUE #19 (8/84)
Adding Winchester To BBII 6 MHz On The BBI Bulletin Boards
Track Buffering On Slicer
4 MHz For The 820-1
64 pages
If you’re not working with a full set, fill out your collection of Micro C today.
BACK ISSUES OF MICRO C.
‘Only $1.50 each when you order 6 or more
All Foreign $2.00 each for 6 or more
ISSUE #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 #21 (12/84)
Analog To Digital Interface Installing Turbo Pascal
Low Intensity BBI Video Turbo Pascal, The Early Days 80 pages
ISSUE #22 (2/85)
Xerox 820-II To A Kaypro-8
Sound Generator For The STD Bus Reviews Of 256K RAM Expansion In The Public Domain Begins
88 pages
ISSUE #23 (4/85)
Automatic Disk Relogging Interrupt Driven Serial Printer Low Cost EPROM Eraser
Smart Video Controller
Review: MicroSphere RAM Disk Future Tense Begins
86 pages
ISSUE #24 (6/85)
C‘ing Into Turbo Pascal 8’ Drives On The Kaypro | 48 Lines On a BBI
68000 Versus 80X86 Soldering: The First Steps 88 pages
ISSUE #25 (8/85)
Why I Wrote A Debugger The 32-Bit Super Chips Programming The 32032 Modula II RS-232C: The Interface 104 pages
ISSUE #26 (10/85) Inside ZCPR3 Two Megabytes On DSI-32
. SOG IV
The Future Of Computing MS-DOS In The Public Domain Graphics In Turbo Pascal
104 pages
BACK ISSUES
U.S. Regular Price ..............002eee++++~- $3.00 each 6 or more 1/2 price ........... cee cee eee eee ee $1.50 each
(includes surface postage)
ISSUE #27 (12/85)
‘Build An $800 Clone Fixing Your Own System NEC V20 Processor Selling Your Own Software Inside Small C Compiler 104 pages :
ISSUE #28 (2/86)
Pascal Runoff Winners
Rescuing Lost Text From Memory Introduction To Modula-2
First Look At Amiga
Inside The PC
104 pages
ISSUE #29 (4/86)
Speeding Up Your XT
Importing Systems From Taiwan Prototyping In C
C Interpreters Reviewed Benchmarking The PCs
104 pages
ISSUE #30 (6/86)
PROLOG On The PC
Expert Systems
Logic Programming
Building Your Own Logic Analyzer 256 K RAM For Your 83 Kaypro PC-DOS For Non-Clones
104 pages
ISSUE #31 (8/86)
RAM Resident PC Speedup ° Practical Programming In Modula-2 Unblinking the PC’s Blinkin’ Cursor Game Theory in PROLOG and C 104 pages
Regular Foreign Price (air mail) ...........+.-$5.00 each 6 or more (including Canada) ...............-$2.00 each
(surface postage)
90 = MICRO CORNUCOPIA, #32, Oct-Nov 1986
_ WANT 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.
Public Domain UG Software Rental: CP/M UG Vol 1-92 on 46 8” flippies, $45, SIGIM UG Vol 1-270 on 135 8”
flippies, $175. PICONET Vol 1-34 on 17 8’ flippies, $25,-
Pascal-Z UG Vol 1-30 13 8” flippies, $25, KUG (Char- lottesville) 74 disks, $80, IBM-PC SIG 1-454 PC-DOS, $475, PC-Blue 1-220 MS-DOS, $230, 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 con- versions. Call. User Group Software Automatic Update Service, $3.00 per disk. 619-727-1015 info, 24 hrs, 619-749- 7534 9-5. National Public Domain Software Center, 1533 Avohill, Vista, CA 92084.
“Getting Started With CBASIC” - Tutorial workbook for beginners/intermediates in this powerful language. Funda- mentals through file handling, user functions, etc. Gets you started and takes you up to advanced features and functions. Ends confusion, frustrations! $25/U.S. Fourcor- ners Press, 222 Washington St., Hanover, MA 02339. |
DDraw 3.0 gives you total control of Kaypro graphics! Flowcharts, circuit diagrams, business graphs and more! Epson compatible printer required for printouts. Works on all 1984+ Kaypro CP/M computers. For your copy with extensive manual, send check or money order for $49.95 to: Titan Software, 39 13th St. #2, Troy NY 12180-4203.
For $12 postpaid, I will send you the neatest ‘‘gadget’’ you can have for your small-screen Kaypro. MAGGIE! is a flat plastic lens that slips into place in front of your screen (without tools) and gives you the effect of a 12 inch screen. Virtually no distortion, and no more glare from ambient light than your regular screen. Money back guarantee of satisfaction. Kay-Pal, 107 Hudson Dr., Hen- dersonville, NC 28739. Allow three weeks for delivery.
Affordable Engineering Software for CP/M-80, PC-DOS, MS-DOS, and TRS-DOS. Free 52-page catalog. Low cost pen plotter driver, transfer function analysis, . scientific calculator, communications design spreadsheet, graph printing, circuit analysis, signal processing, mathematics, toot locus, active filter design, thermal analysis, and report proofreader programs. BV Engineering, 2200 Busi- ness Way, Suite #207, Riverside, CA 92501. (714) 781-0252. VISA and MasterCard accepted.
Flight Plan Program with NAV-AID database covering entire U.S. ‘‘Install’’ for your airplane’s performance. CP/ M or IBM. Supports user entered ‘‘custom’’ waypoints. Completely menu driven. Thoroughly documented. $29.95. For program description send SASE to NAVI- GATE, 3051 Shirley Dr., Newbury Park, CA 91320.
CP/M Emulates PC-DOS! Innovative utilities let CP/M reassign drives, autofind files (even overlays!), transform user areas into ‘‘disk drives,’’ create smart batch jobs, “window” the BDOS, format text columns, and much more. Inexpensive, copy-enabled, 30-day trial. LOGIC ASSOCIATES, 1433 Thome, Chicago, IL 60660, (312) 274- 0531. Ask for free catalog, reviews.
$120 Value: Micro C Pro-884 MAX ROM (Normal version) and PLUS-4 Decoder Board. $55 postpaid. Richard Brews- ter, R.D.1, Brackney PA 18812, (717) 663-2408.
Organize Your Hard Disk Tired of wading. through confusing manuals? Step-by-step instructions show you how to manage your hard disk. Begin immediately with our MS-DOS help system and library of batch files. On 5 1/4” disk. $12.50 PP. Gordon Thomas, 759 S. State St. #125-A, Ukiah CA 95482. Free information sheet.
BBI System For Sale BBI, 2 Shugart drives, Odd Ball Electronics cabinet, keyboard, Zenith monitor, lots of software. $450 or best offer. David Lubkeman, 4131 The Oaks Drive, Raleigh NC 27606. (919) 737-2336 daytime.
DDraw 3.0 gives you total control of Kaypro graphics!
Flowcharts, circuit diagrams, business graphs and more! |
Epson compatible printer required for printouts. Works on
all 1984+ Kaypro CP/M computers. For your copy with -
extensive manual, send check or money order for $49.95 to: Titan Software, 39 13th St. #2, Troy NY 12180-4203.
Version Control System - TLIB (tm) stores ALL versions of your source code in ONE compact library file, even with hundreds of revisions. Updates (deltas) 5 - 7 times faster than UNIX SCCS. Date and comments with each version. Easy retrieval. LAN-shared libraries. Synchro- nized control of related source files. Free public domain MAKE (with Lattice C source) by Landon Dyer. MS/PC- DOS 2.x/3.x $99.95 + $3 s/h. VISA/MC. Burton Systems Software, POB 4156, Cary NC 27511-4156. (919) 469-3068.
640K Mother board Upgrade 640K memory without using an expansion slot! Allows easy insertion of 256K chips on the system board. 100% compatible. 30 day $$ back
guarantee, 2 year limited warranty. COMPAQ Portable & .
Plus - $29; $99 with memory. IBM XT, 3270 & Portable -
$39; $109 w.m. IBM PC - $50; $129 w.m. $4 s/h. Site —
discount. Dealers welcome. Product of Innoventions, Inc. Aristo, 16811 El Camino #213-S, Houston TX 77058, (713) 480-6288, 800/3ARISTO.
’ DataCOM Super Systems (tm) is your one-stop headquar-
ters for all the latest public domain and shareware programs. We support CP/M, CP/M+, CP/M86, MS-DOS, PC-DOS, and TurboDOS users with over 100MB of online files. DataCOM is a remote multi-user TurboDOS data- base with 2 incoming phone lines and Courier 2400 modems. We have an international reputation as the Tampa Bay Kaypro Users Group and have been online since July 1982. Call (813) 791-1454 by modem (300/1200/ 2400 baud) and download an application or send $35 to: DataCOM Systems, 2643 Cedarview Ct., Clearwater FL 33519. DataCOM also has over 120 disks of CP/M and 150+ disks of IBM software available by mail for $10 each.
_ Catalogs available if you send a disk in a reusable mailer
and include appropriate return postage. Specify Kaypro SSDD, DSDD, or IBM DSDD format.
Xerox 820 w/Emerald DSDD Upgrade. Has SSDD drives. Complete w/CP/M. Like new condition. $450. Juki 6200 daisy wheel, 18 cps on 4th ribbon, $325. Ken, Sonoma CA (207) 935-1001.
Science Software for the Commodore 64 and C-128 (in C- 64 mode). Includes hi-res color graphics and capability to save to most popular printers. Programs for amateur astronomy, earth satellites and aeronautics. $19.95 - $34.95. Demo disk and catalog available for $5. Science Software, 7952 W. Quarto Dr., Littleton CO 80123,
All New & Unused: Big Board Il A&T with CP/M $200; Morrow MD-1 $500; MD-2 $550; MD-3 $600; Smith- Corona TP-1 daisywheel $200; Cromemco CS-3 $1000; Otrona Attache $1200; Wicat 150-1FS $1500; Wicat 150- 3WS $2500. Polygon Industries (504) 486-2154.
Turbo Budget! and Turbo Cheques! CompuTech an- nounces the release of Turbo Budget!, the financial companion to Turbo Cheques!, the most comprehensive personal checkbook management program available for the IBM PC. Turbo Budget! provides budget management tracking capabilities. Update budget expenses automatical- ly as you write checks. Both programs are professionally developed, easy to use, support color, hard disks, contain no copy-protection, print checks, password controlled, extensive screen displays, reports, and Turbo Budget utilizes window technology. 140+ page users manual. FREE demo disk available with self-addressed, .54 stamped mailer. For the IBM PC/XT/AT and high PC compatibles. Price: $49.95 for both programs. Send check or M.O. to: CompuTech, Box 7000-309, Redondo Beach CA 90277. Call me, Ralph Freshour, for more information at (213) 377-7198.
MICRO CORNUCOPIA, #32, Oct-Nov 1986 91
i
Secret Computers & Turbo Tutor
Gary looks at a new version of Turbo Tutor, and the Heel computer (it has a leg. up on the roulette wheel). If you’ve been looking for a no-risk gamble, or wondered how to make an easy million using parts out of an old Apple, then read on.
ou might have noticed a new
address in my byline. Dave’s
charged me with the care. of Micro C’s California office (what, you didn’t know Micro C had a California office?), so I’ll be writing and editing from Davis while my wife, Alison, attends graduate school at the Univer- sity of California.
Editor’s note: Our only other office is in Turkey, and Laine is staffing that one.
If you have ideas for articles you’d like to see in Micro C, or questions about articles we’ve already published, write me here. I’d love to hear from - you.
A Piece Of The Pie
I’ve just been treated. to an outra-
geous reading experience — ‘’The Eu- daemonic Pie’ by Thomas A. Bass.
Bass, a science writer, was part of a group of Santa Cruz crazies who de- signed, built, and tested a computer system for predicting the results of spins of a roulette wheel. As if the notion itself weren’t enough, consider the computer — it fits into the sole of a shoe.
In Bass’s Terms
“We are slipping into our soles a CMOS 6502 microprocessor with 5,000 bytes of RAM. Apple computers are made with the same chip. (Editor's ‘note: But let’s not hold that against it.) We carry another 4,000 bytes of mem- ory crafted into a program smart enough to beat roulette at a 44 percent advantage.
“‘The program — a set of mathemati-
cal equations similar to those used by
NASA for landing spaceships on the moon — tracks a ball in orbit around a spinning disk of numbers. During the ten to twenty seconds in which the game is played from beginning to end,
the computer calculates coefficients of - friction and drag, adjusts for changes |
in velocity, plots relative positions and trajectories, and then announces where in this heavenly cosmos a rou- lette ball will likely come to rest on a still-spinning rotor.
“Its predictive power lies in the fact that the computer in our shoes can play out in microseconds a game that in real life takes a million times long- er.’”
The payoff in roulette is 35 to 1, soa 44 percent advantage, according to Bass’s calculations, can produce a re- turn of as much as $2200 per hour if only a few hundred dollars are invest- ed. Not bad, not to mention the pleasure one would derive from beat- ing up on a heavy favorite (gambling losses for bettors are figured in the billions per year).
In the beginning, there was no ven- ture capital, so each member of the group donated time, skills, ideas, etc. to the project. Eventually, they planned to beat the casinos in Reno, Las Vegas, and Tahoe with their com- puter-in-a-shoe and divide the win- nings (the pie).
‘The Eudaemonic Pie’’ is the funny, skillfully written story of the design and implementation of one of the wildest computer systems I’ve ever heard of. Read it.for an entirely new experience.
From Vintage Books, it’s in paper- back for $5.95. (Don’t try to purchase the computer from your local Apple outlet. At least not just yet.)
Turbo Tutor ; Borland International continues to
. produce pleasant surprises — this one
a rehash of an old Borland product, the Turbo Tutor (which I wrote about
By Gary Entsminger 1912 Haussler St. Davis CA 95617
back in issue #23).
The manual and program have been extensively revised to include many advanced Turbo Pascal topics —
Stacks, queues, deques, lists, trees and graphs, assembly language inter- facing, accessing parameters from ex- ternal subprograms, libraries & more.
For example, the little shell in Figure 1 illustrates how an external program accesses the parameters of the calling program (or procedure).
To clear things up a little, picture the stack after executing the first two instructions of SIMPLE (PUSH BP and MOV BP, SP) —
High Memory BP +8 | SEG (X) |
BP + 6 | ors (x) | ‘BP +4 | ¥(integer)| BP + 2 | RET ADDRES| BP | OLD BP
{ 2 BYTE WD |
Low Memory
“The stack grows downward from SS:SP to SS:00, which means it starts at high-memory addresses and moves toward low-memory addresses. Every- thing is pushed onto the stack in 2- byte quantities.
“The parameters are pushed onto the stack immediately before the call to SIMPLE, and the call itself uses the return address to be pushed as well. To access the parameters, the subpro- gram can use the BP register. Once BP has been loaded with the previous value of SP, it points the stack seg- ment’ at a_ location relative to the parameters.’’
Since Y is an integer, it occupies two bytes. X, a VAR parameter, consumes four bytes. All addresses, regardless of the size of the object they reference, take up four bytes of stack.
92 MICRO CORNUCOPIA, #32, Oct-Nov 1986
SINGLE BOARD MAIN/FRAMES erom *425
(Including power supply)
e Heavy Duty All Metal Cabinet e Fan & Dust Filter e Full or Slim Drives
start currents for Winchester drives)
e Line Fuse, EMI Filter Detachable Line Cord
e Power Harness from Supply to Drives
e Cabinets & Supplies Available Separately
Write or call for complete catalog and prices.
8620 Roosevelt Ave./Visalia, CA 93294 (209) 651-1203 TELEX 5106012830 (INTEGRAND UD)
‘‘When a subprogram is completed, Figure 1 - Assembler Code To Add Two Numbers it returns control to the calling routine with a NEAR RET instruction. If the program is called with parameters, they must be popped from the stack. In addition, if the subprogram is a function, a function-result variable may need to be popped as well.”’
The RET instruction performs this task automatically. In SIMPLE, the RET 6 instruction deallocates six bytes
CODE SEGMENT ASSUME NOTHING procedure Simple(var X : integer; Y : integer);
Simply adds X to Y and returns the sum in X. Note that X is a var parameter (address passed on the stack) and Y is a value parameter (value passed on the stack).
CA wo we we we wo we we
IMPLE PROC NEAR
= PUSH BP s; Save old BP, - ane TOUE AF. ss ae MOV BP, SP Load in SP so procedure has no parameters, just use BP can be used RET without specifying a number of ; to address bytes. ; parameters. Perhaps the most significant feature DI,DWORD PTR [BP +6] | of the new Tutor is the program itself : jatbe esis which provides a split screen — de- AX, (BP+4] scriptive text below and running pro- ; Move Y's value gram above — to create a very effec- no eae tive learning environment. : Add Y's value to X's If you're just starting out, or in need BP * Restore BP of some really indepth information 6 Return, popping 6 bytes
about Turbo Pascal, you’ll have to look long and hard for a better tutorial and reference. Highly recommended!
And that, friends, is Tidbits.
MICRO CORNUCOPIA, #32, Oct-Nov 1986 93
MICRO CORNUCOPIA’S C CONTEST
“Se eX Wr ~ If you’ve been going so hard you just ‘ (a ann can’t C straight, then drop everything, Vw dig out the old compiler, brush off the
cobwebs, and C what you can C. Any kind of C. From Small-C to large, from a hundred lines up, this is your chance to C’cure fame and glory (plus
valuable prizes).
PROGRAMMING _— CONTEST
‘SCORING — The programs will be judged by the Micro C staff on the
following: 0-15 for ALGORITHM i | 0:25 for CODE ORGANIZATION & READABILITY GRAND PRIZE: 0-40 for PROGRAM FUNCTION
@ DSI-32, 1 meg, 10 Mhz 32032 computer board with a -20 for USER DOCUMENTATION assembler/linker from Definicon Systems :
21042 Vintage St., Chatsworth, CA 91311 Ist & ond Place
‘@ Optimizing C Compiler (large model) © Optimizing C Compiler (large model) me from Manx Software, Box 55, Shrewsbury, NJ 07701 @ Essential Software’s C Library (graphics, I/O, everything)
@ 2 year subscription to Micro C © Fssential Software’s C Library
(graphics, I/O, everything) _ 8rd - 5th Place from Essential Software, Inc. . © Anez C Prime Package Box 1003, Maplewood, NJ 07040 (interpreter & compiler)
from Manx Software
@ 3 year subscription to Micro C e | year subscription to Micro C .
sala CONTEST DEADLINE November 1, 1986 --------- aay PROGRAMMING Program Title CONTEST Purpose Which C compiler? _______"/___ Target system(s) NOTE: Please include source and object files on disk. I hereby release this program to the public domain and give Micro Cornucopia the right to print the listing. Signature Name MICRO CORNUCOPIA a P.O. Box 223 Address Bend, Oregon 97709 ht Oe ZI
94 MICRO CORNUCOPIA, #32, Oct-Nov 1986
LETTERS
(continued from page 5)
The workmanship looked solid, and after a few minor problems, I got the disk formatted and everything running smoothly. Then I decided to test the keyboard lock on the front panel. I turned the keyboard lock to disconnect the keyboard, and the machine died. It turns out that the switch had been miswired to short the power supply. I returned it to Compuadd for repair and was surprised to get it back just four days later.
Now the story gets interesting. The new unit had a new power supply which consistently died after several hours. I sent it back. Same fast turn- around, but they sent me a totally new system. This one ran fine when it was warm, but the hard disk was dead. When I sent this second unit back, I made one of the repair people promise to keep it on his desk until he was absolutely sure it was working. My latest machine works!
The downside of this story is ob- viously the questionable quality con- trol. Another of Compuadd’s problems is that they put too much emphasis on fast repair turnaround. The upside is their fast warranty repair, the inexpen- sive price, and the solid feel of the base unit and keyboard. Performance is impressive. The CMI disk is de- pendable, so far, although I’ve logged only about 40 hours on it.
W.Y. Crutchfield 5503 Yarwell Houston TX 77096
Back To The Future?
Thanks for nothing, John P. Jones! Three days ago my Kaypro locked up. Nothing short of unplugging it helped. Even when I plugged it back in, nothing but an unblinking cursor ap- peared on the screen. Until yesterday I thought it was dead; now I don’t know.
Then I received Micro C issue #29 — and a package from Berlund Extrana- tional. I had never heard of them, but I now suspect that-my computer has been running Chrono Pascal for some time. Careful excavation of my desk revealed mysterious printouts at a stra- ta that indicates the work was proba- bly conducted four to six weeks ago.
Underneath the printouts I found handwritten notes (my handwriting) on the niceties of Chrono Pascal syn- tax and error checking. Spooky! There’s no telling how much software might be in progress, or even complet- ed, on my disk. The computer, of course, is locked up. .
I phoned Berlund to see what they could suggest. They answered before the phone rang and refused to talk to me ‘‘again’’.
The article mentioned that Berlund’s
mail order processing runs under
Chrono Pascal, but if my experience is indicative they are shipping products as much as six weeks before an order is received, not two days. This is unethical, arrogant, and, in my case, disastrous. My heavily modified Kay- pro 4-84 has obviously gagged on some hardware-specific code in the Berlund compiler. Now I’m contem- plating a ‘processor lobotomy’’ to get my machine back.
Darrell Bethune
Box 1632
Fairview, AB Canada TOH 1L0
Stuck At 200 Points
About a year ago I bought a copy of your disk K4, the 550 point Adventure game. I’ve enjoyed playing it, but I need some hints.
Specifically, I need help getting by the ogre near the golden eggs, cross- ing the reservoir north of the mirror canyon, opening the safe below the hall of the Mountain King, under- standing the clue about ‘stand where the statue gazes and use the right tool,’’ and finding the pirate’s chest in the maze. I have found the vending machine maze and have mapped the maze south of. the west mist hall, assuming it to be the pirate’s, without locating the chest. Is the pirate’s a third maze? HELP!
Thomas L. Adams SAPL Pgm Ctl POB 30167
Yanbu Al Sinaiyah Saudi Arabia
ADVERTISER'S INDEX
Actrix Computer
Advanced Concepts Engineering .. Ampro Computers
Anderson Techno-Products, Inc. Andratech
A-OK Computers
Austin Codeworks
BD Software Bakkers, Andy Borland International
Cascade Electronics
C Contest
C.C. Software
Computer Helper Industries Computing Technology CompuView
Data Desk Definicon
Emerald Microware ERAC Co
Halted Specialties Hawthorne Technology
Integrand
Kenmore Computer Technologies .... KYSO Technology
Laboratory Microsystems Logitech, INC. ...... eke cece ce eee eee 7
Microcomputer Systems Consultants . 87 Micro Cornucopia
Micro Logic Systems
Micro Methods
Micromint
Micro Motion
Microprocessors Unlimited
MicroSphere
Micro Supply
Micro Technical Designs
Qua Tech Rockland Publishing SBC Mart
Second City Software Servo Computers
SLR Systems Soft Advances
Tomorrow's Computing United Products
Viking C Systems WestWind
MICRO CORNUCOPIA, #32, Oct-Nov 1986
95
Various Video: Interrupt 16 On The PC
If I may interrupt this column for a
second... Actually, I don’t want to
interrupt but you might. And if you like interruptions, read on.
ou can improve (i.e., make Ym general) your MS-DOS
application program by making it work in various video modes — for
example, monochrome and color/ graphics.
‘Memory Addresses & The Limbo
The monochrome and color graphics adapters have different memory ad- dresses. If your program uses color, for example, it must send the color information to the c/g’s memory which begins at physical location OB8000H. The monochrome adapter’s memory begins at address 0BO000H.
The point is — if you're sending information to the wrong memory lo- cation for the current adapter, your program will find itself in limbo (in other words, doing a Chubby Checker dance).
But (and here’s the happy part), you can design your program to check the video mode before it takes a chance. If your program is really prepared, it will adjust to the current adapter, or exit gracefully — far better alternatives to _ the limbo.
Video Modes
On the PC, 12 video modes define the display characteristics correspond- _ ing to the capabilities of the various video adapters —
Modes 0-3 are text modes for the color/graphics adapter
Modes 4-6 are the graphics modes for the c/g
Mode 7 is for the monochrome adapter
Modes 13-16 are used by enhanced graphics adapter
These modes are controlled by the ROM-BIOS, and we can check or set them via ROM-BIOS interrupt 16
(10H). Service (or function) 15 checks and returns the current video mode. Service 0 sets the video mode.
At Interrupt 16 To check the current video mode —
MOV AH,15 INT 16 On return —
AL = current display mode AH = number of characters per line BH = active display page
If your program isn’t prepared for what it sees in register AL, it should branch appropriately — either to a subroutine designed for the particular adapter (which sets the mode before it writes to memory), or exit.
For example —
MOV AH,0 3; for service 0 MOV AL, 1 3; for mode INT 16
will initialize the c/g adapter for a 40 by 25 color image.
More Interrupt 16 Interrupt 16 offers 16 main services
for the PC. Each is selected by placing .
the service number in the AH register. Some services require other informa- tion which your program places in registers BX, CX, or DX before calling interrupt 16.
For example, if you want to set the cursor size —
MOV AH, 1 3; for service 1 MOV CH,12 ; for the top of 3; the scan line 3; for the bottom 9
3 of the scan line
MOV CL, 13
INT 16 -_ | to get the default underline for a monochrome adapter.
If you want to set a cursor position
MOV AH,2 3; for service 2 MOV DH,5 3; for row 5
MOV DL,1 ; for column 1
MOV BH,0O 3; for graphic mode INT 16
By Gary Entsminger 1912 Haussler St. Davis CA 95617
defines a cursor on the c/g adapter at (2,5).
Here’s a complete list of interrupt 16’s services (in decimal) —
0 = Set video mode
1 = Set cursor size
2 = Set cursor position
3 = Read cursor position
4 = Read light-pen position
5 = Set active display page
6 = Scroll window up
7 = Scroll window down
8 = Read character & attribute 9 = Write character & attribute 10= Write character
11= Set color palette
12= Write pixel
13= Read pixel
14= Write character as TTY
- 15= Get current video mode
19= Write character string
The Beauty Of Interrupts
One of the beauties of the MS-DOS operating system is the range and ease of use of its interrupts. Once you get the hang of calling the various services an interrupt offers, 8088 (8086, etc.) assembly language becomes not only an amazingly powerful but also a very easy-to-use programming language.
And much can be learned from the study of these versatile ROM-BIOS services.
If you want an in-depth look at assembly language programming for the PC (including excellent studies of ROM-BIOS interrupts), I suggest —
“8088 Assembler Language Program- ming: The IBM PC” by Willen and Krantz
“‘Programmer’s Guide To The IBM
PC’’ by Peter Norton
There’s beauty in both of these, and they work perfectly (in my program- ming experience at least) on generic PCs, including the X16.
96 MICRO CORNUCOPIA, #32, Oct-Nov 1986
"PLUS PC COMPATA
¢ 8 MHz 80186 microprocessor with true Kits - All Wave Soldered!! 16-bit data bus.
e True PC compatability with our own custom ROM BIOS and PC cardslots for the video
e Full Kit W/O SCSI, serial ports, clock ...$ 550.00
e Assembled and Tested W/O SCSI, serial ports, clock .. . 1-4 $ 599.00
of your choice. 5.9 $ 525.00 e Standard 512K zero wait DRAM, or SCS) POM <c5-48-aview awe bso add $ 20.00 1M options. Serial Ports ...... ....each-add $ 12.50 * 8087 numeric coprocessor support on board. Real Time Clock and Battery add $ 12.50 . On-board floppy disk controller for up to e % MEG Add-On ............0008% $ 105.00 four 5%” drives. e XT Style, Enclosure.............. $ 75.00 e On-board SCSI hard disk controller port. e 150 Watt Power Supply, Tested ...$ 105.00 Supports WD1002 SHD, WD1003 ACS, e 8087-2 Coprocessor...........66. $ Call OMTI 5100, 5300 ADAPTEC ACB 4000. e 2 On-Board Serial Ports. ) e Battery Back-Up Real Time Clock. Total Solutions: Assembled and Tested Systems Designed, Manulactured and Serviced: Oy: ¢ Mono-Chrome System............ $1,499.00
Includes: 512K, Power Supply, Enclosure, Keyboard, Monitor,
Two Drives, and Printer Port, P.O. Box 128 1 Serial Port, Real Time Clock. 904 North 6th Street een Lake City, MN 55041 ¢ Quantity Discounts Upon Request
(612) 345-4555 ~ © Call For Info on Add-Ons, Hard Disks, Ete.
COD, VISA, MASTER CARD,. CERTIFIED FUNDS
Step-by-step tutorial, demo programs with source code included!
Borland’s new Turbo Prolog is the powerful, completely natural — introduction to Artificial Intelligence
P rolog is probably one of the most _ powerful computer programming languages ever conceived, which
is why we've made it our second language—and “turbocharged” it
to create Turbo Prolog.”
Our new Turbo Prolog, the natural | language of Artificial Intelligence, brings supercomputer power to your IBM® PC and introduces you step-by- step to the fascinating new world of
Artificial Intelligence. And does all this for an astounding $99.95. Rs Turbo Prolog is to (I> Even if you've never Prolog what Turbo (Sx? programmed before, Pascal? is to Pascal! < our free tutorial will
Our Turbo Pascal astonished = get you started right away everyone who thought of Pascal You'll get started right away as “Just another language.” We because we have included a changed all that—and now Turbo complete step-by-step tutorial as Pascal is the de facto worldwide —_ part of the 200-page Turbo Prolog standard, with hundreds of Reference Manual. Our tutorial
, thousands of enthusiasts —_ will take you by the hand and andusersin —_ teach you everything you're likely universities, to need to know about Turbo research Prolog and artifictal intelligence. centers, For example: once you've
schools, completed the tutorial, you'll be = and with pro- able to design your own expert fessional program- — gystems utilizing Turbo Prolog’s mers, students, powerful problem-solving and hobbyists. capabilities.
You can expect at least the Think of Turbo Prolog as a same impact from Turbo Prolog, high-speed electronic detective. because while Turbo Prolog is the First you feed it information and most revolutionary and natural —_ teach it rules. Then Turbo Prolog programming language, itisalso “thinks” the problem through & complete development environ- and comes up with all the ment—Just like Turbo Pascal reasonable answers—almost
instantly.
G6 Turbo Prolog offers om eee generally the fastest and most ~—_ remember that Turbo Prolog is a approachable implementation — §th-generation language—and of Prolog. the kind of language that 2lst
ayia JI century computers will use routinely. In fact, you can compare Turbo Prolog to BORLAND 4585 SCOTTS VALLEY DRIVE SCOTTS VALLEY, CA 95066
INTERNATIONAL
: o 4 (/i Ve be digerence Borland products include Turbo Prolog: Turbo Pascal, Turbo Tutor, Turbo Editor Toolbox; Turbo Database Toolbox; Turbo Graphix Toolbox; Turbo GameWorks; Turbo Lightning, Lightning Word Wizard: Reflex: The Analyst; Retlex Workshop; SideKick; SideKick, The Macintosh Office Manager; Traveling SideKick; and
SuperKey—all of which are trademarks or registered trademarks of Borland International, Inc. or Borland/Anatytica, Inc. Copyright 1986 Borland International BI-1045E
BM, XT, AT, and PCjr are registered trademarks of International Business Machines Corp.
(408) 438-8400 TELEX: 172373
Turbo Prolog 1.0 Technical Specifications Programming System Features
7 compiter: Incremental compiler gen-
erating native in-line code and linkable
object modules. The linking format includes
a linker and is compatible with the PC-DOS
linker, Large memory model support.
Compiles over 2500 lines per minute on
a standard IBM PC.
[7 Interactive Editor: The system includes @ powerful interactive full-acreen text editor. If the compller detects an error, the editor automatically poattions the cursor appropriately in the source code. At run-time, Turbo Prolog programs can call the editor, and view the running program's source code.
7 Type System: A flexible anes type aystem 1s supported.
caf Windowing Support: The system supports both graphic and text windows. (7 Input/Output: Pull 1/0 faciltues, including formatted 1/0, streams, and random access files.
af Numeric Ranges: Integers: -32767
to 32767; Reals: 1E-307 to 1E+308
[7] Debugging: Complete built-in trace debugging capabilities allowing single stepping of programs.
B Y B} S | | want : the best Turbo Pascal the way you Turbo pai at only: could compare Turbo Pascal to ; machine language. 99 95 an You get the complete ° a Turbo Prolog To ane by phone, programming system or lor a Geaier Nearest you, << for only $99.95 Call (800) 255-8008 You get a complete Turbo in CA call (800) 742-1133. Prolog development system Send me —_. Turbo Prolog at : rn including: Outside USA add $10 per copy a The igh fast Turbo Prolog : CA and MA res. add applicable sales lax $ —___ incremental compiler and the PERN: s interactive Turbo Prolog editor, This price includes shipping to all US cities = The 200-page reference Payment: VISA MC — Bank Draft Check manual which includes the step- - Credit card expiration date: __/__ RS Pes ae es ae rane ea Bide bd an IBM or true compatible running inclu commen! source M) sate and model is: code on disk—ready to compile. : GeoBase isa complete database The disk size I use iss 3%" O54" designed and developed around NOT COPY PROTECTED
U.S. geography. It includes cities, - mountains, rivers, and highways, and comes complete with natural query language. Use GeoBase immediately “as is,” or modify it to fit your own interests.
So don’t delay—don’t waste & second—get Turbo Prolog now.
*60-DAY MONEY-BACK GUARANTEE Name:
Shipping Address:
City:
State: Zip:
Telephone:
CODs and purchase orders WILL NOT be accepted by $99.95 is an amazingly small Borland. Outside USA make payment by bank draft payable price to pay to become an - in US dollars drawn on a US bank.
*
YES, if within 60 days of purchase this product does not immediate authority—an instant: perform in accordance with our claims, please call our customer service department and we will gladly arrange expert on artificial intelligence! ipa a nee The 2lst century is only one tMinimum system requirements:
(BM PC, XT. AT, PCjt,
phone call away. and true compatibles;
384K RAM.
Sus