mirror of
https://github.com/SEPPDROID/Digital-Research-Source-Code.git
synced 2025-10-24 08:54:17 +00:00
391 lines
11 KiB
TeX
391 lines
11 KiB
TeX
.bp
|
|
.pn 1
|
|
.cs 5
|
|
.mt 5
|
|
.mb 6
|
|
.pl 66
|
|
.ll 65
|
|
.po 10
|
|
.hm 2
|
|
.fm 2
|
|
.ft All Information Presented Here is Proprietary to Digital Research
|
|
.ce
|
|
.tc 1 System Overview
|
|
.sh
|
|
Section 1
|
|
.ce
|
|
.sp
|
|
.sh
|
|
System Overview
|
|
.sp 2
|
|
.he CP/M-8000 Operating System System Guide 1.1 Introduction
|
|
.tc 1.1 Introduction
|
|
.sh
|
|
1.1 Introduction
|
|
.qs
|
|
.pp
|
|
CP/M-8000 is a single-user, general purpose operating system for
|
|
microcomputers based on the Zilog Z8000 or equivalent microprocessor
|
|
chip. It is designed to be adaptable to almost any hardware environment, and
|
|
can be readily customized for particular hardware systems.
|
|
.ix Zilog Z8000
|
|
.pp
|
|
CP/M-8000 is equivalent to other CP/M \ \ systems with changes
|
|
dictated by the Z8000 architecture. In particular, CP/M-8000 supports the
|
|
very large segmented address space of the Z8000 family.
|
|
The CP/M-8000 file system
|
|
is upwardly compatible with CP/M-80 \ \ version 2.2 and CP/M-86 \ \ Version
|
|
1.1. The CP/M-8000 file structure allows files of up to 32 megabytes per
|
|
file. CP/M-8000 supports from one to sixteen disk drives with as many as
|
|
512 megabytes per drive.
|
|
.ix address space
|
|
.ix CP/M-8000 file structure
|
|
.pp
|
|
The entire CP/M-8000 operating system resides in memory at all times,
|
|
and is not reloaded at a warm start. CP/M-8000 can be configured to reside in
|
|
any portion of memory.
|
|
The remainder of the address space is available for applications programs,
|
|
and is called the transient program area, TPA.
|
|
The TPA is assumed to consist of one or more complete (64 Kbyte)
|
|
memory segments.
|
|
CP/M-8000 supports both segmented and non-segmented user programs, and
|
|
supports the splitting of user program and data into separate addressing
|
|
spaces.
|
|
.ix TPA
|
|
.pp
|
|
Several terms used throughout this manual are defined in Table 1-1.
|
|
.sp 2
|
|
.ce
|
|
.sh
|
|
Table 1-1. CP/M-8000 Terms
|
|
.sp
|
|
.nf
|
|
Term Meaning
|
|
.sp
|
|
.fi
|
|
.ll 60
|
|
.in 25
|
|
.ti -20
|
|
nibble 4-bit half-byte
|
|
.sp
|
|
.ti -20
|
|
byte 8-bit value
|
|
.sp
|
|
.ti -20
|
|
word 16-bit value
|
|
.sp
|
|
.ti -20
|
|
longword 32-bit value
|
|
.sp
|
|
.ti -20
|
|
address 32-bit identifier of a storage location
|
|
.sp
|
|
.ti -20
|
|
physical address address of a location in real memory
|
|
.sp
|
|
.ti -20
|
|
logical address address as issued by a program, possibly requiring
|
|
translation into a physical address.
|
|
.sp
|
|
.ti -20
|
|
offset a value defining an address in storage; a fixed
|
|
displacement from some other address
|
|
.ix nibble
|
|
.ix byte
|
|
.ix word
|
|
.ix longword
|
|
.ix address
|
|
.ix physical address
|
|
.ix logical address
|
|
.ix offset
|
|
.sp
|
|
.ti -20
|
|
.bp
|
|
.ll 60
|
|
.ce
|
|
.in 0
|
|
.sh
|
|
Table 1-1. (continued)
|
|
.sp 2
|
|
Term Meaning
|
|
.sp
|
|
.in 25
|
|
.ti -20
|
|
text segment program section containing machine instructions
|
|
.sp
|
|
.ti -20
|
|
data segment program section containing initialized data
|
|
.sp
|
|
.ti -20
|
|
block storage program section containing uninitialized data
|
|
.ti -20
|
|
segment (bss)
|
|
.sp
|
|
.ti -20
|
|
absolute describes a program which must reside at a fixed memory
|
|
address.
|
|
.sp
|
|
.ti -20
|
|
relocatable describes a program which includes relocation information
|
|
so it can be loaded into memory at any address
|
|
.ix text segment
|
|
.ix data segment
|
|
.ix block storage
|
|
.ix absolute
|
|
.ix relocatable
|
|
.ix CP/M-8000 programming model
|
|
.ix bss
|
|
.ix transient program
|
|
.ix base page
|
|
.in 0
|
|
.ll 65
|
|
.sp
|
|
.pp
|
|
The CP/M-8000 programming model is described in detail in the \c
|
|
.ul
|
|
CP/M-8000 Operating System Programmer's Guide.
|
|
.qu
|
|
\ To summarize that model briefly, CP/M-8000 supports four segments within
|
|
a program: text, data, block storage segment (bss), and stack. When a
|
|
program is loaded, CP/M-8000 allocates space for all four segments in the TPA,
|
|
and loads the text and data segments. A transient program may manage free
|
|
memory using values stored by CP/M-8000 in its base page.
|
|
.pp
|
|
If the program is to run in segmented mode,
|
|
the allocation of program segments to logical address segments must
|
|
have been done at link time. If the program is to run in non-segmented
|
|
mode, however, information in the Memory Region Table is used to
|
|
decide which physical segments to run the program in. If the program
|
|
is to run with split program and data spaces, two physical segments
|
|
are required (with the data, bss, and stack in the same physical
|
|
segment), otherwise only a single physical segment is used.
|
|
|
|
=== THIS LEAVES SOMETHING TO BE DESIRED ===
|
|
=== CLARITY, FOR EXAMPLE ===
|
|
.bp
|
|
.nf
|
|
.ll 60
|
|
USER
|
|
|
|
|
|
|
|
|
|
User Interface
|
|
|
|
(CCP)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Programming
|
|
Interface
|
|
|
|
|
|
(BDOS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Hardware
|
|
Interface
|
|
|
|
(BIOS)
|
|
|
|
|
|
|
|
|
|
|
|
HARDWARE ENVIRONMENT
|
|
.sp
|
|
.ce
|
|
.sh
|
|
Figure 1-1. CP/M-8000 Interfaces
|
|
.qs
|
|
.ll 65
|
|
.in 0
|
|
.ce 0
|
|
.fi
|
|
.he CP/M-8000 Operating System System Guide 1.2 CP/M 8000 Organization
|
|
.cp 6
|
|
.sp 2
|
|
.tc 1.2. CP/M-8000 Organization
|
|
.sh
|
|
1.2 CP/M-8000 Organization
|
|
.pp
|
|
CP/M-8000 comprises three system modules: the Console Command Processor (CCP)
|
|
the Basic Disk Operating System (BDOS) and the Basic Input/Output System
|
|
(BIOS). These modules are linked together to form the operating system.
|
|
They are discussed individually in this section.
|
|
.ix CCP
|
|
.ix BDOS
|
|
.ix BIOS
|
|
.ix CP/M-8000 , system modules
|
|
.ix interrupt vector area
|
|
.he CP/M-8000 System Guide 1.3 Memory Layout
|
|
.sp 2
|
|
.sh
|
|
.tc 1.3 Memory Layout
|
|
1.3 Memory Layout
|
|
.pp
|
|
The CP/M-8000 operating system can reside anywhere in memory.
|
|
The location of CP/M-8000 is defined
|
|
during system generation. Typically the system occupies a
|
|
segment which is logically separated from the TPA.
|
|
.pp
|
|
The TPA for non-segmented programs consists of one or two 64 Kbyte
|
|
segments, one for program and one for data. (Some programs
|
|
expect program and data to be mixed in one segment. The segment
|
|
in which such programs are run may be the same as or different
|
|
from the segments for separated program and data.) The TPA for
|
|
segmented programs consists of up to 128 segments.
|
|
|
|
The mapping from logical addresses (which consist of a 7-bit segment
|
|
number and a 16-bit offset) into physical addresses is done by
|
|
system-specific hardware, and the BIOS contains memory management
|
|
operations to map addresses and copy blocks of memory.
|
|
|
|
=== GRAB DISCUSSION FROM ARTICLE??? ===
|
|
|
|
.nf
|
|
.sp 2
|
|
.in 10
|
|
=== NEED MEMORY FIGURE FROM ARTICLE ===
|
|
.sp
|
|
.sh
|
|
Figure 1-2. Typical CP/M-8000 Memory Layout
|
|
.in 0
|
|
.sp 2
|
|
.fi
|
|
.tc 1.4 Console Command Processor
|
|
.sh
|
|
1.4 Console Command Processor (CCP)
|
|
.qs
|
|
.he CP/M 8000 System Guide 1.4 Console Command Processor
|
|
.ix CCP
|
|
.pp
|
|
The Console Command Processor, (CCP) provides the user interface to
|
|
CP/M-8000. It uses the BDOS to read user commands and load programs,
|
|
and provides several built-in user commands. It also provides
|
|
parsing of command lines entered at the console.
|
|
.ix user interface
|
|
.ix built-in user commands
|
|
.ix parsing, command lines
|
|
.bp
|
|
.tc Basic Disk Operating System (BDOS)
|
|
.sh
|
|
1.5 Basic Disk Operating System (BDOS)
|
|
.he CP/M 8000-System Guide 1.5 Basic Disk Operating System
|
|
.pp
|
|
The Basic Disk Operating System (BDOS) provides operating system services to
|
|
applications programs and to the CCP. These include character I/O,
|
|
disk file I/O (the BDOS disk I/O operations comprise the CP/M-8000 file
|
|
system), program loading, and others.
|
|
.ix BDOS
|
|
.ix applications programs
|
|
.ix I/O character
|
|
.ix I/O, disk file
|
|
.ix BIOS
|
|
.ix interface, hardware
|
|
.sp 2
|
|
.tc Basic I/O System (BIOS)
|
|
.sh
|
|
1.6 Basic I/O System (BIOS)
|
|
.he CP/M 8000 Operating System 1.6 Basic I/O System (BIOS)
|
|
.pp
|
|
The Basic Input Output System (BIOS) is the interface between CP/M-8000 and its
|
|
hardware environment. All physical input and output is done by the
|
|
BIOS. It includes all physical device drivers, tables defining disk
|
|
characteristics, and other hardware specific functions and tables. The
|
|
CCP and BDOS do not change for different hardware environments because
|
|
all hardware dependencies have been concentrated in the BIOS. Each hardware
|
|
configuration needs its own BIOS. Section 4 describes the BIOS functions in
|
|
detail. Section 5 discusses how to write a custom BIOS. Sample BIOSes are
|
|
presented in the appendixes.
|
|
.sp 2
|
|
.tc I/O Devices
|
|
.sh
|
|
1.7 I/O Devices
|
|
.he CP/M 8000 Operating System 1.7 I/O Devices
|
|
.pp
|
|
CP/M-8000 recognizes two basic types of I/O devices:
|
|
character devices and disk drives. Character devices are serial devices that
|
|
handle one character at a time. Disk devices handle data in units of 128
|
|
bytes, called sectors, and provide a large number of sectors which can be
|
|
accessed in random, nonsequential, order. In fact, real systems might have
|
|
devices with characteristics different from these. It is the BIOS's
|
|
responsibility to resolve differences between the logical device models and
|
|
the actual physical devices.
|
|
.ix I/O devices, character
|
|
.ix I/O divices, disk drives
|
|
.ix sector
|
|
.ix divice models, logical
|
|
.sp 2
|
|
.tc 1.7.1 Character Devices
|
|
.sh
|
|
1.7.1 Character Devices
|
|
.pp
|
|
Character devices are input output devices which accept or supply
|
|
streams of ASCII characters to the computer. Typical character devices are
|
|
consoles, printers, and modems. In CP/M-8000 operations on character devices
|
|
are done one character at a time. A character input device sends ASCII
|
|
CTRL-Z (1AH) to indicate end-of-file.
|
|
.ix character devices
|
|
.ix ASCII character
|
|
.ix CTRL-Z (1AH)
|
|
.ix end-of-file
|
|
.ix sectors, 128-byte
|
|
.sp 2
|
|
.tc 1.7.2 Character Devices
|
|
.sh
|
|
1.7.2 Character Devices
|
|
.qs
|
|
.pp
|
|
Disk devices are used for file storage. They are organized into sectors and
|
|
tracks. Each sector contains 128 bytes of data. (If sector sizes other than
|
|
128 bytes are used on the actual disk, then the BIOS must do a
|
|
logical-to-physical mapping to simulate 128-byte sectors to the rest of the
|
|
system.)
|
|
All disk I/O in CP/M-8000 is done in one-sector units. A track is a group of
|
|
sectors. The number of sectors on a track is a constant depending on the
|
|
particular device. (The characteristics of a disk device are specified in
|
|
the Disk Parameter Block for that device. See Section 5.)
|
|
|
|
To locate a particular sector, the disk, track number,
|
|
and sector number must all be specified.
|
|
.ix disk devices
|
|
.ix file storage
|
|
.ix mopping, logical-to-physical
|
|
.ix track
|
|
.sp 2
|
|
.tc 1.8 System Generation and Cold Start Operation
|
|
.sh
|
|
1.8 System Generation and Cold Start Operation
|
|
.pp
|
|
Generating a CP/M-8000 system is done by linking together the CCP, BDOS, and
|
|
BIOS to create a file called CPM.SYS, which is the operating system.
|
|
Section 2 discusses how to create CPM.SYS. CPM.SYS is brought into memory
|
|
by a bootstrap loader which will typically reside on the first two tracks
|
|
of a system disk. (The term system disk as used here simply means a disk
|
|
with the file CPM.SYS and a bootstrap loader.) Creation of a bootstrap loader
|
|
is discussed in Section 3.
|
|
|
|
=== WORRY ABOUT THIS ===
|
|
.ix track
|
|
.ix CCP
|
|
.ix BDOS
|
|
.ix BIOS
|
|
.ix disk
|
|
.ix bootstrap loader
|
|
.ix system disk
|
|
.ix CPM.SYS
|
|
.ix system generation
|
|
.ix cold start
|
|
.sp 2
|
|
.ce
|
|
End of Section 1
|
|
.nx two
|