mi[|(^a(D TM THE (^3^^ JOURNAL ::-s^ ■'A-T AT/»a JATi3fci^^d^|Pl3_ il-I3P 101 'J^3a/U :,-t3P SDl ,JJj":3HIT ,3Wa ,/QrTAaaT*''TJS/I 3^JJ DIl " aR3T3MA?A,C 3i>aJ?- O/.P^ 3TAJU3JA3 :i'l3P lil ige 23i/l"jaA3P aJO fA3JD- fh13? OSI oof\OT<-aa=;T:{iv?ff );i33q=dT^At*': £V\oq-no;zfq:(fVt".f:f )>i33Si0^m'' D.B.H.l^IT, rDOB :OIDO :0S00 rOfOD :DADO "> iOaOD - vDPGO 1 ■■■o J J :OSIO :ISJO :Df:/0 :OAIO ^ No. 30 November 1980 $2.00 •JiilERMANENT RELIEF : v-»i* ^flWIUi.] ■:-^: >•;: -.•• Apple PIE + Formatter Apple PIE (Programnia International Editor) and FORMAT (text fomiatter) offer full strength solutions to today's word processing problems. These versatile, powerful programs provide document preparation and word processing capabilities previously found only on mucii larger computer systems. PIE is a genera] purpose, full screen editor that uses control keys and function buttons to provide a full range of editing capabilities such as search and replace, delete, copy, insert, move. Changes may be made direcOy anywhere on tlie screen and are shown as they are perfomied. FORMAT uses simple instructions embedded in the input text to describe the desired appearance of the final document. It handles centering, underlining, indenting, page numbering, margins, headers, footers, even form letters, includes a proofing capability. These liigh-quality, cost-effective programs come with comprehensive documentation and run on a 32K Apple II. They are available through your local computer store or direct from Programma International, Inc. at the introductory price ofS79.95*. VIDEX VliRSlON T.M. doubll: vision t.m. supr term version t.m. standard version 'December I. S129-95. PROGRAMMA 3400 Wilshirc Boulevard Los Angeles, California 90010 or Simple enough for the beginner. Versatile enough for the professioneil. M alihu M icro compHtiufi presents: 3 GREAT PROGRAMS FOR YOUR APP1£* ! ULTRACHECKERS TM The most advanced checkers program ever available. Combines superb graphics/sound effects and excep- tional ease of operation with advanced artificial intelligence techniques. Checl. 2B& IB- 17 N 2*^ 29^ 34 , -^^ -fsj >" ItI^ 2J^- 2tft> D Enclosed is $1 and my disk. Send me the slide package. D Send more information including VersaWriter dealers in my area. DEALER INQUIRIES INVITED. NAMt ADDRESS c n V S T A t E Z\P Send To: Versa Computing, Inc. • 887 Conestoga Circle • Newbury Park, CA 91320 • {805) 498-1956 Software Distribution This editorial is in two parts. Part I appeared last month. Pari 2 Some Basic Questions To Consider. 1. Is your program worthwhile? Just because you wrote it and think it's great does not mean others will. Show yOut software to knowledgeable friends, computer club members, and local dealers. Get their honest evaluations, and listen to them. They might persuade you not to bother selling your program. They might convince you that it really is worthwhile. Or, they might even give you some valuable suggestions for improving it, 2. Is your program unique? What the world needs now is not another checkbook balancing package. If your program is too similar to products already on the market, it will naturally reduce your chances of success. Friends, clubs, and dealers can assist in determining what is available. The major magazines often list software products (the MICRO Software Catalog for example) and carry ads from software houses. Check catalogs of the major software houses. Since you may want to have a software house distribute your material, contact several. They will be able to estimate the value of your material on the current market. 3. What will your package sell for? In addition to the pro- cedures suggested above, check in magazines, catalogs and stores on what programs of similar complexity and size are currently going lor. In figunng your production costs, remember that printing booklets and copying tapes or disk- ettes can get expensive in small quantities. Advertising and distribution costs must be included as well. 4. How should your product be packaged? First consider how you plan to distribute the material. Mail-order packag- ing can be minimal. Your customer is not buying the pro- duct because of the package. However, store packaging is very important, since your product will be competing with many others for the buyer's attention and dollars. If all of the above questions— and the list is by no means exhaustive — cause you to have second thoughts about selling your software yourself— good! Do not rush into sell- ing software blindly. It can be profitable, even lucrative, but it does take time, money, and effort. Sal) It as an article. !f, after careful consideration, you decide that your particular software is not extremely marketable, but you still believe thai it has merit and should be distributed, then how about publishing It? Most, but not all, national magazines pay for material they publish. Most editors prefer articles which include pro- grams. You should consider a number of factors in selec- ting the magazine to which you submit your material. Is your program the type they normally print? Will the audience of the magazine be interested in your program? Does the magazine pay at competitive rates? Does the publisher pay residual rights, that is, if your work appears in a "Best Of..." or some other reprint form, do you get addi- tional payments? (MICRO'S policy is to make residual payments; many other publishers do not.) If you decide to sell your software as an article, then you may want to re-evaluate your presentation. An article is generally most valuable when it can discuss and describe a technique, methodology, programming trick, or some other aspect of programming which may have value above and beyond the particular application. Your article should em- phasize any unique or interesting aspects of the program in addition to presenting the basic information required to use the material. This will maximize both the chance ot you article being accepted at top dollar and its usefulness to the reader. Summary It you have a good piece of software that should be shared with others, please do not let it lie idle. If you want to spend minimal effort to get it out to others, then give it away. You can make some money on the right type of software by writing it up as an article. The greatest payoff can be in selling a software package, either directly or through a software distribution company, but that does entail additional work on your part. So, tear yourself away from your micro computer long enough to get your work distributed— at least for personal credit, and possibly tor cash. saaaa©" THE il-i<;3 JOURHAL Nr^3D Noiieniiior mau s^oo Cover Artist Liz Jeffrey The 6502 Mlcroprocassor Is Ihere something fishy about the cover? You will probably never see a microcomputer such as the Apple, PET, etc. at the bottom ol the ocean. They are not intended for such extreme en- vironmenls. The basic building block of our farrillar microcomputer, ihe 6502 microprocessor, coulO quite easil/ be tound m such a situation. As we trace our ancestry back to the sea, our microcomputers have evolved from the microprocessor The goal ot the designers of the various microprocessors such as the 8080, 6800 and 6502 was not to build microcomputers. As the name implies, these devices were Intended to be sophisticated process controllers, not microcomputers Many of [he "limita- tions" of these devices can be understood when-the original intent is considered. For example, addressing modes which would permit simple pro- gram relocation, a powerful tool in a general purpose computer systems, ate not provided. That makes sense, however, if you consider that a process controller will normally have its pro- gram in ROM, making relocatability useless. A number of other tradeoffs were made in the design, generally favoring procassing over Computing. The richness of the l(0 capabilities vs. the lack of muHiply and divide instruc- tions is another example. There is nothing inherently wrong with using the 6503 microprocessor in areas beyond its initial design scope. It would be nice, in view ot its use as a microcomputer element, it its pov/er for computing could be improved. New pro- ducts are being released in the aO80 and 6800 lines. It would be nice to see some upgrading of the 6502. A number ol suggestions for enhancements have been submitted iDy fillCRO readers, and will appear in the next issue. Rockwell, Synerfeli, Commodore, are you listen- ing? p Management Planning & Decision Making (for 32k or ^k apple ii with Applesoft basic in rom) I QuikDirt ^ PRODUCriCN SOIEDULING ^ INVB^ORY CONTROL i^ CAPITAL BUDGETING ir DISTRIBUTION PLANNING CONGRATUWTIONS... YOUR APPL£ II CCmjTER HAS JUST BEEN PROMJTED INTO "MIDDLE MflNAGH™""! SEE YOUR LOCAL COMPUTER STORE OR COm'ACT: M^jyman associates 421 SEVILLE WAY SAN MATEO CA 94402 ■jSr SUGGESTED RETAIL PRICE: $120 AIM-65 EPROM PROGRAMMER FOR AIM-65 ROM EXPANSION FOR AIM-65 S86.50 Programs 2716, 2516, and 2532 Accessories $33.50 Eliminates need to remove Assem- EPROMs. bler or Basic ROMs. Selectable blank check and verify. "Straight-thru" design retains use Can copv existing EPROM. of Expansion connector. Software utility routines to relocate 1 Sockets for up to 8K additional your object code to EPROM ad- ROMs and EPROMs- dress. Does not interfere witii cassette. MCC Available with Zero-Insertion-Force sockets ($49.00). 20076 CHAPMAN AVE ORANGE, CALIF. 92669 RS 232 INTERFACE FOR AIM-65 PARALLEL PRINTER PORT FOR AIM-65 714 633-0245 $61 .00 $57.00 Interfaces Aim-65 to a wide variety Interfaces Aim -65 to Centronics of systems. Parallel Port. SEND FOR ADDITIONAL Software selectable baud rate. Compatible witli over 34 printers Straight-thru ' design retains full from different manufacturers. PRODUCT INFORMATION use of Application connector. Complete witfi connecting cable. Complete with connecting cable. Compatible with Aim-65 IVlonitor, AT NO CHARGE Compatible with Aim-65 Monitor Assembler, and Basic. CALIFORNIA RESIDENTS ADD 6% Assembler, and Basic. How to Use the Hooks There are a lot of great things you can do with your APPLE, once you know how to use the available hooks. Richard Williams 4380 Albany Drive #23 San Jose, C A 95129 The APPLE II allows the user easi- ly to substitute his own input and output routines for the standard ones. Figure 1 shows the basic flow of control when a character is out- put by the APPLE II. Figure 2 shows how the control path changes when the user substitutes his own output routine for the standard monitor path. By using what are known as "hooks," the user can break the nor- mal How of control and redirect it to his own routine. An example of how this can be used is shown in figure 3, Control characters normally do not show on the screen. However, by inserting a routine to change control characters into inverse video when printed, the characters will show on the screen. This is very useful for listing programs containing control characters. How It Works Before doing the actual input or output, the system does an indirect jump, via the zero page, to the ac- tual input Of output routine. By changing the jump address, the user can substitute his own routine for the standard zone. For input, at location $FD18 in the monitor, there is a JMP (KSWL) instruction. KSWL (at $38) and KSWH (at $39) contain the address of the input routine with the low byte specified first. Similar- ly, at address SFDED, there is a JSR (CSWL) instruction which is the jump to the output routine. CSWL, address $36, and CSWH, at $37, con- tain the address of the output routine. This code can be seen on pages 85 and 86 of the red APPLE II reference manual. How to Insert an Input Routine The norma! input routine Is KEYIN at address $FD1 B. To replace it with your routine, store its address in KSWL and KSWH. Your input routine needs to do the following: 1 . Upon entry to your routine, the ac- cumulator will contain the character replaced by the flashing prompt. You must restore this character on the screen by doing a STA (BASL), Y where BASL = $28, Do this before altering the A or Y registers. 2. Clear the keyboard strobe, if the character came from the keyboard. 3. Return the character, with the high bit set, in the accumulator. 4. The normal input routine in- crements the random number seed while It waits for input. You should do this also. If you wish to get your input from the keyboard, you can do all of these by doing a caM to KEYIN (JSR $FD1B}. You can then do whatever Outputting Program Outputting Program \I/ \1/ Outputting Program \!/ \I/ \ / Monitor Monitor Monitor Output Output Output Handler Handier Handler vt/ Monitor User User Routine Character Character To Convert Output Output Control to Routine Routine Inverse Video Figure 1 Figure 2 \\/ Monitor Character Output Routine Figure 3 November 1980 MICRO — The 6S02 Joumal isbir processing that you want on the character, which is in the ac- cumulator, and then return with an RTS. If you write your own routine to replace KEYiN, you should first carefully study KEYIN. How to Insert an Output Routine The normal output routine is C0UT1 (address $FDFO). To insert your routine, store its address in CSWL and CSWH (addresses $36 and $37) with the low byte first. The character to be output wiil be placed in the accumulator before your routine is called. If you wish the character in the accumulator to be printed on the screen after you are done, exit your routine by doing a JMP C0UT1. A routine lo convert control characters to inverse video is an example of this. How to Remove the Routines The input and output routines can be removed from the hooks by typing IN#0 or PR#0 respectively. Or, if done in a program, a JSFl SETKBD (address $FE89) simulates a 1N#0, and a JSR SETVID (address $FE93) simulates a PR#0. Special Notes for DOS Users If you are using the disk operating system (DOS), you must follow some special rules when attaching or removing your routines. DOS nor- mally sits in both the input and out- put hooks itself. Consequently, when you alter the hooks, you must call a DOS routine which informs DOS that the hooks have been changed. DOS will then reconnect itself to the hooks, but it will use your routines instead of the stan- dard I/O routines. The routine to do this is at $3EA. Example The sample program in figure 4 in- serts or removes a routine from the input hook. SOURCE FILE; NF.WKEYS OODC: 1 BKSLSH E(!!I 720 008B; 2 CTRLK FOU 139 008CJ 3 CTRLL EQU 140 008F: 4 CTEI.0 FQU U3 FDIB: 5 KEYIN EOU SFDIB 0038: 6 KSWL EQU S38 0039! 7 KSVni EQU $39 03EA! 8 HVSH EQll S3FA OODB: 9 RTBRfT EQU 219 FE89: 10 SETKBD F.CV SFES9 OODFj 11 imDBSCR EOU 223 ASCII BACKELASP ASCII CONTROL K ASCII CONTROL L ASCII CONTROL MOKITOP'S INPUT HANDLER INPUT HOOK ADDRESS ROUTINE TO RFCOIiMKCT DOS ASCII RIGUT BRACKET SIMULATES WHO ASCII UNDERSCORE SI 0300: Xi UUJ 13 [Lt; NAf t lb ORC NLWKMa .UBJU 5300 03001 4C OF 03 li JMP UNHOOK :JUHr TO DIECONKECT BOUTIN^! 0303: 15 * 0303: 16 * THIS PART ATTACHES OUP ROUTI^?E IITO THE INPUT HOOK 0303: 17 * 0303:A9 Ifi 18 ATTACH LDA J>KEYCHECK ;A- LOU RYTF OF ADDRESS 0305!R5 38 19 STA KSLT, 0307!A9 03 20 LDA *I. 1.7 0322!DO 03 41 BNF N07T. 0324:A9 DC 12 LDA /^BKSLSH ;[MKr IT A FACKSLAEH 0326:60 /.3 RTS 0327:C9 PF 44 NOTL aip ffCTRLO jCOHTPOI 0? 0329:Dn 02 45 PNF rnrootT 032F!A9 DF Sfi I.DA /^iffRECP 032D:6n 47 ni)TioNr PTS **• SUCCESSFUL ASSrxpT.Y: NO rppopr. 308: JSR $3EA ; Reconnect DOS 30B: RTS 30C: JSR $FE89 JSR SETKBD to simulate IN#0 30 F: JSR $3EA jReconnect DOS 312: RTS 300: LDA 302; STA 304: LDA 306: STA #low address of routine $38 ;Store it in KSWL #high address byte of routine $39 ;Store it in KSWH Figure 4 To connect your routine, do a 300G from the monitor. To remove your routine from the hook, do a 30CG. A Sample Program Using the Input Hook There are three characters thai the APPLE II can understand, but that cannot by typed in from the standard keyboard. They are the backslash (/), the left bracket (D, and the underscore {_). One way to type in these characters is to make a hardware modification to the keyboard. Another way is to attach a routine to the Input hook that will convert unused control characters to these characters. This program converts the following characters: Control K to a left bracket (D Control L to a backslash (/) Control to an Underscore {_) To use this program do the follow- ing: Type or BLOAD the program at $300. Note that this program is writ- ten for DOS users. If your aren't us- ing DOS, then replace the JfvlP $3EA with RTS instructions. To connect the routine, do a 303G from the monitor or a CALL 771 from BASIC. To disconnect the routine, do a 300G from the monitor or a CALL 768 from BASIC. The sampie program uses the out- put hook to convert control characters into inverse video characters. All control characters except control M, which is the car- riage return, are converted. SOURCE FILE: CONVERT FDFOi 1 COUTI EQU SFDPn 0037i 2 CSHH EOU S3 7 0036t 3 CSWL ECU $3fi 0081): 4 CTRLM EOU pan 003F: 5 MASK EOII S3F 03EA: 6 MVSM EQU S3nA ooeo: 7 miL FOU S80 FE93: 8 SFTVin rr>u SFF93 OOAO! 9 SPACE EOU SAO CFAFACTER OUTPUT PPUTINE OUTOUT )100K HICH BYTE OUTPUT HOOK LOVJ EYTF. COtlTPOl, M MARK TO COinTPT TO INVERSE PECOtmECTK DOS HULl CIIARACTEP PEPEORHS FEyO SPACE CI'APACTFP N 0300: -AT iJtiJ II 1 OEC S300 0300: /.C OF 03 1? J>;p uimoor. 0303! !3 * 0303: 14 * ROUTINE TO COHtlECT P.OUTIME INTO UOOE 0303: 15 * 0303 :A9 16 16 LDA (^X;ONVERT ;CET LOW BYTE OF AUDPEES 0305:85 36 17 STA csi;l 0307:A9 03 18 LDA ff= SPACE CHAPACTER 03iC!B0 06 36 BCS GOOUT 031EtC9 8D 37 CMP flCTRLM ;RETURt; CHAR? 0320! FO 02 38 BEQ GOOUT 0322:29 3F 39 AND flMASK ;CONVFPT TO INVERSE 0324:4C FO FD 40 GOOUT JMP COUTI *** SUCCESSFUL ASSEMBLY: NO ERRORS Summary of Important Addresses for Using the Hooks Name Address Comment KSWL $38 Low address byte of input routine. COUTI $FDFO Monitor character output routine. KSWH $39 High address byte of input routine. CSWL $36 Low address byte of output routine. MVSW $3EA Routine to reconnect DOS CSWH $37 High address byte of output routine. SETKBD $FE89 Simulates a iN#0 KEVIN $FD1B Monitor keyboard input routine. SETVID $FE93 Simulates a PR#0 Novsmbar 19S0 MICRO — The 6502 Journal 30-4 "Computers ' R' us" A CONSUMER COMPUTERS SUBSIDIARY UNBEATABLE MAIL ORDER DISCOUNTS IcippiG computer Authorized Dealer ^X £zi^925 L J il fo« 16K 48K FOR ONLY ||appte>- '!»« APPLE II OR APPLE II PLUS APPLE COMPUTER .„„„„• PERIPHIRALS *P'*'^^ ADD^ONt DISK II DHiVf b CONTHOLLER CAHO C3BVUS 10 MfOAlYTI HAND OISK Witn DOS ) 1 Uil IMf M9 DRIVE SVSTIMwIpvi.. .uppiv *M6 DISK II DRIVI i CONTBOLltft c,d. 4BE CORVUS CONiTILiATlON W niB« II niliui ONIV Ik ""< MEMORY UPORAOi KIT GBAPHi?8T«Ltr ^ (TRS.O. API-LI II. SORCERtm M f ILEnTIpE PmNTiR *((n, ««■ ! ! ! ! ! ! iSS "^ NUMimC INFUT KEYPAD SSM AlO SEniAUPARAUEL^KM 1G« ^X=^,^'*,;;?;7„V,; .■■.■.■.'.■-■.■.■-.. JM SYMTEC LIOHT PEN SYSTEM .216 BHIQMTPIN LipHTMN ., _^ SYMTEC SUPER SOUND QENEBATOH 22S GPIB IEEE *" n»'»""'„„ ^ ™ SVA» INCH DISK CONTROLLER CARD 33S ""'^"''""^ Jl^':"!?" ""* \. . ?^ VERSA WRITEfl DIGITIZER BYBTEM ..JIS ^''""i'^''^ 'Ji ^"'^.Y,™ ' ^ VIDEX VmEOTERM 10 COLUMN CARD 316 "' Vo^/oJ^r^^.S'n-'^SSD^YSTEM rorms°KD;iV%VN?i''*'''"°" SI •'»'C?,''MTM^?RSSSSrA''sic''"" 2» LSsoDmvE'";™°l,«r.::;:::;.,:3^ n,.c«ov.o««.d..« dissector ^ DC HAYES MICBOMOOEW H 319 m^bVipTS't^RMInZl DAN PAYMARte*.. CIM»I>II., S» M6H SUPER TERMINAL SO caluTiK cariJ JJb API>LE COMCUTER APPLI II or APPLE II PLUS INT£RFACG CARDS SOFTWARE PARALLEL P«lftTt« Ini. IWd '.... 1«i PASCAL «tlh LANGUAGE SYSTEM «25 COMMUNICATION CABnw/conn, dBtt 188 FOHTHAN loi UM with LANGUAGE HI SPEED SEmAl Im. cvi 1«B STSTEW .... 1E£ LANGUAGE SY8TIM »vl«i PASCAL. . «B CPIM tor uH-ilth MICROSOFT CENTRONICS PRINTER int. CHd... . 1H MD SOFfCAXD [Incl.l 239 APPLESOFT II EWMWAWE C«l0,. ., MB 009 J J "* INTEGER aASICnRMWAflSuril.,.. 1«S THE COMTftOLLER Otrwal Buiir»» MOUNTAIN HARiniVJUtE *"ir:^„i . ;, „ . *^' AffBSanBICD THE CASHIER R»«4I M»n»9»m.m 1 ACCE8SOHICS \M,ma,i Sv.«ni 'M A NVlriOn Of APPLEMRITEn Wnril PrscHinr K Mountain Computer ap?lepost maiunq hh ivitim. u APPLE CLOCKjCALEMDAR £*<,... 126 APPLEPLOT Ornih » Plot BYt'"- » SUPERTALKEB SDJOO ■PEECM OOW JON« PORTFOLIO EVALliATOR » SYNTHISIZEH SYSTEM M APPLE CONTRIIUTID VOLUMES ROMPLUS wlk.ybo.rd HHw IB* ' Ih.u i */m.™.li . » INTRODX 10 S*n REMOTE COWTHOL VI8I CALC bY PERSONAL SOFTWARE 120 SYSTEM 24E DESKTOP'PLAN bv DESKTOP INTROUK 10 conlioll.i c»rd only IM COMPUTERS . . . »6 ROMWRITIH SYSTEM . . 1» CCA DATA MANAGEMENT SYSTEM MUSIC SYSTIMIH .qIchIiiiiid) . «e By PERSONAL SOFTWARE V. A/0 Oi* II CHANNELS ... 313 APPLEBUG ASSEMBLEBJ0I8ASBEMHLEH 78 EXPANSION CHASSIS IB. IDI.I. . 666 APPLE DOS TOOL KIT B6 A .: ftTARl VIDEO MONITORS LEEOEX VIDEO IM ... 129 SANYOS'SftW . 166 SANYO 15 sew ?a5 PONACOLOR ID COLOR 329 NEC12 HIRESCOLOR 87S NEC12-L0 RES COLOR 399 NEC 12 GREEN PH0SPHEH(P31I 239 $ 129 LEEDEX VIDEO 100 ^ 16K FOR /5l5f ATARI 800 PERSONAL COMPUTER SYSTEM ATARI ACCESSORIES flOO COMPUTER 479 820 PRINTER 140 toll ... ., .. 459 BIO DISK DRIVE 359 410 Pragram Recorder 59 815 DUAL DISK DRIVE 1199 822 THERMAL PRINTER 1*0 toll 3*9 925 PRINTER IBO col impi 796 BSO INTERFACE MODULE. 175 ATARI IfiK RAM MODULE.. 156 LIGHT PEN 66 ACOUSTIC MODEM ICAT) 169 COMPUTER CHESS .35 19 STAR RAIDERS 49 SUPER BREAKOUT 35 3 0TICTACTOE . 35 VIDEO EASEL 35 MUSIC COMPOSER . 49 •699 C4P aK ROM BASIC BK HAM EXPANDABLE TO 96K 32. M UPPER I LOWER CASE 25««512 GRAPHICS POINTS PROGRAMMABLE TONES ANALOG INPUTS C4PMF(1 DISK DRIVE) .... '899 •429 PRINTERS ANADEX DPBOOO ,,.. 775 ANAOEK DP9S00 13S0 BASE I 599 CENTRONICS 737 .,,. 826 MPI 68 T .... $99 PAPER TIGER lOS 440 w.Qraphic^ ,.-.,,., S95 NEC SPINWHITER 2560 THENDCOM 200 ..,..., 519 S1LENTYPE ■r. Inl S15 EPSON 1X80 wlgrapWcs 729 EPSON MX BD 132 ca\ 620 CIP MOD II 3K ROM BASIC 8K RAM EXPANDABLE TO 32K COLOR EXPANSION 48 LINE DISPLAY EXPANSION SOFTWARE I IN CALIFORNIA, OR FOR BACKORDER OR TECHNICAL INFO CALL (714) 69M088 TOLL FREE ORDER LINE:]^.300-854-6654 CREDIT CARD USERS PlEA'Se READ TERMS QF SALE IN OBOERtNG INFORMATION only WATANABE MIPLOT for mora Info please call or write •FAST DELIVERV •LOW PRICES •COURTEOUS SERVICE •KNOWLEDGEABLE STAFF •LARGE VARIETY I ORDERING INFORMATION Pliafia Oraais ln>lt«d using VISA. MASTERCARD AMERICAN EXPRESS, oi Denh »l'a Iranjisis VISA ( MC crMII c«(d J»ralc» chirgo ol !^. AE C'*ai wllh all ordars Fo^algn ordar^ (aicludlng Mllllerv PO ^i add iO^'d lof shipping and jill lunds must ba Jn LIS dollars Shipping, handling and In. luranca In u S add 3% Celllornlfl resldonis aOd 6% sales la- Our low maralpia prohlbll us lo sand COO oi on accounl All equlpmanl ^ubjacl lo prlca cFiangs and ■vallablllty Ei:fulpnds 30:22 MICRO ~ The 6502 Journal November 1980 76:0re6- 85 f1 STA SEC count and inc-reflfent y^ 77;0F88- Eg F2 laz MIN minutes count ^1 7eiOFSs- DS OUTl CLD clear decimal node 79:0F8B- 20 93 OF JSR DSPLAV Display elapsed time eO : 0F8E- AD 04 flC OUT2 LDA ■riLL2 clear interrupt f laij aiiOFSI- 68 ?LA Restore accumulator 82:0F92- 83 i 84: 40 l¥tl Return from interrupt )isplay Routine 85l 86:0F93- A9 20 OSPLAV LDR S20 Write out a space a7!0F9S- 20 47 8a JSR OUTCHR 88:0F98- AS F2 LDA HIN Write out minutes 89 : 0F9A- 20 FA 82 JSR OUTBYT 90!0P9D- A9 20 LDA S2 Write out a sp-sce 91 !0F9F- 20 47 8A JSR OUTCHR 92 : 0FA2- AS F1 LDA SEC Write out seconds 93 : 0FA4- 20 FA 82 JSR ouTByr 94iOFfi7- 60 RTE 95: 96! Initialiaacion Routine 97: 98:0Fft8- 20 36 SB IKIT JSR ACCESS Un"Writc protect RAM 99:0FftB- A9 80 LDA S80 Configure PB7 ria 100:OFftD- 8D 02 AC STA DDRB an output port lOliOFBO- A9 00 PBOFF LDA $00 and turn it off 10!iOFBa- 8U 00 AC STA ORB 103:OFB5- 60 JITS 104: 105: Hang up Routine 106: 107:OFB6- A9 80 HANG LDB S80 Turn PB7 on 108:0FBS- BD 00 AC STA ORB 109:OFBB- 20 E4 OF JSR DPAUSE Do a 8D0 nisoc -delay IIOjOFBE- 4C BO OF JMP PBOFF Turn off PB7 111: 112: Di sling Routine - Enter with the number 113: of pulses to be dialed in aocumulator. | | 114: 115:0FC1- AA DIAL TAX Transfer # of pulses to Xr 116:0FC2- 48 PHA and save on st^ck 117:0FC3- a9 80 LDA S80 Turn Pb7 1 1a;0FC5- 8D 00 AC STA ORB on 119!0FCS- A2 01 LDX SOI # of times through DELAY=1 120;OFCR- ao ED LDY SED Set up timer 2 for a 121;0FCC- 98 ■WA ,061 sec delay 122:0FCI>- 20 EE OP JSR DELAY Do the delay 123:DFD0- A9 00 LDA $0 Turn PB7 124:0PD2- 8D 00 AC STA ORB off 135:0FD5- A2 01 LDX SOI # of times through DELflY=1 126:0Fa7- AO 86 LDV $86 Set up timer 2 for a 127:0FD9- R9 9E LDA S9E .039 sec delay 128:aFDB- 20 EE OF JSR DELAY Do the delay 129;0FDE- 68 PL& Restore the fl of 130;OFDF- AA TAX pulses counter and 131:0FE0- CA DEX decrement Lt 132!0FE1- 3A TXA Transfer counter back to Ar 133:0FE2- DO DE BNE DlBL+1 Loop for proper f of pulses 134:0FE4- ta 10 □PAUSE LDX $10 # of times through DELAY=16 135!aFB6- AO C3 LDY SC3 Set up timer 2 for a .05 136:0FB8- A9 4F LDA $4F sec delay, total= •S sec 137!0FEA- 20 EE OF JSR DELAY Do the delay 138iOFB[>- 60 HTS Return 139: 140: Ge neral E>elay Routine - Enter with number 141: of times through in the X register^ low 142: and high bytes for timet in A, Y register pair. 143: 144:0FEE- 8D 08 AC DELAY STA T2LL write to low order latch 145:0FF1- 98 TVA 146:0FF2- 8D 09 AC STA T2CH Write to high order counter 147:0FF5- AD OD AC CHECK LDA IFR Check interrupt flag 148:0FFe- 29 20 AND S20 register for time-out 149: OFFA- FO P9 BEC CHECK If not, loop until it has 150:OFFC- CA DEX Decrenent times through count 151:0FFD- DO F2 BUE DELAy+3 loop until through 152:0FFF- 60 RTS Classified Ads Be Your Own Astrolosat. Impress your trlends. Two BASIC pro- grams tor PET (8K or more). ASCALC calculates six attributes Including fus- ing Sign. Over one-tialf mlMlon com- binations. DAY/HOUR calculates planetary hours, etc. 43 page booH gives Interpretations. NO. AST-T2-001 $15.95. CA res. add 6 %, ACCESS P.O.Box 8726 Rowiand Haighls, CA 91748 PET Machine Lsnguaga Guide Comprahsnsive manual to alO machine language programmer. More than 30 routines tuHy detailed. Reader can put lo immediate use. OLD or NEW ROMS. $6.95 plus .75. VISA and Maslercharge accepted. ABACUS SOFTWARE P.O.Box 7211 Grand Rapids, Ml 49610 SYM-1 Books by Robort Peck Monitor Theory Manual $8.00, Hard- ware Theory Manual S6.00. SYM/KIM Appendix to First Book of KIM 14.25. Send SASE for details. Datapath P.O. Box 3231 Sunnyvale, CA 94087 Integer Pascal System for the APPLE II. Complier, Interpreter and translator included for S65.00, Pro- duces 6502 code programs for high speed. 48K and Disk required. Send for free information. M & M Software 380 N. Armando Z-19 Anaheim, CA 92806 APPLE Graphic Aid Sheets LO RES 8.5" X 11 " 60 sheets S2.00. HI RES 22" X 17" 20 sheets S6.00. Please add $1.00 shipping. Boardwalk Products 225 South Western Avsnue/M Los Angeles, CA 90004 OSI OS es-D utility Diskette Renumber, disassembler, Memory Dump, Improved CREATE, single disk Copy, disk Verify, etc. Diskette and manual $30.00. TX add 5 percent. Catalog free with SASE. GASIight Software 3620 Byron Houston, TX 77006 SYM-1 EXPANSIONS ROM — Put two 4K ROMS in the LI23 socket with the W7AAY RAE-1^2 Board. $16.00 each, fully assembled, postpaid in USA. RAM — Have up to 8K "on board" with the W7AAY AK piggyback 2114 RAM board. Bare boards are SB.OO plus a S.15 SASE each. Payment must accompany order. Compiele instruc- tions are Included. John Blalock P.O. Box 39356 Phoenix, AZ 85069 Listing 2 TELEPHONB DIALER RANDV SBBRA APBIL, 19S0 INITIALIZE INTEHFACB 100 REM 110 RBi 120 RB4 130 REW 140 RB4 150 RBI 160 a=USR|S"0FA8",0) 170 DIM NS(19) ,TS( 19) 180 DATA POLICE, FIRE, DOCTOR. LAWVER, SCHOOL, PARENTS, WORK 190 DATA WIFE'S WORK, NEI GHBOR, BROTHE R, JANE, JOE, JOHN , SALLY , JIM 200 DATA JOAN, DORIS, BILL, HOME, COMPUTER 210 DATA 555-0000, 555-133 3, 555-5894, 555-3958,555-5683, 1-304-559-6741 220 DATA 1-557-9338, 1-557-4 736. 1-557-9939, 1-703-556-0924,5 55-0226 230 DATA 555-9328,555-1293,556-3092,555-6876,555-2783,555-5638,555-9951 240 DATA 9.555-4702.555-4900,554-1200 250 RQ4 260 ROl ** READ AMD PRINT OUT DIKECTORi 270 RHil 280 FOR 1=0 TO 19 STEP 2 290 READ NSII) ,HS(I+I) 300 PRINT IrTRBC5);NS(I),-TAB(20);l + l ;TAB(25);NS(I+1) 310 NEXT I 320 RIM *• READ NUMBERS 330 FOR 1=0 TO 19 340 READ TS(I) 350 NEXT I 360 PRINT 37 RSM 380 Rf« •' PRINT INSTRUCTIONS 390 RDl 400 PRINT "FIRST PICK UP RECEIVER AND WAIT FOR DIAL TONE." 410 PRINT "ENTER THE DIRECTORf NUMBER(S1 iOU WISli TO DIAL. YOU MAY" 420 PRINT "ENTER A SINGLE NUMBER, A SEQUENCE OF NON -CONSECUTIVE" 430 PRINT "HUMBESS SEPARATED BY SEMl-COLOHS, OR ft RANGE OF" 440 PRINT "NUMBERS SEPARATED Bl A DASH." 450 PRINT 460 PRINT "ANY TIME YOU WISH TO HANG UP, ENTER AN H. TO RE-DIfll, THE" 470 PRINT "PREVIOUS HUMBER, ENTER AN fi(HftNG UP NOT NECESSARY), TO" 480 PRINT "CONTINUE AFTER AN ACCESS PAUSE, ENTER CIOR H OR R IF THE" 490 PRINT "LINE IS BUSY). TO USE TIMER, ENTER A T AFTER THE" 500 PRINT "CALL IS ANSWERED. WHEN THE CONVERSATION IS OVER," 510 PRINT "PRESS ANY KEY TO STOP TIMER AND HANG UP." 520 PRINT 530 INPUT "BEADY ",-ZS 540 S=VAL{aS) 550 BS=STRStS) 560 L1=LEN(ZS) 570 L2=LEN1BS)-1 580 GOSUB 740 Classified Ads Test Your Skills with these 4 fast-paced GRAPHIC GAMES for PET (8K or more); Demoli- tion - race a car around various tracks. Bounce - guide a bouncing ball and knack out targets, Star Fire - blast the winking stars but watch out tor the rav- ing sun, and Space War- blast the Volar Ship before It can destroy you. NO. GAM-T4-001 $9.95, CA res. add 6%. ACCESS P.O.BOK 8726 Rowland Heights, CA 91748 AIM/KIMJSYM (Program mable) nS-232 interface. Fully piogrammabie including BAUD rates! Serial echo mode parity generation & Detection Programmable interrupt parity, framing and overrun detection. Expansion con- nector provided. Chip select Is jumper selectable. Software driver listing in- cluded. S84.S5 assembled, $69.95 KIT, Fobel Enterprises Dept. M 552 E. El Morado Ontario, CA 91764 EMPIRE OF THE STARS A super, great new strategy game from infinity Software (a great company) and Is available from Horizon Computing (another great company)! Can you, beginning with a single world and a small spacefleel, bulfd an emprlre spanning the galaxy? Find out for just S9.95. Horizon Computing P.O. Box 479 Mendham, N,J. 07945 590 R£H ■• SINGLE NUMBER 600 IF L1=L2 THEN 700 610 IF MIDS(3S,L2+1,1><>-r" THEN 650 620 RHl •' NON-CONSECUTIVE SEQUENCE 630 ZS=MIDS(2S,L2-*2) 640 GOTO 540 650 IP MIDS(aS,L2-*1,1)<>"-" THEN STOP 660 RE« •* CONSBCOTIVE SEQUENCE 670 S-S-1-1 6SD GOSUB 740 690 IF S"." THEN 830 BOO INPUT "ACCESS PAUSE -- USE C,H OH R OPTIONS. ";VS 810 IF YS<>"C" THEN 950 820 GOTO 860 830 A*=VALlfiS)"256 B40 D^USR(S"0FC1",A%) 850 PRINT RIGHT$(AS, 11; S60 NEXT I 870 INPlfr YS 880 IF YS<>"T" THEN 950 890 T=USR(S"DF1A",0) 900 S1=PEEK1241)-INT(PEEK1241>/16)'6 910 M1=PEEK(242)-1NT(PEEK(242)/16)*6 920 PRINT 930 PRINT 'ELAPSED TIME ;"; Ml ; "MINUTES AND" ; S 1 ; "SECONDS" 940 RETURN 950 IF YS<>"H" THEN 980 960 H^USR(S"OFB6",0) 970 RETURN 980 IF YS<>"R" THEN STOP 990 R=USR(£"0FB6",0) 1000 GOTO 740 1010 RETURN If 30:24 MICnO ~ The 6502 Journal November 19S0 Compare Our Prices With Any Others Rockwell's AIM-65 1K System: $405. 4K System $459 Synertek's SYM-1 1K System: 235. 4K System 259 Commodore's KIM-1 IK System: 175. The Computerist, Inc's: 16KDRAM 32K DRAM Video Plus II Mother Plus II & Card Cage FOR YOUR SYSTEM'S EXPANSION $279. ProtoPlustl 375. ASK I/O Board 279. DRAM & Video Cable 115. Power Supply for SYM-1 $42. 55. 15. 39. Power Supply and Enclosure for AIM-65 $119. Power Supply and Enclosure for KIM-1 65. All products are factory warrantied. Prices include full documentation. Send Check or Money Order to: Hepburn MCA* 12 Grosvenor Street Lowell, MA 01851 Please add $5.00 shipping and handling. MA residents add 5% sales tax. ' Mini Computers and Accessories - WANT YOUR COMPUTER BACK? Let liic MlCROsport Microcomputer (MMC) take over any dedicated task. It is the affordable alternative (kits from $89,00), application units, A & T. from only $ 1 19.00). It is user-oriented - complete in-circuit emulation allows program development on ANY 6502 based system. It is compact (4'/4" by 6'/i" pc board) but powerful (32 I/O 6503 CPU) and works off any AC or DC power supply . Turn your present 6502 based system into a complete de- velopment system with: I MMC/03D Microcomputer with ZIF sockets I MMC/03ICE In-circuit emulator for the 6503 CPU 1 MMC/03EPA EPROM PrO!;rammer complete with software driver. i -« ■ ■•■\ . ^m-^^^ All for only $250.00! (Offer good until December 1980.) For more infor call or write ^ R. J. BRACHMAN ASSOCIATES, INC. P.O.Box 1077 Haveiiown, PA 19083 (2 1 5) 622-549S PET and APPLE II Users PASCAL ABACUS Software makes available its version of TINY PASCAl for the users of two of the most popular personal computers, TINY PASCAL is a subset of the standard PASCAL as defined by Jensen and Wirth. It includes the structured programming features- IF-THEN-ELSE, REPEAT-UNTIL, FOR TO/DOWN TO-00, WHILE-DO, CASE-OF-ELSE, FUNC and PROC. Now you can learn the language that is stated to become the successor to BASIC. TINY PASCAL is a complete package that allows you to create, compile and execute progams written in the PASCAL language. You can save source and object code on diskette or cassette (PET version only). Comprehensive user's manual included. The manual can be examined tor $10 (refundable with sotbware order). REQUIREMENTS PET 16K/32K New ROMS cassette $40 PET 16K/32K New ROMS diskette $35 Applell32KApplesoftROMw/DOS $35 Apple II 48K Applesoft RAM w/DOS $35 TINV PASCAL User's Manual $10 6502 Interpreter Listing $20 FREE postage in U.S. and CANADA All orders prepaid or COD Jii3Sler chargi' mmiiiii msm ABACUS SOFTWARE P. 0. Box 7211 Grantj Rapids, Michigan 49510 FREEDBKRW WHEM YOU JOm THE PREMIER APPLE USER C3ROUP! Apple Pugetsound Program Library Exchange With 4,000 members, it's the pioneer Apple computer user group. It5 proven benefits for novices and experts include: Mine Issues of Cajl-A-PRLE. The nation's leading Applejour- nal 5oon to enter its fourth year of publication. Each issue is chock full of utility programs, material for the novice, current Apple news, application notes, technical and instructional data. Access to Call-A.P.P.LE. Hot Une Answers to your technical ques- tions, plus programming hints and general information. Special Reduced Prices Through Our Program Library Exclusive, sophisticated software at very substantial re- ductions, Special sale ^^ items in each issue of ^r^^ Call-A.P.P.LE. Plus ^ '^ low club prices for ^W such well known programs as ApmaillL Pro- gram Line I 1 Editor, higher Text, Integer Basic + Plus Ted]r + (Editor/Assem- bler), Program Qlobal Editor, D05 3,2 and 3.5 Disk Edit Utilities, and Bargain Priced Library Pak Diskettes, Plus Your Choice of a Free Diskpak All Checks for membership postmarked by December 31, 1980 will receive a coupon good for a free diskpak: Choose from Diskpaks 5, 12 or 54 or Anthology Volumes I, II or III, I can't wait to get myfree Diskpah! □ Enclosed is my check for $40 to cover $25 Apple- cation fee and first year dues, Send me my coupon, and I'll pi ckafree diskpak I'm interested enough to try a test run. Q Enclosed is my check for $5, Please send me the current issue of Call-A.P.P.LE. and ary Apple-cation blank. I understand that if I Join, the $5 is credited toward my Apple-cation fee. At least I'm curious. □ 5end me an Apple-cation blank and more information. name Address City . State _ .Zip_ \ Phone, Signature \ Send coupon to Dr Ered Merchant, Secretary A.PPL.E. 304 Mam Avenue South, Suite 500M, Renton, WA 98055. Or call (206)271-4514for further information. CaH-BJ'.P.LC. i^avatiableivorldiviciEial discnminaung Applp compjler dealers / i i \ I I PET Vet by Loren Wright PET Specialist MICRO Staff On September 22 I took the Amtrak "Night Owl" to Washington, D.C., and I returned on the "Night Owl" the night of the 24th. While there, I attended the Federal Computer Con- ference at the Sheraton Washington, This conference is aimed at the many government agencies that have occasion to use computers in their work. All of the "tiiggies" had displays there, but Commodore was the only 6502 microcomputer manufacturer to have a booth. CBM's and PET's were busy demonstrating different business software packages. On the second day, I had a long talk with Commodore's new Manager of Public Relations, G. Thomas Sheffer. Within the next few months he plans to mall a questionnaire to all PET Users' Club members in order to help determine the future direction and content of the Commodore Newsletter. The Users' Club and its Newslelter, now the responsibility of Public Relations, should be a reliable source of information for PET owners (Subscription - $15; 10 back issues - $15). Editor, Commodore Newsletter Public Relations Department Commodore Business Machlries 950 Ritlen house Road Norristown, PA 19403 The Transactor, from Commodore in Canada, has long been a valuable information source. Subscriptions start with the beginning of a volume only. The current volume is II, but is nearly completed. Volume I and II are each $15. Editor, The Transactor Commodore Systems 3370 Pharmacy Avenue Agincourt, Cntario, Canada Commodore Product Summery Commodore sells a wide line of computer products, but even PET owners may be a little confused by all the different mode! numbers. Starting this month with the computers themselves, I will try to explain the differences. Next month I will cover the peripherals. The new CBM 4040 dual-floppy drive was ex- hibited at the Federal Computer Conference and will be generally available in late November. When owners of the other home computers think of the PET, they think of what is now called the PET 20O1-8KS. Although this has been out of production since January, many MtCRO readers have them, and are very happy with them. These have a small (calculator style) keyboard, an integral cassette recorder, and 2.0 BASIC, The keyboard was difficult for most people to use, and tended to develop reliability problems, I didn't object to the close spacing o( the keys, since I have skin- ny fingers, but I was occasionally frustrated by keys that wouldn't register or ones thai "bounced." These are still available, both new and used, at very reasonable prices. Upgrade BASIC ROM kits and full-size expansion keyboards can be obtained. Commodore currently makes three lines of computers: the PET 2001 series, the CBM 2001 series, and the CBM 8000 series. Both 2001 series contain the 3.0 BASIC, and the 8000's contain 4.0 BASIC. The principal difference between the PET 2001 and CBM 2001 lines is in the keyboards, PET keyboards are called graphics keyboards because, in addition to letters and numbers printed on the key tops, graphics characters are printed on the key fronts. The number keys are in a separate keypad to the rigtit, along with cursor movement keys and the period. Characters used frequently in entering a BASIC pro- gram, such as ; ? $ % and #, can be typed without shifting. Capital letters and numbers are entered without shitting. When the shift key is pressed, all the graphics characters are available. PET'S and CBM's have two character sets, of which only one can be displayed at any given time. One includes all the graphics characters. The other substitutes lower case letters for tliose graphics appearing on the letter keys. This means that in order to get lower case letters in this character set, the shift key must be pressed for each— the reverse of normal typewriter operation. When PET's are powered up they are in the graphics character set, and to switch to lower-case character set, the statement "POKE 59468,14" must be executed. Current production PET models are listed with model numbers and list prices. The N suffix indicates the graphics keyboard. 8, 16, and 32 indicate the number of kilobytes of RAM included. PET 2001- 8N PET 2001 -16N PET 2001 -32N $ 795 S 995 $1295 Models in the CBM-2001 line have the business keyboard. This is very similar to a standard typewriter keyboard. When powered-up, all letters are lower case, and their shifts are up- per case. Numbers appear in their standard positions above the letters, as well as in the separate numeric keypad. Characters such as ! # $ % and :, must be shifted, but the period is In its normal position below the L, "POKE 59468, 12" must be executed in order to utilize the graphics character set, and the characters must be looked up in a table, since they don't appear on the keys. This character set configuration and keyboard layout are particularly well suited to word process- ing and other business applications. CBM 2001-)6B CBM 2001-32B 3 995 $1295 16K RAM 32K RAM The CBM 8000 series computers have several differences, 4.0 BASIC differs from 3,0 BASIC primarily in the addition of several disk commands, which make communication with DOS 2.1 a lot easier. The screen Is 80 characters wide, and physical- ly larger as well. The keyboard is a business-style keyboard, but with several keys added and others relocated. The advan- tages of the 8000 series machines for business applications such as ledger and word-processing, should not be overlook- ed, CBM 8016 $1495 16K RAM CBM 8032 $1795 32K RAM November 1980 MICRO — The 6502 Journal 30:27 would di Increase your PETS IQ for '^'^^ Speed up your PET programming with The BASIC Programmer s Toolltit™ now only 539.95. Don't waste valuable programming time if ttneres an easier way to go. Here it is: The BASIC Programmer's Toolkit, created by Palo Alto ICs, a division of Nestar. T[ie Toolkit is a set of super programming aids de- signed to enhance the writing, de- bugging and enhancing of BASIC programs for your PET The BASIC Program- mer's Toolkit has two kilobytes of ROM firm- ware on a single chip. This extra ROM store lets you avoid loading tapes or giving up valuable RAM storage, it plugs into a socket inside your PET system, or is mount- ed on a circuit board attached on the side of your PET depending on which model you own. There are basically two versions of PET To determine which Toolkit you need, just turn on your PET If you see^-'^COMMODORE BASIC*** your PET uses the TK-80P Toolkit If you see ###COMMODORE BASIC###, your PET uses the TK-160 Toolkit. Other versions of the BASIC Programmer's Toolkit are available for PET systems that have been upgraded with additional memory r: cammodore How Toolkit makes your programming easier: FIND locates and displays the BASIC program lines that contain a specified string, variable orkeyword. you were to type FIND A$. 100-500, your PETs screen would display all lines between line numbers 100 and 500 that contain /IS. RENUMBER renumbers theenlire program currently in your PET You can instantly change all line numbers and all references to those numbers. For instance, to start the line numbers with 500 instead of 100, just use RENUMBER 500. HELP is used when your program stops due to an error. Type HELf; and the line on which the error occurs will be shown. The erroneous portion of the line will be indicated n reverse video on the screen. These simple commands, and the other seven listed on the screen, take the drudgery out of program development work. And for a very low cost. The BASIC Program- mer's Toolkit costs as little as $39 95, or at most, $59.95. Get the BASIC Programmer's Toolkit and find out how quick and easy program development can be. See your local PET dealer or send this coupon in today. personal computer PAL© ALT© iCs A Division ol Neslar Systems incorpofaled PET" IS a trademark ot Commodore Susrness Machines. Inc. The BASIC Programmers TooIWi™ is a traOemark of Palo Alfo ICs. a division of Nestar Systems. Inc ^he Toolkit is fully assembled. It IS not a kil and requires no specral lools to install I want to save programming time and money Send me The BASIC Programmer's Toolkit ttiai will give my PET 10 new and useful commands. Fill in the appropriate line below: Qly TK-160Toolkit{s] @ $39,95 each Qty..^ TK-80PToolkitCs] @ $59,95each Want to charge if? Call [415) 493-TOOL, or fill out the form below. Enclosed is a H money order d check (If charging); Q Bill VISA D Bill Master Card. Please include the amount of the Toolkit, plus $2,50 for shipping and handling Please allow 4-6 weeks tor delivery. SATISFACTION GUARANTEED, OR SEND IT BACK WITHIN 10 DAYS OF RECEIPT AND PALO ALTO ICs WILL REFUND YOUR MONEY SEND TO; Name, ^ . Address- City _SratB_ -^Id- Charge Card- -Exp Dare- WaslerCard IrHerbank hJumber- Phone MAIL TO: Signature- Palo Alto ICs A Division of tslestar Systems, Inc. 430 Sherman Avenue Palo Alto, CA 94306 (415) 493-TOOL ^ , , ^ Dealer inquiries invited. Self-modifying PET Programs Use this simple tutorial to write a self-modifying program. p. Kenneth Morse P.O. Box 3367 Augusta, GA 30902 High-level languages, such as BASIC, typically make It difficult or impossible to modify ttie program itself as a result of the program's own operation. There Is good reason for this, since such changes are usually difficult to detect and debug when they occur inadverently. Nevertheless, there are times when we might wish to develop programs thai do modify themselves. Since "old" 8K PET casette data tiles are somewhat unreliable, due to bugs in the operating system, one reasonable application would be to generate (or delete) DATA statements under program control, thus capitalizing on the greater reliability of program tapes. The methodology for ac- complishing this was explained by Mike Louder in "The PET Has a Dynamic Keyboard" {PET User Notes. 1978, 1, issue 6, p. 11). The methodoiogy capitalizes on the fact thai when a program terminates ex- ecution with an END statement, location 525 (158 for "new" ROMs) is checked to see if any unexecuted Instructions are in the keyboard buf- fer (locations 527—536 for old ROMs. 623—632 for new). If so, it ex- ecutes them. Now, If we could LOAD the keyboard buffer before exiting the program, those instructions would be carried out after the pro- gram was over. And if the last in- struction were to cause the program to re-start... well, we could then write programs that would modify themselves and continue to run! As it turns out, we can do just that! Here are tour projects to help you learn the technique and its limits. Project 1 The variable FT may be a bit puzzling. Since location 50003 always has the value "0" with the "old"ROMs and "1" with the 'new' ROMs, we can use FT = FEEK(50003) to adjust addresses automatically, using the formula (ADDRESS) = (OLD ADDRESS) + FT*{adjustment factor) Whenever FT ^ (old ROMs), the adjustment vanishes, since zero times anything Is zero. 10 GO TO 50 29 READ NS 3a PRINT "THE NAME IS ";NS AZ STOP 50 INPUT "YOUR NAME, PLEASE ";AS 60 PRINT "cddcll000DATA ";A$ 70 PRINT "GOTO 20"; "h" 8B J-1 90 REM: LOAD KEYBO.'.RD BUFFER WITH 'RETURNS' 100 PT=PEEK (50003) 110 POKE 325-PT*367,J+l 120 FOR K=l TO J + 1 130 POKE 526 + K + PT*96, 13 li0 NEXT K 150 END Note: lower case letters in quotes stand for special FET keys: "c" = clear screen "d" - cursor down "h" = home 1. RUN this program by entering the name "JOHN DOE". The results should be: READY. 1000OATA JOHN DOE GOTO 20 THE NAME IS JOHN DOE BREAK IN 40 READY. 2. LIST this program (after RUNning It), and you will find a new line: 1000 DATA JOHN DOE 3. Now, enter the immediate com- mand ?N$ then ?A$ Note that A$ has been lost! One complication with this technique is that the program re-initializes all variables when it re-starts by ex- ecuting the on-screen command. Hence, A$ is now equal to " ". There are two ways to handle this problem: one is to record the value of the variable in a new (or altered) DATA statement, as was done above. The other way is shown in project 2. Project 2 Make the following changes: 1000 (deleting the DATA staleciient) 10 QS=CHRS(3i);GOT0 50 20 REM 60 PRINT "cdddN£="iQS:AS;Q3 November 1980 MICRO — Thfi 6502 Journal 30:29 1. RUN: how does the result com- pare with Project 1? 2. LIST: note that no DATA state- ment is present. Yet, the PRINT statement in line 30 was able to recognize as N$ the name originally entered as A$. There is one important point to watch. Several DATA statements may be generated with a single pro- gram exit, but only a single line (up to 40 characters) of direct command may be entered. We are now beginning to identify some rules for self-modifying pro- grams. Before exiting, the program should: 1. Clear the screen. 2. PRINT the BASIC lines to be in- corporated into the program on the screen, beginning with the fourth line from the top. Each BASiC line may be up to 78 characters long, and should be single-spaced. 3. Following the BASIC lines, PRINT a single unnumbered line (no more than 40 characters) containing any variables that need to be saved to restore the program to the same point of operation. End the line with a GOTO statement returning control to the main program {not to a subroutine). 4. POKE the value of N (where N = number of BASIC lines + 1) into the keyboard index byte, and POKE the value "13" into each of N bytes in the keyboard buffer. 5. "Home" the cursor. 6. Exit from the program with an END statement. Project 3 How many BASIC lines can be created under program control with a single program exit? Make these changes in your program: 7i (delete) Sa Idelele) le INPUT "VALUE OF J ";J 2i PRINT "cddd"; 3« FOR I - 1 TO J ^0 PRINT I*ia00; "DATA ";I I*I;SQB{I 5B NEXT 1 60 PRINT "LIST" 15a PRINT "h" 168 END Proiect 1 10 GOTO 50 se READ m 36 PPIHT "THE NRME IS " M$ 40 STOP 50 INPUT "VnUR HflflE,. PLEASE ■ f\f 50 PRINT ":M(M10O8IlHTfl ' .■fl$ 70 PRINT "GOTO £&':■ "S" S0 J=i Se REN LORD KEVEOftRD BUFFER WITH -RETURN:?- 100 PT=PEEK<.5&@fJ3> 110 POKE 525-PT*367 J+1 120 FOR !■ =1 TO J+1 130 POKE 526+K+PT*36.. 13 140 NEXT K 150 ENr REflDV. RERDY. PROJECT ! REflDV. Project 2 10 at=CHPJ';34.)- GOTO 50 20 REM 30 PRINT "THE NfiME 13 "^HS 40 STOP 59 INPUT "VOUR NAME, PLEASE ■•.■R^ 60 PRINT ".'Mfl»-<*="; Q*; mi Qf ?& PRINT "OOTO 20". "«" S0 J=l 90 PEN- LOfll' KEVEORRD BUFFER WITH RETURNS' 100 PT=PEEK':50003:' 110 POKE 525-FT*367, J*l 120 FOR K =1 TO .r+1 [-30 POKE 52f;+K*P T*36.. 13 140 NE.^T K i50 END REflDV. Project 3 10 INPUT "VRLUE OF T " ^J 20 PRINT "rMBM".. 30 FOR 1=1 TO J 40 PRINT 1*1000; "DfiTft "; I; 1*1 ; saRa> 50 NEXT I 68 PRINT "LIST" 90 REM' LOAD KEVBOflRE BUFFER WITH 'RETURNS- 100 PT=PEEK< 50003.) 110 POKE 525-PT*36r,J-^l 120 FOR K=l TO J+1 130 POKE 526+K+PT*36.. 13 140 NEXT K 150 PRINT "tf" 160 END REflDV. REflDV. 30:30 MICRO " TtiB 6S02 Journal November 1980 SAVE project 3 on tape (and VERIFY) before proceeding. Begin with a value of J = 1 and continue, i ncreasing by 1 each time, until you "crash" BASIC or get an er- ror message, VWtien this happens, you know you have one line too many! Each time, the program will LIST its current version. Note how many DATA statements were created each time. To be sure that the program is generating all of the DATA statements each time, type NEW and re-enter the original program from tape. Then, RUN, and increase the value of J by 1. {Woie; by defeting line 60 and changing "J + 1" in lines 110 and 120 to "J", the max- imum number of DATA statements Project 4 le INPUT "VALUE OF J "J J 20 PRINT 'TOTBH".: 30 FOR 1=1 TO J 48 PRINT 1*1000 50 NEXT I 60 PRINT "LIST" 90 REM- LOAD KEVBOHRB BUFFER WITH 'RETURNS' 100 PT=PEEKC500S3> 110 POKE 525-PT#367.J+I 120 FOR K=l TO J+1 130 POKE 526+K+PT*96.. !5 140 NEXT K 150 PRINT lee ENS 1900 mifl 2000 DflTH 3000 DflTfl 4000 DATA READV. 1 2 3 4 5 1 4 9 16 25 1 1.41421556 J.?3205i381 2 2. 2360679a generated can be one greater, but then no immediate commands ... such as LIST or GOTO 10.. .may be provided under program control.) Project 4 How about deleting lines under program control? Make one change: 40 PRINT 1*1000 SAVE the latest version of the pro- gram (including all the DATA statements) as project 4 and VERIFY. RUN the program. When the program LISTs itself, you will note that some or all ot the DATA statements {depending on the value of J) will have disappeared. Since you SAVEd the set of DATA statements, you can experiment with this program at your leisure. 32 K BYTE MEMORY RELIABLE AND COST EFFECTIVE RAM FOR 6502 & 6600 BASED MICROCOMPUTERS AIM 65-*KIM*SYM PET*S44-BUS I PLUG COMPATIBLE WITH THE AIM-65/SYM EXPANSION CONNECTOR BY USING A RIGHT ANGLE CONNECTOR (SUPPLIED) UOLNTED DN THE BACK OF THE MEMORY BOARD . MEMORY BOABD EOGE CONNECTOR PLUGS INTO THE MIM S « BUS ■ CONNECrSTDPEI OR KIM USING AN ADAPTOR CABLE - BELPABLE-DYNAMIC RAM WITH ON BOARD INVISIBLE REFRESH-LOOKS LIKE STATIC MEMORY BUT AT LOWER COST AND A FRACItON OF THE POWER REOUIREO FOR STATIC BOARDS ■ USES -5U ONLY SLIPPIIED FROM hOSr COMPUTER. - FULL DOCUMENTATION ASSEMBLED AND TESTED BOARDS ARE GLARANTEED FOR ONE YEAR AND PlIRCHASF PRICE IS FULL* REFUNDABLE IF BOARD IS HETURNED UNDAMAGED IVIIHIN U DAYS. ASSEMBLED WITH 32K RAM 1395 00 i WITH 16K RAM 1339.00 TESTED WITHOUT HAM CHIPS i2?8 00 HARD TO GET PARTS INO ROM CHIPS) Wirn BOARD AND MANUAL 1109.00 BARE BOARD S MANUAL U3M PET INTERFBCE KIT-COMNECTS THE 33K RAM BOARD TO A 4K OR BK PEI CONTAINS INTfRFACE CABLE. BOARD STANDOFFS POWER SUPPLY MODIFICATION KIT AND COMPLETEINSTRUCTIONS M9.M U.S. PRICES ONLY ?>=-j*-'i_rr--.S ' -^.-fiTia^ 16K MEMORY EXPANSION KIT ONLY $58 FOR APPLE, TnS-80 KEYBOARD, EXIDY, AND ALL OTHER 16K DYNAMIC SYSTEMS USING MK4116-3 OH EQUIVALENT DEVICES. * 200 N3EC ACCESS, 375 NSEC CYCLE * BURNED-IN AND FULLY TESTED * 1 YR. PARTS REPLACEMENT GUARANTEE * QTY. DISCOUNTS AVAILABLE ALL ASSEMBLED BOARDS AND MEMORY CHIPS CARRY A FULL ONE YEAR REPLACEMENT WARRAMTY COmPUTER DEVICES IS30 lU.COLUnS flUE. ORnnCE, en 92666 (714)633 TSaO iil MWIimimi ^ M III be added lo dIL ^h^pm^nli Novsmber 1980 MICRO ~ The 6502 Journal 30:31 SPEECH RECOGNITION NOW TALK TO YOUR: PET, TRS-80 (Lll) AIM-65 and SORCERER NEW COGNIVOX SR-100 has 3? word (or short phrase) vot:anulary (AIM-65 wilh ^K RAM. 16 worasj Up 10 98% recognilion faie Breakt lira ugh price of only $119 incluOes micophone. casselle willi sollware and manual Version tor Ihe TRS-80 (VIO-332l costs 1149 Out also has 32 word speech oulpul and music capability, includes all above plus speakEr/amplitier >^ or the Sorcerer in addilion to SR-IOO. we ot(er COGNIVOX V^0-I3^ which includes speech oulpul and music and enlensive sollware and costs II 79 Please add $3 (or shipping in the US. Calil aOa 6% tax Foreign orders welcome, add 10% tor processing and sfijpping by air. When ordering, please Specify make, model and memory siie ol your compuier VOICETEK Dep/.M, P.O. Box 388. Goleta. Ca 93017 J/ The Most Powerful Disk-Based Macro As sem bier/ Text Editor Available at ANY Price NOW incluiles the Simplifiea Text Processor (STP) For 32K PET, Oisk 48K APPLE II 3.0 or 4.0 nOd^S or —OR — or APPLE II ♦ 8032 (sDGcify) and DISK 11 rulAE FEATURES — Control Files for Assembling Multiple named source riles from disk — Sorteo symOol tdblE — Up to 31 chars./label — 27 Commands, 26 Pseudo-ops, 39 Error codes — Macros, condflional Assemblv, and a new feature we developed called Interactive Assembly — Reiogaiible ODiecl Cade — Strtng search and replace, move, copy, automatic tine numbering, etc. STP FEATURES — 17 text processing macros — Right and leH juslificiitioii — Variable page lengths and widths — Document size liiniled only by disk capacity — Software lower case provision for APPLE II without lower case modification ALSO INCLUDED — Relocating Loader — Sweet 16 macro library loi APPLE Jnd PET — r^achine Language macro library — Sample files for Assembly and text proce^^ing — Separate manuals for both APPLE and PET PRICE — r^AE, STP, Relocating Loader, Library files, 50 page manual, diskette — $169. 9S SEND FOR FREE DETAILED SPEC SHEET EASTERN HOUSE SOFTWARE 3239 LINDA D«IVE WlNSTON-SALEf^, N. C. 27106 (919) 924-2aS9 (919} 748-8446 SPECIAL INTRODUCTION ONLY '9 9.9 5 FOa THE FIBEST P.»RALL£L ISTErtFflCIW ELDOT rCR THE PE7/C3M* The P,[,c.-C IS * vEitr COMPLETE [urtn^acE- It cc'ies lm ** ATT^acTtv^ -case ano ■iOlJflT? DIHECIl-T TO -HE CUflPUTEP, TTHUS ELlhlhATING "^e .^fEtl =01 ExrPfl SP*CE IN Thf BACK =0" BQOUB LE TTE' -lUAI. 1 TY PPENTEB {NEC SpENKHiren, 51:.) ANO lOUS CPABHECS "ilHTER 10 iE ^J'.NECTEJ IT OlE SAME TINE BUT USED SE°>mt=LI BI JDDR£iSI« EACH -ITH A 3[fFEBE»T lEVrCEPl. rtof that's real efficiency!! The ?,I,E,-C hill c^kvert mn-iruiDARD PET codes to true ASCII code. !i can 3e SXircHED tH OR OUT OF SERVICE AS NEE^Ea, FOR iSSTAHCE. IF YOUR SOFTWARE KE! THE cartvEI^SION, JUST SWITCH THE CDHVE*TtR 0F=, IF TCL rJEED ""E CONVElSLJil' =0f JREHTINO FSO" Bs3[C. JUST !«ITCH IT GN. SUR [NTfafflCE FftOvlDES EXTE^S TON Of ThE lE^-ISa ^RT OH T>IE ^/GW, YOU DON'T HEEO TO auv OTHER caBL = 5 BECAUSE OCR INIEBFACE -JSES THE SAME CARD =3GE r"E AS THE COHPUTEB. ThUS THE CABLE "On THE FL-;fP- JE5C TO "HE ?^KW "ILL HOW COI- HECT IftIO THE INTERFACE, The P.I.E.-C is i4terconi.ec ted "ith. ako mwesed by. tie "inter osiia a i' 3atj CABLE SUPPLEED WITH THE :NTERFACE. 'hLS I'fHI THAT 7>IERE El rfO J'OWER SUPPLY NECESSARY AS «ITH SEREAL I l*TEilFACES , The 'S-i JS SUPPLIED QEI FElJI 1? UF THE COH- lEcrOR USEJ BY ALL TRUE CEWTHONECS StAHDARD INTERFACED ofllNTERS, 'hIS :nCLUDES THE CeNTSONICS "75, °1. AND «B' OTHERS EHCLyOlWO THE AhaDEI "INTERS, ^tlR INTERFACE ME5 9EV0NQ THE CENTROHEC'S CChPATEBILE yy, THEREFORE- IT ^ILL OPERATI IWE JbDERSON-JACOSSON AJfiEll IND -HE "PAPER 'iGER' 3Y inTESPAL jATA SySTEHS. [b fact, it "ILL OREUE IHY "ASALLEL-IMPUT PSEHTER that uses J JATA BITS AND 2 HAtDSITAKINC LIHES, If -OU APE MTEBESTCa EN THE HOST E,4TERFAC£ FOB YOEJB KOHtl, TVEN PLACE YOUIl OROEIl TODAY, Our IMTROOUCTORY oRTCE 'OR THE P,I,E.-C EMTERFACE -Oh'T LAST LONS, So, DCn'T DELAY , , . *0U f^AY HAVE TO PAY THE L[ST PfilCS OF iU^,9S, Please specify voup ?EVrBfl f-pe (ne" op old Ms) a«o -he brand and -odel of the PREWTER 'OU "ILL BE USIKG, '^E ATTACH THE COPRECT CONhECTOfl ON THE CABLE. All orders hust be ppepaed or COD cash. Add !5 for ship-enc and hanolino. riaryland reseoents ado ii sales taa- Le.nData Products, P,D, Boi 1030. Colohbea, Io. 21001 Phome iWH ?iO-i:S7 '(TT/CIFI if jvdildyi^iothc- pKb'ii M uiiliiv p'<^idmi an ijnp 16 ••i-ooi lii-iki^iH: iLirlj/irift ihf np«v ITMitp ilOliffi All oi irir E^dl cmnpji- ible wiih rhe Corvui Di%k Orivt system, fFjturv* ■ Pemovi" R[M Mji^mpnu. unjcl- erencpd idcadf forie. jnd com' ipeed iind save memory jnddl^k HHre 4 Copy tiiSy hir (u p'OKinim liom Ohedt^beiiuiurinoiher OilyThe Kdine n ni'piJtd- ■ PrMi tH diipliiv d lin* fiou ^l■^er' pncr 4nd v^rublr namr cow felerpm*- * Prini m di^pliiv jll m ^L'lAinJ r^roiids tiom a let iWe • DnpJjiv ^"V «mo( P^ J gcven nip rjr pioR'im. ind ihtn update ariv data ^iihin ilui tedai. □' spetily iht ietiot ycMi wish [o updjle. mth M liiifciai'fifrctii'iind-ict- lors occupied tiy OOS. Compiirpf Jjir. Ihe ("nrUnllr' Jt j rr]|Uf-l«l ■ LrfMie, pml and mudily font o*n leur jnd [nee liJ«. ■ h'llorm JQ-digrl jnlhme[i[. • Copy J di%kene wihaui DO^; kniiidli/i- witKctui DOS: wenfy spuiie diikitip: vpiilv vopied il<«a 1% she WPie Ji ihp oriymal- * iJn-A powi'flul dji'trnrry routine ihdl hdnitliys tullr tUmjf and HU' 'TWIH l\Mi Phn MiMiy Moff Uiilir^ Prugjjjm (or Sopliktic'inl Progianunpn Mjny [pl l\it ior i;onv*nierti rc'iTCrNC Vy your AppI? df«lor or contact □ahhri^ CorpD'diicn, P.O 3tt\ JlW, Ut'nvLfXD!cp.aa22l.ri'!epkjnc AGO- W5D463 VISA ur MC welcome. DakinS November 1980 MICRO -- The 6502 Journal 30:35 Microprocessors in IViedicine: the 6502 Part 1 by Jerry W. Froelich, M.D. The column this month and the next, written together with Jack W. Smith, M.D,, will inform readers on various uses ol com- puters in medical education and will provide an example ot how the 6502 microprocessor is able to perform tasks in medical education nearly as well as large computer systems. (Dr. Smith is a Clinical Fellow in Pathology, Instructor in Allied Health, and Ph.D. candidate in Computer Science at Ohio State University, Columbus. Ohio.) Computers in medical education can be divided into three ma- jor categories: computer-assisted evaluation (CAE), computer- aided instruction (CAI), and simulations. These categories in- clude testing, statistical analysis of lest results, study prescrip- tions, tutoring, diagnosis and treatment guidance, simulation ot processes, and simulation of patient-physician encounters. These serve as an extension of the classroom and not as replacement of the teacher. With the application of small, inex- pensive microprocessors, such as the 6502, physicians can now acquire continuing education credits (proof ot furthering their medical education to stay current with medical practice) by reviewing programs on their own computers. The use of computers in medical education thus ranges from simple display of information to a sophisticated interaction witn the physician. The discussion presented here covers only a part of that range. This month we will cover the theoretical aspects of ''Computers in Medical Education" and next month we will cite examples. CAE CAE uses computers to handle administrative chores. The computer can administer examinations and score them im- mediately or grade examinations taken at a previous time. It can then make a statistical analysis of a student's performance and offer study prescriptions (references to appropriate material) to aid the student in compensating for deficiencies. Group perfor- mance can also be compiled. The interactive capability of the computer is not, however, fully realized in computer-aided evaluation. CAJ Generally speaking, in computer-aided instruction, the com- puter acts as a tutor, privately coaching students and helping them acquire information in a particular subject. The computer disseminates information and tests a student's comprehension and recall. The computer can also teach and test a student on how to interpret information. For example, a CAI program could introduce a student to ttie physiological, biochemical, and genetic organization of bacteria, viruses, and parasites. Affer the student has been coached and tested on the basic con- cepts, the computer could present the student with a number of organisms to classify. Problem areas would prompt remedial In- struction, until the student reached a previously established level of learning. There are several advantages to presenting material in this way; (1) Faculty members are not responsible for disseminating repetitive information and are free to pursue creative endeavors. (2) CAI can be used to supplement traditional educational techniques (lecture and laboratory work), which may suffer because of budget cuts. (3) New knowledge can be incorporated more easily in the computer data base than in reference traoks, thus decreasing the time lapse between availability of facts and their transmission to students and physicians. (4) Students can bypass lamiliar material. This is especially important in medical education wtiere students vary widely in educational backgrounds. (5) CAI is efficient, in that a student can master a subject in less time than is usually necessary with traditional methods. (6) Instruction is individual, based on the specific abilities of the student. His actions produce almost instant, positive feedback or correctional instruction. (7) Multimedia presentation is easily incorporated in this technique. Current projects in CAI involve the use ot high-resolution graphic screens and computer-controlled slide projectors, as additional instructional tools. Siinulatlons Educational simulations are of two varieties: simulations of biological processes (physiological, biochemical, etc.) and simulations of patient-physician encounters. Process simula- tion displays a model of "real-world" events, when the actual event is costly, unmanageable, or dangerous to duplicate. More importantly, a precise model of an event need not exist to simulate the event adequately for educational purposes. Simulations are a convenient way for the student to assimilate information acquired in the classroom. An example of process simulation would be a computer pro- gram that simulates the growth of a cell system. From the com- puter terminal, the student can manipulate certain variables, such as death rate, mutation rate, and growth rate. The impact of a particular manipulation, in conjunction with other variables of the system, can then be instantly displayed on a computer terminal. A computer program to simulate the patient-physician en- counter can do the following: (1) present a summary of the pa- tient's medical case or accept a case from the student; (2) allow the student to acquire information about the patient through a dialogue with the computer (this interaction would include infor- mation about the patient's history, laboratory findings, and physical exam findings); (3) display information on the availabili- ty, time, and cost of procedures needed for the patient; (4) ask the student for a preliminary diagnosis and treatment strategy or receive diagnostic and treatment advice; (5) explore the ef- fects of such treatment along with the accuracy of the diagnosis; (6) compare the student's response to the responses of experts. The patient-physician simulation has several advantages. The student is exposed to the problem-solving nature of clinical medicine. The simulation is without risk to patients: the student is given the opportunity vicariously to participate in patient management where clinical judgement is required. An addi' tional merit is that management can be studied by design, rather than by the availability of patients with particular diseases- The next column will describe several current systems used in medical education and a specific APPLE application, "APPLE- ED". Address communications: c/o Massachusetts General Hospital, Boston, MA 02114 30:36 MICRO — The 6502 Journal November 1980 Ohio Scientific Users: Stop Those S-* ERRORS Correct the BASIC error message output, put out messages of your own, and more. E.D.Morris Jr. 3200 Washington Midland, Ml 48640 Tim Finkbelner 3710 Fuller Midland, Ml 48640 The original Ohio Scientific video board couid display oniy 64 different characters: upper case letters, numbers and punctuation. The cur- rent model video board displays 256 different characters: ail of the original characters plus lower case and graphics. This created an unwelcome bonus for machines which use BASIC in ROM. The error messages now appear in graphics characters rather than in letters. For example, whenever a syntax error is made, the user sees 7S-' ERROR IN LINE 10 The Ohio Scientific graphics manual explains that the correct message is ?SN ERROR iN LINE 10 I make enough syntax errors that I no longer have to look this one up. However, it becomes a real nuisance lo refer to the manual for Tl or C-* errors. The second letter of all the error codes appears as a graphics symbol. This article describes a patch for Ohio Scientific BASIC in ROM to convert the graphics characters in error messages back into readable letters. Three other short patches are also included that allow your BASIC to be customized in a unique way. The same technique for adding the patch to ROM BASIC is used in each program. The four programs are written in BASIC for the 540 video board. REM statements in- dicate changes to be made for the Superboard. The BASIC programs read data and create a machine language patch. A disassmbly of each patch is also shown. Once the BASIC program is run, it can be NEWed and the machine program will remain untouched, if the com- puter is cold-started, the POKEs to locations 4 and 5 must be redone. All of the patches start at hex loca- tion $0240. PROGRAn 1 10 REM OK REPLACEMENT 20 DATA 169,80,160,2,75, 195,158 50 FDR X=576 TO 582 to READ fi 50 POKE X,Q ; NEXT 60 INPUT"NEW MESSAGE ":M 70 B$=CHRt(10)+CHR$(13) 80 AS=B$tAI+Bt■^CHR$(0) 90 A=592 100 FOR K=l TO LEN(A$) 110 POKE A,ASC(M[DS(A$,X,1)) 120 A=A-t-l 130 NEXT 140 POKE 4,61:P0KE 5,2 DISASSEHBLY FOR PROGRAM 1 0210 fl950 LDA #$50 0242 A002 LDY #$02 0244 4CC3A8 JMP SA8C3 Before an error message can be corrected, a way must be found to break into BASIC just when the message is being printed. This is difficult since BASIC is mostiy in ROM memory. There is a sneaky way of doing this, as described in the remainder of the article. Note carefully the format of error messages ?S-' ERROR OK The "OK" prompt always follows the error message. To output the "OK" prompt, the BASIC interpreter jumps lo $0003. At that address you will find the machine code 4C C3 A8 which means JMP $003. At that address is found the machine code 4C C3 A8 which means JMP $A8C3. According to an article in MICRO, November 1979, (18:9), $A8C3 is a subroutine to print a message. The address of the message to be out- put is in the A (ADL) and Y (ADH) registers. Since the locations $0003, 0004, and 0005 are in RAM, these locations can be changed to divert the computer to our own subroutine instead. Before attempting the error cor- rection program, let's try a simpler problem first to demonstrate the technique. Suppose we don't like the "OK" prompt. If the computer can be intercepted on its way to the message routine, the values in the A and Y registers can be changed to point to a new message of our choosing. The first BASIC program November 1980 MICRO — The 6502 Journal 30:37 does exactly that. (If you want to convert your Ohio Scientific machine to a PET, run tlie BASIC program and INPUT "READY" as the new message.) Your new prompt plus appropriate line feeds and car- riage returns are stored in $0250. BASIC'S pointers are changed to aim at the new message. Instead of "OK" your computer will respond with "READY" or "I'M WAITING" or whatever you choose. PROGRAM 2 ID REM ERROR MESSAGE CORRECTION 20 DATA 72,173 30 DATA 6i|,215 :REH SUPERBOARD 101,211 i|0 DATA 201,63,208,8,173 50 DATA 66,215 :REf1 SUPERBOARD 103,211 60 DATA 11,127,111 70 DATA 65,215 :REfl SUPERBOARD 103,211 80 DATA 104,76,195,168,0,0 90 FOR X-576 TO 597 100 READ 110 POKE X,0 120 NEXT 130 poke hm ;poke 5,2 disassehelv for program 2 0210 18 PHA 0211 AD10D7 LDA SD710 0211 C93F CHP fflSF 0215 D008 BNE $0250 0213 AD12D7 LDA $D712 021B 297F AND #$7F 021D 8D12D7 STA $D712 0250 68 PiJ\ 0251 1CC3A8 JHP iA8C3 We now have a method of detec- ting the "OK" prompt, but "OK" ap- pears many times, other than after an error message. Notice that "?" appears on the line above the "OK" whenever an error is printed. After every prompt message, the com- puter examines the space directly above the "0" in "OK". Whenever a "?" is found, the detective character in the error message ap- pears on the screen two spaces to the right. This graphics character can be changed into the correct let- ter by resetting the high order bit. Program 2 will detect when an error message appears on the screen and reset this bit to the correct character. Note the three lines which must be changed if you are using a Superboard. The disassembly is for the 540 version. If you make an error while in the SAVE mode, you will see In stow motion that the Incorrect character first ap- pears and then is corrected. With this patch In your BASIC you are now free to make all sorts of errors without fear of those funny looking graphics characters appearing. Nor- mal graphics will not be affected. The same method used to detect an error message can be used to sense a user input. If you enter "ABC" the computer will display ABC (blank line) ?SN ERROR OK The user input appears 3 lines directly above"OK". The computer can check this line against a keyword. This scheme can be used to add commands to BASIC. For ex- ample, program 3 is a machine language screen clear. Once the BASIC program tias been loaded and run, typing a "!" and carriage return will trigger the screen clear program. Line 50 of the BASIC pro- gram is the ASCII value of the trig- ger character. This can be changed to whatever you wish. Changing line 50 to "DATA 35" will allow a "#" to clear the screen. Program 4 uses a multiple letter keyword which gets stored at $0260. A message of your choosing is stored at $0280.When you load and run the BASIC program, you must enter a "KEYWORD" and a "MESSAGE". For example you mi&fit enter "KILOBAUD" and "I LIKE MICRO BETTER". Whenever the "OK" prompt appears, the com- puter will search for a match to your keyword. If a match is found, your message will be output to the screen. Responding with a message is not particularly useful, except to amaze your friends. However, once you understand the technique of keyword detection, the machine pro- gram can be altered to do your bid- ding. You can even write a program which requires a secret password before it will run. PROGRAH 3 10 REM SCREEN CLEAR 20 DATA 72,173 30 DATA 192,211 :REI1 SUPERBOARD 37,211 10 DATA 201 50 DATA 33 ; REM ASCII TRIGGER 60 DATA 208,35,138,72,169 70 DATA 32,162,0,157,0,208,157.0 80 DATA 209,157,0,210,157,0,211,157,0 90 DATA 212,157,0,213.157,0,211 100 DATA 157,0,215,232,208,229 110 DATA 101,170,101,76,195,168 120 FOR X=575 TO 622 130 READ a 110 POKE X,Q 150 NEXT 150 POKE 1,61:P0KE 5,2 DISASSEMBLY FOR PROGRAM 3 0210 18 0211 ADC0D5 0211 C921 0216 D023 0218 8fl 0219 18 021A A920 021C A200 021E 9DO0D0 0251 9DQ0D1 0251 9DO0D2 0257 9D0OD3 025A 9D0GD1 025D 9D00D5 0260 9D0DD6 0263 9D0OD7 0266 E8 0267 DOE 5 0269 58 02 5A AA 026B 68 025C 1CC3A8 PROGRAM 1 10 REM INSERT MESSAGE ON CUE 20 DATA 72,152,72,172,53,2,185,96,2,217 30 DATA 192,211 :REM SUPERBOARD 37,211 PHA LDA tD5C0 CMP #$21 BNE $026B m PHA LDA #$20 LDX #$00 STA tDOOCX STA SDIOQ.X STA tD200,X STA $D3DD,X STA SDIOO.X STA $D500,X STA iD600,X STA $D700,X I NX BNE t021E PLA TAX PLA JMP $A8C3 30:38 MICRO — Ttie 6502 Journal November 1980 40 DATA 208>12>136,2O8.245.1Qi|.lO4 50 DATA 169,128,160,2,76.195,168 60 DATA lot, 168, lot, 75,195, 168 70 FOR X=576 TO 607 80 READ Q 90 POKE X,Q 100 NEXT 110 1NPUT"KEVW0RD ";AS 120 A-608 150 POKE 575,LEN(AS)-1 WO FOR X=l TO LEN(A$) 150 POKE A,ASC(MIDt(A$,X,l)) 150 A=A+1:NEXT 170 INPOT"MESSAGE ";flt 180 B$=CHRt(10)-*-CHR$(13) 190 A$=B$-*A$+B$+CHRJ(0) 200 A=6tO 210 FOR X=l TO LEN (At) 220 POKE A,ASC(M[Dt{At,X,l)) 250 A=A+1;NEXT 240 POKE HM-.PQKl 5,2 DISASSEMBLY FOR PROGRAH 4 0240 48 PHA 0241 98 TVA 0242 48 PHA 0243 AC3F02 LDV t023F □246 B96002 LDA $0260, V 0249 D9C0D6 CMP SD6C0,V 024C DOOC BNE $025A 024E 88 DEY 024F D0F5 BNE 10246 0251 68 PLA 0252 68 PU 0253 A980 LDA #S80 0255 A002 LDY #t02 0257 4CC3A8 JMP $A8C3 D25A 68 PLA 02 5B A8 TAY 02 5C 68 PLA 025D 4CC5A8 JflP tA8C3 A FOR □ 51 vidflo GamM 1 S15. Three Gamea. Head-On \3 Ilka iha popular arcade game. TanK Battle Is a lank game for two tc four Trapf is an enfianced blockade sryla game, VidM G»m« 2 S15. Three games. Gremlin Hunl Is an arcade-slyla game for one to three. Gun- flghtT is a duel of mobile artillery. Indy la a race gams for one or two. Advtntur*: Mftrocmtd In Sp«c« - Si2r An adventure thai runs InBK! Save your ship and yourself tromdeatruchon. Dungeon Cha«« 510. A real-time video game where you explore a twenty level dungeon. Boird Gamti 1 $15. Two gamaSr MIni-gomoKu is a machime language version of five stones Qomoku. Cubic is a 3-D tic-tac^toe ^ame. Bcih with graphics. Dliai9embl«r Sl2. Use Ihfa to look at the ROMs in your machine lo see what makes BASIC hck. Reconstruct the assembler source code ol machine language pro- grams to understand how they work. OUr disassembler out puts unique aut- fixes which identify the addressing mode being ueedt no otha^ program has this! Supet! Siorhythma 515. A sophiaiicated biorhythm program with many unique features. CI Shorlhand .,*Ta, Use only two kays lo enter any one of the BASIC commanda or keywords. Saves much typing when entering programs- Written In machine language. For all BASlC-ln-ROM systems. Selected programs available on disk. Cclor and sound On vrdeO garneS. Send for free catalog Using many mare programs, Orion Software Associates 147 Main Street . OssJnlng, NY 10562 OSI SOFTWARE FOR OSI OSI We Have Over 100 High Quality Programs For Ohio Scientific Systems o s I ADVENTURES AND GAMES Adventures - These interactive fantasies 4i)l fit tty SKI You give your computer plain eng»»sh commanda as you try tc survive. ESCAPE FROM MARS You awaken in a spaceshrp on Mais You're in trouble but OKploring the nearby Marttan city may save you, DEATHSHIP This IS a cmise you won't forget - if you survive ilT Adventures S1A.95 Tape oi S'/i" Disk $15.95 6' Oiat STARFIGHTER $5,95 Reahime space v^ar with realistic weapons and a wolfing instrument panel. ALiEf^ IfJVADER 6.95 (7.95 for color and sound} Rows of marching munching monsters march on earth TIME TREK $995 A real time Slarlrek with good graphics. Naw Monitor ROM S39.95- Gives BASIC in ROM machines full edit features and mora. Supports Video Mods. Send for documentation. And lots, lots, lots morel TEXT EDITORS FOR ALL SYSIEMST! T*iese programs allow the editing of basic program hneSr All allow for insenion, deletion, and correction in The middle of already entered lines. No more retyping. CI P CURSOR CONTROL jleMt Editor) $9.95 Takes 166 bytes ot RAM and adda, besides tent editmg, one key mstant screen clear. C2PyC4P CURSOR $9.95 Takes 366 B>TES to add PET iil^e cursor functions Enter or correct copy from any Locatjon on the screen. ^PEROISK S24.95 for 5 S26.95 for B' Mas a tent ednor for 660 pIle£ » greai new BEXEC', a renumberer, search, a vanable table maker ar^d Diskvu - lots of utility tor the money. We also have 25 data sheets available such as' IMPLEMENTING THE SECRET SOUND PORT ON THE C1P $4.00 HOW TO DO HIGH SPEED GRAPHICS IN BASIC $4.00 HOW TO READ A LINE OF MICROSOFT $1,00 JOYSTICK INSTRUCTIONS AND PLANS FOR CI P $3.00 SAVING QATA ON TAPE $4.00 THE AARDVARK JOURNAL A tutorial bimontiily journal of how to articles $9,00 o s i Our £1 .00 catalog contains a free program listing, programming hjnts, Hsts of PEEK and POKE locations and other stuff that OSi forgot to mention and lots more prograriks like Modem Drivers, Temirnal Programs, and Business Stuff. Aardvark Technical Services 1 690 Bolton, Walled Lake. Ml 48088 (313)669-3110 OUR UNIQUE DESIGN PHILOSOPHY MORE is MORE WE PACK MORE FEATURES ON EVERY BOARD This muUi-purpose expansion board provides memory expansion of up to 48K and includes an EPROM programmer, two versatile interface adapters, and a prototyping area. DRAM PLUS is fully compatible witti AIM, SYM. KIM (ASK) microcomputers. FEATURES — DRAM PLUS- BENEFITS 16 or 32K new generation dynamic RAM with all refresh handled on the board and completely transparent to ASK microcomputers. Memory addressable In independent 4K segments placed on 4K boundaries. Provisions provided for four ROMs or EPROMs - up to 16K nonvolatile memory. EPROM Programmer for 2716/2516 2K EPROMs, and 2732/3532 4K EPROMs. EPROMs pro- grammed under automatic voltage control. 2 Versatile interface adapters (VIAs) provide 40 I/O lines brought out to the edge connector, 4 timers, and 2 shift registers. Prototype area provides space and support for the addition of special circuits. Requires only + 5V at 1 amp and any voltage between + 12 and +24 at 150 miiliamps. -SV is generated on board. ASK microcomputers can handle more complex software tasks and store significantly more data. Added memory may be contiguous with existing memory. Nonvolatile memory further expands the use and application of microcomputers. DRAM PLUS provides users all the hardware and software required to produce EPROMs. The VIAs enables users to interface keyboards, printers, and other devices to DRAM PLUS and/or the microcomputer. The prototyping area enables users to add memory write protection, multiplex EPROM's, or control other application specific devices. Your existing power supply is probably adequate to run DRAM PLUS. DEALER AND OEM QUANTITY DISCOUNTS AVAILAaLE DHAM PLUS: ISK RAM-t295, 32K RAM-S395 VIDEO PLUS II: Stardard Board $295, Oplrons; 4K RAH-S50, 6502 Stand- alone Proces3O[S20, Communlcallons Ptovision-135. The most versatile and complete instant video expansion board for AIM, SYM, KIM (ASK) microcomputers. Includes many unique video features plus general purpose and communications interfaces, 2K EPROM and up to 7K RAM. With the 6502 microprocessor option, VIDEO PLUS II can function as a stand-alone terminal. FEATURES —VIDEO PLUS II— BENEFITS ASK VIDEO PLUSTM Software EPROM works with Monitors, BASIC, Editors and observes all standard programming con- ventions. Fast scrolling and flicker-free operation supports AIM keyboard, upper and lower case, or any ASCII keyboard. Software fully supports VIDEO PLUS II options. EPROM character generators provide for 128 character set with 2716 EPROM, or 256 character set with user furnished 2532, Programmable Character Size. Selective character blank/unblank. Improved keyboard Interface. Reverse Video. Optional System Features are: 2K display RAM, 2K program character generator, 6502 stand-alone processor, ACIA com- munications provision. Instant video display capability. Simple cable connection provides for easy installation and Immediate use: simply "plug in and go". Standard options are available to meet user's requirements for future major system improvements. Display requirements may be tailored to meet actual application requirements on an individual basis. User may specify character set, height, width and spacing in accord- ance with specific application display and man/machine re- quirements, 2000-4000 characters or limited, high resolution graphic screen displays, VIDEO PLUS II supports major system enhancements which can significantly extend user's product life cycle. Ar>y com- bination of options may be specified. Additional capability may be added to meet changing application requirements or planned product line improvements. All prices shown are US and Canadian only, and are exclusive ot shipping criargas and applicable taxes, Olher Improved products now available include: MOTHER PLUS II, PROTO PLUS II, POWER A PLUS M. and AIM PLUS II, For more inlormalion, conlact: I 1 34 Chelmsford St., Chelmsford, t^A i 617/25&3649 01024 OUR UNIQUE MARKETING PHILOSOPHY MORE for LESS WE PROVIDE PRODUCTS FOR COST-EFFECTIVE SOLUTIONS A fully featured mother board with a standardized bus, fuli buffering, address decoding for adding up to 5 expansion boards to AiM, SYlvt, KIM (ASK) microcomputers. MOTHER PLUS II is also a microcomputer support board providing connections for power, TTY, audio cassettes, and cassette control relays. FEATURES —MOTHER PLUS II— BENEFITS All address lines, data lines and control lines are buffered. Address control manager resolves host /peripheral address contention. System I/O is supported with connectors for TTY and audio cassettes; relays to control two cassette recorders; Port A and Port B socket; LED audio input monitor, and more. Address decoding and full buffering provides the necessary interface to easily add boards to Increase microcomputer capabilities. No microcomputer hardware changes are re- quired when boards are added via MOTHER PLUS II. Simple switch settings prevent bus contention between the microcomputer and expansion boards. Standard 44 pin edge connectors provide interconnection for 5 expansion boards. The standard bus eliminates cables and permits more com- pact and efficient packaging. Large terminal strip provides GND, +5V, +12V, 1 user defined voltage, and TTY I/O. The terminal strip simplifies connections and supports special user requirements. DEALER AND OEM QUANTITY DISCOUNTS AVAILABLE MOTHER PLUS II: $100. PROTO PLUS II: UnasE9rnbled-S45, AsBembled-SeO. This expansion board product provides for the efficient design, development, checkout, and interface of digital design logic to AIM, SYM, KIM (ASK) microcomputers. FEATURES -PROTO PLUS II- BENEFITS Full Size board with plated through holes and gold-plated fingers. Triple pad geometry permits solder connectors as well as wire wrap. Universal .1 grid pattern with GND and -I- 5V conveniently bussed throughout the board. Additional patterns to permit quick insertion of a wide range of discrete components, voltage regulators, 25 pin "D" sub- minature plug (RS 232), common transistors, switches, etcetera. Standard Interface has circuits for address buffers, bi- directional tri-state buffers, 8K bank address decoding, and control signal buffers. Product development times are Improved. The PROTO PLUS II board Is designed to facilitate construc- tion and assembly. Engineers can now concentrate their efforts on new design work as standard interface circuitry and components are available as standard options. Time previously lost due to long and sometimes costly order and delivery cycles Is avoided. All prices shown are US and CanaOlan only, and aie eicljslve of shipping charges and applicable lanes. Olher Improved products noi» available Include: DRAM PLUS, VIDEO PLUS II. POWER A PLUS II, and AIM PLUS II. For more information, contact: I \tii3 ' 1 34 Chelmsford SI., Chelmsford, MA 01824 617/256-3649 ©^D® @©a§MTD^D©^! In this month's issue of Ohio Scientific's Smalf Systems Journal, we are introducing a new word processing software system ^WP-3. The description, though brief in comparison to the magnitude of the system, will hopefully convey some of WP-3*s tremen- dous word processing power. Two new Ohio Scientific game software releases— ZULU 9 and OSI INVADERS are also described in this issue. We are pleased to include in this issue another contributed software feature— PIN BALL 2001. Our thanks to Mr. Robert Wiebe tor this contribution. The final article this month is a piece originaily scheduled for the October issue of MICRO. It is a BASIC routine tor OS-65D V3.2 to increase file access effi- ciency by up lo a factor of 20. As always, comment on article content is welcome. Ohio Scientific, Inc. 1333 South Chillicothe Road Aurora. Ohio 44202 Introdiiction to WP-3 WP-3 is Ohio Scientific's latest word processing soft- ware system. Before describing some of WP-3's specific features, let's briefly review a tew general word process- ing concepts. Word processing Is the automated manipulation of text. This includes initial entry of text into a word processing system, editing of previousiy entered text and formatted printing of text. The text itself can be a form letter, a technical manual or the chapters of a book. Or it could be any other textual material that you want lo print wittioul errors, or you will be printing a number of times with minor revisions from one printing to another. There are three basic steps involved in using a word processing system. 1 . Entry of new text. 2 , Editing or correcting previously entered text. 3 . Output of previously entered text with format- ting such as margin jusliflcalion and page numbering. The entry of new text into a word processing system is roughly equivalent to typing a draft of the material. Then the new text is printed for review, proofread and edited. The automatic features ot the Word Processing system provide for easily making changes and automatically compensate for these changes at each printing. For example, if you insert a new sentence or paragraph, all text after the insertion is moved down and page boundaries are readjusted appropriately. Since most word processing printers print 500 or more words per minute, each printout Is produced quickly and also takes little operator assistance. Another concept implied in a word processing soft- ware system is the ability to permanently store entered text in a machine readable form. Under WP-3 text may either be stored on floppy diskettes or on a hard disk (CD-23, CD-74, etc.). Using WP-3 the actual storage and retrieval ot text data is done via named files. This means that blocks of text may be conveniently referred to by common names which have a connection to their content. Some examples could be "CHAPTI", ■'CHAPT2", "AFORM", "LETTER", "RESUME", etc. Editing Features of WP-3 WP-3 has several features which greatly simplify entry and editing of text. For example, upon entry of text infor- mation, all typing may be done without concern for line length. The word processor automatically inserts all proper line terminations for easy readability on the CRT terminal. The easiest way to demonstrate the fundamental features of WP-3 is by describing a simple session with the software. Your first step is to Initialize the text workspace. This is done with the "I" command followed by a "YES" response to "INIZ?", (This two-step procedure helps protect against unintentional initialization.) After initialization, you type "NEW" and enter text by merely starting to type: It was a dark and stormy night. The wind whipped mercilessly at the sails and the howling of the wolves on the tundra touched him to the marrow. Upon exiting the text entry mode, you may return lo the top of the text file with the AGAIN command. The text may then be reviewed simply by Stepping through it by typing carriage returns (or down-arrows). As each line appears on the terminal, the cursor is positioned at the beginning of the line. At this lime you may either edit the line or step onto the next line. After reviewing the text, you will probably notice that it doesn't make much sense. '"Howling wolves on the tundra" while at sea appears to be ridiculous. Either the "sails" or the "wolves on the tundra" have to go. You have several options of how to change your text. The first might be simply to remove the phrase "ot the wolves on the tundra" from the body ot the text. This is accomplished by inserting "markers" into the text at the beginning and at the end ot the offending phrase. These markers appear in the text tile as blinking vertical lines. The command DELETE will remove all characters between the markers. Another option is to enter the line in question, delete characters and insert new characters into the line. This Is done by stepping to the line, "tabbing" to the character and then removing It. The word "sails" could be removed, for example, and the word "igloo" typed in. As a final option, a block of text could simply be changed to other text by using the CHANGE command. You could simply type CHANGE "sails", "flimsy cabin walls". This would replace the word "sails" with the phrase "flimsy cabin walls". There are several other editing commands that are extremely useful. Unfortunately, they don't lend themselves very well to our simple example, so a description will have to suffice. Call 1-800-6850 TOLL FREE Small Systems Journal LIST ZIGZAG XTRA OFF XTRA OFF ADD SPACES BETWEEN WORDS RAGGED EDGE TO LIMITED RIGHT TO RIGHT JUSTIFY MARG IN LINE PRINTER XTRA ON XTRA ON NOT ALLOWED NOT ALLOWED LIST ZIGZAG SERIAL WORD PROCESSING PRINTER XTRA OFF ADD SPACES BETWEEN WORDS TO RIGHT JUSTIFY XTRA OFF RAGRED EDGE TO LIMITED RIGHT MARGIN XTRA ON FINELY GRADUATED SPACING BETWEEN WORDS AND LETTERS TO RIGHT JUSTIFY XTRA ON SAME AS XTRA OFF LIST ZIGZAG XTRA OFF XTRA OFF FINELY GRADUATED SPACING BETWEEN RAGGED EDGE TO LIMITED RIGHT PARALLEL WORD WORDS AND LETTERS TO RIGHT JUSTIFY MARGIN PROrrSSTNG PRINTER XTRA ON XTRA ON SAME AS XTRA OFF WITH ADDITIONAL SAME AS XTRA OFF WITH ADDITIONAL PROPORTIONAL CHARACTER SPACING PROPORTIONAL CHARACTER SPACING Figure 1: WP-3 Output Format Tabre The FIND command will find the flrsl occurrence of specified text. All remaining occurrences may be located by re-commanding FIND wilh no new text specification. The IWOVE and TRANSFER commands manipulate ttie iocalion of blocks of text. A block of text may be moved by first defining its start and end witfi markers (described previously) and then locating where the text should be moved to with the cursor. That is, the marked text will be moved such that it will immediately follow the current cursor location. The TRANSFER command works the same way, but leaves a copy of the text at its original iocalion. Out put- Formatting Features of WF-3 After the entry of your text is complete, you will undoubtedly want some sort of permanent copy of your work. WP-3 supports three types of printed output: Lineprinter (Centronix-type interface) Serial Word Processing Printer Parallel Word Processing Printer This Is, of course, in addition to the standard CRT terminal output. There are two basic output formatting commands. They are LIST and ZIGZAG. LIST outputs lines of uniform length while ZIGZAG outputs lines with "rag- ged" right margins. Each of these commands require a width parameter. LIST (width) defines the maximum line length. Parameters for page numbers, output device, etc., are optional. Another pair of commands, XTRA ON and XTRA OFF controls the proportional spacing formatting of the output when used with a serial or parallel word proces- sing printer. The command HYPHENATE (count) allows automatic hyphenation of words at the end of lines after (count) cJiaraclers in the word. HYPHENATE may be used with either LIST or ZIGZAG. The chart in Figure 1 describes the various outputting options versus output device. There are also several commands which allow control of the lines per page, spacing between lines, hold output at end of page, etc. OHIO SCIENTIFIC 133 Chlllicothe Road • (216)831-5600 @m@ ®©m\m^wm©' A unique feature in the output formatting routine is ttie "embedded command" ACCEPT. When ttiis command code tias been "embedded" into your normal lejtl and is found during a LIST or ZIGZAG output, the printing stops and waits for an input from the terminal. Upon completion ot terminal input, whatever you have typed in is printed before continuation of the standard printed text. A number of other commands may be "embedded" into your normal text to control WP-3's output lormal- ting. These include command codes tor indentation, tabinaiion, pagination, skip specified lines, underline, etcetera. With all these commands, the action is taken without printing the "embedded" command code. Of necessity, this has been a very brief description of a few of WP-3'5 many features. You should contact your nearest Ohio Scientific dealer for further details concer- ning WP-3 and the recommended system configuration to fully utilize this powerful word processing package. OSI Invaders and Zulu 9 081 offers nearly one-hundred programs for its personal computer line. This range from battleship to tanks; including action games (like bomber and hectic), sports simulations (like bowling and golf}, card games (spaces and hearts, for instance), strategy games (try Othello or chess) and arcade-type games. Tfiis month we will highlight two of the arcade-type games: Zulu and OSI Invaders. Zulu 9, written in assembler, is a unique rendition of (he interstellar pursuit theme made popular by the movie Star Wars, Vou are given the controls of a power- ful star ship— your objective is to destroy as many invading alien ships as possible without running out ot energy. On the disk version your controls consist of two joysticks to steer, accelerate, decelerate and fire your lasers. At the start of the game you have to choose your handicap (25 for beginners, for experts), vertical retrace option (this selects optimum video display for color televisions) and whether or not collisions with invadmg space craft are allowed. You will begin with 100% energy at speed 10. Speeds from 1-10 deplete your fuel and from 11-20 replenish the fuel supplies. The faster you go, the harder the incoming crafts are to destroy. The screen depicts your view of space from the cockpit of your star ship. The direction controls act like the control stick of an airplane. As you fly through the stars you will find that the alien's shields protect him from all hits except to the center of his ship— your shots have to be right "on target". Another interesting feature, your speed relative to the alien vessel, will determine whether he's getting closer or further away. Zulu 9 is available on GD-8 with three other games tor disk machines, black and white and color compatible with built-in DAC sound effects for $35.00. The cassette version, which costs S9.00, is a 4K black and white program and does not require Joysticks. OSI Invaders Is a new release. Starling with three turrets, tire your laser cannon at the hoard of alien invaders as they relentlessly march across the screen coming closer and closer, constantly dropping bombs on you and your shields. This popular game (written in assembler) offers 15 levels of play from slow to very, very fast. Each time you clear the screen you will get another turret (up to nine maximum) but it gets harder because the invaders come faster each time and the fewer you can see, the faster they go! This is a one player gams that Is played from the keyboard. Current score, turret count, and high score are constantly displayed. Disk versions store the high score for each level (cassettes do not). The cassette costs $19.00, runs in 8K on ClP's, C4P's and CSP's (pro- gram does not use color or sound}. The disk is available for ClP's, C4P's and GBP's for $29.00. Plnball 2001 Many users of Ohio Scientific's personal computers submit programs fot our consideration. This one was authored by Mr. Robert Wiebe of Canada. The instruc- tions are self-contained and complete. This is easily converted to BASlC-in-ROM machines by modifying lines 160, 161 and 2455. The POKEs contained in those lines may be new to some readers: POKE 9770,0 disables the scroll and POKE 9770,64 restores it. Some interesting visual effects can be produced by experimenting with these POKEs. Try the following for starters: 10 FORSG^I TO30:?:NEXT:A=9770 20 FORI =0 TO 255:POKE A,I:?""':NEXT 30 POKE A,64 Remember to POKE 9770,64 when you are done ex- perimenting with various STEP rates in line 20. le REri PiHeRLL seei 2e TNPUT'Po you wmn± inslr-uction* 53J14. 155: POKEX'Si^ae. 1!4' KEXT ie F0B>:-5-' PRINT3PCC63>fiI. - P0i;EES167, 3£ 145 B-53961:P0RX-8T07 POKEX'fl. 4- POKEX*ft-3B. 4 NEXT 158 FORX-ITOIB BEPDH: BEBDB POKEfl + 54154. E P0«Efi»54l96, B 155 NEXT 160 P0KE£B73-96ifl-57BB8 161 P0KE977B, 8 165 B-6 sea B»B-1' PfiINTTn6<47)-BfiLL9 "B IFB-0THEN24BB ?B1 PHINTTfiB<22)"Hj.l -SC0RE "S 285 F-B- FORX-5499aT055B23 POK EX. 154: NEXT 2 IB FORX-ITOSB IFPEEKiS7aSa)ilsrHEH22a 211 POKER. £: NEXT £15 PRINTSPC<6B1 PRINT 216 FORX-lTOSae: NEXTX G0T02B1 2£8 PI!TNTSPC<6e> PBIHT 23B POKE53611,3£-C-536?a: [1 — 1 248 POfiX-11031 C-Ci-D' POKEC, 226. POKEC^l- 3a NEXT JSe PQKE53611. 233 FORX-ITOINT lfiN0.IFP<20RP>7THEN4aB 381 TFF-lTMEN48e 382 PL"1S-1- F-1 ja5 IFP-7THEN375 Call 1-800-6850 TOLL FREE Small Systems Journal 3ie IFP-3THEN3S5 315 F0RFF-53B97T05499SSTEP-1 POKEFF, FL C0SUe49e NEXT 35B F OHFF- 5 : tF>!>. 3THENX-64 4BS IF1« STKEHX— 64 4S8 POKEC. £24 POt-'EC-D. 32 42i nC-DC + 1. IFDCO10THE144B 4£S DC-e 425 IFPEEH ^£6 POKEC*l£a, 33 C--D G0T04BB 5B5 IFPOFLTHEhSJB 51B )i-RKDIf!) IPX-;. STHEMX-l 515 IFX> 5THEMX— 1 52B C-C'X P0KEC.226 POKEC-K, 32 53fl 1FD-63THEND--65 G0T04B9 335 IFO-SSTHEND— 63. C0T04BB 54B ;-S»P. PRINTrnB<9>'SC0RE "5: IFP<1360RP-ia!TI(EN54S 541 C0TD4SB 54S IF0-65TMEND--43 GCrt04BB 536 IFC--63IHENL1-63 GOT04aB 553 IFD--63THEhD=63- ^OT04Ba 560 IF0-63THEND--65 COT 04 B 3 680 IFD-65THENE-63 C:OT04BB dB5 IFD--65THEND— 43. <;OT04BB 61 B IFIJ-63IHEMD-65 6QT04Ba 615 IFO — 63TMEHD — 6! COIOSBB 2eBB DnTP4B, 42. 42, 42- 41 20ie DHTBB, £21, 1- 2££. 64. 148.65. 139. 128, 14B, 129, 139. 192, 148, 193 2B2B DBTH139. 256- ££a. £57. 223 £4eB e»-"VOUH SCORE '*STRtlS> BB-3£-IUT(LEN 2481 PRIHTSPC<&0> £482 PRINT 2418 PRINTTSBIBBIBI 2415 PRINTTSB<19l-HIT (3PflCE> 10 PLHV ncniN- £4£B FORK-lTDl SOB: NEXT PRIHTSPC(6B1 FC(»X=nOS08 NEXT £4£1 PRINT 2435 PRIHTTBB TO ENO THE CnrtE" £440 FORX-lTOl see: NEXT PRINTSPCtSBl F0RX-1T05BB NEXT 2441 PRINT 245B P0KEH.233 BB-PEEKlfi) . IFBB-17THEKCLEPB. RESTORE COTO40 £433 IFBB-9IHENP0KE977B, 64. RUN-BEXEC* 246B COT024I! 35BB FORX-lTOll PRINT NEXT: PHINTTBBfEBl "PINBHLL £0B1- 2535 PRINT PRINT- PRIWT £3ie PRINT-It IB A flitapl* g4n* oF Pinbali in bhich gou control" £3£a PffINT"thw flippvrs and th* cDinput»r control! thff ball. " £338 PRINT 254B PRINT'To control th* l#rt hand paddlv uj» th» Iwft '" £358 PRINT'To control th» right paddla uir th» right ~ 2578 PRINT'at th* Kain* timv ^hold thvm both down> " 2330 PRINT PRINT: PRINT 2396 PRIHT'Evary thing ala* you r\9ma to knoM II urittan into tha" £6B8 PRINT "progf^iB, lo juBt Follou it's in«tri.ictions and you'll" 261B PHINT'Ba o. 1<. "- PRINT' PRINT £6£8 FQBX-1T03. PRINT NEXT £638 PRINT"PI!ESS FOLLOWEC B¥ •:RETURN>" : INPUTB* ^648 C0TO35 OS-65D V3.0 'DISK GET' SubroullnB One of the many extensions lo BASIC in OS-65D is the DISK GET command which is used in conjunction with random access data files. The effect of the command is this: one track of data is loaded into RAM and the memory I/O pointers are set to the beginning of the record which was requested. Unfortunately, if the record you request is already in RAM, the track will still be reread when the DISK GET is encountered. Hence, sequential or nearly-sequential access of random files can become very time consuming. This subroutine allows for sequential access to random tiles at a speed comparable to strictly sequen- tial files. The PEEKS and POKEs used, as well as the DISK GET command itself, are listed in the OS-65D User's Guide, page 8. The operation of the subroutine is as follows: 1 . Open the file as usual — DISK 0PEN,6,filename. 2 . Set the record size as usual. (The record size will default to 128 bytes.) 3. Set the variable RN to the number of the record you wish to access. 4 . G0SUB1 0000— Transfer control to (he DISK GET subroutine. 5 . Repeat 3-4 as desired. 6 . Close the file as usual— DISK CLOSE,6. The subroutine differs from the actual DISK GET command in the following respects: 1 . No redundant disk reads are executed, that is, it records 5 and 7 are on the same track, that track will be read only once if both records are requested sequentially, 2 . A DISK GET which requires another track to be read will involve a DISK PUT operation if any information currently In the buffer has been altered. This subroutine is designed as an aid to home users of Ohio Scientific machines. Although this routine has been thoroughly tested, it is not suggested tor use by the beginning computer enthusiast. It is strongly recom- mended that the user become familiar with standard data file techniques before moving on to this useful -ex- tension. 10000 DEF FNfi leaiQ DEF FNB;'=PEEKO604> THEtJ 10060 10040 IF PEEKC3005) THEN DISK PUT 10050 DISK QET,RN : RETURN 10060 Rfl=(RN-TR*PEE}«i2042;')-f<2-PEE!«120765>+PE£K':39?S)+PEEKi;3399>*£56 10079 nH=INT(Rfl/256) : flL=Rfl-(=lH*256 10080 POKE 3132. fit : POKE 9133, AH : POKE 9155, RL : POKE 315o, PlH : RETURN OHIO SCIENTIFIC 133 Chilllcothe Road • (216)831-5800 American Data, Inc. The world's largest distributor of Ohio Scientific, lr)c. Microcomputer Systems ANNOUNCES That OSI has appointed American Data as the exclusive distributor of Ohio Scientific products for Europe including the United Kingdom, Benelux, France, West Germany, Austria, Switzerland, Denmark, Italy, Spain, Portugal, Greece, Turkey, and Iceland. Dealer Inquiries invited. Contact Barbara Hall, 352-23-172, Luxembourg or David O'Brien, American Data (301) 840-9540 Telex 64405 (USA). All ABOUT OSI BASIC-IN-ROM BASIC and MONITOR Ratcranc* Manual Aardvark Journal: "It Is the book you were hop- InQ was packed with your computer af the factory." PEEK-65: ". . . goes far enough. . . to hold the in- terest ot advanced programmets . . ." All statements and commands are explained. Loops. Arrays. Bugs. Tapes. BASIC, Auto-load and homemade. USR(X}- Fioating Point. Variable tables. Binary Struc- ture of Source Code. Maps ot pages $00, 01, 02, FE, FF. Location of routines end SAO — BF. From your OSI dealer or software house or send check to me, $6.95 postpaid. (COD $1.10 extra) E. H. Carlson 3872 Raleigh Drive Okemos, Ml 48864 WP'bSOZ a very fine word processor TapelC1,C2.C4) S75 5"Disk(C1,C2.C4l ..,S75 8" Disk for BSD S75 S"65D S65U Descriptive Brochure Dwo Quong Fok Lok Sow 23 East 20th Street New York City. New York 10003 (2t2>6S5-2ia8 30:46 MICRO — The 6502 Journal November 1980 A Versatile Hi-Res Function Plotter for the ATARI 400 and 800 The ATARI offers many possibilities with its col- or graphics. The discussion and program pro- vide a starting point for understanding and utilizing these potentials. David P. Allen 19 Damon Road Scituate, MA 02066 In the September 1980 issue of MICRO (28:39) I presented a pro- gram for the APPLE II which ptotted an infinity of trigonometric func- tions (and other functions as well) in the Hi-Res mode. Not long after I developed that program I obtained the new ATARI 400 computer. I was immediately impressed by the sophisticated graphics routines contained in ATARI BASIC and I decided to see how well some of my APPLE II graphics programs would translate into ATARI BASIC. The answer Is ... very well, thank you! While APPLE II has three screen modes (text, Lo-Res graphics, and Hi-Res graphics) the ATARI has nine screen modes and each has a greater number of permutations than does the APPLE II. This does not come completely unfettered by problems, for getting the graphic capability out of the ATARI machine is much more complicated than with the APPLE II. After telling it which of the two graphic modes you're in- terested in, APPLE aslts only what color to plot and where to plot it. ATARI is interested in these things, and also the color of the background, the color of the border outside the graphics window, and the luminance, or brightness, value of the plot, the background, and the border. And ATARI offers you not two grades of resolution, but four! For comparison, see figure 1. Since the ATARI 400 comes with only 8K of RAM it soes not have enough available memory to sup- port the GR.8 mode. So, my first translation from APPLE II Hi-Res graphics was to the substantially lower resolution of ATARI GR.7 mode. The conversion turned out to be quite easy and is contained in the listing. Lines 100 through 250 set the graphics parameters and, as set, wiil display the graph in orange (white, on black and white screens) on a black background. Change line 210 to Setcolor 2, 12, 4 and line 250 to Setcolor 4, 12, 4 and you will print the graph against a pleasant green background. Tough to do on an APPLE, easy to do on an ATARI. I find the results of this lower resolution plot to be quite accep- table. Highly complex waveforms can get badly muddled up at times, but changing line 50 to expand the muddled area can reveal the covered up detail. For example, if a 1- to 360-degree plot is inconclusive in the 45- to 60-degree range, then substitute 45 for 1 and 60 for 360 In line 50, and run the program again. This will cause the area in question to be expanded across the entirg screen. You can have greater resolution by stepping at rates of 1 or less in line 2100. After this first translation I ac- quired an ATARI 800 computer with 48K of memory so I decided to see what would happen with a GR.8 ver- sion of this program. It comes off very well and, of course, has much higher resolution to offer than APPLE'S Hi-Res mode. We are limited in the GR.8 mode to only two colors, namely white and something else for the background, but I do not find this to be particularly restric- ting. With more points to plot it takes more time, but much greater detail can be obtained, especially with the magnification techniques described above. APPLE II ATARI Mode GR HGR Resolution 40 X 48 280 X 192 . Mode GR.3 GR.4 (or 5) GR.6 (or 7) GR.8 Resolution 40 X 24 80 X 48 160 X 96 320 X 192 Figure 1 i November 1 980 MICRO — The 6502 Journal 30:47 Here are the program listings tor tfie function plotting program in modes GR.7 and GR.8. The GR.8 ver- sion can be used witt) ttie ATARI 400 only if it is equipped witti ttie ac- cessory 8K memory, wtiich makes the 400 a 16K machine. So try ttiese out on your ATARI mactiines. Eliminate ttie REM statements and save vast amounts of memory. Try fooling around with For... Next loops around line 2900 and get an integrated plot with variable changes. Lots of things are possible here. Have (un! David Allen's publications in- clude Television System Design for the United States Air Force. As a contributing editor to Video Magazine, he writes both articles and a monthly production column. 1 RErt FUHCTIOH PLOTTER PR{X3WI 2 REM BY DAl'IO P. OLEN 3 REM ATfiRI FLOATING POINT BASIC 4 REM aFYT?IGHT tC) 19^. 5 REM 6 REM THIS PRIKRmM PLOTS A 7 REM OJRUE FOR f^.' EKPRESS- 8 REM ION AS A FUCTION OF 3 REM INCREASING ANO-E FROM 18 REM 1 TO 360 DEGREES. 11 REM CHANGE LINE 2906 12 REM TO A FU^€TION VOU WISH 13 REM TO PLOT . 14 REM 15 REM 40 REM ESTABLl^ GRAPH STARTIfC 41 REM AM) EN0INI3 POINTS. 42 RBI 43 REM 58 R1=1^R2=360 88 REM 89 REM 30 REM ^T GRW^IC PARAMATERS 31 REM 32 REM 190 GRAPHICS 7 260 CaOR 1 210 SETCOLOR 2.8.6 25& SETCOLOR 4.9.8 268 REM 269 REM 270 REM PLOT GRAPH AXIS 271 REM 272 REM 300 PLOT L1=DRAWT0 1.88 400 PLOT l,4e:DRAWT0 157.48 500 FOR 1=8 TO 80 STEP 10 600 PLOT l.I^DRAWTO 3.1 708 l«KT I 800 FOR 1=1 TO 158 STEP 39 300 PLOT i.38^DRAWT0 1.42 1006 NEXT I 1100 REM 1110 REM 1120 REM SET FLAGS FOR FIRST PLOT 1138 REM AMJ SCALE. 30:48 MICRO " 1140 REM 1150 REM 2ftflR F=0^G=0 2010 REM 2020 REM 2030 REM START ROTTING 2040 HtM 2B50 REM 2060 REM CHANt^ STEP FOR MORE 2061 REM OR LESS RESaUTIOH. 206? REM IF Rl> R2 T^£N STEP 2063 REM MUST BE HEGATIUE 2064 REM (PRECEDED 0"/ A MINUS 2065 REM SIGN). 2066 REM 2867 Rei 2100 FOR r=Rl TO R2 STEP 3 2110 REM 2120 REM 2130 REM NEJ-iT THREE STEIN'S ESTABLISH 2140 REM HORIZONTAL SCALE. 2150 REM 2160 REM 2200 IF A^Rn>=ABS(R2) THEN R-^AfeSCRl) 2308 IF f¥!^R2»=ABS T^£N R=ABSCR2) 2400 IF G=0 i"HEN S=158.''R^G=1 2588 >i=I^Y=8 2550 REM 2551 REM 2552 REM CONltRT DEGREES TO 2553 RBI RADIANS. 2554 REM 2555 REM 2600 >;=X:ic3. 14159.' 188 2650 REM 2651 REM 2652 REM PREUENTS CRASHING WHEN 2653 REM K = 0. 2654 REM 2655 REM 28^ IF X=0 THEN X=1.0E-05 2850 REM 2851 R01 2852 REM ^£X7 lUE ASCRIBES 2853 REM FUNCTIflJ TO &E. PLOTTED. 2854 RB-1 The 6502 Journal Novamber 1980 2855 2900 3000 3100 3158 3151 3152 3153 3154 J200 3258 3251 3252 3253 3254 3308 3350 3351 3352 3353 3354 3355 3400 3450 3451 3452 3453 3454 3500 3600 Z7m 3750 3751 3?52 3753 3754 3755 3756 3800 3900 5000 5108 5208 5308 5400 REM 'r=Y+Yi V=V:S28 REn REh SCALES X Rtn RBI REf1 RETI FOLATES PLOT TO X AXIS. REtl REM V=-Y+40 RBI REM RBI RB1 REM RB1 t2HJB REn RBI RBI PLOTS FIRST POINT. RBI REM IF F=0 DRAUTO h€XT I REM REM REM REM REM GRAPHIC REM f^M LIST END SUBROUTINE PREIENTS OFF-SCALE CRASHING. 5008 THBJ X,Y aor X.Y = F=1 DISF'LAYS EQUATION tS-' FIOTTED FUNCTION BENEATH DISPLAY. 2^ X<0 THEN X=0 X>158 THEN X=15S Y<0 THEN Y=0 THEN V=60 IF IF IF IF RETURI-J Y>^ 1 REM FUNCTION PLOTTER PRCO^ATI 2 REM B^^ DAl-'ID P. flJ-EN 3 REM ATf«I FLOATING POINT BASIC 4 REM COTr'RIGHT CO 1980. 5 REM fa REM THIS PROGRAM PLOTS A 7 REM CUf^^ FOR AKV EXPRESS- 8 REM ION AS A FUNCTION OF 9 REM INCREASING ANGLE FROM 10 REM 1 TO 368 DEGREES. U REM CHANGE LINE 2908 12 REM TO A FUNCTI^I YOU WISH 13 REM TO PLOT. 14 REM 15 REM 40 REM ESTAaiSH mPH STARTING 41 REM f*C ENDING FOINTS. 42 REM 43 RBI 58 R1=1:R2=360 88 RBI 89 REM 98 REM SET GRAPHIC PARAMATERS 91 REM 92 RBI 100 GRAPHICS 8 290 COLOR 3 250 SETCCLOR 1.1.14 251 SETCXOR 2.0/0 252 ^TCaOR 4>0.0 268 REM 269 RBI 270 RBI FtOT GRAPH A;>iIS 271 REM 272 RBI 300 PLOT l.l^ORAWTO 1.160 408 PLOT l.eO^DRAWTO 314-80 5m FOR 1=0 TO 160 STEP 20 608 PLOT I.I^ORAWTU 6.1 7^ HE>^;r I 808 FOR 1=0 TO 316 STEP 79 900 PLOT I.76^DRAWT0 1.84 1800 f€XT I 1108 RBI 1110 REM 1120 m'i SET FLAGS FOR FIRST PLOT 1130 RB1 mi) SCALE. 1140 RBI 1150 RB1 2000 F=0:G=0 2010 RB1 2820 REM 2030 REM START PLOTTING 2840 RBI 2050 RBI 2060 REM CWWGE STEP FOR MORE 2061 RB1 OR LESS RESOLUTION. 2062 RB1 IF RI> R2 THEN STEP 2863 REM MLST BE hJEGATIUE 2064 RBI (PRECEDED B"!' A MINUS 2065 RBI SIGtO. 2066 m■^ November 1980 MICRO ~ The 6502 Journal 30:49 I=R1 TO R2 STEP 3 IF AB£(K1»=ABS IF f«S(R2»=f«SCRl; THEN R=f*S(R2) IF G=9 THEhi S=3i6/R = t.=l 2667 REM Zim FOR £110 RBl 2120 REM 2i:^y KtM NDH" iH-ic. SltKo EsIh&LISH 2140 REfl BjhliiiuKrHL SCw_£. 2150 REM 2160 REM 2208 2300 2400 2568 K=rY=0 2550 REM 2551 REM 2552 W\ COHltRT DEGREES TO 2553 RB1 RfCiIANS, 2554 mi 2555 Rei 2600 X=X:?;3. 14153/180 2650 REM 2651 REM 2652 Rei F1?£l€NTS CRf^ING 1-&EH 2653 REM X = 0. 2654 REM 2655 REM 2898 IF X=0 THEN X=1.0E-85 2850 REM 2851 RBI 2852 REM NEXT LINE DESCRIBES 2853 REM FICTION TU BE PLOTTED. 2854 REM 2855 REM 2900 Yl=SlH<:X)*C0S(X-2> 3668 Y=Y+Y1 3100 Y='f:(c20 3150 REM 3151 REM 3152 REM XftLES X 3153 REM 3154 REM 3208 x=m 3250 RBI 3251 REM 3252 REM RELATES PLOT TO X k'^IS. 3253 REM 3254 REM 33^ Y=^Y+80 3350 REM 3351 RBI 3352 REM SUKi:OUTI!€ FREUENTS 3353 REM OFF-K:ftLE CRASHINu. 3354 REM 3355 REM 3408 GOSUB 5^0 3450 REM 3451 REM 3452 REM FIOTS FIfST POINT. 3453 RBI 3454 REM 3500 IF F=0 THEN PLOT X.V=F=1 3608 DRf^TO X.Y 3708 i-E<\ I 3750 REM 3751 REM 3752 RB1 DISPLAYS EQUATION OF 3753 RB1 PLOTTED FUNCTIOt-l BEhiEATH 3754 REM OShPHIC DISFIAY. 3755 RB1 3756 RB1 3808 LIST 2^8 3900 END 5680 IF X<0 THEN X=8 5108 IF X>316 THEN X=316 5208 IF Y<0 THEN Y=8 5360 IF YM60 T^€^^ V=160 5460 RtTUF-N OHIO SCIENTIFIC USERS SOFTWARE - GAME AND UTILITY PROGRAMS FOR AS LOW AS S1.00. ALL WITH LISTINGS AND COMPLETE DOCUMENTATION. KITS - UPDATE YOUR COMPUTER TO PLAY MUSIC, INCREASE OPERATING SPEED, HIGH RESOLUTION GRAPHICS AND MUCH MORE. KITS INCLUDE PARTS AND COMPLETE ASSEMBLY INSTRUCTIONS. LOW AS S3.00. OUR SI. 00 CATALOG INCLUDES OSI PROGRAMMING OF AVAILABLE PROGRAMS AND KITS. -IPS PLUS DESCRIPTIONS MITTENDORF ENGINEERING 90S VLLA NUEVA DR. LTTCHFELD PARK^Z 85340 X 30;50 MICRO — The 6502 Journal Novamber 19S0 Up From the Basements by Jeff Beamsley Though this column is being written in the heat of late summer, it wil! appear in late fail. For those of you who own department stores, late fall is just before thai joyful time of uncontrolled consumption called Christmas. This will also be the first Christmas that the mass marketers will be involved in personal computers in a big way. In the thick of it, of course, is Ohio Scientific. Large retailers have not had very pleasant ex- periences with home computers. Sears Roebuck and Co. made several tentative attempts to sell machines. Its latest liason was with Atari. At last report, Sears had puiled the Atari machines out of its stores because of the problems store personnel had selling and sup- porting the machines. Sears has since set up a special training program to educate its salespeople in the finer points of computer marketing. All of the retail computer stores had a chortle over that. But Sears and others did not get to be large multi-million dollar corporations by making silly mistakes. Where there is a dollar bill, there is a way. Working under that philosophy, Ohio Scientific and Montgomery Ward & Co. have devised a solution to the problem. Their solution takes advantage of the "client store" philosophy used to justify the insurance booths, optical centers, restaurants, and specialty shops pres- ent in many department stores. These activities are not owned by the store. The operators rent the floor space for some percentage of the gross and provide the fur- niture and personnel. This same approach with staff and financing from local distributors and dealers will be producing Ohio Scientific computer shops in Ward's stores all over the country from now through Christmas. Montgomery Ward is just the beginning, though. Every corporate president and his accountant read of the 650% growth enjoyed by Apple Computer Co. last year. They are all going to be eagerly watching this Christmas season, expecting to enjoy the same suc- cess. Digital Equipment Corporation (DEC) has already opened a number of retail stores around the country. Xerox Corporation is rumored to be taking the same path, as a result of a marketing agreement with Apple. Not to be outdone, Ohio Scientific is also represented among the biggies. CDC, that's spelled Control Data Corporation, is opening ten retail stores nationwide to market its PLATO systems and Ohio Scientific equip- ment. The CDC stores will also serve as regional repair depots for Ohio Scientific personal machines. How do all of these fireworks affect you and me? Among other things, Ohio Scientific products will prob- ably enjoy the biggest boost in credibility since Clark Kent discovered the phone booth. If the Montgomery Ward program is even marginally successful, there wil! be a very large number of new Ohio Scientific users coming into the marketplace. The average store must produce twelve to fifteen users a month to break even. Multiply that by the hundred or so stores that are scheduled to be open by the Christmas season, and you get an idea of the potential of the market. These new users will demand services from the marketplace in the form of software, additional documentation, and support. Ohio Scientific has already contracted with Howard W. Sams & Co., Inc. to rewrite its personal computer manuals in anticipation of this demand. Ohio Scientific has created a new machine, the C4P-DF, to better bridge the gap between the personal machine and its line of business com- puters. The company has also repackaged the CI P, add- ed some features, and increased the retailer's margin. The new machine is called the C1P series 1!. CDC con- veniently falls into place as the regional service center. CDC also has a very large library of excellent software created on its PLATO system. The company is rumored to be in the process of translating large portions of that library to run on Ohio Scientific systems — just in time to meet the anticipated demand. We are already seeing a significant increase in in- dependent vendors producing products for Ohio Scien- tific personal machines. I can't vouch for the quality of ail of the software, or the advisability of some of the modifications that are advertised, but the fact that they are being advertised nationally implies that the market for such things is expanding. The influx of new users due this fall, combined with the pressure for quality documentation from Montgomery Ward and the high quality software and support due from CDC, should pro- duce a whole new class of Ohio Scientific users. We will see the Ohio Scientific user who brags about his machine, the user who is impressed by the quality of the documentation as well as the hardware, and the user who buys the machine for the large library of software available. Whether you like it or not, this is the user who will make up the phalanx of the personal computer invasion into the home. This is also the user that will determine the direction of the marketplace. The swelling numbers of this type of user will finally compel manufacturers to behave in a responsible way. It is not a new age, but is is certainly a new face. If the mass market is as ripe for exploitation as the projec- tions say, that face is sure to have a smile on it. Please send all comments to: Jeff Beamsley c/o The Software Federation 44 University Drive Arlington Heights, IL 60004 November 19B0 MICRO — The 6502 Journal 30:51 SIRIUS SOFTWARE is proud to announce that SYNERGISTIC SOFTWARE is now a distributor for us and is carrying the following products in stock: E-Z DRAW. It Started as the best graphics editing package available for the APPLE and with our continuing support it is going to stay the best. Human engineered for ease of use and a tutorial intended to be used by computer novices. Still only $34.95. E-Z DRAW requires a 48K APPLE with Applesoft in ROM or a Language System. Written by Jerry Jewell and Nasir/Gebelli. STAR CRUISER — The ULTIMATE ACTION game! A real time hi-res action game with sound, action and suspense. Finally a game that requires fast reflexes, coordination and strategy. These critters actually chase you. A game for all ages and priced right at $24.95. This game runs under 13 or 16 sector format with 32K RAM. Written by Nasir/Gebelli. BOTH BARRELS includes two games on the same diskette. DUCK HUNT is the traditional hunt from the blind, complete with dogs to retrieve the ducks and even an occasional dog fight to liven up the action. Hi-res, of course. HIGH NOON has you pitted against an entire town o( BAD GUYS. They'll attack from doorways, win- dows, and even rooftops. Be quick or be dead. This has some of the most Interesting graphics effects you'll see on the APPLE. Nine levels of play, one to match any age group. These games have great action, great graphics, and great sound effects. What else could you ask for? BOTH BARRELS requires 48K with Applesoft in ROM. Written by Nasir/Gebeili. SIRIUS SOFTWARE 1537 Howe Avenue 1*106 Sacramento, CA 95825 (916) 920-8981 SYNERGISTIC SOFTWARE 5221 120th Avenue S.E. Bellevue, WA. 98006 (206)641-1917 APPLE, Applesoft and Language System are products of Apple Computer, Inc. E—Z DRAW and DUCK HUNT Include cfiaracter generation by Ron and Barrel Aldrlcty and fonts by Ted Cohn and Lawrence Vou. Ttie products listed are all copyrighted © 1980 t>y SIRIUS SOFTWARE. ALL RIGHTS RESERVED. Computer House Div. Programs for Commodore & Apple "Legai Accounting" $1200.00 "Political Party Mailing List" 150.00 ENGINEERING & MACHINE SHOP "Machine Part Quoting" S280.00 "Trig & Circle Tangent" 70.00 "Bolt Circle" 25.00 "Spur Gears" 35.00 "Beams; Stress & Deflection" 145.00 "Tank Thickness" For Filament Winding 85.00 All 6 for only $495.00 "SCRUNCH" - $36.00 For Apple II or Apple II Plus. Compacts Basic Programs up to 20%. Dealer inquiries invited COMPUTER HOUSE DIV. 1407 Clinton Road Jackson, Michigan 49202 Phone: (517) 782-2132 Computer House Div. Programs for Commodore Computers 1 - F.E.T.-Becover; File Editing Tools, Adds 11 commands to assist disk recovery $65.00 2 - SOF-BKUP; copy disks faster including random files. Displays error messages for bad blocks $40.00 3 - SUPER-RAM; cfiecks every ram address against every other ram address, 2001 series $20.00 4 ■ VARI-PRINT; prints listing of all variables with every line number viffiere each occurs $25.00 5 - DOCU-PRINT; prints CRT to printer, use in your own program, in basic $20.00 6 - SCREEN DUMPmEPEAT; similar to DOCU-PRiNT except in machine language. Use witfi anyones program, REPEAT similar to Model 8032 $35.00 7 - TRACE-PRINT; prints listing of all line numbers in order of execution $25.00 8 - SCRUNCH-PLUS; packs a copy of program to save up to 25% of memory space $25.00 9- -SORTER; sorts s one dimensional array afpha- betically(in machine language) $35.00 PACKAGE PRICE $170.00 FOR ALL 9 PROGRAMS SAVE $120.00 Dealer inquiries invited COMPUTER HOUSE DIV. 1407 Clinton Road Jackson, Michigan 49202 Phone: (517) 782-2132 John Conway's Game of Life Using Display Devices with Automatic Scrolling Life has been presented before for specific video displays. IHere are the routines necessary to run Life on any general display device. Theodore E. Bridge 54 Williamsburg Drive Springfield, IMA 01108 This is a much improved version of a previous article on the game of Life tfiat was pubiisfied in MICRO February 1979 (9:39). You can easily adapt tfiis program for any 6502 computer by cfianging jump instructions betvifeen addresses 2096— 20AF. You can use any display device, even a printer, if it will automatically roll the display upwards after the bottom line is printed. The program is very fast. A car- riage return occurs as soon as there are no more characters to be printed on a line. Moreover, two lines in the pond are printed as only one line on the display. Refer to the examples to see how this works. Furthermore, you can change parameters in the program to adjust to the size of your display. Also, you can skip one or more generations between printings. ADDR 2001 2005 2009 Parameter Name CPL LIS GPB Martin Gardner published John Conway's game of Life in the Oc- tober and November, 1970 issues of the The ScientilfC American. Our two examples were taken from his article. We like to think of the game of Life as a computer simulation of a virus growing on a pond of DNA, us- ing Conway's genetic rules, which are: 1 . An empty cell having exactly 3 neighbors will give birth to a new cell. 2 . A living cell having less than 2, or more than three neighbors will die. 3 . AM births and deaths occur at one time at the end of each generation; after all cells have been examined. Default Description Value $20 insert the number of characters per line in your display. $10 Insert the number of lines in your screen. $00 Insert the number of generations to be skipped between printings. - We kill all cells that touch the bank of the pond. This is necessary to prevent wrap-around. The pattern would be badly damaged if wrap- around growth were allowed to col- lide with the main organism. Because of our rather small pond, the display in our example 2 has already departed from the original pattern produced on an infinite pond. The program occupies $298 bytes of RAM. The pond immediately follows the program. The following space Is needed for the pond: 2'(CPL *(LIS -I- 1)). After loading the program, start at address 2000 and depress "G". The computer will respond with "ENTER V.H?". This is your cue to start entering the verlicle and horizontal coordinates for each living cell in the seed group that you want to start with. This is your way of plan- ting the seed of the organism that you want to study. These coordinates are displacements from an origin at the center of the screen. Positive direc- tions are down and to the right. A coordinate may be any decimal digit less than "8", followed by a minus sign "-", if negative; or a space if positive. If you make a mistake, enter the letter "X" to erase the en- try. (Any letter may be substituted for "X".) November 1980 MICRO — The 6502 Journal 30:53 After you have entered coor- dinates for all of the living cells in the arrangement you want to start with, depress slash "/", and you are off and running. The following two examples were given in Gardner's article: Example 1: the famous traffic light. It Is plotted on a pond 16 x 16. 2C0C 20C] 2C02 2CC5 2CV6 2CCC ?C ]C 2003 ]C. 2005 r. 2CCC c 0002 I tit C0C3 00C6 I t t I I noc7 Iff • » I I OCCP coos I ' . I tit ' . ' ' . I » r I < ■ ( 00]C III I I COCf I 1 1 I OQCZ I t t ill lit t I i S III ocn 00]2 III Example 2: the R pentomlno that was plotted to Its death after 1103 generations at the Case Western Reserve University with a computer program by Gary Flllpskl and Brad Morgan, with the results sent In by Ranan B. BanerjI. It has produced 6 gilders before death. Here we plot every tenth generation on our ASR 33 TTY at 110 BAUD. 2CCC A 5 2C05 2C05 CA c ^ 2CCA P5 20C0 2C0C AC C COl] 1 . I I f I CC2] III I till lit < ' t I • < I / I 1 . t I C02] I I II • 'I III CC<] I I < • . / I 30:54 MICRO — The 6502 Journal November 1960 BBI0: 2000 LIFE ORG • 20^0 0020: 2BB0 CPL * • EiS^B CHfiPfiCTERS PER LINE 0030: 2000 LIS t S0021 1.INE5 IM SCREEN 0ai0: 2000 CENT 4 •0022 CENTER OF POND 0050: 2000 RDR * 10024 POINT rO PREU. LINE 00Ge: 2000 POINT * S0E12E POINT TO CURRENT LINE aa70: 2000 BEFORE * • 0028 POINT TO LINE BEFORE PO.SD B0B0: 2000 PONB A S002fi POINT TO STAR I OF POND 0090: 2000 LFiST « •B02C POINT TO Lftbl LINE IN POI 81(30: 200B BUFF * •002E POINT TO BUFFLK eilB: 2000 GC * S0030 GENLKHTION COUNT 0120: 2000 GBP * S0032 GLNLRhllONS BLIWEEN PRINTS 0130: 2000 CNTG • «0033 COUNT OF GENERATIONS B140: 200B fiCT « SB034 fiCTIUlTY aiE0: 2000 OFF 5 • •0035 OFFSETS QiSQ: 2B0B NN * S0B3D NO. OF NEIGHBORS 0170: 2000 SflUY * I003E 0180: 2090 AS 20 LDfilN S20 SET 32 Bt9B: 2002 85 20 STfi CPL CHfiRS. /LINE aZBBt 2004 ft2 10 LBXItI S10 SET IB 02101 2005 85 21 STX LIS LINES IN SCREEN 0220: 2008 H9 00 LDftlPl t00 SET ZERO 0230: 20SFI S5 32 STfi GBP GENERATIONS BETWEEN PRINTS e?«B: 2B0C HS 97 LDflIM END 0250: 20eE 85 28 STfi BEFORE 0ZSa: 2010 fl9 22 LDRIM END /25S BZTBt 2012 05 29 STfi BEFORE +01 0280: 2014 le CLC Bzsas ^015 HE 23 LBH BEFORE B3BBC 2017 55 20 ABC CPL 03 le: Z819 B5 2fl STfl BOND B32flt 2aiB 05 24 STfi HDR B3Se: 20 IB R5 29 LDfl BEFORE +01 BaflW 20ir 65 00 HDCin <00 03Sa; 2021 B5 20 STfi POMD +01 0360: 2023 B5 25 STfi fiDR +01 0370: 0300: SET HD DRESS POINTERS 0390: 0400: 2025 20 BB 20 J5R MULTfi 0410: 2025 fl5 20 LDfi CPL 0420: 202R 4fi LSRft 0430: 202B IS CLC 0440: 202 C 55 24 fiDC fiDR 0450: 282E 85 22 STH CENT 04GB: 2030 flS 25 LBfi FfDR +01 0470: 2032 G3 00 RBCIM •00 0480: 2034 85 23 STH CENT +01 0490: 2036 RG 2! LDX LIS B5B0: 2033 20 BB 20 JSR MULTfi 0510: 203B 18 CLC 0520: 20 3C ft5 24 LDft FtDR 0S30: 203 E 85 2C STfl LfiST BS40: 2040 65 20 ft tie CF'L 0550: 2042 85 2E STfl BUFF 0550: 2044 ft5 25 LOB fiDR +01 LIFE 0570: 2045 EiG 21) r.ffl 1 1 1'/r lEil 0580: 204EJ 63 00 HOC IM *na 0590: 20 4B B5 2F STfi BJFi I I t I t I I I I t • I I ' I I I . ■ ■ r I ■ I • ■ r T I I • . t I LIMKOGL TO Kin KOIJTINES PRTBYl GETCH Slt3B *1E50 sov-.' JtlP STV JiR LDY RTS LDOllI «0L JSP OLUcH Lrioii-! suft STV =^OUY lil- fU-BU L uv swi r ODD LPL Tf.i oiift './'.: iirit:3 cr?] DUTCH < I t I • r nul TO 30 FC IB 70B4 ft5 24 2ei(& 6^ 20 2QB8 8S 24 20E:ft R3 00 2aBC 65 25 20BE 85 25 20CB 4C BB 20 2BC3 BB 2BC4 CO 20CS 30 FC ■2BC7 36 20CB 05 24 20Cfl ES 20 2BCC 8Si 24 20CE flS 2S 2aB0 ES 0B 20B2 06 25 20D4 4C C4 20 DEX BMI ClC LBO OBC STO nuLTO -01 ODR ODR I r LDOin tsB RDC 0D1( STO PBR JMP nuLTO 101 +B1 ( t t I I I I I 1 1 I I r I I I t I I I t I • • ' f t 1 1 I 1 r t r SUBTROCT CPL IXJ TIMES FROM ODR I t SUBR RTS DEX BHI aUBfl SEC LDR RBR SBC CPL STO OBR LDfl ODR SBCIM S00 STO ODR I HP SUBft f r I t I . ' -01 +01 +01 • I I I i I I I I ' t I I I t < . ' t I . INCREMENT OND DISPLOY GEN. COUNT 20D7 20 Ol 20DO 18 20DB FB 20DC OS 01 20BE 6S 30 20 INCG JSR CRLF CLC 5EO LCOIM «01 ODC GC 30:56 MICRO ~ The 6502 Journal November 1980 i51B 20E0 B5 30 STR GC 1528: 20E12 R5 31 LDft GC +01 153Q 20E4 B9 00 ADC in S00 1546: 20E:6 B5 31 STfl GC +BI 1B50: 2BEe DS CLD 1560: 20E9 20 95 20 JSR PRTBYT 1S7B: 2BEC fi5 30 LDft GC iSBB: 2BEE 20 96 20 JSR PRTBYT 15SB: 20F1 60 ^^ IB0B lEia: CLERR POND 1B20 163Q: 20F2 20 8E 22 a FAR J BR MOUE 1B40: 20F5 fl5 21 LDA LIB is5a 20F7 0H FISLR IGBB: 20FS 85 3D STR NN 1670: 20FH a4 20 LDY CPL 1690: 20Ff. B8 CLR DEY LIFE lT0a 20FD 30 06 Bill ZU-- HI J 1701 20FF H9 00 LURIM (U(] 1710 2101 91 24 BTfilY =1DR 1720 2103 F0 F7 BEQ CLR 1730 2105 fl2 ai LDXin tBl 17-10 2107 2B Bei 20 JSR MULTH 1750 210B CB 3D DEC in 1760 210C 10 EC BPL CLR -02 1770 210E B0 RTS 1780 1730 210F 20 01 20 ENTRUH JSR CRLF 1800 2112 fl2 BB LDXIM t0B IBIB 2114 BD IE 21 LBRRX :^T 1820 2117 2B FIB 20 JSR DUTCH IB30 21ifl Cft BEX 1040 211B 10 F7 BPL ENTRUH +05 18G0 211D 60 RTS 1BE0 21 IE 20 ENT = J STB 21 IF 3F - ? 1800 2120 20 = lesB 2121 48 = H 1SB0 2122 2C - . 1310 Z1Z3 SB •^ y 1920 2124 20 - 1530 2125 52 - R 1940 Z12G 45 = E 1950 2127 54 - T 13SB 2128 4E = N 1970 2129 45 = E 1380 212fl 20 93 20 GET JSR GETCH 1390- - 2121] C9 3S CMPltl B 2000 212F 30 02 BMI DOME 2010 2131 n9 00 LDHIM SB0 2020 2133 50 DOriE RTS 2030 2040 PLPNT SEED 2850 2B60 . 2134 20 0F 21 PLflMT JSR ENT RUN 2B7B 2137 20 2fl 21 JSR GET 2eBB 2i3ft F0 F8 BEQ PLRNT 2090 21 3C C3 30 CMPIN 2100 Z13E 30 F3 BMI DONE 2110 2140 29 07 AND IN •07 2120 2142 fifi IPX 213B : 2143 flS 22 LOR CENT 2140 2145 85 24 STR FtER 2150 2147 fi5 23 LDR CENT +01 2160 2143 B5 25 STR flBR +01 2170 214B 20 2fl 21 JSR GET 2190 214E F0 E4 BEQ PLOm 2130 2150 C9 2B CMPIM - 2280 215Z F0 05 BEQ MINUS 2210 2154 20 B0 20 JSR nuLTR 2220 2157 30 03 BMI HOR 2230 : 2153 20 C4 20 MINUE JSR SUBR 22 -to 215C fl2 02 HOR LDXin «02 LIFE 2250: 2260: 2270: 2280: 2230: 23BB: 2310: 2320: 2330: 2340: 23501 23BB: 2370: 2330: 233B: Z40B: 241B: Z42B: 24211 2430: 2440: '24B8: 2460; 247B: 2490: Z43eJ 2500: 25 la: 2520: Z53B: Z54e: 2550: 'Z&6B: Z57B1 isee: ZE90: 2E00: 2810: 2630: 2G4B: 2B5B: 2660: 26B0: 2BBB: 2700: Z71B: 27201 2738: 2740: 2750: 2760: 2770: 27B0: 2790: 2BB0; LIFE 29 IB: 28201 2B30: 2B4B: 2850: 2860: 2B701 ?B8B: 2830: 2300: 2910: 2920: 2330: 2340: 2S5B: 2960: 2970: 2960: 2390: 215E 2161 2164 2166 216B 21Bfl 216C 2IGF 2171 2173 2175 2176 217B 217R 217C 217E 218B 21B2 2184 2186 2168 ZISB 21BC 21BE 2130 2192 2194 2196 28 11 21 20 2R 21 C9 30 30 CC 29 07 85 3D 20 2R 21 F0 C3 C3 2D F0 IB 18 fl5 24 65 3D 85 24 R5 25 69 00 SS 25 A9 Bl RO 00 91 24 4C 34 21 38 ns 24 E5 3D 8S 24 R5 25 EB 0a 4C 82 21 2199 218B 219D: 213£ ZIRB 21fl2 21R5 21fl7 21R3 21 RB 21RE 21 B0 21BZ 21B4 21B6 21 B8 21BR ZIBC 21 BE 2ICB 21C1 21C3 21C5 21C8 21 CR 21CC 21CE 21 DO 21D2 21D4 21 DB 21DB 21Dft 2 IDC 21DD 2 IDF 21E1 21E3 21E5 21E7 21 EB 21Efi 21EB ZtED fiS 32 B5 33 BB C6 33 10 FB 20 8B 22 R5 21 as 3D R2 01 20 B0 2B C6 3D F0 E7 fl4 20 Bl 24 D0 04 RB 20 10 02 H3 27 91 2E 88 Ba Fl fi2 01 20 BO 20 fi4 20 Bl 24 FO BE Bl 2E C9 20 F0 04 fl3 3B la 02 R9 2C 91 2E 8B D0 EB R4 20 Bl 2E C9 20 D0 03 88 DB F7 CS R3 0D 91 2E MIN JSR ENTflUH +05 JSR GET cnpiM ■ BMI f-'Lflrn RNDIM t07 SIR NN JSR GET BEO PLRNf CMPltl BEO niN CLC LBfi RDR RDC NN STR RDR LUfi RDR +01 RDCin •00 STR RDR +01 LDRIM sei LDYln S00 STfiiy RDR J MP PLRNT SEC LDR RDR BBC NN STR RDR LDR RDR +01 BBCIM S00 JMP MIN -03 SHOW BLL OF POND SHOfl LDR STfl RTS BHOflLL DEC BPL JSR LBR STfl SHO LD>;iM JSR BEC BEQ LDY LBRIY BNE LDRIM BPL LBAIM 5TRIY DEY ENE LDXIM JSR LDY LBRIY BLO • Mtll . CMPIM BEO LDR[M BPL LQRIM STRIY DEY BNE LDY LDfllY CMPIM BNE DEY BNE I MY LDRIM STfl I Y GBP CNTG CHTG SHOflLL -Bl MOUE LIS NN S01 MULTR NN SHORLL -as CPL RDR 5H0R S2a SHOR »Z7 BUFF +02 -08 SHOM K)^ SHOMB SHOUR SHOR SB I MULTR CPL RDR bHOWt; BUFF S?0 bHOUn -02 5H0WB BUFF StIOM CPL BUFF (20 SHOWR SHOMB SBB BUFF +07 November 1980 MICRO — The 6502 Journal 30:57 3000: 21EF FI0 00 LDYIM S00 BBIB: 21F1 20 HI 20 J5R CRLF 30Z8: 21F4 CS 5H0P INY 3B3B: 21F5 Bl ZE LDfllY BUFF 3a4B- 2ir7 CS 00 CMP in S0D aasid: 21Fg F0 RE BEQ SHO 3060: 21FB 20 RB 20 JSR OUTCH 3B7ei 21FE 4C F4 21 JtlP SHOP 30Se: 3030: POST BIRTHS RND DEATHS 3iee: 31 IB; 220] 20 BB 22 POST JSR MOVE 31ZB: 22B4 20 73 ZZ js; INCP 313B: 22B7 fi9 00 LDfilM S00 31 40: 2209 B5 sa STH NN 315B: 220B R2 07 LDXIh •07 31G0T 220D BE 35 NBR LDRZX OFFS 31?0: Z20F fiS TRY 31B0; 2210 Bl 24 LDRIY ftDR 31301 2212 F0 04 BEU NB 3200: 2214 30 02 BMI HB 3210: 22 IB e:5 3B INC NN 3ZZ0-- 2218 Cfl MB DEX 3230: 2219 10 F2 BPL NBR 3240: 2Z1B B0 00 LDYIH •00 3250: 22in F15 3D LDR NN 32G0: 2211 C3 02 cnpiM ■02 3270: 2221 30 2B BMl DEBTH 3280! 2223 C9 03 CMP in S03 3230: 222E FB 24 BFQ BIRTH 3300: 2227 IB IH BPL PERTH 3310: 2223 20 V3 22 POSTR JSR INCR 3320: 222C 1)0 D9 BME POST +0G 3330: 222E 20 BB 22 EDGE J&R MOUE 3340: 2231 flS 21 LDR LIS 3350: 2233 0n RSLFI 33E0: 2234 95 3D 5TR NN LIFE 3370! 2236 38 TYR 33B0: 2237 31 24 S1HIY RDK 3390: 2239 FI2 01 LDXltl Stll 3400: 22 3B 20 B0 20 JSR NULTR 3410: 22 3E ce 3D DEC NN 3420: Z240 10 F4 BPL UDC.E 1 as 3430: 2242 60 RTS 3440: 2243 Bi 26 DEATH LDRIY POINT 3450: 2245 F0 E2 BEQ POSTR 34G0: 2247 R3 B2 LDR IN S02 3470: 2243 10 0B BPL BIRTH *0B 34 B0: 224B Bl ZB BIRTH LDRIY POINT 3430: 224 D E0 DB BNE POSTR 3500: 22 4F fia FF LDfilri SFI 3510: 2251 31 2B STRIY POINT ^20: ?253 CE 34 INC ACT 3530! 2255 F0 FC BEQ BIRTH +00 354B: ZZ57 4C 23 ZZ J MP POSTR 3E5B! 3550: UPDATE POND 3570: 35Cn]i Z25n 20 8B 22 UPDRTE JSR MOUE 39SB: 225D Bl 26 LDfllY POINT 3BBB: 22SF 30 08 Bfll RDULT SELBi 2261 C3 02 CMPIM «0Z 3620: 22E3 30 08 BMI ftDULT +04 3S3e: 2265 fS 00 BURY LDfllM S00 3640: 2267 Fa 02 BEQ ftDULT +02 3^0: 2263 ft9 01 RDULT LDHIM S01 36E0: Z26B ai 2S STfllY POINT 36701 2Z6D 20 73 22 JSR INCP 36BB: 2270 00 EB BNE UPDATE +03 3690: ZZ72 60 RTS 3700: 2273 E6 24 INCR INC RDR 3710: 2Z75 DB 02 BNE INCP 3720: ■Zd/I EB 25 INC RDR +01 3730: 2279 E6 26 INCP INC POINT 3740: 227B □0 02 BNE. INCP +BB 3750: 22711 EE 27 INC POINT +01 3760! 2Z7F BB 27 LDR POINT +01 3770: 2ZB1 C5 2C CMP LAST +B1 3780: 2ZB3 30 05 BMI MOUE -01 37^: 2ZB5 3B SEC 3800: 228B R5 2E LDR POINT 3810: 22BB E5 2C SBC LRSI 3B2B: 22BR B0 RTS 3B3B: 22SB R2 03 MOVE LDXIM S03 3B40: Z28D BE 28 LDflZX BEFORE 3850: 22 BF 35 24 STRZX RDR 3BG8: 2231 CR DEX 3B70: 2292 10 F3 BPL MCUF +02 3B80: Z234 R0 00 LDYIM >00 3BS0: Z296 60 RTS 3300: 2237 00 LND - S00 3910: 2Z98 00 ~ SB0 SYMBOL THBLE 3300 3450 ACT 0034 RDR 00i;4 RDUL 1 ^:^r,j BEFORE 3028 BIRTH 22 4B BUFl 002E ilUf'Y Z'i'f.E i.LMT 3022 CLEBR 2BF2 CLR 20F(. CNTG eeiia CPL d020 CRLF 20R1 DERTH 2243 DONE 2133 EDGE 222E END 2297 EMTRUH 210F ENI 211E GBP 3032 GC 0030 GETCH 2B39 GET 212H NOR ilBC INCA 2273 INCG 20D7 INCP 2279 LAST a02C LIFE 2000 LIS BB2I MINUS 21S3 MIN £1BB MOVE 22 SB MULTfi 20B0 NB 2218 NBR ^20D NH 00 3D OFfS 0035 OUTCH 2aft8 PLRNT J134 POINT 002B POND 002A posr 2201 POSTR i229 FRTBYT 209B SflUY 00 3E EHOA 21BC SHORE L 21 3E SHOP ZIF4 SHOW 21 CR SHOWfl ZlEft SHOWB riDA SHO 2 IBS STAR Z07D BUB A ZBC4 UPDATE 225R ■k **** ********•••**** •*** * K A S T * * M 1 M Y M 1 M * * * * END FRUSTRA TIONH • •k * FROM CASSETTE FAILURES * * * * • * o^ * • PERRY PERIPHERALS HAS THE HDE SOLUTION INIDI5K SYSTEMS (5" and 8") CLAIMED HDE SOFTWARE ^ssembl Br, Dynamic Debugging Tool, * it 'ext Output Processor, Comprehensive Memory Test it doming Soon- -HDE BASIC * ^ PERRY PERIPHERALS S-100 PACKAGE * * Adds OmnidiBk(B") to * * Y our KIM/S-100 System • ^# Construction Manual— No Parts ^« FODS & TED Diskette ^9 $20. -<-$2. postage& handling.fNYmidanta . add 7% tax] (•pw:jfy for 1 or 2 drive ■vilam) ■i, Place your order with: PERRY PERIPHERALS P.O. Box 924 Miller Place, N.Y. 11764 (516)744-6462 ■* if ■* -* •* * Your Fult-Lina HDE Diabtbutor/Exportw * * * * * * *■* ***♦•***••********•*•** Natural Organic Apple Software Educational, intriguing and challenging. . .naturaliy! Apple Fun We've laken five o( our mosl popular pro- grams and combined Ihem into one tremen- dous package full of fun and excilement. This disk-based pacisage now offers you these great games; Mimic - How good is your memory? Here's a chance lo find out! Your Apple will display a sequence of iigures on a 3x3 grid. You must respond with the exact same sequence, within the lime limit. There are tivedifferent, increasingly difficult versions of the game, including one Itiat will lieep going indefinitely, tvlimic is exciting, last paced and challenging- fun lor all' Air Flight Simulalion - Your mission is to take oti and land your aircraft without crashing. You're flying lilina: on instruments only. You start with a full tank of fuel, whicfi gives you a maximum range of approximately 50 miles. The computer will constantly display updates of your air speed, compass headmg and ailllude. Your mosl important instrument is the Angle of Ascent/8anh Indicator. II will tell if the plane is climbing or descending and whether banking into a right ol left turn. After you've acquired a few hours flying time, you can try flying a course against a map or doing aerobatic maneuvers. Get a little more flight lime under your belt and the sky's the limit' Colormaster — Test your powers of deduclion as you try to guess the secret color code in this Mastermind-type game. There are two levels of difficulty, and Itiree options of play to vary your games. Not only can you guess the computer's color code, but il will guess yours! It will also serve as referee in a game tietween two human opponents. Can you make ancl break the color code . . ? Slar Ship Allack-Your mission Is lo protect our orbiting food station satellites from destfuction by an enemy slar ship. ¥ou must capture, destroy or drive off the attaching ship. If you tail, our planet is doomed. Trilogy — This exciting contest of logic has its origins in the simple game ol lic-tac-toe. The object of the game IS to place threeol your col- ors in a row into the della-like, multilevel display. The rows may be horizontal, vertical, diagonal and wrapped around, through the ■'third dimension". Your Apple |or human oppo- nent) will be trying to do the same, and there are many paths to victory. You can even have your Apple play against itself! fylini mum system requirements are an Apple II or Apple II Plus computer with 32K ol memory and one minidisk dnve. Ivlimic re- quires Applesoft in ROM, all others run in RAM or ROIul Applesoft. Order No. 0161AOS19.95 Paddle Fun This new Apple disk package requires a steady eye and a qyick hand at the game pad- dles! We've included lour dillerenl games to challenge and amuse you They include: Invaders- 'I'ou musi destroy an invading fleet Of 55 flying saucers uvhile dodging the carpel of bombs they drop. Keep a wary eye lor the mother ship directing the incursion. Vour tiomb shelters will help you - lor a while. Our version of a well known arcade game! Re- quires Applesoft in ROM. Howltzer-This is a one or two person game in which you must fire upon another howitzer position. This program is written in HIGH- RESOLUTION graphics using different terrain and wind conditions each round lo make this a demanding game. The difficulty level can be altered to suit the ability ol the players. Re- quires Applesoft in ROM. SpaceWars-This program has three parts: (1) Two flying saucers meet in laser combat — for two players. (2) two saucers compete lo see which can shoot out the mosl stars - lor two players, and (3) one saucer shoots the stars in order to get a higher rank— lor one player only. ReguiresApplesofl. Golf- Whether you win or lose, you're bound to have fun on our 18 hole Apple golf course. Choose your club and your direction and hope to avoid the sandtraps. Losing too many strokes in the water hazards? You can always increase your handicap. Gel of f the lee and on- to the green wilh Apple Golf. One of its nicest features is you'll never need to cancel a golf dale due lo ram. Requires Appjesoli. The minimum system requirement lor this package is an Apple II or Apple II Plus com- puter with 32K Of memory and one minidisk dnve. Order No. 0163AD S19.35 1234567890% Math Fun Change an Apple computer into a mathematics tutor and change boredom into enthusiasm with the fvlath Fun package. Using the technique ol immediate positive remloice- ment, students can improve their math skills while playing a game' with: Hanging — A little man is walking up Ihe steps to Ihe hangman's noose. But YOU can save him by answering the problems posed by Ihe computer. The program uses decimal math problems Each correct answer will move the man down Ihe steps and cheat Ihe hangman. Spellbincler - You are a magician competing against a computenzed wizard. In order to cast dealh clouds, fireballs and other magic spells on him, you must correctly answer questions about using tractions. Whole Space — Pilot your space craft lo attack the enemy planet. Each time you give a correct answer to the whole number problems posed by the computer, you move your ship. But lor every wrong answer, the enemy gets a chance to fire at you. Car Jump -Make your stunt car jump the ramps. Each correct answer will increase ttie number of buses your car must jump over. These problems involve calculating the areas of dillerenl geometric figures. Robot Duel -Fire your laser cannon at the compuler's robot. II you give the correct answer lo problems on calculating volumes, your robot can shoot at his opponent. If you give the wrong answer, your shield power will tie depleted and the computer's robot can shoot at yours. Sub Allack — Practice using percentages as you maneuver your sub into Ihe harbor. A cor- rect answer lets you move your sub and fire at the enemy fleet All of these programs run in Applesoft BASIC, except Whole Space, which requires Integer BASIC. Order No. 0160AD $19.95 TO ORDER: Look for these programs at the dealer nearest you. II your store doesn't Stock tnslant Software send your order uvith payment to: Instant Software. Order Dept., Peterborougf!, W.H. 03458 (add $1,00 for handling) or call toll-free 1-800-258-5473 (VISA, MC and AMEX accepted!. Instanf Software Prices subject to change without notice. PETERBOROUGH, N.H. 03458 603-924-7296 GALAXY SPACE WAR I Galaxy space War 1 (WAR1I is a game ol strategy m which rlie player has com plele ccnircl of his space fleet's laclical maneuvers Each fleet battles its way Icward ttie opponenlB galaiy in an allempi lo deslroy it and win the war WAR1 simulates the actual enuifonmeni encoiinlefeO in a space war between iwo galasies. Oplimum use Is made of Apple's high resululion [;r3phics (MIRES) and cnlnrs in displaying the twinkling stars universe, the colored ships ol each fleet. Inng range senscrs coinred i Hum mall ons, and Ihe alternating blinking colors used m lialtles between ships Complementing HIRES are (he sounds of «ar produced by Apple's speaker WAR1 is played Between Apple and a player or belween two piayers You may play wilh total knowledge of each others fleet or only ships sensor knowledge of Ihe opponents lleet Each player builds hi; starting lleet and adds (o il during the game This tiuilding process ccnsisis of creating the size and shape qI each ship positioning il. and then ailocaling the total amount of energy lor each ship During a player's I urn he may dynamcially allocate his ships total energy between his screen /detect! on and allack/moye parlilions. The percentage ol the tolal energy allocated to each partition determines ils characteristics The scree n/delectipn part 1 1 ion del ermines how much energy is in a ship's screens and the delection sector range of its shori range sensors The attack/move determines the amount of energy the ship can attack with, its attack sector range, and the number of sectors it can move in normal or hyperspace When an enemy ship is detected by short range sensors, it is displayed on the universe and a text enemy report appears. The report identities the ship, Ms position. amount ol energy in its screens, probable altack and total energy, a calculated iJe- tection/attaclt/move range, and si^e ol the ship Also shown is the number of days since you last knew these parameters about Ihe ship When a ship's long range sensor probes Indicate the existence of an enemy presence at a sector m space, this sectnr IS Illuminated on the uniuerse. Ah enemy ship Is attacked and destroyed with attack energy. If your attack energy breaks Ihrougb his screens, then his altack energy is reduced by two units of energy for every unit you attack with A text battle report is output after each attack TTie program maintains your ship's data and the latest known data about each enemy ship. You may show either data in text reports or display the last known enemy posi- tions on Ihe universe. You can also gel battle predictions between opppsing ships. The text output calculates the amount ol energy requited lo destroy each ship tor diftBrent energy allocations. APPLET II. 48K, APPLESOFT 4» GALAXY ROM CARD. DISK II DOS 3.2 X DEPT. MIS WAR1 DrSK & MANUAL ...$39.95 P.O. BOX 22072 (CA residents add E% sales tax| SAN DIEGO, CA 92122 Write or call for more information [714] 452-1072 OyBtema Dflcifllon Sytlvmi P.O. Boi 13006 Oanlon. TX 78203 INDEXED FILES teo ISAM-DS IS an inlegrared 5E1 ot routines tor the creation anti manipulauon of indexed tiles ISAIVI-DS provides capabilities camparablE To those on large mair>'iames You can rapidly retrieve records by key value or partial key value Irefrieves any record in a 200 record tile, 60 char/record. Jn less Ihan 3 secortds compared lo a mammum of 38 seconds for a DOS sequen- tial 'ilet Files nevei have Eo Pe reorganized. Duplicate key values may be used Records may also be retrieved in sequence. ISAM-DS routines are easily integrated mto ApplesolE programs - They use less than 3K RAM plus an indoif table. Requires. Disk. Applesoll STRUCTURED BASIC «K PBASIC-DS IS 3 sophislicaterj preprocessor lor s true lured BASIC. Now you can gam me power ot PASCAL- like logic siruciures ai a traction ol Ibe cost. Use ah regular BASIC slatemenis plus M commands and 11 new sialemenis/sirocloras (WHILE, UNTIL, CASE, etc ) PBASIC-DS can be used to develop INTEGER or APPLESOFT programs. II is a great way to learn anfj use structured logic concepts. Requires: Disk. Applesoll (48K ROM! DATA ENTRY SZ5 FORt^-DS IS a system ol programs and loulines thai assist in the entry, ediling and display ol data Describe screen toimats by simply lypng them on the screen Axiomatic range tests lor input data. Display ediied numeric values with commas inserted, etc Dump the screen contents to a printer. Routines are easily incorporated mto Appleso+l programs Documentation included Reauires' Disk. AppiesotH32K ROM) tlflKAt F«(idanti add S% e>hI lAdllM.DDtarFDisiflnMaitl 'Appl« II IS A i«Bi4r«'«d Tradsmarh o' tnv ADplaCompuiBi Co. DEPRECIATION PROGRAM 5 DEPRECIATION RATES UPT0 99YRTERM RECORDS UP TO GOO ITEMS ON DISK UP TO $1 MILLION FOR EACH ITEM REPORTS EACH MONTH, QUARTER, OR ANNUALLY BONUS DEPR., INVESTMENT CREDIT PRO-RATES DEPRECIATION UPDATE RECORDS EACH YEAR EOUIPMENT INVENTORY FISCAL YEAR BASED CONVERT METHODS ANY TIME ^^» AN ACCOUNTANTS DREAM ..i>iL APPLESOFT 32K MIN.^'f,£2»Siaiirsi50-00 HANDBOOK $5.00 ^■>.* MONEYDISK 516WELLSIANWAY RICHLAND, WA 99352 VISA &M/C USERS -CALL 509 9439004 VISA- APPLE 15 A REGISTERED TRADEIHARK OF filiPLE COMPUTER INC- WA Re&idBntt. add 5% tate^ lax DEALER INQUIRIES INVITED ASCII EXPRESS II Bv Bill Blue THE MOST COMPLETE COMMUNICATIONS PACKAGE FOR THE APPLE [1 AVAILABLE This professional terminal system includes: . Full tipper/lower case support . Uploaid/download files lo ANY type of online computer • Built-in line editor for tiles • Keyboard macros tor efficient operation Recommended system requirements include a 48K APPLE II with disk, FP ROM or language card, and Micromodem or Comm- catd- $59,95 plus 6% for Calit- residents Available from your local computer store or: sautnuuesCeRn data svstems P.O- BOX 582-M . SANTEE, CA 92071 (714) 562-3670 step and Trace for the APPLE II Plus If you miss the Step and Trace of the original APPLE il on your new APPLE ii Plus, here is all you need to restore it. Craig Peterson 1743 Centinela Avenue #102 Santa Monica, CA 90404 Apple Computer's new APPLE II Plus Is a pretty good machine. It has Improved editing features over those of the standard APPLE II and a better cursor control and stop list feature. And it's really nice to fire up the machine arid be right in BASIC or DOS, or better yet, to be In the middle of a turn-key type program. Furthermore, Applesoft BASIC is a standard feature, and I'm partial to it over Integer BASIC. But all of these improvements didn't come for free. There's only so much room in the ROM monitor, and certain of Its features had to be sacrificed to make room for the new additions. As a result, the machine language sfep-and-trace capabilities of the older APPLE II ended up on the cut- ting room floor. A lot of people will probably never miss step and trace. Unless you are into assembly language program- ming, you probably don't need them. But if you do any assembly language programming, step and trace can be invaluable. They allow you to step through each machine language instruction, displaying all of the 6502 registers as you go atong, so you can find any errors that might exist in the program, or even just see how the program works. Step does this one Instruc- tion at a time, and trace does it con- tinuously, without stopping (unless a break Instruction is encountered). Well, fear not, APPLE II Plus owners, Step-n-Trace is here. The Step-n-Trace (S&T) program essen- tially just adds the step-and-trace functions to the existing monitor of your APPLE II Plus. The operation and use of the monitor is identical to that of the original APPLE monitor. Type a hex address follow- ed by one or more 'S's, to take steps through a program from that ad- dress. To trace, type a hex address followed by a 'T', to begin tracing from that address. An improved feature of S&T over the original APPLE trace is that all you have to do is press any key (for example, the space bar) to stop the trace. To continue tracing, type a 'T', and trace will continue from where il stopped. Or you can type an 'S' to take only one step. The prompt character used for S&T is an inverse '*' so you can distinguish It from the normal APPLE monitor. S&T also in- cludes all of the normal monitor commands in addition to step and trace. In fact, it actually uses many parts of the existing monitor to do its work. To use Step-n-Trace, first load it and then type 'CALL 768', or 'BRUN' it from your disk, if you have one. You will then have all of the monitor commands at your disposal, in- cluding step and trace. To get out of the program, just press 'RESET' on your APPLE 11 Plus, or use 'CTRL', 'C, or 'CTRL' 'B' and you will end up In BASIC. Since the program resides in hex address $300 to $3E9, it loads over some of the DOS address pointers from $3D0 to $3E9. Generally, this doesn't cause any problems for me. However, this can be avoided by moving it to some other area ol memory; but the jump addresses in lines 590, 650, 730, 1100, 1580, and 1590 will have to be revised accord- ingly. The assembler listing for S&T makes use of most of the same labels as the APPLE monitor to make It easier to relate what's hap- pening with the old monitor. At this point, I should mention that the step-and-trace functions from the same problems as the original APPLE monitor, in that, under certain conditions, the stack register will be displayed with an in- correct value. When this happens, for example, after JSR or RTS, the display will be corrected after the next instruction. Also, if the pro- gram manipulates the stack with the use of TXS instructions, the ac- tual operation will probably be in- correct. Lastly, with DOS in effect, when a program is traced through the changing of an I/O hook (usually $36 or $37) the program trace will loch up because the output will have a partially incorrect jump indirect address, and your trace will fall off the edge of the earth. The frailties mentioned above are not nearly as restrictive as they may seem. All in all, S&T is a useful utility. For those of you who have read thus far, but don't really plan on do- ing any assembly language pro- gramming, here is how Applesoft works. First load Step-n-Trace and then enter the following BASIC pro- gram; 10 CALL 768: PRINT ■'HELLO" 20 END November 1980 MICRO — The 6502 Journal 30:61 Next type 'RUN', and you will be rewarded with the sound of the bell and an Inverse '*' prompt character, telling you that you're in S&T. Next type 'FF58S'. From now on, each 'S' you type will step you through the operations of Applesoft. The first 'S' should display 'D823-4C D2 D7JMP $D7D2' on the screen, followed by the contents of the registers. This is the running return to Applesoft. As you 'S'tep or 'T'race through the in- structions, you will see the colon {$3A), the print command token ($BA), the quotation ($22), the characters of the word 'HELLO' ($d8,45,4C,4C,4F) and more pass through the A (accumulator) register, as Applesoft analyzes your program line. With some study you'll begin to understand what Applesoft Is doing. With some effort, you can actually find where the subroutines are located for the 'SIN'. 'SQR', or any other function you're interested In. AM of this is accomplished with the help of S&T. So, If you're doing any assembly language work on an APPLE II Plus, S&T can be of great help. If you're just interested in seeing how things actually run inside your APPLE, Step-n-Trace can open a lot of in- teresting doors. Anyway, have fun, and If you find out anything in- teresting, write about it. 0010 ■.ikt.*i.t******.***t.»»t.X**t.Xt.X*t*.t** 033F D0F8 07O0 ENE CHRS WfIT FHDf-CHRB 0020 ;* STEP- ■H-TRflCE » 0341 20BEFF 0710 JSfi TSUB END. CALL SUB 0030 :* BV » 0344 A434 0720 AGIN LPY *YSAU RESTORE Y 0040 u CRAIG PETERSOH * 0346 4C0E03 0730 .J MP NXTT GET NX! COMMAND 0050 :> PtURUARY 1980 * 0349 2075FE 0740 STPZ JSR AlPC AIiR 10 PC 0060 :* » 034C 20DOF 9 0750 STEP JSR PISO lAhE BNE STEP 0070 :«fi PROGftAM TO FURNISH THF APPLF* 03 «F 68 0760 PL A ADJUST TO USER 0080 i* n . Piub uni- 1 THE STFP ^ [RACF* 0350 B52C 0770 ST A *RTNL STACK AND SAUE 0090 ;t l":rtff,bLll.llIES OF THF STANPARn* 0352 6B 0780 PI. A RTN orift 0100 :« APF'Lt 11 X 0353 a52D 0790 STA *RTNH 0110 ■.t».*»*llll>.»t-IKt******Zt»*»**»l.***%)l** 0355 A208 OBOO LBX 08 0120 : 0357 BriE103 OBIO xniN LDA INMl.X INIT XFO ARFA 0130 RTNL .IiL 002C RETURN ADRFS LO 03 5 A 953C 0B20 STA *XHT .X 0140 RTNH .[IL 002D RFTURN ADRES HI 035C CA 0630 DEX 0150 LGTH .IiL 002F LHC.TK/DSPI ACMNI 035LJ D0F8 0B40 BNE XOIM 0160 FKhlP .DL 0033 PROMPT CHfiRACTR 035F A13A 0850 LDA (PCL pX) USR OPCUBF BYTE 0170 VSftU .ill. 0034 PLACE TO SAVE Y 0361 F02C 0860 BEQ XBRK speshl if break 0180 PCL .DL 003A PROGRAM c:mtr I n 0363 A42F 0870 LEY «LGTH LGTH FROM POSSY 019O PCH .DL 003B PROGRAM CNTR HT 0365 C920 0880 CMP 20 02OO XOT .DL 00 3 C USR INSTRtlCIinN 0347 F043 0890 BEQ XJSR HANDIE .ISR.RTS< 0210 STftr .DL 0048 PROC STATUS REG 0369 C960 0900 CMP 60 JMP,JMP( ). 0220 KBRIi .III COOO KEVBOARIi REGSTR 036B F02F 0910 BEG XRTS » RTI SPECIAL 0230 iNSn .£iL F3B2 [iSPLAY PGM CNTR 036D C94C 0920 CMP 4C 0240 0ISA -HI. FHHO [IISASFMBL TNSTR 036F F046 0930 BEO XJMP 0250 flDJ2 .DL F954 flnJUST PC - 2 0371 C96C 0940 CMF' 6C 0260 fiDJ3 .[II F9r,6 fiUJUSI PC - 3 0373 F043 0950 BEQ XJAT 0270 BECH .DL FAD7 nSPl.BY USR REGS 0375 C940 0960 CMP 40 0280 RGIiS .DL FADA DISP RfGS-NO CR 0377 FOIF 0970 BEO XRTI 029O GF1L .DL- FD67 GfcT INPUT LINE 0379 291 F 0980 AND IF 0300 BLl .Dl FFOO 111 ANk ROUTINE 037 B 4914 0990 EOR 14 0310 AlPC .DL FF75 COPY Al TO PC 037D C904 1000 CMP 04 COPY USR TNSTR 0320 BELL .DL FF3R RING THE BELL 037F F002 1010 BED X02 TO XEO AREA 033O RSTR .D[ FF3F RESTHR USR REGS 03ai B13A 1020 XOl LDA ( PCL i . 1 0340 9M( .Dl FF4A SAVE USER REGS 0383 993C00 103O X02 STA xni .V 0350 GElh .DL FfA7 GET ITEM.NONHEX 03S6 as 1040 DEY 036O T3UH .UL FFBF PUSH & GOTO SUB 0387 lOFB 1050 BPL XQl 0370 TSBi .Dl FFC5 HfiNTilF The MODF 0389 203FFF 1060 JSR RSTR RESTDR USR REGS 0380 ZMDO .Dl FFC7 ZERU THE MOIiF 038C 4C3C00 1070 JMP XOT XEG USER DP 039O GHRI .Ul KFni: CHARACTER TABI F 038F 2082F8 1080 XBRK JSR iNSri PRINT USER PC 0400 ; 0392 20IIAFA 1090 JSR RGBS AND REGS 0410 .(JR 0300 0395 4C0003 1100 JMP STRT THEN GO TO STRT 0+20 : 0398 18 1110 XRTI CLC 0300 [IS 0430 STRT CLD SET HEX MnHF 0399 68 1120 Pi. A SIMULATE RTI 0301 203SFF 0440 ■JSR BELL. RING THAT CM IMF 039A a54S 1130 STA »STAT 0304 fl92fl 0450 nOMl 1 na - «' I OAD INVERS '*' 039C 68 1140 XRTS PLA RT3 SIMULATION 0306 3533 0460 5TA *PRhP i sruR IN PRMPT 039II a53A 1150 STA «PC1 0303 2067F[i 0470 JSR c:ftl READ A 1 INF 039F 68 1160 PLA 030B 20r.7FF 04BO ■ ISR 7M0D SET MGDE A Y =0 03A0 B53B 1170 PCN2 STA *PCH 030E 20fi7FF 0490 Nxr 1 JSR GETN GET TTFM.NONHfX 03A2 A52F 1180 PCN3 LPO »LGTH UPHAT pl; by 1 EN 0311 8434 0500 STY JYSAM CHAR IN A-REG 03A4 205 6F 9 1190 JSR OBJ 3 0313 C9EC 0510 try:-; CUP OEC IS IT STEP' 0307 843B 1200 STY «I(H 0315 FOOB 0520 BEO ENT2 !F=3TEP.G0 ENT2 03A9 IB 1210 CLC 0317 C9ED 0530 TRY I ChP OED IS IT TRACE'' 03Afl 9014 1220 BCC NEUP 0319 DOOF 0540 BWt" TRCR IF= . TRACE. TRYCR 03AC 18 1230 X.J5R CLC 031B ODOOCO 03^,0 LDA KBRLi WAS KEY PRFSSIi' 03AD 2054F9 1240 JSR AD J 2 UPliATt" PC AND 031£ 3024 0560 Bill A[:iN hFY ON. --.AGIN 03B0 AA 1250 TAX PUSH 0NU1 STAK 0320 C634 0570 DEC *1SM HAKES STEP RFT 03B1 93 1260 TYA EOR JSR 0322 20C7FF 0580 ENT2 .JSR ZMOD ENTRY FOR STEP 03B2 4B 1270 PHA SlMUl OTTON 0325 204903 0590 JSR STPZ GO STEP OUT 03B3 BA 1280 TXA 0328 lOlfl 060O EPL AGIN RTH TD INP I.INF 03B4 43 1290 PHA 032A C9C6 061O TRCft CUP 0C6 IS IT A CRT 03E5 0002 1300 LHV 02 032C D009 0620 DM hCMD IF-.CR.TRY MCMD 03B7 18 1310 XJMF- CLC 032E 20C5FF 063O .ISR TSBI 03 &8 B13A 1320 XJAT LDA tICI V,T 0331 2000FF 0640 JSR Bl.l HNDL CR AS 61. NK 03BA AA 1330 TAX LUAD PC FOR .IMP 033* 4C0403 0650 JMP CONT RETURN TO CONT 03BB BB 1340 DEY t. (IMP) 0337 A017 0660 ncnii LDY 17 TRY MONITR CMIiS 03BC B13fi 1350 LDA (PCL ).Y SIMULAMON 0339 88 0670 CHRS DEY 5ERCH MON CHARS 03£iE a63B 1360 STX *PCH 033fi 30C4 0680 Bdl SIR! NOT FND.GO STRT 03CO 8530 1370 NFUP STA *PCL 033C II9CCFF 0690 CMP CHRT.' i CMP WITH TABJ E 03C2 B0F3 1330 BCS XJMP 30:62 MICRO ~ The 6502 Journal November 1960 03C4 C^E^. ^ or AflK APPLESOFT 1 Disk Drf-e Nikrom Technical Products MICHOUOP€M 11 \a Fregialeifld TijiOomart. of D.C HAVES ©lliorf's! WIZARD 1 is a well done and excitiDg Hi- Res game usins over 100 Hi.Res pictures. WIZARD 1 requires 48K, Applesoft Rom, and Disk. As you explore the caverns and castles (each locale is done in Hi.Res) looking for treasure, you must battle (he one-eyed, two-thumbed loikie; fmd the grezzerlips' sword; visit the snotgurgle's palace and get through the domain of the three.nosed ickyup plus more! Wizard Ion Disk $19.95 SEIi yOLJR LOCAL DEALER ORSENDCHhCKSTO HIGHLANDS COMPUTER SERVICES 14422 S.E. 132nd Renton, Washington 98055 (206)228-6691 Washin^on residenls add i-3^9 sel?^ I3f.- ApplcaoD and Apple are regislcrcdlrademarki of Apple Compulfrs, Inc. J ^ \ llllilll Tlje Cailt'HS UtOU "HBI DlFfl«HT ltaV5 PROGRESSIVE SOFTWARE Presents Software and Hardware for your APPLE ■C^ ik ^ ROSTER -Cz -^ ^ 'A complete package for Educators! Rosier is a general purpose disk-based record-keeping program fof leacners at all levels. It allows Instructors to create and change class rosters label, enter and change test or assignment scores, sort the roster based on student number, student name, or rank in class, assign ctiaracter or numeric grades based on any of five criteria (raw score, percent, rank, percentile rank or Z-score) and Lists scores, totals (or averages), and/or grades accord- ing to any of these options. Roster on Disk (only) $49.95 plus $4.95 postage and handling. Written by Douglas B. Eamon, Ph.D. -^ -Cri^ FILES i^ ^ -^ 'Builds Serial Files "Changes Serial Files to random access Files "Adds to End of Serial Files ■Record insertion and deletion anywhere in Serial File "Move individual records or blocks of records within Serial Files. A file manipulator. $49.95" SUPER SORT & SEARCH A free-form data-base pkg. which allows the User to define fields per record. As the data Is loaded in it is automaticaily sorted. Can also merge together files or allow key sort entries. Will sort out a particular fieid, do a generic search and/or searcli tor a specific piece of data. Will allow each particular record or records to be printed. $69,95'* ... vu ^., ... ' Accepts data from VISICALC* * Relocates data and names ' Corrects data and names • Creates an out file that can be loaded into VISICALC $49.95*' **• VU#2 **• Same as VU #1 except it will operate automatically to do repetitious functions, such as payroll. $59.95*' ••' VU #3 ■" Includes VU #1 and VU #2. Will load data from any pro- gram's array statement and load it into VISICALC*. (Will also do the reverse.) $69.95* * Written by MARC GOLDFARB ' VISICALC is a Trademark of Personal Software, Inc. "ADD $4.95 postage & handling tor each of above (VU #1, VU #2. VU #3). HARDWARE LIPSON LIGHT PEN - 15 programs on disk. Plugs directly Into game I/O. 90 day guarantee on pen. Include $3.00 postage S handling. $29.95 TOUCH TYPING TUTOR — Teaches typing. Indicates speed and errors made. Finger Builders; General Typing; Basic Language and User Supplied. Diskette. (Applesoft or Integer}. Written by WM. MASSENA $19.95 BOWLING — Multi-player program. Various skill levels. Sound effects. Frame by frame results and total score displayed. Also, on same diskette, TiC-TAC-TOE — Col- or graphics. Announces winner. Written by ED HOWERTON $19.95 KNIGHTS — Keyboard game. Using Chess Knight moves, change KNIGHTS to their matching half board. Also, on same diskette, SOLITAIRE — Old European peg game. Finish with last peg in center. Written by CHARLES B. SMITH $19.95 GAF UTILITY PAK I - 4 programs. File Compare — compares 2 programs; reports dif- ferences to screen, printer, or disk file. Menu — one keystroke program execution. Applesoft & Integer Sorts — Super fast machine language sort for integer basic, Convert-to-Text — Turns applesoft and integer pro- grams into TEXT files. Written by GARY A, FOOTE $19,95 GAF UTILITY PAK 11 — 3 programs Multiple Disk Catalog — Creates master catalog list; can be processed by APPLE'S FILE CABINET, (File cabinet report tiles incl. for producing lists by volume, name, type or size,) File Cabinet Fast Sort — Improves File Cabinet Sort by factor of 10-20, File Copy — Copies any type files from one disk to another. Written by GARY A. FOOTE $19,95 MATH DRILL I & II — Decimal arithmetic problems and fraction problems (Add,, Subtr., Multi., Div., or mixed). User selects type o1 operation and degree of difficulty, (Gr, 1-7) Written by ED HOWERTON $19.95 FOREIGN LANGUAGE DRILL (Spelling Drill I) — Aids in spelling and word definition skills. User input. Displays randomly selected word and waits for User to enter cor- rect spelling. Contains review function. Written by ED HOWERTON $19.95 TO ORDER Send Check or Money Order to: P.O. Box 273 Plymouth Meeting, PA 19462 PA residents add 6% sales tax. POSTAGE AND HANDLING PIsBse add 11,50 tor the first Item and $1,00 for each additional item, U,S. and foreign dealer and distributor inquiries invited All programs require IE K rnemory unless specified AIM 65 File Operations: Writing Text Files with BASIC The value of BASIC is greatly enhanced with the capability of writing text files. The techniques and programs required are presented here. Christopher J. Flynn 2601 Claxton Drive Herndon, VA 22070 In an article published in MICRO, July 1980 {26:61), 1 presented a sutjroutlne which made AIM 65 text files accessible to BASIC. The capability to read text files with BASIC has satisfied many of our re- quirements. I also hope that the subroutine has been of help to other AIM 65 users as well. There are, however, many applica- tions which require the capability to write text files. Therefore, 1 have developed a second machine language subroutine to meet this need. This subroutine provides a means for creating AIM 65 text files directly from BASIC. Using this subroutine, you can store any kind of data on tape-character strings or numbers. With this subroutine you can also use BASIC to write other BASIC programs! In fact, our sam- ple program will do just that. As was the case with the earlier text file input subroutine, the text file output subroutine is both ROMable and completely position independent. Don't be surprised if you see sections of code from the input subroutine duplicated in the output subroutine. I have tried to emphasize ease of use above other factors. The text file input and output subroutines handle all the file operations that will normally be re- quired. However, I must point out one restriction at the start. A BASIC program cannot have an input file and an output file open at the same time. If a file must be updated, the entire file must be read into memory, modified, and then written back to tape. Therefore, update pro- cessing is restricted to files which will fit entirely in memory. However, this restriction is not really too bad, since update processing must be done this way, if you only have one tape recorder connected to your AIM 65. Approach The AIM 65 itself creates text files by first invoking the monitor routine WHEREO. WHEREO establishes Ihe tape recorder as the active output device, obtains a file name, and ob- tains a tape drive number (1 or 2). Each time a character is to be writ- ten to tape, AIM 65 will invoke the monitor routine OUTALL. If BASIC is going to write text files these same functions must be performed. I have designed a machine language subroutine which allows BASIC to create text files. The text file output subroutine follows the convention established by out text input subroutine. The BASIC pro- gram must place the text line (or record) in the character string variable A$. Next, the BASIC pro- gram invokes the USR function, the machine language subroutine locates A$ in BASIC'S memory and writes the contents of A$ to tape. After AS has been written, control is given back to BASIC. In this subroutine, I have used the capabilities of the USR function to pass data both to and from the machine language program. The argument of the USR function, (which BASIC passes to the machine language program) con- tains the number of bytes of data to be written from A$. In other words, you can set up A$ as an 80 byte string and write the first 25 bytes one time, the first 50 bytes the next time, and so on. Conversely, the machine language program passes data the other way— to BASIC. The value returned by the USR function indicates whether or not the write operation was successful. AIM 65 users will note other similarities to our approach to reading text files. The AIM 65 will be put In the tape mode only for as long as it takes to write a record. Thus, the AIM 65 display is available as an output device between write opera- tions. Data formatting considera- tions are simple: put what ever data you want into AS and write it. Loading the Subroutine The hex dump of the machine code is shown in figure 1. In our system, the subroutine resides at location $7CA4. Since the subroutine is position independent, you may relocate it anywhere in memory without having to change a single byte of code. If you prefer entering the code in- struction format, the disassembly listing is included as figure 2. Just be careful of the absolute ad- dresses which show up as operands of branch instructions. November 1960 MICRO — The e502 Journal 30:65 Before testing out the subroutine, there is one address which your must check. It may vary from one version of the BASIC ROM to another. The machine language subroutine uses a BASIC subroutine to convert the USR argument from a floating point number to an integer. The address of this subroutine, not the subroutine itself, is contained in locations $B006 and $B007 of the BASIC ROM. Use the AIM 65 monitor to examine these locations. If they contain $FE and $BE respectively, then no changes are required. If they are different, however, you must modify the machine language subroutne. In this case, simply place the contents of location $B006 into location $7CF1, and place the contents of location $B007 into location $7CF2. All we are doing is telling the machine language subroutine where the BASIC floating point to integer con- version code is located. Once your have loaded the subroutine and safely stored it on tape, you can initialize BASIC, Since the subroutine requires 148 bytes, you will have to account for this when responding the the MEMORY SIZE prompt. If you have a 4K system and you are only using the text file output subroutine, MEMORY SIZE would by 4096 minus 148 or 3948. If you are using both the text file input and output subroutines, MEMORY SIZE would by 4096 minus(148 + 164) or 3784. Procedure Now we're ready to go. The pro- cedure for writing text files consists of the following four steps: 1. Open the file 2. Write a record 3. Test the return code 4. Close the file. If you recall, out text file input subroutine closed the input file automatically. The text file output subroutine is different. It requires you to explicitly close the output file. This is necessary in order to make sure that the last block gets written to tape. We wili illustrate these steps by going through a sam- ple program. Our sample program will generate BASIC DATA statements. We will write these DATA statements to tape and then show how they can be appended to a BASIC program, this is one ap- proach to saving and reusing data. Step 1: OpBn the Flh An output file is opened by POKE- ing location $F7 (247 decimal) to zero. 10 POKE 247,0 M» = = 7CA4 AD 13 A4 46 < > 7CAS A5 75 85 FO < > 7CAC A5 76 85 Fl < > 7CB0 A5 77 C5 FO < > 7CB4 DO 12 A5 7 8 < > 7CB6 C5 Fl DO OC < > 7CBC AO FF A2 FF < > 7CC0 6S SD 13 A4 < > 7CC4 8A 6C 08 BO < > 7CC8 AO 00 Bl FO < > 7CCC C9 41 DO 07 < > 7CD0 ce Bl FO 09 < > 7CD/1 80 FO OD 18 < > 7CD6 AS FO 69 07 < > 7CDC 85 FO 90 DO < > 7CE0 E6 Fl DO CC < > 7CE4 AO 02 Bl FO < > 7CE8 99 FO 00 C8 < > 7CEC CO 05 DO F6 < > 7CF0 20 FE BE A5 < > 7CF4 AC DO C5 A5 < > 7CF8 F7 DO OA 20 < > 7CFC 7 1 E8 E6 F7 < > 7D00 AD 13 A4 85 < > 7D04 F6 A5 F6 8D < > 7 DOS 13 A4 A5 F2 < > 7 DOC C5 AD 90 AC < > 7D10 A5 AC FO 17 < > 7D14 09 51 BO A4 < > 7D18 AO 00 Bl F3 < > 7D1C 20 BC E9 C8 < > 7Dao C4 AD DO F6 < > 7D24 20 FO E9 A2 < > 7D28 CO FO 95 20 < > 7D2C FO E9 20 FO < > 7D30 E9 20 OA E5 < < > 7D34 AO 00 FO EF Figure 1: Text File Output Subroutine — Hex Dump This will cause the machine language subroutine to invoke the AIM 65 monitor WHEREO. As we haveseen,WHEREO will ask for the output device, file name and tape drive number. Step 2: Write the Record 20 LN = 50000 30 FOR I = 1 TO 5 40 A$ = STR$(LN)-i-"DATA" + STR$(I) 50 POKE 4,103 60 POKE 5,125 70Z=USR{LEN(A$)) Lines 20 and 30 are part of our sam- ple application. Since we are generating DATA statements, we need to place line numbers in front of each one. Our generated line numbers start with 50000. Five DATA statements will be output. The text line is formatted in line 40. BASIC'S STR$ function is used to convert numeric fields to character strings. The resultant line is placed in the character string A$. AS is the output area. Each line of text to be written to tape must first be placed in A$. No other variable will do. Text data cannot be written to tape from any other variable without first be- ing moved to A$. Lines 50 and 60 tell BASIC where the machine language subroutine is located. The low order byte of the address (expressed in decimal) must be POKEd into location 4. Similarly, the high order byte of the address must be POKEd into loca- tion 5. In our example, the machine language subroutine is located at $7CA4. Be sure you adjust this for your particular configuration. The USR function in line 70 causes the machine language subroutine to write the data from A$ to tape. Note that we've called the USR function with an argument. The argument tells the machine language subroutine how many bytes of A$ to write, if the argument was set to, say, five, then only the first five bytes of A$ would have been transferred to tape, by setting the argument to LEN(A$), we insure that the entire string will be written. 30:66 MICRO — The 6502 Journal November 1980 NOTE: In accordance with AIM 65 text file format, tfte machine language subroutine wili automaticaily append a carriage return to each line of text written. You should not try to do this with BASIC. If you do, there wili be two successive carriage returns on the tape— the subroutine's and yours. As far as the AIM 65 is concerned, this represents an end-of-flie mark. When you go to read the tape, you won't be able to read very much of it. Slap 3: Test tfi9 Rslurn Code As line 70 shows, the USR func- tion returns a value. This value Is known appropriately as a return code. The return code can be assigned to any numeric variable (it doesn't have to be Z). Ttie return code will tell you, from a software point of view, whether or not the write operation was successful. It won't tell you, for example. If your tape recorder is jammed or unplugg- ed. The return code can be Inter- preted as follows: A: Return code Is less than zero If the return code has a value that Is less ttian zero, then an error con- dition has been detected. There are four situations whicli will cause an error: 1. A$ Is not defined 2. A$ is longer than 80 bytes 3. The USR argument Is greater than 255 4. The USR argument is greater ttian LEN{A$) Please note ttie 80 byte limit on ttie length of a text line. B. Return code is greater than or equal to zero If the value of the return code Is greater than or equal to zero, then the machine language subroutine has successfully located A$ and has written its contents to tape. The return code will indicate the number of bytes written (exclusive of the carriage return). Our sample program will test the return code like this: 80IFZ THEN STOP 90 LN = LN-f10 100 NEXT I Figure 2: Text File Output- Subroutlfie- -Instruction Format K>*«7CA4 /39 7CA4 AD LDA A4t3 Save OUTFLG on the stack 7CA7 HB PHA 7 CAS AS LDA 75 Start of BASIC'S symbol table 7CAA 85 STA FO 7CAC A5 LDA 7 6 7CAE 85 STA Fl 7CB0 AS LDA 77 Is It the end of the symbol table? 7CB2 CS CMP FO 7CB4 DO BNE 7CC8 No... 7CB6 A5 LDA 78 7CB8 C5 CMP Fi 7CBA DO BNE 7CC8 No... 7CBC AO LDY #FF Error exit. Set return code to -1 7CBE A2 LDX #FF 7CC0 68 PLA Normal exit. Restore OUTFLG 7CC1 6D STA A413 7CC4 SA TXA 7CC5 6C JMP (B008> Back to BASIC 7cca AO LDY *00 7CCA Bl LDA 80 IF 2<0 THEN STOP 90 LN-LN+10 100 NEXT I no AS"CHR$(26>lREM CONTROL-Z 120 Z«USR< 1) 130 r«USR<0>lREM CLOSE FILE 140 EMD STEP 2 RUN then program. It wHI write 1 block of data to tape TEST1. RUN OUT=T F-TESTl T"2 00 STEP 3 LOAD tape TEST1 (do not type NEW). 1 block of data will be read. The data will be displayed as it is processed. LOAD IN=T F=TE5T1 T« 1 00 SRCH F»TESTI BLK= 00 LOAD SOOOODATA 50010DATA 50020DATA 50030DATA SOO-aODATA 1 2 3 4 5 STEP 4 LIST the program. The generated DATA have been appended to the original program. 10 POKE 247*0 20 LN-50000 30 FOR 1-1 TO 5 40 AS«STR$CLN)+"DATA"+STR$ 80 IF Z<0 THEN STOP 90 LN=LN+10 100 NEXT I 110 A$»CHR1<26) (REM CONTROL-Z 120 Z"USR< 1) 130 Z=»USR<0) iREM CLOSE FILE 140 E^D 50000 DATA 1 50010 DATA 2 50020 DATA 3 50030 DATA 4 50040 DATA 5 machine language subroutine returns to BASIC. This Is done by Is- suing a JMP indirect to location $B008 in the BASIC ROf^. $B008 converts the 16-blt return code (stored In A and Y) to a floating point number. If A$ Is defined, a call will be made to a subroutine In the BASIC ROM. This subroutine converts the argument of the USR function to a 16-blt Integer. (Refer to page F-1 of the BASIC Reference Manual.) The value of the 16-blt integer is examin- ed and one of two lower level routines Is invoked as appropriate. If A$ is not defined, then no out- put record exists. This is probably an error. The machine language subroutine sets the return code to - 1 to signal the error condition. In the event that the argument of the USR function is 255 or less, the following steps will be carried out. First, if the machine language subroutine Is being calied for the first time, lower level initialization code will be Invoked. In any case, OUTFLG Is restored from the tem- porary variable located at $F8. Nor- mally, this will put the AIM 65 in the tape mode. Then, the USR argument (that is, the number of bytes to be written) Is compared with the actual length of A$. Should the USR argument specify a value greater than 255, an error condition exists. Microsoft BASIC does not permit strings longer than 255 characters. Therefore, the machine language subroutine sets the return code to — 1. If the machine language subroutine Is being calied for the first time, WHEREO wlil be called. This AIM 65 monitor subroutine will prompt the user for the output device, file name, and tape drive number. WHEREO also sets OUTFLG with a new value. We store the new value In OUTFLG in the tem- porary variable at SF8. If the USR argument is less than or equal to the length of A$, then processing can continue. We test the USR argument for three condi- tions: A. USR argument is B. USR argument Is non-zero and less than or equal to 80 Save OUTLG on stack /^ Text J Write ti mull be pOiWurtisd before 12/31/80. SI«rCfUli*renlri»ineml only Mnd proof olDurcli»Mwllh»iiirm«ndMcrlpllono( «h»tf«pp»neawfl»nth*iriCOted o>er9999. E-Z0rawen1rl«niu>1b*iubml<ielle. Entdei mull Include niire.iOdiiiil ptiDMnutnbtl. DltkatMi will be ratuined to the conleiLinlibulH ijnnol9U»r»nlMMfer#Ium»nflw8H(llnol»Mume™>pon>IBllHyboyonJmeso«1of«hl«nkctl«li»ll»(or>ny"orttgbml1l»d. Wlnrwiio(1hecon1eil»«llll»conl»cteddi™olly«n01h» n»mM Df alt fl«lne»llBrJ.nuiry 1,1981, ConljtlvoldwbBraprohlbltedby Is*. Employeei or family alSIOu.Soflwerenrlhelr dlitrlbuton art avcluded from pBfllclpdIton. E-Z DRAW and DUCK HUNT include character generation by Ron and Darrel Aldrich SIRIUS SOFTWARE is proud to announce that SYNERGISTIC SOFTWARE is now a distributor for these products. Contact your local dealer or call SYNERGISTIC SOFTWARE at (206) 641-1917. SIRIUS SOFTWARE 1537 Howe Avenue #106 Sacramento, CA 95825 (916) 920-8981 SYNERGISTIC SOFTWARE 5221 I20th Ave. S.E. Bellevue, WA 98006 (206) 641-1917 The MICRO Software Catalog: XXVI Software announcements for the 6502 based systems Mike Rowe P. O. Sox 6502 Chelmsford, MA 01824 Name: Electric Bill System: ATARI OR PET Memory: 8K Language: BASIC Hardware: no extra Description: A household utility pro- gram designed to predict what your next month's electric bill is going to be BEFORE you use the electicity. By using this program weekly, you can watch your consumption rate, cutting excessive electrical use. Software package comes with BASIC program on cassette and six pages of documentation. Price: $4.95 for PET version $5.95 for ATARI ver- sion Author: Mitchell Kelly Advanced Data Ser- vices Available: Kinetic Designs 401 Monument Rd.#123 Jacksonville, FL 32211 Name: ORS/PDOS System: PET-Oid or New Roms Memory: 16K, 24K, or 32K Language: Machine Language Description: A comprehensive disk operating system for the Microtech PEDtSK — floppy disk system for PET. The system was designed to be easy to use, simple syntax, yet still provide powerful data file handling capabilities, it greatly facilitates the use of languages other than BASIC and a conditional assembler/editor is available, its use does not in- terfere with any feature of the PET, Ail commands and keywords func- tion as they do in a PET without CRS/PDOS. Disk functions are pro- vided by new commands added to PET BASIC for disk program and data file control. Can be modified. Price: $75.00 (available with EXS 100 board) Available: OGRS Microtech, Inc. P.O. Box 102 Langhorne, PA 19047 Name: System: Memory: Language: GROCERY LIST APPLE 11 or APPLE II -f 48K ROM or RAM Ap- plesoft Hardware: DISK II and PRINTER Description: An easy-to-use, self prompting program that lets the user scan a Master File of up to 500 grocery and related items. With a single key-stroke the shopper may select the quantity and item dsired. Prints a shopping list organized by table number, section number, or department, such as "DARY", "DELI", or any other four letter code. The code is user defined. Over 150 items on a Master File are includ- ed. A Master File Editor is also in- cluded. $19.95 on disk Diskette and complete documentation D.R. JarvIs D. R. JARVIS COM- PUTING 1039 Cadiz Dr. Simi, CA 93065 Name: CI Shorthand System: OSl CI (and Super- board) BASlC-in-ROM Price: Includes: Author: Available: Memory: Any size system Language: Basic and machine Hardware: None special Description: Shorthand is a BASIC program that POKES in a machine language routine that will allow you to use two keys to enter BASIC keywords and commands. Saves much time in typing in long pro- grams. C2, C4, and 08 versions are about to be released. Write for availability. Copies: Just released Price: $12 on cassette tape, ppd. Author: Mike Cohen Available: Orion Software Associates 147 Main Street Ossining, N.Y. 10562 Name: Magic Boot System: Ohio Scientific Hardware: Disk Software: 0S65D Memory: Uses 2K Description: Adds renumber, full cursor editing, memory pack, screen clear and color background to BASIC. Ail routines are superfast machine code and handle All cases. These are not USR (x) routines, but extensions to BASIC itself. All you do is boot and these commands are ready to use — in immediate mode or in your programs. Also includes new BEXEC* and disk utilities. Write for more information or separate price list. Price: $50.00 Available: Universal Systems 1647 E. Old Shakopee Rd. Minneapolis, MN 55420 30:72 MICRO — The 6502 Journal November 1980 FREE ATV MICROVERTER with Challenger IP Superboard II also C20EM- The Best Buy In 8" Disk Systems $2899 The C2-0EM cabinet can be table top, rack mounted or incor- porated in a matching desk which will accommodate a CRT terminal and printer. Industry standard parts provide very reliable operation and easy service. And best of all, the C2-0EM can make use of most of the business application software and accessories for the popular, premium performance Ohio Scientific Challenger III. campuTERSHap Boslon Uninr N M Camoriflge 590Comm. Ave R(e I6B ZB8NoftolkSl (acrosstiomB U ) 603-473-2323 InearM.l.T.J 347-0700 661-2670 PROORESSIVE COMPUTER SOFTWARE P405CorblnRa.,York, Pa, 17403 (717)845-4954 ^^ SOFTWARE — HARDWARE — SYSTEMS ^'^ CUSTOMPROGRAMMING O APPL E & HDE ***** *** TEMA H The lalesi In 9 series ol machii^e language orogram deve'oprnenl tools tor Ihe APPLE. TEMA-2 is 3 mach- ine fanguage debugging aid designed lo run exactly IkKe the main-frame debug programs With TEMA 2 you can display or change the conlenl of any legisler or memory location, display the lasi 4 stack locations, jSR to any subroLitine - wittiout any mierfence to the usct P'OQ ram How The direct mode also allows disD'ay formal lestirg and finding ASCII or he- strings of uplo 256 chaiaclers A TEMA command ed I I or chec k s a M in put s C ompiet e Wilh TEfvtA'2 Trginerlin Applesolt or Inlegerl on disK, for *-l9 95 KDE ver&ion coming soon Write for complele catalog f MR. RAINBOW announces... our all new 1980 catalog and prompts you to peek at t^e latest collection Of software and hardware products for your APPLE ll" write or call tooav for your free 1980 cacalog. fiaraenpiaza snooping CRnler MICRO-WARE DISTRIBUTING INC. PRESENTS NEW— THE APPLE CARD — PLASTIC BVixll Reference Card for the APPLE 13.98. NEW DISK SOFTWARE FOR APPLE"" ; UNCOPY— A unique way lo make APPLE disks uncopyable. Just load in the soft- ware that yoj want protecied and init a disk with Uncopy. That's it (not for PASCAL or DOS 3-3 systems] $29.95 GRAPH FIT— A great hires graphing pro- gram that will make 3-d bar charts, pie charts, or line graphs. Just enter the data and the program will do the rest. {48K A-softj $25.00 ROAD RALLYE— A Stimulating hires auto race game with five spectacular full screen tracks $14,95 SUPER SEA WAR— Hires graphics and unique sound add to this computer en- chanced version of battleship. 3 leveis of play incl. Super Salvo with missiles. . .$13.65 THE ULTIMATE TRANSFER — Upload or download programs to distant areas over the phone (INTEGER, A-SOFT, MACH. LANG). Needs 48K and DC Hayes Assoc. Micromodem $25.00 INSTANT LIBBAfty SPECIAL — Buy any 4 of the above 5 and receive a 15% dis- count! Z-80 Board tor APPLE from Microsoft ..,.$275.00 PRINTERS! PRINTERS! PRINTERS! EPSON TX-eO w/GRAFTRAX-Full upper & lower case 125 OPS printer that will dump either APPLE hires screen in 2 si^es plus inverse or normal mode. Com- plete wilh software lor the hires screen dump. Only $795. APPLE Type Parallels Interface, add $88.00. EPSON MX-80-Bi-direction3l, logic seek- ing, dol matrix printer with a 9x9 matrix character formation. Characters can be enlarged, condensed, emphasized or double struck and full software control of horizontal & vertical tabs as well as form feed comes standard. Only $645., APPLE Type parallel interface add $88.00. V300 DAISY WHEEL PRINTER-Anolher tantaslic value from Japan, A high quali- ty daisy wheel that uses standard plastic daisies and standard Diablo type ribbon with 136 printable columns. Comes with a full 90 warranty and ser- vice available through 417 nationwide WESTERN UNION locations. Only $1999.00, wilh APPLE Type Parallel Inter- face. Call (201) 839-3478 or (201) 835-7080 lor information Or order trom:MICRO-WARE DIST.INC. 439A Route 23 Pompton Plains, NJ 07444 Dealer Pricing on Request! EXCERT, INCORPORATED AIM-65 SYSTEMS EXCEPT Specializes in AIM-65 System integration. In addition, we sell industrial quality power sup- plies from Condor, cases from the Enclosures Group, and expansion products from Seawell, MTU, Ttie Computerist, Cubit, Optimal Technology and we integrate these items into the exact System YOU want! These Systems are completely Assembled and fesfed (whenever possible and at no additional charge) and Warranteed for six (6) months. All YOU have to do is plug in the line cord. ■■BASIC" System Here are several of the more popular configurations: 4K AIM w/BASIC A65-4B $510 Case & Power Supply ENC4 100 Assembly & Test N/C TOTAL 610 "AID" System 4K AIM 8 A/D in-2 D/A out, 500 conv/sec Cable Case & Power Supply Assembly & Test A65-4 ADC1 CABLE ENC5A $420 115 25 129 N/C TOTAL 689 '32K" System OK AIM 32K DRAM Plus"" -EPROM-l/0 Cable Case & Power Supply Assembly & Test A65-0 $360 MEB4 395 CABLE 15 ENC3A 119 N/C TOTAL 889 For more information, call or write for our complete Product Sheet: EXCERT, INC P.O. Box 8600 White Bear Lake, MN 55110 (612)426-4114 1,000,000 Bytes PET/BETA-1 THE FLOPr/ DISK ALTERNATIVE FLEXIBLE DATA .VI AN AG EM E NT . . . MICRO-PROCESSOR CONTROLLED BETA-1 UNIVERSAL TAPE DRIVE BY MECA* . . . PERIPHERAL DEVICE WITH COMPLETE SOFTWARE SUPPORT The PET/BETA- 1 digital laoe system prouides ill ihe iBBIures of a disk, with oovjeffuJ data har-dllng capabilities ^our PRl/CBM handles big lobs vwith a data rapacity of one megabyte per drive, fast seek times, and Ik per second data transfer rales. Put your re- cords on line with PET/BETA-1 BETA-1 DRIVE, PET/BETA-1 OPERATING SVSTEM MANUAL $700-00 MANUAL (appllcaOlB to purchase! S1Q.00 PET/CBM SoHware Te rminal "CTTEFiM I Pt TTChM II PtTTeRM III ■uium of I. □(ul IQCBl i n a Dwn-iDBdpng ;ic ifli I L4i[H SiOO-00 Turn your PET into an intelligerii lerminaJ wiih one of our rermtnal packages. These are complete av semblect hard^ia'a and software packages- All incluQe line editing/ resand, rapear key. shift lock, oul- put to CBM printer, and mora . . . Delivered on PET cassette with manuals. Inquire for modem prices. I FORTH ipng >H«m S-lO 'I'"" 'mtmw ihan "ET QaSIC Hiflli lovM lil4KH icrutrurBd i«ri- gvKoa, A P.ffl fonti S«b Anfluii igHD e y T£ ' rHlbFing FORTH 160.00 ifliat logie canin^ca ttl macro '-rj»- (t.r.iv , 190 OO lames ^'UC LEAR WAR STOCK VARKET EMCRYPT f*n DAcH mbliiolavar gvnH AlTh imgl* pItV*'' rnOJ*, □*- iiifaiYd on PET uHam. E«h SIS.M ri|u' ^«H m. H«Bi rim" ^0 , '• -for- 1903 RlD Orand* Rurtirii T*xa« TSTeS FRtAl I I -512-477-2287 P.O. Vox B4a3 fknctln. Taxas 76712 Ill I I I I ff F IS TERRIFIC (Fop Youp Apple) NIBBLE IS: The Reference for Apple computing! NIBBLE IS: One of the Fastest Growing new Magazines in the Personal Computing Field. NIBBLE IS: Providing Comprehensive, Useful and Instructive Programs for the Home, Small Business, and Entertainment. NIBBLE IS: A Reference to Graphics, Games, Systems Programming Tips, Product News and Reviews, Hardware Construction Projects, and a host of other features. NIBBLE IS: A magazine suitable for both the Beginner and the Advanced fVogrammer. Each issue of NIBBLE features significant new Programs of Commercial Quality. Here's what some of our Readers say: - ^'Certainly the best magazine on the Apple 11" - "Programs remarkably easy to enter" - "Stimulating and Informative; So much so that this is the first computer magazine I've subscribed to!" - "Impressed with the quality and content." - "NIBBLE IS TERRIFIC!" In coming issues, look for: n Numeric Keypad Construction Lab D Assembly Language Programming Column D Pascal Programming Column D Data Base Programs for Home and Business n Personal Investment Analysis □ Electronic Secretary for Time Management D The GIZMO Business Simulation Game And many many more! ■""' NIBBLE is focused completely on the Apple Computer systems. Buy NIBBLE through your local Apple Dealer or subscribe now with the coupon below. Try a NIBBLE! — -—— --n nibble No. 4 BoK 325, Lincoln, MA. 0177J (617) 259-9710 I'll try nlUlel bwlosad is my S15 (for one year). D chuck O money ontep (Please allow 4 lo6weeksfoi delivery of Isl issue) BACK ISSUESofNlBBLE are available for $2,00 + .50 postage and handling. Name NOTF; Fkril Class Di Air Mmi is rcqutrej leu jU APO, KPO jnildll luicign a Address. Ciiy. State Zip. 6502 Bibliography: Part XXVI Dr. William R. Dia) 438 Roslyn Avenue Akron, OH 44320 721. Washington Apple Pi 2. No. 1 (Jan. 1960) Mitctiel!, Howie, "Master Catalog Program," pg. 7. A catalog program which works well for finding diskettes containing specific programs. 722. The Harvest 1 No. B (January 1980) Pfeiffer, Jim, "How Applesoft Stores String Arrays and a Tip on How to Clear Siring Array Space," pgs. 1-7. A tutorial for the APPLE. Anon., "APPLE Configuration," pg. 6. This program figures out which cards your APPLE has in which peripheral slot. Neiburger, Skip, "Label Maker," pg. 9. Print labels with a maximum of 4 lines and 28 characters in length. 723. The Paper 3 issues 2/3 (March/Aprii 19B0) Busdiecker, Roy, "The End," pgs. 19-21. A fast routine to find the end of whatever BASIC program that happens to be in your PET, Barroll, Ken C, "A Simple Mail Label Program," pg. 23. Short Basic program for your printer. Sparks, Paul W., "A Screen Print Machine Language Pro- gram, " pgs. 24-33. A cookbook tutorial including assembly language pro- gramming, 724. APPLE Cookbool( 1, No. 1 (January 1980) Matsumoto, Tom, "Pascal Turtle Graphics." pgs. 2-3. How to control the Turtle head on the APPLBPascal system. 725. APPLE Cookboolt 1, No. 1 (January 1980) Wigginton, R. "Saving Character Strings on Cassette Tape," pg. 8, If you need to save strings to tape, this program will do very well on your Apple. Golding, Val and Aldfich, Darrell, "Two Short Utilities," pg. 11. "Disk Space" and "C lor Catalog" are listed for the APPLE. 726. APPLE Peel 2, No. 2 (February 19S0) Brown, Tom, "A New Dimension in Applesoft Programming," pgs. 8-10. Bedimension your Applesoft array to a larger or smaller size. 727. The Harvest 1, No. 9 (February 1980} Sander-Cederlof, Bob, "S-C Assembler Auto Line Number," pgs, 4-6. Add Aulo-Number to your S-C Assembler II. 726. Washington APPLE Pi 2. No. 2 (February 1980) Field, Bruce F., "Remote Temperature Measurement with the APPLE," pgs. 16-17. Hook up a thermistor sensor to your APPLE. 729. APPLE Cookbook 1, No. 2 (MarchfApril 1980) Matsumoto, Tom, "Pascal Tutor," pgs. 2-4. The second in this tutohal series on Pascal for the APPLE. 730. Rainbow 2, Issues 3M (Marct>rApril 1980) Lee, Montgomery, "Printing Text on Page 2," pgs. 6-7. Hints for the APPLE. Frazer, Fred, "The Search Goes On," pgs. 34-35. A faster version of a program to search for Pythagorean Triplets, on the APPLE. 731. The Harvest 1, No A (March 1960) Russ, John C, "Simulation with the APPLE, or some thoughts on RND (NUMBERS)," pgs. 1-4. Several examples of the use of random numbers in listings. 732. APPLE Peel 2, No. 3 (March 1960) Little, Gary, "EDIT -I- : Who needs Autostart ROM?" pg. 3. A program to provide editing features such as those of- fered on the Autostart ROM of the APPLE. 733. From the Core (April 1960) Anderson, Chip, "The Processor," pg. 11. A utility program for the APPLE. 734. Stems from APPLE 3, No. 4 (April 1980) Ward, Dennis, "Applesoft Debugger," pg, 7. Routine to print error codes in debugging APPLE pro- grams. Jochumson, Chris, "APPLE HI-RES Graphics," pgs. 8-11. A tutorial for Hires on the APPLE. Reed, Ron, "APPLE Language System Pascal Patch," pgs. 16-17. How to live with the unruly cursor. Eliminates the flashing upper case. 735. The Harvest 1, No. B (April 1980) Hobson, Blake. "DEF FN Defined," pgs. 6-7. 30:76 MICRO — The 6502 Journal November 1980 A program is given in which the DEF FN statement Is changed with each input, thus results in a progtam which modifies itself. 736. 0,S.I. Users Independent Newsletter 3 (May 1960) Curley, Charles, "OS-65D Addresses," pg. 3. A list of useful addresses for the OS-65D with comments and observations. 737. Kilobaud Microcomputing No 41 (May 1980) Baker, Robert W., "PET-Pourri," pgs. 7-8. Comments on Tape drive with a counter, programmmg tips, software and workbooks. Garrell, Robert D., "Machine Language Routine for Challenger II," pg. 18. How to move a machine language program. Williams, John D., "Software for the AIM 65," pgs. 96-98- Discussion of some of the mysteries of the AIM 65 monitor subroutines. Hoyt, Bruce, "Keeping Real Time with OSI's Superboard II," pgs, 202-203, A real-time clock, with alarm and timer, for the 6502. 738. Washington Apple PI 2, No. 4 (April 1980) Pjlloff, Hersch, "An Error in DOS 3.2-1." pg- 7. Under certain conditions the APPEND function will over- write the previous sectors in the text file. Here is a fix. Grossman, Craig, "APPLE Tricks," pg. 11. Learn hov^ to INIT a disk in half the time, type 'unac- cessable' characters, make your program uniistable, etc. in this article on the APPLE. 739- Cider Press (April 1980) Yee, David R., "Stop the Blinking Cursor," pg. 8. Routine to alter the cursor on the Apple. Slater, Michael, "Apple Pascal Compiler," pg. 9- How to eliminate a bug in the compiler. Anon., "APPEND FIX, DOS 3-2.1," pg. 10. Using this method, one never worries about APPEND over- writing the start of a file on the Apple Disk. Uhiey, John, "Integer Basic Super-Lock," pg- 11. A Machine Language program which alters an Integer Basic program using a code word which the user enters. 740- Creative Computing 6, No. 5 (May, 1980) Geiger, Rick, "Apple Strings," pg. 118-122. Discussion of the use of strings on the Apple. Carpenter, Chuck, "Apple-Carl," pg. 158-165. Comparison of Apple II vs. Apple II Plus, Converting In- teger Basic to Applesoft, Assembly Language, Monitor Commands, OpCodes, Address Modes, etc. 741. Byte 5, No. 5 (May, 1980) Helmers, Carl, "Computer-Gonlrolled Viewing of the 1980 Eclipse," pg. 6. , „. .. Use of an Apple II Pascal system controlling the photographing of the eclipse. Swank, Joel, "KIMDOS," pg. 44-50, Using your KIM-1 with a Percom Floppy-Disk Dnve. Ezard, Lawrence A., "Formatted Program Output for the KIM-V," Pg- 190-194. . . . ^ Here is a short KIM-1 program to find bugs, ptmt out and document programs, etc. 742- Interface Age 5. Issue 6 (June, 1980) Mallon, Marvin, "Teach Your PET to Read 'Marked Cards'," pg. 56-61. With your PET and a card reader you can enter data with the IBM cards. Fox, Tom, "Looking at Micro-Based Business Systems," pg. 70-78. 6502 Based Micros are discussed in this article. Wetzel, Ken, "A Break Service Routine for a KIM-1 with a Teletype," pg. 132-135. The use of software interrupts, or breakpoints, are recognized debugging aids. This listing for the KIM lists the contents of the registers on the interrupt, 743. MICRO Issue 24 (May, 1980) DePriest, Dale, "Plotting with Special Character Graphics," pg, 11-13, A primer on generating plot mode type graphics with special characters, with special listings for PET and Challenger, Wells, George, "SYM-1 Basic 'GET Command," pg. 15-17- The use of the 'GET' function is discussed and several ex- amples for the SYM-1 are provided. DeJong. Marvin L,, "A Simple Temperature Measurement Program and Interface," pg, 19-23, Using a micro tor temperature measurement demonstrates problems involved in interfacing the real world, Wevers, Henk J., "Shorthand Commands for Superboard II and Challenger CIP Basics," pg, 25-27. How to intercept the BASIC'S input routine and how to im- plement a shorthand notation, Wilson, W,E„ "A Formatted Dump Routine for the AIM 65," pg, 29-30. Control the formatting of the dump to conform with the user's printer capabilities with this routine, Tulloch, Michael, "New and Belter PET User Port Printer Routines," pg- 33-37, A series of programs are presented which drive any TTL, parallel, or ASCII printer from the PET's user port, Taylor, William L,, "Graphics and the Challenger CIP, Part 5," pg, 41-43. The final installment in the series discusses plotting techniques and moving characters, Orion, Ralph R„ "SYM-1 Sends Morse Code," pg, 49-51. Use your SYM as a Morse Code teaching tool, automatic ID'er or canned' message sender. Reynolds, Lee, "An EDIT Mask Routine in Applesoft BASIC," pg, 53-57, These routines permit you to produce professional look- ing output on your Apple. Tenny, Ralph, "Expand KIM-1 Versatility in Systems Applica- tions," pg, 63-64, Techniques and programs permitting the simple addition of six sense switches or an ASCII keyboard to the KIM, 744. Recreational Computing 8. No. 6, Issue 45 (May/June 1980) Gollux, Ernest, "Programming the 6502 in Machine Language," pgs, 12-15. A tutorial on machine language for 6502 micros, Trenholme, John, "Pronounceable Names," pg, 21, A name generator for the PET, Trenholme, John, "PET Input without Breaks," pg, 21, Useful routine tor the PET, Opedal, Donald R,, "Editing Soflape Prefix Programs," pg. 36, How to manipulate those Softape programs. November 1980 MICRO — The 6502 Journal 30:77 The MAGIC WAND™ is ready for APPLE™ and OHIO SCIENTIFIC This powerful word processor is in stocl<, and we wili deliver at the introductory price of $300. (CP/M and 80 coiumn board required). Our fuily interactive MAIL MAGIC^*^ mail management software, with 14 user defined fields and full merge capability is also available for $149. We stock hardware, software, printers for AP- PLE, PET, Ohio Scientific. . . call or write for our special prices on your specific needs, Microsoft Z-80 Softcard $295. Videx 80 column board $295. NEC 12" green screen monitor $265 COMPUTER CITY P.O. BOX 60284 HOUSTON, TX 77205 (713)821-2702 Imc/visa POWER TO YOUR AIM Treat your AIM to a quality power supply: 1. Designed to Rockwell's specifications for the AfM-65 (5 volts at 2 amps, regulated; 24 voits, .5 amps avg., 2.5 amps peak, unregulated). 2. Overvoltage protection to protect the expen- sive circuits in your AIM (5 volt output). 3. Handsome all metal case (two tone blue). 4. Fuse (externally accessible), switch, pilot light, line cord, cable from power supply to AIM — all included. 5. Conservative thermal design for long life. $64.95 plus shipping (5 lbs.) CA residents add 6 % sates tax. VISA/MC, cashier's or registered check. Personal check (allow 2 weeks to clear). CompuTech Box 20054 Riverside, CA 92516 0^. ^ >fV ...bclni, y* complcal calalDgue or pcrlplir.Eali avi liable rc.r ya\.i PET Elect) 11. Vtorks Electric Skyles Electric Works 231 E Soulh Whisman Road Mountain View. CA 94041 . tit* O^MM Innpanslw B»w WtAPHiC& PAD tar HwAPPUE II OiW ,BB.L & HOWEU. ART ARCHITECTURE BUSINESS EH^lAY DESIGN EDUCATION UYOUT GRAPHS saENCE STATISTICS OfCTRONICS TECKNtCAt. TRAININa . ...AHOFMNi AvaUiM Ji yam k-eal . dMjsr . . . Ask to see \V» DemonstiBllort Software ANOTHER CREATION FROM T.M. TEXr/LO-RESfUl Fonnua •HJier ttto TEXT or LOflES •ci«en. nubtftw AUTOMATIC TEXT CeWTEHlNG. HWftB PAD HI-RES screens without expenahra Graptiics Tablet tnoludBs most-used QrsF^lcs comirsnda. TRUE acresn proportlofts . . . NOT lust graph paper. EXCELIENT tai precision ai^lcatlona. EASV TO USE Effective even at tlis elefnentary school lavet. Simple HPLOT slatsmonfa ma« thoee pictures ... . GRAPPLE PADS $3M par 60 shMt pad DEALER INQUIRIES INVITED Distributed by: SOUfnCNS. MC 3740 Colony Diivs San Anionic, Tenas 76230 <5 12) 690- 101 7 ■eaX & HOWELL SfcsOCOMPurEfi is a regifltered TRADEMARK ot BELL i. HOWELL, INC. •GRAPPLE h ■ TOADEMAfW of SOLUTIONS. INC. HAS YOUR APPLE READ ANY GOOD PROGRAMS LATELY? APPLE 11 DISK SOFTWARE DATA BASE MANAGER IFO PROGRAM The IFO (INFORMATION FILE ORGANIZER) can be used for many ap- pUcations such as sales activity, check legisteis, Oalance sheets, client/patient records, laOoratoty data reduction, perscription informa- tion, grade records, mallrna lists. A/ft, job costing and much more. This can Oe accomplished easily and quickly without prior programniing knowledge. Up to 1000 records with a maximum of 20 headers (catagories] and 10 report tormats(us8f defined) can be stoied on a single diskette, informa- tion can Be sorted on any header, both ascending and descending In alpha/numeric field. Malliematical functions can be pertormeO on any 2 fields to manipulate the information. Information can be searclied on any tieader using >,<,= >,= <, = , and first letter. Mailing list formal provided. Fast assembly language sort, searcfi and feaO routines. Many error protaollon devices provided. Put your application program toaather in minutes instead of hours. «,„„ „„ PROGRAM DISKETTE and instruction manual. ...$100.00 MAILING LIST PROGRAM and instruction manual...$40.00 INVENTORY PROGRAM 2 disk drives, menu-driven program. Inventory categories include: STOCK*, DESCRIPTION, VENDOR ID, CLASS, LOCATION, REORDER PT., REOFIOER QTY, QTY ON HAND. All records can be entered, chang- ed, updated, deleted, or viewed. Reports can be sorted in ascen- ding/decending order by any category. Ttiate are 7 search reports (3 automatic). Calculates J VALUE of inventory and VTD, MTD, and period items sold, Accumulates Inventory over a 13-monlti period. Plus much more. Requires a 132-column, serial pa raltel printer, Complete turnkey operation with bootstrap diskette. Program diskette and Instruction manual... $140.00 PAYROLL PACKAGE 2 disk drives, menu-driven program. Employee history include: NAME, ADDRESS », ADDRESS #2 CITY, STATE, ZIP, FED EK, STATE EX., SOCIAL SECJ.DATE EMPLOYED, DEPT «, CODE, EMPLOYEE «. STATUS, MARITAL STATUS, PAY RATE, OT RATE, VAC RATE, « VAC HRS and PENSION PLAN. Program can generate weekly or biweekly payroll. Prints W-2, OTR REPORT, PAY CHECKS, MASTER AND CUR- RENT files. FEDERAL and STATE witholding taxes are built into pro- gram. Maintains a CASH DISBURSEMENT journal. Accumulates payroll for a 53 week period. Generates numerous type of payroll reports. Allows data to be searched, sorted and edited. Prints DEDUCTION register and more. Maintain up to 125 EMPLOYEES/EXPENSES tor quick and easy PAYROLL, Numerous error protection devices provided, PROGRAM diskette and instruction manual. ..$240.00 -PLEASE SPECIFY STATE WHEN ORDERING APARTMENT MANAGER 2 disk drive, menu driven program written In assembly language and AP- PLESOFT II. All you will ever need to manage your apartment. Handles up to 6 BUILDINGS with a maximum of 120 units each. Complete turn- key operation. Data categories include APT H. TYPE, TENANT NAME, PETS CHILDREN, SECURITY DEP., PET DEPOSIT, POOL DEP, MISC DEP, RENT ALLOWANCES, DATE MOVED IN, VACANCY DATE. REF- FERAL, CONDITION OF APT. DAMAGE AMT and COMMENT LINE. Search, sort, enter, edit and vacate lenates. Maintains a MTD and YTD rent recipts as well as complete utility reports, rent lost by vacancies. Mainlainsexpenses, vacated tenants report and rnuch more. PROGRAM biSKETTE and INSTRUCTION MANUAL.. .$325.00 PROFESSIONAL TIME AND BILLING 2 disk drive program written in assembly language and APPLESOFT II. Completely menu-driven. Maintain all billing of clients and personnel. Generates and invoices. Numerous reports based on all types of criteria. Easy data entry (or RATES, CLIENTS, and MATTERS. Has SEARCH, SORT, CHANGE (on screen editing), VIEW and BALANCE FORWARD, IF your are a JOB CONTRACTOR, ATTORNEY, ACCOUN TANT, GENERAL CONSULTANT, or anyone thai needs to charge (or time, this program is a must. Complete turnkey operation. Numerous REPORTS are produced to aid in the TIME ANALYSIS PROCESS. All this and much more. PROGRAM DISKETTE and INSTRUCTION MANUAL... $325. 00 SPEED READING PROGRAM DISKETTE AND INSTRUCTION MANUAL... $200.00 ALL PROGRAMS REQUIRE 4aK and APPLESOFT II ON ROM OR AND APPLE II PLUS ALL SOFTWARE IS COMPATABLE WITH PASCAL SYSTEMS PROGRAMS RUN FROM ANY PORT OF THE COMPUTER WITH SERIAL/PARALLEL PRINTERS. REQUIRES 1 DISK DRIVE UNLESS OTHERWISE NOTED. SEND CHECK/MONEY ORDER or C.O.D. To, . SOFTWARE TECHNOLOGY for COMPUTERS P.O BOX 428 BELMONT, MA 02178 OR AVAILABLE FROM YOUR LOCAL DEALER ^V Advertisers' Index Aardvark 39 Abacus Software 25 American Data Systems 46 Beta Computer Devices 31 R. J. Brachman Assoc. 25 CallA.P.P.LE. 26 Carlson 46 Classified Ads 23,24 CompuTech 78 Computer City 78 Computer House Division 52 TheComputerisI, Inc. 40,41 Computer Shop 71 Computer Sfiop Cambridge 73 Computers-R-Us 10 Creative Computing 16 DakinS 35 Decision Systems 60 Dwo Ouong Fok Lok Sow 46 Eastern House Sottware 32 Excert, Inc. 74 F.S.S. 74 Galaxy 60 Hepburn MCA 25 Highlands Computer Services 63 Instant Software 59 Lazer Systems 2 LemData Products 32 Malibu Microcomputing 1 MCC Engineering 6 MicroWareDist. Inc. 73 Mittendort Engineering 50 Money Disk 60 Nestar Systems, Inc 28 Nibble 75 Nikrom 63 Orion Software Associates 39 Ohio Scientific BC OS Small Systems Journal 42-45 Peelings II 35 Perry Peripherals 58 Prism Software 32 Programma IFC Prog. Comp. Software 73 Progressive Software 64 Rainbow 73 Sirius Software 52,71 Skyles Electric Works 15,78, IBC Small Business Computer Sys 35 Software Tech. for Comp. 79 Solutions, Inc, 78 Southeastern Software 80 Southwestern Data Systems 60 Versa Computing 4 Voicetek 32 Wyman Associates 6 J Soutficaskrn Software '"^"^^Is'/Se'^sraa" New Ofleans.UV 70126 504/246-7937 Southeastern Software NEWSLETTER' for APPLE li Owners NOW IN THE THIRD YEAR OF PUBLICATION 10 Issues per year for $10.00 Back Issues available at $1 .00 each EXAMPLE: Send $10.00 and receive next 10 Issues Send $30.00 and receive 30 Issues beginning with #2 DATA CAPTURE 3.0 - $29.95 Is DATA CAPTURE 3.0 just another Smart Termi- nal program? NO! It is a GENIUS Terminal pro- gram for use with the Micromodem 11'^. It will 'capture' ANYTHING that appears on the screen of your CRT. ANY program or data. If you are using the Source you can even 'capture' CHAT. There is no need to create files in your file space on the other system to transfer data to your Apple. If you can list it you can capture it. " You can then SAVE the data to disk, dump il to your printer or even do simple editing with DATA CAPTURE 3,0. * You can use DATA CAPTURE 3.0 to com- pose text off line for later transmission to another computer. Think of the timeshare charges this will save you! * Use DATA CAPTURE 3.0 with the Dan Paymar Lower Case Adapter and you can enter UPPER or lower case from the key- board for transmission to another system. You can also capture UPPER/lower case data from another system. ' A program is also included to convert your programs to text files for transmission using DATA CAPTURE 3.0. * DATA CAPTURE 3.0 will save you money if you are using any timesharing system. Requires DISK II®, Applesoft 11"® Add $64.95 to order the Dan Paymar Lower Case Adapter BAD BUY DISKETTE - $9.99 Of course it's a bad buy. If you have issues #2 thru #11 of the NEWSLETTER you can type these programs In yourself. Includes a couple of bonus programs. Requires DISK II®, Applesoft W^ We ship within 3 working days of receipt of order and welcome your personal check. We also accept Visa and Master Charge. LCMOD for PASCAL - $30.00 Finally! DIRECT entry of UPPER/lower case into the Pascal Editor. Why pay hundreds of dollars for a terminal just to set lower case entry with Pascal? If you have the Paymar Lower Case Adapter you can use this program. * Left and right curly brackets for comment delimiters. * An underline for VARs, program names and file names, ' The ESCape key does the shifting and Con- trol Q is used for ESCape. Have you ever typed in a page or two of text and lost it by hitting ESC accidentally? This won't happen with LCMOD. Requires Language System and Paymar LCA Add $64.95 to order the Dan Paymar Lower Case Adapter. MAG FILES -$18.00 Finding it difficult to keep track of all those magazine articles you are reading? This program will help you do it. MAG FILES is Menu driven with separate modules lor creating, editing, displaying and searching for your data. If you are using one drive a program is provided for transferring data to another diskette for backup. A sample data base of over 60 articles is included. The screen format- ting and user orientation are what you have come to expect of Southeastern Software. Requires DISK 11®, Applesoft 11®. MAILER -$15.00 Don't let the low cost fool you. This is a single drive version of the program we use to maintain the NEWSLETTER subscriber list. Can be easily con- verted to 2.3 or 4 drives. Binary search and linear searches for finding any name in file. Sort on names and zip codes. Selective print by zip code or key. The separate modules are menu driven and will run on 32K system. There are 13 separate modules on the diskette for maintaining a mailing list. Sample data file included. Requires DISK 11®, Applesoft 11®. ■ Apple, Apple II Plus, Disk II and APPLESOFT II are trademafks of Apple Computer Company. " Micromodem IMsa trademark otD.C. Hayes Associates, Inc. DCOM 200 High-Speed Intelligent Printer "^^ 1.5- 2' I.5- ^^ r y 4 iA ^^tfUi 40 characters-per-second 80 characters per line Upper and lower case Continuous graphics at 60 dots per inch Microprocessor controlled Bidirectional look-ahead printing Automatic "wrap-around" Quiet operation TheTrendcom200is a high speed ther- mal printer offering the combination of text printing at 80 characters per line and continuous graphics at 60 dots per inch. In the text mode, upper and lower case data are printed at 40 characters per second. The 5x7 characters pro- vide clear readable copy on white paper; no hard to find, hard to read aluminized paper. In the graphics mode, seven bits of each byte correspond to the seven dots in each of the 4B0 print positions per line. Since the computer driving the printer has full control over every print position. It can print graphs, bar charts, line drawings, even special and foreign language symbols. Despite its low cost, the Trendcom 200 is a true in- telligent printer with full line buffering and bidirectional look-ahead printing. Alter one line has been printed left to right, the internal microprocessor examines the next line to choose the shortest print direction. The micro- processor also provides a built-in self- test mode for easy verification of proper operation. High reliability is designed in: The thick film thermal print head has a life expectancy of 100.000,000 characters. Two DC stepping motors provide positive control of the print head and the paper drive, the printer's only driven parts. The absence of gears and solenoids also makes the printer extremely quiet; the only noise is the rustling of the paper advancing. Skyles PAL-80 printerfs) complete wilh 2Vi foot interface cable to attach to my PET at S675.00 each.* (Plus $10.00 ship- ping and handling.) I also will receivea test and graphics demonstration tape at no additional charge and over 150 feet of 8 Vi inch wide black on white thermal paper. „,^„„ rolls of 8'/! Inch wide by 85 f1. long thermal paper (black ink) at $5.00 each; or cartons at 10® $45.00. Visa. Mastercharge orders call (800) 538-3083 California orders please call (408)257-9140 Skyles Electric Woilts 231E South WhismanHoad MountainVicw.CA 94041 (415) 965-1735 M The home compuier you thought was years away is here. — ~~^ •HLLEISEI IP C8PDF Ohio Sclenlltic's lop of the line personal com- puter, [he CBP DF, This sysiem incorporates Ihe mosl advanced technology now available in standard conligu rations and add-on options. The CSP DF has full capabilities as a personal computer, a small business comouler, a home monitoring security system and an advanced process controller. Personal Computer Features The C8P DF features ultra-last program execu- tion. The standard model is twice as fast as other personal computers such as the Apple II and PET, The computer system is available with a GT option which nearly doubles the speed again, making it comparable to high end minicomputer systems. High speed eieculion makes elaborate video animation possible as well as other I/O functions which until now, have nol been possible. The C6P DF features Ohio Scienlific's 32 n 64 character display with graphics and gaming elements lor an eflective resolution ot 256 x 512 poinls and up to 16 colors Other features for personal use include a programmable lone generator from 200 to 20KHz and an 8 bit companding digital to analog converter for music and voice output, 2-6 asis joystick interfaces, and 2-10 key pad interfaces. Hundreds of personal applications, games and educational software packages are currently available for use with (he CBP DF. Business Applications The CeP DF ulilizes lull size 8" floppy disks and IS compatible with Ohio Scientific's ad- vanced small business operating system, OS-65U and two types of information manage- ment systems, OS-fi/DMS and OS-DMS The computer system comes standard with a high-speed printer interface and a modem in- terface. 11 features a full 53-key ASCI I keyboard as well as 2048 character display with upper and lower case for business and word processing appiicslions. Home Control The CSP DF has the most advanced home monitoring and control capabilities ever offered in a compuier system. It incorporates a real lime clock and a unique FOREGROUND/ BACKGROUND operating system which allows the computer to function with normal BASIC programs at the same time it is monitoring exiernal devices. The caP DF comes standard with an AC remote control interface which allows It lo control a wide range of AC appli- ances and lights remotely wilhoul wiring and an interface tor home security systems which monilors (ire, intrusion, car theft, water levels and freezer temperature, ail without messy wiring, in addition, the CSP DF can accept Ohio Scientific's Votrax voice I/O board and/or Ohio Scientific's new universal telephone inler- tace (UTI). The lelephone interface connects the compuier lo any touch-lone or rotary dial telephone line. The computer sysiem is able to answer calls, iniliale calls and communicale via touch-lone signals, voice ouipul or 300 baud modem signals. It can accept and decode louch-lone signals, 300 baud modem signals and record incoming voice messages. These features collectively give ihe CBP DF ^capabilities lo monilcr and control home func- 'tions with almost human-like capabilities. Process Controller The CSP DF incorpoiaies a real lime clock, FOREGROUND; BACKGROUND operation and 16 parallel I/O lines, Addilionally a universal accessory BUS conneclor is accessible at the back of the compuier lo plug in additional 48 lines of parallel I/O and/or a complete analog signal I/O board with WD and D/A and multiplexers. Clearly Ihe C6P DF beats sll existing small computers in conventional speciticalions plus it has capabilities far beyond any other com- puier system on the market today C8P DF IS an S-siol mainframe class compuier Willi 32K sialic RAIvl, dual 8" floppies, and several open slots for expansion. Prices start at under $3,000. Com pule T^ [:(]□■? wjfh keybdards and tloppiea where spscUied OiKei flqiiipmenl shown isopUaTL^] For literature and the name of your local dealer, CALL 1-800- 321 -6850 TOLL FREE. 1333 SOUTH CHILLICOTHE ROAD AURORA, OH 442D2 • [21 6] 831-5600