Programming Tips

Author(s): Bob Swoger
Publication: Nite-Times News
Pub Details: Nite-Times News v7 n4 (Volume 7, Issue 4)
Date: July - August 1993
Pages: 7

Here are a few of my favorite RAM Saving Substitutes for you to ponder:

Instead of:         Try using:

PRINT #0;           PRINT #RND;
GOTO 3              GOTO PI
PRINT #1;           PRINT #RND;
GOTO 6              GOTO PI+PI
  0                 NOT PI
GOTO 10             GOTO PI*PI
  1                 SGN PI
GOTO 8000           GOTO VAL "8e3"
  100               CODE "d"
INK 3               INK INT PI
POKE 23658,0
                    POKE VAL"23658",NOT PI

If you are using a LarKen V2 Spectrum EPROM in your DOC port then you have a special feature not normally found in other Spectrum EPROMs. LOAD in a program with line numbered other than by 10. Also make sure that it is not using the above RAM Saving Substitutes in its GOTO or GOSUB lines. While looking at the LISTing of that program, type:

PRINT # 10

This little known command will re-number your entire program!