,5, iMiimoer the small -systems journal $2.40 in CANADA Someday all terminals will be smart. 128 Functions— software controlled 7x12 matrix, upper/lower case letters 50 to 38,400 baud-selectable 82 x 16 or 92 x 22 format— plus graphics Printer output port "CHERRY" keyboard CT-82 Intelligent Terminal, assembled and tested $795.00 ppd in Cont. U.S. SOUTHWEST TECHNICAL PRODUCTS CORPORATION 219 W. RHAPSODY SAN ANTONIO, TEXAS 78216 Circle 350 on inquiry card. I/O Port #1 Parallel I/O Port #2 I/O Port #3 RS-232 or Current Loop I/O Port #4 Latched Outputs 4 MHz Crystal Clock On Card Voltage Regulation 8KR0M Capacity Standard Bus for System Expandability Programmable Baud Rate U ART with Interval Timers 4 MHz Z-80A Completely Buffered Bus Interface The single card computer * with the features that help you in real life COMPLETE COMPUTER In this advanced card you get a pro- fessional quality computer that meets today's engineering needs. And it's one that's complete. It lets you be up and running fast. All you need is a power supply and your ROM software. The computer itself is super. Fast 4 MHz operation. Capacity for 8K bytes of ROM (uses 2716 PROMs which can be programmed by our new 32K BYTE- SAVER® PROM card). There's also 1K of on-board static RAM. Further, you get straightforward interfacing through an RS-232 serial interface with ultra-fast speed of up to 76,800 baud — software programmable. Other features include 24 bits of bi- directional parallel I/O and five on- board programmable timers. Add to that vectored interrupts. ENORMOUS EXPANDABILITY Besides all these features the Cro- memco single card computer gives you enormous expandability if you ever need it. And it's easy to expand. First, you can expand with the new Cromemco 32K BYTESAVER PROM card mentioned above. Then there's Cromemco's broad line of S100-bus-compatible memory and I/O interface cards. Cards with fea- tures such as relay interface, analog interface, graphics interface, opto- isolator input, and A/D and D/A con- version. RAM and ROM cards, too. Card Cage 32K BYTESAVER PROM card EASY TO USE Another convenience that makes the Model SCC computer easy to use is our Z-80 monitor and 3K Control BASIC (in two ROMs). With this optional software you're ready to go. The monitor gives you 12 commands. The BASIC, with 36 commands/functions, will directly ac- cess I/O ports and memory locations — and call machine language subroutines. Finally, to simplify things to the ulti- mate, we even have convenient card cages. Rugged card cages. They hold cards firmly. No jiggling out of sockets. AVAILABLE NOW/LOW PRICE The Cromemco Model SCC is avail- able now at a low price of only $450 factory assembled ($395 kit). So act today. Get this high-capability computer working for you right away. a Cromemco incorporated Specialists in computers and peripherals 280 BERNARDO AVE., MOUNTAIN VIEW, CA 94040 • (415) 964-7400 Circle 80 on inquiry card. BYTE November 1978 SEE YOUR LOCAL CROMEMCO DEALER Al ASK A DIVERSIFIED DIGITAL BUSINESS COMPUTER SYSTEMS COMPUTE* PRODUCTS UNI IMIIED rE SHOP OF PHOENIX COMPUTER RESEARCH CORP COMPUTER* ARE, INC •TIE SHOP SACRAMENTO COMPUTERLAND OUR LIN ADVENTURES IN COMPUTING COMPUTERIAND Of KAY WARD ALGORITHM PERSONAL COMPUTERS COMPUTERLAND Of W. [OS ANGELES C I IMHUIRL AND SOUTH « HIM, MONT ENTERPRISES, INC COMPUTERLAND LOS ALTOS AMERICAN RECORDER COMPANY COMPUTERLAND SADDLER AC* VI ACCOUNTING 1Y COMPUTER MtCROTECH EXPORTS RYTE SHOP PASADENA COMPUT LB LAND OF SAN CH EGO COMPUTERIAND OF SAN FRANCISCO THE COMPUTER STORE OF S.F TESttOffJolSANJOSE COMPUTERLAND SAN MATEO IE RYTE SHOP Of SANTA CLARA GRANITE RUSINE5S SYSTEMS IE COMPUTER STORE RECREATION AL COMPUTER CENTER, INC COMPUTER LAND 10MOAKS COMPUTERLAND DENVER COMPUTERLAND OF FAIRFIELD IE COMPUTER STORE RYTE OF FT. LAUDERDALE MICRO COMPUTER SYSTEMS, IN COMPUTER AG* MICRO COMPUTER SYSTEMS A TECH ELECTRONICS COM PUTIRLA ND M ARIETTA COMPUTERLAND ARLINGTON H MONSON I BRAITON. IN COMPUTER * CONTROL SI MICROCOMPUTERS, INC LI COMPUTER SYSTEMS IA DOMAIN OF FORI W. DATA DOMAIN Of INDIANAPOLIS COMPUTER CENTER PERSONAL COMPUTE* CENIEK, INC. COMPUTE BLAND Of LOUISVILLE A DOMAIN Of IOUISVILU MICRO RUM NESS SYSTEMS. INC ZEPHYR DATA SYSTEMS INC INTELLIGENT RUSINESS MACHINES COMPUTER WORKSHOP COMPUTBLAMDC COMPUTERS ETC IE COMPUTES STORE UNITED MICROSYSTEMS CORP. JEPSAN, GROUP K COMPUTERLAND GRAND RAPIDS COMPUTE! MART OF ROYAL OA* COMPUTERLAND SOUTHFTEID MINNESOTA MICRO SYSTEMS, INC COMPUTER SYSTEMS CTR ST. LOUIS DATA DYNAMICS, INC. COMPUTERLAND Of N COMPUTER MART OF NEW PERSE* COMPUTERLAND Of MORRWTOWN RYTE SHOP Of RENO COMPUTER SHOP OF SYRACUSE LOUIS SCHAEEFER SYNCHRO-SOUND ENTERPRISES COMPUTERLAND O COMPUTER MART OF Nl COMPUTER HOUSE, INC MINIM 1CROM ART 71ST CENTURY SHOP COMPUTER SOLUTIONS OHIO MICRO SYSTEMS M«lield IMA OH H COMPUTERLAND Of CLEVELAND EAST HIGH TECHNOLOGY TI SHOP OF BEAVER TON REAL OREGON COMPUTER CO. COMPUTERLAND PORTLAND R, DON MEGGER MARK (TUNE SYSTEMS, INC COMPUTER MART Of PENNSYLVANIA COMPUTER POWER, INC ■VTE SHOP Of COLUMBIA COMPUTER WORI1J SURYA CORPORATION COMPUTERLAND AUSTIN MICRO SYSTEMS SERVICES, INC COMPUTERLAND Of 5.W. HOUSTON COMPUTER TEK INTERACTIVE COMPUTERS COMPUTER MART Of W. Tl m MICRO STORE COMPUTERS PLUS, INC. COMPUTER SYSTEMS STORE COMPUTERLAND (f COMPUTERLAND SOUTH KING CITY IE RETAIL COMPUTER STORE COMPUTERLAND I MOM A SOUND WORLD, INC. THE MADISON COMPUTER STORE MILWAUKEE COMPUTER STORE OMICRON MICROCOMPUTERS COLOR IRON Tl INTERNATIONAL < SONTRON INSTRUMENTS COMPUTER ART* EOUCATION COMPUTERLAND SYDNEY AUSTRALIAN COMPUTER PRODUCTS KREIS GES. M.R.FL FIRST CANADIAN COMPUTER STORE TRINTRONICS. LTD. Cjmbs.in ( ljmlPE19 BYTE November 1978 11 Why Apple st selling p< is the worlds ibnal computer. 'hich personal computer will be most enjoyable and rewarding for you? Since we delivered our first Apple® II in April, 1977, more people have chosen our computer than all other personal computers combined. Here are the reasons Apple has become such an overwhelming favorite. Apple is a fully tested and assembled mainframe computer. You won't need to spend weeks and months in assembly. Just take an Apple home, plug it in, hook up your color TV* and any cassette tape deck — and the fun begins. To ensure that the fun never stops, and to keep Apple working hard, we've spent the last year expanding the Apple system. There are new peripherals, new software, and the Apple II Basic Programming Manual. And wait till you see the Apple magazine to keep owners on top of what's new. Apple is so powerful and easy to use that you'll find dozens of applications. There are Apples in major universities, helping teach computer skills. There are Apples in the office, where they're being programmed to control inven- tories, chart stocks and balance the books. And there are Apples at home, where they can help manage the family budget, control your home's environ- ment, teach arithmetic and foreign languages and, of course, enable you to create hundreds of sound and action video games. When you buy an Apple II you're investing in the leading edge of tech- nology. Apple was the first computer to come with BASIC in ROM, for example. And the first computer with up to 48K bytes RAM on one board, using advanced, high density 16K devices. We're working to keep Apple the most up-to-date personal computer money can buy. Apple II delivers the features you need to enjoy the real satisfaction a personal computer can bring, today and in the future. & hi resolution graphics, too. Don't settle for a black and white display! Connect your Apple to a color TV and BASIC gives you instant command of three display modes: Text, 40h x 48v Color-graphics in 15 colors, and a 280h x 192v High Resolution array that lets you plot graphs and compose 3-D images Apple gives you the added capability of combining text and graphics, too. Back to basics, and assembly language too. Apple speaks three languages: fast integer BASIC, floating point BASIC for scientific and financial applications, and 6502 assembly language. That's maximum programming flexibility. And, to preserve user's space, both integer BASIC and monitor are permanently stored in 8K bytes of ROM, so you have an easy-to-use, universal language instantly available. BASIC gives you graphic commands: COLOR=, VLIN, HLIN, PLOT and SCRN. And direct memory access, with PEEK, POKE and CALL commands. Software: Ours and yours. There's a growing selection of pre- programmed software from the Apple Software Bank — Basic Finance, Checkbook, High Resolution Graphics and more. Now there's a User Section in our bank, to make it easy for you to obtain programs developed by other Apple owners. Our Software Bank is your link to Apple owners all 'over the world. Alive with the sound of music. Apple's ex- clusive built-in speaker delivers the added dimension of sound to your programs. Sound to compose electronic music. Sound to liven up games and educational programs. Sound, so that any program can "talk" back to you. That's an example of Apple's "people compatible" design. Another is its light, durable injection- molded case, so you can take Apple with you. And the professional quality, typewriter-style keyboard has n-key rollover, for fast, error-free operator interaction. Apple is the proven computer. Apple is a state-of-the-art single board computer, with advanced LSI design to keep component count to a minimum. That makes it more reliable. If glitches do occur, the fully socketed board and built-in diagnostics sim- plify troubleshooting. In fact, on our assembly line, we use Apples to test new Apples. Apple II plugs into any standard TV using an inexpensive modulator (not included). In California, call 408/996-1010. Apple peripherals are smart peripherals. Watch the far right column of this ad each month for the latest in our grow- ing family of peripherals. We call them "intelligent interfaces." They're smart peripherals, so you can plug them in and run them from BASIC without having to develop custom software. No other personal computer comes close to Apple's expandability. In addi- tion to the built-in video interface, cas- sette I/O, and four A/D inputs with two continuously variable game paddles, Apple has eight peripheral slots, three TTL inputs and fourTTL outputs. Plus a powerful, state-of-the-art switching power supply that can drive all your Apple peripherals. Available now. Apple is in stock and ready for delivery at a store near you. Call us for the dealer nearest you. Or, for more details and a copy of our "Consumer's Guide to Personal Computers," call 800/538-9696** or write Apple Computer, Inc., 10260 Bandley Drive, Cuper- \ tino, CA 95014. ■try card. — , opplc computer Programming is a snap! I'm halfway through Apple's BASIC manual and already I've programmed my own space wars game. Those math programs I wrote last week- 1 just rewrote them using Apple's mini-assembler and got them to run a hundred times faster. New from Apple. Valuable new series of software packages for investors Now private investors can generate their own stock market reports and per- form critical investment analysis instantly with Apple II. Just log your Apple II computer on to Dow Jones' central data bank with powerful Apple software: the Dow Jones Series. The first two of these highly practical programs are available now. _ With Apple's Stock Quote Reporter program, a local tele- phone call links you to Dow Jones' continuously updated stock quotes for more than 6000 com- panies listed on six major U.S. exchanges. Current activity for stocks in the investors portfolio is delivered automatically: ask/open, bid/close, high, low and last prices, and volume traded. Our Portfolio Evaluator enables you to analyze current value of your portfolio, and short- and long-term gain/ loss for each stock — or for your entire portfolio. Cost of Apple's Dow Jones service is a one time contract fee of $25, which includes the Stock Quote Reporter pro- gram. An additional $3 charge is made for the first three minutes of any transac- tion and 50^ per minute thereafter. To take advantage of Apple's new financial services, Apple II users need only a communications card, a modem and an ordinary telephone. This equip- ment, the Dow Jones Series, and a broad selection of other Apple software are now in stock at your local Apple dealer. Circle 15 on inquiry card. Apple's smart peripherals make expansion easy. Just plug 'em in and they're ready to run. I've already added two disks, a printer and the communications card. . - DYN ABYTE COMPUTERS ARE ALL BUSINESS INSIDE AND OUT. When we designed our new small business computers, we meant busi- ness. As basic as that seems, it is unique. Just about every other microcomputer being sold as a small business system today was originally designed as a kit for hobbyists. Every design decision was made with quality and reliability in mind. The result is dependable performance and a solid appearance for business, profes- sional and scientific applications. FIRST SMALL SYSTEM WITH BIG SYSTEM STORAGE Many applications handle large quantities of information, so the DB8/2 uses two quad density 5-inch disk drives with our exclusive Dual Density Disk Controller for up to 1 .2 megabytes of formatted storage. That's more capacity than two single density 8-inch drives. If you need more storage, our DB8/4 has two 8-inch drives with up to 2 megabytes capacity, more than any other dual floppy disk system on the market. OUR SOFTWARE IS BIG ON BUSINESS Dynabyte helps you get down to business immediately. The DB8/2 is the first microcomputer to offer enough storage capacity on 5-inch drives to fully utilize CP/M,* the most widely accepted disk operating system. We also supply and support BASIC, FOR- * CP/M is a trademark of Digital Research. TPvAN and COBOL programming lan- guages. Our applications packages in- clude general ledger, accounts receiv- able, word processing and many other CP/M compatible programs. Reliability is a big consideration in buying a business computer, so we built it in. Our edge connectors meet military specifications, the toughest electronics manufacturing standard. Our regulated power supply is designed to meet U.L. standards, which means the entire sys- tem runs cool and dependable. And our cast aluminum enclosures are rugged as well as attractive. AND THE BIGGEST THING OF ALL Customer support. Our support starts at the factory with testing and burn-in programs that assure the entire integrated system is reliable prior to shipment. Our completely modular de- sign allows continuing support in the field. We maintain a bonded inventory of all sub-system modules which means we can deliver replacement sub- assemblies overnight nearly anywhere in the continental U.S. Dynabyte built in little things, too. Like a fully-populated 12-slot backplane, switched AC outlets for ac- cessories, an option for European power, quiet whisper fans with long-life metal construction, lighted indicator switches for Power On and Halt, a shielded enclosure to protect disk drives from electro-mechanical interference, and a fully enclosed power supply for operator safety. Since we didn't cut comers in de- sign, the price/performance ratios of our systems make good business sense. THE INSIDE FACTS The DB8/2 Computer System in- cludes two 5-inch disk drives either single or double sided for up to 1.2 megabytes of mass storage; a 4MHz Z-80 processing module with one parallel and two serial ports, an EPROM programmer and up to 4k ROM; 32k of RAM, a 12-slot fully- populated backplane; our exclusive Dual Density Disk Controller, and CP/M. The DB8/1 Computer includes a 4MHz Z-80 processor with one parallel and two serial I/O ports, an EPROM programmer and up to 4k of ROM; 32k RAM, and a 12-slot fully-populated backplane. The DB8/4 Disk System, designed to be the mass storage companion to the DB8/1, includes two 8-inch floppy disk drives in either single or double sided configuration for up to 2 megabytes of mass storage, our Dual Density Disk Controller, and CP/M. All three units will be available in rack mount models. For a descriptive brochure and price list, call or write Dynabyte, 1005 Elwell Court, Palo Alto, CA 94303. Phone (415) 965-1010. Or better yet, see your local dealer. DUIiaBUTE YOU CAN DEPEND ON IT. Circle 1 10 on inquiry card. BYTE November 1978 15 An Exchange Evaluator Dan and Kathe Spracklen 10832 Macouba PI San Diego CA 92124 for Computer Chess White Count Pawns Knights Bishops Rooks Queen King Bit Three main tasks are basic to computer chess: generation of moves, evaluation of positions and selection between alternatives. Of these three, the central determining factor in the strength of the program relative to the capacity of the host machine is the evalua- tion segment. The reason for this is that any program must come to grips with the task of move generation, and various tech- niques of "pruning" decision trees are by now widely known. Furthermore, the smaller and slower the host machine, the more importance must be assigned to the evalua- tion facility. If a search can be carried to a great depth of ply, inaccuracies can generally be corrected long before the machine has been committed to a costly line of play. (A ply is a move by one player, ie: half of a complete move involving both players.) On the other hand, if processing limitations Black Byte 1 2 3 4 5 6 7 Byte 8 9 10 11 12 13 14 7 6 5 4 3 2 10 Bit 7 6 5 4 3 2 10 Table 1 : Format of the attacker's array, a 14 byte array divided into two sec- tions, seven bytes for White and seven bytes for Black. The first byte of each section contains the number of attackers (or defenders) in the array. The other six bytes contain the values of the pieces participating in the attack un- der analysis. Since no more than four bits are required per piece, two pieces are stored per byte and the array has a fixed format. The routine that fills the array assigns the first attacker of a given type to the low order four bits of the byte. A subsequent attacker of the same type is added by shifting up the low order four bits and inserting the new attacker. prevent a critical exchange from being examined to its conclusion, then not just accuracy but clairvoyance is demanded. Thus an attack evaluator assumes tremendous importance in a microcomputer chess pro- gram, much more so than in a large scale machine. But the limitations placed on the programmer of an 8 bit machine make it correspondingly more difficult to achieve this type of predictive power. The ability of Sargon (a chess playing program we wrote in Z-80 assembler language) to accu- rately forecast the outcome of an exchange has been the greatest single factor in its success. Some Tactical Considerations First, consider the capabilities desired of the routine. Assume that the computer is faced with evaluating the board position in figure 1. Black possesses a dangerous passed pawn that White has blockaded with a Knight. White is piling up attackers on the pawn and presently assaults it with King, Queen, and from behind the Queen, a Bishop: a total of three attackers. Black defends with Queen, Rook, and Knight; but the Black Knight is pinned against the Black King by White's Bishop, so Black really only has two usable defenders. Does this mean the pawn is lost? No, consider the order in which the exchange would occur. The King cannot legally capture first and the Bishop is behind the Queen, so the Queen must be the first taker. When Black responds with Rook takes Queen, Black has gained considerable material and is under no obliga- tion to go any further with the exchange. To summarize the subtleties involved, the program must recognize transparent attacks through its own pieces which move in the same direction. It must recognize pins (and partial pins such as a Rook pinned along a rank or file). It must understand the relative values of attacking and defending 16 November 1978 ©BYTE Publications Inc pieces, and, finally, it must realize that the exchange may be terminated at any point by either side. Pins are a whole topic in themselves, and Sargon's pinned piece routines will not be discussed in any detail. Instead, we shall concentrate on the exchange routine itself, which weighs the relative merits of the battles engaged on the board. The Data Structures The basic data structure used by the ex- change evaluator is the attackers array. It is a 14 byte area divided into two sections, seven bytes for White and seven for Black. The first byte of each section contains the number of attackers (or defenders) con- tained in the array. The other six bytes in each section store the piece values of the pieces participating in the attack. Since no more than four bits are required, two pieces are stored per byte, and the array has a fixed format. Table 1 illustrates the arrangement within a section. The routine which fills the array assigns the first attacker of a given type to the low order four bits of the byte. A subsequent attacker of the same type is added by shifting up the low order four bits and inserting the new attacker in its place. The instruction used to implement this is the rotate left digit (RLD) (see figure 2). If a piece attacks from behind the Queen, such as the Bishop in figure 1, it is placed in the high order four bits of the Queen byte. From that position it will not come into play in the attack until after the Queen has captured. It is possible for two Rooks to attack through the Queen. In this situa- tion one Rook is stored behind the Queen and the other in the King byte, pushing him up behind the Rook if he is involved in the attack. (By the rules of chess, the King can- not capture unless all defenders are ex- hausted, so he is properly placed behind the Rook.) A note about overflows: the table is nec- essarily limited in size and is adequate for all the pieces originally on the board. If pawn promotions result in multiple pieces and a table overflow occurs, the excess pieces are ignored in evaluating the exchange. An Overview of the Exchange Evaluator The exchange evaluator (XCHNG) oper- ates on a prefilled attacker's array. The array itself is filled by the attack save (ATKSAV) routine as attackers are dis- covered by the attacker's routine (ATTACK). The latter two routines are important, and recent changes to them have resulted in a significant improvement in the performance of Sargon, but they are not discussed in this article. The attacker's array describes a specific battle over a given occupied square. The player who occupies the square is the defender and the player with the opposite color is the attacker. The attacker's section is examined for the lowest valued attacker. That piece is compared in value to the piece on the occupied square. If the attacker is lower in value than the defended piece, we know at once that we can win material by capturing that piece. We don't yet know how much, because the piece may have been totally undefended, or it may be that our lower value piece will be captured in return. For example if our Bishop attacks an enemy Rook, we can be sure at least of "winning the exchange" (a phrase chess buffs use to describe trading a Rook for a minor piece, ie: for a Bishop or Knight). But to find out whether the whole Rook is ours for free or if we must give up our Bishop in return, we must toggle the attacker/defender roles, since our Bishop now occupies the square, and run through the analysis again. Of course back when the Bishop was retrieved from the attacker's array, it was also re- moved, the attack count decremented, and its position filled with zeroes. The evaluation is not so obvious when the attacker is of higher value than the piece on the occupied square. In this case there are only two situations in which you would want to capture. One occurs when the at- tacked piece is totally undefended, and .the ACCUMULATOR (REGISTER A) MEMORY LOCATION 7 4 3 - 7 4 3 Figure 1: Sample board position. White's Bishop is indirectly attacking the pawn, so the value of the Bishop is stored in the high order four bits of the Queen byte (which is directly attacking the pawn) in the attacker's array. See table 1. Figure 2: The Rotating Left Digit (RLD) instruc- tion, used to add attackers to the attacker's array. November 1978 © BYTE Publications Inc 17 V FETCH ATTACKER AND COMPARE TO PIECE Figure 3: Summary of the flow of exchange evalu- ation. If the attacker is of the same value as the piece under potential attack, material cannot be lost by swapping, and the piece may in fact be taken for free. To determine the potential for winning material, assume the cap- ture takes place, switch (or "toggle") the roles of defender and attacker and run through the analysis again. CHECK VALUE OF DEFENDER CHALK UP POINTS GAINED AND TOGGLE The use of computers for industrial automation is sky- rocketing, and engineers are needed to design them. If you're stalled in your present position, we have the opportunities to challenge you. If you are a degreed engineer with hardware or software design experience, call or write Dick Conklin, (216) 943-5500. Babcock& Wilcox Bailey Controls Company 29801 Euclid Ave. Wickliffe, Ohio 44092 An Equal Opportunity Employer M/F other occurs when the attacked piece is defended by a piece of the same or higher value, and we can back up the attack with yet another attacker. Suppose, for example, our Queen attacks an enemy pawn. If the pawn is completely unguarded, we can, of course, take it for free. We might also want to take it if it is defended by the opponent's Queen and we can recapture with, say, a Bishop which attacks from behind our Queen. But any time the attacked piece is defended by a piece of lower value than the attacker, we can terminate the exchange right there, since it would not be to the advantage of the attacker to continue. For example, if our Queen attacked a pawn that was defended by an enemy pawn, we wouldn't consider making the capture. If the attacker is of the same value as the piece on the occupied square, we know we can't lose material by swapping, and the piece might be ours for free. So to find out what we stand to gain, we assume the cap- ture takes place, switch (or "toggle") the attacker/defender roles, and run through the analysis again (see the summary in figure 3). Quantizing the Evaluation We now have a general plan for the flow of the evaluator. What is needed is a means of quantizing the results and coming up with a points total, the exchange residue, which accurately describes that particular battle. The exchange residue is zero at the onset of the analysis and will be adjusted up or down as the evaluation proceeds. At each iteration the number of points at stake is the value of the piece which cur- rently occupies the square in question. If the analysis calls for a capture on the first iteration, the points at stake are added to the exchange residue. Thus the exchange residue will contain the number of points lost by the initial defender (or, conversely, won by the initial attacker). We will main- tain this frame of reference throughout the evaluation. If the analysis requires that attacker/defender roles be toggled, and a capture occurs on the second iteration, the points at stake would be subtracted from the exchange residue. Suppose we again have a situation where our Bishop attacks an enemy Rook. The points at stake are the assumed vakie of the Rook, and let's suppose we value the Rook at five points. We know the analysis will call for Bishop takes Rook, so at that time the five points for the Rook will be added to the initially zero exchange residue. Then 18 November 1978 © BYTE Publications Inc Circle 27 on inquiry card. ULL SIZE FLOPPY DISK $995 COMPLETE I™ full-size floppy disk sys- i overnight success... because rered so complete you can jnning in a single evening. ; $995, it's a complete mem- 8m. Complete with all and software. Corn- em bled. Completely \nd tested as a com- id you can not only solve ur memory shortage faster, u can solve it longer. ..be- jse DISCUS I™ is a full- e floppy system with 3 nes the storage and 5 nes the speed of mini- ppies. ur $995 DISCUS I™ tern includes a Shugart OR full-size drive with wer supply in a hand- ne freestanding cabi- t, our 8-drive capaci- S-100 controller th on-board buffer d serial interface, cables and con- dors, and all the ftware you need. r*. ~ . — i r ■ ir - fl' : ! r-s i O i "\ r- 1 -1 *T 1 ■ O* C* | r, t/> ( i i i ' ' > r^ ' * : % 2 : : a : ■■ ~ £v Thinker Toys <=>-- d ^ b ^* ss caps 9 10 11 ^£c *V? I The Disk Jockey" I . . 5' liiiiiff iiiiif in in iiieiiiiitiiiiiiiiitiiiiiiiiti "CP M i^ a trademark of Digital Research product of Morrow's icro-Stuff for Circle 255 on inquiry card. TOKinKei^^ 1201 10th Street Berkeley, C A 94710 Bi II Vivembti 197* 19 BLACK WHITE (SARGON) White to play. Values used are based on the scale: Queen 9 points Rook 5 points Bishop 3 points Knight 3 points Pawn 1 point Attacker's Array: Count Pawns Knights Bishops Rooks Queen King 3 3 pts 3pts 3 pts 2 1 pt 9 pts White Black Points At Stake Attacker's Value Defender's Value Exchange Residue Onset - - - First Iteration 3 (Black Knight) 3 (White Knight) 1 (Black Pawn) 3 Second Iteration 3 (White Knight) 1 (Black Pawn) 3 (White Knight) Third Iteration 1 (Black Pawn) 3 (White Knight) 9 (Black Queen) 1 Fourth Iteration 3 (White Knight) 9 (Black Queen) 3 (White Bishop) No Change* 1 Black Defends White Defends Black Defends White Defends *Black will not continue at the cost of his Queen. Figure 4: Analysis of a typical chess battle, in this case at the K4 square, ta- ken from the game of Keres versus Najdorf, International Tournament at Margate, 1939. The associated chart shows how the points at stake, attacker's value, defender's value and exchange residue are altered at each successive iteration. the attacker/defender roles are toggled, and if our Bishop, worth say three points, is recaptured, those three points would be subtracted from the exchange residue leaving a current residue of two points. If the battle continues, on the third iteration the points are again added, and on the fourth sub- tracted, etc. Figure 4 gives a typical battle and the associated chart shows how the points at stake, attacker's value, defender's value and exchange residue are altered at each successive iteration. A note on the bounds of the exchange residue is pertinent here. The exchange res- idue will always be a positive number. This is clearly so, since for it to go negative the attacker would have to engage in an unsound exchange, such as the Queen capturing a pawn defended by another pawn as in a pre- vious example. Such an exchange would be a blunder. We will assume that this won't occur on the part of our opponent, and we will eliminate it from our moves. The ex- change residue will also have as a maximum the number of points at stake initially, since the defender will not make a move that will cost more than has already been lost. Thus, < exchange residue < value of attacked piece. Programming the Evaluator Great care is necessary in coding the routine, since it must be executed once for every attacked piece on the board. If we assume that an average of five pieces will be under attack at a time, this means the routine will be executed five times for every board evaluated. Since typically 5,000 to 12,000 board positions will be evaluated by the most recent version of Sargon using a 4 ply search, this means the exchange evaluator may be executed up to 60,000 times in determining a single move. So an inefficiency in execution time as slight as needlessly pushing and popping four registers would be magnified to a total cost of three seconds (assuming a 2 MHz clock) in the time required to process a single move. For this reason chess programmers must quickly become familiar with the relative execution times of their machine's instructions. If the exchange evaluator seems obscure, the 20 November 1978 ©BYTE Publications Inc Micromotion hos done for the S-100 bus whot IDM did for the floppy disk. : : : : : ; • • » • • , • • * * ■ i 1 o ; : : m,' -.L ""iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiimiiiiiiiiiuii Reliably doubled capacity. Double Capacity The DOUBLER — Micromotion's latest advance in floppy disk technology — doubles the capacity of floppy disk systems. Over 500 KBytes are recorded on each side of an 8" disk. This means bigger files for more powerful systems. Double Speed Data transfer with the DOUBLER is twice as fast — 500 Kbits per second. And since there is twice as much data on each track, your drive steps only half as much — so your system runs faster than it ever has before! Increased Reliability That's right — even better reliability. Why? Because we did it the IBM way. IBM designed 2D formatting — so it has to be reliable. Micromotion's innovative, state-of-the-art de- sign incorporates write precompensation electronics and a phase lock oscillator on a single, all digital, S-100 circuit board. So we guarantee the DOUBLER will be more de- pendable than your present single density controller — and we warantee the DOUBLER for a full year. Unbeatable Convenience It couldn't be easier to step up to double density. The DOUBLER operates automatically in either single or double density. Just insert a diskette and you're running properly. You can transfer files between single or double density diskettes without any software or hardware changes — or even oper- ate with one single and one double density diskette. Installation is a snap. There's a hardware UART on board and the software is all ready to go. An onboard 2708 EPROM contains the bootstrap. There's even jump-on-reset circuitry so you can operate without a front panel. And, of course, we include utilities to format diskettes. Universally Versatile The DOUBLER will operate with all industry-standard mini and full-sized drives. And it will work in any 8080 or Z-80 S-1 00 computer operating at 2 to 4 MHz. The DOUBLER will support up to four double or single headed drives. Fully Compatible The DOUBLER is compatible with CP/M* version 1 .4. If you have a CP/M* 1 .4 system, just add our CBIOS — or you can buy our ready-to-boot version. Install the new controller, connect any terminal to the RS-232 interface, and boot off your new double-sized, double-speed system. You still can use all your old software without any changes. Completely Affordable All Micromotion products are fully assembled, thoroughly tested, include complete documentation, and are priced for value: DOUBLER double density controller S 495. MEGADOX dual drive double density system 2,295. ZEPHER — Per Sci double density system 2,595. Z-PLUS — MEGABOX 32 KZ-80 computer 4,295. Available The DOUBLER is available NOW at your local computer store. Micromotion Inc. 524 Union Street Son Francisco Colifornio 94133/ 415 398-0289 Where there's always more in store. Circle 223 on inquiry card. •CP/M is o trodemork of Digital Research. BYTE November 1978 21 Table 2: Map of the re- gisters used by the ex- change evaluator. Table 3: Map of the BC, DE, and HL registers used by the attacker I defender routines. AF BC DE HL IX IY AF' BC DE' HL' BC DE HL (Various Uses) Defender Count Program Status Flags Attacker Count Attacker Section Address Defender Section Address Index to Value Array Defender Program Status Flags Attacked Piece Value Flag to Defender Side Exchange Residue Attacker Value Attacker Count Defender Count Defender Section Address Attacker Section Address blame lies in just such considerations. Since nearly every register in the Z-80 processor is utilized in the routine, a map is provided for reference in the discussion (see table 2). Although Sargon is coded in Z-80 assembler language using TDL mne- monics, no prior knowledge of the specific instructions is assumed. However, it is assumed that the reader is familiar with some microprocessor assembly language. Two routines are described: XCHNG, which performs the actual evaluation, and NEXT AD, which searches the attacker's array for the next attacker or defender. Using the Exchange Residue The exchange evaluator has completed its work once it has returned the outcome of the battle. But the evaluation segment is by no means complete. Information gleaned by analyzing attacks must be blended with data concerning piece mobility, develop- ment, total material and any other heuristics included in the program. The total picture is the responsibility of a routine called POINTS, which is not discussed here. But it is useful to see how POINTS makes use of the information returned by XCHNG. The exchange evaluator must be called to examine every potential battle on the Listing 1 : The Sargon ex- change evaluator, written in Z-80 assembler language with TDL mnemonics. Label Op Code Operand XCHNG: LDA PI LXI LXI H.WACT D.BACT BIT JRZ XCHG 7,A XC5 XC5: MOV B,M LDAX D . ; MOV C,A Note: A documented source listing of the entire Sargon program is available for $15 from Dan and Kathe Sprack- len, 10832 Macouba PI, San Diego CA 92124. EXX MVI C,0 MVI E,0 LIXD T3 MOV B,PVALUE(X) Commentary Fetch the attacked piece into register A. The piece includes a color flag in bit 7 (0 for White, 1 for Black) and the piece type in bits 2-0. Load into the HL and DE register pairs. The beginning addresses of the White and Black sections of the attackers array. Test the color flag bit of the piece and skip the XCHG if the piece is White. Otherwise swap the contents of the HL and DE registers. The result is to produce a pointer to the defender's section of the attackers array in the HL register pair and a pointer to the attacker's section in the DE pair. Fetches the byte pointed to by the HL pair into the B register. Fetches the byte pointed to by the DE pair into the A register, then moves it into the C register. Since the first byte if each section of the attacker's array is the count (see table 1), we now have the total number of defenders in register B and attackers in C. Swap registers BC, DE, and HL for registers BC, DE', and HL', ready to initialize the rest of the data used by the exchange evaluator. Register C contains a flag which tells when the attacker/defender roles have been toggled. Each time the roles are reversed, register C is incremented. Then by examining bit of C, we can tell which side is being examined. A value of indicates the at- tacker's side is under consideration, and a value of 1 the defender's side. Initialize the exchange residue. T3 is an index by piece type into an array, called PVALUE, which contains the point value (the worth) of each type of piece. 22 November 1978 ©BYTE Publications Inc * ' % S sirmntics u c / 1 HH^JSK^HH 9HH 19 K\ INSTWCTOB SO fluff* i l 1 */o ■■■ ■ - . in 1 mi nil «■ « naiKu wfi microprocessor experience from day one The Instructor 50* Learning by doing is still the best method of education. And when it comes to learning about the world of microcomputers, you won't find a better method than the Instructor 50. It's the fast, ready-to-use learning device that immediately provides "hands on" experience for gaining microprocessor knowledge — in your home, office, or in the classroom. Superior to other microprocessor learning aids, the Instructor 50 is a COM- PETE package — including a built-in power supply (50/60 Hz), an LED prompting display, and both functional and hexadecimal keyboards. You PI also get S-100 compatibility for adding memory and other peripherals. This lets you expand the machine's capability — and your microprocessing applications knowledge . Moreover, you can easily build a program library by recording your own audio cassettes. The Instructor 50 comes complete with a Users' Guide, along with step-by-step instructions for those with no previous microprocessor experience. Signetics offers one of the broadest choices of microprocessors in the industry. This knowledge stands behind the Instructor 50. When you need to learn about microprocessors, start with Signetics. Start with the Instructor 50. Send for your descriptive brochure today. We can help you understand microprocessors. sggnotics a subsidiary of US. Philips Corporation Sgretcs Corporation 811 East Arques A/enue Sunnyvale. California 94086 Telephone 408/739-7700 Circle 31 7 on inquiry card. BYTE November 1978 23 I A Solid State Keyboard as Modern as Your Computer Solid state electronics has moved the computer quickly from the business world into personal uses. Meanwhile, computer keyboards have hardly moved at all. Now TASA introduces a keyboard as modern as your computer. Don't confuse it with ordinary flex switches. It is fully solid state and self-contained, ready to plug in and use. Since it has no mechanical moving parts, it responds quickly to your touch. And it provides full ASCII coding in TASA's exclusive color-keyed layout that makes it easier to say what you want to say to your computer. This is the TASA Micro Proximjty Keyboard, and it sells for only $49.95. Despite the price, CMOS/LSI integrated circuits make it totally reliable inside. With the sensors behind a shield of polycarbonate -the most rugged plastic ever developed — it is also durable and reliable outside. The TASA Keyboard contains all the features you would expect in a professional keyboard— shift, shift lock, control functions, and a normal typewriter format. If you're tired of costly mechanical keyboards and kits you have to assemble, bring your computer up to date the easy way. Plug in a TASA Keyboard. It will never come between you and your computer. the Micro Proximity Keyboard $49. 95 P«BdE l3 The TASA Keyboard Features: □ 51 Keys, with entire 1 28 posi- tion ASCII code output. □ All keys identified as to Un- shift, Shift and Control outputs. D Full 8-bit ASCII output with selectable positive or nega- tive parity. D Single power supply, 12.5 - 20V unregulated. □ Output TTL, DTL and CMOS- compatible. □ Full solid state design with no moving parts. □ Standard PC edge connect- er. □ Use on any flat surface, or with □ Optional plastic support stand (as shown) Touch Activated Switch Arrays, Inc. 2346 Walsh Avenue, Santa Clara California 95050 (408) 247-2301 ADDRESS CITY STATE ZIP Enclosed is my check for $ to cover: _ TASA Keyboards @ $49.95— $. Optional stands @ $12.00— $. Shipping and handling charge at $5.00 per keyboard — $ SUBTOTAL— $ . Sales Tax, 6%—$ (California residents only) TOTAL ENCLOSED $ 9/78 Price subject to change without notice Circle 363 on inquiry card. XC10: CALL NEXT AD RZ MOV CALL LA NEXT AD JRZ XC18 EXAF MOV CMP JRNC A,B L XC19 EXAF XC15: CMP RC L CALL RZ MOV NEXTAD LA CALL JRNZ NEXTAD XC15 XC18: EXAF XC19: MOV BIT JRZ NEG A,B 0,C XC20 XC20: ADD MOV E EA EXAF RZ MOV JMP B,L XC10 NEXTAD: INR EXX C MOV MOV MOV XCHG A,B B,C C,A XRA CMP JRZ DCR B NX6 B NX5: INX CMP JRZ RRD H M NX5 NX6: DCX EXX RET The index is loaded into the IX index register and then the value of the piece un- der attack is loaded into the B register. So register B contains the number of points at stake in this attack. Getting the value of the next attacker in register A. NEXTAD also sets the zero flag if there are no more attackers. Return if no more attackers. Save the attackers value in the L register. Getting the value of the next defender in register A, and setting the zero flag if no more defenders. If no defender, the piece is lost. Go chalk up points gained. Save the defender by swapping AF and AF' registers. Move the value of the attacked piece into the A register to then compare its value to that of the attacker. Branch to XC19 if the value of the attacker is not greater than the value of the piece, to chalk up points gained and toggle. To reach this point, the attacker must be worth more than the piece under attack. So it is necessary to consider the value of the defender. This instruction swaps A and A' again to restore the value. Compare the value of the defender to the attacker. If the defender is worth less, return. It will not be to the attacker's advantage to continue the exchange. Otherwise get the value of the next attacker. Return if none. If the defender is worth the same or more than the attacker, the ex- change should continue, provided there is another attacker available to recapture. Save the new attacker's value in the L register. Then find out if there are any more de- fenders to contend with. If so, jump back to XC15 and repeat the process. The exchange is terminated. There are no more defenders. The zero flag is set, so save it by swapping AF and AF'. Get the value of the attacked piece. Test for attacker's or defender's side. Skip if on the attacker's side. Otherwise negate the value of the attacked piece. (On successive iterations the value is alternately added and subtracted.) Add the previous exchange residue to the new points won or lost and store the result as the new exchange residue. Restore the last defender and the zero flag. Return if there are no more defenders. The last attacker becomes the new defender. Move his value into the B register and return to XC10 for another iteration. Increment side flag. Swap registers BC, DE, HL for BC, DE', HL', getting the set that contains the at- tacker and defender counts. Swap attacker and defender counts. Swap attacker's array pointers. The register map is now as in table 3. Zero the A register and compare it to the attacker count. Go return if there are none. Otherwise decrement the count, since one will be removed from the array. Check the next byte of the attacker's array, looking for an attacker. If not in this byte, go check the next. Otherwise rotate the attacker into the A register. The rotate right digit (RRD) is the reverse of the rotate left digit illustrated in figure 2. Decrement HL to back up the pointer. With two attackers stored per byte, the routine will return to the same byte to look for the next one. Swap registers BC, DE, HL and BC, DE' and HL' back again. Return. November 1978 © BYTE Publications Inc 25 Figure 5: Potential problem arising from the author's evaluation scheme: White's Knight is attacking the Black King and Rook, for which White gains 3/4 of the Rook 's value. The Knight is doomed to be captured by Black's Queen, but subtracting the Knight's value from this number still gives White an illusion of material gain. The authors avoided this problem by having the program check to see if the piece that has just moved is subject to capture. board for a given position. In some of the attacks, the side which has completed a move will have lost points. In others the side about to move will be in danger of losing material. As battles are evaluated one by one, the highest points lost for the side having moved is maintained. This value represents the amount of material this side stands to lose, and it is subtracted directly from the material score. Two scores are maintained for the side about to move: the highest points lost, and the second highest points lost. Both values are saved, because it is assumed that this side will always use its move to rescue its highest value piece. Then only 3/4 of the value is deducted for the loss of the second highest piece, since deducting the entire value would make attacks look as good as cap- tures (see the text box for an example of this procedure). Bonus points are given to each side for additional battles won, but this is still experimental and may not be needed. One problem that arose with this eval- uation scheme was the Knight's tendency to engage in useless forks. In figure 5 we see White's Knight attacking the enemy King and Rook, for which White gains 3/4 of the Rook's value. The Knight is of course doomed to be captured by the Queen and The Quiet Printer Telpar's 48-Column PS-48E... $350.00 KEY FEATURES INCLUDE: ■ Microprocessor controlled ■ Versatile interface (no added charge) Serial: RS-232C, 20 mil loop, or TTL Parallel: TTL interactive ■ Upper/lower case, 96 ASCII characters ■ Throughput rate — 24 characters per second ■ Signalling rates Serial mode: 110 or 300 Baud Parallel mode: up to 960 cps n Automatic carriage return and line feed ■ Thermal printing, no ribbons or ink in quantities of 100 Single quantity $350.00 $450.00 II _^ ^^ __ j _^ ^^ For more information contact Telpar, (214) 233-6631, J^^P* 4132 Billy Mitchell Road, Box 796, Addison, Texas 75001 . ^^■I^^^" 1 ■■ i^r. Telex: 73-7561 (Teleserve) DAL. 26 November 1978 © BYTE Publications Inc Circle 372 on inquiry card. ii h $249 (gets the entire family into creating video games, graphics and control ^ functions. For starters. % m -^l^w' COSMAC VIP, the completely assembled, ready-to-operate RCA Video Interface Processor, opens up a whole new world of computer excitement. New challenges in graphics, games and control functions. Yet it's just $249.00. Easy to buy. And easy to program, thanks to its unique, easy-to-use interpretive language. You get a complete how-to book including programs for 20 games: fun, challenging, and ready to load and record on your cassette. Simple but powerful. Built around an RCA COSMAC micropro- cessor, the VIP is a complete computer system that can grow with you. It has 2K of RAM, ex- pandable on-board to 4K. Plus a ROM monitor, audio tone output to a built-in speaker, power supply, and 8-bit input and output ports for control of relays, sensors, or other peripherals. Circle 322 on inquiry card. Soon RCA will offer options for color graphics Ind 256 tone sound generation, kn optional auxiliary keyboard an exciting world of two-player games. Take the first step now. Check your local computer store or elec- tronics distributor for the VIP. Or contact RCA VIP Marketing, New Holland Avenue, Lancaster, PA 17604. Phone (717) 291-5848. 'Suggested retail price. Does not include video monitor or cassette recorder. The fun way into computers. RC/1 BYTE Novembtr 1978 27 BLACK WHITE (SARGON) Making an Immediate Capture More Attractive Than an Attack In the diagram, the program (White) has two attractive moves: capture the Bishop, or move the Knight so that it simultaneously attacks the Black Rook and the second Bishop. The program assumes that in the latter case Black will protect the Rook (the more valuable of the two pieces) by moving it away. The decision then reduces to one of capturing the first Bishop or simply attacking the second Bishop. In order to insure that the capture takes place, the program assigns 3/4 the normal value to the second Bishop so that the capture looks more attractive. The drawback to this technique is that it precludes the possibility of intentionally avoiding an immediate capture for strategic purposes; this would require a much more complicated program, of course. can never carry out its threat, but sub- tracting the Knight's value still gives White an illusion of material gain. Sargon avoids this problem by checking to see if the piece that has just moved is subject to capture. If so, we assume that the side about to move can escape both attacks. The attack with the highest points lost is ignored completely and the attack with the second highest points lost is moved up in its place. Current Limitations and Future Developments The problem of the Knight fork as just discussed is only one of a whole set of diffi- culties. Pinned pieces, the overworked piece, discovered attacks and other motifs can all occur dynamically during play of a board position, but are difficult to evaluate stati- cally. Attacks of this nature are second order attacks and are not considered in the ex- change evaluator we described. There are eight possible second order attacks (see table 4). The first group are the discovered attacks and the second group are the trans- parent attacks. If all of the second order attacks could be taken into account, the evaluation would be much improved. Cur- rently work is being done to accomplish this. Ultimately, of course, the entire board should be considered as a single complex battle. How close to this ideal can static evaluation progress? At what point does static evaluation begin to take more time than the look-ahead itself? Where will com- promises in the evaluation be least harmful? Currently in the field of computer chess there is a tendency to downplay the impor- tance of look-ahead in future developments. Has look-ahead reached a dead end? Will it be replaced by a Sargon-like exchange analysis? These are open questions." Table 4: Second order at- tacks. This type of attack, including pinned pieces, overworked pieces, dis- covered attacks, and so on, is not considered in the exchange evaluator de- scribed in this article. Group Type Description Discovered Attacks W1 -» B1 W2 W1 attacks B1. If B1 moves, W1 defends W2. W1 -+ W2 k W3 W1 defends W2. If W2 moves, W1 defends W3. wi^Tbi "" "B2 W1 attacks B1. If B1 moves, W1 attacks B2. (PIN) fc B1 W1 defends W2. If W2 moves, W1 attacks B1 . W1 -* W2 Transparencies W1 -* B1 "^ W2 W1 attacks B1. B1 attacks W2. W1 defends W2 through B1. W1 -» W2 -» 'W3 W1 defends W2. W2 defends W3. W1 defends W3 through W2. W1 ^Tbi^? B2 W1 attacks B1. B1 defends B2. W1 attacks 82 through B1. (PIN) W1 -♦ W2 -» k B1 W1 defends W2. W2 attacks B1. W1 attacks B1 through W2. 28 November 1978 @ BYTE Publications Inc North Star Systems Go To Work More and more, you see the North Star HORIZON computer at work: in busi- ness, research, and education. Its high performance qualifies the HORIZON for demanding professional applica- tions. Over 10,000 users during the past two years have proven that North Star hardware has the reliability for day-in, day-out computing. The HORIZON is now a serious candidate for any small system installation. SOFTWARE IS THE KEY TO HORIZON MATURITY North Star BASIC and DOS have been used to develop hundreds of com- mercial program packages. These packages establish that North Star software has the completeness and convenience necessary for serious program development. Because of the many independent vendors offering software using North Star BASIC and DOS, the HORIZON owner now has the widest selection of software in the microcomputer industry! Software available includes: word processing, general ledger, accounts payable/ receivable, mailing list processing, inventory and income tax prepar- ation. Program development systems such as assemblers, debuggers, editors, PILOT and FORTRAN are also available. EXPAND YOUR HORIZON The basic HORIZON computer in- cludes a Z80 microprocessor, 16K bytes of RAM memory, an I/O interface and one Shugart minifloppy disk drive. The HORIZON can be expanded to 60K bytes or more of RAM, three disk drives, and three I/O inter- faces. Performance can be enhanced by the addition of the North Star hardware floating point board. Also, S-100 bus pro- ducts from other manufacturers may be used to expand the HORIZON. For more informa- tion, contact your local computer store. North * Star Computers 2547 Ninth Street Berkeley, California 94710 (415)549-0858 Circle 285 on inquiry card, byte November 1978 29 Considering a Microcomputer? Be Sure to Check Out the Product Offerings of the World's Largest Full Line Microcomputer Company. All Ohio Scientific machines come with microcomputing's fastest full feature BASIC-in-ROM or on-Disk for instant use. Minimum Configuration Base Price 4K RAM $ 279 4KRAM $ 349 16KRAM $1190 4KRAM 4KRAM 16KRAM 16KRAM 598 799 $1464 $1738 32K RAM $2597 Challenger I Series Economical computer systems that talk in BASIC. Ideal for hobbyists, students, education and the home. Superboard II — World's first complete system on a board including keyboard, video display, audio cassette, BASIC-in-ROM and up to 8K RAM Challenger IP — Fully packaged Superboard II with power supply Challenger IP Disk — Complete mini-floppy system expandable to 32K RAM Challenger IIP Series Ultra high performance BUS oriented microcomputers for personal, educational, research and small business use. C2-4P — The professional portable C2-8P — The world's most expandable personal machine for business or research applications C2-4P Disk — The ultimate portable C2-8P Single Disk — Ideal for education, advanced personal users, etc. C2-8P Dual Disk — Most cost effective small business system Challenger II Serial Interface Series Same great features as Challenger IIP Series for those who have serial terminals: small business, education, industry. C2-0 — Great starter for users with a terminal C2-1 — Great timeshare user accessory; cuts costs by running simple BASIC programs locally C2-8S — Highly expandable serial machine, can add disks, etc. Challenger III The Ultimate in Small Computers The unique three processor system for demanding business, education, research and industrial development applications. C3-S1 —World's most popular 8" floppy based 32 K RAM $3590 microcomputer dual floppys C3-OEM — Single package high volume user version 32K RAM $3590 of C3-S1 dual floppys C3-A — Rack mounted multi-user business system 48K RAM $5090 directly expandabe to C3-B dual floppys C3-B — 74 million byte Winchester disk based system. 48K RAM $11,090 World's most powerful microcomputer dual floppys OHIO SCIENTIFIC also offers you the broadest line of expansion accessories and the largest selection of affordable software! Compare the closest Ohio Scientific Model to any other unit you are con- sidering. Compare the performance, real expansion ability, software and price, and you will see why we have become the world's largest full line microcomputer company. 4KRAM 4KRAM 298 498 4KRAM $ 545 I'm interested in OSI Computers. Send me information on: □ Personal Computers □ Small Business Computers □ Educational Systems □ Industrial Development Systems D I'm enclosing $1.00 for your 64-page small computer buyer's guide. Ohio residents add 4% tax. Name Address City State _ -Zip_ 1333 S. Chiilicothe Road Aurora, Ohio 44202 (216) 562-3101 Phone If you Br* inlera iled in an u lormanca personal contputar lully axpandad to a nulnfram* class CAmput«f syslom, consider (he C2-B TheC3-B Hi 30 BYTE November 1978 Circle 290 on inquiry card. The Age of Affordable Personal Computing Has Finally Arrived. Ohio Scientific has made a major breakthrough in small com- puter technology which dramatically reduces the cost of per- sonal computers. By use of custom LSI micro circuits, we have managed to put a complete ultra high performance computer and all necessary interfaces, including the keyboard and power supply, on a single printed circuit board. This new computer actually has more features and higher performance than some home or personal computers that are selling today for up to $2000 It is more powerful than computer systems which cost over $20,000 in the early 1970's. This new machine can entertain your whole family with spec- tacular video games and cartoons, made possible by its ultra high resolution graphics and super fast BASIC It can help you with your personal finances and budget planning, made possible by its decimal arithmetic ability and cassette data storage capa- bilities. It can assist you in school or industry as an ultra powerful scientific calculator, made possible by its advanced scientific math functions and built-in "immediate" mode which allows complex problem solving without programming! This computer can actually entertain your children while it educates them in topics ranging from naming the Presidents of the United States to tutoring trigonometry all possible by its fast extended BASIC, graphics and data storage ability. The machine can be economically expanded to assist in your business, remotely control your home, communicate with other computers and perform many other tasks via the broadest line of expansion accessories in the microcomputer industry. This machine is super easy to use because it communicates naturally in BASIC, an English-like programming language. So you can easily instruct it or program it to do whatever you want, but you don't have to. You don't because it comes with a com- plete software library on cassette including programs for each application stated above. Ohio Scientific also offers you hundreds of inexpensive programs on ready-to-run cassettes. Program it yourself or just enjoy it; the choice is yours. hi HU II II ClU I l«czEt IIIHIIt f inn* itti 41 IH Ohio Scientific offers you this remarkable new computer two ways. Challenger 1 P $349 Fully packaged with power supply. Just plug in a video monitor or TV through an RF con- verter to be up and running. Superboard II $279 For electronic buffs Fully assembled and tested. Re- quires + 5V at 3 Amps and a video monitor or TV with RF converter to be up and running. --Standard Features. Uses the ultra powerful 6502 microprocessor ■ 8K Microsoft BASIC-in-ROM Full feature BASIC runs faster than currently available personal computers and all 8080-based business com- puters ■ 4K static RAM on board expandable to 8K ■ Full 53-key keyboard with upper/lower case and user programmability ■ Kansas City standard audio cassette interface for high reliability ■ Full machine code monitor and I/O utilities in ROM ■ Direct access video display has 1K of dedicated memory (besides 4K user memory), features upper case, lower case, graphics and gaming characters for an effective screen resolution of up to 256 by 256 points Normal TV's with overscan display about 24 rows of 24 characters; without overscan up to 30 X 30 characters. Extras ■ Available expander board features 24K static RAM (addi- tional), dual mini-floppy interface, port adapter for printer and modem and an OSI 48 line expansion interface. Assembler/editor and extended machine code monitor available. Interested in a bigger system? Ohio Scientific offers 15 other models of microcomputer systems ranging from single board units to 74 million byte hard disk systems. Circle 290 on inquiry card. ,-ORDER FORM . . Order direct or from your local Ohio Scientific dealer. □ I'm interested. Send me information on your: □ Personal Computers □ Business Systems n Send me a Superboard II $279 enclosed □ Send me a Challenger 1 P $349 enclosed □ Include 4 more K of RAM (8K Total) $69 more enclosed Name Address City .State, -Zip_ Payment by: BAC (VISA) MasterCharge _ Credit Card Account # Expires Interbank #(Master Charge) Ohio Residents add 4% Sales Tax TOTALCHARGEDORENCLOSED Money Order All orders shipped insured UPS unless otherwise requested FOB Aurora, OH I J America's Largest Full Line Microcomputer Company 1333 S. Chillicothe Road • Aurora, Ohio 44202 (216) 562-3101 BYTE November 1978 31 The C3-SI by Ohio Scientific Possibly the world's most popular floppy disk based microcomputer. Since its introduction in August, 1977, the Challenger III has gained tremendous acceptance in small business, educational and industrial development applications. Thousands of C3-S1 's have been delivered and today hundreds of C3-S1 demonstrator units are set up at computer retailers around the country. Why has the Challenger 1 1 1 become so successful in the fiercely competitive microcomputer industry? Here are just a few of the possible reasons. ,:.: The Challenger III is the fastest microcomputer in BASIC (see "BASIC Timing Comparisons," Kilobaud, October, 1977, where Ohio Scientific out benchmarks all competitors). ■ The Challenger III is the only computer system with a 6502A, 6800 and Z-80 offering the programmer all popular micros for maximum versatility. ■ The C3 is backed by the largest base of systems level software for any microcomputer system including: For the 6502A: Microsoft 6 and 9 Digit BASIC Assembler Editor Word Processor OS-65D Development DOS OS-65U End User DOS with Extended BASIC For Floppys Winchester Hard Disks Multi-users (Level 2) Distributed Processing (Level 3) For the 6800: Floppy DOS Assembler Editor For the Z-80: Floppy DOS Microsoft Disk Extended BASIC Microsoft FORTRAN Microsoft COBOL Macro Assembler and Editor And Much More ■ The C3 supports OS-65U, the ultra high performance "virtual data memory" DOS for floppys and hard disks which makes complex file structures like multi-key ISAM easy to use. ■ The C3 is backed by a large library of applications programs and can make use of the tremendous amount of BASIC programs offered by independent suppliers and publishers because it uses Microsoft BASIC, the standard of the industry. Complete turnkey and custom business packages are available for the C3 from most OHIO SCIENTIFIC DEALERS. The C3 electronics and software are available in alternate mechanical configurations for special applications including the C3-OEM for volume users and the C3 letter series (C3-A, C3-B) which are optimized for use with hard disks. C3 systems are always delivered ready to use with 32K static RAM, dual floppys for 500K bytes of on-line storage and an RS-232 port strappable from 75 to 19,200 baud all standard in the minimum configuration. C3 systems offer the greatest expansion capability in the microcomputer industry. The C3 series supports OHIO SCIENTIFIC'S full line of over 40 expansion accessories. The maximum configuration is 768K bytes RAM, four 74 million byte Winchester hard disks (CD-74), 16 communications ports, real time clock, line printer, Word Processing printer and numerous control interfaces. C3 systems have phenomenal performance-to-cost ratios. The C3-S1 base price with 32K RAM, dual floppys, RS-232 port complete with 8K BASIC and DOS is under $3600 and expan- sion accessories are comparably priced. For example, the CD-74, 74 million byte Winchester disk complete with interface and OS-65U operating system at about $6000. The C3 series is quite possibly so successful because it offers the highest hardware performance, best software support, most versatility and greatest expandability in the micro- computer systems market at nearly the lowest price in the industry. For more information, contact your local OHIO SCIENTIFIC DEALER or the factory at (216) 562-3101. % 1333 S. Chillicothe Road • Aurora, Ohio 44202 32 BYTE November 1978 Circle 290 on inquiry card. TheC3-B by Ohio Scientific The world's most powerful microcomputer system is far more affordable than you may think: STANDARD FEATURES: 74 million byte Winchester tech- nology disk drive yields mainframe class file access speeds and capacity. High level data file software makes high performance file struc- tures like multikey ISAM easy to use. Triple processor CPU with 6502A, 6800 and Z-80 gives the pro- grammer the best of all worlds in performance and versatility. The included 6502A based ex- tended disk BASIC by Microsoft out-benchmarks every micro available, including 4 MHzZ-80 and LSI-11 with extended arithmetic. 48K of high reliability static RAM is standard. High density 8" floppys provide program and data mobility from machine to machine. Completely integrated mechani- cal system with UL-recognized power supplies; continuous duty cycle cooling; modular construc- tion and rack slide mounted subassemblies. Based on a 16 slot Bus-oriented architecture with only 7 slots used in the base machine. Directly expandable to 300 megabytes of disk, 768K of RAM in 16 partitions, 16 communication ports, plus console and three printers. C3-B's have been in production since February, 1978, and are available now on very reasonable delivery schedules. The C3-B was designed by Ohio Scientific as the state of art in Circle 290 on inquiry card. small business computing. The system places its power where it's needed in the small business environment; in the data files. The C3-B's advanced Winchester tech- nology disk, coupled with its smart controller and dedicated high speed memory channel, gives the C3-B data file performance com- parable with today's most powerful maxi-computers. Yet, the C3-B costs only slightly more than many floppy only com- puters but offers at least a thou- sand times performance improve- ment over such machines (50 times storage capacity multiplied by 20 times access speed improvement). But what if your business client cannot justify starting with a C3-B? Then start with Ohio Scientific's in- expensive C3-S1 floppy disk based system running OS-65U. When he is ready, add the CD-74 big disk and directly transfer programs and files from floppy to big disk with NO modifications. That's upward expandability! *Rack as shown above complete with 74 megabyte disk, dual floppys, 48K of static RAM, OS-65U operating system and one CRT ter- minal under $13,000. Multiple terminal systems with printers and applications software are priced in the mid-20's. 1333 S. Chillicothe Road • Aurora, Ohio 44202 (216) 562-3101 BYTE November 1978 33 Functional Approximations Fred Ruckdeschel 773 John Glenn Blvd Webster NY 14580 Many BASIC interpreters presently in use have limited function calculation capability. Almost all interpreters larger than 4 K bytes have built-in routines for determining square roots, logarithms and exponentials, as well as some trigonometric functions like sine and cosine. Several interpreters also provide inverse trigonometric functions via the arctangent function. However, many minicomputer and micro- computer systems do not have such software. Also, some of the newer microprocessors presently do not have much support soft- ware. I have recently been developing soft- ware for use with the North Star Micro-Disk system; specifically, working with North Star BASIC, version 6, release 2. The North Star software contains sine and cosine func- tions but no inverse trigonometric routines. This deficiency led to a cursory investigation of series approximations which very quickly showed that Taylor series expansions are not generally optimum for computer use. Taylor Series Expansion In general, any real, continuous function f(x) having defined derivatives may be ex- pressed as a polynomial expansion about a reference point representation: x with the longhand f(x)= f(x o ) + f0)(x o )(x-x o ) f (2) (x o )(x-x )2 /2! + .. (la) Observe that f( n ' (x ) is defined to be the /7th order derivative of f(x) evaluated at x equal to x . The shorthand equivalent of equation (la) is: f(x) = E n=0 f(n) x-x, ) n /n! or: f(x) = lim f n (x) (lb) where: 0!S1 f (0) (x o )=f(x o ) Ux)3 E m=0 f (m) (x ) (x- 7m! Equation (1b) is in a form which is con- venient in terms of BASIC'S FOR-NEXT loop evaluation, which may account for its popularity with computer programmers. Many programmers who are faced with approximating a function use a Taylor series expansion along with a convergence test such as: lfn(x) ■f„_i (x) Kfc (2) Presumably when the difference between the approximation using n terms and that using n— 1 terms is less than e, the accuracy of f n (x) in approximating f(x) is better than e. This assumption can be grossly in error depending on the function being evaluated. Slowly converging series often present problems in this respect. The reasons for not indiscriminately using equations (1) or (2) may be demon- strated by considering the sine and arctan- gent functions. The Taylor series expansion around the zero reference point (known as the MacLaurin series) for the sine func- tion is: sin(x) = x-x 3 /3! + x 5 /5! -. . . (3a) sinlx E n=0 -1) n x< 2n+1 V(2n+i; (3b) If we apply equation (2) as the test for accuracy, we have x (2n+1) (2n+1)! 0). The technique of range reduction for im- proving accuracy will be considered in a later section. Consider the use of equation (5) near an x value of one. Using equation (2) to determine the number of terms required for 1 -8 accuracy, we get a value of 5X 1 7 for n. Applying the alternating sign conver- gence test also leads to an n value of 5X 1 7 . In either case, this series expansion for arctangent is unusable. Even if the computer were fast enough so that the approximation could be calculated in an acceptable length of time, the ensuing roundoff error would be prohibitive. It is shown in the next section that there exist other series expansions which are better than (in terms of relative error) 4X10 -8 and which have only eight terms. The series presented are operable either over the range 1 < | x | (note the equality sign) or over the range < x < °°. We observe that the error test, equation (2), would fail dismally for the Taylor series arctangent expansion near an x value of neg- ative one. The test would again predict that on the order of 5 X TO -7 terms would be re- quired for 10~ 8 accuracy, while in actuality the series diverged. In this case the Taylor series expansion is not rapidly converging, thus leading to a failure in equation (2). In general, equation (2) is practical only if: • The series has decreasing alternating sign terms. • The series has decreasing terms in which the absolute value of the ratio of neighboring terms is greater than 10 for all pairs of terms past the termination point. That is, if: f(*) = E c n x", n=0 then beyond the termination point it is required that: c x n C n+1 X n+1 = c n c n + 1 X >10. only for MacLaurin series expansions. For Taylor series expansions, replace x with (x— x ). Observe that small values of (x— x ) are very conducive to rapid convergence, but are not sufficient. Approximate Series Expansions Taylor series expansions have many nice properties. However, one of their less de- sirable properties is that they are not the op- timal expansions for a given argument inter- val when a truncated series is to be used. This may be easily seen by a simple example. Consider the single term approximation to sin(x) over the interval < x < 7r/2 (see figures 1 and 2). Although the accuracy of approximating the value of sin(x) with x is good for small values of x, it leads to an error of 0.57 at rr/2. If instead we wish to minimize the maximum absolute error over \ 1 1 " / i • I.I f| (»)= x/ • A— .9 f (x)'sin(x) 7 // / & /f 2