Micro_Cornucopia_#51_Jan90 Micro Cornucopia #51 Jan90
Micro_Cornucopia_#51_Jan90 Micro_Cornucopia_%2351_Jan90
User Manual: Micro_Cornucopia_#51_Jan90
Open the PDF directly: View PDF .
Page Count: 100
Download | ![]() |
Open PDF In Browser | View PDF |
No. 51 $3.95 January-February 1990 THE M N Embedded Systems Looking for an easy way to put together an embedded controller? Then don't put down this issue. Embedding An XT Motherboard page 8 This is for those of you who want it all. Cheap hardware, a familiar (MS-DOS) environment, and complete tools for development and debugging. Writing A Neural Network In C, Part 1 page 16 Neural Nets are delivering nearly everything that AI promised. Our series includes all the software needed to experiment with this fascinating technology. LIMBO, Part 4 page 30 Give your robot a body (and part of a mind). Marketing Your Own Software page 66 How and wh~re should you advertise your new product? What kind of response should you expect when you do advertise? . And More ... Getting Started in Hardware The Poet and The Computer 01 a 7447019388 3 CAL J 0 URN A L Tower Cases w/Power Supply SUPER 25Mhz 386 SYSTEM! with 4MB RAM and Rotary Voice Coil Hard Drive For extra speed and reliability we've included a 44MB Mitsubishi MR535 voice coil hard drive with an access time of 28ms, and a super fast 1: 1 interleave HD controller card. • • • • • • • • • 25Mhz 80386 CPU, AMI Bios, Full Size MB 4MB of RAM, expands to 8MB on MB 1.2MB and 1.44MB Floppy Drives 12" Amber Monitor w/Mono Graphics Card 101-Key Enhanced Keyboard Serial/Parallel/Game Ports, Clock/Calendar 200-Watt Power Supply Socket for 80287, 80387 or Weitek Full 1 Year Warranty w/Std AT Case ...... $2395 $24J.95 '1 1MB AT SYSTEM Includes: 1MB RAM, 1.2MB & 1.44MB FD, 44MB Mitsubishi MR535 Voice Coil HD (28ms), Fast 1:1 Interleave HD Controller, Mono Graphics Video Card, 12" Amber Monitor, 101 Key Keyboard, Serial/ParalleVGame Ports, Clock/Calendar, Full 1 Year Warranty. FREE assembly and testing. 6/1 OMhz ....................................... $1249 6/12Mhz ......................................... 1295 XTSYSTEM 4.7711 OMhz w/2 360K Floppies ........ 725 4.77110Mhz w/20MB HD .................. 929 4.77/10Mhzw/30MB HD .................. 955 Color options for our systems (includes video card and monitor) ATI Graphics Solution ......................... 39 CGA Color ........................................ 175 EGA Color......................................... 350 VGA Color (Analog w/Mitsubishi monitor) ....., .............. .495 CGAlEGAlVGA (Multisync) .............. 495 FLOPPY DRIVES TEAC 360K ........................................ 74 TEAC 1.2MB ...................................... 85 TEAC 3 1/2" 720K .............................. 79 TEAC 31/2" 1.44MB .......................... 90 HARD DRIVES XT 20MB Miniscribe/Kalok 8425 (65ms) .................................. 239 8425 w/controller ........................... 279 XT 30MB Miniscribe/Kalok 8438 (65ms) .................................. 249 8438 w/controller ........................... 299 AT 44MB Mitsubishi MR535, Rotary Voice Coil (28ms) ............... 459 AT 71 MB Miniscribe 3085 Rotary Voice Coil (25ms) ............... 699 (Mega Tower) w/1MB ................. $250Less 20Mhz 386 .......... $150 Less Mini Tower Standard Tower $225 $269 MOTHERBOARDS 'rhe'·•.Most ·.•9o~t··.•·Effe¢tive·i.M'~Y • .t9Sp~e4 XTlTurb04.77/10Mhz ....................... $75 Upy()urt\Tor~8()Sy~teqtJ AT 6/10Mhz ...................................... 189 AT 6/12Mhz ...................................... 225 AT 8/16Mhz ...................................... 319 386 8/20Mhz w/Phoenix Bios, holds up to 8MB on board ............. 750 386 16/25Mhz w/AMI Bios holds up to 8MB on board ............. 899 386 33Mhz ........................................ Call Upgrade your .·.hard driv~. c()l1tr9g~~,···.iii.Y OTC 7287.1:t Interleave,RLL~w/Cache Math Co-Processors ......................... Call 799 'Kb/Sec; .-; .. :::.' POWER SUPPLIES .. :":."::'. 150-Watt XT Power Supply ................ 50 200-Watt AT Power Supply ................ 78 ·'~~:~;~ff~~~;~f~r~~~~,0'jc1~~5:~~c~~~ ·'911~ging ·froIl1.~ .~!aIl9ar~.t\.!.90Iltr()I~er.toil:J ·•. • int~rI~aye EXPANSION CARDS controllerimproves~tforIlulIlC:t!by.3PO%t N()ie:fest results~singljjMhtAtMiisnbishjMFi535Haf{fi>rjve'ani:l Spinf1itl!Disk.Optimizer~ KEYBOARDS CONTROLLER CARDS NCL 1:1 MFM Controller ................. $110 DTC 7287 1:1 RLL w/Cache ............. 165 CABINETS XT Slide Case, Lock, LED .................. 38 AT Slide Case, Lock, LED 3 half ht., 1 full ht. drives .................. 72 Baby Tower, w/200 watt PS, 2 half ht., 2 - 31/2" Drives, Baby Motherboard ONLy .............. 145 Mini Tower, w/200 Watt PS, 3 half ht, 2 - 3 112" Drives, holds Full or Baby size MB ............ 225 5 Bay Std. Tower, 250 Watt PS, 3 half ht., 1 full ht drives ................. 269 6 Bay Mega Tower, 200 Watt PS ..... 239 VIDEO CARDS MONITORS Mono Graphics w/Parallel port ........... 39 CGA Graphics Card ........................... 45 ATI Graphics Solution Mono w/CGA Emulation .................. 79 CGAlEGA w/256K .............................. 95 CGAlEGAlVGA 8-Bit. ....................... 149 CGAlEGAlVGA 16-Bit... ................... 189 12" Amber Monochrome TTL.. ........... 89 CGA Color RGB ............................... 249 EGAlCGA Autoswitch .31 dot .......... 362 CGAlEGAlVGA Multisync (.31 dot) ......................... 489 VGAAnalog (Mitsubishi .28 dot) ........................ 489 Chicony Enhanced 101-Key ............. $67 Keytronic Enhanced 10 1-Key ............. 67 Focus 101-Key Tactile, Switchable Control/Caps Lock, Dust Cover ....... 89 (#1 Find by Micro C Staff) • All Keyboards, XT/AT switchable* SOFTWARE MS-DOS 3.21 w/GW Basic ................. 49 MS-DOS 3.3 w/GW Basic ................... 95 DR-DOS 3.3 w/GEM ........................... 49 SpinRite Disk Optimizer ...................... 49 386Max Memory Manager for 386 Systems .................................... 69 Clock ................................................... 18 Game (Joystick) .................................. 14 Parallel Port (LPT1 , 2 or 3) ................. 18 Serial Port, 2 ports, 1 installed, (COM1 or 2) ..................................... 18 2nd Serial Port Kit... ......................... 18 Serial Port, 4 ports installed ................ 99 Multi Drive Controller, up to 2 drives, Supports 360K, 720K, 1.2MB & 1.44MB ................... 39 XT XT Multi-IO, Ser/Par/Clock/ Game/2 Floppy Drives .....................47 XT Floppy Controller ........................... 19 XT 640K RAM Card (w/OK) ................ 25 XT 2MB EMS Memory Board (OK) ..... 49 AT/386 AT Multi-IO, Ser/Par/Game ................ 33 2nd Serial Port Kit. ........................... 20 AT 2MB EMS Memory Board (OK) ..... 99 ~MicroS~here~ 1:COM,oU ,I R'C' ~ TC I CJ Orders Only Please! V, "HARDWARE MANUFACTURER SINCE 1983·' Jl-800-234-8086 Tech Calls: (503) 388-1194 Hours: Mon-Fri 9:00-5:30 855 N.W. WALL • BEND, OREGON 97701 'Prices are subject to change without notice. Shipping CHARGES will be added. 't-year warranty/30-day money back (subject to restrictions) Reader Service Number 2 'I ~J~~jWg AT&T C++ RELEASE 2.0 SPECIFICATION E~[1~ag MS WINDOWS COMPArl BI LITY £~1~IWg EASY PORTABILITY FROM MICROSOFT C [J~[i~Jlg C++DEBUGGER & EXPANDED C++ TOOLS [/0fE~.R.7g OS/2 UPGRADE AVAILABLE NOW! We listened carefully to what you wanted in a next generation MS DOS C++ compiler. The answer is Zortech C++ V2.0 DEBUGGER, and now the wait is over. wanted expande~ and Improved documentatIon, '!ou fdi~i~~:er's I-~[~\V7If:~~~y /;s~ebn~~ Ath~&ITatve2stOlI and delivered. You wanted to be able to ! You wanted, I I! • tc: .§Ii ;Hl:;ll..o@..(~Il.f!!~j'j' )':II~HIH{;;'I'\ «'!1i ':!liif~~, f~!':ii0\(.{!ir~1~1~~1H(~1 (E::~: (c\.n-il.1H~; (c:; :: \..c ~~ :: IDlil~,~~ci=r' I~~n'. . )'i'.:.: (iii!)) ~~Hi·ai) ~€J\ For many, EMS programming support, built into the compiler is important, so it's in there too. G--lOVJ Yo Order: Already own Zortech C++? Call the order hotline for details of our low cost upgrades. You were happy using the 18 classes prOVided in C++ TOOLS, but we revised and expanded it anyway. To order Zortech C++ for the first time, just call the order hotline. We accept payment by' Mastercard/Visa/COD. leatures I r~ir-j\:" .' :~~tI1~! ~!b) You never asked for a free with the ll~t ~li'~f.Ir.','~;!\!I~!f?' n'~li~i~\i~";.)l TSR library to be included, power 'R.mjl\J~.!ll:.~(?: ~'(;r;~:' .t;·i~f upgrade but we knew you'd love to offered by --to an use our neat little package, multiple inheritance and OS/2 version compiler so we included it tree. type safe linkage, so here it supporting Presentation is. Manager, Y.c0u did not w,ant You liked our FlASH it to cost a lortune, so it s GRAPHICS available ,.-----------------, You wanted compatibility for $150. Here is our list of highly package with MS WINDOWS, we recommended C++ cooks: for its added it. You want speed, but to look at C+ + language;Stroustrup $32.25 wanted a You repeatedly asked for C+ + Ansv.er Book;Hansen $26.95 easier portability from the c+ + for C Programmers $29.95 CCI+as+s Microsoft C, we got the standard c+ + Primer;iippman $30.25 message, and have written library interrace, the library functions you SOURCE Ask about our new c++ Video Tutorial so we've CODE, so written it. need. . Alternatively, mail the coupon below with your check ar credit card details. ZORTECH INC., 1165 Massachusetts Avenue, Arlington, Iv1A 02174, USA Voice 617-646-6703 Fax 677-643-7969 ZORTECH LTD., 106- 708 Powis Street, London, SE 18 6LU, ENGLAND. Voice (44)-1-316-7777 Fax (44}-1-3 76-4738 L - -_ _. _ _ _ _ _ _ _ _ _- : - l You wanted the world's first MS DOS C++ source level we are including it. o DEVELOPER'S EDITfON$450 (Save $200) o OS/2 COMPILER UPGRADE $749.95 o C++ COMPILER $799.95 o C++ VIDEO COURSE $499.95 o C++ DEBUGGER $749.95 o C+ + Language /Stroustrup $32.25 City--,.,-~_ _ _ _State_Zip___ 0 C + +- TOOLS $ 749.95 o C+ + Answer Book/Hansen $26.95 Visa/MC# _---:;-;-_ _ _ _ _ _ . 0 LIBRARY SOURCE CODE $ 749.95 o C+ + for C Programmers/Phol $29.95 Exp.Date _ _ _Tel_ _ _ _ _ _ _ . 0 COMPILER & LIBRARY SOURCE $299.95 o C++ Primer/Lippman $30.25 Name Addre·s-s----------- All MicroSoft trademarks are ocknowledged. For US orders please add $5.05 shipping Overseas orders at international mail rates. Reader Service Number 70 ------_. __._-_. -- ENAllY. A debugging tool tough enough to handle the DOS Nasties. New Version 2.0 How Soft-ICE Works Soft-ICE memory range break points help you track down memory over-write problems whether you are doing the over-writing or another program is over-writing you. Soft-ICE uses the power of the 80386 to surround your program in a virtual machine. This gives you complete control of the DOS environment, while Soft-ICE runs safely in protected mode. Soft-ICE uses the 80386 to provide real-time break points on memory locations, memory ranges, execution, II 0 ports, hardware & software interrupts. With Soft-ICE you get all the speed and power of a hardware-assisted debugger at a software price. Hung program? No problem! Don't want to switch debuggers? So1f1tNasty over-write? No sweat! You don't have to! When the system hangs, you now have hope. With Soft-ICE you can break out of hung programs no matter how bad the system has been trashed. And with Soft-ICE's back trace ranges you can re-play the instructions that led up to the crash. Soft-ICE can run stand-alone or it can add its powerful break points to the debugger you already use. Use your favorite debugger until you require Soft-ICE. Simply pop up the Soft-ICE window to set powerful real-time break points. When a break point is reached, your debugger will be activated automatically. Program too large? Not with Soft-ICE! Soft-ICE runs entirely in extended memory. This means you can debug even the largest DOS programs. And since your program runs at the same address whether Soft-ICE is loaded or not you can find those subtle bugs that change when the starting address of your code changes. System debugging? Soft-ICE is a natural! Soft-ICE is ideal for full source level debugging of TSRs, interrupt service routines, self booting programs, DOS loadable device drivers, real-time kernels, non-DOS O/Ss and ROMs. Soft-ICE can even debug within DOS &: BIOS. MagicCV with Soft-ICE Using Soft-ICE with CodeView gives you the features necessary for professional level systems debUgging. MagicCV and Soft-ICE can work in concert with CodeView to provide the most powerful debugging platform you will find anywhere. "These may be the only two products I've seen in the last two or three years that exceeded my wildest expectations for power, compatibility and ease-of-use." -Paul Mace Paul Mace Software C RUN IN 8KCODEVIEW~M - .. T]?Nu-Mega Code View is a great integrated debugger. but it uses over 200K of conventional memory. MagicCV uses advanced features of the 80386 to load CodeView and symbols in extended memory. This allows MagicCV to run Code View in less than 8K of conventional memory on your 80386 PC New Soft-ICE 2.0 features $386 $199 $199 Soft-ICE MagicCV MagicCV for Windows Back Trace Ranges C Symbolic & Source level debugging [J EMS 4.0 support with special EMS debugging commands C Windowed user interface Buy Soft-ICE &: MagicCV(W) -Save $86. Buy MagicCV and MagicCVW -Save $100. Buy All 3 -Save $186. 30 day money-back guarantee Visa. MasterCard and AmEx accepted \/-TECHNOLOGIES A w,. _0 CALL TODAY (603) 888-2386 or FAX (603) 888-2465 0' O'H''''C''O,,", P.O. BOX 7607 • NASHUA, NH • 03060- 7607 2 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 Reader Service Number 110' MagicCV ~;~ '. NEW-Version 2.0 includes EMS 4.0 driver. Attention Windows Developers! Version available for CVW. THE M I C R 0 TECHNICAL JOURNAL MICRO CORNUCOPIA JANUARY/FEBRUARY 1990 - ISSUE NO. 51 8 16 Gene Toner Embedding An XT Motherboard Wouldn't it be wonderful if you could use one of those $50 XT cards as an embedded system? You can, ducky. You really can. 58 C'ing Clearly 64 Culture Comer 66 On Your Own 78 Units and Modules 82 Shareware 90 Techtips 84 Tidbits Russ Eberhart and Roy Dobbins Writing A Neural Network in C, Part 1 Russ and Roy are applying neural nets to some incredibly practical projects. In this series you'll get the theory,· the application, and you'll get the code so you can try your own applications. (Also check out our neural oriented Tidbits.) 26 Gregory K. Landheim 28 Norman Cousins 3D-Surface Generation, Part 2 Greg finishes up his 3-D project by getting right into the code. The Poet and The Computer 30 Bob Nansel 42 Bruce Eckel 50 Karl Lunt LIMBO, Part 4 Capturing & Graphing A Voice, Part 2 Bruce tackles the digital half of his speach problem. Getting Started In Hardware This is for all of you who've asked for an entrance level article on hardware. Cover Illustration by Jerry Werner. MICRO CORNUCOPIA, #51, Jan-Feb, 1990 3 ;iH E M I C ROT EC,H N I CAL JOUR N A L By David J. Thompson . Editor and P~blisher David J. Thompson Associate Editors Gary Entsminger Larry Fogg Cary Gatton Contributing Writers Anthony Barcellos Bruce Eckel Michael S. Hunt Scott Ladd Laine Stump Advertising & Distribution Gareth Thomson Accounting Sandy Thompson Reader Services Nancy Ellen Locke Graphic Design & Production Carol Steffy 'MICRO CORNUCOPIA (ISSN 0747-587X) is published hi-monthly for $18 per year by Micro Cornucopia, Inc. 155 NW Hawthorne, Bend, OR 97701. Second-class postage paid at Bend, OR arid additional mailing offices. POSTMASTER: Send address changes to MICRO CORNUCOPIA, PO Box 223, Bend, OR 97709. Printedon recycled paper. SUBSCRIPTION RATES: 1 yr. (6 issues) 2 yr. (12 issues) 3 yr. (18 issues) .1 yr. Canada & Mexico ;. "1 yr. Other foreign (surface) ; J yr. Foreign (airmail) $18.00 $34.00 $48.00 $26.00 $36.00 $50.00 CHANGE OF ADDRESS: . Please send your old label and new address to: MICRO CORNUCOPIA Our Paper You've probably noticed that our paper has changed. This paper isn't quite as white as our old paper and it's coated. That's the bad news. The good news: it's made of 50% recycled pulp and it's the least glossy coated paper of this type we've found. In the past we paid top dollar because we insisted on the highest quality uncoated paper. (No coating-no glare.) But in the last six months, paper companies have raised the price for our wonderful paper a bunch, while they've substantially reduced what they're willing to pay for recycled paper. Maybe we can save some money and (because of the coating) improve our reproduction. Plus, since we purchase over 14,000 pounds of paper each time we print a magazine, we'll save about 42,000 pounds of trees a year. Just by using recycled paper. I broached the subject of coated versus uncoated at SOG East. Everyone voted for uncoated. Then I added that it contained recycled pulp. It was unanimous again. They voted to try the new paper. Futures, Bricks, And The Wall Street Journal The call I answer most often isn't a tech call (and it isn't nature), it's a sales call. "I'm calling with the information you requested on commodities futures." "Commodities futures? I didn't request any information on commodities futures." P.O. Box 223 Bend, Oregon 97709 READER SERVICES: ;' For orders and., subscription . . problems call 1~-888-8087, 9 am to 5 pm, Pacific time, M-F. FAX your VISA or.. MC order to llS, oUr FAX " number is (503) 389-6833. TECHNICAL ASSISTANCE For help call 503-382~, . .. 9 am to noon Pacific time, M-F' . BBS - 24 hrs; 300-1200-2400 baud 8 Bits, No Parity, 1 Stop Bit ". Copyright 1990 by Micro. Cornucopia, Inc. , . , All rights reserved . ISSN0747-587X ..s?~u·.·· 4 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 Contented Timber• Continued on page 73 You asked for a place to put your things... The Tele FILE SYSTEM is just the thing 1M BerryComputers presents The Tele Toolkit - a complete Operating Systems Kernel If It's Data, It Must Be A File Tele's file system is modular at several levels. FS is responsible for all storage and transfer of data. The physical interface to disk devices is through MS-DOS installed device drivers (MS-DOS itself is by-passed). Therefore, Tele will work with the same devices that MSDOS supports. Separate from the physical interface is the directory structure. Tele supports installable file systems; each device can have a unique media format. Only MS-DOS compatible media are supported in FS. Some other Tele components involve installable file systems. For instance, the UX component emulates the Unix ketneL Most of its code supports Unix media. Networks are supported by an installable file system that causes directory operations to be performed on a device in a remote computer system. FS itself only supports MS-DOS media, but it provides the main hooks by which any other file system· can be emulated. The bulk of Tele FS code supports hierarchical directory structures and file redirection. Because MS-DOS is not involved, you can use FS to avoid .its restrictions. Tele FS also includes serial communications support. 8250 controllers are supported in bidirectional interrupt mode. Ring and break indicators are also supported. Serial ports can be accessed directly, or redirected through the file system. Files can also be redirected from the keyboard and to the console display and printer. To support efficient communication and storage, FS contains a modified Huffman compression algorithm. The modification automatically recognizes fields within records and applies a different compression tree to each type of field. Compression can be processed directly on blocks or continuously and transparendy within the file system. All source code, in C and assembly, is included. Tele SK is required for FS. CD is also required for console device support. Demo Diskette SK system kernel CD console display FS file system OS core $ 5 $50 $40 $40 $130 (refundable with purchase) (multitasking) (windows, requires SK) (MS-DOS media, requires SK) (SK, CD, and FS) Telephone support is freely available. The Tele Toolkit is available from: Crosby As~ociates P.O. Box 248 Sutter Creek, California 95685 CALL NOW TO ORDER: (209) 267-0362 (FAX) (209) 267-0115 Visa, Mastercard, American Express & Discover Card accepted. MS-DOS is a Irademark of Microsofl Corporalion. Unix is a Irademark of AT&T Reader Service Number 147 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 5 VOICE MASTER KEY ® VOICE RECOGNITION SYSTEM FOR PC/COMPATIBLES & TANDY 1000 SERIES A FULL FEATURED VOICE I/O SYSTEM Letters GIVE A NEW DIMENSION TO PERSONAL COMPUTING ... The amazing Voice Master Key System adds voice recognition to just about any program or application. Voice command up to 256 keyboard macros from within CAD, desktop publishing, word processing, spread sheet, or game programs. Fully TSR and occupies less than 64K. Instant response time and high recognition accuracy. Voice recognition tool-box utilities are included. A genuine productivity enhancer! SPEECH RECORDING SOFTWARE ... Digitally record your own speech, sound, or music to put into your own software programs. Software provides sampling rate variations, graphics-based editing, and data compression utilities. Create software sound files you can add to macros for voice recognition verification response. A complete, superior speech and sound development too/. SOFTWARE CONVERSION CODES . . . The Voice Master Key System operates a growing list of third party talking software titles using synthesized phonetics (text-to-speech) or digitized PCM, ADPCM, and CVSDM encoded sound files. Voice Master Key System does It all! Long Lawn, Laments Loyal Loiterer My motorcycle vacation took me through Bend. I have not been in Bend since P~P (pre-microprocessor) days, and there have been a few changes! A tour of Bend would not have been complete without a swing by Micro C. I don't make a habit of visiting publishing headquarters, but Micro C is an exception. Alas, no one was homeprobably out rafting/tubing instead of mowing the lawn. (Gosh, I hope that wasn't too metaphysical.) Keep up the good work .... Nils R. Olson 419 Woodhaven Drive Vacaville, CA 95687-5941 EVERYTHING INCLUDED. . .Voice Master Key System consists of a plug-in card, durable lightweight microphone headset, software, and manual. Card fits any available slot. External ports consist of mic inputs and volume controlled output sockets. High quality throughout, easy and fun to use. Editor's note: Thanks Nils for the photo. Yes it does look like it's time for our annual mow. (It's more physical than metaphysical.) SpinRite Defended I've been a faithful follower of Micro C from the day I bought my first microcomputer (my old Kaypro II), but I think that you goofed when you trashed SpinRite in recent issues. I bought SpinRite as a last resort to save my ailing hard disk (a Miniscribe 32 MB, 65 ms, on a card-the kind you get from CompuAdd) in my XT clone (built from a kit from, where else, MicroSphere). I was getting a lot of read/write errors and an increasing number of bad sectors when running the surface analysis part of PCTools. Doing a destructive reformat (and, of course, reloading all my files from backup) was the only way to get the disk back into reliable shape. Then the problem would reappear and get worse within a month or so. I ran SpinRite on the flakey drive (full, deep testing with nondestructive ONLY $149.95 COMPLETE ONLY $89.95 FOR TANDY 1000SUTLMODELSSOFTWARE PACKAGE ONLY. Requires Tandy Brand Electret microphone. ORDER HOTLINE: (503) 342-1271 Monday-Friday, BAM to 5PM Pacific Time Visa/MasterCard, company checks, money orders, CODs (with prior approval) accepted. Personal checks subject to 3 week shipping delay. Specify computer type and disk format (3Y2" or 5W') when ordering. Add $5 shipping charge for delivery in USA and Canada. Foreign inquiries contact Covox for C & F quotes. 3ODAYMONEY BACK GUARANTEE IF NOT COMPLETELY SATISFIED. ONE YEAR WARRANTY ON HARDWARE. CALLORWRITE FOR FREE PRODUCT CATALOG @ covox iNC. 675-0 Conger SI. Eugene, Oregon 97402 U.S.A. TEL: 503-342-1271. FAX 503-342-1283 Reader Service Number 143 6 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 Letters continued on page 70 Introducing ••. The 1st Family of Lo~ Cost, Powerful Text Editors $ 29 VEDIT Jr. VEDIT $ 69 VEDIT PLUS $185 Finally, you can choose the best editor for your needs without compromising performance or paying too much. And organizations that want the "same" editor for everyone can pick VEDIT® for most users and VEDIT PLUS for their power users. The new family of VEDIT text editors are upwards compatible, easy to use and offer exceptional performance, flexibility and stunning speed. (3 to 30 times faster than the competition on large files where speed really counts.) Call for your free evaluation copy today. See why VEDIT has been the #1 choice of programmers, writers and engineers since 1980. VEDIT Jr.- Unmatched performance for only $29. All VEDIT editors include a pull-down menu system with "hot keys;' context sensitive on-line help, pop-up status and ASCII table, a configurable keyboard layout and flexible, unlimited keystroke macros. Edit files of any size and any line length .. Perform block operations by character, line, fileorcolumn. Undo up to 1000 keystrokes- keystroke by keystroke, line by line, or deletion by deletion. Automatic indent, block indent and parentheses matching speed program development. Word wrap, paragraph formatting, justification, centering, adjustable margins and printing for word processing. Run DOS programs. VEDIT-A best value at only $69. Simultaneously edit up to 36 files and split the screen into windows. Search/replace with regular expressions. Includes the best compiler support available- menu driven, easy selection of compiler options, supports "Include" files and MAKE utilities. VEDIT PLUS-Ultimate programmer's tool for only $185. VEDIT PLUS adds the most powerful macro programming language of any editor. It eliminates repetitive editing tasks and permits creating your own editing functions. The macro language includes testing, branching, looping, user prompts, keyboard input, string and numeric variables and control over the size, position and color of windows. Source level macro debugging with breakpoints and tracing. Macros developed with VEDIT PLUS also run under VEDIT. 30 day money-back guarantee. Call for pricing of XENIX, OS/2 and FlexOS versions. Very attractive quantity pricing is available for schools, hardware and software vendors. FREE Evaluation Copy* Call 1·800·45·VEDIT Compare Features and Speed Pull-Down menus Pop-Up ASCII table Keystroke macros Regular Expressions "Cut and Paste" buffers Text (book) markers Undo keystroke by keystroke Undo line by line Normal/max Undo levels Variable tab positions Configurable keyboard Integrated mouse support FILE LIMITS Edit files larger memory Maximum line length Maximum lines/file COMPILER SUPPORT Menu driven Select Compiler options Support "Include" files BENCHMARKS 50K FILE Simple search Save and continue 1000 replacements BENCHMARKS 3 MEG FILE Simple search Save and continue 60,000 replacements Block-column copy (40 x 200) Insert 1 Meg file in middle of 1 Meg file PRICE Yes >8096 8,388,607 Yes 512 65,535 Yes Menu Yes Difficult 65,535 >65,535 None No Difficult No - No 512 20,000 None 0.2 sec 1 sec 3 sec 1 sec 2 sec 19 sec 1 sec 2 sec 17 sec 0.3 sec 1 sec 2.5 sec 1:40 min 1:05 min 3:18 min 2 sec 1:36 min 3:23 min 1:44 hour 30 sec Cannot Cannot Cannot Cannot Cannot Cannot Cannot 2 sec 1:11 min $69 15:13 min $195 Cannot $15 Cannot $54.95 CompuView VEDIT and CompuView are registered trademarks of CompuView Products, Inc. BRIEF is a trademark of UnderWare, Inc. Norton Editor is a trademark of Peter Norton Computing Inc. OEdit is a trademark of SemWare. 'Supports IBM PC, XT, AT, PS/2 and clones with CGA, MGA, EGA, VGA, Wyse 700, Amdek 1280 and other displays. Also supports Concurrent DOS, DESOview, Microsoft Windows, PC-MOS/386 and most networks. 'Also available for MS-DOS (CRT terminals), TI Professional and others. 'Free evaluation disk is fully functional and can edit small files. Reader Service VEDIT BRIEF 2.10 Norton 1.3 OEd it 2.07 Yes Yes No No No No No Yes 1 No 100+ 100+ Yes Yes No No 100 36 1 1 No 10 10 No Yes No No Yes No Yes No No 500/1000 30/300 Yes Yes No No Difficult Yes Yes No Yes No Yes No Number 7 1955 Pauline Blvd., Ann Arbor, MI 48103 (313) 996-1299, Fax (313) 996-1308 - Embedding An XT Motherboard Putting Together A Conlplete Developlnent Systeln Without Trading In Your House There are fancy chips and fancy boards. But however you do it, there's one big impediment to developing an embedded system-it's putting together a complete set of tools and then learning how to use them. And ICE: you know, in-circuit emulation. Boy, that's wonderful when you're debugging code on a deaf-mute board (espe. cially when it pretends to be brain dead). So, when Gene offered to do this article, what could I say? (ICE is nice.) y experience with embedded systems goes way back. Most of my early recollection is clouded by the memory of intense P?in. The pain centered on the following questions. Why do little low cost single chip micro controllers require a large high M 8 MICRO CORNUCOPIA, #51, Jan-Feb 1990 cost in-circuit emulator to make them function? Why does a micro controller that costs $5 for the mask programmed part cost $50 for the EPROM version? I spent a lot of my early days in engineering wrestling with these questions. I also had a lot more courage than brains in those days. My first experience was with a Z80 single board computer on the SID bus (it was memorable). I hoped the Navy would use the machine to test jet engines. This was around 1978, and I also had a TRS-80 model 1. I used to say TRS-80 model 1 computer, but I know better now. The TRS-80 had a workable assembler, but the EPROM programmer supplied by the Navy couldn't talk to it. It couldn't talk to anything. It had a hex keypad. Humans cursed it. In-circuit emulators for the Z80 cost a fortune then, a small fortune now. The project requirements for this device changed as it developed (this is an advanced engineering management technique called lithe moving target"). The device would have to calculate in floating point. I wrote a four-function floating point arithmetic package in Z80 assembly. What a pain. Next I used an 8048 single chip microcontroller in a temperature controller. I only needed integer math for this beast. The cost of an 8048 (the version they program at the factory) then was about $5, but unless you wanted at least 5000 pieces, Intel wouldn't consider the program mask. The version with internal EPROM was about $50, so I designed a card to supply external EPROM and RAM (with an address latch). It looked like a single By Gene Toner IDEC, Inc. P.O. Box 69 Fountainville, PA 18923 board computer when I finished. The worst part was that I still couldn't afford an in-circuit emulator for debugging the code. There's a neat little circuit you can build around the 8048 to cause it to single step through a program. You can monitor the state of the address bus with LEDs. You can have the 8048 write intermediate results to an output port with more LEDs. Then you can single step your way through the bugs, bum new EPROMs, single step, bum new EPROMs, single step .... The Prescription For Embedded Pain These were just two early experiences. I also wrote a cross assembler for the National Semiconductor 8073 microprocessor in TR5-80 model 1 BASIC. I did this to avoid hand assembly. Interestingly, this processor had an on-board integer BASIC interpreter and interfaced to a terminal. National designed a board with this processor, EPROM, RAM, I/O, and one of the EPROM sockets would program 2716s! It was a dream come true until my BASIC program grew beyond about 20 lines. You needed a calendar to time the execution. They threw in a BASIC instruction that jumped to machine language routines, but no assembler. I wrote the assembler. You might think I would have learned, but I still do embedded controllers. Fortunately, I now have real solutions for development. What is the ideal platform for an embedded controller? It should be inexpensive, flexible, expandable, available, and reliable. Plus, there should be great software support, such as assemblers, debuggers, and high level languages, all inexpensive. We don't want to have to sell the kids to control the temperature in the aquarium (hmmmmm ... ). The answer, of course, is the XT! No, \Vau might think I would have learned, but I still do em- bedded controllers. Fortunately, I now have real solutions for development. not the whole XT, just the motherboard. Embed the mother to handle any control task you want. Editor's note: Micro C is not always a safe place to make offhand comments about the fairer sex. A 12 MHz motherboard costs about $80 these days, an 8 MHz unit about $65, usually less without the BIOS (more about this later). These boards have eight expansion slots for adding anything and power supplies are only $35. What really makes this board attractive, however, is the C-THRU-ROM by DATALITE. This software package does things that $20,000 in-circuit emulators just dream about. It lets you write your programs in Microsoft C 5.x or Turbo C 2.X, cross load the executable and the C symbol table to the target system, and DEBUG ON THE TARGET SYSTEM IN C (using a debugging environment very similar to Microsoft's CodeView). Finally, it lets you bum the whole works into EPROM, all for less than $500. XT Motherboards The usual XT motherboard will hold up to 640K of parity checked RAM and 40K of ROM. This ROM space is usually mapped as 8K of BIOS residing at paragraph FEOO and 32K of ROM BASIC at F600. Both of these ROM spaces are available for embedded programs. In most embedded applications, 640K is overkill since RAM is usually only used for variables and stack. Other applications, such as data loggers and pattern recognizers, make good use of everything they can get. Also, RAM is a Text Continued on page 12 Figure I-Motherboard 1/0 Map I/O DECODED I/O USED FUNCTION OOOOh - 001Fh 16 DMA control.l.er 0020h - 003Fh 2 Interrupt control.l.er 0040h - 005Fh 4 Timer counter 0060h - 007Fh 4 PPI (S255) chip OOSOh - 009fh 4 DMA page registers 1 NMI mask bit OOAOh - OOBFh ••• MICRO CORNUCOPIA, #51, Jan-Feb 1990 9 Figure 2-PC Card with a Dead-man Timer C20 -ili ... jil""""C23-iliip-CZ-ili .....C2:I-ili"t-C26 CZ - 7- +:5 R9 -12 CZ3 - C27 .OIIS" TTTTT R6 CHO1-"---""',.."..--"-....;....-.1:5.3 +12 R7 CHO+ 1-"-_-""''''''---"''=--.1:5.4 Rl lK R8 ....._ ......._+5REr IC3 DSc' l J1B3O..::=.::....-......::;~ C19 -12 RI3 ~......._ ....R""I",O_....:C::.H::..I-_ .r.5.:5 LF444B ~......._...,R""l1_---=C::.H::..;I+~ REr+ 12 REr- 16 Jl.A3I .r.5.6 IC7 +:5REr R12 0\ Al AI! 0 CD D3 17 14 DO 1:1 Dl 8 D2 D4 18 DO DI JlJ\9 JLA8 IIi! JlJ\7 JLA6 J1A!I JlJ\4 JI.A3 0:5 D6 D7 J1.A2 0 U ~ ----J:5.21 MICRO CORNUCOPIA, #51, Jan-Feb 1990 J:5.1!3 :5·24 ~: -Ie ------ R17 y+ R~ 1t k' ',i:~- -~' y- y+ -i 2[:~a3 :! ~l -12 y- 1 C LG I"-S 6 7l'--. Ica ca 8 ' index run number # of patterns desired nodes nodes # of iterations desired # of runs (or input lines) 1* FILE *fpRun, #include nodes run file *fpPattern,l* source pattern input file 1* *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 *1 #include *fpWeights, #include *fpWeightsOut,l*final weight output file*1 #include *fpResults, #include *fpError; 1* ESC #define #define 27 char szError[66]; ERRORLEVEL 0.04 char szPattern[66]; ITEMS 8 results output file 1* 1* char szResults[66]; #define initial weight file error output file various pathnames *1 *1 *1 char szWeights[66]; char szWeightsOut[66]; 1* typedefs & prototypes for dynamic storage ... *1 1* ... typedef float *PFLOAT; 1* char *progname = *argv; name of executable *1 of arrays DOS 3.x only typedef PFLOAT VECTOR; 1* typedef PFLOAT *MATRIX; for (; argc > 1; void VectorAllocate(VECTOR *vector, int nCols); void AllocateCols(PFLOAT matrix[], int DRows, void MatrixAllocate(MATRIX *pmatrix, int DRows, void MatrixFree(MATRIX matrix, *1 *1 read optional - arguments argc--) char *arg = *++argv; int nCols); if (*arg != '-') break; int nCols); switch (*++arg) int nRows); case 'e': 1* 1* define storage for net layers *1 sscanf(++arg, Arrays for inputs, outputs, deltas, weight~ & *1 targets MATRIX outO; MATRIX out1; 1* 1* 1* input layer hidden layer sscanf(++arg, *1 delta1; delw1; I*change in weights input:hidden*1 MATRIX w1; MATRIX out2; MATRIX delta2; delta at hidden layer *1 default: break; if (argc < 2) *1 delta at output layer delw2;I*change in weights hidden:output*1 MATRIX w2; MATRIX target; VECTOR PatternID; weights hidden:output target output fprintf(stderr, *1 *1 fprintf (stderr," ID for each pattern %s {-en -df}\ "Usage: runfilename\n" , *1 progname) ; -en => report \ error every n iterations\n"); fprintf(stderr," void &ErrorLevel); *1 weights input:hidden MATRIX 1* 1* 1* "%f", break; MATRIX output layer &DReportErrors); case 'd': *1 *1 MATRIX 1* 1* 1* "%d", break; main(int argc, char *argv[]) -df => done if\ sum squared error < f\n"); exit(l); float eta = 0.15, alpha=O.075; 1* default learning rate *1 /*default momentum factor*1 int nReportErrors=100; I*err report frequency*1 1* Open run file for reading if «fpRun = fopen(*argv, *1 "r"» NULL) float ErrorLevel=ERRORLEVEL; I*OK error level*1 char MonitorError=O; float error; 1* register int h; register int i; register int j; I*true=mon. err display*1 latest sum squared error val 1* index hidden 1* index input 1* index output 20 MICRO CORNUCOPIA, #51, Jan-Feb 1990 layer layer layer *1 *1 *1 *1 fprintf(stderr, "%s: can't open file %s\n", progname, *argv); exit (1) ; I*Read line 1: (lines to read' from run file)*1 fscanf (fpRun, "%d", &nRuns); The $25 1* beginning of work loop *1 for (r = 0; r < nRuns; r++) 1* read and parse run specification line; *1 fscanf (fpRun, "%s %s %s %s %s %d %d %d %d %d %f %f", szResults, 1* output results file *1 szError, 1* error output file *1 szPattern, 1* pattern input file *1 szWeights, 1* initial weights file *1 szWeightsOut, I*final weights out file*1 &nPatterns, 1* # patterns to learn *1 &nlterations, 1* # its through data *1 &nlnputNodes, 1* # input nodes *1 &nHiddenNodes, 1* # hidden nodes *1 &nOutputNodes, 1* # output nodes *1 &eta, 1* learning rate *1 &alpha); 1* momentum factor *1 1* allocate dynamic storage for all data *1 MatrixAllocate(&outO,nPatterns,nlnputNodes); MatrixAllocate (&outl, nPatterns, nHiddenNodes) ; MatrixAllocate(&out2,nPatterns, nOutputNodes); MatrixAllocate (&delta2, nPatterns, nOutputNodes); MatrixAllocate(&delw2,nOutputNodes, Network Try the 1st truly low cost LAN • • • • • • Connect 2 or 3 PCs, XTs, ATs Uses serial ports and 5 wire cable Runs at 115 K baud Runs in background, totally transparent Share any device, any file Needs only 14K of ram Skeptical? We make believers! Ovet .~ ~ 15.000 ~JJ ~ m Information P.O. Drawer F Modes Denton, TX 76202 I 0 e I " ' -_ _ _ _ _~;;..! 817-387-3339 Why waste money on simple file transfer systems? Reader Service Number 149 nHiddenNodes + 1); MatrixAllocate (&w2, nOutputNodes, nHiddenNodes + 1); MatrixAllocate (&delta1, nPatterns, INGRAF 2.10 A multi-device graphics library for Scientific, Engineering, and Business users! S~pports video, printer, and plotter graphics for personal computers. nHiddenNodes) ; MatrixAllocate(&delw1,nHiddenNodes, nlnputNodes + 1); MatrixAllocate (&w1, nHiddenNodes, nlnputNodes + 1); MatrixAllocate(&target,nPatterns, nOutputNodes) ; VectorAl1ocate(&PatternID, nPatterns); 1* Read the initial weight matrices: *1 Over 100 routines to create bar. pie. and smith charts; linear. log (semi-log and log-log). and polar plots; axes and grids with tick malks and labels. matken. line types. curves. arcs. circles. ellipses. and more. (EuU 'oure' cod,: no wallkl or run-tim' (UII) The window function allows you to use up to 32 windows. You can set individual characteristics (such as sizing. scaling. labeling. etc.) for each window or identical characteristics for all windows. INoue T I VE REACT "NeE TEMP. 8. RAINFALL Of" HOUSTON AREA ~D if «fpWeights=fopen(szWeights, "r") )==NULL) ~D fprintf(stderr, "%s: can't open %s\n", progname, szWeights); exit (1); 1* read input:hidden weights *1 = for (h 0; h < nHiddenNodes; h++) for (i = 0; i <= nlnputNodes; i++) l5.D D.D JAN FEB MR N'R MAY JIM J(1. Al£ SE:P OCT NOV II:C C .... PACITIVE fscanf(fpWeights, "%f", &w1[h][i]); delw1[h] [i] = 0.0; 1* read hidden:out weights *1 = for (j 0; j < nOutputNodes; j++) for (h = 0; h <= nHiddenNodes; h++) Continued on page 22 REACTANCE 1984 INGRAF is available for C. FORTRAN-77. and QuickBASIC (pascal available soon); support for numerous compilers. We also have GRAFLIB 4.10 for video and printer graphics; PLOTLIB 4.10 for pen plotter graphics. and FORTLIB 4.05. a FOR'IRAN enhancement library. Sutrasoft P.O. Box 1733 • Sugar Land, TX • 77487 Order Line: 1·800·888·8460 All other calls: 713 491·2088 Reader Service Number 173 MICRO CORNUCOPIA, #51, Jan-Feb 1990 21 Continued from page 20 fscanf(fpWeights, "%f", &w2[j][h]); for (j = 0; j < nOutputNodes; j++) delw2[j] [h] = 0.0; fclose(fpWeights); 1* Read in all patterns to be learned: *1 if « fpPattern=fopen (szPattern, "r"» -NULL) fprintf(stderr, "%s: can't open %s\n", progname, sZPattern); exit (1); for (p = 0; p < nPatterns; float sum = w2[j] [nHiddenNodes]; for (h = 0; h < nHiddenNodes; h++) sum += w2[j][h] * out1[p] [h]; out2[p][j] = 1.0/(1.0 + exp(-sum»; I*delta 9utPut-Compute deltas for each output unit for a given pattern *1 for (j = 0; j < nOutputNodes; j++) delta2[p][j] = (target[p][j] - p++) out2[p] [j]) * out2[p][j] * (1.0 out2 [p] [j]); { for (i = 0; i < nlnputNodes; if (fscanf (fpPattern, "%f", i++) &outO [p] [i]) != 1) goto ALLPATTERNSREAD; I*read target output for input patterns*1 for (j = 0; j < nOutputNodes; j++) fscanf(fpPattern, "%f",&target[p] [j]); 1* read in identifier for each pattern *1 fscanf(fpPattern, "%f ", &PatternID[p]); 1* delta hidden *1 for (h = 0; h < nHiddenNodes; float h++) sum = 0.0; for (j = 0; j < nOutputNodes; j++) sum += delta2[p] [j] * w2[j] [h]; delta1[p] [h] = sum * out1[p] [h] * (1.0 - out1 [p] [h]) ; 1* adapt weights hidden:output *1 ALLPATTERNSREAD: fclose(fpPattern); if (p < nPatterns) for (j = 0; < nOutputNodes; j++) dw; 1* delta weight *1 float sum = 0.0; 1* grand sum of deltas for each output float fprintf (stderr, "%s : %d out of %d patterns \ read\n", proqname, p, nPatterns); nPatterns = p; 1* open error output file *1 if «fpError = fopen (szError, "w"» == NULL) fprintf(stderr, "%.s :can't open file %s\n", progname, szError); exit (1); fprintf(stderr,nlterations>l?"Training .. \n" :"Testing\n"); 1* begin iteration loop *1 for (q = 0; q < nlterations; q++) { for (p = 0; p < nPatterns; p++) 1* hidden layer - Sum input to hidden node for 1 epoch*1 for (p = 0; P < nPatterns; p++) sum += delta2[p] [j]; I*find new bias for each output unit*1 dw = eta * sum+alpha * delw2[j] [nHiddenNodes]; w2[j] [nHiddenNodes] += dw; delw2[j] [nHiddenNodes] = dw; 1* Calculate new weights *1 for (h = 0; h < nHiddenNodes; float h++) sum = 0.0; for (p = 0; p < nPatterns; p++) sum += delta2[p] [j]*out1[p] [h]; dw = eta * sum+alpha * delw2[j] [h]; w2[j] [h] += dw; delw2[j] [h] dw; layer over all input-weight cmbnatns*1 for (h = 0; h < nHiddenNodes; h++) 1* adapt weights input:hidden *1 1* begin with bias *1 for (h = 0; h < nHiddenNodes; h++) float sum = w1[h] [nlnputNodes]; for (i = 0; i < nlnputNodes; i++) sum += w1[h][i] * outO[p] [i]; 1* Compute output (use sigmoid) *1 out1[p] [h] = 1.0/(1.0 + exp(-sum»; 1* output layer *1 22 MICRO CORNUCOPIA, #51, Jan-Feb 1990 float dw; 1* delta weight *1 float sum = 0.0; for (p = 0; p < nPatterns; P++) sum += delta1[p] [h]; I*find bias weight for hidden units*1 dw = eta * sum + alpha * delw1[h] [nlnputNodes]; += dw; error delwl[h] [nInputNodes] = dw; /* Print final it number and error value */ wl[h] [nInputNodes] nPatterns; fprintf(stderr, /* Calculate new weights */ for (i = 0; /= i < nInputNodes; "Iteration %5d/%-5d Error \ %f\n", q,nIterations,error); /*CON*/ i++) fprintf(fpError,"\n%d %f\n",q,error); /*fp*/ float fclose(fpError) ; sum = 0.0; for (p = 0; p < nPatterns; p++) sum += deltal[p] [h]*outO[p] [i]; /* print final weights */ if «fpWeightsOut = fopen (szWeightsOut, "w"» = dw = eta * sum + alpha*delwl[h] [i]; wl[h][i] += NULL) dw; delwl[h] [i] fprintf(stderr, dw; "%s: can't write %s\n", progname, szWeightsOut); exit(l); /* monitor keyboard requests */ for (h = 0; if (kbhit () h < nHiddenNodes; for (i = 0; int fprintf(fpWeightsOut, c = getch(); i++) "%g%c",wl[h] [i], i%ITEMS=ITEMS-l? '\n':' 'E' ) if «c = toupper(c» h++) i <= nInputNodes; for (j = 0; MonitorError++; j < nOutputNodes; for (h = 0; else if (c == ESC) h <= nHiddenNodes; fprintf(fpweightsOut, break; /* End gracefully */ '); j++) h++) "%g%c",w2[j] [h], j%ITEMS=ITEMS-l? '\n':' '); fclose(fpWeightsOut); /* Sum Squared Error */ if (MonitorError I I (q%nReportErrors=O» /* Print final activation values */ if «fpResults=fopen (szResults, "w") ) ==NULL) for (p=0, error=O.O; p 'Out. NOTE 4: Hatched areas show placement of Trapez flttlngs. See text for mounting detans. RAIl. r-------- I r 12 8-r~11 T III t4- 2 11/1"- ~4- 1111 IL I MIDDLE DISK NOTE 1: 45· dashed lines show placement of X-divider panels on the top side of the disk. 2'J/32" U"7 2 11/1"- I I 1/4- II IT II il J I BOTTOM DISK NOTE 1: Drill c!c countersink from the bottom side of the disk. See text for exact drnllng sequence. NOTE 2: Clearance arc for 10-32 wing nut. NOTE 3: Dashed lines show placement of cleats and panels on the top side of the disk. NOTE 4: Material Is 1/4- plywood. Figure l-Plywood Disk Layouts MICRO CORNUCOPIA, #51, Jan-Feb, 1990 31 dia. mounting holes and the 1 1f4" dia. wire access hole in the bottom disk. Drill the screwdriver access holes in the top disk. Use a brad-point drill for the smaller holes to get clean cuts. On the remaining plywood square, layout the side panels, stiffeners, and cross panels, again orienting the grain as shown. (See Figures 2 and 3.) These rectangular parts are best cut out on a table saw (for the precision). For those of you without access to a table saw (like me), cut out the pieces using a band saw, sabre saw, circular saw, or what have you, leaving 1;32" or so to sand or plane down to the line. I prefer to use a jack plane because I can shoot an edge straighter and truer with it than with a table saw. Mark the line you'll plane down to on both sides of the piece. Tape the ends with masking tape just below the line to with the grain tend to disappear, so mark them with a pencil, too. Don't be afraid to put too many labels on the wood; you're building a robot, not a piece of furniture. Cut out the disks and sand to final dimension. Transfer the diameter lines to the opposite side of each disk using the try square. Each disk will have some warp in it, generally at right angles to the outer ply grain. Place the bottom disk crown up, the middle disk crown down, and top disk crown up; label the sides facing up "Top." With middle and bottom disks oriented this way, their warps will cancel out, bringing the whole structure into proper alignment; the X-dividers will take care of the warp in the top disk. Complete the layout lines for cleats, panels, and hole locations for each disk on their top and bottom surfaces. Drill 3116" help prevent comer splitting. Precutting the comers with a hobby knife helps, too. Take an equal number of strokes from each direction, letting the plane do the work. You should need fewer than ten strokes to make the edge true and square. Take the time to resharpen the iron after you're done. The adhesiv~s used in making plywood are hard on the edge, and few tools are more disappointing to use than a dull plane. After the side and stiffener panels are cut and planed to size, cut out the curved wiring recesses and sand smooth. The X-divider panels require special attention. Once you've established the 3"xll" outer dimensions, you must cut the intersecting grooves. The key to a tight fitting joint is to use the actual thickness of each panel at the middle, not the nominal 114" thickness. Figure 2-Side Panels and Stiffeners 3/4" L.---_ _---._. . . . NOTE 4 g-~---------------~~-------------------e- T> ---------~~---------T-, -~------11---------1-J r r = - I I I NOlE 3 1/2" ~ ~ T ~ 2 1/4"-l SIDE PANEL STIFFENER (Left & Right) ~-.,.--3-17-/-3-2-.. +--- I NOTE 2 l~ r l~--,- 1/2- ~ NOTE 1 I I r ~I I I I I I I I --e ~ LO IX) ---------,-,---------;4 ---------~~ I I I I ~ ........ 1 -- -------- Ile---+-------------r--e-r I I I ItT co I I I I N , l~----------e~---~-----.r---~-~-~-~------~-~L~r~I-------~-~~-~--_--_-_-~-~-~--~e------~n---~--L~ I. 1 1/2" I- 8 7/8" LEFT SIDE PANEL -l 1 1/2" .1 (Right Side Panel is mirror image) NOTE 1: Dashed lines show positions of cleats & cross panels on the inner side. NOTE 2: Vertical dashed lines show placement of stiffener on outer side. NOTE 3: LIMBO Stepper PCB mount holes (4). NOTE 4: Cleat mounting holes (6). 32 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 Drill & countersink from inner side of panel. Drill & countersink from outer side of panel. End diskette compatibility problems. Call Emerald Microware. CompatiCard I by Micro Solutions This four drive universal floppy controller will let you run up to 16 disk drives (4 per CompatiCard), including standard 360K, 96 TPI, high density 1.2M, 8" (SSSD or DSDD), and 720k/1,44M 31f2" drives. The CompatiCard I comes with its own MS-DOS driver, utility programs, and will let you boot on an XT (must be used as a secondary controller on an AT or 386). Use it with UniForm-PC for maximum versatility. CompatiCard I Board. . . . . . . . . . . . . .. $ 119.95 CompatiCard I with UniFORM-PC ..... $ 179.95 8" drive adaptor board. . . . . . . . . . . . .. $ 15.00 External drive cable set ............. $ 15.00 CP/M ~J I \ Don't let a damaged copy protected diskette stop you cold. Copy II PC lets you back up your master disks so you can keep going even when your key disk can't. Copy II PC ..................... " $ 24.95 I EL:UniForm-PC CompatiCard II by Micro Solutions Copy II PC by Central Point Software MS·OOS [1] by Micro Solutions Have you ever needed to use your CP/M diskettes on your PC? Now you can access your CP/M files and programs on your MS-DOS computer just as you would a standard MS-DOS diskette. UniForm allows you to use standard DOS commands and programs right on your original diskette without modifying or copying your files. UniForm-PC allows you to read, write, format, and copy diskettes from over 275 CP/M and MS-DOS computers on your PC, XT, AT, OR 386. With UniForm-PC and the CompatiCard, you can use 5%" high density, 96TPI, 31f2" (720k/1,44M), and even 8" drives. UniForm-PC by Micro Solutions ...... $ 64.95 Also available for Kaypro, & other CP/M computers Two drive version of the CompatiCard, for the XT or AT. Same drive support as the CompatiCard I except no 8" or single density. CompatiCard II . . . . . . . . . . . . . . . . . . .. $ 89.95 *** Special *** CompatiCard II with internal 1.2M or 1,44M drive. . . .. $ 199.95 CompatiCard IV by Micro Solutions Meet the newest four drive controller in the CompatiCard family. This CompatiCard may be used as a primary or secondary controller in almost any PC, AT, or 386 System. Boot or use 360k, 720k, 1.2M, 1,44M, or 2.88M, at any location in your system. The CompatiCard IV has a BIOS ROM on board so no external driver software is required. CompartiCard IV . . . . . . . . . . . . . . . . . .. $ 139.95 zao Coprocessor Board by Micro Solutions Don't throw out all of those old, reliable CP/M programs, run them at LIGHTNING speed on your PC or AT with the UniDOS 8MHz. Z80 coprocessor board. And the UniDOS Z80 runs so smoothly and transparently that you won't even be able to tell whether you're running DOS or CP/M. UniDOS emulates most common computers and terminals such as Kaypro, Xerox 820, Morrow, Osborne, VT100, and many others. Supports all standard CP/M system calls, and now works with MS-DOS version 4. Includes UniForm-PC. UniDOS Z80 Coprocessor Card ...... $ 169.95 UniDOS by Micro Solutions w . ,.., by Micro Solutions If you have a fast machine or have a V20 chip installed, you may not need to use a card slot to run your CP/M programs. Run 8080 code directly on the V20, or use emUlation mode for Z80 programs. UniDOS by Micro Solutions .......... $ 64.95 UniDOSw/UhiForm&V20-l;Jchip ..... $ 135.00 You don't have to be a computer expert to install this attractive 31/2" external drive on your PC or AT. Just plug the MegaMate controller board into any empty slot, attach the drive cable, run the installation software, and you're ready to run 720k or 1,44M diskettes. Megamate . . . . . . . . . . . . . . . . . . . . . . .. $ 329.95 Apple MatchMaker I tJ( Micro Solutions /NoiN you can c~your Macintosh diskettes right on your PC/XT/fSFwlth the MatchMaker. Just plug your external 31f?!' Macintosh drive into the MatchMaker board and-experience EASY access to your Mac diskettes. Includes programs to read, write, initialize, and delete files on your single or double sided Mac disks. MatchMaker Board ................. $ 139.95 MatchMaker w/External Mac Drive ... $ 325.00 MS DOS./ - , ./ MatchPoint-PC by Micro Solutions Apple II or NorthStar diskettes in your IBM? Tha MatchPoint-PC board for the PC/XT/AT works with your standard controller card to let you read and write to NorthStar hard sector and Apple II diskettes on your PC. INCLUDES UniForm-PC program, as well as utilities to format disks, copy, delete, and view files from Apple DOS, PRODOS, and Apple CP/M disks. MatchPoint-PC Board. . . . . . . . . . . . . .. $ 179.95 • Have a copy protected diskette with a particularly stubborn protection scheme? Would you like to be able to read your Macintosh disks in your 3 1/2" internal drive in your PC or AT? Repair a disk that's damaged, even between sectors? How about speeding up your hard disk backups (if you are using PC Tools Deluxe)? The Copy II Deluxe Option Board can help you do all of this, and more. A must for the sophisticated user. Copy II Deluxe Option Board ...... " $ 139.95 Central Point SoJ!!;!J,ft~~ CP/M .. MS-DOS UniDOS Megamate Copy II PC Deluxe Option Board by Central Point Software PC Tools Deluxe VS.S by Central Point Software This is one of the great bargains in MS-DOS utility software. But with so many features built in, we think that many people are overlooking the REAL value in PC Tools: DISASTER RECOVERY! Sure, the shell is great for copying, viewing, editing, and deleting files, and the desk top environment is nice for its appointment calendar, note pad, phone dialer, calculators, and ASCII table. The fast hard drive backups can't be beaten by any other program, and the file unfragmenter speeds up hard drive accesses. But where else can you get all of that along with UNDELETE, REBUILD, and UNFORMAT? Have you ever entered "ERASE *. *" and realised when all was said..and done that you were in the wrong directory? How about those dreaded messages from CHKDSK, like "File allocation error .... "? The very first time you recover your missing files will make you a believer. Don't wait until it happens. PC Tools Deluxe V5.5 ............ " $ 99.95 EMERRLD MICROWRRE P.o. Box 1726 (503) 641-8088 Beaverton, OR 97075 Call or write for our complete catalog of software, parts, accessories and complete repair services for the Kaypro, Xerox 820, and IBM PC/AT. VISA and Mastercard accepted. Please include $6.00 shipping and handling, $8.50 for COD, UPS-Blue or RED Label additional according to weight. Prices subject to change without notice. Please include your phone number with all correspondence. Reader Service Number 10 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 33 To do this, first find the vertical center line of both divider panels. Scribe a line offset l/s" from the center line of one panel with the try square as a guide, then place the edge of the other panel along the scribed line so you can scribe its thickness onto the first panel. When you've marked both panels, mark the end of the slots at the midpoint of the width. Cut the slots to inside the lines thus scribed. Trial fit, sand, trial fit, etc., until the panels slide snugly together. Check for square often during this process. There should be little or no play and the top panel should seat on the same plane as the bottom panel when you are through. Next come the cleats. The moulding stock you're likely to find at the lumber yard will probably not have a Vz"x5/s" cross section. Get 3/4" square moulding and plane to final dimensions. This stock will be less than the nominal 3/4"· square (more like 5/S" square). It's much easier to do the planing before you cut the cleats to length. Mark the whole length of the stock on two par- Figure 3-X-div:iders, Trapeze Fittings, & Cross Panels ~~! !~ ~/64" TLEjI7/32" 1 1/32" (ref) L- L RIGHT FRONT RIGHT REAR :I e1I I I 1/4" :I e 1I I I I el e I I I ] ~ 17/32"-1 - 11~ ~ 11~ j ~L 1 L~ L.-I " ' - NOTE 1 7/16" PLASTIC TRAPEZ FITllNG ; I .•.6"•.• 1.2" 1 •.I• Ii! 1/2" NOTE 2 } 1/4" r- -[- - r-r '--r---I l.....-_--t I I I 1 1/2" 1 1/2" r 1/2" ---L -e-f-l-. __ I I I I (ref) 1.2" 1. 6" I F.' r. I I I NOTE 2 - e I I I -T--e---e----i~--'-r 11" .- I. • 1.2" • I. 1.2" NOTE 3 I : I I I I . NOTE 1 -.11 --- 10 GRAIN r, I I I I ID 0 ~s:::: J I· e e I I I I d""'0 J 3" r, I I I I ID 0 ~s:::: ·1 I e e I I I I d""'0 J It-·- - 3" ----I-I LEFT REAR LEFT FRONT X-DIVIDERS NOTE 1: Dashed lines show location of Trapez fitting (upper half). See text for mounting details. NOTE 2: X-divider join line. IZ o 0::: LL I : ,1/2" I -e~ I -e-e e e e e I I I I I I. , TOP 6" & BOTTOM MICRO CORNUCOPIA, #51, Jan-Feb, 1990 .1' CROSS PANELS NOTE 1: Dashed lines show placement of cleats on bottom of bottom cross panel and top of top cross panel. NOTE 2: Drill & countersink from panel side, centered on cleat. (Cleat mounting holes). NOTE 3: Card guide mounting holes (6). on mounting card guides. 34 It See text C CODE FOR THE PC source code, of course NEW! NEW! NEW! NEW! NEW! NEW! NEW! NEW! NEW! NEW! Updated! NEW! NEW! NEW! Updated! NEW! Updated! NEW! NEW! NEW! NEW! NEW! MS-DOS file Compatibility Package (create, read, & write MS-DOS file systems on non-MS-DOS computers) CSource Application Program Generator by MBAC (includes all source code; generator & libraries) . . . . . dB2c (dBase-to-C translator; i!1c1udes db_Files for C ~nd db_100ls for q . . . . . . . .. . . . . . . . . . . . . . . . . CQL Query System (SQL retnevals on B-trees plus windows) . . . . . . . . . . . . . . . . . . . . . . . . . . . . GraphiC 5.0 (high-resolution, DISSPLA-style scientific plots in color & hardcopy) . . . . . . . . . . . . . . . . . . . Drasch aisp with Crules (Li~p library and programmin~ enviro~ment with r:ule p~ing cap'ability; natural language example) . . . Greenleaf Data Windows (Windows, menus, data entry, interactive form desl~n; specify compiler) . . . . . . . . . . . . . . . . PC Curses (Aspen, Software, System V compatible, extensive documentation) . . . . . . . . . . . . . . . . . . . . . . . . CoData Manager (object-oriented data management, persistent objects from runtime definitions, network and entity models) . . . . MEWEL (extensible window and even~ library by Magma Software; message-passing & object-oriented; SAA-compatible; dialog editor) Thrbo1FX (Release 2.0; HP, PS, dot dnvers; CM fonts; La'J6X; MetaFont) . . . . . . . . . . . . . . . . . . . . . . . . . . PC PosiScnpt (co~plete PostSaipt interpreter (ROM yerslon 47.0A), 80286/386 0J.lly, many device drivers, optimized graphics, fast) db_File & db_Retneve (B-tree and network database WIth SQL query and report wnter) . . . . . . . . . . . . . . . . . . . Greenleaf Communications Library (interrupt mode, modem control, XON-XOFF; specify compiler) . . . . . • • . . . . . . Booter 100lkit (floppy disk bootstrap routines, DOS file system, light-weight multitasking, windows, Cast memory management) CDirect (mu~ti-user. hl.lshed file manager; variable length fields! binary or ASCII data, alternate keys). . . . . . . . . . . . BCPL Compiler (thiS IS not C source but BCPL source; BCPL IS the mother of C) . . . . . . . . . . . . . . . . . . . . QuickGeometry ubrary (Il.lrge colle~ion of. mathematics, graphics, display & DXF subroutines for CAD/CAM/CAE/CNq CB1fee (B+tree ISAM dnver, multiple vanable-Iength keys) . . • . . . . . . . . . . . . . . . . . . . . . . . ThrboGeometry (library of routines for computational geometry, Version 3.0). . . . . . . . . . . . . . . . . . . . AT BIOS Kit (roll your own BIOS with this complete set of baSIC input/output functions for ATs) . . . . . WKS Library Version 2.01 (C pro~ram interface to Lotus 1-2-3, dBase, Supercalc 4, Quatro, & Clipper) . . OS/88 (industrial-strength U •• x-hke operating system, many tools, cross-development from MS-DOS) . . . Cephes Mathematical Library (over 100 high"9uality, double-precision scientific functions) . . . . . . . . ME Version 2.1 (programmer's editor with C-hke macro language by Magma Software; Version 1.31 still $75) Vmem/C (virtual memory manager; least-recently used pager; dynamic expansion of swap file) . . . . . . Thrbo G Graphics Ubrary (all popular adapters, hidden line removal) . . . . . . . . . . . . . . . . . Power Search by Blaise Computing (regular-expression compiler; generates machine code on the fly). . . . Install 2.3 (automatic installation program; user-selected partial installation; CRC checking) . . . . . . . . . . Installation 100lkit 3.0 (250-page User's Guide, interactive saipt development program; many special cases covered) B-Strings (dynamic string handling; cut, copy, paste, search, user input, etc.; non·fragmenting memory management) TE Editor Developer's Kit (full screen editor, undo command, multiple windows) . . . . . . . . . . . . . . . Minix Operating System (Version 1.3; U •• x-Iike operating system, includes manual) . . . . . . . . . . . . . . PC/IP (C.MU/MITTCP/IP for PCS; Ethemet'.~l?pletalk & NETBIOS drivers, RVO, update by Dan Lanciani) . . B-1fee ubrary & ISAM Dnver (file system utlhtles by Softfocus) . . . . . . . . . . . . . . . . . . . . . The Profiler (program execution profile tool) . . . . • . . . . . . . . . . . . . . . . . . . . . . . . QC88C compiler (ASM output, small model, no longs, floats or bit fields, 80+ function library) . . . . . . . . Otter 1.0 (beautiful theorem-prover by Bill McCune; includes manual & two books by Wos; complete starter kit) . C Windows 100lkit (pop-up, pull-down, spreadsheet, CGA/EGA/Hercules) . . . . . . . . . . . . . . . . JATE Async Terminal Emulator (includes file transfer and menu subsystem) . . . . . . . . . . . . . . . . MultiDOS Plus (DOS-based multitasking, intertask messaging, semaphores) . . . . . . . . . Makx ~acros, all languages, built-in rules) . . . . . . . . . . . . . . . . . . . . . . evalU C function to evaluate ASCII infix expression string; 17 built-in functions) . . . . . . . XT BI S Kit (roll your own BIOS with this complete set of basic input/output functions for Xn) Professional C Windows (lean & mean window and keyboard handler). . . . . . . . . . . . . . ScreenUb (simple screen definitions, windows, pop-up menus, context-sensitive help) . . . . . . . Heap Expander (virtual memory manager using expanded memory, extended memory, and disk space) . . . . . . . . Quincy (interactive C interpreter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Symtab/lltree (general-purpose symbol table/parse tree construction and management package; specify Symtab or Ptree) Coder's Prolog (Version 3.0; inference engine for use with C programs) . . . . . . . . . . . . . . . . . . . . . Async-Termio (Unix V compatible serial interface for MS-DOS; stty, ioctl, SIGINT, etc.) . . . . . . . . . . . . . . Backup & Restore Utility by Blake McBride (multiple volumes, file compression & encryption) . . Floppy TAR (TAR backup and restore on MS-DOS devices; direct access to non-standard deviCes) SuperGrep (exceptionally fast, revolutionary text searching algorithm; also searches sub-directories) REGX Plus (search a~d replace string mampula!ion routines base~ on regular expressions). . . . OBJASM (convert .0bJ files to .asm files; output IS MASM compatible) . . . . . . . . . . Multi-User BBS (chat, mail, menus, sysop displays; does not include J-tayes modem driver) . . LaplaceB (LaPlace polynomials, real and complex) . . . . . . . . . . . . . . . . . . . CLIPS (rule-based expert system generator, Version 4.3; advanced manuals available) . . . . Kier DateLib (all kinds of date manipulation; translation, validation, formatting, & arithmetic) Fortran-to-C TIanslator by Polyglot . . . . • . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DES I?ncryption ~ Decryption (~OO bits/seco~d on 4-?7 MHz PC foron-the-fly encryption at 2400 baud; U.S. only) F1exList (doubly-hnked hsts of arbitrary data WIth multiple access methods) . . . . . . . . . . . . . . . . . Virtual Memory Manager by Blake McBride (LRU pager, dynamic swap file, image save/restore) . . . . . . . . Heap I/O (treat all or part of a disk file as heap storage) . . . . . . . . . . . . . . . . . . . . . . . . . . Bison & PREP (YACC workalike parser generator & attribute grammar preprocessor; now includes documentation) . . . . . . PC-XINU (Comer's XINU operatmg system for PC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RXC & EdREP (Regular Expression Compiler and Pattern Matching; RXC makes finite state machine from regular expression) CCALC (handy extended-precision calculator; real and complex models; many built-in functions) . . . . . . . . . . . . . . GNU Awk & Diff for PC Qx>th programs in one package) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-Pack of Editors (six pubhc domain editors for use, study & hacking) . . . . . . . . Crunch Pack (14 file compression & expansion programs) . . . . . . . . . . . . . Pascal P-Code Compiler & Interpreter or Pascal-to-C Thlnslator (Wirth standard Pascal) . . . FLEX (fast lexical analyzer generator; new, improved LEX; official BSD Version 2.1 with docs) List-Pac (C functions for lists, stacks, and queues) . . . . . . . . . . . . . . . . . . . A68 (68000 cross-assembler) . . . . . . . . . . . . . . . . . . . . . . . . . . . . XLT Macro Processor (general purpose text translator) . . . . . . . . . . . . . . . . . $500 $500 $325 $325 $325 . . . . Data . NEW! Mo~ Pronunciator (150,000 words & phrases encoded with full IPA pronunciation & emphasis points; 900 distinguished by part-of-speech) NEW! Mo~ Part-of-Speech (200,000 words and phrases desaibed by prioritized part(s)-of-speech) . . . . . . . . . . . . . . . . . . . . NEW! Moby Hytlhenator (150,000 words fully hyphenated/syllabified) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $300 $300 $290 $250 $250 $250 $250 $245 $225 $210 $210 $195 $170 $165 $160 $160 $155 $150 $150 $140 $140 $135 ". $120 $120 $120 $105 $105 $105 $100 $100 $100 $90 $80 $80 $80 $80 $75 $75 $75 $70 $65 $65 $60 $60 $60 $55 $50 $50 $50 $50 $50 $50 $50 $50 $45 $40 $40 $40 $40 $40 $35 $35 $35 $30 $30 $30 $30 $25 $25 $25 $20 $20 $160 $105 $120 Smithsoman Astronomical Observatory Subset (right ascension, declination, & magnitude of 258,997 stars) . . . . . . . . . . . . . . $60 Moby Words (500,000 words & phrases, 9,000 stars, 15,000 names) . . . . . . . . . . . . $65 U. S. Cities (names & longitude/latitude of 32,000 U.S. cities and 6,000 state boundary points) . $35 The World Digitized (100,000 longitude/latitude of world country boundaries) . . . . . . . $30 KST Fonts (13,200 characters in 139 mixed fonts: specify 1BX or bitmap format) . . . . . . $30 USNO Interactive Computer Ephemeris (high-precision moon, sun, planet & star positions) $30 U. S. Map (15,701 points of state boundanes) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $15 The Austin Code Works acw!in/o@uunet.uu.net 111 00 Lea/wood Lane Austin, Texas 78750-3409 USA .For delivery in Texas add 7% Free surface shipping for cash in advance Reader Service Number 4 Voice: (512) 258-0785 BBS: (512) 258-8831 FAX: (51g) 258-1342 MasterCard/VISA MICRO CORNUCOPIA, #51, Jan-Feb, 1990 35 allel sides with a carpenter's marking gage set to 112." depth, plane to the lines, then mark the other two sides to 5/8" and plane to those lines. Keep it square. Once you've planed the stock, cut six 8 %" lengths, two 6" lengths, and two 2" lengths. Cut them slightly long, then sand to exact length. Select two of the long cleats and mark the 251.32" radius clearance at their midpoints as the bottom disk diagram shows. Cut the arcs out and sand smooth. These arcs will provide clearance for wing nuts to hold the superstructure to the base. Step 2: Preparing The Panels Woodscrews hold the plywood panels and cleats together. Each screw requires a pilot hole and must be countersunk. First clamp a cleat to the bottom disk, carefully lining up the edges of the cleat with the lines scribed earlier before tightening the C-clamps. If the disk is warped, the clamps and cleat will hold it flat. Drill the holes through the disk into the cleat with a #44 bit. The depth to drill is 1116" less than the combined thickness of the panel/cleat combination, or about 11116". Number the cleat and the disk You've Seen Your Computer Run, Now Watch It Fly! IBM·PC, XT, AT, '386 Blue Flame II Semi Disk Solid State Disk Emulator Featuring: • PC-DOS, MSDOS, and Concurrent DOS Compatible • Very Fast Access: 6.4 Mbits/sec • High Capacity: Up to 8 MB Per Board • Expandable to 32 MB • Battery Backup Option • Hardware Parity Checking • No Mechanical Wear • No Special Interfacing • Prices Start Under $600. SemiDisk Systems, Inc. 11080 S.w. Allen #400 Beaverton, OR 97005 (503) 626-3104 FAX (503) 643-0625 Reader Service Number 162 36 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 before unclamping so you know which cleat goes where. Repeat for the top disk and the top and bottom cross panels (Le., the top and bottom of the card cage). Treat the side panels in a similar fashion. Orient the side panel so it bows away from the cleat. Be sure to orient the numbered cleat properly before clamping and drilling as above. The drilling depth this time should be about 13116". Repeat for the rest of the long cleats. Once you've drilled all the panel! clea t pilot holes, set aside the cleats and ream" out all the panel holes with a 9/64" bit. Chuck up a 60 degree countersink and countersink one of the holes just enough so that a #6 flathead wood screw seats flush. With the drillpress power off, bring the countersink bit gently down into countersunk hole until you have firm contact. Temporarily lock the spindle in place if your drillpress has this featUre, otherwise hold the spindle in place while you set the depth stop to the current depth. If your drillpress does not have a depth stop, then mark the position on the depth indicator G've yet to see a drillpress without one or the other). Countersink the rest of the holes in all the other panels and disks, taking care to countersink from the correct side (Le., the side you drilled the pilot holes from). Drill the LIMBO Stepper PCB mounting holes (9/64") for left and right side panels. Countersink these holes, too, but from the opposite side of the panels (the crown side). Drill the V8" card guide mounting holes in both the top and bottom cross panels. Do not countersink these holes. To finish with the panels, epoxy the stiffeners to the side" panels, then epoxy and screw the long cleats to the bottom disk and top and bottom cross panels. Epoxy the 2" backstop cleats to the middle of the side panels in the battery compartment; Place them level with their ends butting against (but not epoxied to) both the bottom disk cleats and bottom cross panel cleats. The middle disk will eventually be attached to the same cleats as the top cross panel, but do not epoxy the cleats to the middle disk at this time. Instead, use screws alone to hold this disk to the cleats so the disk can be removed later. Step 3: The Card Cage The card cage must provide mechanical support for the backplane. I've al- lowed for either a PCB or wire-wrapped backplane (for those of you who want to do more work and spend more money). The backplane PCB screws directly onto the two remaining 6" cross cleats (thought I'd forgotten 'em, eh?). "The DC-DC power convertor board mounts on the other side of these cross cleats in the rear of the superstructure. Don't worry, I'll talk about both the power convertor and backplane PC boards in detail next time. For now, it's sufficient just to point out where they go. Butt each cross cleat against the rear of its cross panel and clamp to the long cleats. In the case of the top cross cleat, the long cleats have already been attached to the middle disk. Do the drill, ream, and countersink routine, this time "with a drill depth of 718". Secure each cross cleat with epoxy and a #6x7/8" wood screw on each end. If you like, you can also put a line of epoxy on the butt joint between cross panel and cross cleat. To finish the cross panels, epoxy the card g~ides in place. Step 4: Constructing The Sensor Platform One problem I had with the sensor platform was shielding the sensors from stray infrared while leaving easy access for maintenance. The solution needed to be strong enough to allow carrying ,LIMBO by two grab handles on the top disk, too. I must have thought up a dozen unsatisfactory methods, all too heavy, complicated, or expensive. Time to visit the local hardware store. The hardware store didn't have the answer, either, so I went to a wood working store. Furniture makers face this problem daily: how do you make a piece of furniture strong yet easy to break down into smaller, easy-tocarry sections? The answer: "Knock Down" hardware. I chose a variety called the Trapez fitting, two mating plastic blocks with a single screw to hold them together. The Trapez is designed to join a vertical panel to a horizontal panel. The top block has sideways screw holes for mounting on the vertical panel; the bottom block has screw holes for mounting on the horizontal. (See Figure 3.) When you remove the holding screw, the two panels come apart. Each fitting weighs a fraction of an ounce, so four of them are no problem, one for each comer of the X-dividers. Angle brackets and epoxy per- Unlimited file size ... Fully automatic call .,v aw IM)V xor ;e68Z:ee&1 »xref=<96847>« ;e68Z:9994 »xref= « :coaversiol ta'le sl ax .s __.leal S.'roathe si lIIiI ;e68Z:e897 ;e68Z:8889 ;e68Z:eEM ;Loa. register' WI 8 Or il iI ; e68Z:88811 ;e68Z:8918 .au Batch mode and interactive Locates Data/Code boundaries aw ;»»> Conversion Section xrer a4.ress les 4i Uord Address ;e68Z:991Z »xref=<86999)« lfs bx.------ .ovzx cx Help repz st~=====:::!1 :9682:8916 ; 9682 : 99th get 'Yte count ;9&81:99U ;Store AL at ES:(DIJ .... No Source Code? No Problem. New DiseDoc Professional is your dual-mode key to any DOS source code. It works in batch and interactive modes simultaneously, allowing you to generate the core information of even the most complex programs fast. .. and modify them even faster. Most programs will come apart in just two minutes. Imagine what you can do with a tool this powerful! DiseDoc sifts through programs eight times for guaranteed accuracy. When code gets mixed up with data, our toolbox comes to the rescue with smart search and easy edit utilities. DiseDoc can handle any instruction set up to and including 486 and offers a variety of other great features that you can sample on our Free Demo Disk. Warning: DiseDoc Professional may change the way you work forever. Programmers who used to shy away from fixing outmoded programs with no source code are going to discover a valuable new talent: the ability to modify and revise codes that would cost way All Data formats including DB, OW, DD&DUP ;coaversioa ta'le ;9&92:9921 sti Built-in BIOS Preprocessor ;Tufn 0" Interrupts EXE Unpacker included! ;9692:9922 :96e2:9925 DOS:1c-ter.ildte too much to start over (it's a programming manager's dream). Save your employer huge newprogramming fees and enhance your marketability. DiseDoc is so easy to learn, you'll be a high-dollar hero in no time! Knowledge really is power. DiseDoc Professional is an amazing new teaching tool. Learn how programs work... take them apart and see the writing techniques that top pros use. Use it to assist in debugging. Hunt down viruses and write killers. DiseDoc can save you years of frustration, and it only costs $149.95 including the EXE Unpacker (until January 1). To order your DiseDoc Professional kit or our free demo disk, simply call: 1-800-446-4656 WITHIN CT & OUTSIDE THE U.S., CALL (203) 953-0236 MasterCard & VISA. Shipped Immediately Via UPS RJSwantek, Inc., 178 Brookside Road. Newington CT 06111 manently secure the top disk to the Xdividers, and Trapez fittings hold this whole assembly to the middle disk. Screwdriver access holes in the top disk aligned with the holding screws below complete the arrangements. And they only cost 70¢ each. Elegant, strong, cheap. First mount the Trapez blocks onto the X-divider panels. Remove the screws from the middle disk and set the cleats and top cross panel aside. With the Xdivider panel upright on the top of the middle disk, position the Trapez fitting squarely against both the vertical Xdivider panel and the horizontal disk, then mark the hole locations of the top block with a pencil. Use this same procedure to locate the holes for the angle brackets on the top edge of each panel. Once you've marked all the hole locations, drill them out to 11/64" dia. Lightly tap 6-32 Tee-nuts into each hole, then mount the Trapez fittings and angle brackets with 6-32x3/g" flathead machine screws. The brackets go on the opposite sides from the Trapez fittings; Trapez fittings go in the left and right bays, brackets in front and rear bays. Assemble the dividers to check that the Trapez blocks sit flush with the bottom edges, and that the angle brackets are flush with the top. Epoxy the Xdivider panels together, using a try square and masking tape to hold the panels square until the epoxy sets. After the epoxy sets, position the Xdividers on the top surface of the middle disk. Carefully trace around the lower blocks of each Trapez fitting, then remove the holding screws and use the lower blocks to mark the hole locations on the disk. Drill the mounting holes and mount the blocks with Tee-nuts and screws as above. Try the fit between the X-divider and disk Trapez blocks. If it takes considerable force to mate all the blocks, you will have to enlarge one or more of the lower block mounting holes to allow the block(s) to move enough for easy mating. Repeat this process for mounting the brackets to the top disk. Don't forget the screwdriver holes must be aligned with the holding screws. Check that this is right before you epoxy the X-dividers to the top disk. Mate the two halves of the sensor platform together and secure the holding screws. Figure 4-Isometric View of the Whole Superstructure 14 1-----11" DIAMETER -------.I-I TOP DISK SCREWDRIVER ACCESS HOLE (1 of 4) X-DIVIDER (1 of 2) .. I c.:> . I MIDDLE DISK ~ t') TOP CLEATS TOP CROSS PANEL N BOTTOM CROSS PANEL SENSOR BAYS POWER CONVERTOR BAY (in rear) STD CARD CAGE (in front) ,SIDE PANEL (1 of 2) MIDDLE CLEATS SIDE PANEL STIFFENER (1 of 2) BOTTOM DISK 38 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 BOTTOM CLEATS BATTERY COMPARTMENT Step 5: Finishing The Superstructure Assemble the side panels to the top and bottom cross panels and the bottom disk. Use screws only for now. Sit the sensor platform on top. (See Figure 4.) Notice that, with all the Tee-nuts protruding from the bottom of the middle disk, the middle disk no longer sits flush on its cleats. Use a Dremel tool or a chisel to cut shallow recesses into the side panels and cleats to accommodate the Tee-nuts. With some trial and error, you should get a good snug fit, especially when you tighten down the screws hold-:ing the middle disk to its cleats. Mate the X-divider to the top disk and stand back to admire the completed superstructure. Well, almost complete. You still need to go back and epoxy the side panels and. the middle disk to the cleats, but wait until after you install the STD backplane. The last task is to mate the superstructure to the mobility base. Last time we drilled eight holes in the top (5 3/4" dia.) disk of the base, but used only four. Use the remaining holes to mount threaded studs that will protrude up through the bottom disk of the superstructure. Wing nuts hold the superstructure to the base. Figure 5-LIMBO Stepper Board Parts List C1 100 mfd/50 V Electrolytic C2 R1-R4 1 mfd/35 V tantalum 1 ohm, 1/4 W, 5% R5 0.47 ohm, 2 W, wirewound IC1 CD4070 Quad XOR IC2 IC3 IC4 CD4027 Dual JK flip-flop CD4093 Quad NAND, Schmitt trigger inputs CD4584 Hex invertor/buffer, Schmitt trigger inputs D1-D4 1N4005 600 V PIV, 1 A Silicon rectifier Q1-Q4 J101 10-pin male right-angle header, dual row IRF530 Power MOSFET J102 8-position wire terminal block, 0.2" centers Jl03 2-position wire terminal block, 0.2" centers Misc: Printed circuit board 4 #6-32x3/8" machine screws 4 #6-32 nuts 4 heats inks (AAVID #5751B) 1 16-pin dip socket 3 14-pin dip sockets Assorted wire jumpers ••• The studs are merely 1O-32x3/4" flathead machine screws held captive to the base top disk by 10-32xV4" Tee-nuts. The holes must be countersunk on the bottom side so that the screws are flush. It is also necessary to counter-bore the other four Tee-nut holes on the top side of the base top disk as well as the mounting holes on the underside of the superstructure bottom disk with a 3/4" spade bit. The depth should be no more than the thickness of the flange of a Tee-nut. All this assures that the base top disk is in full contact with the superstructure bottom disk. Making The Robot Move Tools: 30 W soldering iron, YOM or DVM, needle-nose pliers, CMOS logic probe and/or oscilloscope, 5V and 6V power supplies, screwdriver. Materials: Asst. electronic components (see Figure 5), silicone heat sink compound, masking tape, solder flux paste. You can amuse your family only so long by pulling LIMBO around with a leash and making race car sound effects. Eventually they'll demand to see the robot move under its own steam. In steps LIMBO Stepper. The LIMBO Stepper board is not the most up-to-date stepper motor controller, but it is cheap, rugged, and reliable, great features for any robot subsystem. (See Figure 6.) Karl Lunt has a fancier (and more expensive) stepper controller based on the 68HC705 for those of you who like smarter circuitry. Three inputs control LIMBO Stepper's four output phases: STEP*, DIR*, and ENABLE. The asterisk in STEP* and DIR* Figure 6-LIMBO Stepper Board Schematic J101 2 5;9. 1 naI5!~ ~I Vee ENABLE 0 Cl ~ J J.± i 10-=:- 9 ji 11 C2 ~OVcc IC~C "3 "4 J.± j~ > RS J103 [{§l .------~~ B+ (unregul.,ed) HoghCurrenlGND MICRO CORNUCOPIA, #51, Jan-Feb, 1990 39 Figure 7-Stepper PCB Layout signifies that these are active low signals. This is the convention used by the SrD Bus Specification and Practice Handbook, so I'll use it also. For each STEP* pulse, the stepper motor will rotate one step in the direction specified by DIR*. If STEP* is held steady, two phases of the motor will energize, locking the rotor. To conserve power, bringing ENABLE low allows all phases to deenergize, regardless of the states of DIR* and STEP*. A dual JK flip-flop (in conjunction with a few XOR gates) provides all the sequencing. The NAND gates perform the ENABLE function, and four of the inverter I buffers drive the power MOSFET gates (gives you better rise times). The 1 ohm resistors in the gate circuits prevent high frequency oscillation (ferrite cores are the ideal solution, but resistors 40 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 are cheaper). Power MOSFETs have extremely high current gains and can oscillate at several hundred MHz, which spells Smokey Trouble if not properly attenuated. Use the other two invertors for their Schmitt trigger inputs to clean up the DIR* and STEP* signals should they pick up any electrical noise. The NAND gates also have Schmitt trigger inputs, so ENABLE gets cleaned up, too. Overkill? Maybe. Noise pickup is surely the toughest problem to solve once you have it. Best to avoid it in the first place. Along the same line, I also used separate paths for signal ground and high current ground. In any system mixing high current circuits and logic circuits, it is essential to use a Single Point Ground (SPG), which means physically separating the current paths. The traces and transistors on the board are sized to accommodate larger motors than those currently used in LIMBO, up to about 10 A per phase (with a higher wattage ballast resistor). With the 1 A per phase draw of the IMC stepper motor, the MOSFETs stay cool to the touch. Heatsinks are not required, but it's easier to put them in while building the boards than later when you want to use bigger motors. I recommend using printed circuit boards for LIMBO Stepper. Point-to-point wiring works, but life is too short to continue using such time-consuming methods. I don't recommend wire-wrapping these boards because wire wrap connections aren't meant for high current. For those of you who've never tried it, I encourage you to etch your own boards from my layouts. (See Figure 7.) It's not that difficult, especially for a single sided board like this. Plus, you'll learn something. An excellent tutorial on prototype PCB fabrication and design is David Kasten's Electronic Protohjpe Construction (H. W. Sams, 1987, ISBN 0-672-21895-X). The book covers everything from laying out boards to fabricating enclosures, and even such exotica as electroplating gold on edge connectors. This book belongs on every roboticist's bookshelf (or better, on his workbench). For you diehards, there are also etched and drilled boards available from Robotic Systems. Stuffing the boards begins with the jumpers. I like to use the precut jumpers sold for solderless breadboards, but any 24 gauge solid wire will do. Next come the sockets. Simply hold the DIP sockets in place with a bit of masking tape while you solder. Solder the corner pins first, then work around to the other pins in a circular rotation. This will help you avoid overheating and delaminating any of the pads, and it helps prevent solder bridges. Resistors and diodes come next. Watch the polarity of the diodes. Now install the MOSFETs and their hea tsinks. Dab a bit of silicone heat sink compound on the back of each MOSFET before snapping its heat sink into place. Bend the leads with needle-nosed pliers, making sure that the tab mounting holes line up with the holes on the board when you insert the pins. Secure the heatsinked MOSFETs with 6-32x3/s" machine screws and nuts, and solder the pins. Finally, install the connectors and capacitors. These are taller components than the rest, so I save them for last. With all the components soldered in, but with empty IC sockets, use a DVM to check continuity from the Signal Ground pin of J101 to the ground connections on the IC sockets. Check the socket contacts to make sure the solder joints are sound. Repeat this process with the +5V Vee pin and the Vee connections of the ICs. Next check the Ohms reading between Vee and Ground. If there is a low reading here, start looking for a solder bridge or a backwards diode. If you'can't find it now, the thin curl of blue smoke when you first power up the board point it out. When the boards pass all these tests, then-and only then-install the ICs. Use the normal precautions for handling static sensitive components. ,,,,ill Editor's note: I know some of you will wonder what "normal precautions" means, so: (1) don't shuffle your feet on the rug; (2) connect a piece of hookup wire between your watch and the board's ground; (3) don't hand an IC to another person without tOllching that person, skin to skin, first; (4) leave ICs in their tubes or foam until you're ready to install them; (5) don't slide ICs across the table top; and (6) don't give me static about not telling you. To test the boards with the stepper motors, you'll need an adjustable squarewave generator that can output 5V CMOS levels from 0 to 1000 Hz. A bench function generator is ideal, but you can jerry rig a 555 timer to do the job. If you haven't the faintest idea what I'm talking about, I suggest you obtain a copy of Forrest Mims' 555 Timer Circuits, Engineer's Mini Notebook at Radio Shack. Connect the eight wires of the stepper motor to the screw terminals of J102. With power off, connect a 6V supply capable of sourcing at least 2 Amps to the B+ and High Current Ground terminals of J103. On J101 jumper ENABLE to Vee, jumper DIR* to ground, connect Vee and Signal Ground to a 5V power supply, then connect the squarewave output of your function generator (power still off) to STEP*. Now comes the big moment. First, turn on the logic power supply alone, then tum on the function generator. Monitor the STEP* input with an oscilloscope or a logic probe to verify that STEP* is pulSing, then monitor the outputs of IC2, pins 1, 2, 14, and 15. On each, you should see a squarewave exactly 4x the period of the STEP* input. If you have a two channel scope, you can verify that pin 2 is an inverted version of pin 1, as pin 14 is an inversion of pin 15. Pins 15 and 14 should be 90 degrees out of phase with pins 1 and 2, respectively. Now follow these signals on the schematic to the outputs of the NAND gates, where you will see inverted versions of the previous signals. If you see no signals at these pins, check that ENABLE is tied to Vee. If all is still well, follow farther to the right on the schematic. The signals are inverted once more by the invertor Ibuffers. Once this all checks out, it's time to tum on the 6V power supply. The stepper motor should begin to rotate at once. Jumpering DIR* to Vee should change the direction of rotation. If the motor just sits there and hums, try reducing the frequency input to STEP*. If the motor still doesn't rotate, or if it shudders and turns erratically, check for cold solder joints. Also check that all the terminals are making connection to the stepper motor wires and that the wires are in the proper sequence on the J102. If the motor appears completely dead, first disconnect the function generator output from STEP*, then jumper STEP* to ground. Try turning the shaft by hand with and without 6V applied to B+ of J103. With 6V applied, there should be firm resistance to turning; without 6V, there should be almost none. If there is no difference, check with a volt meter that 6V is making it past J103. Check that 6V is also present on all the even terminals of J102. If everything checks out so far, measure Ohms from drain to source of each MOSFET with B+ disconnected. For those MOSFETs with 5V on their gate inputs, the On resistance should be about 0.18 ohm; for those with OV on their gates, the reading should be several mega-ohms. Replace any MOSFETs that don't pass these tests. If the board has been perverse enough to work perfectly right off, then you'll have missed all the above troubleshooting. Before you mount the boards on the superstructure, I advise you to go through all the tests, anyway. Troubleshooting electronic gear is good for your soul, and half of successful roboting is repairing the creatures. Next time, we endow LIMBO with more sensors, more intelligence, and a DC-DC convertor. Parts Sources Nylon card guide-Part #770-4457 Concord 30 Great Jones Sl New York, NY 10012 (212) 777-6571 Trapez fitting-Part #03911 The Woodworker's Store 21801 Industrial Blvd. Rogers, MN 55374 (612) 428-2199 ••• MICRO CORNUCOPIA, #51, Jan-Feb, 1990 41 Capturing & Graphing A Voice In Real-Time: Part 2 The Digital Half Of The Problem Last issue Bruce gave us the analog portion of this often-discussed problem. This time he converts the analog signal to digital data and displays it. hile in graduate school, I took several classes in digital signal processing, digital filtering, and digital control systems. The classes always began with a professor or technical assistant saying, "sample at regular intervals." While researching and writing this article, I naiVely assumed that any A/D board which contained a timer/counter could use that timer to start the conversion of the A/D converter. The timer makes sure the samples occur at precise intervals, something your PC can't guarantee (your program competes with the RAM refresh and clock interrupts). However, a timer isn't always useful. My favorite board from Issue #49, the Real-Time Devices ADI000, has a realtime clock chip; unfortunately it can't be used to start A/D conversions. The Advan tech board, sold by Rapid Systems and Halted Specialties, seems to be triggerable with a "pacer" clock. (This portion is so poorly documented it's not clear to me exactly how to do it, especially without a schematic.) George Dooley at RID explained that the industry-standard 12-bit A/D chip they used was designed in the days of the 8080 CPU. It uses two lines instead of one to start a conversion. One of these lines is an address from the CPU. They've given long thought to running the converter with the timer/counter chip but haven't yet worked it out. They're designing a new board which uses a FORTH CPU and its own memory to store samples (and thus will not be subject to the vagaries of the W 42 MICRO CORNUCOPIA, #51, Jan-Feb 1990 PC's interrupts). But it will cost three times more than the ADI000. The upshot of all this is: (1) Even boards which seem like they ought to be almost the same (Le., the Advantech board and the RID board) can function very differently; (2) People buying the RTD AD1000 are using it for measurement, not digital signal processing or control; (3) I'm doing my sampling in software, without the aid of the counter /timer. George said he knew a fellow who used the AD1000 to sample music; apparently the sampling rate was high enough that the rattle in the sampling period (inconsistencies due to other demands on the system) didn't affect it. I've always heard the sampling period must be constant, though I'm not sure how constant. My computer, a Standard 286 from PC Source, has two speeds: 6 and 10 MHz. Normally, I can't use 10 MHz because they used the wrong interrupt controller on the motherboard-it locks up during disk writes, tape backups, modem communications, etc. (PC Source was quite rude when I wanted it fixed, by the way, so I've been stuck in the slow lane ever since.) Since I didn't use interrupts in this project, I was able to switch between 6 and 10 MHz and see a dramatic difference. In this case, faster is better; we can catch higher frequencies without aliasing. Testing EOC To sample, you start the conversion and then begin polling the end-of-conversion (EOC) line on the A/D converter. Once the conversion is complete you can read the value and start a new conversion. To monitor end-of-conversion, strap the EOC line to the input of one of the 8255 parallel I/O ports. This is easy on the ADIOOO board; just solder a small wire between two holes to select bit 7 of port A, B, or C. I used port B since it isn't brought out to the external connector on the board, so none of those lines has been used. The 8255 defaults to input mode so you don't even have to configure the chip; just start reading it. Code I've separated the code according to function: • Figures 1 and 2 (CAPTURE.H and CAPTURE.C) show how I tell the ADIOOO hardware to capture a set of samples. • Figures 3 and 4 (DISPLAY.H and DISPLAY.C) show how I translate data into screen graphics. • Figure 5 (VOICE.C) declares the CAPTURE and DISPLAY functions by including their header files, and then uses the functions to capture your voice pattern and display it. Figure 6 is the MAKEFILE which tells MAKE.EXE (which comes with Turbo C) how to assemble the project (look up "make" in the reference manual to understand Figure 6). By typing MAKE, you'll build VOICE.EXE. I wrote all the code in Turbo C, but you shouldn't have too much trouble translating it to something else. In CAPTURE.H, you'll see a set of C preprocessor macros for controlling the AD1000 board. I chose preprocessor macros over C functions because the macros put the code in-line when they're called. The compiler gurus at Borland realized that if I/O takes too long, you may have to resort to assembly language. To solve this problem, they altered the way the compiler handles inportO, inportbO, outportO, and outportbO function calls. If By Bruce Eckel Revolution2 308 Meredith St. Kennett Square, P A 19348 Figure l-CAPTURE.H *1 1* CAPTURE.H by Bruce Eckel Revolution2 Real-Time Consulting. Preprocessor macros & function declarations for the RTD ADIOOO board. Note that Again, data written to the addr is unimportant: #define START_AD () outport (base + 9, 0) for this code to work, the end-of-conversion (EOC) line of the AID converter must be strapped to the parallel port B line 7 (PB7). This is accomplished by soldering a short wire from the EOC line to the 1* This tests PB7. Is AID conversion complete? *1 PB7 line on connector PS on the ADIOOO board (this connector is clearly marked by silkscreen info on the board). This wire allows the code to monitor status of the AID converter by looking at PB7. #include 1* So you get Turbo C inport and outport macros (fast) instead of functions. *1 (inportb(base + Oxd) & OxSO) 1* This macro produces the value of the AID conversion. Backslash at end of the line allows you to continue the macro on the next line. *1 #define READ_AD (result) (result= (inportb (base+S) \ « 4); result+= (inportb (base+9) » 4);} 1* Note result is left-justified in the 16 bits of *1 the AID registers. *1 1* Macros in this file generate no code unless they are called (thus you can put them in the header file without causing multiple-definition errors at link time). Since the compiler does all the work of expanding the macro at compile-time, you get readability and ease-of-use of function calls, but the run-time speed of in-line code. Because of the code generated by the compiler for a function call, small macros don't necessarily create more code than an equivalent function call. Note the macros don't have semicolons after them; this forces user to add semicolon so a macro call has the same syntax as a function call. #define COMPLETE() *1 1* The following address is set by a bird jumper 1* This macro starts a reading, waits till the AID completes the conversion, and reads the result: *1 #define GET_VALUE(result) { \ START~(); \ while(!COMPLETE(» \ \ READ_AD (result) ; ; 1* Here are declarations for functions defined in CAPTURE.C. By including this header in another file, you automatically declare these functions. Thus, you can use the functions by including the header and linking CAPTURE.OBJ at link time (see the MAKEFILE for details). *1 1* Display 16 bits of ones and zeroes: void print_binary(unsigned int); *1 clip on the ADIOOO board. If you change the clip, simply change the following (hex) number: *1 #define base Ox200 1* Note that the compiler performs the addition of . this number in expressions like: base + Oxd so no run-time overhead is incurred. *1 1* This macro sets analog multiplexer address, so you can select which input the AID will read: *1 #define MUX(channel) outportb(base + channel, 0) 1* (note that channels must be counted 0-7) *1 1* Data written to the address is unimportant *1 1* This macro starts a 12-bit AID conversion. 1* Display value as a voltage between -5 and +5:*1 void print_value (unsigned int reading); 1* This function waits for AID input to exceed "threshold" and then fills "buf" with "bufsize" samples, taken at software-controlled sampling "rate." Note that the effect of "rate" will vary depending on type and speed of your machine: void capture(unsigned * buf, int bufsize, unsigned threshold, int rate); *1 ••• MICRO CORNUCOPIA, #51, Jan-Feb 1990 43 you include the DOS.H file (as in CAPTURE.H), the compiler will replace any of those function calls with in-line code. Thus, the C code should be fairly optimal. Study the code (and my comments there) for the details of what's gOi!lg on. Figure 2-CAPTURE.C 1* Uses the RTD AD1000 board to capture a set of samples. *1 #include "capture.h" #include 1* Uncomment the following or define it on the compiler command line AID Converter Format (see makefile) with -DTEST_BOARD to generate test code for a newly- The 12-bit data must be read from the converter (a Harris HI-574A) in two bytes. The high byte, which you get by reading the board's base address + 8 (base+8 in the code), contains the high 8 bits. The low byte (base+9) contains the low four bits, shifted all the way to the left. Thus the bottom four bits of the conversion are always zero. Notice that the preprocessor macro READ_ADO in CAPTURE.H fixes this by shifting both bytes to the right by 4. The AID converter could have read from 0 to +10 volts. RTD decided to have it read -5 volts to +5 volts. Thus, when the converter sees -5 volts, it outputs a digital 0; when it sees +5 volts, it outputs all ones. installed AD1000 board: *1 1* #define TEST_BOARD *1 1* Print a value as Is and Os so you can see the bit patterns from the AID converter: *1 void print_binary(unsigned int binary) { int i; for(i = 15; i >= 0; i--) putchar«binary & (1 < i» ? '1' : '0'); 1* Print the ADIOOO value as a voltage, so you can compare it with a voltmeter reading: *1 void print_value (unsigned int reading) { if(reading & OxOSOO) put char (' +'); reading &= Ox07ff; 1* strip off "plus sign" bit *1 else { putchar('-'); 1* Flip bits and mask them so a negative number near 0 becomes a small negative value: *1 reading = (-reading) & Ox07ff; 1* now scale and print the value *1 printf("%l.3f", 5.0 * «float) reading) I 68000 «float)Ox07ff) ); SK*DOS - A 68000/68020 DOS containing everything you expect in a DOS - on-line help, mUltiple directories, floppy and hard disk Support, RAM disk and/or disk cache, I/O redirection, and more. Supplied with editor, assembler, Basic, powerful utilities. Supported by Users' Group and BBS. Software available from other vendors includes C compiler, 1* Capture a block of samples: *1 void capture(unsigned * buf,int bufsize,unsigned threshold,int rate) { unsigned int sample; int i, j; 1* First, wait until the threshold is exceeded: *1 while (1) { GET_VALUE(sample); 1* High bit added to threshold to make it a positive AID value: if(sample > (threshold I OxSOO» break; 1* out of while (1) loop *1 *1 Basic, editors, disassemblers, cross-assemblers, text formatter, communications programs, etc. Priced at $165 with configuration kit" less if already configured for your 1* Then capture a block of samples: *1 for(i = 0; i < bufsize; i++) GET_VALUE(buf[i]); for(j = 0; j < rate; j++) 1* delay by a factor of "rate" between samples *1 system. HARDWARE - 68xxx systems #ifdef TEST_BOARD 1* The following program creates a digital voltmeter out of a selected channel of the AD1000. You should run this program and test a 1.5 volt Mt. Kisco NY 10549 (914) 241-0287/ Fax (914) 241-8607 Reader Service Number 40 44 MICRO CORNUCOPIA, #51, Jan-Feb 1990 battery, or a potentiometer connected to a DC power source, to insure that your AD1000 is installed and working properly. *1 main () { const av = 10000; 1* Averaging factor to remove noise *1 1* av=lOOOO gives incredibly accurate results (in complete agreement with my voltmeter). Try smaller av to see rattle in your system. */ unsigned int sample; long sum; int i; MUX(O); /* select channel */ while (1) sum = 0; for(i = 1; i < av; i++) ( GET_VALUE(sample); /* Add up a bunch of samples */ sum += sample; sum /= av; /* calculate the average */ putchar('\r'); print_binary(sum); Rack &Desk PC/AT Chassis Integrand's new Chassis/System is not another IBM mechanical and electrical clone. An entirely fresh packaging design approach has been taken using modular construction. At present, over 40 optional stock modules allow you to customize our standard chassis to nearly any requirement Integrand offers high quality, advanced design hardware along with applications and technical support all at prices competitive with imports. Why settle for less? put char (' '); print value(sum); if(kbhit(» exit(l); #endif /* TEST_BOARD */ ••• Figure 3-DISPLAY.H /* Declarations for functions to support graphic screen display of voice patterns. */ #include /* The Turbo C BGI header file */ /* "printf"-like function for printing messages while using the BGI in graphics mode. */ void gprintf(char * format, ... ); /* Display the graphics "viewport" values (for debugging) */ void display_viewsettings(struct viewporttype view); /* Types of scaling for display_series: */ typedef enum ( quarter, half, full, twice, quad } scale_factor; /* Display a series of numbers as dots on the screen: */ void display_series (unsigned * series, int series_size, int offset, scale_factor vertical_seale_factor, scale_factor horizontal_seale_factor, int color); ••• This means that a volts produces a reading with only the high bit (bit 11, counting from zero) set. When the high bit is set, it's like turning on the plus sign. This, of course, is quite different from normal 2' s compliment arithmetic. Notice the code in the function print_valueO to account for the sign. Capturing Data Points The "magic numbers," which are the I/O port locations used in CAPTURE.H, come from the documentation for the AD1000. Notice that all the numbers are relative to a base address called (curiously) base. This address is set by a jumper on the board. If you change the jumper, change the base. (Otherwise you won't get to first base.) CAPTURE.C defines print_binaryO, which prints a 16-bit value as a binary number (this often detects problems) and print_valueO, which displays the value from the AD1000 as a voltage. By defining the name TEST_BOARD (see the MAKEFILE to do this on the command line; just type "make meter"), you can create a standalone program which pretends it's a digital voltmeter. Compare the output of the program with your standard voltmeter for verification. CAPTURE.C also contains capture 0, the function used in VOICE.C to capture a set of voice samples. Notice that you Accepts PC, XT, A T Motherboards and Passive Backplanes Doesn't Look Like IBM Rugged, Modular Construction Excellent Air Flow & Cooling Optional Card Cage Fan· Designed to meet FCC 204 Watt Supply, UL Recognized 145W & 85W also available Reasonably Priced ~QVi ~ -- --_ --- ...... ....... - . -.... -. Passive Backplanes _ • •=W=;;=="r=;. . . . . .;;::::;. ==~=~~: ~~~ Call or write for descriptive brochure and prices: 8620 Roosevelt Ave. • Visalia, CA 93291 209/651-1203 TELEX 5106012830 (INTEGRAND UD) FAX 209/651-1353 We accept Bank AmericardlVlSA and MasterCard IBM. pc. XT. AT trademarks of International Business Machines. Drives and computer boards not included. Reader Service Number 22 MICRO CORNUCOPIA, #51, Jan-Feb 1990 45 must pass the address and size of the buffer where you want the samples stored, as well as the threshold and the sampling rate. The threshold lets you cut off background noise (i.e., when you aren't speaking into the microphone). Displaying Data Points Figure 3 contains the declarations for the functions which display the data points. I used gprintfO and display_viewsettingsO for debugging and left them in for your enjoyment. The important function is display_seriesO, which takes any series of points (not necessarily collected from the ADlO00-you can create your own series). It then displays it after moving the whole group up or down by amount "offset," and scaling the output using verticaCscalejactor and horizontaCscale_factor. The definition for display_seriesO is in Figure 4. I chose to make a local copy of the series before performing the scaling so the original series isn't touched. The call to the ANSI C library function callocO allocates the space on the heap (which is later de-allocated with freeO). u.s. Postal Service Statement of Ownership, Management and Circulation (Required by 39 U.S.C 3685) lA)Title of Publication: MICRO CORNUCOPIA lB.)publication Number: 0747-587X 2.)Date of Filing: 9-29-89 3.)Frequency of Issue: Bimonthly 3A)Number of Issues Published Annually: 63B.)Annual Subscription Price: $18.00 4.)Location of Known Office: 155 NW Hawthorne, Bend, Oregon 97701-2917 5.)Location of the Headquarters or General Business Offices of the Publishers: 155 NW Hawthorne, Bend, Oregon 97701-2917 6.)Name and Complete Address of the Publisher, Editor, and Managing Editor: Publisher: David ]. Thompson 155 NW Hawthorne, Bend, Oregon 97701-2917; Editor: David ]. Thompson 155 NW Hawthorne, Bend, Oregon 97701-2917; Managing Editor: David ]. Thompson 155 NW Hawthorne, Bend, Oregon 977012917 7.)Owner: Micro Cornucopia, Inc. PO Box 223, Bend, Oregon 97709-0223; David]. Thompson 1259 NW Iowa, Bend, Oregon 97701-1001; Sandra S. Thompson 1259 NW Iowa, Bend, Oregon 97701-1001 8.)Known Bondholders, Mortgagees, and Other Security Holders Owning or Holding 1% or More of Total Amount of Bonds, Mortgages or Other Securities: None 10.)Extent and Nature of Circulation: Average Number of Copies Each Issue During Preceding 12 Months A)Total Number of Copies Printed: 29,104 B.)Paid Circulation: I)Sales Through Dealers and Carriers, Street Vendors, and Counter Sales: 12,059 2)Mail Subscription: 9,555 C)Total Paid Circulation: 21,614 D.)Free Distribution by Mail, Carrier, or Other Means, Samples, Complimentary, and Other Free Copies: 507 E.)Totai Distribution: 22,121 F.)Copies not Distributed: 1)Office Use, Left Over, Unaccounted, Spoiled after Printing: 893 2)Returns from News Agents: 6,090 G.)Total (Sum of E, Ft and 2)-Should Equal Net Press Shown in A: 29,104; Actual Number of Copies of Single Issue Published Nearest to Filing Date: A)Totai Number of Copies Printed: 28,000 B.)paid Circulation: 1)Sales Through Dealers and Carriers, Street Vendors, and Counter Sales: 17,396 2)Mail Subscription: 9,178 C)Totai Paid Circulation: 26,574 D.)Free Distribution by Mail, Carrier, or Other Means, Samples, Complimentary, and Other Free Copies: 274 E.)Totai Distribution: 26,848 F.)Copies not Distributed: 1)Office Use, Left Over, Unaccounted, Spoiled after Printing: 1,125 2)Returns from News Agents: 27 G.)Total (Sum of E, Ft and 2)-Should Equal Net Press Run Shown in A: 28,000 46 MICRO CORNUCOPIA, #51, Jan-Feb 1990 Figure 4-DISPLAY.C /* Functions to support displaying a voice pattern on the screen using the Borland BGI graphics functions. */ lIinclude' lIinclude lIinclude /* va_start 0 , etc. */ lIinclude lIinclude lIinclude "capture.h" lIinclude "display.h" /* This is a "printf"-like function for printing messages while using BGI in graphics mode. It is limited because it always starts at the left and doesn't wrap at the bottom of the screen, but it's useful for debugging. */ void gprintf(char * format, ... ) ( /* graphics printf for BGI */ th~ static int text line = 0; char textbuf[80]; va_list argptr; va_start (argptr, format); vsprintf(textbuf, format, argptr); va_end (argptr) ; outtextxy (0, textline, textbuf); textline += textheight("x"); /* move to the next line */ void display_series(unsigned * series, int serieS_Size, int offset, scale_factor vertical_scale_factor, scale_factor horizontal_scale_factor, int color) int i, j, step; /* create a local copy of the array: */ int * lseries = (int *) calloc(series_size, sizeof(int»; memcpy(lseries, series, series_size * sizeof(int»; /* First, perform vertical scaling of the local array: */ switch (vertical_scale_factor) ( case quarter: for(i = 0; i < serieS_Size; i++) lseries[i] »= 2; /* divide by 4 */ break; for(i = 0; i < series_size; i++) case half: lseries[i] »= 1; /* divide by 2 */ break; case full: break; /* no change */ for(i = 0; i < serieS_Size; i++) case twice: lseries[i] «= 1; /* multiply by 2 */ break; case quad: for(i = 0; i < series_size; i++) lseries[i] «= 2; /* multiply by 4 */ break; if (offset) for(i = 0; i < series_size; i++) lseries[i] += offset; /* Now display the array according to horizontal scale factor: */ switch (horizontal_scale_factor) ( /* display a part of the series in the whole space: */ case quarter: for(i = 0; i < (series_size/4); i++) putpixel(i«2,lseries[i], color); break; case half: for(i = 0; i < (series_size/2); i++) putpixel(i«l,lseries[i], color); break; /* display the whole series in the whole space: */ case full: for(i = 0; i < series_size; i++) putpixel(i,lseries[i], color); break; /* display the whole series in a smaller space: */ case twice: for(i = 0; i < (series_size/2); i++) putpixel(i, lseries[i«l], color); break; case quad: for(i = 0; i < (series_size/4); i++) putpixel(i,lseries[i«2], color); break; free(lseries); 25 MHz 8-bit ANALOG-TO-DIGITAL CONVERTER Based on the TRW THC1068-1 hybrid flash converter, its high signal-to-noise ratio yields excellent accuracy at the Nyquist limit. /* release local copy of the array */ • 4 KB of cache SRAM or to host as converted at DMA speed • I/O or DMA data transfer • 10 MHz full-power bandwidth • 3.92 mV resolution • 16 jumper selectable base addresses • External clock and trigger inputs TTL compatible • Software source code included void display_viewsettings(struct viewporttype view) { /* The following macro was used during debugging to display all the viewport settings. Notice the use of the new ANSI C preprocessor directives: the "stringize" directive (#) which takes the argument and makes it into a string, and the "paste" directive (##) which takes two names and creates a variable name from them. Notice also that in: = #arg " %d" the preprocessor concatenates the two strings together. */ #define P(arg) gprintf(#arg " = %d", view.##arg) P(left); P(right); P(top); P(bottom); P(clip); getchO; ALSO AVAILABLE AS A KIT FOR $99, INCLUDING: ••• • Printed Circuit board • Software • Manual &assembly instructions Figure 5-VOICE.C Requires: PC compatible 112 length 8-bit expansion slot. DOS 2.11 or greater. EGA, VGA or Hercules display needed for graphic representation of data. /* Display a voice pattern using Borland BGI graphics functions. */ #include /* kbhit() */ #include /* calloc() */ #include "capture.h" #include "display.h" /* includes graphics.h */ mainO { int graphdriver = DETECT; /* will request autodetection */ struct viewport type view; int i, graphmode, color; unsigned int * points; /* Initialize graphics. The string in the third argument tells the function where to look for the graphics drivers (you may need to change it for your own environment): */ initgraph(&graphdriver, &graphmode, "c:\\turboc"); color = getmaxcolor(); /* works with all machines */ getviewsettings(&view); /* display_viewsettings(view); */ /* for debugging */ /* create an array according to size in pixels of the monitor: */ points (unsigned int *)calloc(view.right, sizeof(int»; MUX(O); /* select the channel to read */ while(!kbhit(» { Silicon Alley ~ P.o. BOX 59593 RENTON, WA 98058 206.255.7410 = © 1989 Silicon Alley Inc. tHude is atrademark of Silicon Alley Inc. Other brand or product names are trademarks or registered trademarks of their respective holders. Prices and specifications subject to change. Continued on page 48 MICRO CORNUCOPIA, #51, Jan-Feb 1990 47 The ANSI C library function memcpyO copies the series into the new memory. Use this process whenever you want to make a local copy of an array. Notice you must pass the size of the array into the function. Once inside the function, the array simply looks like an address, so there's no way to figure out its size. Although callocO and memcpyO are quite efficient, making a local copy of the array slows things down a bit, as does the scaling and offset process. I reasoned that data acquisition is the critical process, and display can be done at leisure. You can of course hard-code the display process, and make it much smaller and faster. capture (points, view. right, 1000, 0); < view.right; i++) i points[i] »= 3; /* do some rough scaling */ display_series (points, view. right, 20, half, full, color); clearviewport(); closegraph(); ••• Figure 6-MAKEFILE for VOICE.EXE and METER.EXE # Change these two paths for your particular installation: # path for standard include files: INCLUDE = \turboc # path for libraries: LIB ANSI Preprocessor Tricks The function display_viewsettingsO in Figure 4 tells you how big the screen is, in pixels, using the gprintfO function (discussed later). The BCI figures out how big the screen is at run time, after it loads the graphics driver from disk when you call the BCI function initgraphO. The graphics drivers must be available; the program won't run without them. You can make a viewport of any size, but the system defaults to full screen. Thus, by calling the BCI function getviewsettingsO (as in Figure 5), you load the argument with the current screen parameters. display_viewsettingsO will print this information. I retain display_viewsettingsO in order to use the new ANSI preprocessor functions. I find these tremendously helpful when debugging or doing any repetitive production of code. Notice the macro: = 0; for(i = \turboc # memory model: MEM =s # Following rule tells make how to create a .obj file from a .cfile: .c.obj: tcc -c -m$(MEM) -f -I$(INCLUDE) $*.c # The main rule-this will be invoked if you simply type "make": voice.exe: voice.obj capture.obj display.obj tcc -L$(LIB) -m$(MEM) voice.obj capture.obj display.obj \ graphics. lib # If you type "make meter.exe" the following rule will generate a # program called CAPTURE.EXE which will test your AD1000 by turning it # into a simple voltmeter, so you can compare the readings with a DVM. meter.exe: tcc -c -m$(MEM) -f -I$(INCLUDE) -DTEST_BOARD capture.c tcc -L$(LIB) -m$(MEM) capture.obj ren capture.exe meter.exe del capture.obj # These are the dependencies. When any of the files in the dependency # list change, the .obj file is re-made according to ".c.obj" rule: voice.obj : voice.c capture.h display.h #define P(arg) gprintf(#arg" %d",\ view.##arg) The ANSI C preprocessor will take #arg al1:d "stringize" it; that is, it will take whatever argument is substituted for arg and tum it into a string. Now, since there is no punctuation between #arg and " = %d", the preprocessor will perform string concatenation and tum the two strings into a single string. ' Finally, the ## is the token pasting operator. It will take the argument to the left and "paste" it to the argument on the right to create a new token. (Note: not a string, but something the compiler will treat as a name for a function, variable, typedef, struct, etc.) This means, for example, the macro call- 48 MICRO CORNUCOPIA, #51, Jan-Feb 1990 capture.obj capture.c capture.h display.obj : display.c display.h ••• P (left); will produce: gprintf("left = %d", view.left); As you can see, the additions to the preprocessor in ANSI C can be very useful. Write Your Own printfO The function gprintfO in Figure 4 is a clone of printfO. At run-time, printfO analyzes its format string and goes through the arguments to print them according to the format. Normally, this would be a very unpleasant task to duplicate, and one I would never attempt. But the ANSI C library provides functions declared in STDARC.H, which make writing your own printfO-like function quite easy. gprintfO is one example. The basic technique is this: define a va_list and pass it to va_startO along with the address of the format string. Then you can either pick through the arguments yourself (see an ANSI C reference) or call the special functions vprintfO, vfprintfO, or vsprintfO, which are printfO, fprintfO, and sprintfO for variable argument lists. I used vsprintfO to send the results to a buffer called textbuf. This is very powerful because it gives you all the output formatting abilities available in printfO. After you're finished manipulating the variable argument list, you must call va_endO to clean everything up. After that, I call the BGI function outtextxyO to send textbuf to the screen in graphics mode. I keep track of the line I'm on with a static variable called textline (which keeps its value between function calls). This function could be cleaned up quite a bit for "real" use, but for debugging it's quite handy. Let's Do It Figure 5 is the mainO function which uses the CAPTURE and DISPLAY functions to display your voice on the screen. The BGI function initgraphO initializes the graphics screen according to the argument graphdriver, which is set to autodetect. This means that initgraphO will determine which hardware you have and load the appropriate graphics driver from disk. It looks for the graphics driver in the path specified by the third argument. To improve this program for general use, you may want to tell the user to set an environment variable to the path where the graphics drivers are, then read the environment and use that as the third argument for initgraphO. You can also fold the path in via a compiler command-line argument and change it in the makefile. The BGI function getmaxcolorO returns the number corresponding to the "maximum" color available on that system. I've tried it on both my EGA OS) and Herc clone 0). Conveniently, the color always seems to be the equivalent of white, so it should work correctly with any PC adapter. The BGI function getviewsettingsO will place the parameters of the current viewport into the function argument (notice you're passing an address, so "view" is filled with the parameters). To find out the size of the screen, you just read view.right (for the width) and view.bottom (for the height). You can display all these values with the display_viewsettingsO function in Figure 4. Because you never know until runtime how big your screen is going to be, you can't determine beforehand how big the buffer to hold your data points should be. Dynamic memory allocation comes to the rescue again-by using callocO with the value of view.right, I get an array of ints which is the correct size for any screen. The system spends most of its time in the while loop, capturing a series of points and displaying that series. When you press any key, the program cleans up (by calling the BGI function closegraph()) and quits. Try making the display_series 0 arguments adjustable from the keyboard. Fast Fourier Transform I considered doing an FFf on the waveform in order to see the frequencies in my voice, but I ran out of time. If you want to add an FFf to this system, an excellent reference is Numerical Recipes in C. (Editor's note: Their recipe for digits in light oil (#2) is unreal.) It includes the source code for an FFT in C plus a thorough explanation, so it shouldn't be too hard to adapt it to this project. .• frotll BruceEck~I'sJ.lsjl1g0Aj+. .•. t~~~oJ~1_~~{~2~§~illpJffii;i.··· 500K:·complete.sollrc~fr()rt) • th.~ • •. b()()k. . pI u~. . aqdi~i9l)aL"p r9J(,wts~H. Tested . wlth>Zortech. C+.± . >&. . · Glc)ckenspier>¢±"#/(C<:>irtM6rt~\ yie\V).··All chap~~r~an.(I.proj~cts 1.1I1separatesubdlr~ft()p~~,~~c:11 with . a "makefile;If/>.» ... » =~~;!ly-sije(larrays »SirnpleDataba.s~ . » TAWK:ADailibase· hiter.. . .. » » » » » » » Help For Your Here Clone Three issues ago in the "parallel port file transfer" article, I noted that Herc clone cards have parallel ports which seem a bit tender (I blew mine out while trying to transfer a file). I couldn't find the chip which drove the port anywhere, and assumed it was custom (i.e., unavailable). John Welch wrote to tell me he had also zapped his chip, a UMC 82Cll, but that they could be obtained from: Projects··.i6tllJ~.~.: • • • • •. I·» . preter . ..... . •. . .•.. . . . . . .....)« ........ . ATinle-Based<:()JjtroISYs-. tern ............................. < . . . . . . . . . . . . . . . . Simulation EX~lnple.· . . . . . Object,;Orierite~MeriifSy~- tenl .. .... Text-screenWindo-ws MathernatiCalulgtriicl.ass . CAD ·delTIo: nl011secreates andtTIoves graph ks . . . . . . . . . . . Graphicushm?~~<()1JJ¢c~ •.• • • < ••. ', . . . . . . . . . . . . . . . .. Code·used·t()··discover.colh~ pilerbugs< . And ···.M llcl1>I\1()rel< . To ··Order,.send$75ch~d(t6 Revollltion2·Jaddr~ssbelow).<· Overs.eas. ordersplea~~~cld •. $7 for alrmall,andsendaU.S~ check in .U.S. fUl1dsor>aniriter,;> riational postal rridheY<:>fclei.·.····· ............................... Revol uti()fl2>pt()vicl~s>#I1-. andoff-siteCf±>¢pri$t.iltirig< .···& ·•.• ·.·.·:.·.• ·.• •.• • } .•. ••..•. .•. •• ···R.ev()lll~i()t1.2.·.······ i .. . · .· Brl.lceEckeF<.· . . ... . :308> MefedithStfeef:· I :>I-I---- RELAY FOR CONTROLLING OTHER CIRCUITS ORIENTATION INFORMATION FOR DIODES A short list of other output devices that can be controlled by the 555 circuit. The diode is intentionally connected backwards in the relay circuit: do not leave it out if you use the relay. on your iron. Never use the iron's tip to pry a connection loose or press a connection closed, use your needle-nose pliers for that. Always remember to unplug your iron when you finish your work; your iron's heating element (not to mention your house) will last longer. Always put the iron back onto its stand when you finish soldering. Never, ever, use a file to clean the iron's tip. Except for a damp cloth, the only other cleaning tool you might possibly (I say, possibly) need would be a wire brush; and you would only need this if you got something really stubborn on the tip-say, human flesh. Meanwhile, Back At The Blinker Okay, now that you know how to solder, it's time to build a permanent version of your breadboard circuit. Start by picking up a couple more items from Radio Shack: 1 Pkg of 8-pin DIP solder-tail sockets (276-1995 @ 59~) 1 Multipurpose predrilled project board (276-150 @ 99¢) Some beginners look on sockets as an extravagance; after all, build the circuit properly and you don't need sockets, right? But if you make a mistake.... The project board (and the other Radio Shack predrilled boards like it) may be the best experimenter's bargain around. In the old days, you had to bend leads and connect wires because the perfboard didn't have solder pads on each hole. These project boards, with preetched pads and channels, make wiring a snap. Notice that the component side of the project board carries a silk-screened white copy of the copper pads that are etched on the solder side. You can use this layout guide to help decide where to mount components. . Start with the 8-pin DIP socket. Just like the IC that fits into it, this socket has a notch, dot, or slot for identifying pin 1. As you wire your circuit, treat this socket just as if it were the actual Ie. Later, you'll plug the IC into the socket, using the same orientation, and your IC connections will be correct. Working from the component (silkscreened) side of the project board, position the DIP socket so that the two rows. of pins straddle the two long copper channels running the length of the pro- ject board. Exactly where along the length of the board you place the socket isn't critical; near the middle will do. Push the socket flush against the board, hold it in place with one finger or a bit of masking tape, then turn the board over to view the solder side. Notice that each pin of the socket connects to a three-hole row of solder pads, all joined with a run of copper foil. Looks something like the breadboard, doesn't it? Using the needle-nose or a smallbladed screwdriver, carefully bend each of the socket's pins until it lies flat against the solder pad surrounding it. Make very sure that each pin touches only its own row of solder pads. After bending all the pins into place, carefully solder each connection. Be sure you don't accidentally fill an adjoining hole with solder. Also, guard against putting too much solder on a connection and forming a solder bridge to a nearby pad. (Quiz: How much solder should you use for each connection?) With the socket in place, add the resis- I f the solder appears grainy or grey, either you moved the connection before it cooled or your iron's tip wasn't clean. tors, capacitor, and LED. Use the schematic and your breadboard to help you get the connections right. For each component, bend the leads until they fit properly into the holes (work from the component side). Cut the leads about 118" too long, then bend the leads over so cr PP rJ 'aI:TLE, ~~:. . " : t...: TurboFlow is serious flowcharting software at a price that won't cost you your kingdom. It's easy to use and more powerful than Merlin's magic. TurboFlow runs on an IBM PC il: l~:;~~~tfI":and features a complete set of ANSI J"bI'~~~ ~.......~......~sym~b~ol~s,~is~m~e~nu driven, interfaces with desktop publishing . software, and supports a variety of printers and plotters. So stop living in the dark ages. Call 1-800-8825822 and order I your copy, or ask for our free broL-....L...L:~:;;;;..~~.~~~==---...l chure. ~ Mountain SOGII. Thursday the .14th .will begin with a .choice of· activities: a horseback ride into the rockies, or the traditional whitewater rafting. Thursday night, we'll have a. barbecue at a national forest campground. Friday and Saturday will again be filled.·with· presentations~ The focus thisyearwiU be on graphics, animation, '- \~ I MONEY BACK GUARANTEE. Ut;:!" ",/ (0 fl' ~ I ,~) T) ) ') ') )") ,),')-,-, )"') • Comprehensive Time & Date math in 7 international formats. !owerful code and report generators Included! • C omes WI'th a comp Iete 320 page manual, plus sample programs to get you started. com~raiifeoo! SOFTWARE SCIENCE Reader Service Number 129 1/" • Over 220 routines all with easy-touse, dBASE-like syntax. ORDER NOW. YOU RISK NOTHING. Thousands of satisfied customers have already ordered from us. Why not visit your dealer or call toll-free, right now and putSaywhatand Topaz to the test yourself? They're fully guaranteed. You don't risk a penny. Special limited-time offer! Save $26. Buy Saywhat?! and Topaz together for just $99 (plus $5 shipping and handling, $10 Canada, $25 International, Calif. residents add 7%). Visit your nearest dealer or call toll-free: 800-468-9273 In California: 800-231-7849 International: 415-571-5019 • Design screens, windows, and moving bar menus! / INC. assigns the appropriate values in the ModeData table to the function pointers ZG_PlotPixel and ZG_ReadPixel. Thus, for each graphics mode, the correct pixel plotting and reading routines are set-automatically. Once that is done, ZG_SetMode assigns values from the ModeData table to the width, height, and color count values of the ZG_Videolnfo structure. You should note here that· ZG_LWLVL.C handles the Hercules card in a special manner. Since the PC BIOS does not support the HGC in any way, its graphics and text modes must be set via special functions. The ZipGraph functions make exceptions to their normal set-up by calling the special Hercules functions rather than the BIOS. Plotting Pixels Different video modes require different pixel plotting and reading routines, which is why I use pointers to the functions for these tasks. You can use ZG_PlotPixel and ZG_ReadPixel exactly as if they were regular functions. However, what they do depends on the graphics adapter. Their value is based on the graphics mode you requested via ZG_SetMode. In a way, you can look upon this as a form of polymorphism. This column has already run far longer than it should, so I won't go into the specifics of how the individual pixel plotting and reading functions work. If you're dying to know, pick up a copy of Richard Wilton's Programmer's Guide to PC & PS/2 Video Systems I(ISBN 1-55615103-9), by far the best reference ever published about the nuts and bolts of PC graphics programming. I doubt ZG_LWLVL will be static. For instance you could add support for the super VGA modes, such as 800x600. Additionally, you might like to try some of the non-documented VGA modes, such as 320x400 with 256 colors. But all in good time. I suspect this issue's source code is more than enough for most of you to chew on for a while. News and Reviews Everything comes in bunches. Two significant C-related products have arrived on the scene-Zortech C++ 2.01 and Lattice C 6.01. Zortech C++ 2.01 will have b'een released by the time you read this. As 62 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 most of you know, I'm a big fan of the compilers written by Walter Bright, and an even bigger fan of C++. I beta-tested this latest release and can frankly say that this is one of the finest compilers ever written. It's one of the fastest compilers I've seen, and it produces very tight and reliable code. Probably Zortech's biggest feature is its near-perfect implementation of AT&T C++ version 2.0. C++ 2.0 is probably the most amazingly complex language ever developed, and Zortech is the first MS-DOS vendor with a nativecode compiler for it. I used a beta copy of Zortech C++ 2.01 while writing a book on C++ 2.0. The compiler's capabilities were very impressive. The new Zortech compiler is missing a few C++ 2.0 features. For example, it does not support pointers to member functions yet. A release due sometime early next year will correct that. Otherwise, this is a faithful implementation of the language AT&T describes in its reference documentation. Even AT&T's own C++ translator, called cfront, does not support the full language. Zortech C++ 2.01 comes in two packages. You can buy just the compiler for $200, or you can purchase the "Developer's Version" for $450. The latter contains the compiler, complete source for the run-time library, a set of C++ classes, and a C++ source-level debugger. Zortech no longer sells the vanilla C compiler separately; however, the C++ products still include it. Another hot entry is Lattice's longawaited upgrade. Going from version 3.4 to version 6.01 may seem a bit strange. While Lattice justifies the radical change in version numbers with some mumbo-jumbo, I suspect the real reason is that they wanted to impress upon people that Lattice C has really been upgraded. Back in the early days of the IBM PC and its clones, Lattice C was the king. In fact, early versions of the Microsoft C compiler were licensed versions of Lattice. Then Microsoft wrote its own C compiler, and other vendors entered the market with faster, optimizing packages. Lattice C quickly slipped into obscurity. Now, they've returned with one of the best packages on the market. For $250, you get a globally optimizing compiler, a MASM-compatible assembler, a very good full-screen debugger, OS/2, Microsoft Windows, and MS- DOS compatibility, and dozens upon dozens of tools and libraries. In fact, the Lattice library is one of its most outstanding features; it contains more than 800 functions! To do this, Lattice simply bundled their dBASE III interface library, curses library, graphics library, and communications library with the compiler. Previously, these had been separate products. Editor's note: The curses library? You mean the room where engineering and marketing discuss the features in the next revision? Of course, a compiler cannot be judged wholly upon the size of its library. Lattice C 6.01 is a very good compiler; it produces competitive code both size- and speed-wise. It doesn't win all the benchmarks, but it certainly does better than average on all of them. The compiler itself is reasonably fast, and Lattice supports several C-language extensions aimed at imbedded systems programmers. It's impressed me enough to install Lattice C 6.01 alongside the Borland, Microsoft, and Zortech compilers. Resources You may have noticed the BBS telephone number under my byline. Yes, I've put up a BBS, called Duck Tower (a menu selection on the BBS explains the name). It's at (303) 641-5125, and works at 300/1200/2400 bps, 8 data bits, 1 stop bit, and no parity. It's currently a node on the FidoNet system: 1:104/708. The BBS is oriented towards my favorite subjects: science and computers. I try to maintain the best in MS-DOS applications and utilities, too. Programming languages supported are C, C++, Smalltalk, Pascal, Modula-2, and 80xxx assembly language. I also have what I believe to be the world's largest collection of fractal generators and Chaos Theory programs. And I carry the issue disks for Micro C , along with the latest versions of ZipGraph, CRITTERS, and the other software you've seen here. So come on over and visit; we'd love to have you! Movin' On .... That's it for now. Next time, we'll look at line and curve drawing, followed by a 3D plotting module used to implement the fractal generator. ••• ERAC co. BABY 386·20/24 MOTHERBOARD One 32 bit slot, Five 16 bit slot, Two 8 bit slot. Maximum 8 meg on board (1 meg SI M MS). OK on board. 80287 or 80387 or Wytek Co·Processor slot. Shadow RAM. ·20 $630 ·24 1 meg SIMMS $660 $115 Color 640x480 800x600 1024x768 256 of 256* 16 of 256* 16 of 256* ·with 512K RAM Runs all standard VGA modes. 256K RAM on board. Drivers for AutoCad, Lotus, Framework, GEM, VP, WP, WS & MS Win· dows. 1 year warranty. For 512K $30 extra $185 ELGAR UNINTERRUPTIBLE POWER SUPPLIES 400 Watt MODEL IPS400+ $650 Power distribution center and sine· wave UPS. Only 2" high. * NEW 24V INTERNAL BATTERY $75 9" Green Monitor - 83, 84, K16 .... $60 Host Interface Board .............. 15 Keyboard ........................ 50 Replacement Power Supply ........ 70 Drivetek 2.6M FDD (Robie or K4X) .... 75 CPM COMPUTERS K4·84 ...... 425 K4X ....... 425 TEST EQUIPMENT CPU & RAM & MISC. 41256·12 .. $6.50 41256·15 .. $5.00 4164·10 .... 2.50 4164·12 .... 2.10 4164·15 .. , .2.00 4164·20 .... 1.25 MK48Z02B·20 .................. 10.00 Dallas D1220Y ........ , ........ 10.00 SIP DRAM 256·12 ................ 7.00 2716 ...... 3.50 2732 ...... 3.75 2764 ...... 4.00 27128 ..... 6.50 27256 ..... 5.25 27512 ..... 7.00 MC68000·8 CPU ................. 8.00 Z80 CPU . " .75 Z80A CPU .. 1.50 Z80 CTC ....................... 1.50 Z80A PIO .. 2.00 Z80A SIO .. 5.00 8089·3 ......................... 6.50 80C85A .... 4.50 8088 ...... 6.50 8212 .... : ...................... 2.00 8251 ...... 1.50 8253·5 ..... 1.50 8255·2 ..... 3.50 8255·5 ..... 2.50 D8284A ........................ 2.50 D8749 ......................... 7.00 6845 ........................... 5.00 1793 ...... 6.00 1797 ...... 7.00 HOURS: Mon.· Fri. 9·6 - Sat. 10·4 MiNIMUM ORDER - 515.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 7% Sales Tax. For more information please call. GEL CELLS 400 Watt MODEL SPR401 $180 Supplies may have minor cosmetic damage, but are electrically sound. Squarewave output. Run on inter· nal or external 24VDC battery when line goes down. Typical transfer time = 12MS. Battery supplied. For AT, XT & Kaypro. KAYPRO EQUIPMENT BARGAINS OSCILLOSCOPES TEK 7403N/7A18N/7B50A 60 MHz .$650 Leader LB0520 30 meg Dual Trace .. 300 TEK 475 Dual Trace 200 MHz ..... 1499 ScopeProbex1,x10 100MHz ....... 25 ANALYZERS TEK 491 10MHz· 40 GHz ........ $4000 Biomation 805 Waveform Rcrdr ., .. 195 Biomation 8100 2·Channel Waveform Recorder ............ 295 HP1600A Logic Analyzer .......... 295 HP1600A/1607A Logic Anlyzr ...... 495 Gould K40 32 CH Logic Analyzer ... 950 MISC. Optronics 550 MHz Freq Cntr ...... $95 Exact 566 VCF/Sweep Function Generator .................... 195 NiCds AACelis .6ah ................. $1.00 12V Pack AA Cells .6ah ......... 6.50 Sub·C Cells 1.5ah .............. 1.50 12V Pack Sub·C ................ 10.00 Double D Cell 2.5V 4ah unused ... 8.00 CCelis ........................ 1.75 7.2V RC·Pack 1.2ah ........... 18.00 560 Watt MODEL IPS560 $350 Sinewave, 56 OW complete with batteries. 16 BIT VGA CARD Resolution 8280 Clairemont Mesa Blvd., Suite 117 San Diego, California 92111 (619) 569·1864 We carryall Ie's for Kaypro repair. * SPECIAL * COLOR MOU,SE - Red, Green, Yellow, Blue or Standard with manual & diskettes. Lifetime warranty. $39 Reader Service Number 93 6V 5ah ....................... $5.00 6V 8ah ........................ 6.00 12V 15ah .................... 15.00 12V 2.5ah ...................... 8.50 D Cell 2.5ah .................... 2.00 ROBOTICS 5V DC Gear Motor wlTach 1"x2" .. $7.50 Z80 Controller with 8·Bit A/D ..... 15.00 12V Gear Motor 30 RPM .......... 7.50 Cable: DB9M·DB9F 1 ft. length ..... 2.00 High Voltage Power Supply Input: 15·30V DC Output: 100V 400V 16KV ........ 6.50 TERMINALS Televideo 925 ................... $99 We Repajr CPM Kaypros IC'S 81·189 Video Pal. .............. $15.00 81·194 RAM Pal ................ 15.00 81·Series Char. Gen. ROMs ...... 10.00 b81·Series Monitor ROMs ........ 10.00 SWITCHERS AT 200W Pulls, tested .......... $35.00 5V/75, 12V/8, ·12V/3, ·5V/5 ........ 85.00 5V/9.5A, 12V/3.8A, ·12V/.8A ....... 39.00 5V/3A, 12V/2A, ·12V/.4A .......... 19.50 5V/6A, 12V/2A,·12V/1A .......... 29.00 5V/6A, 24V/1 %A, 12V/.6A,·12V/.6A ... 29.00 5V/30A ........................ 39.00 5V 100A ...................... 100.00 5V 120A ................. 'J' .110.00 HPDCIDC 12V In 5/8, 12/5, -5/.3 out ...... 45.00 I" * SPECIAL * VERSATEC 8222F 22" Electrostatic Printer Plotter 200 dots per inch. Up to D size. 1" per second * SPECIAL $3,999 * AT 80286·6 CPU BOARD with reset and mono/color switch. Connector for KB, Battery & SPKR. Phoenix Bios (tested with Award 3.03). 6MHz, can be upgraded to 8 or 10MHz. Use with backplane, add memory board, I/O board, etc. ONLY $99 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 63 CULTURE GORNER The Things Up With Which I Have To Put I had just staggered in the door from another grueling vacation. The latest issue of Micro C, hot off the presses, sat in newly opened boxes. An exciting time, this; we catch our first glimpse of the end product of months of hard work (well, of months anyway). I snagged a copy, settled in next to Cary's desk, leafed through the pages, and found an insert. An insert? Micro C never has inserts. It read: SWM, WHO LOVES THE GREAT OUTDOORS: Rock Climbing, Mountain Biking, Snow Camping. Ex-physicist turned computer technician (nerd) seeks sweet young thing with amazonian strength to share the milk of Mother Earth. Must be petite, healthy, possess good genes, and the ability to carry a 50 pound pack up steep terrain. Must speak only when spoken to and, when permission is given, be independent. , Please respond with photo and vital statistics to: Larry Fogg, at Micro C, P.O. Box 223, Bend, OR, 97701. (If you wear L.L. Bean jammies and breathe heavily, call evenings.) I looked around at the innocent faces and knew something was wrong (no one ever looks innocent around here unless they've hatched some sort of deviltry). The entire untrustworthy crew of Micro C wanted me to believe that they had sent out this implausible (but nicely worded, I had to admit) personal ad with each copy of the magazine. Of course I didn't buy it-not for a minute. We all had a good laugh and I went back to my desk for a well deserved post-vacation nap. 64 MICRO CORNUCOPIA,#51,Jan-Feb,1990 A couple of weeks later a handwritten letter arrived, supposedly from a Sonja Travers of San Francisco, responding to "my" personal ad in Micro C. Sonja described herself and went on to say: "It seems we are both lovers of the wilderness. I like to go hiking, but I can't go during ragweed season as I suffer from asthma and hayfever. I had a polyp removed from my sinuses last year which seems to help somewhat." Sure. Once I had a polyp removed, too-from my brain. So I don't believe every little piece of BS my fellow Micro c:: inmates try to foist on me. The next attacks on my incredulity - came by phone, from people I'd always thought of as friends. Bruce (of Eckel fame) called to complain about my use of Micro C as a platform to further my own questionable personal needs. Thanks, Bruce. Next time you visit, you're sleeping outside with the cats and curs. And Herr Entsminger.... Et tu? I learned long ago that Gary at his most sincere is also most suspect. But I didn't think he'd lower himself to aiding in this kind of nonsense. No way I bought into this drivel, but dang if they weren't doing a fine acting job. I felt like I was stuck in a bad TV show-a cross between The Dating Game and The Twilight Zone. Miss Esther Ruth Lancaster (a Mennonite from Pennsylvania) was up next. "I am a hard worker. Every day I rise at 4:00 a.m. and milk the cows. Then I collect the eggs from the chicken house, feed the chickens and the ducks, and our little kitten. Then I start the day's bread baking, and while the bread By Larry Fogg Micro C Staff is in the oven I get my little sisters ready for breakfast and for school. "Then I help mother with laundry which we do by hand and can take up the rest of the morning. Then we start preparing pies and roasts for dinner. After that we usually beat the rugs and sweep the floors and then go help Father and my brothers in the fields. "I finished ninth grade. I am now 19 and I understand that in other communities, girls have more schooling. Perhaps you have met some of these girls, Mr. Fogg, and they must be very smart. But I can read and write and cipher quite well. "I would like to have lots of babies and I think I would be a good mother and wife. I already know how to run a household and my cousin Sarah Bernstein says that I would get used to sex. Excuse me for speaking so openly, Mr. Fogg, but I am a farm girl after all and I'm sure it would be okay from time to time." Now we were getting somewhere; I just love a good roast. And my rugs hadn't been beaten for at least nine years. I felt my raging disbelief easing into a fine, healthy skepticism. I almost looked forward to the next letter. When it came from Ferrin Kennedy with a phone number, an address, a picture of a beautiful blond, and an invitation to lunch (her treat-my kinda woman), I knew it was time to see if Ms. Kennedy actually existed; I would accept her invitation. (The only thing that worried me about Ferrin's letter was a closing remark that she found "Around The Bend" quite titillating. Did I really want to be seen in public with a woman who would say such a thing?) But the final letter caught me before I had a chance to take the plunge with Ferrin. I pulled up a chair in the production room. "I saw your picture in Micro Cornucopia and it made me pucker! You seem like such a man!!" Obviously an intelligent and discriminating woman, or so I thought. "I'm petite, with blond hair and green eyes and I love to .... " I won't continue; you can probably guess where the letter was heading. Besides, at that point a decidedly unfemale picture fell out of the envelope and I heard a couple of snickers from the next room. I skipped to the end of the letter and read: "I must be getting off now. I'm due at the humane society for my volunteer work. I just love those cocker spaniels. lipS: Jackie and Cary helped me write this and all the others. Steamy enough yet??" Suddenly I was surrounded by the same conniving crew that had watched me read the personal ad weeks before. They tried to appease me with pizza and chocolate frozen yogurt pie, and I let them think that they had. But now I get my final and poetic revenge: they wrote most of this article, but I get paid for it. Editor's note: Of course the next pizza and the next yogurt pie are on you fella. And we'll take 'em as soon as you return from Yosemite. ••• MICRO CORNUCOPIA, #51, Jan-Feb, 1990 65 Marketing The $25 Network Making It A Little Bit At A Time By Kim Jindra with Don Jindra Information Modes P.O. Drawer F Denton, TX 76202 (817) 387-3339 The Jindras became special friends at the B.c. SOG, and the friendship has grown as I've seen them at SOG after SOG. Their $25 network was also quite a hit, and despite the low price, they seemed to be doing quite well. So I asked Kim to send me an "On Their Own." ur company, Information Modes, is a software development/publishing company with a grand total of two employees-my husband Don and me. Until January, 1987, Don worked as a consultant. For approximately two years, our income came primarily from one small manufacturing company. Don developed software for their business with the understanding that he and the owners would market it in a separate partnership. As the project neared completion, it became clear that "marketers" and programmers are natural enemies, like cannibals and missionaries. We decided we didn't need their money. O 1M ODES Suddenly we had virtually no income beyond the six month cushion in our savings account. Fortunately, I was working part-time at a local bookstore, making enough to cover food. Don got busy. He had been thinking for some time of creating a simple and affordable network for the guy with two or three pes. Now he had the time. Before I knew it, he was disassembling and commenting DOS. "But what about the network?" I asked. He assured me DOS would gobble the network if he didn't understand it thoroughly. Also, I think he was just curious about how it worked. The Ad Soon Don was writing a classified ad for Computer Shopper to advertise his network and his DOS disassembly. He was sure other people might be interested in DOS. That $34 ad 66 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 seemed like a big risk at the time. Plus, we would have to wait more than six weeks to see . if there was any response. We decided to call our main product "The. $25 Network." If that didn't grab attention, nothing would. I sent in the check as Don, started work on phase two, The Weak Link, a subset of the network. He said he wanted to begin with a simple "network-like" project. He still hadn't started the network and we had an ad coming out in weeks. He hadn't entirely finished DOS, either! I told him six weeks was not a very long time. "Don't worry," he said. I worried. Fortunately, he does his best work under pressure. Soon the big day came and we went down to the post office to check our box. Lo and behold, an order for the DOS disassembly. The Computer Shopper ad was out. I asked Don if he had finished DOS yet. "Don't worry," he said. I asked how the network was coming. "I think I'd better finish DOS first," he said, "but don't worry." The next day another check arrived, this time for the network. I asked how long until the network would be ready to ship. "I guess I'd better get busy," he said, "but don't worry." Don put in 18-20 hour days. I helped by having nightmares-something about the Attorney General showing up at the door. The Paperwork By the time Don finished the network, he was so sick of the project he had a tough time with the documentation. He enlisted my help, but since most of the stuff was new to me, I just proofed the copy. We printed the originals on our dot matrix printer, reduced the copy, pasted it up, and hit the local copy center. Then, stacks of pages, in hand, we adjourned to the kitchen table to assemble manuals. Five a.m. August 5,1987, we finished. We'd received a handful of orders so we duplicated disks, packaged everything in hand-cut cardboard squares, and shipped. We promptly packed up the car and headed for south Texas and the Gulf. Once home, we got our first bug call. The program couldn't read MS-DOS 3.1 disks. We'd tested PC-DOS 2.1 and MSDOS 3.2, assuming that if they worked, the rest would. Not true! We quickly fixed the bug and shipped updates. We thought we had a spiffy product, but we didn't have the bucks to really advertise. We quickly rejected shareware for the network, but we did have The Weak Link. A Foreign Agent Then one day we received a letter from West Germany. Joseph Kirschbaum, a PC-SIG distributor, wanted exclusive rights to sell The $25 Network in Europe. He had read about our network on The Weak Link disk. (That's how we discovered the PC SIG Library was distributing The Weak Link.) We laughed when we read the letter, we hadn't even considered overseas sales. He called us before we had time to respond. He was serious. We tried our best to discourage him, but he was so persistent we finally relented and TreeTop provides an easy to use interface to DOS commands. A visual tree of your directory structure is displayed with a point and shoot ability to move around your hard disk. Whether you are doing hard disk housekeeping, reorganizing your directory structure, or simply copying files, TreeTop makes it a breeze. Check out these features: fl;" fL -<:<,<~.)<. • • • • • Fast and user friendly Pull down menus Context sensitive help User installable setup Full color or monochrome support • • • • • • Shell to DOS Execute COM, EXE, and BAT files Point and shoot user interface Execute your favorite editor Mouse support (not required) Sort files by name, ext, size, date/time, ascending or descending order ' Copy, move, delete, rename, or print Single files or groups of files When copying, TreeTop will optionally: • Scan and display destination drive • Copy to root • Copy to user defined path name • Prompt user when disk is full • • • • • The Weak Link The hook on The Weak Link was source code. When people registered, they received the complete source. We also mentioned The $25 Network on the shareware disk. (Registration is only $15, but still only two or three register in a month.) Our decision to test the shareware waters did not come lightly because we were quite skeptical. After several weeks of agonizing, we sent a copy of The Weak Link to PC SIG. While we were waiting (it' seemed like forever), we continued running the classified in Computer Shopper. We celebrated when sales hit $100 a month. As more money came in, we slowly increased the size of our ad. We set modest goals and celebrated the gains. Our decision to test the shareware waters did not come lightly because we were quite skeptical. agreed to terms. We didn't expect too many similar offers. At the time, we looked upon European sales as bonus money, not really expecting much. • • • • • • Add, delete, and rename directories Select and operate on files in a single directory or by the entire drive Select files by wildcards, date/time, attributes, or individually Change files' date/time or attributes Find files with speed searching Disk and directory status display View files in hex or text format Set, rename or delete disk volume labels And much, much morel Only $39.00 30 Day Money Back Guarantee Price includes disks (3 1/2' and 5 1/4'), registration, bound manual, tax and shipping in U.S. Send check or money order to: Kilgore Software p, O. Box 2291 West Sacramento, CA 95691 (916)371-3715 or call toll free: i·S00·TREETOP Runs on DOS 2.0 or greater, 256K RAM. with or without a mouse. Quantity discounts and site licenses available. TreeTop is shareware. so you can distribute copies for evaluation. Reader Service Number 175 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 67 A week later we got another offer from Germany. But it turned out that signing with Kirschbaum was an excellent decision. We've had a good (and profitable) relationship for two years. More Promotion Meanwhile, business picked up in the U.S. We increased our product line and threw in a list of' other products with the orders. We also sent this information with bingo card literature. Other products include: disassemblies of DOS 1.1 ($15) and 2.1 ($45), The Weak Link ($15), Hercules Graphics Drivers ($15), an 8748 simulator ($15), and the System Technical Reference complete with BIOS calls, DOS calls, and everything else Don needed to have on hand while writing drivers in assembly language ($5). The Technical Reference has been very popular, even though we don't mention it in our ads. Meanwhile, the want ad in Computer Shopper grew larger as we added information on the Hercules Graphics Drivers and the simulator. As sales grew, Don put me to work nights (after spending days mucking about in my new archaeology job). I started by helping out with the mail. Our next big step was to take out a small showcase ad just for the network. The ad cost $250, very foolhardy. It meant we would spend close to $400 per month advertising in Computer Shopper. Plus, they wanted a threemonth commitment. All The Way By October 1988, I'd quit the digs to go full time on our business. It was a risk, but Don couldn't handle it alone. I worked on packaging and promotion while he improved the Network and worked on new products. We began promoting our products at local shows. Don and I and our two boys stayed up half the night copying disks and collating manuals, getting ready for the first show in Fort Worth. The turnout was terrible and we sold only five copies of the Network. We had better luck in Dallas a few weeks later, but the experience taught us a lesson: THINK BIG, but don't be surprised by small. Sharing The Network Around this time we received some bad news. Someone was uploading our network to bulletin boards. This was ex- 68 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 tremely disappointing". We bought a modem and started checking into BBSs around the country. When we found our network, we asked the SYSOPs to remove it. Most did and apologized. Some didn't help us at all. Others seemed downright criminal. So Don decided to serialize each copy. He also made significant improvements. This was early 1989. Since then we have updated the network every couple of months. Big Time Finally we decided it was time to advertise in other magazines. I contacted Micro C and signed up for a year's worth of micro ads. At $79 per issue it seemed like a bargain, and that's how it turned out. (In fact, it has been one of the most profitable ads we've bought. It's obvious from the people who contact us that Micro C has extremely loyal and knowledgeable readers.) Shorty thereafter I called PC Tech Journal. Despite their heavy push to sign us up for a long term contract, I committed to just one time. I had to find out if it was worth the money before committing to a long run. I soon discovered I'd made the right decision. We'd caught the last issue of the magazine before Ziff-Davis folded it. Other small advertisers were not so lucky. They saw their ads continued in publications not of their choosing. This was only the first of several bad experiences we've had with Ziff-Davis. (And Ziff just recently bought Computer Shopper.) Plastic Obtaining a vendor account for VISA/MasterCard was another challenge. We had sent a significant number of orders "net 10," hoping the customer would send us a check when he received the product. Some customers were very impressed with our trust, and most eventually paid; but the few who didn't were a constant source of aggravation. We needed VISA/MasterCard. Entering a bank and mumbling "mail order" is like putting a kerchief over your face and shouting, "Stick 'em up." It took months to convince just one bank we were legitimate, but it paid off. Our volume doubled. It was time to increase our advertising again. Our goal had always been BYTE, so we gave them a call. The ad was expensive, but if we'd learned one thing, it was that advertising sometimes pays. We also added PC Resource. How Ads Work All we expect from the first ad in any publication is that we get as much in orders as we paid for the ad. So, if the ad cost $400, we expect to get $400 in orders. After a few months, we expect an ad to bring in at least three or four times the money we spend. (Our Micro C Micro Ad does the best, generating a minimum of 10 times its cost.) A long time ago we decided it would be better for us to take out a lot of small ads than gamble on bigger ads in fewer places. We think consistency and stability are more important than single fullpage splashes. (Some customers will call only after seeing our ad in several places.) Ads in BYTE's Buyers Mart are $475, but we got immediate response to our first ad. We received 34 bingo cards the first week; now we're up to 75 plus per week. About 25% of the bingo checkers purchase after receiving our literature. Plus, at least 1;3 of our phone orders come from BYTE. PC Resource wasn't as successful at first. We had just about decided to spend the $306 per issue elsewhere, but response seems to be steadily improving so we'll probably stay. Computer Shopper has been a consistent performer though we've expected response to go downhill as the .magazine gets larger. So far that hasn't happened. We have been in their Shoppers Mart for over a year. It generates slightly less response than BYTE. Besides trying different magazines, we've also tried different slogans. The one we've settled on is: "Skeptical? We make believers." Does it work? Every day we get several calls that begin, "Make me a believer." And we get letters signed, "Skeptical." On The Road Early in the spring of 1989, I read with great interest about the B.C. SaG in Micro C. I was convinced we should try to go on the road with The $25 N etwork. Besides, we had planned a West Coast vacation. Don agreed. We had no idea what a SaG was, but thought there was a chance we would meet the editor and perhaps convince him to look at our product. We hooked up with an answering service and a mail service and drove to Canada. The B.C. SaG was wonderful. We had so much fun that we followed up with the Rocky Mountain SaG. Saleswise, our trip to Colorado was more successful than B.C. I decided in Colorado we would go to SaG East, but it took me about a month to convince Don. I just couldn't let Dave be the only one to complete the Tour de SaG '89. Editor's note: Tour de What? I have to admit that Kim and Don really know how to network, and it was great seeing their friendly faces in Port Alberni, B.C.-Gunnison, Colorado-York, Pennsylvaniaand Dallas, something. (Dallas used to have a football team. I think.) As I mentioned, we'd originally attended SaG in hopes of meeting the editor of Micro C. Well, at the Longhorn SaG here in Texas, Dave became the fifth member of our family. We have a small two-bedroom house, so Dave bunked with the kids. There's nothing like rubbing elbows with the rich and famous! ing. Plus, if Microsoft, with all its overhead, can sell Quickbasic for $59, we should be able to prosper at $25. It's not our customers who complain about the price, it's the dealers. They want to make $100 for a IS-minute sale. Fine. But until someone explains to us exactly why we aren't making money at $25, we'll go happily about our business and bank our profits. We started small, borrowed no ·money, and took no great risks. That's probably why we're doing well today. We've made a few mistakes. Don should have quit consulting six months earlier. We should have serialized each copy of the network from the beginning. We probably should have increased advertising faster. Maybe we should have charged more for the network. But this is all hindsight. Contrary to popular belief, hindsight is not 20/20. number, a BBS, and a FAX). Don's also finishing up a whole new network. Our new net should handle 20 to 30 nodes, be very flexible, and support lots of different hardware such as serial ports, parallel ports, arcnet cards, and SCSI. It will also include all the specs for the hardware interface. That way purchasers can write their own hardware drivers. Target price will be $75, and we'll offer a $25 discount to current customers. On the marketing side, we'll keep expanding the advertising slowly. What would we do if we got 10,000 orders in a month? We'll be adding some regional publications as well as some language magazines. Finally, we'd like to try PC Magazine, if we can justify the expense. ••• The Future Soon we'll be moving to larger quarters (room for help) and adding additional phone lines (including an 800 Editor's note: I was sure 1'd debunked the rich and famous part, but I must thank Kim, Don, Courtland, and Donald for putting on the Longhorn SOG and for inviting me to be a part of their wonderful (tightknit) family. I Which brings us to today. Business is better than ever. The two of us barely keep up, and it's time to think about moving to a larger house and hiring help. Why$25? Our success surprises many people. After all, they constantly tell us we can't make money selling a program for $25. We hear that all the time. In fact, we get tired of hearing it. We decided on $25 for a few good reasons. At the time, $25 seemed like a lot of money. (That was all we could have afforded if we were buying a network.) We had no money for advertising, so the name of the product had to grab attention. Finally, our goal was to sell to the majority who had two or three computers-not to the relatively few who were putting together large networks. Probably most important, though, people don't need a lot of convincing to spend $25. Also, we wanted our customers to feel like they got the buy of the year. We didn't just want their money-we wanted their word-of-mouth advertis- Goodbye BASIC, C, COBOL-hello PASCAL! Now, to make this most advanced language available to more micro users, we've cut our price-to an amazing 529.95! This astonishing price includes the complete JRT Pascal system on diskette and the comprehensive new user manual. Not a subset, it's a complete Pascal. Check the features. Separate compilation of external procedures • Auto-loading • 14 digit FLOATING POINT arithmetic • True dynamic storage • Verbal error messages • Fast one-step compiler: no link needed • Graphing procedures • Statistics procedures • ActiVity analyzer prints program use histogram • Operating system interface THIS IS THE SAME SYSTEM WE SOLD FOR 5295! So how can we make this offer?-why the unbelievable deal? Very simply, we think all software is overpriced. We want to build volume with the booming IBM market, and our overhead is low, so we're passing the savings on to you. • RIGHT-COMPLETE SATISFACTION GUARANTEED OR YOUR MONEY BACK! In addition, if you want to copy the diskette or looseleaf manual-so long as it's not for resale-it's o.k. with us. Pass it on to your friends! This is a Limited-Time-Offer. SO ACT TODAY-DON'T DELAY ENJOYING PASCALS ADVANTAGES-AT $29.95, THERE'S NO REASON TO WAIT! ria r···································r. To: JRT SYSTEMS P.O. Box 187 Enola, PA 17025 phone 717/732·1093 O.K. You've sold me. Send me JRT Pascal by return mail. I understand that if I'm not completely satisfied, I can return it within 30 days for a full refund. I need 0 51/4" disk or 0 31/2" disk. 0 Send me the JRT Pascal program formatter too, for only $14.95. Name _____________________ Address _________________ City State _ _ Zip _ _ AND AT NO RISK! o Check/M.D. 0 COD 0 Company P.O. [add $20] When you receive JRT Pascal, look it over, check it out. If you're not completely satisfied, return the system within PA residents add sales tax. Add $10 for shipping outside US/Canada. US funds on a US bank only. Needs only 30 days and your money will be refunded in full! THAT'S 192K and 1 floppy drive. L . . . - . - - - - - - - - - - - - - - - ....................................... I Reader Service Number 154 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 69 Letters continued from page 6 reformat) and it's like I have a new drive. I've not had a single read/write error in over six months and peTools can't find any sectors to balk about.· Sure, it took about 12 hours for SpinRite to do its stuff, but it beats having to reformat my hard disk every month and spend an hour or two feeding it disks. I've since used SpinRite on the Miniscribe cards in my other computers and have not had any problems with the drives afterwards. In your editorial you imply that the problems that have been reported seem to be limited to Seagate drives. Maybe you should pan the Seagates (as you usually do-that's why I bought Miniscribe) instead of SpinRite! Well, you wanted feedback. For me, SpinRite has been a lifesaver and I think that you've done both your readers and Gibson research a disservice by steering those of us with XT-type hard drives away from such an outstanding product. I feel bad writing such a critical letter; Micro C is the only magazine (computer or otherwise) that I read from cover to cover as soon as it arrives, and I recommend it most highly. But I think that you really goofed on this one.... Joel M. Goldberg RD#1 Box 230 Richmond, VT 05477 Editor's note: If you felt bad enough, you could bring over your lawn mower. Apparently the SpinRite folks thought 1'd trashed their product, too, and I feel bad about that. (I'll help you with the grass.) We've been chasing a problem with our BBS for the pastfew months; it's been going off into never never land fairly regularly. Larry noticed some sector errors on the little Microscience drive so he ran SpinRite on it. The system's been flawless since (and it's an XT). Plus, of course, 286 and 386 hard drive controllers don't have the homing problem (the problem really resides in the XT' 5 controller). I don't know; use SpinRite if you wish, we're using it. However, you might want to read the following letter before letting it change the interleave. SpinRite Questioned Noticed that you have taken a liking to SpinRite. I have a little nagging doubt about using that program, 70 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 though. Perhaps you can answer this for me. Assume I have a hard drive formatted at, say, 4:1 interleave. This hard drive has had some use over the years, and it has a few bad sectors that were not on the original bad track table. No real problem, though, because DOS's FORMAT command noticed it couldn't read those sectors and marked them (in the FATs) as unusable. Now I gets me a copy of SpinRite, and I sez to it, "Figger me out the best interleave and rebuild my drive." Off it goes on its merry way, and 10 and behold it finds out the best interleave for my system is really 5:1, not 4:1. It merrily reformats my drive by reading in a track at a time, then reformatting that track to 5:1, then writing back that same track of data. Here's the fun part. It gets to the bad spot. Reading in the track, it notices it cannot read sector 7 of this track correctly. It reformats the track and tries to write the data back again. The bad spot is no longer in sector 7! We just moved things around, and now the bad spot is in sector 12! If it writes this track back, it will be guilty of the major crime of putting good data on a nonreadable bad sector, as well as the minor one of leaving a now good sector marked bad. The safest way to reformat your hard drive out from under existing data would require skipping any track that had a bad cluster marked on it, determining the interleave for each track and if that track sprouts an error during for- matting, reformatting to the old interleave before writing the data back. Needless to say, this is time consuming and tedious and very, very slow going. 'Till I can get an answer to this problem, I'll just stick to the old tried and true approach of a complete backup (preferring my trusty Archive 60 Meg tape with Sysgen controller), then reformat the drive and restore the data. This not only gives me the proper interleave, but also has a side effect of making all my files contiguous for faster access. Other notes. Does SpinRite allow you to set the skew factor? This is a fixed offset in the interleave for each succeeding head, in case your controller or drive is slow in switching from head 2 to head 3. Skew factor can amount to about 5% of the throughput. Normal values of 0 or 1 usually are fine. Note, 0 gives you no skew. Another thing-can you reformat only part of the drive? I wrote a reformatter in C for IBM AT clones that does both of these. DOS can handle 2:1 MFM using a WA-2 controller, but Microport UNIX can only keep up with 3:1. I did not want to slow DOS down, and didn't want UNIX to run slow either, so I reformatted the back two-thirds of the disk to 3:1. Pretty slick, but not a project for the faint of heart. I do appreciate the magazine; it's the last known true hacker (in the old style of the word) magazine around. DDJ has gone commercial, BYTE has become a small Computer Shopper, and everybody else is just dying to know Bill Gates' latest breath. Micro C just keeps on cranking out interesting hardware and software for true hobbyists. John Welch 1310 Kenneth Circle .Elgin, IL 60120 Editor's note: Any answers for John? Anyone? As for Bill Gates, he's welcome to stop by the Micro C office anytime, especially if he has a lawn mower. Beware The Big Time I take keyboard in hand to write my first-ever letter to an editor. The motivation comes from reading "Around The Bend" in Issue #50, which makes me wonder if maybe you haven't finally gone (around the bend, that is). On one hand you make a good point about a marketeer's value to an enterprise and the need to find one's niche; on the other, you say you're ready for some heavy duty "focusing" and "significant playing" in the publishing biz. While "focusing" and "playing," you are going to keep Micro C as appealing as ever. Good luck. One of the things I find most enjoyable about your magazine is precisely its lack of focus. It is one of the few publications I read cover to cover because every article is different, and every article is interesting. While I'm not knowledgeable in the yins and yangs of magazine publishing, I can't help but think that being a bimonthly and operating away (a long way 'away) from the "media centers" contributes mightily to this. Good gravy, ask for a partner of the type you des(:ribed and you're liable to get ZiffDavis. I can see it now: "Tidbits" by John Dvorak. You started from scratch, you've attained a loyal following, and maybe now it's time to cash in and head for the mountain (I thought you were already there). I don't have any arguments with that; but I'd rather see you take your gains and pack it in than let Micro C become another PC Magazine. While I'm spilling my guts, let me put in a plug for Bob Morein and more articles on UNIX for 386-based PCs (as opposed to dedicated work stations). I'd like to know more about the hardware requirements to run UNIX efficiently and reliably on a personal computer. Also: will UNIX ever have a standard? If so, which of the current crop is the best bet? Will UNIX ever get a Maclike interface? Just how portable is UNIX across different CPUs? I don't remember when I first subscribed to your magazine; however, I do recall that I was still using a Kaypro 2. Since I recently re-upped for 18 more issues, I feel I have the right, indeed an obligation, to make my views known on the proposed shift to the "big time." P.S. I think you've already found your niche. C. R. Bartchy 4340 South Hopkins Ave. Suite 230 Titusville, FL 32780 Editor's note: Thanks c.R. However, I think it's time for Micro C to reach out, and I think it can be done without losing Mi,cro C's style. SMUG Lives! I read with interest your discussion of "The End of User Groups" in your editorial of Issue #47. I would like to make the following points. (1) The Sacramento Microcomputer Users' Group (SMUG) still exists and is healthy in spite of reduced membership. (2) SMUG meetings have presentations and discussions involving presently popular computers, including IBM PCs (and clones), Apple II GSs, Atari STs, and Amigas. Your article stated that SMUG was going out of business because "it stayed with CP 1M, S100, and other (more and more) unique systems." That is not accurate. SMUG supports a wide variety of popular microcomputers. (3) SMUG's members consist of people whose interests lie in the more technical aspects of computer hardware and software. They tend to have an interest in "what goes on under the hood" and why. Frankly, SMUG members are the audience that Micro Cornucopia targets. I enjoy reading your publication. Glad to see that you are reading ours! Don Del Porto SMUG President P.O. Box 161513 Sacramento, CA 95816 ••• Organize, Query, & Make Connections Between Files of Information MICRO EINSTEIN The Expert System Shell • Create expert systems easily in minutes • With pulldown menus and windows • Automatic rule generator • Context-sensitive help • Free example expert systems • Interactive full-screen text editor • DOS access from shell • Turbo fast execution (NOW 5 times faster!) For Diagnosing ... Monitoring ... Indexing ... Organizing .. . Classifying .. . & Discovering links between files of information. ONLY $99.95! ACQUIRED INTELLIGENCE p,O, BOX 2091 • DAVIS, CA 95617 • (916) 753-0360 Reader Service Number 72 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 71 Continuing AROUND THE BEND "It must have been your significant other, but as long as I've got you on the phone .... " "Look, I didn't request any information. My significant other didn't request any information, and I'm certainly not interested in connecting up with a dishonest futures trader." (After watching the papers, I'd suspect that adding "dishonest" was redundant.) It turns out I'm not interested in futures, at least not the kind that cause grown men to stand in pits shouting and waving their hands. (All the while hoping the guy on their elbow doesn't work for the government.) This is just one of a plethora of sales calls I've received in the past month. Stock and bond brokers every other day, all trying their best to sneak past Nancy. "Dave, someone on the phone says he's calling about your new business card. I don't think it's legit." It wasn't. He was a stock broker. Folks selling penny stocks (stocks in the 10¢ to $5 range, not traded in a major exchange) have been particularly active. I bit once, lost most of $1,500 on Environsure, a waste processing company that apparently was dumping, not processing. I purchased the stock because the Blinder Robinson salesman told me the stock was moving up rapidly. Curiously, its direction changed a few days after I bought it. Program FASTER with ••• CC-RIDER THE C PROGRAMMER'S COMPANION PROFESSIONAL EDITION CROSS-REF Editing! Function Prototypes! QulckHelp, too! Instantly recall your C symbol definkions by hkting a hot-key inside your edkorl Along wkh standard CCRIDER features like Source View, Edh and Definhion Paste, the new Professional Edition has a Symbol Browse mode and even lets you walk through all usages of a symbol. k's on-line cross-referencing asyoueditl Build a database of useful information for your C code whh CCSYM, a powerful source code analyzer which can generate fully commented function prototype #include files for your program's static and global function definhions. Imaginel - No more manual maintenance of function declarations and you know they are consistent! ee CCSYM can also create a help database for your program which is compatible whh Microsoft's help system, QuickHefp. All symbols in your application are accessible from QuickHelp's menus, together with documentation extracted automatically from your original source code. Reader Service Number 169 72 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 l I }) Then I read in The Wall Street Journal that penny stockbrokers (including Blinder) often purchase large blocks of shares and then push the shares at a big profit. Once the push is over, the price nearly always falls into a hole. In this case, not only did the push end, but the government started criminal action. After all that, the Blinder salesman asked if I'd like to move into something a little more solid-part of a race horse. (I didn't ask which part, but I figured he was trying to saddle me with yet another slow mover.) This experience made me really appreciate The Wall Street Journal. The Journal not only gives me the latest on financial scams (I read about diamond, platinum, and oil drilling rights scams just days before the calls started), but it also covers computer companies. In fact, it often covers things untouched by the computer journals. For instance, there's Miniscribe. Miniscribe has a reputation for solid drives, but I didn't realize just how solid until I read the Journal's piece on the company. Miniscribe was apparently shipping bricks (solid new bricks) instead of drives to make it appear that sales were growing. I can imagine some dumb dealers, serious anti-technical types, but it's hard to believe they were fooled. Plus, I'm sure dealer training firms were quick to add the appropriate classes: "This is a hard drive-this is a brick." "This is a hard drive-this is a brick." "You don't slop mortar on a hard drive." "You don't install a brick in a Mac." Usually. The $25 Network We were well into SOG East (great SOG, by the way). Don Jindra had cabled up three computers and started his presentation on networks (mostly his network). It was early afternoon so the the previous night's Jolt SIG had nearly worn off. Like his presentation at the BC SOG, the group response began with the usual, "Bet it can't...," passed through, "Wow, really?" and finally settled into an easy banter. "What if you were on system one and the guy on system two started harassing you? Could you do something nasty?" That brought the few still-fuzzy heads off the table. "Could you lock up his keyboard?" "How about really slowing down his system with something disk intensive?" "Format his hard drive?" "Yeah, how about formatting his hard drive?" "Nope, you couldn't run FORMAT on system one and have it format a drive on system two," Don broke in. "DOS won't let you do that. You'd have to be running FORMAT on system two. However, my next version will not only let you communicate with the operators of the other machines, it'll also let you take control of those machines and run programs on them just as though you were sitting in front of them." "The ultimate multitasking?" "Right." "That includes FORMAT?" "Yep." "If operator two were distracted for a second?" "Uhmmmm." "We're all weird. You know that." With networks the latest rage, I'm constantly asked by local people what kind of system we use. I used to tell them, "We don't have a network." Now I tell them, "Oh sure, we run the $25 network." I like it, too. I can network any two systems in the office just by connecting them together via serial cable and booting them both off the floppies I set up with the network and DOS. At 115K baud it's not as fast as ARCNET, but it's a lot cheaper. I just built an AT to replace the XT we've used for receipts and labels. Counting everything, it was about 10 megs of program and data. In five minutes, I had the two systems cabled together, had booted them up on the network disks, and voila: drive C on the XT became drive F on the AT. I simply used COpy *.* to move all the files from F to C and that was it. I'll leave the two connected and once a week back up the AT's files to the XT. Not bad. Cards In Magazines I was speaking to the PC SIG in Dallas when the question came up. Why do magazines contain so many cards, the ones that fall out everywhere. Actually, we don't have loose cards in Micro C, but there's a If you thought Borland's popup product was great just wait untn you see OpalFire's MyFLIN for Pascal. MyFLIN is a TSR program that captures procedure and function details directly from the screen while you are programming. It saves this information in an indexed database for instant recall at any time you need it. MyFLIN will save you hours of searching thru pieces of paper looking for parameter details when calling a procedure. Simply type part or all of the name and press the hotkey. MyFLIN will popup over your source code and display the nearest named description you have stored in your database, complete with parameters and comments. To save a new description, positon the cursor on the procedure name, popup MyFLIN and press "A" to add. The details will be captured from the screen and saved with a single keystroke and you can add a comment line as well. Price $69.00 + $5.00 P&POSt. Visa / Mastercard / American Express are accepted. 32~lfo~!£!t~~tr~~o~~~E~A1~~057 Phone 1-800-336-6644 MyFLIN requires PC/XT/AT Computer and MS-/pC - DOS 2/3.xx. Reader Service Number 161 Mandelbrot Explorer 3.2 Fantastic fractal grapnlcs on 16-color EGAjVGA to 800x600. Magnifies up to 16.5 trillion times. Stop and start at will, save and retrieve, collage, full control over color boundaries, ''zoom box, " display ofperiodic orbits, auto-backup, all optimizations for speed including pixel interpolation and 386 integer SUpp01t. Comes with seven ready-made pictures for immediate gratification. $34.95 Peter Garrison 1613 Altivo Way Los Angeles, CA 90026 2136651397 When ordering please specify EGAfVGA and disk format Overseas orders please add $4 Reader Service Number 112 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 73 MICRO CORNUCOPIA XT SCHEMATIC very good (but little known) reason other magazines do. No, it's not an overabundance of trees, it's an underabundance of postal workers. You see, for many years the postal service was losing mailmen. Yep, they'd find a good man, train him for a month on his new route, send him forth alone, and never see him again. At last you can plumb the mysteries of your computer with this single sheet schematic of the IBM Xl's main board. A wealth of Informaffon for both True Blue and clone owners. Although clones use sllghtiy altered board layouts and different chip location names, they're close enough to the original for this schematic to be very useful. As an example - you have a dead clone. UI sucker won't even beep. A look at the schematic shows the location of parallel port A. You know that the power-on self test loads a checkpoint number Into port A before each test. So now all you have to do Is read port A with a logic probe to see how far the system went before It puked. We Include these checkpoints and other trouble shooting Information with the schemaTIC. IBM PC-XT Schematic .....................................$15.00 CP/M KAYPRO SCHEMATICS Of course, we still provide a complete schematic of the processor board In your CP/M Kaypro. It's logically laid out on a single 24" by 36" sheet and comes complete with an Illustrated theory of operaTIon that's keyed to the schematic. You get detailed InformaTIon available nowhere else. Kaypro II & IV (pre-84) ...................................$20.00 Kaypro 10 (without modem) ..........................$20.00 Kaypro 2, 4, and 10 (84 series) ...................... $20.00 NOTE: These packages cover only the main boards. You're on your own when It comes to disk drives, power supplies, vld~o cards, etc. Phone Orders: (S03) 382-5060 or 1-800-888-8087 Monday-Friday, 9AM-SPM PST Micro Cornucopia, P.O. Box 223, Bend, Oregon 97709 74 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 For a while they suspected pit bulls or UPS drivers, but it turned out their new charges were simply getting lost. So magazine publishers got together and came up with the idea of inserting loose cards. Within a month, every mail route had become a trail of cards. (Hansel and Gretel should have carried magazines into the woods rather than bread.) The post office was happy, the publishers were happy, and now that you know why the cards are there, you can be happy, too. (Now if we could just keep those vicious little Boy Scouts from going out on litter patrols .... ) 286, 386, 386SX, 486 There's been a bit of controversy about chip choices. Over the past year, we've bought four 12 MHz 286 machines. After the 8 MHz 186s and the 6 MHz AT, they've been wonderful. With Intel getting $300 a piece for 386s, there didn't seem much reason to purchase anything beyond the 286. Now, however, there might be a few reasons. • Intel's dropped the price of the 386 and the 386SX. • We're beginning to hear about some interesting applications that take advantage of the 386. There's windows RABBIT CHICONY GAS PLASMA PORTABLE McTEK LAP-TOP EGA PORTABLE *LCD PORTABLE ALSO AVAILABLE • 80286-16 CPU (O WAIT STATE) • 80286-12 CPU • 640K MEMORY, EXPANDABLE TO 4MB • • • • • NEAT, TURBO PAGE MODE SPEED UP TO 21.4 MHZ • • • • DUAL SPEED 6/12 MHZ, 0 WAIT STATE ·1MB ON BOARD, EXPANDABLE TO LANDMARK 16 MHZ 5MB (EMS V 4.0) 5 SLOTS, EXTERNAL 5V4" 25 PIN DRIVE PORT • CGNMDA/EGA, 640x400, 4 GRAY CGA/MGA/EGA 64Ox400, 4 GRAY SCALE LARGE GAS PLASMA DISPLAY ·101-KEY ENHANCED KEYBOARD • GAS PLASMA DISPLAY • 1 PARALLEL, 1 SERIAL • 200WT AC 110/220 AUTOSWITCHABLE • EGNMGA MONITOR PORT 9 PIN • HARD DISK/FLOPPY DISK CONTROLLER • 1.2MB FLOPPY AND 40MB HARD DISK • 1.44MB FLOPPY DRIVE AND 20MG HARD DISK 40MS • ONE YEAR WARRANTY • "84 + FN" ENHANCED KEYBOARD • 1P/2S (D-9 and 0-25), REAL TIME CLOCK • 1OOW, AC 110/220V SWITCHABLE • 14.8" x 13.4" x 3.7", 15.4 LBS. • CARRYING BAG w/SHOULDER STRAP • ONE 1.2MB FLOPPY DRIVE • ONE 20MB HARD DISK (40MB) • TRUE OS/2, XENIX, MS DOS AND NOVELL COMPATIBLE • 80287 MATH CO-PROCESSOR SOCKET • ENHANCED 101 KEYBOARD wlTACTILE FEELING • 2 SERIAL PORTS, 1 PARALLEL PORT AND 1 GAME ............................. $3400 • 9.45"x16"x8.27" 19.8 LB. 286-12 CPU, LANDMARK = 16MHZ 640K DRAM (EXPANDABLE TO 4MB) 0 WAIT STATE, DUAL SPEED 6/12 MHZ DUAL FLOPPY AND HARD DISK CONTROLLER (1=1 INTERLEAVE) • LED INDICATORS • 200W UL POWER SUPPLY • ONE YEAR WARRANTY • CARRYING BAG w/SHOULDER STRAP • ONE YEAR LIMITED WARRANTY ....................... $2299 GAS PLASMA ............. $2199 LCD PORTABLE .......... $1729 McTEK 286/12MHZ McTEK 386/165X McTEK 386-20MHZ Assembled & Tested IBM® AT Compatible MS-DOS® OS/2® Compatible 80286 12/6 MHz Phoenix BIOS 640K of RAM Expandable to 4MB o Wait State 200W Power Supply 1.2MB Floppy Drive Ports: 1 Serial, 1 Parallel, 1 Game Dual Floppy/Dual H.D. Controller Monochrome Graphic Card 101 Key Enhanced Keyboard TTL Monitor 12" 20MB Hard Disk (40MS) Assembled &Tested IBM® AT Compatible MS-DOS® OS/2® & UNIX® Compatible 80386 16/8 MHz Norton V4.0 SI 17.6 Phoenix BIOS 1MB expandable to 16MB RAM 80387 Coprocessor Socket 200W Power Supply 1.2MB Floppy Drive Parts: 1 Serial, 1 Parallel, 1 Game Dual Floppy/Dual H. D. Controller Monochrome Graphic Card 101 Key Enhanced Keyboard TTL Monitor 12" 20MB Hard Disk (40MS) Assembled &Tested IBM® ATCompatible MS-DOS® OS/2® & UNIX® Compatible 8038620/8 MHz Norton V4.0 SI 22 Phoenix BIOS 1MB expandable to 16MB RAM 80387 Coprocessor Socket 220W Power Supply 1.2MB Floppy Drive Ports: 2 Serial, 1 Parallel, 1 Game Dual Floppy/Dual H.D. Controller Monochrome Graphic Card 101 Key Enhanced Keyboard TTL Monitor 12" 40MB Hard Disk (28MS) Options:. ................................ Call Options:. .............................. Call Options:. .............................. Call $1,199 00 $1,495 00 $1,995 00 DISK DRIVES PRINTERS MONITORS PC/XT PC/AT MISC. Fujitsu 360k ..................... $69 Fujitsu 1.2MB .................. $89 Teac ................................. $75 Teac 1.2MB ..................... $89 Teac 3'12' 1.4MB .............. $89 20MB Hard Disk Kit... ... $279 30MB Hard Disk Kit... ... $309 KL320 (40MS) ............... $215 8425 Miniscribe ............. $249 8438 30MB Miniscribe $259 3650 40MB Miniscribe $349 3675 60MB Miniscribe $379 ST-157 49MB 3'12· ......... $479 Citizen CD 120 .............. $149 Citizen CD 180 .............. $189 HPLASAR SeriaI2 ....... $1699 Epson LX-800 ............... $219 Epson LO-5oo ............... $379 Toshiba 321 XL ............. $519 NEC P20OO .................... $369 Call for prices of other brands MODEMS Samsung amber ............. $79 Samsung EGA color ..... $359 Samsung RGB color ..... $259 NEC Multisync .............. $559 Sony Multiscan ............. $619 HGC-compat.mono card. $49 Color graphic card ... .... $49 EGA Paradise 480 ......... $149 VGA Paradise ................ $279 Genoa Super VGA ........ $299 McTek 286-20MHz ..... '" $359 McTek 286-12 ................ $259 McTek 386-16SX ........... $429 McTek 386-2DMHz ........ $699 McTek 386-24MHz ........ $899 Locking slide case .......... $59 200W power supply ........ $65 Enhanced keyboard ....... $59 WD FD/HDC ............... $129 DTC FOC/HDC 1:1 ....... $189 3MB EMS (CJK) ................ $99 300/1200 .......................... $79 2400 external ................. $139 2400 internal ................... $99 Kingtech CRT Portable Kits: XT/AT (powersupply. case keyboard. monitor) ..........................$3801$410 Eprom burner 4-socket$139 LCD Portable ................ $799 Plasma Portable Kits " $1499 AC power strips ............. $15 Diskette file box ................ $9 Printer or serial cable ....... $8 Archive Tape Backup 40MB ......................... $339 Logimouse C7 ................. $69 Logimouse H1 Res .......... $99 640k TurboMothrbrd ....... $80 10MHz TurboMothrbrd ... $85 Multi 1/0 w/disk contrir ... $59 640k RAM card ............... $39 2MB Expansion card ...... $89 RS232 2-port card .......... $35 4-serial port card ............ $79 Game 1/0 card ................ $15 384k Multifunction card ... $69 FCC-app. slide XTcase ... $29 150W power supply ........ $49 XT keyboard ................... $42 Clock Card ...................... $19 Floppy Controller ........... $19 MOUSE DESKTOP XT 10MHz 640k 2 Drive System .............. $759 McTek Systems, Inc. ·1521 San Pablo Avenue • Berkeley, CA 94702 • 415-525-5129 Reader Service Number 42 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 75 386, OS/2 (forget PM), and Nu-Mega's SoftIce (I've heard wonderful things about it from C developers). • An Intel marketing type did. a presentation at the Longhorn SaG. Fortunately he had been a technical type in a previous life and he knew the 486. He said that as far as architecture is concerned, there's no real difference between the 386 and the 486. So, unlike the jump from 286 to 386, the 386 will do everything the 486 can do. That doesn't mean there's no reason to buy a 486. The 486 will run instructions in half the clocks· (an average of 2) per instruction. Plus the 486 is supposed to be out the chute at 33 MHz with 40 MHz and 50 MHz parts very soon now. (His words, not mine.) The initial production will run about $1,000 per. part with prices scheduled to settle into the $300 range by fall 1990. That sounds high, but it includes an on-board 387 (487?). Float times will improve drastically because the ALU won't have to go through all the motions of waking up an external chip, giving it control, and waiting for notification that the arithmetic's finished. Also, there's 8K of on-board cache and transfers from cache to the ALU happen in 128-bit chunks. Interesting. Now the 386SX (sounds like it should have a V6 and fuel injection) is a bit controversial. Some folks think it's a 386 that Intel crippled to make it easy for manufacturers (IBM) to sell their 286 boards as 386 machines. That's· probably true; but if you need the 386 architecture and can live with a 286.bus, it's probably not a bad way to go. Anyway, with 386 and 386SX prices way down and with the 386's ability to watch itself run (necessary for the ICE and serious multi-anything), plus its ability to create memory segments of any size (it can view all your RAM as one large segment), I'd think twice before purchasing another 286. On the other hand, those little baby AT boards are so cheap and those tiny tower cabinets so cute, they make tempting replacements' for 7 MHz XT "turbo" boards. I've heard that most of the baby AT cards will accept all the original XT plugin cards, including the hard drive controllers. (Ask your dealer to try it before he says it won't work.) 68000 SINGLE BOARD COMPUTER Of course, if the issue is still available, you'll probably want to get the original version directly from Micro C. See the back issues list on page 94 for more information. • 512/1024K DRAM • FLOPPY DISK CONTROLLER • 4 RS-232 SERIAL PORTS • REAL TIME CLOCK NEW LOWER PRICES! BASIC KIT (8M HZ) - BOARD, MICROPROCESSOR, HUMBUG MONITOR! BASIC IN ROM, 4K SRAM, 2 SERIAL PORTS $200 PACKAGE DEAL - COMPLETE KIT WITH 10MHZ MICROPROCESSOR, , SK*DOS OPERATING SYSTEM, 512K DRAM $499 SYSTEM BOARD (12MHZ) - ASSEMBLEDITESTED, 1MEG RAM, 6 PC/XT PERIPHERAL PORTS, SK*DOS $699 COMPLETE INFORMATION AVAILABLE UPON REQUEST PERIPHERAL TECHNOLOGY 1710 CUMBERLAND POINT DR., #8 MARIETTA, GA 30067 404/984-0742 COD/MASTER CARDNISNCHECK SK*DOS IS A TRADEMARK OF STAR-K SOFTWARE SYSTEMS CORP. Reader Service Number 119 76 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 Attention Spies There's no longer a reason to dig out your stock of master keys ... no need to sneak into the Micro C office at midnight. We're now available on microfilm. This is not part of a plot but rather a way to make Micro C available to ants, amoeba, gnats, and squinty-eyed librarians. If you want to order a reprint or just an article from an issue that's out of print, you can contact: University Microfilms International 300 North Zeeb Ro'ad Ann Arbor, MI 48106-1346 (313) 761-4700 Transparent' ROMs About half way through the Embedded Systems article in this issue, I realized I was: 1. Very interested in the C-Thru-ROM package, and 2. Very hungry (it being halfway through my lunch hour). Knowing I could either: 1. Call Datalight immediately, meant missing lunch, or 2. Grab a byte of lunch and then call Datalight. I called Datalight on a full stomach. That was fortunate, because I had some zingy questions: "Is it all that easy?" "As easy as what?" "Does it only work with Microsoft C 5.x?" "No." It turns out that C-Thru-ROM 1.50 also works, in a limited fashion, with Turbo C 2.0. By early January they're supposed to have a new release that does everything with Turbo C. Then Datalight sent me the package. Unfortunately, their sample program (SIEVE.x) didn't work because they hadn't included the right .MAP file. Did we have Microsoft C? A quick perusal showed the cupboard was nearly bare. No Microsoft C, but some extended scrounging turned up Quick C (probably too quick) and Turbo 2.0. Ah hal So I recompiled, linked, and MAPped with Turbo. Doing all the usual new-package fumbling, it worked. I connected my laptop to my AT via a. serial cable, ran their little kernel routine on the laptop (so it pretends it has a kernel ROM plugged in), and fired up Datalight's remote debugger. Wow, the debugger downloaded SIEVE to the laptop via the serial connection and then let me single step through the program, either in C or in assembly. I could even watch the variables .... Oops. Unfortunately, it didn't understand most of the variables. Oh yeah, this version only understands Turbo's globals; next version adds the locals and statics. Ah well, I went back to the source and made all the variables global. Wow, the AT's screen displayed the contents of C variables as the laptop ran one line at a time. This isn't a particularly fast environment (the serial link between the two systems is one reason), so they suggest you break up large routines for debugging. But a wonderful environment? Yeah. Seriously. Datalight C-Thru-ROM $495 17505 68th Ave. N.E., Suite 304 Bothell, WA 98011 (206) 486-8086 This Issue Is Listing Boy, are we on somebody's list this issue. Gary threw in 9K of Turbo Pascal with Tidbits. Bruce Eckel's voice contained 16K of C. Russ Eberhart and Roy Dobbins couldn't neural network without 18K of C. We bit our lips and made room. Then, not to be outdone, Scott Ladd sent in 26K with his C column and Greg Landheim is our champion with 34K of 3-D. Between Scott and Greg, that's 18 pages of C, space for at least four (unlisted) articles. All right, already. If you authors can't be a little briefer, (you know about "little briefers," right?) then you'll be relegated to the BBS and the issue disk(s). Starting right now. (Great Scott! What'll Mr. Ladd say?) So, to get Scott and Greg's code (along with the printed code), you'll just have to: 1. Download ISSUE-5l.ARC from the Micro C BBS. (503) 382-7643. (300-1200-2400, 8,1,N, 24 hours) 2. Send $6 ($8 foreign) to Micro C, P.O. Box 223, Bend OR 97709, or call (800) 888-8087 (Visa/Mastercard) and ask for the Issue 51 disk. Our issue disks contain all the code, printed or not. Price includes postage. (Sometimes an issue disk is as many as three disks, but it's still only $6). David Thompson, Editor and Publisher PROMPT DELIVERY!!! ICs SAME DAY SHIPPING (USUALLY) QUANTITY ONE PRICES SHOWN for OCT. 29, 1989 DYNAMIC RAM YOU WANT THE SQURCE1! VELL NOV YOU CAN HAVE IT! The IIASTEItFDL iiiSiSSDlBLER. (1ID86) will create HASH coapatible source code from program files (EXE or COH). And the files are labeled and coaaented so they become USEABLE. HD86 is an interactive disassembler with an easy to use,. word processor like interface (this is crucial for the REAL programs you want to disassemble). Vith its built-in help screens you won"'t have to constantly refer to ~ the aanual either (although there are valuable diSCUS-~ . sions on the ins and outs of disassembling which you won"'t want to miss). '] f=; ~ c:..w ..... rel· HD86 is a professionally supported product and yet costs no more than "shareware". And of course, it"'s not copy protected: YElSIOH 2 IOU AVAILABLEI IID86 Y2 is anY $67.50 ($1.50 sn) + tax C.C. Software, 1907 Alvarado Ave., Walnut Creek, CA 94596, (415) 939·8153 Reader Service Number 31 ~',,~ qt?l\'b~ qt?l'};'D ,.,f8 ~~\~e ,,~'O ~\:. = 0 THEN (* single RR rotation *) BEGIN TYPE dataPtr = "dataType; dataType array [1 .. 32767) of CHAR; p".rlink := pl".llink; pl".llink := p; = treePtr = "treeNode; treeNode = RECORD IF bl =0 THEN BEGIN p".bf := 1; data, key : dataPtr; dataLen, keyLen : WORD; llink, rlink : treePtr; pl".bf := -1; h := FALSE END bf : SHORTINT ELSE BEGIN END; p".bf := 0; pl".bf .- 0 END; PROCEDURE GenAvlTrlns(k, d: dataPtr; keyLen, dataLen: WORD; VAR p : treePtr; VAR h : BOOLEAN) ; PROCEDURE GenAvlTrDel(k: dataPtr; VAR p: treePtr; P := pl END ELSE BEGIN VAR h : BOOLEAN); p2 := pl".llink; PROCEDURE GenAvlTrDis(root: treePtr;tab: INTEGER); b2 := p2" .bf; PROCEDURE GenAvlTrRetDelSmRec(VAR p: treePtr; VAR key, data: dataPtr; pl".llink := p2".rlink; p2".rlink := pl; VAR keyLen, dataLen:WORD;VAR h:BOOLEAN); p".rlink := p".llink; p2".11ink := p; IMPLEMENTATION CONST tabinc VAR IF b2 =1 THEN p".bf .- -1 ELSE = 3; boo: BOOLEAN; p".bf .- 0; IF b2 -1 THEN = FUNCTION CompArr(VAR arrl, arr2: dataType; p".bf .- 1 ELSE len: WORD) : INTEGER; VAR k : WORD; p".bf := 0; BEGIN k := 1; p := p2; p2".bf := 0 = CompArr : 0; WHILE k < len DO BEGIN IF arrl[k) < arr2[k) THEN BEGIN CompArr := -1; k := len + 1 END ELSE IF arrl[k) > arr2[k) THEN BEGIN CompArr : 1; = k .- len + 1 END ELSE Inc(k); END END; END END END; (* BalLeft *) PROCEDURE BalR!ght(VAR p:treePtr; VAR h: BOOLEAN); VAR pl, p2 treePtr; bl, b2 BEGIN SHORTINT; IF p".bf 1 THEN p".bf := 0 = ELSE IF p".bf 0 THEN BEGIN p".bf := -1; h := FALSE END ELSE BEGIN PROCEDURE BalLeft(VAR p: treePtr; VAR h: BOOLEAN); pl : = p". llink; VAR pl, p2 bl, b2 bl := pl" .bf; treePtr; SHORTINT; BEGIN IF p".bf -1 THEN p".bf := 0 IF bl <= 0 THEN (* single LL rotation *) BEGIN p".llink := pl".rlink; pl".rlink := p; MICRO CORNUCOPIA, #51, Jan-Feb, 1990 79 IF b1 = 0 THEN BEGIN ELSE IF p". bf p".bf :=- 1; p1".bf ;= 1; h := FALSE END ELSE BEGIN THEN ELSE IF p".bf = -l-THEN BEGIN p1 := p" .llinki IF p1".bf = -1 THEN(*single LL rot*) BEGIN p".llink := p1".rlink; p1".rlink:= Pi p" .bf := Oi p := p1 END ELSE (* double LR rotation *) BEGIN p".bf := 0; p1".bf .- 0 END; p := p1 END ELSE BEGIN p2 := p1".rlink; b2 := p2" .bf; p1".rlink := p2".11ink; p2".11ink := p1; p".llink := p".rlinki p2 := p1".rlinki p1".rlink := p2".11inki p2".11ink := p1i p".llink := p2".rlinki p2".rlink := Pi IF b2 = -1 THEN p".bf .- 1 ELSE p2".rlink := Pi IF p2".bf = -1 THEN p".bf := 1 ELSE p" .bf := Oi IF b2 = 1 THEN p" .bf .- -1 ELSE p" .bf := Oi IF p2".bf = 1 THEN p1".bf := -1 ELSE p".bf := Oi p := p2i p2" .bf .- 0 END END i o p" .bf := -1 p1".bf := Oi p := p2 ENDi p".bf := Oi h := false END END (* BalRight *) END PROCEDURE GenAvlTrIns(k, d: dataPtri keyLen, dataLen: WORDi P : treePtri VAR p1, p2 : treePtri BEGIN VAR VAR h :BOOLEAN) i IF P = NIL THEN (* insert *) BEGIN GetMem(p, SizeOf(treeNode»i h := TRUEi p".data := di p".key := ki p".dataLen := dataLeni p".keyLen := keyLeni p".llink := NIL; p".rlink .- NILi p".bf := 0 END ELSE IF CompArr(p".key", k", p".keyLen) = 1 THEN BEGIN GenAvlTrIns(k,d,keyLen,dataLen,p".llink,h)i IF hTHEN (* left branch has grown *) BEGIN IF p".bf = 1 TH~N BEGIN p" .bf := Oi h .- FALSE END 80 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 END ELSE IF CompArr(p".key", k", p".keyLen)<=O THEN BEGIN GenAvlTrIns(k,d,keyLen,dataLen,p".rlink,h)i IF h THEN (* right branch has grown *) BEGIN IF p".bf = -1 THEN BEGIN p".bf := Oi h .- FALSE END ELSE IF p".bf o THEN p".bf := 1 ELSE IF p".bf = 1 THEN BEGIN p1 := p". rlinki IF p1".bf = 1 THEN (*single RR rot*) BEGIN p".rlink := p1".11inki p1".11ink := Pi p" .bf := Oi p .- p1 END ELSE (* double RL rotation *) BEGIN p2 := p1".11inki p1".11ink := p2".rlinki p2".rlink := p1i := p~.rlink p2~.11ink; p2~.11ink := p; IF = 1 THEN p2~.bf h := TRUE END ELSE BEGIN ELSE IF h THEN BalLeft(p, h) p~.bf IF := 0; p2~.bf p1~.bf END; = -1 THEN FreeMem(q~.data, (* { resp. of calling program } *) FreeMem(q~.key, p1~.bf q~.dataLen); := 1 ELSE := 0; q~.keyLen); FreeMem(q, SizeOf(treeNode»; END p := p2 END; p~.bf h); del(q~.llink, .bf .- -1 p~ END; (* GenAvlTrDel *) := 0; PROCEDURE GenAvlTrDis(root: treePtr;tab: INTEGER); h .- false END VAR space, k : INTEGER; END BEGIN IF root <> NIL THEN BEGIN END END (* GenAvlTrlns *); IF root~.rlink <> NIL THEN BEGIN GenAvlTrDis(root~.rlink,tab PROCEDURE GenAvlTrDel(k :dataptr; VAR p: treePtr; + tabinc) END; VAR h : BOOLEAN); FOR space := 1 to tab DO VAR q : treePtr; write (' '); FOR k := 1 to 6 DO PROCEDURE del(VAR r treePtr; VAR h write(root~.data~[k]); BOOLEAN) ; writeln(' BEGIN IF <> NIL THEN BEGIN r~.rlink IF h); del(r~.rlink, , ,root~.bf); root~.llink <> NIL THEN BEGIN GenAvlTrDis(root~.llink,tab IF h THEN BalRight(r, h) END + tabinc) END END (* root # nil *) ELSE BEGIN ELSE q := r; r writeln (' Nil' ) r~.llink; .- END (* GenAvlTrDis *); h := TRUE END END; PROCEDURE GenAvlTrRetDelSmRec(VAR p :treePtr; (* del *) VAR key, data :dataPtr; VAR keyLen, dataLen:WORD;VAR h:BooLEAN); BEGIN treePtr; VAR q IF P = NIL THEN (* key not in tree *) ELSE IF CompArr(p~.key~, k~, p~.keyLen) BEGIN 1 THEN BEGIN q := p; WHILE GenAvlTrDel(k, p~.llink, p~.llink P h); IF h THEN BalLeft(p, h) := data := CompArr(p~.key~, k~, p~.keyLen)=-l BEGIN THEN p~.rlink, h); IF h THEN BalRight(p, h) END p~.data; dataLen := key := GenAvlTrDel(k, <> NIL DO BEGIN .llink END; END ELSE IF p~ p~.dataLen; p~.key; keyLen := p~.keyLen; p := q; GenAvlTrDel(key, p, h); ELSE (* delete p~ *) END; (* GenAvlTrDel *) BEGIN q := p; IF BEGIN q~.rlink P := h = NIL THEN BEGIN q~.llink; := TRUE ••• END ELSE IF P := END. q~.llink = NIL THEN BEGIN q~.rlink; MICRO CORNUCOPIA, #51, Jan-Feb, 1990 81 Victim Of Success Anthony Barcellos p.o. Box 2249 Davis, CA 95617-2249 Voice: (916) 756-4866 Data: (916) 758-1002 It's always great when someone betters himself, especially when he starts out in academics. In this, his last column, Tony tackles text and graphics, appropriate tools for his next life. long, everyone. This is my 15th-and final-shareware column for Micro C. A lot of user-supported software has streamed through this column during the past 21;2 years, and there's no end in sight. I have only sampled the flood. Although there remain so many attractive packages to examine, I must redirect my efforts toward other interests. My arrival in the pages of Micro Cornucopia coincided with my appointment to the mathematics faculty of American River College in Sacramento. While I was delighted by this long-sought opportunity to teach full-time, I couldn't anticipate all the repercussions-all of them, so far, good. While a California civil servant, I was fairly successful as a freelance mathematical writer. My articles. on Mandelbrot's fractal geometry won a couple of awards and my interview of Benoit Mandelbrot was published in Mathematical People. (Yes, I now admit that I have long been smitten with fractals-just like everyone else at Micro C.) My stock as a writer, however, has risen enormously since I returned to academia. It helps that American River College already has several successful authors on its faculty, so perhaps I'm gilt by association. During the past summer, I was courted by several publishers looking for textbooks. Over the next two years my name will appear on texts and supplements for algebra, trigonometry, and calculus courses. It will be a lot of work, but I'm looking forward to it. In the meantime, I have to reorder my priorities. I've submitted my resignation as software librarian to the Sacramento PC Users Group. I have also decided to withdraw from this column, much as I regret doing so. I hope to retain the editorship of Sacra Blue, which in S O 82 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 the future will be my only significant commitment to users group activities. Parting Glances There are a few loose ends that I would like to tie up as I depart. I've long been intrigued by desktop publishing and sophisticated tools like Adobe's PostScript. Under pressure from Microsoft and Apple, Adobe has decided that they have to give up their secrets and make PostScript an open standard. PostScript's power has attracted many users despite its high costs. Recent developments may make PostScript more available than ever before (in either the Adobe version or as clones from competitors). HortIdeas Publishing latched on to PostScript early in the game, putting out a shareware drawing program that generates PostScript files. One attraction of PictureThis is its low cost-only $50. But as a PostScriptbased application, its attractions are many. Besides being compatible with every desktop publishing program and high-end word processor that works with PostScript printers, PictureThis enjoys PostScript's immunity from the "jaggies." Recall that PostScript incorporates a scaling technology that adjusts for changes in size without creating the jagged edges and broken lines that appear whenever you magnify bitmapped graphics. Jagged bitmaps can be imported into PictureThis and then traced to create a scalable version. Nice! One problem with PictureThis may have been addressed by the time you read this. The program currently requires a CGA or compatible graphics adapter. Given that PostScript applications are toward the high-end of today's applications, most users who would be interested in PictureThis are probably already using EGAs or VGAs. PictureThis definitely needs to migrate to a higher platform. Congratulations to Greg and Pat Williams of HortIdeas for being ahead of the crowd in moving shareware into the PostScript domain. This could be the start of something big. I I , "I I ,'. I PictureThis, $50 HortIdeas Publishing Greg & Pat Williams Route 1, Box 302 Gravel Switch, KY 40328 (606) 332-7606 Quick Editor Keeps Moving SemWare has updated QEd it, the "Quick Editor," to version 2.08. New features include sorting and support for macros invoked from the command line. Those of you with laptops will appreciate the optional large-block cursor that shows up so well on LCD screens. QEdit costs $54.95 with $3 for shipping. As before, it fits nicely on floppybased systems and can run in only 64K. (Where did they find a 64K PC to test it on?) They also have an OS/2 version at the same price. It offers several OS/2specific features. A whole new area is opening up here and SemWare is on the scene. QEdit 2.08 $54.95 plus $3 shipping SemWare 4343 Shallowford Road, Ste. C-3 Marietta, GA 30062-5003 (404) 641-9002 Browsing Quickly Quicksoft has long been famous for PC-Write, the leading shareware word processing program. A new Quicksoft program called PC-Browse is in beta test and should be out by the time you see this. PC-Browse is a pop-up utility that lets you look at files or disk directories while you work in your application program. But that description doesn't do it justice. PC-Browse lets you search for text files by matching a given word or phrase inside the file. It hunts for files Under pressure from Microsoft and Apple, Adobe has decided that they have to give up their secrets and make PostScript an open standard. by name across drives and directories. It also lets you paste information into your application. The most unusual and exciting feature of PC-Browse is the hypertext tool that you can use to create help systems or linked menus. Quicksoft has started advertising in user group newsletters and they've gotten rave testimonials from their beta testers. PC-Browse may soon be encroaching on SideKick's territory. Watch for it soon at a users group near you, or buy it directly from Quicksoft for $54. PC-Browse, $54 Quicksoft, Inc. 219 First Avenue North, #224 Seattle, WA 98109 (800) 888-8088 Zipping Along PKWare has released version 1.01 of PKZIP /PKUNZIP. The new ZIP utilities can work with files created with version 0.92, but the compatibility is only one ~ ,I r' way. PKZIP still produces quick ahd tight file compression, while PKUNZIP .. performs the reverse operation eVen more quickly. . . PKWare is branching out a little, offering PKZFind to search for .fil~s across disks and directories and auto-' . matically log you onto the directory,; where the desired file resides. It will· even peek into zipped files to see if the target is hiding there. '1 PKZIP/PKUNZIP 1.01, $50.50 PKZFind, $25 PKWare, Inc. 7545 North Port Washington Road Glendale, WI 53217-3422 (414) 352-3670 Post Script . " ." Last time I asked where users like.;to get their shareware. Although I am vii.:. cating this space, I plan to coIled . any responses to pass along to the good edi~. • tors here at Micro C. If I accumulate a worthwhile list, perhaps it will see pri11t in these pages. . Goodbye, folks. Keep registeririg that shareware. And remember the motto of the Sirius Cybernetics Coq,oration:: . ..' "Share arid enjoy!" • Editor's note: Apparently we're 100~iHgi' for a new shareware columnist. Any librarians out there yearning to write? (You·can even turn in a friend.) . ••• NEW! Now Micro Cornucopia has. avallabllHy; 16mm microfilm. 35mm rnlc:rolllffl.1 105mm microfiche copies of Issues and artie provided through ... UntversHy Mlcrotllms Intematlonal.. ... ) 300 North Zeeb Road. Ann Arbor. MI4810b-l.34~· MICRO CORNUCOPIA, #51, Jan-Feb, 1990 .83 • • o 11 100 100 A Case Of Optical Character Recog-nition: From .PCX To .TXT Via A Neural Network By Gary Entsminger P.o. Box 2091 Davis, CA 95617 Recognizing characters isn't the easiest thing for a computer (but then, recognizing friends isn't either). Gary applies a neural net to a pile of typewritten pages and .... At least he doesn't paper over the problems. my's desk, piled high with typewritten pages, was a research assistant's nightmare. A gothic soap opera. For years her boss and a legion of bosses had accumulated enough reports, abstracts, and just plain gossip to fill up the Greek Theatre. Now, they wanted all those pages WordStar-compatible. Her mission (would she take it?)-was to retype the pages, line by line, character by character, until her fingers and mind numbed with futility. Going crazy, really. She looked at me. Glancing up, I pretended I was handsome, dark, and perhaps mysterious; as if I were Fred MacMurray in Double Indemnity or Jack Nicholson in Chinatown-two of my favorite movies. Amy loves movies. "Can't you do something?" she asked. I cleared my throat in my hand, considered the possibilities, remembering the plots of Double Indem and several other "B" movies. A diabolic solution like murder, of course, was out of the question. I really liked her boss. Anyway, it's messy and immoral. Fred found that out. I took the Jack Nicholson approach. "Well, Ms. Seidel," I said, "I don't know what I can do; you're in an unusual situation." "Not really," she interrupted, "a lot of people are in my position." I noticed her legs, long and crossed and turned a little towards me, but not far enough to be suggestive. I glanced past her, out toward the grassy hill that led up and then broke into a forested valley. Sighing, I didn't know what to do; I said, "Okay, I'll poke around a little and get back to you." She may have mistaken my tone. I don't know. A 84 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 "Thanks," she managed a semi-smile, semisweet, and semi-ambivalent. "Save the thanks," I muttered underneath my breath, "until I deserve it." Her problem was simple enough, in theory, but I must admit I felt a little uneasy. She had a bunch of typed paper; she wanted it to appear magically in WordStar. A case of optical character recognition, or OCR as we say in the business. She was right: there are a lot of people in her position. I investigated and got my hands on a few tools(1) A scanner-which I could use to get an image of a page into a computer. An "image," I say, since scanners inherently scan pixels, not characters. A graphic image of a character (a matrix of pixels) may look like a character to you and me, but to a computer it's garbage. Figure l-Both Inputs Produce Output 1 (Input 1) ... xx .. . .. xxx .. . ... xx .. . ... xx .. . . .. xx .. . .. . xx .. . . xxxxxx. __ (Input 2) ... xx .. . ... xx .. . .... x .. . .... x .. . .... x .. . -- ... xx .. . . .xxx .. . ••• (Output 1) ... xx .. . · .xxx .. . .. . xx .. . · .. xx .. . · .. xx .. . . .. xx .. . .xxxxxx. . Images can be beautiful, of course; but moving, entering, and deleting characters, pixel by pixel, isn't a giant step for computer science. (2) A graphics editor-which I could use to manipulate pixels (to realign them, for example). (3) A neural network-which I could use to evaluate and correct input patterns. Neural networks effectively filter input to produce output. More specifically, a net looks for patterns in a set of examples (called a training set, the input) and learns from these examples to produce new patterns (the output). Then using what it's learned- (these input/ output pattern-associations), it classifies a new set of examples (called a test set). The net uses patterns of bits instead of individual bits to process information. Since a network recognizes patterns, not bits, no particular bit is crucial for the network to recognize a pattern successfully. The network will accept minor variations in bit alignment (see Figure 1) and still produce the right pattern. You input a pattern into a neural network; it compares the pattern with the patterns it knows (the patterns it learned from its training set); and outputs a ''best guess" pattern. (Note: the network's best guess might even be no pattern. We tell the network (using a threshold value) how much variation (or error) we'll accept. If no output exceeds the threshold, the network could produce a space, for example.) Scanning typewritten pages is, at best, an imperfect operation. We can expect the scanned patterns (our input) to be incomplete or contain "errors," such as bit misalignment. A neural network can correct these kinds of problems and Since a network . recognizes patterns, not bits, no particular bit is crucial for the network to recognize a pattern successfully. produce reliable output by making good guesses. We train the network by showing it a set of input patterns and their corresponding output patterns. For example, we show the network an 8 by 8 bit picture of a character and the corresponding ASCII character. We say, in effect, when you see this input pattern (a bit picture), output an ASCII character. This part is tricky and requires a shuffling of examples. Eventually, after we toggle a switch or two and add or delete a few examples, the network "learns" to "guess" well enough for our problem. A pattern is good enough when it reaches the threshold value we set. I shopped around for a neural network. I was in a hurry and it beat programming one from scratch, tho' Russ Eberhardt and Roy Dobbins show us how to do just that in their neural net- - work article this issue. I found four contendersNeuroShell (from Ward Systems) NeuralWorks (from Neuroware) NNT (Shareware) BrainMaker (from California Scientific). Each works well alone, but has even more interesting potential for use within other systems. I found, at first surprisingly, that developers have taken distinctive approaches to implementing neural networks. Everything from the user interface to operational theory varies. I conclude that neural networks are at that inchoate stage where they share some fundamental qualities (such as the use of training sets, thresholds, normalization, etc.), but diverge widely in the details. I chose BrainMaker for the OCR project because it: (1) is relatively inexpensive; (2) has a neat batch mode which I can call from my programs; (3) is fast enough (at least with small sets); (4) allows two-dimensional picture input (which makes it easy for me to see and edit 8 by 8 bit characters). I had three tools .... It was a start, the nucleus of a project, but much was missing. As usual, the tools didn't fit together well enough to solve Amy's problem. My computing skills had gotten my foot in the door, but I still wasn't sure I'd solve anything. I proceeded. Step 1: I scanned in an image (you can simulate this step in any of the Turbo languages using the Borland Graphics Interface, or BGI)(1) Initialize graphics; (2) Open a Viewport; (3) Use OutTextXY to create some graphics text; (4) Save the text to a file. MICRO CORNUCOPIA, #51, Jan-Feb, 1990 85 Step 2: I loaded the image into a graphics editor (PaintShowPlus) and examined it bit by bit. Right away I discovered that text sizes, fonts, styles, and horizontal and vertical alignments vary. Too much variation is a· problem. I decided to teach the neural net to handle size, font, and style matters. We teach networks by showing them a training set. Realignment I did by bit (in PaintShowPlus). I didn't teach my network much, so it wasn't all that smart. A one column pixel shift introduced more variation than it could handle. So I corrected a lot of bits. Ugh! In the future, I'll either train the network more extensively or automate column and row shifts. Step 3: PaintShowPlus writes three kinds of output files: .TIF, .IMG, and .PCX. BrainMaker, the neural net, wants its input as a text pattern (a matrix of "X" s and periods representing a character). Problem: bridge the abyss between these two. I had a copy of the PCX Toolkit, which displays, loads, saves, and in various other ways manipulates .pex images, so I decided to work toward it. I created a .PCX file with PaintShowPlus. I planned to translate images from the screen instead of from a file, so any file format will do (if you can display it). Eventually I had to create a two-dimensional "text" picture for BrainMaker (see Figure 2). The programming problem at this juncture(1) To prepare input for BrainMaker (in this case, to translate a bit by bit image of a .PCX file, or screen) to a text picture; (2) To evaluate and translate the output from BrainMaker to a WordS tar (or other text editor) readable format. Objects I dec~ded to glue everything together in a couple of Turbo Pascal objects: one to translate a graphics screen into a text picture for BrainMaker; and one to translate BrainMaker's output (symbols plus numerical values; see Figure 3) into pure text (Le., characters). In sum, the case seemed to hinge on five parts(1) A scanner (or simulated) part; (2) A .PCX (or screen display) part; (3) A screen to neural network translator; (4) A neural network part; 86 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 Figure 2-Examples of Brain Maker Input .xxxxx .. xx ... xx. xx ... xx. xx ... xx. xx ... xx. xx ... xx. .xxxxx .. ... xx .. . .. xxx .. . ... xx .. . ... xx .. . ... xx .. . ... xx .. . .xxxxxx. .xxxxx .. xx ... xx. ..... xx. ... xxx .. .xxx ... . xx ... xx. xxxxxxx. ••• (5) A neural network to pure text part. I created Parts 3 and 5 with Turbo Pascal, and ran Parts 2 and 4 out of a Turbo Pascal shell. The Turbo Pascal program (see Figure 4): (1) initializes graphics; (2) opens a viewport; (3) translates the screen (looking at 8 bit x 8 bit images) into a text picture; (4) writes an output file for BrainMaker; (5) calls BrainMaker (via a batch file executed by the built-in procedure exec); (6) translates BrainMaker's output to characters. See the figure for details or download the entire system from the Micro C BBS. In brief, note: • To use the Turbo Pascal exec procedure, you need to reduce the large heap size in order to have enough memory to run the neural network from a batch file. I used 64K for this one. Experiment. • Viewports and the many constants in my OCR shell are screen specific. An 80 by 25 character screen needs to have an array of 2000 characters (Num of characters). The PCX files on the Micro C BBS are screen-specific. I've set the constant in my code (Figure 4) for a CGA, 600 by 200 screen. The BBS (.EXE) version uses variables instead of constants and allows you to input your screen type at runtime. OCR_shell then sets the adapter type, Viewport size, and displays the correct .PCX for your screen. Notes & Conclusions As I told Amy later, my initial results were revealing and incomplete. I initially trained the network to recognize numbers by using a set of number "facts" that came with BrainMaker. Then I tested a screen of numbers I created with the BGI. I wrote text (using OutTextXY and a default 8 by 8 bit font). Results-terrible. BrainMaker couldn't recognize more than 2 or 3. Text Continued on page 89 Figure 3-BrainMaker Output; 3 Digits Weight and 1 Digit Output .909 0 .001 1 .018 2 .009 3 .001 4 .033 5 .021 6 .050 7 .097 8 .081 9 .000 0 .988 1 .009 2 .049 3 .034 4 .091 5 .018 6 .067 7 .012 8 .001 9 .017 0 .034 1 .929 2 .033 3 .002 4 .038 5 .000 6 .050 7 .068 8 .034 9 .009 0 .017 1 .053 2 .918 3 .000 4 .053 5 .003 6 .020 7 .100 8 .087 9 .003 0 .085 1 .005 2 .017 3 .911 4 .021 5 .016 6 .027 7 .030 8 .000 9 .081 0 .014 1 .008 2 .072 3 .000 4 .900 5 .006 6 .042 7 .070 8 .031 9 .095 0 .025 1 .000 2 .049 3 .001 4 .003 5 .936 6 .020 7 .100 8 .001 9 .066 0 .046 1 .030 2 .008 3 .000 4 .006 5 .000 6 .972 7 .041 8 .004 9 .020 0 .000 1 .032 2 .078 3 .001 4 .001 5 .071 6 .007 7 .902 8 .018 9 .088 0 .000 1 .006 2 .050 3 .000 4 .000 5 .005 6 .064 7 .094 8 .910 9 ••• Figure 4-0ptical Character Recognition Shell = 'C:\TP\EXE\OCR.Out'; = 'C:\TP\EXE\a.PCX'; OCR_Output_file Program OCR_Shell PCX_file uses Line_length Crt, Dos, Graph,pcx_tp; {pcx_tp from Genus Toolkit} PCX_type = 79; Threshold = pcxCGA_6; = 0.60; type Weights var = array[l .. Num_of_characters] of string[4]; F, F2 : text; Patterns const = array[l .. Num_of_characters] of string[l]: { BGI fonts } Fonts: array[0 .. 4] of string[13] = objects } NNlptr ('DefaultFont', , TriplexFont' , 'SmallFont', = Aneural_net_interpreter; = object neural_net_interpreter 'SansSerifFont', 'GothicFont'); { BGI text directions } Array_index: integer; First_char, S: string; TextDirect: array[O .. l] of string[8] Weight: Weights; Output-pattern: Patterns; ('BorizDir', constructor Init; destructor Done; virtual; 'VertDir'); = 10; Num_of_characters = 2000; procedure Get_weights; Num_of-patterns Input_file_from_neural_net { for 80x25 viewport = = Ascreen; = object Screenptr 'C:\TP\EXE\BrainRTS.Out': Output_file_for_neural_net procedure Output_characters; end; screen = GraphDriver: integer; 'C:\TP\EXE\BrainRTS.ln' ; Graphics device driver} Continued on page 88 "It's Glorious!" Any ASCII • EBCDIC. c-tree • Packed data Binary. dBASE • R:BASE • Paradox. Xdb Excel. 1-2-3 • SC4 • Btrieve. Oracle Informix. Clarion. DIF. SYLK •.. plus many more file types. • • • • • No programming - completely menu driven! Selects & rearranges records, fields and characters! Instant script file creation for total batch processing! Maps new data structures automatically by name! Ideal for OEM/run-time applications! "No color PCompatible is complete without a copy of this; get one and see what I mean." - Jerry Pournelle, BYTE "In~inite ... Neither of us (the chief engineer of the Galileo JupIter probe and I) may ever be heard from again." - Arthur C. Clarke "I could watch an animated image for hours." - Larry Fogg, Micro C (MIA 89) FractalMagic 5.0 America's Premier Fractal Program " ... an invaluable integration tool." -Byte "... more than worth its price." -PC Magazine " ... a surefire winner." -Computer Language ·:,.IIt!'~l~ IBM PC, PS/2 (3.5" or 5.25") CGA, EGA, & VGA: $35.00 Mac, Apple II, Atari ST: $25.00 EGANGA Picture Disks: $15.00 Expansion Modules Coming Soon! Standard $99 - dDASE, AScn, 1-2-3, Q&A, Enable, DIF, askSam & merge files for WordPerfect, Word & Wordstar Professional $199 - Standard formats plus Binary/EDCDIC, SC4, SYLK Paradox, R:BASE, Clarion, Excel, c-tree & Btrieve Advanced $299 - Standard & Professional formats plus Informix, Xdb, Oracle & C-ISAM Call 800/444-1945 or 512/482-0824 MCNISA • AMEX • COD • Corp. PO. available for LANs, Xenix & Unix Tools & Techniques Inc. 1620 W 12. Austin TX 78703 ~-";{ Sintar Software "Software for the Mind" P. O. Box 3746 Bellevue, W A 98009 (206) 455 - 4130 Visa - MC - AmEx ,.....-' .I.~ miS&lIDJNKu5 Reader Service Number-181 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 87 GraphMode: integer; MaxX, MaxY: word; { Graphics mode value destructor neural_net_interpreter.done; Maximum screen resolution begin end; ErrorCode: integer; {Reports graphics errors { object methods MaxColor: word; Max color value available pcxReturn: integer; PixelStatus: integer; procedure neural_net_interpreter.Get_weights; ViewInfo: ViewPortType; constructor init; var destructor done; virtual; procedure Initialize; ThiS_Weig~ string[4]; end; Thisyattern string[1] ; var Count integer; Char_Ptr: integer; OldExitProc Pointer; {Saves exit proc addr} {$F+} begin FOR Count .- 1 TO Num of_characters DO begin Initialize arrays procedure MyExitProc; Weight [Count] .- , ,. begin Output""pattern[Count] := ' ExitProc := OldExitProc;{Restore exit proc addr} CloseGraph; {Shut down the graphics system } ,. end; Assign(F,Input_file_from_neural_net); end; { MyExitProc } Reset(F); Array_index := 1; {$F-} WHILE Array_index <= Num_of_characters DO begin Readln(F,S); First_char := Copy(S,1,1); procedure screen. Initialize; IF First_char THEN begin := 2; { Initialize graphics and report errors} Char_ptr var FOR Count .- 1 TO Num_ofyatterns DO InGraphicsMode: boolean; { Flags graphics init} PathToDriver string; begin {path to *.BGI & *.CHR} This_weight:=Copy(S,Char_Ptr,4); Weight[Array_index]:=This_weight; begin Char_ptr := Char_ptr + 5; When using Crt & graphics, turn off Crt's This""pattern:=Copy(S,Char_Ptr,1); memory-mapped writes } DirectVideo .- False; Outputyattern[Array_index] OldExitProc := ExitProc; Save prev exit proc } ExitProc := @MyExitProc; Insert our exit proc} := This""pattern; Char_ptr := Char_ptr + 2; PathToDriver .- " . Inc(Array_index); repeat end; GraphDriver := Detect; {detect graphic adapter} end; InitGraph(GraphDriver,GraphMode,PathToDriver); ErrorCode := GraphResult;{Preserve err return} if ErrorCode <> grOK then { Error? } end; Close(F); end; begin Writeln('Graphics error: " GraphErrorMsg(ErrorCode»; if ErrorCode = grFileNotFound then begin procedure neural_net_interpreter.output_characters; var Output_char : string; Writeln('Enter full path to BGI driver'); Pattern_count, Char_count, ReturnCode Writeln('or type to quit.'); Wt, New_weight : real; Readln(PathToDriver); Writeln; begin end Assign(F2,OCR_Output_file); Rewrite(F2); else Halt(1);{ Some other error: terminate} Array_index := 1; Char_count end; until ErrorCode integer; := 1; WHILE Array_index <= Num_of_characters DO grOK; end; { Initialize { object constructors & destructors } begin Pattern_count := 1; Wt := 0; Output_char -- , ,., .- WHILE Pattern_count <= Num_of""patterns DO constructor screen.init; begin begin end; Val(Weight[Array_index],New_weight, destructor screen.done; IF New_weight > Wt THEN begin Ret urnCode) ; begin end; Wt := New_weight; output_char := constructor neural_net_interpreter.init; begin end; 88 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 Output""pattern[Array_index]; end; WHILE XPt Inc(Pattern_count); Inc(Array_index); IF Wt <= ViewInfo.x2 DO begin FOR y := YPt to (yPt + 7) DO begin end; >= Threshold THEN Write (F2, Output_char) FOR X := XPt to (XPt + 7) DO begin PixelStatus := GetPixel(X,Y); ELSE IF PixelStatus Write (F2,' '); IF Char_count > Line_length THEN =0 THEN write(F,' .') {BrainMaker wants} ELSE begin { either a . or an X } write(F, 'X'); Writeln(F2); Char_count .- 0; end; end; writeln (F); Inc(Char_count); end; end; YFt := RowPt; XPt := xPt + 8; Close(F2); end; end; XPt .- 0; RowPt := RowPt + 8; YPt := RowPt; var end; NNI : NNIptr; end; procedure pcx_to_neural_net; Close(F); {get PCX; display; convert to txt for BrainMaker.} end; Dispose(SPort,done); var SPort end; Screenptr; x, y integer; XPt, yPt, RowPt integer; begin { main program body } S: string; pcx_to_neural_net;{prep PCX file for BrainMaker} begin New (SPort, init); New (NNI, init); WITH SPort A DO begin WITH NNIA DO begin Initialize; SwapVectors; Maxx := GetMaxx; Maxy := GetMaxy; exec('C:\COMMAND.COM' ,'/C C:\BATCH\net'); {BM} SetViewPort(O,O,Maxx,Maxy,ClipOn); SwapVectors; SetTextStyle(DefaultFont, HorizDir, 1); IF DosError <> 0 THEN Writeln('Dos error # ',DosError) pcxReturn := pcxSetDisplay(PCX_type); pcxReturn := pcxFileDisplay(PCX_file,O,O,O); IF (pcxReturn = pcxSuccess) ELSE Get_weights; THEN begin {Translate BrainMaker's output} {write a file of ASCII} Assign(F,Output_file_for_neural_net); Output_characters; Rewrite (F) ; Dispose (NNI, done); GetViewSettings(ViewInfo); { coordinates of Viewport XPt := 0; YFt WHILE RowPt end. { main} ••• := 0; RowPt := 0; <= ViewInfo.y2 DO begin Problem: the default BGI font and the BrainMaker font both use 7 rows and lines of pixels to represent a number. But the .BGI's font is shifted 1 row and 1 column down and right of BrainMaker's. So I retrained the network using the .BGI default font. Resultsgreat. Conclusion-to create a full-blown Optical Character Recognizer, you'll need to focus on training the neural network to recognize different fonts, styles, and sizes. Labor intensive, of course, but doable. And an exercise, of course, for smart Micro C' ers. "Amy," I said, "I figured it out and it works, but I'll have to get back to you. "There's no more room in this TIdbits." Thanks to Dave Schultz at California Scientific Software and Chris Howard at { Clean up } end; Genus Programming for timely conversations while I was working on this project. For more informationTurbo Pascal Professional 5.5 $250 Borland International 4585 Scotts Valley Dr. Scotts Valley, CA 95066 (800) 345-2888 BrainMaker $99.95 California Scientific Software 160 E. Montecito #E Sierra Madre, CA 91024 (818) 355-1094 Paint5howPIus plus scanner $339 Logitech· (800) 231-7717 (800) 552-8885 (in CAl NeuralWorks $1,495 Neuralware Penn Center West-Bldg. IV Suite 227 Pittsburgh, PA 15276 NeuroShell $195 Ward Systems Group 228 West Patrick st. Frederick, MD 21701 (301) 662-7950 PCX Toolkit $195 Genus 11315 Meadow Lake Houston, TX 77077 ••• (800) 227-0918 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 89 Frozen Floppies, Etc. Floppy Data Recovery If you have a floppy that's gIvmg you read errors, try putting it in the refrigerator or freezer for a half hour or more. No joke. The magnetic domains are more active at lower temperatures. The party who turned me on to this used to teach physics and has used this technique many times to recover "lost" data from disks. cpu By Slowing Down DRAM Refresh Figure l-Speed Up ; This macro gets around a bug in 80286 that won't popf correctly POPFF MACRO JMP $+3 IRET PUSH CS DB OE8H,OFBH,OFFH ;Call far $-2 ENDM David E. Michener 7466 S.E. 112th Ave. Portland, OR 97266-5033 REFRESH SEGMENT PARA PUBLIC' CODE' Editor's note: Of course you could skip the disk and just keep the raw data in the freezer. I've found that it doesn't need blanching, just be sure to double wrap it so it doesn't get freezer burn. (I also have a recipe for binary freezer jam made from halfbaked Apples (with the cores) and a little sugar.) REFR ASSUME CS:REFRESH, DS:REFRESH, ES:REFRESH, SS:NOTHING ORG 100h PROC FAR JMP OVER Jump over resident section of code DD 0 Place to store old INT 40H vector PUSH AX Save the registers we're changing MOV AL, OUT 43H, AL Set up to write LSB-MSB clock rate JMP $+2 Delay for lousy IBM AT design MOV AL, OUT 41H, AL (15.3 u-secs ???) JMP $+2 More delay MSB of timer value to 0 ; .COM format BEGIN: OLD_40 I_40: PUSHF RAM Refresh Revisited I have just tracked down a very strange and annoying bug relating to the DRAM refresh rate change you ran several months ago ("DMA Control on the PC," Issue #37). It seems only to happen with the AMI BIOS. As you increase the time between refreshes, the floppy disk motor start-up time also increases as some (large) multiple. I have been setting the timer to hex 80 ("normal" is hex 12) and it takes about 15 seconds for the floppy to corne up to speed. I finally got fed up enough to check out why, and it turns out to be DRAM refresh-time related. As I'm an incurable speed-freak, I could not live without the extra 5% horsepower I got from changing the refresh. I wound up writing a short TSR that hangs on the INT 40H chain (where hard drives rev ector the floppy BIOS), restores the rate to its normal value 90 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 74H 12H Set refresh to every 12h clock ticks XOR AL, AL OUT 41H, AL POP AX Recover our trashed registers CS: [OLD_40] and call the original stuff PUSH AX Save the registers we're changing MOV AL, POPFF (make this call look like an INT) PUSHF CALL INT 40 done, restore fast DMA value PUSHF 74H Set up for LSB-MSB rate again Micro Ads . £fii-h ¥d w~.s. ·,·rim A Micro Ad is the inexpensive way to reach over 22,000 technical folks like yourself. To place a Micro Ad, just print out your message (make it short and sweet) and mail it to Micro C. We'll typeset your ad (no charge) and run it In the next available issue. You can also send camera ready copy. Rates: $99 for 1 time, $267 for three times, $474 for 6 times (a best buy at only $79 per Insertion). Full payment must accompany ad. Each ad space is 2 V4 inches by 1 J'4 inches. Briefly, a hypertext help system, context sensitive, up to 80% compression, requires less than 10K, Includes editor for documents, and source for Pascal, C, and Basic. (203)368 - 0632 NTERGAID, 955 Connecticut Ave. Bridgeport, CT 06607 WISDOM OF THE AGES CONVERT PCX FILES TO COLOR POSTSCRIPT! Point to a subject and select. Receive a vivid parade of quotes, sayings and ideas. Read, print or send some to disk. pcx Printshop will convert all of your EGA and VGA PCX files to 16-color. 300 d.p.i. Color Postscript format. Great for grabbing screens, touching them up, and printing them out at "coffee-table" resolution. Subjects are organized into sections to give you the most benefit in the least time. Filters customize output; Dynamic mode simulates creativity. 131 Rindge Ave., Cambridge, MA 02140 (617) 492-7442 Electronic book puts over \,000 of the world's greatest minds to work for you. They will give you tools to act, write and speak better; earn more. ' $99 16 Megabytes EMS and/or Extended Memory -Works on 8 or 16 bit bus ·16 bit transfer on AT bus ·Single board design .Includes RAM disk and extensive diagnostics -Quantity/OEM discounts ~:~~~e:;ured; Argon Technology Group Requires 256K, DOS 2.0 or later & 2 floppies or hard disk. Add $2.00 S/H. CA residents add 7%. Outside U.S. Add $10. MCR Agency; Inc. 6116 Merced Ave. Oakland, CA 94611 #81M it- 1-800-767 -6797 Fax: 415-444-6561 NEW COMPUTER BOOKS up to 400/0 OFF LIST SMALL, MINIMUM ORDER SEND 3 STAMP SASE TO: Shipping: $3.00 US'$5.00 Canada Ideal for prototyp,,",. one cL a kind devic,,", or ehort production nma. perfect builciing block for PC or Macintosh data aqui.ition interface ... eland alone control pr~ecta. Aeltembled and tMted board include. 8031 microproc:e ..",r. cryet.al,I!K ()(EPROM, 128 byte. cL RAM, 2 byte·wide I/O p«tIIand proviaione for. MAX232 to provide induoby compatible OteriaIIlO. All IC. are .ockel.ed and 110 i. via a 2X17 headeo. Size: 2.75" by 4.0". OEM diBCounta. Cottage RcsourccB Suite 3-672C, 1405 Stevenson Drive Springfield, minois 62703 (217) 529-7679 PO 1758 SOLANO BEACH, CA 92075 Small and fast Uses all available memory Split-screen editing Configurable keyboard Regular expression search One key compile Features for writing documentation Condensed/Outline display Runs on IBM PC's. AT's, and PS/2's USA shipping & handling S3; Outside USA S15 CA residents add sales tax Whitney Software, Inc. P.O.Box 4999, Walnut Creek, CA 94596 (415) 933-9019 Reader Service Number 164 \J;) 25 MFLOP Floating Point DSP High speed NUMERICS and GRAPHICS 32 BIT on board data bus 16 bit PC/AT interface ALL ON BOARD MEMORY DUAL PORTED Parallel and codec serial 10 15 ms 1024 point FFT Assembler, monitor, and libraries Base board and ALL software .......... $950 640K 85ns memory ......................... $300 SYMMETRIC RESEARCH 15 Central Way, Suite #9, Kirkland, WA 98033 (206) 828-6560 BATCOM is a batch file compiler that compiles your -.bat- files to -.exe- files to make them faster, more professional, and more capable, BATCOM extends DOS with new commands so you can read keyboard input, perform arithmetic, use subroutines, and much more. In addition, BATCOM protects your source code, and you can distrbute your compiled programs without royalties. For IBM PC. Only $59.95. Order today I / ' - , Wenham Software Company 1 • lIS Burley St. ' _ ' / Wenham, Ma. 01984 (1S08) 774-7036 8748 EMULATOR Simulate your 8748 programs in software before burning the EPROM. See all internal registers and i/o pins. Script files can simulate complex external events. Includes source. ~ -' :'>":Other 'Products ".. ' DOS Source Fully commented 1.1. 2.1 ................ $15/$45 Hercules Tools Graphics stuff w/source ......., .............. $15 Math Library DSP32C COPROCESSOR BOARD ' . . >>>>>>>>- Why you want BAlCOM! ascii Floating pt. w/source ...... , ............. $15 180\.::,:,: ..:::',:::,::. Reader Service Number 158 Reader Service Number 167 (612~555 Reader Service Number 124 8031 J.lControl1er Module $39.95 C. B. CO. WHITNEY EDITOR $49 (214) 328-2730 BBS 328-6909 Reader Service Number 176 Reader Service Number 181 ~J~~!..Jru 807 North 6th SL Lake Clty,IIN 55041 Reader Service Number 3 Technology £or the Arts PC MPU-40 1 Compatible MIDI Interface Board $119 Willow Publlhsers' VGA $599 (video frame grabbber/VOA) New hi-res frame grabber $495 Panasonic CC1V camera $225 Special: Sanyo Color camera $395 Free MIDI or Digitizer Catalogs joel Sampson Engineering P.O. Box 550363 Dallas, TX 75355 Compatible m~ ~I~ Sold and Serviced by Reader Service Number 179 It's never too early to get a head start. Introductory Offer: $79.00 - all 5 disks. 30 day money-back guarantee. XT and AT I.~ ~ D~llnlormalion P,O. Drawer F Modes I 0I ~ Denton, TX 76202 817 -387 -3339 Reader Service Number 149 EGA FRACTAL MASTER Whether fractal novice or fractal hacker, this easy to use yet powerful package lets you explore: The Mandlebrot set Julia sets ~r~~~~~~sd ~:~~c:,~:r~~t~~aons Peano curves Fractal landscapes Interrupt. save and resume plots at any time. Easily change colors, set boundaries, animate colors, create mirror images. Supports fast integer computations (even WITHOUT an 80386) and 80x87 math co-processors. Includes a slideshow program. Specify 51/4 or 31/2 disk. Only $25 ' Paul W. Carlson 602 North Avenue, #23 Burlington. Vermont 05401 Reader Service Number 182 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 91 before chaining on to the floppy BIOS, then sets it back to hex 80 before exiting. I'm sending you the code for this TSR (see Figure 1) in the hopes that it will help anybody else having this problem. Note that this code is dumb; it assumes that anybody trying to increase CPU power must already have a hard drive. I suppose it's possible that somewhere in Po dunk, Iowa, there lives a true power user with dual floppies, but I've never met him. I am not very happy with this assumption, but it's what I needed. If the guy in Podunk needs.this, he can rewrite it. John Welch 1310 Kenneth Circle Elgin, IL 60120 Back Up! (Let me repeat that. .. ) You say that backing up is hard to do? Let me assure you that it's harder, by far, to recover from a hard disk crash if you don't back up regularly. Yes, this is the voice of experience speaking. My old faithful 20 meg Miniscribe experienced a hardware failure. Hindsight being what it is, backing files up daily is now a part of my routine, and I promise myself to keep it up as long as possible. The only problem is that I will have probably forgotten this trauma and let my habits get sloppy a month or so before the next failure. Hard disks can fail in several modes. The most feared is a head crash. When that happens, the data is generally gone since the surface of the disk is physically damaged. In· my case, I know the data is still in there, locked up like jewels in an impenetrable vault, and I don't have a combination to the door. My failure was in the speed sensor; it wasn't a crash. So if any of you out there have a non-functioning 20 Megabyte MiniScribe (model 3425), I would be greatly interested in it for the parts. I knew that the failure was not related to the heads because the Miniscribe told me. You see, the drive's LED activity light can flash error codes. The LED will flash four or five pulses of light, pause a few seconds, and repeat the code. A steady .light indicates a 1, a flickering light indicates a O. Figure 2 shows the error codes. Although the codes seem to be the same from one Miniscribe drive to the 92 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 OUT 43H, AL .JMP $+2 More lousy delay MOV AL, SOH A reasonable value for timeout OUT 41H, AL That nets about 5% more CPU speed .JMP $+2 for free XOR AL, AL Set MSB to 0 OUT 41H, AL POP AX Restore trashed registers 2 1RET POPFF RET witho~t popping flags This ends resident code section. From here on, we set things up and parse command line. Since this gets done only once, we don't want to save this code, so it also contains the means to decide how much memory to save when going resident. OVER: PUSH DS Turn off INTs while revectoring INT CLI XOR AX, AX 1NT vectors are at SEGMENT 0 MOV DS,AX Set DS SEGMENT to zero ;Redirect the floppy MOV AX, DS: [100H] MOV WORD PTR CS:OLD_40,AX MOV AX, DS: [102H] MOV WORD PTR CS:OLD_40+2,AX MOV WORD PTR DS:[100H],OFFSET 1_40 MOV WORD PTR DS:[102H],CS POP DS MOV AL, OUT 43H, AL .JMP $+2 MOV AL, OUT 41H, AL ; Then replace it with ; vector to floppy interceptor Put DS back where it belongs 74H Set DMA timer to slower value (less refresh) SOH .JMP $+2 XOR AL, AL OUT 41H, AL MOV AX,OFFSET OVER SHR AX, 1 SHR AX, 1 SHR AX, 1 Get the addr of the end of 1NT code SHR AX, 1 Dvivde by 16 and add 1, INC AX to get how much memory to save MOV DX,AX Save the calculated amount of memory MOV AH,3lH DOS func to terminate & stay residnt Allow interrupts again STI 1NT REFR ; Get old addr, and store it here 2lH Do DOS call (never returns) ENDP REFRESH ENDS END BEGIN ••• C PROGRAMMERS CURVEF~NGFORPROG~MERS more Micro Ads ... • TABLECODE'" fits any X-V data table to 211 different equations in a single step. • Full graphical selection of most appropriate equation. • Generates function code for selected equation and a twin-window calling program to test equation code. • Reads Lotus, dBASE, ASCII, and binary files. • Full working demo available for $5. ... :!'O[ . . IO..,.c •• IIt,hll rl-o.It1t.cl2V'l I . t - ~ l!.•.- -. -. _. - - 1 - - •___ .. _ _ _ --- .~ _ .......... ,,' I 10 XI I.U~_;II • Code Ubrarles Include: Turbo C & MSC S.x, Turbo Pascal, BASICA, Turbo BASIC, QulckBASIC, Lahey FORTRAN, JPI Modula2, dBASE IV, Clipper, dBASE III +. $149 IAISN,I M~~~;;:;:o Phoenix, 1Z. 85064 Software A Central Oregon technology company engaged In remote sensing and information management systems development has openings for: 1. Manager of software systems development! Sr. Analyst. 2. Programmer/Analyst. The ideal candidate will hold a BSCS and have a minimum of 5 years hands-on experience In C language. database integration. Unix. and workstation applications. Comprehensive benefits and competitive salary offered. Please send resumes to: Personnel Recon Technologies, Inc. P.O. Box 7497, Bend, Oregon 97708 (503) 389-8149 602-266-1925 Reader Service Number 170 XenoCopy-PC $79.95+S/H as DEGREES ... from fully-accredited Colleges, We PC-~OS program lets your PC Read/Write/Format over 350 formats XENOFONT $49.95 +S/H high quality text screen printouts ideal for use in software documentation Bold face and reverse video supported. Elqh·MldJ 2210 SIXTH STREET BERKELEY, CA 94710 415-644-9366 help Computer Professionals avoid years of unnecessary class work. Get the job offers and recognition you deserve. Phone UDA for more information and our free booklet "Career Thctics and Strategies!' University Degree Advisory PCHRT is the definitive answer to execution profiling and embedded timer applications. 30 functions manage 100 timers with microsecond accuracy. Self calibrating. Generates extensive and flexible timer reports. Profiles selected BIOS interrupts. Supports TC, TP 5.0, MSC 5.x. Libraries, examples, manual, and full source included. $24.95 postpaid USA, elsewhere add $4.00. VISA/Me. 'S 800-765-7272 RyleDesign Reader Service Number 168 Reader Service Number 171 Reader Service Number 39 Figure 2-Miniscribe Error Messages Error reported 00000 00001 00010 OOOll 00100 00101 OOllO 00111 01000 01001 01010 OlOll OllOO 01101 01110 Ollll 10000 10001 10010 100ll 10100 10101 10110 10111 11000 11001 11010 110ll lllOO 11101 11110 lllll 00 01 02 03 04 05 06 07 08 09 OA OB OC OD OE OF 10 II 12 13 14 15 16 17 18 19 lA lB lC lD lE lF HIGH RESOLUTION TIMER TOOLBOX Microprocessor RAM error Microprocessor ROM checksum error Interface Chip diagnostic error -WRITE FAULT wi11 not reset Index pu1se not detected or 10st Unab1e to maintain spin speed (0.5%) Loss of +FINE TK during id1e mode More than one seek retry T~e out on +END DECL signa1 T~e out on track crossing (-CYL PULSE) Overshoot T~e out on +FINE TK +TKO signa1 not detected Comparator mismatch Comparator mismatch Unexpected Microprocessor interrupt T~e out on TKO pat T~e out on GBl pat T~e out on GB2 pat Seek range error Voltage unsafe with -WRTGATE inactive Voltage unsafe with -WRTGATE inactive Chip unsafe (-WRITE FAULT) Step pulses received with -WRTGATE active T~e out on +END DECEL signa1 T~e out on track crossing (-CLY PULSE) Overshoot T~e out on +FIUE TK +TKO signal not detected Comparator mismatch after rezero Servo adjust fai1ure - no c10sure 6301 Trap next, some drives pulse four times and some pulse five. If your drive pulses four times, ignore the leading zero in the above table. If there are only four pulses, the error cannot be higher than 01111. Beverly Howard Byte Aid! 205 Canyon Rim Drive Austin, TX 78746-5016 Editor's note: John, Beverly, and David are each receiving three copies of this issue plus a genuine Micro C author's tee shirt (available only to Micro C authors). If you have any juicy little technical tips, send them to: Juicy Tips, Micro Cornucopia, P.O. Box 223, Bend, Oregon 97709. ••• or 5114 Disks Available $6 ppd (U.S.) or $8 ppd (Foreign) 3112 1·800-888·8087 (orders only) or (503) 382·8048 ••• MICRO CORNUCOPIA, #51, Jan-Feb, 1990 93 BACK ISSUES MICRO CORNUCOPIA ,', Complete Your Education ... ':1111 Out Your Collection of Micro C today! 'hi ~\lE.1 (8/81) ~.rSupply ,- 1,:112 PFM.PRN ,' ""G~ag.es ,t'Y"I!',_' ,qUE'~ (10/81) P.rallGl print Driver , O(1v" ~tor Control l~page.s ' . '~P ges ,1",', , "8SU~'4 (2/82) .t<.Y9Qard Translation ~.4¥Hz Mods ~.ms, Lync, and S1 Os , " UI'I~~ing CPIM ERASE :::~QP~Qes > ..':";{ , ,s.l,Ii'5 (4/82) "l~Text Editors Oouble Density Review , ~O,paQe$, ;!"" .:p '$$UE #6 (6/82) " ' E:PROM Programmer Cy~omize Your Chars Qouble Density Update 21'pages , ISSUE #27 (12/85) SOLD OUT ISSUE #17 (4/84) Voice Synthesizer Kaypro Morse Code Interface 68000-Based System Review Inside CP/M 86 56 pages ISSUE #29 (4/86) Speeding Up Your XT Prototyping In C C Interpreters Reviewed Benchmarking The PCs 104 pages ISSUE #18 (6/84) Kaypro EPROM Programmer 1/0 Byte: A Primer Kaypro Joystick Serial To Parallel Interface Business COBOL 60 pages ISSUE #30 (6/86) PROLOG On The PC Expert Systems Logic Programming Building Your Own LogiC Analyzer 256K RAM For Your 83 Kaypro PC-DOS For Non-Clones 104 pages I 'aUE (17 (8/82) , 6 Reviews Of C A(jding 6K Of RAM I ~LOr1Your Own Begins :, t~pages ISSUE #19 (8184) Adding Winchester To BBII 6 MHz On The BBI Bulletin Boards Track Buffering On Slicer 4 MHz For The 820-1 64 pages ISSUE #20 (10/84) HSC 68000 Co-Processor DynaDisk For The BBII . Serial Printer On BBI Sans S 10 Cheap & Dirty Talker For Kaypro Extended 8" Single Density 72 pages ;,;. ·~UE:'8 (10/82) $9~OpUT • :.: ,! •• 'MVE 19 (12/82) (J.ijIlEPROM Program fWlo~ting Your CP/M :S.rial,print Driver Big $oarcf I Fixes , ~? pages :1"~E'10 (2/83) ."UE #11 (4/83) .'~ ;~L.POUT .', i',· , ,\<-,1' ' ISSUE #21 (12/84) Analog To Digital Interface Installing Turbo Pascal Low Intensity BBI Video Turbo Pascal, The Early Days 80 pages ISSUE #22 (2185) Xerox 820-11 To A Kaypro-8 Sound Generator For the STD Bus Reviews Of 256K RAM Expansion 88 pages U.Uf; ,12 (6/83) , . .,iriging Up BBII Sided Drives for BBI , ,'4>C?Ublt ,p~~tRadio "',' $ MH~ fQr Kaypro ,tQP~s : ;; 'r, ,'" '!:" .~ J.I,JQUE '13 (8/83) , (}P/M Disk Directory MOi'~'56K for BBI Minj FWnt Panel ;C~~pfa.st Modem ...,1,P,riHter Interface '~yp;oReverse Video Mod .~pages ISSUE #23 (4/85) Automatic Disk Relogging Interrupt Drive Serial Printer Low Cost EPROM Eraser Smart Video Controller Review: MicroSphere RAM Disk 86 pages ISSUE #24 (6185) C'ing Into Turbo Pascal 8" Drives On The Kaypro 68000 Versus 80x86 Soldering: The First Steps 88 pages I,'.,:,''':' . ,"U~#14 (10/83) ti'$.lIlnstaliation ,111.' Perfect Terminal ~/$$'Video Size .; ,I Vi~()Jitter Fix :' k,iYpro Golor Graphics Review • J ... ~ -\ (' 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 , . ,'fillir,iO ,iSu~ #15 (12/83) '.~re,,, Dump Listing $erial Ports Pttlyi!19 Adventure '!JP9'"aqing K1;\ypro II To 4 Upgrading Kaypro 4 To 8 '~8pages ISSUE #26 (10/85) Inside ZCPR3 Two Megabytes On DSI-32 SOGIV The Future Of Computing Graphics In Turbo Pascal 104 pages 94;, MICRO CORNUCOPIA, #51, Jan-Feb, 1990 -'n;' ISSUE #28 (2186) Rescuing Lost Text From Memory Introduction To Modula-2 Inside The PC 104 pages ISSUE #41 (5/88) ISSUE #46 (3189) Artfflclallntelligence Software Tools 3-D Graphics Neural Networks Logic Of Programming Languages Applying Information Theory 96 pages The Art of Disassembly Handling Interrupts With Any C Hacking Sprint: Creating Display Drivers Greatest C Compilers Turning A PC into An Embedded Control System Practical Fractals 96 pages ISSUE # 42 (7/88) 'If$Ui:,3 (12/81) :4MHz Mods yonfiguring Modem 7 : 'fJ,VQr$fil Video 'Cursor fO~T~words Begins , I ISSUE #16 (2184) 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 #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 ISSUE #32 (10/86) Public Domain 32000: Hardware And Software Writing A Printer Driver for MS-DOS Recover A Directory By Reading & Writing Disk Sectors 96 pages ISSUE #33 (12/86) ISSUE #34 (2187) • ISSUE #35 (4/87) ISSUE #36 (6/87) ISSUE #37 (9/87) SOLD OUT Maintaining PCs Keeping Your Hard Drives Running Troubleshooting PCs XT Theory of Operation Simulating A Bus Ray Tracing 96 pages ISSUE #43 (9/88) Building Databases Build a C Database Selecting a dBase III Compatible Compiler Working with Paradox Designing Custom PC Cards Accessing dBase III Plus Records from Turbo Pascal 96 pages ISSUE#44 (11/88) Object-Oriented Programming A Taste of Small talk Actor Thinking Objectively Building MicroCad Peripheral TechnologyPT68K-2 Hercules Graphics Printer Dump 96 pages ISSUE #47(5/89) Robotics The LIMBO Project Starting A Robotics Company How To Write and Use A SystemProfiler Problem Solving and Creativity Turn Your XT Into A Controller Writing Code For Two Operating Systems 96 pages ISSUE #48(7/89) Tools For The Physically Impaired The Adventure Begins Selecting A Talking Computer For A Blind Friend Writing Software For The Blind File Transfer Via The Parallel Port The LIMBO Project-Part Two PCX Compatibility A 68000-Based Multitasking Kernel The Very Early Days of Computing 96 pages ISSUE #49 (9/89) IIO,VO.•. ISSUE #45 (1/89) Computer Aided Design CAD In A Consulting Business Choosing PCB Layout Systems Building Circuits With Your Computer Secrets of Optimization Finding Bargains in the Surplus Market MASM5.1 96 pages Build A Computer The Easy Way PostScri ptals Prog. Logic Controllers Driving Stepper Motors Writing TSR Programs Low Cost I/O For The PC InterfaCing 16-Bit Devices 96 pages ISSUE # 50 (11/89) ISSUE #38 (11/87) 3-D Graphics Parallel Processing 3D Surface Generation PC Video Frame Grabber LIMBO, Part Three PostScript, Part Two UNIX For The PC Capturing & Graphing A Voice In Real Time: Part 1 Laser Printers, Typesetters And Page Definition Languages Build A Graphics Scanner For $6, Part 2 Writing A Resident Program Extractor In C 96 pages ••• ISSUE #39 (1/88) PC Graphics Drawing The Mandelbrot And Julia Sets Desktop Graphics Designing A PC Workstation Board Around the TMS-34010 96 pages To Order: ISSUE #40 (3188) United States, The Great C Issue Issues #1-34 Issues #35-current $3.00 each ppd. $3.95 each ppd. Canada & Mexico All issues $5.00 each ppd. 11 C Compilers Writing A Simple Parser In C C++, An Object Oriented C Source Level Debugger For TurboC 96 pages Phone: Mail: 1-800-888-8087 PO Box 223 Bend,Oregon 97709 AD~:~S~EX ISSUE 51 170 72 160 179 4 AISN Software ..........93 AcquiredIntelligence . . . . . . 71 Annabooks . . . . . . . . . . . . 55 Argon Technology Group . . . . 91 Austin Codeworks . . . . . . . . 35 147 Berry Computer . . . . . . . . . . 5 31 15 167 7 158 143 CC Software . . . . . . . . . . . . 77 Carlson, Paul ...........91 Cascade Electronics . . . . . . . . 25 Computer Book Outlet . . . . . .91 Compuview Products, Inc. ... 7 Cottage Resources . . . . . . . . 91 Covox . . . . . . . . . . . . . . . 6 174 Daytron . . . . . . . . . . . . . .55 16 Dreamtech . . . . . . . Inside Back Emerald Microware . . . . . . . 33 Epoch Data . . . . . . . . . . . . 52 Erac Co . . . . . . . . . . . . . . . 63 Eckel, Bruce ............95 112 Garrison . . . . . . . . . . . . . .73 .... Genus Microprogramming .. .19 176 127 162 177 .... 40 173 182 154 JRT Systems . . . . . . . . . . . 69 175 Kilgore Software 181 42 .... 37 2 165 . . . . . . . . 67 MCR . . . . . . . . . . . . . . . 91 McTEK . . . . . . . . . . . . . . 75 Micro Cornucopia . . . . . . 71,93 Microprocessors Unlimited " 77 Microsphere, Inc. ... Inside Front Mt. St. Helens Software . . . . 13 Sampson Engineering . . . . . . SemWare . . . . . . . . . . . . . Semi-Disk Systems . . . . . . . Silicon Alley . . . . . . . . . . . Sin tar Software . . . . . . . . . Star-K Software Systems . . . . Sutrasoft . . . . . . . . . . . . . Symmetric Research . . . . . . . 91 53 36 47 87 44 21 91 183 Tools and Techniques . . . . . . 87 178 Traxel Labs . . . . . . . . . . . . 12 .... NTERGAID . . . . . . . . . . . 91 110 Nu-Mega Tech . . . . . . . . . . . 2 168 University Degree Advisory .. 93 62 V Communications . . . . . . . 57 161 Opal Fire Software 10 135 93 .... .... RJSwantek Inc . . . . . . . . . . 37 171 Ry Ie Design . . . . . . . . . . . 93 180 IDEC . . . . . . . . . . . . . . . 15 149 Information Modes . . . . . 21,91 22 Integrand............. 45 . . . . . . . 73 3 PC Tech . . . . . . Back Cover, 91 119 Peripheral Technology . . . . . 76 124 WenhamSoftwareCo . . . . . . 91 169 Western Wares . . . . . . . . . . 72 164 Whitney Software . . . . . ; .. 91 139 Quantasm Corp . . . . . . . . . 15 39 Xenosoft .... Recon Technology . . . . . . . . 93 129 Research Group . . . . . . . . . 61 .... Revolution 2 . . . . . . . . . . . 49 70 Zortech . . . . . . . . . . . . . . . .1 . . . . . . . . . . . . . 93 Contact Advertiser Directly. When you write for information, please tell these folks you read about their products in Micro Cornucopia. Now Available From Micro C Computer Interfacing with Pascal & C by Bruce Eckel Use your PC parallel port for digital input and output Build an Adapter Card for your PC Design and build electronic circuits Order From: Micro Cornucopia PO Box 223 Bend, OR 97709 1-800-888-8087 "With wit and superb technical figures, Bruce captures the essence of making electrons out of bits and vice versa." Jeff Dunteman, Dr. Dobbs • c++ Pointers, from Walter Bright • Inside C++ 2.0 • Building an AT Keyboard Interface • TTL Families Explained • Filling Memory Holes on Your XT • Neural Networks, Part 2 Only $30 ppd. Add $10 for foreign orders Includes Book & Disk MICRO CORNUCOPIA, #51, Jan-Feb, 1990 95 By Gary Entsminger P.O. Box 2091 Davis, CA 95617 THE LAST the way the brain does it; Thinking => the results the brain gets. These views represent the strong and weak schools of AI. The weak school at its most pliant (according to philosopher Keith Gunderson) claims that computers can perform tasks that previously required intelligence, without using any intelligence at all. An expert system belongs in this paradigm since it typically classifies new information based on rules extracted from a human expert. The expert was (presumably) intelligent. The expert system will seek answers, give advice, or classify by looking things up. Looking things up isn't all that intelligent. Rule-based systems also belong to the domain of the top-downers in the AI community. Alan Turing, Herbert Simon, Allen Newell, Edward Feigenbaum, and Roger Schank are all topdowners, and their thinking about thinking has dominated AI research for 30 odd years. 96 MICRO CORNUCOPIA, #51, Jan-Feb, 1990 Brains, Neural, Networks, & Expert Systems Rule-based systems, scripts, and frames are the tools of the AI top-down trade. The "intelligence" of any of these systems is generally static. No dynamic learning system based on rules has ever been successful. In a fascinating study of the "big issues" in science, called Paradigms Lost, John Casti sums up the top-down position- Put crudely, the top-down thesis is that human thought processes take place as a result of rule-based symbol processing in the brain.... Top-downers blithely forget about brain states altogether, and just assign machine states to cognitive states, much in the same manner as we assign ASCII codes to alphanumeric symbols. A set of rules (usually termed a semantic network or conceptual dependency graph) telling how these machine states can combine with each other is then postulated, and the resulting machine states are decoded to give an interpretation .... This, in a nutshell, is the strategy of the entire top-down approach to AI. The top-down approach is software oriented, ignoring the hardware (our brains) almost entirely. Bottoms Up The bottom-uppers take the opposite approach. In their view we'll learn more about thinking by working from the level of primitive processors (the neurons in our brains) up. Strong AI. Neural networks and the work of bottom-uppers-Douglas Hofstadter, Geoffrey Hinton, Douglas Lenat, and (strangely enough, considering his early criticism of perceptrons-neural network-like systems) Marvin Minsky-are beginning to shed a bit of light on the thinking question and show promise. Neural networks' aren't technically that complicated (see Russ and Roy's article in this issue) but are, I think, philosophically and technically appealing. The net uses patterns of bits instead of individual bits to process information. Since a network looks for patterns rather than at the status of individual bits, no single bit is crucial. The network can deal with minor variations in input and still produce the right output. I'm inclined to think that this more nearly mirrors our thought processes. Humans are associators, often guessers-we take informal statistical samples and make decisions based on a best-fit scenario. One memory leads to another. We often forget details, but still recall the overall picture. The bottom-upper's view is also consistent with most physicists'-we can't know individual particles precisely ,·(their momentum and location), but we ,.-,can know quite a bit about the behavior of a group of particles. ,Bottom-uppers haven't answered the big-think question, and probably won't, but they're tilting the AI community in an intriguing direction. For now of course, who knows how we do it. Think, I mean. According to Aristotle- It often happens that a man cannot recall at the moment,but can search for what he wants and find it.. .. For this reason some use places for the purposes of recollecting. The reason for this is that men pass rapidly from one step to the next: for instance from milk to white, from white to air, from air to damp; after which one recollects autumn, supposing that one is trying to recollect that season. References Casti, John L., Paradigm's Lost, 1989, William Morrow & Co. And thanks to Al Goldberg for stimulating this discussion. ••• The Computer Store America'sjinest in computer mail-order is having their biggest sale ever•.• ~1rlhle $3 $19 $15 $12 $65 $10 6' Parallel Printer Cable DIream ~§§ ®~ Molded & shielded with thumb screws 30 Megabyte mM Compatible AlB switch Box 12 MHz CPU with 640K RAM installed 30 Megabyte bard disk drive (3.5" 4(km aYCrIF accesl) 128K Expanded memory installed (LIM4.0) 1.2 Megabyte or 360K 5.25" floppy drive Floppy controller (will control up to 1.44MB floppy drives) High resolution amber monitor with tilt/awi~ hue Hercules compatible graphics Professional enhanced keyboard 1 year warranty Reg. $995 For parallel printers Joystick With auto centering & rapid fIre Game & Clock Card Logitech C-7 Mouse Senal Mouse with software Nashua DSHD Disks Box of 10 high density disks in plastic carrying caase VGA Card All computer systems can be customized to your exact specifications ~1rItne DIream~2g~® Capable of 1024 X 800 with 256 colors ~1rItne =:a. $185 DJream-386® =- Our 40 Megabyte mM AT Compatible Our 40 Megabyte 386 Speed Demon 12 MHz CPU with 1 Megabyte RAM installed 40 Megabyte bard disk drive (28ms average access) 1.2 Megabyte 5.25" floppy drive Hard & floppy disk controller card (1:1 interleave) 14" High resolution flat screen amber mo:nltc)r Hercules compatible graphics Professional enhanced keyboard 1 year warranty 16 MHz CPU with 1 Megabyte RAM installed 40 Megabyte bard disk drive (28ms average access) 1.2 Megabyte 5.25" floppy drive Hard & floppy disk controller card (1:1 interleave) 14" High resolution flat screen amber monitor Hercules compatible graphics Professional enhanced keyboard 1 year warranty Reg. $1495 . Reg. $1995 ~~e $ lili~5 Upgrade any of these computers to color (monitor and adapter) CGA +$150 EGA +$325 We carry a complete selection of••• Citizen GSX-140 24-wire 192 CPS Printer Color on command® Advanced Paper Handling Command Vue® LCD console eliminates dip switches Advanced paper handling including paper parking Push/pull tractor with bottom, top, and rear feed 2 year warranty Reg. $595 Above with 20MHz CPU Reg. $2295 VGA +450 $1.dJ95 c....~e $ 1. 7lf1\ f!: ~ Y ~ ~~e ~~e $ 345 If you need it, we have it... for less. Give us a call ... Hard/Floppy Drives Memory upgrade cards RAM chips 110 cards Modems Monitors Printers Diskettes Digitizers Cables Ribbons Software ... andmore With name brands like ... Apple Citizen Seagate Everex· Maxtor Micropolis Sony Miniscribe Samsung Borland Logitech Microsoft Xerox SCQ Aldus Novell Hayes NEC Curtis Toshiba Fujitsu . .. andmore IBM DreamTech (408) 996-2373 'In the heart o/Silicon Valley' 5175 Moorpark Avenue San Jose, CA 95129 PriCCII arc subject to change without notice. All aales arc FOB San JOIIC, and arc subject to prior sale. A 3% surcharge applies for all MC and VISA lransactionl. California relidcnts add 7% sales tax. 1bc fdlowing trademarks arc recognized: IBM PC/XT, AT to IBM Corporation; Hercules to Hcn:ules Computer Teclmology, Inc. Other product names arc trademarks of their IIWIUfacturcrs. This ad is a copyrighted publicatilD of DrcamTcch with III rights re~ Distributed Miao Cornucopia, January, 1990. Reader Service Number 16 VERY HIGH PERFORMANCE Processors, Memory, and Display Adapters The X24 High performance processor • • .• • • 12 or 16 MHz 80286 with NO WAIT STATES! Small size ("XT" height and length) passive bus design 1 to 4 Mbyte 0 wait state dynamic memory Fully "AT" compatible Award BIOS Runs DOS versions 2.2 and later, Xenix and OS/2 The X24 combines the best of matherboard and backplane designs In a tOO% AT compatible system. Incorporating a t6 MHz 80286, the X24 processor Is designed to operate with the PC Tech Advanced System Motherboard, wh ich contains the peripheral interfaces (hard disk, floppy disk, two serial ports and a parallel port). The X24 processor can also be used w~h other totally passive bus backplanes. Most critical components including the microprocessor and up to ~ megabytes of fast memory are contained on a single PC size plug-in card. This allows the processor and main system memory to be serviced or upgraded without disturbing other peripherals such as serial ports and disk drives. PC Tech X24 and ASMB The PC Tech Advanced System Motherboard • Built in "IDE" interface for AT interface type hard drives • Fully AT compatible floppy disk support for 3.5",5.25" drives, capacities of 360k, 102m and 1044m • Two serial ports and one parallel port • 8 total expansion slots PC/XT/AT compatible (4 slots have 32 bit bus) eeh Th e PC T Advanced System Motherboard is designed to complement PC Tech's X24 and X32 high periormance processor cards. It contains the mass storage interfaces necessary for a complete system, plus the basic I/O required in most systems. Extra care has been given to FCC compliance by design. 34010 Monochrome Graphics Adapter II PC Tech Mono-II • Up to 384k bytes display memory • Up to 2 Megabytes program memory • Software is RAM based, allowing complete operating software replacement and timing re-programming from the host bus • 34010 program loader included. Assembler, debugger, and C compiler available. • Full hardware and software CGA, MDA and H ercules emulation • Single bit shared memory bit-map with optional resolution up to 2048 x 1536 (736 x 1008 standard) • Very high resolution COLOR version available • Custom 34010 software development available The TMS340tO is a true general purpose graphics processor. PC Tech makes the total processing power of the 34010 available to both programmers and end users. Our 340tO Monochrome Graphics Adapter is designed to allow programming from the PC/Xf/AT host bus. You can completely replace our 34010 software w~h yours to directly hamess the incredible image processing power of the TMS 34010 for your application. We make a complete set of development too ls available, including an assembler, C compiler, program loader, 34010 debugger, and PC interface tracer/debugger. Our standard product includes support for extended CGA, MDA and Hercules emufation as well as a host addressable graphics bit- map. We also support and recommend the DGIS graphics interface standard (from Graphic Software Systems) for applications development as an a~ernative to nalive 34010 software development. Ready to run drivers are available for most major applications software packages as well. Custom Designs Available PC Tech will license most products for non-exclusive manufacture . We will also customize any of our deSigns to better meet your needs on our io-house CAD systems. All of our standard products are available in private label versions. About PC Tech PC Tech has been designing , manufacturing and marketing high performance PC related products for over three years. Our standard product line includes processor, memory, and video products. All products are designed , manufactured and supported in our Lake City, Minnesota facilities. Designed, Sold and Serviced By: High resolution fractal produced on the PC Tech COLOR 34010 907 N. 6th St., Lake City, MN 55041 (612) 345-4555 • (612) 345-5514 (FAX) PC, XT, AT, DGIS, Hercules, and Award BIOS are trademarl
Source Exif Data:File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.3 Linearized : No XMP Toolkit : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37 Create Date : 2013:01:25 15:23:52-08:00 Modify Date : 2013:01:25 18:24:52-08:00 Metadata Date : 2013:01:25 18:24:52-08:00 Producer : Adobe Acrobat 9.52 Paper Capture Plug-in Format : application/pdf Document ID : uuid:2aa4cad6-7fcd-4e50-885d-0edf2ad613d0 Instance ID : uuid:e22af5c9-4216-4e08-adfa-83ce9819b413 Page Layout : SinglePage Page Mode : UseNone Page Count : 100EXIF Metadata provided by EXIF.tools