Part
11:
Introducing
the
Bank
Manager
....
Using
the
second
641{
of
memory
The CPC6128 contains 128K of RAM (Random Access Memory)
in
two lots of64K.
CPIM
Plus uses
the
fu11128K all
the
time,
but
BASIC does not normally use
the
second 64K - orily
the
available memory
in
the
first 64K.
It
would be a pity to leave
the
extra
64K completely unused when programming
in
BASIC,
so
a program has
been provided to make special use of
this
extra memory. The program offers some
extra commands
that
make
it
possible to use
the
second 64K of
RAM
as either a
storage space for screen images, or as a storage space for strings.
The program providing these
extra
commands is known as the 'BANK MANAGER'
where 'bank' is a technical
term
used to describe a section of memory.
Using
the
BANK MANAGER for
screen
images
The 6128 is displaying a screen image all
the
time.
To
do
this,
it
requires 16K of
memory
in
which to store
the
information about
the
colour and brightness of every
pixel (dot) on
the
screen. The 6128's memory allows up to six screen images (each
in
a
16K block) to be present
in
the
computer's memory
at
anyone
time. The BANK
MANAGER provides
the
facilities for you to juggle and display up
to
five of the six
possible screens from
BASIC.
When you first switch on,
the
screen is displayed from a 16K block of memory (which
we
will call 'Block 1') out of
the
first 64K. The other four screens are held in the second
64K of memory
and
are called Block
2,
Block
3,
Block
4,
and Block
5.
Only Block 1 (from
the
first 64K) can be used to actually display a screen. Therefore,
to
see a screen stored
in
the
second 64K (Blocks 2 to
5),
it
is necessary to move
the
required screen into Block
1.
The BANK MANAGER provides all
the
commands
needed to move screens around, such as
I S
eRE
E
NCO
P Y which simply transfers one
screen to another, overwriting
the
contents of the existing screen; and
IS
eRE
ENS
WA
P which exchanges
the
contents of two screens.
Like
the
AMSDOS commands introduced earlier
in
this chapter,
the
BANK
MANAGER uses 'external commands' which
start
with the
bar
symbol I (obtained
by typing
[SHIFn@).
Chapter
1 Page
84
Foundation
Course