EasyManuals Logo

Sinclair ZX81 User Manual

Sinclair ZX81
92 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #90 background imageLoading...
Page #90 background image
CLEAR
Deletes all variables, freeing the space they occupied.
CLS
(Clear Screen) Clears the display file. See chapter 27 concerning the display file.
CONT
Suppose p/q was the last report with a non-zero. Then
CONT
has the effect
GOTO
q if p
9,
GOTO
q+1 if p = 9 (
STOP
statement)
COPY
Sends a copy of the display to the printer, if attached; otherwise does nothing.
Unlike all other commands, a
COPY
command does not clear the screen first. There must
be no spaces before
COPY
.
Report D if
BREAK
pressed.
DIM
α
(n
1
,...,n
k
)
Deletes any array with the name α, & sets up an array α of numbers with k dimensions
n
1
,...,n
k
. Initializes all the values to 0.
Error 4 occurs if there is no room to fit the array in. An array is undefined until it is
dimensioned in a
DIM
statement.
DIM
α$(n
1
,...,n
k
)
Deletes any array or string with the name α$, & sets up an array α$ of characters with k
dimensions n
1
,...,n
k
. Initializes all the values to "". This can be considered as an array of
strings of fixed length n
k
, with k-1 dimensions n
1
,...,n
k-1
.
Error 4 occurs if there is no room to fit the array in. An array is undefined until it is
dimensioned in a
DIM
statement.
FAST
Starts fast mode, in which the display file is displayed only at the end of the program, while
INPUT
data is being typed in, or during a pause.
FOR
α=x
TO
y
FOR
α=x
TO
y
STEP
1
FOR
α=x
TO
y
STEP
z
Deletes any simple variable α, & sets up a control variable with value x, limit y, step z, &
looping address 1 more than the line number of the
FOR
statement (-1 if it is a command).
Checks if the initial value is greater (if step 0) or less (if step < 0) than the limit, & if so
then skips to statement
NEXT
α at the beginning of a line.
See
NEXT
α.
Error 4 occurs if there is no room for the control variable.
GOSUB
n Pushes the line number of the
GOSUB
statement onto a stack; then as
GOTO
n
Error 4 can occur if there are not enough
RETURN
s.
GOTO
n Jumps to line n (or, if there is none, the first line after that).
IF
x
THEN
s If x is true (non-zero) then s is executed. The form '
IF
x
THEN
line number' is not allowed.
INPUT
v Stops (with no special prompt) & waits for the user to type in an expression; the value of
this is assigned to v. In fast mode, the display file is displayed.
INPUT
cannot be used as a
command; error 8 occurs if you try.
If the first character in the
INPUT
line is
STOP
, the program stops with report D.
LET
v=e Assigns the value of e to the variable v.
LET
cannot be omitted.
A simple variable is undefined until it is assigned to in a
LET
or
INPUT
statement.
If v is a subscripted string variable, or a sliced string variable (substring), then the
assignment is Procrustean: the string value of e is either truncated or filled out with spaces
on the right, to make it the same length as the variable v.
LIST LIST
0
LIST
n Lists the program to the television, starting at line n, & makes n the current line.
Error 4 or 5 if the listing is too long to fit on the screen;
CONT
will do exactly the same
again.
LLIST LLIST
0
LLIST
nLike
LIST
, but using the printer instead of the television.
Should do nothing if the printer is not attached.
Stops with report D if
BREAK
pressed.
LOAD
f Looks for a program called f on tape, & loads it & its variables.
If f = "", then loads the first program available.
If
BREAK
is pressed or a tape error is detected, then
(i) if no program has yet been read from tape, stops with report D & old program;
(ii) if part of a program has been read in, then executes
NEW
.

Other manuals for Sinclair ZX81

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Sinclair ZX81 and is the answer not in the manual?

Sinclair ZX81 Specifications

General IconGeneral
ProcessorZilog Z80A
Processor Speed3.25 MHz
ROM8 KB
InputMembrane keyboard
StorageCassette tape
Power Supply9V DC
Dimensions167 mm x 40 mm x 175 mm
Release Year1981
ManufacturerSinclair Research
Weight350 g
Operating SystemSinclair BASIC
RAM1 KB
PortsTV out, expansion port
DisplayTelevision (RF modulator output)

Related product manuals