Sorcerers_Apprentice_V4N4_Jun1982 Sorcerers Apprentice V4N4 Jun1982
User Manual: Pdf Sorcerers_Apprentice_V4N4_Jun1982
Open the PDF directly: View PDF .
Page Count: 36
Download | |
Open PDF In Browser | View PDF |
SIJ~[lE~E~~~ @ ~(JJJ~ErlTI[lE PAGE 73 VOLUME 4 TM NUMBERS 4 June 1, & 5 July 15, 1982 & INTERNATIONAL COMPUTER USERS GROUP/NEWSLETTER Copyright (C) 1982 by Sorcerer's Apprentice - All rights reserved Price $3.00 -----------------------------------------------------------------------------IN THIS ISSUE BELLY UP! •••••••••••••••••• 73 ODDS & ENDS •••••••••••••••• 74 PUBLIC DOMAIN - #2 ••••••••• 75 SOUND EFFECTS •••••••••••••• 76 SB LETTER MACRO •••••••••••• 76 NEWS FROM THE VALLEY ••••••• 77 RANDOM EXPANSIONS •••••••••• 78 OFFICE SORCERER •••••••••••• 80 SPREAD SHEET CONT'D •••••••• 81 'SWORD' REVIEW ••••••••••••• 82 PRINT 'EM WID E •••••••• 83 CASSETTE INDICATOR LIGHT •• 083 VENEZUELAN CONNECTION •••••• 84 EASY TYPING PRACTICE ••••••• 89 ON-LINE •••••••••• 0.0 ••••••• 89 USEFUL POKE COMMANDS ••••••• 89 ESF - ADDITIONAL INFO •••••• 90 @ ESF - OPERATING TECHNIQUES •• 91 ROM PAC NOTEBOOK - #4 •••••• 93 ROM PAC NOTEBOOK - #5 •••••• 94 MAG IC SQUARE S •••••••••••••• 95 REMOTE CP/M NOTES •••••••••• 95 T.O.S.C.A •••••••••••••••••• 96 PSEUDO PRINT USING ••••••••• 96 THE MAKING OF 'DUEL' ••••••• 97 TIPS ••••••••••••••••••••••• 91 MX-80 SUPER INTERFACE •••••• 97 FINANCIAL TABULATOR ••••••• 098 HARDWARE NOTES •••••••••••• 103 GET ML ROUTINES FROM B-PAC.103 MERGE •••• 0 • • • • • • • • • 0 • • • • •• 103 RELOCATED W-PAC MODS •• 0000105 RANDOM I/O •••• 0••••••••••• 106 4TH TIP ••••••••••••• 00 •••• 106 aSI BBLLY UP. by Don Gottwald Finally, we have the correct information (we hope) rqarding the status of Eddy Systems, Inc. (ESI). Mike Mazzola of Biotech is refernng all calls regarding ESI to Gary Jensen of Challenge Computer Corp. I spoke with Gary Jensen and he confirms that Exidy Systems, Inc. is out of Challenge Computers is NOT a replacement for ES I, nor will they support the Sorcerer in any way. For any questions you may have, he suggests you contact B.J. Freeman by mail at P.O. Box 70310, Sunnyvale, CA 94086, by phone at (408) 738-0185 or (408) 749-8871 or via the SOURCE at TCD284. buaines.. Challenge Computers has bought some of ESI's inventory. They are currently offering Model II's with 48K RAM for _700. They also have some single Floppy Disk Systems (FDS) for _600 and add-on units for _500. No S-100 Unit is required for these. A few Standard BASIC Pac's and Word Processor Pac's are available, as well as some software. If you're interested in any of these items, contact Gary Jensen at Challenge Computer Corp., 1225 Commerce Drive, Richardson, TX 75081; tel. (214) 669-1101. 1 G It appears that ESI could not generate enough cashflow to support the products they were offering. According to Gary, about 5000 Sorcerers were sold in the United States, versus 20,000 in Europe. (Figures quoted by ESI's management were substantially higher. They said that 15,000 were sold in the U.S., versus 30,000 in Europe). Compudata, B.V. of Holland still has manufacturing rights to the Sorcerer and are currently producing them for the European market. (We will investigate the possibility of support from Compudat a and report back to you). Biotech owns all patents, copyrights and manufacturing licenses to the Sorcerer. The designer of the original Sorcerer is reportedly negotiating with Biotech for the manufacturing rights. We'll keep you posted. (continued on page 89) • ODDS a: BNDS by Ralph LaFlamme, Editor Greeting. after a long absence from . these pages. I want to thank Don Gottwald for pitching -in so well with the last issue. He got the whole thing out alone. I think he did a auper jobl I must apologize to a number of you for my lack of personal contact 1n lome time. That 1ncludes those of you who have tried to contact me via the SOUR'CE and MicroNET. If you have had file(s) for me to be picked up off these systems in the I ast few months, please contact me again via the account numbers shown on the back cover. Hopefully, I'll be better able to return your inquiries. I have been going through a good deal of personal upheavals for the last few months. I have just moved from Troy, Michigan to the Lafayette, Louisiana area. This, coupled with problema in getting articles and ads 1n on time, and various equipment problems, created a good many delays. Out apologies for this and thank you for your p adence. Hopefully, everything is now under control. • I have been accepted into the gr aeluate progr am in Computer Science at the University of Southwestern Louisiana located in Lafayette, LA. Consequently, I have to give up my role as Bditor of this Newsletter. We are in need of a new Bditor. If anyone i. interested in this job, please contact UI by mail at our P.O. boz, or by phone. Don Gottwald may be reached at (313) 286-92.65 and I at (318) 856-4954. Despite all the headaches, I've enjoyed this role and have enj oyed talking and corresponding with you. I hope that you give the new Editor as much support as you have given me.. In order to try and get caught up, i.sues 4 and 5 1n one.. You are still Jetting an eIJual number of articles 1n this combined issue, you're just not getting a duplication of covers, ada, application form, etc. we are combining A.s. Marland of Boi. Colombes, FraDCe advises that Bob Roth'. Z-80 Relocator program found in issue 3.4, had an additional bug. Address 504E reada: OC (INC C), but should read: 03 (INC Be). This ,ets the length right when dealing With block. that are a whole number of pages long. He al.o add. that the new Monitor 1.1 retains a bug in the TBst program. OK atill means there is a zero at the indicated bit location, while BAD alill mean. there is a one with no indication of what the bits ought to have been. Put another way, the bad addtal ia compared with 00 during print out, even though it was probably compared with something else when the fault was actually detected. POP BC (to recover B), PUSH bc (to put C back on the stack) need to be in.erted between E963 and B9641 Bob Freeman advises that he has an Bztended Basic Star Trek program containing 5 modules to run on 5 Sorcererl. The modules are not complete but are far enough along 74 for someone to take over and complete. He has not had the time to do this himself but will be glad to provide any thoughts he has to any interested parties. He used the Book, Starship Simulation, by Dilithium Press as his reference source. You may contact him by phone on Weekends (408) 749-8871 or via the Source at TCD284. Charles Boone, of Lokeren, Belgium, advises us of the following European sources for items available for the Sorcerer: Light Pen This pen plugs into the parallel port, comes with 5 programs to teach how to use it Wlth BASIC and MLprograms and a demo program. This 1S avail able from: Gilbert Oegema, Florisdonk 10, 4707 Vm Roosendaal, The Netherl ands. Gebr. Van Montfort, Smedestraat 13, 6418 CR Heerlen, The Netherlands, has the following five items available: 1/0 Pac This is an EPROM Pac with 24 I/O lines, it has room for 2 EPROMs and is user programmable. BPROM Progummer This EPROM Progr ammer plugs into the I/O Pac above via a 25- pole Dconnector. This includes all necessary software which can be put into the 1/0 Pac. BPROM Pac This can be used to plug in your own software. ROM Pac Bua Sy.tem This buffered bus system allows you to software select and insert anyone 'of eight possible Pacs without having to turn off your system. BXPAN Monitcn: Bzpansion Program This powerful debugger/disassembler takes the ezisting 13 Monitor commands and expands them with 23 new ones. This program improves the old ENTER, MOVE and SET commands and adds others such as DA (Dump Ascii) HE (Hez -calallation) and Breakpoint manipul ation commands (SR, RB, DR, OS, DB, CO, ER, and EX). Leo Gielen, Zeishof 18, 6418 JJ Heerlen, The Netherlands, has the following 3 items avail able: EPROM Br_ This inezpensive eraser takes about 45 minutes to do its thing on four EPROMS at once. Monitor ROM Version 1.lB This ROM fues all known bugs while still maintaining the 1.0 jumpaddresses. It has a switch available to allow switching back and forth between Versions 1.0 and 1.18 if you should so choose. Game Interface I DA Converter This sys tem cont aJ.n~: 1) A j o~sti~ interface· 2) MuslC lDterface whlCh is compatibie with Arrington's st andard; 3) An amplifier;. 4) An 8-bit DA SORCERER'S APPRENTICE converter based on a DA chip, not a cheap set of resistor s. ERRATA: In issues 3.8, it was erroneously stated that the Vista disk system uses soft-sectored disks. We are advised that it should have read 10 hard-sectored. @ Wim Plaat at Triangle Systems advises that their Word Pac Plus program will not be released. They have had too many bugs to work out. Anyone with unresolved complaints about their order for this program, please contact Wim direct. Anyone using CP/M 2.xx and Spellbinder have probably noted occasional problems with lost files. The file is OK long when you go to load the file later. You know you wrote it to disk properly and got a message back as to how many characters were saved. What happened? There appears to be a bug in the latest version of Spellbinder. It does its own 10 calls rather than using CP/M's console input (CONIN), output (CONOUT) routines. Consequently, when you write a file to disk, it does not flush the buffer, to transmit the balance of the file and then write an end of file mark. To prevent this loss, do a query (Q command) of the directory immediatelr after saving a file. This will f ush the buffer and close the file properly. This has been working fine for me now. I've lost some big files by not realizing this I Lexisoft is aware of the problem and is rectifying it. We'll let you know about updates from Lex isoft as soon as we hear something. We have several Members who are Ham oper ators. If any of you would like to be in contact with other Hams flease let us know (include your 'ca 1 sign). We'll publish a list of such members. After trying several different cassette recorders, Steven Smouse, of Keene, Tez as advises that he hlKl the best luck with using the Sound Design model #7636 recorder using DAK Industries tapes. He found the recorder to be the most important factor in being able to LOad prorrams from tape with tape quality a c ose second. Late last year we had requested information on your dealings with Ezidy Systems, Inc. We were interested in approaching ESI with your problems to see if we couldn't help to lmpr ove the service. Since they have now gone out of business, there is no more point to this. I would like to thank all of you who took the time to respond to our request. Hopefull Yl just writing about it helped some 0 you to relieve yourselves of some pent up frustr ations. There were more than a few of youl In response to issue 3.6 article, "Galaxians Attackl", Lenn art Mansson, of S multronstig en, Sweden sends along the scores of some of his fellow students achieved while playing this game. Look at thesel. Kadn Kallmark 179440 Inge Melin 140320 Anders Kullberg 51980 June 1 & July 15. 1982 @ IN THE PUBLIC DOMAIN cc by Bruce Bl akeslee - CP/M & Micropolis Libr arian 906 Crestwood Road - West Westfield, NJ 07090 (201) 233-3185 (Evenings) This installment of my column will focus on the CP/M User's Group volumes. As I stated last issue, the CP/MUG has been around since 1977. To date, it has produced 59 volumes of public domain software. This is a treasure trove of useful programs and tutorial information on such topics as 8080 and Z80 assembly 1anguage progr amming, interpreter and compiler design and development, as well as game and util ity progr amming. The CP/MUG volumes are numbered 1-54 and 78-82. Volumes 55 to 77 were re-issues of early SIG/M User Group volumes. There was quite a row about CP /MUG re-releasing these volumes without the authorization of S IG/M. To my knowledge, this will not recur. I will not discuss volumes 55 to 77 as part of the CP/MUG as I will be covering them in a later column on the SIG/M volumes. Because of space limit ations, I will be giving a very general overview of each volume. For a more complete catalog of the CP/MUG and SIG/MUG volumes see the end of this column. Volume 43 ••••• Osborne CBASICZ Accounts Pal:able and Receivable (BUlS) Volume 44 ••••• Os orne General Ledger (BUGS) Volume 45 ••••• Osborne Payroll w/cost accntg. Vohme 46 ..... CP~ Utilities Volume 47 ••••• CP~ Utilit ies Volume 48 ••••• BDS-C SaJqIl er Disk Volume 49 ••••• Fortran and RAlFCR Progrmns Volume 50 ••••• P asc al Conp il er, SPEID Volume 51 ••••• Stage2 Macro Processor Volume 52 ••••• Utilities Volume 53 ••••• BDS-C Adventure Volume 54 ••••• Xitan Disk Basic Programs • •• Volume 55 - 77 are re-issues of SIG~ Disks Volume 78 ••••• Utilities Volume 79 ..... Modan Progrmns for Pl'&1I, and Smart Modem \a.lME 80 ••••• Crananco Structured Basic Prograns. Volume 81 ••••• CP/M Ut il i ties Volume 82 ••••• North Star BIOS routines 2 = Of interest fran the point of software devel opment. 3 = Of limited interest • Disks May Be Ordered Fran Me • At The Address Above • •• _8.00/disk • • • • • •• Please • Volume 1 ••••• Various CP~ Utility Progrmns 0) (2) Volume 2 ••••• Lawrence Livermore Basic and Disk Tiny Basic. Volume 3 Various Bas ic E Games (1) Actor, M..80 and Fortran-80 Code (2) Volume 4 Basic E COmpiler and Progrmns (1) Volume 5 Volume 6 Ut il i ti es and Ganes (1) Volume 7 PIIDr language (1) Volume 8 CP~ Utilities (2) Vohme 9 Gener al Ledg er by Bud Shmnburg er (1) Volume 10 ••••• Lawr ence Livermor e Bas ic (2) interfaced to CP/M Volume 11 ..... Disk Tinybasic and Disk Processor(2) Technology BASIC/5. Volume 12 ..... Pilot Interpreters patched for (1) CP/M. Volume 13 ••••• BASIC-E/CBASIC and MBASIC Games (1) Volume 14 ..... CP~ Utilities (2) Volume 15 ..... Ut il i ti es and non-BASIC games (2) Volume 16. .... As sembi eIS, Ut il i ti es, and KlO\L (1) Volume 17 ••••• Utilities, Denver Tiny BASIC (2) and NCN-BASIC gmnes. (2) Volume 18 ..... Math Routines, Moni tors and G.Sl<\L - toO CP ~ hook up. Volume 19 ..... Utilities - Hardware specific (2) Volume 20 ••••• BASIC-E and CBASIC Programs (1) Volume 21 ..... Microsoft Basic Programs - Games (1) Volume 22 ..... Monstrous Star Trek Ganes - too (1) big for most systems but can be cut down. Volume 23 ..... SIDIC Compiler (1) Volume 24 ..... CP~ Utilities, Macro Libraries (2) and RAlFCR. (1) Volume 25 ••••• Utilities, CP~ S]DIC ( 1) Volume 26 ••••• MBASIC and KR1R.AN Games (1) Volume 27 ••••• MBASIC Ganes (1) Volume 28 ..... Bas ic-E Ut il it ies and Games Including a Data Base System and and ALaL 1 ike 1 anguag e. Vol ume 29 ••••• ASM Ganes and Ut il i ti es and CP ~ (2) BASIC-E Vl.4 Floating Point Source. (2) Volume 30 ••••• CP/M BASIC-E Vl.4 PLM Source Volume 31 ••••• Tarbell Basic Manual and Source (2) (2) Vol ume 32 ••••• Tarbell Basic Source Volune n ..... Search and Rescue Programs 0) Volume 34 ••••• SAM76 Language (1) Volune 35 ••••• FELIX - Graphics Animation Sys. (2) Volume 36 ••••• Assemblers, Editors, and Uti!. '5 (2) Volume 37 ••••• CBASlC Programs (1) (2) Volume 38 ..... Utilities and FASf (1) Volume 39 ••••• Music Programs (1) Volume 40 ••••• Disk Cataloging System Volume 41 ..... Ham Radio Ctess Progr mns (2) Volume 42 ..... Dis as sembI eIS, Ut il it ies (1) June 1 11£ July 15, 1982 (2) (1) (1) (2 ) (1) 0) (1) (1) 0) (1) (2 ) • • • • _3.00/disk - you supply the • • media FCIlMATIID. • ••••••••••••••••••••••••••••••••• C[ (1) (1) (1) (1) (1) ••••••••••••••••••••••••••••••••• ••••••••••••••••••••••••••••••••• • Not at ions Us ed Bel ow • •• 1 = A volume most will want •• • • • • (1) - I supply the media. include a minimum of _1.50 Postage. • • • •• • ••••••••••••••••••••••••••••••••• I realize that the above descriptions are scanty at best. They are designed to give you a brief idea of available, low cost softwate. J can provide a disk with a full catalog. I will also provide the CP /MUG and SIG/M programs found on the above disks at the costs outlined above. There are now 59 CP{M disks and 69 SIG/M disks for a total of 128. That is a ot of software. Please realize that much of the software available must be converted to the Micropolis disk format because the sector skew is different from standard CP /M 8", single density disks. Also, there are often machine specific routines in much of the software which must be changed to work on the Sorcerer. The Monitor calls will be different, the video is found in a different area, and the screen size is non-standard just to mention a few of the problems. For me, however, this has been the interesting part. With the ASM files to work from, I have learned a great deal about my machine and about progr.amming. Getting one of these programs to run is a real JOY. Don't get me wrong. Many of the programs contained in the CP/M disks will run without modification. Don't ~e put off however, at having to rewrite something to make lt run. It is a great way to learn and contribute. If you are like me, you will struggle at first just to make the programs run. At first, ignore the inelegance or the optimization of the program. After you have some experience, you will find yourself adding conditional IF ENDIF Jrogram segments so those who have a Sorcerer can easily ter the program for. themselves a,!-d stil~ leave .the original code untouched. Fmally, you will begm to hnd ways to make the pro¥rams run more efficiently, correct bugs you and others dlscover, and. make e~tentions. to .the programs to provide for more options. It s a fasanatlng task. In the next issue, I will discuss the software available on the SIG/M disks. I will also announce the first volumes of the Sorcerer User Group. At this point, I have 4 volumes that I am editing. They will be !Dad~ up of progr.ams submitted by Sorcerer users and will lnclude TIP files, BASIC Pac files, and other software designed to run on the Sorcerer. I mention this now because I would like each of you to begin thinking about submitting. programs YOU h~ve written to the SUG. Anyone who submlts programs on dl.sk will receive in return one disk of software of your chotee free. The only thing I request, and I wil~ be careful ab~ut this, is that you submit only public domun software whteh you have written. Do not submit software you have purchased. If you have any questions I would love to talk to you. can be reached most evenings at (201) 233-3185. Call me, I love to chat about software and I would love to hear what you are doing with your Sorcerer.G SORCERER'S APPRENTICE 75 SOUND BPPBCTS by Thom as J. Sweeney Thia is for all of those who own a Sorcerer', Voke and have any kind of space game proJlram •. The following . routines were or18inally designed with Star Trek in mind but can be used in any of the space game.programs whkh have been devised over the years. Phueu POR 1=1 10 30 aJI' 255 ,47 POR J=1 10 15:NBX1' J aJI' 255 ,45 NBXl' 1 LISTING ; A ISS :%C :%D :%4 :%5 f :%6 0= $3 :%1 = %6 - %5 + 1 t 2" .2" arr RB'ruRN Red Alert POR JJ=1 10 5 POR 1=25 10 45 arr 255,1:OUT 255,1+1 POR J=1 10 10:NBX1' J NBXI' 1 arr 255,255 POR J=1 10 30lNEXT J NIlXI' JJ RB'ruRN lUioloO Ret1Uo Fire REM 10= # OF KLIl'IiQlS POR JJ=1 10 (10*2) POR 1=50 10 25 STEP -1 arr 255,1 NBXI' I arr 2" ,255 REM RAMXM DELAY BB'lWBEN SKJI'S POR J=1 10 (INT(RND(I)·500+5» NIlXI' NBXI' J RB'ruRN Photoo Torpedo POR J=1 10 40 arr ,50 NBXI' J POR 1=50 10 25 STBP ~1 arr 255, I lOUT 255,1+1 NIlXI' I J 2" arr 2" ,2" • RB'ruRN «< CIASSIPIID ADS .' »> _1/line _1/line =============================== FCIR SAUlI '18K SOIICCI:U II, 15" mcmhor, D-Paq Progumll Miaobame, 3 games _1195. NBWI 1 BWe Pac _45, 1 Dev. Pac _65. Writel Steve ClcuRh. 6444 W. Pinecone Dr., Michisan City, Ilf; 46360. =============================== COIIPLBTB LBTTBR MACRO FOR S.BLLBlHDBR VBRSION 5.10 by Daniel Edward Behmer Ita a miuocomputer consultant who does work in many parts of the world, I find that my SPELLBINDER Word Processor is one of my most frequeotly used pieces of computer loftware. It is not unuaual for me to lend out ten letters a day, each CJuite iadividual in chsr acter. Therefore, it wu absolutely necessary that I write a Macro in SPELLBINDER's MSPBAK language t.o take care of most of the tedious chores. Included at the end of the Macro yc;N will find complete instructions. The ule of this Macro hu increased my own letter writing production by 100% and I hope that you find it useful u well. 76 COMPLETE LETTER MACRO FOR SPELLBINDER Version 5.10 28 = "1" = "2" = 2 = $3 :%3 U + U :pr "U/U3/" :pr "LETTER WRITING SYSTEM MACRO - by Daniel Edward Behmer n :pr nU3/U3/" :pr nTYPE (1) FOR FULL SYSTEM: *********************** #13/ n :pr n * * 113/ n :pr nAIl space & Letter Options * Note: letter must * #13/ n :pr nFi1e Card * have () after the * #13/ n :pr nEnve10pe * address. * #13/ n :pr nLetter * * U3/ n :pr nFi1e Copy * FULL INSTRUCTIONS * 113/ n :pr n * AT END OF THE MACRO.* 113/ n :pr "TYPE (2) FOR SHORT-CUT TO: *---------------------* 113/ n :pr n * Options set at * U3/ n :pr "Envelope * initiation: * 113/ n :pr "Letter * * 113/ n :pr "File Copy * single space letter * 113/ n :pr " * space not expanded * #13/ n :pr "TYPE (3) FOR SHORT-CUT TO: * your name only on * 113/" :pr n * return address of * 113/ n :pr "Letter * pre-printed enve1ope* 113/ n :pr "File Copy * * U3/" :pr " *********************** 113/ n lin " YOUR CHOICE? " %E :%F = "2n Ion %E%F / 54 72 :pr nU/n3/ n lin "Type (1) for Single space; (2) for double space n %C :pr "1131" lin "Type (1) for expand space; (2) for regular space n %D :pr nU3/ n :pr nType (1) for your full name and address on envelope 113/ n :pr nType (2) for your first name only on pre-printed 113/" .:in n envelope --- n %4 :pr nU3/" lin "Type (1) to file card; (2) to envelope; (3) to letter n %A :%B = n2 n Ion %AtB / 54 72 :pr "U3/ n lin nInsert the FILE CARD, then (CR)n %A y 1 90 110 2 0 1 1 65 2 1 0 0 25 10 pU bU :pr "U3/ n lin "Insert the ENVELOPE in the Printer, then (CR) n %A y 1 90 110 0 0 1 1 65 2 1 0 0 25 10 yt 0 2 0 0 12 12 7 3 3 0 pI/Dr. Daniel Edward Behmer ;Insert your name here Ion %4-2 / 64 / pI/Suite 611 IOn the opposite PL lines p1/5440 Cass Avenue ;insert your return address pI/Detroit, MI 48202 las in this example Ion -1 65 3 pI pI pI pI yt 0 2 0 0 12 12 6 25 25 0 y 1 90 110 0 0 2 1 65 2 1 0 0 25 10 p%3 bU Y 1 90 110 0 0 %C 1 65 %D 1 0 0 25 10 yt 0 2 0 0 12 12 7 10 10 0 :pr nU3/" lin nInsert PAPER for letter, then (CR) n %A y 1 90 110 2 0 %C 1 65 %D 1 0 0 25 10 pa ff SORCERER'S APPRENTICE Jtme 1 at July 15, 1982 g ~ ~,. f'F'Y ~ t :pr njH3/" :in "To print a FILE COPY, (CR) , otherwise (ESC) to END" %A pa ff t *** INSTRUCTIONS *** , This Macro was written for Version 5.10 of ,SPELLBINDER. If you are using an older version, you ,must change the (y) and the (yt) reformat lines since ,the older version has different reformat sequences. , The purpose of this Macro is to increase the pro,duction of correspondence in an office by automating ,several steps which are part of an effective system: ,the typing of the name and address on a file card if ,desired, the typing of the envelope with option for ,full return address or one line for pre-printed envelopes, ,the typing of the letter with whatever spacing options ,have been chosen, and finally typing an additional copy ,for the files if desired. ,SPECIAL DIRECTIONS: , You should insert your own name and address in place ,of mine in the Macro. If you have only a three line ,address, replace my fourth line with a npL". ,CAUTION: the lower case PL (pI) on my printer makes no ,distinction between lower case L and the numeral (1). ,The command on those lines is in fact PL in the lower ,case. DO NOT type empty carriage returns for the OPTIONS. ,You must type in the number of the option you desire. ,However, when a prompting line shows a (CR). in that ,case only an empty carriage is given to indicate that ,you are ready for the Macro to continue. , I use a NEC Spinwriter 5510 as a printer. On the left ,side of the platen is an impression lever. I move that ,back one notch. This allows me to safely insert either ,a file card or envelope ON TOP of my tractor fed paper. ,Naturally, just before doing that I flip the paper tension ,lever on the right to ON in order to hold the card or ,envelope. Since I have not actually disengaged my paper, ,it is a simple matter to right things again and continue ,on with the printing of the letter. , This MACRO automatically counts the number of lines in ,the address. Therefore, it MUST have a mark (A) on the ,line following the address. Here is a sample letter format: Mr. John Brown 123 Main Street Cleveland. OB 46121 A( (Note the mark and the CR which creates a spacel) February 15, 1982 Dear Mr. Brown: Thank you for your letter of last week. I am planning to visit your office on Saturday. Sincerely yours. Your Name @ After you type the Macro into SPELLBINDER using the EDIT mode, you save it on your 'A' drive with an appropriate name such as 'A:LET.WPM' • Please note that the extension is required. When you want to use the Macro at the beginning of a writing session, use the COMMAND 'AD' which will ask you the file name. At that point the Macro automatically initializes. For subsequent use once it is in the buffer, simply use the COMMAND 'A' to initialize the Macro. , If you have any questions. please feel free to write ;to me by letter. My address is in the Macro. My Source ,address is TCT534. Daniel Edward Behmer. IWle 1 & July 15, 1982 SORCERER'S APPRENTICE FROM THE VALLEY by Bob Freeman I have just spent a wonderful day going to the different little hole-inthe-wall stores here in the Santa Clara Valley. Most of them had used equipment of more or less the same quantity and quality. A few stood out. They had parts or equipment that would delight the Sorcerer user who has a low budget, plenty of time and some technical background. The first is South Valley Electronics, Santa Clara California. Outside of Challenge Computers (the company into which ESI was absorbed) South valley has the largest suppiy of logic boards, cases, and printed circuit boards (PCB) in the USA. They have unpopulated S-100 interface cards and the S-100 configuration PROM. These cards are not the S-100 box PCB, but looks just like an S-100 card. The Sorcerer connects through the 50 pin buss expansion to the top of this card. The card can occupy any slot in the S-100 mother board. All the interfacing I do to the 5-100 world is with this card. A 12 slot S-100 mother board and power supply can be scraped together for under _125. The total cost would be under _225. The second place of importance is Anchor Electronics, Santa Clara California. They are the sole supplier to the end user of California Computing S-100 bare boards. The bare board runs for under _50 and boards as Kits are under _200. I am particularly interested in the soft-sectored disk controller (CCS 24228) which lets me use use my Exidy software. It allows anyone who now has a Micropolis Quad density hard sectored system to convert to the soft sectored and use the same drives they have now. It does require two drive boxes and a program that allows auto transfer sector by sector. I can provide that service at a _5 copy fee + disk cost (unless disks are provided). this controller's many options make it great I I can run 8" and 5 1/4" disks at the same time. Also, if desired, it will auto boot, can be polled or interrupt driven, etc., etc. In the future, if I go completely S -100, I can run most of my Sorcerer CP/M programs, with little modification. I had to change the special 74LS237 program PROMs and the Monitor PROM to allow it to work with the Sorcerer. I will be glad to provide the program listing for the 74LS237's free or programed PROMs for both the 74LS237's and 2716 for under _ 80. The best part of this controller is the cost. The Bare board comes with excellent documentation and costs _49.95 plus tax. The Kit comes with the board and all parts and sockets for _184. It took me about 4 hours to solder and test the board. The total additional cost would be under _300, the cost of one drive. Anchor Electronics also has Bare Boards for 32K static RAM (uses 2114's) priced at _44.95, 64K drnamic RAM kits for _174 (inc udes 200ns '1116's), and 10 Kits with both serial and parallel ports from _165 to _185.49 77 RANDOM BXPANSIONS by Bob J. Freeman The following was precipitated by the last Random I/O.column. SYltem aashes can and usually ate cauled by 7.. LS2 .. 1 data rud chips 100ing theit pull up ability. (see ramapan.usr) Word Processor Pac failures in most Cales ate due to the BPROMS becoming UNprogramed. The NBC 1500 and 2500 series printer I will print bidirectionally by throwing switches. A user program is neceslaty to drive the bidirectional feature of the printer. The Eddy PPRINT program will drive the Word Processor Pac. The disadvantage is that the switch needs to be thrown back to use the Sorcerer's internal printer driver for patallel printers. Note the NEC printers tend to hang up when firu turned on or when the Sorcerer is first powered up. This can be overcome by adding a 2.2k resistor from IC8H-20 to IC8H3 (Sorcerer I) or IC9H-20 to IC9H3 (Sorcerer II). The EXIDY disk controller cannot read/write hud sectored disks. It is designed atound the Western Digital controller chip 1793. The 01 series of the WDC chip hal Jjrograming problems. If your contr ler hangs up atart by replacing the 1793 with the B02 series chip. The Sorcerer CAN be run at .. mhz. It requires the following timing modifk ationsl 1) RAM cycle time (may require replacing RAMs) 2) RAM RAS to CAS hold time. 3) Double the CPU to 4.213MHZ .. ) Use Z80A chip. 5) Replace various chips that may not meet theit specs. 6) Replace the BRUCE PROM if a MMI chip. 7) If uling disk rewrite the disk 10 to allow double the wait time for head home command. The Hacker's Manual is a compilation of Tech notes, engineering notes, and des_ign chanBes I have made to my machines and I believe will work With others. The Manual includes the switching power supply for the Sorcerer II, 56K dynamk RAM, using the new 64K ~" ·Real time clock, and programable interrupt controller, and many more things. The manual ia _15 with updates at least once a year for one year. I have a Sorcerer II working at 4 mhz with lOft and hard sectored controllers. I don't suggeat this change be done by anyone who cannot manufacture the complete timing diagram for the Sorcerer. I don't guarantee that everyone can get theit Sorcerer to work Without a lot of effort. (See Hacker's Manual for hardware changes). Keyboard bounce is caused by not enough tenlion on the leaf spring in the key. This can be increased by bending the leaves towards each other with care not to crease the spring. (See Hacker'. manual for suggested method). 78 The 56K RAM change should only be done by a competent technician. It requires a lot of Oltting and jumpering and has only been tested on the Sorcerer II. If there is anyone wil1in~ to offer their Sorcerer I machine for a 4- 6 month period, I will do the modification and supply the parts free. (Labor is _120 and patts ate about _90 as of June 82). The switching power supply is capable of 5 amps at 5 volts with an operating temperature of 37 degrees Celsius, warm to the touch. There ate no HOT components. The power supply can be purchased 3 ways: 1) Bate board with schematic (no technkal support) - _35. 2) Board (not an old power supply board), Patts, schematics and technkal support (your phone calls) - _100. 3) Completed board with watranty - _195. Is there a way of using more than 56K (57344 bytes decimal) of RAM with the Sorcerer? If so, how may this be accomplished? The Sorcerer has two program portion can be a I and 48K (49152 bytes Sorcerer I and II have 3K portion of RAM. separate RAM blocks: 1) program, 2) display. The maximum of 32K (33088 bytes decimal) for the Sorcerer decimal) for the Sorcerer II of RAM addressing. Both (3072 bytes decimal) of RAM addressing for the display For those of you without the Sorcerer Softwate manual, the program RAM is free for any non-ROM Pac program from address OH (0 decimal) to within 144 bytes of the top of RAM. The last approximately 80H (l44-decimal) bytes ate used by the Monitor. ROM Pac programs use the lower memory OH to 1FFH (0 to 512decimal) for theit work atea also. The disk operating memory at the top. Program memory from to about 3200H (0 to program uses about 8k (8129-decimal) bytes of program Exidy CP/M (r) and Micropolis MOOS (r) also use the OH to 100H (0 to 256-decimal). MOOS Operates from OH 36800 -decimal). These atea not avail able to the user. So how does one get more memory? Well IIII For the Serious User there ate two alternatives. This first is using magnetic storage the other is to increase RAM. Both require modifying present softwate. And you thought there was a simple answer ...fooled youl Testing dynamic RAM can be long. confidence. Here are some hints to help you gain On Power up do a "DU" of program RAM. >DU 0 Addr 0000: 0010 : 0020 : 0030: 0040 : 0050: 0060 : 0070: 0080 : 0090: OOAOI OOBO: OOCO: OODO : OOEO: OOFO: For example: FFo 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1 2 3 4 5 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 9 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ABC 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 00 FF 00 D FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF This is the dump you would see if you had Mostek 4116 RAM chips. The key is that there is a pattern to all Dynamic RAM. Even though you may not see this ex act pattern, tliere should be a pattern. For ex ample, a pattern like: 0000: 00 7F 00 OF 00 BE 02 FF 80 F8 OB 7C 00 7F 00 7F could indkate: a) A bad 74LS241 data buffer. b) Low power supply voltages. c) Possmly bad RAM chip. (IC BC or IC 4D) Testing of the access speed, which is more realistk than access time can be done by using the TE test. The TE test uses many calls whkh require stack PUSHes and POPs. The PUSH and POP ate the fas.test instruction in the Z80 set. Statt by letting the stack in the 16K RAM block to be tested for speed, then test a 256 byte block of RAM in the same 16K boundaty. EXAMPLE: ENO >0000: 21 LL HH C3 06 EO/ >GO 0 The LL stands for lower 8 bits of address and the HH stands for the Higher 8 bits of addr esse If you have any questions, send them to me via SOURCE at mail at P.O. Box 70310, Sunnyvale, CA 94086.8 SORCERER'S APPRENTICE TC0284 or by June 1 & July 15, 1982 m I C mentzer electronics 590 South Hill Boulevard. Daly City. California 94014 (415) 584-3402 *********************************** Exidy 1.1 Monitor ROMS $ 45.00 2 only S-100 10 cards, populated and tested $225.00 1 only used Exidy S-100 box (Plus Shipping) $350.00 CP/M 2.2 For the Exidy with Micropolis hard sector $190.00 drives only. (CP/M is a trade-mark of Digital Research) CP/M catalog program, good for cataloguing your CP/M disks $ 75.00 dBASE II Relational Database Management Program $595.00 SPELLBINDER Word Processor $395.00 Now also for the Exidy 77 track soft sectored drives. SPELLCHECK Dictionary program to work with $295.00 SPELLBINDER Some Exidy programs on tape. call for listing. We have Godbout Electronics, and Morrow Designs hardware. Check with us for all your hardware needs. ********************** C[ MASTER CARD and VISA on orders of $50.00 or more. Shipping will be added to all orders. California Sales Tax added for CA residents * * * * * * * * * * * * * * *** * TERCENTENNIAL TECHNICAL Video and Data Communications Technical Services * * * * * ** * * * * * * * ** * * For quality Service on the following equipment: Exidy Sorcerer Computers - Expansion Interface & Box Radio Shack••• all models - Zenith/Heath - Atari Leedex, Sanyo, Electrohome.••••••• and other brand monitors Micropolis, Vista, Shugart, Percom, MPI •••and other drives Modems, Dot Matrix Printers.•••••••••••••••••• most brands Memory upgradES and new Monitor 1.1 PROM's available. ServicES available on most home entertainment electronics: Solid State Television, foreign and domEStic brands. Video Recorders-- - Video Cameras-- - Video Monitors Stereo Receivers---Audio Recorders---Rooord Changers Video Switchers---Time/Date Generators---Video Disc Systems Video GamES: Atari and others. For above ServicES (Tech. lic. #8228), or consultation, call or write: Jack MacGrath TERCENTENNIAL TECHNICAL @ P.O. Box 5 70 Tercentennial Drive Billerica MA 01821 Phone, after 6:00 pm EDT, (617)667-8272 (This is now a part time businESs, but with YOUR help, I hope to soon make it FULL time and render faster servICe!) SORCERER'S APPRENTICE 79 THB OPPICB SORCBRBR by Roger Hagan Application Note: Transferring Program Output From BASIC Programs to Word Processor Since I am particuiady interested in relating the Sorcerer's Word Proceslor Pac to business uses, I sell a disk full of utilities and techniques called "The Word Processor Augmented", whkh il an conltant evolution. (Ownerl can eJ:change old editions for new ones free.) A recent addition to that disk is the following technique for capturing thr output of a lrogram in BzBuic u a screen, an placing that SCreen into the Word Proceslor for incorpor ation into a teu, I I well u further dressing, 1abell.! etc. The system requires disk capabilities u shown here. It is useful when a Buic program draws a complicated SCreen full of data, such al my Spreadsheet program does, or a graph, al ita Viz-a-plot module does. The technique should be applicable to anf program, even ones not in Buic, 10 long u a method of triggering the disk lave without affecting the screen can be found, and the screen image is made of Aleii symbols which the Word Proceslor will accept. Spellbinder should work u well u the Word Proceslor Pac u the receiving system. The Buk:-to-WP Truder The Bddy Word Proceslor Pac is of great value I I a SCreen editor, and is the euiest way to dreas up 'program :zut to be printed. ThlS note esla one method to interface disk Buk program output with the Word Procalor P &Co It would apply u well to a disk-bued word processor like Spellbinder. It will also Ihow bow to enter a forbidden autocommand to the Word Processor in order to replace non-Aleii characters. (See The Graphic Fix below.) One advantase of a memory mapped video Ifatem is that the screen contenta at any momcot may be treated u data and laved. Thil can then be loaded u a Word Procalor file to integtate with other tat. This is the !lPproach I take with SPRBADSHEET in Bzbuic. There is now a "z" command to lave the SCreen. The trick is to give the command to save or more the .creco data without diatuming the screen, and to postpone naming the file until after the save for the lame reuon. In gcoeral, two approacha to the transfer of screen data could be taken. One il to work with the Word Proccalor Pac in place and move the Kreen to ita work area, then load the WP diak driver program which loads an· initialized work atea to RAM without closing off the memory file. This approach amuhes the fiilt 16 aga of the previoul program or anguage whkh produced the SCreen image, 10 a repair version of the prog_ram (or language) must be available on diak to reload these 16 bottCID pages of the TPA and ezccute a warm start. In Bzbuic a warm .tart is Go 100 anyway, so no changes would have to be made before saving 16 pages of Ezbuic as, say, EXBASA.COM. This method is illustrated at the end. (See Direct Use). r 80 Another approach would be to move the screen RAM into the TPA and save it under CP/M. This means the Pac need not be installed while working with the Basic progum. This method is illustrated first. It is not necessary to cdt Buic to save the screen. Since we may save strings of up to 255 characters with Basic disk I/O routines, we need only fool Basic into thinking that the screen area of RAM is 8 consecutive strings, 7 of 256 and 1 of 128 characters. The following code\ used in the latest verSlon of my SPREADSHEET program, achieves this. The ine numbers relate only to that program. A. The main program initialization must include this: 912 EF=aH1A:FOR I=OT07:SC_ (I)="":NEXT This takes care of an end-of-file mark on the tape and declaring the big strings so that VARPTR can find them. B. At the time of the call, the screen address values must be poked into the variable pointers for size and location of the SC_ strings, and then the strings sent to disk. A temporary name is given the file automatically and changed after the file is saved, 10 as not to disturb the saeen, since the strings are sent to the disk buffer direcdy from the screen RAM. 700 FCR 1=0 10 6:V=VARP'IR(~(I»:PCKE V,&HF'F:PCKE V+l,&:H80: PCKE V+2,aHFO+I:NEXI':PCKE V+3 ,arH7F: PCKE V+4 ,&:H80:P'CKE V+5 ,aHF7: NJN ~(0-7) POINI'S 10 SClUlBII RAM IN 8 SI'RINiS 720 (PEN ''0'' ,#1, "SCREEN.WPF" 730 FCR 1=010 7:PRINI' #l,~(I);:NElCI':PRINI' #l,EF 740 ClCSE #1 750 PRINI':lflPur "NlIl1e for this file";NA_ 760 NA_=NA_+" .WPF" 770 NIME "SCREEN.WPF" AS NA_ 780 PRINI':IflPur "NCJW";I~:OOIO 114:RIlM To the menu choice processor REM C. At the end of the screen display, the program is altered to provide for one(ThlS is not essential if the cursor ends up somewhere other than at the bottom of the screen where a scroll could lose a line from screen RAM, since it will be easy to remove the command from the screen image once it is ln Word Processor.) key input to make a command choice. 30790 amSCR 50 27 : PRINT "Menu": IN_=INPur_(I):OOIO 114: REM the menu choice processor. A SAMPLE SCREEN WITH GRAPHIC lOI DEC JAN FEB MAR APR MAY JUoI JUL AUi SBP 4000 3839 3678 3517 3195 3034 2873 2712 2551 2390 2229 2068 1907 1746 .1585 1424 1263 1102 941 780 619 458 297 136 -25 114 is FIX ocr ••••••••••••••••••••• 4 ___4 ___4 ___4 ___4 ___4 ___4 ••••• 4_4-1 / / ............ / ...................................... . 4/ / · ....... 1......................................... . ·....... ......................................... . ·....... ......................................... . _9_9_9_9_9_9_9_9_9_9_9 • • 9_1_4/ •••••••••••••••••••••••••••••••••••••••••••• Menu 1Wo ezpense factors: 4=rent 9=salaries. (Clearly it would be easy to Bet rid of the unwanted "Menu" prompt above, and to add label. and a frame if desired.) D. THE GRAPHIC FIX In the above eJ:ample, the SPRBADSHBET graphing module uses a Sorcerer graphic character for the vertical line to line up well with the slashes. This must be replaced by a vertical line from the standard Ascii set to be handled by a printer and by the Word Processor. This has been done above. When this chart first comes on screen, therefore, an unacceptable reverse video square-O graphic is seen in place of the vertical lines. This must be removed with a search-and-replace. But the graphic character cannot be entered on a command line -- no reverse video character can be, including underlined lettersl So the command line must be entered from the Monitor, and the command initiated by a Monitor GO command, as shown nezt. SORCERER'S APPRENTICE June 1 & July 15, 1982 ) ============================================================== I n This Ascii line, n 100 S Iii /I (a) .. , iI represents the graphic char acter to be replaced, whose code is 80H. (The code for underlined space is 100H, 80 plus 20, the s,?ace with high bit set.) Enter the l1ne at 600H, WP's command line buffer. >EN 600 600: 31 30 30 53 2F 80 2F 7C 2F mJl XX> CEE5 The file will return to the screen with ~e char acter repl aced. Direct UIC The lines of Basic above were broulJht in from the program by loading the program in Exbasic with WP Pac in place, listing the desired lines, going BYE into the Monitor and commanding: >MO F080 F7FF 80F >EN F8F F8F: 031 >GO 0 A>DISKDRIV This brought the lines to the editing screen. They needed some cleaning up. Very often, removing a leading space at the top drops many lines into alignment. When they were clean, the rest of the program was loaded to join them in the work space and things were bloc-moved into place and resaved. This concludes the .DOC file on the Basic-to-WP Transfer. Next issue I will show how to merlJe the screens to create long -line pnntouts of all the columns in a broad spreadsheet. In selling word processing systems to writers, I find them especially interested in a method of counting the number of words in their mmu~~~ ~~ are p~ ~ ~ word, or write to a specified lenlJth in words. It happens that the eas1est utility I've seen to do it is literally given away as an extra when fou purchase Staley's "SPELL" spell1ng checker program. It is a separate program called "FOG", the purpose of which is to show both word count and what proportion is "big words". With a text in RAM. one exits to CPIM and types FOG. and in a second or two 1S given his word count and rel ated information. The Spell program itself will be compared to SPELLCHECK (Lexisoft's SPELLGUARD) in my next column, but I can point to one respect in which it is unique - it can check a Word Processor text in RAM as well as one on disk. so short letters need not be saved first to be checked. However, it does require a disk system, since the dictionary files are called in from disk with a series of disk accesses. I like these two progr ams enough that I am planning to market a version of the "WP Augmented" disk that includes them. As you will see nex t issue, there are utilities in Spellcba:k not offered in Spell, but the cost is a lot higher too •• June 1 & July 15,1982 THE HAGAN SPREADSHEET Copyright c 1981 by Roger Hagan Associates. 1919 Belmont Pl. E., Seattle. WA 98192 USA (continued from page 67 of issue 4.3) *** _____________ nLn Move left one (or 1/2) 4 col sector *** 19599 IF FG=l THEN 11790 19593 SC=SC-4:IF SC ROWS THEN SR=ROWS-SZ+1 R=SR:CH=2+J-1 GOSUB 10990 GOTO 19215 _______________ nU n Move up a 20 or 10 row sector --------- 11500 11593 11510 11520 11600 11610 IF FG=l THEN 11909 SR=SR-SZ IF SR COLS THEN SC=COLS-3 GOTO 19275 *** *** --------------- These take over if nXn expand mode set --*** 11709 11710 11890 11999 11910 *** *** *** SC=SC-2:IF SC "Y" THEN 13040 13038 PRINT SPC(10) CHR$(27) "9 n : REM ESC 9 sets left margin *** (on some printers like Diablo and CItoh) 13040 RETURN *** --------------- Turn printer off ------------------------13959 POKE -16432,249: REM SE O=V (E9F9,equ E91B) 13060 POKE -16431,233 13080 POKE -16434,64:REM BAUD 1290 13090 RETURN *** *** _______________ nFn Display formulas ---------------------- *** *** --- Starts with clear lower screen routine used also by amorization program. *** *** 14000 14002 14003 14004 14005 14010 OUT 0,20:FOR 1=1 TO 9:PRINT SPC(62) " n:NEXT OUT 0,20:FORN=0T062:PRINTCHR$(184);:NEXT:PRINT IF IN$=nJ n THEN RETURN OUT 0,21 FOR A=l TO REL:B=l :REM A=RELi, B=STAGE IFCN(A,B)=0ANDDC(A,B)=0ANDOC(A+1)=9ANDOC(A+2)=9THEN14259 *** *** If not constant and no 2nd operand in this relation and no *** or zero column address for next two results then stop. *** 14920 GOSUB 700 14040 GOSUB 730 14059 IF EI(A,B)=0 THEN PRINT n.":GOTO 14250 14055 FOR B=2 TO 5 14060 IF CN(A,B)=0 AND DC(A,B)=0 THEN 14250 14070 GOSUB 700 14080 PRINT FUNC$(A,B) FAC$; 14090 IF EI(A,B)=0 THEN PRINT ".n:GOTO 14250 14100 NEXT B 14250 NEXT A 14255 IF FRA(1)=0 THEN PRINT:PRINTnNo addition specified.n:PRINT:GOTO 14360 1~260 PRINTnAdd rows n ; 14270 FOR 8=1 TO 3 14280 IF FRA(S)=0 THEN 14300 14290 PRINT FRA(S)nto nLRA(8) "onto row n STT(S) CHR$(l)n;n; 14300 NEXT 14310 PRINT:PRINT nexc1uding n; 14320 IF EX=0 THEN PRINT nnonen;:GOTO 14350 14330 FOR 8=1 TO EX:PRINT n,"XC(S)nNEXT 14350 PRINTn.n:PRINT:PRINT 14360 PRINTnReview the formulas. If any derived values (left of =)"; 14363 PRINT n are used n 14370 PRINT "as arguments in another formula (right of =), n; 14373 PRINT "the relation which n 14380 PRINT nderives the value must occur ahead of that n; 14383 PRINT nwhich uses it. (Menu)n 14390 INPUT IN$ 14400 GOTO 114 15000 REM ------------------- Delete a formula ---------------15005 PRINTCHR$(12) 15907 A=l 15010 INPUT"Nurnber of the formula to be de1eted n ;DL 15020 FOR I=DL TO REL 15023 IF A=l THEN 15030 15025 FOR I=REL+1TODL+1 STEP-1 15030 OC(I)=OC(I+A):OW(I)=OW(I+A):DJ(I)=DJ(I+A):DK(I)=DK(I+A) 15040 FOR N=l TO 5:CN(I,N)=CN(I+A,N):CO$(I,N)=CO$(I+A,N) 15950 DC(I,N)=DC(I+A,N):DR(I,N)=DR(I+A,N) : FUNC$ (I,N) =FUNC$ (I+A,N) 15060 EI(I,N)=EI(I+A,N):NEXT N:NEXT I 15070 IF A=lTHENREL=REL-1:GOTO 15085 15080 REL=REL+1 15085 GOTO 14000 16000 REM ------------------- Insert a formula ---------------16005 PRINT CHR$(12) 16010 INPUT"At what number will te list be opened for insertionn;DL 16020 PRINT:PRINTnOn seeing formula #nd1 nrepeated as #"DL+1 n, command 'R ' and" 16030 PRINTnspecify #nDLnfor revision, then enter the Relationship to insert. II 16040 A=:l:GOTO 15025 *** *** (continued on page 84) SORCERER'S APPRENTICE 83 (SPREADSHEET continued from page 83) *** _______________ nRn Define relationships section ---------- *** 28888 IF OC(REL)=8 THEN 28818 28885 REL=REL+l 28818 IF P=8 THEN PRINT CHR$(12) 28812 O$="E" 28828 PRINTnRelationships are entered in the form:" 28848 PRINT:PRINT "Destination value at (column, row) is "; 28843 PRINT "the result of Data In 28858 PRINTn(column, row) affected by either a Constant or "; 28853 PRINTnother Data, via" 28868 PRINT"a Function (* / + or -). If the result of this n; 28863 PRINTncalculation is" 28878 PRINTnan Intermediate element rather than the final n; 28873 PRINT"Entr¥ for then 28888 PRINT"dest1nation position, queries will prompt "; 28883 PRINT"the next constants," 28898 PRINT"data, and functions needed to complete the n; 28893 PRINT"formula. n 28128 PRINT:PRINT"The relationshi~s are numbered as you "; 28123 PRINTnenter them, and to be 28138 PRINT "changed must be called by number and n; 28133 PRINT"re-entered completely." . 28148 PRINT:PRINT a»~»~»~»~ Do not enter straight columnar "; 28143 PRINTnor row addition in" 28158 PRINT nthis section. Later queries will offer that "; 28153 PRINT"oftion.":PRINT 28168 PRINT n Enter column, row' wants numbers with a n, 28161 PRINT"comma between them.":PRINT 28163 PRINT nDerived values used as arguments must be n; 28164 PRINT"derived before use. n 28165 PRINT:PRINTnThis will be Relationship i"REL".n:PRINT 28168 O$="N" 28178 PRINT "You will be.,asked column and row numbers for n; 28173 PRINTnthe destination n 28174 PRINT "value and all the argument values. You may now:" 28188 PRINT n Delete a relationship formula,n 28181 PRINT n Insert a formul, reV1ew the Sheet," 28182 PRINT n enter Column addition parameters onl¥,n 28183 PRINT" pass on to Enter the next relationsh1p,n 28184 PRINT" or enter the NUMBER of a relationship to n; 28185 INPUT"be re-defined. ";0$ 28193 IF LEFT$(O$,l)="I n THEN 16885 28194 IF LEFT$(O$,l)=nS" THEN GOSUB 2838 28195 IF LEFT$(O$,l)="C n THEN GOTO 28528 28196 IF LEFT$(O$,l)="D" THEN 15885 28197 IF O$a n• THEN O$="E" 28198 IF ASC(O$) <58 THEN RH=REL:REL=VAL(0$):N=8 28199 PRINT:PRINT ' 28288 INPUT"Destination: (enter column, row) n; OC(REL), OW(REL) 28285 PRINT:CNa 8:N=8 28218 INPUT"equals Data 1 (enter column, row) n;OJ (REL), DK (REL) 28214 PRINT 28215 N=N+1 28238 INPUTnacted on br a Constant, or other Data (choose) ·;0$ 28231 PRINT 28239 IF O$="D" THEN CN(REL,N)=8:GOTO 28258:REM---Constant fctr 28248 PRINTnConstant (express a percentage as decimal: 18 as • l)n; 28241 INPUT CN(REL,N):PRINT 28242 INPUT "Name of constant"; CO$(REL,N) 28244 GO'l'O 28268: REM --- Data factor 28258 PRINT "Where is the other data (enter column, row) n; 28253 INPUT DC(REL N) ,DR(REL,N) 28268 PRINT:PRINT 'Enter the function by which the latter n; 28263 PRINT "data or constant acts on" 28Z78 INPUT "data 1. *, / +, or -",FUNC$(REL,N) 28288 PRINT:INPUT nls result the Entry or an Intermediaten;O$ 28488 IF O$=nI" THEN EI(REL,N)=l:GOTO 28418 . 28485 EI(REL,N) = 8:GOTO 28458 28418 PRINT:PRINT nThe intermediate value in the destination n; 28415 PRINT" slot is now to ben: GOTO 28215 28458 PRINT:PRINT nTo enter more relationships, type 'M'. n, 28453 PRINT" ~ define co1umn n 28468 PRINT "addition, t~ 'C'. To return to "; 28463 PRINT "sheet, type S'.n 28478 PRINT"You may always return to define more relationships.n 28472 IF RH<>8 THEN REL=RH: M=8 28473 INPUT" n;O$ 28488 IF 0i-"M" THEN 28888 28588 IF 0 ="S" THEN IN$="Hn:GOTO 128 28585 IF 0 a"· THEN 114 28518 IF O$<>nC" THEN PRINT nRe-enter your choice.n:GOTO 28458 *** *** --------------- Column addition parameters section ------*** 28528 SEC=l:PRINT:PRINT nThe column may be totaled n; 28523 PRINT nentire1y, with defined exceptions," (continued on page 85) 84 SORCERER'S APPRENTICE THE VBNBZUBLAN CONNECTION by Roger Pfeil Thank you very much for your fine Newsletter. It is very difficult to get Sorcerer-related information here in Venezuel a. The printer -drivers and Data-save routines, which I found there, have eliminated hours of headaches. I just wish I had had all this information available right after I bought my Sorcerer in 1979. Let me just share some of my own findings with you, which might be useful for other readers: Serial Iaterface Cable I bought both my parallel and serial interface cables from EXIDY. There was no problem with the parallel cable: I plugged it into the computer and an MX-80 printer, pressed the , command of my WP Pac, and off she went. Not so with the serial cable: Ag ain I plugged in both ends connecting the Sorcerer with my Ander son - Jacobson printer and tried the print command: - - - nothing I Thinking back, I am thankful that neither the typewriter nor the computer blew up. The serial cable consists of a fl at 25-wire cable and a printed circuit board with outlets for tape saving and recording, including remote controis, as well as a 25 pin outlet for a RS-232 device. Pint I found out that I had to invert wires No. 2 and 3. Still nothing I Sccoudl, checking the wire connections of the Serial Cable, I noticed that the 25-line flat cable, which comes with EXIDY's Serial Connection had been placed into the plug inverted: Pin No.1 became No.l3 at the other end. I opened up the plug, turned the flat cable over and inserted it ag ain. Now the printer worked with the WP Pac, but not with BASIC programs. Thirdl" for some reason beyond my comprehension, the ODS command does not work with the serial port, like the O=L command does with the parallel output. I would expect EXIDY to mention this fact ill their Guided Tour of 'erloaal Computins and provide a Serial Driver in this Manual for the Sorcerer. Finally I found the information in the Ter:haical Manual, but still had to modify the Machine Language program to include a delay, which took me, the beginning computerist, many other hours of frustr ating work. POIUtbly, I hooked up my two tape recorders to the respective outlets on the l'rintcd circuit board of EXIDY's Serial Cable. After typing CSAVE and RETURN, I or rather EXIDY really blew it. The tape recorder quit working completely (a fuse had blown) and the Sorcerer refused to SAVE any more text (the transistor of the Sorcerer's Cassette ou~ut had been broken). The problem IS that EXIDY has interconnected all Ground and Shield wires on the printed board, even though they warn in the Tcdmicd Manual (p.36): "The Mic 2 shield must be completely insulated so June 1 III July 15, 1982 cc that it cannot possibly touch any of the other shields." My own problem was simil ar, even though I was working only with mike 1: The ground of the motor control of my Sony recorder (TC- 860) is differen t from the mike-shidd. Shorting the two caused the trouble. In summation: Do not waste your $98.- on a piece of equipment that is so poorly done. For less than $20.a friend with a soldering iron could fix you a better cable following the schematics on pages 35-36 of the Technical Manual. Graphka With Word Procasor The ca.Pability of the Sorcerer ~o use forelgn letters was my maln reason for purchasing this computer, since I am a Hebrew teacher at an evangdical Seminary. However, the WP Pac rdoads the graphil:s area even if it is entered from the Monitor with a warm-start using "PP" or "GO C003". One way of avoiding the rdoad is to re-enter the WP through the backdoor. I am using the end of the Ytable (DA70) for this purpose: Enter the Command. Monitor with the X Note the location of the ShiftGraphic characters by punching the corresponding keys. Note: The letters are in alphabetical, not in QWERTY order. cc- Load your letters into the corresponding location. GO DA70 Write your letter, backspace and underline. The graphic char acter will appear on the screen instead of the black-on-white letter. This procedure will only display graphic or foreign characters on the screen. The output to the printer will still be the underlined original letter, unless a special ~rinter -driver is used. Perhaps somebody could devdop such a driver. It would have to take a letter and place it into a buffer. Then it would check the next letter, to find out whether it is a back-space. If it is, it would eliminate the backspace and the following underline character and enter the first letter into a special subroutine, whereby it would enter the printer into a dot -gr aphics mode and send the 5x8 code for the foreign letter from a look-up table. Has anyone done anything similar to this yet? RAM Breakdown @ The other day my Sorcerer got stuck in the middle of a program. No more input from the keyboard. I switched the machine off and on ag ain. The first two letters of the sign-on could be seen, .then eva;ything was stuck agun. PreSSing RES ET sometimes produced some interesting gr aphics. Removing the BASIC Pac did not (continued on page 86) June 1 & July 15, 1982 (SPREADSHEET continued from page 84) 2115311 PRINT "or divided into two or three subtotals which "; 211533 PRINT"may or may not be" 2115411 PRINT "combined via a 'relationship'. If you do not "; 211543 PRINT"wish to divide the" 2115511 PRINT "column, you will call it all 'Section 1" and "; 211553 PRINT"~SS the remaining" 211555 PRINT queries. "; 2115611 PRINT '~hat is the first and last row to be added in" 211565 FRA(SEC)=II 2115711 PRINT nSection"SEC"? (Enter first, last row"; 211573 PRINT"numbers.) (You may" 2115811 PRINT"exclude selected rows next. Pass with a comma.)n; 211581 INPUT FRA(SEC). LRA(SEC) 211583 IF FRA(SEC)=II THEN 21161111 211585 PRINT:INPUT "On which row will total appear";STT(SEC) 2115911 SEC=SEC+l:IF SEC<4 THEN 2115611 21161111 EX=II:PRINT 2116111 PRINT nHow many rows altogether will you exclude from "; 20611 INPUT naddition";EX 20615 IF EX=0 THEN 20680 20620 PRINT:PRINT nWhich rows are to be excluded from "; 20623 PRINT"column addition? (If" 2116311 PRINT "none, pass.)"; 20640 FOR 1=1 TO EX: INPUT XC(I):NEXT 20650 PRINT:PRINT nyou chose rows";:FOR 1=0 TO EX 20653 PRINT XC(I);:NEXT:PRINT" OK?" 20660 INPUT Q$ 20670 IF LEFT$(Q$,l)="N" THEN 20600 20680 PRINT:PRINT"All columns will be added. There is no "; 20683 PRINTnprovision for non-A " 20690 PRINT"add columns. Now you may define more Relationships 20700 PRINT"or make any other menu choice including Kalkulate." 20705 INPUT IN$ 20710 GOTO 114 *** *** ---------------"K" Kalculations section -----------------*** *** --- Each column is calculated 4 times, with section *** addition between each calCUlation. *** 22000 C=0:K=0:Q$="":REM 300=calculation, 500=addition 22010 OUT 1,29:PRINT nFiguring columnnC+ln ••• n;:GOSUB 300 22110 SEC=l 22120 V(C+l,STT(SEC»=0 22130 GOSUB 500:REM Add first section 22150 GOSUB 300:REM Calculate 2nd time 22160 SEC=2:IF STT(SEC)=0 THEN 22227 22165 V(C+l,STT(SEC»=0 Add second section 22170 GOSUB 500:REM Calculate 3rd time 22180 GOSUB 300:REM 22190 SEC=3:IF STT(SEC)=0 THEN 22227 22200 V(C+l,STT(SEC»=0 Add third section 22210 GOSUB 500:REM Calculate 4th time 22220 GO SUB 300:REM Write sheet w/ results 22225 GOSUB 10000:0UT 1,27:REM 22227 IF C+l=COLS THEN 22250 22228 IF K=l THEN 22240 22230 INPUT n do Next col, All cols, or Stop";Q$ 22235 IF LEFT$(Q$,l)=nA" THEN K=l:Q$=nN n 22240 IF LEFT$(Q$,l)=nN" THEN C=C+l:GOTO 22010 22250 IN$=nMn:GOTO 120:REM Write the sheet with move options. *** *** ---------------" n Clear out all values, keep sheet -----*** *** ---- This is not given a command letter because it is dangerous. To use it, one must break the program *** and Goto 30000. It is used to save a blank sheet with *** its labels and formulas, ready for re-use. *** *** 30000 FOR 1=1 TO COLS:FOR N=l TO ROWS:V(I,N)=0:NEXT N 30003 NEXT 1:IN$=nn:GOTO 114 *** *** _______________ nJ" Amortization calculation -------------*** 30050 INPUTnEnter amount, term (months), & an. interest.";Pl,MO,A 30060 A2=A/100/l2:P2=Pl*(A2*(1+A2)MO)/«(1+A2)MO)-l) 30070 IF(P2-(100*P2-INT(100*P2»)<.5THENP2=INT(100*P2)/100:GOT030090 30080 P2=(INT(100*P2)+l)/100 30090 PRINTnMonthly payment is $"P2 n .":INPUT IN$:GOTO 114 *** *** ---------------"S" Set or clear row totals --------------*** 30150 IF P=0 THEN PRINT CHR$(12) 30160 IF TC<>0 THEN 30250 30200 INPUT "Which column is for row totals";TC 30205 IF TC>13 THEN PRINT nToo high. ":GOTO 30200 (continued on page 86) SORCERER'S APPRENTICE 85 (SPREADSHEET continued from page 85) (VENEZUELAN con t'd from p. 85) 38286 IF TC>COLS+1 THEN PRINT "Too high.n:GOTO 30200 38287 CD=COLS:IF TC>COLS THEN COLS=COLS+1 38289 CN$(8)=CN$(TC):CN$(TC)=nROW TOTAL n 38218 FOR R=l TO ROWS:V(8,R)=V(TC,R):V(TC,R)=0 38212 FOR C=1 TO TC-1:V(TC,R) =V(TC,R) +V(C,R) :NEXT C 38215 NEXT R 38228 IN$=nM·:GOTO 114 *** --------------- Clear the totals column, restore original 38258 CN$(TC)=CN$(8):FOR R=l TO ROWS:V(TC,R)=V(8,R):NEXT 38255 IF COLS<>CO THEN COLS=COLS-l 38268 TC=8:PRINT 38265 INPUT"Tota1s column erased. Do you want a row totals column n ;Q$ 38278 PRINT:IF LEFT$(Q$,l)="Y" THEN 38288 38275 IN$="M":GOTO 120 *** *** -----------"V" Plot a graph section *** 38588 IF P=8 THEN PRINTCHR$ (12) 38585 PRINT:INPUT"Print graph when donen;Q$ 38518 PRINT 30520 PRINT"Tit1e for graph (appears at bottom, 68 ch. max.) ": INPU'l"l'I$ 30540 PRINT:INPUT"P10t how many rows (max. 6) n;PA 38550 PRINT:PRINTaWhich rows r by number (use n8 n ro recall them)n; 30560 FOR 1=1 ~ PA:INPUTP(I}:IF P(I)=8 THEN IN$="M":GOTO 128 38570 NEXT 385888=V(1,P(1»:L=V(1,P(1» 38598 FOR 1=1 ~ PA:FOR N=l ~ COLS:IF V(N,P(I»>H THEN H=V(N,P(I» 38688 IF V(N,P(I» SA are verified automatically after recording. While this takes additional time, I have never lost a record. The worst that has happened is a parity error on loading that required a second attempt, or a head cleaning. While reliability of the hardware is excellent, there is a QUALITY problem with the wafers. A new wafer 18 certified before initial use. i.e. test data are first recorded, and then read over the entire length of the tape. The Certify command does this once, or a Certify Loop command will do it 10 timea in succession. I have found that in a new batch of wafers t approximately 10% will fail the certifkation. These are usually the longer wafers, 35 and 50 foot long. Repeated attempts at certification will allow a few marginal wafers to pass, but the remaining are only good for obtaining replacements from Ex atron. SORCERER'S APPRENTICE Once a wafer has been initially certified, it is a very reliable wafer. The initial certification failures are a significant annoyance, but do not affect the system reliability. The certification problem seems to be wafer internal friction as the endless loop of tape spirals inward in the wafer. rubbing upon itself. The frktion is also sensitive to temperature. My office is heated by wood stove, and drops as low as 40 0 F in the winter. After soaking at this temperature some wafers may give parity errors on the initial read attempts. Warming the wafer slightly, will eliminate this problem. I suspect most of you would not even have this situation, but mention it only to illustrate how some wafers are very sensitive to intern al frktion. The documentation supplied with the ESF is good. It is particularly clear in the section concerning two minor modifications to the printed circuit board, and the insertion of the new Monitor ROMs. I had no problems with the modifications. The manual details the changes inc orp or ated in the Monitor ROMs. I will only mention four that I find affect the user. 1. The Monitor Work Area (MWA) has been extended 10 bytes further downward into user RAM. 2. The lOSE T = n commands to set the baud rate are like the Exidy 1.1 Monitor.and therefore, the reverse of the Exidy 1.0 Monitor you may have. 3. The keyboard debounce routine has been improved. I used to be lagued with double 8's during ong inJ?Ut sessions. This has been eliminated. r 4. My printer would consistently refuse the first software commands of the day to print. This problem has been diminated. Now for the "good/bad news" items. A program is included wih the ESF for saving string arrays. However, the CSAVEo command for saving numerkal arrays was not implemented on the ESF. Personally, I find this a bad tradeoff. The CSAVE* and CLOAD * are still av ail able in the cassette mode. There are ways to work around this limit ation, but each of you should evaluate this limitation carefully in rel ation to your use of the Sorcerer before you purchase. Since this is a software limitation, a solution may still appear. In the next artkle, I will explain some ways around the CSAVEo problem. The CSAVE* problem illustrates one of the virtues of the ESF, it augments rather than replaces the cassette. The manual explains how the system "wakes up" in the ESF mode. One can transfer to cassette with the Monitor command lOSE M=C" and back to the ESF with "SE M=S". A significant exception to this rule is not documented. While in the ESF mode, the system will save or load data to cassette at 300b. For me this is a significant June 1 tit July 15,1982 ) @ convenience. On a weekly basis I spend an hour doing dat a input, and then turn the computer loose to generate an updated 20K numerical array. A printout is made for review, and the array saved for historical purposes. I am able to make backup records on the ES F during dat a input, and 1ater save the array on cassette at 300b without having to remember to "SE M=C". The ESF uses very Sorcerer's RAM: little of The MWA is increased bytes as noted above. by the 10 The Word Processing Driver, if used, occupies OH to 2FFH. The ESF control ROM uses addresses B800H to BFFFH. Therefore, in the case of Sorcerers with '18K of RAM, they become effectively, '16K memories. Wafer :Bytes:>SA Bytes:WP Run Time Length:or CSAVE Driver sec. 5 10 20 35 50 cc 2. Any program references to CSAVEo at 1200b may only be done if the Sorcerer is in the cassette mode. I do not find this a significant limitation since the Sorcerer cannot reliably save data at 1200b. In case' of the Word Processor Pac with the ESF, one has a choice, both acceptable. If one loads the WP Driver program, the ESF will read and wnte tex t to the ESF using the standard commands. In addition, all standard cassette operations are still available. The one change is that the ESF files are numbered rather than named. The files are loaded in the same manner as cassettes under motor control, i.e. in 256 byte blocks, and without verification. The use of the WP Driver would be desireable, if the operator was not familiar with Sorcerer Monitor commands. The alternate method of saving WP files involves the use of the Monitor >SA command. It has the advantages of: 2700 5400 10800 18000 27000 6.5 13 Loading a WP Monitor File 26 45 65 1. Exit WP Pac to Monitor: Command X. At present, the ASP ESF controller is manufactured by ASP Microcomputers in Austr alia. The ES F drives are standard drives m anufactured by Ex atron in Sunnyvale, CA, and modified by ASP in Australia. I personally appreciate the effort that AS P put into the proj ect, so that there is a mass memory option that filled the gap between cassettes and floppy disks. ASP Microcomputers 797 Dandenong Road East Malvern 3145 Victoria, Australia • SORCERER STRINGY FLOPPY Opaating Techniques by Al an H. Schmid In the previous article, I provided information concerning the Ex atron Stringy Floppy (ESF), modified by ASP Microcomputers to operate on the Sorcerer. That article was to answer the questions that remain after a typical product review, but before one is prepared to make a buy decision. This article will describe a few oper ating techniques, hopefully, urging others to submit new or unproved ideas for our mutual use. Saving WP Tat W/Monitor >SA This suggestion came from the Melbourne University, Australia, via the ASP Microcomputers, "Stringy Floppy Newsletter". Paul Stuart, of ASP, deserves thanks for passing on a technique that allows anyone willing to use the Sorcerer Monitor, to use the WP Pac and the ESF without purchasing the WP Driver from ASP. The advantages of the Monitor >SA method are: approximately twice as fast, more than twice as much text per wafer, automatic verification of a write, and no patch program needed. The disadvantages are: writing a file is slightlr more complicated l incoming tex t wil not automatica ly merge with existing text in RAM and will over -write it. A method to overcome this is included below. Saving a WP File 1. Exit WP Pac to Monitor: Command 2. Verifying the file when saved. 2. I will cover operational details in the next article. The main point is that the WP Driver is not required to use the ES F with the WP Pac. Finally, here is the approximate capacity for the available wafer tape lengths: June I &: July 15, 1982 X. Dump addresses 074A and 074B: DU 074A 074B. These two bytes contain the end of text address. Note that 074B cont ains the first part of the address and 074A the second. F or ex ample, if 074A contains IE and 074B contains 12, the end address is HIE. 3. Set the auto ex ecution address to the warm start address for the WP Pac (C003): SE X=C003. (Note: I have not found the above step necessary. ) SORCERER'S APPRENTICE where n is the file number. The file will load and then return control to the WP Pac in the EDIT mode. Merging Two WP Monitor Files 1. Put existing text into holding buffer using usual WP commands. 3. 1. Saving a larger file on a given size wafer. 3. Not requiring the WP Driver Program. 2. Load file with the command LO n, 2. Load second file as above. The full address for ASP is: E adier, I made reference to only minor changes being required in a progr am to make it compatible with the ESF. There are basically two: I. Since the Monitor Work Area has been extended 10 bytes downward, POKEs into the MWA must have their addresses changed. For example, with a UK memory, POKEs into 32720 at 32721 to turn a printer ON or OFF, would be changed to 32710 at 32711, respectively. 6000 12000 24000 42000 60000 4. Save the file on wafer using the usual Monitor syntax: SA n SOF 121E. 80F is the starting address for all WP fil es. Restore first file from holding buffer by moving cursor to the desired location and unloading buffer using command U. This method of saving text takes less time than reading the instructions. The automatic verification of the text is an important feature. In my previous article, I discussed the problem of the CSAVEo command not being implemented on the ESF. A program for DATA I/O was included with the ES F for recording string arrays, not numerical arrays. This did not fill my need to store large (20 K) numerical arrays, since string arrays for decimal numbers occupy more memory. Also, the program must be enlarged to handle the conversion to decimals and back to strings so that calculation can be made. Two variations of the Monitor >SA method described above will work with BASIC data. The difference between the two methods is the starting address of the SAVE. Again, I heard of the first method from Paul Stuart of ASP Microcomputers. The following BASIC memory addresses are significant to the procedures: BHiIN BASIC: Work Area Program Prog. Variables Arrays IN) 100 105 (lB7 at lB8) (lB9 at lBA) BASIC: (lBB at lBC) Arrays The addresses in () are pointers to the location listed. For example, the BASIC Arrays start at the address contained in (lB9 at lBA), and end at the address cont ained in (lBB at lBC). In normal Z-80 fashion, the address bytes are in reverse order. Saving Program &: Variables In One Record This method is convenient for programs with data that are periodically updated, or you are interrupted during a computing session, and want to I ater res tart. This method is not convenient 91 during program development, since the cannot be Changed without Clumping the variables to zero. Also, it takes more tape since the program is recorded every time. ~rogram Saving a Program with Variables 1. Edt to Monitor: BYE. Z. Dump addresses 0188 and 18C: DU 018C. These two bytes 0188 contain the end of arrays address. Note that 018C contains the first part of the address and 01BB the lIecond. P or ex ample, if 0188 contains IE and 018C contains 6Z, the end address is 6Z1E. 3. Save the file on wafer using the usual Monitor syntax: SA n 100 6Z1E. The starting address is 100 80 that all program counters will be included along with the program and variables. Loading Program with Variables 1. Edt to Monitor: BYE. Z. Load file with the command LO n, where n in the file number. 3. Return to BASIC: PP. Since you have just loaded the program with all variables, you MUST NOT start with a RUN or RUN nn. This would result in all variables being dumped to zero. You must also enter the program after any array dimensioning statements to avoid "REDIMENSIONED ARRAY" error. I per lIonally start all program menus at step 100. It is then automatic with me to restart all programs with GOTO 100. If a program revision must be made the arrays will first have to be sav;! separately using the method below, and later merged with the revisea program. Loading at Merging Arrays w /Program 1. RUN the program to reset pointers. Program should be stopped after arrays are dimensioned. Z. Exit to Monitor: BYE. 3. Dump pointers to beginning of array area: DU 189 18Ao 4. Load file with the command LO n, where n is the file number. Hold down CONTROL C during loading so that the file header prints on the screen. 5. Move the arrays downward in memory to the new array start address: >MO (file header start address) (file header end address) (1BA at 189). 6. Return to BASIC: PP. If the program is revised by adding to it after the arrays are saved on ESP, a problem may exist if the program has grown into the previous array area. Por minor program revisions, this is not a prOblem. When the program is restarted with RUN the variables are dumped to zero. II the program additions use less memory than the old variable area, there will be room to load the arrays and move them downward to merge with the program. Contrary to loading from cassette, the ESP does not have provisions to load Monitor files to a diffttent address than from which it was saved. Also, a file may not be moved up in memory unless the new starting address lies above the existing ending address. Therefore, there is not sufficient memory, in many cases, to move large arrays upward in memory, after loading from the ESP. If you are worried about this problem, pad your program with some statements that can be dummy removed if the program needs to be shortened after revision. WARNING Saving BASIC Anays The advantage of this method over saving the program and all variables together is that it takes less tape, and allows revision of the program after arrays are saved. The disadvantage is that the address for the lltart of arrays must also be found in the BASIC Work Area, and the reloaded arrays must be moved to the correct address after loading to complete the merger with the program. Saving Arrays (Notel This method saves all arrays if there are more than one.) 1. Exit to Monitor: BYE. Z. Dump addresses 0189 to 018C: DU 0189 018C. 3. Save the file on wafer using the u~al Monitor syntax: SA n (1BA at 189) (18C at 188). The actual save will use the address for the beginning and end of arrays contained in the addresses shown in O. 92 The next section is a det ailed description of how to recover from the problem caused by extensive revision of the program after the arrays are saved on the ESP. SKIP TO THE "00000" below unless you have need of this det ail. If you get trapped after the arrays have been saved: 1. CSAVE the program on the ESP. Z. Go to the Monitor: BYE. 3. >LO the arrays from the ESP. 4. Set memory to cassette: SE M=C. 5. Save the arrays on cassette using above method, except the file is named rather than numbered. 6. SE M = S. 7. Go to BASIC and reload program from ESF. This is necessary since its back end was cut off by the array load in Step 3. 8. Do steps I, Z, '" 3 in basic method above, i.e. RUN program, go to SORCERER'S APPRENTICE Monitor, and dump pointers. 9. SE M = C. 10.Using method described on page Z6 of, "A Guided Tour to Personal Computing" , 1oad the arr ay s higher in memory than they were recorded. 11.SE M=S. 1Z.Finish task by completing steps 5 '" 6 in basic method above, i.e. .>MO arrays and go to BASIC. With a little planning, you will never have to do the above, but here it is just in case. 00000 The above procedures are crutches to get around the lack of a CSAVEO on the ESP. They cannot be done under prog~am control, since they require Monitor commandS. So much for saving arrays. Now for some miscellaneous tips and facts. Do your program development using the ESF. In addition to the speed, there are other advantages. Use two tapes that you altemate in drive O. Make a CSAVE about every five minutes. A simple GRAPHIC 0 will give a one stroke CSAVE command. Alternate the tapes before each save. The ESF will default to file #1 on drive o. This way a power f allure will not cost you more than 5 minutes work. The ESF does not to the end of the the ESF for program not pad the end of accumulated garbage 1aboriously delete short. add a CRC byte program. Using development does the program with that you have to if memory gets You may store up to lZ7 files on a wafer. This is only practical if the files are added sequentially, and an earlier file never revised. Any slowing of the drive motor, or enlarging of the fileI will cause the beginning of the fo lowing file to be overwritten. There is a way around this problem. To save file 5, the ESF searches for the END of file 4; it does not care if file 4 has a beginning. Therefore, separate files on a tape with dummy f.iles tha~. are long enough to cover minor rev1S10ns and drive speed variations. A typical sequence would be: #1 Program/#Z Dummy /#3 Program/ #4 Dummy/••••••• The dummy could be anything. One suggestion would be to ( >SA n o IFF). This would provide a 51Z byte buffer between programs. While I have a few more goodies, I will end this article. I'm sure some of you have ideas that could make my comments look naive. Please do so by sending short items to the Soa:uu's Apprentice, showing all us ESF users how to do it better. I will even offer a blank un-certified wafer to the first one to show how to save a numerical array under program control •• June 1 '" July 15, 1982 () ROM PAC NOTBBOOK iJ4 by Iohn de Rivaz @ ) @ As promi.ed for this i.sue, here is the program that saves the entire array area using the Monitor routine. If an error is found on loading, instead ot just stopping in the usual defeatest manner, the routine goes on to load the nel[ t file. Therefore, if you have saved two copies of a file, even if there i. an error on loading the first copy, the program automatically tries to load the second. You can .ave a. many copies as you wi.h depending on the rdiability of your cauette system. This routine i. used to .ave arrays in RTL's Stocks and .shares Managemcot program, which is under test at the time of writing. Special features of the program include inflation linking of the stocks, to show whether tho.e gaina are for real or whether they are just paper gain.. This will give a graphic demonstration of the need to modify law. in capital tax ation to adjust the COlt price for inflation before calculating taxable gain.. The program includes printout on an Epaon MX80F/T of graphs of share performance on a time axis and al.o on one of market movements. A frivolous extra is a routine to play "tunes" and tones baaed on a company's price movemcots. The routines used to generate medium resolution graphics and to print them with the MX80 will be given in future articles in Sorcerer's Apprcotice. In order to get the POKEs for BASIC, load in the machine code with the Monitor, and then get BAS IC to print out PEEKs of the required memory. POKE 260,0. In order to record a file, POKE 261,0 and call A=USR(O). To load a file, POKE 260,39 and again call A=USR(O). Before these operations, it is uoual to Print a line tdling the operator to switch his machine on and presl any key when he haa done so. Thi. progr am recorda every single numeric array present. RTL sdla a program called STR which allO loads Itring array., but this is more complicated and time consuming, u every single string haa to be recorded scparatdy. An alternative method of saving strings il used in the program on stock. and shares. Each string is split up into groups of three letters, which are coded into siz digit numbers and saved in numeric arrays. The strings recorded require only ten perccot of the large numeric arrays used, so this method was considered quicker than using the string loading program. A further alternative would be to record both the array area and the string area. As a footnote to the last article, it may be noted that the file made by the assembler had to start at 4000H because the usembler overwrote it if it started at 3000H. June 1 & July 15, 1982 The routine uses code taken from the Monitor and modified to suit the required purpose. EXIDY Z-80 ASSEMBLER ADDR OBJECT ST 0001 0002 ;ARRAY LOAD FOR SHARE PROGRAM >01B9 0003 ARRAY BOU 01B9H >81BB 0004 END BOU 01BSH >E1A2 0005 GETIY BOU 0E1A2H >E65C 0006 SAVE BOU 0E65CH >E453 0007 CARRET BOU 0E453H >E28A 0008 CMOTON BOU 0E28AH >E2AF 0009 CMOTOF BOU 0E2AFH 0010 ;FINDS GETIY AND LOADS UP 0811 ;MONlTOR STACK FOR FIRST 8012 ;SAVING '0000 ED4BB901 0013 LD BC,(ARRAY) 0014 LD DE.CARRET '0004 115384 0015 LD BL,(END) '0007 2ABB01 0016 LD (IY+50H),C '010A FD7150 0017 LD (IY+51H),B '000D FD7051 LD (IY+478),'A' '0010 FD364741 0018 LD (IY+488),'R' '0014 FD364852 0019 '0018 FD364952 0020 LD (IY+49HI' 'R' 0021 LD (IY+4AH ,'A' '00lC FD364A41 LD (IY+4BH ,'Y' '0020 FD364B59 0022 0023 JP SAVE '0024 C35CE6 0024 ;here to load array 0025 HEDPRT EQU 0E6DEH >E6DE >8759 0026 TAPWT BOU 08759B >E6A9 0027 BLKADJ BOU 0E6A98 >E408 0028 CRCMSG BOU 0E408B 0029 MSGOUT EQU 0E1BAH >ElBA 0030 CRLF BOU 0E2058 >E205 '0027 CDA2E1 GETIY 0031 COMAND CALL 0032 SERIN BOU 0E2DAB >E2DA LD (IY+3DB) ,408 '002A FD363D40 0033 0034 LD B,l '002E 0601 , 0030 CD8AE2 0035 CALL CMOTON '0033 CD5987 0036 CALL TAPWT ;modified GETHED '0036 FDE5 0037 PUS8 IY 0038 pop IX '0038 DDE1 '003A 0610 0039 LD B,10H 0040 GETHD1 CALL SERIN '003C CDDAE2 0041 JR Z,LOAD10-$ '003F 2843 0042 LD (IX+57H) ,A , 0041 DD7757 0043 INC IX '0044 DD23 0044 DJNZ GETBD1-$ '0046 10F4 0045 LD B,(IY+46H) ;CRC chkbit '0048 FD4646 , 004B CDDAE2 0046 CALL SERIN 0047 CP B '004E B8 0048 JR Z,OONTIN-$ '004F 2802 0049 JR ERROR-$ '0151 1826 0050 CONTIN CALL HEDPRT '0053 CDDEE6 0051 ;Tape will only load into arra¥ area 0052 ;set by BASIC, not area specifled by 0053 ;the header on the tape. 0054 LD HL, (ARRAY) '0056 2AB901 0055 LD E, (IY+5EH) '0059 FD5E5E 0056 LD D,(IY+5FH) '005C FD565F 0057 ;DE now > end of array area 0058 ;HL now > start of array area 0059 CALL TAPWT '005F CD59E7 0060 LOAD8 CALL BLKADJ CDA9E6 '0062 0061 JR Z,LOAD18-$ 281D '0065 8062 LOAD9 CALL SERIN '0067 CDDAE2 0063 JR Z,LOADl0-$ '006A 2818 8864 LD (HL) ,A '006C 77 0065 INC BL '006D 23 0066 DJNZ LOAD9-$ '006E 10F7 0067 ;CRC check - load next if error 0068 LD B,(IY+46H) ;CRC byte '0070 FD4646 0069 CALL SERIN '0073 CDDAE2 0070 CP B '0076 B8 0071 JR Z,LOAD8-$ '0077 28E9 0072 ERROR LD HL,CRCMSG '0079 2108E4 0873 CALL MSGOUT '007C CDBAE1 007 4 CALL CRLF '007F CD05E2 0075 STAGE1 JR COMANO-$;next if error '0082 18A3 007 6 LOAD10 JP CMOTOF '0084 C3AFE2 ERRORS=0000 E453 E6A9 CARRET nB9 BLKADJ ARRAY 0027 E28A COMANO E2AF CMOTON CMOTOF E205 E408 CRLF 0053 CRCMSG CONTIN 003C 0079 GETHD1 01BB ERROR END 0084 E6DE LOAD10 E1A2 HEDPRT GETIY ElBA 0067 MSGOUT 0062 LOAD9 LOAD8 01')82 E2DA STAGE1 E65C SERIN SAVE E759 TAPWT SORCERER'S APPRENTICE 93 . «< CLASSIPIBD ADS $1/line >>> $l/line ============================= Sorcerer Model I, W/ BASIC and Development Pacs cassette . and monitor. Contact AoL. Cavalieri, POB BALBI 32K 401 Bustleton Pike, Churchville, PA 18966. . . ============================= ROM PAC NOTBBOOK #, by Jabn de Rivaz In my lilt article, I mentioned the printing of gr aphs on the MX80F /T from Bllic, a. u.ed in RTL'. stock. and .hare. program - the one that takes inflation into account. In orda to genaate graphics that are .imilar to thoae u.ed In the MX80, a abort machine code program is u.ed. This is a talk ellia to carry out in machine code, and the routine can be POKEd in, u.ed, and the .pace then u.ed for another machine code program lata on. The graphi:. are small blob. that reduce dle rCiolution of each puel from the Sorcaa's 8 z 8 to the TRS80'. Zz). The fit isn't ez act, .0 the middle ones are one dot amalia. However this doesn't show in the printed results. These gr &pbic. are al.o u.ed in RTL'. DRAWZ program, whiCh enables medium resolution graphic pktures to be drawn on the screen and added to Buic program. without re-typing lou of POKB.. (DRAWl i. .smilar but hiah resolution). The routine work. by counting up in register B and then tating bits to determine whi:h numbaa are to be loaded into the graphic defining memory. The IX regiata points to the graphic defining memory, and a subroutine "SBT" is called each time this is to be let. In orda to print the screen out on the MX80F/T, the graphicl characters have to be lI.iJned new codes. In addition, a line 1. left at the top to allow non-printed mes.ages to be PUled to dle opaator. Bach bit of scrCCD memory is tested in turn. If it contain. a byte whoae 7th bit is .et, then it is a graphi: not a .tandard ASCII character. Therefore it haa ZOH subtracted .0 II to comply with the MX80'. graphic .et, and is lent to the printa. Ordinary ASCII char acta. are printed aa usull. The program would be confu.ed if there wae any other graphics apart from TRS80 puel. on the screen, .0 it i. left up to the opaator to ensure this does not take place. The routine al.o in.erts carriage returns at the end. of lines. The lrinta driva itself is a .tandar one which prcwides line feed.. If your printer i. switched to auto line fced repl ace lina 3Z-33 inclusive with NOPs. With care, thae routines can be used with otha printa. whi:h have TRS80 type pud graDhics. Thae is, of courac, the ~X80F /TZ high resolution plotting feature available on these printer., but the Sorcerer i. limited by programablc graphk space aa to how much bith resolution plotting can be done on scrCCD, and these medium resolution programs are perfectly adequate for many pUrPoaes. Here is the printa driva routine to ttanafa all but the fir.t line from the screen: 94 EXIDY Z-S0 ASSEMBLER ADDR OBJECT ST 0001 0002 This sets up 6 0003 '1001 2lS0FE 0004 LD '1113 111110 0005 LD '1116 3EII 0""6 START LD BIT 1107 '1018 CB41 JR 'IlIA 2802 IllS 0009 LD 'IOIC 3EFO 'OIIE CB49 IllS Xl BIT 'Inl 2812 lOll JR 0112 ADD 'on2 C61F 1113 X2 '1114 77 LD 0114 INC '0915 23 '0116 77 IllS LD '1017 23 1016 INC 1117 '1918 77 LD '1119 23 1118 INC 'lIlA 3EII In9 LD BIT 1120 'I01C CB51 1121 '111E 2812 JR LD 0122 '1121 3EFI BIT 1123 X3 '1122 CB59 JR '1124 2812 1124 ADD 0125 '1126 C61F 1126 X4 LD '1128 77 IIV INC '1129 23 1128 LD '112A 77 '112B 23 1129 INC LD 1131 '112C 3EIO BIT 'Ol2E CB61 1131 JR 1132 '1031 2812 0033 LD '1132 3EFI BIT 1134 X5 '1134 CB69 1135 JR '1136 2812 ADD 1136 '0138 C61F 1137 X6 LD '113A 77 113S INC '113B 23 1139 LD 'I03C 77 IIU INC '1130 23 LD 1141 '113E 77 INC 1142 '113F 23 INC 1143 '1141 IC LD 1144 '1141 79 1045 CP '1142 FE41 1146 RET '1144 C8 1147 '1145 18BF JR ERRORS=IIIO OOIE X2 111116 Xl START 1028 X5 1122 X4 X3 113A X6 pixel graphics. HL,IFEIOH BC,I A,O I,C Z,X1-$ A,OFIH 1,C Z,X2-$ A,OFH (HLl,A HL (HLl,A HL (HLl,A HL A,O 2,C Z,X3-$ A.IFOH 3,C Z,X4-$ A,OFH (HLl,A HL (HLl,A HL A.B 4,C Z,X5-$ A.OFIH 5,C Z,X6-$ A,IFH (HLl,A HL (HLl,A HL (HLl,A HL C A.C 64 Z START-$ 0914 1034 EXIDY Z-80 ASSEMBLER ADDR OBJECT ST No. lee1 ; 1112 ;A screen printer for MX81FT 1013 ;with 128 x 91 resolution. The 0114 ;Sorcerer's special graphics must lOIS ;a1ready have been set up to get the 1116 ;correct screen image. and no other 1117 ,characters with bit 7 set must be 1118 ;present on screen. 1119 , >FICI EQU IFICIH 1110 STOP 1111 ;allows for a top message not to be BI12 ;printed out. IF7FFH lel3 SBOT EQU >F7FF OE205H 0114 CRLF EQU >E215 IllS ORG OC4H HL,STOP lel6 LD '1IC4 21CIFO DE,SBOT lel7 LD 'IOC7 llFFF7 C,2IH ;MX80 displacement IllS LD 'IICA IE21 CARRET-$ 1119 JR 'IICC 1821 A, (BL) 0121 START LD 'OICE 7E 7,A 1121 BIT 'IICF CB7F Z,OUT-$ 1122 JR '1101 2891 C 111123 SUB '1103 91 1124 OUT PUSH AF '1104 F5 A, (OFEHl 1025 PRINT IN '0105 DBFE 6,A 1126 BIT '1107 CB77 Z,PRINT-$ 1027 JR '1009 28FA AF 1128 FOP 'IIDB F1 (OFFH) ,A 1129 OUT 'OIOC D3FF IDH 1131 CP 'lODE FEID NZ,NEXT-$ 1131 JR 'IIEI 211114 A,IAH 1032 LD '11E2 3EIA , IOE4 lSEE OUT-$ 1033 JR SORCERER'S APPRENTICE June 1 at July 15,1982 c ) @ INC HL 0034 NEXT '00E6 23 HL PUSH 0035 '00E7 E5 HL,DE SBC ED52 0036 '00E8 pop HL 0037 '00EA E1 Z RET 0038 '00EB C8 START-$ DJNZ 0039 '00EC 10E0 A,00H 0040 CARRET LD '00EE 3E00 B,650 LD 0041 '00F0 0641 DEC HL 0042 '00F2 2B OUT-$ JR 0043 '00F3 180F ERRORS=0000 E205 NEXT 00EE CRLF CARRET 0005 SBOT 0004 PRINT OUT F0C0 00CE STOP START NOTBS FROM RCPM-SORCBRER by The Sysop ++++++ Eddy CP1M Modification 00E6 F7FF MAGIC SQUARB • by Emiliano De L aurentiis Does anyone know how to modify Exidy CP/M ver. 1.42/3 from Micropolis Mod I to Mod II operation? So far I've found that changing address 0123EH in MOVCPM from 47H to 9BH and changing address 0 IB4H in FORMAT from 26H to 4EH accomv,lishes most of the change. I still need to modify something to get CP/M to write to the whole disk. R.D. HAUN (This article is reprinted from the Oct/Nov, 1980 issue of the S.U.N.) ++++++ What is a magic square? A magic square is a square matrix of odd numbered sides, where each cell of the matrix holds an integer from 1 to n where n is the number of. cells in the matrix. Furthermore, all the columns, all the rows, and all the. diagonals must add to the s~me number. An example of a 3:1:3 magic square is presented. below. The .followlO,g program will produce any nx n magic square., I present it here ~ an,illustration of the algorithm (called a production system 10 the program) whlCh will produce such a square. The size of the magic square you produce is only limited by the size of your Sorcerer's memory. 3 x 3 MAGIC S M THEN X=X+1:GOTO 30 60 IF X-1<1 THEN X=M: Y=Y+1: GOTO 30 70 IF Y+1 > M THEN Y=1:X=X-1:GOTO 30 80 IF C(X-1,Y+1) <> 0 THEN X=X+1:GOTO 30 90 X=X-1:Y=Y+1:GOTO 30 95 : 98 REM print matrix 99 : 100 FOR A=l TO M: FOR B=l TO M 105 D=D+C(A,B) 106 IF C(A,B)<100 THEN PRINT" "; 107 IF C(A,B)<10 THEN PRINT" "; 110 PRINT C(A,B); " "; 120 NEXT B:PRINT "=";0:0=0:NEXT A 125 : 126 FOR 1=1 TO M*6:PRINT "-";:NEXT I:PRINT 127 : 130 FOR B=l TO M:FOR A=l TO M 140 D=D+C(A,B) 142 NEXT A 145 IF 0<100 THEN PRINT" "; 147 IF 0<10 THEN PRINT" "; 150 PRINT 0;" ";:0=0:NEXT B 155 PRINT "" 160 PRINT 170 FOR A=l TO M:B=l 180 O=D+C(A,B) 190 B=B+l: NEXT A: PRINT "DIAGONAL '\'=";0; 191 PRINT" "; 192 0=0 193 FOR A=l TO M: B=M 194 D=D+C(A,B)96 B=B-l: NEXT A: PRINT "DIAGONAL '/'=";0 200 PRINT CHR$(17):RUN 5:REM Go home and start run at line 5 210 REM RUN COMMAND CLEARS MEMORY> 220 END lune 1 & luly 15, 1982 SORCERER'S APPRENTICE Joystkk Standard Arrington's standard, described in the January Sorcerer's Apprentice Newsletter (3.1), doesn't permit concurrent operation of the keyboard and joystick #2. Movemen t while firing is also pr ohibited. I believe this should be changed I Using the keyboard should make it replace only joystick #1, leaving #2 fully functional. Since the keypad is on the right, joystick #1 should be the right stick and #2 should be the left one. I believe g ames have more realism if the "gun II doesn't have to stop while it's firing. But, Arrington's standard has FIRE and LEFT/RIGHT controls sharing the same pins; they can't be used together. Since games make far more use of LEFT/RIGHT than they do of UP/DOWN, the FIRE button should be moved to the UP/DOWN pinsl Then, you can fire on invaders as you keep sliding across the screen, and shoot asteroids as you swing your ship around. G. King ++++++ Monito, Memory Tat Show The Monitor's TEST command can produce an interesting display. If you >TEST screen RAM, you'll see the patterns it uses. To get· things going, type in these two lines: SE 0=E044 ( thi s tur ns off screen output) TE F080 F800 C (this runs the show cont inuously) Impress your friends with the next best thing to blinking lightsl G. King ++++++ Soa:erer Buil: Converter Bob, what is needed on the RCPM is an interchange of Sorcerer Basic programs. Would you agree? I've got a nifty CP/M program that converts ASCII Basic to Sorcerer compacted Basic and vice-versa. It's great for working with your E -Basic progr ams, Word Processor ere ated programs, etc. Is this something that would be good to have on your system? Dan Conway • I told D an we would be glad to have his program on the system. We now have SORBAS.OBI, and DOC on drive A:. SysoP. 95 (Editor's Note: In his article, "Restoring Lost Link Addresses", found in issue 4.3, I ames Canning refers to the 'TOSCA' .program found in the May, 1980 issue of the S.U.~ •. Ssnce many !>f you never subscribed to this pub.hca~10n,. and b~ck-18SUes are no l.onger avail able, that artICle IS bang repnnted below. We will also be repnnting other articles, that may be of interest to you.) TAPB OUTPUT SCANNBR by Jim Burns (This article is reprinted from the May, 1980 issue of the S.U.N.) The following is a relocatable routine that acts as a C&ssette image dump, byp assing ezclusion of headers, CR C bytes, etc. and which does not bomb out in the middle of the tape because it has one block that doesn't CRC check properly. 11 zz_ In DE,wwzz 21 zz yy ne at 01D5-01D6, making sure they point to the nez t hnk In the sequence, that each is preceded by a zero, and that no other zeroes occur in the core area occupied by the BASIC file. The last link. points to the 00 00 00 BOF mark. ~or more. information !>n header statements, memory pOinter locations and funCtions, and tape file formats, get a copy of the, "Software Internals Manual for the SoJarer", put out by Qaality Software. The CSAVBo format is not ezplained in that manual. The CSAVB· format iSI four D2H's followed by the core ~age o~the val.ur i~ the. array. It does not have any 1niorm!ltlon of It s c1imenslons, block length, or name. That 1~ !hr ~e array has .to be dimensioned before rou CLOAD It. Since the tape Image contains no informatson on the array'l name, the first array you position to on the tape, will be loaded into the array specified in the CLOAD· command. NOTB: Since RUN re-initializes the variable space, you will have to ule GOTO (line number) to start the progum (BASIC doa patch it's pointers to remember it made space for the loaded array). Some final notes on the two drivers: NOTB 11 The call to CMOTON is necessary even if you don't ule motor control for your cassette. Ezidy's procedure at the end of tape handling, or errors (at least In the Monitor), is to call CMOTOF. One of CMOTOF's action., is to reset the UART to 300 baud regardless of the SET parameter. CMOTON sets the UART to the desired baud rate. 96 One parting question... and then the second listing. CLOADG has no more etfect that CLOAD in my Sorcerer. Is anyone using CLOADG for autoload/execute? And oh yes, I appreciate the Monitor listing printed in the S.U.N. I wrote a Z80 disassembler in BASIC, but alas, no printer I Even so, I had transclibed the video output for the first lK br hand. Along came the S.U.N. with the other 3K to p acate my weary hand and brain. 1OSCA- A Routine to Scan Tape Output ; finish address ;uart address ; call CM , carriage return . The listing that appears on the screen is appearing also on the printer. When the listing is complete, you may wish to type another control-P to prevent further output from going to the 3. TIP - With all due respect to Arkay Engravers, Inc, I've chosen to use small embossed plastic label letters. The initials I us, remind me of what key does what. SORCERER'S APPRENTICE Listing 97 prinecr-. St_tina a Stappq Prcaaing the key combination, contro1-S, will Itap output. Your progr am wBI relllllDe activity aa 800n as another key is struck (or another contro1-S). Thi. feature is a great conven~ce even without a pdnter; it sure beats having to keep the RUN/STOP key conuantly pressed to freeze a BASIC programl During the pause generated by the control-S, you can u.e other features of the interface .oftware, such as the control-P or typing the current screen, aee below: Screen D_p It often happens that I want to record on paper what is on the screen as aecuratay a. possible; to take a "snap abot" of the screen. I need to type a contro1-T which causes the character. at ea~ location on the screen to be ezamined in turn, and output to the pdnter. Of couree, graphic characters wUl not be handled properly by the printer, but what can you ezpect? The eqhth bit, is not sent, to preserve compatibBity with C~ntronics printer I. Graphic symbols . are not atandardized in any cue. Because typing "blind" is inconvenient and error prone, I have written the software so that the characters that are to be sent to the printer are shown on the screen as they are keyed in. Since the control characters are usually not displayed, all control codes are converted for display purposes to an up -arrow (A) and a printable character. Thus, the control-O of the above ex ample would be represented on the screen as set. But if a char acter is pressed, KEYBRD returns it in the A register and CHIN proceeds to see if the character might be one of the special Software Sorcerer's ROM Pac BASIC, having only 6 significant figure accuracy, is a severe handicap if one wants to utilize it for financial programming. To maintain dollars and cents accuracy, the maximum value that can be accommodated is _9999.99. Hardly useful for many purposes in these times of increasing monetary figures. Through the use of some programming techniques, I have been able to expand the range of financial figures that can be accommodated to 8 significant digits, thus permitting the maximum amount to be increased to _999999.99 with full dollars and cents accur acy. I wrote the software so that the machine code would fit ex ac.tly in manory between 3B1i and OFFH on page o. The soltware uses manory also from 33H to 37H1 inclusive, as a buffer that is used tor the "special codes", described above. This choice was made to be compatible with space that is normally not utBized in the Sorcerer when the BASIC or Development Pac is in use. To provide so much function in so little space, I needed to "squeeze" the code as much as possible; readabBity and modularity have had to be compromised somewhat. For the software to be useable, two routines, CHIN (character in) and CHOUT (character out), need to be patched into the Sorcerer's I/O. Although this could be achieved by: SET I=8A A contro1- causes a jump to the Monitor warm entry point (OE003H). ~t is uleful in places where condwIn, to aecute the program would be panful. For ezample, the editor in the Devel~ent Pac does not have a "fast ait , 10 I type control- and then isaue the "PP" command to reenter the ROM Pac. SET 0=65 A I was able to squeeze in the routine, IOINIT (I/O INITIALIZATION) , which achieves the lame reaul ts automatically. A There are quite a few special character lequences that can be sent to the MX-80 pdnter to achieve Ipecial effects auch l1li condensed, apanded, emphasized, and double pnnted letters. Sequences also aist to control vertical (line) BJ?acinJ. These sequences are detailed In the operation manual for the printer. Usually, I want to send these sequences to the printer but not to the program. To do '0, I type a contro1-E. A "blob" should appear on the Icreen as a "prompt" indicating a' re'edines' for InpUt the special char acter sequence that is destined for the printer only. Then I trvc in the .equence· it can be zero to fIVe characterl in length and may include anr control codes except control-M [a carriage retUrn] or a delete [Ihift-RUB]. The sequence is 'CIlt to the printer when either a carriage return is keyed or five characterl have beco CIltered.If I have mistyped the lequence, I can redo it before it is lent to the pdnter by lcqing a shift-RUB. 01 For aample, I might wish to type a listing that is more than 80 columnl wide, 10 I choose to usc condcosed type that supports lines up to HZ columns wide. According to the MX-80 manual, the printer should be lent a contro1-0, 80 I type control-E.. control-O and return. That is all that is neededl 98 BIGHT DIGIT FINANCIAL TABULATOR n. Bsidai Spcdal CAdCII (continued on page 99) It is a commendable feature of the original Sorcerer software to provide patch points for the I/O. Any software that is written for the Sorcerer should call locations OE009H (RECEIVE) and OEOOCH (SEND). Such software then has its I/O automatically patched by the Sorcerer Monitor to the current input and output devices. By having control over I/O, we can use all the "services II described above. Let us see how it is done: CHIN This ~aracter input routine must behave In a manner analogous to other Sorcerer input routines. If no character is available yet, it should retUrn with the Z-flag set. If a character is, or has been, received, the Z-flag should be reset, and the character should be returned in the A register. CHIN beg~n8 by calling the KEYBRD routine in the Monitor. If no character is pressed then KEYBRD retUrns with the Z-flag set and CHIN returns also with the Z-flag by Frank Voss The method that I've used to achieve 8 digit accuracy for financial figures is as follows: a) INPUT of an amount to the program is as a string instead of a numerical value. [A_l b) The is dollars and [0_ Ill. C_l A_ sep ar ated into its cents components. c) The 0_ Ill. C _ are converted to their value amounts. [0 Ill. C] I d) \,b The appropriate mathanatical functions arc performed. e) The resultant values are converted back t string functions. [TO_ Ill. TC_l f) The TC _ function is formatted for missing O's. g) The final assanbled string functions are made available for display or printing. [TO_;".";TC_l I've prepared 2 programs as part of this article. 1) The FINANCIAL TABULATOR SUBROUTINE is for individuals who would like to write a more expanded program. 2) The FINANCIAL TABULATOR is a formatted, working program that may be used with a printer. (Output to Centronics bus.) The programs as presented here will add and subtract amounts and yield a resultant total. Multiplication and division of financial figures can be done using the same method I've outlined above and is left to be done by the reader. -------------------------------Iil REM 1 REM 2 REM 3 REM 4 REM 5 REM 6 REM 7 REM FINANCI~ TABULATOR SUBROUTINE Frank Voss Box 43 wyandotte, MI. 1982 48192 This program is to be used as a subroutine for a larger tabulating program. It permits 8 digit accuracy for SORCERER'S APPRENTICE o June 1 Ill. July 15, 1982 \ 8 REM financial data. This means that values to $999999.99 9 REM can be accommodated without error. Subtractions are 19 REM entered as a negative number. The total is obtained 11 REM by entering T for the amount. 12 REM 29 INPUT" ENTER AMOUNT",A$ :REM Enter AMOUNT as a string 259IF LEFT$(A$,l)="T" OR LEFT$(A$,l)="t" THEN l5f1l :REM Do Total 3f1l LET L=LEN(A$) 35 LET D$=LEFT$(A$,L-3 :REM Extract dollars from string 4f1l LET C$=RIGHT$(A$,2) :REM Extract cents from string 45 LET D=VAL(D$):C=VAL(C$) :REM Convert to numerical values 5f1l IF LEFT$(A$,l)="-" THEN C=-C 55 L=LEN (D$) 6f1l PRINTTAB (4f1l-L) "$n ,D$,"." ,C$ 8f1l LET TD=TD+D:TC=TC+C :REM Do mathematical operations 85 IF TC>99 THEN TC=TC-lfllfll:TD=TD+l:GOTO lfllfll 86 IF TC<-99 THEN TC=TC+lfllfll:TD=TD-l 87 IF TC fIl THEN TC=TC+lfllfll:TD=TD-l 88 IF TC>fIl AND TS fIl AND TC 99 THEN TC=TC-lf1lfll:TD=TD+l:GOTO If1lfll 86 IF TC<-99 THEN TC=TC+lfllfll:TD=TO-l 87 IF TC<0 AND TO>0 THEN TC=TC+lfllfll:TD=TD-l 88 IF TC>fIl AND TO<0 THEN TC=TC-lf1lfll:TD=TD+l If1l0 PRINTCHR$(17):PRINT 105 PRINTTAB(3f1l) n " 110 PRINTCHR$(17):PRINT 120 GOTO 15 150 LET TO$=STR$(TD):LET TC$=STR$(TC) 16f1l IF TC=O THEN TC$="0f1l" 162 IF TC>0 AND TC<10 THEN TC$="0 n+TC$ 163 IF TC<0 AND TO=0 THEN TO$=n-0" 165 LET TC$=RIGHT$(TC$,2) 170 FOR X=l TO N:PRINTCHR$(10)i:NEXT X :REM Output to printer 175 POKE M,147:POKE M+l,233 180 PRINTTAB(17)"----------------" 185 PRINT" TOTAL AMOUNT = ", 188 L=LEN(TO$) 19f1l PRINTTAB(25-L,"$",TO$,".",TC$ 195 PRINT:PRINT:PRINT 20f1l POKE M,27:POKE M+l,224 :REM Output to video 2f1l1 INPUT" Press RETURN for another tabulatlon."Q$ 205 TC=0:TD=0:N=2:GOTO 10 210 END 225 PRINTCHR$ (23) ," IMPROPER ENTRY, 00 AGAIN !" 23f1l FOR T=l TO 5f1l0:NEXT T 235 PRINTCHR$(23) ,TAB (35) " " 24f1l PRINTCHR$(23),:GOTO 20 25f1l N=2 260 M=PEEK(-4f1l95)*256+PEEK(-4096) 27f1l IF M>32767 THEN M=M-65536 275 M=M-47 280 RETURN ~ June 1 & July 15, 1982 SORCERER'S APPRENTICE (SUPER PRINTER cont'd from p. 98) "commands" which start with control-P, control-T, control- A, or con trol-E. If the char acter is one of these four possibilities, CHIN returns with the character in A and the Zflag reset. Now let us consider what happens if one of the four special control characters had been keyed as four special cases: If control-P (printer on/off) is pressed, control passes to the code labelled CP. CP examines a two byte piece of memory called OPATCH ("output patch") that should contain either the address OEO lBH (which is the Monitor's video output routine, that I have named NOLlST) or the address OE993H (which is the Monitor's "Centronics driver", that I have named LIST). Whkhever address is found, it is replaced with the other address -at OPATCH. Having switched from LIST to NOLlST, or vice versa, CP returns control to CHIN to get the next character (control-P "doesn't count"). In order to preserve the HL register pair, it was necessary to save it with PUSH HL; the corresponding POP HL is to be found at CHINMI ("CHIN-I). If a control-T had been selected (to type all of the screent. control would have passed to CT. ::iince this code has the potential of messing up both the BC and HL register pairs, they are both pushed upon entry to CT. CT ends by running into CHINM2 ("CHIN-2") whkh pops these registers and becomes CHIN to fetch another character. First, CT sends a form feed character (you may whkh to save paper by substituting a carriase return, ODH, here at location 75H), to the printer and then enters a pair of nested loops. The innermost loop (lines 74-7), reads and prints 64 consecutive memory locations (one line) of the screen RAM. The outer loop (lines 73-80), invokes the inner loop and then prints a carriage return; it repeats 30 times, the number of lines on the screen. If a control-" was pressed, CHIN jumps to OE003H, the warm reentry point of the Monitor. Last, if a control-E is pressed (to send special char acter sequences to the printer), control passes to CEo First CE saves the registers that would otherwise be messed up. Then (starting at CE1, line 95), a "blob" char acter is put on the screen to prompt the user to enter the special sequence. This sequence will be placed in a buffer first so that I can correct an error before it reaches the printer. The address of the buffer is placed in HL. B contains the maximum length of the buffer (which is 5) and C contains an ASCII carriage return. At CC (line 99) a loop is established which calls KEYBRD until a character is received. Ignoring for the moment that the character might be a carriage return or delete (shift-RUB), the character is placed into the buffer (line 105). Br comparing the character with a bank (line 107), CE determines 99 whecba: or not the chaI actu is a control code. If not. a jump is made to N CTRL which echoes the chaI actu to the video display and loops back to CC (unles. this was the fifth charactu placed in the buffu). If . the received chaI actcr had been a control code. then lines 109-113 are carried out; a I'" is then echoed. and the charactu i. supplciDented by 40H which convuts the control code to a printable charactu. If. during input. a 7FH (RUB) is encountered then a jump back to CE1 i. puiormed to start on filling BUFFER allover again. If a CR is encountued it illdicates that we finished filhng the buffu and want to tranllDit its contents to the printerl" a jump to FIN (line 117) accomp isbes that. ADOR 01234567 0030: 0040: 0050: 0060: 0070: 0080: 0090: 00A0: 00BI1J: 011JC0: 0000: 00EI1J: 00F0: FF C3 22 80 111J 28 3E B9 3E 0A 00 OB E997 F5 CD1BEO PUSH AF CALL OE01BH ;video out Althou8h one can call LIST, one cannot call OE997H IUCcellfully in order to drive the printu uclu81Vely. because the .tack level was altued at 08993H. Too bad the CALL and PUSH instruction had not been interchan8edl CHOUT CHOUT has the respon.ibility of outputtins the char acter in the A rqlltu to the video and. if in the nu.tins nate". should drive the printer I I well. Furthu. it .hould Check the keyboard for a control-S (to immobilize outpUt). In all cases. all reguter. must be preserved. CHOUT SCarts by calling CTRLS. which does not .ave the accumulator or £118" CTRLS has the spccific task of scanning the keyboard and holdin8 up the works whenevu a control-S is .en.ed. CTRLS returns almOlt instantly. if no control-S is prClled. After control is returned from CTRLS". a jump (line 64) to LIST (0899311) or to NDLIST (OEOlBH). uka place..!., complccing the function CHOUT. "!"De jump addres8 i. at (PATCH, whkh is over-written by CP (when a control-P is pressed) alternatively with the two possible addres.es. This mcchod known as nimproper coding n • i. ~osen bccause we need to con.erve memory space at all COlt. CTaLS Obviousl". CTRLS ( line 130 ) should be dcacdbed further. I form a control-S by first prcaaing the CTRL ker. and then. the S-key. without rclellin8 the firn key. CTRLS outpUtS first a 3 to the keyboard scannin8 port: (OFEH). and tests bit: Z from that .ame port. If that bit is .et then the S-key is not dcpres.ed anJ CTRLS rCCurn. (line 135 ). Otherwise. a 0 is output and the lime bit Z i. tested. If the bit is set. the CTRL key hllnlt been depres.ed and 100 CD FE CD 19 CD CD 1B 18 F5 FE E6 36 E5 18 IE 40 14 1B FE 1B E0 3E 04 65 21 24 3E 00 28 E0 7F E0 40 03 C0 23 93 F5 0C 00 07 21 28 F1 21 03 77 23 36 E9 3A 6B CD E3 00 CD 4F 00 20 F1 C1 FE IE CA 33 00 01 E9 77 23 CD 1B E0 33 00 70 FE OB FE CD 18 E0 28 8A 00 F1 06 E1 03 00 FE 10 B9 E6 FB 23 BO C3 40 CD E0 05 20 E0 28 04 CD COEF 00 C9 03 E0 23 E0 05 18 11J9 F0 3E 21 E5 CD C8 C0 EI1J C6 CD 1B 7E 23 3E 00 00 28 11 00 1B C5 4F FE E5 28 40 E0 CD 03 FB 01 F5 E0 21 00 10 C5 () FB F5 3E 4F FE C9 EXIOY Z-80 ASSEMBLER ADOR OBJECT ST 0001 0082 0083 0804 0805 0806 0887 0008 0809 0010 0011 0012 0813 0814 0015 0016 0017 0818 0019 0020 002l 8822 A u.eful entr.Y point, that is used E993 E994 97 E9 00 0E 2A 77 20 1B 7E 18 FE CD 30 79 AC C0 8A Oump of the machine code for the MX-80 printer interface. by the above .0fCWaIe. is PRINT (line 49). whkh is the routine that outputs the charactu in A to the printer only; all registers are preserved. No IIUch routine niscs in the Sorcuerls Monitor .oftware. The closest .emblence is at LIST (OE993H): 19 97 6B F0 F9 C1 7F 28 5E 89AB >007F >11J11J33 >0011J5 >0500 >I1JI1JI1JD >E018 >0I1JFE >000A >000C >E993 >E01B >F080 >E003 ,.************************************ ,.* * ,* MX-80 INTERFACE by E.E. BERGMANN * ,* May 24, 1981 * ,.* * ,************************************ PSECT ASS BLOB BUFFER BUFLEN BUFB CR KEYBRD KEYPRT LF FORMFD LIST OOLIST SCREEN WSTART USEFUL 0024 0025 8826 0027 8828 0029 0838 , 0831 IOINIT 0032 0033 0834 2A00F0 0035 1101FF 0036 8037 19 8038 97 3665 0039 23 0849 77 0041 23 0042 368A 0043 23 0044 0845 77 0046 C9 0847 , 0048 CRPR 3E00 0049 PRINT F5 C397E9 8058 0051 , 0052 CP PUSH E5 2193E9 0053 3A6B00 0054 BO 0055 2003 0856 2l1BE0 0057 226B00 0058 STHL 0059 1824 8060 , 0061 CHOUT F5 CDE300 0062 0063 F1 C31BE0 0064 0865 OPATCH 0066 , 0867 CT E5 0068 C5 2188F0 8069 0823 >003B 003B 003E 0041 0042 0043 0045 0046 0047 0048 004A 004B 004C 8040 004F 0050 8053 0054 8057 005A 005B 0050 0060 0063 0065 0066 0069 006A >086B 0060 006E 006F SORCERER'S APPRENTICE Fl;lU Fl;lU Fl;lU Fl;lU Fl;lU Fl;lU Fl;lU Fl;lU Fl;lU Fl;lU Fl;lU Fl;lU Fl;lU 7FH 33H 5 508H 00H 0E018H 8FEH ,RST6+3 ,BUFLEN*100H 8AH 0CH 0E993H 0E01BH 8F880H 0E003H ;VIDEO+MX80 ;VIDEO ONLY ;WARM RESTART ENTRY POINTS: CHOUT CHIN IOINIT PRINT f GLOBAL GLOBAL GLOBAL GLOBAL ORG 3BH " J ;AFTER RST7 ;WILL PATCH '!HE I/O WI'!H ;CHIN AND CHOUT ; IN '!HE INTERESTS OF SPACE, ;IOINIT DOES NOT SAVE REGISTERS LD HL,(0F008H) LD DE,0FF92H+3FH ADD HL,DE SUB A ,PAGE 0 LD (HL) ,CHOUT INC HL LD (HL) ,A INC HL LD (HL) ,CHIN INC HL LD (HL) ,A LD A,CR RET PUSH JP HL LD LD CP JR LD LD JR PUSH CALL POP JP Fl;lU PUSH PUSH LD AF LIST+4 ;MX-80 ONLY ;CTRL-P HL,LIST ;TOOGLE PRINT A, (OPATCH) L NZ,STHL-$ HL,OOLIST (OPATCH) , HL CHINM1-$ AF CTRLS AF NOLIST $-2 , ; OVERWRITTEN HL ;CTRL-T BC ;TYPES SCREEN HL,SCREEN JWIC 1 & July 15, 1982 0072 0074 0076 0079 007B 007C 0070 0080 0082 0085 0086 0088 0089 008A 0080 008E 0090 0092 0094 0096 0098 009B 0090 009E 009F 00M 0M2 00AS 00A8 00AB 00AE 00B0 00Bl 00B3 00B5 00B7 00B8 00B9 0rilBB 0rilBO 0rilBF 0rilC0 00C2 00C5 00C6 0rilC9 00CB 00CC ril0CF 0001 0004 0005 0008 0009 000A 000C 0000 ril00E 00El 0EIE 3E0C C04F00 0640 7E 23 C04F00 10F9 C04000 00 20Fl Cl El CD18E0 C8 FE10 28Cl FE14 2807 FEIE CA03E0 FEril5 C0 E5 C5 3E7F CDIBE0 213300 010005 CD18E0 28FB B9 2819 FE7F 28E9 77 23 FE2ril 30ril9 C64ril F5 3E5E CDIBE0 Fl CDIBE0 10Eril 79 CDIBE0 3E0A CDIBE0 40 213300 7D B9 28AC 7E 23 CD4Fril0 18F5 >00E3 00E3 00E5 00E7 ril0E9 00EB 00EC 00EE 00Fril rilrilF2 0rilF4 00F5 00F8 00FA 0rilFO 00FF 3E03 03FE OBFE E604 Cril 3E00 03FE OBFE E604 C0 CD18E0 28FB C08Mril 28FB C9 ERRORS=0000 BLOB BUFLEN CEI CHINM2 CR CTLI FIN KEYBRD LIST NXPR SCREEN WT JW1e 1 & 0137F 131305 00M 0088 0000 0079 00CC E018 E993 0008 F080 00FA July 15, 1982 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 01390 0091 0092 0093 0094 0095 0096 0097 0098 13099 13100 0101 0102 0103 0104 0105 0106 0107 0108 13109 0110 13111 0112 0113 0114 0115 0116 0117 0118 13119 01213 0121 13122 0123 13124 0125 0126 0127 0128 0129 01313 0131 0132 0133 0134 13135 0136 13137 0138 13139 13140 0141 ril142 ril143 0144 0145 0146 LO CTLl CTL2 LD CALL LO LD INC CALL DJNZ CALL CHINM2 CHINMI CHIN OEC JR pop POP CALL CEI RET CP JR CP JR CP JP CP RET PUSH PUSH LO CC CALL LD LD CALL CE JR CP JR CP JR LD INC CP JR ADO PUSH 10 CALL NCTRL POP CALL DJNZ LD CALL LD CALL FIN 10 NXPR LD LD CP JR LD INC CALL ; CTRLS JR 10 OUT IN ANO RET 10 OUT IN AND RET YES CALL JR CALL WT BUFB CC CHIN CHOUT CRPR CTL2 FORMFO KEYPRT NCTRL OPATCH STHL YES JR RET lINT] [INT] 050ril 0rilAB 0ril8A 0ril65 0040 007B ril00C ril0FE 00C6 0ril6B 0060 00F5 C,30 ;#LINES INSCREEN A, FORMFO PRINT B,64 ;# CHARS/LINE A, (HL) HL PRINT CTL2-$ CRPR C NZ,CTLl-$ BC HL KEYBRD Z 10H A,CP-$ 14H Z,CT-$ a return is made (line 140). Thus if a con trol-S is keyed, the point I abdled YES (line 141) is reached. This point is a loop that keeps calling KEYBRD until all keys are rdeased. Flow continues to a second loop labdled WT ("wait"). The progr am is immobilized here, until a character that is passed on by CHIN is received. The placement of CHIN in this loop enables me to use the commands activated by control-E, _A, -T, and _Po ;CTRL-P? MX-SO Hardware Interface ;CTRL-T? The Epson MX- 80 printer appears to be a very versatile printer, and consequently, more confusing to connect. I made up a paralld interface cable with a 57-30360 (Amphenol or Cinch) plug at the printer end, and a DB-25P plug at the computer end, for the paralld interface socket. Between the plugs, I foot length of 12 used a six conductor cable that I had lying around. These are the connections I chose finally: ieTRL-l? Z,WSTART 5 iCTRL-E? NZ HL BC A, BLOB NOLIST HL,BUFFER BC,BUFB+CR KEYBRD Z,CC-$ C Z,FIN-$ 7FH ;REOO? Z,CEl-$ (HL) ,A HL , , lEH EXIDY MX-80 1,8,25 9,14,19-30 8 MX- 80 ack. Exidy data str. Bit 6 6 7 Bit 5 7 6 A,' I' 16 2 Bit 4 Bit 0 AF 17 3 Bit 1 18 19 4 5 Bit 2 Bit 3 NC,NCTRL-$ A,4rilH AF NOLIST NOLIST CC-$ A,C NOLIST A,LF NOLIST C,L ;SAVE POSITION HL,BUFFER A,L C ;AT OLO POSITION? Z,CHINM2-$ A, (HL) HL PRINT NXPR-$ iCHK FOR CTRL-S A,3 iIF SO WAIT (KEYPRT),A;ELSE RETURN A, (KEYPRT) 4 NZ A,ril ;CTRL? (KEYPRT)LA A, (KEYPR'l') 4 NZ KEYBRD iWAIT NOW z, YES-$ CHIN Z,WT-$ ;STILL PAGE 0 BUFFER 0033 CE 009E CHINMI 0ril89 CP ril053 CT 01360 CTRLS 00E3 lOIN IT [INT] 003B LF 000A NOLIST ErillB PRINT [INT] rilll4F EIl03 WSTART SORCERER'S APPRENTICE 2 4 10 1 5 REMARKS Ground The grounding of Exidy pin 25 means that there is never a flBUSY" signal. The MX-80 pin 9 must be grounded, because the printer expects an 8th data bit (normally a zero), whereas the Sorcerer provides only 7 dat a bits with its Cen tr onics interface. The MX-80 pin 14 is grounded so that the printer will line feed automatically after receiving a carriage return character; the Sorcerer driver fil ters out the L F char acter. The Cusette The preferable way, of course, to generate the machine code, is to start with the assembly code and assemble it. Since you may not have the patience nor the assembler, I have produced a dump of the machine code that can be entered using the Monitor command, ENter. After entering the hex values into the memory locations 3BH through OFFH, issue the commands: SET X=3B SAVE MX80 3B FF Of course, your cassette recorder should be set up to record the saved program. While you are at it, .why not record the progr am sever al tunes over. That way you are less likdy to "lose" the progr am, and you will not need to rewind the cassette so frequently. Incidentally, installing motor control for the cassette recoIder(s) is well worth the effortl The recorded cassette can be used with a simple "LOG" command. This printer software will become your constant companionl.O 101 .--------FOR THE EXIDY SORCERERTM-----. I • • • • • • A Dogfight in Space • • • • • a real-time graphics game for two players written in machine language for the Exidy Sorcerer™ graphics characters continually redrawn for smooth, high-resolution movement each ship realistically accelerates, rotates, and fires 16K required • $20.00 for cassette (includes shipping) • We think you'll like it! == P.O. BOX 1 91 0 • E U G ENE, 0 REG 0 N 97440 • ( 5 0 3) 689·7409 102 SORCERER'S APPRENTICE ,. , , I two instruction codes for LD A,(BC) and LD (BC),A. Once HARDWARB NOTBS these instructions are fetched, the contents of the LS273 by Russell Flew page-regista are added to the Z-80's 16 bit address bus Sevaal issues back I wrote a column about the S-100 ex tending it to 24 bits. The next instruction is then Box and its signals. I mentioned that I was wodcing on executed at the newly defined page. When MIl goes to genaating the PHANTOMI signal fOI the SOlcela. I have logic 0 at the next Tl, the flip-flop is cleared and the since leceived many lequests fOI infolmation on how this program resumes at page 0 in main memory. This technique signal might be used to expand memory beyond 64k. does still confine program memory to the 56K of RAM that the Sorcaer has at The best method I've page 0, but it allows seen is an imprcwemen t ova 16 megabytes of on the traditional paging data memory with very method. The technique little hardware ovaI'll describe frees \{I the head. most significant address bit and therefore allows considaaDesign each page to have a full tions that should be 64k of RAM. Since the kept in mind include technique adds 8 bits to the need to pick-up the address bus, \{I to zoo CPIJ most of these signals 256 pages can be addresinside the Sorcerer. sed. Most importantly, While the S-100 box the hardware is tr ana has the free address parent to existing softlines to ex tend the ware. addressing to 24 bits, Let me state right up those 8 addition al front that this is no lines will have to be min« modification. It carried out of the is intended for the Sorcaa on anotha ex perienced computerist flat cable and buffaed with a strong hardware into the Expansion background and the right Box. Also, don't forIt involves at equipment. get that the expansion DEtrDBo LD IBC}, Aor Clur LDA.(8CI least 8 additional chips bus is non-selected .,.cs.tIcllG ~c~. :::: that must be timed and wheneva the main /' buffered correctly so as logic board is active. ' - -_ _- ' -_ _ _ _ _ _ _ _ _ _--'~ FIIP"IIOp J.1""ructiOntMcl"l~-.l "not not to interfere with the I........ G.toG.-1 and etc. is for the birds. So I came up with my own MERGE. by Bill Boucher (This article is reprinted from the May, 1980 issue of the S.U.N.) For those of us into machine or assembly language, found seva al useful subroutines in BAS IC. A routine at D015 will output to the screen the ASCII string starting at the memory location specified by HL. The string must be taminated with a 00. Ex ample routine calling DO 15: 0000 0003 0006 0007 0008 0009 OOOA OOOB OOOC 21 07 00 CD 15 J:X) C9 48 45 4C 4C 4F 00 SA"IHI HL,M)Gl ID CALL J:X) 15 jSet HL to string ;Call output subr. RET MSGI "H" "E" "L" "L" ;Start of string KP ;End of string "a' Loadins Instructions: From BASIC: type --- CLOADG MERGE, . From the Monitor: type - LOG MERGE, . MERGE loads from 10H to F3H, and sets the input vector to 101i, the same as typing SE 1=10 while in the Monitor. I chose for MERGE to load at 10H because my Sorcaa likes to "chew up" the first few bytes of memory when I push the RESET buttons. Anotha routine at D7BB convats the 16 bit numba in the HL register pair to decimal and outputs it to the screen. @ Ex ample calling the routine at D7BB: 0000 21 01 01 DECDJI' ID HL,010lH ;HL=257 decimal 0003 m BB OJ CALL D7BB jConvert & displ. 0006 C9 RET Bill Boucher, 1740 California St. #7, Mount ain View, CA, 940400 June 1 &: July 15, 1982 Operating Instructions: I made this part as simple as I could (mainly because I'm lazy). When you load MERGE, it takes ova with its keyboard input routine, which just checks for three CTRL SORCERER'S APPRENTICE -- 103 -~---~--------------------------- key .. whkh uen't used for anything, and returns everything el.e. MERGE looks for the following keys: CTRL-B : Disables MERGE. You must use this key before you run any program which POKEs into low memory. Otherwlle, strange things happen, eventually causing BASIC to cruh if you POKE in the wrong place•. CTRL-R : Recovers a program after you have typed NEW, CLOAD, or hit RESET. Thi. works only if your program hun't been destroyed by random POKE. or .tack overfiow. NOTB: If you want to MBRGE something to a program you've loaded from a tape, I suggest you use CTRL-R to readjust the end-of-program pointer before you MERGE anything to it. The reuon for this is that standud BASIC adds a byte to the end of a pro~r am every time you c;SAV~ it. In other words, if lou save a program fiVe tunes, the lut copy wil have four eztra bytes at the end. These eztra bytes keep MBRGE from working correctiy. CTRL-R drops these ez u a bytes. CTRL-B : Bztend. the program ~ MERGBing. When you press CTRL-B, there won t be any visible chanBe ezcept that CTRL-B, CTRL-R, and CTRL-E will ive! ?SN BRRORS, u if MERGE had never been Ollded. When you press CTRL -R, the screen .hould show a amall flicker, however brief, but no other visible signs that it worked. However, when you press CTRL-E, you will see: Unit # , Name ? - f di~layed on the screen (or whatever your input dev~e happens to be). You now have several opuons: 1) Hit . The defaults take over and MERGE the fir.t program from tape drive #1. 2) TYPE: 1, . Same effect u 1. 3) TYPE: 2, . MERGEs the first program from tape drive #2. 4) TYPE: 1, 'file name' . This will MERGE the program 'file name' from tape drive #1. EXAMPLE: To MERGE PROG1 from drive #1, TYPE:. 1, PROG1 5) TYPE: 2, 'file name' . . Same option u #4, ezcept it uses tat'e drive #2. If you use a filename, you must Include the drive unit #1 After you hit , MERGE will turn on the specified (or defaulted) drive unit. Then, if a file name wu given, it will .earch the tape for the correct file and MERGE it with the program in memory. Otherwise, it will simply MBRGB the nezt file on tape to the program in memory. MERGE adjusts ALL pointers in memory, so there's no more worrying about typing: 0 REM, then delete line 0 then uying to remember whether or not you already HAD a line O. Caution. I .UI that MBRGE will recover your program after you wah RESET. This is Uue oolf if you give input control &ac:k to MERGE. You can do this in one of three waysl 1) Go to the Monitor and SET I = 10H, the stut of MERGE. 2) Go to the Monitor and type GO E7. MERGE will .et the input vector for you. 3) From BASIC type the following line . IMPORTANT: the above must be on one line, or your Sorcerer will hang up, meaning you will have to RESET it again. For 8K, 'Dnnn = 8146 For 16K, nnnn = 16338 For 32K, nnnn = 32722 For 48K, nnnn = 16430 You must be cueful about the programs you merge. MERGE doesn't cue what type of program you tell it to get, .0 you must keep uack, or you'll wute a lot of time re-typing destroyed programs. 104 Whatever program you merge MUST have line numbers greater than those already in memory, or the merge will be useless and will use up precious memory. CCIIIIJIla.d Summary CTRL-B = Disable MERGE and return to BASIC CTRL-R = Recover program and reset pointers CTRL-E = Eztend program by MERGEing Merging with unit # and name. Works with Monitor Ver 1.0, and Standard BASIC Ver 1.0 (Other vers ions of Moni tor and BASIC not tested as yet.) Copyright (C) 1981 by J au Cooper Jr. Equates, in Alphabetical order: ; BLADJ BPJ3N) BPSIO LINE' OE7341-1 ;SKlP FILE eN TAPE OE7FBH ;TAPE 10 MIM:RY TRANSFER 10H CRG START ;BASIC LINE POINIER ADJUIT ; J3N)- , 1RY AGAIN ; ,~ 10 BASIC RET NZ CALL ID ID ID RET GBI'IY ;FIN) lIWA HI.,KEYID (IY+41H),L (IY+42H),H ;KEYBQAlI) ID ID ID A,O HI.,BPSlO+4 ID ID CR (BPSTRO) ,HL A,H ; RSETI ; RECDV CPIR 0IlCK JR 10 INC ID PNI'R lm:.E ;YES ,MERGE EX JR EX INC JR IQJ CALL ID CALL CALL PUH CALL INPUT RClJfINE ;IDN BITE ;HI LINE START ;PIOi J3N)? ;YES, RESIt:BE POINIER ;POINr 10 NEXI' LINE ;GETEID IN HI. ; +1 BYI'E ;ADJUST POINIERS & ~ ;SKlP A LINE ;SI'ART ~ MESSAGE ;PRINI' rr ;NEID pm M:MN LA1ER ;GET llirr # & NAME, ; IF /tN'l ; & PCP 10 ID CP HI. E,l A, (HL) ;MVA IN HI. ;CASSETIE 1 IS DEFJU.LT ; INPUT ~ ;ANY? CALL NZ,a:NV ID CP B,E SORCERER'S APPRENTICE ~ ;YES, GET DRIVE # IN E ;OIHERWISE, DRIVE # 1 ; IS 1H\T ALL 1HE INPUf? June 1 & July 15, 1982 o Z,NEKI'-_ JR PlSi CALL @ Be +2) ,HI. (BPIN)+4 ) ,HI. HI., (BPSIO) DE IP BIADJ SEI'I PUSH CALL PCP JR JQJ DEFB DEFB DEFB DEFB DEFB DEFB DEFB DEFB DEFB DEFB DEFB DEFB DEFB DEFB DEFB CALL lD ID ID I DE SKIPF DE FLCXP-_ ;N), MERGE 1HIS CNE ;PUI' IY ; IN IX ;NAME LlNiIH ; aMPARE INPUI' ;\\KNG NAME, SKIP FILE ;OK SO FAR, KEEP a-mcKINi ;MATQ-l - MERGE PIO:iRRof) ;SKIP ANOIHER LINE ; FI RSI' PIO:i IN) ;GET # CF BYrES IN 2nd ; PRaiRAM ; -1 FeR MEM:EY A1DR ; IN) CF MERGID PIO:iRRof) . IN HI. ;SI'ART CF VARIABLES ; SI'ART CF ARRA'~ ;SI'ART CF FREE MEM:EY ;AIDR CF 2nd LINE ;ADIUSf SI'ACK, WE ; \\tN 'T RE'I1.:RN ;ADJUSf UNE POINTERS AN) ; RE'll..mI 10 BASIC ;
Source Exif Data:File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.3 Linearized : No XMP Toolkit : Adobe XMP Core 4.2.1-c041 52.342996, 2008/05/07-21:37:19 Create Date : 2018:08:21 13:01:47-08:00 Modify Date : 2018:08:21 13:04:42-07:00 Metadata Date : 2018:08:21 13:04:42-07:00 Producer : Adobe Acrobat 9.0 Paper Capture Plug-in Format : application/pdf Document ID : uuid:fb2e4a81-2e67-054c-a6b9-546823629d5e Instance ID : uuid:672fbd83-4b9d-b849-9892-e66217617aa1 Page Layout : SinglePage Page Mode : UseNone Page Count : 36EXIF Metadata provided by EXIF.tools