ee $2.95 (USA) The Magazine for Sinclair users and Timex/Sinclair users € FA [UK]
g
Volume 3, Number 1
January/February 1983
Money Management Loan Amortization
Checkbooks Keeping Time
INTERP CHRS, EDIT, LOAD, RND, RAND
As Easy as 2+ 2 a
UHF Modulator EPROM Programmer
Starblasters Space Crisis Mastermind
Forest Treasure
Ken Uston on Vu-Calc
O02 0 354
14024°14
ROM-PAC APPLICATIONS HAS PROGRAMS ON PLUG-ON ROM CARTRIDGES FOR THE ZX-81
_ *EDUCATIONAL PROGRAMS “APPLICATIONS *GAMES
Call or Write For Your FREE Information Package Including: *Current list of products and prices *Operating instructions for all products
“Sample applications *Adds you to our mailing list to receive new product news | *Updates on using the Sinclair with and without our products |
CALL 404-921-4471 OR WRITE
ROM-PAC APPLICATIONS 5921-A Alhambra Norcross, Georgia 30093
Due to possible trademark infringement Sinclair Applications is now operating under the name of Rom-Pac Applications. Neither Sinclair Applications nor Rom-Pac Applications has or have had any connections with Sinclair Research Ltd.
ell keep your Sinclair summing:
x EC | B EN EME
nd i: SHIFT
OUR $14.95 SINCLAIR AND TIMEX OWNER-PROTECTION SERVICE PLAN WILL SAVE YOU MONEY.
Timex too!
Typical repair charges for a Sinclair ZX81 can run from $25 or $50 up to the replacement cost of the unit. So why take chances? MicroSync will guarantee unlimited service for one year, parts included, at one low price. With return postage
We have the experience it takes. We have the parts on hand.
So act now! If your unit is less than 90 days old you can purchase our Owner-Protection Service Plan for only $14.95.
pe P= mes am mme wmm mma am m etalon
Mail To: MicroSync
and handling paid. Plus our VIP E manors =. i treatment for fast turnaround. i Please send Maintenance Agreements for E MicroSync’s experienced J the equipment listed below: e technicians are ready to service | ZX81 or Timex/Sinclair 1000 i your ZX81 or Timex/Sinclair 1000 Less than 90 days old i (include proof of purchase) ........ $14.95 ea. i with factory replacement parts. We'll Over 90 days old..............05. $34.95 ea. return it promptly, and we'll quality- | 16k RAM { ; : Less than 90 days old check your unit before it leaves our : : ‘ ; i (include proof of purchase) ........ $12.95 ea. i anice conter MicroSync is THE Sinclair | Over 90days oid... $29.95 ea. J authorized Service Center. ; j Total Enclosed.......... U.S. $ l We made over 10,000 Your Sinclair computer is a pee ace Sinclairs tick last year. remarkable assembly of electronic Í d Sinclair equipment has a great components, some unique to E i eneck Cime CIVISA l reputation for reliability. But almost Sinclair technology. Our Sinclair | cara# Ex: l all computer equipment requires personnel have been trained on, and || Name i service at one time or another. -service only Sinclairs. Address 7 We've been repairing Sinclairs ever Cy. 2 See Zip J since their first glitch. . ee eee
MicroSyn The fine print. MicroSync’s Maintenance Agreement covers all parts and service for 12 months IC Q : y C
after the expiration of original warranty. For units over 90 days old, coverage is for 12 months
from the date of the Maintenance Agreement. Kits or modified units may require a surcharge. AUTHORIZED SINCLAIR SERVICE MicroSync may not repair units damaged by abuse or negligence. Liability extends to repair or
replacement only.
4
SEND CHECK OR Mi Income Ta.
Home Budget
ashe
Compatability 14.95 = WriteForFREE@atalogue 9 7 oan
The Magazine for Sinclair users and Timex/Sinclair users
— | | n
Developing an interactive interpreter
Staff
Eounder/bditorin- Chief: Ai ws. ek Sod Su Bee a David Ahl
Manap me ERTOn o Sins aR A ce aed pe 9 Paul Grosjean
Coatenurne BOMer An fo Ske ed et Jee es David Ornstein
U.K. Correspondent...........................Martin Wren-Hilton
CCM a Ke he IO Brig ate ain ohn ha, ree Patrick Calkins Assistant Art Director ooh eos BI Diana Negri Rudio |
RRO MOUS 05.5 5S Ea Poe lg R Reads CS a Rk RS Karen Brown
Renea Cole
Operatons Manafer.. o e a A ee so A William L. Baumann
Personnel and Finance..........................-Patricia Kennelly
FOE DE A A E a ES ET S ATER AT oe 2 Frances Miskovich
Carol Vita
Advertising Sales Manager... e 2. 2... 26-3 0S Bae ee aie Karen Musmeci
MEMBER
January/February 1983
January/February 1983 Volume 3, Number 1 DEPARTMENTS 48 The Unprintable Characters.................... Schultz PEN SE Oh Rains wa UE Ry Seer eRe me Pe Using CHR$ 11 RAE WANN A Grosjean, Dewhurst, Neng 50 ne tea wie the LOAD Command. ........ .Gentilcore 12 SYNC Notes... Grosjean 54 Saving Your Fingers... .... Ryan 15 SYNC Program Listings. ............. auae Using EDIT 16 JustforFun........ Boyer, Dewhurst, Hampson, Maloff 56 Monna mith Randomness. TERI a .Duguid n n ; 92 Letter fromEngland..........................85 Adams chi sain a as nS Meee eee Recent products MACHINE LANGUAGE 86 HardwareTips......................... Keeney, Turner GA Metis E TE es ee Doakes Be Monacor.. oe A ee OS, Beginner's machine language series, part 1 104 Index to Advertisers.................0 00. c cece eens 70 Machine Code Keyboard Scanning............. Belman Read your keyboard SYNC IN THE HOME OFFICE HARDWARE 20 A Personal Money Management Program. ..... Pattison 72 Installing a UHF Modulator.................... Glidden Income, expenses, cash flow, comparisons Switching to Channel 33 27 Checkbook Management...................... Repicky 76 A Cheap and Simple EPROM Programmer. ...... Schaaf Updating, balancing, reconciling Add permanent routines to your computer 30 A Loan Amortization Program.................... Hoag Calculate payment schedules GAMES 32 Keeping Time in the Home Office.............. Dawson 99 Starblasters................. uaaa aana Tandberg Calendars, clocks--hands and digital An ion beam defense 36 Calculating the Days........................... Paludin 102 8K ROM Updates...................... Fowkes, Frahm How many days between dates Hangman, Mastermind, Defuse, Forest Treasure 38 Tidying Up Your Display....................... Godwin Put dollars and cents in columns 94 QSAVE REVIEWS ee 39 Multisave.................. cc cece cece cece e ees Watsons or ee echoes Lewy Fs Sin eRe eee en Preserve your records in duplicate or more Software/hardware package review 40 Making Backups for Machine Language Tapes... Ryan 96 The Stock Market Calculator.................... Daniel : Bypassing SAVE Software review 98 2ZXDataFinder...................... 0. cece eee Cripps PROGRAMMING TIPS AND TECHNIQUES Software review 43 INTERP—The Kernel of Interactive Nuts........... Auer SOO Wile 4 se ERE ee ae Uston
Business software package
RE SRA A RE AISI a SE APES TEATS SS AS LE TELE SLE TT TTL SEE NL TIE ODE AE DS LL EE LE EE EE
Volume 3, Number 1
SYNC (USPS: 585-490; ISSN: 0279-5701) is published bi-monthly by Ahl Computing, Inc., a subsidiary of Ziff-Davis Publishing Company. David Ahl, President; Elizabeth B. Staples, Vice-President; Selwyn Taubman, Treasurer; Bertram A. Abrams, Secretary. 39 E. Hanover Ave., Morris Plains, NJ 07950. Second class postage paid at New York, NY 10001 and at additional mailing offices.
Subscription rates: USA: One year (6 issues), $16; two years (12 issues), $30; three years (18 issues), $42. Canada: $3 per year additional. Other foreign: $5 per year additional.
For SYNC advertising information, contact Karen Musmeci, SYNC Advertising Sales Manager, Ziff-Davis Publishing Company, One Park Ave., New York, NY 10016 (phone: 212/725-4216).
All other correspondence should be addressed to: SYNC, 39 E. Hanover Ave., Morris Plains, NJ 07950. In U.K. to: SYNC, 27 Andrew Close, Stoke Golding, Nuneaton CV13 6EL.
Postmaster: Send address changes to: SYNC, PO Box 789-M, Morris- town, NJ 07960.
letters
Help Wanted
Dear Editor:
I need some help with a MicroAce. The K inside the cursor keeps rolling and the unit will not respond to keyboard commands. I have attempted to trouble- shoot it by chip substitution with no luck so far.
Peter Beck 54 Richwood PI. Denville, NJ 07834
Dear Editor:
I have noticed that saving programs on cassette from my ZX81 results in some buzzing sound which is recorded at the beginning and end of programs. Exper- ience shows that this causes some prob- lems when reloading the programs.
Is there any way or any hardware mod- ification that will get rid of this buzz?
Ho Tiap Fen
PO Box 209
Bandar Seri Begawan Brunei
New Product Problems
Dear Editor:
My first computer was, and still is, a 2K MicroAce. Now with the vast (relatively speaking) amount of peripherals available for the ZX81, I am seriously considering upgrading it significantly.
The problem, however, is that many of the ads in SYNC do not indicate whether or not the products are compatible even with the ZX80, let alone the MicroAce, even though they are all essentially the same machine with various internal dif- ferences. I realize that I will have to install an 8K ROM.
4
Please publish an article indicating what peripherals are directly compatible and what modifications can be done to adapt those not interchangeable between the ZX81 and the ZX80/MicroAce.
William E. Allen 2912 Metairie Ct., Apt. 24 Metairie, LA 70002
Ed.—Since the number of ZX8ls out there is significantly more than the ZX80 type, most advertisers are naturally aiming at the larger market. If a ZX80 or MicroAce owner sees a peripheral or pro- gram of possible use, the best bet would be to contact the advertiser directly find out whether that product is compatible. We would welcome seeing an article pro- viding the kind of analysis suggested.
Dear Editor:
Congratulations! It is good to see that someone has a magazine devoted to the Sinclair line of computers. Before I buy a computer though I want to know if it has programs to do what I want it to do. Do you know or can you find out if there are programs for: speed reading, analyze and predict the stock market performance of any particular stock, an electronic circuit designer, analyze and predict the winner of a horse race, and a program gener- ator?
I need someone to give an impartial view. Can you?
Carlos Urrutia RR4, Box 5A Gregory, SD 57533
Ed. — Your best source of information on programs is our ad pages. Each issue brings new products as well as continued
offerings of previous products. Through our reviewers we try to give a fair evalua- tion of products and programs. However, we have not run any reviews comparing programs for the Sinclair computer series with similar programs for other computers except perhaps as a point of reference. Help is on the way, though, because we are planning to publish a comprehensive buyer's guide for products for the Sinclair and Timex/Sinclair computers. See SYNC Notes in this issue for further details.
Dear Editor:
As the ZX81 becomes more popular, hardware and sofware from different ven- dors is flooding the market. Many per- form the same function or offer the same type of software.
How is the average consumer supposed to know which product is best for his applications and which is the better buy if there is no information available?
In the near future does SYNC plan to give honest, in-depth reviews on all new products for the Sinclair machines? Sheree Draft 1171 Boylston St.
Boston, MA 02215
Ed. — We cannot review all new products; there are just too many. This is why we have invited reviews from users who have had extended experience with a given product and why we prefer comparative reviews whenever possible. We also expect such reviews to be honest and in- depth. The increase in space devoted to reviews will provide more extended pro- duct information. 3
Dear Editor:
In an age when merchandisers often are thought of as rip-off experts, I would like to salute one of your advertisers.
SYNC Magazine
Britain’s leading Software house means VJ LN
li
I | Il
Iiiih
|
il
|
ee sel and the Beast__
of Gnomes
Tilia, '
Il
rot
When it comes to fast service, prompt replacement, and helpful information, Peak Software of San Carlos, CA, rates at the top of my list.
A goodsized segment of any industry could take customer relations lessons from David Farrell of Peak.
Robert J. McGarvey 28 Raleigh Rd. Kendal Park, NJ 08824
Elimination
Dear Editor:
The Elimination Game in SYNC 2:5 can be used by unexpanded Z X81 users with a few changes. The original program uses a numeric array which requires over 50 bytes to store and a FOR-NEXT loop to print. The change uses strings to store the numbers (1 byte per character) instead of the array (5 bytes per character). Strings are ideal for storing numerical data from 0 to 9 because they are com- - pletely flexible in length and PRINT much faster.
The rules of the game are the same except that to terminate the game after a loss 0 is entered. Any other invalid num- ber will begin the turnover from the roll. If more than one number is required to complete the roll, a total is given.
By the way, I am in the process of learning machine language, and, although
I have a ZX81, I would like my machine `
code programs to run flicker-free on an 8K ZX80. Isn’t there a subroutine in the ROM to display a frame to the TV? Michael B. Williams
1300 DePaul Way Virginia Beach, VA 23464 10 RAND 20 LET A$=“ 1 2345678 3° 30 LET R= INT (6#RND}+INT (GERN Pit 49 LET T=8 50 LET B$=A4 5@ CLS 72 PRINT “NUMBERS TO ELIMINATE
6@ PRINT AT 4.0; “ROLL Toae
90 PRINT AT 2,0: B$; i890 INPUT N
IF NOT N THEN RUN IF SeS {N-53 >4 THEN GOTO 4c 130 IF &6S€iN+N} (OSTRE N OR NOT G SDE BANAN? SEN GOTO 4G
148 LET T=f+ 150 IF T>R THEN GOTO 46 “TOTAL “iT
168 LET BS(N+tN) =
170 PRINT AT 4.21:
180 IF T:R THEN GOTO 90 ET &¢=6¢
So 2183 PRINT AT ®©. Oi “WINNERES2242¢ FXXEREEE"
ZXPRESS™ —
Elimination in 1K
Type in the program, hit RUN and ENTER.
The numbers 1 to 9 will appear with a number representing a dice roll. Choose which number or numbers you wish to eliminate. Your choices must equal the number rolled. The object of the game is to eliminate all the numbers. When the end of the game is approaching, a roll higher than the total left in the display will end the game. The lowest number wins. To play again hit ENTER.
DEF and PAUSE
Dear Editor:
The article on DEF in SYNC 2:4 was very informative, especially for one using programs involving many repetitious mathematical expressions. However, the two programs used to demonstrate the use of A$ and F$(X) with VAL were too slow even in FAST. I would suggest a better program to illustrate the simulation of DEF FNA(X) on the ZX81.
Furthermore, if line 190 were written PRINT AT 23,10;F$(B), there would have been space on the bottom of the screen
Non-Trivial Solutions’ new Integer Basic Compiler! Now you can write
programs in rapid time!
e compiles ZX-81 Basic source code to machine language: write and debug in a subset of ZX-81 Basic: compile when it’s right
increases the speed of the ZX-81 20 to 50 times
208 regular variables, 26 dimensioned variables; variables are 16 bit two’s complement integers
compiled code can be stored in REM or in 2000H to 3FFFH address
segment, if available
the source code can be located anywhere and the position of the com- piled code can be selected, allowing you to write a long program, com- it in pieces, and link the pieces
4 functions --
14 key words 16K or more RAM $29.95
Still available:
PEEK, RND, USR, IN KEY$
e Letter Raiders & Life with Palette e challenging games
e $9.95 each
(Copyright 1982 NON-TRIVIAL Solutions)
ZXPRESS
Life with Palette
CJ Check enclosed Charge my O Mastercharge O Visa
Card No. Signature
ea | NON-TRIVIAL SOLUTIONS
QUANTITY ae) ee comes
Exp. Date
P.O. Box 2941 Amarillo, Texas 79105 (806) 376-5723
SYNC Magazine
If you own a Timex-Sinclair 1000 or ZX81 computer, you should have a Memopak behind it. From increased memory to high resolution graphics, Memotech has a Memopak to boost your system’s capabilities. Every Memopak peripheral comes in a black anodised aluminum case and is designed to fit together in “piggy back” fashion to enable you to continue to add on and still keep an
integrated system look.
Printer on t RAM
High Resolution Graphics
Order at no risk
All Memotech products carry our 10 day money back guarantee. If you’re not completely satisfied, return it in ten days and we will give you a full refund. And every Memotech product comes with a six month warranty. Should anything be defective with your Memopak, return it to us and we will repair or replace it free of charge. Dealer inquiries welcome. To order any Memotech product call our toll-free number 800/662-0949 or use the order coupon.
CORPORATION
7550 West Yale Avenue Denver, Colorado 80227 (303) 986-1516 ‘TWX 910-320-2917
IS A MEMOPAK
——— eee a a a
tech Corporation, 7550 West Yale Ave., Denver, CO 80227 ı
ee
Code: SYCO-1-2 *Price Oty Total l | 64K RAM $179.95 | l 32K RAM 109.95 | 16K RAM 59.95 | | Centronics Parallel Printer Interface 104.95 . | RS232 Printer Interface 139.95 i High Resolution Graphics 144.95 | Shipping and handling 4.95 $4.95 | | All prices quoted in U.S. dollars Tax** l
** Colorado residents please add sales tax Total | CO Check (J MasterCard (J Visa | i Account No. Exp. i | : Name i | Address iy State Zip |
BEHIND EVERY GOOD SINCLAIR
Memopak 64K RAM The 64K RAM extends the memory of your Sinclair by 56K to a full 64K. It is directly addressable, user transparent, is neither switched nor paged and accepts such BASIC commands as 10 DIM A (9000). The Memopak 64K turns your Sinclair into a powerful computer suitable for business, recreational and educational use. No additional power supply is required.
Memopak 32K RAM The 32K RAM Memopak offers your Sinclair a full 32K of directly addressable RAM. Like the 64K Memopak, it is neither switched nor paged and enables you to execute sophisticated programs and store large data bases. It is also fully compatible with Sinclair’s or Memotech’s 16K RAM to give you a full 48K of RAM.
Memopak 16K RAM The Memopak 16K RAM provides an economical way to increase the capabilities of your Sinclair. And at the same time, it enables you to continue to add on other features with its “piggy back” connectors. It is compatible with the Sinclair 16K or a second Memopak 16K or Memopak 32K to give 32K or 48K of RAM respectively.
Memopak High Resolution Graphics The Memopak HRG contains a 2K EPROM monitor and is fully programmable for high resolution graphics. The HRG provides for up to 192 by 248 pixel resolution.
Memopak Printer Interface The Memopak Centronics Parallel or RS232 Interface
paks enable your Sinclair to use a wide range of compatible printers (major manufacturers’ printers available through Memotech at significant savings). The resident software in the units gives the ASCII set of characters. Both Memopak printer interfaces provide lower case character capabilities. The RS232 Interface is also compatible with modems.
New products coming soon Memotech will soon be introducing four new Sinclair compatible products: a high quality, direct connection keyboard, a digitizing tablet, a 16K EPROM and a disk drive. Watch for our future advertisements.
TIMEX/SINCLAIR 1000 or SINCLAIR ZX-81 Software
data~asette
DATA-ASSETTE brings you proven software from around the world. We are the agents for some of the best software produced
for these machines and have several
of our own developments.
We have over 60 programs of software in our catalog and feature a range of challenges, games, adventures, business, personal or home tapes. If you don’t see something you like, then just send $2.50 for post and handling, and we will credit you the money against your first order. Call for more details.
Information and product spec sheets may be obtained by mail, or phone our HOT LINE 800-523-2909; in Penna 215-932-4807.
Business or home: These are most efficient and user
friendly. Special feature allow variable size RAM packs (16, 32, 48, 64) to be used and save or load through the ZX-99 is standard option.
PROPERTY MANAGER (16K)
BUSINESS or PERSONAL FINANCIAL $24.95
Our accountant believes that this program allows your system to be tax deductible as an individual, we will advise upon further notice.
Property owners or Managers will find this an extremely valuable tool. Provides for any combination of 10 units in 2 buildings or 2 units in 5 buildings per program. If you have more than 10 then just run a new copy of the master file. The program tracks each unit for RENT, up to 15 variable expense categories, and 15 fixed expense lines, all for a full year. That’s right 12 months of data including late payments, and optional save routines for the ZX-99.
CASH FLOW FORECASTER and
BUDGET ANALYSIS (16K)
HOME or BUSINESS $19.95
Brand new financial utility for use at home or in the office. Keeps detailed records for twelve months in the three major categories. INCOME, FIXED and VARIABLE EXPENSES PLUS LOAN BALANCE OR LINE OF CREDIT. Provides the user with the ability to forecast or track the history of his cash flow.
INVENTORY CONTROL AND STOCK ANALYSIS (16K)
HOME or BUSINESS $19.95
The first in a series. This program operates as a stand alone control or it will operate with the ZX-99 Tape control system for file han- dling. Features include stock control of units and of values, with separate routines for receipts and returns or sales and shipments. Special routine for adjustments in units or values. Program uses average cost for inventory value and shipments. Allows the user to SORT by code or alpha name. Quick access to stock levels. New fea- ture will allow the user to automatically expand the files for 32 or 65K ram packs.
MICROMEGA This software is unique for its use of MACHINE CODE and handling of complex routines for BUSINESS or HOME.
COMP-U-SHARE (16K)
PERSONAL HOME FINANCE $24.95 . Excellent program that allows the user to maintain an up to date record of his portfolio. Stocks, Bonds, Funds or other financial investments. Developed by a professional for his own use. Monitor your results or run a forecast of expected results. Includes P/E ratios, dividends, etc. User guide included.
CHALLENGE | (1K) $9.95. Four different tests of your skill. Start out driving arace and finish up in a war.
CHALLENGE II (1K) $9.95. Four different arcade style challenges. You will be quickly overcome by the desire to win! Both of these are written in machine code so that the speed and response are UNBE- LIEVEABLE for TS/1000.
“BANK” (16K) HOME or BUSINESS $14.95. Excellent program for use at home or in a small business. Monthly statements reconciliation are now an easy task. File structure allows search by item or type of expenditure.
KAYDE ELECTRONICS Hi-resolution graphics at its best.
$19.95 ea. or $49.95 pack; 16K graphics are only possible with our HI-RES GRAPHICS ROM (see page two). We offer three different types to illustrate the power of the ROM and the effect on the screen. Special introductory offer, buy one and order the ROM and save $10.00.
The three are: PECKMAN our version of the game with real Graphics. SPACE INVADERS cannot be compared to the others.
CENTIPEDE Quoted to be the “BEST MOVING GRAPHIC GAME ON THE rh Re
ROULETTE (16K) $14.95.Accepts all legal bets in any combination, one or two players, both against the computer.
RAMPAGE (16K) $19.95. Not your normal challenge. You play inside the RAM and against the memory. Like TRON with GRAPHICS.
TIME BANDITS (16K) $19.95. Journey through time and space, slip in the hole, fight Napolean’s army, raise TITANIC and more.
ZX/TS DOT MAN (16K) $19.95. Fantastic recreation of the arcade game. FAST MOVING and requires lots of skill. Don’t miss it.
AIRLINE (16K) $14.95. Business game not an arcade game. Chal- lenges your financial and logic senses. Be better than SIR FREDIE LAKER....
RESTAURANT (16K) $9.95. Another business game...Everyone else in this business! Can you succeed? Watch out for inflation, plan and more.
with a full selection of accessories for the TIMEX/SINCLAIR 1000 or SINCLAIR ZX-81.
RAM PACKS All possible combinations are now available. Expand as your need change, or simply start with our 64K ram that gives the largest possible memory for the price.
16K Budget model $44.95. SAVE $5.00 off the normal price. Supplied without case. No other difference. Full guarantee.
16K RAM pack $49.95. Selected from major European supplier. Fully cased.
48K Now available with our 32K “Piggy-Back” and a 16K daisy chained together. Order both together and save.
32K “Piggy-back” $109.95. 48K PACKAGE (16K + 32K) $139.95.
16K Stand-alone $55.95.
16K Add-on later $44.95. 16K and its UP-GRADABLE to 32K later “SPECIAL NEW DESIGN”. Allows upgrade to our 32K by the addition of asimple plug-in module. Expand at any time.
32K Ram Pack Stand-alone $99.95. Closed back or 32K “Piggy-Back model (see 48K) UP-GRADE your unit to a full 32K from the start. 64K Ram Pack $149.95. Massive memory available from the start. Uses latest in Chip technology.
INTERFACES—PRINTERS, COMPUTER TO COMPUTER, AND CASSETTE RECORDERS. Now the TIMEX or Sinclair comes of age. Simply by adding any or all of these products your unit can grow to the size of a mini-computer or sophisticated WORD PROCESSOR. Never before has so much been possible with such a small investment.
ZX-99 Automatic tape control (Up to 4 units) and RS 232 C Printer interface. Allows maximum use of the computer. Several built in USR commands provide program control over the cassette record- anne super features such as “Tape or Tape Copy” or Program list. 149.95. ZX-98 Parallel and Serial Interface all on the same board for $99.95. Use one or both to enhance the capability of your computer. Make it into a terminal for ON-LINE services or use it to communicate to another computer or interface with any printer with a parallel or serial port. Several unique features are included to assist the user, LLIST, LPRINT and COPY are still operational. Others, for example, allow MEMORY EXAMINATION of HEX BYTE. Honestly there are too many features to list here, but a better value for your money would be hard to find. ZX-21 Metered Cassette to computer loading interface. $19.95. Now reduce program load errors to a minimum by pre-setting your tape recorder to the level that is compatible with the computer. This unit has been designed by the leading expert in this field. See our soft- ware section for more information. ZX-22 Power Driven Cassette Loading Interface $39.95. This unit uses the power pack energy to test the Sound of your recorder and gives a red or green signal to indicate the proper setting for the computer. A bargain if you are troubled by the combination of cassette recorder difficulties or computer idiosyncracies.
CASSETTE RECORDER PACKAGE All in one for $30.00. Package devel- oped by Mike Salem, the leading expert on cassette recorders for microcomputers. Package includes “THE MICROCOMPUTER USERS BOOK OF TAPE RECORDING” a well written 60 page description of the HOW and WHY of recording and recorders. A must by itself. Plus a specially recorded test tape that allows precise tuning of your tape recorder. And finally we will include the Cassette loading interface normally $19.95, a value for this very low introductory price. If ordered individually they are $6.25 for the book and $9.95 for the test tape.
Get over the post-Christmas blues
All products are in stock and can be shipped the same day for credit card orders.
KEYBOARDS All possible sizes and features. Selected from the best English suppliers with over two years of satisfied customers behind them. Select the one that best fits your needs.
KLIK This unit is the same size as your TIMEX or SINCLAIR compu- ter. Forty Keys and multi-colored key labels are provided. Allows the user to maintain portability and compactness. Full movement and response. “KLIK” is user installable or mail in your unit and we will install it for you. $75.00. Please add $1.00 for postage and han- dling of the conversion if mailed to us.
KAYDE FULL SIZE This unit is standard size with the added feature of a repeat button. Typewriter touch and feel. User installable $75.00. Please add $10.00 and return to us for modification if desired.
KLIK-2 Same as above but with the extra feature of automatic repeat on each key. Just add the new module and the KLIK can be up- graded to have this super feature. Can be added to all previous KLIK keyboards from Kempston. Special introductory price of $15.00, but only $10.00 if ordered together.
NEW PRODUCT: High resolution graphics are now available. Kayde has designed the solution to the ZX-81 or the TS 1000. Fits inside the computer and replaces the ROM with graphics of 450 different types. PLUS the unit has space for 4K of user on board ROM or addi- tional 2K of RAM. $59.95. See our software section for three sepa- rate choices of program tapes that use these unique features.
PRODUCT UNIT TOTAL ——_|—___+—_+_— Pari a e ie Vp ee ea pees Ee Se Ve or ren Oy pee ee ee ee ee ea a ed es ie” TOTAL ORDER
PLEASE RUSH MY ORDER TO: Name
_ Address BENE tees City Stale oe Seep
Charge To: VISA LI Master L] Account Number
Expiration Date
Signature
Data-Assette (sy-4] 56 South 3rd St. Oxford, Pa. 19363
data~asrette
Reg. $14.95 - Now only $11.20
(through Feb. 28, 1983
Learning Timex Sinclair BASIC, Dr. David Lien’s new, 350-page, comprehensive manual for the Timex Sinclair 1000 and Sinclair ZX80/ZX81, is being offered at a one-time-only 25% pre-publi- cation discount through Feb. 28, 1983.
Dr. Lien’s easy-to-follow style is designed to help those with no prior computer knowledge enjoy full use of the Timex Sinclair. Each programming step is explained clearly and completely, and special Question & Answer sections are included at the end of many chapters to test the reader on important points.
Learning Timex Sinclair BASIC’s simple, step-by-step instructions make it ideal for the classroom. And it’s a must for all Timex Sinclair owners, especially first-time computer users. Don’t miss this opportunity to learn from a proven teacher of BASIC how to write your own custom software.
This is a one-time offer and will not be repeated, so order now. Fill out the coupon or call our 24-hour order line at 800-854-6505: in California call 619-588-0996 (8:00 a.m. - 5:00 p.m.)
30-Day Money Back Guarantee
If you’re not totally satisfied with this book for any reason, return it to CompuSoft in salable condition within
30 days fora full refund.
Er
CompuSoft® Publishing P.O. Box 19669
Dept. #070183
San Diego, CA 92119
Timex Sinciale 1000 imex Sinclair Sinclair ZX80/ZX 81
DISCOUNT
ee ee ee ee ee ee E E
Please send copies of Learning Timex BASIC at i $11.20 each. Reg. $14.95 (Calif. residents add 6%), plus $1.65 shipping and handling per book within the U.S. Foreign orders, include $2.50 surface shipping and handling per book.
Total Enclosed
E
a
i
E
J
f Name
I Address
è City/State/Zip
- O Check O Visa O MasterCard 4 c i
EES ed
Siana oe ee Expiration Date Shipping to begin Feb. 28, please allow 4 to 6 weeks for
delivery. Cle a an an a a aa aa a aa a n n a n n n n
Special Pre-Publication Offer
by David A. Lien
Letters, continued
for a REPORT or CURSOR and the run could have been stopped any time by hitting BREAK as usual. Also, this would have eliminated the need for the fancy, and limited use of lines 330 to 370.
Alger Salt in SYNC 2:3 expains why he had to take extra steps to get around an idiosyncrasy in the Sinclair computer when the PAUSE function is used. I would suggest avoiding the use of PAUSE whenever possible and substituting a con- ventional FOR-NEXT loop instead. For example:
FOR N = 1 TO 50 NEXT N
PAUSE (at least on my TV screen) has another undesirable characteristic. It causes the image to jump. This is very disturbing in graphics. The do-nothing, FOR-NEXT loop does not impart any motion to the screen.
I use PAUSE mostly with, say PAUSE 40000, to get an indefinite delay in the run of a program. Then press any key except BREAK to continue. Another plus is the fact that the screen does not clear first when the program restarts.
Warren Fricke 273 Canton St.
saeu = =—
“Try This” features short programs to show off your computer, impress your family and friends, and tickle your imagi- nation when SYNC arrives at your place. Send your contributions to: Try This, SYNC, 39 E. Hanover Ave., Morris Plains, NJ 07950.
4K ROM; 1K RAM Enter the following lines:
1@ PRINT 1;
29 POKE 16427,14
Press RUN and NEWLINE. Observe the results. When you see the error code, press any key except SHIFT, then press RUN and NEWLINE again. Can you figure out how this works? Our thanks to:
James Grosjean
50 Kings Rd.
8K ROM: 1K RAM Enter the following lines:
10 PRINT ai 20 GOTO 18
Put the computer in SLOW mode. Press RUN and ENTER. Observe the results. Can you figure out how this works? Our thanks to The Ultimate Magazine (reprinted with per- mission) and:
Neil Dewhurst
2 Chesterbrook, Ribchester
Nr. Preston PR3 3XT
United Kingdom
8K ROM; IK RAM
Enter the following lines.
S FAST
1@ FOR A=6 TO 16 STEP .@5
30 LET R=8sC0S (A) COS (2ER)
30 PLOT (iS¢(42ReCGS (AIFF. t +(4e#R"SIN (A) 3)
48 NEXT A
S@ PRINT AT 9.19: “B
Press RUN and ENTER. Observe the re- sults. Our thanks to:
Neal Neirick
9105 Hollyberry
a= te
Depew, NY 14043 = Chatham, NJ 07928 Des Plaines, IL 60016 =
PROFESSIONAL KEYBOARD
Timex Sinclair 1000 Sinclair ZX-81 S i N C LAI R OW N E R S RCO Technical took a HARD LOOK at the cost of SOFTWARE for 16K
ZX81 & T/S 1000 computers.
Our findings? We can do BETTER!
Enter programs and data with accuracy and speed. Individual keypads provide needed tactile feedback. Enables touch typ- ing. 47 keys, six of which are for future use. Space bar. ZX/TS key legends.
This is a completely assembled keyboard, specificially de- signed for ZX/TS computers. It plugs into the ZX/TS in min- utes. No soldering required.
An optional enclosure attractively packages your keyboard and will also house the ZX/TS circuit board. All connections (power, tape, TV and expansion port for 16K RAM, etc.) are easily accessible.
We are so confident that you wil! enjoy using our professional keyboard that we offer an unconditional money back guaran- tee. If you are not completely satisfied, simply returr it within 10 days and receive a full refund.
Order your keyboard today by sending check or money order to:
*CHECKSTUB— checkbook management program with the analytic POWER you need to find out where your money is going. Thirty user definable budget categories. In- novative displays.
*EZ-HEX— Hex code utility. Write-edit-test Z80 ma- chine language programs in hex code. Excellent program- ming aid. Easy to use and FAST.
*Z-WRYTER— Word processor. Write, edit, and save text using powerful editing functions that make writing en- joyable. Supports ZX printer.
*PROFIT PLAN- Profit analysis. Calculates break-
even point — profit projections using entered fixed & vari- able cost data.
THE FULL SPECTRUM 3829 Mainsail Circle Westlake Village, CA 91361
$9.95 Each plus $1 shipping Send check or M.O. to:
16K req
RCO Technical P.O. Box 773A St. Ann, MO 63074
Keyboard US$69.95 Enclosure 29.95
Shipping/Handling $4.95 Calif. Res. add 672% tax
January/February 1983 11
Sync notes ——eL
SYNC in the Home Office
Our theme section in this issue is “SYNC in the Home Office.” Among the reasons for buying a computer is to get a tool that will take care of some of the drudgery of home record keeping and financial calculation. We have had a num- ber of requests for such programs, so we have gathered several programs that illu- strate something of how the Sinclair com- puter series can be used at home. In addition we have included several pro- grams on time calculation, display set up, and making and maintaining support records.
This section is not an exhaustive pre- sentation, and we hope to see more pro- grams developed by our readers for home office work. Normally we do not accept
Paul Grosjean
programs showing how to use your com- puter as a calculator since we assume most people have calculators. This does not exclude programs which combine a series of time consuming steps on a cal- culator. In such cases the computer does what it is supposed to do, namely, com- pute.
Browsing through the ads and Resources Column of this issue and our last issue will show quite a variety of programs of possible use to the home office. If you have used one of these products and found it valuable, we hope you will write up a short review for us. Several reviews of products useful to the home office top off the theme emphasis of this issue.
We are planning a “SYNC on the Job” theme section for our Mar/Apr issue.
SYNC Buyer’s Guide
Issue
The May/June issue of SYNC will be a buyer’s guide issue. We will have some regular articles, programs, and reviews, but the majority of the content will be a directory with short descriptions of all known peripherals, add-ons, software packages, books, and other products related to the Sinclair and Timex/Sinclair computers.
Vendors are invited to submit a product description of up to 60 words for each product they have available for this com- puter series. The description should include product name, order number, cost, ordering details, ROM and RAM requirements, and as complete a product description as possible within the 60 words. Send the descriptions to:
Buyer’s Guide Issue
SYNC Magazine
39 E. Hanover Ave.
Morris Plains, NJ 07950.
Get on the Control Bus for only $49.95 "ip
-.. and be on TIME.
With our real Time Clock and Calendar
TIME MONTH DATE YEAR DAY OF WEEK
8 lines departing
(outputs capable of driving relays)
8 lines arriving (T T L compatible inputs)
Compatible with ZX8 1/80
SS5o5o.. 12.95. e OE T
@ Leap year correction
@ 12/24 hour format
@ + 30 second time correction (hardware or software)
@ Battery back-up circuit
Comes complete with:
@ All software needed to operate clock and
Input/Output ports @® On board 5 volt regulator.
@ Feed through Sinclair Bus connector
to allow normal expansion.
@ Each port is expandable through Multiplexing. ® /O ports and other controls mate with Radio Shack“
44 pin edge socket. @ SO day Warranty
Accessories used with I/O Board: @ ^A to D and D to A converter
@ Wireless control system compatible with BSR“
modules
@ Solid state 25 amp switch modules
@® 8 SPDT 5 amp relay card
Future products used with I/O board:
@ Touch Tone™ encoder/decoder and
other telephone products @ Speech synthesizer @® Sound synthesizer
MicroAce & TIMEX ™" 1000 3 All accessories can be connected together
and separately controlled from the I/O Parts
Descriptiom
VO port with real time clock [Built and tested) PC board and manual of #310 A to D and D to A converter (Built and tested)
Bare Ato D and D to A board and manua!
Wireless control system (Built and tested) Solid State™ AC Switch (Built and tested)
Clock IC and crystal (Tested)
Shipping and handling
Orders accepted by phone or mail
California residents add 6% tax
For mail orders, send check or money order Foreign orders must be in U.S. currency
write for free catalog
SR AUIS
P.O. Box 3295 Escondido, CA 92025-0580
information (619) 741-5132 24 HOUR ORDER LINE ONLY NAT. 800-227-1617 Calif. Res. 800-772-3545
Baus
(No catalog calls please)
Ask for operator 367
En oo oe å a ‘a =- Fs5uo1 ya o} ajqefed ‘O'wI/senbay)D
GNV TONSA "HIOHON
BLS (PaIesIsN|I! se) 10799UUOD UO! 9/qIxe/4 (a)
g D ssəuppy 7 = puegsaysew MERDIMUY A LYTEE OS'TL$ UOISJOA ƏNƏƏSSE) i EA aed h i roe -peoy soe = C6Z1$ woy sriydes6 ym Gasojruay'didsos 6$ uoppeaseald ‘aise pub ead Joes wa poe SRN) ƏSN JOJ UOISIAA WOg '3 bulbbng-ap pue Buidnyjsuo? Bees. EV Raia ae S SU PUAS ASPAld İİ sinou pz aiaeuene ‘somas Be eimad sercorene Cat T ul sauesBoJd au) ple 02 SƏNAN JO JIN} UX 1001 Jt (D) puegjĝug ‘yjnowse, 2919 auoydaja} 10 ‘Aepo} UOdNOD ay} zO puss 0668$ uoisuedx J Kiowayy t9 ig)
ONT Mra cr $ @M°°°' BW PUaS ISLId
d AAA TE $ ® CNT a Naive Phat ar a Qw puas ƏSLlƏjd 4 ee So yee S @ °° BW PUS ISLId (Uo n x E ETORT A $ ®) des, E E e 2 2 ow puəs əƏSləƏjd 4 % é
‘azis AlowaW WOY UUM ‘auIyeW Jo adA} IPIS aseaid
06'SE$ pasa} pue pajquasse Ajjn4 Aiowayy UO ppy anisse~y wey J91 (Y)
SHUOIDP NONI MIN
LTS ase WSt Ol vS$ ped nəwnu YM pəswuN
PAra 18$ ped 2JzaWNU YM pase? Ayjng
L6'8$ quVMLAOS WOU S
Y¥3JQNII50 * 4QAdILNID ¥ SYSOWANI JDWdS ¥
L6'ES$ ‘Sjas 1ƏPLILYD
wWOoISN2 UMO INOA 372312 UBD NOA OS L8XZ JHL NO J1GISSOd MON SOIHdWHD IHL 4O INOS SoIGBIO SIGEUHSD 185" Age Hes! oct HED pue WYA/AZ/AL € YUM penis aq UD : JapPOY SIUL WVa/WOd JO Ap JOUUN e (etn, ot ee we | Tere eA AE E A ‘ 28 Ae es je 41 31947 Ysiuy JOU es kad y EML b L Icin eau 34) JJAIMOH [WOX oA ain g E a b Jo ədons əy} 0} se eap! ue NOA ani Aew k + a6 +$ i Ab on UI) 43| OOb INOe IS ae aot ‘way? zs JO OS INoge 104 syUNOIIe Ajuo eu) ae € S arri pue sa1udes6 siapenut JO Jas ajajdwo> e ‘SHUR} ‘SJAADOI ‘SIDING ‘SQUUO ‘SIINI ƏSLI JAMO] WE WOY 3U? uj ‘SeulyDew anisuadxa Jow Jabie} UO punoj Ajaues Jas DIUdesB e yum ‘JaINdWoOd |nNaMod Alaa e OU! [8 3U) sun} MOU siy L ‘pZQ| ƏsJə^uU! 11347 YIM pue sr14ydesH Z 15 aAey MoU NOA Jey} Sued SIU p9 AlUO SUuleJUOD Jas DWYydesH jeuOU noA ‘soiydesb pauiwesbod -31d e1XƏ Bpp BIGeAaijaqun ue noA aaib Im SIUL WON s1ydeib yp e YUM ajajdwOd pue paS) Áin} ‘ying Apeas səawo>2 ajNPOW 3y L ‘pieoghay əy) 1əpun 1ƏNdwOo2 INOA
WoO apisul Apeau SU} SƏHOSSƏIDDE 19470 ISOW G G ayIUN ‘əjnpow siy] `Aossə22 | 8XZ a }sa}e| INO si ajNpOW DYdeID WG 24L
Bujsapjosousasjnbay = ‘ap|su 3} 0} Ajddns samod əy? pue (winsy2ads 10 1g) 423NdWOD Əy? YI0q 104 uBnousa abe] sı ase? Jų L
qavowdAsy XZ
S)IUOW] yp
WNALAdS
suempuct! I8/OS XZ
KAYDE Electronic Systems
ZX80/1 $75 90 ZX KEYBOARD WITH
REPEAT KEY
Fully cased keyboard ........ $75.90 Uncased keyboard....... ..... $55.90 Keyboard Case................... $21.90
This is a highly professional keyboard using executive buttons as found on top quality computers. It has a repeat key and comes complete in its own luxury case. This is a genuine professional keyboard and should not be confused with toy keyboards currently available on the market
KAYDE 16K RAM PACKS
The 16K RAMPACK simply plugs straight into the user port at the rear of your computer. It is fully compatible with all accessories and needs no extra power and therefore it will run quite happily on your Sinclair power supply. It does not over-heat and will not lose memory at all. As you may know. some makes go down to 11K after being on for a while.
This 16K RAMPACK is very stable and will not wobble or cause you to lose your programme. It comes fully built and tested with a complete money-back Guarantee.
KAYDE FLEXIBLE RIBBON CONNECTOR
Stops movement of RAM PACK and other accessories (Not needed with a KAYDE RAMPACK) $25. on
The KAYDE Graphics Board ıs probably our best accessory yet. It fits neatly inside your ZX81. It
comes complete with a pre-programmed 2K Graphics ROM. This will give nearly 450 extra graphics
and with the inverse makes a total of over nine hundred. 359
The KAYDE Graphics Board has facilities for either 2K of RAM (for user definable graphics), 4K of ROM -90 or our 4K Tool Kit Chips that will be available shortly All the graphics are completely software
controlled, therefore they can be written into your programmes. Here are a few examples: A full set of
space invaders — Puckman — Bullets, Bombs — Tanks — Laser Bases and Alien Ships.
NO EXTRA POWER NEEDED
KAYDE 16K GRAPHICS BOARD SOFTWARE
PECKMAN: The only true ZX version of the popular arcade game. $ Centipede: “In all | think this is the best presented moving graphics program I've yet seen.” Phil Garratt. 7 1 9 Interface. 0
SPACE INVADERS: The best version available anywhere. Graphics software can only be used with a graphics board
Centipede: “‘In all I think this is the best presented moving graphics program I've yet seen.” Phil Garratt, "770 Interface. 7 3D/3D Labyrinth: A Cubit Maze that has corridors which may go left, right, up, down. Peckman (the 0 ie we EP et Bae BE Se Ge -7
latest addition in 81 games). WHY WAIT TO PAY MORE — ee ae ie ee
Pi See ZX Keyboards with key $75.90 each
FAST, IMMEDIATE DELIVERY ma ae $59.90 each “Sate VER RES Pie ible ribbon connectors -JU each
Post to: Dept SY-3 fae aeiee ae a ee Kayde Electronic Systems Ltd Please send me... 16K graphics board software $11.90 each Please send ME .......... eee cececeeseseeeeecceeseeeeeees 16K 81 software $11.90 each
The Conge
Great Yarmouth : r Norfolk NR30 1PJ ENGLAND waa
Tel: 0493 57867 (Dept. SY1)
Please pay by International money order or certified cheque for immediate delivery.
Please add $5 p&p for all hardware and $2 for all software. Please make cheques payable to Kayde Electronic Systems Ltd.
Hace cent meee come cs emi dia “easy coms Sed min ae ce a les ie es eee ed
Machine Language Series
In this issue we are beginning a series of articles by Harry Doakes which will give newcomers to computing the benefits of machine language programming. Harry is no stranger to SYNC readers because of his articles “TR$ and LET A$=A$+B$ on the ZX80,” “Safe Machine Code Routines,” and “Maps and the ZX80/81.” If you have specific areas of interest in machine language programming, drop us a line.
Sinclair Inquiries and Service
If you need hardware repairs, contact Sinclair’s authorized service center:
MicroSync Services
162R Marlboro St.
Keene, NH 03431 Inquiries concerning repairs (past, pre- sent, or future) should be mailed to
New!
MicroSync’s Customer Service Depart- ment. Please send a stamped addressed envelope for additional service informa- tion. MicroSync is offering one year main- tenance agreements for Sinclair and Timex/Sinclair computers. For further information contact MicroSync.
Sinclair Research Ltd. promises a prompt reply to customers with technical questions, product operating queries, or other problems. However, only mail inquiries can be answered. So write a letter indicating the details of your prob- lem to:
‘Technical Department
Sinclair Research Ltd.
4 Sinclair Plaza
Nashua, NH 03061
SYNC on the Newsstands
You will be receiving this issue of SYNC somewhat earlier than you may have expected. The reason for this is that we have advanced the publication time about a month in order to enter into news- stand distribution of SYNC. la"
AIR TRAFFIC CONTROL Cassette software for your 16K ZX81 or TS1000
Meet the challenge of up to 24 aircraft speeding across your screen to 5 different destinations!
No “safe” altitudes - every plane is your responsibil- ity. You must identify type, heading and altitude and skillfully guide them through crowded airspace, while
a real-time clock builds the pressure.
Every game is different.
Aircraft, ranging from a Cessna 152 to
SYNC Program Listings
Before entering the programs in this issue, readers should note the following:
` The ROM and RAM requirements for using a given program are shown at the top of the first page of the article. Observe these carefully. NEWLINE and ENTER are used interchangeably.
A letter after a number shows the type: b for binary; d for decimal; h for hexadecimal.
In PRINT statements:
#: Enter a necessary space.
A (32): Use the graphic character on the A key 32 times. The underline means use the graphic on that key.
A: The overline means use the key in inverse. _ :
INPUT: An underlined word found on the keyboard should be entered from the keyboard, not spelled out. If the keyword will not ENTER, hit THEN, the keyword you want, backspace and delete THEN, continue entering the line. This memory saving technique may be disregarded if you have enough RAM. |
epEECH RECOGNITION a E i Raw Sen t a ge? Sigi A
Hugely successful Speech Recognition System,
the new Boeing 767, enter your airspace
whether you are ready or not.
Over 3K_of machine code means immediate re- ‘INPUT-O
sponse. Experience the tension as you race to avoid N _the controller's nightmare - a mid-air collision!
Order AIR TRAFFIC CONTROL from:
Powerplay Systems P.O. Box 752, Woodside New York, NY 11377
Send $12.95 plus $1.50 s&h (NY res. add sales tax).
Allow 3-4 weeks for delivery.
January/February 1983
MUSIC 3CHANEL
CONNECT RE
TP LAY LED. PHOTOCELL etc $49
SPEECH SYNTHESISER -- MOUTH
WITH AMPLIFER + SPEAKER $99
complete with microphone, software and full instructions.
PROGRAMMABLE = TWO 8bit BIDIRECTION PORT
AUDIOVISION Teoh. NORMANDIE AV. CAL =
HOLLYWOOD _C.A. 90027
213
6605217
15
JUSt FOr Fun Se
Generally SYNC prefers articles in some depth to help you get more out of your _ computer. However, we receive many short programs that illustrate a point, demonstrate a technique, or show something the reader has found interesting. “Just for Fun” shares these programs with you. If you learn something, great. If you have some fun, great. If you have some that you want to share, send them to: Just for Fun, SYNC, 39 E. Hanover Ave., Morris Plains, NJ 07950.
Listing 2.
Bombsmash a Si PRINT AT INT (RND£163 +3. INT M. H EE . Hampson 40 LET B=@
e e LET 5S=8 In Bombsmash the display shown in 100 PRINT AT 22,15; "
the sample run passes over your firing 180 PRINT AT 22.15) mim > base from right to left. Your base remains 135 LET P=P-2
LET P=p-— i4@ PRINT S&T F256
stationary. You fire at the moving targets 150 LET N=PEEK (PEEK 16398+256+ 3393
by pressing any key. If you hit a part of : Deere Ree ia the letters or inverse asterisks, you get | m =E Ea ae 1°09 IF N THEN core aon)” one point. Your goal is to wipe out all the | È E B 5 ae BEE see ee targets in the display. However, if your -~ SAG LET Boa EI E A E shot misses all of the targets and continues {| bombsmash 220 LET B=1 S00 PRINT AT 1.1; "GAME GUER: YOU
to the top edge of the display, you lose. The program is entered in three steps: 1) Type in 1 REM (followed by 32 characters)
2 R SCORE+>:3>;3";S 310 IF INHKEY&<:>CHRs 148 THEN GO TO Sok
4190 LET 5=8
2) Type in as direct commands the Listing 1. 42@ GOTO 180 POKEs in Listing 1. 3) Type in Listing 2. POKE 16514,42 PORE 16529;31 = i To play the game press RUN and POKE 16515,12 POKE 16530,0 Space Pirate Attack ENTER. You fire by pressing any key. P OKE 16516,64 POKE 16531,237 Your score will be displayed at the end of POKE 16517,6 POKE 16532,176 Sheldon Maloff the game. The highest score is the best. POKE 16518,24 POKE 16533,43 After a very successful mining opera- Hit ENTER to start a new game. POKE 16519,197 POKE 16534,58 tion in the asteroid belt, you are on the Graphics notes: POKE 16520,35 POKE 16535,33 way back to your base to unload and 20: A (32); set up display to show as in POKE 16521,126 POKE 16536,64 resupply for the next expedition. Sud- the listing; finish off with A(32). POKE 16522,50 POKE 16537,119 denly, you are attacked by a fleet of = 31: inverse asterisk. POKE 16523,33 POKE 16538,35 pirates. Although you are outnumbered 120: 6,W.4. POKE 16524,64 POKE 16539,193 20 to 1, you have a chance because your POKE 16525,84 POKE 16540,16 position is such that they cannot attack M. Hampson, 7 Hereford Dr., Clitheroe, Lancs POKE 16526,93 POKE 16541,233 Rea OR a er aR eet tein ME Ler OSS SRM BB7 1JP, U.K. Reprinted from The Ultimate POKE 16527,35 POKE 16542,201 Sheldon Maloff, 1102-432 Huntsville Cr., N.W., Magazine with permission. POKE 16528,1 Calgary, Alberta, Canada T2K 5E1.
16 SYNC Magazine
Extend your ZX81 System: Add Memory that won't Pen
ADD YOUR OWN SYSTEM UTILITIES
~ BUILD UP A LIBRARY OF MACHINE LANGUAGE SUBROUTINES
> UPTO 8K NONVOLATILE RAM ° 2.
USE HM6116P CMOS RAM OR 2716/2732 EPROM
wx LOW POWER BACK-UP
COMPATIBLE WITH “<3 AA
16K RAM PACKS 7 7
This memory board is designed to fill the transparent 8K block of memory (from 8 to 16K) in a ZX81-16K system. The use of HM6116P 2K CMOS RAM memory IC's with their own reserve power supply means that routines stored in the RAM are nonvolatile — the RAM retains its memory even when the ZX81 is switched off or reset. Moreover, be- ing RAM, the routines you store in the memory are easily modified.
With this board it's no longer necessary to place your machine language routines in REM statements, in string variables, or beyond RAMTOP. You can build up a resident library of machine utilities for use by your BASIC system.
wre
HUNTER, 1630 FOREST HILLS DRIVE, OKEMOS, MICHIGAN 48864
*or TIMEX 1000
$9995
Complete step-by-step instructions in a 14 page manual make assembly of the board easy. Construction takes be- tween one and two hours. The kit (pictured above) is com- plete with a silkscreened solder-masked printed circuit board, all capacitors, resistors, transistors, sockets, con- nectors, integrated circuits, and the lithium cell. The board is Supplied with one 2K CMOS 6116P-3 RAM — it will ac- comodate three more for a total of 8K.
Send check or money order for $29.95 plus $1.95 shipping and handling to the address below. The printed circuit board with the instruction manual is available separately for $15.00 post paid.
—_—,
H
you simultaneously. It all depends now on your skill and a little bit of luck. Your defense screen displays the field of attack. The radar will locate the pirate ship and show its location by displaying a number from 0 to 9. To fire you must press the corresponding key on your firing control console. If you are fast enough, you will score a hit. If you press the wrong key or do not fire at all, you will miss the pirate. In a fraction of a second the next pirate will appear on your screen. When all the twenty have appeared, the game ends and your score is displayed.
When you have entered the program, press RUN and ENTER. The playing grid consisting of colons will then appear on your screen. As soon as this grid is com- plete, the game starts. So be ready. A number from 0 to 9 will appear some- where on the field. Press the same number on the keyboard to fire.
After the game is over, the field will be displayed. The periods represent the place where you destroyed a pirate ship. The pirates who escaped are shown by plus signs. The pirates that you were not fast enough to hit or that you did not shoot at are shown as numbers.
The computer randomly selects a time between 0.1 and 1.0 seconds when you
January/February 1983
press a firing button. The game thus com- bines the elements of skill and random- ness that a good game must have.
Graphics notes:
5: PIRATES (inverse).
80: X (inverse).
(RND #20) > iX +20?
58 LET &=CODE INREY$-20
6S IF @<>-28 THEN L =108
70 NEXT R
75 IF @<@ FHEN GOTO 35
8@ PRINT :
85 IF xX=8 THEN L 5=5+1
ae Pa je X,Y” AT Q, Y;a."
95 NEXT 100 PRINT AT 10,0; “S=";5
Space Age Graphics
Robert G. Boyer
Keith Comer’s article in SYNC 1:3 on graphics intrigued me, so I wanted to use it on my ZX80 with the 8K ROM. The conversion involved only a few changes in the program lines. However, the 4K
Robert G. Boyer, 1103 Rivlin Rd., Huntsville AL 35801.
ADVENTURE
VOYAGER |-Voyage thru time and space in this new fantasy game. In Voyager | you will travel to Sangrel to find the rare element Vali- um for new Energy Weapons. Voyager | includes:
One key entry of commands Over 16 Billion Characters
2 Sides of Adventure 16k each Graphic display of status
Over 20 Encounters to deal with Quality C-20 Cassette Instructions Only $9.95
You may use one of your own Characters from your favorite Role Playing Game if you wish or you may use one of over 16 billion Characters.
******* VOYAGER II COMING SOON******* Saveable in progress
Explorer l-You find a strange new world when you walk into a strange mist on your way home. This is a text adventure and is saveable inprogress. $9.95
Explorer Il-After a week back home once again you find yourself transported to a strange new world. Text adventure - Saveable inprogress $9.95
Send for catalog with 1k to 16k programs. Postage is included in price. All programs come on a Quality C-20 Computer grade Cassette with instructions.
Send to: Chris White 789 S. Green Bay Road Lake Forest, IL. 60045
and 8K ROMs have different codes for the characters. To convert a 4K ROM picture to the 8K ROM requires getting the character equivalents set up. The two lists are given in Table 1. If you are going to translate a picture, follow this table. However, you can start from scratch with your own ZX81 or T/S 1000.
To use the system, turn to “The Char- acter Set” chapter in your manual. Put the letters A-J beside characters 1-10 and M-V beside characters 129-138. The inverse space becomes the letter L.
If you do not have the original article, get a sheet of graph paper. Lightly rule every other line horizontally and vertically so that you will have blocks divided into four smaller blocks. Each of the larger blocks represents a full character space on the computer. Now draw your picture by shading the small blocks. You can use solid black, grey, and white (by leaving a blank). When you are finished, look at the larger blocks and note which of the. various pixel arrangements in the char- acter set looks just like that four block unit. Enter the letter for that character into your string. Do not forget to indicate white spaces. The pound sign (found on the shifted space key) indicates the end of the line.
17
Ņ
BY TE-BACK modules |64-K MEMORY $119.:
INSTANT INFORMATION
WITH ous BYTE-BACK’S MD-1
MODEM only $1 19.35
WIRED and TESTED $149.95
Use your phone to connect your “LITTLE” ZX81 to the “LARGEST” computer networks in the worid. With BYTE- BACK’s MD-1 MODEM connected all you do is dial a phone number (usually local), press a few keys and watch the data appear on your TV screen. (Software is included) This MODEM can be used in either the “originate” or “answer” mode with selectable baud rate.
You can have immediate access to:
UNIVERSITY COMPUTERS,DOW JONES, UPI, AND MORE !
As an extra bonus an RS-232 port is provided to
allow you to drive all standard RS-232 peripherals.
(75 to 9600 Baud) BYTE-BACK’S BB-1
eas ooo MODULE $59.00 /n Stock!
WIRED and TESTED $69
e 8 Independent Relays (with LED status indicators)
e 8 Independent TTL Inputs si Schmitt trigger buffers)
e By using a single POKE command yOu Can change and latch the status of each of the 8 relays
e Your ZX80/1 can read the Status of all 8 inputs by the use of a single PEEK command.
e A comprehensive manual: is in- cluded that has complete application details.
WIRED and TESTED $129.95 IN STOCK!
SAME DAY SHIPMENT!
WHY PAY MORE? BYTE-BACK’S M-64 extends the memory of your ZX81 or Timex-Sinclair 1000 to a full 64-K. It's user transparent. It plugs directly into the back of the ZX81 and has an expansion port to allow you to still use a printer. No extra power supply is required. It has all standard features plus the area from 8-16-K can be switched dut in 2-K incre- ments for memory mapped peripherals, PROMS, etc. Same proven reliability as our M-16 with thousands in use.
EXPAND YOUR 16K SYSTEM bie $59.95 KIT
WIRED and TESTED S69 95
If you have a Sinclair 16K RAM module and need more memory, expand it to 32K and beyond by using BYTE-BACK M-16 MEMORY MODULES. You can't connect two Sin- clair 16K RAM modules together, but you can connect one Sinclair 16K and one or more BYTE-BACK 16K modules to get all the memory you need. THOUSANDS IN USE WITH PROVEN RELIABILITY IN STOCK — SAME DAY SHIPMENT
RS-232 Module $59.95
WIRED and TESTED $69.95 IN STOCK Allows you to connect ZX81 to all RS-232 printers & terminals.
ALL MODULES CARRY 90-DAY WARRANTY
TRY BYTE~BACK MODULES FOR 10 DAYS WITH NO OBLIGATION
Remember with: BYTE-BACK modules you are NOT limited to using only one module at a time!
Shipping and Handling $4.95
ORDER PHONE (803) 532-5812
Exp. Date Card No.
O M-16 Blank PC Board O Modem Kit $119.95
$149.95
Bill My O Visa O MasterCard
Name.
BYTE-BACK CO. Ph. (803) 532-5812
Address
LEESVILLE, S.C. 29070
City/State/Zip
RT. 3, BOX 147 ¢ BRODIE RD.
Mail To: BYTE-BACK CO. ¢ Rt. 3, Box 147 © Brodie Rd. è Leesville, S.C. 29070
You are converting your picture to a string which the computer will display as a picture using the graphics characters. With 16K RAM the possibilities for this program are endless.
Listing 1 gives the program for storing and producing your picture. A sample
Figure 1. Character Sets.
4K ROM 8K ROM 2 5 3 131 4 1 J 2 6 4 7 135 8 6 9 8 10 9 11 11 130 133 131 3 132 129 133 130 134 132 135 7 136 134 ih Fae 136 139 138
Listing 1
10 LET AG="SSOOCESBDIRESEDIRDES MDIBREASSROCOCOOOOCCODES SASSERES RO7VESCF LA SRDOSCOCOCCCALSAFSSFCESRE SS ga eg
Cc ET X DE A$ © IF X=12 THEN PRINT
IF X=12 THEN GOTO 808 4 IF X:38 THEN GOTO 119 50 IF x<46 THE ET X=X-S? 5S IF X=46 THEN LET X=X+86 60 IF X>47 THEN LET X=X+79 70 PRINT CHRE X: 80 LET AF=ASt2e To 3; 99 IF As="" THEN GOTO 145 18@ GOTO 20 11@ FOR N=1 TO X-25 120 PRINT “ “i 138
NEXT N GOTO 8&0
picture is given in line 10 in the A$ string. If you are developing your own picture, enter the letters into the A$ string in line 10. Type in the program, press RUN and ENTER. As you may guess when you see the picture, I work for NASA.
Driver Neil Dewhurst
In Driver you are at the wheel of a race car on a hazardous race course. This is a test of your driving skills. You must avoid the obstacles as you speed toward to finish
Neil Dewhurst, 2 Chesterbrook, Ribchester, Nr. Preston, PR3 3XT, U.K. Reprinted from The Ultimate Magazine with permission.
line. The car heads left by itself. Pressing any key makes it head the other way. Your score is displayed when you crash. Pressing any key restarts the game.
This program uses the graphics capa- bilities of the ZX81 to create the screen display of a road and the obstacles along the way. The SCROLL feature produces a moving course. The INKEY$ function allows the input of any key for control.
Graphics notes:
40: G
70: H
To make the game more difficult, change line 40 as indicated at the end of the listing.
1@ LET F=16
2@ LET S=
50 SCROLL
4@ PRINT “SE: TAB INT (RND£293 + i; “a 2 TRB 20: ar ae
50 PRINT AT 20.P:;
60 IF iS7=PEEK (PEEK 16398+256 *PEEK 16399) THEN GOTO 106
70 PRINT “WS
LET S=S+i LET P=P+1-—CINKEYS$="") £2 GOTO 30 100 PRINT 5 PAUSE 4E4 120 GOTO 28
PRINT “SE: TAB INT (RNDO#12) + W“ TRB 20: “ss
SOFTWARE
DR. FLOYD Psychoanalysis by computer? - well, not quite but Dr. Floyd will carry on a conver-
sation with you using psychoanalytic tech-
niques giving the appearance of artificial
intelligence. Requires 16K RAM. $10.95
GRAPHICS PAC | An introduction to Sinclair graphics- includes: 2 random picture drawers, allow creation of “Pop” art. A screen formatter which allows placing any character anywhere on the screen. Complex pic- tures may be created & saved. Doodler allows line art drawings to be created & saved. Requires 16K. $10.95
WORD PLAY Includes: “Jargon” - a jargon word generator. “Animal” - a fun game where the player teaches the computer all about animals. “Story” - the computer writes stories using the players input names, places, etc. Can be very funny for kids. “Haiku” - the computer composes HAIKU like poetry. Requires 16K. $10.95
| SNAKES ALIVE
A group of arcade type snake games. You must evade, box in, capture or destroy. Fast moving and a lot of fun. Requires 16K. $12.95
All software is on high quality cassettes
and is replacement guaranteed.
“APROPOS TECHNOLOG
7X81 - TS1000
TO ORDER:
Send Check or Money Order For the total plus: $3.00 shipping (Software) or $4.00 shipping (Hardware) Calif. residents add 6% tax. Phone orders: CALL
805/482-3604
For credit card orders, include all information on card.
350 N. Lantana Ave., Suite 821 œ
HARDWARE
SIN16 S4595 16K RAM
This RAM plug-in allows the user to run virtually all programs written for the ZX81 or TS1000. Completely assembled & tested. The reliable one.
$4 2595 SUPER SIN64
64K RAM This is the maximum directly address- able RAM that your ZX81 or TS1000 can use - Memory is used as follows: 0-8K Sinclair operating ROM. 8-16K switches in or out of use. Used for assembly language routines, memory mapped peripherals. Contents are safe from NEW and cassette (disc) loads thus allowing program-to-program communications. 16-32K BASIC and assembly language user program area. 32-64K large data arrays & BASIC variables.
All hardware is completely compatable with Sinclair add-on products. Both RAMS use the most reliable gold plated, bifurcated contact connector on the market.
10 day return privilege on all hardware-90 day parts and labor warranty-inexpensive extended service contract is available- WE SERVICE WHAT WE SELL.
Camarillo, CA 93010
A Personal Money Management Program
Alan Pattison
Where do we stand financially? This is one of the questions of greatest concern in the home office. We make our depos- its, write our checks, and pay our bills, but these activities do not provide the information we need to interpret our po- sition. We need to know not only our in- come and outgo, but also where our money is and what it is doing. We need to know not only this year, but also last year and other years. The program be- low is one that I developed to provide answers to such questions for my own situation. You may not have the same needs or questions, but perhaps the pro- gram will enable you to pose the ques- tions you want to your computer and find the answers you need.
When the program has been activated, simply enter income, expense, and loan prin- cipal items each month. The computer will then provide you with:
1) An income statement for the current
month and the year-to-date.
2) An expense statement for the current month and the year-to-date.
3) A balance sheet showing your various assets, liabilities, and net worth.
4) A cash flow statement for the month and the year-to-date.
5) A comparison of expenses to date with your yearly budget.
6) A month by month graph comparing in- come with expenses.
7) Another month by month graph compar- ing each month’s expenses this year with those of last year.
8) A listing showing month by month income and expenses as well as your av-
erage monthly income and expenses.
You can make as many entries as necessary for any item—right out of your check book, Visa or Master Charge records, etc. Your checking account balance and all other assets and liabilities will appear correctly on your
Alan Pattison, 3422 French Loop NW, Olympia, WA 98502.
20
P E EDRF a em nell ——— Since ——a
balance sheet. There is also a provision for entering transfers of funds between accounts.
The program works best with your com- puter in FAST mode.
To use the program, each month simply enter your income and expenses—typing in the name of the item and the amount of the transaction. The computer will ask which ac-
- count the money is for or from, which you
enter by code “X,” “S,” etc.
The computer will add together similar items and adjust your assets and liabilities page, your income and expense totals, your cash flow, and your graphs.
If you have outstanding loans such as a mortgage, be sure to enter your principal payments under menu item #10. Your interest on the loans should be entered on the expense statement.
The program also allows you to enter trans- fers of funds between different accounts under menu item #10.
Instructions for Activating the Program
1) After loading “Money Manager” in your ZX81, save the program on tape just as it is in case you mess up the rest of the instructions.
2) GOTO 5 and enter menu item #1. Enter an income account name, e.g. “SALARY,” enter a zero, then enter another zero. Your screen will print the account name, followed by “0” under Month and “0” under year. Continue entering account names, followed by the two zeros until you have entered six. (Note: If you want more or less than six categories, change the DIM statements in this section as well as the FOR/NEXT loops).
3) Enter “2” and return to menu. Press “2” and you will be on the expense sheet. Here, you must type in each expense account name, followed by “0,” “0,” just as you did with income. The program is set up for 17 expense items, so, if you want more or less, you will need to change the DIM statements and
FOR/NEXT loops in this expense section. With 17 expense items, your screen will dis- play a Code 5 at the bottom —press “C” and ENTER to continue.
4) Enter “2” and return to menu. Exit the program by entering menu item 12.
5) Delete all the following statements in your listing (simply type each number and ENTER, one by one.)
235, 236, 238, 239, 241, 242, 255, 260, 265, 319,322, 323, 524, 525, J40, 3214920; 091, 33273355"
6) Type GOTO 1700 and ENTER. Your screen will show a report code 2. Now type GOTO 2500 and ENTER. Your graph format will appear on the screen.
7) Type GOTO 3600 and ENTER. Again your screen will show a report code 2. Type GOTO 4500 and ENTER. Your income/ expense graph format will appear on the screen.
8) Delete the following statements in your listing by typing and ENTERing each number individually.
1700, 1720, 1740, 3600, 3610, 3620.
9) For the 2-Year expense comparison graph, you must enter each of last year’s monthly expenses. (If you do not do this, this graph should be ignored.) Type in the follow- ing: 3
LET R(1)=(January last year expenses)
LET R(3)=(February last year expenses)
LET R(5)=(March last year expenses) Continue with LET R statements 7, 9, 11, 13, 15, 17, 19, 21, 23 for the remaining months of last year. (Note that these are all odd numbers —even numbers are reserved for the current year. )
Last year’s expense entries will be held in reserve and will not appear on the graph until the corresponding months this year are en- tered. (Except, the graph will show each suc- ceeding month’s expenses for last year as well as those through the current months.)
SYNC Magazine
SOUND withZX-81! SOUND with ZX-81!
MAKE AMAZING SOUND EFFECTS WITH YOUR ZX-81
a Timex
= Sinclair D
$49.95 THE ZON X-81
* The ZON X-81 SOUND UNIT is completely self-contained and espe- cially designed for use with the ZX-81. It just plugs in—no dismantl- ing or soldering.
No power pack, batteries, leads or other extras.
Manual Volume Control on panel—ample volume from built-in loud- speaker.
Standard ZX-81—16K Rampack or printer can be plugged into ZON X-81 Sound Unit without affecting normal ZX-81 operation.
* Huge range of possible sounds for games or: Music, Helicopters, Sci-Fi, Space Invaders, Explosions, Gun-shots, Drums, Planes, Lasers, Organs, Bells, Tunes, Chords, etc., or whatever you devise!
8 full octaves. Uses 3-channel sound chip giving programme control of pitch, volume of tones and noise, all with envelope control.
Easiiy added to existing games or programmes using a few simple “BASIC” lines or machine code.
* No memory addresses used—l.0. mapped.
FULL Instructions with many examples of how to obtain effects and the programmes, supplied. Fully Guaranteed.
Payment may be made by Bank Cheque or International Money Order in U.S. $ or £ Sterling Payable to:
P.O. Box 6 Visa-Mastercard accepted ai a a Send account # “Phone pron 3182 | with name & address
+
>
>
>
%*
10) Type GOTO 5 and ENTER. Type menu item #8 and your budget page will be on the screen. As each budget expense item appears, type in and ENTER your budgeted amount for that item. When the screen shows a report code 5 at the bottom, press “C” for the next page.
11) Delete listing statements 3100, 3105, 3120, and 3135.
12) You must now load the computer with additional data in order to make your program work right. This is done with LET statements,
2 REM +2 ¥*#***F DESIGNED BY ALAN PATTISON. OLYMPIA. WA S5 REM “MONEY MANAGER" f 6&6 REM MA=NISC. ASSETS, X=CHECE. »yV=VUISA. S=SAUINGS .C=CASH,CD=C QF DEP.,.ST= STOCKS., MG= MORTGE LN LOAN $ “5 LET T = + mame
uid TT be (iti
AG
haps me T pa eH Z ~
Hant aN
PUY e p E
PRINT “BO YOQu WANT TO:” PRINT PRINT TAB 2: “23 CHECK INCOME STATEMENT? SS PRINT TAB “27 CHECK EXPENS = STATEMENT?" ið PRINT TRE SICHECK ASSETS AND LIABILIT IE: 45 PRINT TAE ta) ENTER INCOME LEMS 27 S@ PRINT TAE 1. “S53 ENTER EXPENS aS 8g os Te SS PRINT TAB 1, "“6)S5EFE& INCOME/E PENSE GRAPH?" SS PRINT TARE 1; "7)ISEE 2-YERR E XFEENSES GRAPH? SS PRINT TAB 1: “8? COMPARE EXPE NSES WITH BUDGET?" GO PRINT TRE 1: °3;3 SEE CASH FLO
1 PRINT “103 TRANSFER FUNDS: F =PAY LOANS T* PRINT “11}3}5EE MONTHLY INCOF = EXPENSE?" 63 PRINT “i23EXITtT PROGRAM?" 64 PRIN eo “ENTER YOUR CHOICE, L 70 INPUT QD 75 CLS að IF O=1 THEN GOTCQ 200 SS IF G=2 THEN GOTO 5ee@ SG IF OQ=3 THEN GOTO 8&@@ S IF O=4 THEN GOTO 3200 188 IF O=5 THEN GOTO 5820 185 IF O=6 THEN GOTO 4806 i1@ IF G=7 THEN GOTO 2000 115 IF OG=8 THEN GOTO 3ee8 118 IF G=S3 THEN GOTO 66606 i329 IF 0=1@ THEN GOTO 65800 i120 IF G=11 THEN GOTO 7500 ż21 IF O=i2f THEN GOTO 1000 züt REM *INCOME STATEMENT Æ 21i@ REM AFTER ENTERING CATEGORI ES, DELETE 235. 236,238., 239.241,2 42. 235., 260, 285 223 PRINT TAB 123° ag 225 PRINT TAB 12: “E INCOME 230 PRINT TARE ta: * KI #32 PRINT F z395 DIM L$(6&.15} 236 DIM HiG} 2385 DIM F (6? #39 LET M$="MONTH" 22
entered one by one (numbering not neces- sary). The titles may be changed to fit your own situation. Type in as follows: a) Load your Assets: LET X=(Checking account balance) LET V=(Visa or other cash card balance) LET S=(Savings account) LET C=(Cash on hand) LET CD=(Certificates of deposit) LET ST=(Stocks and bonds) LET PR=(Real and personal property) LET MA=(Other assets)
Listing 1. 24@ PRINT “ITEM: TAB 16: M$; TAB ao; “YEAR* 242. Let Hee ee Veo he ee ee 245 PRINT 5$ 250. FOR B=2 TO 6 255 INPUT L€t53 250 INPUT Ht(B}3 26S INPUT F (53 z7 PRINT LS$(B)}; TAB i6;H(B);TAE =4,F iB?)
z Fẹ
228 PRINT “TOTAL; TAB 16; HT;TARE 24; FT
z291 PRINT TẸ
“TYPE “"“ai'* FO MAKE €
oe" TO RETURN TO S&S
TART. ` 394 ` INPUT 295 CLS
IF W=2 THEN GOTO 5 299 REM +INCOME ENTRIES
_31@ PRINT
326 INPUT K$ 33@ IF Kg="NO™ THEN GOTO 374 342 FOR Z=2 TO 6 STEP 1
372 PRINT “TYPE MONTH-S3 LETTER ie ge PORE
373 Me 374 as. 375 PRINT TAB 6; “INCOME ENTRIES
376 PRINT
SẸ 3850 PRINT “TO END ENTRIES TYPE ae “RETURN sa ue u
390 PRINT "Ta 395 PRINT TAS i16:;N6; TAB 25; “WER
336 PRINT S 400 PRINT me A a EE
PS 415 IF Pg§=" = Ae eal THEN GOTO 5
6 LiB} } THEN GOTO 452
INT 450 GOTO 480 452 PRINT L$tSi; TARE i6;n(6) ; TARE
eee st Ss
= 455 PRINT “$"°:;E ae RCCTF.: “i
464 IF Ug="X" THEN LET te pe
=3s += 468 IF UgGa"U" THEN LET VsVe1E 4708 IF wg="C“ THEN L C=C+E
ET 472 IF UgG="“CD“ THEN LET CD=CD +5 474 IF tUg="“ST“ TREN LET ST=5fT +E
“TS THIS A NEW MONTH?
b) Load your Liabilities:
LET MG=(Mortgage principal balance) LET L=(Other loan balance)
13) Type GOTO 5 and ENTER. Your pro- gram is now Set up for you to use. If you are starting the program in the middle of the year, enter income and expense items month by month for all prior months. This is important if your graphs are to work correctly. If you do make entries for prior months, your balance sheet will no longer be correct. Therefore you should go back to instruction #12 and reload your Assets and Liabilities.
475 IF Ug="“MA" THEN LET MASMATE 476 LET HiB? =H (6) +E LET nT +E
RT = 480 LET F (653 =F (65) 4E 482 LET FT=FT +E
NT FS aur DATE"; TAB 16; H (6)
FẸ 456 INT “TOTAL INCOME; TRE 16 HT TAB 24; FT
438 PRINT S$
438 GOTO 4866
SØG REM EXPENSE STATEMENT €
S@S REM AFTER ENTERING EXPENSE 54a SSE ESE’ DELETE 5219.522, 523,
+
525., 528,527,528, 591. 532,593 "EXPENSES
219 LET D$="“MONTH" “ITEM"; TAG 16,08; FRE
Al gars}
i; TRE 16; MiNI; TRE
FS Arey PRINT “TOTAL"; TAB 16; MT; TRE
570 PRINT " ive PE "“"“i"" TO MAKE E i t van e TORETE IRN TO A START z 37e INP
UT U $75 IF ŲW<:>1 THEN GOTO 5 578 REM ŽEXPENSE ENTRIES#
‘PRINT 591 PRINT “IS THIS A NEW MONTH? 582 INPUT Y$
S83 IF YS="NO"' THEN GOTO 599 en VWS="YES" THEN LET PPT=6
SSS PRINT “TYPE MONTH-S LETTER ABBREVIATION S86 INPUT
DS S9@ FOR D=1 TO 17 STEP 1 MTF =8
600 PRINT TRE &; “EXPENSE ENTRIE
6@1 PRINT S&
682 PRINT “TO END ENTRIES TYPE ay “RETURN ee ae ú ae
683 PRINT T$ og PRINT TAG 15;D$: TAB 25; “WER
607 PRINT SẸ 688 PRINT “ITEM:"“
SYNC Magazine
If you're shopping for a personal computer, for peripherals, for games—or practically anything that
NEED HELP BUYING n A COMPUTER iae arcjust too many products on the market OR PERIPHERAL? ie Genive Computing 1983 Buyer’ Guide
to Personal Computers, Peripherals and Electronic Games contains all the help you'll need to shop wisely. Its honest evaluations are written by experts—the experts of Creative Computing.
In the Buyer’s Guide you'|l find: w How to select the computer for you
= Evaluations of specific personal computers
= Tips on buying peripherals of all kinds m Reviews of peripherals ii a
Music synthesis equipment
Comprehensive evaluation of joysticks, paddles and game port extenders
Video game systems and software Roundup of electronic toys and games
a = Æ Electronic and computerized learning aids E Video products for computer users
x
Selected microprocessor-based consumer electronics products.
As you can see, the Buyer's Guide is an incredibly comprehensive directory to the latest in computer technology. Use the coupon below to order your copy today!
ORDER YOUR
oe COPY TODAY!
Creative Computing Buyer’s Guide to Personal Computers
P.O. Box 640, Holmes, PA 19043 p Please send me the Creative Computing 1983 Buyer's Y P § ° Guide to Personal Computers, Peripherals and Electronic
Games. | enclose $5.00 ($3.95* plus $1.05 postage and handling). Price outside U.S.A. $6.00.
Mr./Mrs./Ms.
(please print full name)
City creative compating BUYER’S GUIDE TO PERSONAL COMPUTERS, PERIPHERALS AND
ELECTRONIC GAMES
Stile aA e SS
Zip
*NJ residents add 5% sales tax.
Please make check payable to Creative Computing Buyer’s Guide.
pete GETT
i
i
i
:
i
;
]
;
| Address Apte- -> |
i AE EET ies et SOA '
|
i
:
|
|
JUST 4 $3.95 o a
Money Management
628 INPUT
, continued
Cy 615 IF Sete ce. THEN GOTO 5
628 LET J=LEN 630 DIM X$tiF.d3
640 FOR N=i TO i7 656 LET X$ (Ni =ISiny
666 IF C¢= a edie 678 NEXT
THEN GOTO FOGO
PRINT “NO SUCH CATEGORY --TY
6Se . PE AGAIN.” 635 GOTO 695 TOO PRINT I¢{N} PRINT “ANT.:
K 716 PRINT “GSK 715 PRINT oe
720 PRINT
STRE 16. Mtn} > TRE
ROCT.: “i
Q E 722 IF O$=“X“ THEN LET X=X-K ved IF O$="S" THEN LET S=S-K 725 IF &$=“U" i CET ESER
727 IF og¢="Cc"
EN LET
730 LET M{N} =M IN) +K
73S LET MT=MT+K
F40 LET T iN? =T iN} +K
F$ 745 PRINT “TO DATE“; TAB 16: MIN} ; TAB N)
Fs 748 PRINT “TOTAL EXPENSE": TAB i
SiMT; TAB 24;TT 49 $ 750 GOTO 685
Saa REM sASSETS/LIABILITIES:* 810 REM THESE ARE INITIALLY ENT ERED WITH LET STATEMENTS.
S26 PRINT TRG 4;
Se? PRINT. TRE 4;
ABILITIES
328 PRINT TAG 4:
330 PRINT
S32 PRINT S& 846 PRINT TAB 3; S45 PRINT TAB 3; 20;U_
8508 PRINT TARE 3; TRE 20,5
355 PRINT TAB 3; 2@;C
s50 Moats TAB 3; 865 PRINT TAB 3i 5
O78 PRINT TAB 3S; TAB 280;:M
aS an PRINT TAB 3i
aS B PRINT TAB
t “BASSETS AND LE e: ROGER IES COTTE ERT ERR BERS
“CHECKING BAL." “MISA BAL. "“; TAB “SAVINGS BAL." “CRASH BAL." TAE “CERTS. OF DEF. “STOCKS, TAB 26 “MISC. ASSETS". “PROPERTY “i TRE
3“ ASSETS"; TAG
28 RIVA 40400 157 NALOR @ PRINT S
88 agoni PRINT TAB 3; S90 * ORINT TAB 3;
a; 393 PRINT TAB TRS 2; MG+L and PRINT So
“MORTGAGE; TAB “INS. LOAN": TRE
3; “B LIABILITIES”
PR: TAB 3; “E NET WORTH"; T "20 (X tU+S +C COST +MA+PR) — IMG +
i Sk | 900 PRINT “ENTER ““O““ TO RETUR TO ART."
920 GOTO 5
990 REM EXIT PROGRAM INCLUDIN
SAVE
1800 PRINT “YOU HAVE INDICATED
OU WISH TO EXIT 18285 PRINT
THIS PROGRAM."
1910 PRINT “IF YOU HAVE MADE ANS
CHANGES“ 1815 PRINT
1020 PRINT ‘°‘ ppm ie SER Te 7625 PRINT e DO NGT FORGET TS FE
14a PRINT
2858 PRINT “TO SAVE THIS PROGRE AS CHANGED EREPSRE THE TAPE REL
18682 STOP
1878 SAVE “MONEY 1080 GOTO S
189398 STOP
ORDER. BEGINRECORDING. AND TYPE
MANAGER
1530 REM *#2-YR EXPENSE GRAPH 1593 REM AFTER RUNNING 1700., DEL STE 1700,1720. 1742
2696 REM LAST YEARS MONTHLY EXPE
NSES ARE ENTERED
Witt LET STATE!
ENTS-Riis TO R (25) (EVERY ALTERNS
TE NUMBER) irga DIM Rife}
1720 FOR I=i To 29
2891 PRINT AT 8.9;
S&
28@2 PRINT “IT WILL TAKE A Cousi- E OF MINUTESTO PREPARE GRAPH... 7
AKE A BREAK. 2003 PRINT Ts 2004 PAUSE 200 2005 IF D¢="JAN"
2210 IF D=“ “FES” 2815 IF Dg="MAR™ S828 IF OF=“Arpr” 2825 IF Os="“NAY
2030 IF D$="UUN
#2435 IF O$="4IUL" #3408 IF DgF="RUG" E45 IF O¢=“SEP" 2858 IF Dg="GCcT" 24
THEN: LET THER CET THEN LET TEER HET THEN LET ATEN LET: THEN LET THEN LET THEN LET THEN. LET.
OOOO O60) 0 Hon nhnnnnon
FU te foes fe > b> OOTP 1) G oy re a Gt
zara LET. Q
2855 IF OFf="NGU" THEN LET sago IF PEE aha THEN EE
=MT
2265 FAS
2280 LET R íG} =&
2500 CLS 3108 FOR I=
2520 PRINT
Saro FOR U=
25.70 G@ STEP >t AT ABS F-15.1<«5: Lee: i TG 24
340 IF NOT Ritii THEN =@noToO 265 2550 LET Y=R tuUu} +220
2g60 IF Wc¢c-25 THEN PRIM #561 IF U=2 THEN GOTO 3 THEN GOTO
h
fi a ny ke "Nl Q
I ND fa ae
2563 IF U=5 THEN GOTA ;
2564 IF U=F THEN GOTG 2555
2565 IF U=S9 THEN GOTO 2585
2566 IF UB=11 THEN GOTO 2565
2567 IF U=13 THEN GOTO 2555
2568 IF U=15 THEN GOTO 2555
2569 IF U=17 THEN SGO 2355
2570 IF ti=iS THEN GoTo 2555
2571 IF B=21 THEN GoTo 25585
2572 IF U=25 THEN GoTo 2565
2575 IF W:?-26 AND W<25 THEN PRE > mm ¿
2580 IF yY>24 THEN PRINT “BF;
2382 NEXT Üü
2585, IF VW? -26 AND Y:25 THEN PR:
2588 IF Yo24 THEN ECRINT “REN:
25390 NEXT U
z500 PRINT
2510 NENT I
26209 PRINT AT (26,9, "610 F MAY
JU ASGOAN G
2630 PRINT AT 17.0; "52 3 FM A Jd AS: 6 > Oe
2635 PRINT AT 19,7; “EXPENSE 19 2538 PRINT AT 21.6: “iTYpE veo
at i D i È n A
2546 STOP
255@ GOTO 5
30300 CLS
S335 REM BUDGET + 328336 REM AFTER ENTERING BUDGET, DELETE 3100.3105. 3129.391935
3310 PRINT
TAB ee
TS EXPENSES": TAB 16; “TOG
DATE"; TAB 25: “BUDGET* 3840 PRINT S$ 2188 DIM P17) 3195 LET BT=e 2110 FOR N=1 TO 17 32115 PRINT IG(Ni; TAB 16; T(N}; 31230 INPUT PIN; 3130 PRINT TAB 25; Pin; 2135 LET BT=B8T +P (N) 3348 NEXT N 3150 PRINT F$ 3170 PRINT “TOTALS“:TAB 16:TT:i TA 3 25;58T 3175 PRINT Ts 3176 PRINT 3130 PRINT “ENTER ““C'" TO RETUF N TO START." 3185 STOF 2138 GOTO 5 3350 REM *xINCOME-EXPENSE GRAPH: 3590 REM DELETE S369©,.3619@,.3620 A FTER RUNNING 3600 2500 DIM Wtad2 3510 FOR I=1 TO 29 3520 PRINT I;“ t 4800 CLS ¿001 PRINT AT 86.0: 5$ 4302 PRINT “IT WILL TAKE A MINUT = OR TWO TO PREPARE GRAPH......5& Oo HAVE A CUPOF COFFEE."
45863 PRINT #BOd eee
fon
&
Ui
&
t
g) ASIST IS ICI RY FE te H H 4
ds & M i) 1 D Kn
4065 LET
4500 CLS 4510 FOR I= 452@ PRINT
TẸ 200 D=2 D=4 D=6 ="“APR“ THEN LET D=8 =“MAY" THEN LET D210 =“JUN“ THEN LET D=12 =“.300i THEN LET DO=24 =“RUG" THEN LET D=26 ns toy P“ THEN LET D=25 =“OCT THEN LET D=20 =“NOU THEN LET D=22 =“DEC THEN LET D=24a MT HT
iS TO 8 STEP -1 AT A6S I-15, I(5; Lea;
4538 FOR U=i TO 34 4549 IF NOT Wits} THEN GOTO 4686
#558 LET Y
=U (U3 +-I+286
45600 IF Y<-2S THEN PRINT “ “i 435651 IF U=12 THEN GOTO 45855 4562 IF U=3 THEN GOTO 4565 4563 IF U=5 THEN GOTO 45685 43554 IF U=7 THEN GOTO 4565 4565 IF U=3 THEN GOTO 45655 4366 IF ŅY=11 THEN GOTO 45865 45657 IF U=s=is THEN GOTO 4585 45583 IF U=iS THEN GOTI 4565 425593 IF U=17? THEN GOTO 4565 4578S IF U=i9 THEN GOTO 4585 457i IF U=21 THEN GOTO 4585 $572 IF V=23 THEN GOTO 4565 “W>-26 AND Y<¢25 THEN PRIN
4575 IF
: me . 458@ IF vas THEN PRINT "H:
4532 NEXT
4585 IF Y>-26 AND Y:25 THEN PRIN Tv a7 ars
4558 IF Y>24 THEN PRINT “wn: 43530 NEXT U
24608 25186
pari >
IE ase. J A SB4G
PRINT NEXT I
JAF 16.2,“ TRLEITEISERIE
BRINT AT 27,.2:;" UFMARM YU PRINT AT 29.5; “INCOME AND E
XPENSE 1962" S@S@ PRINT AT 22,6; “CTYPE tgs"
R
RER- CASH PLOW STATEMENT è PR i@;
PRINT TAB 16; M$: TAB 25; “VER PRINT Sẹ PRINT “INCOME: “; TRE 16;HT;T
PRINT “EXPENSE: “; TAG 16; MT;
PRINT “LOAN PRIN. PD.: “; TARE
16; PPT; TRB 24; PPX
6125
6158
PRI
PRINT “NET: “i; TAB 16; HT -MT -P
ST; TAB a4; INT f tet TT Bex) 150+. 33 7100
6166 6173 51588
pein Te PRINT “ TYPE “"“C'" TO RETU
RN TO START.”
6130 5200 6500 6518
STOP
GOTO 5
CLS
REM LOAN REPAYMENTS AND TF =
6550 PRINT “WHICH CATEGORY DO YG WANT? ENTER ““G"" GR “Son 5560 PRINT
657@ PRINT “ 1} PRINCIPAL PAYMENT
LORNS“ PRINT
5580 PRINT “ 23 TRANSFERS BETWEEN ACCOUNTS“
6530 INPUT CR
6600 IF CAEI THEN GOTO 7606 S602 CLS
6605 PRINT “WHICH LOAN ARE YOU P AYING ON? ENTER - CETS GR "a?
6696 PRINT
6506 PRINT TAB 5; “1} MORTGAGE"
6609 PRINT
tay PRINT TAB 5: “2)} INSURANCE UG
S612 INPUT Z®
6615 CLS
66168 IF 29=2 THEN GOTO 6625
6619 PRINT TS
6628 PRINT “MORTGAGE: “
6621 PRINT S$
6622 GOTO 6658
56625 PRINT T
6626 PRINT “INSURANCE LOAN: “
6627 PRINT
66390 PRI
6631 PRINT Soe aAA INCLUDE INTE REST HERE - S D BE ENTEREG WITH CUR- RENT EXPENSES.”
6635 PRINT
6640 PRINT “PRINCIPAL PARYMENT = oa
66596 INPUT PP
6655 LET PPT=PPT +PP
6656 LET PPX=PPX+PP
6666 PRINT “SIPP
63986
SH TO TRA
ts. sig h: ge
PRINT “PRID FROM WHICH ACCO
$ IF ZQ@=2 THEN LET L=L-PP IF ZO=i THEN LET MG-MG-PP
sprees N° PRINT “NEW INS
S$ PRINT “TYPE “Yin IF WOU WVE
IF KK=2 THEN GOTO 5 IF KK=3 THEN GOTO 6662 IF KK=4 THEN GOTO 880
Sg PRINT “AMT. YOU WISH TO TRE
INPUT WE PRINT WE
SB PRINT “FROM WHICH ACCOUNT?
INPUT We PRINT WE
PRINT Use WHICH ACCOUNT? “i
US IF W="S“ THEN LET S=5-NE IF We="“MA“ THEN LET MA=MA-L
SYNC Magazine
7120 IF US="U" THEN LET V=sU-NE 7130 IF We="X" THEN LET X=X-NE 7i@@ IF WE="CO" THEN LET CD=CD -i
E
es IF N=“ST“ THEN LET STt=ST -U 7160 IF We="C“ THEN LET C=C-NE Five IF Vs="S"“ THEN LET S=S+tve E IF VESUMA“ THEN LET MA=MA +H
7190 IF aaa THEN LET V=U4vEe 7200 IF V$="X" THEN LET X=X+4WE 7210 IF Vg="CD“ THEN LET CD=CD +43
VUge"ST" THEN LET ST=ST +H
IF VUg="C“ THEN LET C=C+4v& 7235 PRINT TS
- PRINT 7250 PRINT “TYPE ““2"" IF YOU WT SH TO MAKE ANOTHER TRANSFER. bieteat Sua” % time gC 8 | WISH TO RETURN T
START. “"“S"" TOGO SEE REVISED AC COUNTS.“ 7260 INPUT JE 7265 CLS
72708 IF JE=1 THEN GOTO 7806 7275 IF JE=S THEN GOTO E00 7290 GOTO 5S
CLS
7505 REM MONTH BY MONTH INCOME; EXPENSE DIFFERENCE. AND MEANS* 7518 PRint
MONTHLY INCOME AN)
TS 7550 PRI “MONTH TAG 7: “INCOME =i boce: tas “EXPENSE”; TAB 22; “DIFFE
S
7570 LET R=" ‘JANE EGMARAPRMAY JUN a ULRUGSEPOCTNOVUDEC"™
7571 LET HH=0
7625 IF WiB)>® “THEN LET HH=nR+ 1 7636 NEAT B
7548 PRINT
7SS@8_ PRINT TAG 8i IL: TRE
NTER Sa TO INCLU
TE 7718 PRINT TAS . EINCGME™ i. TRB i4 Pas iz eit 55:3 DIFFERENCE"
Si IL: TARAB ISi EE:TKH
7735 PRINT F$ à 7740 LET PP=INT (NGX-MG) is 7750 PRINT “PRIN.“; TAB @; “PMTS.
r 7770 PRINT “YEAR: THE i II:TRG 2 S; EE+PP ; TRG 23; LI-EE-PP @ PRINT 7790 PRINT S 7791 LET B8-6 7792 FOR B=1 TO 24 STEP 2 7793S LET RAR 1B; 7794 LET BB=-GE+AÑ
7795 NEXT & FSeos PRINT “HEGN MONTHEL NEPE- tiII? HHI HE aT <3 SP
nes g§° INT 3310 PRINT “NEAN MONTHLY EXPENS t IEE rH BELG EES t. 5j: iG
ae gE“ INT
£2
7316 PRINT “MEAN EXPENSE LAST r 2: $“; ENT €({BG27123 £102 42+.53 -is
“{£# SEXCLUDING MORTGAHYG
(94
os 7330 PRINT “ ENTER at, re N TO START.”
Ed. — For the convenience of our readers the author will supply the program on cassette for $8 including postage. Readers outside the U.S. should include in the payment enough to cover the additional cost of postage for about 2 ounces.
Line Notes: .
7: §
cis SS
iS: Inverse:
70: Letter O
210: Once you have entered your income categories, delete statements indicated in REM.
20% 5 6
MONEY MANAGER
Cont O g
2S0: -Z
255: Your income categories
464: IF, LET statements credit the income to the proper account.
486: Frints a running total of both monthly and year-to-date income.
30S: Once you have entered your expense categories, delete statements indicated in REM.
aes A
glas: a &
alas- zZ
Z722: IF, LET statements debit the appropriate account.
810: Initialize each asset and liability balance with LET statements.
Ba/s oS B
828: 7
865: Change titles of assets and liabilities to suit your own needs.
875: Inverse > on M
B7Ss Inverse =: Dn 4
896: Inverse spaces; = an M 1020: 6
19025: 3, 8
1930: Z
1695: These 3 statements set
up your graph but should be deleted after running. R11) would be Jan. expenses last years RS) Feb., etc. These will only appear on the graph when you enter each month this year, but they will be in memory waiting. Zale: © 2280: Inverse space 2388: A 2620: 81 represents last year (change to suit your needs); space between each letter representing a month; 82 represents this year. 32006: Delete statements in REM after entering all your budget items.
3010: ó
SOL Da 2.. 8
S020- Z
3390: Delete statements indicated in REM after running S600,
4063:
4080:
4570s
4375:
4580:
43855
4388:
BOBO: letter.
6010: 6
6020: J, 8
6608: Change loan titles to suit your own needs.
7520: A (2), A (2)
Letter @ Letter oO
IT ka 100 lo ka
Space between each
January/February 1983
TO RETUE
Sinclair Software SourceBook list YOUR SOFTWARE now for the February catalog SELL IT—SHARE IT You made it to fit your specific needs and it will meet the needs of thousands of other Sinclair users -who will ORDER FROM YOU AT YOUR PRICE
software category [_] Business Applications [_] Educational [|] Games [C] Industrial [ ] Home
Special Hardware if needed
designed for
[ ] ZX80
C] ZX 81/Timex Sinclair 1000 minimum of
cya ETISK
[]2k []48k
[]16k [ ] 64k
Brief description (200 characters max.)
ay 8, 0, 6 >a Pee | yee. 6) E A E EN N T E E TE E E W 2. er a wile a He h ole) T a ol esa see a ie Ae bole. Se A a N A ao dae) terse) are) 8-0 Ww a. vee! 4 a De - 6 ere se im) rb) a Sie, [eH wpl-0, se: le oe” 6s 8 O re” w 6. @ Orem te Ol a 6 “se cae (Oc a eee, Gene. Jel 6? a EA E a eae eo, 6-8 hee of eo) Ver se ie: ce) sel peo wie pe'lval ©, ee T E cm aw eo Sb eo: — 6" 0) le; eo ve eye J 6 et) ee 6) at Mal Set Sanne fe “aie, wee S N Bet BS Pye he Le apa ype teehee 6 a a ce er Barer jae ee E je ele eek 6" E Orea Jeo 8 68 Sp wl oe ome te cele ee ef .ee 8 Ss)... Semele, ee
Available as [_] Cassette $ _— (US) E- Source vst $ = (IS)
Name Address Street & #
State/Prov Zip/Postal code
Oye” Sh ee) Oe Pee el Oe ee ne (eee ie we le ce Se
[_] Listing(s)
$10 per listing .00 [_] Purchase ___ copy(s)
Sinclair Software
Sourcebook ($8 ea) .00 [_] Check or Money order [_] Visa or Mastercharge
#
22 e EE EEA DD ae ee =
Drivers Software Sourcebooks 5040 Ocatillo Rd. Las Cruces, NM 88001
AARDVARK — THE ADVENTURE PLACE ADVENTURES FOR OSI, TRS-80, TRS-80 COLOR, SINCLAIR, PET, VIC-20
ADVENTURES — Adventures are a unique form of computer game. They let you spend 30 to 70 hours exploring and conquering a world you have never seen before. There is little or no luck in Adventuring. The rewards are for creative thinking, courage, and wise gambling — not fast reflexes.
In Adventuring, the computer speaks and listens to plain English. No prior knowledge of computers, special controls, or games is re- quired so everyone enjoys them—even people who do not like computers.
Except for Quest, itself unique among Ad- venture games, Adventures are non-graphic. Adventures are more like a novel than a comic book or arcade game. It is like reading a par- ticular exciting book where you are the main character.
All of the Adventures in this ad are in Basic. They are full featured, fully plotted adventures that will take a minimum of thirty hours (in several sittings) to play.
Adventuring requires 16k on Sinclair, TRS- 80, and TRS-80 Color. They require 8k on OSI oven on VIC-20. Sinclair requires extended
TREK ADVENTURE by Bob Retelle — This one takes place aboard a familiar starship and is a must for trekkies. The problem is a famil- iar one — The ship is in a “decaying orbit” (the Captain never could learn to park!) and the engines are out (You would think that in all those years, they would have learned to build some that didn’t die once a week). Your options are to start the engine, save the ship, get off the ship, or die. Good Luck.
Authors note to players — | wrote this one with a concordance in hand. It is very accurate — and a lot of fun. It was nice to wander around the ship instead of watching it on T.V.
CIRCLE WORLD by Bob Anderson — The Alien culture has built a huge world in the shape of a ring circling their sun. They left behind some strange creatures and a lot of ad- vanced technology. Unfortunately, the world is headed for destruction and it is your job to save it before it plunges into the sun!
Editors note to players — In keeping with the large scale of Circle World, the author wrote a very large adventure. It has a lot of rooms and a lot of objects in them. It is a very convoluted, very complex adventure. One of our largest. Not available on OSI.
HAUNTED HOUSE by Bob Anderson — This one is for the kids. The house has ghosts, gob- lins, vampires and treasures — and problems designed for the 8 to 13 year old. This is a real adventure and does require some thinking and problem solving — but only for kids.
Authors note to players— This one was fun to write. The vocabulary and characters were designed for younger players and lots of things happen when they give the computer com- mands. This one teaches logical thought, map- Ping skills, and creativity while keeping their interest.
DERELICT by Rodger Olsen and Bob Ander- son — For Wealth and Glory, you have to ran- sack a thousand year old space ship. You'll have to learn to speak their language and operate the machinery they left behind. The hardest problem of all is to live through it.
Authors note to players — This adventure is the new winner in the “Toughest Adventure at Aardvark Sweepstakes”. Our most difficult problem in writing the adventure was to keep it logical and realistic. There are no irrational traps and sudden senseless deaths in Derelict. This ship was designed to be perfectly safe for its’ builders. It just happens to be deadly to alien invaders like you.
W7
NUCLEAR SUB by Bob Retelle — You start at the bottom of the ocean in a wrecked Nu- clear Sub. There is literally no way to go but up. Save the ship, raise her, or get out of her before she blows or start WWIII.
Editors note to players— This was actually plotted by Rodger Olsen, Bob Retelle, and someone you don't know — Three of the nas- tiest minds in adventure writing. It is devious, wicked, and kills you often. The TRS-80 Color version has nice sound and special effects.
EARTHQUAKE by Bob Anderson and Rodger Olsen — A second kids adventure. You are trapped in a shopping center during an earth- quake. There is a way out, but you need help. To save yourself, you have to be a hero and save others first.
Authors note to players — This one feels good. Not only is it designed for the younger set (see note on Haunted House), but it also plays nicely. Instead of killing, you have to save lives to win this one. The player must help others first if he/she is to survive — | like that.
Please specify system on all orders
PYRAMID by Rodger Olsen — This is one of our toughest Adventures. Average time through the Pyramid is 50 to 70 hours. The old boys who built this Pyramid did not mean for it to be ransacked by people like you. Authors note to players — This is a very entertaining and very tough adventure. | left clues everywhere but came up with some in- genous problems. This one has captivated people so much that | get calls daily from as far away as New Zealand and France from bleary eyed people who are stuck in the Pyramid and desperate for more clues.
QUEST by Bob Retelle and Rodger Olsen — THIS AS DIFFERENT FROM: ALL THE OTHER GAMES OF ADVENTURE!!!! It is played on a computer generated map of Alesia. You lead a small band of adventurers on a Mission to conquer the Citadel! of Moor- lock. You have to build an army and then arm and feed them by combat, bargaining, explora- tion of ruins and temples, and outright ban- ditry. The game takes 2 to 5 hours to play and is different each time. The TRS-80 Color version has nice visual effects and sound. Not available on OSI. This is the most popular game we have ever published.
MARS by Rodger Olsen — Your ship crashed on the Red Planet and you have to get home. You will have to explore a Martian city, repair your ship and deal with possibly hostile aliens to get home again.
Authors note to players — This is highly recommended as a first adventure. It is in no way simple—playing time normally runs from 30 to 50 hours — but it is constructed ina more “open” manner to let you try out ad- venturing and get used to the game before you hit the really tough problems.
ADVENTURE WRITING/DEATHSHIP by Rodger Olsen — This is a data sheet showing how we do it. It is about 14 pages of detailed instructions how to write your own adven- tures. It contains the entire text of Deathship. Data sheet - $3.95. NOTE: Owners of OSI, TRS-80, TRS-80 Color, and Vic 20 computers can also get Deathship on tape for an addi- tional $5.00.
PRICE AND AVAILABILITY:
All adventures are $14.95 on tape except Earthquake and Haunted House which are $9.95. Disk versions are available on OSI and TRS-80 Color for $2.00 additional.
ALSO FROM AARDVARK — This is only a partial list of what we carry. We have a lot of other games (particularly for the TRS-80 Color and OSI), business programs, blank tapes and disks and hardware. Send $1.00 for our complete catalog.
A
=
AARDVARK - 80
2352 S. Commerce, Walled Lake, MI 48088
(313) 669-3110
Phone Orders Accepted 8:00 a.m. to 4:00 p.m. EST. Mon.-Fri.
TRS-80 COLOR
SINCLAIR
OSI VIC-20
8K ROM 1K RAM
Checkbook Management
George J. Repicky
A computer with its TV display, makes the task of updating and balancing a checkbook simpler than using a four-function calculator. The display enables the user to double-check entries and so helps eliminate mistakes. In addition, if mistakes are made, they are easily corrected. Below are two programs which I developed for these purposes. Each requires the 8K ROM, and each fits into IK RAM.
Program 1 If you are like most people, you make a number of transactions—write checks, make deposits, etc.—with your checkbook before you update the balance. The first of the two programs is designed to update your checkbook balance. To use the program, enter it into the computér, then RUN. The program first asks you to INPUT BALANCE At this point you enter your last computed balance. Then the program asks you to INPUT CHECK CHARGE In response, you enter the per check charge of your account. (If your checking account has no check charge, you can delete lines 220 and 230, and the “-C” of line 380, from the pro- gram.) The program then clears the screen, and displays: INPUT CODE, THEN INPUT AMT. ITEM DEBIT CREDIT BALANCE At this point you enter each transaction in your checkbook in two steps. First, for each transaction you enter a code: 0 if the transac- tion was a debit (a monthly service charge, for example); 1 if the transaction was a credit (a deposit, perhaps); or the check number if the transaction was a check. Second, you enter ‘the amount of the transaction. After each complete entry the computer displays the na- ture of the transaction in the first column, 49 Roosevelt
George J. Repicky, Ave.,
Schenectady, NY 12304.
January/February 1983
A, |
yal Œ
using DEB if the transaction was a debit, CRED if the transaction was a credit, or the check number if the transaction was a check; the amount of the transaction in the second (if the transaction was a debit or check) or third (if the transaction was a credit) column; and the resulting balance in the fourth column. For an example of how this works, suppose that your most recent balance was $110.10 and that your account charges you $0.25 per check. Upon entering these figures, the dis- play would show INPUT CODE, THEN INPUT AMT. ITEM DEBIT CREDIT BALANCE 110.1
Now suppose your next four transactions were
check 215 for $50.; a $3.00 monthly service charge; a $240 deposit; and check 216 for $245.20. To enter these you would enter 215, then 50; 0 (for a debit), then 3; 1 (for a credit),
then 240; and 216, then $245.20. The display
would now show:
INPUT CODE, THEN INPUT AMT. ITEM DEBIT CREDIT BALANCE
110.1 215 50 59.85 DEB 3 56.85 CRED 240 296.85 216 245.20 51.4
This display scrolls up with each entry, so you may continue until you have entered all transactions. The screen can hold eleven transactions at one time, so be sure you check your work from time to time. If you should detect an error, it can be offset using the 0 or 1 code, and then the amount, to adjust the bal- ance appropriately.
Program 2 The second program is used to check your checkbook balance against your bank state- ment. When you run the program, it first asks you to INPUT CHECK CHARGE In response, you enter your account per-check
charge. If your account does not have a check charge, you can delete lines 80, 90, and 100, and the ‘“‘-A” of line 190. Alternatively, if you will use the program for accounts with the same check charge, you can make line 80:
80A = (check charge) and delete lines 90 and 100.
The program then asks you to
INPUT BANK BALANCE In response, you enter your balance as per your bank statement.
The program then asks you to
INPUT OUTSTANDING CHECKS
IF FINISHED, INPUT 0 You now enter, one at a time, the amount of
-each check which was not returned with the
statement. As you enter the amount of each check, it is displayed on the screen. When you have entered all such checks, enter 0.
This sends the program on to the next step which asks you to
INPUT UNRETURNED DEPOSITS
IF FINISHED INPUT 0 Now you enter, one at a time, the amount of each deposit which you made since the state- ment was compiled by the bank, that is, the amount of each deposit which does not appear on the statement. As you enter the amount of each such deposit, its value will appear on the screen. When you are finished, enter 0. The computer will now compute your correct checkbook balance (assuming the bank has not made a mistake!) and display CHECKBOOK BALANCE SHOULD BE: (balance)
Memory Saving
In entering the program, you should use keywords and tokens wherever possible in the PRINT statements. This saves considerable memory and is necessary if the program is to run in IK RAM.
To use this procedure (from Richard McDaniel, SYNC 1:5) enter the line number, then enter the last keyword in the statement. Then back up the cursor, using the left arrow
27
(shift 5) until it is before the keyword. Now enter the next-to-last keyword. Repeat this procedure until all keywords are entered. You can enter intermediate text as you work, or after all keywords are entered.
An example may help here. Consider line 260 from the first program: 260 PRINT “INPUT CODE, THEN INPUT AMT.”
To enter this line, first type: 260 INPUT AMT.” using the keyword INPUT (on the “I” key).
Program 1. Checkbook Update.
INPUT BALANCE” R INFUF CHECK CHARGE”
INPUT CODE , THEN I
a GOsuUB zoga “ITEM” > TAR Si” “DEES F 7? i TAB 13, EREDE > TAB 21; “BALANCE 2@ GQSUB 2eee 235 PRINT TRB 21;8 eee
INPUT Z 350 IF Y=1 THEN, COTO i1@8@ 350 LET B=B-Z 370 IF Y2t THEN PRINT Y; 380 IF Y=@ THEN PRINT “DEB"; 390 IF Y>1 THEN LET B=8-C 4@0@ PRINT TAS 5; Z; TAB 21; BR 41¢e og he 318
B=B+z 1010 PRINT “CRED;
ig2e@ GOTO 312 2820 SCROLL 2010 PRINT 2220 SCROLL 22308 RETURN
FRB 12; Z FRB =
Line notes:
210: Enters the previous checkbook bal- ance.
230: Enters the per check charge.
280: Sets the headings of the transaction listing.
300: Prints previous balance in col. 4.
320: Enters code -0, 1, or check no.
340: Enters amount of transaction.
350: Branch if transaction was a credit.
360: Decreases balance for debits.
370: Prints check no. if transaction was a check.
380: Prints DEB if transaction was a non- check debit.
390: Decreases balance by per check charge if transaction was check.
400: Prints amt. of trans. and resulting bal- ance.
410: Returns for next transaction.
1000: Branch from 350; increases bal. for credit.
1010: Prints amt. of trans. and resulting balance.
1020: Returns for next transaction.
2000: Scroll and space subroutine; used after each line of display is printed. 2030 RETURN
Ca
CYBORCGWARS
NOT ANOTHER TOY
BUT A COMPLEX SIMULATION OF FOUR MILITARY- INDUSTRIAL ECONOMIES LOCKED IN A DEADLY STRUGGLE FOR SURVIVAL. ONE TO FOUR PLAYERS COMPETE WITH EACH OTHER AND/OR
THE COMPUTER.
BALANCE OF POWER DEPENDS UPON
SKILL IN DEVELOPING RESOURCES, USE OF ESPIONAGE, EXPLOITATION OF ALLIANCES, AND UTILIZATION OF MILITARY
POTENTIAL.
ED sa
REQUIRES ZX81 WITH 8K ROM AND 16K RAM.
eae f
ORDER FORM FOR CYBORG
Send $14 (plus $1 for shipping) to:
STRATAGEM CYBERNETICS, INC.,
286 Corbin Place, 2E, Brooklyn, New York 11235. |
i _ Se ees Sa hee dy gee ee
is e A mm aoe ù (| nig batik aie
: MMW hes wos en Se
28
Then back up using the left arrow (shift 5) until the cursor is before the word INPUT. Now enter THEN, using the token (shift 3). The display will read:
260 THEN INPUT AMT.”
Back up again until the cursor is before THEN, and enter CODE, using the token. To do this you must first obtain the function cur- sor (shift NEWLINE or shift ENTER), then enter the token CODE, (on the “I” key). The display will now read:
260 CODE THEN INPUT AMT.”
The cursor is now after the word CODE, so now is a good time to enter the comma. Next, back up again until the cursor is before the word CODE, and enter INPUT, again using the keyword (on the I key). The display now reads:
- 260 INPUT CODE, THEN INPUT AMT.”
Finally, back up again until the cursor is before the word INPUT, and enter PRINT, using the keyword (on the “P” key). At this
~ time also enter the leading quotation mark.
The display will now show the complete line, ready to enter:
260 PRINT “INPUT CODE, THEN INPUT AMT.”
The whole thing sounds a bit complicated when you read it, but it is really quite simple once you get the hang of it. The memory sav- ing is substantial; 17 bytes for this one state- ment alone. a”
Program 2. Checkbook Statement Comparison.
70 SOSUB 2009 5 = INPUT CHECK CHARGE”
: 2000 i 110 PRINT ” INPUT BANK BALANCE”
R 1230 GOSUB 2000 " INPUT OUTSTANDING C
5” 150 GOSUB 200g ise cuaus sees 17 18@ IF C=@ THEN GOTQ 230 190 LET &=8-C-A
200 PRINT
Cc 210 GOSUB 2008 220 GOTO 170 230 GOSUB 2000 24@ PRINT “ INPUT UNRETURNED DE POS
ITS“ 250 GOSUB 2000 260 GOSUB 4008
NPUT D 2809 IF D=0 THEN GOTO 340 B=B+D
330 GOSUEB 2008 PRINT “BALANCE SHOULD BE: “
Line notes:
90: Inputs per check charge
120: Inputs bank balance as per statement.
170-230: Form a loop which inputs out- standing checks and adjusts the bank state- ment balance for them and associated per check charges.
240-330: Adjust the bank statement bal- ance for any deposits made after the statement was prepared.
340: Prints checkbook balance.
2000: Subroutine used to scroll and space printout.
4000: Subroutine to print statement.
SYNC Magazine
COBRA RS232C INTERFACE.
At last, a high quality RS232C interface for the ZX81 (TIMEX 1000) to connect you to any RS232C printer. Look at these features:
Variable baud rate by software control. Upper and lower case printout. Up to 120 characters per line with soft- ware control. Handshake facility. Comprehensive man-
COBRA CENTRONICS INTERFACE
The same high quality as the RS232C except for the output being via a 24 way socket. Both interfaces have the same features. AT AN INTRODUCTORY PRICE OF ONLY $50.00 + $6.00 shipping. We also make every type of lead and plugs for the above interfaces,
typical prices. 25 way “D” connector with leads for above 232 $15.00 4 way DIN plug and leads for the above 232 $15.00
AVAILABLE JANUARY.
Another first from COBRA. A truly intelligent RS232C interface. With this interface 2 ZX(TIMEX) computers can communicate with each other along any usable medium ie telephone, radio etc. Such information as listings, data strings and programs can be passed be- tween any number of computers very simply. The price is also unbelievable. For more details tick box below.
Please rush me your (tick required)
RS232C interface atonly .............-..- $50.00 L] Centronics interface atonly ..............- $50.00 L] Power supply buffer atonly ............... $22.00 L] Leads for the interface ................... $15.00 L] The free brochure from COBRA” ] More details of your 232 MODEM* LJ
gO PL aLak
Don't forget to add shipping to your order *Please send a stamped, self-addressed envelope for brochure.
ual with every unit. Fits on the back like a RAM pack. Uses the ZX(TIMEX) power supply. Output via 2 small
jack sockets.
AT AN INTRODUCTORY PRICE OF ONLY $50.00 + $6.00 shipping.
COBRA POWER SUPPLY BUFFER.
Ever had hours of programming work lost in a moment owing to fluctuations in power or accidental switching of the wrong mains plug?
The Cobra power supply buffer prevents such occur- rences affecting you. It is fitted between the Sinclair (Timex) power supply and the computer. During loss of power to the computer the buffer will continue to power the computer with a 9 volts supply for up to 30 minutes or more. It also has mains filtering circuitry to prevent spikes getting through to the computer. The unit will recharge itself during normal power on conditions. When a mains loss situation occurs a red LED will warn the user of loss of electricity supply.
THE PRICE IS ONLY $22.00 + $7.00 shipping.
Cobra Technology Limited, 378 Caledonian Road, Islington, London N1 1DY U.K.
8K ROM 16K RAM (1K RAM)
A Loan Amortization Program
Most manufacturers of large computers (mainframes and minicomputers) offer a set of “utility” programs either as a freebie with purchase of their computer, or as a low cost option. One program that inevitably shows up in those packages is a loan amortization pro- gram for calculating monthly payments and an amortization schedule on consumer loans or home mortgages. The usefulness of such in- formation is obvious. The payment tells the user how much of a monthly commitment he is making, and the amortization schedule how much of the payment is being applied to inter- est and how much to reduce the balance on the loan.
Most loan amortization programs ask the user to specify three out of the following four items of information: the amount of the loan (the principle), the annual interest rate, the duration of the loan, and the amount of each payment. The program then calculates the missing variable and prints out the amortiza- tion schedule. Usually that is printed out in a columnar format with the payment number in one column and the following items in the other columns: the payment amount, the amount of the payment that went for interest, the amount that went towards repayment of the principle, and the remaining balance on the principle.
Since I have a ZX80 (8K ROM) with only 1K of user memory, I knew that I would not be able to deal with a lot of options, nor would I be able to do an entire amortization schedule. I decided that the operator would supply the loan amount, the interest rate, and the number of monthly payments. The program would calculate only the payment necessary to amor- tize the loan. If I had room left over after the basic program was coded, I would see what could be done about an amortization sched- ule.
I first needed to find a formula for calculat- ing the equal loan payments needed to amor- tize a loan. Such a formula can be found in
Gerald F. Hoag, 5112 16th Ave. So., Minneapolis, MN 55417.
30
Gerald F. Hoag
virtually any consumer or practical mathemat- ics textbook at your local library. That for- mula is seen cn Figure 1.
rate indicates how much interest applies to each monthly payment. Calculating the monthly payment, how-
Figure 1. Loan Repayment Formula.
periodic int. rate
payment = loan amount X l-
Before I started programming, I verified the formula by calculating a payment using a calculator and comparing the result with the payment amount listed in a loan payment book.
With a formula in hand, it was easy to come up with the statements needed to ask for input from the operator and to calculate the periodic interest rate. Those steps are handled in lines 10 through 70 of the program (shown in Figure 2). As shown, the information input by the operator is printed out as soon as it is entered to form a record of the loan parameters and as a convenience to the operator.
The periodic interest rate is found by divid- ing the annual interest rate by the number of payment periods in a year (the program as- sumes 12 payments per year). That interest
— Figure 2. Loan Amortization Program (1K). __ 18 PRINT “AMOUNT OF LOAN?" INPUT AMT ANT “ANNUAL INTEREST RATE 4@ INPUT RAT RAT “LOAN DURATION 6@ INPUT MO PRINT MO 7@ LET INT=(RATi9@}3 712 6@ LET DIVISOR=12+INT
9@ LET DIVISOR=DIVISORe2MNO 188 LET DIVISOR=i-(ti-sbDIVISOR)
{MONTH
118 LET P=AMT # (INT sDIVISOR)
120 PRINT “PAYNMENT=";P
138 PRINT
140 PRINT “NO. INT PAID REDUCTEI ON BALANCE”
145 LET =
I=1 158 LET INTPAID=AMT INT 150 LET RED=P-INTPAID 170 LET AMT =AMT -RED 198 Opa zt “|; ENTPAID; Y“
a >
as : RE
(1 + periodic int. rate
1 ) periods
ever, was a trickier problem. When I first wrote the program, I tried entering the pay- ment calculation in one long program state- ment in algebraic format:
LET PAYMENT =P * I/(1-(1/(1+1)**MO))
Besides the obvious difficulty in trying to get a valid statement with so many parentheses, I. also was getting the wrong answers because of the priority in which the ZX80/81 handles cal- culations (first exponentiation, then multipli- cation and division, and finally addition and subtraction). This produces wrong answers even though the formula is algebraically cor- rect.
I decided to simplify the calculations, and also to get them in the proper sequence for calculation by first calculating the divisor of the formula as shown in the series of steps in lines 80, 90, and 100. Then, after I had the divisor, I could use a more simplified formula to calculate the monthly payment, as shown in line 110.
Lines 120, 130, and 140 print out the calcu- lated monthly payment and then the headings for an amortization schedule. With a little ex- perimentation, I discovered that I would have enough memory left over to show the amorti- zation of one payment. Line 145, therefore, sets the payment number equal to 1. That is followed by calculation of the interest paid in the period, the reduction to the principle, and the balance remaining on the principle. For those with more memory, line 145 would be the appropriate place to start a FOR/NEXT
SYNC Magazine
loop to calculate a complete schedule. Just let the loop count equal the number of monthly payments (“MO”) and execute lines 150, 160,
Figure 3. Sample Run (1K).
AMOUNT OF LOAN? ANNUAL INTEREST RATE?
LOAN DURATION (MONTHS) ?
a PAYMENT =1133.36112
NO. INT PAID REDUCTION BALANCE 2 53.333999 690.927791 3939.9722
IMPROVED HEAT SINK for ZX81 & TS1000 eliminates system crashes caused by veneer $7.95
ASE for
check/money order or complete details to: BASCO, 289 Baxter La, Milford CT 06460
ATTO-SOFT
PRESENTS
ZX-MAN
ZX-MAN. Turn your ZX8!I or TIMEX SINCLAIR 1000 into an arcade type game computer with ZX-MAN. 100% machine code makes this fast acting program as _ much fun as being at the arcades. With the joystick option you can have the real feel of game playing never before available for your ZX8İ or TIMEX SINCLAIR 1000. 16K required.................. $14.95
JOYSTICK. With ATTO-SOFT’s JOY- STICK your ZX8I or TIMEX 1000 can be turned into an arcade type computer allow- ing fast control over ZX-MAWN and other type software. Requiring only six simple solder connections inside your computer. Also included is software to develop your OWA DFORTAMS 0.5 siio 35's oes ewes $14.95
(Please add $1.50 Postage and Handling. COD's add $2.00.) Send check or money order to:
ATTO-SOFT 832 E. Third Street, Galesburg, Illinois 61401 (309) 343-4114 AMERICAN EXPRESS ACCEPTED
January/February 1983
170, and 190 on each pass through the loop. Specifically, the NEXT statement in the loop would go on a line after line 190.
Figure 4. Sample Run (over 1K).
3939.97
4 2 2 4 5 & 7 B g 4 ee a
Beet. 42
Need a good game to play or pro- gram? Circle Chess board with in- structions $5.00. Send your record- ed Circle Chess games and pro- re for publication in Circle
hess Journal, Box 63, Des Plaines, IL 60017.
THE VIDEO REVERSER
AT LAST REVERSE VIDEO FOR THE ZX81 AND TIMEX 1000
White letters on a black
back ground for connec-
tions; fits inside case; _can be switch selectable.
send check or money order for $15 to:
SIGHT & SOUND ELECTRONICS 1120 Bailey Hill Rd. #10 Eugene Oregon 97402
phone (503) 485-6274
Figure 5. ____ Additions to Figure 2 for over 1K RAM. ___
3S SCROLL 14S FOR I=1 TO 48 OLL
75) 7100. TAB 23; INT TAMNT#2@@4+.5) 7
að 200 NEXF I
Figure 3 shows a sample run of the program with the operator entering the amount of the loan, the annual interest rate, and the loan duration. The program echoes each of those entries by printing them back out. Following entry of the loan duration, the program calcu- lates and prints out the amount of the monthly payment and then the one month amortiza- tion. As you can see, a good project for those with more memory would be a routine to round off the results to two decimal places!
Fa
“TIMEX/ SINCLAIR SOFTWARE” ‘“‘ZX-81 and TS1000 Software cheap! Catalog plus two special programs for $1.00 and self addressed stamped envelope.
FLORIDA CREATIONS Dept. SC4 P.O. Box 16422, Jacksonville, FL, 32245”
ZOR KHAN
is THE NAME to remember for your...
TIMEX
AND
SINCLAIR
SOFTWARE @
ENTERTAINMENT EDUCATIONAL HOME MANAGEMENT
PLEASE SEND me your latest software catalogue. | enclose $100 P&H that will be credited on my first order.
i ADDRESS
| Í i a E E a |
| —____—_—_——_—_,>
sy ZOR KHAN yx |
BOX 31569 -
l AURORA, COLO. 80041
31
8K ROM 2K RAM
Keeping Time in the
Home Office Chuck Dawson
Since the Sinclair computers have an inter- nal timing feature, they can be used to make a clock display which will give you the time. Two basic programs are given below to do just that.
A Digital Clock
The first program provides you with a digi- tal clock. The display will show the time in digits about three inches high and extending all across the screen.
Lines 130 and 140 control the timing. Line 130 counts the number of frames sent to the television since the last PAUSE and then holds until a specified number is reached. The PAUSE in the next line is used to fine tune things and also reset the frame counter for the next minute’s cycle.
If your computer is capable of SLOW mode, you will see a display which stays rock steady until a minute passes and the last digit slowly changes itself into the next appropriate number. In the SLOW mode it does not always take exactly the same amount of time to up- date the display. I have noticed that, if the memory is nearly full, the computer seems to take longer to compute.
In the FAST mode, this trick will not work since no frames are sent during the compute cycle. So change line 130 to a PAUSE 3288 and line 140 to POKE 16437,255. The large numbers themselves are generated by PEEK- ing into the ROM’s own character generating routine and enlarging it eight times. For faster updating, only the middle six lines are used. There are blank lines above and below each character so there is no reason to waste time reproducing these.
After you have typed in the program, use GOTO 700 to SAVE. The program will then run itself.
Chuck Dawson, 6520 Victoria, Fort Worth, TX 76118.
32
10
Listing 1. Digital Clock.
REM “DIGITAL CLOCK“ TO SAVE
GOTO 7?
iS PR
23
INT “ INPUT TIME“ INPUT TIME
25 GLS
3a. E-INT
ET M=INT (TIME .18@) t6@+TIM iT IME + IGG} 100
35 GOTO 148
(a)
138 308
LET T=0 LET D=INT AOTER a
CET = {INT {(M760)) -109D GOSUB 500
CCINT (M760}} 718)?
(6@e(M7EG-INT (M/ -INT (M710) £20 IF PEEK 16437¢>245 THEN GOT PAUSE 1248 LET M=M+i IF M=144@ THEN LET M=9 GOTO 49 =79@5+D2&
ET EGN
IF X<225 THEN GOTO 566 LET €=12&
LET X=X -128 LET X=x*s2 PRINT CHRE D: NEXT L
PRINT TAE T;
IF M=780 THEN LET M=62 IF F=@ AND D-a THEN LET N=7
Program 1. Digital Clock.
TO S 1
The Face Clock
The second program will give a display with the traditional face clock. The face is drawn only once and then the hands are PLOTed in and UNPLOTed when no longer needed. This program is suggested by an
exercise in the chapter on time and motion in the ZX81 manual.
Listing 2. Hand Clock. “FACE CLOCK" TO SAVE GO INPUT TINE
1@ REM ae
2 PRINT “ i4 INPUT T 16 LET H=2seINT (T7186)
16 LET T=T-1@@z2INT (tt /i8@) 20 IF T>15 THEN LET H=ħ+ł 22 IF 345 THEN LET H=H+1
O=1 TO 12 PRINT AT i18-162C05
42 {(DsG2P IE) 713410#5IN (D/s6#PI3;0 50 NEXT D
SLOW 65 POKE 16437 ,258 78 get 150
GOSUB 18380 120 LET T=T+i 130 IF T=60 THEN LET
lao IF Tote OR T=46 THEN GOTO 2 Sa 150 LET P=2 16@ LET L=T/S@2PI 170 LET X=27+1825IN Ł 180 LET Y=22+264C0S5 L 198 LET C=x 200 LET D=Y 220 GOSUE Sie. 230 PEEK 16457>241 THEN GOTO 238 235 PAUSE 215 248 GOTO 80 250 LET H=H+2 250 GOTO 24 310 LET P=i 320 LET a=37 330 LET 6=22 340 LET G=H7122PI 35@ LET C=274222S5IN G 360 LET D=22+12C0S 6 370 GOSUB 1000 380 RETURN à S00 SAVE “FACE CLOCK" S18 RUN 1000 R=27F 1@@2 LET 5=22 1008 LET U=C-A 1010 LET U=D-65 1020 LET O=SGN U 1938 LET L=SGN U 1040 LET Z=SGN U 1050 LET 9= 10860 LET M=ABS U 1070 LET N=ABS U 1080 IF M>N THEN GOTO 1138 1898 LET Z=0 1100 LET 9=SGN U 1110 LET M=ABS U 1129 LET N=ABS U 1140 LET S=INT (M2) 1150 FOR I=@ TO M 1160 IF P=i THEN PLOT A,B 1165 IF P=@ THEN UNPLOT A,B 1170 LET S=S+ 438@ IF S:M THEN GOTO 1230 1199 LET S=S- 1200 LET A=A+6 1210 B=B6+L
SYNC Magazine
“Touch-A- Matic ”, Power At Your Finger Tips:
KOPAK’S TOUCH-A-MATIC'™ gives you the power to type more accurately and much faster. It requires no wires, no soldering. Comes with complete instructions. It’s as easy as removing adhesive backing and pressing into position. Positioning is easy. Once in position, you are ready for touch- typing with ease.
Our unique vinyl-key-hold creation will guide your fingers to the correct keys. Finally, touch-typing now possible with your Sinclair* or Micro-Ace*.
This remarkable product, as well as other KOPAK items, are now available. Call now to order through MC/Visa or send check/M.O. to Kopak Creations,
Inc. TM Trademark of KOPAK Creations, Inc. KOPAK CREATIONS, INC. Sinclair* is a trademark of Sinclair*® Research LTD. (212) 757-8698 MicroAce®* is a trademark of MicroAce* Master Charge & Visa Accepted
$1.50 Handling Charge
Dept. SY3 448 West 55th Street, New York, NY 10019 (212) 757-8698
S/INWARE provides high-quality machine-code programs for the TS1000 or ZX81.
HOT Z
HOT Z is the machine-programming editor, debugger and disassembler that takes the mystery out of assembly lan- guage. Over 40 cursor-driven com- mands give you an interactive system for entering, revising and relocating code. Full-screen listings with your labels let you understand other pro- grams and capture the power of ROM routines for your own programs.
SQ said of HOT Z: “Easily the best machine language debugging package / have ever seen for the ZX81. . . If you program in machine language and need the best tool for the job, buy HOT Z.”
HOT Z is just $19.95 + $2.00 pp on cassette in different versions for 16K or 32K+. Please specify. NOW ON EPROM (four 2716’s) mapped to the 8-16K block for the Hunter or similar board, HOT Z-E is $40.
Z EXTRA
Z EXTRA is a display creator/con- troller that makes you a master of ZX graphics and displays. No program- ming is required to create, save, print or display multiple screens of text and graphics. Z EXTRA features a full- screen editor, blinking cursors, re- peating keys, four write directions, eight plot directions, 4x4 and 8x8 char- acter sizes, and much more.
Z EXTRA’s displays provide horizontal or vertical scrolls of multiple screens against a background screen, or timed page flips for simple animation. Screens can be transferred to BASIC strings to save hours of fussy progamming.
Z EXTRA requries a ZX81 or TS1000 with at least 16K of RAM and is espec- ially useful with 64K. Just $19.95 + $2.00 pp on cassette.
SINWARE BOX 323, DIXON, NM 87527
34
If you have only 2K RAM, you will find that this program fills up almost all available space. If you have a 16K module, you can add the second hand and other decorative touches.
After you have typed in the program, use GOTO 500 to SAVE. The program will then run itself.
Setting Your Clock
In both programs, after the program is run- ning, you are asked to input the time. Do not use a colon; just enter the figures: Not 3:45 but 345.
Program 2. Face Clock.
A Calendar
From time to time we want to see how a certain month falls in the calendar or what day of the week a certain date is on. Most calen- dars show only one year on either side of the calendar year. Thus dates beyond the printed calendar have to be calculated laboriously by hand with the danger that we may have over- looked a day in an irregular month. This pro- gram provides the solution to the problem.
With this program you can enter any month and any year, and the computer will show you the calendar for that month. Well, not exactly any year. It has to be between September 14, 1752, and February 28, 2200. Nevertheless that range covers most dates of interest.
After you have typed in the program, use GOTO 300 to SAVE. The program will then run itself. The prompts will call for inputting the month and year. Type in at least the first three letters of the month and hit ENTER; then type in the year and hit ENTER. The com- puter will then display the calendar for that month. You can use either FAST or SLOW mode but remember that it takes much longer to produce the calendar in the SLOW mode.
To test whether the program is working right, tty DECEMBER 1941. We remember that the 7th was on a Sunday. Now try some other dates. Try your birth month and year. I use this program to plan business trips and vacations for the coming year even before I start getting those free calendars in the mail in December.
This is a good program for showing off your computer to your friends. Try it at your next
party.
Program 3. Calendar.
JANUARY 1933
SUN MON TUE VED THU FRI SAT
6 13
FER agaa
TUE WED THU FRI 4 TI 13 25
FEB 399999
MON TUE WED THU FRI 1 = 3 4 5 8 3 109 12 12 15 16 iL? L& 19
24 25 26
Listing 3. Calendar. = : S REM “CALENDAR. FO ARIE SeTo saa
kae
10 LET As="CDOUANFESMARAPRARY UU
NUL RAUGSEPOCTNOQUDECSUN MON TUE W Ee ae FRI SAT
INPUT MONTH’
25 FOR M=1 FO 12 3S@ IF BSili FO Bi =AS (34M FO 33M
S@ INFU SS F Y11752 THEN GoTe se 6a Lo ;
ee tè s zg . ve Pt e 120 IF 3<2@ THEN PRINT " "; 130 I NO 33-PEEK 16441-7 x4 THEN sTar
@ IF PEERK 126441=5 THEN PRINT
i50 NEXT I
200 LEF xX=8
210 IF M=1 OR M=2 THEN LEF X=1 220 LET L=¥-X
230 LET X=H+x#12e
240 LEF P=INT (L71002?
250 LET 2Z=INT (2134 (%32) 7S5} + INT (SELA? AINT (Prd) -P
260 ae OE CERA
URN 3@@ SAVE “CALENDAR” 310 RUN
SYNC Magazine
all LOCA MARP à JLA TOR HARF KEASUN di IVV ANUJU ® OMMANDO è BIORHYTHMS è GRAPHICS SIX PACK è 2K GAMES PACK è BIORHYT AZOGS è METEORITES è RED ALERT è ALIEN INVASION è GRAPHICS KITS è SPAC ROGRAMMERS TOOLKIT è ROAD TO RICHES è HANGMAN è RED ALERT è METEO! ACE RAID/TS DESTROYER e@ FINANCIAL MANAGER AND RECORD KEEPER è MAZO E STI
= SOFTSYNC, INC.:
ond RAID/TS DESTROYER @ FINANCIAL MANAGER AND RECORD KEEPER è ice E STOCK MARKET CALCULATOR è SHARK’S TREASURE è SPACE COMMANDO e /
AZOGS ©
ocra THE WORLDS BEST PROGRAMMERS «0
ACE RAID/TS DESTROYER @ FINANCIAL MANAGER AND RECORD KEEPER è MAZOG E STOCK MARKET CALCULATOR è SHARK’S TREASURE è SPACE COMMANDO è A DMMANDO © BIORHYTHMS @ GRAPHICS SIX PACK è 2K GAMES PACK è BIORHYTH AZOGS @ METEORITES è RED ALERT è ALIEN INVASION è GRAPHICS KITS è SPACE 20GRAMMERS TOOLKIT è ROAD TO RICHES è HANGMAN è RED.ALERT è METEOR! ACE RAID/TS DESTROYER @ FINANCIAL MANAGER AND RECORD KEEPER è MAZC E STOCK MARKET CALCULATOR è SHARK’S TREASURE è SPACE COMMANDO e 4 DMMANDO e BIORHYTHMS è GRAPHICS SIX PACK è 2K GAMES PACK è BIORHYT AZOGS è METEORITES @ RED ALERT è ALIEN INVASION è GRAPHICS KITS è SPACI 20GRAMMERS TOOLKIT è ROAD TO RICHES è HANGMAN œ RED ALERT è METEOR ACE RAID/TS DESTROYER @ FINANCIAL MANAGER AND RECORD KEEPER è MAZO E STOCK MARKET CALCULATOR @ SHARK’S TREASURE è SPACE COMMANDO e 4 DMMANDO © BIORHYTHMS è GRAPHICS SIX PACK è 2K GAMES PACK è BIORHYT AZOGS © METEORITES è RED ALERT è ALIEN INVASION è GRAPHICS KITS è SPACI 20GRAMMERS TOOLKIT è ROAD TO RICHES è HANGMAN è RED ALERT è METEOR ACE RAID/TS DESTROYER @ FINANCIAL MANAGER AND RECORD KEEPER è MAZO E STOCK MARKET CALCULATOR è SHARK’S TREASURE @ SPACE COMMANDO e A )MMANDO © BIORHYTHMS @ GRAPHICS SIX PACK e 2K GAMES PACK è BIORHYTH
⁄ JOIN THE FAMILY. CALL OR WRITE FOR A FREE ` . TS1 000/ZX81 CATALOG AND PROGRAM LISTING AND © a stock OR DETAILS ON PROGRAM DISTRIBUTION. npo « 4
YMMANDO @ BIORHYTHMS è GRAPHICS SIX PACK è 2K GAMES PACK è BIORHYTH 170114 E 34th St. New York, New York, 10016 212-685-2080 ^C! OGRAMMERS TOOLKIT è ROAD TO RICHES è HANGMAN è RED ALERT è METEOF ACE RAID/TS DESTROYER @ FINANCIAL MANAGER AND RECORD KEEPER è MAZOC E STOCK MARKET CALCULATOR è SHARK’S TREASURE è SPACE COMMANDO e Àl )MMANDO ® BIORHYTHMS @ GRAPHICS SIX PACK @ 2K GAMES PACK J BIORHYTHN
lt, tit, mh Bie B Pe PR EP EES a corm A <i
8K ROM (4K ROM) 1K RAM
Calculating the Days
Ronald Paludan
Knowing the number of days between two dates is frequently necessary for cal- culating interest, apportioning expend- itures, or calculating average use of items. We are also interested in the more trivia type questions such as how many days before an important date, how many days between certain historical dates, and even how many days we have lived.
This program will enable you to deter- mine the number of days between dates either for serious use or just curiosity. The program in Listing 1 is for the 8K ROM machine with 1K RAM. A 4K ROM adaptation is included in Listing 2.
Operating Instructions
1) Type in the program in Listing 1. Hit RUN and ENTER.
2) The prompts will ask the user to ENTER FIRST DATE. Do so in this order: Type in the month as a number from 1 to 12 and hit ENTER. Type in the day of the month and ENTER. Finally, type in the year giving all four digits and ENTER.
3) Repeat this process for the second date. The first date must be earlier than the second. On the 4K ROM the two dates cannot be more than 88 years apart, but a method is supplied for dealing with this problem.
- 4) The answer will then be given on the screen.
5) To repeat, hit ENTER. To quit, hit any number or letter and then ENTER.
Error Checking
The input routine does not allow the user to enter more than 12 for a month or 31 for a day. The user with enough mem- ory may want to add a more detailed error checking routine that rejects non- existent dates, e.g., June 31.
Modifications for the 4K ROM
Listing 2 gives the lines which must be altered to allow the program to operate properly on the 4K ROM (ZX80 or MicroAce).
4K ROM Problem: Dates more than 88 Days apart
The integer Basic of the 4K ROM ZX80 will not handle numbers greater than 32767. For this reason, the program will reject the second year if it is more than 88 years after the first. However, there is a
Ronald Paludan, 3730 N. Oracle, 41, Tucson, AZ 85705.
36
method for finding the number of days between two dates more than 88 years apart. This method requires the use of one or more mid-date(s) which must be less than 89 years from the date next to it in the series. The number of days between the first date and the mid-date is com- puted and the results recorded. Then the number of days between the mid-date and the second date is computed and added manually to the first result.
Listing 1.
Days between Two Dates (8K ROM). 20 DIM N12? 25 LET Nii)= 3@ L N€2) =31 35 LET N(S) 259 4@ CET Ni4) =98 45 LET N(5) =120 So LET N(6} =151 SS LET Nt7)=181 6@ LET N(S3 2212 6S LET N(9)} =243 7@ LET NC1@) =273 7S LET N11) =Se@4 Se L N(12) 2334 aS LET D=09
U D e a z
1428 PRINT “ENTER FIRST DATE: “i Lið INPUT M1
ii2 IF Mi>12 THEN GOTO 118
129 PRINT Hi; “7";
i3@ INPUT D1
i132 IF INT Bi: Bh a GOTO 1308
¥2 170 PRINT “ENTER SECOND DATE: "
INPUT M2 185 IF Me>12 coe GOTO 180 iS@ PRINT Me;
200 INPUT D2
2835 IF D2>%31 RARR GOTO 20@
210 PRINT D2“
20 INPUT Y2
225 IF Y2-Y1>86 OR Ye<Y1i THEN G OTO 220
238 PRINT Y2
248 FOR x=y'1 Ze Ya-1
250 LET D=D+3
255 IF INT a eas cea AND IN T (X740@) £40@<X THEN GOTO 265 =e IF INT (X-4} £4=X THEN LET D =O +
255 NEXT X
2709 IF Yiz=Y2 THEN LET D=36S-D 275 IF INT (Y27100? £16@8=Y1 AND INT (¥174@006) 24808@<Y1 THEN GOTO 28
280 IF INT tYivdai} #4=-Yi AND Mi>2 THEN LET D=D-1 265 IF INT (t¥27169} £186=Y2a AND
ae Cf274G8}3 EAO THEN GOTO 3E
290 IF INT (Yera)} #4=Y2 AND M2>2 THEN LET D=D+1
389 LET D=D-NiM1} -Di
318 LET et ey ee
S38 IF YS="" THEN GOTO 2¢
Listing 2. 4K ROM Adaptations. _—_—_—_—
299 IF 100%*(X/100)=X AND 400k (xX 4490)<X THEN GO TO 265
260 IF 4*(X/4)=X THEN LET D=D+i 2790 IF Yi=Y2 THEN LET D=D-365 2735 IF 100*¢(Y1/100)=Y1 AND 400% (¥1/400)<Y1 THEN GO TO 285
280 IF 4*(Y1/4)=Y1 AND Mi?2 THE N LET D=D-1
285 IF 100k*¢(Y2/100)=Y2 AND 400% (Y2/400)<Y2 THEN GO TO 300
2970 IF 4x¢(Y2/4)=Y2 AND M232 THE N LET D=D+1
SEa Delete
As an example of how this method works, lets calculate how many days apart July 7, 1881, and January 1, 1981 are.
ENTER FIRST DATE: 7/7/1881
ENTER SECOND DATE: 1/1/1921
(mid-date) 14423 DAYS APART
(ENTER)
ENTER FIRST DATE: (mid-date)
ENTER SECOND DATE: 1/1/1981 21915 DAYS APART
1/1/1921
14423 +21915
36338 Days apart
Variables Used
N(n) Days used in year by nth month
D Day counter (Number of days between dates)
M1 Month of 1st date
D1 Day of month for 1st date
Y1 Year of 1st date
M2 Month of 2nd date
D2 Day of month for 2nd date
YZ Year of 2nd date
X Temporary variable used as counter
Routines
The routines are found at the following lines:
20-85: Initialization.
95-230: Input dates.
240-310: Count days between dates. Compensate for leap years.
320: Print results.
330-340: Input “”to repeat.
Examples
The American Civil War lasted from February 8, 1861, to May 26, 1865. How many days did it last?
ĦrD/Y ENTER FIRSF DATE: 27371361 ENTER SECOND DATE: 572671855 1566 DAYS APART
John has a report due on July 20, 1982, and today is May 15, 1982. How many days does he have to complete the report?
MDY ENTER FIRST DATE: 5721571982 ENTER SECOND DATE: 772071982 5S DAYS APART
Herb was born on August 1, 1945. How many days old will he be on his 40th birthday?
MDY
ENTER FIRST DATE: 8r2+12945 ENTER SECGNGE DOATE: Sriseisés 146108 DAYS RPART Be ay aa OS EIA me Ps E Se eT
Fo SY 27371988 47171988
ENTER FIRST DATE: ENTER SECOND DATE: 31 DAYS APART
MDY INTER FIRST DATE: i7i/1979 =NTER SECOND DATE: 47/1/1979 a 33 DAYS APART
SYNC Magazine
Hardware Breakthrough:
% ZX-Man $14%
Æ% Joystick $1495
% Keyboard $7495
full-size assembled wileatherette case
FULLY ASSEMBLED KEYBOARD
1) Fully assembled 3) 30 Day Warranty 2) Includes Key Cap Legends 4) 2X80/ZX81 compatible 5) Some soldering necessary
THE INNOVATORS ARE COMING
Call or Write for more information
American Express, Visa, Master Charge, Money order, pc (allow 2-3 weeks to clear) Please add $2.50 postage & handling illinois residents please add 5% lll. sales tax
Visit our Showroom 10:00 - 6:00 Monday thru Saturday
ETEEN MICROCOMPUTERS PLUS, INC.
EXPRESS EA | 349 EAST MAIN ST. a GALESBURG, IL 61401 ards 2 PHONE: 309 342-9572 Gads f/f EA a
FROG SOFTWARE COMPANY FROG SOFTWARE COMPANY
We challenge you to lower your prices! SLOTS—simulates dollar slot machine (1K) #0004 .55¢
S-INVADERS—video game (1K) #0005 .65¢
ETCH-A-SKETCH I+—Twice as good as the original (1K) #0001A .30¢ GRAND PRIX Il—You are behind the wheel/dodge cars on the road
#0013 .65¢
SINCLAIR DESTROYER—Softsync sells this one for $7.42 on cassette #0020 .90¢
Order listing by number enclose a #10 SASE with your order New York residence add 7% sales tax
FROG SOFTWARE COMPANY, PO box 95, Glenmont, NY 12077 or Call between 4-5 pm (518) 465-6552
*mention Sync Magazine and get an amusing but otherwise worthless pro- gram FREE
=S— 6S eS = EE
PRINTER INTERFACE
CENTRONICS STYLE PARALLEL PORT PRINTER INTERFACE ENABLES USER TO PRINT ALPHANUMERICS: AND SELECTED GRAPHICS SYMBOLS USING THE 6K-16K Z2X-8@,2%-61. ØR THE TIMEX 1808 WITH THE AXIOM GP-100A PRINTER.
CAlso comPatible with other Centronics Standard Printers. >
PRINTER COMMANDS AND M/L PROGRAMS ARE STORED IN AN 8K MEMORY AREA NOT USED BY COMPUTER.PROGRAMS ALLOW PRINTOUT OF LISTINGS.SCREEN DISPLAYS, M/L CODE: TEXT-- 32 COLUMNS FOR LABELS, WIDE LETTERS.ETC., OR 63 COL- UMNS WIDE FOR LETTER-SIZE PAPER.
CASSETTE PROGRAMS, 1/0 BOARD (SEE LEFT), EXTRA 8K ROM BOARD WITH 2K ROM AND 2K CMOS RAMKK, AND MITH COMPLETE INSTRUCTIONS--------~----------- $13
SPECIAL BASIC PROGRAMS CAN BE STORED IN 2k CMOS RAM FOR INSTANT RECALL.
CUSTOM PROGRAMMED 2K ROMS<------~------- $15
I-O BOARD
PROGRAMMABLE 8255 PIO BOARD FOR MICROACE, ZX-80. Zx-81 OR TIMEX 1000 C 8K-16K> CAN BE USED WITH ONE INPUT PORT AND TWO OUTPUT PORTS OR THREE OUTPUT PORTS. EACH LINE CAN BE TURNED ON OR OFF ON ONE OUTPUT PORT.
FOUR OUTPUT LINES PROGRAMMABLE WITH 1US. PULSES.
RESET LINE BROUGHT OUT ON I/O BOARD.
OTHER UNITS CAN BE PLUGGED IN TO 17/0 BOARD CEXTRA +5 VOLT POWER MAY BE REQUIRED >
I/70 BOARD WITH PROGRAMS AND INSTRUCTIONS----- $45
PROFESSIONAL ELECTRONICS
189 CHESNEY LANE COLUMBIA-S.C. 29289
T= SS=SpgS _ SS §_ SS ESS SS
38
8K ROM 1K RAM
Tidying Up Your Display Nick Godwin
A list of numbers is conventionally written down aligned on the right. This poses a prob- lem on the ZX81, which lines numbers up the left.
Handwritten ZX81 display 96 96 920 920 eS. A 1020 1020
A routine to print, display, and summate a series of values may look as follows:
118 LET T=9 120 FOR J=1i TO 18 uT A
The problem is, how to change the ZX81 dis- play to conform to normal convention—how to align the values to the right.
The following amendment to the above does the trick, for integers (positive or nega- tive) only:
STOP 1010 PRINT TAR 17-LEN X$;X$ 1020 RETURN
The routine prints the values neatly in the middle of the screen. However, it is very likely that you may want to print out decimal values in a similar format. The following subroutine (replacing the one above at line 1010) does the trick:
1010 IF X#(1)="." THEN LET X$="@
XE 1820, IF LEN X€> ae IF X$(1i TŪ 2} ="-.“ THEN ter XG="-B"“+4+XEl(S T
1230 FOR K=1 TO eg aa
19840 IF Eef {K} = TH GOTO 1872 1850 NEXT i360 LET xex $t“
1978 PRINT TAS ESE x 1886 RETURN
Nick Godwin, 4 Hurkur Crescent, Eyemouth, Berwickshire, Scotland TD14 5AP, United Kingdom.
To test this routine, RUN the program and enter a series of wildly different values, e.g.: 46 9.009 -34456789.98765 -0.0000002 .0000034 8.6 88888.97 9999999 .01 .09
In practice, you will be fairly unlikely to require such a wide range of values for addi- tion purposes, but the routine works equally well for any kind of arithmetical manipula- tion, or for any other list of numbers.
It may well be that you require the program to add sums of money, in which case you will want displayed only the value to two decimal places (representing pence or cents). To achieve this, the routine can be amended by adding or changing the following lines:
110 LET ¥F=a 120 sur a =i FO 186
EF X= 180 GOSUB ieee 399 STOP pre LEF X#$=STRS (INT {X4100+.5)
iaia IF X#$t1)="." FHEN LET X$="0
4s X$>1 THEN IF Xsti TO
1020 IF L 2) =," LET <$="-@"°+xg fa TF
o 1030 FOR K=1 TO LEN X$
104@ IF LM IK} ="." THEN GOTO 1072
1350 NEXT
10250 LET TENIR LEN
ga” onl a K= X$—2 THEN LEF X$=X
PRINT TAB 17-K;X$ ieee R RETURN g
This routine prints the values neatly dis- played in the middle of the screen, with the decimal points at TAB 16. The display routine does not affect the arithmetical calculation: you can enter as many digits as you like after the decimal point, and for the display they will be rounded to the first two decimal places. The lateral position of the display can be al- tered by adjusting the number (17) in line 1080, but care must be taken to allow for extra long numbers. The bug is that a value of .005 (half a pence or cent) prints as 0.00, not very serious, and probably not worth the bytes re- quired to correct it.
The program as written occupies 394 bytes of RAM, 486 including the variables, and ap- proximately 890 bytes including the display. Thus it is operational on 1K. The subroutine alone occupies 268 bytes.
SYNC Magazine
8K ROM 1K RAM
Multisave
Doug Watson
Reliability of cassette storage and retrieval of programs and data requires multiple saves. Having to attend to the computer’s needs as each save is completed is, however, a bit of a chore.
Wouldn’t it be nice
1) to key in the number of saves required and leave the ZX81 to complete that number of identical copies?
2) not have to check what variables have been assigned before incorporating this fea- ture in a program?
3) to retain the normal, single-save mode?
If this appeals to you, try the demo program shown. The address shown as 16004 can be any unused, non-saved address in RAM (such as from 8192 to 16383 with the 64K Memopak or above RAMTOP) that is normally 0. PEEK it to find out.
5 REM “PROGRAM NAME" 1@ PRINT AT 5S.6:"2 + = PROGRAM
= 20 PRINT a“ FOR MULTIPLE S$ NT ssa“ FOR SINGLE SAV
~ ko
189 PRINT “HON MANY SAVES?" 119 PAUSE 48600 120 aoc ge 165@7,VAL XINKEY §-1
150 SAVE “PROGRAM NAME" siara TT SLOW OR FAST HERE IF DE 170 IF PEEK 16507-09 THEN RUN 190 POKE 16507; PEEK 16507-1 438 GOTO 150
= * ų PROGRAM * * +
FOR MULTIPLE SRUES, GOTO 108
FOR SINGLE SAVE, GOTO 150
On GOTO 100, HOW MANY SAVES? ap- pears on the screen and waits (no L cursor). When one of the keys, 1 to 9, is pressed, the selected number of saves will be executed. If 0 is pressed, 256 saves will follow. Use BREAK to terminate.
On GOTO 150, a single save is executed.
No variables are used so compatibility with any program is automatic.
Doug Watson, PO Box 142, Barry’s Bay, Ontario, Canada KOJ 1B0.
January/February 1983
EE a Ro SOS EL a RE TORRES CO A OER, MP Oe Oe A ee Te ee Tene Ae tT Se eM EA ON SERIES TEES eee ae MO AME bw |
OS intercomputer inc.
presents A Full Line Of Quality
SOFTWARE
For Your LIMEX 1000 Or SINCLAIR ZX81
IC's new line of software includes action-packed, challenging programs which put the user in the pilot’s seat of an air force bomber; into the casinos of Las Vegas; behind the controls of a nuclear missile launcher; alongside the President as his bodyguard; in a lost spaceship, far from earth; in command of a submarine destroyer, and challenge him or her to other mind and strategy games.
DEALERS AND DISTRIBUTORS WELCOME
WE ACCEPT CALL ORDERS WITH VISA OR MASTERCARD
Write or Mail to:
INTERCOMPUTER, INC.
P. O. Box 90, Prudential Center Boston, Mass. 02199 (617) 437-1190
FG # TITLE JQTYT u.s.$ -T TOTAL 1001 | Return From Space 10195 per
1002 | Missile Launcher | 10/95
1003 | Jeopardy Pe aes aw 1004 [Veses YY tts | 11005 | Demos | [ ns
p | Air Attack | 10/95
1007 | Guard the President | 10/95 l 1008 | Combo PAK | 14/50
1009 | Combo PAK II
1010 | Combo PAK IlI 14|50
on Submarine 10/95
11012 | Combo PAK IV 14|50
P001 | Memopak 16 K RAM | | 89.95 PO02} Memopak 32 K RAM Ria eo, 109.95 P003 | Memopak 64 K RAM | 179.95
All Programs require 16K RAM
*Defective tapes will be replaced, , if returned within 3 days. 5%
* Please allow 2 weeks for delivery. ‘TOTAL *Your order may be sent in more *Mass. Residents Only than one shipment. C] Check enclosed (J Charge my credit card below |
Name
Street City
Signature
Company
l l CĪvIisA [_] MasterCard
l Card Number Expiration Date
Making Backups for Machine Language Tapes Jack Ryan
Not long ago I bought a cassette of utility routines for my 16K ZX81. Although the routines on the tape were just what I needed, there was one problem: the program was in machine language and once LOADed above RAMTOP it ignored my SAVE commands. If something happened to that tape I was out of luck since I had no backup — unless I could make one by some method other than SAVE.
There are two methods which can be used to make a backup.
1. Copying to a Second Tape
The first technique is to simply copy the tape onto a second tape. This requires either a tape copier or a second tape recorder.
Place the original tape in Recorder | and a blank tape in Recorder 2. Use one of the Sinclair recorder leads to connect the earphone (output) jack of Recorder | to the microphone (input) jack of Re- corder 2. Set Recorder 2 to RECORD and PAUSE, and (if it has one) the automatic level control (ALC) to OFF Set the volume controls of each recorder to midrange. Start RECORDing on the second, then PLAYing on the first. After the recording is complete, try LOADing the program as usual with your recorder. Very likely you will have to try several different volume settings on your copying set up before getting a LOADable copy. A recording level meter on Recorder 2 helps. I found that I could not get a satisfactory recording without the ALC of Recorder 2 OFF
2. Copying with PEEK and POKE
The second technique uses the PEEK and POKE facilities of the ZX81. The program to do this is Listing 1. Like the machine lan- guage routines that you see published, the software that I purchased is LOADed into memory above RAMTOP. RAMTOP is the address of the first nonexistent byte at the upper end of memory, which means that you cannot store anything at or above it—at least that is what the computer thinks. However, the address of RAMTOP is stored in the two bytes with addresses of 16388 and 16389. You can change these two bytes with POKE, and fool the computer into thinking that some existing memory is nonexistent. This memory is hidden from Basic and so is protected for machine language use.
PRINT PEEK 16388 + 256 * PEEK will tell you the address of RAMTOP, which is normally 32768 with the 16K RAM attached. The bytes stored at 16388 and 16389 (found by PEEKing each location) are 0 and 128. Note that 0 + 256 * 128 = 32768. Before loading a machine language tape, one or both of these bytes are
Jack Ryan, Rt. 5, Box 244, El Dorado, AR 71730.
FEBRUARY FEATURE PROGRAM MARKET GURU (16K)
This double-cassette program package will help you spot market trends and keep track of stocks. Tape 1 plots moving averages of market statistics and stocks starting you off with a 2-year Dow Jones and S&P data base. Tape 2 stores vital information on specific stocks for point and figure analysis. Let the friendly guru guide you to see market trends and spot oppor- tunity. #12-B1
Sugg. Ret. $19.95
Feature Price Good Through 2/28/83 $13.95
ADDITIONAL SELECTIONS GRAPH-IT (16K) REAL ESTATE ADVISOR
Graph-it plots user supplied equa- (16K) tions as variables rather than pro- K .
eeps track of investments, gram statements (no reprogram- expenses and cash flow, then cal- ming necessary.) Help sectionand culates rate of return. Budget, means for printing. Three-dimen- project, create what-if’s, estimate sional graphs also possible. #12-E1 future rates of return. #14-B1 Sugg. Ret. $16.95 Sugg. Ret. $16.95 PERROS: Run-it Price:
CHECKBOOK/ BILL PAYER (16K)
Checkbook lets you create cate- gories for expense tracking and perform monthly bank reconcili- ation. Bill Payer keeps running file of creditors, amounts, due dates. Sorts by oldest first. #13-H5 Sugg. Ret. $14.95
$12.95 Run-it Price: $12.95
2K KORNER
WORD PLAY #13-G1
$14.95
$14.95
MORTGAGE ADVISOR (16K)
Displays annual or monthly mort- gage tables. Shows balance re- maining and total interest paid for given period. Rule of 78 section compares this interest with con- ventional loan’s. #12-H1
Sugg. Ret. $14.95
Run-it Price:
USE THIS
2 games: Scramble & Cipher.
Sugg. Ret. $9.95 Run-it Price: $7.95 AREA COMPUTER AWARENESS | #13-C1 OR R
4 programs including doing your own menu. FORM Sugg. Ret. $7.95 Run-it Price: $6.95 NOW AND GUESS-IT #16-G1 START Guess-it, Find-it and tutorial binary search.
Sugg. Ret. $11.95 Run-it Price: $9.95 ae HOME RECORDS #13-H3 MONTHLY Filing and sorting records.
Sugg. Ret. $13.95 Run-it Price: $11.95 § CATALOG
Check your selection(s): O 12-B1 0) 13-C1 O 12-E1 O 13-H3 O 12-H1 O 14-B1
Send to:
Spi à A erman ee Se Chicago, IL 60605
If paying by check or money order, indicate amount enclosed.
(Ill. residents add 6%) $
If paying by Master Card or Visa, complete the following: Card #
Bank # (MC only) Exp. Date
Signature
Name
Address
City
Listing 1. 4 FAST Sa PRINT TAB 7i "ML PROGRAM BAC Ga
PRINT FO REM “ENTER PRRAMETERS FOR Y eer ae gh R
5 RINT NTER THE NUMBER TO BE POKED" i 9@ SRINT TAB 1@; “INTO 16386",, LØG PRINT TAB 7; “IF NONE., ENTER 11@ INPUT A 120 JLS 150 PRINT “ENTER THE NUMBER TO BE P Å. $ PRINT TAB 10; “INTG 16389 ise PRINT TAG 7; “IF NONE. ENTER 169 INPUT B 126 PRINT “ENTER YOUR NORMAL RA TOP M OO PRINT “(17408 FOR 1K, 32768 FOR LENy * 200 INPUT R 240 CLS 520 REM “C = NUMBER OF BYTES PR OTECTED“
230 LET C=R-{A+256 r6? 240 SA = LAST BYTE BEFORE N
258 LET D=(At25646) -1 260 REM “STORE MACHINE LANGUAGE
IN E DIM ECC FOR N=1 TO C LET a ols =PEEN (tO+<4Nnr
“PUT ML ABOVE RANMTOP™ N=2 TO C ribi E tiNI
370 SAVE “PY 0330
changed by POKEing in new values to give RAMTOP a new, lower, address to correspond to the number of bytes required for the ma- chine language routine. For example, the software I purchased comes with instructions to POKE 16389,124. So RAMTOP is now 0 + 256 * 124 = 31744, a difference of 32768 — 31744 = 1024 bytes. If you had a program with instructions to POKE 16388,100 and
EZRA GROUP II EZRA GROUP II
WE CHALLENGE THE SOFTWARE COMPANIES TO LOWER THEIR PRICES!
Biorhythms 8K ROM/1K&up......-1.90 Graphics Billboard 8/liup.......1.00 Horse Race B/ LUD. 2% «cesses oo wa de OU SPINNER TM(like Rubik's) 8/16...2.00 Improved SLOW PAUSE....ceceeee- lL 00 Linear Regression 8/lup........2.00 CHAR. Generator Demos §8/lup....2.95 SPLIT-A-STACK TM SLOW/lup......2.00 CHEWTER TM(like PACMN)SLOW/1lup.2.95 ISLAND SQUARES TM SLOW/2up.....2.00 Random MUSIC!ISLOW/lup..ccecreeetde DD BASIC Keyword Demos 8/1l....from .50
ORDER,SASE,reSASE gets you GOO- DIES Catalog and cREE Program
EZRA GROUP Il EZRA GROUP Il
POB 5222 San Diego,California 92105
January/February 1983
EZRA GROUP II EZRA GROUP II
LOW LOW LOW LOW LOW LOW LOW LOW LOW PRICES I Biorhythms 8K ROM/1K&up........1.00 Graphics Billboard ($/ lupe. s¢ .«.1.90 TAP WRITER TM(Handicap Aid) 8/1.FREE Horse. Race O71Up. esis esc cess He OU SPINNER TM(like Rubik's) 8/16...2.69 Improved SLOW PAUSE,- oee ea Hee ee LOU Linear Regression 8/lup........2.08 CHAR. Generator Demos 8/lup....2.95 Plotting Work Sheet. 6/1. essas sede 99 Plotting Work Sheet SLOW/16....6.95 SPLIT-A-STACK TM SLOW/]up......2.00 CHEWTER TM(like PACMN)SLOW/16..2.95 ISLAND SQUARES TM SLOW/2up.....2.0@ Random MUSIC!ISLOW/1lup..........2.00 BASIC Keyword Demos 8/l....from .50 ORDER,SASE,reSASE gets you GOO- DIES Cataiog and !!FREE!! Program
EZRA GROUP II EZRA GROUP Il
POB 5222 San Diego,California 92105
POKE 16389,125, then the new address of RAMTOP is 100 + 256 * 125 = 32100, and the number of bytes protected is 32768 — 32100 = 668.
To make a copy of your machine language software, LOAD the program according to the instructions which accompany it. Then ENTER or LOAD the program in Listing 1. RUN the program and ENTER the requested data. Because the program runs in FAST, the screen blanks out while the program PEEKs the machine code into the variable array E. When the program stops with 9/310, prepare to SAVE the program. To SAVE, enter GOTO after you have begun recording. When you LOAD this SAVEd tape (LOAD “P”) after altering RAMTOP as your machine language program requires, it is self-RUNning so the screen will blank out while the code is POKEd in above RAMTOP.
If you want to SAVE a copy of Listing 1 without any machine language code so that you can LOAD it in for a variety of machine language routines, enter SAVE “P”, not GOTO 370.
The program as shown in Listing | is meant to be self document- ing and user-friendly. But this is not necessary for operation of the program. Since this probably makes the program too large for a 1K machine, and makes it take longer to LOAD in any case, you might want to shorten it a bit. You can easily calculate the new address of RAMTOP and the number of bytes protected. So you could easily eliminate all REMs and replace lines 10 through 260 with
10 FAST
20 LET C = (calculated bytes protected)
30 LET D = (calculated new RAMTOP ) — 1
In summary, you can make back up tapes for machine language routines which are LOADed above RAMTOP by copying your orig- inal tape from one recorder to a tape in a second recorder, or you can use a Single recorder and the Basic program in Listing 1 to PEEK out the code for SAVEing and POKE it back in when LOADing from your back-up tape. a”
41
Make Your Sinclair ork Harder, Better...
with quality, affordable and dependable peripherals from CAI.
The Interface Computer Network $095 Socks $095 Wiz Bang The CAI/ O Board® plugs into the computer’s expansion aan oad is the Package > Bio Rhythms interface that lets your computer This package consists of ASCII ? communicate with the outside world. conversion program, phone modem, Why buy from CAT? There is a serial RS-232 compatible I/ O connecting cable. Now you can All CAI peripherals come with port, 3 parallel I/O ports used to design communicate with large main frame complete instruction manuals, schematics circuits to control home lights, power computers, micro-and mini-computers and and a 30-day unconditional replacement relays and additional ports to accept computer networking systems (The warranty. Each works with either the printer, mass storage device and memory Source® ). Sinclair ZX-80, ZX-81, MicroAce and expansion. $149 Note: Order this package when Timex/ Sinclair 1000. ordering your CAI/O Board.
Our technicians are happy to answer for ASCII conversion program only your questions before and after purchase.
$79 .. $6 S purchased $2 4?>
purchased separately with CAI peripherals
The Printer Additional Peripherals New! The CAI/ P40 prints the complete Memopak® 64K memory ae | rT re ee ee
library of regular and inverse alpha-numerics $] 5 O° 5 and graphics in 40-column width. Three
Phone: (517) 687-7343 Office Hours: 9:00 a.m. — 4:30 p.m. Evening Hours (Technical Information) 6:00 p.m. — 8:30 p.m.
CAI Instruments, Inc. P.O. Box 2032 Midland, MI 48640
user-addressable modes print in regular or enhanced (double type size): List program Programs:
from memory, print text or data from $1495 Home $095 Math
program, print screen Finance Tutorial |
Orders accepted by phone or mail. For mail orders, send $ 139” “Saracen ea one Us pe yc aS check, money order, VISA or MASTERCARD numbers. peripherals)
Foreign orders must be made in U.S. currency. $ 1 1 Q5 requires CAI/0 Board for complete
—_ — ——
compatibility with other CAI
peripherals CAI Printer (See Price) o
Mass Storage Device
CAI introduces the Stringy Floppy® for the Sinclair or Timex Sinclair. It has the speed of a disc drive at a fraction of the price. Data is stored on an inexpensive continuous loop magnetic tape cassette. This device inputs and outputs data at an incredible 14,000 baud - - 56 times faster
than Sinclair cassette recorder interface.
CL OSTA, rr S Shipping and Handling 4% Sales Tax (Michigan Resident Only) TOTAL
SHIPPING AND HANDLING CHARGES Within U.S. $5.00 Outside U.S. — F.O.B. Midland, MI
Mit BM Rt A Ml ai Ai at dal iat he at a | #4 $ ER EAR
The system is designed to accommodate : ; MasterCard/ Visa two Stringy Floppy drives for even more 9 Exp. Date versatility. s Name : Address 310995 per drive aS > Requires CAI/O Board iy. te ip
Phone No.
8K ROM 1K RAM
INTERP — The Kernel of Interactive Nuts
Lawrence Auer
In this article we present an easily ex- tended, interactive interpreter, providing a stack oriented, dictionary based program- ming environment similar to FORTH. The in- terpreter is, thus, the basis for the more friendly, more interactive use of your com- puter. The ease with which INTERP can be coded is a dramatic demonstration of the power of the ZX81 string manipulation capabilities and the GOSUB and VAL commands. 3
Interaction
The essence of effective use of the personal computer is contained in the word, “interac- tion.” While more memory and languages are desirable to have, solving problems with a computer is essentially a function of how easy it is to control the machine. A computer is able to perform simple tasks like adding one and one, or recalling what the balance is in the checking account, or integrating a set of dif- ferential equations. What it has trouble with, and what humans excel at, is decision making and recognition of the significance of a result. (Computers are just as happy with a balance of -$1.00 as +$100,000.00) Thus, a proper man-machine dialogue might have the form:
Man: What would happen if... .?
Machine: !!!!!!! (a result unexpected or un- desired by Man)
Man: Well then, do this first: .....
Man: And then, do this:....
Machine: ..... Hmmm
Man: Given that, what would the further consequences be?
Machine: .......
Man: Thanks.
Any program which inputs data and per- mits decisions on the basis of the input is, of course, interactive. The operationally impor- tant point is that in normal programs, the con- trol is quite limited. The flow of code is re- stricted. Control cannot be arbitrarily trans- ferred from one place in a program to another. Humans do not normally suffer from this re-
Lawrence Auer, 1202 Seventh St., Los Alamos, NM 87544.
January/February 1983
striction. They can do their operations in whatever order is most convenient. The pur- pose of INTERP is to provide the basis of a “General Interactive System” of maximal flexibility.
The features required in an interactive sys- tem can be seen in the following simple exam- ple. Consider a program to keep track of where you are spending your money. Inputs to your program are the amount and the type of each expenditure. We leave the details of the coding as a problem for the reader, but a typi- cal interactive session with a program based on INTERP could be
?
225.00 RENT
42.27 FOOD
9.25 CLOTHING
2*0.90 3*0.65 + 0.45 + , FOOD
EXPENDITURES
CLS
... More entries...
EXPENDITURES
STOP
The general features and requirements demonstrated by this example are as follows:
1) The interactive system is composed of individual modules or “‘primitive opera- tions.” In the above example, “EXPENDI- TURES”, lists the totals so far in each cate- gory, while “RENT” adds the amount indi- cated to the category rent. Each module has a well-defined input and output. They share data but their actions are accomplished by separate pieces of code.
2) Except for obvious dependencies like initialization, the order in which the modules may be invoked is arbitrary.
3) The simplest way to call up a module is by name. It is both more easily remembered and more reliable to use “RENT” than to
choose this operation by number from a
menu, which is the typical method employed.
4) There must be a general way of passing values or “arguments” to and from the mod- ules. The result of an operation need not be printed, but it should be easily available. In other words, we want the equivalent of “named subroutines”.
5) Modules like “RENT” or “FOOD” are obviously problem specific, but some opera- tions are of such general utility that they will be needed in most programs. The general purpose modules which are built into INTERP are:
? — Output the names of the modules de- fined in the dictionary.
: — Output the value at the top of the stack (see below for a discussion of stacks).
— Output the top element, then remove it from the stack.
Stop —Stop the program (SHIFT A), CONT will restart with no loss of results.
CLS —Clear the screen; note this is the three letters C L S.
All Basic functions, e.g., RND or PI any var-
iable used in the Basic code, e.g., S or D, or
any arithmetic operator, e.g., ** or/, are legal and usable.
Basis of INTERP
The key element of our implementation of these ideas in INTERP will be the use of BASIC SUBROUTINES. A subroutine is simply a block of code which is called via the GOSUB command. Control is transferred to the line number given in the GOSUB call, as in a simple GOTO. The important difference is that subroutines remember from where they were called. When a RETURN command is
43
encountered control returns to the line follow- ing the GOSUB which invoked the sub- routine. Conceptually, a GOSUB command amounts to telling the program to “go per- form a series of commands and then come back when you are done with them.” This is exactly what we want for a module.
For anyone accustomed to programming in languages such as Pascal or Fortran, the most fundamental deficiency in the ZX81 Basic is that subroutines are not named. While GOSUB 700, for example, can be executed interactively and may cause the data to be plot- ted, humans are more at ease with typing “PLOT” in order to accomplish that task. We clearly cannot change the definition of the Basic language, but what we can do is make it easier for a user to get at pieces of the code. That is, through INTERP we add another level of code which “interprets” the input. Via INTERP we expand the Basic vocabulary so it includes whatever operations we require.
The basis of the ability of INTERP to pro- vide named subroutines is its dictionary, which consists of the names of the routines, stored in the string array, D$, and the defi- nitions, which are nothing more than the line numbers with which the Basic subroutines Start, stored in the array, D, in the same order as the words in D$. Because the order is the same, the elements of the two arrays are re-
lated when they have the same subscript. For example, D$(3) is the name of the third mod- ule, while D(3) is the line number where the third module starts. INTERP determines the meaning of an input word, W$, by scanning through the dictionary looking for the value of the subscript, J, for which W$=D$(J). Once the subscript is known, GOSUB D(J), exe- cutes the indicated subroutine. In other words, the dictionary gives a name to a line number. Of course, the block of code starting there must be a true subroutine, i.e., termi- nated by RETURN.
Central to the operation of INTERP is the concept of a “stack,” which is just the math- ematical analogue of a pile of dishes on a spring-loaded dispenser at a cafeteria. Put a dish on the stack, and it “pushes” the stack of dishes down one level. Take a dish off, and it “pops” the stack up one level. The mathemat- ical stack is just an array of numbers with a pointer to the location of the current “top of the stack.” The basic rule in “stack process- ing” is that an operator always works on the elements at the top of the stack. The stack provides the logical organization for perform- ing a series of operations. Say we want to evaluate
ERFC (FUNC(PI+7)) In our stack system we would re-write this as PI 7* FUNC ERFC
The PI and 7 are values placed on the stack. The + removes the two top stack elements, adds them, and puts the result back on the stack. FUNC and ERFC simply get their one argument from the stack and replace it with the appropriate result, ready for the next operation.
An operation always consists of removing the arguments used by the function from the top of the stack and leaving the result gener- ated as the new top value. While the standard mathematical operators have either one or two arguments and return one value, user-defined functions may have as many arguments as needed and return an arbitrary number, up to the limit defined by the size of the stack.
Implementation of INTERP
Our interpreter consists of the following steps:
1) Get a word of input (GOSUB 200)
2) Is the word in the dictionary?
IF W$=D$(J) THEN GOSUB D(J)
3) If not found, then:
If the word is a Basic operator, apply it to the stack.
Otherwise apply VAL to it and put the result on the stack.
4) Go back to (1) for more words. This is a fully general interpreter. As a side benefit, it is also a “Reverse Polish Com- puter” which can be used in the same way as an HP calculator.
1. TYRANT OF ATHENS.
2. ROMAN EMPIRE.
play. Playing time 2 hours - 2 days!
3. PELOPONNESIAN WAR.
4. SAMURAI WARRIOR.
5. WARLORD.
44
M.C. LOTHLORIEN
A FANTASTIC RANGE OF 16K WARGAMES FOR THE EACH COMPLETE WITH COMPREHENSIVE INSTRUCTIONS.
SPECIAL CHRISTMAS OFFERS Separate games $14 (each); Buy 3 for $35, or all 5 for a fantastic $50
Train troops, build warships, fight battles b more features in this very addictive game.
Your aim is to con
Sparta. Your goal is a final victory over the Spartans but force before you even stand a chance. 3 levels of play.
SAVE UP TO $20!
Can you survive long enough to turn Athens into the most feared state in the Mediterranean? y land and sea against hostile Greek States and the vast Persian Empire. Many
Set in Ancient Greece from 431-404 BC, covering the Great War between Athens and you will need all your skill in a combination of diplomacy and military
How could you have fared as a Samurai in the 13th Century Japan? Face challenges from other Samurai and bandits. Are you a survivor? Or will you be forced to commit ritual suicide? 7 levels of play.
A challenging game of analytical skill. You are a warlord in 13th Century Japan. You have to defeat attacks by other warlords and pirates, capture slaves and clothe and feed your troops. A companion game to Samurai Warrior.
ALL PRICES INCLUDE FULL POST AND PACKING. CHEQUES OR INTERNATIONAL MONEY ORDERS PLEASE, PAYABLE TO
M.C. LOTHLORIEN, 4 Granby Road, Cheadle Hulm, Cheshire, SK8 6LS U.K.
ZX81
quer the hostile countries surrounding Rome. Build armies, appoint Generals and fight campaigns. This challenging game takes full account of morale, fighting efficiencies, leadership ability, etc. 3 levels of
SYNC Magazine
While one could require that each word be terminated by NEWLINE, it is much more friendly to permit “type ahead,” that is, to allow the input to be as long a string as the user wishes. Words are then extracted from the input string by using internal spaces as de- limiters. This is particularly convenient, since we permit arguments to be associated with subroutine calls. For example,
3 ERFC. is easier to type and understand than the to- tally equivalent,
3
ERFC
When the input line has been completely pro- cessed, INTERP prompts for further input by printing, “OK”.
The division of the line into words is done in the code starting at line 240. Note that the code starting at line 300 “‘hashes’ ” the word being input. This hashing technique only af- fects words which are longer than four charac- ters. It is done so that words of any length may be put in the dictionary without having to pay too high a storage cost. When strings are di- mensioned, say DIM D$(20,4), the maximum number of characters in each D$(I) is the sec- ond value in the DIM statement. Thus, one could never store the string, “SOLVE”, in this array. LET D$(1) =“SOLVE” is legal, but results in D$(1) containing only “SOLV”. Thus, we hash the word by storing its first
four characters, and then changing the fourth character to be the length of the word if it is longer than four characters. The effect is to reduce the length of all words to just four bytes, but to maintain distinction among them. For example, “SOLVE” becomes “SOL5”, while “SOLVENT” becomes “SOL7”. This hashing scheme must be rec- ognized when extensions are made to the dic- tionary. The word, “SOLVE”, is made the seventh word on the dictionary by adding be- fore line 90, LET D$(7)=“SOL5”’ and changing the value of D, set in line 90, accordingly.
Note, how we use the CHR$ function in
line 310 to generate the character correspond-
ing to a numerical value. Since “O” is the 28th character in the ZX81 character set and the digits are stored in ascending order, CHR$(28+N) generates the symbol corre- sponding to the number N. If N=10, 11,..., the characters generated by this algorithm are A :
The code starting at line 500 is used to eval- uate expressions and is based on the ex- tremely powerful ZX81 function, VAL. This operator, when applied to an arbitrary string, produces the numeric value defined by the string. For example, if the Basic variable X=O, the expression VAL “COS X” has the value 1. VAL permits the input to contain any BASIC expression which does not contain an explicit space. Expressions may also be en-
tered in the “Reverse Polish Notation” natural to INTERP, although then each operator and term must be delimited by spaces. The point is that the type ahead feature uses spaces as delimiters. ‘‘2**3”’, for example, which con- tains no spaces, is treated as a single expres- sion. Since it is not found in the dictionary or recognized as an operator, it is evaluated by VAL and the result, 8, put on the stack. The input, “2 3 **”, where the symbols are sepa- rated by spaces, is split and each term treated separately. The “2” and “3” are individually evaluated by VAL and the corresponding nu- merical values put on the stack. Then INTERP recognizes “**” as a binary opera- tor and, as described below, creates a string and then applies VAL to it the top two ele- ments of the stack, replacing them with 8.
Strings containing operators are easily created. Almost every symbol appearing on the keyboard, with the exception of keywords like PLOT, UNPLOT, etc., which are white and above the keys, can be entered by a single keystroke. Thus, to enter the word STOP one needs only type SHIFT A; a call for the SIN operator is FUNCTION Q, and so on. Note, that even though the ZX81, when it prints these words, adds spaces of its own, they must be delimited by true spaces when being input to INTERP.
The hashed input word is compared with the dictionary in the loop starting at line 410. If it is found, the corresponding subroutine is
The CRASH GUARD is made of Heavy Gauge Bronze- Colored Acrylic. It has been designed to give you a rugged work base. At the same time, it virtually elim- inates crashes caused by bumping the computer or 16K
module.
To order by phone, call (816) 353-1690
January/February 1983
NAME
CITY
0 Visa
ADDRESS
Please send me $19.95 each
O Check Enclosed o Master Card
Allow 2 weeks for delivery
EXPENSE CUTTER PRODUCTS, INC. P.O. BOX 9543 e RAYTOWN, MO. 64133
“CRASH GUARD”
PROTECTS YOUR ZX81 AND 16K RAM MODULE
$19.95
x Eliminates crashes caused by bumping the 16K RAM module
* Helps prevent accidental unplugging of your 16K by small children
x Now you can move your computer with- out worry
DOTATE eo ee e
CRASH GUARDS® Acct. No.
[a
Exp. Date
[ee
45
executed. If not found, at line 500 it is checked to see whether the unknown word is actually a Basic operator. Finally, if still un- recognized, INTERP concludes that the word must actually be a Basic expression and goes to line 600 to evaluate it. The result produced by VAL is stored in the stack vector, S. If a typing error was made, the word entered will be meaningless to INTERP and an error will be signaled. If this happens, the user can con- tinue without any loss of the computations already made by entering GOTO 100.
In order to apply W$ as a Basic operator, we must make one further judgment: is W$ a binary operator, like +, or a unary operator, like SIN? This is decided in line 510. The expression to be evaluated is constructed by String concatenation in lines 550 (binary operators) and 570 (unary operators). The values used are replaced on the stack by the value generated. We see here how by using VAL and string manipulation one can create at run time the equivalent of Basic program statements.
The stack in INTERP has been im- plemented using the array S(). The pointer to the top is the value of variable S. The top value on the stack is, therefore, S(S). Whenever the stack is manipulated, the value of S must be changed accordingly. For example, when one does a binary operation, as in lines 540-550, S
is reduced by one. Any user subroutine which requires arguments should check that there actually are as many elements on the stack as will be needed. If S is less than the number that are needed, GOTO 9990 will generate an appropriate error response.
Simple Example: A Reverse Polish Calculator
As an example of how one adds new routines, let us produce a program which models a simple HP-like calculator. Because calculators are clearly interactive, INTERP is our natural starting point. We already have all the mathematical functions, so in order to create our calculator program, all we will need to add are a few operations for manipu- lating the stack:
DUP — Duplicate the tope element, i.e., push this value again onto the stack.
SWAP — Interchange the top and next
elements on the stack.
ROTATE —Rotate the order of the stack elements.
STACK — List the values on this stack, top first.
Figure 1.
equivalent to PRINT SQR(3*3* =4*4) will print .5 and 2 equivalent to PRINT 1*2*3*4
3 DUP * 4 DUP * + = SQR. 12/,1SWAP/. 1234***,
STOP
The code for including these four new words is given in the second listing. The important points to note are:
1) The new definitions in the dictionary must be made before line 100, the start of the interpreter.
2) If a name is longer than four letters, like ROTATE, it is stored in D$ by its first three letters followed by its length, “ROT6”’.
3) Each subroutine must be terminated by a RETURN.
4) Routines should check that there are an adequate number of arguments on the stack. If there are not, the transfer GOTO 9990 will indicate the error.
If you are not familiar with the reverse Polish system used on HP calculators and in INTERP, it would pay you to enter the state- ments of the second listing and then to try it. One very important thing to note is INTERP DOES NOT AUTOMATICALLY OUTPUT ANY RESULTS. In order to see the result of a calculation you must use either the command, ,**, which will print the answer, or “.“, which prints and then discards the top of the stack. Typical calculations would be found in figure 1.
F YOUR LIGHTS GO OUT
Introducing NiCd Battery Back-Up Units from Syncware