Files
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

593 lines
15 KiB
TeX

.bp odd
.fi
.he
.in 0
.cs 5
.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 2
.tc 1 Introduction to CP/M-8000
.sh
Section 1
.sp
.sh
Introduction to CP/M-8000
.sp 2
.pp 5
CP/M-8000 contains most of the facilities of other CP/M systems with
additional features required to address up to sixteen megabytes of main
memory available on the Z8000 microprocessor. 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 supports a maximum of sixteen drives with up to
512 megabytes on each drive and a maximum file size of 32 megabytes.
.ix file structure
.ix CP/M-8000 architecture
.ix CP/M-8000 operating system
.ix CPM.SYS file
.tc 1.1 CP/M-8000 System Architecture
.he CP/M-8000 Programmer's Guide 1.1 CP/M-8000 Architecture
.sp 2
.sh
1.1 CP/M-8000 Architecture
.pp
The CP/M-8000 operating system resides in the file CPM.SYS on
the system disk. A cold start loader resides on the first
two tracks of the system disk and loads the CPM.SYS file into memory
during a cold start. The CPM.SYS file contains the three program modules
described in Table 1-1.
====================== BOOT DETAILS TO BE FILLED IN LATER ===============
.sp 2
.ce
.sh
Table 1-1. Program Modules in the CPM.SYS File
.sp
.nf
.in 5
Module Mnemonic Description
.sp
.qs
.fi
.ll 60
.in 43
.ti -38
Console Command Processor CCP User interface that parses the
user command line.
.sp
.ti -38
Basic Disk Operating System BDOS Provides functions that access the
file system.
.sp
.ti -38
Basic I/O System BIOS Provides functions that interface
peripheral device drivers for I/O processing.
.in 0
.ix cold start loader
.ix CPM.SYS
.ix Console Command Processor
.ix CCP
.ix Basic Disk Operating System
.ix BDOS
.ix Basic I/O System
.ix BIOS
.ix exception vectors
.sp
.pp
.ll 65
The sizes of the CCP and BDOS modules are fixed for a given
release of CP/M-8000. The BIOS custom module, normally supplied by
the computer manufacturer or software distributor
depends
on the system configuration, which varies with the
implementation. Therefore, the size of the BIOS also varies with
the implementation.
.pp
The CP/M-8000 operating system can be loaded to execute in any
memory segment in the Z8000's memory space.
All CP/M-8000 modules remain resident in memory. The CCP cannot be
used as a data area subsequent to transient program load.
.sp 2
.tc 1.2 Transient Programs
.he CP/M-8000 Programmer's Guide 1.2 Transient Programs
.sh
1.2 Transient Programs
.qs
.ix transient programs
.pp
After CP/M-8000 is loaded in memory, the remaining segments of
address space that are not occupied by the CP/M-8000 operating
system are called the Transient Program Area (TPA). CP/M-8000 loads
executable files, called command files, from disk to the TPA.
These command files are also called transient commands or
transient programs because they temporarily reside in memory,
rather than being permanently resident in memory and configured in CP/M-8000.
The format of a command file is described in Section 3.
.ix transient program
.ix command file
.pp
Non-segmented transient programs may be run either in a single
TPA segment, or in two segments: one for instructions and one for
data (called "split I and D" spaces). Segmented programs may use
any segments of the TPA.
.ix segmented programs
.ix non-segmented programs.
.tc 1.3 File System Access
.he CP/M-8000 Programmer's Guide 1.3 File System Access
.sp 2
.sh
1.3 File System Access
.qs
.ix file system access
.pp
Programs do not specify absolute locations or default variables
when accessing CP/M-8000. Instead, programs invoke BDOS and BIOS
functions. Section 4 describes the BDOS functions in detail.
Appendix A lists the BIOS calls. Refer to the \c
.ul
CP/M-8000 Operating System System Guide \c
.qu
for detailed descriptions of the BIOS
functions. In addition to these functions, CP/M-8000 decreases
dependence on absolute addresses by maintaining a base page in
the TPA for each transient program in memory. The base page
contains initial values for the File Control Block (FCB) and the
Direct Memory Access (DMA) buffer. For details on the base page
and loading transient programs, refer to Section 2.
.tc 1.4 Programming Tools and Commands
.he CP/M-8000 Programmer's Guide 1.4 Programming Tools and Commands
.sp 2
.sh
1.4 Programming Tools and Commands
.qs
.ix programming tools and commands
.pp
CP/M-8000 contains a full set of programming tools that include an assembler
(AS8K), linker/relocator, (LD8K), Archive Utility (AR8K),
hex/ascii DUMP Utility, and object-file dump utility (XDUMP).
Each of these tools is discussed in the
latter part of this guide. Table 1-3 lists the commands that invoke these
tools. Table 1-2 describes command conventions used in this manual.
Tables 1-4 and 1-5 list other commands supported by CP/M-8000 and the manual
in which they are documented.
.ix operating system, access
.ix base page
.ix access, operating system
.sp 2
.ce
.sh
Table 1-2. CP/M-8000 Programmer's Guide Conventions
.sp
.nf
Convention Meaning
.sp
.fi
.ll 60
.in 23
.ti -18
[] Square brackets in a command line enclose optional
parameters.
.sp
.ti -18
nH The capital letter H follows numeric values that are
represented in hexadecimal notation.
.sp
.ti -18
numeric values Unless otherwise stated, numeric values are represented in
decimal notation.
.sp
.ti -18
(n) BDOS function numbers are enclosed in parentheses when they
appear in text.
.bp
.in 0
.ll 65
.ce
.sh
Table 1-2. (continued)
.sp
.nf
Convention Meaning
.sp
.fi
.ll 60
.in 23
.ti -18
.
.ti -18
. or ...
.ti -18
. A vertical or horizontal elipsis indicates missing elements
in a series unless noted otherwise.
.sp
.ti -18
RETURN The word RETURN refers to the RETURN key on the keyboard of
your console. Unless otherwise noted, to invoke a command, you must press
RETURN after you enter a command line from your console.
.sp
.ti -18
CTRL-X The mnemonic CTRL-X instructs you to press the key labeled
CTRL while you press another key indicated by the variable X. For example,
CTRL-C instructs you to press the CTRL key while you simultaneously press the
key lettered C.
.fi
.in 0
.ll 65
.sp
.pp
Table 1-3 describes commands used in the \c
.ul
CP/M-8000 Operating System Programmer's Guide.
.qu
.sp 2
.sh
.ce
Table 1-3. CP/M-8000 Commands (Programmer's Guide)
.sp
.ix CP/M-8000 commands
.ll 60
.in 21
.ti -16
Command Description
.sp
.qs
.ti -15
AR8K Invokes the Archive Utility (AR8K). AR8K creates a
library and/or deletes, adds, or extracts object modules from an
existing library, such as the C Run-time Library.
.sp
.ix AR8K
.ix archive utility (AR8K)
.ti -15
AS8K Invokes the Assembler (AS8K).
.sp
.ix AS8K
.ix Assembler (AS8K)
.ti -15
DDT Invokes DDT-8000, the CP/M-8000 debugger.
.sp
.ix DDT
.ix DDT-8000
.ti -15
DUMP Invokes the DUMP Utility that prints the contents of a file
in hexadecimal and ASCII notation.
.sp
.ix DUMP
.ix DUMP utility
.ti -15
LD8K Invokes the Linker.
.sp
.ix LD8K
.ti -15
XDUMP Invokes the XDUMP Utility that prints the header,
contents, and symbol table of an object or command file.
.sp
.ix XDUMP
.ix XDUMP utility
.bp
.in 0
.ll 65
.sh
.ce
Table 1-3. (continued)
.sp
.ix CP/M-8000 commands
.ll 60
.in 21
.ti -16
Command Description
.sp
.qs
.fi
.sp
.pp
Table 1-4 describes commands used in the \c
.ul
CP/M-8000 Operating System User's Guide.
.qu
.sp 2
.ce
.sh
Table 1-4. CP/M-8000 Commands (User's Guide)
.sp
.in 22
.ll 60
.ti -16
Command Description
.qs
.sp
.ti -15
DIR* Displays the directory of files on a specified disk.
.sp
.ix DIR*
.ti -15
DIRS* Displays the directory of system files on a
specified disk.
.sp
.ix DIRS*
.ti -15
ED Invokes the CP/M-8000 text editor.
.sp
.ix CP/M-8000 text editor
.ti -15
ERA* Erases one or more specified files.
.sp
.ix ERA*
.ti -15
PIP Copies, combines, and transfers specified files between
peripheral devices.
.sp
.ix PIP
.ti -15
REN* Renames an existing file to the new name specified in the
command line.
.sp
.ix REN*
.ti -15
SUBMIT* Executes a file of CP/M commands.
.sp
.ix SUBMIT*
.ti -15
TYPE* Displays the contents of an ASCII file on the
console.
.mb 5
.fm 1
.sp
.ix TYPE*
.ti -15
USER* Displays or changes the current user number.
.ix USER*
.sp
.in 0
.ll 65
.fi
.pp 5
* CP/M-8000 built-in commands
.bp
.mb 6
.fm 2
.pp
Table 1-5 describes commands used in the \c
.ul
C Programming Guide for CP/M-8000.
.sp 2
.ce
.sh
Table 1-5. CP/M-8000 Commands (C Manual)
.sp
.in 22
.ti -17
.ll 60
.nf
Command Description
.fi
.sp
.ti -15
========= C COMMANDS NEED WRITEUP ===========
C Invokes a submit file that invokes the C
compiler for compiling CP/M-8000 C source files.
.sp
.fi
.tc 1.5 CP/M-8000 File Specification
.he CP/M-8000 Programmer's Guide 1.5 File Specification
.sh
1.5 CP/M-8000 File Specification
.qs
.ix CP/M-8000 file specification
.pp
The CP/M-8000 file specification is compatible with other
CP/M systems. The format contains three fields: a 1-character drive
select code (d), a 1- through 8-character filename (f...f), and
a 1- through 3-character filetype (ttt) field as shown below.
.nf
.sp
Format d:ffffffff.ttt
.sp
Example B:MYRAH.DAT
.pp
.ix drive select code
.ix filetype fields
.fi
The drive select code and filetype fields are optional. A
colon (:) delimits the drive select field. A period (.)
delimits the filetype field. These delimiters are required only when
the fields they delimit are specified.
.pp
Values for the drive select code range from A through P
when the BIOS implementation supports 16 drives, the maximum
number allowed. The range for
the drive code is dependent on the BIOS implementation. Drives
are labeled A through P to correspond to the 1 through 16 drives
supported by CP/M-8000. However, not all BIOS implementations
support the full range.
.pp
The characters in the filename and filetype fields cannot contain
delimiters (the colon and period) and must be upper-case for the
CCP to parse the file specification. The CCP cannot access a
file that contains delimiters or lower-case characters. A command
line and its file specifications, if any, that are entered at the
CCP level are automatically put in upper-case internally before the CCP
parses them.
.ix delimiter characters
.pp
However, not all commands and file specifications are entered at the
CCP level. CP/M-8000 does not prevent you from including
delimiters or lower-case characters in file specifications
that are created or referenced by functions that bypass the CCP.
For example, the BDOS Make File Function (22) allows you to create a
file specification that includes delimiters and lower-case
characters, although the CCP cannot parse and access such a file.
.pp
In addition to the delimiter characters already mentioned, you
should avoid using the delimiter characters in Table 1-6 in the
file specification of a file you create. Several
CP/M-8000 built-in commands and utilities have special uses for
these characters.
.sp 2
.ce
.sh
Table 1-6. Delimiter Characters
.sp 2
.nf
Character Description
.sp
.qs
[] square brackets
.br
() parentheses
.br
<> angle brackets
.br
= equals sign
.br
* asterisk
.br
& ampersand
.br
, comma
.br
! exclamation point
.br
| bar
.br
? question mark
.br
/ slash
.br
$ dollar sign
.br
. period
.br
: colon
.br
; semicolon
.br
+ plus sign
.br
- minus sign
.sp 2
.fi
.he CP/M-8000 Programmer's Guide 1.6 Wildcards
.sp 2
.tc 1.6 Wildcards
.sh
1.6 Wildcards
.qs
.ix wildcards
.pp
CP/M-8000 supports two wildcards, the question mark (?) and the
asterisk (*). Several utilities and BDOS functions allow you
to specify wildcards in a file specification to perform the
operation or function on one or more files. However, BDOS
functions support only the ? wildcard.
.pp
The ? wildcard matches any character in the character
position occupied by this wildcard. For example, the file
specification M?RAH.DAT indicates the second letter of the
filename can be any alphanumeric character if the remainder of
file specification matches. Thus, the ? wildcard matches exactly one
character position.
.pp
The * wildcard matches one or more characters in the
field or remainder of a field that this wildcard occupies. CP/M-8000
internally pads the field or remaining portion of the field
occupied by the * wildcard with ?
wildcards before searching for a match. For example, CP/M-8000
converts the file B*.DAT to B???????.DAT before searching for a matching
file specification. Thus, any file that starts with the letter B
and has a filetype of DAT matches this file specification.
.pp
For details on wildcard support by a specific BDOS function, refer to
the description of the function in Section 4 of this guide. For
additional details on these wildcards and support by CP/M-8000 utilities,
refer to the \c
.ul
CP/M-8000 Operating System User's Guide.
.qu
.sp 2
.he CP/M-8000 Programmer's Guide 1.7 CP/M-8000 Terminology
.tc 1.7 CP/M-8000 Terminology
.sh
1.7 CP/M-8000 Terminology
.qs
.pp
Table 1-7 lists the terminology used throughout this guide to describe
CP/M-8000 values and program components.
.sp 2
.ce
.sh
Table 1-7. CP/M-8000 Terminology
.sp
.ix CP/M-8000 terminology
.in 5
.nf
Term Meaning
.qs
.fi
.ll 60
.in 28
.ti -23
.sp
Nibble 4-bit value
.sp
.ix nibble
.ti -23
Byte 8-bit value
.sp
.ix byte
.ti -23
Word 16-bit value
.sp
.ix word
.ti -23
Longword 32-bit value
.sp
.ix longword
.ti -23
Address 32-bit value that specifies a location in storage
.sp
.ix address
.ti -23
Offset A fixed displacement defined by the user to reference
a location in storage, other data source, or destination.
.sp
.ix offset
.ti -23
Text Segment The section of a program that contains the program
instructions.
.sp
.ix text segment
.ti -23
Data Segment The section of a program that contains initialized data.
.sp
.ix data segment
.ti -23
Block Storage The section of a program that
.sp 0
Segment (bss) contains uninitialized data.
.ix block storage segment (bss)
.ix bss
.ix segment, block
.ix segment, text
.ix segment, data
===================== POSSIBLY ADD DEFS FOR SEGMENTED ADDRESSES ==========
.fi
.ll 65
.in 0
.sp 2
.ce
End of Section 1
.bp
.he CP/M-8000 Programmer's Guide End of Section 1
.sp 50
.nx two