. . .
and
the
answer
will be
3583
With no
program loaded, there are 3583 memory locations available
for use. The difference
in
memory
space between 3583 and
4096
is set
aside for processing programs
and overall
management
and
"monitoring"
of what the Computer is doing.
Type
in this
simple program:
10 A =
25
then measure the
memory
remaining by typing
PRINT
MEM
. . .
the answer will be
3573
The
program you entered
took 3583
—
3573
=
10
bytes of space.
Here
is how you
can
account for it:
1. Each line number and the space following it (regardless of
how
small or large that line
number
is)
occupies
3
memory cells.
The "carriage return" at the end of the line takes
1 more byte, even though it does not print on the screen. The memory "overhead"
for
each line, short or long, is 4 bytes.
2. Each letter, number and space takes 1 byte.
In the
above program 4
+
6
=
10
bytes.
Enter
this additional line, leaving in line
10,
and calculate the
amount
of
space remaining in
memory.
Then check it
with
the PRINT MEM command.
20
PRINT "THIS EXAMPLE
IS
TH
MEASURE
MEMORY
USAGE."
How
much
space is left in memory????
..
Answer:
Line
10
took
up
10
bytes.
Line
20
takes
4
bytes
for
"overhead"
+
48
characters
52
bytes.
52
+
10
=
62
bytes, 3583
—
62
=
3521
bytes. Type
CJR01S:
H
you
don't
get this
answer
(fosr
example
as
:very
large number
or
one
wiih
a
—
iait^iurn
tfte
/
Computers
POWER off
for
at
least
1$
second
and
then
turn
it
on
again.
Try
PRI NT
MEH
once more.
[If your TItS*330
has
more
RAM,
you
>
can expect
a
larger number, as
follows:
.
8K
RAM: 7679
:.:^-M
:
;.^i^RAMpi^7!^;--
'-;:;
>^f
!>:.-
.
::^
;
'
;
;
;
4j
:
-$if
te
:
T7T
:
fe
the
basic unit of storage
for
most l
„
...
:;iJsteis; normally
it is
considered
as a
staring of eight-;
binary digjts
(MtsjL
Thus
a byte
=?.
8
bits.
39