In addition, the Welcome software includes an envelope editor (called

ENVELOPE) which allows you to experiment with the parameters in the

envelope command.

128K BASIC

Your computer is equipped with a ROM-based version of BBC BASIC which, in

conjunction with the shadow memory facilities can access up to 64K of the

available 128K of random-access memory (RAM). Access to the remaining 64K

of paged RAM is possible using a dise-based version of BBC BASIC (referred to

as BAS128) which is provided on the Welcome disc. You should consult

Appendix 10 for more information on BAS128.

Assembly language

Although programs in BBC BASIC run very quickly, some programs -- such as

games -- need to run even more rapidly if they are to be effective. Every time

the computer runs a program written in BASIC, it has to translate (or

interpret) each statement so that it can carry out the necessary function using

routines written in the computer's internal language -- machine code. It is the

translation process which slows the computer down.

Writing a program directly in machine code means the computer need not

interpret each statement, so a machine code program runs many times faster

than its BASIC equivalent. However, writing a program as a series of numbers

is extremely difficult. Instead the program is written in assembly language.

The computer translates an assembly language program into machine code

using a built-in program called an assembler. The machine code translation of

the program can be saved on its own. When the computer next runs the

program it does not need to translate any of the instructions, and so execution

is very rapid.

Assembly language is more difficult to use than BASIC, although it results in

faster and shorter programs. Fortunately, however, your computer allows you

to mix BASIC and assembly language in one program, and it is sensible to use

assembly language only in sections of a program where speed is vital.

This brief program demonstrates the use of assembly language -- be sure to

type it in exactly as shown:

10 MODE 135

20 DIM demo 10

30 P%=demo

40 [

50 LDA #67

60 JSR &FFEE

C 66