System information
5.2 Operating System Call Conventions
This section provides detailed information for performing direct operating system calls from user
programs. Many of the functions listed below, however, are accessed more simply through the
I/O macro library provided with the MAC macro assembler and listed in the Digital Research
manual entitled, "Programmer's Utilities Guide for the CP/M Family of Operating Systems."
CP/M facilities that are available for access by transient programs fall into two general
categories: simple device I/O and disk file I/O. The simple device operations are
- read a console character
- write a console character
- read a sequential character
- write a sequential character
- get or set I/O status
- print console buffer
- interrogate console ready
The following FDOS operations perform disk I/O:
- disk system reset
- drive selection
- file creation
- file close
- directory search
- file delete
- file rename
- random or sequential read
- random or sequential write
- interrogate available disks
- interrogate selected disk
- set DMA address
- set/reset file indicators.
As mentioned above, access to the FDOS functions is accomplished by passing a function
number and information address through the primary point at location BOOT+0005H. In general,
the function number is passed in register C with the information address in the double byte pair
DE. Single byte values are returned in register A, with double byte values returned in HL, a zero
value is returned when the function number is out of range. For reasons of compatibility, register
A = L and register B = H upon return in all cases. Note that the register passing conventions of
CP/M agree with those of the Intel PL/M systems programming language. CP/M functions and
their numbers are listed below.
5.1 Introduction CP/M Operating System Manual
5-4