The 8080 Memory Model - NEC CP/M-86 System Reference Manual

Advanced personal computer
Table of Contents

Advertisement

Command Setup and Execution Under CPIM-86
The 8080 Model supports programs which are directly translated from CP IM-80
when code and data areas are intermixed. The 8080 model consists of one group
which contains all the code, data, and stack areas. Segment registers are initialized
to the starting address of the region containing this group. The segment registers
can, however, be managed by the application program during execution so that
multiple segments within the code group can be addressed.
The Small Model is similar to that defined by Intel, where the program consists of
independent code and data groups. The Small Model is suitable for use by programs
taken from CP IM-80 where code and data are easily separated. The code and data
groups often consist of, but are not restricted to, single 64K byte segments.
The Compact Model occurs when any of the extra, stack, or auxiliary groups is
present in a program. Each group may consist of one or more segments, but if any
group exceeds one segment in size, or if auxiliary groups are present, then the
application program must manage its own segment registers during execution in
order to address all code and data areas.
In all three models, local stacks are required in user programs that make BDOS calls
since the BDOS may change information in the system stack.
The three models differ primarily in the manner in which segment registers are~
initialized upon transient program loading. The operating system program load
function determines the memory model used by a transient program by examining
the program group usage, as described in the following sections of this chapter.
The 8080 Memory Model
The 8080 Model is assumed when the transient program contains only a code group.
In this case, the CS, DS, and ES registers are initialized to the beginning of the code
group, while the SS and SP registers remain set to a 96-byte stack area in the CCP.
The Instruction Pointer Register (IP) is set to 100H, as in CP IM-80, thus allowing
base page values at the beginning of the code group. Following program load, the
8080 Model appears as shown in Figure 2-1, where low addresses are at the top of
the diagram.
2-3

Advertisement

Table of Contents
loading

Table of Contents