0% found this document useful (0 votes)
422 views117 pages

Micro 48 1982

nbnbbnbnbnbnb bbnbnbbnb

Uploaded by

nik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
422 views117 pages

Micro 48 1982

nbnbbnbnbnbnb bbnbnbbnb

Uploaded by

nik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 117
UsSsCanada Edtion $2.50 NO. 48 MAY 1982 United kingdom eto: £180 Turn your Apple into the world’s most versatile personal computer. ‘The SoftCard™ Solution, SoftCard tuens your Apple into two computers AZ.80 and a 6502. By adding @ 2.80 ‘microprocessor and CP/M to your ‘Apple, SoftCard turns your Apple into ‘4 CP/M based machine. That means You can access the single largest body bf miccacomauter software in exist noe, Two computers in one. And, the ‘2dvantages of both Plug and go. The SoftCard system starts with @ 2-80 based circut card Just plug it into any slot (except O} of your Apple. No modifications require. SottCard supports mast of your Apple peripherals, and, in 6502-mode, your pales stil your Apple. CPIM for your Apple. You get CP/M fn disk with tha SortCard package. Is ' powerlul and simple-touse oporatng System. It supparts more software than any other microcomputer operat ing system. And thats the key t0 the versaity of the SoftCard/Apple BASIC included. A powertul tool, BASIC-80 i Included in the SoftCard package. Running under CP/M, ANS! Standard BASIC-80 is the most powerful microcomputer BASIC Dallable It includes extensive disk \/O Statements, error trapping, integer Venables, I6-dgt precision, exter She EDIT commands and string func- tions, igh and low-res Apple graphics. PRINT USING, CHAIN’ and COM MON, plus many additional com mands And, its @ BASIC you can Compile with Microsoft's, BASIC Compiler: More languages. With SoftCard ang CP/M, you can add Microsofts ANS Standard COBOL, and FORTRAN, or Basic Compiler and Assembly Lan ‘guage Deveropment System. All more Powerul tools for your Appi. Seeingis believing. See the SoftCard inoperation at your Microsoft or Apple ‘dealer We think youll agree that the SoftCard turns your Apple into the world’s most versatile personal computer, Complete information? It's at you eaters now. Or. well send it to you and include a dealer ist. Write us. Call UROSOFT MICROSOFT Inc 10700 Northup Way * Bellevue, WA 98004 JUDGE THE REST, THEN BUY THE BEST Only GIMIX offers you SOFTWARE SWITCHING between MICROWARE’s OS-9 and TSC’'s FLEX. Plus you get the power of the GMXBUG system monitor with its advanced debugging utility, and memory manipulation routines. A wide varlely of languages and other software Is available for these two predominant 6809 Disk Operating Systems. You can order a system to meet your needs, or select from the 6509 Systems Teatured below. JUDGE THE FEATURES AND QUALITY OF GIMIX 6809 SYSTEMS CEMOC CLASSY CHASSIS is a hatewage amon mane cbr! winback untae coma COME yu ne, pcs, ke moos, {3 pein een ts you ue othe mses The pos tees rea asa evra ele Ya 30 ops TY 5%" ces es! wea webs teat sae ea Te Moos hae Me Sp ane 30 p Sls ys ao tears tan $80 esen avai sin ta aes tem 3 88 Ke pros he sco nh ove nde a8 eh xin ay {cress sce te it. Te 2 Mh 6409 OU cae haa wo ey ck mh ay ga 840 progres Ba, FROM Hout soe. an pons an pra SA 3812 bra Pen Te AW ht Ss, ow pee STATI mya ay patie wh a OWA neg STATIE AM eats sores ig, ov wal Ss oz sreng a av eae geen The ps nets? po Sz rice ada, lM nsw pets cont nae Ny nd WK eager, deserts Mane lat recs Atos wee, aa ee ely sr ly sd con Yon ary compre fs Asians saree ‘ene 3 3 eon sb cig our see Oa S6KB 2MHZ 6809 SYSTEMS WITH GMXBUX/FLEX/OS-9 SOFTWARE SELECTABLE, ‘With #58 single density disk controller $2988.59 With #68 DMA double density disk controller $3248.49 tosubsttute Nonsciala CMOS Rat with Dey backup, le 30000, {or 80 export power suciy models. 233 00 finer contr eased with any combination of §°anglor Biv, up to ves total have data vecovery ‘reuls ota separators and wre dosgred Lo ull eet the liming requerents of the Conroe 5 '4” DRIVES INSTALLED IN THE ABOVE with all necessary cables, Contact GINA fr price and availabilty of 8 Honby disk cries and cabinets; and 8” and 8” Winchester hard disk system, 128K 2Mthz 6809 DMA Systems for use with TSC’s UNIFLEX or MICROWARES’s OS-9 Level 2 [Sottware and crives not include) $9798.39 foreach editional€¢KB NMOS STATIC RAM tard. saa 367 Ioveac again! 61NB CMOS STATIC RAM Soar ad ‘eet toro zoxeor power supply aaa NOTE: UNIFLEX cannot be used wth’ S°minionny dies GK as lg eat 1 RAM. ROM, Sra nd Pri) Ve, Grae ad ae SSO bus cr at THE SUN NEVER SETS ON GIMIX USERS (Gx Syston ae tune an every cnn. sce! Anca, Any utes here Io ease contact GMX so we ci Change Mis) A represeiave group of GR ets ieudes Govarement Reach anéScine Organization it Austaia,Camaa, UK. ane he US. NASA, Cak Rog, White Pars, Fermi, axgemne, Sess, Sta Ktetn. Los Alas trl Lats, AURA. Unwestias: Caran, Water, Royal iy Cogs. Canad Tarn Geary, a ine US. Stair, SUNY, Har, UCSD, MSs Gea ga Toc. Indust wer Hong Kong, Malye, Sout Aiea, Gamany. Sweden, a nit S..GE, Beion chon, erat Hees, Morea, Alia Hone Perkin Elmer. Jrmson Coos, Associa Press, Ayn, New Elev, Revere Sug G/AMS Conta Cheon, Comper Iaitone anépurphral manufacturers, ib. On. Computer Pesheras in, rt sb Fi Stems Sotware toutes; Mioware, TS, Lula, Noroak, Tata, Svo Systems. AAA, Hi, Fata Hogg Labs, Eps assole, Swlwest. Dyas, esearch Resour. Merowars, anal Systems, Conpulrzed Buses Syste, GIMIX Systems are chosen by the Pros = because of quality, relay an ears, araenecmaersosememre Gimix: ete motor cuprovweras wcaancnrreerie eee ‘the Company that doiners iomoeonee iy once ee ee ‘sarwestsmptace, nteago,n ne Senne thaezraere © “rustle aes No 46 May 1982 ‘Mico ~The 950216809 Journal 1 FEELING A LITTLE RWHE}.MED No 48 - May 1082 NO. 48 MAY 1982 INCRO THE 6502/6809 JOURNAL MACHINE-LANGUAGE AIDS. g_ Memory Map Relocator. Preston A. Black Use this Randy program to prevent your programs from being overwriten 3 General BASIC to Machine Language Interface. crise Enstom 13 Atow better communication between BASIC and machine language 719 Memory Moves with the 6502 and the MCB809, ....c. water ana Advantages of 6809's crecipage adcressng are discussed. T. Whiteside APPLE PRINTER UTILITIES 37 LISZTwith Strings LH, Anderson, D. Cohen, AF. Searle ‘Turn Applesot stings into easy-ounderstand structures formats 48 Apple Graphics for Okidata Microline 80...._..chaves F.Tayior ‘Dump Apple hizes screen graphics 10 Okidata printer PET FEATURE 61 Commodore and MICRO. Loren Weight 63. PET Memory Protector Louis F. Sander, Victor H. Pte Isolate 1K oF more of memory ftom BASIC and resets 67 Growing Knowledge Trees......... + David R. Helse Ariicialitteligence represented in tee diagrams 4, PET Menu and Tape Timer. ale De Priest ‘Advanced cassete contol, extensive use of WAIT command COLUMNS PET Vet Loren wright 25 per scat eding 29 From Here to Atari James Cepparel “Front Jacks" on the Alar 400 ana 800 The Single Lite rad Rinehart 57 foe osx Basie {MICRO ~The 680216509 Journal 8 THE CHIEFTAIN™ 5‘.-INCH WINCHESTER sees HARD DISK COMPUTER SO ADVANCED IN SO MANY WAYS... AND SO COST-EFFECTIVE ... IT OBSOLETES MOST OTHER SYSTEMS AVAILABLE TODAY AT ANY PRICE. ee ‘@ HARD DISK SYSTEM CAPACITY ‘The Chia sees ints 52 and ne incnesters that range rom 4-10 6 epi capacity. an higher 25 rechanlogy évancs, Al had isk Chas ince ‘Sek memory with two eral ports ane Dosean ash opsating ster (© LIGHTNING ACCESS TIME Average acces tne for Sine chester is Fomeee comparable to ar ore cost hh sk stems Mat reas data arse tentimes faster isn Nope abhsystens. Coreen) Computer Systems: ‘Here are the Chieftain 680-based hard disk computers that are destined to change data processing (CHIEFTAIN 950 ‘Smenbye. Sinc Wrceser wt 280k hoppy athe pure) ‘CHIEFTAIN 95x04 "Sega, Stelech Wnceter with 2 Tadao ae poy ash de. (CHIEFTAIN 98W15 ‘Sime, eich Winchester ith 2 Uinegyte Blac Roy ds ve. (CHIEFTAIN 9W15T20 {Ssmsgayte. iach Wceser ith 2 Dougie ape steane ‘© 2-712 OPERATION Wnts ith peo py bckp ‘AL colts operate at 2h, earn | ey al rn onder DOS oF 05.9 it) aa te tg atem: | mo need (0 nel harvaror star. Sette aibt beret lim cad enone ET You rosby neve se i, bt any Cala ‘© DMA DATA TRANSFER Tard dst stem ean civ wp fo 20 ther chester an fur tape tes. DMA ata raster toa rom pe ant sk 5 in poles repo speed Aspecia! |. DM nec boar Sooeietece emnicnn. | Saou gratis emamne OF hich nomnaty tans: aa tower speet, |] EXCELLENCE wecset bbe aon ety ar | ‘Tsnergeeation computers acompe these Nosy te some Endurance Cee tray Deal enéses a er te @ RUNS UNDER DOS OR 05-9 | ort nave Come to Expect Hom Siake fo mer hich lean you sect... | ‘Sal Am suppor. sve ston an Seren ingore oceinen | olveney compel pclog ae very much pt of at eal epstin. 20-Megabyte Tape Streamer Back-Up Option Available with all Chieftain hard disk configurations. This cartridge tape capability provides fll 20-megabyte disk back-up In less than five minutes with just one ‘command, of copy com ‘mand for individual fle transfers, Transfers data lape-to- disk oF disk: tape. Floppy back-up is also available in a variety of configurations. Write or call today for details (including the low prices) on the Chieftain Series. . . and on dealership opportunities e SMOKE SIGNAL BROADCASTING « 31336 VIA COLINAS WESTLAKE VILLAGE, CA 91 TEL (213) 889-9340 |MieRO ~The 850216809 Jour Name company aattross 1362 a Telepnone ¢ No. 48 May 1082 ‘About the Cover “This month's cover rete MICRO of to A fiyng start at the races. ncresing Software and hardware sophistication take’ simulations possible that put you inthe drivers sea, The MIT Ar ‘eal Intelligence ab as produced ‘lcrocomputersideodisk combina fon that lets you simulate a drive through Aspen, Colorado, seeing on TV Just what you would see through your ‘windshield I you were actualy thre “The cover graphic was generated on an Apple Graphics Tabet, and tbe oat Bu wes produced on an IDS Calor Printer by Susan Maras at Computer Tand of Nashua, New Hampshire {Cover photo: Betsey Bolton ‘Ar Alive! Gallery 200 Mersimack St, Lowell, MA sre mony Second Class postage pda: Selo ROR a ina Subscription Rates Per Year us ‘2800 aye 800 Foreign surlace sa S00 Mil Ese Not Aes, AiR Reeve No. 48 May 1882 wicRo Present Shock ‘Taming on Commodore's new Super PET is startling experience, The system's introductory menu modestly olfers access to: BASIC; Pascal, FOR TRAN, APL, Assembly, and Monitor Merely bit the appropriate key! The development of the micro compte in proceeding at breathtaking Spee. A ferociously ficient combing thon of hgh technology, intense later: ational competition, and ready ven ture caplal ie generating new hardware fester than socieny cam absorb the old How rapidly the aeoapace industry pro essed, we once thought, marveling Ste shore span between Kitty Hawk dnd the Moon, But microcomputers are fdvancing much more swiftly. Incred thy, the aurval of the new SuperPET Colncises with ongoing use of abe KIMI, «1977 single boat system sil Covered by MICRO. Ava special effet, such an cele oreshortering of tm Belongs in a Star Trek episode, like Commodore's imagemaster, Williaa Shatner AAs we admire the development of ever-more-sophisticated mlcrocom: puter hardware, we should remember that each mew system requires of its lsers an enormous investment of time ‘A case in point: IBM's new Personal Computer. Announced last year tou: versal acclaim, the system almost en tively lacks software that exploits its 16-bit potential. While the software in dustry ‘strains to fill the huge gap that appeared the day the Personal Com: puter was introduced, even more ad- ‘anced machines are being developed. We must [ear to recognize how conservative we are with ost most precious investment, time. Otherwise, Costly mistakes will be hard to avoid For example, those who promoted novel keyboard designs in hopes of replacing the standard QWERTY arrangement have convinced almost noone, the rmatketplace least of all, We have in vested far too much time in learning QWERTY to leave it even for a signifi ‘cantly better Keyboard design. The 2eal with which microcomputer owners g0 ‘MicRO ~ the 850216802 Journal fon developing systems that are techno: Togieal antiques should warn us that these systems, like QWERTY, will be with us for along time to come. And as more and more new systems aze in: troduced, sopping up more and more available time and energy, the gap be ‘ween a new system's potential nd the availability of resources to develop thet potential seems likely to widen, ‘The solution to this problem is cer: tainly not to stop building more ad vanced computers. The limits of the microelectronics revolution ate nat yet in sight, and we can look forward t0 (ever more powerful microcomputers Whar we must do is understand that the most important component ina ‘working computer system — people — Cannot fully process change a such @ fast rate. Nor can we afford 0 discard Inuge investments of our time. There: fore, we must find ways to keep that in- vestment om board. The SuperPET, for example, includes both the older 6502 and the never 6809 processor, and can therefore run older as well a= newer Software, Radio Shack’s recently st nounced Model 16 incorporates the even newer 68000 processor, yet also {Uses a 7-80. All older Model Ii software can still be used. Infact, it will even be possible to upgrade Model Is with the {5000 board, MICRO supports design decisions thar make software compatible with different generations of a system. The Same generation of people will be using many. generations of computers. To Stay in touch with us, the micro computer revolution must be made compatible with the need imposed by ‘buman limits to use ovr time wisely. ‘This issue of MICRO spotlights Commodore's PET. Europe's most popular microcomputer, the PET Is Steadily attracting more American lasers. "The program accompanying David Helse’s feature article, "Grow: Ing. Knowledge Trees," was written especially for the PET. However, the insight itoflers MICRO readers into the once of ef itelligence makes all INCRO Letterbox Dear Editor Town an Apple T with 48K of Dear Editor: ‘memory, an Applesoft language card, 1 would strongly recommend and one DOS 3.3 disk drive. Ifind your _I just finished reading the March against your readers’ taking, at face coverage of the Apple to be not only issue of MICRO. As an OS! user [I have Weiuc, che comments ‘made’ in your very lazge in quantity butfine inquality. a C2-4? MF system) 1 wish to thank [uveinber 1981 Letterbox, Atan! Ad Talso geta lot of ideas from the articles you for your editorial “Hello, OSI” Atzacked.” dealing with the other 6502/6809 and also for making the March issue an ‘machines. St Feature Mr. Kirby does not define “‘adap- ting!” Ul Mr’ Kisby takes an Atari pro. Are there any plans to publish ar- _Let's hope that the cover photo is ata and makes 'similar” program, ticles which describe the other CPU not a group of OSI users watching the Bthay end up in the Austin court he boards which run in the Apple? Even OSI personal computer division going ‘nentions in bis fetter, The same rules though you are a 6502/6809 journal, an up in flames, Apply to @ computer program as to article describing how a 6502 works Pee, Mo uiemstnccessany tomakes with a Z80, 6600, 6809, 8088, and _Afterreaing the notation sbout the ToDse'dupeate th onder to be found other chips would be very interesting, cover photo, I Tooked through my col. guilty of copyright infringement. For Teetion of computer manuals and found Buiteple, ake were to use an unusual Also, ate any of your readers 4 copy of the manual prepared by Pro- Shovoucl or agorchm in only apart of familiar with the new MTU 6502 fessors J.G. Kemeny and T.E. Kurtz Aer ew “adayeed program fasseming, machine? I recently received some dated June 1965. A statement of in- thir the Ata! program ite makes it Hterature desenbing ie and i¢ isn't too terest in the manval i: “The language Gbvious tbat Sie contents aze copy. far froma “dream machine itself. It that you will use is BASIC (Beginner's Sighted), the remainder of the "adapted appears to have hardware 16-bit ad- All-purpose Symbolic Instruction Code) Mest coutd be totaly dierent, yet_ dressing [yes, 18 not 16) and grest bit which sat the same time precise, sim 2 copyright infringement could easily map. graphics. It also. has “a very ple, and easy to understand.” ‘be regarded by the court as having oc- sophisticated operating system corre Me, Kb wil then est nena! poem A J, Edward Loeffler, Jr toa number of possible actions, ranging Wve one final problem: A few Elkins Lake, Box 378 from erainal penalties, damages, months back, you had an article which Hunteville, TX 77340 Court injunctions. or all them. described an'operating system for the #09. There was O8/9 or some: Dear Apple Owners ‘Anelpful publication, costing about thing similar, Bus I don’t remember 5 ee eee Copsenht. kie” Seeing a manufacturer's name or ad- In conjunetion with the release of staked by the National Avtomey's ess [or price (or thet matter. Did T ‘The Graphics Magician and the up- seen inc, HO. Bow 130; Ease simply overiook these or were they dated Complete Graphics System Ih aaa eerie ook explains missing? Could you resupply them? Penguin Software is announcing a new searing In layinan’s terme and Does this operating system come in a policy with our applications software Seeee eee diy waters created by format for the Appie I's various 6809 forthe Apple, The Complete Graphics December's "intellectual. propesty boards? System My Special Bifecs, and. The law" expert. Property Graphics Magician will all now be Larry W. Virden available on non-protected disks Stephen C, Carpenter 1207 Rosell Ra, Apt 104 ‘Mondsiaanstraae 1 Reynoldsburg ON4GD8S We've been. tom between two 3160 TH Ou Besjerland points of view. As computer uses, we HOud Reverand paitor’s note: The MICRO staf is appreciate the ability to have several very interested in hearing from readers working copies of our applications soft ‘who have experience using any of these ware, and even the ability to go in and CPU hoards: Since these boards use the modify the code, if desired. We'd use Dear Editor {6502 to hundle the 1/0 and other func- programs such ‘as VisiCale or DB tions, ft would be valuable to see how — Master for dozens of other applications Your magazine is a very good one. the two CPU's cooperate with each if we could have them running off ‘My opinion might be illustrated by my other. Possible areas of coverage could several separate disks and didn't have Collection ‘of your issues. I started Include how the dual CPU's deal with to guard our master copies with such feading your magazine in late 1979. 1 cycle stealing, address translations, in- extreme care. Disks are fragile; we han- cancently have 38 issues, one reprint terrupts, parameter passing, ete Sle thousands of them, and no disk is collection covering six more issues, absolutely 100% error-proof. Being pro- Shivam requesting a recently missed The OS-9 operating system is grammers also, occasionally we'd like iouc When Lreceive this issue, Iwill available for the MILL 6809 card to adapt @ program slightly to our have access to information from 45 of through Stellation Two, P.O. Box system or our needs. On locked disks, fhe 46 issues you have placed on the 2342, Santa Barbara, CA 99120; (805) much of a software product's potential ‘market at this time. 566-1140. tusage goes untapped. (Continued) 6 IMloRO ~The 850216808 Journal No. 4 May 1982 beter won, but not by much over our Dear Editor: fear of tampering with something that is already going well. Our policies, It would be extremely helpful if But as publishers we've been drawn from pricing to support, have always some of your readers could direct me to into the prevailing point of view that heen ‘very consumer-oriented. Ulti- sources for two items: 1) « program in lack of copy protection means greatly mately, it is from that viewpoint that BASIC or machine language for OSI decreased sales due to casual "piracy." we decided to go ahead with removing Apple ll, TRS-80, of PET, to. score ‘This is not just a crazed overreaction, the protection. We feel that you, the Gymnastics Meets, 2 a 16K dynamic ‘we've all been to usergroup meetings, consumer, are entitled ro software as RAM (4176) board to add to OSI Super. hhomes of acquaintances, and even useful as possible for the money you board It some computer stores, where we've spend. Our hope is that the added con: been aghast atthe almost encouraging venience will result in more sales, not __ Thave been looking for both of these attitude toward copying copyrighted fewer, and thatthe software market has for Some time and have had no luck software, most of which took authors matured t0 the point where people Letter Box (continued) ‘months, maybe years, to perfect. The realize that the result of illegal copying Bro, Felix Neussendorfer real scate here is that many of us have is less convenience for everyone with ‘Monasterio San Antonio Abad decided to take a riskon a very new in. all sofeware. We hope that people will Box 729 dustry and trist our livelihoods to it. think twice belore accepting, copies Humacao, PR00661 Suddenly, individuals out there be- from friends, and we hope to be able 10 come statistics, some of which say ehat continue this policy and start a new for every non-protected program sold, trend toward improved usability of all there aze at least a dozen pirated” applications software. Please’ don! copies. Those kinds of numbers could abuse our trust in you really wreak bavoe on paying the bills. Seary? Yes ‘Mark Pelezarski President 1 you have comments you'd like 0 share with MIGRO's readers why not send 2 Teter tothe editor! Editor Penguin Software Salto, From these conflicting pointe of 1206Kings Circle UCRO, view, our deste to make a good product West Chicago,IL 60185 Chelmsford, MA 0164 cosmos CREEN UL MIXE NORMAL THIS | ave ine appte-it with more features You could ol expect cepa is, | V SCREEN MIXER provid Crd The mixed screen of any two of screens avatlable for the Aopen Please ote ha sl of HEA, TGR aa Tot screen iad cna ciao 50 hte i he He Noun ot 28 fs Se sew you will have the choice af Half-loteaciy snd Hilighted che ‘Gotteave te included) nn YO" WOMEN 40! $6O Manuat — $10.00, applied towards purchase COS” ooo incetion Sat or write to ASTAR INTERNATIONAL. Co, ieee Gie FRANCIS AVE, CHINO, CA AITO. Phone T140627-9807 No 48 ~ May 1992 Mono - The 6502/6608 Jour > SDS Presents “The Professional” Series For the test time over, toe packages ‘acompassing all major Apple ‘erating systems: ‘+ ASCII Express “The Professional for Apple 008. «= Prform "The Professionals for Apple Pascal + Derm “The Professional, for Apple Gein FORGET EVERYTHING YOU'VE EVER HEARD ABOUT COMMUNICATIONS SOFTWARE, 80S now offers thiee new ‘communication packages ike no ‘tners.on the marke today. These packages are designed to operate Ske, fo look alla, and fo De Completely conversive with each other. ‘Am operator familiar with any one of these packages can easly eperate the btner {wo with minimal instruction ‘Xbsoitely no other packages can ‘equal these ouistanding features All hvoe packages are totally Converse with each other. ANY ‘ype of file nay be transfered Completay erorires within these oF ‘compatibie systems ullzing the Ghvstensen Protocol Transfers may also include any ASCII based dialup host computer. {Those floxible transter eapabities re made possible by a wide variety of send otione unique 12 SOS, Soltware ‘Support of ALL Apple-compatibie modems ane ALL olsplay systoms Including any 8b.column boars or tenternal terminal 40-colum 109. erminal emulation — allows your Bo-column board or extemal terminal fo “emulate” screen control coves MICRO "The 050216809 Journal of other terminals. lea for serer- ‘ented editors 0° data bases. Fully unattended answer mods features password only access and ‘rior free transfer of tes, a8 Wall as ‘Sangard ASC Wansior modes, Bll packages support up to 1200 Baus. Term and ASC Express Support un Yo 4800 baud when interupt riven, + Greatly annanced macro system now includes programmable "hand Shaking” macros — entre logon Sequence may be automatically fxecuted, Also, many internal program commands may be initiated fom macro costal. Multiple macro libraries may be stored for use with a variety of hosts [A NEW STANDARD OF EXCELLENCE “ine Professional” series Is so innovative and superior to other Duckages inthe tel that H's truly it race by iso Our comparison chart ‘Ges a deaied polntby-point analysis, St'tnese and other communication packages. Wet fort You'l be Convinced — when it comes to Communication sofware, SDS stands —SDS southwestern dats systems. P.O. Box 582.44 Santee, CA 92071 714:862.9670 No.4 = May 1982 —_—_—_— Memory Map Relocator by Preston R. Black This short program relocates a Memory Map Relocator Previous memory map program. b bessseeeeesteecinansnnesen ‘Thus, even your longest program uy won't be written over by the : ERORY NAF RELOCATOR . memory map program io i | MEMORY MAP Relocator 7 f requires LE ca emperors Applet 7) Sern uaee re “The MEMORY MAP program by Peter iter eterna te Gosh (MICRO 365) tery Sepant iy MSRP” warts soe mcaaey gpa : safes evcant | Apple computer. I have found this program to be particularly useful as a tool in program development. It gives, ‘me an up-to-date account of the size of ry program and the space reserved for variable storage. iret One of the drawbacks of the pro- reetia {gram is ts location in memory {$3200}. corer ‘While this does not interfere with most = ‘of my programs, i is annoying to have aoa to frequently reload a large program ay because parts of it have been written Fares over by MEMORY MAP. This can be rere disastrous if the program you are ‘be Geveloping has not been saved, More: car ‘over, MEMORY MAP keeps reminding , ‘me that there is free space to use with, ‘my programs. Wouldn't st be great if MEMORY MAP were always loaded in to that free space, leaving your program ‘As Mr. Cook points out in his ati cle, MEMORY MAP sno ail 9- catable since there are frequent solute references within the progr, ‘Torelocate the program by hand would | 2312 Fim rue nearer mie rac be most tedious. Obviously, a rclo- cating. Toader for MEMORY MAP is what we need fo ha MEMORY MAP RELOCATOR is 5a Rano 9. rre Sune WE ame Ove such a relocating loader, This program a eee, 1 ie Pesan defines the free space in RAM and foads fee MEMORY MAP into that area: MEM. wi Se Yee, use reresen marc ORY MAP RELOCATOR then updates tee rere 5 Fetiaens the relocated program to make itinter- ert {cease eres ati nally consistent” and. fumps to. the beginning of the relocated program to (Contnaed) run MEMORY MAP. ——— ee No. 48 — May 1882 MICRO ~ The 650216800 Journal ° How it Works The first step in relocating MEMORY MAP is to define the area of fee space in RAM. Both Applesoft and Integer BASIC have pointers co the end of the program stored in memory. Un- fortunately, they are not the same bytes. In addition, programs are not stored the same way in the two lan fuages. Applesoft begins storing pro- rams at $801 and succeeding bytes are fdded above this. Integer BASIC begins Storing programs at HIMEM and places all succeeding bytes below this. Thus, the pointers to the end of the program in the two languages must be treated differently. For Applesoft we must load MEM- ORY MAP above the program already in memory. If we take the high order byte of the address of the end of the program and add one to it, we can be fertaln that we are above the program in memory, MEMORY MAP requires, slightly less than $COO. bytes of memory if we include the area used by the printing routine. Therefore, in In teger BASIC we must goat least this far below the program to load MEMORY MAD. Otherwise we will overwrite the [BASIC program already in memory, During initialization of MEMORY MAP RELOCATOR we can desermine the current language by checking ‘which prompt is Used. Appropriate ad justments must be made to the high border byte ofthe program end. We now have a starting address within the free space to place MEMORY MAP. Caleu- Tite the ending address of the relocated program by adding the length of MEM- GRY MAP co the new starting address [Next load MEMORY MAP into the free area. This is done by constructing ‘a string consisting of ""BLOAD MEMORY MAP,ASxx00". The xx is the high order byte forthe new starting address that we determined during in itiaization, But before we can place this number into our stsing, st must be ‘converted into the ASCH representa tion of that number. This is done by first dividing the number into ewo nib- bles a nibble is equal to four bits) and ‘converting the nibbles into the Apple [ASCH code for the respective numbers. ‘The Apple ASCH codes for the numbers from 0 1099 are $BO to $89 respectively ‘Thus, to convert these numbers, we simply add $B0 to them. (The numbers SA to SE must have $87 added to them to convert them into ASCIL.| Once the numbers have heen converted to ASCIL, they are added to our string to complete it. We then use COUT [SFDED) to pass the string to DOS to be executed. 0 Memory Map Relocator (Continued) |MieRO - the 6502/6800 Journal No. 48 - May #982 Wamory Map Relocator (Continued) (Once the program has been loaded nto memory, we must update it 10 make internal calls consistent. ‘The algorithm for this is as follows First, the offset between the original program and the relocated program is caleu- lated, This isthe amount that must be auded to the original addresses to make them compatible with the relocated program. Using the monitor routine INSDS2, we determine how. many bytes are used by each op code. Ifthe op code requires only one or two bytes, then any addressing will be relative and will not require updating. If, however, the op code is three bytes jong, then all addresses used must be absolute. We must also check to see if that ‘address is within the boundaries of the ‘original program (ie, fom $3200 to ‘$38E0). Fits, then we add the offset 0 the high order byte. I itis not, we go to the next op code. We contintic in this fashion until we zeach the end of the relocated program. When the relocated program bas been completely updated, ‘an indirect jump to the beginning of the telocated program will run MEMORY MAP. How to Use the Program MEMORY MAP RELOCATOR re sides on page three of memory. Since it is Tonger than $D0 bytes long, st over writes important DOS vectors located fon page three. To insure proper fun tion of DOS after the program is run, a short routine to restore these pointers begins the program. It is placed at the beginning so it will not be destroyed while the pointers aze restored ‘The routine to restore the pointers makes use of the part of DOS which places the pointers onto page thzee dur- ing the bootstrap. Iplace an "RTS ($60) in the place that suits my purposes and restore the byte to what it was before performing the indirect jump to mun MEMORY MAP. Once the program has been entered and saved, BRUNning it will place MEMORY MAP into the available free space and run it. Remember that this program is written to run with a pro- zam named MEMORY MAP which is ormally stored from $3200 to $32E0. With minor modifications, this pro: ‘ram can be converted to fun with a program beginning at any address, and of any length. Please contact Mr. Black at 16 Dutham Sc, Boston, MA 02115. TARO" BUC) CMe Tein gs) (Tae errs Geo? ord Soe cos NikROM No 48 - May 1982 ‘MICRO = The as02/6808 Journal Ce ees ered BOX 120 ALLAMUCHY, N.J. 07820 inc. 201-362-6574 HUDSON DIGITAL ELECTRONICS INC. THE TASK* MASTERS HDE supports the *TIM, AIM, SYM and KIM (TASK) with a growing line of computer programs and Peripheral components. All HDE component boards are state-of-the-art 474" x 6¥2", with on board Fegulation of all required voltages, fully compatible with the KIM-4 bus. OMNIDISK 65/8 and 65/5 Single and dual drive &” and 51" disk systems. Complete, ready to plug in, bootstrap and run. Include HDE’s proprietary operating system, FODS (File Oriented Disk System), DM816-MBA ‘An 8K static RAM board tested for @ minimum of 100 hours and warranted for a full 6 months. pMs16-UB1 A prototyping card with on-board $V regulator and address selection. You add the application. pMst6-P8 A4/K EPROM card for 2708 or 2716 circuits. (On board regulation of all required voltages. ‘Supplied without EPROMS. DMst6-cc1s ‘A 15 position motherboard mounted in a 19” RETMA standard card cage, with power supply. KIM, AIM and SYM versions. DISK PROGRAM LIBRARY Offers exchange of user contributed routines and programs for HDE Disk Systems. Contact Progressive Computer Software, Inc. fordetails. HDE DISK BASIC ‘full range disk BASIC for KIM based systems. Includes PRINT USING, IF ... THEN... ELSE. ‘Sequential and random file access and much more. $175.00 HDE ADVANCED INTERACTIVE DISASSEMBLER (AID) ‘Two pass disassembler assigns labels and con: structs source files for any object program. Saves multiple files to disk. TIM, AIM, SYM, KIM. versions. $95.00 HDE ASSEMBLER ‘Advanced, two pass assembler with standard mnemonics. KIM, TIM, SYM and KIM cassette versions. $75.00 ($80.00 cassette) HDE TEXT OUTPUT PROCESSING SYSTEM (TOPS) A comprehensive text processor with over 30 ‘commands to format and output letters, docu- ments, manuscripts. KIM, TIM and KIM cassette versions. $135.00 ($142.50 cassette) HDE DYNAMIC DEBUGGING TOOL (DDT) Built in assembier/disassembler with program controlled single step and dynamic breakpoint entry/deletion. TIM, AIM, SYM, KIM AND KIM cassette versions. $65.00 ($68.50 cassette) HDE COMPREHENSIVE MEMORY TEST (cu) Eight separate diagnostic routines for both static and dynamic memory. TIM, AIM, SYM, KIM and KIM cassette versions. $65.00 ($68.50 cassette) AVAILABLE DIRECT OR FROM THESE FINE DEALERS: sca a MICRO = The 850216608 ournal Lavorton Mra Contant exis Poaes a No. 48 = May 1982 BASIC to Machine Language Interface by Christer Engstrom Since the AIM lacks a SYS or CALL function, it is difficult to communicate between BASIC ‘and machine language. This interface routine makes the USR(W) function more flexible and allows entry of the machine language address directly in hexadecimal through the BASIC variable AD%. Intertace requires: AIM with 4 BASIC AIM Assembler Town an AIM with 4K RAM and BASIC and assembler ROMs. ‘The BASIC incer- preter is slow, but the machine itself is Very fast. Furthermore, there is lack. ‘of cooperation between BASIC and ‘machine language. The only way to jump out from BASIC to execute other code in memory, isto use the USR|W) fommand. This command lets you jump to a subroutine whose adress 1s {given in locations $04 and $05, and also sss a floating point value in locations SBI SBS, A frequent use ofthis method results in many POKES, which are done byte- by-byte in decimal. This is not good for readability. I think we need an easier \way to jump out, «better way to define where to jump, and a method to pass patameters. We need a general interface ‘The best way to define an address is with (ASCH) hex characters, Here's my solution to the problem’ every time BASIC executes the USRIW| command, the machine enters the general inter: face. The integer AD is supposed to ‘contain the addzess to jump ¢9, in high low ‘order. “The interface “scans the variable table and searches for ADS6 (which in the machine is interpreted a8, SCIC$ — ASCTT of ‘a’ and ‘D’, each ‘ORed with $80). I i is found and con- tains an adéress > SOOPF, the interface converts the value W specified in the No. 48- May 1982 USR(W) statement, to a signed binary value in locations’ $AC to SAD (sub- routine SBEFE) Next it loads the byte at location SAD (LSB ofthe value) into the accumu. lator, and jumps to the subroutine. On returning fom ehe subroutine, the acc mulator is stored into SAD, and the signed binary value in $AC-SAD is con: verted back tothe floating-point register (subroutine $COD}, Finally, a return to BASIC is made, Examples 1. You want to jump toa subroutine a location $0400, 10 ADw, 20 L = USAIO) ‘0400! 2. Take advantage of the monitor routine at location SE97A, Don't forget that the accumulator must be loaded with a value 10 AD% = x°E97A' 20 L = USAIA) know, you're thinking that the "0400" and the X"E97A" ate not con- {orming to general BASIC syntax. But ‘AD% 1024 and AD = ~ 376 are! So ‘what we now need is a way to translate all X"." expressions to their decimal ‘equivaienss before execution. That is done by the hex converte, Ifthe general {interface doesn’t find AD¥ or i AD 1s. zero, all X"."" and 2", expressions are converted to decimal. You can see thatthe hex converter is entered via the general interface. Thi ‘means that iis easy to modify the inter. face so that it can execute more func tions (with a function code in AD) You may even ‘want to modify the whole interface. Maybe itis better when used this way: MICRO = The 650216808 Journal Let's get back to the hex converte. If you want to assign an unsigned vale > STEFF to a BASIC Integer, you must ‘consider this: che interval $8000 to SFFFF equals the decimal. interval = 32768 to ~1. This means that $8000 =, =1810000 $8000) =~ (65536 32768) = = 32768, We don’t always want to translate the hex string to a signed value, 50 another type must be defined, This leads, us to two different syntaces. To get a signed decimal value, precede the hex string in quotes with an X. For postive unsigned) values, use a Z instead. Example 3: "9000" = — (655396 -s6864) = 28672 BUT 29000" = 96864 1 you define an address, use the X type [Note that only the program part, not the variable pan, is bexconverted, Also note that the string within the quotes ‘must consist only ofthe hex characters 0-9, A-B, and have a length of 0 4 characters, Leftfil with zeroes is done automatically. For example OL 2A Alter hex conversion, UsF(09%0) 0208/8 tol. 2A no compression is done. The string beginning with X or Z is replaced by a iecimal value of the same lenge I the hex string is not enclosed within quota. tion marks, BASIC wil attempt to inter pret some strings to function codes Gut ing input phase; "DEF" for example Program Description: The interface In my version, the interface consists of two parts: the interface and the hex converter, Since only relative branches are made, both pars are relocatable. The interface and the hex conversion need syntax, it is converted tothe decimal equivalent [pages "MOVE RIGHT JUST” and "STRING TO HEX") ‘not cooperate — simply remove one of SCAN—A search for SCIC$ or end-of- them, In my version, the interface must table is done. know the real start addresses of func: tions i¢ should handle. The BASIC input ~NEW—Get address for next entry, scan butler ($14 » $50) is used as a work area. again 3. itis an X" string with a value> = ‘The interface stars with a lookup of the £32768, a sign-conversion /see exam. variable table. CHECK—Tests value in leftmost byte ple 3) is done [page "SIGN | of integer AD, CONVERSION"| Here are some valuable points JUMP—Jumps to subroutine afte float- 4. Finally, the converted value is edited 1. The start address for the table is ining point conversion. At returm, con- back {0 the program [pages "EDIT locations $75 and $76 eres integer back to floating point aay. NOW" and “MOVE TO FROG") 2. An integer variable name has $80 OUT—Clears A,X,¥ registers and 5. When the program part fs scanned failed. t0. the first and. second _reaurs back to BASIC. bough, eta to he interface Is Character of its name (thus making done [page "MAIN LOOP" ‘AD® = SCICA, noe $4145) FUNC—Jumps to functions by testing the rightmost byte of AD%6. Invalid Conclusion 2. Every ene nthe tbl const of functions ae nee ne ae seven byte, the first two for its fe now have an extended and more eter ies ae flexible way to se BASIC withthe rest FUNC.—The f cf the machine. Even some moniter 4. An integer variable has its value Hex Converter Somer Fens tie Sor SRL, (Basel Sn tot Ren byte Fabre allows us to specify constants in hex- He ntes This is a fanly Jog, and_ space decimal mode. Ths method aso coop ¥ " consuming pat the readability is trates. better with the Test of the 5. “Enda is Gage by SA Snore that na rua Satbine Bally the inertie can belp er oeatirrot an ee uring the editing ofa program (function 1. Asean forall sings begining wien SEES Hen Hereis.adesciptlon of whatis dane” S.°%n4 30" te done in the peers teach label part (page "CHECK PROG" Please adress the author at Gotlandagutan, 714,204 TR, 511688, ENTRY—Stores the aldress of the 2, Ifsuch a string is found, and the rest Stockholm, Sweden variable table startin a work area ‘of it conforms to the above given Ee fe = se SERVING YOU SCE 180 WE WLETT-PASRABD| new file ea {ee ope, C8 8008 8 @ sige ae TELER 67 3877 ORDER DESKS ope 7 Des el 708 Ae 0 Pt a St iy Hoon Sa Pe ore Dea (13758150 yolurner Tov #ee lode iy 00.421 004s ATARI chi MICRO = The 680216809 Journal No.8 - May 1082 Listing 1: Tho Intertace ora 2675 one Bela FBS 1676 87 8615 Fee BIL ‘OFBD CORA ‘orar FSi Orsi cact (0F93 Doo? 0895 ce (0F96 Bli4 ‘FSA FOIO Ors ASA ESP 6907 FAL 6514 (2A7 8515 o=n9 16 (FAA 9000, Ommm s114 OFA 8025 OrB6 8516 ‘oem 2002 ORR BIL FBC 8518 Far 8114 Orel ast? ‘orcs 201600 (886 9069 on 16 FEA 9065 ose 18 eH Omi 207mE | oe FRB EA. mac fo8 NY im (514),¥ ow ‘BRD CHEK ae A 14 ‘ate #507 smh 918 On 515 ste 4500 a5 iM (314), BRD FINE SSR SRE un iste Sm 516 wr 4502 a (514),¥ 5mm $18 IY Un (514). @@ #500 ep FINO OP 1501 Ba = RS sR $0500 ae bee cur ae Listing 2: Hexadecimal Converter a CONVERTER. * BY CHRISTER mvsTaG ‘ons gu00 p00 1573 omer Lan $5 bbe Bota Sta 814 spd A574 nn 574 ‘E06 8515 STR 15 oee 5 ‘808 START LOOP IN PROG one ee Asis ua 1s ‘ORDA 0576 Ge 576 ‘arse 3007 a @ ECE ASIA Da $14 10 c575 ae §75 ‘9612 3001 Ba @ beta 60 es oes a E15 zor60e = Gos supe beta fe ae or19 asia on 24 Dee e902 Ae 4891 Seip 8514 tm fla Oe1P SIS un 315 ‘921 6800 ne $500 E23 8813 Btn fs 0825 18 ac (826 9060 bor oor ons : eae oRBEK PROGR onze : E28 De su a (9829 A000 IBY #500 E28 9956 un "x 820 Bile ae (a).v OEZF FOG ‘BD CONT E31 ROSA “z 633 Bila ae (4),¥ 035 2037 Be NEXT os? : 0837 8516 Cor sm 516 039 1922 un * Es co mr e3e bia ae (514), ESE DOZE BE Sex ‘E40 A250 ux “0 bk? 8618 St 18 O44 8619 51x 519 | gets esa mx SIA Sets 6b Six S18 ‘pan A200 nx $500 BAC 8634 rk 534 Opae Aas th #18, (050 0633, Sm $33 (eS2 EA soe 83 : 053 co ow OEs4 Bie Wa (514), ese 6922 on sa POLS ep Ur ‘ESA. C05 er #506 Ese POLO ep Nr (Continved) No a8~ May 1982 MCR ~ The 650216800 Journal), sting 2 (Continued) ‘BSE 930 (BRA 2003 ur wr $503, ose B13 Uren iA (333),¥ ese 207ber ‘sk SEA7D O91 9133 bm (833),y | 083 6 Dex _nonenededoccosncnensoccasesadanananenenc POWER TO YOUR AIM Treat your AIM to 8 quality power supply: 41. Designed to Rockwell's specifications for the AIM#5 (6 volts at 2 amps, regulated: 24 volts, 5 ‘amps avg., 25 amps peak, unregulated). 2. Overvoltage protection to protect the expen: ‘ive circuits in your AIM (6 volt output). ‘8. Handsome all metal case (two tone biue). 4. Fuse (externally accessible), switch, pilot Tight, line cord, cable from power supply to AIM — all Included 5, Conservative thermal design for long life. $64.95 ppd. (continental U.S.) CA residents add 6 % sales tax. VISAIMC, cashier's or registered check. Personal check (allow 2 weeks to clear) CompuTech ‘Box 20054 Riverside, CA 92516 seca eneEEREIaREREPSRONCHaRANSNaGOSOSKIEE sting 2 (Continued) (094 1086 096 (0896 A200, Orpe 8622 (ORDA 8623, ‘E8C 9624 ese Fe. ESP A040 EAL 8525 Gena A996. OAS 8526 (OFA? ASB, (OFn9 (FA9 908 ‘EAB 3000 ea AIS. OFAP C956 (oem 0007 (E83 ASAD. Eas, Ens 8516 ep? 18 Ene 9004 ‘ERA A930, ene Bc asi ERE cele ‘0800 5005, (0B? 20R60E ‘ES Sor? BC? 1902 co 8525, BCE A956 onc 8526 once C619 EDL 3005 (en3 20R6cE (ome 9c? EDs 2900 GEDA B25, ome 916 Ome 8526 BBO CELA, OBE? 3005 (EEA 20R60E ee? Sor? O==9 A901 EEE 6526 Gem ceils (OEE 201A (BFL 20PéoE ogra S07 ere OPE 18 nF? A524 OnFD 6526 OER 8524 ERD A523 CEFF 6525, (oro 8523, ‘oro A522 (0705 6900 (fo? 8522 ros 18 ‘Fon 60 BRL UT2A START COUNT LooP LA ms uns ms ors m6 aK #500 STK $22 51K $23, IK 524 sD Inn #540 STR $25, In #556 STR $26 tan 518 Bir ‘ow #508 Prater tha $16 or x Ee NT TDR #585 <0 STA $16 ae oc INS In ‘0 ob STR 816 Dec 518 aa Un ‘JSR ADD Boe 183 TA #502 5m, $25 Inn 3556 51m $26 Dac $19 Re UT si ADD oc IN in $500 5mm $25 Un #516 STR $26 ec Sin ao US SR ADD ee INS inn #501 STH $26, bee $18 Ba Une SR ADD bee Ine {ADD TO RESULT ‘ae ADD TO RESULT sigs on $24 ace $26 mm $24 In 523 oc $25 STA $23, tan $22 ‘AEC #300 STA $22 ae RS CONVERSION (Coatinu 16 IMicRO ~The 650216800 Journal No. = May 182 Tang FTG cree : Orv asic ine un sie we Oc Hh tc cons or ts Sor sos ae i ein Se a cri 936 En 936 Pret cris esa se fe orig Best Sm Oot Scns tele 2938 un 35 rin #323 oe 3) Peat en ore Sm ori 1906 TA #500 PDAs ooo taee Be 9 0F22 8522 ST $22 WHAT ARE MY PRODUCTION COSTS? cra ore a ores ort ap ANSWER THESE QUESTIONS wee 2 AND MORE rae Ri Ba O28 8535 STA $35. wan a 2820 im $23 : oa 152 un §22, KEYSTONE DATA’S OFF 8536 ‘STA $36 INVENTORY MANAGEMENT SYSTEM cra sage in $29 EB Se SS ela tse a557 smn 937 cre 1525 in 3 oe 332 in Sa SILL OF MATERIALS PROCESSING esp e530, em $8 + AUTOMATIC OR MANUAL REORDERING cer sen im 3 eae un S23 + REVIEW OF DAILY acTIVITY or 0529, mm 39 + MATERIAL & LABOR CosTING ores 1574 ur S24 + DISTRIBUTED PROCESSING CAPABILITY ces asa om oan + REMOTE SITE COMMUNICATIONS oe un Sa + LINE ITEM CROSS REFERENCE BY — cso 530, bm 38 ASSEMBLY es Sok a OFS6 290 Leer AND ¥5r0 VENDOR ose oA ton PART IVP or ok = 59 Sk = + COMPREHENSIVE USER'S MANUAL rsa en re se Sor am AND sor eee = AVAILABLE FOR ors 6930 mo 0 OTS 6220 we 70. HDE DISK systems oe St ot Se ones 60 = conract — ree oor vere ASS 4907 ones 6 ares 60 m= ren ; rea Jee 70 roo EYSTONE Gree B33 a a3 DATA CONSULTANTS, INC. cer. 06 of erro bate Br fle. CUSTOMER SERVICE ere Biis pe im (SS. Bir potbe cere esis tes oie oe ait ais, YORK, PA 17406 3 Eh ite cial ‘OF7A A416 ‘Ly $16 717-848-5666 cere cay mae wewsen wel me au Yemen tcomine, oreo &0 eres ata Pa ea Tas No.8 = May 1982 MICRO - The 650216800 Journal 7 PHOTAR @ THE RINGS OF SATURN = PULSARS = KILOSTARS @ BLACK STARS 1N The Ultimate Experience in Outer Space Adventure Produced by The Ultimate Experience in Outer Space Adventure Screenplay by TYEE The Ultimate Experience in Outer Space Adventure SAB ye i Cty Dietibuted though Sottape ‘and other computer stores worldwide 40432 BURBANK BOULEVARD = NORTH HOLLYWOOD, CALIFORNIA 91601 35-5763 MicRO ~ The 650216809 Journal No. 48 ~ May 1982 Memory Moves with the 6502 and 6809 by Gregory Walker and Tom Whiteside The authors demonstrate the advantages of the 6809's direct page addressing and 16-bit Index registers with a ‘comparison of 6502 and 6809 memory moves. Ina previous article (MICRO 47:57] we illustrated the advantages of program: ‘ming the 6809 over the 6502 with a comparison of multiprecision eith- metic routines. We continue inthis ar ticle with a comparison ofthe two pro- cessors” capabilities in solving memory. move problems ‘With these two articles, we hope to demonstrate that the MC6809 Is not tly faster and more byte-efficient than the 6502, but also more staightiorward {0 program. Because the most useful kinds of 6502 indirect addressing must be done through page zero, it is impor: tant, particularly with larger operating systems, that page-2er0 RAM be used wisely. In addition, the 6502 index Tegisters are only eight bits long, Timiting indexing to a 256-by¢e range ‘These limitations will show them: selves especially well in these memory ‘move examples, Memory moves have a number of practical applications, including word processing, EPROM programming, and program relocation, Similar techniques fre involved with sting manipidlation and table searches, Figure 1 is a 6502 memory move for fewer than 256 bytes from a fixed ab- solute addzess. This routine is not all that useful, since it can only work on ‘two fixed pages due to the limited range ofthe 6502 index registers. However it illustrates the teal power ofthe 6802 in terms of byte efficiency and speed over small ranges of memory ‘The program uses the fastest form of 6502 indexed addressing — absolute indexed. ‘The Y register will be used No 48 = May 1982 both as a loop index fr the move and as ‘counter for the number of bytes to be ‘moved. The ¥ register is initialized to the number of bytes co be moved and is decremented each me through the loop. When the ¥ register decrements to zero, the branch conditions are not ‘met and the loop terminates. This use of the ¥ register eliminates the need for CPY immediate instruction in the Toop and speeds up the code, A CNT" value of 2et0 will move 256 bytes. In these examples, the LNG" eo! ‘umn in figure 1 represents the number of bytes required per instruction. The “TIM” column ‘is. the number of ‘machine cycles per instruction. ‘The {6502 memory move for fewer than 256 bytes of memory required only 11 bytes of code and approximately 14 machine cycles per byte moved. Figure 2 shows the same memory ‘move writien in MC6809 code, In this example, the 16-bit X register points to the "FROM" address and the Uregistet points at the "TO" address. The MC6809 addressing, mode used is in- dlexed with accumulator offset. The ef- fective address is formed by summing the two's complement contents of the B accumulator with the contents ofthe index register used, You will notice that the B accumulator is being used in the same manner as the 6502 ¥ reeister was in figure 3. Because the offset is ‘two's complement, the MC6809 exam ple is limited to 127 bytes. We included this example to show bow similarly the ‘wo processors can be used to solve the same problem. The MC6809 took 15 bytes and 15 machine cycles per byte moved While the 6502 wins this round by four bytes and one machine cycle per LNG TM} Loy sent came LOOP LDAFOM-1,y 3 4 STATO-L.Y 3. DEY 13 BNE LooP 203 1 Figure 1:8502 program to move fewer than 256 bytes of memory. Timing = 2 + 14 NNwhore N isthe numberof bytes te move INITIALIZE THE BYTES TO MOVE count. LooP: Ger BYTE TO MOVE MOVE BYTE DECREMENT LOO? COUNTER LOOP UNTIL ZERO COUNT wise N DX #FROM: Ubu #01 UDB sents LOOP LDA, x STAB, U Deca BNE LOOP MICRO - Te 650216809 Journal Figure 2 MC8809 program to move fewer then 128 bytes of memory. Timing = 8 INITIALIZE “FROM POINTER INMIALIZE "TO" POINTER INITIALIZE BYTES TO MOVE COUNT Loop: Ger aYTE "AND MOVE TE DECREMENT LOOP COUNT LOOP UNTIL COUNT IS ZERO byte over the MC6809, the MC6809 code is more versatile. If this were a subroutine, "LOOP" could be called with X and U pointing anywhere in memory, while the 6502 example ‘would Be Limited to the 256-byte range of its index registers. Because the ‘MC6809' code olds the pointers in registers instead of memory locations, itis reentrant and could be used in a real-time operating system, Since it appears that the 6502 can ‘keep up with the MC6509 on a short memory move, let's try another memory move. ‘This time the code imst be able to move any number of bytes. A feal measure of a processor's power is how much its performance egrades as the complexity of its task jnereases. In this example, complexity ig measured in terms of address range. Figure 3 shows a 6502 program to move any size block of memory "CNT™ bytes will be moved from ad- dress “FROM” to address "TO". The bytes will be moved starting at address "FROM" plus "CNT," with "CNT" decremented each time through the loop. Since the 6502 index registers are ‘only eight bits wide, it is necessary to fuse’ indirect indexed addressing. t0 ‘move more than 256 bytes. (We do not count self-modifying code as an option, bbat as an abomination!) ‘The first part ofthe program sets up the two 16-bit zero-page pointers ee on ENR te 16-bit number stored in the X register (least significant byte) and “COUNT” (amost significant byte), The X register is used t0 store the least significant byte of "CNT" to save three machine cycles per byte moved over using @ zero-page variable. The "\CNT” most Significant byte is initialized to one Count higher than desired to eliminate the need for a load/compare step that ‘would have used time and bytes. The pointer least significant bytes are in- remented rather than the Y register, since the "FROM" and "TO" least Significant bytes might not be the same. If the above “tricks” seem_com- fusing to you, you are not alone. Tricks cost money in terms of debug time and the time required to recode che routine ‘when some performance requirement is changed. However, we tried to write the best 6502 code possible. The result is typical of commercial practice. Even ‘with all these tricks, the 6502. code was 47 bytes long and’ approximately 32 machine cycles per byte. This is more than four times the size, and twice the tyeles per byte over the short memory move, Now you see what we meant about performance degradation with in- creased task complexity! Figures 4 and 5 show two versions ‘of MC6809 memory moves which can handle memory ranges of more than 256 bytes. Both exanoples are identical except that one {figure 4) moves mem fry one byte at a time while the other {figure 5]" moves two bytes at once. Both require 18 bytes of code, but the second program is eight machine cycles per byte [4096 faster than the frst. In both these programs, the X register acts as pointer to the "PROM" address and the U register acts a8 a pointer to the "TO" address, jst like the program in figure 2. In these routines, however, the index registers are incremented each time through the loop as indicated by the No" beside the indexed loads and stores, Since the second program moves two bytes at a time, the MC6809 ‘double increment "+ +”) mode is used to advance to the next ‘word. In both figures, the ¥ register is a ‘counter to the number of bytes remain- ing to be counted. The "LEAY" in- struction has no 6502 equivalent and indicates that the Y register is to be loaded with the effective” address in- dicated in the operand field. In igure 4, the operand fled of the LEAY instruc tion means to load Y with the contents of ¥ minus | ike a 16-bit 6502 "DEY" THE TRIANGULATOR Solve triangles on your Apple* and get rid of your calculator and pencilll “his proram wi sav sy gh a equ Agi esl cD futer alan Prev ‘wang ” ” oom rian E1556 erie Entry can be fraction desimal or OMS. Fass areaunded 0 places. Requires 8k pee, DOS 3.2 or 33. parle! printer. Sand $9895 » $1.50 pstge an handing te: Arrow Data Systems 1224 E. Harmont Phoenix, AZ 85020 “Apple is raised trademark of Apple Compute In. Daler ingies invite, (602) 997-6638 (as + 25/56) *N. ec TM LDA #FROML STA FROM LDA #EROMEE STATROM+1 LDA #TOL STA COUNT IDX #ONTL+1 iby #0 LOOP LDA(FROM), Y STA |TO), ¥ INC TO BNE NOINCI INC TO+1 NOINCL INC FROM BNE NOINC2 INC FROM+1 NIINC2 DEX BNE LOOP Dec COUNT BNE LOOP ‘Figure 2 6502 program to move any numberof bytes of memory. Timing = 31 + INITIALIZE INDIRECT “FROM” PTR INITIAUZE INDIRECT TO” PTR INIT BYTES TO MOVE COUNT MSB “TO [COUNT /'256) + 1 INIPXT0 THE COUNT LSB INITIALIZE INDIRECT POINTER LOOP: GET A BYTE "AND MOVE IT INCREMENT 16.1 “TO” POINTER INCREMENT 16-BIT “FROM POINTER DECREMENT 16BIT "CNT" LOOP UNTIL "CNT" IS ZERO Ea ‘cRO ~ The 850216009 Journal No. 40 ~ May 1982 (NG Ta) Lox arnom 3) tou Wo a) a Eby CNT a4 LOOP LDA, x+ 2 6 sTa/U+ 2 6 UeAY-iy 2 § BNE LOOP, 203 8 Figure 48808 program to move any length of memory. Timing = 10 + 20*N. INTIALZE 16317 "FROM POVTER INITIALIZE 16-BIT "TO" POINTER INITIALIZE BYTES TO MOVE COUNT LOOP: GET BYTE TO MOVE, BUMP POINTER, MOVE WORD, BUMP. POINTER, DECREMENT COUNT BY ONE UNTIL COUNT IS ZERO tc TIM) tox smo 3 75 thu #10, 33 IBY «CNT a4 LooP LOD, x++ 2 8 STD /Us+ 2 8 CeAy-2.¥ 25 BNE LOGP 2 3 Figure 5:MC8808 program to move any length of memory. Timing = 10 + 12°, INITIALZE 16BIT "PROM" PORTER INITIALIZE 1RIT "TQ" POINTER INITIALIZE BYTES TO MOVE couNT LOOP: GET WORD TO MOVE, BUMP POINTER, MOVE WORD, BUMP’ POINTER +, DECREMENT COUNT BY TWO UNTIL COUNT 1s ZERO ‘Since the second program moves words, Y gets decremented with the contents of ¥ minus 2 The progam in figure 6 combines thecote rom figures and Sto produce 2 fast, genezal purpose memory move for the M6809 which, moves any umber of bytes, « word [two bytes) ‘atime. This routine wes the power. fat dovbie-byte move code of figure 3, only without the even byte resticton ‘The way thin i schleved fs trig forward, The "CNT" word sextet for ond lengths by frst sing the TH Spatacton to move the “CN othe DB register This a followed by "SRB loses! sbifeniht B] wick seis the cary bie "CNT" is oi It thelength is ven, the routine benches direely to the’ dosble-byte move routine Otherwise, the odd byte is moved fist using ‘the figure 2 Code. ‘Taisoutine te 9'bytes long and takes approsimately 12 stackine cyles per ite moved” ‘The general” purpose Toutin takes almost rice the bytes of the MC6809 shore move but requites ay less time per byte! No.4 —May 1982 Figure 7 summarizes the results for the memory moves discussed in figures 1 through 6. The byte ratio column is the number of 6502 bytes divided by the MC68O9 bytes for a given come prison, The eyeles per byte ratio col lumn is the 6502 cycles required, per byte moved, divided by the MC&HO9 cycles per byte. For example, the row labeled "<= 256 bytes!" shows that the 6502 program from figure 1 used 11 bytes and needed about 14 cycles per byte moved. The MCS609 program in figure 2 nesded 15 byes and used 15 cycles per byte moved. ‘The. "byte ratio” Is then 11/15 or 0.73. The ‘cycles per byte ratio” is 14/15 of 0.93 ‘As the table in figure 7 shows, the {6502 is good at moving small blocks of memory with fixed addressing The 'MC6809 code for a move of fewer than 256 bytes comes close to keeping up wit the 6502, tue egizes over a hid more bytes.’ Our general-purpose double-byte move routine is slighely faster than the 6502 but is much more costly im terms of bytes. Since the MCE6809 general purpose routine is ‘Mion ~The 85021800 Journal MICRObits ‘0016808 Sortwar Includes compatible single-user, sult tser and netwark-operating systems, Compiles, aecounting and word Drocesing packages. Fre ctaog Software Dynamice TIN W. Crescent, Sta. ‘Anahetm, CA 92801 051 Superboard Cabinet and Accessories recut pine cabinet kit $2795 ppd S230 interace kt $9'95 pp, 00 taud/band Kit $8.95 ppd, compete wid hardwaze and well-lustated Insuuction sets. roe eitalog of software, hardware, Molex, Joysticks, cassettes, kits and ioe ‘Dee Products epasement M 180 Birchwood Road ‘ake Manon, IL 110 Expand Apple Memory! ‘Memory hoatds fom 16K to 256K by Micros Saturn, Legend, SVA, ee’ at lowest prices. Als, 8 Hlopy drives sd hard disks by LOO, CORVOS tnd SVA a ig discounts Connecticut formations Systems 218 Huntington Road Bridgeport CT Ose nosh 79.872 PETICEM Owners Real world sofware a low cost. 2014 RAM adapter and 4K Memory Expansion for "old” SK PETS, Write for feceestlog! Optimized Date Systems Dept. M, Box 595 Placeatis, CA 92670 Lessons In Algobra ‘An easy and fun way to learn the basic ements of hith school algebra. Apple ‘computer diskette $29.95. S0day ‘money guarantee not satisfied George Eat! 1502 South General MeMllen Dr. San Antonio, TR 78237 ‘olex Hard Disk Orve Capacity - 100 megabytes, competi ‘with IBM3330, excelent condition, ‘Asking $2500.00 plus shipping I. Hoogstaat Bor 20, Site 7, Caley, Albert Tins Canad 803-239-0900 ssi (Continued on poge 87) "APPLE ATARI « TRS8O IED fale of sotarefor busines, games ‘and ecucaton Up to 35% off muse ius, viscose | STONEWARE ONUNE | SYNERGISTIC EDUWARE | HAYDEN HOWARD | AND MANY MORE. Ey "AMDEK- HAYES - MICROSOFT _Ust ue Pie 32K RAM card 529300 ~$205.00 Video Term $345.00 $279.00 Laer Products ~~ — 20% off — = — Maxell Bovof 10,54",SSDD $35.00 Nerbatm Box of 10,534" SDD $29.00 LEMONITORS —_Ust___OucPice_ 9 Green Gia $159.00 72" Green $199.00 $169.00, ZENITH PerGieen 5173.00 $129.00 lus fl ine of AMDEK Monitors PAPERTIGER _Ust__ Our Poe 4606 5793400 _ $950.00, 5606 51,394.00. $1,250.00 EPSON mx 544900 $395.00 Mx OT 574500 $895.00 x TOOFT $945.00 _ $795.00, CALL FOR THIS MONTHS SPECIAL 1-800-835-2246 EXT. 211 702-452-5589, Langa Nd 12 Fone orders weer, Nal orders ay ser Sige ue nak Sra {Blow fs Bushes ds for persons or com fanjcaiocen, Rad sf shop, Bt Bees tax Please include phone purer Arenas nfciny cans ny mane ‘Grange and sven Calor wea pce hs, 2 wien IKNG TM) LwxeROM 33 Lou #10, a3 [BY CNT a4 TERY, D a 6 ska. 13 BCC LOOP 203 LDA X+ 2 6 STA,US 2 6 LAY —1,¥ 2 § EQ DONE ays. Loop LBD, x++ a8 2 8 265 2 3 DONE EQU 2» Figure 6: General M8808 program to move any length of memory. Timing = 41 INITIALIZE "FROM" POINTER. INITIALIZE "TO" POINTER. INITIALIZE BYTES TO MOVE COUNT CHECK FOR ODD COUNT MOVE COUNT {SB TO 8 REGISTER, SET CARRY IF COUNT IS ODD, TO LOOP IF COUNT IS EVEN ELSE GET ODD BYTE, BUMP POINTER, MOVE IT, BUMP POINTER, DECKEMENT LOOP COUNT, OUIT COUNT 18 ZERO LOOP: GET NEXT WORD; BUMP POINTER +z; MOVE IT, BUMP POINTER + 2; DECREMENT LOOP COUNT BY TWO UNTIL COUNT 18 ZERO Class of Move 56 bytes (6502-Fig 1 / MC6809-Fig 2 (6802-Fig 1 / MC68O9-Fig 6 > 256 bytes (6502-Fig 3 / MC6SO9-Fig 4 {6502-Fig 3 / MC809-Fig 5 6502-Fig 3 / MC6SO9-Fig 6 Figure 7; 8502/MCE808 byte and cyelos por byte ratios for figures 1 through 6. Byte Ratio _Cycles/Byte Ratio nfs 14/15 1/29 wa 47/18 = 261 35/20 1.75 47/18 2261 35/12 = 292 47/29 = 162 35/12 = 292 easily made into a subroutine, the extra byte cost might be lessened by sharing the code with other parts of a program. ‘The 6502 code example lacks this ver satility since tis limited to fixed 256 byte ranges. ‘The more complex memory move ‘of more than 256 bytes is where the ‘MC6809 really asserts itself. MC6809 versions were presented for a single byte move, an even-length-only double-byte "move, and a. general- purpose “any length” move. For "byte {ight applications, the MC6809 byee ‘mover nins 1.75 times faster than the 6502, while the 6502 uses 2.6 times the bytes of the MC6809. While the M6809 double-byte mover from figure 5 is restricted 10 even-byte moves only, it rips along at almost three times che rate of the 6502 with no more code than the single-byte version. MIGRO ~ The 650216609 Journal ‘The MC6809 general-purpose double byte mover figure 6) maintains the blazing speed of figure 5 without being restricted to even-byte moves. The £6502 move uses 1,6 times the bytes of the MC6S09 general purpose mover. ‘These results show clearly the degradation of speed and code size of the 6502 for memory moves across page boundaries. We feel that the MC6809 has also been easier to pro- {gram. There has been no need to set up find manipulate indirect pointers with registers of only eight bits, as was nec. essary on the long 6502 memory move. “The euthors may be contacted at Motorola, ine, Microprocessor Design, Maildrop 62860, 3501 Ba Bluestein Bisa ‘asta, Texas 78721 No. 48 - May 1982 Passage Research 945 Turquoise St. alifornia 92109 “You put What in your Apple computer?” i | : i 6809 Small-¢ More bang, less buck! wx small-c 1.0, with separate optinizer, flag all ¢ contol Bttuctures, including. do/while, | for, and switeh/case. \"Goneeates relocatable noduies For either isc “speolute or SSB MACRO, {Version 2.0" is" also planned for 08-8.) PuExs version includes ROAD. 3-0 on sepaiate disk. ®un-tine Iibrary source included. 6K recommended: i i i i i for nino (with tosdee) so 16 you already ave RLOAD) so Cepecify aevenbier and CPI) Shipping included. Prices good untst version 200 release (about. July)¢" Liberal Uograde policy.” Aad s2/aiex tor 6". “Add $2 handling for Viea/MC.” Allow 4 weeks. ror Ronecertitied check, “Please don't nail { Gash. Payment aust ‘accompany P00. Teaes Fesidents: ad 80.25 sales tax each 5" diets $0.35 each 8" eisi, SRE, Ss METERED RL word’s worth 0, Box 2805 Dla, evar 76228 : The Ultimate 6809 Board for Apple ¢ EXCEL-9 FLEX, a famous DOS, Assembler and Editor included. | Also able fo use Apple DOS. ‘Ask your nearest dealer 5D Lass Co. 110, me” $399.95 Ss - a noon SKR versatile monitor contains 35 commands including 6809, ‘Can handle all Apple dot 0 routine from EXCEL. On-board programmable timer for both 6809 and 6502 systems allows printer spooling, multitask, ete. 50 page well documented manu 64K RAM area expandable for multi-MPU operation, Able to svitch MPU from 6809 to 6502 and vice vers in both machine code routine and BASIC ‘TSC 6809 BASIC, EXTENDED BASIC, PRECOMPILER, SOFT/MERG. ete. are ‘coming soon, "Migs The 650216800 Journal Dealer Inquiries are Invited for Board & FLEX (Sales tax not included) PLEX ea ade mack of Tv Sst St 4 HEWLETT texas | MA Sackano Instruments HPe85 °1999 jlodems |». : JESSIE ISIS IIS ISOS TOI SOIII IA III OTIS III IO CALL FOR PRICES AND AVAILABILITY OF APPLE PRODUCTS — FORO OIC III IA II 2 I I II OTITIS II IO I IIIS ISI IIIT IISA cect COMputer mail order yest 800-233-8950 CALL TOLL FREE 800-648-331! 477 East Third Steet Witlarnaport, PA t7701 Gin sarer8. a (702) S68.5658 Patncio Habla Espanol : Franco Habla Espana MICRO = The 650216809 Journal IAICRO PET Vet By Loren Wright PET’s Powerful Screen Editing — Are you getting the most from it? When it comes to BASIC programming, rmost computers employ what I call 4 “eletype’ mentality. You type in the Tine mmber, followed by the line come tents. Then you send all the characters You typed to the computer by pressing The RETURN key. Belore’ you hit RETURN, you can comrect ersors by deleting back to the ero, making the correction, and then eetyping the rest of the line, you have mage the mistake of hitting RETURN before you notice theron he only way to cortect itis 0 start over. The characters you just typed In aze stil siting there om the ‘ce, but you can't do anything with them. The computer has forgotten all about what you typed. Sure, there's a apy in your BASIC program, and you an Tist the line to he screen, but you fant do anything. with chit either Some of these computers allow some rimitve editing — if you ean remem ber the obscure control codes and are willing t0 copy characters back into memory. 1 sly faster to retype your BASIC line ‘The PET BASIC input works quite ifferently. Instead of keeping track of the stream of characters you're typing, the PET just puts them up om the screen, You can move the ettsor any” ‘here you want, draw pictures, check Your disk directory, or list another line Al that counts is where the cursor is ‘when you hit RETURN. If ts on a line that begins with a amber, then the system reads the line a3 a BASIC state ‘ment. Ifthe line doesn't begin with a ‘number and the lin isn't valid direct command, then the PET will respond with 2 'SYNTAX ERROR ‘This system offers a Jot of advan- tages to the PET BASIC programmer, To corect an eror in the line you're typing, all you have to do is move the cursor, ‘make the correction, move the cltsor back o the end of the Line, and continse typing. If you want to correct a line you've already entered into the program, Just lise it tothe sereen [fit ism already there}, make the conection, and hit RETURN with the cursor anywhere on the line to enter the new version. No. 48 - May 1982 ‘Tricks of the Trade It seems simple enough, doesn’t it If you have never tried to write a BASIC program on another computer, you probably take it all for granted ‘There are, however, afew traps you can fall into, and there aze a few litle ericks you ean use to make the system work ‘even better 1. Clear the sereen before you list Hines you're going to edit. I you don’t, ‘garbage left over from yout program zrun will appear on the same lines as your BASIC lines and those charac- ters will be put into memory when you hit RETURN. 2, The cursor does not have to be at the end of the line when you bit RETURN. As soon as you have com: pleted your change, you ca it RETURN. 3. If you'ze at the left end of line and you want to be atthe right end, the fastest way to get there is not t0 go forward, buc rather to back up to the end of the previous line and move down one line. If you're atthe sight ‘end and you want to be at the left, then the opposite holds crue 4. Don't forget. the HOME key! If you're at the bottom of the screen, It's much faster to hit HOME than to ‘move the cursor up all those lines. 5. Shifted RETURN is not the same as RETURN! rt will move the cursor to the beginning of the next line, but it will not send the line to the PET for processing 6. If you need to move a line to make room for others, just list it, change the number and hit RETURN, Re- ‘member, though, that the old copy is still there at the old umber une you delete it or replace it. This fechnique is also particularly handy when you are writing a program that Is very repetitive (eg, a seties of subroutines, where several lines aze identical in’ each routine). Just type the line once, and for each copy, change the line number and hit RETURN, 'MIoRO ~ Te 850216809 Journal 7. Ma listed line exceeds ewo lines, the ‘overflow is not considered as part of the line when you try to reenter it ‘This happens because you used ab: breviations for BASIC. keywords [like "for. PRINT) when” you ‘originally entered the line. Using the keyword abbreviations is fine, but tay to avoid using such long lines. Be careful with BASIC lines that oc- ceupy only one screen line. Under soine circumstances ic is possible to fet the next line listed on the screen entered as part of your current line ‘The cure is o list only one such line 9. Use the screen as a temporary storage device! This one takes some care. Lets say you have just typed in 30 lines, and you suddenly decide that only eight of them are good You could delete each unwanted tine by typing its muraher, but tis faster 10 list the lines you want to save, type NEW and RETURN. Then post. tion the cursor on the first line, it RETURN, and keep hitting RETURN, ‘ont all the lines are restored. If any Of them scroll off the screen before you re-enter them, they will have 10 be retyped. ‘Most of these tricks work fine for direct commands, too. For instance, if you misspell the file name in a LOAD command, just stop the search, move the cursor to the command line, make the change, and hit RETURN, Programmed Cursor Mode ‘Another powerful feature of the PET Is its character-programmable cursor commands. Cursor moves can be in: cluded as special characters in & BASIC string ‘so that when the string is printed, the cursor moves are executed ‘To get these characters into the sting, the PET has something called "pro grammed cursor mode,”” where press- Ing a cursor key causes the appropriate special character to appear on the Screen instead of the cursor move itell ‘The programmer loses control of the cursor while in programmed cursor ‘mode (PCM), and if you don't know what's going on, it's easy 10 get 25 PET VET (continued) frustrated. PCM is entered under only 1. When you type a double quote, you enter PCM, when you type another, yout exit. The PET keeps track of the Dumber of quotes ina fine, but it can be fooled, ‘When you use the INSERT key, the PET counts the number of times you press it, and for that number of ‘characters iti in PCM, The assump tion is that most insertions will be ‘within strings Quite often you want to be in POM ‘when the PET isn't, and vice versa. To fet in or out, just type a quote and then Selete it if you don’t need it, The PET ‘only recognizes when you type quotes, ot when you delete them! If you've done an insertion, just type spaces for the number of characters you inserted fand you will regain contral of the cur- sor. The spaces can then be deleted Im other instances, things get com: pletely out of hand and you just want to Start over. The answer is shift RETURN! Tt will bail you ut of PCM and it will preserve the original version fof the line you're editing, Ie alga helps to know what the cur sor control characters Took like when they're included in strings. This de: pends both on which model PET you have and on which character set you're in. A few experiments, and perhaps a Title crib shect taped to your PET will help Editing Improvements H you do a lot of BASIC program: ring even these powerful features may fot be enough. Autonumber, renu ber, delete functions, and repeating keys are probably the most useful enhance ments. List scrolling and_ program: able function key capability are also tseful. These functions are available in a number of commercial ROMs, such as Programmer's Toolkit, Disk-O: Pro, Command-O, POWER,” EZAID, and others. Not all offer all of these baiting features, but all include other capabilites Fat 40, 8000 Series, and VIC ‘These recent Commodore machines incorporate repeating keys and an ES- CAPE key to get aut of programmed ursor mode. ‘The #000 ‘series. com puters have additional special charac ters for window, delete line, insert line, Scrolling and other commands. The VIC has special characters for color commands and its eight programmable function keys Commodore's New Computers With three new computers added to its existing line, Commodore will have fan iron in just about every part of the microcomputer fire. The Ultimax [$149.95] Is. a. colorand-sound com puter that hooks up to any home TV et It will compete very favorably with the Sinclair ZX-81, Mattel Intelivs Sion, and Atari VCS. The Ultimax will Support joysticks, paddies, light pens, carridges, and. cessette storage. TO. fachieve such 2 low price, Commodore has provided only a limited amount of RAM and a flat membrane keyboard The Commodore-64 ($599) is de signed to compete with the Atari 800 fand Apple Il with its full-size keyboard, {54K of memory, function keys, and so- phisticated sound capabilities Also an- ‘ounced was a 16K VIC — the SupetVIC. (LABEL), Y (LABEL,X) LABEL + INDX—1 is a8 powerful Long Labels| $49.95 — > ~ 7 > fa} a} Fs 7) bq fa) | x 7) < a a} feat be sure they work, Our ASM/TED' Macrot/Conditional Assembly. Extensive txt editing Features ‘Designed for Cassette-basod systems. LTP eg Long Labels © Control files EASTERN HOUSE SOFTWARE Before you buy thet off-brand Aswembler/Text Editor, note that EHS is the only company that provides a ine of compatible ASM /TED's for the PET/APPLE/ATARI/SYM/KIM and other microcomputers When you make the transition from one of these G502-based microcomputers to another, you no longer have to relearn peculiar Syntax’s, pseudo. ops, and commands. Not only that, EHS ASM/TED‘s are the only resident 6802 Macro Assemblers oviliable and they have boon avallable for several years. Thus you vs may cost 2 litle more Dut Go the others provide these powerful features: Macros, Conditional Assembly, String Seorch and Replace, or even up to 31 characters per label? Before you spend your money on thet other ASM/TED, write for out free detailed spec sheet MACRO ASM/TED For APPLE/ATARI/PETISYN/KIM Other than our MAE, no other assembler MAE ASM/TED For APPLE/ATARI/PET + The most powerful ASM/TED Macros /Conditional and Interactive Assernbly Extonsive text editing features Designed for Disk based Systems. 8169.95 3229 Linda Drive PHONE ORDERS Winston-Salem, N-C.27106 USA’ (919) 924-2889 (Dealer Inquires ivited) (919) 748-8408, Versa Computing PRESENTS VersaWriter DRAWING TABLET COMPLETE HARDWARE / SOFTWARE GRAPHICS SYSTEM - $299 HiRes @ Med-Res Draw @ Color Fill-in @ Spit / Full Screen Paint Brush-5 Sizes © Change ColorHue intensity @ Save / Load / Erase @ Point to Point / Line Draw @ Reverse Picture © Text Writer @ Air Brush @ Sealing @ FixX or Y Axis GRAPHICS COMPOSER GLOBE MASTER PADDLE / JOYSTICK COMPLETE HI-RES GRAPHICS SOFTWARE - $39.95 GEOGRAPHY GAME - $29.95 © Draw on Hi-Res Screens 7 or 8 © 8 Hi-Res Color Maps Save Pictures on Disk or Cassette S-Europe-World-Asia-Africa-Australia © Create Player / Missile Shapes ‘Quntries-Cities-Capitals-Oceans- ‘Automatically Rivers-Mountaing, Ete. jeomettric Figures Program @ Several Skill Levels @ Add Text to Screen Regs A600, SEK RAM, Bas Largvae Can, equi: Atai'800, S24 PAM, Basic Language Cartiége, . MIND BOGGLERS THREE STRATEGY GAMES carte casseri $15.95 osx $19. 3 sige ox secre use nce OME CRM a 3541 Old Conejo Road, Suite 104 Dae ae MON 7 Ce} No.4 May 1062 JMicRO ~ The 650216809 Journal THE AIM 65/40 + A ull size terminal style Keyboard wi8 special Tunetion keys + Acsmart, 40 character display with its own microprocessor ‘= A40 column printer wrex! and graphic output * Up to 64K of on-board RAM and ROM + On-boaa interfaces include AS222, dual auto Cassette and 2 user 110 RBS22 devices «Firmware includes interactive monitor and text ‘editor wioptions of Assembler, BASIC, FORTH and PLI6S ‘And if the ‘Try the RM65 — a product 30k DRAM Boars CAT Contraller Floppy Disk Contllor PROM Programmer EXCERT INCORPORATED SALES + SERVICE P.0 Box Tinstauation White Bear Lake, MN 5: + CONSULTING (612) 426. Es MioRO ~The 8502 ROCKWELL Microcomputers from Excert, Inc. THE AIM 65 Single Board or Smorgasbord Take-Out Order “A tull size terminal style keyboard wis special function keys + A.20 character display + A.20 column printer witext and graphic output ‘capability * Up 10 aK RAM and 20K ROM on-board + Onboard intertaces include 20MA TTY. dual ‘audio cassette and 1 user 10 R522 device ‘+ Firmware includes interactive monitor and text ‘egtor woptions of Assembler, BASIC, FORTH, PASCAL, & PLIGS e above isn’t enough, filled with embellishments including: AGIA Board Prototype cards IEEF-A8860ard ‘Adaptor Buller Modules (CPUISBC Boars General Purpose I/O Board 416 Slot Card Cages PROMIAOM Board NEW LOWER PRICES AND A CASH DISCOUNT* TO BOOT! ‘A65140-16 (16K RAM) $1205 865-1 (1K RAM) $220 ‘A65140-22 (22K RAM) 51295 1885-4 (aK RAM) eas, AAB5IAO-A (Assembler) 385 ‘A65-4B (2K RAM wiBASIC) $495, ‘A65140.8 (BASIC) 365 ‘ABEPS PASCAL) $100 ‘865 (FORTH) $65 ‘ABSA (Assembler) 535 Mail Order to: Educational Computer Division Higher quanities quoted upon request, COD's accepted, 2600 shipping will be added. “Deduct 5% cash discount on S110 prepaid orders. Minnesota residents add 5% sales tax. SIS Prices subject to change without notice 6909 Journ No. 48 May 1982 By James Capparell ‘When the jacks are configured as out- 10 POKE 54018,0 ‘REM Go talk to ‘pat ports, the DR holds data to be writ- Data Direction egister ten to an external. device, The DDR determines for the PIA which lines are 20 POKE 54016,15 REM Jack 1 is input, [ditor’s Note: This is the last “From input and which ere output Jack 21s output Here to Atari” that will appear in MICRO. We thank Jisn Copparell for 90 POKE 54018, ‘REM Reset to data his efforts and wish hima success with To configure Jack 1 as input and register, ‘hs new Atari magazine, ANTIC. And Jack 2-as output, it is necessary to tell wwe say to the Atari Community: send the PIA the disection for each of the 40 REM connect joystick to Jacks * and us your work! We are very interested in eight bits in Port A. To accomplish publishing Atasi material this, perform the following steps: 50 ?STICKIO)STICK(1) REM Prin out values from Jacks 1 and 2 4. Set bit of PACTL{$D302) to. This “The “front jacks’ om the Atari 400 and allows us to address the DDR. {60 GOTO 50 ;REM Loop forever 800 are used for everything from game controller ports to printer and graphics 2. Write QOOOL111=15 to adéress 70 REM Move Joysticks 1 and 2, only ports. To get the most out of them it is S300 {note a 1 bit indicates the Joystick 1 wil register a change. Recessary to understand something associated line is output) about the hardware. This month, Tl provide # description of the pin con- 3.Set bit 2 of PACTL to 1. This Whenever your system is turned on figuration of these jacks, the memory restores address $D300 to che data all jacks are configured as input. That is, locations assigned to the jacks, and an register. the operating system writes a0 to the example of how each pin may be in- Data Ditection Reigsters in Ports A and fividually configueed as input or output, _At tis point, Jack 1 can beread nor. B. The values returned at these jacks mally with a STICK(O} statement. Jack are always a1 when there is no input — The hardware controlling these 2 can’t he read since itis configured as logical 1 is false. This helps explain jacks is a 6820 PIA [Peripheral Interface an output jack. Try the following: why a 15 is read even when there is n0 Adapter). This chip consists of two ports labeled "A" and "B", Port A con trols Jacks 1 and 2. Jacks 3 and 4 (on {your right) ate controlled by Port B. Tables ‘The jacks are numbered let 10 right as | 1/0 Address Be Gate ashen you face the console. There is amu: | S90 soy Sea wales bering. discrepancy: BASIC numbers See Se BAS Sa Port A data register or data direction register when bit 2 of PACTL is 0. This address corresponds with Jack 1 and Jack 2. BASIC statements STICK) and 1OPSTICK(O) STICK(N)STICK(2) STICK) | STICK[1) read this port ‘$0301 (54017) 5279 (633), will print che values read at Jack 1, Jack 2, Tack 3, and Jack 4 Port B data register or data direction register when bit 2 of PBCTL is 0, This address corresponds with Jack 3 and Jack 4. BASIC statements STICK/3} and Each port consists of three registers — | STICK(3} read this port the Control Register, the Data Direc- tion Register (DDR), and the Dats (bul. | $0302 (54018) S27A (634) | fer) Register [DR). The PIA is @ chip. Due to 4 limitation on a Port A control register Insert a value of4 {bit 2 = 1 and $D300 becomes the | pins, the DDR and the DR share the | Data Register. Same address. (See table 1.) '$D303 (51019) $278 (635) Bit 2 of the control registers deter: ines whether the DDR or the DR is | Port B control register. Inset a value of 4 [bit 2 = 1] and S301 becomes the ‘Addressed. When set 10 0, bit Zad- | Data Register ‘dresses the DDR, but when set to 1 the DR is addressed, The data register | The shadow registers are updated at Stage 2of Vertical blank processing — no simply holds data. When the jacks are | more frequently than every 1/60 second. f your program requires more acct configured as inport ports, the DR | rate data, read the associated hardware registers at addresses $D300 and $D301 holds the data for the Atari 10 read No. 48 — May 1962 JWIGAO ~ The 650216800 Journal ~ From Here To Atari continued input from a joystick. Look at the dia fram in figure I for correspondences be: f5reen bits in DDR and bits in data buler. When a jack is configured to input land the following BASIC statement is ‘The pin configuration or each jack is as fellows: 12345 6789 Console {male} Pin I =forward Pin 2= backward Pin $= pot [paddle control) in 6 joystick trigger at SDO10-$D013 (criay Pin 7= 450 ‘These front jacks are versatile and easy to use. I've connected a Hewlett Packard Bar code reader 0 my 800. Others have used them for graphics recited Pin 3=left Printer Inerface and. T0-key ‘pal for Pin 42 nghe Brsiness use as well 10 7ST16K(0;G0TO 10 the fllowing values wil be printed as Joystick Data {he joystick fs manipulated 1111 (15} =stick neutral 7]6[5 Ja [3 2 blo When bit=0 then switch pressed 1110 18) forward BEET then Switch not pressed Tol (13) backward Jack? Jack toll (2) =Iet (stick 1) steko} ont (11}=right Bir Forward Backward Combinations (diagonal tate Right 1010 [10) = forward/teft rlels 2 [i Jo “a 101 (9), —backward/lefe 101 (7) “backward/righe Data Direction Register (110 (6) = forwardright nicro 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 00S 33 oF3.2.1 inks hat oad RAM Carconbootin 1 Tseconds.» Ubinas lek wil RUN BRUN or EXEC) one bt two GREETING programs suppbed by the user.» Buin error hancing capaci eneuresexecvton of corect GREETING rogram whather one GASIC or both BASICS are avaiable e Ooacites vas of Apps BASICS ask and DOS 49 Systern Mason Esk or ast singe isk cree Booting. * The DOS 22.1 UCLiniialzed dak books on either 130 16 sector PROMS. * Muliple ‘copies of U-ntiaized cites can be made with sone copy progres, 2 AMPER-SORT/MERGE (A-S/M) , $49.95 * Can sort 1600 records in seconds.» Gonoralpurpouo Disk SoraMarge Uti for Apple DOS 3.3 tx fles. » MIL Read. Sort Sind Merge tor speed. » Sons upto input fis nto 1 outpu lie, Sorts random or sequential es aiphanvmencaly (Ascengngor Descending) up los iecs. + Merges 210 5 pre-soned ls Inioacingl fle. « Compaile witymostoata base programs that creale Handard DOS 35 tat ies [e.g, VeiCorp's VaFies (ortery Personal Stwares CCA OMS fies], SYSTEM. REQUIREMENTS: 48K Apple j[ or |[¢, ROM or RAM Card, DOS 3.3 (or 008 32.1 for UBI) and one or more csk drives. cost: {$49.85 (8.00 Postage and Handing) for eich Util Disk (with Training Disk ané Manus) FOR ONLY $15: You can ge he Training Disk and lastuction Mi ual for ihe utility, CREDIT CARDS: (VISA MC o- AMER EX?) Cal pYbertronics international, inc. Grearinghowse (oe) S28-40g8 MAIL ORDER: Send check (no Purchase Orders or C.0.0's) o SAH Software, ox 5, Manvel, ND S236 “LICENSED FROM APPLE: A/| Apple Computer Ine programs — FPBASIC, INTBASIC, DOS3.3& DOS3.2.1—usedin S&H ‘Software's uty programs are iconsed trom Apple Computer Ine. by 8 } Softwar, The unique UBI license 10 software Vendors allows tho! uso ofthese Appie Computer copyrighted programs to execute tel, programs on UBI-crested disks, tnthout further lensing irom Apple Computer ine. Software vendors" Inquires invited for both utes sansotware JJ 2 MICRO - The 65021600 Journal No. 48 — May 1982 Pemereaetts rd barrier! eee USING ea etn ike BUILD USING a Tr May 1982 eer) eens: Coca Soper IMAGE PRINTER SERIES Sensible Software is proud to introduce aur new series of high resolution screen dumps. IMAGE PRINTERS provide simple way to transfer high resolution graphic images onto paper. Each pro- Gram in the series has unique features that give you fll control of the printing. Some of the included options are: * Full contro! over the area ofthe HIRES screen tobe printed, You graphically pick the area for the utmost ease and accuracy. + Onestep printout ofthe picture with the ably to pause or abort the printing at any time. * Menudriven. All options are invoked with single keystrokes, IMAGE PRINTERS are extremely easy to use. * Multiple mage sizes, 6 cifferent 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 Io disk * One time configuring for your printer and interlace card Why answer al those questions about your printer each time you want to print a picture? + The images may be piinted anywhere on the page ‘+ IMAGE PRINTERS suppor 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 rouiines may be used with the letler quality printers) ‘There are three separate versions of IMAGE PRINTERS, each one tailored to take full ac vantage of a diferent printer i IMAGE PRINTER—LETTER QUALITY. For all popula letter quality printers (Diabo, NEC, Quine, etc} IMAGE PRINTER—EPSON. For the popular Epson MX-70, MX80 ard Mix400. IMAGE PRINTER —NEGPO8O23A For the NEC dot matrix printer Allversions are available for $40.00 ea. peclly version desired. ee) ae cere ca ao terior WMicRo ~ The 650216800 Journal SUPER ISH HL O L EXPANSION BOARDS 1 your Chatenger cart generate dsplay ke those shown tioove WHAT ARE YOU WAITING FOR? The SE Hi" Fesoutton Graphs and Memory Boar fo CTP ara Snerboaa and the SEB? High Receluon Graphs and Dise Contrast Boars or C248) semply ‘pug te you" ‘computer and give ou Instant accest to ove 49000 \nawaualy addressable pass n up fo 8 coors! Yout HiRes ‘Soreen can go fom 3216 alphanamerics to 256 192 point [apis in 11 solwareselectale moses. The standard video {Gt your computor eet nic, so that none of your current Sofware trary eumoded. Uso tbe graphics for Susiness, Scene, Eaucaton, er Gaming dapay Pal were roossbl Inealiation of eter board requires absolutly NO modification of your compater—they just pugn. Noro ey pried your {sing anyone OSLedmatine hardware or sotware. In aceon tothe HeRes Graohies he SEB-1 gues C1 & Superboaral users 10K of adlional User emery (ver and above that memory eveted to the graphics), to 16 be tmorsicounters, an on-board RF moauator, ard a paral pont wih nendshaking The SEB-2 ‘wes OSI 48 pn BUS usors an OSI hatdwarelsokware Sompatible Dek controler and an RF moduli that can be ‘ser popuiated FOR OS! 1P, 2-aP, 2-BP, CaP, CAP =n nn ‘Se SEB-2 see ___see-2 ‘Assembled and Tested $2490 (5K RAN) $230.00 (1K RAW) ‘Bare Board & Manual 58.00 8 59.00 xi $165.00 (No RAM) $199.00 (No RAM) Manual only $300 500 SOFTWARE TaRGIT! $11.95 si195 PROGRAMMA-TANK. $9.95 | seeseeeraereerasmee ise coum ORION 2 Mico ~ the B50216009 Journal RUINS OF TALAMARINE. $16.95 ‘CODENAME: BARRACUDA DUNGEONS OF ZORXON $19.95 open eck Ss — SOFTWARE ASSO. _VA7 MAIN ST, PO BOX 310. OSSINING, NY 10562_ $19.95 No. 48)- May 1052 7 IMCRO Reviews in Brief Product Name: Mittendoet High-Resolution Graphics Board Equip. req'd: OS! Price: ‘$40 bare board, $185 kit Manufacturer: Mittendort Engineering 905 Ville Nueva Dr. Litchfield Park, AZ 85340 Description: A 6!" x 6" circuit board which adds 256 x 256 black and white high-resolution graphics to OSI systems, The same kit works with the superboard or 540 ‘ideo board. The Mittendor! board contains 8K of 2114 ‘memory which can be used for program storage when not using graphics. Pluses: Combines with the present video signal to give hi- res grapbies and the OSI character set on the same ‘monitor. The graphics memory can be wired at one of several addresses. Minuses: The Mictendort board requires 16 connections io the OSI video circuits. The $40 version requires addi tional jumpers to all the bus lines. The superboard version requires removal ofthe data bulfers which prevents further tse of the 40:pin expansion port. All 256 x 256 dots are not visible. Dots are fost to overscan in the same ratio that te lost from OSI's nominal "32 x 32" characters Documentation: Several sets of construction plans depen: dent on system, software to add geaphics commands to BASIC, demonstration examples. ‘Skill level required: Experienced builder, modification of present video circuits required Reviewer: Earl D. Morris Product Name: Visiterm Equip. req'd: Apple ll or Apple fl Plus and communications device: Apple Communications card, CCS card plus modem or D.C. Hayes Micromoder Price: $149.95 Manufacturer: Personal Software Inc. 1530 Bordeaux Drive Sunnyvale, CA 94086 (sos} 745-7841 Author ‘Tom Keith Copy Protection: Yes Language: (6502 Machine Language Description: A communication package for interfacing the Apple with other computers, permitting the tansfer and receipt of sequential text files Pluses: Visiterm uses one of two high-resolution cheracter sets and the hi-res sereen to provide the Apple user with a seventy-column display when communicating with other systems. This feature is particularly valuable when acces ing a mainframe computer since up to eighty columns are often transmitted to the user. The character sets are pro- ‘gammable, permitting the user the valuable resource of redefining keys to permit the generation of mainframe: dependent control characters. One of the most technically No. 48 — May 1982 |woRO ~The 6502/6009 Journal challenging aspects of using ¢ micro as an intelligent ter ‘minal is the problem of required control Keys such as the Break nd Xon and Xolf signals. The very extensive manual contains a thorough discussion of data com: munications. The main part of the manual ‘contains ‘almost 100 pages. The appendices, glossary, and detailed index contain almost as many pages. A print utility is pro- vided that allows the user to obtain a hard copy of received Gata. The utility has many useful options which permit printer conttol and output formatting. Avery powertal package with features useful for more than just com ‘Minuses: One limitation is that only sequential tex files can be exchanged. However, stand-alone utility programs, outside of Visiterm, are provided to convert BASIC and binary files to and from text files. Visiterm does not pro vide the user with the ability to edie the data buffer ex: changed. A separate text file editor may be needed by the user. [This is mentioned because at lease one competing package does provide this feature] An abbreviated sum ‘mary of the Visicerm options would be helpfal. For those familiar with VisiCale i, also manufactured by Personal Software «flow char of commands is included which pro- vides the user an excellent reference. Itis sometimes dif ficult to locate the discussion ofa particular topic. For ex ample, itis possible to obtain a CATALOG of text files on 4 disk from within Visiterm. However, the section ‘describing this is found under lesson Three, “File Trenster Mode." You may find it necessary to reed most of the three lessons provided before you are comfortable using the package. Skill level required: For the moderately sophisticated user, preferably with some understanding of communications problems, Reviewer: David R, Morganstein Product Name: A2-3D1, A2-3D2 and A2-GE1 Graphics Package Equip. req'd: 48K" Apple Il or Apple It with disk drive Price: s119.85 Manufacturer: SubLogie Communications Com 713 Edgebrook Drive 2 Champa, th Deseipton: Programs to help the user produce, projet, and. maneuver thee-dimensional shapes on the two: dimensional seen medium. Contains impressive features for recording motion sequences and replaying them. In dividual soapshots or sides of motion sequence Can also te recorded for later display. Provision is made for inter. fGeing routines to Applesoft programs. Pluses: Either eye or object movement canbe commanded, thereby adding Rexbity to sequence deintion. Excoy onal ease in interlacing to BASIC programs Mines: Extensive memory and disk space is required The included demo disk inadequately demonstates the (Gontinad on next peg) 2 Reviews in Brief (concinuea) package's considerable capabilities, The potential buyer Should be aware ofthis and not underjudge the product. Documentation: Superb documentation leads the user through a continuing example that eventually opens a 3-D ‘garage door. Along the way, all capabilities are presented find an example of each i given. Surprisingly well-written fa style that lends itself 0 use a a tutorial or a reference. Skill level required: Competent BASIC programmer with some exposure to assembly language. Reviewer: Chris Williams Product Name: 56K CMOS Static Memory Board Equip. req'd: OSI 48-pin bus Price 4K $200, 14K $450, 56K $850 Manufacturer: MicrodInterface 3111 So. Valley View Blvd. Suite F101 Las Vegas, Nevada 89102 Description: The Microloterface board puts 56K of ‘memory, an expanded monitor ROM and a parallel printer port all into a single bus slot. The board enable can be set at each 2K address selection, allowing any combination of 6116 CMOS RAM and/or 2716 EPROM to populate any portion ofthe S6K memory space. The use of CMOS RAM reduces the power requirements for 48K to less than ' amp, allowing memory expansion without a new power supply. Decoding is also provided for a 1.75K enhanced KGW monitor betwein 800 and SEPT iro netce sells several such monitors, or you can program your own {into # 2716 EPROM, pees Pluses: Very low power RAM rated for 2 MHz operation, Combines functions of several boards into one bus slot Provision Is made for multi-user or memory banking. The parallel pore supports elther a 6821 PIA or 6522 VIA. The board is available assembled with any amount of memory between 4K and 56K. Additional memory chips are easily installed Minuses: For 8/16/24K the Micro-Interface bosrd is more expensive than the same memory assembled from D&N. Documentation: Instructions for installing jumpers, memory addresses, chip types, jumper locations, and func- tions aze printed on the circuit board Reviewer: Earl Mortis palieeieeisniain Product Name: Cet-Comp Color Computer Editor Equip. req'd: TRS-80C Color Computer with 16K memory Price: $19.95 Manufacturer: Cer-Comp 53566 Ricochet Ave Las Vegas, Nevada Description: A screen editor based on line numbers; resides in R/W memory, distributed on cassette tape using the Color Computer format. The editor has 21 commands that modify text produced in ¢ BASIC-like format. Two edit modes allow spaces or characters to be inserted or Geleted from existing lines, and allow forward and reverse Scrolling through existing text. Cursor contol is either Single space pet Keystroke [forward or back) or single keystroke to teach either end of a line, Block move and copy, search and replace, list to screen or printer with or ‘without line numbers, 1oad and save tapes, append a sec ‘ond tape to existing text, and some special commands for au ‘MloRO - Te 6502/6809 Journ BASIC files are available. In addition, line numbers can be removed from a file to save space, or added to files from other editors to allow editing Pluses: Low price, good versatility, easy to leam, does not require Extended BASIC, Works with mechine-language Minuses: Instructions and documentation lacking, no isting supplied. Alehough cursor control is adequate, « repeat key function for continuous cursor scroll would be ssdvantageous. Skill level required: Normal typing skills, ability v0 visualize final page format. Reviewer: Ralph Tenny Product Name: Color Computer Disk System Equip req'd: -TRS-80 Color Computer, 16K w/Extended BASIC Price: $600) Manufacturer: Tandy Radio Shack BO. Box 2625 Fort Worth, TX 76113, Description: A 35-track, doubledensity disk operating system for the Color Computer. Capacity is 156,672 user Svailable bytes, and 68 maximum Giles, on a standard 5% inch soft-sectored diskette. The system includes a single Ghive, a disk controller ROM pak, and a connecting cable that allows two drives at atime on line. A four drive cable is optional. System utilities include BACKUP, COPY, and FORMAT. ‘The operating system requires 2K of RAM and rho disk space (except for directory tracks). Files are fataloged ‘with ap eightcharacter file name, and three~ Teter extension. VERIFY, LSET, RSET, MKNS, and CVNS. are typical commands available to the system which are tuted in other DOS systems. Pluses: Because the operating system is on ROM, it re {quires very litte extra memory from the machine. There {sno DOS to learn, as disk commands are an extension of, BASIC. As there is no DOS with the COLOR disk system, all disk commands can be executed from BASIC, inside or ‘tse «program, The Microsoft disk BASIC includes the SWRITE" command, which allows easier formatting end creation of serial data files, and random access variable Tength files. The disk BASIC is simple, and easy to learn Minuses: Utilities ae lacking in sophistication, compared. fo TRSDOS. Backups requite preformatted destination disks, and there are no file protection capabilites jother than the write protect tab). BACKUP also copies all bytes, fon a disk, whether there Is one small file, or a full disk, ‘Auto start is not supported, and there are no DO files to provide a turn-key system. This could be partially offset by running a stendard file upon power-up. This file could Toad any machine-language routines, and finally load the desired program from a MENU. The CHAIN command is ‘not supported, although itis possible to load and run a pro- fram from inside another program. Another useful com- Iiand that is missing is the ON ERROR GOTO statement Documentation: The owner's manual is written to the same high standards of the other two Color Computer Ianuals, Instructions pre suppose no previous experience ‘with disk systems of programming. The style is very readable, and some fine demonstration file programs are included. Missing is the usual TRS-80 programmers card. ‘Skill level required: Novice Reviewer: John Steiner —e—_— "nIcRO: No 48 - May 1962 osl COLOR-80 Osi 7) A wor or tsi Co for BASIC eae BK ov OS! and 16K an Foncumectowm megOD ws fame now! ARSC TEK Go TOK TREE AND COLON GO) LOR as TASS he er AS fas NSN syerneg REALTIME neALonancs Stes yirtoneue harsh ESCAPE FROM MARS by Rode Oven DEATH SMP y Ross hen Please specify system on all orders Ta oY oe nu fre nd ule Tor COLORSD td THUR Sand St for @ AARDVARK TECHNICAL SERVICES, LTD. = 2352 S. Commerce, Walled Lake, MI 48088 Osi (313) 669-3110 COLOR-80 No. 48 May 1982 wicRO - The 650216800 Journ 8 The How would you like to go back in time co 19th century London to match wits with Jack the Ripper? Out into space to brave the swirling vortex of a black hole? Into the depths of the ocean, or on a quest to rescue a beautiful princess from the clutches of evil monsters? ‘You never know where SoftSide Magazine's Adven- ture of the Month might take you. But you can be sure that each month you will experience new delights and new challenges as you receive an original adventure on tape or disk, ready’ to load into your computer. "The cost? A six-month membership is only $29 for the adventures on tape (84.83 each) or $49 on disk (SB.16 ach), If you're not sure you can handle six full months Of excitement, you can ofder a single adventure on tape for $7 or on disk for $10. You can choose from: ja Adventure Black Hole Adventure ‘Adventure ‘Windsloe Mansion Adventure resure Island Adventure Klondike Adventure Jack the Ripper Adventure James Brand Adventure ‘Crime Adventure Witees' Brew Adventure ali To order, wse coupon provided or write to: Adventure of the Month 6 South Street Itord, NH 0305S % MugR ~The 8S0216808 Journ nture is Waiting for You........ == 1m Six month subseription: Casatte — 529 f 1 { 1 | i ' 1 ' 1 1 "So ! ' i t 1 ' ! { | Deawane = 87 eck ! | _ Obi so ach H | a Thre adventures om one super dik 26 cach: H 1" Eiaronn lle, and Tessa Agents ' | © Jack the Ripper, Crime, and Around the World Adventures, | |S bk ley indo arin and Kone Adventure | | pease specify which computer i | Pesce ge. 20k fortape, 32K For dt) i | CUATARI (eq, 32K for tape, 40K for disk) 1 | 5TRSSO e164 for ae, 32K or st | eee | Address —_ 1 | Gays ip 1 6 Mseard & VISA © Payment nse | | Nameot Curhoier = = =| | Tans incrbanth Sap = | 1B Bm Senne ——— | | J I No. a8 May 1882 LISZT with Strings by Leonard H., Anderson, Donald Cohen, Richard F. Searle LISZT turns your Appl program listing Into an easy-to- understand structured format. The program Is designed to be flexible and works with a variety of printers. Liszt requires: Apple I! with Applesoft Disk Drive Printer Can you understand a program you ‘wrote six months ago? Do you remem- ber some of those special tricks imbed- ded in a concatenated line of code? The “LISZT" (Logical Inverpreter State- ment Zeugmatic Tabulator) can belp you understand BASIC source code listings by structuring printouts in a clear, orderly form with @ minimum of ‘extra characters, Written for the Apple Tl Plus, it can be modified for other BASIC tialeess. Credit is due Mark Capella for the first listing program. Since then, wo others have been published)’ Not completely satisfied, we decided to start fresh with the following rales 1, Print results so they are easy toread. 2. Make the program adaptable to vari- ous printers 3. Gather statements in strings for Alexibiliy, 4, Separate REMS from printed code, 5, Omit the concatenation colon and ee 6. Split over-long print lines ata logical character. 7. Indent FOR-NEXT loops globally. 8. Indent IF-THEN statements locally. 9. Minimize disk operations, No. 48 - May 1982 ‘The main program, LISZTER, was wrt: ten in linear form to accommodate dif ferent printers and to allow easy dele- ton of addition of special features. This article is both a program descrip tion and 2 partial history of program. development Applesoft Source Code Structure Source code structure rules the pro- ‘gram. One line of Applesoft BASIC is Shown in figure |. Each line contains five overhead bytes: two fora pointer © the next line, two more for the namaber, and an end-ofline nall [binary 2er0] byte. The last line number source code ends in three null bytes to indicate end. of pro All variable names, strings, and punctuation not a fanetion are expressed 3s 7-bit ASCII with most-significant-bit iMSB) set false or 2et0. All function ‘words (If, NEXT, REM, etc] ate stored as one-byce “tokens” with MSB set {rue or high. There are 107 Applesoft tokens.“ Starting the Program Organization Figure 2 is the inital flow chart. Each program byte is examined, begin- ig with. decimal memory Iocation 2089. "Standard ROM. Applesoft code begins here. It can be changed and will vary for other BASICS.) String Variables hold the line number in NS, statement text in a “gather” string, GS, and the "combination printout string, CS, ‘A remarks flag is set if@ REM token is encountered.” The. first decision separates remarks by blank print lines but groups successive remarks without blank lines, Remarks are highlighted ‘without appearing co he part of the main coding ASCII characters and token bytes are parsed next with tokens recon: verted co the original function word ‘This section and the print line format: ting section receive the most attention A prime example is separating. con: catenated statements and allowing in dication of over-long text lines. Holding Two BASIC Programs in Memory Applesoft reserves two bytes in page zero first 256 bytes) for the starting a: ress, Start location is normally decimal 2049 for ROM BASIC, stored in locations 103 {low byte) and 108 (high byte). End-of-program in memory Is in locations 175 (low) and 176 hight Either can be changed from the key: board or program in memory, Figure 1: Structure of one soutes-code line number in Applasot Ha MICRO = The 680216809 Jourat a Apple's DOS allows the simulation ‘of keyboard commands with an EXEC Text File. An EXEC file loads statements into the keyboard butler Exch statement is then executed a5 if it ‘were @ keyboard command ‘The program to be listed is loaded first. The EXEC file is called next by typing "EXEC LISZT.”” LISZT then changes normal program start address to the end of program plus two, loads fand runs the LISZTER working pro- gram. Loading LISZTER will auto- aay se the new end-tprogam Although two programs are now in ‘memory, Applesolt will only execute LISZTER as indicated by the starting ‘address changed by EXEC file LISZT. Original start and end addresses are hele in page 2er0 scratchpad locations; LISZTER resets. start and end. from these scratch locations on completion of printout EXEC file LISZT is generated by the short program in listing | MAKE LISZT ‘may be deleted after generating LISZT. TISZT EXECution commands are those ‘indicated within quotes in MAKE TISZT line numbers 225 through 265, LISZTER start location is set slightly higher than normally expected. This fand the extra nulls will insure that the listed program can be RUN normally after LISZTER resets start and end ad- ‘esses on printout completion. Nor ‘mal source code ending must be three successive null bytes, Setting Up LISZTER LISZTER begins execution at line number 82 by initializing the variables, TInidalizing will speed up execution, especially with string variables in ‘Applesofe, Token array TS contains the 107 function words expressed as literal strings in the DATA statements. Direct ‘expression as strings allows spaces to bbe added for clarity in gathering and converting the tokens, ‘The REM token word was changed to an asterisk. Tt is left a5 an isolated DATA declaration for those desiring nother symbol or word. LET appears as 4 null string in line 88 to permit Completion of the array, token parsing will kip over a LET. Screen prompts in lines 94 to 100, are optional. Printed page length is nor ‘nally 60 lines per page including the header. Indent spacing is normally four column spaces, fitting the REM asterisk with three following blanks. 38 Figure & lial Flow Chart and Sectioning of LISZTER + Asterisk indicates possible path for next print lie of same line number. Listing 1: MAKE LISZT “EXEC” fle gonorator printed withthe LISZTER program In itsting 2. axe LiszT 200+ “MAKE 41827" BeNERnToR FoR “LISzT™ EXEC FILE eS Meonaaa ws everson” 779/02 Gecwmire tier Shoeez06, PEEK (103) ~ Tponez191Pe 175) © *POKEZ3, PEEK (174) " SPoceionrreret2i0) 5 bo) dae ug roeetos, (PEE 210+ a Foe io Pe (210)- 254) Fogo, PEREZ 1) re Peer aiohspesk ti) $=80-1),0° Zee Print sroce neex ato) seeex 211) easeel) 0" 2S print “nowepeghcgto) Pepe att tzser). Program Length = 442 Bytes, Total of 17 Line Munbers MioRO The 8502/6808 Journal No. 48 = May 1982 | ye suninor Sureausy day sd 9 1 Sdanl pee sjorayddly on ae jp evespt akg uatzor! [fue y “saors Sbep yo qama © s2186q pp SUPT ‘amysieg our] ansaies ‘iw 2pbn soinos reonfie 2ts epros asjeainbe-astoise Sah S3en8 SEE 03 podumgp ate Seopos oq 351 WIN 16) upfeutnbs 1 ose ey ron 3364 ‘shy ‘ais y_ pasnord bey povezedoe sh pumaos ¢ Tons 90 ge north {t sobH BuyAdnoae Uojs9s qt oy nopiseg agen apse Apupr> 8 St uayor © 31 na96 sthiar Sater "sip wt at} doo ¥ wo sy Of BINGE non s26Ip 3 uo Apap sasisemgD Domisp agp , dex, 0} pach eta Grad oud ann aygeieat ee [ostuoo 989 amo Saep sO a Yo suou s5uHg gn 941 1 ds 93109 uy “Ayo 9685 -0ddn feui0g a si938 Sainie Uoyoy-e0 ‘smsoar 9 at Elo ‘aorsary retin) a3 pa sob sede Pynom stustussens WtOLd Yet) pop Sp 2m swonere(sop viver APs §. ‘2h of Xyuvurad amp st eimsevey ae mo] pov adda jo suns Og ‘8 22m07 pov 13849, ene 2oy 340 Gormoto} 33 20 vege rad ple gion ur sn poor sasyseg 3ee ot pie ey souiy “aled Sepuotte) aaa 'o palud 29 dbux seo ‘poreredos aft Sropuiow%s poreuatestos aber ‘paver 94 01 2aed saqioue 7 ofed ut sto pao etd 20309}pur PSNEHLO,, pee furad aapesg “ies pu 94h pe E93) Hono aut -sfunga(enaaor 909 (ot Weonp 9 sun) , 25¥4 LSaL,, stgeten © snoqua INta 3(fuis ¥ 1ds90r Aa ia a yn ntl ts SSyUoHUSD de paMbar poe sede AeTG actus rst gg Banas uoleredas pay i ‘quqeos porn LATA NTT YNV'A. guy 91Mq. og Jo. anyon IP e sagan) por gy mimod oq we ‘oudesneuape Alans atk@ 139. soupnaigns fonsos ined wm og st Got Dur] “ssoxjian cyt a18Ay M9 10} fque_Arwsooou “Sueamta> Qe 91 RDU opin U305s 3s \,0C'EC. TOA, ‘SQL 1 aoe (essqahoad ‘or povesoy 236) ni vend oy «BUTE YO SU] euro spe9@089 Au — CHI 7961 en Bon «cranes os Yr tasenow airy LOM 04 wauntog Wad Onl Del Es +O ans cobs etuneenertar ease GEN) aa eae NAOH = 42 ot 01 mo0110 ond on rnisens Yeszect tAGhIDH ROW Stays demo whee Se ee goug 1406 wo worsestsrivat awrenvis 9 se Stove ah ohaean ATs Ind 888 Sohvtcavonts gat igeoy cemesuoy- go. 750%G 2 . cen moe maw a sor At17 aneoo. 9 - pets to be a Yorgoten’ removal during program editing 2. A double colon starting « line causes USZTER to think the fst colon is REM, but the second colon eauses rever ‘on to gathering tokens snd characters the usual manner. Using an tlies set on the priner will make this ine look lke a [REM splat, but has both upper and lower ‘case contents, Best solution i to edit out the extra colons. A.A statement ending nested FOR loops suchas "NEXT executes in Apple- soft as if they were thece separate NEXT Statements, Since LISZTER will oaly recognize one NEXT tokes, all following Times will retain the FOR-NEXT indents} for te remainder of printout. We don't have simple solution for this — yet. Changing the program 'NEXT NEXT K-NEXT L” will a only ‘wo bytes and bring the left margin back {0 nortnal. The two added bytes are the [NEXT tokens, concatenation colons ake the place ofthe commas 4.0n, any mid-printout deliberate stop, such at RESET, you must key in RUN 23 fo restore the program start and ead pointers. Failure to do so may attach EISZTER co the program being listed. Richard F Scale ss manager of software fad contol systems at an aerospace Corporation snd a consultant of the “pplicaioa of solar energy. You ean wete tor, Seale at 4511 Adar Rood, Simi Valle, California 9308. ‘Donsld Coben s a elecuonies engineer Speialiaing in microprocessor conttl of treats emergency power systems. He is fluo programming cossutant and partner of Donald Cohen Associates. Contact Mr Coben at Donald Cosen Associates, 4613, Wolte Way, Woodland Hills, Calorie sist ‘eonatd H, Anderson i a hardware and systems engineer, who uses is Apple for sumber eranching (when 20: playing foes), He is also a contract writer and ‘Somenty am Associate Editor with Mam Radio Magazine. Aadress correspondence to 10088 Lanark Street, Son Valley, California 91382. No, 48 — May 1982 sting 2 (Continued) Program Langth = 10061 Bytes, Total of 175 Ling Mubere APPLESCOPE DIGITAL STORAGE Pe BUS RIDER LOGIC ANALYZER for the APPLE I AnicRO” No. 48 - May 1982 MicAO ~ The 850216800 Journal 6 SY PARALLEL PRINTERS CATOH 510 PRINTER Virway dena th NEC e023 Same elec mechanical "ute pce Gonetensore * TOES ‘tin pre Spector: 1 ctmarcpriner Beak pt — 18 pavacters eine «acorn feed Serer gests eudes 2 ptr ‘irs Heporonal spas * Bt rage ‘faphies and gaphiesymbos NEC & C-ITOH Ust: $300 Sd = Special Price with any other purchase ...... $595 EPSON 100 PRINTER s749 7-80 CARDS FOR YOUR APPLE [MICROSOFT SOFTCARD. With CP/M® & MBASIC. (st; $399)... $289 EW! ADVANCED LOGIC SYSTEM Z-CARD. With CPI aseverynng ie soteaesecapt MEAS. Wes ih ‘asteteo (Uist $269) ...$209 _weW! U-Z-B0 PROCESSOR BOARD (trom Europe) ‘Software compatible win Soticard and ALS Software (Uist: $199)... $149 win Pan, add: (Uist: $75) $49 ALS SYNERGIZER. cern oeaing stage win an Naw Smears So earacs an K aray Soe ees ei srs nang SSRs ontop tana none .FOR YOUR APPLE Il PITS MSC HUE LOND ele rae tLe ety EXPAND YOUR APPLE ll MEMORY ‘18K MEMORY EXPANSION MODULE. ‘To nro 16x Rant Ehanstes Mosul om PHOMETHELS Fuly compat wiht CP/M ‘and Apple Pascal. Wn ayer pars an las wary. (Uist: $169) .....$99 (MEMORY MANAGEMENT SYSTEM. Provides mere too memory in BASIC by moung DOS rio 1 car. (ist: $49) $35 ‘18K RAM ADD-ON KITS. «igh 16k tu epocicaon RAMS. Reducedto ......$19 ‘SATURN SYSTEMS 32K RAM CARD $199 VERSAcard ‘rom PROMETHEUS reesei stmes oS ae aa amis ites hsb cues abn oer uae ona keane DB (Uist: $249) ....$195, soysTick Tiles pace ot wo Aye Pade Contos From Bue enterprises. Heavy duly indus ‘conaicon andable, Non eartering Wah ‘otay swiches for consistent motos cont, (Uist: $749) .... $595 (Ust: $59) $39 80 COLUMN VIDEO DISPLAYS | wi0DEMS FOR YOUR APPLE II eee HAYS Smartmodem $229 " iRatTecaisee win surnremay | NOVATIO Aple Cat oe ‘Software ewthing fom 80140 and 40 to 80 characters, new ‘haracers mat touts one Appl evooara Ful compat ‘GPrite and Rope PASCAL™ With owl poner consuetion ony 25 wane (Uist: $360)... $279 SMARTERM EXPANDED CHARACTER SET. Ada to above: $40, Fiat mate win Yue dooondes viDex 0 $279 wrzaro $269 MONITORS FOR YOUR APPLE ‘AMEX 3006 $220 supen SPECIALS! 12” GREEN MONITOR $139 12" BLACK & WHITE MONITOR $125 ‘A equient shipped tacory resh. Manulactyrrs warranties incuded Pease acd $3.00 por produ! fr shgorg and handing: Calfoma: btctaw BART Counties 812% MicRO - The 950216808 Journal ‘CENTRONICS COMPATIBLE PARALLEL INTERFACE Look ot Grapple From PROMIETHEUS, For us wth Beene Ete ana oor pres Puy comoaible NEW CERCP and hope Po : ‘ony seo \Wit Screen Dump Graphics for EPSON printer add... $25, Phone jor Quick Shipment! (415) 490-3420 N “The mail order specialists” 342 Quartz Circle, Livermore, CA 94550 No.4 — May 1982 GET. FREE SOFTWARE FOR YOUR COMPUTER! Seen 2 | oe a sm TOO rset art al EE on ieee | eS aan Elon g myere it Exeatrorene (HORE FADES ar eke 6 aire ‘eRe Sed, = Seemann aaayes "Fig BONUS SOFTWARE SECTION! Eee dagignconms meses Toone despre sn 0.ca00 peso aces CONN. INFO. SYSTEMS CO. TEIN SVS. (hatin tas tna 10% Rating Bomoseen os (203) 579-0472 $'5% sales tan, Pres subject to change mithout notice "5915999 246 Huntington Road, Bridgeport, CT 06608 Noa - May 1982 MICRO - The 6502/6800 ovrnal ” Apple Graphics for Okidata Microline 80 by Charles F. Taylor, Jr. Programs are given, In Apple/UCSD Pascal and 6502 assembly language, to dump the Apple high-resolution graphics ‘screan(s) to an Okidata Microline 80 printer. This article should also be of interest to ‘owners of the Epson MX-80 printer because graphics on the two printers are implemented similarly. These Apple Graphics routines require: or 838 Epson MX-80 Pascal version requires Apple Pascal system When I purchased my Okidata Micro: line 80 dot matrix impact printer, Twas aueracted (ots relatively low price, the 1200,000,000.character print head war ranty, and the flexible form handling {friction and pin feed). I really didn’t Consider its “graphics, which were advertised as “"TRS-80-compatible." ‘After I'd had the printer for a while, 1 decided to take another look at its ‘graphics capabilities. The basic graph fal unit for the Microline 80 ‘is the ‘graphics character. Each graphics char- acter may be thought of as a 3-row by 2-column matrix, as depicted in figure 1 ‘The individual elements of the srapbies character are numbered 1.6 as In figure 1. Each element ofthe charac ter may be “‘on'" (black) or “off” [vwhite), which means that there are 2 to the 6th power, or 64, possible distinct graphics characters. An ele ‘ment tbat is "on" is represented by ‘what appears {under magnification) t0 bea 3 by 3 matrix of dots. The tocal srapbies character, then, is a 9-row by 8 6-column matrix. Thisis achieved with a 7-pin print head by making two passes for every line which contains @ ‘aphics character, advancing the paper Slightly between passes. With the printer set for 16.5 charac: ters pet inch op an S-inch line, the horizontal resolution is 0.030 inches (0.77 millimeters), At eight lines per Inch, the vertical resolution is 0.042 Sincbes 1.06 millimeters). In other words, che smallest “dot” that can be printed isan element ofa graphics char Acter which is a rectangle 0.030 inches wide by 0.042 inches bigh. Bach grapbics characteris sent to the printer as 4 single byte with the highorder be [ie se (1) Bie 7 may Beier Dr ie hough ark or clear (0) as he comerpond timbered element of the apbies a ee asain Software could be written to utilize these graphics characters directly. This ‘would include, asa minimum, routines to set and clear individual elements of srapbics characters and to draw straight Fines between any two points, Because ‘Applesoft BASIC and Appie/UCSD Pascal each provide these graphics primitives for use with the Apple high- resolution screen, a better approach is to develop a utility program to damp, point by point, the contents ofthe bi es screen to the printer. This was the approach I took, first in Pascal, then in 6502 assembly language. [The later ver- son can be called from BASIC prograzns | The basic unit of Apple hi-res _Raphics is of course che “pixel” or dot ‘The hires screen is organized as ¢ 192-r0w by 280-column matrix of ind vidually addressable pixels. The dis. play is bit mapped, that is, there exists 4 mapping between each pixel on the Sereen and a bit somewhere in memory. ‘There were three principal prob- lems to be resolved in designing the MicRO - The es02/6800 Journal program: the first problem was bow (0 Address the bit representation of each pixel in order to determine whether it ts on or off. The second problem was to decide whether to print the screen im: age horizontally or vertically on the printer. nally, a means had to be found to map six pixels to each srapbics character. Paseal Solution ‘The solution in Pescal is presented first because it is. simpler. This Is ‘because ofthe existence of the SCREEN. BIT function, which is provided as part of the TURTLEGRAPHICS unit. ‘SCREENBIT|x,} is & Boolean function ‘which retums the value TRUE if pixel Gheracter Figure 1: Mieroline 80 Graphics ‘Seroon (6x6) Figure 2: Model of High Resolution No. 48~ May 1982 [iy ison (not black), and FALSE if its off (black). This makes the first prob- Tem cited above almost trivial Since only a maximum of 132 char. scters can be printed on a line (16.5 characters per inch times 8 inches), and tach character is two elements wide, the maximum number of pixels which can be presented on « printed line is 264. Because the Apple hi-res screen is 280 pixels wide, two choices are possi- ‘be: (1) print the sereen image vertically oo the printer, 192 elements across and 280 down; o, (2) print the sereen image horizontally, but print only 264 of the 280 columns. The former choice wa ‘made forthe Pascal version and the lat for the 6502 assembly language version. to indicate which ‘The Pascal program will reduce this rid to two lines of three graphics haracters each. The first line will represent columns (x-coordinates) 0,1, and 2 of the grid and the second line ‘The Pascal program is shown in listing 1. The main program queries the user as to whether to print all or a specified portion of the screen, Pro- colure SETUP handles the details of ‘turning on the printer and selecting the columns 3, 4, and proper print size and vertical spacing. Procedure TURNOFF tums the printer off agsin. The real work is done in the procedure called SCREENDUMP. How the algorithm works can best be illustrated by example. Assume that the Apple hi-res screen consists of Grow by Gcolumn grid as shown in figure 2, and that an arbitrary pattern bas been plotted on it. An “on.” In Pascal {as opposed to BASIC) the origin is atthe lower lef comer of the grid, so the numbers along the left side refer to the row of y-coordinates, ‘The numbers along the right side will, ‘ot be needed wnt later. the image on the printer wil be rotated fs used grid elements are 90 degrees, so thet columns on the Screen correspond to rows on the printer and vice versa line will represent ‘5. Remember that 0, 1, and. We may imagine the grid figure 1 superimposed on the grid ‘The first graphics character of the {y-coordinates) 0 and lof the columns of Listing + Tiating ¥ (Continued) theta 80s areal No. 48 May 1982 ico ~ Te 850216008 Journ «0 figure 2, with figure 1 rotated 90 degrees (counterclockwise). Thus bits of the graphics characters correspond t0 Seren grids as shown in table I. In this, ‘case bits 3, 4, 5, and 6 will be O and bits Vand 2 will be 1. Bie 7 will arbitrarily) bbe, and bit § will be 1, as discussed earlier, The resulting graphics charac- ter is, therefore, binary 10000011 ($83, or decimal 131), Figure 3: Buttery ‘The next graphics character of the line’ will be constructed from. grid The program then constructs the Casseres of Apple Computer Inc. lements (0.2), {12}, (2,2, (03) {1}, next line of graphies characters from which appeared im the October 1981 find (2,3), which correspond to, respec. columns 3, 4, and $ of the sereen grid. issue of BYTE magazine, tively, bits 1, 3, 5, 2,4, and 6. In this These characters will be, im decimal no- ose bits 1, 2; and 6 will be land bits 3, tation, 152, 129, and 128, respectively. _Figure 3 is an example of output 44, and 5 will be 0. The resulting graph profueed by this pram, The burr ‘s'character Is binary 10100011 [SA3, The procedure described above is fly image was created on the soreen by a Or decimal 163). The third and final carried out by the procedure SCREEN: demonstration program furnished with graphics character of the line will be DUMP. The function GCHAR uses the Apple Pascal system and then Srey 10000111, 1887, or decimal 135). simple arithmetic to convert the binary printed on the Microline 80 by this Tepresentation of the character to program. [At this point the program has con- decimal. Then it uses CHR to convert sonucted the first fill line of graphics the decimal value to # character. Ex- Assembly Language Solution Characters. Using the CHR fimetion, perienced Pascal programmers “may fhe"“computed decimal values have notice that feould have accomplished ‘The most difficult part of the 6502 been ‘converted «0 their character the binary-to-character conversion assembly language solution was to equivalents and are stored in the array directly using a free-union variant develop an algorithm to step through EINE Now that LINE is full, tis sent record, That technique would have memory, addressing of each pixel's bit othe printer, one character ata time, been faster and more eificient, but less tepresentation in the proper sequence sade Tollowed by the usual carriage cleat. Readers who wish to pursue this (Recall that this was doen for us in retum and line feed (WRITELN} fopit should refer toanarticle by David Pascal by SCREENBIT.) The task is complicated by the fact that, for ‘various reasons, Apple chose to repre- Deciston Systems, Sent the hives’ sereen in memory in Ss. .0.Box 13008 ‘what appears to be a rather peculiar se- ystems Denton, TX 76203 quence. The mapping used is docu fhented in the Apple I Reference ‘SOFTWARE FOR THE APPLE II* ‘Manual and was the subject of a 1978, article in MICRO [7-43] by Andrew H. 1S fs an ingrated set o Seach BASIE param Eliason, Rather than reiterate the {apabities fo your BASIC programs by key: pata 3 gives, indexed 9: sequently. eal ial wha ener ete esterca sete’, | dutinhee Taave choses eta Babar cage cova be src Se it pps [estag a an ea SOE Gt came pyevenrs heenyarl pam. umbdncaed || atthe ieee mt tas of eae ae corn sey ar EE CASE SELFCH Tenens | the 1st eowsof hes seen | [Togt Becerra er ° er ir er meee, See EARS ro ot arose rem "The Bd pie f sane ed he Fy Deng sn somotayo ce ton cnn sna deamerar | Geter ben egioing athe ecesipiaseneren te mcmanoorarreae as | ee ean tas seme ee eccrine ewe fo est Splut exonerate ucts aor an BE cealaiae mucin ss mene aor, deed UTIL-DS is a set of routines for use with Applesott to format numeric output, selec: motel Se ests ee tively clear variable (Applesott's CLEAR gots everything), improve error handlin the printer in this version (which con- Te ee ee eens wilt appcool programs, Includes © speci ond siderably simplifies the arithmetic) selec acing Wage eer Fark operant ey Mea coun ater ees! ug eet at ly ae Sreeevee rene acy te dnenaiagen pet gegam io | tas 2ee wae seanly seed Sremncciou mamenete scat gecmng tstas.aecses | rye csonssembly anus po RB aeeT neo obi on pone He Sar La ONE, for its use are contained in the oe Giese cea 6 MICRO ~ The 680216808 Journal No. 48 May 1982 Figure 4 Sine Curves Centronics Parallel Interface; some modifications will likely be required for use with other interlace cards. What {s critical is that bit 8 must be con- taollable (high for graphics, low for text). Some interfaces may not use bie 8 at ali, or may force it low. The Epson fveriace Board has bie'8 Wied ground, but a jumper is provided for ‘changing this. If you do modify the set- ting of this jumper, however, you will have to make some other provision for forcing bit 8 low for text. My recom ‘mendation is to replace the jumper No. 48 ~ May 1082 with a single-pole, doublethrow switch This is, in effect, what I bave done to my Apple Centronics Interface card How the assembly language pro- gam works can also bested by example. Refer again to figure 2. This fume we will use the row numbers {y-coordinates} along the right edge, ‘recalling that BASIC refers vo the upper lef comer as [0,0]. This time rows 0,1, and 2 will be used to construct the first line of graphics characters and rows 3, 4, and 5 the second line. [MlcRO - The 6502/6800 Journal ‘The first graphics character will therefore represent columns 0 and 1 of rows 0, 1, and 2. We may imagine the arid of figure 1” superimposed on the rid of figure 2, but this time without rotation. Thus bits 1-6 of the graphics character will represent, respectively, the screen grid positions (0,0), (1,0 (0,1), 2,1), (0,2), and {1,2}. Bits 1 3, 4 and 5 will be | and bits? and 6 will be 0. As before, bie 7 will be O and bit 8 will be 1. Therefore, the frst graphics characteris binary 10012101 (39D, or ‘decimal 157) For the second graphics character, bits 1-6 correspond, respectively, to coordinates (2,0), 13,0), (2,1), 13,1), (2,2), and (3,2) Bie 5 is 1 and bite 1, 2, 3,'4, and 6 are 0. ‘This translates to binary 10010000 ($90, or decimal 144}. ‘The third and last graphics character of the first line is binary 10000000 ($80, tor decimal 128). The decimal values of the three graphics characters of the sec- ond line are 149, 130, and 164 ‘The algorithm illustrated in the [BASIC program of listing 2 is used to find the beginning of each of three con secutive rows of the sereen in memory. ‘The bytes representing the pixels of these lines are then transferred. to working buffers. [Only 38 bytes out of 40 are used because only 264 aut of 260, columns are ploteed.) The subroutines DUMP and BUMPY then extract the appropriate bits from the buffers and rotate them into a page zero location called CHAR. From there each is sent to the printer. Figure 4 shows a typical plot of two cout-of;phase sine curves, More sophis- ticated plots (3-D, etc.) are of course possible; anything you can put on the Screen, you can print! The one limita: tion is color since the printer only prints black and white! Execution time for the assembly language version is typically about six minutes. “The Pascal version takes about 2.5 times as long Yo print a fll, Although tbe programs presented bere were reasonably involved #0 write, they are simple to use. Best of all, they. transform a fairly unsophisticated srapbies capability on an inexpensive printer into a powerful graphics tool, valing prinies costing Several times ‘The author may be contected a SE7F Sampson Lane, Monterey, CA 98940 5 LUsting 3 LUsting 3. (Continued) tae Pa SHED wr? settee ar wet HORE ik PLUS 1 S68 a aT ac a84_FTNEENT rea LOOT wo OKITA ATCHDLNE vk eet | a ea ‘HORE CENTRO eRIMLEL IweRFCE | I. $95 e738 fe ener eer eo : ‘6p 90 08 ET ao Loe aa ‘MAKEN Be TARR. JR SS 60 98 55 7 OR LIN SEEN LINE Me eae a aa et S08 OTe ( we ROY 10 SAT? et Saar FO a eT moe ve NSTRATIINS se a2 ETE ow : SF eT oe ser mven: syn were uns | Sep 15798 =e wo 5 HE FOR HiAES a ‘A 0 3 55 tome oe aR OL SQ FOR MISES PE 2 a ie eae a sate aed ac ws23 SIFT SE 8 Sur 55 caw ‘i sexe sce useo Sve 60 9 5 ee ‘ie sean Rien Inter Sib io 3355 ek sess an ‘Te 9795 ee se Sit aC 55 St eae tre wan cos seam mmr | gia cs oom ot Tee ice 8 UESTION Serre to cee Su 1B ae oH ek SOE Sus a 96 5S OLE Sa OER SDE clea PRINTER vee Si. 60 est ue ‘ SHE 0 56 55 US {TY PUNT FOR IESE 1 Sera 57 5 est : Sis 3 8 Os a In coy Un wsasnrtinue oomes | Sega 7 5 ae STA MEM Sa wt 519-35 9k OSTE ne Lee Sta arse si 6a eseBeTT OS a as oe ' Sra RLM 90 ‘oars FL ests ict ‘ H ‘Woo sup FIRST SETP RIVER ENTRY POINT FOR I-A PGE 2 is ch 18 " ¥ 9-308 1B me asweartiacae pores | sagt- 50 96 05 8 sia went Sin 9 FFD ‘ma ARGH 906-9 56 18 SUA OMH.X SINT MaDTe un 0 90 1 Sin ESO. FERRE OR Ta LIM uc 3 oD ae i 30-56 11m SUA MOE, SERRATE ES ME ue sme somo inner wanes | Sagi 20 ER HS 110 SSRUOS"ERUGE WITH 3's in ee 13 {0K ORSETE SSTER ma aes 1 ‘904 sr PRINTER ‘Sth ak sas DS nwo SET 165 PL OF PRINTER ae sta oH 36a cL Le 158 2 3 wees umiaate rawes | aus agi a7 Ln st Buns soz #5 © Wie GNOTIALIE AFFER Ln wm up- 2022 L108 SERSRTER ER I ‘ae 0 9 Sia ine SMe 9 St Lon ee NERTIOR. SCI A Sor Bo Le SSEIRIER 10 RINIER sas 60 9 ow mse ace 1e ts ASE 5 a6 saan a : 38-0 7 (an seo ce SRS 1 LN CLINE See 7 Sia LIM SA 60 985 1208 Rue SOF 05 12 bea us 28 Ok Sk B5TR LOPE JSR RLM HINHRNINT FR LE | = AE Be RL Sud cE EE De suk mo aD LHe Me | WEF LTE (OR A LIND ST WAFER LI @ Sut me 5 SE v7 ToeER LN TO BurER | se oS wae Sie ae Sus Hae teae tL NY sei SS hw ier 31 0G wala Sa GY Soi 5 aa sa are sus. se ead ‘ey Oe ie wee une sug 18 FS td an Sue SS 1a sn Le Suc 80 9 Head Un Une rime rome apis [eset as Sue 3 a oe a aoe a Lae oP RFFER LD 1 SIS be aS asa me or SUED Be ao Sr m8 tT st DP sk Ho a7 ie ce Suse AS a7 SaD OTL LIN Se BT sme oF Pa [MICRO - The 650216808 Journal No. 40 ~ May 1962 Se 3 8B ona se ma 565 sa 8 56-58 a8 ¥eeeas BBHEReS gee5 Rea 26 FESaGS GBSHHe BRE HESBASRGRERSRARARARAGARM BRERRO ES eee ee 6 BROOUAAAREREE ad EB neene a donessaanse é ‘sting 3 (Continued) = ia ae una ae a 18 i ust ue lam a 1 a ise iste 1 isa st ise is 1 oI 1st one ‘ew a ia i ia 1 va me i a va ry 18 im i oT 1 tee wey ie ie ‘a 188 rT i 8 i cc} 13 1 ie ‘si ist ise ia ‘sa ia an aa ves ow ane Sik eH a 1 LN SET MSE Le 2 Sta oar an WLM STR ore mS Con SIN: Fn IFT ee Ov Bem ae De ha a Sas ar uc as Sin Sons Sie ae ms to uae Sia soe Le 1S Obey {0 REFERS To FRITER 1 FS TO NES 358 WARS TRUEITION To NEXT BE in bye See” REST OF we a cir sm axe LUsting 3 (Continued) Soames ak sa soe se EOS 2H Se Ln Se GS ee Su soe Se 7 8 20m foe Lt 6S 2a ‘ar so Sr EOS 20 SR LINE Sees Ie a1 HR SFOS 28 son Lez.3 SSF 6 2b Sa sO SS-E OS 219 SOR UNE Soe 2D sr soe a 1m or so S218 ur «oe ee Pa co ime ot ose m5 228 uk soe Se ac ze 3S DRIVER S20 1 PIER sm 28 ine S55 fe Te oe =o ae mS = Yea mse 1062 = zm sums 162 = ve “os = eam lost = de oR “os 2 bry i sat sai aun 08 sw HUM BS s0- aun? 18 Ec] ex INKcRO' “ Uva sFtush ems srt se re 1st om uve 23h on inn x Sh TRUER nS fe TUR fon Ley sv BES To PRINTER aR som aT 1 fm soe sett 2 fm Lee ot one RL OR soe IT fu ne fa sone fae une. Meo 876 ar mmoee air? = Ao ome Up oR ure 1S OVER FRAT ime sre so SOF (3 i. E ‘THE PROFESSIONAL'S CHOICE PORTH — A Tool for Craftsmen! tas been a a perl ad rae pars ne wos hve ashi et yu want lar Now to prog aoa tescing language ~PASEAL or BASIC you ka Now 6 roger use engage designed for eralsmen=-FORTH For al FLEX systars BOOT CHES Seely 5 fetonare enlguteion For stanane versions, wit Ocal 11 FORTH —exendeatg FORTH cok, sinerg “IRORTHy “extended more (@Sar2e" cskay $280(898) IFORTH+ Ince 2 screen exo, assole. exceed dat ye ara ily vorabuties GOING PONTE CR conte Sn PORTH games ond debugging ace cut ecracTRSB® COLORFORTH — 10K ROM Pack ul cree eo Wil werk nek 10 FS Spies $110 (820) Dis versions svalabe =“ cations Programs trmFORTH 6200 FORTH oni 950/810) For taigl sompatioe 10 rommable code, Dele uns ‘ce and unrendeo detionry heeds ogres ‘FORTH + TY PASCACcomoterin FORTHE eoGN era ** FRTH BSOGRAMMING AIDS. Extensive debugging, Gece Big, anaprogram ans os Rss) aa ow, A Sse ospng 52t ‘age a albol Micsomtotere 1927 Curie Am Rasy Benen CA 90078 tér3)avesoet Iva a ect Sete ears No 48 ~ May 1982 MICRO ~ The 0216809 Journ! 83 IF YOU CONSIDER THE PRICE, COGNIVOX AT $249 IS THE BEST BUY IN VOICE 1/0. IF YOU CONSIDER THE PERFORMANCE, YOU WILL BUY IT. BECAUSE COGNIVOX OUTPERFORMS ALL VOICE INPUT OR OUTPUT PERIPHERALS FOR THE APPLE I AT ANY PRICE. COGNIVOX VI0-108 ie # sateottheart yeh Reston od cecal pce MR APREE Seper Rem le mL ‘eran can alk with natural sounhig wee SPEECH RECOGNITION 'EOGNIVON serognie mode eh “os ‘sier-vt) aet pire thke “tal Tae Te stealer cone ‘hese to ahr appa, Tien COGN VOX s waned to wocablany ty spent ‘sehen the mes no the icone nde Ah prompting of he ste ‘in tring COCNIVOX soles the Information fo each entry into 48 byt of data fale the rence pate Whe ig ‘Simple were spt in oe ieropione are Sify alan and eating tb patos itcompeed al terrence ates 0 Te pawer af COGNIVOR ie deed from pro Sipwthns that allow qua easy aia "Woeabares larger than 32 word ate posible ey mod or stapler "change ear Or the Soap nn be pone Udo program com voick ovreur ‘COGNIVOR cu th with sesbilay of 22 ‘wor dps, Noein ae aed Uh seabfay ehch an te propane ‘Staph y saying the wordt the leper Tae spec weer then ire ine 8 ‘hen wae ouput dered he ete word cor pnts recor aed bck ng Silipos Ae a proved "mato of attest vy portant adantage: Ft thee al cot orth section othe seeinury ad the ye Same of wou Sond teeter “ray ssn haan Sch sh & fest Si aut under Tew ete ett ‘autbb te mon ober vce ott Seow nthe “The ec ut aol spe neition vrs ola ar indcpendent ofeach her andar Siler" poe to enable ag Sh the computer ‘ORDER GOGNIVOK TODAY aye cocuvox "COCAIVGX # dioed foe ate ee of ‘ghana tig Sie ata 1 ph int the gare VO prt ‘Stace provided with COGNIVOX ise ‘Sota test canruite and modi the sto ts 8 3. ae ‘rine sua on de “ ‘nig ce VO To yor Sun progr sey sie Aust fn BASH at sed “tration an how tad wget your OBA een nthe mena ArmuicaTions TCOCAIVOR as whole new denon 0 into Avan edscatnal ah ra hand anys song cts ema Ar Te “fe tone Wh BS Nae coer sefoce canbe esd to conte by vrs Planes ap art the hone. Wit se GER ash ime cd canbe wd avd Dice tren ten, tet sts Ad Fira COGNIVOX ta sper tt. a Fascating ga ‘ord COGNIVOKy oneal ue 8) 86 18, OHM 0 4M PST Monday Iowan Fi ‘money oder or $28 sue 85 ahpping and hanling (CA dente 203 6% ts} attvare on ‘lnata (006.33) order gat # OK, S12 Forign errs wacom, a6 1% for at mall Shipping ana handing, COGNWVOX is Cached by 21 day warrenty agains! manufacturing se [MioRO ~ The 650216800 Journal {stor o ahr phraws for bth recosriton and sce gorse Baio pai Rergnton a eonwe ilar ane feet Grater an 1 oan os than 9 st ‘Sieae tap bres ors Framing reued Mi promsnce sachin. 9 tins tt egies Alles words he te died Upto 986, Recein sufcy depen on seeded erty nl chee a eet peer ae aut Digi acrdng er we, ‘ati ot Pesrerey sii inte soe Power soppy Ney tas Appr Se for progam and es 13K hte per see pee or Moage af we apne seca Appr. TD" hte ar = VOICETEK Dept, 7.0. Box 388 Goleta, CA 3116 No.8 May 1982 INCRO Microbes and Updates Jim Sherman of Huntsville, AL, called In with these commections to “Saucer Launch” by Mike Dougherty (42:53) On page 59 the listing is out of oder. Lines 108E through 1092 belong at the bottom of the page jafter line 108C}. On page 60, tine 1002 should read! FO 06 BEQ NOXP. Hore are a few corrections to the RUNZMENU article by Frank Shyika (45:67): (On page 68 inthe far right column, the thitd line of BCDF should read 85 39 20 St AB AG BC 6D oD BASD should read 02 05 CE DA CO C5 CE 0S BF Erken Heinzjosef from West Germany ‘wrote in with this update In MICRO 43 you published a Call Routine for the Superboard. Although it is very good, I have found a simpler way. My routine is only nine bytes long but it has'a disadvantage: you cannot use hex addresses. But you can use labels! See listing 1 for the machine. language routine and listing 2 for the the (65030 = hex FEDG = Screen clear in C18 Monitor ROM from Aardvark equivalent BASIC load. The syntsx If you tse labels, don't forget to define carke the label 2 fr any stp) = - 355 dry afgutnon 65000 19 so = aoa fa 50 x= Uso 86 Zor any alpha = 49 x = Usb WARMSTART USR (any argument) SC ‘You have to set the USR Vector at The Inbel "SCREEN CLEAR’ iver first by PORE tie PORE 12.2 hp syntax erzor as BASIC thinks it should BASIC load does it, but after e BREAK be SR you have to reset the vector sting + Listing 2 Saturn Navigator now A2-3D1 licensed! Se olen ea cd eee? Se ener eer peer reo mene eur reer sae ieee | eer iy rey meres Per een emer ry euler ert Py omer renee rte nr) Cowan er an rg Coa een tetera escent rasa) faked TSE RT NSS TSR TTRETS MICRO ‘SPECIAL OF THE MONTH tee Eitcrtiirama | ice pusiness wontaNe, cnet Seni erate COMPUTERS vie coeur She BY cw” | (APPLE II STUDENT, ‘SOFTWARE BEE Fon arPue SYSTEM x | SS STE MODEMS gag | | 80Y soo oe Feline Dates SS TE DISKETTES | sup nusgsesor » oo 8 eo alg TERMINALS PRINTERS oR ET ia Bi i i we 8 EEE Pec NSS TE NSIT 36 MICRO = The 650216808 Journal No a8 ~ May 082 By Brad Rinehart In my previous columns have explained vatious HDE Disk BASIC. features, This month I will cover some of the ‘most unusual commands, as well as file handling techniques. HDE Disk BASIC's more powerful commands include INSTR (is sering), VARPTR [variable pointer), EXEC, MERGE, GET!, PUTI, PRINT USING, (KIS, MKSS, CVI, and CVS, ‘The INSTR command returns the position of a search string within & target string. The syntax for the com: mand is ART = INSTR ( VAR2, “STRING?” "STRING?" ) VAR2 is the character position within the target string where you begin searching. STRING! is the target string and STRING? is the Key. VARQ, or the Starting character position, is optional. It you omit it the search starts at the beginning of the tanget string. After you evaluate the function, VARI will con- tain the character position within the target string where the key was found, For example, if you have the string “THIS 18 A TEST", and the key "IS", the statement X = INSTA ("THIS IS A TEST”, “IS") will return the variable X with the value 3. You may have expected X to equal 6, However, the word "THIS" contains an "IS in ft. The statement, x HIS IS A TEST”, "1S" INSTR (4, will return X with the value 6. This time, we specified the fourth character as the starting point for the search, ‘The INSTR command also acts as the argument for an. IF-THEN-ELSE IF INSTAC THIS IS A TEST"."IS") THEN GOSUB 1000 ° ELSE PRINT "NO" will cause s GOSUB to line 1000. The statement following the ELSE will not No. 48 = May 1082 be executed. However, if you change this statement to IF INSTRO."THIS IS A TEST”."1s THEN GOSUB 1000 ELSE PRINT “NO” contro] will pass to the ELSE statement and the word "NO" will be printed to the screen, The VARPTR command retums the memory address (in decimal) of 1, The exponent of the variable A, 2, The least significant byte of the two: byte integer Ad, 3. The byte defining the lengeh of the string AS ‘To use this information, you must understand how BASIC stores variable ‘data in memory. Numeric variables such as A and A% are stored in five: byte and twobyte locations, respec tively. VARPTR will return the adress of the beginning ofthis memory oc tion sequence. In the case of string Variables, a three-byte descriptor efines the string. The fist byte is the length ofthe string in memory, and the second and third bytes are the address pointer to the string. VARPTR may also be used to deter- ‘mine whether or not a variable exists For example, you stody the statement & /ARPTR (AS%1)) you will see that X will be returned with the value zero if the variable does not exist. Frequently, Ineed to know if an array has already been dimensioned, Without VARPTR, the only recourse is, to redefine it and éap the err with an ON ERROR GOTO statement. I avoid (ON FRROR GOTO statements, they make it too easy to build hidden "BUGS’ into a program ‘The EXEC and MERGE commands each accept input from the disk as though it were entered from the keyboard. Either command accepts in pat from a SEQUENTIAL DATA file or ‘a LIST# (ASCH file ‘The MERGE command enters pro: gram lines from the disk file as opposed to entering them from the keyboard ‘MGR ~The 650216800 Journal ‘This feature is useful when standard subroutines are to be used in several programs. For example, you may havea particular subroutine that is used to ad dress the cursor on your terminal Rather than manually entering the pro: sam lines each time you want to build 42 new program, the subroutine may first be entered from the keyboard, then LisT#ed out to 2 file called CURSR. ‘Then whenever you want to use the subroutine within a program you sim- ply enter MERGE "'CURSR”. This command, entered from the keyboard, will open the CURSR file and inser the Tines into the program. You can save Quite @ bit of development time here! ‘The EXEC command will EXECute the command lines as they are read from the file. But with an EXEC fie, the commands must be legal direct commands, such as PRINT, A=1, OPEN, CLOSE, PUT, and GET. Ex: amples of commands that are not legal irect commands are INPUT and PRINT USING. Therefore, they may be used in files that ate to be MERGEd, ‘but not in files that are to be EXECed, ‘The EXEC command is useful for repetitive tasks. For example, when you have several programs you want to list to the printer, you can create an EXEC file that will initialize the output device, load the frst file, list it, load the nexe file, list it, and $6 on. This ean all be done ‘without any human inter. vention. Remember, any sequence of ‘commands you enter epetitively {rom the keyboard may be put into an EXEC. file and reused. ‘The EXEC command also accepts inpat from a string variable. This feature lets you build a command in the variable AS, and then execute and EXEC AS ‘command. Any. string variable mey be used. However, your ‘commands may be no longer than 250 bytes. OF course, if several commands are to be EXECed, they could be con. structed in a string array and executed in a FOR-NEXT loop as in FORX = 1105 EXEC ASO) NEXT (Continued on next page) 87 The gle Life (conunuea) You might use this featore when you execute toutines that are tobe invisible to the user. Some Printing Conventions HDE has implemented a command, 'CALL', for directing output to peripherals such as printers and brodems. The syntax for the command Is CALL "DEVICE NAME", where the DEVICE NAME is a three character name associated with a binary or ‘machine-language program stored on the system disk. To use the CALL command you ‘must cither write or purchase the Gevice driver program. ‘This device “river is then SAVed to the system disk (drive 0 to 1). The CALL command will Toad and initialize the driver. With the driver initialized, output’ may be directed to the screen, the device, or both. To output to the device, cor mands such as PRINT, LIST, FIND, and LIB are followed by an exclamation pins |"), as in PRINT!, LIST!, FIND!, §nd LIB!” To output to the screen, even while the device is enabled, eliminate the exclamation point. To disable the Geviee, use the command CALLO [call zero), Once the device is disabled, out- pt from statements such as PRINT! Will be directed to the screen. To Change the output device from a printer toa modem, just execute another CALL with the proper device name as the argument, as in CALL "MOD" You may want to write a driver that accepts input from a modem or another terminal. Then when you want to pass Control to that device, just initialize it with the CALL command. PRINT USING may be used to ‘manipulate string data. If you consider that AS~"FRED”, BS="SMITH", then the statement PRINTUSING"PAYTOII% —%' AS". BS ‘will print PAY TO F. SMITH to the ter- Tninal. To dispatch this to an output device, use the statement: PRINT! USING "PAYTON % ——%" Ag BS ‘The exclamation point after the PRINT command directs the output to the ex temal device that was initialized with the CALL command. Neen nnn EEE SEE! PRINT USING allows seven dif- ferent types of format identifiers for dealing with numbers. The pound sign js used exclusively for defining the field ‘width of a number, The PRINT USING comsimand in conjunction with the pound sign equses number fields to be Tight-ustified. For example, if you ‘wish to print a column of numbers beginning at position 50 on the page, you could use the command: PRINT TAB(SO}, USING “##RREF, #°:.N ‘The use of the comma in the field specifier will cause a comma to be out- put every three places in the number. Your printout might Took like: 123,456 ‘292 1,508 If decimal positions are to be defined, simply use the command PRINT TABSO} USING "#¥###, # #4" 7 and the column will be right-ustified, rounded to two decimal places, and zerovfilled on the right, 123,486.25 '232.00 1,508.07 File-Handling Techniques ‘Along with these unique com- mans, I want to introduce some of HE Disk BASIC’s file-handling tech: niques. ‘There are three types of data files, SNAPSHOT, SEQUENTIAL, and RANDOM. access. In addition,’ you Ihave the ability to create an ASCII file of the program listing using the LIST# {list pound sign] command. ‘The main difference between the different types of data files is the way the data is stored on the disk and the techniques used to access it. First ofall, the snapshot data file is, as its name implies, a snapshot of all the data in memory. If you can picture being able to grab the data in memory, compress it §nto one block, and then write it to the disk, you can understand the operation of this file. It is most useful when Saving analytical data. For example, if IMIGRO ~ The 6502/6809 Journal ‘you are accumulating data and moni: foring the results of laborstory tests, but need something recorded quickly, the command SAVED "TESTI" {meaning "save data"| wil, in a matter of seconds, write the contents of every Variable to the disk file TESTI. To reload the information for later analysis, simply execute the command LOAD “TESTI” and memory will be restored to its previous contents, With the RANDOM access file you ccan randomly access records within the file without reading or writing any ‘other patt of the file. This provides quick access to any record in the file ‘The SEQUENTIAL data files are useful for data such a5 tax tables, rate tables, ete. Sequential files are’ best tused when data fields or records are of varying lengths. Normally this type of data is manipolated in memory then written to the disk file when the user has completed working with it. The disadvantage of sequential file use is that to read the last record im the file, you must read the entire file. The same Istrue when changing one record in the file: you must read the file, make the change, and rewrite the entire file. But Sequential files are usvally more com- pact than RANDOM files. To use sequential files properly, you must understand the structure of the file. First, records within the file may be terminated by a carriage return character (S0D], 2 comma, or, when dealing with numerical fields, a space, ‘The end of the file is signified by an end-of lle, or EOF mark. If you could Took into the disk, you might find any ‘of the following structures in a sequen tial file: THIS IS RECORD 1$0D THIS IS RECORD 2S0DEOF 22 33 44 $00 11 66 55 $0D 13 $OD 99 21 SODEOF 22, 33, =44S0D_ 11, 66, 55800 13800 98, -21S0DEOF “THIS IS RECORD Y"80D"THIS IS RECORD 2°, "THIS IS RECORD 3"S0DEOF ‘The first ewo files were created using the PRINT command, the second two tesing the WRITE# commands: Please send all correspondence for Me. Rinehart to 1508 Seanton St, York, PA 17404 inIcRO No, 48 ~ May 1062 OHIO SCIENTIFIC THE WIZARD'S. CITY — Search for_gold in tho dun Score benestn the Wizard's iy’er'in ihe. surrounding forest Awynamic adventure Slowing progress i strength Sng experience, Al OSI Gassotte $129, dick $15.95, OSI HARDWARE 15% OFF Reval prices! GALACTIC EMPIRE — a strat fay game of interstola con Guest and negotiation, Gor pate to uiscovecanguet nd tule an empire withthe core utero 12 othr players. C2, Bae cassctte S205 dio Sis96 AIR TRAFFIC ADVENTURE — areal timo ai Wath simula tion CAP, GaP dione S18 05 Pius “SFORTH, PACKMAN, CRAZY BOMBER, ADVEN- URE, TOUGH TYPING. IN TELLIGENT TERMINAL’ anc more, Send. for our fee Catalog including photos and Complete descriptions. (12) 250.3150 Aurore Software Associates Sr michel FS aringion Heigns tots ecogs acne sy cates CSE means OSI Custom After Market Software for lore ire mera machines unter: Ato Smence, Som ames Foren Badcar "S195 touch Coded in seine Cade tar Imumiasse(orCh Pt ani) 64436 rogram er send $1 for eslaog Computer Science Engineering Box $9 +201 Huntington Ave, Soston 02515, FLEX, 05-0 and ine Radio Shack Disk System Lion the SAME o Gerace th hes ay one teri sae sig Apio1 ‘pro2 Api03 Apio8 pis aot aoe a0 Sune aos: *cca0 sca Sees ith Single Disk Drive sk Drives 1 & Double Drives ‘Apple, wo addtional Drives & Slentype {2ineh monitor plus accessories Paper Tiger 440/345:460, Centronics 7207737 Epson NX70 or NEO Epson NXt00 IDS 860 or Prism Printer No 48 May 1082 ez 109 10 123 130 % 20 2% 109 3 % LABORATORY, RMS OSG LABORATORY! MioRO = The 6 18809 Jounal 58 So «25 PET/CcCBM” 2000/2000/4000 Series ot using # CRT, or deplay cantratier chp $275.00" Select eiter On The 80 x 25 cr. 40x25 Buin Dispiay From the keyboard or program Displays the full, original character set Available from your local dealer or: —EXECOM CORP. 1907 Polaris Ave Racine, WiS3404 Ph 414-632-1004 PETS CON™a ZOOM HiRes Graphics Printing Uti Rat bos a3 Featuring — Independent nerizontal and weatcal Seale factors ‘Aoiity to print horizontal ‘oF rotaed single pages, of ‘panoramas with page t above or beside pane 2 nmatzned ease of use ~ deck, no guessing z00m window Placement — keyeroxe driven Bompete insttuctions for attachmant to your program. Hien picture disc-capre tity. GRAFPAK features one Keystroke graphle tle loading: Sareontrtanaaton, prceng cope, rain, co Saat 2) Marrudaty OS| Disk Users Double your a Without adding dick drives ‘Now you cen more than double your usoble Noppy disk ‘storage capacity-for a fraction of the cost of sddtional Alek drives. Modular Systeme’ DiskDoubler™ i adouble- denaty adapter thst double the storage capacity of tach disk track. The DiakDoubler pigs directly into an (Gdisk interface board. No changes to haréware or software are required ‘The DiskDoubler increases totlaisk space under OS- (651 to SOK. under OS 69D to 473K for 6-Inch floppies, to 168 for miniloppies. With the DiskDouble, each ‘drive dass the work of two, You can have more and larger program, related file, and dis utes on ‘these disk for easier operation without constant fiskobanges, ‘Your Ost aystem isan investment in computing power. Get the fll value frm the disk hardware and sofware that you already own, Just weite to us, and well ond you the fall atory oa the DikeDoublr, alongwith te rest of our growing family of product for OS sk systems "piskDoubler isa trademark of Modula Systems Post Office Box 166 Oradell, ny 07649 0018 ‘Telepncne 201 26a 0003 MICRO - Te 650216800 Journal NEW PET/CBM SOFTWARE Let Computer Mat turn your Pet into a Home Arcade! [ASTEROIDZ — its your ship vs. 9 swore of hier sammaroide. ‘You eve ona colision course and met destroy th blo they Uist youn the next sly. Four levels of play, Has hyperspace evs thal move youstound, Arcade she entertainment a its fest. ‘Great graphs ond sound, Cass, 8K $995, MUNCHMAN — How many dos can you cover? I's you aginst the computer monchers ZIP and ZAP. Can you cla the maze ist ‘or they get yu? Number keys move you up, down ight and ich GREAT GRAPHICS AND SOUND. Cass. ak 955 ‘TARGET COMMAND — Is you agsinst a barrage of enemy Inzers that ace ame ot your ammo dumps, Sight non the targets tnd score os mary hits you dae, As your slicreases so dows the the dificuty ~ (levels o select). This san arcade sive game vith grea raphe and sound flecs. A must for your PET/CBM. Cass, BK $855, ALL OUR SOFTWARE RUNS IN ak OLD NEW ROM — 40 CHIR. SCREEN WRITE FOR FREE CATALOG OF VIC/PET SOFTWARE [PLEASE ADD $1.00 PE ORDER FOR SHIPING. ‘COMPUTER MAT = BOX lit» LAKE HAVASU CTY, AZ, 863 No.4 — May 1982 Ee ee PET FEATURE Go Commodore and MICRO by Loren Wright Sa peer Fons ee anatoe e Seer pacers 7 nae en cnt cae ee recs te as oe | Seer Spin eat fos on tee are ae Oe, eee ee eo ee Sa ae ere Ee eae De ean Coceees | would nat, and perhaps could not, peo- os Inthe U.S, the PET came out in the face’ of stifh competition from Apple and Radio Shack. The Apple attracted ‘many people with its high-resolution olor and’ full-size keyboard, while | Radio Shack, with its nationwide net. work of stores and well-organized marketing effort, drew even more at fention, To compound their problems, Commodore attempted to sell the PET tly directly of through its Mr. Cal- culator stores, and there were delivery delays of many months. ‘The PET, as many other computer shoppers recognized, offered a system tomplete with CRT display, cassette masestoraye, and fully implemented BASIC for a price less than comparable systems from either Apple or Radio Shack. In the rest of the world, where Commodore was organizationally bet ter equipped to compete, the PET hecame [and still is) the number one ‘microcomputer. ‘The company corrected most of the problems with a new operating system. Unfortunately, chis was done without such consideration for those who had. already invested a lot of time and money developing commercial sof ware for the old operating system. Many people abandoned ship at this point, bur most adjusted and are still foyal PET owners. Since then, there has No 48 May 982 been yet another operating system in- troduced, but this time the changes were far less radical, and Commodore cooperated considerably more in the To understate the situation, Com modore has been unpredictable in its approach to the market. When the Bo-cohumn business machine and the VIC were announced, there were wide- spread fears that the company would abandon PET owners in favor of the ‘more lucrative entertainment and business markets. So far, those fears hhave not been justified. Its clear now, particularly with the announcement of several new computers, that Commo: dore wants to compete in all micro- computer markets. The new line-up ‘will apparently include the Ulkimax, the VIC, the SuperVIC, the PET, the 8016/8022, the color 8032,” the Commodore-64, the SuperPET, and the 8096, Each of these is aimed at a par ticular segment of the market. If its new advertising campaign is any indication, Commodore intends to provide the best value for any micro- Computing need, The company plans to accomplish this not’ by. inventing radically new computers, but rather by producing variations on its PET and VIC themes to compete over the full range of the market, To quote Jack ‘Tramiel, the man behind Commodore, We will become the Japanese! meaning that they will offer a lower priced alternative, Whether Com- rodore can actually accomplish its ‘goals is still uncertain, MICRO has been covering the PET since its inception. Much of our job in the early days was to provide the Infor mation ‘not provided by Commodore, land to belp PET owners get around the bags in their systems. Things have pro gressed much further than that now. ‘The PET system is virally bug-tree and good documentation is’ available ‘not only from Commodore, but from a [MCRO - The 650216809 Journal number of other sources. We will con- tinue to publish articles of special in- terest to PET users, but you will find many of our other articles valuable as well. More articles written for other computers will be accessible to PET users, and we will continue co expand your horizons with material on ‘new programming techniques, languages, ‘and applications. ‘This issue's feature article “Grow. ing Knowledge Trees," by David Heise, introduces artificial intelligence 0 MICRO readers. While it is written especially for the PET, I recommend that all MICRO readers try to see this program in operation. It should provide Some ideas for your own artificial in- telligence programs “Menu and Tape Timer,” by Dale DePriest is a sequel to last month's "A Real Tape Operating System." In that article he discussed the good and had features of the PET’s tape system and presented some techniques t0 get the ‘most from that system. This month's programs will help you tum your eas sette collection into a well-organized file retrieval system. Although a disk drive is faster and more convenient, the PET's cassette system, with a few refinements, can offer @ considerably Jess expensive altemative, which is still very satisfactory Louis Sander’s “PET Memory Pro tector" is a simple circuit that is in setted between one of your PET's static [RAM chips and its socket. Depending fon where it is installed, PMP protects TK “or more of RAM’ from ‘BASIC, LOADs and resets. The reset button, ‘which is part ofthe circuit, can be used for either a cold or a warm reset. CRO et i Skyles Electric Works BASIC Programmer’s Command-O™ For PET/CBM® Owners Who Want More Fun And Fewer Errors with Their Programs Here are nineteen commands you'll need, on a single chip you can install in two minutes without tools, on any PET or CMB system. 4KB of ROM firmware on each chip with a collection of machine language programs available from the time you turn on your PET to the time you shut it off. For PET 4016, 4032, CBM 8032, SuperPET or BASIC 4.0 upgrade BASIC Programmers Command-O® AUTO DUMP DELETE FIND(improved) HELP KILL OFF TRACE (improved) RENUMBER(improved) INITIALIZE MERGE MOVE EXECUTE SCROLL OUT SET SEND PRINT USING BEEP a ale ad NOTICE ¢ COMMAND. IMMEDIATELY AVAILABLE FOR = ALL MODELS PET/CBMs Ea PLEASE SPECIFY I! NOTICE @ INSTALLATION: Installs into socket UD12 ($9000) in “fat fort's", 8032's or SuperPET's. Installs into socket UDS. ($9000) in BASIC 4.0 upgrades. PRICES: For PET 4016, 4032, BASIC 4.0 upgrade COMMAND-O CO-40N $75.00 For CBM 8032, Supe:PET (SP9000) COMMAND-O CO-80N $75.00 Shipping and handling $2.50 USA/Canada, $10.00 Europe/Asia Calflora resigentsplaase add 6% or 6-1/2% sales tax a6 required dor your Disk-O-Pr, today AVAILABILITY: | immediately from your LOCAL DEALER or VISA, MASTERCHARGE ORDERS CALL (800) 227-9998 (except California residents) CALIFORNIA ORDERS PLEASE CALL (415) 965-1735 ) x 231E South Whisman Road i Mountain View, CA 94041 Skyles Electric Works | Mountain View e IgG ~ The 680216809 Joursal No.4 - May 1882 Ea PT FEATURE (ES) PET Memory Protector by Louis F. Sander This easy-to-bulld add-on for 8K PETS solectively isolates 1K or more of memory from BASIC ‘and from resets. The protected area is an ideal repository for monitors or other machine- language programs. PMP requires: PET with socketed 6550 or 2114 RAM chips (all small- keyboard PETs, except the most recent release) and a number of electronic parts. PET users have a shortage of protected ‘memory for machine! programs. ‘The PET Memory Protector is a simple addon device that eliminates this Shortage. tn atypical PET, only the sec: ‘ond cassette buffer, with ts meager 192 bytes, is out of reach of BASIC, resets, and LOADs. The only way to protect an area in high memory is to do several zeto-page POKEs, an annoying task. ‘The PET Memory Protector, of PMP, provides a simpler and more reliable ‘way to reserve 1K blocks of high mem ory for machine-Language programs ot any other use. PMP is activated by momentarily depressing one switch, eliminating the need for’ memory-reserving | POKES. BASIC cannot write into the PMP: protected area unless specifically directed, and LOADing 4 tape from either cassette does not affect it. The PMP includes a reset function that allows selection of deselection of ‘memory protection while the reset is performed, all with one simple contol. Installation of the PMP requires no drilling or cutting of the PET, and no soldering to any PET component. You simply insert the PMP connector be- ‘ween one memory chip and its socket, No 48 ~ May 1962 and mount the PMP switch in existing holes in the PET. The typical installa tion protects 1K of memory, but larger 1K muleiples can be protected simply by moving the PMP" connector. The present version of the PMP will work nly with PETs using the type 6550 or 2114 RAMs in plug-in sockets (basic: ally, all the small-keyboard machines) ‘Work is in progress on a version for the large-keyboard machines. Construc: tion of a PMP is not difficule for an ex perienced electronic builder, non- builders can purchase aflly assembled and tested version from the authors. Theory of Operation Figure 1 isthe schematic diagram of the PMP. When 5 is closed, it connects Ry and C, to the trigger pin of PET's power-up timer, and opens the chip. Select line to1C,, IC, can be any one of ET's RAM chips, typically it will be fone of the two thar Constitute the top IK of user RAM. The charging effect of G, momentarily lowers the voltage on the timer rigger pin, which activates the timer and power-on reset. At the end of the timer's one-second eycle, PET writes a character into the lowest memory location of the user program area, then reads the contents of that location, Ifthe read and write are iden- teal, PET repeats the process at the ‘next higher memory location. The first time the read and write do not match, PET concludes that it has passed the top of available RAM. It then sets its zero-page BASIC pointers accordingly, and puts the appropriate BYTES FREE ‘message onto the CRT. 1) is sil actuated when the reset routine tres to write into IC, the SEL Tine will still be broken by Si, and the Figure 1: PMP Schematic +5v RESET POINT sss) (MEG TRIGGER, = c, 0.68150 BREAK THIS CONNECTION 10K +5 Lis Heavy lines denote wiring adsed by PMP. ‘8, shown in normal pstion \MicRO = The 6502/6800 Journal ee eT ‘SEL pin will be held bigh by the voltage from Ry. So the read/write process into | Figure 2: Locating the Reset Point IC, will fail, and PET will conclude that IC, and all memory above it does not exist, Because IC, is paired with ‘another chip that is not disabled by S,, 4 the reset will have modified the lowest 1c sing ein Cy but wil nt hae a car jected any higher memory locations. ‘The BYTES FREE message will include Coa. ESET POINT ' ‘only those memory locations below ines 7 Be som ined wast oe os 1Grfs Siet utoees appease and aeremnic, al ly hctond, ae SP SSS on ee ee eas Beet eats ela ant tony ony a Tanaka oe oY eer, ‘memory. a HSReeneceae te is released before the timer FROM THE FRON! fies sept Te wl be properly J SOBANG, AND ABOUT og connected when PET attempts to ac- 4 2¥e" FROM THE Popa beep pend Ee ee aa ee diehay dave sa iateia te yas BubE Mtoe f (eee ot wl aot be proves 1 ) pat eet Lat released, C, will discharge through Ri, to be ready for the next reset f t Installation ‘of one IC in the font row, plus is par Construction her in the second row. Fall a byte is ‘The first step in installation i to stored in each chip, for 1024 menmory IF you are not an experienced elec- unplug your PET. Then find a way t0 locations in each par tronics builder, you shouldnt ty this mount §, permanently. You can either ject on your Own, since amiowifed dilla hole in your PET, ordrilla 4" x If your memory chips have 18 pins Dap could’mean disaster to your PET. 3" stip of heavy sheet metal to accept each, they are 2114's, and the IC's For the bulder with any experience, S,. Then mount it to the cover hold- making up the lowest’ memory loca: PRP construction is staightorward, down bracket on PET'sright se, using tons are to tbe far let. The highest Pept for bresking the SELlineto1C,. two addtional holes drilled chrough memory locations are to the right. To For tne 6560; SEL is pin 18, and +5 is your piece of sheet meta. is prop- protect 1K of memory, the PMP plgs pan 7 forthe 2118) SEL tein 8 and Crly chosen, it will easily it in the 4” Into either one of the rightmost chips MS is pin 18. Make upa’"PMP connec space between PET's cover and base, With 2114's the PMP can be plugged for’ fom two wike-wrap IC sockets making a very attractive and unob- into any RAM socket, protecting any Plug the sockets together, piggyback: trusive installation umber of 1K memory blocks. style, and cut the pin carrying the SEL ead from one socket to the other, If Next, connect the wire from S,, to If your memory chips have 22 pins, ‘you want todo a more professional job, the reset point. Here you can solder a they are 6550's, and things work dif- Mee ‘one wire-wrap socket and the wire directly to PET's circuit board, or _ferently. The low memory locations are Plastic base from another, cutting one youcan use a tiny test clip to connect it to the right in this ease, and the high Ef the pins. Either way, solder your S,, 0 a Component lead. The reset point is ones are tothe left. Your PMP will only Teads to the severed ends, and glue easy to find by locating the 555 timer work properly in the highest 1K (the ccverything together 50 it can't move. chip, which isthe only eight-pin IC in leftmost socket), or the highest 4K Soller Re tothe appropriate pins of the the PET. It's on the far let side of the [number 4 from the left] tupper socket, and you're in business, printed circuit board, sbout eight [You need wire-wrep-type sockets for inches from the front edge. The reset _ To locate 1C,, first determine how this work, because the soldertab-type point is accessible either at pin of the much memory you want PMP to pro- pias are oo short to work with, unless 555, or at the resistor or capacitor lead tect. Ifit's 1K, then IC, isthe rightmost ‘you're used to microsurgery.) ‘wire shown in figure 2. [By the way, or leftmost IC in the front row. If you this is the same point used by the reset want to protect 2K of memory, IC, is buttons on old ROM PETS.) the chip just next to that one, and so We advise the prospective builder :0 fon, at the rate of IK per chip. For test bbe persistent in his search for parts, Finally, locate IC, and put the PMP. purposes, you will need to protect 1K, Singe S: and the IC sockets arenot com. connector between it and its socker. At _ 50 initially use the end chip in the front on items. They are manulactured by the very front of the main printed cir- row. Use the left chip for 6350's, or the the thousands for industrial use, but cuit board are two identical rows of right chip for 2114's. (In every case, the your local Radio Shack doesn't carry eight IC chips in sockets; this is PET’s corresponding chip in the second row ther. RAM. Each IK of memory is made up could be used, with ientical effec. a IMlcRO ~ The 6802/8800 Journal No.4 — May 1082 We've arbierarily chosen the front row chips because they're easier to get 0.) Before removing 1C,, note the U-shaped depression on its top at one end. That is.an orientation mark, and when it faces you, with the IC’ pins pointed downward, pin 1s the closest pin to you on the right. See figure 2 for examples. Take careful note of ICy's brientation, so that you'll beable co in- sert the PMP connector and IC, in the proper direction, When you've done this, gently pry Tc, from its socket, using a. satall screwdriver inserted from the front Use standard. static protection tech. niques: Keep yourself grounded, and lay the naked IC, pins downward, on piece of foil or conductive foam, Now {insert the PMP connector into the va- cant socket, being extremely careful 60 preserve proper orientation. Using Static protection techniques, and once again paying careful attention to orien: tation, insert IC, into the PMP connec- tor, and you're ready to test your PMP. ‘Test and Operation Visually inspect the installation to make sure there aze no broken wires or Short circuits. Make sure that the PMP is plugged into the correct socket, and that all its pins are making contact. [Look closely, as bent pins are com- ‘mon, and easy to miss.] Make the same check on the IC chip, where it plugs i to the PMP. Finally, double check the ffientation of the IC and the PMP, if felther one is in backwards, correct it ‘immediately When you're certain that every thing is as it should be, tum on the power to your PET. You should get the formal BYTES FREE message’ [7167 bytes on the 8K PET}. Now load a machine-language program [MLP) of ‘some sort into the top part of the top 1K ‘of memory. Ideally, it should extend to the very last fee byte. Be sure your pro: gram doesn't use the very first byte of the top IK, since that byte will be ‘modified by the reset routine. Run your MLP to make sure that it works. Now activate S, and keep it ac- vated until the BYTES FREE messa appears once again. If all bas gone wel, that message will have appeared about one second after you first activated S,, and will indicate 1024 fewer bytes than hommal. Next, LOAD and RUN a BASIC program that uses several string variables. Run your MLP once again. It ‘oth programs work properly, PMP has protected upper memory from being ‘written into by BASIC. No 48 ~ May 1982 Pats List ©) = 068 F,50wr Ry — 1000 ob, 4 wate Ry — 10K ohm, wate $,— DPDT momentary purbhstoa secs ‘Two 38-pin or 2-pin wire-wrap- ‘ype IC sockets (pin configuration. depends on your RAM type} ‘Hookup wire ‘Glue (Deveon cleat epoxy or similar) Optional 14” x 3” piece of heavy: sheet metal {for switel: mounting. bracket! “Tonal parts cont should be $10-$12 for cop-qualty, name-brand parts. For the final test, momentarily acti vate S;, this time being sure to release ie before the BYTES FREE message appears. If you get @ normal BYTES FREE message, and if both programs are {gone from meinory, your PMP is work: Ing correctly. Congratulations om job well done! Now here's the full story on clear: ing and protecting memory in your PMP-equipped machine. 1. POWER ON clears all memory, over- writing it with characters dictated by your ROM set. 2. Using either cassette drive to LOAD, SAVE, or VERIFY clears the associated cassette bulfer, replacing What was chere with data from the tape header. The unused cassette Dulfer is not affected. 3, Momentarily depressing S)_and releasing it before the BYTES FREE ‘message appears clears all memory ‘except the cassette bulfers, and gives ‘a norms] BYTES FREE message. The Cleared memory is overwritten with characters dictated by your ROM 4. Holding §; until the reduced BYTES FREE message appears clears all ‘memory except the two cassette bul- fers and the memory above the first protected byte. That first byte will be aleered by the reset process, but is protected afterward. Anything pre- viously existing above that byte will be unaffected by the reset, and will MICRO ~ The 68028800 Journ! PET FEATURE be protected from being written into by BASIC. It can be PEEKed and POKE4, but that is all That's the full story on the PET Memory Protector. We've found it tobe a very handy device for protect™ ing high memory, and we hape that you will, t00. If you'd like to have a fully assembled and tested PMP, ‘we've made some up that we'll send you for $20 each. Just send your name, address, and RAM type to: Louis F. Sander at 153 Mayer Drive, Pittsburgh, PA 15237, Louis F. Sander designs and markers ‘leetronie rystems for hospital ad ot Heath eae providers: Hef the originator of COMPTUER KINDERGARTEN, {computer familirnation couse for alt, ‘ietor H Ptr installs and services smiedical electronic systems. Both have ‘worked in electronics since pre transistor days, and they have collaborated on several hardware and software inaovatons for small computers OSI-C4PMF GOBBLER MANIA Attempt the maze eating all you can but don't get caught Full colo’ & sound! disk. $12.95 SENTINEL 's there any enemy around ‘he next hat? Better ready your crossbow for bat Buin. disk. $19.95 We also have: ALPHA BASE, RADAR TANK, HYPER ATTACK, and many ules to! {Alin 10086 machine code. ‘Send $1 for complete catalog to: {+ wrerestine ‘SOFTWARE 21108 S. Harvard BW orance, Cal 80501 6 ‘MUWEROUS Basic PROGRAMS HARDWARE PROJECTS. ALL Pats OS no Se ‘iy Mop and aro Load £ : g é E What's Good for the Space Shuttle is good for your Apple II! ... MICROWARE. 6s MloRO = The 650216800 Jira No, 48 = May 1962 (ES PET FEAT Growing Knowledge Trees by David R. Heise Knowledge can be represented for gathering hierarchical knowledge _Relations ina ee diagram are trans- In tree diagrams that are stored — irom people and reducing it to its itive. This means that a relationship simplest form. The program illustrates beeween two entitites can be inferred how to pass muleiple parameters to an when they are connected by a chain of assembly-language subroutine vio the arrows rather than by a direct arrow. peuple know abouts tort USR function in BASIC. It shows you For example, in figure 1, D [a dog), isa Analyzes answers, and shows ow to create a BASIC subroutine Chat kindof 3 mammal}, and [scnseamal} users the organized results. can call itself recursively, and demon- is a kind of A (living creature). There strates a method for automatically fore we can infer a dog isa kind of liv loading and protecting assembled code, ing creature” even though there is n0 along with a BASIC program, Assembl- direct arow from A to D. Many kicds fd routines are provided for carrying of relationships are transitive. For ex- recor per Sa aa Soe Sat arent Seopwarg Seton Da sacs Fee ee es ree Pe DE ae SLnom id Mover Su opel hoes ws twinge an te a ates Ph spree moriema ht ea a a Elke a ecco a type of directed graph. See figure 1. not, like the relation "has, jane may Bewersloh ‘have a husband, and her husband may havea bald ead, We would no want Figure conclide that ane has bal head A computer needs to be knowledgeable tom EE iii to belp you casiy plant dag. Sadana eet nose illnesses or identify beliefs that oe” saa ogee can be epost hold down productivity. Bot how do Pa for the diagram in figure 1. Lettre Poo eat 5 Ponape inoeteeaahlet © slong the top of the matrix show nodes low do you techs compote otet : ‘ onpinating sorces for arrows. Lee gare hows) How do you repeat | /\y | i) epee sero mee oowiedge BY F | tides at destination point for owe. ‘Revol a cell indloates that no avow Research on these questions has onnects the cama node to the Tow teen performed Sa compute selene eee Sa oes Ga ow SEfeveal elite TSO tenes a doug Frsent mdes in som te oyeaeangade uae Reece aie ries paver an maa i See coe ene | res uetal ee eect one (gue Se oo al Fee ee rants - Arie Stay, Somes Pomel Seen i asin tant ed Pe ok er eee eet arene ee aR am ML De rene Rese ee ed rome ce aaa eer es eas eee Siphon gethcniees tee her Rica ee a ners etree Rn eter jet tata eet See ie eee ee Tee mirage! Soe re me eT es ait tare wee co ae ae es eee eres No.8 May 1982 MICRO ~ The 6502H6809,sourna! er

You might also like