
SYNCHRO-SETTE cassette tape programs for August, 1982
Each program is recorded twice.
Adjust recorder volume to proper level.
Not all tapes load at same volume. If program name is followed by (SL), this means the program is self loading and you won’t have to type in RUN.
Programs will, of course, still load with the format, LOAD “”
If you have loading problems, consult the following previous issues of SYNCHRO-SETTE for articles on this subject:
April/82 --------- page 14 May/82 ----------- page 14 July/82 ---------- page 3
Also, Sinclair will mail to you, a list of suggestions on overcoming cassette loading and saving problems.
Programs that create their own data files automatically will change the last character of the data file name into an inverse character.
(LT) after the program is the loading time. This can help you locate a program a little easier. If your recorder has a counter, it is a good idea to write down on a piece of paper for future reference, the location of each program on the tape. We cannot do this because there are so many different recorders on the market and the counters are not synchronized to each other, even among the same models.
Programs that create their own data files automatically will change the last character of the data file name into an inverse character; when you reload it by name, you must type in the last character this way.
1K side – 44 second leader:
“LOADER-1K” (SL), LT – :14
This program provides a MENU that allows the user to enter a number and then the requested program will be searched for and loaded. If it is a self-running program, it will automatically run.
You will notice that you cannot BREAK this program in the normal fashion to observe the LISTing. This is one example of how a software author might protect his program from being copied. If you want to observe the LISTing, I’ll give you a hint:
Enter the following code into the “CIPHER” program that was on the June/82 cassette, 16K side.
746259594657735758704657735748 5541586038577550455955
The keyword clue is:
WHAT IS A GROUP OF COLTS CALLED? Source – The Book of Lists.
1 – “MESSAGE” (SL), LT – :10
This is a Marquee-type program but with a vertical scroll. You can enter your own messages by changing line 100 to INPUT A$. If you wish to save the message on tape, use the original format of line 100 with your own message. Set up your tape in the recorder and then enter GOTO 300. The program will be saved with the name being “MESSAGE” (last E is inverse). 1K machines are limited to about 75 characters.
For converted ZX-80s, add line # 225 PAUSE 50.
2 – “ARTIST” (SL), LT – :21
Probably the best 1K program I’ve ever seen written in BASIC. Patterned after other ETCH-A-SKETCH type programs, this one not only allows the user to draw pictures on the screen, but also to erase unwanted areas with ease (once you’ve practiced enough). You can also clear the screen and start fresh, and get this, you can save the pictures on tape and recall them later and start where you left off!
Think of the practical applications of this program other than as a child’s drawing board. Draw pictures of room additions or house plans, of circuit designs, street maps of towns, hobby or home projects in 3 dimensional perspective. The list is endless.
And of course, you needn’t worry about completing it in one sitting because you can always file the picture on tape and recall it at a later date.
If you have a printer, it is possible to re-write the program to print the picture on paper.
This program loads with a picture appearing on the screen of a locomotive with an “ET” type character sitting at the controls giving you a friendly greeting. This is a picture I drew with this program.
Press the (D) key. This puts you in the DRAW mode. You will see the cursor blinking at the top of the exclamation point. If you wish to move the cursor, press one of the arrow keys (5,6,7 or 8). This will make the cursor move in the direction of the arrow and leave a black line trail behind it.
Press the (E) key and the cursor disappears. You are now in the ERASE mode. You can’t see the cursor unless by the trail it leaves through a blacked-out area. Use this mode to erase unwanted black areas. It can be moved with the arrow keys.
If you feel lost without the cursor, enter the following line:
74 PRINT AT 0,26;"X = ";X;" ";
AT 1,26;"Y = ";Y;" "
This will allow you to know the screen coordinates of the cursor, as outlined on page 89 of the Sinclair manual. You will notice that with this line in the program, the input time is greatly increased, making the program operate much slower.
Try practicing adding a coal car onto the locomotive. End by bringing the blinking cursor into ET’s head to make his mouth appear to move. A 1K machine may run out of memory but it still can contain quite a bit of graphics.
Don’t worry about an error occurring if the cursor reaches the end of the screen. There is a built-in routine that will prevent the cursor from going too far. This is helpful for drawing screen borders.
If you want to clear the screen and start all over, press (C) and if the cursor is in the DRAW mode, you will see it blinking at its last location.
If you have a picture completed or have no more time to work on it and want to save it, press (S). This will put you in the SAVE mode and the (L) cursor will appear at the bottom left of the screen. Now type in the name you wish to call the picture. Put your data cassette into your recorder and advance it beyond the tape leader. Have the recorder in the RECORDING mode and press enter on the computer. Your picture will now be saved and can be recalled by the name you called it; when it is loaded, it will come up running.
How’s that for sophistication in only 1K of memory.
Unfortunately for owners of converted ZX-80s, the program depends so heavily on the INKEY$ command that it loses its effectiveness for that machine if PAUSE routines are introduced.
I would be interested in seeing any interesting pictures that anyone would like to submit. I could put some of the more interesting ones in our next tape issue. If you would like to send us one or more, please write them in 1K with the 16K module disconnected from the computer. Use an inexpensive cassette because we cannot return them, but you will have the glory of seeing your name in print and the other subscribers will witness your creativity.
2 – “LABYRINTH”, LT – :10
At first glance this game is not very eye-appealing but as the left side of the screen fills up with a graphic maze that moves from the bottom to the top of the screen, you start to see the pitfalls that await the squot (graphic character at the top of the screen) that you control by making it move left or right with the (1) and (0) keys.
The idea is not to let the squot hit any of the graphic blocks or the walls of the labyrinth (no fair going outside the walls). If it does, your final score is the number at the upper right of the screen.
As long as nothing is hit, the game just keeps going on forever.
The computer is sneeky though and sets up traps that at first appear to allow the squot to travel through but then end in a dead end. Since their is no backtracking, the game is soon over.
For a 1K game, it gives quite a challenge.
4 – “MULTIPLY”, LT – :09
Ever hear about program routines that allow more than 8 digits of accuracy in a mathmatical operation. With the first TRS-80, only six digits of accuracy were allowed. This meant that with business program that correlated money amounts, the maximum correct amount that would show all the digits was $9,999.99.
The first Apples with integer basic were even worse in that the digits to the right of the decimal point were lost completely.
The ZX-81 however allows accuracy up to $999,999.99 with normal programming methods. This can be expanded to an almost unlimited ammount.
This program allows the input of 2 numbers. When you see the (L) cursor at the bottom of the screen, you can enter a number of any length that the computer’s memory will allow. After you enter this number the cursor will appear again. Now enter a single digit number.
The computer will then give you the correct answer to as many digits as the answer requires. Both numbers must be whole numbers. The routine will ignore any decimal point.
Using this routine as a base, what would be required to allow the second number to be more than one digit in length? Try to expand this program to allow the second number to be at least 9 digits long. I haven’t had time to work out the answer yet and would appreciate any help. If you come up with one, send it to me and we’ll publish it.
Also, how about similiar routines for division addition and subtraction.
5 – “CHAR-CODE”, LT – :09
This program scrolls the ZX-81 character codes on the screen with their corresponding number.
For more information, turn to page 137 of the Sinclair manual.
16K side – 38 second leader:
“LOADER-16K” – SL, LT – :18
Performs the same function as the 1K loader but for the 16K programs. This program will load on 1K machines but will not load any of the programs in its directory.
1 – “BULLETIN” (SL), LT – 1:32
Our bulletin board program – total message time, 4 minutes and 50 seconds.
Remember MARQUEE-2? How about a double marquee program that you can put your own messages into and save on tape; then when it’s recalled, the program starts running by itself?
We intend to use this program to bring you the latest information about the Sinclair products, new products and services and Users’ Group information, and of course to try to sell our wares.
After the fascination of watching this program run wears off (2 to 3 hours), you may want to enter your own messages. There are two ways to do this. BREAK the program and enter these 5 lines:
5 LET B = 0
6 LET O = 1
7 LET L = 0
10 INPUT A$
20 INPUT B$
Now RUN the program. Enter the message you want to appear in the first window. Then enter the message you want to appear in the second window. After the second message is entered, the marquee will begin. Pretty neat, huh?
To save the program with your message, press the BREAK key, then type in GOTO 1000. Put the data cassette in the recorder. Put the recorder in the recording mode and advance the leader. Now press enter on the computer. The program will be saved under the name of “BULLETIN”.
If you want to change the name to something else, type in the following lines:
1000 INPUT M$
1005 SAVE M$
Now repeat the GOTO 1000 procedure which, when executed, will show the (L) cursor on the bottom of the screen. Enter the name you want the program to be called. CAUTION – when you press the ENTER key, the computer will start saving the program, so make sure the recorder is ready.
The other method of data entry involves a procedure I use when I have long messages to enter.
Have you ever entered a long string of data from a single INPUT command and after the first few lines were entered, you became annoyed at the amount of time it took after each character key was pressed because the screen kept refreshing?
Try this little trick in this program. Enter the following line:
10 LET A$ = " type in about 2
lines of text in here "
12 LET A$ = A$ + " type in 2
more lines of text "
14 LET A$ = A$ + " Keep
repeating this procedure
until you have entered all
the text you want to enter "
20 LET B$ = " type in 2 lines
of text for second message "
22 LET B$ = B$ + "same
procedure
as in above format"
When you RUN the program now, the old variables on the left side of the (=) sign keep getting the message to the right tacked on as to increase the size and include the new information.
This not only speeds up data entry but also makes it much easier to EDIT in case of an input error.
Let’s say that the lower case words that appear in the above lines were the ones that were actually typed in. Let’s also say that you forgot to put a period at the end of line 20 and line 20 had 2 lines of text. It would take a long time to move the edit cursor all the way to that position and enter a period.
There is a much faster way. Enter the following line:
21 LET B$ = B$ + "."
Simple, huh?
But how about if you wanted to remove something at the end of a line such as the last 2 words in line 14, “- – – TO ENTER”? How many total spaces do these words occupy? Eight, right? Don’t forget the null space. Type in the following line:
15 LET B$ = B$(1 TO LEN B$ - 8)
If you want to add a period to the end of that sentence, change line 15 to read:
15 LET B$ = B$(1 TO LEN B$ -8) +
"."
The last 8 characters were stipped off and the period was added on.
See, the COMPUTER TUTOR isn’t the only one who knows how to teach.
After you have entered all the data, RUN the program to see how it looks. If you like what you see and you want to save the message on tape, BREAK the program and set up the data tape in the recorder and type in GOTO 1000.
If you listed the original program, you will see that there is no data message in the lines above 75 in the listing or anywhere else in the program. How was this accomplished?
Easy, the following line, (72 STOP) was added and the program was RUN. The program then RUNs until it encounters the STOP command and then BREAKs. I now deleted all the lines before and including line 72. I then entered GOTO 1000 and all the variables were kept intact and the program was SAVEd in the running mode.
If you try this, remember the inverse last character when the program is recalled.
Use these techniques in programs you write and before you know it, I will be buying programs from you.
2 – “BAR-GEN” (SL), LT – 1:07
Ever see those neat graphing programs on other computers and wish you had one of your own?
Now you can put to shame all your friends with their more expensive computers.
This is a bar graph generating program that is MENU driven and has the capability to store 120 data entries on tape for recall at a later time. 120 entries would correspond with 10 years of monthly sales for a business but it can also be used to chart your weight on a daily, weekly or monthly basis or a teacher could use it to analyze daily class attendance. A weatherman could enter daily rainfall or temperatures. Stock prices, gold or silver fluctuations, commodities costs, etc. are just a few of the items that can be analyzed with this program.
The bar graph has long been a useful tool for the person who wishes to observe a perspective that is normally invisible on a day to day basis.
It is simplicity itself to use. The MENU allows you three choices:
#1 – asks for a TITLE. This will be used later in both the bar graph display and as the FILE NAME when the data is saved. After you enter a title, enter the data items one by one as the program asks for them. When you have no more data to enter, enter a (0) and the program will revert back to the MENU.
#2 – allows you to see the data in the form of graphic bars drawn from left to right and scrolled from the bottom of the screen. To the left of the bars are the data items and the order in which they were entered. The program will automatically take the largest data item entered and give it the maximum bar length. All other data item bars will be proportional in length to the longest bar.
The bars will continue to scroll until the last one is displayed and then the screen will freeze until you press the ENTER key. The program then returns to the MENU.
If you have more items to enter into a file that already exists, just go to #1 from the MENU and the program will allow the next entry to correlate with the next available position.
#3 – is to save the data on cassette. It lists instructions for saving, and after, returns to the MENU. To exit the program, press the (P) key.
When the data file is recalled, recall it with the name of the file you gave it or use LOAD “”. The program will come up running and the data will be just as you left it.
See the article this month called IMPACT on sample data that can be entered into this program regarding the Sinclair computer product’s impact on the U.S. market.
[illegible] – “NAME/ADD”, LT – 2:40
They said it couldn’t be done and maybe it couldn’t. Well, here it is, anyway.
The presence of only 26 string variables in the ZX-81 ROM makes it extremely difficult to write a program that will allow the user to input any amount of character information, such as in a name and address program.
In the Computer Tutor article of June/82 on page 9, we discussed the potential of converting string variables into numeric variables and then back into string variables again.
This process worked fine, but only as long as the string did not exceed four characters in length. Well, anyone knows that the average name is over 4 characters in length.
The old professor put forth a challenge to you people out there to use his format to write a program that would allow at least eight characters of input per item. So far no one has come forth with the correct answer.
Therefore, he decided to show us all that it could be done and wrote a program that allows the following inputs:
Last Name - 12 char. max. First Name - 12 char. max. Address - 16 char. max. City or Town - 12 char. max. Zip Code - 8 char. max. State - 4 char. max. Phone # - 12 char. max.
Before using the program, change line 5 to let O be a value of less than the 95 that is there unless you have more than 16K of memory.
The number you put in will represent the maximum amount of names that can be entered into the program data file. The larger the number, the slower the program will operate and the more of a chance you will have of running out of memory. Experiment with 25 or 50 and see what happens.
Also change line 6610 to read – LET S(N) = B(1) – the editing of the state will not work correctly unless this is done.
You can, of course, use the program to create as many data files as you want on tape, so there really is no limit to the amount of inputs you can have – only to the amount of cassettes you own.
There are easier and faster ways of writing this type of program, which is not always the objective of the old professor.
What he wanted to show you is that it could be done and for all the programming techniques this program uses, it is really a work of art. If you list the program and compare some of the routines with the context of that article, you will see the similarities.
This program , by changing the value of the variable in the first line, can push the memory that is being used to the limit, and may behave in an erratic fashion with a lot of OUT OF MEMORY errors, so keep this in mind when using it.
Although the program as loaded is not self running, it can create data files that, when recalled, come up running. The program MENU is explained as follows:
#1 – To Enter Or Add To A File is pretty much self-explanatory. If you have no more to enter, just press the ENTER key. The number of the entry is always displayed so that you can know how close you are coming to the limit.
#2 – This routine allows you to look at any one name in the file. If you want to change any of the data items, the routine will branch to the EDIT mode. Only one item may be edited at a time. If you have more than one, you have to go back to the MENU and start over again. The secret is not to make too many mistakes and hope not too many of your acquaintences will be moving.
#3 – If you wish to save a file, prepare to have a lot of tape available on your cassette. The reason we did not have this program self-loading is because with 95 entries (which it couldn’t handle, anyway), it would take twice as long to load.
This routine is self-prompting and will tell you to do what is necessary. If you are adding on to an existing file and it already has a file name, press enter when requested, and the old name will be used.
#4 – This command wipes out all the data in the file registers and allows you to begin a new file.
This is useful if you just saved one file and wanted to begin another one.
#5 – executes the STOP command and allows you to exit the program.
I plan to have a version available next month for sale and have already contracted the professor to write it for me. It will allow a lot more input in 16K, operate faster and be designed to print out on MINDWARE‘s new printer that uses standard adding machine paper tape.
The idea, of course, being that you will be able to print out formatted labels that you can cut apart with a pair of scissors and glue onto envelopes.
At last a practical use for your toy that you can explain to your wife to try to convince her that you really got it to be a help for her. Tell her that she can use it for her Christmas list and she will never have to write or type an address on an envelope again (when she excitedly demands that you get it, we might have our PRO FOOTBALL PICKS program ready to order at the same time for you-know-who).
#[illegible] – “STAR-LANDER“, LT – :56
This program was submitted by one of your fellow subscribers, Mr. Kenneth Duda of Northlake, IL.
Mr. Duda explains “It starts off with a background of space and stars, your space capsule (A), a flashing prompt (INPUT THRUST) and a small screen showing (F) for fuel, (H) for height and (V) for velocity.
As the capsule descends, more stars appear, giving the illusion of moving through space.
Start out by giving the ship (0) thrust to bring it down near the landing platform, but watch your height gauge as well as the velocity.
When you get about 50 feet or so, start giving it thrust – too much and you start to balloon up. It might seem like a simple game, but it will fool you. The game ends with a safe landing, showing how many points you made it in or it may show that you ( CRASHED AT XX FEET )”.
Well done, Ken.
