t the small s yste AUGUST 1983 Vol. 8, No. 8 $3.50 in USA $3.95 in Canada/£2.10 in U.K. A McGraw-Hill Publication 0360-5280 nnal How to quickly re If you'd like to turn the agony of small business bookkeeping into the ecstasy of total control, you've come to the right place. Because even if you're starting with a shoe box full of invoices or a pile of checks hiding under a pile of deposit slips, we can tell you how to centralize, organize and monitor all that information, and manipulate it in ways that will make your business a pleasure — all with an Apple* III Personal Computer. Attain instant financial status. An Apple III, teamed with the BPI General Accounting Package, can put every basic accounting function right at your fingertips. Technically, that means General Ledger, Accounts Payable, Accounts Receivable and Payroll— all in one package. Meaningfully, that means you can turn numbers into answers. With BPI, your Apple III can give you a snapshot of your company's financial condition, an up-to-the- instant balance sheet. It can also generate . . ■ j, instant and 3 J ; ^ ., > detailed - J /W^ reports **VV TOW' <0W tf# gainyour balance. on your customers and vendors. So you know who owes whom, how much, and how come. And just how well your cash flow is flowing. And where to give credit where credit is due (a customer inquiry The BPI General Accounting Package also lets your income statements be coded by location, department or product line. So you know where your money's coming from. And where it's not. results will make an important statement to everyone you deal with — including your banker. More ways Apples pay. There are more people in more places doing more things with khlban Fish Supply Conpany Consolidated intone Statenent Current Comparative i Ending Ban 31. 1983 and n> 31. 1982 52,818 62 91 3 5,816 88 8 J •U.176 52 92 1 3,588 88 1 3 31,886 55 66 7 !,4B9 35 1 2 Your Apple can generate instant income statements (with expense ratios) or balance sheets, and let you compare them to last month's or year's, then print them out to suit your banl THE NEW AMPLOT-I PLOTTER APPLICATIONS S ALL BUSINESS. Analytical data display • Mathematical functions • Geo- metric patterns • System/component characteristic display • Statistical charts • Workflow diagrams • Per- formance graphs • Organization charts • Creative graphics • Personal achievement charts • Instruc- tional/reference diagrams. » : >: -k*i' J The new AMPLOT-II, on computer command, can automatically produce hard-copy, 6-color business or engineering graphics in minutes. Designed for the end- user and OEM applications, its high pen speed, auto- matic pen retrieval and high resolution assure fast, accurate 10" x 14" plots. Compatible with most per- sonal computers, the AMPLOT-II is economically priced at only $1299.00 retail. Just circle the reader service number for complete engineering details. 2201 Lively Blvd. • Elk Grove Village, IL 60007 (312)364-1180 TLX: 25-4786 REGIONAL OFFICES: Calif. (71 4) 662-3949 • Amdek . . . your guide to innovative computing! \ ■■■; »fi t UA-> ■ etters to measure these low-energy x-rays for the equivalent of 10 to 12 hours of use per day for a full year, at levels a small fraction of the 100 mR average annual dose. It is the function of the Bureau of Radiological Health to make such measurements and issue warnings if the background level is increased. Surprisingly, the ionizing radiation potential of the video display and its counterpart, the TV screen, is not from its x-ray potential but from its efficiency as an electrostatic precipitator. In the air of all buildings there is a radioactive noble gas called radon. When radon decays, the radioactive daughters formed are posi- tively charged and are attracted to the glass surfaces of the display tube, adher- ing to the glass until the daughter's decay. We have used this phenomenon for some years to estimate the amount of radon in homes. When the TV set is turned off and an alpha counter is applied to the screen, a rapid count indicates the need for espe- cially careful radon daughter measure- ments. This buildup of radiation on the viewing screen may disturb Gogol, but I for one would rather have these radon daughters on the screen than in my lungs. While the national average background is about 100 mR/year, there are wide vari- ations. The area south of Chicago has water wells and radium-bearing soil that can increase this average by as much as 10 times. Similarly, the New England states have areas of granite rock in the ground that can increase the natural background 10 to 50 times. However, epidemiological studies indicate these states to be as healthy as any in the U.S. When actual measurements are substituted for assump- tions, no correlation between radiation and health can be shown (Beck and Krey in Science, April 1983, pp. 18-24). Gogol has quoted Dr. John Gofman's book Radiation and Human Health as the authority on ionizing radiation. Gofman and about 10 others have taken the posi- tion that the radiation dose below 10 mR/year is more harmful than the linear model will predict. However, most au- thorities have agreed that health effects cannot be scientifically verified below 10 mR/year. The linear model was chosen by the NCRP and the BEIR committees not because it could be scientifically verified but because the levels produced were con- sidered safe and allowed dose calculations to be made relatively easier. This model extrapolates radiation effects from the 10 BXT 6>NR' TtB DAISY WHEEL PRINTER • Full Olivetti typewriter warranty • U.L. Listed $695 plus shipping FEATURES • Typewriter operation with nothing to disconnect • 10, 12 or 15 characters per inch switch selectable • Portable with carrying case • Entire interface mounted internally in the Olivetti Praxis 30 typewriter • Underlining • Cables available for most computers • Service from Olivetti dealers • Centronics compatible parallel input • Built in self test • Cartridge ribbon • 2nd keyboard switch selectable. CBYTE WRITER 125 NORTHVIEW RD., ITHACA, N.Y. 14850 (607) 272-1 132 mR area to 0, where no radiation effects are assumed to be produced. In this no- man's-land below 10 mR, Dr. L. D. Luckey has also written a book called Hormesis with Ionizing Radiation, pub- lished by Chemical Rubber Press (the book costs $60, so it might be advisable to check it out of a library). Hormesis is a neologism that, loosely translated from the Greek, means "beneficial effects." Dr. Luckey has listed more than a thousand experiments with plants and animals that exhibit beneficial effects in the 10 to 50 mR/year region. He would be the first to point out that there is still no absolute proof. However, the total biological evidence is not helping the case of in- creased health effects/mR in the region below 10 mR/year, the position taken by Dr. Gofman and several others. The second authority Gogol quotes is Paul Brodeur's The Zapping of America. The only review I have seen of this book is a short one in the Health Physics Newslet- ter warning that the book is long on claims and short on proof. Because the subject is radio frequency and micro- waves, most readers of BYTE have enough background to deal with it. This nation has enough troubles with the economy and displaced or discarded energy without taking sides in a scientific debate about whether or not harm exists. The readers of BYTE will agree with me when I say it pays to believe almost nothing that you hear and to be very critical of what you see. P.T. Perdue 103 Oak Lane Oak Ridge, TN 37830 Enhancing Usability I am writing in response to Gregg Williams' editorial (April, p. 6). Recently I purchased a microcomputer and have ob- tained first-hand information about usability from the software I've been using with it. I have some ideas that could make life easier for many people complaining about usability. First, it is not accurate to say that nobody knows what makes software easy to use. There is a great amount of literature on laboratory studies of the sub- ject. There are even more papers on the subject — not always so well supported, but by human-factors experts. One principle of usability is to make programs and parts of programs indepen- 12 August 1983 © BYTE Publications Inc Circle 58 on Inquiry card. EE/EPROM PROGRAMMERS & UV ERASERS INTRODUCING OUR NEW CANGPRO-8 & PRONIPRO-8 GANGPRO-8 (BSSBwflj =l£ Slf 5lE gig g!| gi! a I iff if n 11 -I 1 ! 1 -it t nd • n IB lB — H • I ■ IB MHWI ■HHi GANGPRO-8™ MULTIPROGRAMMER $1295.00 GANGPRO-8'" allows user to program up to 8 EE/EPROMS simultaneously using the latest state of the art programming algorithms. It can test and duplicate a wide variety of devices from 16K to 256K. There are no personality modules to buy, 8 digit alphanumeric display prompts user with messages, This unit is ex- tremely easy to operate and is ideally suited for a production environment. QXJV-T8™ series UV EFKOM ERASERS OUV-T8/2T ($97.50) is an industrial quality eraser, designed in a steel enclosure with a 5" wide tray. UV indicator lens, antistatic pad, 60 minute rugged timer and safety interlock switch are standard. Capacity is 24 EPROMS, 15-20 minutes erase time for 15 EPROMS. QUV-T8/Z ($124.95) Similar to QUV-T8/2T (with 40% faster Erase Time). QUV-T8/2N ($68.95) Same as the Q.UV-T8/2T version without the timer and safety interlock switch. QTJV-T8 / 1 ($49.95) Economy model in a molded two part plastic case. Erases 15 EPROMS In 20 minutes. PROMFRO-7™ SERIAL RS-232 STAND-ALONE $489.00 MCS-48* FAMILY PROGRAMMING WITH PROMPRO-71 PROMPRO-7™ is an intelligent self-contained unit, ideally suited for engineering development, field service, or production. It can program and verify a wide variety of 8K to 128K EPROMS. This unit has a 32K (4K BYTES), internal RAM Buffer that could be accessed by the user through a computer or terminal. This unit can also program the micro chips such as the 8478, 8749, 8751, 8741, 8742, 8755. The price Includes all modules up to 32K EPROMS 8c The 8748 8c 8749H Micros. Upload/download is done by either Motorola or Intel Hex format. PROMPRO-8™ SERIAL RS-232 STAND-ALONE $689.00 This extremely versatile programmer has as much as 128K (16K x 8) of internal RAM dedicated to the EE/EPROMs. This RAM buffer can be accessed either through a computer terminal, or by user target system (EPROM emulation). PROMPRO-8 8 digit alphanumeric display prompts user with the system messages. A keypad option is available for standalone editing. An impressive range of devices are programmed (as standard feature). •MC&48 is a registered trademark of Intel Co. Circle 239 on inquiry AVAILABLE SOFTWARE DRIVERS 1. IBM PC 5, TEKTRONICS 8002 2. APPLE n 6. ATARI 3. MDS-ISIS 7. TRS-80 COLOR 4 CPM 8. FLEX QE3OGQ0 */i4e R,Uf/d Catufunettt j/Ofr If curt, ZptoHHA, at the, (lUflit P>uce-! LOGICAL DEVICES, INC. 1321-E N.W 65th PLACE ■ FT. LAUDERDALE, FL 33309 (305) 974-0967 DISTRIBUTORS WELCOME FOR QUALIFICATION card. Inter tec Offers ShouldVe Offered. yearifcctory VfeJtanty HHl The rationale behind the conventional 90-day warranty is that anything likely to go wrong will go wrong in the first 3 months. But it can take 3 months just to get comfortable with a new system. That's the honey- moon-period, when you treat your equipment with the deli- cacy of a safecracker. CompuStar can network up to 255 intelligent terminals and give each of them access to common or restricted databases. Ah, but now it's 5 months down the road, the honeymoon is over, your equipment has finally begun to justify its cost, and that's the afternoon your processor's fan succumbs to fatigue. Or maybe the malfunction is more gradual, like a disk- head drifting increasingly out of alignment. Or more elusive, like an in- termittent failure due to border- line components. When\bu BuildThem Stronger, You Can Back Them Longer. And that's why all Intertec terminals, computer networks and disk storage systems come with a full year of coverage. Not because you'll need it,but to assure you that you won't. *CP/ M is a registered traik'tiutrk ot Digital Research. ^Microsoft Btisic is a tvgistered trademark of Microsoft Corporation. Circle 214 on inquiry card. See— unlike other makers, we know what we're standing behind. We don't slap Intertec nameplates on other people's parts. We build virtually all our equipment ourselves. And we assemble it ourselves. And we test and re-test it ourselves. More Bytes For \bur Buck. That's also why we can offer you flatly superior dollar-values. In single-user desk tops, for example, our SuperBrain offers ~^~" twin Z80s, standard; 64 kbytes of dynamic ram, standard; up to 1.5 mbytes of disk storage, standard; CP/M2.2*andMBasic| standard. And compared to conven- tional multi-user systems, our CompuStar systems can give you many more hours of productive labor every day— because, instead of depending on a central processor for data manipulation, each worksta- tion in a CompuStar network has its own processor and its own 64 kbytes of ram. As a result, you can have anywhere from 2 to 255 work- stations working simultaneously without suffering noticeable declines in execution-time. Why Just Expand When \bu Can Up-Grade? In fact, if you assess your expansion alternatives in terms of relative payback potential, you're very likely to find that up-grading with Intertec equip- ment from scratch would be more cost-effective than burdening your existing instal- lation with add-on's. Dollar for dollar, the Inter- tec system is apt to be not only faster, more powerful and more versatile, but more reliable and better supported. Service On Site? Within 4 Hours? In addition to our one-year warranty, and the carry-in service provided by authorized Intertec dealers, we also have 600 factory-trained technicians to provide service on-site in 120 U. S. cities, often within 4 hours. To arrange for that service Since we build our equipment from scratch, we can afford to do it right and still hold down our prices. just call our Customer Services Department at 803/798-9100. At the same time we'll be happy to give you the name of your nearest Intertec dealer. Or write on your letterhead to Intertec Data Systems Cor- poration, 2300 Broad River Road, Columbia, SC 29210. intertec BYTE August 1983 15 woul 'ou want any other compi C86 - For Professional Programmers Complete C Tight Code No Royalties Library Source ► C - The Language for Professional Programmers: C combines full control of the machine with the best productivity features. C is used by: IBM Bell VisiCorp Digital Research MicroPro Wang Microsoft » A Complete Implementation - C86 includes all of the features described by Kernigan and Ritchie. C86 delivers portability, consistency, FULL C. » Extensions include long identifiers and additional data types. » Tight code is produced by C86. Only needed code is linked from the library. The January 1983 Byte benchmark shows C86 as the fastest. » No Royalties are payable to us on C programs you sell. » Library Source provided includes UNIX I/O support, interface with and control of the Operating System and of hardware, all functions described in K & R, a Mathematics Library, and a Trigonometry Library. ► Overlay Support allows development of large programs. ► Assembler may be used to write a function. Macro support can increase productivity. Programs are ROMable. Our Update Policy helps you to keep the Best Personal Com- puter C Compiler for the 8086 as the technology improves. See your Dealer for: □ Free Information: "C86 Product Description" NC □ "The C Programming Language" by K & R $ 25.00 □ "The G86 User Manual" 35.00 □ C86 Compiler Diskette and Manual 395.00 We support all common formats under PC-DOS, CPM-86, MSDOS and MPM-86. VISA and Master Card accepted. They Say It All... We Do It ALL Computer Innovations 10 Mechanic Street Suite J-1 04 Redbank, NJ 07701 201-530-0995 C86 Is a trademark ol Computer Innovations, Inc. CPM-86 and MPM-86 are trademarks of Digital Research. MSDOS Is a trademark of Microsoft. PCDOS is a trademark of International Business Machines. Prices subject to change without notice. dent. In other words, an editor edits; a word-processing program processes a file to produce text output. The future does not lie along the path of integrating these two functions, as with 1-2-3 or MBA, but in separating the functions. For example, in my editor, when I want to end a line, I should be able to press Enter. There should be no implication to a coupled word processor that Enter signi- fies the end of a paragraph. If I want to signal the end of a paragraph, I'll signal that in the file I'm editing, using a word- processor command, as a separate step. There is no magic in being able to in- clude spreadsheet output into a memo or book chapter. I should be able to copy it into the file I'm creating with my editor, or to point to it, in the file, by means of some imbedded command. The structure of the editor output, the word-processor input, and the spread- sheet output should not imply among them any native relationships or coupling. I use such uncoupled software in my job; there is no reason that it cannot be devel- oped for microcomputers. In this light, the new advances may signal greater sophistication but not nec- essarily greater ease of use. A desktop manager is only a sophisticated analog for being able to copy one file into another. Robert C. Maegerlein 218 Watchung Ave. Upper Montclair, NJ 07043 On Structured Programming As a professional programmer and a structured-programming maven as well as the owner of an S-100, 8-inch CP/M per- sonal computer, I have watched the lan- guage diatribes fly back and forth with great interest. Although I realize my status as a high priest will leave my opin- ions open to suspicion, I wish to make a few points about programming and lan- guages in general. Despite anything else that may have been uttered in haste about structured programming, the primary lessons of a structured approach are to figure out what you want your program to do, what type and form of data it is intended to in- put and output, and how your program will interact with its user, before you write a single line of code. The software designer usually uses some kind or combination of hierarchical tree chart, Verner-Orr diagram, and/or 16 August 1983 © BYTE Publications lnc Circle 92 on inquiry card. Circle 141 on inquiry card. I Before you buy a printer look at the fine print. There's a big difference in printers, and the proof is right before your eyes. This is an actual printout from Digital's Letterprinter 100. As you can see, it's good enough to send out to customers. But that's not all the Letterprinter 100 can do. Suppose, for instance, you're in a hurry. Just push a button and you can print out a whole page op draft copy in less than ten seconds. There are other fine points. You can see how the Letterprinter 100 can print multiple typefaces. It can al30 print in BOLD, cLo"U.tol e — vsrici'fc.ri and condensed . And do all these styles automatically, without stopping. And with its wide range of graphics capabilities, you can even draw your own conclusions. 15.0 12. 9. 6.0 3.0 0.0 1 ~p - &*& .OANJ - " - is n flNVENtn - - 15.0 12.0 9.0 6.0 3.0 0.0 You simply can't find a more versatile printer than the Letterprinter 100. And it's just one of a family of printers we offer for Digital's personal computers and video terminals. Including a daisy-wheel printer, the LQP02, and a low-cost Personal Printer, the LA50, that still make you look good on paper. So now that you've read the fine print, see our fine printers. Call 1-B00 -DIGITAL. extension 700. for the distributor near you. Or write Digital Equipment Corporation, Terminals Product Group, 2 Mt. Royal Avenue, UP01-5, Marlboro, Ma. 01752. ¥ « i «T..i Letters. flow chart to develop program function, and these very high-level, abstract designs are then translated to pseudocode that describes in detail the operation of the program in English, Latin, an arbitrary mixture of C and PascaL or however you desire. This includes logic, mathematics, and I/O in any form. These steps are iterative — that is, the high-level designs are modified according to the needs dis- covered by the pseudocode, and the pseudocode is redefined by new, more elegant approaches that become obvious from the tree/flow charts. So the pseudo- code starts as a simplistic statement of functions that quickly evolves into a detailed list that will greatly resemble a usable computer language. From this point, it is easy to translate the pseudocode to any computer language that is appropriate to the functions to be performed, the speed/memory require- ments of the target computer, and the fluency of the programmer. This ap- proach even allows for structured BASIC. Is this a lot of work? Yes, but it is plac- Once you've stored important information on full size or mini-diskettes, the trick is to keep it there the way you stored it. That calls for a rugged first line of defense against dirt and grit, sharp objects, bending or pressure and all the other enemies of magnetic media. And your best defense Is Ring King. You get full protection for every disk, easy retrieval, ready label reference for fast searches, and maximum storage in minimum space. For the full story on all the Ring King Data Defenders, see your Ring King Dealer or write for our Magnetic Media Filing Systems Catalog, showing our full line of storage and retrieval systems. Ring King Visibles, Inc., 215 W. Second St., Muscatine, IA 52761. (319) 263-8144. Diskette filing systems by ing the burden at the front, so much less time is necessary to test and debug the final result. The structured approach also allows for another benefit rarely con- sidered by hackers or even by a lot of my fellow high priests: documentation. A program for strictly in-house use will be difficult to use after the coding is no longer fresh in your mind, and even more difficult to modify. With structured pro- gramming, when you fix your program, you can be aware of all the ramifications. As for languages, my preference is for any language that allows me to maintain my logic structure easily within the code, a natural for all the ALGOL descendants (PL/I, Pascal, C, Ada, etc.). However, due to my work, I find myself quite often running afoul of these strongly typed lan- guages and have to resort to good old FORTRAN. At least it runs fast, is good at math, and has mixed-record I/O. FOR- TRAN 77 allows something of both worlds, although it doesn't have data structures. BASIC also has its place. Although not prone to informational error messages, BASIC is easy for a beginner to learn and get instant gratification from. With the advent of compilers, BASIC can also generate code that executes at a reasonable speed, although I need separately compiled subroutines. Compilers that examine all of your code let you see all of your programming errors at once, an enormous advantage when dealing with related variables and func- tions that may have been confused some- where along the way (built-in cross-refer- ences are a great help, too). Curtis W. Rendon Syntax Constructs Inc. 14522 Hiram Clarke Houston, TX 77045 Editor's Note: For further discussion of languages, see Jerry Pournelle's article, 'The Debate Goes On," on page 312. Mouse: Not So Mighty In response to Gregg Williams' editorial ("The New Generation of Human- Engineered Software," April, p. 6), the mouse of Lisa, Visi On, and their pre- decessor, the Xerox Star, is a truly fascinating hardware device, and on those few occasions that I have seen these devices in use, I have been impressed. But the mouse is not revolutionary, and, as its 18 August 1983 © BYTE Publications Inc Circle 341 on Inquiry card. Circle 412 on inquiry card. > OPEN YOUR APPLE TO A WORLD OF COMMUNICATION Videx'new PSIO Dual Function Interface Card gives you a whole' new world of communication . . . with a whole new ease or operation. The PSIO allows you to use a printer' (parallel output) • dnd a modem (serial l/OH port) simultaneously, through use of just one card! But best of all, • the PSIO makes com- municating through either method worlds easier than it's ever been before. The PSIO lets you choose from among an unmatched range of so ft ware -select able options, including vari- able baud rate selection, form width, form length, auto linefeed, linefeed mask, Xon/Xoff protocol, lowercase " masking, shift wire mod support, duplex mode, parity, data format, video echo mode and a slot echo mode. PSIO can also open up new worlds for graphics, since it can reproduce your picture on any graphics printer.' Rotate your picture, enlarge it, change it as you wish. Once you've chosen your options, the PSIO's highly sophisticated NOVRAM (non-volatile RAM) will remember and perma- nently save- them. That means you won't have to give the same config- • u rations over and over again . . . your PSIO will do it for you. And if you want to change those configurations, you can do it through software in- stead of through the con- fusing array of switches that other cards use. 7~he PSIO will work with any printer/modem you now hap- pen to own., .and it will work with any printer/modem you happen to purchase in the future. Adaptable? Definitely! 7"he PSIO is. completely compatible with BASIC, Pascal and CP/M® systems. The PSIO from Videx ...how in the world "mutJi?! Letters ______ name suggests, it is really nothing more than a rodent. Its functional predecessor was the light pen. Some years ago, light pens were fashionable devices for select- ing a particular function, and they are still in use. But displays attaching light pens had to have an appropriate phosphor, and they were not as easy to program as func- tion keys. About the same time, touch- sensitive screens were introduced, and they are still used in applications such as online catalogs in libraries; here, too, however, programming appears to be the chief stumbling block. If the name of the game is "ease of use," the industry would be far wiser to develop touch-sensitive displays than mice. Because a display has no moving parts, it is likely to prove more durable than a mouse. And a finger placed on a display screen does not require additional desk space, as a mouse does. If an executive were having an office conference, don't you think he might rather touch his screen a couple of times than roll a mouse around his desk pressing buttons on it? There are, obviously, many considera- tions at work in the development of new products. My bet, simply stated, is that the mouse is not a viable product. At best, it will limp along like bubble memory. John P. Rash President Acorn Data Ltd. 611 W. 111th St., Box 57 New York, NY 10025 The High Cost of Software I certainly don't pretend to be in favor of the theft of software, but I believe that software piracy is being fought with the wrong weapons. Perhaps software ven- dors need to reevaluate their marketing strategies. Simply keeping the price high because the market appears willing to sup- port it is both a greedy and naive ap- proach. Vendors are not solely to blame for high prices. I believe that the average con- sumer pays the exorbitant prices de- manded because he simply does not know the worth of a piece of software. If some- one tried to sell that same person a text- book for, say, $300, he would laugh. Yet the textbook may easily represent more hours of labor and may require more years of experience on the subject area to write. In addition, the book may not en- 20 August 1983 © BYTE Publication! Inc joy as large a market as a good piece of software does. I don't begrudge companies a fair pro- fit, but I do object to exploitation. I think that if anybody is being "ripped off" in this industry it is we the consumers, not the software companies. Perhaps they are the pirates. P. J. Lenk 2505 David Ave. Pacific Grove, CA 93950 New, Improved Compiler Jay Freeman's letter (April, p. 20) in regard to Intel's FORTRAN-86 version 1.0 points up some known difficulties with that past version of our compiler. The release of the FORTRAN-86 Compiler, version 2.1, that is currently being shipped to customers corrects bugs found in the previous version as well as provides new features. Kenneth A. Pomper Development Systems Operation Intel Corporation 3065 Bowers Ave. Santa Clara, CA 95051 Algorithm Amended I recently read Timothy G. Corrigan's "Add Dimensions to Your BASIC" (March, p. 307). The idea of indexing multidimensioned arrays with a single dimension index is sound and useful. However, the algorithm introduced is in error. For instance, for a two-dimensional array with a dimension X having a max- imum index of XM, and Y having a max- imum of YM, the formula given for the index is I = X X YM + Y Considering X to be the row dimension and Y to be the column dimension, you can see that this formula produces indices I from to YM associated with the first row (X = 0) of the matrix, as it should. However, the next element I that is pro- duced (for the second row, first column, such that X = 1, and Y = 0) is also YM. In every case, the formula repeats the last index I for the last row element for the ele- ment that is first in the next row. Ob- Now Attractive Industrial Quality Mainframes Enclosures as low as $200 Dual LED Display Shock Mounted 6 Slot Motherboard/Card Cage PS-lOl Power Supply Power & Reset Switches, A/C Filter, Fan, Etc. SDS-SIOO-SL 8" Floppy Drive Enclosure /System Special Lift Out Drive Rack Fits all Regular and Slim-Line 8" Drives Also Will Support 5-1/4" Hard Disk SDS-SIOO-MFL 5-1/4" Floppy and/or Hard Drive Enclosure/System SDS-MF2 SDS-MIC 12 Slot SlOO Computer Chassis or 8" Hard Disk Cabinet PS-lOl Power Supply This solid supply gives you the capability of running any variety oi 8" floppy or 5-1/4" floppy or hard disk drive as well as provides power lor a full SlOO-Buss Motherboard. Regulated: 8V @ 8 amp + 5V @ 5 amp + 12V @ 5 amp +24V @ 5 amp -5 or -12V @ lamp Unregulated: +16V @ 1 amp — 16V @ 1 amp SIERRA OfXm SCIENCES Fresno, California/ Product Support Division 25700 First Street, Westlake, Ohio 44145 (216) 892-1800 TELEX: 980131 WDMR Circle 355 on Inquiry card. 4-^/t f>"V" .'Ml *»*, On the Threshold f 8-Bit " At 8MHz, Sierra Data Sciences' new Z80 single- board computers are the first— and the fastest- microcomputers in their class. ' Under CP/M™ they perform like single user minis. Teamed with networking TurboDOS™ their 16-bit-buss-transfers amaze the demanding 16-bit multiuser world. And at Sierra Data's production- oriented price, they bring an ever- expanding universe of CP/M compatible software into a whole new realm of price/ performance reality. Solve your need for speed. Only a reliable manufacturer with Sierra Data's undisput- ed technical lead and established reputa- tion for support can deliver these fea- tures—all on board our new slave/ satellite single-board computers: HOKmORl soriwun WT Fr. Pr SIERRA DATA SCIENCES Fresno, California/ Product Support Division 25700 First St., Westlake, Ohio 44145 (216) 892-1800 TELEX: 980131 WDMR • Meets IEEE 696/S-lOO Standards • Z80H (8MHz) Z80B (6MHz), or Z80A (4MHz), • 64K/128KV 256KV512K* bank-select- able RAM in 4K incre- ments • High speed integer or Floating- point math chip* • 2 Serial ports • 2 Parallel ports • 4 Counter timers • 4K CMOS cache buffer, buss addressable in 16-bit or 8-bit increments • 4K/8K/16K EPROM • Operates under Sierra Data sup- ported CP/M 2.2**, CP/M 3.0** and TurboDOS 1.2** Make Sierra Data the heart of your ad- vanced system or discover one of ^H Sierra Data's cost- . systems. Sierra Data's single or multiuser 20M *& ,4' ; " '''**'*' , byte hard disk *M$MjUi system with 8 inch " M4 *«m 1 , slimline floppy-disk backup is shown above. Other popular configurations are shown on the previous page. Ask for Siena Data's product catalog today. 'Optional • • TurboDOS is a Registered Trademark of Software 2000 Inc. ■ " CPM is a Registered Trademark of Digital Research MICRO If you guessed that a Practical Peripherals Microbuffer™ printer buffer saves time, you're right. For the way it works, this inexpensive prod- uct is the most practical addi- tion to your microcomputer system ever. With Microbuffer, you don't have to wait for your printer to finish before you resume using your computer. Data is received and stored at fast speeds, then released from Microbuffer's memory to your printer. This is called buffer- ing. The more you print, the more productive it makes your workflow. Depending on the ver- sion of Microbuffer, these buf- fering capacities range from a useful 8K of random access memory — big enough for 8,000 characters of storage — up to a very large 256K — enough for 256,000 characters of storage. 22 BYTE August 1983 Practical Peripherals makes stand-alone Micro- buffers for any computer and printer combination, including add-on units especially for Apple II computer and/or Epson printers. Each has different fea- tures like graphics dumps and text formatting besides its buffering capabilities. You can choose one that's just right for your system. Best of all, they're built to last and work exactly like they're supposed to. If you're still guessing whether you can afford to have one, talk with any computer dealer. That's the best way to find out how practical a Practical Peripherals Microbuffer is. PRACTICAL Practical Peripherals, Inc. 31245 La Baya Drive, Westlake Village, California 91362, (213) 991-8200 Circle 319 on inquiry card. BYTE August 1983 23 Letters. viously the index I must refer to a unique array element to be of use. Perhaps an even simpler way to show that the for- mula is in error is to consider the two- dimensional problem of a 10(X = to 9) by 5(Y = to 4) array, for which Cor- rigan provided a BASIC program. You can immediately see that the maximum I obtainable from the prescribed formula occurs when X and Y are maximum and is 40, yet there are 50 elements in the array. The corresponding correct formula for the two-dimensional case is I = X X (YM + 1) + Y The algorithm can be extended to a third dimension, Z, by modifying the pro- cedure described by Corrigan. You must enclose the two-dimensional expression for I in parentheses and multiply by 1 plus the maximum value of Z, ZM, and add Z as I = (X X (YM + 1) + (ZM + 1) + Z Y) X This same algorithm can be used for any number of array dimensions just by re- peating the process. In addition, it might be mentioned that in many applications, especially in statistics, many square two-dimensional matrices that are encountered are sym- metric, that is, the same elements are con- tained above and below the diagonal. An example is an intercorrelation matrix, which expresses the degrees of relation- ship between all possible pairs of variables. Traditional statistical software for mainframes has ignored this fact and stored the whole redundant array in memory; there was plenty of memory to spare. With matrices of even modest size, this is undesirable with the limited RAM available to most microcomputers. An in- dex similar to that introduced above can be created to index only the nonredun- dant information in such a matrix. Again, assuming X as the row dimension and Y as the column dimension, the appropriate two-dimensional formula is I = (X X (X + 1)) / 2 + Y Using this formula, the appropriate in- dices will be created for all the elements of the "bottom" nonredundant portion of such a square symmetric matrix. John D. Morris, Associate Professor Box 8143 Educational Leadership & Research Georgia Southern College Statesboro, GA 30458 "A More Powerful Pencil" In his letter on "the myth of computer literacy" (March, p. 16), Dr. E. J. Neiburger hit the nail right on the head. One of the nails, that is. There are several more nails to be hit before we hammer down the lid on this argument. In one basic sense Dr. Neiburger is totally right. If you want to use a com- puter for certain strictly defined, limited applications, you need know nothing more than how to turn it on, load the pro- grams, and follow the prompts on the screen. If all you ever intend to use a com- puter for is these predefined applications, then there is no such thing as computer literacy. To fill out a form you need to know how to read and write but not how AZTEC C — ' C ' PROGRAM DEVELOPMENT SYSTEM PORTABLE SOFTWARE APPLE CPIM IBM Shipping: COD, 2nd day delivery, or Canada, add $5. Canada 2nd day or US next day delivery, add $20. Outside North America, add $20, and for 2nd day add $75. .7-r£CC»= ^VOP^'L. 0*« : z iec '>0V| 5 ' 5 30-^ 8 fee* 1 \(*X n CI05 S comP ,ve •fecK S 0°P°' 24 Auguit 1983 © BYTE Publications Inc Circle 247 on Inquiry card. Teach your computer who's BOSS Attend a dBase II or 1 -2-3 SoftwareBanc Seminar Here are Just a few ABC Arthur Anderson Boeing Aerospace CBS Chase Manhattan Bank Citibank Computerland Cornell University Digital Equipment Corp. of SoftwareBanc Seminars' clients: Digital Research Dunn & Bradstreet E.F. Hutton Fox & Geller IBM Internal Revenue Service Laventhol & Horwath Merrill Lynch Osborne Computer Corp. Polaroid Corp. Price Waterhouse RCA Shell Oil Smithsonian Institute U.S. Air Force U.S. Navy U.S. Postal Service Victor Business Products Westinghouse Xerox 1 983 Schedule of Classes Anchorage August 11-12 Sheraton Anchorage Washington, DC August 29-September 2 Marriott Crystal Gateway New York September 19-23 New York Hilton Chicago October 17-21 Hyatt Regency Dallas November 14-18 AMFAC San Diego December 12-16 Hyatt Islandia 4 Days of Instruction 9:00 AM. to 5:00 P.M. dBASE II Fundamentals dBASE II Programming Advanced dBASE II Problem Solving with 1 -2-3 State of the Art Presentation Buffet Lunch/Coffee Breaks Portfolio of Comprehensive • Video and sound system • Video tapes of program authors Seminar Notes SI 75 Per Day of Instruction Pre-payment may be made by: MasterCard, VISA or Check. Call or write to register SoftwareBanc Seminars 661 Massachusetts Avenue Arlington, MA 02 174 (800)451-2502 (617)641-1241 in MA Circle 360 on inquiry card. BYTE August 1983 25 SAKATA SC-300 COMPATIBILITY CHART Xakata COLOR MONITORS ... we promise performance NOW you can obtain the finest quality line of CRT DISPLAY MONITORS at prices far below competition, (if there is any) BUT, with unsurpassed quality found in more expensive CRT MONITORS. Illustrated 13" COLOR Model SC-300 is super high resolution— RGB video input — with every quality feature you'd expect and demand; compatible with IBM, APPLE, ATARI 800, NEC and other fine personal, popular computers. The modern design will sell itself on sight and the splendid performance will meet your most discriminating requirements. Also available: Model SG-1000 ... 12" monochrome, high resolution CRT MONITOR. Model SC-100 . . . 13" composite COLOR CRT MONITOR. Model SC-200 . . . 13" RGB high resolution COLOR CRT MONITOR. SAKATA CRT MONITORS are available wherever personal computers are sold ... or, write for technical, illustrated literature and prices. SAKATA U.S.A. CORPORATION 651 Bonnie Lane Elk Grove Village, IL 60007 (312) 593-3211/800-323-6647 (outside Illinois) COMPUTER SC-300 COLOR APPLE II ix APPLE III lx ATARI-800 COMMODORE-64 IBM-PC ix NEC-PC IX OSBORNE TI-99 VIC-20 NOTE: ON CERTAIN COMPUTERS ADAPTER CABLE REQUIRED. "SAKATA . . worldwide serving industry , . since 1896" i ettera to think. Using a computer only for pre- defined applications is similar to filling out forms. I think that using a microcomputer this way misses the whole point of the per- sonal computer "revolution." In consider- ing personal computers, I prefer the analogy of pencil literacy to telephone literacy. Intrinsically the pencil is one of the simplest of human artifacts, and yet it takes great skill and creativity to realize the full potential of a pencil as a personal tool. With a pencil I can write, draw, cal- culate, communicate, and remember. The things I can do with a pencil are limited to what I can imagine and the skill I have in carrying through my imaginings. A per- sonal computer for me is a more powerful pencil. My point is that there is such a thing as computer literacy. I don't propose that to be computer literate all of us need to become programmers. I do believe that we need to learn to understand the scope of the tool we are dealing with and how to use it creatively, not by rote. And to "use" means just that, to invest the time and ef- fort to learn the commands and pro- cedures of packages such as database- management systems, spreadsheets, and word processors. Computer literacy means learning how to use and exploit the tool that a personal computer is. If you use your pencil just to copy over the accounts, you'll be the clerk, not the boss. The same is true with a personal computer. Douglas F. Yriart 1005 Bay view Overlook Stafford, VA 22554 Are Computers Like Telephones? Dr. Neiburger's contention that com- puter literacy is overrated (Letters col- umn, March, p. 16) is well taken and almost convincing. Those of us who work with microcomputers and spend a lot of time thinking about them do seem to be caught up in an imbroglio of expensive gadgetry and words that have capital let- ters stuck oddly in their middles. Like any new toy, personal computers have been subject to an intense media hype that tends to throw the whole issue out of perspective. But computers aren't like telephones at all, and to reduce operating a computer to merely turning it on and following the in- 26 Auguft 1983 © BYTE Publications Inc Circle 348 on Inquiry card. Circle 354 on Inquiry card. he KKiut uf mmi WAS JUST SHATTERED! For more than a year, we've been making the most advanced disk emulator available for micro- computers. The one that's taken the "waiting" out of computing. Now, we have some more news that'll set the world on fire: A price cut! The NEW 256Kbyte board is only $995. And the 512Kbyte SemiDisks for the S-100 and TRS-80 Model II are $1495. (1Mbyte unit is $2350.) So, what are you waiting for? The SemiDisk is the ORIGINAL single-board microcomputer disk emulator. It has a greater storage density than any other: 1 Mbyte per loard! And we've been shipping them for over 3 year! We didn't do this with 'me too' engineer- ing. Our products are true innovations, based on reliable technology and proven designs, without the need for custom components. Floppies are ok for data transfer or long-term storage. But they fall far short as online storage. If you are using high level languages, spelling checkers, word processors, databases and other disk-intensive software, you know the price you are paying: time. Your productivity is going down the drain. The SemiDisk disk emulator will save time and increase your productivity. Even better, Release 5.0 of the SemiDisk CP/M-80 installation software contains SemiSpool, an automatic printer buffer. No extra hardware is required; it's all in the software. Up to 8 Mbytes of buffer space! It's a better solution than a $350 64Kbyte printer buffer that wastes space on your desk. Send documents of almost any length to the printer at a very high speed, then continue using the computer immediately. No Waiting! SemiDisk It's the disk the others are trying to copy. SemiDisk Systems, Inc. P.O. Box GG Beaverton, OR 97075 (503) 642-3100 Call 503-646-5510 for CBBS - /NW, a SemiDisk-equipped computer bulletin board. SemiDisk trademark of SemiDisk Systems, Inc. Copyright ' 1983 SemiDisk Systems, Inc. Letters. structions on the screen is a gross over- simplification. If this were the only trick, there would be no manufacturers' support services, no user groups, no manuals to teach us how to read our manuals. Even a novice should have some insight into the workings of the machine, and that means getting a sense of the mathematical and electrical properties involved and learning the terms that describe them. A user who seeks only to snap the disk into the drive and have his or her problems magically solved will probably never feel confident about the computer or use it creatively. Many people view computers with skepticism and deny their usefulness — at one time or another we've all received someone else's bank statement. But when a computer is working properly it can help enormously. When it is not working properly, it is better if the person punch- ing the keys has a vague idea of how to clean up the mess. Terry Nasta Senior Editor Computing Physician 515 Madison Ave. New York, NY 10022 E. }. Neiburger replies: Mr. Nasta's comments on my letter are well taken. It is true that many computer systems and software are not as easy to operate as a telephone, but that is due to poor design or equipment limitations (lack of memory for help screens, etc.). The telephone is a complicated instru- ment with many buttons, signal tones, and series of numbers to be dialed (try a long-distance number through MCI). But the telephone is easy to use because its use is easy to understand. Even 3-year-old children routinely use them. My point is that a well-designed computer and pro- gram are also easy to use. Take a templated Visicalc type of program, for example. Load your disk, turn on your computer, and fill in the requested blanks when they appear on the screen. There is no problem with this "user friendly" type of program. You need not be "computer literate" to use it. Visicalc may require knowledge of a few commands gleaned from reading a manual, but no big effort. Conversely, many programs may re- quire considerable effort in order to run, but this problem can usually be solved with better programming and design. GET FULL VALUE FROM YOUR VICTOR 9000 UCSD p-SYSTEM™ IV.1 Get the most from your VICTOR 9000 as well as from your software development efforts. The power and portability of the UCSD p-System Is available for the VICTOR 9000 from TDI. The Standard Development System Includes: • Full Screen Editor, Filer, Assembler and other Utilities • The UCSD Pascal Compiler • Native Code Generator • Ram Disk Support Above 128K • Turtlegraphics-full use of VICTOR screen (800 x 400) • Complete documentation Options: • Fortran 77 and Basic compilers • Hard disk support r-SYr^l 7DI SYSTEMS, INC TDI LIMITED UTjJ^J 620 HUNGERFORD DR. 29 ALMA VALE RD. |T| ROCKVILLE, MD 20850 BRISTOL, U.K. BS8 2HL CI IT "sl^ (301)340-8700 0272 742 796 oL/f" VICTOR 0000 Is a trademark of VICTOR TECHNOLOGIES, INC. UCSD p-SYSTEM and UCSD PASCAL are trademarks of the Regents ot the University of California NEW HARD DISK SUPPORT With rare exceptions, I believe that a truly good program and computer system should not require any complicated manuals or other documentation. Like the telephone, it should be designed to func- tion well in the hands of the novice. Those firms that develop systems along this line will thrive. Those that hide their deficien- cies under the buzzword "computer literacy" will fail. Double-sided Recording with Perpendicular Media "The Promise of Perpendicular Magnetic Recording" by Clark E. Johnson Jr. (March, p. 56) contains serious omis- sions and errors of fact. Johnson did not mention the fact that "double-sided" recording is meaningless with perpendicular recording because the recording magnetic field necessarily passes through the medium. Of course, the in- creased density made possible with perpendicular recording makes double- sided recording less advantageous. Never- theless, the disadvantages of double-sided recording are still present and may be magnified. Most prominent of these presumed dis- advantages is the fact that the read/write head, instead of being one small compo- nent, must have two parts, on opposite sides of the medium, and that these two parts must always be accurately aligned. This condition is desirable but not indis- pensable with double-sided longitudinal recording. Furthermore, the length of the magnetic flux lines, which must always form a closed loop, is vastly greater with perpendicular recording because the lines must pass around the edge of the medium rather than remain within the head and its supporting structure. These long flux lines require low magnetic reluctance in the ac- cess mechanism to enable the detecting circuits to pick up the changes in magnetic flux when reading and to enable the drive circuits to generate appropriate signals when writing. Johnson also mentioned the possibility of using perpendicular recording of audio ■signals and the applicability of data com- pression to such recordings. That may be true, but his example betrays a gross un- familiarity with musical quality. He asks, "Why record all 800,000 bits of data for a soprano who sustains the same note for an entire second?" The question is, what con- stitutes the "same" note? All vocalists and many instrumentalists — notably violins 28 August 1983 © BYTE Publications Inc Circle 391 on Inquiry card. The IMS Computer Family All IMS systems can be configured with 8 bit or 16 bit microprocessors OO 5000SX/8000SX The SX table top computer systems are the ideal choice for companies with expansion in mind. These systems are easily expandable from one to eight users, each having his own Microprocessor, 64K of memory, and local peripheral control. © The 5000SX chassis has three full width 5V4 inch Floppy/ Winchester slots available. Winchesters from 6.3 MByte to 19.2 MByte require one full width slot each. Floppies from 500 KBytes to 1.0 MBytes of storage require Vi slot per drive. ©The 8000SX chassis has two full width 8 inch Floppy/ Winchester slots available with the added capacity to house a magnetic tape bulk memory subsystem. Winchesters from 6.3 to 85 MByte storage require one full width slot each and 1.6 MByte Floppies require x h slot per drive. © 8000S "MAXIMA" The IMS 8000S "MAXIMA" Computer system is designed for the company where many people must have access to a large common pool of information. Basically the system configu- ration of the 8000S is similar to that of the SX Table Top system with the added capability to support up to 16 users each with his own Microprocessor and 64K of memory. The 8000S has five full width 8" Floppy/Winchester slots available supporting any combination of full width Win- chesters and x h width Floppies plus a magnetic tape bulk memory subsystem. © 5000IS - "The Desktop Mainframe" From the crystal clear monitor with a true typist keyboard to the high performance power supply— the 5000IS is the most versatile integrated system available— best of all, the 5000IS can serve as the host processor of a multi-user, multiprocessing system supporting four users. O IMS "ULTIMA" Terminal The "ULTIMA" CRT Terminal has a separate microprocessor for each of its major functions: Local Intelligence, Screen and Keyboard Control. It can be customized to perform functions the others don't even talk about. The contoured keyboard has a touch the best typist will really appreciate. O Portable Cartridge Tape Back Up Unit The IMS Stand Alone Tape Data Storage and Retrieval Subsystem may be added to any IMS system. To compliment the best microcomputers available, IMS supplies a complete and comprehensive set of business application software. For complete information and specifications plus the location of your nearby IMS International dealer, call or write today! (702)883-7611 INTERNATIONAL 2800 Lockheed Way, Carson City, Nevada 89701 • Telex 910 395-6051 Circle 202 on Inquiry card. BYTE Augurt 1983 29 Letters. and other stringed instruments — in- troduce tiny changes of pitch and not-so- tiny changes in volume when sustaining a note. These modulations constitute the difference between a musical note and a steam whistle. Anyone listening to a per- formance by a would-be musician who does not use them finds the experience rather unpleasant. A recording of a per- formance would necessarily include these modulations, making the compression of data considerably more complicated than Johnson implies, if not impossible. Wallace B. Riley 309 Garces Dr. San Francisco, CA 94132 Clark E. Johnson replies: Contrary to the opinion Riley expressed in his letter, double-sided recording with perpendicular media is not only fairly straightforward but easy to implement in a practical configuration. We at Vertimag use a single-sided, single-pole head shim that provides the advantages of the Iwasaki single-pole, double-sided ap- proach but mounts in a standard floppy- disk head button configuration. The flux from the record/write thin film travels through the perpendicular storage media, through the permalloy back layer, and returns through a massive ferrite piece that connects to the shim. No alignment is required other than the normal azimuth restrictions of high-density recording. With such a head configuration in a 96-turns-per-inch disk drive using 50 turns at a standard disk-drive speed of 300 rpm and using our own double-layer media, we have a read-back signal of approx- imately 1 millivolt peak-to-peak. This signal, at 30,000 bits per inch, exceeds that from particulate media at one-fifth the density. With regard to the application of per- pendicular recording technology to audio applications, I did not intend to imply the elimination of redundancy, as Riley in- ferred. Because perpendicular recording in its most efficient implementation uses saturation recording, one can obtain ex- traordinarily high signal-to-noise ratios by pulse with modulation — what is essen- tially a binary digital signal. The quan- tization of the audio signal (equivalent to the number of bits in a conventional digital audio system) is limited only by the atomic columnar structure of the media itself. This limitation is equivalent to ap- proximately 400,000 bits per inch. Information Hiding First it was hacking, then structured programming, and now information hiding. As a programmer who has out- grown the need to produce arcane works of twisted genius, I can appreciate the in- novations that facilitate ease of implemen- tation and maintenance. When I see an ar- ticle like "Information Hiding: A Brief Ex- ample" (April, p. 442) I'm gratified by the thought that such techniques will free pro- grammers to create useful, higher-quality software. While our early methodology was justified by slow processors, small memories, and inefficient mass-storage devices, the new machines' capabilities might never be realized if we were to con- tinue so clumsily. I hope BYTE will con- tinue to cater to the growing number of us JUST SAY THE PASSWORD TO GET 1200 BAUD, PROGRAMMABLE AUTO DIAL, FOR $449* • 300/1200 Baud • Auto Dial, Telpac™ software available • Full or Half Duplex • Audio Phone Line Monitor • Two-Year Limited Warranty Password™ is the new USR™ friendly mo- dem, designed for use with any small computer on the market today. We have compressed into its miniature (shown ac- tual size) case every operating feature for unattended high speed telecomputing. With auto dial/answer and auto mode/speed se- lect there is little to do but turn it on . So com- pact it mounts on the computer with Velcro®; when you carry your computer you can pocket your Password. So brilliantly conceived it achieves all this with just 12 tiny integrated circuits (a presage of long trouble-free service). If your dealer doesn't know the Password yet, write or call for com- plete specifications. 'Suggested list for Password complete with power, phone, RS232 Interface cables. TelpacTM software optional extra, $79. Password, Telpac, USR logo and the U.S. Robotics corporate name are all trademarks of U.S. Robotics Inc. U.S. ROBOTICS INC.™ 1123 WEST WASHINGTON CHICAGO, ILLINOIS 60607 (312) 733-0497 Circle 402 on inquiry card. ?J- I p£ m ■ Reach out and byte someone! Your desk-top computer system is only a beginning — plug a low-cost UDS modem into the RS-232 port and a whole new world of communications opens up! UDS modems add a new dimension to personal computers. For professional use, a modem permits two-way, hard-copy communi- cation between home office and branches or among the branches themselves. Electronic mail becomes a reality. Sales, cost and inventory updates can be sent over ordinary telephone lines at economical, after-hours rates. When you use your computer for personal applica- tions, the modem allows you to access up-to-date market information, receive news and weather summaries, check airline schedules or even electronically scan out-of-town newspapers. Long-distance game playing and computer- age personal correspondence become instant realities. The wide range of UDS modems includes one that fits your requirement perfectly. Top of the line is the micro- processor-based 212 A/D which communicates at 0-300 or 1200 bps, stores and automatically dials up to five 30-digit numbers and includes a complete prompting menu and full Created by Dayner/Hall, Inc., Winter Park, Florida automatic test capabilities. Yet, with all these features, it costs only $745. At the other extreme is the $145 103 LP, offering simultaneous two-way communications at 0-300 bps without an AC power cord. This unit siphons operating energy directly from the telephone line! In between is a large variety of units— many of them in the LP no-power-supply design and all fully FCC certified for direct connection to the telephone system. Don't be a computer hermit — treat your system to a UDS modem; then you can reach out and byte someone! For details, contact your favorite computer dealer or Universal Data Systems, 5000 Bradford Drive, Huntsville, AL 35805. Telephone 205/837-8100. Universal Data Systems (M) MOTOROLA INC. Information Systems Group Circle 408 on Inquiry card. who implement the clearer design strategies. Rudy Smith 4601 Southwest 58 Ave. Miami, FL 33155 (TAURUS ONE) + (YOUR PC) = (PROCESS CONTROL SYSTEM) Now a new micro computer based data acquisition and control front end that gives you:— Power that's easy to use:— Plugs into any RS232C, RS422, or IEEE 488 port on your Personal Computer • Powerful Command | functions that include: simple reads and writes, high speed block analog reads, pulse counting, frequency, change of state detection, direct thermocouple input, and more • Results in engineer- J ing units • Convenient screw termi- nal panels • Compatible isolated AC/DC 3 amp switchers and * isolated input sensing • j Power that's easy to cost justify:— / A full range of input output (. modules provide: 12 bit / analog inputs with 4 . programmable ranges for inputs from ± lOmV to ± 10V. digital I/O, counters, pulse output,' 12 bit analog output, 4-20 MA input/output, thermocouples • Stand alone mode with direct terminal support • Remote operation • Communicates simultaneously to three computers • Internal diagnostics • Power that's easy to expand:— Plug in expansion to 1024 points • User memory allows downline load of user written functions and programs • EPROM space for special user functions • Rack mount hardware available for all options • TAURUS ONE Write or call for more information to: IN U.S.A. I TAURUS C/01.M.S. rniMDiiTcn P.O. BOX 1663 COMPUTER BUFFALO. NY. PRODUCTS 14203 1*1/- (603) 673-6662 IN U.S.A. IN CANADA CIO I.M.S. P.O. BOX 911 P.O. BOX 1663 STATION "U" BUFFALO, N.Y. TORONTO. ONT 14203 M8Z 5P9 (603) 673-6662 (613) 226-5361 TELEX: 053-3577 Mass Storage for Apple Writer An undocumented feature in the new version of Apple Writer for the Apple He makes it possible to use a Corvus mass- storage device. Here are the necessary steps: 1. Place the Corvus controller card in Apple He slot 6. 2. Place the Disk II controller card in slot 7. 3. Turn the Apple He on and press the C key once while the system is booting up. 4. A prompt will appear: "ENABLE CORVUS IN SLOT 6 (Y/N) :"; press Y and RETURN. Steps 3 and 4 are carried out each time the system is turned on. These steps allow Apple Writer He to work with a Corvus drive that has been formatted with DOS 3.3 volumes. Paul Lutus, President Walden Software Inc. 2021 Placer Rd. Sunny Valley, OR 97497a BYTEs Bits Electronic Help-Wanted Comes to Valley Connexions, the electronics industry's two-way, online help-wanted publication, has expanded its operations from the East Coast to California's Silicon Valley. This service lets recruiters post job openings and prescreen applicants while offering job hunters a comprehensive list of cur- rent career opportunities that they can re- spond to electronically with a resume and a cover letter. Further details are available from Connexions, 20863 Stevens Creek Blvd., Cupertino, CA 95014, (408) 252- 7882. The East Coast headquarters for Connexions is located at 55 Wheeler St., Cambridge, MA 02138, (617) 492-1690.1 < Circle 380 on inquiry card. Wdve got a hit on the charts. One picture is worth a thousand words. Or numbers. Now there's a simple way to transform pages and pages of business data into a single, dramatic format. Introducing DR Graph™— high quality business graphics soft- ware from Digital Research™ It lets you create impressive business charts, graphs, or any combination of both — quickly and easily. You can even build graphs from electronic spread- sheets such as VisiCalc® and SuperCalc™ See what you're creating, instantly. Think of it as painting by numbers. Because DR Graph actu- ally lets you create your graph step -by- step. First, enter the data you wish illustrated. Then just choose from the menu, hit a key, and take a quick look at what you've created —instantly. Make your axes thick, your border lines thin. Go with solid, or broken grid lines. Add color when and wherever you please for all your special reports. It's easy to experiment until the graph format is perfect. Then DR Graph can print it, plot it, or store it for future use. You get the versatility you need. DR Graph lets you convert business data into dozens of Combine bar and line graphs with a simple keystroke. Tap a key and vertical bars turn horizontal. personalized choices. Do you like your bars vertical or horizontal, stacked or clustered? How about adding line curves to your bar graph? Or special labels on the axis? With DR Graph, you've got it. All with the simple stroke of a key. DR Graph even displays up to four different graphs on a single page. Mix words with your pictures. DR Graph lets you write comments on your graphs, too. You not only control the size and color of the type, but also have four different typestyles to choose from. Write your own legends and titles. Or add addi- tional text right onto the graph — exactly where you want it. Plus, its 8 color and 6 pattern fills provide customized highlighting. So, your presentation graphs will be as professional as you are. All the business graphics you'll ever need, ready to roll. DR Graph works with today's leading microcomputers, as well as with a wide range of printers and plotters. All you need is Digital Research's GSX™ graphics enhancement for your computer's operating system. Contact your computer manufacturer, or stop by the CP/M Library™ at your computer shop for an eye- opening demonstration. Call 800-227-1617, ext. 400 (in Cali- fornia 800-772-3545, ext. 400) for a free, full-color brochure. IfiOJ DIGITAL RESEARCH The best of everything in business graphics. VisiCalc is a registered trademark of VisiCorp. SuperCalc is a trademark of SORCIM Corporation. The logo, tagline, DR Graph, GSX and CP/M Library are either trademarks or registered trademarks of Digital Research Inc. ©1983 Digital Research Inc. Circle 481 on inquiry card. BYTE August 1983 33 256K Memory — _ ., Expansion Expandable in 64K incre- ments, Quadboard* 1 Is socketed for 256ICbytes of memory. Full parity and checking standard. ©spool" Wlth Qspool, you can also use part of system memory as a software print buffer. Choose from 8K to 56K of memory and stop waiting for your f QuadRAM Drive™ This software program lets you use part of your total system memory as maftt=~- ple disk drives. Super-fast drives that let you store important information for easy access. ■ Chronograph — Quadboard features a real time chronograph to arwayrkeepyoursystems clock/calendar up-to-date. - Even when your system's been off for months, uu^us-p.; | U£ IESS&U2D /•jam •,tl9TH ®t (HI wiysfiiAiia ■ . r 0EU5 , ML Jl \m i ■ wcwtsssAiia H ■ ■OH • »•'•' 1 MCM6€£6Al» H I " wrs | w i9M ■ US " THE FIRST AND — \OUR IBM PC M^EVERNEED. Your IBM Personal Computer is very versatile. New functions and appli- cations are being developed for it everyday. And now with Quadram's Quadboard, you can keep your PC bi i l ed i i i l u ui l e puduytf, using c u iul e l y s ell i ng th e Qua d bo ar d's -enly-ene-expamion slotrAbafHfe- foi maining IBM slots are left free for future expansion needs. All-On-One-Board and Software, too. Every board you may ever need for your IBM PC is in the / Quadboard package. From serial port to print options open for tomorrow^ tech- sir* «fc buffer. Plus, there's Quad- nology In the tradition of Quadram v ; / Master software, too. Quality, six of the most needed ^ '■% ^- - Included on this disk PC functions have been com- Qj^^Jfgj^riY areutilitesforac- ohrenograph-fer -timeand < and for performing diagnostics on all Quadboard functions. There's ■frisfr^swapfthe-featefdhaHefe — yotwwiteWine^Fifltei^ofie^Rd-lw©; ASK YOUR DEALER. back and forth, as your printing needs change. Proven Design Quadboard is the number one IBM PC option board on the market today. Nothing even comes close, because Quadboard is designed with perform- ance in mind. Engineered for depend- ability and built with only the finest components available. Each board has been thoroughly tested and "burned-in" for years of reliable service. Our full line of IBM PC accessories* - - Quadboard II, Quad 512+, Quadcolor, Quadchrome, Quadscreen, Quad- jet, Quadmodem, Memory Board, Serial Board i (Single or Dual ports), Parallel Board.Chro- nograph, and Micro- fazer. All products are sold through local person- al computertieaiers.if yoursdoesfiot" stock Quadram, pleaseask him to- call us at (404) 923-6666. QUADFAM CORPORATION ■ ti i A Divtswo o( Inletltgenl Systems 43SS Internationa! Blvd./Norcross, Ga. 30093 (404),a23.6666rtWX 810*766-4915 (QUADRAM NCBS) Circle 330 on Inquiry card. . Ciarcia's Circuit Cellar Build a Power-Line Carrier-Current Modem Communicate using electrical power wiring "Jiggle the printer cable, Jeanette." My assistant reached through the rat's nest of wires behind the com- puter and grabbed the one connected to the printer. As she moved it, I identified its other end from my cramped vantage point beneath the workbench and pulled it through a slot to attach it to my latest project. I was glad that what we were doing would keep us from having to run cables around the Circuit Cellar so often. I have long had video terminals, printers, and other data-communicat- ing equipment located at various places in the Circuit Cellar and around the upper stories of my home (see reference 3). Eventually the pain of rerouting cables whenever I moved a peripheral device got to me, so about a year ago I designed a com- munication system that would save having to string new wires every time. My system revolved around a carrier-current modem, which operates in much the same manner as the familiar telephone modem but sends its signals over electrical power wir- ing instead of over a telephone line. After I pressed the carrier-current modems into service (with a little Copyright © 1983 Steven A. Ciarcia. AH rights reserved. by Steve Ciarcia help), they served faithfully and I turned my attention to other projects, some of which have appeared in this column. But as of late more and more of my readers have written to me ask- ing for help on how to send data through the AC power line. Ap- parently the widespread use of and media attention to the BSR X-10 Home Control System and similar products have given many people the idea of using the generally unex- ploited carrier-current modem for communication. Indeed, about five years ago I published a project on building a remote-control system that communicated through the AC power wiring of a building (see reference 4). It worked very much like the BSR X-10 as a carrier-current remote controller. I hesitated to present the carrier- current modem as a Circuit Cellar project until now because I feel there is more to general-purpose carrier- current communication than meets the eye. Simple on/off remote control is dif- ferent. In most control applications, the communication is generally half- duplex or simplex; the transmission is limited to an intermittent tone or pulse burst that merely triggers a specific receiver into a binary control state. If the receiver is not activated properly by a single transmission because of interference, it's easy to send the control burst more than once. (Many computer control sys- tems that use the BSR X-10 receivers send the same control code 10 times to make sure it is received.) But in general-purpose serial data commu- nication, proper reception of every bit may be necessary, and errors in reception of the data may negate the usefulness of carrier-current operation. To successfully use a carrier-current modem and the AC power wiring for data communication, we must either tolerate a dropped bit now and then or implement an intelligent protocol of error checking, redundant trans- mission, and handshaking. A really dependable power-line communica- tion system has the physical link (AC- line transmission and reception) as only one of its components. I was going to wait until I had perfected the control and error- checking protocols for use with the carrier-current modem, but the in- creasing interest indicated by my mail suggested that many experimenters might benefit from building a simple carrier-current modem; at least the physical part of the connection could be set up, even if the protocols and software are not ready. This month's project, a modem for data communciation using the AC 36 August 1983 © BYTE Publications Inc mm ShHKSw 91 iV Iv \y, « w-^-.ii • •••«•! Photo 1: Prototype of the Circuit Cellar CCM-1 carrier-current modem, which transmits serial data over the AC power line at 1200 bits per second. When in originate mode, the modem transmits mark signals at 90 kHz and space signals at 95 kHz; the answer mode transmits marks at 80 kHz and spaces at 85 kHz. The receive unit, shown here, differs from the transmit unit only in the frequency-selecting passive components. power line, is mostly an analog cir- cuit. Successful operation of the modem, therefore, depends much more on tweaking and tuning the components than do digital com- puter-related projects. I am present- ing this two-chip modem chiefly to discuss the principles involved, with some emphasis on selecting com- ponents for this application. Because the principles are susceptible to broad application, this knowledge should also be useful in understand- ing other modem designs as well. All Modems Are Not Alike The modem, named after a con- traction of the words "modulator" and "demodulator," is a fairly com- mon piece of computer equipment. You've probably seen modems built for sending data over telephone lines, and you may have read my March Circuit Cellar article about a low-cost modem (see reference 2). A modem allows two pieces of digital equip- ment to communicate with each other over long distances without having a direct hard-wired connec- tion between them. With a telephone modem, the telephone lines form the communication path. Modems of the usual type translate the voltage levels of the digital input signal (usually RS-232C levels) to tones at two frequencies, one of which signifies a logic 0, the other, a logic 1. The process of shifting the frequency of the output tone as the logic levels change is called frequency- shift keying, and the modems are called frequency-shift keyed, or FSK, modems. To allow communication in two dir- ections at once (full-duplex mode), rather than in only one (half -duplex), two pairs of frequencies are used, avoiding conflict when both ends of the connection talk at the same time. (By convention, one pair of tones is called the "originate" set, and the other is called the "answer" set. The two terms merely signify which set of frequencies each unit is using; no implication is intended regarding the content or origin of the data itself.) For compatibility, modems are built to adhere to certain standards of op- eration; the most common system in North America for low-speed modems was first used in the Bell System's Model 103 modem, so Bell-103-type modems abound. Carrier-Current Systems The AC power line is similar in some respects to the telphone line. One similarity is clear: we can send data through the power line by using an FSK modem. Obviously, in addition to the data we want to transmit, the power lines August 1983 © BYTE Publications Inc 37 RS-232C Jl 1 2 cU 10K 1 J1 fl> +5V RS- ^S-232C I C 4. 6 CONNECTOR MC1489 K 7<=)l . 0.1/xF 14 •200ii 13 12 ilMF /77 INPUT VCQ V CC TIMING LOCK DETECT IC2 XR-2211 REF LO0P VOLTAGE ^ DET 0UT * POLYCARBONATE OR MYLAR CAPACITOR _.--. FSK COMP. DATA |NpuT VCO TIMING VCO TIMING 14 CO * 0.001/iF >R1 CI 250pF ^ 13 Rf 100K Cf 0.0022^F S510K TRANSMITTER RECEI VER Figure 3: Schematic diagram of a complete carrier-current modem. The originate-mode modem transmits mark signals at 90 kHz and space signals at 95 kHz; the answer modem transmits marks at 80 kHz and spaces at 85 kHz. This diagram shows the circuit for one end of the link; two such units are needed in the system with the proper component values differing between them. In one unit, the wiring of pins 2 and 3 of ]1 should be reversed. and particularly suited for FSK appli- functional block diagram and typical through a 0.1-jtF capacitor. The inter- cations. It operates over a frequency FSK demodulator circuit are shown nal impedance is 20 kilohms, and the range of 0.01 Hz to 300 kHz and can in figure 5. Frequency-shift-keyed in- minimum recommended input accommodate analog input signals put signals fed into pin 2 of the signal is 10 mV. between 2 mV and 3 V. An XR-2211 XR-2211 must be capacitvely coupled The first order of business is to set 40 August 1983 © BYTE Publications Inc (4a) (4b) FUNCTIONAL BLOCK DIAGRAM + 5V 55. IK INPUT LA- MULT OUT |~T VcclZ rE-i f TIMING L DR r- CAPACITOR TIMING RESISTORS m-i V XR-2206 MULTIPLIER AND SINE SHAPER TeJ— i 1 SYMMETRY I , ADJUST - TFj i u\ — | 1 WAVEFORM ADJUST -0—1 vco CURRENT SWITCHES 10 M F -o SINE /TRIANGLE WAVE OUTPUT £T R4 50K AMPLITUDE -\p/G— + 5V 5.1K ♦ lj] GROUND yn sync /77 € R2 R3 /77 XR-2206 MODULATOR 16 R5 SYMMETRY ADJUST 1 14 Rl 500.il THD ADJUST -*qA- Sl 12 1h 11 10 + 1 M F SQUARE "WAVE OUT It" — -DET OUT REF VOLTAGE OUT "s~|no CONNECTION n FSK 1A COMP INPUT N.C.= NO CONNECTION TYPICAL CIRCUIT Figure 5: An XR-2211 functional block diagram and pin-out specification (5a) and typical FSK demodulator circuit (5b). the center frequency of the demodu- lator passband at the center of the fre- quency band that we wish to detect. In my case, the passbands are de- fined by the tone pair at 80/85 kHz and the other pair at 90/95 kHz. The center frequencies for the two demodulators would then be 82.5 kHz and 92.5 kHz, respectively. The component values are computed as follows: /o = ROxCO where R0 is in ohms and CO is in farads; f is the center frequency. Generally, RO is in a range of 10 kilohms to 100 kilohms, but the choice is arbitrary. Often it is more convenient to choose a value for CO and trim the value of R0 with an ad- jacent potentiometer. Using 0.001-/iF value (Mylar, polycarbonate, or poly- styrene) for CO, the computed R0 values are 12.12 kilohms (f = 82.5 kHz) and 10.81 kilohms (f = 92.5 kHz). With a 5-kilohm trim pot in series, more convenient resistors of 10 and 9.1 kilohms can be used instead. Rl sets the system bandwidth and August 1983 © BYTE Publications Inc 41 CI sets the loop-filter time constant and damping factor. The value of Rl is determined by the mark/space fre- quency difference: R0x/ Rl = ft -A) The deviation is 5 kHz by design, and the values for Rl are 170 kilohms (fo = 82.5 kHz) and 191 kilohms (f = 92.5 kHz). While the equation for computing the loop-damping factor associated with CI is complex, there is a conve- nient rule of thumb. The damping factor should be approximately Vi, and a value of CI = CO/4 will pro- duce this. With CO equal to 0.001 uF, CI equals 250 pf (picofarads). Resistor Rb provides positive feed- back across the FSK comparator and facilitates rapid transition between output logic states. A value of 510 kilohms is used in most applications. Cf and Rf form a single-pole post- detection filter for the FSK data out- put. Rf is most often set at 100 kilohms. Cf smooths the data output; its value is roughly calculated: Cf = (3/data rate in bits per second) where Cf is in microfarads. Because this modem is designed for operation at 1200 bps (bits per second), a value of 0.0022 pF or 0.0033 pF is acceptable. The final area requiring calculation is the lock-detect section of the XR-2211, which is used here in a carrier-detect function. The open- collector lock-detect output, pin 6, is connected to the data output, pin 7. This will disable any output created by noise unless a carrier signal is present within the detection pass- band of the PLL. Presuming a paral- lel resistance of 470 kilohms, the minimum value of the lock-detect filter capacitor, Cd, is 16/(f x - f 2 )/2. In this case 0.005 jtF is adequate. Testing the Completed Unit I built the complete Circuit Cellar carrier-current modem the way shown in figure 3, with component values for 80/85 kHz and 90/95 kHz tone pairs, but you may substitute other values as previously discussed. In addition to the three functional sections we have looked at, I have added a carrier-detect indicator and an RS-232C driver (IC3) and receiver (IC4). To test the completed unit you need some source of serial data out- put. (I used a full-duplex video ter- minal.) The easiest test is a simple loop-back circuit. The terminal is con- nected to the originate modem and plugged into the power line. The answer modem is plugged in some distance away, with pins 2 and 3 jumpered together on Jl, its RS-232C connector. As you type on the ter- minal, the data is transmitted to the answer modem where it is looped back through the jumper and retrans- mitted to the originate modem where it appears on the terminal's screen. You should be able to place the modems anywhere within your home or office, or even an adjacent home or apartment. The ultimate range is limited by the power com- pany's step-down transformer and the cross-coupling between the two 115-V legs of a multiphase 230-V dis- tribution system. But you can arrange communication between the latter by attaching a fused capacitor between the two 115-V legs. In Conclusion Using this modem I was able to successfully communicate at 1200 bps for extended periods of time without loss of data. I've found FSK car- rier-current communication to be fair- ly reliable; it's best at the lower data rates. Occasionally a few characters have been lost when my air-condi- tioner compressor or water pump turned on. These are occasions where an intelligent control system might be of significant help. I had in- tended that the intelligence necessary for error checking and redundant transmissions be part of this project, but as I explained, such a control system is much more involved than the modem itself. Given the excess computing power available in most personal computers, it would certain- ly be feasible in most cases for error- checking to be performed by appli- cations software, perhaps using something like the well-known file-transfer protocol developed by Ward Christensen for use with his CP/M-based Modem-7 program. Generally speaking, while I have detailed the hardware components of a complete system that works in the Circuit Cellar, it's important to recog- nize that AC line conditions differ significantly between locations. Com- plete frequency bands may be unus- able due to interference produced by machinery, digital clocks, micro- computers, and fluorescent lights. For this reason, you should under- stand how the modem components and coupler are designed. Your abili- ty to customize a basic modem de- sign to the particular electrical en- vironment of your home or office can make or break the project. Next Month: Build a digital video camera. ■ References 1 . Applications Data Book. Sunnyvale, CA: Exar Integrated Systems Inc., 1981. 2. Ciarcia, Steve. "Build the ECM-103, an Originate/Answer Modem." March 1983 BYTE, page 26. 3. Ciarcia, Steve, "Come Upstairs and Be Respectable." May 1977 BYTE, page 50. 4. Ciarcia, Steve. "Tune In and Turn On: A Computerized Wireless AC Control System." Part 1, April 1978 BYTE, page 114. Part 2, May 1978 BYTE, page 97. 5. Edward, Harry J., Jr. Residential Electrical Wiring: A Practical Guide to Electrical Wiring Practices in Residences. Reston, VA: Reston Publishing Company, 1982. Editor's Note: Steve often refers to previous Circuit Cellar articles as reference material for each month's current article. Most of these past articles are available in reprint books from BYTE Books, McGraw-Hill Book Company, POB 4:00; Hightstown, N] 08250. Ciarcia's Circuit Cellar, Volume I covers articles that appeared in BYTE from September 1977 through November 1978. Ciarcia's Cir- cuit Cellar, Volume II contains articles from December 1978 through June 1980. Ciarcia's Circuit Cellar, Volume III contains the ar- ticles that were published from July 1980 through December 1981. Steve Ciarcia (POB 582, Glastonbury, CT 06033) is an electronics engineer and computer consultant with experience in process control, digital design, nuclear instrumentation, product development, and marketing. In addition to writing for BYTE, he has published several books. To receive a complete list of Ciarcia Cir cuit Cellar project kits available from the Micromint, circle 100 on the reader service inquiry card at the back of the magazine 42 Augu.l 1983 © BYTE Publications Inc ntroducing ine most roweriu Business Software Ever! TRS-80™ (Model I, II, III, or 16) • APPLE™ • IBM™ • OSBORNE™ • CP/M™ • XEROX™ 6ENECAL L * De *J£ L- I c^~ ae • The VersaBusiness" Series Each VERSABUSINESS module can be purchased and used independently, or can be linked in any combination to form a complete, coordinated business system. Vers aRecei vables™ $99,95 Versa RECEIVABLES™ is a complete menu-driven accounts receivable, invoicing, and monthly statement-generating system. It keeps track of all information related to who owes you or your company money, and. can provide automatic billing for past due ac- counts. VERSA RECEIVABLES'" prints all necessary statements, invoices, and summary reports and can be linked with VersaLedger IP and Versa Inventory™. VERSAPAYABLES™ $99.95 VERSA PAYABLES*" is designed to keep track of current and aged payables, keeping you in touch with all information regarding how much money your company owes, and to whom. VERSA PAYABLES™ maintains a complete record on each vendor, prints checks, check registers, vouchers, transaction reports, aged payables reports, vendor reports, and more. With VERSA PAYABLES™, you can even let your computer automatically select which vouchers are to be paid. VERSAPAYROLL™ $99.95 Versa PAYROLL" is a powerful and sophisticated, but easy to use payroll system that keeps track of all government-required payroll information. Complete employee records are maintained, and all necessary payroll calculations are performed automatically, with totals displayed on screen for operator approval. A payroll can be run totally, automati- cally, or the operator can intervene to prevent a check from being printed, or to alter information on it. If desired, totals may be posted to the VERSALEDGER IV" system. VERSAlNVENTORY™ $99.95 VERSA INVENTORY" is a complete inventory control system that gives you instant access to data on any item. VERSAlNVENTORY" 1 keeps track of all information related to what items are in stock, out of stock, on backorder, etc., stores sales and pricing data, alerts you when an item falls below a preset reorder point, and allows you to enter and print invoices directly or to link with the Versa RECEIVABLES'" system. VERSAlNVENTORY™ prints all needed inventory listings, reports of items below reorder point, inventory value re- ports, period and year-to-date sales reports, price lists, inventory checklists, etc. •CQMPmRQMCSl 50 N. PASCACK ROAD, SPRING VALLEY, N.Y. 10977 • TRS-80 is a trademark of -the Radio Shack Division of Tandy Corp- - * APPLE is a trademark of *CP/M is a trademark of Digital Research VersaLedger ip $149.95 VersaLedger IF" is a complete accounting system that grows as your business grows. VersaLedger II™ can be used as a simple personal checkbook register, expanded to a small business bookkeeping system or developed into a large corporate general ledger system without any additional software. • VersaLedger II'" gives you almost unlimited storage capacity (300 to 10,000 entries per month, depending on the system), • stores all check and general ledger information forever, • prints tractor-feed checks, • handles multiple checkbooks and general ledgers, • prints 17 customized accounting reports including check registers, balance sheets, income statements, transaction reports, account listings, etc. VersaLedger IT" comes with a professionally-written 160 page manual de- signed for first-time users. The VERSALEDGER IF" manual will help you become quickly familiar with VersaLedger II"", using complete sample data files supplied on diskette and more than 50 pages of sample printouts. SATISFACTION GUARANTEED! Every VERSABUSINESS'" module is guaranteed to outperform all other competitive systems, and at a fraction of their cost. If you are not satisfied with any VERSABUSINESS" module, you 1 Manuals for any VERSABUSINESS'" module may be iluum ui ii ik 1 1 i_ubi. ii yuu III K IIUI b may return il within 30 days for a refund. Manuals tor any VtRSABUSINES purchased (or $25 each, credited toward a later purchase of that module. To Order: Write or call Toll-free (800) 43 1-28 18 (N.Y.S. residents call 9 14-425- 1535) * add $3 for shipping in UPS areas * add $5 io CANADA or MEXICO * add $4 for C.O.D. or non-UPS areas * add proper postage elseivhere Circle 480 on inquiry card. ^^^ DEALER INQUIRIES WELCOME All prices and specifications subject to change / Delivery subject to availability. Apple Corp, ■ *IBM is a trademark of fBM Corp. ■ *OSBORNE is a trademark of Osborne Corp. - *XEROX is a trademark of Xerox Corp. Rana's disk drive was twice as good as Apple's with one head. ^M ■ ' I ' ■ '. ■ ■ \i*: ■ 5,Tm ■ Now we have two. We added another head so you won't have to buy another disk. That's the beauty of a double sided head. A floppy disk which allows you to read and write on both sides. For more storage, for more information, for keeping larger records, and for improved perfor- mance of your system. That's what our new Elite Two and Elite Three offers. It's the first double headed Apple® compatible disk drive in the industry. And of course, the technology is from Rana. We're the com- pany who gave you 163K bytes of storage with our Elite One, a 14% increase over Apple's. And now with our high tech double sided heads, our Elite Two and Three offers you two to four times more storage than Apple's. That's really taking a byte out of the competition. We put our heads together to give you a superior disk drive. We designed the Elite Three to give you near hard disk capacity, with all the advantages of a minifloppy system. The double sided head oper- ates on 80 tracks per side, giving you a capacity of 652K bytes. It would take 4 1 /2 Apples to give you that. And cost you three times our Elite Three's reasonable $849 pricetag. Rana's double sided heads give Apple II superior disk performance power than second generation personal com- puters such as IBM's. It takes 4V2 Apples to equal the capacity of our superior Elite Three. The Elite Two offers an impressive 326K bytes and 40 tracks on each side. This drive is making a real hit with users who need extra storage, but don't reguire top-of-the-line capacity. Costwise, it takes 2 1 /2 Apple drives to equal the performance of our Elite Two. And twice as many diskettes. Leave it to Rana to produce the most cost efficient disk drive in the world. We've always had the guts to be a leader. Our double sided head may be an industry first for Apple computers, but nobody was surprised. ©Apple is a registered trademark of Apple Computer, Inc. They've come to expect it from us. Because Rana has always been a leader. We were the first with a write protect feature, increased capacity, Your word processor stores 5 times as many pages of text on an Elite Three diskette as the cost ineffective Apple. and accurate head positioning. A first with attrac- tive styling, faster access time, and the conve- nience of storing a lot more pages on far fewer diskettes. We were first to bring high technology to a higher level of quality. So ask for an Elite One, Two, or Three. Because when it comes to disk drives, nobody uses their head like Rana. NOW AVAILABLE FOR THE APPLE III. . . THE ELITE TWO. THREE AND ELITE THREE. THREE RanaSystems 21300 Superior St., Chatsworth, CA 91311 (213) 709-5484. For dealer information call toll free: 1-800-421-2207. In California only call: 1-800-262-1221. Source Number TCT-654 Circle 337 on inquiry card. Available at all participating Computerland stores and other fine computer dealers. The C language provides a new standard for portability in a computer world characterized by a plethora of processors. Designed to make pro- grams portable, fast, and compact, C fills a niche between such high- level languages as BASIC, COBOL, and Pascal and low-level assembly languages tied to particular processors. Perhaps most aptly described as a "medium-level" programming language, C is a powerful tool in the hands of professional programmers. Most major microcomputer manufacturers and software developers use C for writing systems programs— operating systems, utilities, languages, and applications. Digital Research is writing all of its new products in C, including CP/M-68K for the 68000 microprocessor and the new Personal BASIC. Both Microsoft and Visicorp have used C ex- tensively in products ranging from Multiplan and Xenix to Visiword and Visi On. The computer graphics sequences in Star Trek //were created using C, and Lucasfilm Ltd. used C for computer-aided animation in the latest Star Wars saga, Return of the Jedi. Why is C so popular? The primary reason is that it allows programmers to easily transport programs from one computer or operating system to another while taking advantage of the specific features of the microprocessor in use. And C is at home with systems from 8-bit micro- computers to the Cray-1 , the world's fastest computer. As a result, C has been called a "portable assembly language," but it also includes many of the advanced structured-programming features found in languages like Pascal. Our theme articles in this issue take a close look at the C language. Stephen Johnson and Brian Kernighan of Bell Laboratories present an overview of C and compare it with other computer languages in "The C Language and Models for Systems Programming." James Joyce offers a guided tour of C's key features, along with programs that illustrate C programming concepts and style, in the first of a two-part series, "A C Language Primer." C is a concise language that has a small kernel of 30 reserved words, and its input/output specifics are gathered into a library of standard func- tions. That means the language can be brought up easily on new micro- processors, resulting in dozens of versions of C. We sampled a few of these for the most popular operating systems. Most applications programs are becoming large and complex in order 46 August 1983 © BYTE Publications Inc lANG that new users perceive them as easy to use. Jason Linhart discusses how to choose a suitable computer language for "Managing Software Development with C." Not surprisingly, the largest number of C languages, and some of the most advanced, are available for the highly regarded IBM Personal Com- puter. Most of the C compilers for the IBM PC are also available for the MS-DOS operating system, on which the IBM PC-DOS is based. These are reviewed by Ralph Phraner in "Nine C Compilers for the IBM Personal Computer." The CP/M-86 operating system has a wealth of C compilers as well. Authors Jerry Houston, Jim Brodrick, and Les Kent take a look at the first of those available in "Comparing C Compilers for CP/M-86." Christopher Kern reviews "Five C Compilers for CP/M-80." C has been available for CP/M-80 for a while, and as a result a strong C users' group and several volumes of public-domain software exist. No discussion of C is complete without mentioning the Unix operating system, which is written in C. Unix and its utilities comprise over 300,000 lines of C source code, certainly the most ambitious C project yet. Developed more than 10 years ago at Bell Laboratories, both Unix and C are now coming into widespread use. To round out our coverage of C, in this issue we begin "The Unix Tutorial," a series of articles on the Unix operating system. Part 1 is an overview of Unix and its features along with a short history of how C and Unix were developed. Together, C and Unix provide one of the most comfortable working environments for professional programmers. A text box by Walter Zintz describes Unix and C resources. Both the C language and the Unix operating system are based on modularity and short, general-purpose routines, a subject Rebecca Thomas explores in "What Is a Software Tool?" "The Unix C Compiler in a CP/M Environment" by Matthew Halfant looks at some of the issues and ambiguities involved in moving C programs between these two popular operating systems. An annotated bibliography of C on page 268 lists the books and ar- ticles on C that have been published in the past few years. C is relatively young for a computer language, but it is appropriate that, in its 1 Oth anniversary year, C is being recognized as the powerful language for professionals that it is. —Bruce Roberts UAG© August 1983 © BYTE Publications Inc 47 The C Language and Models for Systems Programming A compromise between assemblers and high-level languages, C helps programmers avoid the idiosyncrasies of particular machines by Stephen C. Johnson The C language was created at Bell Laboratories by Dennis Ritchie in 1972. One of its first uses was to rewrite the Unix operating system, previously written in PDP-11 assembly language. In its early years, C was used to write other critical systems programs as well: compilers, parser generators, document formatters, and editors, to name a few. At the time, using a high-level language for such applications was a radical departure from standard prac- tice; everyone knew that these programs had to be writ- ten in assembly language "for efficiency." Yet in many cases the C code, although clearly less efficient in any given routine, produced programs that outperformed similar programs written in assembly language. A key to understanding the philosophy behind C is the notion of a model for the problem to be solved. Rather than try to deal with all of reality in every line of code, programming languages, explicitly or implicit- ly, construct models of reality and present them to the programmer. In assembly language, for example, part of the language model is that the programmer need not be concerned with the actual memory location of the variables; they can be referred to by names like start or count. This simplification makes it far easier to pro- gram in assembly language than to write the binary bits that actually control the processor. The assembly- language model does, however, leave the allocation of registers and the choice of machine instructions to the user. BASIC provides another model, similar to that of a very good programmable calculator. For many purposes, BASIC programmers do not have to worry about the details of where variables are stored, how arithmetic is and Brian W. Kernighan done, or how to format output. As a result, BASIC is much easier to use than an assembly language. The Smalltalk system supports a very different model. The Smalltalk programmer manipulates objects whose physical locations are invisible to the user, as are the details of the object's creation, manipulation, and inter- nal structure. This model leads to a very different style of use; for example, rather than calling a routine to print an object, a Smalltalk user sends a message to the ob- ject telling it to print itself. High-level models like the one supported by Smalltalk tend to be easy to use (provided that the model supports what we want to do) but are often less efficient than low- level ones. The hardware support for some of these models, especially on microcomputers, is not very good; we may sacrifice efficiency for ease of use. In systems code, efficiency is often very important, so the use of high-level models may be impractical. On the other hand, the low-level model presented by assembly language is not ideal either. In an assembly language, the details of the machine being programmed are im- plicit in every line: how many registers it has, how it uses its stack, how the I/O (input/output) is done. Not only is assembly code too firmly attached to a par- ticular computer and system, it is also harder to write because the model supplied to us, with its registers and branches, is too far from the application we are trying to write. The C Model C offers a compromise. It makes available a basic model that is very close to the target machine, enabling 48 August 1983 © BYTE Publications Inc ^^egtf&%t&&***~ ** ass* ^§3$ The latest word in computer peripherals. ...and the last word in disk backup. The 525-CT FloppyTape Is a new class of product that provides the last word in Winchester disk drive backup with its many unique design features. Using the standard 1/4-inch tape cartridge, this innovative device combines low cost, high capacity, and disk-type data accessibility to provide disk backup features with new meanings: Low Price 1 . Sells for appreciably less than any other device with comparable features. 2. Priced at $300 per unit in large OEM quantities. High Capacity Storage 1. Stores 32 unformatted megabytes of data on a standard 1/4-inch tape cartridge. 2. Allows one tape cartridge to replace up to 40 double-sided, double-density floppy disks. Floppy Disk Emulation 1. Configures a standard 1/4-inch tape cartridge with important floppy disk features such as random access to sectors and soft sector formatting. 2. Allows in-place updating of information stored on the tape. Immediate Integration 1. Attaches to standard floppy disk controllers. 2. Provides plug compatibility with standard SA450 or SA850 interface connectors. Space Saving Design 1. Packaged in the same compact form factor as the 5-1/4-inch floppy or Winchester disk drive. 2. Designed with easy front panel loading and positive cartridge lock. 3. Permits flat or side mounting. So, let FloppyTape redefine your disk backup requirements. Next time you're in the market for the latest word in ^- backup, just look it up. . .then hook it up. For a Further Definition-Contact Cipher for a free 525-CT FloppyTape brochure, or for further information on other Cipher products. cipher 10225 Willow Creek Road, RO. Box 85170, San Diego, California 92138 Telephone: (619) 578-9100, TWX: 910-335-1251 CIPHER DATA PRODUCTS (UK) LTD. Camberley Surrey, England Telephone: 0276-682912 Telex: 858329 Circle 70 on inquiry card. CIPHER DATA PRODUCTS SARI. Paris, France Telephone: (1)668 87 87 Telex: 203935 CIPHER DATA PRODUCTS GmbH Munich, West Germany Telephone: (089) 807001/02 Telex: 521-4094 Sufoe/iS The Finest Quality Products for Apple® and IBM The Supe*<5 stands alone in fine quality and workmanship. SufcenS -CP80 • Adjustable sprocket pin. • 640 dots/line. High density, feed plus friction feed, high quality character. • Cartridge ribbon. • Bit image graphic. • Standard Centronics parallel. • 40, 71, 80, 142 columns. Optional RS232C. Super 5 has the following advantages compared to the normal floppy disk drive: Characteristics Super 5-T40 Normal Type Servo motor/Spindle connection Direct shaft drive Belt drive Head positioning mechanism Metal band positioner Ptastic CAM positioner Track to track time Approx. 3-6 msec. Approx. 40 msec. Write protected sensor Photo coupler Mechancial switch No of tracks 40 tracks 35 tracks SUPER5-T40 single sided, direct shaft drive SUPER5-T80 double sided, direct shaft drive T40 drive control card: suitable for 35, 40 tracks drive T80 drive control card: suitable for 35, 40, 80 tracks drive Mitsubo Corporation 667 Brea Canyon Rd., #25 Walnut, CA 91 789 Tel: (714) 594-6959 Japan: EI-EN Ent. TLX J23325 Taiwan: GIFU Ent. TEL (02) 752-9661 Hong Kong: A&N Ent. TEL 5-488463 us to write efficient code where necessary. At the same time it provides powerful mechanisms for building our own models, so that much of the coding can be done at a more comfortable level, safely removed from the idiosyncrasies of any particular computer. Most computers have dozens of different operation codes; because C tries to get close to the target hardware, it has dozens of operators. This feature makes C slight- ly harder to read (or, more properly, to learn) because, in addition to the usual arithmetic operators, there are operators for such common instructions as ++ (incre- ment), — (decrement), and « and » (left and right shift) as well as logical AND, OR, exclusive OR, and one's complement (&, |, , and ~). The reward for learning the operators is that programmers can state their in- tentions clearly and naturally and be assured of a direct translation into suitable machine instructions. In C the basic data types include bytes, short integers, long integers, and single- and double-precision floating-point numbers. C also supports pointers to other data. For systems programming, it is often vital to manipulate bits efficiently, for example, to control I/O devices, displays, and other hardware. Such tasks are easy in C because of its bit-manipulation operators. But in BASIC, FORTRAN, or Pascal, the bitwise operators do not exist— they are not part of the model. The only recourse in those languages is a painful emulation or the use of an efficient function call. The model of data in C is also very rich. The basic data types include bytes, short integers (typically 16 bits), long integers (typically 32 bits), unsigned versions of these, and single- and double-precision floating-point numbers. C also supports the notion of pointers to other data; these pointers correspond to machine addresses. Because most hardware instructions deal directly with such addresses, the support of pointers encourages generation of extremely efficient code for critical program segments and the building and manipulation of very ef- ficient data structures. Pointer Operations The model of pointers supported in C includes the standard operations of taking the address of an object (& object) and accessing the object pointed to by a pointer (*p). For example, suppose that x is an integer and p is a pointer to an integer. (There is no such thing as just "a pointer"; it is always a pointer to a particular data type.) Then x = 3; p = &x; /* set x to 3 (what else?) */ /* set p to address of x */ The content of p is the address of x; the value pointed 50 Augtut 1983 © BYTE Publications Inc Circle 277 on inquiry card. WHAT GOOD IS A COMPUTER THAT'S FASTER THAN EINSTEIN IF YOUR FORMS SUPPLIER IS TENBERG? Unlike our major competitors, Deluxe gives you a 3-day in-plant turnaround on standard computer forms. Even on small quantities of 500 or more. What's more, we can match all popular software formats for your checks, invoices and statements. We'll even customize forms for your own programs with a 5-day in-plant turnaround, and lots of ink colors and free logo designs to choose from. And if you're not satisfied with any Deluxe form, simply return it within 30 days for a prompt refund. We have a free full color catalog for you, too. It features computer forms, supplies and accessories. With it, you can order the materials you need to keep up with your business. And the forms you need to keep up with your computer. See your local banker, or call toll free: 1-800-228-2606. (In Nebraska: 1-800-642-8777.) FREE FULL COLOR CATALOG. Just send in this coupon for our full color catalog featuring computer forms, supplies and accessories. Deluxe Computer Forms, 530 North Wheeler, P.O. Box 43046, St. Paul, Minnesota 55164-0046 Name Company- Address City State_ Phone( )_ DELUXE COMPUTER FORMS £1 Circle 134 on inquiry card. BYTE August 1983 51 to by p is written' *p. Thus, in this case, *p is 3. Converse- ly, *p can be used to set the value of x: *p = 4; /* x is now 4 */ It is also possible to use the value of the pointer itself: if q is also a pointer to an integer, then the statement q = p; /* make q point to whatever p points to */ gives q the same value as p, so q also points to x. Figure 1 illustrates this operation. Beyond this capability, which is more or less what Pascal provides, C includes the ability to manipulate pointers in ways that depend on what they are pointing to. For example, if we have a pointer to a byte, and in- crement it, it points to the next byte; if we have a pointer to a 16-bit integer and increment it, it points to the next integer (2 bytes away). Pointers are an excellent way to do array indexing, as shown in figure 2, where x is an array of integers. In contrast to the pointer capabilities of C, FORTRAN and BASIC have a restricted model that does not include pointers. In Pascal, pointers are dynamic objects that can be set only by calling the storage allocation function new. Pascal does not allow pointer arithmetic. Another use of pointers in C is to associate an address with a device. Most BASIC programmers are used to PEEK and POKE statements sprinkled liberally throughout their programs to access memory locations that control devices. In C, pointers achieve the same effect without the need to add a new pair of functions. In BASIC, you set a memory location by a sequence such as 100 V = 36828 800 P0KE(V, 15) In C, the same code might be written as souncLvol = 36828; /* sound generator volume address */ *sound_vol = 15; /* set sound generator volume */ With the freedom implicit in C's use of pointers come certain risks. Much of C's growth over the last decade has been in ways of detecting erroneous uses of pointers without restricting the ability to write efficient code when necessary. Casts Operating systems have to deal with some very unusual objects and events: interrupts; memory maps; apparent locations in memory that really represent devices, hardware traps and faults; and I/O controllers. It is unlikely that even a low-level model can adequate- ly support all of these notions or new ones that come along in the future. So a key idea in C is that the language model be flexible, with escape hatches to allow Figure 1: If pointer p points to location x, then the statement q=p makes q point to x also. p 1 _l N p p p V x[0] x[l] X [2] • ... y p- x [n] Figure 2: The ability to do pointer arithmetic facilitates array indexing. the programmer to do the right thing, even if the language designer didn't think of it first. One such construct, called a cast, is a way of per- suading the compiler that an object of one type should be treated as if it had a different type. If, for example, you write an expression of the form (type-name) expression the result is the value of expression as an object of type type-name. For some combinations, this causes a new representation to be computed, as in (float) integer expression but sometimes it simply means that the bits in the ex- pression are to be treated as a different type without a change in representation. Casts involving pointers are of this kind. Suppose, for example, that you want to test whether a pointer points to an odd or even address. It is not legal to use the bit- wise operators on pointers, but you can do the job by 52 August 1983 © BYTE Publication! Inc Circle 178 on inquiry card. IBM" + GENIE = Solution 5.25" Fixed /Removable Winchester Cartridge Drive Systems For The IBM Personal Computer/Compatibles The Genie Cartridge Drive A revolutionary new 10 Megabyte Hard Disk Drive that in- cludes a 5 Megabyte removable hard disk cartridge. The car- tridge drive system simply plugs Into your computer, and in- cludes all necessary software and hardware. Genie Drives are compatible with most popular software, and each car- tridge replaces over 30 double-density floppy disks. • 5.25" Removable Cartridge sod ANSI Standard}. Imagine, 5 Megabytes in the i of your hand. These small Winchester cartridges are .75 inches thick and 5.50 Inches square. The disk itself is completely sealed from the outside and all its hazards by a sliding door that opens only once the cartridge is firmly seated inside the drive. • Genie's Solution To Personal Computer Mass Storage Problems 10 MEGABYTES OF ON-LINE STORAGE «_ZI ., «~ Z U«« Ci««n« D»,hiomc file sizes to 5 megabytes Computer Mass Storage Problems BACK-UP 5 MEGABYTES IN TWO MINUTES "P un *" now people with serious mass storage applica- p«oTDinr>c ikiTcnpuAkipcADii itv t' ons have nacl n0 realistic means of conveniently maintaln- UAH I HILHjb I N I fcHOHANlafcABILI I Y ing the | r | arge data bases due t0 tne cost of storage media GUARANTEED 5 MEGABYTES OF ON-LINE STORAGE FILE SIZES TO 5 MEGABYTES Genie Systems Are Expandable Up To 16f Megabytes Using Any Combination and the expense and Inefficiencies of doing back-ups. The Genie systems approach solves such typical storage prob- lems by allowing both high capacity Fixed Drives and 5 Megabyte Re- movable Cartridge Drives to be intermixed on the same computer system. This provides the ultimate storage solution because of the new ease of doing back-ups, along with ability to maintain several large data bases on removable cartridges, eliminating the need to tie up expensive disk drives over a single data base application. With Genie Drives, the combinations are unlimited. Flexibility and versatility were key design considerations. A user can configure up to eight of our Drive Products in any combination to derive a storage solution for Just about any application Imaginable. With Genie, your personal computer can now take on tasks that had only been possible with mainframes. Genie Drive Models i MEGABYTES SIMPLY PLUGS INTO YOUR I.B.M. USER CAN BACK-UP TO MODELS 5 + 5 I REMOVABLE CARTRIDGE DRIVES OR DISKET 5 MEGABYTES 10 MEGABYTES 15 MEGABYTES 20 MEGABYTES Manufacturer's suggested retail price. Includes all required components. CP/M-86 and Concurrent CP/M-86 is a registered trademark of Digital Research. IBM is a registered trademark of IBM Corporation. Dysan is a registered trademark of Dysan Corporation. UCSD P System is a registered trademark of the Regents of the University of California San Diego. QNX is a registered trademark of Quantum Software System, Inc. Etherlink is a registered trademark of 3Com Corporation. Ethernet is a registered trademark of Xerox Corporation. TALK ABOUT USER FRIENDLY. . . . 3Com Etherstiare™ Compatible (Ethernet Standard) • IBM XT Compatible • Automatic Install (Genie Custom BIOS) • Comprehensive menu driven utility package • Intermix different operating systems on disk or cartridge • Assign to any drive codes from A thru H • Choice of volume sizes • Give your virtual volumes 16 character names • Assign command allows you to assign 8 virtual drives on line at any one time • Show command allows instantaneous viewing of all virtual drives on line • Help command displays syntax for all new commands • User can back up to or from any model Genie Drive 1 File sizes 5-20 megabytes, dependent upon drive type. Automatic recovery system Easy back ups in minutes Cartridges can have 16 character names System status screen messages 1 System expandable to eight drives using only one slot in your IBM PC 1 Built-in error detection and correction 1 No preventative maintenance required 1 Power-on self test 1 Create turnkey systems 1 Ultra hi-speed DMA data transfers 1 Comes complete with all necessary software and hardware 1 Operating systems supported: IBM DOS 1.1, 2.0, CONCURRENT CP/M 86; CP/M 86* , UCSD P SYSTEM® , QNXTM AVAILABLE AT YOUR LOCAL COMPUTER DEALER GEIliE COMPUTER CORPORATION 31131 Via Colinas#607»Westlake Village, CA91362*(213)991-6210*TI_X 658233 (GENIE USA) fl The Best In Price, Selection and Delivery Professional Quality Call Now TOLL FREE 800-368-3404 (In VA, Call Collect 703-237-8695) AMPEX'INTERTEOTEXAS INSTRUMENTS-GENERAL DATA COMM. 'ANDERSON JACOBSON«C.ITOH»QUME • BEEHIVE' DATASOU TH « DIABLO • CENTRONICS -NEC 'PRENTICE Gnansa INTERTEC SUPERBRAIN II 64KDD* $1874 64K QD* $2249 64K SD- (96TPI) $2689 •(Includes M/Soft BASIC) DYNABYTE8/16BIT Call Callan 16/32 BIT Call duenna NEC 7710 Ser $2089 7715 $2099 7730 Par $2099 7720 $2449 7725 $2496 Std. Tractor 77xx $ 199 3510 $1390 3515 $1424 3530 $1390 3550 (IBM) $1869 3520 $1979 3525 $1999 DATASOUTH ED180 Call DATASOUTH ED220 Call DIABLO 620-SPI $ 889 630-R102/147 $1949 630 ECS $2389 630-R155 $1709 •(for IBM PC, Apple II, TRS-80) 630K104(KSR) $2265 QUME Sprint9/45FP $1794 Sprint 9/55 FP $2119 Sprint 9/55 FP/SMEM . . . $2186 Sprint 9/55 LP/XMEM . . . $2094 Sprint 11 /40-PLUS $1449 Bi-Dir Forms Tractor .... $ 199 CENTRONICS: 122 (p) . . $ 689 High Speed Line Printers . . Call naaacng AMPEX D80 $1 589 PHAZE (3270 EM.) $1589 BEEHIVE (SMART DISPLAY) DM5 Call DM5A Call DM83 (Burroughs) Call DM3270 (3270 Emulator) . . Call Protocol Converter Call QUME QVT-102 $ 549 QVT-108 Call C. ITOH CIT101 $1289 CIT161 (64 Colors) Call CIT201 (Graphics for TEK 401 0/401 4) Call CIT 41 4 (Graphics 640 x 480 Res.) Call TEXAS INSTRUMENTS 745 Standard $1172 745 Std. (Reconditioned) ..Call 765 Bbl M'my Call 785/787 Call 810 Basic $1249 810 Package $1439 820 Package RO $1610 820 KSR Package Call 703 Std $ 459 707 KSR $ 549 850 Tractor Feed $ 549 ■ ■'■M-H.'.H PRENTICE STAR 300 Bd.$ 124 U.S. Rob Auto Dial 21 2A . $ 469 Stat Muxes Call Ventel212 + 3E Call GDC 24/9600 Bd Call Prentice 24/9000 Bd Call EBaaana QUME DataTrak5$ 289 or 2 for $ 549 DataTrak8$ 51 9 or 2 for $ 999 EEgEEEai BISYNC-3780 $ 769 Wordstar $ 279 Data Star $ 218 Mail Merge $ 144 Spell Star $ 1 44 Plan 80 $ 249 d Base II $ 489 CalcStar $ 191 SuperSort $ 158 Super Calc $ 144 InfoStar $ 279 CISCobol $ 689 Forms II $ 159 MACRO 80 $ 183 "C" Compiler $ 239 Term II $ 189 WordStar Professional (WS, SS, MM, SI) .... $ 399 ReportStar $ 1 99 Starlndex $ 129 PlanStar Call StarBurst Call InfoStar Plus Call T71 256K RAM Bd $ 256 256K RAM db/Full Parity . $ 305 CP/M-Z80 CO-PROC. . . $ 495 Baby Blue $ 600 Baby TEX $ 600 Baby TALK 8270 BISYNC $ 895 8" Disk Controller $ 395 In addition, we can make EIA RS 232 or RS 449 cables to your order, and supply you with ribbons, printer stands, print wheels, thimbles for all printers listed. And many, many more items. CALL NOW. All Hems shipped freight collect either motor freight or UPS unless otherwise specified All prices already include 3% cash discount. Purchase with credit card does not in- clude discount. Virginia residents, add 4% Sales Tax. For fastest delivery send cer- tified check, money order or bank-wire transfer Sorry, no COD orders. All equip- ment is in factory cartons with manufaclurers warranty (honored at our depot). Prices subject to change without notice Most ifems in slock '■ ^TERMflBLS i run Terminals Terrific, Inc., P.O. Box 216, Merrifield, VA 22116 Phone: 800-368-3404 (In VA, Call Collect 703-237-8695) casting a pointer to an integer and then testing the low- order bit with a logical and operator: if ((int)p & 1) { . . . pointer is odd } else { . . . pointer is even } The cast (int)p changes the interpretation of the pointer p without changing its value. A very similar example is the mechanism used with the standard storage allocator. The C library function calloc is analogous to the Pascal new function; it returns a pointer to a block of storage. The pointer returned by calloc must be cast to the proper type: pthing = (thing *) calloc(n, sizeof(thing)); This tells the compiler that the pointer returned by calloc may be safely regarded as a pointer to an object of the type thing. Higher-Level Models We need not be stuck with a machine-level model for long. C provides a number of ways by which we can ex- tend the basic model to support data structures and operations important to our particular program. The two major ways to extend the model are by defining func- tions and making data structures, as a simple example illustrates. Suppose you are writing a video game and want to have a number of pictures moving around the screen. You could define a data structure that describes the objects using the struct mechanism of C; such a data structure might contain the x and y coordinates of the current picture, enough information to draw the picture on the screen, and other information of importance for the game (such as orientation, velocity, amount of fuel remaining, etc.). The declaration would look something like this: struct picture { /* picture for display */ int x, y; /* screen coordinates */ float vel; /* velocity */ float fuel; /* fuel remaining */ dispJist *dl; /* display list to print it */ }; You can then declare variables of this composite type and build functions that provide basic operations on it. Depending on the game, you might supply functions to create, change, and destroy pictures, move them from one place to another, and decide whether two pictures collide. At this point, you will have effectively raised the level of the model in which you program from bits and bytes to picture manipulation. You can concentrate on the rules of the program rather than the implementa- tion. Once you're comfortable with this style of program- ming, the nearly nonexistent model-building facilities of BASIC, say, become nearly intolerable. 54 August 1983 © BYTE Publications Inc Circle 387 on Inquiry card. Teletek's New Combo Could Make You A Hero ! ■ ,* The SBC-II could be just the right ingredient for your latest concoction. The newest member of Teletek's family of multi-user, multi-processing S-100 products, the SBC-II essentially combines, or "sandwiches" two Teletek SBC-I's into one board. The SBC- II provides the capability to sup- port two users from one standard size IEEE-696/S-100 slave board. The SBC-II maintains full performance for each user with an independent CPU (Z80A or Z80B), 64K RAM, Serial I/O, and FIFO communications port to the system master. The system integrator benefits by getting complete support for two users for the price of one board. TurboDOS and MDZ operating systems will support combinations of SBC-I's and SBC-M's offering system design efficiency and flexibility never before possible. If you're hungry for value and efficiency, order an SBC-II from Teletek. You'll love every byte. TELETEK 4600 Pell Drive Sacramento, CA 95838 (916) 920-4600 Telex 4991834 TELETEK Dealer inquiries invited. ©Teletek 1983 Circle 385 on inquiry card. Efficiency Higher-level models have their drawbacks; you must pay for the function calls needed to do many of the basic operations on your pictures. Most C implementations try hard to make function calls efficient, but if you haven't skillfully chosen a model, the inefficiency may be painful. Especially in the earliest stages of program development, however, concern with efficiency may be misplaced. Why optimize a program when you are like- ly to decide tomorrow that it was all wrong and should be rewritten? The models are tailored to a particular pro- gram, so they may be readily adapted to improve effi- ciency without destroying the program's structure. Although function calls and the use of a compiler language are somewhat inefficient, they have dramatic advantages. Algorithms and data structures expressed in a high-level language are comprehensible and thus more likely to be revised when a different good idea comes along. If they were written in an opaque, incom- prehensible language, changes would be attempted rare- ly and successful even more rarely. Because real pro- grams typically suffer a long series of changes and adap- tations before a user ever sees them, being able to modify the algorithms and data structures quickly as the job changes leads to a better final product. Another point about efficiency is worth mentioning. Many studies have shown that most programs spend 50 percent or more of their time in a very small portion (5 percent or so) of their code. This suggests that the 95 percent of the program that is noncritical should be as clear and easy to understand and change as possible. When it comes to the critical 5 percent, C lets the user get very close to the target machine in order to improve efficiency. Furthermore, many C environments contain measurement tools that enable the programmer to iden- tify these critical sections easily. But the strategy is definitely: first make it work, then make it right, and, finally, make it fast. Using functions to extend the base language also prevents C from becoming unwieldy. Many built-in features of other languages (notably I/O, string handling, and dynamic storage allocation) are supplied by func- tion calls in C. This means that the model supplied by C itself is very flexible; it adapts to different operating systems and environments without suffering from a "one size fits all" philosophy. For example, the character-string operations appropriate for a text editor might be quite different than those for a spelling checker, and those in turn might differ from the operations needed in an operating system (where you might not need such opera- tions and could not afford to have them loaded by default). Portability Using functions to extend the base language explains why a language that is so low level can be so portable. C compilers have been built for more than 40 different machines, from the Z80 to the Cray-1. The Unix system Make your micro work like a mainframe, First, neatly tape the "370" label onto your IBM Personal Computer. Now slip a dBASE II™ disk into your main drive. That's it: your IBM PC is now ready to run a relational database system, the kind IBM put on their mainframes last year. And you're ready with more data handling power than you would have dreamed possible before dBASE II. With a word or two, you create data- bases, append new data, update, modify and replace fields, records and entire databases. Display any information, report months worth of data in minutes and zip through input screens and output forms. You can use it interactively for answers right now. Or save your instruc- tions and repeat everything with two words: do Manhours, do Project X, do whatever has to be done. To try dBASE II free for 30 days, drop by your local computer store. Or if they're sold out, call us at (213) 204-5570. If you don't like it, you get your money back. But if you do that, you'll have to remove the label. Because nothing short of a mainframe works like dBASE II. ^^^\ AshtonTate •^ g