Help Wanted
Dear Editor:
As a rank amateur when it comes to computers, I wish to extend my thanks to SYNC for without it, I would probably just sit and stare at my ZX80 (8K ROM).
However, when it comes to programming, I am left out in left field. I have received some help from Radio Shack’s Computer Programming in Basic for Everyone but some of the commands will not work, and I do not know how to convert them.
I would like to suggest that SYNC should feature an elementary course in programming for us duffers so that we may more fully enjoy our ZX80s.
Clifford Rose
[address omitted]
New York, NY
Ed.—Your desire for programming help is shared by many of our readers. We are always looking for articles to help programmers at a variety of levels and for articles to help translate other Basics to the Sinclair version.
Dear Editor:
I have a ZX80 with an 8K ROM and 16K RAM. I would like to interface this with an Exatron stringy/floppy mass storage system. Do you know anyone who has done this and could help me? Do any manufacturers provide a card that would plug between the 16K RAM so that one could access the floppy files directly from software?
Jonathan A. White
[address omitted]
Wilder, VT
Ed. — We have not received any information on either point. If any reader can help, please drop a line to SYNC.
SGN and Inventory
Dear Editor:
David Ornstein is being a bit heavy handed in his SGN subroutine. When a number is divided by itself the answer is 1 and when a number is divided by its ABSolute value the answer is +1 or -1 according to the sign of the number. The only exception to this is zero. So all that is required in Listing 5 is
500 IF N=0 THEN LET SIGN=0
510 IF NOT N=0 THEN LET SIGN=N/ABS(N)
Next, I have five points on Dr. Justham’s “Inventory.”
1) I cannot see any need for lines 370-375 and similar. It seems to me that as line 310 puts N equal to the number of items then line 332 could read
FOR B=1 TO N
Lines 370-375 would then be unnecessary.
2) Line 3044 need not set up such a large array. DIM M$(1,J) is quite enough. Then in lines 3052 and 3068 use M$(1).
3) The possible error report confusion handled by the prompt in line 400 can better be handled with PEEK 16442. This returns the number of lines left on the screen including the two used for input only. So one could use:
435 IF PEEK 16442=4 THEN GOSUB 4000
4000 PRINT "PRESS NEWLINE TO CONTINUE"
4005 INPUT A$
4010 CLS
4015 RETURN
4) The note on line 305 says that the extra I$ and Q$ are needed for the “Delete” routine to run properly. But that routine could be amended by deleting lines 1800 and 1810 and continuing:
1820 FOR B=Y TO N-1
1830 LET I$(B)=I$(B+1)
1835 LET Q(B)=Q(B+1)
1850 NEXT B
1855 LET I$(N)=""
1860 LET Q(N)=0
1900 LET N=N-1
etc.
5) Since the number 150 is used a number of times, memory savings can be made by adding
8 LET T=150
and then use T wherever 150 is used. This will save bytes whenever a given number is used four or more times. It has the added advantage that, if you want to change the 150 to some other number, you do not have to change all the lines.
Dr. Justham says that the program will handle up to 150 items so I assume that the 16K RAM is pretty well filled. If the suggestions above are used, a good bit of memory can be recovered, and thus the list can be extended.
Theodore F. Tott
Dadson and Butler
[address omitted]
Gosport, Hampshire, United Kingdom