Call-A.P.P.L.E. Magazine • May 1982

I~TI~r.-I~ ~jD A P. P. L E J"~ ~- • • • • • APPLE PUGETSOUND PROGRAM LIBRARY EXCHANGE A W.JShinglon 51 .. 1(" Non-Profit Cnrporoilion Call-A.P.P.L.E. Magazine

Issue Year

1982

Issue Month May

Apple Pugetsound Program Library Exchange I Page 0001 of 0102 Call-A.P.P.L.E. Magazine • May 1982

II II Volume V, Number 5 May 1982 S2.50 (S3.00 Canada, £1. 75 UK.)

A CALL -A.P.P.L.E. TUTORIAL: Program

Optimization Page 9

A IS FOR APPLE: Adding

Machine PagelS

HI-RES HI-JINX: Picture • Compr n Page 21

EXPLORING THE WORLD OF APPLE: Random

Adventures Page 37

\.0 Apple PugetSound Program Library Exchange

Apple Pugetsound Program Library Exchange Page 0002 of 0102 Call-A.P.P.L.E. Magazine • May 1982

TM

II II Volume V, Number 5 May 1982 52.50 (53.00 Canada, £1. 75 UK.)

A CALL -A.P.P.L.E. TUTORIAL: rogram

Optimization Page 9

A IS FOR APPLE: Adding

Machine PagelS

HI-RES HI-JINX: Pi ur

Compr sin Page 21

EXPLORING THE WORLD OF APPLE: Random

Adventures Page 37

\.0 Apple PugetSound Program Library Exchange

Apple Pugetsound Program Library Exchange Page 0003 of 0102 Call-A.P.P.L.E. Magazine • May 1982

On the new, slicked-up, patible daisy wheels and lighter than the Starwriters Distn'buted Exclu­ trimmed-down Starwriter F-lO. ribbons. before it. And it ~tands sively by Leading It's C. Itoh's latest genera­ In its serial mode, it can exactly as tall (or precisely as Edge Products, Inc., tion of letter-quality printers. print just about anything small) as a dollar bill. 225 Turnpike Street, It cranks out flawless copy [including boldface, under­ Speaking of which: Canton. Massachu­ at 40 cps: and its full 15" lines, subscripts and super­ Incredibly, the Starwriter F-I0 setts 02021. Call: toll­ carriage lets it double in brass scripts), and snap the carriage sells for about the same free 1-800-343-6833; for both letter processing and back to start the next line preposterously low price as or in Massachusetts business applications. You in less than a second. In its its predecessors. Which is to call collect (617) can plug it into almost any line mode, it prints in both say, about $800 less than a lot 828-8150. Telex micro on the market (serial or directions, for even faster of other printers that don't 951-624. parallel) simply by plugging it throughput. even come close to measur- in. And then make it keep on (While making about as ing up. Or even better ... LEADING trucking with inexpensive. much noise as a cat walking Measuring down. eaSily available Diablo com- on Kleenex.) EDGE' It's a nice, portable 30 pounds-about 10 pounds

Apple Pugetsound Program Library Exchange Page 0004 of 0102 Call-A.P.P.L.E. Magazine • May 1982

DOGFIGHT IL An established classic Arcade game. Set up a game for one to eight players each piloting a jet into combat Play on one team, two, or against the computoL

PEEPING TOM. Another fast· acting arcade thriller. Shoot various aliens you peep at through win· dows. It takes perception, luck and skill to defeat the invaders.

miCfl(J 191» "flIlSllit'S In CROWN OF Olr11tlt11 ARTHAIN, you, and another 11f player battle real· istic, animated monsters for the crown. Skill and excitement for W• youngsters under thirteen.

Art11Uilt fn 1lA.i\; & \.\.\R Il~'" -'-'(llfR ROACH HOTEL. A high·res, fast· action, arcade game. Stamp out roaches before they take over. Points, bonuses, and additional rounds are earned as your· skill increases .

• For Apple II & 4BK .---;'. - --:?~/ / / Apple is a trademark 01 Apple Computers. Inc

~ . 48K' APPLESOFT IN ROM· DISK DRIVE © 1982 Micro Lab Inc.

2310 Skokie hland Park, IL 60035.312-433-7550

Apple Pugetsound Program Library Exchange Page 0005 of 0102 Call-A.P.P.L.E. Magazine • May 1982

APPLE PUGETSOUND PROGRAM LIBRARY EXCHANGE: CLUB INFORMATION

GENERAL OFFICES EDITORIAL DEPARTMENT ADVERTISING REPRESENTATIVES 304 Main Ave. S., Suite 300 6708 39th Avenue S.W. Grawin Publications Renton, WA 98055 - (206) 271-4514 Seattle, WA 98136-(206)932-8288 1020 Lloyd Building Hours: 8-4 Monday Through Friday Hours: 9 AM - 3 PM. 6 PM - 10 PM. daily Seattle, WA 98101 (206) 223-0861 Thursdays till 7 p.m. Member Services/Dealer Orders

MEETING NOTICES CALL -A.P.P.L.E. HOT LINE Please allow up to 30 days for a turn around (206) 932-6588 7:30 PM. Tuesday. May 18. 1982 on membership and orders. Hours: 9 AM - 3 PM and Computer Empire Call -A.P.P.L.E. is mailed free twelve times 616 SW. 152nd St., Seattle 6 PM - 10 PM 7 days per week per year as benefit of membership. Pacific Time Subscriptions are not available. Guest Speaker Dr. Thomas H. Bennett 1982 back issues available at $2.50 each. Please also check our list of consultants Main Frame Communication below for a specialist in your field. Call -A.P.P.L.E. bound volumes for pre­ vious years are available as indicated on the 7:30 PM. Tuesday. June 15th. 1982 member order form on the last page. A.P.P.L.E. Office Membership Information 304 Main Ave. S., Renton Please direct telephone questions on Institutional memberships are now avail­ Guest Speaker membership and orders to (206) 271-4514. able. Contact General Office for details. Dr. Alistair D.C. Holden/Speech Recognition One Time Apple-Cation Fee .... $25.00 Annual Dues ...... $20.00 7:30 PM. Tuesday. July 20th. 1982 Total 545.00 Prospective authors please send self­ addressed stamped envelope (37<1 Special Meeting Additional postage required for foreign postage) to Editorial Dept. for a copy of 7:30 PM. Tuesday. Aug. 3. 1982 memberships and Shipments. Author's guidelines. Guest Speaker Mike Markkula/President Apple Computer, Inc. Membership is on an annual, 12 month basis, commencing with the month of en­ Cover and interior design by Vic Warren Design. BULLETIN BOARDS rollment. Upon receipt of total membership fees, new members will receive an Apple­ A.P.P.l.E. CRATE Cation blank, order form and description (206) 935-9119 sheet of club products. (4 pm - 9 am Pacific Time)

Officers and Directors Paul Mosher, MD...... Staff Writer ...... (518) 765-4118 Lee Reynolds ...... Staff Writer ...... (305) 722-2639 Dick Hubert. President ...... (206) 271-6939 Charles Rusch ...... Staff Writer ...... (503) 484-4618 Bob Huelsdonk, Vice President ...... (206) 362-4910 Ralph H. Swerdlow, M.D. .. Staff Writer ...... (916) 920-8709 Dave Ungwood, Secretary ...... (206) 244-9360 Grawin Publications ...... Production, Advertising ..... (206) 223-0861 Bob Clardy, Treasurer ...... (206) 641-1917 David B. Garson ...... Program Editor ...... (714) 452-7524 Val J. Golding, Director ...... (206) 932-6588 Ken Smith. Director ...... • .... (206) 322-4199 Consultants Fred Merchant. Director ...... (415) 921- 7792 Bob Huelsdonk ...... Apple /// ...... (206) 362-4910 Office Staff Don Williams ...... Assembly ...... (206) 242-6807 Michael Thyng ...... Business ...... (206) 524-2744 Dick Hubert ...... Executive Director Ted Perry .... 00 •••• 00 •••• CA.l...... (916) 485-1690 Dave O'Leary ...... Administrative Assistant Murray Arnow ...... Engineering Applications .. (312) 291-9210 Sally Davies ...... Admin. of Information Systems Cornelis Bongers ...... European Consultant .010-525511 Ext. 3275 Arliss Sword ...... Dealer Orders Alan Robinson ...... Fortran ...... (503) 757-8234 Patti Hoffmann ...... •...... Special Projects Coordinator Tom Deal, M.D...... Handicapped Applications. (206) 634-2847 Gunter Hirt ...... Bookkeeping. Member Records Randy Halvorson ...... Hardware Interfacing ..... (206) 783-9040 Joff Morgan ...... Technical Support Ed So 00 00 00 00 00.00 00 00 00 Hi-Res 00 00 00 00 00 00 00.00. (408) 267-3448 Cheryl McCalmant ...... Order Processing Alan Winston ...... Languages ...... (206) 789-1512 Kris Mortenson ...... Order Processing StOIl\le Keller ...... Mathematics ...... (804) 293-9441 Gayle Rank ...... Secretary/Receptionist Fred Merchant. MD...... Medical Group ...... (415) 921-7792 Mike Christensen ...... Systems DevP/0pment Tom Woteki ...... Pascal (Eastem U.S.) ...... (202) 547-0984 Gina Mocko ...... Shipping/Receiving Carl Winter ...... Pascal (Western U.S.) ...... (206) 454-2720 Hersch Pilloff ...... Stock Market ...... (301) 292-3100 Magazine Staff Mark Robbins ...... Telecommunications ...... (303) 755-6440

Val J. Golding 00 ••• 00 •••• Editor ...... (206) 932-8288 Clifton Howard, MD...... Utilities ...... (201) 768-9274 Kathryn Hallgrimson ...... Asst. to the Editor ...... (206) 932-8288 Jim Hockenhull ...... \/ideo Interfacing ...... (509) 334-4137 Ron DeGroat ...... Pascal Editor ...... (303) 442-4794 Jeff Finn ...... Word Processing ...... (206) 325-0430 Kevin O. Donohoe ...... Production Editor ...... (206) 223-0861 Dick Curtiss ...... Z-80 Card, CP/M ...... (206)784-8018

2 Call -A.P.P.L.E. May 1982 Apple Pugetsound Program Library Exchange TPage 0006 of 0102 Call-A.P.P.L.E. Magazine • May 1982 Call-A.P.P.L.E~ Volume 5, Number 5 May J982/Menu Val J. Golding, Editor ENmEES

9 A CALL -A.P.P.L.E. TUTORIAL: 21 HI-RES HI-JINX: Program Optimization Picture Compression David H. Bartley/TIle Apple-Dillo Edward C. So

15 A IS FOR APPLE: 37 EXPLORING THE WORLD OF APPLE: Adding Machine Random Adventures Ralph Swerdlow, MD/Call -A.P.P.LE. Staff Writer David Sparks

ALACARTE

7 Faire Enough 75 A CALL -A.P.P.L.E. REVIEW: Val J. Golding The Inspector 57 Keep Your Cool Charlie Stillman Harry E. Brawley, Jr'/Art: Robert A. Kidder 79 APPLEMASH: 63 Curing A Shiftless Apple Things About Strings Michael TIlyng Dan Paymar 67 A CALL -A.P'p.L.E. TECHNOTE: 83 A CALL -A.P.P.L.E. TECHNOTE: Total Amnesia Look Before You JMP Ken Manley Val J. Golding 69 A CALL -A.P'p.L.E. TECHNOTE: 91 A CALL -A.P.P.L.E. QUICKIE: Using a Firmware Card in Slot 4 Trig With Integer Basic Mark Cross David Morganstein/Washington Apple Pi 73 Stack and Status Trace For Apple Forth Guy T. Grotke/San Diego Apple Corps

HORS d'OEUVRES 3 A.P.P.L.E. Club Information 95 Advertiser's Index 5 The Editor Bytes Back 95 A.P.P.L.E. Order Form 54, 70 So What Did You Expect Dept. 7 96 Call -A.P'p.L.E. Unclassifieds 85 WRITE A.P.P.L.E. TIle Readers

Apple user groups may reprint without prior permission any portion of the contents herein, provided author, title, and publication credits are given and a written notice of such use furnished to the editorial office. For commercial applications of programs herein, the author should be contacted c/o General Office. Call -A.P.P.L.E. is published monthly by Apple Puget Sound Program Library Exchange, 304 Main Ave. 5., Renton, WA 98055. Subscriptions are not available but copies are mailed free as a benefit of A.P.P.L.E. membership. \.0 EAPpIel»Ggetsound Program Library Exchange

Call -A.P.P.L.E. May 1982 3 Apple Pugetsound Program Library Exchange I Page 0007 of 0102 Call-A.P.P.L.E. Magazine • May 1982

Low-cost, high performance APPLE ][ ATARI400/800 products from MPC AP-16 16K Memory Board AT-16 16K Memory Board Powerful, well-built, precision ma­ AP-32 32K Memory Board AT-32 32K Memory Board chines ... they came in numbers, like AP-80 Parallel Printer Card invaders from another dimension. Posi­ AT-BSR Home Controller tioning themselves on the leading edge AP-SIO Serial I/O Interface AT-DISK Single/Double of a technological revolution. Initiating AP-96 Upperllower Case ROM Density Disk an era that heralds the unique combi­ PROM-IT EPROM Burner PROM-IT EPROM Burner nation of high quality and low price. AP-VID 80 Column Card ATC-1, 2, 3 Cables Thousands of Apple and Atari users are amazed. As for the challenge of the future, we are alert to changing market condi­ What magic formula propelled our suc­ tions. Our research will continue to cessful entry into the national peripher­ venture across the boundaries of tradi­ al market? Intense research. Thorough tional disciplines. Our total commit­ product development. Established ded­ ment to Apple and Atari users has pre­ ication to exacting standards of quali­ pared us for unchartered horizons. ty. Uncompromising quality. For a young company like MPC Peri­ We fine-tune all our products to a level pherals, it is indeed the dawn of an ex­ that enables us to offer every buyer a citing era of growth and satisfaction. MPC PERIPHERALS CORP. TWO YEAR WARRANTY - an expres­ We thank you for your faith in our prod­ 9424 Chesapeake Drive sion of product confidence unprece­ ucts. Join us in meeting the challenge San Diego, CA 92123 dented in the industry. of tomorrow. 714-278-0630

Apple Pugetsound Program Library Exchange Page 0008 of 0102 Call-A.P.P.L.E. Magazine • May 1982

THE EDITOR BYTES BACK

by the editor

EADING off for MaV IS a fine You mav notice a new descriptive ti­ Coming up next month IS a feature CALL -A.P.P.L.E. TUTORIAL bV tle on three of our stones thiS Issue; A titled: Reflections on the 6502, a JOint David Bartley, editor of "The CALL -A.P.P.L.E. TECHNOTE will be ap­ effort bV Bob Sander-Cederlof, Roger Apple-Dlllo," the newsletter of plied to stories that alert VOU to potential Knights and ourselves, which documents L some 60 additional Instructions that are the Austin, TX users group Manvartlcles problems or Intrinsic bugs In the Apple or on this art have been published, but ItS languages. Our own contribution, actuollv bUried In the 6502 Also planned Program Optimization provides several Total Amnesia, deScribes how to CIrcum­ IS a feature bV Jim Hockenhull on Video specific examples, and baCKS them up vent some OUT OF MEMORY problems, InterFaCing, and an exploration Into the with statistics while David Morganstein of Washing­ world of Apple musIc With Pitch and NOVice users are encouraged to ton Apple P, tells VOU what Apple didn't Rhythm. read It, along with Ralph Swerdlow's A when VOU bought vour Language Card; If, after perusing thiS page, VOU still IS FOR APPLE: Adding Machine. HI-RES don't throw awav vour firmware card, Find something loCKing, whV not send a HI-JINKS: Picture Compression IS Ed use It In another slot. Also, a brref note self-addressed envelope With $37 So's comprehensive contribution for this bV Ken Manly warns of a bug In the postage to the EditOrial OfFice and aSK month; Compression IS an assemblv pro­ 6502 In Look Before you JMP. for a copV of our author's gUidelines gram which compacts a HI-Res picture to You'll find stili more goodies on the You maV find our $50 page rate appeal- Its essentlOIs before stonng to diSK at a contents page, including Mike Thyng's Ing! ~ huge savings In space. APPLEMASH: Things about Strings and A lot has also been written about another contribution bV Dan Paymar on Apple s random number generator; first how to modlfv the shift KeV. time author- David Sparks ofFers some assemblv language solutions, along with a few demo programs In Random Adventures.

MPUTER ONSULTING 1376 CLEVELAND STREET CLEARWATER. FLA. 33515 ERVICES TRUST ACCOUNT MANAGEMENT SYSTEM (813) 441-3490 ~ (813) 446-2643

The people that brought you the Professional Timekeeping System are System Functions: proud to announce the introduction of another valuable, time-saving office - Open a new trust account management tool . . . the C.C.S. Trust Account Management System. Designed - Enter deposits and withdrawals with consultation from bankers and legal office managers, this System incorpor­ - Print withdrawal checks ates all of the principles of basic trust account management into a simple, yet - Print account transactions powerful office accounting tool. It expands on these basic principles to give the - Print check/deposit registers - Void entries user instant access to often-requested data such as client trust balances and - Analyze an entire trust account audit trails for individual client accounts or entire trust accounts. - Analyze a client's account - Reconcile monthly bank statement - Purge an existing account As an additional feature, C.C.S. has provided a function in this system which - Directory assistance will automatically transfer funds from any Trust System account into a client - Edit account information account in the Professional Timekeeping System, making this System a perfect - Change System parameters f'omplement to that already powerful legal office management system. - Change System password

Capacities: As is our tradition, this system was designed for professionals by profes­ One trust account per disk. The System will accom­ sionals. See your local Apple dealer for details. modate any number of accounts. Specific capacities are dependent on the number of client accounts within the trust account. Typical configuration: 200 clients Hardware Requirements: APPLE II PLUS (48k), DOS 3.3 1600 accounts entries Dual disk drives, printer 8 entries per cJient, average Dealer Inquiries Invited (These figures are for active account entries. Records from client accounts with zero balances are periodically removed with the Purge function.)

Call -A.P.P.L.E. May 1982 5 Apple Pugetsound Program Library Exchange Page 0009 of 0102 Call-A.P.P.L.E. Magazine • May 1982

Apple Pugetsound Program Library Exchange Page 0010 of 0102 Call-A.P.P.L.E. Magazine • May 1982

FAIRE ENOUGH

Val J. Golding

FF again to San Francisco The beauty of the emulator is that the display was almost a photo-finish. and Brooks Hall, home of the provided memory management Also present was Dave Gordon's seventh annual West Coast systems allow the card to respond to fledgling DataMost, Synergistic Soft­ O Computer Faire. Market regular DOS commands, so with data ware, Island Graphics and far too Street a mass of trolley-coaches, stored in the card, access time is vir­ many others to name. Most had one autos and pedestrians, parading in tually instantaneous. Actually, we thing in common, though, lots of new cloudless skies. Faire-goers crossing had expected to see more of this type and sophisticated Hi-Res games Market at Eighth, to and from the device than we did. We suspect more beautifully packaged. As a science­ Holiday Inn with exhibitor's parties will be announced in coming weeks. fiction and fantasy fan of many years proceeding. Earlier, the same masses RAM cards proliferated, too, with standing, we fought the urge to buy clustering, noses pressed against several heretofore unheard of names soley on the basis of fine fantasy art. antiquated glass doors barring their on display. Prices are falling steeply Our own booth was often crowded entrance to Brooks Hall. Somewhere on these, and we feel in a few months three and four deep with members a calendar leaf - March 19th - flut­ most 16K cards will be priced under and potential members. Besides ters down, elsewhere a clock chimes one hundred dollars. A Faire "special" ourselves, secretary Dave Lingwood, ten; the doors are unlocked and the was going for $65. Another innova­ VP Bob Huelsdonk, Sally Davies, show is on. tive and related device was Micro­ Joff Morgan and Jeff Finn were on Latecomers thronging III were buffer ][ by Practical Peripherals of hand to answer questions on our pro­ greeted by instant chaos, the hubub Westlake Village, CA. This is a ducts and membership, and to revi­ of voices above and below. From parallel printer/graphics interface talize the friendly ritual of attaching beyond, the hums and clacks of with a 32K on board buffer, which names to faces. Much of our software printers and such, blending with live means you can dump your printer and publications were on display and music from the always-mobbed alpha­ data in an instant, then let the Apple available for sale, and met with an Syntari booth, the clamor an indica­ go back to what it is best suited for: enthusiastic reception. tion that this is the "big one" of the computing. Immediately across the Aisle, year. Exhibits this time on the second A couple of new 80 column cards Ken Silverman and Peter Weiglin floor as well as the two main floor have now made the scene, the Wizard held down the International Apple halls and Brooks Hall proper, down 80, and a brand new contender from Core/Apple Orchard booth, while the the packed escalators. Australia, as yet unnamed. Excel-9 is San Francisco Apple Core could be We saw less that we anticipated in a peripheral card distributed by found just a short distance away. the way of new products, still there Norell Data Systems of Los Angeles, Other magazines at the show included were many. Apple-compatible disk which uses a 6809 to turn the Apple Softalk, Byte, Kilobaud and Personal drives were one item of interest. New into a multi-processor. Competition Computing. drives bear the names Rana Systems for the Microsoft Z-80 card is Ad­ Sunday. of Carson, CA and A.A. Electronics vanced Logic Systems' Z-Card. One of Promptly at 5:00 the loudspeakers of Ann Arbor, MI. Also in the run­ the more unusual cards we spotted blared: "The Seventh Annual West ning, but not present, was u-Sci. was an oscilloscope by Northwest Coast Computer Faire is now over," Eight inch drives and controllers Instrument Systems of Beaverton, an announcement greeted by a large were seen at DataMost, Vista and OR, which claims to turn the Apple round of applause, cheers and hur­ other booths, attracting hordes of into a true scope. Appletime Clock rahs from the hundreds of harried wishful thinkers. Still higher capac­ Card by MicroComPac out of Golden, and hurried exhibitors, exhausted by ity could be found on the hard disk CO is one of several new inexpensive the three frantic days of ballyhooing drives, one five m-byter going for less clocks. This one provides day of the and hawking their products. Now the than $1300, to the amazement of week as a standard feature. hubub has died down - we were many! The alphaSyntauri booth at the witness to what probably was the In an field closely related, a new entrance to Brooks Hall was a real longest one-way traffic jam of hand method of mass storage, the disk crowd-getter with unbelievable trucks, push carts and packages-in­ emulator. This is a memory device fidelity coming from an Apple con­ arms ever to be seen. such as a 16K RAM card, and in fact, nected to a keyboard and stereo As if by magic, packing crates, developed from that concept. The system. Most impressive display was discarded cartons and odds and ends RAM card grew from Apple's original perhaps that of On-Line Systems, of junk appeared in the aisles; outside language card, and designers thought which included a stand-up arcade on Fulton St., an almost unimagin­ if one was good, then two would be game made from an old cabinet, odd able melange of U-hauls, trucks and better. Thus we saw 32K cards, 64 parts, and fed by the Apple game I/O. cars waiting for their cargo almost and even 128K cards, and now a A similar arcade machine, which entirely block the street; the Faire 312K card with a battery back-up. charged two-bits, was spotted at the was indeed over. Softape booth. Sirius Software's

Call -A.P.P.L.E. May 1982 7 Apple Pugetsound Program Library Exchange I Page 0011 of 0102 Call-A.P.P.L.E. Magazine • May 1982

Apple Pugetsound Program Library Exchange Page 0012 of 0102 Call-A.P.P.L.E. Magazine • May 1982

A CAll -A.P.P.LE. TUTORIAL: Program Optill1ization David H. Bartley/The App/e-Dillo

ITH a small amount of Step 1 finds the critical "inner Peephole optimization is a term effort, you may be able loops" that determine the running used for the simple and obvious tech­ to do something about time of the program. Except for nique of looking for inefficient opera­ W that sluggish BASIC bottlenecks caused by waiting for tions in a single statement or two adja­ program you wrote last week. You device I/O (such as reading from a cent statements and replacing them remember - the one that turned out disk file), programs usually spend the with something better. For instance, to be too slow to put up with? Our majority of their time executing in­ Apples are able to do so much so side a loop. The loop may be easy to 110 X = X + 1 quickly that sometimes we expect too see - like a FOR statement or a 120 X = 2*X much from them. If we can sort a short backward GOTO - or it may hundred names in one second, it be hiding out in a tortuous series of has an unnecessary assignment to X should only take ten seconds to do ten IF's, GOTO's, and GOSUB's. in line 110, since X is immediately times as many names, right? Well, Step 2 requires an intelligent and redefined m the following line. unfortunately, no sorting program informed analysis of the code identi­ Assuming that there are no GOTO's can ever be that good; a bubble sort, fied in the first step. Sometimes the or GOSUB's to 120, it may be removed for instance, would take 100 times as problem is that we've chosen the and line 110 changed to long lE:ause of its "N-squared" wrong algorithm. A good example of behavior. this is the bubble sort, easy to code 110 X=2*(X+1). Program optimization is a way to and understand, but extremely ineffi­ modify an existing, working, pro­ cient for sorting more than a dozen or The original code takes 6.23 msec gram to make it run faster or take so items. Switching to a faster tech­ (thousandths of a second) to execute; less space without changing what it nique (see almost any issue of practi­ the improvement reduces the time to does. Although most techniques for cally any magazine for a "new, 5.37 msec, speeding it up by 16%. optimizing programs were developed improved" sorting technique!) can We can still do better, though, by for use in compilers, many of them bring dramatic improvement. changing 2 * (X+ 1) to (X+ 1) + (X+ 1) can be successfully applied by hand. But don't forget step 3. If the and then simplifying: bottleneck only accounts for, say, 5% ... speedups of 10 to 1 of the running time of the program, 110 X = X+X+2 are possible ... then no optimization can speed things up by more than 5%. Likewise, if the This is an example of operator changes necessary to improve the strength reduction - a "strong" operation (multiplication) has been As we'll see, speedups of 10 to 1 or code make it significantly less read­ able, then you may want to leave it replaced by a "weaker" one (addi­ more are possible in some instances! tion). Addition in Applesoft typically Before you can optimize a pro­ alone. After all, having confidence that it works correctly is far more gram, you need to know what it does Addition in Applesoft and how it does it. Ask yourself these important than any small speed up. three questions: typically runs faster Simple Optimizations than multiplication ... 1) Where does the program Now - let's move on to some spend most of its time? specific suggestions for optimizing 2) What is it doing there? Is code in those inner loops. runs much faster than multiplica­ there a better way to do it? tion; in this case, the time has been 3) Can you improve the code in reduced to 3.67 msec, an improve­ the bottleneck area enough to ment in speed of 70%. make it worth your while?

Call -A.P.P.L.E. May 1982 9 Apple Pugetsound Program Library Exchange I Page 0013 of 0102 Call-A.P.P.L.E. Magazine • May 1982

PROGRAM OPTIMIZATION

The key to achieving this kind of Let's look at each of these in turn. If you thought reducing multipli­ speedup in your own programs is in In statements (1) and (2), there are no cation to addition was a neat trick, recognizing opportunities to replace visible arithmetic operations at all, look at what happens when exponen­ slow operations with faster ones by yet (2) is 26 times faster than (1)! To tiation is reduced to multiplication! rewriting an arithmetic expression. quote the Applesoft manual (page See statements (11) and (12). Chang­ Consider the following statements 120), "This is probably the most im­ ing XI\2 to X*X buys an increase in and their measured execution times: portant speed hint by a factor of 10." speed of 116%, or a ratio of 11.6 to I! The reason for this is hidden in Statements (13) and (14) are nearly as TIMING TEST RESULTS the workings of the BASIC inter­ impressive - changing XI\3 to X*X*X preter. In statement (1), the constant buys a ratio of 6.6 to 1. Statement Time (msec) 3.14159265 must be read as a series of characters and converted into the Loop Optimizations (1) Y = 3.14159265 32.9 internal floating point representation The key to optimizing a program (2) Y = PI 1.2 before it can be used. The conversion for speed is actually quite simple - (3) Y = 3.14159265/2 36.5 consists of a series of operations minimize the number of operations (4) Y = 2*X 4.7 similar to the following: that have to be performed when the (5) Y = X+X 2.2 program is running. In practice, (6) Y = 3*X 4.7 ACC = 0.0 however, it is not always that simple (7) Y = X+X+X 3.1 FOR I = 1 TO NUMBEROF­ to determine the number of opera­ (8) Y = 2*SQR(X) 50.4 DIGITS tions actually performed for a given (9) Y = SQR(X) + SQR(X) 92.9 ACC = ACC * 10. BASIC statement, or which opera­ (10)Y = SQR(X):Y=Y+Y 48.9 + NEXTDIGIT tions are open to improvement. We (11) Y = XI\2 49.0 NEXT I noted earlier, for instance, that the (12) Y = X*X 4.2 mere occurrence of the constant (13) Y = XI\3 48.0 Consequently, for a nine-digit con­ 3.14159265 results in at least nine (14) Y = X*X*X 7.3 stant like 3.14159265, there are at floating point multiplications and least nine multiplications and another another nine additions just to convert nine additions. it to an internal form so it can be used! Statement (3) illustrates another The real killer, though, is the fact "no-no." Notice that the extra divi­ that any operations within a loop will sion by 2 costs less than the conver­ be repeated each time through the &tbastian &nftwart sion of the long constant; nevertheless, loop, thus multiplying their impact on PRESENTS a division of a constant by a constant total execution time by the number of is rarely desirable and can be avoided. loop iterations. Loops within loops Thus, we might initialize PI and P2 further compound this situation. The (pi/2) as follows: 32.9 msec to convert 3.14159265 is 1Aihlt insignificant outside of a loop, but 10 PI = 3.14159265 consumes 3.29 seconds when repeated 20 P2 = PI/2 100 times. This is one reason for the immense FOP. THE - The whole point to this, of course, - APPLE Ill!> COMPUTER popularity of sort routines and is that PI and P2 are defined outside REQUIRES DOS 3.2 OR 3.3, APPLE50FT of any loops. . algorithms. Sorting inherently re­ PROGRAMS INCLUDE quires nested loops iterating over ° BIBLE QUIZ Statements (4) through (7) demon­ ° ADD VERSES strate the reduction of multiplication rather large arrays (and thus large ° RLE MAINTENANCE loop counts). For this application, the Easily memorize verses of scripture with this to addition. Replacing 2*X with X+X unique system. Enter the verses you wish to brings a 65% speedup, while replac­ "inner loop" is the whole thing! remember into the data base using the Add ing 3*X with X+X+X brings 50%. Every new sort algorithm improves Verses Program. The Bible Quiz Progrom wni then formulote questions on all of the verses Strength reduction cannot be applied on its predecessors by either mini­ you hove selected to be quizzed on. There blindly, however. The dominant factor mizing the work to be done at each ore 5 different types of questions each verse may hove with 0 variety of different woys to in statement (8) is the calculation of iteration or by reducing the number osk each type: the square root, not the multiplica­ 1. Reference 0 quoted verse. of iterations needed. 2. Give the topic of a verse number. tion. The timing for (9) shows that we In the following paragraphs, I will 3. Quote 0 numbered verse. are better off not duplicating the call briefly discuss five optimization 4. Pick the verse number in 0 given chapter to SQR. (10) shows how to do both - for 0 particular subject. techniques used for speeding up 5. Fill the blonks of a verse. reduce strength and avoid duplicating You moy group your verses by Books of the the SQR - at a small increase in speed. loops. Keep in mind that it is the Bible, topics, or whatever you wish. dynamic behavior of the program that Available now for only S29.95 postpaid from: .. .Iook what happens when we are seeking to improve. This PROFESSIONAL COMPUTER necessitates some informed guessing SYSTEMS exponentation is reduced about the frequency of execution 318A LINCOLN a. to multiplication' of the various statements we are BLOOMINGDALE. IL 601 08 examining.

10 Call -A.P.P.LE. May 1982 Apple Pugetsound Program Library Exchange I Page 0014 of 0102 Call-A.P.P.L.E. Magazine • May 1982

Loop Elimination The FOR statement can be used This change reduced the time of exe­ Sometimes the simplest optimiza­ this way because of the way Boolean cution from 306 to 162 msec for the tions are the best. Many loops can values are represented by Applesoft case where the THEN clause is exe­ actually be eliminated for one reason - false is 0, true is 1. Each time cuted (22) 100). If 22 is not greater or another. One good reason is obso­ through, the loop variable will be set than 100, the extra assignment actu­ lescence - as you make changes to a to either 0 or 1 depending on the ally adds overhead. A better formula­ program, you may find that previously "truth" of the terminating condition. tion would then be written code just isn't necessary any The NEXT statement will continue more, or that the heart of a loop has to pass control back to the top of the 100 Z3 = X/\2+Y/\2 become unnecessary and the rest can loop until Q reaches its terminating 101 IF Z3 > 10000 THEN Z(I) = be rewritten in a different way. value, which is 1 (true). SOR(Z3) Another instance is the loop that which runs in 110 msec when 23 implements a function that could also Code Motion < 10000. be defined in "closed form." For The next best thing to eliminating example, the loop an operation in a loop is to move the operation outside of the loop where it Strength Reduction The classical example of operator 100 N = 100: J = 0 won't get executed as often. Loop in­ 110 FORI=1TON:J=J+1 variants are expressions that don't strength reduction is to change 2*X :NEXT change in value during the course of a to X + X - a slow multiplication has loop. They may be simple constants, been transformed into a faster addi­ does no more than the equation variables which are not given new tion. FOR loops present us with even values, or expressions made up of more interesting possibilities for 100 N = 100 such variables and constants. applying variations on this technique. 110 i= N*(N+1)12 Consider the following FOR loop, which executes in 2810 msec when ... a classic example is to change but takes 30 times as long to do it! A=99: (350 msec vs. 11.7 msec) Another 2*X to X*X ... example: I once saw a large BASIC 100 FOR I = 1 to 50 subroutine which implemented the 110 X(I) = X(I) + SOR(Al2) Consider the loop ARCSIN trig function as a Taylor 120 NEXT I series expansion. This can be much The variable A is not modified in 100 FOR I = 1 TO 50 more efficiently derived in Applesoft 110 A(2*1) = 0 this loop; therefore the expression using the trig equality 120 NEXT I SQR(N2) is a loop invariant which ARCS!N(X) = may be "promoted" to a point and the simple improvement ATN(X/SQR(1·X*X» preceding the FOR as follows: 100 FOR 1=2 TO 100 STEP 2 (See the list of derived functions on 90 A2 = SOR(Al2) 110 A(I) = 0 page 103 of the Applesoft manual.) 100 FOR I = 1 TO 50 120 NEXT I 110 X(I) = X(I) + A2 Change in Form 120 NEXT I which decreases the run time from Although you can code just about The new loop requires only 440 msec 352 to 245 msec. any looping structure imaginable in to execute. Expressions like 2*1 in the example BASIC with GOTO statements, only which are linear with respect to the the FOR loop is provided for explicitly loop control variable (i.e. m * I + b, in the language. WHILE and Common Sub-Expression Elimination where m and b are loop invariant) REPEAT loops are usually formed can always be reduced in strength. Removal of a redundant common with GOTO's and IF's. I've noticed For example, take the loop several magazine articles over the subexpression can buy you savings in past year suggesting that FOR loops both time and space. For instance, . 100 FOR I = 1 TO 50 be utilized instead (see page 162 of the statement 110 A(I) = 3*1 + 7 120 NEXT I the September 1981 BYTE, for exam­ ple). 100 IF SOR(X/\2+Y/\2) > 100 Here we have m=3 and b=7. This The code skeleton for a REPEAT THEN can be rewritten as: Z(I) = SOR(X /\ 2 + Y /\ 2) statement is contains a large and expensive com­ 90 J = 7 100 FOR 0=0 TO 1 100 FOR 1=1 TO 50 mon subexpression that should be 105 J = J + 3 110 loop body rewritten as 120 0 = terminating condition 110 A(I) = J 130 NEXT 0 120 NEXT I 100 Z2 = SOR(X/\ 2 + Y /\2) This corresponds directly to the 101 IF Z2 > 100 THENZ(I) = Z2 The multiplication by 3 has been Pascal prototype reduced to addition and the addition of 7 has been promoted out of the loop repeat loop body entirely. As a result, the execution until terminating condition time dropped from 406 to 367 msec.

Call -A.P.P.L.E. May 1982 11 Apple Pugetsound Program Library Exchange I Page 0015 of 0102 Call-A.P.P.L.E. Magazine • May 1982

PROGRAM OPTIMIZATION

Summary I hope this introduction to the If you divide by "old time" instead of What conclusions can we draw science of program optimization has "new time," you'll get the percentage from all this? First, recall that all of the been informative and interesting. If decrease in time spent. I prefer to timing figures are in the millisecond nothing else, I hope someone has gained think in terms of increased speed. range; the payoff to improve a state­ further insight into the subtleties of ment is going to be negligible unless it the programming art and the peculiar­ tri appears in a loop with several itera­ ities of the Applesoft Basic interpreter. tions. Concentrate on finding the real "inner loops" so you don't waste your Appendix time. You may be wondering how I calculated the percentage speedup ... remove constants figures - especially if you tried it and For A.P.P.L.E Members Only from loops ... got different (and smaller!) numbers. 50 Although I measured decreases in time, OISKPAK 12 - $16. I emphasized in execution Newly Revised for Apple 11+* Secondly, the simplest improve­ increases rate. The formula used is ments payoff well and may be all you A collection of 40 Applesoft games, need. Learn to recognize opportunities 8 color demos, etc. new rate - old rate to remove constants from loops and to A.P.P.L.E. Orders speedup = * 100% perform simple strength reduction. old rate 304 Main Ave. S., Suite 300 And lastly, try to take a larger Renton, WA 98055 perspective about what you are doing. (206) 271-4514 The execution rate is the reciprocal of Is the program used often enough to Visa, MIC welcome the time; thus, this . formula is require improvement? Is there a better Washington State reSidents add 6 6% tax equivalent to Overseas Shipping ...... -t. 1 oz way to solve the problem than the AU foreign orders finel, Canada) will require additional postage and Shipping code you have written? And, of old time - new time course, don't get carried away making "Apple 11+ is registered trademark of speedup = * 100% Apple Computer Inc. changes that make your code hard to new time read - or worse, make it incorrect. 6 Ports MORE & a Joy of a stick

exclusive EXPANDAPORT gives

plete with speaker for greater sound. Only $69.95. This JOY STICK's a joy --~~ to use. Its heavier metal case doesn't slip a: or slide like plastic. And the very sensitive switch's guaranteed for 1,000,000 pushes. Better control and reliability, only $59.95. At computer stores, or: • FUNF DATAMOST 9748 Cozycroft Ave. - .. Chatsworth, Ca 91311 (213) 709-1202 VISA/MASTERCHARGE accepted. 3% shippingl handling charge. (California residents add 6% tax) FUN! ·Apple is a trademark of Apple Computer. Inc.

12 Call -AP.P.LE. May 1982 Apple Pugetsound Program Library Exchange Page 0016 of 0102 Call-A.P.P.L.E. Magazine • May 1982

GET FREE SOFTWARE FOR YOUR COMPUTER! HOW? JUST ORDER ANY OF THE ITEMS BELOW, AND SELECT YOUR FREE SOFTWARE FROM THE BONUS SOFTWARE SECTION, USING THE FOLLOWING RULE: FOR THE FIRST $100.00 WORTH OF MERCHANDISE ORDERED TAKE 1 ITEM; FOR THE NEXT $200.00 WORTH OF MERCHANDISE ORDERED TAKE ANOTHER ITEM: FOR THE NEXT $300.00 TAKE A THIRD ITEM, ETC. ALL AT NO COST.

HARDWARE by APPLE COMPUTER PRINTERS COMPUTER SYSTEMS APPLEII + .48K 1199 PASCAL LANG. SYS 397 EPSON: HEATH/ZENITH: FLOPPY OR + CNTRLR 535 FLOPPY DRIVE 455 MX80 495 MX80FIT 575 Z89FAComputer(48K) 2150 Z90 Computer 2490 We carry Ihe rest 01 Ihe APPLE line at low. low prices I CALL' MX100w/Graftrax 775 MX70w/Graftrax 375 Z19Terminai 725 Z47 Dual8 Drive 2775 APPLE Intice/Cbl 85 GRAFTRAX 90 WORDSWORTH by LEADING EDGE: GRAPPLER Intic 149 2K BufferSer. Card 135 (A Zenith Z89 & C.ITOH 25 cps Starwrlter & CP/M & Fuli Word· OTHER HARDWARE for APPLE MX80R,bbon 15 MX100R,bbon 24 Processing Software & Super·Calc) 4500 D.C. HAYES: C.ITOH: HEWLETT-PACKARD: Mlcromodem II 300 Smartmodem 239 25CPSDaISyPar 1440 25CPSDaISySer 1495 HP125 2599 HP85 2099 MtCROSOFT 45CPSDaISyPar 1795 40 CPS DaISY Ser 1895 82903A 16K Mem 250 290/M Dual5 'Drive 2125 PRO·WRITER Par 5t5 Z80 Soltcard 269 16K Ramcard t59 DaiSY Tractor Option 225 NEC: MOUNTAIN COMPUTER: NEC SPINWRlTERS & MATRIX PRINTERS: PC8001A32KComputer 1099 PC8012A 1/0 Unit 699 3530Par 1895 351OSer/RO 1895 CPS Multltuncllon 199 AID + D/ACard 105 IRO PCBD31 A Dual Drives 1099 CP/M2.210rNEC 125 7730Par/RO 2445 77IOSer 2445 Expans. ChaSSIS 595 Romplus 135 IRO Wordstar lor NEC 299 Super Calc lor NEC 279 CALL FOR MORE PRICES WE CARRY FULL LINE' 770 Sellum 2795 NEC PC8023A 675 COMMODORE: CALIF. COMPUTER SYSTEMS: aUME' DIABLO: VIC20Computer 259 VIC1515Prlnier 315 2149 Centronics Par In! 115 A/DConv 105 9/45 630 RIO 2350 8032 MICro Malnlrame 1100 8050 1MB Dual DISk 1375 Async, Senallnt 135 Anth Proc IDlsk 339 IDS: 82502 MB Dual Drive 1760 4040 Dual Drive 999 CALL FOR MORE PRICES WE CARRY FULL LINE' 445G 699 460G 875 4022 Prlnler 630 8024·7 HI·Speed Printer 1345 Prism Color Printer 1699 VtDEX' 560G 1075 ATARI: 80Col Board 275 SWitCh plate 15 TI: 810BaSic 1349 Bl0Seriai 1429 ATARI800(16K) 599 ATARI400(16K) 339 8tODISkDrive 449 825 Printer 6t9 Enhancer I 105 Enhancer 11 125 MPI: 88G 579 99G 669 16K Ram Memory 89 850lnlerlace 159 MORE OTHER HARDWARE FOR APPLE: PRINTRONIX: P300 4500 P600 6150 MICROSOFT BASIC 69 VISICALC 159 SSMAIO 159 ABT Keypad 119 8t5DISk I t99 Leiter Perieci 125 SSM Serial ASIO 115 Keyboard Co Keypad 129 INTEC32KRam 129 Axlon 128K Ram DISk 550 SSM Par APIO 99 Sunshine Joystick 40 ADD-ON MEMORY CARDS & DISK DRIVES SSM A488IEEE 425 CISCO Paddles 29 FOR APPLE XEROX: NovatlonAPL CAT 820·1 System w15' Dr 2495 820·2Syslemw/8"Dr 3145 339 Prometheus Z Card 229 MEMORY: VERSAWRITER WORDSTAR 419 CP/M OP. SYS 175 249 SUPR MOD 29 MICrosolt 16K Ram card 159 Saturn 32K Ramcard 199 SUPERBRAIN INTERTEC Legend 128K Ram card 649 Prometheus 128K Ram 550 by 64KDD 2695 64KQD 2995 OTHER SOFTWARE for APPLE: Legend 64K Ram card 299 4116Add·ln Mem/16K 29 SVA 256K APL ·Cache 1045 DSS tOMeg 3195 Emulator 725 Interlube 725 PERSONAL SOFTWARE APPLE-COMPATIBLE FLOPPIES by MtCRO-SCI: Vlslcalc 3,3 159 Vl51tlie 199 With Controller No Controller VISlplot 149 VISlplot ,i Vlsltrend 199 A35 Orr Replacement 450 A35 415 Vlslterm 125 Vlsldex 169 A4040·Track 489 A40 399 Desktop Plan II 169 Vlslpak 559 A7010·Track 599 A70 499 CRT TERMINALS Televlde0912C MtCROSOFT Healh/Zenith Zt 9 725 685 APPLE·COMPATIBLE FLOPPIES by VISTA Televldeo 920C Televldeo 950C 9B5 APPLE Fortran IZ801 149 APPLE CobOIIZ80) 499 775 40 Track 163KB 389 80Track326KB 559 Televlde0910 595 ADDS Vlewp0lnl 595 TASC BaSIC Compiler 139 OlympIC Declathon 25 160 Track 652KB 799 8" A800 Coni roller 549 ADDS R25 875 ADDS R40 1175 MICRO-PRO VIDOO Dual8" VtOOO Dual8" AM PEX Dialogue 80 2·page. Delachable 995 Wordstar 245 Mall-Merge 99 Subsystem 1300 Obi Side 1600 IBM 3tOl·tO 1199 Spell·Star 149 Dala'Sldr 199 SORRENTO VALLEY ASSOC: PEACHTREE: BIZPackaYls. all 219 AM S 8000 Dual8" 1945 AMS50005Mb. Drive 2995 CPA BIZ Packagls, all 199 AM S 8000 Dual 8" AMS501010MbDrive 3495 Obi Sd 2595 DISk 2 + 2Controller 359 MORE OTHER SOFTWARE for APPLE: ZVX4Quad Coni roller 495 CAT 159 OCAT 169 VENTEL212·3.1200BD 819 AUTOCAT 229 DB Master 179 DB MaSler lor CORVUS 399 CORVUS LEX·ll 149 UNIVERSALAUTO ANS 220 Data FaclOry 125 PFS 85 5Mbyte 3195 10Mbyle 4395 UNIVERSAL ORIGI ANS IBO UNIVERSAL 1200BD 259 ASC II Express 3 3 55 PFS Report 85 20 Mbyle 5600 Mirror 675 SorClm Super Calc 250 Spellguard CPI M 235 Howard Tax Preparer82 125 Broderbund G Ledger 335 Real EstateAnalyzer 129 Broderbund Payroll 335 MONITORS & PLOTTERS Ashlon d Base II 495 dBase II Manual 50 ZENITH: S100 CARDWARE GraphTnx 49 12" Green 125 13 'Color 375 SSM MB6464KMem 775 HAYES SI 00 349 AMOEK: CCS 64K DynamIC 429 aT Clock/Cal t35 WORD-PROCESSORS for APPLE: 12"Green 135 13 'Color 375 WordstarCP/M 245 EZWnter Prot, Sys 215 WATANABE FLATBED PLOTTER: MaglCWandCP/M MUSESuperTexl t25 299 4 Pen 1150 6Pen 1400 Executive Secretary 199 Wordpower 50 Letter Pertect 125 Hebrew II 55 STROBE CYLINDRICAL PLOTTER FLOPPY DISCS MagiC Window 85 SuperScribe II 110 Plolter 699 APPLE Inltce 15 3M 5" Soft SSSD/bx 29 3M 8" Soft SSSD/bx 33 Spellguard 235 Spellslar CP/M 149 HOUSTON INSTR FLATBED PLOTTER: Elephant 5.25" Elephant 8" Word Handler (Gives 80-Col & lower case with no board I ) 199 DMP3Smari Plolter 1299 6·Pen Adaptor 349 Solt SSSD/bx 25 Soft SSSD/bx 29

BONUS SOFTWARE SECTION! Let uS acquaint you With MESSAGE-MAKING SOFTWARE Just place the disk in the Records of files can be printed. if desired, Additional modules coming are a STATISTICS APPLE. enter the text, and colorful. dynamic messages appear on the screens of TV sets INTERFACE. CHECKBOOK, MAILING LIST & DATA-ENTRY connected to the computer, Use the software to broadcast messages on TV screens in REQUIRES 48K & ROM APPLESOFT $40 schools. hospitals, factories, store window, exhibit booths. etc The following program is APPLE LITERATURE DATABASE: Allows rapid retrieval (.... ia keywords) of references from our latesl release total APPLE literature thru 1980, on 5.25" disk Each entry in the data base consists of the SUPER MESSAGE Creates messages in full'page "'chunks" Each message allows article, author-name. periodical-name. date of issue, & page nos, The database is statements of mixed typestyles. typesizes and colors, in mixed upper and lower case intended to support large magazine files which would require lengthy manual searching Styles range from regular APPLE characters. up to double-size, double·width characters to reco .... er information. Annual updates will be available with a hea .... y. bold font Six colors may be used for each different typestyle, \krtical and REOUIRES 48K & ROM APPLESOFT $60 horizontal centering are a .... ailable, and word·wrap is automatic. Users can chain pages WORDPOWER: Is a simple, powerful. low cost, line·oriented word-processor program. It together to make multi-page messages Pages can be ad .... anced manually or automatical offers a fast machine language FIND & REPLACE Text can be listed to screen or printer. Iy. Multi·page messages can be stored to disc or recalled instantly. with or without line-numbers, Lower-case adaptors are supported, You can merge files. REOUIRES 48K & ROM APPLESOFT $50 mo .... e groups of lines, and easily add, change, or delete lines. WORDPOWER can be used APPLE PLOTS YOUR DATA & KEEPS YOUR RECORDS TOO! APPLE DATA GRAPH 2.1 to create and maintain EXEC files. It can also be used as a rapid, unstructured, informa­ Plots up to 3 superimposed curves on the Hi-res Screen both X & Y axes dimensioned tion-storage and retrie .... al system via its rapid search capabilities Each curve consists of up to 120 pieces of data. Graphs can be stored to disc and recalled REOUIRES 48K & ROM APPLESOFT $50 immediately for updating. Up to 100 graphs can be stored on the same disc Great for LABELMAKER: Allows users to quiCkly create address labels. A gi .... en label may be gen­ Stock·market Charting, Business Management. and Classroom instruction I erated in any quantity from 1 to 32767, Space is allowed on labels for a personal and REOUIRES 48K & ROM APPLESOFT $35 company name. but the space is automatically closed up if only a personal name is APPLE RECORD MANAGER: A.llowS complex files to be brought, in~o mem.ory so that enlered. Space is also allowed for foreign countries. The program can also generate record searches and manipulations are Instantaneous. Records Within any file can can­ labels for price·tags, part numbers and mail-messages such as "RUSH" "FRAGILE", etc tam up to 20 fields, With user-defined headings. Information can be stnng or numenc A self-incrementing feature allows theatre·tickets to be produced, with a date, and Users can browse thru flies usmg page-forward. page-backward or random-search com numbers running from aOOO to z999. An editor is pro .... ided for editing labels prior 10 print mands Records can eaSily be searched, altered or sorted at will, Files can be stored on ing, All labels may be sa.... ed to disk for instant recall the same dri .... e as the master proqram. or on another, if a second dri .... e is a .... ailable REQUIRES 48K & ROM APPLESOFT $35 Above software for APPLE DOS 3.213.3 only. Call for BONUSES for other systems. CONN. INFO. SYSTEMS CO. TO ORDER: Use phone or mail. We accept VISA, MASTERCARD, COD's, personal checks & money orders. Add 4% for credit card. Customer pays handling on COD orders. Foreign (203) 579·0472 orders must be in American Dollars & include 10% for handling. Connecticut residents add 7.5% sales tax. Prices subject to change without notice. 218 Huntington Road, Bridgeport, CT 06608

Apple Pugetsound Program Library Exchange I Page 0017 of 0102 Call-A.P.P.L.E. Magazine • May 1982 IMAGE PRINTER SERIES Sensible Software is proud to introduce our new series of high resolution screen dumps. IMAGE PRINTERS provide a simple way to transfer high resolution graphic images onto paper. Each pro­ gram in the series has unique features that give you full control of the printing. Some of the included options are: • Full control over the area of the HIRES screen to be printed. You graphically pick the area for the utmost ease and accuracy. • One-step printout of the picture with the ability to pause or abort the printing at any time. • Menu-driven. All options are invoked with single keystrokes. I MAGE PRI NTERS are extremely easy to use. • Multiple image sizes, 6 different sizes for letter quality printers, 4 sizes for other printers. • Creation of an inverse (negative) image for reverse printing. • The ability to save the compressed and inverse images to disk. • One time configuring for your printer and interface card. Why answer all those questions about your printer each time you want to print a picture? • The images may be printed anywhere on the page. • IMAGE PRINTERS support most popular interface cards, such as cards from Apple, California Compu­ ter Systems, Epson, and Mountain Computer. (The SSM AIO Serial Card and user-written 'driver' routines may be used with the letter quality printers.) There are three separate versions of IMAGE PRINTERS, each one tailored to take full ad­ vantage of a different printer. IMAGE PRINTER-LEDER QUALITY. For all popular letter quality printers (Diablo, NEC, Qume, etc.) IMAGE PRINTER-EPSON. For the popular Epson MX-70, MX-80 and MX-100. IMAGE PRINTER-NECPC-8023A. For the NEC dot-matrix printer. All v.rslons ar. avollabl. for 540.00.a. Please specify version desired. m SenSl"ble Software 6619 Perham Oflve Dept C West Bloomfield. MIChigan 48033' (313) 399·8877 Visa and Mastercard Welcome Please add $1 25 postage and handling per diskette

Apple Pugetsound Program Library Exchange Page 0018 of 0102 Call-A.P.P.L.E. Magazine • May 1982

A IS FOR APPLE: Adding Machine Ralph Swedl6w, MD./Cal/-A.P.P.L.E. Staff Writer

HEN it comes time to Line 10 clears the screen. The Why not change lines 40 and 50 balance your check­ Clear command sets all variables and also? We can combine them, and book or to add a column arrays to zero as a precaution. Later make the output easier to read with a W of numbers, do you in the program, we will set up some label. Delete line 50 and change line reach for a pocket calculator instead arrays, and we want to start with all 40 to: of your trusty APPLE? No need to, for at zero. Use CALL -936 for pro­ 40 S=S+N:PRINT TAB (25) "SUM = ";S the APPLE will do more and better grams written in Integer. Line 20 than most hand held calculators. If sets S to O. Line 30 asks the user to This combines two lines, saving you have a printer, the computer will input a number, and then line 40 memory, and also prints the word even give you a printout of your adds the previous sum (S) to the new "SUM" and the Sum, starting in entries, something a simple calcula­ number. Line 50 prints the sum, and column 20 where it is more legible!! tor cannot do. line 60 goes back to allow the user to When this program is run, the You can use your APPLE as· an input the next number. When this screen clears, you are asked to enter adding machine by typing "PRINT" simple program is run, you can add a number, the sum is printed and (in Applesoft, the question mark numbers easily, and also see what then you have the choice of contin­ works as well) and then entering the you entered to correct for any errors. uing or ending. Press the "E" key or numbers you wish to add. You must However, you have created an end­ the "C" key, whichever is your hit two keys to do so: the shift key less loop and to stop the program, you choice. Is this better? Yes, it is, but and the "+" key. As many numbers need to hit the Reset Key. Can we do line 60 keeps being printed and takes as you need to total can be added better? up space on the screen. Why not together this way. When return is Yes, we can by programming an print it only one time and have it hit, the sum is printed, just enter "End" or "Continue" command. stay on the screen. number one, type the plus sign, enter Change line 60 to: Here is how: Add line 15: number two, the plus sign etc., until 60 PRINT" C TO CONTINUE .. E all the numbers are entered. Then hit TO END":GET C$ 15 PRINT" C TO CONTiNUE .. E return, and the sum will be printed. TO END":POKE 34,1 And then add these lines: This is time consuming, and not This prints the instruction to the very productive, but it will work, and 70 IF C$<>"E" AND C$<>"C" THEN user one time and then sets the top of you can also see what was added CALL -198:PRINT "RE-ENTER": GOTO 60 the screen to below the second together for possible errors. Let's see 80 IF C$="C" THEN GOTO 30 vertical position. So, regardless of if we can't write some programs to do 90 IF C$="E" THEN END how many numbers are added, the the hard work for us. 100 END top of the screen will show the same 10 HOME:CLEAR instruction which will not be scrolled 20 S=O Line 60 is the End or Continue off the top of the screen. Now, change 30 INPUT "ENTER NUMBER: ";N command. It prints the instruction line 60 to GET C$. Add these lines: 40 S=S+N and asks for C$. If C$ is "E" the 12 INVERSE 50 PRINT S program ends. It it is "C" the 16 NORMAL 60 GOTO 30 program goes back to line 30, giving you chance to add the next number. These lines print the instruction in Line 70 rings the bell and tells the inverse and then re-sets the output to user that neither the "C" or the HE" normal. key was hit; it then gives the user We now have a nice adding another try. This is a good example machine, but can we still do better? of using a command to ring the bell!! Of course we can!! Here is how: Call -198 is one of several ways to Change line 90 to: make the computer's bell ring. 90 IF C$="E" THEN TEXT:HOME: GOTO 1000 And add the following lines:

Call -A.P.P.L.E. May 1982 15 Apple Pugetsound Program Library Exchange Page 0019 of 0102 Call-A.P.P.L.E. Magazine • May 1982

ADDING MACHINE

1000 PRINT But what if there are more than 24 Line 110 looks at C$; if it is not "N" 1010 FOR 1= 1 TO K numbers that were added? The and not "Y", in other words, any 1020 PRINT "NUMBER (";1;") = ";N(I) numbers will scroll off the screen other key, the program will ring the 1030 NEXT I and can't be read. Can we fix this computer's bell to get the user's 1040 PRINT TAB(15) "SUM = ";S problem? Yes, we can!! attention, and go back to line 100 for What is the K in line 101O? It is a Change line 1000 to: another try. counter that is used to label each 1000 SC=O Line 1050 returns the program to line 140 where the Apple is reset to number added in the sum. Now go Then add line 1025: back to line 20 and change to: slot 0 and the printer is disconnected. 1025 SC=SC+1:IF SC=20 THEN SC=O: Any other improvements? How 20 5=0: K=O :DIM N (88) PRINT"ANY KEY TO CONTINUE":GET C$:HOME about printing a formatted listing Then add line 35: with all decimal points aligned or 35 K=K+1:N(K)=N We have added a screen counter, adding a plus or minus sign as SC, which will count the number of Line 20 sets K and S to 0 and sets required. The program is listed on lines printed. SC is set to zero in line page 19 & 9l. the dimension of the array N(K) to its 1000 and incremented bv one, each maximum of 88. If we did not do so, time a line is printed. when SC =20, 25 INPUT"HOW MANY DECIMAL PLACE ACCURACY?:";DP:PRINT we could have labeled only 10 num­ the program will halt, giving the user bers before getting an "OUT OF the chance to review the first 20 The last PRINT command in line MEMORY ERROR". Line 35 adds numbers added. When any key is hit, 25 is there to add a blank line to one to the counter and then creates the next 20 lines will be seen and can separate the next line printed. an element in the array N(K) equal to be reviewed. And then change line 40 to: N. When the program gets to the sub Would you like a printout so that 40 5=S+N:S=INT (5*(10 DP)+.5)/(10 routine at line 1000, it reads the you have a hard copy of your data? If DP):PRINT TAB (15)"SUM =";S array and prints each N that was you have a printer, you can have one! entered! This allows you to see each If you don't have a printer, leave line This looks more complicated than number that was added. Line 1040 100 as is and the program will end. it really is. First N is added to the old then prints the Sum in column 15 of Change line 100 to: S, then new S is multiplied by ten the screen. raised to the power of the number of 100 INPUT "WANT A PRINTOUT... Y/N decimal places desired. Afterward, ?:";P$ 0.5 is added and the integer calcu· And add the following lines: lated. Finally division by 10 raised to 110 IF P$<>"Y" AND P$()I'N" THEN the power of DP rounds off the Sum PRINT CHR$(7):PRINT "TRY to the correct number of decimal AGAIN":GOTO 1000 places. Try playing with this last 120 IF P$="N" THEN END equation. It is very useful in many 130 IF P$="Y" THEN D$=CHR$(13)+ applications. CHR$(4):FLASH:HTAB 18:PRINT Any other improvements? I can't "PRINTING":NORMAL:PRINT D$; think of any; perhaps you can. "PR#1":GOSUB 1000 Save this program to a disk, with 140 PRINT D$;"PR#O":HOME:VTAB the name of APPLE-ADDER or any Type your manuscripts, catalogs, or 15:HTAB 18:PRINT "ALL DONE": name you choose. When it is run, you other text into your word processing com­ puter. END will be asked· for number of decimal 1050 GOTO 140 places you want, then you are given Send it to us on a diskette or via- a the chance to add a number. If you modem transmission and we'll send you Line 100 asks if a print out is camera ready film copy. want to continue, hit and you desired and if the answer is no, line may do so. Hit and the program Computer typesetting provides high 120 ends the program. If the answer prints to the screen the numbers you quality, easy to read copy at a fraction of is yes, line 130 initializes the printer have entered and the grand total. A the cost of conventional typesetting. with the DOS command of D$, sets printout option is available if you Call or write for instructional brochure the output to the screen to flashing, want one and have a printer. that includes typestyle selections, format­ while the data is being printed as a If you are doing work involving ting instructions, and examples. hard copy via sub-routine at line money, select two decimal places and 1000. After the printer is finished, your figures will be rounded off to line 140 ends the program and sets dollars and cents. The program will the computer output back to the also add numbers expressed in Dream Electronics screen. A note of caution; if your scientific notation. 50:~-75248:n printer is not in slot #1, you may need Oh yes, APPLE-ADDER will also different instructions. Be sure to subtract. How, you ask. By just 131 N.W. 2 nd. St. check your printer's manual for adding a negative number. For specifics. Corvallis, Oregon 973:W example to subtract 100, add -100. Try APPLE-ADDER. It is a lot more fun than a pocket calculator.

16 Call -A.P.P.LE. May 1982

Apple Pugetsound Program Library Exchange Page 0020 of 0102 Call-A.P.P.L.E. Magazine • May 1982

DISCOUNT DATA PRODUCTS FOR THE BEST SERVICE AND PRICE YOUR $ CAN BUY 30% DISCOUNT * MONTHLY SPECIALS GAMES* UTILITIES * BUSINESS

LIST OUR LIST OUR LIST OUR APPLE PRICE PRICE PRICE PRICE PRICE PRICE HIGHLANDS COMPUTER SERVICES Snake Byte. * ADVENTURE INTERNATIONAL *. .0 2995 23.95 HOWARD SOFTWARE Audex .0 29.95 23.95 APPLIED SOFTWARE * Tax Preparer...... 0150.00 119.95 Sneakers ."" .. ".0 29.95 23.95 * ASTAR INTERNATIONAL COMPANY Real Estate Analyzer.. . .. 0 150.00 104.95t Epoch ".,,"" 0 34.95 27.95 Outpost. """ 0 29.95 20.95t ASHTON TATE * INNOVATIVE DESIGN SOFTWARE Beer Run . • •.... 0 34.95 27.95 ARTSCI Pool 1.5 .. " " " . " " . " " ,,0 34.95 24.45; Borg. ,,0 29.95 20.95; Magic Window ...... 0 99.95 79.95 Trick Shot ...... 0 39.95 31.95 Hadron """"" .. ".0 34.95 27.95 Basic Mailer...... 0 69.96 55.95 Joyport . """." A 74.95 59.95 INFOCOM Magic Spell...... 0 55.95 44.75 Zork II. " " " " .. • "' . ,,0 39.95 31.95 SIR-TECH SOFTWARE AUTOMATED SIMULATIONS Wlzardy ...... 49.95 39.95 * !,S.M. 0 * AVALON HILL GAME COMPANY Mathemagic ...... 0 89.95 71.95 * SOFTAPE * SOFTWARE EMPORIUM AVANT-GARDE CREATIONS * ISA * LAZER SYSTEMS * IUS SOFTWARE PUBLISHING CORP. Hi-Res Secrets...... 0 125.95 99.95 PFS. " . " 0 125.00 99.95 LJK ENTERPRISES MICRO LAB Hi-Re. Golf. . .. 0 29.95 23.95 * * PFS Report . 0 95.00 71.95 Zero Gravity Pinball. 0 21.95 15.95 MICRO PRO INTERNATIONAL * SOUTHEASTERN BEAGLE BROTHERS MICROSOFT Data Capture. ",,0 64.95 52.95 DOS Boss. ... 0 24.00 19.95 TASC Compiler. " " .. 0 175.00 139.95 Superterm 80 cot ... 0 90.00 69.96 Utility City. . 0 29.50 23.95 ALO.S .. """.0 125.00 99.95 Smart Term 80 col ".0 90.00 69.95 Alpha Plot . 0 39.50 31.95 Time Manager...... 0 150.00 119.95 Vldex 80 col. o 90.00 69.95 * BEZ * MICROSOFTWARE SYSTEMS * MAR SOUTHWESTERN DATA SYSTEMS Ascii Express II ...... 0 79.95 55.95; BRODERBUND SOFTWARE MUSE * Ooubletime Printer ...... 0 149.95 119.95 Star Blazer. """".0 31.95 25.50 ON-LINE SYSTEMS Financial Mngmnt Sy. II "" 0 59.95 47.95 Space Quarks. .0 29.95 23.95 Ultima II . . 0 54.95 43.95 Listma.ter...... 0 39.95 31.95 Genetic Drift . ".0 29.95 20.65; Frogger. . 0 34.95 27.95 Merlin ...... 0 64.95 51.95 Oavid's Midnight Magic. ".0 34.95 27.95 E.P.F """"""."""." 0 79.95 63.95 The Routine Machine. . .. 0 6495 51.95 Arcade Machine ." 0 44.95 35.95 #4 Ulysess & Golden Fleece. 0 34.95 27.95 Speed Star.. . .. 0 134.95 107.95 Superscribe II . 0 129.95 103,20 BUDGECO The Correspondent. . .. 0 59.95 Expeditor II AppleSoft Com. 0 99.95 79.95 47.95 Raster Blaster...... 0 29.95 23.95 Z-Term 0 99.95 Jawbreaker """""""" 0 29.95 20.95; 79.95 CALIFORNIA PACIFIC Z-Term "The Pro" ..... 0 150.00 104.95; Road Work. " " "". 0 39.95 31.95 Apple-oids ...... 0 29.95 23.95 Marauder ...... 0 34.95 27.95 STONEWARE PRODUCTS Aklabeth . 0 34.95 23.95 O.B. Master ..... , .. 229.00 PERSONAL BUSINESS SVSTEM 0 182,95 O.B. Mas. Utly Pak I """" 99.00 CAVALIER COMPUTER Exec. Secretary 0 250.00 174.95; 0 79.95 Aster Field ...... 0 24.95 19.95 O.B. Mas. Utly Pak 2 ...... 0 99.00 79.95 Bug Attack ...... 0 29.95 20.65; * PERSONAL SOFTWARE O.B. Master Stat Pak ...... 0 99.00 79.95 PICCADILLY Micro Wave ...... 0 34.95 27.95 * STRATEGIC SIMULATIONS Star Thief ...... 0 29.95 23.95 Falcons ...... , , .. 0 29.95 23.95 Suicide ...... 0 29.95 20.65; * SUBLOGIC * CONTEXT * C.P.U. Star Blaster ...... 0 29.95 23.95 SYNERGISTIC SOFTWARE CONTINENTAL SOFTWARE Ribbit ...... 0 29.95 23.95 Higher Text II """.""." 0 40.00 27.15; * Higher Graphics II ...... 0 35.00 27.95 DAKIN 5/LEVEL 10 PROFESSIONAL SOFTWARE * TG PRODUCTS Programming Aids. "" 0 90.00 71.95 PHOENIX SOFTWARE Game Paddles. . ... A Dragon Fire. .".0 39.95 31.95 * 39.95 31.95 Kaves of Karkhan . .0 39.95 31.95 * QUALITY SOFTWARE Joystick" ". " . " ." ." .... A 59.95 47.95 Expand-a-Por!...... A 59.95 47.95 Alkemstone . .0 39.95 27.95; * RIVERBANK SOFTWARE M.LR.V 0 29.95 23.95 TURNKEY SOFTWARE SENSIBLE SOFTWARE The Gauntlet ...... 0 34.95 27.95 DATAMOST Super Disk Copy III ...... 0 30.00 23.95 Amoeba Man. . 0 34.95 27.95 County Fair .... 0 29.95 23.95 Multi Disk Cata III ...... 0 25.00 19.95 Thiel. . ". " " " "" 0 29.95 23.95 Disk Recovery. . 0 30.00 23.95 UNITED SOFTWARE OF AMERICA Casino""".""""""" 0 39.95 31.95 Applesoft-Plus .... 0 25.00 19.95 Appleworld ...... " ..... 0 59.95 47.95 3-~ supergraphics ...... 0 39.95 31.95 * DATASOFT * DELTA SOFTWARE Applesoft Pro Opt...... 0 20.00 15.95 Disk Org. II .... 0 30.00 23.95 Super KRAM ." " " "" . " . 0 175.00 139.95 DENVER SOFTWARE DOS Plus...... 0 25.00 19.95 Conquesl ...... 0 225.00 179.95 Financial Partner ...... 0 175.00 139.95 Quickloader. . 0 25.00 19.95 VERSA COMPUTING * EDU-WARE Apple Speller ...... 0 75.00 59.95 Vera.Wril Exp Pac-I ...... 0 39.95 32.95 Image Printer """"""" 0 40.00 31.95 GEBELLI SOFTWARE Ver•• Writ Gra. Tab ...... A 299.00 249.95 Firebird . . 0 29.95 23.95 SENTIENT SOFTWARE EZ Port ...... 0 24.95 20.95 Russki Duck ...... 0 34.95 29.95 Oo-TOPOS ...... 0 32.95 25.95 * VIDEX INC. * VOYAGER SOFTWARE Horizon V .... " ...... 0 34.95 27.95 * SIERRA SOFTWARE HAYDEN SOFTWARE SIRIUS SOFTWARE Sargon II. " " ." " " ." " ,,0 34.95 27.95 Foosball ...... 0 29.95 23.95 LARGE SELECTION OF Applesoft Compiler ...... 0 200.00 159.95 Twerps ..... 0 ~Q. 95 23.95 ATARI AND TRS 80 SOFTWARE CALL TOLL FREE 1·800·854-2914 (~OURT~~~~~A~I~~g~~) FOR INSIDE CALIFORNIA AND OTHER INQUIRIES CALL 1-714-287-0190 * SEND FOR OUR PRICE SHEET FOR SPECIFIC PROGRAMS AND PRICES. CALL FOR WEEKLY SPECIALS PLEASE CHECK FOR SYSTEM REQUIREMENTS BEFORE ORDERING. INCLUDE PUBLISHER AND PRODUCT NAME FOREIGN INQUIRIES INVITED - ADD 10% SHIPPING All Orders Prepaid by Personal Check. Money Order, Cashier Check. For Faster Delivery Service C.O.D. - Master Charge - Visa Mastercharge - Visa add 3%, and include expiration date on card. California Residents Add 6% Sales Tax Prices Subject 10 Change Without Notice Please Add $2.50 for Shipping Prices Valid Through This Month's Issue. Please Specify Tape or Disk. DISCOUNT DATA PRODUCTS. P.O. BOX 19674-AE • SAN DIEGO, CALIFORNIA 92119

Apple Pugetsound Program Library Exchange Page 0021 of 0102 Call-A.P.P.L.E. Magazine • May 1982

I Ii \111 WHAT'S EATING YOUR APPLE?

Now with these new features: Linked Tests 6502 CPU Test Printed Results Disk Speed Test Boots From Any Slot FIND OUT WITH APP[E~CILLIN UTM . . ~IIW' . It's a fact of computer life. Software and hardware Apple-Cillin II works with 13 and 16 Sector interact. If there's a problem eating your Apple, drives. It is written entirely in assembly language you can spend hours trying to find out whether and is compatible with any Apple II or Apple 11+ software or hardware is the culprit. Unless you with 48k of RAM and one or more disk drives. have Apple-Cillin II. To order Appie-Cillin II - and to receive a free Apple-Cillin II is a comprehensive diagnostic catalog of our other innovative software - call us system developed by XPS, Inc. to check the per- toll free at 800-233-7512. In Pennsylvania call formance of your Apple II or Apple 11+ and its 717-243-5373. Or send $49.95 (Pa. residents add peripherals. Appie-Cillin II will verify over two 6% sales tax) to XPS, Inc., 323 York Road, Carlisle, dozen hardware operations, and either identify a PA 17013. specific problem or give your hardware a clean bill Apple II and Apple 11+ of health. Quickly and easily. are trademarks of Apple Computer, Inc. Quality Microcomputer Software . '. . ru~ 323 York Road, Carlisle, PA 17013 ~'P.S. .' , ~~, (800) 233-7512/ (717) 243-5373 Apple Pugetsound Program Library Exchange Page 0022 of 0102 Call-A.P.P.L.E. Magazine • May 1982

ADDING MACHINE

lL 1ST 1040 I F P $ = "N" TH E N PR I NT : P R I NT "THANK YOU. SEE YOU NEXT TIK 10 REM E . GOODBYE.": END

APPLE ADDER BY Ra 1 ph Swe rd 1 ow I MD 1060 IF P $ ( ) "Y" AND P $ < } Call -A.P.P.L.E : Hay, 1982 "N" THEN CALL - 198: GOTO 1000 1080 PRINT 120 CLEAR 1100 FLASH: HTAB 18: PRINT "PHI 140 GOSUB 1440 NT 1 NG It: NORMAL 160 TEXT HOME 11 10 INPUT "PRINtER SLOT OR DRIV 180 HTAB 14: PRINT "ADDING MACHI ER CALL"; PR: IF PR } 7 THEN NE" 1150 ZOO PRINT PRINT 1120 PRINT: PRINT CHRS (4) i"PR 2Z0 INVERSE: PRINT "ENTER NUMBE ." PR R ...... HIT RETURN" 1140 PR INT CHRS (9) ;"80N" 240 as = CHRS (34): PRINT "HIT" 11 SO IF PR > 7 THEN CALL pa iQS; "c" ;OS; "TO CONT ...... " 11 60 PR INT ;QS;"E"iQS;"TO END " 1180 FOR I = 1 TO C: N = N ( I ) 260 DIM N(SO) 1200 Nl S = " It 280 POKE 34,6 1205 IF N > = 0 THEN ZS = "+": COTO 300 NORMAL : PR I NT 1 Z 20 320 S :: O:C :: 0 1 Z 10 ZS = "-" 340 INPUT "ENTER NUMBER: ";N 12 Z 0 N2 = INT ( ABS (N) t .00000 360 5 :: S + N OS) :N2$ = STR$ (N2) 380 5:: INT (5 * (10 1\ DO) + . S) 1240 N3 $ = " " ( (10 1\ DO) 1260 N4$:: 5THS ( INT ( ABS (N) • 400 51S = " ":53$ = ( 10 1\ DO) + . 5 + (10 1\ DO»)

12 70 (~4S,DO) 420 IF S> = 0 THEN ZS = "+": GOTO N4$ = RIGHT$ 460 1280 NTS :: NiS t Z$ + N2$ + N3$ + 440 ZS :: "-" N4$ H.O 5Z:: INT ( ABS (5) + .000000 1300 N4S = RIGHTS (N4S,PO) S) : 52$ = STU ( S Z ) 1320 NT$ = RIGHTS (NTS I 10) 1340 PR I NT '!NUMB E R (" iIi" ):: "i NT 480 54 = INT ( ABS (5) * (10 1\ D D) + 1000000. S ) : S 4$ = 5TR $ $ (S4):54$ = RIGHTS (54$,00) 1360 NEXT I SOO ST$ = 51$ + ZS + S2$ + 53$ + 1 380 PRINT S4$ 1400 HTAB 7: PRINT "SUM:: "iSTS SZO 5T$ = RIGHTS (STS,10) 1 420 PRINT CHRS (4);"PRIO": TEXT S40 C :: C + 1 : HOME: VTAB1S: HTAB lS:PHINT 560 N(C) :: N " ALL DONE BOSS!!!": END 580 PRINT TAB( 20} "SUM:: ";STS 1440 REM ***TUTORIAL*.* 600 GET CS 1460 TEXT : HOME 620 IF C$ :: "C" THEN GOTO 340 1480 PR INT TAB( 14) "** *TUTOR rAL 640 IF C$ :: "E" THEN GOTO 720 ***" 660 IF CS ( ) "C" OR C$ ( ) "E 1500 PRINT "THEN GOTO 340 1520 PRINT "1. YHEN THIS PROGRAM 680 END IS FIRST RUN," 72 0 TEXT : HOME : FOR I :: 1 TO C 1540 P~INT T~B( 5)"lT WILL ASK :N :: N(Il YOU FOR HOIJ M.\NY DEC IMAL PLA 740 K = K t 1: IF J( :: 20 THEN PR INT CE ACCURACY YOU DESIRE.~ "HIT RETURN TO CONTINUE": GET 1 5 60 PR I NT : PR I NT "AN5'WER, AND GS:HOME:K=l UNTIL CHANGED,YOUR NUMBERS !JILL ROUNDED OFF TO YOUR 760 Nl $ = " " BE 765 IF N = } 0 THEN Z$ = "t": GOTO CHOICE. " 780 1580 PRINT : PRINT "2. FOR CALCU 770 Z$ = "-" LATIONS INVOLVINC MONEY,": PRINT 7 8 0 N 2 = I NT ( AB S (N ) + . 00000 0 "SELECT NO DECIMAL PLACES." S):N2$:: STRS(N2) 1600 800 N3$ = " " PRINT: PRINT "3.NEXT, THE PROGRAM !JILL ASK YOU TO": PRINT 82 0 N 4 = I NT ( AB S ( N ) * (1 0 1\ D D) + 1000000. S) :N4$ = STU "ENTER A NUMBER.": PR I NT ~ DO (N4) :N4$ = RICHT$ (N4$ ,DO) SO, AND IT 'JILL ADD NE", NUM 840 NT$ = Nl$ + 2$ + NH + N3$ + N4 $ SER TO THE TOTAL SO FAR" 16 20 PRINT : PRINT ~4. TO SUBTRA 860 N4$ z RIGHT$ (N4$,DD) CT, ADD A NEGATIVE NUMBER. 880 NTS = NlS + Z$ + N2S + NlS + 1114$ (EXAMPLE TO SUBTRACT 5, ADD -S) B90 NT S = R I CHT $ (NTS, 10 ) 1640 PRINT : PRINT . 900 PRINT "NUMBER (n;l;")= n;NT$ 1660 PR Itfl' "HIT RETURN TO CONTIN 920 NEXT I UE WI TH TUTOR I AL ": C ET J(S: HOME 940 PRINT : PRINT TAB( 10) "u*TUTORIA 960 PRINT TAB( 20) "SUM = "i5T$ L CONTINUED** * II 9 80 PR INT 1680 PR I NT PR INT "S. THE PROGRA 1000 PR INT "WANT PR I NTOUT ... YIN? K 'WILL THEN ASK IF YOU WANT TO CONT I NUE OR END." 1020 GET PS (continued on page 91)

Call -A.P'p.LE. May 1982 19 Apple Pugetsound Program Library Exchange I Page 0023 of 0102 Call-A.P.P.L.E. Magazine • May 1982

The extended.Basic for your Apple. • • APPLE SPICE 042-0133 By: Corey Kosak & David Fox e .. .. APPLE 2 DISK UK

ALL YOU NEED TO EXTEND • Easy-Patch - No mac.hJne langl.lage knowledge is necessary - beginners can use it. YOUR APPLESOFT BASIC. • Excellent tutorial step by step manual. Written APPLE SPICE is a set of fast, in easy to understand English. assembly language routines that alleviate APPLE SPICE is not copy protected. You some of the drudgery of writing programs may include APPLE SPICE in your commercial programs without additional charge. Just men­ in Applesoft BASIC. APPLE SPICE allows tion you Used APPLE SPICE; on your title screen you to concentrate more on your program and in your documention. logic and less on things like "prettifying" APPLE SPICE comes with a clearly written the screen and detecting keyboard entry hands-on manual (52 pages) that explains every errors. APPLE SPICE also greatly ex­ feature in detail. All of the eKamples listed in the pands Applesoft's capabilities by adding manual are included on the APPLE SPICE diskette,. as well as some user-friendly pro­ features found in many larger BASICs grams that make it a snap to change APPLE such as PRINT USING, STRING SEARCH SPICE'S parameters. and to relocate APPLE "Let your Apple II take care 01 the (INSTR), IF·THEN-ELSE, and LINE INPUT. SPICE to where YOU want it in memory. details so you can just programl"

AVAILABLE FROM YOUR FAVORITE DEALER OR CALL TOLL FREE (800) 321·1172 t;$11.!~!!tl!~ SHIPPING. HANOLINGEXTRA, PRICES SUBJECT TO CHANGE A DIVISION OF SCOTT ADAMS. INC. BOX 3435. LONGWOOD. FL 32750 • (305) 862·6917

Apple Pugetsound Program Library Exchange Page 0024 of 0102 Call-A.P.P.L.E. Magazine • May 1982

HI-RES HI-JINKS: Picture COIl1P res5 ion Edward C. So

EFORE going into the dis­ I ran into this situation not long Actually, it is one byte wide and eight cussion of my programs, I ago, so I decided to research for bytes high. Since the high bit of each would like to thank Val and methods to store more pictures on a byte is not used for display it is often B Call -A.P.P.L.E. for publish­ given diskette. The closest thing that regarded as 7x8 bits. With the 28Ox192 ing my first article Hi-Res Full Scroll. I came across is the article "Apple II screen, it is capable of displaying 24 As I have mentioned to Val, I will Hi-Res Picture Compression" by rows of ASCII characters with 40 continue to contribute articles and Bob Bishop, published in the characters on each row, a total of 960 programs that I have developed and November 1979 Micro magazine. characters. Since each character researched from various sources in Despite the lack of documentation takes up eight bytes, then 960 the areas of Apple Hi-Res, anima­ and a few bugs in the program, he did characters should take up about eight tion and games. Many good pro­ give me a fairly good idea of how to kilobytes of memory and why is it gramming utilities exist and are well "compress" a Hi-Res picture. As I that it only takes up 960 bytes? The documented. They are very informa­ started to develop the programs, I answer is simple. Since there are only tive as well as educational. However, realized the techniques that I used 128 ASCII characters (but not all of a very limited amount of material has are also applicable in many areas them are available in a standard Apple been made available on Apple Hi-Res such as animation, so I think it is II Plus), it only takes one byte to that is of the same quality level. worthwhile to share this with you in represent a single ASCII character. Famous Hi-Res programmers do exist, more detail. For example, a byte with the value but they are mostly occupied with Let's step back for a moment and 01100101 (decimal 65) will represent developing commercial products. look at the Apple screen memory the letter A (refer to page 15 of the The most unfortunate part of this is organization. The screen on your Apple II Reference Manual). all those "Hi-Res Mysteries" are television or monitor displays infor­ Instead of storing the actual being kept as trade secrets. So for mation in the Apple's memory either ASCII character m memory, the those of us eager programmers, we directly or indirectly. The text screen Apple just stores the ASCII char­ almost have to re-invent the wheel or the Low-Res screen uses about acter representation (or the ASCII each time we want to do something 1024 memory locations while the code) using one byte for each char­ with Hi-Res. I will not dare to say I Hi-Res screen takes up 8192 memory acter. Hence, only 960 bytes are have all the mysteries solved, but I locations. When I started to stare at required to store 960 ASCII codes. have enough quality materials that I my monitor screen displaying all When it comes to displaying those would like to share them with you. those different Apple screens, I ASCII characters onto the screen, This article presents a method of started to wonder how come it only the Apple does some kind of mapping storing and retrieving an Apple takes one kilobyte (actually 960 (multiplexing, look-up, matching or Hi-Res picture in less than the 34 bytes) for text screen and eight times whatever you want to call it) and sectors of diskette space which it as much for the Hi-Res screen and transfers those actual ASCII char­ normally requires. Why 34 sectors? either one gives me a screen full of acters from the character set (one of Each sector holds 256 bytes of data. display? Furthermore, if I can some­ the chips on the PC board attached Each Hi-Res screen is about eight how use the same technique that to the keyboard) to the screen in the kilobytes in length which amounts to Apple uses to store the text screen in correct locations. The fact is, the 32 sectors of diskette space. The storing the Hi-Res screen, then I will Apple does not transfer the text­ remaining two sectors are for DOS not need to use eight kilobytes to screen memory contents directly into use in keeping track of each file. That store a Hi-Res picture. So here is the display screen; it takes a detour. totals 34 sectors. If you are planning where it all begins .... Similar technique is used for the to put together a presentation with Whether it 1S a text screen, Low-Res screen display. Let's call it Hi-Res graphs and charts, then the Low-Res screen, or a Hi-Res screen, the indirect mapping technique. most you can store in a 16 sector the screen resolution of the display is diskette is about 14 to 15 pictures the same: 280 bits (or dots) wide and with enough room for your program 192 bits high. The smallest unit of to retrieve those pictures. display data in the text screen is one ASCII character which happens to be seven bits wide and eight bits high.

Call -A'p.P.L.E. May 1982 21 Apple Pugetsound Program Library Exchange I Page 0025 of 0102 Call-A.P.P.L.E. Magazine • May 1982 PICTURE COMPRESSION

With the Hi-Res screen, the To use the indirect mapping tech­ first routine is the analysis routine. smallest unit of data that can be dis­ nique, we'll treat the Hi-Res picture For a fairly complex picture such as played is one bit and not one ASCII buffer as the display. We'll also need those digitized pictures, one or two code or ASCII character. A bit can be a set of pixels similar to the ASCII bits out of place probably will not be either ON or OFF (1 or 0). Apple uses character set, and a buffer that will noticed. Therefore, I have made my "direct mapping" technique to contain the pixel codes (similar to analysis routine to accept a user display the Hi-Res screen. That is, ASCII codes) for each pixel location specified "maximum errors per 110 software, no look-up or trans­ of the Hi-Res picture buffer. The pixel" value (ERR) prior to the lation. Each bit within the Hi-Res problem is how to obtain the pixel analysis. This routine basically built screen buffer is mapped directly to a set? The bit pattern of each pixel can the pixel table by examining all the corresponding bit location on the be much more than the 128 combina­ pixels from the original picture. First, sCreen. Just think of the display as tions that the ASCII set has. This we initialize the pixel table with two made up of 28Ox192 light bulbs. Each problem is solved by instead of having pixels: a black1 ($00) pixel and a light bulb is connected to a switch. a predefined pixel set which we build white1 ($7F) pixel, since pictures All those switches are within memory from examining the original picture. usually have black and white pixels. locations designated as Hi-Res pic­ For each given Hi-Res picture, If your picture is pure black 1 or ture buffers. there are at most 24x40 = 960 differ­ white1 color, you'll still end up with a If you want to turn on any of those ent pixels. If each pixel is unique, pixel table with two pixels even light bulbs, you turn the associated then the pixel set will contain all the though only one is required. switches. And finally, turning on the 960 pixels. .What happens if there The memory organization of the Hi-Res screen display mode will set exists duplications (redundancies) pixel table is made the same as the up the electrical connections between such as a lot of black pixels or white Hi-Res picture buffer. Hi-Res page 1 the switches and the light bulbs; pixels that are· quite common in occupies memory locations $2000- While this method of storing and dis­ Hi-Res pictures? The answer is we $3FFF, Hi-Res page 2 occupies playing the Hi-Res screen is efficient, have just solved the problem in $4000-$5FFF, and the pixel table it may not be the optimum. If the pic­ reducing the storage requirement of a (somewhat like' a page 3) resides ture you want to display has to be Hi-Res picture from the standard within the $6000 to $7FFF memory retrieved from the diskette, then it eight kilobytes to something that is area. Pixels are constantly being may not even be time efficient, considerably less. How much can a tr~sferred between those pages of because BLOADing 34 sectors worth picture be compressed? It depends. If memory. By making the data struc­ of data each time is hot as fast as you your picture has only 10 unique pixels, ture for the pixel table the same as might think. Thus, storing a Hi-Res then the reduction in storage require­ the other Hi-Res pages, program­ picture in less than 34 sectors will be ment is substantial. ming effort is greatly reduced. Each space efficient and possibly time effi­ Just saving those extracted unique pixel is eight bytes vertically stacked. cient as well. pixels won't do us any good. They The address of the first byte is deter­ My method of approach in picture will not provide us with enough infor­ mined by the table look-up method. I compression is to treat the Hi-Res mation to reproduce or "decompress" have three address tables for each of screen as a text screen. It is made up the picture. Same holds true for the the three pages. Each table has 24 of 24 rows of "pixels"* (not to be con­ text screen display if all you have is a base addresses. fused with ASCII characters) with 40 ASCII set, we will not know which Since each page has at the most pixels on each row. Thus, one pixel is character goes where. 24 rows of pixels, each base address eight bits wide and eight bits high As I mentioned earlier, we need a will be the address of the first byte of (one byte in width and eight bytes in buffer area to hold the pixel codes for the leftmost pixel for the correspond­ height). This is identical to the map each display pixel location in the ing row. To obtain the starting address shown iIi page 21 of the Apple II Hi-Res screen. Since the number of for the 8th pixel on the 8th row, we Reference Manual. May I remind you extracted pixels for a given pictUre look up the 8th address from the that only seven of the eights bits per varies, we will need a counter to keep corresponding table and then add 7 to byte will be displayed. The 8th bit of track of that number. Hence, the it (don't forget to count pixel 0 as each byte is the so-called color bit "compressed picture" will consist of 1 also). and will not be displayed. Ybu can the counter, the buffer, and the set of regard a pixel as seven bits wide as extracted pixels which I call the pixel *Note: "PIXEL", throughout thisarticie, far as display is concerned. The 40 table. is used in a non-standard context, and actually refers to one color pixels on each row will make up that Now let's go through and see how block on the £0- Res graphics 280 bits of horizontal resolution and to put those ideas into assembly screen. the 24 rows will make up that 192 language routines that will perform bits of vertical resolution. the Hi-Res picture compression. The

22 Calf -AP.P.LE. May 1982 Apple Pugetsound Program Library Exchange I Page 0026 of 0102 Call-A.P.P.L.E. Magazine • May 1982

Secondly, we compare each pixel Next is the routine SYNTHS. pixels from the pixel table and add from the picture to each pixel within This routine synthesizes the original them to the end of the Yarray. In this the pixel table. If one of the pixels picture using the pixel table built case, everything we need for the from the pixel table differs from the from the analysis. Remember the "compressed" picture will be in pixel in the picture, no more than the "text screen buffer" to hold those sequential memory locations. The specified ERR value, the next pixel ASCII codes to be displayed? We length of the "compressed" picture from the picture will be examined un­ need the same thing here. Since there can be calculated as 2 + 2x960 + til the entire picture has been pro­ can be more than 256 different pixels Number of pixels x8. The starting cessed. However, if the pixel in the in the pixel table, we need a buffer location of the "compressed" picture picture cannot find a "match" from twice as big as the text screen buffer, will be at $8000. the pixel table, then that pixel will be a total of 1920 bytes. I use two arrays Transferring the pixels from page added to the pixel table. As you may for the buffer: the X array and the Y 3 to the end of the Y array is done by suspect, it can take some time to per­ array. Each pixel in the pixel table the routine MPT. With 48K of RAM form the analysis if there exists a lot can be labeled by its column number and DOS 3.3, HIMEM is set at $9600. of "unique" pixels. It took almost and row number. The column and This limits the maximum number of three minutes when I tried to analyze row numbers (indexes) are similar to pixels that can be saved at the end of a digitized picture which has 500 + the ASCII codes. The X array will the Y array to 463. If you have a 16K unique pixels. The best way to do an contain all the pixel column indexes or more RAM card with a DOS Mover analyis for a given pictUre is to start for all 960 pixel locations. Similarly, routine (published earlier in Call off with a high ERR value. Check out the Y array will contain all the pixel -A.P.PLE.), then the limitation can the quality of the picture that it row indexes for the 960 pixel loca­ be removed. But don't let the 463 pix­ reproduces. Try it with a smaller tions. The counters XCOL and el limit concern you, because all the ERR value if not satisfied. YROW are stored in locations $8000 pictures I have compressed required This iterative process is not that and $8001. The X array will start at less than 200 pixels and the results time consuming, so relax. The $8002. The Y array follows after. are excellent. Finally, it will be routine COMPARE is used to com­ Synthesizing a picture takes logical to ask the question: how to pare two pixels, one byte at a time. longer than the analysis. The synthe­ "decompress" the picture from the The comparison is done by EO Ring sis works as follows: (1) each and "compressed" picture? the two bytes. The difference is in­ every pixei from the pixel table is dicated by the 1's in those bit loca­ compared with each pixel in the tions where the two bytes differ. As original picture; (2) Assign the pixel SPECTACULAR you may have noticed, I have another from the pixel table that best approxi­ OFFERS table called BITS which has 256 mates the pixel in the picture. Then numbers in it. After EORing the two the pixel's column and row indexes OKIDATA WITH FIIICTlON AND TllACTOII FEED bytes, the result is used as the index are stored into the X and Y arrays; - ClI·DIREcnONAL· 120 CPS - FoIOIIeI and Serial I/O to look up this table to obtain the and (3) Repeat steps (1) and (2) for all - 9xQ Mo~ix 9 cr 12 Mo~ fcr CSaphics- Sen"" number of different bits between the 960 pixels. - 5.8.3. 10. 16 O1arooers - Ovr of I'I:iper ~tth Per Inch - Friction cr TIOdOr Feed two bytes, since EORing does not Notice that the synthesis utilizes - 6 cr 8 Lines Per Inch - 3" 10 14· Top of Form - 80 CPt. @ 10m for 82A (""irch Seleocble) provide this count directly. The total the original picture. The original pic­ - 132 CPt.@ 10 CPI fcr B.>o\ - 10 Differenr OlOfOC1IOr Sers errors for the pixel will then be com­ ture is. assumed to be in page 1 Sole Price pared with the ERR value that you ($2000-$3FFF) and the synthesized specified. If ERR is greater than the picture will be placed in page 2 total errors, then proceed with ($4000-$5FFF). In this case, you can analysis of the next pixel in the pic­ "flip" between the two pages to com­ ture. There are two counters to count pare the result. If it is not acceptable, the number of pixels in the pixel try a smaller ERR value in the analysis. t~ble. Since the pixel table is dimen­ If it is acceptable, then you can save sioned as 24 rows of pixels with 40 the so-called "compressed" picture. pixels on each row, it is necessary to The "compressed" picture will have two counters: a column counter, consist of: (1) the counters XCOL and XCOL, and a row counter, YROW. YROW, (2) the X array and the Yarray each time a pixel is added to the pixel to tell us which pixel from the pixel table, XCOL will be incremented by table goes where, and (3) the pixel 1. When XCOL reaches 40, it will be table. Since I use the same data struc­ reset to 0, and increment YROW by ture as a Hi-Res page buffer for the 1. Hence, the number of extracted pixel table (page 3), we cannot save pixels can be calculated by multiply­ the pixel table sequentially (refer to ing YROW by 40 and then adding page 21 of Apple II Reference Manual) XCOL plus 1. That is basically the as it is. We have to transfer those analysis routine.

Call -A.P.P.LE. May 1982 23 Apple Pugetsound Program Library Exchange Page 0027 of 0102 Call-A.P.P.L.E. Magazine • May 1982 PICTURE COMPRESSION

DECOMP is the routine that will 1 decompress the picture for you. 2. • 1< '/I HI-RH. FIC COMPRESSION I< First, assume you have BLOADed 4 * * the "compressed" picture starting at 5 1< Copyright i c) 1982 '/I $8000. Next we have to do the reverse 1< " of what MPT did - transfer the pixel 7" 1< by Edwar d C So ~ table that is stored sequentially at the 8 * * 9 '/I Call -I-PPLE May 1982 I< end of the Y array to page 3. This is 10 done by the routine BPT. Once we 11 ** ••• **-'1<1< ••• *** ••• ******* have the pixel table in page 3, the X 12 * and Y arrays will tell us which pixel 13 * There are five seperate routines. 14 .. (l) Analyze the picture in pagel and extract goes where. It is a simple matter to 15 'II all the pixels required for the specified move the appropriate pixels to the 16 'I< ERR a.nd place it in the pixel ta.ble. appropriate locations in the screen. 17 * That's the whole story in HI-RES 18 * (2) Synthesize the picture by comparing each pixel PIC COMPRESSION. 19 'I< from pa.gel with the pixel in the pixel 20 * table that matches best. Also, store All the routines are contained in 21 * the pixel column and row indexes that the assembly listing. For those of you 22 • are used in the X and Y arrays. who don't have an assembler, you 13 * can get into the monitor and type in 24 * (3) Move the pixel table to the storage area 25 * for later BSAVE use. the HEX codes starting at location 26 $IBOO and BSAVE the program as 27 * (4) Move the pixels from the stora.ge area. COMPRESSION. To help you get 28 '/I to the pixel table. familiar with the routines, I have 29 included an Applesoft program 30 * (5) Decompress the picture by means of 31 I< USIng the correct pixel from the pixel HI-RES PIC COMPRESSION, 32. * table and place it to the screen. This which allows you to perform the 33 * is done by using the X and Y arrays. analysis, the synthesis, the compres­ 34 • sion, and the decompression with a 35 36 * The picture on pagel is divided into 24 rows few keystrokes. The program is 37 * each wi t h <\ 0 pix e Is. E a c h pix eli s 1 by t e w i de menu-driven. Each time a command 38 * and 8 bytes high. This is similar to the text is successfully executed, the program 39 * screen mapping. Hence. a picture is normally will sound the bell to acknowledge it. 40 '/I BSAVEd with 24*40=960 pixels. By examining for Just press any key to continue. If you 41 '/I duplicated pixels within the picture, one can 42 * use less than 960 pixels to store the picture. have two disk drives, the disk com­ 43 * The t radeof! is time versus space as always. mand will allow you to access either 44 * Say, if a picture is made up of black1 and disk drive. 45 _ whlte1 piKels, then it only takes two pixels If you don't have any Hi-Res pic­ 46 * to store the picture. But. it actually needs 47 • 2 bytes for the pixel table dimension. tures to try out this program, you can 48 * 2-960 bytes to store the X and Y arrays,and obtain the Apple Lantern Slide Show 49 1< number of piaels*8 bytes program from the Apple Software 50 * One lnput required for the analysis is ERR. Bank through your local dealers or 51 * This is the maximum error per pixel allowed. Apple Club. Or simply draw some­ 52 * If ERR=2, that means, the synthesized pixel 53 * will not differ from the original pixel thing on the Hi-Res screen using all 54 1< by more than two hits within the 64 bits. those HPLOTs. Anyway, I think you 55 * By using ERR=O, that means only look for will enjoy it as much as I do and 56 * redundancy. meanwhile I am preparing my next 57 .. article on Hi-Res colors. See you 58 "* 59 '/I Zero page parameters then and have fun "compressing" 60 .. your favorite pictures. t!i 61 '/I 62 63 FROM* Eau $6 source address low-byte 64 TO EaU $8 dest address low-byte 65 XFROM EaU $19 Source column index 66 YFROM EaU $lA Source row indel 67 ZFROM EaU $ 1 B Source starting addr 68 XTO Eau $10 Dest column index 69 YTO EaU SlE Dest row index 70 ZTO EQU $lF Dest starting addr 71 DIFF EaU SCE • of bits different 72 BEST EQU $CF Best match count 73 ERR EaU $D7 Max error per pixel 74 XPTR EQU HB Column array pointer-low 75 YPTR EaU $ED Row array pointer-low

24 Call -A.P.P.LE. May 1982 Apple Pugetsound Program Library Exchange I Page 0028 of 0102 Call-A.P.P.L.E. Magazine • May 1982

76 XTEM EOU H" R temporary 77 YTEM EOU HB Y temporary 78 AOR1 EOU $Fe pille 1 add r pointer 1 79 AOR2 EOU HE pi xe 1 addr pointer 2 80 81 III* Other addresses 82 83 XCOL* EQU S8000 ; 10 f col in 1a s t row 84 '{ROW EOU S8001 ; # of rows in pia tbl 85 STORE X EQU $8002 ;X a r r ay s tar t a.ddr 86 STOREY EOU $ 83 C2 ; Y array start addr 87 STOREPT EQU $8782 ; pix tbl storage a.rea 88 BELL EQU SFF 3A ; so und be 11 routine 89 ORG S 1 BO 0 90 91 III* 92 III Routine ANALYSIS 93 III To analyse picture in page 1 . 94 III Save all pixels that exceed the 95 11 allowed ERR in the pi xe I table. 96 'Ie IBOO: 20 52 lC 97 ANALYSt JSR INITTB ;init pixel table 1 B03 : A9 00 98 LOA IS 00 ;starts with 1 s t screen p'ixel IB05 : 85 19 99 5TA XFROM ;column index 1 B07 : 85 lA 100 STA YFROM ; row indea IB09: A9 01 101 LOA 1$01 ;screen is page 1 1 BOB: 85 IB 102 STA ZFROM iset page i ndea IBOD: A9 03 103 LOA 1$03 i pix table page index 1 BOF : 85 1F 104 STA ZTO ;set i t 1B 11 : A9 00 105 ACONT LOA 1$00 ipoint to start of pix t b 1 1 B 13 : 85 10 106 BTA XTO ;pix tbl col indea IB15: 85 1E 107 STA 'ITO ;pix tbl row index 1 B 1 7 : 20 £C 1B 108 ALOOP JSR COMPARE ; compare the two pixels IB 1A: A5 07 109 LOA £RR ; the allowable error 1 B 1 C : C5 CE 110 CMP 01 FF ;comparewith the result IBIE: BO 23 111 BCS GOOD ;within 1 i mit, ok 1 B 20 : AS 10 112 LOA XTO ; else, chk next pix from tbl IB22: CD 00 80 113 CMP XeOL ;anymore in pix t b I ? 1 B 25 : DO 07 114 BNE NEXT ; yes, get nex t pixel IB27: A5 lE 115 LOA 'ITO ino, are you sure ? 1 B2 9 : CO 01 80 116 CMP '{ROW ;chk row count IB2C: FO 05 117 BEQ ADD ;no mo re, add pix to t b I 1 B2£ : 20 BB 18 118 NEXT JSR NEVITO ;get next pix from t b 1 1 B 31 : DO E4 119 " BNE ALOOP ;back to compa re loop 1833 : 20 BB IB 120 ADD JSR NEVITO ; inc r pix t b 1 ptrs IB36: 20 CA IB 1Z 1 JSR MOVE ;move sc r pix to pix tbl 1 B39 : A5 10 122 LOA XTO ;update XCOL and 1 B 38: 80 00 80 123 STA XeOL 1 B 3£ : A5 lE 124 LDA '{TO ;YROW counters IB40: 80 01 80 125 5TA YROW 1 B43 : £6 19 126 COOD INC XFROM ; nelt screen pill IB45: A5 19 127 LOA XFROM ;chk for range 1 B47 : C9 28 128 CMP 11$ 28 ;XFROM=40 ? IB49: DO C6 129 BNE AeONT ino, ok 1 B4B: A9 00 130 LOA ISOO iyes, reset col index IB40: 85 19 131 STA XFROM 1 84F : E6 lA 132 INC YFROM i i ncr the row index 1B 51 : A5 lA 133 LOA YFROM ibut check fo r range 1 BS3 : C9 18 134 CMP iS18 ; done last row ? IB55: DO BA 135 BNE ACONT ino, ok 1 BS? : 4C 3A FF 136 JMP BELL ;else, all fin i sh . 137 'Ie 138 139 'Ie* Routine SYNTHS 140 Routine to syn t hes i Ie the picture 14 1 III* using the extracted pixels from the 142 11 pille I tab Ie derived from the analysis. 143 'Ie 144 * Routine also sets up the column and 145 * row arrays for the compressed picture. 146 * IB5A: 20 18 lC 147 SYNTHS JSR SETHR2 ; in it page 2 for output 1 BSO: 20 91 le 148 JSR lHITXY ; in it X and Y arrays 1 B 60: A9 FF 149 SLOOP LOA I$FF 1 B62 : 85 CF 150 STA BEST ;set BEST=worst case 1 B6 4: A9 00 151 LOA 1$ 00 i se t 1 s t pi lie 1 index 1 B66 : 85 19 152 STA XFROM 1 B 6 8: 85 1A 153 STA YFROM

Call -A.P'p.LE. May 1982 25 • Apple Pugetsound Program Library Exchange TPage 0029 of 0102 Call-A.P.P.L.E. Magazine • May 1982

PICTURE COMPRESSION

1 B6A . A9 01 154 LDA HOl iuse orig pic to miltch 1B 6C: 85 iF 155 STA ZTO 1 B 6£: 20 EC 1S 156 SLQOP2 JSR COMPARE icompilre pixels 1 B 71 : AS CE 157 LDA DI FF ibetween orig ilnd pix tbl 1 B7 3 : C5 CF 158 CMP BEST i is i t be t t er tha.n BEST ? 1B 7 5: SO OA 159 BCS SCONT ino, try ne x t pix from tbl 1 B71 : 85 CF HO STA BEST i yes f use t his ilS BEST 1B79: AS 19 16 1 LDA XFROM iget col index 1 B7B . 85 FA 162 5TA XTEM is ave i t temp 1 B7D· AS 1A 163 LOA YFROM ;get row index 1 B?F : 85 FB 164 STA YTEH is ave i t temp 1B 8 1 : AS 19 165 SCONT LDA XFROM i ge t col index 1 B83 : CD 00 80 H6 CMP XCOL iexhilust pix tbl ? IB86: DO 07 167 BNE SNEXT ; no f ge t next pille 1 1 B88 : AS 11. 168 LOA YFROM i mAY be, chk row index -lB tlA: CD 01 80 169 CMP YROIJ iexhaust pix t b 1 ? 1 BBD: FO OE 170 BEG OUT i yes, output the pill to screen IB8F: E6 19 1? 1 SNEXT INC XFROM i i ncr co 1 index 1 B91 : C9 28 172 CMP ItS 28 i is i t 40 ~ 1B 9 3: DO D9 173 BNE SLOOP2 ino, go do it 1 B95 : 1.9 00 174 LDA #$00 iyes, reset XFROM IB97: 85 19 175 STA XFROM 1 B9? . E6 11. 176 INC ¥FROM it hen incr row indea 1B9B: DO D1 177 BNE SLOOP2 i go do it. 178 IB9D AS FA 179 OUT* LOA XTEM i ge t the co 1 wi th best ma t ch 1 B 9F B5 19 IBO STA XFROM i use it ilS col index IBAl AS FB 181 LOA YTEM i ge t the be s t row index 1 BA3 85 lA 182 STA YFROM i use i t a.s row index IBA5 A9 02 183 LOA 1$02 ;use pilge 2 for ,output 1 BA? 85 1F 184 STA ZTO IBA9 20 A2 1C 185 JSR STOREXY i fir s t , store x ilnd y arrays 186 * IBAC 20 CA IB 187 JSR MOVE it hen mo v e the pille 1 to pilge 2 1 BAF 20 BB IB 188 JSR NE\JTO iupdate nelt pill pos IBB2 AS lE 189 LOA YTO ;chk row index 1 BB4 C9 18 190 CMP #$ 18 i24 ye t ? IBB6 DO A8 19 1 BNE SLOOP ino, go do it 1 BB8 4C 31. fF 192 JMP BELL i yes, return with BELL. 193 It 194 • 195 It Routine to up dil t e destination 196 co 1 umn and row indexes. 197 *11: IBBB E6 10 198 NEIJTO INC XTO i inc r co 1 index 1 BBD 1.5 10 199 LOA no ichk i t fir s t IBBF C9 l8 200 CMP 11$28 ;is i t 40 ? 1 BCl DO 06 201 BNE NRTN ino t done. IBC3 A9 00 202 LOA 11$ 00 ; ye s, re se t ITO=O 1 BC5 8S ID 203 STA XTO IBC7 £6 lE 20 'I INC YTO ; then incr row index 1 BC9 60 205 NRTN RTS i done. 206 It 207 208 It* Routine MOVE 209 11: Routine to move il pixel from the 210 It source pixel specified by XFROM, YFROM, and Z FROM 211 II to the destination pixel lociltion 212 It specified by XTO, YTO, and ZTO. 213 * lBCA 20 32 lC 214 MOVE JSR ADDRFR i ge t the addresses 1 BCD 20 42 1C 215 JSR ADDRTO 1BDO A2 08 216 LOX 1$ 08 i B by t es pe I pile 1 1 BOl 1.4 19 217 MLOOP LDY IFROtl icolumn indn lBD4 B1 06 218 LOA (FROM),Y i ge t one byte a time 1 B06 A4 10 219 LOY XTO iget dest col index IB08 91 08 no STA (TO), Y ;output to de s t 221 lBOA AS 07 222 * LOA FROM+ S1 iget source addr hi-byte 1 BDC 18 223 CLC lBOD 69 04 22 'I AOC 11$ 04 iildd l024=next byte addr 1 BOF 85 07 225 STA FROM+ S1 lBE 1 AS 09 226 LOA TO+$l i ge t dest ilddr hi-byte 1 BE3 18 227 CLC lBE4 69 04 228 ADC 1$ 04 ;add l024=next byte addr

26 Call -A.P.P.LE. May 1982 • Apple Pugetsound Program Library Exchange I Page 0030 of 0102 Call-A.P.P.L.E. Magazine • May 1982

1 BEi 85 09 229 STA TO+51 update dest addr IBE8 CA 230 OEX all 8 bytes done? 1 BE' DO E7 231 ENE MLOOP no, do next byte IBEB 60 232 RTS else, done. 233 * 23 q * 235 * Routine COMPARE 236 * Routine to compare two pixels: one from 237 * destination pixel, and one from the 238 * source pixel. Difference in bit pattern 239 * will be recorded in D1FF for comparison. 240 IBEC: 20 32 IC 241 COMPARE* JSR ADORFR ;get mem addresses 1 BEF : 20 42 1C 242 JSR ADORTO IBFl : AZ 08 Z43 LOX 1$ 08 i8 bytes per pixel 1 BF4 . A9 00 244 LOA 1 S 00 izero the OIFF count 18F6: 85 C£ 245 5TA 01 FF 1 BF8 : A4 19 246 CLOOP LOY XFROM iget source col index IBFA: B1 06 247 LOA (FROM) ,'I iget one byte of source pix 1 BFC: A4 10 248 LOY XTO iget dest col index IBFE: 51 08 249 EOR (TO) ,'I iget the difference in bits 1 COO: AS 250 TAY iput the count in 'I register Ie a 1 : 89 AC 10 251 LOA BITS, Y ilook up the table for num 1 C04 : 18 252 CLC lC 05 : 65 C£ 253 AOC 01 FF iaccumulate in OIFF 1 C 07 : 85 CE 254 STA 01 FF 1 C 09 : AS 07 255 LOA FROM+Sl iget next byte 1 COB: 18 256 CLC lCOC: 69 04 257 AOC IS04 iby adding 1024 to it 1 COE: 85 07 258 STA FROM+Sl lC10: A5 09 259 LDA TO+S 1 1 C 12 : 18 260 CLC 1 C 13 : 69 04 261 ADC 1$ 04 isame for dest addr 1 C 15 : 85 09 262 STA TO+ 5 1 lCl?: CA 263 DEX i 8 by t es do ne ? 1 C 18 : DO DE 264 BNE CLOOP ino, continue IC 1A: 60 265 RTS ;else, done compare. 266 267 * Rout ne SETHR2 268 * Rout ne to set hi-res page 2 269 * and nitialize some variables. 270 lClB: A9 00 271 5ETHR2* LOA 1$ 00 lClD: 80 50 CO 272 5TA SCOSO i turn on page 2 lC20: 80 52 CO 273 STA Se052 lC23: 80 55 CO 274 STA SCO 55 IC26: 80 57 CO 275 STA SeaS? lC29: 85 10 276 STA XTO lC2B: 85 IE 277 5TA 'ITO 1C2D: A9 03 278 LOA 1503 lC2F: 85 18 279 STA ZFROM lC31: 60 280 RTS 281 * 282 * 283 * Routines AOORFR and AOORTO 284 * Routine to compute the addresses for 285 * the source pixel and the destination 286 * pixel. Each pixel is represented by 287 * a column index, a row index, and a page index. 288 1C 32 : AS 1B 289 AOORFR* LOA ZFROM ;first, do the source 1 C34 : 20 OF 1C 290 JSR CHKPAG i c h e c k wh i c h p age, 1, 2 ,or 3? lC 37 : A4 1A 291 LOY YFROM iget row index 1 C39 : B1 FC 292 LOA (AoRt) ,Y 1 C 3B: 85 06 293 STA FROM iaddress low byte 1 C3D: B1 FE 294 LOA (AoR2) , Y ;address high byte 1 C 3F: 85 07 295 STA FROM+Sl 1 C41 : 60 296 RTS ireturn 297 * lC42: AS IF 298 ADORTO LOA ZTO inext, do dest address 1 C44: 20 OF 1e 299 JSR CHKPAC ;chk page I lC 47 : A4 IE 300 LOY YTO iget row indell 1 C49 : B1 FC 301 LOA (AORl>,Y lC4B: 85 08 302 STA TO iaddr low byte 1 C4D: B1 FE 303 LOA (AoR2) ,Y 1 C 41': 85 09 304 STA TO+$1 i addr hi gh by te 1 CSI : 60 305 RTS i done 306 * 307 *

Call -A'p.P.LE. May 1982 27 Apple Pugetsound Program Library Exchange I Page 0031 of 0102 Call-A.P.P.L.E. Magazine • May 1982 PICTURE COMPRESSION

308 lit Routine INITTB 309 l\' Routine to initialize pixel table 310 lit 1st pixel will be blackl, 2nd pixel 311 l\' will be white1. others will be extracted 31 Z lit from the analysis. 313 "/I 1 C 5 2: A900 314 INITTB LOA 1$00 iblackl=O 1 C54 : 80 0060315 BTA S6 000 ;pix table starts 1 C 5 7 : 80 0064316 STA $6400 1 C5A : BD 00 68 317 STA $6 800 lC50: 8D 00 6C 318 STA HCOO 1 C 60 : BD 00 70 319 STA 57000 1C63: 80 00 74 32 0 STA 57400 1 C66 : BD 0078321 STA 57800 lC 69: 80 00 7C 32 Z 5TA $7COO 323 lC6C: A9 7F 324 LOA 1$ 7F i2nd pix=whitel=7F 1 C6E : 80 01 60 325 STA $6001 1 C 71 : 80 01 64 326 STA $6401 1 C?4 : 80 01 68 327 STA $ 6801 1 C 77 : 80 01 6C 328 STA HCOI 1 cn· 80 01 70 329 STA 57001 1C 70: &D 01 74 330 STA $ 7401 1 C80 : 8D 01 78 331 STA 57801 lC83: 80 01 7C 332 STA 57COl 333 lC86: A9 00 334 LOA 1$ 00 iinitialize col and row lC88: 80 01 80 335 STA YROIJ icounts for pix table lC88: A9 01 336 LOA 1$ 01 icol=1 for blackl and whitel lC80: 80 00 80 337 STA XCOL 1C90: 60 338 RTS i done 339 340 * 341 11 Routine INITXY 342 11 Routine to get the starting addr 343 11 of the X and Y arrays. X=col index array. 344 11 Y=row index array. 345 * They both indicate which pix goes where 346 11 0 nth esc r e en for dec 0 IIp res s ion. 347 11 1C91: A9 02 348 INITXY LOA _STOREX ihigh 8 bits lC97: 85 EC 351 STA XPTR+$1 35 Z lC99: A9 C2 353 LOA I< STOREY i low 8 bit s lC98: 85 ED 354 STA YPTR iY array pointer lC90: A9 83 355 LOA _>STOREY ihigh 8 bits lC9F: 85 EE 356 STA YPTR+51 357 leAl: 60 358 RTS 359 11 3&0 361 11* Routine STOREXY 362 11 Rout ine to store the col and row 363 lit indexes of each pixel on the screen to 364 11 the X and Y arrays. 365 lCA2: A2 00 346 STOREXY LOX 1$00 lCA4: A5 19 367 LOA XFROM iget source col index 1 CA&: 81 EB 368 STA (XPTR,X) isave it in X array lCA8: A5 1A 369 LOA YFROM iget source row index lCU: 81 ED 370 STA (YPTR,X) isave it in Y uray 371 11 ICAC: E6 EB 372 NEVPTR INC XPTR iincr X array ptr lCAE: DO 02 373 BNE Y INC i low by t e = 0 ? ",lCBO: E6 EC 374 INC XPTR+$1 ino, incr high byte lCBl: £6 ED 375 Y INC INC YPTR iincr Y array ptr lCB4' DO 02 376 SNE SRTN ino lero, done. 1 CB6: EO EE 377 INC YPTR+S1 ielse, incr high byte lCB8: 60 378 SRTN RTS idone. 379 380 11* 381 11 Routine DECOMP 382 11 Routine to use the X and Y arrays plus

28 Call -AP.P.LE. May 1982 Apple Pugetsound Program Library Exchange TPage 0032 of 0102 Call-A.P.P.L.E. Magazine • May 1982

383 * the pixel table to generate the picture. 384 lCS9' 20 lS 1e 385 OECOMP* JSR SETHR2 jset up page Z for output 1 CSC: 1.9 O~ 38£ LOA #$02 lCSE: 85 1F 387 5TA 2TO joutput is Page Z lCCO: 20 91 lC 388 JSR IN! TXY ;get start addr of arrays 389 lCC3 : A2 00 390 OLOOP* LOX 1$00 jstarts from top 1 CCS : At EB 391 LOA (XPTR, X) iget the pill col index lCC7 : 85 19 39Z STA XFROM i put i tin XFROM 1 CC9 : At EO 393 LOA (YPTR,X) iget pill row indell lCCB: 85 lA 394 STA ¥FROM iput it in YFROM 1 CCD: 20 AC lC 395 JSR NE\olPTR iupdate arrays ptr 396 * lCOO: 20 CA 1B 397 JSR MOVE imove pixel to page 2 1 CD3 : 20 BB IB 398 JSR NE\olTO iupdate screen ptr lC06: AS lE 399 LOA YTO ichk screen row index 1 COl: C9 18 400 CMP ItS 18 iall done? lCOA: DO E7 401 SNE DLOOP ino 1 COC: 4C 3A FF 402 JMP SELL iyes, return with BELL. 403 fr 404 * 405 * Rout ne CHKPAG 406 * Rout ne to compute the starting addr 407 * of ether pagel, pagel, or pixel table. 408 lCOF: C9 01 409 CHKPAC* eMP ISOl ;is it pagel? 1 CEt : DO 11 410 BNE PAGEZ i no, chk page2 t C E3 : 1.9 AC 411 LOA IHGRl 1 CFt : 85 FF 418 STA AORZ+Sl lCF3: 60 419 RT5 420 * tCF4 : C9 O~ 421 PAGEZ eMP 1$ 02 ;is it pagel? 1 CF6 : DO 11 422 BNE PI XTBL ino, check pix table tCF8 : A9 AC 423 LOA I

Call -A.P.P.LE. May 1982 29 Apple Pugetsound Program Library Exchange I Page 0033 of 0102 Call-A.P.P.L.E. Magazine • May 1982

PICTURE COMPRESSION

1035 : AD 00 46 1 LOY UOO i z e r 0 Y 1037 : 91 08 462 STA (TO) ,Y ;save it in storage 463 11 1 D39: 18 464 CLC 103A: AS 07 465 LOA FROM+$l iget high byte 1 D3e : 69 04 466 ADC 1$04 ;add 1024 to get next byte 103E: 85 07 467 STA FROM+ $1 isave i t 468 * 1040: E6 08 469 INC TO iincr storage by 1 byte too 1 D42 : A5 08 470 LOA TO ichk range 1044: DO 02 471 BNE MPCONT ino zero, continue 1 D46 : £6 09 472 INC TO+ $1 ; e 1 se , inct high byte 473 11 1048: CA 474 MPCONT DE X ide c r x counter 1049 : DO E6 475 BNE MPLOOP2 inot done, do again 476 ... ID4B: A5 19 477 LOA XFROM idone with 1 pixel 1040 : CO 00 80 478 CMP XCOL ;check if all pix are in 1050: DO 04 479 SNE MPNEXT inc, do ne x t pixel 1 D52 : A5 1A 480 LDA YFROM i yes, chk row 1 imi t 1054: FO 10 481 SEQ KPRTN i all done 1 D56 : E6 19 482 MPNEXT INC XFROM i nex t pixel 1058: AS 19 483 LOA XFROM 1 OSA: C9 28 484 CMP # $28 i inc r source pointer 105C' DO CE 485 SNE MPLOOP 1 DSE : A9 00 496 LOA 1$00 1060: 85 19 487 STA XFROM 1 D62 . E6 1A 498 INC YFROM 1064: DO C6 489 BNE KPLOOP 490 1066 : 60 491 MPRTN* RTS i a 11 done 492 493 * 494 '" Routine BPT 495 '" Routine to bu i 1d pixel table from the 496 '" pi xe I storage area. 497 '" 1067: A9 82 498 BPT'" LOA I(STOREPT iplace pix stor addr 1 D69 : 85 06 499 S'fA FROM ito source addr 106B: A9 87 500 LOA I)STOREPT 1 D6D: 85 07 501 STA FROM+$1 106F: A9 00 502 LOA 1$ 00 1 D71 : 85 10 503 STA XTO 1073: 85 lE 504 STA YTO ; i ni t pix table ptr 1 D7S : A9 03 50S LOA #$03 ; p il tbl is dest 1077: 85 IF 50 " STA ZTO 507 1079: ZO 42 lC 508 BLOOP* JSR AOORTO i ge t addr 1 07C: A2 08 5 09 LOX 1$08 i 8 by te s pe r pixel 107E : AO 00 510 BLOOP2 LOY 1$ 00 1 D80 : Bl 06 511 LOA (FROM) ,Y ; get one byte a time 1082 : A4 10 512 LOY XTO ;col index 1 D84 : 91 08 513 STA (TO) ,Y ;put in pix table 514 1 DB6: 18 515 '" etC 1087: AS 09 516 LOA TO+$l i ge t high byte 1 D89 : 69 04 517 ADC 1$04 iadd 1014 to get next byte 108B: 85 09 518 STA TO+$l 519 108D: £6 06 520 * INC FROM il1so, incr source ptr 1 Dar: AS 06 521 LDA FROM ichk range 1091: DO 02 522 BNE BCONT 1 D93 : £6 07 523 INC FROM+$l 524 ID95: CA 525 BCONT'" DEX ;decr x counter 1096 : DO E6 526 BNE BLOOP2 inot done with pixel 527 1098 AS 10 528 '" LOA XTO get col index 109A CD 00 80 529 CMP XeOL chk col 1 i mit 109D DO 07 530 SNE BNEXT no t finish, next pill 109F AS lE 531 LOA 'iTO get row indez 10A1 CD 01 80 532 eMP YRO\J chk row 1 i mi t 10A4 Fa os 533 BEG BRTN 111 done. IDU 20 BS 18 534 BNEXT JSR NE\JTO not done, inc ptr lOA' DO CE 535 BNE BLOOP

30 Call -A.P.P.LE. May 1982 • Apple Pugetsound Program Library Exchange I Page 0034 of 0102 Call-A.P.P.L.E. Magazine • May 1982

536 • 10AH: 60 537 BRTN RTS ;done. If not using an assembler be sure 538 * to enter all bytes to the right of 539 • BITS table 540 • By EORing the source and destination "DFB". 541 * bytes, the value will be used in loop 542 * up this table to find out how many bits 543 * are different between the two bytes. 544 • 545 • Note: if not entering this code with an 546 * assembler, be sure to enter all data to 547 * the right ot the DFB pseudo-op. 548 t lOAC: 00 01 01 549 BITS OF B 0, 1 , 1 , 2 , 1 , 2 , 2 , 3 1 OB4: 01 02 02 550 DFB 1,2,2,3,2,3,3,4 lOBe: 01 02 02 551 DFB 1,2,2,3,2,3,3,4 10C4: 02 03 03 552 DFB 2,3,3,4,3,4,4,5 10CC' 01 02 02 553 DFB 1,2,2,3,2,3,3,4 1004: 02 03 03 554 DFB 2,3,3,4,3,4,4,5 100C: 02 03 03 555 DFB 2,3,3,4,3,4,4,5 10E4: 0304 04 556 DFB 3 ,4 , 4 ,5 , 4 ,5 ,5 ,6 10EC: 01 02 02 557 DFB 1,2,2,3,2,3,3,4 10F4: 02 03 03 558 DFB 2,3,3,4,3,4,4,5 IDFe: 02 03 03 559 DFB 2,3,3,4,3,4,4,5 lE04: 03 04 04 560 DFB 3,4,4,5,4,5,5,6 lEOC' 02 03 03 561 DFB 2,3,3,4,3,4,4,5 lE14: 0304 04 562 DFB 3,4,4,5,4,5,5,6 lElC: 03 04 04 563 DFB 3,4,4,5,4,5,5,6 lE24: 0405 05 564 DFB 4,5,5,6,5,6,6,7 565 lE 2C: 01 02 02 566 DFB 1,2,2,3,2,3,3,4 1 E34 : 02 03 03 567 DFB 2,3,3,4,3,4,4,5 lE 3e: 02 03 03 568 DFB 1,3,3,4,3,4,4,5 1 E44 : 03 04 04 569 DFB 3,4,4,5,4,5,5,6 lE 4C: 02 03 03 570 DFB 2,3,3,4,3,4,4,5 1 E 54 : 03 04 04 571 o FB 3 ,4 , 4 ,5 , 4 , 5 ,5 ,6 1E 5C: 03 04 04 572 DFB 3,4,4,5,4,5,5,6 1 E64 : 04 05 05 573 DFB 4 ,5 , 5 ,6 , 5 , 6 ,6 ,7 1 E 6C: 02 03 03 574 DFB 2,3,3,4,3,4,4,5 1 E?4 : 03 04 04 575 DFB 3,4,4,5,4,5,5,6 1E 7C: 03 04 04 576 DFB 3,4,4,5,4,5,5,6 1 E84 : 04 05 05 577 DFB 4 ,5 , 5 ,6 , 5 , 6 ,6 ,7 1E8e: 03 04 04 578 DF B 3, 4 , 4 , 5 , 4, 5 , 5 , 6 1 E 94 : 04 05 05 579 DFB 4 ,5 ,5 ,6 , 5 ,6 ,6 ,7 1E 9C: 04 05 05 580 OFB 4,5,5,6,5,6,6,7 1 EA4 : 05 06 06 5 B 1 DFB 5,6,6,7,6,7,7,8 582 • 583 Apple Software • All Programs On Disk 584 ·,LO,",* 585 • Table contains low bytes of the SNEAKERS ...... 29.95 . 23.96 586 * 24 rows of either pagel or pagel. TRACK ATTACK...... 29.95 . 23.96 587 KABUL SPY ...... 34.95 . 27.96 tEAC: 008000588 LO,", DFB $00,$80,$00,$80 DUNG BEETLE...... 29.95 . 23.96 1 EBO : 00 80 00 589 DFB $00,$BO,$00,$80 MOUSKATTACK ...... 34.95 . 27.96 1EB4 : l8 AS 28 S90 DFB $28,5A8,$28,5A8 ZORK I OR II . 39.95 . 31.96 1 EBB: 28 AS 28 591 OF B $ 2 B , $ A8 , $ 28 , $A 8 DARK FOREST . 29.95 . 23.96 lEBe: SO DO 50 59Z OrB 550,500,550,500 LISA ED. SySTEM ...... 119.95 . 95.96 1 ECO : SO DO 50 593 OF B 5 50 , $DO , $ 50 , $ DO APPLE PANIC ...... 29.95 . 23.96 594 • TIME ZONE .. [S~E~IAL~]. 99.95 . 74.76 595 * HGR1 ARCADE MACHINE ...... 44.95 . 33.16 596 • Page 1 high bytes of the 24 rows GORGON ...... 39.95 . 29.85 597 PFS (New Version) ...... 125.00 . 95.85 lEC4 : 20 10 21 598 HCR 1 DF B S 20 , $2 0, $2 1 , $2 1 WIZARDRY...... 49.95 . 37.85 1 ECB: lZ lZ 23 599 DFB $22,$22,$23,$23 TWERPS ...... 29.95 . 22.15 1ECC: 20 20 It 600 OF B $ 2 0 , $ 20 , $ 21 , $ 2 1 UTILITY CITY ...... 29.50 . 21.85 1 EDO : 22 22 23 601 DFB $22,$22,$23,$23 THRESHOLD ...... 39.95 . 29.85 lE04 : 20 20 11 602 DFB $10,520,521,521 EMPIRE WORLD BUILDERS 32.95 . 24.85 1 EDB: 22 22 23 603 DFB $22,$22,$23,$23 dBASE II (req. softcard) ... 700.00 . 498.16 604 605 * HGR2 C.OD. • Money Orders • Certified Checks 606 • Page 2 high bytes of the 24 rows For Personal Check Allow Two Weeks 607 NYS. Res. Add 7.25% Sales Tax· All Orders 1Eoe: 40 40 41 608 HCR2* DFB $40,$40,$41,$41 Under $100.00 add Post. & Hand. 1 EEO : 42 42 43 609 DFB $42,H2,$43,$43 $2.00 US. $2.50 Canada. $6.00 Foreign 1EE4 : 4040 41 610 DF B $ 4 0 , $ 4 0 , $ 41 , $ 41 • SEND FOR FREE PRICE LIST #905 • 1 EEB : 42 42 43 611 DFB $42,$42,$43,$43 1EEC: 404041 612 DFB $40,$40,$41,$41 BYTES & PIECES (516) 751-2535 1 EFO : 42 42 43 613 DFB H2, H2, $43, $ 43 Box 525 Dept. C5 • E. Setauket, N.Y. 11733 614

call -A.P'p.LE. May 1982 31 Apple Pugetsound Program Library Exchange I Page 0035 of 0102 Call-A.P.P.L.E. Magazine • May 1982 PICTURE COMPRESSION 615 * PTH 616 Pixel-table high by t es of the 24 rows 617 '"* 1 E F4: 60 60 61 618 PTH DFB $60,$60,$61,&61 1 E F8 : 62 62 63 619 DFB $62,1$62, $63, $63 1E Fe: 60 60 61 620 DFB $60,$60,$61,$61 1 F 00 : 62 62 63 621 DFB $62,1$62, $63, $63 1F 04: 60 60 61 622 DFB HO,&60,$61,&61 1 F 08 : 62 62 63 623 DFB $62, $62 , $63, $63 624 '" --END ASSEMBLY-- ERRORS: 0 1036 BYTES INTRODUCING THE AUTOMANIAC SYSTEM -It runs your Apple 24 hours a day! - It runs programs and series of commands that you schedule! - It brings Apple's Exec facilities to the Programmer and Non-Programmer! - It can control electrical devices in the Apple's environment on a scheduled basis! Why not run some of those routine programs at night when the computer is free, so that during the day it is free for you! FOR EXAMPLE: During the night, on Mondays, Wednesdays, and Fridays, you can schedule the program that sorts your Accounts Receivable data. On the 15th of every month you can schedule a series of programs that will turn your printer on at 7:00 P.M., print out the bills at 7:05 P. M., and after all the printing is finished, the printer is turned off. During the day, your computer won't be bogged down doing file maintenance but instead will be free to access information. The AUTOMANIAe;$YSTEM is compatible with anyone of the following clocks: • Applied Engineering Time II" • Mountain Hardware Apple Clock' • Mountain Hardware CPS card" • Superclock II" • CCS Calendar Clock" • Computime Compuwatch' • Thunderware Thunderclock" • Prometheus Versacard' 'Trademarks The system requires: 32K or 48K Apple II Plus', 3.30.0.5., An 80 col. printer and Mountain Hardware Introl/X-10 card' are optional. PRICE $100.00 • Order now and become an AUTOMANIAC! You'll get a GSW notebook, a 34-page easy-to-use operating manual, and a 3.30.0.5. diskette. Call (515) 280-7916 to order by Mastercard or VISA. Send check or money orders to: ..----- balU THE GEEGERY SOFTWARE WORKS P.O. BOX 8028 DES MOINES, IOWA 50301

Supercharge Your APPLE //*

• Plug-in compatibility

• 320K bytes of RAM (200NS) memory designed to function like two 35 track floppy disk drives

• Compatible with Apple DOS 3.3 and Apple Pascal 1.1

• Same size as the Apple Disk 11* Drive

• Invisible memory refresh - even with the Apple turned off

• Rechargeable battery system built-in to pro­ The Axlon RAMDISK™ 320K Memory System for vide 3 hours of auxiliary power the Apple II and Apple II Plus' provides access speeds never before available. The Axlon memory • Slot independent interface board - draws no system is designed to interact with Apple DOS power from your Apple 3.3' and Apple Pascal 1.1' like two standard flop­ py disk drives while delivering the lightning fast • All firmware is in static RAM on the interface access speeds of RAM memory. This also leaves board 32K of RAM for advanced programming techni­ ques. The interface board is slot independent and • Includes software for diagnostic, fast load and draws no power from your Apple. The copy routines, and business applications rechargeable battery system built into the unit provides three hours of backup in the event of a power loss. Drop by your local Apple dealer or 170 N. Wolfe Road, contact Axlon, Inc. for more information. Sunnyvale, CA 94086 • Trademark of Apple Computer, Inc. (408) 730-0216 • Pascal is a Trademark of U.C.S.D. Regents N( LON

32 Call -A.P.P.LE. May 1982 Apple Pugetsound Program Library Exchange Page 0036 of 0102 Call-A.P.P.L.E. Magazine • May 1982

get top performance books_======from your opple!

5154·9 Ba8ic Computer Program8 for the Home (Sternberg) "This is one of the very tidiest books of its type, a model of how such books should be laid out." Creative Computing. Contains over 75 practical home application programs helpful to the novice or experienced owner in increasing the usefulness of any . Each program is documented with a description of its functions and operation, a listing in BASIC, a symbol table, sample data, and one or more samples. $10.95 ALSO AVAILABLE ON APPLE II DISK, request 10509, $24.95

New! 5174·3 Cryptanalysis for Microcomputers (Foster) Use your micro to help crack and create secret codes. Three easy­ to-understand BASIC programs are offered for New! PIE Writer: Word Processing New! Kine; Cribbage (Rost) A must for card each ci pher system. The first program converts System (Crosley) Compose, edit, format, and game loversrMatch hands against a computer Plaintext to Ciphertext, the second program print virtually any document or correspondence armed with high-resolution graphics and a converts Ciphertext to Plaintext, and the third fast, easily, and inexpensively! PIE Writer offers superior card playing ability! Easy instructions uses mechanical aids and standard attacks on all the versatility and machine efficiency of the for beginners! 11509, Apple II disk, $24.95 cryptograms. Line-by-line analysis accompanies larger systems but at a fraction of the cost. each program. $13.95 It) Works with 40 or 80 column display boards and features incremental spacing, word delete, word Hayden Applesoft ™ Compiler (Eiten) A tabbing, underlining, centering, and more. Also new 3.3 DOS version features several modifica­ New! 5149-0 Codes, Ciphers, and produces "personalized" form letters and has tions including automatic garbage collection, Computers: An Introduction to special Call command for access to machine the ability to printout compiler statistics, and a language subroutines. revised protection scheme to eliminate the need Information Security (Bosworth) Describes 12009, Standard; the fundamentals of secret communication and for hardware. These improvements and more 13409, Smarterm, Sup'R'Term, Videx, are also available in the 3.2 DOS version. provides an understanding of computer security each $149.95 through computer cryptography. Details and 08809, Apple II Disk, 3.2 Version; illustrates traditional cryptography techniques 11909, Apple II Disk, 3.3 Version; each $175.00 developed before computers and discusses more Sargon II (Spracklens) The first great recent concepts for the highest levels of computer chess program. "This program information and data security. $13.95 represents a giant step forward in micro­ Klondike 2000 (Trackman) Gold is hidden in computing Chess ... an excellent program the desolate coave of a mine in the Martian New! 5534-X The BASIC Conversions which will provide a true challenge for many desert. You discover the secret to gaining the players. We are impressed with the program's loyalty of hostile robots guarding the gold. But Handbook for Apple TM, TRS-SO TM, and speed, its opening book, and its much improved you must fight conniving opponents and carry PET ™ Users (Brain Bank) Convert Apple II end game ... Save your money and buy your gold out of the mine. Suspense! Excite­ and PET programs to TRS-BO. TRS-80 and PET SARGON II ... " '80 Software Critique. ment! Treachery! 10209, Apple II Disk, $24.95 programs to Apple II, and TRS-80 and Apple II 03404, Apple II tape, $29.95 to PET. Equivalent commands are listed for 03409, Apple II Disk, $34.95 TRS-80 BASIC (Model I, Level II), Applesoft BASIC, and PET BASIC, as well as variations for the TRS-80 Model III and Apple Integer BASIC. Also describes various graphic capabilities. $7.95 -~-.:-- --- 1=====;:======5: = -::'=7-: == e ~ Order Today Hayden Book Company, Inc. 50 Essex St., Rochelle Park, NJ 07662 Please send me the book(s) checked on 15-day FREE examination. At the end of that time, I will send payment, plus postage and handling, or return the book(s) and owe nothing. On all prepaid, Visa or Master Card charge orders, publisher pays postage - same return guarantee. D 5149-0 D 5154-9 D 5174-3 D 5534-X

Please send me the software checked. Enclosed is my check or money order. PAYMENT MUST ACCOMPANY ALL SOFTWARE ORDERS. D 03404 D 08809 D 11509 D 12009 D 03409 D 10209 D 11909 D 13409

Residents of NJ and CA must add sales tax. Offer good in USA only. Prices subject to change without notice. Name vailable at your local computer Address, ______Apt # ____ store or order by phone City ______1-800-631-0856 State' ______Zip ____ g . '" N.w ,.".,. con >0'-"""". ,,'. '" ~ Visa/Master Card # Exp. Date ---- iii~ ~g~I,~~~~~~~gT~~t r:~~~;~r~a~~~~~~~;k":,~r~~d~~ ~~a~e:ll~c~op~~~;e~ Signature' ______«0 registered trademark of Commodore Business Machines, Inc., none of which are affiliated with Hayden Book Company, Inc. ,

Apple Pugetsound Program Library Exchange Page 0037 of 0102 Call-A.P.P.L.E. Magazine • May 1982

THE

FOR VISICALC FILES TM

Now YOU CAN USE ALL THE POWER OF YOUR APPLE AND ALL THE POWER OF YOUR VISICALC.

f you use VisiCalc, you must have The he Consolidator is easy to use, with prompts, I Consolidator. It's that simple. The Consolidator t options and formats all carefully spelled out. If will save you hours of Keyboard time - adding you can use VisiCalc, you can use The Consolidator. any number of VisiCalc files together, virtually It will handle all the column widths, rows and automatically. columns accommodated by VisiCalc. It will handle any matrix size which you are able to save with 'Uor example, say you need to add the results of VisiCalc. And it will give you back hours of .I' four weekly reports to get the monthly total­ manual calculation and keying time. or add three months for the quarter, twelve for the year, etc. Until now, Vou need The Consolidator you had to key-in all the I to use All the power you've individual sub-totals and got with VisiCalc. It's a bargain recalculate. Now, The at the introductory Consolidator will do it price of just $49.95, at for you. your local dealer or direct. Visa and he Consolidator Mastercard holders Twill also print order toll-free, out VisiCalc commands, 1-800-835-2246. formulas, and the locations to which they apply. In the past, programs that did ONLY that have sold OMEGA M1CROWARE, INC. for as much as The 222 So. RIVERSIDE P~AZA Consolidator alone. CHICAGO, IL 60606 312-648-4844

Apple Pugetsound Program Library Exchange Page 0038 of 0102 Call-A.P.P.L.E. Magazine • May 1982 PICTURE COMPRESSION

lL 1ST 2000 COSUB 30: PRINT "ANALYZE PI CTURE": VTAB 22: INPUT "MAX S REM ERR/PIXEL: ";ME: POKE 215,ME CALL AN:AF ~ 1 :SF = O:CF : 0: COSUB 40 HI-RES PIC COMPRESSION 2010 VTAB 22: PRINT "THERE ARE" ;N;" PIXELS 'vIITH MAX ERR= "; Copyright (0) Edward C. So, 198Z ME· 'vIAIT (KB),ll8: POKE SB,O COTO 100 3000 COSUB 30: PRINT "SYNTHESIZE Call -A.P.P.L.E. : May, 1982 PICTURE": IF AF THEN 3050 3010 VTAB 22: PRINT "THERE IS NO ======PI XEL TABLE YET!!!": COTO 50 10 HIMEM: 6911 3050 HGR2 CALL SY: SF = 1.Cr = 15 ONERR GOTO 90 0: 'vIAIT (KB),128 POKE SB,O: 20 PRINT CHR$ (13) + CHRS (4)" COTO 100 BLOADCOMPRESSI ON" : AN = 6912: 4000 COSUB 30: PRINT "LOAD COMPR SY : 7002:MP : 7450;BP : 752 ESSED PICTURE": VTAB 22: INPUT 7:DE = 7353:AF = 0:5F = O:CF "FILENAME: ";AS: IF A$ = "" THEN : O:KB: - 16384:SB = - 1 50 6368: GOTO 100 401Q PRINT CHRS (13) + CHRS (4 30 VTAB 20: HTAB 12: CALL - 958 )"BLOAD ";AS;",ASBOOO": CALL RETURN SP: CF = 1: AF " 0: SF = 0: COTO SO 40 N = 40 * PEEK (32769) + PEEK 5000 COSUB 30: PRINT "SAVE COMPR (32768) + 1: RETURN ESSED PICTURE": IF NOT SF THEN SO PRINT CHR$ (7);: WAIT (KB) ,1 3010 28: POKE SB,O: GOTO 100 50 lOGO SUB 40: I F N < 4 64 1'H E N 5 90 PO KE - 1 6 3 00 , 0 : PO K E - 1 6 3 0 050 3,0· HOME: VTAB 12: HTAB 16 5020 VTAB 21: PRINT "THERE ARE M : INVERSE: FLASH PRINT liE ORE THAN 463 PIXELS, CAN'T 5 R R 0 R": NORMAL FOR 1 : AVE": GOTO 50 1 TO 5: PRINT CHRS (7);: NEXT 5050 VTAB 22: INPUT "FILENAME: " ;AS: IF AS = "" THEN 50 100 POKE - 16300,0: POKE - 163 5060 CALL MP:CF = 1: PRINT CHRS 03,0; CALL - 936:: HTAB 17: (13) + CHRS (4)"BSAVE ";AS; INVERSE .. PR INT "M E N U": ",ASBOOO,L";2 + 2 .. 960 + N .. NORMAL : PRINT PRINT" 8: GOTO 50 L - LOAD A PICTURE INTO PAGE 6000 GOSUB 30: PRINT "DECOMPRESS 1": PRINT" A - ANALYZE T PICTURE": IF CF THEN 6050 HE PICTURE IN PAGE 1" 6010 VTAB 22: PRINT "NO COMPRESS 110 PRINT" S - SYNTHESIZE PI C ED PI CTURE IN MEMORY !!! ". GOTO TURE TO PAGE 2": PRINT: PRINT 50 " C - LOAD COMPRESSED PICT 6050 HGR2 CALL DE: WAIT (KB),l URE": PRINT" X - SAVE COM 28: POKE SB,O: COTO 100 PRESSED PICTURE": PRINT" 7000 POKE - 16304,0: POKE - 16 Y - DECOMPRESS PICTURE TO PA 302,0: POKE - 16300,0: POKE GE 2" - 16 2 97 , 0: GOTO 50 120 PRINT PRINT" 1 - DISPLA 8000 POKE - 16304,0: POKE - 16 Y PAGE 1": PRINT" 2 - DIS 30Z,0: POKE - 16299,0: POKE PLAY PAGE 2": PRINT II D- - 16297,0: COTO 50 I SSUE A 0 I SK COMMAND": PR INT 9000 GOSUB 30: PRINT "DISK COMMA PRINT" Q - QUIT" NO" 130 VTAB 20: INVERSE: FLASH: PRINT 9010 AS = "": HT = 1: VT = 22 "SELECT: ". NORMAL 9020 VTAB VT: HTAB HT: CALL - B 200 WAIT (KB),12B:KV = PEEK (KB 68: 'JAIT (KB),128:KV = PEEK ) - 128: POKE SB, 0: I D = 1 * (KB) - 128: POKE SB,O: IF KV (KV :: 76) + 2 * (KV :: 65) + = 13 THEN 9090 3 * (KV = 83) + 4 * (KV = 67 9030 CS:: CHRS (KV) ) + S .. (KV :: B B) + 6 * (KV :: 90 40 IF KV = 8 TH EN HT = HT - 1: 89) + 7 .. (KV = 49) + 8 .. (K IF HT < :: 1 AND VT :: 22 THEN V :: 5 0) + 9 .. (KV :: 6 8) + 1 0 9010 • (ltV = 81): 1 F 1 D = 0 THEN 9050 IF ICV " 8 AND HT < 1 THEN V 200 T = VT - 1: HT :: 40 11 0 VTAB 20: HTAB 1: CALL - 958 9060 IF KV = 8 THEN 1$ = LEFTS : PRINT "SELECT: ": ON ID COTO ( A $, LEN ( AS) - 1): G OTO 9 0 2 1000,2000,3000,4000,5000,600 o 0,7000,8000,9000,10000 9070 PRINT CS;:A$ = AS + CS:HT = 1000 VTAB 20: HTAB 11: CALL - 9 HT + 1: IF HT } 40 THEN HT = 58: PRINT "LOAD A PICTURE": POKE 1: VT = VT + 1 - 1 6 3 0 0 , 0 : PO K E - 1 6 3 03 , 0 : 9 080 C OTO 90 20 VTAB 22: INPUT "F lLENAME: " 9090 IF AS = "" THEN SO ; AS: 1 F A $ = "" THEN 1 0 0 9100 PRINT CHR$ (13) + CHRS (4 1010 PRINT CHRS (13) + CHRS (4 ) + AS: GOTO SO )"BLOAD ";AS;",AS2000": GOTO 10000 PRI 0: INt 0: CALL 1002: TEXT 50 : HOME : END

Call -A.P.P.L.E. May 1982 35 Apple Pugetsound Program Library Exchange I Page 0039 of 0102 Call-A.P.P.L.E. Magazine • May 1982

- There's an- easier ~way to tame the Data Monster.™ Keeping track of information want-even data already mation out as quickly and can be a beastly chore. But stored on disk. And then cross­ easily as you entered it. And with DataFax'· from Link Sys­ reference it as many different DataFax is the only software of tems, you're always in control. ways as you'd like-by a its kind to let you expand from Unlike most conventional date, a species, a custome(s floppy to hard disks, so it'll •data manager" software, name, whatever. never be obsolete. DataFax doesn't care what So when you need that infor­ If getting so much power with your data looks like. Or how mation, DataFax will retrieve it so little effort seems too good long it is, how many items it has in a way that's meaningful to to be true, see your Apple or what you want to do with it. you. The powerful keyword computer dealer and prove it The power we've program­ function allows you to get infor- to yourself-before your data med into DataFax makes it as situation gets any hairier. easy and natural to use as Because whether you've got a pencil and paper. You can a monster of a data problem­ fill up a screen any way you or just a small one-DataFax want with most anything you LINKe can tame it. SYSTEmS Simply powerful software™ Link Systems. 1640 19th Street. Santa Monica. CA90404 (213) 453·1851 C>1981 LlnkSysteml Apple is a registered trademark of Apple Computer Co., Inc.

Apple Pugetsound Program Library Exchange Page 0040 of 0102 Call-A.P.P.L.E. Magazine • May 1982

EXPLORING THE WORLD OF APPLE: Random Adventures David Sparks -

APTAIN Tlaxtre guided his Tlaxtre chuckled cooly to himself All three languages allow us to Starship homeward through How like the Universe to remind him initialize the random number the final dangers of space. in this way that not every outcome generator. This is important because CNudging a joystick, he heeled rests in the hands of mortals. these functions actually produce pre­ his craft toward the yet-unseen His main drives soundlessly determined sequences of so-called earth. His Visiport briefly framed the clambering through the web-work of "pseudorandom" numbers. magnificent sight of his immense interstellar gravnetism, Tlaxtre Pseudorandom! The generator is fleet turning in tight formation steered chanceward for home ... a mathematical function that pro­ behind him. Then, arrow-like on Okay, forgive me. I got carried duces a value that is directly depen­ course, the armada surged as one away. But that little story illustrates dent on one or more preceding ship, one appendage of his all­ the nature of any random-number values. The generator will produce conquering will. generator in any computer. A specific the exact, same sequence of succeed­ Behind lay glory on a galactic sequence of calculations, in which ing values each time it is given any scale. Ahead lay adulation, trium­ each event determines successive specific value. phant marches, jubilees, political events, yields numbers in a way that Why would you want to do this? domination. In such a moment, a cannot be distinguished from truly Two reasons come to mind. There lesser man might ponder the worlds random sources like dice, spinners, has been considerable discussion in that now cheered him, the vast and hats full of numbered balls. As a the pages of this journal regarding treasure he owned. But Tlaxtre sat plus, computers never tire of their the stability of the Applesoft random quiet, alone, focusing on his one re­ labor. You try tossing dice 10,000 number generator, all of it centering maining peril; the boulder-clouds of times! on the tendency of certain "seeds" to Aldeberon had to be crossed first. Computers are by their very lead to repeating sequences. Obviously, Complex gravitational fields held nature dull and methodical. They are changing "seeds" occasionally helps billions of craggy, pitted monoliths­ the exact opposite of random. There­ stir things up. sand to stars, but hulking hull­ fore any game, statistical study, or Send RND a negative argument, crushers for unlucky starships. Each other application needing the com­ as in 100 X = RND(-N). For each N mountainous rock attracted all the puter to produce random results the function will return a unique others. Any shift in position of one faces a seeming contradiction. result. From that point on, it doesn't would cause reactions in the rest. Fortunately for us key-clickers, matter what positive argument you The interrelationships were so com­ all three widely-used Apple languages send. The function will return a fixed plex, so dynamic, that no computer contain random functions. (Integer) sequence of numbers. had yet been able to predict their Basic will return a random integer in I have a bridge-playing program movements. Glarbian navigation, the the range 0-(N-1) by calling some­ that allows me to specify a "se­ only method fast enough to ensure thing like 100 X = RND(N). Apple­ quence" of deals. It simply "seeds" the safe passage of a Morpiax Class soft and Pascal return a "pure" the generator with my "sequence" warship with its Qntan drives, was random root, which you then massage value. Each time I provide the same yet no match for these stellar sling­ to your liking. 100 X = INT(RND value, it produces the same deals. stones. (1) * N) is the Applesoft equivalent of This is useful in re-playing rubbers Their movements were, for all the BASIC example. Pascal is a bit of bridge, to test different bidding practical purposes, random. They more complex-looking: strategies. could therefore demolish even the Lord British uses the "seeding" best-flown craft. More than one FUNCTION RND (N : idea in Acalabeth, asking for "thy mathematician had made his or her INTEGER): INTEGER; lucky number." This value determines reputation, endlessly analyzing the BEGIN RND: = RANDOM the mazes and obstacles therein. You patterns. Even though there was no MOD (N) can stick with the same lucky number doubt that a physically coherent, END; (* RND *) ("seed") until you conquer that par­ gravitationally consistent process ticular dungeon. was at work, the shifts of the "Seeding" BASIC's function is boulders within the clouds of simply a matter of POKEing loca­ Aldeberon could not be distinguished tions $4E and $4F (decimal 78 and statistically from random behavior. 79). Try it.

Call -A.P.P.LE. May 1982 37 Apple Pugetsound Program Library Exchange I Page 0041 of 0102 Call-A.P.P.L.E. Magazine • May 1982 RANDOM ADVENTURES

I don't know how to "seed" the Each program will run in 16K or A third test of a random generator Pascal function, but the RAN­ more of RAM. The Programmer's looks for relationships among groups DOMIZE command will mix up the Aid #1, and Language System Inte­ of successive random digits. The fair sequence for you. ger Basic have essentially the same play of such games as Yahtzee and My purpose now takes me away routines, but at different addresses. poker depends upon this. The fre­ from the random-number functions See your manual. quency of specific combinations of of high-level languages. I simply There are several tests to deter­ five random digits has been calcu­ wanted to point out that all three mine if the thing actually works. One, lated precisely in the literature. The follow similar principles. obviously, is whether it produces following table from Lennart Rade's This article will present and test a evenly distributed results. This is Take A Chance with Your Program­ machine-language random number tested in Listing #2, "Distribution mable Calculator gives the expected generator. The routines presented Test." The program creates an array results for groups of five random are not intended to be the last word in of 280 bytes, then loads the array digits between 0 and 9: such matters, but they do work. The with the location of the bottom of random number program is designed Hi - Res page 1 in the mixed text ALL DIFFERENT: .3024 to be a general-purpose subroutine mode. It then generates 28,000 ran­ ONE PAIR: .5040 that you can patch into any program dom numbers in the range 0-279, TWO PAIR: .1080 requiring random integers. plotting the Y-value found in. the THREE OF A KIND: .0720 I designed it to emulate the RND corresponding array element, and FULL HOUSE: .0090 function of (Integer) Basic, 0-(range-1). finally decrementing that element. FOUR OF A KIND: .0045 However, alternate entry and exit What you see is a forest of ran­ FIVE OF A KIND: .0001 points are documented to obtain domly growing lines filling the single hex bytes at random, and to screen. A final, horizontal line 100 I'm a little bit proud of my emulate the RANDOM function of locations up from the bottom should algorithm for the poker test, as it's Pascal. roughly divide the peaks and valleys, called. I generate five random digits, The routine also permits specific if all went well. 0-9, then sort them. If any two "seeding" of the generator. An Applesoft program to do the adjoining digits are equal, I set a bit The method is simple, and there­ same might look like Listing #2-A. in the accumulator that corresponds fore probably controversial. I submit A second test looks for repeating with that pair's location in the array. myself to the constructive criticism of patterns. Listing #3, "Black Hole," One pass through the five digits my readers, and I hope someone will does this by filling the Hi-Res page leaves a value in the accumulator in teach me a thing or two. with white then selecting endpoints the range of $OO-OF. Each value My approach actually merges two at random for black line segments. corresponds to only one of the seven different ideas, an array-shuffling Confining the end points to the possible outcomes. method, and a fraction-multiplication screen area makes use of the range Moving the value to the Y-register route, to reach its results. The array­ feature of RNDGEN. It also con­ and indexing by Y, I load the shuffling method is cited in the new strains the variables in such a way X-register with a pointer to the Call-A.P'P.L.E. in Depth #1, in Dave that you get a kind of 3-D "bell" score-keeping array. Lingwood's AMPLIFYING APPLE­ distribution curve, viewed from This thing will "deal" 10,000 SOFT. My routine is not as sophis­ above. The lines quickly erode the "hands" of "poker," involving ticated as that one. The fraction­ center, and gradually enlarge the hole 50,000 random digits, test and record multiplication method is what you do toward the edges more or less the frequency of different patterns in when you massage Applesoft's RND symetrically . one minute, 17 seconds. result, taking the integer of the An early version of RNDGEN The results are kept in a 14-byte product. produced only a few hundred seg­ array called "SCORE." The values, An important part of the success ments before appearing to "hang." I however, are in hex notation, and to of my generator came free of extra learned that the program continued look at them you would have to enter charge on a (borrowed) copy of Big to function, but the routine was simply the monitor. Applesoft easily handles Mac. I make use of part of the returning the same set of end points integer arrays, and takes care of con­ Multiply/Divide Routines from the repeatedly, making the drawing verting them to decimal numbers. So original monitor, which reside, fully routines retrace their steps. I have the Applesoft program, POKER documented and ready to roll, on the not yet seen this version of RNDGEN BASIC, DIMs an array, which the Big Mac disk. Thank you, A.P.P.L.E., do that. As long as dots disappear, machine-language routine locates and for your thoughtfulness. you're getting new numbers. uses as its SCORE array. Reading Being as this is a new generator, I back the results requires a simple thought it would pay to illustrate its loop. use while at the same time testing its Obviously, in this instance the effectiveness. I will make use of the machine code is a subroutine of the Hi-Res routines in ROM Applesoft. Applesoft program. Listen, I had to type 'em all, too.

38 Call -A.P.P.LE. May 1982 Apple Pugetsound Program Library Exchange I Page 0042 of 0102 Call-A.P.P.L.E. Magazine • May 1982

B.E.S.T. Our original Applesoft Optimizer (AOPT) has now been en· understandable No longer do you have to remember the line hanced to bring to the Applesoft programmer the most comprehen· numbers of subroutines and procedures; instead, just "DO sive set of software tools available today-B.E.S.T. The BASIC GRAPH IT" and APLUS does the rest. APLUS adds the following ENHANCED SOFTWARE TOOLS is a machine language program to structured programming commands to Applesoft basic: aid in writing, analyzing, and debugging Applesoft Basic programs WHEN .. ELSE. FIN, UNTIL, WHILE, CASE, SELECT, and OTHER­ B.E.S.T. will certainly increase programmer efficiency for improved WISE. Multi-line IF .. FIN statements are also supported. APLUS productivity. B.E.S.T. offers: 1) Variable Cross-Reference. 2) Line includes functions to output indented listings to clarify logic flow and number Cross-Reference, 3) A Complete Cross-Reference, 4) Opti­ converting source code to standard Applesoft commands. mize variable names with recognition of both short (two character! Requires Applesoft, 32K of RAM, and DOS 3.3 ... Only $25.00. Applesoft standard) and long labels, 5) REM Optimizer-with an option to "protect" specified REM statements, 6) Line Optimizer to BUILD USING. Do you have trouble printing charts, reports, or for­ join short instruction lines of specified length, 7) Merging two pro­ matting numbers on the screen? If you do, BUILD USING can solve grams, 8) Automatic line numbering, and 9) A powerful, yet easy to your problems. BUILD USING is a powerful Applesoft utility which use Renumber function. Implementation of B.E.S.T. can reduce provides a "print-using" type routine for numbers and strings. By memory requirements by up to 50% and increase execution speed of creating simple "formats", you tell BUILD USING how to format the Applesoft programs by up to 100% B.E.S.T. is a low cost alternative output. The output from BUILD USING are strings which may be to an Applesoft compiler. printed, written to disk, saved for later usage, or even reformatted. With BUILD USING, you can choose how many digits should be B.E.S.T. requires a 48K Apple 11/11 + , Applesoft in ROM or Language card, and DOS 3.3 ...... $40.00 displayed to the left and right of the decimal point, and even fill the leading positions with the character of your choice. For example, you EDIT-SOFT. A powerful, yet affordable, line editor for Applesoft. Us­ can print the number '157.23' and '157.2' or '000157.230', of ing EDIT-SOFT, you can drastically cut your programming time. EDIT­ ' •••• $157. AND 23/1 00 DOLLARS', or hundreds or other ways SOFT not only contains the standard line editor features like inserting (including exponential formats). Working with strings is just as easy. or deleting characters, moving to a specific character, entry of lower Also included are three levels of error trapping, so you can correct case letters, going to the beginning 6r end of a line, and displaying numbers that cannot fit into your specified format. control characters, but it also has the advanced features that will Utilities like BUILD USING are usually difficult to use because they prove indispensable must be located in one memory location (usually between DOS and • AUTO LINE NUMBERING the DOS file buffers), they cannot be used with your favorite editor or • SPLICING two lines together other special routines. BUILD USING does not have this limitation, as • AUTOMATIC CHARACTER COUNTER for quoted strings it can be easily located in many different memory locations: 1) the makes screen formatting a snap "standard" between DOS and DOS file buffers, 2) at HIMEM, 3) • EDITING LINES as they are being TYPED APPENDED to your Applesoft program, or 4) anywhere else in • A STATUS LINE keeps you constantly aware of which memory Appending BUILD USING to your program is as simple as oplions are currently being used EXECing a TEXT file. BUILD USING uses the "CALL" command • Up to TWENTY MACROS available at any time thereby leaving the ampersand vector free for your own use. • MACRO EDITING AT ANY TIME • HELP PAGES available when needed BUILD USING requires Applesoft in ROM (Language cards are fine), DOS 3.3 and a minimum of 32K ... Only $30.00 Compare the features of EDIT-SOFT to other line editors, then com- pare the price. No other line editor has so many features at such a ~ reasonable price I IIIIIIIII~. S ·bl S ft EDIT-SOFT requires 48K of RAM, Applesoft in ROM (language and a9 ens. e 0 ware RAM expansion cards are fine), and DOS 3.3. ONLY $30.00 6619 Perham Drive Dept. C West Bloomfield, Michigan 48033 APLUS. The original Structured Basic enhancement for Applesoft (313) 399-8877 Basic. APLUS provides the tools that will increase your efficiency, Please specify program desired. simplify program rewriting, and make your program flow more Visa and Mastercard Welcome. Add $1.25 postage and handling per diskette. See you at Boston Applefest '82 - Booth 324 • Applesoft is a registered trademark of APPLE Computer Company.

Apple Pugetsound Program Library Exchange Page 0043 of 0102 Call-A.P.P.L.E. Magazine • May 1982

Give your Apple* something to o ][ Speech Synthesizer. voice-output while using T 0 ][ uses LPC teclhnolog~~ I Ins ruments, coupled with a allowing you to l.in:,au, alii) stress, pitch and vollunlelet s or make al quality. rograms with PRIINT' st~lterner applications of by your imagination. Frolm IBdu ames to business ew dimension to The eCHO )[ Speech Synlthe:size1r co speaker and cable, instructilonmaln s and a sample s 48K, Applesoft and at Suggested list price is $225. her information, contact your Ics Corporation. Dealer Inquiries welcome. * l'nIdemark of Appte Computer company (714) 632·9950

MPUTER , ONSULTING 1376 CLEVELAND STREET CLEARWATER. FLA 33515 ~ ERVICES IT'S ABOUT TIME • • (813) 441-3490

Attorneys, accountants, consultants. The services you perform and the Master functions: advice you dispense are your firm's principle assets. How much of your time goes - Data entry unaccounted for? How much time do you spend accounting for how much time - Billing (pre·bill, regular bill, re·bill) you have spent? - Print data files - Print activity analyses - entire firm - Print activity analyses - single professional Over the past eighteen months, Computer Consulting Services has developed, - Edit data files perfected and field-tested a powerful clerical and management tool called the - Edit professional summary files C.C.S. Professional Timekeeping System. With an emphasis on quality and - Generate complete monthly client financial summaries professionalism, the Timekeeping System offers the managers and decision - Print complete monthly client financial summaries makers of the firm a cost-effective tool which not only provides valuable - Print single client financial summaries management information, but also simplifies and optimizes the timekeeping and Utility functions: billing process, thereby increasing the productivity and profitability of the firm. - Edit parameter files - Data file maintenance: It's about time someone produced a quality timekeeping and billing system Disk-to-disk transfer of client files for the Apple. C.C.S. is now making this software generally available. Produced Delete client files for professionals by professionals. See your local Apple dealer for details. Re-start (compress) client files - Print client data disk directories - Initialize client data disks - Backup client data disks Capacities: Hardware Requirements: APPLE II PLUS (48k), DOS 3.3 Number of Professionals 25 Dual disk drives, printer Number of clients (entire system) ... . UNLIMITED Number of clients per disk ...... 40 Number of data entries per disk ...... approx. 1600 Dealer Inquiries Invited Client file size ...... 150 records

40 Call -AP.P.LE. May 1982 Apple Pugetsound Program Library Exchange Page 0044 of 0102 Call-A.P.P.L.E. Magazine • May 1982 RANDOM ADVENTURES

Last of all, and just for fun, a ran­ Incidentally, if you ever wanted a $50-$56. This could conflict with an dom walk example. Random walks dramatic illustration of the difference Applesoft program, so save the data imagine a particle reposing at its in speed between Applesoft and there on entry if you need to, and origin. It proceeds to hop a certain machine code, enter both versions of restore it just prior to exit. Integer number of times, one increment each "RNDWALKER" (they'll both reside Basic does not use those locations, time, with the direction of the hop in memory simultaneously) and run nor does the monitor. determined randomly. If the proba­ them. I will someday amend this routine bility of a positive hop equals the RNDGEN seems to be a service­ to work as an ampersand (&) func­ probability of a negative hop, then able random number generator for tion. Imagine something like 100 the most likely location of the particle machine-language programs. It is a X=&RND,6. Sure, you could do a at the end of any even number of complete subroutine, with alternate DEF FN RN(Q)=INT(RND(l)*Q+l) hops is back at the origin. entry and exit points allowing easy followed by a X = FN RN(6), but that Plotting the number of times the adaptation to your own programs. I would be dull, right? particle lands on each location should know better than to claim much else. This is my first major venture in produce a bell curve centered on the Two or three final thoughts. The machine code. All my friends were origin. The Applesoft program in routine uses all three 6502 registers, right. The best way to learn is to Listing #5-A performs that way. The so save yours prior to calling plunge in. Remember too there is no machine-language program, Listing RNDGEN if you need them. Remem­ replacement for study. I read several #5, "RDNWALKER" follows exactly ber to clear the high byte of the range books, and pored over assembly list­ the same logic in the same order. I if you're generating digits between 0 ings in Call -A.P.P.L.E. for weeks wrote it purposely, to illustrate how - N where N is less than 256. before making this attempt. programming concepts in one lan­ The multiplication part of Having high standards set before guage transport easily to another. RNDG EN uses zero-page locations me made the results more satisfying. ~

:ASM -**-**-****************-**-***** 2 3 * Random Number Cenerator * 4 * 5 * David C. Sparks 6 * 7 * Call -A. P. P . L . E. : Ma y, 1982 * 8 -**-***************************** * 10 11 * This routine required by each of 12 * Distr ibut ion Test, Black Hole, 13 lit Poker Test, and Random Walker. 14 15 * Those programs should be appended 16 * to this or use PUT pseuodo-op on 17 * Big Mac.LC 18 19 20 ACC* EQU $50 21 XTND EQU $52 22 AUX EQU $54 23 SEED EQU $ 4E 24 25 * ORC $1000 26 1000: 4C AS 11 27 JMP START 28 29 XLO* OS 1 30 XHI OS 1 31 PTR OS 2 32 CTR OS 2 33 RANCE OS 2 34 DEAL OS 5 35 RND OS 6 36 ZSAV OS ? 37 BUF OS 280 38 39 *- Note: To initialize to your own seed value, 40 lit Store it in $4E and $4F then call INITRND. 41 *

Call-AP.P.LE. May 1982 41 Apple Pugetsound Program Library Exchange I Page 0045 of 0102 Call-A.P.P.L.E. Magazine • May 1982 RANDOM ADVENTURES 1135: 1.5 4E 42 INITRND LOA SEED LOAD RND FIELD 1 137 : 80 10 10 43 STA RND FROM MONITOR 1131.: AS 4F 44 LDA SEED+ 1 KEYIN LOCATIONS 1 1 3C : 80 12 10 45 STA RND+2 AND USE IT TO 113F: 6D 10 10 46 ADC RND INITIALIZE THE 1 142 : 8D 11 10 47 STA RND+l RNDGEN ROUTINE. 1145: 01. 48 ASL THIS MUST BE 1 146 : 80 13 10 49 STA RND+3 CALLED PRIOR TO 1149 : 65 4F 50 ADC SEED+ 1 THE FIRST USE 1 1 4B : 8D 14 10 51 STA RND+4 OF RNDGEN. 114E: 41. 52 LSR AND IT MAY BE 1 1 4F : eD 15 10 53 STA RND+5 CALLED AT ANY 1152: 60 54 RTS OTHER TIME. S5 *END OF INITRND 56 * ~**~**~********~**************** 58 lit 1153: 1.9 00 59 RNDGEN LOA tHOO ;CLEAR THE 'vlAY 1 155 : 85 52 60 STA XTND i FOR MULT I PL I CAT I ON 1157: 85 53 61 STA XTND+l 1 159 : 20 71 11 62 JSR RNDNUM i GET TWO SUC,CESS I VE 115C: 85 50 63 STA ACC iRANDOM BYTES TO FORM 1 15£ : 20 71 11 64 JSR RNDNUM ;16-BIT INTEGER 1161 : 85 51 65 STA ACC+ 1 66 lit 1163: AD 09 10 67 LOA RANGE 1166 : 85 54 68 STA AUX ; SET UP 1168: AD 01. 10 69 LDA RANGE+l ;RANGE 1 1 6B : 85 55 70 STA AUX+1 71 * 1 1 6D : 20 81. 11 72 JSR MUt 73 lit 74 * Returns a 2-byte ra.ndom number 75 * In XTND, XTND+l, in the range of 76 * 0 To (Range-l) 77 lit 1170: 60 78 RTS 79 lit 1171 : AD 10 10 80 RNDNUM LOA RND ;ARRAY-FILLING SEGMENT 1174 38 81 SEC iRETURNS \.lITH RANDOM 1175 6D 14 10 82 ADC RND+4 iBYTE IN ACCUMULATOR 1 178 6D 15 10 83 ADC RND+5 11?B 8D 10 10 84 STA RND 1 17£ 1.2 04 85 LDX .. $ 04 1180 BD 10 10 86 NXTDGT LOA RND,X 1 183 9D 11 10 87 STA RND+ 1 , X 1186 CA 88 DEX 1 187 10 F7 89 BPL NXTDGT 1189 60 90 RTS 91 lit **lIt***************************** 93 * * 94 * APPLE-II MULTIPLY / * 95 * DIVIDE ROUTINES lit 96 * * 97 * COPYRIGHT (C) 1977 * 98 * APPLE COMPUTER, INC * 99 * * 100 * ALL RIGHTS RESERV~D * 101 * * 102 * S. WOZNIAK * 103 * A. BAUM lit 104 * * *******************************lIt 106 * * 107 * TITLE: * 108 * "MULTIPLY/DIVIDE ROUTINES" * 109 * * ******************************** 111 * 1181. 1.0 10 112 MUL LOY IS10 INDEX FOR 16 BITS 1 18C AS 50 113 MUL2 LOA ACC ACX * AUX + XTND 118E 41. 114 LSR TO AC, XTND 118F 90 OC 115 BCC MUL4 IF NO CARRY, 1191 18 116 CLC NO PARTIAL PROD

42 Call -A.P.P.LE. May 1982 • Apple Pugetsound Program Library Exchange I Page 0046 of 0102 Call-A.P.P.L.E. Magazine • May 1982

SUPERMARKET SHOPPING ORGANIZER Shoppers will instantly be able to use this easy, self-prompting pro­ gram.ln a few minutes they will be able to scan a file of up to 500 user defined items, choosing those needed with a single key stroke. The computer will then print a list organized by table, section number, or department, such as "DARY", "DELI", or other four letter code. THIS PROGRAM IS A REAL TIME AND STEP SAVER 48K Apple with disk printer and Price ... $24.95 ROM Applesoft required DOS 3.2/3.3

HOME FINANCE MANAGEMENT MAINTAIN multiple checking, charge UNLIMITED FILES are stored EX- * card, cash and savings accounts. * ACTL Vas entered forfuture reference. DEFINE upto 100 codes to define in- SPECI FIC and expanded searches for * come, expense, budget and tax de- * any given data. ductible categories. PLAN, review and balance your budget, QUICK, 1 - 3 key entry system. * then generate complete reports with SUMMATION. * GENERATE complete audit reports * with monthly and year-to-date totals in ALL REPORTS are formatted for both all categories. PERFECT FOR TAX * screen and printer. (80 or 132 column) ACCOUNTING. PRINT CHECKS selected from files * using the standard format or define your own custom format.

48K Apple With disk and ROM Applesoft required Price ...... $64.95 DOS 3.3 (80 or 132 col printer and dual disk drives optional)

PROFESSIONAL BUSINESS AND HOME FINANCE MANAGEMENT

* FMS III contains all of the features + LINK FILES to provide an un­ + INSTANT screen recall of up to of FMS II PLUS these and many limited number of records with 200 user defined 1 - 3 key ab­ other enhancements and addi­ balance and reconcile totals breviations make data entry tions. brought forward to date. QUICK, ERROR FREE and EASY. + OVER 200 PAGES of step by step + DESIGN SPECIFIC AUDIT + SPECIFIC APPLICATIONS FOR: documentation packaged in a REPORTS for income, expense, - Asset and Liability manage­ stand-up easel binder. tax deductions and disburse­ ment. ments or any combination of cate­ + FAST, USER FRIENDLy data - Multiple-account transfer of gories. entry system with extensive error funds. trapping to prevent accidental + POWERFUL SEARCH ROU­ - Inventory management. data loss. TINES assist in collecting and - Small payroll management. totaling data from selected files + FREE back-up disk provided. + MODULES AVAILABLE FOR: and data fields. PERFECT FOR - Check printing with automatic + UNLIMITED number of disburse­ TREND ANAL YSIS and reporting. addressing for window enve­ ments for split transactions. + CREATE SPECIFIC BUDGET lopes or printing of mailing + REAL TIME BALANCE comput­ REPORTS for any combination of labels. ed as entries are made. budgeted categories. - Itemized income and expense reports. - Balance report.

48K Apple with disk and ROM Applesoft required Price ...... $120.00 DOS 3.3 (80 or 132 col printer and dual disk drives optional)

Apple Pugetsound Program Library Exchange Page 0047 of 0102 Call-A.P.P.L.E. Magazine • May 1982 DATA CAPTURE 4.(1 The most advanced and easiest to use telecommunications program for use with the MICROMODEM IjCf~ or the Apple COMMUNICATIONS CARD~.

Hyou use your Apple I!@ computer to communicate with other Apples or with timesharing systems, then you need Data Capture 4.0. If you want to save stock quotes, airline schedules, electronic mail, or other data from a remote computer system for future use, then you need a smart terminal program for your Apple II@. Data Capture 4.0 is the most user friendly and most flexible program of this type. It is specifically designed to take advantage of all the features ofthe Micromodem II@, but it works equally well with the Apple Communications Card@l and several other popular serial interface cards. Data Capture 4.0 is the only Apple II@ smart terminal program available which is fully copyable and modifiable. This means that you don't have to worry about backup. Go ahead and make all the backup copies you need. The unprotected format and helpful documentation make modifications to Data Capture 4.0 very easy to perform. In addition, full technical support is available by phone from Southeastern Software. Data Capture 4.0 has many other .features. Incoming data files are automatically captured regardless of length. Data in the memory buffer can be viewed, edited, printed, saved to or loaded from disk, or transmitted to the remote system at any time. An unattended mode of operation is provided so that you can call your Apple from another location and send data to it or load data from it. Data Capture 4.0 is fully comoatible with the Apple III@ in

emulation mode. It is also compatible with all popular lower case adapters for the Apple Ii@>, including the widely used shift key modification. An automatic logon utility for use with the SOURCE is provided with Data Capture 4.0. Also included is a HELP text file containing the latest tips and suggestions on using Data Capture 4.0 effectively (many ofthese are the result offeedback from customers). See your local Apple dealer today for a demonstration of Data Capture 4.0 or order direct from Southeastern Software at the address below. (Please include $2.50 for postage and handling.) If you presently own a previous version of Data Capture you may upgrade to the new version for the difference in price plus $2.50 for postage and handling. MASTER CARD or VISA orders may be placed by phone. DATA CAPTURE 4.0 ...... $65.00 Requires DISK Ii@>, Applesoft Ij@ and 48K of Memory DATA CAPTURE 4.0 180· ...... $90.00 DATA CAPTURE 4.0© 1980-Southeastem Software ·Specify either Videx, Smarterm, Double Vision or -Apple'S. Apple II Plus"!'. Disk I~ and APPLESOFT II' are trademarks of Apple 'Sup 'R' Terminal version Computer Company. SOURCE - Source Telecomputing Corporation. - Dealer Inquiries Invited- -Micromodem'" is a trademark of D.C. Hayes ASSOCiates. Inc.

Apple Pugetsound Program Library Exchange Page 0048 of 0102 Call-A.P.P.L.E. Magazine • May 1982

RANDOM ADVENTURES

1 192 : A2 FE 1 17 LOX # $ FE 1194: B5 54 118 MUL3 LOA XTNO+2, X ADD MPLCND (AUX) 1 196 : 75 56 1 19 AOC AUX+2,X TO PARTIAL PROD 1198: 95 54 120 STA XTND+2 I X (XTND) 1 1 9A : E8 121 INX 119B: DO F7 122 BNE MUL3 1190 : A2 03 123 MUL4 LOX # $ 03 119F: 76 124 MUL5 HEX 76 1 1 AO : 50 125 HEX 50 11 A 1 : CA 126 DEX 1 1 A2 : 10 F8 127 BPL MUL5 11 A4 : 88 128 DEY 11 A5 : DO E5 129 BNE MUL2 11 A 7 : 60 130 RTS 1 1 AS : EA 131 START NOP --End assembly--

425 by t es Errors: 0

:A~M -**-**-**--**********-*****-**** 135 * * 136 * Listing #2 * 137 * 138 * Distribution Test *- 139 * * 140 * David G. Sp arks * 141 * * 142 * Call -A.P.P.L.E. : May, 1982 143 * *- 144 * *******-**-***-*****************- 146 11 147 HGR EOU $F3D8 148 HPLOT EaU SF 457 149 HL IN EaU SF53A 150 SETHCOL EaU SF 6EC 151 * 1 S2 11 153 lie 1 1 A9 : A2 00 154 INIT LDX ISO 11 AB : 1..9 9F 155 LDA U9F iLO\olEST Y-COORD. 1 1 AD: 90 10 10 156 FILBUF STA 8UF,X iSTORE IN ARRAY l1BO: £8 157 INX 1 181 : DO FA 158 BNE FILBUF l1B3: A2 17 159 LDX IS17 iCOMPETE ABOVE 1 185 : 90 10 11 160 F ILBUFl STA BUF+Sl00,X l1B8: CA 161 DEX 1 1 B9 : 10 FA 162 BPL FILBUF2 l1BB: 10 08 F3 163 JSR HGR 1 1 BE : A2 03 164 LOX IS03 iCOLOR=WHITE l1CO: 20 EC F6 165 JSR SETHCOL 1 1 C3 : 20 35 11 166 JSR INITRNO ; INITIALIZE RNOGEN llC6: A9 60 167 LOA IS60 11 C8 : 80 07 10 168 STA CTR llCB: A9 60 169 LDA 1$60 iOO 28000 TIMES 1 1 CD: 80 08 10 170 STA CTR+l 1100: 1..9 18 17 1 LOA 1$ 18 1 102 : 80 09 10 172 STA RANGE iSET UP RANGE llD5: A9 01 173 LDA 1$01 ;OF 0 TO 279 1107: 80 OA 10 1 ? 4 STA RANGE+l 11 DA: A2 00 175 LDX ISO 1 1 DC: 20 53 11 176 MAIN JSR RNDGEN iGET RANDOM INTEGER l1DF: A5 52 1? 7 LDA XTNO 1 1 E 1 : 18 178 CLC ; COMPUTE ARRAY LOCATION llE2: 69 10 1? 9 ADC IBUF 1 1 E4 : 80 FB 11 180 STA IND 1 +1 ; MOD I FY PROGRAM llE7: 8D 00 1Z 181 STA IND2+1 iBELO'W 1 1 EA : 80 03 12 182 STA CONTNU+l l1EO: A5 53 183 LDA XTND+l 1 1 EF : 69 10 184 AOC It/BUF 11 F 1 : 8D FC 11 185 STA IND1+Z 11 F4 : 8D 01 12 186 STA INDZ +2

Call -A.P'p.LE. May 1982 45 • Apple Pugetsound Program Library Exchange I Page 0049 of 0102 Call-A.P.P.L.E. Magazine • May 1982

RANDOM ADVENTURES IlF7: 8D 04 12 187 STA CONTNU+2 11 FA : CE 109 11 188 IN01 DEC INIT liFO: 00 03 189 BNE CONTNU 1 1 FF : EE 109 11 190 IN02 INC INIT 1202: AD 109 11 19 1 CONTNU LDA INIT 1205 : A6 52 192 LOX XTND SET UP 1207: 104 53 193 LDY XTNO+1 PLOT OF 1209 : 20 57 F4 194 JSR HPLOT DOT 120C: AD 07 10 195 LDA CTR 12 OF : 00 08 196 BNE DECTR iLOOP 12 11 : AD 08 10 197 LDA CTR+1 iROUTINE 1214 : FO 09 198 BEG OUT 1216 : CE 08 10 199 DEC CTR+l 1219: CE 07 10 200 DECTR DEC CTR 121C: 38 201 SEC iT\IlO-STEP RELO- 1210 : BO BO 202 BCS MAIN iCATABLE JUMP 121F: 102 00 203 OUT LDX ISO 1221 : 20 EC F6 204 JSR SETHCOL iCOLOR=BLACK 1224: 100 00 205 LDY 1$0 iDRA\Il A LINE 1226 : 109 3B 206 LOA 1$ 3B i 100 DOTS ABOVE 1228: 20 57 F4 207 JSR HPLOT i BASE OF 12 2B : 100 38 208 LOY '* $ 3B iDISPLAY 1220: 102 01 209 LDX 1$ 01 122F: A9 17 210 LOA 1$17 1231: 20 310 F5 211 JSR HLIN 1234: 60 212 RTS --End assembly-- 565 by t es Errors: 0

:ASM 11~*11*~11~~11~*11~1111***~1111**11*111111111111 135 11 11 136 11 Listing .3 11 137 11 11 138 11 "Black Hole" 11 139 11 11 140 11 David G. Sp arks * 141 lie * 142 11 Call -A.P.P.L.E. : May, 1982 11 143 11 111 lIl1e*1I~*1II~*1II**1II~***1I11~1I11~1I~~1I11*1I11* 145 111 146 HGR EGU SF3E2 147 HPLOT EGU SF 457 148 BKGND EGU SF3F6 149 HPOSN EaU SF 411 150 SETHCOL EaU $F6EC 151 HLIN EaU SF53A 152 11 11 A 9 : 4C AC 11 153 JMP TIPTOP iSKIP TO PROGRAM START 154 111 155 11 11 AC 20 35 11 156 TIPTOP JSR INITRND iINITIALIZE RNDGEN 1 1 AF 20 E2 F3 157 JSR HGR iAND HI-RES I1B2 A2 03 15 B LDX IS 03 iSET \IlHITE 1 1 B4 20 EC F6 159 JSR SETHCOL I1B7 A9 00 160 LDA 1$ 00 iPLOT A 1 1Ej9 AA 161 TAX iPOINT IN I1BA AB 162 TAY iUPPER 1 1 BB 20 57 F4 163 JSR HPLOT iLEFT THEN 11 BE 20 F6 F3 164 JSR BKGND iFILL SCRN 165 11 llCl 102 00 166 LDX 1$ 00 iSET BLACK 1 1 C3 20 EC F6 167 JSR SETHCOL l1C6 20 E2 11 16 B POSN JSR GETXY iPLOT A DOT 1 1 C9 AE 03 10 169 LOX XLO iAT A RANDOM 11 CC AC 04 10 170 LDY XHI iLOCATION 11 CF 20 11 F4 171 JSR HPOSN 11 D2 20 £2 11 172 JSR GETXY iTHEN GET 1 105 A8 173 TAY i RANDOM COORDS. 1106 AD 03 10 174 LDA XLO iFOR A BLACK 1 109 AE 04 10 175 LOX XHI iLINE. 11 DC 20 310 F5 176 JSR HLIN 1 10F 4C C6 11 177 JMP POSN iINFINITE LOOP 178 11

46 Call -A.P.P.LE. May 1982 • Apple Pugetsound Program Library Exchange I Page 0050 of 0102 Call-A.P.P.L.E. Magazine • May 1982 DOR'! BLOW YOUR BUm OR Locked-Up Software! Beagle Bros Apple Utilities are Listable, Baclcup-able, Customizable and Compatible 'With Normal Apple DOS.

:='r.carry Most Apple Dealers Apple our software. If your dealer doesn't. get on his case. He can have our dlsks In his store for you "'1alJI ... day •• Dr. If you want. you can Mechanic order directly from us. caIl our Toll Free Number (below) Shape Writer/Byte-Zap Utility or drop us a note with a check by Bert Kersey or your VIs&/MasterCard Another bot multiple-utility disk with nine useful, Listable, copyable and custom1z&ble programs­ number (J date. ShaDe WriMr: Put professional hJ-res anima­ tion [h your programs! From the k.eyboan::l, draw NOW WILL YOU MARRY ME. &f\}'th1n.g, then let your A.pple write the shape table VICKY? NOW THAT lYE ~~": !~nS=~al~~ac=TIw.:h~~~ GOT MY OWN BEAGLE BROS programs show how to 11M abape u.bIea for ani­ PEEKS. POKES CHART? mating your own games. graphic displ8¥S and ~ .-&> ....pha. If you are lnto gra· phics. th1s valuable utll1ty/ lea.rnlng tool is for you. Bonuses With ~~ ~'~u:t~~i:Yo:,vn;:~~g;; inBpection. _. _ or uc1t d1a~ op- Every-Diskl tional. Exam1ne bytes via cursor control; enter hex. Poke your Apple &II night decimal or ascii to ch..a.nge. Useful for creating illegal ftlena.mes. restorlng deleted rues, changing long with this free .~II(jl~', greet.lng program names. repa.irlng or protectlng handy U" x 17" .. dlBks. maklng OOS changes. and examtntng program rues. Clear instructions show how Apple reference poster! disk data is stored and how to access it, The most useable DID, ao.ub City: A useful cellection of sounds. text and hi-res triCks tor 11M in your procrama. PODS, PODI!IU and 'too: Demo-writing programs, more hi-res CALLS, scrounged up from educational documentat1on .. utilitVCitv every source imagina.ble! h-~:;':;P.' on. but this ad space is __lvel 81 DAn" --. dlBk (48K min_ ) Vaefal1Jt~tf. on~~~ Apple tip Bookl 100- o Bea&le Bros App" Tip _ '11 KerHy .....-. __ •• , D_.... _&> ...tmeroChart by Bert 21 versatile utilltles you can list. customlze and Each dlsk comee with a gold mine of valuable Apple back·up: LIR __ makes properI,y epaced inform&tion and hours 9f enterta.1n1ng reading m&tter, and Indented lIBtlnSB with prlnl.er Pa&e breaks; each st.a.tementon a new line with jf·t.hBn's' and Including dozens of tips and keyboard experlmimts on &II loope called out; a great. de-buggerl ~ III 8ubjects- DOS, Copy Protection, GraphJcs, Shape Tables, malUpIe-_ and any Pa&e-_ to printer Hardware &Ild more. Sample progr&ID8 too such as Tip Disk #1 or screen. Automatlca.llY poet Run-nwnber and. last-used Date In yrur progre.ms. Put 1Iwia1l1\e "Programming the Reset Key" &Ild "Copy Stoppers". by Bert Kersey -1DDlDC __ In your I18t1ngS. Acoese !;,rogram llnee In memory for garbage repair and Each dlsk comes with Its own ~I~ f::~!:f~!r:~~f.~:z~r!'J 'Illegal" all.eratlOn. QulakI,y alphalJetlze and etore unique book. info on disk. Run any program while another er.a.ys ~~:rPd~O~! ~!~'-g'ro11~do~:~t:' lntact. IIenwnber to 66638. Save Inv.rse. trick and copyab1e and changeable, and each ,teaches another bIVlatll\e file __ Convert. decimal to hex (I fact about mak1ng your Apple do Its thing. bln&ry. or INT to FP. Append. programs. Dump text ecreen to More too; 81 ...... -_ 'ao~O 8=~~n&>dlB~=.o&:~) o VWlt7 cmy on dlBk (48K o Beagl. Bros An" TiP _ "'IS • ISO SHIPPING .ate,.o Tip !look with Tip Dlak 0_. __ &> ...tmero Chart

£ll~~~ty ' "~~.. 1BY~M!.!n~.""""~~~~.rI. by Bert Keney 6' JackC&laldy _ llUSH! The disk paclr __ IUld Reverse (opposite of backgroWld)_ Circles. Box... and !illpees. nlled or outlined. 8cruncher II ADDU= . . _ Jal-_lIll/ll .u...... 8h11t.er redraws any porUon ofyour p1cture on either hl-res screen. ~I Cl'1'n= . ~~ra!.,-=-U:~=lhJ-reetolo- ~I Z1N ~

Hi·.. ~I BeautJfuJ _ &> Iower_ wtth deeoonders (no hardw..... required). Color or reverse charaotars poslUonabl. &l\YWhere (no vt&b/htab restriction). Profes81onaJ-looklng 11l3:l~- ii I Ma.Il u.s. checlt, money order or VIB&/l4C 1lD8. =~. ~r~dt~~ ~e~ ::1 to: BaAaU:aJI08, Dept.. spactng). )(ul~naI t,yplng too for Chartsl "IS aun-a ViRa 4318 Sierra VtRa, Ban Diego, ca 98103 I ... DS$, ca ..lOS 714-896...00 I All Orden Shipped Imm~ "APPLE" is a reglStered trade mark of Apple Computer Inc. "BEAGLE BROS" belongs to us I :1nea:..:: ~f~ ~~~"":.~~~~ Apple Pugetsound Program Library Exchange Page 0051 of 0102 Call-A.P.P.L.E. Magazine • May 1982

Apple Apple II II Quality Disk Software from SPECTRUM

PERSONAL FINANCE MASTER: UNIVERSAL BUSINESS MACHINE: MATHEMATICS SERIES: The premier personal and small business financial An electronic spread sheet structured around a 100 Entire Serlel $49.95 system. Covering all types of accounts including row x 20 column table. User defines row and STATISTICAL ANALYSIS I: This menu driven program check registers, savings, money market, loan, credit column names and equations forming a unique performs LINEAR REGRESSION analysis, determines card and other asset or liability accounts, the system template. Table elements can be multiplied, added, the mean, standard deviation and plots the fre­ has these features: subtracted, divided, summed, averaged and accum­ quency distribution of user-supplied data sets. Prin­ Monthly Transaction Reports ulated. Hundreds of unique templates can be created, ter, Disk, I/O routines. Budgets Income & Expense used, stored and recalled for later use. Supplied with ...... $19.95 Reconciles to Bank Statements 8 standard templates ready for use covering these Pr1nts Checks & Mailing Labels subjects. NUMERICAL ANALYSIS: HI·RES 2-Di mensional plot of Automatic Year-End Rollover Cash Flow AnalysiS any function. Automatic scaling. At your option, the Prepares a Net Worth Report Proforma Profit & Loss program will plot the function, plot the INTEGRAL Searches for Transactions Proforma Balance Sheet plot the DERIVATIVE. determine the ROOTS. MAXIMA, Handles Split Transactions Real Estate Investment MINIMA. INTEGRAL VALUE ...... $19.95 User-Friendly Data Entry Forms Sales Forecaster Fast Machine Language Routines Source and Use of Funds MATRIX: A general purpose, menu driven program Extensive Error Trapping Job Cost Estimator for determining the INVERSE and DETERMINANT of HI·RES Expense/Income Plots Inventory Analysis any matrix, as well as the SOLUTION to any set of For Apple ,; (48K) ...... $74.95 Price (Apple II, 48K) ...... $89.95 SIMULTANEOUS LINEAR EQUATIONS ...... $19.95 COLOR CALENDAR: $29.95 ~D SUFAACE PLOTTER: Explore the ELEGANCE and ELECTRONICS SERIES VOL I & II: BEAUTY of MATHEMATICS by creating HI·RES PLOTS of Got a busy calendar? Organize it with Color Calendar. 3-dimensional surfaces from any 3-variable equa­ Whether it's birthdays, appointments, business Entire Series $259.95 tion. Disk save and recall routines for plots. Menu meetings or a regular office schedule, this program LOGIC SIMULATOR: SAVE TIME AND MONEY. Simulate driven to vary surface parameters. Hidden line or is the perfect way to schedule your activities. your digital logic circuits before you build them. transparent plotting ...... $19.95 The calendar display is a beautiful HI·RES color CMOS. TTL. or whatever, if it's digital logic, this graphics calendar of the selected month with each program can handle it. The program is an inter· ACTION ADVENTURE GAMES: scheduled day highlighted in color. Using the daily active, menu driven, full·fledged logic simulator schedule, you can review any day of the month and capable of simulating the bit-time response of a Entire Series $29.95 schedule an event or activity in anyone of 20 time logic network to user-specified input patterns. It RED BARON: Can you outfly the RED BARON? This fast slots from 8:00 A.M. to 5:30 P.M. will handle up to 1000 gates, including NANOS, NORS, action game simulates a machine-gun DOGFIGHT INVERTERS, FLlp·FLOPS, SHIFT REGISTERS. COUNTERS between your WORLD WAR I BI·PLANE and the baron's. BUSINESS SOFTWARE: up to 20 user·defined random, or binary input You can LOOP, DIVE. BANK or CLIMB-and so can the patterns. Accepts network descriptions from BARON. In HI·RES graphics plus sound ..... $14.95 Both Programs $249.95 keyboard or from LOGIC DESIGNER for simulation A user·friendly yet comprehensive double-entry ac­ (48K) ...... $159.95 BATTLE OF MIDWAY: You are in command of the U.S.s. counting system employing screen·oriented data HORNETS' DlVE·BOMBER squadron. Your targets are input forms, extensive error·trapping, data valida­ LOGIC DESIGNER: interactive HI· RES graphics program the Aircraft carriers, Akagi, Soryu and Kaga. You tion and machine language routines for high speed for designing digital logic systems. Draw directly on must fly your way through ZEROS and AA ARE to operation. The series includes these two modules: the screen up to 10 different gate types, including make your DlVE·BOMB run. In HI-RES graphics plus GENERAL LEDGER: A complete accounting system NAND, NOR. INVERTER. EX·OR, T·FLOP, JK·FLOP, D·FLOP, sound ...... $14.95 with these features: RS-FLOP. 4 BIT COUNTER and N·BIT SHIFT REGISTER. • Up to 500 accounts and 500 transactions per User interconnects gates using line graphics com· SUB ATTACK: It's April 1943. The enemy convoy is month. mands. Network descriptions for LOGIC SIMULATOR headed for the CONTROL SEA. Your sub, the MORAY. • Extensive check register management system generated simultaneously with the CRT diagram has just sighted the CARRIERS and BATTLESHIPS'. Easy pickings. But watch out for the DESTROYERS - (similar to our PFM). being drawn ...... $159.95 • Prints checks and mailing labels. they're fast and deadly. In HI-RES graphics plus • Produces these reports: MANUAL AND DEMO DISK: Instruction Manual and sound...... $14.95 demo disk illustrating capabilities of both pro- Transactions Journal FREE CATALOG-All programs are supplied on disk Account Ledgers grams) ...... $29.95 and run on Apple II w/Disk & Applesoft ROM Card Income Statement ELECTRONIC SERIES VOL III & IV: and require 32K RAM unless otherwise noted. De­ Balance Sheet tailed instructions included. Orders shipped within Account Listings Entire Series $259.95 5 days. Card users include card flIlmber. Add $2.00 Requires Apple II, 48K RAM, CIRCUIT SIMULATOR: Tired of trial & error circuit postage and handling with each order. California 1 disk drive ...... $149.95 design? Simulate & debug your designs before you residents add 6'/'% sales tax. Foreign orders add build them! With CIRCUIT SIMULATOR you build a $5.00 postage and handling per product. ACCOUNTS RECEIVABLE: A flexible system with model of your circuit using RESISTORS. CAPACITORS. these features: INDUCTORS. TRANSISTORS. DIODES. VOLTAGE and CUR· • Up to 500 accounts and up to 500 invoices per RENT SOURCES and simulate the waveform res­ dtskette. ponse to inputs such as PULSES, SINUSOIDS. SAW· • Prints invoices and customer statements & TOOTHS. etc ... all fully programmable. The output is ~SPECTRUM address labels. displayed as an OSCILLOSCOPE·STYLE PLOT of the • Interfaces to General Ledger. selected waveforms or as a printed table of voltage • Interactive screen-based invoice work sheet. vs time. Handles up to 50 nodes and 100 components. ~~g,~T~~~~ • Produces these reports: Requires 48 RAM ...... $159.95 Sunnyvale, CA 94087 Aged Receivables Sales Analysis CIRCUIT DESIGNER: Interactive HI·RES graphics pro­ Customer Listings gram for designing electronic circuits. Draw directly Invoice Search on the screen up to 10 different component types, FOR PHONE ORDERS: Requires Apple II, 48K RAM, including those referenced above. Component inter­ connect list for CIRCUIT SIMULATOR generated auto- (408) 738-4387 2 disk drives ...... $149.95 VISA Both Programs ...... $249.95 matically, Requires 48K RAM ...... $159.95 •- DEALER INQUIRIES INVITED. Apple Pugetsound Program Library Exchange Page 0052 of 0102 Call-A.P.P.L.E. Magazine • May 1982 RANDOM ADVENTURES llE2: A9 16 179 CETXV LDA #$16 jSET RANCE 1 1 E4 : 80 09 10 180 STA RANCE j= 0-279 l1E7: A9 01 181 LOA 1$01 11 E9 : 80 OA 10 182 STA RANCE+1 l1EC: 20 53 11 183 JSR RNDCEN jRANDOM X-COORD. 1 1 EF : AS 52 184 LDA XTND 11 F 1 : 80 03 10 185 STA XLO 1 1 F4 : AS 53 186 LDA XTND+1 IIF6: 80 04 10 187 STA XHI 1 1 F9 : A9 9F 188 LDA 1$9F jSET RANCE I1FB: 8D 09 10 189 STA RANCE ,- 0-159 liFE: A9 00 190 LDA .. $ 00 1200: 8D OA 10 19 1 STA RANCE+l 1203 : 20 53 11 192 JSR RNDCEN jRANDOM V-COORD. 1206: A5 52 193 LDA XTND 1208 : 60 194 RTS jACC = V

--End assembly-- r Now Available to 521 by t es BIG MAC owners Errors: 0 BIG MAC.XREF 57. 50

] Listing 2-A If you have ordered a BIG 5 REM MAC.LC UPDATE, it will be included at no extra charge. Dist. Test lie David C. Sparks BIG MAC.XREF prints a complete Call -A. P . P . L . E. : May, 1982 symbol cross reference, showing the line in which the label isdefinedandali 10 DIM V(279) lines in which it is referenced. 20 FOR X = 0 TO 279:V(X) = 160:NEXT BIG MAC.XREF will be included on both versions of BIG MAC shipped 30 HCR after May 1, 1982. 40 X = RND ( - PEEK ( 78) - PEEK ( 79) lie 256) 45 HCOLOR= 3 A.P.P.L.E. Orders 47 FOR Z = 1 TO 28000 304 Main Ave. S., Suite 300 50 X = RND ( 1 ) lie 280 Renton, WA 98055 60 HPLOT X, V (X) (206) 271-4514 70 V(X) Y(X) = - 1 Shipping wI. 2.0 oz. 80 NEXT A.P.P.l.E. Members Only 90 HCOLOR: 0 100 HPLOT 0,60 TO 279 , 60 110 END Washington state residents add 6.6% sales tax. All foreign orders (inel. Canada) will require additional postage and shipping.

] listing 3-A DOUBLE your DISKETTES The only reasons your APPLE II cannot use the back side of 5 REM your diskette are: 1. There is no notch. Black Hole lie David C. Sparks 2. The diskette manufacturer either did not test the back side, or worse, put the flawed side to the back. C & 1 1 -A. P . P . L . E. : Ma y, 1 9 82 A pair of diagonal cutters will solve problem number 1. 10 HCR DISK PREP 20 HCOLOR= 3 will solve problem number 2. 30 HPLOT 0,0 DISK PREP formats and tests your disk. Sectors with flaws 40 CALL - 3082 are left so they cannot be used. Your disk is left ready to 50 HCOLOR: a boot, complete with a flaw report program saved on it. 60 x = RND (- PEEK (78) PEEK $25.00 (79) lie 256) sympathetic software 70 HPLOT RND (1) lie 280, RND (1) 9531 Telhan Drive lie 160 TO RND (1) * 280, RND Huntington Beach, Ca. 92646 (1) lie 160 DOS 3.3 and DOS 3.2.1 80 COTO 70 California residents add $1.50 tax.

Call -A.P.P.LE. May 1982 49 Apple Pugetsound Program Library Exchange I Page 0053 of 0102 Call-A.P.P.L.E. Magazine • May 1982 RANDOM ADVENTURES :ASM ~**~**~**~*****~*******~*******~ 135 lit lIr 136 ~ Listing .4 ~ 137 lit lIr 138 ~ Poker Test ~ 139 lit ~ 140 ~ David G. Sparks "/( 141 lit lIr 142 "/( Call -A.P.P.L.E. May, 1982 111 143 lIr lIr ~*111~**111**111*111**111"/(*******111*****111** 145 * 146 "/( 147 lIr 11 A 9 A2 07 148 SAVER LDX .$07 iSAVE 7 1 1 AS B5 4F 149 LDA $ 4 F, X i BYTES ON 11 AD 9D 15 10 150 STA ZSAV-l,X iZERO PAGE 1 1 BO CA 151 DEX iTHAT CONFLICT 1181 DO F8 152 8NE SAVER+2 itJITH APPLESOFT 153 11 1183: 20 35 11 15 '-I JSR INITRND i INITIALIZE RNDGEN 1 1 B6 : A9 OA 155 LDA .. $ OA 118S: SO 09 10 156 STA RANGE iSET RANGE TO 1 1 BS : A9 00 157 LDA 1$00 iBETW'EEN 0 118D: SD OA 10 158 STA RANGE+l ;AND 9 11 CO : lS 159 CLC llCl: AS 6B 160 LDA H8 JGET ARRAY POINTER 11 C3 : 69 07 1 6 1 ADC 1$07 i INCREMENT l1C5: 8D 2C 12 162 STA SCORE+1 i MODI FY PROGRAM 1 1 CS : SO 32 12 163 STA SCORE+7 iTO POINT AT l1CB: AS 6C 164 LOA HC iFIRST BYT£ l1CD: 69 00 165 ADC 1 $ 00 ;OF ARRAY l1CF: SD 20 12 166 STA SCORE+2 1 1 D2 : SO 33 12 167 STA SCORE+S 11 D5 : A9 05 168 STLOOP LDA 1$05 1 107 : SO 05 10 169 STA PTR ;SET UP DEAL OF 5 IlDA: 20 53 11 170 LOOP JSR RNDGEN iRANDOM DIGITS 1 1 DD : AE 05 10 171 LOX PTR l1EO: AS 52 172 LDA XTND ieET DIGIT 1 1 £ 2 : 90 OA 10 173 STA DEAL-l,X iAND PARK IT llE5: CE 05 10 174 DEC PTR 1 1 ES : DO FO 175 BNE LOOP l1EA: A9 04 176 LDA 1$04 iSET UP SORT 1 1 £C : SO 05 10 177 STA PTR 11 E F : AO 01 178 SORT LDY 1$01 1 1 F 1 : 89 OB 10 179 SORTl LDA DEAL,V IlF4: D9 OA 10 180 CMP DEAL-l,Y 1 1 F7 : BO OB 181 BGE NXSORT 11F9: 48 182 PHA 11 FA : B9 OA 10 183 LOA DEAL-l,V I1FD: 99 OB 10 184 STA DEAL,Y 1200: 68 185 PLA 1201: 99 OA 10 186 STA DEAL-1,Y 1204 : C8 lS7 NXSORT INY iORDINARY BUBBLE SORT 1205: CC 05 10 188 CPY PTR 1208 : 90 E7 189 BCC SORTl 120A: FO E5 190 BEQ SORTl 12 OC : CE 05 10 191 DEC PTR 120F: DO DE 192 BNE SORT 1 211 : A2 04 193 LDX 1$04 ; SET UP TEST 1213: A9 00 19 '-I LDA 1$00 1215 : 48 195 PHA 1216: BD OB 10 196 TEST LDA DEAL,X 1219: DO OA 10 197 CMP DEAL-1,X 121C: DO 05 198 BNE NXTEST 121E: 68 199 PLA i I F A PA IR, 121F: ID 51 12 200 ORA B ITS- 1, X iSET BIT RELATIVE TO LOCATION 1222 : 48 201 PHA 1223: CA 202 NXTEST DEX 1224: DO FO 203 BNE TEST 1226: 68 204 PLA NOW' USE RESULT 1227 : A8 205 TAY OF TEST TO CET 122S: BE 56 12 206 LOX BYTES,Y ARRAY OFFSET 1228 : FE 2B 12 207 SCORE INC SCORE,X FINALLY! 122E: DO 04 208 BNE LOOPDN

50 Call -A.P.P.l.E. May 1982 • Apple Pugetsound Program Library Exchange I Page 0054 of 0102 Call-A.P.P.L.E. Magazine • May 1982

THE APPLE SPELLER fills the void The Apple Speller has built-in utilities either mispelled words or all the that has consistently kept the large to maintain the dictionary diskette. words in your document along with variety of excellent word processing You can readily add words, delete usage frequencies, multiple options packages for the Apple II Computer words, and create an unlimited num­ for the action taken with each from approaching the power of a ber of modified and/or new diction­ misspelled word, and much, much dedicated work processor. Finally, aries for specific application. more! A verification mode is pro­ the first professional quality spelling The Apple Speller is unbelievably vided to allow you to examine and verification program is available for fast. The first pass reads your docu­ dispense with misspelled words the Apple II. The Apple SpelJer will ment and collects all the words it while viewing them in the actual certainly be the standard against contains at a rate of 5,000 words context in which they appeared in which all other similar programs are per minute. Next, the words are your file. compared. compared to the dictionary for spell· The Apple Speller requires an The Apple Speller interfaces to the ing errors at the incredible speed of Apple II/Apple II + equipped with 48K, most popular Apple word processors, 50,000 words per minute. Finally, all DOS 3.3, and 1 or 2 disk drives. Two including Applewriter, Apple Pie, misspelled words are marked as disk drives are required to delete or Executive Secretary, Letter Perfect, such in your document with a rate add words to the dictionary. Magic Window, and Superscribe II, of 1,000 words per minute. This The Apple Speller is being intro· just to name a few. In fact, The Apple translates to proofreading a 10 page duced at the incredible price of Speller can analyze the output of any document in 1 minute if there are no $75.00! editor that writes a standard Apple spelling mistakes and 2 minutes, 15 binary or text file to a diskette. In seconds for an unlimited number of addition to this flexibility, the per­ spelling errors. m formance of The Apple Speller will Numerous options are provided Sensible Software astound the microcomputer world. throughout the program to enable 6619 Perham Drive Dept. C The Apple Speller is supplied with you to completely control all activi­ West Bloomfield, Michigan 4~033 a 30,000 + word dictionary on a ties of The Apple Speller. These (313) 399·8877 single 5%" diskette with additional include the ability to ignore both Visa and Mastercard Welcome Please add $1.25 postage and space to easily add another 8,000 control codes and formatting com­ handling per diskette words to suit your individual needs. mands, an alphabetical listing of Please specify program desired APPLE is a registered trademark of APPLE Computer Company Registered Trademark 01 DtGITAL RESEARCH CORP Registered Trademark of MUSE SOFTWARE

Apple Pugetsound Program Library Exchange Page 0055 of 0102 Call-A.P.P.L.E. Magazine • May 1982

WHY DO UNNECESSARY SURGERY ON YOUR ApPLE?

ooner or later, you're going to need a 16K board available - the Ramex 16. And do Smemory-expansion for your Apple. When you it without unnecessary surgery on your Apple. do, we suggest you buy it on the card that doesn't require poking about on the motherboard - nor n spite of its quality, the Ramex 16 costs less removing a RAM chip, installing a strap, etc. I than most other expansion boards - just $139.95. And it comes with a one year limited The Ramex 16™RAM Board just plugs in. It's warranty, instead of the usual 90 days . .1 simple, reliable, and does its own memory refresh, with no additional connections. et the Ramex 16 from your local dealer, Gor order direct. Visa and Mastercard un Pascal, Fortran, FP, !NT and holders call toll-free, 1-800-835-2246. Rother alternate languages, 56K CPM with a ZSO Softcard, increase usable memory for Visicalc by 16K. 0'\Nw The possibilities are endless. Do OMEGA M1CROWARE, INC. 222 So. RIVERSIDE PLAZA it with the finest, dosed-track CHICAGO, IL 60606 engraved, epoxy sealed, 16K 312-648·4844

Apple and Applesofr. aCf registered trademarks of Apple Computer, Inc. Pas,cal is a, r~gisl~red Ira~emark of the Refents of ~Look,ma, ~e~;~n~ ~~~~r~I~~M '~~C%~~':r~1t~~d:!!~kd~fDi~~ no straps! Research. Inc_ Z80 is a registered trademark of Zilos, Inc Softcard is a registered trademark of Microsoft AND~~~~~~ WHY YOU NEED THE MANAGER.

f you've invested money in one or more disk-drive emulator that gives you instantaneous I Apple memory-expansion cards, The Manager access to a large "disk" file for incredibly fast will make them work for you, sorts, searches and calculations. The Manager will set up a complete turnkey In short, The Manager makes using memory- .l memory management system for you, usinK expansion cards for your Apple into a simple, either one or two 16K cards (induding your old no-hassle pleasure. Available at your local dealer firmware card- no need to sell it for a song). or direct for an introductory price of just $34,95, The Manager's first utility, moos;rM will hand If you have not yet invested in a 16K card, but .1 you back 10. 5K of your Apple's memory are thinking about it, may we suggest the space by loading oos onto a RAM card at boot. Ramex 16!M Even though the Ramex 16 is top moos will automatically load an alternate quality, its low price ($139.95) will save you language onto an available 16K card. And it will more than enough to get The Manager, too! amend a copy of your System Master so that Mastercard and Visa holders order toll-free, the utilities (FID, RENUMBER, etc.) make 1-800-835-2246, full use of the extra available memory. 0'\Nw The Manager's second utility, OMEGA M1CROWARE, I~ .1 souoos;rM will turn a 222 so. RIVERSIDE PLAZA 16K card into a 45-sector ....'-:::::::::::::::::::::::::======:::::::~ CHICAGO, IL 60606 312-648-4844

Apple Pugetsound Program Library Exchange Page 0056 of 0102 Call-A.P.P.L.E. Magazine • May 1982

RANDOM ADVENTURES 1230 : CA 209 DEX jBACK\JAROS REACH 1231: FE 2B 12 210 INC SCORE,X jFOR HIGH BYTE 1234 : AD 07 10 211 LOOPON LOA CTR 1237: DO 08 212 BNE DECTR 1239 : AD 08 10 213 LOA CTR+1 123C: FO 09 214 BEQ EXIT 12 3E : CE 08 10 215 DEC CTR+l 1241: CE 07 10 216 DECTR DEC CTR 1244 : 38 217 SEC j RELOCATABLE 1245: BO 8E 218 BCS STLOOP jJUMP 1247 : AZ 07 219 EXIT LOX #$07 1249: BD 15 10 220 LOA ZSAV-1,X jRESTORE APPLESOFT'S 12 4C : 95 4F 221 STA $4F,X j ZERO-PAGE DATA 124E: CA 222 OEX 12 4F : DO F8 223 ENE EXIT+Z 1251: 60 224 RTS 225 1252 : 01 02 04 1255: 08 226 BITS HEX 01020408 1256 : 01 03 03 1259: 07 03 05 125C: 07 OB 227 BYTES HEX 010303070305070B 12 5E : 03 05 05 1261: 09 07 09 1264: OB 00 228 HEX 0305050907090BOO

--End assembly-- 614 bytes Errors: 0

:ASM w**w**w************************* 135 136 * Listing #5 * 137 138 RNO"'allcer 139 140 David G. Sparks 141 * * 142 * Call -A.P.P.L.E. : May, 1982 * 143 * 144 * * ***************************w**** * 146 11 147 HGR EQU $F3E2 148 HPLOT EaU $F457 149 SETHCOL Eau $F6EC 150 11 151 1 1 A9 : A2 00 152 *INIT LOX #$0 11 AB: A9 9F 153 LOA 1$9F jLO\JEST Y-COORO. 11 AD: 90 10 10 154 FILBUF STA BUF,X j PUT IN ALL IIBO: £8 155 INX j280 BYTES OF liB 1 : DO FA 156 BNE F I LBUF jBUFFER ARRAY. IIB3: A2 17 157 LOX 1$17 1 1 B5 : 90 10 11 158 F I LBUF2 STA BUF+$100,X iCONTINUE ABOVE I1B8: CA 159 DEX 1 1 B9 : 10 FA 160 BPL FILBUF2 I1BB: 20 EZ F3 161 JSR HGR ; INITIALIZE 1 1 BE : A2 03 162 LOX # $ 03 lICO: 20 EC F6 163 JSR SETHCOL j"'HITE DOTS 1 1 C3 : 20 35 11 164 JSR INITRND iINITIALIZE GENERATOR l1C6: A9 00 165 LOA 1$0 1 1 C8 : A2 Be 166 LOX # 140 iSTART IN MIDDLE 11 CA: AO 00 167 LOY 1$0 1 1 CC : 20 57 F4 168 JSR HPLOT iPUT A DOT AT TOP CENTER l1CF: AO 8C 169 \JALK LOY #280/2 iMIOOLE AGAIN 1101 : 8C 05 10 170 STY PTR 1104: A9 00 171 LOA ISO 1106: 80 06 10 172 STA PTR+l 1109 : 20 71 11 173 LOOP JSR RNONUM iALTERNATE ENTRY 11 DC: AD 10 10 174 LOA RND iPOINT TO GET SINGLE BYTE

Call -A.P.P.l.E. May 1982 53 Apple Pugetsound Program Library Exchange I Page 0057 of 0102 Call-A.P.P.L.E. Magazine • May 1982

RANDOM ADVENTURES 11 OF : 30 OA 175 BMI DECPTR iTEST BI T7 1 1 E 1 : EE 05 10 176 INC PTR iBIT 7 CLEAR HERE llE4: DO 10 177 BNE DECY 11 E6 : EE 06 10 178 INC PTR+1 iTAKES 2 BYTES TO llE9: DO OB 179 BNE DECY iCOVER ALL X-COORDS. 1 1 EB : AD 05 10 180 DECPTR LOA PTR l1EE: DO 03 181 BNE DECP2 1 1 FO : CE 06 10 182 DEC PTR+l iB IT 7 SET TO l1F3: CE 05 10 183 DECP2 DEC PTR iREACH HERE. 1 1 F 6 : 88 184 DECY DEY 11F7: DO EO 185 BNE LOOP iOO THIS 140 TIMES 11 F9 : 18 186 CLC l1FA: AD 05 10 187 LOA PTR i COMPUTE ADDRESS 1 1 FO : 69 10 188 AOC *BUF iWITHIN ARRAY 11FF: 80 10 12 189 STA UPTIK+1 i MOD I FY PROGRAM 1202 : 80 11 12 190 STA PLOTIK+1 iBELOW-- 1205: AD 06 10 19 1 LOA PTR+l 1208 : 69 10 192 ADC ./BUF 120A: 80 lE 12 193 STA UPTIK+2 1200 : 80 12 12 194 STA PLOTIK+2 1210: AD 03 80 195 PLOTIK LOA $8003 iDUMMY ADDRESS 1213 : AE 05 10 196 LOX PTR 1216 : AC 06 10 197 LOY PTR+l 1219: 20 57 F4 198 JSR HPLOT iPLOT DOT 121C: CE 03 80 199 UPTIK DEC $8003 iDUMMY ADDRESS, 200 iDEC SO NEXT PLOT 201 111* i IS ABOVE PREVIOUS ONE. 121 F : DO AE 202 BNE WALK iDO UNTIL A VARIABLE = 0 1221: 60 203 RTS --End assembly-- 546 bytes ] Listing 5-A Errors: 0 5 REM RNDwalker : Da.vid C. Spa.rks C a. 1 1 -A. P . P . L . E. : Ma. y, 1 982 10 HGR ] :Listing 4-A 20 X = RND (- PEEK (78) - PEEK (79) )1( 256) 5 REM 30 DIM Y(279) 40 FOR X = 0 TO Z79:Y(X) = 159: NEXT Poker Test \II David G. Sparks SO HCOLOR= 3 Call -A.P.P.L.E. : May, 1982 55 HPLOT 140,0 60 X .. 140 10 TEXT HOME 70 FOR Z = 1 TO 160:X = X + INT 20 A = 100 ( RND (1) lit 2) lit 2 - 1: NE XT 30 B ::: 1 40 DIM C"(6) 80 HP LOT X, Y (X) : Y ( X) = Y ( X) - 1 45 A = A - 1 90 IF Y(X) = 0 THEN END 50 POKE 4103,A - INT (A I 256) \II 100 GOTO 60 256 60 POKE 4104, INT (A I 256) 6S A = A + 1 70 PRINT "POKER TEST - "iAi" CAS ]LIST ES":. PR INT 80 CALL 4096 10 TEXT: HOME : COSUB 1000 90 FOR B = 0 TO 6 20 END 100 READ 1$ 1000 FOR 1= 38 TO 1 STEP - 1: FOR 110 PRINT XSi J = 1 TO 100: NEXT: HTAB I: 120 HTAB 22 PRINT "] "i: NEXT : HTAB 2: 130 PRINT C.. (B)i PR INT "HIT ANY KEY TO CONTI 140 HTAB 30 NUE->" i: GET AS: RETURN 150 PRINT C"(B) I A 63333 " 16 0 NEXT 63999 "So What Did You Elpeel 1 70 END 180 DATA ALL DIFFERENT,ONE PAIR, by Bill Sanders Sandy TWO PAIR,THREE OF A KIND,FUL Apple Press : San Diego, CA L HOUSE, FOUR OF A KIND,FIVE OF A KIND

54 Call -A.P.P.LE. May 1982 Apple Pugetsound Program Library Exchange I Page 0058 of 0102 Call-A.P.P.L.E. Magazine • May 1982

SOS Presents "The Professional" Series For the first time ever, three packages of other terminals. Ideal for screen­ encompassing all major Apple oriented editors or data bases. operating systems: • Fully unattended answer mode • ASCII Express "The Professional~'M features password only access and for Apple DOS error-free transfer of files, as well as • P-Term "The Professional~:'" for Apple standard ASCII transfer modes. Pascal • All packages support up to 1200 • Z-Term "The Professional~:' for Apple baud. Z-Term and ASCII Express CP/M support up to 4S00 baud when FORGET EVERYTHING YOU'VE EVER interrupt-driven. HEARD ABOUT COMMUNICATIONS • Greatly enhanced macro system SOFTWARE_ now includes programmable "hand SOS now offers three new shaking" macros - entire log-on communication packages like no sequences may be automatically others on the market today. These executed. Also, many internal packages are designed to operate program commands may be initiated alike, to look alike, and to be from macro control. Multiple macro completely conversive with each other. libraries may be stored for use with An operator familiar with anyone of a variety of hosts. these packages can easily operate the other two with minimal instruction. A NEW STANDARD OF EXCELLENCE Absolutely no other packages can "The Professional" series is so equal these outstanding features: innovative and superior to other packages in the field that it is truly in • All three packages are totally a class by itself. Our comparison chart conversive with each other. ANY gives a detailed point-by-point analysis type of file may be transferred of these and other communication completely error-free within these or packages. Write for it. You'll be compatible systems utilizing the convinced - when it comes to Christensen Protocol. communication software, SOS stands • Transfers may also include any alone. ASCII based dial-up host computer. These flexible transfer capabilities are made possible by a wide variety of send options unique to SOS software. 50S • Support of ALL Apple-compatible modems and ALL display systems southwesteRn including any SO-column board or external terminal; 40-column too. data sYstemsTM • Terminal emulation - allows your P.O. Box 5S2-C SO-column board or external terminal Santee, CA 92071 to "emulate" screen control codes 714-562-3670

CP/M is a trademark of Digital Research Apple is a trademark 01 Apple Computers, Inc Apple Pugetsound Program Library Exchange Page 0059 of 0102 Call-A.P.P.L.E. Magazine • May 1982

16K RAM EXPANSION BOARD FOR THE APPLE II * SI ZO.OO The Andromeda 16K RAM Expansion Board Now with One Year Warranty. allows your Apple to use RAM memory in place of the BASIC Language ROMs giving you up to 64K of programmable memory. Separate Applesoft* or Integer BASIC ROM cards are no longer needed. The 16K RAM Expansion Board works with the Microsoft Z-80 card, Vlsicalc. ~~~~919852-1482 P.O. Box 19144 DOS 3-3, Pascal, Fortran, Pilot, and other software. A sWitch on the card selects either Price for Andromeda J 6K RAM the RAM language or the mainboard ROMs expansion board now only $ J 20,00. when you reset your Apple. Please add $ 5 for shipping and The Andromeda 16K RAM Expansion handling. North Carolina residents Board has a proven record for reliability with add 4% sales tax. thousands of satisfied customers. == • *OEALER INOUIRIES WELCOME. Apple Pugetsound Program Library Exchange Page 0060 of 0102 Call-A.P.P.L.E. Magazine • May 1982

KEEP YOUR COOL

Harry E. Brawley, Jr./Art: Robert A. Kidder

ARRY'S Cooling System is a My solution is a simple one, a particularly hot when there's a lot of low-cost ($25), reliable small fan mounted inside the Apple memory access going on, such as dur­ (30,000 hours) way to extend which forces turbulent air across the ing number crunching. But IC's don't H the life of your Apple II com­ mother board to exhaust through the get hot evenly, the heat is produced puter. slots above the power supply. The at minute points on the small silicon Before I describe this system, let me limited "natural" convection in the chip at the heart of the device. As the give you some background. Apple is shown in Figure 1. Air paths complex assembly of plastic, silicon, Why a cooling system? Simple. It exist round the edges of the large bonding wires, metal pins, and gets too hot inside your Apple for motherboard, but there is no natural maybe a ceramic header, heats up, dependable operation, and you do ex­ flow across the board itself. How a these various materials expand, each pect it to run forever, don't you? fan can clear away stagnant air from by a amount. This "differential My reaction to Ken Silverman's both sides of the large circuit board is expansion" sets up strains in the article, "Don't Overload Your Apple illustrated in Figure 2. device, which can, over many cycles, II" (The Apple Orchard, Fall 1980) lead to cracks and fractures, causing was to call the Apple hotline. I asked PENALTIES FOR HIGH the integrated circuit to fail. whether power supply overload of TEMPERATURE OPERATION Another way IC's fail IS from the kind Ken discussed in his article Before I go into the details of how chemical activity caused by residual would cause serious reliability to obtain the parts and install my contamination remaining after the problems. cooling system, I'd like to show how manufacturing process. This process I was told that the Apple II power high operating temperatures contrib­ physically erodes the chip materials, supply has lots of design margin. It is, ute to circuit failures. ultimately causing failure. furthermore, protected by a thermal Semiconductor integrated circuits A more subtle failure mechanism cutout against gross overheating. (the black chips that make your is migration of the thin metal stripes The power supply module is also pro­ Apple work) dissipate heat when inside the RAM memory chips. tected against serious current power is applied. RAM chips get overloads; the affected voltage will simply go away, taking the other TABLE 1 three with it. In the event of cutout, the power supply won't come on INSTALLATION INSTR UCTIONS: HARRY'S COOLING SYSTEM again until either the temperature recedes to a safe level or the cause of FAN: Tarin fan #A30716-10 (115 VAC, $22,30) Note: A30716-10 is the catalog nwnber for the Model TA300S fan with overload has been removed. sleeve bearings. So what's the problem? The heat CORD: Tarin power cord with switch #60804 that's generated inside the computer For a Tarin distributor list, contact Bob Sobolewski, Tarin Corporation, can't get out, because when the II Torrington CT 06790, (203) 482-4422. was designed, styling won out over 1. Turn off the computer. Remove the cover. The fan will mount flush against the right edge of the large circuit board, so that air will be drawn engineering prudence. The low, sleek in through the side vents. The front edge of the fan will bear against the case means that most of the elec­ case rib, leaving room for the TV modulator in the space remaining. (See tronic circuits are mounted on one Figure 4A.) large, flat board. Proper design 2. Identify the edge of the fan with the electrical contacts and air flow ar­ would have taken advantage of the row. When the fan is properly installed, this edge faces the rear of the computer and the air arrow indicates air flow toward the circuit board. natural tendency of warm air to rise The specified power cord simply pushes on: no soldering is required. to remove the internally generated heat. Instead, with no means provided 3. Use 1" wide polyfoam double-sided adhesive tape (Scotch Brand cat no. 141, available at many hardware stores) to secure the fan to the bottom to replenish air that might otherwise and side of the computer case. (See Figure 4B.) The foam tape will deform rise from the surface of the mother­ to fill the ridges in the fan casting. Remove the backing paper from the tape on the fan, and tilt it into place, as shown in Figure 4C. Use a small board, the hot air just sits there like a piece of sponge or plastic foam between the top of the fan and the case to heavy, suffocating blanket. No wedge the fan firmly in place if the computer is to be moved around a lot. wonder it's generally RAM memory 4. Attach the power cord and feed it out the back of the case. Cut a piece failure that occurs as a symptom of of cardboard to fit between the controller card in slot 6 (if slot 7 is empty) overheating. and the rear edge of the fan. This baffle prevents air escaping out the back This is especially serious in a "full slots. house" system, one with several 5. Replace the cover. expansion cards installed. The power 6. Plug the fan cord and the computer into a switched power strip, so that supply must work beyond normal the fan goes on automatically when the computer power source is enabled. ratings, producing extra heat. Heat Be careful not to block the vents on either side of the computer with from the accessory cards increases books, furniture or the like. the ambient temperature further.

Call -A.P.P.L.E. May 1982 57 Apple Pugetsound Program Library Exchange I Page 0061 of 0102 Call-A.P.P.L.E. Magazine • May 1982

KEEP YOUR COOL

Under the influence of the electric each side. Most units are too thick, at low noise fans. Second, physical field on the powered chip, this very 1.63 inches, to fit into the available alignment is not easily maintained light metal deposition will actually space. I did find one fan, however, between the computer and an external move, ultimately creating open or that does the job: the Torin TA300S, fan. With my cooling system, once short circuits. with a 1.51 inch dimension. the fan is installed, you never see it All of these effects are encouraged Torin Corporation (Torrington CT again. Third, the internally mounted by higher operating temperatures. A 06790) offers two versions of this fan is quieter, because of the baffling failure mechanism external to the rugged industrial grade fan. One is a effect of the case. chip is the buildup of oxide and tar­ "standard" unit (without the "S"), Fourth, pulling the cooling air into nish on the various pins and sockets the other a "quiet" version. The stan­ the computer through the top slots that interconnect the parts of the dard fan operates at 3250 rpm to minimizes the intake of dirt, com­ Apple II computer, which is also move a maximum amount of air, but pared with an external fan resting on encouraged by high temperatures. at the price of considerable audible the same surface as the Apple. In noise. The quiet one runs at only very dusty environments, you may HARRY'S COOLING SYSTEM 2000 rpm for minimum operating want to tape some filter material The ideal location for a small fan noise level. Fortunately, it's not across the intake slots. Several layers inside the Apple II case is on the right necessary to move a great deal of air of cheesecloth or some sheet foam side, in front of the usual TV to reduce the internal temperature a plastic would probably work satisfac­ modulator location. Placed here, the reasonable amount, especially if it is torily. If you do observe dirt buildup, fan pulls air in through the top right turbulent flow, and it is directed use a vacuum cleaner with a soft, vents and forces it across the sensi­ across both sides of the board. clean brush attachment to remove it. tive RAM chips to exit through vents Installation is discussed in Table Incidentally, the Torin fan and next to the power supply, as demon­ 1, and illustrated in Figure 3. It's cord are available through a number strated in Figure 2. "Smoke tests" important that the fan be held securely of electronics distributors. For a conducted with a transparent top on in place against the edge of the large quantity price, call the factory the computer have demonstrated this printed circuit board, to allow ade­ to discuss an industrial discount. I flow. quate space between the fan and the encourage club or other group pur­ Some of the forced air also moves inside case wall for air intake. The chases to take advantage of this through the interface and accessory mounting tape acts as a spacer (see attractive price structure. cards. Since these cards are mounted Figure 3D) to maintain this distance. upright, stagnant air isn't as much a In an extremely hot environment, it RESULTS problem as with the large horizontal might even be desirable to cut a hole I've used a fan with my Apple mother board. However, excess heat in the side of the case to increase air since I first turned it on two years cooks everything, so it is essential to flow through the computer, although ago. I've had no problems with either remove as much heat as possible from this extreme measure would certainly the fan or the machine. In compari­ the computer to minimize the operat­ void your warranty. son tests, the case top is noticeably ing temperature of all components. I don't recommend using external cooler when the fan is running. One The small space available places fans, for three reasons. First, it's friend had some memory wipeout restrictions on the choice of fan. The difficult to obtain turbulent flow over problem on hot days; a fan cleared height inside is 3.5 inches, and the the RAM chips from outside the com­ this up immediately. Another friend width from case wall to printed cir­ puter. The scrubbing action of the lost three memory chips after only 18 cuit card edge is only 1.65 inches. A turbulent air is the secret of effective months; he now uses a fan, too. standard instrument or "muffin" fan heat removal, especially with the Harry's Cooling System is the one measures nominally 3.125 inches on modest total air flow characteristic of hardware modification that every Apple owner should seriously con­ STAGNANT LAYER OF HOT AI R sider. For the money involved, it's UESON Topor CIRCUIT BOARD) mighty inexpensive insurance. COMMERCIAL PRODUCTS Several commercial products have been introduced to meet the growing need for an Apple cooling system. Unfortunately, most of them aren't engineered too well. For , example, Tovatech offers a slotted II II top which can't help very much " / "" / / / / / / / / / / / / / / / / / / // / ./ because of the lack of natural circu­ CAIR ENTERS C.OMPUTER AIR RISES BESIDE lation inside the Apple computer. THROUGH SLOTS IN CIRCUIT BOARD AND Besides, most people stack a monitor BOTTOM OF CASE EXITS FROM TOP SLOTS and a couple of disc drives on top of FIGURE 1.: NATURAL C.ON'JECTION IN THE APPLE)[ COMPUTER. their Apple.

58 Call -A.P.P.LE. May 1982 Apple Pugetsound Program Library Exchange I Page 0062 of 0102 Call-A.P.P.L.E. Magazine • May 1982 Finally. High-speed CRTlook-aUke software for your Apple

CRT Emulation to Your Bost Computer at 9600 Baud. Now there's a fast, new, affordable emulation program that lets your Apple II Plus do 80 Column Display double duty. It's called Softerm. Option And it can turn your Apple into an Softerm gives you exceptional exact look -alike for these popular display capability. In addition to CRT terminals at an unparalleled providing full support for a wide baud rate: selection of 80-Column video boards, IBM 3101 DEC VT-100 Softerm allows the standard Apple DATA GENERAL 0-200 40-column video to be used. The 80 LEAR SIEGLER ADM·3A AND ADM·5 column boards include: HAZELTINE 1400 AND 1500 SERIES ADDS REGENT SERIES ADVANCED LOGIC SYSTEMS SMARTERM" TELEVIDEO 900 SERIES VIDEX VIDEOTERM" SSM MICROCOMPUTER PRODUCTS SIO, AIO, AIO II" M & R ENTERPRISES SUP-R·TERM" Softerm gives you the security and HAYES MICROCOMPUTER PRODUCTS­ BIT 3 COMPUTER FULL VIEW 80'" MICROMODEM II", SMARTMODEM" VISTA COMPUTER VISION 80" convenience of a personal computer WESPER MICRO SYSTEMS WIZARD 80" NOVATION APPLE·CAT" COMPUTER STOP OMNIVISION'" plus the benefits of an on-line ter­ BIT 3 COMPUTER DUAL-COMM PLUS" minal. You can even transfer files simply, quickly, and safely. With nexible file transfer Most advanced emulator available. Softerm you can access your main­ Softerm makes it simple to transfer frame, talk to your timesharing ser­ text, program, and binary files from Softerm is written entirely in 6502 vice, or communicate with another one computer to another. You'll assembly language. You simply can't Apple computer. enjoy a variety of modes to satisfy buy a more sophisticated package Simple to use your host computer's requirements, or one that's easier to use. Softerm mcluding character, block, and the is the most advanced intelligent Softerm operates on any Apple II intelligent Softrans" mode which communications software on the Plus with 48K memory and Apple guarantees error-free transmission market. II disk drive. For a connection to and reception. another computer directly or through Other mode selections offered Order Softemi now. a communications modem, you'll include manual or unattended opera­ The sooner you can put Softerm need an asynchronous serial inter­ tion, auto-dial and auto-answer, to work for you the sooner you'll face board. Here are the boards adjustable character and block put the power of other computers Softerm supports: delays, character echo wait, hand­ at your fingertips. So order your APPLE COMMUNICATIONS CARD shake sequencing, unattended Softerm program today and discover APPLE HIGH SPEED SERIAL INTERFACE CALIFORNIA COMPUTER SYSTEMS 7710 multiple file transmit queueing, re­ a world of new uses for your Apple. MOUNTAIN COMPUTER CPS MULTIFUNCTION CARD ceive to print, and many others. Send $150 to Softronics, Inc. B3

SBnRONICS I 6626 PRINCE EDWARD PLACE· MEMPHIS, TN 38119· (901) 755-5006 VIS4]

Apple Pugetsound Program Library Exchange Page 0063 of 0102 Call-A.P.P.L.E. Magazine • May 1982

Apple Pugetsound Program Library Exchange Page 0064 of 0102 Call-A.P.P.L.E. Magazine • May 1982

KEEP YOUR COOL

R. H. Electronics offers Super FMJ, Inc. combines the cooling air in through the right vents and Fan II, which fits onto the outside of fan with a metal rack that fits over blows it across the space above the the case and pulls air out of the com­ the computer to hold a couple of disc mother board. puter through the side vents next to drives and a monitor. The fan is not In sum, I recommend using the the power supply. While it is an secured to the computer case, so high reliability industrial grade Torin improvement over a static situation, there is the question of leakage be­ fan to move turbulent air directly this design misses the need for turbu­ tween the rack and the computer. across the most heat-sensitive portions lent flow inside the Apple to literally The most promising commercial pro­ of the Apple computer. Harry's scrub the heat away from the inte­ duct is M & R's Sup "R" Fan, M & R Cooling System works better, costs grated circuits. Dana Industries uses Enterprises, 910 George St., Santa less, installs easily, runs quietly, and a muffin fan inside the Apple, but to Clara, CA, $49.95. This fan is lasts almost forever. t!i force air out the right side vents mounted inside the computer, pulls instead of creating turbulent flow inside the case. TURBULENT AIR FLOW SCRUBS AIR ENTERS COMPUTER FMJ. Inc., PO Box 5281, Tor­ HEAT AWAY FROM CIRCUIT THROUGH TOP 5L:L rance, CA, offers Cool Stack, a combi­ CHIPS ON BOARD nation of diskette and monitor storage rack with a built in fan for $70. Kensington Microware has an ~~~~--~------$89.95 product which includes master power switching, fan, surge protection and extra outlets. It is called System ------Saver. A somewhat different product is VENTOP by Tovatech, 1903 Ford­ COOLINCO AIR AL50 MOYES ham Way, Mountain View, CA. This UNDERNEAtH, REMOYING HEAT $45 product is a metal cooling panel FROM BOTTOM OF C.IRCUIT BOARD that replaces the plastic cover sup­ plied with the Apple. FIGURE 2: AIR FLOW WITH COOLING FAN.

FAN POWER CORD GOE5 OUT THE BAC.K ~ 3 LAYERS ~ : ~ POWER : ~ SUPPLY : ~ ~ ~ ~'k<~'T ~.~ '~ AIR ~: EXITS ~ 0 ~ 1 LAYER HERE BArFLE MOUNTS HfRE~ H ~ AIR ~ AIR BLOWS ACROSS BOARD (J FAN o ENTERS ~'- FAN MOUNT5 AG.J'.INST EDGE HERE r--- OF CIRCUIT BOARD-Ir 1 r--- AND AGAINST RIB c:

PIVOT FAN AROUND EDGE OF CIRCUIT BOARD

PLA5TIC FOAM BLOC.K r;;::-. APPLE][ COMPUTER \2J""ITH COVER REMovED CIRC.UIT 80ARD­ SHOWING FAN LOCATION DOUBLE-SIDED TAPE BOTTOM OF CASE NOTE: FAN DIMENSIONS ARE. @ PARTIAL 5ECTION 3.140" SQUARE. DEPiH THROUGH FAN MUST NOT EXCEED 1. 510" (LOOKI NG REARWARD)

FIGURE 3~ APPLE][ COOLING FAN lNSTALLATION DETAllS

Call -AP.P.LE. May 1982 61 Apple Pugetsound Program Library Exchange Page 0065 of 0102 Call-A.P.P.L.E. Magazine • May 1982

THE WORLD'S LARGEST COMPUTER MAIL ORDER FIRM Com~~~!JOX11,~~vb.!!!t·Ad# WAREHOUSE AND OFFICES, BY APPOINTMENT AT 6791 APPLEGATE ROAD. 9310 SuppllJ center HARDWARE ~~Ple 11111+ CLOSEOUT on 1ITJl RE on disk lor CLOSEOUT on Apple Computer, Inc. products SOFT vvn Apple 11111+ Apple Computer, Inc. products SAVE Apple 1148K or 64K OS€' Apple Sottwlre: SAVE * Osborne (Disk and Book) Apple III 128K C\.::\ SAVE Apple Plot $ 49 30% Intocom Zork II $ 29 30% Some Common Basic Programs, SAVE DlskDroves, II and III OU The Controller $495 21% tnlo Unlimited, 75 Business, Statistics and Math i:~;~:~~lc~r~~iSk G~\.-\.- ~~~ ~~~: Dow Jones News & Quotes $ 69 28% Easywriter (PRO) $139 25% programs for the Apple II $ 49 50% How to! Innovative Peachtr.. Softwlre ai' CP/M Silentype II or III Up to 25% $ 39 22% M icrocourier $189 24"10 Apple Spellguard CP/ M $ 219 26% Magic Wand $ 250 37% Direct Substitute for Apple Drives Many others CALL CALL Insoft: GL, AR. AP, PR or inv $ 189 38% Electric Duet NEW Personal Softwlre/VII.Corp Micro-Sci A2 is a direct substitute for Apple II' ArtSCi Magic Window $ 75 25% $ 25 20% SAVE drives. It will run all Apple II software. Save AShton-Tate CPfM ALD System II or III $110 10% VisiCalc 3.3 $ 189 25% $350 on a dual A40 disk system TransFORTH II or III * $ itO 10% VisiOex $189 25% dBase II for Apple 1/ $ 495 30"10 Micro-Sci 5" Drives for Apple /I SAVE Aurora Systems I nsoft Accountant CP f M $ 355 66% VisiFile $ 189 25% A2 Drive, 5", 143K $ 395 18% Executive Secretary-WP* $189 25% GraFORTH NEW! $ 69 25% Desktop Plan II $ 189 25% $ 95 15% VisiPlot $ 159 20"10 Controller with DOS for A2 Beagle Bros. DOS Boss $ 18 25% LJK Letter Perfect $112 25% AlO Drive, 5", 286K $ 489 20% Broderbund Software Desktop Plan III $ 209 30"10 Micro Lab VisiSchedule A40 Drive, 5~, 160K $369 18% Payroll $ 269 30% $ 239 20"10 Data Factory, ver.5.0 $ 249 20% VisiTrend and VisiPlot Controller Gard lor A70 or A40 $ 79 21% General Ledger $ 349 30% $ 239 20% Invoice Factory $129 35'% VisiTerm Sorrento Valley Apple Panic $ 21 30% $ 79 20% Tax Manager $ 95 38% Zork $ 33 20% 8" Disk Drive Controller 2 t 2 $199 60% Arcade Machine $ 32 30% MONITORS: SAVE Red Alert $ 21 30% Micro Pro all CPfM Softech I nt' I Space Warrior Word Star $ 239 36% Stockfile $ 250 60% NEe 12" Color $ 359 24% $ 18 30% Many Others I n Stock CALL CALL Mail Merge $ 79 36% Stockseller $ 423 30% 12~ Green $169 22% * Spell Star 36% Budgeco, Raster Blaster $ 22 27% $159 Softwlre P~bll.hlng: SANYO: 9" B&W $149 31% Data Star $189 36% 9~ Calf. Pacific, Ultima PFSII (NEW) Green $159 31% $ 30 25% Calc Star 36% $ 89 26% $ 219 $189 PFSIII $ 69 26% 12" B&W 30% Central Point Softwlre: * SU;JerSort $129 36% 12~ Green Report II or III $229 30% Copy II Plus ver. 4 $ 35 10% Microsoft $ 69 26% 13" Color $399 28% Will copy most copy protected software A.L.D.S. $110 10% Sorcim SupercalcCP/M $ 219 25% ZENITH 12" Green $ 119 20% for your backup in 45 seconds! NEW BASIC Compiler $299 25% Stonewlre, DISKETTES, 5", box 0110: Continental Software CobOl 80 $ 559 25% DB Master (new version) $ 179 22"10 Maxell $ 39 33% Home Accountant $ 56 25% Fortran 80 $149 25% Sub logic Flight Simulator $ 28 20% Memorex $ 25 45% Home Money Minder $ 26 25% Olympic Decathlon $ 24 24% 80 COLUMN VIDEO CARDS: Data Most T ASC Compiler $159 22% OTHER BRANDS IN STOCK: Snack Attack Typing Tutor II $ 19 30% Videx Videoterm $ 249 28% $ 22 25% Accent, Adventure International, Astar, Thief M&R sup R Term $ 295 22% $ 22 25% Muse Auto, Simm., Avalon, Avant-Garde, Beagle, Denver Software AlS:·Smarterm $ 269 30% Super Text II $113 25% CPU, Cavalier, Oatasott, Delta, Edu-Ware, Financial Partner $ t85 25% Castle Wolfenstein $ 23 25% Info Com, Lazer, LJK, Phoenix, Quality, MISCELLANEOUS, SAVE Epson, MX 80 Graphics Dump $ 9 30% Robot War $ 29 25% Sensible, Sentient, Sirius, Strategic, CCS: Serial Interface 7710A $139 22% On-line Hayden, Sargon II (chess) $ 29 22% Synergistic and United. Parallel Interface 7720A $ 99 Expediter II 20% Apple Pie (specify brd.) $ 99 25% $ 75 25% Other CCS Cards In Stock, CALL Superscribe III Screen- Hayes: M icromodem II $ 289 25% High Technology writer II $ 95 27% CP/M Software 8" and 5" Smart modem $ 229 20% Store Manager Lisa 2.5 $189 25% $ 59 26% All AShton-Tate, Insoll. Micro Pro,and ISC Videostick Paddle $ 35 23% Job Control System $ 469 40% Pegasus II $ 22 25% Threshold Peachtree CP/M software available lor Keyboard Company: Howard Software $ 30 25% Tax Preparer Cranston Manor most 5" and 8" drives, and computers at Joystick II $ 45 10% $ 26 25% Real Estate Mission Astroid simi lar 'd iscou nts. Game Paddle $ 25 17% $ 15 25% Mystery House Numeric Keypad $ 119 21% $ 19 25% M&R: RF Modulator $ 25 27% $ 39 25% SAVE CLOSEOUT • Mlcroso~~i::~~card $ 279 33% 16K RAM Card $159 20% COMPUTER SYSTEMS Mountain: 30% $209 13% CPS Multifunction Card 8000-15 20BK, 4 User, 2 Disk Drives $3995 20% Clock/Calendar $ 239 15% MTU-1 Tape Backup lor Hard Disk $2795 25% $329 16% Novation Applecat Modem 8000-10 208K. 4 User, 10 Meg $6495 25% Orange Micro Grappler $ 129 21% ~commodore Others in Stock CALL CALL Dan Pay mar LCA New rev $ 34 33% VIC 20 Home Computer $ 249 16% Saturn System 32K RAM Card $149 36% 64K RAM Card $ 375 12% 128K RAM Card $ 525 12% F'in- HEWLETT HIP 85A * $1,995 SUPERB RAIN While They Last VC-Expand for Vlslcalc $ 75 25% .:~ PACKARD SAVE SSM AIO Serial/ Para. Interface $159 20% Hlp 85 Microoomputer/Moniter/Printer $1995 27% 64K aD $ 2795 30% AlS: Smarterm 80 Col Card $ 269 3O'Y. H/P87CP/M Microcomputer NEW! $1995 20% Z-Card (Z-80) $209 22% Addram 16K Card S 119 20% HIP 125 CP/M Microcomputer NEW! $1995 27% Synergizer Package $ 549 27% H/P 82901M 5" Dual Drives $1650 27% EPSON PRINTERS Vjdex Videoterm 80 col. $ 249 28% HIP 7225B Professional Graphics Plotter $2060 25% MX80 $449 31% Soft Video Switch $ 25 29% HIP 7470A Graphics Plotters $1249 19% MX80FIT $ 555 25% Enhancer II $ 99 3"% H /P 41C Calculator $ 185 25% MX100 F/Tw/graphics $ 729 27% Full Vide x Line, Call up to 35% HIP 41CV Calculator 2,2K $ 245 25% 70/BO/100 Apple Interface and Cable $ 95 15% PAPER: Fan Fold, Call lor oizeo, Full Accessories and Software Line CALL CALL MXBO Friction feed adapter $ 59 22% trickness and prices MXBO Graftrax $ 79 20% LETTER QUALITY PRINTERS: SAVE Qume Letter quality printer 800 16K $666 17% Sprint 945RO $ 2195 23'% A\ MIcrocomputer Sprint 545RO $ 2395 20% 400 16K $333 26% N'EC 8001 32K Computer $750 25% 3510 RO Serial $1995 20% Microtek 16K RAM $ 75 25% 2B6K Total Dual Drive PC8031 $ 750 25% (Typewriter/Printer) ATARI~ Microtek 32K RAM $149 25% 32K addon and I/O Unit Pr.8012 $495 24% ES-100, 18CPS, with full cable and 410 Recorder $ 79 17% Ren Tee "The Wedge" 32K $495 17% interface to Apple II $1695 22% 810 Disk Drive $449 26% 8023 Impact Printer FIT $595 25% PRINTERS: 850 Interface $169 25% Impact Printer Cable $ 49 25% 20 to 30% Eplon, Se ••pecl.1 Eplon loctlon ot right ~~~Ie[i~:~~~:~~ware 3510 Letter Qual. Printer $1995 20% IntergrllOltl 25% NEC PC Software CALL CALL Prism 132, Color Printer w/Graphics $1695 16% Visicalc $159 21% Prism80,B&W,ASF,WIGraphics $ 99512% Pac Man Avail 5/82 $ 34 25% Corvus 5Meg Hard Diok $2995 21% 445 Tiger W IGraphics & 2K $ 695 23% Communicator Kit $345 25% 10 Meg Hard Disk $ 4345 20% 560 Tiger W IGraphics $1095 22% Educator Kit $129 27% CLDSE OUT 20 Meg Hard Disk $ 5245 20% Okldltl Microline82A $ 495 25% PRICES Omni-Net, Constetlation, Mirror, In Stock ORDERING INFORMATION: ~------~'-A-P-p-~~~~a~r~e~gi-~-e-~-d-~~a-~-m-a~~~o~f~A~P~P-~~c~o-m~p-~-e-r,~ln~c~~~ Minimumorder$100,CashiersChecksand * NO SALES TAX • - Money Orders welcomed, Personal Checks STAR INDICATES ,. .• _VISA allow 20 days to clear. Add 3% for shipping, BEST BUYS Oregon Order Desk insurance and handling, UPS is standard, Ad # (503) 772·3803 Additional 7% for US Postal or APO. 931 D T.OLL FREE NATIONAL Additional 3% for VISA or MC. Include REFERENCES: .1 1 ORDER DESK telephone II. No COD. Prices subject to We have been a computer dealer since 1978. Our bank OO~547 change and typo errors. Call to verify,Order reference is First Interstate Bank (503) 776-5620. We (8· - 1289 desk hours are 8 to 6 PDT, 10 to 3 Saturdays. belong to the Chamber of Commerce, (503) 772-6293.

Apple Pugetsound Program Library Exchange Page 0066 of 0102 Call-A.P.P.L.E. Magazine • May 1982

CURING A SHIFTLESS APPLE

Dan Paymar

HE Apple's keyboard was GETTING STARTED maining two screws. Lift the case originally designed with a The first step. is to remove the slightly, and unplug the keyboard Teletype style layout, which Apple's case. Remove the power cable. The case may now be removed. Tmeans that it is set up for cord, the cover, and all I/O boards The next step is to locate the shift upper case letters only. Even if the and other cables. If you have an RF key circuit, which depends on keyboard did generate the ASCII modulator, be sure to unplugitfrom whether your keyboard has the codes for lower case letters, the the motherboard. Turn the Apple separate encoder board. If you have Apple's monitor (in ROM) would upside down, and remove the two an old style keyboard (with all cOm­ intercept them and change them to Phillips head screws at each side of ponents on a single PC board) then upper case (see the instructions at the base plate. Also, remove one simply locate the contacts below the $FD73-$FD82 on page 149 of the screw at each rear comer and the two right-hand shift key (the one below Apple Reference Manual). In addi­ center screws along the front edge. the arrow keys). One of the contacts tion, there is the problem of various Turn the Apple right side up, with is tied to logic ground; you will see special symbols (such as "@" and the keyboard hanging over the front this line going to other keys. It is the "1\" that are generated by SHIFT-P edge of the desk, and remove the re- other side that you want to use. and SHIFT-N). The most common solutions to o ______SHIFT KEY CIRCUIT this problem consist of either using o I==:J 0 (start wire here for method 1) the ESC key or various control codes for shifting, or adding a wire from the shift key to the game switch #2 input. . ... In the latter case, the software must KEYBOARD CONNECTOR -- • • • • • • • • read the game input along with each keystroke to find out if the shift key Figure 1: Bottom view of keyboard encoder board was depressed. Both of these still require special software to bypass part of the monitor so that any lower case entered is not changed back to upper case. The former solution has the advan­ tage that it does not require modify­ ing the hardware, but it is somewhat awkward to use. Adding the wire BY CASES, INC. will, technically, void Apple's warranty DESIGNED TO PROTECT YOUR COMPUTER (if it is still in effect), but the result is much more acceptable to a typist. A companion article, DICE 82, Features - which was published in the April Call • Rigid Shell Made of Plywood -A.P.P.L.E., describes a software Supported High Impact ABS. package that works well with either " Shock Resistant foath lining. of these solutions. If your Apple is " Heavy Duty Hardware still under warranty (or under an ex­ Includes Key Locking Latches tended Apple service contract), then " Bound Metal Edges. "Interlocking Tongue and you should probably skip this article . Groove Extrusion. Mating lid and stick with using the ESC key for and Bottom. shifting. However, if you feel you Apple II Plus 2 Drives $1~5.00 must use the shift key, then read on. We will try to make the modification with minimal risk to the Apple or its OTHER warranty. MODELS Two methods will be presented - AVAILABLE the first is the simplest (and easiest to remove if service is needed on the Apple), and the second is the nea test (no dangling wires to get tangled). CLUB AND DEALER DISCQUblTS AVAILABLE CASES, INC. P.O. Box 33820 Seattle:WA 98133 (206) 365-5210

Call -A.P.P.L.E. May 1982 63 Apple Pugetsound Program Library Exchange Page 0067 of 0102 Call-A.P.P.L.E. Magazine • May 1982

CURING A SHIFTLESS APPLE

Eventually, we will solder a wire to To complete the circuit to the Tuck the wire out of the way, or tape this point. game connector, it is necessary to it to the motherboard, to avoid tan­ If you have the newer keyboard remove the main computer mother­ gling with 110 boards. with the separate encoder board board from the base plate. First Reconnect the RF modulator, and "piggy-backed" below the main unplug the power cable which comes replace any I/O boards and other keyboard, then lay the case upside from the power supply and plugs into cables. Turn on the computer, and down so that you are looking at the the rear corner of the motherboard, check out its normal functions. (Will bottom of the encoder board with the and remove the nut in the center of the disk boot? Will a BASIC program keyboard cable connector at the the motherboard (just forward of the run? Do the game paddles work prop­ lower right. Locate the feed-through EO ROM chip). Remove the mother­ erly?) If any problems are noted, turn pad next to the small rectangular hole board by squeezing each white plastic off the computer immediately and (see Figure 1). This is the shift key standoff while gently prying upward check again for shorts or incorrect circuit. with a soft stick (plastic or wood is wiring. This modification should not Now select either method one or preferable). Raise the board a little at affect any of the standard features of method two below before continuing. a time at each standoff until it can be the Apple, including the game paddles In either case, it is best to use solid lifted away from the base plate. and switches. wire-wrap type wire for two reasons. On the bottom side of the mother­ The insulation on wire-wrap wire is board, run a wire from pin 4 of the USING THE SHIFT KEYI designed to resist cold flow (i.e. being game 110 connector to pin 4 of the The easiest way to check out the cut through slowly by lying against a keyboard connector. Leave some shift key is to use DICE 82 described sharp edge), and there is less chance slack in the wire and tape it to the in the April issue, or use one of the of a short when soldering solid wire board so that it is not against any popular text editors that utilize the than with stranded wire. Never strip sharp edges or pins. Now replace the shift key modification. If you don't more than 1/16" of insulation when motherboard on the base plate by have any of these software packages, soldering a wire to a PC board. After reversing the above procedure, and or it there are problems, then try this each point is soldered, carefully plug in the power supply cable. BASIC program: check over the point for possible COMPLETING THE JOB 10 PRINT PEEK(-16285): GOTO bridges to adjacent circuits, and be Lower the case over the com­ 10 sure that the added wire is not being puter and reach under the front edge pinched anywhere. to plug in the keyboard cable. Then The game switch 2 input is tied to replace two of the screws at the front bit 7 of this address, and the other METHOD ONE edge, but don't tighten them yet. lines are allowed to float. Run the This is the same as is suggested Turn the Apple upside down, and program, and it should repeatedly by the suppliers of several popular start all of the other screws before display values of 128 or greater until text editors. Simply solder one end of tightening them all. Turn the Apple you press the shift key. With the shift a 15" wire to the shift key circuit right side up. key depressed, it should repeatedly (which we located above), and leave If you used method one, now is display values less than 128. the other end free for the time being. the time to strip 3/16" of insulation If you are going to write your own Skip to "Completing the job" below. from the wire that we left dangling assembly language program to utilize above, and insert it into pin 4 of the the shift key then start with some­ METHOD TWO game 110 connector. Alternatively, if thing like the figure at bottom of page. This method requires much more you have something plugged into the This is, of course, somewhat sim­ work and is not recommended for game connector, the wire may be plified. Refer to lines 274-323 of the someone with no hardware experi­ soldered to pin #1 of the 74LS251 in DICE 82 listing in the April issue for ence. The advantage of this method, location H14. As you can see in the a more complete handling of this however, is that the modification is schematic on page 114 of the Apple problem. not obvious when the Apple's cover Reference Manual, this is where is removed. Starting from the shift game switch two goes (labeled SW2 A FINAL WARNING key circuit (located above), add a wire on the schematic). If you remove the As mentioned earlier, any modifi- to pin #4 of the cable connector. On 74LS251 from its socket and solder cation to an Apple computer will void an old style keyboard, both ends of carefully to pin one right next to the its warranty. Neither the author nor this wire are on the keyboard's PC plastic, then the modification can later this publication are responsible in any board. On a new style keyboard, bojh be removed at this point by simply way for any damages that may result ends are on the encoder board, and replacing the chip with a new one. from making this modification. ~ the wire is added as shown in Figure 1. Solder the ends of a 1-1/2" piece of ]SR $FDOC RDKEY in ROM monitor wire to the two points shown. BIT $C063 Read game switch #2 BPL XXX Branch if shift key depressed CMP #$CO Test for letter BLT XXX Branch if not ORA #$20 Yes, change to lower case XXX -- -- Continue (char is in A reg)

64 Call -A.P.P.LE. May 1982 Apple Pugetsound Program Library Exchange I Page 0068 of 0102 Call-A.P.P.L.E. Magazine • May 1982 ·~FOR YOUR APPLE II ~ Industry standard products at super saver discount prices

EXPAND YOUR APPLE II MEMORY C-ITOH 8510 PRINTER Virtually identical to 16K MEMORY EXPANSION MODULE. The preferred 16K RAM the NEC 8023. Same electro-mechanical Expansion Module from PROMETHEUS. Fully compatible with CP/M@ internals. The only difference is the name and Apple Pascal@. With full1-year parts and labor warranty. and the price. Specifications:. 100 CPS dot matrix printer. 80 column print -136 (List: $169) ..... $99 characters per line. Tractor/friction feed • 7 different print fonts included. 2K printer MEMORY MANAGEMENT SYSTEM. Provides more free memory in buffer. Proportional spacing. Bit image BASIC by moving DOS into 16K card. graphics and graphic symbols: (List: $49) ...... $35 NEC & C-ITOH List: $800 Special Price with any other purchase ...... $595 16K RAM ADD-ON KITS. Eight 16K full specification RAMS. EPSON 100 PRINTER ...... $749 Reduced to ...... $19 SATURN SYSTEMS 32K RAM CARD ...... $199 Z-BO CARDS FOR YOUR APPLE MICROSOFT SOFTCARD. With CP/M® & MBASIC. (List: $399) .... $289 VERSAcard _VI! ADVANCED LOGIC SYSTEM Z-CARD. With C/PM®. from PROMETHEUS Has everything the Softcard has except MBASIC. Works with Microsoft's disks too. Four cards on one! With true simultaneous (List: $269) .... $209 operation. Includes: (1) Seriallnpu1/0utput Interface, (2) Parallel Output Interface, (3) Precision Clock/Calendar, and (4) BSR Control. All on one card. Fully compatible with CP /M@ and ~ U-Z-80 PROCESSOR BOARD (from Europe) Apple Pascal@. Software compatible with Softcard and (List: $249) .... $195 ALS Software...... (List: $199) .... $149 With CP/M®, ...... add: (List: $75) ...... $49 JOYSTICK ~ ALS SYNERGIZER_ CP/M@) operating package with an Takes the place of two Apple Paddle Controllers. 80 column video board, CP /M@ interface, and 16K memory From BMP Enterprises. Heavy duty industrial expansion for Apple II. Permits use of the full range of CP /M@ construction and cable. Non-self centering. With software on Apple II and Apple III. polarity switches for consistent motion control. (List: $749) .... $595 (List: $59) ...... $39 -- . ' 80 COLUMN VIDEO DISPLAYS - MODEMS FOR YOUR APPLE II ~ ...... - FOR APPLE II .~ \\\\\\~\\\ ' \\' HAYS Smartmodem ...... $229 -, ~--~# SMARTERM. NOVATION Apple Cat ...... $349 (Not to be confused with SUPRTERM) Software switching from 80 to 40 and 40 to 80 characters. 9 new characters not found on the Apple keyboard. Fully compatible with CP /M and Apple PASCAL@. With lowest power consumption of only CENTRONICS COMPATIBLE PARALLEL INTERFACE 2.5 watts. Look out Grappler! From PROMETHEUS. For use with (List: $360) .... $279 ,,~"! Epson, NEC, C-ITOH, and other printers. Fully compatible with CP/M@andApplePascal@. SMARTERM EXPANDED CHARACTER SET. Add to above: $40 Only ...... $69 7"x 11" matrix with true decenders. With Screen Dump Graphics for EPSON printer, add ... $25 VIDEX-80 ...... $279 WIZARD ...... $269 Phone for~ie. MONITORS FOR YOUR APPLE Shipment! AMDEX 300G ...... $229 (4~5J 490-3430 SUPER SPECIALS! 12" GREEN MONITOR ...... $139 12" BLACK & WHITE MONITOR ...... $125 Sr,t~ All equipment shipped factory fresh. Manufacturers' warranties included. Please add $3.00 per product for shipping and handling. California: add 6% tax; BART Counties: 6V2%. 342 Quartz Circle, Livennore, CA 94550

Apple Pugetsound Program Library Exchange Page 0069 of 0102 Call-A.P.P.L.E. Magazine • May 1982

PRACTICAL PERIPHERALS Video Terminals OOMPANY FREE YOUR COMPUTER SYSTEM FROM THE BINDS OF YOUR PRINTER!!! (213) 328-8951 (800) 421-5006 Once again Futra Company offers you a new time saving device. These products from Practical Peripherals were & Monitors TWX 910 349 6211 designed to increase your data processing efficiency by freeing you from the wait you normally experience while printing. Now you can process and print althe same time. The next time you're waiting for your printer to catch up with AGENFTRA TRNC your computer give us a call and find out how we can make better use of your time Zenith 12" Mail Order: Department C MICROBUFFER " $CALL$ P_O. Box 4380 The MICROBUFFER II is an intelligent parallel printer interface with up to 32K of on board RAM for data buffering as well Torrance, CA 90510-4380 as on-board firmware for text formatting. For graphics type printers, the firmware also provides advanced graphics dump routines. Sanyo: Retail: OMC 20695 S. Western Ave. MICROBUFFER MBS-8K EPSON SERIAL INTERFACE • 9" Green Monitor Suite 124 The MBS-8K is an EIA RS-232C interface for the Epson MX series printers that provides 8, 192 bytes of on-board buffer and supports both hardware and X-On/X-Off handshaking. The MBS-8K plugs into the internal Epson interface NEe: Torrance, CA 90501 connector and may be used as an upgrade of replacement of the standard Epson serial interfaces (213) 328-1760 MICROBUFFER MBP-16K EPSON PARALLEL INTERFACE • 12" Green Monitor The MBP-16K is a Centronics-compatible parallel interface for the Epson MX series printers that provides 16,384 bytes 12" Color Monitor (CompOSite) annln'computczr of on-board buffer. The MBP-16K is designed to plug into the interface socket within the Epson parallel interface. • S~;';;dService 12" Color Monitor (RGB)

M & R ENTERPRISES EPSON PRINTERS

8 SLOT Still the best valued printer EXPANSION around. Friction and re­ SUP'R' movable tractor, 9x9 to CHASSIS 18x18 dot matrix, logic SWITCHER seeking, with graftrax option built in. $219.00 Increase your Apple capability and reduce the power drain on your Apple computer with the oMX-80 oMX-80 FT oMX-70 oGraftrax Expansion Chassis. oSerial Int. Opt. o2K Serial Int. ROM PLUS $145 Music System $355 oParaliel Int. oPar. Cable ROMWRITER 141 Xll0 Control 160 Sup 'R' Mod $32.00 APPLE CLOCK 195 $ $CALL $ S S $CALL S S CPS Multi-function card ...... $165 MX-80 Ribbon $14,00 KENSINGTON MICROWARE THE KEYBOARD COMPANY HAYES VIDEX INC. System Saver Fan $79.00 $219.95 ForCoo:"~ng~~~~~: VIDEOTERM SALE! TKC NOVATION APPLE CAT II $311 $122.95 KEYBOARD ENHANCER II ForLine JOYSTICK I! ...... $ 42.95 Manual Switch Plate ...... $19 Surge Electronic Switch Plate .. GAME PADDLES...... 27.00 . ... 32.50 Suppression Buy the Apple Cat I!, the modem that grows with Micromodem " Firmware ROM .... 25.00 ~ NUMERIC KEYPAD. .. 129.95 your needs. Find out about Novation's add-on features 7 x 12 Character Set .. 39.00 NEe 8023A PRINTER GE VOLTAGE SPIKE PROTECTOR VISTA A800 DISK MISC. HARDWARE CALL FOR PRICES $489.00 SPIKE PROTECTION $12.50 CONTROLLER SSM Microcomputer Products Protect your computer system from high volt­ AIO-II, AIO, APIO, ASIO M88, AKB1, AXBl age spikes that can damage your computer or {,:::.yvC::D cause it to drop a bit of information. The GE Advanced Business Technology VSP acts like a safety valve. assuring protec­ Keypad A or B, Barwand, Softkey tion where risk of damage is high or uncertain. High Technology It is a unique device that absorbs potentially $481 Apple Juice (Reserve Power Supply) $325 The Futra Company now offers you a choice. The damaging voltage transients without interfer­ NEC 8023A Printer is a dot matrix, bi-directional, ing with normall current flow or adding to ener­ The Vista A800 8" floppy disk controller offers you a ALF: 9 and 3 Voice Music Card $ CALL logic-seeking, friction or tractor feed, impact printer. gy cost. The VSP is easy to use, just plug it into true advantage. With the A800 and 8" drives you At 100 characters per second you owe it to yourseij can now have up to a full 1 megabyte per disk drive. Orange Micro to find about this value packed printer. Call us a 15 amp-125 volt outletthen plug your equip­ ment into the VSp, Grappler Epson MX~0I100 & Grappler NEC 8023A MicroSci 8" Floppy Disk Drive ...... $Cal! $149.00

Autom.ted Simul.tloni Phantom Five 21.95 Starfleet Orion lUO APPLE SOFTWARE - GAMES Space Eggs 21.95 DATA SUPPLIES Invasion Orion lUO Trick Shot 35.95 Gobbler 2U5 Gorgon 31.96 Temple of Apshai 2UO audgleo Mlcl'OlOfl Consume, Products Penon.1 Software Star Cruiser 22.45 Silvermans Diskette Sleeves $6.95 Hellfire Warrior 2UO Raster Blaster 23.96 Olympic Decathalon 23.96 Microchess2.0 2U5 Cyber Strike 35,95 Store and protect your diskettes/Pkg. 01 10 Star Warrior 29.l1li Autobahn 26.95 Contlnentll Softwl'. Typing Tutor 19.96 Checker King 22.45 For reliable data recording Crush, Crumble & Chomp 25.l1li LA Land Monopoly 211.15 Microsoft Adventure 21,95 Gammon Gambler 22.45 Pulsar II 21.95 Scotch Products: the Dragon's Eye 11.l1li Hyperspace Wars 21.95 MUM Softw.r. Bridge Partner 22.45 Strategic Simul.tion use the best diskette for the money. With reinforced Jabbertalky 25.l1li 3-0 Skiing 22.45 Robot Wars 31.96 Monty Plays Monopoly 31.45 Computer Bismark 42.00 center! Sorcerer of Siva 25.00 Home Money Minder 29.70 Three Mile Island 35.95 Monty Plays Scrabble 31.45 Computer Ambush 42.00 Box of 10 - 5114' storage carton ... $21.00 A".nt.·G.rde: C.I Pacific Compy .., Best ot Muse 35.95 Riverb.nk Softw.re Operation Apocalypse 42.l1li Hi-Res Computer Golf 21.l1li Ultima 31,96 Castle Wolfenstein 23.96 Int'I Grand Prix 23.96 Shattered Alliance 42.00 Scotch Head Cleaning Kit , , ...... $26.00 Race for Midmght 21.l1li Dillin S/LI'I.I·'. ABM 19.96 SII ... SDftwlrl Computer Quarterback 27.00 Hi-Res Secrets 15.00 On-Line Systems Alien Lander 19.96 Computer Conflict 27.l1li Alkemstone Game 33.95 Warp Factor 27.00 Brod.rtlund SoftwIn KavesofKarthan 44.15 Wizzard & Princess 29.65 Aetro Ball 25.95 Apple Panic 23.91 HIA Football 35.95 Space Adventure 25.95 Cartels & Cutthroats 27.l1li CAUFORNIA COMPUTER SYSTEMS Dragon Fire 44.15 President Elect 27.l1li Space Quarts 211.15 Rings of Saturn 35.95 Pegasus II 23.96 Slriul Softw.n, Inc. CALL Genetic Drift Computer Baseball 27.l1li 211.15 6_11 Inc Misle Defense 23.96 Cops & robbers 31.45 7712A Serial Sync 7470A A/D Converter Track Attack 21.'5 Softw.,. Battle of Shiloh 27.110 Firebird 23,96 Cranston Manor 31.45 Spoch 21.96 771 OA Asynch serial card 7720A Parallel Red Alert 21.15 HI-Res Socc(l:r 26.95 Orbitron 21.95 Tigers in the Snow 27.110 Midnight Magic 29.70 lnov."" Dnlgnl Ulysses & Golden Fleece 31.45 Gamma Gobblins 21.95 Sub Logic 784B Arithmetic process 7728 A Centronics Arcade Machine 35.96 Pool 1.5 27.96 Soft Porn Adventure 23.96 Flight Simulator 26.80 Shuffel Board 21.95 Sneakers 23.96 7440 Program Timer Calendar Clad! Modlil. BOOKS GENERAL APPLE SOFTWARE PellOnal Soltwlre Visicalc, VisijrendNisiplot, Visidex PADDLE $29.00 TERMS: Shipping: add 3% for product shipped OSBORNE: S CALL Vis~enm, Visiplot within continental USA via UPS surface (minimum Business Systems Buyers Guide 6.75 MlcrolOll Art SCI ADDAPPLE $6.00). " the order pllc.d II preplld wtlll U.S. Practical BASIC Prog, (Apple II) 14.40 Cobol 80 $562 Magic Window $Call lunds In the lonn 01 check Dr money ord.r. I TIIII Some Common BASIC Prog. 13.45 Fortran 80 175 InlonnaHon Unlimited Charge 01 $6.00 tor shipping Is III you PlY wIIIIl. Apple II User's Guide 15.00 ALDS 95 Easy writer 40 col. 79.96 the conHnen ..1 USA vii UPS suFfIce. Allow 14 lASC ,.9 Easy Mailer 40 Col 62.95 working days lor personal and company checks to CP/M User's Guide 11.00 Mlcropro Easy Mover 40 Col 44.95 clear. Credit card charges limited to $1000. No CBASIC User's Guide 13.50 WQfdstar $235 SoItwIre Publlslng Carp. COD's. FPO, APO or orders outside continental USA Science & Engineering Prog. 14.80 call or write for shipping charges or add 20% to 6502 Assembly Language Prog. 15.30 ~~~S~~rge ~~ ~:;~g~:: ~~~8rtS;~~~~s ~:= purchase price (any difference will be refunded). Spellstar 1118 Stoneware 6502 assembly Language Prog, 11.70 California residents add 6% sales tax. All offers sub­ Z·80 Assembly Language Prog. Calcstar 1511 DB Master $179 15.30 Supersort I 159 DB Master Utility Pack $89 ject to change or withdrawal wijhout notice. Word Star Made Easy 7.25 Game I/O over loaded? Oon't open your Peachln. SOftwlnl 'CPM is a registered trademark of Digital Research. Manallement Intonnation Source Gen'l Ledger $180 Apple. Get the two-plug Paddle-Addapple. The Power of Visicalc Switch selectable and reasonably priced. 9.05 ~~':~~~' ~a~~o::o 1~~r.n~~~lon 225

Apple Pugetsound Program Library Exchange Page 0070 of 0102 Call-A.P.P.L.E. Magazine • May 1982

A CALL -A.P.P.LE. TECHNOTE: TOTAL AMNESIA

Val J. Golding

N a previous issue, Ralph Conditional exits are the major The third condition which can Swerdlow touched briefly on bugaboo. Most users are not aware often cause an ?OUT OF MEMORY , problems encountered when that a FOR loop (at least in a complex error often results from a legitimate the POP command is not program), must be exited in a specific bug in the ONERR handler. Two utilized to clear a return address from manner to [again] prevent leaving it solutions are possible here. We first the 6502 stack. This is an ongoing with a pending operation. Suppose refer you to pages 81-82 of the problem that faces Applesoft users. your program looks like this: Applesoft ][ Programming manual for While we cannot realistically con­ specific information on using the err sider the ?OUT OF MEMORY error 100 FOR I = 1 TO 10 handler in a FOR loop, a GOSUB, or as an Applesoft bug, it is, neverthe­ 110 READ Z$ in conjunction with GET statements less, a serious problem for those who 120 IF Z$ = "BYE" THEN 500 (which have their own bugs). There is program in Applesoft and fail to 130 NEXT I a short machine language program adhere to the strict requirements of there that will help solve some of the exiting GOSUBS and FOR loops in a In a simple program this would problems. However, the second (and proper manner. Indeed, "I'm getting work as intended. However, in a pro­ recommended) solution is when an an OUT OF MEMORY ERROR, and gram where this loop was executed error can reasonably be anticipated, repeatedly, and the branch to 500 when I do a FRE(O), it shows plenty such as checking for a FILE NOT of memory left" is one of the most was taken, eventually you would run FOUND error in a program that first into the ?OUT OF MEMORY error. frequent questions we handle on the checks to see if the file exists, is do The solution is, even on a conditional Hot Line. not do this within a subroutine. Actually, nine times out of ten, exit, to bring the loop to its expected Instead, use two GOTO's, the first to OUT OF MEMORY is a misnomer. conclusion. In the subject program, execute the routine to see if the file we would change line 120 to read: To correctly describe the most com­ exists, and the second to "return" to mon cause of receiving this error the next program statement to be 120 IF Z$ = "BYE" THEN I = 10: executed. message, we should rename it NEXT I : GOTO 500 STACK OVERFLOW. As we hinted, In the event "returns" are required the problem is not a "bug" in Apple­ This will have the effect of mov­ to different locations in the program, soft, but rather Applesoft's over-use ing the loop counter to its maximum a system of flags in connection with of the 6502 stack, which in turn re­ value plus one, the same condition an ON ... GOTO statement may be quires that users trace the logic of you would reach upon a normal exit used. For example: their code quite carefully. If the code from the loop. 230 X=1: GOTO 8000 is correctly written, a stack overflow Secondly, (and we learned this the error will rarely occur. hard way), you must exit a GOSUB The stopgap method of prevent­ with either a RETURN or a POP. ing this error is a CALL 54915, which Either command will have the same 340 X=2: GOTO 8000 clears the stack, including pending ultimate effect, that of clearing the GOSUBS and FORs, thus must not return address from the stack. In the be used when either is active. case of the RETURN, Applesoft will 8030 ON X GOTO 240, 350, ETC The best prevention, however, is look at the stack, determine the line to write your code in such a manner to be returned to, remove the return By following the foregoing sug­ that precludes the possibility of address from the stack, then jump gestions, you should find a cure for unintentionally leaving something to the address specified. If a condi­ your Apple's amnesia! ~ "hanging" in the stack. Let's start tional exit is possible within a with the FOR ... NEXT loop. In "? subroutine, then prior to exiting the Applesoft Error ", Call -A.p.p.L.E. subroutine, a POP command must be in Depth 1; All About Applesoft, Cornelis issued. This works just like the Bongers described an obscure error, RETURN does, insofar as removing and in the process explained how the the return address from the stack is stack processes a FOR loop. We concerned, but unlike the RETURN, recommend that article for your it does not go back to the calling reading and further understanding of routine; it goes to the line number the problem at hand. specified by the following GOTO. Thus, in a subroutine with a condi­ tional exit, the exit line might read: IF X=99 THEN POP: GOTO 900.

Call -A.P.P.L.E. May 1982 67 Apple Pugetsound Program Library Exchange I Page 0071 of 0102 Call-A.P.P.L.E. Magazine • May 1982

Cleo was quite a girl! To a lover in Rome she had to write in Roman: ROMAN

To her subjects in Egypt she had to write in l.\lIIp.~. • • L..:.. hieroglyphics: "'~ I ._",

It's a good thing she had an MPI graphics printer available that could handle an unlimited number And when she wrote to the Israelites, she obvi­ of print fonts. And it's even more incredible that ously had to use Hebrew: Cleo's MPI printer was price competitive with the inexpensive printers from overseas. Yes

C 1 e 0 was C 1 eve r

If you have letter writing chores, don't trust them to a mere mortal. Get an MPI Printer and make A 111111 your MARC in society. The Printer People Micro Peripherals, Inc. 4426 South Century Drive Salt Lake City, Utah 84107 (801) 263-3081 1

Apple Pugetsound Program Library Exchange Page 0072 of 0102 Call-A.P.P.L.E. Magazine • May 1982

A CALL -AP.P.LE. TECHNOTE: USING A FIRMWARE CARD IN SLOT 4

David Morganstei;,/Washington Apple Pi

ANY Apple owners have Now, given that we need only Example: upgraded their computer change the indicated two bytes, what by adding 16K memory else is desired? What if you don't 100 POKE·23112,192:POKE- Mcards which reside in Slot O. always have the firmware card in 23104,193 These cards have many uses (Pascal, place? What if you want to check to CP/M, VisiCalc, etc.). In the process, see if there is one, and if so, modify Note the firmare card could also firmware cards containing Integer DOS accordingly? If not, you want to be recognized in any other slot, but Basic or Applesoft have been removed load the appropriate binary file into the switch on the back prevents it and shelved. After all, since you can your memory card. How to solve that from physically fitting. load these languages into the one?? To answer this, disassemble the memory card, who needs the firm­ There was a proposed solution in DOS code starting at A5B2. This ware card? the AAL, September issue. I tried it routine is described in Beneath Apple Like Mt. Everest, some of us may but found a fatal flaw. It appears to DOS as the subroutine CALLed to want to use the card "because it's work fine if the firmware card is switch between versions of BASIC. there." Actually, several reasons there, but didn't realize when it The routine shown is entered with justify this desire. First, it takes a wasn't. My answer is given below. either a 4C or a 20 in the accumula· while to load (and sometimes reload) Essentially, the program determines tor, the former indicating that Apple­ the 50 sector FPBASIC or INT­ what BASIC is active, then tries to soft is desired and the latter that BASIC program into the language toggle any slot 4 device. If $EOOO Integer is the choice. Looking at card. Second, some protected disk changes, then a firmware card is pre­ the code we see that the accumulator systems wipe out the language card sent, and DOS should be modified is compared with $EOOO, the warm contents and, in the process, may with the two bytes mentioned above start location for either BASIC. If the make the programs on the disk (after which the firmware card must right BASIC is active, a branch to a unusable to the purchaser ("Tawala's be retoggled to return to the original subroutine return is made, RTS. If Last Redoubt" is such a protected state.) If no change in $EOOO is found, not, a store to $C080 is done, STA disk.) However, having the needed the retoggle is tried to invoke the $C080. What does this store accom­ language on a firmware card may motherboard language. Again $EOOO plish? It turns on the peripheral in slot make it possible to use such pro­ is checked and the same logic follows. zero, causing a change of BASICs if grams. Third, perhaps most impor­ I modified the HELLO program either a memory card or firmware tantly, you can now obtain programs to enter this routine and then CALL card is in the slot (Note an LDA, load which will move DOS onto a 16K it prior to loading the language card accumulator, would accomplish the board in slot zero. Doing so wipes out (i.e., CALL 768). After the CALL, a same thing. Address $C080 is not a the BASIC normally located on the PEEK to 42424 ($A5B8) will tell you RAM location, just a switch). Aha, card. If you have a firmware card in if the DOS has been changed. If so, you say, what if we change the address some other slot, though, you can have end the HELLO program before to $C080 + $40 to refer to slot 4 in­ the additional10.2K of RAM for use loading the language card. stead?!! Well, you would have it, in either BASIC!!! Two alternative methods of mak­ because that's exactly what putting a Given that you have both a ing the suggested changes are avail­ $CO (= $80 + $40) in A5B8 does. memory card and a firmware card, able: Using Disk Zap or a similar edit Continuing on in the subroutine, if how to proceed. My thanks to Bob utility, the changes may be made on a the correct BASIC is still not in Sander-Cederlof and his Apple permanent basis by reading in track effect, a STA to $C081 is tried, this Assembly Line magazine (a recom­ 1, sector 4 and changing byte $B8 to will turn off the peripheral card. mended newsletter if you want to $CO and byte $CO to a $C1, then Similarly, by changing the STA to learn about machine language ... PO writing the sector back to disk. For refer to $COC1, the subroutine will Box 280300 Dallas, Texas. 75228) for slot 2, use $AO and $A1; $FO and $F1 now function to switch between the starting clue. The second tip is would be used for slot 7. motherboard BASIC and firmware found in Beneath Apple DOS (another The second method would be to card in slot 4. t!i excellent book on the Apple's disk add a couple of POKEs to your hello operating system). According to the program, using the following table July AAL, putting a CO in A5B8 and to determine the appropriate values a C1 in A5CO (i.e., from the monitor to POKE for a firmware card in slot type * A5B8:CO then * A5CO:C1) will 2,4 or 7: do the trick. "What is the trick?" you may ask. Loc'n ·23112 ·23104 Slot 2 160 161 Slot 4 192 193 Slot 7 240 241

Call -A.P.P.l.E. May 1982 69 Apple Pugetsound Program Library Exchange I Page 0073 of 0102 Call-A.P.P.L.E. Magazine • May 1982

USING A FIRMWARE CARD IN SLOT 4

4 A5 B2: CD 00 EO S CMP SEOOO iCompare A with current BASIC A5 B5 : FO DE 6 BEQ SASCS ilf desired BASIC active, elit A5 B1: 8D 80 CO 7 STA SCOSO ilf not, turn on slot zero device AS BA: CD 00 EO S CMP SE 0 00 iSee if desired BASIC now active A5 BD: FO 06 9 BEQ SA5C5 ilf so, exit A 5BF : 80 81 CO 10 STA SCOSl ilf not, turn off slot zero card AS C2: CD 00 EO 11 CMP $E 000 iCompare again AS C5: 60 12 RTS ilJe've tried all we can

0300 : AE 00 EO 6 LDX SEOOO iCheck if BASIC changes 0303 : AD CO CO 7 LDA SCOCO ;(COAO slot 2, cora slot 7) 0306 : EC 00 EO 8 CPX SEOOO 0309 : DO 09 9 BNE $ 0 314 03 DB: AD C1 CO 10 LDA SCOCl i(COAl slot 2, COFt slot 7) 03 DE: EC 00 EO 11 CPX SED 00 0311 : DO 01 12 BNE S0314 ilf not, return 0313 : 60 13 RTS 0314 : A9 CO 14 LOA UCO ilf so, modify DOS 0316 : 8D B8 AS 15 STA SA5 B8 0319 : A9 C1 16 LDA UC1 0318 : 80 CO AS 17 STA SA5CO 03lE : EC 00 EO 18 CPX SED 00 Determine if firmware was active 03 2t : DO 01 19 BNE $0324 If not change state 0323 : 60 20 RTS If so return 0324 : AD CO CO 21 LDA SCOCO Turn on peripheral 0327 : EC 00 EO 22 CPX SEOOO 032A : DO 01 23 BNE SO 3 2D Is original BASIC back? 03 2C: 60 24 RTS Yes, return 0320 : AD Cl CO 2S LDA $ CO Cl No, turn off card 0330 : 60 26 RTS

JLIST S REM IT'S HERE!! SO "'HAT DID YOU EXPECT An easy-to-use & low cost system for storing by Tim Jackson home or small business financial records. Call -A.P.F .L.E. Announcing 10 HGR2 20 T :: 2 BUSINESSMASTER GENERAL LEDGER 30 POKE 228, RND (1) 'I( 128 The easiest program to use with the highest professional 40 B :: INT ( RND (1) lit (96 - T I results Don't pay $150 to $200 for a general ledger 2» .. 2 + T + 1 program when you can get the same accounting power for 50 FOR T = K TO B STEP 2 1 55 IF K < 1 THEN K :: 1 less that $80 FEATURES: 60 HPLOT 1,K TO 278,K -Easy entry FUOlilCl .... 'OiITIDO , ..u 1-1'" -Easyedillng ------_ ..... 70 NEXT -Menu driven 80 POKE 228, RND (1) "I( 128 + 128 eAutomatlc error 90 T :: INT ( RND (1) lit B I 2) 11 2 checking -Five pro· 100 FOR K :: B TO T STEP - 2 fesSlOnal report 110 HFLOT 1,1< TO 278,K formats -Screen or pnnt- 120 NEXT complete & fully ::~~!~~~:~ er display 130 GOTO 30 documented -Works With most ponters ·Mlchigan -ReqUires Just one diSk dnve re~dents add 4% sales tax -For home or BUSINESS AUTHORS WANTED profeSSional use -ReqUires 48K (APPLE AND IBM P.C.) Applesoll-ROM If you have written Business Software for the Apple Also available IS the Buslnessmaster Accounts Computer, or the IBM personal computer, Westware, Inc., Receivable/Accounts Payable program for just $79.95·. would like to hear from you. SAVE OVER $10. Order both the General Ledger and the Receivable/Payable programs for $149.00·. Save valuable Westware, Inc., offers national advertising, experienced time and money_ Dealer inquiries welcome. documentation writing, and software support. If you are interested in nationally marketing your business product, write: WESTWARE SOFTWARE, INC. 2455 S. W. 4th Avenue, Suite #2 Ontario, OR 97914

70 Call -A.P.P.LE. May 1982

Apple Pugetsound Program Library Exchange Page 0074 of 0102 Call-A.P.P.L.E. Magazine • May 1982

WHY YOU NEED LOCKSMITH.

'Vou've invested some money and a lot of time in a software that is traceable back to the purchaser). I vcommerdal software program for your Apple. It works well, to the point that you are dependent on its day-to-day T ocksmith includes nine other utilities, of which these functioning. But the disks are copy-protected. So you are .I.J five are vital to the integrity of your system: 1. Media also dependent on the vendor's back-up (if furnished), on surface check - Never commit data to a flawed diskette his living up to vague promises of support, even on his again. 2. Disk-drive speed calibration - the most frequent ability to stay in business. cause of communication bugs between Apples. 3. Degauss and Erase - Make sure no stray data is left over. 4. o computer user can live with that. So until the Nibble-Editor - sophisticated read/write tool for repairing Nsituation changes (and it will), you need Locksmith. blown disks. 5. Quickscan - Check for unreliable data, find used and unused tracks. T ocksmith (new 4.0 version) will copy almost all .I.J "protected" diskettes for the Apple. It is the most reliable ,til for just $99.95 at your local dealer or direct. You nibble-copy program you can buy. Locksmith is suitable tl: don't just need Locksmith. You can't afford to be without only for backups, because the copies it. Mastercard and Visa include all serial numbers, codes holders order toll-free, ~ ~ A ...r'\ and protection features of the 1-800-835-2246. ~ V '11 ~ original (under the new copyright law, you'd have to be pretty OMEGA M1CROWARE, INC. foolish to try bootlegging 222 So. RIVERSIDE PLAZA CHICAGO, IL 60606 312-648-1944

Apple is a registered tradem2rk of Apple Computer, Inc

KING COBRA Oisl.: Adepter I(;t -con'Verts the Shugart SA4QO • to full compallb, Ilty use WIth the Apple" -100~ operatIon compatible wlth all Apple functIons. software, etc'" -takes less than 1/2 hour (i f you use your own SA400) -lakes less than 10 m;nutes with the Jumper SA400 below!!! JUST PLUG I N A SMALL ADAPTER BOARD'" -thE kit lncludes: -Adapter bo.rO anD essembly ;nstructtons (VERY EASV~) -ALL C.bles' -THE K i~Ui~O~u~~~o~~~g~~~~~~T~gR D ~~K D~~~ ~~ CAB I NET (Look. Ii ko t noApp I. )

THE ExACT SAME DRIVE MECHANISM AS THE APPLE D!SK DRIVE" ONLY $79.95!

Due tc 'ncrltll$~ci pow~r reQUIrements. onl) one SA408 should be used per s,"stern. Ju"'porod SA400- Only 52,SO.00! Rogu I.. SA400- On I y 5230.00' "Shugort SA400L d .. " d"vo Svstem:: ulready s.t1esslng th(' pCWC:1 sup['11 ma, ~uv(' trouble uSln~ it-.' 0' I \.0 { (PLEASE CALL }I= YOu HAVE QUESTIONS"

-handsome jet blac~ cases with brushed IIluminum sticks -c:ompatllble ..... itt, IIny software and 1/0 extens\on unit -longl1fe switches -Our DUAL costs less than most SINGLE Joysticksft! -I f le.ible, powerful, control system for computer input for exc;ting, competitive games'

SINCLE COBRASTICK Joystick, with one button input, »519.95

check or money order or call (312) 393-4385

Aod !"3.0C lo~ h"no Inc uno In$U"f\ncc RJ ELECTRONICS LABORATORY Aod 56.00 for f1andl"",~ fo" St.~OO'S 0" ;)lS~ AdliptE'''' 25;;.. dcpcs't reQUIred 0" COD ordE'tt over $10C Box 186 Naperville. IL 60566

Call -A.P.P.LE. May 1982 71

Apple Pugetsound Program Library Exchange Page 0075 of 0102 Call-A.P.P.L.E. Magazine • May 1982

one Apple o Apples? When you add J.O.Y.TM Sometimes one Apple isn't enough. Such as when you're sitting around wait­ ing for your printer to finish its work before you can start your next program run. But now you don't need a second Apple if you want to print and compute at the same time. Now you can use J.O.Y. J.O.Y. is the software program that actually lets your Apple print and com­ pute simultaneously. When you add J.O.Y. to your Apple, you'll be able to run programs from your keyboard at the same time your printer is working. J.O.Y. is not a microbuffer. Its application is not limited to parallel printers. In fact, J.O.Y. works with any printer, card and slot. With DOS 3.3 and 48k of RAM, J.O.Y. can print text files or Apple-Soft program files. And it costs only a refreshing $39.95. (Pennsylvania residents add 6% sales tax.) To order J.O.Y. for your computer, call us toll free at 800-233-7512. In Penn­ sylvania call 717-243-5373. Or write us at XPS, Inc., 323 York Road, Carlisle,PA 17013. We'll also be glad to send you our catalog of other innovative software, free. Apple and Apple-Soft are registered trademarks of Apple Computer, Inc. Quality Microcomputer Software 323 York Road, Carlisle, PA 17013 ~'P.S, ~~, (800) 233-7512/ (717) 243-5373

Apple Pugetsound Program Library Exchange Page 0076 of 0102 Call-A.P.P.L.E. Magazine • May 1982 STACK AND STATUS TRACE FOR APPLE FORTH

Guy T. Grotke/San Diego Apple Corps

HIS short utility program may Next in the program I defined S? prove very useful for both to non-destructively print the stack newcomers trying to learn contents and the current base. SS will Tabout stack manipulation and compile to contain two code field ad­ "old hands" trying to track down a dresses. The first will, of course, be stack error in a complex definition. that of S? The next will be that of Be forewarned, this is not a Forth-79 whatever oldcfa refers to. In most standard program, since it patches cases it will be STATE. SS is the ac­ into the dictionary and also uses tual definition which will be patched unique Apple hardware addresses. into QUIT. The net effect on QUIT CLR sets up the variable AP as a will be simply to add S?, since SS also pointer for output and clears the bot­ includes the overwritten word. tom two lines of the Apple text INSTALL makes the patch, screen. On the next line, the contents clears the bottom of the screen, and of the address locations $10 and $11 sets the cursor and window locations. into QUIT is stored as the constant To use the trace function, load the OLDCF A. This is done so that we definitions and then type "INSTALL can patch and unpatch later. In most [return]." The stack contents and implementations of Forth on the Ap­ current base will be printed each time ple, the code field address of STATE through the QUIT loop. Try putting is stored there. You can check this by a few numbers on the stack and then typing: HEX 'QUIT 10 + @ 2 + SWAP, *, and so forth. NFA ID. Ireturn]. If Forth prints REMOVE is very important! "STATE OK", then the program is QUIT is now patched with the ad­ sure to work. I patched into QUIT dress of SS, so if you FORGET SS because it is the normal interactive without replacing the old address, loop. QUIT consists of CR QUERY QUIT will execute that perennial INTERPRET STATE @ IF . "OK" favorite of us Forth'ers: BLOW-UP. THEN inside of an endless loop. Just type "REMOVE [return]" QUERY gets a line from the user and before FORGETting anything and then INTERPRET compiles or exe­ you'll be OK. t!I cutes the words entered. I patched in at STATE because it was a conven­ ient place after INTERPRET.

SCR #85 o ( STACK AND STATUS TRACE GTC ) 1 FORTH DEFINITIONS HEX Z 0 VARIABLE AP ( ADDRESS POINTER 3 CLR 700 DUP AP ! 27 20 FILL: 4 I QUIT 10 + @ CONSTANT OLDCFA 5 5? CLR SP@ 50 @ OVER OVER IF 6 DO I 2 - @ 0 < * *5 *) AP @ SVAP 7 DUP 1+ AP +! CMOVE 8 AP @ 7FO > IF CLR THEN 9 -2 +LOOP EL5E DROP DROP THEN lU BASE @ DUP DECIMAL BD42 AP @ ! 11 0 <# *S *> AP @ 2+ S~AP CMOVE 12 BASE! ; 13 5S 5? [ OLDCFA , J ; 14 INSTALL I SS CFA I QUIT 10 + ! 15 CR CR 750 28 20 FILL 700 28 20 FILL 16 15 25 C! 16 23 C! (SET CURSOR) 17 REMOVE OLDCFA I QUIT 10 + ! 18 18 23 C! ( RESET ~INDO~ ) 19 DEC I MAL 20 ; S 21 22 23

Call -A.P.P.L.E. May 1982 73 Apple Pugetsound Program Library Exchange Page 0077 of 0102 Call-A.P.P.L.E. Magazine • May 1982 l 1~~BUi!~rA~P~~Of~~~~r~Ce at affordable prices. \ ~ \ For the FIRST time - PACKED ~A" disks with 60 outstanding I~ - .-" . t ~~Oug/~~;ie" needs programs! ."aI!AAI4;J At last you have an opportunity ...... to use your Apple" to its fullest , 1- aA--" capacity! ~~ . IiPPLEWIiRE ~I':i[. offers on each disk an extensive variety of programs including:

Business Printer Graphics Games Text Music Utilities Data Base Finance Science Engineering and many others with 3.3 DOS for easy demuffining.

First 3 disks available at $59.95 each Order all 3 for a free bonus disk. Call now toll free: 1-800-327-8664 Fla. Residents: 305-584-7004 Please add $3 for postage & handling. 6400 Hayes St. Hollywood, FL 33024 :Ie • *TM Apple is a registered trademark of Apple Computer Co.

GetMOREoutof VISICALC With [!o~~~lll~!f!J e00..00

V-UTILITY CONSiSTS OF THE FOLLOWING APPLE II ALL PROGRAMS AVAILABLE PROGRAMS THAT EXPAND THE USE OF VISICALC. SEPARATELY $39.95 EACH PROVIDES THE FOLLOWING SELECTION OF OVERLAYS TO LOAD ON TO THE VISICALC SHEET. MOVING AVERAGES, EXPOTENTIAL SMOOTHING EQUATIONS, STOCK AND COMMODITY TREND EQUATIONS, DATE COLUMNS FOR DAYS MARKET IS OPEN, A REAL TIME SAVER.

THIS PROGRAM AUTOMATICALr.y INPUTS DATA FROM A VISICALC COLUMN, PERFORMS AUTO SCALING THEN PLOTS EITHER 1 OR 2 COLUMNS ON A REGULAR LINE PRINTER (GRAPHICS PRINTER NOT REQUIRED), IDEAL FOR QUICK ANALYSIS OF UP TO 254 NUMERICAL DATA POINTS.

PROGRAM COLLECTS DATA AUTOMATICALLY FROM THE VISICALC COLUMN AND CALCULATES [I:,$"iJI\,T,] NUMERICAL DISTRIBUTION, CORRELATION COEFFICIENT, REGRESSION ANALYSIS, CHI 2 TEST AND T-TEST, YOU SELECT THE COLUMNS FOR DATA ENTRY AND SPECIFY THE ROW' TO START AND ROW' TO END DATA COLLECTION ,A VALUABLE PROGRAM FOR MANUFACTURING, ENGINEERING, EDUCATION, AND STOCK ANALYSIS. PROGRAM IS EASY TO OPERATE. WITH THIS PROGRAM YOU MAY SELECT THOSE COLUMNS YOU WANT TO PRINT AND PLACE THEM IN ANY ORDER YOU SELECT. A VERY FLEXIBLE VISICALC PRINTING UTILITY. WID[!£EfJ In ~(WllFB }Urn]] "The State of the Art in Educational Computing" 12343 12TH ST· YUCAIPA·CA·92399 21 Millbrook Drive I Stony Brook, NY 11790 I (5161 751-5139 I OEPT F Krell Software Corp. has no offtdal ties with the College Entrance Examination PHONE (7141 797-6331 Board or the Educational T.. tIng ServIce. KreD Is, however, a supplier of products to the E.1.5. N.Y.S. residents add sales tax. APPLE II is a Trademark of APPLE COMPUTER INC PROGRAMS AVAIlABLE FOR THE TRS80, APPLE II, PET & ATARI. VISICALC is a Trademark of PERSONAL SOFTWARE INC 'Tnodemarks of Apple Comp Corp., Tandy Corp., Commodore Corp., Atari Corp. DOS 3,2 OR DOS 3.3

74 Call -A.P.P.LE. May 1982 Apple Pugetsound Program Library Exchange Page 0078 of 0102 Call-A.P.P.L.E. Magazine • May 1982

A CALL -A.P.P.L.E. REVIEW: THE INSPECTOR

Charlie Stillman

The Inspector because there is no factor of load operate at addresses other than $300 by Bill Sefton time. A CALL -10240 from Integer or areas used as buffer by the Inspec­ a utility program available will bring it up instantly. tor. The suggestion proved effective, on disk or as a $D8 ROM When called, a partitioned screen although I had to reassemble my is displayed. The top four lines con­ driver which normally resides at $300. Omega Software Products tinue to display operating parameters A nice enhancement to this excellent 222 S. Riverside Plaza while the remainder changes in package would be a provision to sa ve a Chicago, IL 60606 $49.95 accordance with the current data screen display to disk for later requested. Most often, the display is printout. HE Inspector is a utility of a sector dump in hex. The "A" The weakest area in the entire similar to products such as command will toggle between this Inspector is in its documentation, and Dan's Disk Utility, Disk Zap and an ASCII display, which is very even that is not a major drawback. I Tand others whose purpose is helpful when reading the directory or have seen much worse. The primary to give you access to diskette sectors. a text file. A second toggle function failing is in the clarity of some of the The usual approach is to read a sector switches flashing and inverse ASCII information, particularly with regard from disk and store it in a buffer characters to normal. to use of the edit and search modes. somewhere in RAM memory where One feature I have not seen on The only other serious error is in it can be displayed on the screen for any of the other utilities around is the doing an ASCII edit. The manual examination and editing if necessary. ability to edit (modify) in hex or says you should enter an "N" for Once modified, the data can then be ASCII. If you are entering ASCII, negative ASCII, when in fact the N wri tten back to the disk. you have a choice of regular, negative produces normal ASCII and a space If you have ever "blown" a disk (high bit set) or lower case. The last gives you negative. When using with a vital file on it, you know that two require entering a "N" or "L" in either of the search modes, the buffer sinking feeling in your stomach when edit mode before typing the data. is set to $00 to enter the search bytes, DOS prints an 1/0 ERROR message. Easy to use single key commands but the manual fails to remind the At that point, having a utility like establish the usual parameters of user to reset the buffer to $800 or the The Inspector is usually your only drive and slot number, track and search will fail. On the other hand, it hope of recovering the lost data. The sector, read and edit, and scan looks like Omega has made. an effort problem most commonly encountered forward or back. To write to the disk to include as much helpful data as is a VTOC on the disk having been requires two keystrokes (a control possible. This includes a tear-off overwritten. In this event, a disk can W), an excellent safety feature. One card with abbreviated commands, a often be repaired by reading a VTOC unique idea I liked was the capability hex-dec conversion chart and a from a known good disk and writing it of specifying where in memory the suggested reading list. Another help­ back to the damaged one. buffer will be located (it defaults to ful feature of the documentation is At this point I have barely touched $0800). This is also used in conjunc­ numerous photos of sample screen on the features of The Inspector. It tion with a Ctrl I command which displays. Also to their credit, their has several unique routines I have not increments both sector and buffer, telephone number is printed in large seen on many other utilities, such as a enabling one to read or write entire type, along with a message implying nibble read and a memory search. It tracks easily. a high level of user support. comes with a 32 page instruction Other routines not found on most This is not a tool for the inexper­ manual that goes beyond the bare utilities of this type include a map of ienced, but even a novice, by study­ necessities of telling you how to use all used and unused sectors, a nibble ing the DOS Manual and other refer­ The Inspector, since it offers a good read and display function which uses ence material, could make good use deal of miscellaneous information the hi-res screen for display, and disk of it. I for one, would not want to be such as how to undelete a file or and memory search routines that without it the day my disk gives an locate RWTS on a modified DOS. look for hex or ASCII strings. Setting "1/0 ERROR" instead of cataloging. It will run on any standard Apple up a search is a little awkward, but II or an Apple II Plus with either an once done, searching a sequence of t!i Integer firmware card or a slot 0 sectors is easy. In addition, Ctrl Z is RAM card. For those systems with set up to do a jump to a user routine A companion $DO ROM is Integer Basic in ROM, it may be located at $300. A screen dump rou­ expected to be released in the ordered as a plug-in EPROM. For a tine is also furnished, as hard copy is near future. Plus machine with a RAM card, it is not possible otherwise. In the docu­ also available on diskette. No price mentation, a standard printer inter­ differential was shown in the material face is assumed. However, when I I have seen. The fact that it uses the telephoned Omega Software, they $D800 area of memory is one of its suggested a patch to allow the use of most handy and time-saving features, special drivers providing that they

Call -A.P.P.L.E. May 1982 75 Apple Pugetsound Program Library Exchange I Page 0079 of 0102 Call-A.P.P.L.E. Magazine • May 1982

WHY YOU NEED THE INSPECTOR.

f you're serious about programming, you need read and alter files, locate strings in memory or on I to set all your utilities together in one place - disk. The uses are endless. The manual, alone, is an inside your Apple. The Inspector comes on an education. And it's always there when you need it. Eprom that simply plugs into the D8 socket, or on a disk ready to merge with Integer Basic for Vou need the most powerful disk and memory automatic loading on boot. Either way, it stays at I utility available for your Apple. You need the your fingertips, ready to call without disturbing Inspector. your current program. ee your local dealer, or order direct for just he Inspector puts you in total control of both S$49.95. Mastercard and Visa holders order T memory and disks. You can search forward toll-free, 1-800-835-2246. and backwards, edit, read nibbles, map disk space, dump the screen to a printer, examine every secret 0AN\,0 of your Apple. Use The Inspector OMEGA M1CROWARE, INC. to repair blown disks, undelete 222 SO. RIVERSIDE PLAZA files, input "illegal" commands, CHICAGO, IL 60606 80\: • by 312-648-1944 bill I sefton

Apple is a registered trademark of Apple Computer, Jnc BREAK THE TIME BARRIER! Speed-up and expand Apple][ functions with TWO all-new, low-cost utilities... * 1. UNIVERSAL BOOT INITIALIZER (UBI) ...... $49.95 • Initializes DOS 3.3 or3.2.1 disks that load RAM Cardon boot in 1.7 seconds .• UBI-initialized disks will RUN (BRUN or EXEC) one of two GREETING programs supplied by the user.• Built-in error handling capacity ensures execution of correct GREETING program whether one BASIC or both BASICs are available. • Obsoletes use of Apple's BASICS disk and DOS 3.3 System Master disk for fast single-disk direct booting. • The DOS 3.2.1 UBI-initialized disk boots on either 13 or 16 sector PROMS .• Multiple copies of UBI-initialized disks can be made with standard copy programs. 2. AMPER·SORT IMERGE (A·S/M) ...... $49.95 • Can sort 1000 records in seconds. • General purpose Disk Sort/Merge Utility for Apple DOS 3.3 text files .• MIL Read, Sort and Merge for speed .• Sorts up to 5 input files into 1 output file .• Sorts random or sequential filesalphanumerically (Ascending or Descending) up to 5 fields. • Merges 2 to 5 pre-sorted files into a single file .• Compatible with most data base programs that create standard DOS 3.3 text files [e.g., VisiCorp's VisiFiles (formerly Personal Software's CCA DMS files)]. SYSTEM REQUIREMENTS: 48K Apple]( or ](+, ROM or RAM Card, DOS 3.3 (or DOS 3.2.1 for UBI) and one or more disk drives. COST: $49.95 (+$3.00 Postage and Handling) for each Utility Disk (with Training Disk and Manual). FOR ONLY $15: You can get the Training Disk and Instruction Manual for either utility. CREDIT CARDS: [VISA, MC or AMER EXPj Cali eyber1rDn'eS 'n1ernaUDna~~ 'ne. Clearinghouse: (212) 532-3089. MAIL ORDER: Send check (no Purchase Orders or C.O.D.'s) to S&H Software, Box 5, Manvel, NO 58256.

*LICENSED FROM APPLE: All Apple Computer Inc. programs - FPBAS/C, INTBAS/C, DOS 3.3 & DOS 3.2.1 - used in S & H Software's utility programs are licensed from Apple Computer Inc. by S & H Software. The unique UBI license to software vendors allows their use of these Apple Computer copyrighted programs to execute their programs on UBI-created disks, without further licensing from Apple Computer Inc. Software vendors' inquiries invited for both utilities.

Box 5 Manvel ND 58256 (701) 696-2574 S&H Software ff

76 Cali -A.P.P.LE. May 1982

Apple Pugetsound Program Library Exchange Page 0080 of 0102 Call-A.P.P.L.E. Magazine • May 1982 We'll make your Apple* feel right at Ohm!

Ohm/Electronics has 3 great complements for your Apple*.

LINE MONITOR DELUXE GAME POWER CONDITIONER DISKETTES PADDLE SYSTEM

Protect your Apple' investment. Filter Having fun with your Apple' is easier out power surges and electrical with Scooter's D-subminiature sock­ spikes that can cause data loss and et connection plus an extra extension circuit failure. 15 amp slow-blow fuse. Your Apple' deserves the best: to restore your original game socket. Maximum spike voltage: 6000 volts. Scotch 744-0-RH 5%" Mini­ And Scooter game paddles are built Clamping spike voltage: 325. Surge Diskettes. Scotch leads the field with to last with sturdy enclosures and current damping ratio: no greater features like PVC jacket, fabric liner, heavy duty Mil-spec components than 2.03: 1. Six outlets and 9 foot reinforced hub rings for durability throughout. Scooter Deluxe Game cord. Power Master builds in reliability and low abrasivity for longer life of Paddle System: $59.95 for the life of your Apple'. read/ write heads. If it's worth re­ Scooter Game Paddle with standard Power Master 1200: $65.35 membering, it's worth Scotch Disket­ DIP plug: $39.95 (DEALERS NEEDED IN KEY MAR­ tes. (DEALERS NEEDED IN KEY MAR­ KETS) Scotch 744-0-RH lO-Pack: $28.00 KETS) Watch for high-grade Scooter™ electronic components coming soon to your local computer store. 746 VERMONT AVE. PALATINE, ILL. 60067. (312) 359-5500 rtl ohm/electronic$, C Please send me __ Scooter Deluxe Game Paddle System(s). My check or money order for __Please send me $59.95 each is included. Please send Power Masler Please send me __Scotch 744-0-RH Mini- me __Scooter Game Paddle(s) with standard 12oo(s). My check or money order for $65.35 plus Di~kelte 10-Pack(s) . My check or money order for DIP pluQ. My check or money order for $39.95 $2.50 for postage is included. Illinois residents $2 .00 each is included. Postage prepaid. Illinois each is included. Postage prepaid. Illinois resi- add 6%. residents add 6%. dents add 6%.

Name Name Name

Address Address Address

City State lip City State Zip City State Zip Please allow 3 weeks for delivery. CM-82 Please allow 3 weeks for delivery. CM-82 Please allow 3 weeks for delivery. CM-82

Apple IS a registered trademark of Apple Computer. Inc.

Apple Pugetsound Program Library Exchange Page 0081 of 0102 Call-A.P.P.L.E. Magazine • May 1982 Time II The most powerful, easiest to use, clock for your APPLE

• TIME IN HOURS, MINUTES AND SECONDS. I

• DATE WITH YEAR. MONTH, DA Y OF WEEK AND LEAP YEAR.

• FAST DATE AND TIME SETTING. • PROGRAM SELECTABLE 24 HOUR MILITARY FORMAT OR 12 HOUR WITH AM/PM FORMAT. • WILL ENHANCE PROGRAMS FOR ACCOUNTING, TIME AND ENERGY MANAGEMENT, REMOTE CONTROL OF APPLIANCES, LABORATORY ANALYSIS, PROCESS CONTROL, AND MORE. • DIP SWITCH SELECTABLE INTERRUPTS PERMIT FOREGROUNDI BACKGROUND OPERATION OF TWO PROGRAMS SIMULTA­ NEOUSLY. • INCLUDES DISK CONTAINING MANY TIME ORIENTED UTILITIES, • CRYSTAL CONTROLLED FOR .0005% ACCURACY. PLUS OVER 25 USER CONTRIBUTED PROGRAMS AT NO EXTRA • THE EASIEST PROGRAMMING IN BASIC. COST. • ON BOARD BATTERY BACKUP POWER FOR OVER 4 MONTHS POWER OFF OPERATION (BATTERY CHARGES WHEN APPLE IN • TWENTY·THREE PAGE OPERATING MANUAL INCLUDED. WITH ON). MANY EXAMPLES OF PROGRAMS TO USE WITH YOUR APPLE !N ANY CONFIGURATION. ALL ORDERS SHIPPED SAME DA Y SEND 5129.00 CHECK OR MONEY ORDER (TEXAS RESIDENTS ADD 5 % SALES TAX) MASTER CHARGE & VISA WELCOME

ADD $10.00 IF OUTSIDE U.SA VISA (214) 492-2027 _ ~~~[l..~~© [;~@U~~~L~:NJ@ P.O. BOX 470301 7:00 AM ·11:00 PM 7 DAYS A WEEK DALLAS, TEXAS 75247 APPLE PERIPHERALS ARE oun ONL Y BUSINESS

m012WE/Q12APhlCS ~.,# Apple' PASCAL ANIMATION GRAPHICS ....q; Ou put what in your APPLE' PASCAL PROGRAMMERS I ~o~"'''Y Do you need animation effects? Have you been looking for ~c«-«-

HERE IT lSI ~~d:"

This entire package contains NOT ONE LINE of assembly language The bits and bytes of your file will get hopelessly mixed up according 10 a cipher coding. There are NO changes to SYSTEM. LIBRARY. Everything is done "key" that you keep as secret as you want. Over one hundred million billion in plain vanilla Pascal and is thus reliable for future software different keys are available for selection. (This many keys may sound like a 101, but upgrades and transportation to other machines. it's typical of a modern encryption pron~s~.) A character set editor is provided. This is the OOS editor, and we provide a utility to move new fonts to the Pascal environment. To make your encrypted file understandable again, all you have 10 do is reactivate the appropriate key schedule and run the file back through. It's easy. SYSTEM REQUIREMENTS

64K Apple- with PASCAL 1.1 and two disk drives. GAME PADDLES are With this utility (and a few easy-to-learn mnemonic commands) you can create a needed if you will be using the 005 editor which is included. personalized encryption algorithm that is specially tailored to your needs. If you (Fonts crea ted with Apple - PILOT or the Pascal Animation Toolki tare want, you can execute successive encryptions with different keys and then strip off 100' compatible). the ooter layers, one by one, to reveal the original text. And you can call many routines from your own application programs 10 do "codebook" encryption The two-floppy set with B3-page manual is just $39.95. To check it (documentation included). out - order just the manual at $6.95 - B3 pages of good Pascal source listings and good information. Manual purchase price applies to the future purchase of the floppy diskettes, of course. Send Passage Research orders or inquiries to: HENDERSON ASSOCIATES 945 Turquoise St. , Suite G

910 Headenoa AVeDue San Diego, California 92109 Sunnyvale. California 94016 S39.50 postpaid. California residents add 61170 sales tax. Specify Software Package 4(18-246-8939 No. U-17 for Apple II or Apple II +. Memory requirement: standard 48K. Due to time required for checks to clear financial institutions, please allow 3·5 weeks for disk delivery. Software documentation shipped immediately upon receipt of Apple- and Apple- PASCAL are registered trademarks of Apple order. Computer, Inc. and/or the Board of Regenta, the University of (Apple is a registered trademark of Apple Computer, Inc.) California.

78 Call -A.P.P.LE. May 1982 Apple Pugetsound Program Library Exchange Page 0082 of 0102 Call-A.P.P.L.E. Magazine • May 1982

APPLEMASH: THINGS ABOUT STRINGS

Michael Thyng

HIS time I'd like to explore There is only one little thing you 10 A$ = "XXXXX" some of the ins and outs of should know. ill the following example, 20 B$="" the alphanumeric variables. you will note four different line 30 PRINT A$;B$;A$ In one of our recent Call numbers with what appears to be T and RUN it you get XXXXX XXXXX. -A.P.P.L.E. magazines I wrote about four different variable names. Enter If you change line 20 so it is 20 variables and used an analogy of the five line program anq RUN it. B$ = "" then the output changes to buckets being like variables. I don't Then continue this article. "XXXXXXXXXX." That shows that want to write re-runs, but let me the null character is in fact - null. bring you first timers up to date. A 10 ALEX$ = "A HAPPY BOY" The value of knowing about the null variable is like a bucket. If you put 20 ALARM$ = "THIS IS A character will become apparent when something in the bucket, it stays BEARER OF TIDINGS" we talk about the GET command. there until some other force removes 30 ALE$ = "BEWARE OF CUPS We'll do that another time. or changes it. If you look in the BEARING SUDS" When we use the term "null" bucket, you don't change the con­ 40 ALPO$ = '~SOMEONE'S here, we really mean null string; in CHOICE FOR THE POOCH" DOS files there is an actual null tents. In the same way, if you store a 50 PRINT AU value in a variable, that variable character (Ctrl @), a hex 0 which keeps that value until some other Now what you will have observed serves as an end of file marker. force acts on it to change it. Looking is that the output is "SOMEONE'S Now let's change the three line at it (that is, printing out its value) CHOICE FOR THE POOCH." Why program and expand it to demon­ does not change the value - even if is this? Well, in spite of the fact that strate some of what are known as you look at it a million times. Applesoft gives you the choice of up String Functions or Commands. Now let's look at the kind of to 238 characters, you still only can things that we can store in alpha­ deal with the first two characters. 10 A$ = "MICE LIKE CHEESE" numeric variables. We can store 20 B$ = "CATS EAT MICE" Therefore if you want to use the max­ 30 C$ = "I KNOW THAT" names, addresses, cities, states, sales imum unique number of characters codes, descriptions of alien beings, you've only got combinations of two. If A and C were numeric variables, the names of other computers (for Of course, you get the whole alphabet (and you should recall from a prior historical reference) and names of plus the numbers to mix in for the MASH that they could be) then we books. In short, we have a virtual second character. could add them together to find their gang of things that alphanumeric The next logical question you sum. As alphanumeric variables, A$ variables can retain. should ask is how much data can I and C$ can also be added together, Let's look at the way to label our store in one string (alphanumeric) but in a different context. You see, alphanumeric variables. In Applesoft, A$ and C$ contain data that can't be variable? You can store from 0 to 255 added together - but it can be com­ you have the flexibility to give your characters. Look back at our example. variables names with up to 238 char­ bined. That is to say you can't add How many characters did we get the description of a vase and the color acters. Remember, that every alpha­ ALEX$ equal to? We set it equal to codes for new cars and get a result numeric variable - also known as a eleven. The three words have enough that has any numeric meaning. What string variable - name must end with letters to sum up to nine characters. we do accomplish is the merging of a "$." So, if you are calling a variable You must also· count the spaces - data that we often find quite useful. containing the name of a payee there are two. Hence, 11 characters. For example, let's continue our cats, "PAYEE" you would have to add the Reviewing, ALEX$ is an alphanumeric mice and cheese. Let's add line 40 suffix "$" to the name "PAYEE$" to variable. "A HAPPY BOY" is data D$ = C$ + A$ and 50 PRINT D$. make it a valid alphanumeric variable When you run this program, your being stored in ALEX$. Similarly, output should look like this: "I KNOW name. The next logical question is ALPO$ has 30 characters. I also men­ how alphanumeric variables are named. THAT MICE LIKE CHEESE." tioned that you could have a string One of the most common ways The smallest name you can use for an variable with zero characters. This is this feature of your Apple is used in alphanumeric is one character (plus different from a variable with one business, is in name and address files the "$", of course). Therefore valid space. A space is a character. A null when you want to re-arrange the names include A$, B$, and so on is not a character. You could store a names. It is how you can combine last down the alphabet to Z$. You could null with the following line of code. names and first names. It is how you also use Al$ and A2$, Bl$, B2$, 70 B$ = '''' ·Notice that the two can make your labels look more pro­ B3$, B9$ and Z4$, Z8$, and HT$ and quote marks are right next to each fessionally printed by moving the city so on. In fact, you can use any com­ other - nothing between them. B$ and state and zip code into the same bination of letters and numbers up to proximity you would use if you had has been set equal to nothing. This is hand typed it. 238 characters to make a name. Only not the same as zero, or space. If you the first character must be a letter of enter this program: the alphabet.

Call -A.P,P.LE. May 1982 79 Apple Pugetsound Program Library Exchange I Page 0083 of 0102 Call-A.P.P.L.E. Magazine • May 1982 THINGS ABOUT STRINGS Now that we can "add" strings In a similar fashion, we can add and combine alphanumeric data you line 90 to take characters from the might ask "can we subtract?" Yes left side of the variable. 90 L$ = and no. There is no feature to allow LEFT$ (A$,4) us something like D$ = C$ - A$. After line 90 has been executed, There are, however, three different L$ has four character stored in it. functions that let us either examine a portion of the data or take a portion The four characters are "MICE." of the data. They are the left-most four char­ There is a function that we can acters of A$. As they say, last but not use to know just how much data we least ... if you have the ability to take have in terms of the number of the right so many characters and the characters. The function to tell us left so many characters then could it how many characters we have in a be possible to easily capture the mid­ given alphanumeric variable is the dle so many characters? Yes, and LENgth function. Let's put it in our logically enough we would use the program. 60 B = LEN (B$) and 70 MID$ function. LEFT$ and RIGHT$ PRINT B. both required that we tell them from Now when we RUN our program, which alphanumeric variable we in addition (no pun intended) to the were taking data. Then they insist on other output, we now print out a having us tell how many characters number that is equal to the number of we want to take. The fact that we characters stored in the alphanumeric were using a left or right oriented variable B$. In this case 13. You can function told Applesoft where to start verify that for proof by counting the taking the data. With MID$ we have characters we assigned to B$. The a slightly different situation. quote marks, however, do not count. We have to name the variable - The spaces do. So the total number of that's the same. Now we have to tell letters of the alphabet is 11, but the the function where we want to start two spaces count for a total of 13. because there is nothing inherent to I mentioned subtracting characters the instruction defining a starting out of a string. That may be some­ point. That's the beauty of MID$. It thing that the Wizards of Applesoft is totally flexible. Let's code in line like Dr. David Lingwood can do with 100. 100 M$ = MID$ (A$,6,3). aplomb, but for the novices, that isn't Now, what will M$ equal after the something that we can do. However, program executes line 100? M$ we can still take characters out of a should equal "EAT." MID$ tells string to use somewhere else. What Applesoft that we want to take the we do is in effect copy some number middle characters of some alpha­ of characters out of the left, the right numeric variable. We chose M$ to be side or the middle. Add some lines of the place to store the middle char­ code to our program. 80 R$ = acters. Now, read carefully. The 6 RIGHT$ (A$,6) After line 80 has in line 100 tells MID$ that we want to been executed, alphanumeric vari­ start taking characters starting with able R$ will contain the same six character six. The "E" in "EAT" is characters of data that A$ has on its the sixth character. We start count­ right-most positions. In our example, ing here. The 3 in line 100 tells MID$ this means that R$ will contain the to take exactly three characters. So letters "CHEESE." Try it. we've fulfilled all the requirements Now verify that A$ still has its for MID$ and M$ = "EAT." original value. In direct mode, that is Next time, we'll talk about the without using any program line GET command and also how to use numbers, type PRINT A$ and see MID$ with IF to reach special data. what the output is. It should display "MICE EAT CHEESE." What you realize is that A$ has been unaffected ~ by the RIGHT$ command.

80 Call -A.P.P.LE. May 1982 Apple Pugetsound Program Library Exchange Page 0084 of 0102 Call-A.P.P.L.E. Magazine • May 1982

1~~~!~u~:e~::d R. H. Electronics Inc. $ With ROM SOCKET COPYRIGHT © 1981 - PATENTS PENDING 2Yr.Warranly 566 Irelan, Bin CA 12 5 o Buellton, CA 93427 COMPUTER PRODUCTS (805) 688-2047 DESIGNING MANUFACTURING ELECTRONIC ENGINEERING SUPER FAN II FOR YOUR APPLE II COMPUTER· $74.95

• CLIPS ON-NO HOLES OR SCREWS· REPLACEABLE SWITCH • AVAILABLE IN 120V OR 240V AND 50/60HZ • DURABLE MOTOR • REDUCES HEAT CAUSED BY EXTRA PLUG·IN CARDS • INCREASED RELIABILITY -SAVES DOWN TIME AND REPAIR CHARGES • TAN OR BLACK COLOR • LOW NOISE DUE TO DRAWING EFFECT OF AIR THROUGH YOUR COMPUTER AND SPECIAL FAN AND MOTOR DESIGN • "QUIETEST FAN ON THE MARKET'" • EXTRA 120V OUTLET FOR MONITOR OR ACCESSORIES TURNS ON WHEN YOU TURN ON YOUR FAN (NOT AVAILABLE ON 240V MODEL) • SOLD WORLD WIDE· UNIQUE 1 YEAR WARRANTY COPYRIGHT © 1981· PATENTS PENDING HOW TO HOOK IT UP: 1) Clip il on your APPLE. 2) Unplug your 120V cable (you won't need it). 3) Plug short 120V cable from Super Fan II to the back of your computer. 4) Plug the supply cable from Super Fan II to your 120V power source. 5) Turn on the rocker switch and ~CH Mirror - Firmware on Apple CAT II Modem. a built·in, red, ready light comes on. 6) You are all set to "COOL IT.' This switch also turns muiates syntax of another popular Apple Modem product with yourcompuler "off"' and "on" Dealer Inquires Invited improvements. Plugs directly on Apple CAT II Board. List $39.00 - Introductory Price $29.00 ·Plus 6% California Sales Tax and $2.50 shipping charge per item Dealer Dist. Inquires on all Products.

AGAIN I Ahead of all of hers. COMPUTER AIDED RACE ANALYSIS ,u'O~:::N:~"~'t~' NIBBLES AWAY II For The APPLE(/!)11, 48K USER MANUAL THf ULTIMATE NE .... AND IMf'RUVU) [)I~K HACI(UPSY~;TfM Tested with over 400 races at Longacres, Wash. TRACK/SECTOR EDITOR NIBBLES AWAY II, second edition, IS a greatly enhanced anlJ 1m pro~ed verSion 01 our earlier prOduct NIBBLES AWAY Many new and PIiOGItA DISK DIAGNOSTICS exci/ing leatures have been Implemented In NIBBLES AWAY 1110 In sureSlale of the An rehaDlitly M MOO/FICA TlON Olher SIfTlIIar systems on the markel 10day (regardless ot pnce) can" begm to compare With all the teatures bUilt 11110 'NIBBLES AWAY 1/ FAST & MORE ACCURAtE ~~------~

., ...... , ...... " .... , ...... 11IIJ r: I.tater -Jf:ijtomer Contact Profiler & Mailer !~per· Mail List Plus more - up t:·;OOO·E·n~;i~::~-~~~I~-3~j-;isk (o.n.IX 1 Drive required) - 2 second access time to any name - full sort capabilities CARA Is the fast, accurate, and profitable _ Dual Index Modes - supports new 9 digit Zip. Easy to follow manual - way to handicap the horses. Not Copy Protected -- 4 user defined tables with 26 sort selections per table _ Beta tested for 6 months - user defined label generation. INTRODUCTORY PRICE $.l

Apple I•• traclem.rk of Apple Computer, Inc,

Call -A.P.P.L.E. May 1982 81

Apple Pugetsound Program Library Exchange Page 0085 of 0102 Call-A.P.P.L.E. Magazine • May 1982 .....----ntroducing low cost, Apple 1____ compatible disk drives 40-track drive with half-tracking for only $375.00

Easy to install Eight colors to choose from Simple plug-in with no additional wiring or The drive cabinet is available in a standard power supply required. Apple offwhite, lime green, dark green, bright orange, computer blue, brilliant yellow, black Complete Apple II compatibility or chrome. 40-track, 51/4 inch drive that runs 3.3 DOS, PASCAL or CP/M (Apple disk controller Complete Disk Drive System required). For only $375, you get the 51/4 inch disk drive, color coordi­ Full Warranty and nated cabinet, and cable. Or, Service there's a dual drive system that gO-day warranty plus serv­ includes dual 40-track disk ice center for out-of-warranty drives, cabinets, Apple disk service. controller, and cables for only $850.00. For further information, or to order the Apple II compatible disk drives, call or write: 2 INTERFACE, INC. Dealer and quantity discounts available upon request 20932 CANTARA STREET I CANOGA PARK, CALIFORN IA 91304 MasterCard, VISA or COD orders accepted. Apple and Apple II (213) 341·7914 are registered trademarks of Apple Computer, Inc.

14422 S E 132nd • $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Renton Washington 98056 a •••a CLOSEOUT SPECIAL (20s•• i··z ••• .... ~ EZ-LEDGER ~ EZ-LEDGER is the ideal record keeping system for somebody run· The WOZPAK ][ 520.00 ning a small business out of their home or the self·employed profes· sional. EZ-LEDGER uses the simpleist form of bookkeeping WOZPAK DISKETTE possible. Single entry bDokkeeping requires only posting transac· 17.50 tions either under INCOME or EXPENSE. EZ-LEDGER will keep track of expense items under anyone of 99 Total ~.-5it: user selected tax codes plus keeping all year·to·date and monthly 1;:'0&2.. running totals for each of the selected items. Expense items may be entered under DEDUCTI BLE or NON·DEDUCTIBLE type codes. While Supply Lasts, * you can save $~ and get both for just ~ 1].50 EZ-LEDGER is a strictly cash system. i.e. if you payout monies 20.00 (check. cash. credit cards etc.) then the transaction is posted under The WOZPAK ][ is the source for Integer Basic EXPENSE and if you receive monies then record them under INCOME. ROM technical information, containing articles EZ-LEDGER will produce INVOICES with an automatically incre· on the Integer Floating point routines, Sweet mented invoice number and then automatically post the data to an 16, Integer line number and symbol cross ACCOUNTS RECEIVABLE 'holding' file or directly to INCOME and reference programs and related information. update all totals. The accounts receivable and accounts payable files are 'holding' A.P.P.L.E. Orders files with their own running year to date totals. Transactions in these 304 Main Ave. 5., Suite 300 files may be automatically posted to INCOME or EXPENSE and all respective totals will be updated automatically. Renton, WA 98055 EZ-LEDGER will support 80 or 132 column printers and one or two (206) 271-4514 disk drives. The printer is needed for producing invoices, but option· al on all other reports. Washington state residents add 6.6% sales tax. EZ-LEDGER requires 48K ram, APPLESOFT rom and DOS 3.3. All foreign orders (incl. Canada) will require additional postage and shipping. EZ-LEDGER ON DISK ...... 560.00 'Less than 200 copies remain SEEYOURLOCALDEALERORSENDCHECKTO Shipping weight 13.02 oz. HIGHlANDSCOMPUTERSi.___ ~_ .-_.- A.P.P.L.E. Members only Z $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ .-.. ~~' : "~ • ••.-... Washington residents add 6.4% sales tax. Applesoft and Apple are registered • 82 . trademarks of Apple Computers. Inc.

Apple Pugetsound Program Library Exchange Page 0086 of 0102 Call-A.P.P.L.E. Magazine • May 1982

A CALL -A.P.P.LE. TECHNOTE: LOOK BEFORE YOU JMP

Ken Manly

HE Apple II Reference lies the power of the indirect jump storage address, which was deter­ ·Manual defines "feature" as instruction: by altering the contents mined by the length of the program, "a bug as described by the of the storage address you can use a and the length changed every time I r marketing department." I single jump instruction to transfer modified the program. The program have found a "feature" of the 6502 control to anyone of a number of sub­ worked until a modification changed indirect jump instruction which caused routines. For example, the monitor the length of the program just enough me some bafflement (about two indirect jumps mentioned above can to put the storage address at an weeks worth). The trouble is easily transfer control to any of a number of address ending in $FF. After that, avoided, however, if you know what input or output routines. The con­ nothing worked. The cure was simple: to expect. So I am using this as an tents of the storage locations KSWL I moved the storage address to a excuse to write about the indirect and CSWL are changed by BASIC location just a few bytes from the jump instruction. For those of you IN# and PR# commands (or monitor beginning of the program. Since the who are already familiar with control-K and control·P) to point to program begins at $803, I know the assembly-language programming, the input and output routines storage address cannot be at at an the tak~-home message of this article selected. address ending in $FF. I could also is simple-the indirect jump instruc­ What actually happens when the have assigned the storage address to tion will not work at all if the address 6502 fetches the target address from a zero-page location, but I prefer to referred to in the operand is at the end the storage address? The answer to reserve those for instructions which of a page. That is, if the address ends this question is given on page 141 of require zero-page locations. in hexadecimal FF. The cure is simple the MOS Technology Programming too; make sure the address used does Manual. After reading the storage not end in $FF. address from the operand of the Let us first consider the more instruction, the 6502 uses this common direct jump instruction; the address to read the low byte of the first learned by an assembly­ target address. It then increments the language programmer. The operand low byte of the storage address. The of this instruction is the address of storage address now points one byte the next instruction to be executed. higher in memory, and the 6502 uses Let us call this address the target it to read the high byte of the target address. This term will become address. At least, that is the way it necessary in the discussion below. To works most of the time. repeat, then, the direct jump instruc­ Suppose, however, that the tion has the target address stored in storage address is $18FF. After the operand of the instruction itself. reading the low byte of the target In the indirect jump instruction, address at $18FF, the 6502 incre­ the target address is stored at some ments the low byte of the storage ad­ other address. Let us call that other dress. The storage address is now address the storage address. Since $1800. Since the low byte of the the target address is a two-byte storage address was incremented number, it is actually stored at two from $FF to $00, the 6502 should addresses. The low byte of the target have incremented the high byte from is stored at the storage address, and $18 to $19, but it does not do this. the high byte is stored at the byte Therefore, when it reads what should immediately following the storage be the high byte of the target address. address, it actually reads something When you write an indirect jump else 256 bytes away. The result is instruction, only the storage address chaos; the next instruction is taken is specified in the operand. Else­ from what is essentially a randomly where in the program, of course, you chosen memory location. must arrange to have the target ad­ I ran into trouble with this instruc­ dress stored at the storage address. tion when I used it in a command pro­ When it comes to the indirect jump cessor for a text editor. My mistake instruction, the 6502 fetches the lay in putting the storage address target address from the storage ad­ near the end of my program. This dress, then it takes the next instruc­ arrangement meant that I had no con­ tion from the target address. Herein trol over the absolute location of the

Call -A'p.P.L.E. May 1982 83 Apple Pugetsound Program Library Exchange Page 0087 of 0102 Call-A.P.P.L.E. Magazine • May 1982

APPLE ADD-ONS are products by BIT 3 Computer Corporation to in­ crease the capability of your APPLE II or APPLE II PLUS. Make it an 80-column word processor with the FULL-VIEW 80 ... or a full­ fledged terminal with the DUAL-COMM PLUS ... or increase its memory with the MEMORY PLUS.

The FULL-VIEW 80 provides an 80 x 24 display yet retains the standard APPLE display too. You can switch between 80 and 40 column mode via keyboard or pro­ gram. An 8 x 10 cell size character set provides DUAL-COMM PLUS quality characters, full descenders, adds two fully independent serial I/O and line-drawing graphics. The interfaces to your APPLE II. Terminal mode firmware converts an APPLE in- FULl.:VIEW 80 to a full or half duplex computer ter­ is compatible with APPLE peri­ minal. With a modem such as the pheral cards, Basic, Pascal and NOVATION CAT™ or the HAYES several word processing systems. SMART-MODEMTM connected to one All for $295.00 - no extras needed. serial port and a printer connected to the other port you can use the APPLE as a re­ All BIT 3 products feature easy plug-in mote terminal with online printer. 16 baud installation and are designed with you, the rates are available from 50 to 19200 baud. user in mind. Contact your local APPLE Price: $239.00 dealer or our offices for more information. The MEMORY PLUS adds 16K of RAM memory for your 48K APPLE II or APPLE II PLUS. The addition of the MEMORY PLUS represents a

33% capacity increase in RAM memory and 40% more available COMPUTER CORPORATION RAM for disk users since APPLE DOS occupies almost 11K of memory. It is compatible with Integer Basic, Applesoft Basic, 8120 PENN AVENUE SOUTH, SUITE 548 MINNEAPOLIS, MN 55431 Pascal, Z80 Softcard, Fortran and other products such as Lisa (612) 881-6955 2.0 and Visicalc 3.3. Price: $149.00

Apple II is a registered trademark of Apple Computer, Inc.; Z80 Softcard is a registered trademark of Microsoft Consumer Products. D.C. Hayes Smart-Modem is a trademark of D.C. Hayes, Associates, Inc.; Novation CAT is a registered trademark of Novation, Inc.

f ~ St-op DUMp I HG on your pr inter! I

Take a t. i p f'foPi Maxwe II . Your EPSON

MX-70, MX-100~ or MX-80 wit.h GRAPHTRAX can do a lot. Plore t·han "screen duPlPs".

m)-l';FOt-iT a II ows YOU to pr i nt text r i I es ~ Attache style cases for carrying and protecting a complete computer set-up. Applewrit.er riles, or ???? using Hi-Res character sets I ike t.he one:!' on Apple' s Constructed of the highest q~lality luggage material with saddle stitching. Will DOS Toolkit ~ accommodate equipment In a fully operational configuration along with n ,Even GRAPHICS I ike ,..e I I manuals, working papers and disks. Never a need to remove equipment from case. Simply remove lid, connect power and operate. Many saMple charact·er sets are included on t·he disk, so mXFOHT can be used ir yoU don't· have t.he DOS Toolkit. • AP101 Apple II with Single Disk Drive ...... $109 • AP102 Apple II with Double Disk Drives ...... 119 Requ ires: 48K, ROM App I esort, DOS 3.3, • AP103 Apple II, 9 inch Monitor & Double Drives .. 129 and an EPSON GRAFTRAX pr inter with a Apple III, two additional Drives & Silentype 139 Mountain COl'lp .... t-er CPS. Orange Micro • AP104 GRAPPLER, or EPSQH parallel interrace. • AP105 12 inch monitor plus accessories ...... 99 • P401 Paper Tiger 440/445/460 ...... 99 ONLY $29 _ 50 • P402 Centronics 730/737 ...... 89 Copyr i ght @ 1982 by SiBIl!!S • P403 Epson MX70 or MX80 ...... 89 908 Newton Arlington, Texas 76010 • P404 Epson MX100 ...... 99 • P405 IDS 560 or Prism Printer ...... 109 • CC80 Matching Attache Case (5") ...... 85 • CC90 Matching Attache Case (3") ...... 75 • CC91 Matching Accessory Case ...... 95 comptJTer case CompanY .•• 5650 INDIAN MOUND CT. COLUMBUS, OHIO 43213 (614) 868-9464 tiiiiiiII

84 Call -A.P.P.LE. May 1982 Apple Pugetsound Program Library Exchange Page 0088 of 0102 Call-A.P.P.L.E. Magazine • May 1982

WRITE -A.P.P.L.E.

By the Readers

Dear Val, in the input as suggested in the article For example, suppose that a con­ makes the last hex digits $9E instead trol module is trying to edit (i.e. HERE are a few points of $A2. Using the right value is just validate) a record. It might call a which should be made in as easy and additionally insures that subroutine we'll name ROUTE reference to the article TRANSACTION which will deter­ "Trig or Treat" in the the value of Pi you use is identical to T the value of Pi used by Applesoft in mine based on the record's trans­ March '82 issue, one mathematical code, which subroutines it will and two computational. ROM (Pi/2 is stored at $F066 in actio~ packed format). This will get the best call. These subroutines in turn might The comment in the article "The call further subroutines, etc. When Apple doesn't handle angles greater accuracy possible and help get rid of irritating differences from converting control returns to the control module than 90 degrees ... " is incorrect. One it will examine a return code, which only has to ask for, say, ?SIN(7) or large angles and so-on. The formula given for Arcsin in would have been set by the first something similar to see that the cor­ subroutine to find an error. If it is rect value is returned. This "restric­ the article; zero, the record will be passed along tion" only occurs with multiple­ Arcsine(X) = ATN( lISQR«lIX 1\2-1) for further processing. If it is valued functions such as the inverse non-zero, we will bounce the record trigonometric functions. The func­ is only correct for positive values of back to the user, along with a tion Arctan is one example. There the argument. A code which produces message like SYNTAX ERROR, are an infinite number of angles the correct answer for both positive NYAH NYAH! (We will avoid exam­ whose tangent is any given value. For and negative arguments and runs ining the return code to provide a example, the tangent of .5 is the same faster is: more specific message as impossible as the tangent of .5+N*Pi where N is Arcsine(X) = A TN(XlSQR within the memory available.) any integer, positive or negative. The (l-X*X)) Applesoft routines do just what they Obviously, there is no point in further editing once an error is found should in this case and return what is This formula runs faster because it known as the "principal value" of the (it might be impossible, anyway); we eliminates one divide and uses X*X just want to short-circuit back to the Arctan function, that is the angle in place of XI\X. Remember the with the smallest absolute value. In control module. We can do this by exponentiation token "1\" invokes a executing POPs until we are one this sense the principal value Arctan routine that works for all real function is "a one-to-one" map only level below the control module, then numbers so it does a log-multiply­ executing a RETURN, as explained for the angles between + and -Pi/2. anitlog algorithm. For integral ex­ Those points were made for those in "Pop Art." ponents of 2 or 3, serial multiplica­ of you who aspire to pass your trig Other error-handling strategies tion is faster and more accurate. test. For those who are only inter­ would muddy our main logic, and be I tested the two routines with a less compact, I think. ested in computation there are two stopwatch and a long (yawn) Apple­ points to make. soft loop. Three routines were used; Roger Knights Due to the decimal to binary con­ the two formulae provided here and 5446 45th Ave. S.W. version routine of the Apple and the one with a simple assignment (A= 1) Seattle, WA 98136 method of representing real numbers formula to evaluate the overhead. in the computer, one should not The revised formula was about 1.9 Dear Val, assume that the input of nine decimal times as fast. I suspect speed im­ In the article "Apple III Pascal" digits will do the best job, even if the provements may be obtained with the folklore has it that Apple has "nine in the November/December issue of other relations by carefully applying Call -A.P.P.L.E., Lou Infeld men­ decimal digit precision." Thank similar methods, but the Arcsine is heavens we don't own Ataris that use tions a problem he had in dealing the function most likely to be invoked. (ugh) BCD arithmetic (SLOW). When with text files that are too large for you use Pi in a program enter: the Apple II Pascal Editor. He says Peter W Soule that he wasn't able to split the large PI = 3.141592654 969 Via Del Monte text file into two smaller text files on Palos Verdes Estates, CA 90274 As you can test for yourself by the Apple II. converting the decimal representa­ While I don't have an Apple III, I have to deal with text files (created tion of Pi to hex and then examining Dear Val, the variable stored in the Applesoft by a program) that also are too large I appreciated "Pop Art" in your for the Pascal Editor. But it isn't it program, this produces the maximum March issue, and I'd like to add that precision possible in Applesoft. The terribly difficult to split them in two. POP can also be useful when the It can be done from the Pascal Filer packed value of Pi is Pi = $82 conditions in a subroutine have not 490FDAA2. Leaving off the last" 4" using the Make, Transfer, and Krunch been met. commands.

Call -AP.P.LE. May 1982 85 Apple Pugetsound Program Library Exchange Page 0089 of 0102 Call-A.P.P.L.E. Magazine • May 1982

WRITE -A.P.P.L.E.

Let's say that you have a file named And there you have it. A too large expanded" [codes CHR$(14) + TOOBIG.TEXT that's 46 blocks text file split in two. (One note: any CHR$(27) + "E"]. long. (The maximum length text file markers in PART2.TEXT will be There is another cute trick avail­ that the Apple II Pascal Editor will pointing to the wrong place.) In a able on the Epson that Bruce didn't take is around thirty-six blocks.) similar fashion, you can also combine mention. You can address the printer Using Krunch (and Transfer if two small text files into one larger to double-print the entire line by use necessary), arrange so that TOOBIG. than the Editor will accomodate. of code CHR$(27) + "G". The TEXT is the last file on the disk Put the two text files back to back double-printing of the entire line is in without any unused space between on a disk. (e.f. SMALLl.TEXT and addition to double-offset printing of files. SMALL2.TEXT.) Note the lengths each character III "emphasized" Note the length of the file you of the files. Remove the second file. mode, and obviously produces want to split. Remove the file. (This Now make two files HEADER[2] and darker, higher quality printing, and merely removes the file from the TEXT2[small2.text fhle length -2]. can be used in combination with any directory, not from the disk.) Now Remove HEADER and Krunch. of the six character types (four de­ Make the following three files: (They Remove SMALLl.TEXT and TEXT2. fined by Bruce plus the two described will contain all the data from TOO­ Finally make BIG.TEXT [small.1text above). To cancel the double-print BIG.TEXT.) length + sma1l2.text length -2]. use code CHR$(27) + "H". If you wanted to, you could write This means that the user of the Make HEADER2[2] (This is the a program to split or combine files Epson MX-80 or MX-100 can address 2-block text file header.) (using BLOCKREAD and BLOCK­ by software control up to 12 distinct Make TEXT1[24] (This is the WRITE). It could even adjust the type-styles. The fly in the ointment first part of the text file data. Split marker pointers. But for most pur­ is (as Bruce indicates in his table) that only at an even number of blocks.) poses, the method presented here the "expanded" character type, used Make TEXT2[20] (This is the sec­ should suffice. either alone or in combination with ond part of the text file data.) Joel Buckley "small" or with "bold," will self­ Note the block address at which 1202 Broadway cancel at the end of every line. None TEXT2 begins. (Displayed by the Hanover, PA 17331 of the other control codes are self­ Extended list command.) Krunch the cancelli~g. Another potential operat­ disk from this address. (This will ing inconvenience arises from the Dear Val, open up disk space between TEXT1 fact that several of these codes affect and TEXT2.) Transfer HEADER1 to I am writing about the neat the entire line, regardless where in HEADER2. (This places a copy of review article by Bruce Detterich on the text they may be inserted, while the header on the disk in front of the Epson MX-100 in the February others influence only the subsequent TEXT2.) Krunch the disk again. issue (which just arrived and was characters. Remove HEADER1, TEXT1, HEAD­ devoured today). But, like Bruce, I feel the advan­ ER2, and TEXT2. Finally, make two The article lists control codes for tages of the Epson far outweigh some text files as follows: four character types: normal, small, of the awkwardness which border on expanded, and bold, but in fact the the trivial. But, when do you suppose Make PARTl.TEXT[26] (2 block Epson has six character types if one the Japanese marketing firms will header and 24 blocks from TEXTl.) includes viable combinations of two start hiring Americans to write their of those listed. These additional two manuals? (How's that for provincial­ Make PART2.TEXT[22] (2 block combinations include (in the author's ism?) I have not seen the most recent headera and 20 blocks from TEXT2.) of the entire line by use of code CH edition, but the earlier one is the most CHR$(15) + CHR$(14)], and "bold- incoherent manual I've ever run across, III contrast to the sound For A.P.P.L.E Members Only engineering of the printer. Now Available By the way, the MX-100 almost seems tailor-made for the Apple III, if "What's Where In the Apple" one uses the Epson 2K serial buffer (An Atlas to the Apple Computer) connected to the serial port of the Apple III. There is no funny business By William F. Luebbert with high-bit bypassing or need for the "ubiquitous Ctrl I 80N shuffle" A 128 page overview of Apple memory when using the Epson with the Apple (PEEK's and POKE's) for the Basic Programmer. III. Just open an output file for the MEMBER'S PRICE: A.P.P.L.E. ORDERS printer driver and fire away. 304 Main Ave. S., Suite300 $12.50 John M. Miller Renton, WA 98055 230 Senate Loop Washington State residents (206) 271-4514 add 6.6% sales tax. Fairbanks, Alaska 99701 Overseas shipping weight 16 oz. All foreign orders (ind Canada) will require additional postage and shipping

86 Call -A.P.P.LE. May 1982 Apple Pugetsound Program Library Exchange I Page 0090 of 0102 Call-A.P.P.L.E. Magazine • May 1982

GftlEPHONE SOJWARE CONNE~ ,:

Tired of inconvenience, loose connections and costly burned out chips because software and hardware are slot dependent? The solution has arrived! Slot Swappers interchanges any two slots (except 0) at the flip of a switch! Incredibly useful for hard & floppy disk controllers and for multiple printers.

• No wiring, just plugs in • Insta"s in minutes • Easy access to switches • No chips needed • No special software required 11111111_-__ -- Johnson P.o. Box 1870 a a a II 1-213-516-9432 Phoenix, AZ 85001 Associates (602) 979-4554

P.O. BOX 6548 - TORRANCE, CA 90504 Visa/Mastercharge accepted. $2.00 handling charge. AZ residents add 5% tax. C1981 TELEPHONE SOFTWARE CONNECTION. INC.

Call -A.P.P.LE. May 1982 87 Apple Pugetsound Program Library Exchange Page 0091 of 0102 Call-A.P.P.L.E. Magazine • May 1982 A harDest of WRITE -A.P.P.L.E. savings froDl Dear Val: This is equivalent to "BRUN This letter is a follow-up to my APIE,D1." Now BSAVE FORMAT, letter published in the March, 1982, A$800 ,L$1800. Call -A.PP.L.E. There was an You also need to change PRO­ error that another club member, GRAMMA: WORD PROCESSINGj Robert Greenwald, wrote to me to refer to APIE instead of APPLE App~Jtee PIE. The lower-case "j" above is a about. ElBcb'Onics My letter said that there was a CTRL-J Load this program and problem going from PIE to Format. change line 1100 to: Instead, the problem lies in going 1100PRINT 0$; "8RUNAPIE" :ENO APPLE. ATARI· 1RS80· IBM from Format to PIE. Format will try Save the file, remembering to add A full line of software for business, games to BRUN PIE from the last drive the Ctrl-]. and education Up to 35% om accessed, not from drive 1. Unfortu­ nately, the fix is not straightforward. Red-faced, MUSE IUS Peter C. Bartlett, Jr. V1SICORP STONEWARE When returning to PIE, Format simply tries to "BRUN APPLE PIE" 529 West Belden Avenue ON UNE SYNERGISTIC Chicago, Illinois 60614 EDUWARE HAYDEN rather than specifying D1. You need HOWARD AND MANY MORE to add ",Dl" but there isn't enough room. My solution is to change the We recently received an annony­ name of APPLE PIE to APIE so you mous letter signed "sharp eyed reader" AMDEK· HAYES· MICROSOFT can add ",D1." To do this, BLOAD with a PS.: "Why can't you print Ust OUf Price FORMAT and enter athe monitor. this?" 32K RAM card $293.00 $205.00 Then enter the following: We do not print unsigned letters. If Video Term $345.00 $279.00 "sharp eyed reader" will supply *04C:80 84 C2 02 05 CE AO C1 DO Lazer Products --- 20% off --- his/her _name and address, we will C9 C5 AC C4 81 80 00 00 00 00 DISKS publish the letter. Maxell Box of 10, 5'4", SS-DD $35.00 Verbatim Box of 10, 51;.;", SS·DD $29.00 MONITORS LEMONITORS Ust Our Price 9" Green $189.00 $159.00 This is the graphics utility package that you have been awaiting. AMPERGRAPH adds 12" Green $199,00 $169.00 twenty-two Appl~s?ft com~ands that allow effortless generation of professional-looking ZENITH plots of sClent1flc or f1nanc1al data. All of the necessary scaling and screen format­ 12" Green $179.00 $129.00 ting is accomplished with just a few Applesoft lines. Unlike most ?t~er plot~ing systems for the Apple II which are stand-alone systems, Plus a full line of AMDEK Monitors the A~PERGRAP~ ut1llty prov1des extended BASIC graphics language commands that you can use d1rectly 1n your own Applesoft programs. The additional commands are &SCALE, &LIMIT, &AXES, &GRID, &FRAME, &LOG X, &LOG Y, &LABEL AXES, &LABEL, &VLABEL, &CENTER PRINTERS LABEL, &CENTER VLABEL, &DRAW, &PENUP, &CROSS, &OPEN SQUARE, &CLOSED SQUARE, &OPEN CI RCLE, Ust OUf Price &CLOSED CIRCLE, &ERROR BARS, &DUMP (for Silentype printer), and &*DUMP (to link with PAPER TIGER AMPERDUMP, see below). 460G $1,094.00 $950.00 AMPERGRAPH uses the Applesoft ampersand machine language jump vector to 1 ink to a 560G $1,394.00 $1,250.00 relocatable 9K routine which normally resides above the second high-resolution graphics page in the Apple II. The system requires an Apple II Plus (or Apple II with language EPSON card.) with 48K and DOS 3.3. MX70 $449.00 $395.00 MX 80FT $745.00 $595.00 MX 100FT $945.00 $795.00 This is a high-resolution graphics dump utility which was written specifically to CAUFOR mls MONTHS SPECIAL! take advantage of the graphics features of the Epson MX-80 and MX-100 printers (MX-80 must have the Graftrax conversion). AMPERDUMP offers many features which are not avail­ 1-800-835-2246 EXT. 211 able in other graphics dump routines: OR 702-452-5589 * Three horizontal magnifications (2.33, 4.66 and 6.99 inches wide) * Nine vertical magnifications (0.91, 1.77, 2.64, 3.78, 4.25, 4.45, 5.31, 5.87 and .... 5130 East Charleston Blvd. ,:.. 7.99 inches high) VISA Suite SCA e.. , * Horizontal and vertical magnifications can be specified independently to' obtain 27 !!!!!!!!!! Las Vegas, Nevada 89122 different plot size formats Phone orders welcome. Mail orders may send charge card number (include expiration date), * Normal/lnverse dumps * Easy to use cashiers check, money order or personal check * Adjustable horizontal tab * Fast Madwest Software (allow ten business days for personal or com· * Compatible with AMPERGRAPH * Relocatable pany checks to clear). Add $3.00 for shipping. handling and insurance. Nevada residents add Dept. C 5.75% sales tax. Please include phone number. All equipment is in factory cartons with manu· AI~PERGRAPH and AMPERDUMP are ava il ab 1e from your p. O. Box 9822 dealer for $30.00 each, or order direct. Include facturers warranty. Equipment subject to price $1.50 for shipping and handling; Wisconsin resi­ Madison, WI 53715 . change and availability. Call or write for price list. den ts add 4% sa 1 es tax.

88 Call -A.P'p.LE. May 1982 Apple Pugetsound Program Library Exchange Page 0092 of 0102 Call-A.P.P.L.E. Magazine • May 1982

No video monitor has ever combined Apple II compati­ What is DVM? The DVM, or "Digital Video Multiplexor:' bility with exceptional performance like the new 13" is a low cost interface that allows the Apple II computer Color-II monitor from Amdek. to be used with an RGB monitor, such as our Color-II. Color-II features our optional new DVM peripheral board Amdek's DVM is software programmable to allow trans­ for easy interfacing with your Apple II. And look at the parent operation, and is parallel with existing Apple other top-of-the-line features Color-II offers: text and graphic modes. Three of its channels are used to multiplex the existing Apple text, low resolution and high • RGB, TTL input for high resolution graphics. resolution graphics. The 4th channel allows the use of an • 80 x 24 character display capability (with expansion 80 character line video board. card by Vydec). Our DVM is also color channel software programmable, • 560 (H) x 260 (V) resolution. enabling you to turn the three color channels on or off • Molded-in carrying handle for easier portability. • Front-mounted controls for faster fine-tuning. by software control. For example, the red and blue channel can be turned off when the 80 character So if you want to get the most from your Apple II channel is turned on, resulting in a green phosphor system, get the "most" monitor. Ask your dealer about video presentation. Amdek's new Color-II monitor with the optional DVM For convenient operation, the DVM board may occupy interface board. any slot in the Apple II. The DVM also features low-power consumption and low-power schottky logic. ~I 1f**1C:~...... Amdek Corporation, 2420 E. Oakton Street, Suite "E" Arlington Heights, Illinois 60005 (312) 364-1180 TLX: 25-4786

Apple Pugetsound Program Library Exchange Page 0093 of 0102 Call-A.P.P.L.E. Magazine • May 1982

Apple Pugetsound Program Library Exchange Page 0094 of 0102 Call-A.P.P.L.E. Magazine • May 1982

ADDING MACHINE (continued from page 19)

1700 PRINT PRINT "6. HIT C TO 1800 PR INT PR INT "HIT RETURN T CONTINUE; E TO END" o CONTINUE.'" GET KS: HOME : 1720 PR INT PRINT "7. IF YOU HI PRINT TAB( 12)"**TUTORIAL T (C) YOU WILL BE ABLE TO CONTINUED"''''" ENTER AN ADDITIONAL NUMBER." 1820 PRINT: PRINT "THE PRINTOUT 1740 PRINT PRINT "8. IF YOU HI 1111 LL GIVE YOU": PRINT "A HA T (E), THE PROGRAM WILL END RD COPY OF YOUR DATA, AND TH AND THE SCREEN WILL CLEAR AN E FINAL SUM!!" o PRINT OUT ALL THE NUMBERS 1840 PRINT PRINT IIIITH THE FINAL SUM." 1860 PRINT PRINT TAB( 14)"HAP 1760 PRINT TAB( 3)"THIS GIVES Y PY ADDING" OU THE CHANCE TO CHECK THE N 1880 PRINT : PRINT UMBERS ENTERED EARLIER TO SE 1900 PRINT "NOW HIT RETURN TO ST E IF THEY ARE CORRECT! !" ART THE PROGRAM": GET TS: HOME 1780 PRINT PRINT "9. IF YOU HA VTAB 10: HTAB 1: INPUT "HO VE A PRINTER,YOU CAN HAVE A W MANY DECIMAL PLACES? :";0 PRINTOUT BY ANSWER INC YES WH D EN ASKED.": PRINT "THEPROGR 1920 RETURN: END AM ASKS FOR THE PRINTER SLOT OR ".. PR INT "DRIVER CALL"

A CALL -A.P.P.LE. QUICKIE: TRIG WITH DIETICIAN INTEGER BASIC A GREAT NEW APPLICATION FOR THE MICROCOMPUTER

Mark Cross • Make up a diet menu with specified content of calories, carbohydrates, proteins, fats, cholesterol and sodium. HE original Hi-Res soft­ • Program comes complete with the composition of 700 foods. ware (COO.FFFR) has a • Allows you to look at the composition of each food instantaneously before sine table. It occupies 256 deciding to include it in your diet. Tbytes from 3840 to 4095. • Make as many menus as you like, each one with your own choice of foods. Starting at loc 3840 with stored #128, it goes up to 255 then down to zero • Make a different menu for each day of the week or the month. Takes only and finally back up to #124 in loc minutes to make up a menu. 4095. To make the usual sine func­ • Store the menus on the diskette or print them out. tion you have to subtract 128 and • Analyze popular advertised diets then multiply by a constant to adjust • Originally written for use in a physician's office. Now made available to to your scale. For example, if you the public. have two imaginary decimal places in your system so that 1.00 is repre­ • Requires Apple II plus or Apple II with Applesoft in ROM and one disk sented by 100 then drive with DOS 3.3. Printer desirable. • Comes complete with documentation. SINE = (PEEK(3840 + ANG) - 128) * 100/128 Calories = 646 Carbohydrate = 85 Protein = 32 Fats = 23 Cholesterol = 250 Sodium = 533 The rotation angle ROT for (GMS) Cal Carb Prot Fats Chol Sad Juice·Orange 248 1 Cup 112 26 2 1 0 2 Hi-Res as described in the red Egg·Boiled 57 1 Item 82 1 7 6 250 61 manual goes from 0-63. Using sin Toast-White 40 2 Slice 124 24 4 2 0 234 Coffee 240 1 Cup 4 1 0 0 0 2 (theta) = cos (90 deg - theta) we can Sugar-Granltd-Teaspoon 4 1 Teaspoon 15 4 0 0 0 0 Creamer-Powder 5 1 Teaspoon ;0 1 0 1 0 0 get both sin and cos from the table. Recipe

Name DIETWARE Address ______P.O. Box 503 Spring, Texas 77373 City ______State ____ Zip ___

Call -A.P.P.L.E. May 1982 91 Apple Pugetsound Program Library Exchange I Page 0095 of 0102 Call-A.P.P.L.E. Magazine • May 1982

The Data Factory An extremely easy-to-use sys­ tem with enormous power and flexibility. Data storage on two disks is 225,000 bytes. Relocate records into a new data base; add, delete, or change field lengths anytime.

The Invoice Factory Not just an invoice maker. It gen­ erates statements, aged receiv­ able reports, product or customer reports, sales analyses. Use a new free form, automatic or stan­ dard invoice form.

Payroll-Manager A whole department that doesn't write itself a check. Figures hours and makes all standard deductions plus seven optional deductions and writes the checks. Unbelievably fast, and easy to use.

Entertainment Test your luck and skill with excit­ ing games from Micro Fun. Dogfight II Crown of Arthain Mad Venture Painter Power U.S. Constitution English SAT I

Apple Pugetsound Program Library Exchange Page 0096 of 0102 Call-A.P.P.L.E. Magazine • May 1982 dly Computing

Wall Stl'Hter V Factory Asset Maneger This portfolio management pro­ Allows for a marriage between Both old and new tax laws are gram allows you to enter, by hand Data Factory and VisiCalc™ files. incorporated in this program or modem, Friday's closing prices, You can move data in either direc­ which uses the straight line Standard and Poor, Beta ratings, tion, manipulate it within the cho­ method for balance sheets and Value line timeliness and safety sen program, and store it either accelerated method for estab­ factors. Use standard formula or way. An exciting tool for research lishing asset values for amorti­ make up your own to project buys, and analysis. zation and prints tax schedules. sells and holds. 1,000 assets per taxpayer.

Tax Manager Relocatable Linking Loacktr Data Manager III Takes machine language routines A data base designed for the Apple For producing federal income taxes that have been designated by an ill and can be used with floppies or and printing the schedules. This assembler as relocatable, links hard disk drive. It will handle as easy-to-use program includes the them together, and then estab­ many records as the storage media latest tax laws and will remain lishes the program at an address can handle with total flexibility. current with our Extended War­ the user specifies. Can be used with rantyoption. Language Plus.

V Blend Merger Language Plus Allows users ofVisiCalc™ to com­ A utility for the Data Factory and A two volume library of machine bine data in multiple VisiCalc™ Invoice Factory. Merge data from language routines. These packages files, merging the information into fields in either program into those allow users, through Applesoft anew file. of another file. Basic, to speed up their perform­ ance in programming.

The Learning System Apple and Apple80ft "'" trademarks of A company or educator may pre­ Al'I'le Computer, Inc. VUliCaic is a trademark pare a training/tutoring/testing ofPel'l!Onal Software. device. Enter instruction or infor­ mation; then key it to a tutorial drill or test to check for learning comprehension.

Apple Pugetsound Program Library Exchange Page 0097 of 0102 Call-A.P.P.L.E. Magazine • May 1982

Apple Pugetsound Program Library Exchange Page 0098 of 0102 Call-A.P.P.L.E. Magazine • May 1982

B,.I••• TO ORDER CALL: AD INDEX

Ba.puler (714) 755·3558 APP.L.E...... 12, 49, 82, 86, 96 Advanced Logic Systems ...... 90 Braup Advanced Operating Systems. . . . . 60, 80 Adventure International ...... 20 Amdek...... 89 Andromeda. . ... 56 NEC 8023A Dot Matrix Printer o Tops The Epson! Appletree Elearonics ...... 88 o 25% Faster! 100 CPS Appleware, Inc...... 74 o 8 Character Sizes Applied Engineering, Inc. .... 7B o Graphics Capability Avant-Garde Creations ...... B3 o Proportional Spacing o Friction And Tractor Feed Axlon ...... 32 o Centronics Type Parallel Interface Beagle Bros. Micro Software ...... 47 o list $800. . .. Only $525 Bit 3 Computer Corporation ...... B4 NEC 3530 Spinwrlter Businessmaster, Inc. .... 70 o Uses NEC Thimbles For Quality Printing Bytes & Pieces ...... 31 o 35 CPS Graphics Capability o Friction Feed (Tractor Optional) Galaxy Sales, Inc. (CARA) ...... 81 o Centronics Type Parallel Interface Cases, Inc. . . .. 63 o list $2250...... Only $1880 Computer Case Co...... 84 PRT·1 Apple Parallel Interface Board Computer Consulting SeNices ...... 5, 40 • Interface For Above Printers Computer Exchange ...... 62 o Plugs Into Any Slot (1·7) o list $120. Only $99 Computerized Management Systems...... 43 o cable. . ... $20 Connecticut Information Systems...... 13 Z·CARD By ALS Datamost. . .. IBC 12 o Add Z·80 At A Fraction Of The Cost Datec, Inc.. .. 23 o Compatible With Existing Apple/Z·80 Software Dietware ...... 91 o list $270 . Only $220 Discount Data Products...... 17 ~~~~~~~~~~~~Phoneorder andor personal mail orders check using (allow VISA, ten MASTERCARD,days to clear), FREE certified SHIPPING check, onmoney pre· Dream Electronics .... ,16 paid cash orders: Unless prepaid with cash please add 5% for shipping, Expoteck Corp...... 73 handling and insurance (minimum $5.00). California residents add 6% Futra Company...... 60 ~ sales tax. The Geegery Software Works, , , , , , , , , . , , , , , , " 32 Hayden Book Company, Inc...... 33 ~~~~~~~~~~~~~~SEND-: ORDERS TO: 1011SYSTEMS CAMINO COMPUTER DEL MAR. GROUP. DEL MAR. SUITE CA 92014#144, Henderson Associates ...... 78 Highlands Computer ... B2 Interface, Inc...... 82 Krell Software Corp ...... 74 Leading Edge Produas ...... IFC Unk Systems ..... 36 Madwest Software...... 88 Micro-Ware Distributing. . ... 81 A.P.P.L.E. ORDERS Micro Ulb ... .1. 8, 92, 93 MPC Peripherals ...... 4 304 Main Ave. S., Suite 300 Micro Peripherals ...... 68 Renton, WA 98055 Omega Microware, Inc. 34, 71. 76, 52 (206) 271-4514 OHM/Elearonics ...... 77 Orange Micro...... 6 Passage Research ...... 78 Professional Computer Systems ...... 10 I am enclOSing my check/MO for S ______R.H. Elearonics...... 81 R.J. Electronics Ulboratory ...... 71 My membership number is: ______expo date ______Sensible Software...... • ...... 14, 39, 51 SGC ...... 65 Please send me the following: ______S & H Software...... 76 Softech Microsystems. . . . • . . . • ...... 94 Softronics, Inc...... 59 Southeastern Software, , .. , , , , , , , , ...... , , .. 44 Southwest Edpsych SeNices, Inc...... 87 Southwestern Data Systems ...... 'is ~~ ...... M Name: ~ectrum Software...... 48 Stellation Two. . • ..... 87 Address Street Elearonics Corp...... 40 Sympathetic Software .. . •... • ...... 49 City ------______State: _____ Zip Code: SynergistiC Software...... BC Phone' ______Systems Computer Group...... 96 Telephone Software Connection, Inc...... 87 Westware, Inc...... 70 acc. # ______XPS, Inc .... 18. 72 Yucaipa Software ...... 74

VISA·

~ acc. # ______expo date ____

Washington state residents must add 6.6% state sales tax. All foreign orders will require shipping and handling charges (including Canada).

Call -A.P'p.LE. May 1982 95 Apple Pugetsound Program Library Exchange Page 0099 of 0102 Call-A.P.P.L.E. Magazine • May 1982 UNCLASSIFIEDS - A.P.P.L.E. ORDERS

CALL -A.P.P.L.E. (un)Classlfieds EPSON MX -80 and MX -100 OWNE RS! Sal.e time and headaches GENERAL LEDGER SYSTEM - menu driven, error checking on Preset any text processing printer option quickly and easily data entry, user formatted statements. Developed by CPA Members Non-commerical rate .05/V\iOrd with this turnkey printer software. Settings can be sal.ed for and CDP. Copyable source code furnished on 16 sector Members commerical rate .25!V\iOrd future use. It will work with or without GRAFTRAX-80 diskette 48K Applesoft, one disk drive S39.95 or All others: J.OO/V\iOrd, $25 minimum chips. MONEY-BACK GUARANTEE. Written for APPLE 1/+ documentation only SIO.OO refundable on purchase KM Specify DOS and printer version. DEFINITIVE COMPUTER Systems, 7955 E. 50th St., SUite F-1006, Tulsa. OK 74145 Send ad copy with payment to editorial office SOFTWARE. 362 Concord St .. EI Segundo, Ca. 92045

PEACHY WRITER -- Newl A Simple. easy to use text editor at a LOW, LOW prices, free catalog, MICRO MART, POB 12021, p"ce you can affordl S24.95. HAPPY FACE - 4 hi-res games Dallas, TX 75225 for children Riddles. Famous Sayings, Nursery Rhymes. REOUEST FOR CHANGE OF ADDRESS Spelling 48K SIS 00 COLLEGE PHYSICS - )) disks, 75 MY MISTAKE - YOUR TREASURE? All original disks and docu­ programs. extenSive graphiCS S200 AOUARIUM 25, mentation. Visicalc 3.3 lconverting to IBM), S99; Visicalc 3.2, Dear A.PP.L.E., DINOSAURS S25; CHRISTIAN EDUCATION SIS. Wllte for a $49; Apple Controller GiL AlP A/R lconverting to IBM), , am moving and my present address is: free catalog VISA M/C Cross Educational Software. Box S299; Apple Pascal with 1.1 Update and new manuals, SI49 1536, Ruston, LA 712701318) 255-8921 Isoftware only-keeping RAM card); TRS-80 Pocket PRESENT: Computer, cassette interface, game cassette and 3 books, S99; PFS, S49; Apple Computer PSORT pascal sorting MAJOR EXTENSIONS TO "FILE CABINET" Fast garbage I\JI\ME utilities, S29; Dakin5DOS 3.3 Utilities, $49; Hardware RS232 collection input any characters; one or two disk drives; module for Epson MX80, S20; Apple Computer RS232 variable disk and prrnter slots; labels lup to 5 up, any size); ADDRESS ______Communications Card, S79; LISA I. 5Assembler, S19; Eight 4K Add. Delete, and Change headers; Merge files; Greatly RAMs, S5; Beneath Apple Manor 19ame), SIO; M&M Integer improved data change capability; fast sort on up to five C,~ ______Pascal, SIO; Assorted grab-bag of cassette programs /Apple headers; global replace; fast add record In place; frequency Invaders, Apple 21. etc.). S19; Assorted Apple books and distribution on data values; DIF file interface; Wild card computer magazines Isend stamped, self-addressed enve­ selection on up to five headers at a time, with and/or logiC, STATE ______-LZIP CODE ______lope for list). Will refund any pre-sold items, or call 1213) 374- and equal less greater and not-equal choices; subtotals and 3251 for availability Add S2 postage to all orders. Dale multiple lines on reports; and much more. Compatible With EFFECTIVE DATE ______Flanagan, P.O. Box 1329, Redondo Beach, CA 90278. any "File Cabinet" file or use as an entirely new system. DOS 3.3 WITH 48K. S50.00 Or for more information send Self NEW ADDRESS: Addressed Stamped Envelope to MICRO MATES, PW Box APTYPE OWNERS. Update to new Aptype II during the next 30 3695, Reading, Pa. 19605 days and receive a S5 discount! Regular price is S29.95, but if NAME you send us your Aptype serial number (from the front of the Call APP.L.E. Disk), you can receive the greatly improved WANTED: MAGAZINE WRITERS for Technical Analysis of Stocks ADDRESS ______Aptype 1/ for only S24.95 Iplus S2 postage and CA residents and Commodities. Any subject matter related to application 6% tax). Send to Joseki Computer Corporation, Aptype and interpretation of chart and numerical analysis of stock or Update Offer, 2604 Artesia Blvd., Suite 5, Redondo Beach, CI~ ______commodity data. Write to: P.O. Box 46518, Seattle, WA CA 90278. This offer ends when the next issue of Call APPLE 9BI46-0518. hits the newstands, so don't delay! See our ads in Nibble STATE _____ ZIPCODE _____ Magazine LOGO for 64K Apple SI45 or trade for 77, Apple IPAR+SER+ CLOCK+BSR) card, S175, Micro-Sci 40-TR. Drive, $350, A.L.S. MEMBERSHIP NUMBER Z-Card + 58K CP/M. S175, 64K RAM Card/Semi Disk, S325, WANTED: Volunteer consultant to specialize in DOS questions. Contact Val Golding 1206) 932-6588. Superscribe 1/ W/P, S79, or Apple 1/+ W/all above and 2 40- *Please fill out and return this notice two weeks TR Drives S3333. 503-226- 7340. before you move.

SATURN 32K RAM BOARD IMPC) - new. SI50.00 1602) 253- PRODUCTS NOW AVAILABLE TO A.P.P.L.E. MEMBERS 6528 or 1602) 979-4554 Call -AP.P.L.E. Specials A.P.P.L.E. DISKPAKS HANDICAPPED special interest group under formation. Contact Dr. Thomas J Deal, P.O. Box 507, Carnation, WA 98014. Wozpak Closeout S25.00 Call -A.P.P.L.E. Anthology Vols I-V/' incL ea. 512.50 1206) 333-4141 loffice), (206) 634-2847 lhome) PLE Closeout S20.00 DICE 827 S12.50 Oiskpak 12 SI6.50 GRAPPLER INTERFACE FOR EPSON MX-80 - Mint condition, Oiskpak 34A 513.00 used only one day, with cable, S95. John Conrad, 121 N A.P.P.L.E. UBRARY Allen St., Madison, WI 53705 1608) 238-0595 Oiskpak 5 m.oo AP. Drive Technical Manual 530.00 Diskpak 6B (DOS 3.2 disk utility) 518.50 "Apple Orchard" No.1 (magazine) S2.50 WANTED - Electronic ~stems Serral I/O Interface Kit lor as­ Oiskpak 68-16 (DOS 3.3 disk utility) 518.50 Apple Users Guide 513.00 sembled card). Stephen Bach, Rt. 2 Box 89, ScottsVille, VA Oiskpak 7 S17.50 24590-9512 (804) 286- 3466 Assembly Lines: The Book 517.00 Oiskpak 8 SI3.00 Beneath the Apple 005 SI7.00 In Depth 1 Diskette SI6.50 "Best of Cider Press" (S.F. Newsletter Annual) Vol 1 54.50 Apple Prestige Product linE For A.P.P.L.E. Members Only (S.F. Newsletter Annual) Vol II S9.50 APfile - Text file utility S18.50 MEMBER Call -A.PP.L.E. annuals ApController 595.00 1978 S7.50 APDRIVE4 S395.00 YMBOL PRICE 00 1979 510.00 APDRIVE with Controller 5475.00 YMON 520. 1980 SI5.00 Ap L Case 1 S38.50 S 1981 S18.50 Ap L Case 2 (Lower case chip) S27.50 SYMBOL SYMON is a monitor and a symbolic debugger Call -AP.P.L.E. in Depth No. 1 57.00 APmailll S22.50 for the Apple 1[/][+ system. It combines step/trace Docupak Vol 1 "The Wozpak II" Applesoft Carpenter S18.50 functions With breakpOint tools, register and status flag (documentation) 520.00 Aptest S18.50 modification commands, easily discernible status flag Inside Washington Apple Pi S7.00 Aptest 3.3 Update S5.00 displays, ASCII memory dumps and user dedicated stack Power of VisiCalc S8.50 Big Mac Macro-Assembler/Ted S22.50 and zero page. Furthermore, if the DOS Tool Kit. Big Using 6502 Assembly Language 517.00 Big Mac.LC6 S28.50 Mac. or Ted 1[+ is used for assembly, hex addresses can What's Where in the Apple S12.50 Big Mac X-Ref S7.50 be represented very conveniently by their symbolic Wozpak diskette I equivalents S17.50 Disk Banks 2 for SI5.00 Woz Talks (VHS Video cassette) S27.50 Higher Fonts 1 SI3.00 SYMBOL SYMON is not an isolated system. The DOS and Apple monitor control facilities are still at the AS IS SOFTWARE Higher Text Plus S27.50 disposal of the user. Program Global Editor SI8.50 Public domain diskettes (DOS 3.2,1) ea. 54.00 Program Line Editor S25.00 A.P.P.L.E. Orders (Send 35¢ SASE. for list of titles) 304 Main Ave. 5., Suite 300 Soft Seventy S22.oo Renton, WA 98055 Diskettes supplied on 005 3.3 except as noted. Symbol Symon S20.00 f2061271-4514 WordWeaver /// $75.00 Overseas Shipping Wt: 6 oz. To avoid Shipping delays, always 1 I-SI5.00 if ordered with Wozpak Washington state residents add 6.6% sales tax. \ order new products separately. I z-pre-release price All foreign orders line!. Canada) Will require 4-Available soon additional postage and shipping 6-Available late April ORDER FORM ON REVERSE 7-S7.50 With Ap L Case 1 SIO.00 with Ap L Case 2 96 Call -A.P.P.LE. May 1982 Apple Pugetsound Program Library Exchange TPage 0100 of 0102 Call-A.P.P.L.E. Magazine • May 1982

9748 Cozycroft Ave. Chatsworth, Ca. 91311 (213 ) 709-1202 VISAMASTERCHARC E accept<::u. SI.()() s hil'l'in ~ h,rndling ch'lrgc. iC lIifllrIlr ,r rl'sldcnts add 6% ta

'AI'l'k II ,I tradclllark of Apple Co III pll tn, Inc .

Apple Pugetsound Program Library Exchange Page 0101 of 0102 Call-A.P.P.L.E. Magazine • May 1982

Apple Pugetsound Program Library Exchange Page 0102 of 0102