D VOLUME, ISSUES&9 D AN AR ESCO PUB L ICATION MA RCH IAP RIL 1980, $4.00 {ENT,N OF CONTENTS* EDIT0RIAI... REA,DER T/Or., Swan..... ..:....Subscribers. .....2.08/Q9.03 Tom ..... .2,08/Og.O? CH]P-B CHIP-BE. . . . . . .G Detj-11-j-eux. . . . . . . . . .,2,58/Q9.L5 .2.O8/O9,IB ...Robert T-,indley".. Programming Hints......r.....H C Wil-1 IV.. Invert..... Software Changes & Other Good Stuff George GA}IES IIFE....r . ..... Programming Hints. . . SPACE WARS Speeded Up. ., SIMPLE SIMON Adaptatiorr. FIIP-A-R0UI[D..... MUSIC VIP Keyboard...... . . . . .2.08/A9.24 .....2.o8/o9.2? Tom Swan..... . ; . .H C Will IV. . ; . . . . . . . . .2.08;'/09.29 . . . . .2.08/.09.29 . ., . .Tom,Swan. . ., . .2.0.8/.09.30 . . . . .Tim l,ongcor. . . . ., .,????????????..... ..Doug Wolf BASlC VIP Tiny BASIC Machine Ziniew!"^.. T-,anguage ..... .2.O8/O9.30 ....2.08/09.34 Subroutine Irittle Loops r,, r .'. More rinv BASrc Maehine tansuas; SHiffi::ii::. . .z.o'/os.u3 MACHINE IANGUAGE Extended Display Subroutine..C H SCRT Jump Table. r . . .. ... .. ...I,eo .\ *Due to the huge number of articles in.this.issuer the table of contents is continued on the back of thj-s page 2,OB/og ,oL TABIE 0F CONTENTS (continued) }I,ARDWARF: Keyboard Reset | . . i . . . . . . . . . . Steve Med.win. r . r . . . . . . . ,2 ,08/Qg . 5L liny BASIC Disconnect Switch ' Randy Holtr.,.....r.,,.,2,08/09.51, Expanded RO-lt{ Monitor.. r . . o . .Randy Holtr . . . . . . . . .,,,,2,08/09.52 MISCET,I,ANEOUS IIT Owners.Tom Swan...r....r..:....2,08/O9,tz Changes To. VIP-FIOP. . . , . . . . . Carmelo0ortes . . r . . . . . . . .2 .08/09 ,13 A Tretter To PIPS Set Caffy/Clear Carry! r.....Tom Swan'.... e.,. r., r...2.08/.09.36 ..... Correctj.ons For Back Issues.......... 2,08/09,42 Rrblisherts Noter r...,.. r...Terry Laudereau... r. ..,,2,Q8/09,42 USER NEWS New York Atnateur Cornputer Club... ... . .. .. .. .,., .. . ..2,08/09,36 ADVERTlSING ,,.2,08/09,50 Non-Corunereial..,....... ..... (Hardware ARESCO "Going Out Of, ) Business Sale" . r ! . . ,2.08/Q9 ,5O ...... ... .. . ,.,2.08/09,06 .. ,... RCA... pages See also t4, 26, 31, 32., and 33 Entire Contents of vIPER Volume 2 (L979h980) is eopyrighted by ARESC0, Inc. r P 0 Box 1t42, Colurnbi-a, MD, 2L044. c Inc. is not affiliated in any way with RCA, and RCA is not responsible for the contents of this newsletter. VIP is a registered trademark of RCA Corporation. ARESCO, is published ten times per year by ARESCO, Inc. fiOj Golden Hook, Colurnbia MD 210&lt, and rnailed to subscribers on the last day of each month except June and Deeember. Subscription pri-ce is $ZO for all 10 issues (a11 past and firture issues) of the cument vo]-ume. Non-USA subseribers should, add $10 for alr-mail del-ivery, Second. Class Postage paid in Columbia MD 2LOl+5. USPS zJo}-Jjo ISSNr 0L99-t566. POSTMASTER: Please send all address ehanges to ARESCO, P 0 Box ttl+zr Columbia MD 2t044, Readers shouLd NOT correspond with RCA concerni-ng VIPER nateriaf. THE VIPER . z,o]/og,oz EDITORIAL ''THINK DIGITAL'' by Tom Swan I've been sitting here staring out the window, occasionally adding my entry in a paper airplane contest wit\ a littLe b9y downstairs who was hurt playing soceer; If only the big ciruela tree were a few feet more to tfre right and if onfy f coulA get a little nore lift, I bet I could keep a tiny paper plane up for over a minute considering how high we are from the ground., Then I asked myself a question I ask at least 20 times a day. have to ca16u1ate "OouLd a computer help?-" We1l sure. YoffiId paper size, weiglrt, lift, d.esign, things like that and maybe a computer could help lead to a superior paper airplane. 0n second thought, I have more important things to d.o so I suppose I'11 stick with the desigr my brother David showed meo Sti1l a VIP could graphically plot wing shapes, etc. It's an intriguing idea. I, am sure there are plenty of VIPers and other computerniks sitting in front of iheir-video screens mentally scratching the insides of their craniums for something to do witn the things. Just as I an positive there are thousands of writers staring out their wi.ndows wond.ering what.to say next. '(Can you hear me clearing my throat just now?) come up with progranming What's a good way to ideas? The best w&5rr I think, is to ask that question "Could a computer help?" Ask It even if it seems silly. Look sideways and upside doran at things. But always "think digitaf" and keep TIIE QUESTION in the back of your mind. Next time a paper airplane flies past you'll find yourself running for the run switch, a light bulb (f,nOf) burning brightly above your Naturally I think the VIPER is an excellent source of programming inspiration too. That's why we're d.oing what we do, but to really keep the light bulb lit, we need to hear fpom Sour Starting tod.ay, I'11 keep a list of ideas sent in by readers to be published in fuIl a couple of months from nowr If everyone sends in one, idea for a program that they don't have the time or experience to write for themselves, werd end up with a digital pooJ. of id,eas. just waiting to be keyed hexadecimally into memory. I think this would be preferable and for sure more creative and productive than for me or anyone to write the whol.e list, fhen, if y9g find an idea you'd like to tackle, w€ can publish the results hereo Remember, think digitalt 2 . AB/09 .03 I read Phil Sumnerrs letter this month (see Reader T/O) with great concern" Phil- wrote to say he noticed a shift from general interest articles in the vrPER toward PrPs rerated material. Since f arn the author of the series and am now editing the VIPER as well, I fear that Phil and other readers may get the erroneous impression that Tom Swan is somehow "taki-ng over." In no way is this true. I certainly didnrt accept'the position of editor with any intention of furthering my own special interests, fhe reason I got involved with the VIP in the first place was because it ains at an audience generally interested in learning more about computers whatever a personts special interest nay be. The VIPER will eontinue to focus the bulk of its articles on that audience. There is another side to the question. I have noticed several past issues of the VIPER whicli were slanted toward other special interests, so much so that they were not of much use to me eithert For exampler a hardware packed newsletter does Little for someone who occasional-ly forgets which end of the soldering iron to hold, I am arl incapable fumble fingers with a circuit design and articles that discuss electronics in detail just arenrt my cup of tea" But the articles deserve to be published, The sarne holds true for other concerns. Last month|s features were definitely slanted toward owners of the Tiny Basic Board. The 0ctober issue was particularly hardware oriented. There have been musj.c issues. Others may have been weighted heavily toward LS}Z maehine language businesb and I seem to remember a time when computer_held the gpotlight. (And VIPER readers nipped Il".Elf that one in the bud properly! ) But whatts the answer? Should we refuse to publish an article unLess it is total-ly general in nature? I hope not ! VIPers are a diversified lot ana-tne newsletter must necessarily reflect the va{ied interests of its readership, The fact is r there will always be some material in any publication which some readers may not find interesting or useful or even comprehensibleo To someone else, that very sailre article may contain answers to questions long since given up as lost causes. Damned if you do and damned if you donrt publish ito I do agree, howeverr that no speeial interest -- hardwar€r assembly language or PfPS should be allowed to gain the upper hand. The purpose of this editorial is to assure Phll and other non-PIPS readers that I will pay speeial attention to including general j.nterest material in ea6n anA every issue of the VIPER; Each issue should have something potentially useful to €verlorrer AIso, I am a great believer in the adage that the facts speak for themselves. To that end, I conducted my own survey of the last four issues. Just' how much material has been publ-ished which requires some special knowledge, hardware or book in order to be used? I define general interest as any article containi.ng software - 2 ,oB/09 ,oLt' that wiLl rwl on an un:nodified VIP without a ke3i',board or other plug in peripheral. (I did not eonsi,der memory; liuritation'since I+f VfpS ire practically the standard rlowr ) A special interest article is the opposite of that, artd of course PIPS related articles are of an obvj.ous nature. Reviewsr r€adors letters and advertisement were not included. Thoug[ most of these are probably general in interest they are not alwalrs' general in subject and would, only confuse the results. Here are the results of the survey fon VIPER, Vol 2, issues 4,516, and 7. per cent of total r 75"Q/r. PIPS related articles r 3 r per e ent of total . - 52,Q/g General interest 10 per cent of total r. "!,6d Other Special interest r 6 T0TAI, fr-ffi TOTAL - E There seems to be approximately JOy'o of general interest material and 501" of special i-nterest material in the last four issues " (52,6y'o vs, 4?,4% to be exact") In the February issue aloner the results arer PIPS related articles - L General interest - 3 Other Speeial interest - I F5 per eent of total r per eent of total F per cent of total- r TOTAL The percentages are less significant for a it is a case of 20 per cent or nothing for TOTAL - 20% 60% 20% 6T7' single issue because a single article out of five. Ird appreciate some feedback from other readers on this. What do you ttrink of the balance presented in VIPER and how should the baLance be kept? How mucir on one subject is too nuch? Or 4g you want to cut out g!! special interests here? Let's hear your conments and try to arrive at a workable solution. To PhiL Sunner, thanks are in order for pointing out a wealsreqs in our publishing policies. Though we are not engaged in any active shift toward any special interest groupf it is true that the balances are leit swinging in the wind. If the wind doesn't happen to bLow your way then you're out in the cold. and that's WfOfI$o Ore final comment is to renind everyone that I don't rya4t to to write fiost of the material nyqelf. We are more than happy pubtish a3-1 the general interest articl-es we receive .E but we have to receive them to publish them. We all look forward to hearing your comments and are c onf ident that the outcome will 'be a better newsletter for all l 2.OB/OT,O5 rStartThevlPhObhy@mpuler; programming forbnly $99. Assembled* and tested. Completely assembled and tested. Features: o RCA 1802 Microprocessor. 1K Bytes static RAM. Expandable on-board to 4K, Expandable to 32 K Bytes total. o 512 Byte ROM operating system. o CHIP-8 inter,pretive language or machine language programmable. excitement. More challenges in graphics, games and control functions. For everyone, from youngster to serious o power supply. . I Bit input port. o 8 Bit output port. I . o hobbyist. lO port connector. o System Hexidecimal keypad o Audio tone generator. o Single S-volt operation. o Video output to monitor With easy-to-buy options, the versatile RCA COSMAC VIP means even more All the features of the VP-1 1 1 plus: o A total of 2K Bytes static RAM. . . COSMAC VIP lets you add computer power a b6ard at a time. Built around an RCA COSMAC microprocesso[ the vlP is easy to program and operate. Powerful CHIP-8 interpretive language gets you into programming the first evening. Complete documentation provided. expansion connector. Built-in speaker. Plastic cover. Three comprehensive manuals: VIP lnstruction MafiUEl . 20 video Cassette interface-100 Bytes/sec. game listings, schematics, much more. o lnstructiori Manual with 5 video game o VIP User's Guide-operating instruc- Send the coupon now... Complete the coupon below and mail to: listings, schematics, CHIP-8, much more! tions and CHIP-B for the beginner. RCA VIP Customer Service, New ldeal for low-cost control applications. o RCA 1802 User's Manual (MPMHolland Avenue, Lancaster, PA 17604. 2018) - complete 1802 referenceguide. Or call toll lree (800) 23$0094 Expandable to full VIP capability with vP-1 14 Kit. to place your Master Charge or VISA *User need only connect cables (included), a credit card order. ln Pennsylvania, S-volt power supply, and speaker. catl Vfi) 397 -7661 , extension 31 79 . or modulator. o nG,n Please -IIIIIII,I send me the RCA COSMAC VIP items indicated. VP-111 New low cost Microcomputer (See description lgg tr above) tr VP-l14 B tr tr tr tr Expansion Kit for VP-1 1 1*lncludes 3K RAM, l/O Port and connectors... VP-711 VIP-The originalVlP Microcomputer (See description above) VP-44 RAM On-Board Expansion Kit-Four 2114 RAM lC's. Expands VP 711 memory to 4K VP-590 VIP Color Board-Converts VIP to color. Four background and eight foreground colors bytes 256 programmable frequencies. For simple music or sound effects. lncludes VP-550 VIP Super Sound Board-Turns your VIP into a music synthesizer! Two independent sound channels. Onboard tempo control. Outputs to speaker audiosystem tr tr $ s6 $ software.. $ gg VP-575 VIP Expansion Board-Provides 4 . buffered and one unbuffered expansionsockets . g0 tr VP-576 VIP Two-Board Expander-Allows tr use of 2 Accessory Boards in either I /O or Expansion Socket. VP-601 ASCII Keyboard-1 28-character $- $ $ gS ZO $ tS VP-61 tr VP-620 Cable:Connects ASCII keyboards tr VP-700 VIP Tiny BASIC ROM Board-BAStC tr VP-710 VIP Game Manual-Listing for 16 exciting games. . ... .. . ... VP-720 VIP Game Manual-tl-More excitino ASCII / Numerrc Keyboard-Same as VP-601 plus 16 key numeric keypad to VIP ....:.. $ AO $ ao code stored in 4K of $ Sg : E $ eS ROM.. games (Avaitabte 2nd qtr '80) ....... CDP1802 User Manual-(tnctuded $ gg $ l0 $ lO tl MPM2018 withVP-711):... ....,.. $ Pleasesendmoreinformation....... E for items checked plus shipping & handling charge of$3.00. Enclosed is Add your state and local Total enclosed $ I enclosetr check orEl money order or, charge mytr VISA/Bank Americard El Master Charge taxes Credit card account No. Master Charge lnterbank No VP-570 VIP Memory Expansion Board- VlP. With g4 Board- Programs 271lEPnOUs keyboard ...$ Zl memory I t tr -II-I--II VIP ASCI I Encoded alphanumeric . $ lg Plug-in 4K RAM VP-580 VIP Auxiliary Keypad-Adds twoplayer interactive capability. 1 6-key keypad with cable. Connects to sockets on VP-590 or VP-585 ....... VP-585 VIP Keypad lnterface Board-lnterfaces two VP-580 Auxiliary Keypads to tr 2716 EPROMS to VP-565 VIP EPROM Proqrammer E 4-Channel Super Sound-lncludes VP-576 expander, demo cassette and manual. Requires VP-550 and 4KRAM -ITIIIII VP-560 VIP EPROM Board-lnterfaces two Ze VP-595 VIP Simple Sound Board-Provides tr VP-551 tr $ tr Signature (required for credit card orders): Name (please type or print). Street address. State & Zip: Expiration date:- City Telephone. ( ) Make checks payable to RCA Corp. Prices and specif ications are subject to change without notice. 2 ,OB/09 ,06 5 Dear VIPER - My recent telephone conversation with you confirned my suspicj.ons that the parity bit from the new RCA keybodrd creates probJ.ems. in fom Swan's ASSEMBI,ER-3o Your suggestion to cut the MSB lead will fix the problem but I have an i.nherent dislike (chicken-heart) of cutting foil on printed, circuits. Applying the following software changes to fom's EDI[0R-21, modification for keyboard 1 or 2 will also do the job, Fgf Mojifipation Address oo 3L 0o 3z 00 33 30 CB 00 For Modificallo.n # #1 Address 0O 2D Branch to 002F00c8 r spare - 00 2F \ 30 c8 00 For both Modifieations Addres s 00c8 0o ca 00cA 00cB 00cc 00cD FE F5 5z B8 3o B3 SHt ;Set MSB to 0 SHR ;Put comected code in staek PHI ;Put in RB.1 STR BR iBranch to 0083 is taking the input byte that is in D register and shifting it left to drop the MSB. It is thenshifted right to restore-the original daia except that a / is placed in the MSB' Since the original byte was stored in the stack (ne;, the corrected byte needs to replace it and this is done at address The program 00cA. It is possible to make this modification by adding only 3 bytes but it .requires some rearrangernent of the existing program I assume you have the modification from RCA on adding a DPDT swltch-to the Tiny BASIC board so that CHIP-8 can be used. without pull,lng the board. I did make that modification (driltea holes, cut foilr laid down with a wet rag on my head) and it works very well. - Bob DeHaven Dear Bob -'RCA pulled a switcheroo on their ori-ginal design and ny modifications were constructed on the prototype RCA keyboard that Rick Simpson sent me. The same problem may show up in my "Step by'Step" article and elsewhere when ASCII codes are compared in software. In the lnterest of keeping standards standardr I will continue to use nonnal ASCII codes in my programs that neqd them. Another possible fix would be to logical]y AND all input characters with hexadecimat $?f to set the most significant bit to zeroo Frankly, I dontt see the purpose of the parity bit anywayr and if you are not squeamish about eutting a foil trace, I suggest' you do j-t. [om 2,OB/Og.,O? Dear Rick and Temy: I had hoped to write this letter in an optimistic mood, with constructive comments, inputs of my own, or maybe even a new article (yes, I'm still- thinking of that!). But over the last few months, I have read each new issue of VIPER with a growing sense of dissatisfaction; with the arrival of the February issue, those feelings turned into dismay. Whether you reali-ze it or not, the VIPER has largely turned into something that I. cannot use, and neither ean other people like rl€o As a relative beginner, I passed up the opportqnity for the PIPS seriesi I wasntt interested in becoming a programmerr and in fact am just now l-earning machine language progranming. But now I find that the VIPER is shifting so that PIPS FOR VIPS is a necessity if Irm to use the VIPER material. The perfect example of this is the Ki]Ier Robots game, which uses many of the routines from PIPS. But I canrt use it, and neither can anyone else who didn't buy PIPS. I think you have some hard decisions to make. Either continue as you seem to be going, turn the VfFER into a programmer's newsl-etter, and accept the inevitable shrinkage in circulation as people decl-ine to renew. Or sh.ift the VIPER back to nmning, a respectable amount of general interest articles and information that are usable to all your readers, not just the programming elite. By definition, this would mean that some articl-es and prograrns must be revisi.ons or extensions of previously published material (Vfpnn or RCA manuals) r or they must be complete and self-containedq Care to put the vote to your readershrp?? Note that you run the same risk in printing programs for the accessory boards such as super sound. That would also bother rrrer but I havenrt noticed enough of that to be real1y objectionable. There usually was somethi.ng in that issue for me also. I guess my basic beef is that the something for me has gotten l-ess. and less lately. Enough of ine negative stuff -- time to think positive. I basically like the newsletter in its present form, with contents out front and'regular features. I do have reservations about Tom Swan as the editor the newsletter may lean even more toward programmers as a result; the newsletter's also in very real d.anger of becoming a one man showt and I basically feel that editors. should mainly editorial-ize and only occasionally write. But I'm more than wil-ting to wait and see how it works out. To get back on the positive trackr l-et.me hit you (and whoever else you care to invite to the "party") with a couple of ideas (or downright challenges, if that's what it takes to get someone interestedl. 1; "It's about time that the VIP became useful for something other than a toyr galrei or hobby. The next most logical thing to d.o with t[e VIP is to make it into an educational device, especi-a1Iy for math -- why not now? The software multiply anO Aivihe routines are avaiLabLe; so are routines for disbfaying any combination of di-gits " Conversion ' , , 2.OB/O9.oB between hex and decimals may be a problem when handling large numbersr but that "problem" should be solvable. Handling of negative numbers may be more of a problem. Why cantt some of our elite programmers put such a package together? 0r maybe put at least part of it together, as handling negative decimal numbers? such 2, There is a definite d.earth of logically written explanatory material on machine language prograrnning, Why canrt someone put together a manual on the topic? The machine language equivalent of the VIP User's-Guide that Terry did? I would be very willing to collaborate on such a nanual I think I can contribute in some waysr and can act as a trial filter for most of the rest. And if you wait long enough, I might be able to do the whole thing, Some of the natural- pieces for such a manual are surfacing in my work nowi Irm the Astro Electronics instructor for the Microprocessor System Design laboratorf cours€r Rick is probably familiar with C1I/CL1L' the fundanentals courset what I rm teaching is CL56, which goes much deeper into a lot of interesting topics r Ij-ke machine language, Individual pieces of the manual could be published in VIPER as they are generated, then they could all be collectedr reorganizedl and edited to produce the manual. I have the first draft of sueh a piece nowr something caIled "A Universal Machine Language Branching Technique"r whj.ch discusses a handy software technique that every real progranmer larows but every beginner has to find out the hard way. And there are other potential topics rieht behind it. This letter has gotten too long alreadyr Xet! For the next orr€e I won't wait so longl Thanx for everything - Phil Sumner Phil - You're absolutely rigfrt. And. we hadn't even noticed. the shiftl It is people like Vou, who give us substantial constructive criticismsr offering new ideas & solutions, that keep VIPER on trackl Thank $our I see VIPER as an information exchange. People write about things theyrre interested in. We "pretty it up" and make a lot of copiesr then send copies to anyone who is willing to share the printing & mailing costs. - Terry VIPER I have a'VIP with 4X A Color, I am also a ha,u radio operator. I would like. to interface the VfP to a circuit to beaLle to recej.ve morse code and display it with the VIP. I am not sure where the output of this A/D converter would connect to the VIP. My larowledge of machine language is not all that good to be able to convert their coding to the VIP. ff you or anybody you know of could help me on this it would be greatly appreeiated. I would thlnk this could be of great value to many VIP users as well as.the many ha.rns that could be interested, Ihank $our Ted Bratcher Dear 2,OB/og,09 - Sorry but Irm not a ham (though some would disagreel) In your letter you also ineluded a c-opy of a circuit taken from nEUlri-r-'gazine". Because I assume that diagrarn is copyrighted by the publisher of REMark, I did not include it here as ygu requ-ested. Sti11, if any readers respond with similar interests, ff1l be happy Dear Ted ,t!,,,,,1,i,1,8,,,fiF,l,,,,W,I,',ll'fi,f,ll.iL,,I*f,ll",l1li,il,:,,,,.,,ff**\i,,,li[,"S*lifr'?:L**#l[::i::ii:r:i Dear VIPER I'm very impressed with your publication. I soon Sopg to publish my Vfp-fBOe mini-assembler- in the VIPER. The assembler is designed. to work in a standard VIP using the hexpad. This means that hexadecimal op cgdes must still be used.. Ihis plus the lack of a4y macro capability means I havenrt written a true assembler. My mini-assembler wi1I, allow the writing of (Ahhhh) futty relocatable source codel fhe assembler will-support the use -of labels and/or absolute addressing. AII branches and subroutine caIls to labels will be resolved. In addition, code can be assembled to run any'place in RAM using a simplified ORG directive. Keep up the good work. - Steven Blasni-k (P,S, Tom Swanrs rel.ocatable ,-however, PC change was beautiful! ) ...P..e_+f....$.!_-e.y-e..t...:...![e....Lp.p.h...f9ry.?.r9.....!.-o_...r._e_9.9.lylng..y-.og.f ...1F.p_-e_T.npl9.f :....:...T.o..* - San Hershts Editor is especially nice but should be relocated to the highest page ryith a iump to it a! 0200! - Then you can rUn a progran in CIIIP-8 by loading all but the first two bytes at O2O2, chebking and editing then replacing the junp-to at o2oo with the first two bytes and run. (Maybe it would take a long branch and four bytes, but you get the idea) r Alsor I have a VIP for sale. It includes 2K RAM' Tiny BASICT inproved RESET-RUN switch, 2 digit hex display on outport port, I bit binary LED display for output, Cortes audio output ?.np, switch for,Tiny BASIC, all cables for TV & cassette, AC power supply, a stack of documentation 3 to 4 inches thick (inCtuairrg . g}I-Vfpnn issues), & original shipping cartons" A11 this for a SZ-oo cashier's check. One more thi.ng. Tiny BASIC needs an OUT statement/command" (a11 BASICs are weak on this, I think). Who says you'lI'neVer warrt to get somethj-ng out on the output port? I donrt favor any sehemes for POlGi.ng around with machine language routines to accomplish thiso I'm working on a hardvrare fix for it" Anyone interested?. Dear VIPER 2,OB/og.to arn experiencing some difficulty with my \IP-700 .Tiny BASIC. Sometimes my machine nms through a 60-Key loop without a key being depressed. I wond.er if any of your readers Dear VIPER I a similar problem and found. a solution? Keep up the good work and thanks for any he1p. .- Jerry Krizek have had Dear VIPER - My'system is a home brew t8O2 resenbling the ELF' however, I have made modifications to it as well as the CHIP-8 such that my machi-ne is indistinguishabJ-e from a VIP o I saw my first VIP a few weeks ago and was pleased with nyself as to my simulation. Your newsl-etter (magazine) is a constant source of enjoprent both wife" At some point I will send-you for me and non-computerist -ot oNE-DTMENSIONAI LIFE (nnn, Jzlzr p68 (i9?8)) my oHIP-8 version and PAPER, SCISS0RS, STONE. I have implemented. Charlie Mc0arthy's (Vfpnn, May '?g) Hi-resolution graphics and was very pl-eased with it. I hope to see some software support in Vol-ume-?-or to eontact Mr. McCarthy directly. - William GiLbert - At one time I had contemplated writing a CHIP-8 version of LIIE but ended with a machine version because of speed" Thanks for your Jetter and we look forward to seeing your prograrns r Dear trlilliarn Tom VIPER In the Nov. t?9 VIPER (2,o51 , Tom Swan reviewed Tiny BASIC and commented. that there were no provisions for machine language additiorls. I received one of the early boards (it only cost me $Z9t ) and had the same frustration. I called RCA, talked with Joe Rudy, and discovered that there re. a way to get at least limited rnachine language capability. Andy Modla of RCA Princeton Labs had written a way to achieve thisl I called him and got the instructions with the r.mderstanding that he intended to send it to VIPER to be pubJ-ished.. I have used this approach with my Tiny BASIC board, and it workst I get the feel-ing that these directions could be modified to provide a multipLe number of machine language subroutines, but I haven't had tim-e to look into i-t. Perhaps someone out there might want to dig into this further. - Randy Holt Dear Randy - Someone Ellready has I See the article "More Tiny BASIC Machine Language Subsi'by C.D. Smith in this issue. - TomDear Dear VIPER - Having 3scentlf installed. a home brew RAM board., and stomping on a fair-share of hard.ware bugs in the proeess, I thi.nk the following modifications to the Memory Test Progra"ur in the VIP Manual (VIP-300, p.32) may be useful to 1802-ers iri testing erratic memori-es. z.oB/09 ,11 Changlng the error-trap to provide a dynamic, r4ther than static, display can reveal "iffy" address lines. fhis change flashes the error location continuously" and the tone is suppressed since havlng hardware problems is annoying enoughl oo6c o? FB Fr 30 6c (rast byte @ oo?1) In ny case, this revealed nultiple simultaneous access within the 1K under test I it can be determj.ned from the screen which IVIA lines are fadlty. Not trapping errors is also us'eful in observing overall behavior in the tK under testr x€v€Bling faulty add,ress linesr, un-€h&bled chlpsr oF chips not write-enabled' or which fail to respond to signals. These failures are observed as vertical solid lines coiresponding to the bit-width of the chip (4 uits tor 2714s, I for 21O1sr etc.) for enable problems. Dead address lines will show as horizontal lines; a combination of enable and address problems will show as squares or cross-hatch. To disable the trap, change 0054 to '38'. Fortunately, my board is rururing nicely, thank youi with the exception of t-2114 with a bad bit, all problems were bad connections' either sold.eredr or the more insidious pin-to-socket contact" - P. V. Piescik, Cuddly Software TO PIPS ITI from Tom Swan A LETIER OWNERS Welt, it's humble pie time. ltrlhen I wrote the Reversi type game VIP-FLOP for PIPS FOn VfpS III, I thoueht I knew how to-pfaf tfre game. I have a good friend who used to teIl me, "Tom, !flgl assume that you lorow anything." (Roy -- you were rigfrt-Eg4ln.) Not having the box version down here in Burro Land, I relied on a sketchy Creative Computing article and one match played at a computer show as the basis for the game rules. As many of you have rightly pointed out, I made one lovely boo-boo. My head hangs d.own in'sharne and I print here one of Terry laudereau's farnous "sighhhh's " a long'n . My mistake was to assume that moves only need to be ad.iacent to any piece in order to be counted as Iegal. The correct rules require that at least one opponent piece be flipped for the nove to be legal. When there are no 1ega1 moves possible, the player must forfeit the turn. Now for the good n€ws. CARMELO CORTES TO THE RESCIIE ! (con't) 2,OB/O7,A2 Dear Riek and Terry, I,'ve enelosed my correeti ons to the VIP-FLOP game. Also I rve ineluded a routi-ne that allows you or the computer to forfeit a turn when there are no e-eql moves left. Unfortunately, beeause of lack of room you ean no longer ask the eomputer to suggest a move for Now when you press KeV C t you are f orfeiting your turn " [ou. I hope Tom comes up with a better change than mj.ne, this way can have ny forfeit and computer advice too! Thank you Carmelo Cortes Thanks, Carmelo, The modifications listed below work fine and the only improvement I can think of is to, as you suggestr make the forfeit automatic so that Key C will work as before" I'11 give it a t"y, and if I have any success, publish the results next month. They say "To err is human." Sometimes I wlsh I was a computer! (Guess which one.) CHANGES TO VIP-FLOP 03 6c 5n 7o 4E FF 15 ln T3 BC -L 0390 -- o3EA F2 o3F5 FE 'lF o3D2 T3 EA 4A FF 13 F2 ?4 Dll 26 c4 13 66 D gz rreFF13cB3ufinBl T3 B2 13 F5 13 E6 rF 877 0 F5 oaic BD f,z 8ll AE FB Bc 32. gE eu fls FB 9C 32 FB A4 FB lz AC 82 o aFe FE AD F8 FF AF FB FF zlt A3 D3 g+ FB Ft 3fl e4 BF 3z 9n 56 3A 85 FB 2t+ A3 D3 9F gA FB 9t 8D 1F 57 1E 8E 8F FB Fz aA 3fl F5 NB E1 D3 DC A3 F8 FF F8 A6 56 Dll FB FF A6 55 b+ Dl DC FB E5 A3 II ogEl Eg // ?,08/og, 13 PRELTMTNARY ffing Point forBAslc lnterpreter Mlcroeomputel the Vp-711 VP-701 BASIC is a full-sized BASIC interpreter for the VP-711 or Expanded Vp111 MicroOomputer. This BASIC includes features that up till now were only dreamed about by .VP-711 owners: one and two dimensional arraysi string variables string f unctions; machine language subroutine calls; plus FLOATING POINT MATH with trigonometric and transcendental functions. VP-701 BASIC contains over 70 statements and functions including custom tailored commands for use with the VP-590 Color Board and the VP-595 Simple Sound Board. VP-701 BASIC provides video mapping of 16 characters by 11 lines. VP-701 BASIC is RAM-resident, requiring a minimum of 16K bytes of memory for the interpreter plus RAM for program area. VP-701 BASIC comes on cassette tape and includes a user guide. NUMBER RANGES Floating Point: decimal digits) lnteger: t t 1.7014 x 1O t S,32 bit (approximately COLOR 6 2,147,483,647, 32 bit (10 decimal digits). VARIABLE TYPES Numeric (Simple) A-Z Numeric (Dimensioned) A(1) - Z (256,256) DIM Statement required. i.e. DIM A(100, 10) Size of arrays are limited by memory. When used with the VP-590 Color Board, VP-701 BASIC can program the video field for color. The color statement by itself will sequence through 4 background colors. When parameters are included after the color statement, the foreground colors can be set to the colors listed below. The color field is broken Ltp into 8 blocks horizontally and 4 mirrored 32 bit blocks vertically. COLOR CODES - Black 1-Red 2 - Blue 3 - Magenta String A$ - Z$ Up to 96 characters each. FLOATING POINT VS INTEGER All numeric variables default to floating point. To define variables as integer use DEFINT X statement which sets all variables through variable X to integer. To change variables back to floating point reissue the DEFINT command. (DEFINT with no variable resets all variables to FLT. PT.) During input VP-701 BASIC converts all numeric entries into an internal format to facilitate program exocution. GRAPHICS VP-701 BASIC also contains special commands to utilize graphics and color. The video display is arranged as a rectangle having 64 elements horizontally and 128 elements vertically. The graphic commands COLOR and SHOW have their origin (0, Ol at the upper left-hand corner of the screen. The PLOT command has its origin (0, 0) at the lower lefthand corner to facilitate an easy transition from ordinary cartesian coordinate geometry to the video screen surface. RcA Microcomputer productslNew Holland Avenue Lancaster, PA 17604 2.O81O9.14 4 - Green 5 - Yellow 6 - Cyan 7 - White 0 VOCABULARY ABS ASC ATN CALL CHR$ cLc GET GOKEY GOSUB GOTO HIT PRINTER ON PRINTER OFF PSAVE PT READ IF REM CLD INPUT GLS INT COLOR INUM RESTORE RETURN RND RUN DATA DEFINT LEN LET LIST LOG SGN MEM STEP STORE cos DEFUS DIM DLOAD DSAVE END EOD EOP EXIT EXP FIXED FNUM FOR FREQ KEY MID$ NEW. NEXT PEEK PI PLOAD PLOT POKE PRINT PRINTAT SHOW SIN SQR TAB TIMER TIME TONE TVOFF TVON USR WAIT I CHIP- 8E by Gilles Detillieux I It seems that everyone has oome up Many of these would be very useful with extensions to CHIP-8. but obviously they could not all be incorporated in a 5t2 byte i-nterpreter. This gives rise to many incompatible systems. , The approach I took was to rewrite the interpreterr taking the following points into considerati.on 1) It should be cornpatible with all- prevj-ously written CHIP-8 programs" Execution should. begin at 0200 and all instructions should remain unchanged. (with the exception of BMMM and 004e which are rarely if ever used in any r CHIP-8 programs*. ) 2) It should be readily adaptable to various ISOZ machines. 3) It should incorporate T/O instructions. tl) fhe ad.ded. j-nstructions shoutd be useful enough to warrant their implementation in the interpretero Less useful ones (or those used less often) can be handled as machine language subroutingF. interpreter, which I call CHIP-ffi (for extended), features the followj-ng new instructions r My OOED STOP Replaces filIer at location 00ED with instruction 23 DEC R3. Since R3 is the program cowrterr execution stops at this point. ot57 WAIT FoR TIME IIP Examines content 00 OOFz of timer and exits once timer equals NO OPERATION UsefuL for deleting instructions in a program. Executes a D4 SEP R4 at 00F2, which makes it return to fetch the next instruetion. O18B sxY,t SKIP Unconditionally skips next two byte instruction. IF vX>vY ,^+:^* if ir r,r, I greater than VX is Skips next two byte instruction SKIP vY. *So far, the only CHIP-8 program I have seen which uses an instructj.on not a.rraiLable in CHIP-8E is "VIP Bowling" in the VIP Game Manual. This prograrn contains a BJJA instruction at 0538, In this case, the new F01B instruction can directly replace it. 2.OB/O9 , L 5 sXY2 MI = VX rVY Transfers variables X through Y to memory. Works like FX55o sxY3 rVY = Mf Load variables X through Y Works tike FX65. BBMM BRANCH BACKSIARD MM BYTES BFMM VX Go to current instruction vrPER 2 ,01 . 11 ) with data from memory. location minus MM; (See \ BRANCH FORI/fARD MM BYTES Go to current instruction location plus MIvl , (See VIPER 2 ,01 . 11 ) ( nn00 and BF00 are non-terminating loops ) = VX Content of VX sent FXO3 OUIPUT FXlB SKIP VX BYTES Skips amount of bytes If VX is 00, the next to output port l. (suustitute for old indicated by content of instruction is executed. VX. BMMM) FXI}F TIUIE = VX; WAIT FOR TIXM UP Sets timer value of VX then waits at OI5I r-rntil FXE3 VX timer is 00 ' = INPUI Waits for st-,robe at EFE then reads c ontent of input port 3. FXET VX = IIIPUT Reads content strobe. of input port 3 without waiting for listing for CHIP-8E, (tisting t), is for the VIP" For use with a different ISOZ system, modification will- be required" If you are using the system described by Bobby Lewis, make the The changes shown in listing II. If you have a kelpad at input port 4, and an IN button, (like the EIF II and SIIPER ELF) make the changes shown in listing III. If you have = keypad at input port 4 which provides a key-pressed strbbe at ffi make the changes shown in listing III, using 3E instead of 3F and 35 instead of 37, If your keypad is different than the systems mentioned abovet VPU wiLl have to rewrite instructions FX0A at locations 010A to 0114' and EXgEr/A1 at Locations 019F to 01ADo I hope this version of CHIP-8 wilt satisfy the need.s of most people r and perhaps introduce a measure of standard.ization for extended CHIP-8 interpreters. . Listing I CHIP-8E o0oo c4 gt BB FF 01 82 96 F8 CF A2 F8 oo 45 F8 02 85 oolo F8 81 81 F8 &6 A1 90 Bl} F8 1D A4 30 E0 E2 69 96 oo2o B? E2 94 nC 05 F6 F5 F5 F5 32 t+2 FE FC 45 AC 45 oo3o Fg Fo A6 05 F6 15 n5 F6 F9 F0 A7 4c s3 0C A3 D3 (Cont. ) 2 . OB/og.L6 oo4o 0050 oo5o 007 00 o 80 00go ooAo 00Bo 0oc0 00D0 080 1F 00 01 o7 AD A7 32 9B L5 3o 3z B5 32 c5 F8 FF 98 BF 4z A5 o4 +5 22 DC 30 75 65 52 9F 83 45 30 3E oo FA DA 01 AE 01 9T 01 01 o5 FA oZ BE FE FB gD 85 DoAS%BTBZ32 15 BD g? Z6 B? zE oo Ec FB Do a6 93 45 D7 OO F8 FB FE FE F1 AC 9N BC gA A3 3o A7 02 FB 01 A? 46 F3 5C 01 A? o6 F3 5c zc n5 B? 56 F8 FF AF rz p4 Lt,s 56 01 83 01 8B 01 01 EA 01 D1 00 3F n'5 r'5 r'5 zz BF BA AF I+5 FA OF z? 4r' BD 9E AE BE BF 9D 56 16 9? 56 BD 32 Do zD o6 Fz a? 32 c9 1c o5 Fz Bc Fc oB Ac 38 AA 45 n5 rlr 56 o& oo zF 30 E5 23 4z,B5 45 A5 85 FA oF 85 00 F3 01 cA o6 FA $ D4 g4 5F BF 32 F2 ooFo D4 t5 85 22 73 95 52 25 A3 n5 I z6 plr 98 56 o4 FB BT BC F8 95 AC o 1oo 0110 T2 56 D4 o5 BB p4 o6 A8 Drl n6 t5 30 EE n5 0 120 8A r4 AA 9A 7C 00 BA Oll 00 FE 81 BA O6 FA OF AA 0 130 oA AA o4 1A 1A EA FB FF AE AF o6 FF 5Lt, 1F 33 38 o t4o Fc 54 FF oA 1E 33 4z Fc oA 73 BE ?3 BF 5A o4 o6 o150 88 gB 3A 5r D4 22 85 52 FB FO A7 07 5A 87 F3 17 o16o 1A 3A 5B rz D4 zz 86 52 FB FO A7 oA 57 87 F3 L7 o17O 14 3A 5n Lz ob Lt,s Z6 ?6 i3 e5 TE o? 38 8ll n5 FT 01 80 38 B8 D4 45 n6 F3 3A 82 t5 t5 o4 45 n6 F3 3A 88 otgo D4 Ll,5 o7 30 Bc 78, 22 87 p4 52 B6 A? 33 5e 30 58 t+5 o lAo r'5 n5 6z z6 33 49 36 BB 3E BB ol} oo oo 45 FA 0180 0F 3A n6 o? 55 D4 AF 22 FB D3 ?3 8F F9 Fo 52 n6 o 1co 07 D2 56 FB FF A6 gb ?E 56 p4 LI 5 AA 86 FAOFBA o lDo Dll L9 89 AE 93 BE 99 EE r4 56 z6 n6 r4 ng 56 L+5 01E0 F2 55 o4 3F E3 3? E5 n5 5n p4 E5 85 FC 01 85 38 o lFo F9 rb A5 95 ?C oo 85 z5 o4 F7 A5 95 ?F oo 3A r'6 0 Listing II (for oooo FB 07 0 011 0E 0108 0E 0124 0E o 1A2 6Z o 1A5 7? o 1A9 3F 000 0011 oo 14 0 104 0 01 2A 0 141 :: CHIP-8E Modifications system desciibed by Bobby Lewis, VfPER, March '?9) OX r- n5 3F a II 3FAA ( CttIP -B patch no longer required ) tisting III CHIP- m Modif ications (fdr ELF II and, SUPER nlF. ) (ox is display page) (High ad.d,ress- for Interrupt routine ) (frow address for Interrupt routine) oB 3? oD 6c FA oF 56 P4 oo (High address for Pattern table ) zz 6d, o5 F3 rz FA oF 33 BE 30 85 2 ,oB/09 ,L? II\MERT by Robert Lindley The vrP will seLect nine randon digits, one through nine, and dispray them. These numberi are not d.uplicated, 6ach elactry.once. Th" _object of the game is to try to getappears !-our line of digits in order before the vrp puts its rini: in drdel. A possible starting display might be: \ 27936 Br5t+ 27936 Br54 INVERT YoU ME If you press key 6, the new display is: 639?zBr54 972368r54 INVERT6 YOU nm As illustrated, everything from the left end of the row to the given key number is inverted. Al-so the vrp seleets its own inversion. The serectioh made by the vrp uses arl efficient algorithm, but it does not take full advantage of natural ordero In the case of a tie -- you win. The program was coded in a sirnple straight forward mannerr The main program is first and is mostry cal-rs to subroutines to do the work. There is one r.mique thing in the program, it uses a pai-r of subroutines (sgw ana nnsrn) to save and restore the memory poj.nter. Thi-s neatly solves the problem of using one poi.nter for both data array reference and display refererlcer LISTING /z/il SIART 6z '/t+ /6 6Ll.// -- Sigrral first -r Do RNDM 2266 -- Do SHINV -- Do SHROIU T{z E22BB Do WINLS 221E l,lEXT I ilB 3\6f, ile dc ilE L/ T2 * 76 1B 1A 1C 1E r RNDMI D- pass of game Test for start new game r2:,/g -r Go to SIARI 22DC F- Do GETIN 23/2 --. Do S}IR OI/'I A3F8 -- YOUR n26 -- Do DOINV 2376 -- Do MYCHS A4gg -- MINE n26 -- Do DOINV 12/6 -- Go to NEXT Alll B -- rEMP ?,o\/og .1 B -*r Fzzl 22 R1t z4 z5 II II r- 2E R2t /23/ eilss ? tlt 3Lr/ 32 It+ 38 I22E 6r,fu R3: --r ri -rI /zt+g 4z 44 out array locations A to Increment loop Exit on 17 count \ GotoRZ -- Start loop c ount Get random # / to F -- femp - restore array origin -l- -I II Add I- offset --a III FBlE 46 elss &B llA A3F8 L- rlr -- Add offset Store YOUR - Player array Add offset FBlE Fl 55 -- Store A&1 B -- Temp r Scratch Pad array Add random offset FClE Ll,C I- llE /25/ 52 54 56 5B Il- Zero to mark as selected Store 55 -Increment loop ?nf,t y,/s Exit loop on 10 count 6lf,/ -ar Ffr IT Ir- 5A 5c Go to R3 I23B ddnn -- Return r '6b// I-r sHrNVr 6n$ A3DA DDE5 6t+ 66 6B 6e ?D66 A3E/ 6c DDE5 5n ?Dl6 e3n5 f,27/ DDE5 7z ?D/6 Z4 ?6 7B A3C2 DDE5 ?Dg6 A3EC DDE5 74, 7C 7E ilzgl g2 A3F2 Bll DDE5 B6 ilf,nn ?Dl6 trtINl,S: -r-a- II -rr 9 random # selected X screen l ocat i,on Y screen location I N -=V --E IIR --T -I 6:Dgfl -n BA 5n1B -T BC 3BgT L2A5 BE ?,ero -- Feteh random amay el ement Ltflll Try again if zero in array r238 -- Go to R3 ALliB MIIYE - Computer amay 3E /26/ 6z B FClE F665 3c 5E ccgF A41 3A BB --l I-r 7 2B 2A 2C l6 Start loop e olult Fg 55 Put / to 9 in array temp Increment loop eount //t Exit on 10 eount 3,//s I222 -- Go to R1 6//fl Set z,ero to store 5Me, Start. loop at next loeation 6//il Return X screen location Y screen location -- VB=1 means player wins -- Go to MYI/UIN 2,OB/O9 ,r9 /zgl 9Lt' DDE5 96 9B gA A3DA DDE5 ?Dl6 gc /zal A3Eg DDE5 ah I2C2 MYIUIN I 3c6t 7Dfl6 BB BA A3CE DDE5 BC 7Dg5 A3C2 BE T'IXIT g CA CC CE A3AA DDE5 ?Dg6 DDE5 o4 n6 DDE5 D2 ?Dl6 aSe6 GETIN I DE /znl E2 nll EB INPUT I EA' FB FA FC FE --S E -t- /lsn new game -- Return -- Y 0 --U zndc DB DA r'6 D-0 A3F,f, -rr /znl F2 SHYOU for key - start -- Erase screen //E/ ggEE c6 rll -- Do L rddA -- Wait I CB SHYOU /zpl -tE -F DDE 5 c4 EC EE a-- DDE5 e6 n6 \ Go -I sw/ B2 nll Indieate end of game to TUXIT VC= f means computer wins Return for no wi-nner --l 22CB A3CB DDE5 ?Dfl6 /znfl N -r- /lna AB AA AC AE DC --I acn/ A2 /zcl C2 hI ?Dl6 9E A6 i- Do SHYOU 22CB e3o4 -- 92 Return Ir- -- X screen position 6nM Y s ere en pos it ion uLtilg Do not erase on first pass T2EB -- Go to INPUT r4z9 DDE5 -- Erase prior input 5D2B -I -t- pzds |z'fr/ 1zEB 8320 z 266 ttlait for input key Try again if zero -t- -t- Go -tF F- Gttr/ 8242 32/fl 128 F3 B -r- -t zg DDE5 Bt+34 ITI to v3-v2 Add 5 --t -t IIYPUT Skip if key ( Go to INPUT Show 10 eurrent input 2,OB/og . 20 itti6z 'gLt, SHR0h[ r i6 fl8 gA pos pos ition it i on 22C8 -- Do SHYOU 6D/g -- X screen pos 6AilB Y sereen pos ition ition F3'tg T2 Mla -- fi 2356 7Df,2 18 A3BC DDE5 1A 1C 1E DDE5 gFNE z5 DOINV ?B 2A D01 r r g39z /t3/ 6tlF -?$I flnn F11E -r/5s t6 sltl t3zA 3B 3A 52/F 3c rgr 3E D02 7 ? AgL r 4z TTFF alll Ll,Ll, B 46 ll8 F21E Ff,65 4a ilteE llc 4E F11E Fg 55 3LgL 52 D;11,fl lt5/ DISPN 5B 5A I /finn 6c6L 6t'/t F11E DSr /tez f,l9E Ff,65 6t9z 5/tf, 56 58 6CFfl Fg29 5A DDE5 ?Dfl 5 5E -I Return Do save r save memory pointer Start loop counter Inerement eounter Do RESTR r restore memory pointer Add array offset Feteh eI ement -- Temp - amay origin Add array offset -- Store in scratch array -- Exit on number mateh Go to D01 -- vz=/ Increment array pointer -- Inerement dest j-nation pointer -- Decrement array pointer -- Temp amay origin -- Add offset Fetch array element Do RESTR - restore memory pointer -- Add offset Store element f est f or end of count down -- Go to DOz Return Set wirrner flag Set array pointer - loop count -- Add offset Do SAVE r save memory pointer -- Do RESIR - restore memory pointer Feteh array element Do SAVE r save memory pointer Test for number match -r A41 B F11E Ffl 55 3z It+ 6c -I I- 2E 64 --M -r- 2c /xg 5z MINE Do DISPN 43C2 r-E 2t+ 5E I- ?D/6 /tzl 22 5c Do DISPN I- -I * 5Ll r-t cd ?D/2 6E 56 -- Return X screen -- Y sereen -- YOUR BB /c /t+g 66nn '6bdd 6E'd/ A3F8 2355 -I -I -F -t- -a- a- -I -a- II T- -tI I- -Ir FI III Reset wirrrrer flag array number ?$L -- Increment loop c ount a- Show 2,Oa/09,2L ltz fl ?6 78 MycHS MY: r 7A -I /tBfl B2 B4 ts- E- B6 BB -E BA BC E- BE E- SA\E /lnn -I 93 94 e5 97 AF 9B 99 5F 1F gA 98 gc RESTR: FB AF -F el n& AA Yr AC AE o: PLO F STR F INi' F SEX 2 -- GHI 6 PHI F T- AA Ag F LDI 9/ -- GLO A -- STR F -- SEP I+ 4r' A7 AB fl/ -E E- E- LDI 9/ PLO F LDA F -- PHI A -- LDA F -E E- PLO A SEP 4 BBsil zdz,d z'flfu ?/88 BBBB s6 u: BC M: BB BA wgg BBBB BBBB ? BE clt -r- BA t6 C6 I- llr' e& A5 GHI 6 PHI -- GHI A E2 96 BF A1 A3 -lEI 5F /vl /tcl c2 efl o4 9F e& E- BA 9D /n/ B2 -E BF FB Return -- SEX 2 E2 96 gA 9E -F Go Return -aI 7E 9Z to DS $/A -- P oint to top of array 73FF -- Decrement pointer ALl/B MIIVE - array origrn F3rn Add pffset Fil6 5 -- Fetch element g;/tl -- Look for sequence mismatch Go to MY L37 B V1 =vfl ul/ ALtdS MIIVE - array origin e{es -- Skip over el ement zero Fg6 5 -- Fetch el ement one g;/tl Look for mismatch Invert at next s equential # WM -I f,6nn 7C /sgl -- Test for end of array 3LgA L35E 7z ?4 Bgg BBDB A BBB E: CB Lr BBl/ FB86 rdria F,Bdd Bltil z,ag/og, zz \- /lcA cc CE /3Di Sr Dll Wr 8BB8 A8A8 DA Ir ?gzg DC DE ? 8d8d ea// D2 D6 D8 9n/ n5 ?lil8 F/F/ 5/// 2,il2,fl N, /// 88C 8 A898 8,2 Elt 7 8Bg 88// v: B888 Rr F 8BB EE /rlFZ Tr FSAd Fll FBzfl zdzd E8 \frffi EA EC r'5 . edlfl z'fl// ,qa ffiffi: PROGRAMMING HINTS by H.C. Will IV "Patching" is a term used by programmers when they wish to get 'something they missed into their progran. This is accomplished by doing a jr.mp (or call) to a location where the missing instructi,ons are stuck in. This is useful when you mS.ssed one of the first instructions. After conpleting a progran' save it on tape and then use one of the VIP drawing prograns to create a message or picture that you want to be -displayed. Reload your program artd save it and the display page on tape. From then on, whenever you load that progra"n from tape r Vour message or picture will be displayed at the end of the load. Remember, when designing your display, that you must leave room at the bottom of the screen for the monj.tor to display the ad.dress and the contents of that address. Since the display page must be saved along with the program in one shot,' this method will cause all recordings done this way to be the sane length (i.e. 8 pagbs for a ?K nAU Vtp). Hint - when you aoirt lqlow how many pages to load of a progran on tape, try load.ing 15(f) pages, Even if the progran is only one or two pages long, the entire length will be properly read j.n. Stop the tape when the tape light and Q signal come oDr - Tom 2,OB/09 , ?3 SOFTWARE CHANGES AND OTHER GOOD STUFF by George Ziniewi BMMM in ez, CHfP-B to be the index for the braneh r To a1Jow any variable change : to EZ F/ to BD 01A4 from FB A5 s FXF2 code in Vol I , j-ssue 10 ( page ? ) you can eontrol the starting variable for FX 55-65 instruCtions and. let any variabl-e be added to the BMMM ad.dr€ss r Then using John Berurett The following FXF2 BMMM EYE, E]E sequence r will work I -- RD.O=VX -- ttlhere X = variable to index wlth CAPTAIN . Give the Figure Shooting at Moving Target better seoring a hit by giving him .an ele r 02AC chanc es of from 7C to ?4 CHIN UP ! Correct the faee in Dot oll0C from 84. to 86 Dash REVERSE VIDEO is a MLS (Machine language subroutine ) to swap aIl- bits white to black and vice versa. Just caLl with the instructton /U// where M is the page address of the IIILS. The routine can be entered into any memory page beginning at byte /f. 98 REvvD r GHr RB r Load display page ( s ) start /vt// 01 BC PHI RC 02 FB 01 LDr #t rload. # pages (of or aZ) Oll AD PLO RD 05 FB 00 LDI #O rload display start address 07 AC PLO RC 0B 0c REVV1 LDN RC ; Get display byte Here ! 2,OB/O9 , 24 Irrtlg OB 0c OD OE ;" FB FF 1C 8C 3A 08 1,1+ Dl+ ";-;;" 2D 8D ;;;;" #$FF INC GIO RC RC RC DEC RD BNZ REVVl 3A 08 10 11 72 xRr STR 5c GIO RD BNZ REVVl SEP nII ;;;; ; i Invert lPut baek ; Loop till done All pages done? ;Return I ;";;,, f) A hardware Reverse Video for fuLl sereen instantaneous reversal. It will use three chips and four bytes of software. Z) CHIP-8 courpatible music (approx" 30 bytes) with the slmtax; A_l point to music string/f,_; Bo to music MLS. No display off commands required and. one byte incLudes frequency and duration ending the string with f,F, A 60hz interrupt beat provides interesting effects. AIso, there are 15 preprogra^uuned frequencies in the look up tab1e. CHIP-8 single-dualjetc. TexLdisplay with control connands. 3) (Less than e pages incl-Uding charaoter-map). Included wil"l be l+5 characters with home, line feed' carriage returnr tone, delayr wait for keyl and user defined controls, 4) Time Lapse Controller for electri.ca1ly operated movie cameras. 5) Simple control for up to 8 electrical- appllances. 6) Adventure style galae where you hunt for treasure. 7, Sinple CHIP-8 Character Designer 8) Color 0rgan, Standard CHIP-8 color control, real Kalied.oscope. 9) MLs tibrary EDITffi'S N0mr Georger you really have some good ideas. Thanks for the modifications and the above inspirationst - Tom 2.OB/O9 ,25 vP-551 Four-Channel Super Sound Expansion Package Four Channel Music Synthesis For The COSMAC MicroComputer N Four lndependent Sound Channels Note Frequency, Duration & Envelope Control Data Cassette Wlth Two Music Programs Four OctaYe Range Versatlle Four-Channel Soltware \r-i The VP-551 Four Channel Super Sound Package includes a VP-551 circuit board, a VP-576 Two Board Expander, a data cassette with two music programs and an lnstruction Manual. You will be impressed with the music playing capability of the COSMAC MicroComputer Super Sound with this added four channel synthesis. Each channel can be programmed for frequency and note env€lope independently. You can create four part harmony or a melody with chord accompaniment or the illusion of several instruments playing at once. Tempo is adjustable with an on-board potentiometer. The all new four channel software allows you to transpose your songs up or down over a two octave range a half step at a time with just the stroke of a key for each half step! But that's not all . .. program up to eight songs at one time and select any song, select any sequence or randomly play any of the programmed songs. You can continuously repeat the songs or you can play them through once. The caref ully written, well organized manual shows you how. lt includes a source code listing;music tables and addresses, and as an additional bonus, the classic, Fuga of Bach, as a programmihg example. Operation of Four Channel Super Sound requires your VP-71 1 or expanded VP-11 1 MicroOomputer, your VP-550 Super Sound board and any stereo systern. 2.O8/O9.26 [RG/L yj:l*fl'puter ITFE by Tom Swan Plenty has been written about the game of IIFE. For references see Scientific American, 0ctober t97O where the gaae first appeared in Martin Gardner's.column on page t?O, (f was lucky to find a mint condition copy of this issue only last year tuclced away in a corner of a used book store" I held ey breath as I paid the too-good.-to-be-true price of 5AQ or so,) If you can find a copy, check out the RCA ad on page 55, It's a public rel-ations thing about "... a monster. The computer." entitled "Are they for us or against us?" Computers d.o "exactl1i'what they are told, " says the ad, 0h yeah? John Conway invented LIFE. Computers proved that Conway's simple rules of living and dying have practically unlimited research possibilities. Each cell in the two dimens j.onal world is surrounded by up to eight neighbors. The cond.itions of those neighboring ee1ls plus the cell und.er consideration determine whether that eell will live, die or be born on the next generation of all cells. The rules are! if a living cel1 has exactly two or three neighbors 1 ) Survival it will go on living 2) Deaths if a living celI has four or more neighbors it will die from overcrowding. If a living celI has one or no neighbors it will- die of loneliness. (Can you stand it?) 3) Births if a non-livi-ng (empty) cell is surrounded by exactly three neS.ghbors, a living ceII will be born in its place. Else it will go on non living in the next generation. The VIP display is the world of LIFE. In this version the world is actual.ly spheri.cal with each edge and corner joining the opposite. This provides complete wrap around, and some unfortunate collisions occasi.onally. White bits iepresent living cells while dark bits are the non living or empty oD€s. Whgn ygu. flip to run, any pattern previously placed into memory page $0400-$04FF will be acted on according to the rules of LIFE. You are actually seeing two separate pages because $o5oo-$o5fn is used for page switching to smooth out the animation. The program will run with 2K of nemory of rnor€. You may enter patterns using the write mode of the VIP operating system- to depoBit cells into the world at $o4oo. A better way is to use ong of the video drawing prograrns. The one in the VIP manual will do, but you must enter the folLowing change so that the drawing is d.one on page 4. 0238 fron 0J to 04 Even better would be to eombine the two progr&rlsr but this has given us hours of fun in this forrn. Actually I forgot about this progran and just found it on the bottom of a pile of papers. It was ny 2 ,OB/Og . 2? first machine language program written about the same time that the VIPER was having its birth pains, springing into I,IFE. LISTING 0000 go 10 B6 20 3t 00 30 tlo A? 50 FF 6o FF ?0 D6 80 3t 9O FE AO Bo FE 3t Co Dll DO FE Eo All Fo 76 oloo Z6 83 A5 AA AC AF FB 81 81 FB 46 BD FB OI} B? BA BB BE F8 05 BF A4 FB 11 A5 FB 01 AD FB 2C A3 5F BF FB FF 3A ?E AF BA FF og DD BA FF 01 A7 DD BA FC or A7 07 A7 FB oB AD DD BA FC 09 A7 oB A7 BA FC oB AE 95 FE FE D6 A1 FB o2 Bz n4 FB FF A2 E2 FB D3 6g 3B 1F FB A7 DD BA FC .07 FB oB AD DD BA FB oB AD DD BA B5 FB T5 t6 07 F8 15 A6 oE D6 FB 35 All oA D4 FB 5t A& o& FB A4 o? D6 oE D6 oA D4 FB 5t A4 Dll FB 3r a4 0? FB 3T All o? D6 OE FE D6 OA FE DI} FB 5T AI} D& .57 A4 DI} FB FE D6 OE FE FE D5 OA FE FE DIl, FB A4 o? FE FE FE D6 oE FE FE FE D6 oA FE FE FE F8 5I All Dll FB 3t A4 07 FE FE FE FE n6 OE FE FE FE D6 oA FE FE FE FE D4 FB 5t A4 D4 FB 3t o? z6 ?5 z6 ?6 D5 oE z5 z6 z6 ?6 D6 OA 76 Z6 Z6 D4 FB 5r A4 D4 F8 jt Atl 95 D6 FB T5 t6 07 Z6 Z6 3B 1F 00 T3 gF 2A 10 15 F6 zo 4o 1A 30 00 00 4o 9A 50 30 0158 olFF D6 FB T5 A6 OE Z6 z6 Z6 n6 15 1C FB 5t All n& FB 3r all 30 35 oo 0o 0o 00 00 FB 0o oo F8 00 83 00 00 00 73 5o ?z BA B? BE BB FO 00 00 00 00 00 :: not us ed. 0 200 D3 a? r'6 95 ?E 85 30 oo oZ FE 30 10 D3 FE 38 t5 1C FE 38 L9 1C FE 38 20 00 00 00 00 00 00 00 00 00 00 00 30 D3 FE 38 35 1C FE 38 39 t5 FE 38 oz5o D3 85 FB oo 32 58 Bc FB oz 32 6o 6o 0F FE FC 01 5F FB 00 A5 AC lo 50 OA BA 00 B3 00 00 15 38 rL FC 01 33 00 00 00 00 00 00 BF FB OO 03 00 10 1C 00 00 30 1C AA AF 0c 00 00 30 10 oo 00 00 00 30 30 oo Bc FB 03 3A 5n oF FE 30 64 2,OB/09 ,28 PROGRAUIMING HINTS by H.C, I1UiII IV (in voice) on tape, before each program, the pr.ogran narne, number of pages and the place where documentation and/or directions cart be found (tfris aids in the location and use of taped programs and the VIP Monitor overtooks peoples voices).. When debugging CHIP-8 programs put a D//f instruction in place of a current instruction to see if it is being executed. If the instruction is being executed, junk will appear on the scr€€rrr This i-nstruction can also be followed by a "jump to itself" instructi.on. This type of debugging aid is helpful when trying to find out which instructions are being executed, if they are being executed and in what order they are being executed. It also aids in finding out whether "SKIP" instructions are "SKIP"ing or not. A jump to the beginning (or end) of the prograrn can also provid.e the same results. An even more interesting implementation of this debugging tool is to call an assemb-l,y language subroutine that in turn does a jurnp to the monitor (89f,9) so that you can look at where the CHIP:-8 variables are stored. This "tool" is Record referred to as a breakpoint. SPACE WARS SPEED by UP Tom Swan The following modifications to Space Wars in PIPS FOR VIPS I will cause the phasor fire to go faster. It also speeds up the target's ability to take evasive action, so watch out! 038E 1582 ; Go to Patch #t -o3Bl+ I58B osie 7A o5B2 84 85 88 BA r Go t o Patch #Z FB IULS TOGGLE subroutine switches FB ; CHIP, B interpretQr between D4 oo ; h Lgt/I ow speed,. FB oo BF r 05?6 r AC AF 0F 663F Dgo 0576 OOEE - switch to high speed from phasor sub instrueti-on ;Patched Patch from Return #t - go f ire phasors ; MLS TOGGLE CALL - switch to low speed r ( instead of iumping subroutine from Return r CALL TOGGLE MLS back 2,OB/09 , 29 SIMPI,E SIMON ADAP TATI ON by Tim Longcor There was a printing error in the original code of the Simple Simon game by Pete Kellnerr'VoI 2, Issue 2t at Location 032C. It should be 5780 instead of 3780, After I got the prograrn runni-ng' I decided I would add skill Ievels and a\ time limit for responding. At the beginning of the game hit key 1 through 4 for whatever The winning sequences are skill level you would like to try" 8r L4, 20, ana 25 respectively. - If you take longer than 4 seconds to respondr you will Iose. The speed of the game now increases after every fifth note rather than every note" The rest of the program operates the same as the origi.nal. 03?6 56fi 03 50 23ro 0288 I2C0 0200 1332 037 B vZtg 0352 6505 0354 ? sFF 03?A 56Lg 02D6 1382 o 20 B I20C o21A 22BA 0230 ry\ C 0232 23rc 0234 r2o4 0274 12?6 02?6 D6B o2BA 55rr' o2Bc F5r5 O2AA T2B2 o2B2 F 5o7 o2B4 35oo 0286 0332 FooA 0331t 690A 0336 4oor o33B 69oA o33A 4o 02 o33C 6goE o33E 4o 03 o34o 69LL+ WLt z 4oo4 Wt+t+ 6g1A Wt+6 22Eo o3ll8 6600 o34A L2O2 o34c 57 90 o34E ooEE 0356 22t+o o35B 35oo 035A 1354 03 5C FooA 035E 4ooF o36o Izoa 0362 4ooE 0364 2320 0366 13 5c 0368 4z o 5 o35a 660 5 o36c 4zoA o36n 660A o 03? 2 037 o3?4 o37C B15o o37E 811E 03 Bo r27 A o3B2 23to o3 84 r2oo 47op 66oF 42il+ r2gg FLIP=A-ROUND This game shows the numbers 1 througlr p in a random sequence. The object is to arrange them in order from Left to right in the l-east nunber of tries. An example of how the program works is as followsl Suppose "2?Il+85396" is the starting sequenceo Pressing key J will give you "84t725396o" Note tfrat only tne first five numbers "f1ip-a-round." After a few triesr fou will begin to catch orrr o2oo 6o oo 6I oo 6z oo A3 oF F2 55 A2 F2 Fg 65 A2 FC CB 03 CC 06 BB C4 llB oo T2 T4 A2 FC 10 F9 55 6A oo lro 20 FB 1E F0 6 5 0o !2 711, A3 06 FA 1E 7A 01 Fo 55 2 .OB/O9 ,30 oz3o llo 50 6o 00 A2 FC FB 1E oA 4n oo rz 4o BB Eo 6n 0o A3 05 Fo 55 7E FF 3E 00 FB 1E FB 55 A3 rz FA 33 30 01 T2 EE L2 EE l4 05 T2 EE L2 EE 38 09 L2 EE 6o FE 70 80 go AO Bo 30 a7 rz AC FO OA co 6z 0D A3 o6 Fo 65 Do Fll 1E l4 09 72 C4 EO D1 z5 77 05 A3 TT FO T2 llo oo 01 02 03 F0 55 BC EO 3A og FB 65 L2 54 3r 6n oA Fo 65 A3 o6 A3 o6 02 a6 EE EE FE 1E 35 22 BA 00 E0 F0 zg 6L 28 Fo 65 o& 05 72 L2 rz Lu 5e 00 22 BA Bc D5 3F 0o 12 A3 17 7D 01 FD FB 1E FB 65 A3 FB 55 7A 01 A3 32 03 12 EE 33 16 0? 12 EE 37 6o oo 6t lro 12 00 00 E0 D1 25 77 05 6z 18 A3 10 F0 zg D1 25 o5 a? oB og F1 18 70 6U. oo 6r &o 1E T2 OF ol+ OB 01 o9 Zb 01 A3 o6 Fo 65. Fo z9 00 EE 22 BA XX XX XX xx ASCI I encoded keyboards as low as $esl The RCA VP-601 keyboard has a 58 key typewriter format for alphanumeric entry. The VP-61 1 ($t S additional.) offers the same typewriter format plus an additional 1 6 key calculator type keypad. Both keyboards feature modern flexible membrane key switches with contact life rated at greater than 5 million operations, plus two key rollover circuitry. A finger positioning overlay combined with light positive activation key pressure gives good operator "feel", and an on-board tone generator gives aural key press feedback. The unitized keyboard surface is spillproof and dustproof. This plus the high noise immunity of CMOS circuitry makes the VP-601 and VP-61 1 particularly suited for use in hostile environments. The (eyboards operate from a single S-volt, DC power supply, and the buffered output is TTL compatible. For more information contact RCA Customer Service, New Holland Avenue, ' Lancaster, PA 17604. Or call our toll-free number: 8(Xl-233-0094. rrGfl 'Optional user price. Dealer and OEM prices available. 2,OB/O9 , 3L vP-3301 PRELIIVIINARY INTERACTIVE DATA TERMINAL M icroprocessor Gontrolled Color Graphlcs Low Cost ASCII Encoded Programmable & Resldent Character $et This professional quality terminal is suitable for a wide variety of industrial, educational, business and personal applications requiring interactive communication between computer and user. Microprocessor intelligence and LSI video control integrated circuits bring performance, features and flexibility at low cost The character display format, 40 characters by 24 lines or 20 characters by 12 lines, is software selectable. Each character or all characters may be displayed in one of eight colors (or gray scales on B/W display). Display background may be one of eight colors (or gray scales on B/W display). There are 125 resident displayable characters or you can define your own characters - Greek letters and other foreign alphabetg, graphic symbols, large graphics building blocks, playing card suits, unique character fr:nts, arrd "little green men". Reverse video feature creates visual emphasis on single or multiple character, words or lines. The terminal communications interface is industry standard asynchronous RS-232C or 20 mA current loop with six switch selectable baud rates. Switch setgctable configuration control includes line/local, upiier case only, f ull/half duplex, data word formatting, plus two control code options. A built in tone generator, used for aural keypress feedback, can be programmed for end-of-line bell, error messages or even music. The terminal utilizes modern flexible-membrane, key switches with a light positive activation pressure. Contact life is rated at greater than five million operations. A finggr-positioning overlay combined with the positive keypress action gives good operator "feel". The unitized keyboard surface, impervious to liquids or dust particles, combined with high noise immunity CMOS circuitry make this unit particularily suitable for use in hostile environments. The base band video output can be directly connected to a 525 line color or black and white video monitor or with RF modulation to a standard color or black and white TV set. A wall receptacle type 5 volt 650 mA power supply is included. IRG/il THffifl'PUtEr 2,OB/09,32 lnlrrtctlvr Dete Trrmlnel Sprdllcrtlonl - [PnllmlnrryJ VP-3301 KEYBOARD Formrt 58-key typewriter format keys (Switch clorures). - includes two user-dofinable INDICATORS to Sond: LED on when "cleer to send" trus, acts as power on Glur indicator when "cloar to send" not used. Brll: 250 m sec. audible tone. Erron Beeping audible tone indicate input or output overrun. Kry Swllchor: Flexible membrane, polycarbonate material. Rollovcn Two key. Urr Drllneblo Kryr: Two SPST switches (30 V, 0.1 A, 1 W max.). Kcy Lllr: Greater than S-million operetions. DATA FORMAT Audlo: Onboard speaker gives aural keypress feedback. Also provides bell and error indication. Programmable frequency. Codr: ASCII (American Standard Code for lnformation Cherrctrr Sol: Standard Ugper/Lower Gase - 128 codes generated: 95 printable characters selectable. CL Drtr 33 control characters Brrrk Kry: - 102 codes gonerated: Causes continuous transmission of binary state zero. DISPLAY Scnrn Formrt Software selectable, 24 lines of 40 characters or 12 lines al 2O characters, one page of data. Chenc'lcrFont 5 x6 dot matrix in a 6 xSblock, descendersfor lower case characters. Roldmt Cherrc'lor Sot S2-upper and lower ceee alphabetic characters, 1 O-numerals, 32-punctuation and math characters, 31 control characters (Switch selectable control character display for program m in g convenience). Urr Drflnrbh Chrnclon: Any bit pattern in a 6 x 8 character block may be set with a command control sequence. A total ol 125 characters may be defined at one time. Cunon Blinking revorco video. May be set to mid-blinking or turned olf with a command control soquenco. Rrlr: 1 10, 300 baud; switch selectable. Gontrol Slgnrlr: Request to send (output signal), clear to send (input signal), EIA RS-232C compatible. DATA FORMAT - RECEIVE tcthod: Asynchronous; serial-by-bit; serial by character. Codc: ASCII; 1 start bit,7 data bits, 1 paritybit-ignored, 1 or2stop bits. todc: Switch selectable. EIA Drtr Reto:110,300, 1200,4800,9600, 19.2K baud; switch selectable (Clear to receive signal must be used for data rates ) 300 baud). CL Drtr Rrlr: 110, 300 baud, switch selectable. Chereclcr Relc: 508 character-per-sec max. Control Slgnelr: Clear to receive (output signal), EIA RS-232C compatible. COM MUNICATIO}IS INTERFACE EIA: RS-232C compatible, 12 V nominal output signal voltage. t Rovcno Yldoo: Control character turns rovorse video on and off permitting one or multi character, word, or line rgvgrse video. Chrrrclrr Color/lntrnrlty: Choice of 8 colors or I space), 1 or 2 stop bits. todo: Switch selectable: half or full duplex, line/local. EIA Delr Rtlc:110,300, 1200,4800,9600, 19.2K baud; switch lnterchange). Upper Case Only (Switch Selectable) 69 printable characters 33 control characters - TRAl{SilIT llcthod: Asynchronous; serial-by-bit; serial by character. Codc ASCII; 1 start bit, 7 data bits, 1 parity bit (odd, even, mark, or levels of gray scale. Currcnt Loop: 20 mA to 60 mA max, voltage capability 30 V max. todr: EIA or current loop switch selectable. Connrcton 25 pin, female, subminiature "D"-type" Beckground Golor/lntrndty: Choice of I colors or 8 levels of gray scale. Srrlel Vldro: Composite color video line, NTSC compatible. PHYSICAL 1.0 V p-p ipto 75 O termination. Slrc: 13.1" L x 7" D x2" H. Shlpplng tilclght 5 lbs. approx. Vldro Connoclon Female, RCA phone plug. POWER USER CONTROL Swltch Selcctrbfr: Baud rate, current loop/RS-232C, line/local, upper case only, full/half duplex, parity bit-even, add, mark, or space, 1/2 stop bits, control execute ON/OFF, control display lnput: 5 V DC @ 650 mA nom. from included 120 V, 60 Hz wall receptacle type power supply. Swltch: Power ON/OFF, ON/OFF. Control Chrnclcrr: Back space (cursor F), linefeed (cursor l), upline (cursor t ), fore space (cursor-r), carriege return, horizontal tab, bell, clear screen, home cursor, delete, reverse video on, revsrse video off. Commend Control Srqurnc.l: Character color or gray scale, background color or gray scale, locate cursor, clear to end of line, clear to end of scFeen, define character bit pattern, keyboard ON/OFF, display format (40 x24/20 x 12), cursor ON/OFF, display ON/OFF, define command control delimiter, tone generator. RCA MicroComputer ProductslNew Holland Avenue Lancaster, PA 17604 ENVIRONlTENTAL Tcmprrllurc: Operating: 0 to 50o C Storage: -40 to *85" C Humldlty: 90% RH @ 30o C, non-condensing. Vlbretlon: 3-axes I - .3" p-p, 5 to 14 Hz 39, 14Hzto2KHz Shock 3-axes - 50 g, 11 m sec, 1/2 sine wave. Printed in U.S.A./3-8O vP-3301 2.Og/09.33 VIP Keyboard by Doug Wo1-f This program turns your VIP into a four octave keyboard. The program uses the Sinple Sound Board VP595. It uses CIIIP-8I which ls CHIP-8 wiith the following changes:. starting at 01A4: 86 FA 01 3A AC E5 63 D4 E7 45 FA 01 3A F2 63 D4, and starting at 01F2: 3F EZ 68 3F F5 D4. To cover four octaves two keys are used to either increment of decrement the octave presently used by the keyboard. The keyboard: L23c 456D 7898 AOBF is equivalent to: D/l x Ell ell DEFG A B C (htgheroetave) A# X C/l (l-ower octave) Variables V0=frequency select Vl=key input 1, no note V2=octave V3=key input 3 V4=key input V5=key input V6=key input V7=key i.nput 4 5 6 7 V8=key input 8 V9=key input 9 VA=key i.nput A VB=key input B VC=key input C VD=key i.nput D VE=key input E VF=key input F, (note duration) no note is pJ-ayed (no keys are pushed). Tables of notes start at 29O. The four octaves are in sequence. Each octave is in this order: 00, D#, xX, F/1, D, E, F, A, B, C, A/1, Cll, gtl, e. When MI=00 InitLaLLze Values 0200 6101 V1=01 0202 6200 V2=00 0204 6303 V3=03 02A6 6404 V4=04 0208 6505 V5=05 0204 6606 V6=06 020C 6707 Y7=A7 020E 6808 V8=08 0210 6909 V9=09 AZLT 6A0A VA=OA 02L4 6808 \IB=08 02L6 6C0C VC=0C 0218 6D0D \ID=OD 021A 5E0E VE=0E 02lC 5FFF VF=FF 0218 6000 V0=00 Scan Keyboard 0220 0222 0224 0226 A290 Notes I=290 E 1A1 If (Vl*hex k.y) skip F 118 T=29L E3A1 for If (v:#hex k"y) skip 2,OB/O7. 3+ 0228 F31E T-293 022A E4Al If (V4#hex key) sklp 022C r41E I=294 022r. E5A1 lf(vs#hex key) skip 0230 F51E T=295 0232 E6Al If (v6#hex key) skip 0234 F6LE T=296 0236 ETA1 If (v7#hex k.y) skip 0238 F71E T=297 023A ESA1 If (V9#hex k.y) sklp 023C F81E I=298 023E E9AI If (V9#hex key) skip 0240 Fg lE T=299 0242 EAAl If (VA#hex key) skip 0244 FA1E T=29A 0246 EBAI If (\m#hex k.y) sktp 0248 FB lE T=298 A24L EcAl If (VC#hex k.y) skip 024C FCIE T=29C 0248 EDA1 If(VD#hex key) skip 0250 FD1E T=29D Scan Keyboard for 0252 EEAI rf(\rErthex key) skip 0254 1278 Go to 0278 Subroutlne to 0256 EFAI If(VF#hex key) skip 0258 L284 Go to 0284 025A, F21E I=I*V2 Select octave Check for Octave Change lncrement octave No Key Pressed O25C F065 VO=MI Get tone O25E 4OOO lf(v0rl00) skip 0260 L27O Go to 270 Subroutine for No Key Pressed Sound Generated 0262 8100 Output port=VO 0264 FF18 Tone duration=VF A266 L220 Go to 0220 Subroutine 0 0272 027 4 ,O27 5 027 for No Key Pressed 6100 V1=00 Fl18 Tone duratl-on=Vl 6101 V1=01 Reset Vl I22O co to 0220 Increment Octave 0278 027L 027C 0278 0280 0282 422A rf (v2*2A) sktp L22O Go to A220 72AE Y2-Y2+0E EEAI If (VE*hex k.y) skip L27E Go to 0278 hlalt for key release L220 Go to 0220 2,OB/O7. 35 Decrement Octave 0284 4200 If (v2#00) skip 0286 L220 Go to 0220 0288 72FZ Y2=Y2+82 0284 EFAI If (vF#hex key) skip 028C 128A Go to 028A Wait for key release 028E 1220 Go to 0220 Note Table B0 D2 49 62 0280 2E 29 0288 20 22 02c0 13 lE o2go 00 0298 DE 02A0 88 02A8 7 5 00 EB 5D 41 26 00 18 94 C6 53 45 3E ls 19 BB 84 4E 00 37 55 lD A6 8n e 28 34 12 18 7 9D 00 6F BB 3A 16 10 FD 58 68 24 31 L4 I1 The New York Amateur Cornputer Club has annor.rnced the creation of a regular "Computer Faj-r and Flea Market" to be held on the first Sunday of each month. Conputing systems exhibiting applications software, computer company vendorsr r€pr@sentatives from local computer clubs' wiLlbe there. Meetiogsr lectures and tutorials on hardwarer softwarer business systems and beginneret classes wil-l also be held" r Irving Plaza 12 Irving Plaee (corner of East 15 St. NYC.) TIIIEr 11am.to 5pm. Lectures from 1pm. ADMISSIONT $1,50 DATEST March 2, April t3, May 4, June 1 For more information,r contact Daniet at 212-263-3003 or phone the New York Amateur Computer Club at their "Hot Line" number 864-4595. PLACE sET cARRr/ILEAR by cARRy Tpm Swan The 1802 rnachine language instruction set contains no instructions to dlrectly set or cLear the one bit carry register DF. Normally, the procedure is to rotate a zero or a one Uit from D into DF bui of course this will change the value in D. A sirnpler and shorter method is given beIow. To clear DFr ADI $OO ;Add 0 to anything sets DF = O To set DF r SMI $00 ;Subtraet 0 from anything sets DF = Notice that only DF is changed by either of these commands the value in the D register is not disturbed. 2,OB/09,36 7 VIP TINY BASIC MACHI$TE LANGUAGE SUBROUTINE by Andrew A. Modla SeveraL vlP computer hobbyists have expressed a desj,re to call nachine language prograns from TINY BASIC. Although hooks to machi.ne language programs were not desigred into TINY BASIC due to space limitationsr there is a way to execute machine language prograns. The technique fakes a new statement tree and when executed by BASIC, call-s the machine language program. Statements have the following internal formatr Binary line No. i !a a Length of Statement Statement i! type code ; ! S ourc S e tatement i D End of Statement ! 2 The machine language program resides in the source statement area. To eonstruct a machine language progratn, do the following steps: ) Clear the statement area by tlrying NEW. Z) Enter the following two BASIC statements: 1 G0r010 2 REM 3) Holding down Key E enter the VIP operating system by turning on the RUN switch. You will be modifying memory as follows: f ADDRESS ffi L2T3 DATA 1300 fhis is the new free memory address ED l,ine 2 statement length Cll Machine language statement tlpe L2T4 LZI| to 1232 4E PrintabLe Character E (fiffer) 0E Causes inner interpreter to enter machine 1233 language Your machine language program starts here L234 0D End of statement code 1zFF The machine language program must end with DO 03 08 99 which cannot extend. beyond. location 12FE. This means you have L99 decinal bytes available for your machine language subroutine. 00 and 0D cannot be used in your ML program. To load 00 into D use 9t (cnr 1). ll) Holding down the baekspace key on your ASCII keyboard, turn on the run switch. This proeedure prevents the loss of your BASIC prograrn. Add the following line 3 r REltrRN Your BASIC program begins with line 10. You call the machine language program with a GOSUB 2. 2 , OB/O9 ,'3'? fhe following information is useful for writing maehine language r programs , f) The Ml, subroutine program counter is register 5. Z) Use only registers R?, RA, RB, RC, RD, RE, and RF address of the variables and must not 3) R5.1 conti be 4) fhe"rt"""ii""tlt8olage display starts at location 1OOO (one page) 5) The'variables A-Z start at location ttU? (two'bytes per variable) 6) The aruay A starts as the free address in 11BE 7) The stack occupies the last page of memory and the low order portion may be used for storage. (Page address RZ.1) 8) The BASIC source program starts at IZOA, LITTLE LOOPS by Tom Swan PRII\M TIIIIE just finished building a bul-lring right below our window it's painted bright red and yellow and orange, and it's the icing on the cake of our now brown Mexican countryside. Here 'chey are more like they do not have bloody Spanish bullfights rodeos though there is far more drinking, taco eati-ng, laughingand shouti-ng in the stands than ther:e is action in the ring. This has absolutely nothing to d.o with this month's column, unl-ess you want to compare a Mexican's interest in rodeos with my interest in BASIC language programming. Every eouple of weeks they have a rod.eo, then everybody goes back to normaL. Every once in a while, I write a program in BASIC (even on our new "baby" in the house, a^n APPLE II, I'm more interested in machine language progiamrning. ) Problem is, I seldom go back to normaL. I donlt want to sound too "ho-hum" about BASIC. It offers a good way to learn prograrnming and judging from the number of read.ers letters and articles this month, a lot of you own VfP Tiny BASIC Board.s. iHtp-8 is also an excellent languige for cutting-your programming,teeth. Though it lacks the readability of a d.ocumented BASIC program, it is more suitable for use on a VIP computer. the following program is straight from an algorithm (that means a procedure or plan for a programming task) from Vol 1 of The Art of' Computer Programming by Donald E. I(nuth r page 143, It generates a list of prime numbers as many as you ask for up to the limits of your il€rrorlr variables size, and patience. One interesting line (#ttto) gives the remainder after a division provi.ding the function X MOD Y which is not in Tiny BASIC's vocabulary. You may leave the REM's (remarks) out without affeeting the program Notice that the little b's with lines through them are spaees (b). They . 2,OB/ag, 38 But what lf you don't have the BASIC board? In that case you will nscd to progran in either 1802 machine language or CIIIP-8 probably. In fact' that brlnge ne to the point I would llke to make. There arc tont of BASIC programs out "there" and only a few klLos of CHIP-8 prograns (we're doing our best to change that). .Because BASIC ls fairly easy to read and. understand, even if you don't have the board, you should try to pick apart a few BASIC programs. One thlng that may surprise you is how easily a BASIC listing tranel,ates into CHIP-8| At first this may seem to be awkward, eepecially if CHfp-8 j.s new to your Here are a few suggestions to help. BASIC - BASIC - Less apd greater thal CHIP-8- cHrP-B- PRINT Printing numbers is not difficult but words are another thing. Those of you with PIPS FOR VIPS Vol- I can use Messager to translate PRINT statements to CHIP-8. Otherrlrrise just leave the PRINT lines out or simplify them graphically using DXYIII instructj-ons. VF:-:-33"tli'iil:*i::J: (x:Y). ;::';u:tt"; Ti.rTnSl J33l*r"" - Subscripted variables (e.g. A(N)) CHIP-8- Define a memory.area.to hold the aruay BASIC of nr:mbers 3?l:ixii*H?i;?ii:, ti:ii:ll:i: $i'I,ffi}' instruction which sets Yi"# = A(N) Insert Y/ = VX into A(N) *tiil-toSS instruction, - MuLtiply and divide CHIP-8- \rlpite- sirbroutines in CHIP-8 these functions. BASIC or machine language for l^lith these four suggestions and your VIP manual, you should be able to convert PRIME IIME to CHIP-8. One problem still remains, however' When you PRINT something in BASIC, everything else scrol-ls gP to naEe room for the new line. That is not.so easy to simulate in CHIP-8, so next month I suppose I have my work cut- out for me! Good luckl PROJECfS r 1) Convert PRIIUE IIME to CHIP-8. il Speed up the BASIC LISTING by using TVON, TVOFF instructions. After all primes have been calculated, print out a neatly formatted list from the amay (A(N) instead of one at a time. z,08/09 , 39 Contestr First person to write to me with an explanation of what "cHrP-8" means wins a free cHrp-B game (undocumeniea uut wiit j-nstructions) never before publish6d. in postmark ties, the first correct answer t iee wins. r figured ""*" ofit o;t-::-'"""-v6"e (Even Rick Simpson doesn't ffi* feas{ that,s what he told me!) NorTerryr $ou are not eligible. ---at PRIXE ,TIXIE LISTING 5 10 20 30 35 llo 4S 4g 5o 55 5B 59 6o 7a BO 90 g4 e5 99 100 110 111 TT2 T13 REM REQUIRES CIS VIP TINY BASIC \ PR]NT ''HOW MANY PRIMES '' INPUT X X<2 T}IEN 10 IF PRINT PRINT ''OK. HERE GOES! '' REM FIRST PRIIM IS '2' A(1) = 2 REM J IS NUMBER PRIMES FOUND REM N IS ODD cANDIDATES (T-,TTn IGNNEDY AT THIS poTxT) PRINI "1 = 2" N=j d-l_ J=J+1 A(J)=u REM OUTPUT PRIIUE NUMBER -'---. n( } i ;; REM TEST FOR DONE IF J=X TItrN 999 N=N+2 REM NOW DIVIDE CANDIDAIES BY REM PRIMES FOUND (A(K)'S) SO FAR REM Q IS THE QUOT]ENT REM R IS THE REMAINDER K=2 Q=N/A (K) ;l=i;;- ;RiN'i r74 I20 t30 t4o R=N-Q*A(K) r49 REM PRrnm PossrBLE? (ny'o) t5a IF R=0 TIIEN 110 r59 REM PRIII{E? (Qs=pRnM DIvISOR) t6o IT Q(=A(K) THEN 80 r69 ,REM N IS NOT PRIIUE 170 180 999 li=r*f c0T0 130 END LAST MONIH''S ANSWERST f) Wipe Off Modifications -- Auto Speed Up (plus auto restart on Key 0 at end of game.) Load CHIP-8 lnlipe Off and normal CHIP-8 as listed in the VIPmanual then enter the fol-lowing. 00Ac 0218 -I 0234 a;iz - Switch to Hi- speed CHIP - B 67OA, ;V7=0A Optional -- # bal1s = 10 for higher Ec - 1300 INII t3t} TIIUE challenge to initialize V8,V9 each baLl Jump to speed eontrol during play Jump 2.OB/O9 , 4O 1308 CHNGE oac I 1328 RSTRT oi6o rNrr 5 804 I V8=Oll o2 6goll I V9=ob olt FFOA ;ttlAIT o6 1?:'6 RET1 o3o I CHNcET 48oo ;SK/o OA 1318 C2 0c 3900 ; SK=0 to increase speed each paddle Jump to restart on Key / -- end of game ozgc Jump hit -I r ----- V8=speed--vaIue=starting speed V9=increase--va1ue-fpaddl-e hits Patched instruction from 0234 Return from INIT patch to increase If speed / O, jump to O3OC If speed = O, (friehest speed) Jump to exit ff increase 1 0, then jump to speed up OE 1316 c1 If increase / O, jump to d.ecrement Vp (no speed up) 031 0 6g04 ;v9=04 -- Reset V9 = fpaddle hits to each increase T2 Speed up ball by factor of 1 TBFF rVB-1 1,4 t31B C2 Jump to exit $ C1 r 79FF Y9-I -- Decrement V9- no speed up this paddle hit A?CB BAIL -- Patched instruction from O29C 1B CZr 1A I29E RETa -- Return from CHNGE patch TIIIER = value of VB (auto decrement) 031 C TIMEr FBI 5 ;Tf=VB FF07 i VF=TI -- VF= current timer value lE T1 I 20 3F00 ; SK=0 -- When timer goes to 00, skip to exit 22 ttrE irr -- Else loop to test timer again A?CD PADDL -- Patched instruction from OZUZ 2I+ 26 rz44 REr3 -- Return from time patch o32B RSTRT I FFOA ;WAIT -:- Wait for any key to be pressed '24 If Key /, stip to start new garne 3F00 ; SK=0 2C I32B RSrRT -- EIse loop back for another kelpress 0080 ;ERASE -- Erase sereen--prepare for new game 2E Jump to begin new game T2OO BEGIN 30 NOTE I Ihese changes eause the Wipe Off ball to speed up once every four paddle hits until it flies at top speed. There are four speed changes overall . fo vary these para:neters, change the values of the following loeatioh,s . Also please note that the change to Ioeation OZ1E is optional I prefer a shorter 10-ba11 game, but you may select any number of turns you wish. LOCATIONS OF INTEREST o301 0303 Starting speed of each ball (0O=fastest) hits. to each speed change -- r 3II Number paddle 0 -- o3og (Value at A3O3 must equal vaLue Top speed of balls (0O=fastest) at 0311 ) SI]PER DENSE WIPE OFF VARIATION In addition to the changes above, the following create a d.ifferent action filled game. (NOTE: Addresses are not sequential. Be gure to enter the changes at the right addresses.) 0202 oza5 020c 0?* 0284 a2cc 5A0A r VA=0A r- Change to 10 rows of dots 5g0B tVB=08 -r Change to II columns ?ao6 ;v0+5 -- Spacing between each column TIOZ ;V1+OZ -r Spaeing between eaeh row Lt 6Dc ; sK/oc -- 9oEo Chanse sc or€- -DC = 120 maximum Do t s / o ICD=P addl e Dat a7 o zCC= 2,OB/O7, 4L \ 2) F UIIS TOGGL I 800 e ompletelJ relocatable TOGGL r BF FSAC PLO RF LDN RF AF OF xRr FBEC STR SEP 5F D4 NEXI LDr $oo RF LDr $AC PHI MONTH r $nc RF R4 Set RF to $O0AC--address ; inside DXYIV instruction ; in CHIP- B interpreter ; Get byte e $ooAC ; Flop from $nC to 00 , or 00 to ;Put back to change speed ; a , $nC ;Return SCROLL UP FOR THE MYSTERY TOUR CORRECTIONS CORRECTIONS CORRECTIONS CORRECTIONS OH NUTS CORRECTIONS VoL I ISSIIE Lt, oCT . 19? B PAGE II "Non Video 0perating System" by Joseph Cza jkowski contains an error in the schematic. The correet p in c onne e t ions f or the HP 50 B2-? 340 displays are! pins # 4 and ground; pin to Pin of to the top enable. display is #A #5 #5 ineorrectly hooked to ground, in the printed s ehematic . vOT, 2 ISSLE 5 NOV. 1979 PAGES 2,05,16 and 2.05,!9 "FootbaLl" by ! glut^',*gmT,lt ";l"fi"rors '/W/ ia/z not relz Frarrk Awtrev c ontains Thanks to Tim Longcor ' theSe little for weeding buggers out. Just a quick note that may be of interest to other Elf'ers who enjoy the VIP modifieation in issue #9 April 1979. In addition to the emor previously brought to your attention l,oc " 8104 should be 3E not JF - Irve discovered that some of the longer prograns in the RCA game manual crash because they get into the CHIP-8 display page relocated at page 7, To correct this change the instruction at l,oc. 0CF0 from FB07 to F808. A11 works wel-l- noWo - Walt Pinner APOI,OGIES to never have to do a combined. issue - but here is just exactly that. f had pneumonia for three weeks j-n February and early.March - and no sooner did r recover from that when m! $SqSnter (who lives in California) had a real catastrophe itt n6" life and I had to fly back to be with her for the next two so the result wasr no newsletter in March. sure hope thisweeks. big fat issue helps make up for it all. Terry we had hoped 2,OB/Og , 4Z MORE IINY BASIC MACHIIIE I,ANGUAGE SUBS by C. D. Smith Recently you received a procedure from Andy Modla for adding a nachine language subroutine to the ROM based VIP Tiny BASIC' (Part number W-?OO). I have enclosed a procedure I developed using Andy Modlars memo to allow calling sever4l machine language subroutines. I intended it to be self explanatory however, if you have any questions about its use please contact me through the VIPER. IM 0000 i 0000 t 0000 t 0000 t 0000 t 0000; \- 0000 t 0000 t 0000 t 0000 t 0000 i 0000 ; 0000 i 0000 i 0000 t 0000 t 0000 i 0000 i ffiffi1 1233 0E r I23Ll r234 I234 I23LI , VIP TINY BASIC MACHINE C oo13 r , 00il+ ., o0I7 NOTE .. .. CODE 0023 . a024 0 r 0025 . r 0026 .. 0027 !. 0028 .. 0029 \twa.7 ! Tlm ABOVE THREE STATEIIENTS I\,IUSI BE ENTERED EXACTLY AS SHOhIN. E)ffiCUTE T}IE VIP OPERATING SYSTEM BY RESEr/TffiY E/RUN rr 0018 o r 0019 . . 0020 . , 002I oo22 MODIFY MEMORY AS r oRG F0I,LOI/US #t233 '#on T}IE USER PROGRAM CALL STARTS N0TE ETTHER r. . . . .r . .. . . o Lzt+5 i r!. I. \.- IzLt6 t 1246 t sE" oo39 0040 . OOI.I,2 .. HERE 3 USER PROGRAM CAI,L MUST NOT A #OO 0R A #OD, . tnt+ F812BFI 0030 VIPUSRT LDI A.1(IPC);PHI F LDI A, o (tPC ) rPL0 F 1237 FB3BAF; 003t 0032 SEP F I23A DF; 0033 .. I23B ' 0WLt VARZ=#IID7 I23B 0035 ., L23B tDI A"1(VenZ);PHI E 0W6 fP Cr I23B F811BE r LDI A.0 (VARZ ) IPI.,O E L23E F8D9AE; 0037 r+EB LDA E;PHI 5;LDA E;PLO 5 7241 548A5 t 00 38 1245 D5; RELEASE TGOTOlO 2 REM A MACHINE TANGUAGE SUBROUTINE. 001'2 . . OOT6 BO-01-OB INITIAI NEI/U o OOt5 .D. SMIIH LANGUAGE SUBROUTIIYE BEGIN BY INITIALTZING THE STATEMENT AREA BY ENTERING o o TryLT r234 T4L[ La.)a 0001 . . 0002 r r 0003 , . 0004 r. 0005 r. 0005 .. 0007 o . 0008 .. 0009 .o 0010 o 0011 r 5 00M ., USER PROGRAM CAtt ENDS HERE 2,OB/O7, 4l CONTAIN oo43 oo44 oo45 ooll5 LZLl,6 TzLI6 r246 LZLl,6 L2l+6 Lztr6 o&o3o B; T2L+9 OO. /./) 724A oDi I24B a , T24B , LZll,B , r24e t TaLIB IzLl,B I24B r24e L24e 11 BE TTgO LT9O TT9O TT9O TTgO a a , I , I , a , L27 5 T2T 5 r2r 5 rzr 5 Lzr 5 T2T 5 T2T 5 T2T 5 r2r 5 Lzr 5 L27 5 r2I 5 Lzr 5 T2T 5 r2I 5' T2T 5 I2r 5 1,2I 5 1,2r 5 T2T 5 r2r 5 r2r 5 I?7 5 Lzr 5 r2r 5 o oo49 a a , a , a , a , a , a , a , a , a , a t a , t , , t I , I , a , I , a , O , a , a , I , t , I , a , a , a , a , i 400 F811BF ; tho3 FBDgAF; 1 t$o6 gr5F1F; 9 D \ oo54 BASIC: ORG * oo55 .. oo56 o r OO57 . O oo6t , cnr BASIC CoNTINIIES FRoM IIERE 005r o. a , PRoGRAM BRANCH TO ENDING : rr oo52 . r oo53 0. 0058 .. a gRG IIrTH A tONc LDN oo , MUST END 0050 , I24Bi NOTE: YOUR MAcHINE IANGUAGE oo48 ENDrNcr sEP 4,#0308 a 72r4 cUi T2T 5 r OOI+Z a , L2T3 38t Lzr 5 .. .. .. 59IvExT ! oo6o oo6z 0063 oo64 o. .. .o MoDrFy NEXr BASrc STATEMENT TOCATION AS FOTLOWS onc #r r 8n ,A(gAsrc ) MODIFY STATEMENT AS FoLLows 2 I,ENGTH AND TY?E o. oo65 one #tzt3 oo66 IENGTH !,A.0 (nAstC-r,nucgit) oo67 TIPE z ,ffcV oo58 . oo69 , o 0070 .. o OOTT I oo72 ..' oo73 .. oo?4 ., oo75 .. oo76 . . RESTART BASrc ENTER A By Rnsnr/nacrseecnr/nutt RETIIRN STATEMENT AS FOLLOVfS 3 RETURN FoLIohIED By A BASIC PROGRAM OO77 . . r . . . . . . . r . . . . . . . . . . . . . . . . . . r . . . . . . . . . . . . . . . . r . 0078 .. oo79 .. ooSo o. 0081 r. 0082 ro oo83 o, oog4 o. 0085 . o 0086 ,o oo8? o 0088 r. 0089 , . 0090 , . o OO9T I I OO?Z .. 0093 . EXAMPLE 5 REM LET Z=ADDRESS 0F SUBRoUTII\E(BASE rO) 10 Z=5!2O 15 cosuB 2 zo PRINT z 25 G0T0 10 30 END rs rlIE TEST nr'4 nouttun Tlm STATE oF EF4 rs TESTED AND VARIABT,E Z IS SET TRIIE IF EF4 Is TRIIE AND sET THIS FoR THE HoME EI\nrIRoNX[ENT MONITOR. FALSE OF EF4 IS FALSE. r ooglr .RG 5120 oo95 EFTEST : LDI A. 1 (VARZ ) ;PHI oo96 LDI A.O(VAnZ);PLO oo97 cHI 1;STR F;INC F F F 2,OB/O9 , 44 t4o9 oogE 3FOE I 1ll0B F8011 1ll0D 5Fl 14oE co 1 zt+6 t BNI} EFEXIT rDr #ot 00 gg 0100 0101 EFEXfT !+Lr t 0102 0000 STR F r tBR ENDTNG END \ Extended Oisplay Subroutine by C. H. Anderson CHIP-8 calling sequence! Point rrlt' to data set describing object to be displayed 0300: Ca].l extended displal' machine J-angruage routine FxFy: VxrVy coordinates fo: the object Data format: starting at MMM NB: Number of bytes on each line NL: Number of lines Data: NB*NL bytes describing object AMMM: Register Al-location: R6.O: CHIP-8 variable pointer; shift foop counter R7 : Used to hol-d bits in shift operation RA : Memory pointer for data block, CHIP-8 ,J, pointer RC : Display memory pointer RD.O: Loop counter for bytes displayed on each line RD.l: Storage for NB, number of bytes on each line RE.Or Counter for lines, initialized with tU, RE.1: Storage for number of shifts (Vx ,AND,, 07) RF.O: Storage for the starting value of RC.O on each Line RF.l: Hit Flag; initialized to 00, changed to O1 on hit Ttre stack is used to store the carry ovef bits_of each sbiEt gperation. 0300 0 , 22 | 45 A6 :06FA07 S06FA3F OA !F6F6F6 s Decrement Stack : R6 points to Vx : V>@07=XL; put into RE .1 s Vx@3F; ensure ob ject is on display : divide by B and store on stack 301 03 o7 BE 52 Ls 45 A6 o6 FE FE E2 FB o0 BF 7E LA 1D BC FE AC 9C 7E BC 0 30E 10 0320: BC F4 AC 24r 9C 7C 0C 0328: 4A BD 2A: 4A AE AF BC AC BC R6 points to Vy A*Vy put into RC.O Clear Hit Flag;0O+carry put in RC'.1 2* (4*Vy) put into RC .0 Put high bits of B*Vy into RC .1 Add vx/8 into RC.0rput it Add 0C into RC .1 Store NB in Store NL in RD. L RE.O into RF.0 too Extended Display Subroutine NEW LINE O32C : CONT LINEO331 : FB 00 s2 00 34: 9E A6 36: 4A 87 LOOP 0338 A7 3A 30 4T 97 F6 87 3D B7 40 26 76 cont) Put NB into RD .0 ( counter for bytes Clear stack Clear R7 .0 Put XL into R6 .0 ( shift counter) Data byte put into R7 .1 GotO SHIFTENT \ Shi f t contents of iR7 . 1 to right Shift carry over bits into R7.0 9D AD 2El, F8 ( A7 R6- ) 1 If R6.0 is not zero goto LOOP : Add carry over f rom last byte to R7.1 o344 :SetXtoC 47 EC 4B : Test for hit, if not goto WRITE F2 32 4E 4B FB o1 BF : Hit Flag =0L WRITE 4E : Write byte to di splay with ''XOR 97 F3 5C : Store new ca rry over b te on st u"U E2 B7 52 51 (Increment RC to next byte on line, test for and correct X wrap a ;ound ) : RC.0+01rdo it ttris way so Rc.l doesn't/ 0354:8C FC 01 Ac change : 58: FA 07 3A 60 @O7rif not O goto CONT ' : Move Rc.O up one line on displa v 5C: 8C Fr OA AE SHIFTEI\TT IIT 3A 3A 97 F4 87 B6 : RD.0-01rif not O qroto CONT LINE CONT 60:2D BD 3A 31 (write last carry over bits on ]-ine) : Get carry over byte 0364: 87 : Test for hit, if not goto WRITE2 65: EC FZ 32 6C : Set Hit Ptaq to O1 69: F8 01 BF wRrTEz 6c: 87 F3 5c : write to display with "xoR'!' 6Fr E2 : Reset X to 2 (Move RC to next l-ine, test for and correct Y wrap around) :NL-L, if 0 goto EXIT O37O: 2E BE 32 87 74t BF FC Og Fc eF : Get first value of RC.O on line r rrrove to next linerstore new RC.0 in RF .0 : RC.l+carry 79r 9C 7C O0 BC : -(0C+04), if not 0 goto NEW LTNE 7D: FF 10 3A 2C : Reset RC to top of display 81: 9C FF 04 BC : Goto NEW LINE 85: 30 2C EXIT 0387: FB FF A6 BA: 9F 56 I : : i R6 points to VF Store Flag in VF, Increment stack BD: 00 D4 Idle; Return Upon returning from the subroutine I=I+(2+NB*NL)+1.With BC2 L2 DXYN f=I There are no limit.ations on the values for NB or NL. However, if NB is larger than 0B or if NL is longer than the display the object will write over itself. The routine will work wit.h Ben Hutchinson's 1ZBH by 64v circuit ( vrPER vr r , p9 7 ) with the f ollowing changes , which are facifitated with a NoP ( E2 ) r have at 031 3 . gei_ 0 35E 19; _937 6_1 0 ; 0 30e z The four pages of memory asslgned to the Al-splay a7e assumed to start at 0C00. To change to a new page address (pCa), replace z.oB/09.U6 with PGA at 0326. Inaddition, for the y wrap around to work it is necessary to chanqe the value at 0378 to pcA+04. 0C Extended Display Subroutine Options-Comments Calling sequence and data format options: ' (1) Fx and Fy can reside in the data setrpreceeding NBNL, by changing 45 to 4A at 0301 and 030E. (2) NB and NL can follow FxFy in the program by changing 4A to 45 at 0328 and 032A. (3) There is room to set Fx to a fixed vaLue in the subroutine. 0301: F8 Fx A6 06 FA 07 BE 46 FA 3F F6 F6 F6 52'82(nop). The variable VY must then be the next CHIP-8 variable after VX (VO and V1 for exampl-e) . This routine will work with the original CHIP-8 1 page display or the 2 page display if the value at 037E is changed to PGA+01 or PGA+O2 respectively, where PGA=the top paqe of displgy memory._* There are times when it is desireable to superimpose the data block on top of what is al-ready present without erasing anything. To do this change F3,XOR, to FlrOR, at locations 034F and 036D. It is interesting to experiment wittr the other logical and arithmetic operations at these locations. A more useful option is to simpl-y write the object over what is already on the screen. This is illustrated in the accompanying exampJ-es. To impJ-ement this option put a NOP instruction such as 5c or EC at locations O34F and 036D. NB is l-imited to 07 with this option. The IDLE command 00 located at 03BD stops aLl action until an interupt is called and hence can slow down a program. It can be rgpltced yith a relufn D4. When the 4 page interrupt such as Tom Swan described in VIPER(2,06.O4) is used ttre program will continue while the display acLion is occuring. It is possible that the program will ctrange the disptay memory before it gets displayed, usually toward the bottom of the scre€rr. This may cause funny things to happen such as odd blanks appearing, especially with the IDLE removed. Sometimes this can be cured by synchronizing the program to the interrupt with judiciously placed IDLE caLl-s. This j-s done with a machine language routine consisting solely of OO D4 t.hat i s called brr the CHIP- B prosram . 2 , OB/O9 .4? rf the number of bytes in the data block is more than about 16 then motion becomes jumpy because each byte must be shifted over 7 times : when the lower 3 bits of vX-are Ll-L and not at all when VX ends in 000. Extended Display Subroutine ( Examples ) These sample programs use Tom Swanrs HI-RES bHIP-B routines (VIPER 2.06,04) and will run with 2K of memory. They use the option that V0 and Vl are the coordinates r so be sure to make that change before entering the programs. The first writes and erases the object with the standard XOR option. The second demonstrates the smoother flicker free motion obtained using the overwrite option. The object is one of the many interesting ones I have found that can be made with the bar shaped dot. 0244: 6010 6110 A2B0 0300 6E00 7EA2 EEA1 125A 4E0A l24c L24E 025A: A280 0300 4EO2 71-FF 4EO4 70FF 4EO6 7001 4E0B 7101 l24B Data describing object (2 bytes wide-14(Hex) lines high) 0280 z 02 14 00 00 03 00 0F 00 Move the object around BB: 1E 0o 3c oo 7c 0o 7F Fo using kevs 2-4-6-8 ' 9o: 7F F0 7F 0o 7F oo 7F FB 98: 7F FB 7F 00 7F 00 7F FO A0: 7F F0 7F 00 l_F 00 0F E0 AB: O0 00 To change this program to ttre overwrite mode first put. EC at 034F and 036D, then change the jump aL 0252 from 125A to l25E so it skips the erase commands ttrat are no longer required. Note that the object has rr0' bits surrounding it on all sides and it is only allowed to move by increments of 1so that no rtlrr bits of the previous frame escape being erased Chicken Crossing the Road Routine: Leave the extended display subroutine in the over write mode and try the fol-lowing animated sequence that uses the feature that the I pointer is not reset after calling the subroutine. 60FF 6205 A2BA 0300 0244: 6303 6000 6169 A2B0 0300 6160 0258: F315 F4O7 34OO 125A 7001 -72FF 3200 1256 L252 Data: O2BO z Q7 01 FF FF FF FF FF FF FF FF ..road 02BA: 01 09 06 7D 3E 1C OB 18 24 42 63 ...Frame #1 0295: O1 09 06 7D 3E 1c 0B 0B L4 24 36 ..+2 02A0: 01 09 06 7D 3E Lc 0B 08 OB 0B 0c ..#3 02AB:01 09 06 7D 3E lc 08 0B 18 L8 lc .,#4 0286: 01 09 06 7D 3E lC 0B 0B L4 24 36 ..#5 same as #2 VariabLe V3 set at 0244 determines the speed of the action. 2 ,OB/O9 .48 ' SCRT JTIMP TABI,E by Leo Fo Hood In the PIPS FOR VIPS, I noticed that use is mad.e of the Stand,ard CalI and Return subroutines. Below is a short progr€rm that when used with the SCRT allows subroutines to be accissdd with a table lgg!:tp. This iump routine is useful to me in implementing additions to my disassembler progrerm, The routine fakes tf,e return address in Register 5 and jumps to the desired routine through the nornal subroutine return program. The original calling locatj-on is of course saved on tne stack prior-to the jump. The pertinent cod.e for calling the JITMP prograrn i-s included, but not the actual table since thtt is depen-itenI on the applicaiion. JUMP SUBROUTIIVE 27Co c1 c2 JUMP 96 r cHr 73 GLO 86 ca 73 c4 48 c5 52 c6 90 c? 14 c8 86 ll8 R5 STXD I,DA RB STR R2 GHT RO ADD PHT c9 tDA CA A5 cB R5 STXD PTO SEP D5 R5 R8 R5 R5 EXAMPTE 2722 23 25 26 28 '29 2A 28 *** 2C 2E 3L 3z 3t+ 35 37 38 39 38 3c 90 FC o7 B8 F8 5o AB 8B r F7,- Gt0 ADI FC ,02 ***2730 4B GtO BZ SD 32 DO F5 32 3E 88 2741 #ar tDN XRI FB 7F A8 98 RO STR 52 08 7C B8 3o D4 30 3E I{EXT GHI ADI PHI TDI PI,0 00 2g o7 c0 o3 JilIP ! R8 #50 RB RB R2 R8 #zr #oo #n RB #oz PI,0 GHI ADCI PHI RB BR #zg R8 R8 #oo SEPII #o? co BR #al tDA R8 t R0 c ontains addres s t of relocatable code rRB used for index r to table tRB used for temporary storage t of command code i7F is end of tabl e r D0 is location of Error routine ; Compare command eode to r table entry branch if equal t If eommand not found r jump to : llext entry ', '! t"n ,tttr ; CalI JTIMP tWhen routine has finished r return will be to this location which branehes to beginning of the ro_utine .which is not showrr. (Soruyl ; ) 2,OB/09,49 NON-COMMERCIAI ADVERTISING SAIE3 Keyboard, Rad.io Shack 2??-L17 with I/O boara and connectors for VIP. F. H. Bremer, L75 W Albanus Street, FOR Philadelphia, PA 19t2o (Zt5) 455-6576 SAI,Ez VP-550 Super Sound Board with manuaL and cassette. fj-ne, but it isn't what I thought j-t was. . $40.00 Jerry Krizek (?Lj) 338-2696 after J:00 PI\4 California time FOR lnlorks SAIE: VIP, VP-590 (Color) and VP-550 (Supersound). A11 the manuals, Volumes 7-, 2, and 3 of PIPS FOR VIPSr and approxinatel-y 25 game tapes. $400. I got an APPIEI Bob Brock, (301) 730-0922 before 9100 PM Eastern Time. FOR * NOTE: We will print smaLl "want ads" such as these for. free, but they rnust be strictly non-eonmercial. They are for your information orrly, and we can't vouch for their accuracy or legitirnacy. The ad.vertisers listed here are VIPffi subscri-bers. *ATTENTION* ARESCO is attempti-ng to get out of the hardware retail- business, so wetre selling our stock of VIP products. Here's an inventory of the material- we have on hand, along with the prices we're asking for each piece. Theycll be sold on a fi-rst-come, first served basisr so you might want to caII in your ord.er with a Master Charge or VISA number. NOW! RCA VP-?LL COSMAC VIP Microcomputers VP-111 Microcomputers.. Same as VIPr but user must install I/O ports' system expansion capability' and 5v power supply. Sound Board. Simple VP-595 3 $tzg B0 2 2 ' 27 44 2 vp-3510 Sup-er Sound. Board s Z6 t vp-S?o Mehory Expansion Board 2 VP-585 Keyboard. Interface Card. for hex keyboard +3 199 gg 30 49 95 L5 59 20 99 ?o 49 vP-SZS Exiansion Board L7 Two-Board Expand.er vP-5?6 3 80 2 vp-SeS EPROM Programmer Board L7 to VP-71I Keyboards ASCII Cable: vP-620 5 35 39. 5 vP-?Oo Tiny BASIC ROM Board In addition, we have about 50 sets of Volume t of the VIPERT whj-ch we can sell for our absolute printing & postage cost of t have a few loose $12.00, and a few VIP manuals.. r........We youtre missing an i-ssue, back issues from Volume I VIPER, so if per issue .20. i-s $1 give us a ca1l. Our cost will not be publishing a vol-ume 3 VIPER, due.to circumstances we cannot control-. If there is anyone out there who woul-d like to take over the effort, 1et us know about Your and werll let you know who the past subscribers 3.r€. Our tharrks to all- of you for your support! See you in May! - Terry ARESCO 2.OB/O9 .50 KE]BOARD RESET by Steve Medwin I've made a siurple modification to the RCA ASCII keyboard that turns the "User #1" key into a reset key" This al1ows you to reset the VIP without flipping the run/reset switch" All you need, is one resj.storr art edge-card board for the expassion interface a;1d some wire. A schematic follows. user 7 eontaets on keyboard RUN M VIP +5v I {-l - EXPANSION INTERFACE To use r The reset/run switch must be left in run. Then to reset the VIP, just press artd release the User #1 key. TINY BASIC DISCONIYECT SWITCH by Randy Holt the Tiny BASIC board is inserted into the VIP Expansion Interface connector, it doesn't permit the VIP to execute CHIP-8 or machine larrguage prograrns. I disliked always taking the board out to run other progransr so I made the modifications described beJow. The double-throw, double-pole switch will operate in BASIC in one position and will permit CHIP-8 and. machine language routines'in the other position. Change the positi-on of the switch onlv when the VIP is in the RESET mode. 0n component side of board, cut track between CD4515 pin 10 and the diode, and between connector pin X (8ooO) and CDP1833 pLn 2t as shown on the diagram. Solder wires as shown to the DPDT switch using plated-through holes wherever possible. I affixed the switch to the upper-right corner of the Tiny BASIC board. When 2 ,OB/09 ,5L TINY BASIC DISCONNECT SWITCH ( continued ) (oeorspr"cH) omAcll BAsrs OAACH carTSACf,.HSI' r1 afi rtlcF ,'IEPE IAdld) EXPANDED ROM MONITOR by Randy Holt Wouldnrt it be nice if you could replace the stZlAyte VIP ROM Monitor chip with a 2048-byte EPROM that would then p.ermit extra ROM space fof a more sophisticated monitor and/or be used to store some of your favorite subroutines? It turns out that with just J cut tiacks and the addition of ll wires to the VIP board, you can have this capabilityl The VIP ROM Monitor chip wilt stiLl operate in the U1O socket; and when a 2715 EPROM is installed, it will exist in the stand-by (tow power) mode unless it's addressed" The VIP EPROM Programmer card can be used to prograrn the 2?t6. 2,OB/09,52 EXPAIIDED ROI{' }IONITOR solder s lde conponent slde rL uto tracks here na0 nAl ,,,A2 Revlsed Sehenatle + I I 2 t t2 a tbtstlr, vlI t^A+ ,tA6 naO NA? A' Ato 43 +{ry "::3 sldc, cut traeks fron +5VDC to U10-18 eut the track fron U10-12(CND) to wlres as follows I ( (A10) ^e) together other 2.OB/09 .53