The official

BASIC Newsletter

Upgrades Introduction to A Call for ZBasic Zedcor offers upgrades to users General Purpose at a surprisingly fair price. Subroutines The latest release of the various versions of ZBasic and the This newsletter is for people Many of us would like to reference manual is: that use Zedcor's BASIC obtain Public Domain ZBasic . ZBasic operates on routines so you don't have to re- Amstrad (CPIM) 3.1 many computers including; create the wheel every time you Apple II DOS 3.3 3.11 IBM PC's, , write a program. Can you CPIM-80 TM 3.1 Apple //s, CP/M machines and imagine the time it would save? Kayproo Graphics 3.1 more. MSDOSTmlIBM PC 3.02 continued page 19 ' 3.03 "Z" is also the result of TRS-80(1,3 and 4) 3.1 hundreds of requests from ZBasic users. ZBasic Inventor ZBasic Manual: 3rd Edition It is an efficient way to Since ZBasic is a living, distribute important information growing language, there will to programmers including: always be enhancements, bug fixes and improvements. • The latest Upgrade notices • Programming tricks Customer suggestions are • Fixes and Patches continued on page 15 • Program Examples • The latest from Zedcor • Program announcements • Dear Dr. Z column • Technical Support notes Introduction 1 • User Forum Dr. Z 8 • Notes from the Developers Subscription 20 continued on page 9 Applications 19 Apple // 2 Andrew Gariepy, President TRS-CP/M 2 MSDOS 3 As most of you know, Andrew Macintosh 3 Gariepy created the first Updates 1 version on a TRS-80 computer, Users Group 18 back in 1979. Since then it has BBS 18 developed into Equations 18 Doctor Z Page 8 continued on page 7

© Copyright 1986, Zodcar, Inc., All rights Roscrecd Page 2

—=-= 1IjI._I --l-

Apple /1 Z80 Notes Notes Apple® lle, llc, 11+ CP/M'' and TRS-8OTm Computers The latest version of ZBasic for DOS 3.3 is The Z80 versions of ZBasic are the oldest. 3.11. What's been fixed? There were some Andrew Gariepy created the original ZBasic on problems with Chaining, CLEAR END, an old TRS-80 model one computer back in CIRCLE PLOT, CIRCLE FILL and BOX FILL 1979. At the time it was just for fun, but over and a couple of other minor things. the years it became a serious business. Although Z80 computers are falling out of favor lately, we To check your version; will continue to support them with

continued page 4 continued on page 6

diskette with the problem Support Notes program and a listing of the by David Lewis, Zedcor Technical area where you are having a Support Group problem. I also need to know what computer you are using I've been programming with (remember: ZBasic is available for many ZBasic for some time now and machines). in my opinion it is the fastest, most versitile compiler on the If security is a problem only market. It does, however, submit that part of the code that have its complexities (that's is giving you a problem. why I have this job). If you have any support I remember when support questions or need help with a questions were easy; like complex part of ZBasic, feel "How do I save in ASCII?" free to call me; 1 1AM to 5PM cluestion over the phone and Mountain Standard Time. Lately I get more sophisticated request the second user to send That's two hours behind the questions like; "I'm converting me more information by mail. East coast and the same as the a program over from MSBasic. West coast except during It is 97K in length and it bombs Most questions can be handled daylight savings time when when I compile it". Being a by phone but when it involves there is an extra hour difference programmer, I'm sure you can examining code and program (Arizona doesn't observe appreciate my delima and logic of any considerable size, daylight savings time). understand why I would have phone support is not feasible. no problem answering the first In this case please submit a D.L.

Copyright 1986, Zcdccr, hc., All rights Rrved

- II 11* IBM-MSDOS Macintosh Notes Notes IBM® PC and MSDOSTh compatibles Mac 512Th, Macintosh PlusTh, Mac XLTh This version of ZBasic continues to be the hottest We're all excited about the Macintosh version of seller. ZBasic. With the Macintosh event-trapping, powerful toolbox software, MacinTalk interface This column is packed with information. Please and 68000 cpu, it is the most exciting version of submit any programs you have for IBM PC or ZBasic available. Cheers to Apple for making MSDOS machines so we can include them in such a powerful human interface. future newsletters. Your help is appreciated. This version of ZBasic is selling like hotcakes. The subroutines included in this column may be People have been waiting for a "serious" BASIC used freely in your programs or be passed out to for the Mac for a number of years and now they your friends since they are Public Domain (this have it. does not mean that you can sell them for profit unless you get the authors permission). Please submit your Mac-specific articles and subroutines, especially in the area of Toolbox use Update Information and Mac event-trapping, for inclusion in future newsletters. The latest release of the MSDOS version of ZBasic is 3.02, dated March, 1986. There have Send any suggestions or feedback. We're been lots of things added since version 3.01 so always looking for ways to improve ZBasic. be sure to upgrade: Update Information • EOF function • Page flipping Version 3.03 for the Mac was released December • Functions for BLOAD, BSAVE, CALL etc. 1, 1986. Users that bought ZBasic after • Bug fixes September 1 can get free updates: see page 15 for • More OPEN"C" support complete upgrade information. • Misc, other fixes and additions How is version 3.03 different from 3.01? BASICA to ZBasic Conversion Program • Lots of fixes and fine tuning Zedcor has a BASICA (and GW Basic) to • 10 new Dialog functions ZBasic conversion program available for $29.95. • New Window refresh support

continued on page 11 continued on page 16

0 Ccpytiglt 1986, Zc&cr. Inc. All 6gbl. Rc,vcd Page 4 Apple the 40 column screen and load continued from page 2 APPLE II Technical it into an array. The 40 column start up ZBasic and read the screen starts at memory version number. Version 3.11 Support Notes location 1024 but is not was released on November 12. David Lewis, Zedcor Technical contiguous. See page 31 of the If you purchased ZBasic after Support Group Apple He reference manual for August 15 and you have As part of the Zedcor support address map (figure 2-5). version 3.0, send in your group let me express my desire master and a copy of your to help you with any of your LONG FN DIR(alot, drive) invoice and license agreement ZBasic questions. Feel free to POKE &AA6A, slot number to us for a free contact me at Zedcor, 5 days a REM slot number 0-7 upgrade. Before that date the REM usually slot six week, from 11AM to 5PM, upgrade is $19.95. POKE &AA68, drive MST. The phone number is REM drive 1 or 2 DOS 3.3 doesn't seem to be (602) 795-3996. CALL &A56E used much anymore. I END FN remember a couple of years This column will cover the Runtime DIR ago, when ZBasic was in the common problems ZBasic early development stages and users have using this version. ProDOS had just begun I get asked these same shipping, some of us thought it questions everyday and can Loading Applesoffrm wouldn't make it. Boy, were recite the answers in my sleep. Programs into ZBasic. we wrong. ProDOS is much Keep your newsletters handy more powerful and easier to for future reference. We have had many requests for use than old DOS 3.3 which a way to easily load Apple- now seems to be falling by the Please send any subroutine softTM programs into ZBasicTht. wayside. solutions you have created for Many people have tried the Apple. I will include them LISTing the program to disk in my column to help you and ApplesoftTm to ZBasicm but this adds an extra blank line your fellow users. which confused ZBasic (fixed conversion program in version 3.11). BSAVE and BLOAD A ZBasic user has created an Functions for DOS 3.3 I asked Greg Branche, head of Applesoft to ZBasic conversion our Apple II R&D section, to program. It converts existing The following routines were help me out. He gave me these Applesoffrm programs over to provided by Greg Branche to ingenious instructions and a ZBasic (about 98%). This do the BLOAD and BSAVE program line that solves the saves a lot of time and frus- commands as in ApplesofV'. problem nicely; tration when converting. These are long functions so be sure to put them at the STEP 1: The program must first be Available from: beginning of your program. converted into a sequential text file Carl Bringardner by adding the following line to the 1736 E. North Broadway Listing on Opposite Page. program you want to convert. Make Columbus, OH 43224. sure your Applesoft program doesn't How to get a Catalog have a line zero, then add: (DIR) During Runtime 0 F$="FILENANE': PRINT CHR$ (4) "OPEN ";F$:PRINT The following function was CHR$(4)"WRITE";F$:POKE 33,33: given to us by Greg Branche. PRINT"O'; :LIST 1-:PRINT It allows getting a disk CHR$ (4) ;"CLOSE" :TEXT:END directory from a running Applesoffm to ASCII ZBasic program. To load the directory into your program you could PEEK at the text on continued next page

0 Copyright 1986. 7z&cx, hE.. Al rights Re,cxvcd continued from previous page How to Configure Graphic Setting Aside Coordinates to Apple's "SAFE" Memory STEP 2: After running the program Pixel Resolution above, your program is now in text format on the disk with the filename A number of programmers "FILENAME". have asked how to set aside To set graphics to pixel "safe" memory for machine coordinates of 280 x 192 for Hi- To load the program you just created language programs. Res and 560 x 192 for Super into ZBasic,flrst load ZBasic, press Hi-Res (versus the standard "E"for edit and then type; LOAD A simple way is to use a DIM ZBasic device independent "FILENAME". After a minute or so statement. Example; if you Graphic coordinate system of the program will be loaded into the need 100 bytes, use DIM 1024068) do the following: ZBasic editor for compiling. Fake%(49). This sets aside POKE &F388, &60 100 bytes for this integer array REM Sets to Apple's coordinates STEP 3: SAVE the program with (2 bytes per element 0-49). the FILENAME you want. To reset the system back to SafeAdd.ress% = VARPTR(Fake%(ø)) ZBasic coordinates:

POKE &F388, &A9 REM: BSAVE function same syntax as Applesoft except REM Reset to ZBasic coordinates REM: it has FN in front of it: You must supply Start REM: address and Length LONG WN BSAV (Nama$, Start, Length) ProDOS Version Notes Name$="!4"+Name$: REM File type 4= binary file OPEN"O", 1, Name$ The ProDOS version of ZBasic Write#l, Start, Length: REM Header info will be out early next year. End=Start+Length FOR i=Start TO End STEP 2 There will be two versions; a%=PEEK WORD(i) One that operates in 64K, WRITE#1, a% primarily for old Apple //-i-'s NEXT I and the new He's without CLOSE#l: REM All done! extended memory; and a END FN 128K version for the lie and llc REM: BLOZD function same syntax as Applesoft except with 128k. REM: it has FN in front of it: If Start=zero REM: load the file where it was previously saved from. Both the 64K and 128K LONG FN ELOAD (Nama$, Start) versions will be included on the Name$="!4"+Name$: REM File type 4= binary file same disk. The new ProDOS OPEN"I", 1, Name$ version of ZBasic will be called REM If Start address not given use file address 4.0. IF Start=O then READ#1, Start ELSE Read#1, End READ#1, Length:REM Get length from file Some of the features of the WHILE Length>128 READ4t1, a$;128:REM Read 128 bytes at a time New ProDOSTm Version FOR 1=1 TO 128 STEP 2 POKE WORD Start-1+i, PEEK WORD(VARPTR(a$)+i) • Both the 64K and 128K NEXT I versions will support ProDOS Length=Length-12 8 RAM disks; take advantage of Start=Start+128 extra memory WEND READ#1, a$;Length: REM Read the last bytes • BLOAD and BSAVE FN's FOR i=1 TO Length STEP 2: REM Finish pokes to mem that use ProDOS directly POKE WORD Start-].+i, PEEK WORD(VARPTR(a$)+i) NEXT I CLOSE#1 Change system prefix END FN Apple 1/ BSAVE and BLOAD FM's continued page 12

0 Copyright 1986, Zcdcx. Inc. All rights Rerved zB0 continued from page 2 Z80 Technical BREAK key Problem with the latest version of ZBasic. Support Notes NEWDOS on TRS-80 David Lewis Upgrade Information Zedcor Technical Support This problem crops up when people are using ZBasic with The latest version of ZBasic for As part of the Zedcor support NEWDOS. It has to do with group, let me express my NEWDOS disabling the CP/M-80, Amstrad, TRS-80, desire to help you with any of and Kaypro, is 3.1. It has BREAK key. Simply been available since August your ZBasic questions. reconfigure NEWDOS to 1986. enable the BREAK key and the problem is solved. Upgrades for people that purchased version 3.0 since After using CMD" ", my June 1,1986 are free; just TRS-80 program "hangs". send your master diskette with What's the problem? a copy of your dated invoice for replacement. If purchased ZBasic allows you to do many prior to Aug. 1, cost is $19.95. of the TRSDOS or NEWDOS calls with CMD"" only if those commands fit within the New Manual memory allocated to the This column will cover the system. Some commands, The Third edition manual is common problems ZBasic like COPY, will load larger also available for $19.95 (one users have using this version. modules over your program to a customer). It has the Z80 I get asked the same questions code and destroy it. ZBasic appendix built-in and has been everyday and can recite the starts at &3000 on Model 4's revised and re-edited. It is now answers in my sleep. Keep and &5200 on model 1-3. Be 630 pages compared to the your newsletters handy for sure the code does not second edition which was 400 "overflow" into this region. pages. Well worth the $19.95. future reference. Please send any program You will need to determine solutions you have created for which DOS functions cause the High-Speed Math Package this version. I will include problem through trial and error Available for Z80 them in my column to help (unless some kind soul will your fellow users. send a listing of which ones We now have available for work and which don't). CPIM and TRS-80 model 4, Runtime DIR with CP/M the Z80 high-speed binary Another way to overcome this problem is to call a "DO FILE". floating point math package A number of you have asked option. It does binary floating A "DO File" is created using for a way to get disk directories "BUILD" in TRSDOS and point math in 6 digit precision in a running ZBasic program and is 3-10 times faster than the most other DOSes and can be for CP/M 2.2, CP/M plus and used to execute a series of BCD version of ZBasic. It is CPJM 3.0: Mr. Jessup from quicker than greased lightening operating system commands Jessup's Softworks, 2205 and a final command to re- for those scientific programs Ingrid Ave., San Diego, CA give that can't wait. execute your program. Of 92154, was kind enough to course variables must be send an example program that saved. It does not have the accuracy or reads the CPIM directory. selectable precision of the BCD version but it sure is quick! Thank you Mr. Jessup:

It is available now for $59.95 Program listing on opposite page. plus shipping.

0 Ccight 1986, Inc., All rights Rced to

ZBasic Inventor continued from page one a powerful "Standardized" 01 REM XDIR 1.0 11/08/85 Jesup's Softworks version of BASIC that runs on 05 CLEAR many computers. 10 DIM 128 DMA$, 25 FCB$, TEMP$, 80 I$(150), 1 A$, DR$ 20 REM 30 REM He has supervised all the 40 "XDIR" current versions and is respon- 50 CLS sible for the newest updates to 55 REM the Macintosh version. 60 REM 01985, Jessup's Softworks. Public Domain. 65 REM Use in your programs for non-commercial use. 66 REM Mr. Jessup at (619) 424-7288 for commercial use. Andrew has previously been 67 REM involved in R&D for both 70 I=LEN (S$) /12 Hardware and Software at 80 PRINT@ (40-1,1) ;S$ National Semiconductor, Burr- 90 LOCATE 0,2:CLS LINE Brown, Inc., and Simutek 100 INPUT@(22,2)"DIR OF WHICH DRIVE 'A' OR 'B' ";DR$ 110 DR$=UCASE$(DR$):IF DR$<>"A" THEN IF DR$<>"B" THEN 90 Computer Products, Inc. 120 LOCATE 0,2:CLS LINE 130 PRINT@(32,2);"DIRECTORY OF ";DR$;":'" He has designed complete 140 IF DR$="A" THEN DR=l ELSE DR=2 computer systems and 150 PRINT peripherals as well as systems 160 FCB$=CHR$(DR)+"???7???????"+CHR$(0) :DMA$=SPACE$(l28) 170 REM "SET-DMA" Set DMA address software. 180 REM LD C,#lA; LD DE, DMA$; INC DE; CALL BDOS 190 MACHLG &OE,&1A,&11,DMA$,&13,&CD,&05,&00 Andrew is President of Zedcor, 200 REM "SEARCH-l" Search for first Inc. 210 REM LDC, #11; LDDE,FCB$; INCDE; CALLBDOS; LD(FIL%),A 220 MACHLG &OE,&11,&11,FCB$,&13,&CD,&05,&00,&32,FIL% 230 FIL%=PEEK(VARPTR(FIL%)): REM Low Byte 240 J=0 Michael A. Gariepy 250 LONG IF EIL%<4 Editor 260 DO 270 J=J+1:IF J>64 THEN PRINT ERROR J>64": GOTO 400 280 K=FIL%*32+2 290 TEMP$=MID$ (DMA$,K, 11) 300 1$ (J) =TEMP$ 310 A$=MID$ (DMA$,K-1, 1) 320 IF A$=CHR$ (&EF) THEN J=J-1 330 FIL%=VARPTR (FIL%) 340 REM "SEARCH-2" Search for second 350 REM LD C,#12; CALL BDOS; LD (FIL%),A Editor Michael A. Gariepy 360 MACHLG &0E,&l2,&CD,&05,&00,&32,&FIL% Technical Editor Andrew R. Gariepy Support Editor David Lewis 370 FIL%=PEEK(VARPTR(FIL%)): REM LOW BYTE 380 UNTIL FIL%>5 'R&D Editors 390 END IF MSDOS, IBM PC Hal Liang 400 FOR 1=1 TO J Apple If Greg Branche Andrew Gariepy 410 TEMP$=MID$(I$(I),1,8)+1T.+MID$(I$(I),9,3) Commodore David Lewis 420 PRINT " ";TEMP$;" 430 IF (I MOD 4 =0) THEN PRINT ELSE PRINT 440 NEXT I Circulation Karen Moesh 450 PRINT: PRINT Subscriptions Leyla Blisard 460 PRINT "THERE ARE ";J;" FILE ON DRIVE Tt;DR$;fI: . Visa/MC/Amex 470 PRINT "THERE IS ROOM FOR ";64-J;" MORE" (800) 482-4567 480 PRINT 490 PRINT: INPUT"PRESS RETURN TO CONTINUE";TEMP$ Advertising Michael A. Gariepy (800) 482-4567 500 RETURN Publisher Zedcor, Inc. CP/M-80 or CP/M Plus 4500 E. Speedway Suite #22 Runtime DiRectory Tucson, AZ 85712 Example (602) 795-3996

Copyright 1986. Zc&r, Inc.. All rights Rcrvcd

year yr. L Dear Dr. Z, INDEX$ does not work. Is there any way to defeat the Knit Allen Deadorff 7417 Lazy S. Lane NE automatic indentation of loops. Bremerton, WA 98310 Torn Ashwell BusmessCare Box 189 The problem you are having Thornhill, Ontario UT 3N3 with INDEX$ is a common one. What is happening is that you must set aside memory for Yes. Just load your source INDEX$, otherwise it appears code (saved in ASCII with not to work. The command to SAVE*) into a word processor use is CLEAR nnnn, where then list it out to the screen or nnnn is the number of bytes printer. Listing to the screen needed for the INDEX$ arrays. without indentation can also be This is limited to the available accomplished using the up- memory of the computer. See down listing keys; the cursor the appendix for your computer keys on MSDOS and Apple lie- for specifics and also see the //c machines, the I, [and] keys "MEM" command in the on the Macintosh, and reference section. configurable on other computers. Dear Dr. Z, !Dr. Z itIf.c.omputer, half- Suggestion: clearly state that human. He itfrom the wor&Iof ALL KEY WORDS MUST BE .4onjthmürm-. a £ar€strange (and Dear Dr. Z, PLACED IN CAPS at the of Data Trees and B marygahzVu. When I set ZBasic to default to Single or Double precision beginning of the manual. He thinks in ZfBatie and knows all David Nunn under "Configuration", ZBasic Stanford University there itta kiww about the 3325 Stockton PL runs slower than MBasic"! Palo Alto, CA 94303 utguage. 9k it a being afstrange ksow(dge and Anonymous You're right David. This That's right! Standard ZBasic confuses folks that are used to If you have any questions about other versions of BASIC that ZBasie stint them to ft Z. He comes with a High-Precision, will answer all (etters. Those BCD package (all FP don't care about case. I will titters ofpufihe interest will calculations default to 14 digits have your suggestion added to appear in this eohunn. precision). While you can get the next addition of the manual. incredible precision without the The solution to this problem is Unless otherwise specified, names rounding errors inherent in to set COVERT TO UPPER- and address will appear in the Binary Math packages (a 1 can CASE to "YES" under cotunu'. be .999998), the performance configuration. This will for doing integer and scientific alleviate the confusion. It will Seiulque.ctions to: calculations is a bit slower. also make a variable like "Fred" Z Therefore it is extremely the same as "FRED". 4500 L Speedway, #22 Tucjon, AZ 85712 important to define only those variables that will be used in Dear Dr. Z, floating point operations as We develop for the Apple, and single or double precision. It is I would like to know if your The release of the Apple II also extremely important to set Apple version would allow us ProDOS version has facilities for loading in your own Double precision accuracy to 6 to change the character sets digits (8 on the Mac) to get when using text and graphics. character sets for the lie, i/c or maximum speed since Double We write chemistry and 11+. This should solve your problem. Word is that existing precision sets the internal digits educational software and would of calculation, not single need many special symbols. owners of the Apple version precision. ZBasic "Integer" Thanks. will get the ProDOS version at math is faster than any other Paul Groves 5051b off! Look for it around The Mole Company ; A 15455 Glen Oaks BL l243 tnt: eru.s of the year. Sylmar, CA 91342

0 Copyrlajit 1986, Zedccr, I., All riliii Rccd language! Introduction more ZBasics than we ever Some examples of things that continued from page one imagined---and most of the don't need to be floating point; The ZBasic language is a living sales have been from word of a FOR -NEXT loop variable, thing. It is constantly mouth. Many thanks to all of any numbers between -32768 changing, growing and you for your support. and +32767 (±2 billion on the expanding to fit the needs of its Macintosh), any math done in users. Most of us here are We hope you enjoy this issue. integer range and any other programmers. We understand Everyone at Zedcor worked integer functions. Setting the concerns of other hard to put it together. Special Z8asic configuration to default programmers. We would like thanks to Andrew Gariepy, to single or double precision is to make this publication a David Lewis, Greg Branche a sure way to slow down a useful tool by providing a and Hal Liang for their program. forum for technical ZBasic users support. The We have a high-speed, binary to share newsletter math package available for Z80 experiences, was printed computers for $59.95. Watch programming using Micro- for optional high speed, binary ideas and soft Word' math packages coming for the provide and Page- IBM PCIMSDOS version support for MakerTm on a (supports 8087 and 80287 each other as Macintosh coprocessors) and the Mac- well as the P1us1'', with intosh and Apple /1 (SANE and support from an Apple 68881 coprocessor support). Zedcor. This Laser- will help us writer. The speed offloating point for provide you the high-speed, binary math with a options is incredible, but it will language that not have the configurable fits your Michael A. Gariepy precision of BCD ZBasic. needs in every possible way. We Need Your Support Dear Dr. Z, Zedcor began shipping the IBM Excellent package for only PC®/MS DOS, APPLE Il® To make "Z" a success we need $89.95. I could use a full and Z80 versions of your active involvement. screen editor though (IBM ZBasicTm in September of version). 1985. Since then we've Please submit articles, utility Michel Blais added the Macintosh version subroutines, or any other 16431-97 Ave. Edmonton, Alberta T59 OE1 and the High Speed floating information that may be useful point math package for Z80 or of interest. I'll include machines and are working hard submissions in the newsletter The problem is solved in on the latest new products for for the benefit of all. version 4 .0 for MSDOS-IBM next year. PC and Apple II computers "Z" has quite a few helpful coming in December. I've We have finally installed programs but to make future used it and it's great. systems to keep track of our issues even more valuable we rapidly growing customer base. will need your involvement. Write and edit programs This allows us to inform you in without line numbers, or with a timely manner of updates and Any feedback about how I can line numbers on only some revisions with this newsletter. improve the newsletter or make it more useful will be It's been a busy year and we all appreciated. continued next page thank you for making it a prosperous one. We've sold Ed.

0 Copyright 1986, Zcdccf. Inc. AU rights Rcaervod Page 10 lines, complete sorted 50,000 long integers on You bought the right language cursor control and more. (this the Macintosh in 3 minutes. 26 Richard. We do everything the is not to mention all the other seconds., Mr. Brouwers Apple LaserWriter driver can additions to 4.0.) Quick-Sort did the same support. Using ROUTE 128 number in 0 minute. 54 allows you send graphics and Dear Dr. Z, seconds. Clearly superior! text simultaneously. LPRINT Thank you sir. The listing is with the ZBasic TEXT Enclosed is a program I've on the opposite page: command allows complete font created that will APPEND data control (Zfiasic even lets you to an existing (text) file. Dear Dr. Z, do color on the ImageWriter Jim McGarity 411 Jackson Ave. I need a package that takes II). Endicott NY 13760 (60) 748-9568 FULL advantage of the Laserwriter. MSBasic does not Thanks Jim. This program support this. Does ZBasic? Richard Harbue was written for MSDOS Progressive Designs ZBasic but should work 68 Dahlia Wa equally well with the CPIM, Louisville, CO 8002 TRS-80 and Apple II versions. Note that TRS-80 RECORD 10 REM FUNCTION: Open 20 REM Open the filename f$ for APPEND as file lengths are 256. Note that the 30 REM number f%. The record pointer will be Mac version has an APPEND 35 REM positioned to the next available position command so this program is 40 not necessary. 70 LONG FN Opea(f$,f%) 80 OPEN"R", f%, F$,128 90 Filelen%=LOF (f%): NextRec%=FileLen%: NextLoc%=0 Listing on the right-.-> 100 LONG IF FileLen%>0 110 NextRec%=NextRec%- 1 Dear Dr. Z, 120 RECORD #f%, NextRec%, NextLoc% I want to add BLANK lines to 130 READ#f%, NextRec$;128 140 NextLoc%=INSTR(l,NextRec$, CHR$ (26)) :REM Apple=CHR$ (0) my program listings to make 150 LONG IF NextLoc%>0 them easier to read. 152 NextLoc%=NextLoc%- 1 Unfortunately, ZBasic requires 153 XELSE NextRec%=NextRec%+1 a REM on blank lines. 154 END IF Anonymous 160 END IF 170 RECORD #f%, NextRec%, NextLoc% 180 END FN Here's a simple solution. Use a 185 colon (:) instead of a REM. 190 REM FUNCTION: Close (CLOSE file w/EOF char. filenurnber=f%) This looks much better. 240 LONG FN Close(f%) 250 PRINT #f%, CHR$(26);:REM CHR$(0) for APPLE Dear Dr. Z, 260 CLOSE#f% 270 END FN I have enclosed a listing of Note to MSDOS users: With the addition of USR1(filenumber) in version another version of Quick-Sort, 3.02 as an EOF equivalent, other ways of doing this are possible. which I think is much better Notes: than the awkward one that you LINE 80: File MUST be opened with record length of 128 so that LOF yields supplied with ZBasic 3.0. Try the EXACT number of 128 byte records. (256 WITH TRS-80) it! LINE 110: Since LOF returns the number of records in the file (and not the Johan Brouwer number of the Last record Of the File), the value needs to be adjusted to point 6 me de la Vallee L-7337 Heisdorf to the last 128 byte record of the file. Luxembourg LINE 130: READ MUST be exactly 128 bytes to get the last sector. LINE 150: If EOF character (CHR$(26)) IS found in the last record sector, I was SORT of skeptical when then position must be adjusted by one. If not found then function assumes I saw this listing (and even you want to append starting at the physical end of file (beginning of the more so when I saw I'd have to next record/sector). type it in!). Mr. LINE 250: Since the file was OPENed as "R", you must explicitly write Brouwer was right. The Quick- out an EOF character to it before closing. Sort supplied with ZBasic APPEND Sequential Files

0 Copyright 1986, Zcdc.cx. Inc... AU rights Reserved LE

IBMIMSDOS A "Quicker" Quick-Sort continued from page two It converts about 95% of your program to ZBasic syntax in a The following listing was provided by a ZBasic user like flash. What it can't convert, it yourself. This sort is incredibly fast! If you have any documents and gives you program routines like this, send it in! We'll publish it. suggestions of how to convert Nobody likes to re-create the wheel. those lines manually. REM This routine was written by Johan Brouwer and REM can be regarded as public domain so use it freely This program will shorten REM in all your programs. (Thanks Johan! Dr. Z.) conversion time by many REM This is an improved version of the Quick-Sort hours. A real time saver! Call REM Supplied with ZBasic 3.0. It also includes element 0 1-800-482-4567 to order. REM of array SA() in the sort, and is much faster.

"IMPROVED QUICK SORT" IBM PC®- MSDOSTm REM In the following program, a stack-array; ST(,), is Technical Support Notes REM dimensioned instead of the L() and R() arrays used David Lewis, Zedcor Technical REM in the calling program on page 102 of the manual. Support Group DIM ST(30,1) SP=O: ST(0,0)=O:ST(0,1)=O As part of the Zedcor support SF=—1 :ST(O, 1)=NI group, let me express my DO desire to help you with any of LST(SP,O) : RST(SP,l) SP=SP-1 your ZBasic questions. Feel DO free to contact me at Zedcor, 5 LI=L:RI=R: SA=SA( (L+R) /2) days aweek, from 11 Am to DO 5PM, MST. The phone number WHILE SA(LI) < SA is (602) 795-3996. LI=LI+l WEND This column will cover the WHILE SA(RI)>SA common problems ZBasic RI=RI-1 users have using this version. WEND I get asked these same LONG IF LI =< RI questions everyday and can SWAP SA(LI), SA(RI) recite the answers in my sleep. LI=LI+1: RI=RI-1 Keep your newsletters handy END IF for future reference. UNTIL LI > RI LONG IF (R—LI) > (RI—L) Please send any program LONG IF L

0 Copyright 1986, Zedccr, Inc., All right Rcrvcd MrrL IIM wa) aUxv, L'.. icai..s iiiç;a tji jjjjjç; continued from page 5 continued from previous page than 500 megabytes. As far as A powerful Full Screen Editor files directly. For instance, if we know more than a billion (use without line numbers) your program was called byte file can be read this way: "FRED.COM" and you • Extremely easy-hooks to Pro- wanted a user to be able to pass • The following subroutine DOS machine language a file to your program when allows the MSDOS version of loading it by typing in "FRED, ZBasic to read sequential files • Both 64K and 128K versions Filel2" from MSDOS, you larger than 8 megabytes. It will include at no extra charge could read the filename by read a file sequentially 32 bytes using the example program and at a time (returned in A$). The • Text and Graphics integration reading the ASCII characters flag "X5" is set to 1 when the into a string (from the sixth END OF FILE is reached. • Super-High Resolution position in this example). A graphics supported (not 11+). listing for reading data off of Printing on the CGA the MSDOS command line Screen without "Snow" • Creats ".SYSTEM" files follows: "GET COMMAND LINE" In order to remain compatible • Configure printer initialization A$=" :A=PEEK(128,MEMC) with other boards and IF A=O THEN "END" computers for MSDOS • Changeable character sets for FOR B=130 TO 128+A machines, ZBasic sends Color the high-res character driver A$=A$+CHR$ (PEEK( (B,MEMC)) Graphics Adaptor text printing NEXT:REM A$=COMMAND LINE through the BIOS. On some • Other Top-Secret stuff that "END":RETURN systems this causes a bit of will blow your socks off!! Command Line screen flickering or "snow". Lon McQuillin, Box 1676, To show our appreciation to Reading Sequential files San Mateo, CA 94401, has original DOS 3.3 users we will larger Than Eight MB sent us a little routine that will off the ProDOS version at 50% fix this. Thanks Lon.... off to existinM Basic DOS 3.3 Thanks to Mr. Jack Speer in users (about ). ••• Mineral Virginia who was "I was able to create a rather working with CD ROMS, we simple but functional assembly discovered that MSDOS sets an routine to write directly to the arbitrary limit of eight (8) Color Graphics adapter without megabytes to Sequential file the normal resulting "snow" on reads. Hal Liang gives us this effect. While it's not as fast as J. —= - routine that fixes the problem. the "POKE &342,1" function Using this routine Mr. Speer available for the monochrome display adapter, it is consid- OPEN-I", 1, "SEQ.TXT 11 :X5=0: REM Change filename as needed erably faster than writing the DO screen through BIOS. I've GOSUB"DOS Fix" enclosed the assembly pseudo- PRINT A$;:PRINT " --- >";LEN(A$):REM A$ contains string data. code and a complete (ZBasic) UNTIL X5 = 1 subroutine ready to be inserted END in any ZBasic MSDOS program. I encourage you to "DOS Fix":TROFF:REM Always make sure Trace is off with MACHLG share it with other ZBasic MACHLG &C7, &06, 66, 503, 520, 500, &8B, 516, &7F, 503, 542, &B4, &1A, &CD, 521 MACHLG &BA,&58,&03,&B4,&14,&CD,&21,&8B,&36,&7F,&03,&C6,&04,&20 users." MACHLG &C6,&44,&21,&00,&BF,A$,&B9,&34,&00,&F3,&A4,&OA,&CO 3 &74,&03 GOTO "Finish" "FILES" Simulation RETURN: REM MACHLG code jumps here don't change "Finish": X5=1:REM End of File Flag This routine is a handy one for B$=A$: A$=LEFT$(B$, INSTR (1, A$,CHR$(0))-2): RETURN those folks wanting to simulate Sequential Files Greater than 8 Megabytes the FILES command as .in BASICA. This routine was

0 Copyright 1986, Zedcor, Inc.. All righa Reseived WWI-

Page 13 submitted by: Steven Abrams, 1600 44th Ave., San Fi1A$=JIA:\*.*h'+CHR$(0) :Fi1B$B:\*.*+CHR$(0) Francisco, CA 94122. Thank "TILB": file$=FilB$ :CALL LINE'files" "FILA": file$=FilA$ :CALL LINE"files" you Steven. I'm sure a lot of "files" users will appreciate it. MACHLG &06,&1E,&50,&53,&51,&52,&OE,&lF,&B4,&2F,&CD,&21,&BA,file$ MACHLG &B4, &4E, &B9, &00, &00, &CD, &21, &72, &l2, &E8, &23, &00, &B4, &4F Runtime "DIR" MACHLG &B9, &OO, &00, &CD, &21, &72, &06, &E8, &l7, &00, &EB, &F2, &90, &B2 MACHLG &OD,&B4,&02,&CD,&21,&B2,&OA,&B4,&02,&CD,&21,&5A,&59,&5B MACt-JLG &58,&1F,&07,&C3,&90,&B9,&OD,&00,&BB,&9E,&00,&26,&8A,&17 A number of folks have asked MACHLG &B4,&02,&CD,&21,&B0,&20,&26,&88,&07,&43,&E0,&Fl,&B9,&07 how to get a listing of the files MACHLG &00,&B2,&20,&B4,&02,&CD,&21,&EO,&F8,&C3 on the disk from a running RETURN program. To get a DIRectory "FILES" printed to the screen simply use CALL"DIR". Getting more Speed out of Tandy 1000 OPEN"C" Fix Another way is to load a DIR Array Manipulations into a text file so that you can A number of Tandy 1000, load the filenames into your When DIMming string array 1200HD and other Tandy program and manipulate them; lengths, use a number that is model users have had a equal to 2An1 where problem with the OPEN"C" n=1,2,3,4... This speeds up command. It appears that CALL "DIR>DIR.TXT" internal array manipulations Tandy pin-outs were slightly because ZBasic will do different from the IBM PC. A (make sure there are no spaces SHIFTS instead of multiply for simple fix for this was in the filename). The file accessing array elements. provided by an anonymous "DIR.TXT" will contain the Example string lengths would user. To force carrier detect ASCII listing of the files. Load be 3, 15, etc. Example: high simply wire pins 4 and 5 filenames into a string array together and pins 6, 8 and 12 using LINEINPUT#n, and use DIM 3 A$(10,1O) together. Thank you, whoever them as you see fit. DIM 15 A$(1O,1O) you are. Note: COMMAND.COM must be on the disk for either of Integer arrays DIMension size Tandy 2000 Note these examples to work is also important: properly. People using the Tandy 2000 DIM A% (15, 15) is faster than have experienced a peculiarity; DIM A%(16,16) when starting up ZBasic, the screen is filled with garbage characters. This is because REM Print a line directly to CGA without snow ZBasic starts up in a different REM Writes to Page 1; for other pages add offset to dest page. While it looks like the REM Call with string to be printed in printS program has crashed, REM row in vp, column in hp, attributes in color. pressing "E" puts you in the REM DIM 80 printS before calling this routine. ZBasic editor and everything works fine from there. The "PRINT CGA" start-up page for the 2000 is REM CLS LINE=print$=print$+SPACE$ (80-LEN (printS) -hp) not the same as most MSDOS source=VARPTR (printS) +1 len=LEN (printS) systems. dest=(Vp*l60)+(hp*2) attr=color*25 6 Zenith Z-100 Series Note MACHLG &55,&8B,&EC,&53,&51,&52,&1E,&06,&FC MACHLG &B9,&00,&B8,&8E,&Cl,&8B,&3E,dest,&83,&36,source MACHLG &BA, &DA, &3, &EC, &A8, &8, &74, &FB I &8B, &E, len The Zenith Z-l00, Z150 and MACHLG &Al,attr, &8A, &4, &P.B, &46, &E0, &FA possibly others require a MACHLG &07..&1F,&5A,&59,&5B,&5D program that forces the RETURN CGA "SNOW" Removal continued next page

0 Ccpyrigh 1986. Zcdccr, Inc., All rights Rcvcd IVL)L)J.) environment to OC more like standard MSDOS IBM prior to the dates listed • BASICA compatibility machines. This program is below you will want to apply • Math coprocessor support called "ZPC-PC Emulation the appropriate patch to fix (8087 and 80287) that utilizes Program". It is available from bugs or problems. Patch is the processor if installed, uses Heathkit and Zenith dealers. done under the start-up built-in high-speed binary math Without running this program configure screen of ZBasic routines if not. Extremely fast ZBasic will not execute (

atch). Be sure to patch a but will not have the selectable properly (DOS gives a "WILD" back-up diskette of ZBasic, not precision of the existing interrupt error). your master diskette. When ZBasic. you are done be sure to save • SELECT CASE (watch Out Text Formatting in your configuration with Modula and Pascal!) ave • Other top-secret stuff Monochrome Mode 4.0 Rumors Upgrades to existing users will I have received a number of be 50% off (about $45). This requests how to format text for We are working hard to finish version will have a new manual highlighting, reverse video, and many enhancements.•'• etc. The following examples version 4.0 for MSDOS PC's. should clear it up for you. You With any luck it will be might want to make a xerox of available early next year and this page and insert on page A- will contain lots of goodies: 24 (thanks to Hal Liang, our MSDOS expert and Pat • Full memory use for variables Anderson a ZBasic user for (arrays larger than 64K) these suggestions for using • Powerful full screen editor COLOR in the monochrome • CGA, EGA, PGA, Hercules, mode (MODE 2 in ZBasic). and Hercules+/Ramfont Example: MSDOSTM version 3.02 Patches NODE2:REM REVERSE BLINKING Patches to MSDOS Version 3.02 dated PRIOR TO APRIL, 1986 COLOR ,240 Bug: AUTO divides line numbers by 10: PATCH 3A2B from: &4E to &90 Patches to Early versions of version 3.02 Bug: IBM Text printing on column 79: PATCH &E57 from &75 to &76

If you purchased ZBasic for the IBM compatible hi-speed text printing for RUN* use. Note that the configuration does not stay set in stand-alone applications unless this poke is used. The method implemented for compatibility reasons: Monochrome Text POKE &342,1 for on, POKE &342,0 for off. Examples Normal Intensity Bug: String Compares: Regular COLOR ,7 1. PATCH &D2E from &77 to &72 Blinking COLOR, 135 2.PATCH &CA2 from &CF to &C7 Underline COLOR,l 3.PATCH &D39 from &DF to &FB UL Blinking COLOR,129 Invisible COLOR, 136 PRIOR TO AUGUST, 1986 (e.g. for inputting Passwords Patches to Version 3.02 INDEX$ problem during chaining: High Intensity PATCH &3052 from: &E8, &50, &00, &8E, &D3 Regular COLOR,15 to: &8E, &D3, &E8,&4E,&00 Blinking COLOR, 143 Underline COLOR,9 Parch to all 3.02's RUNNING ON IBM PC-AT (80286) TYPE COMPUTERS: UL Blinking COLOR,137 Patch to allow DTR from going low when writing to the communications port with the ZBasic OPEN "C" statement: Reversed (Inverse) PATCH &3105 from &EE to &90 Regular COLOR,1 12 Blinking COLOR,240

0 C&It 1986, Zedccr. hx., All figbj3 Rcrvd UPGRADES I ZBasIcTM Upgrade I continued from page one Order Form always welcome. In fact, we This form will make ordering your ZBasic upgrade easy. carefully examine all feedback for ideas to improve the product and make it more Name Position______useable. Please send • Company comments or suggestions for I Address I improvements to my attention. City State _ZlP______If you do not have the latest version of ZBasic, or the latest Country reference manual, fill in the Telephone( j_- License number______ I ordering form on this page. We will ship you your upgrade I When Ordered J_J19 I right away. • What do you want upgraded: I • I promise to continue providing D MSDOSTM, IBM PC® L Macintosh "m upgrades at a fair price. I LI Apple// DOS 3.3 LI Apple// ProDOSTm I I LI CP/MTM LI CPIM(Kaypro® graphics) I Thank you for using ZBasic. • LI Amstrad® LI TRS-80 model 1,3 We appreciate your • L]TRS-8O model 4 I business.... LI ZBasic Reference Manual Editor Cost: If you purchased an older ZBasic version or manual in the past 60 days you are entitled to a free upgrade. Call: 800-482-4567 • I Happy • If purchased more than 60 days ago the cost is $19.95 + shipping I I (+ sales tax if applicable) for each version upgrade or manual upgrade. I I I 5fiitidTtigs Software Upgrades: Free Upgrade: If you are elligible for a free • from ZedTcor upgrade we MUST have a copy of the dated invoice and the original I ZBasic diskette. Others: *Zedcor Invoice OR copy of serial numbered I License agreement OR Original ZBasic diskette and original invoice I for each version you upzrade. Addendunis included (manuals not replaced). I I I I Manual Upgrades: Return Front Cover of the Old Manual. Only one I manual upgrade per customer at this price (additional manuals I are available for $44.95 each + shipping).

I Mode of payment: Visa, MC, AMEX, Check, C.O.D. I **Manual Shipping: USA: UPS $5, Blue Label $10, COD $10 I Canada: $12, Foreign: $25 --->USA$ ONLY (no foreign COD's). i I I Questions: (800) 482-4567 I Send Items and payment to: I I ZBasic UPGRADES I • 4500 E. Speedway Blvd., Suite 22 Tucson, Arizona 85712 i Telephone orders: (602) 795-3996, (800) 482-4567 • * Photocopies acceptable for everything except manual cover or cover page. I **Diskette only shipping is free in U.S. $5.00 outside U.S. I

0 Copyrigtr 1986. Ze1c, Ina, All rights Rrscd Macu flIOSfl 5PM, MST. The phone number Speed increase will be continued from page 3 is (602) 795-3996. appreciable. Window size up to 8 192x8 192 pixels (supports This column will cover the Color Printing on the full page displays). common problems ZBasic Imagewritefm II users have using this version. • Additions to EDIT FIELD I get asked these same ZBasic supports color printing questions everyday and can on the Imagewriterm II with • New DIALOG to do INKEY$ recite the answers in my sleep. the Macintosh. 0=white- during event-trapping Keep your newsletters handy 7=black. What are the other for future reference. colors? Yellow, Magenta, • Improvements of Command Cyan, Orange, Green and and Edit windows. Please send any program Purple. Of course you'll need solutions you have created for a color ribbon for your printer. • Printing Speed increased 5-20 this version. I will include Run this program: times for printer and screen. them in my column to help your fellow users. DEF LPRINT • Disk print speed increased by ROUTE 128 3-5 times FOR X=0T07 Converting Old MSBasic COLOR=X Programs To ZBasic PRINT "TESTING" • Lots of other things too NEXT numerous to mention Zedcor has an MSBasicTm to ROUTE 0: 'Back to screen ZBasic conversion program CLEAR LPRINT It's well worth the $19.95. available for $29.95. It Imagewriter Color Printing converts about 95% of your IMPORTANT UPGRADE program to ZBasic syntax in a NOTE TO 3.02 OWNERS flash. What it can't convert, it Runtime Size documents and gives you As of this writing we have suggestions of how to convert A number of Macintosh made changes to 3.02. The it manually A real time saver! programmers have asked why a official release is 3.03. Call 1-800-482-4567 to order. small, one line program, compiles to about 33K. ZBasic appends a 30-33k runtime There were a few problems Improving the speed of routine to your program, with 3.02. We have added a Array Manipulations whether the program is one number of new commands on line, or 20,000 lines. 3.03. When DIMming string array lengths, use a number that is Remember: the MSBasic 2.1 If you have version 3.02 equal to 2"n-1 where interpreter is over 80K and has (not 3.01) send in your n=1,2,3,4... This speeds up to be resident to run your master diskette for a free internal array manipulations BASIC program. upgrade to 3.03. because ZBasic will do SHIFTS instead of multiply for continued on page 17 accessing array elements. Macintosh" Example string lengths would Due to problems Technical Support Notes be 3, 15.... Example: with earlier versions David Lewis, Zedcor, Inc. Technical of Mac system software... Support Group DIM 3 A$(10,10) always use DIM 15 A$(1O,1O) SYSTEM 3.2 As part of the Zedcor support and group, let me express my Integer arrays DIMension size is also important: FINDER 5.3 desire to help you with any of (or newer) your ZBasic questions. Feel DIM A% (15, 15) is faster than fr tnnnntant mp nt 7pp. 1ç DIM A% (16, 16) daysi a week, from 11 AM to

Cc,i,t 1986. Zcdccr, bx, AU rights iccrvcd t..an I ureate L)SK If you want the DIR of a publisher looking for quality Accessories with ZBasic? diskette with the name of simulations for the Macintosh. "Tom",type DIR "Tom". They are in need of full Not in the current version If you want the directory of a working applications in the area because DA's have many folder "Harry", inside a Folder of education, entertainment, differences and limits; like called "Dick" inside the volume utility and productivity. program size and certain called "TOM", you would use: commands. If you have a program that fits DIR TOM;DICK:HARRY their needs send a description We are contemplating releasing of the program to: Practical a special, chopped down, Note that colons (:) are used to Computer Applications, Inc., version of ZBasic for creating separate nested volumes and Attention: Product desk accessories. If you find folders. development, Champlin, MN this desirable, drop us a note. 55316 or call Kim at (612) 427- Mac XL-LISA 4789 (no connection with Zedcor, Inc.) Example Programs with ZBasic is alive and well on the "Spaces Between Keywords" Macintosh XL and LISA with What's coming? Macworks. Any tidbits or Unlike other versions of special applications sent in to A lot of you have expressed ZBasic, we have put an option us for this system will be put in dissatisfaction with the under configure called "Space this column. program editor we provided. req. after Key Words". This We're working hard on a new requires you to put a space after For those Mac XL users editor to replace the EDIT every key word in the program looking for a dedicated WINDOW. The goal is to have or ZBasic will not interpret it as newsletter that LOVES the old an editor with boldfaced a keyword (will probably LISA and MAC XL, check out keywords, find and replace return a syntax error). "The LisaTalk Report", a and other features all using publication made especially for standard Macintosh-type A good example is a command you. It is available quarterly editing. Look for it around the like DEF OPEN (used to set from: The Networkers - The beginning of the year. type and creator for files). In LisaTalk Report, 21 Canyon the manual it is shown as Rd., San Anselmo, CA 94960, We will also have a SANE DEFOPEN with no space for $42.00 a year. package that is compatible with between DEF and OPEN, the 68881 coprocessor. This which are both, you guessed it, The one we saw was nicely will be an optional package that keywords. To fix this done and contained a hundred will sell for about $59.95 retail, problem just turn off the pages of articles, advertise- "Spaces between key words" ments and advice for the XL. We're also working on a option or put the spaces in compile time optimizer that will yourself. Thanks to feedback from an cut down the runtime size a bit. unknown XL user, ZBasic We will endeavor to include 3.03 was modified so you can Let us know what you want in spaces in the appropriate places create windows large enough to future versions. in future editions of the manual use the full screen of the XL. to avoid confusion. Window size is now allowed up to 8192x8192 pixels. DIR "Volume name" Publisher Wants your Version 3.03 has a change to Macintosh Programs DIR that was inadvertently left out of the manual and Practical Computer Applica- addendum. Instead of DIR n, tions, Inc. is a software it is now DIR "volumename".

0 Copyrigbi 1986. Zedccr, hic.. Ali Rights Rc,vcd ZBASIG DULL I 11 14 EQUATIONS BOARDS versus Got a bulletin board with a BASIC ZBasic forum you want E#=MC'2 advertised? Send me the EQUATIONS information and I'll put it here. The way ZBasic decides Do you want Zedcor to have a whether an equation is floating bulletin board for answering point or integer has caused of ways: questions? Let me know. If some concern among certain enough people want it, well do ZBasic users. The problem 2.2+2.2+1.1+1.1 it. Perhaps a Round Table on being that with ZBasic, all (2.2+2.2)+1 .1+1.1 GEnie or BIX? equations are considered 2.2+2.2+(1.1+1.1) integer unless a floating point (2.2+2.2)+(1 .1+1. l)+.O John Gillett has a Macintosh type is specified, such as; #,!, This method is utilized to Red Rydefm bulletin board decimal point, \ A or any called "TIGER'S DEN" on has scientific function. maximize program speed. To Macintosh. Call; (602) 951- default to floating point would 4214 and get a password. Note that parentheses create a slow the program down ten- Read "TECHIE STUFF". sub-expression and that that fold. expression is evaluated We are debating whether to separately from the rest. This force an entire statement to be fact seems to cause the most floating point if any floating USER GROUP confusion. For example, the point specifier is discovered equation: within that statement. While A number of you have this could result in much expressed an interest in creating (2.2+2.2)+(1. 1+1.1) slower code, it would certainly a ZBasic User Group. I think eliminate the confusion. We there's a lot to be said for the would return 6 in ZBasic. would appreciate your feedback idea. Obviously this not the result about this. you are after. Let's look more This would allow a number of closely at the equation; folks with a common interest to help each other with common There are actually three problems. They could create equations; Disclaimers public domain libraries that can be shared. • (2.2+2.2) ZBasiof" is a trademark at Zednar Inc. Apple • (1.1+1.1) and Macintoshtm' are registered or licensed trademarks of Apple Computer, Inc. IBM PC, IBM The group will need a President • (2.2+2.2)+(1.1+1.1) PC jr.. IBM PC.XT, PC-AT and PC-DOS are registered trademarks at International Business and some sort of supportive Machines Corporation. MSBASIC, MS. Xenix committee. Zedcor would ZBasic evaluates the first two and MSDOS are registered trademarks of Corporation. CPIM tr a registered include User Group expressions as Floating point trademark of Digital Research, InQ TRS.80, information in this newsletter since it sees a decimal point in Radio Shack, Tandy 2000, Tandy and Tandy 1000 we registered trademarks of Tandy for free and be willing to help each. The problem results in Corporation. Kaypro 11,4,10,16 and 2861 are Out as much as possible. the final expression. There is registered trademarks of Kaypro Corporation. Conypodore64 is atradernark at Commodore nothing there to tell ZBasic at International. Compaq and Deskpro are If you are interested in joining compile time that the final result trademarks of Compaq Computers. Panasonic Senior and Executes Partners are trademarks of ZBasic Users Group, be sure is to be considered floating; no Panasonic Industrial Corporation. Data General to mark it on the subscription decimals, not # or! or\, so One is atrademarkof Data General Corporation. Pagemaker is a trademark of Aldus, Inc. We form. You will be ZBasie defaults to integer. To apologize for any unintentional omissions. fix the problem, the example notified. can be restructured in a number

0 CopyrigJrr 1986, Zedccr, Inc., All Rights Reacreed SUBROUTINES continued from page one CUSTOMER PROGRAM ANNOUNCEMENTS The following programs were written in ZBasic and are available for sale from the authors. If you have programs you wrote with Zllasic that you wish to advertise here, send a sheet description of the program to: Zedcor, Inc, Attention ZBasIc newsletter, 45(e) E. Many of you would like a Spredway, Suite 22, Tucson AZ 8571Z Programmers with public domain utilities, subroutines of usefulness, or tricks-- send Om for public domain library of inclusion in future issues (ASCII listing on disk is preferred if more than 20 or 30 titan). Your fellow programlrErs will be grateful. subroutines written in MacintoshTm A. H. Nuami. 1606 NW 21st Sc, Gainesville, FL 32605, Musk Directory Program, $35. ZBasic. We would be Pescr Bennet, 23 Esford Dr, Scarborough ONT. M1P 1L5,Post.a.ma & (Postscript shift),? happy to provide a focal Spacelabs, 5215 N.E. Bern Pry, Hillsboro OR 97123, Zderno, internal use Mike Nudd&Julic Vonilon, Box 445, Arkansas City, KS 67(1)5, ShopKeeper, $250 point for these utilities. Bob Andris, 12155 Terrence Ave., Saratoga, CA 95070, Appointment organizer,? Bob Andris, AnyPlot (creation of Scicnti& plots and graphs),? Joha D. Lewis, Rt14, Box 45, Moore, OK 73165, Books of the Bible-Bible Purault, $20. Social Security Adtn.hiistraticai, Department of Htalth and Human Services, Suite 409,845 S We would organize these Figuaro Sc, Los Angeles, CA 90017, Various programs for Social Security uses, internal subroutines for you and Investot's Software, (703) 743-2109 or (813) 778-5515, Stock Comparison Report, 3 make them available free Apple® II from CompuServe or REMs Software, 174 Christopher Sc, Montclair, NJ 07042, Medical Software, $5.954149.95 Lawrence Hanrnrea-, 323S. Willis, Stiiiwater,OK 74074, Cost Accounting: Planning and control,? Zedcor direct at our cost. I. Kim Morgan, Box 367, Melrose, NM 88124,011 and Gas Appraisal $250, and Charting $250. Investot's Software, (703) 743-2109 or (813) 778-5515, Stock Comparison Report,? Send your routines on a Douglas Store, 1135 E. 24th Ave., Albany OR 97321, Graphlt and Finance,? diskette in ASCII format IBM PC®, MSDOSTm McAdams Assoc. 109 Spanish Village, #618, Dallas, TX 75248, MergeMate,? (SAVE*). Be sure to Pinctucky Software, Pr 1, Box 260, Kirbyville, TX 75956, Weather Watch, 5Z7.50 document the routines CECAP Co., 27233 Kane LAne, Oak Ridge TX 77385-9028, Data-log-64 DBMS, $19.95 Mida Productions, BOX 311, Barrie, ONT LAM 4T5, Count MIda, 39.95 carefully and avoid line DA Systems, Inc., 1503 E. Campbell Ave., Campbell, CA95008, DOS-Node Network,? Shannon Assoc., Box 597, Otapri Hill, NC 27514, Language Conversions, $387. numbers if your can Converts: Fortran to ADA, Jovial to ADA, conversions to C, Dialect conversions. (SAVE*+). This way Spacelabs. 5215 N.E. Bern Picy, Hillsboro OR 97123, Zderno, internal use Scboolwaxe , Inc., Box 546, LaFayetar, GA 30728, Attendance and other School programs,? others can use your RI.. Huffmaxr, 2839 E 49th, Sc, Tulsa, OK 74105, Duplicate Score Pad (for Bridge), $69.95 Digital Logic, 3307W Cypress, Tamp; FL33609, Easy Base DBMS,$39.95 routines in their program Social Security Administration, Department of 1-Icalth and Human Services, Suite 409,845 S Flguaro Sc, Los Angeles, CA 90017, Various programs for Social Security uses, internal with less work. Try and GPC Software lnc, Box 33570, Carson City, NV 89702, Mall and Phone Pro, $49.95 keep routines less than a David Maraxis, 877 NE 195 Sc, APT 218, Miami, FL 33179, Pundit' Dog Race Program,? Tejas Software, 1501 N. 2nd Sc, Morkel TX 79536, TextMate,? page, although longer Investot's Software, (703)743-2109 or (813)778-5515, Stock Comparison Report,? Tericomp, Inc..6611 Paul Revere, Cantors Ml, 48187, Inventory Control,? programs of value will be L. Brown Enterprises, RTI, Box 277-C, Denison, TX 75020, Constructions Materials, $300. Douglas Stow, 1135 E. 24th Ave., Albany OR 97321, Graphlt and FInance,? accepted. Tom Gilbert, 7127 LsFaycne Ave., Kansas City, KS 66109, Zoom Modem UtIlities,? REMs Software, 174 Christopher Sc, Montclair, NJ 07042, Medical Software, $5.95-5149.95 J. Kim Morgan, Box 367, Melrose, NM 88124,011 and Gas Appraisal $250, and Charting $250. Send your subroutines and Tice&Co, 431 E. Broad St, Columbus, OH 43215, DBase III structure tracer,? JJ Smith, 9795 Rustling Oaks, Baum Rouge, LA 70818, SC-BID for Contractors, Frccw,re program examples to: CPS, 3090 Oak Circle N, Broomfield, CO 80020 303-469-0557, Printing Estimator, Call I. Johnson, Tech Vii L-7W, Cookeville, TN 38501, French Curvepolynomlal curve fit, $25 Delbert Penrod, 1425 Stevenson Dr., Springfield, IL 62703, Church programs,? ZBasic Newsletter Warren NG, 6341 Pinebaven Rd, Oakland, CA 94611, ZFire Hydraulics-, $99 Robert WilIest, Box 676, Normal IL 61761, School programs (tardiness etc),? 4500 E. Speedway, #22 Lawrence Hammer, 3235. Willis, Stillwater,OK 74074, Cost Accounting: Planning and control,? Tucson, AZ 85712 Greg Wishart, 118 Kings Forest Dr., Hamilton ONT LET 4J9, Gas Stances Ccesstsuctscas Set,? CPIM&80, TRS-80 Stephen Moran, 303-51st at, Des Moines, IA 50312, Catholic Church Mgnrnt Syst 10, Call REMs Software, 174 Christopher Sc, Montclair, NJ 07042, Medics Software, 55.954149.95 John D. Lewis, Rt14, Rotc 45, Moore, OK 73165, Books of the Bible-Bible Pursuit, $20. Investor's Software, (703)743-2109 or (813)778-5515, Stock Comparison Report,? Overseas J. Johnson, Tech Vii L-7W, Cookeville, TN 38501, French Curve (polynomial curve fit), $25 Outlets BRITAIN GERMANY (German Lang.) GREECE ZBasic is available all over Tulips Enterprises Markt and Tecimik Mionakis Imports the world. Purchase upgrades Studio 7, Intec 2 Hans Pinsel Strasse 2 58 Jrakleous St. 176 72 and other versions from the Basingstoke, Hampshire 8013 Haar b. (Munich) Kallithea, Athens following distributors. Telephone: (0256) 463754 Telephone: (089) 46-13-109 Telephone: (01) 9567348

FRANCE (French Version) SWEDEN (Swedish version) SWITZERLAND (German) NEW ZEALAND A.B. Soft Reda Nova Markt and Technik Comtech Comp Tech. 13, rue Lacordaire Vimmerbyvagen 17 B Kollerstrasse 3 3-5 Saleyards Road 75015 Paris 590 83 Storebro 6300 Zug Otahuhu, Auckland Telephone: (1) 45 75 55 66 Telephone: (0492) 307 40 Telephone: (042) 41 56 56 Telephone: (09) 276-6715

0 Copyright 1986, Zedcor, Inc., All Rights Reserved 1• ME all NH NI MIN III MU INI IM MI 1• I Subscribe today! Credit Card Orders Call: I II 1-800-482-4567 •. This is the only "Z" you will receive free! I I I I Name Position I I itli r Company I I I I Address I I City State ZIP I 1P Country I I I Are you interested in the ZBasic User Group? • 1-.) $19.95 I I one year What version of Thasic do you own I I I Payment Cash [ I Check Credit Card [ J I $37.00 [I I • two years Visa, MC AMEX number Exp I I I Quarterly Signature i publication 1 • Mail to: The "Z" Newsletter I I 4500 East Speedway, Suite 22 II Tucson, AZ 85712-5305 I (602) 795-3996 I • I 111 I • usammuimo &e Immilimasummumummimmmimmmmmmmmormaimmimir

Bulk Rate U.S. Postage 4500 East Speedw... ay Paid 0Suite111111.1.Pt 22 Tucson, AZ Tucson, AZ 85712-5305 Permit Number 2220

BASIC Newsletter