Command Setup and Execution Under CPIM-86
The Small Memory Model
The Small Model
is
assumed when the transient program contains
both
code
and
data
groups. (In ASM-86, all code
is
generated following a CSEG directive, while
data
is
defined following a
DSEG
directive. The origin
of
the
data
segment
is
independent
of
the code segment.) In this model, register CS
is
set
to
the beginning
of
the code group, registers DS
and
ES
to
the start
of
the
data
group,
and
registers
SS
and
SP to the CCP's stack area, as shown in Figure 2-2.
SS:
CCP
SS
+ SP:
CCP Stack
CS:
IP =
OOOOH
code
DS
ES:
base
page
DS+OI00H:
data
Figure 2-2 CP/M-86 Small Memory Model
The machine code begins
at
CS+OOOOH,
the base page values begin
at
DS+OOOOH,
and
the
data
area starts
at
DS+OI00H. The following ASM-86 example shows how
to code a Small Model transient program.
cseg
(code)
dseg
org
100h
(data)
end
2-5