bt l98l-January 1982 Volume 3, Number 5 Journal of the VIP Hobby Computer Assn. I'he VIPER was founded by ARESCO, Inc. in June L978 December ****tt**************************************************rt****** Contents VIPHCA INFO \, SOT'IUARE \, ...................................-..... 3.g5.gL Step by Step by Tom Srrran ...,..... o .3.9!5.92 A Single Stepper,/Trace Debugger for CHIP-8 ADVERTISEIIENT . . o . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ? . . . . . 3.05.10 \; READER 'I/O, UTILITY \, TUTOR ADVERTISEMENTS CHIP-8 for the IAL READER \, APPLICATION COSI'IAC VI b I/ O , SCFTWARE ELF Machine Code: Part 4 "\7 ADVERTI SEMENT o r.. o....... 3.05.11 by Lgo Hood o........ 3.05.12 by Paul Piescik . .... 3.85.16 .... 3.95.24 .......... eaaaoaoaooaoaoaooooaa 3.05,25 P Autoca I I System by Geroge S. Gadbois Drivlng a Baudot printer wlth the VIp by Gerald Krlzek .... 3.95.32 3.g5.gg \, rirr Ihe VIPER. founded bv ARffiO. Inc., ln Jtrlv 1978. ls ttp Offtcial Journal of the tnp ncbbv &nputer'Association. -fc*rpufEdqdt and amreciatlon is extended to ARESCO f6r rermission to use tfF UIPER n4. $e-lssciation is cormsed of reople lnte?ested in tJre VIP ard counrt€rs us$u the 1802 microprotessor. flhe'Assoclatton ms fowrdd bv Ravrid C. Sills-ard created bv- b Oonstitution, with By-lars to dovern t]r6 oriration of the lssclation. l,tr._gi_lls iS sirviry aB Director-of the Asso3atlon, as ell as ediUr ard p$lisher of the UIPER. the VIPER will be rublished six tires Der yrear asd ent to all *s in aood standins. fssris of the VIPER will-rpf carry orer fro qp yolr- b and nast ishrs, rlrre tlpy arc another. Individual copies of tte VIPER available, mEV be sent to interested people f6r 33 each.- Irntnl dris to & tssociatioh, *trich includes six issr.c3 of the VIPER, is $12 Fr lrear. WP ant CGltllC are reqlstered trdererlts of RCA bmration. Ihe VIP Ibbbv Cornputer Associatin is in rxr rlay asaoclated sith RCA, and rcA is rpt resp6nsible for tlp contents of this hewsletter. lbmbers Should not cont&'t, tCA- reqardirn material in tlre VIPER. Please send all ineuiries to VIPfnA 32 Nn$prttriAv€ru€r East Brrnsmick, ltl 98816. lbmberstrip in tte VIP tbbbv Comptrter Association is open to all people rrho desire to bromote and eniov'the VIP and otlrer 1802 basef systems.- SEnd a cteck for Sl2 pavable to IVIP lbbby Gnputer Association' c./6 R. C. Sills a! the abovc.add?e3s. Fople outsid6 of the htted Stated, Canaaa or lexico please inclurle 56 extra fo-r postage. AII furds must be in-lDS. bllars. Contrih,rtions by nders or interested people are reloqne at anv tire. llaterial srhitterl bV wu lspublication assrmed to be ftee-of copvriqht restrictions in tte VIPER. 'ArtIcles, letters, ard will be cunslder6d'for pro<rrals, €tc., in canera-riadv form on 8,5 by ll inch paDer will be qiien consideration. Please serd enouih informati6n about any-proqra breferential -so that tlprrwprv readers can operate the proqrm. -hrlly doctruented proqrhb aie best, but drnps' bre OK if rou Srovide enolnh lnformatibn to run the in nriterial any key fiarnry locations and E5gi#a"flease'indibate lour ADVERTISING RATES l. 2. lQn;comefcial classified adg-frour n€mbgrs, 5 cents-pef rprd, at 2A words. Your address or phon6 nrrnber i3 tree.-' mininrm Comrercial. ads and ads from non{€mbers. L6 cents per mrk, rninintm of 20 rcrds. Your address or phone number'ts free. 3. Display ads from canera ready copyr $6/half pager $I$lpage. Palment in full must acccr4rany all ads. Rates are sr.rbject to chanEe. rrite to wPEn/wP[rcA, please you irdicate it is OK to prlnt vour rouyour ynnt that in letters to tte editbr, if that information ieleasEd. Otterwise, irc will rnt print your addiess in the VIPER. If address ,t I I I 1ry 1 3.95.s1 { i$ I i { tft i!l -a- ,; tr' I STEP TE STtsP Slng1a Stepper/Trace. Debqgger for your Chlp-8 Interpreter by lon Swan llhe bnga re have ln Herles vould poselbly aeem strange to you. Tlrcre ere the usual seleations of soorplorsrend, huge-epldeis oapable-of reavlng rebs of steel to catch thelr pr-y. - (Tnrs-Ifvc trled nLthout suooesE to breat only a double strand fron suoh a rab. ) &ey have a horrtble thlng called a Yl.nagrla that enite a vlnegarllke EnelL and has a deadly blte. And sons of the hakXr-qygalono.rphs (tarantulas) even feaEt on enall blrrilE and llzards. But the bugs ln ny Chlp-8 prograoa ars aLl of the unlversal type. (you Erer that ras conlng, dldn't.you?) Ore ray to a net 6i oouree)-ls io lnsert-brear cilch sieh UEffi(rfthout polnts Ln yorrr progra,nl FUn the devll up to that epot; then eheok the varlables uslng the operatlne systen to flnd then in nenory. Another ray lE to use the f,ol.lowlng Stngle Stepper program to exeoute only one instnretlon at a tlne wlth the optlon of vierlng ell' Chlp-8- varlables on youf dlaplay rhlle the prosrs,n lE nrrurl.ne. In additlon, a trace feature atlEplays TfrA EflIFffi Ef ffit lnEtnrctton to.be oxecuted so you- ean progran follow erecution flor. lhlg de&rug prograrr rorke wlth any Chtp-8 progran and nay be tneozporated lnto any lnterpreter rhether or not lt oontalng some of the nodlfLoatlons etrggeeted ln past TIIPERS. Slnee Chlp-$ 1g graphLoe orLented (ae oppoeed to an lnterpretor deelgned to nanlpulate nunberg or text) r Vou hsve the optlon of slngle etepplng throgh a progran rhl.le ratchlng the reeulte on dl,splay, or vlewing varlables wlthput dlgturblng the oontents of the Chlp-$ dlep1atrr. To run the prograar Vou need, to have an exterrnaL keyboard hooked up to the VIPre input port wlth lte strobe line eorurEctecl to the EF-l1 flag lLne. (If you donrt havs a keyboard you can stil1 use thle progran -- see end of artlelet ) \, \, t \, \, \, Nextr study the acoonpanytng Benorlr nap to deolde rhere to 0800 rhere the Chlp-8lnto buggeet you load the varlablebr vork spaee and stack are locatedt 2R syatens aoulduse 0600. Yotr nay load the Slngle Stepper i.nto anlr nenory page beglrDoing with the flrst byte.of that pa€e as tho Slngle Stepper ls pggg relooatablq. NEturally you cannot uee the stne nonorTr ar€a for Chip-E progtra'ma srgrroror Stre Stngle Stepper aIEo requires ite own display-page rhlch 1111 autonatlairlly be loeated tno pa€es_above rhichever page_ i;-being-used f;;-dlsplays by ttre ttrlp-8-ffiEEr?retg{. fhoFefore lf you f,ave a l+f sSrstenl- the debugglne display.would be located at 6pOO for nost piogrg,ns and your progran nust not exceed OCFF. put the stirele Steppei progran. ff you have 4K of nenoryp { page progran 3,95.92 L 2K syEten rould r€gulre not progra,E beyond 0llFF. 0500-07FF IOIDIT{C AI{D totelr 'neanl.ng you Eay RU}INTNC ,lfter deeldlng rhere you wa,nt the Sfugle Stepper to gsr load i.t Ln and reeor"d one page (fron rherever you loaded the pr€gen) to sav€ lt for future dehteigtng. Ioed your norual (or- other) 0llp-8 lnter^pretar and your problen progran Just as ueual. You Eey run the progfan subJeet to tba,aeDorTr resEidttons desoilbed vlthout-dlsturblng the Slngle Stepper. lls eall the Slngle $tepper lnto aetLonr enter the foll.owlrrg ohange to your Chip-8 inter?reter after of eourse loadlr,€ the Slrrgle $tepper lnto nemorlflr F8 lC XX lD 83 OOTB I,DT PHr lE 18 rnr lF 00 0020 L3 Pto 2L D3 SEP rl,oad address of Slng1e Steppor (page add,ressr of prograu go€s here) Ln R3.1 R3 lRrt lload, 00 lnto D register n3 n3 lPut ln R3.0 l0all debqger MET{ORY !{AP LK oooo I Orf F 0100 I oooo TAITER,Pf,ETER o,t, PRoBLefn PRO6RAiA I OsFF obs DEBUO6eR D:rSPIAV REFf,ESII SilV6te STB?f,ER I -o67? O6?A I PROOR.AfN AVA'LAET"E RArv\ o6tF ooAo CASP-E WORK 5g6cE 06PF oTrF EK oo@ TNTERPRETER oaoo PROBT-EIV\ I ODFF "]o" Oc?ct ogza I DEBU66ER Drrs?(Ay REFRESH tooo sstv6tE 'l'^ sre?PeF'^ PRO6RAfN I o?g t ct+t0-8) 6IORK S?ACE PtoGNTNT AvrrtWU/e RAA^ IOFF "ro RArn oEAO sirN6r€ SilEC'ER I AVAII/IBTE I 9ECu66eR qts?r^y ftEFgeSH I aoo Avnctlot,e OEFT DISOCAY f,EFRES}t - gltil?-' *FF oDoo oFoo c$r?-g CsEq.- oD'o TAANvAL ) PRO6RAfY\ I S\nsTEM o oeTF I "r cHrP-8 Oc,}F OTIFF 600 qK svsrEl\n SYISTEiA g}II P- E I OFFF ct+:D?€ D:rS?CAY REFRESH 3.95 .93 R fv\ I FFF rtt 001c you nuEt enter the page addreEe of the menorxr area rhele you Lnstalled the stnglc stepper, rf you enteied rt 1!-QS00r then pqogran an O8-byte at 001C. If you put lt at 0600r then a,n 05 Wte goes ln 001C. Fltp the nrn sriteh upo Nothtng happenel right? press the spaeo bsr on your teyboard sevenal tines nntil you hear a b_eep. I{ow prese Key D to aetivete the rrariablee/traee dlsplay optlo!. ^Repeated preeseE sf the epaee bar slngle steps yo1ry 0hlp-8 progran one inEtnretLon at'a tlae. Feeelng Key D oalls the dleplay optlon back agaln and you nuEt alrayspress,the spece ber to eontl.nue stepplng through your progra.m. Preeslag Key D trvice ln a row'has no useful ef,feot. ltllA[ YOU SEts IS Wnt ! YOU OEt All Chtp-B narlables V0-1IF are displayed on thc screen starting ln the upper left eorner and readlng airoEs the page f,ron left to rlght. Eaeh variablel f,enenb€?' LE a palr of the hex dlglts Eo there are four rows of four narl.ables d5,eplayed. Ttre laEt fotr dtglts dlsplayed teII you the address of the next Chip-8 lnstnretLon to be exeeuted -allowing you to traee a pfograln through DoBorTr I suggest you load a Chlp-8 program that you know works (the flgrrre shootlng at novlng target gane ls a good cholce) untiL you get the f,eel of operatine the debugger. You hEve to elngle step through a lot sf lnEtruetlons t111 you see sonethinghaplentngr-but ffip hlttlng,the Bpaee bai -- sonething eventually rlll. OP[IONS progra,n iE that it takes epace. If you have external 0f course a dlsaAvantage of thls away souro Chlp-$ programnlng nenoryr I snggest you enter tbe debugger sonewhere hlgher than 0FFFr the hlghest addressabls Chip-$ memorXr locatLon. You nay alEo want to locate the debuggerte dleplay on external Ml[. {trls le easlly done by adJusttng RB.l ts the page address where you want the dLsplay to go. She followlng change wtll do thlsr OX21 22 F8 :ffi I,DI llroad page add,ress debug dlsplay ,of thie change to the SlngJ.e Stepper progran and enter the page address at 0X22 where you want the dlsplay to go. If, you entered the $lngle Stepper a! 1000-10?9 for exa,nplel you uay vrarrt the dlsplay to reELde ln the nsmorlr page et it0o-llfFi You would enter F811 at 1021 to set that up and you would oalI the progran f,ron the lntetpreten ad degert bed befsre using r10r as the page addreEe at location 001C. You may use thta Baae teehnt que to flx the debuggtng display at Malce 3.95.94 i\, t a lrnsrn loeatlon tf, ygur Chlp-$ progran r!.11 ehangc Lts nornal dlsplay arye--:_ th9^hlghest on eare -RAll pagg tn your systenr Renenber that- the Sfugle Stepper usss the 'dleplay paga- trc Irageo above (loyer addrees) than the ons cuqfbntiv uEed b!' your p.rogra,tni Ygur dlsplay page ls oorrecTffiS't, lroreier, no natter rbere lt ls by the slngle stepper after you pregg the epaee bar. lou uay use tl,re $lngle Stepper rlth the epeoLal tro-page et4lplled rlth ny book Ptpq fol vlpsr' r A tro-pad6 lltelpreter rgggltsln a cqulshed debug dloplay though tlre sl.ngle 9lEplay Stcpper rtLl only Eg ono page eyen thougb you are dleplaylrrg trol Sre botton hdff of, the dlsplay area tb sttll usable-foi prlograns and rontt be affeeted by the debrrgger. You urrst change 0211 to FF hoyever to allow off card RAt displaye -thls ronft affeet prograns and nay be left Ln ae a pemanent clnnge to the tro-page fulterpretero @-e_preblen lE that the tone generator r!.11 no longer rork ;hllc uo!.ng the Single Stepperr You nay reaotlvate tone generatlon W uaklrrg thc fo[owing ohange to the detugger pnogrant 0x08 E2 !{0P r0aneel keyboard tone Itor your keytoard rlLl operate sllently. If you have an erternal spea*er on your teyboardr vou 1111 probably rant to nake thle ehange as a pernanent addltton to the debugger. lnother problen rs that ttnlng loops rilI bave no neanlng sLnee your Brogran iE no longer operatlng at speedr and the ChiB-8 tlner (R8.1 ln the lnterrupt routlne) ls stlll wotklrrg fuLl tlne.' You mey etlll view the effect of, a tlning loop though lt r11I not probably loop the Ea,ne ntruber of tlneE ae lt rl11 rhen your progra,n runs normally. Randon number generatlon is stlll nalld and presunably equlrralent to normal executlon eondltions thorgh f nay be ua,klng an LnvalS,d aesunptl.on about the randou number generator rfth that gtatement. tny effect te llkoly to be veqr snallr horeverr and totally nonconsequential to noet gane progranE. If, you car€ to lnspect thE worklngs of the debugger you w111 see that lt duplicates the dieplay routLnes in R0ll (uslng the blt tables though) rather than talctng a Bu€gestLon frou an early VIPER to galn aoeess to theee routi.nes. Tlris was done to preseWe'RAr the Chlp-8 memerg polnter rhich ls olrangeat W the hex dlglt display routlne in ROll. I d.on't propose nrnnlng entlre progralos by slngle stepplng to see lf they rorh. $!rat rould be Eomerhat akin to turnlng the propeller of an afup1a,ne by hand to test tf the thlne fltee. AE e subroutlne developer toolr the debugger should be verXr ugeful rhen youfre not sure Just how the varlableE 3 .95 .95 got aLL nlxed qp and you want to elow thlngs dorn to a vLerable rate. You oan aIEo beat the pantE of,f of, Jaokpot by holding down the approprlate hex pa"d keys when the rlght synrbols appear. Jackpot gverlr tlnet Of, courEe lt ta,kes two weeks to play a gaaer but . r. llave fun. SII{GI,E 0x00 E2 01 22 02 gn 03 np olr 3r 05 otl 06 18 07 ot 08 A8 09 37 0A 06 0B 6n OC 0D 0S FB 20 3tL OF 18 0x10 9r SNHP ssx D8C GHI PHT 1E 3A tF |} 0ll gF 2 RB R8 INP XRI BNZ cHr 0N20 2r. 22 lilF .la 23 BB PHI 2t+ Bts PHI 25 F8 LDT stlI 02 7X=2 ln RF.l lloop.here till key ls prEssed (A) held aoilillloop- until key ls released (tone goes off autonatically) lGet lnput byte from keyboard l$est tf E hex value for spaee bar I If notr branch to next part BI{Z x0R IN R3 (on external keyboard) lsound tone whLle, key le Bll GITT RITNS RF lSave displ,ay page I,DI PIJO .rr R2 tDecrement staek polnter BNT} 11 BB PHT L2 T2 INC t'3 96 GHI 1l+ 87 PHI L5 F8 ror 1,6 00 t7 BC Pnr 1g tts I,DA T9 AF PL0 tA Dll SEP 18 F8 I,DI rcw lD 13 AND TRACE FoR CHIP-B RF lReset RB to old dlsplay page (whtch ls not affected bt thls ioutlne) RZ tReset staek polnter RB R6 IR?.1=R6.I r begln duP1J.oatlon sf Batched instrrretlons RZ , tRC.t=00 RC R5 l0et flrst half of a Chlp-8 instructlon RF lPrrt ln RF.0 (aleo in "Df' on refirrrr) Rtl lRetwrr from elngle step r:lest lf Key D pressed wlth hex l+ll not space bar eithor then D' I If f IW cpnparln€; lffaneh for a vaLid entry NF lSwltch to a dlsplay pa'ge ,l[vo nenorT pages baek from lPresent orte r,- see notes to RB lAlter this lf you have 8K or nore ln your syste& ns lAlso But thls vaLue ln RE.1 lSet RE.O = FF whlch w111 Polnt to 3.95 .96 0x26 27 28 FF 29 2A 2B 2g 00 IE P&O r8 I,DI Itsottom of the one page dlsplay aree REt page .frsm bottoo up lErase dlsplay n I : DEC REt RE' RE' BNZ , 2F 38 28 18 INC RE IRE + 1 ox30 r8 3r 8r EDI 32 33 BC PHI 3t+ BD PHI F8 rJDI lRC.l = 81 whieh w111 ad,dress the lDlsplay blts ln VIP ROFI space RC n3 lSet up RD fsr use aE a subroutlne RD lProgra.n eounter for dtsplay two 2D 2S 35 36 37 38 5E 8E 2E e3 s[R GIO GHI fl, PI,0 r8 LDI AD FO 39 3A 3B A6 ll6 IDA 3c DD SEP 3D 8E cI,0 3ts FA AT{I oxl+o 3IL pro 3r o7 BHZ ll1 42 t+6 8E GIrO Lr3 FC ADI tlll 3L 38 t+g 26 t+h 95 &B DD Irc 85 t+n DD llg jo tlr PI,0 cIJc Bl{z DEC GHT SEP Gt0 SEP BR ol* ox50 D3 sEP Pto 5t AC ANr 52 FA 53 r ll I n lDlgits = top of dieplay page agaln sub RD rset R6 to flrst Chip-8 varlable l$tored at 0Y;F0-0SF R6 R6 lBet a nariable RD I Do sub rr Dlspl,ay ? Dlgtts RE rfest the eursor (afsplay destlnation addrese) aAFID' wlth o07' to see tf c&r^f,lage t retrrrn ls needed r If not (1.e. last I+ blts RE / 0) then branch 'o eontLnue RE lBlee add 28 hex (l+0 d,eclnal) to t Brlng the cursor dorut a row 28 trs AE t+6 s5 trr ll8 il 0F RE R6 rgest variable pointer R6 blaneh back to eontinue iif / 0r- then t o, then 16 varlables R6.o i(wt'en are showrr) R6 lReset R6.1 to previous rralue R5 inisplay high pbrt of R5 (crrfp-8 Pc) RD lDo bub- - DisPLaY 2 Dtgits R5 lDisplay low Part of F5 RD lDo bub r.DlsPI.aY 2 Diglts I$raneh to point A to walt next user lConnand DTSPI,AY gWO DTGITS SUB R3 lReturn leavirrg RD at next add,ress the moment in RC.0 for ,+ blts from the Last but all istrip be dtsPlaYed RC lSave D lHex byte 3 .95 to .97 OX,st+ 73 8c sfxD eI,0 55 56 16 SHR 5? 15 SIIR 58 16 SHR 59 16 SIfR frh 73 slxD 58 F8 I,DI 5c az 5a& PIjO 5n 6a rrut 5F Fo LDX ox6o AC 6T 0c I,DN 6z AC PTO 6t+ o5 65 66 67 68 6g AT llC 5E 8E 6l r8 FC PI,0 I,DI PIO I,DA srR cI,o ADI RC lRrsh this onto the staek lset up R7.0 as a loop corutter lPolnt to eaved data on staek lPop data off stack (leaving RX where lt was) RC lRrt in RC,6 to address bits table ln ROI,I RC lGet value from tabl,e RC lRrt Ln RC.O to eddress bitE for thl.s diglt, lSet up RF.0 as a loop counter of 5 I To display entlre dlglts RF I RC lGet a blt pattern byte RE lStoro O eursor RE ln display area RS lMove cursor dovrn one byte row (of 8) l$o eontlnue dlsplaying the dlglt 08 6n 6c 6n AE Pt0 2? DEC 6E 5F 3A 66 EE-IZ 8E cI,o RE PI.,O RE DEC R7 R7 0x70 RE RF 7r 72 27 RF Fr sHr 73 74 zz 75 87 ?6 3^ 77 5n 78 30 79 50 AE cIo BNZ BR of 2 R7 6.a, 8r cI,0 lhrsh this value onto the stack lGet the same hex nalue from RC.0 lShlft Lt times to the right lfo move the hishest diglt to I The J.owest position lDeerement byte loop counter lTest eount ;il"i ;, branch t111 one dlglt dlsplayed lReset eursor nE Bo that next I Dlglt to be displayed rill lAppear to the rlght of the present one lDecrement the dtglt loop eounter lfest the eount inranen ff t' o to dlsplay two dlglts lELse branch to exlt -- Nonkeyboard ourners pleaee noter You may etlll use thlE progran even lf you do not own a keyboarrl. The f,olloring ohanges to ttre Slrrgle Stepper plaee tlulng loope vherE the keyboard eens!.ng routl.nes used to be. tfhLle you have no control over the etepplng proceEs' lt will be elor enough to help you debug your probl-en piogran and oheek out narlables ' FI"ASI{I durlng executlon. In addltlon to the Slngle Stepper aE llsted, enter the followingr 3.95. 68 0x0ll 18 05 A0 06 BE o7 2E 08 9E 09 jL 0A o7 oB 30 20 :: o*:: PHI DEC enr Bt{z I (tnterrupt i(es w 1; off flrst tlffi- through-here) tiner fest tlner If t' 0, loop to wagte tlne here Ithen branch to debug RE RE lDecrement RE I I BR IBraneh 7^ ox?A rB 78 lload tiner value lnto RE.t tiner must not be ueed) I,DI Ildentleal tLner as above ir value rl{ay be dlfferent here than ln 0X05 I,DI AO 7C BE PHI 7D 2E DBC 7n 9E CHI 7F 3r 0x80 7D to 0XZf when done rlth dlsplay RE Rts RE BNz 81 30 BR 82 10 lWhen doner braneh rAt 0X10 to exlt tlnlng values to Elor dorn or sleed up tle ner nalues at 0X05 anal 0X?8. (If you only rant-to ctep through a proglran and do not tant to Eee the rta,riaties aiaplivr-otranle 6xoc to hex fil) Iotr tone generator 1111 rork -- do irot ne*e the srrggeeted nodtfleatLon for tone gencratloa dLsaugeed earllerl You nay adJust the debugg6r ti t4yfne Then you f,Ilp tq runr nothlttg w111 haPpen for eeveral seeonds rhlle-the tnterpreter goea through ltb lnltlaLlzatlon routLnes and turne on tbe dlsplay. Bhen you rl11 begln to see your progra.n nuurlng at tortolseHke speed, fllpping beck-and forth lron the Chip-8 dlsplay to the debug dlsplay autornLtieally. r Sometimes you may wish to begin single stepping somediere other than at the beginning gf a CHIP-8 program. fn that case, enter a junp instruction at $0200 to go to where you want to start the debugging proc€ss. NOIIE 3.g5.gg \, 8K RArll \, BoARD FoR YotlR RcA VtP ousEs :popuLAR Lour-powER 2II4 oEAcH 4K BLocK sEPARATELY \r \, RAMs ADDRESSABLE oG10 \, GLAss BoARD oDouBLE sIDED 2 oz coPPER \, OSoLDER *coLD PLATED coNTAcrs \, *4-L/2"}{x5-3/8"H \, OPLUGS INTO VIP EXPANSION CONNECTOR OR SYSTEM \ry EXPANS I ON BOARD oDRAws \, FROM OBARE \, $ \, +5 V 600 MA LINE BoARD WITH DATA 49,00,,,,,,PosrAGE PAID AND TESTED $ 149,00,,,,,,PosrAGE PAID CALIFORNIA RESIDENTS ADD STATE SALES TAX \, \, APPRoxTMATELY OASSEMBLED \' \, PLATED THE GJK 8K RAlvl CNNO ALLOWS YOU TO ECONOMICALLY EXPAND YOUR VIP TO .57 5 SYSTEM FULL CAPAC I TY (32K) WI THI N THE CONF I NES OF THE RCA VP EXPANS ION BOARD. SEND CHECK TO MONEY ORDER TO: \, COM I \, NG SOON : LzK 27 L6 EPROM CARD G. .J. KRIZEK - 7 22 N. MORADA WEST COV I NA, cA \, 3.g5.lg \, ty AVENUE . 91,790 \y fOR SALEg Baslc Quest Super ELF with Hi & Lo address displays and some software. Good conditlon. i6g.Ag phonet 412-372-8773 Jeff Jones. 597 Cherry Dr., Trafford, PA 15085 READER \y I/O Has anyone interfaced the VI'P'to'CRT via a RS-232 I,/O port using a minl monitor similar to the one in llicrocomputingrMay 1989r page 132? I would be interested in hearing how it was accomplished. John T. Keys , lg2 EIrn Street, Vienna, VA 22169 a a a a a a a a a a a a aa a a a a a a a a a a a a a a a a a a a a a a a,a I hope to be submitting a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a programs soon on software/hardware that will interface the Teras Instruments and General Instruments programmable sound chips (sN76489A/94 and AY-3-8919/8912 respectlvely.) I am also working on the hardware mods that will allow the color board to operatel at maximurn resolution (8 by 128), but I will need help with thesoitsoftwar€, iI lanyone is interested in.helping. Keep up the good work wi th the VI PER. Jeff Jon€s r 5fr7 Cherry Dt., Trafford, PA 15[t 85 VIP tiny BASIC in ROI'I t $25.00. GRI 53 key ASCII keyboard (no enclosure) 5V only $55.09, includes an interface board for VIP. Both for only $75 and I pay postage. Larry Dolce, Box l, Valley Cottage, NY 10989 FOR SALE: RCA RE}!TNDERS of VIPER avallablet stl[ a nunber of baek lssues sets of Vol. 2. The priee Partlal sete of Vof. i, and completepostage for U.S. addresses. for Vof. f ls $5, and Vo1 2 ls $8, Assn.paid at the ueual address. Send your cheek-io VIP Hobby Conputer (9P!{ EST on 3860fnz) wlth K2UIfi. KZZLV, The VfP Ham net, Tuesdays AEiI, W?:OC and 6thers. -If there ls interestr wg ntght have a net on 1i or 2O Meters for nembers not on the East Coast. I€t ne know There are lf you are interested, \*'$ q \rr,$r tfi fl- *ffi *$ Vnfi fi (RS) 'iffr r*ll ffi \&H l 3.95.11 ffi ru Y";,il CHfP-8 for ELF by Leo F. Hood gggg cstgg, ffBF4 EI? fififi5 Erh fir3F*, F:3[:F t3l3r3'F F€t fififir:r fi3 *FfiEr Er FSEIE R1 It t fiT3$r:: Ftl4'5 BEETF '3S rAfilS B4 fiF1i FE: 1E srir i 3 fi4 ilffl4 F!:tfi1 |lIEt I {, E:5 .l t-lt-r l-r-rl-r-. !a!$ I -lI' |- f,t|- l_. 1'3 Fr5 r,lfi 1fi tr4 fiE !. E: 9L, t3B 1r: Elf fifii[] Ei fiE a ta t.a a ! t:ll:t f E ]..1 3r.* 1F Elt: l:lEift 45 *Ef:i I FtF r-h?.-r.-r r-.- [jtfl El|lJ.i. r3fi;3 r'?r'?.-r.{ l..tl. I .. H. .-..-.&.'... .-. .-_ ._. Jt.to lt I r-1.-r l-r HIElrl"E r't t-. 'f .-r.{ .{ .jr-C.,.+T l- r-rE r-!r el tr IL. I t . tr lfilr-r |;3I3?H F'FFfi fifl5[t tlh fis31 F5 AgI! F*, ti*33 Ft, {3fii4 Ft t:.r$:t.J.J l-..- f trr t3l33t' F'3Ffi tiiff3er Rr fifi3':r 4l: r$fi3fi B3 fiBSEt fiEl3t:: tt$338 r3fi3F l-rl r-r r*l ISBII: FfiFF r"!rr?-if F I FJT FHI F:b *r:F Ltr I FLfi F:T L[rI *11 F:l FH i Ltr I #46 FL'] H 1 GHi Rg FHI R+ LT}i #lF F.Lfi F:4 Ltl I *91 FHI H5 Ltl I *FL: lq..J r LU 5EF R4 fiH I Re' FHI HT SE],*l F:3 I:H I E4 FH I F:I: LTIFI H5 F'Lfi F;F rlrl: Ft::fiF Hrl: firl: !:;F fi845 FfifiF i-tfi4;' BI ti!fi4t:t 45 ntl4'P 3f;t4ti1 3.c. t,'F tilt34tr i 3 r3r34E t!4 rcfi4F fift r3fi5fr Ffi r3fi5L fiI r3fi5;: Er I r3F5S Fl r*fi54 fi t {ir355 B L r3fi5t, fr I r3fi5r Eri fi85;:f El I, t*E5.:l ff i {rfi5il E I t3fi5Er fi t [Jfi5f: $ I f-rE tltSStr ErEl [irS5H fi I [1fi5F tlEtr,fi [1t;-1t, fi L rAfi 1 ff:f5 !,3fih3 t3fi8,4 !33 EtEl r3gt,5 '35 fiffhE, Eq lfr 5HR fifii:'f Bf fffit,b! El: ll-r 3r1F:. Eri IIF; I FLfi fiLI] R}.{ I NRI FLfi Ltlf.{ fiEr4+ rllF4r.:' 3l-lF* r-l r3fi4fi fi3 1, tl3 81fi4t 3ff1F sF4 l*1t34Et FH Ft, t:rtsrdrt rlr*. I 8t4,,fiJot- 8 I LBR TLEgg 5HF: fira?5 Ft .._. (vlPER 3.94.971 f- trr ld r-lr-I.-r.t' t1l.-ql-;].Er r'?r-1.-r...-. r-r L.3L.I This progran uses the VIP operating system fo r ELF program #44 #5F E': 1,3fit:"$ fifie,fi '31 EE: tnBt,Et Ft4 trrSt,t:: $'3 tfrS€,tr ffi F;F *EF *FS r3fi*,8 H€, ?,3 tfBr,F *5 |;tfiF* fit rStIF 1. FFtfii fisr3 ErE F;5 5Ht? 5HF: 5HF: 5HF: {r*r4 st {IfiT5 I SFF FLfi ET Ltlfi FrtI: F'H I F:3 fiL'l F;tl: fitr I *fiF FL'l Rtl: Ltrf.i Rf: iIR FRIF [lfi;'r Ft, i.lFf Fr:, !:;l r*fii"'Ir F*, [::lfif Fl ';: fifi;'Ei 5i rJ$ri:: {38;'[:, i:lfirF 3.9 5. 12 fi;!' F;l i F F'H FLfi F;.5 5EF' F;3 Ertt # 1g GLI:I HF ilt.{ I *fiF FHI F:3 LL}H i?5 Erh: *4fi FEII: F;3 I l.'iF I i i.lr: HI 5EF E4 I LrL 1*f.. I I LJl.- Ltrt.{ H I Llrt.f tt L Lllr"i R i Ltri-i Fi i LtlH R 1 Ltrl.l R I L[tt.l R I L[ttq R 1 LFI{ R 1 Ltll.f R I Ltrt"l F;l LrJf.l H I I I}L Ltrt.l E I Ltll-i F: I I trL Htr61 #fF rfLrlr ELtr fiH I F,H I PHI F,HI 6H I 5El,*i FLI:I R3 FiEl FI5 F:4 R7 RC F;l HEI F:4 5EP F:,3 f':ET KHI R3 I l-tl I l-rE T-LJI "I Llrl-.l f,'i.J Fit, Ht.{I *fir I ftE ftrJr #3F F.H Ltil.l F:e-' 5HF: 5HF: r'I I l'-r .-. t-t t ar ,t .. -.t i.', illr-. L.,Et-. f-r J-r rq.d. 5.TF: Ri I i-rl i i-LJl'f l-r'-ir ffr t' i:ii{ s I -5rlL 1r iin \yl '1ii l t .rt.tt tt t1j.l$ttrr[i! a .ll Il fl hlttslrlr .1. l .lt .lt l. L. lr. I r.{r r. I -tt .ll L. I |.. l.-. I .r r t ..t .tl Jl l;i.l[lft$ ... t -tt JllL.. I F1 liF: t l;l.lfl:lrf,r r ;lt ra I tll[lfr t' tt . .{'F I t .. t3l3!:113 fiE!:rFl HF FHI Lill:l FRftF Ft[' fir tLL. frF fr".J F,Lil Rtr |-rl l-l f-r'-!r I stlfi r LLI LL! l-. r-rl-.. r"? lF .-.1 lB.t t3Ft3f' FIL, FLtlt F:* fiBtrH fiffr:lF F3 tlF fiHI F:3 fifi381 frBFJ. Er t' GLT' 3:F3 13c- l_r._1, #F3 t Jt.tr I .. t..|L.|-.| .l- itEt: F:T r-3 r-l r-r ..1 H.tEt 3l+ 4Ft LTIFI HH E:tr FHI fttr fiHI h:h. FLI:' !:Lrl RE HE f-r'-1 e-'l- *Ft4 t at | lL.. t:rl:r 3.._r "ll .-. {3ff'3*' li. ,38 t tit|-" .lt It I lt I I |;3S3'3 f,3R4 .o--f .ll lf tt t ,.. I B. ! -t t!-. '-ll I fiHI Fh Etl r-t 3ntq. 13fiFH r-r f- fiLl'3F -?t..fEr fiLr:l HF 5l{F:t: MBfiT3 11F ItrF'3rl: fit3Ftr i '3gR .-rl-.L. !-. FfiRT -1ts r-3 |IlFFt4 3tt r-r r-r .-lril.itt3 r-r r L,J F:F FEI]: ItE frl*r trrF:. r-"1 I ? f-r l-: FtII-'r t Lo' t rll ,l lt. .-lEr 3 I tr:. r'-'l'fr Rt, I a, tt t.. Lfr' l. t'{r-. 'f L lr-' I rl .lt I r-rll-l I ELil F:h F:F r*ilLrrt.-l [-!F:rf.lcr t:llLfl-l l' a .ll.tt t:lliLf .. tt I a l-!rI' llrl:trt t .tr.tt tt l rttt It :3 I t-. I l.-. !::lt:!l-t f-t Sfir3E ri*ErFlf: I .tt .t L. tL. I t Jr & L'IL'lF I .. t tl aI I srSE l..l ... r-lqle'lrrt Hr:' r-r -ir I:H l-r-F tts r-t -ll rtt FLfi fiLrj i f t-r t.l.- Frf.{l-} . tt .. I .'t [rllt]: l-r l-.. I?*LJ f-r-? t-'L- *EIE t .rr.tl., lr lh'!l-I t' t tt tt ,t r.. t6. I l-....., t 'F.-rl*r '-'.L.1-'l- I | .lr.ll tt t.. tL. I F.. t '.. l-' l-.' '.-' '-' t-- r'-r r-ir { t .tl.tr tf r.. I L. t F.. rn l tt!, ta !;i.lflfrt-' l- !* tlttLt i r-r t'? F-t r' 4t, F': , l-L.,1n t .tr.lt tt q, t r.. I L. | :-. .. I .ta.rt tt !..rL. I I r-.r r-. lF-. 1'-. b. r.'irr-l f... trflEr Ft LL!Fi Hb ....t ,t r;t H.lEl|- U.l fiItrF4 Eii .-l r' ::r r"!u'lt&. tt .I t- r'-r let a a #fi1 -!r r' I ,"rl-tF:. 3. A5. l3 #fiEf ET *EtS #FF R6 f-rT r1 f EL' F,LI:I F:F fiHI R3 5 H HF GLfi RF ErI *tiF ilEr: F:F L:R #85 I ? ET} LUr-f f-r -? F:. r' r:Lil itr Eri Sfit]. .-r-? _i. f -i|.r-lrl-f,3 .to | i l:Lil f- .-at-. ,il$F[i LSII [1#FE: ririS i1fiF:r- frfi Et: " l'{tl: H3 5EF, F:4 fiH I HEI FHI TiF LI-I i #FF llrl r"r -!t 13 r' !.;l[rFr:: f!fi R€, l-rf f';;t Li:rF.t R3 F'LIJ H5 5EF H4 FI;' L.-l t_. RI: Rr: I frl '.+.f:, ..-. r-l f-'H t fttltri::i i;llr: l- r-r s'TF: tlEt: I l-{t: fiLrj ftLr I FL'] Bl.tF LLt I FLfi LLIH ft: E5 ..t. \dv;i$ I iIL ffifiF:[ R5 [itfiFI fi4 ti}IIFI ri;tr tl|Ef l?r -r ,:.! r- E. .Jq.tE,.J tiilrSHir E!fi [:lEt[:[ 4:i l't"LJ I FLI LLI f..r fl r"irr-!rt-'l-r I t'1.1. 1..' I C:f- rilfiH.F:l :F: t:r._L:rE r*!rr'ir t .t.. r.. t lr.. 1.. r.-. .r. r-r f 'x ti*fiH::: 33[]F F:h I .tt rtt t.tt.Ito.t.. I ._ir xr"* Fl*aF t.r. .._. #trF l_.r I l_ t-l f-- ...ir []l{lf r' *li F:6 Eti #t::E LLI I #Fl F'Lil F:F F;e' Lltl{ t.tr-rl-r |Jl-l-t fit': rtf, Ht:: Flf'ltt 5Tn r'-r"ir .._-._. t'{l:: Ltlf"l rTi l]:lfiH4 t-r l-.. -:r....1 Jorr.. t-r t...t |- r-r -lt 'Ir t' r'?r?l*F f'lr-.r l!;1.1f,!l- Frl.r .''. i ..-r 1.3 r-lr-rl-,r' t.la.tt- ftr' r"!r? t-r ..t t.'tt' I F-. LL .._. a-. ti*rSirta r.fl f-r -ir -F r'tr-ll-r L. tL. , ta. ..... 8...-lHr i:rf,iE ._r *trfr I r-a fl.l}JlJ l-. r"lr?l-.. f'.l;-l$1-.t;-.t ErI *tri ;ti iffi *$ f'.,1-tla. fifitlF tr4 fftfiEft '3Et t.JfiH: ]. EIF{lt3H: : F:tFl: f-rt-. FLI:I Lt! |- r}f Rd, tJfitt H{, tttl t:l[ll.'ir iifiLsEt r"!r l'ir l-.. fqtrr F*l-. r_. FE .. EtH r-r r"!r r-!r F.. f-r..- t E a ta t I tt .a t.. tt. t rs..L. r._. I ......;. l_. a tt tD ,. ,.. I L. r t-.. Hr:' 1 I irl: ff13[rt i t, l3fitr3 r3r: t3fiLl4 Ft:rll3 *r3tr6 R[: fifitrr 3LrF3 r"r l* l- l-. I TIL l-r-. t .ll .l, ll ro. I L. I F.r F- {:IEEI L 5'TF: I I'lrl: .,- U.lCr rSEtl *'3El ut-l I r-ir \y ET Ltrl.{ Ri l*lR I *Er I ti*tl[r[t 5t]: tr,!-r t rr l-. frl l tI: I|SBI:H; FII:F {lfirl:tr Frr i*fit:E Fh i,lfir]:F:' FT l-r l-.. t?rLJ i -:F.qrf...-r ....I I -. 'e' rlrer L. .ti- {t$l-:::: F? ISBI::'F 3:[:E ll-r F,H 5TE t ._n_.' r"lr-.r r-. ..1 t.tr..I! t.t | tl,l[lL. r' F:F l-r -!r Fr. f r LLI I tqE rll t l-r-? fi13'3f {ll[t ]rrI, .-. L. .-!f, r.:rj. r't r-tr r-r -lt l?" I' r3E:1El .l 'l fifi!:t l-t t-. I *fiF H}.I rlt.Al t:t}Jt-.}J .l r-lr-lr-. l::lEfi_. t r}firl:? Ff:fif l-r r-. f'"al-. I:H I Ecl-. L.a. t FLfi . r-r ollor t..r .3-. Jt.tt lr rlL. - :.* !;l.l$rtrr.-t I FE: 5HL 5HL FE .t .e. I i}E!:: RFI trErl: F:f gR T 1 l Y4 fr ru l lT x :ffi l T \TT,T tr #F:' l'rl .4. l-' l-. I l-llI i-ti. I IIL :{ x [31fifi [11Ert FRfiF 3$r3t: Sfi filfi4 s1fi5 45 lfl€' Fr3 filEIT ?EI F i EtEl 5*, filfi'3 tr4 fi I BR 1 fr Eu: Erf: Fl Ffl F!3'35 S l ErF fitl: Fllfi i3 fili i [l: 11? 1i fiti3 Fh r3l 1 4 tr4 { .l B LII I.-l tstfir fil f t BrIl fii i;' tr4 r3t lt:t fit, F11F FI* 811 1 R tr4 fil l Et ':,4 {31 1r: FH i31lt! Erl #11E Et frl!.F r3R fii:a F4 r3t?1 Rfi 13 Fl:"""""""'I 1 s3 r-t-.- r-1 t-!f { .-r.-r t:.1I _d. ;]. -!Fl-l 1:4 fi 1i5 fil:;f ErR t"it { .-rrar F.. r'? { Frr-r l-r-r s t:1.!. d.tiXr t:ll.€:::t .-rr-r .-tEr*Lt3 '}Ft Ft:fi i ..1 Lrt.f 13$3 ftFl .f fi131 ftR #L3:: F4 [3 133 Et *r134 fit ii135 EF i 36 F:; *lIf ErE {313r3 F* 1E fii3fi ilE fii3Er ';R it l.lrl: lR i Str Ft:tfig iflsF 5R !;1 l;3 r"rl lT uu I ..1 r.f LTIH F:Il Lllt..l R I SE}'l F:'b GLfi EFI ilf,'tr FL'] Rfi Bf'{F *3El I:H I F:FI fiLrI #Fl FHI ,;Ftr RH ..JL-l { |- '} I L ffl:EI Eft f,31!l: fii, !;!i:I-} FfifiF tri:iF FtR r3 l-lf.ll SttF BR *r3f: I ITL Ltrff F:5 FLII E3 EH I F:EI 5TF; R€, 5EF R4 LtrI #11 PH I FIf: LTI I #55 PLT' RT: IrEf R3' 5EF F:': It.li: RI STF: Fle' 5EF F:4 Lttlq F:t F,H I FIIS 5EF F:4 Lirt.l R€. PL'] REI 5EF R4 F'4 t \ LnI *11 FH I HFI LtrH ftE, Hr.li *EF F'LIJ F:11 Ltll.l F:fi FLri HR 5EF FI4 5El*l F:t' Lirl-i F:e, FHi EF trH i F:5 PHI RE L[r I * lE! FLfi F:E IIEI: HR I T{I: RFI LI} I SBfi 5TF; R}l 14f' ffi F5 3B4E {114':J l4*1 til ff14t i 4tl: l;*14ir r314F i315tl 13 fil:; I ti!.5! fil53 ti154 iis!,55 {315h fi15r { Br-r I ._tr:i r'? t!-t 1315R 15El t3 r.:! i 5tl: Lrr 15ii 5TF: I .-ln I 3t34t3 4E Ft, ' SEfIr:: FF F.." .-tflr TFi 3fi tl4 frfi fr.-l d.-d. t3t, 5T FISFF HT FT .-trt L-l I fl-!r 13 r' 1315H r-:lr t- .,.ir rltSF ri3 1t,* t;' 1R r-l { -.- .l 3R5F 13 tLt I tlr I 131t,3 fiih4 {3it5 $4 {31ht t-r -.- fi 1r:,f 1i,t:l [3 i t'Ft fi1t'El rkr '?'i' .a.- .l- :3Er F.-r .-td FEIFS fir 1€.il: Frq B-f ._r f t31t,[:, r-r1t 13 fil1t,8 F3 1;' 1fi 3Ht,F li3 131C,F filrfi l']ifL t'- 1! 13 1r3 ff114 [:'4 s31l'5 J. ...r filrt l-ir { 1r-.ir tl.ll t' r' tit J. I[l rF fi1rfi r'? L1i {E' :3tri ',ii r; '35 5t .-rF { l-r ::lt i -!r r' Elr d._,1 ti3i 7r-: 45 r'l { ar F.l:i.l I i l-.1 fi:; rlrEr F Erf.iF *4El LL!T.{ Efi €d bt TJl4F fii4B F:E Ftq .. F{::fi 141:l [1 Ltrl.{ 5tr .-il:r l- r:1145 rSirE fftrF. 3.95.14 ffE fil41 fir3tr F:T, fitrl #fil Hfi E:R *4fi Ltril RE STF; 5HF: E;t.{F #It: fiH I 5TF: FIF F;II [rEt:: F:fi [rEr:: F:rl 5EF. R4 IDL [rEr:: Fj3 RE. ':LN sTF: Ri LII I *FF FLfi F;F LITI.I F:F sTF: F;H tSLtr FiF l{t:rF; I Il.lt: Rr t.,lt: F:Fl Br.{E *5F I l'lt:: F:3 5EF FI4 I}EE: GLB sTF: RT Rb H3 LTII *FB FLtr Rf Ltrt{ FiFt 5TF; F:F GLfl R7 l-:tfF: i f'{t: Rr I t ll: F;Ft E;t{i *r,E I T.IT: F:T 5EF F;4 I r.{': R5 GL'] R5 itEt:: Ri 5'f !{[i I F:5 5'iF: Hi [rEr:: F;5 Liifi R5 F LtIi F::, I:H fiLi]i ill"i i Rt, #r3F r3it:tl {1 1r3i { Tlr' lll t fr.-lr g r*...1 T31Et4 Ee, LtrFr F;5 5E:": F:6 3Rr33 EIHE *83 r"t r-r { r-rF $ t fi.-l r-ir filr::8, r-irt r-lr-r H.t J. tf Ct fil|::!'3 Et5 tr4 ..1 ?7 f- *-r { E ! .-l 1,5 fil ;:!r? f'4 ElisF 45 filfir: EL; fil E;tr F3 filr::E SH*r3 fi1'3H tr4 45 F1'3 I fil?T ffT fil'33 3Fl3t: fi1F5 45 filFE BT F1?f 3Fr3+ F1?'3 E€. frl?R €,r fil?E ,Ir, fi1'3[: 45 E 1?[:' ftS Fl?E 3br3r3 fflFtfi tr4 ErlHt 3E*r3 F1HS tr4 131H4 FEIFff filfit, fir fiTFIT FHI sEF H5 R4 l{frF; f'{t:: RF I r-{t: F:5 I 5EF LF}l 5El-: R4 FJ5 R6 l-itllR Bl.{3 #EtS 5EF R4 LtlFt R5 Ltrf'l Rf BR #:3t: Ltlfr R5 Ltrl.f Ef BR #F4 5E:,{ R6 ffUT T tlEt:: LITH FLII B3 3El-f-r r- f Etl.l3 F:€, R5 R3 #gS n4 l-r.c #St3 5EF R-+ LT} I FL'] #FB F:7 r-f-t .l j3E r'., ft f Fl FIE: 45 LLT}I F:5 F4 filfifi H5 $31FtE: r3t ffF[r F ET 1FI3 fil1Ft': FftfiF ET FIE SEIE: filErfi Fr:fi1 r't I f-r.-r FrB lj.ll Er-C. Er;l fi18r3 tt4 ri' r-.r H.l 184 { FrE I trrJ 45 E...-l[t fi l Et{:' i}4 filErf 45 filErfii Et 1E:'3 F4 F318fi 5':' * l Erfi tl4 Ei t31E;tI: 45 l Ertl FHfiF r_l r"l { l-rfELl I Erl" r-rr-. .{ ...jt!-1t-.-f -l|p l-r-? PL$ FI5 fiLfi H6 fiHI *gF Ft"lF *83 RTII *Fl FHI FI5 5EF FI4 LSFI STR sEF Ltlrl 5El-i E5 F:€' R4 FIT.{ l-rl l-ir Ert -lg- I Br Flr::3 5b fi1t:4 fiF fi1r::5 3i F lr::t Ffitr3 r31t:3 [,4 I Fl l::Et 73 fi1t:'3 t3F Flr::ft FFFB filt:r:: 5I B l[.tr E€, \ fili:E Br fil[:F r,3 fil ttfi 5r, filTT1 FEIFF filt13 ftr, t31tl4 Fr3gfi Fl trt' fE filtrr 5L, fft tr:3 t!4 fi l tr'3 1$ iFH t3F r-3 t31[:'El [r l trr]:, RE '33 BE tt[r r3l trE '3'F r3ltrF EE filEEr F4 F31E r 5L, fi1E3 r€, d3183 Et fi184 F4 filEF Et'S $318t, 5*, r3lEr 45 filHrir F3 Si E':J 5L' filEFl tr4 filEEr 45 tl lEt: fiR l3l Etr t3€' filEE FI1FF lFfi BR filFl tl4 Fl $3 RF I.3TFT frfi H€' frEl Fttrtr sTH 5EF Ltrtl I t11[: RE R4 RF *BF !Lr-. .{ ltL--t 3.95.15 t31FS 'nlF4 fis t3lFS Bff firFt fifi fflFT Ffi $31F* fifi fi1F'3 ffS filFR gfi fitFE! fiB t3lFt:: Ffi filFtr ES }31F8 BF filFF +B L[,f.] sTF; 5EP F:? R6 R4 RF FLII trEt RI LD I *[,3 STiitl ELN RF TIF: #FB I 5TR 5E:": HT 5TF: LI} I FLt' LtrI Vn ;"i *Sg I 5TF: LTIFI fftltl 5TR 5EF Ltltl FLtr I3Lil llt{I FHI sEF RE RT. F:6 F:,3 R6 R5 R6 R4 R5 RFt F:b *BF F:H Fi4 I I}L I IIL I E}L I TIL I TTL ItIL IITL I I I}L I trL II}L ItrL 5E:,{ ISL LT}F{ ; \tr1 R6 R4 fiFB FH 1 #FF 5HF;tr 5El*i Vv E:t, H[t[t 5TF: \* F:T, sEF I tlt: F:3 GLN R9 FLtr HE F:3 '3HI HE FHI t]H I R'3 SEl*l Y Ftg SHLT: 5TF: \p R€' Ltrt{ l-t.-r RF t-l-Fr 3E l- v RE F:E ,l .i i \rnr {i rrl -il ii l* 'lu, * '|| L nl $ It' \, \, try \, \, \, t\, \\, \t hr 5- MACHII{E CODE P. V. Piescik, t5? Charter Rd., Vrlethersfield, Cf 05109 to ca:L1 theur and return from to our cafling routines, I[e ].ooked. at branching to/from subs, but this restrj.cted us to havlng the caLler on the same page of memory and returned. to a single memory location every time. Wetd prefer more flexibility' so this nethod was i-nvestigated and rejected.. We also looked at SEP 'llechni.que ' which allows us to return to a singLe register used. as the caLLerts PC. It needed a little set-up, and wds-more flexibLe than branching' but "nesting" subroutines couLd be a problem at tines. IIARK Technique al-lowed us to return to any register, the cal-lerts PC, bX saving the caLLerls X and P sn the staek. The set-up is about the sa.me as for SEP Techni.quel but we also found, that wets.cou1d. stiI.l. run out of, free registers to use for the call€r.: ond sgb-P0 .. We were ta3-king about subroutj.nes and. how thern ,..Grrt€r SCRT (Stanaard CaII and Return Sechniq.ue). Itm neither the first, nor the onlyr orr€ to feel a shortage of registersl SCRT re-uses the same registers regardless of the nesting levelr arld is 1imited only by memory space avaiLable for the stack. A total of five registers are "ded.icated"-to SCRI, to be used only for SCRT purposes (of course, if you know that SCRT wi'lL not be used. within some part of a progran, these registers can be saved,, used othenvise, and restored for uor.e-SCRT use). Again, R2 is the stack pointer and usually, RX. Every catL/return wiLl set X=Zr so if the subroutine changes Xr 5,t nay not have to restore it. R3 is aLways the PC, regardless of the nesting levell n5 is a "l-j-nk" register which points bick to the calling routine (one level up) at the Location where RJ woul-d be Left if this were UARK or SEP technS.que. We can conmunicate between the calLer and subroutine via this link. n5 also contains the return address whi.ch will be reloaded into RJ upon return. fhe PC and Irink are maintained in an orderly fashion by two SCRI Routines --CAI,I, and RETURN' with R4 and R5 dedicated" as their respective PCrs. CAI,I and RETURN are invoked. using SEP TechniqueI however CALL "returns" to the subroutlne being calIed, rather than CALLts caller; The subroutine 'returns" to RETURNT which finally returns to the original cal-ler. This sound.s chaotic but it uright be easi.er to think of CAIL as a logical prefix and REIURN as' a logieaL postfix to each subroutine. Since they are physically dispJ.aced. fron the code of the subroutines in memory, we mlght aLso think of thern as separater intermediate steps. In any case, once we see what they dor they are (thankfully) transparent to their US€fS r in the caIler, CALL must copy care!) if this is the first, 2d; or "n-th" Level of nesting, the previous link must be saved on the stack. FinalLyr R3 wil-l be Loaded with the address of the subroutinef ancl SEP-ed as the PC again, only this tiner for the sub. The entry address j.s suppLiecl by the calLer as "in-Ij,ne d.ata" ( so call.ed because it is in line w-ith the instructions of the routine ) ; once R5 points to where R3 did in the calIer, it may be used to fetch this ad.d"ress. RETURN has one l-ess thing to d.o than CAIL di-d., sj-nce we d.onrt need, to save the sub-PC (nl); unLike the other techniques, SCRT will re-Ioad. the sub-P0 on the next caLL, and. we eanrt re-prime R3 at the end of the sub, sj.nce it will be used, as thd PC df other routines before we get back to any particular subroutine. Undoing the rest of the call, R6 wilI be copLed back to R3 to restore the caLlerrs PC. R6 will- then Since R5, the Link, points to where R3 did RJ to R5; and., since-CAlt d,oesnrt know (or 3.95.16 \rP be restored by popping the previous link-val-ue from the .stack. Lastlyp R3 will be SEP-ed into actj.on as the calLerrs FC. 'to keep the code in ascending ord.er, I tlI show the expanded initiaLiza. tion which now sets up R2 as the stack pointerr RJ as the main PC, Rll as the CA],L FC' and R5 as the REIURN PCr ..this page tDI O;PHI 2 PHI 4;PHI 5 ..ELlso this page ,.(Rz)=ooFF tDI #rr;P[o 2 .'.stack read.y SEX 2 IDI A.O(CA],I) ;Pto l] ..CAI,L PC relay IDI A.O(nnfURN)IPLO 5,.RETURN PC reday tDr A.I(UAIN) iPHr 3 . I,fI A.o(UefN);P[0 3 o.ilIAIN PC read.y oo1,2 F8 36 A3 ..Bor MAIN' go! ool5 D3 SEP 3 Thls set-upr includ,ing CAIL and REIURN shortLy, is good, for almost all the 1802 piogramning yourLl. ever dol Anticipating that' I saved ll Uytes by loading R&.1 a.nd RJ,l right after R.2.1r whiLe D still- contained #00. I-di'atn't Ioad R3.1, thoughr-si.nce ilAIN may not always be on page #00' 0000 F8 00 82 o0a3 Bll 95 0oo5 F8 FF A2 0008 E:2 ooog F8 16 All oooc F8 28 A5 oooF 18 oo 83 o especlal-Iy if you adopt ny progranning habits. sEP 3 ooI5 D3 00fi CAI,tr ORG * 001 5 ooIT oolg 0018 001D o01F aa2I E2 85 73 96 ?3 83 A6 93 86 L*6 B3 t+6 A3 30 15 SEX 2 ctO 6;STXD eHI 5;S[xD GIO 3;Pto 6 GHI 3;PHI 6 I,DA 5;PHI 3 IDA 5;Pl0 3 o.SOSUb ..insure stack ptr . rsEY€ R5 link o.copy R3 to R5 r.load R3 with addr .. aJrd advance link rreset Rll and gosub . rr€turn to caller sEP 3 0027 D3 REIURNT ORG * 0028 r.restore R3 from R5 ctO 5;Pl0 3 0028 B5 A3 GHI 3;PHI 3 0024 96 B3 r.insure stack ptr and SEX 2; IRX 002c E2 60 prime POP R5 from stack 5 r.rAstore IDXA;PHI 00?3 7z B6 6 IDX 0q30 Fo A6 tPtrO r rr€set R5 and return BR REIURN-I oo32 30 27 Note that n(X) is not left to chance in either case, since a routine may have changed X. At O01F-OOZZT we Load Rl with t4e.ad.dress of the sub, which is - Uytes of inline data, and we use f,Oe 5 (t+6) instructi,ons for this. If the subroutine aLso need.s some d.ata which is stored inline ' it wiLl also use ll5 instmctions to get each byte of d,ata. There MUSI BE as manlr"45ts as there are bytes of datar or the return will be incorrectt Advanci-ng R6 now j.s the same as advancj.ng R3 in tlre calLer, since RJ will be restoied fron R6; too few lr6's and the return is into unused. d.atai or too many lt5ts and the return is beyond the next i',nstructi-on. I aLso saved. a byte by getting doubLe-duty from the D3 at 0015t It belongs to CAIL, but is al-so used to SEP into l,lAIN initial,ly' 0023 BR CAIrL-1 3.95.17 r \; \e ;ii ,/I '\, )\. hi \, lg problem with SCRT is that it uses the accumulator to manipulate R3 arrh R5 r so D cartrt be used to pass a byte of data to/trom a subroutin,€. If we try to save D on the stack, it will be buried. und,er R5. The SCRT routines have been enhanced, to preserve D at the expense of RF.1 r OAe 0oL5 D3 CAI.,tr 001 6 00ffi 0017 0018 001A 00tc 0018 0020 0022 00 2t+ oo25 BF E2 73 73 A5 B6 t+6 B3 Lt6 A3 gF 3o r5 0027 D3 0028 BF oo2g 85 A:3 oo?3 96 83 }{-. PHI *3 , .copy D F 3;PlO 6. GHI 3;PHI 6 I,DA 5;PHI 3 tDA 5;P[0 3 RETURN r GHI F BR CA],T sEP 3 ORG PHI o - * ..copy D to F eHI 5;PHI 003t+ 30 GHI F BR RETURN I oRc * 5 IDX lPl'O 6 MAIN I RF.1 3 tDxAlP]il SEX Z;IRX 27 rrestore D from RF.l T eI,O 6 iPtO 3 oo31 Fo A6 0033 9F 36 to RF.1 GLO 002D E2 60 002J. 7Z 86 oo t,,n.l"\' ORG SEX 2 ctO 5;STXD GHI 6tSTxD 86 95 83 93 0028 sEP r .restore D from RF.1 1 r.rrext available byte 0K, now what happens to the infamous ADD routi.ne when we use SCRII? Do we need. additional set-up as with SEP and MARK techniques? Etc.? From the original version of iong ?go, ADD grew by 1. byte for SEP and by l bytes for MARKT now' we can actualLy shrink it by t bytel We no Longer have to wrap it back to the top to reset its PC r si.nce SCRI wiLl handLe that for subsequent calLs, and the return at 0095 is only'a l-byte D5 instruction, No additional set-up is required speclficalLy for ADDi the new initiaLization is good for ADb antt ariy other- subs we n6ve. llhe-caLl - r' l\z \,1, I fr, to ADD is J bytes, rr I )u1L, I r, 'tt l"L oo36 oaSZ D4 0080 SEP I} ,A(ADD) and we can move .,invoke CAI,L €rrtry address the d,ata up one byte sj.nce the o. ADD starts at 0080 again ' return is shorterl 0080 ADDr ORG * ooSo 8E ?3 gE 73 GtO E;STXD;GHI E;STXD.rsa.ve RE 00811 F8 00 BE I,Dr A.1( oNE) IPHI E oo8? F8 96 AE tDI A.o( ONE) ;PI,O E . .RE=A( ONE) OOSA EE . .X=E SEX E 18 0088 4,E rll IDA E;ADD;INC E;SIR E. . (S1JM)=( ONE)+(TWO) 5E gz,5o . .RX on stack r prime POP 008F SEX ZIIRX IDXAIPHI E;[DX;PI,O E ..RE restored 0091 7z BE F0 AE .r€turn vi-a SCRT oogS D5 sEP 5 0NEr 11 oo96 01 TWO t o0g7 02 tZ SUMr ORG * 0098 x)c One advantage of SCRII mentioned, a].ready' is the ease of passing inLine data. Note that yourre not concerned. with the address of that data; R6 points to it "automaticaLLy"l Ar.rother advantage is that once you know 3. g 5. r8 Y register i-s.your PC, you can use that register to.provide some or alL of the Loeal (within the subroutine) addresses, even if the sub is not on the page for which it was originalS.y writtenr oo84 n BE ..RE on this page in Gltr 3;PHI E o. any case oo85 8) ..D)=this address (fo GI,o 3 oo87 FC oF AE ADI I5;P!0 E .. byte) + !, then ad,d distance to ONE to which :: f-oad RE.O Getting_the page add.ress into RE.l is obviousr and hopefully' we won't end. up irossing a page bound.aq5r between this point and the location of the data. At #0085r w€r].I get our current addressr plus tr, into the accumulatorl (D)=87c -p=3 For those who think. thls.lshoula be 85, letrs see and (n3)=OOg5 as we come to the 8J instruction. what happened.. 0n everf instruction fetch, n(p) is incremented, as the 4-bit I and N registeis a.re Load.ed; aLl- this occurs in the first machine cycle (So;. In the second maehine cycle, the instruction is executed. (I=8, N=3) and. j.ncremented RJ.O is copied into D'r AFIER having been to 0087 in the first cycfe. Anytime we get our Location this w"V, D will contai,n the bytead.d.ress of the next instrueti,on. It turns out that wetre not saving any memory with tfriE-ii6'thod, so ONE is still at 0095, and. #g618Z4oTt ie aia #0F to where we. are, d.rop it into R8.0, and RE points to our data. If we want to includ,e this ADD routine in some other program, we wonrt have to worry about where the d,ata is r or to remember to make the change in the codet fhe data wi].L a3.ways be +0F from this instructi,on, and no changes are needed unless we cross a page bound.ary between the 93 instruction and the data. One less thing to do is one less chance to buiLd in a-bugl Since we always know which register is PCr w€ can aLso stop any routine P=3 for debugging Burposes with onLy a 15by!e change instead of two!rrBR trr in aLl cases (except in CALL and RETURN)' so instead of our oLd whieh heLd us in one place, 'tr€ can use a DEC 3 WZI) instnrction. Not onl,y is this half the- trouble of changing 2 bytes, but it may also save the problen of having onLy 1 byte to spare in cases where the.second byte-we rd. change .belongs to code we need.. Like the 8f at 0086 above, during the S0 cycle Rl ls j.ncremented. when the 23 instruction is fetched; during the 51 cycle n3 is decremented and ends up where it startedl PROBLEM AI.IAIYSIS and PR0GRAII DESIGN. You probably plcture "programming" as sitting.at a terninal, keypunch, ete. and langing in Lines of instructions in iome Language, right? I{RONG. If it's done right, that's only the Last 1,O-20fr of the job, including testingl [he rnajor part is the anaS.ysis of the problem and the design of the program, Cutting short these phases wiLl Lead. to your pieture of long hours at the teminal,, spending 5Afi or more of your tine testing and d.ebuggingr which is very fnrstrating. In Svstems ProsrgErminE' John J. Donovan lists 6 steps for softwared6signrern;2)specifytheoaiastru-ctures; define the format of the data structuresi 4) specify the al,gorithn 3) (proceduraL steps); 5) look for moduLarity (i.e., capabiS-ity.of one proeian to be subd-ivided into ind.ependent progranming units ) ; 6) repeat 1 through 5 on noduLes. Donovanr John J. r Svs$lns P.rosgrpnine, M6Graw-HiLl, Book Co., t972, Y \a v 9 v Y \} Y \ry YP Yr Vr Yt*, Vv' VP' gp. Vp, I tv ' 3.95.19 \ Vr" /. l\' l\, )r :\- It, rL I ditlnrt do this expJ.icitJ.y for ADD' but al,L the d€tails cane out ln the (We junped into the niddle, where i.t "looked tike conputing,' since starting at the -begiruring is Less interesting, unfortunately. ) Ietrs back up and. do it rightr before we deveLop badr sloppy habitsr I understated the pnoblemr add two numbersl that left a lot unsaid.. If the problen had been"a l-ittle more complexr word have had to maJre too many assumptions about the details r a-nd. that Leads to trouble. By ttre nunbersr 1) ProbLemr ad.d. two numbers found in memory and leave th6 result in menorTr; 2) Data Structuresr two addendsr one suml 3) Fornatr all are 8-bit, unsigned integersl 4) A3.gorithnr addend.rone + ad.dend..two = sumi 5) ModuLarityr none-(this is piinitive) t 5) not applicable wlthout d,iscussion, moduLarity. }'i\- llL }L }L )t* }\- )'L )u )t)'L )u IjL tbL )L' lg lg Ig d (1) now tells where the numbers^ arel before they nlght have been in riegisters r or teminal input . ( z) anct ( 3) teil. now many numbers there are aLtogether (we might have replaced one addend ln memorxr with the result) and what they look Liker so we can teII how much memory they need. (tl) is still rather siurpLe, and we can and, should. add details until we're sure we understand the process--4.1) free. a reglster for use as a pointer by pushing its contents on the stacF i I*.2) initiaLize the pointer to contlin the address of adclend.oh€i l+8) uratre the pointer the 5.ndex (nX) register; lt.r+) ad.d,end.one + addend.t:wo = sumi l+.5) restore the stack pointer (nZ1 as RX t lt.6) restore the contents of the register t l+,? ) retuqn.. (ll.ll) still Looks like the o1d (ll), ald.rye nay need to keep goingr ll.ll.1) load the accumulator (witn ad.d.end.o4e) via the pointer reg-lster and advance the pointer; 4.4.2) addl 11.4.3) advance tne pointer to the 3d location,,(of sun)l 4.11,4) store-the resuLt (fron the accumulator) vla the pointer. in (4.4.1) and (4.4.3) inpJ.ies that the numbers occupy sequential memor,y Locations r and the sun is in the last locatlon. This probably should have been specified in (Z), or some other arrangement, Like having registers pointlng to the nunbers provided by the ca}Ier, uright be specifled in (1). If wefre handLing aJ.L the data from start to flnishr werll establish the location and. arralrgement of the data once we've d.etermined alL the structures Q) and thefonnats (3). fhe remaining rletal].s of the algorit]rn are now aLnost to the point where actual,3.y 1802 instructions would be next; if the probl-em ls still a mystery, you have litt1e choice but to go over i.t agaln. Looking for nod.ul.arity (5) is just a matter of chopping the problen i.nto chunks Ji'ou can handLe, without havlng to deal with alL the details of a big job at once. Too maJry details create confusion, and. confusion creates errors, A good, rule of thunb is that the function of a module can be tol,d in one sentence. If you canrt d,o thatr chop i.t smalLer. .In nUSt cases, a module should reqlrire no uore than aboui 188 bytes $ll page ) to reduce the chances of emors r which improves reliability. If we carrTr mod.ularization far enoughr werLL arrive at the structured pro'grarnming ideal--functional uniqueness. lhe whoLe point to these steps is that if YOU don't understand what you are trying to dor VourlL never get your idiot computer to do itt llhe way we advanced, the pointer 3.95.29 v (Z) and (3).aescribe the data which is part of the problem (addends and for ADD), and may incLude auxiliary data which is not part of thb \?, pfoblen, .but part of the computer sol-ution. We couLd includ.e the add.ress of 'the numbers for ADD, or at least the first one the way we did itl ltve -onitted it because the add,ress is the'iurmedj.ate data in the \11 instructions. Ilata basicaLly coqes in three ttrpesr exGluding floating-point and (at least orr.IBIUI machines) packed decinalr character, numerical, and logical or Boolea4. All- T/O Ls done with character d,ata,. in A.SCII code (except if you have equipnent usihg other cod.es) ana unless the d.ata is a number on which werL1 be doing arittrnetic, werll leave it in ASCII in memory. Each character occupies 1 byte' with the Low-order 7 bits containing the ASCII codel the highest-ordbr blt is parity, which werll usually stiip off (set to 0) after input, and. itrs avaitltte for speciaL us€.- If the frlO device uses parity, this bit wilL be a L to bring the total number of t-blts-in the byte to an even (even parity) or odd (oda parity) totaL, and. we might check this on input to i.nsure the vaLidity of the data. ,We d.onlt need. parity in memory, so werll get rid of it to leave this bit for thiirgs like indicating that a byte i.s the last of a string, instead. of using another whole byte to contain some spec5.al code (Oetiniter) to indicate the end.. UsualLyr vr€ rI1 need. more than one character for a data Iten ("157 Qharter Rd.,") and. the itemrs length wiLl be the number of characters (t6t the " are d.eliniters, not part of the string). In this case, "157" is a number, but we rvontt be adding/subtracting/etc. so itts sum l not numericaL datal If it yvere numericaL data, doing arithmetic in ASCII is awkward and ineffi.cient, so we'd. converi "L5?n (#ltlSlZ) to binary (#go) and. save 2 bytes in the process. AlL the blts in the byte are now part of the numericaL value, unLike the high-ord,er Jrs in the ASCII. ObvioBslyr whiLe 157 fits in 1 byter w€ may be dealing with different ranges of val-ues for datar &Ird werll- require'different numbers of bits to hold then. Your 4o-hourwork-week-fits-in 5 bits (101ooo), and your $aof salary fits in 1J (foof11ooo1o0000) if it's in whoLe dolLarir or'in 18 bits (ttff0t00001001000000) if itrs in pennies because werre working with integers. Thatrs 1-J bytesr and the anount of memory need.ed. for each item wilL depend upon the range of values it can have. There are conventions we should. exaririne before going wild with oddball S.engths for numerical data. Connon lengths are-tr 2, l+, and 8 bytes (8-5ll bits) or Longer, but always twice as long as the next-shorter; if we muLtiply two 8-6it values, the prod.uct wilL-have up to 16 bits (tne Length of the prod.uct is the sun of the lengths of the nultiplicand, and. nuLtipLier). ObviousLy, we can't go shortei than I bits with byte addressing. Hey, what about negative numbers? We might have negative resultsr for-exa.mp1e, if we subtract 1 from 0. In hex, #OO - #Ot =#FF; and.' #IlE + #Ot = #trF. If we see the work, rrerl-l know that the first answer is -t arrd the second. answer Is 255, but if we're just handed the vaLue, which is it? That dep.ends on whether we're taLking in signed or unsigned numbers, and that is-soneti.mes an arbltrary d.ecision. Ad.dresses are unsigled numbers, and we nay d.ec5.de that all our vaLues. are uns5.gned. if the problen pernits. If not, the l{SB (most-significant bit) is tne sigrr which is 0 for + and 1 for -; zero is stilL #00, so itfs consj.d.ered to be positivet fhe sign is not part of the vaLuer so signed and unsigned integers with the sanre number of Uits (including the sigr) have different ranges of values. 3. A5 .2r \, \, rt 'r \- \\#ri- {ttr, h h- L tlL .,j' - \- '*L L ,\i'-- i L I t.- iii q." '\- t' U \, of va1uesr however, is the same either way. For an 8-bit integer, there will- always be 256 (zB) vaIues t 0-255 Q to e8-1) it it,s unsigned t -LzB to +1.2? ( -( z(8-1) ) u z(8-1 )-11 ii- it ts signed. when we subtracted 1 from 0, we "wrapped. around" our 8-bit value, just as you can_ yrap around the counter on your cassette record.err of, a cheap adding machine wouLd. show 99,999,99 after the sane subtraction. It rnay be a LittLe easier to look at the adding machine first, then carry our findings to the computer \ Most adding machines will show one more digit in the tota-l than you can enter on the keys' for overflowr so Vou dontt lose significance too easiJ-y. Tfe could enter up to 9 1999.99 on the example urachi.ne and the extra 9,rve in the "sigrrl position, clues us to overfLow when addingr or gone negati-ve in subtracting. If we rve subtracted and tne that we extra p shows upr the result is the 10rs compl.ement of the true.value. Th" 10rs cornplernent of a number is the value-which brings the nunber to 10' or to 0 if we run out of pJ.aces to carry into; in this case, itts obvi.ousl-X t. The 10rs comp. is aLso l more than the 9rs courp.e which would. bring each column to a totaL of 9; in this case, 001000.00. If yourve ever used, such an adding machine, you aLso know'that.this oddl-ooking number only shows up if you print- it on the tape (t/O), and that if you continue to add and subtract to a positive total, it prints The number out eorrectly The sa.ne thing happens in binary, except that our digits are bits and the complements are Zrs and1!si the sign-bit is that extra, overflow digit. [a^king 0000 0001 from 0000 0000 gave us $11 1,t1,tr so the extra digit has shown upr clueing us to a negative value. Since binary can get messy with a l-ot of carryirg, Let's find the 1rs complement by bringing each column to 1r 0000 0000 (just cha-rrge alL 1rs to 0's and all Ors-to 1's). Add.ing 1, we get 0000.0001 , and finally, w€ change the sign to get -1 (without the Leading Ors). As with the addingmachine, going negative sornewhere d,uri.ng a chain of addition and subtiaction will not affect the total-, and. negaiive numbers are a "probIem".onLy forI/O, mul-tipli.cation and division. In these casesr.w€ look for a "-" character on input' convert the number as if i.t were positlve, then subtract it from 0 (which is easier than getting the 1rs comp. and adding 1); for oufitut werLl, l-ook for the sigyr-bit = 7-, then subtract the ntmber from zero,, convert it to ASCII, and create a rr-rr to output to the left or right of it. For nultlplication and divisionr rrerLl use only the absolute values of numbers, keeping the signs separate; if the algebraic sigr of the resul-t is -, weaLL-negate the result. If wefre really on the ballr rr€rl-L d.o the sign aLgebra for all operationsr (e.g., a negative result fronTadding since an unexpected change of sign toverfLow" two positive integers) indicates and a l-oss of significarr,ce. Data which is neither character nor numericaL is J.og5.cal-, or Boolean r and has two possible val-uesr true and. false. Only 1 bit 5.s required to store a Boolean vaLuer so 8 conditions may be represented by a-single byte if we want to do it that wd.]r At other tines we may want to rnake a J-ogical d,ecision based on d.ata which j.snrt Boolean and will be formatted according to other requirenents. A 0-bit is false, and. a 0-value for other data types i.s aLso false; a 1-bit is true, and aJry non-?ero val-ue for other tSpes of data is also true. For example , if we get a 1-byte error code back from our subroutines, where f00 is 0K and 01-FF indlcate the tlpe of errorr weld ask, "Error?" by checking for 0r or Error=False in Eng1ish. If thatrs the caser wetd proceed normally. If 3.95.22 r vi\ the byte is non-zero (Error=llrue in Engl-ish), we'Il output the number toqthe user, and probably stop to wait for his comecti-on. 0r, wetd \tl tranelate the nrrmber 5.nto a text message instead. of glving the poor user a mere code-nuhrber. In a more sophisticated envi.ronilent, we nilnt use the error cod.e to d.eterurine our actionr send, a message and keep going, V{ send. a message and stop for the soLutionr selld a message and abort, or even' attenpt an automatic recovery (fite re-reading a floppy 10 times) ] I 1 I | for help Yl 1861 and. other vid.eo or hardcopy gr3phics invol$e bit patterns which are either picture elements (pixels) or color codesr BtG.r and these Yl are cLoser to logical. data than anything eIEe. We night not think in I terns of "true" and "false" (unless the question is t'li.ghted?"), but i YN the data makes even less sense as a character or number. I lftren we've d.etemlned., possibJ.y after several repetitions of Steps L-5, I what aLL the data is', werll af,Locate memory for lt. ltle night not have Yl a partlcular Locatlon in nind' Iet, but werlL estabLish the.ord.er of I the Ltens so werll have relative ad.dresses frour the start of the datal when we know that adrires-gfift-simple adriition to convert the atidresses Vl to absolute. I Like to put a1L the constants first (titles, text mes- t sages, etc.), especially'if the progran may be in ROM eventually. The I varlables ,Trhl.ch w11,1 have to be in RAM r wiLL a1L be together, and you vl tron't have' to reanange thingB as much to split the R$I-abLes from the I RADt-abl.es; putting the variables on a separate page of memory heLps I even more. I aLso put fixed-length varlabLes at Lower'' ad.dresses than Vl vaglable-Length var-iabLes, espeeial.J.y if the naximum length is Linited I only by the anotrnt of memory on the machine. For exanple, I have a pro- , , I gram whLch hand,Les text as one long Line for input and editing, and the vl onl-y ltnit on the J.ength of this 1ine is having memory to hold. it. If I add. memory to the machine, both the end of memor"Jr and the rr?.1(. end. of . II before' yeJ.Ling .! 1 the line move outward together by changing only 1 paraneter in the pro- vl garrr (for output, a variable estabLishes the lengtn o'f a line on the I prLnter, vLdeo screenr etc. r so the prograr d.etermines where to break . I the text into "lines'. The untouched text can be output on devi.ees withvt different line-lengths.) I UsuaIIy, all the data will fit on one page, with the exception of i.tens Vl and expandable text. For the data page' one Ilke vid.eo-screen-memory I register becomes a *base pointer, " and any i.ten can be reached. by put- . J tiXg lts low-ord,er addres-s into that haLf-of the registeri severlL-ltensvl wnlcn are need.ed ln a messy order of, access may need ad.d.itiona1, tempora- | byte of the original base.^_l ry base registersr cr€eted by copying the high i,nto more registers. ff therers a separate video buffer and,/or text, - I each wlll- have itrs ovwr base register' either permanently or tenporarily (wny tie up a register aL1 the ti.ne for occasional use?). '*{ Next tiner "top-down" design and "bottom-up" cod,ing. _l J J 3.s5.23 *l rl \, \'lr '\- t\' rii, ,t,il, \. ll\- 'L '\_ {l* : ,:,Nl- "\* Hi Ray: I just received my issues of the VIPER. f think itrs great. Ifve read through thenr and have not seen anything on medlum res. 64 by 64. f wrote my own version of CHIP-8--I call it CHIP-BETA. ft has all the CHIP-8 instructions plus the I/O instructions,from 8X to run the Simple Sound and player 2 Hex keypads. The main feature is 64 by 64 grapblcs. I coul.dnrt live wlthout itl The DRAW program from the 311 nanual can be used immedlatel.y without conversion to draw things in medium res. I plan to sell copies of CHIP-BETA for $5.90 a copy. If there is anybody lnterested, wrlte me. Also, in the Sept. 8l issue of BYTE magaq,ine, there is a clrcuit called the rsweet Talker' It runs thror,lgh a parallel port. I belleve it could be interfaced to the VIP using the Q-line and operated .Iike the Sinple Sound board. This circuit would glve a 4K VIF a lggt plus word vocabulary. Has anybody done it yet? FSS Softwarw company puts out a verslon of FORTH for the SuperELF. Does anybody have lt running on a VIP? I think FORTH would be a great third or:forth (pun intended?RS) language for the VIP. also, is it Fossible and has anyone built a five to etght sl.ot I,/O board that is programmable for the VIP? This would be great for using a printer, noden, soundr voicer etc. I tried wrlting rAsterolds" but couldnrt do the asterold part very well. Is there anybody out there wlth a copy I could buy or trade for? Well,, congratulations onlthe VIPERT and keep up the excellent work. I plan on documenting ny VIP double array function and sending it in. I use it in a program to conputer 16 by 16 nazes. WeIlr best of luck in the future. Good computing!l Ron Applebach ITlgG E. Bethany Circ1e Aurora, CO 80913 ADVENTURE FOR \- VL2! YOU vl.! )' ).:L ).L )r u , \-, )\/ i\'' tr f onrned to pnovide r w&y IP users announse the adventune programs ls proud to . nelease of our flnst progrem entitled It takes place ln medieval tlmes ln the 1egel$gny kingdon gf__lgnelot' VIP. sevenaL ylans aften Klng Anthurrg death.ft w111 nun on-a-lfK iSCif keyboand.in addition, thene are thneo trmLni adventunestt "ittt-"" on the fllp sld.e- of the cassette that w111 run on a ltK VIP wlth Tiny Bastc, The cost of the cassette ls $8,95rs}:rLpping changes inciuded. Make checke payable to Nathan Gopon, and rnaLL ordens toI ffior vrP ADVENTURE, UNLTD. MA' a?067 168 Pond St. Sharonr Many more ad.venture s soon to come I 3. g5 .24 COSMAC VIP Autoeall Systen by Georgc S. Gadbolg lfl3FEY ' gcrvlcc for about $5.00 provldc Spccdeall(R) Conpanlcs Tclephonc per month. You can havc youf own autocall syetcm uelr€ a nlcroproccssor for a nodcst capltal lnvcgtncnt and alsoet no opcratlng eost. A elnplc autscaLl syetcrn uslng thc RCA C0SUAC VIP ls dcscrlbcd hcrc. If yori donrt llkc thc fcaturcs, Just ehangc thc softws,rcr Try gcttlng Ma -'- Bell ' !o changc hcr scrvlcc featwce, --T[r'-ncl--iii6e iitctuproci"Eor-li an cxccllcnt eholgc for eontrol functlons around thc honc or radlo chack, Buildtng a mleroproccssor systcm fron thc ground up ie an lnt'crceting and somc$lncs fiuelratlng cicrclsc, fhsrc-arc nany noldcrlng nleroproccsaor rcpcatcr: eontrol*proJects around to attcet to thc frustratlrrg naturc of bullding supposedly ainplc rnlcroproccssors. If you cnJoy sueh exerelgcs, flne, but lf you Just want to gct on wlth the Job, lct eomconc clsc do thc dog wortc for you. Tte RCA vIP has all thc hardwarc you nced for slmplc tr/O proJccts wlthout b-Urdcnlng your poekctbook. Tho buffcrcd bytc lrl0 intcrfacc ls. caelly lntcrfaecd wlth cxternal loglc or rclays+ The VIP Autocall cystcm dcscrlbcd hcrc rcqulrce r trK RAt to support 'thc hlgh rceolutlon graphies dkplay uecd for opcretor pnonpts and date dlrplay, If you'1I settlc for lecs eophletleatlon ln thc grephlcgr Vou can utc a ZX RASI. Onc pegc, 256 bytcs, 18 sct esldc for storagc of phone nurbcrs. Thls pcrnlts twcnty-one t2-dtgtt nunbcrs to bc etorcd. If you want to storc morc nunbcrc, you can rcduec thc naxlnun lcngth or lnorcasc tha elsc of thc buffcr erGe. fws addltlonal pelca of RlJil cen ceelly be nede avelleblc ln a 4K vIP. lhc VIP lutoeal]. usce a Moqtck l[I(5089N lntegratcd tonc dlalcr ts gcncrate thc standerd touchtonc(R) frequcncl-cs. If you are llnltcd to a dlel pulrc cxehangc, can change the progran to gcncretc dlel pulscs. Thc clreult chownlrou ln Flg. 1wiII gcncratc thc fulL t+ by t+ tonc natrlx, opcnlng rcmotc control, posslbllltlcs not avallablc wlth a standard ionc padl Ac writtcn, thc "#" key ls uscd ae thc "cnd of nunbcr' kcyl howcver, thlg can bc caeily changcd ln thc goftwnrc. A nodlflcd CIilP-8X lntcrprctcr with a hlgh rcgolutlon dtsplay routi,ne ls uscd in thls syeten. This choLoc wae made bccausc gf the CttIP-8X output to port lnetructlon and the pleaslng r,ppcaraneG of thc hlgh rcsolutlon graphLce. C[IP-8 could bc uscd wlth a neehlnc laig;uagc subroutfnc fsr thc tonc output. Notc that thc nornal CHIP-8X bytc !.nbut lnstructlon got dlsplaeed by thc hlgh rcsslutlon dlspley routlnc. But ia ts not nccdcd for thls appllcatlon. Thc nsdiflcd CHIP-8X lnterpretcr oceupl-cs Benory locetlone 0000 to 02FF and lc ghorn es e' Hcx dunp ln Tablc I. Thc Autoeall progrr,n ls shown wlth conatcntg ln Tablc IL Bceausc an cxccss of ncnory wes avallabla, thc aubroutlncs and meln progfan wero widely acpa'frted to rnakc modlficatlon and dobugging c&sy. A convcnlent ncthod for opcrator mcssagG gancratlsn le provldcd by atorlng ncssagcs ln ASCII codc and thcn looklng up thc approprlttc character dlsplay patternc ln e ncmory buffcr. Thc nrodificd CHIP-8X and mesgegc gcntretor wGrG wrltten by Stevc }Iouk of RCA for a norsc kcyer_progran. Ihc.lutocall progran uscs thc ASCII tablcs only for lntcrnal message gcncration so no ASCII kcyboard ls rcqulrcd to usc thc Autooall systcn. If you rrvant a nGur ncaatge you cen antcr thc ASCII cqulvelcnt Hex codcs. Tha mcssagG buffErtb on page 0500-06FF, NUL-codc 00 denotcs cnd of I nOggrtgc. '3.95.25 \, \\\- l"1\. )'1i'\, )i\),"\_ VIP Autocall 0B,frfr gtBB FFg4 8286 Tabl FBCF frg|g B4r8 1BA4 r80t B5r8 figzg 45AF 1616 F6r6 3244 gg3g A6g5 F6r6 1616 FgFg frg 4fr A3D3 3 618 SFFA grB 3 gg,g saaL srgl grgr frLfrr gg6g gs'7c 758 3 8895 B4B7 g07a 3frAfr 45FA grAF 3298 ggSg E2g6 FATF FEFE 3B8A gggg ggSF BCtz g75C SCFC g0Ag rSFg AD3s 7256 l68F gsBg A69 3 A7 8D 3 2D9 g6F2 gscg 5cfi2 FBfr7 32D2 1Cg6 gaDg 5c 2C 168C rCgS AC 3g ggvg F8g4 BFFS FFAT 9BBC ggF'g 42A5 D48D A787 32AC 0lgg gsag snsg sg 47 A398 gLLfi 22DC L256 D4g6 B8D4 frIzg F4AA 38 28 gArC t{ lBA 6L3fi 0AAA D4E6 968T 93BE fir4g gErs 3B4B 56gA rcgl frLsg 562A 2AD4 fr922 8652 gL6g lA3A 58 12 D422 8652 0I7 g 1A3A 68 12 D415 8522 frLgfi orB 5 D4 4 5 E6r3 3A8 2 0r9g D445 A73e 8C45 s73A gTAg D4 3E B8D4 FETS A7E7 frLBU rcst B5D4 4556 D445 gLcs c4 fr7 56D4 AF22 r8D3 gLDg 5618 FFA6 FSgg 7856 gIEg F456 7686 F4B9 5645 gLE'g BAD4 figgw ggB6 ii , i\, ,U I tr \- 6 3D4 gzss l3sfr 017A 427fr 2278 g2L0 r'Agc B g E2 E2E2 3C 14 s22g BB88 3293 7ts28 3gs4 g23A AD g6 F'Ao 7 BEg 6 r'A3r B24g rErE 3846 lDlD rE3B g25g 0F AD A7r8 DgA6 94Ar B26g 8832 6C9D F 6BD 8176 g27g 5616 3956 D3EC L'8Dg s28s 2D32 8618 rIAT 4613 g29g b'232 9 6r'8 01A7 g61 3 gzAfr TCgg BCFB 1g3A 7BF8 g2Bg A787 3274 2A27 3gB1 trzcg 3 4BC 98 3 2 294ts zts 88 AzDg 9 2BD T'8 9F ADF B C$BC gzvg scrB 9L32 ECFS 915C gzPg 8265 22D4 fifrbfr gagg eI A2F8 gzBL FAAs D4 96 F950 ACSF a7 4C B 38C 453fr 4fr22 F8s6 AI9s B7E2 94BC FA0F FgFO FCCIF AC gC 69I2 DA6G gLfiz gI TgT sLgI stsg BCgl EB7 g Dg2F ggff5 46rA 3FF6 1616 2252 1D lD FE 38 8E1D FIAC gSAC 2F8F 3A9 4 D4 D4 s6l 6 3g8E 0frEc r8D0 2D32 BEFS rLAT 4 6F3 8',232 CEFS glAT g613 E6r8 lC2r 9T 3A EAD4 3gDA 42E-5 94AC 2A27 3015 3AB3 3gDg 9 4 5C 56D4 r881 BCFS 9 sAL g6A8 D464 gAgT E68A D4r8 81BA g6TA OFAA IB AE 2A lArS frasA 5A30,4948 16 3C 3C9r r8F0 A7g7 5A8 7 r 317 rS rSFg A7gA 5787 F317 7395 5225 45A3 86FA tsl5 D445 E6r3 3A88 8486 6226 45A3 3688 514 A586 FA0F 3BB2 E6F4 56D' 4 sFA gtr 3A 738r F9Fg 5 286 fr7D2 D4 19 IgAE 93BE 9gEE 1256 D445 AA8 6 FA6F 3gF5 fr229 GgEfr fig4B 4 2252 C41e F8 0 S AggB 3418 9832 21AB 2B8B s198 FPg3 BEn4 01gB F6r'6 \'622 52A7 FATF 4A1D F'lAC SDBC 45rA 8732 AF27 4ABD gEAE AF2E 3fr6fr 9D56 l 68F A694 ATBD 32A7 s6E2 5Cg2 FBfi7 329A lco6 5C2C 168C rcg8 Acgc BFA6 8756 L2D4 CI t 8D 0LDA 3CB 5 BfrE? zfrAg ts888 3273 7ts28 3fr7 4 9 4AC F'BAA 5C9 4 tsCAC FBg 1 5DD4 r'809 5DD4 fr295 82D6 g2BI g[t48, 3.05.26 v Table I VIP Autocall gLss EsEg EgEg EgEg EgEg EgEg EgEg E0EB EgEg g4Lg EgEg EgEg EgEg EgEg EgEg EgEg EgEg EgEg s42g 779A B5BF TCBA CgAg 6EC4 CEgg 97 9 4 78Bs g43g 287 2 424D 3;g4s 4432 4648 A89D 8BA{ I 98 5 s44g SLss 6A18 6614 l62t fl325 3496 54gD 6g2E g45A 5rlc s83C 29lg 6LsC g95B 3868 ACC4 D3DC g469 tAlc AflDE CEFE 27 3F I 351 3E9s AC76 D6BB g47g g4gA 1818 7372 E7D8 g8E5 8668 Agc4 A486 g,gg AgEg hgLg cgL6 Ag4g AgAg EgEg AgAg Eggs EgSg EgSs 8g8A EgAs AgEg SgAg AgBg t g4g -;40f,e 4g4g 4g4g EgAg EgzA 2g2A- agAs Egzg 4s8s EgSs 4g2g Egzg EgSg EgAs EnAA Egzg zgvg zgvg AgEg 8s8g 8g8s EgAs cpLg Ag[s 4s49 AgAg Ag4g cgLg AgAg CgAg EgAg cgSg cg4g ,4949 Eggg gggg gggg 4gBfi 4gEg EgAg SgEg aggs sgSg 4g2g 4g8s 4g2g Eg[s gggg Eggg gsgs 4g4s [sgs 4sgs gggg ggvg ggBg sgLg 0g4s ggSg 4s2g 4g8g ggAg Aggg Bggs Ag2g 4g8s Aggg Asgg 6g2a 2029 6s4s Eg20 Eg4g gg4s gsD,g Ag4g g64s AAsg 4g4g AgAg Ag4g gggg gggg sSEg sggg sggg ggEs IE77 ASTA 88D5 .BE8F 2C 5r sSFg c89A 9984 DFFC T.FEF :36A8'9llE EFl7 3 312 EgAg E0AA sSLs AgAg a52g 2gE0 s53g AgLgl g54s EsSg g55g zgvs s56s EgAg s57s 8,s8s s58s 4ggg g59s gs4s g5Ag 4g49 gsBs sa2s g5cg Ag4g s6ss 56 49 5s2s 4155 544F 4449 414C 4552 g03l g6Lg 2D49 4E5s 5554 2C32 2D53 4548 44gg 49 4E s62g 5955 5429 5s8g 4F4E 4529 2g2g 2g2g 4855 s63s 4D 42 4552 2E2g 4548 442s 5749 5448 2922 s64s 4622 gg53 4548 4429 4855. 4D42 4552 sg44 g65g 4r'48 45gg 4855 4D42 4552 2953 544F 524 5 s66s 44ss 494E 4445 58 3D sg 49 4844 4 5 58 2s54 g67g 4r4F 2g4C 4152 4745 gg2g 2g2g 2g2s 2g2g s68s 5459 5945 2s 49 4E2s 4D45 5353 4L47 452A s69g 5448 45{E 2s5A 5245 5353 2s2A 292fr 2g2g s6Lg 5245 54 55 5248 2646 4F52 2g4E dE4 5 2029 g68g 584D 4954 2s 4F 522s 2s2g 2g2s 2g2s 202s s6cg 4c49 4Ed5 2946 4545 4429 4641 5229 2g2s s6Dg 5245 5s45 41 54 2s58 4D49 542E' ggg0 gggg g69g 4255 4646 4552 2fr46 554C 4c2r ssSE 2C 5r g6?g c89s 9984 DFFC FFET' '3ge8 911E Er 17 33r2 3.95.27 \t' ASCII PATTERN INDICESI V Y Y ASC I I DISPLAY (' PATTERNS MESSAGE BUFFER !rt i Y \\l' "1,,\- \, )n] Add ress s3gg s302 s3s4 s3g6 s3g8 g3gA l\/ t ,\, lrttllr tr Clear output to t,tK5689 llessage indexs iVIP Autodialer" Di splay message Delay \ 69ss 27 5s 6880 27Ag 16gA 46sL 13IC 4692 s 316 318 g 3lc s3 .i 6EFT D..ET8 s3Ls s312 g30E g3lA ollr Conments 69 gr 27 5g s3l4 f ,:lt- Code s3gc s iL. Table I I VIP Autocall lE fi329 s322 9324 s326 s328 s32A g32C g32E s33s s332 s334 138 s I 3gC 27 gg 691E 27 58 t35s AA6fr rAlE FggA Fg55 4gsv I349 TAgL TCsL pg29 63 36 D455 s338 033A s33C g33E 7 g34A 6954 2758 68 8g 27 Ag I 3sC 9342 s344 9346 s348 4s5 4CgC L34s I 324 s35s 9352 6Cgg s 354 7 s3s6 64ss sls L324 Message 3 Dt spl ay It l-Input r 2-Sendt Wait for Hex key if gL ( input ) *) to 13lC Go tf 02 (send) t) to 1389 Else loop back on inval id input to r 3gc Go to buffer index subroutine l{essage 3 ' Input Phone number . End wlth tFr Go Display Go to g35g Phone nunber buffer lndext points to gAgA Wait for hex key Store digit just entered Go if tFf (entry finlshed) to L34g ELSE Increment index polnter Increment count Display digit entered at XY location of Y4, V5 In€renent X co-ordinate of display: Test for 12 digits ln buffer Xest then buffer full; Go to A340 No? Then go to 0324 and get another l4essage:'Nunber storedr Di splay X=X*5 Delay Go to start of programi menu at Count = gSgC g6 Next line of dlsplay Go to 9324 Phone Number Send Routine s38g s382 s384 f, \- 6Cgg 6943 27 5g s38 6 27gs s388 g38A 68s 3 646s sls s 38C 7 0388 AAgg Count = gg llessage : " send number o Di spl ay Go t,o Index number subroutine V8=A3i tone duration (about Sgmsec) Next line of displaY; V4=gg (X co-ofdinate) V5=\f5+L0 ; ( Y co-ord inate) Phone number buf f er index i po ints t,o gAgg 3.95.28 v VIP Autocall Table II (con'd) address Code Comments s39s 6392 s394 rg65 Vg=d ig i Index into buffer t to be sent V TCgL Test for tF! (end of digtt string) Yes? then Go to 9'386 No, then increment buffer pointer and Display di9it Increment X co-of,d inate Po lnt to Touchtone ( Tlr) code YA= 2 of I code for output to tttK5g89 Output Vg to I/A port Go to delay Subroutine Clear output Go to delay subroutlne Test fo r 12 d ig I ts sent ; Vc=count Yes? Then Go to 9386 No? Then to 0388 and get another digit V 'g 396 s398 s39A FATE 4ggt' l386 TAgL a39C rg2g 0398 g3Ag s3A2 D4 55 7 4s5 A9 s6 3A4 EgIE s3A6 Eg65 FgFS 27Ag g 6 3A8 63AA g3AC g 3AE sSBg a3F.2 g3B4 0 386 s 388 g 3BA g 3BC g 38E FEFS 27AA 4CgC 1386 l38E 69 4r 2758 688s Ag r 38s 27 Phone Number g7 gg g7s2 97,g'4 g7s6 s7 98 a7 gA gTgc gTgE ls s7 97 t2 s7 L4 g7 L6 s7 18 gT lA 97 lc g7 lE 97 2s g7 22 s7 24 s7 26 g7 28 6962 2758 Inc rement count Ftessage: x Doner Di splay the nessage Delay Subro ut i ne Go to nex t phone number Buffer Index Subroutine Irlessage ! " Index=' Display message 7 495 D4 55 Wait for Key Press Display HSD of index number V4-V4 +gS i Inc rement X co-o rd i na te Display i t If V6=A8 Then Go to 6717 o else If V6=A! THEN Go to 9728, else Go to Er ro r message Wait for Key Press Display LSD of index number V4=V4 +05 i Inc rement X co-ofdinate Di splay i t 8A6E 8A64 VA=VA+V6; (=3*V6) F6 gA 8629 74s5 D455 46gs l7r6 46s I L7 28 17 3E rSgA E'629 SAAE SAAE OAEE 6A l6 972A g72C F6 gA 672E, 87 65 g7 3g s7 32 v 6704 3rg l 17 38 VA=z*VG VA=6*V6 VA=I2*V-6; (= Buffer Ret urn po inter i Set l'lSD egua I to for Key Press Test for Index(= 14 Hex VA= L0 Wa it Go to er ror nessage 3.95.29 one ) V V1 .. l V rl \-' \I \\- lni\- VIP Autoeall Table II (con'd Address Code Comnents g7 34 8644 1718 V6=[6+VA ( = INDEX] Go to gTLg E'629 Di s7 36 s7 38 a7 3A g7 3C s73E g7 4s s7 42 g7 44 g7 46 a7 48 g7 AA s7 4C s7 4E 07 sfi s752 g7 54 7 4s5 D455 6969 27 s8 6880 6962 L704 gggg gggs ggvg 646s 65sg l7 5C s7 56 s7 58 97 5A 64gs 675C A6gg g7 5E g7 69 g7 62 g7 64 s7 66 s7 68 g7 6A s7 6C g7 6E s77 g s77 2 s77 4 s77 6 s778 977 A 977C g77E s7 8s 9782 s784 s786 s788 s78A s78C 07 8E s79s g7 Ag g7A2 g7A4 s7 A6 97A8 splay LSD and Di splay i t Flessage : il fndex too large " Increment X Co-ord inate Delay 27aG 27 5g 7 5I0 19 1E r 965 79sr 4ggfi ggEE 277 s l7 5C sggg gggs A4gg rg lE ['g 65 ASgg r'g lE D4 55 4s4 344s 7 ggEE 7 5Ig 64ss 58s ggEE 3 ggvg 64gg 65sg ggBE 18l5 rDo 7 3Dgg T7A2 ggEE ) l.tessage 3 " fndex=t to g7g4 and try agaln filIer Eraqe d isplay Set d i splay co-ord inates to o" Go Go t,o g7 5C Set X co-ord of display to gg and increment Y co-ord for next d isplay 1 ine Message buffer pointer Vh=ASC I I Cha rac te r increment buffer i V9=V9+0L TEST FOR END o f message (gg Is EOt't flag) Yes? Then returll r otherwl se Go to character display subroutine Get next character ti*1er Point to ASCII Code table Table po inter Vg=Pointer to display pattern Po int, to character table pattern Pointer to display pattern Di splay character f nc rement X co-ord of display Test for end of l ine Return i nc rement Y co-ord of dlsplay and Set X co-ord to 6g for a new dlsplay line Test for end of page Re turn Erase screen Set X co-ord to gg and Set y co-ord to gg Ret ur n Set Tirner=V8 VD=Current Timer value Test if Timer value=$$ No? then Go to g7A2 and check it again Yes? Then Return 3.95.39 v\ v ?r-: lt -: : 5 -prrn rZ *Wufr ", C l'{ K D. 3Y ----.-:, DATI r?.,?'r,.'-' t- .a:--- -f -t ---.--- - -- --t---Q--'- r u 8., Ecr- y - Jtl f: - r*&r€.li It?, LEJ.K EEf NO. - - d- 1- -_:?F, -- rir;,r JoB No. -WPE Ey--- 1,-ri,'J !5 H - 1 1- - _. -- + o - ! - ? -.. :-i- rF- -..| :!r.?- - ;-i'. ' Y \ Y Y +tY v v, t( c I t5 / I5 ? { 5 6 7 o o\ ss ID Y t I ,t{ fi Yi t? n !o Y. ? \ y V+ t rc EfffiC 2 la, coLumfl I 3 14 coluilf, 2 4 o\ !3 coLfflrr 3 Edo r2 v. 6$ s II '-D GNflt osc til osc ouT o't l S ?E I v v v y v U !0 Y I Y Y 3.95.31 v ' iir \/ i l DRIVING A BAUDOT PRINTER t^lITH THE VIP \- BY GERALD KRIZEK TTIIs PRoGRAM Is AN ADAPTATIoN OF A PRoGRAM PRESENTED BY B, Mrllen rN lpso Flcro #6, ploe 38, Even SINcE I nlve nln BAsIc oPERATING IN mv VIP,I HAD wISHED UIIFoRTUNATLv, A DEcEEII PRINTER COSTS THE BETTER PART OF A KILOBUCKT MUCH MORE THAN MY HOBBY BUDGET woULD ALLow. OWNING A TTIETvpe MoueL 15 FoR AMATEUR RADIo usE, I-_nno BEEN GoING T0 wRITE SoFTwARE To usE IT wHEN I cAME AcRoss fvlt Llen ' s ART I cLE , I HAVE ADAPTED TH I S PRoGRAM FOR USE ON A VI P RUNN I NG RCA, S VP7OI FLOATING POINT BASICT HENcE THE LocArroN (0600-07FF), SevTRAL MoD I F I cATI oNS TO VP -7OL ARE NECESSARY FOR TH I S PRO= I Hno soME soRT 0F HARD copy GRAM TO RUN ourpur, I FI,Rsr: Slnce rHe 0 LINE IS usED FoR THE SERIAL ourpur, THE KEY DEPRESSED TONE MUsT BE DEFEATED, Do THIs BY cHANGING LocATron 2094 FRoM 02 ro 00, SCcoNO: THT INTERUPTS ASSocIATED WITH THe TV oUTPUT REALLY FouL_up rHE TIMING FoR THE SERIAL ourpur,_-T0 KEEe rHE TV oTT PERMANENTLY, cHANGE LocATIoN 186A FRoM 98 ro D5, Tnlno: TnE BASIc TABLE THAT CONTAINS THE ADDRESS oF THE ourpur RourINE MUsr BE,cHANGED. CnRnee LocATIoNS 2060 2061 FRoM 08 00 ro 06 20. TTIIs PROGRAM REcETVES THE AScII CHARACTER AND FIRST DETERMINES rHEN cHEcKs WHETHER IS A "spAcE", "LETTER"T 0R "FIGURE", LAST THE cHARAcTER THE IeTlTIe MEMoRY To sEE wHAT t'tAS AND DETERMINES IF IT SHOULD oUTPUT A ,,LETTERS., OR ,,FIGURES,, FUNCTIoN BEFORE IT OUTPUTS THE BAUDOT VERSION OF THE ASCII INPUT. IT Tnen cHEcKS THE LoOK-UP TABLE AT THE AScII ADDRESS AND ourpurs rHE DATA AT THAT LocATIoN, THe ourpur Is MADE up oF ONE START SPACE, FIVE INFORMATION BAUDS, AND TWO STOP MARKS, Tnen rne lrnenlrrcuRE MEMoRv IS UpDATED AND THE VIP nerunns TO BAS IC. - - - Ir tr TII{TNc Is sET FOR N 60 hlPM SNUOOT MACHINE. Ir N HIGHER IS usED, THE DATA AT LocATton 06E2 wILL HAVE To spEED MAcHINE ADJUSTED FOR PROPER TIMING. Slnce THE cOMPUTER IS TIED UP WHTLE OUTPUTING A CHARACTER, ANY INPUT AT THE ASCI KEYBOARD DURTNG EXECUTION OF THE OUTPUT ROUTINE t{ILL BE IGNOREDT STncT A BAUDoT PRINTER DoES NOT HAVE SOME OF THE CHARAcTERS IN THE ASCI CHARACTER SET, SOME SYMBOLS DUE DOUBLE.DUTY AS NoTED BY THE ASTERISK IN THE LOOK-UP TABLE LISTING, TTITS HAS CAUSED ME NO PROBLEMS, TnT UNUSED MEMORY GAPS IN THIs PROGRAM ALLOwED ME TO EASILY NM NOT PRESSED FOR MEMORY IN THTS AREA, MAKE cHANGES. SINcE oto Nor BoTHER T0 coNDENSE THE PRoGRAM wTTL ge HAPPY TO ANSWER ANY OUESTIONS ABOUT THIS PROGRAM THAT ARE MAILED To ME. PLTASE SEND S.A,S,E, I I I 'lL ti' illi ,ll1 lll lil ilii '\' fl, 1i ill .i. ,;ii \, i, I I GERALD Kn TaEK 722 N. MoRADA AVE. WEsr CovrNA., CA, 91790 3.95.32 BE AF I 5A F8 06 5C BF 5D F8 00 5F AF 54 30 eC 56 8F 57 D4 06 B0 0651 D4 06 B0 4A 9F 4B FB FF 4D 32 9C 4F F8 81 41 FB 2A 43 52 9C 45 8F 46 FE FE 48 tB 90 0540 PROCESS ASCI 40 22 22 22 56 t0 3t 32 02 RF GLO FF RF SPACE RF OO RF PHI LDI PLO I CALL PRINT 06 LJI CLO RF tt t t a t t t L0AD I T0 LETTER G0T0 069C ( ( ( RF.l I{ITH LET/FIG .; a 2ll.S.B. "LETTERS" G0T0 059C lF SAl,lE, BR t ! T0 FIGURE, G0T0 0690 OUT COI'IPARE ASCI IF I SAI.IE, GOTO O69C SHIFI IF COIIPARE ASCI : OUTPUT i t t a t t t a i , t t t DECREI'IENT STACK t BRAilCH T0 0640 t LDI 81 CALL PRINT BZ 9C GHI XRI SHL SHL B]{F 90 9C 20 BZ XRI PLO RF R2 BR R2 LDN DEC L_g€(((( (d t, a (rt Q w a I I'lEltl LOC. ( ( R5 GHT RF R2 INC SEP I C01ff. R2 DII RE R2 INC R2 PLO ut{ R2 RE R2 R2 RF 00 56 PRINT SHL ( f ( FE I RE CO]*IPARE RETURN ASCII TO REST0RE D REST0RE G0T0 0680 . t a t ; 't t t ta ; ; ; t t ,. tI I T0 RE.0 2 n.S.B. SHI ( ( FT OUT Il, S. B. START SPACE SHIFT OUT LOAD DATA FROI{ L0OK-UP TABLE 07 T0 RE,l ASCI G0T0 0680 L0AII ,'LET' INTO LET/FIG llElq. (_ t OUTPUT ASCI I t LOAD RF.l t{lTH LET/FIG I'lE}l LOC. ; G0T0 0656 ta t FIGURE LOAD "F I G" I NTO LET/F I G llEltl t I F SAIIE G0T0 0656 i OUTPUT "FIGURES" a t ' ; tI t t t tI t ta i t t tI t (__f (, SHL SHL sE0 RE RE BB 07 RE RF Dl{ PHI rDl PLO BR STR FF RF PLO LDI RF OO LDI 06 PHT tDI CALL RF CALL DELAY AE B0 GLO BR 81 F8 07 85 BE 84 OE 85 FE FE 87 78 88 D4 06 E0 0680 PRIIIT MBF A3 F8 00 A5 AF A6 F8 FF A8 5F A9 t0 80 9D D4 06 06A0 F8 06 9A t0 9C 8F 91 FB 00 XRI OO 95 t2 56 BZ 56 ut 80 95 F8 80 97 Dq 06 BO CALL PRIIIT 06e0 9F RESTORE D ; t r{c R2 I PHI RF L2 BF 2F 0630 L2 OF PR0CESS ASCI 85 L2 84 02 85 AE 86 L2 87 02 88 12 89 D5 PHI INC BE 82. I t t tI t r EOAII RF.I I{ITH LET/FIG I'tEl'l LOt I t tI IilC TDN 02 81 BR 0680 12 ; a EXIT RE D r.I'I STR 62 5F 63 30 80 ASCII CollT,, 0660 F8 00 PRoCESS ta SAVE SAVE LETTER/FIGURE ]'IE]'IORY LOCATION t RF OO RF I ; t ; RF AF BF PLO LDN 2A 2D 2E R2 STR 29 F8 00 RE GHI 06 R2 LDt PHI LDI R2 STR DEC R2 R2 RE STR 2L 52 22 22 23 8E 24 52 25 22 26 9E 27 52 28 F8 06 R2 DEC GLO DEC 22 0620 EIITER 0600 \r) t-b a o \Jr a \r, 7A C3 C9 FF C4 C4 C4 C4 FF 01 F8 52 D5 Dq 06 D4 06 LOOP l{ -r E0 C4 E0 CUNRETTi W I DELAY i R5 IF IF t t ; t t RETURN RESTORE D G0T0 05E3 IF J'IA . -.-.-.-r PRI IITER KevBoARD L-€ I N PARALLEL SElecron ners I D#0 llne Ar{D THE qELEETOR MAGNETS 60 D RETURN PRINTER INTERFACE LL BE APPROX , DF=O D=0 SEND STOP I'IARK G0T0 0688 SEND SPACE G0T0 06C4 SEND I'IARK G0T0 06Cg G0T0 06C5 t SAVE t DELAY CONSTANT ; D-l t DEI-AY t R2 FF SFII 01 t{0 0P 1{0 0P BNZ E3 LDll RZ SEP R5 LDI STR SEP CALL CALL t BNF ; REO ; BR t sE0 t CALL DELAY 't BR RE8 t BZ rn A L?V SUppLy EA 3A E3 EC 02 ED D5 E5 E5 E8 El 06E0 DEI..AY 06D0 cA cD cr, 30 c4 c3 78 c4 D4 06 E0 c7 30 BB c9 7A 06c0 06BC 32 BE 39 PRINT CONT. THE 23 22 L3 OF 2A 2F 1B 0730 33 34 55 36 37 38 39 'A 3B tc 3D 3E 3F OF ZE 2F 27 L3 lD 3D lF 1I) 07 19 39 29 03 15 33 2L 5B 3L 3L 32 OD 2C 2D T7 3D 28 29 29 OD L7 2F 27 24 25 26 25 2D 2T 07L3 OD 0723 1t 37 29 05 37 09 OA 07 0700 DATA BAUDOT FEEI) ?? it ( = aa al aa // 00 11. 22 33 44 55 66 77 88 99 t_ tt s$ SPACE t3 r( t_ 7 ',l && (( )) tt +*& nn SP !! OD OF 0740 17 41 'L 42 27 43 il) 44 25 45 2L 46 2D 47 L7 q8 0B 49 L9 qA 35 48 5D 4C tt 4D 4E 4F 07 0750 LB 51 38 52 15 55 29 5t{ 03 55 t9 56 lF 57 33 58 2F 5y 2B 5A 23 0780 37 sL tF ADDRESS DATA cc zz l{}l. XX YY vv TT UU ss ,LETTERST "FI GS" DD EE FF GG HH TT JJ KK LL l,l il t{N 00 PP 00 RR e8 AA BB ASCI.L BAUD0T IS SHOULD ENT. I{HICH THERE IS TO I{O BAUDOT EOUIVAL- }{ERE CHOSEN ) CHARACTERS FOR I REPRESEITIT ASC I BAUDOT CHAR- NOT SHO}{N ABOVE 01 AS DATA. * ACTERS I'IARKED ( CONTAIN THAT ANY ADDRESS BET}IEEN OTOO AI{D OTFF CARR. RET. LINE BELL ."FIGS" DC-5 *oFlGS" NUL I BEL LF CR ASCI I T0 jAUp0T _100K-UP TABLE ADDRESS ASCI WP Hobby Computer Ass oeiati jZ Ainsworth Avenue East Brunsryi ck, NJ 0881 6 on *l I*l *1 yl *l ul 1 *l g yl A PINAL tf0RDr This lssue of vrPER ie the.largeq! !o date put out byvrpHcA. r 5oPg-that yo-u.wlll-enJoy lt and flnd the materlal wortnwhlle. ft really ls a blg help wtren you can_eend in ii"t c""-i" ju"t "pasted u!': speakln€ _q{ !*erial, Richara "aiari.r wara-sent o. in a cHrp-g verslon of the gtpe of wlupIIS which runJ- in inr Oic-vip. nrit-rriJ--i""niis ducumentatlon, which is ls-on"r r!-nrgrrt -of-juifil"i'e"r" -lq piE""l-il eonslder havlng a-speciartupellr iuuricatfot for those who are lnterested, Let me kn-ow whl{ t;" irnii. oi-nr;il"p" r ehoutd 5--Just prlnt tt in parts-al a part oi {te vlpEn. Let nre wish all of Hollday Season and a rorthwhile Lggzl After thls lssue of^y-9g-a-happy vrPER, th6re wlll-be one rnoi" io" in" ;f9[1;'-' soog- artletee in in; ean, riciuarne T"H*":Ilp ry3". I have ieverat anvthlng speetar vou'isht-rr.[;-i; 3"Ii"ri"?:"ufi[]'ol]l"ltuxl"rl3ie ! j 3i : e1 _l yrI i i v1 -l 3.05,35 vl .t yt I