the. coco

A patriotic program for the coco See Page 9 THE COLOR COMPUTER MONTHLY MAGAZINE March 1993 Vo l. X II No. 8 Canada $4.95 U.S. $3.95

Feature Program Feature Program VEF Graphics for

Disk BASIC by Thomas Wong

ne of the CoCo 3 ·s best features grammers agreatdeal of developmem time. has always been its ability to The program presented here. VEFit, al­ create very detailed graphics lows CoCo 3 users to take advantage of this images through BASIC ur a format. VEFit allows yuu tu save any 0graphic s editor such asSpectra3 (THE RAIN ­ HSCREEN in memory as a VEF-format di sk BOW, October 1990, Page 10). Over lhe file, then view the image at a later time. years, many different file formals for sav­ With the excepti on ofType-2 VEF images, ing th ese creations on disk have been intro­ any VEF picture. including those created duced. However, as the disks also fill up un der OS-9, can be viewed. The Type-2 wilh th e wide assunment of th" picture image uses a resululion of l 60 by 200. with savers and viewers necessary fo r the differ­ 16 colors -- a confi guration fo r whic h there ent formats. it becomes obvious that a stan­ is no HSCRE Etlequi va lent. Thankfully, Type- dardized format sho uld have been devel­ 2 VE F'> are rare1y used under OS-9. oped earlier. Few of the numerous fonnats invented are programmer-fri endly or pro­ Getting Started vide support for more than one screen reso­ VEFil requires a Coco 3 with at least ver th e years, my Color Com­ Users with CoCo I ' s or 2' s must con vert lution. Meanwhile. OS-9 Level ll users I 28K and one disk dri ve. To get stan ed, pute rs have seen over 25 joy­ the program so it uses the PCCKC65280J have been able to sit hack and enj oy the enterthe listing for VE F r T. save the program sticks come and go. But until functi on to read the bulton since the BU TION 0 l wrote Joys tick Checker. I had command is available only on the CoCo 3. Byte# Bytes Description no easy way to detem1 ine if the joysticks In formati on about doing thi s appears i'n the were dead or alive. More recently, this short BAS IC manua l. Compression: o~none, 128=squashed utility has helped me with joystick repairs. Joystick Checker is a useful program Note: VEFit supports no compression To use Joystick Checker, enter the pro­ that should be in every CoCo user's bag of gram as shown in the listing and save it to tricks. 2 Lape or disk as JOYT EST. After running the program, simply fol low the screen prompts to derennine if your joystick works. If the Trevor Boelun is a tenth-grade student joystick does not have a second button (I ike whose greale t passion is challenging com­ the one on the Tandy Deluxe Joystick), the puters with new programs. He has partici­ program will break out of the loop after it pated in several sc ience fairs and has re­ tries to read that button. Other fa ilures will ceived numerous awards for hi s work . He cause the program to loop endlessly -­ can be contacted at 77 Inwood Cres., press BREAK to abort. If the joystick per­ Winnipeg, MB R2Y I A2, Canada. Please forms fine, the program reports the success include an SASE when requesting a reply. on the screen. See program listing on Page 3

-- -- -~ ---- VEF forrnat that essentially came with the to disk, then enter RU N. • Alphabet Scra mble 4)Modify W indow Descr iptors operating system. After a short pause, you are asked to by Keiran Kenny ...... l! by Ernest Bazzinott i. Jr...... 6 The VEF fonnal has ga ined wide accep­ select the type of monitor you are cWTem ly Back Issue In fo rmation _ _ 7 Monthly Calendar tance in the OS-9 world for good reason: usin g. This is an important factor when ES)> Coco Consultations by Harold H. Bri nen ...... _.. 15 it's a srraightforward fo nnat that fits the loading or saving a pictu re )s palette values; by Marty Goodman .... _,_,,_,_ 4 • Reproduce Old Glory intended job. With suppon fo r five resolu­ since composite color monitors (or TVs) Delphi Bureau by John R. Mott Jr...... 9 tions. four of them perfecr for BAS!c's and RGB monitors differ in the ways they by Eddie Kuns ...... 4 Tips, Tricks a nd Tra ps HSCREE N resol utions. it is easy 10 sec tha t • Fast GET/PUT With Skipper by Tim Kie ntzle ...... 13 VEF could have saved Disk BAS IC pro- VEF Graphics continued on Page 10. by Keiran Kenny ...... 3 ES)> Twenty O ne (a nd Over) • Joystick Tester by Trevor Boehm...... 12 by Trevor Boehm ...... l . VEF Graphics for Disk BAS IC Letters to Rainbow --- 2 by Thomas Wong ...... 2 March 1993

We imagine there are ut /easr one or rwofor Sugar Software? I have some disks from THE RAINBOW creating music through BASIC09, as well. Sugar and am having problems with them. My Jerrers are returned marked "No For­ Pascal a nd Trouble Booting OS-9 warding Address." Editor and Publisher Editor: John W . Anderson Lawrence C. Falk Regarding the inquiry by B.N. Gregoire 1709 W. Union Street in the December issue of THE RAINBOW . Lancaster, OH 43130 Managing Editor Tandy did market a Pascal compiler for OS- Cray Augshurg 9 Levels I and TT . The product (Cat. No. 26- We' ve tried to duplicate the problem Associate Editor 3-34) was reviewed in the December 1989 you are having. and the only way we've Sue Fomby issue of THE RALNBOW. In addition, it is been successful is to use an empty input Submission/Reviews Editor currently in s!ock and available through file. Make sure tltefile you intend tn print Julie Hutchinson LETTERS Radio Shack Express Order. is a standard text file that actually contains Technical Editor I have a Radio Shack FD-502 disk con­ text. In the meantime, we have forwarded Greg Law troller that runs with Disk BASIC. When I try your letter to the author. Technical Assistant to boot OS-9 with rhis controller by entering Ed Ellers DDS , however, I get a syntax error. I don't Needs Help With OS-9 Contributing Editors have this problem with my Disco Super Editor: Martin Goodman, M.D,, Controller II. Any suggestions? I have had a 128KCoCo3forabout five Tim Kiemzle , Eddie Kuns John Kolb years now. Alrhough I am very experi­ Consulting Editor 20-4F Mos/tofu Pkwy. S enced with the CoCo 3, there are many Laura Falk Looking for CoCo l's and 2's Bronx, NY 10468 things about it that I don't understand Art Director Editor: abour OS-9. When entering commands O'Neil Arnold To support our R&D work with deaf We' II venture a guess: Since you have the (such as date) at the OS-9 prompt. I fre­ Designers chi Jdren, I am looking for working CoCo Disto controller , it is likely you have in­ quently get errors (especially Error #249). Sharon Adams, Heid i Nelson l "sand 2's in good cosmetic shape. If any stalled and swapped a few different DOS Am I doing something wrong? Do I need Editorial Director readers of THE RAINBOW have spare units chips between the controllers. Could you special software? John Crawley they• d be willing to sell, they may contact have installed Disk BASIC 1.0 (which dis­ Also, what is BASIC09? And how do I me by phone, letter or fax . Thank you for plays as 2.0 on the CoCo 3 startup screen) in type in those weird listings in THE RAtN ­ your kind a'5istance. the FD-502 controller? Disk BASIC 1 .0 does BOw? You know the ones that look like Falsoft, Inc. Norman Lederman not support tire DOS command, whereas President Oval Window Audio Disk BASIC 1.1 (which displays as 2 .1 on cite setend lda lf$Dd carriage return Lawrence C. Falk 33 Wildflower Court CoCo 3) and most other DOSs do. sta .y+ to end of path General Manager Nederland, CO 80466 Judi Hutchinson (303) 447-3607 (Phone/Fax) Dueling Computers Jesse Burr Asst. General Manager for Finance Editor: 2 Lombard Lane Donna Shuck Wants Telecommunications Articles I liked the idea you presented about put ­ Eastham, MA 02642 Asst. General Manager for Editor: ting a PC nex.1 to your CoCo (" Print#-2," Administration I want to send my kudos to THE RAIN · May 1992) and decided to imitate it, though Unlike Disk BASIC , 0S·9 does not al­ Tim Whelan BOW for its fine work. Through time, I've l ' m not ready to invest the money required ways ke ep all of its commands in memory Adntlnistralive AssL to the managed ro coll ect every hack issue. T also for a new Imel-based PC as you suggested. - there are simply too many of them. Publisher want to point out that it looks like the future I decided to purchase a 640K PC-XT with a Generally, some commands are automati­ Ellen Patterson of the CoCo and its community is going to monochrome monitor, a hard drive, a mouse cally loaded into memory when you hoot reside in telecommunications. Already and srnne software. XT systen1s have been OS-9. The others are saved as separate Bookkeeper/ Dealer Accounts Delphi and Fido-NET play a big pan in advertised in this area from $275 to $350 programs on disk and are loaded when you Debra Wilson keeping us connected. It would be nice ro with various accessories. need them. Customer Service Manager see THE RAINBOW provide some more ar­ l hopero use my Tandy DMP-107 printer When you enter an OS-9 commar1d, the Marisa Cro uch ticles on telecommunications. maybe in with both theCoCo3 and the XT. The DMP- operating system first checks to see if the Customer Service Representative preparation for the rime when CoCo users 107 is supposed to support IBM codes if the program is in memory. Jfso, OS-9 rims the Lauren Yates no longer have THE RAINBOW, or in the DIP switches are set appropriately. Radio command. If not, the system looks for the Business Assistant event THE RAINBOW moves its existence Shack sold me a DB25-to-36-pin printer program in the current execution direc­ Shannon Yaffe onto the Delphi services. Such articles would cable (Cat. No. 26-288) that is supposed to tory 011 disk. For this reason, you should Corporate Business Technical Dir. help solidify the community by helping us connect the XT to the DMP-107. I want to keep your OS-9 system disk i11 Ihe current Calvin Shields keep connected. I don't deny the need for know if a switch box is available that would drive - at least until you gain a clear Chief of Building Security & Maint. other articles, but ir seems the subject of enable me to control which computer is understanding of the directory structure Lawrence Johnson telecommunications is underrated or over­ connected to the printer without disconnect­ OS-9 uses. looked (not covered as frequently), yet it is ing all the cables. I'd also like to know if and An Error 249 is generated when you Advertising: one of the things that holds our community how programs saved on tape for the CoCo 3 attempt a disk operation 011 a disk with a Western Sales Director together. It would be a terrible thing if our might be loaded into the XT (other than by format OS-9 does not u11derstand (e.g., a Ira Barsky (312) 587-1818 community broke up - it certainly would retyping them). D isk BASIC disk, or an OS-9 disk with a Eastern Sales Director be the demise of our powerhouse 2-MHz RL.Aldrich different number of tracks or sides). The Kim Lewis (502) 228-4492 Coco. 2505 Bernard most common errors received by novice Jason Gross Denton, TX 76205 users are 214 and 216. Error 214 is a " 11 0 For RAINBOW Advertising and Mar­ I 122 Crosstown Boulevard permission" error, whiclttellsyoutltatyou keting office Information, see Page 15. Chaska, MN 55318 Jn addition to supporting DIP-switclt don't have permission to do what you wa11 t control, it sltould be possible to put the to do. The most common cause for this We agree that telecommunications is DMP-107 into the IBM mode by sending error is trying to list a directory or per­ THE RA.INBOW is publishadeverymomholthayea1 form a ·di r on a si11gle file. Error 216 by FALSOFT, Inc., The Falsoft Bulk:llng, 9509 U.S. very important to all CoCo users. This is (printing) a few control codes on a com · Highway42, P.O. BOK 385, Prospect, KY 40059, phone why we see "Delphi Bureau" as such an mand line from eirher computer. Many elec­ means "pathname not found," which tells (502J 228·4492. THE RAINBOW, RAINBOWtest and THE RAINBOW and RAIHBOWfeat logotypes are reg­ importo111part ofTHERAINBOWeachmonth. tronics outlets offer parallel printer switches. you a) you mistyped the command line (or istered trademarks of FALSOFT, Inc. e Second class And we encourage all CoCo owners to Look through the ads in any electronics included/omitted necessary spaces or postage paid Prosped, KYari:I additional offices. USPS N. 705·050 (ISSN No. 0746·4797). POSTMASTER: actively use the communications resources magazine for sources. We suggest you. get slashes), orb) the file/program does not Send address changes to THE RAINBOW, P.O. Box 385, Prospoct, KY 40059. Authorized a.s sooond class available. the kind of switch tltat accepts 36-pin exist in memory or the current data and pos!age paid from Mamilton, Ontar,o by Canada Post. Centronics inputs.Also, you" JI need an extra execution directories. Ottawa. Ontario, Canada; GST No. Al 25434092. • Enti'e con1ents copyri;1hl c by FALSOFT, Inc •• 1993. OS-9 Help and Pen Pals cable to go between t/1e switch and the Whew! We' II leave you other questions THE RAINBOW Is int11nded for the private use and pleasu1e of its subscribers and purchasers end repro· Editor: printer. for other readers and a future issue. Jn the duciion by any means is prohibitfld. US4t of Information 1 want to know how to build fonts under meantime, for more information, consult herein is for ihe single eri:I use of purctiasers and any other use is expJessly prohibited. All programs herein OS-9 Level II and create music using BA­ Printing Sideways the "Getting Started" section ofyo ur OS- are dls1rlbu1ed In an ·as Is" basis. without warranty of any kind whatsoovor. • Tandy, Color BASIC, Extondod S!C09. I would also like to receive letters Editor: 9 /,pvef If manual. The knowledge you' II Color BASIC and Program Pak are registered • trade· from prospective pen pals bet ween the ages Ihave aCoCo3,an FD-502 diskdrive.an gain is well worth the time it' II take to read. marks ol the Tandy Corp. • Subscriptions to THE ~:n~!1~~~;eu~~ f;~ .v;~~~~~~ i: ~:::u~~~:~ of 10 and 13. RGB monitor and a DMP- L07 with a Blue Is U.S. $68, air ma. ii U.S. $103. All subscri ptio ns begin Nathan Price Streak Ul rima serial-to-parallel interface. 1 Help With the Lingo with next available issue_ • Limited back Issues are 658 Bo11d A venue am having a problem with the program in Editor: avalable. Please see no!Ce for Issues that are in prin; and their costs. Payment acceoted by VISA, Mas1erCard Valparoiso, IN 46383 "Printing Sideways" (April 1992) . Every Being a novice in the compu!er world , American E11pr1:1s:;, cash, cttedl. 01 money orde1 In U.S. curroncy only. Full rnhmd aftor mailing of ono issuo. A rime T run this program, after the prompt Tam confused by !he many different le!ters relund of 10l1 2ths the subscriplion amount afler rwo Several programs for creating and edit­ "Condensed-Standard" appears, I receive Issues are mailed. No refu nd after mailir.g of three o r used ro describe computers (e.g .. EX, DX, more magazines. ing Level If fonrs are available for do w11 - an I E ERR OR I N 670 message. AT. PS/2. CAD/CAM. etc.). I am sure loadi11.gfrom theOS90nlineSJGonDelphi. Also. does anyone have the address for these designations have some meaning. March 1993 3 but what they stand forisanything but clear to me at this time. Please be assured that I have asked around only to find that I am not alone in this. What I need is a list of words to go along with the le11ers so I can have some idea of what people are calking about. David Donnelly 120 FDR X-1 TD 5000 : IF BUTTON ( 1 1612 Diplomat Drive )01 THEN NEXT:PRINT"NO SECOND B 'JOY TEST LITTON, I ASSUME .. . .• Fayettevil/e. NC 28304 'BY TREVOR BOEHM 130 PRINT"GOOD. NOW MOVE STICK T 'COPYRIGHT (CJ 1993 0: H Some of the terms you mention are sim­ "RY FALSOFT. !NC . 140 PRINT" UPPER LEFT . .. " ply names used by differenr manufacturers 5 'RAINBO W MAGAZINE 150 GOSUB 240: IF X<>0 OR Y<>0 TH 10 'CHECK YOUR JOYSTICK EN GOTO 150 to designate differem computer models. 20 'FOR COCOl/2 ALTER BUTTON 160 PRINT" LOWER LEFT .. . " For example, EX is the last part ofthe name 30 'TO PEEK STATEMENT 170 GOSUB 240: IF X<>0 OR Y<>63 T for a specific model a/Tandy 1000 (as are 40 CLS HEN GOTO 170 HX. TX and RLX). and PS/2 is the name of 50 PRINT"JOYTEST 1.0" 180 PRINT'" UPPER RIGHT •.. " 60 PRINT" 1992 BY FALSOFT. IN 190 GOSUB 240: IF X<>63 OR Y<>0 T a line of computers marketed by JBM. c ... HEN GOTO 190 The other items you menrioned are acro­ 70 PRINT""ALL RIGHTS RESERVED" 200 PRINT"" LOWER RIGHT ... ·· nyms for different computer techniques. 80 PRINT: PRINT"'PLUG JOYSTICK INT 210 GUSUB 240: I F X063 DR Y<>63 terms a11dapplica1io11s. For example, CAD/ 0 RIGHT PORT" THEN GOTO 210 90 PRJNT"AND PRESS BUTTON ...• 220 PRINT : PRINT"JOYSTICK CHECKS CAM stands/or Computer-Aided Design/ 100 IF BUTTDN(0)01 THEN GOTO 10 OU T OK! H Computer-Aided Mamifacturing. You can 0 230 END find definirio11sfor this latter group ofterms / 110 PRINT"NOW PRESS SECOND BUTTO 240 X-JOYST K(0):Y-JOYSTK(l) N..• H acronyms in any good computer dictio­ 250 RETURN nary.

Feature Program Skipper Shows Fast GET/PUT

Operation 1tr 11.i ... 11o."'

kipper is a short program that uses out program operation. Line 30 sets the tine at Line 70 puts the basic figure on the "speed"GET/PUTcommandstopro­ values SP and SL according to whether you screen after you complete and store the duce an animated simulation of a are using a CoCo 3 or an earlier model subsequent frames_ Sgirl jumping rope on the PHODE4 CoCo. Then the appropriate poke is issued Jhope you 'II agree that, despite the large screen. The program requires at least 32K in Line40. During the display you can press size of the frames, the animation is fairly of RAM and Extended BASIC. CLEAR to stop the program and restore smooth and flicker-free. Part of Skipper's speed is a result of the operating speed to normal. way storage space is allocated. In Line 20, If you use any sort of boot utility on your space is set aside for ten 128-by-l 28 frames_ disks, you may find that this program freezes The DIM value of 409 was arrived at by at Line 80. If so. do a cold start and run the Keiran Kenny's interests lie mainly with dividing the square of 128 by 32, then program directly from the disk. the Color Compu1er's graphics and math reducing the value until I got an PC error, Ifyou want to substitute yourown graph­ capabilities. Bur in his own words, "/ like to which occurred at OIMA(408). Using this ics image for mine, add SCREENl .1 to Line try everything." He may be contacted at method in other programs, I have succeeded 90 and enter a "stop" line: 980 GOTO 980. vanMontfoorrlaanJJ,2596SPThe Hague, in dimensioning space for twenty-six 48- Draw your basic figure beginning at Line Holland. Please include a self-addressed by-48 frames. using 57 as the DIM value. 130 and. when it is complete. store the envelope with sufficient postage when re­ Another aspect of Skipper's speed comes frame labeled 8, asinLine 170. Thesubrou- ques1ing a reply. from the way even multiples are used for defined locations. As shown in Line 110, the values for the top-left comer of a frame are multiples of eight, and the values forthe lower-right corner are one less than a mul­ tiple of eight. All GET/PUT statements in the listing conform to this protocol, and G or The Listing: SKIPPER 25 , 51): PSET(l31, 51): LI NE(l28, 52) 390 CIRCLE(128,96),34.,1.9,0,.5 PSET options are not needed. - ( 128, 55), PSET: DRAW"BM12B, 57NL2N 400 GET

Delphi has added both FTP and Telnet! communications charges while Telnetted lines for any use of Internet services-read These options are available only from the to another computer. However, most users these guidelines before you sign up for any Internet SIG, so to find out more, just enter can reach Delphi without paying long-dis­ services. To learn more about exactly what GO REFERENCE INTERNET to get to the tance races. Once on Delphi, they could services are available, enter US I NG INTERN ET Internet SIG. From there, enter FORUM and connect to another computer that would SERVICES at the main menu of the Internet read Message 1197. otherwise incur long-distance telephone SIG, then read the fi le I'M NEW! WHAT 00 What are FTP and Telnet? FTP stands charges. These people may benefit by using I DO? . for File Transfer Protocol, and is the Internet the link from Delphi to Telnet to the remote protocol for transferring files fromonecom­ computer. For example, college students puter to another. Like Internet mail, FfP who are home on vacation might be able to file transfers count toward your monthly use Telnet to connect to a school computer Eddie Kuns is pursuing a doctorate in IO-megabyte Internet transfer limit. As I without having to call long distance. physics at Rutgers University. He lives in explained a few months back, Telnet is the If you are interested in using these fea­ Aurora, Illinois, and works as a program­ service that allows you to logon to a com­ tures, you must read and follow the instruc­ mer and researcher at Fermi/ab. Eddie is puter connected to the Internet from any tions given in Message 1197 in the Internet the database ma11ager of the OS9 011/ine other computer also connected to the SIG Forum. There is no additional charge SIG and can be reached online as Internet. This means you can use this ser­ for using FTP or Telnet, but you must EDDIEKUNS. vice from Delphi as weU as to Delphi. already have registered to use Internet ser­ You still pay the same Delphi and cele- vices. Also remember that there are guide-

data compression can be problematical. Double-Sided Access was 011 . Do you have a11y tips for fixing a MNP 5 data compression is usually not A What are the pokes for enabling Radio Shack Multi-Pak Jnrerface with a helpful if you are transferring files that have ~ Disk BASIC to gain access to the back similar history? already been compressed using an archive side of a double-sided disk drive? Dennis McMillan (COCOKIWI) program. Indeed, on occasion, MNP Scan Bob Williams (BAW/ILIAMS) Pittsburg, California actually expand a compressed file, result­ Cedar Hill. Montana ing in an increase in the time it takes to .... Howard Medical released a service transmit or receive it. Some modems sup­ If you are using Disk BASIC 2.0 on a A notice a while back that indicated the MARTY GOODMAN port other forms oferrorcorrection (CCIIT A CoCo 3, enter th.e following com­ most likely chip to get blown when a user V .42) and other forms of data compression mand line: removes a cartridge from the Slot Pak with (CCITT V.42 bis). the power on is the 74LS08 chip. Thus, I'd I use simple MNP error correction when POKE &H089 F, &H41: POKE &HDBAO, &H4 2 suggest you stan by desoldering that chip. logging on to the CoCo SIG, and I find it a then installing a socket and a new 74LS08. WhatisMNP? nice convenience since it eliminates the These pokes define Ori ve 2 as the back side Howard Medical also noted that the Slot A Please explain the significance of occasional noise characters I used to get of Drive 0 and Drive 3 as the back side of Pak powers slots A and B from its external ~ MNP level numbers i11 modem when listing longer Forum and Mail mes­ Drive I. IfyouareusingDisk BASIC2. l, use power supply. but the last slot is powered communication. How can MNP be ofprac­ sages. l don't find it all that important for addresses D7 AC and D7A O instead of D89F from the CoCo's power supply. This infor­ tica/ use ro me? Delphi use, though, because in a case where and 08AO above. These pokes work only on mation may be helpful to those choosing John L . Wilkerson (JW/LKERSON) you absolutely must get an error- free trans­ a CoCo 3. which card to put in which slot, for you Reynoldsburg. Ohio mission (e.g .. downloading of binary files), A much better modification for using don' t want to draw too much power from you're going to use a protocol download double-sided drives is found in ADOS 3 , the CoCo (which has only 100 to 250 .... MNP, which stands for Microcom (Xmodem, Ymodem or Zmodem) anyway . whi ch not only redefines the drives but mill iamps to spare). A Network Protocol (no relation to Such protocols as;;ure error detection and fi xes some other subtle problems that cause Fort he Multi-Pak Interface, after testing Microcom Software), capability typically error correction. Still, users who find li ne the head of the drive to get "lost" whenever the power supply, I'd consider replacing is built into the firmware (software in ROM noise to be a bit of a problem wi II appreciate you swi tc h between sides on the drive. IC 1 (an LS245 chip) an d IC2 (an LS367 chips) of a modem. MNP levels 2 through 4 what MNP error correction can do. chip). These chips have the same IC num­ enable the modem to automatically check Making a Modem Cable bers on both models of the Multi-Pak inter­ for and correct errors that occur due to line Model I Monitor for the CoCo 3 How do I construct a cable 10 con­ face. noise when "talking" to . another modem A Cari J use a TRS-80 Model I monitor nect my RS-232 Pak to a modem? with the same capability. Telenet and ~ with my CoCo 3? Fred Trivett (FREDT) Parallel Converter on the Blink Tymnet (telecommunications services that George Hill Augusta, Georgia A l have a Microfazer serial to para/­ can be used to connect to Delphi's CoCo Haverhill, New Hampshire ~ lei convener with 64K buffer built in and OS9 online SIGs) support MNP error .... ModemswithDB-25connectorscon­ that is now ma/functioning. Half the char­ correction if you are connected at 2400 bps. .... Yes, but it's tTi cky. TheTRS-80Model A nect" straight through" to the RS-232 acters come oul wrong. Any ideas? This means that if you use an MNP modem A I monitor uses a 5-pin DIN plug for Pak. Actually, onlypins2,3, 4,5, 6, 7, 8 and Ted Jaeger (TEDJAEGER ) that is correctly set to use its MNP capabil­ connection with the computer. One 1ine on 20 are used, so if you are soldering your Fulton, Missouri ity. all noise characters that occur when it is this plug is ground, and another line pro­ own cable, you really need only a nine­ connected to Telenet orTymnet at 2400 bps vides composite video. You can use these conductor cable. You may find, however. Often when halfthe characters printed will be eliminated. The tricky pan is telling with the composite-video ponon the Coco that your modem does not echo characters A are wrong, the problem is that a single the modem to use its MNP capability. 3. However, th e Model [ monitor also re­ when you enter commands in the command bit in the parallel port is " stuck" either high In my experience, different modems re­ quires a well-regulated source of5 volts DC mode before connecting. There are two or low. Compare the ASCll codes for the quire different (and often confusing) com­ on another pin of the 5-pin plug. Thus, ways to fi x this. One is to issue the AT &CO misprinted characters to see if you can find mands to enable this capability. so it is you'll need an external 5-voltpowersuppl)' command, then make thi s setting a default a single bit in the 7-bit ASCII representa­ usually essential that you have the manual to make the monitor work. by entering AT &W . This works with many tions that, when forced high or low, would for your modem - read the section on Unfortunately, I don't recall what the modem 2400-bps Hayes-<:ompatible mo­ explain what you are getting. After this, you MNP operation several times. You need to pinout forthe 5-pin connector is. and I have dems that have internal non-volatile RAM must find where that bit is stuck! Often the set your modem to "Auto-Reliable" mode, no references for it here. If you arc able to for parameter settings. Alternatively, in­ problem lies in the output latch (usually an in which it turns on its MNP capability track this information down, be sure that stead of hooking Pin 8 of the modem co Pin LS373 or LS374 chip) on the parallel port. when it sees the same capability in the you hook hoth 5 volts and ground from the 8 of the RS-232 Pak , try hooking Pin 8 of Determine which chip is supplying pins 2 modem it is calling. For my Racal Vadic power supply to the appropriate pins of the the RS-232 Pak to Pin 20 of the RS-232 pak, through 9 of the parallel ouputofthe buffer, 2400-bps modem, I must enter (in com­ monitor. If the monitor is working, it should leaving Pin 20 also hooked to Pin 20 of the and see if replacing that chip helps. mand mode) AT &*El to enable automatic accept the standard NTSC 1-volt peak-to­ modem. This is another way tn force the error control, whereas on my Muhitech pcak,composite-vidcosignal that the CoCo carrier detect line high in the RS-232 Pak, 2400-bps modem, the proper command is produces. which is required to tum on its internal Manin H . Goodman , M.D ., a physician AT &El. (After entering either of these, I Depending on your situation, it may not receiver. trained in anesthesiology. is a longtime entered AT &W to make the setting a power­ be worth the effort to resurrect the Model I electronics tinkerer and outspoken com­ up default.) monitor. Those monitors were of fairly Slot/Multi Pak Repair mentator - sort of the Howard Cose// of There are other MNP options that many poor quality even when new, and you can ,A I've got a dead Howard Medical the CoCo world. On Delphi, Marty is the users find confusing. For instance, MNP 5 obtain much better used composite moni ­ ~ Slot Pak. Do you have any sugges­ S!Gop of THE RAINBOW's CoCo SJG . llis and up are designed to be used for data tors for pretty low prices in most urban tions on where to start when repairing it? I non-computer passions include running, compression. Neither Telenet nor Tymnet areas and through the classified-ads section believe ir was blown when someone un­ mnuntailieering and outdoor photography. currently support MNP 5, and using MNP on Delphi. plugged a cartridge from it while the power Marty lives in San Pablo. California. March 1993 5 DEPHI BUREAU DELPHI BUREAU DELPHI BUREAU DELPHI BUREAU DELPHI BUREAU DELPHI BUREAU DELPHI BUREAU DELPHI BUREAU DELPHI BUREAU Advanced DATABASE REPORT C++ LI B UP DATE OS9 0 nline: Forum Details VAXELF Jolin Donaldson General Information: OSK Applications: Last month I described many of the Two more useful qualifiers for DIR 6309 ADDITIONAL IND EXED MODES QFEO: FONT EDITOR FOR GWINDOWS key Workspace features and commands. are rs INCE and / BEFORE, which are used CURTISBOYLE Cunis Boyle PAULTE SCH Paul Tesch Most of those we didn' t cover relate to to Delphi to display a directory of the KIX \30 MANUA L GWINDOW S FILE REC OGN [ZERS uploading and downloading files, but files created or modified in specific a FHOOG Frank Hogg JSUTEMEIER Jim Sucemeier we 'II first take a look at a few general time interval. If no interval is specified, NEW FARNA ITEMS commands. the default is TODAY (ISJNCE- TODAY and DSRTFOX Franci.,. Swygen OSK Telecom: lfyou wanttocreate a short fileonline, {BEFORE- TOD AY displays all files). You MICRO CHART S ATERM V2 .6 CEXEC/S RC ) entering just a few lines of text, use the can specify I S INCE- YE STERDAY , or you JSUTEMEIER Jim Sutemeier SMARTCOCO Dan iel Boulanger CREA TE command. For example, suppose can specify a date in the format KIX / 30 EURO -K BU S PINOU TS STERM: MODIFIED FOR ZMODEM I was throwing a party and wanted to I S I NCE- 2B - MAR - !992. You can also use FHOGG Frank Hogg JSUTEMEIER Jim Sutemeier inform five local friends. I could use both /S INCE and I BE FO RE with dates lo AOVANCEO Ul! LS FOR OS K IN FO TERMINAL VER SION 1.0 CREA TE to build a Mail distribution list as specify a range in time. EDEi.MAR F.rl Ciresick DODGECOLT Mike Sweet follows (the italic text is what I enter): You can combine the / SIZ E, / SI NC E, I BEFORE , I EXCLUDE and / DA TE qualifiers Applications (6809): Tutorials & Educalion: WS> CREA TE PAR TY. OJ S arbitrarily. The /GRAND_ TOTAL qualifier ESP TESTER PRENV : PRINT ENVIRONMENT is incompatible with the / DATE qualifier Ok, enter data. terminate with a MIKE_ GUZZI Mike Guzzi DPHILIPSEN Dave Philipsen CTRL/Z , or abort with a CTRL/C . but can be used with any combination of PRJNTFORM 2. 3 (REVI SED ) the others. WOA Y Jim Manin Standards: GB ROOKS The PURG E command also has more BRU 1. 1: HARODRIVE BACKUP UTIL OSHELL : GUIB STANOARO DEMO HITHELEN qualifiers than I mentioned lasL month. If JOfLHEGBERG WOA Y Jim Manin ILLUSIONIST Michael Graffam LUCKY ONE you want to purge old versions of one or RAGTIHER more files but want to keep more than System Modules (6809): ·z just the latest version, you can specify KRNLU TJLS: KERNEL CHANGING UTfLS Coco SIG: PURGE/ KE EP-2 to keep the two most­ PARTY . DJS 5 lines WOAY Jim Manin ------recent versions of the file(s) you purge. General Information: When I pressed CTRL-Z. Delphi saved The SETT! NGS command drops you Games & Graphics: ATLANTA COCOFEST3 REPORT the file in my Workspace as PARTY . DJS into the Settings menu, which is also GWINDOWS ICON FOR TEXT EDITORS SUB ETHA Allen Huffman and reported the number of lines I en­ available from the main SIG prompts. JSUiEMEIER Jim Sutemeier tered. Notice that the editor used is the (From the CoCo SIG or OS9 Online JACK -0- LANTERN FLICKER ANIMATION CoCo 3 Graphics: same one you use to edit Forum mes­ prompt, enter SET PREFERENCES, fol­ GRAPHICSPUB Bob Montowski SKETCH3:0EHO VERSION lowedby SETIINGS. This can be abbrevi­ .sages; you can enter I EX IT to exit, f LIST KW! NOOWS SCREEN SNAPS IN GI F RACINEGUY David Potter to see what you have entered so far, ated as SET SET). The Settings menu MJKEHAALAND Mike Haaland TALKING PUMP Kl N PROGRAM /EDIT to use your chosen editor (EDT or allows you to change various param­ !MASTER 1.01: IMAGE VIEWER/PRINT DRILLMASTER Johnny Williams OLDie), or IOU IT to abort the create eters; we'll take a closer look at its op­ DODGECOL T Mike Swec1 LEGENDS IN DS69B FORMAT (PIX) process. tions another time. GIFSHOW 2.2 FOR THE HHfl DRILLMASTER Johnny Williams Another file manipulation command The final file-manipulation command MIKEHAALAND Mike Haaland PEROT IN CM3 is APPEND. If you enter available in the workspace is the ED IT GW JNOOWS SAMPLE SCREEN (G!F) DRILLMASTER Johnny Williams command, which we have covered in JSU1EMEIER Jim Su1emeicr APPEND HAIL. TXT ARCHIVE. TXT detail in past issues. RUN PACOS9 FROM HULTIVUE Source for 6809 Assemblers: The most common use of Workspace REDCOAT Don Joyce 6309 NEW INDEXED HODES the contents of HA IL. TXT are added to the is for uploading and downloading files. CURTISBOYLE Curtis Boyle end of ARCHIVE. TXT,thenthewholething You can use most any file-transfer proto­ Music & Sound: DSKC ON & OSK! NI issavedasanewversionof ARCHIV E. TXT. col. Batch file-transfer protocols func­ SYSTEM_TEST: DIGITIZED SOUND MARTYGOODMAN Many Goodman After entering this command, the origi­ tion in Workspace, so you can upload or MODEL299 Malit Steiner nal HAIL . TXTfileisunchanged,andyou'll download several files with one file trans­ Product Reviews & AnD01111Cement: have two versions of ARCHIVE. TXT . fer operation. Program mers Den: NEW FARNA PRODUCTS The DIR command supports many If you want to use Kermit to transfer GUl.L: C GUI LIBRARY DSRTFOX Francis Swyger1 more options than I listed last month. files, tell Delphi to start the Kermit server WTHOMPSON Wayne Thompson One of the more useful directory options on its end by entering KERMIT. Now start is DIR/GRAND_TOTAL/SIZE. Tltis com­ Kermit on your computer and use the mand tells you how many files you have KermitGETandSENDcommandstodown­ in Workspace as well as how much disk load and upload (respectively) files with space is taken up by these files. (Delphi Delphi. Terminate the Kermit server by Uploads at a Glance may charge you for less disk space than is sending the Kermit Finish command or shown by this command, depending on by pressing three consecutive CTRL-Cs. In the OS9 Online General Informa­ grams were uploaded this month to the the amount of unused space in your TheU PLOADandDOWNLOADcommands tion database, C u rtis Boyle OSK Telecom database! Two of the MA IL. MA I file.) initiate a file transfer using your current (CURTISBOYLE) released a file describ­ three were updates to previous uploads, OJ Rsupports exclusion modifiers that defaultfiletransfer. Enter the I FX_METHOD ing somcrcccntly discovered addressing but it shows the life in the databases. tells it to ignore certain files when listing slash command to see what your current modes (extras) available in the 6309 Dave Philipsen (DPHILIPSEN) re­ the directory. For example, to tell Delphi default file-transfer protocol is. If you CPU. Curtis also submitted this infor­ leased into the Tutorials & Education to not display mail files, you would enter prefer to specify the file-transfer method, mation in the CoCo SIG' s Source for database the assembler source code for the OT HER command shows you the com­ 6809 Assemblers database. In the Sys­ an OSK program that lists all environ­ DIR / EXCLUDE- . MA I mands that use a specific file-transfer tem Modules(6809) database, Jim Mar­ ment variables. Anyone who wonders protocol. Alternatively. enter UPLOAD tin (WOA Y) uploaded a pair of utilities how to gain access to environment vari­ The I EXCLUOE modifier forces the direc­ MENU to see a menu of all supported designed to make it easier to update the ables from within a program may find tory command to ignore these files. lf upload methods (entering DOWNL OAD MENU Kernel track of a boot disk. this source code useful. you have multiple patterns (different file works the same way). lf you are down­ ln the Games & Graphics database, In the CoCo SIG ' s CoCo 3 Graphics types, extensions, etc.) to specify, sepa­ loading with a batch protocol-one that Mike Haaland (MIKEHAALAND) con­ database, Johnny Williams (DRILL­ rate them with commas and put the group allows you to transfer more than one file tributed some screen captures of typical MASTER) uploaded a program that uses within parentheses as follows: at a time - Delphi prompts you for windows under K-Windows on the MM/ the Tandy Speech/Sound Pak to show a filenames or file patterns until you press I. Jim Sutemeier (JSUTEMErER ) con­ talking jack-o-lantem. DIR/EXCLUDE-(* . MAI. MEMO*.* ) ENTER without entering a filename. tributed a screen capture of a typical In the Source for 6809 Assemblers window using G-Windows. All of these database, Marty Good man If you also want to see the file sizes and images are in . GI F format. Jim also re­ (MARTYGOODMAN) provided an article dates, you can add the qualifiers ISIZE/ leased "file recognizers" for .AR and that examines the DSKCON and OSK IN I DA TE to the command line: . LZH files under G-Windows - using routines. If you are interested in the these files provides icons for these file guts of disk I/O, you' II want to down­ DJ R/S I ZE/DATE/EXCLUOE- . MA I types. load this database group. No less than three OSK terminal pro- 6 Mardi 1993

Feature Article Modifying OS­ Window Descr

By Ernest Bazzinotti, Jr. S,\N, OS-9 's windowing system is great, but entering all those display codes can be a real pain. Have you ever wished you could simply initialize a window and it would already be set up just the way you want without your having to enter a bunch of display or we rea te codes? If so, read on ...

he approach described here in­ modpa tch. To get you started. Listing 1 module there with the same name as the ity to be altered for specific uses and pref­ olves making changes to the actual shows a standard procedure file designed to origioal. (Alternatively, instead of deleting erences. I hope you find the modifications evice descriptors used for OS-9 change the descriptor for Window 5 to a the original, you could simply rename it to presented here to be useful. TLevel !I's windows. To do this. Type-7. 80-column graphics window. Let's something like w5. dw. old.) At this point, you'll use the modpatch command that use this sample patch file and step through create a new boot disk so the changed comes withOS-9. You'llalsoneedthedump the process. window will be available when you boot and save commands, which are included First. use dump to view the contents of the system. Ernest Bazzinotti works for Raytheon with the OS-9 Development System. If you the standard /w5 descriptor, which is stored You can use this approach to change as Co. and has used computers for three years, don't have the Developmem System, down­ in the MOOU LES directory of the Boot/Config/ many or as few of the window descriptors both as a hobby and for his work. He may be load similar utilities from Delphi or use an BASIC09 disk as w5. dw. The result is shown as you like. And remember, not all the contacted at 91 Huggins Rd .. Rockland. OS-9 disk editor. Though the approach will in Figure 2. Now make a table of the para­ parameters need to be changed - only the MA02370, (617) 982-2412. Please include differ somewhat if you use a disk editor, the meters you want to change. The changes ones you want. Refer to Page 1-3 of the an SASE when requesting a reply. information provided here is enough to get we' II make to the /w5 descriptor are shown "Windows" section of the OS-9 Level II you started. Some of you may even prefer to in Figure 3. Once you have this table to­ manual. The listing on this page will tell all use a disk editor. gether, use it to build a modpatch file as you need to know about each of the win­ Needless to say. since we're going to shown in Listiog l. dows supplied with OS-9. To give a better change the modules on disk, the first thing To make the changes,j u st enter the name feelforthe method I use to make the changes. you need todo(ifyou haven't already done of the patch file (io this case, changew5), refer to listings 2 and 3, which change the Listing 1: change w5 so) is make a backup of yourOS-9 system executing the script. To see your handi­ / w4 and /w8 descriptors to Type 2, 80- master. Put the original disk away fo r work, enter the following commands to column text windows. modpatch - s safety's sake, and use the copy. activate the window: · If you're using a disk editor to make the 1 w5 With that little bit of housekeeping out changes, you will be altering the actual data c 0030 ff 07 c 0031 3d 00 of the way, you need to see what parameters i ni z wS on disk. First copy the original file, say c 002c 13 50 are "hard-coded" into the window descrip­ she I l 1- /wS& w5. dw, to a "reserve" file, say w5. dw. old. 002d 0b 18 tors you want to change. Use the dump Th.en use the editor and the offset ·informa­ 0034 07 05 command to dump the contents of the de­ Press the CLEAR key to switch to the tion tomakethechanges to w5 . dw. Once the 0035 04 02 sired wiodow descriptor to the printer or modified window. modified module is written to disk, you still screen. Once the changes are made to the mod­ need to make a new boot disk in order for The offsets to the hard-coded para-meters ul e in memory, y() u can delete the original the modifications to be available when you in a window descriptor are shown in Figure descriptor file from the.MODULES directory boot the system. l. To see what values the desired window and.use the save command.to save the new One ofOS-9's strong features is its abil- descriptor uses for a particular parameter. use Figure 1 to determine the pr!>per offset, then look at the dump of.the descriptor and Listing 2: changew4 find the value anhat offset. Armed with this information, it should be a simple matter to modpatch -s buikl· a patch file to make the necessary 1 w4 changes. c ·00 2c 3c 50 Addr 0 1 2 3 4 5 6 7 8 9 A B C 0 E F 0 2 4 6 8 A C E c 00 2d 0b 18 First, jot down the offsets to the para­ 0033 00 02 meters you want to change, as well as the 0000 67CO 0043 0036 Fl61 6000 3600 3603 07fF . M.C. 6q .0.8.; ... 00 34 01 00 current (old) values at those offsets and the 0010 A51A 0000 0100 0101 0000 1806 1600 1804 %•••••• .. ••••••• 00 35 04 07 0020 0117 0305 0807 8000 0036 0000 1308 0501 ...... 6 ...... (new) values you want to use (remember 0030 FF30 0002 0704 5785 5343 C643 4333 49CF .- .... W5 SCFCC3!0 that these numbers must be in hexadeci­ 0040 C109 F3 A.s mal). Then use build or a text editor to build a standard patch fi le that uses Figure 2: Dump of w5. dw Descriptor

002C screen width Parameter Offset Old Value Value Listing J: changewB 002D screen height New 0030 screen type (text or graphics) Screen Type 0030 FF 07 modpatch -s 0031 horizontal coordinate Horiz. Coordinate 0031 30 00 l w6 0032 vertical coordinate c 00 2c 28 50 Screen Width 002C 13 50 0033 foreground color 0030 01 02 Screen Height 0020 OB 18 0033 00 02 0034 background color Background 0034 07 05 c 00 34 01 00 0035 border color Border 0035 04 02 c 0035 01 02

Figure l: Window Parameters Figure 3: Changes to w5 . dw March 1993 7 Yes! They're still available! Tao Software :Our Final Frontier! I• • ••••• • • • • • • • • • • • • • • • • • • • Our ten year mlalon ba9 The : been to seek out new Coco : software and boldly provide · the bluest and best variety RAINBOW • • · · ol Coeo proarams. Our minion Is complete! Our subscription servle!e baa been stopped. This is your Back linal chance to order!

ur en ISSUes ea ure ere. Issues Wlll~str l. 1"1 61'U l ll~ OCT. 1111 ~!ll~!Ol. 1!11 11111Ui~llitl!!I liltlUl ll!U!lll! ...... Pil!JN!J. 111! BCAl!llHBlil IJ.IDE!OOl !OIDilDESllOlll IUl5 QUESTOICl.\OI POO.ft.IYll !L'IOOCAli.£1 Wt!Ell• l Sl!llli~ll : '1t11npn to~ ·. IEllOOllT!J.'CI. MUSI: M.111 C\lllllS"TTIJCO.ID GIFO!lti~l!ST SWT.lllUll111J! 00015!COO!Sl la.l.l!Clllr!ll liOPlill pages of material, it's all just for Coco users VISA. MasterCard and American Express BllDS 11000! 111111:1~1! Gll()ll!lllJITTl

- a great way to expand your library! accepted. Kenrucky residents please add 6 i..nM!dn")l!!l i..11171mllltl t..rllllljd l!ll mttMIUV l!!l ~BllUN!l~l percents.ales tax ~ Canadian residents, 7 Clotlfl BOXES VOC.llmI!l WG! H.W ~I! A WORLD OF INFO percent GST. In order co hold down costs. we IKllflOUOOl lXT.ICltEl NUISUD llC!lllmm OOMICl AT A BARGAIN PRICE do not bill, and no C.O.D. orders are M!llUM!.lll M!llU EYI\~~ ~.\IE AIJl.OO!l!JP TtlEt\SIU UUHCIEI 11111.ClllV D!UIKX!l BllOOET All back issues sell for the single issue accepted. I Fl11! UDDI.£ llilJIHOISB llHlS LlllLll cover price. I n addition, there is a $3.50 Due to heavy demand, we sugge>t you !J,\ILDlll! LIJllOO,\MB .lllDIOOll115T WTl'OPIED1:1111HS l1Y.1!.llll. charge for the first issue, plus 50 cents for unfor Lhe back issues you want now while SllDliMllBlll IK1IPYl:i-lll DEMOllllB IOCIEll\IL IHlllOT each additional issue for postage and handling supplies last. .1m~DSllASll IAHIL~ljUISTJ UIDH OllTIJ l\MllST DE!llOYll DAllHll!t01I t\ISTYIEllO 51.lllOHOll.D lOO>Dlllllil 5.ll!lll1 if sent by United Parcel Service. There is a $5 To order, review and fill out the fonn DWll EST! llOt!CI S!O'!llO'liN MVTAHT AIHCX CllllmlASt \111 charge for the fir

Expiration Date Phone ( VOLUME 10 l ~.. r[Ee r Prices: AUG90 OS-9 $3.95 0 .···· ;;~·~ ···· . It. Signature SEP 90 Education $3.95 a Single Is.sue (Tape or Disk) .... $ 8.00 $6.00 .• •ktuc Tbe9e •• TO ORDER BY PHONE {credit card orders only) call {800) 847- OCT90 Gra~lcs $3.95" : _. .. .:' 0309. 9 a.m. to 5 p.m. EST. All other inquiries call {502) 228-4492. NOV90 Data Comm. $3.95 0 2-5 ISSUES ...... $ 6.00 $5.00Ea. .. ·:::.::::: DEC90 Holiday $3.95 u -········ ·· send to: THE RAINBOW, The Falsoft Building, P.O. Box 385, JAN91 Beginners $3.95 a 6-10 Issues ...... $ 5.00 S4.50Ea. Prospect, KY 40059 FEB91 Home Help $3.95 0 MAA91 Harttware $3.95 0 11 or more 1$ues ...... ,...... $ 4.50 $4.00Ea. APR91 i.o.s< $3.95" Please send me the foilowing back issues: MAY91 Printer $3.95 u Graphic Sets ...... $20 $15 Ea. JUN 91 Summer Fun $3.95 a VOLUME 1 OCT85 Graphi<:5 $3.95 a JUL 91 Anniversary $.3.950 All 120 Single Is.sues ...... $250 $125 JUL81 Premier Issue $2-00 IJ NOV85 Data Comm. $3.95 a FE8a2 $2.00 a DEC65 Holiday $3 .95 0 VOLUME 11 All 53 Public Domain Disks ..... $145 $75 VOLUME2 JAN86 BeQ1nnern $3.95 a AUG91 Graphics $3.95 0 JUN 83 Printers $2.95 0 FEB86 Utilities 53.95 a SEP91 Education S3.95 a All Graphic Stes ...... $140 $70 VOLUME3 MAR86 Business $3 .95 0 OCT91 OS-9 $3.95 0 AUGB3 Games $2.95 a APAB6 Home Help S3.95 a NOV91 Data Comm. S3.95 0 All Our Software(243Disks) ... $379.00 $199 SEP83 Education $2.95 0 MAY86 Printer $3.ss a OEC91 Holiday $3.95" OCT83 Graphic~ $3.95 0 JUN 86 Mui:oic $3.95 0 JAN92 Utllltles $3.95 0 MAR84 Businas.s $.1.95 0 JUL 86 Anniversary $3.95 0 FED92 Home Help $3.95 a APR84 Gaming $3.95 0 MAR92 HardNare $3.95 0 ...... ,,_., ...... MAYB4 Primer $3.95" VOLUMES APA92 Music .. $3.95 :J ft _ •m ., JUN 84 ' " ... Music $3.95 a AUG86 Gamtts $3.95 a " " '" MAY92 Printer $3.95 ~ ' " " " "" " "' JUL8'- Annivsrsary $3.95 0 SEP 86 Education sa.ss a ~~r-"~ N "' " JUN 92 Programming $3.95 :i " '"·~ .."' .." ~: OCT86 Graphi<:s $3.95 a ..M JUL92 Anniversary $3.95 a " '" 5 ~ VOLUME4 NOV86 Data Comm. $3.95 a " "' "' -· i : g~ AUG 84 Games $3.95" DEC86 Holiday $3 .95 0 VOLUME 12 w. -· '~ ~ 5 ~! -· SEP 64 Education $3.95 :i JAN 87 Begnners $3.95 0 AUG92 Graphics $3.95 a ~ m" OCT84 Graphic.a $3.95 :J FEB 87 Utilitiofl -·_, $3.95 0 ii ~" i!~ SEP92 Education $3.95 tJ " ~ m" -· NOV B4 Data Comm. $3.95 '] MAA87 Business $3 .95 0 " ~ n mu -· OCT92 OS-9 $3.95 0 ~ ,," DEC84. Holiday $3.95 0 APRB7 Home Help $3.95 0 NOV92 Data Comm. " Id " !~ m" $3.95 0 : .. JAN BS Beginners $3.95 'J MAY87 Prin:er $3.95 a " i I~ Holiday $3.95 a ! DEC92 FEB85 Uliliti"°s $3.95 Q JUN 87 Music $3.95 a JAN 93 U ~ tlties $3.95 IJ MAR BS Business $3.95 0 JUL87 Ann.vers.ary $3.95 a FEB93 Home Help $3.95 0 Software~:-----­ APA85 Simulations $3.95 0 Warp T&D Subscription MAY BS PMter $3.95 a VOLUME 7 Speed 2490 Miles Standish Drive City "' State _Zip_ JUN 85 Music $3.95 IJ AUG87 Games $3.95 0 JUL 85 Anniversary $3.95 Ci SEP87 Education $3.95 'J tbeJP HollandMI49424 Crcdi1Card# __--=-.....,,,..- OCT87 Graphics $3.95 :l VOLUME 5 NOV87 Dara Comm. $3.95 :r ordera (616)399-9648 Expiration ___ Tola!$_ AUG 85 Games S3.95 U DEC87 Holiday $3.95 J SEP !l!i Education 53.9~ l.J JAN 8H Beginners $3.95 J In TOa fax: (616) 3%-2744 Mra1< Cirdt : TAPE or DISK 8 March 1993

Feature Program

Alphabet Unscratnbler by Keiran Kenny

lphabet isashortgameintended keys. pressing J when prompted at the title characters are the subscripts to the array. Line 30 sets the values for variables S1' and for young children just learn­ screen enables joystick control of the cur­ You can use up to eight characters in SL to suit either a CuCu3 uran earlier model ing the alphabet. Parental or sor. This may be easier for some users. each screen line for a total of five lines on of the Color Computer. The operating speed A teacher guidance may be nec­ I designed the program in such a way the screen. Characters I, I , the period and is returned to normal when the user presses essary to reinforce the learning process. that the movement of the cursor box is fairly the exclamation sign occupy lt:ss space, so E on the end screen to end tl1e program. Alphabet requires at least J 6K and Ex­ slo w. This is intended to accommodate the you could get away with more characters if tended BAS IC. reaction capacity of a younger child. To a line includes any of these. When Alphabet is run, the alphabet ap­ increase the speed of the cursor box, reduce Follow the examples in lines 470 through pears in on the PMOOE4 screen in big letters the value of 500 (Variable OT) in Line 40. 510. Variable B sets the horizontal position Keiran Kenny's interests lie mainly with (32 pixels wide and 30 pixels high), but all If you are not interested in using the and C dictates the vertical. The characters the Color Computer' s graphics and math the letters are out oforder. The goal is to get program tu unscramble the alphabet, delete are drawn upward, so C must be set to at capabilities. But in his own words, " Iliketo them in the right order. To do th is, the user lines 50 through I 00, 170 through 470 and least 30 to draw on the top line. The vertical try everything." He may be contacted at moves thecursoruntil it surrounds the letter 520 through 540, then rewrite the drawing coordinate of each subsequent line should van Montfoortlaan 31, 2596 SPThe Hague, A. Then he presses the space bar, moves to portion to display your own messages on be set to not less than 32 points more than Holland. Please include a self-addressed where the letter A should be in the alphabet, the screen in big leners. However, make that used for the previous line. l used 40 envelope with sufficient postage when re­ then presses the space bar again. The A sure you add a stop line such as when writing Alphabet. questing a reply. changes places with whatever leLter was As with most of my other programs, the already in that position. With the A in the 990 POKE SL, 0: GDT0990 high-speed mode is used right place, the user follows the same pro­ in Alphabet. cedure with B, then C, and so on, until the The character set, which appears in lines alphabet is properly organized. When all 26 l 000 through 1400, includes all letters and letters are in the right place, the user should numbers, a space, a period, an exclamation press ENTER, then he may choose whether sign, a dollar sign and an apostrophe. The to play again or end the game. stri ngs for the characters are stored in As an al ternative to using the arrow Array LS, and the ASCll value of the

16K ECB I 290 I FPE EK( 342 ) -24 7THENB-B+32 4 G4 L803 L 4 U3 BU3U 6BU 3 U9BU3U3R4 03BD l 13G3D15 F3Rl 2 E3 L3 U3R8D6G4N .20B R4 300 I FPEEK( 343 )-247THE NA-A-40 309BD306BD3B L4 L8BR2 4 B03" The Listing: ALPHABET 310 IFPEEK( 344 )-24 7THE NA-A+40 1030 LS(39)-' "BU 25U5R5D5G3L2E3L3B l 220 LI ( 72 )- " ' U3 0R 5Dl 2RJ 8Ul 2 R5030 320 GOT0380 R58025" L5U l3 L J 8013L5BR28 .. "Al PHARFT Ul~SCRAMRLFR 330 J0-JOYSTKC0l : Jl-JOYSTKC l) 1040 LS(46)- ""BRH U3ER3FD3GL2BR3 .. 1230 LS ( 73 )- " • BRl 2U30R5D30NL5 .. . BY KElRAN KENNY 340 I FJ0<63THENA-A-40 1050 LS( 48)-" 'BR4H4U22E4R20F4022G 124 0 L$ ( 7 4 )- " • BRLH4U8RSD4 F3Rl2E3U ' COPYRIGHT (C) 1993 350 I FJ0>0T HErJA-A+'0 4 L20BE5BH4NM+14. -1 SU ;zE4Rl08 F4 NM 22R5026G4NL20BR4 .. • BY FA.SOFT . I NC. 360 I FJl <31THE N3-B - 32 - 14 .+1501 2G4Ll 0BD5BR 19 .. 1250 LS ( 75 ) - " • U30R5012M+ 18 . -12R5D 5 'RAINBOW MAGAZINE 370 t FJJ>0THEN8-B+32 1060 LSC49 )- " "BR2U28L2E2R5030NL5" 4M-12 . +B M+ J 2 .+l 404L5M · 13. - 15M · 5. l 0 CLS: C.EAR500 380 I FA<6THENA- 6 1070 LS( 50)-" 'NR28Ul0E4Rl6E4U4H4L +4Dlll5BR28 .. 20 DIMCC25),0(25).Ll ( 90).LNC90) 390 l FA >2 06THENA-206 1 [ G4 02 L4 U5[5R!8 rsol0G5 Ll 7 G3D3R24 1260 LS ( 76 ) - " "U30R5025R2305NL28 '" 30 I FPEEK(33021 )-50 THHSP- 65497 400 I FB<8THENB-8 04 .. 1270 LS( 77 )-" . U30R6F8E8R6030L6U22 : SL-65496ELSESP-65•95 : SL-65494 410 IFB>-136AN OA> 46TH EN8-136 :A-4 1080 LS ( 51)-' 'BR4H4U6R5D4F3Rl2E3U G8H8022 L6BR28"" 40 POKESP ,0 :DT-500 6E LS EI FB > 136THENB-136 3H3 l 10U4Rl0E3U4H3L l 2G3L5U3E4 R2H 1280 L$ ( 78 )- . . U30R5M+ 18, + l2Ul 2R5D 50 PR!NT@38,. "ALPHABE T U~SCRAMHLl 420 Ll ll ElA . B)-(A+32 . B+32).PSET.B 4D9G3F 30 7G4 NL2 0BR4 '" 30L5Ul3M - 18. • 12025L5BR28" R' " : FORDL-l TODT :N EXT : LINElA . B) - CA+3 1090 LI( o2 )- . . BR20U l 0L20UoM+20. - J 129~ L$( /9)-·. BR4H4U22l4R20r4022G 60 PRINT@128 .. "BY KElRAN KENNY. T 2 , B+ 32), PRtSE T, B 5BD5 011Ll4M+14 . · 11 BUS R5016R304 L3 4L20BE5H4U12 E4Rl 0F4 D12G4 L10B05BR HE HAGUE . 1992 .. 430 IFP-0 ANDPEEK(!3 5)-32THENP-l Dl 0L5BR8 .. 20·· 70 PRINT@225 .• . (A)RROWS OR RIGHT : Xl-A+Z : X2-A+33: Yl-B+l : Y2-B+32 : G l l 00 LS ( 53 )-' 'BR4~4U6 R 504F3R1 2E3U 1300 L$(80)-' ' U30R23F505G5L18BU5U CJ )OYSTICK? '" : PR! NT@298 . " ' PRESS A ET(Xl. Y1 )-( X2. Y2) . C: POKE135 .0 7H3L20U14R2805 L23 D5Rl 9F4012G4L20 5 Rl 5F2DG2 L15605015 L5 BR28 .. OR J" " 440 I FP ANDPEEK( 135 )-32THE NX 3-A+ BR24 .. 1310 L$(81 l-· "BR4H4U 22 E4R20F4016G 80 KS-TNKF'l l: TFK SO " "A' "ANDKS<>' "J '' 2: X4-A+33: Y3 -B+l: Y 4- 8+32: GET ( X3. 1110 LS ( 54)-" 'BR4 H4U2 2E4R2 0F406L5 5M+5. +51 4M · 3 . - 3G3l14RM+5 . · 4B L2H3 THEN80 Y3)-(X4, Y4) .D: PUT( X3. Y3)-( X4 .Y 4 ) U4H3 LI 2G3Dl 0E3 R16F4D9G4 L19BE5BL2 U16 E3Rl 5 F3Dl 0G 5 L603R3G 2L7 BD3BR20 90 JFK!-' "J' 'THENJY-1 .C :PUT(X l, Y1 )-(X2 . Y2) .D :MV-MV+l : H2U2E2RJ4 F202G2 L14BD5BR20" • 100 GOTOl40 P-0: POKEl35 ,0 1120 LS ( 55)-''U4M+ 23, · 21L23U5R28D 1320 Ll(82)-· "U30R23F505G5L8M+l3. 110 FORDL-I T0l00: NEXT : RETURN 450 I FPEEKCl35 )-13TH EN4 70 BM - 20, + 1BD4 L8BR28 " + 15 L7M - l 3, - 15 L3BUSU5 Rl 5F2 DG2 Ll SB 120 DRAW' 'BM' '+STRSCB)+' ' . ' '+STRS(C) 460 1 FJY THEN330ELSE280 1130 LS ( 56 )- " • BR4 H4U7 E4H4U 7 E4R20F 05015 L5BR28 .. 130 FORT- lTOLEN ( Wl ) :fFMJDl( WS ,T. 4 70 PC LS: B- 0: C-31 : W$-STR S( HV )+ • • 407G4F 407G4 L2 0B E3H2U5 E2 Rl 4 F2D5 G2 1330 LS<83)- · 'BR4NR20 H4U5R502F3Rl 1)-· . I .. THEN DRAW. . Bll2 .. : DRAWLS( ASC( MOV ES ! · ' :GOSUBl20 L 14BU15H2U5E2Rl4 F205G2 Ll4BD18BR2 l E4U2H3L16H4U 10E3R2 2 F305L5U2H2 L l M[QI ( WS , T, 1)) )+". BR3 .. : NEXT ELSE: DR 460 B-0: C-71 :Ws-· 'HIT "M' FOR' " :GO 1" 3G302 F3Rl6F 40 l ! G3B R3 "' AWLICASC (Ml DSC WI. T. 1 ) ))+ .. BRJ"": NE SUB120 1140 L$ ( 57)-" • BR4H4U4 R502F3R12E3U 1340 Ll(84)-· " BR11U25L11USR28D5Ll XT: RETURN 490 B-48:C-lll :W$-· "M ORE! . . :GOSUBl 6BU6U5H3 LI 2G305 F3Rl 2E3BM - 19, +!SR 1025L6BR17"" 140 PMODE4, l: COLOR0 , 5: PCLS: SC RE E 20 20E4U22H4 L20G4012F4 Rl 6E3BD13BR5 .. 1350 LS ( 85)-· " BR4H4U26R5022F4Rl0 E Nl.1 500 B-20:C-151:WS-' "HIT ' E' TD'' :G 1150 LS( 65)-" 'M+l!. - 30R6M+ll.+30L 4U22R5026G4N L20BR4 .. 150 GO T01000 OSUB120 6M -3 , -SNLSBM- 2 , - 6M-1 , - 5 L3 M- I • +5 N 1360 LS( 86)-' 'BR11M · ll, - 30R5M+9,+ 160 H-8: V-39 510 B-0:C-191 :WS-' 'END GAME.'' : GOS R4BM · 2 . +6M · 3, +8L6B R2B .. 25M+9, -25R5M- !1.+30L5BR16" 170 FDRZ-65 TD90: LN ( Z l-Z: NEXT UB120 11 60 LIC66)-· 'U30R23 F505G5F505G5L 1370 LS(87)-' 'U30R5025M+9.-1 5M+9. 180 FORT- 65TD90 520 Kl-l NKEYS: IFKS<>" 'M" 'AN OKS <>" ' E 23B E5U8R I 5F?D4G2Ll5BU1 3U8Rl 5F2D4 +15U25R5D30 LBM • 6. · 9M • 6. +9 LSBRZB"' 190 R-64+( 1N T( RNOC · TrMER )*26)+1) • "THFN5 ?0 G2L15BD18BR23 .. 1380 LS(88)- ' ' U5 M+9. - 10M - 9. · 10U5R 200 lFLN(R)-0THEN190 530 l FKs-· 'M' 'THENMV-0: PCLS: GOT016 1170 LS( 67)-" "BR4H4U22E4R20F4G4H3 5M+9. +10M+9 . - 10R505M · 9 .+10M+9, +t 21 0 DRAW" "BM-H; .-V :' "+Ll(R) 0 Lt 3G3D 13 f3Rl2E3F5G4 L l 9BR 23 " 005L5M - 9. - 10M - 9 .+10L5BR2 B.. 22 0 LN (R)-0 540 POKESL , 0:CLS:END 11 80 LS ( 68)- ' 'U30R 23F5020G5 L23B M+ 1390 L$( 89)- · " BRJ1Ul0M-11. -15U5R5 23 0 H-H+40 1000 Ll(32)-""BR5" 6 . 5U2 0R l 3F3014G3Ll 3BD5BR22 .. M+9 ,+13M+9, - l3R505M - ll ,+1501 0 L6B 240 l FH>208THENH-8: V-V+32 1010 LS ( 33 )- ' ' BRHU3ENR3BU 3HU20ER3 l l 90 LS ( 69 )- ' • U30R2BD5 L2307 R2005L R17 .. 250 NEXT FD20GNL3BD3FD3GNL3BR '' 20DBR2305NL28 .. 1400 L$(90)-· "U5M+22 . · 20L2 2U5R28D 260 A-6: B-8 1020 LI( 36 )- " • BU 3B R4H4U 3R 5D2 F2 R5B 1200 LS ( 70 )- " 'U30RZBD5 L2307 R2005 L 7M- 21,+18R2105NL28 "" 270 I FJY TH EN330 R4 R6 E2 U2 H2 L6B L4L l 0H2U9E4 R8 BR 4R8 F 20013NL5BR23 .. 1410 GOT0160 280 JFPEEKC34l)- 24 7THEN8 - B- 32 4D3L5U2H2L5B L4 L6G20 5 F2R6BR4R8F4D 1210 LS ( 71)- " 'BR4H4U22 E4R20F4G4 H3 March 1993 9

Feature Program Old Glory LI

by John R. Mott Jr.

With the passing of the recent presidential election, most of the red, white and blue banners and signs have disappeared from yards and tele­ phone poles around town. To keep in touch with the patriotic feeli ng, l thought it might be appro­ priate to write this linle BASIC program. Old Glory is a simple program that displays the American flag in all its glory. Though the program requires a CoCo 3, you can save it on ither tape or disk. After doing so, simply enter hen sit back and watch the CoCo 3 go to

ott Jr. is a retired truck driver and a has been interested in computers ics for several years. H" may b" 9822 North 15th Street, Apt B. , 85020-1810. Please include an Save Money Too! Subscribe to these convenient services and receive each month's programs in a ready-to­ run form. No more long tedious hours wasted typing I No more red eyes and sore fingers! All you do is load and run, usingthecurrent issueofTHE RAINBOW as documentation. OS-9programsareavailabletoo!Onesideof the RA!NBOWON DISK is formatted for the OS-9 operating system (OS-9 programs cannot be put on tape) so you can get all the great programs in the magazine. Aone-yearsubSCfiptionloTHERAINBOWandRAINBOWONTAPEisonly$91 intheU.S., $1 08 in Canada, $153 foreign surface rate and $188 foreign airmail. A one-year subscription to THE RAINBOW and RAINBOW ON DISKisonly$1 t Sin the U.S., $1 38 in Canada, $183 foreign surface rate and $218 foreign airmail. U.S. currencyonly. Back issuesofboth RAINBOWONTAPEand RAINBOWON DISKarealsoavailable! (seeourback issueadinthisissue) RAINBOWONTAPEbackissuesareavailablebeginningwnhtheApril1982issue.Asingle copy ofRAINBOWONTAPE is $1 Owithinthe U.S., $12inall other countries. The annual subscription for RAINBOW ON TAPE is$80withinthe U.S.; $90 in Canada; and$105 for all other countries. U.S.currencyonly. The Listing: OL OG LORY RAINBOW ON DISK back Issues areavailablebeglnning with the October 1986issue. A 'AMER I CA N FLAG 136 , 54) ,1. 12 singlecopyofRAINBOWONDISKis$12withintheU.S ., $14inCanada,$16inallothercount­ ' BY JOH N R. MOTT JR . 100 FORX-8T 019 8S TEP 3B ries.TheannualsubscriptionforRAINBOWONDISKis$99withintheU.S.; $115inCanada; 'COPYR I GHT (CJ 199 3 11 0 FORY -14T094 STE P20 and$130forall o1hercountries. U.S. currency only. 'BY FAL SOFT, INC. 120 HL rnE

VEF Graphics from Page I selection menu. Loading cime varies from 45 to 90 seconds. depending on picmre produce colors. all palette values need to be resolution. converted from their RG B values. Although Change Pa lette: The 16 current palette lhet:onversiun does not createexact equiva­ values are displayed for editing. Upon Do You Rest lents. the results should be close enough for choosing a palette to edit. use the up-arrow most images. Still, these values can always 10 increase or down-arrow to decrease the he edited with the Change Palene option palette value. Afcer you load a picmre, you found on VEFit's \'lain menu. may roggle between the graphics and text modes by pressing the space bar. This toggle Easy at Night? . Menu Options feature is also active after you select a To select an option from a VEFit menu. default HSCR EEN with the Memory Display use the arrow keys to point to the desired option below. In the graphics mode, changes option, then press ENTER. To e~il VEFit lo the palene are seen onscreen as you edit. and return to BASIC. press BREAK. To Press ENTER to record the changes and ~;g return to the Main menu from a submenu. return to the palette selection menu. press Q. Errors enwuntered while the pro­ Save (four menu choices): Before sav· gram is running are reported, but they may ing, ensure that the image to be saved is in ~(2 result in altered palette values due to BASIC's HSCREEN memory and that the proper pal­ error-handling routines. If such a situation ette values are set.You can use the Memory arises. you may need to use the Change Display option to preview the picture first. ~ Palette option to reset the proper palette After you select the appropriate Save op­ values. Following are VEFit's Main menu tion from the Main menu, the disk is checked options: for free space. If there is sufficient disk space, you are asked to enter a fi lename. or Load Picture: VEFit searches for you can press ENTER 10 abort the 'ave. If filenames with a . VEF extension . .If none are a duplicate filename exists on the disk, you found, you are prompted to return 10 the are prompted to abort the save or overwrite Main menu. Otherwise a list is displayed the existing file. After passing all these for selection. Since a regular disk can bold checkpoints, the filename and a status bar up to only nine images (depending on their are displayed to indicate saving progress. resolution), a maximum of I 6filenames are When saving is complete, you are returned displayed onscreen. Once you make a se­ to the Main menu. Save times vary from 20 lection, the filename and a status bar are to 45 seconds, depending on the save reso­ displayed to indicate loading progress. lution you choose. When loading is complete, the picture is Memory Display: This option allows displayed in the resolution specified in the you to view HSCREEN memory in four cliffer- VEF fi le. When you finish viewing the picture, press any key to return to the file VEF Graphics continued on Page 12. THE RAINBOW is the only publication that offers peace of mind to CoCo users. Members of the Coco Community have always looked to THE RAINBOW for comfort-hints, tips, the latest news and communication with others - for their Tandy Color Computers. 00100 ORG $5FDA THE RAINBOW continues to serve and support Coco users, from 00 110 LOY 2, X Make Y: 2+X (address Of STRING) beginners to the advanced, by covering the wide variety of topics affecting 00120 LOX #56000 Make X: Address of memory block the Coco Community. Looking for games? Telecommunications pack­ 00 130 INC COUN T Increase count for It 128 bytes 00 140 LOA COUNT Load count ... ages? Finance programs? Interested in helpful utilities? Hands-on hard­ 00 150 CMPA //$40 Has 64 C64xl28 - 8192) been read? ware projects? Want to take the guesswork out of buying software and 00 160 BNE P2 If not. jump ta P2 00170 CLR COUN T Else clear count for begin sc reen hardware? From Disk BASIC to OS-9, THE RAINBOW has the answers to 00175 DECA And decrease for last time around all your Coco questions. 00180 Pl LEAX 128.X Make X: X+l28 bytes/find right line Get rid of your nightmares by renewing your subscription today. THE 00 190 P2 OECA Decrease count 00200 BNE Pl Loop back ta Pl if not done adding RAINBOW - the best security blanket for a good n ight's rest. 00210 LOA 11580 Load 128 for counter 002 20 P3 LOB , X+ Load byte from screen memory 00230 STB • Y+ Store in return string 00240 OECA Decrease count Use our 800 number! 00250 BNE P3 Done? If not. back to P3 for next byte For credit card orders, you may phone in your subscription. Our credit 00260 RTS Return to BASIC 00270 COUNT RMB Counter of 128 multi pl es card order number is (800) 847-0309, 9 a.m. to 5 p.m . EST. We accept VISA, 00280 END S5FDA MasterCard and American Express.All other inquiries call (502) 228-4492.

••••••••••••••••••••••••••••••••••••••• Figure 2: VE FIT Assembly-Language Routine Yes! Please send me RAINBOW Magazine. Choose one: O New 0 Renew (attach label) O One Year $31 - 35% off cover price O Two Year $58 - 39% off cover price 0 One Year $79 - 44% off cover price

Which Tandy Color Computer do you use? 00100 ORG $5FBA o Coco 1 o Coco 2 o Coco 3 00110 JSR SBJ ED Put USR(PRINT@l location in D Name ______00120 ADDO j/S0400 Add 10400 to point to screen memory 001J0 TFR 0 , X Transfer O into X Address 00140 LOA //$08 Characters to h111te CPOKE &H5FCJ.l/ l City ______ZIP ____ 00150 HI LOB , X Read character from screen memory State 00160 CMPB l/S7F If vi deo code>l27 then . .. O My check in the amount of is endosed. 00170 BH I HJ Leave and wr ite back to screen (HJ) 00180 CMPB l/S3 F IF video code>63 Cca pi ta 1) then .. . Charge to : 0 VISA 0 MasterCard 0 American Express 00190 BH l H2 (-)64 from video code to lowercase

£0Co3 Disk

The Listing: VE fl T

"VEFI T )+64 210 If SA•7 THEN PR! NT@2 52 , ")" 340 : f MA•0 THEN RfTURN: ELSE HA- ·BY IHOHAS WONG 96 NEX T LG 212 GOTO 204 0: CHP "COPYRIGHT (C) 1993 98 LO S•"" 214 If ABS<>CHRSC 13) THEN 218 342 fOR AL•0 TO l 5 "BY FALSOFT. INC. 100 FOR LG-LOF(l) - 17 TO LOFC1J 216 If SA-8 THEN RETURN:ELSE 224 344 PA CALl•VAL<"&H"+MIOS(LAS .((P 5 'RAINBOW MAGAZIN E 102 GET #1. LG: LD S•LO s+LC S 218 If SA-8 THEN SOUND 200, I :GOT A( AL 1- 64 l'Z ) +1.2 l )+64 10 ·~~~~~~~~~~- 104 NEXT LG 0 204:ELSE S8S-S8s+ABS 346 NEXT Al: RETU RN vef!T I. I : RSDOS PIX UTILITY 106 CLOSE 61 2211 PRINT@Z44+SA .ABS::SA•SA+l:lf 348 If HA•! THE N RETUR N: EL SE HA• 108 I F I A•0 TH£N GOSUB 388 : SOUND SA<8 THEN PRINT CH RS0 OR INS 352 PA (AL) • VAL("&H"+H!DS CSAS,((P 14 DI H PA(!5l ,AAS (2) ,A8$(68l:LA­ A KEY TO HAIN MEN U] " :GOSUB 394:R TR( I. SB S. "/" ))0 THEN SOUND 2110 . I A(All -64 J • 2)+1,2) ) +64 ll : HA-2 ETURN :PRINT@449 , "NO EXTENSIONS ••. PRE 354 NEXT AL :RE TURN 16 M-1 : MS-"BDB3EDC3040111f01860 110 OPEN "D",#1.L8S, 128 SS ANY KEY-: : GOSUB 394 : GO TO 2110 356 '* SELECTOR • BE684C 17 F2 20ACI 3f22114C8402002C04 112 FI ELD fl, 128 AS LC S 226 S8 S-SBHSTR! NGS ( 8 -SA . 32)+".V 358 Al-I :AJ-1: POK£ &H5FC3 .AF llE 7800126E839 I 0AE028E600117C5F FF8 JI 4 LH-8 : L!-48 Ef" 360 AK•USRO ( AG ) 65F FF8 l 40261187f5f Ff 4A3089008114A2 116 POKE &H5ff8 . &HAil: PO KE &HS FFA 228 GOSUB 428 362 GOSU8 394:AK-USR8(A6) 6f986811E 680E 7 All4AZ6F939" . &H80: POKE &H5Fff .0 230 If AN-0 THEN 244 364 lf AB S-CHRS(8) THEN Al-A!-1: 18 FOR AB-& H5F8A TD &H5 FFE 118 GET fl. LF ·I: us-RIGH I SC LC S. I 232 FOR SB•l TO AN If AIAB SCSB) THEN 242 AH:GOTO 360 OKE A8.AC:AA-M+Z 120 POKE &HffA3. LI 236 SOUND 290 . I : PRINT@449. "Fl LE 366 IF ABS-CHRS(9) THEN Al-Al+l; 22 NEXT AB 122 IF LEN(lE SJ>l28 THEN LFS•LEF EXISTS: GO ON? [N]O (YJES": :GOSU IF Al>AO TH EN Al-Al - l:ELSE AG-AG 24 OEFUSRll-&H5FBA : DEFUSRl-&H5FOA f l( LES. 128 l; LES-RIGHTS (LES . LEN( L 8 394 +AH: GOTO 360 26 ON BRK GOTO 458: ON ERR GOTO 4 ESJ · l28l:ELSE 128 238 IF AB S<> "N" ANO ABS<>"Y" THE 368 IF A8S-CHRSC94l THEN AJ-AJ-1 52 124 LFS-USRI( LFSJ :LH•LH+I N 238 ·:IF AJLE THEN LFS- USRl(LEHL 244 P.RINT@Z25. "SAVING PICTURE: [ : If AJ>AE THEN AJ•AJ -1 : ELSE AG-A 311.163) OS) :GOTO 148 ";SBS:"J":PRINT@257,"STATUS: ["; G+32: GOTO 360 311 LAs-·000c0211E0111905ie1czc0010 138 LF S-LES STRING S( 20, 191); "]" :PR! NT@449. ST 372 IF A8s-·o· THEN RETURN 08180A2822111221031l113321 E201F2E 132 GET #1.Lf :LF•LF+l: LEl•LC S RINGS<38.128); 374 I F A8S<>CHRS(l3) THEN SOUND 0f3C2 F30 I 708150627 l 62636192AIA3A 134 LJ-128 - LEN ( LF I ): LfS-LF S+ LEFT 246 AJ•AJ - 2:IF AJ-2 OR AJ-4 THEN 200. I : GOTO 368 1829283814 0 4 2 333 2 53 5 2 4 34 203 B3 13 E SC LES, LJ J: LE S•RIGHTS( LE S, LE N< LE S SC-240:SO•l60:ELSE SC-120:SD•80 376 FOR AL•l TO 6 : AK-USR0(AGl:GO 3739303f" )-LJ) 248 OPEN "O" .#1.S8S SUB 382: NEXT AL 32 SA 1•"001502143 ! 062304210~0l0 C 136 LK-1 NT( ( LF fLE )*Zill: PR I NT@266 250 SE-VAUM!OS("3041".AJ.lll 378 RETURN 010A031C0711121630ZZZ520ZCZ8ZA00 • STRINGS( LK.175): 252 PRINT fl.CHRS(0) :CHRS(S[); 380 '* PAUSES • 0808181A3813l0323634 26242 EZ 0290 F 138 GOTO 124 254 FOR Sf-0 TO 15 382 FOR AM-1 TO Zll:NEXT AM 0919181E3E3Al 7333735273C2F30ZB39 140 CLOSE {#J 256 SG-PA(SF) · 64 384 RETURN I 01 F3B3F " 142 GOSUB 418 :HSCREEN LA:GOSUB 258 IF HA-0 THEN SG-VALC "&H"+HIO 386 '* CLS PART • 34 CLS:PRTNTii0.AAS: CHR S(l67):PRI 94: GO SUB 402: HSC REEN 0 SC SA S. (SG•Z l+I. 2 ll 388 FOR Al.•3 TO 12:PRINT@(AL*32) NT@416,AAS: :POKE &HSFF,&HA7:PRIN 144 GO SUB 388: GOTO 56 260 PRINT Ill ,CHRS 0 THEN PRfNT@449, "[ARR 264 FOR SF•l TO 8 392 '* GET KEYS • 36 PR!NT@449, "CHOOSE A MONITOR OWSJ ROTATE [ SP ACE] [O]UIT";: ELS 266 PRINT ffl.STRING$(S0. 0): 394 FOR AL-341 TO 344:POKE AL.2"5 YPE TO BEGIN"; E PRINT@449. "[ARROWS] ROTATE PAL 26!! NEXT SF 38 GO SUB 320: GO SUB 388 ETTE [OJUIT"; 270 SH-0: SI-48 ~~~E~~ s~iNK EY s : r F ABS-"" THEN 39 · 40 GOSUB 408 150 FOR P,A•0 TO 7 272 POKE &H5Ff8,&H80 : POKE &HSfFA 6 42 PRINT@l31. "LOAO A PI CTURE": PR 152 PB•P6CPA)-64:PAS-RIGHTS(STR' ,&HAl!J: POKE &H5FFf.0 398 RETURN INT@J63 , "PALETTE CHANGE":PRINT@l (PBl . 2):1f PB<1 0 THEN HIOS(PAS,l 274 POKE !HFFA3.SI 400 '* PAL BACK * 95, "SAVE (320 X 200: 4 COLORS)": .1)-"0" 276 scf•USRHSTRING$(128 . 32)) 402 IF HA-0 THEN CMP; ELSE RGB PR1Nl@22/,"SAVl [320 X 200; 16 C 154 PB•PA(-PA+B )' 64 : PBS-RfGHTS( ST 278 PRINT 111 .SCS; 404 RETURN OLOR)":PRINT8259 . "SAVE [640 X 20 RS(P8),2l:IF PBSH THEN 276 116 '* PA L VIEW * ]"; PA L ";PCS : ": ":PBS 288 CLOSE #1 418 FOR AL-0 TO 15 j~ AO-I :AE-8:AF-28:AG-131l :GOSU~ 160 NEXT PA 290 RETURN 428 POKE &HfF80+AL, PA(AU 8 162 AD-2:AE-8:AF- 13:AG-130:AH- 16 292 '* MEMORIZE * 422 NEXT AL 48 IF A8J<>CHRSl13) THEN 46:ELSE :GOSUB 358 294 PRINT@449, " (ARROWS] SELECT 0 424 RETURN GOSUB 388 • 164 IF AB s-·o· THEN RETURN R {Q]UIT HAIN": 426 ·• DIR READ * 50 ON AJ GOSUB 56.148,196.196,19 166 PC-USRO(AGl:PO-AJ+((Al - 1)•8) 296 If LA-fl THEN SOUNlJ 200. I; PRl •28 AH 6.196,294,318 168 If PD<9 TH EN PE-139:ELSE PE• NT@l34, '"HO HSC.RE.EN SELECTED!"' U. 430 FOR A0•3 TO 11 52 GO SUB 388: GO TO 42 155 . 'SE PRIH@l34. "CHOJJSE AN , HSCREUL 132 DSKU ll.17, AO.AAS(l).AAS ( 2) 54 "* LOAO PU * 170 PE-Pf+ (( AJ·1)•32) :Pf•8 434 FOR AP-I ro 2 56 PRINT@449, "[ARROWS ] SELECT Fl 172 PG•P:M PO- l )'64; PD S-RIGH TS (ST 298 f RINT@l95. "VIEW ( 328 X 211B: 436 ACS-AAS{ AP) LE OR [QJU!T"; RICPGl.2l:IF PG.0.8)+". "+MIDU 68 IF AN-0 THEN SOUND 290,l : PRIN 174 PR! Nf@PE. PDS: 11-1:6411 X 2110: z · 9 THEN PR I NT@323. "VIEW .MEN 443- , AIN)"; :GOSUB 394:RfTURN - CRHN 0:RETURN \ DEFAULT HSCRHN:NOW":U 44' IF NIOS(AOS.1.1 J<>CHRS(0) "" 62 IF AN >l6 THEN AN•l6 189 IF ABS..CHRS(lil.J HEH PG..P-G·l 312. A!l-l:AF•Z8:AG-194 :1F LA>ll TH 0 RIGHTS!AOS.3)_."VEf" THEN AN-AM 64 LB-S: LC-II : IF P6<3 THEW PG-63 . EN ~Af-5 .: ElSE AE-4 H :ABHA!IJ•AOJ , , 66 PRINT@( 128+~ LB*32)+( ( LC*l6)+2 182 TF ABS•CHRS (94) THEN Pi;:;PG+i: ~ 384 60StJ8 358 446 NOT AO.AP . AO l l .ABS( ( LB+ZJ+LC+l l; : IF P6>63 THEN PH 396 ff ABs-·o· THEN RETIIRN; ELSE 448 RETIJRH 68 LC- LC+! 184 PA( PD - I J-PG+64 GOSU8 418 _ 458 • * TRAP ERR • 70 IF AN-( ( L8•Z)+LCl THEN 74 186 If ABS-CHRSC32J TH EN Pf•Pf+l 388 IF AJ <5 THEN LA-AJ 452 OOSUB 388:SOUNO 280,l:PRIHT@ 72 If LC-3 THEN LB•LB+l :LC-ll:GOT : IF PF>! THEN PF-B:GOSU8 402:CLS 3111 HSCREEN LA 224. "WA RN! NG: ERROR HAS OCCURRED 0 66:ELSE 66 E Pf-LA 312 GO SUB 394 : GOSU8 402: HSCREEN >":E:RNO:PRINT8256, "(PRESS ANY K 74 AD•2:AE•8:AF-14:AG-129:AH-16: 188 I f PF>0 THEN GOSUB 418 e EY: RETURNS 10 MENU)" GOSU8 358 190 HSCRHN Pf 314 GOTO 296 454 UNLOAD: GOSUB 394: GOSUB 388: G 76 IF ABs-·o· THEN RETURN 192 IF ABS <>CHRS(l3) THEN 172:EL 316 '• MONITORS * OTO 40 78 LD•((AJ - 1J•2)+(Al - ll+l SE GOSUB 492: HSCREEN 0 : PC-USR0( A 318 PRINT@449. " [ ARROWS) SELECT T 456 '• LEAVE- IT * 80 IF LD<•AN THEN LBS-ABS(LDl :GO G):GOTO 159 YPE OR [QJUIT": 458 CLS:PRINT@5."THANKS FOR USIN SUB 388:ELSE SOUND 200. l:PRINT@4 194 ·• SAVE PIX * 320 PR I NT@l28 . "SELECT A MONITOR G vef!T" :UNLOAO:ENO 49. "INVALIO SELECTION: PRESS A K 196 IF AJ-3 OR AJ-S THEN SA•7:EL TY PE: NOW - • : : IF HA•Z TH EN PR IN EV-:: GOSUB 394: RETURN SE SA-14 T "???":GOTO 324 82 PRINTi225, "LOADING PICTURE [" 198 IF FRHC HRS (8) THEN 214 A-1 : RGB 94 GET Ill. LG: IF HA•0 THEN PA( LG- 208 IF SA>0 THEN SA-SA- l:SBS-LEF 334 GOSUB 408: RETURN 3 )-VAL( "&H"+M IOI (LAS. ( ASC ( LCS) *2 TS< SBS. SA l : PR INT@Z44+SA. CHRS< I 75 336 IF ABs-·o· THEN RETURN )+l.2))+64:ELSE PACLG · 3)•ASCCLCS l :CH RS(32l : :ELSE SOU ND 200. l 338 IF AJ-2 THEN 348 12 March 1993

VEF Graphics from Page JO of the BASIC program, Figure 3 shows the HI LI TE machine-language subroutine used ent resolutions. After making a selection, to reverse the video codes to produce a the HSCREEN is displayed. When you fin ish highlight effect, and Figure 2 shows the viewing, press any key to return to the source code for VE FIT . ASM. another ma­ Lines Function display selection menu. Note that an addi­ chine-language subroutine. Vff IT. AS Hread s tional option now appears: View default or writes 128-byte blocks of data in the l 0-40Initialization HSCREEN. This option allows you to address range $6000 through $7FFF. 42-52Main Menu reselect the most-recent viewing choice you Since the four 8K blocks of HS CREEN 54- I 44 Load Picture made, as indicated. After using Load Pic­ memory ($60000through $67FFF, or blocks 146- I 92 Palette Change ture, this option also appears for reviewing 48 through 5 I) are not mapped into BASic's 194-290 Save Picture an image in its intended resolution. How­ regular workspace, VEFit must use Page 292-314 Memory Display ever, the default value changes each time Address Register 3 at $FFA3 10 map these 316-354 Monitor Reser you choose a different viewing option than blocks into the $6000-to-$7FFF range one 356-384 Option Select View Default HSCREEN. You must use at a time as required. To gain a better 386-390 Clear Screen this option at least once to enable graphics understanding of how the MMU is used lo 392-398 Keyboard Input mode toggling with the Change Palette op­ switch SK blocks of memory in BASIC' s 400-404 Default Palette tion, as this is the default HSCREEN used. workspace, refer to "Barden 's Buffer" (THE 406-414 Read Palette Monitor Reset: This function is auto­ RAINBOW, May 1990, Page 78) and "New 416-424 View Palette matically performed after you start VEFit. Clear-screen Routines: ML and the Coco 426-448 Read Directory However. if you made an error in selection 3" (THE RAINBOW, June 1992, Page 1). 450-454 Error Trap or decide to switch the type of monitor Conclusively, VEFit provid~s a simple 456-458 Exit/[BREAKJ being used, you may select this option. tool to support the VEF format under Disk Choosing the wrong monitor type causes BASIC. The longevity of this format is a Figure 4: VEFit Subroutines VEFit 10 interpret the paleue values incor­ result of its simplicity. To learn more about rectly when loading or saving a picture. VEF, refer to Tim Kientzle's series of ar­ ticles, "Displaying Picture Files" (TIIBRAIN­ Program Notes BOW, October 1990 through December A description of the VEFformat is shown 1990). I hope VEF gains wider recognition Thomas Wong is an undergraduate pur­ A1•e., Red Deer, AB T4P IJ7, Canada. in Figure I. The various parts of VEFit are under Disk BASIC, as there are many advan­ suing a degree in commerce. He enjoys Please include an SASE with sufficient re­ shown in figures 2 through 4. In reverse tages ro following a good standard. cycling. stamp collecting and playing Bud­ turn postage when requesting a reply. order, Fig ure 4 shows the various portions minron. He may be contacted at 29 Page ~ Feature Program ,,, Twenty One ,-,-- , I I I ,, I andOver I I -, I- I I ,,­ By Trevor Boehm iii I I I ,, Twenty One is a twist on the classic game Blackjack. Instead of dealing cards, the object is to stop three numeric tumblers I I - in such a way that the total value of the I displayed numbers is 21 or greater. But it I I isn't easy .. . Twenty One works on any CoCo with at - least I 6K and Extended color BASIC. Enter n11 the listing as shown, save it to tape or disk as TWENTY! , then enter RUN. After reading the short instruction screen, press any key , , , to proceed. Displayed in the middle of the playing screen is a spinning tumbler with The Listing: TWENTY 1 90 CLS :PRJNT"PRESS ANY KEY TO ST numbers on it. Press any key to stop the OP COUNTERS" tumbler: the value displayed is added to 100 cc- 1: GOSUB 140 -- ' TWENTY · ONE 110 CC-2: GO SUB 140 your total. After you have stopped three ' BY TREVOR BOEHM tumblers, if your total is 21 or greater. ' COPYRIGHT (C ) 1993 120 CC- 3 : GO SUB 140 130 CC-4:GO SUB 140 : GOTO 17 0 you've won! 'BY FALSOFT, I NC . 140 C( CC )-RND(!0)-1 This delightfully simple game is remark­ 5 ' RAINBOW MAGAZINE 150 PR INT@256+14,C ( CC) 10 CLS 160 IF INKEH< >"" THEN PRJNT@454 ably entertaining. I hope it finds a good 20 PRINT"TWENTY - ONE .. . ":PRINT home in your software library. +CC*3,C(CC J : RE TURN ELSE GOTO 140 30 PRINT" THE OBJ ECT OF THE GAME 170 PRINT@448, "TOTA L SCORE WA S:" 1S TO SCORE 21 PO I NTS BY STOP ; C< 1)+C(2 )+C ( 3)+C( 4); PING EACHOF FOUR COUN TERS. YOUR I I 180 IF C(! )+C(2)+C(3)+C(4)->21 T SCORE IS THE SUM OF THE DIGITS 0 HEN FOR X-1 TO 10 :CLS RN0(9)-l:N N THE COUNTERS . GOOD LUCK!" Trevor Boehm is a tenth-grade student EXT: PLAY "CCDD EEFFGG " : PLAY" P402CC 40 EXEC44539 DOEEFFGG": PLA Y"P403CCDDEEFFGG": C whose grea1es1passion is challenging com­ 50 PLAY "01T5CDEFGP4" LS: PR INT@256+5,"YOU BEAT THE CO M puters with new programs. He has partici­ 60 PL AY "02CDEFGP4" -· PUHR!" 70 PLAY "D3CDEFG" pated in several science fairs and has re· 80 Al-INKEYI: I F Al<>"" THEN 80 190 EXE C4 4539: RUN I I ceived numerous awards for his work. He can be contacted ar 77 Inwood Cres .. Winnipeg , MB R2Y IA2. Canada. Please include an SASE when requesting a reply. March 1993 13

17 Static string pool: The idea is that our string manager is pro­ (Most of the code for the basic string Advantages: no size limits. viding some service to its client, and we manager appears in the following para­ Disadvantages: deleting strings need to distinguish between things for which graphs. In the interest of conserving space, doesn't reclaim space. the client is responsible and things that the l've deliberately left out some pieces, so B"" Combination of previous two: string manager must handle. The general you should carefully slud y this to make sure Advantages: easy to implement; al­ rule is that theclient and the manager never you understand what's going on.) lows fast handling ofco mmon shorter strings; uses string pool to handle * Str 1ng handle Is pointed to by X. get f1rst character occasional longer ones. ldx ,x Get point er to string Disadvantages: deleting longer l da ,x Get character strings doesn't reclaim space. Figure l TIM KIENTZLE 17 String pool with compaction (or "gar· bage collection"): make changes to something they don't own. One point that deserves some comment Advantages: size and number of The first goal in designing any package is that a handle in this case actually contains strings are limited only by pool size; such as this is to figure out what the client slightly more than just a pointer to the memory is used fairly efficiently. has to deal with . The first hurdle appears string. It also contains a pointer to the next How to Manage Disadvantages: harder to implt:ment; when we realize that the client cannot use handle. Depending on your needs, it might can't use pointers to strings. pointers to the strings. since compaction be reasonable to keep even more informa­ Strings, Part II can happen at any time and this can cause tion in each handle. For example, you might As I pointed ci ut last month, the last the strings to move. In stead, we'll let the want to keep the size of the string here as Last month we discussed six different method is the most general, and there are client have pointers to handles. A handle is well. approaches to handling strings in C or as­ ti mes when it is the only one that will work really just a pointer, but it 's a pointer that All handles are in one of two lists. One sembly language. To refresh your memory, well. But the others are faster and/or easier we own, not the client. Since the handle will !isl starts with the handle pointed to by the they are to implement. and are usually preferred never move, it 's perfectly safe forthe client "first" variable. and it contains all the when they will do the job. This month I'll to have a pointerto it. And since we own the handles that are in use. This li st is used D'" Allocation of a fixed number offixed- develop a compacting string manager in handle. we are free to change it whenever whenever we do compaction. By keeping length blocks for storing strings: some detail since it will bring up some we need to. this list sorted. our compaction becomes Advantages: fast and easy. interesting points. This means that our client has to be much simpler. The second list is a roster of Disadvantages: limits number and careful when actually accessing strings. the string handles that are unused. A sig­ size of strings. A Compacting String Manager Since the client's pointer is really a pointer nificant part of crealing a new string or .,.. Allocation of space for each string The idea behind a compaction system is to the handle, the client must first get a freeing old string space involves moving from ma 11 oc: simple; whenever we can ' L easily find pointer to the actual string in order to ma­ the handle from one list to the other. Advantaf(es: easy; no limits on size enough space, we move all the strings that nipulate the string directly. Be very careful First. we define the actual storage forthe or number of strings. are still allocated down to the bottom of the with this since strings can move any time a pool. Just as with the simple pool manager Disadvantages: can be slow when string pool. TI1e result is that all the remai n­ new string is created. Usually we'll create described last month, we need to know Lhe there are many strings; not usually ing free space once again appears in a block routines in the string package to handle addresses of the beginning and end of the avai !able for assembly programmers. at the top oft he pool, where it can be easily almost everything the client could need pool and the address of the free space at the """ Fixed-length blocks, dynamically al- allocated. (copying strings.concatenating strings, find­ top of the pool. which is where new strings located from the heap: In order to simplify the following dis­ ing substrings). so the client should hardly will be allocated. This can be accomplished Advantages: unlimited number of cussion, let's establish one bit of terminol­ ever need to obtain a pointer to the actual using the code shown in Figure 2. strings. ogy: a client is any program, fu nction or string. If it did. it might look something like Disadvantages: limited si1..e. other code that uses our string manager. that in Figure l. continued

Unsurpassed Entertainment Software For Your Color Computer

OTHER EXCEPTIONAL PRODUCTS CHECK OUT OUR NEWEST TITLES War Monger An incredible war game simulator ond constructian set. $29. 95 Crystal City Ultra.fa st spoce orcode action . Hardwa re moiling with 128K. $34.95 The Contras Quest for Thelda 500 screem of last fanta sy action. $34.95 Hint book $4.95 This Sl2K porom ililory combo! or

Tips, Tricks . .. continued This would be faster if we didn't start from the beginning of the used list everytime we We also have to define tbe handles. needed to add a new handle to the end. The Since each handle is four bytes Jong, we code is shown in Figure 6. allocate 400 bytes for I 00 handles. If we Finally. there's the actual compaction • Free a string were implementing this in C, we would routine (see Figure 7). Since the list of used • On entry . X points to a str1ng handle •There are two steps: remove it from used l1st, add it to free list probably use ma l 1 oc to allocate space for strings was kept sorted, all we do is walk free pshs d,x ,y the string pool and the string handles. The down that list, moving each successive string * Fi rst remo ve from used list advantage is that it should be easy to create down to its proper location. In the code cmpx first Was this one first ? new string handles (or enlarge the pool) as below, Register X points to the string handle bne free! ldy 2,x If so, the second one becomes f irst we go along. We also need pointers to the we 're considering, U points to where the s ty f irst two lists. The code fo r this is shown in string is bei ng moved, and Y points to bra free4 Figure 3. where the sering is now. freeJ ldy first Ot herwi se. st art at the first Unlikethestring-poolmanagerdiscussed To make this into a full-fledged string bra free3 (S t art by checking the fi r s t one) fr eel 1 dy 2 ,y Get the next handle last month, the client· needs to reset the manager, we should write the routines to free3 cmp x 2,y Is th1s the handle before us? string manager before actually trying to perform basic string operations. For ex­ bne f r ee2 No, kee p looking create any srrings. The bulk of thi s routine ample, a string-concatenate function would 1 dd 2 .x Get pointer to handle after us (see Figure 4) is devoted to putting all the take pointers to two string handles and s td 2.y Make handle before us point to handl e after us *Now add to free list handles onto the free li st. return a pointer to a new string handle free4 ldy f r ee Get add ress of first free handle Freeing a string is actually pretty simple which points to the new string. With a fully sty 2. x old first handle is now after t h1s one since all it really amounts to is abandoning functioning string manager, it should be s t x free This ha ndle is now f1rst free one the string - the compaction will reclaim relatively simple to write a line-based edi­ puls d,x,y,pc the space later. The complicated part is tor by simply storing each line as one string. moving the handle from the list of strings in Hopefully, by the time you read this, I'll Figure 5 use to the list of free handles. As we have have completed a somewhat more sophisti ­ things now, this requires searching the list cated version of thi s string manager in C to find the handle just before ours. If de­ and uploaded it to Delphi. Look for it there. sired, we could speed it up by augmenting each handle with a poi mer to the previous handle. This could be made beefier by check­ ing for various errors (see Figure 5). Tim Kienrzle is Gurrenrly pursuing a Allocating a string is a simple process, doctorate in mathematics at the Universirv •Allocate next str ing in pool too, if there's enough space. If there's not of California at Berkeley. He is rhe a111/u;r *Size of r equested string i n D • Return address of string i n X enough space, we do compaction and try ofV-Term and has worked with the Color alloc pshs d.Y Save registers . but not X again. If it fails twice, there really isn 't Computer since 1982. * Get address of string enough space, and we must report an error. ldx pall oc Address t o store str 1n g leay d. x Mov e end of pool ad dress after thi s string cmpy #pend ls this past the end of the pool? bl o allocl If not , we're okay bsr compact If it is . then compa ct ldx palloc Try allocating aga i n l eay d, x New palloc cmpy #pend l s 1t too b1 g? poo l rmb 1000 1000 by t es of s tring storage lblo allocl pend rmb 0 End of poo l ldx #0 Return 0 if we can't create the stri ng pa 11 oc rmb l Po1nt er to cu rrent allocation spot in pool bra all oc4 allocl sty pall oc Bump po i nter for allocat i ng next stri ng Figure 2 • Get a string ha ndle, X holds address of s tring 1 dy free Address of f 1 rst free handl e pshs y Sa ve it. this will be our new han dle l dy l ,y Address of second free handle sty free That ' s now the f1 rst free handle pul s y Now we have our handle stx ,y This handl e knows wh ere our stri ng is s tored ldd f irst Get ad dress of f1rst handle into D. bne all oc2 If there aren't an y . . . sty f irst .. then this is the f1rst one. bra all oc3 alloc2 tfr d, x Put po1 nte r to handle 1n x l dd 2. x ls there another one? str1ng s rmb 4*100 Handles for 100 str1 ng s bne a 11 oc2 Yes, keep going free rm b l L1st of free ha ndles sty 2. x Found the end, add t hi s one to t he end first rmb 2 First hand l e in pool alloc3 ldx f/0 Mark t his one as t he 1 ast one stx 2. y Figure 3 tfr y. x Move po inter t o X for returning alloc4 puls d,y.pc

Figure 6

• Reset t he string pool. f reei ng all the strings reset ps hs d.x .y ldx I/pool Address of the beginning of t he pool * Compact stx palloc That's the new allocation sp ot * Start w1th f1 rst al 1 ocated handl e ldx #O Th ere are no handles currently i n use * Move ea ch one where it should be stx fi r st compact pshs d. x,y,u ldx I/str ings Get add r ess of first ha nd l e 1du I/pool Where the first string s houl d be stx free First handle Is now first free handle ldx first Get the first string l da l/99 beq garb9 If none . t here's nothing to do resetl leay 4,x V points to next string handle garbl ldy . x Get where str ing is now sty 2,x first handl e poi nt s to second han dle stu . x Store wh ere it will be in a minute tfr y . x Now po i nt to second nanol e garb2 l da .y+ Move t he str 1ng de ca sta . u+ bne reset! Point 99 string handles each to t he next bne garb2 Nul 1 byte means en d of string ldy 110 ldx l.x Get next handle sty 2,x Last string handle points nowhere bne garbl puls d.x,y.pc Restore variables and r eturn garb9 stu pa 11 oc Jus t after last stri ng i s where we allocate now pul s d,x,y , u,pc Figure 4 Figure 7 March 1993 15

Feature Article Monthly Calendar by Harold H. Britten Miniature calendars are handy when you Calendar has displayed the appropriate need to know the day of the week on which month, press any key to see the calendar for a given date falls. Check registers often another month. include such calendars for the current year Calendar is "perpetual" -that is, it can as well as one or two years in the future. and be used to display the monthly calendar for most convenience stores carry plasticized any month of any year. This sure helps wallet-size copies as impulse items at the make planning for the future much easier. counter. It's easy to lose those little cards, The program can also be fun - use it to see though. what day of the week you were born on. I Calendar is a short BASIC program I hope you find Calendar to be a useful (and wrote so my Coco 3 could give me this fun) program. information, too. When you run Calendar, you are prompted Lo enter the month and the year. To do this, enter the first few letters of Call Ira Barsky Call Kim Lewis the month, followed by a comma and the Harold H. Britten is an avid bycyc/ist Weshnn Sales Direclor Eastern Sales Di111clor year. Make sure you enter all four digits of and currently works/or a hea/1h and fitness • (312)587-1818 (502)228-4492 the year (e.g., 1992 instead of just 92). For club.He may be contactedat949 N.Loudon example, to see the calendar for November Rd., Apt. #6, Latham, NY 12/10. Please 1995, you would enter NOV, 1995. After indude an SASE when requesting a reply.

The Listing: CALENOAR / 400 )+D: FOR t-0TOM - l: D•D+D CI) : NEX T : D•D+6: D•D - 1 NT( D/7) *7 'PERPETUAL CALEN DAR 40 CLS :M$-MS(M)+STR$(Y ) : PR I NTTAB 'BY HAROLD H. BRITTEN ( 21 · LEN( MS) /2) ;MS: LOCA TE0 ,3: PRIN '(COPYRIGHT (Cl 1993 T" SUN MON TUE WED THU FRI 'BY FALSO FT. INC . SAT": LOCA TE5*D, 6: FORI-lTDO( MJ+ 5 'RA rNBOW MAGAZINE 28: M$-STR$ (I): PRINTLEFH ( " ", 5 10 WlDTH40 : DIMM$ (12),D ( 12 ) : fORI- - LEN( MS) )+MS; : D-0+1: IFD-7THENPRI 1T012: READM$ ( I ) , DCI) :NEXT NT : PR! NT: PR I NT : D•0: NEXTELSENEXT The Falson Building 20 PRlNT: INPUT" MONTH . YEAR"; 50 AS-INKEYS: IFAS-""THEN50ELSEPR M$. Y: FORI•1T012: I FM$•LE FT$ ( M$ (I) I NT : I FAS - " "THEN IFM

:B~nrlj~ l£ ]B(Jrlje Por your "Color Co•»uter" P.O. Box 733 Maple Valley, WA 98038 Satard&7 Yl1 1r.. tfa1t 1130 AJI llY1 7 4&1'• U.S. ORDER DESK: (800) 237-2409 With Carl loll/ '' Gl•••t•• ' rerrF Staoa•/ RIICC INT'L & TECHNICAL: (206) 432-1814 Satard&F Show Karch 27, 10:00 Aft to 6:00 '" Boost your Coco with these fine Burke & Burke products: Satartl&F Soctal1 ta oar loaaa• area 7:30 Pll Saaday Show !larch JI, 10:00 AJI to 3:00 PK THEXDER:OS9 -· NEW FOR OS9. Use your TANDY"'' $29.95 The Place: The Travel Loda• Inn. Thextfer tarlritlge under OS9. By Alan DeKok. Easy highway access et I-35 & 80 interchan1e, Exit ~t24 (Unlversity) 3 bllta East . ~ith a " ll•ited nu•ber" of roo•s The 6309 Book •• 6309 programming book by Chris Burke. $:U.95 reserved at Fest rates. $35.00 per roo•, up to 4 occupants /nclutles XSM assembler, tlisassenrbler, anti DEBUG palches These are li•ited, reserve your roo• early: 1-800-255-3050 for OS9 Level 2. Airport shuttle provided! (roo•s only) PowerBoost •• 2 MHz enhanced HD63R09E processor wl OS9 $29.95 Our national reach out and central location should assure kernel anti 110 patches (10'1c • 50% speed improvement). Note: full attendance wi th an attractive and fun filled Fest! so/tiering required for installation. Come and visit at: The Travel Lodge Inn with attractively d i splayed booths and plenty of walking and talking roo•• WORW CLASS CHESS* -- Use Cyms Chess cartridge"':/ I2 OS9 $29.95 Speakers, start with the well known Ja•es Jones of FILE SYSTEM REPACK l .l --FasterOS9diskdefragmenter $29.95 Microware. OS-9 User Group Founding Pres , Boisy Pitre, and ' FILE RECOVERY SYSTEM -- Helps recover files from OS9disks. $24.95 Terry Simons, RSDOS. And others vill fill an attractive R. S. B. •--Disk BASIC.for Level 2 (BASIC ROM required). $39.95 se•inar schedule . Join our evening informal round table EZGF:N I . I 0-- EVEN FASTER! Handy & powerful OS9 bootfile editor $19.95 chit-chat gathering , and •eet other users . Wlth both heavy WILD & MV -- Use wildcards with OS9 commands; move files e•phasis for the OS-9 enthusiast: and a good representation $19.95 of RSDOS . Thia proal••• to be a w•ll roaa4o4 F••tl PER1ASCJI -- Challenging OS9 game to make words from a list of $19.95 • Color Coapator real TOD 4oa't vent to alaal random letters. Play against tire computer, 11111/ti-11ser, or BBS. Tickets : Til Kar t At door niddle A•erica Fest ZCLOCK - Contin11011s tirne I dale display on level 2 screen $9.95 One day $t0 . 00 $12.00 Terry Siaons/ Treas . Tvo day $t2 . 00 $15.00 t328 48th St . COCO XT-- Use PC MFM or Rlllrard drives with CoCo 1 OS9 S/W f,69.95 VIP Breakfast optional $7 . 00 Des ftoines, IA 50311 Check or n. O. Booth prices on request I incl11ded (add $30 for COCO XT-RTC version with real-time clock; add I $20 for XT-ROM hard disk Ulltu-buut ROM). Get a 1 year "UPGIADI Jlatloaal Dhk••1esiao" subscription, and nI&CC membership. St9 .00 US S24 . 00 Canada I DAGGORPATCH --Transfers TANDY™ Dungeons ofDaggoralh $9.95 see Jan Rainbow pg 9 $31.00 Frgn Air $3.00 sa•ple d i sk ctmridge ro DISK BASIC. Adds disk 1/0, screen dump, repeal.

I WA RESIDENTS ADD 8.2% SALES TAX. MasterCard & VISA accepted. U.S. CO D's add S3.75. Min. U.S. shipping $4.00. Min. to Canada $5.00. Please allow 2 weeks for delivery. Por your "Color Coaputer" Overnight or 2nd- day available for in-stock items. Software upgrades S5 .00 each w/receipt. I including U.S. shipping. tttttttttttttttttttttt Call or write for a free catalog of more exciting Color Computer pnxlucts.! "':''.;~"'"' . ·o~ -~~~,~~~~!~J'~t~ ·... ··•\1:,1t; ... 1-800-24$.6228 ,...... " ~ . . "' . Proven Technoloav 1-215-682~6855 '' ...-- Fax: 1·21S.:837'.~J9,:4:.. w,:" On the Razor's Ed~ of the Color Computer Frontier .,,.,,-, Technlcal, H~lp ~;> , ;-, OWL-WARE 1-215-837·1~17 :t/f:,l,\~~;, NOW, 120MB Hard Drive Standard OWL WARE Sollwarc Bundle la our lOtb Tur I f " .• , ~"·· A DltCAJ>lt or llltllVICJt TO Tm COlllPUTSll USltJll ~ :l~ . ·' _.; Disk Tutorial/Utilities/Games DISK TUTOR Ver 1.1 486SX-20 SYSTEMS - $1495.00! · ~. :; r '·. Learn how lo use your di•k drive from this multi-lesson, machine language Now You C&A enter I.lie world of 486 compuu..i at • nuonal>i. coetl pmgrnm. This tutor take.• you through your lessons and corrects your mislakes the OWL SUPER ATOM • 486 's ror a quick, painless disk drive in1roduc- HI~ Powered computlllll f.rom •local, well eetal>U.l>ed compllllT· 1i<1n. {This professionally wriClcn 1u1or WIJb~ is easily worth 1he bundle's 101al price.) • 83MHs / llOMH• 1486 buocl Sytlemt wllb Bockol for Wellek CoProeeuor )"'~~ll/ ~ • Syolem and Video BIOS In Cache 3 UTILITIES • Larae Tower CAio 1 (331\llb:, FCC Clua Bl • C60MH.t, FCC CU... N Floppy Drive Systems A copy verify, copy, and DOS utility. • llilO Wall Power Supply A 8 Opllon Sloi. 2GAMES • S)"'1tc111 Pt h.c lm;lmlcs 120MB 110 4MB RAM, Std. Ri.:solutlun Color VOA Monitor, The Highest Quality for Years of Service 1 We will selccl 2 games from our stock. lligh ~c<0 lu1 lo 11 VO/\ Cnrd . Z li!gh Denshy fD's, MS -DOS 5.0 Drive 0 Systems (Half Height, ooubie Sided, 'These arc sold for more Ch an $20 each. $1495 ; $1795 ; $2095 ; $2185 Do no! mis1akc thissortwarc wilh cheap 186SX-20 486-;H 486DX-SO 486-DX2-66 SOLD OUT! ~ "Pul>lic D1>main'' software which others WE NEED CONTROLLERS! ~ offer. All or Ihi s sof1ware is copyrighted 3- YEA.R W TY l 11clu J11 ~011c l'ullkJr,1n llJ11bJ 11J L.U.'f IF YOU HAVE 502 CONTROLLERS, CALL US! and prolcs.•innal in quali1y. The tutor is uniqu e with us a nd has helped • Super VGA Upgrode OD all systems! Manufo cluro1 lfoir \l'Jrrunly ,.., All llJIJ D11'"" lhou.•and.• of new users learn their disk Drive 1 Systems (Hau Height, Double Sided, drive. OWL SUPER ATOM· 386 Direct Drives) only $27.95 $115. (or even better) • 18126Mlb S86SX Hued • 25/40Mlb S86DX Bued only $6.95 with • Sm•.U Foolptlnt c.. ., • Sm.Jl Footprlnt Cue New 3.5", 720K Drives for OS-9 with case • FCC Cl ... B Approved • FCC Clau B Apprond any Disk Drive Purchase!! • 200 Woll Power Supply • 200 Woll Power Supply & Power Supply $129. SALE! • '1 ~pan1lon Biol• • '1 Eapan.1lon Slot. • 4MBofJtAM • a.MDofRAM Drive 1 Systems have drive, case, power supply. (You may require op· 512K Upg ·r~de .#JF • 120 MB llonl Drivo • I 20MB Hard Dri\'c tional cable and/or DOS chip to use) c; ·<· ,.·~~-~·~x·:··r """{ .~: Agnio al a popular p~ice: 'f;u!J.Y,. ~'. • S~cl. Reaolutlon VGA • Std. Reoolutlon VGA Color Monllcr ColOI' Monllcr Special for 0/1 Combos (0, 1,2,3) $ 99. scmblcd ancJ Ccslcd \!cforc shipping. $1495 • 2HlrbDorultyFD'1 $1195 / $1295 • 2 Hlrb Denalty Fil'• 1 fa1sy 10 iMlall. Qses (as( !foMI lz 33MI IZ • 101 Keyboard (WITHOUT CONTROLLER) • MS 0086.0 • MS 0085.0 386-SX Notebook Computers 386-DX Notebook Computers -~ HALF· HEIGHT DRIVE All d1 ivc, a1c 11 cw and rully "" c111hlcu . UPGRADES FOR AS HORIZON­ We ship only FULLY TESTED and ZOMHz, 60MB HD, 1.4MB FD, ZMB RAM(up. lo llMlh, 120MB HD, 1.44MB FD, 32KB CACHE, 4MB . &UH· _·, TAL CASES 5MB), VGA 640X480 LCD w/32 1hadt1 of gny. Po.U: 2 RAM(oxp. lo 16MBI, Sid. VGA LCD w/32 gny, Ext 'ERTi Fi ED~• lhcsc low prices. Wi; Sn, 1Par, 1 VGA, DOS 4c Windowt, 7.7LBSI Keypad In<. DOS 4c Windows, 7.7LBSI Wliy onry' in Rnin bow wh" OWL COMPUTER SERVICES CM\.·WARE na1 • i b«al ;rwrat11y poGc:y. ~ 11'141 ...,tlflty lions. Ea,y! 'lakes only 5 n1inu1t;,, 1 ran lruly make this claim. We have 7 petlod, ~ Otit