

   1 REM Software City
         Orange Border
      by Jason Richardson & Barry Morcom
    from Computer Choice, March 1984

My friend Jason Richardson and I, Barry Morcom, have written a short program
using the OUT 254 command. The program produces an orange border and a BEEP.
This program is for the 16K and 48K Spectrum.


----------


   1 REM Software City
         Redefined Character Set
      by Kai Weber
    from Computer Choice, March 1984

IN THE January '84 edition of Computer Choice, you asked if anyone knew of a
use for "POKE 23606,x: POKE 23607,x" on the Spectrum. On the tape I have shown
a use for these POKEs, but first let me explain a little bit about locations
23606/7. If you look at page 173 of the manual you will see it is entitled
"The System Variables" and at the very bottom you will see the name "CHARS".
To the left of that you will see its address - 23606 - and that it occupies 2
bytes of memory.

Under the heading "Contents" it says about CHARS "256 less than address of
character set (which starts with space and carries on to the copyright
symbol). Normally in ROM (at address 15360) but you can set up your own
(referring to a character set) in RAM and make CHARS point to it." Basically
what this is saying is "the place from where the computer gets its character
data." The program on the tape illustrates the character set being redefined.

As you probably already know, each character is made up of an eight by eight
grid of pixels, so it is possible to use the PSION character generator
program to design characters. There are 96 characters in all that can be
re-drawn, so that means that 768 bytes (96x8) are required to store a
complete character set. The best place to store the data is just below the
UDGs, so that is the reason for the "CLEAR" command in line 10.

Because the first 32 characters are non-printable, CHARS has to be POKEd
(using the method on p.173) to 256 less than the first character (32x8=256).

If you decide to try defining your own character set, you will need to look
on pages 183-186 to see which order the characters come in. Remember, you can
only define as far as the copyright symbol. If you are stuck for inspiration
for a character set, why not flick through a Letraset catalogue?

Kai Weber, Reading, Berkshire.

P.S. To save the character set without the basic program type:

	SAVE "CHARS" CODE USR "A"-768,768

It is important to have lowered RAMTOP by using "CLEAR USR "A"-769" before
the code is loaded into your own programs, otherwise the BASIC might
overwrite the character set.


----------


   1 REM Software City
         Scrolling Routine
      by Andrew Radford
    from Computer Choice, March 1984

This program is a useful scrolling routine for the Spectrum.


----------


   1 REM Software City
         White Noise Generator
      by Kai Weber
    from Computer Choice, March 1984

I have written an all machine code "white noise" generator. The routine uses
OUT 254 in machine code, going through the ROM and outputting all the numbers
to port 254. The routine is stored in a REM statement and when disassembled
takes the form:

23760 LD   BC,0    point first memory into BC
23763 LD   A,(BC)  get contents of (BC) into A
      LD   E,A     put A into E
      LD   A,7     put BORDER colour into A
      OR   E       mask last three bits to equal 111 (BORDER 7)
      OUT  (FE),A  output to speaker, contents of A
      LD   A,55    put last memory address (of ROM) into A
      CP   B       compare it with B
      RET  Z       return to BASIC if the same
      INC  BC      increment memory address
      JP   23763   jump back to start

To get the routine into the computer, simply type in the following:

   1 REM at least 20 characters here
  10 FOR f=23760 TO 23777
  20 READ a: POKE f,a
  30 NEXT f
  40 DATA 1,0,0,10,95,62,7,179,211,254,62,55,184,200,3,195,211,92

Once run, line 1 should have turned into garbage. Now delete lines 10-40.
The program has used the ZX-81 trick of storing code in a REM statement,
so that it can be merged easily into other programs. To call the sound effect,
type "RANDOMIZE USR 23760". If you wish to amplify the sound, connect the MIC
lead to the recorder, disconnect the EAR lead, turn the volume right up and
press PLAY.

Kai Weber, Reading, Berkshire.


----------
