EasyManua.ls Logo

NEC CP/M-86 - BDOS Calls; Addressing; Program Termination

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...
CPIM-86 System Overview
BDOS
Calls
To
make
a
BDOS
system call, use
the
reserved software
interrupt
#224.
The
jump
to
the
BDOS
at
location 0005H
found
in
CP/M-80
is
not
present in
CP/M-86.
However, the address field
at
offset 0006
is
present so
that
programs
which "size"
available
memory
using this
word
value will
operate
without change.
CP
IM-80
BDOS
functions use certain 8080 registers for
entry
parameters
and
returned
values.
CP/M-86
BDOS
functions use a table
of
corresponding 8086 registers.
For
example,
the
8086 registers
CH
and
CL
correspond
to
the
8080 registers
Band
C.
Look
through
the list
of
BDOS
function numbers in
Table
4-2.
You'll
find
that
functions 0, 27,
and
31
have
changed
slightly. Several new functions have been
added,
but
they
do
not
affect existing programs.
Addressing
A
major
difference between the
two
CP
1M
operating
systems is
their
approach
to
addressing.
In
CP/M-80,
all addresses sent
to
the
BDOS
are
16-bit values in
the
range
OOOOH
to
OFFFFH.
In
CP/M-86,
the addresses are 16-bit offsets
from
the
DS
(Data
Segment) register, which
is
set
to
the
base
of
your
data
area.
If
you
translate
an
existing
CP/M-80
program
to
the
CP/M-86
environment,
the
data
segment
is
fewer
than
64K bytes. Therefore,
the
DS
register does
not
have
to
be changed
following
intialload,
and
all
CP
IM-80
addresses become simple DS-relative offsets
in
CP/M-86.
Program
Termination
Under
CP/M-80,
programs
terminate in one
of
three ways:
return
directly
to
the
CCP;
call
BDOS
function
0;
transfer control
to
absolute location
OOOOH.
CP/M-86,
however,
supports
only
the
first two methods
of
program
termination.
Consequently, the
automatic
disk system reset
that
follows
ajump
to
OOOOH
is
not
performed.
Instead, disk system reset is accomplished by entering a
CONTROL-C
at
the
CCP
level.
Many
new facilities in
CP
IM-86
simplify
programming
and
expand
application
programming
capability.
CP/M-86
was designed
to
make
it
easy
to
get started.
If
you
are
converting from
CP
1M
-80
to
CP
1M
-86, there are
no
major
changes
beyond
the
translation
to
8086 machine code.
1-5

Table of Contents

Related product manuals