Library

Auto translated from German

My first programming attempts on the JOYCE were with the CP/M 2.2 Assembler ASM, because at that time I only had a manual from it. Completely unsatisfactory was the fact that the ASM had to have a single file as a source - a strain for longer programs! When I got documents about the RMAC, this became different because the RMAC allowed to move . REL (relocatable, reassignable) files, which could later be merged with a linker to form a file.
The advantage here is that program parts (modules) can be assembled in advance. These can then be managed with a utility (Librarian) in a library. After assembling the main program (which can also consist of individual modules), the linker is then instructed to add modules needed from the library.
I used the following development package at the time:
  • Assembler: First, the RMAC from Digital Research, which came with CP/M PLUS. Then the M80 from Microsoft. In addition to the RMAC, which only knew the 8080 mnemonics, it was now also possible to program in Z80-Mnemonic. Later came the SLRassembler, which was very fast, but only recognized Z80-Mnemonics.
    What all assemblers have in common is that they support the Microsoft REL format (here in English).
  • Linker: From the outset, only LINK from Digital Research was used for me. This program supports the generation of an RSX file and, to some extent, the overlay mechanism.
  • Librarian:Again, I used a product from Digital Research, namely LIB. LIB supports indexed REL (IRL) format. This means that libraries are searched more quickly. Here is a description of the DR-IRL format (here in English).
  • Debugger:There are some more comfortable debuggers, but also here I have applied a product from Digital Research, first SID,later then ZSID. ZSID has the same functionality as SID, but with support for Z80 syntax. However, there were problems with the breakpoint at the beginning - there were conflicts with the JOYCE interrupt vector.

Since many definitions in the modules (e.g. BDOS functions) are needed again and again, I have written a module that should be inserted into the source code of the modules, for example, with the assembler command. The same applies to assembly programming in general. There is also such a definition file for this:
Some references to the library can be found here. The built library consists of the following groups, whose routines are listed here in alphabetical order:

maclib baselib.lib

maclib base80.lib


When designing the library, it is important to pay attention to a particular order, see here

Here are two other notable libraries I've worked with:

  • SYSLIBis a collection of routines mainly for the ZCPR environment. (If I had known SYSLIB when I wrote my library, I would have been spared reinventing the wheel). SYSLIB is compatible with the Microsoft REL format and consists of the following modules:
    • SYSLIB: general routines
    • Z3LIB: ZCPR3 Routines
    • ZSLIB: ZSDOS Clock Routines
    • VLIB: Video routines for ZCPR3 systems
    • DSLIB: Clock Routines
  • ZSMLIB is a collection of C-like routines. Unfortunately, ZSMLIB is not compatible with the Microsoft REL format. There is a separate assembler, linker and librarian. However, the syntax of the assembler is different from that of the M80, do that the sources are also incompatible.