Letters

See all articles from SYNC v1 n4
Author(s): Ken Berggren; Richard McDaniel; Walter Bacon; Joseph Dell'Orfano; Mark Kleinman; A. Samereu; William Caskey; William Byrne; Richard Barton
Publication: SYNC
Pub Details: SYNC v1 n4 (Volume 1, Issue 4)
Date: July/August 1981
Pages: 4-5

Gauntlet and USR(47)

Dear Editor:

My Gauntlet program in your May/June issue can be greatly improved by using the technique described on page 6 of the same issue. On that page, Hasse Taube says that USR(47) will return the end of variables address. But the end of variables is right next to the start of the display file. That makes my machine language routine unnecessary.

The machine language routine made entering the program difficult and listing the program dangerous. But if you change line 900 to: 900 LET D=USR(47)+2, then you can ignore the subroutine loader and decimal listing and also delete line 1.

This is another example of how SYNC helps get the most out of the ZX-80. My thanks to Michael Kirkland, Hasse Taube and, of course, to SYNC.

Ken Berggren
[address omitted]


Widgeteconomics

Dear Editor:

. . . I greatly enjoy your magazine; however, I have found a few problems. In running the Widget program I have never been able to even break even. It is a challenge just to keep from going bankrupt. Is the program listing just advertisement?

Another thing I would like to see in your future articles is how to convert either mechanically or through a machine code subroutine the screen to active instead of going blank during runs.

Richard McDaniel
[address omitted]

Ed.—A number of readers of Widget have found it quite challenging. See Reader Bacon’s letter below. It seems that to remain solvent and become a successful capitalist, you must make some minor program changes.

The conversion you ask for would cost more than the original computer, according to our sources. So it does not seem practical at this point.


Dear Editor:

. . . Widget—NEAT PROGRAM! No mistakes, but it is impossible (mathematically) to ever progress from those starting conditions. You can only minimize your losses to last as long as possible before bankruptcy overtakes you. The game is a good challenge if you start with two plants (or other assets like inventory) . . .

Game of Life. You printed a program from Thirty Programs for the Sinclair ZX80 1K. The book Addendum Page makes corrections in lines 450 and 460 (See Glitchoidz Report). However, even with these corrections the program does not follow the logic rules although it does run. To change the program so it follows the rules make the following corrections:

320 IF ((I+I/7) AND 7)=0 THEN GO
TO 350
340 IF ((I-1+(I-1)/7) AND 7)=0 THEN
GO TO 360
360 FOR J=6 TO 8
400 IF (J*R=-8 OR J*R=6) AND ((I-1+
(I-1)/7) AND 7)=0 THEN GO TO
420
405 IF (J*R=8 OR J*R=-6) AND ((I+I
/7) AND 7)=0 THEN GO TO 420

If you do this and the publisher’s changes in 450 and 460, the program will follow the rules in the article.

Walter W. Bacon
[address omitted]

Ed.—For those who cannot abide by the decisions of the free market place and face bankruptcy fearlessly, a bit of Widgeteconomics can be performed by tinkering with the program to improve the market position. According to my program advisers, increase P in line 10 and/or change line 640 to read LET M=M-20*P-15. You can also try a number lower than 15.


Artillery and Black Hole

Dear Editor:

The Artillery game depletes my 1K of RAM after about 5 or 6 turns. After searching through the listing for a mistake in my typing, I came up with the following changes:

Omit: Line 140

Change line 320 to: 320 GO SUB 150

Add: 80 DIM S(21)

The program should now work without any difficulties.

Also, the program Black Hole by Bill Eckel will run in 1K of RAM if the following changes are made:

Omit 5, 14, 16, 18, 30, 32, 34, 1025, 1130 & 1140

 100 LET B=S+1-2*(S/2)+2*(S/6)
+4*(S/8)-3*(S/9)
110 GO SUB 980
120 LET B=S+3-2*(S/2)+(S/3)+3*
(S/4)-4*(S/5)+5*(S/6)-5*(S/7)
+2*(S/8)-5*(S/9)
130 GO SUB 980
140 LET B=S+4-6*(S/2)+5*(S/3)-
(S/4)+5*(S/5)-6*(S/6)+7*(S/7)
-2*(S/8)+2*(S/9)
150 GO SUB 980
160 LET B=0
170 IF S=5 THEN LET B=8
180 GO SUB 980
960 GO TO 25

1075 IF X(I+5)=0 THEN RETURN

Or, as David Lubar might want to write it:

100 LET B=-2*(S=1)-(S=2)-2*(S=3)
-(S=4)-2*(S=5)-3*(S=6)-4*(S=7)
-7*(S=8)-5*(S=9)
120 LET B=-4*(S=1)-3*(S=2)-5*
(S=3)-7*(S=4)-4*(S=5)-9*(S=6)
-5*(S=7)-9*(S=8)-6*(S=9)
140 LET B=5*(S=1)-6*(S=3)-6*
(S=5)-8*(S=7)-8*(S=9)

Replace lines 160 and 170 with:

160 LET B=-8*(S=5)

Lines 100,130,150, and 180 remain as in the first change.

As you can see, David Lubar’s article about Boolean operations has been used to a great extent in shortening Black Hole.

Joe Dell’Orfanio
[address omitted]


Dear Editor:

Bill Eckel’s Black Hole (SYNC 3:8) can be compacted to fit in less than 1K of memory, thus making it fit neatly into an unexpanded ZX-80. The following conversions should work:

Changes: 20   LET X(5)= -1
44 IF X(I) THEN PRINT
"*";
46 IF NOT X(I) THEN
PRINT 0;
78 IF NOT X(S) THEN GO
TO 70
980 IF NOT X(B) THEN GO
TO 986
983 IF X(B) THEN LET
X(B)=0
986 LET X(B)= -1
1010 IF X(I) THEN GO TO
1050
1050 IF X(5) THEN RETURN
1070 IF NOT X(I) THEN
RETURN
1100 IF NOT X(I) THEN
RETURN
1120 PRINT "YOU WIN"

I used the first conversion as it was my own, and I hadn’t yet read Mr. Lubar’s article. I have found no problems in the playing of Black Hole after the conversion was made. I have also found that any one of the possible solutions is actually two solutions… just reverse the order. Happy Star-Shooting.

Mark Kleinman
[address omitted]


Basic Computer Games on the ZX80

Dear Editor:

Please tell me if the programs in Basic Computer Games and More Basic Computer Games work on the Sinclair ZX80 and VIC-1001.

A. Samereu
[address omitted]

Ed.—These programs will not work directly on the ZX80 for two reasons. First, they must be translated, that is, adapted to the specific form of Basic that the ZX80 uses. This is not difficult after you get some experience in programming and after you put SYNC articles to work for you. Second, many programs even when translated will require more than 1K RAM. So before you enter a program, you can give it a rough check for size by comparing it to a 1K program printed in SYNC. If you want to be more precise, you can count the bytes in the translated program. The line entry requires 2 bytes; each keystroke in the line content counts as one; the NEWLINE entry adds one more.


LED Fringe Benefit

Dear Editor:

I added the LEDs to monitor tape input as described by Cecil Bridges in the initial issue of SYNC. An additional advantage of this modification that he did not mention is that it eliminates the need to disconnect the ear cable on the recorder in order to position a tape for program loading (if you have a tape recorder with a digital counter). Simply advance the tape to the appropriate number on the counter, type LOAD, start the recorder, and when the red light goes out type NEWLINE.

William H. Caskey
[address omitted]


Memory Mapping

Dear Editor:

The one thing I’d really like for your editors to address is how we get information into the ZX80 from the outside world using memory mapped input. I’m afraid to use the same approach for input that I used for output (i.e., writing to a nonexistent ROM address) because when I PEEK(4097) I get 64 decimal. This implies to me that somebody is on the data bus (at least D5). I’m afraid to put anything on the data bus for fear of having two chips on the bus at the same time and damaging someone. Of course I don’t have a circuit schematic with the ZX80 so I can’t really decide whether or not the risk exists or whether D5 just appears high because one tristate doesn’t clamp all the way. Can you sell me a schematic for the ZX80?

William Byrne
[address omitted]

Ed.—A suggestion from David Ornstein: Put the memory map input port in any address between 12 and 16K.

Schematics of the ZX80 are available at no charge from Sinclair Research Limited, 50 Staniford St., Boston, MA 02114.


SYNC Coverage

Dear Editor:

. . . I hope that all the new products coming out will not affect your policy of sticking to the basic machine. Anyone with new ROM can, I think, easily translate old ROM programs, whilst the converse is not always possible. I hope that you could follow the ideas of Interface the National ZX80 Users Club magazine over here and produce mainly 1K programs with an occasional 4K or more.

One thing I would like to see in SYNC is more attention given to PEEK, POKE, and USR. Most people can devise a program just using Basic, but if you have no knowledge of machine code or the Z-80, such as Ken MacDonald’s EXCELLENT space intruders program advertised p. 19 [issue 1], are unintelligible—all I know is that they work . . .

I hope the ZX80 . . . catches on over in the States as well as it has here; if the example set by the TRS-80, PET and APPLE is anything to go by then we’re in for a good deal of excellent American software—especially from Creative Computing!

Richard J. Barton
[address omitted]

Ed.—While the scope of SYNC must grow to meet the needs of our readers as they also grow in knowledge of the machine and expand their equipment, we will not leave behind the people with the basic ZX80 nor those people who are new to computing. Again, authors take note. PEEK, POKE, and USR are among the most frequently requested topics for articles.