EasyManua.ls Logo

NEC CP/M-86 - Example Memory Allocation

NEC CP/M-86
280 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
Loading...
Basic Disk Operating System (BDOS) Functions
Once memory
is
physically mapped
in
this manner,
CP/M-86
performs the second
level
of
dynamic allocation
to
support
transient
program
loading
and
execution.
CP
IM-86
allows a dynamic allocation
of
memory into eight regions. A request for
allocation takes place either implicitly
through
a
program
load
operation,
or
explicitly
through
the BDOS calls given in this section. Programs themselves are
loaded in two ways: through a
command
entered
at
the
CCP
level,
or
through
the
BDOS
Program
Load
operation (function 59). Multiple programs can be loaded
at
the
CCP
level, as long as each program executes a System Reset (function
0)
and
remains in memory
(DL
= OIH). Multiple programs
of
this type receive control by
intercepting interrupts,
and
thus
under
normal circumstances there
is
only one
transient
program
in memory
at
any given time. If, however, multiple programs are
present in memory, then
CONTROL-C
characters entered by the
operator
delete
these programs in the order opposite
that
in which they were loaded no matter
which program
is
actively reading the console.
Any
program
loaded through a
CCP
command can, itself, load additional pro-
grams
and
allocate
data
areas.
For
example, suppose four regions
of
memory are
allocated in the following order.
(I)
A program
is
loaded
at
the
CCP
level through
an
operator
command.
The
CMD
file header
is
read, the entire memory image consisting
of
the
program
and
its
data
is
loaded in region A,
and
execution begins.
(2) This program, in
turn,
calls the BDOS
Program
Load
function to load
another
program into region
B,
and
transfers control
to
the loaded
program.
(3) The region B
program
then allocates
an
additional region, C, followed
by a region D. The
order
of
allocation
is
shown in Figure 4-1.
Region A
Region B
Region C
Region D
Figure 4-1 Example Memory Allocation
4-33

Table of Contents

Related product manuals