EasyManua.ls Logo

AMSTRAD CPC464 - Page 64

AMSTRAD CPC464
249 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1.2.5 Back to the program !
The result of the first program you have typed looks rather untidy. Theres still the remains of the
wake up message at the top of the screen. It looks tidier if we wipe the screen clean before we
started the program running. Well add one line to the program to fix this.
Type the following in on the line where the cursor rests (the cursor is the solid block immediately
underneath and to the left of the Ready prompt message, and if you didnt know that, what are you
doing reading this before the foundation section??):
5 CLS
RUN
See how the screen clears completely this time before writing the character set starting at the top
left.
This also demonstrates one of the most understanding aspects of the BASIC programming language,
namely that it does not matter in which order you enter the program line numbers - and you dont
actually need to have the program displayed, to add to it once its been entered into the memory.
The computer always sorts the line numbers into strict numerical sequence before it starts to
execute the program. Check by using the LIST instruction.
1.2.6 LISTing
You can easily check to see what the computer has stored in its program memory by asking it to list.
Type:
LIST
and the result on the screen is:S
5 CLS
10 FOR N = 32 TO 255
20 PRINT CHR$(N);
30 NEXT N
Ready
This program will stay in CPC464s memory until you either:
- Switch off
- RESET - by pressing [CTRL][SHIFT][ESCAPE] in sequence and holding each down after it has
been pressed until the reset occurs.
- LOAD or RUN a program from the cassette unit
- TYPE N E W [ENTER] which resets all variables and clears the program memory without
resetting things like the display mode and the colours.

Table of Contents

Other manuals for AMSTRAD CPC464

Related product manuals