Section I INTRODUCTION ZCPR3: THE LIBRARIES A Reference Manual and User's Guide for SYSLIB, Z3LIB, and VLIB Written by Richard Conn Copyright 1986 Richard Conn This Page Left Blank ZCPR3: The Libraries Introduction 1. INTRODUCTION 1.1. What Are the Libraries of ZCPR3? The libraries of ZCPR3 consist of SYSLIB (SYStem LIBrary), Z3LIB (ZCPR3-specific routines), and VLIB (screen-oriented routines for ZCPR3). These libraries are intended to relieve the programmer of the task of frequently "re-inventing the wheel" and to provide him with an environment of reliable tools which encourages structured programming at the assembly language level. Each routine in the libraries can be viewed as a reliable "black box." The routines are completely documented within this manual and the help files (which can only be viewed under the HELP tool of ZCPR3), and the programmer is consistently provided with the following information: 1. Name of Subroutine 2. Function it performs 3. What its inputs are 4. What its outputs are 5. What registers are affected by it 6. What other library routines it calls upon 7. What errors can occur and how it handles them The routines are designed to work together and complement each other. Parameter passing is consistent between the various subroutines. For instance, all routines which need to be passed a pointer to a File Control Block are passed that pointer in the DE register pair. As a general rule, if a register is not returned as an output from the routine, then its value is not affected (it has the same value when the routine is exited as it had when the routine was called). The libraries are relocatable object modules created in the Microsoft M80 relocatable object format. The M80 or ZAS assemblers can be used to create and manipulate relocatable object modules. All routines are grouped within functionally- related modules. Once a routine is referenced (by the EXT statement in the M80 assembly language program), its module is loaded and it is available to the programmer by means of a simple subroutine call. All other subroutines within that particular module are also loaded, but they are not available to the programmer unless he has also referenced them by EXT statements. The module is loaded only once, regardless of how many routines within the module are referenced. For this reason, each module was designed to contain routines which are frequently used together or are called by each other (one routine within the module calls another routine within the module). 1-1 ZCPR3: The Libraries Introduction 1.2. What is Needed to Use the Libraries? You need an 8080, Z80, NSC800, or HD64180-based micro- computer with at least 48K bytes of contiguous memory running ZCPR3 or Z-System