Basic
Disk
Operating System (BDOS) Functions
The region beginning
at
paragraph
address 700H
is
now available for allocation in
the next request. Note
that
a memory request will fail
if
eight memory regions have
already been allocated. Normally,
if
all program units
can
reside in a contiguous
region, the system allocates only one region.
MEMORY
CONTROL
BLOCKS (MCB)
Memory management functions (functions 53-57) reference a Memory Control
Block (MCB), defined in the calling programs, which takes the form:
16-bit
16-bit 8-bit
MCB: M-Base
M-Length
M-Ext
where M-Base
and
M-Length are either
input
or
output
values expressed in 16-byte
paragraph
units,
and
M-Ext
is
a
returned
byte value, as defined specifically with
each function code.
An
error
condition
is
normally flagged with a OFFH returned
value in order to match the file
error
conventions
of
CP/M-80.
GET
MAXIMUM
MEMORY
ENTRY
CL: 35H
DX: Offset
ofMCB
FUNCTION
53
GET MAX
MEM
RETURN
AL:
Return
Code
The
Get
Maximum Memory function finds the largest available memory region
which
is
less
than
or
equal
to
M-Length paragraphs.
If
successful, M-Base
is
set
to
the base
paragraph
address
of
the available area
and
M-Length
to
the
paragraph
length. Register
AL
returns the value OFFH
if
no memory
is
available,
and
OOH
if
the request was successful. M-Ext is set
to
1 if there
is
additional memory for
allocation,
and
0 if no additional memory
is
available.
4-35