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 #65 background imageLoading...
Page #65 background image
Chapter 23 - When the computer gets full
The ZX81 has a limited amount of internal storage, and it is not hard to fill it up. The best sign of this
happening is usually an error report 4, but other things can happen and some of them are rather strange.
The exact behaviour depends on whether you have a memory expansion board attached, so first let us
assume that you have not. If you have, take it off (after first switching off the computer).
The display file
, that is to say the area inside the computer where it stores the television picture, is
cunningly designed so that it only takes up space for what has been printed so far: a line in the display
consists of up to 32 characters and then a
NEWLINE
character. This means that you can run out of
memory by printing something, and the most obvious place is while making a listing. Type
NEW
DIM
A(150)
10
FOR
N=1
TO
15
20
PRINT
N
Here comes the first surprise: line 10 disappears from the listing. The listing is bound to include the
current line, 20, and there is not room for
both lines. Now type
30
NEXT
N
Again, there is only room for line 30 in the listing. Now type
40
REM
X (without
NEWLINE
)
and you will see line 30 disappear and line 40 jump to the top of the screen. It has not been entered in the
program - you still have the cursor and can move it about. All you have seen is some obscure
mechanism that gives the bottom half of the screen 24 lines to give it priority over the top half. Now type
XXXXXX (still without
NEWLINE
)
and the cursor will disappear - there is no room to display it. Type another X, without
NEWLINE
, and one
of the Xs will disappear. Now type
NEWLINE
. Everything will disappear, but the program is still in the
computer, as you can prove by deleting line 10 and using & . Now type
10
FOR
N=1
TO
15
again - it will move up to the top of the screen as line 40 did. But when you press
NEWLINE
, it will not be
entered, although there is no error message or marker to say that anything is wrong. This is the result of
there being no room to check the syntax of a line, and usually happens only for lines that contain numbers
(other than the line number at the beginning).
The only cure is to make some space somehow, but first delete the line 10 that won't go in. Press
EDIT
:
the screen will go blank, because there is no room to bring the line down.
When
EDIT
does not work it is sometimes possible to make space by typing a number of spaces until
the cursor moves up the screen.
Press
NEWLINE
, and you will get part of the listing back. Now delete the line 40 (which you didn't really
want anyway) by typig
40 (&
NEWLINE
)
Now try typing in line 10 again - and it still won't go. Rub it out again. You must still find some extra
space somewhere. Bear in mind that the reason that line 10 was rejected was probably that there was no
room to check the syntax of the two numbers, 1 & 15: so if you delete line 20 in the program you might
have room to enter line 10, and still have room to re-enter line 20 (which contains no number) afterwards.
Try this. Type
20
10
FOR
N=1
TO
15

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