Run; List - AMSTRAD cpc 6128 User Instruction

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

On the screen you will see:
he L L
0
The quotation marks"" are used to tell the computer what should be printed.
he L L
0
appeared on the screen as soon as the [RETURN] key was pressed. Type in:
c
L
s [RETURN]
.... to clear the screen.
RUN
The previous example showed a single instruction line. However, as soon as the
[RETURN] key was pressed, the instruction was carried out then forgotten.
It is
possible to store a series of instructions in the computer to be carried out in a specified
order. This is achieved by writing a 'program'. The sort of BASIC instructions that
you write in a program are the same as just shown, but in front c;>f each instruction
line, a line number is typed in. If there is more than one line in the program, these line
numbers tell the computer the order in which to carry out or 'run' the program. When
[RETURN] is pressed, the line is stored in the memory until the program is run. Now
type in:
1 0
pr
i
n
t "h
eLL
0"
[RETURN]
Notice that when [RETURN] was pressed, he L L
0
was NOT printed on the screen,
but instead was entered into the computer's memory as a one-line program. To carry
out that program, the word run must be used. Type in:
run [RETURN]
. I
--Y:ou·will nowsee -he-L-L-oprintedonthescreen;- . - . . - -----.-----
Note that instead of continually typing in: pr; n
t,
you can use the? question-mark
symbol, for example:
10 ? "he L Lo"
[RETURN]
LIST
After a program has.been stored in the memory, it is possible to check what has been
typed in by 'listing' the program. Type in:
.
Lis
t
[RETURN]
On the screen you will see:
10 PRINT "heLLo"
.... which is the program stored in the memory.
Foundation Course
Chapter 1 Page 23

Advertisement

Table of Contents
loading

Table of Contents