Member’s Hints and Tips

Publication: LISTing Newsletter
Date: September 1989
Pages: 5

The following Spectrum, Hints and Tips come from National Software Library 42 Harefield Road, Chean, Surrey, /SM2 7NE, UK and were submitted by several of their members.

MEMBER’S HINTS AND TIPS.

So many members have sent tips for the newsletter we would need 8 pages to list them all! It’s been quite a job to try and check them all and pick out the tups to include. Our thanks go to ALL who have sent tips. All the contributions published will gain free hire vouchers for the respective member.

LET a=USR 3280 or RANDOMIZE USR 3280 or LET a=USR 3582
Scrolls the screen display up one line, use a FOR-NEXT
loop to scroll several lines.
LET a=USR 3330   Scrolls page to top line
LET a=USR 3583   Scrolls bottom half page, one line.
LET a=USR 3652   Clears top half of screen
POKE 23562,1     Fast auto repeat.
POKE 23561,0     Disables auto repeat
INK 9            Sets INK to contrast PAPER colour

POKE 23736,181 When making multiple SAVEs, eg with several blocks of data in a programme, add this instruction between SAVE commands. The SAVEs will then be carried out automatically without the need to ‘Press a key’ between each one. It sometimes helps to also use a PAUSE command, as the programmes will be very close together on the tape.

RANDOMIZE n; Is equivalent to POKE 23670,n-256xINT (n/256),POKE 23671 INT (n/256) A useful short cut to those 2 byte calculations. PEEKing those addresses will provide the neede figures without any human intervention.

An interesting and rather ‘pretty’ bug exists in the way the DRAW command executes it’s arc making facility; Try this short routine.

10 INPUT "Any odd number";n
15 CLS
20 PLOT 75,50: DRAW 100,100,PI*n
30 GO TO 10

Having RUN this programme, try adding the following line. 5 OVER 1

Try INPUTing these numbers. 253,237,375,275,287,157, and EXPERIMENT!

POKEing the MODE system variable immediately before an INPUT command will change the character of the cursor. Try these.

POKE 23617,142   Poond sign £ (CHR$ 96)
POKE 23617,240   Dollar sign  (CHR$ 36)
POKE 23617,252   Less than sign  (CHR$ 60)
POKE 23617,253   More than sign  (CHR$ 62) followed
                 by less than sign (CHR$ 60)
POKE 23617,238   Flashing blank square
POKE 23617,223   Question mark
POKE 23617,190   The word USR  (CHR$ 192)
POKE 23617,192   The word BIN  (CHR$ 196)
POKE 23617,208   The word DATA (CHR$ 228)

By interspersing a CHR$ number between two strings for PRINTing intersting and useful relationships may be produced. i.e. PRINT “X”;CHR$ z;”Y”

Set variable z as required, and change in the prog.

i.e.  z = 6 is equivalent to PRINT "X","Y"
      z = 8 is equivalent to PRINT "X" then PRINTing
            "Y" on top of it.
      z = 9 is equivalent to PRINT "X";"Y"
      z = 13 is equivalent to PRINT "X"'"Y"

10 PRINT (((PEEK 23732+256*PEEK 23733)+1)/1024)-16

This PRINTs the memory size of your SPECTRUM exactly.

POKE 23624,120 Gives a BRIGHT window at bottom of screen (Lines 22 & 23)

PRINTing to the bottom two lines may be achieved with

PRINT #1; AT 0,0; (text or variable) for LINE 22
PRINT #1; AT 1,0; (text or variable) for LINE 23
(This can be used up to PRINT #1; AT 22,31; )

PRINT #2; gives normal screen PRINTing, and PRINT #3; is the same as LPRINT. Therefore, the instruction PRINT n; can be included in a programme to give bottom line printing, normal screen printing or LPRINTing, depending on the value of ‘n’. This saves time and memory.

LET t=7997-USR 7997 this gives the number of 50ths of a second it took for a key to be pressed. (Just PRINT t for the result)

For a = 0 TO 255: OUT 254,a:NEXT a This causes an interesting BORDER effect.

10 BORDER 1: BORDER 2: BORDER 3: BORDER 4: BORDER 5: BORDER 6: BORDER 7: BORDER 0: PAUSE 1: GO TO 10

This also gives an interesting BORDER effect, try altering the length of the PAUSE.

LET a = USR 1278 gives a LOADing pattern. Try these other numbers as well. 1248,1251,1276,1301,1303,1305, 1306,1308,1312,1314,1315,1490,1491,1492,1488, etc. etc.

LET a= PEEK 23613-2: POKE 23613,a This will disable the BREAK key.

POKE 23692,n (‘n’ = maximum of 255) This overides the ‘Scroll’ message for ‘n’ times.

A tip to spped up the play in ‘Murder at the Manor’

1. BREAK into the programme
2. LIST 330, and BREAK scroll
3. EDIT, and add at the beginning of LINE 330 RETURN
4. Type GO TO 80 and the game will be faster, by removing the colour paint routine in the graphics.