•^ .& $3.95 $4.95 in Canada A McGraw-Hill Publication 0360-5280 Display Until December 15 01 '440237" -^-^■^^ Inside the IBM PCs 60-DAY MONEY-BACK GUARANTEE Introducing Borland's New Turbo GameWorks " $69.95 THE GAMES YOU CAN PLAY, REPLAY, REVISE AND REWRITE BUT CANNOT RESIST. (Turbo Pascal Source Code included!) TURBO HOLIDAY JUMBO PA 45.00 We give you the source code, the manual, the diskettes, the 60-day guarantee and the competitive edge. Let the games begin. Chess. Bridge. Go-Moku. State-of-the art games that let you be player, referee, and rules committee — because you have the Turbo Pascal source code. Which means that you can play a game or create a game, any time and any way you want Borland's new Turbo GameWorks lets you combine gamesmanship with craftsmanship. Discover the secret techniques and moves used by the Old Masters. Learn exactly how state-of- the-art computer games are made — so you can go off and make your own. Since you have the source code, you can always change the game. Or rig the game, if no one's looking. Pure Magic. That's Turbo GameWorks. And part of the "sourcery" — Turbo GameWorks is only $69.95. When combined with our new Turbo Editor Toolbox in the Turbo New Pack, it's only $47.50. SHORT CUTS, SECRETS AND STRATEGIES. The Turbo GameWorks man- ual takes you step-by-step through all the games. How to play them. How to modify them. How to use the power of Turbo Pascal to write new games. You'll learn general problem analysis, how to identify all possible moves, "rule of thumb" strategies, procedures for testing strategies, and ways to rate options. You'll also be introduced to "top down" program design, the develop- ment of basic algorithms, the use of constants and data structures and ways to design short cuts with incremental updating. On top of all that, you'll have a lot of fun (if you want to). So go to play (and work) with Borland's new Turbo GameWorks. It's unique. It's fasci- nating. And it's brand-new. Be first with the latest and greatest — order your Turbo Game- Works today. 4585 Scotts \5dley Drive, Scotts Valley CA 95(166 Phone (408) 438-8400 Telex 172373 Inquiry 17 for End-Users. Inquiry 18 for DEALERS ONLY. With Dazzling Discounts! BORLAND'S TURBO GAMEWORKS AND SOME OF ITS MASTER PIECES Chess, the ultimate strategic game. A game so old that no one knows its exact origins. Turbo GameWorks lets you play chess at six dif- ferent levels from the beginner to the sophisti- cated user. And you have many ways of playing with your Turbo GameWorks. Let the computer solve checkmate problems. Set the time limit for each game. And there's more. Decide whether you or the computer "goes first." Trade places with the computer at any point in the game. It's all possible with Game- Works. Go-Moku, also known as "Five-in-Line," is a | very old Japanese game played on a board of squares. The first player to get five game pieces in a row — either horizontally, vertically, or diagonally — wins the game. It's an intriguing game. But you're not limited to playing it one way. With Turbo GameWorks, you can modify it your way. Bridge. Play bridge with a friend or team up against the program — you decide which hands the computer plays. You can even decide to let the program cheat! The program automatically bids and plays its own hands. And, since you can tinker with the source code, you can make "your" Bridge unlike any other. ; whole Turbo Pascal fai members, at an ini Turbo Pascal 30 ines an integrated programming environment with the fasiesi I compiler in the galaxy. teaches you step-by-step how lo use the Turi>o Pascal development environ- ment With commented source code for ail program examples on diskette. gives you all die tools you need to son and search your data and build powerful database appli gives you a com- plete library of Pascal procedures to build applications using high resoluuon graphics and graphics window management —Chess, Bridge, Go-Moku Secrets and strategies of state-of-the-art puter games are revealed with complete source code. — the Pascal modules dial lei you build your own word proce tar-like program, Mi Star" 1 , is included on your disk. You're getting everything at only $40 each And me or several members of die Turbo family, lie creative — nothing can stop hi buying the Jumbo Pack, picking out the ones you already have and giving them as holiday gifts (or family or friends, At these pri- afford lo give lo others and lo yourself i i ivirbO Ihflflf SaW nearest you. To order by Available & dea g£&' f^j&SSS&Vi^* (800) 255" 1 •Turbo Holiday Jumbo Pack Pack SBOSB&B& $55001 CareluW bil 6-bil Turbo Holiday Turbo New Pack Pascal pascal WIB087 Pascal wlBCD Pascal w/8087 and BCD Turbo DalaBase Turbo GrapWk Turbo Tulor Turbo Editor Turbo GameWorks Quanlily $24500 — — ' $125 00 — — - $95 00 $69.95 $109.90 $109.90 . $124.95 $54.95 $54.95 $3495 $699 5 — $6995 — all U.S Cred,.CardExp.'a»°" Bor^'Sf Siale: Telepnone MBStSSSK" payment oy «*» ^85* TURBO "NEW" PACK $95.00 ^rt eirh Sold separately Turbo GameWor' Turbo Editor Toe 0$0 TURBO HOLIDAY PACK $125.00 holiday special you gel our suiiudnj Turbo Pascal® 3- Turbo Tutor® Turbo DataBase Toolbox All this for only $125.00 See the order form ai right Hiibo Pas -.i:)f m jpu "I But: ■ a regtsiemi indenu SAVE OVER 30% ON OUR GIFT PACKS! Announcing Borland's New Turbo Editor Toolbox M $69.95 IT'S ALL YOU NEED TO BUILD YOUR OWN WORD PROCESSOR FOR ONLY $69.95! You get all the modules you need to build your own word processor. • You get ready-to-compile source code. • You get a rull-featured word processor that looks and acts like WordStar™; we call it MicroStar™ • You get a 200-page manual that tells you how to integrate the editor proce- dures and functions into your programs. You can use Turbo Editor Toolbox "as is" or modify it any way you want. And you don't get a bill for Royalties. Because Borland doesn't believe you should pay for something more than once. All this and more for only $69.95. And until March 1, 1986 you can get Bor- land's new Turbo Editor Toolbox for even less! (Only $47.50 when you buy the special Turbo New Pack.) YOU CAN HAVE MANY WINDOWS ON THE WORLD. The new Turbo Editor Toolbox features windowing, a technique that lets you see several documents — or several parts of the same document — at once. You know best what your needs are. Turbo Editor Toolbox lets you open the windows you want And to make those windows part of your program. WITH TURBO EDITOR TOOLBOX YOU CAN HAVE THE BEST OF ALL WORD PROCESSORS IN YOUR WORD PRO- CESSOR. You can make WordStar behave like Multi-Mate. Support windows just like Microsoft's® Word™ And do it as fast as WordPerfect does it Incorporate your new "hybrids" into your programs to achieve incredible control and power. Turbo Editor Toolbox. It's the kind of tool that almost everyone needs — and we're the kind of company to give it to you at a reasona- ble price, without any compromise on quality. (We're so sure you'll be satisfied that we offer a 60-day money-back guarantee — something no one else does.) THE CRITICS' CHOICE "Turbo Pascal has got to be the best value in lan- guages on the market today — and Borland Interna- tional, by delivering excellent products at reasona- ble costs, is leading the software industry where it has to go. Turbo Pascal is more than just a good program at a low cost It's also a low-cost, well- conceived programming language making it possi- ble for lots of people to produce good programs. " Jerry Pournelle, BYTE "This compiler, produced by Borland International, is one of the best programming tools presently available for the PC." Michael Covington, PC Tech Journal "Language deal of the century...Turbo Pascal" Jell Dunlemann, PC Magazine BORIPHD INTERNATIONAL Three Special Gift Packs 60-DAY MONEY BACK GUARANTEE Borland's SuperKey And SideKick Work So Well Together, You'll Hardly Work At All. AN UNBEATABLE TEAM AT AN UNBEATABLE PRICE! We've teamed the best with the best to make the greatest. The best keyboard enhancer, SuperKey®. The best desktop organizer. SideKick®. The dynamic duo working hand in hand to let you do many different things at once. A way that cuts down the keystrokes, so you're working instead of just typing. A way that wasn't possible until we paired the electronic wizardry of SuperKey with the practical efficiency of SideKick. SuperKey brings the magic. SideKick does the de- tails. The ''S-Team" works beautifully together because we designed them that way. GET SUPERKEY AND SIDEKICK TODAY and you'll have an unbeatable team at an unbeatable price — and a $15 rebate back in the mail. SIDEKICK INCLUDES: * Calculator * Notepad * Auto dialer & phone directory * ASCII table * Perpetual calendar & datebook Help window * Full-screen editor with word-wrap, paragraph editing and much much more. (Chances are that once you have SuperKey and SideKick working together for you, you'll never need to use a word-processing program again). SUPERKEY INCLUDES: "Encryption to keep confidential files confidential * Programmable keys that let you turn a thousand keystrokes into one * Keyboard lock * Automatic turn-off of your screen after a pre-set time so the expensive phosphorus in your monitor's screen isn't etched or mined * Secret Password protection and more. IF YOU USE SIDEKICK, YOU NEED SUPERKEY. BECAUSE SUPERKEY AND SIDEKICK CAN MAKE YOUR DAY GO SOMETHING LIKE THIS: 8:00 sm. You got lo work on time, despite the 44-mph turkey ahead of you in ihe fast lane. It's spread- sheet time. You hit one key. Lotus 1-2-3 (or whatever) is up and ninning. (One key, because SuperKey has recorded all die CDM23 123< ENTER> / F R SALES foolishness and your one keystroke played all that back instantly. One keystroke instead of a minuet). 8:03 sm. You're into die spreadsheet. Phone rings. You kick in SideKick's Notepad — without leaving your spreadsheet. You talk. You listen to Prank. You make notes that tell you that Frank Is tipping the numbers from yester- day's order and he needs a new price and delivery date. He wants a meeting. Fast, but when? You have SideKick fire up your Calendar. Time agreed and noted — in SideKick's NotePad. Conversation ends. Your spreadsheet is still there. 8:07 am. You're watching the spreadsheet but you're thinking about the new bid you have to figure out. So you have SideKick's Calculator pulled up on the screen — over a small piece of the spreadsheet— which doesn't go away. 8:08 sm. SideKick is coming up with new numbers. SuperKey keeps the spreadsheet on a roll. Satisfied with the numbers, you have SideKick auto-dial Frank's number. Talk. Talk. Hang up. 8:09 sm. Spreadsheet about done. You're watching it. but thinking about what Frank just said on the phone He liked your numbers. He ordered. He said. "That was fast. We won't need that meeting. (SideKick cancels it from your Calendar). And he also said, "How did you get all that done so quickly?" And you said, "I've got a couple of new guy? working for me." Copyright 1985 Borland International BI-1014 SuperKey and SideKick are registered trademarks of Borland International, Inc. 1-2-3 is a trademark of Lotus Development Corp IBM is a registered trademark of International Business Machines Corp. Inquiry 17 for End-Users. Inquiry 18 for DEALERS ONLY. IF YOU DON! USE SIDEKICK YET, YOU GET THEM BOTH AND FOR A LIMITED TIME. A $15.00 CASH-BACK! Because SuperKey and SideKick are so compatible, we let them move in together. Into their own blister-pack. Willi the $15.00 cash-back coupon and the manuals. Which is what you get for J 1 39-90 instead of the usual $154,90. You need to fill-in the cash-back coupon, along with your registration cards and proof of purchase, and mail il back. We'll msh you your $15.00 rebate right away. Rebate otTerends March 31. 19S6. (PS: You can still buy SuperKey and SideKick separately, SuperKey $69.95, SideKick $84.95. Not copy-protected. THE CRITICS CHOICE "If you want the ultimate in sophistication, you wont find any thing finer on the battlefield right now than Borland's SuperKey and SideKick combo. " /.ffltf ^ W0PTMAH. InloWorld ■») BORIPHD m 4585 Scotts Valley Drive, Scotts Valley CA 95066 Phone (408) 438-8400 Telex 172373 compati the dealer Yes i want the Best! m i,i^^"l , r .,„n S154.9° SJSS S„«WS69.95 icon pro"*""" S,c««**M; 95 . inol copy-pro' l B M®PC. At. '■■-__ — 7^To?«3 for tne u™~; . ***£&* laJtlislr'M" 5 protected WO*" , , „, s i, n ,d your It! "*"?|3 P»c es inclu loteign orders a product ordered ^&&«» t ZZ Cover illustrated by Catherine Kanner MT^ |M l^^^*U^^™ VOLUME 10. NUMBER 1 1. 1985 BYTE Inside tfo IBM PCs Editorial: Intel and Future IBM PCs by G. Michael Vose 4 An Annotated Bibliography of Recent Books by Donald Evan Crabb 11 Public-Domain Utilities by ]on R. Edwards 39 ROM BIOS Extensions for the PC AT by Peter Norton 59 The 8087/80287 Performance Curve by Stephen R. Fried 66 Moving from the 8088 to the 80286 by William J. Claff 92 Writing Desk Accessories by Tom Wadlow 105 A MIDI Recorder by Donald Swearingen 127 Circuit Design with Lotus 1-2-3 by ]ohn L. Haynes 143 Adding a Hard Disk to Your PC AT by ]on Shiell and ]ohn Markoff 159 Fixed Disks and the PC AT by }on Shiell and \ohn Markoff 167 A Survey of Debuggers by Frank Drake Jr., Arthur McCaffrey, and lohn Sadowsky 177 IBM Compatibility Issues bu Mark Dahmke 187 Benchmarking the Clones by \on R. Edwards and Glenn Fiartwig 195 Four Hard Disks for Under $1000 by Richard Grehan 203 Programming the Enhanced Graphics Adapter by Richard Wilton 209 IBM PC Interrupt Service Routines by Paul M. Dunphy 223 Pick, Coherent, and THEOS by Marc J. Rochkind 231 One Million Primes Through the Sieve by T. A. Peng 243 TopView by TJ Byers 247 When Your PC Doesn't Work by Gene B. Williams 253 IBM PC Family BIOS Comparison by ]on Shiell and }ohn Markoff 259 Device-Independent Graphics by Thomas B. Clarkson III 269 IBM PC Disk Performance and the Interleave Factor by Marcus Mod 283 BYTE's Ongoing Monitor Box 303 eBYTE |ISSN 0360-5280) is published monthly with one extra issue per year by McGraw-Hill Inc Founder: lames H McGraw |I860-I948). Executive, editorial, circulation, and advertising offices 70 Main St.. Peterborough NH 03458, phone |603| 924-928], Office hours: Mon-Thur 8:30 AM - 4:30 PM. Friday 8 30 AM - l:00 PM. Eastern Time Address subscriptions to BYTE Subscriptions, POB 590. Martinsville. N| 08836 Postmaster send address changes. USPS Form 3579. undeliverable copies, and fulfillment questions to BYTE Subscriptions. POB 596. Martinsville. N| 08836. Second-class postage paid at Peterborough. NH 03458 and additional mailing offices. Postage paid at Winnipeg, Manitoba. Registration number 9321 Subscriptions are S2l for one year. S38 for two years, and S55 for three years in the USA and its possessions. In Canada and Mexico, S23 for one year. S42 lor two years. S6l for three years. S69 for one year air delivery to Europe. I7.I00 yen for one year surface delivery to Japan. S37 surface delivery elsewhere. Air delivery to selected areas at additional rates upon request. Single copy price is S3. 50 in the USA and its possessions. S3.95 in Canada and Mexico. S4.50 in Europe, and S5 elsewhere. Foreign subscriptions and sales should be remitted in United States lunds drawn on a US bank Please allow six to eight weeks for delivery of first issue Printed in the United States of America Address all editorial correspondence to the Editor. BYTE. POB 372. Hancock. NH 03449. Unacceptable manuscripts will be returned if accompanied by sufficient first-class postage. Not responsible for lost manuscripts or photos Opinions expressed by the authors are not necessarily those of BYTE. Copyright © I985 by McGraw-Hill Inc. All rights reserved. Trademark registered in the United States Patent and Trademark Office Where necessary, permission is granted by the copyright owner lor libraries and others registered with the Copyright Clearance Center (CCC| to photocopy any article herein for the flat fee of SI. 50 per copy of the article or any part thereof Correspondence and payment should be sent directly to the CCC. 29 Congress St. Salem MA 01970 Specify ISSN 0360-5280/83. SI. 50. Copying done for other than personal or internal reference use without the permission of McGraw-Hill Inc. is prohibited. Requests for special permission or bulk orders should be addressed to the publisher. BYTE is available in microform from University Microfilms International, 300 North Zeeb Rd . Dept. PR. Ann Arbor. Ml 48I06 or 18 Bedford Row. Dept. PR, London WCIR 4EJ England. Subscription questions or problems should be addressed to: BYTE Subscriber Service, POB 328, Hancock. NH 03449 Fall I985 BYTE* Inside the IBM PCs ■ 1 Inquiry 118 3.5" DISK COMPATIBILITY FOR YOUR PC MANZANA'S 3.5" ADD ON DISK DRIVE FOR THE IBM PC (AND MANY COMPATIBLES) COMPATIBILITY with the new generation of lap-top computers using 3.5" disk drives. CONVENIENCE of rugged 3.5" disk media. CAPACITY of 730K addi- tional storage for your PC. FLEXIBILITY of using either 5.25" or 3.5" disks. DIRECT ACCESS on your PC to files generated on DG/One, TI Pro-Lite,GRiD Case,HP 110,150 via our flexible, powerful software device driver. Built-in voltage spike protection FCC-approved UL-listed plug-in AC transformer Limited 6-month factory warranty MDP3 disk drive with an MAP3-PC accessory package forms a complete add-on package for the IBM PC or XT. Absolutely no tools needed for installation. See your dealer or call direct for more information and details on accessory packages for other computers. COME SEE US AT COMDEX NOVEMBER 20-24, 1985 IBOOTH M251 at the MGM GRANDl MANZANA 935 Cainino del Sur lsla Vista, CA 93117 (805) 968-1387 BYTE editor in chief Philip Lemmons managing editor. print Gene Smarte managing editor. electronic publishing and communications George Bond special issues coordinator G. Michael Vose consulting editors Steve Ciarcia Ierry Pournelle Bruce Webster senior technical editor Gregg Williams technical editors Thomas R. Clune Ion R. Edwards Richard Grehan Glenn Hartwig, Reviews Ken Sheldon Iane Morrill Tazelaar Tom Thompson Charles D. Weston Eva White Stanley Wszola Margaret Cook Gurney. Associate Donna Osgood. Associate, Son Francisco Alan Easton. Drafting NEWS AND TECHNOLOGY Ezra Shapiro. Bureau Chief. San Francisco Rich Malloy. Senior Technical Editor. Neu> Yorfe Phillip Robinson. Senior Technical Editor. Palo Alto Tony Lockwood. Senior News Editor. Peterborough ASSOCIATE NEWS EDITORS Dennis Barker. Peterborough Brenda McLauchlin. San Francisco Lynne M. Nadeau. Peterborough Mark Welch. San Francisco CONTRIBUTING EDITORS Jonathan Amsterdam, programming projects Mark Dahmke. video, operating systems Mark Haas, at large Rik Iadrnicek. CAD. graphics, spreadsheets Mark Klein, communications Alastair I, W. Mayer, software Alan Miller, languages and engineering John C. Nash, scientific computing Dick Pountain. U.K. William M. Raike. \apan Perry Saidman. computers and law Robert Sterne, computers and law COPY EDITORS Bud Sadler. Chief Dennis Barker Elizabeth Cooper Anne L. Fischer Nancy Hayes Lynne M. Nadeau Paula Noonan Ioan Vigneau Roy Warren Williamson assistants Peggy Dunham. Office Manager Martha Hicks Cathy Kingery June N. Sheldon ART Rosslyn A. Frick, Art Director Nancy Rice. Associate Art Director PRODUCTION David R. Anderson. Production Director Denise Chartrand Michael J. Lonsky Jan Muller SENIOR VICE PRESIDENT/PUBLISHER Harry L. Brown publisher's assistant Beverly Iackson PERSONNEL Cheryl Hurd. Office Manager Patricia Burke. Personnel Coordinator TYPOGRAPHY Sherry McCarthy. Chief Typographer Len Lorette Donna Sweeney ADVERTISING SALES Dennis I. Riley. Director of Sales and Marketing Sandra Foster, Administrative Assistant ADVERTISING/PRODUCTION (603-924-6448) Lisa Wozmak. Supervisor Robert D Hannings. Senior Account Coordinator Marion Carlson Karen Cilley Lyda Clark MlCHELE GlLMORE Denise Proctor Wai Chiu Li. Quality Control Manager Julie Nelson. AdwtisinglProduction Coordinator CIRCULATION (800-258-54851 Gregory Spitzfaden. Director Andrew Iackson. Subscriptions Manager Cathy A. Rutherford Assistant Manager Laurie Seamans, Assistant Manager Susan Boyd Phil Dechert Mary Emerson Louise Menegus Agnes E. Perry Jennifer Price James Bingham. Single-Copy Sales Manager Linda Ruth. Assistant Manager Carol Aho Claudette Carswell Karen Desroches marketing communications Horace T. Howland, Director (603-924-3424) Vicki Reynolds. Marketing Production Manager Stephanie Warnesky Marketing Art Director Sharon Price. Assistant Art Director Doug Webster, Director of Public Relations (603-924-9027) Wilbur S. Watson, Operations Manager. Exhibits PLANNING AND DEVELOPMENT Michele P Verville. Manager Patricia Akerley. Research Manager Cynthia Damato Sands. Reader Service Coordinator Faith Kluntz, Copuriants Coordinator ACCOUNTING Kenneth A. King. Assistant Controller Vicki Weston. Accounting Manager Linda Short, DfiP Manager Edson Ware, Credit Marie Cagciani Marilyn Haigh Diane Henry Vern Rockwell IoAnn Walter building services/traffic Anthony Bennett. Building Services Manager Brian Higgins Mark Monkton receptionists L. Ryan McCombs Cheryl Castro. Assistant Editorial and Business Office: 70 Main Streei. Peterborough, New Hampshire 03458. (603) 924-9281. West Coast Offices: McGraw-Hill, 42 5 Baltery St.. San Francisco. CA 94 1 1 1 . (4 1 5| 362-4600 McGraw-Hill. 1000 Elwell Courl. Palo Alio. CA 94303 |4I5| 964-0624 New York Office: 1221 Avenue of the Americas, New York NY 10020. (212) 512-2000 Officers of McGraw-Hill Information Systems Company President: Richard B. Miller Executive Vice Presidents Frederick P. Jannott. Con- struction Information Group; Russell C White. Computers and Communications Information Group; |. Thomas Ryan. Marketing and Interna- tional. Senior Vice Presidents Francis A Shinal. Controller. Robert C. Violette. Manufacturing and Technology Senior Vice Presidents and Publishers: Laurence Altman. Electronics Week. Harry L. Brown, BYTE and Popular Computing: David |. McGrath. Construction Publications. Group Vice President: Peter B. McCuen. Communications Information. Vice President: Fred O. Jensen. Planning and Development. Officers of McGraw-Hill, trie .. Harold W McGraw. |r . Chairman: loseph L. Dionne, President and Chief Executive Officer; Robert N. Landes. Executive Vice President and Secretary: Waller D. Serwatka. Executive Vice President. Publishing Services. Ralph R. Schulz, Senior Vice President. Editorial: Shel F Asen, Vice President. Manufacturing. George R Elsinger. Vice President Circulation. Ralph I Webb, Vice President and Treasurer. limU Fall 1985 BYTE- Inside the IBM PCs QIC-60 streaming tape backup is more than just fast and simple to operate It's also the leader in powerful processing. For example, our unique five-head tape deck offers immediate read-after- write verification. No rewinding neces- sary. And no re- recording of the entire backup after an error. Another powerful advantage is automatic adjustment of the head mechanisms to seek the best track alignment every time a tape is inserted. Plus our exclusive power sensor is designed to alert and freeze the write head if PC power is reduced, which elimi- nates the chance of disk damage We're so confi- dent in the technical excellence of QIC-60 that we offer an aggressive one-year limited warranty on the entire line, compared to the 90-day warranty provided by other manufacturers. Best of all are a pair of backup bonuses that turn QIC-60 into a sophisticated data manage ment tool. When you select mirror-image restore, QIC-60 sees bad disk sectors and automatically reroutes data to safe locations for improved data reliability. Tecmar offers AT owners a special enhance- ment with an internally-mounted QIC-60 tape drive that costs even less than external systems. And when you add our internal AT Hard Disk to the package, you have a fully upgraded system ready to use today Pure speed. Pure power. Pure innovation from Tecmar For a free demonstration of the new standard in tape backup, see your Tecmar dealer or call us at 216/349-1009 for the location of the dealer nearest you Tecmar THE POWER BEHIND THE PC Inquiry I97 6225 Cochran Road Solon, Ohio 44139 EDITORIAL Intel and Future IBM PCs The planning stages of this issue started under a cloud— we thought there was nothing else interesting to say about the IBM Personal Com- puters, a technology that some peo- ple thought was obsolete when it was introduced three years ago But as you'll see, we were wrong— the PC world is richer now than ever before. This special issue peers into some seldom-seen corners of the IBM PC family of machines. Stephen Fried presents some startling findings con- cerning the 80287 NDP; Bill Claff and Steve Satchell explore the 80286 from a programmer's point of view; Tom Wadlow explains how to use inter- rupts to write your own desktop ac- cessories; John Haynes demonstrates how to use Lotus 1-2-3 to design cir- cuits; Rick Grehan looks at sub-$1000 hard disks; Jon Edwards highlights some of the best available PC public- domain technical software; and more. The artwork accompanying the ar- ticles is another special aspect of this issue— each of the 18 pieces of art was commissioned from one of the top female illustrators in the country. IBM/Intel Impact The IBM PC changed the face of per- sonal computing in 1982 by shifting the primary use of the machines from hacking to tracking corporate finances, databases, and memos. An ironic 1985 turnabout finds the PCs being blamed for blunting the creativi- ty of personal computing and sapping it of its vitality. Hardware designers gripe about Intel parts, like the 80286 and 80287, that haven't worked cor- rectly in their first few iterations, and programmers complain about the headaches of programming in Intel's segmented-memory universe. (1 vote for the following for programmer's buzzwords of the year— address paranoia: constantly checking for 8086 segment boundaries.) Most of the newer and more innovative machines of the last two years, like the Macintosh, Amiga, and Atari ST com- puters, have been based on the Motorola MC68000 microprocessor rather than the Intel iAPX86 family of processors that power the PCs. With IBM owning part of Intel and apparently wedded to the Intel ar- chitecture, the microcomputer world seems to be polarizing around the two microprocessor giants. Technical Culture Some people speculate that definite architectural biases are developing around Motorola and Intel. Motorola seems to be a company with a bias toward single-processor systems and open, flexible architectures. Intel's bias seems to favor complex, multi- ple processor architectures that are of necessity more rigid and formal. These biases show clearly, for exam- ple, in the companies' respective ap- proaches to memory management and in their designs for the VMEbus and the Multibus II: Motorola makes hardware memory management a system designer's option, while Intel includes it as a microprocessor func- tion with the 1APX286 and higher pro- cessors; Motorola's bus is nicely suited for single-processor systems, while Intel's design is optimal for multiple boards and processors. These architectural biases seem to favor Motorola hardware for low-cost single-user machines and Intel's for multiuser computers such as the three-user IBM PC AT. Of course, either company's microprocessor can power a single- or multiuser machine: Many of the high-end supermicros are MC68010-based machines, and most PC ATs are being used presently as single-user machines until a multiuser version of MS-DOS appears to make the vast PC software base available to multiuser ATs. A close look at these micropro- cessors reveals that Intel often solves problems by throwing hardware at them, while Motorola usually just hands programmers a toolbox. THE iAPX286/386 One of the principal design goals of the 80286 and 80386 microproces- sors was to facilitate high-perfor- mance multiuser and multitasking capability. To provide the protection needed to run separate tasks or multi- ple users in different parts of memory, Intel built task switching and memory management into the silicon of its two newest microprocessors. Task switching is done entirely in hardware on the 80286/80386 pro- cessors. Operating systems only need to specify which task runs next in the Intel environment, and the hardware handles the switching. Task switching is possible due to the addition of descriptor tables to the 80286/80386 programming model that tell the CPU where to find the instructions and data for individual tasks (or users). Descriptor tables also facilitate 80286/80386 memory management and virtual memory. On-chip memory management can save 100 to 150 nanoseconds in the memory-access time cycle— this is the typical time to send a calculated logical-memory ad- dress to an external MMU (memory- management unit) to find a physical address. On-chip MMUs also save time by permitting the use of special instructions to reduce the virtual- memory delays incurred by the swap- ping of data from disk to memory. Using virtual memory, the 80286 can address up to 16 megabytes of mem- ory, while the 80386 can address (continued) Fall 1985 BYTE- Inside the IBM PCs THE ACCENT" IS ON EXMNDED MEMORY NEWIfflUS-COMWnBL Now, Maynard ^Iff^lgSKBSSUf Expanded Mamm^tecen^WJWnK p ,0r ^WSs V2^CphoS"and all other K^Sx£fc§onSse SoSSsSSS gMSBSatswr . Maynard Electronics Shaping tomorrow's technology. 430 E. SEMORAN BLVD., CASSELBERRY, FL 32707 305/331-6402 Inquiry 1 23 Inquiry 41 Introducing Periscope II Professional Debugger and Break-out Switch EDITORIAL New Peri- scope II includes a remote break-out switch that does not need its own slot! (Periscope is) "the best value in development tools currently on the market . . . the most essential element of my 'developer's toolbox'." — Jeff Garbers "Very powerful for debugging and testing , . . Better than Atron by far." — Wynn Bailey The break-out switch "really sets Periscope apart from the typical software-only debug- gers." Hung system or locked keyboard? Press the switch to get control! Periscope's symbol support "beats the day- lights out of snooping through a map file and making notes". See high-level line numbers and source code, too! "Feel right at home" in no time with com- mands that logically extend Debug's! Periscope's speed makes other debug- gers "look absolutely sluggish"! It's written entirely in assembler and uses DOS only for file access. Has all the standard features plus: • Debug with over 75 breakpoint options New! Write your own breakpoint tests New! Traceback New! Do in-line symbolic assembly • Debug using one or two monitors • Recall command lines New! Debug with high-level source code New! Redefine windows while debugging New! View text files while debugging • Debug device drivers, non-DOS and memory-resident programs New! Customize Periscope via user exits New! Display 8087/80287 status New! Use Periscope with an EGA Periscope requires: IBM PC, XT, AT, or close compatible; DOS 2.0 & later; 128K RAM; 1 Disk Drive; 80-column Monitor. Periscope II, break-out switch, manual, reference card and software . . . $145! Periscope I also includes the write- protected RAM board to protect crucial debugger code. It's just $295! The US Navy gets Periscopes from us . . . shouldn't you? Order today! Order/Information Call Toll-Free: ES 800-722-7006 S 30-Day Money-Back Guarantee Data Base Decisions • 404/256-3860 14 Bonnie Lane • Atlanta, GA 30328 6 • Fall 1985 BYTE- Inside the IBM PCs 1 500 bytes for every man, woman, and child in the world (64 terabytes). These high-level memory-protection and -management capabilities are well suited to computers that rely on multitasking and multiuser applica- tions. In fact, CPUs with this kind of power may well be wasted in ma- chines employed by a single user. THE MOTOROLA MC68000 Apple Computer's choice of the MC68000 to power the Lisa and the Macintosh computers sparked main- stream interest in that microprocessor even though it was used earlier in a variety of other machines. While the excitement created by these Apple machines had more to do with the software developed to run them than the CPU, the MC68000 nevertheless became suddenly more visible to the microcomputer community. The MC68000 does not provide on- chip hardware support for memory protection and management. External MMUs are available from Motorola and other sources, or programmers can manage the 68000's linear ad- dress space in software. Some com- panies have developed proprietary hardware to manage memory. Similarly, virtual memory on 68000 machines is a software function, as is memory protection for multiuser/ multitasking operations. The newest 68000, the MC68020, has special in- structions to ensure data security in single- and multiprocessor systems (see "The MC68020 32-bit Micropro- cessor" by Paul F. Groepler and James Kennedy, November 1984 BYTE, page 159). In fact, the design principles behind the 68000 were stated in BYTE over two years ago ("Design Philosophy Behind Motorola's MC68000" by Thomas W. Starnes, April 1983, page 70): "They would design it [the 68000] for programmers, to make their job easier, by providing functions in a way that most programmers could best use them." The head start that Apple's (and, more recently, Atari's and Amiga's) programmers have devel- oped in creating exciting new software indicates that Motorola met its 68000 design goals. As further evidence, consider that the first microcomputer UNIX ports were to 68000 machines, too, partly due to the 68000's similari- ty to Digital Equipment Corporation's VAX hardware and partly to its pro- gramming accessibility. The Silicon Brick Road So the Motorola versus Intel biases mentioned earlier may boil down to a simple matter of orientation— Intel designs focus on hardware capabili- ty, while Motorola's emphasize pro- grammability. For example, look at the companies' respective approaches to graphics. Intel has designed, and plans to ship in early 1986, a graphics coprocessor (the 82786) with an on-chip CRT inter- face that provides 640 by 480 resolu- tion with 256 colors, or 1024 by 1024 resolution with 4 colors. Motorola's 68020 adds eight new bit manipula- tors to its instruction set to assist the programming of bit-mapped graphics. The Intel approach will be faster and more powerful but will require addi- tional programming, hence higher soft- ware overhead, and will add sub- stantial hardware costs. Motorola's scheme will be cheaper and well suited to CRT hardware developments. What this all means is hard to predict, of course, but I'll take a stab at a couple of certainly debatable propositions. First, I think the Intel/IBM machines of the future will be the more powerful number crunch- ers and will be better suited to multi- user and networking environments. After all, the second word in the name IBM is Business. Second, I expect the innovations in software that will keep our industry vital to originate on 68000 machines. Lastly, 1 think the classic single-user microcomputer, the machine we all want on our desk or at home to play and tinker with, will be a 68000-family machine. What brings all this to mind is our current assignment— to bring to BYTE readers a special issue, similar to the one you're holding, on 68000 ma- chines. Look for it next June. — G. Michael Vose Senior Technical Editor How does WordPerfect top 4.0? Extra credit. l\ lot of people have been saying a lot of good things about WordPerfect, lately. In fact, our 4.0 version has been called the industry standard for word processing. Of course, our first reaction was smiles all around (and a cele- bration or two). Our second reaction? Back to work on WordPerfect. Not because it isn't already a great program. But because the one thing that has made WordPerfect a success is our commitment to constant improve- ment. Reaching for perfection. The latest result of that commit- ment is WordPerfect 4.1. And with several new features, it scores more than a few extra points. /• Ijio^uu^c^ — With a built-in thesaurus, WordPerfect 4.1 lets you choose synonyms for any words in your document. By splitting the screen Inquiry 175 horizontally, you can view two documents at the same time. And editing either document or moving text between the two windows is fast and easy. Columns are displayed side-by- side on the screen. In addition to newspaper-style columns, WordPerfect 4.1 includes parallel columns, ideal for scripts. J. t-llCC ■ £>A«UtUIBu»(nc>iMichtnc;tUtu> 1-2-1: U>tu»Devc Now Available! The 287 FAST/8 $379 In addition to our 1-2-3 support, we're introducing our new 287 FAST/8-a module that gives your IBM PC/AT an un- precedented 8 MHz capability. Doubling the speed of your math calculations! (module pictured above) Hauppauge's 287 FAST/5 and Lotus support package are teaching the IBM PC, PC/XT and PC/AT a thing or two about fast math. Learn more by calling us today — or contact your local computer dealer. Hauppauge Computer Works 358 Veterans Memorial Highway, Suite MSI Commack, New York USA 11725 (516) 360-3827 Available from your local computer dealer mounced: "Ha-pog" Inquiry 80 / * PRIME FEATURES • Execute DOS level commands in HS/FORTH, or execute DOS and BIOS functions directly. • Execute other programs under HS/FORTH supervision, (editors debuggers file managers etc) • Use our editor or your own. • Save environment any time as .COM or. EXE file. • Eliminate headers, reclaim space without recompiling. • Trace and decompile. • Deferred definition, execution vectors, case, interrupt handlers. /TORTH • Full 8087 high level support. Full range transcendentals (tan sin cos arctan logs exponentials) • Data type conversion and I/O parse/format to 1 8 digits plus exponent. • Complete Assembler for 8088, 801 86, and 8087. • String functions - (LEFT RIGHT MID LOC COMP XCHG JOIN) • Graphics & Music • Includes Forth-79 and Forth-83 • File and/or Screen interfaces • Segment Management • Full megabyte - programs or data • Fully Optimized & Tested for: IBM-PC XT AT and JR COMPAQ and TANDY 1 000 & 2000 (Runs on all true MSDOS compatibles!) • Compare BYTE Sieve Benchmark jan 83 HS/FORTH 47 sec BASIC 2000 sec with AUTO-OPT9 sec Assembler5 sec other Forths (mostly 64k) 55-1 40 sec FASTEST FORTH SYSTEM AVAILABLE. TWICE AS FAST AS OTHER FULL MEGABYTE FORTHS! (TEN TIMES FASTER WHEN USING AUTO-OPTI) HS/FORTH, complete system only: $270. Visa Mastercard HARVARD SOFTWORKS P.O. BOX 69 SPRINGBORO, OH 45066 (513)748-0390 BIBLIOGRAPHY Novogrodsky et al. have provided a very readable introduction to the hardware of the PC and how to add to it. The book covers the PC, XT. AT, and compatibles. It is part of a helpful set of books on the PC pub- lished by Simon S- Schuster and PC World Books and provides all sorts of useful discussions of replacement keyboards and monitors, multifunc- tion boards, voice-recognition devices, plotters and printers, modems, bubble memories, optical and mechanical mice, joysticks and trackballs, coprocessors, local-area networking hardware and software, and, most important, how to hook all of this stuff up to the PC. This is a very useful reference book to have around, whether you're a new PC user or an old hand. The writing style is clear and aimed at the nontechnical user (although technical details are provided). The authors have also included an ap- pendix that lists the names and ad- dresses of the hardware manufac- turers discussed in the book. I'd like to see four-color pictures replace the "black-on-blue" halftones used to il- lustrate hardware examples, but that's a minor complaint. Sargent, Murray, III, and Richard L. Shoemaker. The IBM Personal Computer from the Inside Out. Reading, MA: Addison-Wesley, 1983. $16.95. 488 pages. Sargent and Shoemaker have written an excellent technical discussion of the IBM PC, its hardware architec- ture, microprocessor, instruction set, and assembly language and how the unit works as a whole. They further cover how to write hardware device drivers and how to debug interfac- ing software and hardware. The text also delves into how the PC controls disk drives, how DMA (direct memory access) works, and how to control I/O interrupts. A useful survey of existing software of the PC is also included. This book is a technician's delight, but nontech- nical users also will find it a useful reference work. It accommodates both of these audiences without resorting to the dry prose often found in such volumes. Sargent, Murray, III, and Richard L. Shoemaker. Interfacing the IBM Personal Computer to the Real World.' Reading, MA: Addison-Wesley, 1983. $16.30. 288 pages. If you're thinking about hooking your PC or compatible to a labora- tory instrument (to read telemetry data, for example) or to another ex- ternal device at home, in the office, or in the lab, this is the book for you. The authors give detailed instruc- tions on how to accomplish all of this. Step-by-step instructions on connecting your PC to lights, relays, switches, thermostats, sensors, motors, laboratory displays, and other devices are included. The book is written more for tech- nical PC users than nontechnical ones, but the style is sufficiently clear to be usable by both au- diences. The emphasis in the discus- sions is on how to design and build the interfaces necessary. Schweider, Pete H. How To Repair and Maintain Your Own IBM PC XT. Carson City, NV: Personal System Publica- tions, 1984. $29.95. 192 pages. Hard- cover. This expensive yet well-written little tome contains some useful informa- tion about how to troubleshoot hardware problems with the XT (especially hard-disk problems). Sec- tions of the book will be tough go- ing for nontechnical XT users, while other parts have been clearly writ- ten for them. Technical users will find a decent amount of detailed infor- mation about the nature of hard- ware problems with the XT and how to solve them. The emphasis in this book is to provide straightforward information to get your broken XT back in running order. Stone, Harold S. Microcomputer Interfac- ing. Reading, MA: Addison-Wesley, 1982. $31.95. 383 pages. Hardcover. This is a clearly written textbook that teaches you how to interface micro- (continued) 14 Fall 35 BYT E • Inside the IBM PCs ■ 1 1 ■m .-'JBBffi V . »• . , ■ ■ [-> ■ - ■SCI 11.£74iim MM m •? ••''i^.f*i I • I IS ■H 4P I ■ [ 1115m ■ IT ■I ' ■ Bur "Friendly Superpower" """'■'V;-' ' J :,V ■ ■•:;. ■ r MM Advanced Business Software That's on Speaking Terms with You! Power or ease of use . until now, you had to choose. The more you had of one, the less you had of the other. No longer. KnowledgeMan/2 was created to bridge the gap between simple, single-function programs and powerful integrated multi-function programs. KnowledgeMan/2 is powerful. But you don't have to be a computer wiz to tap that power. Easy-to-use menus help you until you're ready for direct commands. If you run into trouble, on-line help screens come to your rescue. Now both the casual user and the power user get everything you'd expect in a high-powered business software, with the best of both worlds— power and ease of use. See KnowledgeMan/2 in action! For the name of the dealer nearest you, call or write MDBS, P.O. Box 248. Lafayette. Indiana 47902, 317/463-2581. ■■ KnowledgeMan/2 and MDBS are registered trademarks of Micro Data Base Systems, Inc. j war ■■■ THE UNIVERSAL KNOWLEDGE MANAGEMENT SYSTEM Of' mm H I "'■':■■.••'■■ BIBLIOGRAPHY microprocessor family's role in the microprocessor development cycle, moving from a history of micropro- cessors to a consideration of how microprocessors are used as the building blocks of microcomputers and how the microprocessor sup- port components fit into the overall final product. If you want to know more about how your PC works from a basic electronic level, start with this book and move on to some of the more specific listings below. Intel PC Microprocessors And Assembly Language The IBM PC family features Mel micropro- cessors throughout the line. The oldest member If lightning still scares you, you're using the wrong file manager. Be sure. Btrieve™. Lightning may strike. But it doesn't have to destroy your database. Btrieve™ file management offers automatic file recovery after a system crash. So accidents and power failures don't turn into database disasters. Your Btrieve-based applications will come up when the lights come back on. Fast. Btrieve is lightning fast, too. It's written in Assembly language espe- cially for the IBM PC. And based on the b-tree file indexing system, with automatic balancing and electrifying access speed. The standard for networking. Btrieve/N (network version) sets the standard for the industry's most popular LANs, including IBM's PC Network. Fully-relational data management. SoftCraft's entire family of products gives you a complete, fully relational database management system. Rtrieve rM adds report writing capabil- ities. Xtrieve rM speeds users through database queries with interactive menus- For professional programmers. Btrieve is the fast, reliable answer for all your application development. In any development language — BASIC, Pascal, COBOL, C, Fortran, and APL. With Btrieve, you can develop better applications faster. And know they'll be safe if lightning strikes. SoftCraftlnc. P.O. Box 9802 #917 Austin, Texas 78766 (512) 346-8380 Telex 358 200 Suited retail prices: Btrieve, $245; Btrieve/N, $595; Xtrieve, $195; Xtrieve/N, $395; Rtrieve, $85; Rl'r'ieve/N, $175. Requires PC-DOS or MS-DOS IX, 2.X, or 3.X. Now available for XENIX. of the family, the PC, uses the Mel 8088 microprocessor chip, running at a clock speed of 4.77 MHz. This chip features an 8-bit external data path and an internal \6-bit architecture. The IBM PC XT uses the same Mel processor as does the ill-fated PCjr. The newest member of the IBM PC line, the PC AT, uses a different microprocessor, the Mel 80286, to improve overall system performance (the 80286 is a true \6-bit microprocessor and is clocked in the AT at 6 MHz). The 8087 and 80287 floating- point coprocessor chips can also be used in the PC and AT, respectively, to improve the speed of numeric calculations (the software must be especially designed to use the instruction set of the coprocessors for numerically intensive operations). Several manufacturers (AT&T Compaq, etc.) of IBM PC-compatible microcomputers have chosen to use still other microprocessors from the Mel 80000 family to help ensure software compatibility with PC-DOS and MS-DOS operating systems, while improv- ing overall performance. The two most promi- nent microprocessors in use are the Mel 8086 and the Mel 80186, both true \6-bit micro- processors. The following selection of books rep- resents a sampling of the recent volumes devoted to the Mel 80000 microprocessors, their instruction sets, and their assembly languages. Bradley, David ). Assembly Language Pro- gramming for the IBM Personal Computer. Englewood Cliffs, NJ: Prentice-Hall, 1984. $21.95. 352 pages. If you want to learn how to program in assembly language on your PC, you can start with this book. Bradley ties the concepts of assembly-lan- guage programming into those of high-level languages, including BASIC and Pascal, and assumes you have BASIC or Pascal programming experience. Novices may find the book tough going but not impos- sible. Bradley presents his material in four sections, covering the funda- mentals of PC operation; how the 8088 microprocessor works and what its instruction set is like; how to create, assemble, link, and run assembly language programs; and (continued) 18 • Fall 1985 BYTE- Inside the IBM PCs Inquiry 180 One out of every five letter-quality printers sold is made by Ricoh. If that's not impressive enough, consider the fact that there are 127 printers on the market. With 127 printers, made by over 35 manufacturers, the odds of one man- ufacturer getting 20% of the market aren't too big. How did Ricoh do it? By making the reliable, state-of-the- art printers needed in today's computer market. For example, Ricoh makes laser printers that can print up to twelve pages a minute. Thermal printers that do graphics in seven colors. And quiet daisy wheel printers. We even make the scanners that transmit the copy and color pictures of USA Toddy all across the country for printing early every weekday morning. So, if you'd like to increase your odds of getting the best printers on the market, look into Ricoh's new line of printers and peripherals, backed by Ricoh's own national service organization. RICOH We respond. 800-222-0878, ext.R20. In NJ, 800-222-0879, ext. R20. ©1985 Ricoh Corporation, 5 Dedrick Place, West Caldwell, NJ 07006. Inquiry I72 Fall I985 BYTE • Inside the IBM PCs • 19 BIBLIOGRAPHY the uniqueness of the PC assembly language and applications written in assembly language. Technical users will welcome the discussions of binary arithmetic and data representation. Bradley also covers the 8088 microcode, the special utilities available through the PC Macro Assembler, the additional data types and instructions provided by the 8087 coprocessor, and the registers of the 8088 and how ad- dressing works. A generous use of assembly-language code examples makes the discussion easy to assimilate. Despite the technical nature of the topic, the writing style is clear and straightforward. Dao, Lanny V. Mastering the 8088 Micro- processor. Blue Ridge Summit, PA: Tab Books, 1984. $15.95. 330 pages. This technical handbook is more of a reference book on the 8088 than a text to learn about its operation. Dao divides his discussion into several areas: the 8088 assembly language, the 8088 instruction set, integer-arithmetic logical functions, data movement, control transfer, and how to shift and rotate memory contents and addresses. Mastering the 8088 Microprocessor is well organized and thorough. Discussion of hardware interfacing with the 8088 focuses on the minute level of pin-out signals. Dao also discusses the 80286 and 80186 chips and their instruction sets. He includes more than 20 sample as- sembly-language programs to il- lustrate the discussions. Equipped with an extensive index and appendixes, this is an excellent technical reference to the Intel 8088 and 8086 microprocessors and how they work. The writing style is quite readable. Khambata, Adi J. Microprocessors/Micro- computers: Architecture, Software, and Sys- tems. New York: John Wiley and Sons, 1982. $24.95. 577 pages. Hardcover. Designed for classroom use, this book also functions as a technical reference book. It covers just about all the ground you can think of for the technically oriented PC user. The text moves -from an introductory chapter on digital computers to technical discussions of hardware ar- chitectural features of different microprocessors (the Intel 8088/ 8086 chips are used as examples) and how they interface with random- access read/write memory (RAM). The 8088/8086 is further exam- ined from the point of view of its functional parts, including its control and timing unit (CTU) and arithmetic and logic unit (ALU). How the micro- processor deals with serial and parallel I/O and direct memory ad- dressing (DMA) is also covered, and there is a chapter on BASIC and how it is implemented. This book is an excellent, easy-to- read introduction to the digital elec- tronics that make the PC work. Lafore, Robert. Assembly language Primer for the IBM PC and XT. New York: New American Library, 1984. $21.95. 501 pages. This book from the Waite Group of- fers a practical introduction to imple- menting assembly-language code quickly and easily on the PC and PC XT. The discussion covers how PC Macro Assembler works and how to write macros and control peripheral devices with assembler routines. Lafore teaches you to write one- line programs using the debugger and DOS function calls. From there, the discussion moves to the Macro Assembler and how to write and as- semble longer programs. Numerous sample programs and troubleshoot- ing help are provided throughout the book. The book moves you to consider more interesting assembler projects as you learn more about the language (one project, a program to create color graphics and sound ef- fects on the PC, is particularly entertaining). Lafore has written for the PC pro- grammer who has some familiarity with BASIC programming and DOS but who is not necessarily a sophis- ticated technical user. Overall, the style and structure of this book work well. Metcalf, Christopher D, and Marc Sugiyama. Computers Beginners Guide to Machine language on the IBM PC and PCjr. Greensboro, NC: Compute! Publica- tions, 1985. $14.95. 330 pages. Another guide to assembly lan- guage on the IBM PC, this book serves as both a reference guide and a learning text. Specific instruction is provided for EDLIN, DEBUG, LINK, and ASM. A separate section discusses using assembly-language routines from Pascal programs to improve their performance. The authors provide a number of source-code listings to help in learn- ing the language, most of which are heavily commented. The use of the stack and of subroutines is covered, as is a complete description of the 8088 instruction set and addressing modes. Characterized by a clean style, with plenty of detailed explanations, this book provides a good introduction to PC assembly language for the technical user who has had some previous programming experience with high-level languages. Nontech- nical users would be better off start- ing with a simpler introduction to assembly language, such as that found in the Markowsky book listed above. Morgan, Christopher, and Mitchell Waite. 8086/8088 16-bit Microprocessor Primer. New York: McGraw-Hill, 1983. $21.95. 355 pages. This book is a very readable intro- duction to a complex technical topic. Morgan and Waite have put together a useful book (as a reference and as a self-teaching text) about the 1983 state of the art in microprocessor technology, using the Intel 8088 and 8086 as examples. The authors explain how the 8088/ 8086 works, how 16-bit memory ac- cess and memory management dif- fers from the 8-bit variety, and how coprocessors (e.g., the 8087) can be used to speed up system perfor- mance. There is also a discussion of multiprocessing and how it is imple- mented at the microprocessor level. (continued) 20 Fall 1985 B Y T E • Inside the IBM PCs ELECTRONICS I Commodore® Accessories RS232 Adapter for VIC-20 and Commodore 64 The JE232CM allows connection of standard serial RS232 printers, modems, etc. to your VIC-20 and C-64. A 4-pole switch allows the inversion of the 4 control lines. Com- plete installation and operation instructions included. ■ Plugs into User Port ■ Provides Standard RS232 signal levels ■ Uses 6 signals (Transmit, Receive, Clear to Send, Request to Send, Data Terminal Ready, Data Set Ready). JE232CM $39.95 VOICE SYNTHESIZER FOR COMMODORE VIC-20 AND C-64 Plug-In — Talking in Minutes! JE520CM $99.95 TRS-80 Accessories MPI 5V4" DISK DRIVE Use as a second disk drive - Single- sided ■ Single/double density ■ Full- height drive ■ 48 TPI • Documentation included ■ Weight: 3.7 lbs. MPI51S $89.95 EXPAND TRS-80 MEMORY TRS-80 MODEL I, III Each Kit comes complete with eight MM529Q (UPDJ 16/4 11 6] 1GK Dynamic RAMs and documentation tor conversion Model 1 16K equipped with Ex- pansion Interlace can be expanded to 48K with 2 Kits. Model III: Can be expanded from I6K to 4BK using 2 Kits. Each Kit will expand computer by TRS-1 6K3 200ns (Model III) $6.29 TRS-16K4 250ns (Model 1) $5.49 TRS-80 COLOR AND COLOR II Easy to install Kil comes complete with 8 each ■itGdN-20 (200nsl 64K Dynamic RAMs and documentation tor conversion Converts TRS-8Q Color Computers with D, E, ET, F and NC circuit boards to 32K. Also converts TRS-80 Color Computer II to 64K. Flex DOS or OS-9 required to utilize lull 6.1K RAM on all computers TRS-64K-2 $11.95 Update! TRS-80 MODEL IV, 4P Update! Easy ;q install Kits come complete with- TRS-64K-2 (B ea. 4164N-20 (200ns| 64K Dynamic RAMs). TRS-64K-2PAL (Sen A 1 84's clus PAL chip) and docu- menlation tor conversion. TRS-64K-2 Expands Model IV Iram 1GK-64K or Model IV & IP from 64K-128K {w/Mem. Disk). ... $11.95 TRS-64K-2PAL Expands Model IV (w/Black & White Monitors only) from 64K to 1 2BK S29.95 • TRS-80 Model 100 - NEC • Olivetti Easy -o install module plugs right into the socket increasing memory in 8K increments Complete with module and documentation lor installation M1 008K (TRS-80 Model 100 Expansion) S39.95 ea. or 3 for $99.95 NEC8KR {NEC PC-8201A a Olivetti Mio) $39.95 ea. or 3 for $99.95 NEW! NEW! TANDY 200 NEW! NEW! NEW! Easy to install module plugs right into the socket increasing memory in 24K increments Complete with module S documentation for Installation. M200R (Tandy 200 Expansion) S149.95 ea. PROMETHEUS MODEMS Intelligent 300/1 200 Baud Modem with Real Time Clock/Calendar The ProModem"- is a Bell 212A (300/1200) intelligent stand-alone modem ■ Hayes command set compatible plus an additional extended command set ■ Shown with alphanumeric display option. PM1200 RS-232 Stand-Alone Unit $299.95 OPTIONS FOR ProModem 1200 PM-COM (ProCom Communicalion Soltwarel $79.95 Please specify Operating System. PM-OP (Options Processor) $79.95 PMO-64K (Oolions Processor Memory - 64K> S 8.49 PM-ALP (Aiphanumenc Display) $79.95 (Incl. Options Processor, PM-SpeCJal Alphanumeric Display] $149.95 DATA BOOKS 30009 Intersil Data Book (1984) S9.9 Complain Lino [!)65 pages) 30013 ZNog Data Book (1984) S9.9 Microprocessors and Support Chips [B49 pajes). 210830 Inlet Memory Components Hndbk. (1983/84). . . . S14.9 Contains .-ill Applications Notes. AriK;i L ' Hl-pniiis. Data Siu-el:, S oth. design irirVirm.slinn on intciv. !(/.',' v UHAI,'.:.. rpROt.'.f.. r-PHOM-, .,n ■.■■■■ ■ or 1 ;'.; !.:■>■.-.) 230843 Intel Microsystem Components Hndbk. (1983/84) S19.9 Contain 1 ; LJ.tr.i Slvuli; on al: ol lut'/l''.. MiauproceEiEors 8 pi-riphi'i.-il:, 2 volumes (2575 pagesl __ 30022 National Logic Data Book Set (1984) S24.9 Wlumcs I A It I3485 pages) ConLairisirik-.mialicr. or, Njiional'sTTl. [jroclriC.lir.eanaGa-OCu '.im.i This includes 7-100, 74L, S. AS, LS and ALS Series devices Bfl MM54HC I 7-1HC / 54HCT / 7JHCT Hull Sp.-ut! Micro CMOS tamil Muffin-Style & Sprite-Style Fans MUF60 (SPN3-1 5-2462) Howard Industries (4 68"sq.,60clm). SU2C7 Reverse Flow EG&G Rotron (3.125" sq.. 32otm). . APPLE® Accessories JAMECO's APPLE* Compatible Products i 16K RAM Card 1 (Language Card) For Apple II and II -t " . S39.95 JE87: Controller Card 3 For Apple II, 11+ 4 tfe* S49.95 JE864 S69.95 lamorn Five Key 128K RAM Card *AM jameCO software Programs! For Apple II, II+ and We* ° /s *-' Hnniil lillTl Th]( , JEasa h k|llcll[lnll | v compa n b i e W1 ,h the Apple II language card end can be ' Willi all software that can be used mlh a standard I£K card The JE86S ; no modihc.iliuns to your Apple computer Five key software programs aru J: Memoiy Mai ,ihi.-i u>.''ii Syilum. uliliin-... rl-..iqnostics. demos, and RAM disk . r.ir.ul,ilurs br DOS .'. !!. U 7M ;in J Apiik,' [ J .iv;;il »■,<: IitiIu^:, DOS t^'K.ury QjrritjU.'fc' ^...i with instructions. Key: (n.P) JE868 (Expand-A-RAM) $11 9.95 Applesurance Diagnostic Disk Controller Card Prevents Crashes! For Apple II, II+ and We* ®PSP«» The JE877 serves as 1 diagnostic toi disk drive controller the JEB77 will verily and i your system encti linn you turn on your Ap/ilt; II CPU. and disk tiuvu'., Hi.igiuii.lrr; routines may D' Complete ivilti inslructions Key (a.b| JE877 (DRV-1 /Applesurance II). • Tesl your RAM, ROM . $69.95 ggwoaipffius Parallel Printer Card For Apple II, II + and lie* tile JE8B0 Prmtiir Inter t.ici; boaril rs an inluHnn'ril interlace to most ol today's popular dol-m;iUi' r t r,i|, n.cs primers The .OBI) r- fulivuiimpatifcta ■.Mth Ac-pit; CF-I.V Apple Pascal (or F (H-l HAt-K. and mrjsl ulhi't ujii'NHir.j systems, ana software liinjkafjos avail, i! ili- l.ir '\ppli- II II ■ and liu' Ttn 1 Jl.t'hl! is sinpped con Injured tor I lie Centronics striruliirrl ,uul cm lit; re-rciriticuri.'il lor other standards if necessary. A'lv.inr.-r! Ie>t [rrinl.nij r. ■. i (. i r . ■ r. inlIuiIp viiH-l; si r.rn i:dir> ON m OFF. ,u lo'disat.ile lin.iN'ijd alter Ciimaiii' ii-tuin, sr.-Pclear iiu- Bill tul nl IMi; output data, set ett margin -* ol Conipleti' will inslnn;li(iiis Key: |n,b) r^l?»MHl£LlS JE880(PRT-1).. Parallel/Serial Buffer Card For Apple II, II+ and We* JE883 (P/S Buffer) $79.95 EPROM PROGRAMMERS JE670 GANG EPROM PROGRAMMER skto512K(e)eproms BttMWMM** OPERATION; Tin; X..70 Gin,-; Pi (trimmer is lully up Jumper Modules i"G Senesi I." in.; il.llerent type dr-v.; ■Input 1ISVAC. GOHz. 15W- Sue 15VL > BVD * 3v JE670 GANG tElEPROM PROGRAMMER i-v. I lie JIIG70 1-.; ;i;;l;in.oB<»mni i JUMPCH MODULI IIO_ E PROM VollBljf EPhO M MAHUiACIUREH PBICE JHUDA ?!W_ .'■'■'■■ "r/i: ^.. „,.;;, ii,>,..-.\ , n SM95 JMtfiA a?l6.TMS'a&16"lTi) ? r )V Lilul. MrH(iroSa.N.ili.ij$f utilities now included in the C 4 ^/ Programming System: J?/ ' make: compiles only what's necessary r from multiple modules, a powerful pro- gramming discipline • diff: identifies differences between two files • m4: macroprocessor expression editing and substitution • egrep: extended pattern search • MicroEMACS: full screen editor with source COMPILER FEATURES • Runs under MS-DOS • Full Kernighan & Ritchie C with recent extensions including void and enum • Register variables for fast, compact code • Full UNIX™ compatibility and complete libraries • Large and small memory models • MS-DOS linker compatibility • 8087 Support • One-step compiling • English error messages • ROMable code • Linker, assembler, archiver • Extensive third party library support csd C SOURCE DEBUGGER • Debugs at C source level without assembly language • Separate evaluation, source, program and history windows • Can execute any C expression • Capabilities of a C interpreter, but runs in real time • Set trace points on any statement or variable © 1985 Mark Williams Company UNIX is a registered trademark of Bell Labs. Inquiry 121 *ln Illinois call 312-472-6659. 1430 West Wrightwood Chicago, Illinois 60614 Fall I985 BYTE- Inside the IBM PCs 23 Inquiry 225 for End-Users. Inquiry 226 for DEALERS ONLY. WRITE YOUR OWN APPLICATIONS IN LESS THAN 1 HOUR WITH tf^ZEUS Generate entire applications, including reports and menus, from start to finish with amazing speed. • 300 fields per logical screen, 4 physical screens per logical screen. • Screens are compiled, not interpreted. • Predefined I/O types of String, Real, Integer, Phone and Date. User definable types, • Bullet-proof Data Entry. • Generates entire Database programs with Add, Change, Inquire, Delete and Backup functions predefined. • Includes algorithm (and uses) resident Binary Tree indexing for no wait lookups. Easy to change to other methods. Visit us at Comdex, Booth #H8142. • Generates easily modifiable code. • Completely menu driven. • Includes Database Generator, Report Generator, Menu Generator, and I/O Function Generator (to define additional I/O types similar to phone and data types, which are predefined). REQUIRES: Turbo Pascal and PC-DOS 2.0 or higher. Soon available on MS-DOS. $59.95 unprotected (includes postage and handling) CALL TOLL FREE 1-800-JMC-8667 or 1-404-736-8265 JMC Research, Inc. 803 Elsenhower Drive Augusta, Georgia 30904 Cuesta Systems Corporation 3440 Roberto Court San Luis Obispo, CA 93401 31985, Made in U.S.A. BIBLIOGRAPHY DataSaver4 Standby UPS Power protection for high-level microcomputers with peripherals, multi-tasking systems, and communi- cation networks is here, now, with the 400 Watt DataSaver. Placed between the desktop computer and system monitor, the DataSaver 400 features a master power switch directing four power outlets. 2-stages of overvoltage transient suppression and built-in, automatically recharged batteries stand by to assure clean, uninterrupted power for the five minutes you might need to shut down before the power shuts off. 90 and 200 Watt models available. Write or call 805/541-4160 Dealer, O.E.M. inquiries invited beginning of the book are wedged in toward the end, after the meat of the technical discussion has been presented. The overall content is good, how- ever, and the writing style is read- able, but the structural problems will probably limit this book's usefulness to mostly a reference role. Startz, Richard. 8087: Application Pro- gramming for the IBM PC and the Other PCs. Bowie, MD: Robert J. Brady Co., 1983. $22.95. 276 pages. This is a first-rate book. Startz has provided a comprehensive overview of the 8087 coprocessor and how it's programmed. The discussion is useful for both 8087 assembler pro- grammers and users of applications that work with the 8087. The text in- cludes a nontechnical overview of the capabilities of the 8087, includ- ing speed benchmarks and buying guidelines for software that uses the 8087. For programmers, Startz gives the full technical details on the 8087 and its instruction set and how to call 8087 routines from 8088 code and from BASIC programs. The discus- sion also covers matrix arithmetic, how linear systems work in com- parison to nonlinear ones, and a guide to incorporating the 8087 into statistical-analysis programs. Of all the technical books read for this article, this book was one of the easiest to read, and its style and stucture made reading it from cover to cover a pleasure. Yeung, Bik Chung. 8086/8088 Assembly Language Programming. New York: John Wiley and Sons, 1984. $19.95. 265 pages. Less technical in its style and con- tent than some of the other 8000- family assembly-language books reviewed here, this book still manages to cover the material from a solid technical viewpoint. The book is aimed at the programmer who has had some experience pro- gramming in high-level languages on the PC and compatibles (the ACT (continued) 24 • Fall 1985 BYTE- Inside the IBM PCs Inquiry 39 Hayes sets the standard for personal computer communications. Again. Smartmodem 2400. M 2400 - GDHaye • • HS AA CD OH RD SD TR MR ■ ■ The new fast mover from Hayes. The telecomputing leader. When it comes to commu- nications products for personal computers, we're the leader! Hayes Smartmodem 1200"" set the indus- try standards for quality, reliability and performance. Now our new, faster Smartmodem 2400 goes even further to lower telephone line costs and improve user productivity. So, at twice the speed of a 1200 bps modem, it quickly pays for itself in any high- volume communications operation. Smartmodem 2400 provides a quick link to minis and mainframes. Both synchronous and asynchronous transmissions are supported by an advanced version of the well-known Hayes "AT" command set. You can download from the IBM mainframe at the home office. Send data to the mini upstairs. And guarantee accurate transmission with infor- mation services. With worldwide communications in mind, Smartmodem 2400 was designed to meet CCITT interna- tional standards. It provides a fast, cost-effective way to transmit data between approved countries. New version of Hayes Smartcom II® communications software creates a complete tele- computing system with Smart- modem 2400. Our new Smartcom II, Version 2.1 , is available for the IBM* PC and many popular com- patibles. Smartcom II makes the most of Smartmodem's exceptional features, at the same time it makes communicating easy for you. And, if you're currently using an earlier version of Smartcom II, Hayes of- fers a $2 5 upgrade to Version 2.1. So if you're looking for ways to streamline your communications, see your authorized Hayes dealer right away. For a hands-on demon- stration of Smartcom II and our new Smartmodem 2400. Guaranteed to get you moving fast! Hayes Microcomputer Products, Inc., 5923 Peachtree Industrial Blvd., Norcross, Georgia 30092.404/441-1617. Smartmodem 2400 • Direct connect • Asynchronous and synchronous communications • Accommodates Hayes-compat- ible modems of slower speeds • Meets CCITT worldwide stan- dards • Keyboard control of all communications parameters • High speed indicator • Voice/data capabilities • Call progress moni- toring • Two-year limited warranty with optional four-year extended warranty available. Smartcom II • Hayes Verification and XMODEM protocols • Emulates DEC* VT52 and VT 100/ 102 • Totally unat- tended operation • Voice/data capabilities. Smartcom 11 is a registered trademark and Smartmodem 2400 and Smartmodem i 200 are trademarks of Hayes Microcomputer Products, Inc. •Trademarks of their respective companies. ©1985 Hayes Microcomputer Products. Inc. Inquiry 82 Fall 1985 BYTE- Inside the IBM PCs 25 Inquiry 110 WHY SETTLE FOR DOT-MATRIX PRINTING' BIBLIOGRAPHY When you can have dot-matrix Typesetting! Typesetting! DISCOVER %vpt*tttiw\ Etti/ial Typesetting for Your Dot-Matrix or Laser Printer Only $149 (includes 5 standard type styles; 9 additional styles just $19 each) Ask your dealer for a LePrint demonstration and copies of our free 8-page brochure and type style catalog . If you prefer , call us toll- free for more information or use your credit card to order direct with our 30-day refund offer. Call Toll-Free 800-LEBAUGH (800-532-2844) In Nebraska 402-733-7600 Telex 62904952 LeBaugh Software Corp 2720 Greene Avenue « Omaha, Nebraska 68147 TupcrrTTihtri t jrtbti nnot Typesetting! Create professional-looking documents Typesetting creates a favorable impression and increases the readability of your material, while capturing attention far better than conventional dot- matrix printing . LePrint software turns your dot-matrix printer into your own personal typesetting machine , helping you produce better quality . . . reports brochures presentations newsletters letters sales proposals advertisements manuals announcements . . . almost any kind of document you can imagine . Be expressive with our 14 styles! With LePrint you have a variety of expressive styles at your fingertips . Only LePrint gives you total control over the character size, you are not limited to one or two fixed sizes. From tiny 1/1 2th inch to massive full-page letters and anywhere in between, LePrint provides exceptionally clean , crisp characters . Of course you can freely mix styles and sizes within the same document or even on the same line! • For the IBM PC and compatible computers • Supports most popular dot-matix printers Copyright © 1985 LeBaugh Software Corp LeBaugh Software Corporation Ad printed by LePrint . LePrint and LeBaugh are trademarks of IBM is a registered trademark of International Business Machines Corporation . The Personal EE/EPROM Programmer FOR YOUR IBMP.C. $395.00 mis POSTMiK t HANDLING With Shot You Aim L in Price and i in Quality! ^m • RS-232 Port. Works with any computer or terminal. • Stand-Alone. Copies & verifies. • 128K RAM Buffer. • Upload /Download in Intel or Motorola Hex format. • 90 Day Warranty. • UV Erasers from $49.95. 1 -800- EE1- PROM (331-7766) FLA. (305) 974-0967 • TELEX: 383142 LOGIC ALTX 1321 E N.W. 65th PLACE, FT. LAUDERDALE, FL 33309 Apricot is also used in programming examples) and who now wants to learn PC assembly language. In 18 well-packed chapters, Yeung covers all the necessary topics, from an introduction to the MS-DOS tool- kit to how to use the assembler for Boolean instructions. Material in- cludes data manipulation, binary arithmetic, program branching and looping, string manipulation, sub- programming, and direct I/O. The author also discusses macros, as well as how to interface assembly- language programs with BASIC. This is a good text on PC assembly lan- guage and can also function as an assembly-language reference manual. High-Level Languages The IBM PC and its compatibles can work with a wide variety of high-level programming languages (through PC- and MS-DOS and CP/M-86). BASIC (interpreted and com- piled), Pascal, FORTRAN, COBOL, LISP, C, and many others have all been written for the PC. The books listed here teach some aspects of high-level language programming on the PC while maintaining a technical focus. Brown, Jerald R., and LeRoy Finkel. IBM PC Data File Programming. New York: John Wiley and Sons, 1984. $14.95. 367 pages. Also available with a disk of BASIC programming ex- amples for $39.95. This text is a complete, accessible study guide for creating, using, and modifying BASIC data files on the PC. The book lists a number of ready-to-run BASIC subroutines that perform a variety of file access methods useful in building business applications in BASIC on the PC. These same routines are also avail- able on disk for an additional charge. Nashelsky, Louis, and Robert Boylestad. IBM PC/XT BASIC Program- ming and Applications. Englewood Cliffs, NJ: Prentice-Hall, 1984. $14.95. 304 pages. A complete book of programming methods and how to build BASIC (continued) 26 Fall 1985 BYTE' Inside the IBM PCs Inquiry 114 THE WORLD'S LARGEST COMPUTER MAIL ORDER FIRM 7C=7 SM #BB 31 lontoy'LePbiwa ire. All Rights Reserv LOW PRICES TO PROFESSIONALS WHO KNOW WHAT THEY WANT AND KNOW HOW TO USE IT! ALL MAIL: Conroy-LaPointe, Inc. 12060 SW Garden Place, Portland, OR 97223 TO ORDER, CALL (800) 547-1289 TELEX 910 380 3980 HARDWARE & PERIPHERALS FOR YOUR IBM COMPUTER SYSTEMS OTHER HARDWARE ^^» ^f^^tur /vt jjj Pffgw a^ ^ $995 640K, Two 360K Drives Bus: MS-DOS 2.11, Parallel Port, 2 Serial Ports (RS 232C), Clock/Calendar, Floppy Drive & Tape Backup Controller, 5 slots, 135 Watt Power Supply, 8087 optional, Selectric PC/AT Style Keyboard. w/1 Floppy & 10 meg Hard Drive $1 595 FLOPPY & HARD DRIVES CONROY $ 239 $ 269 $ 289 $ 445 $ 169 S 81 $ 93 $ 309 $ 309 S 125 $ 219 $ 35 $ 159 $ 309 $ 92 $ 137 $ 189 $ 325 $ 85 pnr 360K DS/DD ^ u ^> DISK DRIVE Limited 30 day warranty Call lor quantity prices Full Height $119 Half Height $ 89 coNnoy $1195 $1195 $1875 $ 449 $ 19 $ 695 $1795 $ 459 $ 619 $2490 LIST CDC, Internal 20 meg kil FOR AT $1695 CORE INTL, ATplus 20 meg kit FOR AT $1595 ATplus 30 meg kit FOR AT $2495 IRWIN, 10 meg Tape Backup System $ 795 10 meg Tape cartridges (by 3M) $ 25 KAMERMAN, 20 meg kit w/controller $ 995 Masterflight 10 meg w/tape S2295 SEAGATE, 10 meg w/controller $ 745 20 meg w/controller S 895 TALLGHASS. 24 mea disk. 60 mea lane. intl. 33495 MONITORS AMDEK, Color 300 — COmp/AudIO 5 349 $ 239 Color 500 - Comp/VCR/RGB/Audio $ 525 $ 319 300A - 12" Amber/Comp $ 199 $ 129 300G, 12" Green/Comp 3 179 S 119 3I0A, 12" Amber (IBM) J 230 $ 159 PRINCETON, HX-12 - Hi Res/RGB i 795 $ 445 SR-I2 - Hi Res/RGB S 799 $ 599 MAX-12 - Amber (IBM) $ 249 $ 179 ZENITH, ZVM-1220- 12" Amber/Comp $ 159 $ 109 ZVM-1230 - 12" Green/Comp $ 159 $ 109 ZVM-124 & ZVM-135 15-25% OFF AST, SixPak Plus, 64K $ 395 SixPak Plus, 384K, S/P/CC + S/W $ B95 Preview" Graphics Card w/para, 64K $ 399 Advantage" Multif. Bd. lor AT, 128K $ 595 I/O Plus II. S/P/CC $ 215 CENTRAL POINT, PC Option Board $ 95 COMX, 130 Watt Power Supply $ 179 EVEREX, Graphics Edge $ 499 The Edge, Color/Mono Board S 399 HAUPPAGE (HCW), 8087 Chip $ 175 8087 Math Pak (Chip s sottw.) $ 295 HAYES, Mach III Joystick (PC or Jr.) $ 55 HERCULES, Color Card w/para. $ 245 Mono Graphics Card $ 499 KENSINGTON, Masterpiece" $ 140 Masterpiece Plus $ 180 KEY TRONIC, KB51S1, Std. Keyboard $ 255 KB 5153 Keyboard w/Touch Tab $ 400 KOALA, Koala Pad w/PC Design t 150 HAYNARD, SAND STAR SERIES Multifunction (6) Card $ 89 Memory Card no RAM S 199 Floppy Cont. Card (accepts 3 modules) $ 265 Serial Port Module $ 95 MICROSOFT, Mouse (tor PC) $ 195 Serial Mouse S 195 MOUSE SYSTEMS, PC Mouse & Paint $ 220 PARADISE, Modular Graphics Card $ 395 256K Module w/clock $ 195 PERSYST, PC/Color Graphics Board $ 244 PC/Mono Board w/parallel port $ 250 QUADRAM, Quadboard. no RAM, to 384K $ 295 Quadboard 64K, to 384K, S/P/CC/G $ 395 Quad 512 + 64K w/serial port $ 325 Ouadcolor I, board, 4 colors $ 295 Quadlink $ 495 Quadsprint $ 645 TALLTREE, J RAM II Board $ 219 TITAN, 128K PC Accelerator, $ 795 WICO, Smartboard Keyboard S 400 ACCESSORIES CURTIS, Diamond. 6 outlets, switched $ 50$ 29 Emerald , 6 outlets, 6' cord $ 60 $ 35 Ruby, 6 outlets. 6' cord, filter $ 90 $ 55 Sapphire. 3 outlets, w/filter $ 80 $ 46 Command Center $ 180 $ 119 NETWORX, Wirelree, 4 outlet. w/lillS surge $ 70$ 39 Wiretree Plus. 6 outlets/filter/surge $ 100 $ 59 PROD TECH INTL. UninterruplaWe Power Supply 200 Watts, PC20O for IBM-PC $ 359 S 289 300 Watts, XT300 lor IBM-XT $ 499 $ 399 79 139 195 79 129 145 145 $ 279 $ 150 $ 176 $ 159 $ 195 $ 239 $ 245 $ 175 $ 375 $ 495 $ 159 $ 595 $ 279 PRINTERS DOT MATRIX: UST EPSON, FX 85 - 160 cps DO, 32 cps NLQ $ 499 FX 185-160 cps DQ, 32 cps NLQ/15" $ 699 LX 90 - 100 cps DQ, 16 cps NLQ/Traclor $ 329 LQ 1500 - 200 cps DQ. 67 cps LQ $1295 HEWLETT-PACKARD, Printers & Plotters OKIDATA, Okimate 20 - Color, Hi Res $ 268 182 - 120 cps/80 col $ 299 192 - 160 cps/80 col/para. $ 499 193 - 160 cps/132 col $ 699 93 - 160 cps/136 col/para. $ 799 PANASONIC, P1090 - 80 cps/10" $ 349 P1092 - 180 cps/10" $ 599 STAR MICflO, SG10 - 120 cps DQ/30 cps NLQ $ 299 SD10 - 160 cps DQ. 40 cps NLQ $ 449 SR15 - 200 cps DQ, 50 cps NLQ, 16K $ 799 TEXAS INSTRUMENTS, 855 - 150 cps $ 995 TOSHIBA, 351 - 288 cps $1695 LETTER-QUALITY: JUKI, 6300 - 40cps/para. $ 895 6100 - 18 cps/para/3 pitch $ 599 PANASONIC, P3151 - 22 cps/15'A" $ 659 TOSHIBA, Prop, spacing & hi-res graphics: 1340 - 144 cos DQ 6 54 CDS LQ $ 799 C0NR0V $ 389 $ 539 $ 259 $ 995 CALL CALL CALL CALL CALL CALL $ 249 $ 459 $ 249 $ 379 $ 679 $ 795 $1195 $ 699 $ 409 $ 425 MEMORY 256K CHIP KIT $34 9 each, 4256 chips 150 ns /STOPX WAITING \FEDERAL/ V express/ 64K CHIP KIT $6 MODEMS HAYES, ^400 external Modem $ 899 $ 018 Smartmodem 1200B (IBM) $ 549 $ 379 Smaricom II Software $ 149 S 107 Transet 1000 - 128K Comm. Buffer $ 399 $ 309 PROMETHEUS PioModem 1200BIIBM) $ 399 S 289 DISKETTES * CONROY-LAPOINTE" DISKETTES * Was' $ 16 $ 119 $ 799 10 ea. DS/DD, (IBM, H/P) 40 Trk, W/FLIP BOX lOOea. DS/DD, (IBM, H/P) 40 Trk 1000 ea. DS/DD, (IBM, H/P) 40 Trk CONROY-LAPOINTE" IBM PRE-FORMATTED lOOea. DS/DD, 40 Trk $ 149 1000 ea, DS/DD, 40 Trk $ 959 DOUBLE-SIDED, DOUBLE DENSITY CDC, 10 ea, DS/DD. 40 Trk (IBM, H/P) $ 59$ 23 DYSAN, 10 ea, DS/DD, (IBM, H/P) $ 69 $ 35 MAXELL, 10 ea. DS/DD. MD2 (IBM) $ 65 $ 21 VERBATIM, 10 ea, DS/DD. MD34 (IBM) $ 75 $ 20 HIGH DENSITY DISKETTES FOR IBM-AT MAXELL, 10 ea. DS/HD (IBM-AT) $ 75 $ 49 MEMOREX, 10 ea. DS/HD (IBM-AT) $ 64 $ 49 128K CHIP KIT $75 90 Day Warranty CALL FOR QUANTITY PRICES Magnum EconoRAM Plus" $199 $179 384K Multifunction RAM Board Works like AST SixPakPlus" with game port Fastrak" RAM Disk and Spooler Software S/P/CC/G, t Year Limited Warranty. EconoRAM" 384K Single Function Board LIST <£QQ $99 cj>yy With Fastrak", Fully Compatible Works on DOS 1.1. 2.0 or 2.1 * * FOR YOUR PC JR HAYES, Mach III Joystick $ 55 $ 35 KEY TRONIC, KB5151 Jr. Keyboard $ 255 $ 169 Numeric Keypad $ 100 S 77 KOALA, Touch Tablet for Jr. $ 125 $ 75 MICROSOFT, Booster 128K w/Mouse $ 295 S 195 MOUSE SYSTEMS, Mouse w/software $ 195 S 138 QUADRAM, Expansion Chassis 5 695 S 540 Memory Expansion Board 128K $ 275 S 215 RACORE, Expansion Chassis $ 675 S 449 128K Expansion Board $ 275 $ 189 TECMAR, Jr. Captain $ 395 % 309 SOFTWARE FOR YOUR IBM-PC. XT. AT or JR BUSINESS 1,2,3FORECAST,requiresLOTUS1-2-3$ 75$ 59 ANALYTICA, Rellex $ 495 $ 335 ASHTON-TATE, Framework $ 695 $ 379 dBase III S 695 $ 389 dBase II, (req. PC-DOS 8 128K) $ 495 $ 289 BPI, General Acctg. AR. AP, or PR, ea. $ 595 $ 365 BRODERBUND, Printshop $ 60 $ 35 Graphics Library $ 35 $ 22 DATA TRANS., Fontrix $ 155 $ 99 DOW JONES, Market Manager Plus $ 249 $ 159 Market Analyzer $ 349 $ 229 Spread Sheet Link $ 249 S 159 FOX I GELLER, Ouickcode III $ 295 $ 185 GNP, CPA+ requires Lotus 1-2-3 $ 695 $ 469 HARVARD, Total Project Manager $ 495 $ 275 HUMAN EDGE, Mind Prober (PC or Jr.) $ 50$ 29 IBM, lopview $ 395 $ 365 INFOCOM, Cornerstone $ 495 $ 319 LIFETREE, Volkswriter Deluxe $ 295 $ 159 LIVING VIDEOTEXT, Think Tank $ 195 $ 109 LOTUS, 1-2-3 $ 495 $ 309 Symphony $ 695 $ 449 MDBS, Knowledgeman $ 500 $ 275 MECA, Managing Your Money (PC) $ 199 $ 105 BUSINESS MICROPRO, Easy NEWS 150$ 99 WordStar (PC) $ 350 $ 189 WordStar 2000 Plus (copiable) $ 595 $ 295 WordStar Professional, 4 Pak $ 495 $ 265 MICRORIM, R:Base Series 5000 $ 695 $ 385 Upgrade 4000 to 5000 $ 245 $ 135 R:Base 4000 $ 495 $ 259 R:Base Clout $ 249 $ 133 Extended Report Writer $ 150 $ 92 MICROSOFT, Multiplan (PC or Jr) $ 195 $ 124 Chart or Project, each $ 250 $ 159 Word S 375 $ 239 MULTIMATE, Multimate Ver. 3.3 $ 495 $ 229 PALADIN, FlashCalo $ 129 $ 66 PEACHTREE, Back to Basics S 395 $ 239 Peach Pak (GL/AR/AP) $ 395 $ 219 SAMNA, Word Plus $ 695 $ 349 Word III $ 550 $ 279 SATELLITE, WordPerfect (PC) $ 495 $ 219 SOFTWARE PUBL. PFS:Report $ 125 $ 75 PFS:Wrile, File, Graph, Plan or Access, ea. $ 140 $ 84 PFSlProof $ 95 $ 57 WARNER, Desk Organizer (PC or Jr) $ 99 $ 63 XANARO, Ability S 495 $ 319 UTILITIES BORLAND, Sidekick (copiable) S 85 $ 45 Turbo Pascal or Super Keys, ea. $ 70 $ 36 Turbo Pascal w/8087 or BCD, ea. $ 110 $ 66 Turbo Pascal w/8087 8 BCD $ 125 $ 69 Toolbox or Turbo Graphics, ea. $ 55 $ 29 Turbo Tutor $ 35 $ 19 CENTRAL POINT, Copy II PC $ 40 $ 22 PC Tools $ 40 $ 22 DIGITAL RES., Gem Draw $ 150 S 95 Gem Desktop $ 50 $ 32 CP/M-86" (PC/XT) $ 100 $ 64 DR LOGO-86 (CP/M-86) $ 150 $ 99 FUNK SOFTWARE, Sideways $ 60 $ 37 LIFEBOAT, Lattice C $ 495 $ 279 MAGNUM, Fastrak", RAM/Disk 8 spooler $ 50 $ 39 MICROSOFT, Macro Assembler $ 150 5 99 BASIC Compiler or C Compiler, ea $ 395 $ 269 Business BASIC Compiler $ 450 $ 295 COBOL Compiler $ 700 $ 459 FORTRAN Compiler $ 350 $ 229 PASCAL Compiler $ 300 $ 199 MICROSTUF, Crosstalk XVI (PC or Jr) $ 195 $ 110 NORTON, Utilities (14 prgms) y 3.0 $100$ 56 HOSESOFT, Prokey t 130 $ 80 HOME & EDUCATIONAL BPI, Personal Accounting $ 99 $ 63 CONTINENTAL, Home Accountant (Jr) $ 75 $ 45 Home Accountant Plus (PC) $ 150 $ 90 MONOGRAM. Dollars 8 Sense w/lorecasi $ 180 $ 100 SCARBOROUGH, MasterType (PC or Jr) $ 40 $ 25 Your Personal Net Worth $ 100 I 63 SIMON & SCHUSTER, Typing Tutor III $ 50 $ 33 SPRINGBOARD, Newsroom $ 50 $ 37 UNISON. Print Master $ 60 I 38 RECREATIONAL ron, l ycoon, ea. $ BRODERBUND, Large Inventory In Stock ELECTRONIC ARTS, Large Inventory In Stock HAYDEN, Sargon III (Chess) $ INFOCOM, Hitchhiker's Guide or Zork I, ea. $ Zork II or III, each $ MICROPROSE, Strike Eagle $ MICROSOFT, Flight Simulator (PC or Jr) $ ORIGIN, Ultima III (PC or Jr) $ SIERRA/ON-LINE, Ultima II (PC or Jr.) $ SPECTRUM HOLOBYTE, Galo $ SPINNAKER, Presidents Choice. Amazon Fahrenheit, Rendezvous, Dragon, each $ CALL CALL 50 $ 34 40 $ 45 $ 35 $ 50 $ 60 $ 60 $ 40 $ 40 $ 25 CASH-n-CARRY COMPUTER STORES, INC. Retail Sales only. Store prices may vary. SAN FRANCISCO — 550 Washington Street (at Montgomery, opposite the Pyramid). Interstate 80 !o Highway 480; take Washington Street Exit. CALL (415) 982-6212. PORTLAND, OREGON — At Park 217, Tigard at intersection of Highways 217 and 99W. CALL (503) 620-5595. SEATTLE, WASH. — NEW LOCATION! 1105 Beflevue Way N.E.. In Beluate Plaza, 2 blocks north of Beflevue Square. CALL (206) 641-4736. ^_^_____^___^_ <^S> WUMIIS AWMBS OUR REFERENCES: We have been in computers and electronics since 1958, a computer dealer since 1978 and in computer mail order since 1980 Banks: tsl Inter- state Bank, (503) 643-4678 We belong to the Chamber ol Commerce (503) 228-9411. and Direct Marketing Association, call Dun and Bradstreet tf you are a subscriber Recipient ol OREGON BUSINESS MAGAZINE'S 1984 Enterprise Award ("""v"™) _ '•■ ' CONROY- LAPOIHTt CARD NO SALES TAX CALL (800) 547-1289 In Oregon: (800) 451-5151 QUESTIONS (503) 620-9878 SO0 AM ■ 5 OOPM (PDT) Weekdays Only Foreign & Portland Residents Cull (503) 620-9877 ORDER DESK HOURS Mon-Fri 6am to 6pm (POT) Saturday Sam lo 4pm (PDT) (6 am here is 9 am in New York) ORDERING INFO & TERMS: MAIL TO: 12060 SW Garden Place, Portland, OR 97223 - Include telephone number. Check your figures (or Shipping, Insurance and Handling (SIH). All items usually in slock. NO C.O.D. Cashier checks, money orders, Fortune 1000 checks and government checks honored immediately. Personal and other companychacks - allow 20 days lo clear. Prices reflect 3% cash & Conroy-LaPolnte Credit Card discount, so ADO 3% lo above prices (or VISA/MasterCard/American Express. Your card NOT charged HI we ship. Gift Certificates available in any amount. Federal Express 2nd Day Air shipping is standard. U.S. & Puerto Rico, add 3% (S5 minimum). Canada, add 12% ($15 min). Foreign, add 1B% ($25 min). AP0, FPO, A other U.S. territories shipped postal, so add 6% ($10 min.). Orders received with insufficient SIH will be held for balance due. All prices, availability and specifications subject lo errors or change without notice, so call to verify. All goods are new, include warranty and are guaranteed to work. Due lo our low prices and our assurance thai you will get new, unused products-ALL SALES ARE FINAL. We do not guarantee compatibility. Call before returning goods (or repair or replacement, ORDER DESK H0URS-6AM to 6PM PDT, Monday through Friday, Saturday 8 to 4. EconoRAM' 1 , Fastrak", and Generik" are trademarks of Magnum Computer, Inc. CON ROY- * LAPOINTE g- CREDIT CARD £ Sand me a Conroy- La Points credit application form, to I can gel cash discount prices with credit card convenience, $400 Minimum initial purchase. CITY STATE MAIL TO: 12060SW Garden Place, Portland, OR 97223 CREDIT DEPT (503) 684-1232 Inquiry 36 for Apple. Inquiry 37 for IBM Peripherals, Inquiry 38 for all others. Fall 1985 BYTE* Inside the IBM PCs U 27 BIBLIOGRAPHY applications on the PC and XT (both interpreted and compiled BASIC). The discussion is structured in a manner usable to novice program- mers and those already exposed to BASIC All of the necessary BASIC data structures and control methods (selection, iteration, sequencing, etc.) are covered. Sample applica- tions provide a good tie-in with the concepts being taught. Overall, it is a well-done effort that should prove its worth as an instructional text and a reference work. Overgaard, Mark. Personal Computing with the UCSD p-Sustem. Englewood Cliffs, NJ: Prentice-Hall, 1983. $21.95. 448 pages. This book is valuable for learning the p-System and how UCSD Pascal works within this system. It can also serve as a reference text for the system. The book is easy to read and is aimed at both novices and expe- rienced PC users. The structure moves from a general discussion of system features to a more technical- ly oriented discussion of the devel- opment tools and utilities the p-Sys- tem provides to programmers. Topics covered include the system editor, filer, and operating-system menus and how to work in the modular environment of the p-Sys- tem. Personal Computing with the UCSD p-Sustem is must reading for anyone contemplating adding the p-System or UCSD Pascal to the PC. Pollack, Lawrence, and Bryan Cum- in ings. Programming in C on the IBM PC. Englewood Cliffs, NJ: Prentice-Hall, 1984. $16.95. 224 pages. The UNIX operating system and the language it's written in (C) threaten to remake the world of microcom- puting. Because UNIX and C are easily ported from mainframes and minis to micros, the ability to do large-scale application development on a mainframe or a minicomputer for eventual installation or marketing on a micro is particularly attractive to software developers. A number of good books have been published on how to program in C but few have been written for implementations of C language on the IBM PC (regardless of whether the PC is running under UNIX, the UNIX clone XENIX, or PC-DOS). This book addresses that void. The prob- lem is that the C language covered here is a portable C This means that no specific C compiler is discussed in any detail. So, while the book does a good job of teaching the structure and syntax of C language (just as do other C books), it does not give you any information about acquiring or using a commercially available C compiler for your PC. It is also unfortunate that the sections that discuss the PC specifically are crowded into the front of the book and are pretty thin. Presley, Bruce. A Guide to Programming the IBM Personal Computers. Albany, NY: Lawrenceville Press (Delamar Pub- lishers Inc.), 1985. 2nd edition. $18.50. 360 pages. This book is an excellent textbook for teaching BASIC programming on the PC. The layout of the material and sequence of chapters also lends itself to self-instruction. Presley covers just about all the content you could reasonably expect in such an effort. The discussion moves from an introduction to programming concepts on the PC through increas- ingly complex topics, including subroutines, string functions, mathematical functions, sequential files, random-access files, and search/sorting algorithms. Use of program examples through- out and student exercises at the end of sections enhance the learning ex- perience. A teacher's guide is avail- able as a companion volume. The book is written for the novice pro- grammer and will also work as a BASIC reference guide. Altogether, it's a good effort at supplying the needs for a BASIC textbook on the IBM PC with a good substructure of technical information. Stiegler, Mark, and Bob Hansen. Pro- gramming Languages: Featuring the IBM PC and Compatibles. New York: Baen Books, 1984. $9.95. 413 pages. This book is a critical evaluation of the different programming lan- guages available on the PC and its compatibles. The strengths and weaknesses of many languages are discussed, including BASIC, FOR- TRAN, APL, FORTH, RATBAS, C Pascal, Modula-2, Ada, LISP, and assembly language. The authors have worked out ex- amples of each language and use charts and tables to analyze these samples. This book assumes con- siderable technical proficiency at programming, but it is well written and clear. This is an important ref- erence book for anyone who does application development and pro- gramming on a PC. Graphics From the first announcement of the PC, pro- grammers and software users have been in- terested in its graphics capabilities. A number of recent books explore the medium- and high- resolution color graphics and the high-resolu- tion monochrome text and graphics made possible by graphics boards from IBM and other vendors. The following are a few impor- tant books available on this subject, from the most technical discussions of graphics program- ming through more accessible, user-oriented graphics discussions. Artwick, Bruce A. Applied Concepts in Microcomputer Graphics. Englewood Cliffs, NJ: Prentice-Hall, 1984. $29.95. 384 pages. Hardcover. Although this book covers graphics applications on both the Apple II and IBM PC, the book is a useful one for the PC owner. A number of con- cepts are explained in a tutorial manner, including how to create custom color graphics on the PC. Artwick covers all aspects of micro- computer graphics, from creating business charts and graphs to pro- ducing real-time animation on the screen. The discussion also covers display hardware, peripherals, design ele- ments, interactive designs, and high- performance graphics. The book is written in a dry technical style and (continued) 28 Fall I9S5 BYTE- Inside the IBM PCs Add-on Products for your IBM PC/XT from the Swiss Watch-Manufacturer Twix Hard Disk-/Floppy-/ Streamer-Controller-Board - All in one card. - Controls: - 2 Hard Disk Drives with up to 4 Disks and 8 Heads per Drive. - 2 Floppy Drives with a capacity of up to 1 Megabyte per Drive (IBM 360KB formatted). - 2 Streamer Tapes with built-in for- matter and QIC-02 interface for wide compatibility. 20 MB can be transferred in under 4 minutes. 45 MB Streamer Tape in preparation. Twix 230 W Switching Power Supply The professional power supply. - Output +12 V± 3% 9 A + 5V±3% 18 A -12V±3% 1A - 2V±3% 200 mA - Separate transformers and switch- ing IC's for + 5 V and + 12 V. - Switching module with Power Fet's. - 110/220 V switchable. - High voltage stability: 180-260 V 95-130V - ON/OFF switch externally control- lable by relais. - 2 Outlets: 1 Input 1 Output with separate noise filter. - Over- and Undervoltage protection. - Protected against short circuit. - Built-in ventilator. - Protected against power-interrupts of up to 0.4 seconds. - PC-XT compatible connectors. Not same dimensions. Twix RGB/ PAL-SEC AM- Converter Selling more PC's outside the USA. - Allows to connect a regular PAL or SECAM Color-TV with a 21 -pin SCART-connector. - Image and Sound. - To be connected at the RGB-output of the PC. - Difference between Highlight and Lowlight adjustable. For your portable at home, schools, demonstrations, etc. Twix CPU-Board - XT-compatible. - 8088 16-bit processor. - Socket for optional 8087. -Up to 512KB RAM. - Extended ROM capability of 8K BIOS and 40K f or BASIC or other programs. - 1 RS-232 interface. - 1 parallel Centronics-interface. - Clock with battery-backup. - 8 compatible I/O interface slots. - Compatible configuration switches. - Standard keyboard-interface. - Speaker/audio-port, reset-output. - 4 LED-drivers. - 4 programmable inputs. - Compatible power connectors. - All tri-state buses with pull-up resistors. Twix RAM-Card - Uses Short Slot - Up to 1 MB, using 64K-Chips or 256K-Chips. - Startaddress switch-selectable. - Parity errors cut to a minimum by sequence-control. Other Twix-made products - PC-compatible Extender-Board. - PC-compatible Relais-Board for ex- ternal ON/OFF-switching of all kind of devices. - EMI/RFI noise filters. - Screens for electronic typewriters. - Swiss Quartz Analog Watches. See us at COMDEX Fall in Las Vegas (Booth M444). OEM's, Distributors and Dealers welcome! Twix Inc. 10920 Switzer Avenue Suite 100 Dallas, Texas 75238/USA Telephone 214/349 0639 Telex 758 821 Twix Vertriebs GmbH Augustenstrasse 115 D-8000 Munchen 40/BRD Telephone 089/5239 0200 Telex 5 22 470 Twix Equipment AG Gewerbestrasse 12 CH-8132 Egg/Switzerland Telephone 01/984 22 11 Telex 826 135 twxe ch Twix Made in Switzerland Inquiry 203 t BIBLIOGRAPHY is useful primarily to technical au- diences. More than 1 50 illustrations are included. 14 of which are in full color. If you are currently working on graphics programming or develop- ment work or are planning graphics work in the future on your PC, this book should prove to be an impor- tant reference tool. [Editor's note: For additional comments, see the Book Reviews column, September 1984 BYTE, page 66.| Conklin, Dick. PC Graphics: Charts. Graphs, Games, and Art on the IBM PC. New York: |ohn Wiley and Sons, 1984. $15.95. 182 pages. Also available with a disk of 40 BASIC programs for $40.90. Dick Conklin was the product plan- ner at IBM responsible for the sys- tem software on the PC. His familiari- ty with the internals of the PC and how best to utilize them for PC graphics shows in this small book. He covers material from program- ming samples of simple graphics images to more complex graphics applications (business charts, engi- neering data plots, computer art, maps, and games). The book is written for the PC BASIC programmer (the features of BAS1CA are used most prominent- ly) who wants to create a variety of graphics images and applications. It includes 40 ready-to-run graphics program listings that are also avail- able on disk for an additional charge. The author has produced a clear, detailed description of the graphics capabilities of the PC, from the ASCII (American Standard Code for Information Interchange) graphics characters in ROM (read-only mem- ory) to making special characters from the keyboard. He covers ani- mation, shading, slide shows, read- ing data from the screen, and both medium- and high-resolution graph- ics. Graphics input and output devices (joysticks, light pens, pad- dles, color printers, and videodiscs) are also discussed in considerable detail. In short, if you want to know anything about graphics capabilities and usage on the PC, this book is the place to start. Hearn, Donald D., and M. Pauline Baker. Computer Graphics for the IBM Per- sonal Computer. Englewood Cliffs, NJ: Prentice-Hall, 1983. $18.95. 330 pages. Hardcover. These authors have written several books on computing and graphics. This book is among their best. Hearn and Baker discuss the topic from a comprehensive point of view, covering PC graphics from the basics of the PC's system unit through the (continued) he Most Valuable Disk Make 1 in the Universe i Now with UNIX Option! Download fast, read over 200 formats easily, reformat rapidly The more disk formats you work with, the more our Disk Maker® system saves time and money by reading and/or writing disks in any of over 200 formats. No mo- dems, no patches, no other special software necessary. Disk Maker II Plus is a complete, stand-alone system featuring both 8" and 5% " disk drives with options for 3V?" and IBM PCAT drives-up to 12 total drives. With its 6 MHz processor and RAM memory drive, Disk Maker II Plus is fast! Hardware options include a 15 or 20 Mb hard disk, an 8086 MSD0S coprocessor and memory expansion. Optional software includes word processor and Compu- graphic typesetter formats and the MicroDrive Tester for drive alignment testing. Supported with comprehensive manual, 6 month war- ranty and continuing software update program. Disk Maker I is an alternative for existing S- 100 sys- tems (CompuPro, Zenith Z-100, North Star, etc.) to provide the same functions as Disk Maker II Plus. Write or call today for information on how Disk Maker® can save you time and money. Jerry Pournelle wrote about Disk Maker® : "It's easy to install, easy to use, and darned near unique. If you need one, you need it bad." (BYTE, July 1984) r New GeNeRaTioN ' — 5V5TeM5 — ' l ailO Michael Faraday Drive. Suite 206 Resiori VA 22030 (703) 471-5598 Order Line: (800) 368-3359 Dealer inquiries welcomed. 30 Fall 1985 BYTE- Inside the IBM PCs Inquiry 140 IN OUR TH€ WORLD OF PC UPGRADES 5 Mega Sutes Of software with the purchase of any PC HARD DISK ... FR€€ PC HARD DISK PC HARD DISK PC HRRD DISK '■■'■■& 20 Mbyte IS10 $495 IS20 $595 IS30 $895 TRNDV1000 IMUITT-FUNC BOARD crchc rssist DIRCCT RSSIST COMMAND, ASSIST TMF-1 $255 TRP€ BACKUP 10 Mbyte $49.95 TAP€ BACKUP TAP€ BACKUP ■& \* »\ $49. 95 TAPC- BACKUP MT10C $575 MT10 $385 MT10P $525 MT60 $895 MT60C $995 AT HARD DISK AT HARD DISK AT HARD DISK AT HARD DISK Inquiry AT20 33 Mbyte 80MUui<-; $545 AT33 $750 AT70 CALL ATI 20 $4,995 one. wk 800-228-0891 305-677-8333 iTTOlTrefli TlT Tt^TTTI 6566 University Boulevard, Winter Park, Florida 32792 (305) 677-8333 T6LOC 332559 MDII ORl UD 1 V6AR WARRANTY, 30 DflV MON6V BACK GUARANTY Of Kail I e IBM PCs • 3 1 BIBLIOGRAPHY differences between character-gen- erated graphics (e.g., the standard ASCII graphics characters) and pixel- generated graphics. Like other books of its kind, this book relies upon BASICA program- ming examples to illustrate the con- cepts the authors discuss. Altogeth- er, this book offers a comprehensive introduction and survey of graphics programming techniques for the PC and its compatibles. The book comprises some 14 chapters, organized around five thematic sections (hardware and sys- tem introduction, simple plots and color graphics, data transformations, three-dimensional displays, and ap- plication of graphics software tools). The authors have included more than 100 sample programs and 16 four-color illustrations. The book lacks some important discussions of new graphics com- mands available in BASIC 2.0 (e.g., the commands on screen coor- dinates), but its content is still very useful. The book is intended for novice graphics programmers but also will serve more technically erudite audiences as a handy graph- ics reference work. Another poten- tial use for this book will be as a col- lege textbook for a semester-long course in microcomputer graphics. The writing style manages to avoid the typical academic dryness of such technical discussions. Hearn, Donald D., and M. Pauline Baker. Microcomputer Graphics: Techniques and Applications. Englewood Cliffs, NJ: Prentice-Hall, 1983. $18.95. 272 pages. Written by the same team as the book above, this text takes a more general approach to the subject of microcomputer graphics. Besides the IBM PC, the authors discuss per- sonal computers from other vendors (including Apple, TRS-80, Atari, and Commodore) and offer some valu- able comparisons of the graphics capabilities of each machine. This book is a valuable companion piece to the authors' PC-specific book. It is written in a more brisk, informational style than the previous book. The text is at its best when it combines programming examples (again, BASIC is the chosen lan- guage) with illustrations of the ap- propriate graphics screen output. The chapter on how to create inter- esting three-dimensional objects on the screen (e.g., chess pieces) is easily the best in the book. The authors have aimed this book at a mixed audience of nontechnical novice programmers and of those more experienced in programming microcomputer graphics. The discussion of graphics applications (e.g., business graphics) is enlighten- ing. In short, this is a well-written, easily accessible book that offers serious discussion of the graphics topics at hand. Morgan, Christopher, and Mitchell Waite. Graphics Primer for the IBM PC. Berkeley, CA: Osborne/McGraw-Hill, 1983. $21.95. 430 pages. These two old hands in the com- puter book field have turned out yet another important work about the IBM PC. This time the subject is high- resolution color graphics. They have produced an impressive, color-filled text that should be useful to a vari- ety of readers. The authors have written this book in a tutorial style, with copious ex- amples to illustrate the graphics pro- gramming concepts being taught, lust about every kind of graphics ef- fect that you can produce with the IBM PC color-graphics adapter is covered. Animation, charts, maps, business graphs, forms, games, and three-dimensional images are all discussed, and programming ex- amples (BASIC) are provided. Ac- cessing the graphics video chip of the color-graphics adapter is also discussed fully. I found this to be the most comprehensive PC-graphics programming book reviewed for this article. It is useful as a tutorial and as a reference work. Traister, Robert |. Graphics Programs for the IBM PC. Blue Ridge Summit, PA: Tab Books, 1983. $15.50. 243 pages. Once again, PC screen graphics are discussed from the point of view of the BASIC programmer. Unlike other books about PC graphics, Traister discusses text graphics for the IBM monochrome display as well as the standard chapters on color graphics. The author's writing style is best termed "chatty." This makes the material easy to understand, but it limits the intended audience of the book as well as its usefulness as a graphics reference. The tone of this book may annoy more advanced, technically oriented PC users and programmers. In a 243-page book, the author needn't take almost two thirds of the pages to get to the point of the book, as Traister does here. Once he arrives, though, he is definitely on target. He gives you competent discussions of animation, filling regions with color, and draw- ing shapes on the screen. I'd like to see more emphasis on the printed aspects of graphics out- put in future editions, as well as a greater use of color illustrations. Finally, the author's stated aim of allowing you to implement the "full graphics potential of your IBM PC" is simply not achieved. Data Communications Connecting PCs to a variety of other com- puting and database resources is becoming an increasingly important use of personal com- puters. The accessing of remote mainframes and minicomputers, public-access data net- works (e.g., CompuServe, The Source, MCI Mail, etc.), and other microcomputers is one of the most rapidly growing fields in an in- dustry noted for rapid growth. A number of logistical and technical considerations are im- portant in connecting a PC through a telephone to another machine. The few books listed here cover many im- portant related issues, including the technical aspects of data communications (parity, data- transmission rates, handshaking protocols, and the like), the kinds of terminal-emulation and file-transfer protocols (like Kermit and XMODEM) that can be used to upload and download computer files, and a discussion of the remote services available through data- communication hookups with your PC. (continued} 32 Fall 1985 BYTE- Inside the IBM PCs Inquiry 83 — ► J Build IBM-PC compatible Heathklt computer and save, or buy assembled. "Smart" metal locator homes-ln on precious metals, dis- regards Junk. Computerized weather station "remembers" weather to aid in forecasting. J* Robotics technology comes to life in build- ing HERO" I and teaching it movement speech, and manipulation. World's first low-cost hand-held, microprocessor- controlled Real Time Spectrum Analyzer. m Triple-trace oscilloscope speeds troubleshooting. "Universal" terminal interfaces computer, ham station for RTTY. Learn computers, programming with Micro- processor Trainer and Course. HW-8400, one of the finest multi- purpose ham rigs, In affordable kit form. More than just a catalog, a trustworthy guide to what's new in electronics and computers. News about important product innovations is packed into every page of the quarterly, full-color Heathkit catalog. Ever since radio became electronics, the il- lustrated Heathkit Catalog has been a guide to new and exciting kit products for people like you to build. Enjoy and learn from them, while saving money in the process. What sets the Heathkit catalog apart is its range of high quality products and accurate informa- tion to help make your buying decisions easy. All you have to do is fill out the coupon to get your copy flea"*/, Heathkit A subsidiary ol Zenith Electronics Corporation Heath >mpany Heath Company Dept. 334-344 Benton Harbor, Michigan 49022 YESI Please send me a copy of the all-new FREE Heathkit Catalog. Name. Address . City CL-775B Zip. BIBLIOGRAPHY Derfler, Frank |. Microcomputer Data Com- munications Systems. Englewood Cliffs, N): Prentice-Hall, 1982. $17.95. 129 pages. This book is not a specific work for the PC owner, but it gives you the vocabulary and background infor- mation needed to explore the in- tricacies of PC data communica- tions. The book is. overall, a well- written effort, although it does suf- fer from a clear lack of focus. Microcomputer Data Communications Systems is really intended as an infor- mational reference book rather than a textbook overview of microcom- puter-based data-communications issues. If you use it this way, it will supplement nicely the other books available on PC data communica- tions. Particularly useful are the discussions about communications terminology. The book suffers, how- ever, from a cramped design and a small, hard-to-read typeface. Glossbrenner, Alfred. The Complete Handbook of Personal Computer Communica- tions. New York: St. Martin's Press, 1983, $14.95. 325 pages. Although not a technical overview of data communications for the PC owner, this book covers the logistics issues of PC communications quite well. In 12 chapters crammed with information, Glossbrenner gives you all the initial information you'll need to select communications equip- ment for your PC (modems, commu- nications software, etc.) and a remote data or access service to connect with. The author covers the important services, including The Source, Com- puServe, The Dow lones News/ Retrieval Service, Dialog, NewsNet, and a number of others, including public bulletin-board systems. Tech- nical and cost information are both provided. The writing is well done, combin- ing a well-developed structural ap- proach to the contents and an infor- mation-packed format. The informa- tion can be used by technical and nontechnical microcomputer users. Intended as a first-line introduction to the topic, Glossbrenner's book also has considerable utility as a reference book. Most PC owners who contemplate telecommunica- tion connections should own this book. Because the book was pub- lished in 1983, a revised, updated edition would be a good idea. Schwaderer, W. David. Digital Commu- nications Programming on the IBM PC. New York: John Wiley and Sons, 1984.224 pages. $16.95. Also available with a disk of BASIC program examples for $47.90. With a good group of BASIC pro- gramming examples, Schwaderer shows you how to program your PC for a variety of data-communications functions. It's an all-inclusive book covering the programming tech- niques required, and it serves as a reference book about data commu- nications on microcomputers. The book covers modems, com- munications protocols, various com- munications applications, and mis- cellaneous communciations hard- ware. Although written as a self- paced instruction book, the material is organized in such a way that the book also becomes an important reference book once you've mastered its instructional objectives. The writing style is clear prose, with- out a lot of jargon. The book is aimed at the programmer with a fun- damental knowledge of the PC and of BASIC who wants to expand that knowledge to the data-communica- tions domain. Miscellaneous Wesse, Rick. Decision Making: A Manage- ment Science Guide for the IBM PC. New York: John Wiley and Sons, 1984. $1 5.95. 224 pages. Also available with a disk of 34 BASIC programs illustrat- ing the examples in the book for $46.90. This book offers a practical intro- duction to using management- science techniques to solve com- mon management problems with the PC. It starts with a concise over- view of management-science meth- ods and then moves onto BASIC program examples of forecasting, in- ventory, production and allocation, quality control, distribution, marketing, and project planning. The writing assumes some expe- rience with management-science topics and familiarity with PC opera- tion, as well as a firm background in BASIC. The style manages to convey the information without a reliance on management-science jargon. The primary audience, however, is the technical manager who is already grounded in management-science techniques. References One of the reasons we compiled this short an- notated bibliography of technically oriented books for the user or owner of the IBM PC and its compatibles was the lack of any other current annotated list of such books. There are. however, several sources for further informa- tion about IBM PC books, as well as micro- computing books in general. We have listed a few of the most important sources below. Bowker, R. R„ and Company, eds. in Print. New York: R. R. Bowker Com- pany, 1985 (published quarterly). Six volumes. Hardcover. $215. Number of pages varies with each issue but is usually greater than 8000. The standard reference books for tracking newly released books, these works are usually available at most college, university, and public librar- ies, as well as at major bookstores. Bowker, R. R„ and Company, eds. Bowker's Complete Sourcebook of Personal Computing 1985. New York: R. R. Bowker Company, 1985. $19.95. 1050 pages. This book contains more informa- tion than just book listings, and it is an invaluable sourcebook to have around. This issue lists about 5000 titles in print (most softcover) on microcomputing topics (about a quarter of these titles are related to the IBM PC). Bowker, R. R„ and Company, eds. Com- puter Books and Serials in Print 1985. New York: R. R. Bowker Company, 1985. $59.95. 660 pages. 34 Fall I Y T E ■ Inside the IBM PCs This is a reference book of the high- est order, listing vital statistics of all computer books and serials in three cross-referenceable categories: author, title, and subject. A handy listing of all publishers in computer- related fields is included in the back of the book. Norton, Peter. The Peter Norton Program- mer's Guide to the IBM PC. Bellevue, WA: Microsoft Press, 1985. $19.95. 426 pages. This book is a solid reference manual for the IBM PC owner who expects to tinker with the hardware and experiment with assembly-lan- guage programming. Norton gives you an overview of the hardware components of the entire PC family: PC. XT, AT, Portable, and PCjr. He covers floppy disks, the ROM BIOS (including the support for video and graphics), program linking, DOS functions, peripheral device drivers, and the whole gamut of system sup- port software. The Programmer's Guide is a com- prehensive reference work for the entire PC family. Although there is no glossary, the index is thorough enough to allow you to specifically search just one bit of information at a time. The scope of this book is so broad it covers the internals of the whole of the IBM family, including languages, service summaries, il- lustrative charts, DOS information, ROM BIOS services, sound, and three appendixes. Scattered throughout the text are mentions of the differences of the AT. The chapters on the ROM BIOS for the PC family are particularly useful for the application programmer who is trying to write programs that will run on all IBM PCs. Using special symbols to indicate a passage about a particular machine, Norton's ex- position can keep you from writing code on a PC that works differently on a PCjr. The Programmer's Guide to the IBM PC also contains numerous code ex- amples in both assembly language and high-level languages like BASIC. ■ Thinking of the C Language? THINK COMPUTER INNOVATIONS aE\NW C86 VERSION 2.3 with Source Level Debugging Support The C language has rapidly become the development language of choice for applications ranging from Operating Systems to Accounting Packages. WHY? Its structured approach and extreme portability make it perfectly suited to today's fast-paced environment. Of all of the C Compilers available for PC/MSDOS, more programmers choose COMPUTER INNOVATIONS' C86. WHY? Because it's part of a COMPREHENSIVE family of C products with an unparalleled reputation for performance, reliability, and stability. C86 2.3 C COMPILER C (or PC/MSDOS began with C8S and today it remains perhaps the most solid, stable C Compiler available. Even competitor's ads show C86 as a consistent top level performer in benchmark testing. Version 2.3 offers a host of new features including source level debugging support and a 40% boost in compilation speed. Call for complete specifications. COST: $395 UPDATE TO 2.3: $35 w/old diskettes NOT COPY PROTECTED CALL ABOUT VOLUME DISCOUNTS LEARN C INTERACTIVELY WITH INTRODUCING C Intimidated by rumors about the difficulty of learning C? Need to train your staff quick- ly? INTRODUCING C can help. INTRODUCING C combines a thorough, self-paced manual with a unique C interpreter to provide a fast, efficient method oi learning C. Designed for both professional and casual programmers, it provides a comprehensive understanding of important C concepts such as standard K&R syntax and operators, full structures and unions, arrays, pointers, and data types. Requires IBM PC, XT, or AT with one disk drive and 192K bytes of memory. COST: $125 - NOT COPY PROTECTED CI PROBE SOURCE DEBUGGER Take advantage of C86 2.3 source level debugging support with CI PROBE. Cut down program development time and save money! CI PROBE is highly economical yet has the features of debuggers costing far more. COST: S225 - NOT COPY PROTECTED C-TERP C86 COMPATIBLE INTERPRETER The C-TERP INTERPRETER is a full K&R implementation that allows you to write code and execute it immediately without the compile and link steps. Once you have your pro- gram running with C-TERP you can compile the code (without alterations) with C86 for fast, efficient executable files. C-TERP requires 256K, 512K is recommended. COST: C86 version ■ List Price: $300, Special Computer Innovations Price $250. Combined C86 & Lattice version - List Price: $400, Special Computer Innovations Price $350. Start With Us, Stay With Us Computer Innovations offers a complete range of products that let you enter the C environment and create applications with the most advanced set of development tools available. Unparalleled tech support assures that you're always at the height of productivity. To order call: 800-922-0169 W COMPUTER * INNOVATIONS, INC. 980 Shrewsbury Ave., Tinton Falls, NJ 07724 • (201) 542-5920 C-TERP is a trademark ol Gimple Software Prices and specifications subjecl !o change without notice Inquiry 3 1 1985 BYTE • Inside the IBM PCs 35 Contact us for other low prices on hardware and software. Next Day Air Extra FREE SHIPPING NO SURCHARGE FOR H OR Call for latest prices. 10, 20, 33 and 44 MEG INTERNAL AND EXTERNAL HARD DISK SYSTEMS 10 MEG 20 MEG 33 MEG 44 MEG Internal $395 $495 $929 $1129 External $545 $645 $1029 $1229 •" fit. m Half Height Externals mounted with independent power supply and fan. Fully DOS 2.X or 3.X compatible. Both Inter- nals and Externals boot from Hard Disk. 33 and 44 Meg Internal Disks include extender power supply. The system comes complete and ready to install with the Hard Disk, Controller, Cables, Manual, Software, and Mounting Hardware. One Year Warranty. 10, 20, and 33 Meg Hard Disks are available with combined Floppy /Hard Disk Controller Card for additional $75. COMPAQ. comma: 256K, 1/360K drive, 10 Meg Internal $2549 Now using 3 Vi " shock-mounted Winchester drives. The same as used in the Compaq Plus™. Also available with 2 half-height drives and 10 MEG HD- $2749 Or upgrade your Compaq to a Compaq Plus™ equivalent with our 3 Vi " shock-mounted Winchester disk kit. In- cludes Hard Disk, Controller, Cables, Manual, software, and Mounting Hardware. One year warranty. * e . ft comma CALL It simply works better. »-*«**- M^mm' 640K, One 360K Drive, One 10 Meg Internal Hard Drive Tape Backup Unit. $3495 Includes Monitor With 20 Meg Internal Hard Drive- $3595 With 33 Meg Internal Hard Drive- $4029 With 44 Meg Internal Hard Drive-$4229 Call us for competitive uriccs on larger quantities of RAM chips 64KRAM * A Set Of 9 CHIPS, 200 or 150 Nanoseconds Bfe ■■■ $8 Quantities of 100 or more sets 50 per set. 256KRAM Selcftchips Quantities of 50 or more sets Quantities of 50 or m( $39 $29 per set. 36 • Fall 1985 B Y T E • Inside the IBM PCs Inquiry 147 PRICES AND MACHINES THAT OUTRUN THE COMPETITION. PC'S LIMITED AT ^$1995 m High Performance Competitive Price Includes: 80286-based System Unit, 1024K on Mother Board, 1/ 1.2 Meg Drive, Combined Floppy and Hard Disk Controller Card, AT Keyboard, 192W Power Supply, 2 Serials and 1 Parallel Port, and Clock/Calendar with Battery Backup, all on Mother Board. Runs all Major Software written for the IBM PC™, PC XT™, and PC AT™. (Processor) Intel 80286 running at 6MHZ. (Expansion Slots) :8. 7 are available in above configuration. Same Bus Configuration as IBM PC AT™. ©PC'S LIMITED™ 8 ? High Performance Competitive Price $795 Includes: System Unit, 640K on Mother Board, 1 360K Drive, Keyboard, 13 5W Power Supply. Runs all Major Software written for the IBM PC and PC/XT", 40% faster, without modifications. (Processor) 16-bit 8088-2, 4.77 or 6.66 MHZ Clock Speed. (Expansion Slots) :8; 7 are available in above configuration. SOLVE YOUR POWER PROBLEM. XT POWER 135 W 25 or more Fully XT "compatible. One Year Warranty. tf"7C t% Directly replaces power supply in PC" W fj C3-C.ll 150W $119 DISK DRIVES TEAC <05 MITSUBISHI $85 Half-He io,hi, DS/DD ^T ^^ ^^ Quantities of 10 or more $ 75 each PC'S LIMITED Six Function Card w/384K $149 Two Year Warranty • Upgradable to $84K • Parallel Port • Clock/Calendar • Serial Port • Software included « Game Fori Irwin Tape Backup System $595 10 or more $495 each • Uses Floppy Controller Card • 10.35 Meg Formatted Capacity • Used tn Compaq Deskpro. • Half Height • Low Power PC'S LIMITED Compaq, TEAC, IBM, Irwin, and Intel arc trademarks of their respective companies. All brand names are registered trademarks. Wc are an independent sales organization. OUTSIDE TEXAS, ORDERS ONLY, CALL 1 -800-426-5150 7801 N. Lamar, #E-200, Austin, Texas 78752 Telex no. 9i03808386 pc ltd All sales-related calls inside Texas - (512) 452-0323. All calls for technical support, phone (512) 452-0372, 452-0373 or 452-0374. Ad number 4101 Inquiry 147 Kail 1985 BYTE- Inside the IBM PCs 37 The First Idea-Processor For Programmers FirsTime Has features no other editor has. • Fast program entry through single keystroke statement generators. • Fast editing through syntax oriented cursor movements. • Dramatically reduced debugging time through immediate syntax checking. • Fast development through unique programmer oriented features. • Automatic program formatter. FirsTime is a True Syntax Directed Editor. As the world's most advanced syntax-directed editor, FirsTime lets you work with ideas by taking care of the low-level syntax details of your program. For example, you can generate complete statement skeletons with one keystroke. Move the cursor from one procedure to the next with one keystroke. Type in code, and it's instantly formatted (you specify the rules). Type an error, and FirsTime warns you immediately. You can continue working if you wish. Later, you can use the search-for-error command to find the error and fix it. FirsTime Has Thorough Error Checking. FirsTime not only checks your syntax, but also semantics. FirsTime identifies: • Undefined variables, types and constants. • Assignment statements with type mismatches. • Errors in include files and macro expansions. To Order Call: (201) 741-8188 or write: SPRUCE TECHNOLOGY CORPORA TION P.O. Box 7948 Shrewsbury, NJ 07701 FirsTime is a trademark of Spruce Technology Corporation • MS-DOS is a trademark of Microsoft Corporation • IBM is a trademark of International Business Machines Inc. • Turbo Pascal is a trademark of Borland International • dBase III is a trademark of Asnton-Tate 38 Fall 1985 BYTE- Inside the IBM PCs FirsTime Lets You Work With Ideas. The Zoom command gives you a top down view of your program logic. The View macro command shows the expansions of a C macro while in the editor. The View include file command instantly shows you the contents of an include file. The Transform command allows you to change a statement to another similar statement, for example, a FOR to an equivalent WHILE. The Search for next error command allows you to find errors throughout your program. The Cursor movement commands let you traverse your program by logical elements, not just characters. FirsTime Works With Existing Files. FirsTime works with standard ASCII files, so you can edit any existing source files. FirsTime for Turbo Pascal $ 74.95 FirsTime for dBase III $125.00 FirsTime for MS-Pascal $245.00 FirsTime for C $295.00 In Germany, Austria and Switzerland contact: Markt & Technik Software Verlag Munchen, W. Germany (089) 4613-0 Inquiry 186 INSIDE THE IBM PCs Public-Domain Utilities Build an extensive software library for free by Jon R. Edwards THE EXTENSIVE public- domain collection for the IBM Personal Computer and compatibles is a very valuable resource. It is easily possible to build an extensive software library and incorporate the utili- ties into your home proj- ects or to save consider- able time and effort by installing a RAM (ran- dom-access read/write memory)-disk and print spooler. Most programs in the public domain provide source code; you can learn from the code and. more important, you can customize the routines for your own requirements. Undoubtedly, some of the software will fill your needs, and the more obscure programs may simply trigger your imag- ination. The notion that "free means shoddy" does not necessarily apply to this software. I suspect that most of the free utilities were originally written to fill individual needs and as part of the "hacker ethic" have been shared with the public. The programs adequately fill many needs, and they have a tendency, as the user community modifies and ex- pands them, to become more and more bug-free and so- phisticated. Most public-domain programs provide limited functionality, and their user interfaces and documentation are generally less polished than commercial products, but it is amazing how many commercial products do very lit- tle more than integrate the capabilities of programs that already exist in the public domain. If nothing else, ex- posure to these programs will make you more aware of what to look for and ex- pect from the products you buy. And who knows —in the short descriptions that follow, you may find software that's perfectly suited to your needs. At least the price is right. Free Software To the best of my ability, I have concentrated on free, no-strings-attached software and not on shareware or user-sup- ported software. There is, to be sure, a growing amount of shareware for the IBM family, and much of it is excellent (see "Public-Domain Gems" by John Markoff and Ezra Shapiro, March BYTE, page 207), but the prod- ucts often do not provide source code, and their authors usually request a contribution; most users legitimately feel that the products deserve financial support. Naturally, I cannot guarantee that the soft- ware you download will function as you hope it will. I certainly hope you find dozens" of interesting utilities here and that your investiga- tions lead you to new and exciting things, but i take no responsibility if the the programs you download do nothing or turn your screen inside out. Locating free software is getting easier and easier. There are more users groups, bulletin-board systems (BBSs), and public-domain copying services than ever before, and the [continued] ]on R. Edwards is a BYTE technical editor. He can be reached at BYTE, POB 372, Hancock, NH 03449. ILLUSTRATED BY SHELLEY IORDON Fall 1985 BYTE • Inside the IBM PCs 39 TOTALCONT with LMI FORTH PUBLIC-DOMAIN UTILITIES For Programming Professionals: an expanding family of compatible, high-performance, Forth-83 Standard compilers for microcomputers For Development: Interactive Forth-83 Interpreter/Compilers • 16-bit and 32-bit implementations • Full screen editor and assembler • Uses standard operating system files • 400 page manual written in plain English • Options include software floating point, arithmetic coprocessor support, symbolic debugger, native code compilers, and graphics support For Applications: Forth-83 Metacompiler • Unique table-driven multi-pass Forth compiler • Compiles compact ROMable or disk-based applications • Excellent error handling • Produces headerless code, compiles from intermediate states, and performs conditional compilation • Cross-compiles to 8080, Z-80, 8086, 68000, and 6502 • No license fee or royalty for compiled applications Support Services for registered users: • Technical Assistance Hotline • Periodic newsletters and low-cost updates • Bulletin Board System Call or write for detailed product Information and prices. Consulting and Educational Services available by special arrangement. urn Laboratory Microsystems Incorporated Post Office Box 10430, Marina del Rey, CA 90295 Phone credit card orders to: (213) 306-7412 Overseas Distributors. Germany: Forth-Systeme Angelika Flesch, D-7820 Titisee-Neustadt UK: System Science Ltd., London EC1 A 9JX France: Micro-Sigma S.A.R.L., 75008 Paris Japan: Southern Pacific Ltd., Yokohama 220 Australia: Wave-onic Associates, 61,07 Wilson, W.A. number appears to be growing daily. In assembling my list, I have concentrated on some of the larger bulletin boards and copy services, but local bulletin boards have a surprisingly large selection; many have well over half of the programs on this list. Give them a call and see. You might not find precisely the program I've mentioned, but another program there may fill your needs or you may unexpectedly find new and exciting listings. There is in the public domain, for example, a large and growing number of .txt and .doc files that review new software and hard- ware, give programming tips, identify bugs in hardware and software, explain patches to existing software, and summarize on-line discussions. Download, read, and be informed. The largest boards may require a long-distance call, but you are very likely to locate 80 percent of all the utilities. Among many, you might try Kingcomm at (713) 360-1316, The Eclectic BBS at (914) 221-2248, the Fargo Board at (701) 293-5973, the IBM PC Information Exchange at (312) 882-4227, or the Boston Computer Society at (617) 3 53-9312. There are, of course, hundreds of other boards with substantial collections; many of the bulletin boards maintain lists of active BBSs. Readers who do not yet have modems can still obtain many of the programs they want through their local users group or through the mail from services such as PC Software Interest Group (1030 East Duane, Suite J, Sunnyvale, CA 94088) or from the New York Amateur Computer Club (Box 106, Church Street Station, New York, NY 10008), which will ship you the programs you need for a copying fee. Most of the utilities are available from a wide variety of sources, but some are more difficult to find because they seem to have appeared only on CompuServe. 1 have marked these with a |C|. I have divided the utilities into the following categories: disk' utilities and DOS aids, memory and system status, keyboard assistance, text/file manipulation, graphics and screen control, application software, printer utilities, telecommunications, languages, and language aids. Happy public domaining. Disk Utilities and DOS Aids These utilities are among the most numerous and useful. There are RAM disks, applications to examine and modify sectors and tracks on your disks, directory and DOS en- hancements, utilities for your hard disk, and a variety of utilities to test, fix, or modify your hardware. First, a number of flexible RAM disks are available. RAM- DSK16.COM and FREE.COM provide a 160K-byte RAM disk; later versions of FREE.COM automatically save data when you reset. Other RAM disks include QD.COM, which requires the Quadram board, HDS320.EXE and RAM- DSK32.COM, which set the RAM disk for 320K bytes, and HDS512.EXE, which gives you a 512K-byte RAM disk. RAMDISK2.LBR lets you vary the size of the RAM disk. A number of utilities simplify DOS-related tasks. SHELL.COM keeps COMMAND.COM resident. FOR- (continued) 40 Fall 1985 BYTE- Inside the IBM PCs Inquiry 107 &*_4a SE4IGRAPHICS: ONE KEYSTROKE TURNS LIFELESS DAIA... wv Yol INTO WIAL SDOlSnCS. Data. You live with it every day. What you need are the tools to make it come alive. Comprehensive analytical tools. Mathematical precision. And graphics capabilities to broaden your insights — to help you visualize, analyze, and communicate your find- ings quickly and convincingly. And now you've got it. With STATGRAPHICS -a new PLUS-*WARE™ product from STSC. STATGRAPHICS is the only PC soft- ware to fully integrate a wide variety of statistical functions with high- resolution color graphics. Giving you the power and precision you used to find only with mainframe software. STATGRAPHICS' unique inter- active environment allows you to generate graphs from within the statistical procedures. You can change a variable and see the effect— im- mediately. So your job is easier and you're more productive. MORE OPTIONS FOR MORE COMPREHENSIVE ANALYSIS. STATGRAPHICS features over 250 functions for analyzing data — including analysis of variance, regres- sion analysis, experimental design, quality control procedures, multivariate techniques, nonparametric methods, and extensive forecasting and time series analysis. It also lets you enter data at the keyboard or access data stored in standard ASCII files, LOTUS® 1-2-3 worksheets, and DIF files used by other popular software packages. TELL A CLEARER, MORE DRAMATIC STORY. STATGRAPHICS includes a wide variety of graphics programs such as two and three-dimensional line and sur- face plots, bar and pie charts, histograms, time sequence plots, and quality control charts. The graphics are supported on color and monochrome graphics boards, dot-matrix printers, and pen plotters for presentation quality graphics. SOPHISTICATED STATGRAPHICS IS SURPRISINGLY SIMPLE TO USE. STATGRAPHICS is completely menu-driven, and includes a com- prehensive user's guide, online HELP screens, tutorial, and handy reference card. And STSC's HELP-Line is only a phone call away— giving you ready ac- cess to our staff of technical experts. TAKE A LOOK AT STATGRAPHICS. AND LOOK NO FURTHER. STATGRAPHICS is the most ad- vanced statistical graphics software available for PC's. And the complete system is just $695. To order STATGRAPHICS, or for more information, contact your local dealer or call 800-592-0050 (in Maryland, 301-984-5123). Or write STSC, Inc., 2115 E. Jefferson St., Rockville, MD 20852. Major credit cards accepted. Inquiry 188 Problem-solving at the speed of thought. #W## STATGRAPHICS operates on IBM PC's and compatibles under DOS, Version 2.0 or later. A minimum of 304K RAM, a graphics adapter and compatible monitor, and two ^ I 9V double-sided disk drives or a hard disk are required. An 8087 math coprocessor and 512K RAM are recommended. A Contei Company STATGRAPHICS is a registered trademark of Statistical Graphics Corporation. PLUS* WARE is a trademark of STSC, Inc. LOTUS is a registered trademark of Lotus Development Corporation. Inquiry 192 GIVE YOUR SYSTEM BACKBONE STRUCTURE, ORGANIZATION, and FINGERTIP CONVENIENCE for IBM PC/XT/AT and COMPATIBLES You create a set of linked menus with Backbones MENU PROCESSOR." The menus you've customized remain in low memory. Then, a single keystroke takes you immediately to any program, batch process, or simply another menu. I Experienced users: -Speed up and simplify your activities, whether word pro- cessing, data-basing or programming -Open your system's offerings to coworkers, customers, and family members Less experienced users: -BACKBONE means supreme friendliness M ^ Mow do you use BACKBONE? 1) Customize a menu set with the Menu Processor 2) Create any number of menu sets, one for each user or group of users 3) Place your programs where you want them : on hard disk, virtual disk, or floppy 4) Execute BACKBONE % IT'S AS SIMPLE AS THAT! No longer any need to remember f_ complicated DOS commands, | paths, or file names [ HE] t: TO ORDER CALL 800/237-6360 ext. 314 800/282-1152 ext. 314 (FL) MASTERCARD/VISA PUT SOME BACKBONE IN YOUR LIFE FOR ONLY SOQ95 ! 39 plus s 4 postage and handling & Synchrony Systems 4191 San Juan Avenue Jacksonville, FL 32210 PUBLIC-DOMAIN UTILITIES MOST IMPORTANT PC ADD ON YOU CAN BUY INTERFACES UP TO 5 OUTSIDE LINES WITH 12 TELEPHONES ALEXIS, THE PHONE SYSTEM FOR SMALL BUSINESSES • It speaks to you • If s user programmable • It records all phone calls & numbers dialed • Restricts any number or prefix such as 41 1, 976 • Alexis uses standard touchtone telephones offering access to all features and lines • A caller can retrieve information from the PC's diskette using his phones keypad Alexis does not need a PC, but interfaced with one, will open a whole new world without interfering with the PCs operation. ^S=- ^$? Max, Inc. <»«S1 PeocMree Industrial Soulevofd ♦ WWCTOM. Geotolo 30071 * (404)6621504 fetex 707355 OASIS INTELLIGENT COMMUNICATIONS FOR ENTERPRISING BUSINESSES MAT2.BAT formats disks in the A and B drives at the same time. CAT.COM, SDIR26.ASM, SD.COM, and LF.COM sort directories by filename, extension, date, time, file size, and other criteria. XDIR displays an "extended directory," in- cluding file attributes such as whether the file is a system file, a read-only file, or a hidden file. GETD1R.PAS provides the Pascal source code for reading the directory. PART- COPY.EXE copies files on double-sided disks to two single- sided disks. GDEL.EXE and PURGE.COM allow global file delete with yes/no verification. VCOPY.COM is a similar global file-copy utility. FDATE.LBR allows you to change the file dates. R0.COM marks files as read-only. RW.COM marks files as read/write. CV2.COM and V0LSER.COM can write or change the volume label on your disks. QD- COPYDOC explains how to modify DISKCOPY in order to eliminate the prompts, and DCBA.HOW explains a patch to DISKCOPY for those who need many copies of a disk. DSKPAT.TXT [C] explains how to patch DISKCOPY and DISKCOMP for large-memory PCs. FILECMD2.BAS pro- vides several DOS commands from BASIC. CLS.COM allows you to clear the screen from the DOS prompt. DISKMODBAS, DISKMODFBAS, and D1SKREAD.EXE allow you to examine and modify disk sectors. Pascal source code is available for the latter. DISKRTN.EXE and H1DEFILE.BAS are dedicated to the task of examining and modifying the disk directory. Use them to recover lost or deleted files. DIRSORT1.BAS permanently sorts the disk directory. Finally, several programs provide a "switch" from DOS to different graphics and text modes. COLOR40.COM and COLOR80.COM switch to the 40- and 80-column color- graphics text modes. MONO.COM switches from DOS to monochrome 80-column text. COLORG.COM switches to monochrome medium-resolution graphics. Several programs provide some measure of file securi- ty. DIRHIDE.LBR hides and "unhides" directories. CRYPT.EXE encrypts text files. PWORD.BAS requires that you enter a password before using the system. There are several utilities for hard-disk users. FF.EXE and WHEREIS.LBR search through all subdirectories for a specified file. If there is more than one copy of the pro- gram, WHEREIS.COM will identify the directories in which you can locate the file. FORMAT.FIX prevents the acciden- tal formatting of a hard disk. IBU.LBR is an incremental hard-disk backup utility. BACKSTAT.EXE checks the status of hard-disk files that have not yet been backed up. RED.COM and MOVEFILE.LBR move files from one sub- directory to another. DIRENAME.COM renames subdirec- tories. ARAQ.EXE erases files across subdirectories. D1R- CTY.COM provides sorted directories of your subdirectories. LF.COM displays the files on the current subdirectory. MENU.LBR is a hard-disk menu system. DISKPARK.LBR places hard-disk heads over the shipping cylinder. Most bulletin boards have "squeezed" files that occupy less disk space and download more quickly. To use these files, which are usually marked with a Q in their exten- sion, you will need to use an "unsqueezer." Most services (continued) 42 Fall 1985 BYTE- Inside the IBM PCs Inquiry 5 WOULD YOU BUY A PACEMAKER FROM MATTEL? IBM/PC-based LOGIC LINE-1 ™ artificial intelligence software is so advanced, that competitive products are toys by comparison. There aren't very many who'd stake their lives on a toy-store pacemaker. Luckily, we won't have to worry about their rancid cells polluting mankind's gene pool very long any- how. Such brain-damaged geeks tend to die young. If you've recently spent money on artificial intelligence software, you might be wishing a few programmers had croaked before writing that blithering swill they named AI and pal- med off onto you. What they call an "inference engine" is nothing more than an IF-THEN decision tree that can't even do a very good job of arithmetic* We're Clarity Software, and we're introduc- ing a product that can take a massive amount of text from any machine-readable source, and mathematically distill thought processes for query and analysis. This process, as dis- tinguished from expert systems, is referred to as natural-language intelligence. In this ad, we're going to explain to you why you'd be crazy not to have our package in your portfolio of data-manipulation assets. DERIVE THE DNA/RNA OF ANY WRITER'S THOUGHT PROCESSES. LOGIC LINE-1 was the result of the inter- action between a couple of cyberneticists and a physicist, with combined experience in high-performance learning and pattern-recog- nition programming. The physicist was responsible for one of the first DNA/RNA- tracking systems (the RNA-of-thought asser- tion is more than just an advertising creation). We are not your ordinary bunch of yahoos. Imagine having the collected thoughts of Voltaire online. If you were interested in view- ing Voltaire's thoughts on "job security!' you would enter that term in the search menu. Now you're thinking: "Nuts! These yahoos are trying to sell me something my sup- posedly toy text editor can do with a search command. Right?" Wrong, pussycat. Your inference process was a little quick on the trigger. Never, in any of Voltaire's writing, was there ever the phrase "job security" "OkT you reply. "You have a dictionary of synonyms, eh?" Wrong again. LOGIC LINE-1 has no dictionary. Interesting? Essentially, LOGIC LINE-1 uses a series of mathematical transformations on text, the out- put of which is cataloged in a database analo- gous to a biological DNA/RNA imprint of that text. There are approximately one dozen param- eters that make up a thought's DNA/RNA. Some transformations fingerprint syntax pat- terns; some look at subject/predicate rela- tionships via a small dictionary of several dozen noise words. After setting up the above Voltaire "job security" query, LOGIC LINE-1 will present you with high-possibility "hits!' You will type "Y" when they are relevant, and "S" for skip, when they are not. The first several "hits" might be rejected, since the term "job security" will not be found. Once you get an acceptable entry, however, and lock onto an acceptable RNA-of- thought pattern, the accuracy of LOGIC LINE-1 will be staggering. Or we'll refund your money. Simple enough? "I'M NOT INTO VOLTAIRE',' YOU SAY. "WHY DO I NEED LOGIC LINE-1?" How would you like to be able to turn any textbase into an expert system? For example, most PC users rely upon word processing. The problem is, we store our correspondence in files with names like "LT062185" or "REJECT21" or "RANDOMTH!' As a result, we reinvent the wheel with each letter we compose. Why do this? Using LOGIC LINE-l, you can append all your written correspondence into one textbase file. Sure, any word processor could do a straight search for a term like "quality!' But none can do this search as fast as LOGIC LINE-l. And none could turn up the "quality" references if queried for the term "workmanship!' Thus, when writing letters and speeches, use LOGIC LINE-l to collect previously articulated thoughts on any given subject. Whatever your profession, be it law, medicine, engineering or information management, LOGIC LINE-l is an indispensable tool for true thought processing. Now that thousands of textbases are pub- licly available, LOGIC LINE-l is the key to their intelligent use. Once the computer estab- lishes associative links in a large body of material, many creative applications are pos- sible. TRUE AI! CLONE THE GREAT MINDS ON YOUR PC. Did Bacon write Shakespeare? Did Albert Einstein have anything relevant to say on the subject of "generation gap?" How many con- gressmen consistently contradict themselves in the Congressional Record? The uses of LOGIC LINE-1 are limited only by the availability of textbases, and by your imagination. Do you dare send a student to college with- out LOGIC LINE-1 and a PC? Would YOU care to compete in business with someone else who has this leading-edge, decision-sup- port software? Einstein should write your papers on rela- tivity. Alfred North Whitehead should write your papers on philosophy. And Shakespeare should write your love letters. 1985'S SPECIAL $100 LIMITED-TIME OFFER WILL BE HISTORY IN 1986. This is our very first, and only, announce- ment ad. For the rest of this year, you may obtain LOGIC LINE-l for only $100 (note, we didn't try to fool you with a $99.95 price tag; we do give you, as well as your computer, some credit for intelligence). As of January 1 , 1986, LOGIC LINE-1 will retail for $250. To find out more about LOGIC LINE-1, call 216/729-1 132. You may order by phone by calling 800/621-5839 (or in Illinois, call 800/972-5855). Return the product for any reason whatsoever within 30 days for a full refund. If you are with the US government or one of the intelligence spook shops, LOGIC LINE-1 is available to federal/DOD buyers through IBIS Corporation, 131 Elden Street, Herndon, VA 22070 (call 800/532-3344 or 703/478-0300). You COULD spend your next $100 for other software. You could also ask Weird AI Yankovic to install that terrific new pacemaker from your kids' Young Doctor toy kit. Call today and save more than just money. CLARITY A Div. of EXPANSION PGMS INT'L, Inc. P0 BOX 839 • Chesterland, OH 44026 • USA (216)729-1132 *Tbe only other package out there worthy of the label "artificial Intelligence" is from Tcknowledge in Palo Alio, and we don't compete with them. They build "expert systems'.' while our emphasis is on "natural language" systems. We mention them in passing, because they're one of the tew "good guys!" Copyright <0 l l J8S by Clarity Software. LOGIC LINE-l '" is a trademark of Clarity Software, and requires a 128K IBM PC withal least one diskette drive and runs under MS/DOS 2. 1 and up. IBM'" IBM Corp. MATTEL™ Mattel. We hope the swell people at Mattel can take a joke. Advertising & PR by TRBA, 408/258-2708. Inquiry 25 Fall I985 BYTE- Inside the IBM PCs • 43 r ■ Votrax Announces PUBLIC-DOMAIN UTILITIES VOTALKERIB&AP New Industry Standards For Talking Personal Computers. Exclusively for IBM PC and XT, Apple II, and Compatibles. From Votrax, The Pioneer in Synthetic Speech Systems. Give your IBM PC and XT and Apple II the Power of Speech A wJBmBi . , ■ . ■■ .. ■■ m iiiii ii lilt's Until Votalker IB and AP, synthetic speech systems for personal computers were like a piano with 50 keys, an eagle with a broken wing, and a singer with a two-octave range. When Votrax developed the SC02 speech synthesis chip, it was the classic case of advanced technology in need of support systems to unlock its dormant powers. Now, Votalker introduces a revolutionary family of text-to-speech translators — the key to the lock. First members of the family are the Votalker IB for IBM PC and XT and the Votalker AP for Apple II, Apple lie, and Apple Plus. With Votalkerthese units play the piano with all 88 keys. Soar through unlimited vocabulary, using 32 inflections and 4,100 pitch settings. Sing in five octaves, and generate sound effects in 16 amplitudes. A Newly Designed Circuit Board includes: • SC02 chip • speaker • audio amplifier • volume control • external speaker jack. The board operates in the host computer slot, eliminating the need for serial ports and cable hookups. Internal editing and smoothing ensure clarity and integrity of speech. The Text-To-Speech Translator sets Votalker above all other synthetic voice products. Text is generated through programs or keyboard and translated directly into spoken language. The sophisticated software on a diskette offers: • unlimited vocabulary • little use of system memory • exception table that stores and accurately pronounces difficult words. Other Votrax Products — the stand-alone Personal Speech System and Type 'N Talk — are currently used in thousands of applications. Votalker Prices Begin at $179 Call Votrax at (800) 521 -1 350* VOTRAX, INC. 1394 Rankin Troy, Michigan 48083 (313) 588-2050 *ln Michigan, Call Collect (313)588-0341 V provide them, and it may be necessary to use the utility recommended by the particular board from which you ac- quire your software. Unsqueezers include USQ.EXE, NUSQllO.COM, and ALUSQ.COM. Much of the software also appears in library files, easily recognized by the .LBR extension. To use these files, you may have to extract the files and then unsqueeze them. LSWEEP13.COM and NULU.COM are flexible utilities that allow you to perform both operations at the same time. Other utilities include CLEAN.COM, CLEANDRV.BAS, and WASH.COM, which exercise the disk during the use of disk-head cleaners. SPEEDUP.COM purports to speed up disk I/O. TWOSlDE.COM allows you to address two double-sided drives as a, b, c, and d. There are a number of disk-drive maintenance programs, including DRIVE- TST.BAS and DSKTST.BAS; they can determine the speed of your drives and if your disks have bad sectors. ALIGN. BAS, a disk-head alignment utility, provides con- trol over disk-arm movement. Memory and System Status Many public-domain programs, including LOOK.COM, SCREEN. PAS, MEMDUMP.BAS, and CORELOOK.COM, ex- amine the contents of specified addesses in memory. SYSTAT.COM and PCS.COM display general system status. EQUIP.COM and CHECKOUT.BAS assess your serial and parallel interfaces and equipment. 8087TEST.EXE checks the 8087. REGDISRASM displays 8088 registers in real time. MTEST.COM detects PC memory errors. JOYSTEST.BAS is one of many joystick testers. LPEN- TEST.BAS checks your light pen. SEESWITCH.BAS displays the computer switch settings. DIPSET.BAS lets you con- figure them. MEMORY.COM sets memory size without your having to alter the switch settings. PARlTY.COM dis- ables parity checking, and both PARINT.COM and PAR- CHK.LBR provide a parity-check intercept handler. With the latter two, you can save your files before testing the system for the problem that caused the parity check. PAR- BNK.HEX, a modification of PARCHK, reports the bank number that had the error. Finally, MEM640.ZAP modifies the BIOS to allow 640K bytes of memory. Keyboard Assistance There is a general assortment of utilities that provide key- board assistance. A number of routines, including BASIC- KB.EXE, KEYBOARD.EXE, and PCKEY.COM, purport to provide collections of keyboard utilities. Several programs, including KYBD.BAS, output keyboard input to the printer like a typewriter. Other programs, like BUFFER.COM, KBD_FIX.COM, BUFFI 59.COM, and KBBUFFBAS, extend the keyboard buffer. CED, for command editor, provides a command stack in DOS and allows you to edit DOS com- mands with the cursor keys. QUICKREF.BAS creates templates for keyboard reference. Many programs provide extended keyboard control. BIGANSI.SYS, an enlarged version of ANSl.SYS, lets you (continued) 44 Fall 1985 BYTE- Inside the IBM PCs Inquiry 210 MICROWAY'S 8087 RUNS 1-2-3™! MicroWay is the world's leading retail- er of 8087s and high performance PC upgrades We stock a complete selec- tion of 8087s that run at 5 and 8mhz. All of our coprocessors are shipped with a diagnostic disk and the best warranty in the business - one year! We also offer daughterboards for socketless computers such as the NEC PC and PCjr, and a board which increases the clock speed of the 80287 from 4 to 8 mhz. Our NUMBER SMASHER™ in- cludes 51 2K ram. It will run the IBM PC at clock speeds up to 10mhz and achieves a throughput of .1 megaflops H ■OS ttuftat-Lr^ it . '**" 1-HP"1 lliK SPEED UP YOUR AT i .. Bf i WITH 287TURBO ' • £ mhz with87BASIC/INLINE, Intel Fortran, or Microsoft Fortran. Software reviewers consistently cite MicroWay software as the best in the industry! Our cus- tomers frequently write to thank us for recommending the correct software and hardware to meet their specific needs. They also thank us for our same day shipping! In addition to our own products which support the 8087 and 80287, we stock the largest supply of specialized software available any- where. For information call us at 617-746-7341 Micro IMay FASTBREAK™ MicroWay s software turns on your 8087 during 1 - 2-3'" execution. Recalculations run up to 36 times faster. When used with the NUMBER SMASHER'" it can provide a total increase in 1-2-3'" execution speed of up to 79 to 1. FASTBREAK provides you with the unique capability for running other programs on top of 1 - 2-3. These programs can be written in BASIC, PASCAL, Fortran or C and can access the current values in your 1-2-3 worksheet $79 FASTBREAK & NUMBER SMASHER $1099 8087 Support For the IBM PC, PC XT, PC AT and Compatibles. NUMBER SMASHER™ The World's Fast- est Accelerator Card for the I BM PC, XT, and Com- patibles! Includes an 8086 and 8087 pair tested to "lOmhz, and 51 2K bytes of high speed ram. Compatible with all software, operating systems and hardware! Your program speed is increased by a factor of 2.5 to 4.0. Floating point programs run up to 2.8 times faster on the PC than on an 80287 equipped PC AT $1049 MATRIXPAK™ manages a MEGABYTE! Written in assembly language, our runtime pac- kage accurately manipulates large matrices at very fast speeds Includes matrix inversion and the solution of simultaneous linear equations Callable from MS Fortran 3.3, 87MACRO, and 87BASIC/INLINE each $1 50 87FFT Written in assembly language, per- forms Forward and Inverse FFTs on real and com- plex arrays which occupy up to 51 2K bytes of RAM. Also does convolutions, auto correlations, hamming, complex vector multiplication, and com- plex to radial conversions. Callable from MS For- tran, 87MACRO, C, TURBO PASCAL or 87BASIC/INLINE $200 87FFT-2™ performs two-dimensional FFTs. Ideal for image processing Requires 87FFT $1 00 GRAPHICS PACKAGES Grafmatic for Fortran or Pascal $1 25 Plotmatic for Grafmatic $1 25 MultiHalo (one language) $1 89 DFixer™ - Eliminates the AT hard disk pro- blem! A disk which thoroughly checks PC or AT hard disks for bad sectors and updates the MS DOS file allocation table accordingly $149 EPSILON™ - our favorite in-house editor lets you simultaneously edit up to 1 1 source files and concurrently run a compiler or linker. A real timesaver! $1 85 87 BASIC/I N LI N E" converts the output of the IBM Basic Compiler into optimized 8087 inline code which executes up to seven times fas- ter than 87BASIC. Supports separately compiled inline subroutines which are located in their own segments and can contain up to 64K bytes of code. This allows programs greater than 1 28K! Requires the IBM Basic Compiler and Macro Assembler. Includes 87BASIC $200 87 BASIC includes patches to the IBM Basic Compiler and both runtime libraries for USER TRANSPARENT 8087 support Provides super fast performance for all numeric operations in- cluding trigonometries, transcendentals, addition, subtraction, multiplication, and division $150 87MACRO/DEBUG™ contains all the pieces needed for writing 8087/80287 assembly code including 8087 macros, object libraries for commonly used functions, including transcen- dentals, trigonometries and conversions between strings and real numbers Our 87DEBUG com- pletes the package $1 99 OBJ — 'ASM™ - a multipass object module translator and disassembler. Produces assembly language listings which include public symbols, external symbols, and labels commented with cross references Ideal for patching object mod- ules for which source is not available $200 RTOS - REALTIME OPERATING SYSTEM RTOS is a multi-user, multi-tasking real time oper- ating system. It includes a configured version of Intel's iRMX-86, LINK-86, LOC-86, LIB-86,OH-86, and MicroWay's87DEBUG. Runs on the IBM-PC, XT, PC-AT and COMPAQ $400 INTEL COMPILERS 1 FORTRAN-86 $750 PASCAL-86 $750 PL/M-86 $500 ASM-86 $20O 'Requires RTOS or iRMX-E iRMX-86 TM Intel Corp. All Intel compiler names and European Customers: Please call MicroWay in London at 01-223-7662. Micro Way P.O. Box 79 Kingston, Mass 02364 USA (617)746-7341 The World Leader in 8087 Support! 8087 5mhz $109 Including DIAGNOSTICS and one-year warranty For IBM PC and compatibles 8087-3 5mhz $175 For the Tandy 1 200. 8087-2 8mhz $175 For Wang, AT&T, DeskPro, NEC, Leading Edge. 80287-3 5mhz $199 For the IBM PC AT and Compaq DeskPro 286. 287Turbo™ 8 mhz $395 With Reset Button and Diagnostics. 64KRAMSet $8 256KRAMSet $29 256K CMOS RAM Set $39 128K RAM Set pcat $150 AST Advantage™ $439 JRAM-2"(0K) $169 JRAM™AT(0K) $229 JRAM-3™ (1 28K) $275 MAYNARD ACCENT $225 FORTRAN, C and BASIC Microsoft Fortran Version 3.3 $229 IBM Professional Fortran 545 Ryan-McFarland Fortran 399 FORLIB+ or STRINGS and THINGS 65 Lattice C or Microsoft C Version 3.0 299 FLOAT87 1 50 IBM Basic Compiler Version 2.0 445 Microsoft Quick Basic 89 Summit BetterBASIC '" 1 75 True Basic 1 05 MACRO ASSEMBLERS IBM Assembler with Librarian V. 2.0 1 55 Microsoft Assembler Version 3.01 1 25 PASCAL and APL Microsoft Pascal Version 3.3 1 99 Borland Turbo with 8087 Support 85 STSC APL* PLUS/PC 450 STATGRAPHICS 595 COSMOS Revelation 750 Phoenix Plink86 295 SPSS/PC 595 FASTBREAK and NUMBER SMASHER are trademarks of MicroWay, Inc Lotus and 1 -2-3 are trademarks of Lotus Devel- opment Corp. ,'nquiry I 35 Fall I985 BYTE- Inside the IBM PCs 45 Inquiry 6 The Winning Team The Marchant Retail System For IBM PC • Multi-user capabilities — • Action-oriented sales up to four registers and inventory reports per PC to help you streamline • Non-dedicated process- vour """"ess and Ing - runs other soft- realize your profit ware while the registers potential operate • Merchant's Programmable • Bar code reader CT-1000 Communicating interface Cash Re fl lster - tne ultimate In flexibility • Easy-to-use inventory and receiving package VARS & DEALERS ^f^_ CALL 800/222-4844 * W ^t^M ^ i J i^B^^^J Marchant since 1910 A Division of Addmaster Corporation Los Angeles London PUBLIC-DOMAIN UTILITIES 9-TRACK 'A " MAINFRAME TAPE SUBSYSTEM FOR THE IBM PC/XT/AT WITH FREE BACK- 270 E. Pulaski Road A Public Company I Greenlawn, NY 11740 TWX 510-226-0449 (800)835-3298 (516)423-3232 redefine up to 40 keys. ANSI2K.LBR is another form of ANSl.SYS with a 2K-byte buffer. KBRATE.COM and SPEED- KEY.COM change the rate at which the keys repeat. The latter also claims to speed keyboard I/O. NEWKEY.BAS reassigns the 10 function keys, while FKREST.COM resets the keys to their original functions. FKEYS.LBR redefines the Alt-function key combinations. KEYSBAS.BAS and OPKEYS.BAS program the function keys for BASIC pro- gramming. SETKEY.EXE and DEFKEY.COM are keyboard reassignment programs: ORIGINAL.KEY contains the original keyboard configuration. CNTRLBK.BAS demon- strates how to disable Ctrl-Break. SHlFTBS.COM converts the backslash key into a left shift key; SHlFTlBM.COM con- verts it back. KEYLOC.EXE and KEYHELP.COM make the shift, Alt, and Ctrl keys into toggles, a useful feature for handicapped users. FLIP.COM, UPNUM.COM, and KEY- FLAGS.COM provide further control over the Caps Lock and Num Lock keys. Text/File Manipulation You may find some useful public-domain utilities if you frequently have to convert from one text format to an- other or if you commonly need to manipulate text files. TXTPRO.EXE, ASCFILTR.BAS, and FILTER.BAS are filters that remove control and non-ASCII characters from ASCII files. Use them, for example, to remove control charac- ters from downloaded files. CR.BAS filters BASIC files. ADDCR.BAS and CRETURN.BAS, other useful programs for manipulating downloaded files, add carriage returns to the end of every line in a text file. WS-FIX.COM, WS- ASCII.BAS, UNWS.EXE, and many other programs strip the high-order bits from WordStar files to convert them to ASCII. WS-INDEXCOM indexes WordStar files. EZW2- ASCI.BAS converts EZWriter files to ASCII. CHOPLBR sections large text files. ADD-LFBAS adds linefeeds to files that contain only carriage returns. IUSTIFY.EXE allows right and left justification of text files. DETAB.EXE expands tabs in a file to a specified number of spaces. LOWER.COM and UPPER.COM convert text files from and to lowercase and uppercase. WCEXE counts the number of words in a text file. DOCAN AL.LBR |C| analyzes the line length to help you decide how to print the file. DUMPFILE.PAS produces hexadecimal and ASCII dumps of disk files. BIHEX.BAS, HEX.BAS, and HEXCONV.BAS convert files among binary, hexadecimal, and ASCII. Several utilities ease string-related tasks. DEFINE.EXE is a string-replacement macro. KWIQ.LBR, FIND.EXE, and UTSCAN.EXE scan for occurrences of text strings in files; SORTEXE sorts them; CHANGE.EXE replaces them. There are several sequential file utilities. For example, DATA- FIX. BAS adds or removes line numbers, and KILL- NULL.BAS removes nulls. Graphics and Screen Control There are also a number of useful public-domain graphics and screen-control programs. If you're concerned about {continued) 46 Fall I985 BYTE- Inside the IBM PCs Inquiry I98 We've gone to great widths to make you look good. Si m Si sn~ tr= •== r-i r ;y ■-.:■ ;:; :\.:i :-t; :'■;" i'^- :' .Vf. '•' f.: :i.' :."!" I £': :'»• i'^": : : r.' :'s; i'2r : '■ :'":: ;"rf i ;■ " : :'-.*■ I : : v:' . : :: ' l : :^ :'".:! i'" ; L :"■.;:! : : 7 : : : '-. v: : [ iH.ii i ; '*-i;! i- '.;■- •.--.- '..- -.= r ■."= '.-'. •..-:: -.■-. ■..:- ■..:: ■..;.-. : ..r- >xz ■..:.: •'.-: -. ■ : .. . : ._:r -..- : ..-: ; , : . ::; ; „ ■ .:."■ : .r ',;■'. i.i.r ; .: vl; •£'£. 5| g5gsg gi I-:' ,.. :-u: ; ;■■::■ ;■ .- , :■ ,. : :-,::. : r . n , ■.. jjgj§LpL|^ «!i ? = ? fl-i v 11 ??-- ??: PSr sit -831! laaa wan -~* ssm %sa iwas 'law mta ■qeh "sara ■was •eac "ksis was •„■-.■. "sskt lata vss ■asts ■ess "Bttfi -ases "Ssss "ass wsa :ss3 %ss "Stan ibj tw ■ass "WW Introducing New SIDEWAYS 'Version 3. Sideways has always been the favorite way to print nearly every- thing that's too wide for a printer. Not surprising. It's quick. It's easy. And it makes clean, one-piece printouts as wide as you like. So you get spreadsheets that really spread out. Pert charts that peer far into the future. All kinds of extra-wide reports without staples, glue or tape. But now Sideways Version 3 goes even further. Especially for 1-2-3™ and Symphony.® Now you can make short work of those wide 1-2-3 spread- sheets. No need to make print files. Just highlight a range and print right from your worksheet file using familiar Lotus-like menus Mix bold, underlined and expanded type, all on the same page. Print through or skip over perforations. Make the finest extra- wide printouts this side of typesetting. Using Symphony? Sideways chimes right in to print any worksheet you've loaded without ever leaving your Symphony session. No matter what software you use. Spreadsheets, databases, word processors, project planners. Whatever you use, you'll get more out of new Sideways. Choose from nine different type sizes, from "minuscule" to "mammoth." Print bold, underlined or expanded - whatever your software can create. Even foreign language and line-drawing characters. Plus, there are so many ways to adjust margins, spacing and page size, it stretches the imagination. Sideways Version 3 for the IBM® PC and all popular dot-matrix printers. Available now at computer dealers nation- wide. Or directly from Funk Software with your check, Visa or Mastercard. At just $69.95 a copy, you'll never want for width again. Special upgrade offer! Just send $20 along with your current Sideways program disk and manual directly to Funk Software. We'll send you Version 3 right away. Funk Software, 222 Third Street, Cambridge, MA 02142. Phone (617) 497-6339. Copyright 1985, Funk Software, Inc. Sideways is a trademark of Funk Software. Lotus, 1-2-3 and Symphony are registered trademarks of Lotus Development Corp. Inquiry 69 Fall 1985 BYTE- Inside the IBM PCs • 47 Inquiry 3 BUILD YOUR OWN P.C. PU BLIC-DOMA I N UTILITIES PC-XT Mother Board IBM"" Fully Compatible 8089 Micro-Processor with 0087 Math Pros Socket. 8 I/O Slots, 25BK On Board Memory Assembled & Tested Board 6 All Components 1 - S229 3-4S219 4-10 S200 Over 10 Call IBM it i HJdimvk ol Intmilionil Suimm Uachmti PC-XT Compatible inci 640 K RAM. 2 - DS/DD Disks 360 K 135 Wan Power Supply 2-RS232 Serial Pons I Parallel Pon Real Time Clock - Cal Bat Backup RAM Disk. Prml Spooler Assembled o Tested 1 Everything you need except Momtoi b Card 1 - SI. 059 2-3 S1.000 4-10 S975 20 Meg Version SI, 575 1 35 Watt Power Supply • A Dirves Power Plugs • Side Swdch Model , like IBM V Q *t7 %. PC Case with yZlT *// Hinged Top, Easy. Quick Access Fits IBM PC/XT Mother Board 2 • 4 Dirves Hardware lor Mounting Qualrtv Case — All Me 1--S79 2-3 S75 4-10 S70 Enhanced Keyboard for IBM PC, Enlarged Return Key 6 Shift Key LED Indicators on Cap's Lock El Number Keys Fully IBM Compatible 1 - S89 2-3 S85 Multifunction Card PRICE BREAKTHROUGH 2 Setial Ports Game Port Printer Port Real-Time Clock-Calendar Ram Disk Print Spooler With 384 RAM S229 3 or more S199 We also carry a complete line of PC PLUS™ Add-Ons for all IBM™ PC & Compatibles Use our TOLL-FREE Order Line Mon.-Fri. 9 am-6 pm EST. 1-800-822-1211 In PA: 215-822-7727 252 Bethlehem Pike, Colmar, PA 18915 pen COMPUTERS Blue&ki. iak. ^QUALITY COMMUNICATION SOFTWARE TERMINAL EMULATION FOR THE IBM PC • TWO COMPORTS — allows two . • BAUD RATES terminal sessions simultaneously to 9600 • EMULATES VT100 and nine other . CODE popular terminals TRANSLATION • PROGRAMMABLE by user table • MODEM support for the D.C. < PHONE directory Hayes standard e ASCII and • DOS access with a single XMODEM file keystroke transfer • ASCII - EBCDIC code translation < HELP screens • KEYBOARD DEFINITION for all USER DEFINED function keys XONXOFF • CHARACTER filtering 0AQ QC characters PLUS $3.00 FOR POSTAGE AND HANDLING TO ORDER CALL TOLL FREE — I -800-237-6360 IN FLORIDA CALL 1-800-282-1152 ASK FOR OPERATOR 222 MASTERCHARGE, VISA, CHECK OR MONEY ORDER OR write: LANG-ALLAN, INC. 2431 ALOMA AVE. SUITE 103 P.O. BOX 1341, WINTER PARK , FL 32790 (305) 677-1539 IBM and D.C. Hayes are registered trademarks of IBM CORP. and HAYES Microcomputer Products. burning out the phosphors on your monitor, get COL- BLNK1.COM or MONBLNKl.COM, which blank the color or monochrome display when no keys have been pressed for about five minutes. If you are bored with the default screen, try CL.COM, which sets the background to blue, sets the foreground to yellow, and provides a block cur- sor, KOLOR.COM, which allows you to set the foreground, background, and border colors, or CLOCK.COM, which puts a digital clock in the upper right-hand corner of your screen. CRL.COM alters the size and shape of the cursor: NOBLlNK.COM stops the cursor from blinking. GFX.COM provides a graphics driver for color screens. MACHll.EXE is a graphics editor. MONITOR.COM toggles between monochrome and color display. The set of BASIC subroutines in MONITOR. BAS helps you to format dif- ferent screen displays. AMBER.COM sets the color display to amber. EDITNQBAS formats numeric output. ZIP- CLEAR.BAS clears and SCROLL.ASM scrolls a designated screen area. RE-VIEW.LBR allows you to scroll all displays up or down. VIDEOASM provides a Pascal-callable routine for BIOS video interrupts. PC-COLOR.BAS is a color moni- tor test. OVERHEAD.BAS assists you in making overhead transparencies for display. APPLICATION SOFTWARE A large and growing body of shareware often provides an excellent alternative to commercial software. BYTE has already reviewed much of this software, but free public- domain software is also a good source for text editors, database managers, mailing-list programs, and the like. DBMS, U-MIND.BAS, EFS.BAS, and AUTOFILE.BAS are database systems. EDITXT.BASE [C], RV-EDIT.BAS, FSED.LBR, FULLEDIT.BAS, EDIT.EXE, FRED.EXE, and SCREEN.EXE are several of the text editors. PROOF- ER.BAS is a proofreader for text files that claims to learn. MAILIST2.BAS and MAILl.BAS are mailing-list programs: the first has search and alphabetic-sort capabilities, while the second sorts indexes on four fields. PIBCALCl.LBR is a programmable calculator. BIGCALC is a calculator with 100-digit precision. PC-PAD and MINICALC.BAS are spreadsheets. SPELL.LBR is a spelling checker for ASCII text files. Several utilities, including PC-LIB.BAS, PC- DISK.PAS, DC4.LBR, and DlR201.EXE, catalog your disk library. BIBLIOGHY.LBR generates bibliographies. PRG- TIM.EXE |C| keeps a log of your user time. CALCHK.EXE provides a memory-resident calendar. CAL- ENDAR.LBR has a calendar and a phone book/dialer. There is also a set of book-indexing programs, 1NPUT.EXE, SORTEXE, MERGE.EXE, and BUILD.EXE, all with Pascal source code. INDEX13.LBR creates a keyword index for text or WordStar files. TESTER.BAS is a mini course-authoring system: it creates question-and-answer files on any subject. Printer Utilities The public domain can provide you with a wide variety of print spoolers, screen-dump utilities, personalized print [continued] 48 Fall 1 98 5 B Y T E • Inside the IBM PCs Inquiry 1 08 andards Upgraded! The Models 630 And 640 Create New Dynamic Standards In Text And Graphics Resolution! A perfect upgrade/replace- ment for the standard IBM color graphics monitor and card, the Taxan model 630 and 555®create a higher resolution at a greater savfngsl IBM Display IBM CGA Color Adaptor TAXAN 630 TAXAN 555 SCG Board $924.00 $890.00 Super High Resolution Text and Grap PRICE/PERFORMANCE RATIO IBM TAXAN Screen Test— This actual unretouched photograph demonstrates the superior text resolution created by the TAXAN 630 monitor and 555 color cardl For maximum resolution and ease of viewing, Taxan's the wlnnerl Superior Text and Graphics Beyond IBM. 640(H) x 200(V) Resolution (640(H) x 400(V) Non-interlaced Resolution available!) ;► Compatible with AT&T 6300 Computer 0.37mm Dot Pitch 24.75Khz Scan Frequency 100% compatible with IBM PC XT, and AT® when used with the Taxan 555 board. S 645.00 Suggested , Retail ► The Taxan 555 is basically equivalent to the IBM standard color board. This means that the 555 is 100% compatible with all IBM softwarel COMPATABILITY IBM TAXAN Text Mode 16 Colors 16 Colors 320 X 200 4 Colors 4 Colors 640 X 200 I Color I Color Alphanumeric Text Resolution Character Sell SX8 10X16 Scan Frequency 15.75 Khz 24.75 Khz RGB Color, and FOUR Monochrome Capabilities in One Monitor! r No one else offers the monochrome options available with the new Taxan 600 serlesl The Taxan 630 & 640 moni- tors offer Green, Amber, B&W Reverse, and a White on Blue Background as their total spectrum of mono- chrome options. Only Taxan offers such a wide variety of mono- chrome capabilities. - REVERSE BLUE ;ftXJWTrwft«TflxftKr(W ftKTflxw . ; ,'M«TM»nflXlWTMI*T«W(7i ItfllWTMnKTflKMTfiKflHTMWITi r.tfJWTMWTftiANWf*TIU«l Total CAD/CAM Compatibility 720x400 Resolution! The Taxan 640 The Ultimate In Monitor Resolution. 640(H) x 400(V) Non-interlaced Resolution 4,000 Character Display Capability 0.31mm Dot Pitch 24.75Khz Scan Frequency t> Compatible with AT&T 6300 Computer 100% Compatible with the new generation of graphics boards Taxan (555), Persyst B.O.B.®, Sigma 400®, Artist m STB 400® and others for the IBM PC, XT, and AT. $745.00 Suggested Retail ^^«"-— -V""" 'O o\ TAXAN CORPORATION 18005 CORTNEY CT., P.O. BOX 8698, CITY OF INDUSTRY, CA 91748 (818) 810-1291 ® 1985 Taxan corporation Inquiry 195 for End-Users. Inquiry 196 for DEALERS ONLY. ■IBM. IBM PC, XT and AT are registered trademarks or International Business Machines Corp., 'APPLE is a registered trademark of Apple Computers Inc., TAXAN 555 is a registered trademark of Taxan Corp., 'PERSYST B.O.B. Is a registered trademark of Emulex Corp., 'SIGMA 400 is a registered trademark of Sigma Designs, 'ARTIST II is a registered trademark of Conrrol Systems, *STB 400 is a registered trademark of STB Systems, Inc. I \ E-Z-DOS-IT Processing Power of 4 Computers For $59*95 ! No Copy Protect mm A>\ Lotus' " ChmmB femevw"' Symphom ; III) &>. With E-Z-DOS-IT™ Concur- rent Processing, your PC, PC/XT, or PC/AT can pro- cess up to four programs simultaneously. For example, communicate in the back- ground while you are work- ing at the screen. Ideal for PCs with 256K or 320K of memory. And E-Z-DOS-IT is compatible with the most popular software on the mar- ket, and it only takes 8K of RAM! To Order Call: USA 1-800-228-9602 CA 1-800-423-5592 Ask for Operator #24 SHAMMER Redefining Your PC Productivity. Hammer Computer Systems, Inc. 900 Larkspur Landing Circle, Suite 250 Larkspur, CA 94939. SEND ME E*Z-DOMT Na Company Name_ Address City_ State. . Zip_ For DOS 2.0/2.1 @ 59.95 For DOS 3.1 @ 79.95 Subtotal: California Residents add 6% Shipping @ $6.00/copy Total Method of payment: VISA MC BANK DRAFT CHECK Account # Exp. Date Signature (COD's &. purchase orders will not be accepted). Allow up to 6 wks. for Delivery HAMMER COMPUTER SYSTEMS, INC., 900 LARKSPUR LANDING CIRCLE, #250 LARKSPUR, CA 94939 OP 24 PUBLIC-DOMAIN UTILITIES routines, label makers, print formatters, and programs to set the parameters of your printer. There are many versions of print spoolers. MSPOOL- 2. COM, for example, allows spooling of up to four printers simultaneously, supports both parallel and serial printers in any combination, has a user-definable buffer up to 63 K bytes in 7K-byte chunks, and permits the immediate cancellation of ongoing print jobs. Other spoolers include SPOOLERl.COM for monochrome display cards and SPOOLER2.COM for color display QSPOOL.COM provides a print spooler for those with a Quadram board. Many programs dump screens and graphics to the printer. GRAFTRAX.COM, for example, permits screen dumps for Epson, NEC, and C Itoh printers. GDUMP dumps medium-resolution graphics to the C ltoh 8510 and the NEC 8023. OKIDUMP.COM converts graphics for Oki printers. PRINTGR1.BAS and PRINTGR2.BAS print medium- and high-resolution graphics upright and sideways. QU1K- GRAF.EXE allows those with color graphics cards to use their printers to make graphs. FASTPRT.COM speeds the print-screen function, and SER1AL.BAS allows the PrtSc key to function with a serial printer. If you have recently purchased a new printer, there are several programs that aid installation. 1BMPRINT.BAS and EPSON. BAS set options from a menu for Epson printers; FX_SETUP.BAS and SETPRTRC can set the options for your FX-80 and MX-80. The first of these can also load user-defined characters. CPRINT.BAS and GPRINTBAS do the same for the C. Itoh 8510 and some IBM printers, re- spectively. GEMINI. BAS works for Gemini printers. Word- Star users may find useful DM. BAS and LQ.BAS, which set up dot-matrix and letter-quality printers under WordStar. There are a variety of other utilities. TWRITE.COM turns your PC into a typewriter. PRINTBAS and NICELISTBAS print ASCII files with title banners and page numbers. PRINTNECBAS functions like PRINTBAS for the NEC 8023 and the C. ltoh 8510. NECLABEL.BAS and LABELS.BAS print mailing or other types of labels; the first of these works for the NEC 8023A. SPOOLDSK.LBR and VPRINT.COM redirect printer output to a disk file, a useful program if you have an application that will print specific formats but will not save them to the disk. SERIAL.BAS routes printer output to the serial port. SWAPPRTS.LBR and LPT12SETBAS toggle between LPT1 and LPT2. QSWAP.COM does the same thing for those with Quad- ram boards. ADDRFLCDBAS and 3BY5.LQR allow you to print text on 3 by 5 cards. BANNER. BAS prints sideways banners. COVER. LBR prints directory summaries in con- densed print for disk jackets. Telecommunications Not surprisingly, there are numerous communication sys- tems in the public domain, and virtually every bulletin board and users group can provide you with sufficient capabilities to send and receive files, to set up your PC in terminal mode, or to act as a host computer. (continued) 50 Fall 1985 BYTE • Inside the IBM PCs Inquiry 78 let David Rose tell you about our powerful new ProKey 4.0. David Rose, inventor of ProKey, Spend 2 minutes learning how to add a powerhouse of function to your keyboard with a terrific new version of ProKey! "Suddenly others have discovered what RoseSoft has known since we invented the ProKey concept. If your keyboard could work a whole lot harder, your life would be a whole lot easier. The original idea behind ProKey was a program that would let you store strings of keystrokes you could recall at a touch. Now there's ProKey 4.0 and it's better than ever. " ProKey 4.0 keyword macros unsnarl PC use. "If you're a serious PC user, you probably use a variety of software programs. Spreadsheet. Word processing. Database. Communications. Plus the special-function programs you use to run your busi- ness or department. And all these programs have different complicated commands that are tedious to type and easily forgot- ten. How much easier life would be if all you needed to operate your program was a small vocabulary of sensible words. Want to log onto Dow Jones with your communi- cations package to check on how your IBM stock is doing? Just type the keyword you previously selected for this function, "IBM" . Need to print a profit and loss statement? Typing "p&l" is all it takes. Behind the scenes, ProKey 4.0 checks its memory for the string of commands required to carry out the task and executes them automatically. Forgotten what functions you have available? Just call up the built-in menu that describes them in plain English. Need to add a function? Enter the commands. Enter a description. Store them both away without leaving the program you're working with. Built-in editing, English language menus, multi- character macro names and the ability to instantly change sets of functions. These are just four of the exciting new features that make ProKey 4.0 the most powerful macro processor you can buy." ProKey 4.0 lets you customize your keyboard. "Only ProKey has the unique Layout program that lets you redesign your keyboard to correct design flaws the manufacturers built in. You can change the location of any key, create a DVORAK layout, or make a duplicate set of arrow keys away from the keypad." ProKey Is the Industry Standard. "ProKey has all the features you need to make your life a whole lot easier. And RoseSoft has three years experience supporting customers who use macros. Including over 80% of the Fortune 100. Don't be misled by the recent claims of ProKey imitators; they're comparing themselves against old versions of ProKey. The choice is simple. Do you want an unknown, untested product in its first generation, or ProKey 4.0's power and features? The difference in price will hardly pay for dinner. The difference in performance is like night and day. " ProKey 4.0 runs on IBM and other compatible MS-DOS computers, and works with 99% of the soft- ware they use. $130 suggested retail price at software dealers everywhere. Or call RoseSoft. (206) 524-2350. seSofr 4710 University Way N.E. Seattle, WA 98105 (206) 524-2350 Inquiry 174 introducing the Western m Newest Compatible in the Personal Computer Market!!! By the OEM Manufacturer of the Most Advanced IBM PC Compatible — The "Western PC Turbo." PUBLIC-DOMAIN UTILITIES Some Outstanding Features ^ rv-§t\ r? of the "Western at": $ 279 5. ■ 6MHz or Optional 8MHz CPU ■ Up to 1MB RAM on the Mother Board ■ 16MB in System Protected Virtual Address Mode. ■ 8 I/O Expansion Slots English and more, from 8 to 24 points come standard with Fancy Font. FLEXIBLE. Fancy Font comes with a complete set of over 1500 mathematical, foreign language and other special symbols. Hundreds of additional fonts in sizes from 6 to 72 points are available, at a nominal additional charge, from our growing font library. You can edit any character and also create your own characters or logos, up to 1 inch by 1 inch. Powerful formatting features let you center, justify, wordwrap and type flush left or right, with or without running headers and footers — even with different fonts and sizes on the same line. COST EFFECTIVE. You buy Fancy Font from your local dealer or direct from us, the software developers, for only $180. You get near typeset quality at a small fraction of the time and cost of using art or typesetting services. Fancy Font runs on PCDOS, MSDOS and CP/M systems with Epson, Toshiba and compatible dot matrix printers. You'll be turning out great looking reports, newsletters, presentations, letters, mathematical texts, overheads or invitations after getting your copy of Fancy Font. The applications are limited only by your imagination. Call or write now to order Fancy Font or ask for additional information including actual samples and independent reviews. CALL TODAY 1-800-351-0500 MasterCharge »nd Visa Accepted SojftCraft, Inc. 222 State Street, Madison, WI 53703 (608) 257-3300 $cvncu$&7if is a registered trademark of SoftCraft, Inc. executed 30 inter-register moves in a line: MOV BX.AX This line of 30 moves executed 3.96 times faster on the 9.54-MHz 8086/ 8087 board. When we examined in- dividual instructions with a logic analyzer, the ratio turned out to be 4.0 for individual moves. For those in- terested, the MOV instruction is 2 bytes long and executes internally in two cycles— 420 nanoseconds (ns) in the case of the PC and 210 ns in the case of the 9.54-MHz 8086/8087 board. However, fetching in 2 bytes of code takes 1680 ns for the PC but only 420 ns for the 9.54-MHz 8086/ 8087 board. Since the moves take place in much less time than the fetches, this instruction is fetch (I/O) limited, Q.E.D. This is a good example of the classic von Neumann bottleneck: A pro- cessor's execution speed can be limited to the time required to fetch instructions from memory. The other interesting situation that the logic analyzer pointed out is that the in- crease in speed is a strong function of the state of the prefetch queue. As we reduced the number of MOVs in our loop, the speedup was reduced because of the fact that the processor would have to refill the queue at the end of every loop. As the number of MOVs approached zero, the speedup approached 2 because the LOOP in- struction is a long-running register- bound operation. From benchmarking average non- numeric programs we know that the average 9.54-MHz 8086/8087 board speedup is a factor of 3 and is com- posed of operations that run any- where from a factor of 2 to a factor of 4 faster. The question now arises: What kind of speedups should be ob- tained from 8087 code? At first glance, one would expect 8087 code to be limited by the increase in clock speed. Most 8087 instructions take at least 100 cycles to execute and are dominated by the time it takes the 8087 ALU to perform floating-point arithmetic. Even 8087 operations that (continued) 74 Fall 1985 BYTE- Inside the IBM PCs NOTHING I It WN. Even the best of personal computers can have a bad day. Blackouts happen. Usually at the worst possible time. But power interruptions don't need to be business interruptions. And lost power shouldn't result in lost data. Not with the POWERMAKER® Micro UPS from Topaz. Designed specifically for hard disc and critical-use business systems, Powermaker Micro UPS ensures a continuous supply of smooth sine wave power even during a total blackout. And there's more. Powermaker Micro UPS also removes spikes and other error-producing transients from incoming power, protecting your PC's sensitive circuitry. So, if your PC needs a little help once in a while, give it Powermaker Micro UPS protection. For nothing down. Call us today at (619) 279-0831, or contact your local Square D distributor. Inquiry 199 for End-Users. Inquiry 200 for DEALERS ONLY. TOPAZ SQUARE f| COMPANY Fall 1985 BYTE • Inside the IBM PCs • 75 8087/80287 PERFORMANCE load or store numbers spend at most 30 percent of the time doing I/O, in- dicating that 8087 operations on average ought to be register-bound. One of the most number-intensive benchmarks available, the Savage, is a good test of the ability of the 8087 to perform trigonometries and tran- scendental functions. Our intuitive feeling about 8087 code being regis- ter-bound is borne out by the Savage benchmarks in table 2. This table in- dicates that the best (fastest) Savage benchmarks run 2.14 times faster on the 9.54-MHz 8086/8087 board than on an 8087-equipped PC Row 2 contains the times for BASCOM, the IBM BASIC COMPILER. The fact that the compiler speeds up the calculation by only a factor of 5 Table 2: The Savage benchmark results for the IBM PC, in both a standard configuration and with an 8086/8087 board for testing the 8086. SAVAGE BENCHMARK IBM PC (time in seconds) Frequency of 8088/8086 Standard PC 9.54-MHz 8086/8087 board 4.77 MHz 4.77 MHz 9.54 MHz 9.54 MHz Frequency of 8087 MHz 4.77 MHz MHz 9.54 MHz (1) BASICA (no 8087) 891 — 757/318* - (2) BASCOM (no 8087) 169.5 — 64.7 — (3) 87BASIC (with 8087) — 5.74 — 2.53 (4) 87BASIC Inline compiler (with 8087) 3.35 1.56 (5) True BASIC 160 10 — 35 (6) BetterBASIC 873 12 — 5.2 (7) Professional BASIC 420 15 335 6 (8) MS FORTRAN — 6.92 — 3.26 (9) Ryan-McFarland FORTRAN — 3.85 — 1.81 (10) 1-2-3 Retrieval Recalculation 23 374 — 12 177 (11) 1-2-3 with 8087 support Retrieval Recalculation 23 10.2 12 4.8 (12) Symphony 1.1 Retrieval Recalculation 478 25 17.5 — 14 10.2 FAST ROM enabled over the interpreter indicates that Savage really bogs down BASCOM with arithmetic (comparisons for other programs will generally show that compiled BASIC usually runs a factor of 10 to 30 faster than BASICA). Neither row 1 or 2 used an 8087. Rows 3 and 4 show results for 87BASIC and 87BASIC Inline. Com- paring rows 2 and 3 demonstrates that the first-generation code makes a 30 to 1 improvement for the bench- mark on the PC. We deduce this by comparing the 169 seconds for BASCOM running on a PC without any 8087 to the 5.74 seconds of 87BASIC and the 3.5 seconds of Inline. Rows 5, 6, and 7 give the times for three other well-known BASICS: True BASIC, BetterBASIC and Professional BASIC. These other products include 8087 support, but their forte lies in other areas such as easy debugging, modularity, large arrays, or incremen- tal compilation. Even though they are compiled BASICS, they compile to p-code instead of in-line native code. In general, to really get the true speed of an 8087 requires efficient code, and p-code is just not that efficient. Lines 8 and 9 are the times for two of the more popular FORTRANs, Microsoft 3.3 and Ryan-McFarland 1.0 (both are also separately marketed by IBM). The Savage benchmark is more dependent on the quality of the trigonometric and transcendental libraries of the compiler being checked than the efficiency of the code that links library calls together. Spreadsheet Benchmarks There are two different kinds of prob- lems spreadsheet users encounter. The first involves recalculating work- sheets that contain many tran- scendental and financial functions, such as NPV or IRR. The second in- volves recalculating worksheets that are filled up with cells that contain financial information but that are at best connected by formulas that in- volve the four simple numeric opera- tions. To analyze the relative perfor- mance of these sheets with different processors, we again fell back onto (continued) 76 Fall 1985 BYTE- Inside the IBM PCs _ ( - je . .. _,,■„»,«. ■HIT PERSONAL COMPUTER PHOTOCOPIER Have you ever wished that there was a machine for your PC that could scan your photographs, artwork or documents just like a photocopier? And was as easy to use and understand? As well as copy and store in color or black-and-white onto your hard drive for editing? Well, there is such a machine now. It's called the SpectraFAX digital photocopier We got tired of trying to use digitizing tablets, cameras, mice and everything else that has been invented. The SpectraFAX machines will scan any and all of your art, photos, forms or text for storage in your PC. Images that you can cut-and-paste into your word processing or database programs. Our SpectraFAX 200 will scan and store your color or black-and-white images for editing and printing at resolutions up to 200 dots per inch. Then the SpectraFAX Graphics Editor software that we bundle with the scanner will allow you to cut-and-paste your images, rotate them, enlarge and reduce whatever pictures you choose. That's not all. Our digital photocopiers are based on open-architecture design, which means that as new uses for this technology develop, add-on cards can enhance our SpectraFAX digital photo- copier. But we didn't want to wait for third-party vendors, so we invented two optional boards of our own: the SpectraFAXimile™ Card and the SpectraFAX TEXreader™. The SpectraFAXimile card takes advantage of the 200 dots per inch resolution of the scanning device to turn it into a facsimile machine, compatible with all Group II and Group III facsimile machines worldwide. The TEXreader board is a revolution in itself — full- scale OCR (optical character recognition) to read typewritten pages with the SpectraFAX machine into your word processor without having to re-type what somebody else has already typed. What's most amazing about the SpectraFAX product line, though, are the prices. Our digital photocopiers cost about the same as a regular office copier. Because we know high tech has to be affordable. Spectralj^Mcorp. 2000 Palm Street S. • Naples, Florida 33962 • (813)775-2737 b ft Q. u §S L^i lu ^-* 5 &* t; ° 5 S £ *" *3 TO t5 - y $ £ 8. fe 5 ^ E I W: t5 "O a ro 1 §.2 & x x £ < < to. U- U- ^ TO TO 1 1 8 Inquiry 185 Fall 1985 BYTE- Inside the IBM PCs • 77 8087/80287 PERFORMANCE two benchmarks, the Savage and a simple expression of constants evaluated 2500 times. Megalopolis. Because the time required to go from cell to cell is much less than the time required to evaluate the Savage function, Savage results for spread- sheets with 8087 support can ap- proach that of good compilers. Lines 10, 11, and 1 2 of table 2 are the times for Savage run on 1-2-3, 1-2-3 with 8087 support, and Symphony 1.1 with 8087 support. Two quick observa- tions: 1-2-3 seems to be tighter than Symphony and as a result is a better candidate for 8087 support. 8087 support for 1-2-3 improves Savage by a factor of 36.66, while Symphony 1.1 runs the Savage 27.3 times faster when run with an 8087. The Savage is the ultimate 8087 benchmark in that it is so number- intensive that it can make even ineffi- cient compilers look good, provided Table 3: The Common Subexpression and Megalopolis benchmark results for the IBM PC and the IBM PC with the 8086/8087 board. COMMON SUBEXPRESSION BENCHMARK IBM PC (time in seconds) Frequency of 8088/8086 Standard PC 9.54-MHz 8086/8087 board 4.77 MHz 4.77 MHz 9.54 MHz 9.54 MHz Frequency of 8087 MHz 4.77 MHz MHz 9.54 MHz (1) BASICA (no 80287) 862 — 769/274* — (2) BASCOM (no 80287) 53.17 — 18.92 — (3) 87BASIC (with 8087) — 27.29 — 10.11 (4) 87BASIC Inline compiler (with 8087) 4.73 2.16 (5) True BASIC 74 48 — 17 (6) BetterBASIC 310 93 - 42 (7) Professional BASIC 1023 129 320 53 (8) MS FORTRAN — 5.92 2.9 (9) Ryan-McFarland FORTRAN — 5.1 — 2.62 MEGALOPOLIS BENCHMARK (2) 1-2-3 (no 8087) 15.9 — 6.9 — 1-2-3 with 8087 support — 7.8 _ 3.3 Symphony 1.1 21.2 16.2 8.3 6 * FAST ROM enabled they have good run-time libraries. Table 3 compares the ability of the same BASIC compilers, FORTRANs, and spreadsheets to evaluate expres- sions. The spreadsheets were com- pared with a single worksheet that added, subtracted, multiplied, and divided four constants and was repeated 2 500 times. We call this Megalopolis because it is typical of the kinds of long-winded sheets that end up accumulating when inexperi- enced users keep adding cells to their first and only worksheet (a real prob- lem, I am told). Looking at the results for 1-2-3 (15.9 seconds) and 1-2-3 with 8087 support (7.8 seconds), we see that there is only a factor of 2 increase associated with adding an 8087. Looking at the results for Symphony 1 . 1 , we see that adding an 8087 makes an improvement of only 30 percent. Megalopolis is actually a little severe. Normal use seems to deliver speed- ups of between 3 to 1 and 10 to 1 and higher. What this says is that most worksheets incorporate at least a few of the built-in 1-2-3 functions or a lot of built-in functions. In general, the larger the number of built-ins called, the greater the speedup. The BASICS and FORTRANs were compared running 10,000 loops of an expression that has three common subexpressions repeated three times each. This benchmark was clearly de- signed to highlight the use of the 8087 stack. The more use a product makes of the stack, the faster it will run this benchmark. True BASIC does the best of the p-code compilers in both this and the Savage. It should be pointed out that the stack could also be used to hold "hot" global vari- ables, an optimization not being done by any of these compilers but that is a normal technique employed by as- sembly-language programmers. In this benchmark we intended to force the compiler to generate a lot of long-lived temporaries, which in a good compiler will end up on the 8087 stack. We did this using com- mon subexpressions. However, a good compiler evaluates a common subexpression only once, and it is [continued) 78 Fail 1985 BYTE- Inside the IBM PCs KfS^Bk AT ™ Pfantasies for your PC or XT.™ Want better speed and memory on your PC or XT without buying an AT? You've got it! Phoenix's new Pfaster™286 co-processor board turns your PC or XT into a high- speed engine 60 percent faster than an AT. Three times faster than an XT. It even supports PCs with third-party hard disks. But that's only the beginning. You can handle spreadsheets and programs you never thought possible. Set up RAM disks in both 8088 and 80286 memory for linkage editor overlays or super-high-speed disk caching. All with Pfaster286's lmb of standard RAM, expandable to 2mb, and dual-mode design. You can develop 8086/1 86/286 software on your XT faster. Execute 95 percent of the application packages that run on the AT, excluding those that require fancy I/O capabilities your PC or XT hardware just isn't designed to handle. Queue multi-copy, multi-format print jobs for spooling. Or, switch to native 8088 mode to handle XT and AT arc trademarks of International Business Machines Corporation. PI'a.ster2Ko and Programmers' Pfantasies arc trademarks of Phoenix Computer Products Corporation. For ihe Ferrari aficionado: yes, we know tilts is a rear engine car. We are showing the addition of a second engine to symbolize how Pfasler can be added to your PC or XT to increase performance. SEE US AT FALL COMDEX Inquiry 151 Fall 1985 BYTE- Inside the IBM PCs • hardware-dependent programs and back again without rebooting. All with Pfaster286's compatible ROM software. And, Pfaster286 does the job unintrusively! No motherboard to exchange. No wires to solder. No chips to pull. Just plug it into a standard card slot, and type the magic word, "PFAST" If you really didn't want an AT in the first place, just what it could do for you, call or write: Phoenix Computer Products Corp., 320 Norwood Park South, Norwood, MA 02062; (800) 344-7200. In Massachusetts, 617-762-5030. Programmers' Pfantasies™ by 79 8087/80287 PERFORMANCE possible that some of the BASICS (we know this is true of BASICA) may not have performed this optimization, thus contributing to the discrepancies between the p-code compilers. On the other hand, RM/FORTRAN clearly added an optimization that we didn't expect, forcing us to change our benchmark so that RM/FORTRAN would generate 8087 code that was evaluated in the loop, RM/FORTRAN discovered that the variable A was loop invariant and could be moved ahead of the loop, thus effectively eliminating the entire execution time associated with repetitively evaluating the expression. Interpreting 80287 Benchmarks The 80287 is the coprocessor de- signed to work with the 80286. It is identical to the 8087 from the stand- point of how you write programs to run it, except for the issue of identi- fying that there is a coprocessor in the system. At least one product with automatic 8087 sensing does not work with the 80287 as a result of this difference. To understand the perfor- mance-related issues that determine whether or not you should add an 80287 to your PC AT, it is necessary to first look at the 80286 and the in- terface between the 80286 and the 80287. The 80287 also adds a new feature to the processor/coprocessor system: It can be used with an op- tional asynchronous clock that can be used to speed up the 80287 ALU. The 80286 is an upgraded version of the 8086 that is designed for use with multiuser and multitasking operating systems. It has two modes of operation, real and protected, and is substantially faster than the 8086. The added speed is obtained by in- creasing the amount of parallelism in the 80286; it has four internal units that each independently do a piece of the total processing job, in com- parison to the two independent units of the 8086. In protected address mode the 80286 can address 16 megabytes of memory and manage a virtual address space of a gigabyte. In real address mode, it emulates an 8086, addressing a megabyte. Most of the programs and operating systems currently in vogue work in the real ad- dress mode only and do not use either of the extended addressing capabilities of the 80286. The 80286 is a substantial upgrade of the 8086 in all respects except the interface to the 80287. In the 8086/ 8087 pair, the 8086 and 8087 each have their own B1U (bus interface unit) that allows either processor to inde- pendently acquire data from the sys- tem. When an 8087 gets passed an (continued) BACKUP YOUR SOFTWARE WITH LOCKSMITH/PC™. You needn't feel helpless when a copy- protected program disk fails. Keep on working... with backups. LOCKSMITH, the original backup/copy program that took the Apple world by storm, is now available for the IBM/PC and compatibles. LOCKSMITH/PC features: • Backup protected software • FAST unprotected disk backup • HARD DISK support • Disk, track and sector utilities • File and directory utilities • Easy to use • Fast mass-duplication for software developers • Create "protected" diskettes • Repair damaged disks • Map disk & file allocation • Compare files • Easy-to-use tutorial • Examine/modify sector data • File encryption/decryption Don't get caught with your hands tied. Order LOCKSMITH/PC today. LOW INTRODUCTORY PRICE $79.95 for IBM/PC, PC/XT, PC jr and compatibles. LOCKSMITH/PC is NOT copy-protected. Available from your computer dealer or directly from: w Alpha Logic Business Systems, Inc. 4119 Morth Union Road Woodstock, IL 60098 (815)568-5166 f-J Hi c, Aipha Logic Business Systems, Inc. 1985 Locksmith and Locksmith/PC are registered trademarks of Alpha Logic Business Systems, Inc. 80 Fall 1985 BYTE- Inside the IBM PCs Inquiry ll Now Showing In Black And White If you own an IBM-PC or PC work-alike, Roland's new MB-142 monitor lets you show off your text and graphics in today's hottest colors- black and white. That's right! The MB-142 gives you black characters on a paper-white background- just like people have been reading for centuries. You can also have white char- acters on a black back- ground with just the touch of a button. Both of these black and white display formats are easier on the eyes and less fatiguing than the green or amber phosphor used in standard monochrome monitors. The MB-142's large 14-inch screen, com- bined with its ultra-high 720 x 350 resolution, can display characters that are larger and more legible than what you can get with ordi- nary monochrome monitors. Another great plus is that the MB-142 plugs directly into the monochrome board of your IBM or com- patible—just like your pres- ent monochrome monitor, with nothing more to buy. Because of the MB-142's advanced electronic cir- cuitry, you even have the ability to mix graphics and text on the same display when using graphics and text boards from leading manu- facturers such as Persyst, STB, Paradise, Hercules, AST and many others. What makes it all possible? The same sophisticated technology used in color monitors. the MB-142 supports all the winning cards ush a button for instant reverse for business, black and white makes more sense than green and black the big difference is 1 that the MB-142 monitor does the job for significantly less money. The MB-142 is designed to interface economically, too. Imagine seeing your favorite business graphics or CAD/CAM packages, such as Lotus 1-2-3, Ener- graphics, Chart-Master, AutoCAD, CADDraft and VersaCAD, in ultra-high resolution black and white. Also, take full advantage of your pro- gram's windowing capability using the large 14-inch screen. Take a good look at the differences that set the MB-142 apart from the rest. No other monochrome monitor gives you the fatigue-free black and white viewing, text and graphics capabilities and easy interface. Naturally enough, the MB-142 is from Roland DG-the new computer peripherals company that's pointing the way to the future. Look for this and other Roland products at fine com- puter dealers everywhere. For more information, contact: Roland DG, 7200 Dominion Circle, Los Angeles, CA 90040. (213) 685-5141. The software programs listed are trademarks of the following companies: AutoCAD, AUTODESK, Inc.; CADDraft, Personal CAD Systems, Inc.; Chart-Master, Decision Resources, Inc.; Energraphics, Enertronic Research, Inc.; Lotus 1-2-3, Lotus Develop- ment Corp.; VersaCAD. T&W Systems, Inc. Roland DG /nquiry 173 Fall 1985' BYTE • Inside the IBM PCs • 81 8087/80287 PERFORMANCE instruction, it uses its BIU to compute the addresses of operands and then generates the required signals to load or store the specified operands. While the 8087 is doing this, the 8086 is free to execute other instructions, includ- ing ones that access memory. The 80286 substantially compli- cates this scenario. It has a memory- management unit (MMU) that is made up of two of the four 80286 processor units. Duplicating the 8086/8087 inter- face with the 80286 processor would have required a second MMU on the 80287. However, duplicating an MMU on the 80287 would have been a much bigger task than placing the BIU on the 8087. The designers of the 80286/80287 therefore opted for an I/O arrangement for passing op codes and data to the 80287. This interface is implemented with several dedi- cated ports on the 80287 that are fed by a dedicated DMA (direct memory access) channel on the 80286. The first word of every 80287 op code tells the 80287 how many (if any) words of data will follow. Once the 80287 has decoded its op code, it waits for its operands and then goes and performs the desired operation. One of the conclusions we draw from our benchmarks is that both pro- Table 4: The Savage benchmark results for the IBM PC AT running at 6 and 9 MHz. The 80287 runs at 4, 6, and 8 MHz. SAVAGE BENCHMARK IBM AT (time in seconds) Frequency of 80286 6 MHz 6 MHz 6 MHz 6 MHz 9 MHz 9 MHz 9 MHz Frequency of 80287 MHz 4 MHz 6 MHz 8 MHz MHz 6 MHz 8 MHz (1) BASICA (no 80287) 303 — — — 196 — — (2) BASCOM (no 80287) 44.76 — — — 29.2 — — (3) 87BASIC (with 80287) — 5.55 4.16 3.85 — 3.68 3.14 (4) 87BASIC Inline compiler (with 80287) 3.46 2.42 2.2 2.31 1.87 (5) True BASIC 50 50 50 50 32 32 32 (6) BetterBASIC 29 7 6 5 150 5 4 (7) Professional BASIC — 9 7 7 — 6 5 (8) MS FORTRAN — 6.39 5.18 4.58 _ 4.24 3.62 (9) Ryan-McFarland FORTRAN — 4.15 3.15 2.64 — 2.77 2.28 (10) 1-2-3 Retrieval Recalculation 123 104 84 68 (11) 1-2-3 with 80287 support Retrieval Recalculation 27 8.4 24 7 24 6.8 22 5.5 21 5.1 (12) Symphony 1.1 Retrieval Recalculation 119.9 38 12 37 11.2 36 10.8 78.3 23 8 24 7.5 82 Fall I985 BYTE- Inside the IBM PCs 8087/80287 PERFORMANCE cessors get tied up during the inter- face procedure and that for fast ex- ecuting 80287 instructions the inter- face time is a substantial percentage of the total execution time. To help compensate for this loss in parallelism, the designers of the 80287 decided to incorporate an op- tional asynchronous clock that could be "turned up" when faster 80287s became available. To take advantage of this feature requires the computer manufacturer to build in an asyn- chronous clock. Since IBM and other manufacturers did not. I developed a card that allows the user not only to run an 80287 asynchronously but also to increase the clock speed as better 80287s are made available by Intel. Without such a card, the 80287 in an AT does arithmetic at 4 MHz. With the card, the speed of the 80287 ALU can be increased up to 8 MHz or higher. In all the benchmarks in this article 1 give AT figures for the 80287 running at 4, 6, and 8 MHz. Tables 4 and 5 are the Savage. Com- mon Subexpression, and Megalopolis benchmarks run above for the PC AT board. We now start to examine the bizarre side of the 80287. Looking at the second and third rows in the Com- {continued) Table 5: The Common Sube\ speeds. Frequency of 80286 'pression am 6 MHz Megalopolis COMMON SL 6 MHz benchmark r BEXPRESSIC IBM AT (time in secor 6 MHz esults for the )N BENCHM/ ds) 6 MHz IBM PC A] kRK 9 MHz " running at 9 MHz a variety of clock 9 MHz Frequency of 80287 MHz 4 MHz 6 MHz 8 MHz MHz 6 MHz 8 MHz (1) BASICA (no 80287) 304 — — — 195 — — (2) BASCOM (no 80287) 18.34 — - — 11.12 — — (3) 87BASIC (with 80287) — 17.9 15.38 14.66 — 11.81 10.71 (4) 87BASIC Inline compiler (with 80287) 5.82 4.23 3.79 3.9 3.25 (5) True BASIC 24 24 24 24 16 16 16 (6) BetterBASIC 228 43 39 39 58 29 27 (7) Professional BASIC — 63 54 53 — 39 36 (8) MS FORTRAN — 7.2 5.73 4.86 — 4.79 4 (9) Ryan-McFarland FORTRAN — 6.51 5.05 4.32 — 4.33 3.6 (1) 1-2-3 Recalculation 5.3 MEGALC )POLIS BEN! :hmark 3.5 (2) 1-2-3 with 80287 support Recalculation 3.8 3.6 3.5 2.4 (3) Symphony 1.1 Recalculation 7 5.9 5.6 5.5 4.4 3.7 — Fall 35 BYTE • Inside the IBM PCs 83 8087/80287 PERFORMANCE mon Subexpression benchmark results (table 5), we notice that the IBM BASIC compiler code running on the AT takes 18.34 seconds and that 87BASIC took 17.9 seconds. Put an- other way, adding a 4-MHz 80287 in- creased the speed by only 2.4 per- cent. Examining the 6- and 8-MHz times, we see that even doubling the 80287 clock results in only a 25 per- cent speed improvement over the unaided compiler in line 2. The 9-MHz times show that the unaided 80286 running at 9 MHz is actually faster than a 9-MHz 80286 running with a 6-MHz 80287. We did not include a sample bench- mark that slows up when an 80287 is added to an AT. However, such pro- grams exist and typically perform little floating-point arithmetic. What they actually do is use the 80287 for mak- ing floating-point comparisons. It turns out that the old Microsoft binary representation for floating-point numbers is more convenient for com- paring numbers than the IEEE format. Consequently a BASCOM program whose floating-point time is domi- nated by comparisons runs faster if the comparisons are done in the 80286 than if they are done in the 80287. For compiler writers who like to keep all their floating-point routines running on the same processor, it means there is now a reason to con- sider writing special code for the AT that uses the 80286 for floating-point comparisons. However, I don't think you'll ever see anyone wasting time on this project. Other bizarre results include the Megalopolis result for Symphony 1.1; adding an 80287 im- proved this benchmark by only 18 percent on an AT. Again, increasing the 80287 speed to 8 MHz only in- creases the 18 percent speedup to 27 percent. To understand these results we have to examine the relative speeds of the two processor sets that we are comparing. To explain the small or nonexistent speedups observed when an 80287 is added to an AT and run with ineffi- cient code, we have to look at the relative power of the processor com- binations at doing floating-point arithmetic. If we add an 8087 to a PC and get a factor of 3 speedup, this tells us that the 8087 does floating- point arithmetic in hardware three times faster than an 8088 using soft- ware. If we now take the same pro- gram and run it on a machine with a slower numeric processor and a faster main CPU, the speedup upon adding the numeric processor will be less significant. This is exactly what hap- pens in the AT. The 80286 is three times as fast as an 8088 at doing arithmetic, and this makes the slight- ly slower 80287 look much less effec- tive at speeding up programs. A pro- gram that gives us a factor of 36 (continued) Table 6: The FORTRAN army-manipulations benchmark results for both the PC and the AT. MS FORTRAN ARRAY-MANIPULATIONS BENCHMARK (kiloflops) Small Memory Model, lnteger*2 Frequency of processor IBM 4.77 MHz PC 9.54 MHz 6 MHz 6 MHz IBM PC A 6 MHz r 9 MHz 9 MHz Frequency of coprocessor 4.77 MHz 9.54 MHz 4 MHz 6 MHz 8 MHz 6 MHz 8 MHz Subroutine 1 One dimension 13.7 32.2 13.9 17.8 20 21 24.6 Subroutine 2 Two dimensions 5.9 14.4 11.85 14.16 15.2 17.8 20.4 Subroutine 3 Three dimensions 2.8 6.6 8.4 9.06 9.4 12.7 13.5 Large Memory Model, lnteger«2 Subroutine 1 One dimension 8.3 21.3 12.5 14.9 16.5 18.9 21.3 Subroutine 2 Two dimensions 4.5 11.2 10.7 11.8 12.5 16.1 17.5 Subroutine 3 Three dimensions 1.7 4.1 5.5 5.6 5.8 8.2 8.5 84 Fall 1985 BYTE- Inside the IBM PCs PROVEN! PC/FOCUS outloads, outruns, outperforms and outreports dBase III ™ and R.Base ™ 5000. Don't believe us. Believe National Software Testing Laboratories of Philadelphia. They proved PC/FOCUS to be clearly superior to dBase III™ and R.Base™ 5000. Here's how: Several real-world, business situations were created to examine each system's speed and capability. Their findings are published in an extensive report now available to you free of charge. Their results, as stated by NSTL, showed that. .."PC/FOCUS was faster overall than the other programs tested!' For example... Database Loading: In this test series, database loading time for each DBMS was measured by loading three transaction files. Eight separate test runs were conducted, with PC/FOCUS averaging 20.2% faster than dBase III™ and 37.3% faster than R:Base™ 5000. Database Reporting: Report requests of various levels of complexity were run against single and multiple databases. Eighteen separate test runs were conducted, with PC/FOCUS averaging 45.2% faster than dBase and 40.0% faster than R:Base™ 5000. REPO AVER/ PC/FOCUS R:Base 5000 dBase III RUNG FROM DATABASES \GE ACROSS 18 TEST RUNS MM 100.0 1 223.7 tit 407.9 There's more to the study than can be described in this ad. Lots more tests... and much more proof. So, we've reproduced the NSTL Performance Comparison in full. To obtain your free copy, just fill out the coupon and mail it to Donald Wszolek, Dept. U9 , Information Builders, Inc., 1250 Broadway, New York, NY 10001. dBase III is a trademark of Ashton-Tate. R:Base 5000 is a trademark of Microrim. Dear Don; I want proof! Please send my free copy of "A Performance Comparison" to: Name _State_ PC/FOCUS INFORMATION BUILDERS, INC. New York (212) 736-4433 • Washington, D.C.: (703) 276-9006 • Chicago: (312) 789-0515 • St. Louis: (314) 434-7500 • D^llas: (214) 659-9890 San Jose: (408) 293-6600 • Los Angeles: (213) 615-0735 • Houston: (713) 952-0260 • Boston: (617) 272-8600 • Atlanta: (404) 980-0474 Inquiry 94 Fall 1985 BYTE- Inside the IBM PCs • 85 Title Company. Address City !■ -Zip- 8087/80287 PERFORMANCE speedup upon adding an 8087 to a PC gives us a factor of 12 speedup upon adding an 80287 to an AT. How- ever, a program that gives a factor of 3 speedup on a PC gives us a factor of 1, i.e., nothing. For example, the Savage mark for 1-2-3 showed a speedup of 36.6 when run on a PC but only 12.4 when run on an AT. This rule of a 3-to-l reduction does not apply strictly as speedups get small. For example, Megalopolis evaluated with 1-2-3 speeds up 100 percent on a PC but only 39 percent when run on an AT. Looking at the Symphony results, we see that the 30 percent speedup for the PC goes down to 18 percent for the AT. For the Common Subexpression benchmark the excellent performance of the 8087 in comparison to the 80287 is a result of the nature of the code. Because it makes good use of the stack, in-line code consists most- ly of internal stack operations. These operations involve very little 8087 I/O, and because they execute the fastest they are also the most affected by the 80286-80287 interface losses. For the sake of argument, assume that the 80286-80287 interface takes up 30 percent of the numeric time in a stan- dard AT running with a 4-MHz 80287. Doubling the 80287 clock to 8 MHz would have an effect on the numeric portion of the cycle only. Since our assumption is that the interface takes 30 percent, that means the arithmetic at 4 MHz takes 70 percent. Halving the 70 percent results in a process that takes 65 percent as much time (instead of 50 percent). This is virtual- ly the result we get comparing the 4- and 8-MHz columns in table 5 for fast- running compilers. Looking at table 4, we finally see an area where the AT really shines: run- ning inefficient spreadsheets fast. For example, while the fastest time for Savage is Lotus 1-2-3 on a 9.54-MHz 8086/8087 board (4.8 seconds versus 5.1 for the souped-up AT), the fastest Megalopolis time is on the AT (2.4 seconds versus 3.3 on a 9.54-MHz 8086/8087 board). Comparing Mega- lopolis run on Symphony, we now see that the souped-up AT comes in at 3.7 seconds versus 8.3 for the 9.54-MHz 8086/8087 board. In going from an efficient spreadsheet to a not-so- efficient spreadsheet, our souped-up AT went from a 50 percent advantage to a 100 percent advantage. Unfor- tunately for the AT, we had to run the 80286 well out of limits to get the good times. The last result was to be expected. Early in our AT experiences we dis- covered that the one area in which the AT shined was in computing indexes in multidimensional arrays. This is clearly shown in table 6, which com- pares three FORTRAN subroutines that do simple array arithmetic. The core of the first subroutine has an inner loop that gets executed a total of 100,000 times. The operations performed in the loop include multi- plication, division, and addition be- tween members of five single-dimen- sion arrays. The total arithmetic per- formed is 500,000 floating-point oper- ations. Dividing the number of the operations by the time to perform the total benchmarks yields the processor throughput in kiloflops (thousands of floating-point operations) per second. The second subroutine is nearly iden- tical except that it performs the same sequence on members of two-dimen- sional arrays. The third subroutine repeats using three-dimensional ar- rays. All three routines were compiled using MS FORTRAN, integer*2 in- dexes, and the small and large mem- ory models. The results are similar for integer*4 indexes but not shown. Comparing the AT with a PC, we see that the times for both, machines for vector operations are nearly the same, while the AT takes the lead for the matrix operations and takes a commanding lead for the tensor oper- ations. For the small model, these results can be interpreted as meaning that the PC and AT are 8087- or 80287-bound for the vector case, but the PC is index-bound for the matrix and tensor cases, while the AT is almost number-bound for the matrix case and definitely index-bound by the tensor case. Looking at the large model, we see that the indexes dominate the PC execution and are just starting to dominate the AT vec- tors, while they definitely dominate the matrix and tensor operations. Although we do not show it, the times for RM/FORTRAN are better. In general, the souped-up AT fares bet- ter against the 9.54-MHz 8086/8087 board, tying it for vectors, running 50 percent faster for matrices and 100 percent faster for tensors. These results are similar to those for Sym- phony, where the souped-up AT was 100 percent better than a 9.54-MHz 8086/8087 board for running Mega- lopolis. In fact, since addressing and floating-point arithmetic are going on concurrently in both of these ex- amples, we can conclude that array addressing takes twice as long on a 9.54-MHz 8086 as it does on a 9-MHz 80286. While the work just done suggests that the AT is superior for matrix work, that's really not the case. These benchmarks were written to test the quality of micro-generated indexing. In a mainframe FORTRAN it would have been possible to remain num- ber-bound through all three subrou- tines. In addition, hand-coded routines that use pointers to address matrices are number-bound for the 9.54-MHz 8086/8087 board and run faster on it than the AT. While it is not always practical to rewrite floating- point programs so that they are really number-bound, it usually is possible. If this is done we can make a general statement: Any problem that can be cast into a number-bound algorithm will run fastest on the machine with the fastest numeric processor. We make this last statement by deduc- tion. Numeric processors by defini- tion are devices that do floating-point arithmetic faster than the processor they work with. If a floating-point pro- cessor were beat by a non-floating- point processor, then it could hardly claim to be a floating-point processor. Therefore, any problem that is bound by numerics will be solved fastest by the fastest numeric processor. The last benchmark typifies the kind of problem 1 really wanted to concen- trate on in this article. For integer* 4 indexes, the vector marks are domi- 86 Fall 1985 BYTE- Inside the IBM PCs 8087/80287 PERFORMANCE nated by floating-point operations, while the matrix and tensor marks are dominated by the overhead asso- ciated with computing the addresses in the matrices and tensors. If we change to integer*2, we discover that the vector and matrix times are the same, indicating that they are both floating-point-bound and the tensors bind in addressing. This is the kind of problem that can be handled well with analytic techniques, and the abili- ty to change relative speeds of pro- cessors provides a nice basis for veri- fying concepts about throughputs for processor/coprocessor systems as a function of the clock speeds and code being run. Conclusions For number-bound programs, the fastest computer will always be the one with the fastest numeric pro- cessor. This was the case for all the benchmarks we ran when they were coded with the most efficient com- pilers. Unfortunately, if a program is not number-bound but bound by other system bottlenecks such as ad- dressing variables, then the fastest machine is not always the one with the fastest numeric processor. Often problems that appear to be number- bound turn out to be CPU-bound. This is especially the case with pro- grams that do not use native in-line 8087 support. It was also discovered that the 80286 in the AT was much closer in numeric speed to an 80287 than the 8088 was to an 8087. In general, this resulted in a reduction in the speed- up obtained when an 80287 is added to an AT. As a rule of thumb, the 80287 speedups observed for an AT are one-third those obtained when an 8087 is added to the PC. In situations where programs speed up less than a factor of 2 on a PC, they can slow up when run with an 80287, especial- ly when floating-point comparisons become an important part of a prob- lem. One of the disappointments of the 80287 support is spreadsheets. While 8087 support for spreadsheets is usually good enough to be worth- while, adding an 80287 often results in speedups that are less than 50 per- cent. This is especially true of the types of worksheets that many users like to generate. That's because most spreadsheets run as interpreters, which are much less efficient than native-code compilers. On the posi- tive side, the 80286 does execute in- terpreted code much faster than an 8088, and the best times for the huge sheet, Megalopolis, were turned in by a souped-up AT running a 9-MHz 80286 with an 8-MHz 80287. After examining 80287 perfor- mance we came to the conclusion that the 8087 is slightly more efficient (continued) ONE-STOP ARCnet LAN SOLUTIONS Now you can get all the tools you need to build industry standard TOKEN-PASSING networks from one source. Intercontinental Micro. Our networking packages let you configure any combination of nodes (PC s and compatibles, ATs, XTs, Jrs., Z-100 s) to a common Fileserver in just a few minutes with our menu-driven installation program. Active and passive hubs allow you to integrate up to 255 users on a single network with increased efficiency as the network grows. In addition, our stand-alone ARCnet™ Workstation/Fileserverand complete line of S-100 Bus products (single board com- puters, slaves and controllers) give you and your customers even more options. ARCnet is a trademark of Datapoin! Corporation. We're also compatible with other industry-leading ARCnet PC™ and S-100 products, and our PC networking boards include an optional 256K of system RAM. All with Intercontinental Micro's reputation for outstanding reliability, exceptional service, and highly com- petitive pricing. Call Intercontinental Micro today, or circle the bingo number below for ARCnet™ LAN solutions. ^^^ Intercontinental ==§ Micro Systems (/^ 4015 Leaverton Court, Anaheim, CA 92807; Phone: (714) 630-0964 Telex: 821375 SUPPORT UD: Easylink: 62562040. Inquiry 95 for End-Users. Inquiry 96 for DEALERS ONLY. Fall I985 BYTE • Inside the IBM PCs 87 8087/80287 PERFORMANCE than the 80287 for executing well- written programs. Even our experi- mental AT turned out to be 40 per- cent slower than the 9.54-MHz 8086/ 8087 board for running number- bound problems. Extrapolating this result to future machines, it takes an 11-MHz 80286/80287 to keep up with the 9.54-MHz 8086/8087 running in- line code. However, since we are cur- rently running experimental 9.54-MHz 8086/8087 boards at 12 MHz, it will really take a 14-MHz 80287 to keep up. We conclude that for number- bound applications the 8086/8087 upgrade path is a viable alternative to 80286-based machines and will re- main so for the next one to two years and possibly longer depending on the availability of 8087 upgrades. With improved 8087s or their equiv- alent, it is theoretically possible to achieve floating-point improvements of up to a factor of 10 over the cur- rent 8087 without changing the exist- ing processor/coprocessor interface or software. Whether or not this will happen is a function of the large semi- conductor manufacturers. In their eyes the 8087 is a niche market, which may or may not warrant additional R&D expenditures. From a marketing standpoint, souping up your com- petitor's architecture is not necessarily good business. However, because the Intel architecture has now assumed the stature of a standard, it is fair game as an aftermarket. In fact, at least one semiconductor house, NEC, has an 8087 upgrade in the pipeline that is supposed to be pin-for-pin- and software-compatible and a factor of 2 faster than the 8087. The other con- tenders in this marketplace include National Semiconductor and Motor- ola. The late-to-the-market Motorola 68881 runs up to a factor of 7 faster than a 5-MHz 8087 doing simple operations and up to a factor of 2 5 faster doing trigonometries. The Motorola part is not pin- or code- compatible with the 8087. While it might be possible to glue it into a PC bus, the overhead would end up elim- inating a good part of the speed gained. If a user is running his or her own programs and doesn't mind recompil- ing, there are a number of new devices coming on the market that will make it possible to achieve PC floating-point performance in the 1- to 4-megaflop (millions of floating-point operations)-per-second supermini range for about $2000/megaflop. All of these new devices require the use of boards, special interface software, and/or special compilers. The com- pilers will be trickier than even the current 8087 compilers because these new devices perform floating-point arithmetic about as fast as an 8086 performs an inter-register move. Since code and data will have to get moved onto such a board for it to run up to its potential, it will have to have large chunks of data and code preloaded and repetitively used. An example of the latest generation of floating-point devices that can be used to construct a coprocessor is the Weitek 1164/1165 chip set. Like the 68881, it would have to be glued into a PC with discrete logic. This pro- cessor can be memory-mapped and designed with a high-speed register cache that holds up to 1000 double- precision constants or variables. Leav- ing hot variables in a processor reduces I/O. and, since the instruction set of this processor includes primi- tive branches, it is possible to down- load whole code fragments that will execute in the coprocessor at very high speeds. In fact, the Weitek chip set discussed here is capable of achieving floating-point throughputs in excess of 2 megaflops, which is a factor of 50 greater than an 8087. In the last three years microcom- puters have gone from floating-point speeds of 1000 operations per sec- ond up to 80,000 operations per sec- ond. The next three years promise an explosion in this field with new players, new devices, and new methods of organizing floating-point calculations. The expectation of hav- ing user workstations whose speeds are measured in megaflops by the year 1988 seems quite probable. Some OEMs are talking about dedi- cated boards running in microcom- puters that perform specific opera- tions such as matrix inversions and fast Fourier transforms in the 100- megaflop speed range. While much of this new technology will be expen- sive, it will still be very cost-effec- tive. ■ Immediately Available - Large Quantities The ATI -1000. . .presented by ATI IBM AT* Compatible Motherboard • Up to640-kb main memory (1Mb on -board optional) • 8 I/O Slots • Same Dimensions as IBM AT* (12x13 inches) Suggested OEM price $1,095. (orders of 10 units or more); volume discounts available. Also available: Power Supplies, Cases and Keyboards. ■IBM AT is a trademark of I nu:r national Business Machines New Product ATI -2000 • 8MHzw/o Wait State • 67% Faster than IBM AT* • Call for price ATronics International, Inc. 520 Valley Way • Milpitas.CA 95035 • (408)943-6629 ■ (408)263-6533 6 to 8 MHz system clock On-board battery (optional) 88 Fall 35 BYTE • Inside the IBM PCs Inquiry 1 2 4 ♦ There are 25 you should buy ■ m m A.i ■ Manager Mouse" andTMouse" are registered trademarks of the Torrington Company. AUTOCAD CAD key CAD Plan CAD Master smARTWORK GENT GEM Desktop GEM Draw" GEMWordcharT GEM Graph TopView" IBM Assistant Series DESQ FRAMEWORK Telepaint PC Illustrator M Art Studio Executive Presentation Kit M PC Paintbrush M DR Halo M Harvard Total Project Manager Microsoft WORD m Microsoft Project ™ Network" Quicknet AUTO CAD is a Irademark ol AuloDesk, Inc.. CAD Key is a li. CAD Plan is a trademark ol Personal CAD Sysiems; CAD Master 18 a Irademark ol Data Ginplucs Systems; smARTWORK is a Irademark ot Wintek Corp , GEM, GEM Desktop, GEM Draw. GEM Wordchart and GEM Graph are trademarks ol Digital Research: TopView and IBM Assistant Series aro trademarks ol International Business Machines. DESQ is a trademark ol Ouarlerdeck OMice Systems: FRAMEWORK is a Irademark ot Ash Ion -Tale. Inc. ; Telepaint is a Irademark or 1.CS Tvkf graphics; PC Illustrator is a Irademark ot ComputorGraphics Group: Arl Studio is a trademark I ' MIGRAF:E rk ol IMSI; UR Halo is a Irademark ol Modia Cybernetics; Harvard Total Propel Manage! is a Irademark ot Harvard Sotlware; Microsoft WORD and Mlcrosolt Project mo Irademaik Microsoft Corp.; Network is a Irademark ot Scilor Corp ; Quicknet is a trademark ol I'SDI good reasons Manager Mouse Manager Mouse is an innovation in Mouse technology. It is indispensable to many windowing, computer aided design, graphics, project management and word processing programs. Its unique independent suspension* system delivers smooth, skip-free performance on any surface, at any angle with precise control. It plugs directly into your computer without any external power supply and requires no special tablets or pads. It's totally portable. Take it with you in its travel pouch anywhere in the world. Manager Mouse's enclosed drive mechanism makes for carefree maintenance as well. Manager Mouse is designed for use with IBM PC,™ XT,™ AT™ and a growing number of compatible personal computers, as well as an ever increasing list of software. It comes with its own TMouse™ software, a comprehensive user's manual and technical reference data, a six month limited warranty, and a protective travel pouch. _ "Patent Pendinq MANAGER ■ Call 1-800-982-0030 for your nearest dealer. ~ck~ BSBSEamSm A standard RS-232-C interface* makes Manager Mouse compatible with these computers. IBM PC," PC-XT," PC-AT" and PC Portable" COMPAQ Portable," Plus," 286" and DeskPro" ATT 6300" Eagle PC,'" PC Plus,'" Spirit'" Ericsson'" Columbia'" Corona'" Tl Professional '" DEC Rainbow 100'" ITT Extra™ Datavue25'" SperryPC™ Leading Edge Model D,'" Model M'" Morrow Pivot'" Televideo1605 ,M Tandy 1000,'"Tandy 1200 HD,' Tandy 2000'" Panasonic Senior Partner,™ Executive Partner'" Burroughs ET-2000'" Kaypro '" "Please check the type of connector on your computer's serial card to be sure to buy the right Manager Mouse for your computer. TORRINGTON Part of worldwide Ingersoll-Rand 59 Field Street Torrington, CT 06790 Inquiry 202 INSIDE THE IBM PCs Moving from the 8088 to the 80286 Important differences you need to know to make your programs transportable :*• William J. Claff THIS GUIDE to writing assembly-language code for the IBM PC family pays particular attention to the impact of the 80286 on current programming methods. With the growing number of 80286-based machines, including the IBM PC AT (and probably the anticipated IBM "PC2"). the differences between the 80286 and the 8088 become quite important to the software developer. This is especially true when multitasking and multiuser operat- ing systems acquire a larger installed base. These differences also highlight the ever-present need to structure programs for change. This article is not a primer. It assumes that you are familiar with assembly- language concepts and does not cover the expanded instruction set of the 80286 or how to write systems software. Its primary aim is to acquaint you with the specific differences between the 80286 and the 8088. It also at- tempts to convey that change is inevitable and programs must be struc- tured accordingly. Since the 80286 is a superset of the 8088, let's review that chip first and then cover those features of the 80286 that are important to applications, as opposed to systems, programmers. The 8088 Microprocessor Figure 1 shows an elementary block diagram of the 8088. This processor has two separate processing units: the execution unit (EU), which executes instructions, and the bus interface unit (BIU), which is responsible for the 8088's communication with the outside world. The EU provides a logical address to the BIU, which translates it into a physical address. This transla- tion, called the physical-address computation, uses two 16-bit quantities: a segment register and an offset. The notation used for logical addresses is segmenV.offsel. The segment registers (parts of the BIU) are code segment (CS), data segment (DS), stack segment (SS), and extra segment (ES). The offset is usually supplied by the EU. To compute the physical address, the 8088 shifts the segment register left 4 bits and adds the offset in the BIU's dedicated adder, E. Segments are [continued] William ). Claff (7 Roberts Rd.. Weltesley, MA 02181) is manager of special projects for Spinnaker Software Corporation. He has also run his own microcomputer retail and consulting business since 1978. Mr. Claff holds an M.S. in applied mathematics from Harvard University. ILLUSTRATED BY BARBARA ENSOR Fall 1985 BYTE- Inside the IBM PCs 93 FROM 8088 TO 80286 For increased efficiency, the BIU pipelines bytes. 64K-byte relocatable pieces of the 1 -megabyte physical-address space. They are located on 16-byte bound- aries called paragraphs. Since assem- bly-language programs are written in logical segments, the placement of these segments in memory is a func- tion of the linker and DOS. They can be overlapped, contiguous, or dis- jointed. The address of the next instruction to be executed is CS:IP (code seg- ment:instruction pointer). For in- creased efficiency, the BIU pipelines bytes (prefetches them and puts them into a queue). To facilitate this calcula- tion, the instruction-pointer register is kept in the BIU. The EU contains eight 16-bit reg- isters, any of which can be used in computations. Four of these registers comprise the data group. They are the accumulator (AX), base (BX), count (CX), and data (DX) registers. The 8088 can also access the high and low 8 bits of each data register. The two halves of the accumulator register, for example, are AH (accumulator high) and AL (accumulator low). The respective halves of the BX, CX, and DX registers are similarly named. The next two general registers, the stack pointer (SP) and the base pointer (BP), constitute the pointer group. These registers manipulate the stack. When a subroutine is invoked. SS:SP (stack segment:stack pointer) stores the return address on the stack. SP points to the top of the stack and BP to the base. SP is automatically decremented by calls and incre- mented by returns. The stack is also used to pass subroutine parameters. BP accesses these parameters. Two other general registers, the destination index (DI) and the source index (SI), make up the index group and are used primarily in string opera- tions. Two segment registers are re- 6ENERAL REGISTERS AX AH AL BX BH BL CX CH CL DX DH DL SP BP DI SI TEMPORARY REGISTERS t I I i r i i i i I I I i ALU DATA BUS ( 16 BITS) ADDRESS BUS _ (20 BIT! ATA BUS / * \ y \A I c (8 BITS) cs DS pi ss ES 1 1 P INTERNAL — COMMUNICATIONS — REGISTERS BUS CONTROL LOGIC 8088 BUS EU CONTROL SYSTEM INSTRUCTION QUEUE (8 BITS) 2 3 4 EXECUTION UNIT (EU) BUS INTERFACE UNIT (BIU) Figure 1: An 8088 elementary block diagram [see reference 94 • Fall 1985 BYTE- Inside the IBM PCs FROM 8 088 TO 80286 quired to perform moves or compar- isons on memory more than 64K bytes apart. This is why there is an ES in the BIU in addition to the DS. The destination in a string operation is always ES:DI (extra segment:destina- tion index). Many of the registers in the EU have special uses. Table 1 shows these registers and their uses. 8088 Addressing The EU generates an effective address (offset) using one of several methods called addressing modes. An effective address has one or more of the following: base, index, and displace- ment. A base can be BX or BP; an in- dex can be either SI or Dl; and a dis- placement is a 16-bit signed number. If you do not specify a segment reg- ister, the 8088 uses the DS register. If you specify the BP register as the base, it uses SP as the segment reg- ister. Supplying a segment register other than the default is called using a segment-override prefix. However, you cannot override the IP, SP, or DI reg- ister in string operations. Figure 2 shows how the various addressing modes in the EU and the BIU com- bine to form the physical address. 8088 Interrupts The 8088 does not distinguish be- tween interrupts invoked by the as- sembly-language instruction INT and those generated by the hardware. There are 2 56 interrupts, vectored through a table of double words found at location 00000:00000 hexa- decimal. Each double-word entry in the table corresponds to the CS:IP of the subroutine that the interrupt in- vokes. The 8088 uses interrupts 000 through 004 hexadecimal for the following errors: divide by zero, single step, nonmaskable interrupt, break- point, and overflow. The 80286 Central Processing Unit Figure 3 shows an elementary block diagram of the 80286. This processor has four separate processing units: the EU, the bus unit (BU), the instruc- tion unit (1U), and the address unit Table 1 The 8088's implicit use of general registers {see reference 1). Register Operations AX Word multiply, word divide, word I/O AL Byte multiply, byte divide, byte I/O, translate, decimal arithmetic AH Byte multiply, byte divide BX Translate cx String operations, loops CL Variable shift, variable rotate DX Word multiply, word divide, indirect I/O SP Stack operations 1 String operations Dl String operations SINGLE INDEX DOUBLE NDEX E B U u ENCODED IN THE < INSTRUCTION BX BX SI OR OR OR BP BP Dl OR M f \- SI "V. J* ^-EFFECTIVE OR Dl V EXPLICIT IN THE < l SPLACEMENT X.S' ADDRESS c •c ) INSTRUCTION ASSUMED UNLESS OVERRIDDEN \ BY PREFIX f s* CS 0000 — 1 *r OR SS 0000 — OR DS 0000 OR ES 0000 J* \ V PHYSICAL ADDR * Figure 2: The 8088 memory-address computation (see reference (AU). The 80286 operates in either real-address mode or protected virtual-address mode (protected mode). Bits in a new register, the machine status word (MSW), control the processor mode. The machine status word also activates a feature of the 80286 that allows for the emula- tion of coprocessors such as the 80287. Let's examine the components as they operate in real-address mode first. The 1U is a further refinement of pipelining. The BU prefetches up to 6 bytes of instructions: however, in- stead of being decoded bu the EU as in the 8088, the IU decodes them in parallel execution with the EU. This im- proves the speed of the 80286 but has no impact on programming. The 802 86s BU and AU operate in essentially the same way as the 8088's BIU does. Specifically, the AU calcu- lates the physical addresses in the same manner. 80286 Execution Unit While the EU executes a superset of the 8088 instruction set, some instruc- [continued] Fall 1985 BYTE- Inside the IBM PCs 95 FROM 8088 TO 80286 80286 Memory-Management System In designing the 80286 in 1982, Intel implemented what most of us think of as virtual memory. But how does it work? Quite simply, a virtual-memory system takes the address of a memory request from a processor and trans- lates it to reference a location in RAM (random-access read/write memory). The translation from the logical ad- dress to the physical address is per- formed by dedicated hardware. The logical-memory space can be smaller than, the same size as, or larger than the physical-memory space. Let's illustrate with the 8086 family of processors. First, the 8086 has a physical-address space of I megabyte, but a logical-address space of four 64K- byte segments, or 2 56K bytes. There- fore, we are mapping a smaller logical- address space onto a larger physical one. Whenever the 8086 executes an instruction that accesses memory, the base address in the desired segment selector is added to the offset from the instruction. The segment selection is either explicitly specified or implied by the instruction executed. The resulting 20-bit address is placed on the system bus as the address of the operation. The map function is simple in the case of the 8086: Take the segment selec- tor, multiply by 16. and add that to the offset to give you the physical address. When the total logical-address space is larger than the physical-address space, part of the data is stored out- side of physical RAM. usually on a disk or drum store. The memory system then needs to know what locations are present in physical RAM. When the memory system cannot find a re- quested location, it generates an inter- rupt to the operating-system software. The operating system then takes cor- rective action, usually by loading the desired data from disk into physical RAM. This is called "swapping." High-performance mainframes use two or more levels of memory. The first level is very fast— 10-nanosecond ECL (emitter-coupled logic) cache RAM— and very expensive. The second level is slower— 400-nanosecond NMOS (negative-channel metal-oxide semi- conductor) RAM— and much less ex- by Steve Satchell pensive. The third level is disk, which is very cheap in comparison to the cost of the ECL RAM. Most modern virtual-memory sys- tems also implement access checking When the program requests access to a memory location, the memory hard- ware makes sure that the access is valid. Customary tests are for read ac- cess, write access, and instruction fetch (execute access). The 8086's virtual- memory system does not have any form of access checking at all. Types of Virtual-Memory Systems Nonmapped Memory: The simplest memory system has identical logical and physical addresses. The translation is fixed by design. You wouldn't call this a virtual-memory system, but it is a very basic form of one. The 8080 and 8085 are good examples of this scheme. A given logical address always references the same RAM location, regardless of the state of the processor. Paged Memory: Early designers first increased the amount of physical mem- ory on a system by setting aside a block of logical memory and mapping two or more physical blocks— called banks— into that one logical space, This enabled systems to grow above the limited address space and was usual- ly used for multiuser systems. Then the designers defined multiple blocks that allowed two or more banks to be mapped in at the same time. You could then move data from one bank to an- other instead of switching banks all the time. If you carry this process to its in- evitable conclusion, the designer defines a set of pages, all the same size, in both logical and physical space. The system maps logical pages into physical ones using a table. The logical address is then broken into a page selector and an offset. The address- translation hardware replaces the page selector with the upper n bits of the physical-page address and passes the offset through as is. This then becomes the physical address. Fitting new processes into a paged memory system is relatively easy since the operating system doesn't have to find a block of memory big enough to hold the process; it must only collect enough pages to satisfy the space re- quirements for the program. Need to add memory for the program? Get an- other page. Such a system also allows limited data sharing, especially if access check- ing is implemented. If you have multi- ple users of the same program, you can save time and RAM by having everyone use the same copy. Then you need one set of pages to hold the pro- gram and a small working set of pages for each user's data. The main problem with paged mem- ory is wasted RAM. If you have many programs and each program is not op- timized to fit exactly in one or more pages, you lose on the average half a page per program. If you choose too big a page size, the losses mount rapid- ly. If the page size is too small, you in- crease the size of the mapping table, thus increasing system cost and de- creasing system reliability. Segmented Memory: You can also vary the size of each memory area to fill your needs. As a minimum, you need to know the segment's physical starting address. Some segmented memory systems use a portion of the logical address to select the segment (as in the paged system) while the re- mainder defines the offset within the segment. Others, like the 8086 and the 8088, keep the segment specification separate from the rest of the logical ad- dress. In reality, the 8086 doesn't have a 16-bit logical address: it has an 18-bit one: 1 6 bits of offset and 2 bits of seg- ment specification. Systems with access checking also carry the size of the segment to be sure that the access request is within bounds: if it is not, the operating system is informed. Since the segment is only as large as it needs to be, you can tightly pack RAM with code and data. However, in multiuser systems, programs come and go with great frequency, so you can end up with a lot of chunks of free memory too small to use. If you don't have enough contiguous 96 ■ Fall 1985 BYTE- Inside the IBM PCs FROM 8 088 TO 80286 space for a new program, you need to garbage-collect your RAM to gather those chunks of unused memory together and readjust the segment definitions accordingly. This is a time- consuming process and, if done fre- quently, can really kill system through- put. Sometimes, however, it can mean the difference between a system that runs and one that doesn't. The 80286 Memory Model The 80286 implements segmented vir- tual memory by using in-memory tables that contain copies of informa- tion about segments currently in use on the RAM chips. Each memory seg- ment has associated with it a descrip- tor containing the segment's physical- memory base address, its length in bytes, its access restrictions, and two bits for memory systems that swap segments in and out, present and ac- cessed. Whenever the system loads a selector into a segment register, it saves the old descriptor and loads the new descriptor from memory into the 80286. These descriptors are grouped into tables, which are described by higher- order descriptors. There is one descrip- tor table for each task in the system and a global descriptor table as well. The actual implementation involves a chain of memory segments and tables. For complete information on how these work, see reference 4. Effects on Operating Systems and Applications Operating systems and application pro- grams are sensitive to the environment in which they run. Since the memory system for the 80286 protected mode differs significantly from the memory system for the 8086. there are some effects. MS-DOS: MS-DOS was developed specifically for the 8086 family of pro- cessors. Microsoft tended to ignore the Intel guidelines for program structure. Intel developed these guidelines to minimize the pain of upgrading from one processor to the next, such as from the 8086 to the 80286. Further, for the sake of speed many applications were written in assembler, instead of in high-level languages like C or Pascal. This means that you must examine your code and, where you made use of specific details of the 8088/8086, modify that code to run in the 80286 environment. High-level language programs require con- siderably less modification. The operating system is most af- fected by the 80286's new design. MS- DOS must be extensively modified to run in the protected environment, even for single-user, single-task work. The tables required to let programs run in protected mode must be set up, mak- ing it difficult for existing programs and MS-DOS to move into the 80286's pro- tected environment. Since most soft- ware changes required by the 80286 center on the operating system, it could mean a complete rewrite. UNIX: The 80286 was developed with UNIX in mind, and many of its features are appropriate to a UNIX kernel. The 80286 is best suited to UNIX tasks that are small and numerous, as opposed to gigantic programs, since the 64 K- byte-per-segment restriction is still present with the 80286. The IBM PC AT, however, is a single- processor machine with no easy method of inserting additional 80286 processors. Coprocessors cannot use the PC AT system RAM directly. This means the AT must remain as a high- end, single-user and low-end, multiuser machine. Most serious UNIX machines use one processor for applications pro- grams and one or more for I/O (input/ output). For example, the Sun Micro- systems 2/120 system uses a 68000 microprocessor for computation and at least one 80186 processor for I/O functions. Graphics, Scientific Applica- tions: Graphics applications and the 80286 are not suited for each other, I'm not talking about Lotus 1-2-3 pie charts, but CAD (computer-aided design), pic- ture processing, and windows on large displays. These graphics applications require large arrays to store and manipulate the information they need, lust to display 1024 by 1024 dots in 2 56 colors requires 1 megabyte of dis- play memory alone! Scientific processing must also take a back seat, since some statistical algorithms require very large arrays. Currently, the systems using the Motorola 68000 family— such as the Macintosh and the AT&T UNIX PC- and the National Semiconductor 32000 family are better suited to those tasks. Intel 80386 vs. 80286 The 80386. Intel's second 32-bit micro- processor, is forthcoming. Unlike the iAPX 432, the 80386 will build on the concepts started with the 80286 and add some more interesting capabilities. If you combine the two different methods of implementing virtual mem- ory, segmented and paged, you can get the best of both worlds. Segment descriptors carry all the access- checking information, and it is easier to swap fixed-size pages to and from disk. If a page-modified or "dirty" bit is assigned on a page basis, you don't need to swap out an entire segment just because you changed one word: you can just swap the page. Limited garbage collection is much easier with this combined memory scheme, since you only need to manip- ulate parts of pages instead of entire segments: this is especially true if a segment starts in the middle of a page. Full garbage collection is just as tedious, however, since you need to move data around in all the pages of the segment. Intel has shown plans to implement a combined segmented and paged virtual-memory system on the 80386 that is upward-compatible from the 80286 system. Segments carry access restrictions just as they do on the 80286, but a paged system makes memory allocation and deallocation easier. Instead of swapping segments, you have your choice of swapping pages, segments, or some combination thereof. Stephen Satchell is the owner of Satcfiell Evaluations (16 Searing Ave.. Morristown, Nl 07960). He has spent 12 years in computer product development and evaluation. Fall 1985 B Y T E • Inside the IBM PCs • 97 FROM 8088 TO 80286 tions operate slightly differently, pos- ing a compatibility problem. These differences are summarized as follows but are of no consequence in most applications programming: • Shift counts are masked to reduce the maximum instruction time. The CL register is masked when it is used as a shift or rotate count. • PUSH SP works differently. Due to protected mode, the value of PUSH SP is different on the 80286. If this is important, you should use the following instructions: PUSH BP MOV BRSP XCHG BP,[SP] • Flag word has a different value. The upper 4 bits of the flag word are 1111 on an 8088 and 0000 on an 80286 operating in real-address mode. (Note: This provides a way of telling Table 2: The 80286's predefined interrupt vectors (see reference 3). 00 Divide-error exception 01 Single-step interrupt 02 Nonmaskable interrupt 03 Breakpoint interrupt 04 INTO detected overflow exception 05 Bound RANGE exceeded exception 06 Invalid op-code exception 07 Processor-extension not-present trap 08 Double protection exception 09 Processor-extension segment overrun exception 0A Task segment format exception 0B Segment not-present exception OC Stack under/overflow exception 0D General protection exception 0E-0F Reserved 10 Processor-extension-error interrupt 11-1F Reserved these processors apart program- matically.) • Quotients of 80 or 8000 hexadeci- mal are possible. • Divide error is restartable. • Segment wraparound causes excep- tion D hexadecimal. • External interrupt handlers cannot be single stepped. The priority of the single-step interrupt has been changed. This keeps an external inter- rupt from being single-stepped if it oc- curs while single-stepping through a program. • Interrupts can occur after MOV/ POP DS/ES. The 80286 only ignores interrupts after a MOV/POP SS instruction. • Do not rely on NMI (nonmaskable interrupt) interrupting the NMI handler. The 80286 disables NMI and processor-extension interrupts after recognizing an NMI: they remain dis- abled until the first IRET is executed. • Place a far jump at FFFF0 hexadec- imal. The 80286 starts execution at F000:FFF0 hexadecimal as opposed to FFFF:0000 for the 8088. • Do not duplicate prefixes. The prefetch and instruction unit impose a 10-byte instruction-length limit that you can reach only if you code redun- dant prefixes. SEGMENT BASES SEGMENT SIZES SEGMENT LIMIT CHECKER NMI INTR BUSY ERROR READY. HOLD SI. SO. COD/INTA LOCK. HLDA Figure 3: An 80286 internal block diagram (see reference 2) 98 Fall 1985 BYTE- Inside the IBM PCs FROM 8 088 TO 80286 • Do not use undefined op codes, in particular POP CS or MOV CS.op or POP/PUSH mem with undefined encodings. • Self-modifying code may not work. Since the 80286 can prefetch further ahead, you should jump to self- modifying code. (Note: Self-modifying code will not be compatible with the 80386 microprocessor.) • The numeric-exception handler must use interrupt 10 hexadecimal. • The numeric-exception handler must allow for prefixes. • The numeric-exception handler must not use the 82 59A-chip INT signal. • FNDISI and FDISI do not disable numeric interrupts. • Do not perform I/O (input/output) to ports F8-FD hexadecimal. • Avoid operations that the iAPX 286 may restrict to ensure system integri- ty, low interrupt latency, or low bus- request latencies (for example, shift/ rotate with shift count greater than 3 1 , locked CMPS/STOS/SCAS/LODS, STI, CLI, HALT, and I/O instructions). • Do not rely on the value pushed onto the stack by PUSH SP. • Do not rely on processor instruc- tion-execution times. 80286 Interrupts Another difference between the 8088 and the 80286 operating in real- address mode is in their handling of interrupt vectors. Table 2 lists the 80286's predefined interrupt vectors. These new interrupt vectors would not be a problem if IBM had avoided using Intel's reserved interrupts in de- signing the PC. For example, a pro- cessor-extension error (interrupt 10 hexadecimal for the 80286 in table 2) causes a random video interrupt (the IBM PC's use of interrupt 10 hexadec- imal) to occur. These new interrupts are unlikely to occur in real-address mode, and you can trap them in pro- tected mode, so this may not turn out to be as great a problem as it appears. Protected Mode Examination of the processor com- ponents as they operate in protected mode brings the most significant dif- ference between the 8088 and the 80286 to light. Since most 80286- based systems are currently operating in real-address mode, this difference has not yet become a major problem. Figure 4 shows the complete 80286 register set when operating in pro- tected mode. There are several new registers, some of which are not pro- grammer accessible. In protected mode the AU provides full memory management, protection, and virtual- memory support. To do this, the AU sets up operating-system control tables in memory that describe all of the machine's memory, and then the hardware enforces the information in these tables. The 80286 extends the 8088's 16-bit segment registers into 64-bit segment selectors by appending a 48-bit seg- ment descriptor taken from a descrip- tor table that uses the segment register as an index. Using the seg- ment descriptor to hold this informa- (continued) 7 07 AX AH AL DX DH DL CX CH CL BX BH BL BP SI Dl SP MULTIPLY DIVIDE I/O INSTRUCTIONS LOOP SHIFT REPEAT COUNT BASE REGISTERS INDEX REGISTERS ' STRING POINTERS STACK POINTER 1 5 F IP MSW FLAGS INSTRUCTION POINTER MACHINE STATUS WORD STATUS AND CONTROL REGISTERS 15 GENERAL DATA REGISTERS SEGMENT SELECTORS ACCESS RIGHTS SEGMENT BASE ADDRESS SEGMENT SIZE CS DS SS ES 7 23 15 47 40 39 16 15 SEGMENT REGISTERS (LOADED BY PROGRAM) SEGMENT DESCRIPTOR CACHE REGISTERS (CPU LOADS THIS EXPLICIT CACHE. WHICH IS INVISIBLE TO PROGRAMS) ACCESS SEGMENT SEGMENT SEGMENT SELECTORS RIGHTS BASE ADDRESS SIZE 15 7 23 15 TR LDTR GDTR IDTR 47 40 39 16 15 (REGISTERS LOADED (CPU LOADS THIS EXPLICIT CACHE, WHICH BY OS AND CPU) IS INVISIBLE TO PROGRAMS) TASK REGISTER AND DESCRIPTOR TABLE REGISTERS Figure 4: The full register set for the 80286 [see reference 3). Fall 1985 BYTE- Inside the IBM PCs • 99 FROM 8088 TO 80286 15 8 7 2 1 i l l l l i i i i i i INDEX II Tl RPL Figure 5: The format of a selector, where Tl means table indicator and RPL means requested privilege level (see reference 4). 7 7 RESERVED FOR iAPX 386 MUST BE ZERO + 6 + 4 + 2 P 1 DPL 1 ED W A BASE 23 _i 6 BASE ]5 _ LIMIT Figure 6a: Data-segment descriptor, where P means present bit; DPL, descriptor privilege level: ED, expansion direction: W, writable: and A, accessed (see reference 4). 7 7 RESERVED FOR iAPX 386 MUST BE ZERO +6 + 4 + 2 P l DPL ■ 1 1 C R A BASE 23 -i6 BASE ]5 _ LIMIT Figure 6b: Executable-segment descriptor, where P means present bit: DPL, descriptor privilege level; C, conforming; R, readable; and A, accessed (see reference 4). 7 7 RESERVED FOR iAPX 386 MUST BE ZERO +6 + 4 + 2 P DPL 1 TYPE 1 BASE 23 -16 BASE15-0 LIMIT Figure 6c: System-segment descriptor, where P means present bit and DPL, descriptor privilege level (see reference 4). tion is called an explicit cache. This is more efficient since the indexing takes place only when you set the segment- register value, rather than each time you use it. Figure 5 shows the format of the selector. The requested privilege level refers to reducing the privilege level required to access a particular seg- ment. The table indicator lets you choose between using the global descriptor table (GDT) and the cur- rently active local descriptor table (LDT). There is only one global descriptor table: it is established when you enter protected mode. The currently active local descriptor table, if any, is a segment within the global descriptor table. The 14-bit index por- tion of the selector and the 16-bit off- set combine to allow a 1-gigabyte logical-address space. Descriptor tables are segments and can contain up to 8192 8-byte descrip- tors. There are four types of descrip- tors: data-segment, executable-seg- ment, system-segment, and gate. Figures 6a through 6d contain the for- mats of these descriptors. Data-segment descriptors contain system or application data including stacks. Executable-segment descrip- tors refer only to segments that con- tain instructions. System-segment descriptors contain data structures that are recognized directly by the hardware such as the descriptor tables themselves. A gate descriptor provides a pointer to an exported en- try point. The call gate offers an ad- ditional level very much like a soft- ware interrupt. A particular call gate can represent the entry point of an operating-system function by number so that no explicit binding of ad- dresses is required. The present bit (P) and the accessed bit (A) are used in implementing vir- tual memory. The other bits hold pro- tection and privilege information of interest if you are writing operating systems. The 24-bit base address for a segment means that the 1-gigabyte logical-address space is mapped into a 16-megabyte physical-address space. The 16-bit limit means that segments in the 80286 address space 100 • Fall 1985 BYTE- Inside the IBM PCs FROM 8088 TO 80286 can be less than 64K bytes. There is also an interrupt-descriptor table (IDT). This makes it possible for different tasks in a multitasking en- vironment to have their own interrupt handlers. This table is conceptually like the real-address mode vector tables except that the entries are descriptors and not double words. In- specting or changing interrupt vectors in protected mode is necessarily an operating-system function. Differences The different view of memory that each of these machines takes implies several rules for programming on the 80286. • Since segments can be less than 64K bytes, keep all references within the logical-segment boundary. For ex- ample, do not use a label at the end of a data segment as if it were the off- set to free memory. • Keep all data and code references within logical-segment boundaries and consistent with the segment's attributes. • Do not rely on the iAPX 86 relation- ship between the value in a segment register and the selected physical memory. Programs should be as in- dependent of the physical-memory address in which they reside as pos- sible. • Do not write self-modifying code. • Do not use overlapping segments. • Do not store temporary values in segment registers. • Use intersegment calls to invoke operating-system functions. Conclusion By applying good programming tech- niques and by paying attention to the differences between the 8088 and the 80286, you can greatly simplify the writing of easily transportable pro- grams. As microcomputers become more complicated, proper program- ming structure and practice become more important. You should write modular programs that use operat- ing-system-provided facilities as heavi- ly as possible. For the 80286 this is especially true of memory manage- 7 7 RESERVED FOR iAPX 386 MUST BE ZERO + 6 + 4 + 2 P 1 DPL 1 TYPE 1 1 XXX 1 1 1 1 1 1 WORD COUNT ONLY FOR TYPE =00 i i i DESTINATION SELECTOR X X DESTINATION OFFSET NOT USED FOR TYPE = 01 OR 11 Figure 6d: Gate descriptor, where P means present bit; DPL, descriptor privilege level; and X, not used (see reference 4). ment and I/O facilities. Many software developers have already adopted this approach because it results in "well- behaved" programs in the IBM Top- View and Microsoft Windows environ- ments. Your modifications are more likely to be localized and well defined if you take this approach. ■ REFERENCES 1. iAPX 86,88 User's Manual. Santa Clara. CA: Intel Corp., 1981. 2. iAPX 286 Hardware Reference Manual. Santa Clara, CA: Intel Corp.. 1983. 3. Introduction to the iAPX 286. Santa Clara, CA: Intel Corp., 1982. 4. iAPX 286 Operating Systems Writer's Guide. Santa Clara, CA: Intel Corp., 1983. PC-AT COMPUTERS CAN GROW UP! WINCHESTER STORAGE WITH OPTIONAL BUILT-IN TAPE OR LASER OPTICAL DISK BREAKS 32mb BARRIER! FREE Installation thru 12/31/85 'some restrictions apply ADD 8 INCHES OR MORE! Mainframe: NMS mass storage, disk, tape back up, and laser optical memory systems provide economical, compact, and high performance disk storage with capacities of 84mb, 168mb, 335mb, 474mb, and 689 mb. Each controller supports any combination of two disk capacities, up to 1 ,300 megabytes! Performance: Access times of 17 milliseconds and data rates of up to 2.4 mb/sec... Fasti Leading Edge: Single board SMD/SCSI disc/tape/laser optical controller, occupies only one slot while supporting two SMD disks and your tape or laser optical memory too! NMS systems utilize Winchester technology exclusively made by Fujitsu. ..including Fujitsu model 2333 and new 2361. Laser Optical: Your choice of 400 mb, or 1000 mb of removable, fast, laser optical, read- write, storage. (NMS 007 series). Tape Back-up: NMS provides ANSI-IBM format Va inch tape systems and 60 mb of file- by-file/streamer Va inch cartridge tape systems. (NMS 9000 and PC. 25 series). Networks: Compatible with most major networks, NMS storage systems are the highest performing file servers available. ..reliable too with 60,000 MTBF! Warranty: Controller... 24 months (RTV), and 12 months (RTV) all other system parts. Don't settle for 5 1 /4 inches when you can get eight! National Memory Systems Corporation 355 Earhart Way, Livermore, CA 94550 TWX 9103866606 TELEX 821892NMSUO (415) 443-1669 National Memory Systems CORPORATION Inquiry 1 38 Fall 35 BYT E • Inside the IBM PCs 101 EHscover what 60,000 It takes more than a low price to keep customers satisfied. It takes the service and support from the Staff of Qubie'. Kellie is just one of a dozen people who can answer your questions about any of our products. She can explain our exclusive money-back No Risk Guarantee and extended warranty Preferred Cus- tomer Plan. All of our products include a one year limited warranty. Besides explaining and answering, Kellie can also take your order. Don is part of a team of technical support people who can answer ques- tions, after you buy. All of our products come with an easy-to-understand user's manual. And don't worry about getting lost during installation, Don is as close as your phone. If you should have a prob- lem, our 48 Hour Turn- around on warranty repairs insures you'll be back up in no time. Chuck is the guy respon- sible for the Order Today, Shipped Tomorrow promise. He controls a small army of product testers and order packers. And Chuck's crew of bill- ing clerks won't charge you extra for UPS surface freight and insurance or credit cards. If you're in a hurry, 2-day UPS service is available. HARD DISK SUDSYSTENS PC20 (Internal) $599 PC20E (External) $749 With Spooling Tape Backup, Add $400 20 Megabyte Capacity • Boot From The Hard Disk -- No Software Patches Or Drivers To Install • Runs All The Popular Software - DOS 2.0 Or Later • Low Power Con- sumption • 5 1/4" Controller Card • High Reliability And Durability — Specially Plated Drives • Faster Access Time Than XT -- Changeable Interleave Value • Full Height And Half -Height Bezels • Includes Cables, 1DIR "Visual Shell" and ZylNDEX "Info Searcher" Software External Model (PC20E) Includes Case And Power Supply • Auxiallary Power Supply For Internal Model (PCPWR) Available 102 Fall 1985 BYTE • Inside the IBM PCs PC owners now know. "The user manual is the best written and organized of those reviewed... its bargain basement price, excellent doc- umentation, drive replacement policy, and changeable interleave, may be the best deal going." PC WORLD August 1985 "Perfect for anyone wanting to get XT per- formance without paying the price." PC WEEK September 25, 1984 ENHANCED KEYBOARD H5161 $159 NEW Solid-State Capacitive Key Switches • Familiar Key Legends • Keys Give Tactile Feedback • Extra Wide Return Key • Finger Homing Bumps On Home Row Keys • LED Indicators On All Lock Keys • Separate Cursor Con- trol Cluster • 3-Position Height Adjustment • Left Hand "Control" Key Is Adjacent to The "A" Key • Clustered Function Key Row • Sturdy Coiled Cable • Plugs Into PC, PC/XT, PC AT or Compaq Deskpro SPOOLING TAPE BACKUP BT/SP10E $499 Handy Portable Case • Uti- lizes Self-Threading Tape Spools Which Hold Up To 10 Megabytes Each • Includes Cable And Software That Allows You To Backup Larger Drives Requiring Multiple Tapes • Plugs Into Rear Of Floppy Drive Con- troller • Can Be Accessed Like A Floppy Drive • Tape Reels ( $ 1 2.95 Each Or 6 For $59.95) CARTRIDGE TAPE BACKUP BT60 Streamer $895 Utilizes Standard DC300 Cartridges • Backup 5 Megabytes Per Minute • Both Backup And Restore Is Per- formed With Read/Write Verification • Includes Software, Cables, 5 1/4" Controller Card • Tape Cartridges Available — Dif- ferent Densities and Lengths 1 L - . .HFFij-pnrnv -3QE 3 ■ 1 |t |s 11 |* |s |* |8 |& 1« 1= rhJsl \ m. B* t j c |* y v t v r r ° p [ ■ \ A ST B ■ Q; * l D r V " K i L ■ ■ 1 ^ ► t ■ * ■Own Z-;^>/3N'/<>? fly* T B .. • 1 pi'. NEW No Bisk Guarantee If you are not completely satisfied with your pur- chase, you may return it within 30 days for a full refund, including the cost to send it back. If you can get any dealer or compet- itor to give you the same No Risk Guarantee, buy both and return the one you don't like. For fastest delivery, send cashier's check, money order, or order by Mastercard/ Visa. Personal checks, allow 18 days to clear. Company pur- chase orders accepted, call for prior authorization. California residents, add 6% sales tax. Hours: M -F 8 am - 5 pm PTZ Sat 8 am - 12 pm PTZ i= VISA London (01) 223-4569 Paris (01) 321-5316 Sydney (02) 579-3322 Canada (403) 434-9444 Outside California 800-821-4479 Inside California 805-987-9741 QUBIE Department B 4809 Calle Alto Camarillo, California 93010 Inquiry 166 Fall 1985 B Y T E • Inside the IBM PCs 103 The Classic Returns. >»r Now... newly udated to include all versions of MS-DOS through 3.1 .. . the 2nd edition of RUNNING MS-DOS is your ultimate source- book for mastering the full powei of the soft- ware that tells your computer how to think. It continues the tradition of the first edition, proclaimed by Jim Seymour of PC Week magazine to be the "Best PC-Related Book of 1984." Here is the inside information— directly from the company that developed MS-DOS— that will help you streamline your computer, set up a multi-level filing system, use the MS-DOS text editor, build and sort a minia- ture database, create customized commands, and manage your monitor, printer, disk drives and modem. Plus new information on using the IBM PC AT's high-capacity diskette drive (MS-DOS 3.0) and using MS-Networks (MS-DOS 3.1). If you use one of the more than five million personal computers with MS-DOS... then you need RUNNING MS-DOS. $21.95 wherever books and software are sold. Microsoft Press 10700 Northup Way Bellevue, WA 98004 INSIDE THE IBM PCs Writing Desk Accessories Design your own memory-resident programs for the IBM PC, available at the touch of a key by Tom Wad low YOU'RE EDITING A Pascal program and need to multiply two hexa- decimal numbers. You could search around the house for your HP 16C Programmer's Calculator, or you could save your current file and write a quick and dirty program to print out the answer you need. Instead, you call up SideKick, and a lit- tle window appears in the center of the screen. You select the Calculator, set the mode to Hexadecimal, and perform the calcula- tion. You leave SideKick, and you're back in your edit with the answer. Elapsed time: just a few seconds. You're working on the budget for the next quarter. The phone rings. You could search for paper and pencil to take notes, or you could drop out of the spreadsheet program and call up the text editor. Instead, you call up the Spotlight note- pad and type the notes into a file directly. After hanging up the phone, you pop back into the spreadsheet, exactly where you left off. In many jobs, work is often a series of interrupted tasks rather than a single operation pursued to comple- tion before another is begun. Most programs, whether business products or programming tools, are not de- signed to be interrupted. Most pro- grams are expensive, in terms of your time, to start and stop. So you prob- ably would not use your personal computer to take notes while on the telephone because it takes a long time to stop what you're doing and start a text editor. And it probably takes a comparably long time to return to what you were doing before the phone rang. On more expensive computer sys- tems, this problem might be solved with concurren- cy. With the ability to have several programs running at the same time, you can leave a text editor running in a separate window and then switch to that win- dow when it is time to take notes. True concurrency is quite difficult to achieve on the IBM PC, however. This is due to several technical reasons, primari- ly the way in which the IBM operating system, PC- DOS, was designed. Because of these design limitations, only one task can be active at a time. If you are willing to abide by this limitation, however, you can simulate concur- rency on the IBM PC. Several products, most notably Borland Interna- tional's SideKick and Soft- ware Arts' Spotlight, have done exactly that. They provide you with a pro- gram that "hides" in your processor's memory. A special keystroke activates it, suspending whatever you were do- ing before. When you have finished, the suspended task is reactivated as though nothing had happened at all. Typically, these products provide several functions, such as a notepad. [aml\med\ Tom VJadlow works as an engineer at the Lawrence Livermore National Laboratory. He can be contacted at POB 275 5, Livermore, CA 94550. ILLUSTRATED BY LAURA CORNELL Fall 1985 BYTE- Inside the IBM PCs 105 Your team just got a new manager. You7 Here comes your chance to manage the major leagues. "APBA Major League Players Baseball." The sophisticated, realistic computer* version of the best-selling APBA Baseball board game. It's the first baseball program to take full advantage of the power of your personal computer. You can draft teams from a list of 676 big-league players or play with the rosters of all 26 real teams. Each play is based on actual performance measurements, so players perform for you just as they do in the ball park. This 1985 Master Edition includes the program disk, a 1984 records and ratings disk, a 52-page instruction manual and 2 manager's reference cards — all in a hardback slipcase. What's more, each year the records and ratings disk is updated to make it a whole new ball game year after year. Available wherever software is sold. Or call 1-800-638-6460 (in Md., 1-800-492-0782). £h RANDOM HOUSE Based on APBA Major League Baseball Master Game. Licensed by the Major League Baseball Players Association. Program Design and Implementation: Roswell C. Miller, Kenneth B. Miller. 'For IBM PC, PCjr, XT or AT, with color or monochrome adapters. © 1985 Random House inc. All rights reserved. A C C DESK E S S R I E S a calculator, an appointment calendar. In other words, the sorts of things that you normally have to interrupt other work to deal with. These 'desk accessory" programs work in two phases. Typically, you receive a program such as a .COM file that you execute once when you boot your system. By placing the command in your AUTOEXEC.BAT file, this will happen automatically. The actual desk-accessory program is sur- rounded by an envelope of code that loads the program, initializes it to work on the correct activation signal, and then terminates, leaving the pro- gram permanently stored in memory. Running the installation program slightly decreases the amount of memory available to later programs. The desk-accessory code, in effect, becomes a part of your operating sys- tem (until you reboot or the system crashes). The second phase is execution. De- pending on the design of the desk ac- cessory, the newly installed code is run when a specific event takes place. In many cases, this event is a special sequence of keystrokes. For example, SideKick is activated by pressing the Ctrl and Alt keys at the same time. Other signals besides keystrokes are possible. For instance, you may want to run a clock display on your screen. In that case, you would choose the timer interrupt rather than the key- board interrupt (see the text box "In- terrupts" on page 120). Even so, the theory behind the construction of interrupt-driven programming is the same. If you want to write your own desk accessories for an IBM PC, you should acquire several tools. First, you will need the IBM technical reference manual. Even if you are an experi- enced assembly-language program- mer, you will probably find this manual to be a bit difficult to read; but there are valuable technical details buried in there that are to be found nowhere else. (All page refer- ences in this article are to the first edi- tion, August 1981. They may differ from subsequent printings.) Second, (continued) Fall 1985 BYTE- Inside the IBM PCs Inquiry 168 m '■'■•i^cT. , it. • / '/ \ r I ' ' 111 1 1 7 ■Vj) I 1. Portability without compromise. It's yours with the Kaypro 2000 lap top computer. In fact, the sleek Kaypro 2000 is the equivalent of a full-sized IBM PC - for thousands of dollars less. The Kaypro 2000 has an 8088 GPU for power and speed. The exceptionally readable LCD screen features a 25 line by 80 column display with 200 x 640 graphics resolution, a low glare lens, and tilt adjustment. The IBM PC compatible keyboard is detachable. The generous RAM (256K standard) is expandable to 768K internally. The computer uses 3.5" disks, each with 720K of storage, formatted. Internal battery pack and a charger are included with the Kaypro 2000. Hardware expansion is a snap, since the IBM PC bus Is user accessible. And a complete set of business software comes with every machine. Visit your Kaypro dealer and discover the deal of the century - the Kaypro 2000! m~ Ask about Kaypro Quick Credit. You can finance a Kaypro 2000 for as little as $75 per month (excluding sales tax on a revolving charge, 10% down|. CORPORATION For the KAYPRO Dealer nearest you, call: TOLL FREE Nationwide 1-800-4KAYPRO Trademarks: IBM, International Business Machines, Inc. photo feat Inquiry 102 Fall 1985 BYTE- Inside the IBM PCs ■ 107 DESK ACCESSORIES Listing 1 : This is a trivial and fairly useless example of a basic keyboard interceptor. The whole purpose of this routine is either to detect the typing of an uppercase Z and return a lowercase z or to detect a lowercase z and return an uppercase Z. It's not very useful, but it is a good (and fairly harmless) way of finding out if you've successfully installed the code. TRIVIAL. ASM — A trivial example of a keyboard interceptor Written April 1985 by Tom Wadlow Definition of constants used by this code DOS_keyboard_io equ 1 6H DOS replace vector equ 15H DOS_function equ 21 H DOS terminate_resident equ 27H get vector equ 35H set vector equ 25H The keyboard I/O vector number Make this 15H for debugging The DOS function interrupt Terminate-but-stay-resident interrupt DOS function number for get-vector DOS function number for set-vector CSEG SEGMENT assume org cs:cseg,ds:cseg ; These govern choices made by MASM 100H ; All .COM files start at 0100H The next instruction will be the first one executed when TRIVIAL.COM is run from the DOS prompt. Since the only function of TRIVIAL.COM is to install the interceptor, we don't want to do anything but that. This is still in the part of the code that will stay resident, so the only thing we should do here is jump past the resident code to the transient installation program. start: jimp initialize Application code should start here Any variables that our application needs can be placed here. This section will remain resident. Don't forget that these variables must be in the CSEG, not the DSEG, since we are sneaking all this code in the back door via the DOS terminate-but-stay-resident interrupt. old_keyboard_io dd ; Set aside a double word for the old keyboard vector 0), This is the actual keyboard interceptor routine. It checks to see what keyboard function is requested, If the function is READ (AH = then it simulates a DOS interrupt to the old function, which returns the character read in AL. If that character is a lowercase Z, then it is replaced in AL by an uppercase Z, and the interceptor returns from the interrupt. If the request is not a READ, we simply jump into the old function that processes the request as it normally would and does our I RET for us. keyboard interceptor proc far assume cs:cseg, ds:cseg or ah, ah jnz ki2 pushf assume ds:nothing call old keyboard Check for lowercase z. If found cmp al.'z' jne kiO Tell the assembler about default segments Turn interrupts back on Is this a READ request (AH = 0)? If so, then do the special routine Push flags, to simulate an INT call so that we need not rewrite the old keyboard handler, we just use it. If found convert to uppercase Z ; Old handler returns, char in AL ; If not lowercase z, do next test {continued) you will need an assembler. I used version 1.0 of MASM, the Microsoft/ IBM Macro Assembler. It is possible to write desk acces- sories in some high-level languages, but in many ways it is neither feasi- ble nor desirable to do so on the IBM PC. Remember, this program is going to permanently use up part of your available memory, so you want it to be as small as possible. A Turbo Pascal version of TRIVIAL.ASM (list- ing 1) would compile to approximate- ly 12K bytes. TUrbo loads many Pascal library functions for even the smallest program. The assembly-language ver- sion of TRIVIAL.ASM is only 81 bytes. Also, the code generated by many high-level languages has undesirable side effects when running from within an interrupt handler. It is possible, however, to build a toolkit of high- level language programs to help you write desk accessories. Later in this article I discuss two such tools, TEST.PAS and VECTORS.PAS, both written in Tlirbo Pascal. (All the TUrbo Pascal programs were compiled to COM files using the Compiler Options setting.) Tlirbo is powerful enough to do the job. It also has quite a few built-in functions for dealing with the idiosyncrasies of the IBM PC and PC- DOS. The whole package is small enough to copy to your working disk. In fact, all the assembly-language ex- amples in this article were written and debugged using the Turbo text editor. The fast built-in editor and compiler make TUrbo Pascal a pleasant system for developing tools. A Basic Desk Accessory TRIVIAL.ASM shows the code for an extremely simple-minded desk acces- sory. The function of this code is to detect when the letter Z has been typed and invert its case. Thus, an uppercase Z becomes a lowercase z and a lowercase z becomes an upper- case Z. Not very useful, but it pro- duces an easily detectable and harm- less effect when installed. In addition, except for the few lines of code that do the actual case shifting, the bulk of the code can be used to install any (continued) 108 Fail 1985 BYTE- Inside the IBM PCs BMDPC STATISTICAL SOFTWARE CONFIDENCE AND CONVENIENCE BM0P 8 ' is Data Analysis with Confidence, Researchers and statisticians know quality research demands quality analysis. That's why they rely on BMDP Statistical Software for all their data analysis needs. BMDP is a comprehensive library of dependable statistical programs. You can use BMDP to perform many types of analysis. Capabilities of BMDP range from simple data display and description to the most advanced statistical techniques. In fact, BMDP provides the widest range of statistical approaches required to effectively analyze your research data: • Data Description • Data in Groups • Plots and Histograms • Frequency Tables • Missing Values • Nonlinear Regression • Analysis of Variance and Covariance • Regression • Multivariate Analysis • Nonparametric Analysis • Cluster Analysis, • Survival Analysis • Time Series Powerful statistical and computing procedures make BMDP especially appealing to the experienced data analyst. However, you need not be a seasoned statistician or computer expert to perform data analysis with confidence. English-based instructions make BMDP easy to learn and easy to As the acknowledged leader in statistical methodology, BMDP has become the standard by which others measure their performance. The BMDP programs are known for superior technology and state-of-the-art methodology. BMDP is committed to developing new statistical methods for data analysis, and continues to lead the way in providing superior statistical software. BMDP is Data Analysis with Convenience. With our latest advance, you can even perform complex statistical analyses without a large computer. BMDPC offers you both the confidence of BMDP and the convenience of using your own PC. The same programs that have been trusted for more than 20 years by researchers worldwide are now available for the IBM Personal Computer and compatibles. Best of all, the BMDPC programs are available in low-cost subsets. So, you can pick and choose programs for your PC. Pick the types of analyses you use most, and choose from our broad selection of statistical programs. Put the statistical software of choice on your IBM' PC*, so you can perform data analysis with confidence and convenience. Hardware Requirements Minimum requirements for running BMDP on the PC include the following: • a 5 megabyte hard disk • the capacity for double-sided, double density floppy diskettes • an 8087 floating point processor • a PC/DOS 2.0 or later operating system • 640 kilobytes of memory. FOR MORE INFORMATION WRITE OR CALL BMDP Statistical Software 1 964 Westwood Blvd., Suite 202 Los Angeles, California 90025 Phone (21 3) 475-5700 BMDP is a registered trademark ot BMDP Statistical Software Inquiry 1 6 IBM PC is a registered trademark ot International Business Machines Fall I985 BYTE- Inside the IBM PCs • 109 DESK ACCESSORIES mov al.'Z' jmp ki1 ; Check for uppercase Z. kiO: cmp al.'Z' jne ki1 mov al.'z' ; Return from the interrupt ki1: iret ; If our special char, then change it ; Go to interrupt return If found convert to lowercase z Is this an uppercase Z? If not, return unchanged character If so, then lowercase it ; Return from the interrupt call This processes an AH < > call to the interrupt handler by simply transferring control to the old handler, which already knows about doing these requests ki2: assume jmp ds:nothing old keyboard io Turn off all assumptions (IMPORTANT) keyboard interceptor endp Application code should end here initialize: mov mov bx.cs ds,bx Make DSEG = CSEG through BX because of inadequate 8088 instruction set Get the old keyboard I/O vector and put it in its variable mov al.DOS keyboard io mov ah, get vector int DOS function mov old keyboard io,bx mov old keyboard io[2],es Set the keyboard I/O vector to our routine The vector we want is keyboard I/O Use the DOS function call to get it See page D-33 of DOS 2.0 manual Old vector is returned in ES:BX Save it to variable mov mov mov mov mov int mov mov mov int bx.cs ; DOS function wants vector in DS:DX ds,bx ; so put seg:ofs of interceptor there. dx, offset keyboard interceptor al,DOS replace vector ;Use the DOS function call to set it ah, set vector ; See page D-28 of DOS 2.0 manual DOS_function bx.cs ds.bx dx.offset initialize DOS terminate. ; First expendable address is that of ; initialize, so put seg:ofs in DS:DX ; End program but leave keyboard .resident ; interceptor resident CSEG ENDS END START Listing 2: This program is intended to test a replacement for the keyboard I/O interrupt handler. Since that handler is a critical portion of the operating system for the IBM PC, direct testing of untrustworthy code is difficult. By assembling the handler to replace the cassette I/O vector [interrupt 1 5 hexadecimal) rather than the keyboard I/O vector, the new handler can test in relative safety, keeping the system mostly operational. (' TEST. PAS program test; Interrupt handler test program Written by Tom Wadlow, May 1985 (continued) keyboard-driven desk accessory. While it might be possible to sim- ply type in TRIVIAL.ASM and run it, you may have a hard time extending that basic program to do anything in- teresting. The reason is this: You will probably make a mistake (or several). When you are debugging a regular program, a mistake means that your program dies and control reverts to the operating system. But here, you are changing the operating system. If you replace the keyboard interrupt handler with a bad one, your key- board will no longer work. You must reboot; but since Ctrl-Alt-Del involves keystrokes, you may not be able to reboot that way. Since the IBM PC has no reset button, you must turn the machine off and on again and wait for it to reboot. It doesn't take many of these delays to cause you to give up desk-accessory programming. Since it is inconvenient to replace a vital system interrupt handler with an undebugged program, why not use an unimportant interrupt until the pro- gram works? I chose the cassette-tape interrupt handler INT 1 5H (read as in- terrupt 1 5 hexadecimal) because on older PCs (like mine) an electro- mechanical relay gives an audible click when activated by the function AH = of the ROM (read-only memory) cassette handler. Chances are good that you do not make use of your cassette I/O (input/output) port (if you own an older PC that has one). If you run the test program and the relay clicks, you've installed it in- correctly. In this case you should ter- minate the program and turn the PC off for a few seconds to let the relay open. Leaving the relay activated for a short time should not damage it, as it was designed for such use. To avoid the necessity of turning the PC off, you might write a version of this pro- gram that does an INT 15H function AH = 1, which turns the relay off. Rapid cycling of the relay should be avoided. Newer PCs may not have the built-in cassette relay, in which case any noncritical interrupt may be used. Both TESTPAS and your application must agree on the interrupt, however. {continued) no Fall 35 B YTE • Inside the IBM PCs Quadram presents the multifunction test that AST failed Silver Quadboard" Bf Reliability: Advanced 256K tech- nology combines with 64K technology for greater reliability. SB Features: Two serial ports standard. Game port standard. Sb Warranty: 5 year extended warranty with 384K (factory installed). ^Compatibility: 100% PC compatible. W Software: RAM Drives, spooler and productivity software. W Price: Hundreds of dollars less than you would expect to pay. SixPakPlus D Reliability: Limited to 64K technology. D Features: One serial port maximum. Game port costs extra. □ Warranty: 2 year warranty. gfi Compatibility: 100% PC compatible. M Software: RAM Drives, spooler and productivity software. D Price: Hundreds of dollars more than you should pay. The Silver Quadboard by Quadram Check the facts. You'll see why Silver Quadboard outperforms the competition everytime. Only Silver Quadboard combines so many standard features (in eluding powerful PolyWindows'™ DeskPlus desk top software) to deliver maximum power pandability to your compatible system. And, with its advanced-technology design, Silver Quadboard does it better than any other board on the market, for hundreds of dollars less than what you'd expect to pay. So before you buy a new multifunction board, check the facts yourself. Then check with your local Quadram dealer for a free demonstration. Or contact us at One Quad Way, Norcross, Georgia 30093-2919; 404-923-6666. SPECIFICATIONS: Silver Quadboard: Memory expansion in 64K or 256K increments, two serial ports, parallel port, game port, clock/calendar, QuadMaster III with RAM drive and spooler software, PolyWindows DeskPlus software. ark of Quadram Corporation, IBM PC DeskPlus is a trademark of Polytron, Corp. QUADRAM -^ An Intelligent Systems Company Inquiry 162 DESK ACCESSORIES (* The interrupt we are testing *) const INTERRUPT = $15; type (* The following variant record is for 8088 registers and allows you to read and write the A-D registers as either words or byte registers. rl_ means low-order byte, rH means high-order, where the register (A through D) is r. See page 208 of the Turbo Pascal 3.0 manual. *) PCregisters = record case Integer of 1 : (AX, BX, CX, DX, BP, Dl, SI, DS, ES, Flags : integer); 2 : (AL, AH, BL, BH, CL, CH, DL, DH : byte); end; hexWord = string[4]; (* Four-character string for the hex converter *) var registers : PCregisters; (* Record for use in calling DOS *) (* The function hex takes a 16-bit integer as its argument and returns a four- character string that is the hexadecimal equivalent of that number *) function hex(v : integer) : hexWord; const map : array [0..15] of char = '0123456789ABCDEF'; var tmp begin tmp[4] tmp[3] tmp[2] tmp[1] tmp[0] hex: end; hexWord; = map[(v and $7fff) mod 16]; = map[(v shr 4) mod 16]; = map[(v shr 8) mod 16]; = map[(v shr 12) mod 16]; = #4; (* Byte is the length of this string tmp; (* The AND masks off the sign bit (* SHR means shift right *) procedure showRegisters; begin writeln; write(' AX:',hex(registers.AX)); write(' BX:',hex(registers.BX)); write(' CX:',hex(registers.CX)); writef DX:',hex(registers.DX)); write(' BP:',hex(registers.BP)); write(' DI:',hex(registers.DI)); write(' DS:',hex(registers.DS)); write(' ES:',hex(registers.ES)); writeln; (* Show the flag bits. *) if ((registers.Flags and $0001) > 0) then writef CF'); if ((registers.Flags and $0004) > 0) then writef PF'); if ((registers.Flags and $0010) > 0) then writef AF'); if ((registers.Flags and $0040) > 0) then writef ZF'); if ((registers.Flags and $0080) > 0) then writer/ SF'); if ((registers.Flags and $0100) > 0) then writef TF); if ((registers.Flags and $0200) > 0) then writef IF'); if ((registers.Flags and $0400) > 0) then writef DF'); if ((registers.Flags and $0800) > 0) then writef' OF'); writeln; end; (* Testing code begins here *) (* This function prompts for a character, then reads it by performing an interrupt with the appropriate function code. State of the registers is shown before the call and afterward. (continued) By using INT 1 5H you leave the vital keyboard driver untouched and work- ing. For purposes of illustration, let's say you were debugging TRIVIAL. ASM. You could make the constant DOS replace vector equal 15H and use TEST.PAS (see listing 2) to simulate a call to the keyboard I/O handler through INT 15H instead of the correct INT 16H. TEST.PAS also prints the entry and exit states of the PC registers around each call. Thus, when your experimental code fails (and it will), the chances are pretty good that your system will not crash with it. When you feel confident that your code is working properly, re- assemble it to replace the constant DOS_replace_ vector with INT 16H, the keyboard I/O interrupt. Another tool you may find helpful, VECTORS.PAS (listing 3), is a Turbo Pascal program that dumps the cur- rent interrupt vectors to the screen or to a file. By comparing these hexadec- imal numbers to the default settings listed on page 3-3 of the IBM tech- nical reference manual, you can see if your installation went as planned. Loading the New Interrupt Handler Surrounding the code that actually performs the application is an envelope of code that does the in- stallation and setup of the new inter- rupt handler. As I said earlier, this is the code that is actually run during phase one of the execution of this desk accessory. When you ask PODOS to run a .COM file by typing its name at the DOS prompt, it does two things. First, it copies the entire file into memory. Second, it does a subroutine call to location 100H in the new code seg- ment, running whatever code is there. So your initialization code need not actually copy the new program from a separate disk file. DOS does that for you. The function that makes these desk- accessory programs possible is INT 27H (terminate process and remain resident). You provide this function call with a pointer to the next free ad- [conlmued] Fall 1985 BYTE- Inside the IBM PCs ASYST high-resolution graphics now include error bars, labels, axes, grids, and multiple colors. New color graphics enhance comparison of experimental data with filtered data. ASYST axonometric plots simplify analysis of complicated 3-dimensional surfaces. Contour plotting adds an alternative approach to meaningful 3-D representation. ASYST adds new muscle. More hardware support, more analysis capabilities for the IBM PC. ASYST" Scientific Software turns your IBM PC, XT,™ AT, or compatible into a complete scientific workstation. And now it's even more versatile, with: • Expanded analysis capabilities • High-resolution color graphics • GPIB/IEEE-488 hardware support • Axonometric and contour plotting • Additional A/D hardware support Minicomputer speed and precision— at a fraction of the cost. ASYSTon an IBM PC does a 1024-pt. FFT in less than 3 seconds (as fast as 1.2 on some compatibles). For the same task, an optimum performance routine on a DEC 1 1/23 + minicomputer using FPF 11 '" took 2 seconds-at 5 times the price! Built-in routines. Full programmability. Straightforward, pre-programmed com- mands, such as XY.DATA.PLOT, FFT, and A/D. IN, put you in total control right away. Commands can be used interac- tively, or combined and modified as needed— from simple macros to fully customized programs. And all corn- inquiry 1 16 mands co-reside in memory-no disk shuffling. ASYST is four separate, fully-integrated modules: Module 1: System/Graphics/Statistics establishes the environment. It provides basic mathematics operators, descriptive statistics, array manipulation and control, automatic plotting and color graphics support (including IBM standard/ enhanced and Hercules boards), a text editor, file I/O, and a built-in program- ming language. Module 2: Analysis reduces and analyzes data. Includes eigenvalues, eigenvectors, polynomials, ANOVA, axonometric and contour plotting, least squares approximations, curve fitting, convolutions, integration, differentiation, smoothing, and fast Fourier transform. Module 3: Data Acquisition allows communication with lab equipment and analog signal sources. Includes A/D and D/A conversions, digital I/O, timing, and triggering. Supports standard inter- face boards including IBM DACA. Module 4: GPIB/IEEE-488 allows additional interfacing to some 10,000 instruments through a variety of plug-in cards. • Purchase Module 1 alone— or with any combination of the other modules- to tailor the system to your specific applications. Try ASYST for 30 days. For details, call (800) 348-0033; in NY, (212) 702-3241. MACMILLAN SOFTWARE CO. An Affiliate of Macmillan Publishing Company 866 Third Avenue, New York, NY 1 0022 Fall 1985 BYTE- Inside the IBM PCs 113 DESK ACCESSORIES procedure testCodeO; var c : byte; begin c: = 0; while DO 3) (* Exit with CTRL-C *) (c <> begin registers.AH: = registers. AL:=0: registers.BX: =0 registers.CX: = registers. DX: = showRegisters; write('Enter a character: '); intr(INTERRUPT, registers); showRegisters; writeln('Character = ['.ord(registers.AL) writeln(' '); c: = registers. AL; end; Set the function code *) Zero everything else, so that change is obvious *) (* Turbo function to perform INT *) Cchr(registers.AL),')'); end; begin testCodeO; end. Listing 3: This program displays the current values of the interrupt vector settings on the IBM PC. The initial values of these settings can be found in the IBM technical reference manual on page 3-3. Their addresses and additional descriptive information can be found on page 3-2 1 . {$P256} (* VECTORS.PAS written in Turbo Pascal 3.0 by Tom Wadlow The P256 compiler option is used to permit the table printed by VECTORS to be re-directed into a file. If you use an early version of Turbo Pascal, this option will not work. If your Turbo compiler supports redirection, then the vector table can be written to a file by compiling to a .COM file, and then typing: vectors > VECTOR. LST at the DOS prompt, where VECTOR. LST is the name of the file that you want the table to go in. *) program vectors; type vectorName = string[30]; hexWord = string[5]; (* HEX takes a 16-bit integer as its argument and returns a five- character string that is the hexadecimal equivalent of that number *) function hex(v : integer) : hexWord; const map : array [0..15] of char = '0123456789ABCDEF'; var tmp : hexWord; begin tmp[5]: = map[(v and $7fff) mod 16]; (* The AND masks off the sign bit *) tmp[4] tmp[3] tmp[2] tmp[1] tmp[0] = map[(v shr 4) mod 16]; = map[(v shr 8) mod 16]; = map[(v shr 12) mod 16]; : '$'; (* Turbo hex constants are preceded by = #5; (* Byte is the length of this string *) hex: =tmp; (continued) dress in memory; it will terminate the current program, resetting the base address (where the next program will be loaded) to the address you specify. In TRIVIAL.PAS, the first code ex- ecuted is a jump to the initialization code at the end of the program. In order to minimize the amount of memory permanently taken up by the interrupt handler, put all the initializa- tion code at the end of the .COM file. When you call INT 27H with a pointer to the start of this code, all the ini- tialization code is effectively flushed, but the new interrupt handler is not. Only the few bytes of the first jump remain as "overhead," and this is usually quite acceptable. In this case, the initialization code must perform three separate func- tions. It must save the old value of the keyboard interrupt. It must replace the old keyboard interrupt with the address of the new one. And it must terminate gracefully, leaving the inter- rupt code but allowing the space taken up by the installation code to be reclaimed for later use. One rule of thumb for writing these interrupt handlers is: Never reinvent the wheel. There is no point in wasting space duplicating something that DOS can do for you. That is why it is a good idea to save the old value of the keyboard interrupt. The reason that DOS uses software interrupts to call functions is modularity. If DOS used a predefined address for a given routine, it would be impossible to rewrite different por- tions of the code, as we are attempt- ing to do in this article. Every program would have the special address for each function "wired in," and it would be impossible to change without changing every piece of code written for the IBM PC. By using software in- terrupts and a jump table, every piece of code is independent of the current settings of the interrupt vectors. But software interrupts are not magical. In fact, they differ only from subroutine calls in that the processor automati- cally pushes all of the system state flags onto the stack before the return address. So if you know the address (continued) Fall 1985 BYTE- Inside the IBM PCs MAKE THE CONNECTION . . . Our Connection systems will solve your problem of trying to read and write diskettes or tapes from almost any computer system using your PC. The Diskette Connection is a hardware system that enables the IBM PC or compatible to read and write most 8 inch, 5Vi inch, or 3Vi inch diskettes. With our File Connection software programs you can transfer data files between most computer systems, including CP/M, DEC, Honeywell, Univac, IBM 3740, S/l, S/3, S/23, S/32, S/34, S/36, and S/38. Our Word and Typesetting Connection programs use IBM standard Document Content Architecture (DCA-RFT) to transfer document files between most word processing and typesetting systems, including Compugraphic MCS, CPT, Displaywriter, OS/6, Multiset, NBI, Quadex, Xerox, and Wang. SEE YOU AT COMDEX BOOTH R8724 Our Tape Connection system will read and write IBM or ANSI standard Vn inch 1600 BPI magnetic tape. A full size 2400 foot tape can store a 45 MByte file and be written in 6 minutes. Since 1982, we have supplied thousands of systems to customers around the world, including IBM, NASA, AT&T, Kodak, and General Motors. Our specialty is conversion systems and we can provide a solution to your problem. Call us today to discuss your requirements. This ad is one of a series featuring NASA missions. For a free poster, send us your written request. Box 1970 Flagstaff, AZ 86002 (602) 774-5187 Telex 705609 Inquiry 64 for End-Users. Inquiry 65 for DEALERS ONLY. FLAGSTAFF ENGINEERING DESK ACCESSORIES end; (* PRINTVECTOR takes an interrupt number and a descriptive string and prints the value of the corresponding interrupt vector on the standard output device *) procedure printVector(v : integer; s : vectorName); (* Since the addresses are stored in with their bytes in least significant order, we can get them a byte at a time and rearrange them to word byte order. This could probably be done in a single complex statement, but I prefer to separate it for clarity. *) var a,b,c,d : integer; begin a: = Mem[0000:v*4]; b: = Mem[0000:v*4+1]; c: = Mem[0000:v*4 + 2]; d: = Mem[0000:v*4 + 3]; writeln(hex(v),s:30,' ',hex((d shl 8) end; (* MEM is a Turbo array that can be used to (* read or write any byte in memory *) + c),';',hex((b shl 8) + a)); (* The main program simply calls printVector repeatedly with information gathered from the technical reference manual. Interrupts 6,7,A,B,C,D are listed as RESERVED by IBM and are not shown here, though it would be trivial to add them. In addition, table entries for the Video Initialization ($1D) and Disk Parameters ($1E) were omitted so that the remaining listing would fit entirely on one screen. *) begin printVector($00, 'Divide by zero'); printVector($01, 'Single step'); printVector($02, 'Nonmaskable interrupt'); printVector($03, 'Breakpoint'); printVector($04, 'Overflow'); printVector($05, 'Print screen'); printVector($08, 'Timer'); printVector($09,'Keyboard'); printVector($OE,'Disk'); printVector($10, 'Video I/O'); printVector($1 1 , 'Equipment check'); printVector($1 2, 'Memory check'); printVector($13,'Disk I/O'); printVector($14,'RS-232 I/O'); printVector($1 5, 'Cassette I/O'); printVector($16,'Keyboard I/O'); printVector($1 7, 'Printer I/O'); printVector($18,'ROM BASIC entry'); printVector($1 9, 'Bootstrap loader'); printVector($1 A/Time of day'); printVector($1B,'Get control on KBD break'); printVector($1C,'Get control on timer'); printVector($1F, 'Graphics character table'); end. of an interrupt routine, you can call it directly by pushing the flags your- self. A normal interrupt call to get a character from the keyboard and return it in the AL register that looks like ; Function is read-character MOV AH, ; Keyboard I/O software interrupt INT 16H can be simulated by ; Function is read-character MOV AH, ; Push processor flags on stack PUSHF ; Call ROM routine directly CALL
where < address > is where the original routine is located. When the IBM PC is first booted, that address is $FOOO:$E82E (using Tlirbo Pascal's notation for a hexadecimal segment and offset as the program VEC- TORS.PAS would print it out). You could code that address directly into a keyboard interrupt handler, but that would make it impossible to run your handler with any of the other com- mercially available interrupt-driven programs, like SideKick or Spotlight, that replace the keyboard vector. DOS provides a function, 3 5H, that reads the current value of a given in- terrupt vector from the jump table and returns it to your program. By using this function, you can place the old value (which may not be the same as the ROM value) into a variable in memory and call through that vari- able to run the old handler. There may be other reasons why SideKick or Spotlight or the others will not run with your specific code, however. Since DOS has a special function to read an interrupt vector, you might guess that there is a similar function to set an interrupt vector. Indeed there is: function 2 5H. (A complete listing of all the DOS functions can be found in section D of the DOS manual.) Writing an Interrupt Handler A little skepticism is a healthy thing when writing a desk accessory that hides inside an interrupt handler. Many functions that are perfectly legitimate inside a regular program are difficult and dangerous inside an interrupt handler. By calling a system function incorrectly from within an in- terrupt handler, you may change the state of the system that the inter- rupted application returns to. This can have disastrous results. For example, if your desk accessory moves the cur- sor (by writing to the screen, for in- stance), the application may not detect this change. Subsequent input based on cursor location would be in- correct. Thus, you should be careful to place the cursor back where you found it before leaving the interrupt code. Probably the most dangerous (continued} Fall 1985 B YTE • Inside the IBM PCs NLQ I DRAFT 12* TM ■ 17 HX This is draft printing at 12 characters per inch and 160 characters per second Select fast draft quality printing with, a very high throughput. Then flick the switch... NLQ | DRAFT 12* PS- This is NLQ printing at 10 characters per inch %. ^PS TM ' 17 HX ...to select NLQ printing for your wordprocessing. You can assign the 80-column Facit 4513 and 132-column Facit 4514 to whatever printing tasks your application requires. From wordprocessing NLQ printouts with automatic sheet feeding to high-speed draft printing. Select 10, 12 or 17 characters per inch. IBM is a trademark of International Business Machines Corp. Epson is a registered trademark. UNIX is a trademark of AT&T Bell labs. Or proportional printing. All at the flick of a switch. The printers incorporate both the IBM/ Epson and Epson FX command sets. And thus easily make friends with both IBM PC:s and UNIX supermicros. Naturally, the printers handle any output from your graphic software packages - logos, business graphics, pictures, semi-graphics, etc. And when it comes to reliability, the component materials, printhead life and stringent testing ensure that your Facit 4513/14 printers will deliver many years of quality printings. Just like every other printer in the Facit family. Switch to Facit 4513/14 matrix printers! Inquiry 61 Head Office: Facit AB, S-17291 Sundbyberg. Sweden. Phone.- (8) 7643000. USA: Facit Inc. P.O. Box 334, Merrimack. NH 03054. Phone: (603) 424-8000 AUSTRALIA: EAI Electronics Associates Pty Ltd., 427-3322. AUSTRIA: Ericsson Information Systems GmbH, 0222-613641. BELGIUM: Ericsson S.A., 02-2438211. CANADA: Facit Canada Inc.. 416-821-9400. CYPRUS: LBM (Lillytos) Ltd 5164634. DENMARK: Facit A/S, 02-922400. FINLAND: OY Facit, 90-42021. FRANCE: Facit S.A., 1-78071 17. GREAT BRITAIN: Facit, 0634-401721. GREECE: Computer Application Co., Ltd., 01-6719722. HONGKONG: Gilman & Co. Ltd., 5-7909555. ICELAND: Gisli J. Johnsen HF, 354-1731 11. INDIA: Forbes Forbes Campbell & Co. Ltd., 22-268081. IRELAND: Memory Ireland Computers Ltd., 1-989733. ITALY: Facit Data Products S.p.A., 039-636331. JAPAN: Electrolux (Japan) Ltd., 03-479-3411. THE NETHERLANDS: Ericsson Information Systems B.V., 03480-70911. NEW ZEALAND: McLean Information Technology Ltd., 501-801, 501-219. NORWAY: Ericsson Information Systems A/S, 02-355820. PORTUGAL: Regisconta Sari, 1-560091. SINGAPORE: Far East Office Eqpts Pte Ltd., 7458288. SPAIN: Facit, 91-45711 11. SWEDEN: Ericsson Information Systems Sverige AB, 08-282860. SWITZERLAND: Ericsson Information Systems AG, 01-3919711. WEST GERMANY: Ericsson Information Systems GmbH, 0211-61090. DESK ACCESSORIES Listing 4: This program installs a keyboard interceptor into PC-DOS. The interceptor keeps a record of the last full command typed to DOS [or any other program that uses the DOS keyboard I/O calls]. Pressing Ctrl- \ makes the previous command repeat, one character at a time. A more extensive version of KEYSTROK.ASM is available from the author for $25 ($15 if you send your own disk and a self-addressed stamped disk mailer). KEYSTROK.ASM written April 1985 by Tom Wadlow Definition of constants used by this code. DOS_keyboard_ io equ 16H ; The keyboard interrupt number DOS_function equ 21 H ; The DOS function interrupt DOS terminate resident equ 27H ; Terminate-but-stay-resident interrupt get vector equ 35H ; DOS function number for get-vector set vector equ 25H ; DOS function number for set-vector CSEG SEGMENT assume cs:cseg ,ds:cseg ; These govern choices made by MASM org 100H ; All .COM files start at 0100H start: jmp initialize ; Application code should start here old_keyboard ic dd ; Set asi de a doubleword for the old keyboard vector outline db 80 dup(O) Where the last line is stored dw Just to make sure it is terminated inline db 80 dup(0) Where the current line is stored dw Just to make sure it is terminated outptr dw Pointer into outline inptr dw Pointer into inline keyboard interceptor proc far assume cs:cseg , ds:csec ; Tell the assembler about default segments sti ; Turn interrupts back on push ds ; Save the registers used in this code push bx push di mov bx, cs ; Set the Data Segment = Code Segment mov ds, bx cmp ah, ; Is this a READ request (AH = 0)? jne ki1 ; If not, then use the ROM handler ; Simulate an interrupt call to the old keyboard I/O handler ki: pushf ; Push flags, to simulate an INT call assume ds:noth "9 I so that we need not rewrite the old call old keyboard io ; keyboard handler, we just use it cmp al, 28 ; Look for CTRL- \ je ki3 cmp al, 8 ; Look for backspace je ki4 cmp al, 13 ; Look for carriage return jne kiO ; After CR we reset output o point to start of keystroke buffer kiOO: assume ds:csec 1 push si ; Save the registers used (continued) Skepticism is a healthy thing when writing an accessory that hides in an interrupt handler. area is file I/O. It is possible to safely open files from a desk accessory, but great care must be taken not to in- terfere with any file activities of the interrupted program. It would be easy to confuse DOS by opening the same file with your pop-up notepad and your normal text editor at the same time. You can perform many useful desk- accessory functions without using any disk I/O. Calculators or clocks are a good example. If you can possibly avoid going to the disk in a desk ac- cessory, it is probably a good idea to do so. If not, then test your code ex- haustively for bugs and side effects. Some DOS functions may not work at all from within an interrupt handler because of the way PC-DOS is written. For any function you intend to use, it is important to thoroughly test the calls from within an interrupt handler. TRIVIAL.ASM shows a minimal desk accessory with almost no I/O at all. Surrounded by the envelope of in- stallation code, the application itself is rather small. Note that the interrupt handler checks to see if the function is a read (register AH = 0). If it is not a read, then the old interrupt-handler code handles any other functions, in- cluding IRET (return from interrupt). If the function is a read, then a simulated interrupt call to the old key- board interrupt handler returns the next character in the input buffer. By doing the simulated interrupt, you can let the DOS and ROM routines do the work they were designed to do and keep your desk accessory confined to its special function. The old routine is supposed to return the character read in register AL, so compare that with the target characters (in this case, uppercase or lowercase Z.) By modi- (continued) 118 Fall 1985 BYTE- Inside the IBM PCs Wide spreadsheets? SideStep is in your future! l"X 'e/ 'e^ x ; LINK ; EXE2BIN RENAME .BIN < name >. COM ERASE < name >. EXE where < name > .ASM is the name of the source code. You'll notice that the example as- sembly-language files are assembled to .COM files rather than .EXE files. This is to simplify the code and speed the execution of the installation pro- grams. The .COM format for PC-DOS programs is intended for small, fast utilities. Thus, they have no separate stack segment and are limited in their choices of code and data segments. They begin execution at location 100H rather than at OH. When writing a program intended to be a .COM file, you should not define a stack seg- ment, and the first line of executable code should come after an ORG 100H statement. When this code is being assembled, the IBM assembler generates a warning that your code has no stack segment. This is no cause for concern, and you should ex- pect it to occur. Debugging an Interrupt Handler One of the most difficult parts of writing a replacement interrupt handler is getting it to work. It is, in effect, a new part of the operating sys- tem. Small bugs in a new keyboard handler or video interrupt handler will be magnified since much of the rest of the operating system depends on these routines. A technique I dis- cussed earlier involves replacing a less consequential interrupt vector for part of the debugging phase. Another important technique is prototyping. If you are writing a really large interrupt handler, you should try to build and test each portion of your code as a normal program before placing it in an interrupt routine. For example, if you design a scheme for pop-up win- dows, be sure that it works from a nor- mal program first. If you can, push the system dependencies as far down in your code as possible. If you need to get a character from the keyboard rather than scatter DOS calls all throughout your code, encapsulate the DOS call in one special routine and then have your application call that. Don't be afraid to write little test programs that try out one thing at a time from within an interrupt handler. Assembly-language programming brings out a tendency to optimize, to try and make programs as small and as tight as possible. This can be good, but it can be dangerous to be too tricky. A program that is too big or too slow isn't of much use. but one that is that is impossible to understand a month after you write it. or impossi- ble to modify, is equally bad. A sense of purpose and balance is important here. Be tricky only when you have to. These techniques should be familiar to anyone who has ever written modular code before. They are basic principles of software design. A good book on this subject is The Mythical Man-Month: Essays on Software Engineer- ing by Frederick P. Brooks Jr. (Addison-Wesley, 1974). Assembly language is not for every- one. And interrupt handlers are by far the most finicky type of assem- bly-language programming you can attempt. But if you are careful and persistent, you can have a lot of fun adding special-purpose functions to your IBM PC. ■ Editor's note: The source-code files for the listings in this article are available for downloading from BYTEnet Listings. Prior to November I, phone (6I7) 861-9774: thereafter, phone (617) 861-9764. 122 Fall 1985 BYTE- Inside the IBM PCs THE FORTIS DH45, THE START OF A NEW BUSINESS GENERATION DAISY OR DOTS ...Have it your way. Don't settle for one or the other ...get both. The revolutionary FORTIS DH45 dual head printer combines the speed and bit image graphics of a dot matrix with a high quality daisy wheel for crisp letters. All this in one compact unit that sa ves desk space and at a price that is less than you would pay for one printer. It is also compatible with IBM* PC and most other personal computers. aisy Wheel Prinlhead, HUIL UUUUII LU UUJ. J. J. I II, UL UlUllXll r UU ' L with its two heads, produces crisp let graphics with a dot matrix print head p-l-W S«w i rig/Laundry Room Hll IjRgBI Pan- □ Dot Matrix Pcinthead'i Imagine the advantage of having two heads in one printer. Need graphics or condensed print spreadsheets or a rough draft of a long letter, just touch the control panel. Ho w about important correspondence to impress a potential client, again, just touch the control panel to switch to the letter quality daisy wheel. Indeed, the old saying TWO HEADS ARE BETTER THAN ONE, really holds true in the DH45. 'IBM is a registered trademark of IBM Corp. FORTIS FDRTISEBEH FOR THE DEALERS NEAREST YOU CALL (800) 447-4700 FOR i Ibi Dynaxjnc. DYNAX, INC. OFFICES ■ HEADQUARTERS 6070 Rickenbacker Rd., Commerce, CA 90040 • (213) 727-1227 ■ NEW JERSEY One Madison St., East Rutherford, NJ 07073 • (201) 471-0100 ■ TEXAS 6012 Campus Circle, Suite 250, Irving, TX 75062 • (214) 257-1700 ■ ILLINOIS 533 West Golt Rd., Arlington Heights, IL 60005 • (31 2) 228-0707 r I MASSACHUSETTS 400 W. Cummings Park, Suite 5300, Woburn, MA 01801 • (617) 933-8162 I ■ N. CALIFORNIA 1255 Oakmead Parkway, Sunnyvale, CA 94086 • (408) 730-1712 inquiry 223 YESI Please send Name me more information or the FORTIS DH45 Dual Head Printer Title Company Phone Address City State Zip I Mail to: DYNAX, INC. Customer Service / FORTIS DH45 6070 Rickenbacker Road. Commerce, CA 90040 PRINTOUTS TH Take a close look at Canon's line of printers. The first thing you'll notice is how good they make you look. That's because Canon's experience in high-tech optics really shows. For instance, Canon was among the first to make a desktop Laser Beam Printer. At a price that's within any business's reach, the Canon Laser Printer can produce eight pages a minute with a quality that's more in common with a professional print shop than a personal computer. Canon also developed the ingenious Bubble-Jet Printer technology, finally making it possible for a printer to not only work extremely quickly but also incredibly quietly. Our Ink-Jet Printer can produce exceptionally sharp, high-resolution graphics in seven colors, even on transparencies. While the Thermal Transfer Printer has three kinds of print modes, including letter quality, at a very competitive price. And the Canon Impact Matrix Series, for regular and extra-wide column paper, makes printing very fast, very economical. W elcome to estchester ■ s •• Th» VUitiir* Guide lo Wvalchtaltr CtranU 1 .1 1 1 1 1 1 OvMtlli ii.i'ln; giMttfil ouft*T|l« I "■ ■....! I -l » - ; i '..wB- !.#• i tin I •»■» »4 ,* t., M..I,N4%fr> lfl»llHHl>l. In » • **.— »r.»o i M *• •» l» M ■ « t-nr. ar>iat •■■:•-• i a»lM • ■ ...... [i .1.... ** »».« ii *»».»* i #» H « % M«.M , » • «■ * W.M INK-JET LASER^IAM IMPACT MATRIX 1 ■■ i . •.'■•■ '• VX'- ■ ' ■'•\''\V',V ' .'.,■.'.••■.■ AT STAND OUT. Visit your local computer store and judge the complete line of Canon printers firsthand. You'll find the print quality is absolutely crisp. The graphics are remarkably clean. And the reasons for buying one are perfectly clear. For more information, call 1-800-323-1717, ext. 300 (in Illinois, 1-800-942-8881, ext. 300). Or write Canon U.S.A., Inc., Printer ^> -% *« ^^1 Division, P.O. Box CN 11250, \^d 1 1 M 1 1 Trenton, NJ 08650. PRINTERS Inquiry 2 1 QUANTEK QUALITY AND TECHNOLOGY 1(_ -5 I.:;t i-O .1.67, 83. 34 SuUIii.ii ..nyl.- : Tc; <™> PARALLEL INTERFACE MPU-401 MIDI INTERFACE MUSIC SYNTHESIZER 14 m RffH — I I I I I I I 1 1 II i Figure I: \nterfacing a music synthesizer with an IBM PC via the MIDI Processing Unit (MPU). MIDI THRU OUTPUT MIDI input" RECEIVER *■ REPEATER TRANSMITTER INTERNAL ELECTRONICS OF MIDI DEVICE .MIDI OUTPUT ANALOG I/O Figure 2: The internal components of a typical MIDI device. technical details of the MIDI standard and of the MPU-401. For the sake of brevity, I will limit my discussion to those items that are crucial to an understanding of the application at hand. The MIDI Standard The MIDI standard allows you to con- nect MIDl-equipped devices in a sim- ple bus network via an asynchronous link. The standard MIDI interface operates at 31.5K bps (bits per sec- ond) with l start bit, 8 data bits, and l stop bit, for an effective transfer rate of about 3K bytes per second. A MIDI device (see figure 2) nor- mally contains both a receiver (MIDI input) and a transmitter (MIDI output). Some MIDI devices also contain a repeater module, which routes the receiver section's unaltered input to an additional output (MIDI Thru out- put) for connection to other MIDI devices. By daisy-chaining the Thru output of one MIDI device to the in- put of the next, you can connect up to I6 receivers in a MIDI bus network. However, you can only have one transmitter in a given network because there is no bus arbitration. You can configure MIDI devices in many other interesting ways; basically. any combination of output to input connections is allowable, even in the same MIDI device. All communication among MIDI devices is carried out by the transmis- sion of MIDI messages containing both data and commands for MIDI devices. A MIDI transmitter originates MIDI formatted messages, while a MIDI receiver recognizes and acts upon messages in standard MIDI format. MIDI messages consist of a status byte and one or two data bytes. Status bytes, 8-bit values with the high-order bit always set (i.e., > = 80 |hexadecimal|), indicate the type of command or function to be performed (or being performed) by a MIDI device. Data bytes, 8-bit values with the high-order bit always reset (i.e., < 80 |hexadeci- mal|). follow the status byte and serve as parameters or modifiers to the commands. (continued) 128 • Fall 1985 B Y T E • Inside the IBM PCs Back up 10 megabytes in 8 minutes! (or less) with FastbacE If you've ever lost valuable data, you know backing up your hard disk is a MUST. For your business, this necessity can become an expensive nightmare. Until now. Fastback™ (Version 5.0) is the hard disk backup (and restore) software utility that eliminates the need for expen- sive and time consuming tape backup systems. It's so fast you can back up a full 10-megabyte hard disk on standard 5V4 " floppies in less than 8 minutes or 10 megabytes of data on the IBM™PC-AT in less than 4 minutes! This can mean a 95% savings of time and money. And it's easy to use. Fastback is fully self-contained and functions with any make or size hard disk. It works with PC-DOS™, or MS- DOS'"version 2.0 or higher and requires no additional hardware to take up valuable expansion slots in your IBM PC/XT/AT or compatible. FASTBACK USES ADVANCED ERROR CORRECTION TECHNIQUES TO RECOVER DATA FROM DAMAGED DISKETTES. So if your disk is damaged after the backup procedure, Fastback (Version 5.0) will still be able to recover the data. Fastback allows rapid lookup of archived data and prevents accidental overwriting. Fastback is completely file oriented, not an image mode backup. Suggested Retail Price: (£'T r 7Cl INTRODUCTORY OFFER Yes, send me_ _Fastbacks at the Special Introductory price of $149 each. That's $30 off the regular retail price of $179. I am enclosing: □ BankDraft □ Check IpjU Ufr Name: Address: City:_ State: Zip: Telephone {_ _) These prices include shipping to all U.S. cities. All foreign orders add $10 per product ordered. COD's and purchase orders WILL NOT be accepted by Fifth Generation Systems. Outside USA: payable in U.S. dollars drawn on a U.S. bank.FASTBACK is also available at better dealers nationwide. Call (213) 439-2191 for the dealer nearest you. Offer Expires December 31, 1985 Fifth Generation S Y 5 T I M S 7942 Picardy Avenue Baton Rouge • LA • 70809 Telephone: (213) 439-2191 Inquiry 63 Dealer Inquires Invited Marketing and Sales by CSSL, Inc. IBM-PC IBM-XT IBM-AT and PC-DOS are registered trademarks of International Business Machines, Inc. MS-DOS is a registered trademark of Microsoft, Inc. Fastback is a registered trademark of Fifth Generation Systems. MIDI RECORDER MIDI messages are generally di- vided into two types: channel messages and system messages. To understand my MIDI recorder program, you need only be concerned with a subset of the channel messages— the channel voice messages. Channel voice messages (see table 1) include Note On/Note Off events (ie., a key being pressed or released), control changes (volume, modulation, etc.), and program changes (the selection of unique "patches" on music synthesizers). All channel messages contain, in the low-order bits of the status byte, a 4-bit number that directs the MIDI message to one of up to 16 MIDI devices attached to the MIDI network (see figure 3). Each MIDI device attached to the bus is responsible for recognizing its channel number and responding ap- propriately to the MIDI message. A receiver of a channel voice message always adopts the command status in- dicated by the last status byte it received. This is referred to as the channel's running status and the Table 1: The MIDI channel voice messages. All data bytes are in the range from to 127 unless otherwise specified. A velocity of for a Note On message indicates Note Off. allowing the use of running states for strings of Note On/Note Off messages. Command Field of Status Byte Message Description Data Byte(s) 000 Note Off key note off velocity 001 Note On key velocity (note off if velocity = 0) 010 Polyphonic key pressure key pressure 011 Control change control # (0-121) control value 100 Program change program # 101 Channel pressure pressure 110 Pitch wheel change pitch wheel least significant byte pitch wheel most significant byte receiver remains in this state until a new status byte is received. Thus, if a given status is to be repeated, it may be optionally omitted, and only the proper number of data bytes for that status need be sent. Consider, for ex- ample, the MIDI data stream (MDS), consisting of several MIDI messages, shown in figure 4. Note the manner in which the run- ning status is used to reduce the number of bytes required to specify a MIDI message. When a device must send long strings of data for the same command (e.g., Note On/Note Off), it can realize a considerable savings in the number of bytes transmitted by using the running status. The MIDI Processing Unit Roland's MPU-401 (see figure 5) is an intelligent interface containing its own CPU (central processing unit) and an LSI (large-scale integration) hand- shake controller for the MIDI network. The MPU connects to the IBM PC via a parallel interface. It uses the IRQ2 interrupt to initiate data transfer be- tween itself and the IBM PC. The use of a smart interface allows the IBM PC to perform other tasks while the MPU is recording or playing. The MPU operates independently, managing the MIDI bus; it interrupts the IBM PC only when a data transfer is required. Because of this the IBM PC can per- form such tasks as disk I/O (input/out- put) and screen update while the MIDI record/playback process is in operation. The use of IRQ2, which has a higher interrupt priority than disk and other I/O interrupts, ensures that no MIDI data will be lost. When instructed to start recording MIDI data, the MPU transmits MIDI [continued] BIT 7 6 5 4 3 2 ] VALUE 1 COMMAND CHANNEL Figure 3: The MIDI status byte for channel voice messages. 1 2 3 4 5 6 7 MDS MIDI MESSAGES 90 20 50 20 00 21 60 21 00 CO 04 90 30 65 30 00 CH. 1 RUNNING STATUS 90 CO 90 Figure 4: A MIDI data stream (MDS) consisting of several MIDI messages with the running status shown. 130 Fall 1985 BYTE- Inside the IBM PCs Why crawl when you can sprint with APPLICATION!? Assembler speed in IBM Basic and Microsoft "C". Mainframe power for your IBM PC. Create network applications* Choice of file or record locking. Today's programmers want more than development tools and Data Base Managers that merely crawl when they need to sprint. APPLICATION l's rich assembler routines combined with IBM Basic or Microsoft "C", sprints during the creation and execution mode of your software... and that means up to 6 times faster and more! Its remarkable efficiency is a result of this unique file system. Achieve unperceivable performance differences from files containing 300 to as many as 80,000 records or more. Design screens in minutes with Genscr, our full screen editor. And most important, APPLICATION 1 opens up the door to file sharing in update mode. Now. Conserve precious disk space with variable length record and key indexes. With unlimited files, fields, records and 8087/80287 support, APPLICATION 1 has it all. You can grow with us because we bring no limitation to your imagination and future requirements. We've prepared a "Demonstration Kit" for Application 1. This includes complete documentation and demo disk. Order yours today for $49.95 (US) which is refundable on the purchase of the $595.00 (US) full version. Contact Logiquest at 514-397-9631. LOGIQUEST Logiquest Inc. 555 Dorchester West, Suite 1616 Montreal, Quebec, Canada H2Z 1B1 1-514-397-9631 Required: PC DOS 2.1 and up PC DOS 3.1 and up for networking 256k Ram. IBM PC, XT, AT, and compatible IBM Network Cards presently supported* ©APPLICATION 1 is a trademark of Logiquest Inc., Montreal IBM, IBM Basic are products and trademarks of International Business Machines. Microsoft is a trademark of Microsoft Corporation. Inquiry Fall 1985 BYTE- Inside the IBM PCs 131 MIDI RECORDER messages received at its MIDI input to the IBM PC for storage. A single MIDI data stream transmitted to the IBM PC during the record process is referred to as a track. Each of the eight tracks is allotted a separate area of the IBM PC's memory for storage and for later playback. In playback mode, the MPU requests the transfer of track data for performance at the appropriate times. Through the use of an internal clock, the MPU manages all timing and synchronization for the MIDI data stream. The MPU's internal clock rate controls the basic tempo for the record/playback process and can be varied between 8 and 2 50 beats per minute. In turn, each beat is subdi- vided into smaller units according to the value of an internal time base. The internal time base can be set to seven values, ranging from 48 to 192 divi- sions per beat. At initialization, the internal time base defaults to 120 divisions per beat. Therefore, for a tempo of 60 beats per minute, each division of the internal time base would be equal to 1/120 of a second. When the recording process begins, the MPU sets a record counter, used for timing of incoming MIDI messages, to 0. Thereafter, it increments the record counter by one for each count of the internal time base. The record counter is allowed to range in value from to 239 (00 to EF Ihexadecimal)) and can thus represent timing intervals in the range from to 2 beats. When a MIDI message is received at the MPU's MIDI input, the current value of the record counter is copied and used as a prefix to the MIDI message to form a track event. The track event is then transmitted to the IBM PC and stored in the computer's memory. The record counter is then reset to and the pro- cess is repeated for the next MIDI event. If the record counter reaches 239 before a MIDI message is re- ceived by the MPU, the counter is reset to and a timing overflow in- dicator (F8 |hexadecimal|) is trans- mitted to the IBM PC indicating that no MIDI messages have been re- ceived during the preceding 240 MIDI IN MIDI OUT MIDI OUT l/0-MAPPED PARALLEL INTERFACE TO HOST PC MIDI RECEIVER LSI CONTROLLER ROM/RAM MIDI TRANSMITTER — 1 MIDI TRANSMITTER CPU OTHER I/O CONTROL L_ 1 Figure 5: The Roland MPU-401 MIDI Processing Unit. 1 2 3 4 5 6 7 8 TRACK EVENTS 00 90 20 50 60 20 00 10 2160 80 2100 F8 20 CO 04 40 90 30 65 A8 30 00 EVENT TIMES 0.00 0.80 0.93 2.00 4.00 4.26 4.80 6.20 Figure 6: A track data stream based on the MIDI data stream from figure 4 with the addition of relative timing values. counts of the internal time base (null MIDI event). Such a sequence of track events is referred to as a track data stream. With the addition of the relative timing values, the MIDI data stream above would be transmitted to the IBM PC as shown in figure 6. Here the event times represent the sum of all preceding timing bytes in the MIDI event stream; for example, the sum of the timing bytes of the first three events (00+60+ 10) is 70 (hexa- decimal), and the event time (0.93 second) represents the actual offset of the third event from the start of the MIDI event stream (70 [hexadecimal| = 112 [decimal|, 112 + 120 divisions per second = 0.93 second). In playback mode, the MPU assigns a unique play counter to each active track. When the playback process is begun, the MPU requests a MIDI event for each active track. The tim- ing value of the MIDI event is copied into the play counter for the track and the MIDI message is temporarily stored. The play counter is then decremented by one for each count of the internal time base. When the play counter reaches 0, the MIDI message is transmitted to the MIDI bus. The MPU then requests the next MIDI event for that track from the IBM PC and the process is repeated. A MIDI event stream received from the MPU in record mode can thus be sent unaltered to the MPU in playback mode for a faithful reproduction of the original sequence of MIDI mes- sages. The exchange of track events dur- ing the record and playback pro- cesses constitutes the bulk of the in- teractions between the MPU and the IBM PC. In addition to the track events, the MPU sends other MPU messages (see table 2) to the IBM PC in- dicating various conditions. The IBM PC, in turn, controls the actions of the MPU by sending MPU commands (see table 3). It should be emphasized that the tables represent only a small por- tion of the repertoire of commands and functions the MPU is capable of performing. A more complete picture of the MPU's capabilities is hinted at [continued) 132 Fall 1985 BYTE- Inside the IBM PCs ) 1985 Pick Systems Pick is a registered trademark of Pick Systems, Irvine. CA ; ■ Announcing the Pick® System for the PC-AT It's at your authorized Pick dealer now. So take a great idea and run with it. PICK SYSTEMS The Pick System/ PC-AT. Take a Great Idea and Run With It Pick Systems, 1691 Browning, Irvine, CA 92714 U.S.A. (714) 261-7425 Telex: 655420 Inquiry 152 Fall 1985 BYTE- Inside the IBM PCs • 133 MIDI RECORDER in the section of my program labeled "MPU-401 Control Words." One further note concerns the MPU's use of a simple handshaking scheme for synchronizing its com- munications with the IBM PC. When it sends an MPU message to the IBM PC the MPU remains in a software loop until the entire message has been read by the IBM PC. The MPU can accept no new commands or data from the IBM PC until it completes the message. Without this condition the IBM PC could send a command to the MPU while the MPU was simultaneously sending a byte to the IBM PC (the first byte of an MPU message). The MPU would then expect the IBM PC to read this byte (as well as the rest of the Table 2: The MPU messages sent by the MPU to the computer to indicate various conditions. Note that the MIDI recorder program ignores the MPU commands F9, FC, FD, and FF All message numbers are in hexadecimal. MPU Message Message Description Comments 00-EF Track event In record mode, the first byte (timing byte) of a track event to be read by the host IBM PC F0-F7 Track data request In playback mode, the MPU requests the next track event for tracks 1 (FO) to 8 (F7) F8 Timing overflow The record counter has reached 240 during record mode F9 Conductor data request The MPU requests the next track event for the "Conductor" track FC All end Indicates all tracks have finished playing in playback mode FD Clock to host Clock tick to host (see MPU commands 94, 95, and E7) FE Command ACK Acknowledgment that the MPU has received a command from the IBM PC FF System-exclusive message MIDI system-exclusive message follows ~\. X. MIDI SYNTHESIZER EfflHI Figure 7: Interfacing the MPU-401 to a MIDI synthesizer. MPU message) while the IBM PC would want to send the rest of its command. To prevent this situation from occurring, the MPU employs a com- mand acknowledgement (ACK) character (FE |hexadecimal|). When the MPU accepts a command from the IBM PC, it transmits the ACK character, indicating that the IBM PC can now transmit succeeding data bytes (if any) associated with the MPU command. MIDI Music Synthesizer The music synthesizer used in our ex- ample has both a MIDI input and a MIDI output. It is connected to the MPU-401 by two cables, as shown in figure 7. All notes played on the synthesizer's keyboard are transmitted to the MPU-401 through the synthesizer's MIDI output, and all notes received at the synthesizer's MIDI input are per- formed by the synthesizer as though they had actually been played on its keyboard. The FORTH Environment My program, MPU401.PCF, is made up of a number of objects that work together in the FORTH environment to perform the functions of a MIDI recorder. The program's organization reflects FORTH's prohibition of for- ward references. Since FORTH com- piles new programs into its workspace in a one-pass operation (in the same manner that it interprets keyboard in- put), MPU40I.PCF is organized "bottom-up," with the more primitive definitions preceding those at higher levels. At first glance, the listing appears similar to a standard 8088 assembly- language program, and, indeed, many of the traditional elements of assem- bly language are present. On closer examination, however, you may notice a number of differences that will seem strange if you are unfamiliar with FORTH programming conventions. To begin with, FORTH's use of a stack for the passing of arguments and data among procedures [words in FORTH) requires you to use 134 Fall 1985 BYTE- Inside the IBM PCs reverse Polish notation to form ex- ecutable FORTH statements. As a result, many FORTH programs appear to be "backward" to those accus- tomed to more traditional computer languages. In FORTH, the key word CODE in- forms the FORTH compiler that the following statements, up to the word END-CODE, are to be compiled as code words using FORTH's built-in 8088 assembler. Ordinarily, code words end with the statement NEXT, allowing them to be used interactively with the FORTH interpreter in the same manner as other FORTH words. Code words intended for this kind of usage always end with the statement NEXT, rather than with a traditional return (RET) statement. The MIDI recorder program uses two such code words, FREE MEM and GET MEM, which are intended for use as traditional FORTH words, receiving their inputs and returning their outputs on the FORTH stack. All other code words in the MIDI recorder program, however, are in- tended as objects of internal CALL statements and therefore contain RET statements, as would normal assem- bly-language subroutines. Regarding the calling of code words that contain RET statements, you must use a special sequence of instructions to en- sure that you actually jump to the ex- ecutable code (parameter field address) of the subroutine, skipping a pointer (code field address) FORTH places at the beginning of code words. This is accomplished by a statement of the form: 1 MPILRECD >BODY CALL The same convention applies to jump (JMP) statements. Those familiar with traditional 8088 assembly lan- guage should have little difficulty with the format of the FORTH code words. Until recently, FORTH programs were customarily created using "screens," lK-byte blocks of memory that could readily be displayed, edited, and stored in a small-com- puter environment. Today, many ver- sions of FORTH offer the alternative (continued) Table 3: The MPU commands the computer uses to control the MPU. Command Byte Command Description Comments 22 Start record process The record counter is cleared and the recording process is begun. 11 Stop record process 0A Start playback process Playback is begun for all active tracks as set by the SET_AC_TRK command. 05 Stop playback process 2A Start overdub process The record and play processors are activated simultaneously. 15 Stop overdub process FF Reset MPU-401 Reset the MPU-401 to the power-up defaults. 33 Disable MIDI Thru function MIDI Thru function from MIDI In to MIDI Out is disabled. 86 Screen bender data Bender (continuous) data is not transmitted to the host IBM PC. 87 Allow bender data 8C Disable measure end Measure end marks are not sent to the host IBM PC. 8D Enable measure end 8E Disable conductor track The conductor function is disabled. 8F Enable conductor track 94 Disable clock to IBM PC 95 Enable clock to IBM PC 96 Screen system-exclusive data MIDI system-exclusive data are not transmitted to the host IBM PC. 97 Allow system-exclusive data B8 Clear play counters The play counters are cleared for all active tracks. BA Clear record counter The record counter is cleared. E0 Set tempo The tempo is set to the value indicated by the following data byte to the MPU. EC Set active tracks The active tracks for playback are set according to the following data byte. Fall I985 BYTE- Inside the IBM PCs 135 A MIDI RECORDER of compiling FORTH source code from traditional text files. This alter- native is provided by PC/FORTH through its INCLUDE statement. I created MPU401.PCF using a standard text editor and compiled it using the INCLUDE feature. The appearance and maintainability of the source code are greatly enhanced by the use of a text editor that allows you to create code segments and commen- tary of arbitrary length. FORTH allows the free use of com- ments between a freestanding left parenthesis and a right parenthesis. I made liberal use of comments in the program listing to improve its read- ability and maintainability. The MIDI Recorder Program MPU401.PCF begins with the defini- tion of the data structures (constants, variables, buffers, pointers, etc.) to be used by the various routines. Items such as the I/O port addresses for the MPU, the track size, and the number of tracks are defined as constants. Following are the definitions of five ar- rays to be used in the management of track data. For each track, T SEG will contain a pointer to the segment of the 8088's memory-address space where the data for that track are stored. T_RPTR and T_PPTR will contain, for each track, a pointer to the offset (within the track's memory segment) of the next location to be used for recording or playback of track events. T RST is used to hold the current running status for each track, and T NDAT stores the number of data bytes associated with the current running status of each track. The variable ACK_RCVD is used to coordinate the sending and receiving of MPU communications. PREV_IRQ2 is used to retain the previous contents of the IRQ2 vector for later restoration. REC TRK con- tains the number (0-7) of the track currently being recorded. MPU VEC is used by the IRQ2 interrupt routine to vector execution to the proper character handler, and MPU VEC RST contains the address of the routine that handles the first char- acter of an MPU message, used to reset MPU_VEC after an MPU message has been processed. The code definitions begin with two functions used to allocate memory outside the FORTH workspace. This memory will be used for the storage of track data in order to reserve memory within the FORTH work- space, which has a 64K-byte limit, for additional word definitions. Another benefit of this approach is that you can make your track-data buffers as large as you wish, subject only to the available memory and the 64K-byte limit imposed by 8088 segment ad- dressing. FREE MEM releases all of the IBM PC's unused memory for use Interpret MPU Message (note: the MPU character handier vector is initially set to the address of MPU_MSG to process the first character of an MPU message) MPU_MSG: begin if command byte is MPU ACK then set command ack flag (ACK RCVD) to signal command received jump to end-of-interrupt else if command byte is a timing value then jump to track event recorder routine (MPU RECD) else if command byte is a play request jump to track event play routine (MPU PLAY) else jump to end-of-interrupt end Figure 8: The algorithm for the MPU message interpreter, MPU MSG. by other processes, returning the number of available memory para- graphs (16-byte sections) on the stack. GET_MEM is used to allocate memory from this available pool. It accepts as input the number of re- quested paragraphs and returns a pointer to the allocated memory (seg), the number of paragraphs ac- tually allocated (n alloc), and a PC DOS error code (0, if no error). The next section contains defini- tions of routines used to send data and command output to the MPU. Each object in this section is defined both as a FORTH word and a callable assembler subroutine so that the function it performs will be usable in either application. Of particular note here is the manner in which the word !MPU CMND, which sends a com- mand to the MPU utilizes the ACK_ RCVD flag. Before a command is sent to the MPU, the flag is set to 0. After sending the command byte, 1MPU CMND waits in a loop until ACK_ RCVD is set to a nonzero value by the routine MPU MSG, which handles messages from the MPU. Following the MPU output words are the routines that handle entry and exit from IRQ2 interrupts. When an IRQ2 interrupt occurs, execution is vectored to IRQ2_INT. IRQ2_INT saves all appropriate CPU registers, reads the character from the MPU data port, and then jumps to the MPU character handler pointed to by the vector MPU_VEC. After the charac- ter has been processed, IRQ2 INT END is executed. It sends an end-of-interrupt (EOI) signal to the PCs 82 59 interrupt processor, re- stores the CPU registers from the stack, and returns from the interrupt. The next section includes the basic routines used in the recording and playback processes, MPU RECD and MPU_PLAY. Following that is the MPU message interpreter, MPU MSG, which processes the first character of all MPU messages. These routines constitute the core of the recording and playback process. MPU messages (see table 2) consist of either a track event (to be re- corded) or a single-byte message. 136 Fall 1985 BYTE- Inside the IBM PCs MIDI RECORDER MPU_MSG is responsible for taking an appropriate action in response to the MPU message. The algorithm for MPU_MSG is shown in figure 8. MPU_RECD is responsible for the recording of track events received from the MPU (see the algorithm in figure 9). Track events (see figure 10) may be from 1 to 4 bytes in length. In the interrupt environment, you only receive one character at a time, and it is not possible to scan ahead in the input stream in order to make deci- sions about how to handle multibyte messages. MPU RECD solves this problem through the use of the MPU character handler vector, MPU VEC. After a track-event character has been processed, MPU VEC is set to the address of the routine that will handle the next character of the track event when the next interrupt occurs. After the entire track event has been processed, MPU VEC is reset to the address of MPU MSG in order to process the next MIDI message. MPU_PLAY (see the algorithm in figure 1 1) is responsible for transmit- ting a track event to the MPU in response to a track-data request, the inverse of the operation performed by MPU_RECD. Here, by contrast, ex- ecution vectors are unnecessary since you are transmitting to the MPU. The remainder of the routines in the program listing are written as stan- dard FORTH colon words, using the words and data defined in the preceding sections. The interrupt control words are responsible for initializing the IRQ2 and MPU character handler vectors and for enabling or disabling the IRQ2 interrupt. They demonstrate the sequence of actions necessary for the proper activation and deactivation of prioritized interrupts (IRQ0-IRQ7) on the IBM PC. The MPU control words consist of the standard MPU commands and the record/playback control words. MPU INIT initializes the state of the MPU at start-up to the state that is re- quired for proper interaction with the MIDI recorder program. MPU ON and MPU OFF are short words that are used to activate and deactivate Record Track Event (process timing value of track event) MPU_RECD: begin record timing value for track event if not a null track event (timing overflow) then set MPU character handler vector to routine that will process the second cnaracter of the track event (MPU RECD 2) jump to end-of-interrupt end (process second character of track event) MPU_RECD_2: begin if character is an MPU mark then record the mark reset MPU character handler vector to MPU MSG jump to end of interrupt else set MPU character handler vector to routine that will process the data bytes of the track event (MPU_RECD_3) compute and store the number of data bytes for the current running status of the track being recorded if character is not a status byte then jump to routine to process data bytes of the track event (MPU_RECD_3) else store the new running status compute and store the number of data bytes for the new running status jump to end-of-interrupt end (process data bytes of track event) MPU_RECD_3: begin store data byte decrement count of data bytes for current track event if count is then reset character handler vector to MPU MSG jump to end-of-interrupt end Figure 9: The algorithm for the track event recorder, MPU RECD. MPU communications. The record/playback control words are at the highest level in the hier- archy of modules in the MIDI recorder program. They are the words that con- stitute the program's simple user in- terface. Once compiled into the FORTH dictionary, they can be ex- ecuted interpretively from a keyboard or included in more sophisticated programs. RESET_RPTR resets the record pointer for a given track to 0, in ef- fect erasing the contents of the track (a nonzero record pointer always points to the byte following the end of a track's data). RESET_PPTR resets a track's play pointer to so that its track data will be performed from the start. Before any track data can be re- corded, you must allocate the mem- ory to be used for track-data storage. RECORD_INIT invokes FREE_ MEM and GET MEM to obtain the necessary memory and stores pointers to the track buffers in the T SEG array. It then loops to reset the record and play pointers for all {continued) Fall 1985 BYTE- Inside the IBM PCs 137 MIDI RECORDER tracks. Once MPU_ON and RE- ing a performance on a single track. RBCOVdlHQ ClVld VldUlHQ CORD_INIT have been executed, When RECORD is used, the MPU L \_. ;\ you are ready to begin the recording does not request track data for per- and playback process. formance on other tracks. Therefore, RECORD is responsible for record- only the track being performed is of track data goes on MIDI MESSAGES > SETTING NEW RUNNING STATUS | F8 1 TIMING OVERFLOW (NULL TRACK EVENT) F8 NO OPERATION F9 FC DATA END MARK "^ MIDI MESSAGES 00-7F > USIINtj 00-7F 00-7F RUNNING STATUS J CO-DF 00-7F | 80-BF 00-7F 00-7F 1 EO-EF 00-7F | 00-7F BYTE 1 (TIMING VALL E) BYTE 2 BYTE 3 BYTE 4 Figure 10: The format of track events received from the MPU. All track events are in hexadecimal. Play Track Event _PLAY: MPIL begin if track buffer is empty then send data end to MPU (00, FC) jump to end-of-interrupt read timing value from track buffer send timing value to MPU if timing value was overflow (F8) then jump to end-of-interrupt if next character in track buffer is an MPU mark then read mark from track buffer send mark to MPU jump to end-of-interrupt if next character in track buffer is a MIDI status byte then set running status for teack to new status byte read status byte from track buffer send status byte to MPU compute and store the number of data bytes for the current running status repeat read next data byte from track buffer send data byte to MPU decrement count of data bytes for current running status until count is reset play pointer for track to reflect data played jump to end-of-interrupt Figure 11: The algorithm for the track event performer, MPU PLAY. in the background, so you can execute other FORTH commands as the process continues. heard. RECORD is invoked with the number (0-7) of the track to be re- corded on the stack. The statement RECORD starts the recording process and records data on track 0. As a con- sequence of the interrupt scheme, the actual recording and playing of track data is carried out in the background, allowing you to continue executing other FORTH commands while the process is in operation. The recording process is ended by the command RECORD_OFF. OVERDUB functions similarly to RECORD, except that all other active tracks are played back while the over- dub track is being recorded. Using OVERDUB, performances on the MIDI synthesizer can be "layered" on up to eight tracks. The PLAY command simply plays back the track data for all active tracks. No track data is sent to the IBM PC by the MPU. Conclusion The MIDI recorder program provides a foundation for the development of an expanded programming vocabu- lary for the musical instrument digital interface. Although 1 have only touched the surface of issues perti- nent to MIDI programming, the func- tions provided by MPU401.PCF con- stitute a useful and instructive introduction to this subject. In the near future, we can look forward to new developments in MIDI software that will greatly stimulate musical creativity. ■ 138 • Fall 1985 BYTE- Inside the IBM PCs The Business Modem that speaks for itself... "My VOICE MAIL system means business ... 24 hours a day, 7 days a week. I let you take orders or exchange information from any touch-tone telephone, anywhere in the world." "My VOICE MESSAGE capabilities help you stay in touch . . . with complete privacy. Personal ID codes make sure the right message gets to the right person." "Every business with an IBM PC, XT, AT or compatible needs me. I can even run in BACKGROUND MODE while you use your PC for other tasks." "I'm a true BUSINESS MODEM; handling both VOICE and DATA. I'm also 100% Hayes compatible, 300/1200 Baud and use most popular communications software." "My TIME MANAGEMENT system plans your business day. On- line features include a Voice Calendar, Alarm, Auto-Dial Phone Book, and much, much more!" Talk to Watson Yourself. Call 1-800-6WATSON (617-651-2186 in Massachusetts) for a demonstration. Watson Voice + Data Natural Microsystems Corporation 6 Mercer Road, Natick. MA 01760 617-655-0700. r^-' " <0 <* n; Inquiry 139 NETWORK BUY HARDWARE AND SOFTWARE AT WHOLESALE +8%, AND GET 14-30 DAY SOFTWARE RENTALS*. . . Every few months, The NETWORK saves its members more than $24,000,000 and processes over 100,000 orders. The nation's largest corporations depend on PC NETWORK! On our corporate roster are some of the nation's largest financial industrial and professional concerns including some of the most important names in the computer industry: General Motors Gillette Hewlett Packard Hughes Aircraft IBM ITT Kodak Multimate United Nations Yale University Veteran's Administration AT&T Barclays Bank Bell & Howell Citibank Columbia University Data General Exxon Farm Bureau Insurance Frontier Airlines General Mills General Electric plus thousands of satisfied consulting firms, small businesses, user groups, municipalities, government agencies and value- wise individuals ACROSS THE NATION! Their buyers know that purchasing or renting from PC NETWORK saves them time, money and trouble. They also count on us for product evaluation, professional consultation and the broadest spec- trum of products and brands around. CALL TOLL FREE 1-800-621-S-A-V-E In Illinois call (312) 280-0002 Your Membership Validation Number: B3XX You can validate your membership number and, if you wish, place your first money-saving order over the A% phone by using your VISA, MASTERCARD or ■* AMERICAN EXPRESS. Our knowledgeable service consultants are on duty Mon.-Fri. 8 AM to 7 PM, SAT. M 9AM10 5PMCST. ^L_ PERSONAL COMPUTER NETWORK ^|| 320 West Ohio Chicago, Illinois 60610 Call now ... Join the PC NETWORK and start saving today ! PC NETWORK • MEMBERSHIP APPLICATION YES! Please enroll me as a member in the PC NETWORK'" and rush my catalog featuring thousands of computer products, all at just 8% above DEALER WHOLESALE PRICES. I will also periodically receive "THE PRINTOUT", a special up-date on merchandise at prices BELOW even those in my wholesale catalog, and all the other exclusive, money-saving services available to Members. i 1 I am under no obligation to buy anything. My complete satisfaction is guaranteed. Please check (o) all boxes that apply: Basic Membership With 14 Days Rental D One-year membership for $8 □ Two-year membership for $15{SAVE$1) D Business Software Rental Library for $25 add'l. per year-with 1 4 day rentals □ Games Software Rental Library for $10 add! per year Special V.I.P. Membership* With 30 Days Rental. D One-year membership for $15 D Two-year membership for $25 {SAVE $5) □ BOTH Business and Game Software Rental Libraries for $30 add'l. per year — with 30 day rentals "VIP members receive advance notice on limited quantity merchandise specials D Bill my c redit card: D VISA D Mas terCard □ American Express Account Number: Exp. Date mo. year Q Check or money order enclosed for $_ Name Address City .Stale. . Apt. No. _ Zip_ Telephone ( ) Please provide the following information to insure compatibility with your system (check all boxes that apply): □ APPLE lie D APPLE //c □ APPLE //+ □ IBM-AT D MACINTOSH D LISA a APPLE III D IBM PC □ Other: Signature {Signature required to validate membership) Copyright & 1 985. PC NETWORK INC. Listed below are just a few of the over 20,000 products available at our EVERYDAY LOW PRICES! GAMES & EDUCATIONAL SOFTWARE (Please add $1 shipping and handl ng for each title ordered from below.) Wholesale Wholesale Bluebush Chess (Your Toughest Opponent) $ 3-4.00* Microsoft Flight Simulator $ 27.00' Bluechlp Millionaire/Oil Baron or Tycoon 28.25* Mouse Systems PC Paint-Turn your 59.95* Broderbund Lode Runner 19.75' PC into A Color Macintosh! CBS Goren-Bndge Made Easy 45.00* Scarborough Mastenype 27.00' CBS Mastering the SAT 81.00' Sierra On-Llne King's Quesr 27.00* CDEX Training tor Word Star 37.25* Sierra On-Llne Cross/ire 18.00- Comprehen slve Intro to Personal Computing 32.00' Subloglc Night Mission Pmball 20.00* Davidson Main Blaster, Word Attack! 26.50* ■** Spinnaker Alphabet Zoo, Kinder Comp, 15.97* Hay dan Sargon III Individual Prolessor DOS 25.75' Story Machine. Face Maker. Hey Diddle Diddle. 32.50' Ryhmes & Riddles Individual The Instructor 24.50* ■»• Spinnaker Delta Drawing 24.97* ►* Infocom Zork 1 or Witness 20.50' ■*■ Spinnaker Most Amazing Thing Virtual Comblnatlcs Micro Coohboofc 20.77* ► Infocom Deadline, or Suspended 27.00" 21.00' BUSINESS SOFTWARE (Please add $2.50 shipping and handling for each title ordered from below.) ATI How to use Multimate S 42.00* Micro Pro Wordstar 2000 $222.00' ATI How to use Microsoft Word 42.00* > MicroRim'.MM-SOOO 305 00' ATI How to use Lotus 1 -2-3 42.00' Microsoft C Compiler 220.00' ► Ashton-Tatci 'Jwv tft 330.00' I** Microsoft.'. , iVefSrdrt 2.0 205.00" ►■ Ashton-Tnle . r fi.T" ■■.l i ^ 330.00' Microsoft Multiplan 95.00' Borland Side Kick (Protected) 26.00* Monogram Dollars & Sense 95.00- Borland Turbo Pascal 25.75' Mosaic The Twin 75.50' Borland Turbo Pascal 8087 49.75* > Multimate Muilim.iicf Latest Version) 200.00" Borland Super key 34.75' Multimate Multimate Advantage 270.00* **■ Central Point i p) UPC 20.00" Oaals The Word Plus 90.00* Conceptual Instruments Desk Organizer 157.00' Open SystemB P/O Sales AIR INV GIL AIP Team Mgr 310.00* ea. Digital Research CPIM-86 49.00* Power Base Power Base 197.00* Digital Research DR Logo Digital Research Gem Desktop 75.00* Real World GIL AIP AIR PIR or OE/INV 325.00'ea. 25.00* Rosesoft Prokey Version 4 70.00* Digital Research Gem Draw 73.00' Ryan McFarland RM COBOL (Dev System) 520.00- Enertronlcs Energraphics with Plotter OpVon 1 90.00' ►* Samna .,■■ 340.00- Funk Software Sideways 34.00* Sateiite Software WordPerfect 195.00* > Harvard Harvard Project '■' 175.00* So ft era ft Fancy Fonts 125.00* ► Harvard Harvard TolatProiecl Mai 225.00* Softstyle SET-FX 35.00' *• HByssSmartCOrnfl New VT lOO Emulator 68.00' Software Arts TK' Solver 200.00" ►* Human Edge The Management j fl 137.50' Software Group Enable 305.00- ► Human Edge I7ji -.<■■ 110.00* Software Publishing PFS: File. Write. Graph 68.00* LifetreeVoffiSwfifer Delux 26,50* Software Publishing PFS- Report Sorclm Supercalc III 64.00' 135.00" 169.00* MDBS Knowtedgeman 225.00' Xanaro Ability 252.00* HARDWARE (Please add shipping and handling charges found In Italics next to price.) COMPLETE SYSTEMS MULTIFUNCTION CARDS Apple Macintosh Base System CALL Apparat AT Ram Expansion card ■*■ AST Six-Pack Plus with 64K 210.00' (2.50) Apple Apple lie CALL 199.00- (2.50) Apple Apple lie AT&T 6300 PC CPU2 CALL AST 110 Plus II 120.00* (250) $1,595.00' (34.02) AST Advantage for AT 355.00' (250) 128KI2 Floppy 11 SenalH Parallel *>■ PC Network 5 1 2K Memory Board wtOK 69.00' (2 50) Columbia Desktop & Portable Systems CALL f*- PC Network Six-Pack Clone wlOK 99.00' (2 50) ►*■ COMPAQit.itiltH.hr ■;'. tbla 2,235.00* (48.28) Full Six Prick Features— Game Po't Standard WMB Hard Disk 1 1 torn i i '■.'■<"■■ Direct Import Irom Taiwan at a Fabulous Price ' COMPAQ Ih-Ahl'ttr I .int.: Backup System W/640KI1 FloppyilOMB Hard Disk! 10MB Tape Drive/Monitor 2,951.94* (63.70) I vest Wnnanly- - Money back Guai M/i ► PC Network IIOPIus II Clone 85.00* (2 50) SerlfWdame/Chck Standard ► IBM ' i_ li.r • ■ '.■■. '■ "■ ' 1.495.02* (32.55) Quadram Improved Quadboard WlOK 170.00' (2.50) »*■ IBMf J ( '-V'i" ■ »r."<.: . 1.749.00' /37.7S' f** Tecmar Captain Multifunction Card I0K 146.00' (2.50) IBM PC/AT All Configs CALL IBM PCI AT Base Unit— t .2MB Floppy >/256K 2,795,00* (60.37) PRINTERS Texas Instruments Professional CALL ► CltlzenMSP-fONfW S 160CPS/80COUFric + Trac 265.00" (5 72) DISK DRIVES & CONTROLL *• Citizen MSP-I5NEW 350.00* (7.56) tOmega Bernoulli Box Dual 10MG Drives $2,200.00' (47 52) 160CPSn32COLIFnc*Trac Maynard Maynslream System 20 wICTLR 879.00* (18.99) *• Citizen MSP-25 NEW 499.00* (10.76) Portable 20MB Tape Backup System Panasonic Hall Height DS/DD Drive Pair 200CPSI132COUFric+ Trac 145.00* (3.10) C. Itoh Prowriter 8510 AP+ 315.00* (6 80) ►• PC Network (OMfi ".":'■', Ai ; 330.00* [7 13) *■ Epson t.X 80 100CPS 80 COL LO Mode 199.00* ■ > Epson FX 85 299.00' (646) Dm .' ■ ■ , ■■ indori ■#• Epson rx- 185 429.00' (9 27) ► PC Network 20MB INTERNAL 1/2 Height 420.00* (9.07) Epson L Ql 500 B15.00" 117 60) Drive— Drives by Tandon or Seagate PC Network 10MB Tape Backup Same Unit used in Compaq's DeskPio' Epson SQ2000 NEW Inkjet Printer ,359.00' (29 35J 495.00' (10.69) 106CPSLO Modem 76CPS DralV 132COL > NEC ?05() 30CPS Letter QuaMv Printer 605.00* ('3 00) ► PC Network >;,■■ rtl OS DD D"ve 69.00' <1 49) > NEC 3530 33CPS LO Parallel 088.00' ■ ■ ■ ► Tandon '.'.* '00-2 fut< Height DS DDDnvt 93.00' \220) > NEC 3550 33CPS Letter Quality Punter 920.00- (79 871 Talkjr.*:.:. , jD-n*. 2.375.00- I5> 30) > NEC 3050 55CPS Printer ► OkldataMt l82New120CPS;LO ,330.00- CALL (28 73) p- Teac FD Sb-B Halt Heiqhi DSiDD Drives 90.D0' (1.94) 'i-iClBMG'.it'hics ■ to- ► Teac i 2MB Hall Height Disk Drive for AT 110.00' (2.40) *■ OkldataMt 192 NEW Sleek Design' 16QCPS CALL MEMORY CHIPS All chips guaranteed lor life LO ModetFncltBM Graphics ► OkldataMl- 1 64K Memory Upgrade Kits, ► 64K Dynamic Ram Chips fEfiChJ S 5.40" tlQOi *■ OkldataCo/o/20fi0CPS IOOh C tors CALL .60' (1.00) »■ 256K Dynamic Ram Chips (Each) **> 1 20K AT Mother Board Chips (£aoh) 3.00* 00) Qurrie Sprint 1 V40 40CPS Letter Quality ,155.00' (24.00) 5.00' (100) Qume IBM Cable and Interface (reguired) 72.00* (1.00) MODEMS **■ Anchor Signalman Express Hayes Smartmodem 300 > Texas Instruments 855 DP1LQ w/Tractor 679.00' (14.70) $ 205.00* 125.00' (5.00) (5.00) Toshiba P1340 80 COW 44 CPS ToshlbaP351 New' 288CPS/132COL 499.00' 995.00' (10.78) (21.49) t** Hayes Smartmodem 2400 535.00* (5.00) VIDEO CARDS LATEST IN COMMUNICATION TECHNOLOGY' Hercules Color Card wlParallel Port ! 142.00' (2 50) Hayes Smartmodem 12008withnew Smartcom II VTI00 Emulator Hayes Smartmodem 1200B Alone 317.00' (2.50) ►■ Hercules Monochrome Graphics Cards 263.00* (2 50) 265.00' (2.50) Paradise New Modular Graphics Card ► PC Network Hercules Mono Card Clone 235.00' 105.00* (2 50) (2. SO) Hayes Smartmodem 1200 355.00' (5.00) 100% Hercules Compatible' Prometheus Promodem 1200 276.00* (6.00) ►• PC Network Cotor Card 80.00* (2.50) External 100% Hayes Compatible Persyst Bob Card Ultra High Res Color Card with Mono Quality Text in Color 299.00' (2.50) r*- U.S. Robotics r.i: m 195.00' (4 00) LOWEST PiltCC 1200I3PS Modem' ► STB Graphix Plus II NEW! 199.00' (2.50) ► U.S. RobotlcB Coulter 2400BPS Modem 450.00* (5 00) (simultaneous Mono Graphics & Color) MONITORS Amdek Video 300G Composite Green STB The Chauffer Color & Mono Card 239.00' (2.50) $ 110.00' (3.00) Runs Color Software in Monochrome with No Special Drivers'! Amdek Video 300A Composite Amber Amdek Video 3 10A IBM Type Amber Amdek Color 300 (NEW) Composite 120.00* 130.00* 215.00* (3.00) (3.00) (4.64) ACCESSORIES AND SUPPLIES *■ Brand Name DS'DD Diskettes S 8.95' tt 00) Amdek Color 600 (NEW) High Res RGB 365.00* (7.88) ■*■ DS/DD Bulk Pack Special' Packaged in 50 with sleeves and labels .79* M, Amdek Color 700 (NEW) Ultra High Res Amdek Color 710 (NEW) 700 wINon 455.00* (9.83) 465.00* (1048) Guaranteed for Life'! Glare/Long Phosphor Princeton HX- 12 RGB Monitor CALL ► PC Network Replacement 130 Watt IBM-PC 82.00* (2 70) Power Supply — Gives your PC (Old or New) the same Princeton MAX-12E CALL capacity as an XT Good for add in tape drives (without need Supports Either Mono or RGB Cards Princeton Sfl- 12 Ultra High Res RGB CALL for a piggyback unit) and large capacity disk drives SMA PC Documate. Keyboard Templates for 9.99* aooj *■ Quadram Quadchroma it NEW 370.00* (8.21) LotuslDBASEIMultimate and others (Each) 640x200 RGB w/14" Screen! Sony DS/DD Diskettes 19.95' (1.00) Black Phosphor Mask/IBM Case Sony AT Hiqh Density Diskettes WP Printer Paper 2600 Srieefs 39.95' (1.00) ►• Samsung IT TTL IBM Type Amber 85.50* (5.00} 17.00* (10 00) ■. . Microfme Perls (invisible when torn) COlO' '. ' ' 'PC NETWORK Members pay just 8% above the wholesale Taxan 440 Highest Res RGB (720x400) Currently Available Works With Persyst 495.00* (10.69) price, plus shipping. Ail prices rellect a 3' Minimum shipping S2.50 per order. Internatio .ash discount, lal orders call for Bob Card Zenith ZVM- 123 Green High Res 76.00* (2.50) shipping & handling charges. Personal checks please allow 1 working days to clear tRENT BEFORE YOU BUY — Members are eligible to join The NETWORK'S Business and Game Software Rental Libraries and evaluate products for a full 14 (Regular) or 30 (VIP) days to see if it meets your needs. And The NETWORK'S rental charges are far less than other software rental services — JUST 20% OF THE MEMBER WHOLESALE PRICE. We feature over 1,000 available titles in IBM/Apple/MAC and CP/H Formats. Hardware prices highlited by ^ reflect recent major price reductions COMPLETE SYSTEMS ptional local warranty service available in most major metro areas) IBM PC BASE SYSTEM IBM PC W/256K Floppy Drive Controller 2 Double Sided Double Density Disk Drives $1,495.02* CALL FOR LATEST IBM ANNOUNCEMENTS IBM PC HARD DISK SYSTEM IBM PC W/256K Floppy Drive Controller 1 Double Sided Double Density Disk Drive Half Height 10MB Disk Subsystem $1,749.00* CUSTOM CONFIGURATIONS WELCOME comma TM PORTABLE HARD DISK SYSTEM w/256K/ 1 Floppy/ Hard Disk $2,235.00 w/iomb $2,369.00* w/2omb DESKPRO SYSTEM WITH TAPE BACKUP 640K CPU/1 Floppy/ Hard Disk 10MB Tape Drive/Monitor $2,951 .94* w/io mb $3,151.94* W/20MB Wholesale Prices Change Rapidly... if you ever see a lower price advertised anywhere please call! You will find the Network's Price will always be the best! 64K IBM PC MEMORY EXPANSION KITS Quantity Discounts Available. Guaranteed for Life! M00 3 * ##* Quantity of 100 Sets $3.96* per set Set of 9 Chips $5.40* BRAND NAME DISKETTES DS/DD Box of 10 Guaranteed for Life! Not Generic . $8.95" DS/DD Bulk Pack Special Packaged in 50 Guaranteed for Life! Each .79' 1/2 HEIGHT DS/DD DISK DRIVES The Network buys direct and makes fantastic deals with manufacturers like Tandon/CDC/Shugart/Qume/ TEAC/Hi-Tech and others to bring you fantastic prices on Name Brand drives for your PC/AT/XT/jr/or Compatible. $69.00* Quantity Discounts Available $265.00 INTERNAL PC HARD DISK Low Power/Automatic Boot. Works on standard PC's and Compatibles. Includes drive/controller/cables/ mounting hardware and instructions. Full one year warranty! 10MB $330.00' 20MB $420.00' Quantity Discounts Available MultiMate Professional Word Processor $200.00* *Members pay 8% above this wholesale price plus shipping. CALL TOLL FREE 1-800-621-S-A-V-E (£S&) In Illinois call (312) 280-0002 Validation code: B3XX TM— Registered trademark of IBM and COMPAQ NETWORK ...WITH THESE 15 UNIQUE BENEFITS 1COST + 8% PRICING— The NETWORK purchases mil- lions of dollars in merchandise each month. You benefit in receiving the lowest price available and all at just 8% above published dealer wholesale price. 2 OUR 600 PAGE WHOLESALE CATALOG— Members re- ceive our 600 page wholesale catalog containing over 20,000 hardware and software products for the IBM PC, APPLE and over 50 other popular computer systems. THE NETWORK'S CATA- LOG IS THE LARGEST SINGLE COMPILATION OF PERSONAL COMPUTER PRODUCTS AVAILABLE TODAY. NOW UPDATED QUARTERLY! 3 IN-STOCK INSURED FAST HOME DELIVERY — The NETWORK maintains a giant multi-million dollar inventory of most popular products, allowing us to ship many orders from stock. Non-stock items are typically maintained in local ware- houses just days away from The NETWORK and YOU. We pay all insurance expenses on your shipment. EMERGENCY OVER- NIGHT SERVICE IS AVAILABLE ON REQUEST. 410 DAY RETURN POLICY — If you are not satisfied, for any reason with any hardware component purchased from The NETWORK within 10 days of receipt, we will refund your entire purchase (less shipping) with no questions asked. 5 MEMBERSHIP SATISFACTION GUARANTEE— If for any reason you are not satisfied with your membership within 30 days, we will refund your dues IN FULL. 6 EXPERIENCED CONSULTANTS— The NETWORK hires consultants, not order takers, to aid you in product selection. Our consulting staff possesses in excess of 1 50 man years ol per- sonal computer product experience. We back our consultants with our money back guarantee: IF ANY PRODUCT RECOM- MENDED BY OUR CONSULTING STAFF FAILS TO PERFORM AS PROMISED — WE WILL TAKE IT BACK AT OUR EXPENSE FOR A 100% REFUND. 7 FREE TECHNICAL SUPPORT— The NETWORK supports every product it sells. Our qualified TECH-SUPPORT staff will help you assemble your system, interpret vendor documentation and get your software and hardware to work. WE WILL GIVE YOU ALL THE HELP YOU NEED, WHEN YOU NEED IT— FREE! + Q OPTIONAL BUSINESS RENTAL LIBRARY— All mem- O bers can join our BUSINESS RENTAL LIBRARY featuring over 1000 available titles for just $25 PER YEAR above the base membership fee. This entitles you to rent business software AT JUST 20% of the DISCOUNT PRICE FOR A 1 4 DAY PERIOD. If you decide to keep the software, the entire rental fee is de- ducted from the purchase price. VIP MEMBERS GET A FULL 30 DAYS for just $30 above the V.I. P. base fee. This also in- cludes the game library privileges for a $5 combination savings. t Q OPTIONAL GAME SOFTWARE RENTAL LIBRARY — 5/ The Game Rental library is available to members for just $10 PER YEAR and permits evaluation (or just enjoyment) of any game or educational software product as above. 1f\ SPECIAL SAVINGS BULLETINS— THE PRINTOUT U — Issued Quarterly at no charge to Network members only! The Printout contains all the New Product listings and price changes you need to keep your Catalog up to date. Also, we buy excess dealer inventories, and store bankruptcy closeouts, which we turn around and make available to our members at fantastic savings via THE PRINTOUT. 14 DISCOUNT BOOK LIBRARY— Working with numerous I publishers and distributors, The NETWORK has assembled a library of over 1 000 computer related books and manuals at sav- ings of up to 75% from the normal store price. 1Q MEMBERSHIP REFERRAL BONUS — Our most valu- £. able source of new members is you! To date almost 40% of our members have been referred by word of mouth from other sat- isfied members. For those of you who refer new members, The NETWORK will credit a cash bonus to your account applicable to any future purchase. 1Q CORPORATE ACCOUNT PROGRAM— Almost 50% of O The NETWORK'S members are corporate buyers and users (see opposite page left). The NETWORK can establish open account status and assign designated account managers to ex- pedite orders, and coordinate multiple location shipments. 1A QUANTITY DISCOUNTS— For large corporations, clubs, *T and repeat or quantity buyers The NETWORK can extend additional single order discounts, when available to us from our manufacturers and distributors. IE PRICE PROTECTION— The PC Industry is crazy!! Prices O change not yearly or monthly or even weekly but often day by day! These changes are sometimes up but are mostly down!!! THE NETWORK GUARANTEES THAT IN THE EVENT OF A PRODUCT PRICE REDUCTION, BETWEEN THE TIME YOU PLACE YOUR ORDER AND THE TIME THE PRODUCT SHIPS YOU WILL ONLY PAY THE LOWER AMOUNT!! Inquiry 146 The Warp Speed Light Pen. Works As Fast As \bu Think. First there was the keyboard. Then there was the mouse. Now the most powerful and versatile input device is the WARP SPEED LIGHT PEN with its powerful CONTROLLER software. What once required many keystrokes or taking your mouse for a walk, now occurs with the touch of a pen. Instant Compatibility Instantly you're working faster. Simply plug the WARP SPEED LIGHT PEN into the light pen port on your monitor adapter card. The WARP SPEED LIGHT PEN with the push tip actuation switch is completely compatible with the IBM PC, AT, JR, XT, and almost all IBM compatibles and clones. The WARP SPEED LIGHT PEN works on all screens, even the difficult IBM P-39 green and Amdek 310 Amber. For additional speed and less fatigue, THE WARP SPEED LIGHT PEN'S lightweight Aluminum design is the lightest ever. THE WARP SPEED LIGHT PEN $199.99 WARP SPEED LIGHT PEN Includes free CONTROLLER software. A complete file management system. CONDUCTOR 2.0 NEW VERSION $79.99 Enhancements and Light Pen Controller for all versions of Lotus 123 and Symphony. $69.99 PENMOUSE Converts all mouse software to Light Pen control. GEMLIGHT $69.99 A Light Pen controller and enhancement driver for GEM. WARPSTAR $69.99 A Light Pen controller and enhancement driver for WORDSTAR. All software not copy protected. The Fastest Draw In The West Run circles around the mouse with the new converter program PENMOUSE. It converts all Mouse operated soft- ware to light pen control. So now the light pen has more soft- ware applications than the mouse, including PC Paintbrush, PC Draw and Autocad. And it's only $69.99. Not copy protected. Free Software and One Year Warranty The WARP SPEED LIGHT PEN comes complete with its powerful CONTROLLER software and a full one year war- ranty. You can add even more versatility with driver pro- grams for LOTUS 123, SYMPHONY, WORDSTAR, GEM or design a custom program with help from our expert staff of programmers. The chance to work almost as fast as you think waits for you at your local dealer. Grab it. To order direct call 1 -800-874-4315 (In California 1-800-826-1563) ©Copyright 1985, Warp Speed Computer Products Inc. Los Angeles, CA. All rights reserved. Warp Speed, Light Pen Controller and Penmouse are Trademarks of Warp Speed Computer Products Inc. WARP SPEED, LIGHT PEN CONTROLLER and PENMOUSE are Trademarks of WARP SPEED Computer Products Inc. All other trademarks used in this advertisement are hereby acknowl- edged as rights of their respective owners. 142 • Fall 198 1 ) BYTE' Inside the IBM PCs / 1000 coccn Wl ll\l -II i I l I SPEED FOR THOUGHT WARP SPEED COMPUTER PRODUCTS 5555 Inglewood Blvd. Los Angeles, CA 90230 Inquiry 212 for End-Users. Inquiry 213 for DEALERS ONLY. INSIDE THE IBM PCs Circuit Design with Lotus 1-2-3 Use the famous spreadsheet to design circuits and print out schematics <*> by John L. Haynes SPREADSHEETS, espe- cially those with graphics, are not just for business applications; they can be of great help to circuit designers or anyone else designing systems that can be described by equations. As an example, let's take a look at the application of one spreadsheet, Lotus 1-2-3, to one technical problem, electronic circuit design and analysis. We'll look at both digital and linear circuits. Digital Circuits Digital circuits are built from logic building blocks— inverters, NAND gates, flip-flops, etc. We can simulate each of these components with the equations in a cell of a spreadsheet, using the spreadsheet's built-in logical operators shown in figure 1. For instance, in the spreadsheet portion of Lotus 1-2-3, the equiv- alent of an inverter is the operator #NOT#, struc- tured as #NOT#(A= 1). This structure means the state of the operator #NOT# is not true, or equal to a logical 0, if the state in the paren- theses is true. This is equivalent to the output of an inverter circuit whose in- put is A. Similarly, the model of a NAND gate, #NOT# (A=1#AND#B = 1). is not true if input A and input B are both true. The flip-flop is a bit more complex, EDGE DETECTOR SYNCHRONOUS LOGIC M SCHEMATIC DIAGRAH since its output depends not only on its input conditions but on the transi- tion of a clock pulse. For simplicity, let's assume that there is a narrow clock pulse that triggers the flip-flop whenever the clock pulse is true— in other words, whenever its logic state is a logical 1. The Q output remains in its present state until the clock is true; it then assumes the state of the input D. The O' output is the logical opposite of Q. These actions are easily simulated using the logical @IF function. It is structured as @IF(AB,C) and means IF A THEN B ELSE C. That is, if the logical condition of A is true, then the function equals B. Otherwise, the function equals C. Setting the variables as @IF(C= 1 , D,Q). we can interpret the state of the function as: If the clock C is true, the state is equal to D; other- wise, it remains Q. The Q' output is handled with the #NOT# operator. Given the ability to simulate logic compo- nents with spreadsheet functions and operators, let's now look at how we can use this technique to build a simple digital cir- cuit. The synchronizing circuit of figure 2 is a com- monly encountered ar- rangement. Known vari- ously as an edge detector, a synchronizing circuit, and a digital differentiator, it develops a pulse one clock period long when an external, {continued) John L. Haynes is associate director of the Bee- ton Dickinson Research Center, Research Triangle Park, NC 27514. He has been "ac- tive in the R&D of computers since the vacuum-tube days (64 bytes of RAM!)'.' He has spent the last 18 years in health-care product development. His interests are pho- tography, running, computers, and his new grandchild. Fall 35 BYT E • Inside the IBM PCs 143 1-2-3 CIRCUIT DESIGN Table 1: These are the named ranges in the worksheet of figure 3. Naming the ranges , or the variables makes the equations in range K6..K11 easier to follow and understand. Named Range Cell CLOCK K6 MEMR' J7 QQ1 J8 QQ1' J9 QQ2 J10 READY J11 DIGITAL LOGIC COMPONENTS OUTPUT EQUATIONS COMPONENT TYPE LOGIC SPREADSHEET INVERTER - A^>0 NOT A #N0T#(A=1) 25 - 20 - NAND ii> NOT(A*B) #NOT#(A= 1 #AND#B=1 ) 15 - 10 - NOR | p NOT(A+B) #N0T#(A=1#0R#B=1) TYPE D D Q D (at C=1) ®IF(C=1,D.Q) 5 - - C FLIP-FLOP C Q' — NOT Q #N0T#(Q=1) ) 20 40 6 Figure 1: logic components simulated by lotus 1-2-3. EDGE DETECTOR SYNCHRONOUS LOGIC 28 - 26 - 24 - P READY B 7 22 - 20 - 18 - D1 Q1 D2 Q2 16 - 14 - 12 - 10 - C1 or C2 02' 8 - 6 - 4 - 2 - - 1 5-Aug-84 20 40 SCHEMATIC DIAGRAM Figure 2: Edge-detector schematic drawn by Lotus 1-2-3. asynchronous event occurs. In this case, it is configured to give a negative pulse, synchronized with the clock, whenever the MEMR' input goes negative. (In a microprocessor circuit, MEMR' might be a Memory Read signal.) The edge-detector circuit (see the text box "Schematics on Lotus l -2-3" on page 146 for an explanation of how the circuit was drawn) uses two D flip-flops and a NAND gate. Starting at the left side, we need to describe the input signals for MEMR' and CLOCK, use them as inputs for the first flip-flop, and then take the flip- flop's output to the second flip-flop until we reach the output of the NAND gate in the upper right. The spreadsheet to accomplish this is shown in figure 3. It is laid out in two major sections. Variables and Plot Values. The equations for each of the out- puts of the logic components of figure 2 are displayed in text format in col- umn K of the Variables section. The cell at K8 gives the output equation for Ql . The formula used is that of the D-type flip-flop component described in figure l. modified to show that the Dl input value is MEMR'. This has the effect of specifying the circuit connec- tion from MEMR' to Dl. For clarity, the variables in the for- mulas in column K refer to signal names, that is, cell names, rather than cell coordinates. The names used in the formulas are shown in table 1 (you input them using the commands /RANGE, NAME, CREATE). Note that all the named ranges are in column I, with the exception of the CLOCK signal, which is in column K. This makes the state of the outputs in col- umn K dependent on the values in the preceding column, 1. Column 1 holds the initial values for each independent state. The flip-flop names used in the formulas are QQx rather than Qx to avoid confusion with column Q cells. The formulas in cell range K6..K11 have been copied into L6..BM6. This creates a series of logic states that can be interpreted as the time sequence of states for each variable. The two input signals are not 144 • Fall 1985 BYTE- Inside the IBM PCs 1-2-3 CIRCUIT DESIGN created by the logic components of our circuit but must be specified by us. The initial value of MEMR', in cell 17, is set to 1. Each succeeding cell in row 7 is a 1 until cell AA7, which has been set to 0. That value continues for the rest of the row. The CLOCK signal is a little trickier. Its formula, in K6, is set to repeat the value of the cell A6, which is 10 col- umns back. Repeated along the whole row, this makes each clock state dependent on the state 10 cells back. This gives a series of zeros in cells L6 to S6, as each cell looks back to a zero-containing cell 10 columns back. At cell T6, however, things change; it looks back at the initial value in cell 16, which is set to ©TRUE, so T6 is a 1 . This sequence repeats each 10 col- umns. The next positive clock pulse is in AD6. Looking now at the logic states of the logic components, as represented by rows 8 to 1 1 , we see that the out- puts remain the same at each column until the clock signal is positive, as in column AD. Then the outputs of flip- flop Ql change state as MEMR' is strobed into it. (No change happened at the clock signal in column T because Ql was already in the same state as MEMR'.) While very useful, the sequence of Is and 0s is not near- ly as satisfying as a graph. To plot the results of the logic states, we need to stack them one above the other for clarity as in figure 4. This is the function of the Plot Values section. The logic state of the CLOCK in cell L6 is added to the offset in cell A17 and placed in cell LI 7. The formula in L17, +L6 + SAI7, is copied to the en- tire region from L17..BMI7. As a result, each logic state is added to its appropriate offset and placed in the Plot Values region. When the formula is copied into LI 8, the copy logic of 1-2-3 will make the cell formulas relative, so the formula in LI 8 becomes +L7 + SA18, and the MEMR' logic state is added to its associated offset value of 9. The $A notation means that the column reference is absolute rather than relative; this en- sures that when the formula is copied into succeeding columns it continues to use the offset values of column A. The six output states are now ready to be plotted as graphs A to F. The graph type chosen is Line, formatted as Line Only. To plot the results, we must assign regions for each graph. Let's start by concentrating on the first line of the plot, the CLOCK signal, plotted as graph A. The region assigned to graph A is the entire row 17, A17..BM17, a total of 66 columns. The Line mode of 1-2-3 plots that as follows: The horizontal axis is divided into 66 equal segments, and the value of each cell is plotted at the ap- propriate vertical location. In Line Only format, only points in adjacent columns are plotted. Isolated points are not plotted. These features determine the look of the graph of the CLOCK signal. There are no adjacent nonblank cells until column L, so the graph doesn't start to plot until the twelfth horizontal tick mark. That leaves a blank begin- ning space for the label. The label is inserted using the Data- Label facility of 1-2-3. Selecting graph A, we assign the range as cell A6, aligned right. This will print the label "CLOCK" in cell A6, to the right of the value in cell A17. Each of the remaining five graphs is plotted and labeled the same way. The names of A6..A11 also serve as the labels for each graph; the offsets of A17..A22 serve to locate the labels. The columns B to I serve two func- tions: They provide the space at the start of the graph for the label and allow the CLOCK formula in K6 to look 10 columns back to set up the clock. [continued] 1 2 3 A BCDEFGrU J K L M N P R S T U V VI X Y Z AA AB AC AD AE AF AG AH AI INITIAL 4 5 6 NAME CLOCK VALUES FORMULAS LOGIC STATE VS TIME - — > PTRUE +A6 U 1 1 7 MEMR' 0TRUE +MEMR ' 1111111 1 1 l l 1 1 1 1 U a Ql 9TRUE eiF(CL0CK=l,MEMR ',0QD 1111111 1 1 l l 1 1 1 1 1 1 1 9 01' #NOT#(OQ1=1) U U U u u 1 1 1 1 1 10 02 0TRUE 81F(CL0CK*1,QQ1, 002) 1111111 1 1 l l 1 l 1 1 l 1 1 1 1 1 1 1 1 11 12 13 READY #N0T#(Qyr=l#AND*QQ2=l) 1111111 1 1 l l 1 l 1 1 l 1 1 1 1 PLOT VALUES 14 15 16 17 OFFSET 11 GRAPH: PLOT VALUE VS TIME - --> A: 11 11 11 U 11 11 11 11 12 n n 11 u 11 11 n 11 11 12 11 11 11 11 11 IS 9 n 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 9 9 9 9 9 9 9 9 9 19 7 C 8 3 B 8 8 S 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 7 2U 5 D 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 21 3 F 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 22 1 F 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 A BCDEFGH J K L M N P R S T U V w X Y Z AA AB AC AD AE AF AG AH AI Figure 3: Spreadsheet to analyze edge-detector circuit. Fall 1985 BYTE- Inside the IBM PCs 145 1-2-3 CIRCUIT DESIGN Schematics on Lotus 1-2-3 Avery crisp, professional-looking schematic can be drawn by using the graphics mode of a spreadsheet. The results in figure 2 speak for them- selves. Chances are you've never considered using Lotus 1-2-3 to draw a schematic. So how is it done? lust a simple XY graph, drawing lines from point to point. What's the secret? Lotus draws no line if a point is missing in a range; this allows us to put blanks between groups of data to draw numerous unconnected components. We can then interconnect them at will, using additional groups of data to draw the connections. The spreadsheet in figure 10 contains the data to draw figure 2. It's organized in two groups; the first, Al .138, handles the components and their labeling. It is shown in the left column of the figure. The group on the right, A40..I75, handles the interconnections and completes the labeling. Step I: Draw the Components The seven pairs of numbers in the range B6..DI2 define the first flip-flop, FF1. The pair (1 5,8) is the lower left-hand corner of FF1. The next five pairs of numbers define the four corners and mark the the two input ports. The last pair (1 5,8) closes the box back at the starting point. If components are used more than once, you may want to generate a component primitive table as in figure II. The shapes can then be copied to the desired location by adding the appropriate offset to the X and Y values. The next group, in range BI4..D20, defines FF2 in the same way. The last group, in range B22..D37, outlines the NAND gate. The curved outline requires far more points than the rectangle of the flip-flops. The isolated point at (48,25) will pro- vide the label to put an O on the NAND output to provide the little circle that signals that it is an inverting output. Using the O saves drawing another 8 to 10 points to draw a circle. Defining the graph type as XY. set the X graph range to B6..B37. Set the A range to D6..D37. Set the scale manually to get a 30 by 60 plot. Step 2: Add the Interconnecting Lines The data in the right-hand group B45..D68 defines the connections. Each con- nection is labeled for function in the Comments column. To plot the interconnects, extend the X and A ranges to include their data; the X range is now B6..B68, and the A range is D6..D68. Step 3: Add the Labels and the Datestamp Extend the X and A ranges down to include rows 69 to 74 and pick up the date stamp and input signal label points. Then use the Data-Label option to define a label range for graph range A. This is the set of labels in column E. So the label range is set to E6..E74. Select location Right from the menu when defining the data labels to put the labels to the right of the selected points. The label will plot about one character to the right of the plotted point in graph range A. Notice how nicely this puts the little circle on the NAND gate. The date in cell E70 is a ©TODAY function, so it keeps the data sheet and schematic up to date automatically as changes are made and saved. Use the Titles option to set up your titles at the top and bottom, and the graph of figure 2 results. All the figures in this article were done using Lotus 1-2-3. The resulting graph of figure 4 is very easy to follow. It's now clear how the circuit works to put out a syn- chronized pulse when MEMR' goes negative. The next CLOCK signal (the second pulse of our figure) strobes the logical zero state into Ql, driving Ql' positive. Since Q2 is unaffected at this clock time, its output is still a logical one. With both inputs of the NAND gate now positive, its output goes negative, starting the READY signal pulse. The next CLOCK pulse strobes the logical zero output of Ql into flip-flop Q2, sending its output to zero. This pulls the B input of the NAND to ground, sending its output positive and terminating the READY signal. It's clear that the READY signal will be exactly one clock period long, synchronized with the CLOCK signal. The circuit of figure 2 is a good ex- ample of the power of a spreadsheet program to diagram a digital circuit, analyze it, and plot the results. If the results aren't what you want, it's easy to change the design. For example, what if the input for the NAND gate is taken from the opposite outputs of the flip-flops? Linear Circuits The analysis of transient effects and frequency response in linear circuits can also be modeled very effectively using spreadsheets. The added graph- ics of Lotus 1-2-3 can show the result- ing waveforms at the press of a key, allowing an interactive modification of the circuit to get the desired response. No differential equations need be solved, no integrals evaluated. All that is necessary is to model the incremen- tal changes that occur in a brief time period. The three important linear circuit elements— resistors, capacitors, and inductors— are modeled in figure 5. As in the digital case, we can set up equa- tions that describe the behavior of the elements; those equations can then be modeled in the equations of a spreadsheet cell. The simplest linear element is the resistor, whose behavior is described by Ohm's law: The ratio of voltage to (continued) 146 Fall 1985 BYTE- Inside the IBM PCs Technical Bulletin SUBJECT: Engineering a LAN for Maximum Flexibility. now available for the IBM-PC, IBM-AT, PC compatibles, DEC Rainbow and TANDY 2000. If you have been waiting for a Real- time Multi-tasking Multi-user Operating system with fourth generation LAN support, then QNX 2.0 can offer you today what the competition can't even begin to promise for the future. QNX 2.0 integrates the Local Area Network architecture right into the heart of the operating system, at the fundamental level of intertask communication allowing tasks to communicate transparently with other tasks across the whole network. This means that any task (program/application) may access ANY serial port, ANY printer or ANY disk on the network. There are no artificial restricitons. Every PC with a disk is a potential file server. PCs without disks will automatically BOOT over the network. QNX on the IBM-PC AT: QNX is the first Multi-tasking Multi-user Operating system available for the AT. It networked and single machine configurations. At about 2.5 times faster than the QNX 8088 PC based systems, and 10 times faster than other multi- tasking operating systems on the same processor, QNX is the ideal program development environment. Computer Processor Measured time 480 usee 4,930 usee QNXTM IBM-PC AT 80286 480 usee XENIX tm lntel-286 80286 4,930 usee File Security: Designed with extensive file security features, QNX 2.0 provides login protection with network wide file permission checking based on 255 groups of 255 users. In addition, each PC user may control network access to devices attached locally to their machine. Distributed Processing: The QNX LAN supports distributed processing as well as distributed devices. Tasks may be executed on remote stations as easily as they may be executed on the local work station. This allows pure processing elements (PCs without keyboards or i "~ ,Vhha "'ugged into the network to be used as an process control, data acquisition ant applications. Global Communications: QNX supports a full implementation of X.25 allowing connection to public networks such as Telenet and Datapac. This allows you to link geographically separate LANs together providing true global area networking. Cost Effective Growth and Flexible Solutions: QNX is affordable, and will work with the PCs you use today and those you will use tomorrow. You may mix and match different brand PCs on the same QNX network with absolute ease. Multi- user expansion may be accomplished by adding terminals to PCs or PCs to the network. You can start your multi-user application on a single PC with 1 to 10 attached terminals. Once your single processor starts to show signs of degradation, add another PC and connect terminals to the new processor. If the disk becomes the major bottleneck, you may add hard disks to other attached PCs to distribute the processing. Applications which are very CPU intensive may wish to limit a single user to each processor and expand the system with low cost diskless PCs used as work stations. QNX does offer a truly cost effective and flexible solution to your applications needs. Portability: QNX 2.0 is portable; The operating system is independant of the physical local area network. It is available in a form suitable for porting to other 8088/8086/80186/80286 computers in the consumer, educational and industrial market place. QNX is ROMable and can operate in as little as 128Kb RAM; DOS Compatibility: PC-DOS version 2.1 can run as a task under the QNX 1.2 or 2.0 operating systems. QNX will also allow transparent access to the DOS file system partition and floppies. QNX Products: QNX Operating System Full Screen Multi-terminal Editor Extended Utilities C Compiler & 8086 Assembler Basic Compiler Qbol. (dibol) Compiler Text Processor Real Time Spelling Checker PC-DOS Emulator Electronic Mail Electronic Teleconferencing Full Screen Menu Developer Isam File Utility Networking Board OEM Customization Kit (to port QNX) Established: Quantum sold over 1 0,000 copies of its operating system during 1984, into all business systems environments, to developers of kooi time applications, government and educational systems, to rare developers/integrators, universities and research SOFTWARE SYSTEMS LTD. Moodie Drive, HiTech Park, ^215 Stafford Rd. Ottawa, Canada K2H 9C1 (613) 726-1893 1-2-3 CIRCUIT DESIGN current is the resistance. The behavior of a capacitor is a little more complicated. The nature of a capacitor is to resist changes in voltage. The equations of figure 5 show that the current / flows into a capacitor C for a period of time DT. to build up the charge necessary to change the capacitor voltage VC by an amount DV. The larger the capacitance, the smaller the voltage changes for a given current change. The new voltage is the sum of the previous voltage, VC, plus the incremental change caused by the previous current flow, /: 13 12 1 1 10 9 8 7 6 5 4 3 2 1 Q2 READY a r I I I M I I I M I I I I I I I I I I I I I I I I I I I I I I M I I I I I I I I I 1 I I 1 I I I II I II I I M I I ) I I I SIGNAL TIMING DIAGRAM Figure 4: Timing diagram for edge-detector circuit. LINEAR CIRCUIT COMPONENTS 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 CIRCUIT EQUATIONS COMPONENT TYPE CIRCUIT SPREADSHEET - RESISTOR "VVV — V = l*R V = l*R INDUCTOR - / JT S ' Dl = V»DT/L Dl = VDT/L CAPACITOR DV = l*DT/C DV = l»DT/C l 1 Figure 5: Linear circuit components simulated by Lotus 1-2-3. VC = VC + DV VC = VC + l*DT/C The behavior of the inductor is the in- verse of the capacitor behavior; that is, the inductor resists changes in cur- rent when a voltage is applied across its terminals. The voltage VL must be applied for a time DT to build up flux in the inductor and allow a change Dl in current flow. The larger the induc- tance, the smaller the change in cur- rent for a given applied voltage. The new current is the sum of the previous current / plus the incremental change caused by the previous voltage VL: 1 = / + Dl 1 = 1+ VL*DT/L These circuit elements can now be combined to form a number of cir- cuits that we can then analyze with our spreadsheet modeling technique. For example, let's look at the sim- ple circuit of figure 6. The capacitor C is charged through the resistor R. What is the resulting response to a step input V,„? Those with circuit ex- perience will recognize that the capacitor does not change voltage in- stantaneously; it charges up at a rate related to the amount of current flow- ing into it through the resistor. This is the behavior shown by V„„, r the out- put voltage taken across the capacitor. The spreadsheet that generates figure 6 is shown in figure 7; it is similar to the sheet that generated figure 4. The section added at the top describes the circuit operating condi- tions. The input is a 5-volt (V) step, stored in cell E2. The resistor and capacitor values are in cells E4 and E5. The Variables section assembles the formulas for the circuit components into a circuit; the resulting matrix describes the circuit operation. Cells in the formulas block, K13..K18, define the circuit. Once defined, the formulas are copied into range L13..DF18. which lays out those values versus time. The time clock is in cell K.13. It copies the previous value and adds to it the value of one clock tick, DT. [continued) 148 Fall 1985 BYTE- Inside the IBM PCs Tired of waiting for your PC? End the wait!.. Special Offer Only $49- 95 * This SPECIAL PRICE OFFER absolutely ends on October 31, 1985. DoubleDOS Multi-tasking, concurrent processing using today's software and your PC, XT, or AT system! No matter how good your IBM PC is, you still have to wait while it processes and calculates for a long report, spread sheet, payroll, or whatever. This waiting is cost- ing you time and money. Now, DoubleDOS lets your PC actually run programs concurrently! Think of the ways DoubleDOS will save you time and money: • BUSINESS. Run a spreadsheet, and at the same time, print the payroll checks or accounting reports. • WORD PROCESSING. Work on another document while printing or spell checking previous work. • PROGRAMMING. Compile programs while starting new ones immediately. • COMMUNICATIONS. Receive or send information while you use the PC to do other tasks. DoubleDOS has endless applications! Listen to what users are saying about DoubleDOS: "It let's me get more done. Lotus and dBase run to- gether like they were made that way and it only takes 30KinRAM!" "Great product! It is solid, painless, and bulletproof!" "Simply the best program I've ever had." "I'm thoroughly impressed. Fantastic . . . great value- to-cost, too!" "Excellent product at an excellent price (hard to find today)." "Great stuff! I use it to do compiles and links while editing. Saves a lot of time!" "Your programming staff deserves a standing ova- tion for their efforts and results!" "I can't believe how fast it works, rarely notice slow- down when using 2 programs." "Plus $5.00 Shipping & Handling. SoftLogic Satisfaction Order Toil-Free: 1-800-272-9900 SOLUTIONS Guaranteed! Creators of the Disk Optimizer 530 Chestnut St., Manchester, NH 03101 1-800-272-9900. In NH, call 627-9900. DoubleDOS works with PC-DOS and your existing software. Also supports many compatibles using MS-DOS. Inquiry I8I Fall I985 BYTE- Inside the IBM PCs 149 1-2-3 CIRCUIT DESIGN DT is set at l microsecond (j*s): we'll come back and review this choice later. The input voltage, V,„, is set to quasi-DC; it repeats whatever value it had previously. The exception is cell Ol4, which is set to the value in cell E2 in the Circuit Parameters section. This gives us the desired 5-V step in- put at t=5 (is. Cell Kl 5 contains the most complex of the formulas. It sets the value of the capacitor voltage VC. As described in the circuit element equations of figure 5, the value is the previous value Jl 5, plus the incremental voltage change from the previous /, flowing in C for the interval DT. Next we calculate the voltage avail- able to the resistor. The sum of the voltage across the resistor and LINEAR CIRCUIT ANALYSIS RC RESPONSE AY 40 60 TIME (USEC) : Figure 6: Schematic and voltage-versus-time graph of RC circuit. capacitor must equal the input voltage. Since the input and capacitor voltages are known, the resistor voltage can be calculated as their dif- ference. V in - VC. This is the formula in KI6. The current / is our easiest calcula- tion—just divide the resistor voltage VR by the resistance R. Notice in col- umn O that the initial effect of the step-input voltage is seen entirely across the resistor; a 0.5-ampere cur- rent flows as a result. For clarity, the output voltage V„„ is given its own row, 18. This is iden- tical to the capacitor voltage. VC. Note how the value of V ou , builds up as time progresses from column P through column X. Figure 6 plots the input voltage V in from row 14 and the out- put voltage V om from row 18. Plotting the Graph To get the desired smooth curve, the format for all curves is set to Line Only. To get the maximum flexibility, the graph type has been set to XY. This will be necessary when we get to the schematic diagram and is a help in labeling the curves. The column labeled Graph (E12.. E20) shows what we've plotted to generate the curves. This takes the place of the Plot Values section of the digital sheets. It lets us know that [continued] A BCD L FGHI J K L M N P R s T U V W X V Z --- NAMEU RANIiES 2 VIN = 5.0 volt step at t-5 microsec 3 R E4. E4 X: J1J..EF13 4 R = 10.0 ohms C E5. E5 5 C 0.47 microfarads UT E6. E6 A: J14..UF14 6 UT = 1.0 microsec DT MUST BE LESS THAN R*C = 4.7 microsec VIN K14. .K14 B: J18..0F18 7 VC K15. K15 C: J20..EF20 8 VR K16. K16 I J17. J17 C:DATA-L J21..EF21 10 INITIAL 11 NAME iRAPH VALUES FORMULAS VALUE VS TIME — > 12 13 TIME X: ZERO +J13+$DT 2 3 4 5 6 7 a 9 10 11 12 13 14 15 16 14 VIN A: ZERO +014 0.0 o.o 0.0 5.0 5.0 5.U 5.0 5.0 5.0 5.0 5.0 5.0 5.0 5.0 5.0 15 VC ZERO +J15+I*$0T/$C 0.0 0.0 0.0 0.0 1.1 1.9 2.6 3.1 3.5 3.8 4.1 4.3 4.4 4.5 4.6 16 VR ZERO +VIN-VC 0.0 o.o 0.0 5.0 3.9 3.1 2.4 1.9 1.5 1.2 0.9 0.7 0.0 0.5 0.4 17 I ZERO +VR/SR 0.0 0.0 0.0 0.5 0.4 0.3 0.2 0.2 0.2 0.1 0.1 0.1 0.1 .0 .0 18 VOUT B: ZERO +VC 0.0 0.0 0.0 0.0 1.1 1.9 2.6 3.1 3.5 3.8 4.1 4.3 4.4 4.5 4.6 19 20 LABEL C: 5.3 3.5 21 OATA-LABEL Vin Vout 22 23 A BCD E FGHI J K L M N P R S T U V U X V Z Figure 7: Spreadsheet to analyze RC circuit. 150 Fail 1985 BYTE- Inside the IBM PCs SHIFT YOUR HARD DISK BACK INTO HIGH GEAR with rfii ranzer only $49. 95 * S pecial Introductory Price Tunes Your Disk Files For Highest Performance The Disk Optimizer organizes your disk to make your PC run faster. You'll discover faster program loading, faster file loading and sorting, faster file creation, faster backups to diskette. And the disk Optimizer reduces the chances of error during your disk I/O. cc cc DDDl DDD GG GG 1 AAA AAA AAAAAAAAA BBBBBBBB | BBBBBBBB l ■ I DDDDl I FFFlj I H I |dDDd| II FFF|C | H | I DOS IS SLOWING YOU DOWN! Whether you realize it or not, the more you use your hard disk, the slower it is likely to react. This is because the operating system (PC-DOS/MS-DOS) stores things (programs, overlays, batches, etc.) randomly, wherever unused disk space is available. Your operat- ing system doesn't keep pieces of the same file together. This means slower access time. Lost speed. Lost productivity. TURN THE THROTTLE BACK UP! Now, the Disk Optimizer puts the zip back into your hard disk! The Disk Optimizer collects all the scattered pieces of your files and re-stores them together in neat, well-organized areas on your disk. The result: immediate performance improvement . . . faster loading programs (and their overlays) . . . faster sorting . . . faster loading and storing spreadsheets or document files. BONUS EXTRAS - at no extra cost - DISK ANALYZER Displays a visual performance analysis . . . shown in percentages ... for any disk or diskette. ^ PERSONAL FILE SECURITY Password protect any file or program. ^ FILEPEEKER Now you can visually examine any file on your system. $49. 95 Order Toil-Free: ^^ 1-800-272-9900 ^A Inquiry 1 82 *Plus $5.00 Shipping & Handling SoftLogic SOLUTIONS Creators of DoubleDOS 530 Chestnut Street, Manchester, NH 03101 1-800-272-9900. In NH, call 627-9900 Disk Optimizer works with IBM PC's and true compatibles. Fall I985 BYTE- Inside the IBM PCs • I51 1-2-3 CIRCUIT DESIGN curve X is taken from row 12, curve A from row 13, etc. The actual ranges plotted are shown in the range name table included on the sheet in the upper right-hand corner. Lotus 1-2-3 does not have a com- mand to display named ranges. The Named Ranges table is a good idea to include in all your spreadsheets as part of the documentation, to show which ranges have names. The for- mulas in column K have the names of a number of circuit parameters mixed in with the cell locations; this makes the formulas more self-explanatory. Since there is quite a bit to label in figure 6, two rows have been added for labeling, rows 20 and 21. The C curve allows us to spot unplotted points and to plot line segments on INEAR CIRCUIT ANALYSIS RLC RESPONSE R=10 l_=100 Vin C = .47 =j= vout T X 40 60 TIME (USEC) : Figure 8: Schematic and voltage-versus-time graph of RLC circuit. the figure. The value in cell O20, for example, spots an unplotted point at x=5 and y= 5.3. The Data-Label below it prints the label "Vin" on the figure to the right of this point. Remember that the point doesn't plot, because the Line format does not plot isolated points— it only plots cells that adjoin nonblank cells. The other labels are treated similarly. The data for the schematic diagram is in the region DH13..EA21. It's plotted in the way described in the text box. How do we pick a reasonable value for the time interval DT? For our dif- ference analysis to be accurate, the in- cremental change in the capacitor voltage must be small compared to the voltage VR, which determines the current /. Let's write that as an inequality: 1*DT/C << VR Rearranging the inequality to solve for DT: DT << (VR/I)*C But from Ohm's law, we know that VR/I equals the resistance R, so: DT << R*C This tells us that the time interval DT must be small compared to R*C. The RC product is a term familiar to cir- (continued) A BCD E FGHI J K L m n P R S T U V u X Y Z PARAMETERS — t t=b microsec 2 VIN = 5 vol t step a L E3..E3 X: J13..EF13 3 L « 100 microhenries R E4..E4 4 R = 10 ohms C E5..E5 A: J14..DF14 5 C = 0.4/ microfarads DT E6..E6 R: J19..DF19 6 DT - 1 nncrosec 0T MUST BE « SQRT(L*C) 6.85 microsec VIN K14..K14 C: J21..EF21 7 VC K15..K15 8 VR K16..K16 ::DATA-LA!ii J22..EE22 VL I J17..J17 J18..J18 10 INITIAL 11 NAME 12 13 TIME 3DAPH X: VALUES FORMULAS VALUE VS TIME - — > ZERO +J13 + $0T 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 14 VIN A: ZERO +J14 0.0 0.0 0.0 b.O 5.0 5.0 5.0 5.0 5.0 5.0 5.U 5.U 5.0 5.0 5.U 15 VC ZERO +J15+I*$DT/$C 0.0 0.0 0.0 0.0 0.D 0.1 0.3 0.6 1.0 1.5 2.0 2.5 3.0 3.6 4.1 lb VR ZERO + I*$R 0.0 U.U 0.0 0.0 0.0 O.b 1.0 1.4 1.8 2.1 2.3 2.5 2.5 2.5 2.5 17 VL ZERO +V1N-VC-VR 0.0 0.0 O.U b.O b.O 4.4 3.7 2.9 2.2 1.4 0.7 0.1 -0.6 -1.1 -1.6 18 I ZERO +I+VL*$DT/$L 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.3 0.3 0.2 0.2 19 VOUT B: ZERO +VC 0.0 0.0 0.0 0.0 O.U 0.1 0.3 0.6 1.0 1.5 2.0 2.5 3.0 3.6 4.1 2(J 21 LABEL C: 6.3 22 OATA-LABEL Vin 23 24 A BCD E FGHI J K L M N P R S T U V W X Y Z Figure 9: Spreadsheet to analyze RLC circuit. 152 Fall 1985 BYTE- Inside the IBM PCs DOES YOUR HUES GRAPHICS BOARD SHOW YOU ONLY PART OFASPREADSHEE When it comes to printing out spreadsheets, most IBM 9 -compatible graphics boards come up short. But not the Genoa Spectrum™ Color/Mono/Graphics Board. what you're doing. On the screen. And on paper. But the best part is, you don't have to pay more to do it. Here's why: Up until now, if you wanted Ttw. Spectrum Color/Graphics Board is the most compatible board you can buy. Which means it rum the most software. Including Flight Simulator™ Lotus" 1-2-3,™ Symphony™ SideKkk™ PC Paint,™ and much, much more. It goes all the way to 132 columns. The largest text display of any graphics board you can buy There's even a special driver that'll show you 132 columns of Lotus, which normally only has 80. And together with your 132- column printer, the Spectrum can also print every one of those 132 columns. So you can see more of Spectrum is a trademark of Genoa Systems Corporation. © 1985 Genoa Systems Corporation. Inquiry 72 both graphics and color, you had to buy two boards. One for hi-res mono graphics, one for color. But the Genoa Spectrum puts color and graphics on the same board. So you save yourself a slot. And about $250. You can also save yourself the price of a color monitor. Because Spectrum will emulate your color software in monochrome. And for your monochrome software there's a 720x348 hi-res mode. So either way you're covered. Spectrum is compatible with all color and monochrome monitors. So you'll always get 16 beauti- ful colors in color Or 16 shades of monochrome in mono. For all the technical specs or the Genoa Spectrum dealer nearest you, just call us at 408-945-9720. Or write Genoa Systems Corporation, 73 E.Trimble Road, San Jose, CA 95131. The Genoa Spectrum. It's the only board you'll ever need for color, graphics, and full size output. Anything else is either too much money or incomple Fall 1985 BYTE- Inside the IBM PCs 153 1-2-3 CIRCUIT DESIGN 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 : GRAPH X GRAPH A COMMENTS DATA DATA LABELS COMPONENTS 15 8 NAME FF1 : 15 11 01 01 15 17 CI 01 ' LOCATION: : 15 20 X0 = 15 24 20 Y0 = 8 : 24 8 15 8 : 30 8 NAME FF2 : 30 11 D2 Q2 : 30 17 C2 Q2 ' LOCATION: : 30 20 X0 = 30 : 39 20 Y0 = 8 : 39 8 : 30 8 : 45 23 NAME NANO : 45 24 B INPUT LABEL : 45 26 A INPUT LABEL : 45 27 : 4 7 27 : 48.32 26.5 LOCATION : : 48.73 26 X0 = 45 : 48.94 25.5 Y0 = 2 3 : 49 25 48.94 24.5 48.73 24 48.32 23.5 47 23 : 45 23 MA NA : 48 25 READY OUTPUT LABEL 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 GRAPH X GRAPH A COMMENTS DATA 10 : 15 DATA LABELS CONNECTIONS MEMR --> 01 : : 12 : 12 : 15 CLOCK --> CI : : 10 : 28 : 28 : 30 CLOCK --> C2 : : 24 : 26 : 26 : 45 Ql ' --> NAND A : : 39 : 42 : 42 : 45 02 --> NAND B : : 24 : 30 : Ql --> 02 : : 42 2 26-Aug-84 DATE STAMP : : 2 17 MEMR' INPUT SIGNAL : : 2 5 CLOCK INPUT SIGNAL : 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 53 59 60 61 62 63 64 65 66 67 68 69 7U 71 72 73 74 75 Figure 10: Spreadsheet to draw edge-detector circuit. i I D E F G HI 97 97 98 99 IOC 101 COMPONENT PRIMITIVES 9e 99 100 101 RESISTOR CAPACITOR 102 X-AXIS Y-AXIS X-AXIS Y-AXIS 102 103 • ■• 103 104 2 104 105 0.75 0.75 2 105 106 1 -0,5 -0.75 2 106 107 1.5 0.5 107 LOB 2 -0.5 -0.75 2.5 106 109 2.5 0.5 0.75 2.5 109 110 3 -0.5 2.5 110 11! 3.5 0.5 5 111 112 3.75 112 113 6 113 114 - ■■■— 114 : D E F G HI Figure 1 1 : Digital and linear component primitives. cuit designers; it's a measure of the response time of a circuit, historical- ly called the circuit "time constant." So the comment in row 6 tells us that we should pick the time intervals on our spreadsheet analysis so that they are small compared to the circuit re- sponse time RC— a very reasonable restriction. The results of the our work are sum- marized in the graph of figure 6. Sure enough, the output voltage rises to the input value as a familiar exponen- tial curve. So far, so good. But, you say, 1 could have estimated that result far faster without all that work. True enough. A simple RC circuit isn't all that impressive, unless you remember that we did the analysis with a spread- sheet program. Now all the "what if" power of the spreadsheet is at our disposal. Want to see the effect of a smaller capac- itor? A different value resistor? The ef- [amtinued] 154 Fall 1985 BYTE- Inside the IBM PCs OUR PLUG-IN CARD GIVES YOU PLUG-IN CONTROL. PC®488 allows your IBM PC/XT/AT or com patible to control IEEE-488 instruments. WHAT ADDITIONAL SOFTWARE DO I HAVE TO BUY? None. PC&488 supports all pop- ular programming languages including interpreted and compiled BASIC, TBASIC Microsoft® Pascal, Turbo™ Pascal, C, and FORTRAN. You can use Tektronix® Standard Codes and Formats and emulate HP controller statements PC0D488 also runs IB IEEE-488 software a# ' application prograj IS IT DIFFICULT TO USE? You just plug it in. PC<$488 is totally self-contain' with all software packaged in read only memory. Documentation includes a complete tutorial and programming reference, plus more than thirty application programs. WILL IT WORK WITH ALL MY INSTRUMENTS? You bet! More than 500 companies, including every major instrument M manufacturer in the U .S. and Europe, are currently using PCW488. WHAT'S THE BOTTOM LINE? That's the best part. PCM88 costs just $395 including software support for all popular pro- gramming languages, extensive applications library, and the programming and refer- ence manual. Order today by calling (61 7) 273-1 81 8 or Telex 24731 6. eec Capital Equipment Corporation 10 Evergreen Ave., Burlington, MA 01803. (617)273-1818, Telex 247316. inquiry 22 Fait I985 BYTE- Inside the IBM PCs 155 1-2-3 CIRCUIT DESIGN feet of a 5 percent change in each of the elements? Just key them into the Circuit Parameters cells and push FIO to see the modified graph. Now that's power. Let's add an inductor L in series with our resistor, as shown in figure 8. First, we add the inductor value in the Cir- cuit Parameters section in row 3, then we add a new row 17 for the inductor voltage VL in the Variables section, pushing rows 17-23 down to make room. Next, we add an equation that describes the behavior of the induc- tor to the Formulas section, based on the equations of figure 5. We now modify the formulas for VR and / to reflect the dominating role of the in- ductor in setting the circuit current. The result is the spreadsheet shown in figure 9. Finally, we make some small changes to the schematic draw- ing section to add the inductor to the schematic of figure 8. As before, the cell equations of the formulas in range Kl 3..K19 are copied to the adjacent 99 columns. Now we're ready to analyze an RLC circuit. Figure 8 shows the resulting graph. Still easy for our spreadsheet method, but it would have been a far-from- trivial task with any other method. The circuit values are easily modified in the Circuit Parameters section if the results are not satisfactory. Higher values of R, for example, will reduce the overshoot if that is undesirably large. The results of any value change are always available at the touch of FIO, the LOTUS GRAPH command. These circuits are only examples of what can be done with linear circuits. With a little more work, some very complex networks can be studied. Nonlinear elements such as diodes could be added; they are a natural for a table lookup. Circuit gain elements such as amplifiers are easily added. The technique I've shown here can be expanded to more complex appli- cations. However, where circuits of 20 or more nodes are involved, a spe- cialized application program such as Micro-Cap or TUTSIM should be con- sidered. While the examples are all elec- tronic circuits, nothing would prevent extension of the general technique to design and analysis of mechanical sys- tems, chemical reactions, biological modeling, etc. Any process that lends itself to description by a simple model should be fair game for analysis by a spreadsheet. The technique is ideally suited for the PC environment; all operations are out in the open and controlled by the user. The technique should be useful for students as well as expert designers. Try it— it's great for those small problems you want to look at in detail. ■ Emulation Without Limitation Built in Communications Language Finally there's a communications program that does what you want. The Impersonator. Its built-in programming language offers virtually unlimited capabilities in designing terminal applications. It's the most flexible asynchronous communications software on the market today. Maybe that's what prompted the experts to say, ". . .The Impersonator looks hard to beat." PC Tech Journal. Flexibility in Communications Designed for the IBM PC, The Impersonator comes with 12 preprogrammed emulations including ADM-3A, DEC VT 52 & VT 100, Televideo 912 & 950, IBM 3101 (Models 10 & 20), DG D-210, and NCR7900 terminals. It can also be configured to emulate almost any asyn- chronous terminal. Now you can create entirely new communications appli- cations. You can speed functions, simplify data transfers, modify existing emulations, and even create your own custom configurations. Best of all, The Impersonator saves time by eliminating the need to develop a program from scratch. If you need to access a variety of public data bases, remote main frames, or other micro computers, you no longer need multiple emula- tion packages. With The Impersonator you can literally write your ticket . Our 30 Day Money Back Guarantee That backing, along with the cooperation of our on- line technical staff, convinced companies like Holiday Inns, Underwriters Laboratories, Union Carbide, Hughes Aircraft, Rockwell International, and Rolm Corporation to choose The Impersonator for their communications needs. Flexible. Programmable. Powerful. You won't find another communications package on the market that will claim to do this much and then do it! Empower yourself with The Impersonator. Call the toll-free number below for more information. The Impersonator CALL TOLL FREE 1-800-443-8080 (In Colo. 303-442-8080) DIRECT.AID P.O. Box 4420 Boulder, Colorado 80306 IBM is a Trademark ot International Business Machines Corp 156 Fall 1985 BYTE- Inside the IBM PCs Inquiry 48 llifin 10MHz8086 processor with full 16-bit datapath 10MHz 8087 math co-processor (optional) I Comes standard with 512K RAM, expandable to 640K Print spooling, RAM disk and disk caching software included Normal IBM speed ^V^ emulation switch 300% performance increase • ...Mi Compatible with h^*'^ *fe^' IBM Basica programs ^ That's right, guaranteed performance. The Univation Turbocharger will triple the pro- cessing speed of your IBM PC, PC/XT, or 100% compatible. Just think, the data process- ing speed and performance of a PC/AT without the expense. Plug it in, and your PC will do everything it did before, only 300% faster. Best of all, the Univation Turbocharger works with all your existing PC software' automatically. Nothing to learl nothing to change. Speed spread- sheets, databases, graphics, even IBM Basica programs. The Turbo- charger will spark each and every program you use. To ensure complete reliability, our Turbocharger is extensively tested. It's available for immediate delivery. And, best of all, it's ^ guaranteed. Guaranteed to work exactly as promised Dealer and distributor inquires invited. I liM PC, PC/XT and PC/AT are trademarks of International Business Machines Corp. Inquiry 206 m** fa to provide all Te processing power "you'll ever need. So why not make your life a little easier and do your work a lot quicker with the Univation Turbocharger. See it at your local computer dealer today. For the dealer in your area call: (408) 745-0180. UNIVATION Your Expansion Company 1037 North Fair Oaks Ave. Sunnyvale, CA 94089 (408) 745-0180 Fall I985 BYTE- Inside the IBM PCs 157 VAX USERS WIN! NEW POLY-COM/220 FOR THE IBM PC PROVIDES LEAGUE- LEADING FEATURES. ST. LOUIS-Polygon increases your lead with a new IBM PC package: poly-COM/220. This newest member of the Polygon family of communica- tion software products combines the reliability and exacting accuracy of previous Polygon products with many new features. This super-star software package lets you use your IBM PC as a DEC VT52, VT102, or VT220 terminal, and allows the transfer of files between your IBM PC and another PC, minicomputer or mainframe. New features and functions incorporated in poly-COM/220 include: • "Hotkey", allowing instant switching between poly-COM/220 and MS-DOS or another application • Host-control, allowing a host computer (such as a VAX) to control the PC through poly-COM/220 • Full VT220 functionality The result is a product of unparalleled power, sophistication and functionality at NO wk increase in price. wpp Upgrades are available and orders are shipping immediately. The price of poly-COM/220 is $200. Join a winning team! For more information on poly-COM/220, or any of the other Polygon communication software products, contact the Polygon sales department at 314/576-7709. (*) polygon v ^-^ / associates, inc. 158 1024 Executive Parkway Saint Louis, MO 63141 314-576-7709 Polygon and poly-, are registered trademarks of Polygon Associates, Inc. DEC, VT, VAX are trademarks of Digital Equipment Corp. IBM is a registered trademark of International Business Machines Corp. Mb. Fall 1985 BYTE- Inside the IBM PCs Inquiry 155 INSIDE THE IBM PCs Adding a Hard Disk to Your PC AT You can save money and get increased performance by Jon Shiell and John Markoff THE IBM PC AT has rapid- ly become a new perfor- mance standard in the world of IBM and IBM- compatible personal com- puters. Because of the open-system philosophy of the IBM PC family, a thriving third-party in- dustry has sprung up, of- fering both price and per- formance enhancements. The PC AT comes in two models: the basic system without a hard disk and the enhanced system, which includes a hard disk, extra memory, and I/O (input/output) ports. It is possible to convert a basic model into an en- hanced system merely by adding a third-party hard disk and multifunction board. Purchasing a hard disk independently can also offer cost savings and increased performance. The multifunction card is particularly attractive for this application because of significant cost savings and increased sys- tem versatility. You can configure a PC AT with more than 8 megabytes of main memory. However, operating systems now available for the AT cannot productively use this memory. It is doubtful that even a 9-megahertz (MHz) PC AT can effec- tively use this much main memory. (See the text box "Crystal Change Enhances PC AT's Performance" on page 161.) It is possible to put 230 megabytes of hard-disk storage on an 8-mega- byte 9-MHz PC AT and reduce access time to half that of a factory-standard AT. For most people, the best way to purchase a hard disk is in kit form. This precludes the necessity of hard- formatting the disk and generally simplifies the installation procedure. However, if you are scavenging a hard disk from another system or have bought a third-party prod- uct, you will need to ob- tain special mounting side rails and hard-format the disk (see the text box "Hard-Formatting a Disk Using the AT Advanced Diagnostics" on page 161). Everything you need to know about physically in- stalling and soft-format- ting the disk is explained in the AT \nstallation-and- Setup Manual. The first step is to deter- mine the drive type. Refer to table 1 and table 2 and compare the parameters listed to the information supplied with your hard disk. Don't be surprised if you have to trim your disk to fit. Most kitted disks come with information about suggested drive types. IBM has predefined 14 types of disk drives (see table 1). In addition, type 1 5 has been left open for user- defined drives. Table 2 shows disk-drive type numbers for some com- mon hard disks. In some cases, the drive has been trimmed to fit by not using all available cylinders. It is also possible to trim a drive by not [continued) ]ohn Markoff. a technology writer for the San Francisco Examiner, is a former BYTE editor. He can be reached at 110 Fifth St., San Francisco. CA 94123. Ion Shiell is a system architect and micro- programmer. He can be reached at POB 61195, Sunnyvale. CA 94088. ILLUSTRATED BY BLAIRE THORNLEY Fall 1985 BYTE- Inside the IBM PCs 159 ADDING HARD DISK Table 1 : Definitions of predefined drive types. Disk Write Land ng zone Capacity type Cylinders Heads precompensation (cylinder) per drive 1 306 4 128 305 10 Mb 2 615 4 300 615 21 Mb 3 615 6 300 615 31 Mb 4 940 8 512 940 64 Mb 5 940 6 512 940 48 Mb 6 615 4 no 615 21 Mb 7 462 8 256 511 31 Mb $ 8 733 5 no 733 31 Mb 9 900 15 no 901 115 Mb 10 820 3 no 820 21 Mb 11 855 5 no 855 36 Mb 12 855 7 no 855 51 Mb 13 306 8 128 319 21 Mb 14 733 7 no 733 44 Mb $ 4 megabytes unused because only 462 out of 511 cylinders are u sed Capacity per drive = cylinders * heads * 17 sectors/track * 0.5 Kb/sector (heads is the same ) as tracks/cylinder) Table 2. Sample dn ve-type definitions. Disk Capacity type per drive Examples of this drive type 1 10 Mb Cogito CGF912; MMI M212 and M312; Seagate ST412, ST212, and ST112; Rodime RO202; Tandon TM252 and TM502; Fujitsu M2233; Shugart 712 %; MiniScribe 2012 and 3412 2 21 Mb Tulin TL226 °/o, Qume R200 %, Shugart 724 % 3 31 Mb Tulin TL240 %, Qume R300 °/o, Rodime RO206 4 64 Mb Atasi 3080 % 5 48 Mb 6 21 Mb Seagate ST4026 7 31 Mb Quantum Q540 % 8 31 Mb Seagate ST4038 9 115 Mb Maxtor XT-1140 % 10 21 Mb Micropolis 1302 %, Vertex V130 #°/o 11 36 Mb Vertex V150 #°/o 12 51 Mb Vertex V170 #% 13 21 Mb Seagate ST425, MMI M225 and M312, Rodime RO204, Fujitsu M2235 14 44 Mb % Not all cylinders i ised; to use all you must define it as a type 15 # The Vertex drives are an extreme case of trimming to fit, as they actually have 987 cylinders, so only 83 percent of the V130 and 87 percent of the V150 and V170 are used using all read/write heads, but this tends to be especially wasteful. Using only five out of six heads wastes about 17 percent of the drive's capacity. After the disk is physically installed, use the AT diagnostic disk-setup op- tion to set the drive-type nybble in the configuration RAM (random-access read/write memory). Unlike the PC and the XT, which use switches to tell the BIOS (basic input/output system)/ DOS (disk operating system) what equipment is attached to the system, the AT uses a CMOS (complementary metal-oxide semiconductor) RAM with a battery backup. The RAM (50 bytes) is contained in a Motorola 146818 chip, which also contains a real-time clock. The RAM-configura- tion-data format and typical entries for 11 drives are given in table 3. Figure 1 is the CMOS RAM map, showing the address offset and con- tents of each byte in the configuration RAM. Byte 12 holds the fixed-disk-type in- formation for the C and D drives. Bits through 3 (single hexadecimal digit) specify the drive type for drive C. Bits 4 through 7 (single hexadecimal digit) specify the drive type for drive D. A value of hexadecimal indicates that no drive is present. After the configuration RAM has been modified (using the diagnostic disk-setup option), complete the in- stallation using the normal procedure for standard IBM fixed disks. Simply run the FD1SK and Format programs, following IBM's instructions. When partitioning your disk with FDISK, keep in mind that DOS cur- rently supports a maximum of ap- proximately 64K sectors per disk or partition. This requires that disks larger than 32 megabytes be split into a number of 32-megabyte partitions. Most kits for these large disks contain the software required to allow use of more than one active— but only one bootable— partition. Table 3a, for use with FDISK, shows the relationship be- tween number of data heads, number of sectors per cylinder, and maximum number of cylinders allowed for 64K- sector DOS partitioning. Table 4 {continued) 160 Fall 1985 BYTE- Inside the IBM PCs ADDING HARD DISK Crystal Change Enhances PC AT's Performance Changing the timing crystal voids the warranty! You should not change the crystal before the machine has had time to shake down for at least 90 days. The speed of your PC AT is con- trolled by the crystal that determines the clock rate of the 80286 processor and its support chips. This clock rate is half of the crystal's frequency (the standard 12-MHz crystal gives a clock rate of 6 MHz). Table A is a list of the common crystal frequencies and the clock rates they yield. You should have a number of crystals with different frequencies because some ATs run faster than others. The ones we tested varied between 8 MHz and 9.8 MHz. Your clock crystal should be tested with all add-on and multifunction boards present. Some high-perfor- mance multifunction boards will run at speeds of 8 MHz or higher, so test your system fully configured to be sure. Table A: Crystal frequencies and clock rates for the PC AT. Crystal Clock frequencies rate (MHz) (approx., MHz) 12.0000 6.00 14.3181 7.16 15.0000 7.50 16.0000 8.00 18.4320 9.22 19.6608 9.83 20.0000 10.00 Crystals are available at most major electronics supply houses for less than S5 each. The ones we used were from Nymph and BME and had HC-18 cases. The Nymph crystals had long, thin leads that needed to be trimmed. To change the crystal: 1 . Turn the machine off and unplug it. 2. Remove the cover and locate the 1 2-MHz crystal on the motherboard. It's above and to the left of the 80286 chip as you look from the front of the machine. Before removing the old crystal, touch the chassis to ground yourself. Use a thin flat-bladed screw- driver to remove the old crystal (be sure that you don't damage any traces on the motherboard). 3. Insert the new crystal (save the old 12-MHz crystal). Which side of the crystal is face up doesn't matter. 4. Close the cover and give it a try. Try the fastest crystal first; if the crystal is too fast, the machine will not show the memory check or boot. In some borderline cases the machine will run fine after it has warmed up. but it may need to be rebooted first. Try each crystal starting with a cold machine. Hard-Formatting a Disk Using the AT Advanced Diagnostics Before beginning, note that the disk type must have been set in the configuration RAM prior to hard- formatting. If you get a 17XX error when the system powers up or resets, press the Fl button to continue. Enter the fixed-disk test menu and do an unconditional format by selecting the following: I. System-checkout routine (option 0): Enter "y" if the options list is correct; otherwise, go back to setup and cor- rect the list. 2. Run tests one at a time (option 0). 3. Test fixed-disk drive (option 17): If at this point another menu is not dis- played, but instead the test begins, you know that you are not using the ad- vanced diagnostics. 4. Select format menu and drive letter (options 7.c or 7,d). 5. Select unconditional format (option 2). The current screen should ask you to enter the known flaws. A list of known flaws is printed on a label on the top of all hard disks. The list contains the cylinder, head number, and byte offset from the index, but you need enter only the cylinder and head numbers. After you have entered all the flaws listed on the top of the drive, press "y" to format the disk. You now have a hard-formatted disk. Enter 9s to get back to the main menu. The next step is to run FD1SK. then the normal format program on the DOS partition. Fall 1985 BYTE- Inside the IBM PCs 161 Inquiry 90 The PC Bus: Cost-Effective, Board-Level Solution To System Integration ADDING HARD DISK Get your dedicated system to market months sooner with the PC Bus. Full board-level implementa- tion by I-Bus lets you plug together system components from hundreds of PC Bus board manufacturers, and directly execute software developed on and for the IBM® PC. I-Bus has board-level CPU's with 8088 or 80188 processors, full disk or diskless operation and up to 160K of EPROM, 256K of RAM on board. We have the most complete line of system packaging for the PC Bus, too. Start cutting your schedule today — give us a call today at (800) 382-4229. In California, call (619) 569-0646. SYSTEMS 9235 Chesapeake Drive San Diego, CA 92123 Offset Contents 00 Seconds 01 Second alarm 02 Minutes 03 Minute alarm 04 Hours 05 Hour alarm 06 Day of the week 07 Day of the month 08 Month 09 Year 0A Status register A 0B Status register B 0C Status register C 0D Status register D 0E Diagnostic status byte OF Shutdown status byte 10 Disk-drive type for drives A and B 11 Reserved 12 Fixed-disk-drive type for drives C and D 13 Reserved 14 Equipment byte (corresponds to switch 1 on PC and XT) 15-16 Base memory size (low.high) 17-18 Expansion memory size (low.high) 19-20 Reserved 21 -2D Reserved (not checksumed) 2E-2F Checksum over bytes 10 through 20 (low.high) 30-31 Expansion memory size as determined by power-on routine (low.high) 32 Date century byte 33 Information flags (set during power-on) 34-3F Reserved The Alarm function is used by the operating system/BIOS to drive the Wait function, INT15h ah = 90h The drive-type bytes use bits 0:3 for the first drive and 4:7 for the other Disk-drive types: No drive present 1 Double-sided disk (360 Kb) 2 High-capacity disk (1.2 Mb) 3-F Reserved The equipment byte is used to define the configuration for the power-on diagnostics Base memory is all memory below the 1-megabyte line, the range is 256 Kb to 640 Kb Expansion memory is all memory above (at) the 1-megabyte line, range between (none) and 15 Mb, although you can currently get only to 3 Mb with 64K-byte RAMs without using an expansion chassis (which doesn't currently exist) Bytes 00-0Dh are defined by the chip for timing functions, and 0E-3F are defined by IBM To access the configuration RAM: 1) Write the byte address (00-3F) you want to access to I/O port 70h 2) Access (read/write) the data via I/O port 71 h Figure l: CMOS RAM map. 162 Fall 1985 BYTE- Inside the IBM PCs ADDING HARD DISK Table 3: Sample drive-type entries, for use as type-\5 disks. Largest MMI Tandon Tandon Quantum Vertex MiniScribe Micropolis Maxtor Maxtor defined M206 TM503 TM703 Q540 V170 6085 1324 1325 XT-1105 XT-1140 disk Byte 5 Mb 15 Mb 30 Mb 35 Mb 59 Mb 71 Mb 52 Mb 70 Mb 85 Mb 117 Mb 139 Mb Disk capacity 306 306 695 512 987 1024 1024 1024 918 918 1024 Number of cyl. 2 2 6 5 8 7 8 6 8 11 15 16 Number of heads 3 Not used 5 128 0* 0* 0' Write precomp. 7 Not used 8 256 8 8 8 Control byte 9 Not used 12 306 306 695 512 987 1024 1024 1024 918 918 1024 Landing zone 14 17 17 17 17 17 17 17 17 17 17 17 Sectors/track 15 Not defined The TM503 is a "generic 15-megabyte hard disk"; many other disks, like the Seagate ST419, would also use this setup The Maxtor XT-1140 appears here to show how it would be defined for maximum capacity Largest defined disk is the largest (highest-capacity) disk that can be defined under the PC AT BIOS; a dedicated servo is assumed Write precompensation depends on the actual drive used; an asterisk by a write precompensation means that a dedicated servo is used and has a whole platter instead of just one side dedicated to it (thus the even number of data heads) Offset Number of cylinders on the drive [0-1023 allowed, for 1024 cyl.] 2 Number of heads per drive [0-15 allowed, for 16 heads] 3 -n/u (starting reduced write current cyl. on PC XT) 5 Starting cylinder for write precompensation 7 -n/u (maximum ECC data-burst length on PC XT) {recheck not used} 8 Control byte Bit 7 Disable disk-access retries 6 Disable ECC retries 5-4 -n/d (zero) 3 More than eight heads 2-0 -n/u (drive option on PC XT) 9 -n/u (time-out values on PC XT) 12 Landing zone, cylinder to use as a 14 Number of sectors/track [0-17 allowed, 17 is the IBM standard] 15 -n/d -n/u Field not used by PC AT -n/d Field reserved for future use Figure 2: Format of a drive-type entry. Table 3a: Disk-partitioning data, for use with FDISK. Maximum number of cylinders Number Number allowed in a of data of sectors 64K-sector heads per cylinder DOS partition 3 51 1024 4 68 936 5 85 771 6 102 642 7 119 550 8 136 48"i 9 153 423 10 170 385 11 187 350 12 204 321 13 221 296 14 238 275 15 255 257 16 272 240 [continued] Fall I985 BYTE- Inside the IBM PCs • 163 ADDING HARD DISK Table 4: Comparison of drive performance. Seagate Qume Quantum Tandon Vertex MiniScribe Maxtor PC XT ST425 PC AT R300 Q540 TM703 V170 6085 XT-1140 Type 1 13 2 3 7 15 15 15 9 Disk capacity 10 Mb 20 Mb 20 Mb 31 Mb 31 Mb 30 Mb 59 Mb 71 Mb 115 Mb Number of cyl. 306 306 615 615 462 695 987 1024 900 Number of heads 4 8 4 6 8 5 7 8 15 Cyl. capacity 34 Kb 68 Kb 34 Kb 50 Kb 68 Kb 42.5 Kb 58.5 Kb 68 Kb 127.5 Kb Access times $ Track to track 16 ms 23 ms 14 ms 19 ms 10 ms 5 ms 5 ms 3 ms 5 ms Mean 85 ms 65 ms 52 ms 93 ms 45 ms 45 ms 30 ms 30 ms 30 ms Maximum 205 ms 170 ms 97 ms 213 ms 80 ms 65 ms 65 ms 50 ms 48 ms Access times include head-settling time; average latency for all of the above disks is 8.33 ms The access times for the XT are based on the Seagate ST412 The access times for the Maxtor XT-1105 are the same as those of the XT-1140 Random Notes Jumper J18 remaps the second 2 56K J bytes of memory from the system board into the I/O channel, so that non- IBM expansion boards can be used. Thus, you don't need to buy the 2 56K- byte motherboard RAM option if you buy a minimum system. We used a Sigma Designs 512K-byte (with 384K bytes enabled) multifunction card, scavenged from a PC, in our AT until we could get a 16-bit AT version. You can't use 64K- or 2 56K-byte RAMs in the AT motherboard because the pin-outs of the 128K-byte DRAMs are different from industry standards (see table B). You can add ROM to the AT mother- board in sockets U17 and U37. It ap- pears at address E0000 to EFFFF hexa- decimal. The ROM must have the same header as an I/O channel ROM except that byte 2 (ROM length) is not used. The two 8-bit slots on the AT are wired for the addition of the 36-pin ex- tended connectors. Table B: Pin-outs for standard DRAMs versus IBM \28K-byte DRAMs. Standard 64K/256K signal name PC AT 128K* Pin number N/C Din WE RAS A0 A2 A1 PWR A7 A5 A4 A3 A6 Dout CAS GND * IBM 128K-byte DRAMs are actually two 64K-byte dies encapsulated in piggyback fashion. One die is connected to RAS0, and the other is connected to RAS1. Otherwise, they are the same. Din 1 WE 2 RAS1 3 RAS0 4 A0 5 A2 6 A1 7 PWR 8 A7 9 A5 10 A4 11 A3 12 A6 13 Dout 14 CAS 15 GND 16 shows the relative performance char- acteristics of some popular drives. You can define your own drive types; for example, you may want to add your old 5-megabyte drive, left over from your PC. as the second hard disk (drive D, fixed disk I). You must first build a drive-type en- try like the sample shown in table 3. Place the address of the drive-type entry in INT 46 hexadecimal (at ad- dress 0:118 hexadecimal). Using the setup program on your PC AT diagnostic disk, change the fixed-disk-type nybble in the con- figuration RAM to 15 hexadecimal. This tells the system that your disk is a type 1 5. See figure 1 for a complete definition of the configuration-RAM contents. Figure 2 shows the format of a drive-type entry. ■ Fall 1985 BYTE- Inside the IBM PCs Inquiry 187 - 3? <** Vfe ■ * < : ■-" <4 ^f- v *-. V % Statistics, reports and plots happen magically with SPSS/PC+" — the enhanced and expanded Statistical Package for IBM PC/XT/AT's? SPSS/PC+ is the most comprehensive statistical program for performing simple or complex tasks. For nearly 20 years, SPSS Inc.'s reputation and reliability as the leading producer of mainframe statistical and reporting software is unsurpassed. SPSS/PC+ carries this reputation into the PC environment. SPSS/PC+ -Fully integrated: report writing, plotting, file management, communications with mainframes. Statistics: descriptives, crosstabulation, multiple regression, ANOVA. Simple facilities allow transfer of files between SPSS/PC+ and programs like Lotus 1-2-3, dBASE III, and SAS: SPSS/PC+ Advanced Statistics - Factor, cluster, discriminant analyses, MANOVA. SPSS/PC+ Tables" - Presentation-quality tabular reporting. Produce stub and banner tables. Handle multiple response survey data. Control content and layout completely. SPSS/PC+ documentation is rated Number One by both novices and experienced analysts. SPSS Inc. also offers a full training schedule and a customer support hot-line. Contact our Marketing Department today. SPSS Inc., 444 N. Michigan Avenue, Chicago, IL 60611, 312/329-3500. In Europe: SPSS Europe B.V, 4200 AC Gorinchem, The Netherlands, Phone: +31183036711 TWX: 21019. II PRODUCTIVITY RAISED TO THE HIGHEST POWER 'SPSS/PC+ runs on the IBM PC/XT/ AT with hard disk. Contact SPSS Inc. for compatible microcomputers. IBM PC/XT and PC/AT are trademarks of International Business Machines Corporation. dBASE III is a trademark of Ashton-Tate. 1-2-3 is a trademark of Lotus Development Corporation. SAS is a registered trademark of SAS Institute, Inc. SPSS, SPSS/PC+ , SPSS/PC+ Tables, and SPSS/PC+ Advanced Statistics are trademarks of SPSS Inc. tor Its proprietary computer software. See how you can automate testing with your IBM PC or HP Touchscreen PC, Now you can perform test and measurement tasks easily, quickly and cost-effectively with affordable, rackable PC Instruments from Hewlett-Packard. Soft front panels make HP PC Instruments easy to use. By simply touching the HP Touchscreen or using a mouse with the IBM PC, you can set functions, ranges and values, and take measurements. You can also develop programs faster. A few easy-to-remember commands, like OUTPUT and MEASURE, control your PC Instruments from Microsoft® BASIC. And you can use the soft front panel to enter many of the instrument parameters that have been traditionally typed into a system. In addition, with optional HP Data Acquisition Software, you can be doing voltage scanning and temperature measurement in no time at all. Add-on HP-IB libraries can also turn your PC into a versatile HP-IB instrument controller. And you can use them to control both PC Instruments and HP-IB instruments from the same BASIC program. PC Instruments now available include: • iVi Digit Digital Multimeter • 50 MHz Digital Oscilloscope • 5 MHz Function Generator • 100 MHz Universal Counter • Relay Multiplexer • 12 bit Dual Voltage Digital-to-Analog Converter • 16 bit Digital Input/Output • Relay Actuator #»:€ Microsoft® and Microsoft BASIC® are U.S. registered trademarks of Microsoft Corporation . AD 2101552 G9 See a live demonstration of PC Instruments. Call 1-800-344-2525 (in the Continental U.S.) or 1-800-348-8181 (in NJ) for details. HEWLETT PACKARD 166 Fall 1985 BYTE • Inside the IBM PCs Inquiry 86 INSIDE THE IBM PCS Fixed Disks and the PC AT A comparison of speed and performance that matches the PC AT against the PC XT by Jon Shiell and John Markoff THE IBM PC AT provides more flexibility and com- puting power than its popular predecessor, the IBM PC. The AT is based on the Intel 80286 micro- processor, which executes instructions faster and more efficiently than the PCs 8088. The AT provides a mem- ory space potentially 16 times larger than the PC's. This is an unexplored realm for personal com- puter software developers that is certain to prove tempting, The introduction of the AT set a new standard for fixed-disk capacity and performance for micro- computer systems. The AT provides double the disk capacity of the PC XT and offers a simple method for the user to install up to two hard disks with capac- ities of almost 140 mega- bytes each. Why the AT Is Faster Than the XT There are a number of fac- tors, some obvious, some more sub- tle, why the AT exceeds the XT's per- formance. First, the raw clock rate of the AT's 80286 chip is 12 MHz. (The 80286 divides this by 2 internally.) The XT's 8088 clock rate is 4.77 MHz. Therefore, even if everything else were comparable between the two systems, the AT would still be a little more than 26 percent faster than the PC. However, everything is not that clearly defined. For example, the AT's math coprocessor, the 80287, runs at only one-third the frequency of the AT's raw system microprocessor clock (12 MHz)-that is, 4 MHz. This com- pares unfavorably to the IBM PC's numeric processor, the 8087, which runs at the full speed of the PC- 4.77 MHz. The math coprocessor doesn't help the AT's performance as much as might be expected. Despite this obvious im- balance, however, most comparisons lean marked- ly in favor of the AT. A comparison of each com- puter's system bus reveals that the AT has a 16-bit data bus; the PC has an 8-bit data bus. Using an 8-bit bus for a 16-bit microprocessor (as is done in the IBM PC) costs 1 5 to 20 percent in system performance. This, com- bined with the approxi- mately 2 5 percent in- crease due to the dif- ference in clock rates, still gives a speedup of less than 50 percent, so there must still be other factors that contribute to the AT's speed advantage. Significantly, the 80286- powered AT runs with a single wait state; if it ran no wait states, RAM ran- dom-access read/write memory) with a maximum access time of less than 120 nanoseconds (ns) would be necessary. By adding the wait state it is possible for the AT to use standard RAM (150-ns access). The use of the wait state cuts the effective processing rate by less than 2 5 per- (continued) ]on Shiell is a system architect and micropro- grammer. He can be reached at POB 61195, Sunnyvale, CA 94088. }ohn Markoff, a technology writer for the San Francisco Examiner, is a former BYTE editor. He can be reached at 110 Fifth St., San Francisco, CA 94123. ILLUSTRATED BY SUSAN STILLMAN Fall 1985 BYTE- Inside the IBM PCs FIXED DISKS cent on the average, according to Intel benchmarks. At the microprocessor level, the 80286 is dramatically more efficient than the 8086. The 8086/8088 mere- ly overlaps the instruction fetch (IF) of the next instruction with the execution of the current one. The 80286 architecture is "pipe- lined" and adds an additional level of parallelism by overlapping the fetch of a third instruction with the decod- ing of a second instruction and execu- tion of the current instruction. In fact, the amount of instruction overlap in the 80286 is roughly comparable to that in some of IBM's mainframe computers. When combined with the additional hardware speedup of some instruc- tions and internal bus and clock speed enhancements, the 80286 runs between two and six times faster than a 5-MHz 8086 or the PC XT's 4.77-MHz 8088, which is slower and uses an 8-bit data bus. Another interesting point of com- parison is in the speed of DMA (direct memory access), the device-to- memory transfer that doesn't involve the central processing unit (CPU). Here, the AT's performance is significantly slower than that of the IBM PC. The PC AT's system DMA rate is 1.66 microseconds (jts) per transfer Factors Affecting Disk Performance Four major physical factors deter- mine overall disk performance: ac- cess time, cylinder size, transfer rate, and average latency. Access time is the amount of time it takes to move the read/write heads over the desired tracks (cylinders). Once the heads are over the desired tracks, they must settle down from the moving height to the read/write height. This is called the settling time and is normally included in the access time. Specifications for AT and XT disk-drive options are shown in table A. A cylinder is composed of all tracks that are under the read/write heads at one time. Thus, tracks per cylinder is the same as the number of data heads in the drive. Cylinder size is defined as tracks/cylinder x sectors/track x bytes/sector. The Quantum Q540, for example, has four platters and eight data heads, while the Vertex VI 70 has four platters, seven data heads, and one servo head. The difference is that the Quantum drive uses an embedded (or wedge) servo, where the servo signal is embedded on the data tracks, preced- ing the data portion of each sector on the disk. The Vertex drive uses a dedicated servo that requires its own surface. This difference means that the Quantum drive has 8.5K bytes more data available to it before it must seek the next track; if all other factors were equal (which they aren't), the Quantum would be slightly faster in those cases that required reading that "extra" 8.5K bytes. Transfer rate is the rate at which data comes off the disk. It depends on rota- tion rate, bit density, and sector inter- leaving. The first two factors are prac- tically the same for all AT-compatible 5!4-inch hard disks, but not for all floppy disks (the AT's spin 20 percent faster than the other PC floppies). Sector interleaving is used to cut down the effective transfer rate. The in- terleave factor of 6 used on the XT cuts the effective transfer rate from 5 mega- bits per second to 0.833 megabit per second. Note that embedded servo disks, such as those used in the XT and the AT, actually spin about 1 percent slower than 3600 revolutions per minute (rpm) to allow for the increased density due to the servo. Average latency is the time required for a disk to spin one-half of a revolu- tion. For hard disks, which spin at 3600 rpm, the average latency is 8.33 ms (1/3600 rpm x 60 seconds/minute x 0.5 = 8.33 ms per half revolution). This is due to the fact that after the heads finish seeking and settling, you must wait for the required sector to come under the heads. Table A: Sample transfer rates and a comparison of specifications for the disk-drive options available for the IBM PC AT and PC XT. Note that the interleave factor is the only difference between the last two entries in the table; the drive is the same for both entries. PC XT AT 360K-byte Floppy Disk Floppy Disk AT 1.2-megabyte Floppy Disk PC XT PC AT PC AT Hard Disk Hard Disk Hard Disk Rotation 300 rpm 360 rpm 360 rpm 3600 rpm 3600 rpm 3600 rpm Base rate 250K bits/second 300K bits/second 500K bits/second 5M bits/second 5M bits/second 5M bits/second Interleave none none none 6 3* 2* Actual rate in bytes/second 31,250 37,500 62,500 104,167 208,333 312,500 * The AT technical reference manual shows an interleave factor of 2, but the advanced diagnostics and the "IBM PC Seminar Proceedings" claim that the interleave factor is 3. 168 Fall 35 BYTE • Inside the IBM PCs FIXED DISKS (five AT cycles per transfer at 3 MHz). This yields the channel bandwidths shown in table 1. The DMA rate of the PC XT is 1 byte per five cycles (1.05 ps) for a DMA channel bandwidth of 0.952 mega- byte per second. This bandwidth is the result of IBM designing the AT with 5-MHz DMA controllers. The AT's DMA controllers cannot run at the full 6-MHz rate of the AT system clock, and it is difficult to at- tain clock rates that are not simply an integer division of the system timing. The design decision was to set the DMA rate at 3 MHz. This is not as critical a shortcoming for the AT as it may first appear, because few devices (hard disks excluded) can saturate the AT's DMA capability. It is interesting that the AT does not use DMA for hard-disk input/output (I/O). Instead, the AT's hard-disk con- troller has a 512-byte sector buffer that is accessible by the 80286 as a 16-bit device. When the buffer is full or empty, the controller interrupts the 80286 (using INT14 hexadecimal), which then moves the data via programmed I/O (that is, Rep Insw for reads and Rep Outsw for writes) to or from memory at a rate of 2 megabytes per second. This transfer rate is approximately twice that of the XT. The 2 -megabyte transfer rate of the AT for string-move operations is the result of using three cycles (including one wait state) to bring the data (16 bits) into the processor and another three cycles (including another wait state) to move the data into memory. This process uses six cycles per 2-byte transfer. At a clock rate of 6 MHz, a single clock cycle takes 167 ns. Six cycles therefore require 1002 ns for a 2-byte transfer, which corresponds to an effective rate of 2 megabytes per second. Zero Wait State IBM has provided a special line called the zero wait state (0WS) signal on the bus to suppress the wait states. This is useful if you have high-speed mem- ory and an expansion card that sup- ports this signal. For example, in the preceding case performance could be improved by one-sixth because the memory card used in the transfer could suppress the wait state. However, the AT's disk controller won't suppress the wait state when transferring data from its sector buffer. Therefore, a savings of only one cycle per transfer is possi- ble. By using the 0WS signal we can speed up the transfer rate from 2 megabytes per second to 2.5 mega- bytes per second. In addition to bus factors, the AT's 1.2 -megabyte floppy disk holds more than three times as much data as the XT's 360K-byte floppy disk. It also has a data-transfer rate that is twice that of the XT's and an average latency that is 20 percent less than that of the XT's. Furthermore, the AT's floppy disk has somewhat faster access times. Of course floppy-disk speeds are not that significant, as the floppy disk plays a much less important role in (continued) Table 1: Channel bandwidth data for the IBM PC AT. DMA Channel Transfer Width Channel Bandwidth 0-3 4 5-7 1 byte used to cascade channels 0-3 2 bytes 0.6 megabyte/second 1.2 megabytes/second Can the AT Support Noninterleaved Hard Disks? [Editor's note: An interleave factor of 1:1 implies a noninterleaved disk] Let's do some quick back-of-the-napkin calculations to answer this question. At 3600 rpm one rotation takes 16.67 ms, and one rotation per track of 17 sectors results in less than 1 ms per sector. There are about 10,416 bytes per unformatted track, again at one track of 17 sectors; this gives us about 612 bytes per unformatted sector. There are 512 bytes of data in a formatted sector, thus about one-sixth of the sector is not data (512 data bytes out of 612 possible). If we assume that during this period the AT's track buffer is available to the 80286, then we have one-sixth of 1 millisecond or about 1 50 ps to fill or empty the buffer. This assumes that the buffer is single-ported and doesn't support interleaved access, which seems to be the case for the AT. Programmed I/O normally transfers one word every six cycles, which means a data rate of 2 megabytes per second. To move our 512 bytes of data will take about 250 ^s, assuming INT14 hexadecimal (the buffer full/empty interrupt) overhead is 0, which it isn't. We expect that without interleaving we have less than 1 50 fis to fill or empty the buffer, while the 80286 would need at least 2 50 ps. Consequently, the sec- tor buffer will not support 1:1 interleaving but will probably support 2:1 interleav- ing without any major problems. This is due to the fact that we have almost 1 millisecond to fill or empty the buffer when 2:1 interleaving is used. Fall 1985 BYTE- Inside the IBM PCs 169 FIXED DISKS the system design of the AT than it does in the PC. Comparing the AT and XT Hard Disks Let's compare the hard disks that are standard equipment on the XT and the AT. We will also discuss a 140- megabyte disk, the Maxtor XT-1140. Looking at the relative access times (including latency) for the XT, the AT and the Maxtor shows the Maxtor to be by far the fastest drive; however, we also find that the AT's disk is about Table 2: A comparison of disk performance for the AT and the XT with standard disks and the AT with the Maxtor disk. Track-to-track access time + latency Index Maxtor 5 ms + 8.3 ms = 13.3 / 22.3 = 0.60 PC AT 14 ms + 8.3 ms = 22.3 / 22.3 = 1.00 PC XT 16 ms + 8.3 ms = 24.3 / 22.3 = 1.09 latency Index + 8.3 ms = 38.3 / 60.3 = 0.64 Mean access time Maxtor 30 ms PC AT 52 ms + 8.3 ms = 60.3 / 60.3 = 1.00 PC XT 85 ms + 8.3 ms = 93.3 / 60.3 = 1.55 Maximum access time + latency Index Maxtor 48 ms + 8.3 ms = 56.3 / 105.3 = 0.53 PC AT 97 ms + 8.3 ms PC XT 205 ms + 8.3 ms 105.3 / 105.3 = 1.00 213.3 / 105.3 = 2.03 40 percent faster on the average than the XT's (see table 2). But access time is not everything. Table 3 shows the comparative times for a 127,000-byte read (assume all sectors are contiguous and start with sector 1, head 0). Although the Maxtor's access time for this operation is about 3 50 per- cent faster than the AT's, which is about 1 5 percent faster than the XT's, its access time gets swamped by the transfer times. The apparent dif- ferences are shown in table 4. The XT appears to be about 85 per- cent slower than the AT. which is only about 14 percent slower than the Maxtor. The Maxtor's faster access time is swamped by the 609 millisec- onds (ms) it takes to transfer the data, and it has no advantage in transfer rates. However, for a smaller (more normal size) file, say 34K bytes, we would get the times shown in table 5. The XT appears to be about 80 per- cent slower than the AT. which is Table 3: Time required for a 127,000-byte read operation. Average Access Cylinder-to-Cylinder Drive Bytes/ Cylinders Time Access Time Type Cylinder Required (note 1) (note 21 Average Aggregate Latency/ Access Interleave Track Time Factor (note 3) (note 4) Transfer Rate Transfer Time (bytes/second) (note 5) 8.3 166.2 104,200 1219 8.3 140.2 208,333 609 8.3 38.3 208,333 609 PC XT 34K four 85 (3) x 16 6 PC AT 34K four 65 (3) x 14 3 Maxtor 127K one 30 n.a. (one cylinder used) 3 Notes 1. Average access time is the average time required for the disk heads to move from any cylinder to any other cylinder on the disk (including settling time before the heads can read data). 2. Cylinder-to-cylinder access time is the time required to move the heads from one cylinder on the disk to an adjacent cylinder on the disk (including settling time). 3. Average latency is the time required for a disk to spin one-half revolution. For hard disks, which spin at 3600 rpm, the average latency is 8.33 milliseconds (1/3600 rpm x 60 seconds/minute x 0.5 = 8.33 ms per half revolution). This is due to the fact that after the heads finish seeking and settling, you must wait for the required sector to come under the heads before reading data. 4. Aggregate access time is determined by average access + [number of cylinder-to-cylinder changes x cylinder-to-cylinder time] + [number of cylinders x average latency]. 5. Transfer time is determined by [127K bytes divided by transfer rate in bytes/second] expressed in milliseconds. 170 Fall 1985 BYTE- Inside the IBM PCs FIXED DISKS about 40 percent slower than the Maxtor. If the file were spread over two cylinders on the XT and the AT (a more normal case due to their significantly smaller cylinder size), the ratios would be as shown in table 6. As expected, the Maxtor looks even better in this more typical case because it doesn't need the additional track-to-track access and associated latency. Also note that the AT's relative performance slipped a bit due to the small difference in AT and XT track-to-track access times. Access time is most important when doing a lot of disk accesses in a short period of time, for instance, when searching a large database or work- ing on a file that, due to fragmenta- tion, is spread out over the entire disk. For example, to read a 34K-byte file (17 clusters on the AT's 20-megabyte disk) on a very fragmented disk could take up to 17 average accesses for a total of more than 1 second (102 5 ms - 17 x (52 ms + 8.3 ms)). It takes 163 ms to transfer the data. So our effective I/O time is 1188 ms as opposed to 236 ms for an un- fragmented disk. Even if we assume less fragmentation— say the file is split into four parts— we get total access time of about 241 ms (4 x (52 ms + 8.3 ms)); adding the transfer time gives us 404 ms, or about a 50 per- cent decrease in the disk's effective "speed." This points out the importance of not letting your disk get very frag- mented, as this results in much longer effective access times. Let's look at another example using our big file of 127K bytes. If it's all in three continuous cylinders, it will take about 117.9 ms, as we've shown, for the access portion of the read (assum- ing that the file allocation table [FAT] and the directory are already in mem- ory). But the worst case is where the file is spread out over the entire disk, with only one cluster per cylinder and the cylinders in random order. It could take approximately one mean access per track over 64 tracks (127K bytes divided into 64 clusters of 2K bytes each; one cluster per track) for an effective access time of Table 4: A comparison of access time, transfer time, and performance index for the AT and the XT with standard disks and the AT with the Maxtor disk. Drive Type Access Time Transfer Time Total Performance Index PC XT PC AT Maxtor 166.2 ms 140.2 ms 38.3 ms + 1219 ms = + 609 ms = + 609 ms = 1385 749 647 ms / 749 ms ms / 749 ms ms / 749 ms = 1.85 = 1.00 = .86 Table 5: Transfer time and performance index for a 34K-byte transfer. PC XT drive: one average access 85 ms + 8.3 ms = 93.3 ms 34,000 bytes at 104,200 bytes/second = 326 ms (interleave of 6) PC AT drive: one average access 65 ms + 8.3 = 73.3 ms 34,000 bytes at 208,333 bytes/second = 163 ms (interleave of 3) Maxtor drive: one average access 30 ms + 8.3 = 38.3 ms 34,000 bytes at 208,333 bytes/second = 163 ms (interleave of 3) Results in: Drive Access Transfer Type Time Time Total Performance Index PC XT 93.3 ms + 326 ms = 419 ms / 236 ms = 1.78 PC AT 73.3 ms + 163 ms = 236 ms / 236 ms = 1.00 Maxtor 38.3 ms + 163 ms = 146 ms / 236 ms = .62 Table 6: Transfer time and performance index for two cylinders. 34K-byte file contained on Drive Access Transfer Type Time Time* Total PC XT 93.3 ms + 326 ms + 24.3 ms PC AT 73.3 ms + 163 ms + 22.3 ms Maxtor 38.3 ms + 163 ms + 0.0 ms Performance Index 444 ms / 259 ms = 1.71 259 ms / 259 ms = 1.00 146 ms / 259 ms = .56 * Track-to-track access time plus average latency almost 4 seconds (3859 ms = 64 x 60.3 ms including latency). So we get disk I/O times of about 749 ms versus 4468 ms (almost 4.5 seconds); thus, the fragmented disk appears to be about six times slower than the un- fragmented one. If you want to get an idea of how fragmented your hard disk is, the DOS CHKDSK command, when given a filename, displays the number of discontinuous areas occupied by the file. While this is not as useful as it could be (what we really want to know is how many cylinders the file is spread across), it gives us a fair idea of the amount of fragmentation. Cluster Size An additional factor, cluster size, is purely an operating-system function, (continued) I YTE • Inside the IBM PCs FIXED DISKS but it does affect disk performance. A cluster is the number of contiguous sectors that DOS allocates each time disk space is needed. The FAT is what DOS uses to keep track of which clusters are allocated to which files and which are available for use. Begin- ning with DOS 3.0 there are now two types of FATs. depending on the size of the partition. An FAT that uses 12-bit entries is used for disks holding less than 20 megabytes, and one with 16-bit entries is used for disks holding 20 megabytes or more. On a 10-megabyte disk or partition, each cluster is 4K bytes or eight sec- tors, and the FAT takes up 4K bytes. Using a 12-bit FAT entry results in 4096 possible clusters. DOS uses a 4K-byte cluster with a 12-bit FAT This results in a maximum disk size of 16 megabytes (4096 clusters/disk x 4096 bytes/cluster) without using a larger cluster size. All floppy disks use this scheme. On disks or partitions of 20 mega- bytes and more, the cluster size is 2K bytes or four sectors. For a 20-mega- byte disk, this means that the FAT is 20K bytes, and for a 32-megabyte disk or partition, the FAT occupies 32K bytes. (continued) Using DEBUG to Determine the Cluster Size of a Disk The first and last register dumps are for the C drive, while dump 2 is a 1.2-megabyte floppy disk. The register meanings are as follows: If the AX register contains FFFF hexa- decimal on return, then the drive number was invalid and the rest of the registers are meaningless. Otherwise the registers contain the following: AX number of sectors per cluster, four for the hard disk and one for the floppy disk BX number of free clusters CX number of bytes per sector, normally 200 hexadecimal or 512 bytes DX total number of clusters on the disk Therefore, the hard disk has a DOS partition of 1 5,630 (3D0E hexadecimal) clusters at four sectors per cluster, for a total of 62,520 sectors or 31.26 mega- bytes (using a Quantum Q540, Type 7 drive). > debug -a XXXX:0100 XXXX.0100 XXXX:0103 XXXX:0106 XXXX:0108 XXXX:0109 -q =100 108 Remember that debug works only with hexadecimal numbers mov ax,3600 mov dx,0000 int 21 nop Load AH with the function code (36 hexadecimal) DL = drive number (0 = default, 1 =A, 2 = B, 3 = C, Call DOS to do the function Space saver to stop at This is for Drive C AX = 0004 BX = 2F6C CX = 0200 DX = 3D0E SP = XXXX BP = XXXX SI = XXXX DI = XXXX DS = XXXX ES = XXXX SS = XXXX CS = XXXX IP = 01 08 XX XX XX XX XX XX XX XX XXXX:0108 90 NOP -a 103 XXXX:0103 mov dx,0001 ; Now let's look at the 1.2-megabyte floppy XXXX:0106 -g =100 108 AX = 0001 BX = 045B CX = 0200 DX = 0943 SP = XXXX BP = XXXX SI = XXXX DI = XXXX DS = XXXX ES = XXXX SS = XXXX CS = XXXX IP = 0108 XX XX XX XX XX XX XX XX XXXX:0108 90 NOP -a 103 XXXX:0103 mov dx,0003 ; Now let's look at Drive C XXXX:0106 -g =100 108 AX = 0004 BX = 2F6C CX = 0200 DX = 3D0E SP = XXXX BP = XXXX SI = XXXX DI = XXXX DS = XXXX ES = XXXX SS = XXXX CS = XXXX IP = 01 08 XX XX XX XX XX XX XX XX XXXX:0108 90 NOP -q 172 Fall 1985 B Y T E • Inside the IBM PCs ■ faiHfc^T*jg WHAT YOU SHOULD, WHAT YOU SHOULD NOT, NOW AND LATER You don't want to buy a multi-user system without a PC file server capability. You don't want to buy a PC file server without a multi- user capability. The Multi-User File Server (MUFS) is what compliments your needs in performance, growth, and cost. Selecting the right computer system is the [ most crucial require- ment for your company See us at »IB/Fall'85 j^f growth, because of ever- '}:% increasing demand in computer performance and capacity. The computer you purchase now should muuiauuwMiuM no t b e a bottleneck later. JC Multi-User, Multi-Processor, File Server is the only computer system you can afford to speculate. And Nothing else. . . JC INFORMATION SYSTEMS November 20-24, 1985 Las Vegas Hilton Hotel Las Vegas, Nevada Fremont, CA 94539 408/945-0318 TLX: 910-381-7041 Inquiry 99 In Australia: Synax Systems, Cti. Pacilic Hwy & Beaconsfield, Lindfield N.S.W. Australia 2070, Tel: 467-1166 TLX: (790)25468 In The United Kingdom: Interam Corporation 62 Weii Road Wimbledon, London SW19 8UG, England, Tel: 879-1888 TLX: (851)8954072 In Europe: COSTEC Gmbh Hollandische Strasse 19, 3500 Kassel, West Germany, Tel: 56147268 TLX: (841)99695 ARECTA System AB Ekensbergsvagen 117, 5-171 41 Solna, Sweden, Tel 898-6790 TLX: (854)08986790 ■i Inquiry 211 Statistical Tools for PROFESSIONALS ► easy to learn ► easy to use fast accurate comprehensive reliable StatPac™ Complete statistical package proven for over 5 years ^Goodness-of-Fit™ ^^ Advanced regression package for interactive model building Forecast Plus™ Over a dozen graphical time-series analysis techniques Call for Information 1-800-328-4907 WALONICK ASSOCIATES 6500 Nicollet Ave. S., Minneapolis, MN 55423 (612) 866-9022 * For users of IBM PC, AT, XT, PCjr and most IBM compatibles. PRINTQ • DOUBLE PC OUTPUT. * ENHANCE PRINTER CONTROL. Get the first real "mainframe" PC print spooler for just $69 PrintQ is a complete, independent print control subsystem that increases PC productivity so dramatically, it's like having an extra PC. Only better. PrintQ not only lets you run applications in the foreground while it controls your printer in the back- ground, it actually gives you greater printer control than ever before. PrintQ gives you the power to: ■ Re-start at any page after form jams • Print up to 255 copies • Get help via built-in text • Minimize form changes • View documents without printing • Hold documents for later printing • Simplify forms alignment • Print in any order • Control printer at any time via pop-up display 8 Store as much data as your disk can hold Interface with existing programs ° Boot directly Save time. Save money Get maximum productivity from your PC and printer whether you're an advanced or beginner user. Call now or mail the coupon to order. 1-800-346-7638 In NJ, Call 201-361-1550 Name. PRINTQ, Software Directions, Inc. 425 Route 10, Randolph, NJ 07869 YES. Rush me PrintQ for just $69, which includes postage and handling. After using PrintQ, if I'm not convinced it increases my PC's productivity, I'll return it within 30 days for a full refund. Address _ . State . -Zip_ D Check enclosed Acct. No. □ Visa □ Mastercard □ American Express Expiration Date NJ residents add 6% sales tax. Signature IBM is a registered trademark of International Business Machines Corporation. FIXED DISKS BIO The actual calculation for FAT size, assuming a 2K-byte cluster, is: disk or partition size/2 K bytes x 2 bytes/FAT entry, which reduces to 1 K byte of FAT per 1 megabyte of disk or partition. The reason for increasing the number of clusters on the disk instead of just increasing the size of each cluster is that, while large clusters are good for access time, most files fit in just a few clusters, thereby minimizing the frag- menting of the disk. A large cluster is inefficient in terms of space. Assume that we use an 8K- byte (16 sectors) cluster size for our 20-megabyte disk. This lets us map the disk into an FAT with 1 2-bit entries (20 megabytes at 1 cluster; 8K bytes is 2560 clusters). But because files are allocated space in units of 8K bytes, on the average each file wastes 4K bytes (half of its last cluster). This 4 K bytes of waste per file can really add up. Let's say we have 512 files on a disk. This means that 2 megabytes, or 10 percent of the total space on the disk, is wasted (512 files x 4K bytes per file). By keeping the cluster size at 2K bytes (four sectors), the amount of wasted space is great- ly reduced, but a penalty is paid both in the size of the FAT and in the speed with which the disk gets fragmented. The reason we care about the size of the FAT is not because it uses up more disk space but because DOS keeps a copy of the FAT of the active disk(s) in memory. And while 20K bytes for a 20-megabyte disk (or 32K bytes for the biggest disk or partition DOS supports) is not so bad in a 2 56K-byte system, it can add up. One last relevant feature of the AT is that its hard-disk controller sup- ports overlapped (buffered) seeks. Also, the controller board supports one floppy-disk and one hard-disk data transfer at the same time. The fixed-disk interface is ST412. Over- lapped seeks allow a system with two or more hard disks to overlap opera- tions. This is done by sending multi- ple step (seek) pulses to a drive that then disconnects and does the step- ping without the controller. The con- troller is then free to work with its re- maining drive(s). ■ Fall 1985 BYTE • Inside the IBM PCs V* A FEW GOOD REASONS TO BUY A NEW CANON PERSONAL COMPUTER. Canon Personal Computers run all popular IBM PC-compatible software. If you're in the market for a smart, fast, modestly priced personal computer that's IBM-compatible, look no further. Canon has just created the ideal series. The Canon Personal Computer A- 200 Series can run hundreds of programs designed for the IBM PC family Without modification. Even the layout of the keyboard is compatible with the IBM PC's. And with its 16-bit microprocessor, memory and display adapter, each can process complex data in record time. They expand as you expand. As your needs change, so can Canon Personal Computers. Each comes with built-in parallel and serial ports. And with expansion capability in most models, you can modify the system according to your own needs. You can add optional IBM-compatible hardware, too. Like the Canon memory expansion board. Or one of Canon's full line of quality printers, including the advanced laser beam printer. Canon's three-for-all. The Canon Personal Computer A- 200 Series offers three ways to enter the world of personal computers. The standard floppy disk model is a ready-to-run, compact system with 256K bytes of memory, expandable to 5I2K bytes. It offers a choice of monochrome or color graphic display and two 5 W 360K byte drives. The powerful hard disk model runs complex business software with even more speed and greater storage memory capacity. It comes with a 5 W 360K byte floppy disk drive and a I0M byte hard disk drive. And the transportable model weighs in at a low 19 pounds, so it's perfect for the business professional on the move. It features a 5I2K byte memory, full-sized graphic LCD screen and two 360K byte floppy disk drives. Plus, the RGB color monitor interface lets you use the transportable model with a color graphic display. And the transportable model has a built-in 300/1200 bps modem. What's in a name! Plenty, when that name is Canon. Every Canon Personal Computer is the product of a company world-renowned for quality and innovation. So when you enter the computer age with Canon, you know you're in good company. For more information, see your local computer dealer or call 1-800-323-1717, x325. (In Illinois, 1-800-942-8881, x325.) At. . JPM ' W Canoir Canon U.S.A., Inc., One Canon Plaza, Lake Success, NY 11042. © 1985 Canon U.S.A.. Inc. Inquiry 20 Recounts SJl *vsz~~ Kimtron MULTI-USER SOLUTION for IBM PC, XT, AT Compare The Multi-User Solution future is now available. Convert your IBM PC, XT, AT or Compatibles to a true multi-user system while maintaining display, keyboard and software compati- bility. Since the KT-7/PC display is the same as your PC monochrome monitor, with its look-alike keyboard, operators will feel they're using an IBM PC and can also use the same software manual. Kimtron's multi-user solution in- cludes file and record locking, shared data access, and commun- ication between users. It is the intelligent alternative. The KT-7/PC supports Time Sharing, Enhanced Time Sharing and Multi-Processor implementa- tion under PC DOS, MS DOS, UNIX, XENIX, CPM 86, Multilink, Concurrent PC DOS, and other compatible multi-user operating systems. Kimtron's multi-user solution may be tailored for cost effectiveness; as low as $1095 for an additional user, and for speeds more than ten times faster than LAN. You can add one or as many as 31 additional users per PC. Kimtron delivers the future now by allowing an ever- widening network of multi-user PCs. The KT-7/PC may be comple- mented with one (or more) I/O Card, Memory Card, 8086 Speed NOTE: IBM PC, XT, AT, PC DOS, MS DOS, UNIX, XENIX, CPM 86, Multi-Link, Concurrent PC DOS are registered trademarks of IBM Corporation, MicrosoItCorp., Bell Labs., Digital Research Inc., Software Link Inc. respectively. Enhancer Card, 80286 AT Card, 8088 Multi-Processor Card, 80186 Speed Enhancer Card, 68000 Card, and related software. For more information about Kim- tron's Multi-User Solution, or general video data terminals for other mini or micro multi-user systems, call your local computer dealers, distributors or Kimtron Corporation Today! (408) 286-8790 TWX 910-338-0237 ^= 1705 Junction Court pr ^|| Building #160 =Hi San Jose, CA 95112 m ^Kimtron 176 Fall 1985 BYTE- Inside the IBM PCs Inquiry 104 INSIDE THE IBM PCs A Survey of Debuggers A detailed look at the features you should look for in a debugger to by Frank Drake Jr., Arthur McCaffrey, and John Sadowsky A WIDE RANGE of peo- ple use debuggers. The novice programmer curi- ous about IBM PC archi- tecture, the end user mak- ing an occasional patch to software, the hacker ex- ploring existing code, and the software developer wanting to make the best use of his time all need some way to see inside the IBM PC and its soft- ware. (See the text box "How Debuggers Work," page 180, for a discussion of debugger techniques.) Recent developments have brought many new debugging features to the IBM PC. We plan to show- case some of these fea- tures and describe some tips for getting the most out of Microsoft's Debug, a program that is included with MS-DOS. Debug is an extremely reliable pro- gram. Its more common uses include tracing through and disassem- bling object code, dump- ing data, and reading ab- solute disk sectors. Since anyone who owns MS-DOS owns Debug, it is the cheapest and most common debugger for the IBM PC. One of the important needs that Debug fills is for a standard debugger. When you want to illustrate some technical feature of the IBM PC, you can be sure that everyone has Debug. Using input redirection, you can simplify the distribution of a patch for a program that is already on the mar- ket. The best way to distribute this patch is to create a file that contains the keystrokes of a Debug session that would fix the program. You could send it to software distributors, who would then be free to give a copy to anyone who needed it. You would only have to execute Debug, using in- put redirection to get its input from the debugging session file. If the file containing these keystrokes is named PATCHES.TXT and the program to be patched is BADPROG.COM, the command line would be A>DEBUG BADPROG. COM < PATCHES.TXT Debug is lacking in sev- eral areas. It does not sup- port symbols (in this arti- cle, symbols refer to mne- monics that represent memory locations within your program). Its tracing capabilities are weak. It has only 10 breakpoints and as soon as program execution stops, all break- points are cleared. When Debug and the program being debugged share the same output device, Debug overwrites the program's output. One way around the problem of overwritten screens is to redirect Debugs output to a printer. Then the printer acts as a terminal and the screen is free. To accomplish this, enter A>DEBUG >PRN (continued) Frank Drake )r. (34 Farrwood Dr.. Andover, MA 01810) is a student and employee of the University of Lowell. Arthur McCaffrey (98 Neponset Ave.. Hyde Park. MA 02136) has been involved in various aspects of computers, programming, and analysis since the early 1960s. John Sadowsky (Atlas Distributing Corp., 44 Southbridge St.. Auburn, MA 01 501) is a self-taught programmer who uses microcomputers extensively in small-business management. ILLUSTRATED BY ALEXA GRACE Fall 1985 BYTE- Inside the IBM PCs 177 DEBUGGING FEATURES lust look to your printer for Debugs output. You should remember that most printers are line-buffered and will not show Debugs prompt or what you type until you hit the carriage return. Also, note that this technique does not work for programs that write their output to the standard output device; in this case, the program's out- put will also go to the printer. Operating Modes Because a programmer might spend many hours of his day with a debug- ger, the user interface is an important factor. Two approaches are terminal and windowed output. Terminal out- put, like that used by Debug, is more common. Usually programs with ter- minal output have command-driven input, where you type a request and the debugger either completes the given task or supplies the requested information. As the screen fills, the oldest data scrolls off it. An ad- vantage of the terminal interface is that you can look back and see what you have done over the last few commands. A windowed interface makes it easy to view several kinds of information at once. You might have a window with a memory display, a second win- dow with a disassembly of the code, and a third window for the registers. (Pfix86 from Phoenix Software Associates Ltd. uses this kind of out- put interface, along with a Lotus 1-2-3— style menu-driven input inter- face.) You might even have a stack win- dow that grows down or up, depend- ing on how you like to picture the stack in your mind. PC Probe (Atron Corp.) mixes the features of both worlds. It has a ter- minal I/O (input/output) interface like Debug, but it also allows definition of macros and windows that can be linked together. For example, you can create a macro that will display the registers and specific memory loca- tions. Once linked to a window, the registers and values at the memory locations are displayed in that window after each debugger command has been completed. This interface lets you make the best use of your screen, displaying exactly what you want when you want it. Symbolic Debugging Among the most important debugger features is support for symbols. It is usually a good idea to break down large programs into small modules so you can work on portions of the pro- gram, then link them all together. When you have multiple segments, you can no longer use the offsets found in the .LST file to determine the location of the program counter or data. Symbols let you refer to memory locations by the name used in the source file. Since debuggers use executable code (the .EXE or COM file being debugged) as their main input, they do not have direct access to the sym- bols used in the source file and must obtain the symbols in other ways. A common way to obtain symbols is by reading the .MAP file produced by the linker (although you might have to convert it to the debugger's own read- able format). In order to obtain sym- bols this way, you must meet two con- ditions. You must define the symbols as public (global) symbols when the source is assembled or compiled, and you must link the program using the linker's /MAP option to place all the symbols it encounters into the .MAP file. You can use this process to your advantage in that you can enter sym- bols into your .MAP file after linking. Unfortunately, generating a new .MAP file will overwrite the old one, and any symbols entered this way will be lost if you link again. One debugger, SYMD from D & V Systems, can get its symbols from the .LST file (if you are debugging a COM program) so that public and local symbols will be available while debug- ging. The keyboard is another source of symbols. Advanced Trace86 from Morgan Computing Co. Inc., Code- Smith-86 from Visual Age, PDT-PC from Answer Software Corp., and Pfix86 Plus from Phoenix Software Associates Ltd. all let you define sym- bols during the debugging session. CodeSmith-86 lets you take a "snap- shot" of the session and write it to disk but does not save the new sym- bols in the main symbol file. You can reload this snapshot later so you can resume a past session and restore all the symbols entered at the keyboard during that session. On the other hand, Advanced Trace86 saves sym- bols in the executable file. Pfix86 Plus saves them in a symbol table file. Symbols make it much easier to follow the flow of the program, espe- cially in a debugger that presents a window on the disassembled code. When you look at disassembled code, it is much easier to understand a JMP ERROFLEXIT than a JMP 127f:1045. Several debuggers allow symbolic debugging in overlays. Pfix86 Plus gives the symbolic output of overlays linked with Phoenix Software's Plink86 program linker. PDT-PC and PC Probe also support symbolic debugging of overlays with Plink86. Breakpoints All debuggers support the ability to stop execution when the CS:IP (code segment:instruction pointer) combi- nation reaches a specified address. In Debug, for example, you can set such a breakpoint with the G ADDR com- mand, where ADDR is either an off- set in the code segment or a segment/ offset combination. You can set up to 10 such breakpoints. Other debuggers go far beyond De- bug's rather rudimentary treatment of breakpoints. Symbolic debuggers let you set a breakpoint at a user-defined symbol rather than at a numeric ad- dress. This allows you to concentrate on program flow rather than on the hexadecimal addresses in a program listing. SYMDEB, the symbolic debug- ger included with Microsoft's Macro Assembler version 3.0, is a symbolic superset of Debug. In the example -G = START_OF_PROG SUB1 SYMDEB would start execution at the location represented by START OF PROG and would execute until it reached either the point repre- sented by SUB1 or the end of the program. Some debuggers not only allow [continued) Fall I985 BYTE- Inside the IBM PCs Inquiry 56 - EVEREX EVER FOR EXCELLENCE r aft /Kl i i' ill \ Li --- : --M %\ LOTUS 1-2-3 132 COLUMNS ' JJ 1 H... I . III J I I.L I M I SYMPHONY HIGH RESOLUTION 16 COLORS. 320x200 The Edge The Facts: The EVEREX EDGE The EVEREX EDGE Paradise Modular Card C/> li CO, O fa c -1 Hercules Graphics Card H c: <" = «> " 3 3 (O V r- 0) 0) ST o- (A Runs an IBM or Compatible Color Monitor k* s k* IBM Monochrome Compatible and High Resolution, 720x348 graphics ►<* 1^ •« \S Runs Color Software on a Monochrome Monitor, Full Screen: v' i^ \S s -in 1 6 shades of green on the IBM Monochrome monitor S s \S \S —Runs Flight Simulator, PC Paintbrush, IBM BASICA commands and more S i/* \S S S —No patches or modifications needed IX \S \S S -Displayed in the IBM standard 9x14 character set \S \S V Extended Text Modes: lS \S \S -132 columns by 25 rows in monochrome \S ^ \S -132 columns by 44 rows in monochrome lS \S v> -132 columns by 25 rows in color s \S Runs Lotus 1-2-3™ and Symphony™ in high resolution monochrome graphics: yS V* V* » complete Ime of integrated i nput ^^^ Hmfofe V S!ff 0fthis ^ed e orrer. Contact your focal Inquiry 103 ♦ J 9 # # V *? * * if ** Table 2: Comparative benchmark results for the 1 2 computers in the MS-DOS group with the largest installed base through the end of 1984. : Columbia Corona Desktop PC Hewlett-Packard HP 150 IBM PC IBM PC AT IBM PCjr IBM PC XT ITT XTRA Sanyo MBC-550 TeleVideo TS 1605 Texas Instruments Professional Zenith Z-150 €* t 62 240 - 236 m ■ co 180_ I 267 209 191 171 CALCULATING WITH SINGLE-PRECISION NUMBERS SIEVE OF ERATOSTHENES PROGRAM I ■■■■^MBHl^HH^MM BENCHMARKS write a 64K-byte sequential file onto a disk in 128-byte chunks. Note that in the tests of BASIC disk access for the Sanyo, the test file was written to and read from the default drive. Sanyo BASIC apparently cannot access other disk drives. The same procedure was used in one-drive sys- tems, like the IBM PCjr. 100 A$= "123456781234567812345678 12345678" 120 B$ = A$ + A$ + A$ + A$ 140 NR = 512 160 OPEN "BTEST" FOR OUTPUT AS #1 180 FOR 1 = 1 TO NR 200 PRINT #1, B$ 220 NEXT I 240 CLOSE 260 print "done" Reading from Disk The Reading from Disk test that follows measures how long it takes to read the above sequential 64K-byte file in 128-byte segments. 300 NR = 512 320 OPEN "BTEST" FOR INPUT AS #1 340 FOR 1 = 1 TO NR 360 B$ = INPUT$(128,1) 380 NEXT I 400 CLOSE 420 print "done" The Sieve of Eratosthenes Program Eratosthenes, the head of the Alexan- dria library around 200 B.C., dis- covered this technique for finding prime numbers. The program tests how long it takes to do one iteration of the Sieve of Eratosthenes prime- number program. 800 SIZE = 7000 820 DIM FLAGS (7001) 830 PRINT "START ONE ITERATION" 840 COUNT=0 850 FOR l=0 TO SIZE 860 FLAGS (I) =1 870 NEXT I 880 FOR I = TO SIZE 890 IF FLAGS (l) = THEN 970 900 PRIME = I + I +3 910 K = I + PRIME 920 IF K>SIZETHEN 960 930 FLAGS (K) = 940 K = K + PRIME 950 GOTO 920 960 COUNT = COUNT+1 970 NEXT I 980 PRINT "DONE: ";COUNT;"PRIMES FOUND" 990 END Calculating with Single-Precision Numbers The Calculations test measures how long it takes to perform 10,000 multi- plication and 10,000 division opera- tions using single-precision numbers Only one # word processing program links allkinds of computers. Finally, there's a way to stop personal computer can be the proliferation of software transferred to and shared by in your word processing environment. It's called WordMARC™- the single full-featured word processor that runs an iden- tical program on some 35 different makes and models of computers. And with its companion program, LinkMARC, Word- MARC files created on a your company's UNIX's- based and VAX™/VMS super- mini computers. Or vice versa. In addition to being compati- ble with all kinds of computers, WordMARC also gets alon with all kinds of users. Its documentation is written specifically for the computer system it will operate on. Its self-teaching RIME Kail 198^ BY ' Inside the IBM PCs BENCHMARKS and also gives a rough indication of the error involved. 500 NR = 5000 520 DEFSNG A-Z 540 A = 2.71828 560 B = 3.14159 580 C=1 600 FOR I = 1 TO NR 620 C = OA 640 C = C*B 660 C = C/A 680 C = C/B 700 NEXT I 720 PRINT "DONE" 740 PRINT "ERROR = "; C-1 Format and Copy Disk The Format and Copy Disk test measures how long it takes to format and copy a disk using the diskcopy command. The test is done only on floppy disks. Copies are made onto previously unformatted disks. Since disk size can vary, the time is adjusted to reflect the number of seconds per 40K bytes of disk space. The tests on several of the units (STM, Morrow Pivot, Tandy 2000) timed format and diskcopy separate- ly and combined the results. In addi- tion, the STM time includes automatic verification after formatting. Units with hard-disk drives in their standard configuration (or in the case of the Stearns, for which the review system contained an optional hard disk) will not have results for this test. Results on this test could not be ob- tained for the IBM PCjr and the HP 110, which have only one disk drive, or for the HP 1 50, because the utility diskcopy is not included with the operating system. File Copy The File Copy test measures how long it takes to copy a 40K-byte disk file to The Format and Copy Disk test is done only on floppy disks. a blank formatted floppy disk. The tests on units with hard-disk drives measure how long it takes to copy the 40K-byte file from the hard disk to a blank formatted floppy disk. Other- wise, reviewers copied the file to another part of the same disk. There are no results for the HP 110, which had only one disk drive. The results for the IBM PCjr reflect copying to another part of the same disk. ■ ACKNOWLEDGMENTS We would particuarly like to thank Michael Bamberg, Woody Bell, Neil Rosen, and Avram Tetewsky for their help in running the benchmarks. guide helps novice users get quickly up to speed. And it's supported by a special "800" number hotline. Word MARC's many ver- satile features include technical and scientific symbols, foreign language characters, a what-you- see-is-what-you-get screen, and menu-driven operation with convenient function keys. It's available for many different operating systems, including MS-DOS™ and UNIX, and supermini pro- prietary systems including VAX/VMS. And WordMARC can also be integrated with other pop- ular applications software. So put your word processing software resources back under control with WordMARC. The Uncommon Denominator. Contact MARC Software for more information at 260 Sheridan Ave., Ste. 200, Palo Alto, California 94306. MARC SOFTWARE INTERNATIONAL, INC. 1-800-831-2400. In California 1-800-437-9900. WordMARC The Uncommon Denominator WordMARC is a trademark of MARC SOFTWARE INTERNATIONAL, INC. O 1985 MSI, INC. UNIX is a registered trademark of AT&T Bell Laboratories. VAX is a trademark of Digital Equipment Corp MS-DOS is a irademark of Microsoft Corporation. Inquiry 119 for End-Users. Inquiry 120 for DEALERS ONLY. Fall 1985 BYTE- Inside the IBM PCs 201 The world's best selling monochrome graphics card for the IBM PC. There are more Hercules'" Graphics Cards in more IBM" PCs, XTs and ATs than any other monochrome graphics card in the world. Over a quarter of a million demanding users around the world use a Hercules Graphics Card to improve the perfor- mance of their software. The Lotus* 1-2-3" Booster. Consider Lotus 1-2-3. Hercules gives an off-the-shelf copy of 1-2-3 the highest resolution possible on an IBM PC, XT or AT. More 1-2-3 users choose the Hercules Graphics Card to get crisper text and sharper graphics than any other monochrome graphics card. And we bring the same performance to other integrat- ed programs like Symphony'," Framework," and SuperCalc*3. But we don't stop there. The Hercules Graphics Card improves all kinds of software. Like Microsoft* Word, a word processor that enables you to display text with sub- scripts, superscripts and italics Or pfs: Graph, an easy-to- use business graphics program that converts your data into presentation quality graphs. Or Microsoft" Flight Simu- lator, the high flying game for the overworked executive. Or our own Graph X," a library of graphics sub- routines that eases graphics programming. Or AutoCAD," a computer aided design program that offers features normally asso- ciated with expensive CAD systems. And we supply free soft- ware with each card to do hi-res graph- ics using the PC's BASIC interpreter. State-Of-The-Art Hardware. The Hercules Graphics Card gives you graphics res- olution of 720h x 348v and a parallel printer port. Our unique static RAM buffer pro- vides sharp 9 x 14 characters and flicker-free scrolling. Our exclusive safety features help prevent damage to your monitor. State-of-the-art custom IC technology delivers unsurpassed reli- ability. Ordinary graphics cards use up to 30 ICs to do what one Hercules IC does. By using fewer parts, we reduce the pos- sibility of component failure. Which is one reason we warranty the Hercules Graphics Card for two years. Unbeatable reliability. Advanced technology. Proven by over a quarter of a million users. Why settle for anything less than Hercules? Call 1-800-532-0600 Ext 408 for the name of a Hercules dealer nearest you and we'll rush you our free info kit. Hercules. We're strong on graphics. Address: 2550 Ninth St., Berkeley, CA 94710 Ph: 415 540-6000 Telex: 754063. Trademarks/Owners: Hercules, Graph X/Hereules; 1-2-3, Symphony/Lotus; IBM, XT, AT/IBM; Framework/Ashton-Tate; SuperCalc/Sorcim-IUS; Microsoft/Microsoft; pfs:/Software Publ; AutoCAD/AutoDesk. 202 Fall 1985 BYTE- Inside the IBM PCs Inquiry 85 INSIDE THE IBM PCs Four Hard Disks For Under $1000 Inexpensive help for your disk storage space woes by Richard Grehan IF YOU ARE a peruser of the back pages of BYTE like most of us. you can- not have failed to notice the plummeting prices of hard-disk systems, par- ticularly those available for the IBM Personal Com- puter. It is commonplace to find a complete subsys- tem, including hard disk, controller card, and soft- ware, for under $1000. The advantages of a hard disk should be ob- vious: Its speed, conve- nience, and storage space eliminate most of the agonies involved with managing a large pile of floppy disks. If you're in- terested in setting up a personal bulletin-board system, the purchase of a hard-disk system should be your top priority. I selected four hard-disk systems from the pages of BYTE and other computer periodicals. My only criterion was that the complete system must cost less than $1000. This article by no means ex- hausts all the under-$1000 hard disks advertised, but it should give you an idea of some possible trade-offs and troubles if you decide that a hard disk is your PC's next peripheral. Perfor- mance and price information is pro- vided in table 1. The Sider The Sider is from First Class Peripherals, a Carson City, Nevada, Photo I: From left to right, the Sider, Rodime, Syquest and Kamerman Lafo hard disks. company. An external drive, it is con- sequently the easiest of the four to in- stall. This also means that the drive has its own power supply; the only added power burden to your PC is the interface card. Additionally, since the Sider does not replace one of your system's floppy-disk drives (all of the internal drives reviewed install in place of one floppy-disk drive), you lose no functionality when you need to, say, copy one floppy disk to another. Best of all, you are spared the trou- ble of digging through the technical manuals to dis- cover which switches on the PC's motherboard you have to flip to configure the IBM as a one-floppy system. The Sider comes in a rather large (7/2 inches tall, I6/2 inches long, and 3/2 inches wide) cream- white molded-plastic housing. The hard disk is mounted on its side, and the mechanism is convec- tion-cooled via the case's slotted top. (This slotted top warrants caution: Small objects and certain- ly fluids could be unwit- tingly dropped into the in- ner workings of the unit, inflicting heaven knows what damage.) Since the unit is taller than it is wide, I experienced a not- unjustified fear of knock- ing it over. A rather stiff but comfortably long cable connects the drive to the interface card. The installation and operation guide that comes with the Sider is a small 31 -page booklet. It is clear and easy to read, obviously written for people with an absolute minimum of hard- ware knowledge. It includes numerous illustrations of what goes where and [continued] Richard Grehan is a BYTE technical editor. He can be contacted at POB 372, Hancock, NH 03449. PHOTOGRAPHED BY PAUL AVIS Fall 1985 BYTE • Inside the IBM PCs 203 U NDER-HOOO HARD DISKS even a diagram of the on-board jumpers and their proper configura- tion—handy in case one of the jumpers jumped off during shipping. I had no trouble following the instruc- tions or getting the Sider operational. No special software is required. I sim- ply set up a DOS partition using the FDISK program, and then I executed a FORMAT C:/S to format the partition and write an image of the system onto it. For more details on the software provided with the hard disks, see the "Software" text box on page 205. When you power up a PC with a Sider attached, you must turn on the Sider 30 seconds prior to the com- puter or (according to the manual) the computer won't recognize the hard disk's existence. The Sider hums plea- santly while operating; head move- ment is accompanied by muffled thumpings, not the grating squeak of some hard disks I've heard. The benchmarks showed the Sider's speed to be slightly faster than some of the other drives, especially when copying a file from one spot on the hard disk to another. All in all, the Sider is quite a value; it is easy to install, you get to keep both floppy-disk drives operational, it comes with a full year's warranty, and the price is right. 1 should also point out that if you find yourself outgrow- ing the 10 megabytes provided by one Sider. you can daisy-chain a sec- ond onto the first— no additional in- terface card is required. (You cannot daisy-chain an extra Sider on an IBM PC XT. however.) The Rodime Hard Disk I received two of the hard disks from Micro Design. The first is an amazing little drive manufactured by Rodime inc. I say "amazing" and "little" because it is a full 10 megabytes in a package measuring less than 4 inches wide, 6 inches long, and 2 inches thick. Not surprisingly, it is a low-power drive— the manufacturer promised me that it required no more power than an IBM floppy disk. The drive itself is mounted in a metallic frame that has extended sides and a large front bezel so that it will fill the hole left by the 514-inch floppy-disk drive. There is more empty space to it than hardware. Installing an internal, as opposed to an external, drive adds several degrees of difficulty. First, since the drive will be replacing your right-hand floppy disk, you must remove that drive and find some dead space in your PC to stuff the now-unused extra length of floppy-interface cable. Next, you have to alter the setting of DIP (dual in-line package) switches on the PC's motherboard to tell it that you now have only one floppy-disk drive. Finally, you install the hard disk and the interface board, hook all the cables up, and turn the system on to observe your success or failure. 1 took my time removing the floppy and installing the Rodime, managing to get through the whole procedure without killing anything. The instruc- tions provided by Micro Design are much less polished than those pro- vided by First Class Peripherals, but if you follow them diligently you should survive the installation without a hitch. The documentation consists of 40 photocopied (on one side) pages and includes numerous draw- ings that are adequate and under- standable. Apparently, Micro Design Table I : A comparison of the four hard-disk systems. Write, read, times were measured using the BYTE benchmarks. See ]une 1984 334 and 336, for detaiis. and copy BYTE, pages Sider Rodime Syquest Kamerman Labs Write (seconds) 40.0 41,0 41.0 27.0 Read (seconds) 29.0 29.0 29.0 27.0 Copy (seconds) 2.5 4.7 4.7 2.0 Price $795 $520 $995 $995 sells several different controller boards as well as drives, and I had some difficulty at first determining which drawings related to the par- ticular hardware I was working with. When I finally got the Rodime bolted in, I stepped back and noticed that the front bezel was lopsided. Ultimately. I discovered that a socketed 40-pin PROM (program- mable read-only memory) on the hard disk's circuit board (which was mounted underneath the unit) was pressing on the metal plate on which the floppy disk had originally rested. This was unsightly and potentially dangerous; Micro Design should look at mounting this hard disk a little higher behind the bezel. Fortunately, since the ceramic body of the PROM was nonconducting, it caused no problems. The Rodime performed well. It cer- tainly performed quietly. It also lived up to the claims of low power; the PC I used it on held the floppy-disk con- troller card, a monochrome adapter card, a 2 56K-byte Quadboard, and a hard-disk controller card. I en- countered no problems running everything full tilt. Since it ran so smoothly, I was unable to verify one of the Rodime's more interesting fea- tures, if the drive's on-board micro- processor detects an error condition, it flashes the binary code of the er- ror on one of the drive's front-panel LEDs (light-emitting diodes): long flash = I, short flash = 0. The Syquest Hard Disk Easily as amazing as the Rodime hard disk is the Syquest drive, a whopping 30 megabytes in a 5 14-inch half-height package. Also from Micro Design, the Syquest uses the same interface card as the Rodime, except with different PROMs and jumper settings. Installa- tion, too, is almost identical. (In fact, the same documentations serves for both.) Amazingly, this drive also re- quires no modifications to the PC's power supply. The Syquest fit neatly in place of the removed floppy; there was no PROM tilting the front plate sideways. The only problem was that when I slid the 204 Fall 1 985 B Y T E ■ Inside the IBM PCs U NDER-HOOO HARD DISKS drive all the way into place, the power connector (a large 4-pin Molex con- nector) jammed against the IBM's power supply, placing a noticeable strain on the connector itself and the hard disk's printed-circuit board to which it was attached. I tried to flex the supply wires some, but it was still a tight fit— the manufacturer should have mounted the connector vertically. Understandably, formatting the Sy- quest took a little longer than format- ting the other drives, but the end result was worth the wait: 31,819,776 bytes of formatted disk space. In operation it was the noisiest of any of the drives, although not nearly loud enough to be annoying. In the bench- mark figures it turned out to be prac- tically identical to the Rodime hard disk. One irritating side effect of all that space is how long a DIR (directory) command took. When you execute a DIR, it whisks out the filenames and then calculates and displays how many bytes remain free on the disk. A DIR command on the Syquest took a full 6 seconds to calculate and dis- play the bytes-remaining figure, and this was after the filenames had been listed. (Of course, I had configured the hard disk into only one 30-megabyte partition. One solution would be to divide the disk into, say, two 1 5-mega- byte partitions.) Although the Syquest barely makes it into the under-$1000 bracket, the amount of storage that fits into that little package is frightening. And if 30 megabytes isn't enough, remember that it's only a half-height drive, so you could easily mount two in the place of one floppy. (The controller card is equipped to handle two hard-disk drives, but you'll want to be careful about power requirements.) The Megaflight 100 The last hard disk 1 installed was the Kamerman Labs Megaflight 100, a 10- megabyte internal hard disk with a Kamerman CT-100 controller card. This half-height 5 '/4-inch drive comes with a full-height replacement front bezel. It isn't a low-power drive; the documentation clearly states that the Megaflight may require more power than your system can supply. (This warning doesn't appear until page 6, after you've opened your PC and in- serted the CT-100 card.) Consequent- ly, 1 tested this drive on a Zenith Z-l 50, which has the power-supply capabili- ties of a PC XT. (Kamerman Labs points out in the documentation that its system will not work on all PC [continued) Software Every one of the systems reviewed was shipped with disks carrying various amounts of software to ease the job of bringing the hard disk on line. In many cases, however, you don't need any more than is already provided with the PC-DOS operating system. FD1SK is a PC-DOS program that IBM supplies for managing what are known as "partitions" on a hard disk. You can think of a partition as an area on the hard-disk drive that acts like an independent "logical disk." For example, a 10-megabyte hard disk could be partitioned into two 5-megabyte logical disks that the operating system would see as two independent disk drives. Basically, FD1SK writes information onto the hard disk that tells DOS where the partitions are located. Many systems provide a hard-disk low-level formatting and verification pro- gram. The Sider's version is called XUTIL; the Micro Design program is called WUTIL. The Megaflight system incorporated the program into its INSTALL pro- gram. Such a program typically performs exhaustive write and read operations using selected bit patterns designed to locate failed sectors on the hard disk. If bad sectors are found, the program will then tag them so that the operating system is certain not to use them during normal operation. Finally, some companies simply throw in additional programs as part of the package. For instance, the Micro Design International hard disks include a CACHE program. CACHE allows you to set aside a designated portion of your computer's memory as a disk cache, 8K bytes minimum. CACHE monitors all disk accesses and keeps the most recently accessed sectors in the allotted memory buffers. New sectors are read only as required, and swapping disk and memory sectors is controlled by the least recently used access technique. Items Discussed The Sider (IBM PC version) 10-megabyte external hard disk with case, power supply, interface board, and cables First Class Peripherals 3579 Highway 50 East Carson City, NV 89701 (800) 538-1307 RODIME Internal 10-megabyte 3 '/2-inch hard disk with controller board and cables Micro Design International Inc. 6566 University Blvd. Winter Park. FL 32792 (305) 677-8333 SYQUEST Internal 30-megabyte half-height hard disk with controller board and cables Micro Design International Inc. 6566 University Blvd. Winter Park, FL 32792 (305) 677-8333 Megaflight ioo Internal 10-megabyte half-height hard disk with controller board and cables Kamerman Labs Inc. 8054 Southwest Nimbus Dr. Beaverton. OR 97005 (503) 626-6877 Fall 1985 BYTE- Inside the IBM PCs 205 UNDER-HOOO HARD DISKS clones. In fact, the manual lists a couple of the uncooperative ones. The Z-l 50 was not among them.) The Megaf light's documentation is undoubtedly the worst of the lot. It consists of 14 photocopied (on one side) sheets stapled in the upper left- hand corner. The illustrations in- cluded are barely adequate, and the text is an absolute maze. Attached to the front of the manual are 5'/2 pages listing changes made to the upcom- ing 14, and some programs are men- tioned that I never found on the enclosed disk. It never became clear just where to fit some of the errata in the original manual. Endurance on my part finally paid off, and in spite of all the confusion 1 got the drive going. A point for owners of PC clones to remember— not brought out in any of the installation documentation I saw- is that all dual-floppy systems consist of a controller card operating the two drives via a single cable; one floppy- disk drive attaches to the cable some- where along its length, and the other attaches at the cable's end. If, when removing one of the floppies, you remove the one at the end of the cable, the odds are good that you are removing the one that has a neces- sary terminating resistor pack in- stalled. This is an integrated circuit usually located near the cable con- nector, and it must be moved to the empty socket at the same spot on the remaining floppy. You should consult the hardware manual for your floppy drive concerning the resistor pack's location, or, if you are at all unsure of the hardware, have a trained tech- nician check it out. Owners of IBM PCs will find the resistor pack on the rear right of the left-hand floppy's printed-circuit board as a blue 16-pin IC— it does not have to be moved when you replace the right-hand flop- py disk with a hard disk. What the Megaf light lacked in docu- mentation, it made up for in perfor- mance. In the benchmarks, it scored the swiftest figures. It was also the quietest of the drives; head move- ment was inaudible over the faint rushing noise that it made. Conclusion Considering the variety and number of hard-disk systems available, there certainly seems to be something for everyone. With patience and care, you should have little trouble following the instructions provided with most hard disks. Or if you want to keep your tampering inside your PC to an ab- solute minimum, an external system like the Sider reduces your job to not much more than a board installation. If you can afford an IBM PC, cost is now no excuse for not upgrading it with a hard disk. ■ Now you can take advantage of an unbe- lievable value with this introductory offer. ASCII Pro at a fraction of its suggested retail price. This is not an edited version — you get a full-power tele- communication tool featuring incred- ible flexibility that includes DEC VT- 100/VT102 full terminal emulation, complete Christensen (XMODEM) and Kermit protocols, as well as password-protected unattended oper- ation. Supports all multi-tasking and windowing environments including Top view, Windows and Gem, and all 2400 baud modems. Tap into remote computers and informa- tion services with great- er ease and speed than ever before. ASCII Pro is the telecommunica- tions software you've PC-users: Steal been waiting for— now priced so low you can't afford to wait any longer! Order direct from United Software today. O UNITED SOfTWARE INDUSTRIES 1880 Century Park East, Suite 300, L.A., CA 90067 • (213) 556-2211 TOLL FREE 800 621-0849 ext. 441 this ASCII ZPRO Software. ASCII Pro Telecommunications Software Regularly $189-95 -a steal at $84.95 ASCII Pro is available for IBM PC, XT, AT, PCjr and compatibles. ASCII Pro and IBM, are registered trademarks of United Software Industries, Inc. and International Business Machines Corporation. 206 Fall 1985 BYTE- Inside the IBM PCs SOLVE PROGRAMMING PROBLEMS THE WAY YOU THINK. PURE AND SYMBOL. APL* PLUS® PC IS THE ANSWER. The shortest distance between two points is a straight line. But unfortunately, that's not the case in programming. Most languages require you to go through an enormous number of steps before an idea becomes reality. That's why the APL*PLUS PC System is such a dramatic and ex- citing software tool for serious PC programmers and application developers. Instead of requiring you to learn — and write— long-winded and complicated programs, APL is based on your instinctive ability to deal in symbols. And once you begin using APL's quick notations, you'll find it the ideal programming environment for all your applica- tion needs. The incredible shortcuts you get with APL will let you spend less time on drudgery, and more time creating. Intricate calculations and modeling on PC's are a snap. And only with APL*PLUS PC do you get: • full-screen editing • a built-in terminal emulator • communications • graphics primitives • and report formatting. Plus concise notation for programs like sorting, matrix inversions, string searching, and more. And the complete package price is just $595 with major credit cards accepted. Act now, and we'll send you a free Convincer Kit. Contact your local dealer, or call 800-592-0050 (in Maryland, call 301-984-5123) to order your system, or for more in- formation about our other APL*PLUS products— from our UNIX™ version to the new streamlined Pocket APL™ Or write STSC, Inc., 2115 East Jefferson St., Rockville, MD 20852. You'll see how symbol PLUS*WARE products are to use, the very first time you use them. Problem-solving at the speed of thought. OT^^ APL * PLUS PC System requires 192K. A soft character set can be used for computers with IBM compatible graphics board. A character generator ROM or tj I •w^M software is included for the IBM PC or selected compatibles. a cootsi company PLUS* WARE and Pocket APL are trademarks of STSC, Inc. APL* PLUS is a registered service mark and trademark of STSC, Inc. UNIX is a trademark of AT&T Bell Laboratories. TM Inquiry 189 Fall 1985 BYTE- Inside the IBM PCs 207 we wrote the books one... Ecosoft's Eco-C88 C Compiler. $49.95 This has to be one of the best values on the market today. Eco-C88 has all operators and data types (except bit fields), has 8087 support, and comes with one of the most complete libraries available - over 180 functions including functions for color and memory files. The compiler produces fast, efficient code (as shown in the table) at one-tenth the cost of other compilers. You also get a UNIX-like cc with "mini-make" that makes the compiler a snap to use. Fora limited time, you will also get the Eco-C88 editor (described below) free of charge. Works with all IBM PC's and MSDOS machines. Eco-C88 Ml) C86 (1) MS(1) MW(1) sieve 12 11 13 11 12 fib 43 58 46 109 !.: '• — deref 14 13 — 10 11 matrix 22 29 27 28 29 1 . Computer Language, Feb., 1985, p. 79. Reproduced with permission. The employees at Ecosoft think everyone should explore what C has to offer. To further that goal, the books listed at right were written by the employees at Ecosoft to get you up and going as quickly as possible and to expand your understanding of C. Over 100,000 readers have placed two of the books on the best sellers list. r The ECOSOFT family of C products ORDER FORM □ C Compiler $49.95 □ Programming Guide $20.00 _ □ Self-Study Guide $17.00 □ Programmer's Library $20.00 □ Program Editor $29.95 Total* (Ind. res. add 5% tax) •Please add $4.00 for shipping. Payment: VISA MC Credit card expir. date Card # Name AE Check Address City, state 1 Zip .Phone- ni Ecosoft, Inc. 6413 N. College Ave. Indianapolis, IN 46220 (317) 255-6476 • 8:30-4:30 ECOSQFT#lNC TRADEMARKS: ECO-C88, ECOSOFT: TI'UHO PASCAL, BORLAND INT I.. Fall 1985 BYTE- Inside the IBM PCs The C Programming Guide (Purdum, Que Corp.). $20.00 This best seller walks you through the C language in an easy-to-read manner. All aspects of the language are covered with plenty of examples. Many of the error messages issued by the Eco-C88 compiler have page numbers that reference this book making the compilerand book perfect for the beginning C programmer. The C Self-Study Guide (Purdum, Que Corp.). $17.00 This new book is designed for the individual that is learning C on their own. The book is filled with questions- answers and many examples about C and illustrates many of the tips, traps, and techniques in C that may take years to learn otherwise. Although written to complement the Guide, it can be used with any introductory C text. The C Programmer's Library (Purdum, Leslie, Stegemoller, Que Corp.). $20.00 Th is best seller is an intermediate text designed to teach you how to write functions in a generalized fashion. The book contains many useful library additions, including a complete ISAM file handler, plus sections on several advanced C topics. CED Program Editor. $29.95 You're gonna love CED ( pronounced "said"). It was written specifically for use with the Eco-C88 compiler. (CED creates a programming environment similar to that ofTurbo Pascal.) You create the source file with CED, compile the program and, if there are any errors, CED automatically reloads the source file and places the cursor on the offending section of code. CED also has windows for editing multiple files, macro capability, and is configurable to suit your needs. CED is fast and has many features found only in editors costing up to ten times as much. Perfect for use with Eco-C88. Inquiry 52 INSIDE THE IBM PCs Programming the Enhanced Graphics Adapter Writing assembly-language drivers for the new graphics card by Richard Wilton IBM's Enhanced Graphics Adapter (EGA) for the IBM PC is what many people thought the older Color/ Graphics Monitor Adapter (CGA) ought to have been. The EGA can generate 1 6- color bit-mapped raster graphics with resolution that is good enough to display text without caus- ing eyestrain. It provides for dynamically modifi- able character sets, allows horizontal and vertical pixel-by-pixel panning, supports several types of video monitors, and does a good job of emulating the Color Graphics Adapter's function. Unfortunately, program- ming the EGA is not a trivial task. The hardware has a complex, sophisti- cated, 'and somewhat idio- syncratic architecture, but it is rarely obvious from the technical documen- tation just what all that complex hardware does. The on-board ROM (read- only memory) BIOS (basic input/output system) does a good job of performing basic video I/O (input/output) functions, but BIOS support for bit-mapped graphics is rudimentary and slow. Despite these obstacles, the EGA can be rewarding to program at the "bits and bytes" level. In this article, I will stick to the basics of graphics programming on the EGA. Once you are familiar with the EGAs graphics architecture and v % M K*.-V r the capabilities of its ROM BIOS, pro- gramming other EGA functions be- comes much easier. CGA Compatibility Programmers who have spent some time working with the IBM PC's Color Graphics Adapter will be relieved to find that the EGA can emulate virtual- ly 100 percent of the CGAs function. All the CGAs alphanumeric and all- points-addressable (APA) graphics modes are sup- ported by the hardware and in ROM, with the ex- ception of the 320- by 200-pixel "black and white" APA graphics mode intended for com- posite video displays. EGA users will probably find this to be a minor shortcoming. If you know how to pro- gram the CGA, you should have no trouble writing programs that run on both the CGA and the EGA. The major source of incompatibility between the EGA and the CGA is related to the video-con- troller circuitry. Although the EGAs cus- tom video-controller chips can emulate the function of the Motorola 6845 video controller on the CGA, the I/O port and reg- ister assignments on the EGA video controller do not correspond exactly to the registers on the CGAs 6845. Because of this, programs that write directly to the CGAs video controller (for example, to modify video-display [continued) Richard Wilton is a software developer with Laboratory Microsystems Inc. {the creators of PC/FORTH), 3007 Washington Blvd., Ma- rina Del Rey. CA 90295. He recently com- pleted the development of the Enhanced Graphics Support Package, which provides an interface between the EGA and FORTH programs. ILLUSTRATED BY LINDA GOTTFRIED/LEXICA CORPORATION Fall 1985 BYTE- Inside the IBM PCs 209 EGA PROGRAMMING modes or to control the cursor) per- form quite unpredictably when they are executed on the EGA. Another difference between the EGA and the CGA is in the ROM BIOS. The EGA BIOS supports several new function calls in addition to the ones in the CGA BIOS. These func- tions support character sets loadable from RAM (random-access read/write memory) and return information about the EGAs configuration. Hardware Configurations If you want to write graphics software for the EGA, you must take into con- sideration two important aspects of the adapter's hardware configuration: the type of video-display monitor attached to the adapter and the amount of RAM used on the adapter. The available graphics modes and graphics memory mapping vary with the hardware configuration (see table 1). You configure the EGA via a set of DIP (dual in-line package) switches and jumpers to support one of three different types of RGB (red-green- blue) video-display monitors. The adapter can provide alphanumeric and bit-mapped graphics support for both the IBM PC monochrome dis- play (51 5 1) and the IBM PC color dis- play (51 53) or their equivalents. Also, IBM offers an enhanced color display (5154) that provides better resolution than the 5153 does. The graphics resolution on the IBM monochrome display is 640 by 350 pixels, somewhat less than the 720- by 348-pixel resolution provided by the Hercules monochrome graphics card. The best graphics resolution on the IBM color display is 640 by 200 pixels. You can use the enhanced color display in both 640- by 3 50-pixel and 640- by 200-pixel modes. Only one monitor can be attached to the EGA at a time. However, the EGA can be placed in the same sys- tem as a Monochrome Display Adapt- er or a Color Graphics Adapter, so it is possible to use the EGA as part of a dual-display configuration. The EGA comes with 64K bytes of RAM reserved for use as a video-dis- play refresh buffer. The piggyback Graphics Extender Card adds up to three more banks of EGA RAM in 64K-byte increments, up to a total of 2 5 6K bytes. The additional RAM provides for dynamically loadable character sets and for video paging similar to that performed by the CGA. Also, with an Enhanced Graphics Display but only 64K bytes of EGA RAM, the highest resolution (640 by 350 pixels) graph- ics mode is limited to four colors. At least 128K bytes are needed to dis- play 16 colors at the same time in this graphics mode. An EGA graphics program can be written so that it executes properly in each of the different video modes demanded by the various hardware configurations. I will discuss some of the programming details later in this article. Graphics Chip Ports and Registers The programmer directly controls the operation of the custom LSI (large- scale integration) logic on the EGA. Your program configures the EGA dis- play control logic to perform the vari- Table 1: Enhanced graphics modes. ROM BIOS mode Pixel Number (hexadecimal) resolution of colors Type of display 0D 320 by 200 16 color, enhanced color 0E 640 by 200 16 color, enhanced color OF 640 by 350 4 monochrome 10 640 by 350 4 enhanced color (EGA RAM = 64K bytes) 10 640 by 350 16 enhanced color (EGA RAM > 64K bytes) ous bit-manipulation and video-dis- play functions you need to display bit- mapped graphics. The configuration is controlled by the contents of vari- ous special-purpose registers defined on the EGA chips themselves. You program the EGA registers by writing data bytes to a set of pre- defined I/O ports. At the assembly- language level, you do this via the OUT instruction. The IBM PC BASIC'S OUT statement also performs this function. Often, several EGA registers are mapped onto the same I/O port. In this circumstance you generally need to specify a register number at one port address and the contents of that regis- ter at another port address. For exam- ple, the Graphics Controller port at address 3CE hexadecimal maps nine different registers. To store a byte of data into one of those registers, you first OUT the register number to port 3CE. Then you OUT the data byte itself to port 3CF. You can find examples of how this is done in source listings 2 to 5. The Architecture OF EGA RAM Like the Color Graphics Adapter, the EGA contains its own on-board RAM. This RAM is used primarily as a refresh buffer by the EGAs video- controller circuitry. Individual pixels on the screen correspond to groups of bits in the EGAs RAM. As on the CGA, it is up to the pro- grammer to set the individual bits in the EGAs display RAM. This can place quite a computational burden on the PC's main microprocessor (the Intel 8088 in the PC or the 80286 in the AT), especially when many pixels must be modified over a large area of the screen. Display RAM on the EGA differs from its counterpart on the CGA in several important respects. Unlike CGA RAM, which always starts at seg- ment address B800 hexadecimal, the starting location of EGA RAM can be modified. The address of the first byte in EGA RAM can be programmed to appear at any of three segment ad- dresses: B800 hexadecimal for ROM 210 Fall 1985 BYTE- Inside the IBM PCs EGA PROGRAMMING BIOS modes through 6, which emulate the Color Graphics Adapter; B000 hexadecimal for ROM BIOS mode 7, which emulates the Mono- chrome Adapter; and A000 hexa- decimal for enhanced graphics modes OD, OE, OF, and 10 hexadecimal. The memory map of pixels in EGA RAM is different than on the CGA. On the CGA, alternate rows of pixels are mapped into two separate halves of the display buffer. In contrast, all EGA enhanced graphics modes map pixels in linear sequence, from left to right and top to bottom across the display. In enhanced graphics modes, the first displayable pixel is represented by bit 7 (the high-order bit) of the byte at address A000:0000. Thus, one row of 640 pixels requires an address space of 80 (50 hexadecimal) bytes. With this addressing scheme, the ad- dress of the first pixel in the second row of the screen is at bit 7 of the byte at A000:0050, the second pixel in the row is at bit 6 of that byte, and so forth. Finally— and this is a major architec- tural difference from the CGA— the EGA display RAM consists of four parallel bit planes. For example, an EGA with 64K bytes of RAM is actual- ly configured as four 16K-byte bit planes, all four of which share the same address space (e.g., starting at A000:0000 for enhanced graphics modes). Since four banks of RAM share the same address space, the EGA contains special logic for access- ing each of the bit planes individual- ly and in tandem. Bit Planes and Pixels It helps to visualize the logical con- figuration of EGA RAM as two-dimen- sional. Imagine one row of 640 pixels. This row of pixels is 640 bits (80 bytes) "across" and 4 bits (1 bit per plane) "deep." You find the address of an in- dividual pixel by counting "across" the row. The value of that pixel is represented by the bits set in each of the four bit planes at that address. For instance, a pixel whose value is 5 (binary 0101) in the upper left corner of the display is addressed by the high-order bit (bit 7) of the zeroth byte in EGA RAM. Its value is determined by setting the corresponding bits in bit planes and 2 to 1, and the cor- responding bits in planes 1 and 3 to 0. The EGAs Graphics Controller per- mits all four bit planes to be ad- dressed at the same time. When you read 1 byte at an address in EGA RAM (say, with an 8086 MOV instruc- tion or a BASIC PEEK), the Graphics Controller can read 4 bytes, 1 byte from each bit plane at that address. The Graphics Controller latches all 4 bytes during a graphics read. That is, the 4 bytes of data are stored in registers internal to the Graphics Con- troller, where they can be modified and subsequently rewritten— again, all 4 bytes at the same time— to the bit planes in EGA RAM. The way in which bits in the four bit planes are arranged to specify the value of a pixel depends upon the amount of EGA RAM present and upon the graphics mode being dis- played. For example, consider the configuration for a 640- by 3 50-pixel four-color graphics mode on an EGA with only 64K bytes of RAM. In this case, to display 224,000 (640 x 3 50) pixels, each bit plane must contain 28,000 (224,000 - 8) bytes, which is more than the 16K bytes available per bit plane. To solve this problem, the EGAs video logic is set up to chain the bit planes together (plane 2 is chained to plane 0; plane 3 is chained to plane 1). With chained bit planes in this graphics mode, the value of a pixel is determined by bit planes and 2 if the byte containing the pixel is at an even address, and by planes 1 and 3 if the byte is at an odd address. If you are reading or writing pixels in this particular configuration, you must be very careful to use the correct bit [continued] USRobotics' swift new Courier 2400™ modem cuts data transmission time in half, decreasing phone costs and increasing productivity. The auto-dial, auto-answer Courier adjusts itself from 2400 to 1200 or 300 bps. And if you prefer an internal slot modem for IBM-PCs or compatible computers, the Microlink 2400™ gives you the same great features at the same great price. [PI Courier and Microlink 2400 modems. They're going fast. !* courier iimiumm courier a.400 fliihiitics 8100 McCormick Blvd., Skokie, IL 60076 Phone:(312)733-0497 Outside Illinois: 1-800-Dial-USR Inquiry 204 Fall 1985 B Y T E • Inside the IBM PCs 211 EGA PROGRAMMING planes for each pixel. In general, a program that manipu- lates pixels in EGA RAM should be "aware" of the EGAs hardware con- figuration as well as the current video mode. ROM BIOS function 12 hexa- decimal of interrupt 10 hexadecimal returns this information. A graphics program that does not test the hard- ware configuration properly will get into trouble manipulating pixel bits in different EGA graphics modes. In fact, the EGAs ROM BIOS read-dot func- tion contains exactly this type of bug; it appears in monochrome graphics mode OF hexadecimal on an EGA with 64K bytes of RAM (see listing 1 and table 2). How To Write a Pixel The conceptually simple task of set- ting a pixel's value requires that you become familiar with several key func- tions of the EGAs Graphics Controller. For this reason it is worth examining the sequence of events carefully. A comparison of the sample subroutine listings with the following discussion should be helpful. On the EGA, you can set the value of individual pixels in three different "write modes." These modes have nothing to do with the video-display modes discussed earlier. They de- scribe different methods of program- ming the EGA Graphics Controller chip. The EGAs ROM BIOS uses Write Mode as its default, so I will de- scribe its use in detail. To set the value of a pixel in Write Mode 0, you per- form a five-step sequence of opera- tions (see listing 2). First, you must calculate a byte ad- dress and bit mask for the pixel. With integer arithmetic and 80 bytes per row, the byte offset of a pixel at loca- tion [x,y) is at (y x 80) + x/8 and the bit number to be set (where bit 7 is the left-most or high-order bit) is 7 - (x mod 8). You generally need to program the EGA Graphics Controller with a bit mask rather than a bit number. The corresponding bit mask can be calcu- lated by 2 "(7 - (x mod 8)) or, more efficiently, with a simple lookup table. Listing 1 : A FORTH routine that demonstrates a bug in the EGAs ROM BIOS read-dot routine. The pixels are written properly by the write-dot routine, but the read-dot procedure doesn't return the correct value (see table 2). HEX : WRITE_DOT ( x y value - ) >R SWAP R> SWAP 0C00 + video-io 4DROP; : READ_DOT ( x y - value ) SWAP 0D00 video-io >R 3DROP R> OFF AND DECIMAL : BUGDEMO (-) 640X350 VMODE B/W CLS \ use ROM BIOS to store pel \ stack: - y x value \ stack: - y x 0C + value \ do INT 10h, discard stack \ use ROM BIOS to fetch pel \ stack: - y x 0D00 \ stack: - DX CX BX AX \ stack: - value \ select mode, clear the screen 15 WRITE_DOT READ_DOT CR ." WRITE dot in even byte, READ dot in even byte: ". 8 115 WRITE_DOT 8 1 READ_DOT CR ." WRITE dot in odd byte, READ dot in odd byte : ". 2 15 WRITE_DOT 8 2 READ_DOT CR ." WRITE dot in even byte, READ dot in odd byte : ". CR ." End of demo." CR ; Table 2: Sample output from listing 1 . The first value is correct: the second value should be 1 '. >, and the third value should be 0. WRITE dot in even byte, READ dot in even byte: 15 WRITE dot in odd byte, READ dot n odd byte : WRITE dot in even byte, READ dot in odd byte : 15 End of demo. ok Listing 2: Sample subroutine using Write Mode 0. wpO proc push call with AX BX CX y-coordinate x-coordinate pixel value ex Preserve the pixel value on the stack. (It gets popped into AX later on . . .) Calculate byte address (segment & offset) and bit mask mov mov dx.OAOOOh ds,dx : DS : = EGA buffer segment address mov mul dx,80 dx ; AX : = (y * 80) mov shr shr shr add cx,bx bx,1 bx,1 bx,1 bx.ax ; CX : = x : BX : = x/8 ; BX : = (y * 80) + x/8 (offset) and cl,7 : CL : = (x mod 8) {continued) 212 Fail 1985 B Y T E • Inside the IBM PCs Inquiry 126 EGA PROGRAMMING xor cl,7 CL : = 7 - (x mod 8) mov ch,1 shl ch.cl CH : = 2 " (7 - x mod 8) (bit mask) ; Set the Bit Mask register mov dx,3CEh Graphics Controller port address mov al,8 out dx.al select register 8 mov dx,3CFh mov al.ch out dx.al load the bit mask into register 8 ; Set all 4 bits in the pixel to mov al,[bx] Read at address A000:offset This latches all 4 bit planes. (The byte "read" is ignored.) mov al,0 mov [bx],al Write at address A000:offset This sets the bit-masked bits to and stores the latched bytes to the bit planes ; Set bits in the appropriate bit planes t o 1 mov dx,3C4h Sequencer/Map Mode port address mov al,2 out dx.al Select Map Mask register 2 mov dx,3C5h pop ax AL := map mask (i.e., pixel value) out dx.al Load the map mask into SMM register 2. This enables the appropriate bit planes. mov al,[bx] Latch the bit plane data. mov ert.11 111111b mov [bx],al Set bits to 1 in appropriate planes. ; Restore default EGA graphics status mov dx,3C4h mov al,2 Again, select . . . out dx.al . . . Sequencer/Map Mask register 2. mov dx,3C5h mov al,1111b Default map mask out dx.al Enable all four bit planes mov dx,3CEh mov al,8 Again, select . . . out dx.al . . . Graphics Controller register 8 mov dx,3CFh mov al,11111111b Default bit mask out dx.al Restore default bit mask ret wpO endp Second, configure the EGA Graph- ics Controller to perform the write operation. You need to specify the write mode, the bit planes to be modified, and the bit mask. The ROM BIOS always leaves the Graphics Con- troller in Write Mode with all four bit planes enabled, so all that you need to specify is the bit mask for the pixel. Load the Graphics Controller's Bit Mask register (register number 8) by storing 8 to I/O port 3CE hexadecimal. (Use the 8086 OUT instruction.) Then store the bit mask to the data port 3CF. Third, reset the value of the pixel to zero by setting the bits in all bit planes corresponding to the pixel to 0. To do {continued) WHY WAIT FOR ANSWERS FROM YOUR IBM PC/AT/XT NOW THERE'S MEGA-MATH® Engineers, scientists and statisticians are discovering the time saving capability of New "Mega Math" II. A library of over 45 assembly language subroutines for fast numeric calculations, up to 11 times faster than your present compiler. The pretested routines use the 8087 or 80287 coprocessor for optimum perfor- mance. The routines reduce development time, code size and testing time. "Mega Math" II Includes: MATRIX OPERATIONS VECTOR OPERATIONS VECTOR SCALAR OPERATIONS STATISTICAL OPERATIONS FAST FOURIER TRANSFORM CONVOLUTION SOLUTION OF LINEAR EQUATIONS The library is callable from Microsoft Fortran. Basic, "C" and Pascal compilers. Also IBM Professional Fortran and Macro Assembler. Get "Mega Math" II Performance for only $299.00 (U.S.) Also available is the "Mega Math" AT. "Booster". A single PC board, designed to reduce execution time in numeric processing applications. If your IBM AT is equipped with the 80287 coprocessor, the "Booster" will enhance its performance by up to 50%. price $249.00 (U.S.) For increased performance of Mega Math Routines, inquire about Micray's high perfor- mance floating point processor for the IBM AT or compatibles. ELECTRONICS LTD. (403) 250-1437 Bay 1. 4001A - 19 Street N.E. Calgary, Alberta, Canada T2E 6X8 T5 - gp TRADEMARKS: (IBM, PC/XT/ AT) INTERNATIONAL BUSINESS MACHINES (MICROSOFT) MICROSOFT CORPORATION (MEGA MATH) MICRAY Fall 1985 BYTE- Inside the IBM PCs 213 YdU JUST BOUGHT A HAYES MODEM FORYOUR IBM PC? SORRY YOU BLEW IT. SMARTMODEM 1200B ZOOM/MODEM PC 1200 100% SMARTMODEM COMPATIBLE Complete Hardware and Software Compatibility • • MICROPROCESSOR EPROM Permits Hardware Upgrades • V CALL PROGRESS TONE DETECTION With MCI/Sprint Capability' V DEMON DIALING Automatically Reaches Busy Numbers Fast v 7 TOUCHTONE DETECTOR OPTION With Auto- Answer Password Security • 8K BYTE RAM OPTION For Background Electronic Messaging V EXTENDED "ZT" COMMANDS For More Programming Power >/ HIGH-SPEED 16450 UART Recommended for IBM PC AT V AUDIO INPUT JACK To Send Voice to a Remote Caller V CLOCK/CALENDAR OPTION V COMMUNICATIONS SOFTWARE INCLUDED SMARTCOM PFSACCESS MADE WHERE? USA USA WARRANTY 2YEARS 2 YEARS SUGGESTED RETAIL PRICE $549 $499* '$429 without PFS: Access ZOOM/ MODEM Call us for the name of your nearest Authorized ZOOM Dealer: 800-631-3116 or 617-423-1072 in Massachusetts Dealers: The ZOOM/MODEM PC 1200 is in stock now at the leading national and regional distributors. Inquiry 228 © 1985 ZOOM Telephonies, inc., 207 South St., Boston, MA ZOOM/MODEM, Demon Dialing ttatlemarks of ZOOM Telephonies, inc. Smarlmodem, Smartcom trademarks of Hayes Microcomputer. EGA PROGRAMMING Inquiry 153 for End-Users. Inquiry 154 for DEALERS ONLY. this, read 1 byte at the byte address you calculated and then write a data byte consisting of 8 zero bits to that address. When you perform the byte read, the Graphics Controller stores 4 bytes from the bit planes into its internal latch registers. (You can ignore the byte you read.) When you write the data byte, the Graphics Controller uses the bit mask to copy bits from the data byte to the bit planes. Only masked bits are copied. The result is that a zero bit is copied to each of the four bit planes, and the value of the pixel is zero. Fourth, set the bits to 1 in the ap- propriate bit planes for the pixel. Do this by enabling only those bit planes that are to contain a 1 bit. Bit planes are enabled by storing a "map mask" in the Graphics Controller's Se- quencer/Map Mode register (regis- ter 2). The map mask is a 4-bit pattern (the low-order nybble of 1 byte) with 1 bits that correspond to the bit planes to be enabled. Since the value of a pixel likewise corresponds to the bits set in each bit plane at a given address, the map mask is the same as the value of the pixel. Thus, when you OUT a 2 to I/O port 3C4 and then the value of the pixel to I/O port 3C5, you enable the appropriate bit planes for the 1 bits in the pixel. To store 1 bits in the enabled bit planes, you must again latch bytes from the bit planes by doing a byte read. Then, write a data byte of all 1 bits. As before, the Graphics Con- troller uses the bit mask to determine which bits in the data byte to copy in- to the bit planes. However, this time only the enabled bit planes are up- dated. The result is that a 1 bit is copied to each of the enabled bit planes, and the pixel has its new value. Fifth, you must reconfigure the Graphics Controller to the default status assumed by the ROM BIOS. Re- enable all four bit planes. (OUT a 2 to port 3C4 and then binary 1111 to port 3C5.) Finally, set the Graphics Controller's bit mask to binary (continued) LaserJet Printing Using WordStar® Multiplanf and Lotus 1-2-3® PrintMerge tm uses all the features of LaserJet & LaserJet PLUS Polaris PrintMerge' 1 " is the print control program that prints WordStar and ASCII print files like Lotus 1-2-3 and Multiplan Print Files. Polaris PrintMerge ' m creates the most professionally perfect printing possible by the LaserJet. Print camera ready Documentation, Proposals, Spreadsheets, Reports, Manuals and Newsletters. Here's what others are saying about Polaris PrintMerge' 1 ": InfoWorld Review "Polaris PrintMerge'" 1 takes the worry out of using the ~y{ HP LaserJet effectively with WordStar and 1-2-3. Do we like Polaris PrintMerge? YOU BET. " •^ John C. Dvorak, InfoWorld & PC World said: "I highly recommend it." * ^commended by Q ^£11 Easily Print Tables & Spreadsheets Correctly Using Proportional Fonts Print Text with Forms "A" Use Our Software Symbol Sheet'" 1 ($49.95) Z\t© ~T" Full Utilization of New Line Functions & Shading ®14 Jd POLARIS T W A R £ $ 99.00 copy protected $ 124.00 not copy protected $ 5.00 s &h (tax in Ca.) Money Back Guarantee Call or Write for Your Copy Today 619 471-0922 310 Via Vera Cruz, Suite 205, San Marcos, CA. 92069 PC or MS DOS *196K RAM IBM PC, XT, AT, or 100% Compatibles tc 384K RAM HP 150 HOW TO JUSTIFY A LASER PRINTER You'd love to have one of those high-speed laser printers. But aren't they hard to cost-justify? Not if you have two or more computers that you want to hook up. WITH PrintDircctor What's PrintDirector? It's a product family of buf- fered, intelligent printer mana- gers that allows you to more than cost-justify that laser printer. It lets you hook up minis, PCs, modems, multiple prin- ters, parallel and serial . . . you name it. Any mix of models and makes. It can even be a Print Server in a larger LAN. The buffer (60KB to 500KB) provides concurrent input and output. It handles different baud rates and protocols. No cable or switch flipping. No mod- ifications to your hardware or software. For more information on PrintDirector, the ultimate in printer managers, call or write: J^rintDirector Digital Products Inc. • The Simple Network Solution Company 600 Pleasant Street, Watertown MA 02172 (617) 924-1680 (Outside Mass., call 1-800-243-2333) Prices start at $645. Inquiry 46 Fall 1985 BYTE- Inside the IBM PCs 215 EGA PROGRAMMING 1 1 1 1 1 1 1 1 . (OUT an 8 to port 3CE and then 11111111 to port 3CF.) In Write Mode 1 the Graphics Con- troller simply copies the contents of its latch registers (presumably loaded by a previous latched read) into the bit planes. This function is particular- ly useful for copying one region of EGA RAM to another, since all four bit planes can be updated in a single memory cycle. You can also use Write Mode 2 to set the value of an individual pixel. The technique differs from that of Write Mode in that you do not need to selectively enable the bit planes in order to set bits. Rather, bits in the ap- propriate planes are set according to a data byte you write to the pixel's byte address. The programming sequence is as follows (see listing 3). Calculate the byte address and bit mask for the pixel. Then set Write Mode 2 by writing a 2 to the Graphics Controller register 5, the Mode register. (OUT a 5 to port 3CE, then OUT a 2 to port 3CF.) Set the bit mask for the pixel. (OUT an 8 to port 3CE, then OUT the bit mask to port 3CF.) Next, latch the bytes at the calculated address in the bit planes. Write a byte containing the value of the pixel to the calculated ad- dress. The bits in this byte are copied into the corresponding bit planes (bit to plane 0, bit 1 to plane 1, and so on) for the bit specified in the bit mask. Finally, restore the default Graphics Controller write mode and bit mask. In addition to providing three dif- ferent ways of writing pixels, the Graphics Controller can also be pro- grammed to perform certain useful (and maybe not so useful) bit manip- ulations. You can set any or all of the 8 bits in the bit mask so that up to 8 pixels at a time can be modified in a single write operation. This is espe- cially handy in setting groups of pixels to the same color (to draw a hori- zontal line, for example). Bitwise AND, OR. or XOR operations on the data in the bit planes can be specified by modifying bits 3 and 4 of the Graph- ics Controller's Data Rotate/Function Select register (register 3). In Write Listing 3: Sample subroutine using " Write Mode 2. wp2 proc near call with AX = y-coordinate BX = x-coordinate CX = pixel value push ex Preserve the pixel value on the stack. (It gets popped into AX later on . . .) ; Calculate byte add ress (segment & offset) and bit mask mov dx.OAOOOh mov ds.dx DS : = EGA buffer segment address mov dx,80 mul dx AX : = (y * 80) mov cx.bx CX := x shr bx,1 shr bx,1 shr bx.1 BX : = x/8 add bx.ax BX : = (y « 80) + x/8 (offset) and cl,7 CL : = (x mod 8) xor cl,7 CL : = 7 - (x mod 8) mov ch,1 shl ch.cl CH : = 2 " (7 - x mod 8) (bit mask) ; Select Write Mode 2 mov dx,3CEh Graphics Controller port address mov al,5 out dx.al Select Mode register (register 5) mov dx,3CFh mov al,2 out dx.al Set Write Mode 2 ; Set the Bit Mask register mov dx,3CEh Graphics Controller port address mov al,8 out dx.al select register 8 mov dx,3CFh mov al.ch out dx.al load the bit mask into register 8 ; Latch all four bit p anes mov al,[bx] "Graphics read" at address A000:offset This loads 1 byte from each bit plane into the latch registers. (The byte "read" is ignored.) ; Write the pixel pop ax AL : = pixel value mov [bx],al Write at address A000:offset This sets the appropriate bit-masked bits in the latch registers and stores the latched bytes to the bit planes. ; Restore default EGA graphics status mov dx,3CEh Again, select . . . mov al,5 out dx.al . . . Graphics Controller "Mode Register" mov dx,3CFh mov al.O out dx.al Restore Write Mode (the default) mov dx,3CEh mov al,8 Again, select . . . (continued) 216 Fall 198S BYTE- Inside the IBM PCs EGA PROGRAMMING out dx.al ; . . . Graphics Controller register 8 mov dx,3CFh mov al,11111111b ; Default bit mask out dx.al ; Restore default bit mask ret wp2 endp Listing 4: Sample subroutine using 'iead Mode 0. rpO proc near call with AX = y-ooordinate BX = x-coordinate returns CX = pixel value ; Calculate byte add ress (segment & of set) and bit mask mov dx.OAOOOh mov ds.dx DS : = EGA buffer segment address mov dx,80 mul dx AX : = (y - 80) mov cx.bx CX := x shr bx,1 shr bx,1 shr bx,1 BX : = x/8 add bx.ax BX : = (y • 80) + x/8 (offset) and cl,7 CL : = (x mod 8) xor cl,7 CL : = 7 - (x mod 8) mov ch,1 shl ch,cl CH : = 2 " (7 - x mod 8) (bit mask) ; Read each bit plane mov ah,3 AH := bit plane number L1: mov dx,3CEh mov al,4 Select Graphics Controller . . . out dx.al . . . Read Map Select register 4 mov dx,3CFh mov al.ah Select bit plane 3, 2, 1, out dx.al mov al,[bx] AL : = byte from bit plane ; Gather the bits together in CL shl Cl,1 bitO of CL : = and al.ch Apply bit mask to byte read P L2 Jump if bit read was or cl,1 bitO of CL : = 1 L2: dec ah AL := next bit plane number jge L1 Loop through all four bit planes and cx.OOOFh CX : = pixel value ret rpO endp Mode 0, the data byte written to the bit planes can be rotated by the Graphics Controller before it is written to the bit planes. The number of bit positions to rotate to the left is specified in bits through 2 of the Data register. Rotate/Function Select How To Read a Pixel Some graphics algorithms, particular- ly scan-conversion and region-fill al- gorithms, require that you determine the value of an individual pixel. The EGA facilitates accurate programming of such algorithms by providing two different ways of reading the value of pixels. In Read Mode 0, the EGA BIOS default, the value of the bits in a given byte in any one bit plane can be determined. As in Write Mode 0, you must specify a bit mask and select a set of bit planes. The programming steps are as follows (see listing 4). Calculate the ad- dress and bit mask for the pixel. Select a bit plane to be read by loading a bit number (not a bit mask) into the Graphics Controller's Read Map Select register (register 4). Use OUT to write a 4 to port 3CE, then OUT the bit number (0, 1, 2, or 3) to port 3CF. Then read the byte at the address you calculated. This byte is the actual data stored in the bit plane you selected at the address you read. Then, AND the byte you read with the bit mask. If you are reading one pixel, the bit you mask is one of the 4 bits that make up the value of the pixel. Repeat these steps for all bit planes. Put the bits you read from each of the bit planes together in the low nybble of 1 byte. This is the value of the pixel. Read Mode 1 is conceptually quite different from Read Mode 0. In Read Mode 1 you compare pixels to a pre- specified value to see if they match rather than actually determining the value of a pixel. This technique is practical when you need to scan a row for the occurrence of a pixel of a given value since you can test 8 pixels at a time. Here are the steps involved (see listing 5). As usual, calculate the ad- dress of the pixel(s) in question. Select Read Mode 1. (OUT a 5 to port 3CE, then OUT an 8 to port 3CF to set bit 3 of this register to 1.) Load the value to which you want the EGA to com- pare pixels into Graphics Controller register 2, the Color Compare register. (OUT a 2 to port 3CE, then OUT the comparison value to port 3CF.) Read the byte at the calculated address. This byte will contain a 1 bit in bit {continued) Fall 1985 BYTE- Inside the IBM PCs 217 Inquiry 215 for End-Users. Inquiry 216 for DEALERS ONLY. EGA PROGRAMMING STAY AHEAD OF THE GAME WITH THE LOWEST IN TOWN! TECH PC/AT $2099 PRICE INCLUDES: '6MHZ 80286 CPU '512K 'ONE, 1.2 MB FLOPPY DRIVE '8 EXPANSION SLOTS ' 195 WATT POWER SUPPLY 'COMPLETE MS DOS, PC DOS, XENIX COMPATIBILITY 'RUNS LOTUS 123, DBASE III FRAMEWORK AN^D ALL OTHER POPULAR AT SOFTWARE. 'ONE YEAR WARRANTY!! OPTIONS: TECH PC/AT WITH A _ . _ _ 20MB HARD DISK $2499 TECH PC/AT WITH 20MB HARD DISK, MONOCHROME MONITOR^ HERCULES" 9 COMPATIBLE *«--»_ MONO/GRAPHICS CARD $2699 ALSO AVAILABLE WITH 6-8 MHZ SWITCHABLE CPU TAPE BACKUPS, MODEMS, LARGER HARD DISKS, AND NETWORKING SYSTEMS. TECH TURBO PC/XT $1099 PRICE INCLUDES: '4 TO 7 MHZ SOFTWARE SWITCHABLE CPU '640K ' TWO, 360K DS/DD FLOPPY DISK DRIVES '8 EXPANSION SLOTS ' 135 WATT POWER SUPPLY 'ONE YEAR WARRANTY!! OPTIONS: TECH TURBO PC/XT WITH „*.._.__ 20MB HARD DISK $1699 TECH TURBO PC/XT WITH 20MB HARD DISK, MONOCHROME MONITOR AND HERCULES COMPATIBLE -..,,*_,» MONO/GRAPHICS CARD $1950 TECH PC/XT $799 PRICE INCLUES: '4.77 MHZ CPU '256K ' TWO, 360K DS/DD FLOPPY DRIVES '8 EXPANSION SLOTS ' 135 WATT POWER SUPPLY 'ONE YEAR WARRANTY!! OPTIONS: TECH PC/XT WITH ^ . . . _ 20MB HARD DISK $1449 TECH PC/XT WITH 20MB HARD DISK, MONOCHROME MONITOR, HERCULES COMPATIBLE **,*-* MONO/GRAPHICS CARD $1649 TELEX: 272006 Answer Back-TECH FAX: 714/S56-832S VISA, MASTERCHARGE, CHECK ACCEPTED _E"5~" PERSONAL !*#■"■ ^^^ COMPUTERS 714/754-1170 2131 S. HATHAWAY, SANTA ANA, CA ©1985 TECH PC 92705 'Hercules is a registered Irademark of Hercules Computer Technology. "IBM, IBM PC; XT; and AT are registered trademarks ol International Business Machines Corp Listing 5: Sample subroutine using Read Mode 1, rp1 proc near call with AX = y-coordinate BX = x-coordinate CX = compare value returns CX = flag push CX Push the compare value on the stack. (It gets popped into AX later on . . .) ; Calculate byte address (segment & offset) and bit mask mov dx.OAOOOh mov ds,dx DS : = EGA buffer segment address mov dx,80 mul dx AX : = (y « 80) mov cx,bx CX := x shr bx,1 shr bx,1 shr bx,1 BX : = x/8 add bx.ax BX : = (y • 80) + x/8 (offset) and cl,7 CL : = (x mod 8) xor cl,7 CL : = 7 - (x mod 8) mov ch,1 shl ch.cl CH : = 2 " (7 - x mod 8) (bit mask) ; Select Read Mode 1 mov dx,3CEh mov al,5 Select Graphics Controller . . . out dx.al . . . Mode register (register 5) mov dx,3CFh mov al,8 Set bit 3 to indicate . . . out dx.al . . . Read Mode 1 ; Specify the comparison value mov dx,3CEh mov al.2 Select Graphics Controller . . . out dx.al . . . Color Compare register mov dx,3CFh pop ax AL : = comparison value out dx.al Load Color Compare register ; Read and test the pixel value mov al,[bx] Read at address A000:offset. If a bit in AL is 1 , the corresponding pixel's value matches the comparison value. and al.ch Apply the bit mask. jz L1 Jump if pixel didn't match. mov cx,1 CX := "true" ret L1: mov cx,0 CX := "false" ret rp1 endp positions corresponding to pixels that match the comparison value, if a pixel does not match, the corresponding bit position is 0. Then restore the default Read Mode 0. (OUT a 5 to port 3CE, then OUT a to port 3CF.) By default, the EGA compares bits in all four bit planes to the value you load into the Color Compare register. {continued) 218 Fall 1985 BYTE- Inside the IBM PCs MICROTEK INTRODUCES NEW PC BOARD LINE BY OFFERING 10,000 20% OFF DISCOUNT COUPONS TO IBM PC USERS. This board is functionally equivalent to the IBM Printer Adapter, Asynchronous Communications Adapter, enough memory expansion to equal 384K, and a clock card. Plus comes with software that allows an extra 640K ot Virtual Memory (can be used with lixed or RAM disk and Lotus/ Intel/Microsoft specification software). For IBM PC/XT and compatibles. This board provides up to 2 megabytes of paged RAM memory for use with Symphony 1.1, Lotus 1-2-3 (2.0 version), and new versions of Framework, SuperCalc and other programs that use the Lotus/Intel/Microsoft expanded memory specifications. It is shipped with Disk Emulation and Printer Spooler software. The GL 0-384K Ultraflex Memory Board does more than just provide up to 384K of extra memory. In addition to print spooling, this board comes with software that allows an extra 640K of Virtual Memory (can be used with fixed or RAM disk and Lotus/lntel/Microsoft specification software). For IBM PC/XT and compatibles. 20% Off Coupons will be honored at your local dealer. Now you can get the discounts you're looking for plus full product support from your local dealer. Here's all you do. Simply fill out the Coupon Request Form at the bottom of this ad and mail it back to Microtek. We'll send you your 20% OFF COUPON, product information and the name of your nearest participating Microtek dealer. More than 1,000 dealers and over 300,000 customers know the value of Microtek's: • 7-24 Customer Service (7 days, 24 hours per day) • Wide Selection of Products • Fully-Tested Products • 2 Year Warranty • Manufacturing Quality (Built in USA) *20% Off suggested list price COUPON REQUEST FORM Please send me the following: □ 20% OFF COUPON and the name of my nearest participating dealer □ Information on products circled 12 3 4 5 Name I Address . City . State . Zip Telephone Number . MICROTEK' Dealer and distributor inquiries welcome. Call (619) 569-0900 MAIL TO: Microtek, Inc., P.O. Box 23817, San Diego, CA 92123 IBM PC is a registered trademark of International Business Machines Corporation. Framework is a registered trademark of Ashton-Tate. SuperCalc is a registered trademark of Sorcim/IUS Micro Software. Lotus is a registered trademark of Lotus Development Company. Inquiry 1 49 for End-Users. Inquiry 1 50 for DEALERS ONLY. Fall I985 BYTE- Inside the IBM PCs 2I9 EGA PROGRAMMING However, in some video modes only two bit planes are used for a given pixel. (These are 640- by 350-pixel four-color graphics modes on the IBM monochrome display or on an EGA with only 64K bytes of RAM.) In these instances you must specify which bit planes are used in the comparison by loading a bit pattern into the Graphics Controller's Color Don't Care register (register 7). Pixels and Palettes The value of a pixel corresponds to one of 16 palette registers internal to the EGAs video attribute controller circuitry. In turn, the content of each of these registers corresponds to the Yodm inGoodConpany When You Program inBetterBASIC All of these companies rely on BetterBASIC to write their software programs. They have found that BetterBASIC combines the features they need from BASIC, Pascal, C and Forth in one familiar environment. Some of these fea- tures include the following. 640K Now you can use the full memory of your PC to develop large programs. STRUCTURED Create well organized programs using procedures and functions that are easily identified and understood and completely reusable in future programs. MODULAR Use procedures and functions grouped together to form "library modules." INTERACTIVE BetterBASIC acts like an interpreter, responding to the users' commands in an immediate mode. However, each statement is actually compiled as it is entered. EXTENSIBLE Create your own BetterBASIC modules which contain BetterBASIC extensions (ideal for OEMs). COMPILED Each line of the program is compiled as it is entered into the computer's memory rather than interpreted at runtime. The optional Runtime System generates EXE. files. BetterBASIC Runs on IBM PC, IBM PC/XT and compatibles. CALL 1-800-225-5800 (In Canada: 416-469-5244) Order BetterBASIC now, or write Summit Software Technology, Inc.™, P.O. Box 99. Babson Park, Wellesley, MA 02157 Prices are listed below. BetterBASIC: $199 Runtime System: $250 8087 Math Module: $99 Order the BetterBASIC sample disk which includes a demo, a tutorial, compatibility issues and more. Only $10. MasterCard, VISA, P.O. Checks. Money Order. C.O.I) accepted. BetterBASIC is a registered trademark of Summit Software Technology. Inc. IBM PC and IBM PC/XT are registered trademarks of International Business Machines Corp. Tandy is a regis- tm tered trademark of Tandy Corp. ^F ^^^M Illustrated above are registered I I ■ trademarks of the following com- ■ ^ ^ panies: Mobil Oil Corp.; A T & T: *™ ^^^ General Electric i Westing- ^H^HH F.lectric Corp THW, Inc ALSO AVAILABLE FOR THE TANDY 2000, 1200 AND 1000 colors displayed. Each bit in the palette registers corresponds to the IRGB (input red-green-blue) signals that drive the video display. Since a pixel can have any one of 16 values, and any of 64 colors can be specified in each of the palette registers, 16 of 64 colors can be displayed. When a video mode is selected using the ROM BIOS, the palette reg- isters are loaded with "reasonable" color values. For example, in 16-color video modes, the colors correspond to those available on the CGA. How- ever, you can alter the contents of the palette registers to achieve color-mix- ing, masking, and animation effects. You can load the palette color reg- isters directly by writing I/O port 3CO. However, you should probably use the ROM BIOS function 10 hexadeci- mal of interrupt 10 hexadecimal, which programs the palette registers either individually or from a list of values. This is the same BIOS software interface used in the PCjr. Summary 1 have covered the fundamentals of graphics programming on the EGA. If you have followed the sample listings, you will have an idea of the type of low-level programming required. Understanding the graphics archi- tecture of the EGA is the essential first step in programming other interesting functions, including panning, split- screen display, and RAM-loadable character sets. IBM's technical docu- mentation provides programming ex- amples for these EGA functions. At this writing, the EGA is still fairly new on the market. Few programs make use of its enhanced graphics capabilities. But as the use of the EGA becomes more widespread and more ingenious programmers begin work- ing with it, you should see some re- markable graphics programs. ■ BIBLIOGRAPHY Hoffman, Thomas V. "Graphic Enhance- ment." PC Tech journal. April 1985, volume 3, number 4, page 58. IBM PC Technical Reference: Options and Adapters. Reference Number 6322 509. IBM Personal Computer Seminar Proceedings. May 1985, volume 2, number 1-11. 220 Fall 1985 BYTE- Inside the IBM PCs Inquiry 190 Powerful MS-DOS Software. For the IBIVP-PC, XT AT & compatibles with MS-DOS/PC-DOS 2.0 or higher. Only 4K4fe4^4%E Each UTAH COBOL ALL NEW! We believe this is the fastest COBOL compiler on any micro; for example, we have compiled 4500 statements per minute on an IBM-AI Utah COBOL is based on ANSI-74 standards with powerful level 2 features, including compound conditionals & full CALL CANCEL. Speed and simplicity are certain to make it a favorite in the classroom as well as with professional programmers. Package includes diskette, 165-page manual, many examples & 16 complete COBOL source code programs. $39.95. COBOL Application Package, Book 1: $9.95. UTAH PASCAL. Has many advanced features including: 14 digit precision, BCD math (no round-off errors), floating point +63 -64, TRACE debugging, Arrays up to 8 dimensions, 64K strings, External procedures & Dynamic Module loading. Package includes diskette & 134-page mannual. $39.95. UTAH PILOT TM Written by Prof. J. Starkweather, the language's creator, Utah PILOT exceeds all PILOT-73 standards. And it has an integrated full-screen text editor for easy program develop- ment. Ideal for classroom instruction, business training & home study. Package includes diskette, 129-page manual & 10 sample programs. $39.95. UTAH EDIT TM A full-screen, video-display text editor designed specifically for computer program text preparation. Completely user- changable, it can be configured to almost any terminal & takes only 12K disk space. Package includes diskette & 58-page manual. $39.95. UTAH BASIC" $39.95 Package includes diskette & 239-page manual. BIG PRINT™ DISKETTE $19.95 Great for making signs. Requires 132-print position printer. UTAH software requires 128K RAM (i.e., 90K user RAM) an IBM-PC, XT AT, PCjr, or compatible (16-bit) microcomputer with MS-DOS or PC-DOS Operating System, Rev. 2.0 or higher. For 8-bit CP/M-80 systems, ask about our NEVADA Software Series. MS is a trademark ol Microsoft Corp. IBM is a registered trademark ol International Business Machines, Corp. Utah COBOL, Utah BASIC, Utah PASCAL, Utah PILOT Utah EDIT, BIGPRINT. & Ellis Computing. Inc. are Irademarks of Ellis Computing, Inc. ! c 1985 Ellis Computing, Inc. SATISFACTION GUARANTEED. If for any reason you're not completely satisfied, just return the Utah package within 15 days- in good condition, with the sealed diskette unopened-and we'll refund your money. There's absolutely no risk to you, so why wait?-order today. Please send me these UTAH Software packages (IBM-PC diskette): □ COBOL □ BASIC □ EDIT □ PASCAL □ PILOT □ BIGPRINT Send me (how many) software packages: TOTAL $ Utah COBOL Application Book 1; BIGPRINT: California residents add sales tax (6% or 6V4%) HANDLING/SHIPPING: no shipping charge within U.S.; Overseas add $10 for first package, $5 each additional. □ Check Checks must be in U.S. Dollars, drawn on a U.S. bank. (Sorry, no C.O.D.s.) □ VISA □ MasterCard Enclosed: TOTAL $_ Send my UTAH order to: CARD NO. .EXP_ SIGNATURE. SHIPTONAME_ STREET. CITY/STATE/ZIP_ COUNTRY. Order now from: ELLIS COMPUTING, INC. 3917 Noriega Street San Francisco, CA 94122 «| Phone (415) 753-0186 SINCE 1977 ELLIS COMPUTING: Inquiry 227 Fall 1985 BYTE- Inside the IBM PCs 221 /♦' IF YOU'RE TIRED OF PAY- ING OUTRAGEOUS LONG DIS- TANCE CHARGES EVERY TIME YOUR COMPUTER TALKS ON THE PHONE, GTE TELENET OFFERS AN ALTERNATIVE. IT 'S CALLED PC PURSUIT" NOW FOR ONLY $S5 A MONTH (PLUS A ONE-TIME INSTAL- LATION FEE OF $E5) YOU'LL BE ABLE TO REACH OTHER PC SUBSCRIBERS, FREE LOCAL DATA BASES AND BULLETIN BOARDS IN ATLANTA, BOS- TON, CHICAGO, DALLAS, DENVER, DETROIT, HOUS- TON, LOS ANGELES, NEW YORK (AREA CODE S15), PHILA- DELPHIA, SAN FRANCISCO AND WASHINGTON D-C AND TAKE ADVANTAGE OF LOCAL SOFTWARE DOWNLOADING CA- PABILITIES, AS WELL ■ YOU CAN USE THE PC PUR- SUIT SERVICE BETWEEN bPM AND 7AM WEEKDAYS. AND ALL DAY ON WEEKENDS. ALL YOU NEED IS AN AUTO-ANSWER MODEM AND COMMUNICATIONS SOFTWARE. AS PART OF GTE TELENET'S DATA NETWORK, THE PC PUR- SUIT SERVICE OFFERS THE QUALITY, RELIABILITY AND ACCURACY NEEDED IN THE PURSUIT OF INFORMATION. FOR MORE INFORMATION CALL flDD-3bfl-MElS BE- TWEEN =IAM AND 5PM. AFTER HOURS CALL flQ0-A3S-3001 ON YOUR TERMINAL TO SIGN UP AND START USING THE SERVICE. OR USE THIS SEC- OND NUMBER TO GET OUR ON- LINE USERS GUIDE . WITH PC PURSUIT, YOU CAN FINALLY GET YOUR HANDS ON THE INFORMATION YOU NEED, WITHOUT PAYING AN ARM AND ALEG- GTE Telenet NOW YOU DOI\TT HAVE TO PAY THIS MUCH TO ACCESS INFORMATION WITH YOUR HOME COMPUTER Inquiry 77 222 Fall 1985 BYTE- Inside the IBM PCs INSIDE THE IBM PCs IBM PC Interrupt Service Routines Guidelines for writing an interrupt handler in a high-level language by Paul M. Dunphy ONE OF THE most impor- tant concepts in computer technology is the idea of hardware-generated inter- rupts. Interrupts increase the overall efficiency of a computer system because the external devices re- quest the attention of the processor as needed. If a system had no interrupts, the processor would have to poll every device in the system periodically to see if any of them required attention. Unfortunately, both the hardware and software aspects of interrupt sys- tems are poorly docu- mented and tend to be re- served for operating- system functions such as peripheral drivers, disk handlers, etc. Program- mers wishing to make use of the interrupt system for customized applications are frequently forced to resort to complex assem- bly-language routines that are difficult to write and understand. In this article. I will describe how to use the interrupt system on the IBM Per- sonal Computer and demonstrate that you can write an interrupt service routine (ISR) in a high-level language (in this case, Borland International's Turbo Pascal). (Interested readers should consult "Interrupts and the IBM PC." Parts 1 and 2, by Chris Dunford, PC Tech journal, November/ December 1983, page 173, and lanuary 1984, page 144.) You should be able to use these guidelines to write ISRs in other languages. A Bit of Background on Interrupts Peripheral devices can request the processor's attention for many dif- ferent reasons. They may require con- trol signals, have data available, or simply need to tell the processor that they have finished a task. Whatever the reason, an interrupt is the event that makes a processor suspend exe- cution of its current pro- gram to perform some re- quested activity. An "interrupt line" is a pin on the micropro- cessor chip that, when ac- tivated, causes the pro- cessor to save its current location (the processor usually does this by plac- ing the contents of its in- struction pointer on the stack) and transfer control to a fixed address. This fixed address is the begin- ning of the ISR. The ISR performs its tasks and returns control to the exact location at the time of the interrupt so that the interrupted routine is never aware that it was disturbed. Notice that the ISR must save any of the processor's registers before it modifies them and then must restore them before it returns. Otherwise, information that the interrupted routine had stored in those registers might be lost. If a processor has only one interrupt line with several devices attached, then the ISR's first job is to determine {continued) Paul M, Dunphy is a microcomputer specialist at an oceanographic research institute. He can be reached at the Bedford Institute of Oceanography, AOL Software Systems, POB 1006, Dartmouth, Nova Scotia, Canada. ILLUSTRATED BY IAMIE HOCAN Fall 1985 BYTE- Inside the IBM PCs 223 INTERRUPTS Most processors provide several interrupt lines and each is associated with a different ISR start address. which device caused the interrupt. Most processors, however, provide several interrupt lines and each line is associated with a different ISR start address. In this arrangement, each device is serviced by its own ISR. Often, as on the IBM PC, the ISR start addresses are stored contiguously in memory in an "interrupt-vector table." This is commonly referred to as a "vectored interrupt" system. Whether a system has one or several interrupt sources, some or all of these may be ignored or "masked out" at times when the processor is executing critical code and cannot be interrupted. In addition, when several interrupt lines are available, they are often prioritized so that the system can decide which one should be ser- viced first should more than one device request attention simulta- neously. The Interrupt System on the IBM PC The 8088 microprocessor in the IBM PC supports a special instruction, INT, which allows programs to perform synchronous transfers to subroutines through the interrupt-vector table in a manner much like a hardware inter- rupt. The operating system takes ad- vantage of these software interrupts to perform virtually all of its I/O (input/output). You should be aware of the fact that most of the documenta- tion on IBM PC interrupts is actually referring to the INT instruction. As for true hardware interrupts, the architecture of the IBM PC provides eight lines, designated IRQO to IRQ7. As delivered, the IBM PC uses three of these lines. IRQO is reserved for the system timer, 1RQ1 for the keyboard, and IRQ6 services the NEC PD765 floppy-disk controller. The remaining lines are not used by the system; they can be used by prop- erly wired cards in the peripheral slots. The IBM PC interrupt lines are ordered in priority; IRQO is the highest and 1RQ7 is the lowest. Any or all lines can be masked. To resolve priority- and control-masking opera- tions, the IBM PC uses the Intel 82 59 programmable interrupt controller (PIC). The 8088 processor can only handle one interrupt at a time, so the 82 59 PIC evaluates each request and determines whether it should pass the interrupt on to the processor. An in- terrupt routine can be interrupted if the 82 59 PIC receives a request of higher priority. On an off-the-shelf IBM PC, the clock can interrupt the disk controller but not vice versa. Suppose the 8259 PIC receives an interrupt request, the line is not masked, and no higher-priority inter- rupt is being serviced. The 82 59 PIC signals the processor that it has a valid interrupt request pending. The pro- cessor finishes any instruction that it is currently executing and then acknowledges the request by signaling the 82 59 PIC that it is ready to service the interrupt. The 82 59 PIC then adds an offset of 8 to the interrupt-request number to obtain an 8-bit interrupt- type number. For example, if the disk is requesting attention, the interrupt- type number is 14 ( 8 + 1RQ6). This interrupt-type number is placed on the system data bus. The processor reads the data bus and uses this number as an index to access the interrupt-vector table stored in memory. Each entry in the interrupt-vector table consists of 4 bytes. The first 2 bytes specify the ISR's segment ad- dress, and the next 2 bytes contain its offset within the segment. For IRQO, IRQ1, and IRQ6, these addresses point to routines in the BIOS (basic input/output system) that service the corresponding system device. The en- tries for the remaining interrupts point to a dummy routine in the BIOS that returns control to the executing pro- gram. To add a new ISR to the table, you simply overwrite the appropriate dummy-routine pointer with a pointer to your new service routine. ISR Housekeeping Recall that the ISR's first job is to save all the registers it will modify in the course of executing so that the orig- inal machine state can be restored upon completion. This is best done by pushing the registers onto the stack. If you write your ISR in assembly lan- guage, you only need to preserve the registers that are actually used. How- ever, if you write your ISR in a high- level language— Pascal, for example— you cannot make assumptions about which registers the compiler will use. Therefore, your ISR must save all registers just in case. Turbo Pascal has an inline statement that allows you to insert machine code directly into the program. You can use inline to gen- erate the PUSH instructions at the beginning of the ISR, and again at the end to generate the POP instructions. Now that you know how to preserve the registers, can you proceed to write the actual code that will service the in- terrupt? Not yet. First, there is a sub- tle problem associated with the 8088's segmented architecture that you must take into account. Remember, an ISR is invoked asynchronously. This causes no problems as long as the interrupted code is somewhere in the user pro- gram. However, most high-level lan- guages (Turbo Pascal included) make use of the system BIOS to perform I/O. Suppose the program is using the BIOS when it is interrupted. Control will be transferred to the user ISR, but the data segment (DS) register will con- tain the BIOS data segment. If the code in the ISR attempts to access any Pascal variable, the DS register will be incorrect and the actual referenced memory locations will be somewhere in the BIOS rather than the Pascal pro- gram. Needless to say, this will cause the program to go haywire, particularly if the routine attempts to modify these variables. How do you overcome this problem? You must restore the Turbo Pascal data 224 Fall 1985 BYTE • Inside the IBM PCs INTERRUPTS segment after you push the registers. There are probably several ways to do this, but I have found the following method adequate. A Borland repre- sentative has assured me that words 5 to 1 5 of the code segment contain nonexecutable code, and the program will not be corrupted if data is stored in this area. Therefore, in the main program you create an absolute variable in this area, and, using Turbo Pascal's Dseg function, your first ex- ecutable statement saves the DS ad- dress in this variable. Now that the DS segment has been determined and saved in a known ab- solute location, our 1SR can restore it each time it is invoked. First, copy the code segment into the DS register; this allows you to read the contents of the absolute variable into the AX register. Then transfer the AX to the DS register to complete the operation. There is one more thing to do before the fundamental "shell" of the 1SR is complete. Just before it pops the registers and returns, it must tell the 82 59 PIC that it has finished. The 82 59 PIC maintains an 8-bit register in which it records which ISRs are in service. The associated bit for the ISR must be set to zero when the routine completes. To do this on the IBM PC, send a hexadecimal 20 to the control port of the 8259 PIC. This is called a nonspecific end of interrupt (EOI). When the 82 59 PIC receives a non- specific EOI, it clears the bit belong- ing to the highest-priority interrupt in service. This will always be the routine that sent the command. On the IBM PC, the port addresses of the 82 59 PIC are 20 and 21 (hexa- decimal). You can access I/O ports directly from the high-level code using Turbo Pascal's predefined array port. You now have constructed the basic framework for the ISR on the IBM PC using Turbo Pascal (see listing 1). Initializing the System to Handle User Interrupts Now that you know how to construct an ISR, you must prepare the system to process the interrupts. First, you have to tell the 82 59 PIC that your IRQ line is not to be masked. The 82 59 PIC maintains an 8-bit register called the interrupt-mask register (IMR). Each bit from to 7 corresponds to an inter- rupt-request line. If the corresponding bit is set to 1, the associated IRQ line is masked and subsequent interrupt requests on that line will not be passed on to the processor. When MS-DOS initializes the 82 59 PIC at boot-up, it sets all the bits in the IMR to 1 except those corresponding to IRQO, IRQ1, and IRQ6. To activate your IRQ, you must clear the appropriate bit. Listing 2 contains the Turbo Pascal procedure for doing this. Your next step is to modify the in- terrupt-vector table so that the appro- priate entry will point to your ISR. You can find the address of the ISR by [continued] Listing 1 : The basic structure of a Turbo Pascal ISR. The order and number of registers saved differs slightly from what is suggested in the Turbo Pascal reference manual, but I have found that this method is necessary to ensure proper operation. Program Test(input, output); var dsave ; integer absolute Cseg:$0006; Procedure Interrupt Service Routine; begin inline($FB/ { STI e $1E/ { PUSH DS $50/ { PUSH AX $53/ { PUSH BX $51/ { PUSH CX $52/ { PUSH DX $57/ { PUSH Dl $56/ { PUSH SI $06); { PUSH ES inline($8C/$C8/ { MOV AX.CS re $8E/$D8/ { MOV DS.AX $A1 /dsave/ { MOV AX.dsave $8E/$D8); { MOV DS.AX enable further interrupts restore data segment Pascal code for servicing the interrupt port[$0020] = $20; { nonspecific E EOI to 8259 PIC inline ($07/ { POP ES $5E/ { POP SI $5F/ { POP Dl $5A/ { POP DX $59/ { POP CX $5B/ { POP BX $58/ { POP AX $1F/ { POP DS $CF); { IRET return from interrupt end begin dsave : = Dseg; end. Fall 1985 BYTE- Inside the IBM PCs 225 Inquiry 73 INTERRUPTS STOP SOFTWARE PIRACY . . . . . . with one of our new, sophisticated copy prevention products. for Disk Security • SAFEGUARD DISK* for IBM PC/Compatibles • SAFEGUARD 64 DISK* for Commodore 64 •Renders Bit and Nibbler Copiers ineffective Software is encrypted and protected on each disk. for Data Security • DATA PADLOCK • PC CRYPT for Telecommunication Security • PRIVATE TALK Why should your valuable data or useful software program become available in the Public Domain? Call or write for more information. GLENCO ENGINEERING INC. 3920 Ridge / Arlington Hts., IL 60004 (312)392-2492 With the exception of a few in-line machine instructions, an entire ISR can be mitten in Pascal. using the Turbo Pascal functions Cseg and Ofs. However, the compiler adds a few instructions of overhead to the start of every procedure. Consequent- ly, the first instruction of the compiled ISR is not the STI instruction that is inserted by the inline statement. The actual start of the ISR is 7 bytes prior to the first statement of source code. Since the instructions added by the compiler use the registers before you have a chance to save them, you must add 7 to the offset returned by Ofs so they will not be executed. The vector table is then modified using the pre- defined Turbo Pascal array memW. Listing 3 contains the procedure for doing this. Putting It All Together To demonstrate the use of the IBM PC interrupt system using Turbo Pascal, I wrote a program called Acquire. [Editor's note: The source code is available via BYTEnet Listings. Call (617) 861-9774 before November 1; thereafter, call (617) 861-9764.| This program reads data from a cassette-tape reader transmit- ting 16-bit words at 2000 hertz and writes it to disk. No handshaking is possible because the tape reader simply places the data on the input lines and strobes the receiving device once every 500 microseconds. To read the data, I chose the Intel Listing 2: The Turbo Pascal procedure for enabling an interrupt. Byte variable IRQ selects which interrupt line is to be "unmasked'.' Procedure Enable_IRQx(IRQ : byte var imr, mask : byte; begin mask = not ( 1 shl IRQ ) imr = port[$21]; imr = imr and mask; port[$21) ■ imr; end; { Get IMR from 8259 } { clear mask bit } { and return to controller } Listing 3: The Turbo Pascal procedure for setting the interrupt-vector table. The variable entry selects which entry in the table is to be set. Note that entry corresponds to interrupt line 0, etc. Procedure Set IVTfentry : integer); var offset, segment, first word, second word : integer; begin offset : = Ofs(lnterrupt Service segment first word second word memW[$0000:first_word] memW[$0000:second_word] end; Routine) + 7; = Cseg; = (entry + 8) * 4; = first word + 2; = offset; = segment; 226 Fall 198^ BYTE • Inside the IBM PCs INTERRUPTS 82 5 5 programmable parallel port on the Tecmar Lab Master board. My program reads two 8-bit quantities from ports A and B of the 82 55 to form the 16-bit data word. 1 pro- grammed the 82 55 to generate an in- terrupt when it has latched the data and jumpered the board to use IRQ7. The program Acquire concurrently collects data from the Tecmar board and writes it to disk. Because the capacity of the floppy disk is limited to 360K bytes, Acquire terminates when the disk is full. To collect data and simultaneously transfer it to disk. Acquire maintains two large buffers of 12,800 16-bit words each. The program actually in- corporates two interrupt service routines; one fills the first buffer, the other fills the second. The interrupt- vector table is initially set so that it points to ISR 1. When the first buffer is full, the vector table is altered to point to ISR 2. While the second buf- fer is filling, data from the first buffer is flushed to disk. Conclusion 1 have shown that, with the exception of a few in-line machine instructions, an entire interrupt service routine can be written in Pascal. The examples in the listings should serve as templates for programmers who wish to develop their own interrupt handlers. ■ MEX-PC — Full-featured modem software for your IBM- PC (Versions also available for Tandy 2000 and most CP/M ma- chines). Now can be menu driven • Fully programmable function keys • Simple built-in programming language for custom applications development • Choice of 8 background/foreground colors • All popular protocols (KERMIT available Dec. 85) • Automatic & repeat dialing • Runs DOS com- mands and programs while on- line • "Clones" customized versions. $59.95 REO — REmote Operation module with password security. This inexpensive add-on mod- ule adds remote access capabil- ity to your MEX program. It al- lows you to call up your office computer from home — or your home computer from your of- fice — and swap data or text files, even programs. Download a spreadsheet, rework it at home, then send it back, updat- ed, to your office. Password se- curity keeps unauthorized per- sons from gaining access to sensitive files. $29.95 TEM — Intelligent terminal emulation add-on module for MEX-PC. As shipped, MEX emu- lates an ADM-3A equivalent terminal. TEM expands MEX to emulate either a Televideo 925 orDECVT52/VT100. TEM is full-function emula- tion, allowing you to use re- mote text processors and spreadsheet programs running on mainframes that require a specific terminal interface. Sim- ple installation. Fully docu- mented. $29.95 NightOwl Connection — A multi-user on-line service that provides you with round-the- clock access to MEX support, plus all the latest and best in public domain and user-sup- ported software. The Connec- tion features 36 megabytes of free software — some of it ex- clusive to Connection subscrib- ers — including 18 megabytes worth of programs for the IBM- PC and compatibles. MEX-PC owners can download all up- dates to their communications program free of charge! $100/yr. ($50/yr. renewal) All MEX products have a 30-day, money-back guarantee. MEX n' Match Cross- FEATURE MEX-PC ' talk® PC-Talk© Symphony© 'CLONE " customized versions YES NO NO Run DOS commands & programs YES YES NO Repeat dialing YES YES NO List dialing YES NO NO Maximum baud rate 57,600 9,600 1,200 "Interactive" script files YES YES NO Programmable keys 40 10 10 Modem-7 batch transfers YES NO NO CompuServe transfer protocol YES NO NO Price (suggested retail) $60 $195 $35 *** Symphony supports keyboard "macros." MEX and MEX-PC are trademarks ol NightOwi Software, Inc. • CROSSTALK is a registered trademark of Micro Stui • SYMPHONY in a trademark of lotus Corporation • PC-TALK is a trademark of Headlands PresB, Inc. NightOwl Software Inc., Rt. 1, Box 7, Ft. Atkinson, Wl, 53538 NO NO NO NO 9,600 YES *** NO NO $695 MEX PACK S99.95 As a special introduction to our remote oper- ating module and terminal emulation system, we're offering an all-in-one package for a lim- ited time only. MEX-PACK is a complete com- munications package that includes: MEX-PC (version 1.50); REO remote operating module; TEM intelligent terminal emulation module; and a six-month subscription to the NightOwl Con- nection. Purchased individually, the items in this package would cost you $144.85 — a sav- ings of almost $45! Give us a toll-free call at 1-800-NITEOWL^ In Wisconsin, 1-414-563-4013' Inquiry I4l NightOwl "INSIDE IBM" SPORT-SHIRT! The classic November '83 Byte cover— and boy, does it look great on this % sleeve "baseball shirt"! The vivid royal blue sleeves and neckline really make the design jump out. And don't mistake this for one of those rubbery patches that cracks and peels off after a few washings. This is true four-color process: the inks are silk-screened into the fabric of the shirt, resulting in a beautiful, full- color image that lasts. You'll also appreciate the shirt itself: a real heavy- weight made of 50% cotton, 50% polyester. You'll enjoy cotton comfort in a tough, sporty shirt that keeps its crisp, fresh look through many washings— with almost no shrinking! The price for each "Inside IBM" Sport-Shirt is only $12.50 ($11 .50 each for 3 or more). Your order will be shipped within a week. Please send me the following shirt(s) at$12.50 each, or $11.50 each for 3 or more. I have included $2.00 for shipping and handing. Qty. Size _ Adult — Extra Large _ Adult— Large _ Adult— Medium _ Adult— Small _ Child— (sizes 10-12) Shipping and Handling (Overseas add $3.00) TOTAL Amount $ $ $ $2.00 $ D I have enclosed check or money order. □ VISA Q MasterCard □ Free Color Brochure Card #: Exp. Date: Ship my shirt(s) to: Name: (Business): Address: City: State: Zip: Mail this coupon to: Robert Tinney Graphics 1864 North Pamela Dr. Baton Rouge, Louisiana 70815 Your System/Controller should fit you like a good suit . i^L LET MICROMINT CUSTOM FIT YOU Whether it's suits or system controllers, you can't buy off the rack when you need a custom fit. That's why Micromint individualizes its system controllers to meet your par- ticular needs and budget. What's most important to you? Software compati- bility? Speed? Everything on one board? Economical computing power? if\'."l want software compatibility. " Solution: THESB180 COMPUTER/CONTROLLER The SB180, only 4" by 7W, offers a Z80 compatible CPU running at 6MHz, 256K bytes of RAM, up to 32K bytes of ROM, two serial ports, a parallel port, Z80/6800 I/O expansion bus, and an industry standard 765A-com- patible disk controller for up to four disk drives — any combinations of 3H", 5%" or 8" drives. The SB180 is based on the Hitachi HD64180 CPU. a microcoded CMOS chip which pro- vides high performance, reduced system cost, and low power operation while maintaining complete compatibility with the large base of standard CP/M software. SB180-1 vv/8K ROM monitor. . $369.00 SB180-5 w/8K ROM monitor, BIOS source and Z-system $418.00 jf2:"l need speed. " Solution: THE Z8 FORTH SYSTEM/CONTROLLER The Z8 FORTH System/Controller is only 4" by 4Vi" and includes a custom masked Z8 version of the FORTH language with a full screen editor, cassette I/O driver primitives, EPROM programmer primitives, and other util- ity words. It also contains up to 4K bytes of RAM or EPROM, an RS-232 serial port with selectable baud rates, and two parallel ports. Additional Z8 peripheral boards include memory ex- pansion, a smart terminal board, serial and parallel I/O, real time clock an A/D converter, and an EPROM programmer. It's perfect for data reduction and high speed control applications. BCC21 w /utilities . . . $225.00 $3: "Let me have an entire development system on one board. " Solution: THE BCC52 SYSTEM/CONTROLLER The BCC52 is a new stand alone single board microcomputer which is bus compatible with the Micromint BCC1 1 /BCC21 Z8 System/Controllers and ex- pansion boards. The BCC52 features the Intel 8052AH-BASIC micropro- cessor which includes a ROM resident 8K byte floating point BASIC inter- preter with extensions for process con- trol work. It contains sockets for up to 48K bytes of RAM/EPROM, an "intel- ligent" 2764/128 EPROM programmer, 3 parallel ports, a serial terminal port, and a serial printer port. BCC52 . . . $239.00 Jf4 : "Give me lots of economical computing power. " Solution: THE BCC11 BASIC SYSTEM/CONTROLLER The Z8 BASIC System/Controller is nearly identical to the FORTH System/Controller but contains a tiny BASIC interpreter, up to 6K bytes of RAM and EPROM, an RS-232 serial port with switch selectable baud rates, and two parallel ports. Add a power supply and terminal to start program- ming in BASIC or machine language. Programs can be transferred to 2732 EPROMS with the optional EPROM programmer for auto-start applications. It can also use any of the expansion boards mentioned under the Z8 FORTH System/Controller. BCC11 . . .$149.00 Additional information on peripheral boards and OEM pricing is available. Order Toll Free 18006353355 In Connecticut call: 1-871-6170 For a System Controller suited to your needs, give us a call. x2^ MICROMINT, INC. ' 25 Terrace Drive Vernon, CT 06066 Actually, we give you two things free. Our source code. And your freedom. Just buy part or all of our excellent integrated business accounting system, the SBT Accounting Software Library. We'll give you our source code absolutely free. Which, in turn, gives you the freedom to cus- tomize our software to fit your business needs. Say, for instance, you want to change the way a management report is formatted. Our free source code enables you to change it. What's more, the change will be quick and simple because our software is written in easy-to- use dBASE. In fact, the entire SBT Accounting Software Library runs with dBASE III or dBASE II* so you get the power and flexibility of those best-selling programs. Plus the freedom to use any computer that runs dBASE. The SBT Accounting Software Library. Great software and freedom. All in the same box. Call today for our demo disk and brochure. (415) 331-9900. THE SBT ACCOUNTING SOFTWARE LIBRARY. d Professional Time & Billing $395 d Order Sales Order Processing $195 dlnvoice Billing/Inventory Control $195 d Statement Accounts Receivable $ 95 d Purchase Purchase Order $195 d Payable Accounts Payable $295 dPayroll Payroll/Labor $395 d Ledger General Ledger/Finance $395 d Assets Asset/Depreciation $195 d Project Project/Job Accounting $395 d Backup Menu/Backup $ 65 sbt Three Harbor Drive Sausalito, CA 94965 (415) 331-9900 Call today for the name of the SBT consultant in your area. Free source code in every box. Accounting Software Library in dBASE H7dBASE IIP 230 'Compiled versions are also available. dBASE III and dBASE II are registered trademarks of Ashton-Tate, Inc. Copyright 198S, SBT Corporation. Fall 1985 BYTE- Inside the IBM PCs Inquiry 176 for End-Users. Inquiry 177 for DEALERS ONLY. INSIDE THE IBM PCs Pick, Coherent, and THEOS Multiuser systems on the IBM PC XT by Marc J. Rochkind PICK. COHERENT, AND THEOS are all multiuser, multitasking operating systems for the IBM PC XT. [Editor's note: THEOS is the new name for the Oasis operating system. In this arti- cle, THEOS refers to Oasis86. The name was changed this year] None of them can run MS-DOS programs, so you can't use them with the familiar spreadsheet, word-processing, and other packages for which most people buy XTs. These operating systems are intended for more specialized purposes. Pick and THEOS are designed as a basis for multiuser database applications. Coherent is more general in principle (it's a UNIX clone), but its most ap- propriate use is for pro- gram development in C. Because these operat- ing systems are so dif- ferent from each other and are designed for dif- ferent purposes, I won't compare them feature for feature. Instead, I'll dis- cuss them separately and evaluate them only in terms of their intended uses. I tested release 1.3 of Pick (from Pick Systems, 1691 Browning, Irvine, CA 92714, (714) 261-7425), release 2.3.43 of Coherent (from Mark Williams Co., 1430 West Wrightwood Ave., Chicago, IL 60614, (312) 472- 6659), and release 7.0 of THEOS (from THEOS Software Corp., Suite 100, 201 Lafayette Circle, Lafayette, CA 94549, (415) 283-4290). Pick and Coherent sell for $495 (including pro- gramming language). THEOS sells for $595 without a language; C or BASIC costs about $400 more. None of these operating systems are copy- protected. I tested the systems on my IBM PC XT, which consists entirely of IBM parts (even the memory board). It has a 10-megabyte hard disk, a 360K-byte floppy, 512K bytes of RAM (random- access read/write mem- ory), and a monochrome display. I used a Zenith Z-19 terminal (at 9600 bps) to exercise the multi- user features of each operating system. My printer is connected to the parallel port. All three systems sup- posedly work on many other hardware configura- tions besides a plain- vanilla XT, but I didn't try them on any IBM-compat- ibles or with other kinds of hard disks. These operating sys- tems are too complex for me to claim to have tested them thoroughly. In the few days I spent with each, I tested about 10 percent of their functions. With such a sampling, a defect gets emphasized more than it should in view of the overall capa- bilities of the product. Overview of Pick Pick is a special-purpose operating system designed to run the Pick data- base. In fact, when you use Pick you do not encounter the usual boundary [continued) Marc I. Rochkind is president of Rochkind Software Corp. (3080 Valmont Rd.. Boulder, CO 80301), which markets the business pro- gramming language RIDE. He is the author of Advanced UNIX Programming [Prentice-Hall, 1985). ILLUSTRATED BY LYNNE BUSCHMAN Fall 1985 BYTE- Inside the IBM PCs 231 MULTIUSER SYSTEMS between operating system and data- base system. For example, Pick doesn't have an operating-system command to list the files in a direc- tory. Instead, you use a data-manage- ment facility to list the entries in your account dictionary. Pick terminology is different, too: Commands are called verbs, records are called items, fields are called attributes, and so on. For anyone used to more traditional operating systems, the Pick approach seems strange. But after a day or so, I got used to it. To me, the most remarkable aspect of Pick is that it tends to have just one of each function or feature rather than several. It has only one text editor that edits source files, memos, data records, and dictionary entries. There's only one file type for data; an item can be a data record, in which case the fields have their usual mean- ing, or it can be a source program or document, in which case each field corresponds to a text line. Its unifor- mity of treatment and simplicity of design make the Pick system easy to understand once you master the basic concepts. They undoubtedly con- tribute to the efficiency and reliabili- ty of Pick as well. Internally, Pick implements a virtual computer in two senses. First, data and programs are accessed via a virtual-memory system that divides real memory into a large number of 512-byte frames. Data and pieces of program are moved between disk and real memory as needed. Second, pro- grams are compiled into Pick assem- bly language, which is not 8088 code but the code for a virtual computer implemented by an interpreter deep within the Pick kernel. This interpreta- tion is necessary for the virtual mem- ory to work because the XT lacks virtual-memory hardware. In addition, the interpreter protects users from in- terfering with one another. This is a problem with other multiuser operat- ing systems that run on the XT because the machine has no memory protection of its own. The Pick database is structured hier- archically as shown in table 1 . For fur- ther information on Pick file struc- tures, see "The Pick Operating Sys- tem, Part I: Information Management" by Rick Cook and John Brandon, Oc- tober 1984 BYTE, page 177. The flexibility of items, attributes, values, and subvalues lets you orga- nize data differently with Pick than in many other database systems. For ex- ample, in a medical office database you might have a patient record and an additional detail record for each visit. However, Pick can keep all the patient's data in a single item. It might have an attribute called, for example, Visit, and you could add an additional value with each visit. This organiza- tion is particularly easy to handle from within Pick programs because the entire item is read and written as a unit. You don't have to specify sizes when Table 1: The Pick database hierarchy. System dictionary _One per system; contains account names, passwords, and other administrative information. Master dictionary _One per account (user); contains a user-specific vocabulary of commands and the user's filenames, so it acts as a log-in directory. File dictionary Many per account; contains definitions of fields and relationships among them. Data file One or more per data dictionary; contains data. Item Many per file; contains data for one record, up to 32,767 bytes. Might be a data record, source program, etc. Each item has a unique ID. All Pick files are accessed by hashing. Attribute Many per item; corresponds to a field of a record, a line of text, etc. Value One or more per attribute; can be used to record multiple instances of an attribute (e.g., names of dependents). Subvalue One or more per value; similar to value but one level deeper. you allocate a file or define an at- tribute. Attributes have a length that is used for printing reports, but that length does not limit the amount of data that- you can insert. In fact, you can insert data into records without even defining the attributes. All good database systems allow some flexibili- ty in handling data, but few go to the extremes of Pick. The Pick database supports record locking but not transactions (a trans- action is a sequence of database up- dates that are to be kept atomic). If a program aborts before a transaction is completed, the partial changes re- main intact. There's also no transac- tion log to restore the database to its current state if a disk fails. You must make backup copies of the database at regular intervals, and if the data- base is lost, you will lose all updates since the last backup. This naive ap- proach to database recovery is stan- dard for microcomputers, but 1 ex- pected more from Pick. The Pick system comes with several major subsystems. The command pro- cessor (shell) is called TCL (terminal- control language). It's nothing spe- cial—it just processes commands a line at a time. ED is a line editor, not a screen editor. You edit using line numbers, and you can't see your changes in context unless you issue a list com- mand. After inserting or deleting a line, you can't do much else without getting a SEQN? message from the editor. You have to issue an F com- mand to make your updates active before you can proceed. It's bad enough that the Pick user has to struggle with a line editor, but this one is the worst I have ever used. The PROC processor is used to col- lect command lines, including those for interactive commands like ED, into stored procedures. PROC can be quite elaborate; it has features for I/O (input/output), branching, terminal prompting, and so on. You can think of the PROC processor as a command-level programming lan- guage, similar in concept but not in design to the UNIX shell. The query and report-generation 232 Fall 1985 BYTE- Inside the IBM PCs MULTIUSER SYSTEMS language is called ACCESS. It has facilities for selecting, sorting, adding and counting (with control breaks), and listing— the usual abilities that you expect to find in a sophisticated data- base system. You can operate on only one file at a time, so the system can't do a relational join. For example, if you have an employee-organization file and a sales file, in most cases you can't use ACCESS to answer queries like. "Who are the supervisors of the salespeople who did not meet their quotas?" An exception occurs when the item IDs in one file are the same as those in another; for example, if both the employee-organization and sales files used the employee ID as their item ID, one query can create an item list and the second query can use it for selection. If you use such queries, you must take considerable care in designing the database to en- sure that the item IDs are strategical- ly chosen. Pick has a rudimentary text format- ter called RUNOFF. When used with ED, it makes a good 1960s-style word- processing system. Finally, the one and only program- ming language for Pick is PICK/BASIC. This language bears little resemblance to the awkward Microsoft BASIC. It's actually a fine little language. Among the major features in PICK/ BASIC that aren't in Microsoft BASIC are typeless variables, strings up to 32,767 bytes long, subroutines with arguments, built-in database func- tions, multiline structured control statements, and no line numbers. You handle a database item by read- ing it into or writing it from a string variable. You can reference attributes, values, and subvalues by treating the string as a three-dimensional array. For example, if R holds a data item, then R<4,3,2> is a reference to the second subvalue of the third value of the fourth attribute. Such an expres- sion can appear on either side of an assignment statement. Installing and Using Pick Installation of Pick went smoothly. I booted the XT with the first disk, then followed the on-screen directions to load the remaining four disks. 1 didn't even have to create a partition on my hard disk; Pick automatically found an unused stretch of cylinders and made it the Pick partition. Therefore, if you also want MS-DOS or any other oper- ating system, you have to install Pick last. Pick is the only multiuser system I have ever seen that tells you how to wire the cable for remote terminals. Not only that, but the wiring diagram was correct. However, the list of sup- ported terminals is short and strange (e.g., the VT-100 isn't listed). The problem with the installation in- structions is that they stop after tell- ing you to insert the last disk. I was presented with a log-in prompt and had no idea how to respond. (I tried MARC and it didn't work.) After searching the manual for 20 minutes, I learned that I should log in as SYSPROG (Pick takes only upper- case). Then I was able to create an ac- count for MARC with the CREATE- ACCOUNT verb. Next I created a file named PGM and wrote a small PICK/BASIC pro- gram (painfully, with ED) into the item TST1 . When I tried to compile it with the BASIC command, I received a complaint about an invalid source for- mat. After more searching in the manual, I found a note in the file- structure section to the effect that in order to create a program file, I must use the editor to "change the D- pointer in the master dictionary to a DC-pointer." I had only a fuzzy idea of what this meant, but I was able to use ED to edit the master dictionary, find a D, and change it to a DC. I still don't know what this was all about, but it worked. I think the Pick people should have used their PROC lan- guage to supply a procedure called CREATE-PROGRAM-FILE. In the long run, problems like these don't matter. You get used to them and you forget how silly they are. But they frighten you when you're getting started and need all the confidence you can muster. You can boot Pick off the XT's hard disk. When it first comes up, it spends several minutes doing something called "verifying system nodes," dur- ing which time you can't use the XT's keyboard. However, the remote ter- minals are activated and you can use them right away. I don't know if modi- fying the database while it is being checked is safe. Pick can't read or write MS-DOS floppies, nor can it access the MS- DOS partition on the hard disk. To get to MS-DOS, you have to shut down Pick and boot MS-DOS. To get back, you have to reboot Pick and wait for it to verify those system nodes. I only used Pick for a few days, and I never tried anything really sophisti- cated. But it didn't crash, and I didn't find any bugs. My feeling is that it is very solid. Pick Documentation The Pick documentation is well writ- ten and full of helpful examples. From what I could tell, it's also accurate and complete. The manual has a good index, but it's hidden in the system maintenance section where novices are sure not to find it. A tiny tutorial section covers so little of Pick that 1 didn't find it useful. The Pick Systems people teach courses that show you how to use Pick effectively. The courses last a week and cost about $900 each. Since Pick is so different from traditional operating systems, these courses might be worthwhile. Pick Performance To get some feel for Pick's perfor- mance, 1 compared it to Revelation running under MS-DOS. Revelation (a product of Cosmos Inc., 19530 Pacific Highway S, Seattle, WA 98188. (206) 824-9942) is a single-user database system patterned on Pick. I ran a program that writes 3000 records of 1 50 bytes each to a file that is initially empty. {Editor's note: The bench- mark programs used in this article are available for downloading from BYTEne! Listings. Call (617) 861-9774 before November 1. Thereafter, call (617) 861-9764.| Each record has a 20-byte ID. When I created the file, I followed the recommendations in the Pick {continued) Fall 1985 BYTE- Inside the IBM PCs 233 MULTIUSER SYSTEMS The important features of Pick are very well designed. manual and determined that there should be 503 hash buckets. It took Pick 8 minutes and 20 seconds to run this program, and the resulting file consisted of 531,000 bytes. Revelation ran the identical program (except for a small syntax change to the OPEN statement) in 21 minutes and 58 seconds and created a file of 1,016,832 bytes. This file size includes lots of space for additional records, so it can't be compared to the file size for Pick. The times don't tell the complete story. During the Pick run, the disk light came on only now and then at the beginning, and then it blinked on and off steadily. During the Revelation run, the light stayed mostly on, and I could hear the disk seeking constant- ly. My disk had never had such a sus- tained workout. Don't interpret these results to mean that Pick is three times faster than Revelation/MS-DOS. They're based on only one program. I'm sure Pick is faster, but exactly how much I don't know. Also, bear in mind that Revelation has advantages over Pick: It's well in- tegrated into the MS-DOS environ- ment (you can read and write MS- DOS files, and you can execute MS- DOS commands from within Revela- tion), and many of its subsystems are better designed (there's a screen editor, for instance). It might make sense to develop your application under Revelation and then move it to Pick when it's ready for production use. Conclusions on Pick Many of the Pick operating system's less important features are badly designed, but its important features are very well designed, particularly its file structures and the PICK/BASIC language. Pick is simple and power- ful, and it seems to be efficient and reliable, too. It does exactly what it was designed to do. Pick merits careful consideration if you are planning to use XTs to run dedicated database applications. Because it works well as a multiuser system, it's probably the most cost- effective way to use an XT. Overview of Coherent Coherent appears to be nearly a clone of UNIX Version 7, an older release of UNIX that has since been replaced by System III and System V. I write "appears to be" because the Coherent manual doesn't say it is based on UNIX. The failure to men- tion UNIX has a practical disadvan- tage: No advice is given on how to port Coherent programs to the various UNIX versions, something that many Coherent programmers will want to do. As a UNIX clone. Coherent is amaz- ingly complete. It includes even ad- vanced features like yacc (a parser generator) and awk (a report- generation language), but it lacks many commands that are part of Ver- sion 7. Some major commands that are missing include f77 (FORTRAN), bas (BASIC), troff (typesetter format- ter), eqn (equation processor), tbl (table formatter), lint (C checker), uucp (file-transfer program), and plot (plot- ting program). There are also 1 9 other missing commands. On the other hand, Coherent in- cludes about 20 commands not pres- ent in Version 7, including kermit which substitutes for cu and uucp, and dos, which allows reading and writing of MS-DOS floppies (but not the MS-DOS hard-disk partition). Two screen editors, trout and elle, are based on EMACS. The difference between them wasn't clear to me (I used trout), but I was told by a technical-support person at Mark Williams that trout is easier to use and elle is more robust. In my opinion, either editor is far superior to the UNIX editor vi because they avoid the command-mode/insert-mode prob- lems that make vi a pain to use. For UNIX old-timers who want to get started in a hurry, the ed line editor is there, too. Some Coherent commands have the same name as their UNIX counter- parts, but they are not equivalent. For example, the Coherent nroff is much less powerful than the real thing. Of the 77 requests in the Version 7 nroff, only 3 1 are present in Coherent (the most useful 31, however). Coherent has all the Version 7 sys- tem calls except nice (which sets a process's priority), and they seem to be used in the same way. It should be easy to port C programs between Coherent and UNIX Version 7. Installing and Using Coherent Coherent's installation procedure is much less automated than Pick's. I was asked to make lots of decisions about the sizes of file systems without knowing exactly what the impact of my decisions would be. I was warned that the root partition of my hard disk would be overwritten, but the manual didn't define that term. Information about leaving disk space for an MS-DOS partition is at the end of a rather long installation section in the manual, where you might not see it until too late. You must install Coherent first, leaving some space for MS-DOS, and then use the MS-DOS FDISK command to create the MS-DOS partition. If you already have MS-DOS installed, you have to calculate cylinder numbers carefully when you install Coherent. You can't boot Coherent off the hard disk: you need to use a boot floppy. I doubt that most people who aren't XT and MS-DOS experts will be able to successfully install Coherent along with MS-DOS. But if you don't care about MS-DOS, you can just do the installation blindly and Coherent will take over the whole disk with suitable default values for the various file systems. The installation instructions don't tell you how to wire a cable for a terminal, but three wires seem to be enough (pin 1 straight through and 2 crossed with 3). Only VT-52 and Z-19 terminals are supported. There is no terminal-capabilities facility to sup- 234 Fall 1985 BYTE- Inside the IBM PCs MULTIUSER SYSTEMS port more terminals. Although Coherent is a multiuser system, you might not want to use it that way, at least for program develop- ment. The XT has no memory protec- tion, and it's easy for one user to bring down the whole system. However, if you're running only debugged pro- grams, multiuser access should be safe enough. You have to be careful when shut- ting down Coherent. You must kill the init process and then issue a sync command to flush the buffers to disk. Coherent has no shutdown com- mand, as do many other UNIX im- plementations, but you can write your own. I could read MS-DOS files off a flop- py disk easily enough once I figured out the proper name for the floppy device file. There are different names for single- and double-sided disks, and for 8 and 9 sectors per track. These names are not given in the dos command write-up, but in a separate write-up for fd. If you get stuck— and you probably will— you can call a toll-free number to get help. The support people were too busy to talk to me when 1 called, but they called back within a few hours and the person who called knew what he was talking about. After I installed Coherent, 1 played around with it awhile and became convinced that it's close enough to UNIX to qualify as a clone. If you sat a UNIX expert down at the keyboard without telling him or her that Coherent was running, he or she would think it was the real thing. Coherent didn't crash during the few days I used it, but I did have trouble accessing it from a terminal. The ter- minal would lock up after a while. From the console, I logged in as a superuser and killed the program I was running at the terminal; then the terminal came alive again. However, one time the shell was running at the terminal and I couldn't kill it (I sent it a true kill signal, not a software ter- mination signal). When you can't kill a process, it means the kernel has a bug. I don't think the problem was with my hardware, because I used the same terminal with Pick for many hours with no problems at all. Coherent Documentation Coherent comes with two fat binders full of beautifully typeset UNIX-style documentation. There are individual manual pages for commands, subrou- tines, system calls, and device files. Several major subsystems (e.g., nroff and trout) also have their own manuals. However, there is no manual on C and hence no information about sizes of types, signed/unsigned arithmetic, register variables, and assembler in- terfacing. A separate MWC86 user's manual is referenced, but it isn't sup- plied with Coherent. Most manual sections have separate indexes, and an index also covers the individual manual pages. The manual seems reasonably complete, accurate, and well written, but it would be un- intelligible to anyone who doesn't already know UNIX. Fortunately, many textbooks on UNIX can fill that gap Coherent Performance I ran five benchmarks to compare the efficiency of Coherent to PC/IX (a UNIX System III product from IBM). Some of these benchmarks were also run on MS-DOS and THEOS (see table 2). I had a problem with the program I used for benchmarks 4 and 5. This is a 2000-line, three-file C program that implements a B-tree access method. The Coherent C compiler failed to compile two of the three source files. These files had previously compiled successfully on five different C compilers or computers ranging from the XT to the VAX-1 1/780. One file caused a fatal compiler error with the message "no match, op = 65" and a dozen or so lines of debugging information that looked like a parse tree, one of the more interesting error messages I've seen. The other file caused the fatal error "more than 20 stores." I called the technical-support number and was told that in the first case a type cast I was using wasn't handled by the compiler, and in the second case the compiler ran out of registers. After changing the source a little, I was able to compile the files, and the resulting program ran correct- ly without further incident. Since most users of Coherent are likely to want it for C program devel- opment, the compiler's inability to handle perfectly legal C programs is (continued) Table 2: Benchmarks comparing THEOS, Coherent. PC/IX (UNIX System III), and MS-DOS. Times are in minutes and seconds. User time is the CPU (central processing unit) time spent executing instructions in the program itself; system time is the CPU time spent executing instructions in the operating system kernel on behalf of the program: real time is the total elapsed (wall clock) time. Test Shell program User (benchmark 1) System Real Random I/O User (benchmark 2) System Real Sequential I/O User (benchmark 3) System Real C compile and User link (benchmark 4) System Real B-tree install User and fetch System (benchmark 5) Real THEOS 2:55 8:57 Coherent PC/IX 19:24 3:58 3:25 1:24 28:33 9:22 1:44 0:39 0:20 1:28 2:35 2:28 4:42 1:40 1:05 0:59 7:22 3:20 3:52 6:32 0:32 0:33 5:20 8:05 0:52 0:43 0:19 0:20 1:43 1:27 MS-DOS 3:24 7:07 7:18 2:47 Fall IQ85 BYTE- Inside the IBM PCs 235 Inquiry 171 I B M / P C CROSS ASSEMBLERS MULTIUSER SYSTEMS We've been selling these industrial-quality assemblers to the development system mar- ket since 1978. They are now available for the IBM PC. FEATURES: • Fully relocatable • Separate code, data, stack, memory segments • Linker included • Librarian included • Generate appropriate HEX or S- record formatted object file • Macro capability • CPM80, MPM, ISIS versions available • Conditional assembly • Cross reference • Supports manufacturer's mnemonics • Expanded list of directives • 7 year free update Assemblers now available include: Chip Chip 1802/1805 NSC800 8051 F8, 3870 6500/01/02 Z8 6800/01/02 Z80 6803/08 9900/9995 6804 Z8O00 6805 68000 6809 6301 6811 8048/49/50/42 8085 65C02/C102/C112 Take advantage of leading-edge technology. Get your own Reims assembler today. Use your Mastercard or order by phone: (408) 265-5411 Relational Memory Systems, Inc. P.O. Box 6719 San Jose, California 95150 Telex: 171618 Prices subject to change without notice. Software distributor Inquiries Invited. Coherent is based on an obsolete version of UNIX, but the concepts are the same. disturbing. You can expect to have to mess around a little with C programs to get them to run. The technical- support people were familiar with the problems I was having, so perhaps the compiler will be improved in a later release. For the shell program (benchmark l), Coherent is much slower than PC/IX. I don't know why this is. The Coherent C compiler and linker was much faster than either the PC/IX compiler and linker or the Lattice C compiler and the MS-DOS linker, but since these compilers are different programs that produce different out- put, the time differences don't neces- sarily say anything about the speeds of the operating systems. Coherent is nearly as fast as PC/IX for the random I/O and B-tree tests (benchmarks 2 and 5), but these times are governed more by the hard disk than by the operating system, which can't help much on random I/O. Clearly, Coherent is slower than PC/IX, although the difference varies and might be insignificant for your ap- plication. If you're doing program development, the fast Coherent C compiler will be a boon. Conclusions on Coherent If you want to learn UNIX and you have some space on your XT, you should consider buying Coherent. The price of $495 is a bargain. Many of the details are different and it's based on an obsolete version of UNIX, but the concepts— the hardest part to learn— are the same. Coherent is probably a better C program-development environment than MS-DOS, but its C compiler needs improvement. Coherent is a weaker development environment than a complete UNIX system because it lacks tools such as lint and the Source Code Control System (SCCS). Coherent costs half as much as PC/IX and requires less memory. Al- though it is less complete and runs more slowly, it's a good buy. Overview of THEOS Oasis8 was probably the most sophis- ticated operating system for Z80- based microcomputers, light-years ahead of the much better known CP/M. THEOS is an extension of Oasis8 for 8088/8086-based ma- chines. It supports more users, more tasks, more RAM, and more disks, and it has more commands. Unfortunately, while THEOS offers many advantages over MS-DOS, it also has to compete with operating systems moved to the PC from the other direction: minicomputers. Ex- amples are Pick, Coherent, and, of course, UNIX. Roughly speaking, the functionality of THEOS is somewhere between MS-DOS and UNIX. The THEOS core system consists only of what can be properly called the operating system: the kernel and utilities for configuring the system, managing the printer, manipulating files, editing text, and executing com- mands. Programming languages, word processors, and database systems are extra. Each THEOS user is assigned a fixed memory partition up to 64K bytes in size. A program's data space is limited to what the partition can hold, but the instructions are located elsewhere. If two or more users are running the same program— a com- mon occurrence for multiuser appli- cations—they share the instructions. A user might be running a multitask- ing program that consists of a main task and one or more subtasks. The tasks can communicate through shared variables and they can coor- dinate their access via semaphores. There are no pipes or messages. Multitasking in THEOS is fairly re- stricted. A single user can't run a background task that is unrelated to a foreground task. For example, you can't compile some programs in the 236 Fall 1 985 B Y T E • Inside the IBM PCs background while you write a report in the foreground. To do that, you need two terminals so you can pre- tend to be two users. Another restric- tion is that one user's task can't com- municate with another user's task. And the command interpreter doesn't provide for multitasking at all (via a pipe operator like j); you set up multi- ple tasks only from BASIC or C. The multitasking printer spooling system seems to be an exception, but it isn't really. It actually runs as a separate user. The THEOS file system is a three- level hierarchy, but it's less general than that of MS-DOS or UNIX. A file- name can consist of three com- ponents separated by periods: the filename, the file type, and the library member name. Each component can be up to eight characters long. Al- though there is nothing that cor- responds to current directory, you can set various default libraries, such as link library and macro library. If you edit a file named, for example, Memo, the editor treats it as a member of the default macro library. If you want it to be a file in its own right, you have to use periods in the name. Each file has an owner. The owner can set the file to be accessible by everyone or only by the owner. Since you need a password to log in, this system is reasonably secure. There are separate permissions for erase, read, write, and execute. In addition to sequential and ran- dom I/O, the file system also supports a keyed access method. It has a mechanism for record locking, but a user can lock only one record at a time in a given file. This is inappro- priate for transaction processing, where you want to keep all your records locked until the transaction completes. Also, THEOS doesn't pro- vide other facilities needed for serious database management, such as auto- matic rollback of aborted transac- tions. Deadlock is possible, but I couldn't find any mention of it in the manual. I assume that the operating system doesn't detect it, let alone resolve it. (continued) LETTRIX™ Improves PC Printing With LETTRIX™ your IBM ProPrinter , Epson , OKidata , IBM Graphics , Star Gemini , or Panasonic printer can print proportionally-spaced and microjustified letter-quality text directly from all software . Be-fore: ABCDEFGHI JKLrlNOPQRSTUVWXYZabcdef After: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef LETTRIX™ resides in your PC's memory between your software and printer, responding automatically to spacing, paging, margins, boldfacing, underlining , italics, sub scripts and su P er scripts. Just print as you would normally... LETTRIX takes care of the rest! "The top of its class." PC PRODUCTS MAGAZINE "A fun program that is easy to use." PC WEEK "The sharpness and clarity nearly equals that of an expensive daisy wheel printer." — THE NEW YORK TIMES "Surprisingly low price." — BOARDROOM REPORTS You can design your own characters on any display, or use the twenty different typefaces included: Broadway, Courier, Old English, AirIL CD u 3u 3x Ax • 5 o-u/Q Franqais, Espanol, Italiano, Deutsch, PyccHH, 'EAXtivikos, .n9 n o? , nu7 13 x>v>~\u73. KJDnian7 imN "ON You can control LETTRIX features either by accessing a menu that pops-up over your current software, or by placing simple single-character commands in your text. For fastest delivery, charge LETTRIX to your VISA or MasterCard by dialing (800) 351—4:500, LETTRIX™ costs just 997 THEN 300 230 K = l + P 240 WHILE K< = 1000 250 F(K) = 260 K = K + P 270 WEND 280 P(C) = P 290 K(C) = K 300 C = C + 1 310 NEXT I 320 R = 1 330 FOR N = 1 TO 499 340 FOR 1 = 1 TO 1000 350 F(l) = 1 360 NEXT I 370 FOR J = 2 TO 168 380 P = P(J) 390 K = K(J)-1000 400 WHILE K<=1000 410 F(K) = 420 K = K + P 430 WEND 440 K(J) = K 450 NEXT J 460 R = R + 2000 470 FOR 1 = 1 TO 1000 480 IF F(l) = 0THEN 520 490 Q = R + I + I 500 PRINT Q; 510 C = C + 1 520 NEXT I 530 NEXT N 540 PRINT Q;"is the";C-1;"th prime and the largest less than 1,000,000" 550 END Listing 2: A modified listing, this program generates a million primes without overtaxing the microcomputer's memory. 100 DEFINT F-P:DEFDBL X-Z 110 DIM F(10000),K(550),P(550) 120 P = 2:PRINT P;:C = 2 130 FOR 1 = 1 TO 10000:F(I) = 1:NEXT I 140 FOR 1 = 1 TO 10000 150 IF F(l) = 0THEN F(l)=1:GOTO 220 160 P = I + I + 1:PRINT P; 170 IF P>4000 THEN 210 180 K=l + P 190 WHILE K< =10000:F(K) = 0:K = K + P:WEND 200 P(C) = P:K(C) = K 210 C = C + 1 220 NEXT I 230X = 1:Z = C 240 FOR N = 1 TO 799 250 FOR J = 2 TO 550 260 P = P(J):K=K(J)- 10000 270 WHILE K<=10000:F(K) = 0:K=K + P:WEND 280 K(J) = K 290 NEXT J 300 X = X + 20000 310 FOR 1 = 1 TO 10000 320 IF F(l) = THEN F(l) = 1:GOTO 360 330 Y = X + I + I:PRINT Y; 340 IF Z = 1000000# THEN 380 350Z = Z + 1 360 NEXT I 370 NEXT N 380 PRINT Y;"is the";Z;"th prime" 390 END one-millionth prime is likely to be. Kxiuth gives an approximate value for the millionth prime and it works out to be a number between 15,000,000 and 16,000,000 (see The Art of Computer Programming: Seminumerical Algorithms by Donald E. Knuth, vol. 2, 2nd ed. Addison-Wesley, 1981). The square root of 16,000,000 is 4000, so the largest prime should not exceed this. The 550th prime is 3989, the largest prime less than 4000. (You can verify this result with listing 1.) With this knowledge, I modified listing 1 to ob- tain listing 2, which generates a million primes as I promised. A few remarks about listing 2 may be in order. We now sieve 10,000 numbers at a time and the execution time for each loop is much longer. Also, listing 2 will need more memory to run, but this can be handled com- fortably by most 64K-byte microcom- puters. 1 used multiple statements in some lines to make the program look neater. One improvement is in lines 1 50 and 320, where the array variable F is reinitialized immediately after it has done its work. This will save some execution time. The efficiency of listing 2 could be further improved if we replace K = I + P with K = (P * P - l)/2, but this would involve other changes' and the program would no longer be as simple. While you can run listing 1 in interpreted mode, you'll be better off if you compile listing 2 (using the Microsoft BASIC compiler) to increase its execution speed. To test whether or not listing 2 runs correctly, you can delete the PRINT statements in lines 160 and 330 (and change the number 1000000 in line 340 to 78498) to see if it produces the same final result as listing 1. It may not be very important to know what the one-millionth prime number is, but it is certainly satisfy- ing to find out for yourself that it is 15,485,863. ■ 244 • Fall 1985 BYTE- Inside the IBM PCs a message to our subscribers From time to time we make the BYTE subscriber list available to other companies who wish to send our subscribers material about their products. We take great care to screen these companies, choosing only those who are reputable, and whose products, services, or information we feel would be of interest to you. Direct mail is an efficient medium for presenting the latest personal computer goods and services to our subscribers. Many BYTE subscribers appreciate this controlled use of our mailing list, and look forward to finding information of interest to them in the mail. Used are our subscribers' names and addresses only (no other information we may have is ever given). While we believe the distribution of this information is of benefit to our subscribers, we firmly respect the wishes of any subscriber who does not want to receive such promotional literature. Should you wish to restrict the use of your name, simply send your request to the following address. BYTE Publications Inc. Attn: Circulation Department, 70 Main St., Peterborough, NH 03458 Inquiry 229 Express Computer Presents: a DISKETTE SALE You CAN buy quality diskettes at low PRICES including a LIFETIME WARRANTY. SS DD .81 DS DD .90 minimum quantity of 50 diskettes TO ORDER CALL TOLL FREE: 800-437-5200 ask for operator 213 MD. residents call: 1-800-638-8890 (24 hours a day) Dealer Inquiries Invited Includes: * Box * Labels * Envelope * 100% Error Free * Lifetime Guarantee LIFETIME WARRANTY! Send defective diskette back and we'll replace it (if there is a defect in original material and workmanship). C.O.D. and prepaid orders accepted EXPRESS COMPUTER 1101 Valley Glen Rd. Elkins Park, PA 19117 9-TRACK MAG. TAPE SUBSYSTEM FOR THE IBM PC/XT/AT $ 4757 For information interchange, backup and archival storage, IBEX offers a 9-track, IBM format-compatible W magnetic tape subsystem for the IBM PC, featuring: ■ 42 M-Bytes on a single reel. ■ IBM format 1600 cpi. ■ Software for PC-DOS, MS-DOS. Write, phone or TWX for information IBEX IBEX COMPUTER^GOF 20741 MarillaSt. Chatsworth. CA 91311 (818) 709-8100 TWX: 910-493-2071 'KING OF THE ELECTRONICS JUNGLE" LEO ELECTRONICS Now that you have the best computer money can buy. . . UPGRADE WITH THE BEST! Dynamic Rams Eproms Math Co-processors 41256-150ns (256K) 2708 8087 80287 4128-150ns (128K-AT) 2716 Disk Drives 4164-150ns (64K) 2732 Tandon, Qume Static Rams 2764 Mitsubishi, Teac 6116P-3(2Kx8) 27128 Power Supplies 6264 P-3 (8K x 8) 27256 135V 150V OUR QUALITY IS THE HIGHEST! OUR PRICES ARE THE LOWEST! Please CALL or WRITE for pricing/brochure. LEO ELECTRONICS, INC. P.O. Box 11307 outside Calif. Torrance, CA 90510-1307 QnfkMOH QCCC Call', residents 213/212-6133 OUU/4^1 -yOOO Telex: 291 985 LEO UR Fax: 213/212-6106 TRY US ON ANY "HARD TO FIND" COMPUTER RELATED ITEMS. All major manufacturers. All parts prime.. All 100% guaranteed. Inquiry 91 Inquiry 1 1 1 Fall I985 BYTE- Inside the IBM PCs 245 Compare the Hercules Color Card to IBM's. Five reasons why the Hercules Color Card is better. 1. Compatibility 3. Size. 4. Flexibility. 5. Warranty. IBM Color Adapter $244 Runs hundreds of graphics programs. 2. Printer port. None. 13.25 inches. Limited to long- slots. Can't always work with a Hercules Graphics Card. 90 days. Hercules Color Card $245 Runs the same hundreds of graphics programs. "The Hercules Color Card is so nearly identical to the IBM Color/ Graphics Card that it's almost uncanny." PC Mag. Standard. Our parallel port allows you to hook up to any IBM compatible printer. 5.25 inches. Fits in a long or short slot in a PC, XT, AT or Portable. Always works with a Hercules Graphics Card by means of a software switch. Two years. Any one of these five features is enough reason to buy a Hercules Color Card. But perhaps the most convincing reason of all is just how easy the Hercules Color Card is to use: "Right out of the box, the Hercules Color Card goes into an empty expansion slot, ready for you to plug in . . . and go to work — no jumpers, no software. For most applications, it's just that easy." PC Magazine. Call 1-800-532-0600 Ext. 432 for the name of the Hercules dealer nearest you and we'll rush you our free info kit. jj i XXtJXC/UlCS* Inquiry 84 We're strong on graphics. Address: Hercules, 2550 Ninth St, Berkeley, C A 94710 Ph: 415 540-6000 Telex: 754063 Trademarks/Owners: Hercules/Hercules Computer Technology; IBM/IBM. INSIDE THE IBM PCs Top View IBM's long-awaited multitasking program makes its debut to BY TJ Byers TOPV1EW is a multitasking program that, for $149, enables your IBM Per- sonal Computer to install more than one program in the system. This is dif- ferent from the window programs that presently claim to accomplish the same thing. When work- ing with windows, you must quit a program before you can begin an- other. With TopView, how- ever, you don't have to quit either one of them. Both can be resident on the screen— and. more im- portant, in the micropro- cessor—at the same time. Multitasking TopView's multitasking capabilities allow several programs to run simulta- neously (see photo 1). This isn't the same thing as switching between pro- grams without quitting them; it means that you can actually have one pro- gram running in the back- ground while using an- other. Let's say, for exam- ple, that you need to calculate a large spreadsheet, and the job will take several minutes. Instead of staring idly at the screen while the computer crunches away, you can banish the spreadsheet to TopView's background mode and proceed to work on an- other program— the computer will handle both tasks at the same time. While one program is making calcula- tions in the background, the other can be receiving data from the keyboard. You lose no time waiting for one pro- gram to finish before you start the other. Multitasking is not a new concept. Mainframe computers have used multitasking for many years to enhance their performance. What is new, however, is putting multitasking capabilities into a personal computer. TopView brings multitasking to the IBM PC using a multiplex- ing technique known as time slicing. Basically, Top- View divides the micro- processor's time into slots during which it switches rapidly from one program to another. The time slices are very short, on the order of milliseconds, and the switching action is not apparent to either the ap- plication program or the user, so the programs ap- pear to be running con- currently on the machine. In actuality, they are pro- cessed consecutively in very quick order. The pro- cedure gives a single com- puter the ability to run more than one program at a time. Multitasking is not with- out its faults, however. While one program is be- ing processed, the others are held in suspension. Consequently, the pro- grams tend to run more slowly. The more pro- grams you have running at the same time, the slower each apparently becomes. A quick benchmark test using Top- View to conduct a simple word search of Writing Assistant on an IBM PC AT showed that it took a full 14 seconds to search a typical 3000-word file as (continued) TJ Byers is a freelance author of numerous articles and books, including Guide to Local Area Networks (Prentice-Hall). He may be contacted at POB 372, Hancock. NH 03449. ILLUSTRATED BY LONNIE SUE IOHNSON Fall 1985 BYTE- Inside the IBM PCs 247 T P V I E W TopView is very memory intensive. The minimum 2 56K RAM leaves you about 80K bytes for use by applications. opposed to 3+ seconds without TopView. TopView is also very memory inten- sive, as are all multitasking routines. While programs are in suspension between microprocessor access cycles, their parameters must be held in RAM (random-access read/write memory), This takes a lot of memory. IBM specifies a minimum of 2 56K bytes for TopView and recommends more for most applications. Installing TopView under PC-DOS 2.1 using min- imum memory (2 56K bytes) leaves ap- proximately 80K bytes of working memory for use by application pro- grams; PC-DOS 3.0 reduces that number to 68K bytes. This is not much memory when you start talking multitasking. To give you an idea of how memory intensive TopView can be, let me say that my IBM AT con- tains the full memory complement of 640K bytes. After installing Writing Assistant, a very hungry program re- quiring 232K bytes, and Filing Assis- tant into TopView, 1 have a mere 96K bytes of memory left, barely enough to take on another multitasking chore. Moreover, very large programs, such as Writing Assistant and dBASE 111, can't be run at the same time; there just isn't enough room for both. JBM solves the memory problem by modifying some application pro- grams. Writing Assistant, for example, can be reduced to 104K bytes, less than half its previous value, by using a routine that is outlined in the Top- View Application Guide. Unfortunately, it also reduces the capabilities of the word-processing program. Automatic save and retrieve are no longer available, and you have to enter these functions by hand. The program also runs considerably slower, which is a real nuisance if you happen to be a good typist. But then, that's a trade- off you have to make when using a multitasking program, whether it be TopView or any other. Using TopView TopView is not extremely difficult to use, but it does take some training and a bit of expertise, which you can pick up from the IBM TopView User's Guide. True to IBM form, however, the guide is not exactly the epitome of clarity. Although the guide is well organized, it sometimes glosses over very important points with a simple sentence or two. Unless you know what you're looking for, the point can easily be missed. For instance, I found difficulty in releasing the cursor keys from TopView control when I first started using the program. A call to IBM resolved the problem. Oh, the in- structions were there in the manual all right, just somewhat obscured by sur- rounding material. To help you learn about TopView, IBM has included an excellent tutorial disk. In fact, IBM recommends you study the tutorial carefully before pro- ceeding with the User's Guide— wise ad- vice, because the tutorial gives you in- valuable hands-on experience with the various attributes and functions of TopView, something that would other- wise take many hours of intensive reading before the concepts and pro- cedures became clear in your mind. Plan on spending at least an hour with the tutorial; it's loaded with material. Installation Installing TopView is probably the simplest chore the program lets you do. You just type G and hit Enter; a batch file boots the TopView com- mand program into the system. This is consistent with IBM's policy of using the same command to activate all its newly released programs. The TopView batch command is dif- ferent from other IBM programs, how- ever, in that it can include optional ex- tenders. If you wish to bypass the welcome window, for example, and go straight into the program, you use the entry code g /a to initiate TopView. Al- together, there are 18 optional ex- tenders that can be used to modify TopView operations. Most of these ex- tenders either specify or modify the monitor and/or its screen format. A couple suppress certain routines, like the welcome window, and one (k) assists with the installation of un- disciplined non-IBM programs into the TopView environment. Once inside, you control TopView using a combination of windows and menus. This programming concept combines the advantages of menu- driven programs, which are normally keyboard controlled, with the conve- nience of icons. Although TopView has no icons, its menu entries act like icons. Unlike real icons, though, which are rigidly defined entities, the menu entries can be changed. Items can be added or deleted at will, and there is no limit to the type of application pro- grams you can include, provided they are TopView-compatible. More on that later. You install application programs into the TopView environment by ma- nipulating a pointer inside the window until it overlaps the desired program title on the main menu. The pointer can be moved using the cursor keys or with a mouse. Once you have selected a program, a single keystroke (or mouse click) loads the program into TopView. You can load as many programs into TopView as your mem- ory will support, and all active pro- grams may run simultaneously. Application programs are installed into TopView using a strict set of rules, and defining these parameters is no easy chore. You must specify no less than eight factors and up to a dozen more for certain applications. To facilitate the process, IBM provides you with a program menu containing 38 predefined programs (see photo 2). These programs, which include DisplayWriter and VisiCalc, have their values already established, and you can place them on the TopView pro- gram menu by simply placing the pointer over the desired program and completing a simple TopView menu Fall 1985 BYTE- Inside the IBM PCs T P V I E W routine. You are prompted every step of the way, and the table makes pro- gram additions very convenient. Once installed, the program remains in the menu until you remove it, so you don't have to go through the routine every time you start up TopView. When including other application programs for which IBM has not pro- vided predefined parameters, how- ever, you have to enter the values yourself. IBM assists you in this by in- cluding with TopView a rather thick TopView Application Guide, which lists the parameters for 88 prominent software manufacturers and 350 software pack- ages. The listing includes such popu- lar programs as Framework, CrossTalk, and Lotus 1-2-3, among others. To in- stall one of these programs you sim- ply look at the printed information table and duplicate it. For all programs, you need to specify both a pathway to the pro- gram and the program command that activates its files. When doing this you must be aware that TopView does not support batch files and therefore does not recognize batch-file com- mands. If you try to use the g com- mand to start an IBM program, for in- stance, you will be in for a surprise. Much to your dismay, the machine simply locks up and goes bye-bye. Only a machine restart can correct the problem, which is too bad if you have files in progress that haven't been saved before the incident occurs. I suspect IBM did this on purpose to avoid DOS (disk operating system) conflicts. You see, TopView does not support all PC-DOS commands and supports none of the enhanced PC- DOS 3.0 commands. If you were to ini- tiate a batch file that contained a com- mand that TopView couldn't execute, it's hard to say what might happen. To avoid the issue altogether, TopView simply doesn't support batch files. TopView Attributes The DOS commands that TopView does support, however, are available in a DOS Services file (see photo 3). This window lets you execute PC-DOS commands from within TopView, and although the command list is abridged, what remains can accom- plish quite a lot. Altogether, TopView supports 23 DOS commands, 6 as selectable-word "icons" and 17 in a regular menu (you have to type these in). They include COPY and ERASE, among others, and a rather compre- (conlinued) Photo I : TopView s multitasking features let you run simultaneous applications. This photo shows BASIC and TopView's Calculator program running at the same time. Photo 2: TopView's Add a Program utility contains the installation parameters for 38 programs, \nstalling these programs involves simply placing the cursor over a name and hitting a key. Fall 1985 BYTE- Inside the IBM PCs 249 T P V I E W hensive SORT command. The purpose of DOS Services, of course, is to let you step in and out of PC-DOS without having to leave TopView. IBM also claims that the icon-generated commands make PO DOS easier to use by eliminating the lengthy DOS equations. I don't find this to be true. In some cases, it would be faster to just enter the equation, rather than having to dole out the in- structions through three windows. The most useful TopView DOS com- mand is undoubtedly PRINT. In its new enhanced form, PRINT allows you to print files in the background while you exit DOS and proceed with other TopView routines. Moreover, PRINT contains a file buffer that per- mits you to specify the printing of more than one file at a time; file- names are queued one after another, and wild-card entries are legal. If you request a PRINT C:*.*, for instance, TopView would type out the entire contents of your hard disk, which, may contain hundreds of files, while you busy yourself with other duties. The full impact of this accomplish- ment is somewhat marred by Top- View's lack of support for a serial printer. Unless your application pro- gram contains a serial-printer function and you are working from that pro- gram, you are limited to parallel printer interfaces. Perhaps this defi- ciency will be corrected in later ver- sions of TopView, but I doubt it. With fewer and fewer new serial printers ap- pearing on the market, IBM may have simply decided the extra program- ming and memory buffering required is not worthwhile. Among the attributes particular to TopView are SCROLL, COPY, CUT, and PASTE. Although these are fea- tures commonly found in most word processors, TopView has extended their capacity to include interaction between programs. TopView lets you work between the programs, transfer- ring data and files as you wish. If, for instance, you want to transfer an ad- dress from a database file into a word- processing program, you can do it using the SCISSORS command, pro- vided the two programs contain the TopView SCISSORS subroutine. Presently, only IBM software contains these routines, and not all IBM pro- Photo 3: Under TopView. you use the Start a Program menu to begin applications and utilities. One utility. DOS Services, lets you use DOS commands by choosing from a menu (6 commands) or entering from the keyboard (17 commands). grams at that. But IBM has already released a TopView Programmer's ToolKit that contains most of the Top- View subroutines on two disks, so I suspect it won't be long before we begin seeing TopView-compatible software from third-party vendors. Software Compatibility Installing a couple of TopView subrou- tines into a program doesn't neces- sarily make it TopView-compatible. Programs that manipulate DOS or the BIOS (basic input/output system) routines won't work with TopView. Neither will programs that rely on precise timing cycles for their opera- tion (because of the way TopView slices up the microprocessor's time) or software that loads at a specific memory location. Memory control must be the absolute domain of Top- View if it is to function at all. Programs that directly control computer hard- ware (other than the keyboard or communications port) are strictly taboo. And certain interrupt calls are also not allowed. CopyllPC, for exam- ple, is not TopView-compatible, because of the way it modifies the in- ternal workings of the computer. And although I haven't had a chance to test Flight Simulator on TopView, I doubt it will work for many of the above reasons. Some copy-protected programs also have a hard time with TOpView. Often the problem is getting the program to load into the TopView environment, a problem caused by the copy-protec- tion scheme itself. This is especially true of programs like SideKick that use "fingerprints" to prevent un- authorized use. Even when such a program is copied to the TopView pro- gram, the disk must remain resident in the A: drive for access to the finger- print. Writing Assistant also works this way. Unless you have the correct disk in the drive at exactly the moment the program expects it (or if the program's timing cycle is a little bit off), the com- puter shuts itself down. And despite IBM's claim that the effects of this ac- tion are nondestructive, it isn't necessarily so. Sometimes a warm boot (hitting Ctrl-Alt-Del) can recover 250 Fall 1985 BYTE- Inside the IBM PCs T P V I E W the system, minus the files, but in many cases a complete machine re- start is the only recourse. The difficul- ty in loading copy-protected material can sometimes be resolved by sus- pending all TopView application pro- grams while the new program is load- ing. Communications programs are an- other tough nut to crack. Many of the public-domain communications pro- grams simply won't work due to the time-slicing effects of TopView. Only communication protocols with a pac- ing mechanism are recommended for asynchronous communications. This will ensure that no data is lost because of unavailable time slots. A few examples of pacing-mechanism protocols are XON/XOFF, XMODEM, and Kermit. Kermit, by the way, can be found in the public domain. What is TopView-compatible, then? lust about any program that runs in PC-DOS and is not limited by the con- ditions mentioned above. There are many such programs. Nearly all IBM software is TopView-compatible, as are many of the most popular non-IBM software packages, such as dBASE II, Electric Desk, ProKey, and WordStar. A rather notable exception among this elite group is IBM's Debug, which is not TopView-compatible. Overall, though, you will find that most soft- ware written for the IBM PC is TopView-compatible. IBM has gone to great lengths to guarantee that whatever runs on PC-DOS should run in TopView, though some of TopView's attributes may not be available to all programs. Even networking programs, like Telmar's MicroNetwork Service 5.0, can be used within TopView's en- vironment. You have to be a little careful, how- ever, of how you set up your applica- tions. Programs that run under inter- preted or compiled languages, for in- stance, often change the software interrupt vectors. Running more than one such program under TopView can cause both to look into the same memory space for program informa- tion. The result is competition be- tween the programs. The same con- dition can occur with two programs AT A GLANCE Name TopView Type Multitasking environment Manufacturer IBM POB 1328 Boca Raton, FL 33432 (800) 447-4700 Computer IBM PC, XT, AT (and compatibles) with 256K minimum, 640K and a hard disk preferred; requires PC- DOS 2.0 or higher Documentation Loose-leaf manual in a standard IBM binder along with two application guides and a Quick Reference foldout Warranty 90-day limited warranty on the program itself; the warranty states that if a customer finds a program defect, IBM will correct it or refund the customer's money Price $149 that open files using the same file- name. You can resolve the conflict, in many cases, by installing the pro- grams in different directories so that each program has its own unique file path. TopView Utilities IBM has installed its own utility pro- grams in TopView. Version 1.00 incor- porates four of them, including DOS Services, a functional alarm clock (which lets you set up to five alarms within a 24-hour period), and a Color Change Program. This last utility allows you to specify colors for the background, foreground, and window borders. My favorite utility, though, is the TopView Calculator. The calculator itself is nothing special— you can get the same thing at the supermarket for about five bucks. But the TopView Cal- culator is always handy and its bat- teries never go dead, which always seems to be the case with the half dozen or so calculators I have scat- tered about. The calculator does all of the stan- dard mathematical functions like add, subtract, multiply, divide, percentage, squares, and square roots. It even has a memory. You can enter data into the calculator in any of several ways. If you use a mouse, you can roll it around until the cursor is over the desired "key," then click. You can also move the cursor with the cursor keys, which is quite a chore— it takes at least three keystrokes to move the cursor one calculator button. Fortunately, the calculator will accept input from the regular keys and the numeric keypad. You can execute math functions from either the regular keyboard or the function keys. Unfortunately, IBM forgot to put a function-key template into the TopView package, so unless you memorize the functions, you will always be looking up their definitions. This is not hard, since the calculator includes a very comprehensive help menu (as do many TopView programs) that fully outlines all calculator opera- tions and options. Like so many other IBM introduc- tions, TopView may very well set new standards for the computer commu- nity. Beyond its computer-based im- plications, IBM has introduced a unique feature: It sells TopView with a limited 90-day warranty. This means that if within 90 days of purchasing it you find a defect in the program, IBM will correct it or refund your money. Conclusion TopView is a very sophisticated and potentially useful program. It has its problems, such as its voracious ap- petite for memory and the difficulty or inability of incorporating some ap- plication programs, but TopView's in- novative multitasking features, its very attractive price tag of $149, and the limited 90-day program warranty will attract a lot of takers. ■ Fall 1985 BYTE • Inside the IBM PCs 251 jjPNMe, ■^ . ^ I To 27 million Americans, this scene is a fairy tale. That's because 27 million American adults can't read a child's bedtime story, can't read a street sign, can't read... period. Functional illiteracy has' become an epidemic, an epidemic that has reached 1 out of 5 American adults. It robs them of a decent living, it robs them of self-respect, it robs them of the simplest of human pleasures... like reading a letter from a friend or a fairy-tale to their children. Tragic as that is, it's not the worst part. Because people like this could be taught to read, if we had more tutors to teach them. Sadly, we don't. Today, the waiting period for a tutor can be up to a year. You can change that by joining the fight against illiteracy yourself. It takes no special Coalition for Literacy qualifications. If you can read, you can tutor or help us in countless other ways. You'll be trained to work in programs right in your own community. And you'll experience the greatest satisfaction of all... the satisfaction of helping people discover whole new lives. So join the effort. Call the Coalition for Literacy at toll-free 1-800-228-8813. Helping takes so little. And illiteracy robs people of so much. Volunteer Against Illiteracy. The only degree you need is a degree of caring. INSIDE THE IBM PCs When Your PC Doesn't Work You can find and fix most malfunctions yourself by Gene B. Williams WHEN YOU BUY an IBM Persona] Computer, you get two diagnostic aids to help you spot many of the possible causes of malfunctions. First, each time you turn on the power, the PC goes through a self-testing cycle called POST (power-on self-test). And, second, there is a diagnostics pro- gram in the back of the Guide to Operations manual that provides more exten- sive testing of the various systems, circuit boards, and peripherals on your computer. The major difference be- tween these two diag- nostic aids lies in the ex- tent of the testing per- formed. The IBM folks did not include sufficient in- structions on how to use the aids, nor did they pro- vide simple error mes- sages. There are no mes- sages like "I think your RAM [random-access read/write memory| is bad." Instead you see a string of numbers like "0340201." Once you understand how to decode the string, however, you'll find that it tells you not just what is malfunctioning, but where. Both POST and the diagnostics program generate the same codes. So, once you know the decoding procedure for one, you know it for both. These two methods of testing, cou- pled with some simple steps and com- mon sense, tell you exactly what has gone wrong and where, for about 95 percent of all malfunctions. Chances are good that you can find and fix what appears to be a major failure with little more than your fingers. In- stead of spending hours of downtime, and perhaps hundreds of dollars, you can usually do the job yourself in a few minutes. This article covers all of the basic steps. For more information, see my book How to Repair and Maintain Your IBM PC (Chilton Book Co., 1984). POST Each time you flip on the power switch to the IBM PC, POST runs a quick check on the major sys- tems inside. This testing takes from a few seconds to about three minutes, depending on how much RAM you have. During this time, POST conducts quick tests on the system board, RAM, power sup- ply, keyboard, external chassis (if you have one), and some of the adapter cards. During this testing cycle, nothing shows on the screen, nor is there any indication that any- thing is happening (except for the delay) unless POST finds a malfunction. Then, it signals you with error codes and/or audio signals. A part of any diag- nostics aid is knowing how things are supposed to work. After you become accus- tomed to using the PC, you can easily forget the exact se- quence of beeps and grinds it makes as it boots up. This is important to (continued) Gene B. Williams is a professional writer and the author of the series, How to Repair and Maintain Your . . . (IBM PC, Apple, VCR, Kaypro, Macintosh). His other in- terests include the martial arts and ham radio. He can be reached do BYTE, POB 372, Hancock. NH 03449. ILLUSTRATED BY DIANE TESKE HARRIS Fall 1985 BYTE- Inside the IBM PCs 253 FIX YOUR OWN PC know; however, without these sounds you are less likely to realize when something malfunctions. For example, one day when you sit down at your PC, just before the pro- gram begins to load, you hear a long beep and then a short one. You might recognize this as being something dif- ferent from the norm or you might not. If the program loads successful- ly, you're quite likely to ignore the warning— only to lose all your work a few hours later when the PC locks up or refuses to save your work due to a system-board malfunction. The next time you begin working at your PC, pay attention to the sounds of the normal boot sequence. Then, Here are 87 reasons to buy at Elek-Tek, not to mention the fastest delivery anywhere. L-WIEGA BERNOULLI BOX 1. 10 meg Vi height Drive for IBM-PC/XT/AT & compatibles $ 1675 2. 20 meg Vs height Drive for IBM-PC/XT/AT & compatibles 2335 3. Non-Bootable Interface Card 104 4. Bootable Interface Card .234 5. 10 meg cartridges for above (3 pak special) 125 23. Amdek310A Amber Monitor $ 150 24. Generic Mult! Multifunction Board, 64K. . .129 25. Generic Multl 384K Multifunction Board. 384K . .169 26. AST Six Pak + Multifunction Board, 64K . .225 27. AST Six Pak + (loaded) Multifunction Board. 384K . . 279 28. AST Megaplus II Multifunction Board, 64K. . .270 29. Quadram Quadboard Multifunction Board, OK . . . 195 30. Quadram Quadboard Multi. Board, 64K/384K . .210/267 Saue 30% to 43% off Manufacturer Suggested Ret. prices on EPSON • OkJdata • Star • DIABLO • TOSHIBA • COMREX • EPSON LX80 % 215 RX 100+ 350 FX 85 340 FX 185 475 LQ 1500 parallel CALL DX10 Daisy Wheel 10CPS . . .230 0X20 Daisy Wheel 20CPS . . CALL Comrex II Comriter 269 STAR SG 10 235 SD 10/15 CALL SR 10/15 CALL OKI Oki 182 CALL Oki 192/193 CALL Oki 84 CALL EPSON FX85 TOSHIBA 20. Toshiba P341 CALL 21. Toshiba P351 CALL 22. Toshiba P1340 CALL PRODUCTS FOR IBM-PC 31. Orchid Tech. PC Turbo 186 570 32. Paradise Modular Graphics Card . . .290 33. Hercules Monochrome Card 329 34. Hercules Color Color Graphic Card 170 35. Novation 490605-1 240OBPS inc. Mite Software .620 36. Novation 490603 Ya Card Modem 2400 BPS No software 425 DISKETTES 37. Novation 490603-1 As above inc. MS-DOS Software . , 490 38. Hayes 1200B Internal modem w/software .359 39. AT&T 4000 300/1200 Ext. Modem 335 40. Hayes 1200 External modem 399 41. Hayes 2400 External modem 599 42. US Robotics Courier 2400 ExL 2400B Smart Modem ... 460 43. US Robotics Telpac Telecomm, Software 75 44. TEAC FD55B >/2 ht. DSDD Disk Drive 90 3'/!" SSDD ODyWtl niaxBll 3M SONY vMbaatt MEMOREX 2500 25.00 2500 2500 20.00 DSDD 30.00 37.00 37.00 37.00 24.00 5V<" SSDD 16.00 14.00 14.50 1300 11.50 11.50 DSDD 20.00 18.00 18.00 mOO 12.50 14.00 SSD096TPI 24.00 24.00 24.00 DSOD96TPI 29.00 29.00 29.00 5V." DSDDHD 3500 39.00 40.00 24.00 {For IBM AT) 8" SSDD" 22.00 29.00 2500 19.00 8" DSDD" UiifoniiatlBd 26.00 32.00 29.00 20.00 — Call for Quantity pricing lor 10 boxes or more. 3M DATA CARTRIDGES 85. DC100A $ 14.00 87. DC300XL $ 21.00 89. DC60OA . . S 23.50 86. DC300A . . 18.00 88. DC300XL/P 22.00 90. DC1000 Call for Quantity pricing for 10 cartridges or more. 15.00 CALL TOLL FREE 800-621-1269 EXCEPT Illinois, Alaska Corp. Accta. Invltad. Mlrt. Ord. J15.0O. V P.R., Canada add S10.00 ffrwt Item) $1.00 Daloctlvei Only: Moat product* roplncoc (within 3 work days ol delivery). Othar p led to availability. DUNS M09-710-OS17 sa or MeeterCerd by Mall or Phono. Mai Caahl.r'a Check, Mon. Ord.. Personal Chock (2 wk.. lo claar) Add 14.00 lat Item. (AK, HI. ea. add'l .hpg. a, handl. Shipments to IL address odd 7% but. Prices eubj. to change. WRITE tor tree catalog RETURN POLICY: within 30 daye ol purohaee with Identical merchandlee only. Computer end large peripherals replaced only when detective on arrival reclame covered by mfr werranty. ALL ELEK-TEK MERCHANDISE IS BRAND NEW. FIRST QUALITY AND COMPLETE. Delivery sub- PI P 4/.TCU ; 6557 IM. Lincoln Ave , Chicago, IL 60645 • UlC, [312] 631 7BOO (312]677 76GO cue f\ 1 fcT\ make paying attention a part of your normal routine. At the very least, let yourself become aware that some- thing other than the norm can happen. When everything works correctly, the cursor begins blinking on the screen a few seconds after you turn on the power. It continues to blink during POST. The light on drive A comes on, there is a single short beep, and the LED (light-emitting diode) goes out momentarily. When it comes on again, the program loads. Anything other than this sequence in- dicates that there is a problem. The original plans for the IBM PC in- cluded a cassette-tape machine to load and store programs. Although the idea was abandoned almost im- mediately, the cassette port remained. So did a form of BASIC resident in ROM (read-only memory) to operate the cassette. So, if you're attempting to load a program and you suddenly find yourself staring at a BASIC screen, drive A isn't loading the pro- gram. ROM has taken over and has automatically booted up cassette BASIC. Try loading another program, and carefully observe the sequence. As the program loads, you should hear the drive's stepper motor moving the read/write heads across the disk. If the drive is trying to load but can't for some reason, the cassette BASIC will load from ROM. POST Errors Table l contains all the primary error codes, signals, and symptoms gen- erated by POST. An x in the code rep- resents any number. For example, "xxxx20\" won't appear on the screen with the xs, but with numbers, such as "0340201." This code indicates a problem with the RAM (the "201" ending), and it also tells you that the program found an error in the second RAM module from the right on the front row (the "0340" prefix). A few of the indications given are not strictly a part of POST but are common enough symptoms at power- up to warrant mention. The "nothing happens" symptom, for example, is not a generated error code, nor is the 254 Fall 1985 BYTE- Inside the IBM PCs Inquiry 54 FIX YOUR OWN PC cassette BASIC display. Yet both are strong indications that something is wrong. Some of the error signals are audible beeps. These may or may not be accompanied by actual error codes. If you have either an error code or a symptom, you should use the diag- nostics disk, which checks the system more thoroughly. If the PC won't load the diagnostics program, there are some initial steps that you can take. Most of these are self-evident. If nothing at all happens when you flip on the power switch, most likely no power is getting to the PC. The actual problem could be anywhere. The wall outlet might be dead. The cord might have been accidentally kicked out. The power supply inside the PC could be faulty. Or something deeper inside the PC could be shorting out, caus- ing the power supply to drag down and shut itself off. Diagnostics Disk One mistake many people make is to use the diagnostics program only when a malfunction occurs. This is somewhat like going to the doctor only after you're seriously ill. You should use the diagnostics program as a preventive check. If something is starting to fail, the program might spot it before it becomes a serious problem. If you use the diagnostics program on a regular basis, you'll have a better idea of how things are operating. The diagnostics disk that comes with your PC does a more thorough testing of your computer and its systems than POST does. It also offers the option of running multiple test- ings. This is very important when it comes to testing circuits and IC (inte- grated circuit) modules. Unlike less complex components that either func- tion or fail, a chip can work fine, then it can fail and then work again. A chip is also more prone to operate correct- ly while it is cool and then break down after the PC has been going for a while. POST or the single-testing op- tion of the diagnostics program are less likely to spot such malfunctions. The multiple-testing option of the diagnostics program should be used to detect such problems. If you suspect that one of the circuit boards is faulty and if you suspect the system board in particular, choose the multi- ple-testing option. You should let the test run a minimum of 30 times, pref- erably more. To run the diagnostics program, in- sert the disk in drive A and reset (reboot) the PC (by Ctrl-Alt-Del or by shutting it off, waiting 5 seconds, and turning it on again). The normal se- quence of beeps and grinds should occur. After POST completes its cycle, the light on drive A should come on, followed by a single short beep, and then you will be able to hear the grinding of drive A as the program loads. As testing begins, you may log any errors to disk. The log itself can be kept only on the diagnostics disk; however, if you choose this option you cannot cover the write-protect notch. Obviously, to log errors to disk, your PC and its disk drives must be running well enough to be able to write to the disk. You can also log the errors to a printer, which is how I prefer to do it. This frees the disk drive and allows you to let the testing run unattended. As the diagnostics program ex- ecutes, it tests the disk drives. When it's ready to run the test, it stops and signals you with a long beep and then If nothing at all happens when you flip on the power switch, most likely no power is getting to the PC The actual problem, though, could be almost anywhere. a short one so that you can replace the diagnostics disk with a scratch disk. (The reason a scratch disk is needed is because the testing destroys any data on the disk.) If you've installed additional RAM as one or more RAM drives, you will get errors on these drives. This portion of the diagnostics program tests physical drives only. (The RAM chips are all tested earlier in the program, regard- less of their function.) Diagnostics Errors Table 2 lists the primary error codes, signals, and symptoms generated by the diagnostics program. The primary {continued) Table 1 : POST error signals and codes. SIGNAL OR CODE Nothing happens Continuous beep Repeating short beeps 1 long beep, 1 short _ 1 long beep, 2 short _ No display. Cassette BASIC display 101,131 201 xxxx201 and Parity Check x Parity Check x 301, xx301 601 , 1701 1801 MEANING _Power supply or ? .Power supply .Power supply .System board .Monitor .Monitor .Disk drive (usually A) .System board .RAM .RAM .Power supply .Keyboard .Floppy-disk drive .Hard-disk drive .Expansion chassis Fall 1985 BYTE • Inside the IBM PCs 255 FIX YOUR OWN PC If there's no display and you must resort to the audio signals alone, move cautiously. difference between these and those given by POST is that the diagnostics program generates a code even when a particular system or circuit is oper- ating properly. POST does not. This successful-completion code ends in all zeros. (For example, when the sys- tem board successfully completes testing, a 100 code is generated, while properly operating floppy-disk drives Table 2: Diagnostics program codes. CODE 02x 1xx 20x _ xxxx xx20x . 30x _ xx30x . 4xx 5xx 6xx 7xx 9xx 11xx_ 12xx 13xx_ 14xx 15xx 17xx_ 18xx_ 20xx 21xx_ MEANING Power System board .RAM . RAM RAM Keyboard . Keyboard , Monochrome monitor . Color monitor . Disk drive . 8087 math coprocessor . Printer adapter . Asynchronous communications . Asynchronous communications . Game adapter . Printer . SDLC communications . Hard-disk drive . Expansion chassis . BSC adapter . BSC adapter Table 3: Diagnostics disk audio run-through. 1. Power is applied; cursor should blink during POST; short beep] program loads. 2. "Select an Option" screen (0— run diagnostics routines, 1— format disk, 2— copy disk, 9— exit to system disk); enter "0" for diagnostics routines. 3. "Installed Devices" screen; beep; enter "Y" 4. "Diagnostics Choices" screen (0— run tests one time, 1— run tests multiple times, 2— log utilities, 9— exit diagnostics); enter "0" or "1"; program now proceeds through tests for the system board and RAM, and there will be a delay of up to several minutes; this delay will be followed by a short beep. 5. "Typematic" (keyboard test) screen; press Enter; short beep. 6. "Display Attributes" screen; enter "Y"; short beep. 7. "Character Set" screen; enter "Y"; short beep. 8. "80x25" display; enter "Y"; short beep. 9. "40x25" display; enter "Y"; short beep. 10. "320x200 Graphics" display; enter "Y" 11. "640x200 Graphics" display; enter "Y"; enter "Y" 12. Long beep-short beep signals beginning of drive tests. Insert scratch disk in drive A; press Enter; drive LED will light and drive will grind; two beeps; enter "Y". 13. Repeat step 12 for each drive installed (long beep, short beep, scratch in B, Enter, LED lights, grind, beep beep, enter 'Y' 1 ); ignore results on RAM drives. 14. Short delay and a single short beep signals the end of a completed cycle. short beep. press any key eight times, short beep; give a 600 code.) Audio error signals are also pro- vided, making it possible to run com- plete diagnostics even when the monitor is dead. The order of the tests and screens that are supposed to appear are given in the Guide to Operations manual. However, this doesn't include a key to the audible signals. It's a good idea to run the diagnostics program before you suspect any problems and make ap- propriate notes about the meanings and occurrences of these signals in your manual. If your monitor is not displaying anything and you must resort to the audio signals alone (see table 3), move slowly and cautiously. Pay extra attention to what happens and when. If you lose track or doubt what is hap- pening for any reason, begin again. Finding the Malfunction Tracking down a malfunction isn't as difficult as you might think. It requires little more than the process of elimi- nation, lust where you begin your search depends on the symptoms. It is usually fairly obvious where to start looking. There are just so many prob- lems that can occur and just so many causes for a particular malfunction. The process of elimination begins with the simple and the most obvious and then moves in a step-by-step order to the more complex. For ex- ample, if your PC is completely dead, start from the outside and work in. Check the wall outlet; plug something else into that outlet, such as a lamp, or use a volt-ohmmeter (VOM) to test the outlet. And check for the obvious— is the plug properly inserted into the outlet? Next, eliminate anything else out- side the PC, including any switches. If your computer is plugged into a power strip or another external device, by- pass it, and plug the machine directly into the outlet to see if the problem lies in that device. (The internal switch on the PC almost tests itself. If the fan is running, power is getting to the computer and the switch is good. If the fan isn't running, then power isn't getting to it, due to either a lack of 256 Fall I985 BYTE- Inside the IBM PCs FIX YOUR OWN PC power or a faulty switch.) After eliminating everything up to the power supply as the possible cause, try to find out if the problem is coming from the power supply or from somewhere else in the com- puter. You can do this best by testing the power supply outputs with a VOM. Or you can disconnect every- thing inside the PC, including all the circuit boards. If the power returns, you know that one of the connected devices caused the problem. Then connect the devices again, one at a time, until the power fails. (Be sure to shut off the power before removing or connect- ing anything!} The same basic procedure applies to other malfunctions. Set up an either. . .or sequence. Find out what is not malfunctioning and then you'll know what is. For example, if a pro- gram fails to load, the problem is with either the disk drive or the program. If the drive is failing, the cause is prob- ably either the drive itself or the cir- cuit boards in the computer. (With disk-drive problems, you can swap drive A with drive B. If things begin to work again, you know that some- thing is wrong with drive A. If not, then the problem lies with either the drive card or the system board.) Probable Causes The single most common cause of computer malfunction is operator error. You may have accidentally kicked out the plug or turned the con- trast or other controls on the monitor. Operator error is often the last thing suspected or checked. Checking for the obvious and possible operator errors are always the first steps to take in tracking down a malfunction. This is especially important if you've made some change to your system. Installa- tion instructions and software docu- mentation are notorious for being poorly written. It's easy to make a simple mistake. For example, one PC owner up- graded his system with a new multi- function card that was fully populated with RAM. Off came the cabinet, and in went the board (after carefully following the instructions). However, when he tried to use it, the PC locked up and refused to do anything but reboot— and then lock up again. His automatic response was to blame the new board, but after removing the board, his computer still didn't operate correctly. What seemed to be a major com- puter malfunction turned out to be a simple problem. When he added the new board, he brought the total number of COM ports to three. The PC handles only two. With that third port installed, the PC no longer knew what to do and locked up. During in- stallation he had changed the switch settings on the system board. When (continued) Lattice® Products Are Your Best Investment Lattice TopView Tool- $250.00 basket— Provides more than 70 functions that eliminate the need for extensive use of assembly language when interfacing with TopView. Includes func- tions to control window, cursor, pointer, and printer operations. Also provides access to cut- and-paste facility and debugging services. LMK™-Automated $195.00 product generation utili- ty for MS-DOS, similar to UNIX "Make" C-Sprite™-Symbolic $175.00 debugger for programs written in Lattice C or assembly language $150.00 ' (120.00 C-Food Smorgasbord™ —Includes a BCD deci- mal arithmetic package, I/O functions, IBM-PC BIOS interface, terminal independence package, plus many other utility functions Text Management Utili- ties- (GREP/DIFF/ED/ WC/EXTRACT/BUILD)- Essential programming and documentation aids in any environment With Lattice published products you get "Lattice Service" including telephone support, free updates during the warranty period, notice of new products and enhance- ments when you register, and a money-back guarantee. Corporate site license agreements are available. C Compilers-MS DOS and PC-DOS-The in- dustry standard $500.00 Panel-High performance $295.00 screen design and screen management system. Available for MS-DOS, PC-DOS, and UNIX systems Call us today for further infor- mation on these, or our many other C programs, utilities, and tools! dBC II™ or dBC III™- C function libraries sup- porting indexed files that are compatible with dBASE II® or dBASE in™ $250.00 Lattice, Inc. P.O. Box 3072 Glen Ellyn, IL 60138 Phone (312) 858-7950 TWX 910-291-2190 We practice portability International Sales Offices Benelux: De Vooght. Phone (32J-2-720.91.28. England: Roundhill. Phone: (0672) 54675 Japan: Lifeboat Inc. Phone: (03) 293-4711 6 Inquiry 109 Fall 1985 BYTE- Inside the IBM PCs • 257 FIX YOUR OWN PC the expansion board was removed, the switch settings still indicated the additional RAM. When it wasn't there, the PC generated an error. All he had to do to "fix" his PC was to change a switch block on the new board to disable one of the COM ports. Once you've eliminated operator error, check the software. Many errors are brought on by not completely understanding how to use your soft- ware. The more complex and power- ful a program, the more likely you are to make a mistake along the way. Even a complete software crash isn't nec- essarily a software problem. Accord- ing to Verbatim Corporation of Sunny- vale, California, at least 80 percent of /Earth Computers New,- Low Cost P.C. Add-ln's AT. Performance For Your P.C. 8 MHz, 80286 512KRAM (Expandable to 2 MB) Works in all P.C. compatibles Transparent to DOS & applica- tions Occupies one card slot Switch for 8088 Socket for optional 80287 Only $995 (sub- stantial reseller discounts) Get up to five times the performance on your IBM" P.C, XT. or compatible (depending on the application) with the new TurboAccel-286™ board. TurboAccel-286 is super fast when compared to the 8086 designs and it is totally software transparent unlike the Orchid'" 801 86. * $«0MW#WW Lightning Fast CP/M ,U For Your P.C, AT., And Others • 8 MHz, Z-80H • 128KRAM (fastest CP/M coprocessor available) Two RS-232 ports Up to 16 users per P.C. (true multi-user support) Runs on the P.C, AT., AT&T 6300 and other compatibles Runs over 2000 CP/M programs Includes CP/M emulator and Microsoft compat- ible assembler Low $495 price (substantial reseller discounts) Now you can run over 2000 CP/M programs, lightning fast, on your P.C. with TurboSlave-P.C. The board contains a high performance 8 M Hz, Z-80 H coprocessor and 1 28 K RAM memory for the P.C, AT., AT&T 6300 and other compatibles. Also included with TurboSlave is a free CP/M emulator and S.L.R. Systems Z-80 Microsoft compatible assembler. Up to 1 6 TurboSlaves can be connected to a single P.C. for true multi-user compatibility when using the optional TurboDOS operating system. To order TurboAccel-286 or TurboSlave-P.C, call or write: EARTH COMPUTERS _ Dept. MJ-2 • P.O. Box 8067 Fountain Valley, CA 92728 • (714)964-5784 / i Telex #91 997 61 20 EARTH FV S all software and disk failures are directly due to fingerprints on the disks. Then there are the bugs that manu- facturers almost invariably miss. A program may work just fine in its primary form, but when you try a new feature, it doesn't react the way you expect. This may be a manufacturer's bug, but it may also be another oper- ator error, caused by the operator not fully understanding how to use the new feature. Once you have eliminated operator and software errors, you can concen- trate on the PC itself. Suspect the mechanical devices before the elec- tronics. Anything that moves is prone to wear. A drive failure is more com- mon than a chip failure. (Failure to load programs can be as simple as a broken or improperly closed disk- drive door.) Summary Computer malfunctions are relatively rare. Despite the fact that computers seem to be complex, a computer with the power of the IBM PC is actually much less complicated than a por- table television set. There just isn't much that can malfunction. When something does go wrong, it is most likely to be caused by: first, operator error; second, software error; third, mechanical problems; and last, the electronics. By using the process of elimination, you can usually track down the source of the trouble fairly quickly. POST and the IBM PC's diagnostics disk can help you pinpoint the causes of many malfunctions. However, there are times when neither of these will run. Normally, this indicates a more serious malfunction, (It can also mean that nothing at all is wrong.) There are also times when these diagnostic aids won't be able to find the cause of the problem. Then, when all else has failed, you may need to call a repair- man. The most important point l can make is this: Realize that you can find and fix most malfunctions if you move carefully and thoughtfully— one step at a time. ■ 258 Fall I985 BYTE- Inside the IBM PCs Inquiry 50 for End-Users. Inquiry 51 for DEALERS ONLY. INSIDE THE IBM PCs IBM PC Family BIOS Comparison BIOS vectors for the PC and its relatives by Jon Shiell and John Markoff IBM'S PERSONAL COMPUTER has grown into an impressive family of re- lated machines. In addition to the original system, there are the PC XT, XT/370, 3270 PC, Portable PC, PCjr, PC AT, and AT/370, as well as several in- dustrial and military versions of the XT. As the PC family has grown there have been additions and deletions to the basic hardware of the machines. This article and the accompanying tables 1,2, and 3 compare the vari- ous BIOS (basic input/output system) features of the PC-family machines. If you wish to program on one specific machine, these tables can assist you in determining which functions can be used across all machines in the family. The purpose of the BIOS is to pre- sent a common interface to programs, be they application programs or oper- ating systems, to minimize the amount of code that must be rewritten be- tween machines. The BIOS allows the programmer to isolate hardware dependency to a single set of primi- tive routines. The BIOS permits por- tability and compatibility between dif- ferent hardware environments. At the same time, almost all of the speed and control of direct hardware access is retained. The BIOS is made up of the code/ programs that provide the device- level control for the major I/O devices in the system. In the IBM PC family the BIOS is contained in ROM (read-only memory) on the system board, along with cassette BASIC and a set of rou- tines (called POST for "power-on self- test) that check out the machine when it is turned on. The BIOS creates hardware in- dependence by providing a level of in- direction and separation from the hardware. For example, when using a BIOS call to send a character to a printer, the programmer doesn't need to know what the I/O address of the printer port is or how to control it. The BIOS is normally invoked via a set of interrupts that are vectored into various BIOS entry points. Other in- terrupt vectors are used to service hardware interrupts, such as "disk operation finished." In practical terms, the software invokes the BIOS by loading the appropriate registers in the microprocessor and issuing an INT instruction. For example: MOV AH,0 ; Load AH with the BIOS function code for "print the charac- ter in register AL" MOV AL.'B' ; Character to be printed, in this case a "B" MOV DX,0 ; Print it on LPT1 (printer number minus 1) INT 17 ; Printer BIOS entry interrupt The INT (or software interrupt) in- struction transfers control of the microprocessor to the routine whose address is in the 4-byte interrupt vec- tor for this interrupt. There are 2 56 in- terrupts in the 808x microprocessor family; the first 128 are used by the BIOS and the operating system, the other 128 by BASIC. These 2 56 ad- dresses are arranged in table form in the first IK byte of memory, where bytes to 3 are for INT and bytes 3FC to 3FF are for INT FF (addresses and interrupts are in hexadecimal). The BIOS is extensible. When the POST routines perform their start-up diagnostics, they scan the ROM ad- dress space for "add-on" routines that install themselves. An example of this extension is the IBM Enhanced Graphics Adapter, which extends the video interrupt INT 10 as indicated in table 1. To install itself as a BIOS extension, a routine 1 . Copies the current interrupt pointer into your routine. 2. Disables interrupts. 3. Replaces current interrupt pointer with the entry address of your routine. 4. Reenables interrupts. If the routine is installed after DOS, the DOS functions 35 (get interrupt vector) and 2 5 (set interrupt vector) can be used. The rule for BIOS entries is one soft- ware interrupt per device. Additional- ly, there may be one or more hard- ware entries and one or more entries that point to tables or blocks of data used by the device driver. The inter- rupt vectors used as pointers to data instead of code allow easy alteration of the enviroment, such as changing the character set displayed for 80 to FF by the Color Graphics Adapter. According to IBM, the only time you can safely bypass the BIOS is when you access the following: • I/O port 2 1 : Interrupt mask registers. • 61: Sound control. • 40,41,42: Timer/counter. (Note: (continued) }on Shiell is a systems architect and micro- programmer. He can be reached at POB 61195, Sunnyvale, CA 94088. ]ohn Markoff, a technology writer for the San Francisco Examiner, is a former BYTE editor. He can be reached at 1 10 Fifth St.. San Francisco. CA 94123. Fall 1985 BYTE- Inside the IBM PCs 259 BIOS COMPARISON Table 1: The ROM BIOS vectors for the IBM PC family. Function BIOS Interrupt Code PC PC XT PCjr PC AT Ext. Comments n/a y y y y divide-by-zero trap 1 n/a y y y y single-step mode (used by Debug) 2 NMI n/u y y y y parity-check routine also coprocessor interrupt n/u n n y n keyboard-interrupt routine (keyboard has data ready) 3 n/a y y y y breakpoint (used by Debug) 4 n/a y y y y overflow trap 5 n/a y y y y print-screen function y y y y uses address 50:0 for status 6 n/u reserved 7 n/u reserved 8 n/a y y y y timer-interrupt handler 9 n/a y y y y keyboard-interrupt handler A n/a n n n n ega vertical retrace interrupt B n/a y y y y communications controller (e.g., serial port) hardware entry C n/a y y y y communications controller (e.g., serial port) hardware entry D n/a y y y y alternate printer (PC AT's 80287 interrupts first come in here) E n/a y y y y disk-controller interrupt entry F n/a reserved 10 video I/O y y ye y ega set CRT mode 1 y y y y set cursor type 2 y y y y set cursor position 3 y y y y read cursor position 4 y y y y read light-pen position 5 y y ye y select active display page 6 y y y y scroll active page up 7 y y y y scroll active page down 8 y y y y read attribute/character at current cursor position 9 y y y y write attribute/character at current cursor position 10 y y ye y write character only at current cursor position 11 y y ye y set color pallette 12 y y y y write dot 13 y y y y read dot 14 y y y y teletypewrite to active page 15 y y y y return current video state 16 n n y n ega set palette registers 260 Fall 35 B YTE • Inside the IBM PCs BIOS COMPARISON Function BIOS Interrupt Code PC PC XT PCjr PC AT Ext. Comments 10 (continued) 17 n n n n ega character-generator routine 18 n n n n ega alternate select 19 n n n y ega write string (with optional attributes) FE n n n n tv get screen buffer address (text mode only) . FF n n n n tv update real display (text mode only) 11 n/u y y y y equipment determination, returns status of optional equipment y y y y uses BIOS data area: EQUIP_FLAG 12 n/u y y y y memory-size determination, returns amount of memory in the system 13 floppy disk y y y y reset disk system 1 y y y y read status of last operation 2 y y y y read sectors into memory 3 y y y y write sectors from memory 4 y y y y verify sectors 5 y y y y format a track 15 n n n y read disk type (none, disk no change line, disk, hard disk) 16 n n n y disk change status 17 n n n y set disk type for format n/a y y y y uses BIOS data area DISK_POINTER n/a n n n y uses disk 'state machine' at 40:90 to 95 13 hard disk n/u y y not used by PC or PCjr y y reset disk system 1 y y read status of last disk operation 2 y y read sectors into memory 3 y y write sectors from memory 4 y y verify sectors 5 y y format a track 6 y n/u format a track and set bad-sector flags 7 y n/u format the drive starting at the desired track 8 y y return the current drive parameters 9 y y initialize drive-pair character (INT 41 used by XT, 41 and 46 by AT) 0A y y read long OB y y write long OC y y seek to desired track OD y y alternate disk reset OE y n/u read sector buffer OF y n/u write sector buffer 10 y y test drive ready 11 y y recalibrate 12 y n/u controller RAM diagnostic 13 y n/u drive diagnostic 14 y y controller internal diagnostic 15 n n y read disk type (none, disk no change line, disk, hard disk) 14 RS232 I/O y y y y initialize communications port 1 y y y y send a character 2 y y y y receive a character 3 y y y y get port status , ,, , v [continued] Fall I985 BYTE- Inside the IBM PCs 261 BIOS COMPARISON Function BIOS Interrupt Code PC PC XT PCjr PC AT Ext Comments 14 (continued) n/a uses BIOS data areas y y y y RS232_BASE (0:3) space for four ports but BIOS supports only two y y y y RS232_TIM_OUT 15 n/u y cassette I/O and advanced functions not used on PC XT y n y n/u turn cassette motor on 1 y n y n/u turn cassette motor off 2 y n n/u read from cassette 3 y n y n/u write to cassette 20 n n n y AL= 10, setup of SYSREQ routine* n n n y AL= 11, completion of SYSREQ function* 80 n n n y device open* 81 n n n y device close* 82 n n n y program termination* 83 n n n y event wait 84 n n n y joystick support 85 n n n y AL = 0, system-request key has been pressed* n n n y AL= 1, system-request key has been released* 86 n n n y wait (for N microseconds) 87 n n n y move block of memory (can move to and from extended memory) 88 n n n y return amount of memory above 1 megabyte 89 n n n y switch processor to virtual mode 90 n n n y device-busy loop* 91 n n n y interrupt complete flag set* 16 keyboard y y y y read next ASCII character 1 y y y y ; set Z flag if buffer not empty 2 y y y y read shift status 3 n n y n set Typematic rates 4 n n y n turn on/off keyboard click 17 printer y y y y print a character 1 y y y y initialize printer port 2 y y y y return printer-port status n/a uses BIOS data areas y y y y PRINTER_BASE (0:2) space for three printers y y y y PRINTER_TIM_OUT 18 ROM BASIC n/a y y y points to resident BASIC 19 n/a y bootstrap loader, IPL the system from a disk n/a y y bootstrap loader, IPL the system from a disk or hard disk ri/a y bootstrap loader, IPL the system from a disk or cartridge 1A y y y y read current clock setting time of day 1 y y y y set the current clock 2 n n n y read the real-time clock 3 n n n y set date from real-time clock 4 n n n y read date from real-time clock 5 n n n y set date into real-time clock 262 Fall I985 BYTE- Inside the IBM PCs BIOS COMPARISON Interrupt Function Code PC PC XT PCjr PC AT BIOS Ext. Comments 1A (continued) & sound select 6 7 80 n n n n n n n n y y y n set the alarm (24-hour maximum, goes off and causes an INT 4A) reset the alarm set up sound multiplexer 1B n/u y y y y keyboard break address 1C n/u y y y y timer tick 1D n/u y y y y video parameters for 6845 initialization 1E n/u y y y y disk parameters 1F 20-3F n/u y y y y graphics character extension for 320 (and 640) by 200 mode color graphics adapter DOS functions 40 n/u n y n y pointer to disk BIOS entry 41 n/u n y n y pointer to first hard disk, parameter block 42 n/u n n n n ega pointer to screen BIOS entry 43 n/u n n n n ega pointer to EGA initializing parameters 44 n/u n n y n ega pointer to EGA graphics-character table (also PCjr) 45 n/u reserved 46 n/u n n n y pointer to second hard disk, parameter block 47 n/u reserved 48 n/u n n y n cordless-keyboard translation 49 n/u n n y n nonkeyboard scan-code translation-table address 4A-59 n/u reserved 5A n/u clu cluster-adapter BIOS entry address 5B n/u reserved 5C n n n n net IBM PC Network NETBIOS entry point 5D-5F n/u reserved 60-67 n/u reserved for user program interrupts 68-6F n/u not used 70 n/u n n n y IRQ 8, real-time clock interrupt (continued) Fall I985 BYTE- Inside the IBM PCs 263 BIOS COMPARISON Function BIOS Interrupt Code PC PC XT PCjr PC AT Ext. Comments 71 n/u n n n y IRQ 9, redirected to IRQ 2 72 n/u n n n y IRQ 10 73 n/u n n n y IRQ 11 74 n/u n n n y IRQ 12 75 n/u n n n y IRQ 13, coprocessor, BIOS redirect to NMI interrupt (INT 2) 76 n/u n n n y IRQ 14, hard-disk controller 77 n/u n n n y IRQ 15 78-7F not used 80-85 reserved by BASIC 86-FO used by BASIC when the BASIC interpreter is running F1-FF not used Notes on the table: BIOS extension addresses All PC AT interrupts are valid for real mode only. C0000-C3FFF 16K EGA BIOS The XT/370 and 3270 PC both use the PC XT BIOS. C4000-C5FFF The AT/370 uses the PC AT BIOS. C6000-C63FF 256 bytes Professional Graphics tv TopView function. Display communication clu Cluster adapter. area ega Enhanced Graphics Adapter function. C6400-C7FFF net IBM PC Network, NETBIOS function. C8000-CBFFF 16K hard-disk BIOS n/a Not applicable. CCOOO-CDFFF 8K IBM PC Network n/u Not used. NETBIOS n Not supported. CEO00-CFFFF y Supported. DOO0O-D7FFF 32K cluster-adapter BIOS ye Supports a superset. D8000-DBFFF These INT 15 functions are just operating-system hooks s; DCOOO-DFFFF they perform no BIOS functions. E0O0O-E3FFF E4000-E7FFF ' The Typematic rate of the PC AT keyboard is programmable, E8000-EBFFF but no explicit BIOS support is provided. Also, the AT's EC000-EFFFF keyboard has an internal 16-key buffer. FOOOO-FFFFF 64K ROM BASIC and "simple" BIOS When a hard disk is present the INT 13 disk interrupt is rerouted to INT 40, and INT 13 points to the hard-disk BIOS. INT 15 functions WAIT function (A = 90): can be used by the operating- When the NETBIOS is installed, interrupts 13 and 17 are in- system task dispatcher to dispatch another task while terrupted by the NETBIOS; interrupt 18 is moved to INT 86 the current task waits for its I/O operation to finish. This and one of INT 2 or 3 is used by the NETBIOS. Also, the is the most efficient form of multitasking. NETBIOS extends the interrupt 15 WAIT and POST POST function (A = 91): I/O operation complete, which can functions. be used to inform the operating-system task dispatcher that an I/O operation for a waiting task has been com- pleted, and the task should now be moved to the ready queue. 264 Fall I985 BYTE- Inside the IBM PCs BIOS COMPARISON Table 2: Hardware interrupts for the IBM PC family of computers. Hardware-Interrupt Request Line PC and PC XT PCjr PC AT NMI Parity Errors Keyboard Interrupt Parity Errors IRQ timer timer-clock interrupt timer output IRQ 1 keyboard I/O channel (reserved) keyboard (buffer full) IRQ 2 reserved I/O channel cascade for 8 to 1 5 IRQ 3 serial port 2 asynchronous port (RS-232C) serial port 2 IRQ 4 serial port 1 modem serial port 1 IRQ 5 hard disk (not on PC) display vertical retrace parallel port 2 IRQ 6 floppy-disk control floppy disk floppy-disk control IRQ 7 parallel port 1 I/O channel (parallel printer) parallel port 1 IRQ 8 real-time clock IRQ 9 redirected to IRQ 2 IRQ 10 reserved IRQ 11 Interrupts 8 through 15 are not available reserved IRQ 12 on the PC, PC XT, or PCjr reserved IRQ 13 coprocessor IRQ 14 hard-disk controller IRQ 15 reserved NOTE: IRQ 3 and 4 may be used by SDLC (synchronous data-link control) or bisynchronous communication cards instead of serial ports. Table 3: IBM PC DOS interrupts used by the IBM PC Network program. Interrupt Code Function Subfunction Comments 21 3D n/u open file with sharing specified 44 09 IOCTL, is device redirected? 0A IOCTL, is handle local or remote? 0B IOCTL, change sharing retry count 59 n/u get extended error (additional errors added) 5A n/u create temporary file with unique name 5B n/u create new file 5C 00 lock byte range 01 unlock byte range 5E 00 get machine name 02 set up printer-control string 5F 02 get assign-list entry 03 redirect device to net 04 cancel redirection 2A 00 n/u check to see if network BIOS is installed 01 n/u execute NETBIOS request 02 n/u set net printer mode 03 n/u get device-shared status 2F BB 00 net command installation check 03 get server POST address 04 set server POST address Don't change port 41.) Timer frequency will remain fixed at 1.19 MHz. • 201: Game control adapter. (Note: Use the timer for delays.) Concerning absolute memory locations, note the following: For interrupt vec- tors (0:0 to 3FF), functions will be added but no func- tions will be redefined. For the video-display buffers (B000:0 and B800:0), the display memory maps will not change for a given video BIOS mode of opera-- 4 tion. If the bit map is altered, a new mode will be defined to support it. For ROM BIOS data areas (start- ing at 40:0), variables will retain their current defini- tions as long as the corre- sponding functions are defined— don't count on these! ■ Fall 1985 BYTE • Inside the IBM PCs 265 c Low power omplete hard disk kit $395 Comes complete with virtually the identical controller that's in the IBM®XT, and Xerox® warranties the hard disk for one year G uaranteed 100 percent IBM PC compatible How can we offer this fantastic price? Simple. We buy in such volume that even the most ava- ricious hard disk businessmen understand they have to give us the best price possible. We could pocket the difference, but we don't. Instead, we put the extra profit into our testing facilities. That's why Xerox guarantees our $395 10 megabyte hard disk for one year. Xerox knows, as our cus- tomers know, that we have an extensive testing program. Here is what we contribute toward giv- ing you the maximum hard disk performance. Best Drives Available First, we buy the best drives available. Sounds trite, doesn't it? I mean, a drive's a drive — right? Hardly. You should see some of the junk we get in our labs. Some have such high fail- ure rates that we even ques- tioned our own $10,000 hard disk tester. But when we tested other manufacturers' drives we were assured that our equipment was fine, which just confirmed that the bad hard disks were not only bad — they were real bad. But that's just the weeding out process. We then take each drive that we've put through our tester and test it again with the control- ler you've requested. We call this a "tested pair." DOS Doesn't Do It In case you're thinking that all this is an unnecessary duplica- tion of what DOS does for you, let me explain the disk facts of life. If DOS did what you may think it is supposed to do when you format the disk, DOS would map around these bad areas. Unfortunately, DOS doesn't do this. DOS 2.0 and 2.1 can't enter the bad tracks. DOS 3.0 can, but only on the IBM AT. Unfortu- nately, as the press has so well documentated, the AT's hard disk develops bad tracks later We do what DOS can't We believe the problem is so bad, we use a software program that performs a powerful test of your disk drive on all of the IBM or IBM compatible computers — PCs, XTs, and ATs. Our format takes hours to analyze the disk. But when we finish, you know that the bad tracks are really mapped out so you won't write good data that will disappear into a black hole. We even send you a printed statement of our test results. Our software allows you to type in the bad track locations from the list supplied by the manufacturers, so you'll never write good data to them — even if DOS didn't identify them as bad. The software even lets you save the location of these bad sections to a file, so that you can reformat your disk without spending hours retesting. We even include a program that will give you continuous comments on the status of your hard disk. No more waiting for that catastrophic failure. Average Access Time As you might suspect, some hard disks are faster than others in their ability to move from one track of data to another. The time it takes the hard disk to move one-half way between the beginning of the disk to the end is called the "average access time." The first generation of 10 meg- abyte hard disks had average ac- cess times of 80-85 milliseconds (msec). But computer users love speed, and guess what — the av- erage access time for the new 20 megabyte hard disk in the IBM AT is only 40 msec. (We sell an AT equivalent with only 30 msec access time!) There are some legitimate rea- sons for the shorter access time. It's particularly helpful when there are multiple users on the same hard disk. It's also impor- tant when running a compiler. But remember, before you get too wrapped up in the access speed, there's always that ST 506 interface which won't let data transfer from the hard disk to the computer any faster than 5 me- gabits/second. We've bypassed that choke hole, too. If you want the functional equivalent of a Ferrari with a turbocharger, or- der our 10 Mbit per second 100 megabyte hard disk with 18 msec of average access speed. Compatibility To be sure that your hard disk is 100 percent compatible with the IBM XT you don't need to buy the same hard disk that's in the XT. You can't even be sure what brand hard disk it is because IBM, like Express Systems, goes into the marketplace and buys hard disks from several vendors. However, they buy their XT hard disk controller from only one vendor — the same one wc do. You can buy the IBM XT con- troller from IBM for $495 or you can buy from us, the functional equivalent, manufactured by the same company that makes it for IBM for only $195. Is it the ex- actly identical IBM XT control- ler? No, it's better. First, it takes less power, and secondly, it can control from 5 to 32 mega- bytes — the IBM controller can work with only 10 megabytes. It is 100 percent IBM XT compati- ble, and 100 percent is 100 per- cent. If you want to save a slot, we carry a version that lets you operate two hard disks and two floppy disk drives. More than 32 Megabytes You can operate with more than 32 megabytes (the limit of DOS) through the use of "device driv- ers." Express Systems can supply you with device drivers for our hard disks for over 32 megabytes formatted. But, if you don't have individual files, or databases that are large, you might want to con- sider one of our controllers that can divide our 65 megabyate (formatted) hard disk into two equal volumes of 32 megabytes each. Reliability We offer you a choice between iron oxide and plated media — the stuff that covers the hard disk and gives it its magnetic properties. Iron oxide is, — well, it's rust. If you inadvertently joust your disk, you may cause the low flying head to dig out some iron oxide. A little rust flake can ruin your whole day. Plated media is more resistant to damage, and if it happens, less data is lost. We offer both types of hard disks. The iron oxide is older IBM* is a registered trademark of the International Business Machines Corporation. Express Systems, and Express Certified 555 are trademarks of Express Systems. Inc. technology, and quite frankly, manufacturers understand it bet- ter. Their better understanding, combined with some of the spe- cial head locking mechanisms, gives us peace of mind when we sell you one. Hard disks consume power. Our small, half-high hard disks con- sume so little power that you can use them with your existing IBM PC power supply. If you plan to use lots of slots, you'll want to increase your power supply to be safe. We offer the same amount of power for your PC that comes in the XT. Our Customers Some folks just never feel com- fortable buying mail order. They forget that Sears began as a mail order house or that IBM is now into mail order. But, if it helps, here is a partial list of customers who have felt comfortable to buy from us. IBM American Express U.S. Army AT&T (Bell Labs) Bausch & Lomb Xerox Sears Honeywell MIT RCA Lockheed Sperry Easv to Install If you're like most of us, raised on the boob tube rather than the Great Books, you'd rather see the movie than read the book. Well, now you can choose to read our installation manual or for only $9.95 more, you can get a VHS or Beta video cassette showing the simple steps for in- stallation. Warranty We offer you a one year war- ranty on our hard disks — the same as IBM on the AT and 90 days on the tape drives. (It's all the manufacturer gives us.) If Complete Hard Disk Kits Height Full Full Full Full Removable Hard Disk 1(1 Vi no Plated Media no yes yes no yes no no yes Average Access 85 msec 85 msec 85 msec 30 msec 85 msec 30 msec 30 msec 18 msec Transfer Rate 5 Mbits/s 5 Mbits/s 5 Mbits/s 5 Mbits/s 5 Mbits/s 5 Mhits/s 5 Mbits/s 10 Mbits/s 90 msec 5 Mbits/s PC or PC/XT $ 395 $ 495 $ 795 $ 1,535 $ 995 $ 1,775 $ 2,295 $ 4,995 $ 1,095 AT $ N/A $ N/A $ 595 $ 1,340 $ 795 $ 1,575 $ 2,070 $ 4,995 N/A Data Transfer Rate (k/sec) PC or PC/XT AT Tape Systems and Subsystems Formatted Storage Capacity Height 60 Mbytes '/: 88 $ 995 $ 995 60 Mbytes Subsystem 88 $ 1,295 $ 1,295 21 Mbytes (unformatted)Start/stop Subsystem 24 $ 595 $ 595 26 Mbytes Floppy Tape* Subsystem 31 $ 749 $ 749 Controllers All of our hard disk and tape controllers are available separately; Please call for prices. Subsystem Chassis Any of our disk or tape units are available in an external subsystem for an additional $250.00. You can mix & match any of our '/i high hard disks or tape drives together or add any single full height hard disk. Tape Cartridges Express Certified 555 foot 310 Hci 'A-inch Data Cartridge $35.00 Power Supply 130 Watt Power supply $75.00* 150 Watt Power supply $125.00 *with the purchase of any drive anything goes wrong with your tape or disk drive or hard disk, send it back in the box it came in. However, we have found that we can usually solve the problem over the phone. So call first for a return authorization number be- cause we can't accept any returns without it. Comes complete All Express Systems products come complete with the appro- priate software, tape and/or hard disk controllers, and cables where required. Hard disks are formatted and tested with the PC DOS of your choice. AH drive sizes are formatted capacities. If your application requires a stacking kit, power splitter ca- bles, daisy chain cable, or some other variation, we'll supply these items at a nominal charge. We even ship our hard disks with Command Assist™ an on- line DOS-like manual to give you help with your DOS commands. More questions? Because we spend so much at- tention on the front end with en- suring that our disks will arrive in working order, we have a cus- tomer service department that, unlike many of our competitors, has little to do. When you need us, you won't get a constant busy signal. Call our friendly, knowledga- ble customer service staff to get answers to your questions — be- fore or after the sale. Our peo- ple, who know the PC, can talk you through the sticky parts, and they'll respond to you quickly. Just call us. How to order Pick up the telephone and call 1- 800-341-7549, to order. We ac- cept MasterCard, VISA, Amer- ican Express and Diners Club. Or send a cashier's check or m <>i money order (We'll take a check, but you'll have to wait for it to clear) and tell us if you want one of our recommended config- urations or you want to mix and match yourself. Corporations with a DUNS number may send purchase orders for quantities over five. Call Toll Free 1-800-341-7549 Ext. 1600 In Illinois call (312) 882-7733 Ext. 1600 Express Systems, Inc., 1254 Remington, Schaumburg. IL 60195 Inquiry 58 . mn Command Assist is a trademark of Micro Design International Race ahead with FastStart, the only tutorial that works with your application software. FastStart allows you to use information management software like Lotus 1-2-3™ dBase™, and REFLEX™ instantly. Which means that the minute you start learning, you start producing. So, if you've never had the time to learn the software that you need to know, order FastStart. $m McGRAW-HILL Oil Trailing Systems 800/421-0833, ext. 288. In California, 800/662-6222. P.O. Box 641, Del Mar, California 92014 dBase il and III are trademarks of Ashton -Tate. Lotus 1-2-3 is a trademark of Lotus Development Corporation. MS DOS is a trademark of Microsoft Corporation. REFLEX is a trademark of Analytica Corporation. Inquiry 124 for End-Users. Inquiry 125 for DEALERS ONLY. Please sendmethe software I've checked. Charge my □ VISA □ Mastercard* □ FastStart Lotus 1-2-3 $79.95 □ FastStart dBase II $64.95 ^^ □ FastStart dBase III $69.95 Q FastStart REFLEX $69.95 O FastStart DOS (2.0 or 2.1) $59.95 □ Send me your catalog of computer- based training products. D Bill me. My PO# is * MASTERCARD BANK* ORGANIZATION (no abbreviations, please) STREET ADDRESS (no P.O. boxes, please) CITY ( 268 Fall 1985 B Y T E • Inside the IBM PCs INSIDE THE IBM PCs Device-Independent Graphics Writing software for the IBM Enhanced Graphics Adapter using the Virtual Device Interface by Thomas B. Clarkson III WHEN IBM'S Enhanced Graphics Adapter (EGA) was introduced just short of a year ago, a fair amount of anticipation was generated among IBM PC programmers and end users who relished the prospects of another speedy, feature-bangled accessory for their souped-up PCs and ATs. How- ever, anticipation turned to frustration as programmers settled down to develop applications for the new wonder; the board was extremely complex and quite different from previous IBM graphics-adapter boards such as the Color Graphics Adapter (CGA). Application developers addressing the EGA have two choices: program the hardware directly or program to the Virtual Device Interface (VDI) pro- vided by IBM in its Personal Com- puter Graphics Development Toolkit. Programming the EGA directly has two areas of difficulty— a long development cycle and limited por- tability of applications— but one perceived advantage: fast execution speed. Conversely, programming the EGA via the VDI has two big advantages— a very short development cycle and universal portability of applications— but one perceived disadvantage: slower execution speeds, relative to the direct-hardware approach. This article describes VDI program- ming techniques and points out the advantages to be gained from pro- gramming the EGA with the VDI rather than directly to the hardware with conventional graphics program- ming techniques. First, let's take a look at program- ming the EGA directly. The Enhanced Graphics Adapter is an advanced graphics controller card that supports resolution as high as 720 by 3 50 pixels on monochrome monitors and as high as 640 by 350 pixels on color monitors. Text and graphic images are greatly improved over their appearance on the CGA. While it delivers high image quali- ty, the EGA can cause programming difficulty. Specific challenges presented by the EGA include • Board complexity • Mode/RAM/monitor variability • Indirect access to bit-map memory • Write-only registers Board Complexity The EGA is an extremely complex col- lection of silicon. It contains 52 VLSI (very-large-scale integration) circuits and a very complex register structure. A large number of instructions must be issued and coordinated for every graphics operation. For this reason, it's practically im- possible to exhaustively document every register combination for the EGA, leaving the programmer no choice but to take a trial-and-error ap- proach. The EGA Technical Reference Manual contains descriptions of the registers but tells nothing of how they interact, what combinations produce what effects, etc. Mode/RAM/Monitor Variability The EGA can be operated in 17 modes and four RAM (random-access read/write memory) configurations on three different IBM monitors. In order to run, a program must be written to a specific mode/RAM/monitor com- bination and then cannot run on any other mode/RAM/monitor combina- tion without changes. Faced with this proliferation of boards within a board, in addressing the hardware directly you have two choices: You can invest a tremendous amount of development time and ad- dress every possible mode/RAM/ monitor configuration, or you can choose a subset of EGA mode/RAM/ monitor configurations. Indirect Access to Bit-Map Memory Access to the EGAs bit-map memory is indirect, with different access modes provided by different EGA register settings. These various bit- map memory-access modes provide a spectrum of mechanisms for op- timally implementing bottom-level graphics primitives. For example, line drawing is best done in DX writing mode (10 in the Write Mode field of the Mode register), but copying rec- tangles of pixels from off-screen bit maps to the screen bit map is best done in processor data mode (00 in the Write Mode register). Both differ substantially from the direct bit-map access familiar to CGA programmers. DX mode provides a means of writing all planes with particular colors at once, and processor data mode lets you read and write each plane in- dividually. There is no way that a pro- grammer can directly read all bits of a given pixel in the EGA, as you can {continued) Thomas B. Clarkson III (GSS, 9590 Southwest Gemini Dr., Beaverton. OR 97005) is chairman and CEO of GSS, developer of IBM's Personal Computer Graphics Development Toolkit and Profes- sional Graphics Series. Fall 1985 BYTE- Inside the IBM PCs • 269 Irquiry 167 Try It. Then Buy It. PC-Write. A fast, full-featured word processing package for the unbelievable price of $10. Complete. You get a manual on disk, mail merge, split screen, keyboard macros, on-screen formatting, full printer support, and more. Try PC-Write for $10. Then register for $75 to get: • latest diskette • printed manual • two updates • phone support • newsletter Registration supports our "shareware" concept that keeps our prices low, and allows our development of PC-Write enhancements. Shareware means you can get PC-Write from a friend or user group to try, and give away copies yourself. Then register if you like it. No risk! Byte, IBM Issue 1985 Our current version 2.55 offers many new features, like viewing the directory from the editor itself. PC -Write makes a great program editor, too. We even provide source code in MS-Pascal and assembly. Oitler PC-Write Today. Satisfaction Guaranteed. (206) 282-0452 219 First N. #224y Seattle, WA 98109 GRAPHICS with the CGA. All references to the bit map are mediated by the EGA hard- ware. Write-Only Registers Many of the EGAs registers are write- only. This means that a supervisory or background program cannot arbitrari- ly save and later restore the screen state. For example, when a program is directly accessing the hardware, concurrent applications cannot grab the current state of the screen, switch to a different process, and then restore the screen state when the pro- cess is resumed. Another challenge presented by the EGA is long processor wait states caused by its high refresh rate. The EGAs number-one priority is to keep the screen refreshed. The running program may manipulate the screen buffer whenever it likes, but conten- tion for the buffer is always resolved in favor of screen refresh. The advan- tage of this priority is the absence of the "hash" familiar to CGA program- mers. The disadvantage is that, in some screen modes, the processor may have quite a few wait states before a screen buffer cycle is made available to it. Also, the EGA hardware only direct- ly supports some Boolean operators: REPLACE, AND, OR, and XOR. To support all possible operators may re- quire an extra write of the bit map. Most of these programming diffi- culties are concentrated at the en- vironmental setup level rather than at the graphics functionality level, where draw-line commands occur and pixels are actually being moved. If graphics functionality is complex (such as drawing vectors, copying rectangles, and drawing on-screen bit maps) and the program must run in diverse hard- ware/software environments (the situation faced by most IBM PC ap- plication programmers), the direct-to- the-hardware programming task is very complex. Writing and optimizing the necessary low-level primitives is time-consuming and highly memory- intensive. However, if you are writing a simple graphics program that will never run in an environment with other graphics software (that is, there SOURCE CODE COMPILER LINKER LANGUAGE BINDING APPLICATION PROGRAM VIRTUAL DEVICE INTERFACE DEVICE DRIVER DEVICE DRIVER DEVICE DRIVER S3 S fH DEVICE DRIVER PLOTTERS GRAPHICS PRINTERS ENHANCED GRAPHICS ADAPTER DISPLAY METAFILE Figure I : The Virtual Device Interface stands between an appliction program and the specific devices that the application controls. 270 Fall 1985 BYTE- Inside the IBM PCs Inquiry 112 GRAPHICS A challenge presented by the EGA is long processor wait states caused by its high refresh rate. is no environmental code to deal with), then programming the EGA will be a simpler job. Making programs compatible with different or higher-resolution graph- ics adapter cards that will be pro- duced is another important issue. For every new card and monitor intro- duced, the application developer who wrote directly to the EGA hardware will have to rewrite code— sometimes a little, sometimes a lot. Device Independence: The VDI IBM has provided a way to program the EGA in a device-independent manner. The Personal Computer Graphics Development Toolkit allows programming to a Virtual Device In- terface, rather than to specific mode/ RAM/monitor configurations of the current EGA. IBM's VDI implemen- tation contains optimized device drivers to all IBM PC hardware, from printers and screens to graphics adapter cards, together with language bindings to C, Pascal, FORTRAN, Compiler BASIC, assembly-language, and macro assembler. The Virtual Device Interface is a layer of software at the operating- system level that serves as a logical graphics interface between the ap- plication and the devices being con- trolled by the application (see figure 1). The role of the VDI is analogous to that of a portable operating system: As a consistent application interface, the BDOS performs all logical system functions while the BIOS handles hardware-dependent operations such as displaying data on the screen, {continued) ToC or not to C... The C language used to be intimidating. Then RUN/C came along. It's an interpreter. That means you can run a C program immediately, without compiling it. Perfect for learning C and writing programs interactively. Use it with any standard C compiler for a complete development system. RUN/C LITE'" Learn C the natural way with the RUN/C Lite introductory package. SAMPLE PROGRAMS Comes with critically acclaimed C reference manual and over 100 sample programs on disk. EASY COMMANDS & FUNCTIONS Write and execute programs with LOAD, EDIT and RUN Debug with IRON, TRACE, and PRON. Use PC BASIC graphic functions like PUT GET CIRCLE, and LINE, SCREEN, and DRAW RUN/C PROFESSIONAL All the RUN/C Lite advantages, plus powerful features for program development. LOADABLE LIBRARIES'" Load and run your favorite library functions (C-Food, Halo, etc.) from within your RUN/C interpreted code. DEBUGGING TOOLS Polish program modules before compiling. New source-code debugging facilities allow you to set multiple breakpoints, single-step through a program, view and change variables during execution. Call Lifeboat" about RUN/C interpreters and our catalog of quality programming tools. RUN/C Lite, RUN/C-The C Interpreter, RUN/C Professional and Loadable Libraries are trademarks of Age ol Reason Co. Lifeboat and Lifeboat logo are trademarks of Lifeboat Associates C-Food Smorgasbord is a trademark of Lattice, Inc. Halo is a trademark of Media Cybernetics, Inc. For immediate delivery or more information, call: 1-800-847-7078 In NY (212)860-0300 or write LIFEBOAT" ASSOCIATES 1651 Third Avenue New York. NY 10128 **>' **k***: LIFEBOAT I CRUNCH NUMBERS 5 TO 15 TIMES FASTER With MATHPAK 87™ by Precision Plus Software For Turbo Pascal 1 , Microsoft 2 Pascal and Fortran and IBM PROFESSIONAL FORTRAN 3 , Compilers Make full use of your 8087 chip by eliminating overhead. OVERHEAD — It's the reason your compiled programs perform floating point operations 5-15 times slower than the capabilities of your 8087 chip! Unfortunately, Overhead is inherent with all high-level languages. But NOW with MATHPAK 87™ you can ELIMINATE THAT OVERHEAD! MATHPAK 87™ is a set of 40 HIGHLY OPTIMIZED ASSEMBLER ROUTINES for common mathematical operations, including: vector matrix operations, solution of linear equations, least squares curve fit- ting, statistical analysis, fourier analysis (FFT, convolution), numerical integration, solution of dif- ferential equations and more. These routines were developed by a team of engineers and scientists to encompass the most common mathematical operations and to squeeze the utmost performance from your hardware. MATHPAK 87™ ROUTINES are so EASY TO USE all you have to do is LINK THEM TO YOUR PROGRAM AND CALL THEM DIRECTLY! A detailed and EASY TO READ MANUAL (with lots of EXAMPLES) shows you how to GET STARTED IN 10 MINUTES. Whether you write programs for yourself or for someone else, you need MATHPAK 87™. You know that the "snappier the program - the happier the user" and the greater the user's productivity. With MATHPAK 87™ your programs become blazingly fast - FASTER THAN YOU EVER THOUGHT POSSI- BLE. MATHPAK 87™ also saves you programming time. Thoroughly tested, expert-written routines free you to solve your problems - instead of writing complex but standard routines for matrix inver- sion, Fast Fourier Transforms et cetera. Your PROGRAMS become SHORTER, run FASTER and are FINISHED SOONER. TO ORDER: Send check or M/0 to Precision Plus Software, 255 Great Arrow Ave., Ste. 660, Dept. B-10, Buffalo, NY. 14207-3081. Introductory prices in effect until December 31, 1985. Specify version required. D MATHPAK 87TM - Turbo (for use with Turbo Pascal 8087) $69.95 (Regular Price $89.95)or D MATHPAK 87TM - MS (for Microsoft Pascal, Fortran or IBM Professional Fortran)® $109.95 (Regular Price $149.95) Offer good on orders received by Dec. 31 /85 only. Add $5 for shipping & handling. Orders outside U.S.A. & Canada add $20 shipping & handling. BONUS We will include FREE with each order ready-to-run example programs for electrical network analysis, multi- component distillation and framed structure stress analysis. Use or adapt these programs to your own needs. VISA & MASTER CARD ORDERS CALL 1-416-761-5309 30 Day Money Back Guarantee Reg. Trademarks: Borland International 1, Microsolt Corporation2, International Business Machines3. Inquiry 157 Fall 1985 BYTE • Inside the IBM PCs 1 Exxon 2 General Motors 3 Mobil 4 Ford Motor 5 IBM 6 Texaco 7 E.I. du Pont 8 Standard Oil (Ind.) 9 Standard Oil of Cal 10 General Electric 11 Gulf Oil 12 Atlantic Richfield 13 Shell Oil 14 Occidental Petroleum 15 U.S. Steel 16 Phillips Petroleum GRAPHICS million Americans can't read. And guess who pays the price. Every year, functional illiteracy costs American business billions. But your company can fight back... by joining your local community's fight against illiteracy. Call the Coalition for Literacy at toll-free 1-800-228-8813 and find out how. You may find it's the greatest cost-saving measure your company has ever taken. A literate America is a good investment. Coalition for Literacy reading from or writing to disk, and accepting keyboard input. The VDI specifies high-level graphics tasks to device drivers that in turn instruct graphics input and output devices to perform those tasks. The VDI controller receives high- level, device-independent graphics commands (called primitives) from the application and passes them to device-specific drivers. The drivers translate the high-level primitives into lower-level instructions specific to each device. The VDI serves as a stan- dardized interface between multiple and diverse drivers (devices), the ap- plication program, and the operating system. The application never talks to specific drivers, only to the VDI. The insulation of application from hard- ware gives VDI-based software its portability. An application will run on any device (even one developed 10 years from now) as long as the device driver is resident in the system. In addition to providing device in- dependence and application portabil- ity, the VD! offers a much shorter de- velopment cycle than device-specific programming. The environmental setup code that takes so much time to write and changes from device to device is already written for the ap- plication developer in the VDI, and it never changes. You can immediately begin application design without spending your time on systems-level software development. The VDI deals in very high-level graphics commands, one of which can replace scores of low-level move-draw commands. Figure 2 shows some of these commands. The VDI also provides full access to EGA hardware features such as the EGA color-map hardware. This EGA output circle output arc output bar output pie slice set color set character height set fill style set polyline color map set polymarker type Figure 2: Sample VDI commands. "fable I: The Virtual Device Interface supports a variety of the Enhanced Graphics Adapter's 17 modelRAMlmonitor configurations as shown. Display Mode RAM Colors Palette Pages Resolution mono- 00FH 64 4 mono 1 640 x 350 chrome 128 4 mono 1 640 x 350 192 4 mono 1 640 x 350 256 4 mono 2 640 x 350 color or 00DH 64 16 16 2 320 x 200 enhanced 128 16 16 4 320 x 200 192 16 16 6 320 x 200 256 16 16 8 320 x 200 00EH 64 16 16 1 640 x 200 128 16 16 2 640 x 200 192 16 16 3 640 x 200 256 16 16 4 640 x 200 enhancec 010H 64 4 64 1 640 x 350 128 16 64 1 640 x 350 192 16 64 1 640 x 350 256 16 64 2 640 x 350 272 Fall 1 985 B Y T E • Inside the IBM PCs GRAPHICS Inquiry 113 feature lets you assign any color in- dex to any color displayable on the screen. It can be used for special ef- fects, such as simple animation or rapid color changes. With the VD1, changing the color map is a quick operation; without the VDI, accessing the color map is prohibitively difficult. Table 1 shows the variety of trade- offs possible with the four key modes that IBM has chosen to support with the VDI. Note that even the mono- chrome monitor supports four colors (black, white, bold, and blinking), each of which must be addressed specifi- cally and separately. Page support refers to the EGAs ability to store screen buffers, or background screens, for fast screen switching. Is the VDI Slow? Many programmers associate device independence with very low perfor- mance. It's true that device-inde- pendent programs may run slower than device-specific programs, simply because of the process of "translat- ing" a universal program to specific device requirements. VDI translation is made up of two key processes called transformation and emulation. Transformation is the process of mapping virtual, or normalized, device coordinates (which are not specific to any particular device) to device-specific coordinates. Transfor- mation enables an application to be moved from device to device without change. Emulation is the process of instruct- ing devices how to accomplish graph- ics commands that they are normally incapable of doing. For instance, if the VDI issues a command to "draw a polygon" and the device is not de- signed to do that, the VDI sees to it that the polygon gets drawn using whatever capabilities the device does have. It might accomplish "draw polygon" by piecing together a number of "draw line" commands. Emulation takes time. A sophisticated application running on low-level hard- ware would require quite a bit more emulation and thus run much slower than the same application running on (continued) What's in a Name... BetterBASIC" is just what it sounds like. Better than the BASIC you got with your PC. What's better about it? Just about everything. Programs run last , Each line of code is compiled as II is enlered into memory BIG Break the 64K barrier Use the lull memory of your PC lo wnle big programs POWERFUL Windows and graphics, DOS and BIOS calls. chaining, overlays, local and global variables, recursion, and more. INTERACTIVE Responds lo user commands in immediate mode. STRUCTURED Wnle structured programs using lunctions and procedures, MODULAR Create re-usable "library" modules for more efficient programming. Easy interface to assembly language. BelterBASlC Runlime System. 8087/80287 Main Module, and BTrieve" Interface also available. Call Lileboal about BelterBASlC and our extensive collection ol professional development systems. Lifeboat and Lifeboat logo are trademarks of Lifeboat Associates. BetlerBASIC, Runtime System, 8087/80287 Math Module and Btrieve Interface are trademarks of Summit Soltware Technology For immediate delivery or more information, call' 1-800-847-7078 In NY: (212) 860-0300 or write LIFEBOAT" ASSOCIATES 1651 Third Avenue New York, NY 10128 s e \0» ■LIFEBOAT! If you're really serious about playing bridge, it's time to put away the cards. Introducing TOURNAMENT BRIDGE, the computer* program for advanced practice and play. Here's a tournament at the flick of a switch. A partner always on call and a pair of brilliant opponents who teach you all their tricks. Plus flashback options and tips to fine-tune technique. Call 1-800-638-6460 (in MD, 800-492-0782) or visit your software dealer. RANDOM HOUSE 'Jofuoare' @ 1985 Rnndom Housl , lnc AM righls reserve d *For IBM PC, PCjr and XT. Program design & implementation by Paul A. Schwarz Inquiry 169 Fall 1985 BYTE- Inside the IBM PCs • 273 ^m ^ ^ A &K «& v \ ' s vl ^ 1 '4*.^ 4> m l_^H BASF QUALIMETRIC'"1.2 MB FLEXYDISKS." CERTIFIED 100% ERROR-FREE AND WARRANTED. GRAPHICS U.ku^j BUT HERE'S SOMETHING THAT WILL- AND IT'S FREE! Just like our FlexyDisks, BASF Video and Audio Cassettes are warranted for a lifetime.* m Wi^SS/ AncTwhen you buy specially-marked boxes of BASF FlexyDisks between now and January 31, 1986, you have your choice of a free BASF High- Grade Chrome Video Cassette (VHS or Beta) or two free top-of-the-line BASF Chrome Maxima II r i Audio Cassettes. Just mail the coupon below, plus the special labels and the bar codes from the disk pack- ages along with $1.00 for postage and handling. Visit your nearest BASF dealer (to find out where he is, call i toll-free 1 -800-343-4600) and take advantage of our free offer and sweepstakes today. WIN A COMPLETE $7,500 COMPUTER SYSTEM, featuring the new COMPAQ DESKPRO 286" and the Epson" MODEL LQ-1500 letter-quality printer, in our new BASF Com- puter Sweepstakes! To enter, simply fill out the coupon below mbasfA. anc ' senc ' '* t0 us; or sto P ky an V BASF FlexyDisk " Ik dealer between now and January 31 , 1 986, and fill out the official entry form; or send a postcard with your name and address to BASF Giveaway, P.O. Box 8920, Westport, CT 06888. For a copy of the Lifetime Warranty, write BASF Systems Corporation, 19 Crosby Drive, Bedford. MA 01730. —ems Corporation. Bedford MA 01 730 O 286 is a trademark ol COMPAQ Coni| Epson is a registered trademark of Epson Corporation Inquiry 14 Mail to: BASF Giveaway, P.O. Box 8920, Westport, CT 06888 CHECK YOUR CHOICES (Limited timeotfer mail before 1/31/86) D Please send me the free cassette(s) indicated al right, and enter me in the BASF Computer Sweepslakes. My order repre- sents a lolal of □ one □ Iwo □ three Offer Requests, and I am enclosing for each request the special offer sficker(s) and bar code(s) Irom the BASF FlexyDisk pack(s) I have purchased, togelher with $1 .00 postage & handling (2 requests = $2, 3 requests = $3). □ NO PURCHASE NECESSARY. I am not participating in the BASF Free Mail-In Offer, but enter my name in the Computer Sweepstakes. Name FREE CASSETTE REDEMPTION ORDER Limil ol Ihree (3) Offer Requests per customer, each request good for either one (I ) BASF Video Cassette or Iwo (2) BASF Audio Cassettes. Here's the detail lor my total order: Quantity • VIDEO CASSETTE VHS Beta •AUDIO CASSETTES Tms order represents a lolal ol Oiler Reqoesl(s) Address. City Name of Your BASF Dealer Addilional Terms Offer good in U.S.A Allow 4-6 weeks for cassette(s) delivery, void wherever prohibited or restricted by law Limit: one mail-in certificate redemption lor up to three (3) Free Offer Requests per customer. This certificate may not be mechanically reproduced and must accompany all requests. Oiler expires U3V86. Computer Sweepstakes winner will be notified before 2/28/86. State. .Zip. BASF Programming the VDI involves opening and closing workstations. a device with high-level graphics capability. Even with the need for transforma- tion and emulation, a VDI need not drag down performance. The VDl's device drivers are highly optimized and could give better performance than some hardware-dependent ap- plications. Primarily to blame for poor VDI program performance is inappro- priate programming techniques. Programming the VDI The VDI programming flow is a repetitive cycle consisting of the fol- lowing steps: (1) open workstation, (2) set attributes, (3) draw graphics primitives, (4) clear workstation, and (5) close workstation. A workstation is any logical entity from which the ap- plication receives input or to which output is directed; it can be a display screen, a keyboard, a mouse, etc. The VDI graphics primitives are polyline, polymarker, filled areas, arcs, circles, bars, and pie slices. Primitives are assigned attributes such as color, line style, text height, font, and rota- tion. You don't need to concern your- self with drawing pixel-to-pixel vec- tors; the VDI does this for you. The command open workstation generally prepares the device to receive output and to return input. Specific tasks in this step include establishing default attributes for primitives (color, line styles, fill styles, text size, text rotation, etc.), opening any necessary files, clearing the screen, form-feeding paper in the printer, replacing pens on a plotter, and informing the user of device- specific information such as colors, line styles, and fill styles. Setting attributes involves a variety of commands that determine attri- butes for graphics primitives (such as color, line style, etc.) and setting the [continued) Fall 1985 BYTE- Inside the IBM PCs 275 GRAPHICS "clipping rectangle," which restricts output to a certain area of the display surface. Drawing graphics primitives involves commands that display the funda- mental units of graphics primitives in the lines, text, filled areas, circles, arcs, pie slices, and rectangles that make up the picture. This is also the step in which pictures are updated interac- tively based on user actions and ap- plication program directives. The command clear workstation dumps the existing picture to a printer workstation (or other hard-copy device), flushes the printer buffer, and returns a blank screen to the display. The command close workstation ter- A BETTER WAY TO... DRAW, POINT, SELECT & POSITION For graphics, and menu selection - for direct interaction with your computer - nothing beats a light pen. It's fast. It's natural. And unlike a mouse, it won't fight with you for desk space. Over 7500 FTG light pens are in use world-wide -- they're the undisputed standard for the IBM PC. Software is available for graphics, education, 3278 emula- tion, and much more. Plus, our MOUSETRAP™ is the link to most programs that can use a mouse. And, if you do any pro- gramming, you'll find it easy to add light pen support to your own creations. For added versatility, check out our new PXL-350 HI-RES LIGHT PEN BOARD. It's fully supported by the DR. HALO ll ,m graphics program. The pen is $195. The board is $149 with single-pixel and TopVieW m inter- face software. We back both with a 30-day no-risk trial privilege and a two-year limited warranty. Call today to try them, or for more information. FTC DATA SYSTEMS soon to be GRAPHIC INNOVATIONS, INC. (714)995-3900 (800) 962-3900 (800) 972-3900 (Calif.; 10801 Dale, Suite M-2, P.O. Box 615, Stanton, CA 90680 Telex: 887840 minates communications with the dis- play device; updates, rasterizes. and dumps the on-screen picture to the printer; closes any open files; and puts the device in a known and stable state, preferably that which existed before the open workstation com- mand was received. Programming a VDl is quite dif- ferent, conceptually and semantical- ly, from writing traditional graphics programs. The VDI operates at a much higher level than conventional graphics programs that deal on a pixel-manipulation, move-draw level. In conventional graphics program- ming, the programmer must build each function specifically for the par- ticular device(s) on which the applica- tion will run. Traditional graphics packages address devices in device- specific coordinate spaces, which dif- fer from device to device (pixels, plot- ter steps, dots per inch, etc.). The VDl, on the other hand, addresses devices in universal, normalized device coor- dinates (NDC). The VDI is thus able to guarantee a baseline environment of useful functions, emulating those not present on the device. VDl functions are much higher-level graphics primitives than those found in traditional graphics programming environments; VDI primitives such as polyline, fill area, and circle replace low-level drawing units like pixel and line. Rather than having to turn on and off pixels or draw thousands of short line segments to form images like circles and arcs, the programmer enters a few (sometimes only one) high-level graphics primitives. For ex- ample, the traditional move-draw way to draw a three-segment figure would be: move x1, y1 draw x2, y2 draw x3, y3 draw x4, y4 Whereas drawing the same figure using VDI would only require issuing one polyline command: draw polyline (4, xy) For another example of how a pro- grammer might use the VDI primitives 276 Fall 1985 BYTE- Inside the IBM PCs Inquiry 59 for End-Users. Inquiry 60 for DEALERS ONLY. GRAPHICS and attributes to write graphics code, see figure 3. It shows the VDI code necessary to draw a fairly complex two-color graphic that, using conven- tional graphics programming meth- ods, could take hundreds of lines of repetitive move-draw commands. Using the VDI, the programmer mere- ly establishes a few high-level parameters: points of the polygon, colors used, fill style, text alignment, and color and text orientation. The VDI interprets these high-level com- mands to come up with the picture, thinking in terms of graphics primi- tives (text, color, polygon) rather than pixels or vectors. VDI also incorporates the notion of line styles (dashed, dotted, etc.), so you don't have to piece together hun- dreds of short draw line commands to create a dashed line. Similarly, to draw a circle in VDI you issue a circle (continued) WHITE data xy (18) = 14000, 22000, 10000, 18000, 10000 14000, 14000, 10000, 18000, 10000 22000, 14000, 22000, 18000, 18000 22000, 14000, 22000 set color index (display, 1, WHITE) set color index (display, 2, RED) set fill interior style (display, SOLID) set fill color index (display, 2) fill area (display,9,xy) set text alignment (display, center, center) set text color index (display, 1) text (16000, 1600, "STOP") Figure 3: The VDI figures and attributes required to draw a stop sign. • • • • • • • • • • • • • • • • • -•••••••••••••• ••••••••: Build ycurcwn IBM Compatible System XT Building Tools MONITOR ADAPTORS Mono w/o printer port $99 Color Graphics $99 Mono w/printer port $135 Color Graphics w/p. port $135 Mono Graphics w/p. port $175 STB Chauffer $299 Everex EDGE $299 Persyst BoB $395 Color 400 $400 MULTIFUNCTION BOARDS AST Six Pak 384K $299 Quad 384K $299 384K Generic 6-pack $195 MISC. ITEMS Floppy controller $69 DTC Hard disk controller $215 Teac 55B $99 Qume 142 $75 135 W Power Supply $99 XT Mother Board $250 Turbo Mother Board $350 Chassis $99 5150 style Keyboard $99 5151 style Keyboard $155 AT style for XT $135 IBM XT Compatible KIT 695 Dual DS/DD, 256K. 8 Slots, 135W, Keyboard ASSEMBLED SYSTEMS All Systems Include: 8 Slots, 135W, Keyboard, 90 Day Warranty. Hard disk systems as below. PC Solution XT 2 DS/DD, 256K $795 2 DS/DD. 10 Meg $1295 PC Solution TURBO 2 DS/DD, 256K $895 2 DS/DD, 10 Meg $1495 AT Solution Base, 256K $2295 Enhanced, 51 2K, 20 Meg $2995 Hard Disks & Controllers 10 Meg Internal $535 20 Meg Internal $835 30 Meg Internal $995 10 Meg External $699 20 Meg External $899 MODEMS Hayes 1200 $399 Hayes 1200B $315 Everex 1200B $195 MONITORS Tatung $160 Taxan121 $165 PGSMAX-12E $185 PGSHX-12 $450 Taxan 425 $425 Taxan 440 $550 XtronTTL $125 PRINTERS Panasonic 1091 $259 Panasonic 1092 $369 Canon PW1080 $299 Citizen MSP-10 $289 Epson FX85 Call Epson FX185 Call Toshiba 1340 $549 Toshiba 351 1295 Hi-Tec Computers & Electronics • (301 ) 949-2440 IBM Is trade mark ol IBM •••••••••• 10524 Detrick Ave., Kensington, MD 20895 ■•••* PC Solution Is trade mark of HI-TEC Enterprises, tnc *••••••*•*•*••■ • • • • • • • • • • *•• Inquiry 87 Fall 1985 BYTE- Inside the IBM PCs • 277 GRAPHICS command with center point and radius. In a non-VDI environment you would have to draw many short vec- tors and compute their endpoints using sine and cosine tables. The VD1 also assigns colors to each attribute individually, rather than forc- ing one universal color to be applied to all primitives. This allows a great deal more flexibility. In a traditional graphics program- ming environment, you build into the application assumed knowledge about the devices that will run the program. Supporting new devices is thus difficult if not impossible without making extensive program changes. The VDI, on the other hand, lets you build programs in universal, high- level, device-independent primitives. At run time, the program queries the device to discover its particular capa- bilities or limitations and modifies its presentation of images to conform to those capabilities or limitations (in the case of limitations, emulation takes place). The VDI program adapts "on the fly," having no preset, hard and fast device-specific data built into it. This enables the VDI program to adapt to new hardware without changing the source code. The difference between writing traditional graphics programs and writing VDI-based graphics programs is analogous to the difference bet- ween writing code in assembly lan- guage and writing code in a high-level language. There's an entirely different mindset. In the VDI, even many complex images (such as a filled star) become high-level primitives that can be in- voked with a single command (draw polygon). In a conventional graphics program, reams of move-draw com- mands are required to draw the hori- zontal raster lines comprising the image. Also, in an image like a star, where the same raster line forms discontinuous segments of the image, it's tricky (and time-consuming) to specify begin-/endpoints for each raster line. With VDI, you can think of your pic- tures as sets of high-level pieces, not as millions of dots (pixels). You pre- define data and call a single polyline or polymarker primitive to output all the pieces, instead of issuing many in- dividual calls. By making inquiries of the device to determine its capabili- ties (colors, text sizes, raster writing modes), the program can tailor out- put for these device attributes at run time. VDI primitives and attributes are un- coupled. Instead of having to set at- tributes for each primitive each time that primitive occurs in the program, attributes are set once and stay set until changed. The Complete and Comprehensive Intelliware™ Laboratory for Expert System Concepts on the IBM Personal Computer. Experteach Includes: • Comprehensive Introduction to Expert System Concepts. • On-line Tutorial Describing the Operation of Expert Systems. • Lisp Based Expert System Tools with Source Code. • Prolog Based Expert System Tools with Source Code. • dBASE II™ Based Expert System Tools with Source Code. • Pascal Based Expert System Tools with Source Code. • Complete Lisp Interpreter for the IBM PC® . • Complete Prolog Interpreter for the IBM PC. • Comprehensive Case Studies of Several Major Expert Systems. • Comprehensive bibliography on Expert Systems. Experteach is a comprehensive guide to Expert System technology consisting of a uniquely integrated collection of Expert System tutorials, case studies, on-line teaching pro- grams. Expert System building tools with source code and Artificial Intelligence languages. Experteach is based on extensive experience in teaching Expert System concepts in association with IEEE. ACM and the Continuing Educa- tion Institute. Experteach introduces you to Expert System technology by allowing you to build Expert Systems and 10 experiment with a variety of Artificial Intelligence tools and languages on the IBM PC. Experteach includes eight rule-based Expert System shells with source code implemented in Lisp, Prolog, dBASE II and Pascal. Each language has been used to im- plement both a forward chaining and a backward chaining Expert System shell with a built-in rule editor, inexact in- ference and how & why explanation facilities. Experteach includes a comprehensive Lisp interpreter and a complete Prolog interpreter with DEC- 10 Prolog syntax. Experteach requires only 256K of memory. Intelliware, Inc. . 4676 Admiralty Way Suite 401 Marina del Rev. CA 90291 (213) 827-1334 Dlnlroduction to Expert System Concepts. On-line Tutorial. Case Studies. Bibliography and Pascal Based Tools $99.00. DLisp, Prolog or dBASE II Based Tools $99.00 each. DComplete Experteach System with Lisp and Prolog Interpreters. $475.00 Check. Money order. Visa or Mastercard. $9.00 for posuige and handling. California. , 6.5% lax. tU OJ H XI •h 3 IT) r-l > O PROOFWRITER™ For the IBM, Tl, PC, XT, or AT's and Compatibles Word Processor, Program Editor, & Spelling Checker For Scientific and Multilingual Applications Features: Scientific & Foreign Language symbols easily entered & printed. Equation mode & macros. Extensive Footnote & Endnote capabilities. Files easily interfaced with mainframe/minicomputers. Supports over 35 popular printers. All special characters shown on screen with: PROOFWRITER INTERNATIONAL/SCIENTIFIC $300 Plus CHARACTER PROM $1 25 (21 PROMS now available) — OR — PROOFWRITER GRAPHICS $425 (Software designed screen characters) 2 Disk Drives with 1 being Double Sided/256KB DEMO DISK $5 VISA/MC IMAGE PROOFING SYSTEMS 6409 Appalachian Way P.O. Box 5016 Madison, Wl 53705 U.S.A. (608) 233-5033 se SCOT (D IT H O w e O H i-t A ta ft 3 3 H 3 CD w & H H C It B h" (D O 3 da 3 < a rt> M M w B> O p 3 3 w n (B DJ a < B) n H' M h- ' & a* H M ft) bd O l-tl W O H H p. (n rt 3" CD 278 Fall 1985 BYTE- Inside the IBM PCs Inquiry 57 Inquiry 92 GRAPHICS Many programmers make the mistake of trying to use overly com- plex VDI primitives to do simple things, or, conversely, they may fail to take advantage of VDI commands in doing complex things. For instance, you might use many short polyline statements to draw a dashed line in- stead of setting the line style to "dashed" and drawing a single poly- line. Or you might use four draw line commands to draw a rectangle when one four-point draw polyline would do the same thing in one-fourth the code. Programmers may have a difficult time with the VDI in the beginning there are so many different ways to combine the high-level commands to achieve the same picture that ineffi- ciencies can result. For instance, there may be 10 different ways to draw a blue circle inside a green box using VDI commands. While VDI documen- tation covers the most straightforward uses for each graphics primitive, it cannot possibly list every possible combination. Programmers must draw on their own programming ex- perience and creativity to develop op- timum VDI programming techniques. CGA VS. EGA Even without the VDI, the perfor- mance drop in moving from the CGA to the EGA is dramatic. A high-reso- lution card will usually have lower per- formance than even a closely related low-resolution card; there are simply more pixels to manipulate for every visual representation. Thus, program- mers moving from a CGA to an EGA environment should be prepared for a significant performance degrada- tion. Conclusion The EGA is an extremely capable but complex device. It produces beautiful images for users hungry for high- resolution graphics, but it presents the application developer with special programming challenges that the CGA never did. Complex register structure, multiple modes, multiple RAM configurations, multiple moni- tors, and indirect access to the bit- map memory make programming the EGA a challenge. Not only is direct programming of the EGA difficult, but the programs are limited to the specific mode/RAM/ monitor combination(s) for which they were written and cannot be moved to other combinations or to future cards and monitors without extensive change. Making a program run on multiple EGA modes, multiple CGA modes, and future graphic cards re- quires a mammoth programming effort. The Virtual Device Interface offers a viable means of writing application software for these rapidly changing, increasingly complex devices. ■ With the Digi-Data 2000 PC V2" tape system you can move data between your IBM PC, XT, or AT and a mainframe or minicomputer. IBM/ANSI compatible 9-track 1600 bpi V2" tape is the only truly standardized and interchangeable medium between the PC and mainframes or minis. The 2000 PC includes tape drive, PC controller board, cables, and complete ready-to-run DOS software utilities for just $3,995. The utilities provide file interchange in ASCII, EBCDIC, or binary — as well as high speed disk backup and restore functions. ___ DlGHDATA Make the PC/Mainframe f corporation connection. Call us today ££ KMS££> at (301) 498-0200. * (301)498-0200 Telex 87-580 In Europe contact: Digi-Data Ltd. • Unit 4 • King's Grove • Maidenhead, Berkshire • England SL6 4DP Telephone No. 0628 29555/6 • Telex 847720 Inquiry 44 Fall I985 BYTE- Inside the IBM PCs 279 Introducing The E ADVANCED TECHNOLOGY COMPUTER BT/AT 44 Mb Hard Disk Drive. 640K Interna] RAM. 8 I/O Expansion Slots. 1.2 Mb Floppy Disk Drive. 2 Asynch Serial Communication Ports. 2 Parallel Printer Ports. LU tUCEDB Monochrome Graphics Adapter (720 x 348). Monochrome Monitor (Green). Tilt/Swivel Monitor Base. IBM PC AT Hardware and Software Compatiblity. GW-BASICand MS-DOS 3.1. PC KEYBOARD BT5151 AT KEYBOARD BT5161 Solid State Capacitive Key Switches. 3-Position Height Adjustment. Keys In Standard Type- writer Positions. Seperate Cursor Control and Numeric Keypads. Easy-To-Read Key Legends LED Indicators For All Lock Keys. HIGH RESOLUTION MONOCHROME MONITORS HR 39 (Green) HR 134 (Amber) Plugs Into The IBM Monochrome or Compatible Adapter. 720 x 350 Resolution. 12" Diagonal Screen. Super Crisp Text Capability. High Resolution TTL. Tilt/Swivel Base. BACKUP POWER SOURCE AT800 XT300 SB200 Battery Powered Up To 30 Minutes. Surge Suppression/ Noise Filtering. Brownout Protection. 800, 300, 200 Watt Models. MONOCHROME CARD HR720 COLOR CARD HR640 Complete IBM Compatibility. High Resolution Graphics Capabilities. HIGH RESOLUTION COLOR MONITORS HR31 200 HR31 350 (Enhanced) ,31mm Dot Pitch. 14" Diagonal Screen. Black Matrix Picture Tube Plugs Into IBM Color/Graphics or Compatible Adapter Card. Resolution (640 x 200). Enhanced (640 x 350). Tilt/Swivel Base. PC HARD DISK SUBSYSTEMS BT20 (Internal) BT20E (External) 20 Megabyte Capacity. Boot From The Hard Disk-No Software Patches or Drivers. Runs All The Popular Software Designed For The XT. High Reliability and Durability— Specially Plated Drives. Includes ldir "Visual Shell" and Xydex Software, Bezels. 280 Fall 1985 BYTE- Inside the IBM PCs T/Integrator Series PC MULTIFUNCTION CARD BT6Plus Add 64K To 384K. Parallel Printer Port. Serial Communications Port. Clock/ Calendar. BTPak Software-BTDrive (Electronic Disk Emulation) and BTSpool (Print Spooling) Optional Game Port EXTERNAL MODEM BT212A/1200E Auto-dial, Auto-Answer. 300/1200 Baud Operation. Runs All Hayes Compatible Soft- ware Like Crosstalk, Relay, Smartcom II, and Sidekick. RS-232C Compatible. Snap Hatch For Switch Access. Eight Status Indicator Lamps. External Volume Control Knob. SPOOLING TAPE BACKUP BT/SP10E 10 Megabyte Capacity Reels. Backs Up 20 Megs In 30 Min. File By File Recovery. Uses Standard l/4"Tape Reels. AT ENHANCEMENT KIT-1 BT44 (44 Megabyte) BT70 (70 Megabyte) Combined With The AT4X4Plus-512K. No Other Chips Needed. Runs All The Popular Software Designed For The AT. High Reliability and Durability. Faster Access Time Than AT— 30 msec. AT MULTIFUNCTION CARD AT4X4Plus Add 128K To 4 Mb. Double Split Memory Addressing. 1 To 4 Serial Ports. Parallel Printer Port. Optional Game Port. INTERNAL MODEM PC212A/1200 Auto-dial, Auto- Answer. 300/1200 Baud Operation. Runs All Hayes Compatible Soft- ware Like Crosstalk, Relay, Smartcom II, and Sidekick. Two Phone Jacks. Includes PC-TALK III Software, Modular Phone Cord. Mjto CARTRIDGE TAPE BACKUP BT60Streamer 60 Megabyte Capacity. Backs Up 20 Megs In 12 Min. Image Backup Capability. File By File Recovery. Uses l/4"Data Cartridge. Peripherals designed to enhance systems and sales. Basic Time products are the latest technology and highest quality available today, at prices that will make you competitive. We only sell to VARs, VADs and integrators —end users, contact your dealer for more information. 3350 Scott Blvd., Bldg. 52 Santa Clara, California 95054 Inside California (800) 841-2474 Outside California (800) 323-8437 basic Lime Inquiry 224 Fall 1985 BYTE- Inside the IBM PCs 281 M 1 . ■■ When the World Sells Micros, the Common Language is BYTE. Have you considered your international prospects already? Good. Then you know that capturing this market will have a tremendous impact on your business. Now is the time to plant the seeds of recognition — the international micro industry is taking off. In fact, in Europe alone, annual micro sales are in the billions of dollars. So how are you going to do it? Let BYTE offer you a solution: we have over 50,000 paid readers outside the North American continent — plus 127,000 pass-along readers — all of whom comprise the most select audience for your advertising investment. BYTE is the micro medium that communicates your sales message in a language understood all over the world. And BYTE is the only U.S.-based micro publication to earn the reputation as the international standard. BYTE also offers a special International Advertising Section (IAS) which allows you to advertise your products only to BYTE readers outside the North American ftnft SS continent at reduced rates. Call your regional sales representative to find out how BYTE can speak for you. . .all over the world. For advertising information, call: Austria, Vienna Hans Csokor 75 76 84 France, Paris Jean Christian Acis 720 33 42 Hong Kong Seavex, Ltd. 260149 Israel, Bat Yam Gurit Gepner 866 561 321 39 Italy, Milan Savio Pesavento 86 90 656 Japan, Tokyo Hiro Morita 581-9811 Singapore Seavex, Ltd. 734-9790 Spain, Madrid Maria Sarmiento 45 52 891 Sweden, Nacka Andrew Karnig 44 0005 U.K., London Arthur Scheffer 493 1451 W. Germany, Frankfurt Fritz Krusebecker 72 01 81 U.S.A. Dennis J. Riley (603) 924-9281 BYTE. The Official Translator of the Micro World. EITE THE SMALL SYSTEMS JOURNAL 70 Main Street Peterborough, NH 03458 (603) 924-9281 282 subscription information in Europe, call Jean Tobias in England: 628-23431. Fall 1985 BYTE- Inside the IBM PCs IBM SPECIAL ISSUE IBM PC Disk Performance and the Interleave Factor How the distribution sequence of sectors on a disk affects read/write performance by Marcus Kolod MANY FACTORS AFFECT the perfor- mance of fixed and floppy disks, in- cluding read/write-head seek time and disk rotational delay, or latency. A lesser known but important and alter- able component of the performance curve is the distribution sequence of the sectors on a disk. This sequence is called the interleave pattern, and it defines the sector skewing of the disk. This article examines some of the factors relating to disk performance and outlines a benchmarking method for testing different interleaving values. We'll discover how interleaving affects the performance of the IBM PC XT and AT. For a discussion of some of the im- portant factors that determine disk performance and capacity, see the accompanying text boxes "Calculating Disk Capacity" and "Disk-Encoding Schemes." Yet Another Hard-Disk Benchmark In the case of a moving-head disk sys- tem, two time components are in- volved in the delay between receiving an address at the disk controller and the beginning of the actual data trans- fer. The first, called seek time, is the time required to move the read/write head to the proper track. This time obviously depends on the initial posi- tion of the head relative to the track specified in the address. Average values in the 30-millisecond (ms) range are typical. The second component is the rotational delay, also called laten- cy time. This is the amount of time that elapses after the head is posi- tioned over the correct track until the starting position of the addressed sec- tor comes under the read/write head. On the average, this is the time for half a rotation of the disk. Assuming a disk spinning at 3600 revolutions per minute (rpm), this is 0.5 (60 sec/3600) = 8.3 ms. The sum of these delays is usually called the disk-access time. The mechanical components of a disk drive are not alterable; the phys- ical sequencing of sectors on a disk are. That is the crux of the following hard-disk benchmarks. To define sector skewing, also called interleaving, picture a disk platter spinning in a disk drive. The sectors in the track over which the head is positioned are passing by the head one after another— sector 1, sector 2, and so on— until the disk has made one complete revolution. Then the se- quence repeats itself. A standard IBM fixed disk spins at 3600 rpm. One rev- olution of the disk (using the 3600 from before, with 17 sectors/track) takes 60/3600 second, about 0.0166 second per track, or 0.9 ms a sector. Now imagine PC-DOS loading a pro- gram or accessing a file from such a disk. PC-DOS takes a finite amount of time to read and process each sector. Assume that it has to make repeated reads to load the file or program. By the time PC-DOS has read and loaded sector n, it will be too late to read sec- tor n + 1. This sector will have already passed by the head and will not come around to position for another 16.6 ms. Proceeding in this fashion, almost two-tenths of a second are needed to read one complete track (this small amount may seem ludi- crous, but these amounts do add up over time). This problem can be overcome by simply numbering the sectors so that there are several physical sectors be- tween each numerically contiguous sector. Figures 1 and 2 show disks for- matted with interleaves of 1 and 3, re- spectively. The interleave value is specified when the disk is formatted. PC-DOS does not permit the altera- tion of the interleave value after the disk is formatted. In older versions of CP/M, a translation table stored in RAM (random-access read/write memory) mapped the logical sectors to the physical sectors on a disk, per- mitting a crude form of changing the pattern of sector reading at any time. Depending on the size and type of files, the wrong interleave can strongly affect performance. It is not a gradual effect, either; if you "miss" the in- terleave, the perceived performance will be very slow. One of the nice fea- tures about PC-DOS is its use of phys- ical-sector numbers in addressing media. This feature leaves the inter- leaving separate and independent of PC-DOS. The primary storage medium I use is the fixed disk. I use floppies primarily for archival purposes and for program distribution. 1 had to know if there was a noticeable dif- ference in disk performance depend- ing on the interleave chosen. To that end, I conducted two logically distinct tests. The first test functions using the following algorithm: 1 . Format the entire drive at a given {continued) Marcus Kolod is a computer consultant with CNA of Chicago and the president of Kolod REsearch, a software-development firm. He can be reached at 2027 VJoodlawn Rd.. North- brook, IL 60062. Fall 1985 BYTE- Inside the IBM PCs 283 INTERLEAVE FACTOR Calculating Disk Capacity The effective data capacity for a floppy disk is calculated in the following manner: (bytes/sector x sectors/track x tracks/side x number of recording surfaces). For a disk with 512 bytes/sector. 8 sectors/track, 40 tracks/side, and 2 sides, the capacity is 512 x 8 x 40 x 2 = 327,680. For the quad-density drives of the PC AT, the capacity is 512 x 15 x 80 x 2 = 1,228,800. The maximum effective data-transfer rate for a 512 bytes/sector, 8 sectors/ track disk is calculated as follows: Assuming a rotational speed of 300 rpm, a complete track can be read or written in 60/300 = 0.2 second. This corresponds to a maximum effective transfer rate of (8 x 512J/0.2 = 20,480 bytes/second. For a 9 sectors/track disk, the byte-transfer rate is (9 x 5 1 2J/0.2 = 23,040 bytes/second. The rotational speed for a 15 sectors/track disk (the highest-supported IBM density in the PC AT) is 360 rpm. Consequently, the rate is (15 x 51 2)/0. 1 66667 = 46.079.9 bytes/second. The advantages derived from the use of Winchester-technology fixed disks include greater density and a larger capacity for a given physical size. This ultimately results in lower-cost units. Another advantage of Winchester tech- nology is that data integrity tends to be greater in sealed units where the storage medium is not exposed to con- taminating elements. Whereas the different floppy-disk formats supported by IBM are derived primarily from software-formatting parameters, with extensions to 2 sides or 1 5 sectors/track with 80 tracks as opposed to 40. the IBM PC XT and PC AT support a variety of hard-disk types. The principles of organization and addressing are the same for both floppy and hard disks. Addressing of data on the fixed disk is accomplished by specifying the surface number, the track number, and the sector number. The effective data capacity for a given fixed-disk drive is calculated in the same manner as for a floppy-disk drive. For a fixed disk with 512 bytes/ sector, 1 7 sectors/track, 306 tracks/side, and 4 sides, the capacity is 512 x 17 x 306 x 4 = 10,653,696 bytes. For the standard IBM-supplied fixed-disk drive in the PC AT, the capacity is 512 x 17 x 615 x 4 - 21,411,840 bytes. The maximum effective data-transfer rate for a 512 bytes/sector. 1 7 sectors/ track disk is calculated as follows: As- suming a rotational speed of 3600 rpm, a complete track can be read or written in 60/3600 = 0.016 second. This corresponds to a byte-transfer rate of (17 x 512)/0.0166666 = 522,239 bytes/second, close to the maximum data transfer possible on the PC bus using standard RAMs. Tables A and B summarize the dif- ferent disk types and sizes for all disks and the standard fixed-disk drives available from IBM. What will follow here is an overview of that information. In PC-DOS versions 1.x, we have to give addresses to a total of 640 sectors. The first 320 sectors are on the first side of the disk and have the same addresses for both single- and double- sided disks. The second side of a double-sided disk has addresses 320 to 639 (140 to 27F hexadecimal). In versions 2.x. the logical-sector numbering scheme has changed. All the sectors on a track (or cylinder) are assigned numbers before moving on to the next track. To get a clear picture of this. 1 will compare the logical-sector numbering between versions 1.x and versions 2.x on a double-sided disk formatted for 8 sectors per track. This change wrought in 2.x minimizes read/write-head movement and con- sequently increases effective data throughput since data access from the other side of the disk is limited only 284 Fall 1985 BYTE- Inside the IBM PCs ILLUSTRATED BY CLAUDIA TANTILLO NTERLEAVE FACTOR by the electronic switching speeds of the read/write heads as opposed to mechanical movement time associated with the read/write armature. Track 0, head has logical-sector numbering through 7. In versions 1.x, the sectors accessed by the second head on that track (track 0, head 1) are numbered 320 through 327. In ver- sions 2.x, they are numbered 8 through 15. The consequences of this dif- ference in logical-sector numbering are usually hidden from you, but some- times you need to know that the dif- ference exists. In versions 3.x, the logical-sector numbering scheme is consistent with that implemented in versions 2.x. The difference here is that the increase in the number of sectors per track (15 possible with a quad-density drive) causes a corresponding increase in the logical-sector numbering. through 14 for track 0, head 0, and 1 5 through 29 for track 0. head 1. Logical-sector numbering on a hard disk follows the pattern established with versions 2.x. All the tracks on one cylinder are numbered before moving on to the next cylinder. The sectors read by head are numbered through 16, those read by head 1 are numbered 17 through 33, those read by head 2 are numbered 34 through 50, and those read by head 3 are numbered 51 through 67. The second cylinder begins at logical sector 68. Tables C and D summarize the over- heads and usable capacities of different media as supported by the different releases of PC-DOS. In addition, they show the increase in the size of PC-DOS over the releases. The format of the PC-DOS overhead with any disk is the same. There is a boot sector allocated, one file- allocation table (FAT), and the root directory. Two copies of the FAT are maintained for integrity. Therefore, the amount of space allocated to the FAT must be doubled when calculating the amount of available space. The formula is total number of sectors (from media- size calculations before) - (one boot sector) - (2 x the number of FAT sectors) - directory-space sectors = total number of usable sectors. The amount of usable space can be misleading, though. In PC-DOS, there is not necessarily a one-to-one corre- spondence between physical sector and addressable space. The smallest addressable unit of space in PC-DOS is the cluster. This cluster corresponds to an entry in a vector, the FAT, which is a map of the available space on the medium. The implications can be seen from table C. Though the total amount of space on a double-sided 9 sectors/ track disk is greater than that of a single-sided 8 sectors/track disk, the amount of addressable space in clusters is not that much greater. 3 54 versus 313. With a cluster size of 1 sector, the smallest amount of space a file can take up is 5 1 2 bytes. With a [continued) Table A: Different disk types for the IBM PC family of machines and information on number of directory entries available, number of tracks and sectors/track, and operating-system support. FAT Number Number byte of sides of tracks Sectors/ track Total sectors available FAT size Directory sectors Directory entries Sectors/ Operating system cluster supported under FE 1 40 FF 2 40 FC 1 40 FD 2 40 F9 2 80 8 8 9 9 15 320 640 360 720 2400 1 1 2 2 7 4 7 4 7 14 64 112 64 112 224 1 1.0,1.1,2.0.2.1,3.0,3.1 2 1.1, 2.0. 2.1, 3.0, 3.1 1 2.0. 2.1, 3.0, 3.1 2 2.0.2.1,3.0,3.1 1 3.0, 3.1 Table B: Hard-disk types provided by IBM for the PC XT and AT and associated data. Total FAT Number Number Sectors/ sectors FAT Directory Directory Sectors/ Operating system byte of sides of tracks track available size sectors entries cluster supported under (XT hard disk, PC-DOS 2.0, 2.1) F8 4 306 17 20,723 8 32 512 8 2.0, 2.1, 3.0, 3.1 (XT hard disk, PC-DOS 3.0, 3.1) F8 4 306 17 20,723 8 32 512 8 2.0, 2.1, 3.0, 3.1 (AT hard disk, PC-DOS 3.0, 3.1) F8 4 615 17 41,735 16 32 512 4 3.0, 3.1 Fall 1 985 BYTE • Inside the IBM PCs • 285 INTERLEAVE FACTOR cluster size of 2 sectors, the smallest amount of space a file can take up is 1024 bytes. This limitation in part stems from the original specification for an FAT entry, which called for a 12-bit number. There can be at most 4093 unique sector numbers. A maximum FAT would occupy 6144 bytes in storage and 12,288 bytes on disk (two copies). Such an FAT could track the allocation of only 2,095,616 bytes of data if a sec- tor is 512 bytes. Obviously, a 10-mega- byte disk surpasses this limitation. The cluster size under PC-DOS 2.0 for a hard disk became 8 sectors. Here again, though the smallest physical addressable unit is a 512-byte sector, the smallest possible file size is 4096 (8 x 512) bytes. With the introduction of PC-DOS 3.0— and continued through PC-DOS 3.1— the FAT entry size has been modified to support either 12 or 16 bits. The maximum addressable amount of clusters can now be 65,535. In addition, on the PC AT hard disk, when it is formatted using PC-DOS 3.x. the cluster size is 4 sectors (2048 bytes). This provides a dramatic increase in the amount of usable space on the PC AT. Interestingly enough, if a PC AT's hard disk has been formatted under PC-DOS 3.x and PC-DOS 2.x is booted on the system, the hard disk will be an invalid drive to PC-DOS. This is because the partitioning specification has also changed under PC-DOS 3.x. The FD1SK utility distributed as part of PC-DOS 3.x can now put an indicator into the partitioning header that in- dicates whether or not 16-bit clusters are used. If, however, PC-DOS 3.x is used to format a standard PC XT hard disk, the format will be compatible with PC-DOS 2.x. Table C: Calculated overhead for various releases of PC-DOS Data sectors Data sectors Clusters Clusters Number Sectors/ PC-DOS available available available available Bytes available Bytes available of sides track version w/o system w/system w/o system w/system w/o system w/system 1 8 1.0 313 289 313 289 160,256 147,968 1 8 1.1 313 286 313 286 160,256 146,432 2 8 1.1 630 603 315 301 322,560 308,224 1 8 2.0 313 235 313 235 160,256 120,320 2 8 2.0 630 552 315 275 322,560 281 ,600 1 9 2.0 351 273 351 273 179,712 139,776 2 9 2.0 708 630 354 314 362,496 321,536 1 8 2.1 313 234 313 234 160,256 119,808 2 8 2.1 630 551 315 275 322,560 281,600 1 9 2.1 351 272 351 272 179,712 139,776 2 9 2.1 308 629 354 314 362,496 321 ,356 1 8 3.0 313 196 313 196 160,256 100,352 2 8 3.0 630 513 315 256 322,560 262,144 1 9 3.0 351 234 351 234 179,712 119,808 2 9 3.0 708 591 354 295 362,496 302,080 2 15 3.0 2371 2254 2371 2254 1,213,952 1,154,048 1 8 3.1 313 193 313 193 160,256 98,816 2 8 3.1 630 510 315 254 322,560 260,096 1 9 3.1 351 231 351 231 179,712 118,272 2 9 3.1 708 588 354 293 362,496 300,032 2 15 3.1 2371 2251 2371 2251 1,213,952 1,152,512 Table D: Hard-disk overhead for various versions of PC-DOS. Fixed- Data sectors Data sectors Clusters Clusters disk PC-DOS available available available available Bytes available Bytes available type version w/o system w/system w/o system w/system w/o system w/system XT 2.0 20,674 20,596 2584 2572 10,584,064 10,534,912 XT 2.1 20,674 20,595 2584 2572 10,584,064 10,534,912 XT 3.0 20,674 20,557 2584 2568 10,518,528 10,534,912 XT 3.1 20,674 20,554 2584 2568 10,518,528 10,534,912 AT 3.0 41,670 41,553 10,417 10,387 21,334,016 21,272,576 AT 3.1 41,670 41,550 10,417 10,386 21,334,016 21,270,528 Fall I985 BYTE- Inside the IBM PCs X-VIEW 86 analyzes, profiles, and debugs DOS application software — for improved performance on the IBM PC and its compatibles. Application Program Unmodified DOS Application — #* — X-VIEW 86 DOS Debug Dynamic Execution Information X-VIEW 86 lets you observe the internal operations of DOS application software. Helps you analyze, debug, test, port, or convert DOS application software — and get faster, more reliable results. Real solutions to technical challenges. Looking for code hot spots? X-VIEW 86 helps you find them fast. Irritated by bugs that DEBUG can't reach? X-VIEW 86 captures them. Sweating over hardware compatibility issues? X-VIEW 86 pinpoints the trouble spots. Struggling with a conversion that just won't work? X-VIEW 86 breaks the deadlock. What X-VIEW 86 does. X-VIEW 86 saves you hours of time-consuming, tedious work. It automatically collects data on application programs: □ memory map references □ I/O space references □ INT call usage □ instruction set usage □ segment usage data X-VIEW 86 can interrupt the application program □ on any processor I/O access □ on any processor INT instruction □ on a specified execution path address □ on a specified memory location reference X-VIEW 86 can also start the application program execution at a specified address. And it displays the results of the analysis on screen. Hardware and software requirements. X-VIEW 86 runs on any member of the IBM PC family — or any operationally-compatible machine that has at least 64 Kbytes of memory. And it's not copy-protected. You use it with PC DOS DEBUG 2.0 or 2.1. Exciting — not expensive. X-VIEW 86 is priced at an affordable $59.95. To order, call 1-800-221-VIEW. In Texas, call 1-800-233-VIEW. Then get ready for a whole new outlook on your work. Inquiry 70 ■ ■ To order X VIEW 86" by credit card, call toll free 1-800-221- VIEW. In Texas call 1-800-233- VIEW or send the coupon today. Customer Service McGraw-Hill Inc. 8111 LBJ Freeway Dallas, Texas 75251 X-VIEW 86'" is $59.95. All orders are subject to acceptance by McGraw- Hill, Inc. Prices are subject to change without notice. D Check enclosed (Make check payable to McGraw-Hill Inc. Orders paid by check are subject to delay.) □ A.E. □ M.C. □ VISA □ D.C. Company . Address _ City Phone _L L Qty -State Zip_ $59.95 Amt Shipping ($2.00 per copy) Texas sales tax ($3.67 per copy) Total Signature Name on card_ Credit card no. Expiration date IBM Is a registered trademark and PC-DOS is a trademark of International Business Machines Corporation. J*** 19 , OlP? INTERLEAVE FACTOR ...waiting for L, programs to compile and link? Use C-terp the complete C interpreter This is the product you've been waiting (and waiting) for! Increase your productivity and avoid agonizing waits. Get instant feedback of your C programs for debugging and rapid prototyping. Then use your compiler for what it does best.. .compiling efficient code ...slowly. C-terp Features • Full K&R C (no compromises) • Complete built-in screen editor- no half-way house, this editor has every- thing you need such as multi-files, inter-file move and copy, etc. etc. For the ultimate in customization, editor source is available for a slight additional charge of $98.00. • Fast- Linking and semi-compilation are breath-takingly fast. (From edit to run completion in a fraction of a second for small programs.) • Convenient- Compiling and running are only a key-stroke or two away. Errors direct you back to the editor with the cursor set to the trouble spot. • Object Module Support- Access functions ana externals in object modules produced by your compiler. New: We are now supporting Microsoft 3.0, Mark Williams & Aztec C in addition to C.I.C86 & Lattice. • Complete Multiple Module Support • Symbolic Debugging- Set breakpoints, single-step, and cfirectly execute C expressions. • Many more features including batch mode and 8087 support. • Price: $300.00 (Demo $45.00) MC, VISA Price of demo includes documentation & shipping within U.S. PA residents add 6% sales tax. Specify compiler. • C-terp runs on the IBM PC (or compatible) under DOS 2.x with a suggested minimum of 256Kb of memory. It can use all the memory available. m FiriM 3207 Hogarth Lane • Collegeville, PA 19426 (215)584-4261 'Trademarks: C86 (Computer Innovations), Lattice (Lattice Inc.) IBM (IBM Corp.), C-terp (Cimpel Software), Microsoft (Microsoft), Aztec (Manx) Disk-Encoding Schemes Encoding schemes are designed to maximize the usable channel capacity of a device. In the 1940s. Claude Shannon of Bell Labs rigorously defined the quantization of informa- tion, channel capacity, and their relationship to transmission. His ideas were originally designed in conjunction with the telephone operating system. If you look at a disk drive as a com- munication channel, the notions created and defined by Shannon show great applicability. Associated with each channel is a maximum capacity. In a perfect channel, data can be stored at this maximum. In the case of a disk, the ability to generate and detect signals is limited by numerous factors, including the magnetic flux (changes per inch) that the medium can support, the size of the magnetic field created by the read/write head, the error in drive rotational speed, and others. Except for mechanical aberrations, the major physical limitation in magnetic recording has to do with the packing density, that is. the number of bits per inch that can be recorded linearly and still be distinguishable. The fewer overall changes in state, the closer the bits can be packed together. Many recording techniques are used. Figure A illustrates some of these. In the non-return-to-zero (NRZ) format, when a 1 follows a 1 or a follows a 0, no change of state can be detected on output. Otherwise, there is a change. A variation of this is non- return-to-zero inverted (NRZI). where a change of state occurs only when there is a 1. A third format, phase encoding (PE), changes state in the middle of every bit. If it is a 1. it generates a negative pulse; if it is a 0, a positive pulse. This, of course, means that if two 0s or two Is follow each other, there is a change of state between them. NRZI. with its fewer changes in state, allows a better packing density than NRZ. However, since it is impossible to tell where some bits start and stop, a clock track must also be recorded with the data. This is not true of PE, which is self-synchronizing and therefore allows higher densities. However, the many reversals PE requires limits the density that it can achieve. Figure A: Different schemes for encoding data on magnetic disks. A recording format called group- code recording (GCR), based on NRZI, achieves much higher densities by encoding the data bits. In NRZI, a string of 0s will have no change of state, causing synchronization problems. GCR overcomes this by encoding 4 data bits into 5-bit patterns, none of which have more than two 0s adjacent nor have more than one at either end. In the 32 combinations possible with 5 bits, 17 meet this requirement. Sixteen of them are used to encode data, and the seventeenth (11111) is used as a synchronization pattern. Another type of recording format is frequency modulation (FM), or Man- chester code. A change of state occurs in the middle of a 1 but not in a 0. There is also a change of state at the 'beginning of every bit. This last change makes this format self-synchroniz- ing—there is always a pulse, either positive or negative, when the next piece of information passes under the head. A variation of this is modified FM, or MFM, which also has the change in the middle of a 1. but has a change of state at the beginning of a bit only when two 0s are adjacent. This, in effect, can double the density because the bit size can be cut in half. IBM uses MFM to define the storing of data in both its floppy-disk drives and fixed disks. 288 Fall 1985 BYTE- Inside the IBM PCs Inquiry 68 INTERLEAVE FACTOR Figure 1: The interleave pattern for disks formatted with an interleave value of 1. (Disks formatted with 17 tracks, numbered in hexadecimal.) Table 1 Times, in milliseconds, for blocked reads on the IBM PC XT. Number of sectors per block accessed Interleave 1 2 3 4 5 6 7 8 1 17.93 35.86 53.79 71.72 89.65 107.58 125.51 143.44 2 18.91 37.82 56.73 75.64 94.55 113.46 132.37 151.28 3 19.89 39.78 59.67 79.56 99.45 119.34 139.23 159.12 4 20.88 41.76 62.64 83.52 104.40 125.28 146.16 167.04 5 21.86 27.02 32.69 37.36 43.52 48.69 54.35 59.02 6 22.84 28.99 35.63 41.29 48.42 54.56 61.23 66.88 7 7.38 14.75 21.64 29.50 35.90 43.28 50.19 58.05 8 8.31 16.63 24.59 33.24 40.80 49.18 57.05 65.91 9 9.34 18.68 27.53 37.36 45.73 55.06 64.13 73.77 10 10.08 20.16 30.24 40.32 50.40 60.48 70.56 80.64 11 11.06 22.12 33.18 44.24 55.30 66.36 77.24 88.48 12 12.04 24.08 36.12 48.16 60.20 72.24 84.28 96.32 13 13.02 26.04 39.06 52.08 65.10 78.12 91.14 104.16 14 14.00 28.01 42.01 56.01 70.01 84.02 98.02 112.02 15 14.98 29.96 44.94 59.92 74.90 89.68 104.86 119.84 liable 2 Times, in milliseconds, for nonblocked reads on the PC XT. Number of sectors accessed Interleave 1 2 3 4 5 6 7 8 1 17.80 34.56 51.71 68.85 86.00 103.15 120.29 137.44 2 18.88 35.54 52.68 69.83 86.98 105.10 122.49 155.07 3 19.86 36.52 53.66 70.81 88.69 121.76 138.91 156.05 4 20.84 37.50 54.65 72.31 105.59 122.74 139.88 157.30 5 21.82 22.06 22.80 24.02 40.93 41.66 43.62 59.82 6 22.80 23.04 23.78 41.17 41.90 42.64 60.03 60.80 7 7.36 24.27 24.27 41.41 41.90 59.05 59.54 61.50 8 8.34 24.76 25.49 42.39 43.13 60.03 60.76 77.66 9 9.32 25.74 26.47 43.37 44.60 61.01 78.15 78.64 10 10.06 26.71 27.45 44.35 61.50 61.99 79.14 81.09 11 11.04 27.69 44.87 45.33 62.48 63.95 80.12 97.26 12 12.02 28.67 45.85 46.31 63.46 80.61 82.36 98.26 13 13.00 29.66 46.81 47.79 64.45 81.59 98.77 100.70 14 13.98 30.64 47.79 64.93 66.16 82.57 99.72 116.86 15 14.96 31.62 48.76 65.91 83.05 84.52 100.69 117.84 At last, the breakthrough you've been seeking in a database management system. FoxBASE "■' is more than just a relational database management system. Because it's written in C, FoxBASE is a highly portable, sophisticated interpreter/compiler that's ultraquick. Very economical. And dBASE II" source compatible (including full macro usage). FoxBASE emits compact object code and makes automatic use of an 8087 or 80287 chip to let you develop and run applications with unsurpassed speed. And for as little as $10 per license, you can distribute FoxBASE with your applications. FoxBASE even comes with a 30day moneyback guarantee. MS-DOS $395. AOS/VS $995. UNIX"* (priced according to host). Don't be outfoxed by the others. Call or write Fox Software today. FOX SOFTWARE, INC. 27475 Holiday Lane, Perrysburg, OH; 43551 419-874-0162 Fall 1985 BYTE- Inside the IBM PCs • 289 INTERLEAVE FACTOR Figure 2: The interleave pattern for disks formatted with an interleave value of 3. {Disks formatted with 17 tracks, numbered in hexadecimal.) Table 3: Times, in milliseconds, for the interleave benchmark, blocked reads, for the IBM PC AT. Number of sectors per jlock accessed Interleave 1 2 3 4 5 6 7 8 1 17.76 35.52 51.81 68.08 85.85 102.62 119.88 136.18 2 9.13 18.25 27.38 36.51 45.64 54.76 63.89 73.02 3 6.17 12.34 18.51 24.68 30.85 37.02 43.19 49.36 4 12.83 25.66 38.49 51.32 64.15 76.98 89.81 102.64 5 7.15 14.30 21.45 28.60 35.75 42.90 50.05 57.20 6 3.21 6.42 9.63 12.84 16.05 19.26 22.74 25.68 7 5.18 10.36 15.54 20.72 25.90 31.08 36.26 41.44 8 14.80 29.60 44.40 59.20 74.00 88.80 103.60 118.40 9 17.02 19.25 21.46 23.69 25.91 28.13 30.35 32.59 10 11.84 23.68 35.52 47.63 59.20 71.04 82.88 94.72 11 13.81 27.63 41.44 55.26 69.07 82.88 96.70 110.51 12 10.11 20.23 30.34 40.45 50.56 60.68 70.79 80.90 13 4.20 8.39 12.59 16.78 20.98 25.17 29.37 33.56 14 10.94 21.87 32.81 43.74 54.68 65.61 76.55 87.48 15 8.14 16.28 24.42 32.56 40.70 48.84 56.98 65.12 Table 4: Times, in milliseconds, for the interleave benchmark, nonblocked reads. for the PC AT. Number of sectors accessec Interleave 1 2 3 4 5 6 7 8 1 17.80 33.79 49.82 65.85 81.88 97.91 113.94 130.48 2 9.13 25.90 26.39 43.17 44.15 60.44 61.91 77.69 3 6.17 22.99 23.26 23.93 40.45 41.58 42.18 57.97 4 12.83 29.60 29.85 46.86 63.14 79.91 81.15 98.16 5 7.16 23.93 24.47 24.91 41.44 42.68 58.70 60.43 6 3.21 19.98 20.23 20.63 21.47 21.96 36.02 38.24 7 5.18 21.95 22.70 22.99 37.50 39.72 41.20 41.69 8 14.80 31.57 46.37 48.84 65.86 82.88 99.51 115.43 9 17.02 18.99 19.24 19.49 19.98 20.98 21.47 21.97 10 11.84 28.61 28.86 45.78 62.16 63.15 80.17 95.69 11 13.82 30.59 30.83 47.85 64.87 80.89 97.67 114.45 12 10.05 26.64 26.89 43.42 44.15 60.41 76.96 78.44 13 4.20 20.97 21.22 21.95 22.45 38.73 38.98 40.41 14 10.85 27.62 27.87 44.40 61.17 62.15 77.94 92.98 15 8.14 24.91 25.41 42.22 42.98 57.72 59.77 61.42 interleave. 2. Set the clock to zero. 3. Read a number of sectors (l through 8) for the entire length of the drive— track by track, cylinder by cylinder— until all sectors on the drive have been read. For example, if reading two sectors, read sectors l and 2, then 2 and 3, then 3 and 4, etc.— access across tracks and cylinders is done automatically. By doing this, the staggered fashion of the reads will closely approximate a random read. 4. Get the ending time. This process continues for interleave values of l through 15. The second test performed the same algorithm with this change: If reading two sectors, read sectors 1 and 2, then 3 and 4, then 5 and 6, etc. This process also continues for inter- leave values of 1 through 15. Tables 1,2,3, and 4 summarize the results of these tests as performed on the PC XT and AT. Looking at the tables, most of the read times are linear with respect to the number of sectors accessed for a given interleave and the required time for that read. With some of the times, noticeably in- terleave 9 on the PC AT, the average access time decreases dramatically as the number of sectors requested increases. Did IBM choose the best interleave? There is a discrepancy between the stated interleave (6) in the DOS 2.0 manual and the interleave that both showed the best times in my test and matched the interleave of a brand- new XT from IBM, namely, 7. Con- sidering that, I think the answer is yes for both machines. IBM has opti- mized its code around single-sector reads. Although DOS may inter- mittently perform multiple-sector reads, it primarily accesses single sectors. If multiple-sector reads are per- formed, it does appear that better in- terleaves exist. ■ I wish to thank les Hodges and Tom Fort- man for their assistance in preparing the materials comprising this article. 290 Fall 1985 B Y T E • Inside the IBM PCs high quality Heinsohnpc/xT IBM PC/XT* COMPATIBLE PRODUCTS DIRECT SALES FROM OUR FACTORY hi.nf.iiii * FULLY IBM PC/XT* COMPATIBLE * 640K ON BOARD MEMORIES * 8 1/0 SLOTS * DUAL HALF HEIGHT DISK DRIVES ' 83 KEYS FULL FUNCTION KEYBOARD * COLOR GRAPHIC ADAPTER * SERIAL AND PARALLEL PORTS * REAL TIME CLOCK WITH CALENDAR * 135 WATT HARD DISK READY POWER SUPPLY * 12" HI-RES MONOCHROME MONITOR ADVANCE SYSTEM: SPECIAL OFFER (FULLY ASSEMBLED AND TESTED WITH 6 MONTHS WARRANTY) ONLY $949 00 *20 MGB HARD DISK SYSTEM ADD ON OPTION PLUS $660 00 COMPARE OUR PRICES FIRST BEFORE YOU BUY! COLOR GRAPHIC ADAPTER RGB & COMPOSITE VIDEO OUTPUT $ 98.00 MONOCHROME CARD 720 x 348 80x25 TEXT MODE W/PRINTER PORT $124.00 FLOPPY DISK CONTROLLER RUN UP TO 4 DRIVES $ 52.00 384 KB MULTIFUNCTION CARD 0KB CLOCK, SERIAL PARALLEL, JOY STICK $139.00 XT COMPATIBLE MOTHER BOARD LOADED 256K RAM W/BIOS. 8 SLOTS $199.00 PARALLEL PRINTER CARD W/CABLE FOR ALL TYPE PARALLEL PRINTERS $ 36.00 RS-232 SERIAL CARD COMMUNICATION CARD $ 53.00 • DUAL RS-232 SERIAL CARD WITH 2 SERIAL PORTS • 0/384K RAM EXPANSION CARD UP GRADE YOUR PC TO 640 K MEMORIES • FLIP TOP CASE • 83 KEYS FULL FUNCTION KEYBOARD • TEAC 55B DISK DRIVE (360 K) • POWER STRIP (6 OUTLETS) W/SURGE PROTECT • JOY STICK (SELF CENTERING) FOR IBM • PARALLEL PRINTER CABLE (6 FT.) • SERIAL MODEM CABLE (6 FT.) • FLIP 'N' SAFE DISK BOX (HOLDS 100 5Va DISKS) • 135 WATTS POWER SUPPLY $ 75.00 $ 48.00 $ 57.00 $ 78.00 $ 88.00 18.00 23.00 12.00 12.00 $ 9.95 $ 95.00 MAIL AND PHONE ORDERS WELCOME • FOR FAST DELIVERY SEND CASHIER'S CHECK. OR MONEY ORDER PERSONAL AND COMPANY CHECK ALLOW 3 WEEKS TO CLEAR. COD. ORDERS ACCEPTED WITH MONEY ORDER. CASH OR CASHIER'S CHECK ONLY. SHIPPING CHARGES: 5% OF TOTAL PURCHASE. FREE SHIPPING FOR ORDERS OVER S 1,000.00 DIRECT FACTORY PRICES DEALERS INQUIRIES INVITED ■ IBM IS THE REGISTERED TRADE MARK OF IBM CORP Carl Heinsohn International Inc. 1455 MONTEREY PASS RD., SUITE 103, MONTEREY PARK, CA 91754 PHONE: (213)269-1103 TELEX: 3716858 Inquiry 1 30 Fall I985 BYTE- Inside the IBM PCs • 291 DATA ACQUISITION TO GO INTERFACE FOR ANY COMPUTER Connects via RS-232. Built-in BASIC. Stand alone capability. Expandable. Battery Option. Basic system: 16 ch. 12 bit A/D, 2 ch. D/A, 32 bit Digital I/O. Expansion boards available. Direct Bus units for many computers. SPECIALISTS IN PORTABLE APPLICATIONS (201) 299-1615 P.O. Box 246, Morris Plains, NJ 07950 ELEXOR DOUBLE THE OPTION CAPACITY OF YOUR IBM PERSONAL COMPUTER PC-XTRA • DIRECT EXTENSION OF IBM PC BUS • NO SOFTWARE CHANOES • NO HARDWARE MODIFICATION • STYLING CONSISTENT WITH IBI Add all thoseapacial options that you've been wanting without worrying about lilting your ..plug-In and back panel space DEALER INOUnmSINVIIED S 549 00 ' FOB. SANTA ANA _ •CAtlFORNIA RESIOENTS ADD A 1 * SALES TAX PC HORIZONS, INC. 1701 E. Edinger, Ste. A6, Santa Ana, CA 92680 (714) 953-5396 iiTHfin /xri/ Atvin For the IBM PC. XT. AT. PCjr, and Compatibles 1 ILU1 PC102 precisely emulates DEC VT102. 101 . 100. and VT52 terminals PC4010 includes all PC102 features plus Tektronix 4010 graphics -— - A few reasons why thousands ol customers- including GE, Dow. Raytheon, Westing ho use. and Stantord University — preler our products. n| • Complete keyboard and screen emulation B w/line graphics (optional 132-columns) • ANSI color, local printer, bidirectional file transfer support :~Z • Guaranteed compatibility with all DEC applications including EDT. WORD-11. ALL-IN-ONE, DEC-CALC. UNIX vi ™i • New DOS shell key, ten programmable softkeys, plus full DOS 2.X-3.X path names. • Written in C and ASM up lo 38 4 KB 1 PC102-JR _ _ 989.00 PC102 $139.00 (fwPC.XT.Al.ONX) 30-DAY money back guarantee 1 PC4010 $179.00 CALL PlL-pdiil.COD Mastercard VISA ' ODAY H^ 6440 Flying Cloud Or. G6NIERRL micfio 1 svsTems Minneapolis, MN 55344 612) 944-0593 Inquiry 55 Inquiry 145 Inquiry 71 NEW LOCKIT II • Password Protected Subdirectories • Hides files-makes files Read-Only • Runs on any PC or compatible with Hard Disk under DOS 2.0 or Higher — • Easy to use - only $79.95 LOCKIT I Password Enabled Boot-up For IBM PC or PC/XT Optional Hard-Disk-Only Boot. Invulnerable! $129.95 PC RESET/QUICKON • Reset without turning off power • Eliminate turn-on & Reboot wait • Saves time, frustration & damage to PC & PC/XT $89.95 Specify PC or XT, MC/VISA Security 16 Fiagg Place Microsystems suite 102B Consultants s.i., ny 10304 (718) 667-1019 PC EXPANSIONS AST SixPakPlus (64k) $259 SixPakPlus (384 k) $299 MegaPlus (64k) $269 Advantage (128k) $419 Advantage (1 .5 M) $639 I/O Plus $129 PCnel - starter kit $809 Quadboard (64k) $199 Quadboard (384 k) $249 Quadmeg-AT(128k) $319 Quadmeg-AT (2M) $609 Quadporl-AT. $105 HERCULES graphics board $319 Color Card with PP $159 HAYES Modems: 2400 $call Smartmodem 1 200 $409 Smartmodem 1 200B $379 Set of 9 chips (64k) $10 256k chips (each) $4 8087 chip $119 Maynard Disk Controller $100 Sandstar Series $call Internal Hard Disks Irom $609 MaynStreamtapebackupfrom. . $979 Oume 142A $109 Teac FD55B $109 Tandon TM 100-2 $109 CDC 9409 $119 Verbatim Dalaltle disks (10) $25 VLM Computer Electronics 10 Park Place • Mornstown, NJ 07960 (201) 267-3268 Visa, MC Check or COD. r ElECTfiONICS DATA SWITCHES SHARE computers, printers. any parallel or serial device ELIMINATE cable swapping INEXPENSIVE way to nelwork COMPATIBLE with all computers. Businesses. Schools, Homes WE ALSO OFFER: Data Buffers, Line Drivers, Modems, Protocol Converters, Parallel - Serial Converters, Cables, Computers, Printers, Disk Drives, and more. AUTOMATIC - CARETAKER is ideal for a business or school lo share a printer or modem among many computers. Operalion is fully automatic with no software required. Parallel or Serial 4 channels - $295 8 channels - $395 MANUAL - HAHDSWITCH is operated with the flip of a switch. 2:2 and 2:4 models allow simultaneous commun- ication. Serial 1:2 - $99 1:4 - $159 2:2 - $189 2:4 - $279 Parallel 1:2 - $79 1:4 - $139 2:2 - $119 2:4 - $199 LED and spike proleclion on serial models add $20. CODE ACTIVATED - PORTER connects one computer to multiple peripherals. A software code selects the peripheral Parallel or Serial 4 channels - $295 8 channels - $395 Buffer option 64K - $100 256K - $250 REMOTE • TELEPATH connects multiple computers to multiple peripherals. A selector at each computer or terminal chooses up to 4 peripherals and displays busy status. 4:4 -$495 4:8 -$795 selector - $39. ^^^^^^^^^ (five n iR&ic. to ifout co m p u tet ^^^^=^^^^= ROSE ELECTRONICS (713) 933-7673 P.O. BOX 7*2571 MC & VISA Acceptnd HOUSTON. TX 77274 Dealer Inquiries Invited CALL US FOR ALL YOUR INTERFACE NEEDS Inquiry 1 78 Inquiry 234 ATTENTION IEGABYTERS Let your PC grow! Vfeature for IBM AT, XT and compatibles supports BIG disks secures disk data. Vfeeture operates with AT and XT-compatible hard disk controllers. Golden Bow Systems $80.00 Add S3 lor shipping/ hamtllng CiMtoima reiidenis arid 6% sales ta» 3368 Second Ave.. Suite F Sin Diego, CA 92103 (619) 298-9349 68000 Cross Assembler Motorola VERSAdos + Compatible Assembler, Linker, Object and Macro Librarian. Absolute and Relocatable Code, Macros, In- cludes, and Conditional Assembly. Structured Programming. No limit on source file size. Unix (C) Compatible Source $700 CP/M-80' PC/DOSt CP/M-86* $200 $250 $250 Manual: $20 (refundable) farbware (312) 251-5310 flBM lr.iiliirii.irk. + Mrjkirola trademark 1329 Gregory Wilmette, IL 60091 m ,Q, BASF SS / DD $ Soft .89 FLEXYDISKS 10-90 100- • Wm ea. DS/DD $H AO Soft \.\JC High Density $Q 1 C $Q flE (IBM - AT) 0. IC/ea 0.U0 3.5 / SS Micro In Stock — Immediate Shipment. Mastercard, VISA, Check or Money Order. Add $3.00 shipping charges per each 100 or pari. Add $2.50 additional for COD. shipments. N.J. residents add 6% sales tax. Data Exchange Dept. B, P.O. Box 993 178 Route 206 South Somerville, N.J. 08876 (201) 874-5050 $ 2.KL $ 2.05 Inquiry 75 Inquiry 62 Inquiry 42 TOLL FREE 800-854-8230 CA Residents 71 4-558-881 3 OUR POLICY Inquiry 7 • Surcharge for VISA or Mastercard. • Volume purchasing agreements available. •Orders subject to availablity. • Pricing subject to change without notice. •ACP Retail Store pricing may vary. Not responsible for typos. I I I l I l l I I I I I I I I I I I I H&SS LIQUIDATION Retail Value $5000 Save up to 60% ACP PRICE NOW ONLY! $ 1985 00 SYSTEM A Base System (see left) PC with 360K Floppy, Keyboard & Mouse. SYSTEM B Base System (see left) plus Add 'I 360K Floppy Drive SYSTEM C Base System plus 12" Green Monitor with Detachable Tilt/Swival Base. • (1) 360K DD/DS Floppy Disk Drive • Mouse with Software • 256K Memory Expandable to 640K on the Motherboard • Deluxe Keyboard with LEDs • Serial Port and Parallel Port • Color or Monochrome Controller • 4.77MHz, 8088 CPU • 100 Watt Switching Supply w/Fan • Three Expansion Slots • Optional 6 Slot Expansion Chassis with Power Supply (add $399) cvctfm f Base System plus 80 Col. x 25 Line j aioicm r j LCD Sc ' reen Base oystem A (as aDOVe) y«J3i).UU 'Assumes required add-in boards to provide same capacity SYSTEM D SYSTEM E SYSTEM CONFIGURATION Base System plus 12" Color Monitor with Detachable Tilt/Swival Base. Base System plus Clr Monitor, 10Mb Hard Disk and Boot Diagnostics. Est IBM List* Your Price $210000 $995.00 $2295 00 $1099.00 $2575 00 $1399 .00 $2995 00 $1699.00 $500000 $1985.00 N/A $1299.00 10 Mb $449.00 HARD DISK w/Controller for IBM'" PC and Compatibles. 10 Mb Standalone $249.00 20 Mb Standalone $419.00 Color 14" RGB Included 10 Mb Hard Disk ACP is proud to make this one-time special offer for a complete computer system that is 110% compatible to IBM™. This is by far the most significant bargain that we at ACP have offered in our 10 year history. This system was successfully designed and manufactured to exceed IBM™'s PC in terms of quality, expansion modularity and capability, aesthetic appearance, and performance. The system design utilizes the latest in state-of-the-art technology including: • VLSI - Large Scale Integration Circuit Design • High Quality 1 00 Watt Switching Supply • Ergonomic CRT Design with Tilt Screen • Complete Integrated System • Professional Molded Packaging and Design • Microsoft Compatible Mouse Function The system is not a Taiwan or Korean knock-off. Each component is specifically designed and specified to meet the highest performance and reliability standards in the industry. It represents the best that Japanese craftsmen have to offer and you will be equally proud to own one of your own. ACP has a limited quantity of these systems in several different configurations. IBM™ PC-DOS™ v1. 1/2.1, MS- DOS™ v2.1 1 and Concurrent v3.1 compatible. We have found no known incompatibility with any IBM™ PC application. Our technical staff has 8.5 Megabytes of various MS-DOS software packages install- ed including Lotus 1-2-3 and Flight Simulator. Each system comes complete with a 90 day warranty. ACP Base System Consists of: IBM PC is a trademark of IBM Corp LQP PRINTER Major Manufacturer Daisy Wheel Model 620 Letter Quality Printer with Serial Interface. Perfect for IBM PC and Compatibles. Prints 25cps and comes with 90 day warranty. List $1495 m W99 With purchase of any system above $395.00 ± PC UPGRADE SPECIAL $095 $ »8 ! 34 SET OF (9) 64K RAMS SET OF (9) 256K FIAMS $5.95 128K PIGGYBACKS IBM Brand ASYNCH INTERFACE CARD List $100 acp $49.95 5 Mb EXTERNAL Sharp IBM Look-a-like w/contr. for IBM PC. Sub-Sys Price:$429.00 External Enclosure Add $195.00 Internal w/controller Sub-System Price: $299.00 DELUXE JOYSTICK $11.95 Compatible w/Atari 2600, 400, 800, VIC-20/ 64 and Apple. Apple re- quires optional cable adapter. Add $2.95 EEEESEdl TOMlpHSS JLO Jifix r^2!IJfAl ine iU\J)2T\3 Retail {at Master* "THE ULTIMATE TIME-SAVER" Have you ever forgotten a File Name? Or you recall the name but not on which Diskette it is located? (XtMASTEK" eliminates this wasted time as it is much more than a Diskette Cataloguer, it is a Diskette Manager! fTlT MASTICK' can extend file names beyond the limits of DOS, so even though you can't remember the actual name, you need only to recall a subject, catagory, comment, etc., that was associated with the file. Just present your Diskettes to (XT MASTER" , it does the rest. For PC's, XT's, Compatables using DOS Ver. 2. Visa, MC, Check - $69.95 + $2.00 Handling (813)546-5672 !■:» \oi Lomim ii,i{i/i;i> \o.\« iris 5191 PARK BLVD. PINELLAS PARK. FL 33565 Compute the Comet with Comet Vision I Track Halley's Comet on your own IBM PC or compatible (with graphics), and follow it among the stars and planets from your own location. •*- Compute the comet's celestial coordinates with display of comet and planet orbits. * See horizon views of Halley's Comet in the sky any time or location during the 85/86 apparition. Introductory software offer: S34.95 plus 2.00 postage and handling. New Mexico residents add 4.375 sales tax. Cashiers check or money order only, mailed same day. Check, allow 3 wks. delivery. „ — _ — — Order from: = Bl_E3 SOLAR INC 201 La Veta Dr. NE, Abq., NM 87108. For information call (505) 848-9001. 'IBM is a registered trademark of International Business Machines Corporation. 3M Diskettes Lifetime Warranty TIRED OF WAITING FOR SERVICE AND PRICE? 9 out of 10 SURVEYED DISK BUYERS PREFERRED NORTH HILLS #1 IN SERVICE AND PRICE 1-800-328-3472 Formatted and hard sectored disks in stock-Dealer inquiries invited. COD, VISA, MASTERCARD All orders shipped within 24 hrs. NORTH HILLS CORP. INTERNATIONAL 3564 Rolling View Dr. White Bear Lake, MN. 55110 MN. call collect— 61 2-770-0485 Inquiry 33 Inquiry 105 Genie Stomps Sidekick Memory resident windowing utility in- cludes: KEY MACROS, DOS Services, Alarm clock, Two calculators, Note- pad/Editor, Rolodex Card file with no limit on # of cards, Calendar, ASCII table, Typewriter, and True cut & paste. Each module loads separately. Not copy protected for PC compats, or Zenith 100. A- -. QK $49 95 for more info, or to order contact: ^\X ADVANCED r^rfrT SOFTWARE IsS \\IJ TECHNOLOGIES 452 West 47 Street NYC, NY 10036 (212) 247-0150 64K-128K-256K DRAMS 80287-8 "80287-3 8087-3-8087-2 8087-1 BITTN6R eiecTRONics 899 SOUTH COAST HIGHWAY LAGUNA BEACH, CA 92651 (714) 497-6200 CALL NOW FOR FREE CATALOG FORMAT-1-2-3 * Loads ANY ASCI I data into 1-2-3 and Symphony ! * On-line Help System! * Send Spreadsheets using E-Mail! * Runs on PC,XT,AT & compatibles * Also Tl Professional & AT&T! * Header feature and more! * Extended Warranty! * Dos 2.0+ with 64K, 1 drive »*$150 MC, VISA, Check, COD RELIABLE SOFTWARE CO. P.O. Box 99 Titusville, FL 32781 (305) 267-2043 (800) 235-6646 Ext. 581 (nat) (800) 235-6647 Ext. 581 (ca) Inquiry 8 Inquiry 1 5 Inquiry 1 70 Universal Machine Independent Assembler MOPI: The only assembler capable of generating machine code for any 8- or 16-bit micro using; a universal sel of instructions, including proce- dural, the manufacturer's or user defined instructions. The first assembler to implement a proposed AL Standard, applicable to any computer; simplifies learn- ing AL, reduces development time, offers limited portability. Simple enough for a beginning pro- grammer, sophisticated enough for experienced computer professionals. For CP/M or PC-DOS - $195 Proposed AL Standard - $10 Special Club, Site, Dealer Rates vocs P.O. Box 3705 Mpls., MN 55403 if MCRORMAT $50 Don't let DOS waste your disk space! Add up to 50)5 more hard disk capacity to your IBM PC, XT, AT or 100)8 compatible by selecting format parameters, including clus- ter & directory size. Fully DOS compatible (3.0 or 3.1). Complete with installation program and res- ident device driver. Replace DOS Format with interactive and infor- mative MCF0RMAT. VISA/MC. MICROCOMPUTER CONCEPTS, INC. 9715 SE 43 Street Mercer Island, WA 98040 (800) 722-8088 (206) 236-2300 OPT-TECH SORT' SORT/MERGE Program for the IBM-PC, XT, AT & Compatibles Btrieve Files Now Supported • Written in assembly language lor high performance Example: 4,000 records of 128 bytes sorted to give key & pointer tile in 30 seconds. COMPARE! • Sort ascending or descending on up to nine fields • Ten input files may be sorted or merged at one time • Supports many file structures & data types • Filesize limited only by your disk space • Output file can be full records, keys or pointers • Can be run Irom keyboard or as a batch command • Can be called as a subroutine to many languages • Easy to use — Fully documented • $99 - VISA, M/C, Check, Money Order. COD, or PO Quantity discounts and OEM licensing available To order or to receive additional information write or call OPT-TECH DATA PROCESSING P.O. Box 678 Zephyr Cove, Nevada 89448 (702) 588-3737 Inquiry 209 Inquiry 1 27 Inquiry 1 44 FORTRON CORPORATION 3255A SELDON COURT, FREMONT, CA 94538 INFORMATION & CALIF. RESIDENTS [415] 490-8171 TLX: 559291 FORTRON FAX: [415] 49D 9156 When choosing a POWER SUPPLY for your PC, XT. AT or Compatibles please consider this. . . — "All look-alike supplies come with some type of warranty, only Fortron's power supplies come with a guarantee backed by a full U.L. rating. Your PC represents a substantial investment, it does not make sense to risk costly downtime due to bargain power supplies, when for a few dollars more you can have the confidence of Fortron quality." Trust in Fortron quality without compromise. FC 5192 «— ..< [200 W. max.] FC 135-40 [140 W. max.] 129° PC/XT For upgrade IBM PC to XT same pin out, same dimension as IBM PC, XT or 8 pin output connectors for Faraday CPU board With 4 drives connectors Low noise DC fan, 110/230 VAC convertible Over current, over voltage, short circuit, thermostat protections U.L, recognition, one year warranty 189° PC/AT Identical dimension & pin-out to IBM AT power supply Faraday type pin-out available W/4 drives connectors High air flow, low noise DC fan, 110/230 VAC convertible OCP, OVP, short circuit, thermostat protections U.L. recognition, one year warranty 119° PC/XT FC 130-40 [130 W. max.] • For Faraday, DTC megaboards, XT compatibles • OCP, OVP, short circuit protections • Match our computer chassis FC-630 • DC fan, 110/230 VAC convertible • U.L. recognition, one year warranty ORDER TOLL FREE [800] 821-9771 Attractive Prices for Dealers/OEM's Please Call for Current Prices! COMPUTER CHASSIS & KEYBOARD FC630 79° For Faraday DTC BRD Rear side switch To use FC 130-40 power supply Complete mount- ing hardware FC 630 A2 99" IBM XT identical To use FC 135-40 power supply Side switch Complete mount- ing parts FC 630 AT 139* IBM AT identical Complete mount- ing hardware LED lamps, speaker optional FC 640 269° Expansion Chassis Ext ./Rev. Adaptor 179°° Comes with 5 slot mother brd., 100 W. power supply, cooling fan Two V2 height drive bracket Dia. im*xn*xw** Ext. /Rev. Adaptor optional FC A27 89° m IBM XT keyboard compatible Enlarged return key Light and num. lock keys FC527 129 c IBM AT keyboard compatible Enlarged return shift key Capacitance low profile key switch FC 230 Floppy Disk Controller • Drives 4x5!4" FDD • IBM compatible • w/cable FC330 Hard Disk Controller • Up to 2 Hard Disk Drives • Fully Buffered I/O Bus • Built-in ECC 189 CT-6020 Color/ Graphic/Printer • 80x25 Hi-Res 40x25 Low-Res • 320 X 200 Dots • Comp. video output • Light pen conn. 139" FC940 RS232 /Real Time Clock • To 9600 Baud • Battery back-up 69°° 59°° Clock only FC 830 512K Memory Expansion • From 64K to 512K • Parity-checked memory for error detection 109™ US.M/UL BITE Subscriber Service P.O. Box 328 Hancock, NH 03449 ■Mi BYTE ADVERTISING SALES STAFF: Dennis J. Riley, Advertising Sales Manager, 70 Main Street, Peterborough, NH 03458, tel. (603) 924-9281 NEW ENGLAND SOUTHEAST SOUTH PACIFIC SOUTHWEST, ROCKY MOUNTAIN ME. NH. VT. MA. Rl. NC. SC. GA, FL, AL. TN SOUTHERN CA, AZ. NM. LAS VEGAS UT. CO, WY. OK. TX. AR. MS. LA EASTERN CANADA Maggie M. Dorvee (4041 252-0626 lack Anderson (714) 557-6292 (214) 458-2400 Paul McPherson Ir. (617) 262-1 160 McGraw-Hill Publications McGraw-Hill Publications McGraw-Hill Publications McGraw-Hill Publications 4170 Ashford-Dunwoody Road- 3001 Red Hill Ave. Prestonwood Tower— Suite 907 575 Boylston Street Suite 420 Building #1 -Suite 222 5151 Beltline Boston, MA 02116 Atlanta. GA 30319 Costa Mesa. CA 92626 Dallas. TX 75240 ATLANTIC MIDWEST Karen Niles (2131 480-5243, 487-1160 WEST COAST SURPLUS NY. NYC. CT. NI (NORTH) 1L. MO. KS. IA. ND. SD, MN. Wl. NB. IN McGraw-Hill Publications AND RETAIL ACCOUNTS Leah Rabinowitz (212) 512-2096 Bob Denmead (312) 751-3740 3333 Wilshire Boulevard #407 Tom Harvey (805) 964-8577 McGraw-Hill Publications McGraw-Hill Publications Los Angeles, CA 900 1 3463 State Street-Suite 256 1221 Avenue of the Americas— Blair Building Santa Barbara. CA 93105 39th Floor 64 5 North Michigan Ave. NORTH PACIFIC New York. NY 10020 Chicago. IL 6061 1 HI. WA. OR. ID. MT. NORTHERN CA. The Buyer's Mart NV (except LAS VEGAS), W. CANADA Karen Burgess (603) 924-9281 Dick McGurk (203) 968-7111 GREAT LAKES, OHIO REGION David lern (415) 362-4600 BYTE Publications McGraw-Hill Publications Ml. OH, PA (ALLEGHENY!. KY. McGraw-Hill Publications 70 Main Street Building A-3rd Floor ONTARIO, CANADA 425 Battery Street Peterborough. NH 03458 777 Long Ridge Road Mike Kisseberth (3131 352-9760 San Francisco, CA 94 1 1 1 Stamford. CT 06902 McGraw-Hill Publications Post Card Mailings 4000 Town Center— Suite 770 Bill McAfee (415) 964-0624 National EAST Southfield, Ml 48075 McGraw-Hill Publications Bradley Browne (603) 924-6166 PA (EAST), Nl (SOUTH). 1000 Elwell Court-Suite 225 BYTE Publications MD, VA, W.VA, DE, D.C. Palo Alto, CA 94303 70 Main Street Daniel Ferro (215) 496-3833 Peterborough. NH 03458 McGraw-Hill Publications Three Parkway Philadelphia. PA 19102 International Advertising Sales Representatives: Mr. Hans Csokor Mrs. Maria Sarmiento Mr, Arthur Scheffer Seavex Ltd. Publimedia Pedro Teixeira 8. Off. 320 McGraw-Hill Publishing Co. 503 Wilson House Reisnerstrasse 61 Iberia Mart 1 34 Dover St. 19-27 Wyndham St. A- 103 7 Vienna. Austria Madrid 4, Spain London W1X 3RA Central, Hong Kong 222 75 76 84 1 45 52 891 England 01 493 1451 Tel: 5-260149 Mrs. Gurit Gepner Mr. Andrew Karnig Mr. Savio Pesavento Telex: 60904 SEVEX HX McGraw-Hill Publishing Co. Andrew Karnig & Associates McGraw-Hill Publishing Co. Hiro Morita PO Box 2 1 56 Finnbodavagen Via Flavio Baracchini I McGraw-Hill Publishing Co. Bat Yam. 59121 Israel S-131 31 Nacka. Sweden 20123 Milan. Italy Overseas Corp. 3 866 561 321 39 8-44 0005 02 86 90 617 Room 1528 Mr. Fritz Krusebecker Mr. Jean Christian Acls Seavex Ltd. Kasumigaseki Bldg, 3-2-5 Kasumigaseki. Chiyoda-Ku Tokyo 100, lapan 3 581 981 1 McGraw-Hill Publishing Co. McGraw-Hill Publishing Co. 400 Orchard Road. #10-01 Liebigstrasse 19 1 7 rue Georges Bizet Singapore 0923 D-6000 Frankfurt/Main 1 F 751 16 Paris Republic of Singapore West Germany France Tel: 734-9790 69 72 01 81 (1) 47-20-33-42 Telex: RS35539 SEAVEX 300 Fall 1985 BYTE • Inside the IBM PCs 4164 2oons 490 41256 isons $2.95 IBM COMPATIBLE INTERFACE CAROS ALL WITH A ONE YEAR WARRANTY MULTIFUNCTION CARD $129.95 ALL THE FEA TURES OF ASTS 6 PACK PLUS AT HALF THE PRICE • CLOCK/CALENDAR • 0-384K RAM < SERIAL PORT • PARALLEL PORT • GAME PORT • SOFTWARE INCLUDED 64K RAM UPGRADE 9/S4.41 PRINTER CABLE $9.95 COLOR GRAPHICS ADAPTOR $99.95 FULLY COMPATIBLE WITH IBM COLOR CARD • 4 VIDEO INTERFACES: RGB. COMPOSITE COLOR, HI-RES COMPOSITE MONOCHROME. CONNECTOR FOR RF MODULATOR • COLOR GRAPHICS MODE: 320 X 200 • MONO GRAPHICS MODE: 640 x 200 ■ LIGHT PEN INTERFACE MONOCHROME GRAPHICS CARD $129.95 FULLY COMPATIBLE WITH IBM MONOCHROME ADAPTOR AND HERCULES GRAPHICS CARD • LOTUS COMPATIBLE • TEXT MODE: 80 X 25 • GRAPHICS MODE: 720 X 348 > PARALLEL PRINTER INTERFACE ■ OPTIONAL SERIAL PORT FLOPPY DISK DRIVE ADAPTOR $59.95 INTERFACES UP TO FOUR STANDARD DISK DRIVES TO IBM PC OR COMPATIBLES ■ INCLUDES CABLE FOR TWO INTERNAL DRIVES 1200 BAUD INTERNAL MODEM FOR IBM INCLUDES PC TALK III COMMUNICATIONS SOFTWARE > HAYES COMPATIBLE • AUTO DIAL/ AUTO ANSWER I AUTO RE-DIAL ON BUSY I INCLUDES SERIAL PORT? ' ONE YEAR WARRANTY EASYDATA-12B $195, WIRE WRAP PROTOTYPE CARDS FR-4 EPOXY GLASS LAMINATE WITH GOLD-PLATED EDGE-CARD FINGERS TEAC DISK DRIVES SHOWN: IBM PR2 BOTH CARDS HA VE SILK SCREENED LEGENDS AND INCLUDES MOUNTING BRACKET FD-55B ds/dd FD-55F ds/quid 589.95 £99.95 IBM-PR1 . IBM-PR2 WITH . 5V AND GROUND PLANE AS ABOVE WITH DECODING LAYOUT $27.95 S29.95 , IBM COMPATIBLE KEYBOARDS DKM-2000 $79.95 ■ FULLY IBM COMPATIBLE ■ 83 KEY WITH CAPACI- TANCE TYPE SWITCHES • LED STATUS INDICATORS FOR CAPS, NUMBER LOCK ■ AUDIBLE CLICK POWER SUPPLY 130 WATTS $99.95 . FOR IBM PC-XT • *5V @ ISA. *12V (5) 4.2A -5V@.5A. -12V(5>.5A • ONE YEAR WARRANTY KB-5151 $99.95 I ENHANCED IBM COMPATIBLE • SEPARATE CURSOR AND NUMERIC KEYPADS ■ CAPS LOCK 8. NUMBER LOCK INDICATORS ■ IMPROVED KEYBOARD LAYOUT 150 WATTS $129.95 IBM STYLE COMPUTER CASE I ATTRACTIVE STEEL CASE. WITH HINGED LID, FITS POPULAR PC/XT COMPATIBLE MOTHER-BOARDS. • SWITCH CUT-OUT ON SIDE FOR PC/XT STYLE POWER SUPPLY • CUT-OUT FOR 8 EXPANSION SLOTS • ALL HARDWARE INCLUDED ONLY $59.95 NECV20 //PD70108 THIS REPLACES THE BOBB TO SPEED UP IBM PC 10 TO 40% * HIGH-SPEED ADDRESS CALCULATION IN HARDWARE * PIN COMPATIBLE WITH 8088 * SUPERSET OF 8086/8088 INSTRUCTION SET „,__ __ * LOW POWER CMOS $20.95 NASHUA DISKETTES 5 1 /4" SOFT SECTOR DS/DD WITH HUB RINGS $9.90 89Cea 79Cea BOX BULK BULK OF 10 QTY 50 OTY 250 NASHUA DISKETTES WERE JUDGED TO HAVE THE HIGHEST POLISH AND RECORDED AMPLITUDE OF ANY DISKETTES TESTED. ISEE "COMPARING FLOPPY DISKS' - . BYTE 9/84| DISKETTE FILE MONITOR STAND UNIT TILTS AND SWIVELS TO PROVIDE THE OPTIMUM VIEWING ANGLE HOLDS 70 5V." DISKETTES ONLY $12.95 §gj ORDER TOLL FREE 800-538-5000 UNBELIEVABLE MONITOR DEALS 100 CPS ESPRIT PRINTER $149.95 •9x9 DOT MATRIX • 100 CPS - BIDIRECTIONAL • FRICTION AND TRACTOR FEED • PROPORTIONAL SPACING ■ 80 COLUMN I PARALLEL AND SERIAL INTERFACES . 8 CHARACTER SETS AND GRAPHICS CABLE TO IBM PC 9.95 . REPLACEMENT RIBBON 11.95 300 BAUD MODEM J# $49.95 INCLUDES ASCII PRO-EZ SOFTWARE {A $100 VALUE IN ITSELF) • FCC APPROVED • BELL SYSTEMS 103 COMPATIBLE • INCLUDES AC ADAPTOR ' AUTO DIAL/ AUTO ANSWER • DIRECT CONNECT TAXAN RGB VISION III MODEL 415 • 18 MHz BAND WIDTH . 640 x 262 PIXEL RESOLUTION • 16 COLORS WITH INTENSITY CONTROL ■ 12" BLACK MATRIX • IBM AND LOTUS COMPATIBLE SAKATA COMPOSITE COLOR MODEL SC-100 TOP RATED FOR APPLE 13" COMPOSITE VIDEO RESOLUTION: 280H x 300V INTERNAL AUDIO AMPLIFIER ONE YEAR WARRANTY CABLE FOR IBM $15.95 SAMWOO MONOCHROME MODEL DM-216B > PERFECT COSMETIC MATCH FOR IBM PC > IBM COMPATIBLE TTL INPUT • 12" NON-GLARE SCREEN I P39 GREEN PHOSPHOR t HI-RES 22 MHz BAND WIDTH $289.95 $169.95 $99.95 VISIT OUR RETAIL STORE LOCATED AT 1256 SOUTH BASCOM AVENUE IN SAN JOSE HOURS: M-W-F, 9-5 TU-TH, 9-9 SAT, 10-3 PLEASE USE YOUR CUSTOMER NUMBER WHEN ORDERING JDR Microdevices 1224 S. Bascom Avenue, San Jose, CA 95128 800-538-5000 • 800-662-6279 (CA) • (408) 995-5430 FAX (408) 275-8415 • Telex 171-110 Inquiry 1 00 © Copyright 1985 JD Ground and S3. 50 for UPS Air. Orders over 1 lb. end foreign orders may require additional snipping charges - please contact our sales department tor the amount. C A. residents must Include applicable sales lax. All merchandise Is warranted tor 90 days unless otherwise stated. Prices are subject to change without notice. We are n responsible lor typographical errors. We reserve the right to limit quantities and to substitute manufacturer. All merchandise subject lo prior sale. THE JDR MICRODEVICES LOGO IS A REGISTERED TRADEMARK OF JDR MICRODEVICES. JDR MICRODEVICES IS A TRADEMARK OP JDR MICRODEVICES. IBM IS A TRADEMARK OF INTERNATIONAL BUSINESS MACHINES. IBM PC 256k. 2 floppies IBM PC 10 MB 256k. 1 or 2 floppies IBM PC 20 MB 256k, 1 or 2 floppies IBM PC 30 MB 256k, 1 or 2 floppies IBM PC 10 + 10 256k, 1 or 2 floppies 10MB HD & 10MB Backup IBM PC 20 + 20 256k, 1 or 2 floppies 20MB HD & 20MB Backup IBM XT 256k, 2 floppies IBM XT 10 MB 256k, 1 or 2 floppies IBM XT 20 MB 256k, 1 or 2 floppies IBM XT 30 MB 256k, 1 or 2 floppies IBM XT 10 + 10 256k, 1 or 2 floppies 10MB HD & 10MB Backup IBM XT 20 + 20 256k, 1 or 2 floppies 20MB HD & 20MB Backup IBM AT 20 MB 512k, 1 or 2 floppies IBM AT 30 MB 512k, 1 or 2 floppies IBM AT 40 MB 512k, 1 or 2 floppies [l I? uul pM II1I1IIIIII1IIIIIII1IIIIIINIII1IIIII j'St I 1u L lU \ iH^mw mm FOR EXTRA SAVINGS Call for the latest prices for your custom configuration. All systems are configured and tested at no extra cost and come only with Compumail's 90 day warranty. IBM AT 20 + 20 512k, 1 or 2 floppies 20MB HD& 20MB Backup IBM AT 30 + 60 512k. 1 or 2 floppies 30MB HD & 60MB Backup IBM AT 40 + 60 512k, 1 or 2 floppies 40MB HD & 60MB Backup COMPAQ PORTABLE 256k, 1 or 2 floppies COMPAQ PORTABLE 10 MB 256k, 1 or 2 floppies COMPAQ DESKPRO 10 MB 640k, 1 or 2 floppies COMPAQ DESKPRO 10 + 10 10MB HD& 10MB Backup COMPAQ DESKPRO 20 MB Backup Available COMPAQ DESKPRO 30 MB Backup Available COMPAQ DESKPRO 40 MB Backup Available COMPAQ PORTABLE 286 Custom Configurations COMPAQ DESKPRO 2B6 Custom Configurations IBM XT COMPATIBLE Custom Configurations IBM AT COMPATIBLE Custom Configurations IBM COMPATIBLES ARE YOUR LOW COST ALLTERNATIVE • PRICE WAR • auusLAST WITH YOUR BEST QUOTES PRINTERS EPSON Daisy Wheel DX-10/DX-15 CALL FX-85 + NLQ. . . $339 FX-185 + NL0. . . $459 Sht Fdr FX-85/FX-185 $249/$299 NLO Upgrade Kit for FX-80/FX-100 CALL LX-80/HI-80/JX-80 $219/5359/5469 Traclor LX-80/FX-B0/HI-80 $50/$60/$70 LQ-1500 w/Parallel Module $889 LO Tract/Sing/Dual Sht Fdr .570/5450/5750 LX-90 w/Par Interface & Tractor $279 OKIDATA TOO LOW TO QUOTE OKIMATE 20 w/IBM Plug & Print 182-P/182-IBM 192-P/192-IBM 193-P/193-IBM 84-P/84-IBM 192Traclor $70 2410 P IBM. .. .CALL TOSHIBA 1340P $499 TOSHIBA 351P 'REDUCED" $1049 351 Traclor/Shl Fdr 5190/5790 JUKI 6100/6200/6300 5349/5549/5679 6X00 Tractor/Shi Fdr $1 50/5250 5510P(160cps). $369 5510 Color Kit. .5150 BROTHER TOO LOW TO QUOTE HR-10/HR-15XL CALL HR-15 Trac/Kybrd/Sht Fdr CALL HR-25P/HR-35P CALL HR-25/35 Tractor/Sht Fdr CALL 2024L LQ/Graphics-24 pin, 160/80 cps CALL 2024LSM Fdr-Narrow/Wide CALL TWINRITER 5 World's First Dot Matrix & Daisy Wheel combined in ONE Best Price TWINRITER 5 Trac/Sht Fdr CALL C. ITOH ProWriter Jrw/NLQ $219 8510BPI $309 8510SEP + NLQ.$379 8510SCEP + NLQ $449 1550-EP 5429 1550SEP+NLQ. $519 1550SCEP+NLQ.$619 24LQP $949 A10-30SP $439 Y10-20P $379 AlOTraclor $160 F10-40P 5869 F10-55P 51069 F10 Tractor/Sht Fdr 5190/5290 CX-4800P4 Pen Plotter 5429 QUME LelferPro 20P (20 cps) $399 20P Trac/Sht Fdr 5150/5390 SPRINT 1140 + /1155+ 51299/51399 SPRINT Interface Module 580 SPRINT Trac/Shf Fdr 5210/5690 PANASONIC KX-P3151 LQ (22cps) $459 KX-P1090/91/92/93 . . . .5179/5249/5349/5449 STAR Power Type/SB-10 5329/CALL SG-10/SG-15 (120cps) 5239/5389 SD-10/SD-15(160cps) 5349/5459 SR-10/SR-15(200cps) 5499/5599 NEC PINWRITER P-2/P-3 $499/$699 Sht Fdr lor P-2/P-3 $350/$420 2050/3550/8850 $649/5999/51399 SPINWRITER Trac/Sht Fdr 5190/5790 ELF360Par(16cps) 5419 OIABLO Advantage D-25 5499 630 API. . .51499 630ECS-IBM. . .51599 Trac/Mech Single Bin Sht Fdr $230/$470 CITIZEN: 18 months manufacturer warranty MSP-10/15(160/40cps) $299/5449 MSP-20/25 (200/50cps) 5439/5589 Shi Fdr (Specify Model) $229 LEGEND CP-VII .... $899 1 200 ... . 5259 880/1080/1380/1385. . . $199/5219/5259/5319 ANADEX 9620B/9625B-PLUS 51199/51299 9725B COLOR 51399 WP6000/DP6500 52299/52569 HEWLETT PACKARD PRINTERS CALL SILVER REED Daisywheel - Parallel Models 400/500/550/770 . . .5189/5269/5379/5669 TELEVIDEO 750 Daisywheel-50 cps CALL AB/ABC/ABCD Switch Boxes CALL KENSINGTON Universal Printer Stand 520 FLOPPY/HARD DISKS CDC/MITSUBISHI/PANASONIC/TANDON/TEAC Half Ht DSDD 'REDUCED' 590 Free Mounting Kit wilh 2 Drives CDC/TANDON Full Ht DSDD 599 HARD DISKS for IBM PC/XT MONITORS .'REDUCED' 'REDUCED'. 'REDUCED' REDUCED' .'REDUCED'. 'REDUCED' 'REDUCED' $399 . $649 $529 $799 . 5849 51049 $1049 .$999 $1299 10 MB Int w/Controller 10 MB Ext w/Controller 20 MB Inl w/Controller 20 MB Ext w/Controller 33 MB Int w/Controller 33 MB Ext w/Controller 44 MB Inl w/Controller MAYNARD complete line MAYNSTREAM portable tape backup 20MB MAYNSTREAM portable tape backup 60MB HARD DISKS/BACKUP FOR IBM PC AT CALL GENOA GALAXAY TAPE BACKUPS 20 MB Int/Ext 5749/5849 20 MB Inl/Ext 5999/51099 32 + 60 MB Ext Disk/Backup $2399 TALL GRASS NEW PC/T FORMAT 25/35 MBw/60 MB Backup . 52599/53399 50/80 MB w/60 MB Backup .... 54299/55499 60 MB Tape Backup only $1199 Controller. . .5140 Cartridge (60 MB). . .540 EVEREX 10/20 MB Inl w/Cont 5579/CALL EVEREX 60MB Inl/Ext Tape Backup. . $899/$999 EVEREX Expansion Chasis Half Height . . .5699 EVEREX Expansion Chasis Full Height 5749 INTERDYNE TAPE BACKUP 10 MB Int/Ext. . .'REDUCED'. . . .5369/5549 20 MB Inl/Ext REDUCED' CALL HARD DISKS/BACKUP FOR COMPAQ CALL Bernoulli Box by Iomega10+ 10 CALL Aulo Boot also Available BERNOULLI Box by Iomega 20 + 20 CALL EMULEX JAVELIN HD & BACKUP CALL PWR SUPPLY 130/150 Watts 589/5109 MULTI-FUNCTION CARDS ASTSIXPAK64K 5219 384K. . . .5245 Rampage! Advanlage 0-K 5379 ORCHID Blossom 0-K . .5169 384K. . . $199 Conquest for IBM PC/XT (up lo 2MB) CALL Cram-RAM for IBM XT short slot (up to 2MB) . . CALL Eccell lor IBM AT (up lo 4MB) CALL TECMAR Captain 0-K ..$169 384K . . .5199 MAESTRO AT w/Treasure Chest .... Best Price INTEL Above Board (up lo 4MB) CALL PARADISE 5-Pack 0-K. 5159 384K. . . .5189 BT6Plusw/64k 5175 384k MF-1000-K 5179 384k Par, Ser & Game Ports, Clock/Cal QUADBOARD OK $189 384K Silver Quadboard: 0-K to 640k CALL Gold Quadboard: Multifunction & Color . . . .CALL Quadmeg : AT (up lo 4 MB) CALL Quadport-AT/ Expansion Kit CALL INSTALL RAM & test brd for PC/AT $20/$40 PGS MAX-12/HX-12/HX-12E $169/$4 19/5499 HX-9/HX-9E/SR-12 $419/$499/$549 SR-12w/ScanDoubler $699 SR-12w/Sigma400 $999 TAXAN COMPOSIT 1 15 Green/1 16 Amber . , . $129 MONO 121 Gr/122 Amb $139/5149 COLOR 620 4 text modes 640X262 Res ... . $359 COLOR 630 4 lexl modes 640X400 Res ... . $399 COLOR 640 Top ol the line monitor $489 COLOR 640 w/TAXAN 555 RGB Card $749 COLOR 640 w/Persysl BoB Brd $799 COLOR 640 w/Sigma 400 5939 COLOR 640 w/Sigma 400 & PC Mouse .51039 AMDEK300G/300A/310A(M). . .5139/5149/5159 COLOR 300/500/600 5239/5349/5419 710 $489 w/Tecmar Graphics Master . $899 IBM Enhanced Color Monitor CALL ROLAND MB-142 14 "/Color Monitors . . Best Price TECMAR Color $529 w/Graphics Master . . $939 TILT/SWIVEL Monitor Pedestal $30 DISPLAY CARDS HERCULES MonoGraphics . . . $279 Color ... $149 HERCULES COMPATIBLE MonoGraphics $199 EVEREX The Edge Best Price Ever Graphics Edge Even Belter Price AST Monograph Plus $339/5369 Preview for Mono Graphics $279 Graphpack w/64k $549 PERSYST Short Color/Mini Mono $159/CALL Color Combo: Multifunction & Color . . . Irom $299 Mono Combo: Mullilunction & Mono . . Irom $299 PERSYST BoB Board $339 PERSYST w/TAXAN 440 $799 IBM EGA (Enhanced Graphics Adapter) CALL Gold Quadboard: Multifunction & Color . . CALL STB Chauffer "REDUCED" $299 PARADISE Modular Brd Irom $259 ORCHID Turbo Graphics Controller CALL TECMAR Graphics Master $429 G Master w/TECMAR Color Monitor $939 G Master w/AMDEK 710 Color Monitor . . 5899 GENOA Spectrum Best Price MYLEX Chairman 5399 SIGMA COLOR 400 (specify Monitor) $479 COLOR 400 w/PGS SR-12 $999 COLOR 400 w/TAXAN 440 $939 3 Button PC Mouse w/PC Paint Add $100 CHIPS ETC. $199 $209 .$219 HIGHEST QUALITY! Major Brands 64K RAM Set . . $7 10+ Sels . .$6 50+... $5 128KRAMSet. 535 10+ Sets. .$33 50+ . 530 256K RAM Set . . 530 10+ Sels .528 50+.. 525 8087 Maths Co-Processor Best Price 80287-3 for IBM AT 'REDUCED' 5239 ORCHID PCIurbo w/128k . . . 5549 640k . . . 5699 OUADRAM QUADsprint .... 'REDUCED' ... .$499 MICROWAY'S Fastbreak/# Smasher CALL COMPANY POLICY: Mm. order $100. Prices 8. availability subjeci to change V* ship UPS onry Shippng/hanrJing charges van/. Prices reflect cash discount on prep*) orders. Add 1% for COD orders. 3% rot MC/V1SA & 5% lor AMEX. COD requires cashiers check. All merchandise sold is new and al sales are final- Refused shipments subject to 20% charge (Min S50) Products shipped in factory cartons come with manufacturer warranty. For others, inducing IBM systems, call tech support for return auth. # for warranty repairs. Nco-crafrxij« items returns! as drjtectKe sur^ to ^ ajripalirjilrryol any product No open acctPO's or foreign orders. No showroom, demonstrations or walk-in sates. Personal or company checks lake 3 weeks to dear. FOR ADVANCE PAYMENTS or PICKUP: PLEASE CALL FIRST FOR W3RK0RDER rff. MODEMS EasyData 12B 300/1200 Bd Int w/PCTalk III . $199 SmarTEAM212A 1200 Bd Ext w/osft $209 HAYES 1200Bw/SmartComll $319 HAYES 1200 Ext. w/o Software $349 Smartcom II ... $89 NEW 2400 Bd Ext . $589 HAYES Transet 1000 .... "REDUCED" . . . .$299 POPCOM C-150 Int w/PFS:Access $289 P0PC0MX-150Exlw/PFS:Access $299 AST Reach! 1200 Bd short card w/Crosslalk $359 PROMETHEUS PROMODEM 1200 Ext $269 Options Processor . ..$79 w/Modem .$65 Alphanum Display. .. $79 w/Modem $65 PROMODEM 1200 Ext + Both Options . $399 PROMODEM 1200 B Inl w/MITE software $229 OUADMODEM II shortcard w/Crosstalk XVI . . CALL 2400 Bd Upgrade Kit for Quadmodem II . CALL Ven-Tel Halt Card w/Crosstalk XVI $349 1200 Plus Ext w/o soltware $349 BIZCOMP IntelliModem EXT $319 ST/XL/XT $289/$319/$359 WATSON Integrated Voice Data Modem . CALL EVEREX 1200B Internal w/sollware $249 U.S. ROBOTICS Complete Line CALL SPECIAL ITEMS OBERON OMNI READER A must lor any one using word processing. Works like a scanner, transferring texf from paper to your computer. Reads common type laces. Will save hours ol laborious typing. II is a great technological breakthrough al a very rea- sonable price. Comes complete wilh interface and software for your computer $599 IBM TERMINAL 3161-1 CALL IBM TERMINAL 3161-11 CALL GENERAL Parametric's VideoShow CALL CHORUS PHOTOBASE/PC-EYE CALL MISC. ADD ONS CABLE Parallel, 6ft . . $20 Serial, 6 tt ... $25 Keyboard Extension, 6 ft $10 FLOPPY Drive Controller $109 FLOPPY Controller w/P,S,G& Clock/Cal . . .$199 FLOPPY & HD Controller ..." REDUCED" $299 HAYES Transel 1000 REDUCED . . $299 MOUSE SYSTEMS PC Mouse w/PC Paint ... $129 MICROSOFT MOUSE w/PC Paintbrush Bus/Serial $129/5139 KEYTRONIC KB 5151 .5165 AT Upgrade Kit 515 KB 5153T w/Touch Pad CALL AB/ABC/ABCD Switch Boxes CALL COMPUTER ACCESSORIES P 1-2-3 5299 POWER DIRECTOR P2(5) . $89 P12(6) $129 KENSINGTON Master Piece (5 outlets) . $89 KENSINGTON Universal Printer Stand $20 KENSINGTON Master Piece Plus CALL PC Keyboard Storage Drawer $99 STANDBY PWR SUPPLY w/surge protection 200 Watts 5269 300 Watts CALL 800 Walts (Sine Wave) 5679 TILT/SWIVEL Monitor Pedestal $30 PWR SUPPLY 130/150 Watts 589/5129 EVEREX Expansion Chasis Hall Height $699 EVEREX Expansion Chasis Full Height $749 CALL FOR OUR WEEKLY UNADVERTISED SPECIALS AMERICAN EXPRESS 406-C CONSTITUTION AVE., CAMARILLO, CA 93010 805-987-7015 WHEN ORDERING PLEASE REFER TO AD » S805 302 • Fall 1985 B Y T E • Inside the IBM PCs Inquiry 30 BOMB BYTE's Ongoing Monitor Box BOMB CARD EXPLANATION lust as with your regular issues of BYTE, the editors would like to survey how effectively each article in our 1985 BYTE special issue serves our readers. Please fill out the card opposite the readers' index, mail it in. and look for the tabulation of your votes in the February BYTE. First-place winner will receive a bonus of $100. second-place author will receive $50, and the article that scores third will be mentioned in these pages. Articles written by anyone under the aegis of BYTE automatically forfeit the bonus to the next-placed article. ARTICLE* PAGE ARTICLE AUTHOR(S) 1 1 1 An Annotated Bibliography of Recent Books Crabb 2 39 Public-Domain Utilities Edwards 3 59 ROM BIOS Extensions for the PC AT Norton 4 66 The 8087/80287 Performance Curve Fried 5 92 Moving from the 8088 to the 80286 Claff 6 105 Writing Desk Accessories Wadlow 7 127 A MIDI Recorder Swearingen 8 143 Circuit Design with Lotus l-2-3.Haynes 9 159 Adding a Hard Disk to Your PC AT Shiell. Markoff 10 167 Fixed Disks and the PC AT Shiell, Markoff 11 177 A Survey of Debuggers Drake, McCaffrey, Sadowsky ARTICLE* PAGE ARTICLE AUTHOR(S) 12 187 IBM Compatibility Issues Dahmke 13 195 Benchmarking the Clones Edwards, Hartwig 14 203 Four Hard Disks for Under $1000 Grehan 15 209 Programming the Enhanced Graphics Adapter . . . Wilton 16 223 IBM PC Interrupt Service Routines Dunphy 17 231 Pick, Coherent, and THEOS . . . Rochkind 18 243 One Million Primes Through the Sieve Peng 19 247 TopView Byers 20 2 53 When Your PC Doesn't Work . .Williams 21 2 59 IBM PC Family BIOS Comparison Shiell, Markoff 22 269 Device-Independent Graphics. . Clarkson 23 283 IBM PC Disk Performance and the Interleave Factor Kolod SUBSCRIBERS ONLY!* Use BYTE's Telephone Inquiry Processing System Using TIPS can bring product information as much as 10 days earlier. SEND FOR YOUR 1) If you are a new subscriber or have lost your I.D. card, circle #1 on the Reader Service SUBSCRIBER I.D. CARD Card; attach mailer label. We will immediately send your personal TIPS subscriber card. GET PREPARED 2) Write your Subscriber Number, as printed on your Subscriber I.D. Card, in boxes in Step 5 below. (Do not add O's to fill in blank boxes) 3) Write numbers for information desired in boxes in Step 7b below. (Do not add O's to fill in blank boxes.) CALL TIPS 4) Now, on a Tbuch-Tone telephone dial: (413) 442-2668 and wait for voice commands. ENTER YOUR SUBSCRIBER AND ISSUE NUMBERS 5) When TIPS says: "Enter Subscriber Number" (Enter by pushing the numbers and symbols [# or * enclosed in the boxes] on telephone pad ignoring blank boxes) Enter □□□□□□□□!![! 6) When TIPS says "Enter magazine code & issue code" Enter DH 11 CTJ El IS ffl ffl ENTER YOUR INQUIRIES 7a) When TIPS says "Enter (next) Inquiry Number" Enter one inquiry selection from below (ignore blank boxes) b) Repeat 7a as needed (maximum 17 inquiry numbers) nan ana ana □ DD nan 6. □ □ □ in i 7.DDD1I 8.DOD1I 9. a □ □ ru i io. n a n n. nan 12. a a a i 13.DDDI 14. D D D 15. D D D i6. a a d 17. a a n END SESSION 8) End session by entering SSfflffllffl 9) Hang up after hearing final message If you are a subscriber and need assistance, call (603) 924-9281. If you are not a subscriber fill out the subscription card found in this issue or, call BYTE Circulation 800-258-5485 ♦Domestic and Canadian Subscribers Only! Fall 1985 BYTE- Inside the IBM PCs 303 READER SERVICE Inquiry No. Page No. 221 A.S.T. RESEARCH 8, 9 222 A.S.T. RESEARCH 8. 9 3 AB COMPUTERS 48 4 ACS INT'L 15 5 ADAX INC 42 6 ADDMASTER CORP. 46 7 ADVANCED COMPUTER PROD. INC 293 8 ADVANCED SOFTWARE TECH 294 11 ALPHA LOGIC BUSINESS SYS 80 12 ATRONICS INTERNATIONAL. INC 88 14 BASF SYSTEMS 274, 275 224 BASIC TIME 280, 281 15 BITTNER ELECTRONICS 294 16 BMDP STATISTICAL SOFTWARE 109 17 BORLAND INT'L CM 18 BORLAND INT'L CII • BYTE PUBLICATION 282 • BYTE SUBSCRIBER MESSAGE 245 • BYTE SUBSCRIBER SERVICE 300 21 CANON U.S.A 124, 125 20 CANON U.S.A 175 22 CAPITAL EQUIPMENT CORP. 155 130 CARL HEINSOHN INT'L 291 24 CIVIL COMPUTING CORP. 296 25 CLARITY SOFTWARE 43 • COMPUMAIL 302 31 COMPUTER INNOVATIONS 35 32 COMPUTER MART 189 33 COMPUTERIZED CONCEPTS 294 34 CONQUEST COMPUTER INDUSTR 194 35 CONQUEST COMPUTER INDUSTR 194 36 CONROY-LAPOINTE 27 37 CONROY-LAPOINTE 27 38 CONROY-LAPOINTE 27 39 CUESTA SYSTEMS 24 40 CURTIS. INC 296 41 DATA BASE DECISIONS 6 42 DATA EXCHANGE 292 43 DATA EXCHANGE 296 44 DIGI-DATA CORP. 279 46 DIGITAL PRODUCTS INC 215 47 DIGITALK 239 48 DIRECT AID DATA INC 156 49 DISKWORLD!, INC 297 223 DYNAX 123 50 EARTH COMPUTERS 258 51 EARTH COMPUTERS 258 52 ECOSOFT 208 54 ELEK-TEK 254 55 ELEXOR INC 292 227 ELLIS COMPUTING. INC 221 • EMERALD SYSTEMS CORP. 192, 193 56 EVEREX SYSTEMS 179 57 EXPERTEACH 278 229 EXPRESS COMPUTER 245 58 EXPRESS SYSTEMS INC 266, 267 59 FTG DATA SERVICES 276 60 FTG DATA SERVICES 276 61 FACIT AB 117 62 FARBWARE 292 63 FIFTH GENERATION SYSTEMS 129 64 FLAGSTAFF ENGINEERING 115 65 FLAGSTAFF ENGINEERING 115 66 FORTRON, INC 295 67 FORTRON. INC 295 68 FOX SOFTWARE INC 289 69 FUNK SOFTWARE 47 71 GENERAL MICRO SYSTEMS 292 72 GENOA SYSTEMS CORP. 153 • GIMPEL SOFTWARE 288 73 GLENCO ENGINEERING INC 226 74 GOLDEN BOW SYSTEMS 296 75 GOLDEN BOW SYSTEMS 292 76 GTE PRODUCTS CORP. 185 77 GTE-TELENET 222 78 HAMMER COMPUTER SYSTEMS 50 79 HAMMERLAB CORPORATION 237 80 HARVARD SOFTWORKS 14 81 HAUPPAUGE COMP. WORKS 13 Inquiry No. Page No. 82 HAYES MICROCOMP. PROD. 25 83 HEATH COMPANY 33 85 HERCULES COMPUTER TECH 202 84 HERCULES COMPUTER TECH 246 86 HEWLETT-PACKARD 166 87 HI- TEC COMP. & ELECTR 277 88 HOOLEON COMPANY 72 89 HOOLEON COMPANY 72 90 l-BUS SYSTEMS 162 91 IBEX COMP. CORP. 245 92 IMAGE PROCESSING 278 93 INFOCOM 64, 65 94 INFORMATION BUILDERS 85 95 INTERCONTN. MICRO SYS 87 96 INTERCONTN. MICRO SYS 87 97 |ADE COMP. PROD 298, 299 98 IAMECO ELECTRONICS 21 99 IC INFORMATION SYSTEMS 173 100 IDR MICRODEVICES 301 225 IMC RESEARCH 24 226 IMC RESEARCH 24 102 KAYPRO 107 103 KEY TRONIC CORP. 197 104 KIMTRON CORP. 176 105 KLB SOLAR INC 294 106 KUSTOM ELECTRONICS 190 107 LABORATORY MICROSYS 40 108 LANG-ALLAN INC 48 109 LATTICE. INC 257 110 LEBAUGH SOFTWARE 26 HI LEO ELECTRONICS 245 112 LIFEBOAT ASSOC 271 113 LIFEBOAT ASSOC 273 114 LOGICAL DEVICES 26 115 LOGIQUEST INC 131 116 MACMILLAN SOFTWARE 113 117 MANX SOFTWARE SYS 71 118 MANZANA 2 119 MARC SOFTWARE 200, 201 120 MARC SOFTWARE 200, 201 121 MARK WILLIAMS CO 23 122 MAXELL DATA PRODUCTS CIV 123 MAYNARD ELECTRONICS 5 70 MCGRAW-HILL INC 287 124 MCGRAW-HILL TRAINING SYS 268 125 MCGRAW-HILL TRAINING SYS 268 231 MEGA-OMEGA SYSTEMS 56, 57 126 MICRAY ELECTRONICS 213 128 MICRO DATA BASE SYS 17 129 MICRO DESIGN INT'L 31 131 MICROCOMPUTER ACCESSORIES 58 132 MICROCOMPUTER ACCESSORIES 58 127 MICROCOMPUTER CONCEPTS 294 • MICROMINT. INC 229 • MICROSOFT PRESS 104 134 MICROWAY CHI 135 MICROWAY 45 149 MICROTEK 219 150 MICROTEK 219 136 MULTI-TECH SYSTEMS 55 137 MULTI-TECH SYSTEMS 55 138 NATIONAL MEMORY SYSTEMS 101 139 NATURAL MICROSYSTEMS 139 140 NEW GENERATION SYS 30 141 N1GHTOWL SOFTWARE 227 • NORTH HILLS CORP. 294 • NORTH HILLS CORP. 296 144 OPT-TECH DATA PROCESSING 294 145 PC. HORIZONS INC 292 146 PC NETWORK 140. 141 147 PCS LIMITED 36, 37 151 PHOENIX COMP. PROD. CORP. 79 152 PICK OPERATING SYSTEMS 133 153 POLARIS SOFTWARE 215 154 POLARIS SOFTWARE 215 155 POLYGON ASSOCIATES INC 158 156 PRECISION DATA 296 157 PRECISION PLUS SOFTWARE 271 158 PROGRESSIVE MICRO DISTR 240, 241 Inquiry No. Page No. 161 QUA TECH. INC 54 162 QUADR AM CORP. Ill ' QUAID SOFTWARE LTD 22 163 QUANTEK CORPORATION 126 164 QUANTEK CORPORATION 126 165 QUANTUM SOFTWARE 147 166 QUB1E 102. 103 167 QUICKSOFT 270 168 RANDOM HOUSE SOFTWARE 106 169 RANDOM HOUSE SOFTWARE 273 170 RELIABLE SOFTWARE CO 294 171 RELMS 236 172 RICOH CORPORATION 19 173 ROLAND CORP. 81 234 ROSE ELECTRONICS 292 174 ROSESOFT INC 51 175 SATELLITE SOFTWARE 7 176 SBT CORPORATION 230 177 SBT CORPORATION 230 • SCITOR 191 178 SECURITY MICROSYS. CONSULT 292 179 SOFTCORP INC 119 • SOFTCRAFT INC 74 180 SOFTCRAFT INC. (TX| 18 181 SOFTLOGIC SOLUTIONS INC 149 182 SOFTLOGIC SOLUTIONS INC 151 • SOFTWARE DIRECTIONS 174 183 SOFTWARE LINK. THE 53 184 SOLA ELECTRIC 69 185 SPECTRA FAX CORP. 77 • SPERRY COMP. SYS 186 186 SPRUCE TECHNOLOGY CORP. 38 187 SPSS 165 188 STSC INC 41 189 STSC INC 207 190 SUMMIT SOFTWARE TECHN. INC 220 192 SYNCHRONY SYSTEMS 42 195 TAXAN CORP. 49 196 TAXAN CORP. 49 215 TECH PC 218 216 TECH PC 218 197 TECMAR INC 3 198 TELEBYTE TECHNOLOGY INC 46 53 T1GERTRONICS 54 • TINNEY. ROBERT GRAPHICS 228 199 TOPAZ. INC 75 200 TOPAZ. INC 75 202 TORRINGTON COMPANY. THE 89, 90. 91 203 TW1X EQUIPMENTS AG 29 204 U.S. ROBOTICS 211 205 UNITECH 296 • UNITED SOFTWARE 206 206 UNIVATION 157 207 VISUAL AGE 296 • VLM COMPUTER ELECTR 292 209 VOCS 294 210 VOTRAX, INC 44 211 WALONICK ASSOCIATES 174 212 WARP SPEED COMP. PROD. 142 213 WARP SPEED COMP. PROD 142 232 WESTERN COMPUTER 52 233 WESTERN COMPUTER 52 217 WINTEK CORP. 10 218 WRITING CONSULTANTS 16 228 ZOOM TELEPHONICS 214 219 Z-SOFT CORPORATION 242 220 Z-SOFT CORPORATION 242 * Correspond directly with company. TO GET FURTHER information on the products adver- tised in BYTE, either pick up your touch-tone telephone and use TIPS (if you are a subscriber), or fill out the reader service card. Either way full instructions are pro- vided following this reader service index which is pro- vided as an additional service by the publisher, who assumes no liability for errors or omissions. 304 • Fall 1985 BYTE- Inside the IBM PCs \V»*W^ rtwl 1 9fl i J t _ Triple your PC speed for only $799! 8087 Upgrades MicroWay is the world leader in 8087 support Our 8087 development software has been in use since 1 982. By 1 984 we had become Intel's 97th largest OEM account. When you buy from us, you can be con- fident that you will receive the 8087 chip designed for your PC and that our unique diagnostics will instantly verify that your processor works correctly as installed. Call for current prices. 287Turbo This card plugs into the 80287 socket on your AT or COMPAQ, doubling the 80287 clock from 4 to 8 Mhz. It does not change the 80286 clock speed or affect your warranty. The card comes with an 8 Mhz 80287 and has provisions for faster crystals as better 80287s become available. It also has a reset button and circuit that provide a hardware alternative to CNTRL-ALT-DEL 287Turbo with Diagnostics and Reset $395 Micro Way- Number Smasher" Number Smasher gives you AT speed and 1 00% com- patibility with all PC software and hardware. It comes with a 1 Mhz 8086 and 51 2 K of no wait state RAM. Most are shipped with an optional matched 10 Mhz 8087 and 1 28K daughterboard. The card runs pro- grams a factor of 2.5 to 4.0 faster than the PC, XT or compatibles it runs in. Other features include FASTROM, a Ram Disk, Print Spooler and Disk Cache. Revision 2 of the Smasher is designed and manufac- tured by MicroWay in the U.S.A. and has the best service and support of any accelerator card. 4# MegaPage MicroWay's "Lotus/Intel" extended memory card has all the features of the others plus one: it uses low power, cool running CMOS DRAM. Ask for our pamphlet "Extended vs Expanded Memory" and learn why MegaPage is the right card for you. MegaPage with 2 Megabytes CMOS $549 """"'» w The World Leader in 8087 Support P.O. Box 79, Kingston, Mass. 02364 USA (617) 746-7341 Tempo House, London, U.K. call 01-223-7662 Number Smasher, MegaPage and 287Turbo are trademarks of MicroWay, Inc. MicroWay la a registered trademark ol MicroWay, Inc. J u