RUNning with Reduced RAM
Dear Editor:
I would like to suggest a different method of lowering the RAM under which a program is SAVEd (“RUNning with Reduced RAM,” SYNC 3:4), especially if variables prevent it from being lowered. LOAD the program into 16K and CLEAR the variables. Reset RAMTOP by POKEing locations 16388 and 16389. Then SAVE the program without the recorder running. Finally SAVE the program to tape under the reduced RAM.
Ed Haymore
[address omitted]
Cupertino, CA
Robert Hartung—Another suggestion came from John Oliger, who has frequently written technical articles for Syntax/SQ: Set up a new minimal display file before SAVE by POKEing the RAMTOP address without using NEW, then CLS, then SAVE. By POKEing 16389 with a value from 68 through 76, without NEW, and either before or after a program is listed, and after a CLS, SAVEing time will be reduced by 15 seconds.
This method will SAVE the listing along with any defined variables or arrays which exist above the pseudo-RAMTOP, but such a SAVE can only be LOADed back into a full 16K RAM, or at least a RAMTOP definition large enough to hold all of it, including defined variables and arrays. This is no problem if less than 3.25K RAM is required; but, when a listing requiring more than 3.25K RAM is SAVEd with the display file collapsed, it can take up to 45 seconds upon reLOADing for the display file to expand and the other system files to relocate before the program can RUN. This is also true if the display file is collapsed by a 22-SCROLL loop.
To be sure, NEW is not needed to reset the RAMTOP registers if the only purpose is to establish a minimal display file before a SAVE, but there are additional advantages to the procedure. Moving RAMTOP below 3.25K (with or without NEW) reduces the time required by CLS. This speeds up Basic moving graphics routines that use CLS repeatedly. Furthermore, using NEW when resetting the RAMTOP registers prevents overwriting any data or routines (e.g., a bytes remaining routine) in the upper memory area by a lengthy programs, large DIM definitions, or system files. Resetting RAMTOP with NEW to 1K or 2K makes it unnecessary to remove the 16K RAM pack when writing programs for the unexpanded machine.
So I believe the original premise of my article is still valid.
Brick Busters
Dear Editor:
I would like to suggest some improvements to Paul Thomson’s “Brick Buster” (SYNC 3:5). It is a fine program while working in assembler, but it is simply too slow when it switches to Basic.
As an alternative when it computes the score, delete lines 220-250 and then enter these lines:
5 LET D=PEEK 16396+256*PEEK 1
6397
220 LET S$=CHR$(PEEK(D+2))+CHR$
(PEEK(D+3))+CHR$(PEEK(D+4))+CHR$
(PEEK(D+5))
230 LET SCORE=VAL S$
This modification will be at least 50 times faster, and (may I say it?) more elegant.
The field can be drawn instantaneously by adding these lines.
2 REM (52 characters)
1000 FOR X=16790 TO 16841
1010 INPUT A
1020 POKE X,A
1030 PRINT PEEK X;" ";
1040 NEXT X
Press RUN 1000 and ENTER. Then enter the following numbers: 42,12,64,35,54,131,35,6,30,54,131,35,16,251,54,4,35,35,6,7,54,133,35,14,30,54,8,35,13,32,250,54,5,35,35,16,239,17,31,0,6,13,54,133,25,54,5,35,35,16,247,201.
Delete lines 70-130 and 1000-1040 and add:
100 RAND USR 16790
110 PRINT AT 0,1;"0000"
If you do not like the black blob used as the ball, just POKE the value 52 to locations 16589, 16663, 16681, and 16708.
SAVE and then RUN and have FUN.
I enjoy your publication very much, and I am especially interested in articles on machine language. Keep up the good work.
Salvatore Cimmino
[address omitted]
St-Leonard, P.Q., Canada
Help
Dear Editor:
Does anybody know the American equivalent to the ZTX-750 or ZTX-752 transistor used in the 16K RAM pack as the heart of the built-in oscillator/power converter for producing the +12V and -5V required for the memory chips in the RAM pack?
J. L. Peeler
[address omitted]
San Jose, Costa Rica
Dear Editor:
I have noticed that most other computers have a POKE command that disables their break keys. Is there any such command for the TS1000? If so, what is it? Also, is there a program for the TS1000 that lets you create your own characters?
Brian L. Daniels
[address omitted]
Raleigh, NC
Dear Editor:
It is true that Basic is the most popular and well-supported language for the ZX/TS computers, but, given the power of these mighty little machines, it is evident that much more can be done with them.
Specifically, in the language area, implementations with Forth, partial Pascal, and Logo have been produced. A British company recently advertised a subset of Lisp available only in Britain.
These developments certainly whet my appetite, and probably many others are interested in these additions to the range of applications. I am looking for full implementations or subsets of any of the major languages, and even some of the lesser ones, which are usable on the ZX/TS computers, particularly PL/1, APL, Cobol, Fortran, Lisp, “C”, Ada, and Prolog.
Peter Marinelli
[address omitted]
Bronx, NY
Upgrading Problem
Dear Editor:
What are people going to do with all those ZX81s and TS1000s when they move up to larger systems? Someone needs to develop a robot or other toy that can incorporate the computer instead of letting it waste away in a closet.
Glenn A. Osborn
[address omitted]
Toledo, OH
How about someone hooking it up with TS2068? Or how about using it to help someone enter the computer age by passing it along to a niece, a nephew, a neighbor, a retired person, the local public library (some are checking them out like books), the local public school (along with SYNC and details about the TEC Newsletter?)
Inverse Matrix
Dear Editor:
In SYNC 3:6 Michael Miller asked for a program that would find the inverse of a matrix. Being an avid Sinclair programmer, I took it as a challenge and wrote a program that calculates and displays the inverse of a 3×3 matrix as well as its determinant. Interested readers may contact me.
Robert H. Thompson
[address omitted]
Lake City, FL