Basic Disk Operating System (BDOS) Functions
4-34
There
is
a hierarchical ownership
of
these regions. The
program
in A controls all
memory
from A
through
D.
The
program
in B also controls regions B
through
D.
The
program
in A
can
release regions B
through
D,
if
required,
and
reload yet
another
program.
(DDT-86, for example, operates in this
manner
by executing
function 57, the Free Memory call, to release the memory used by the
current
program
before loading
another
test program.)
Further,
the
program
in
Bean
release regions C
and
D
if
required by the application. However,
if
either A
or
B
terminates by a System Reset (BDOS function 0 with
DL
=
OOH),
then all
four
regions A
through
D are released.
A transient
program
may release a
portion
of
a region, allowing the released
portion
to
be assigned
on
the next allocation request.
The
released
portion
must, however,
be
at
the beginning
or
end
of
the region. Suppose, for example, the
program
in
region B in the previous example receives 800H
paragraphs
at
paragraph
location
100H following its first allocation request, as shown in Figure 4-2.
Length =
8000H
!-IOOOH:
Figure 4-2 Example Memory Region
Region C
Suppose further
that
region D
is
then allocated. The last 200H
paragraphs
in region
C can be returned without affecting region D by releasing the
200H
paragraphs
beginning
at
paragraph
base 700H, resulting in the memory arrangement shown in
Figure 4-3.
Length
=
6000H
Length =
2000H
:----1000
H:
1
__
7000H:
Figure 4-3 Example Memory Regions
Region C
111111/11/1
1111111/1/1